diff --git a/.gitattributes b/.gitattributes index 0cf8e092775..6d0e2ede718 100644 --- a/.gitattributes +++ b/.gitattributes @@ -18,27 +18,11 @@ tests/web/eof_line_ending_test.dart -text tests/web/string_interpolation_test.dart -text tests/web/string_interpolation_dynamic_test.dart -text tests/web/literal_string_juxtaposition_test.dart -text -tests/web_2/eof_line_ending_test.dart -text -tests/web_2/string_interpolation_test.dart -text -tests/web_2/string_interpolation_dynamic_test.dart -text -tests/web_2/literal_string_juxtaposition_test.dart -text tests/language/string/raw_string_test.dart -text tests/language/string/multiline_strings_test.dart -text tests/language/string/multiline_newline_cr.dart -text tests/language/string/multiline_newline_crlf.dart -text tests/language/string/multiline_newline_lf.dart -text -tests/language_2/string/raw_string_test.dart -text -tests/language_2/string/multiline_strings_test.dart -text -tests/language_2/string/multiline_newline_cr.dart -text -tests/language_2/string/multiline_newline_crlf.dart -text -tests/language_2/string/multiline_newline_lf.dart -text -tests/lib_2/convert/json_pretty_test.dart -text -tests/lib_2/mirrors/method_mirror_source_line_ending_cr.dart -text -tests/lib_2/mirrors/method_mirror_source_line_ending_crlf.dart -text -tests/lib_2/mirrors/method_mirror_source_line_ending_lf.dart -text -tests/lib_2/mirrors/method_mirror_source_line_ending_test.dart -text -tests/lib_2/mirrors/method_mirror_source_other.dart -text -tests/lib_2/mirrors/method_mirror_source_test.dart -text tests/lib/mirrors/method_mirror_source_line_ending_cr.dart -text tests/lib/mirrors/method_mirror_source_line_ending_crlf.dart -text tests/lib/mirrors/method_mirror_source_line_ending_lf.dart -text diff --git a/pkg/_js_interop_checks/lib/js_interop_checks.dart b/pkg/_js_interop_checks/lib/js_interop_checks.dart index 8f7dced7227..1beedea63ae 100644 --- a/pkg/_js_interop_checks/lib/js_interop_checks.dart +++ b/pkg/_js_interop_checks/lib/js_interop_checks.dart @@ -88,14 +88,10 @@ class JsInteropChecks extends RecursiveVisitor { RegExp(r'(? _allowedTrustTypesTestPatterns = [ RegExp(r'(? _allowedNativeTestPatterns = [ RegExp(r'(? options) async { DiagnosticCollector collector = DiagnosticCollector(); - String fileName = 'sdk/tests/web_2/native/main.dart'; + String fileName = 'sdk/tests/web/native/main.dart'; Uri entryPoint = Uri.parse('memory:$fileName'); await runCompiler( entryPoint: entryPoint, diff --git a/pkg/compiler/test/js/js_constant_test.dart b/pkg/compiler/test/js/js_constant_test.dart index 277bcb20382..fbda633386a 100644 --- a/pkg/compiler/test/js/js_constant_test.dart +++ b/pkg/compiler/test/js/js_constant_test.dart @@ -20,9 +20,9 @@ const String TEST_1 = r""" main() { runTest() async { check(String test) async { - // Pretend this is a web_2/native test to allow use of 'native' keyword + // Pretend this is a web/native test to allow use of 'native' keyword // and import of private libraries. - String main = 'sdk/tests/web_2/native/main.dart'; + String main = 'sdk/tests/web/native/main.dart'; Uri entryPoint = Uri.parse('memory:$main'); var result = await runCompiler( entryPoint: entryPoint, memorySourceFiles: {main: test}); diff --git a/pkg/compiler/test/js/js_spec_optimization_test.dart b/pkg/compiler/test/js/js_spec_optimization_test.dart index b2e128a1e69..079425aab2f 100644 --- a/pkg/compiler/test/js/js_spec_optimization_test.dart +++ b/pkg/compiler/test/js/js_spec_optimization_test.dart @@ -89,7 +89,7 @@ main() { runTests() async { check(String test) async { var checker = checkerForAbsentPresent(test); - String main = 'sdk/tests/web_2/native/main.dart'; + String main = 'sdk/tests/web/native/main.dart'; Uri entryPoint = Uri.parse('memory:$main'); var result = await runCompiler( entryPoint: entryPoint, memorySourceFiles: {main: test}); diff --git a/pkg/compiler/test/jsinterop/internal_annotations_test.dart b/pkg/compiler/test/jsinterop/internal_annotations_test.dart index 9418c9c82d8..382dccb2b9b 100644 --- a/pkg/compiler/test/jsinterop/internal_annotations_test.dart +++ b/pkg/compiler/test/jsinterop/internal_annotations_test.dart @@ -29,7 +29,7 @@ testClasses(String import1, String import2) async { {List directlyInstantiated = const [], List abstractlyInstantiated = const [], List indirectlyInstantiated = const []}) async { - String mainFile = 'sdk/tests/web_2/native/main.dart'; + String mainFile = 'sdk/tests/web/native/main.dart'; Uri entryPoint = Uri.parse('memory:$mainFile'); CompilationResult result = await runCompiler(entryPoint: entryPoint, memorySourceFiles: { diff --git a/pkg/compiler/test/model/cfe_annotations_test.dart b/pkg/compiler/test/model/cfe_annotations_test.dart index 3db1f4dc0b7..b8773857238 100644 --- a/pkg/compiler/test/model/cfe_annotations_test.dart +++ b/pkg/compiler/test/model/cfe_annotations_test.dart @@ -17,7 +17,7 @@ import 'package:kernel/ast.dart' as ir; import '../helpers/args_helper.dart'; import 'package:compiler/src/util/memory_compiler.dart'; -const String pathPrefix = 'sdk/tests/web_2/native/'; +const String pathPrefix = 'sdk/tests/web/native/'; const Map source = { '$pathPrefix/main.dart': ''' diff --git a/pkg/compiler/test/model/native_test.dart b/pkg/compiler/test/model/native_test.dart index 16784c677fa..f4b59ae64b6 100644 --- a/pkg/compiler/test/model/native_test.dart +++ b/pkg/compiler/test/model/native_test.dart @@ -18,7 +18,7 @@ enum Kind { main() { asyncTest(() async { - await runTest('tests/web_2/jsinterop_test.dart', '', { + await runTest('tests/web/jsinterop_test.dart', '', { 'Class': Kind.regular, 'JsInteropClass': Kind.jsInterop, 'flag': Kind.regular, @@ -79,7 +79,7 @@ main() { '53', '54', ]); - await runTest('tests/web_2/non_jsinterop_test.dart', '', { + await runTest('tests/web/non_jsinterop_test.dart', '', { 'Class': Kind.regular, 'JsInteropClass': Kind.jsInterop, 'flag': Kind.regular, @@ -139,7 +139,7 @@ main() { ]); await runTest( - 'tests/web_2/native/native_test.dart', 'tests/web_2/native/', { + 'tests/web/native/native_test.dart', 'tests/web/native/', { 'Class': Kind.regular, 'NativeClass': Kind.native, 'topLevelField': Kind.regular, diff --git a/pkg/compiler/test/model/strong_mode_closed_world_test.dart b/pkg/compiler/test/model/strong_mode_closed_world_test.dart index 7024cf65f6a..921ecf63c82 100644 --- a/pkg/compiler/test/model/strong_mode_closed_world_test.dart +++ b/pkg/compiler/test/model/strong_mode_closed_world_test.dart @@ -17,9 +17,9 @@ main() { } runTest() async { - // Pretend this is a web_2/native test to allow use of 'native' keyword + // Pretend this is a web/native test to allow use of 'native' keyword // and import of private libraries. - String main = 'sdk/tests/web_2/native/main.dart'; + String main = 'sdk/tests/web/native/main.dart'; Uri entryPoint = Uri.parse('memory:$main'); CompilationResult result = diff --git a/pkg/dev_compiler/lib/src/kernel/target.dart b/pkg/dev_compiler/lib/src/kernel/target.dart index 7e54af4c1a3..ce64034d203 100644 --- a/pkg/dev_compiler/lib/src/kernel/target.dart +++ b/pkg/dev_compiler/lib/src/kernel/target.dart @@ -509,9 +509,7 @@ class _CovarianceTransformer extends RecursiveVisitor { List _allowedNativeTestPatterns = [ 'tests/dartdevc', 'tests/web/native', - 'tests/web_2/native', 'tests/web/internal', - 'tests/web_2/internal', ]; bool allowedNativeTest(Uri uri) { diff --git a/pkg/smith/lib/configuration.dart b/pkg/smith/lib/configuration.dart index 9555c50edad..f79825cba6c 100644 --- a/pkg/smith/lib/configuration.dart +++ b/pkg/smith/lib/configuration.dart @@ -1122,6 +1122,9 @@ class System extends NamedEnum { } } +// TODO(rnystrom): NnbdMode.legacy can be removed now that opted out code is no +// longer supported. This entire enum and the notion of "NNBD modes" can be +// removed once it's no longer possible to run programs in unsound weak mode. /// What level of non-nullability support should be applied to the test files. class NnbdMode extends NamedEnum { /// "Opted out" legacy mode with no NNBD features allowed. diff --git a/pkg/test_runner/lib/src/command_output.dart b/pkg/test_runner/lib/src/command_output.dart index 65c2e4fe264..8a513949400 100644 --- a/pkg/test_runner/lib/src/command_output.dart +++ b/pkg/test_runner/lib/src/command_output.dart @@ -1098,7 +1098,7 @@ class Dart2jsCompilerCommandOutput extends CompilationCommandOutput /// Matches the location and message of a dart2js error message, which looks /// like: /// - /// tests/language_2/some_test.dart:9:3: + /// tests/language/some_test.dart:9:3: /// Error: Some message. /// BadThing(); /// ^ @@ -1130,7 +1130,7 @@ class Dart2WasmCompilerCommandOutput extends CompilationCommandOutput /// Matches the location and message of a dart2wasm error message, which looks /// like: /// - /// tests/language_2/some_test.dart:9:3: Error: Some message. + /// tests/language/some_test.dart:9:3: Error: Some message. /// BadThing(); /// ^ /// @@ -1155,7 +1155,7 @@ class DevCompilerCommandOutput extends CommandOutput with _StaticErrorOutput { /// Matches the first line of a DDC error message. DDC prints errors to /// stdout that look like: /// - /// org-dartlang-app:/tests/language_2/some_test.dart:7:21: Error: Some message. + /// org-dartlang-app:/tests/language/some_test.dart:7:21: Error: Some message. /// Try fixing the code to be less bad. /// var _ = [if (1) 2]; /// ^ @@ -1462,7 +1462,7 @@ class FastaCommandOutput extends CompilationCommandOutput /// Matches the first line of a Fasta error, warning, or context message. /// Fasta prints to stdout like: /// - /// tests/language_2/some_test.dart:7:21: Error: Some message. + /// tests/language/some_test.dart:7:21: Error: Some message. /// Try fixing the code to be less bad. /// var _ = [if (1) 2]; /// ^ diff --git a/pkg/test_runner/lib/src/options.dart b/pkg/test_runner/lib/src/options.dart index 43913c0e85a..d30654007ba 100644 --- a/pkg/test_runner/lib/src/options.dart +++ b/pkg/test_runner/lib/src/options.dart @@ -15,16 +15,6 @@ import 'repository.dart'; import 'test_configurations.dart'; import 'utils.dart'; -const _legacyTestSelectors = [ - 'corelib_2', - 'ffi_2', - 'language_2', - 'lib_2', - 'kernel', - 'utils', - 'vm', -]; - const _defaultTestSelectors = [ 'corelib', 'ffi', @@ -506,7 +496,6 @@ has been specified on the command line.''') var allSuiteDirectories = [ ...testSuiteDirectories, Path('tests/co19'), - Path('tests/co19_2'), ]; var selectors = []; @@ -523,8 +512,8 @@ has been specified on the command line.''') if (selector.startsWith('$path/')) { selector = selector.substring(path.lastIndexOf('/') + 1); - // Remove the `src/` subdirectories from the co19 and co19_2 - // directories that do not appear in the test names. + // Remove the `src/` subdirectories from the co19 directories that do + // not appear in the test names. if (selector.startsWith('co19')) { selector = selector.replaceFirst(RegExp('src/'), ''); } @@ -859,11 +848,7 @@ has been specified on the command line.''') .toSet() .toList(); } else { - if (nnbdMode == NnbdMode.legacy) { - selectors.addAll(_legacyTestSelectors); - } else { - selectors.addAll(_defaultTestSelectors); - } + selectors.addAll(_defaultTestSelectors); } var excludeSuites = configuration['exclude-suite'] != null diff --git a/pkg/test_runner/lib/src/output_log.dart b/pkg/test_runner/lib/src/output_log.dart index 755229c0cf8..9fed4999bba 100644 --- a/pkg/test_runner/lib/src/output_log.dart +++ b/pkg/test_runner/lib/src/output_log.dart @@ -12,7 +12,7 @@ const _truncatedError = /// Records the output from a test. class OutputLog implements StreamConsumer> { - // TODO(45618): Reduce this if language_2/unsorted/disassemble_test is fixed + // TODO(45618): Reduce this if language/unsorted/disassemble_test is fixed // to produce less output and any other large-output tests are fixed. static const _maxLength = 10 * 1024 * 1024; diff --git a/pkg/test_runner/lib/src/test_configurations.dart b/pkg/test_runner/lib/src/test_configurations.dart index 0e30d871519..9d53d962a6b 100644 --- a/pkg/test_runner/lib/src/test_configurations.dart +++ b/pkg/test_runner/lib/src/test_configurations.dart @@ -34,18 +34,12 @@ final testSuiteDirectories = [ Path('runtime/tests/vm'), Path('samples'), Path('tests/corelib'), - Path('tests/corelib_2'), Path('tests/dartdevc'), - Path('tests/dartdevc_2'), Path('tests/ffi'), - Path('tests/ffi_2'), Path('tests/language'), - Path('tests/language_2'), Path('tests/lib'), - Path('tests/lib_2'), Path('tests/standalone'), Path('tests/web'), - Path('tests/web_2'), Path('third_party/pkg/dart_style'), Path('third_party/pkg/dartdoc'), Path('third_party/pkg/native/pkgs/native_assets_builder'), @@ -150,7 +144,7 @@ Future testConfigurations(List configurations) async { } for (var key in configuration.selectors.keys) { - if (key == 'co19_2' || key == 'co19') { + if (key == 'co19') { testSuites.add(Co19TestSuite(configuration, key)); } else if (configuration.compiler == Compiler.dartk && configuration.runtime == Runtime.vm && diff --git a/pkg/test_runner/lib/src/test_suite.dart b/pkg/test_runner/lib/src/test_suite.dart index d12ddaa7e52..1eb2abec1a6 100644 --- a/pkg/test_runner/lib/src/test_suite.dart +++ b/pkg/test_runner/lib/src/test_suite.dart @@ -1110,7 +1110,7 @@ class AnalyzeLibraryTestSuite extends StandardTestSuite { AnalyzeLibraryTestSuite(TestConfiguration configuration) : super(configuration, 'analyze_library', _libraryPath(configuration), - ['tests/lib_2/analyzer/analyze_library.status']); + ['tests/lib/analyzer/analyze_library.status']); @override List additionalOptions(Path? filePath, {bool? showSdkWarnings}) => diff --git a/pkg/test_runner/test/options_test.dart b/pkg/test_runner/test/options_test.dart index d23ac54a491..2b8bf4811a8 100644 --- a/pkg/test_runner/test/options_test.dart +++ b/pkg/test_runner/test/options_test.dart @@ -103,23 +103,6 @@ void testValidation() { } void testSelectors() { - // Legacy suites. - for (var arguments in [ - ['--nnbd=legacy'], - ['-nvm-legacy'] - ]) { - var configuration = parseConfiguration(arguments); - Expect.setEquals({ - 'corelib_2', - 'language_2', - 'vm', - 'utils', - 'lib_2', - 'kernel', - 'ffi_2', - }, configuration.selectors.keys, "suites for $arguments"); - } - // Default null safe suites. for (var arguments in [ [], @@ -150,7 +133,7 @@ void testSelectors() { .join(Platform.pathSeparator); final co19Path = [ 'tests', - 'co19_2', + 'co19', 'src', 'subdir_1', 'subdir_src', @@ -161,14 +144,13 @@ void testSelectors() { // suite selectors, one with a pattern ending in .dart. // The final .dart is removed both from file paths and selector // patterns. - ['vm', 'language_2/a_legacy_test.dart', testPath, co19Path]); + ['vm', 'lib/a_legacy_test.dart', testPath, co19Path]); Expect.equals( 'subdir/some_test', configuration.selectors['language']?.pattern); Expect.equals('subdir_1/subdir_src/some_co19_test', - configuration.selectors['co19_2']?.pattern); + configuration.selectors['co19']?.pattern); Expect.equals('.?', configuration.selectors['vm']?.pattern); - Expect.equals( - 'a_legacy_test', configuration.selectors['language_2']?.pattern); + Expect.equals('a_legacy_test', configuration.selectors['lib']?.pattern); } TestConfiguration parseConfiguration(List arguments) { diff --git a/runtime/tests/vm/dart/regress_40635_test.dart b/runtime/tests/vm/dart/regress_40635_test.dart index eeb643fc3aa..7b222da075e 100644 --- a/runtime/tests/vm/dart/regress_40635_test.dart +++ b/runtime/tests/vm/dart/regress_40635_test.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. // // Tests that a basic test still works when instructions are deduplicated. -// Test body comes from tests/corelib_2/apply2_test.dart, which is one of the +// Test body comes from tests/corelib/apply2_test.dart, which is one of the // tests that were failing when --dedup-instructions was broken in bare payload // mode (precompiled + bare instructions). // diff --git a/sdk/lib/_internal/js_runtime/lib/js_helper.dart b/sdk/lib/_internal/js_runtime/lib/js_helper.dart index 65061746f95..5f6461d4d29 100644 --- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart +++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart @@ -3271,7 +3271,7 @@ void applyExtension(name, nativeObject) {} // This is currently a no-op in dart2js, but used for native tests. void applyTestExtensions(List names) {} -// See tests/web_2/platform_environment_variable1_test.dart +// See tests/web/platform_environment_variable1_test.dart const String testPlatformEnvironmentVariableValue = String.fromEnvironment( 'dart2js.test.platform.environment.variable', defaultValue: 'not-specified'); diff --git a/tests/co19_2/.gitignore b/tests/co19_2/.gitignore deleted file mode 100644 index a57582cc39f..00000000000 --- a/tests/co19_2/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/src diff --git a/tests/co19_2/co19_2-co19.status b/tests/co19_2/co19_2-co19.status deleted file mode 100644 index c02280a7dc2..00000000000 --- a/tests/co19_2/co19_2-co19.status +++ /dev/null @@ -1,132 +0,0 @@ -# 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. - -Language/Generics/Superbounded_types/typedef1_A01_t03: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -Language/Generics/Superbounded_types/typedef1_A01_t04: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -Language/Generics/Superbounded_types/typedef2_A01_t04: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -Language/Generics/typedef_A08_t02: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -Language/Generics/typedef_A08_t03: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -Language/Generics/typedef_A08_t04: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l1_t03: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l2_t03: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l2_t07: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t03: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t04: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t05: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t08: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t09: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t10: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_01_t01: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_01_t02: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_01_t03: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_01_t04: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_01_t06: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_01_t07: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_01_t08: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_01_t09: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_01_t10: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_01_t11: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_01_t12: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_01_t13: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_01_t14: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_01_t15: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_01_t16: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_01_t17: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_01_t18: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_01_t19: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_01_t20: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t01: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t03: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t06: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t07: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t08: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t09: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t10: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t11: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t14: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t15: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t16: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t17: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t18: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t19: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_02_t20: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t02: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t04: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t06: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t07: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t08: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t09: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t12: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t13: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t14: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t15: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t16: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t17: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t18: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t19: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_03_t20: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_04_t01: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_04_t02: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_04_t03: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_04_t04: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_04_t06: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_04_t07: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_04_t08: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_04_t09: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_04_t10: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_04_t11: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_04_t12: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_04_t13: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_04_t14: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_04_t15: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_04_t16: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_04_t17: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_04_t18: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_04_t19: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_04_t20: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_05_t01: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_05_t02: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_05_t03: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_05_t04: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_05_t06: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_05_t07: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_05_t08: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_05_t09: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_05_t10: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_05_t11: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_05_t12: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_05_t13: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_05_t14: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_05_t15: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_05_t16: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_05_t17: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_05_t18: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_05_t19: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_05_t20: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t01: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t02: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t03: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t06: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t07: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t08: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t09: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t10: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t11: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t12: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t13: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t14: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t15: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t16: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t17: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t18: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t19: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t20: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t03: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t07: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t09: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t11: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t13: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t15: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t17: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_typedef_l1_t19: SkipByDesign # https://github.com/dart-lang/sdk/issues/46483 diff --git a/tests/co19_2/co19_2-dart2js.status b/tests/co19_2/co19_2-dart2js.status deleted file mode 100644 index 5370dbfe894..00000000000 --- a/tests/co19_2/co19_2-dart2js.status +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright (c) 2012, 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. - -[ $compiler == dart2js ] -Language/Expressions/Constants/integer_size_t03: SkipByDesign # uses integer literal not representable as JavaScript number -Language/Expressions/Constants/integer_size_t04: SkipByDesign # uses integer literal not representable as JavaScript number -Language/Expressions/Constants/literal_number_t01: SkipByDesign # uses integer literal not representable as JavaScript number -Language/Expressions/Constants/math_operators_t01: SkipByDesign # uses integer literal not representable as JavaScript number -Language/Expressions/Constants/math_operators_t06: SkipByDesign # uses integer literal not representable as JavaScript number -Language/Expressions/Numbers/integer_size_t03: SkipByDesign # uses integer literal not representable as JavaScript number -Language/Expressions/Numbers/static_type_of_int_t01: SkipByDesign # uses integer literal not representable as JavaScript number -Language/Expressions/Numbers/syntax_t06: SkipByDesign # uses integer literal not representable as JavaScript number -Language/Expressions/Numbers/syntax_t09: SkipByDesign # uses integer literal not representable as JavaScript number -Language/Expressions/Object_Identity/object_t02: SkipByDesign # https://github.com/dart-lang/sdk/issues/42222#issuecomment-640431711 -Language/Expressions/Spawning_an_Isolate/new_isolate_t01: SkipByDesign -Language/Functions/External_Functions/not_connected_to_a_body_t01: SkipByDesign # Non-JS-interop external members are not supported -Language/Libraries_and_Scripts/Scripts/top_level_main_t01: SkipByDesign # Uses dart:io. -Language/Libraries_and_Scripts/Scripts/top_level_main_t06: SkipByDesign # Uses dart:io. -Language/Libraries_and_Scripts/Scripts/top_level_syntax_t01: SkipByDesign # Non-JS-interop external members are not supported -Language/Libraries_and_Scripts/top_level_syntax_t01: SkipByDesign # Non-JS-interop external members are not supported -Language/Reference/Operator_Precedence/precedence_15_unary_prefix_t08: SkipByDesign # binary '~' produces different results in JavaScript and Dart -Language/Types/Interface_Types/subtype_t27: Skip # https://github.com/dart-lang/sdk/issues/42641 -LibTest/core/DateTime/DateTime.fromMicrosecondsSinceEpoch_A01_t01: SkipByDesign # microseconds are not supported in JavaScript -LibTest/core/DateTime/microsecond_A01_t01: SkipByDesign # microseconds are not supported in JavaScript -LibTest/core/DateTime/microsecondsSinceEpoch_A01_t01: SkipByDesign # microseconds are not supported in JavaScript -LibTest/core/DateTime/parse_A01_t03: SkipByDesign # microseconds are not supported in JavaScript -LibTest/core/DateTime/to8601String_A01_t01: SkipByDesign # microseconds are not supported in JavaScript -LibTest/core/DateTime/to8601String_A01_t02: SkipByDesign # microseconds are not supported in JavaScript -LibTest/core/DateTime/to8601String_A01_t03: SkipByDesign # microseconds are not supported in JavaScript -LibTest/core/int/operator_remainder_A01_t03: SkipByDesign # Division by zero is not an error in JavaScript -LibTest/core/int/operator_truncating_division_A01_t02: SkipByDesign # Division by zero is not an error in JavaScript -LibTest/core/int/parse_A01_t02: SkipByDesign # big integers cannot be represented in JavaScript -LibTest/core/int/remainder_A01_t03: SkipByDesign # Division by zero is not an error in JavaScript -LibTest/io/*: SkipByDesign # dart:io not supported. -LibTest/isolate/*: SkipByDesign # dart:isolate not supported -LibTest/mirrors/*: SkipByDesign # dart:mirrors not supported -LibTest/typed_data/ByteBuffer/asInt64List_A01_t01: SkipByDesign # Int64List not supported on the web -LibTest/typed_data/ByteBuffer/asInt64List_A02_t01: SkipByDesign # Int64List not supported on the web -LibTest/typed_data/ByteBuffer/asInt64List_A03_t01: SkipByDesign # Int64List not supported on the web -LibTest/typed_data/ByteBuffer/asUint64List_A01_t01: SkipByDesign # UInt64List not supported on the web -LibTest/typed_data/ByteBuffer/asUint64List_A02_t01: SkipByDesign # UInt64List not supported on the web -LibTest/typed_data/ByteBuffer/asUint64List_A03_t01: SkipByDesign # UInt64List not supported on the web -LibTest/typed_data/ByteData/getInt64_A01_t01: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/ByteData/getInt64_A02_t01: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/ByteData/getInt64_A02_t02: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/ByteData/getUint64_A01_t01: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/ByteData/getUint64_A02_t01: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/ByteData/getUint64_A02_t02: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/ByteData/setInt64_A01_t01: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/ByteData/setInt64_A02_t01: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/ByteData/setInt64_A02_t02: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/ByteData/setUint64_A01_t01: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/ByteData/setUint64_A02_t01: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/ByteData/setUint64_A02_t02: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/Int64List/*: SkipByDesign # Int64List not supported on the web -LibTest/typed_data/Uint64List/*: SkipByDesign # Uint64List not supported on the web - -[ $compiler == dart2js && $runtime == chrome ] -LibTest/html/Window/animationFrame_A01_t01: SkipByDesign # Issue #53985: requestAnimationFrame is not executed on Chrome inactive tabs -co19_2/LibTest/html/IFrameElement/blur_A01_t01: SkipByDesign # 62% flaky, unexplained, passes consistently in co19 suite (just flakes in co19_2) -co19_2/LibTest/html/IFrameElement/focus_A01_t01: SkipByDesign # 80% flaky, unexplained, passes consistently in co19 suite (just flakes in co19_2) - -[ $compiler == dart2js && $runtime == d8 ] -LibTest/html/*: SkipByDesign # d8 is not a browser - -[ $compiler == dart2js && $runtime == d8 && $host_checked ] -LibTest/collection/ListBase/ListBase_class_A01_t04: Slow, Pass -LibTest/collection/ListBase/ListBase_class_A01_t05: Slow, Pass -LibTest/collection/ListBase/ListBase_class_A01_t06: Slow, Pass -LibTest/collection/ListMixin/ListMixin_class_A01_t04: Slow, Pass -LibTest/collection/ListMixin/ListMixin_class_A01_t05: Slow, Pass -LibTest/collection/ListMixin/ListMixin_class_A01_t06: Slow, Pass -LibTest/core/List/List_class_A01_t05: Slow, Pass -LibTest/core/List/List_class_A01_t06: Slow, Pass - -[ $compiler == dart2js && $runtime == ie11 ] -LibTest/collection/ListBase/ListBase_class_A01_t04: SkipSlow # slow babeljs transformation -LibTest/collection/ListBase/ListBase_class_A01_t05: SkipSlow # slow babeljs transformation -LibTest/collection/ListBase/ListBase_class_A01_t06: SkipSlow # slow babeljs transformation -LibTest/collection/ListMixin/ListMixin_class_A01_t04: SkipSlow # slow babeljs transformation -LibTest/collection/ListMixin/ListMixin_class_A01_t05: SkipSlow # slow babeljs transformation -LibTest/collection/ListMixin/ListMixin_class_A01_t06: SkipSlow # slow babeljs transformation -LibTest/core/List/List_class_A01_t04: SkipSlow # slow babeljs transformation -LibTest/core/List/List_class_A01_t05: SkipSlow # slow babeljs transformation -LibTest/core/List/List_class_A01_t06: SkipSlow # slow babeljs transformation - -[ $compiler == dart2js && $runtime == safari ] -LibTest/html/Element/isContentEditable_A02_t01: Skip # evades flake detection https://github.com/dart-lang/sdk/issues/50718 -LibTest/html/IFrameElement/isContentEditable_A01_t01: Skip # evades flake detection https://github.com/dart-lang/sdk/issues/50718 diff --git a/tests/co19_2/co19_2-dartdevc.status b/tests/co19_2/co19_2-dartdevc.status deleted file mode 100644 index c3f2d109e25..00000000000 --- a/tests/co19_2/co19_2-dartdevc.status +++ /dev/null @@ -1,129 +0,0 @@ -# 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. - -[ $compiler == ddc ] -Language/Classes/Constructors/Generative_Constructors/formal_parameter_t07: SkipSlow -Language/Classes/Constructors/Generative_Constructors/fresh_instance_t01: SkipSlow -Language/Classes/Constructors/Generative_Constructors/implicit_superinitializer_t01: SkipSlow -Language/Classes/Constructors/Generative_Constructors/implicit_superinitializer_t02: SkipSlow -Language/Classes/Constructors/Generative_Constructors/initializers_t01: SkipSlow -Language/Classes/Constructors/Generative_Constructors/initializers_t15: SkipSlow -Language/Classes/Constructors/Generative_Constructors/initializing_formals_execution_t01: SkipSlow -Language/Classes/Constructors/Generative_Constructors/initializing_this_t01: SkipSlow -Language/Classes/Constructors/Generative_Constructors/redirection_t01: SkipSlow -Language/Classes/Constructors/Generative_Constructors/syntax_t01: SkipSlow -Language/Classes/Constructors/implicit_constructor_t01: SkipSlow -Language/Classes/Constructors/implicit_constructor_t02: SkipSlow -Language/Classes/Constructors/name_t01: SkipSlow -Language/Classes/Constructors/name_t02: SkipSlow -Language/Classes/Constructors/name_t03: SkipSlow -Language/Classes/Getters/instance_getter_t01: SkipSlow -Language/Classes/Getters/instance_getter_t02: SkipSlow -Language/Classes/Getters/instance_getter_t03: SkipSlow -Language/Classes/Getters/instance_getter_t04: SkipSlow -Language/Classes/Getters/instance_getter_t05: SkipSlow -Language/Classes/Getters/instance_getter_t06: SkipSlow -Language/Classes/Getters/override_t04: SkipSlow -Language/Classes/Getters/return_type_t01: SkipSlow -Language/Classes/Getters/static_t01/none: SkipSlow -Language/Classes/Getters/static_t02: SkipSlow -Language/Classes/Getters/syntax_t01: SkipSlow -Language/Classes/Getters/void_return_type_t01: SkipSlow -Language/Classes/Instance_Methods/Operators/allowed_names_t01: SkipSlow -Language/Classes/Instance_Methods/Operators/arity_0_or_1_t01: SkipSlow -Language/Classes/Instance_Methods/Operators/arity_0_t01: SkipSlow -Language/Classes/Instance_Methods/Operators/syntax_t01: SkipSlow -Language/Classes/Instance_Methods/Operators/syntax_t03: SkipSlow -Language/Classes/Instance_Methods/override_named_parameters_t03: SkipSlow -Language/Classes/Instance_Methods/override_named_parameters_t04: SkipSlow -Language/Classes/Instance_Methods/override_named_parameters_t06: SkipSlow -Language/Classes/Instance_Methods/override_subtype_t05: SkipSlow -Language/Classes/Instance_Methods/override_subtype_t06: SkipSlow -Language/Classes/Instance_Methods/same_name_static_member_in_superclass_t01: SkipSlow -Language/Classes/Instance_Methods/same_name_static_member_in_superclass_t02: SkipSlow -Language/Classes/Instance_Methods/same_name_static_member_in_superclass_t04: SkipSlow -Language/Classes/Instance_Methods/same_name_static_member_in_superclass_t05: SkipSlow -Language/Classes/Instance_Methods/same_name_static_member_in_superclass_t06: SkipSlow -Language/Classes/Instance_Methods/same_name_static_member_in_superclass_t07: SkipSlow -Language/Classes/Instance_Methods/same_name_static_member_in_superclass_t08: SkipSlow -Language/Classes/Instance_Methods/same_name_static_member_in_superclass_t09: SkipSlow -Language/Classes/Instance_Variables/definition_t01: SkipSlow -Language/Classes/Instance_Variables/definition_t02: SkipSlow -Language/Classes/Instance_Variables/definition_t04: SkipSlow -Language/Classes/Setters/instance_setter_t01: SkipSlow -Language/Expressions/Constants/integer_size_t03: SkipByDesign # uses integer literal not representable as JavaScript number -Language/Expressions/Constants/integer_size_t04: SkipByDesign # uses integer literal not representable as JavaScript number -Language/Expressions/Constants/literal_number_t01: SkipByDesign # uses integer literal not representable as JavaScript number -Language/Expressions/Constants/math_operators_t01: SkipByDesign # uses integer literal not representable as JavaScript number -Language/Expressions/Constants/math_operators_t06: SkipByDesign # uses integer literal not representable as JavaScript number -Language/Expressions/Numbers/integer_size_t03: SkipByDesign # uses integer literal not representable as JavaScript number -Language/Expressions/Numbers/static_type_of_int_t01: SkipByDesign # uses integer literal not representable as JavaScript number -Language/Expressions/Numbers/syntax_t06: SkipByDesign # uses integer literal not representable as JavaScript number -Language/Expressions/Numbers/syntax_t09: SkipByDesign # uses integer literal not representable as JavaScript number -Language/Expressions/Object_Identity/object_t02: SkipByDesign # https://github.com/dart-lang/sdk/issues/42222#issuecomment-640431711 -Language/Expressions/Spawning_an_Isolate/new_isolate_t01: SkipByDesign # dart:isolate not supported. -Language/Functions/External_Functions/not_connected_to_a_body_t01: SkipByDesign # External variables are not supported -Language/Libraries_and_Scripts/Scripts/top_level_main_t01: SkipByDesign # Uses dart:io. -Language/Libraries_and_Scripts/Scripts/top_level_main_t06: SkipByDesign # Uses dart:io. -Language/Libraries_and_Scripts/Scripts/top_level_syntax_t01: SkipByDesign # External variables are not supported -Language/Libraries_and_Scripts/top_level_syntax_t01: SkipByDesign # External variables are not supported -Language/Reference/Operator_Precedence/precedence_15_unary_prefix_t08: SkipByDesign # binary '~' produces different results in JavaScript and Dart -Language/Types/Interface_Types/subtype_t27: SkipSlow -Language/Types/Interface_Types/subtype_t28: SkipSlow -LibTest/core/DateTime/DateTime.fromMicrosecondsSinceEpoch_A01_t01: SkipByDesign # microseconds are not supported in JavaScript -LibTest/core/DateTime/microsecond_A01_t01: SkipByDesign # microseconds are not supported in JavaScript -LibTest/core/DateTime/microsecondsSinceEpoch_A01_t01: SkipByDesign # microseconds are not supported in JavaScript -LibTest/core/DateTime/to8601String_A01_t01: SkipByDesign # microseconds are not supported in JavaScript -LibTest/core/DateTime/to8601String_A01_t02: SkipByDesign # microseconds are not supported in JavaScript -LibTest/core/DateTime/to8601String_A01_t03: SkipByDesign # microseconds are not supported in JavaScript -LibTest/core/int/operator_remainder_A01_t03: SkipByDesign # Division by zero is not an error in JavaScript -LibTest/core/int/operator_truncating_division_A01_t02: SkipByDesign # Division by zero is not an error in JavaScript -LibTest/core/int/parse_A01_t02: SkipByDesign # big integers cannot be represented in JavaScript -LibTest/core/int/remainder_A01_t03: SkipByDesign # Division by zero is not an error in JavaScript -LibTest/html/CanvasRenderingContext2D/addEventListener_A01_t03: SkipSlow -LibTest/html/Element/blur_A01_t01: SkipSlow -LibTest/html/Element/focus_A01_t01: SkipSlow -LibTest/html/Element/loadEvent_A01_t01: SkipSlow -LibTest/html/Element/mouseWheelEvent_A01_t01: SkipSlow -LibTest/html/Element/onLoad_A01_t01: SkipSlow -LibTest/html/Element/onMouseWheel_A01_t01: SkipSlow -LibTest/html/Element/onTransitionEnd_A01_t01: SkipSlow -LibTest/html/Element/transitionEndEvent_A01_t01: SkipSlow -LibTest/html/HttpRequest/onError_A01_t02: SkipSlow -LibTest/html/HttpRequest/responseText_A01_t02: SkipSlow -LibTest/html/HttpRequestUpload/onError_A01_t02: SkipSlow -LibTest/html/HttpRequestUpload/onLoadEnd_A01_t01: SkipSlow -LibTest/html/HttpRequestUpload/onLoadStart_A01_t01: SkipSlow -LibTest/html/HttpRequestUpload/onLoad_A01_t01: SkipSlow -LibTest/html/IFrameElement/blur_A01_t01: SkipSlow -LibTest/html/IFrameElement/enteredView_A01_t01: SkipSlow -LibTest/html/IFrameElement/focus_A01_t01: SkipSlow -LibTest/html/IFrameElement/onMouseWheel_A01_t01: SkipSlow -LibTest/html/IFrameElement/onTransitionEnd_A01_t01: SkipSlow -LibTest/io/*: SkipByDesign # dart:io not supported -LibTest/isolate/*: SkipByDesign # dart:isolate not supported -LibTest/mirrors/*: SkipByDesign # dart:mirrors not supported -LibTest/typed_data/ByteBuffer/asInt64List_A01_t01: SkipByDesign # Int64List not supported on the web -LibTest/typed_data/ByteBuffer/asInt64List_A02_t01: SkipByDesign # Int64List not supported on the web -LibTest/typed_data/ByteBuffer/asInt64List_A03_t01: SkipByDesign # Int64List not supported on the web -LibTest/typed_data/ByteBuffer/asUint64List_A01_t01: SkipByDesign # UInt64List not supported on the web -LibTest/typed_data/ByteBuffer/asUint64List_A02_t01: SkipByDesign # UInt64List not supported on the web -LibTest/typed_data/ByteBuffer/asUint64List_A03_t01: SkipByDesign # UInt64List not supported on the web -LibTest/typed_data/ByteData/getInt64_A01_t01: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/ByteData/getInt64_A02_t01: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/ByteData/getInt64_A02_t02: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/ByteData/getUint64_A01_t01: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/ByteData/getUint64_A02_t01: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/ByteData/getUint64_A02_t02: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/ByteData/setInt64_A01_t01: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/ByteData/setInt64_A02_t01: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/ByteData/setInt64_A02_t02: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/ByteData/setUint64_A01_t01: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/ByteData/setUint64_A02_t01: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/ByteData/setUint64_A02_t02: SkipByDesign # 64-bit int not supported on the web -LibTest/typed_data/Int64List/*: SkipByDesign # Int64List not supported on the web -LibTest/typed_data/Uint64List/*: SkipByDesign # Uint64List not supported on the web - -[ $compiler == ddc && $runtime == chrome ] -LibTest/html/Window/animationFrame_A01_t01: SkipByDesign # Issue #53985: requestAnimationFrame is not executed on Chrome inactive tabs diff --git a/tests/co19_2/co19_2-kernel.status b/tests/co19_2/co19_2-kernel.status deleted file mode 100644 index e1f2cb2c38a..00000000000 --- a/tests/co19_2/co19_2-kernel.status +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) 2018, 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. - -[ $compiler == fasta ] -LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l2_06_t04: SkipByDesign # Won't fix. See https://github.com/dart-lang/sdk/issues/46288 - -[ $runtime == dart_precompiled ] -LibTest/mirrors/*: SkipByDesign # dart:mirrors is not supported - -[ $runtime == vm ] -LibTest/collection/ListBase/ListBase_class_A01_t02: Slow, Pass # Does many calls -LibTest/collection/ListMixin/ListMixin_class_A01_t02: Slow, Pass # Does many calls -LibTest/core/List/List_class_A01_t02: Slow, Pass # Does many calls -LibTest/io/Stdout/add_A02_t03: SkipByDesign # Issue dart-lang/co19/issues/1509 -LibTest/io/Stdout/add_A02_t04: SkipByDesign -LibTest/io/Stdout/add_A02_t05: SkipByDesign -LibTest/io/Stdout/add_A02_t06: SkipByDesign -LibTest/io/Stdout/add_A02_t07: SkipByDesign -LibTest/io/Stdout/add_A02_t08: SkipByDesign -LibTest/io/Stdout/add_A02_t09: SkipByDesign -LibTest/io/Stdout/writeCharCode_A01_t03: SkipByDesign -LibTest/io/Stdout/write_A01_t04: SkipByDesign -LibTest/io/Stdout/write_A01_t05: SkipByDesign -LibTest/io/exit/exit_A04_t01: SkipByDesign - -[ $compiler == dartk && $runtime == vm && $system == macos ] -LibTest/collection/ListBase/ListBase_class_A01_t02: Slow, Pass -LibTest/collection/ListBase/ListBase_class_A01_t03: Slow, Pass -LibTest/collection/ListMixin/ListMixin_class_A01_t02: Slow, Pass -LibTest/collection/ListMixin/ListMixin_class_A01_t03: Slow, Pass -LibTest/core/List/List_class_A01_t02: Slow, Pass -LibTest/core/List/List_class_A01_t03: Slow, Pass - -[ $runtime == dart_precompiled && $simulator ] -LibTest/collection/ListBase/ListBase_class_A01_t01: SkipSlow # Issue 43036 -LibTest/collection/ListMixin/ListMixin_class_A01_t01: SkipSlow # Issue 43036 - -# It makes no sense to run any test that uses spawnURI under the simulator -# as that would involve running CFE (the front end) in simulator mode -# to compile the URI file specified in spawnURI code. -# These Isolate tests that use spawnURI are hence skipped on purpose. -[ $runtime == dart_precompiled || $runtime == vm && $simulator ] -LibTest/isolate/Isolate/spawnUri*: Skip diff --git a/tests/co19_2/co19_2-runtime.status b/tests/co19_2/co19_2-runtime.status deleted file mode 100644 index 84fc2c4720a..00000000000 --- a/tests/co19_2/co19_2-runtime.status +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) 2018, 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. - -[ $system == windows ] -LibTest/io/ProcessResult/exitCode_A01_t02: Skip # Issue 32138 -LibTest/io/Stdin/readByteSync_A01_t01: Skip # Issue 32138 -LibTest/io/Stdin/readByteSync_A01_t02: Skip # Issue 32138 - -[ $simulator ] -LibTest/collection/ListBase/ListBase_class_A01_t01: SkipSlow # Very slow on sim* architectures. -LibTest/collection/ListBase/ListBase_class_A01_t04: SkipSlow # Very slow on sim* architectures. -LibTest/collection/ListBase/ListBase_class_A01_t05: SkipSlow # Very slow on sim* architectures. -LibTest/collection/ListBase/ListBase_class_A01_t06: SkipSlow # Very slow on sim* architectures. -LibTest/collection/ListMixin/ListMixin_class_A01_t01: SkipSlow # Very slow on sim* architectures. -LibTest/collection/ListMixin/ListMixin_class_A01_t04: SkipSlow # Very slow on sim* architectures. -LibTest/collection/ListMixin/ListMixin_class_A01_t05: SkipSlow # Very slow on sim* architectures. -LibTest/collection/ListMixin/ListMixin_class_A01_t06: SkipSlow # Very slow on sim* architectures. - -[ $mode == debug && $runtime == dart_precompiled ] -LibTest/collection/ListBase/ListBase_class_A01_t03: SkipSlow # Very slow compilation in debug mode. -LibTest/collection/ListBase/ListBase_class_A01_t04: SkipSlow # Very slow compilation in debug mode. -LibTest/collection/ListBase/ListBase_class_A01_t05: SkipSlow # Very slow compilation in debug mode. -LibTest/collection/ListBase/ListBase_class_A01_t06: SkipSlow # Very slow compilation in debug mode. -LibTest/collection/ListMixin/ListMixin_class_A01_t03: SkipSlow # Very slow compilation in debug mode. -LibTest/collection/ListMixin/ListMixin_class_A01_t04: SkipSlow # Very slow compilation in debug mode. -LibTest/collection/ListMixin/ListMixin_class_A01_t05: SkipSlow # Very slow compilation in debug mode. -LibTest/collection/ListMixin/ListMixin_class_A01_t06: SkipSlow # Very slow compilation in debug mode. - -[ $runtime == dart_precompiled && $simulator ] -LibTest/async/Stream/Stream.periodic_all_t02: Skip # Issue 42898 - -[ $compiler == fasta || $runtime == dart_precompiled || $runtime == vm ] -Language/Expressions/Numbers/syntax_t34: SkipByDesign # expects integer literal error that only occurs in JS -LibTest/html/*: SkipByDesign # dart:html not supported on VM. diff --git a/tests/co19_2/update.sh b/tests/co19_2/update.sh deleted file mode 100755 index b910c1edf3e..00000000000 --- a/tests/co19_2/update.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash -# Uploads a new version of the co19_2 CIPD package. - -set -e -set -x - -if [ ! -e tests/co19_2 ]; then - echo "$0: error: Run this script at the root of the Dart SDK" >&2 - exit 1 -fi - -# Find the latest co19 commit. -rm -rf tests/co19_2/src.git -git clone https://dart.googlesource.com/co19 tests/co19_2/src.git -CO19=tests/co19_2/src.git -OLD=$(gclient getdep --var=co19_2_rev) -NEW=$(cd $CO19 && git fetch origin && git rev-parse origin/pre-nnbd) - -git fetch origin -git branch cl-co19-roll-co19-to-$NEW origin/main -git checkout cl-co19-roll-co19-to-$NEW - -# Update DEPS: -gclient setdep --var=co19_2_rev=$NEW - -# Make a nice commit. Don't include the '#' character to avoid referencing Dart -# SDK issues. -git commit DEPS -m \ - "$(printf "[co19] Roll co19_2 to $NEW\n\n" \ - && cd $CO19 \ - && git log --date='format:%Y-%m-%d' --pretty='format:%ad %ae %s' $OLD..$NEW \ - | sed 's/\#/dart-lang\/co19\#/g')" - -rm -rf tests/co19_2/src.git - -GIT_EDITOR=true git cl upload -ISSUE=$(git config --get branch.cl-co19-roll-co19-to-$NEW.gerritissue) - -git cl web diff --git a/tests/corelib_2/apply2_test.dart b/tests/corelib_2/apply2_test.dart deleted file mode 100644 index 95401d40b4a..00000000000 --- a/tests/corelib_2/apply2_test.dart +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2012, 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 - -// VMOptions= -// VMOptions=--dwarf_stack_traces --no-retain_function_objects --no-retain_code_objects - -import "package:expect/expect.dart"; - -apply(Function function, List positional, Map named) { - return Function.apply(function, positional, named); -} - -void throwsNSME( - Function function, List positional, Map named) { - Expect.throwsNoSuchMethodError(() => apply(function, positional, named)); -} - -main() { - var c1 = () => 'c1'; - var c2 = (a) => 'c2 $a'; - var c3 = ([a = 1]) => 'c3 $a'; - var c4 = ({a: 1}) => 'c4 $a'; - var c5 = ({a: 1, b: 2}) => 'c5 $a $b'; - var c6 = ({b: 1, a: 2}) => 'c6 $a $b'; - var c7 = (x, {b: 1, a: 2}) => 'c7 $x $a $b'; - var c8 = (x, y, [a = 2, b = 3]) => 'c8 $x $y $a $b'; - - Expect.equals('c1', apply(c1, null, null)); - Expect.equals('c1', apply(c1, [], null)); - Expect.equals('c1', apply(c1, [], {})); - Expect.equals('c1', apply(c1, null, {})); - throwsNSME(c1, [1], null); - throwsNSME(c1, [1], {#a: 2}); - throwsNSME(c1, null, {#a: 2}); - - Expect.equals('c2 1', apply(c2, [1], null)); - Expect.equals('c2 1', apply(c2, [1], {})); - throwsNSME(c2, null, null); - throwsNSME(c2, [], null); - throwsNSME(c2, null, {}); - throwsNSME(c2, null, {#a: 1}); - throwsNSME(c2, [2], {#a: 1}); - - Expect.equals('c3 1', apply(c3, null, null)); - Expect.equals('c3 1', apply(c3, [], null)); - Expect.equals('c3 2', apply(c3, [2], {})); - throwsNSME(c3, [1, 2], null); - throwsNSME(c3, null, {#a: 1}); - - Expect.equals('c4 1', apply(c4, [], null)); - Expect.equals('c4 2', apply(c4, [], {#a: 2})); - Expect.equals('c4 1', apply(c4, null, null)); - Expect.equals('c4 1', apply(c4, [], {})); - throwsNSME(c4, [1], {#a: 1}); - throwsNSME(c4, [1], {}); - throwsNSME(c4, [], {#a: 1, #b: 2}); - - Expect.equals('c5 1 2', apply(c5, [], null)); - Expect.equals('c5 3 2', apply(c5, [], {#a: 3})); - Expect.equals('c5 1 2', apply(c5, null, null)); - Expect.equals('c5 1 2', apply(c5, [], {})); - Expect.equals('c5 3 4', apply(c5, [], {#a: 3, #b: 4})); - Expect.equals('c5 4 3', apply(c5, [], {#b: 3, #a: 4})); - Expect.equals('c5 1 3', apply(c5, [], {#b: 3})); - throwsNSME(c5, [1], {#a: 1}); - throwsNSME(c5, [1], {}); - throwsNSME(c5, [], {#a: 1, #b: 2, #c: 3}); - - Expect.equals('c6 2 1', apply(c6, [], null)); - Expect.equals('c6 3 1', apply(c6, [], {#a: 3})); - Expect.equals('c6 2 1', apply(c6, null, null)); - Expect.equals('c6 2 1', apply(c6, [], {})); - Expect.equals('c6 3 4', apply(c6, [], {#a: 3, #b: 4})); - Expect.equals('c6 4 3', apply(c6, [], {#b: 3, #a: 4})); - Expect.equals('c6 2 3', apply(c6, [], {#b: 3})); - throwsNSME(c6, [1], {#a: 1}); - throwsNSME(c6, [1], {}); - throwsNSME(c6, [], {#a: 1, #b: 2, #c: 3}); - - Expect.equals('c7 7 2 1', apply(c7, [7], null)); - Expect.equals('c7 7 3 1', apply(c7, [7], {#a: 3})); - Expect.equals('c7 7 2 1', apply(c7, [7], {})); - Expect.equals('c7 7 3 4', apply(c7, [7], {#a: 3, #b: 4})); - Expect.equals('c7 7 4 3', apply(c7, [7], {#b: 3, #a: 4})); - Expect.equals('c7 7 2 3', apply(c7, [7], {#b: 3})); - throwsNSME(c7, [], {#a: 1}); - throwsNSME(c7, [], {}); - throwsNSME(c7, [7], {#a: 1, #b: 2, #c: 3}); - - Expect.equals('c8 7 8 2 3', apply(c8, [7, 8], null)); - Expect.equals('c8 7 8 2 3', apply(c8, [7, 8], {})); - Expect.equals('c8 7 8 3 3', apply(c8, [7, 8, 3], null)); - Expect.equals('c8 7 8 3 4', apply(c8, [7, 8, 3, 4], null)); - throwsNSME(c8, [], null); - throwsNSME(c8, [], {}); - throwsNSME(c8, [1], null); - throwsNSME(c8, [7, 8, 9, 10, 11], null); -} diff --git a/tests/corelib_2/apply3_test.dart b/tests/corelib_2/apply3_test.dart deleted file mode 100644 index 541b345246c..00000000000 --- a/tests/corelib_2/apply3_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test [Function.apply] on user-defined classes that implement [noSuchMethod]. - -import "package:expect/expect.dart"; - -class F { - call([p1]) => "call"; - noSuchMethod(Invocation invocation) => "NSM"; -} - -class G { - call() => '42'; - noSuchMethod(Invocation invocation) => invocation; -} - -class H { - call(required, {a}) => required + a; -} - -main() { - Expect.equals('call', Function.apply(new F(), [])); - Expect.equals('call', Function.apply(new F(), [1])); - Expect.throwsNoSuchMethodError(() => Function.apply(new F(), [1, 2])); - Expect.throwsNoSuchMethodError(() => Function.apply(new F(), [1, 2, 3])); - - Expect.throwsNoSuchMethodError(() => Function.apply(new G(), [1], {#a: 42})); - - // Test that [i] can be used to hit an existing method. - Expect.equals(43, new H().call(1, a: 42)); - Expect.equals(43, Function.apply(new H(), [1], {#a: 42})); -} diff --git a/tests/corelib_2/apply4_test.dart b/tests/corelib_2/apply4_test.dart deleted file mode 100644 index 2a8ddf59be5..00000000000 --- a/tests/corelib_2/apply4_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -// Testing Function.apply calls work correctly for arities that are not -// otherwise present in the program (and thus might not have stubs -// generated). - -class A { - foo(x, [y, z, a, b, c, d = 99, e, f, g, h, i, j]) => "$x $d"; -} - -main() { - var a = new A(); - var clos = a.foo; - Expect.equals(Function.apply(clos, ["well"]), "well 99"); - Expect.equals(Function.apply(clos, ["well", 0, 2, 4, 3, 6, 9, 10]), "well 9"); -} diff --git a/tests/corelib_2/apply5_test.dart b/tests/corelib_2/apply5_test.dart deleted file mode 100644 index 01005a02b2f..00000000000 --- a/tests/corelib_2/apply5_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -// Testing that, when compiled to JS, Function.apply works correctly for -// functions with that will be invoked directly vs using .apply(). - -class A { - foo([a = 10, b = 20, c = 30, d = 40, e = 50]) => "$a $b $c $d $e"; -} - -main() { - var a = new A(); - var clos = a.foo; - Expect.equals(Function.apply(clos, []), "10 20 30 40 50"); - Expect.equals(Function.apply(clos, [11]), "11 20 30 40 50"); - Expect.equals(Function.apply(clos, [11, 21]), "11 21 30 40 50"); - Expect.equals(Function.apply(clos, [11, 21, 31]), "11 21 31 40 50"); - Expect.equals(Function.apply(clos, [11, 21, 31, 41]), "11 21 31 41 50"); - Expect.equals(Function.apply(clos, [11, 21, 31, 41, 51]), "11 21 31 41 51"); -} diff --git a/tests/corelib_2/apply6_test.dart b/tests/corelib_2/apply6_test.dart deleted file mode 100644 index 0ba08f8617e..00000000000 --- a/tests/corelib_2/apply6_test.dart +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2021, 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 - -// Test that the List of positional arguments to [Function.apply] is not -// modified. - -import "package:expect/expect.dart"; - -class A { - foo([ - a = 10, - b = 20, - c = 30, - d = 40, - e = 50, - f = 60, - g = 70, - h = 80, - i = 90, - ]) => - '$a $b $c $d $e $f $g $h $i'; -} - -String static1(a, b, {c = 30, d = 40}) => '$a $b $c $d'; - -void test(String expected, Function function, List positional, - [Map named = null]) { - final original = List.of(positional); - - Expect.equals(expected, Function.apply(function, positional, named)); - Expect.listEquals(original, positional); - - // Test again so there are multiple call sites for `Function.apply`. - Expect.equals(expected, Function.apply(function, positional, named)); - Expect.listEquals(original, positional); -} - -main() { - var a = A(); - - test('10 20 30 40 50 60 70 80 90', a.foo, []); - test('11 20 30 40 50 60 70 80 90', a.foo, [11]); - test('11 22 30 40 50 60 70 80 90', a.foo, [11, 22]); - test('11 22 33 40 50 60 70 80 90', a.foo, [11, 22, 33]); - test('11 22 33 44 50 60 70 80 90', a.foo, [11, 22, 33, 44]); - test('11 22 33 44 55 60 70 80 90', a.foo, [11, 22, 33, 44, 55]); - test('11 22 33 44 55 66 70 80 90', a.foo, [11, 22, 33, 44, 55, 66]); - test('11 22 33 44 55 66 77 80 90', a.foo, [11, 22, 33, 44, 55, 66, 77]); - test('11 22 33 44 55 66 77 88 90', a.foo, [11, 22, 33, 44, 55, 66, 77, 88]); - test('11 22 33 44 55 66 77 88 99', a.foo, - [11, 22, 33, 44, 55, 66, 77, 88, 99]); - - // Some unmodifiable Lists. An attempt to modify the argument would fail. - test('11 22 33 44 55 66 77 80 90', a.foo, const [11, 22, 33, 44, 55, 66, 77]); - test('65 66 67 68 69 70 71 80 90', a.foo, 'ABCDEFG'.codeUnits); - - test('11 22 30 40', static1, [11, 22]); - test('11 22 30 40', static1, [11, 22], {}); - test('11 22 33 40', static1, [11, 22], {#c: 33}); - test('11 22 30 44', static1, [11, 22], {#d: 44}); - test('11 22 66 55', static1, [11, 22], {#d: 55, #c: 66}); - - test('11 22 88 77', static1, const [11, 22], {#d: 77, #c: 88}); - test('65 66 11 22', static1, 'AB'.codeUnits, {#d: 22, #c: 11}); -} diff --git a/tests/corelib_2/apply_generic_function_test.dart b/tests/corelib_2/apply_generic_function_test.dart deleted file mode 100644 index e4246d9842c..00000000000 --- a/tests/corelib_2/apply_generic_function_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; -import "symbol_map_helper.dart"; - -// Testing Function.apply calls correctly with generic type arguments. -// This test is not testing error handling, only that correct parameters -// cause a correct call. - -test0(T i, T j, {T a}) => i + j + a; - -main() { - test(res, func, list, map) { - map = symbolMapToStringMap(map); - Expect.equals(res, Function.apply(func, list, map)); - } - - test(42, test0, [10, 15], {"a": 17}); -} diff --git a/tests/corelib_2/apply_test.dart b/tests/corelib_2/apply_test.dart deleted file mode 100644 index 981925adbc0..00000000000 --- a/tests/corelib_2/apply_test.dart +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; -import "symbol_map_helper.dart"; - -// Testing Function.apply calls correctly. -// This test is not testing error handling, only that correct parameters -// cause a correct call. - -int test0() => 42; -int test0a({int a}) => 37 + a; -int test1(int i) => i + 1; -int test1a(int i, {int a}) => i + a; -int test2(int i, int j) => i + j; -int test2a(int i, int j, {int a}) => i + j + a; - -class C { - int x = 10; - int foo(y) => this.x + y; -} - -class Callable { - int call(int x, int y) => x + y; -} - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(x) => x; - -main() { - testMap(res, func, map) { - Expect.equals(res, Function.apply(func, null, map)); - Expect.equals(res, Function.apply(func, [], map)); - } - - testList(res, func, list) { - Expect.equals(res, Function.apply(func, list)); - Expect.equals(res, Function.apply(func, list, null)); - Expect.equals(res, Function.apply(func, list, new Map())); - } - - testListTyped(res, Function func, list) => testList(res, func, list); - - test(res, func, list, map) { - Expect.equals(res, Function.apply(func, list, map)); - } - - testList(42, test0, null); - testList(42, test0, []); - testMap(42, test0a, {#a: 5}); - testList(42, test1, [41]); - test(42, test1a, [20], {#a: 22}); - testList(42, test2, [20, 22]); - test(42, test2a, [10, 15], {#a: 17}); - - // Test that "this" is correct when calling closurized functions. - var cfoo = new C().foo; - testList(42, cfoo, [32]); - - // Test that apply works even with a different name. - var app = confuse(Function.apply); - Expect.equals(42, app(test2, [22, 20])); - - // Test that apply can itself be applied. - Expect.equals( - 42, - Function.apply(Function.apply, [ - test2, - [17, 25] - ])); - - // Test that apply works on callable objects when it is passed to a method - // that expects Function (and not dynamic). - if (dart2jsProductionMode) { - testList(42, new Callable(), [13, 29]); - } else { - Expect.throws(() => testList(42, new Callable(), [13, 29])); - } - - testListTyped(42, new Callable(), [13, 29]); -} diff --git a/tests/corelib_2/bigint_add_test.dart b/tests/corelib_2/bigint_add_test.dart deleted file mode 100644 index 20e8e665986..00000000000 --- a/tests/corelib_2/bigint_add_test.dart +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) 2022, 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 - -// Testing Bigints with and without intrinsics. -// VMOptions=--intrinsify --no-enable-asserts -// VMOptions=--intrinsify --enable-asserts -// VMOptions=--no-intrinsify --enable-asserts -// VMOptions=--no-intrinsify --no-enable-asserts - -import "package:expect/expect.dart"; - -expectSum(aString, bString, expectedString) { - BigInt a = BigInt.parse(aString, radix: 16); - BigInt b = BigInt.parse(bString, radix: 16); - BigInt expected = BigInt.parse(expectedString, radix: 16); - BigInt actual = a + b; - String actualString = actual.toRadixString(16); - print("$aString + $bString"); - print(" = $actualString (expected $expectedString)"); - Expect.equals(expected, actual); -} - -main() { - expectSum( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "1ad478de9e340aba6cb25ae8dbb531d2bc0105fa0"); - expectSum( - "d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "1ad478de9e340aba6cb25ae8dbb531d2bc0105fa0"); - expectSum( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "a13fac3ee22b996ff6856c27c1f6d88aef0e", - "d87c8de9e340aba6cb25ae8dbb531d2bc0105fa0"); - expectSum( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3fac3ee22b996ff6856c27c1f6d88aef0e", - "d87bece9e340aba6cb25ae8dbb531d2bc0105fa0"); - expectSum( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "ac3ee22b996ff6856c27c1f6d88aef0e", - "d87becaae340aba6cb25ae8dbb531d2bc0105fa0"); - expectSum( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3ee22b996ff6856c27c1f6d88aef0e", - "d87becaa3740aba6cb25ae8dbb531d2bc0105fa0"); - expectSum("d87becaa3701c97b31b5b8084f2b5b34e7857092", "1", - "d87becaa3701c97b31b5b8084f2b5b34e7857093"); - expectSum("d87becaa3701c97b31b5b8084f2b5b34e7857092", "0", - "d87becaa3701c97b31b5b8084f2b5b34e7857092"); - - expectSum( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "-3b04b6a8ac2e74f9845c182e303993e0efa8184"); - expectSum( - "-d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3b04b6a8ac2e74f9845c182e303993e0efa8184"); - expectSum( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "a13fac3ee22b996ff6856c27c1f6d88aef0e", - "-d87b4b6a8ac2e74f9845c182e303993e0efa8184"); - expectSum( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3fac3ee22b996ff6856c27c1f6d88aef0e", - "-d87bec6a8ac2e74f9845c182e303993e0efa8184"); - expectSum( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "ac3ee22b996ff6856c27c1f6d88aef0e", - "-d87beca98ac2e74f9845c182e303993e0efa8184"); - expectSum( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3ee22b996ff6856c27c1f6d88aef0e", - "-d87becaa36c2e74f9845c182e303993e0efa8184"); - expectSum("-d87becaa3701c97b31b5b8084f2b5b34e7857092", "1", - "-d87becaa3701c97b31b5b8084f2b5b34e7857091"); - expectSum("-d87becaa3701c97b31b5b8084f2b5b34e7857092", "0", - "-d87becaa3701c97b31b5b8084f2b5b34e7857092"); - - expectSum( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "3b04b6a8ac2e74f9845c182e303993e0efa8184"); - expectSum( - "d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-3b04b6a8ac2e74f9845c182e303993e0efa8184"); - expectSum( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-a13fac3ee22b996ff6856c27c1f6d88aef0e", - "d87b4b6a8ac2e74f9845c182e303993e0efa8184"); - expectSum( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-3fac3ee22b996ff6856c27c1f6d88aef0e", - "d87bec6a8ac2e74f9845c182e303993e0efa8184"); - expectSum( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-ac3ee22b996ff6856c27c1f6d88aef0e", - "d87beca98ac2e74f9845c182e303993e0efa8184"); - expectSum( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-3ee22b996ff6856c27c1f6d88aef0e", - "d87becaa36c2e74f9845c182e303993e0efa8184"); - expectSum("d87becaa3701c97b31b5b8084f2b5b34e7857092", "-1", - "d87becaa3701c97b31b5b8084f2b5b34e7857091"); - expectSum("d87becaa3701c97b31b5b8084f2b5b34e7857092", "-0", - "d87becaa3701c97b31b5b8084f2b5b34e7857092"); - - expectSum( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "-1ad478de9e340aba6cb25ae8dbb531d2bc0105fa0"); - expectSum( - "-d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-1ad478de9e340aba6cb25ae8dbb531d2bc0105fa0"); - expectSum( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-a13fac3ee22b996ff6856c27c1f6d88aef0e", - "-d87c8de9e340aba6cb25ae8dbb531d2bc0105fa0"); - expectSum( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-3fac3ee22b996ff6856c27c1f6d88aef0e", - "-d87bece9e340aba6cb25ae8dbb531d2bc0105fa0"); - expectSum( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-ac3ee22b996ff6856c27c1f6d88aef0e", - "-d87becaae340aba6cb25ae8dbb531d2bc0105fa0"); - expectSum( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-3ee22b996ff6856c27c1f6d88aef0e", - "-d87becaa3740aba6cb25ae8dbb531d2bc0105fa0"); - expectSum("-d87becaa3701c97b31b5b8084f2b5b34e7857092", "-1", - "-d87becaa3701c97b31b5b8084f2b5b34e7857093"); - expectSum("-d87becaa3701c97b31b5b8084f2b5b34e7857092", "-0", - "-d87becaa3701c97b31b5b8084f2b5b34e7857092"); -} diff --git a/tests/corelib_2/bigint_bitlength_test.dart b/tests/corelib_2/bigint_bitlength_test.dart deleted file mode 100644 index c4e72a84b66..00000000000 --- a/tests/corelib_2/bigint_bitlength_test.dart +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2022, 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. - -// Testing Bigints with and without intrinsics. -// VMOptions=--intrinsify --no-enable-asserts -// VMOptions=--intrinsify --enable-asserts -// VMOptions=--no-intrinsify --enable-asserts -// VMOptions=--no-intrinsify --no-enable-asserts - -import "package:expect/expect.dart"; - -const debugPrint = bool.fromEnvironment('debugPrint'); - -void check(int length, BigInt base) { - assert(length >= 5); - assert(base > BigInt.zero); - - // Check with slight adjustments. We choose -3..+3 so that the lowest bit in - // the 2's-complement representation is both zero and one for both the - // positive [n] and its negative complement [m] below. - for (int delta = -3; delta <= 3; delta++) { - BigInt n = base + BigInt.from(delta); - assert(n >= BigInt.zero); - - // Compute the bitLength by shifting the value into a small integer range - // and adjust the `int.bitLength` value by the shift count. - int shiftCount = length - 5; - int shiftedN = (n >> shiftCount).toInt(); - int expectedLength = shiftCount + shiftedN.bitLength; - - int nLength = n.bitLength; - Expect.equals(expectedLength, nLength); - - // Use identity `x.bitLength == (-x-1).bitLength` to check negative values. - BigInt m = -n - BigInt.one; - int mLength = m.bitLength; - - if (debugPrint) { - final printLength = length + 4; - final nDigits = - n.toUnsigned(printLength).toRadixString(2).padLeft(printLength); - final mDigits = m.toUnsigned(printLength).toRadixString(2); - print('$nDigits: $nLength'); - print('$mDigits: $mLength'); - } - - Expect.equals(nLength, mLength); - } -} - -void main() { - // For small values, [BigInt.bitLength] should be the same as [int.bitLength]. - for (int i = 0; i <= 64; i++) { - Expect.equals(i.bitLength, BigInt.from(i).bitLength); - // Note: This is not quite redundant for `i==0` since on the web platform - // `-i` is negative zero and not the same as `0-i`. - Expect.equals((-i).bitLength, BigInt.from(-i).bitLength); - } - - // Test x.bitLength for a large variety of lengths. - for (int length = 5; length <= 512; length++) { - BigInt base = BigInt.one << (length - 1); - Expect.equals(length, base.bitLength); - - // Power of two. - check(length, base); - - // Two high bits set. - check(length, base | base >> 1); - - // Check for values with an additional bit set near a potential internal - // digit boundary. - for (int i1 = 16; i1 < length; i1 += 16) { - for (int i2 = -1; i2 <= 1; i2++) { - int i = i1 + i2; - if (i < length - 1) { - check(length, base | BigInt.one << (i - 1)); - } - } - } - } -} diff --git a/tests/corelib_2/bigint_div_test.dart b/tests/corelib_2/bigint_div_test.dart deleted file mode 100644 index 589dedbe623..00000000000 --- a/tests/corelib_2/bigint_div_test.dart +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2022, 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 - -// Testing Bigints with and without intrinsics. -// VMOptions=--intrinsify --no-enable-asserts -// VMOptions=--intrinsify --enable-asserts -// VMOptions=--no-intrinsify --enable-asserts -// VMOptions=--no-intrinsify --no-enable-asserts - -import "package:expect/expect.dart"; - -expectQuotient(aString, bString, expectedString) { - BigInt a = BigInt.parse(aString, radix: 16); - BigInt b = BigInt.parse(bString, radix: 16); - BigInt expected = BigInt.parse(expectedString, radix: 16); - BigInt actual = a ~/ b; - String actualString = actual.toRadixString(16); - print("$aString ~/ $bString"); - print(" = $actualString (expected $expectedString)"); - Expect.equals(expected, actual); -} - -main() { - expectQuotient("d87becaa3701c97b31b5b8084f2b5b34e7857092", - "d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", "1"); - expectQuotient("d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "d87becaa3701c97b31b5b8084f2b5b34e7857092", "0"); - expectQuotient("d87becaa3701c97b31b5b8084f2b5b34e7857092", - "a13fac3ee22b996ff6856c27c1f6d88aef0e", "157b1"); - expectQuotient("d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3fac3ee22b996ff6856c27c1f6d88aef0e", "36662bd"); - expectQuotient("d87becaa3701c97b31b5b8084f2b5b34e7857092", - "ac3ee22b996ff6856c27c1f6d88aef0e", "141bfd63e"); - expectQuotient("d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3ee22b996ff6856c27c1f6d88aef0e", "3714fb67de7"); - expectQuotient("d87becaa3701c97b31b5b8084f2b5b34e7857092", "1", - "d87becaa3701c97b31b5b8084f2b5b34e7857092"); - - expectQuotient("-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", "-1"); - expectQuotient("-d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "d87becaa3701c97b31b5b8084f2b5b34e7857092", "0"); - expectQuotient("-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "a13fac3ee22b996ff6856c27c1f6d88aef0e", "-157b1"); - expectQuotient("-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3fac3ee22b996ff6856c27c1f6d88aef0e", "-36662bd"); - expectQuotient("-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "ac3ee22b996ff6856c27c1f6d88aef0e", "-141bfd63e"); - expectQuotient("-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3ee22b996ff6856c27c1f6d88aef0e", "-3714fb67de7"); - expectQuotient("-d87becaa3701c97b31b5b8084f2b5b34e7857092", "1", - "-d87becaa3701c97b31b5b8084f2b5b34e7857092"); - - expectQuotient("d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", "-1"); - expectQuotient("d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", "0"); - expectQuotient("d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-a13fac3ee22b996ff6856c27c1f6d88aef0e", "-157b1"); - expectQuotient("d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-3fac3ee22b996ff6856c27c1f6d88aef0e", "-36662bd"); - expectQuotient("d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-ac3ee22b996ff6856c27c1f6d88aef0e", "-141bfd63e"); - expectQuotient("d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-3ee22b996ff6856c27c1f6d88aef0e", "-3714fb67de7"); - expectQuotient("d87becaa3701c97b31b5b8084f2b5b34e7857092", "-1", - "-d87becaa3701c97b31b5b8084f2b5b34e7857092"); - - expectQuotient("-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", "1"); - expectQuotient("-d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", "0"); - expectQuotient("-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-a13fac3ee22b996ff6856c27c1f6d88aef0e", "157b1"); - expectQuotient("-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-3fac3ee22b996ff6856c27c1f6d88aef0e", "36662bd"); - expectQuotient("-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-ac3ee22b996ff6856c27c1f6d88aef0e", "141bfd63e"); - expectQuotient("-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-3ee22b996ff6856c27c1f6d88aef0e", "3714fb67de7"); - expectQuotient("-d87becaa3701c97b31b5b8084f2b5b34e7857092", "-1", - "d87becaa3701c97b31b5b8084f2b5b34e7857092"); -} diff --git a/tests/corelib_2/bigint_from_test.dart b/tests/corelib_2/bigint_from_test.dart deleted file mode 100644 index ddda982089c..00000000000 --- a/tests/corelib_2/bigint_from_test.dart +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2018, 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 - -// Testing Bigints with and without intrinsics. -// VMOptions=--intrinsify --no-enable-asserts -// VMOptions=--intrinsify --enable-asserts -// VMOptions=--no-intrinsify --enable-asserts -// VMOptions=--optimization-counter-threshold=20 --no-background-compilation -// VMOptions=--dwarf_stack_traces --no-retain_function_objects --no-retain_code_objects - -import "package:expect/expect.dart"; - -import 'dart:math' show pow; - -main() { - // Test integers. - testInt(0); - for (int i = 0; i < 63; i++) { - var n = pow(2, i); - testInt(-n - 1); - testInt(-n); - testInt(-n + 1); - testInt(n - 1); - testInt(n); - testInt(n + 1); - } - testInt(-0x8000000000000000); - - // Test doubles. - testDouble(0.0); - testDouble(-0.0, 0.0); - for (double d in [ - 1.0, - 2.0, - pow(2.0, 30) - 1, - pow(2.0, 30), - pow(2.0, 31) - 1, - pow(2.0, 31), - pow(2.0, 31) + 1, - pow(2.0, 32) - 1, - pow(2.0, 32), - pow(2.0, 32) + 1, - pow(2.0, 52) - 1, - pow(2.0, 52), - pow(2.0, 52) + 1, - pow(2.0, 53) - 1, - pow(2.0, 53), - ]) { - for (int p = 0; p < 1024; p++) { - var value = d * pow(2.0, p); // Valid integer value. - if (!value.isFinite) break; - testDouble(-value); - testDouble(value); - } - } - Expect.equals(BigInt.zero, new BigInt.from(0.5)); - Expect.equals(BigInt.one, new BigInt.from(1.5)); - - Expect.throws(() => new BigInt.from(double.infinity)); - Expect.throws(() => new BigInt.from(-double.infinity)); - Expect.throws(() => new BigInt.from(double.nan)); -} - -testInt(int n) { - var bigint = new BigInt.from(n); - Expect.equals(n, bigint.toInt()); - - // If the integers are inexact (e.g. > 2^53 when represented by doubles as - // when compiled to JavaScript numbers) then the 'toString' might be rounded - // to the nearest equivalent 'nicer looking' number. - if (n == n + 1 || n == n - 1) return; - - Expect.equals("$n", "$bigint"); -} - -testDouble(double input, [double expectation]) { - var bigint = new BigInt.from(input); - Expect.equals(expectation ?? input, bigint.toDouble()); -} diff --git a/tests/corelib_2/bigint_js_test.dart b/tests/corelib_2/bigint_js_test.dart deleted file mode 100644 index 6a85df5b6c0..00000000000 --- a/tests/corelib_2/bigint_js_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2018, 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 - -// Testing Bigints with and without intrinsics. -// VMOptions=--intrinsify --no-enable-asserts -// VMOptions=--intrinsify --enable-asserts -// VMOptions=--no-intrinsify --enable-asserts -// VMOptions=--optimization-counter-threshold=20 --no-background-compilation - -// Test for JavaScript specific BigInt behaviour. Any JavaScript number (double) -// that is an integral value is a Dart 'int' value, so any BigInt that has a -// value that is exactly a double integral value should return `true` for -// [BigInt.isValidInt]. - -import "package:expect/expect.dart"; - -int intPow(int a, int p) { - int result = 1; - for (int i = 0; i < p; i++) result *= a; - return result; -} - -int pow2_53 = intPow(2, 53); - -test(int n1, int n2, int shift, [bool expectedIsValidInt = true]) { - var n = (new BigInt.from(n1) * new BigInt.from(n2)) << shift; - Expect.equals(expectedIsValidInt, n.isValidInt, '${n}.isValidInt'); - if (n >= new BigInt.from(pow2_53)) { - var nplus1 = n + BigInt.one; - Expect.isFalse(nplus1.isValidInt, '${nplus1}.isValidInt'); - } -} - -main() { - test(13, 19, 1); - test(19997, 19993, 100); - test(19997, pow2_53 ~/ 19997, 0); - test(19997, pow2_53 ~/ 19997, 1); - test(19997, pow2_53 ~/ 19997, 100); - test(1, 1, 100); - test(1, 1, 10000, false); - - // More than 53 bits in product, - test(pow2_53 ~/ 3, pow2_53 ~/ 5, 0, false); -} diff --git a/tests/corelib_2/bigint_mod_test.dart b/tests/corelib_2/bigint_mod_test.dart deleted file mode 100644 index 56e0aa3eefa..00000000000 --- a/tests/corelib_2/bigint_mod_test.dart +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) 2022, 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 - -// Testing Bigints with and without intrinsics. -// VMOptions=--intrinsify --no-enable-asserts -// VMOptions=--intrinsify --enable-asserts -// VMOptions=--no-intrinsify --enable-asserts -// VMOptions=--no-intrinsify --no-enable-asserts - -import "package:expect/expect.dart"; - -expectRemainder(aString, bString, expectedString) { - BigInt a = BigInt.parse(aString, radix: 16); - BigInt b = BigInt.parse(bString, radix: 16); - BigInt expected = BigInt.parse(expectedString, radix: 16); - BigInt actual = a % b; - String actualString = actual.toRadixString(16); - print("$aString % $bString"); - print(" = $actualString (expected $expectedString)"); - Expect.equals(expected, actual); -} - -main() { - expectRemainder( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "3b04b6a8ac2e74f9845c182e303993e0efa8184"); - expectRemainder( - "d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "d4cba13fac3ee22b996ff6856c27c1f6d88aef0e"); - expectRemainder( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "a13fac3ee22b996ff6856c27c1f6d88aef0e", - "1fdbde7efec117ff81df42cc8367092a65e4"); - expectRemainder( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3fac3ee22b996ff6856c27c1f6d88aef0e", - "359d4ac0e4440150310acc0e96fdb973c"); - expectRemainder("d87becaa3701c97b31b5b8084f2b5b34e7857092", - "ac3ee22b996ff6856c27c1f6d88aef0e", "84c9b202365aef6ea4b442ff6897d72e"); - expectRemainder("d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3ee22b996ff6856c27c1f6d88aef0e", "2c66626e41743605244c026579e4f0"); - expectRemainder("d87becaa3701c97b31b5b8084f2b5b34e7857092", "1", "0"); - - expectRemainder( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "d11b55d5217bfadc012a3502892428b8c9906d8a"); - expectRemainder( - "-d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3b04b6a8ac2e74f9845c182e303993e0efa8184"); - expectRemainder( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "a13fac3ee22b996ff6856c27c1f6d88aef0e", - "8163cdbfe36a817074a6295b3e8fcf60892a"); - expectRemainder( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3fac3ee22b996ff6856c27c1f6d88aef0e", - "3c526a361d552fe1825b7b010d68af57d2"); - expectRemainder("-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "ac3ee22b996ff6856c27c1f6d88aef0e", "2775302963150716c7737ef76ff317e0"); - expectRemainder("-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3ee22b996ff6856c27c1f6d88aef0e", "127bc92b2e824f670375f473110a1e"); - expectRemainder("-d87becaa3701c97b31b5b8084f2b5b34e7857092", "1", "0"); - - expectRemainder( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "3b04b6a8ac2e74f9845c182e303993e0efa8184"); - expectRemainder( - "d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "d4cba13fac3ee22b996ff6856c27c1f6d88aef0e"); - expectRemainder( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-a13fac3ee22b996ff6856c27c1f6d88aef0e", - "1fdbde7efec117ff81df42cc8367092a65e4"); - expectRemainder( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-3fac3ee22b996ff6856c27c1f6d88aef0e", - "359d4ac0e4440150310acc0e96fdb973c"); - expectRemainder("d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-ac3ee22b996ff6856c27c1f6d88aef0e", "84c9b202365aef6ea4b442ff6897d72e"); - expectRemainder("d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-3ee22b996ff6856c27c1f6d88aef0e", "2c66626e41743605244c026579e4f0"); - expectRemainder("d87becaa3701c97b31b5b8084f2b5b34e7857092", "-1", "0"); - - expectRemainder( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "d11b55d5217bfadc012a3502892428b8c9906d8a"); - expectRemainder( - "-d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3b04b6a8ac2e74f9845c182e303993e0efa8184"); - expectRemainder( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-a13fac3ee22b996ff6856c27c1f6d88aef0e", - "8163cdbfe36a817074a6295b3e8fcf60892a"); - expectRemainder( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-3fac3ee22b996ff6856c27c1f6d88aef0e", - "3c526a361d552fe1825b7b010d68af57d2"); - expectRemainder("-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-ac3ee22b996ff6856c27c1f6d88aef0e", "2775302963150716c7737ef76ff317e0"); - expectRemainder("-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-3ee22b996ff6856c27c1f6d88aef0e", "127bc92b2e824f670375f473110a1e"); - expectRemainder("-d87becaa3701c97b31b5b8084f2b5b34e7857092", "-1", "0"); -} diff --git a/tests/corelib_2/bigint_mul_test.dart b/tests/corelib_2/bigint_mul_test.dart deleted file mode 100644 index 7fb5f0708b1..00000000000 --- a/tests/corelib_2/bigint_mul_test.dart +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) 2022, 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 - -// Testing Bigints with and without intrinsics. -// VMOptions=--intrinsify --no-enable-asserts -// VMOptions=--intrinsify --enable-asserts -// VMOptions=--no-intrinsify --enable-asserts -// VMOptions=--no-intrinsify --no-enable-asserts - -import "package:expect/expect.dart"; - -expectProduct(aString, bString, expectedString) { - BigInt a = BigInt.parse(aString, radix: 16); - BigInt b = BigInt.parse(bString, radix: 16); - BigInt expected = BigInt.parse(expectedString, radix: 16); - BigInt actual = a * b; - String actualString = actual.toRadixString(16); - print("$aString * $bString"); - print(" = $actualString (expected $expectedString)"); - Expect.equals(expected, actual); -} - -main() { - expectProduct( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "b3f2d29d6885d40866b040adf8f545352154823b15fed8aa8c35c5c223fcf4bf6eb904401c1875fc"); - expectProduct( - "d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "b3f2d29d6885d40866b040adf8f545352154823b15fed8aa8c35c5c223fcf4bf6eb904401c1875fc"); - expectProduct( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "a13fac3ee22b996ff6856c27c1f6d88aef0e", - "885bc7febac39cd5592e28ce964bfea66a31ea38d8aa8c35c5c223fcf4bf6eb904401c1875fc"); - expectProduct( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3fac3ee22b996ff6856c27c1f6d88aef0e", - "35d827ae2b7d1edeeae0115c81ba4a2496fe6d06aa8c35c5c223fcf4bf6eb904401c1875fc"); - expectProduct( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "ac3ee22b996ff6856c27c1f6d88aef0e", - "91a87047f3ae4999a45912763e9eb292049652bc8c35c5c223fcf4bf6eb904401c1875fc"); - expectProduct( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3ee22b996ff6856c27c1f6d88aef0e", - "352d4596b9163adef2fad0a96d914a7908ab1a7435c5c223fcf4bf6eb904401c1875fc"); - expectProduct("d87becaa3701c97b31b5b8084f2b5b34e7857092", "1", - "d87becaa3701c97b31b5b8084f2b5b34e7857092"); - expectProduct("d87becaa3701c97b31b5b8084f2b5b34e7857092", "0", "0"); - - expectProduct( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "-b3f2d29d6885d40866b040adf8f545352154823b15fed8aa8c35c5c223fcf4bf6eb904401c1875fc"); - expectProduct( - "-d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-b3f2d29d6885d40866b040adf8f545352154823b15fed8aa8c35c5c223fcf4bf6eb904401c1875fc"); - expectProduct( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "a13fac3ee22b996ff6856c27c1f6d88aef0e", - "-885bc7febac39cd5592e28ce964bfea66a31ea38d8aa8c35c5c223fcf4bf6eb904401c1875fc"); - expectProduct( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3fac3ee22b996ff6856c27c1f6d88aef0e", - "-35d827ae2b7d1edeeae0115c81ba4a2496fe6d06aa8c35c5c223fcf4bf6eb904401c1875fc"); - expectProduct( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "ac3ee22b996ff6856c27c1f6d88aef0e", - "-91a87047f3ae4999a45912763e9eb292049652bc8c35c5c223fcf4bf6eb904401c1875fc"); - expectProduct( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3ee22b996ff6856c27c1f6d88aef0e", - "-352d4596b9163adef2fad0a96d914a7908ab1a7435c5c223fcf4bf6eb904401c1875fc"); - expectProduct("-d87becaa3701c97b31b5b8084f2b5b34e7857092", "1", - "-d87becaa3701c97b31b5b8084f2b5b34e7857092"); - expectProduct("-d87becaa3701c97b31b5b8084f2b5b34e7857092", "0", "0"); - - expectProduct( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "-b3f2d29d6885d40866b040adf8f545352154823b15fed8aa8c35c5c223fcf4bf6eb904401c1875fc"); - expectProduct( - "d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-b3f2d29d6885d40866b040adf8f545352154823b15fed8aa8c35c5c223fcf4bf6eb904401c1875fc"); - expectProduct( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-a13fac3ee22b996ff6856c27c1f6d88aef0e", - "-885bc7febac39cd5592e28ce964bfea66a31ea38d8aa8c35c5c223fcf4bf6eb904401c1875fc"); - expectProduct( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-3fac3ee22b996ff6856c27c1f6d88aef0e", - "-35d827ae2b7d1edeeae0115c81ba4a2496fe6d06aa8c35c5c223fcf4bf6eb904401c1875fc"); - expectProduct( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-ac3ee22b996ff6856c27c1f6d88aef0e", - "-91a87047f3ae4999a45912763e9eb292049652bc8c35c5c223fcf4bf6eb904401c1875fc"); - expectProduct( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-3ee22b996ff6856c27c1f6d88aef0e", - "-352d4596b9163adef2fad0a96d914a7908ab1a7435c5c223fcf4bf6eb904401c1875fc"); - expectProduct("d87becaa3701c97b31b5b8084f2b5b34e7857092", "-1", - "-d87becaa3701c97b31b5b8084f2b5b34e7857092"); - expectProduct("d87becaa3701c97b31b5b8084f2b5b34e7857092", "-0", "0"); - - expectProduct( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "b3f2d29d6885d40866b040adf8f545352154823b15fed8aa8c35c5c223fcf4bf6eb904401c1875fc"); - expectProduct( - "-d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "b3f2d29d6885d40866b040adf8f545352154823b15fed8aa8c35c5c223fcf4bf6eb904401c1875fc"); - expectProduct( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-a13fac3ee22b996ff6856c27c1f6d88aef0e", - "885bc7febac39cd5592e28ce964bfea66a31ea38d8aa8c35c5c223fcf4bf6eb904401c1875fc"); - expectProduct( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-3fac3ee22b996ff6856c27c1f6d88aef0e", - "35d827ae2b7d1edeeae0115c81ba4a2496fe6d06aa8c35c5c223fcf4bf6eb904401c1875fc"); - expectProduct( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-ac3ee22b996ff6856c27c1f6d88aef0e", - "91a87047f3ae4999a45912763e9eb292049652bc8c35c5c223fcf4bf6eb904401c1875fc"); - expectProduct( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-3ee22b996ff6856c27c1f6d88aef0e", - "352d4596b9163adef2fad0a96d914a7908ab1a7435c5c223fcf4bf6eb904401c1875fc"); - expectProduct("-d87becaa3701c97b31b5b8084f2b5b34e7857092", "-1", - "d87becaa3701c97b31b5b8084f2b5b34e7857092"); - expectProduct("-d87becaa3701c97b31b5b8084f2b5b34e7857092", "-0", "0"); -} diff --git a/tests/corelib_2/bigint_parse_radix_test.dart b/tests/corelib_2/bigint_parse_radix_test.dart deleted file mode 100644 index ed2a8b33539..00000000000 --- a/tests/corelib_2/bigint_parse_radix_test.dart +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) 2017, 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 - -// Testing Bigints with and without intrinsics. -// VMOptions=--intrinsify --no-enable-asserts -// VMOptions=--intrinsify --enable-asserts -// VMOptions=--no-intrinsify --enable-asserts -// VMOptions=--optimization-counter-threshold=20 --no-background-compilation - -import "package:expect/expect.dart"; - -import 'dart:math' show pow; - -void testParseRadix() { - bool checkedMode = false; - assert((checkedMode = true)); - const String oneByteWhiteSpace = "\x09\x0a\x0b\x0c\x0d\x20" - // "\x85" // Might make troubles on some systems. Was marked as OK test. - "\xa0"; - const String whiteSpace = "$oneByteWhiteSpace\u1680" - "\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a" - "\u2028\u2029\u202f\u205f\u3000\ufeff"; - - var digits = "0123456789abcdefghijklmnopqrstuvwxyz"; - var zeros = "0" * 64; - - for (int i = 0; i < whiteSpace.length; i++) { - var ws = whiteSpace[i]; - Expect.equals(BigInt.zero, BigInt.parse("${ws}0${ws}", radix: 2)); - } - - void testParse(BigInt result, String radixString, int radix) { - var m = "$radixString/$radix->$result"; - Expect.equals( - result, BigInt.parse(radixString.toLowerCase(), radix: radix), m); - Expect.equals( - result, BigInt.parse(radixString.toUpperCase(), radix: radix), m); - Expect.equals(result, BigInt.parse(" $radixString", radix: radix), m); - Expect.equals(result, BigInt.parse("$radixString ", radix: radix), m); - Expect.equals(result, BigInt.parse(" $radixString ", radix: radix), m); - Expect.equals(result, BigInt.parse("+$radixString", radix: radix), m); - Expect.equals(result, BigInt.parse(" +$radixString", radix: radix), m); - Expect.equals(result, BigInt.parse("+$radixString ", radix: radix), m); - Expect.equals(result, BigInt.parse(" +$radixString ", radix: radix), m); - Expect.equals(-result, BigInt.parse("-$radixString", radix: radix), m); - Expect.equals(-result, BigInt.parse(" -$radixString", radix: radix), m); - Expect.equals(-result, BigInt.parse("-$radixString ", radix: radix), m); - Expect.equals(-result, BigInt.parse(" -$radixString ", radix: radix), m); - Expect.equals( - result, - BigInt.parse("$oneByteWhiteSpace$radixString$oneByteWhiteSpace", - radix: radix), - m); - Expect.equals( - -result, - BigInt.parse("$oneByteWhiteSpace-$radixString$oneByteWhiteSpace", - radix: radix), - m); - Expect.equals(result, - BigInt.parse("$whiteSpace$radixString$whiteSpace", radix: radix), m); - Expect.equals(-result, - BigInt.parse("$whiteSpace-$radixString$whiteSpace", radix: radix), m); - - Expect.equals(result, BigInt.parse("$zeros$radixString", radix: radix), m); - Expect.equals(result, BigInt.parse("+$zeros$radixString", radix: radix), m); - Expect.equals( - -result, BigInt.parse("-$zeros$radixString", radix: radix), m); - } - - for (int r = 2; r <= 36; r++) { - for (var i = BigInt.zero; i <= new BigInt.from(r * r); i += BigInt.one) { - String radixString = i.toRadixString(r); - testParse(i, radixString, r); - } - } - - for (int i = 2; i <= 36; i++) { - var digit = digits[i - 1]; - testParse(new BigInt.from(i).pow(64) - BigInt.one, digit * 64, i); - testParse(BigInt.zero, zeros, i); - } - - // Allow both upper- and lower-case letters. - Expect.equals(new BigInt.from(0xABCD), BigInt.parse("ABCD", radix: 16)); - Expect.equals(new BigInt.from(0xABCD), BigInt.parse("abcd", radix: 16)); - Expect.equals(new BigInt.from(15628859), BigInt.parse("09azAZ", radix: 36)); - - Expect.equals( - (new BigInt.from(0x12345678) << 96) + - (new BigInt.from(0x12345678) << 64) + - (new BigInt.from(0x12345678) << 32) + - new BigInt.from(0x12345678), - BigInt.parse("0x12345678123456781234567812345678")); - - // Allow whitespace before and after the number. - Expect.equals(BigInt.one, BigInt.parse(" 1", radix: 2)); - Expect.equals(BigInt.one, BigInt.parse("1 ", radix: 2)); - Expect.equals(BigInt.one, BigInt.parse(" 1 ", radix: 2)); - Expect.equals(BigInt.one, BigInt.parse("\n1", radix: 2)); - Expect.equals(BigInt.one, BigInt.parse("1\n", radix: 2)); - Expect.equals(BigInt.one, BigInt.parse("\n1\n", radix: 2)); - Expect.equals(BigInt.one, BigInt.parse("+1", radix: 2)); - - void testFails(String source, int radix) { - Expect.throws(() { - BigInt.parse(source, radix: radix); - }, (e) => e is FormatException, "$source/$radix"); - } - - for (int i = 2; i < 36; i++) { - var char = i.toRadixString(36); - testFails(char.toLowerCase(), i); - testFails(char.toUpperCase(), i); - } - testFails("", 2); - testFails("+ 1", 2); // No space between sign and digits. - testFails("- 1", 2); // No space between sign and digits. - testFails("0x", null); - for (int i = 2; i <= 33; i++) { - // No 0x specially allowed. - // At radix 34 and above, "x" is a valid digit. - testFails("0x10", i); - } - - testBadArguments(String source, int radix) { - // If the types match, it should be an ArgumentError of some sort. - Expect.throws( - () => BigInt.parse(source, radix: radix), (e) => e is ArgumentError); - } - - testBadArguments("0", -1); - testBadArguments("0", 0); - testBadArguments("0", 1); - testBadArguments("0", 37); -} - -main() { - testParseRadix(); -} diff --git a/tests/corelib_2/bigint_sll_test.dart b/tests/corelib_2/bigint_sll_test.dart deleted file mode 100644 index 9f00fd4915a..00000000000 --- a/tests/corelib_2/bigint_sll_test.dart +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2022, 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 - -// Testing Bigints with and without intrinsics. -// VMOptions=--intrinsify --no-enable-asserts -// VMOptions=--intrinsify --enable-asserts -// VMOptions=--no-intrinsify --enable-asserts -// VMOptions=--no-intrinsify --no-enable-asserts - -import "package:expect/expect.dart"; - -expectShifted(aString, n, expectedString) { - BigInt a = BigInt.parse(aString, radix: 16); - BigInt expected = BigInt.parse(expectedString, radix: 16); - BigInt actual = a << n; - String actualString = actual.toRadixString(16); - print("$aString << $n"); - print(" = $actualString (expected $expectedString)"); - Expect.equals(expected, actual); -} - -main() { - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 0, - "d87becaa3701c97b31b5b8084f2b5b34e7857092"); - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 1, - "1b0f7d9546e0392f6636b70109e56b669cf0ae124"); - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 2, - "361efb2a8dc0725ecc6d6e0213cad6cd39e15c248"); - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 31, - "6c3df6551b80e4bd98dadc042795ad9a73c2b84900000000"); - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 32, - "d87becaa3701c97b31b5b8084f2b5b34e785709200000000"); - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 33, - "1b0f7d9546e0392f6636b70109e56b669cf0ae12400000000"); - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 63, - "6c3df6551b80e4bd98dadc042795ad9a73c2b8490000000000000000"); - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 64, - "d87becaa3701c97b31b5b8084f2b5b34e78570920000000000000000"); - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 65, - "1b0f7d9546e0392f6636b70109e56b669cf0ae1240000000000000000"); - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 127, - "6c3df6551b80e4bd98dadc042795ad9a73c2b84900000000000000000000000000000000"); - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 128, - "d87becaa3701c97b31b5b8084f2b5b34e785709200000000000000000000000000000000"); - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 129, - "1b0f7d9546e0392f6636b70109e56b669cf0ae12400000000000000000000000000000000"); - - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 0, - "-d87becaa3701c97b31b5b8084f2b5b34e7857092"); - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 1, - "-1b0f7d9546e0392f6636b70109e56b669cf0ae124"); - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 2, - "-361efb2a8dc0725ecc6d6e0213cad6cd39e15c248"); - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 31, - "-6c3df6551b80e4bd98dadc042795ad9a73c2b84900000000"); - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 32, - "-d87becaa3701c97b31b5b8084f2b5b34e785709200000000"); - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 33, - "-1b0f7d9546e0392f6636b70109e56b669cf0ae12400000000"); - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 63, - "-6c3df6551b80e4bd98dadc042795ad9a73c2b8490000000000000000"); - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 64, - "-d87becaa3701c97b31b5b8084f2b5b34e78570920000000000000000"); - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 65, - "-1b0f7d9546e0392f6636b70109e56b669cf0ae1240000000000000000"); - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 127, - "-6c3df6551b80e4bd98dadc042795ad9a73c2b84900000000000000000000000000000000"); - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 128, - "-d87becaa3701c97b31b5b8084f2b5b34e785709200000000000000000000000000000000"); - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 129, - "-1b0f7d9546e0392f6636b70109e56b669cf0ae12400000000000000000000000000000000"); -} diff --git a/tests/corelib_2/bigint_sra_test.dart b/tests/corelib_2/bigint_sra_test.dart deleted file mode 100644 index e4d8966fcf0..00000000000 --- a/tests/corelib_2/bigint_sra_test.dart +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2022, 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 - -// Testing Bigints with and without intrinsics. -// VMOptions=--intrinsify --no-enable-asserts -// VMOptions=--intrinsify --enable-asserts -// VMOptions=--no-intrinsify --enable-asserts -// VMOptions=--no-intrinsify --no-enable-asserts - -import "package:expect/expect.dart"; - -expectShifted(aString, n, expectedString) { - BigInt a = BigInt.parse(aString, radix: 16); - BigInt expected = BigInt.parse(expectedString, radix: 16); - BigInt actual = a >> n; - String actualString = actual.toRadixString(16); - print("$aString >> $n"); - print(" = $actualString (expected $expectedString)"); - Expect.equals(expected, actual); -} - -main() { - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 0, - "d87becaa3701c97b31b5b8084f2b5b34e7857092"); - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 1, - "6c3df6551b80e4bd98dadc042795ad9a73c2b849"); - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 2, - "361efb2a8dc0725ecc6d6e0213cad6cd39e15c24"); - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 31, - "1b0f7d9546e0392f6636b70109e56b669"); - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 32, - "d87becaa3701c97b31b5b8084f2b5b34"); - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 33, - "6c3df6551b80e4bd98dadc042795ad9a"); - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 63, - "1b0f7d9546e0392f6636b7010"); - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 64, - "d87becaa3701c97b31b5b808"); - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 65, - "6c3df6551b80e4bd98dadc04"); - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 127, "1b0f7d954"); - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 128, "d87becaa"); - expectShifted("d87becaa3701c97b31b5b8084f2b5b34e7857092", 129, "6c3df655"); - - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 0, - "-d87becaa3701c97b31b5b8084f2b5b34e7857092"); - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 1, - "-6c3df6551b80e4bd98dadc042795ad9a73c2b849"); - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 2, - "-361efb2a8dc0725ecc6d6e0213cad6cd39e15c25"); - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 31, - "-1b0f7d9546e0392f6636b70109e56b66a"); - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 32, - "-d87becaa3701c97b31b5b8084f2b5b35"); - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 33, - "-6c3df6551b80e4bd98dadc042795ad9b"); - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 63, - "-1b0f7d9546e0392f6636b7011"); - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 64, - "-d87becaa3701c97b31b5b809"); - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 65, - "-6c3df6551b80e4bd98dadc05"); - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 127, "-1b0f7d955"); - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 128, "-d87becab"); - expectShifted("-d87becaa3701c97b31b5b8084f2b5b34e7857092", 129, "-6c3df656"); -} diff --git a/tests/corelib_2/bigint_sub_test.dart b/tests/corelib_2/bigint_sub_test.dart deleted file mode 100644 index ff7555d71ab..00000000000 --- a/tests/corelib_2/bigint_sub_test.dart +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) 2022, 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 - -// Testing Bigints with and without intrinsics. -// VMOptions=--intrinsify --no-enable-asserts -// VMOptions=--intrinsify --enable-asserts -// VMOptions=--no-intrinsify --enable-asserts -// VMOptions=--no-intrinsify --no-enable-asserts - -import "package:expect/expect.dart"; - -expectDifference(aString, bString, expectedString) { - BigInt a = BigInt.parse(aString, radix: 16); - BigInt b = BigInt.parse(bString, radix: 16); - BigInt expected = BigInt.parse(expectedString, radix: 16); - BigInt actual = a - b; - String actualString = actual.toRadixString(16); - print("$aString - $bString"); - print(" = $actualString (expected $expectedString)"); - Expect.equals(expected, actual); -} - -main() { - expectDifference( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "3b04b6a8ac2e74f9845c182e303993e0efa8184"); - expectDifference( - "d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-3b04b6a8ac2e74f9845c182e303993e0efa8184"); - expectDifference( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "a13fac3ee22b996ff6856c27c1f6d88aef0e", - "d87b4b6a8ac2e74f9845c182e303993e0efa8184"); - expectDifference( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3fac3ee22b996ff6856c27c1f6d88aef0e", - "d87bec6a8ac2e74f9845c182e303993e0efa8184"); - expectDifference( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "ac3ee22b996ff6856c27c1f6d88aef0e", - "d87beca98ac2e74f9845c182e303993e0efa8184"); - expectDifference( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3ee22b996ff6856c27c1f6d88aef0e", - "d87becaa36c2e74f9845c182e303993e0efa8184"); - expectDifference("d87becaa3701c97b31b5b8084f2b5b34e7857092", "1", - "d87becaa3701c97b31b5b8084f2b5b34e7857091"); - expectDifference("d87becaa3701c97b31b5b8084f2b5b34e7857092", "0", - "d87becaa3701c97b31b5b8084f2b5b34e7857092"); - - expectDifference( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "-1ad478de9e340aba6cb25ae8dbb531d2bc0105fa0"); - expectDifference( - "-d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-1ad478de9e340aba6cb25ae8dbb531d2bc0105fa0"); - expectDifference( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "a13fac3ee22b996ff6856c27c1f6d88aef0e", - "-d87c8de9e340aba6cb25ae8dbb531d2bc0105fa0"); - expectDifference( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3fac3ee22b996ff6856c27c1f6d88aef0e", - "-d87bece9e340aba6cb25ae8dbb531d2bc0105fa0"); - expectDifference( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "ac3ee22b996ff6856c27c1f6d88aef0e", - "-d87becaae340aba6cb25ae8dbb531d2bc0105fa0"); - expectDifference( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3ee22b996ff6856c27c1f6d88aef0e", - "-d87becaa3740aba6cb25ae8dbb531d2bc0105fa0"); - expectDifference("-d87becaa3701c97b31b5b8084f2b5b34e7857092", "1", - "-d87becaa3701c97b31b5b8084f2b5b34e7857093"); - expectDifference("-d87becaa3701c97b31b5b8084f2b5b34e7857092", "0", - "-d87becaa3701c97b31b5b8084f2b5b34e7857092"); - - expectDifference( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "1ad478de9e340aba6cb25ae8dbb531d2bc0105fa0"); - expectDifference( - "d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "1ad478de9e340aba6cb25ae8dbb531d2bc0105fa0"); - expectDifference( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-a13fac3ee22b996ff6856c27c1f6d88aef0e", - "d87c8de9e340aba6cb25ae8dbb531d2bc0105fa0"); - expectDifference( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-3fac3ee22b996ff6856c27c1f6d88aef0e", - "d87bece9e340aba6cb25ae8dbb531d2bc0105fa0"); - expectDifference( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-ac3ee22b996ff6856c27c1f6d88aef0e", - "d87becaae340aba6cb25ae8dbb531d2bc0105fa0"); - expectDifference( - "d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-3ee22b996ff6856c27c1f6d88aef0e", - "d87becaa3740aba6cb25ae8dbb531d2bc0105fa0"); - expectDifference("d87becaa3701c97b31b5b8084f2b5b34e7857092", "-1", - "d87becaa3701c97b31b5b8084f2b5b34e7857093"); - expectDifference("d87becaa3701c97b31b5b8084f2b5b34e7857092", "-0", - "d87becaa3701c97b31b5b8084f2b5b34e7857092"); - - expectDifference( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "-3b04b6a8ac2e74f9845c182e303993e0efa8184"); - expectDifference( - "-d4cba13fac3ee22b996ff6856c27c1f6d88aef0e", - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "3b04b6a8ac2e74f9845c182e303993e0efa8184"); - expectDifference( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-a13fac3ee22b996ff6856c27c1f6d88aef0e", - "-d87b4b6a8ac2e74f9845c182e303993e0efa8184"); - expectDifference( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-3fac3ee22b996ff6856c27c1f6d88aef0e", - "-d87bec6a8ac2e74f9845c182e303993e0efa8184"); - expectDifference( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-ac3ee22b996ff6856c27c1f6d88aef0e", - "-d87beca98ac2e74f9845c182e303993e0efa8184"); - expectDifference( - "-d87becaa3701c97b31b5b8084f2b5b34e7857092", - "-3ee22b996ff6856c27c1f6d88aef0e", - "-d87becaa36c2e74f9845c182e303993e0efa8184"); - expectDifference("-d87becaa3701c97b31b5b8084f2b5b34e7857092", "-1", - "-d87becaa3701c97b31b5b8084f2b5b34e7857091"); - expectDifference("-d87becaa3701c97b31b5b8084f2b5b34e7857092", "-0", - "-d87becaa3701c97b31b5b8084f2b5b34e7857092"); -} diff --git a/tests/corelib_2/bigint_test.dart b/tests/corelib_2/bigint_test.dart deleted file mode 100644 index b2d10d64f30..00000000000 --- a/tests/corelib_2/bigint_test.dart +++ /dev/null @@ -1,1099 +0,0 @@ -// Copyright (c) 2017, 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 - -// Testing Bigints with and without intrinsics. -// VMOptions=--intrinsify --no-enable-asserts -// VMOptions=--intrinsify --enable-asserts -// VMOptions=--no-intrinsify --enable-asserts -// VMOptions=--optimization-counter-threshold=20 --no-background-compilation - -import "package:expect/expect.dart"; - -import 'dart:math' show pow; - -var smallNumber = new BigInt.from(1234567890); // is 31-bit integer. -var mediumNumber = new BigInt.from(1234567890123456); // is 53-bit integer -var bigNumber = BigInt.parse("590295810358705600000"); // > 64-bit integer - -testModPow() { - void test(BigInt x, BigInt e, BigInt m, BigInt expectedResult) { - // Check that expected result is correct, using an unoptimized version. - assert(() { - slowModPow(BigInt x, BigInt e, BigInt m) { - var r = BigInt.one; - while (e > BigInt.zero) { - if (e.isOdd) r = (r * x) % m; - e >>= 1; - x = (x * x) % m; - } - return r; - } - - return slowModPow(x, e, m) == expectedResult; - }()); - var result = x.modPow(e, m); - Expect.equals(expectedResult, result, "$x.modPow($e, $m)"); - } - - test(new BigInt.from(10), new BigInt.from(20), BigInt.one, BigInt.zero); - test(new BigInt.from(1234567890), new BigInt.from(1000000001), - new BigInt.from(19), new BigInt.from(11)); - test(new BigInt.from(1234567890), new BigInt.from(19), - new BigInt.from(1000000001), new BigInt.from(122998977)); - test(new BigInt.from(19), new BigInt.from(1234567890), - new BigInt.from(1000000001), new BigInt.from(619059596)); - test(new BigInt.from(19), new BigInt.from(1000000001), - new BigInt.from(1234567890), new BigInt.from(84910879)); - test(new BigInt.from(1000000001), new BigInt.from(19), - new BigInt.from(1234567890), new BigInt.from(872984351)); - test(new BigInt.from(1000000001), new BigInt.from(1234567890), - new BigInt.from(19), BigInt.zero); - test(BigInt.parse("12345678901234567890"), - BigInt.parse("10000000000000000001"), new BigInt.from(19), BigInt.two); - test( - BigInt.parse("12345678901234567890"), - new BigInt.from(19), - BigInt.parse("10000000000000000001"), - BigInt.parse("3239137215315834625")); - test( - new BigInt.from(19), - BigInt.parse("12345678901234567890"), - BigInt.parse("10000000000000000001"), - BigInt.parse("4544207837373941034")); - test( - new BigInt.from(19), - BigInt.parse("10000000000000000001"), - BigInt.parse("12345678901234567890"), - BigInt.parse("11135411705397624859")); - test( - BigInt.parse("10000000000000000001"), - new BigInt.from(19), - BigInt.parse("12345678901234567890"), - BigInt.parse("2034013733189773841")); - test(BigInt.parse("10000000000000000001"), - BigInt.parse("12345678901234567890"), new BigInt.from(19), BigInt.one); - test( - BigInt.parse("12345678901234567890"), - new BigInt.from(19), - BigInt.parse("10000000000000000001"), - BigInt.parse("3239137215315834625")); - test(BigInt.parse("12345678901234567890"), - BigInt.parse("10000000000000000001"), new BigInt.from(19), BigInt.two); - test( - BigInt.parse("123456789012345678901234567890"), - BigInt.parse("123456789012345678901234567891"), - BigInt.parse("123456789012345678901234567899"), - BigInt.parse("116401406051033429924651549616")); - test( - BigInt.parse("123456789012345678901234567890"), - BigInt.parse("123456789012345678901234567899"), - BigInt.parse("123456789012345678901234567891"), - BigInt.parse("123456789012345678901234567890")); - test( - BigInt.parse("123456789012345678901234567899"), - BigInt.parse("123456789012345678901234567890"), - BigInt.parse("123456789012345678901234567891"), - BigInt.parse("35088523091000351053091545070")); - test( - BigInt.parse("123456789012345678901234567899"), - BigInt.parse("123456789012345678901234567891"), - BigInt.parse("123456789012345678901234567890"), - BigInt.parse("18310047270234132455316941949")); - test( - BigInt.parse("123456789012345678901234567891"), - BigInt.parse("123456789012345678901234567899"), - BigInt.parse("123456789012345678901234567890"), - BigInt.one); - test( - BigInt.parse("123456789012345678901234567891"), - BigInt.parse("123456789012345678901234567890"), - BigInt.parse("123456789012345678901234567899"), - BigInt.parse("40128068573873018143207285483")); - test( - BigInt.parse( - "-7003a3cac2bac4e494d749ae101f7ede8f11dac594fea5f51e15826021d734df6ec" - "b6f67d74e2bb0f47ee39cb79fae059734c95d1eacb0340af64c05b83a4f70a737363" - "c3799d38c23b7833622d89036b4649bcc7b749037f4954dac6abe5566c97cb6ac81f" - "f8a09f8c71c7f08061720483b592517a608088ddb4c2e460ad1a73abbadbda077922" - "1751cf22f1191e3be531505c833fede908a17581a9ae96f3c0258edcfe71786b7cf3" - "07f67eb9ecd8656d0fd397b0215bfb79efb314299d3e9db70b31a34f5f67e6c5e166" - "cfa3e0bf45837c5d64fa3930a91a06b94840b4773d81280ed2af141747a6ac99d882" - "a59f47b15ce8c1d716ead646b139b928869902225c85ea220b90e290181f271ed087" - "bb6972dfe7d674b09e44c268128340d9172182732990a70af51d589c89f39d8f5dac" - "659161aa0a32774728e15e25bad2960b4eacb8b670581b1c431201192c8bdbcc9256" - "ef9e863b589f22813158050cdaf5da69f83819639f5a183c7ffe61ba1582d6ace35c" - "8318dfdc597d016e70b7bb115fc1a7a3481c3a6296f1504e5ccd9b14e641acb2aa32" - "9c3d69b5e8f1609eec8b5b5a2b0192e9f21e7e3960c52975a70cf934c32e67799c40" - "863b23c9579a551df4b179e6e2094f86c9fffa4bb5634202e094d380565b44cec833" - "db25721010dd5df766204ae8d1e8680075f261801aee047d0ac576b9b10710de54e6" - "eaa94648a7fba1576e66ea44f4bb7f6b941268a8d920bfc2727f82457f92cc2a016c" - "b", - radix: 16), - BigInt.parse( - "73ac14b30fe9cb8275a7410a06ce5de8a60fe0a02e236197182996ca5886fd4e6937" - "555f1f02ed4183ff7f097f76051f286dbb1b24751795cb793b1b81ac259", - radix: 16), - BigInt.parse( - "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020b" - "bea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d" - "6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a89" - "9fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a" - "69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c" - "354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2" - "ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa" - "051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a" - "8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3" - "d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe11757" - "7a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a921" - "08011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda" - "2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2" - "964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127" - "d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffff" - "ffff", - radix: 16), - BigInt.parse( - "b1b35af289290c92fcd3d22fca66016f6db7aa21508991c97f0e53fddc2f7ece7088" - "5e935259c28d317be14c0378e2ebd103600e2e1f55b111703fc75217836e24f9bfd8" - "63d47cdb26882f491949b1906c2cb016c0e9e9d77c3a9c4a3e85b9ac34057eeb993d" - "d048d8ed90b1eea78f84ee48febb1281384c739b1c60dda475395e3928b7081af890" - "d2c58eac70d11d7f14c0e98fd168735425d233b7c07506b54149482261067079f82a" - "b531a072ede523aca1765c1a587c160f638aa3ccab8cd1f3358c5bac3ed0a6062e92" - "94df2322864f6a8e58b4a2d40b600a0f09065d34bd49e60b5656d2c6dcb3af751f4a" - "9c10dc7df46215f3043b4077fc2be7f648d388843db9cf94f31b2eb376cf22033a23" - "e8984b5b1702f9e5af99507ad3d8d624a104c18af275949e7e88c16651103a2a7620" - "c5c8356f1f2311a9cab2c61d30b0af22d7961e42cb13679bf0d52f35b41a0f7c341a" - "c414a76a9a85408c39836657594180ffbb4d5a38e4b6eeea125fcde370478f6b7cd8" - "903fc8a822075f6e766d83337e6db2eb6605d514327294ec1e076d576eee08220acd" - "f4f9ffa31f1aa7b4639eb11797c8f39956b5e4dbca98a0a15eb29136b66917cfdbfb" - "dd8ba20475ad401a6f1022a04bed3c8d5227cd7385e9b67096261fcc2ccf2632a4c2" - "f5ef640b1f37966f855f8314c97c8ef7a136e54565e95bfe253e579753f5a14c2a01" - "6c1", - radix: 16)); -} - -testModInverse() { - void test(BigInt x, BigInt m, BigInt expectedResult) { - //print("$x op $m == $expectedResult"); - // Check that expectedResult is an inverse. - assert(expectedResult < m); - // The 1 % m handles the m = 1 special case. - assert((((x % m) * expectedResult) - BigInt.one) % m == BigInt.zero); - - var result = x.modInverse(m); - Expect.equals(expectedResult, result, "$x modinv $m"); - - if (x > m) { - x = x % m; - var result = x.modInverse(m); - Expect.equals(expectedResult, result, "$x modinv $m"); - } - } - - void testThrows(BigInt x, BigInt m) { - // Throws if not co-prime, which is a symmetric property. - Expect.throws(() => x.modInverse(m), null, "$x modinv $m"); - Expect.throws(() => m.modInverse(x), null, "$m modinv $x"); - } - - test(BigInt.one, BigInt.one, BigInt.zero); - - testThrows(BigInt.zero, new BigInt.from(1000000001)); - testThrows(BigInt.two, new BigInt.from(4)); - testThrows(new BigInt.from(99), new BigInt.from(9)); - testThrows(new BigInt.from(19), new BigInt.from(1000000001)); - testThrows(BigInt.parse("123456789012345678901234567890"), - BigInt.parse("123456789012345678901234567899")); - - // Co-prime numbers - test(new BigInt.from(1234567890), new BigInt.from(19), new BigInt.from(11)); - test(new BigInt.from(1234567890), new BigInt.from(1000000001), - new BigInt.from(189108911)); - test(new BigInt.from(19), new BigInt.from(1234567890), - new BigInt.from(519818059)); - test(new BigInt.from(1000000001), new BigInt.from(1234567890), - new BigInt.from(1001100101)); - - test(new BigInt.from(12345), new BigInt.from(12346), new BigInt.from(12345)); - test(new BigInt.from(12345), new BigInt.from(12346), new BigInt.from(12345)); - - test(smallNumber, new BigInt.from(137), new BigInt.from(42)); - test(new BigInt.from(137), smallNumber, new BigInt.from(856087223)); - test(mediumNumber, new BigInt.from(137), new BigInt.from(77)); - test(new BigInt.from(137), mediumNumber, new BigInt.from(540686667207353)); - test(bigNumber, new BigInt.from(137), new BigInt.from(128)); - var x = BigInt.parse( - "28ea16430c1f1072754aa5ebbfda0d790605a507c6c9758e88697b0b5dd9e74c", - radix: 16); - var m = BigInt.parse( - "fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f", - radix: 16); - var r = BigInt.parse( - "95929095851002583825372225918533539673793386278" - "360575987103577151530201707061", - radix: 10); - test(x, m, r); -} - -testGcd() { - // Call testFunc with all combinations and orders of plus/minus - // value and other. - void callCombos( - BigInt value, BigInt other, void testFunc(BigInt a, BigInt b)) { - testFunc(value, other); - testFunc(value, -other); - testFunc(-value, other); - testFunc(-value, -other); - if (value == other) return; - testFunc(other, value); - testFunc(other, -value); - testFunc(-other, value); - testFunc(-other, -value); - } - - // Test that gcd of value and other (non-negative) is expectedResult. - // Tests all combinations of positive and negative values and order of - // operands, so use positive values and order is not important. - void test(BigInt value, BigInt other, BigInt expectedResult) { - // Check for bug in test. - assert( - expectedResult == BigInt.zero || value % expectedResult == BigInt.zero); - assert( - expectedResult == BigInt.zero || other % expectedResult == BigInt.zero); - - callCombos(value, other, (BigInt a, BigInt b) { - var result = a.gcd(b); - - /// Check that the result is a divisor. - Expect.equals( - BigInt.zero, result == BigInt.zero ? a : a % result, "$result | $a"); - Expect.equals( - BigInt.zero, result == BigInt.zero ? b : b % result, "$result | $b"); - // Check for bug in test. If assert fails, the expected value is too low, - // and the gcd call has found a greater common divisor. - assert(result >= expectedResult); - Expect.equals(expectedResult, result, "$a.gcd($b)"); - }); - } - - // Test that gcd of value and other (non-negative) throws. - testThrows(value, other) { - callCombos(value, other, (a, b) { - Expect.throws(() => a.gcd(b), null, "$a.gcd($b)"); - }); - } - - // Format: - // test(value1, value2, expectedResult); - test(BigInt.one, BigInt.one, BigInt.one); // both are 1 - test(BigInt.one, BigInt.two, BigInt.one); // one is 1 - test(new BigInt.from(3), new BigInt.from(5), BigInt.one); // coprime. - test(new BigInt.from(37), new BigInt.from(37), - new BigInt.from(37)); // Same larger prime. - - test(new BigInt.from(9999), new BigInt.from(7272), - new BigInt.from(909)); // Larger numbers - - test(BigInt.zero, new BigInt.from(1000), - new BigInt.from(1000)); // One operand is zero. - test(BigInt.zero, BigInt.zero, BigInt.zero); // Both operands are zero. - - // Multiplying both operands by a number multiplies result by same number. - test(new BigInt.from(693), new BigInt.from(609), new BigInt.from(21)); - test(new BigInt.from(693) << 5, new BigInt.from(609) << 5, - new BigInt.from(21) << 5); - test( - new BigInt.from(693) * new BigInt.from(937), - new BigInt.from(609) * new BigInt.from(937), - new BigInt.from(21) * new BigInt.from(937)); - test( - new BigInt.from(693) * new BigInt.from(pow(2, 32)), - new BigInt.from(609) * new BigInt.from(pow(2, 32)), - new BigInt.from(21) * new BigInt.from(pow(2, 32))); - test( - new BigInt.from(693) * BigInt.two.pow(52), - new BigInt.from(609) * BigInt.two.pow(52), - new BigInt.from(21) * BigInt.two.pow(52)); - test( - new BigInt.from(693) * BigInt.two.pow(53), - new BigInt.from(609) * BigInt.two.pow(53), - new BigInt.from(21) * BigInt.two.pow(53)); // Regression. - test( - new BigInt.from(693) * BigInt.two.pow(99), - new BigInt.from(609) * BigInt.two.pow(99), - new BigInt.from(21) * BigInt.two.pow(99)); - - test(new BigInt.from(1234567890), new BigInt.from(19), BigInt.one); - test(new BigInt.from(1234567890), new BigInt.from(1000000001), BigInt.one); - test(new BigInt.from(19), new BigInt.from(1000000001), new BigInt.from(19)); - - test(new BigInt.from(0x3FFFFFFF), new BigInt.from(0x3FFFFFFF), - new BigInt.from(0x3FFFFFFF)); - test(new BigInt.from(0x3FFFFFFF), new BigInt.from(0x40000000), BigInt.one); - - test(BigInt.two.pow(54), BigInt.two.pow(53), BigInt.two.pow(53)); - - test( - (BigInt.two.pow(52) - BigInt.one) * BigInt.two.pow(14), - (BigInt.two.pow(26) - BigInt.one) * BigInt.two.pow(22), - (BigInt.two.pow(26) - BigInt.one) * BigInt.two.pow(14)); -} - -foo() => BigInt.parse("1234567890123456789"); -bar() => BigInt.parse("12345678901234567890"); - -testSmiOverflow() { - var a = new BigInt.from(1073741823); - var b = new BigInt.from(1073741822); - Expect.equals(new BigInt.from(2147483645), a + b); - a = -new BigInt.from(1000000000); - b = new BigInt.from(1000000001); - Expect.equals(-new BigInt.from(2000000001), a - b); - Expect.equals(-BigInt.parse("1000000001000000000"), a * b); -} - -testBigintAnd() { - var a = BigInt.parse("0x55555555555555555555"); - var b = BigInt.parse("0x33333333333333333333"); - var c = BigInt.parse("0x11111111111111111111"); - Expect.equals(BigInt.zero, BigInt.zero & a); - Expect.equals(BigInt.zero, a & BigInt.zero); - Expect.equals(c, a & b); -} - -testBigintOr() { - var a = BigInt.parse("0x33333333333333333333"); - var b = BigInt.parse("0x55555555555555555555"); - var c = BigInt.parse("0x77777777777777777777"); - Expect.equals(a, BigInt.zero | a); - Expect.equals(a, a | BigInt.zero); - Expect.equals(c, a | b); -} - -testBigintXor() { - var a = BigInt.parse("0x33333333333333333333"); - var b = BigInt.parse("0x55555555555555555555"); - var c = BigInt.parse("0x66666666666666666666"); - Expect.equals(a, BigInt.zero ^ a); - Expect.equals(a, a ^ BigInt.zero); - Expect.equals(c, a ^ b); -} - -testBigintAdd() { - // Bigint and Smi. - var a = BigInt.parse("12345678901234567890"); - var b = BigInt.two; - Expect.equals(BigInt.parse("12345678901234567892"), a + b); - Expect.equals(BigInt.parse("12345678901234567892"), b + a); - // Bigint and Bigint. - a = BigInt.parse("10000000000000000001"); - Expect.equals(BigInt.parse("20000000000000000002"), a + a); - Expect.equals(a, BigInt.zero + a); - Expect.equals(a, a + BigInt.zero); -} - -testBigintSub() { - // Bigint and Smi. - var a = BigInt.parse("12345678901234567890"); - var b = BigInt.two; - Expect.equals(BigInt.parse("12345678901234567888"), a - b); - Expect.equals(-BigInt.parse("12345678901234567888"), b - a); - // Bigint and Bigint. - a = BigInt.parse("10000000000000000001"); - Expect.equals(BigInt.parse("20000000000000000002"), a + a); - Expect.equals(-a, BigInt.zero - a); - Expect.equals(a, a - BigInt.zero); -} - -testBigintMul() { - // Bigint and Smi. - var a = BigInt.parse("12345678901234567890"); - var b = new BigInt.from(10); - Expect.equals(BigInt.parse("123456789012345678900"), a * b); - Expect.equals(BigInt.parse("123456789012345678900"), b * a); - // Bigint and Bigint. - a = BigInt.parse("12345678901234567890"); - b = BigInt.parse("10000000000000000"); - Expect.equals(BigInt.parse("123456789012345678900000000000000000"), a * b); -} - -testBigintTruncDiv() { - var a = BigInt.parse("12345678901234567890"); - var b = new BigInt.from(10); - // Bigint and Smi. - Expect.equals(BigInt.parse("1234567890123456789"), a ~/ b); - Expect.equals(BigInt.zero, b ~/ a); - Expect.equals(new BigInt.from(123456789), - BigInt.parse("123456789012345678") ~/ new BigInt.from(1000000000)); - // TruncDiv as used in toString(). - a = BigInt.parse("4503599627370496"); // 0x10000000000000 - b = new BigInt.from(10000); - Expect.equals(new BigInt.from(450359962737), a ~/ b); - b = new BigInt.from(1000000000); - Expect.equals(new BigInt.from(4503599), a ~/ b); - // Bigint and Bigint. - a = BigInt.parse("12345678901234567890"); - b = BigInt.parse("10000000000000000"); - Expect.equals(new BigInt.from(1234), a ~/ b); - a = BigInt.parse("9173112362840293939050000000000000000"); - b = BigInt.parse("50000000000000000"); - Expect.equals(BigInt.parse("183462247256805878781"), a ~/ b); -} - -testBigintDiv() { - // Bigint and Smi. - Expect.equals(1234567890123456789.1, - BigInt.parse("12345678901234567891") / new BigInt.from(10)); - Expect.equals( - 0.000000001234, new BigInt.from(1234) / new BigInt.from(1000000000000)); - Expect.equals(12345678901234000000.0, - BigInt.parse("123456789012340000000") / new BigInt.from(10)); - // Bigint and Bigint. - var a = BigInt.parse("12345670000000000000"); - var b = BigInt.parse("10000000000000000"); - Expect.equals(1234.567, a / b); -} - -testBigintModulo() { - // Bigint and Smi. - var a = new BigInt.from(1000000000005); - var b = new BigInt.from(10); - Expect.equals(new BigInt.from(5), a % b); - Expect.equals(new BigInt.from(10), b % a); - // Modulo as used in toString(). - a = BigInt.parse("4503599627370496"); // 0x10000000000000 - b = new BigInt.from(10000); - Expect.equals(new BigInt.from(496), a % b); - b = new BigInt.from(1000000000); - Expect.equals(new BigInt.from(627370496), a % b); - // Bigint & Bigint - a = BigInt.parse("10000000000000000001"); - b = BigInt.parse("10000000000000000000"); - Expect.equals(BigInt.one, a % b); - Expect.equals(BigInt.parse("10000000000000000000"), b % a); - a = BigInt.parse("2432363650"); - b = BigInt.parse("2201792050"); - Expect.equals(BigInt.parse("230571600"), a % b); - Expect.equals(BigInt.parse("2201792050"), b % a); -} - -testBigintModPow() { - var x, e, m; - x = new BigInt.from(1234567890); - e = new BigInt.from(1000000001); - m = new BigInt.from(19); - Expect.equals(new BigInt.from(11), x.modPow(e, m)); - x = new BigInt.from(1234567890); - e = new BigInt.from(19); - m = new BigInt.from(1000000001); - Expect.equals(new BigInt.from(122998977), x.modPow(e, m)); - x = new BigInt.from(19); - e = new BigInt.from(1234567890); - m = new BigInt.from(1000000001); - Expect.equals(new BigInt.from(619059596), x.modPow(e, m)); - x = new BigInt.from(19); - e = new BigInt.from(1000000001); - m = new BigInt.from(1234567890); - Expect.equals(new BigInt.from(84910879), x.modPow(e, m)); - x = new BigInt.from(1000000001); - e = new BigInt.from(19); - m = new BigInt.from(1234567890); - Expect.equals(new BigInt.from(872984351), x.modPow(e, m)); - x = new BigInt.from(1000000001); - e = new BigInt.from(1234567890); - m = new BigInt.from(19); - Expect.equals(BigInt.zero, x.modPow(e, m)); - x = BigInt.parse("12345678901234567890"); - e = BigInt.parse("10000000000000000001"); - m = new BigInt.from(19); - Expect.equals(BigInt.two, x.modPow(e, m)); - x = BigInt.parse("12345678901234567890"); - e = new BigInt.from(19); - m = BigInt.parse("10000000000000000001"); - Expect.equals(BigInt.parse("3239137215315834625"), x.modPow(e, m)); - x = new BigInt.from(19); - e = BigInt.parse("12345678901234567890"); - m = BigInt.parse("10000000000000000001"); - Expect.equals(BigInt.parse("4544207837373941034"), x.modPow(e, m)); - x = new BigInt.from(19); - e = BigInt.parse("10000000000000000001"); - m = BigInt.parse("12345678901234567890"); - Expect.equals(BigInt.parse("11135411705397624859"), x.modPow(e, m)); - x = BigInt.parse("10000000000000000001"); - e = new BigInt.from(19); - m = BigInt.parse("12345678901234567890"); - Expect.equals(BigInt.parse("2034013733189773841"), x.modPow(e, m)); - x = BigInt.parse("10000000000000000001"); - e = BigInt.parse("12345678901234567890"); - m = new BigInt.from(19); - Expect.equals(BigInt.one, x.modPow(e, m)); - x = BigInt.parse("12345678901234567890"); - e = new BigInt.from(19); - m = BigInt.parse("10000000000000000001"); - Expect.equals(BigInt.parse("3239137215315834625"), x.modPow(e, m)); - x = BigInt.parse("12345678901234567890"); - e = BigInt.parse("10000000000000000001"); - m = new BigInt.from(19); - Expect.equals(BigInt.two, x.modPow(e, m)); - x = BigInt.parse("123456789012345678901234567890"); - e = BigInt.parse("123456789012345678901234567891"); - m = BigInt.parse("123456789012345678901234567899"); - Expect.equals(BigInt.parse("116401406051033429924651549616"), x.modPow(e, m)); - x = BigInt.parse("123456789012345678901234567890"); - e = BigInt.parse("123456789012345678901234567899"); - m = BigInt.parse("123456789012345678901234567891"); - Expect.equals(BigInt.parse("123456789012345678901234567890"), x.modPow(e, m)); - x = BigInt.parse("123456789012345678901234567899"); - e = BigInt.parse("123456789012345678901234567890"); - m = BigInt.parse("123456789012345678901234567891"); - Expect.equals(BigInt.parse("35088523091000351053091545070"), x.modPow(e, m)); - x = BigInt.parse("123456789012345678901234567899"); - e = BigInt.parse("123456789012345678901234567891"); - m = BigInt.parse("123456789012345678901234567890"); - Expect.equals(BigInt.parse("18310047270234132455316941949"), x.modPow(e, m)); - x = BigInt.parse("123456789012345678901234567891"); - e = BigInt.parse("123456789012345678901234567899"); - m = BigInt.parse("123456789012345678901234567890"); - Expect.equals(BigInt.one, x.modPow(e, m)); - x = BigInt.parse("123456789012345678901234567891"); - e = BigInt.parse("123456789012345678901234567890"); - m = BigInt.parse("123456789012345678901234567899"); - Expect.equals(BigInt.parse("40128068573873018143207285483"), x.modPow(e, m)); - x = BigInt.parse( - "142223781135477974841804437037182877109549636480215350570761436386728140" - "00321219503871352719175100865184619168128345594681547640115731246638"); - e = BigInt.parse( - "688057170495263083245752731085731160016625265771524738691797062279575950" - "919479651156310413084174304361991240273181430924411258203766946639349880" - "404106504114953688890200429043051936362182997575167191584461538746041795" - "019663740246921124383173799957296515067912829778249931473903780958741032" - "64534184571632120755"); - m = BigInt.parse( - "144173682842817587002196172066264549138375068078359231382946906898412792" - "452632726597279520229873489736777248181678202636100459215718497240474064" - "366927544074501134727745837254834206456400508719134610847814227274992298" - "238973375146473350157304285346424982280927848339601514720098577525635486" - "320547905945936448443"); - Expect.equals( - BigInt.parse( - "41228476947144730491819644448449646627743926889389391986712371102685" - "14984467753960109321610008533258676279344318597060690521027646613453" - "25674994677820913027869835916005689276806408148698486814119894325284" - "18918299321385420296108046942018595594076729397423805685944237555128" - "652606412065971965116137839721723231"), - x.modPow(e, m)); -} - -testBigintModInverse() { - var x, m; - x = BigInt.one; - m = BigInt.one; - Expect.equals(BigInt.zero, x.modInverse(m)); - x = BigInt.zero; - m = new BigInt.from(1000000001); - Expect.throws(() => x.modInverse(m), (e) => e is Exception); // Not coprime. - x = new BigInt.from(1234567890); - m = new BigInt.from(19); - Expect.equals(new BigInt.from(11), x.modInverse(m)); - x = new BigInt.from(1234567890); - m = new BigInt.from(1000000001); - Expect.equals(new BigInt.from(189108911), x.modInverse(m)); - x = new BigInt.from(19); - m = new BigInt.from(1000000001); - Expect.throws(() => x.modInverse(m), (e) => e is Exception); // Not coprime. - x = new BigInt.from(19); - m = new BigInt.from(1234567890); - Expect.equals(new BigInt.from(519818059), x.modInverse(m)); - x = new BigInt.from(1000000001); - m = new BigInt.from(1234567890); - Expect.equals(new BigInt.from(1001100101), x.modInverse(m)); - x = new BigInt.from(1000000001); - m = new BigInt.from(19); - Expect.throws(() => x.modInverse(m), (e) => e is Exception); // Not coprime. - x = BigInt.parse("12345678901234567890"); - m = new BigInt.from(19); - Expect.equals(new BigInt.from(3), x.modInverse(m)); - x = BigInt.parse("12345678901234567890"); - m = BigInt.parse("10000000000000000001"); - Expect.equals(BigInt.parse("9736746307686209582"), x.modInverse(m)); - x = new BigInt.from(19); - m = BigInt.parse("10000000000000000001"); - Expect.equals(BigInt.parse("6315789473684210527"), x.modInverse(m)); - x = new BigInt.from(19); - m = BigInt.parse("12345678901234567890"); - Expect.equals(BigInt.parse("10396361179987004539"), x.modInverse(m)); - x = BigInt.parse("10000000000000000001"); - m = BigInt.parse("12345678901234567890"); - Expect.equals(BigInt.parse("325004555487045911"), x.modInverse(m)); - x = BigInt.parse("10000000000000000001"); - m = new BigInt.from(19); - Expect.equals(new BigInt.from(7), x.modInverse(m)); - x = BigInt.parse("12345678901234567890"); - m = BigInt.parse("10000000000000000001"); - Expect.equals(BigInt.parse("9736746307686209582"), x.modInverse(m)); - x = BigInt.parse("12345678901234567890"); - m = new BigInt.from(19); - Expect.equals(new BigInt.from(3), x.modInverse(m)); - x = BigInt.parse("123456789012345678901234567890"); - m = BigInt.parse("123456789012345678901234567899"); - Expect.throws(() => x.modInverse(m), (e) => e is Exception); // Not coprime. - x = BigInt.parse("123456789012345678901234567890"); - m = BigInt.parse("123456789012345678901234567891"); - Expect.equals( - BigInt.parse("123456789012345678901234567890"), x.modInverse(m)); - x = BigInt.parse("123456789012345678901234567899"); - m = BigInt.parse("123456789012345678901234567891"); - Expect.equals(BigInt.parse("77160493132716049313271604932"), x.modInverse(m)); - x = BigInt.parse("123456789012345678901234567899"); - m = BigInt.parse("123456789012345678901234567890"); - Expect.throws(() => x.modInverse(m), (e) => e is Exception); // Not coprime. - x = BigInt.parse("123456789012345678901234567891"); - m = BigInt.parse("123456789012345678901234567890"); - Expect.equals(BigInt.one, x.modInverse(m)); - x = BigInt.parse("123456789012345678901234567891"); - m = BigInt.parse("123456789012345678901234567899"); - Expect.equals(BigInt.parse("46296295879629629587962962962"), x.modInverse(m)); -} - -testBigintGcd() { - var x, m; - x = BigInt.one; - m = BigInt.one; - Expect.equals(BigInt.one, x.gcd(m)); - x = new BigInt.from(693); - m = new BigInt.from(609); - Expect.equals(new BigInt.from(21), x.gcd(m)); - x = new BigInt.from(693) << 40; - m = new BigInt.from(609) << 40; - Expect.equals(new BigInt.from(21) << 40, x.gcd(m)); - x = new BigInt.from(609) << 40; - m = new BigInt.from(693) << 40; - Expect.equals(new BigInt.from(21) << 40, x.gcd(m)); - x = BigInt.zero; - m = new BigInt.from(1000000001); - Expect.equals(m, x.gcd(m)); - x = new BigInt.from(1000000001); - m = BigInt.zero; - Expect.equals(x, x.gcd(m)); - x = BigInt.zero; - m = -new BigInt.from(1000000001); - Expect.equals(-m, x.gcd(m)); - x = -new BigInt.from(1000000001); - m = BigInt.zero; - Expect.equals(-x, x.gcd(m)); - x = BigInt.zero; - m = BigInt.zero; - Expect.equals(BigInt.zero, x.gcd(m)); - x = BigInt.zero; - m = BigInt.parse("123456789012345678901234567890"); - Expect.equals(m, x.gcd(m)); - x = BigInt.parse("123456789012345678901234567890"); - m = BigInt.zero; - Expect.equals(x, x.gcd(m)); - x = BigInt.zero; - m = -BigInt.parse("123456789012345678901234567890"); - Expect.equals(-m, x.gcd(m)); - x = -BigInt.parse("123456789012345678901234567890"); - m = BigInt.zero; - Expect.equals(-x, x.gcd(m)); - x = new BigInt.from(1234567890); - m = new BigInt.from(19); - Expect.equals(BigInt.one, x.gcd(m)); - x = new BigInt.from(1234567890); - m = new BigInt.from(1000000001); - Expect.equals(BigInt.one, x.gcd(m)); - x = new BigInt.from(19); - m = new BigInt.from(1000000001); - Expect.equals(new BigInt.from(19), x.gcd(m)); - x = new BigInt.from(19); - m = new BigInt.from(1234567890); - Expect.equals(BigInt.one, x.gcd(m)); - x = new BigInt.from(1000000001); - m = new BigInt.from(1234567890); - Expect.equals(BigInt.one, x.gcd(m)); - x = new BigInt.from(1000000001); - m = new BigInt.from(19); - Expect.equals(new BigInt.from(19), x.gcd(m)); - x = BigInt.parse("12345678901234567890"); - m = new BigInt.from(19); - Expect.equals(BigInt.one, x.gcd(m)); - x = BigInt.parse("12345678901234567890"); - m = BigInt.parse("10000000000000000001"); - Expect.equals(BigInt.one, x.gcd(m)); - x = new BigInt.from(19); - m = BigInt.parse("10000000000000000001"); - Expect.equals(BigInt.one, x.gcd(m)); - x = new BigInt.from(19); - m = BigInt.parse("12345678901234567890"); - Expect.equals(BigInt.one, x.gcd(m)); - x = BigInt.parse("10000000000000000001"); - m = BigInt.parse("12345678901234567890"); - Expect.equals(BigInt.one, x.gcd(m)); - x = BigInt.parse("10000000000000000001"); - m = new BigInt.from(19); - Expect.equals(BigInt.one, x.gcd(m)); - x = BigInt.parse("12345678901234567890"); - m = BigInt.parse("10000000000000000001"); - Expect.equals(BigInt.one, x.gcd(m)); - x = BigInt.parse("12345678901234567890"); - m = new BigInt.from(19); - Expect.equals(BigInt.one, x.gcd(m)); - x = BigInt.parse("123456789012345678901234567890"); - m = BigInt.parse("123456789012345678901234567899"); - Expect.equals(new BigInt.from(9), x.gcd(m)); - x = BigInt.parse("123456789012345678901234567890"); - m = BigInt.parse("123456789012345678901234567891"); - Expect.equals(BigInt.one, x.gcd(m)); - x = BigInt.parse("123456789012345678901234567899"); - m = BigInt.parse("123456789012345678901234567891"); - Expect.equals(BigInt.one, x.gcd(m)); - x = BigInt.parse("123456789012345678901234567899"); - m = BigInt.parse("123456789012345678901234567890"); - Expect.equals(new BigInt.from(9), x.gcd(m)); - x = BigInt.parse("123456789012345678901234567891"); - m = BigInt.parse("123456789012345678901234567890"); - Expect.equals(BigInt.one, x.gcd(m)); - x = BigInt.parse("123456789012345678901234567891"); - m = BigInt.parse("123456789012345678901234567899"); - Expect.equals(BigInt.one, x.gcd(m)); -} - -testBigintNegate() { - var a = BigInt.parse("0xF000000000000000F"); - var b = ~a; // negate. - Expect.equals(BigInt.parse("-0xF0000000000000010"), b); - Expect.equals(BigInt.zero, a & b); - Expect.equals(-BigInt.one, a | b); -} - -testShiftAmount() { - Expect.equals(BigInt.zero, BigInt.zero << 0); - Expect.equals(BigInt.zero, BigInt.zero >> 0); - Expect.equals(BigInt.zero, BigInt.zero << 1234567890); - Expect.equals(BigInt.zero, BigInt.zero >> 1234567890); - Expect.equals(BigInt.two.pow(999), BigInt.one << 999); - Expect.equals(BigInt.one, BigInt.two.pow(999) >> 999); - // 0x7FFFFFFFFFFFFFFF on VM, slightly rounded up on web platform. - const int maxInt64 = 0x7FFFFFFFFFFFF000 + 0xFFF; - Expect.equals(BigInt.zero, new BigInt.from(12) >> maxInt64); - Expect.equals(-BigInt.one, -new BigInt.from(12) >> maxInt64); - bool exceptionCaught = false; - try { - var a = BigInt.one << maxInt64; - } on OutOfMemoryError catch (e) { - exceptionCaught = true; - } catch (e) { - // In JavaScript the allocation of the internal array throws different - // kind of errors. Just assume it's the right one. - exceptionCaught = true; - } - Expect.equals(true, exceptionCaught); -} - -void testPow() { - Expect.throws(() => BigInt.zero.pow(-1), (e) => e is ArgumentError); - Expect.throws(() => BigInt.one.pow(-1), (e) => e is ArgumentError); - Expect.equals(BigInt.one, BigInt.zero.pow(0)); - Expect.equals(BigInt.one, BigInt.one.pow(0)); - Expect.equals(BigInt.one, BigInt.two.pow(0)); - - Expect.equals( - BigInt.parse("6208695403009031808124000434786599466508260573005" - "3508480680160632742505079094163654310415168343540278191693" - "5380629274547924077088101599462083663373536705603680787010" - "0454231036999140164473780469056908670815701571304455697970" - "9971709527651446612272365411298758026041094781651768636427" - "4780767345075500515905845436036697865291662016364446907149" - "5652136304764312997430969058854587555188117728022873502683" - "6327099687782677885098446991121805146733387058565662606025" - "2854981418159051193843689364388302820905062090182919338371" - "8783490348348213313279505263650976040646393394551465619437" - "7126646818740571207346633109049097273375955956480091920939" - "5595130499375022416542475049562151695680373438890512164488" - "6567991220660935537691145761690539808578087290707813875567" - "9145826183642842261374804672283964244725240865733938342036" - "1216219271232461693264437901347421563392441043817990067322" - "88"), - BigInt.parse("90218646930912603144382974164422").pow(27)); - ; -} - -void testToRadixString() { - // Test that we accept radix 2 to 36 and that we use lower-case - // letters. - var expected = [ - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', // - 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', // - 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' // - ]; - for (var radix = 2; radix <= 36; radix++) { - for (var i = 0; i < radix; i++) { - Expect.equals(expected[i], new BigInt.from(i).toRadixString(radix)); - } - } - - // Try large numbers (regression test for issue 15316). - var bignums = [ - BigInt.parse("0x8"), - BigInt.parse("0x80"), - BigInt.parse("0x80000000"), - BigInt.parse("0x100000000"), - BigInt.parse("0x10000000000000"), - BigInt.parse("0x10000000000001"), // 53 significant bits. - BigInt.parse("0x20000000000000"), - BigInt.parse("0x20000000000002"), - BigInt.parse("0x1000000000000000"), - BigInt.parse("0x1000000000000100"), - BigInt.parse("0x2000000000000000"), - BigInt.parse("0x2000000000000200"), - BigInt.parse("0x8000000000000000"), - BigInt.parse("0x8000000000000800"), - BigInt.parse("0x10000000000000000"), - BigInt.parse("0x10000000000001000"), - BigInt.parse("0x100000000000010000"), - BigInt.parse("0x1000000000000100000"), - BigInt.parse("0x10000000000001000000"), - BigInt.parse("0x100000000000010000000"), - BigInt.parse("0x1000000000000100000000"), - BigInt.parse("0x10000000000001000000000"), - ]; - for (var bignum in bignums) { - for (int radix = 2; radix <= 36; radix++) { - String digits = bignum.toRadixString(radix); - BigInt result = BigInt.parse(digits, radix: radix); - Expect.equals( - bignum, result, "${bignum.toRadixString(16)} -> $digits/$radix"); - } - } - - const illegalRadices = [-2, -1, 0, 1, 37]; - for (final bignum in bignums) { - for (final radix in illegalRadices) { - try { - bignum.toRadixString(radix); - Expect.fail("Exception expected for .toRadixString($radix)"); - } on ArgumentError catch (e) { - // Nothing to do. - } - } - } -} - -testToString() { - /// Test that converting [value] to a string gives [expect]. - /// Also test that `-value` gives `"-"+expect`. - test(BigInt value, String expect) { - Expect.equals(expect, value.toString()); - Expect.equals(expect, "$value"); - Expect.equals(expect, (new StringBuffer()..write(value)).toString()); - if (value == BigInt.zero) return; - expect = "-$expect"; - value = -value; - Expect.equals(expect, value.toString()); - Expect.equals(expect, "$value"); - Expect.equals(expect, (new StringBuffer()..write(value)).toString()); - } - - // Very simple tests. - test(BigInt.zero, "0"); - test(BigInt.one, "1"); - test(BigInt.two, "2"); - test(new BigInt.from(5), "5"); - - // Binary special cases. - - // ~2^30. - test(BigInt.parse("0x3fffffff"), "1073741823"); - test(BigInt.parse("0x40000000"), "1073741824"); - test(BigInt.parse("0x40000001"), "1073741825"); - // ~2^31. - test(BigInt.parse("0x7fffffff"), "2147483647"); - test(BigInt.parse("0x80000000"), "2147483648"); - test(BigInt.parse("0x80000001"), "2147483649"); - // ~2^32. - test(BigInt.parse("0xffffffff"), "4294967295"); - test(BigInt.parse("0x100000000"), "4294967296"); - test(BigInt.parse("0x100000001"), "4294967297"); - - // ~2^51. - test(BigInt.parse("0x7ffffffffffff"), "2251799813685247"); - test(BigInt.parse("0x8000000000000"), "2251799813685248"); - test(BigInt.parse("0x8000000000001"), "2251799813685249"); - // ~2^52. - test(BigInt.parse("0xfffffffffffff"), "4503599627370495"); - test(BigInt.parse("0x10000000000000"), "4503599627370496"); - test(BigInt.parse("0x10000000000001"), "4503599627370497"); - // ~2^53. - test(BigInt.parse("0x1fffffffffffff"), "9007199254740991"); - test(BigInt.parse("0x20000000000000"), "9007199254740992"); - test(BigInt.parse("0x20000000000001"), "9007199254740993"); - // ~2^62. - test(BigInt.parse("0x3fffffffffffffff"), "4611686018427387903"); - test(BigInt.parse("0x4000000000000000"), "4611686018427387904"); - test(BigInt.parse("0x4000000000000001"), "4611686018427387905"); - // ~2^63. - test(BigInt.parse("0x7fffffffffffffff"), "9223372036854775807"); - test(BigInt.parse("0x8000000000000000"), "9223372036854775808"); - test(BigInt.parse("0x8000000000000001"), "9223372036854775809"); - // ~2^64. - test(BigInt.parse("0xffffffffffffffff"), "18446744073709551615"); - test(BigInt.parse("0x10000000000000000"), "18446744073709551616"); - test(BigInt.parse("0x10000000000000001"), "18446744073709551617"); - // Big bignum. - test(BigInt.parse("123456789012345678901234567890"), - "123456789012345678901234567890"); - - // Decimal special cases. - - BigInt number = new BigInt.from(10); - // Numbers 99..99, 100...00, and 100..01 up to 23 digits. - for (int i = 1; i < 22; i++) { - test(number - BigInt.one, "9" * i); - test(number, "1" + "0" * i); - test(number + BigInt.one, "1" + "0" * (i - 1) + "1"); - number *= new BigInt.from(10); - } -} - -void testFromToInt() { - void test(int x) { - var bigFrom = new BigInt.from(x); - var bigStr = bigFrom.toString(); - Expect.equals(x, bigFrom.toInt()); - Expect.equals(x, int.parse(bigStr)); - } - - for (int i = 0; i < 20; i++) { - test(i); - // Dart2js doesn't know that -0 should stay 0. - if (i != 0) test(-i); - } - - // For now just test "easy" integers since there is no check yet that clamps - // the returned integer. - for (int i = 0; i < 2000000; i += 10000) { - test(i); - // Dart2js doesn't know that -0 should stay 0. - if (i != 0) test(-i); - } - - const minInt64 = -0x80000000 * 0x100000000; - test(minInt64); -} - -void testFromToDouble() { - Expect.equals(-1.0, (-BigInt.one).toDouble()); - - Expect.throws(() => new BigInt.from(double.nan)); - Expect.throws(() => new BigInt.from(double.infinity)); - Expect.throws(() => new BigInt.from(-double.infinity)); - - const double maxDouble = 1.7976931348623157e+308; - const String maxDoubleHexStr = "0xfffffffffffff8000000000000000" - "00000000000000000000000000000000000000000000000000000000000000" - "00000000000000000000000000000000000000000000000000000000000000" - "00000000000000000000000000000000000000000000000000000000000000" - "00000000000000000000000000000000000000000"; - - // The following value lies directly on the boundary between max double and - // infinity. It rounds to infinity. Any value below rounds to a finite double - // value. - const String maxDoubleBoundaryStr = "0xfffffffffffffc0000000000" - "00000000000000000000000000000000000000000000000000000000000000" - "00000000000000000000000000000000000000000000000000000000000000" - "00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000"; - - var bigMax = BigInt.parse(maxDoubleHexStr); - var bigBoundary = BigInt.parse(maxDoubleBoundaryStr); - Expect.equals(maxDouble, bigMax.toDouble()); - Expect.equals(bigMax, new BigInt.from(maxDouble)); - Expect.equals(double.infinity, bigBoundary.toDouble()); - Expect.equals(maxDouble, (bigBoundary - BigInt.one).toDouble()); - - Expect.equals(-maxDouble, (-bigMax).toDouble()); - Expect.equals(-bigMax, new BigInt.from(-maxDouble)); - Expect.equals(-double.infinity, (-bigBoundary).toDouble()); - Expect.equals(-maxDouble, (-(bigBoundary - BigInt.one)).toDouble()); - - void test(int x) { - var str = x.toString(); - var big = BigInt.parse(str); - Expect.equals(x, big.toDouble()); - } - - for (int i = 0; i < 20; i++) { - test(i); - // Dart2js doesn't know that -0 should stay 0. - if (i != 0) test(-i); - } - - for (int i = 0; i < 2000000; i += 10000) { - test(i); - // Dart2js doesn't know that -0 should stay 0. - if (i != 0) test(-i); - } - - for (int i = 1000; i < 100000; i += 1000) { - var d = 1 / i; - Expect.equals(BigInt.zero, new BigInt.from(d)); - } - - // Non-integer values are truncated. - Expect.equals(BigInt.one, new BigInt.from(1.5)); - Expect.equals(-BigInt.one, new BigInt.from(-1.5)); - - Expect.equals(BigInt.zero, new BigInt.from(0.9999999999999999)); - Expect.equals(BigInt.zero, new BigInt.from(-0.9999999999999999)); - - // Regression test for http://dartbug.com/41819 - // Rounding edge case where last digit causes rounding. - Expect.equals(-3.69616463331328e+27, - BigInt.parse("-3696164633313280000000000000").toDouble()); - Expect.equals(-3.6961646333132803e+27, - BigInt.parse("-3696164633313280000000000001").toDouble()); -} - -main() { - for (int i = 0; i < 8; i++) { - Expect.equals(BigInt.parse("1234567890123456789"), foo()); //# 01: ok - Expect.equals(BigInt.parse("12345678901234567890"), bar()); //# 02: ok - testModPow(); //# 03: ok - testModInverse(); //# 04: ok - testGcd(); //# 05: ok - testSmiOverflow(); //# 06: ok - testBigintAnd(); //# 07: ok - testBigintOr(); //# 08: ok - testBigintXor(); //# 09: ok - testBigintAdd(); //# 10: ok - testBigintSub(); //# 11: ok - testBigintMul(); //# 12: ok - testBigintTruncDiv(); //# 12: ok - testBigintDiv(); //# 13: ok - testBigintModulo(); //# 14: ok - testBigintModPow(); //# 15: ok - testBigintModInverse(); //# 16: ok - testBigintGcd(); //# 17: ok - testBigintNegate(); //# 18: ok - testShiftAmount(); //# 19: ok - testPow(); //# 20: ok - testToRadixString(); //# 21: ok - testToString(); //# 22: ok - testFromToInt(); //# 23: ok - testFromToDouble(); //# 24: ok - Expect.equals(BigInt.parse("12345678901234567890"), //# 25: ok - BigInt.parse("12345678901234567890").abs()); //# 25: ok - Expect.equals(BigInt.parse("12345678901234567890"), //# 26: ok - BigInt.parse("-12345678901234567890").abs()); //# 26: ok - var a = BigInt.parse("10000000000000000000"); //# 27: ok - var b = BigInt.parse("10000000000000000001"); //# 27: ok - Expect.equals(false, a.hashCode == b.hashCode); //# 27: ok - Expect.equals(true, a.hashCode == (b - BigInt.one).hashCode); //# 27: ok - - // Regression test for http://dartbug.com/36105 - var overbig = -BigInt.from(10).pow(309); - Expect.equals(overbig.toDouble(), double.negativeInfinity); - } -} diff --git a/tests/corelib_2/bit_twiddling_test.dart b/tests/corelib_2/bit_twiddling_test.dart deleted file mode 100644 index 51aea1b70c5..00000000000 --- a/tests/corelib_2/bit_twiddling_test.dart +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) 2013, 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. -// Testing int.bitLength, int.toUnsigned and int.toSigned. - -// @dart = 2.9 - -library bit_twiddling_test; - -import "package:expect/expect.dart"; - -testBitLength() { - check(int i, width) { - Expect.equals(width, i.bitLength, '$i.bitLength == $width'); - // (~i) written as (-i-1) to avoid issues with limited range of dart2js ops. - Expect.equals(width, (-i - 1).bitLength, '(~$i).bitLength == $width'); - } - - check(0, 0); - check(1, 1); - check(2, 2); - check(3, 2); - check(4, 3); - check(5, 3); - check(6, 3); - check(7, 3); - check(8, 4); - check(127, 7); - check(128, 8); - check(129, 8); - check(2147483646, 31); - check(2147483647, 31); - check(2147483648, 32); - check(2147483649, 32); - check(4294967295, 32); - check(4294967296, 33); - check(0xffffffffff, 40); - check(0xfffffffffff, 44); - check(0xffffffffffff, 48); - check(0x1000000000000, 49); - check(0x1000000000001, 49); - check(0x1ffffffffffff, 49); - check(0x2000000000000, 50); - check(0x2000000000001, 50); - - check(0xffffffffffffff, 56); // //# int64: ok - check(0x7fffffffffffffff, 63); // //# int64: continued - check(0xffffffffffffffff, 0); // //# int64: continued -} - -testToUnsigned() { - checkU(src, width, expected) { - Expect.equals(expected, src.toUnsigned(width)); - } - - checkU(1, 8, 1); - checkU(0xff, 8, 0xff); - checkU(0xffff, 8, 0xff); - checkU(-1, 8, 0xff); - checkU(0xffffffff, 32, 0xffffffff); - - checkU(0x7fffffff, 30, 0x3fffffff); - checkU(0x7fffffff, 31, 0x7fffffff); - checkU(0x7fffffff, 32, 0x7fffffff); - checkU(0x80000000, 30, 0); - checkU(0x80000000, 31, 0); - checkU(0x80000000, 32, 0x80000000); - checkU(0xffffffff, 30, 0x3fffffff); - checkU(0xffffffff, 31, 0x7fffffff); - checkU(0xffffffff, 32, 0xffffffff); - checkU(0x100000000, 30, 0); - checkU(0x100000000, 31, 0); - checkU(0x100000000, 32, 0); - checkU(0x1ffffffff, 30, 0x3fffffff); - checkU(0x1ffffffff, 31, 0x7fffffff); - checkU(0x1ffffffff, 32, 0xffffffff); - - checkU(-1, 0, 0); - checkU(0, 0, 0); - checkU(1, 0, 0); - checkU(2, 0, 0); - checkU(3, 0, 0); - - checkU(-1, 1, 1); - checkU(0, 1, 0); - checkU(1, 1, 1); - checkU(2, 1, 0); - checkU(3, 1, 1); - checkU(4, 1, 0); - - checkU(-1, 2, 3); - checkU(0, 2, 0); - checkU(1, 2, 1); - checkU(2, 2, 2); - checkU(3, 2, 3); - checkU(4, 2, 0); - - checkU(-1, 3, 7); - checkU(0, 3, 0); - checkU(1, 3, 1); - checkU(2, 3, 2); - checkU(3, 3, 3); - checkU(4, 3, 4); - - checkU(0x0100000000000001, 2, 1); // //# int64: continued - checkU(0x0200000000000001, 60, 0x200000000000001); // //# int64: continued - checkU(0x0200000000000001, 59, 0x200000000000001); // //# int64: continued - checkU(0x0200000000000001, 58, 0x200000000000001); // //# int64: continued - checkU(0x0200000000000001, 57, 1); // //# int64: continued - - checkU(0x8100000000000001, 2, 1); // //# int64: continued - checkU(0x8200000000000001, 60, 0x200000000000001); // //# int64: continued - checkU(0x8200000000000001, 59, 0x200000000000001); // //# int64: continued - checkU(0x8200000000000001, 58, 0x200000000000001); // //# int64: continued - checkU(0x8200000000000001, 57, 1); // //# int64: continued -} - -testToSigned() { - checkS(src, width, expected) { - Expect.equals( - expected, src.toSigned(width), '$src.toSigned($width) == $expected'); - } - - checkS(1, 8, 1); - checkS(0xff, 8, -1); - checkS(0xffff, 8, -1); - checkS(-1, 8, -1); - checkS(128, 8, -128); - checkS(0xffffffff, 32, -1); - - checkS(0x7fffffff, 30, -1); - checkS(0x7fffffff, 31, -1); - checkS(0x7fffffff, 32, 0x7fffffff); - checkS(0x80000000, 30, 0); - checkS(0x80000000, 31, 0); - checkS(0x80000000, 32, -2147483648); - checkS(0xffffffff, 30, -1); - checkS(0xffffffff, 31, -1); - checkS(0xffffffff, 32, -1); - - checkS(0x100000000, 30, 0); - checkS(0x100000000, 31, 0); - checkS(0x100000000, 32, 0); - checkS(0x1ffffffff, 30, -1); - checkS(0x1ffffffff, 31, -1); - checkS(0x1ffffffff, 32, -1); - - checkS(-1, 1, -1); - checkS(0, 1, 0); - checkS(1, 1, -1); // The only bit is the sign bit. - checkS(2, 1, 0); - checkS(3, 1, -1); - checkS(4, 1, 0); - - checkS(-1, 2, -1); - checkS(0, 2, 0); - checkS(1, 2, 1); - checkS(2, 2, -2); - checkS(3, 2, -1); - checkS(4, 2, 0); - - checkS(-1, 3, -1); - checkS(0, 3, 0); - checkS(1, 3, 1); - checkS(2, 3, 2); - checkS(3, 3, 3); - checkS(4, 3, -4); - - checkS(0x0100000000000001, 2, 1); // //# int64: continued - checkS(0x0200000000000001, 60, 0x200000000000001); // //# int64: continued - checkS(0x0200000000000001, 59, 0x200000000000001); // //# int64: continued - checkS(0x0200000000000001, 58, -0x200000000000000 + 1); // //# int64: continued - checkS(0x0200000000000001, 57, 1); // //# int64: continued - - checkS(0x8100000000000001, 2, 1); // //# int64: continued - checkS(0x8200000000000001, 60, 0x200000000000001); // //# int64: continued - checkS(0x8200000000000001, 59, 0x200000000000001); // //# int64: continued - checkS(0x8200000000000001, 58, -0x200000000000000 + 1); // //# int64: continued - checkS(0x8200000000000001, 57, 1); // //# int64: continued -} - -main() { - testBitLength(); - testToUnsigned(); - testToSigned(); -} diff --git a/tests/corelib_2/bool_from_environment2_test.dart b/tests/corelib_2/bool_from_environment2_test.dart deleted file mode 100644 index c0e7415777e..00000000000 --- a/tests/corelib_2/bool_from_environment2_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2013, 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() { - const bool.fromEnvironment('NOT_FOUND', defaultValue: ''); // //# 01: compile-time error - const bool.fromEnvironment('NOT_FOUND', defaultValue: 1); // //# 02: compile-time error - const bool.fromEnvironment(null); // //# 03: compile-time error - const bool.fromEnvironment(1); // //# 04: compile-time error - const bool.fromEnvironment([]); // //# 05: compile-time error -} diff --git a/tests/corelib_2/bool_from_environment_test.dart b/tests/corelib_2/bool_from_environment_test.dart deleted file mode 100644 index 24788fff248..00000000000 --- a/tests/corelib_2/bool_from_environment_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2013, 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. -// SharedOptions=-Da=true -Db=false -Dc=NOTBOOL -Dd=True - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - Expect.isTrue(const bool.fromEnvironment('a')); - Expect.isFalse(const bool.fromEnvironment('b')); - Expect.isTrue(const bool.fromEnvironment('c', defaultValue: true)); - Expect.isFalse(const bool.fromEnvironment('c', defaultValue: false)); - Expect.isFalse(const bool.fromEnvironment('d', defaultValue: false)); - Expect.equals(const bool.fromEnvironment('dart.isVM'), !identical(1.0, 1)); -} diff --git a/tests/corelib_2/bool_hashcode_test.dart b/tests/corelib_2/bool_hashcode_test.dart deleted file mode 100644 index 3bc82f2b2c9..00000000000 --- a/tests/corelib_2/bool_hashcode_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class BoolHashCodeTest { - static testMain() { - Expect.notEquals(true.hashCode, false.hashCode); - } -} - -main() { - BoolHashCodeTest.testMain(); -} diff --git a/tests/corelib_2/bool_operator_test.dart b/tests/corelib_2/bool_operator_test.dart deleted file mode 100644 index ffbcb1b64b6..00000000000 --- a/tests/corelib_2/bool_operator_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -main() { - void test(bool b1, bool b2) { - var and1 = b1 && b2; - var and2 = b1 & b2; - var and3 = b1 ? b2 ? true : false : false; - var or1 = b1 || b2; - var or2 = b1 | b2; - var or3 = b1 ? true : b2 ? true : false; - var xor1 = b1 != b2; - var xor2 = b1 ^ b2; - var xor3 = b1 ? b2 ? false : true : b2 ? true : false; - var nb1 = !b1; - var nb2 = !b2; - Expect.equals(and3, and1); - Expect.equals(and3, and2); - Expect.equals(or3, or1); - Expect.equals(or3, or2); - Expect.equals(xor3, xor1); - Expect.equals(xor3, xor2); - Expect.notEquals(nb1, b1); - Expect.notEquals(nb2, b2); - } - - test(true, false); - test(true, true); - test(false, true); - test(false, false); - - Expect.isTrue(true || (throw "unreachable")); - Expect.throws(() => false || (throw "unreachable")); - - Expect.isFalse(false && (throw "unreachable")); - Expect.throws(() => true && (throw "unreachable")); - - Expect.throws(() => true | (throw "unreachable")); - Expect.throws(() => false | (throw "unreachable")); - - Expect.throws(() => true & (throw "unreachable")); - Expect.throws(() => false & (throw "unreachable")); -} diff --git a/tests/corelib_2/cast_helper.dart b/tests/corelib_2/cast_helper.dart deleted file mode 100644 index bb139872e85..00000000000 --- a/tests/corelib_2/cast_helper.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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. - -// @dart = 2.9 - -final elements = [c, d, e, f, null]; - -class C {} - -class D extends C {} - -class E extends C {} - -class F implements D, E {} - -final c = C(); -final d = D(); -final e = E(); -final f = F(); diff --git a/tests/corelib_2/cast_iterable_test.dart b/tests/corelib_2/cast_iterable_test.dart deleted file mode 100644 index 4b01e02e801..00000000000 --- a/tests/corelib_2/cast_iterable_test.dart +++ /dev/null @@ -1,70 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "dart:collection"; -import "package:expect/expect.dart"; -import 'cast_helper.dart'; - -void main() { - testDowncastDirectAccess(); - testDowncastNoDirectAccess(); - testDowncastUntouchableElements(); - testUpcast(); -} - -void testDowncastDirectAccess() { - var iterable = new Iterable.generate(elements.length, (n) => elements[n]); - - // An iterable that (likely) can do direct access. - var dIterable = Iterable.castFrom(iterable); - - Expect.throws(() => dIterable.first, null, "direct.first"); - Expect.equals(d, dIterable.elementAt(1)); - Expect.throws(() => dIterable.elementAt(2), null, "direct.2"); // E is not D. - Expect.equals(f, dIterable.skip(3).first); // Skip does not access element. - Expect.equals(null, dIterable.skip(3).elementAt(1)); - - Expect.throws(() => dIterable.toList(), null, "direct.toList"); -} - -void testDowncastNoDirectAccess() { - var iterable = new Iterable.generate(elements.length, (n) => elements[n]); - - // An iterable that cannot do direct access. - var dIterable = Iterable.castFrom(iterable.where((_) => true)); - - Expect.throws(() => dIterable.first, null, "nonDirect.first"); - Expect.equals(d, dIterable.elementAt(1)); - // E is not D. - Expect.throws(() => dIterable.elementAt(2), null, "nonDirect.2"); - Expect.equals(f, dIterable.skip(3).first); // Skip does not access element. - Expect.equals(null, dIterable.skip(3).elementAt(1)); - - Expect.throws(() => dIterable.toList(), null, "nonDirect.toList"); -} - -void testDowncastUntouchableElements() { - // Iterable that definitely won't survive accessing element 3. - var iterable = new Iterable.generate( - elements.length, (n) => n == 3 ? throw "untouchable" : elements[n]); - var dIterable = Iterable.castFrom(iterable); - - Expect.throws(() => dIterable.first, null, "untouchable.first"); - Expect.equals(d, dIterable.elementAt(1)); - Expect.throws(() => dIterable.elementAt(3), null, "untouchable.3"); - // Skip does not access element. - Expect.equals(null, dIterable.skip(4).first); - Expect.equals(null, dIterable.skip(3).elementAt(1)); - - Expect.throws(() => dIterable.toList(), null, "untouchable.toList"); -} - -void testUpcast() { - var iterable = new Iterable.generate(elements.length, (n) => elements[n]); - - var objectIterable = Iterable.castFrom(iterable); - Expect.listEquals(elements, objectIterable.toList()); -} diff --git a/tests/corelib_2/cast_list_test.dart b/tests/corelib_2/cast_list_test.dart deleted file mode 100644 index 47a1d1d4158..00000000000 --- a/tests/corelib_2/cast_list_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "dart:collection"; -import "package:expect/expect.dart"; -import 'cast_helper.dart'; - -void main() { - testDowncast(); - testUpcast(); - testRegression(); -} - -void testDowncast() { - var list = new List.from(elements); - var dList = List.castFrom(list); - - Expect.throws(() => dList.first); // C is not D. - Expect.equals(d, dList[1]); - Expect.throws(() => dList[2]); // E is not D. - Expect.equals(f, dList[3]); - Expect.equals(null, dList.last); - - Expect.throws(() => dList.toList()); - - // Setting works. - dList[2] = d; - Expect.equals(d, dList[2]); -} - -void testUpcast() { - var list2 = new List.from(elements); - var dList2 = List.castFrom(list2); - Expect.listEquals(elements, dList2); - Expect.throws(() => dList2[2] = new Object()); // Cannot set non-C. - Expect.listEquals(elements, dList2); -} - -void testRegression() { - var numList = [4, 3, 2, 1]; - var intList = numList.cast(); - intList.sort(null); - Expect.listEquals([1, 2, 3, 4], numList); - Expect.listEquals([1, 2, 3, 4], intList); -} diff --git a/tests/corelib_2/cast_map_test.dart b/tests/corelib_2/cast_map_test.dart deleted file mode 100644 index a662a7dc333..00000000000 --- a/tests/corelib_2/cast_map_test.dart +++ /dev/null @@ -1,64 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "dart:collection"; -import "package:expect/expect.dart"; -import 'cast_helper.dart'; - -void main() { - testDowncast(); - testUpcast(); -} - -void testDowncast() { - var map = new Map.fromIterables(elements, elements); - var dMap = Map.castFrom(map); - - Expect.isTrue(dMap is Map); - - Expect.equals(null, dMap[new C()]); - Expect.throws(() => dMap[c]); // C is not D. - Expect.isTrue(dMap.containsKey(c)); // containsKey should not be typed. - Expect.equals(d, dMap[d]); - Expect.throws(() => dMap[e]); // E is not D. - Expect.isTrue(dMap.containsKey(null)); - Expect.equals(null, dMap[null]); - - Expect.equals(5, dMap.length); - Expect.throws(() => dMap.remove(c)); // Removes key but fails to return value. - Expect.equals(4, dMap.length); - Expect.equals(null, dMap[c]); - - // Runtime errors when assigning or accessing a C. - Expect.throws(() => dMap[c] = d); - Expect.throws(() => dMap[d] = c); - Expect.equals(4, dMap.length); - - // Test keys and values. - Expect.isTrue(dMap.keys is Iterable); - Expect.isTrue(dMap.values is Iterable); - Expect.throws(() => dMap.keys.toList()); - Expect.throws(() => dMap.values.toList()); -} - -void testUpcast() { - var map = new Map.fromIterables(elements, elements); - var objectMap = Map.castFrom(map); - - Expect.equals(5, objectMap.length); - Expect.equals(c, objectMap[c]); - Expect.isTrue(objectMap.containsKey(c)); - Expect.equals(c, objectMap.remove(c)); - Expect.equals(4, objectMap.length); - - // Test keys and values. - Expect.isTrue(objectMap.keys is Iterable); - Expect.isTrue(objectMap.values is Iterable); - var expected = new List.from(elements); - expected.remove(c); - Expect.listEquals(expected, objectMap.keys.toList()); - Expect.listEquals(expected, objectMap.values.toList()); -} diff --git a/tests/corelib_2/cast_set_test.dart b/tests/corelib_2/cast_set_test.dart deleted file mode 100644 index 89d38affe0b..00000000000 --- a/tests/corelib_2/cast_set_test.dart +++ /dev/null @@ -1,75 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "dart:collection"; -import "package:expect/expect.dart"; -import 'cast_helper.dart'; - -void main() { - testOrder(); - testDowncast(); - testUpcast(); - testNewSet(); -} - -void testOrder() { - var setEls = new Set.from(elements); // Linked HashSet. - Expect.listEquals(elements, setEls.toList()); // Preserves order. -} - -void testDowncast() { - var setEls = new Set.from(elements); - var dSet = Set.castFrom(setEls); - - // Preserves order. - Expect.throws(() => dSet.first); // C is not D. - Expect.equals(d, dSet.elementAt(1)); - Expect.throws(() => dSet.elementAt(2)); // E is not D. - Expect.equals(f, dSet.elementAt(3)); - Expect.equals(null, dSet.elementAt(4)); - - Expect.throws(() => dSet.toList()); - - // Contains should not be typed. - var newC = new C(); - Expect.isFalse(dSet.contains(newC)); - Expect.throws(() => dSet.add(newC)); - Expect.isFalse(dSet.contains(newC)); - Expect.isTrue(dSet.contains(c)); - - // Remove and length should not be typed. - Expect.equals(5, dSet.length); - dSet.remove(c); // Success, no type checks. - Expect.equals(4, dSet.length); -} - -void testUpcast() { - var setEls = new Set.from(elements); - var objectSet = Set.castFrom(setEls); - - Expect.listEquals(elements, objectSet.toList()); - - var newObject = new Object(); - Expect.throws(() => objectSet.add(newObject)); - Expect.isFalse(objectSet.contains(newObject)); - - var toSet = objectSet.toSet(); - Expect.isTrue(toSet is LinkedHashSet); - Expect.isFalse(toSet is LinkedHashSet); -} - -void testNewSet() { - // Specified custom newSet as empty HashSet. - var setEls = new Set.from(elements); - var customNewSet; - var objectSet2 = Set.castFrom(setEls, - newSet: () => customNewSet = new HashSet()); - - var customToSet = objectSet2.toSet(); - Expect.isTrue(customToSet is HashSet); - Expect.isFalse(customToSet is HashSet); - Expect.identical(customToSet, customNewSet); -} diff --git a/tests/corelib_2/collection_from_test.dart b/tests/corelib_2/collection_from_test.dart deleted file mode 100644 index 4c25fbc2c50..00000000000 --- a/tests/corelib_2/collection_from_test.dart +++ /dev/null @@ -1,95 +0,0 @@ -// 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 collection.from.test; - -import "package:expect/expect.dart"; -import 'dart:collection'; - -main() { - for (Iterable elements in [ - new Set(), - [], - const [], - const {}.keys, - const {}.values, - new Iterable.generate(0), - new Set()..add(1)..add(2)..add(4), - [1, 2, 4], - new Iterable.generate(3, (i) => [1, 2, 4][i]), - const [1, 2, 4], - const {1: 0, 2: 0, 4: 0}.keys, - const {1: 1, 2: 2, 4: 4}.values, - ]) { - int elementCount = elements.length; - check(elements, new List.from(elements)); - check(elements, new List.from(elements)); - check(elements, new List.from(elements)); - check(elements, new List.from(elements, growable: true)); - check(elements, new List.from(elements, growable: true)); - check(elements, new List.from(elements, growable: true)); - check(elements, new List.from(elements, growable: false)); - check(elements, new List.from(elements, growable: false)); - check(elements, new List.from(elements, growable: false)); - check(elements, new Queue.from(elements)); - check(elements, new Queue.from(elements)); - check(elements, new Queue.from(elements)); - check(elements, new ListQueue.from(elements)); - check(elements, new ListQueue.from(elements)); - check(elements, new ListQueue.from(elements)); - check(elements, new DoubleLinkedQueue.from(elements)); - check(elements, new DoubleLinkedQueue.from(elements)); - check(elements, new DoubleLinkedQueue.from(elements)); - check(elements, new Set.from(elements)); - check(elements, new Set.from(elements)); - check(elements, new Set.from(elements)); - check(elements, new HashSet.from(elements)); - check(elements, new HashSet.from(elements)); - check(elements, new HashSet.from(elements)); - check(elements, new LinkedHashSet.from(elements)); - check(elements, new LinkedHashSet.from(elements)); - check(elements, new LinkedHashSet.from(elements)); - check(elements, new SplayTreeSet.from(elements)); - check(elements, new SplayTreeSet.from(elements)); - check(elements, new SplayTreeSet.from(elements)); - // Sanity check that elements didn't change. - Expect.equals(elementCount, elements.length); - - // Lists may be growable or not growable. - { - var list = new List.from(elements, growable: true); - Expect.equals(elementCount, list.length); - list.add(42); - Expect.equals(elementCount + 1, list.length); - } - { - var list = new List.from(elements); - Expect.equals(elementCount, list.length); - list.add(42); - Expect.equals(elementCount + 1, list.length); - } - { - var list = new List.from(elements, growable: false); - Expect.equals(elementCount, list.length); - Expect.throwsUnsupportedError(() { - list.add(42); - }); - Expect.equals(elementCount, list.length); - } - } -} - -void check(Iterable initial, Iterable other) { - Expect.equals(initial.length, other.length); - - for (var element in other) { - initial.contains(element); - } - - for (var element in initial) { - other.contains(element); - } -} diff --git a/tests/corelib_2/collection_length_test.dart b/tests/corelib_2/collection_length_test.dart deleted file mode 100644 index 8f8187f2c8f..00000000000 --- a/tests/corelib_2/collection_length_test.dart +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2013, 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 map_test; - -import 'dart:collection'; - -// Test that length/isEmpty operations are constant time on -// maps, strings and collections. - -void testString(int n) { - String s = "x"; - String string = ""; - int length = n; - while (true) { - if ((length & 1) == 1) { - string += s; - } - length >>= 1; - if (length == 0) break; - s += s; - } - testLength(string, n); - testLength(string.codeUnits, n); -} - -void testMap(Map map, int n) { - for (int i = 0; i < n; i++) { - map[i] = i; - } - testLength(map, n); - testLength(map.keys, n); - testLength(map.values, n); -} - -void testCollection(var collection, n) { - for (int i = 0; i < n; i++) { - collection.add(i); - } - testLength(collection, n); -} - -void testList(List list, n) { - // Works even if list is fixed-length. - for (int i = 0; i < n; i++) { - list[i] = i; - } - testLength(list, n); -} - -void testLength(var lengthable, int size) { - print(lengthable.runtimeType); // Show what hangs the test. - int length = 0; - // If length, isEmpty or isNotEmpty is not a constant-time (or very fast) - // operation, this will timeout. - for (int i = 0; i < 100000; i++) { - if (!lengthable.isEmpty) length += lengthable.length; - if (lengthable.isNotEmpty) length += lengthable.length; - } - if (length != size * 200000) throw "Bad length: $length / size: $size"; -} - -main() { - const int N = 100000; - testMap(new HashMap(), N); - testMap(new LinkedHashMap(), N); - testMap(new SplayTreeMap(), N); - testCollection(new HashSet(), N); - testCollection(new LinkedHashSet(), N); - testCollection(new ListQueue(), N); - testCollection(new DoubleLinkedQueue(), N); - testList([]..length = N, N); - testList(new List.filled(N, null), N); - testString(N); -} diff --git a/tests/corelib_2/collection_of_test.dart b/tests/corelib_2/collection_of_test.dart deleted file mode 100644 index 61ccd1516e6..00000000000 --- a/tests/corelib_2/collection_of_test.dart +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2018, 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 collection.from.test; - -import "package:expect/expect.dart"; -import 'dart:collection'; - -main() { - for (Iterable elements in [ - new Set(), - [], - const [], - const {}.keys, - const {}.values, - new Iterable.generate(0), - new Set()..add(1)..add(2)..add(4), - [1, 2, 4], - new Iterable.generate(3, (i) => [1, 2, 4][i]), - const [1, 2, 4], - const {1: 0, 2: 0, 4: 0}.keys, - const {1: 1, 2: 2, 4: 4}.values, - ]) { - String sourceType = elements.runtimeType.toString(); - check(sourceType, elements, new List.of(elements)); - Expect.throwsTypeError(() => new List.of(elements)); - check(sourceType, elements, new List.of(elements)); - check(sourceType, elements, new Queue.of(elements)); - Expect.throwsTypeError(() => new Queue.of(elements)); - check(sourceType, elements, new Queue.of(elements)); - check(sourceType, elements, new ListQueue.of(elements)); - Expect.throwsTypeError(() => new ListQueue.of(elements)); - check(sourceType, elements, new ListQueue.of(elements)); - check(sourceType, elements, new DoubleLinkedQueue.of(elements)); - Expect.throwsTypeError(() => new DoubleLinkedQueue.of(elements)); - check(sourceType, elements, new DoubleLinkedQueue.of(elements)); - check(sourceType, elements, new Set.of(elements)); - Expect.throwsTypeError(() => new Set.of(elements)); - check(sourceType, elements, new Set.of(elements)); - check(sourceType, elements, new HashSet.of(elements)); - Expect.throwsTypeError(() => new HashSet.of(elements)); - check(sourceType, elements, new HashSet.of(elements)); - check(sourceType, elements, new LinkedHashSet.of(elements)); - Expect.throwsTypeError(() => new LinkedHashSet.of(elements)); - check(sourceType, elements, new LinkedHashSet.of(elements)); - check(sourceType, elements, new SplayTreeSet.of(elements)); - Expect.throwsTypeError(() => new SplayTreeSet.of(elements)); - check(sourceType, elements, new SplayTreeSet.of(elements)); - - // Inference applies to the `of` constructor, unlike the `from` constructor. - Expect.isTrue(new List.of(elements) is Iterable); - Expect.isTrue(new Queue.of(elements) is Iterable); - Expect.isTrue(new ListQueue.of(elements) is Iterable); - Expect.isTrue(new DoubleLinkedQueue.of(elements) is Iterable); - Expect.isTrue(new Set.of(elements) is Iterable); - Expect.isTrue(new HashSet.of(elements) is Iterable); - Expect.isTrue(new LinkedHashSet.of(elements) is Iterable); - Expect.isTrue(new SplayTreeSet.of(elements) is Iterable); - - Expect.isTrue(new List.of(elements) is! Iterable); - Expect.isTrue(new Queue.of(elements) is! Iterable); - Expect.isTrue(new ListQueue.of(elements) is! Iterable); - Expect.isTrue(new DoubleLinkedQueue.of(elements) is! Iterable); - Expect.isTrue(new Set.of(elements) is! Iterable); - Expect.isTrue(new HashSet.of(elements) is! Iterable); - Expect.isTrue(new LinkedHashSet.of(elements) is! Iterable); - Expect.isTrue(new SplayTreeSet.of(elements) is! Iterable); - } -} - -void check(String sourceType, Iterable source, Iterable target) { - String targetType = target.runtimeType.toString(); - String name = "$sourceType->$targetType"; - Expect.equals(source.length, target.length, "$name.length"); - - for (var element in target) { - Expect.isTrue(source.contains(element), "$name:$element in source"); - } - - for (var element in source) { - Expect.isTrue(target.contains(element), "$name:$element in target"); - } -} diff --git a/tests/corelib_2/collection_removes_test.dart b/tests/corelib_2/collection_removes_test.dart deleted file mode 100644 index 085a96cf892..00000000000 --- a/tests/corelib_2/collection_removes_test.dart +++ /dev/null @@ -1,132 +0,0 @@ -// 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 - -import 'dart:collection'; -import "package:expect/expect.dart"; - -testRemove(base) { - int length = base.length; - for (int i = 0; i < length; i++) { - Expect.isFalse(base.isEmpty); - base.remove(base.first); - } - Expect.isTrue(base.isEmpty); -} - -testRemoveAll(base, Iterable removes) { - Set retained = new Set(); - for (var element in base) { - if (!removes.contains(element)) { - retained.add(element); - } - } - String name = "$base.removeAll($removes) -> $retained"; - base.removeAll(removes); - for (var value in base) { - Expect.isFalse(removes.contains(value), "$name: Found $value"); - } - for (var value in retained) { - Expect.isTrue(base.contains(value), "$name: Found $value"); - } -} - -testRetainAll(base, Iterable retains) { - Set retained = new Set(); - for (var element in base) { - if (retains.contains(element)) { - retained.add(element); - } - } - String name = "$base.retainAll($retains) -> $retained"; - base.retainAll(retains); - for (var value in base) { - Expect.isTrue(retains.contains(value), "$name: Found $value"); - } - for (var value in retained) { - Expect.isTrue(base.contains(value), "$name: Found $value"); - } -} - -testRemoveWhere(base, bool test(value)) { - Set retained = new Set(); - for (var element in base) { - if (!test(element)) { - retained.add(element); - } - } - String name = "$base.removeWhere(...) -> $retained"; - base.removeWhere(test); - for (var value in base) { - Expect.isFalse(test(value), "$name: Found $value"); - } - for (var value in retained) { - Expect.isTrue(base.contains(value), "$name: Found $value"); - } -} - -testRetainWhere(base, bool test(value)) { - Set retained = new Set(); - for (var element in base) { - if (test(element)) { - retained.add(element); - } - } - String name = "$base.retainWhere(...) -> $retained"; - base.retainWhere(test); - for (var value in base) { - Expect.isTrue(test(value), "$name: Found $value"); - } - for (var value in retained) { - Expect.isTrue(base.contains(value), "$name: Found $value"); - } -} - -void main() { - var collections = [ - [], - [1], - [2], - [1, 2], - [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], - [1, 3, 5, 7, 9], - [2, 4, 6, 8, 10] - ]; - for (var base in collections) { - for (var delta in collections) { - testRemove(base.toList()); - testRemove(base.toSet()); - - var deltaSet = delta.toSet(); - testRemoveWhere(base.toList(), deltaSet.contains); - testRetainWhere(base.toList(), (e) => !deltaSet.contains(e)); - - testRemoveAll(base.toSet(), delta); - testRemoveAll(base.toSet(), deltaSet); - testRetainAll(base.toSet(), delta); - testRetainAll(base.toSet(), deltaSet); - testRemoveWhere(base.toSet(), deltaSet.contains); - testRetainWhere(base.toSet(), (e) => !deltaSet.contains(e)); - - // Test the ListBase class's List implementation. - testRemoveWhere(new MyList(base.toList()), deltaSet.contains); - testRetainWhere(new MyList(base.toList()), (e) => !deltaSet.contains(e)); - } - } -} - -class MyList extends ListBase { - List _source; - MyList(this._source); - int get length => _source.length; - void set length(int length) { - _source.length = length; - } - - E operator [](int index) => _source[index]; - void operator []=(int index, E value) { - _source[index] = value; - } -} diff --git a/tests/corelib_2/collection_test.dart b/tests/corelib_2/collection_test.dart deleted file mode 100644 index 8771c9a71d0..00000000000 --- a/tests/corelib_2/collection_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// 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 collection_test; - -import "package:expect/expect.dart"; -import 'dart:collection' show Queue; - -class CollectionTest { - CollectionTest(Iterable iterable) { - testFold(iterable); - } - - void testFold(Iterable iterable) { - Expect.equals( - 28, iterable.fold/**/(0, (prev, element) => prev + element)); - Expect.equals( - 3024, iterable.fold/**/(1, (prev, element) => prev * element)); - } -} - -main() { - final TEST_ELEMENTS = const [4, 2, 6, 7, 9]; - // Const list. - new CollectionTest(TEST_ELEMENTS); - - // Fixed size list. - var fixedList = new List.filled(TEST_ELEMENTS.length, null); - for (int i = 0; i < TEST_ELEMENTS.length; i++) { - fixedList[i] = TEST_ELEMENTS[i]; - } - new CollectionTest(fixedList); - - // Growable list. - new CollectionTest(new List.from(TEST_ELEMENTS)); - - // Set. - new CollectionTest(new Set.from(TEST_ELEMENTS)); - - // Queue. - new CollectionTest(new Queue.from(TEST_ELEMENTS)); -} diff --git a/tests/corelib_2/collection_to_string_test.dart b/tests/corelib_2/collection_to_string_test.dart deleted file mode 100644 index 62c7ed7997b..00000000000 --- a/tests/corelib_2/collection_to_string_test.dart +++ /dev/null @@ -1,389 +0,0 @@ -// Copyright (c) 2012, 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 - -/** - * Tests for the toString methods on collections and maps. - */ - -library collection_to_string; - -import "package:expect/expect.dart"; -import 'dart:collection' show Queue, LinkedHashMap; -import 'dart:math' as Math; - -// TODO(jjb): seed random number generator when API allows it - -const int NUM_TESTS = 300; -const int MAX_COLLECTION_SIZE = 7; - -Math.Random rand; - -main() { - rand = new Math.Random(); - smokeTest(); - exactTest(); - inexactTest(); -} - -/** - * Test a few simple examples. - */ -void smokeTest() { - // Non-const lists - Expect.equals([].toString(), '[]'); - Expect.equals([1].toString(), '[1]'); - Expect.equals(['Elvis'].toString(), '[Elvis]'); - Expect.equals([null].toString(), '[null]'); - Expect.equals([1, 2].toString(), '[1, 2]'); - Expect.equals(['I', 'II'].toString(), '[I, II]'); - Expect.equals( - [ - [1, 2], - [3, 4], - [5, 6] - ].toString(), - '[[1, 2], [3, 4], [5, 6]]'); - - // Const lists - Expect.equals((const []).toString(), '[]'); - Expect.equals((const [1]).toString(), '[1]'); - Expect.equals((const ['Elvis']).toString(), '[Elvis]'); - Expect.equals((const [null]).toString(), '[null]'); - Expect.equals((const [1, 2]).toString(), '[1, 2]'); - Expect.equals((const ['I', 'II']).toString(), '[I, II]'); - Expect.equals( - (const [ - const [1, 2], - const [3, 4], - const [5, 6] - ]) - .toString(), - '[[1, 2], [3, 4], [5, 6]]'); - - // Non-const maps - Note that all keys are strings; the spec currently demands this - Expect.equals({}.toString(), '{}'); - Expect.equals({'Elvis': 'King'}.toString(), '{Elvis: King}'); - Expect.equals({'Elvis': null}.toString(), '{Elvis: null}'); - Expect.equals({'I': 1, 'II': 2}.toString(), '{I: 1, II: 2}'); - Expect.equals( - { - 'X': {'I': 1, 'II': 2}, - 'Y': {'III': 3, 'IV': 4}, - 'Z': {'V': 5, 'VI': 6} - }.toString(), - '{X: {I: 1, II: 2}, Y: {III: 3, IV: 4}, Z: {V: 5, VI: 6}}'); - - // Const maps - Expect.equals(const {}.toString(), '{}'); - Expect.equals(const {'Elvis': 'King'}.toString(), '{Elvis: King}'); - Expect.equals({'Elvis': null}.toString(), '{Elvis: null}'); - Expect.equals(const {'I': 1, 'II': 2}.toString(), '{I: 1, II: 2}'); - Expect.equals( - const { - 'X': const {'I': 1, 'II': 2}, - 'Y': const {'III': 3, 'IV': 4}, - 'Z': const {'V': 5, 'VI': 6} - }.toString(), - '{X: {I: 1, II: 2}, Y: {III: 3, IV: 4}, Z: {V: 5, VI: 6}}'); -} - -// SERIOUS "BASHER" TESTS - -/** - * Generate a bunch of random collections (including Maps), and test that - * there string form is as expected. The collections include collections - * as elements, keys, and values, and include recursive references. - * - * This test restricts itself to collections with well-defined iteration - * orders (i.e., no HashSet, HashMap). - */ -void exactTest() { - for (int i = 0; i < NUM_TESTS; i++) { - // Choose a size from 0 to MAX_COLLECTION_SIZE, favoring larger sizes - int size = - Math.sqrt(random(MAX_COLLECTION_SIZE * MAX_COLLECTION_SIZE)).toInt(); - - StringBuffer stringRep = new StringBuffer(); - Object o = randomCollection(size, stringRep, exact: true); - print(stringRep); - print(o); - Expect.equals(o.toString(), stringRep.toString()); - } -} - -/** - * Generate a bunch of random collections (including Maps), and test that - * there string form is as expected. The collections include collections - * as elements, keys, and values, and include recursive references. - * - * This test includes collections with ill-defined iteration orders (i.e., - * HashSet, HashMap). As a consequence, it can't use equality tests on the - * string form. Instead, it performs equality tests on their "alphagrams." - * This might allow false positives, but it does give a fair amount of - * confidence. - */ -void inexactTest() { - for (int i = 0; i < NUM_TESTS; i++) { - // Choose a size from 0 to MAX_COLLECTION_SIZE, favoring larger sizes - int size = - Math.sqrt(random(MAX_COLLECTION_SIZE * MAX_COLLECTION_SIZE)).toInt(); - - StringBuffer stringRep = new StringBuffer(); - Object o = randomCollection(size, stringRep, exact: false); - print(stringRep); - print(o); - Expect.equals(alphagram(o.toString()), alphagram(stringRep.toString())); - } -} - -/** - * Return a random collection (or Map) of the specified size, placing its - * string representation into the given string buffer. - * - * If exact is true, the returned collections will not be, and will not contain - * a collection with ill-defined iteration order (i.e., a HashSet or HashMap). - */ -Object randomCollection(int size, StringBuffer stringRep, {bool exact}) { - return randomCollectionHelper(size, exact, stringRep, []); -} - -/** - * Return a random collection (or map) of the specified size, placing its - * string representation into the given string buffer. The beingMade - * parameter is a list of collections currently under construction, i.e., - * candidates for recursive references. - * - * If exact is true, the returned collections will not be, and will not contain - * a collection with ill-defined iteration order (i.e., a HashSet or HashMap). - */ -Object randomCollectionHelper( - int size, bool exact, StringBuffer stringRep, List beingMade) { - double interfaceFrac = rand.nextDouble(); - - if (exact) { - if (interfaceFrac < 1 / 3) { - return randomList(size, exact, stringRep, beingMade); - } else if (interfaceFrac < 2 / 3) { - return randomQueue(size, exact, stringRep, beingMade); - } else { - return randomMap(size, exact, stringRep, beingMade); - } - } else { - if (interfaceFrac < 1 / 4) { - return randomList(size, exact, stringRep, beingMade); - } else if (interfaceFrac < 2 / 4) { - return randomQueue(size, exact, stringRep, beingMade); - } else if (interfaceFrac < 3 / 4) { - return randomSet(size, exact, stringRep, beingMade); - } else { - return randomMap(size, exact, stringRep, beingMade); - } - } -} - -/** - * Return a random List of the specified size, placing its string - * representation into the given string buffer. The beingMade - * parameter is a list of collections currently under construction, i.e., - * candidates for recursive references. - * - * If exact is true, the returned collections will not be, and will not contain - * a collection with ill-defined iteration order (i.e., a HashSet or HashMap). - */ -List randomList(int size, bool exact, StringBuffer stringRep, List beingMade) { - return populateRandomCollection(size, exact, stringRep, beingMade, [], "[]"); -} - -/** - * Like randomList, but returns a queue. - */ -Queue randomQueue( - int size, bool exact, StringBuffer stringRep, List beingMade) { - return populateRandomCollection( - size, exact, stringRep, beingMade, new Queue(), "{}"); -} - -/** - * Like randomList, but returns a Set. - */ -Set randomSet(int size, bool exact, StringBuffer stringRep, List beingMade) { - // Until we have LinkedHashSet, method will only be called with exact==true - return populateRandomSet(size, exact, stringRep, beingMade, new Set()); -} - -/** - * Like randomList, but returns a map. - */ -Map randomMap(int size, bool exact, StringBuffer stringRep, List beingMade) { - if (exact) { - return populateRandomMap( - size, exact, stringRep, beingMade, new LinkedHashMap()); - } else { - return populateRandomMap(size, exact, stringRep, beingMade, - randomBool() ? new Map() : new LinkedHashMap()); - } -} - -/** - * Populates the given empty collection with elements, emitting the string - * representation of the collection to stringRep. The beingMade parameter is - * a list of collections currently under construction, i.e., candidates for - * recursive references. - * - * If exact is true, the elements of the returned collections will not be, - * and will not contain a collection with ill-defined iteration order - * (i.e., a HashSet or HashMap). - */ -populateRandomCollection(int size, bool exact, StringBuffer stringRep, - List beingMade, var coll, String delimiters) { - beingMade.add(coll); - int start = stringRep.length; - - stringRep.write(delimiters[0]); - - List indices = []; - for (int i = 0; i < size; i++) { - indices.add(stringRep.length); - if (i != 0) stringRep.write(', '); - coll.add(randomElement(random(size), exact, stringRep, beingMade)); - } - if (size > 5 && delimiters == "()") { - const int MAX_LENGTH = 80; - const int MIN_COUNT = 3; - const int MAX_COUNT = 100; - // It's an iterable, it may omit some elements. - int end = stringRep.length; - if (size > MAX_COUNT) { - // Last two elements are also omitted, just find the first three or - // first 60 characters. - for (int i = MIN_COUNT; i < size; i++) { - int startIndex = indices[i]; - if (startIndex - start > MAX_LENGTH - 6) { - // Limit - ", ...)".length. - String prefix = stringRep.toString().substring(0, startIndex); - stringRep.clear(); - stringRep.write(prefix); - stringRep.write(", ..."); - } - } - } else if (stringRep.length - start > MAX_LENGTH - 1) { - // 80 - ")".length. - // Last two elements are always included. Middle ones may be omitted. - int lastTwoLength = end - indices[indices.length - 2]; - // Try to find first element to omit. - for (int i = 3; i <= size - 3; i++) { - int elementEnd = indices[i + 1]; - int lengthAfter = elementEnd - start; - int ellipsisSize = 5; // ", ...".length - if (i == size - 3) ellipsisSize = 0; // No ellipsis if we hit the end. - if (lengthAfter + ellipsisSize + lastTwoLength > MAX_LENGTH - 1) { - // Omit this element and everything up to the last two. - int elementStart = indices[i]; - // Rewrite string buffer by copying it out, clearing, and putting - // the parts back in. - String buffer = stringRep.toString(); - String prefix = buffer.substring(0, elementStart); - String suffix = buffer.substring(end - lastTwoLength, end); - stringRep.clear(); - stringRep.write(prefix); - stringRep.write(", ..."); - stringRep.write(suffix); - break; - } - } - } - } - - stringRep.write(delimiters[1]); - beingMade.removeLast(); - return coll; -} - -/** Like populateRandomCollection, but for sets (elements must be hashable) */ -Set populateRandomSet( - int size, bool exact, StringBuffer stringRep, List beingMade, Set set) { - stringRep.write('{'); - - for (int i = 0; i < size; i++) { - if (i != 0) stringRep.write(', '); - set.add(i); - stringRep.write(i); - } - - stringRep.write('}'); - return set; -} - -/** Like populateRandomCollection, but for maps. */ -Map populateRandomMap( - int size, bool exact, StringBuffer stringRep, List beingMade, Map map) { - beingMade.add(map); - stringRep.write('{'); - - for (int i = 0; i < size; i++) { - if (i != 0) stringRep.write(', '); - - int key = i; // Ensures no duplicates - stringRep.write(key); - stringRep.write(': '); - Object val = randomElement(random(size), exact, stringRep, beingMade); - map[key] = val; - } - - stringRep.write('}'); - beingMade.removeLast(); - return map; -} - -/** - * Generates a random element which can be an int, a collection, or a map, - * and emits it to StringRep. The beingMade parameter is a list of collections - * currently under construction, i.e., candidates for recursive references. - * - * If exact is true, the returned element will not be, and will not contain - * a collection with ill-defined iteration order (i.e., a HashSet or HashMap). - */ -Object randomElement( - int size, bool exact, StringBuffer stringRep, List beingMade) { - Object result; - double elementTypeFrac = rand.nextDouble(); - if (elementTypeFrac < 1 / 3) { - result = random(1000); - stringRep.write(result); - } else if (elementTypeFrac < 2 / 3) { - // Element is a random (new) collection - result = randomCollectionHelper(size, exact, stringRep, beingMade); - } else { - // Element is a random recursive ref - result = beingMade[random(beingMade.length)]; - if (result is List) { - stringRep.write('[...]'); - } else if (result is Set || result is Map || result is Queue) { - stringRep.write('{...}'); - } else { - stringRep.write('(...)'); - } - } - return result; -} - -/** Returns a random int on [0, max) */ -int random(int max) { - return rand.nextInt(max); -} - -/** Returns a random boolean value. */ -bool randomBool() { - return rand.nextBool(); -} - -/** Returns the alphabetized characters in a string. */ -String alphagram(String s) { - // Calling [toList] to convert unmodifiable list to normal list. - List chars = s.codeUnits.toList(); - chars.sort((int a, int b) => a - b); - return new String.fromCharCodes(chars); -} diff --git a/tests/corelib_2/compare_to2_test.dart b/tests/corelib_2/compare_to2_test.dart deleted file mode 100644 index 6fd1c3b151f..00000000000 --- a/tests/corelib_2/compare_to2_test.dart +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) 2012, 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 test for testing Math.min and Math.max. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -negate(x) => -x; - -main() { - // Test matrix: - var minNonZero = 5e-324; - var maxDenormal = 2.225073858507201e-308; - var minNormal = 2.2250738585072014e-308; - var maxFraction = 0.9999999999999999; - var minAbove1 = 1.0000000000000002; - var maxNonInt = 4503599627370495.5; - var maxNonIntFloorAsInt = maxNonInt.floor(); - var maxNonIntFloorAsDouble = maxNonIntFloorAsInt.toDouble(); - var maxExactIntAsDouble = 9007199254740992.0; - var maxExactIntAsInt = 9007199254740992; - var two53 = 1 << 53; // Same as maxExactIntAsInt. - var two53p1 = two53 + 1; - var maxFiniteAsDouble = 1.7976931348623157e+308; - var maxFiniteAsInt = maxFiniteAsDouble.truncate(); - var inf = double.infinity; - var nan = double.nan; - var mnan = negate(nan); - var minInt64 = -0x8000000000000000; - var minInt64AsDouble = minInt64.toDouble(); - var maxInt64 = 0x7fffffffffffffff; - var maxInt64AsDouble = maxInt64.toDouble(); // 1 << 63 - var matrix = [ - -inf, - -maxFiniteAsDouble, - [minInt64, minInt64AsDouble], - [-maxInt64, -maxFiniteAsInt], - -two53p1, - [-two53, -maxExactIntAsInt, -maxExactIntAsDouble], - -maxNonInt, - [-maxNonIntFloorAsDouble, -maxNonIntFloorAsInt], - [-499.0, -499], - -minAbove1, - [-1.0, -1], - -maxFraction, - -minNormal, - -maxDenormal, - -minNonZero, - -0.0, - [0, 0, 0], - minNonZero, - maxDenormal, - minNormal, - maxFraction, - [1.0, 1], - minAbove1, - [499.0, 499], - [maxNonIntFloorAsDouble, maxNonIntFloorAsInt], - maxNonInt, - [two53, maxExactIntAsInt, maxExactIntAsDouble], - two53p1, - [maxInt64, maxFiniteAsInt], - maxInt64AsDouble, - maxFiniteAsDouble, - inf, - [nan, mnan], - ]; - - check(left, right, expectedResult) { - if (left is List) { - for (var x in left) check(x, right, expectedResult); - return; - } - if (right is List) { - for (var x in right) check(left, x, expectedResult); - return; - } - int actual = left.compareTo(right); - Expect.equals( - expectedResult, - actual, - "($left).compareTo($right) failed " - "(should have been $expectedResult, was $actual"); - } - - for (int i = 0; i < matrix.length; i++) { - for (int j = 0; j < matrix.length; j++) { - var left = matrix[i]; - var right = matrix[j]; - if (left is List) { - check(left, left, 0); - } - check(left, right, i == j ? 0 : (i < j ? -1 : 1)); - } - } -} diff --git a/tests/corelib_2/compare_to_test.dart b/tests/corelib_2/compare_to_test.dart deleted file mode 100644 index a7e5b96475e..00000000000 --- a/tests/corelib_2/compare_to_test.dart +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) 2012, 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 test for testing Math.min and Math.max. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -negate(x) => -x; - -main() { - // Test matrix: - // -inf < -499.0 == -499 < -0.0 < 0.0 == 0 < 499.0 == 499 < +inf < -NaN, NaN. - var inf = double.infinity; - var nan = double.nan; - var mnan = negate(nan); - - Expect.equals(0, (-inf).compareTo(-inf)); - Expect.equals(-1, (-inf).compareTo(-499.0)); - Expect.equals(-1, (-inf).compareTo(-499)); - Expect.equals(-1, (-inf).compareTo(-0.0)); - Expect.equals(-1, (-inf).compareTo(0)); - Expect.equals(-1, (-inf).compareTo(0.0)); - Expect.equals(-1, (-inf).compareTo(499.0)); - Expect.equals(-1, (-inf).compareTo(499)); - Expect.equals(-1, (-inf).compareTo(inf)); - Expect.equals(-1, (-inf).compareTo(nan)); - Expect.equals(-1, (-inf).compareTo(mnan)); - - Expect.equals(1, (-499.0).compareTo(-inf)); - Expect.equals(0, (-499.0).compareTo(-499.0)); - Expect.equals(0, (-499.0).compareTo(-499)); - Expect.equals(-1, (-499.0).compareTo(-0.0)); - Expect.equals(-1, (-499.0).compareTo(0)); - Expect.equals(-1, (-499.0).compareTo(0.0)); - Expect.equals(-1, (-499.0).compareTo(499.0)); - Expect.equals(-1, (-499.0).compareTo(499)); - Expect.equals(-1, (-499.0).compareTo(inf)); - Expect.equals(-1, (-499.0).compareTo(nan)); - Expect.equals(-1, (-499.0).compareTo(mnan)); - - Expect.equals(1, (-499).compareTo(-inf)); - Expect.equals(0, (-499).compareTo(-499.0)); - Expect.equals(0, (-499).compareTo(-499)); - Expect.equals(-1, (-499).compareTo(-0.0)); - Expect.equals(-1, (-499).compareTo(0)); - Expect.equals(-1, (-499).compareTo(0.0)); - Expect.equals(-1, (-499).compareTo(499.0)); - Expect.equals(-1, (-499).compareTo(499)); - Expect.equals(-1, (-499).compareTo(inf)); - Expect.equals(-1, (-499).compareTo(nan)); - Expect.equals(-1, (-499).compareTo(mnan)); - - Expect.equals(1, (-0.0).compareTo(-inf)); - Expect.equals(1, (-0.0).compareTo(-499.0)); - Expect.equals(1, (-0.0).compareTo(-499)); - Expect.equals(0, (-0.0).compareTo(-0.0)); - Expect.equals(-1, (-0.0).compareTo(0)); - Expect.equals(-1, (-0.0).compareTo(0.0)); - Expect.equals(-1, (-0.0).compareTo(499.0)); - Expect.equals(-1, (-0.0).compareTo(499)); - Expect.equals(-1, (-0.0).compareTo(inf)); - Expect.equals(-1, (-0.0).compareTo(nan)); - Expect.equals(-1, (-0.0).compareTo(mnan)); - - Expect.equals(1, (0).compareTo(-inf)); - Expect.equals(1, (0).compareTo(-499.0)); - Expect.equals(1, (0).compareTo(-499)); - Expect.equals(1, (0).compareTo(-0.0)); - Expect.equals(0, (0).compareTo(0)); - Expect.equals(0, (0).compareTo(0.0)); - Expect.equals(-1, (0).compareTo(499.0)); - Expect.equals(-1, (0).compareTo(499)); - Expect.equals(-1, (0).compareTo(inf)); - Expect.equals(-1, (0).compareTo(nan)); - Expect.equals(-1, (0).compareTo(mnan)); - - Expect.equals(1, (0.0).compareTo(-inf)); - Expect.equals(1, (0.0).compareTo(-499.0)); - Expect.equals(1, (0.0).compareTo(-499)); - Expect.equals(1, (0.0).compareTo(-0.0)); - Expect.equals(0, (0.0).compareTo(0)); - Expect.equals(0, (0.0).compareTo(0.0)); - Expect.equals(-1, (0.0).compareTo(499.0)); - Expect.equals(-1, (0.0).compareTo(499)); - Expect.equals(-1, (0.0).compareTo(inf)); - Expect.equals(-1, (0.0).compareTo(nan)); - Expect.equals(-1, (0.0).compareTo(mnan)); - - Expect.equals(1, (499.0).compareTo(-inf)); - Expect.equals(1, (499.0).compareTo(-499.0)); - Expect.equals(1, (499.0).compareTo(-499)); - Expect.equals(1, (499.0).compareTo(-0.0)); - Expect.equals(1, (499.0).compareTo(0)); - Expect.equals(1, (499.0).compareTo(0.0)); - Expect.equals(0, (499.0).compareTo(499.0)); - Expect.equals(0, (499.0).compareTo(499)); - Expect.equals(-1, (499.0).compareTo(inf)); - Expect.equals(-1, (499.0).compareTo(nan)); - Expect.equals(-1, (499.0).compareTo(mnan)); - - Expect.equals(1, (499).compareTo(-inf)); - Expect.equals(1, (499).compareTo(-499.0)); - Expect.equals(1, (499).compareTo(-499)); - Expect.equals(1, (499).compareTo(-0.0)); - Expect.equals(1, (499).compareTo(0)); - Expect.equals(1, (499).compareTo(0.0)); - Expect.equals(0, (499).compareTo(499.0)); - Expect.equals(0, (499).compareTo(499)); - Expect.equals(-1, (499).compareTo(inf)); - Expect.equals(-1, (499).compareTo(nan)); - Expect.equals(-1, (499).compareTo(mnan)); - - Expect.equals(1, inf.compareTo(-inf)); - Expect.equals(1, inf.compareTo(-499.0)); - Expect.equals(1, inf.compareTo(-499)); - Expect.equals(1, inf.compareTo(-0.0)); - Expect.equals(1, inf.compareTo(0)); - Expect.equals(1, inf.compareTo(0.0)); - Expect.equals(1, inf.compareTo(499.0)); - Expect.equals(1, inf.compareTo(499)); - Expect.equals(0, inf.compareTo(inf)); - Expect.equals(-1, inf.compareTo(nan)); - Expect.equals(-1, inf.compareTo(mnan)); - - Expect.equals(1, nan.compareTo(-inf)); - Expect.equals(1, nan.compareTo(-499.0)); - Expect.equals(1, nan.compareTo(-499)); - Expect.equals(1, nan.compareTo(-0.0)); - Expect.equals(1, nan.compareTo(0)); - Expect.equals(1, nan.compareTo(0.0)); - Expect.equals(1, nan.compareTo(499.0)); - Expect.equals(1, nan.compareTo(499)); - Expect.equals(1, nan.compareTo(inf)); - Expect.equals(0, nan.compareTo(nan)); - Expect.equals(0, nan.compareTo(mnan)); -} diff --git a/tests/corelib_2/const_list_literal_test.dart b/tests/corelib_2/const_list_literal_test.dart deleted file mode 100644 index 2b02188be85..00000000000 --- a/tests/corelib_2/const_list_literal_test.dart +++ /dev/null @@ -1,82 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Test that a final list literal is not expandable nor modifiable. - -class ConstListLiteralTest { - static void testMain() { - var list = const [4, 2, 3]; - Expect.equals(3, list.length); - - var exception = null; - try { - list.add(4); - } on UnsupportedError catch (e) { - exception = e; - } - Expect.equals(true, exception != null); - Expect.equals(3, list.length); - exception = null; - - exception = null; - try { - list.addAll([4, 5]); - } on UnsupportedError catch (e) { - exception = e; - } - Expect.equals(true, exception != null); - Expect.equals(3, list.length); - - exception = null; - try { - list[0] = 0; - } on UnsupportedError catch (e) { - exception = e; - } - Expect.equals(true, exception != null); - Expect.equals(3, list.length); - - exception = null; - try { - list.sort((a, b) => a - b); - } on UnsupportedError catch (e) { - exception = e; - } - Expect.equals(true, exception != null); - Expect.equals(3, list.length); - Expect.equals(4, list[0]); - Expect.equals(2, list[1]); - Expect.equals(3, list[2]); - - exception = null; - try { - list.setRange(0, 1, [1], 0); - } on UnsupportedError catch (e) { - exception = e; - } - Expect.equals(true, exception != null); - Expect.equals(3, list.length); - Expect.equals(4, list[0]); - Expect.equals(2, list[1]); - Expect.equals(3, list[2]); - - // Note: the next check is a regression test for dart2js. The immutable list - // overrides the 'length' property of List, but relies on using the native - // 'forEach' construct in Array. This test ensures that our strategy works - // correctly. - int x = 0; - list.forEach((e) { - x += e; - }); - Expect.equals(9, x); - } -} - -main() { - ConstListLiteralTest.testMain(); -} diff --git a/tests/corelib_2/const_list_remove_range_test.dart b/tests/corelib_2/const_list_remove_range_test.dart deleted file mode 100644 index 320cbde739d..00000000000 --- a/tests/corelib_2/const_list_remove_range_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -main() { - testImmutable(const []); - testImmutable(const [1]); - testImmutable(const [1, 2]); -} - -testImmutable(var list) { - Expect.throwsUnsupportedError(() => list.removeRange(0, 0)); - Expect.throwsUnsupportedError(() => list.removeRange(0, 1)); - Expect.throwsUnsupportedError(() => list.removeRange(-1, 1)); -} diff --git a/tests/corelib_2/const_list_set_range_test.dart b/tests/corelib_2/const_list_set_range_test.dart deleted file mode 100644 index 853ff788180..00000000000 --- a/tests/corelib_2/const_list_set_range_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -main() { - testImmutable(const []); - testImmutable(const [1]); - testImmutable(const [1, 2]); -} - -testImmutable(List list) { - Expect.throwsUnsupportedError(() => list.setRange(0, 0, const [])); - Expect.throwsUnsupportedError(() => list.setRange(0, 1, const [], 1)); - Expect.throwsUnsupportedError(() => list.setRange(0, 1, const [])); - Expect.throwsUnsupportedError(() => list.setRange(0, 0, [])); - Expect.throwsUnsupportedError(() => list.setRange(0, 1, [], 1)); - Expect.throwsUnsupportedError(() => list.setRange(0, 1, [])); - Expect.throwsUnsupportedError(() => list.setRange(0, 0, const [1])); - Expect.throwsUnsupportedError(() => list.setRange(0, 1, const [1])); - Expect.throwsUnsupportedError(() => list.setRange(0, 0, [1])); - Expect.throwsUnsupportedError(() => list.setRange(0, 1, [1])); - Expect.throwsUnsupportedError(() => list.setRange(0, 1, [1], 1)); -} diff --git a/tests/corelib_2/core_runtime_types_static_test.dart b/tests/corelib_2/core_runtime_types_static_test.dart deleted file mode 100644 index 39a90e6d17f..00000000000 --- a/tests/corelib_2/core_runtime_types_static_test.dart +++ /dev/null @@ -1,58 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -/** - * Verify static compilation errors on strings and lists. - */ -class CoreStaticTypesTest { - static testMain() { - testStringOperators(); - testStringMethods(); - testListOperators(); - } - - static testStringOperators() { - var q = "abcdef"; - q['hello']; - //^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. - q[0] = 'x'; -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR -// [cfe] The operator '[]=' isn't defined for the class 'String'. - } - - static testStringMethods() { - var s = "abcdef"; - s.startsWith(1); - // ^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'int' can't be assigned to the parameter type 'Pattern'. - s.endsWith(1); - // ^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'int' can't be assigned to the parameter type 'String'. - } - - static testListOperators() { - var a = [1, 2, 3, 4]; - a['0']; - //^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. - a['0'] = 99; - //^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. - } -} - -main() { - CoreStaticTypesTest.testMain(); -} diff --git a/tests/corelib_2/core_runtime_types_test.dart b/tests/corelib_2/core_runtime_types_test.dart deleted file mode 100644 index 28d73adaebc..00000000000 --- a/tests/corelib_2/core_runtime_types_test.dart +++ /dev/null @@ -1,337 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -/** - * A test of simple runtime behavior on numbers, strings and lists with - * a focus on both correct behavior and runtime errors. - * - * This file is written to use minimal type declarations to match a - * typical dynamic language coding style. - */ -class CoreRuntimeTypesTest { - static testMain() { - testBooleanOperators(); - testRationalOperators(); - testIntegerOperators(); - testOperatorErrors(); - testRationalMethods(); - testIntegerMethods(); - testStringOperators(); - testStringMethods(); - testListOperators(); - testListMethods(); - testMapOperators(); - testMapMethods(); - testLiterals(); - testDateMethods(); - } - - static assertEquals(a, b) { - Expect.equals(b, a); - } - - static assertListEquals(List a, List b) { - Expect.equals(b.length, a.length); - for (int i = 0; i < a.length; i++) { - Expect.equals(b[i], a[i]); - } - } - - static assertListContains(List a, List b) { - a.sort((x, y) => x.compareTo(y)); - b.sort((x, y) => x.compareTo(y)); - assertListEquals(a, b); - } - - static assertTypeError(void f(), [String message]) { - Expect.throws( - f, - (exception) => - (exception is TypeError) || - (exception is AssertionError) || - (exception is NoSuchMethodError) || - (exception is ArgumentError), - message); - } - - static testBooleanOperators() { - var x = true, y = false; - assertEquals(x, true); - assertEquals(y, false); - assertEquals(x, !y); - assertEquals(!x, y); - } - - static testRationalOperators() { - var x = 10, y = 20; - assertEquals(x + y, 30); - assertEquals(x - y, -10); - assertEquals(x * y, 200); - assertEquals(x / y, 0.5); - assertEquals(x ~/ y, 0); - assertEquals(x % y, 10); - } - - static testIntegerOperators() { - var x = 18, y = 17; - assertEquals(x | y, 19); - assertEquals(x & y, 16); - assertEquals(x ^ y, 3); - assertEquals(2 >> 1, 1); - assertEquals(1 << 1, 2); - } - - static testOperatorErrors() { - var objs = [ - 1, - '2', - [3], - null, - true, - new Map() - ]; - for (var i = 0; i < objs.length; i++) { - for (var j = i + 1; j < objs.length; j++) { - testBinaryOperatorErrors(objs[i], objs[j]); - testBinaryOperatorErrors(objs[j], objs[i]); - } - testUnaryOperatorErrors(objs[i]); - } - } - - static testBinaryOperatorErrors(x, y) { - assertTypeError(() { - x + y; - }, "$x+$y"); - assertTypeError(() { - x - y; - }, "$x-$y"); - // String.* is the only non-same-type binary operator we have. - if (x is! String && y is! int) { - assertTypeError(() { - x * y; - }, "$x*$y"); - } - assertTypeError(() { - x / y; - }, "$x/$y"); - assertTypeError(() { - x | y; - }, "$x|$y"); - assertTypeError(() { - x ^ y; - }, "$x^$y"); - assertTypeError(() { - x & y; - }, "$x&$y"); - assertTypeError(() { - x << y; - }, "$x<<$y"); - assertTypeError(() { - x >> y; - }, "$x>>$y"); - assertTypeError(() { - x ~/ y; - }, "$x~/$y"); - assertTypeError(() { - x % y; - }, "$x%$y"); - - testComparisonOperatorErrors(x, y); - } - - static testComparisonOperatorErrors(x, y) { - assertEquals(x == y, false); - assertEquals(x != y, true); - assertTypeError(() { - x < y; - }, "$x<$y"); - assertTypeError(() { - x <= y; - }, "$x<=$y"); - assertTypeError(() { - x > y; - }, "$x>$y"); - assertTypeError(() { - x >= y; - }, "$x>=$y"); - } - - static testUnaryOperatorErrors(x) { - if (x is! int) { - assertTypeError(() { - ~x; - }, "~$x"); - } - if (x is! num) { - assertTypeError(() { - -x; - }, "-$x"); - } - if (x is! bool) { - assertTypeError(() { - !x; - }, "!$x"); - } - } - - static testRationalMethods() { - var x = 10.6; - assertEquals(x.abs(), 10.6); - assertEquals((-x).abs(), 10.6); - assertEquals(x.round(), 11); - assertEquals(x.floor(), 10); - assertEquals(x.ceil(), 11); - } - - // TODO(jimhug): Determine correct behavior for mixing ints and floats. - static testIntegerMethods() { - var y = 9; - assertEquals(y.isEven, false); - assertEquals(y.isOdd, true); - assertEquals(y.toRadixString(2), '1001'); - assertEquals(y.toRadixString(3), '100'); - assertEquals(y.toRadixString(16), '9'); - assertEquals((0).toRadixString(16), '0'); - try { - y.toRadixString(0); - Expect.fail("Illegal radix 0 accepted."); - } catch (e) {} - try { - y.toRadixString(-1); - Expect.fail("Illegal radix -1 accepted."); - } catch (e) {} - } - - static testStringOperators() { - var s = "abcdef"; - assertEquals(s, "abcdef"); - assertEquals(s.codeUnitAt(0), 97); - assertEquals(s[0], 'a'); - assertEquals(s.length, 6); - assertTypeError(() { - s[null]; - }); - } - - // TODO(jimhug): Fill out full set of string methods. - static testStringMethods() { - var s = "abcdef"; - assertEquals(s.isEmpty, false); - assertEquals(s.isNotEmpty, true); - assertEquals(s.startsWith("abc"), true); - assertEquals(s.endsWith("def"), true); - assertEquals(s.startsWith("aa"), false); - assertEquals(s.endsWith("ff"), false); - assertEquals(s.contains('cd', 0), true); - assertEquals(s.contains('cd', 2), true); - assertEquals(s.contains('cd', 3), false); - assertEquals(s.indexOf('cd', 2), 2); - assertEquals(s.indexOf('cd', 3), -1); - } - - static testListOperators() { - var a = [1, 2, 3, 4]; - assertEquals(a[0], 1); - a[0] = 42; - assertEquals(a[0], 42); - assertEquals(a.length, 4); - } - - // TODO(jimhug): Fill out full set of list methods. - static testListMethods() { - var a = [1, 2, 3, 4]; - assertEquals(a.isEmpty, false); - assertEquals(a.length, 4); - var exception = null; - a.clear(); - assertEquals(a.length, 0); - } - - static testMapOperators() { - var d = new Map(); - d['a'] = 1; - d['b'] = 2; - assertEquals(d['a'], 1); - assertEquals(d['b'], 2); - assertEquals(d['c'], null); - } - - static testMapMethods() { - var d = new Map(); - d['a'] = 1; - d['b'] = 2; - assertEquals(d.containsValue(2), true); - assertEquals(d.containsValue(3), false); - assertEquals(d.containsKey('a'), true); - assertEquals(d.containsKey('c'), false); - assertEquals(d.keys.length, 2); - assertEquals(d.values.length, 2); - - assertEquals(d.remove('c'), null); - assertEquals(d.remove('b'), 2); - assertEquals(d.keys.single, 'a'); - assertEquals(d.values.single, 1); - - d['c'] = 3; - d['f'] = 4; - assertEquals(d.keys.length, 3); - assertEquals(d.values.length, 3); - assertListContains(d.keys.toList(), ['a', 'c', 'f']); - assertListContains(d.values.toList(), [1, 3, 4]); - - var count = 0; - d.forEach((key, value) { - count++; - assertEquals(value, d[key]); - }); - assertEquals(count, 3); - - d = {'a': 1, 'b': 2}; - assertEquals(d.containsValue(2), true); - assertEquals(d.containsValue(3), false); - assertEquals(d.containsKey('a'), true); - assertEquals(d.containsKey('c'), false); - assertEquals(d.keys.length, 2); - assertEquals(d.values.length, 2); - - d['g'] = null; - assertEquals(d.containsKey('g'), true); - assertEquals(d['g'], null); - } - - static testDateMethods() { - var msec = 115201000; - var d = new DateTime.fromMillisecondsSinceEpoch(msec, isUtc: true); - assertEquals(d.second, 1); - assertEquals(d.year, 1970); - - d = new DateTime.now(); - assertEquals(d.year >= 1970, true); - } - - static testLiterals() { - true.toString(); - 1.0.toString(); - .5.toString(); - 1.toString(); - if (false) { - // Depends on http://b/4198808. - null.toString(); - } - '${null}'.toString(); - '${true}'.toString(); - '${false}'.toString(); - ''.toString(); - ''.endsWith(''); - } -} - -main() { - CoreRuntimeTypesTest.testMain(); -} diff --git a/tests/corelib_2/corelib_2.status b/tests/corelib_2/corelib_2.status deleted file mode 100644 index 3303dc8c2bf..00000000000 --- a/tests/corelib_2/corelib_2.status +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright (c) 2017, 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. - -bigint_parse_radix_test/3: Slow # Issue http://dartbug.com/47050 -bigint_test: Pass, Slow - -[ $builder_tag == obfuscated ] -apply_generic_function_test: SkipByDesign # Function.apply with named args -apply_test: Skip # Uses new Symbol via symbolMapToStringMap helper -dynamic_nosuchmethod_test: SkipByDesign # Expects names in NSM -nsm_invocation_test: SkipByDesign # Relies on non-obfuscated symbols -symbol_test: SkipByDesign # Relies on non-obfuscated symbols -type_tostring_test: SkipByDesign # Expects names in Type.toString() - -[ $compiler == dartkp ] -bigint_parse_radix_test: Slow, Pass # --no_intrinsify -bigint_test/03: SkipSlow # --no_intrinsify -bigint_test/15: SkipSlow # --no_intrinsify - -[ $compiler == ddc ] -bigint_test/03: SkipSlow # modPow is very slow -bigint_test/15: SkipSlow # modPow is very slow -list_concurrent_modify_self_test: SkipSlow # missing check causes list to grow to whole heap -regexp/lookbehind_test/01: Skip # Flaky in uncatchable way. Issue 36280 -uri_parse_test: Slow, Pass -uri_test: Slow, Pass - -[ $mode == debug ] -regexp/pcre_test: Slow, Pass # Issue 22008 - -[ $runtime != none ] -string_runes_test: Skip # See breaking change #40674 - -[ $system == android ] -throw_half_surrogate_pair_test/*: Skip # Issue http://dartbug.com/42094 - -[ $simulator ] -bigint_parse_radix_test: Skip # Issue 31659 -bigint_test: Skip # Issue 31659 - -[ $arch == x64 && $system == windows ] -stopwatch_test: Skip # Flaky test due to expected performance behaviour. - -[ $compiler != dart2analyzer && $compiler != dart2js && $compiler != ddc ] -bigint_js_test: SkipByDesign # JavaScript-specific test - -[ $compiler == dart2js && $runtime != none ] -regexp/pcre_test: Slow, Pass # Issue 21593 - -[ $compiler == dart2js && $runtime == safari ] -date_time11_test: Skip # evades flake detection https://github.com/dart-lang/sdk/issues/50718 -local_date_time_test: Skip # evades flake detection https://github.com/dart-lang/sdk/issues/50718 -regexp/unicode-property-char-class_test: Skip # evades flake detection https://github.com/dart-lang/sdk/issues/50718 -regexp/unicode-property-invalid_test: Skip # evades flake detection https://github.com/dart-lang/sdk/issues/50718 -regexp/unicode-regexp-restricted-syntax_test: Skip # evades flake detection https://github.com/dart-lang/sdk/issues/50718 - -[ $runtime != dart_precompiled && $runtime != vm ] -reg_exp_receive_port_test: SkipByDesign # uses SendPort/ReceivePort - -[ $runtime != none && ($compiler == dart2js || $compiler == ddc) ] -int_parse_with_limited_ints_test: SkipByDesign # Requires fixed-size int64 support. -integer_arith_vm_test: SkipByDesign # Is a VM optimization test that requires int64 support. -iterable_return_type_int64_test: SkipByDesign # Requires int64 support. -typed_data_with_limited_ints_test: SkipByDesign # Requires fixed-size int64 support. - -[ $builder_tag == dwarf || $builder_tag == obfuscated ] -error_stack_trace1_test: SkipByDesign # Relies on symbol names in stack traces. - -[ $runtime == dart_precompiled || $runtime == vm ] -regexp/global_test: Skip # Issue 21709 -regexp/pcre_test: Slow, Pass - -[ $hot_reload || $hot_reload_rollback ] -bigint_parse_radix_test: Skip # Issue 31659. Issue 34361. -bigint_test: Skip # Issue 31659 -integer_parsed_mul_div_vm_test: Slow, Pass # Slow diff --git a/tests/corelib_2/data_uri_test.dart b/tests/corelib_2/data_uri_test.dart deleted file mode 100644 index ddff61425f9..00000000000 --- a/tests/corelib_2/data_uri_test.dart +++ /dev/null @@ -1,344 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; -import "dart:convert"; -import "dart:typed_data"; - -main() { - testMediaType(); - - testRoundTrip(""); - testRoundTrip("a"); - testRoundTrip("ab"); - testRoundTrip("abc"); - testRoundTrip("abcd"); - testRoundTrip("Content with special%25 characters: # ? = % # ? = %"); - testRoundTrip("blåbærgrød", utf8); - testRoundTrip("blåbærgrød", latin1); - - testUriEquals("data:,abc?d"); - testUriEquals("DATA:,ABC?D"); - testUriEquals("data:,a%20bc?d"); - testUriEquals("DATA:,A%20BC?D"); - testUriEquals("data:,abc?d%23e"); // # must and will be is escaped. - - // Test that UriData.uri normalizes path and query. - - testUtf8Encoding("\u1000\uffff"); - testBytes(); - testInvalidCharacters(); - testNormalization(); - testErrors(); -} - -void testMediaType() { - for (var mimeType in ["", "text/plain", "Text/PLAIN", "text/javascript"]) { - for (var charset in ["", "US-ASCII", "UTF-8"]) { - for (var base64 in ["", ";base64"]) { - bool isBase64 = base64.isNotEmpty; - // Parsing the URI from source: - var charsetParameter = charset.isEmpty ? "" : ";charset=$charset"; - var text = "data:$mimeType$charsetParameter$base64,"; - var uri = UriData.parse(text); - - String expectedCharset = charset.isEmpty ? "US-ASCII" : charset; - String expectedMimeType = mimeType.isEmpty ? "text/plain" : mimeType; - - Expect.equals(text, "$uri"); - Expect.equals(expectedMimeType, uri.mimeType); - Expect.isTrue(uri.isMimeType(expectedMimeType)); - Expect.isTrue(uri.isMimeType(expectedMimeType.toUpperCase())); - Expect.isTrue(uri.isMimeType(expectedMimeType.toLowerCase())); - Expect.equals(expectedCharset, uri.charset); - Expect.isTrue(uri.isCharset(expectedCharset)); - Expect.isTrue(uri.isCharset(expectedCharset.toLowerCase())); - Expect.isTrue(uri.isCharset(expectedCharset.toUpperCase())); - var expectedEncoding = Encoding.getByName(expectedCharset); - if (expectedEncoding != null) { - Expect.isTrue(uri.isEncoding(expectedEncoding)); - } - Expect.equals(isBase64, uri.isBase64); - - // Creating the URI using a constructor: - var encoding = Encoding.getByName(charset); - uri = UriData.fromString("", - mimeType: mimeType, encoding: encoding, base64: isBase64); - expectedMimeType = - (mimeType.isEmpty || mimeType.toLowerCase() == "text/plain") - ? "text/plain" - : mimeType; - expectedEncoding = encoding; - expectedCharset = expectedEncoding?.name ?? "US-ASCII"; - var expectedText = "data:" - "${expectedMimeType == "text/plain" ? "" : expectedMimeType}" - "${charset.isEmpty ? "" : ";charset=$expectedCharset"}" - "${isBase64 ? ";base64" : ""}" - ","; - - Expect.equals(expectedText, "$uri"); - Expect.equals(expectedMimeType, uri.mimeType); - Expect.isTrue(uri.isMimeType(expectedMimeType)); - Expect.isTrue(uri.isMimeType(expectedMimeType.toUpperCase())); - Expect.isTrue(uri.isMimeType(expectedMimeType.toLowerCase())); - Expect.equals(expectedCharset, uri.charset); - Expect.isTrue(uri.isCharset(expectedCharset)); - Expect.isTrue(uri.isCharset(expectedCharset.toLowerCase())); - Expect.isTrue(uri.isCharset(expectedCharset.toUpperCase())); - if (expectedEncoding != null) { - Expect.isTrue(uri.isEncoding(expectedEncoding)); - } - Expect.equals(isBase64, uri.isBase64); - } - } - } -} - -void testRoundTrip(String content, [Encoding encoding]) { - UriData dataUri = new UriData.fromString(content, encoding: encoding); - Expect.isFalse(dataUri.isBase64); - Uri uri = dataUri.uri; - expectUriEquals(new Uri.dataFromString(content, encoding: encoding), uri); - - if (encoding != null) { - UriData dataUriParams = - new UriData.fromString(content, parameters: {"charset": encoding.name}); - Expect.equals("$dataUri", "$dataUriParams"); - } - - Expect.equals(encoding ?? ascii, Encoding.getByName(dataUri.charset)); - Expect.equals(content, dataUri.contentAsString(encoding: encoding)); - Expect.equals(content, dataUri.contentAsString()); - Expect.equals(content, (encoding ?? ascii).decode(dataUri.contentAsBytes())); - - uri = dataUri.uri; - Expect.equals(uri.toString(), dataUri.toString()); - Expect.equals(dataUri.toString(), new UriData.fromUri(uri).toString()); - - dataUri = new UriData.fromBytes(content.codeUnits); - Expect.listEquals(content.codeUnits, dataUri.contentAsBytes()); - Expect.equals(content, dataUri.contentAsString(encoding: latin1)); - - uri = dataUri.uri; - Expect.equals(uri.toString(), dataUri.toString()); - Expect.equals(dataUri.toString(), new UriData.fromUri(uri).toString()); - // Check that the URI is properly normalized. - expectUriEquals(uri, Uri.parse("$uri")); -} - -void testUtf8Encoding(String content) { - UriData uri = new UriData.fromString(content, encoding: utf8); - Expect.equals(content, uri.contentAsString(encoding: utf8)); - Expect.listEquals(utf8.encode(content), uri.contentAsBytes()); -} - -void testInvalidCharacters() { - // SPACE, CTL and tspecial, plus '%' and '#' (URI gen-delim) - // This contains all ASCII character that are not valid in attribute/value - // parts. - var invalid = - '\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x7f' - ' ()<>@,;:"/[]?=%#\x80\u{1000}\u{10000}'; - var invalidNoSlash = invalid.replaceAll('/', ''); - var dataUri = new UriData.fromString(invalid, - encoding: utf8, - mimeType: "$invalidNoSlash/$invalidNoSlash", - parameters: {invalid: invalid}); - - Expect.equals(invalid, dataUri.contentAsString()); - Expect.equals("$invalidNoSlash/$invalidNoSlash", dataUri.mimeType); - Expect.equals(invalid, dataUri.parameters[invalid]); - - var uri = dataUri.uri; - Expect.equals("$uri", "$dataUri"); - expectUriEquals(uri, Uri.parse("$uri")); // Check that it's canonicalized. - Expect.equals("$dataUri", new UriData.fromUri(uri).toString()); -} - -void testBytes() { - void testList(List list) { - var dataUri = new UriData.fromBytes(list); - Expect.equals("application/octet-stream", dataUri.mimeType); - Expect.isTrue(dataUri.isBase64); - Expect.listEquals(list, dataUri.contentAsBytes()); - - dataUri = new UriData.fromBytes(list, percentEncoded: true); - Expect.equals("application/octet-stream", dataUri.mimeType); - Expect.isFalse(dataUri.isBase64); - Expect.listEquals(list, dataUri.contentAsBytes()); - - var string = new String.fromCharCodes(list); - - dataUri = new UriData.fromString(string, encoding: latin1); - Expect.equals("text/plain", dataUri.mimeType); - Expect.isFalse(dataUri.isBase64); - Expect.listEquals(list, dataUri.contentAsBytes()); - - dataUri = new UriData.fromString(string, encoding: latin1, base64: true); - Expect.equals("text/plain", dataUri.mimeType); - Expect.isTrue(dataUri.isBase64); - Expect.listEquals(list, dataUri.contentAsBytes()); - } - - void testLists(List list) { - testList(list); - for (int i = 0; i < 27; i++) { - testList(list.sublist(i, i + i)); // All lengths from 0 to 27. - } - } - - var bytes = new Uint8List(512); - for (int i = 0; i < bytes.length; i++) { - bytes[i] = i; - } - testLists(bytes); - testLists(new List.from(bytes)); - testLists(new List.unmodifiable(bytes)); -} - -void testNormalization() { - // Base-64 normalization. - - // Normalized URI-alphabet characters. - Expect.equals( - "data:;base64,AA/+", UriData.parse("data:;base64,AA_-").toString()); - // Normalized escapes. - Expect.equals( - "data:;base64,AB==", UriData.parse("data:;base64,A%42=%3D").toString()); - Expect.equals("data:;base64,/+/+", - UriData.parse("data:;base64,%5F%2D%2F%2B").toString()); - // Normalized padded data. - Expect.equals( - "data:;base64,AA==", UriData.parse("data:;base64,AA%3D%3D").toString()); - Expect.equals( - "data:;base64,AAA=", UriData.parse("data:;base64,AAA%3D").toString()); - // Normalized unpadded data. - Expect.equals( - "data:;base64,AA==", UriData.parse("data:;base64,AA").toString()); - Expect.equals( - "data:;base64,AAA=", UriData.parse("data:;base64,AAA").toString()); - - // "URI normalization" of non-base64 content. - var uri = UriData.parse("data:,\x20\xa0"); - Expect.equals("data:,%20%C2%A0", uri.toString()); - uri = UriData.parse("data:,x://x@y:[z]:42/p/./?q=x&y=z#?#\u1234\u{12345}"); - Expect.equals( - "data:,x://x@y:%5Bz%5D:42/p/./?q=x&y=z%23?%23%E1%88%B4%F0%92%8D%85", - uri.toString()); -} - -void testErrors() { - // Invalid constructor parameters. - Expect.throwsArgumentError( - () => new UriData.fromBytes([], mimeType: "noslash")); - Expect.throwsArgumentError(() => new UriData.fromBytes([257])); - Expect.throwsArgumentError(() => new UriData.fromBytes([-1])); - Expect.throwsArgumentError(() => new UriData.fromBytes([0x10000000])); - Expect.throwsArgumentError( - () => new UriData.fromString("", mimeType: "noslash")); - - Expect.throwsArgumentError( - () => new Uri.dataFromBytes([], mimeType: "noslash")); - Expect.throwsArgumentError(() => new Uri.dataFromBytes([257])); - Expect.throwsArgumentError(() => new Uri.dataFromBytes([-1])); - Expect.throwsArgumentError(() => new Uri.dataFromBytes([0x10000000])); - Expect.throwsArgumentError( - () => new Uri.dataFromString("", mimeType: "noslash")); - - // Empty parameters allowed, not an error. - var uri = new UriData.fromString("", mimeType: "", parameters: {}); - Expect.equals("data:,", "$uri"); - // Empty parameter key or value is an error. - Expect.throwsArgumentError( - () => new UriData.fromString("", parameters: {"": "X"})); - Expect.throwsArgumentError( - () => new UriData.fromString("", parameters: {"X": ""})); - - // Not recognizing charset is an error. - uri = UriData.parse("data:;charset=arglebargle,X"); - Expect.throws(() { - uri.contentAsString(); - }); - // Doesn't throw if we specify the encoding. - Expect.equals("X", uri.contentAsString(encoding: ascii)); - - // Parse format. - Expect.throwsFormatException(() => UriData.parse("notdata:,")); - Expect.throwsFormatException(() => UriData.parse("text/plain,noscheme")); - Expect.throwsFormatException(() => UriData.parse("data:noseparator")); - Expect.throwsFormatException(() => UriData.parse("data:noslash,text")); - Expect.throwsFormatException( - () => UriData.parse("data:type/sub;noequals,text")); - Expect.throwsFormatException(() => UriData.parse("data:type/sub;knocomma=")); - Expect.throwsFormatException( - () => UriData.parse("data:type/sub;k=v;nocomma")); - Expect.throwsFormatException(() => UriData.parse("data:type/sub;k=nocomma")); - Expect.throwsFormatException(() => UriData.parse("data:type/sub;k=v;base64")); - - void formatError(String input) { - Expect.throwsFormatException( - () => UriData.parse("data:;base64,$input"), input); - } - - // Invalid base64 format (detected when parsed). - for (var a = 0; a <= 4; a++) { - for (var p = 0; p <= 4; p++) { - // Base-64 encoding must have length divisible by four and no more - // than two padding characters at the end. - if (p < 3 && (a + p) % 4 == 0) continue; - if (p == 0 && a > 1) continue; - formatError("A" * a + "=" * p); - formatError("A" * a + "%3D" * p); - } - } - // Invalid base64 encoding: padding not at end. - formatError("AA=A"); - formatError("A=AA"); - formatError("=AAA"); - formatError("A==A"); - formatError("==AA"); - formatError("===A"); - formatError("AAA%3D="); - formatError("A%3D=="); - - // Invalid unpadded data. - formatError("A"); - formatError("AAAAA"); - - // Invalid characters. - formatError("AAA*"); - formatError("AAA\x00"); - formatError("AAA\\"); - formatError("AAA,"); - - // Invalid escapes. - formatError("AAA%25"); - formatError("AAA%7F"); - formatError("AAA%7F"); -} - -/// Checks that two [Uri]s are exactly the same. -expectUriEquals(Uri expect, Uri actual) { - Expect.equals(expect.scheme, actual.scheme, "scheme"); - Expect.equals(expect.hasAuthority, actual.hasAuthority, "hasAuthority"); - Expect.equals(expect.userInfo, actual.userInfo, "userInfo"); - Expect.equals(expect.host, actual.host, "host"); - Expect.equals(expect.hasPort, actual.hasPort, "hasPort"); - Expect.equals(expect.port, actual.port, "port"); - Expect.equals(expect.port, actual.port, "port"); - Expect.equals(expect.hasQuery, actual.hasQuery, "hasQuery"); - Expect.equals(expect.query, actual.query, "query"); - Expect.equals(expect.hasFragment, actual.hasFragment, "hasFragment"); - Expect.equals(expect.fragment, actual.fragment, "fragment"); -} - -void testUriEquals(String uriText) { - var data = UriData.parse(uriText); - var uri = Uri.parse(uriText); - Expect.equals(data.uri, uri); - Expect.equals(data.toString(), uri.data.toString()); - Expect.equals(data.toString(), uri.toString()); -} diff --git a/tests/corelib_2/date_time10_test.dart b/tests/corelib_2/date_time10_test.dart deleted file mode 100644 index cd3eb599ef0..00000000000 --- a/tests/corelib_2/date_time10_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Make sure the years in the range of single digits are handled correctly with -// month roll-over. (This tests an edge condition when delegating to -// JavaScript's Date constructor.) - -void check(String expected, DateTime actual) { - Expect.equals(expected, actual.toString()); -} - -testUtc() { - check("0099-01-01 00:00:00.000Z", new DateTime.utc(99, 1)); - check("0100-01-01 00:00:00.000Z", new DateTime.utc(99, 1 + 12)); - check("0000-01-01 00:00:00.000Z", new DateTime.utc(0, 1)); - check("-0001-01-01 00:00:00.000Z", new DateTime.utc(0, 1 - 12)); - - check("0099-03-02 00:00:00.000Z", new DateTime.utc(99, 2, 30)); - check("0100-03-02 00:00:00.000Z", new DateTime.utc(99, 2 + 12, 30)); - - check("0004-03-01 00:00:00.000Z", new DateTime.utc(3, 2 + 12, 30)); - check("0004-03-01 00:00:00.000Z", new DateTime.utc(4, 2, 30)); - check("0004-03-01 00:00:00.000Z", new DateTime.utc(5, 2 - 12, 30)); - - check("0005-03-02 00:00:00.000Z", new DateTime.utc(4, 2 + 12, 30)); - check("0005-03-02 00:00:00.000Z", new DateTime.utc(5, 2, 30)); - check("0005-03-02 00:00:00.000Z", new DateTime.utc(6, 2 - 12, 30)); -} - -testLocal() { - check("0099-01-01 00:00:00.000", new DateTime(99, 1)); - check("0100-01-01 00:00:00.000", new DateTime(99, 1 + 12)); - check("0000-01-01 00:00:00.000", new DateTime(0, 1)); - check("-0001-01-01 00:00:00.000", new DateTime(0, 1 - 12)); - - check("0099-03-02 00:00:00.000", new DateTime(99, 2, 30)); - check("0100-03-02 00:00:00.000", new DateTime(99, 2 + 12, 30)); - - check("0004-03-01 00:00:00.000", new DateTime(3, 2 + 12, 30)); - check("0004-03-01 00:00:00.000", new DateTime(4, 2, 30)); - check("0004-03-01 00:00:00.000", new DateTime(5, 2 - 12, 30)); - - check("0005-03-02 00:00:00.000", new DateTime(4, 2 + 12, 30)); - check("0005-03-02 00:00:00.000", new DateTime(5, 2, 30)); - check("0005-03-02 00:00:00.000", new DateTime(6, 2 - 12, 30)); -} - -main() { - testUtc(); - testLocal(); -} diff --git a/tests/corelib_2/date_time11_test.dart b/tests/corelib_2/date_time11_test.dart deleted file mode 100644 index 7039b1ea793..00000000000 --- a/tests/corelib_2/date_time11_test.dart +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -// Make sure that date-times close to daylight savings work correctly. -// See http://dartbug.com/30550 - -/// A list of (decomposed) date-times where daylight saving changes -/// happen. -/// -/// This list covers multiple timezones to increase test coverage on -/// different machines. -final daylightSavingChanges = [ - // TZ environment, y, m, d, h, change. - ["Europe/Paris", 2017, 03, 26, 02, 60], - ["Europe/Paris", 2017, 10, 29, 03, -60], - ["Antarctica/Troll", 2017, 03, 19, 01, 120], - ["Antarctica/Troll", 2017, 10, 29, 03, -120], - ["Australia/Canberra", 2017, 04, 02, 03, -60], - ["Australia/Canberra", 2017, 10, 01, 02, 60], - ["Australia/Lord_Howe", 2017, 04, 02, 02, -30], - ["Australia/Lord_Howe", 2017, 10, 01, 02, 30], - ["Atlantic/Bermuda", 2017, 03, 12, 02, 60], // US and Canada. - ["Atlantic/Bermuda", 2017, 11, 05, 02, -60], - ["America/Campo_Grande", 2017, 02, 19, 00, -60], // Brazil - ["America/Campo_Grande", 2017, 10, 15, 00, 60], - ["America/Santiago", 2017, 05, 14, 00, -60], - ["America/Santiago", 2017, 08, 13, 00, 60], - ["Chile/EasterIsland", 2017, 05, 13, 22, -60], - ["Chile/EasterIsland", 2017, 08, 12, 22, 60], - ["Pacific/Fiji", 2017, 01, 15, 03, -60], - ["Pacific/Fiji", 2017, 11, 05, 02, 60], - ["America/Scoresbysund", 2017, 03, 26, 00, 60], // Ittoqqortoormiit. - ["America/Scoresbysund", 2017, 10, 29, 01, -60], - ["Asia/Tehran", 2017, 03, 22, 00, 60], - ["Asia/Tehran", 2017, 09, 22, 00, -60], - ["Israel", 2017, 03, 24, 02, 60], - ["Israel", 2017, 10, 29, 02, -60], - ["Asia/Amman", 2017, 03, 31, 00, 60], - ["Asia/Amman", 2017, 10, 27, 01, -60], - ["Mexico/General", 2017, 04, 02, 02, 60], - ["Mexico/General", 2017, 10, 29, 02, -60], -]; - -void runTests() { - // Makes sure we don't go into the wrong direction during a - // daylight-savings change (as happened in #30550). - for (var test in daylightSavingChanges) { - for (int i = 0; i < 2; i++) { - int year = test[1]; - int month = test[2]; - int day = test[3]; - int hour = test[4]; - - int minute = i == 0 ? 0 : test[5]; - // Rather adjust the hours than keeping the minutes. - hour += minute ~/ 60; - minute = minute.remainder(60); - if (hour < 0) { - hour += 24; - day--; - } - - { - // Check that microseconds are taken into account. - var dtMillisecond = new DateTime(year, month, day, hour, minute, 0, 1); - var dtSecond = new DateTime(year, month, day, hour, minute, 1); - Expect.equals(const Duration(milliseconds: 999), - dtSecond.difference(dtMillisecond)); - - dtMillisecond = new DateTime(year, month, day, hour, minute, 0, -1); - dtSecond = new DateTime(year, month, day, hour, minute, -1); - Expect.equals(const Duration(milliseconds: 999), - dtMillisecond.difference(dtSecond)); - } - - var dt1 = new DateTime(year, month, day, hour); - var dt2 = new DateTime(year, month, day, hour, 1); - - // Earlier: - int earlierDay = day; - int earlierHour = hour - 1; - if (earlierHour < 0) { - earlierHour = 23; - earlierDay--; - } - var dt3 = new DateTime(year, month, earlierDay, earlierHour, 59); - - var diff1 = dt2.difference(dt1).inMinutes; - var diff2 = dt1.difference(dt3).inMinutes; - - if (diff1 == 1 && diff2 == 1 && dt1.hour == hour && dt1.minute == 0) { - // Regular date-time. - continue; - } - - // At most one is at a distance of more than a minute. - Expect.isTrue(diff1 == 1 || diff2 == 1); - - if (diff2 < 0) { - // This happens, when we ask for invalid times. - // Suppose daylight-saving is at 2:00 and switches to 3:00. If we - // ask for 2:59, we get 3:59 (59 minutes after 2:00). - Expect.isFalse(dt3.day == earlierDay && dt3.hour == earlierHour); - // If that's the case, then removing one minute from dt1 should - // not yield a date-time with the earlier values, and it should - // be far away from dt3. - var dt4 = dt1.add(const Duration(minutes: -1)); - Expect.isFalse(dt4.day == earlierDay && dt4.hour == earlierHour); - Expect.isTrue(dt4.isBefore(dt1)); - Expect.isTrue(dt4.day < earlierDay || - (dt4.day == earlierDay && dt4.hour < earlierHour)); - continue; - } - - // They must be in the right order. - Expect.isTrue(dt1.isBefore(dt2)); - Expect.isTrue(dt3.isBefore(dt1)); - } - } -} - -void main(List args) { - // The following code constructs a String with all timezones that are - // relevant for this test. - // This can be helpful for running tests in multiple timezones. - // Typically, one would write something like: - // for tz in ; do TZ=$tz tools/test.py ...; done - var result = new StringBuffer(); - for (int i = 0; i < daylightSavingChanges.length; i += 2) { - if (i != 0) result.write(" "); - result.write(daylightSavingChanges[i][0]); - } - - runTests(); -} diff --git a/tests/corelib_2/date_time2_test.dart b/tests/corelib_2/date_time2_test.dart deleted file mode 100644 index e443b495ef0..00000000000 --- a/tests/corelib_2/date_time2_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Dart test program for DateTime's hashCode. - -main() { - var d = DateTime.parse("2000-01-01T00:00:00Z"); - var d2 = DateTime.parse("2000-01-01T00:00:01Z"); - // There is no guarantee that the hashcode for these two dates is different, - // but in the worst case we will have to fix this test. - // The important test here is, that DateTime . - Expect.isFalse(d.hashCode == d2.hashCode); -} diff --git a/tests/corelib_2/date_time3_test.dart b/tests/corelib_2/date_time3_test.dart deleted file mode 100644 index 63349cd0acf..00000000000 --- a/tests/corelib_2/date_time3_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// At some point dart was emitting a bad padding 0 for Dates where the ms were -// ending with 10. - -main() { - String s = "2012-01-30 08:30:00.010"; - DateTime d = DateTime.parse(s); - Expect.equals(s, d.toString()); -} diff --git a/tests/corelib_2/date_time4_test.dart b/tests/corelib_2/date_time4_test.dart deleted file mode 100644 index 549f4362a08..00000000000 --- a/tests/corelib_2/date_time4_test.dart +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test fromString with 6 digits after the decimal point. - -bool get supportsMicroseconds => - new DateTime.fromMicrosecondsSinceEpoch(1).microsecondsSinceEpoch == 1; - -main() { - if (supportsMicroseconds) { - testMicrosecondPrecision(); - } else { - testMillisecondPrecision(); - } -} - -void testMillisecondPrecision() { - // We only support milliseconds. If the user supplies more data (the "51" - // here), we round. - DateTime dt1 = DateTime.parse("1999-01-02 23:59:59.999519"); - Expect.equals(1999, dt1.year); - Expect.equals(1, dt1.month); - Expect.equals(3, dt1.day); - Expect.equals(0, dt1.hour); - Expect.equals(0, dt1.minute); - Expect.equals(0, dt1.second); - Expect.equals(0, dt1.millisecond); - Expect.equals(false, dt1.isUtc); - dt1 = DateTime.parse("1999-01-02 23:58:59.999519Z"); - Expect.equals(1999, dt1.year); - Expect.equals(1, dt1.month); - Expect.equals(2, dt1.day); - Expect.equals(23, dt1.hour); - Expect.equals(59, dt1.minute); - Expect.equals(0, dt1.second); - Expect.equals(0, dt1.millisecond); - Expect.equals(true, dt1.isUtc); - dt1 = DateTime.parse("0009-09-09 09:09:09.009411Z"); - Expect.equals(9, dt1.year); - Expect.equals(9, dt1.month); - Expect.equals(9, dt1.day); - Expect.equals(9, dt1.hour); - Expect.equals(9, dt1.minute); - Expect.equals(9, dt1.second); - Expect.equals(9, dt1.millisecond); - Expect.equals(true, dt1.isUtc); - String svnDate = "2012-03-30T04:28:13.752341Z"; - dt1 = DateTime.parse(svnDate); - Expect.equals(2012, dt1.year); - Expect.equals(3, dt1.month); - Expect.equals(30, dt1.day); - Expect.equals(4, dt1.hour); - Expect.equals(28, dt1.minute); - Expect.equals(13, dt1.second); - Expect.equals(752, dt1.millisecond); - Expect.equals(true, dt1.isUtc); -} - -void testMicrosecondPrecision() { - DateTime dt1 = DateTime.parse("1999-01-02 23:59:59.999519"); - Expect.equals(1999, dt1.year); - Expect.equals(1, dt1.month); - Expect.equals(2, dt1.day); - Expect.equals(23, dt1.hour); - Expect.equals(59, dt1.minute); - Expect.equals(59, dt1.second); - Expect.equals(999, dt1.millisecond); - Expect.equals(519, dt1.microsecond); - Expect.equals(false, dt1.isUtc); - dt1 = DateTime.parse("1999-01-02 23:58:59.999519Z"); - Expect.equals(1999, dt1.year); - Expect.equals(1, dt1.month); - Expect.equals(2, dt1.day); - Expect.equals(23, dt1.hour); - Expect.equals(58, dt1.minute); - Expect.equals(59, dt1.second); - Expect.equals(999, dt1.millisecond); - Expect.equals(519, dt1.microsecond); - Expect.equals(true, dt1.isUtc); - dt1 = DateTime.parse("0009-09-09 09:09:09.009411Z"); - Expect.equals(9, dt1.year); - Expect.equals(9, dt1.month); - Expect.equals(9, dt1.day); - Expect.equals(9, dt1.hour); - Expect.equals(9, dt1.minute); - Expect.equals(9, dt1.second); - Expect.equals(9, dt1.millisecond); - Expect.equals(411, dt1.microsecond); - Expect.equals(true, dt1.isUtc); - String svnDate = "2012-03-30T04:28:13.752341Z"; - dt1 = DateTime.parse(svnDate); - Expect.equals(2012, dt1.year); - Expect.equals(3, dt1.month); - Expect.equals(30, dt1.day); - Expect.equals(4, dt1.hour); - Expect.equals(28, dt1.minute); - Expect.equals(13, dt1.second); - Expect.equals(752, dt1.millisecond); - Expect.equals(341, dt1.microsecond); - Expect.equals(true, dt1.isUtc); -} diff --git a/tests/corelib_2/date_time5_test.dart b/tests/corelib_2/date_time5_test.dart deleted file mode 100644 index af54f5e116e..00000000000 --- a/tests/corelib_2/date_time5_test.dart +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test DateTime constructor with optional arguments. - -main() { - var d = new DateTime(2012); - Expect.equals(2012, d.year); - Expect.equals(1, d.month); - Expect.equals(1, d.day); - Expect.equals(0, d.hour); - Expect.equals(0, d.minute); - Expect.equals(0, d.second); - Expect.equals(0, d.millisecond); - - d = new DateTime(2012, 1, 28); - Expect.equals(2012, d.year); - Expect.equals(1, d.month); - Expect.equals(28, d.day); - Expect.equals(0, d.hour); - Expect.equals(0, d.minute); - Expect.equals(0, d.second); - Expect.equals(0, d.millisecond); - - d = new DateTime(1970, 3); - Expect.equals(1970, d.year); - Expect.equals(3, d.month); - Expect.equals(1, d.day); - Expect.equals(0, d.hour); - Expect.equals(0, d.minute); - Expect.equals(0, d.second); - Expect.equals(0, d.millisecond); - - d = new DateTime(1970, 3, 1, 11); - Expect.equals(1970, d.year); - Expect.equals(3, d.month); - Expect.equals(1, d.day); - Expect.equals(11, d.hour); - Expect.equals(0, d.minute); - Expect.equals(0, d.second); - Expect.equals(0, d.millisecond); - - d = new DateTime(0, 12, 24, 0, 12); - Expect.equals(0, d.year); - Expect.equals(12, d.month); - Expect.equals(24, d.day); - Expect.equals(0, d.hour); - Expect.equals(12, d.minute); - Expect.equals(0, d.second); - Expect.equals(0, d.millisecond); - - d = new DateTime(-1, 2, 2, 3, 0, 0, 4); - Expect.equals(-1, d.year); - Expect.equals(2, d.month); - Expect.equals(2, d.day); - Expect.equals(3, d.hour); - Expect.equals(0, d.minute); - Expect.equals(0, d.second); - Expect.equals(4, d.millisecond); - - d = new DateTime(-1, 2, 2, 3, 0, 4); - Expect.equals(-1, d.year); - Expect.equals(2, d.month); - Expect.equals(2, d.day); - Expect.equals(3, d.hour); - Expect.equals(0, d.minute); - Expect.equals(4, d.second); - Expect.equals(0, d.millisecond); - - d = new DateTime(2012, 5, 15, 13, 21, 33, 12); - Expect.equals(2012, d.year); - Expect.equals(5, d.month); - Expect.equals(15, d.day); - Expect.equals(13, d.hour); - Expect.equals(21, d.minute); - Expect.equals(33, d.second); - Expect.equals(12, d.millisecond); -} diff --git a/tests/corelib_2/date_time6_test.dart b/tests/corelib_2/date_time6_test.dart deleted file mode 100644 index 896225d2c47..00000000000 --- a/tests/corelib_2/date_time6_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test DateTime comparison operators. - -main() { - var d = new DateTime.fromMillisecondsSinceEpoch(0, isUtc: true); - var d2 = new DateTime.fromMillisecondsSinceEpoch(1, isUtc: true); - Expect.isTrue(d.isBefore(d2)); - Expect.isTrue(!d.isAfter(d2)); - Expect.isTrue(d2.isAfter(d)); - Expect.isTrue(!d2.isBefore(d)); - Expect.isFalse(d2.isBefore(d)); - Expect.isFalse(!d2.isAfter(d)); - Expect.isFalse(d.isAfter(d2)); - Expect.isFalse(!d.isBefore(d2)); - - d = new DateTime.fromMillisecondsSinceEpoch(-1, isUtc: true); - d2 = new DateTime.fromMillisecondsSinceEpoch(0, isUtc: true); - Expect.isTrue(d.isBefore(d2)); - Expect.isTrue(!d.isAfter(d2)); - Expect.isTrue(d2.isAfter(d)); - Expect.isTrue(!d2.isBefore(d)); - Expect.isFalse(d2.isBefore(d)); - Expect.isFalse(!d2.isAfter(d)); - Expect.isFalse(d.isAfter(d2)); - Expect.isFalse(!d.isBefore(d2)); -} diff --git a/tests/corelib_2/date_time7_test.dart b/tests/corelib_2/date_time7_test.dart deleted file mode 100644 index 3f062f742ec..00000000000 --- a/tests/corelib_2/date_time7_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test DateTime timeZoneName and timeZoneOffset getters. - -testUtc() { - var d = DateTime.parse("2012-03-04T03:25:38.123Z"); - Expect.equals("UTC", d.timeZoneName); - Expect.equals(0, d.timeZoneOffset.inSeconds); -} - -testLocal() { - checkOffset(String name, Duration offset) { - // Timezone abbreviations are not in bijection with their timezones. - // For example AST stands for "Arab Standard Time" (UTC+03), as well as - // "Arabian Standard Time" (UTC+04), or PST stands for Pacific Standard Time - // and Philippine Standard Time. - // - // Hardcode some common timezones. - if (name == "CET") { - Expect.equals(1, offset.inHours); - } else if (name == "CEST") { - Expect.equals(2, offset.inHours); - } else if (name == "GMT") { - Expect.equals(0, offset.inSeconds); - } else if (name == "EST") { - Expect.equals(-5, offset.inHours); - } else if (name == "EDT") { - Expect.equals(-4, offset.inHours); - } else if (name == "PDT") { - Expect.equals(-7, offset.inHours); - } - } - - var d = DateTime.parse("2012-01-02T13:45:23"); - String name = d.timeZoneName; - checkOffset(name, d.timeZoneOffset); - - d = DateTime.parse("2012-07-02T13:45:23"); - name = d.timeZoneName; - checkOffset(name, d.timeZoneOffset); -} - -main() { - testUtc(); - testLocal(); -} diff --git a/tests/corelib_2/date_time8_test.dart b/tests/corelib_2/date_time8_test.dart deleted file mode 100644 index 0603bc0494e..00000000000 --- a/tests/corelib_2/date_time8_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Make sure the year 0 is correctly printed. - -testUtc() { - var d = new DateTime.utc(0, 1, 1); - Expect.equals("0000-01-01 00:00:00.000Z", d.toString()); -} - -testLocal() { - var d = new DateTime(0, 1, 1); - Expect.equals("0000-01-01 00:00:00.000", d.toString()); -} - -main() { - testUtc(); - testLocal(); -} diff --git a/tests/corelib_2/date_time9_test.dart b/tests/corelib_2/date_time9_test.dart deleted file mode 100644 index ed8bf1ee2fe..00000000000 --- a/tests/corelib_2/date_time9_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -main() { - var dt = new DateTime.now(); - Expect.isTrue(dt is Comparable); - - var dt2 = new DateTime.fromMillisecondsSinceEpoch(100); - var dt3 = new DateTime.fromMillisecondsSinceEpoch(200, isUtc: true); - var dt3b = new DateTime.fromMillisecondsSinceEpoch(200); - var dt4 = new DateTime.fromMillisecondsSinceEpoch(300); - var dt5 = new DateTime.fromMillisecondsSinceEpoch(400, isUtc: true); - var dt5b = new DateTime.fromMillisecondsSinceEpoch(400); - - Expect.isTrue(dt2.compareTo(dt2) == 0); - Expect.isTrue(dt3.compareTo(dt3) == 0); - Expect.isTrue(dt3b.compareTo(dt3b) == 0); - Expect.isTrue(dt4.compareTo(dt4) == 0); - Expect.isTrue(dt5.compareTo(dt5) == 0); - Expect.isTrue(dt5b.compareTo(dt5b) == 0); - - // Time zones don't have any effect. - Expect.isTrue(dt3.compareTo(dt3b) == 0); - Expect.isTrue(dt5.compareTo(dt5b) == 0); - - Expect.isTrue(dt2.compareTo(dt3) < 0); - Expect.isTrue(dt3.compareTo(dt4) < 0); - Expect.isTrue(dt4.compareTo(dt5) < 0); - - Expect.isTrue(dt2.compareTo(dt3b) < 0); - Expect.isTrue(dt4.compareTo(dt5b) < 0); - - Expect.isTrue(dt3.compareTo(dt2) > 0); - Expect.isTrue(dt4.compareTo(dt3) > 0); - Expect.isTrue(dt5.compareTo(dt4) > 0); - - Expect.isTrue(dt3b.compareTo(dt2) > 0); - Expect.isTrue(dt5b.compareTo(dt4) > 0); -} diff --git a/tests/corelib_2/date_time_copy_with_test.dart b/tests/corelib_2/date_time_copy_with_test.dart deleted file mode 100644 index 5d499091501..00000000000 --- a/tests/corelib_2/date_time_copy_with_test.dart +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Dart test program for DateTime.copyWith. - -testCopyWith( - DateTime original, - int year, - int month, - int day, - int hour, - int minute, - int second, - int millisecond, - bool isUtc, -) { - final result = original.copyWith( - year: year, - month: month, - day: day, - hour: hour, - minute: minute, - second: second, - millisecond: millisecond, - isUtc: isUtc, - ); - - final expected = isUtc - ? DateTime.utc( - year != null ? year : original.year, - month != null ? month : original.month, - day != null ? day : original.day, - hour != null ? hour : original.hour, - minute != null ? minute : original.minute, - second != null ? second : original.second, - millisecond != null ? millisecond : original.millisecond, - ) - : DateTime( - year != null ? year : original.year, - month != null ? month : original.month, - day != null ? day : original.day, - hour != null ? hour : original.hour, - minute != null ? minute : original.minute, - second != null ? second : original.second, - millisecond != null ? millisecond : original.millisecond, - ); - - Expect.equals(expected, result); -} - -void main() { - final epoch = DateTime.utc(1970, 1, 1); - final dst = DateTime.parse("2015-07-07T12:12:24Z"); - final leap = DateTime.parse("2012-02-28T12:12:24"); - - for (var year in [null, -100, 1917, 2012]) { - for (var month in [null, -1, 1, 2, 12, 14]) { - for (var day in [null, -1, 1, 28, 29, 30, 31, 32]) { - for (var hour in [null, -1, 0, 23, 25]) { - for (var minute in [null, -1, 1, 59, 61]) { - for (var second in [null, -1, 1, 59, 61]) { - for (var millisecond in [null, -1, 1, 999, 1001]) { - for (var isUtc in [false, true]) { - for (var base in [epoch, dst, leap]) { - testCopyWith( - base, - year, - month, - day, - hour, - minute, - second, - millisecond, - isUtc, - ); - } - } - } - } - } - } - } - } - } -} diff --git a/tests/corelib_2/date_time_extremes_test.dart b/tests/corelib_2/date_time_extremes_test.dart deleted file mode 100644 index a81c4da9931..00000000000 --- a/tests/corelib_2/date_time_extremes_test.dart +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Dart test program for DateTime, extreme values. - -bool get supportsMicroseconds => - new DateTime.fromMicrosecondsSinceEpoch(1).microsecondsSinceEpoch == 1; - -// Identical to _maxMillisecondsSinceEpoch in date_time.dart -const int _MAX_MILLISECONDS = 8640000000000000; - -void testExtremes() { - var dt = - new DateTime.fromMillisecondsSinceEpoch(_MAX_MILLISECONDS, isUtc: true); - Expect.equals(275760, dt.year); - Expect.equals(9, dt.month); - Expect.equals(13, dt.day); - Expect.equals(0, dt.hour); - Expect.equals(0, dt.minute); - Expect.equals(0, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(0, dt.microsecond); - dt = new DateTime.fromMillisecondsSinceEpoch(-_MAX_MILLISECONDS, isUtc: true); - Expect.equals(-271821, dt.year); - Expect.equals(4, dt.month); - Expect.equals(20, dt.day); - Expect.equals(0, dt.hour); - Expect.equals(0, dt.minute); - Expect.equals(0, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(0, dt.microsecond); - // Make sure that we can build the extreme dates in local too. - dt = new DateTime.fromMillisecondsSinceEpoch(_MAX_MILLISECONDS); - dt = new DateTime(dt.year, dt.month, dt.day, dt.hour, dt.minute); - Expect.equals(_MAX_MILLISECONDS, dt.millisecondsSinceEpoch); - dt = new DateTime.fromMillisecondsSinceEpoch(-_MAX_MILLISECONDS); - dt = new DateTime(dt.year, dt.month, dt.day, dt.hour, dt.minute); - Expect.equals(-_MAX_MILLISECONDS, dt.millisecondsSinceEpoch); - Expect.throws(() => new DateTime.fromMillisecondsSinceEpoch( - _MAX_MILLISECONDS + 1, - isUtc: true)); - Expect.throws(() => new DateTime.fromMillisecondsSinceEpoch( - -_MAX_MILLISECONDS - 1, - isUtc: true)); - Expect.throws( - () => new DateTime.fromMillisecondsSinceEpoch(_MAX_MILLISECONDS + 1)); - Expect.throws( - () => new DateTime.fromMillisecondsSinceEpoch(-_MAX_MILLISECONDS - 1)); - dt = new DateTime.fromMillisecondsSinceEpoch(_MAX_MILLISECONDS); - Expect.throws( - () => new DateTime(dt.year, dt.month, dt.day, dt.hour, dt.minute, 0, 1)); - dt = new DateTime.fromMillisecondsSinceEpoch(_MAX_MILLISECONDS, isUtc: true); - Expect.throws(() => - new DateTime.utc(dt.year, dt.month, dt.day, dt.hour, dt.minute, 0, 1)); - dt = new DateTime.fromMillisecondsSinceEpoch(-_MAX_MILLISECONDS); - Expect.throws( - () => new DateTime(dt.year, dt.month, dt.day, dt.hour, dt.minute, 0, -1)); - dt = new DateTime.fromMillisecondsSinceEpoch(-_MAX_MILLISECONDS, isUtc: true); - Expect.throws(() => - new DateTime.utc(dt.year, dt.month, dt.day, dt.hour, dt.minute, 0, -1)); - - if (!supportsMicroseconds) return; - - dt = new DateTime.fromMicrosecondsSinceEpoch(_MAX_MILLISECONDS * 1000); - dt = new DateTime(dt.year, dt.month, dt.day, dt.hour, dt.minute); - Expect.equals(_MAX_MILLISECONDS * 1000, dt.microsecondsSinceEpoch); - dt = new DateTime.fromMicrosecondsSinceEpoch(-_MAX_MILLISECONDS * 1000); - dt = new DateTime(dt.year, dt.month, dt.day, dt.hour, dt.minute); - Expect.equals(-_MAX_MILLISECONDS * 1000, dt.microsecondsSinceEpoch); - Expect.throws(() => new DateTime.fromMicrosecondsSinceEpoch( - _MAX_MILLISECONDS * 1000 + 1, - isUtc: true)); - Expect.throws(() => new DateTime.fromMicrosecondsSinceEpoch( - -_MAX_MILLISECONDS * 1000 - 1, - isUtc: true)); - Expect.throws(() => - new DateTime.fromMicrosecondsSinceEpoch(_MAX_MILLISECONDS * 1000 + 1)); - Expect.throws(() => - new DateTime.fromMicrosecondsSinceEpoch(-_MAX_MILLISECONDS * 1000 - 1)); - dt = new DateTime.fromMillisecondsSinceEpoch(_MAX_MILLISECONDS); - Expect.throws(() => - new DateTime(dt.year, dt.month, dt.day, dt.hour, dt.minute, 0, 0, 1)); - dt = new DateTime.fromMillisecondsSinceEpoch(_MAX_MILLISECONDS, isUtc: true); - Expect.throws(() => - new DateTime.utc(dt.year, dt.month, dt.day, dt.hour, dt.minute, 0, 0, 1)); - dt = new DateTime.fromMillisecondsSinceEpoch(-_MAX_MILLISECONDS); - Expect.throws(() => - new DateTime(dt.year, dt.month, dt.day, dt.hour, dt.minute, 0, 0, -1)); - dt = new DateTime.fromMillisecondsSinceEpoch(-_MAX_MILLISECONDS, isUtc: true); - Expect.throws(() => new DateTime.utc( - dt.year, dt.month, dt.day, dt.hour, dt.minute, 0, 0, -1)); -} - -void main() { - testExtremes(); -} diff --git a/tests/corelib_2/date_time_far_away_dates_test.dart b/tests/corelib_2/date_time_far_away_dates_test.dart deleted file mode 100644 index a22fe0f5181..00000000000 --- a/tests/corelib_2/date_time_far_away_dates_test.dart +++ /dev/null @@ -1,109 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Dart test program for DateTime, far away dates. - -// TODO(37442): Find far-away dates with milliseconds-since-epoch values that -// are 'web' integers. - -bool get supportsMicroseconds => - new DateTime.fromMicrosecondsSinceEpoch(1).microsecondsSinceEpoch == 1; - -void testFarAwayDates() { - DateTime dt = - new DateTime.fromMillisecondsSinceEpoch(1000000000000001, isUtc: true); - Expect.equals(33658, dt.year); - Expect.equals(9, dt.month); - Expect.equals(27, dt.day); - Expect.equals(1, dt.hour); - Expect.equals(46, dt.minute); - Expect.equals(40, dt.second); - Expect.equals(1, dt.millisecond); - Expect.equals(0, dt.microsecond); - dt = new DateTime.fromMillisecondsSinceEpoch(-1000000000000001, isUtc: true); - Expect.equals(-29719, dt.year); - Expect.equals(4, dt.month); - Expect.equals(5, dt.day); - Expect.equals(22, dt.hour); - Expect.equals(13, dt.minute); - Expect.equals(19, dt.second); - Expect.equals(999, dt.millisecond); - Expect.equals(0, dt.microsecond); - // Same with local zone. - dt = new DateTime.fromMillisecondsSinceEpoch(1000000000000001); - Expect.equals(33658, dt.year); - Expect.equals(9, dt.month); - Expect.equals(true, dt.day == 27 || dt.day == 26); - // Not much we can test for local hour. - Expect.equals(true, dt.hour >= 0 && dt.hour < 24); - // Timezones can have offsets down to 15 minute. - Expect.equals(true, dt.minute % 15 == 46 % 15); - Expect.equals(40, dt.second); - Expect.equals(1, dt.millisecond); - Expect.equals(0, dt.microsecond); - dt = new DateTime.fromMillisecondsSinceEpoch(-1000000000000001); - Expect.equals(-29719, dt.year); - Expect.equals(4, dt.month); - Expect.equals(true, 5 == dt.day || 6 == dt.day); - // Not much we can test for local hour. - Expect.equals(true, dt.hour >= 0 && dt.hour < 24); - // Timezones can have offsets down to 15 minute. - Expect.equals(true, dt.minute % 15 == 13); - Expect.equals(19, dt.second); - Expect.equals(999, dt.millisecond); - Expect.equals(0, dt.microsecond); - - if (!supportsMicroseconds) return; - dt = - new DateTime.fromMicrosecondsSinceEpoch(1000000000000000001, isUtc: true); - Expect.equals(33658, dt.year); - Expect.equals(9, dt.month); - Expect.equals(27, dt.day); - Expect.equals(1, dt.hour); - Expect.equals(46, dt.minute); - Expect.equals(40, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(1, dt.microsecond); - dt = new DateTime.fromMicrosecondsSinceEpoch(-1000000000000000001, - isUtc: true); - Expect.equals(-29719, dt.year); - Expect.equals(4, dt.month); - Expect.equals(5, dt.day); - Expect.equals(22, dt.hour); - Expect.equals(13, dt.minute); - Expect.equals(19, dt.second); - Expect.equals(999, dt.millisecond); - Expect.equals(999, dt.microsecond); - // Same with local zone. - dt = new DateTime.fromMicrosecondsSinceEpoch(1000000000000000001); - Expect.equals(33658, dt.year); - Expect.equals(9, dt.month); - Expect.equals(true, dt.day == 27 || dt.day == 26); - // Not much we can test for local hour. - Expect.equals(true, dt.hour >= 0 && dt.hour < 24); - // Timezones can have offsets down to 15 minute. - Expect.equals(true, dt.minute % 15 == 46 % 15); - Expect.equals(40, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(1, dt.microsecond); - dt = new DateTime.fromMicrosecondsSinceEpoch(-1000000000000000001); - Expect.equals(-29719, dt.year); - Expect.equals(4, dt.month); - Expect.equals(true, 5 == dt.day || 6 == dt.day); - // Not much we can test for local hour. - Expect.equals(true, dt.hour >= 0 && dt.hour < 24); - // Timezones can have offsets down to 15 minute. - Expect.equals(true, dt.minute % 15 == 13); - Expect.equals(19, dt.second); - Expect.equals(999, dt.millisecond); - Expect.equals(999, dt.microsecond); -} - -void main() { - testFarAwayDates(); -} diff --git a/tests/corelib_2/date_time_js_modified_test.dart b/tests/corelib_2/date_time_js_modified_test.dart deleted file mode 100644 index 5053c358561..00000000000 --- a/tests/corelib_2/date_time_js_modified_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// The JavaScript Date constructor 'corrects' 2-digit years NN to 19NN. -// Verify that a DateTime with year 1 is created correctly. -// Regression test for https://github.com/dart-lang/sdk/issues/42894 - -main() { - var d = new DateTime(1, 0, 1, 0, 0, 0, 0); - var d2 = new DateTime(0, 12, 1, 0, 0, 0, 0); - - Expect.equals(d, d2); -} diff --git a/tests/corelib_2/date_time_parse_test.dart b/tests/corelib_2/date_time_parse_test.dart deleted file mode 100644 index eb3d48c3986..00000000000 --- a/tests/corelib_2/date_time_parse_test.dart +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -check(DateTime expected, String str) { - DateTime actual = DateTime.parse(str); - Expect.equals(expected, actual); // Only checks if they are at the same time. - Expect.equals(expected.isUtc, actual.isUtc); -} - -bool get supportsMicroseconds => - new DateTime.fromMicrosecondsSinceEpoch(1).microsecondsSinceEpoch == 1; - -main() { - check(new DateTime(2012, 02, 27, 13, 27), "2012-02-27 13:27:00"); - if (supportsMicroseconds) { - check(new DateTime.utc(2012, 02, 27, 13, 27, 0, 123, 456), - "2012-02-27 13:27:00.1234567891234z"); - check(new DateTime.utc(2012, 02, 27, 13, 27, 0, 123, 456), - "2012-02-27 13:27:00,1234567891234z"); - } else { - check(new DateTime.utc(2012, 02, 27, 13, 27, 0, 123, 0), - "2012-02-27 13:27:00.1234567891234z"); - check(new DateTime.utc(2012, 02, 27, 13, 27, 0, 123, 0), - "2012-02-27 13:27:00,1234567891234z"); - } - check(new DateTime(2012, 02, 27, 13, 27), "20120227 13:27:00"); - check(new DateTime(2012, 02, 27, 13, 27), "20120227T132700"); - check(new DateTime(2012, 02, 27), "20120227"); - check(new DateTime(2012, 02, 27), "+20120227"); - check(new DateTime.utc(2012, 02, 27, 14), "2012-02-27T14Z"); - check(new DateTime.utc(-12345, 1, 1), "-123450101 00:00:00 Z"); - check(new DateTime.utc(2012, 02, 27, 14), "2012-02-27T14+00"); - check(new DateTime.utc(2012, 02, 27, 14), "2012-02-27T14+0000"); - check(new DateTime.utc(2012, 02, 27, 14), "2012-02-27T14+00:00"); - check(new DateTime.utc(2012, 02, 27, 14), "2012-02-27T14 +00:00"); - - check(new DateTime.utc(2015, 02, 14, 13, 0, 0, 0), "2015-02-15T00:00+11"); - check(new DateTime.utc(2015, 02, 14, 13, 0, 0, 0), "2015-02-15T00:00:00+11"); - check( - new DateTime.utc(2015, 02, 14, 13, 0, 0, 0), "2015-02-15T00:00:00+11:00"); - - if (supportsMicroseconds) { - check(new DateTime.utc(2015, 02, 15, 0, 0, 0, 500, 500), - "2015-02-15T00:00:00.500500Z"); - check(new DateTime.utc(2015, 02, 15, 0, 0, 0, 511, 500), - "2015-02-15T00:00:00.511500Z"); - } else { - check(new DateTime.utc(2015, 02, 15, 0, 0, 0, 501), - "2015-02-15T00:00:00.501Z"); - check(new DateTime.utc(2015, 02, 15, 0, 0, 0, 512), - "2015-02-15T00:00:00.512Z"); - } -} diff --git a/tests/corelib_2/date_time_test.dart b/tests/corelib_2/date_time_test.dart deleted file mode 100644 index 09bbecd3b46..00000000000 --- a/tests/corelib_2/date_time_test.dart +++ /dev/null @@ -1,1237 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Dart test program for DateTime. - -bool get supportsMicroseconds => - new DateTime.fromMicrosecondsSinceEpoch(1).microsecondsSinceEpoch == 1; - -// Identical to _maxMillisecondsSinceEpoch in date_time.dart -const int _MAX_MILLISECONDS = 8640000000000000; - -// Tests if the time moves eventually forward. -void testNow() { - var t1 = new DateTime.now(); - bool timeMovedForward = false; - const int N = 1000000; - outer: - while (true) { - for (int i = N; i > 0; i--) { - var t2 = new DateTime.now(); - if (t1.millisecondsSinceEpoch < t2.millisecondsSinceEpoch) { - break outer; - } - } - print("testNow: No Date.now() progress in $N loops. Time: $t1"); - } - Expect.isFalse(t1.isUtc); -} - -void testMillisecondsSinceEpoch() { - var dt1 = new DateTime.now(); - var millisecondsSinceEpoch = dt1.millisecondsSinceEpoch; - var dt2 = new DateTime.fromMillisecondsSinceEpoch(millisecondsSinceEpoch); - Expect.equals(millisecondsSinceEpoch, dt2.millisecondsSinceEpoch); -} - -void testMicrosecondsSinceEpoch() { - var dt1 = new DateTime.fromMillisecondsSinceEpoch(1); - var microsecondsSinceEpoch = dt1.microsecondsSinceEpoch; - var dt2 = new DateTime.fromMicrosecondsSinceEpoch(microsecondsSinceEpoch); - Expect.equals(microsecondsSinceEpoch, dt2.microsecondsSinceEpoch); - - dt1 = new DateTime.now(); - microsecondsSinceEpoch = dt1.microsecondsSinceEpoch; - dt2 = new DateTime.fromMicrosecondsSinceEpoch(microsecondsSinceEpoch); - Expect.equals(microsecondsSinceEpoch, dt2.microsecondsSinceEpoch); -} - -void testEquivalentYears() { - // All hardcoded values come from V8. This means that the values are not - // necessarily correct (see limitations of DateTime object in - // EcmaScript 15.9.1 and in particular 15.9.1.8/9). - DateTime dt = - new DateTime.fromMillisecondsSinceEpoch(-31485600000, isUtc: true); - Expect.equals(1969, dt.year); - Expect.equals(1, dt.month); - Expect.equals(1, dt.day); - Expect.equals(14, dt.hour); - Expect.equals(0, dt.minute); - Expect.equals(0, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(0, dt.microsecond); - dt = new DateTime.fromMillisecondsSinceEpoch(-63108000000, isUtc: true); - Expect.equals(1968, dt.year); - Expect.equals(1, dt.month); - Expect.equals(1, dt.day); - Expect.equals(14, dt.hour); - Expect.equals(0, dt.minute); - Expect.equals(0, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(0, dt.microsecond); - dt = new DateTime.fromMillisecondsSinceEpoch(-94644000000, isUtc: true); - Expect.equals(1967, dt.year); - Expect.equals(1, dt.month); - Expect.equals(1, dt.day); - Expect.equals(14, dt.hour); - Expect.equals(0, dt.minute); - Expect.equals(0, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(0, dt.microsecond); - dt = new DateTime.fromMillisecondsSinceEpoch(-126180000000, isUtc: true); - Expect.equals(1966, dt.year); - Expect.equals(1, dt.month); - Expect.equals(1, dt.day); - Expect.equals(14, dt.hour); - Expect.equals(0, dt.minute); - Expect.equals(0, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(0, dt.microsecond); - dt = new DateTime.fromMillisecondsSinceEpoch(-157716000000, isUtc: true); - Expect.equals(1965, dt.year); - Expect.equals(1, dt.month); - Expect.equals(1, dt.day); - Expect.equals(14, dt.hour); - Expect.equals(0, dt.minute); - Expect.equals(0, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(0, dt.microsecond); - dt = new DateTime.fromMillisecondsSinceEpoch(-2177402400000, isUtc: true); - Expect.equals(1901, dt.year); - Expect.equals(1, dt.month); - Expect.equals(1, dt.day); - Expect.equals(14, dt.hour); - Expect.equals(0, dt.minute); - Expect.equals(0, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(0, dt.microsecond); - dt = new DateTime.fromMillisecondsSinceEpoch(-5333076000000, isUtc: true); - Expect.equals(1801, dt.year); - Expect.equals(1, dt.month); - Expect.equals(1, dt.day); - Expect.equals(14, dt.hour); - Expect.equals(0, dt.minute); - Expect.equals(0, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(0, dt.microsecond); - dt = new DateTime.fromMillisecondsSinceEpoch(-8520285600000, isUtc: true); - Expect.equals(1700, dt.year); - Expect.equals(1, dt.month); - Expect.equals(1, dt.day); - Expect.equals(14, dt.hour); - Expect.equals(0, dt.minute); - Expect.equals(0, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(0, dt.microsecond); - dt = new DateTime.fromMillisecondsSinceEpoch(-14831719200000, isUtc: true); - Expect.equals(1500, dt.year); - Expect.equals(1, dt.month); - Expect.equals(1, dt.day); - Expect.equals(14, dt.hour); - Expect.equals(0, dt.minute); - Expect.equals(0, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(0, dt.microsecond); - dt = new DateTime.fromMillisecondsSinceEpoch(-59011408800000, isUtc: true); - Expect.equals(100, dt.year); - Expect.equals(1, dt.month); - Expect.equals(1, dt.day); - Expect.equals(14, dt.hour); - Expect.equals(0, dt.minute); - Expect.equals(0, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(0, dt.microsecond); - dt = new DateTime.fromMillisecondsSinceEpoch(-62011408800000, isUtc: true); - Expect.equals(4, dt.year); - Expect.equals(12, dt.month); - Expect.equals(8, dt.day); - Expect.equals(8, dt.hour); - Expect.equals(40, dt.minute); - Expect.equals(0, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(0, dt.microsecond); - dt = new DateTime.fromMillisecondsSinceEpoch(-64011408800000, isUtc: true); - Expect.equals(-59, dt.year); - Expect.equals(7, dt.month); - Expect.equals(24, dt.day); - Expect.equals(5, dt.hour); - Expect.equals(6, dt.minute); - Expect.equals(40, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(0, dt.microsecond); - final int SECONDS_YEAR_2035 = 2051222400; - dt = new DateTime.fromMillisecondsSinceEpoch(SECONDS_YEAR_2035 * 1000 + 1, - isUtc: true); - Expect.equals(2035, dt.year); - Expect.equals(1, dt.month); - Expect.equals(1, dt.day); - Expect.equals(0, dt.hour); - Expect.equals(0, dt.minute); - Expect.equals(0, dt.second); - Expect.equals(1, dt.millisecond); - Expect.equals(0, dt.microsecond); - dt = new DateTime.fromMillisecondsSinceEpoch(SECONDS_YEAR_2035 * 1000 - 1, - isUtc: true); - Expect.equals(2034, dt.year); - Expect.equals(12, dt.month); - Expect.equals(31, dt.day); - Expect.equals(23, dt.hour); - Expect.equals(59, dt.minute); - Expect.equals(59, dt.second); - Expect.equals(999, dt.millisecond); - Expect.equals(0, dt.microsecond); - - dt = new DateTime.utc(2035, 1, 1, 0, 0, 0, 1); - Expect.equals(SECONDS_YEAR_2035 * 1000 + 1, dt.millisecondsSinceEpoch); - dt = new DateTime.utc(2034, 12, 31, 23, 59, 59, 999); - Expect.equals(SECONDS_YEAR_2035 * 1000 - 1, dt.millisecondsSinceEpoch); - dt = new DateTime.fromMillisecondsSinceEpoch(SECONDS_YEAR_2035 * 1000 + 1); - Expect.equals( - true, - (2035 == dt.year && 1 == dt.month && 1 == dt.day) || - (2034 == dt.year && 12 == dt.month && 31 == dt.day)); - Expect.equals(0, dt.second); - Expect.equals(1, dt.millisecond); - DateTime dt2 = new DateTime( - dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second, dt.millisecond); - Expect.equals(dt.millisecondsSinceEpoch, dt2.millisecondsSinceEpoch); - dt = new DateTime.fromMillisecondsSinceEpoch(SECONDS_YEAR_2035 * 1000 - 1); - Expect.equals( - true, - (2035 == dt.year && 1 == dt.month && 1 == dt.day) || - (2034 == dt.year && 12 == dt.month && 31 == dt.day)); - Expect.equals(59, dt.second); - Expect.equals(999, dt.millisecond); - Expect.equals(0, dt.microsecond); - - dt2 = new DateTime( - dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second, dt.millisecond); - Expect.equals(dt.millisecondsSinceEpoch, dt2.millisecondsSinceEpoch); - dt = new DateTime.fromMillisecondsSinceEpoch(2100000000 * 1000, isUtc: true); - Expect.equals(2036, dt.year); - Expect.equals(7, dt.month); - Expect.equals(18, dt.day); - Expect.equals(13, dt.hour); - Expect.equals(20, dt.minute); - Expect.equals(0, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(0, dt.microsecond); - - // Internally this will use the maximum value for the native calls. - dt = new DateTime(2036, 7, 18, 13, 20); - Expect.equals(2036, dt.year); - Expect.equals(7, dt.month); - Expect.equals(18, dt.day); - Expect.equals(13, dt.hour); - Expect.equals(20, dt.minute); - Expect.equals(0, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(0, dt.microsecond); - Expect.equals("2036-07-18 13:20:00.000", dt.toString()); - - if (!supportsMicroseconds) return; - - dt = new DateTime.utc(2035, 1, 1, 0, 0, 0, 0, 1); - Expect.equals(SECONDS_YEAR_2035 * 1000000 + 1, dt.microsecondsSinceEpoch); - dt = new DateTime.utc(2034, 12, 31, 23, 59, 59, 999, 999); - Expect.equals(SECONDS_YEAR_2035 * 1000000 - 1, dt.microsecondsSinceEpoch); - dt = new DateTime.fromMicrosecondsSinceEpoch(SECONDS_YEAR_2035 * 1000000 + 1); - Expect.equals( - true, - (2035 == dt.year && 1 == dt.month && 1 == dt.day) || - (2034 == dt.year && 12 == dt.month && 31 == dt.day)); - Expect.equals(0, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(1, dt.microsecond); - dt2 = new DateTime(dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second, - dt.millisecond, dt.microsecond); - Expect.equals(dt.microsecondsSinceEpoch, dt2.microsecondsSinceEpoch); - dt = new DateTime.fromMicrosecondsSinceEpoch(SECONDS_YEAR_2035 * 1000000 - 1); - Expect.equals( - true, - (2035 == dt.year && 1 == dt.month && 1 == dt.day) || - (2034 == dt.year && 12 == dt.month && 31 == dt.day)); - Expect.equals(59, dt.second); - Expect.equals(999, dt.millisecond); - Expect.equals(999, dt.microsecond); - - dt2 = new DateTime(dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second, - dt.millisecond, dt.microsecond); - Expect.equals(dt.millisecondsSinceEpoch, dt2.millisecondsSinceEpoch); - dt = new DateTime.fromMicrosecondsSinceEpoch(2100000000 * 1000000, - isUtc: true); - Expect.equals(2036, dt.year); - Expect.equals(7, dt.month); - Expect.equals(18, dt.day); - Expect.equals(13, dt.hour); - Expect.equals(20, dt.minute); - Expect.equals(0, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(0, dt.microsecond); -} - -void testUTCGetters() { - var dt = new DateTime.fromMillisecondsSinceEpoch(1305140315000, isUtc: true); - Expect.equals(2011, dt.year); - Expect.equals(5, dt.month); - Expect.equals(11, dt.day); - Expect.equals(18, dt.hour); - Expect.equals(58, dt.minute); - Expect.equals(35, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(0, dt.microsecond); - Expect.equals(true, dt.isUtc); - Expect.equals(1305140315000, dt.millisecondsSinceEpoch); - dt = new DateTime.fromMillisecondsSinceEpoch(-9999999, isUtc: true); - Expect.equals(1969, dt.year); - Expect.equals(12, dt.month); - Expect.equals(31, dt.day); - Expect.equals(21, dt.hour); - Expect.equals(13, dt.minute); - Expect.equals(20, dt.second); - Expect.equals(1, dt.millisecond); - Expect.equals(0, dt.microsecond); - - if (!supportsMicroseconds) return; - - dt = new DateTime.fromMicrosecondsSinceEpoch(-9999999999, isUtc: true); - Expect.equals(1969, dt.year); - Expect.equals(12, dt.month); - Expect.equals(31, dt.day); - Expect.equals(21, dt.hour); - Expect.equals(13, dt.minute); - Expect.equals(20, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(1, dt.microsecond); -} - -void testLocalGetters() { - var dt1 = new DateTime.fromMillisecondsSinceEpoch(1305140315000); - var dt2 = new DateTime.utc(dt1.year, dt1.month, dt1.day, dt1.hour, dt1.minute, - dt1.second, dt1.millisecond, dt1.microsecond); - Duration zoneOffset = dt1.difference(dt2); - Expect.equals(true, zoneOffset.inDays == 0); - Expect.equals(true, zoneOffset.inHours.abs() <= 12); - Expect.equals(dt1.year, dt2.year); - Expect.equals(dt1.month, dt2.month); - Expect.equals(true, (dt1.day - dt2.day).abs() <= 1); - Expect.equals(true, dt1.hour < 24); - // There are timezones with 0.5 or 0.25 hour offsets. - Expect.equals( - true, - (dt1.minute == dt2.minute) || - ((dt1.minute - dt2.minute).abs() == 30) || - ((dt1.minute - dt2.minute).abs() == 15)); - Expect.equals(dt1.second, dt2.second); - Expect.equals(dt1.millisecond, dt2.millisecond); - Expect.equals(dt1.microsecond, dt2.microsecond); -} - -void testConstructors() { - var dt0 = new DateTime.utc(2011, 5, 11, 18, 58, 35, 0, 0); - var dt0b = new DateTime.utc(2011, 5, 11, 18, 58, 35, 0, 0).toLocal(); - Expect.equals(1305140315000, dt0.millisecondsSinceEpoch); - var dt1 = new DateTime.fromMillisecondsSinceEpoch(1305140315000); - Expect.equals(dt1.millisecondsSinceEpoch, dt0.millisecondsSinceEpoch); - Expect.equals(dt1.microsecondsSinceEpoch, dt0.microsecondsSinceEpoch); - Expect.equals(false, dt1 == dt0); - Expect.equals(true, dt1 == dt0b); - var dt3 = new DateTime(dt1.year, dt1.month, dt1.day, dt1.hour, dt1.minute, - dt1.second, dt1.millisecond, dt1.microsecond); - Expect.equals(dt1.millisecondsSinceEpoch, dt3.millisecondsSinceEpoch); - Expect.equals(dt1.microsecondsSinceEpoch, dt3.microsecondsSinceEpoch); - Expect.equals(false, dt3 == dt0); - Expect.equals(true, dt1 == dt3); - dt3 = new DateTime(dt1.year, dt1.month, dt1.day, dt1.hour, dt1.minute, - dt1.second, dt1.millisecond, dt1.microsecond); - Expect.equals(dt1.millisecondsSinceEpoch, dt3.millisecondsSinceEpoch); - Expect.equals(dt1.microsecondsSinceEpoch, dt3.microsecondsSinceEpoch); - Expect.equals(true, dt1 == dt3); - var dt2 = dt1.toLocal(); - dt3 = new DateTime(2011, 5, dt1.day, dt1.hour, dt1.minute, 35, 0, 0); - Expect.equals(dt2.millisecondsSinceEpoch, dt3.millisecondsSinceEpoch); - Expect.equals(dt2.microsecondsSinceEpoch, dt3.microsecondsSinceEpoch); - Expect.equals(true, dt2 == dt3); - dt1 = new DateTime.fromMillisecondsSinceEpoch(-9999999, isUtc: true); - dt3 = new DateTime.utc(dt1.year, dt1.month, dt1.day, dt1.hour, dt1.minute, - dt1.second, dt1.millisecond); - Expect.equals(dt1.millisecondsSinceEpoch, dt3.millisecondsSinceEpoch); - Expect.equals(dt1.microsecondsSinceEpoch, dt3.microsecondsSinceEpoch); - dt3 = new DateTime.utc(99, 1, 2, 10, 11, 12, 0); - Expect.equals(99, dt3.year); - Expect.equals(1, dt3.month); - Expect.equals(2, dt3.day); - Expect.equals(10, dt3.hour); - Expect.equals(11, dt3.minute); - Expect.equals(12, dt3.second); - Expect.equals(0, dt3.millisecond); - Expect.equals(0, dt3.microsecond); - Expect.equals(true, dt3.isUtc); - var dt4 = new DateTime(99, 1, 2); - Expect.equals(99, dt4.year); - Expect.equals(1, dt4.month); - Expect.equals(2, dt4.day); - Expect.equals(0, dt4.hour); - Expect.equals(0, dt4.minute); - Expect.equals(0, dt4.second); - Expect.equals(0, dt4.millisecond); - Expect.equals(0, dt4.microsecond); - Expect.isFalse(dt4.isUtc); - var dt5 = new DateTime.utc(99, 1, 2); - Expect.equals(99, dt5.year); - Expect.equals(1, dt5.month); - Expect.equals(2, dt5.day); - Expect.equals(0, dt5.hour); - Expect.equals(0, dt5.minute); - Expect.equals(0, dt5.second); - Expect.equals(0, dt5.millisecond); - Expect.equals(0, dt5.microsecond); - Expect.isTrue(dt5.isUtc); - var dt6 = new DateTime(2012, 2, 27, 13, 27, 0); - Expect.equals(2012, dt6.year); - Expect.equals(2, dt6.month); - Expect.equals(27, dt6.day); - Expect.equals(13, dt6.hour); - Expect.equals(27, dt6.minute); - Expect.equals(0, dt6.second); - Expect.equals(0, dt6.millisecond); - Expect.equals(0, dt6.microsecond); - Expect.isFalse(dt6.isUtc); - var dt7 = new DateTime.utc(2012, 2, 27, 13, 27, 0); - Expect.equals(2012, dt7.year); - Expect.equals(2, dt7.month); - Expect.equals(27, dt7.day); - Expect.equals(13, dt7.hour); - Expect.equals(27, dt7.minute); - Expect.equals(0, dt7.second); - Expect.equals(0, dt7.millisecond); - Expect.equals(0, dt7.microsecond); - Expect.isTrue(dt7.isUtc); -} - -void testChangeTimeZone() { - var dt1 = new DateTime.fromMillisecondsSinceEpoch(1305140315000); - var dt2 = dt1.toUtc(); - Expect.equals(dt1.millisecondsSinceEpoch, dt2.millisecondsSinceEpoch); - var dt3 = new DateTime.fromMillisecondsSinceEpoch(1305140315000, isUtc: true); - Expect.equals(dt1.millisecondsSinceEpoch, dt3.millisecondsSinceEpoch); - Expect.equals(dt2.year, dt3.year); - Expect.equals(dt2.month, dt3.month); - Expect.equals(dt2.day, dt3.day); - Expect.equals(dt2.hour, dt3.hour); - Expect.equals(dt2.minute, dt3.minute); - Expect.equals(dt2.second, dt3.second); - Expect.equals(dt2.millisecond, dt3.millisecond); - Expect.equals(dt2.microsecond, dt3.microsecond); - var dt4 = dt3.toLocal(); - Expect.equals(dt1.year, dt4.year); - Expect.equals(dt1.month, dt4.month); - Expect.equals(dt1.day, dt4.day); - Expect.equals(dt1.hour, dt4.hour); - Expect.equals(dt1.minute, dt4.minute); - Expect.equals(dt1.second, dt4.second); - Expect.equals(dt1.millisecond, dt4.millisecond); - Expect.equals(dt1.microsecond, dt4.microsecond); -} - -void testSubAdd() { - var dt1 = new DateTime.fromMillisecondsSinceEpoch(1305140315000, isUtc: true); - var dt2 = dt1 - .add(new Duration(milliseconds: 3 * Duration.millisecondsPerSecond + 5)); - Expect.equals(dt1.year, dt2.year); - Expect.equals(dt1.month, dt2.month); - Expect.equals(dt1.day, dt2.day); - Expect.equals(dt1.hour, dt2.hour); - Expect.equals(dt1.minute, dt2.minute); - Expect.equals(dt1.second + 3, dt2.second); - Expect.equals(dt1.millisecond + 5, dt2.millisecond); - Expect.equals(dt1.microsecond, dt2.microsecond); - var dt3 = dt2.subtract( - new Duration(milliseconds: 3 * Duration.millisecondsPerSecond + 5)); - Expect.equals(true, dt1 == dt3); - Expect.equals(false, dt1 == dt2); - - if (!supportsMicroseconds) return; - - dt1 = new DateTime.fromMillisecondsSinceEpoch(1305140315000, isUtc: true); - dt2 = dt1 - .add(new Duration(microseconds: 3 * Duration.microsecondsPerSecond + 5)); - Expect.equals(dt1.year, dt2.year); - Expect.equals(dt1.month, dt2.month); - Expect.equals(dt1.day, dt2.day); - Expect.equals(dt1.hour, dt2.hour); - Expect.equals(dt1.minute, dt2.minute); - Expect.equals(dt1.second + 3, dt2.second); - Expect.equals(dt1.millisecond, dt2.millisecond); - Expect.equals(dt1.microsecond + 5, dt2.microsecond); - dt3 = dt2.subtract( - new Duration(microseconds: 3 * Duration.microsecondsPerSecond + 5)); - Expect.equals(true, dt1 == dt3); - Expect.equals(false, dt1 == dt2); -} - -void testUnderflowAndOverflow() { - int microsecond = supportsMicroseconds ? 499 : 0; - final dtBase = new DateTime(2012, 6, 20, 12, 30, 30, 500, microsecond); - - // Millisecond - print(" >>> Millisecond+"); - var dt = new DateTime(dtBase.year, dtBase.month, dtBase.day, dtBase.hour, - dtBase.minute, dtBase.second, 1000, dtBase.microsecond); - Expect.equals(dtBase.year, dt.year); - Expect.equals(dtBase.month, dt.month); - Expect.equals(dtBase.day, dt.day); - Expect.equals(dtBase.hour, dt.hour); - Expect.equals(dtBase.minute, dt.minute); - Expect.equals(dtBase.second + 1, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(dtBase.microsecond, dt.microsecond); - - print(" >>> Millisecond-"); - dt = new DateTime(dtBase.year, dtBase.month, dtBase.day, dtBase.hour, - dtBase.minute, dtBase.second, -1000, dtBase.microsecond); - Expect.equals(dtBase.year, dt.year); - Expect.equals(dtBase.month, dt.month); - Expect.equals(dtBase.day, dt.day); - Expect.equals(dtBase.hour, dt.hour); - Expect.equals(dtBase.minute, dt.minute); - Expect.equals(dtBase.second - 1, dt.second); - Expect.equals(0, dt.millisecond); - Expect.equals(dtBase.microsecond, dt.microsecond); - - // Second - print(" >>> Second+"); - dt = new DateTime(dtBase.year, dtBase.month, dtBase.day, dtBase.hour, - dtBase.minute, 60, dtBase.millisecond, dtBase.microsecond); - Expect.equals(dtBase.year, dt.year); - Expect.equals(dtBase.month, dt.month); - Expect.equals(dtBase.day, dt.day); - Expect.equals(dtBase.hour, dt.hour); - Expect.equals(dtBase.minute + 1, dt.minute); - Expect.equals(0, dt.second); - Expect.equals(dtBase.millisecond, dt.millisecond); - Expect.equals(dtBase.microsecond, dt.microsecond); - - print(" >>> Second-"); - dt = new DateTime(dtBase.year, dtBase.month, dtBase.day, dtBase.hour, - dtBase.minute, -60, dtBase.millisecond, dtBase.microsecond); - Expect.equals(dtBase.year, dt.year); - Expect.equals(dtBase.month, dt.month); - Expect.equals(dtBase.day, dt.day); - Expect.equals(dtBase.hour, dt.hour); - Expect.equals(dtBase.minute - 1, dt.minute); - Expect.equals(0, dt.second); - Expect.equals(dtBase.millisecond, dt.millisecond); - Expect.equals(dtBase.microsecond, dt.microsecond); - - // Minute - print(" >>> Minute+"); - dt = new DateTime(dtBase.year, dtBase.month, dtBase.day, dtBase.hour, 60, - dtBase.second, dtBase.millisecond, dtBase.microsecond); - Expect.equals(dtBase.year, dt.year); - Expect.equals(dtBase.month, dt.month); - Expect.equals(dtBase.day, dt.day); - Expect.equals(dtBase.hour + 1, dt.hour); - Expect.equals(0, dt.minute); - Expect.equals(dtBase.second, dt.second); - Expect.equals(dtBase.millisecond, dt.millisecond); - Expect.equals(dtBase.microsecond, dt.microsecond); - - print(" >>> Minute-"); - dt = new DateTime(dtBase.year, dtBase.month, dtBase.day, dtBase.hour, -60, - dtBase.second, dtBase.millisecond, dtBase.microsecond); - Expect.equals(dtBase.year, dt.year); - Expect.equals(dtBase.month, dt.month); - Expect.equals(dtBase.day, dt.day); - Expect.equals(dtBase.hour - 1, dt.hour); - Expect.equals(0, dt.minute); - Expect.equals(dtBase.second, dt.second); - Expect.equals(dtBase.millisecond, dt.millisecond); - Expect.equals(dtBase.microsecond, dt.microsecond); - - // Hour - print(" >>> Hour+"); - dt = new DateTime(dtBase.year, dtBase.month, dtBase.day, 24, dtBase.minute, - dtBase.second, dtBase.millisecond, dtBase.microsecond); - Expect.equals(dtBase.year, dt.year); - Expect.equals(dtBase.month, dt.month); - Expect.equals(dtBase.day + 1, dt.day); - Expect.equals(0, dt.hour); - Expect.equals(dtBase.minute, dt.minute); - Expect.equals(dtBase.second, dt.second); - Expect.equals(dtBase.millisecond, dt.millisecond); - Expect.equals(dtBase.microsecond, dt.microsecond); - - print(" >>> Hour-"); - dt = new DateTime(dtBase.year, dtBase.month, dtBase.day, -24, dtBase.minute, - dtBase.second, dtBase.millisecond, dtBase.microsecond); - Expect.equals(dtBase.year, dt.year); - Expect.equals(dtBase.month, dt.month); - Expect.equals(dtBase.day - 1, dt.day); - Expect.equals(0, dt.hour); - Expect.equals(dtBase.minute, dt.minute); - Expect.equals(dtBase.second, dt.second); - Expect.equals(dtBase.millisecond, dt.millisecond); - Expect.equals(dtBase.microsecond, dt.microsecond); - - // Day - print(" >>> Day+"); - dt = new DateTime(dtBase.year, dtBase.month, 31, dtBase.hour, dtBase.minute, - dtBase.second, dtBase.millisecond, dtBase.microsecond); - Expect.equals(dtBase.year, dt.year); - Expect.equals(dtBase.month + 1, dt.month); - Expect.equals(1, dt.day); - Expect.equals(dtBase.hour, dt.hour); - Expect.equals(dtBase.minute, dt.minute); - Expect.equals(dtBase.second, dt.second); - Expect.equals(dtBase.millisecond, dt.millisecond); - Expect.equals(dtBase.microsecond, dt.microsecond); - - print(" >>> Day-"); - dt = new DateTime(dtBase.year, dtBase.month, -30, dtBase.hour, dtBase.minute, - dtBase.second, dtBase.millisecond, dtBase.microsecond); - Expect.equals(dtBase.year, dt.year); - Expect.equals(dtBase.month - 1, dt.month); - Expect.equals(1, dt.day); - Expect.equals(dtBase.hour, dt.hour); - Expect.equals(dtBase.minute, dt.minute); - Expect.equals(dtBase.second, dt.second); - Expect.equals(dtBase.millisecond, dt.millisecond); - Expect.equals(dtBase.microsecond, dt.microsecond); - - // Month - print(" >>> Month+"); - dt = new DateTime(dtBase.year, 13, dtBase.day, dtBase.hour, dtBase.minute, - dtBase.second, dtBase.millisecond, dtBase.microsecond); - Expect.equals(dtBase.year + 1, dt.year); - Expect.equals(1, dt.month); - Expect.equals(dtBase.day, dt.day); - Expect.equals(dtBase.hour, dt.hour); - Expect.equals(dtBase.minute, dt.minute); - Expect.equals(dtBase.second, dt.second); - Expect.equals(dtBase.millisecond, dt.millisecond); - Expect.equals(dtBase.microsecond, dt.microsecond); - - print(" >>> Month-"); - dt = new DateTime(dtBase.year, -11, dtBase.day, dtBase.hour, dtBase.minute, - dtBase.second, dtBase.millisecond, dtBase.microsecond); - Expect.equals(dtBase.year - 1, dt.year); - Expect.equals(1, dt.month); - Expect.equals(dtBase.day, dt.day); - Expect.equals(dtBase.hour, dt.hour); - Expect.equals(dtBase.minute, dt.minute); - Expect.equals(dtBase.second, dt.second); - Expect.equals(dtBase.millisecond, dt.millisecond); - Expect.equals(dtBase.microsecond, dt.microsecond); - - // Flowing all the way up the chain. - print(" >>> Flow+"); - var dtBase1 = new DateTime(2012, 12, 31, 23, 59, 59, 999, 000); - var dtTick = new DateTime( - dtBase1.year, - dtBase1.month, - dtBase1.day, - dtBase1.hour, - dtBase1.minute, - dtBase1.second, - dtBase1.millisecond + 1, - dtBase1.microsecond); - Expect.equals(dtBase1.year + 1, dtTick.year); - Expect.equals(1, dtTick.month); - Expect.equals(1, dtTick.day); - Expect.equals(0, dtTick.hour); - Expect.equals(0, dtTick.minute); - Expect.equals(0, dtTick.second); - Expect.equals(0, dtTick.millisecond); - Expect.equals(0, dtTick.microsecond); - - print(" >>> Flow-"); - dtBase1 = new DateTime(2012, 1, 1, 0, 0, 0, 0); - dtTick = new DateTime( - dtBase1.year, - dtBase1.month, - dtBase1.day, - dtBase1.hour, - dtBase1.minute, - dtBase1.second, - dtBase1.millisecond - 1, - dtBase1.microsecond); - Expect.equals(dtBase1.year - 1, dtTick.year); - Expect.equals(12, dtTick.month); - Expect.equals(31, dtTick.day); - Expect.equals(23, dtTick.hour); - Expect.equals(59, dtTick.minute); - Expect.equals(59, dtTick.second); - Expect.equals(999, dtTick.millisecond); - Expect.equals(0, dtTick.microsecond); - - print(" >>> extra underflow"); - dtTick = new DateTime(dtBase1.year, dtBase1.month, dtBase1.day, -17520, - dtBase1.minute, dtBase1.second, dtBase1.millisecond, dtBase1.microsecond); - Expect.equals(dtBase1.year - 2, dtTick.year); - Expect.equals(dtBase1.month, dtTick.month); - Expect.equals(dtBase1.day, dtTick.day); - Expect.equals(dtBase1.hour, dtTick.hour); - Expect.equals(dtBase1.minute, dtTick.minute); - Expect.equals(dtBase1.second, dtTick.second); - Expect.equals(dtBase1.millisecond, dtTick.millisecond); - Expect.equals(dtBase1.microsecond, dtTick.microsecond); - - if (!supportsMicroseconds) return; - - // Microsecond - print(" >>> Microsecond+"); - dt = new DateTime(dtBase.year, dtBase.month, dtBase.day, dtBase.hour, - dtBase.minute, dtBase.second, dtBase.millisecond, 1000); - Expect.equals(dtBase.year, dt.year); - Expect.equals(dtBase.month, dt.month); - Expect.equals(dtBase.day, dt.day); - Expect.equals(dtBase.hour, dt.hour); - Expect.equals(dtBase.minute, dt.minute); - Expect.equals(dtBase.second, dt.second); - Expect.equals(dtBase.millisecond + 1, dt.millisecond); - Expect.equals(0, dt.microsecond); - - print(" >>> Microsecond-"); - dt = new DateTime(dtBase.year, dtBase.month, dtBase.day, dtBase.hour, - dtBase.minute, dtBase.second, dtBase.millisecond, -1000); - Expect.equals(dtBase.year, dt.year); - Expect.equals(dtBase.month, dt.month); - Expect.equals(dtBase.day, dt.day); - Expect.equals(dtBase.hour, dt.hour); - Expect.equals(dtBase.minute, dt.minute); - Expect.equals(dtBase.second, dt.second); - Expect.equals(dtBase.millisecond - 1, dt.millisecond); - Expect.equals(0, dt.microsecond); - - // Flowing all the way up the chain. - print(" >>> Flow+ 2"); - dtBase1 = new DateTime(2012, 12, 31, 23, 59, 59, 999, 999); - dtTick = new DateTime( - dtBase1.year, - dtBase1.month, - dtBase1.day, - dtBase1.hour, - dtBase1.minute, - dtBase1.second, - dtBase1.millisecond, - dtBase1.microsecond + 1); - Expect.equals(dtBase1.year + 1, dtTick.year); - Expect.equals(1, dtTick.month); - Expect.equals(1, dtTick.day); - Expect.equals(0, dtTick.hour); - Expect.equals(0, dtTick.minute); - Expect.equals(0, dtTick.second); - Expect.equals(0, dtTick.millisecond); - Expect.equals(0, dtTick.microsecond); - - print(" >>> Flow- 2"); - dtBase1 = new DateTime(2012, 1, 1, 0, 0, 0, 0, 0); - dtTick = new DateTime( - dtBase1.year, - dtBase1.month, - dtBase1.day, - dtBase1.hour, - dtBase1.minute, - dtBase1.second, - dtBase1.millisecond, - dtBase1.microsecond - 1); - Expect.equals(dtBase1.year - 1, dtTick.year); - Expect.equals(12, dtTick.month); - Expect.equals(31, dtTick.day); - Expect.equals(23, dtTick.hour); - Expect.equals(59, dtTick.minute); - Expect.equals(59, dtTick.second); - Expect.equals(999, dtTick.millisecond); - Expect.equals(999, dtTick.microsecond); -} - -void testDateStrings() { - // TODO(floitsch): Clean up the DateTime API that deals with strings. - var dt1 = DateTime.parse("2011-05-11 18:58:35Z"); - Expect.equals(1305140315000, dt1.millisecondsSinceEpoch); - Expect.isTrue(dt1.isUtc); - dt1 = DateTime.parse("20110511 18:58:35z"); - Expect.equals(1305140315000, dt1.millisecondsSinceEpoch); - Expect.isTrue(dt1.isUtc); - dt1 = DateTime.parse("+20110511 18:58:35z"); - Expect.equals(1305140315000, dt1.millisecondsSinceEpoch); - Expect.isTrue(dt1.isUtc); - var str = dt1.toString(); - var dt2 = DateTime.parse(str); - Expect.equals(true, dt1 == dt2); - var dt3 = dt1.toUtc(); - str = dt3.toString(); - Expect.equals("2011-05-11 18:58:35.000Z", str); - var dt4 = DateTime.parse("-1234-01-01 00:00:00Z"); - Expect.equals(-1234, dt4.year); - Expect.equals(1, dt4.month); - Expect.equals(1, dt4.day); - Expect.equals(0, dt4.hour); - Expect.equals(0, dt4.minute); - Expect.equals(0, dt4.second); - Expect.equals(0, dt4.millisecond); - Expect.equals(0, dt4.microsecond); - Expect.isTrue(dt4.isUtc); - var dt5 = DateTime.parse("0099-01-02"); - Expect.equals(99, dt5.year); - Expect.equals(1, dt5.month); - Expect.equals(2, dt5.day); - Expect.equals(0, dt5.hour); - Expect.equals(0, dt5.minute); - Expect.equals(0, dt5.second); - Expect.equals(0, dt5.millisecond); - Expect.equals(0, dt5.microsecond); - Expect.isFalse(dt5.isUtc); - var dt6 = DateTime.parse("2012-01-01 00:00:10.012"); - Expect.equals(12, dt6.millisecond); - Expect.equals(0, dt6.microsecond); - dt6 = DateTime.parse("2012-01-01 00:00:10.003"); - Expect.equals(3, dt6.millisecond); - Expect.equals(0, dt6.microsecond); - dt6 = DateTime.parse("2012-01-01 00:00:10.5"); - Expect.equals(500, dt6.millisecond); - Expect.equals(0, dt6.microsecond); - dt6 = DateTime.parse("2012-01-01 00:00:10.003Z"); - Expect.equals(3, dt6.millisecond); - Expect.equals(0, dt6.microsecond); - dt6 = DateTime.parse("2012-01-01 00:00:10.5z"); - Expect.equals(500, dt6.millisecond); - Expect.equals(0, dt6.microsecond); - var dt7 = DateTime.parse("2011-05-11T18:58:35Z"); - Expect.equals(1305140315000, dt7.millisecondsSinceEpoch); - var dt8 = DateTime.parse("-1234-01-01T00:00:00Z"); - Expect.equals(-1234, dt8.year); - Expect.equals(1, dt8.month); - Expect.equals(1, dt8.day); - Expect.equals(0, dt8.hour); - Expect.equals(0, dt8.minute); - Expect.equals(0, dt8.second); - Expect.equals(0, dt8.millisecond); - Expect.equals(0, dt8.microsecond); - Expect.isTrue(dt8.isUtc); - var dt9 = DateTime.parse("-1234-01-01T00:00:00"); - Expect.equals(-1234, dt9.year); - Expect.equals(1, dt9.month); - Expect.equals(1, dt9.day); - Expect.equals(0, dt9.hour); - Expect.equals(0, dt9.minute); - Expect.equals(0, dt9.second); - Expect.equals(0, dt9.millisecond); - Expect.equals(0, dt9.microsecond); - Expect.isFalse(dt9.isUtc); - var dt10 = DateTime.parse("-12340101"); - Expect.equals(-1234, dt10.year); - Expect.equals(1, dt10.month); - Expect.equals(1, dt10.day); - Expect.equals(0, dt10.hour); - Expect.equals(0, dt10.minute); - Expect.equals(0, dt10.second); - Expect.equals(0, dt10.millisecond); - Expect.equals(0, dt10.microsecond); - Expect.isFalse(dt10.isUtc); - dt1 = DateTime.parse("2012-02-27 13:27:00"); - Expect.equals(2012, dt1.year); - Expect.equals(2, dt1.month); - Expect.equals(27, dt1.day); - Expect.equals(13, dt1.hour); - Expect.equals(27, dt1.minute); - Expect.equals(0, dt1.second); - Expect.equals(0, dt1.millisecond); - Expect.equals(0, dt1.microsecond); - Expect.equals(false, dt1.isUtc); - dt1 = DateTime.parse("2012-02-27 13:27:00.423z"); - Expect.equals(2012, dt1.year); - Expect.equals(2, dt1.month); - Expect.equals(27, dt1.day); - Expect.equals(13, dt1.hour); - Expect.equals(27, dt1.minute); - Expect.equals(0, dt1.second); - Expect.equals(423, dt1.millisecond); - Expect.equals(0, dt1.microsecond); - Expect.equals(true, dt1.isUtc); - dt1 = DateTime.parse("20120227 13:27:00"); - Expect.equals(2012, dt1.year); - Expect.equals(2, dt1.month); - Expect.equals(27, dt1.day); - Expect.equals(13, dt1.hour); - Expect.equals(27, dt1.minute); - Expect.equals(0, dt1.second); - Expect.equals(0, dt1.millisecond); - Expect.equals(0, dt1.microsecond); - Expect.equals(false, dt1.isUtc); - dt1 = DateTime.parse("20120227T132700"); - Expect.equals(2012, dt1.year); - Expect.equals(2, dt1.month); - Expect.equals(27, dt1.day); - Expect.equals(13, dt1.hour); - Expect.equals(27, dt1.minute); - Expect.equals(0, dt1.second); - Expect.equals(0, dt1.millisecond); - Expect.equals(0, dt1.microsecond); - Expect.equals(false, dt1.isUtc); - dt1 = DateTime.parse("20120227"); - Expect.equals(2012, dt1.year); - Expect.equals(2, dt1.month); - Expect.equals(27, dt1.day); - Expect.equals(0, dt1.hour); - Expect.equals(0, dt1.minute); - Expect.equals(0, dt1.second); - Expect.equals(0, dt1.millisecond); - Expect.equals(0, dt1.microsecond); - Expect.equals(false, dt1.isUtc); - dt1 = DateTime.parse("2012-02-27T14Z"); - Expect.equals(2012, dt1.year); - Expect.equals(2, dt1.month); - Expect.equals(27, dt1.day); - Expect.equals(14, dt1.hour); - Expect.equals(0, dt1.minute); - Expect.equals(0, dt1.second); - Expect.equals(0, dt1.millisecond); - Expect.equals(0, dt1.microsecond); - Expect.equals(true, dt1.isUtc); - dt1 = DateTime.parse("-123450101 00:00:00 Z"); - Expect.equals(-12345, dt1.year); - Expect.equals(1, dt1.month); - Expect.equals(1, dt1.day); - Expect.equals(0, dt1.hour); - Expect.equals(0, dt1.minute); - Expect.equals(0, dt1.second); - Expect.equals(0, dt1.millisecond); - Expect.equals(0, dt1.microsecond); - Expect.equals(true, dt1.isUtc); - dt1 = DateTime.parse("1999-01-02 23:59:59.99951"); - if (supportsMicroseconds) { - Expect.equals(1999, dt1.year); - Expect.equals(1, dt1.month); - Expect.equals(2, dt1.day); - Expect.equals(23, dt1.hour); - Expect.equals(59, dt1.minute); - Expect.equals(59, dt1.second); - Expect.equals(999, dt1.millisecond); - Expect.equals(510, dt1.microsecond); - } else { - // We only support millisecond. If the user supplies more data (the "51" - // here), we round. - Expect.equals(1999, dt1.year); - Expect.equals(1, dt1.month); - Expect.equals(3, dt1.day); - Expect.equals(0, dt1.hour); - Expect.equals(0, dt1.minute); - Expect.equals(0, dt1.second); - Expect.equals(0, dt1.millisecond); - Expect.equals(0, dt1.microsecond); - } - Expect.equals(false, dt1.isUtc); - dt1 = DateTime.parse("1999-01-02 23:58:59.99951Z"); - if (supportsMicroseconds) { - Expect.equals(1999, dt1.year); - Expect.equals(1, dt1.month); - Expect.equals(2, dt1.day); - Expect.equals(23, dt1.hour); - Expect.equals(58, dt1.minute); - Expect.equals(59, dt1.second); - Expect.equals(999, dt1.millisecond); - Expect.equals(510, dt1.microsecond); - } else { - Expect.equals(1999, dt1.year); - Expect.equals(1, dt1.month); - Expect.equals(2, dt1.day); - Expect.equals(23, dt1.hour); - Expect.equals(59, dt1.minute); - Expect.equals(0, dt1.second); - Expect.equals(0, dt1.millisecond); - Expect.equals(0, dt1.microsecond); - } - Expect.equals(true, dt1.isUtc); - dt1 = DateTime.parse("0009-09-09 09:09:09.009Z"); - Expect.equals(9, dt1.year); - Expect.equals(9, dt1.month); - Expect.equals(9, dt1.day); - Expect.equals(9, dt1.hour); - Expect.equals(9, dt1.minute); - Expect.equals(9, dt1.second); - Expect.equals(9, dt1.millisecond); - Expect.equals(true, dt1.isUtc); - dt1 = DateTime.parse("0009-09-09 09:09:09.009-00"); - Expect.equals(9, dt1.year); - Expect.equals(9, dt1.month); - Expect.equals(9, dt1.day); - Expect.equals(9, dt1.hour); - Expect.equals(9, dt1.minute); - Expect.equals(9, dt1.second); - Expect.equals(9, dt1.millisecond); - Expect.equals(true, dt1.isUtc); - dt1 = DateTime.parse("0009-09-09 09:09:09.009-0000"); - Expect.equals(9, dt1.year); - Expect.equals(9, dt1.month); - Expect.equals(9, dt1.day); - Expect.equals(9, dt1.hour); - Expect.equals(9, dt1.minute); - Expect.equals(9, dt1.second); - Expect.equals(9, dt1.millisecond); - Expect.equals(true, dt1.isUtc); - dt1 = DateTime.parse("0009-09-09 09:09:09.009-02"); - Expect.equals(9, dt1.year); - Expect.equals(9, dt1.month); - Expect.equals(9, dt1.day); - Expect.equals(11, dt1.hour); - Expect.equals(9, dt1.minute); - Expect.equals(9, dt1.second); - Expect.equals(9, dt1.millisecond); - Expect.equals(true, dt1.isUtc); - dt1 = DateTime.parse("0009-09-09 09:09:09.009+0200"); - Expect.equals(9, dt1.year); - Expect.equals(9, dt1.month); - Expect.equals(9, dt1.day); - Expect.equals(7, dt1.hour); - Expect.equals(9, dt1.minute); - Expect.equals(9, dt1.second); - Expect.equals(9, dt1.millisecond); - Expect.equals(true, dt1.isUtc); - dt1 = DateTime.parse("0009-09-09 09:09:09.009+1200"); - Expect.equals(9, dt1.year); - Expect.equals(9, dt1.month); - Expect.equals(8, dt1.day); - Expect.equals(21, dt1.hour); - Expect.equals(9, dt1.minute); - Expect.equals(9, dt1.second); - Expect.equals(9, dt1.millisecond); - Expect.equals(true, dt1.isUtc); - dt1 = DateTime.parse("0009-09-09 09:09:09.009-1200"); - Expect.equals(9, dt1.year); - Expect.equals(9, dt1.month); - Expect.equals(9, dt1.day); - Expect.equals(21, dt1.hour); - Expect.equals(9, dt1.minute); - Expect.equals(9, dt1.second); - Expect.equals(9, dt1.millisecond); - Expect.equals(true, dt1.isUtc); - dt1 = DateTime.parse("0009-09-09 09:09:09.009-0230"); - Expect.equals(9, dt1.year); - Expect.equals(9, dt1.month); - Expect.equals(9, dt1.day); - Expect.equals(11, dt1.hour); - Expect.equals(39, dt1.minute); - Expect.equals(9, dt1.second); - Expect.equals(9, dt1.millisecond); - Expect.equals(true, dt1.isUtc); - dt1 = DateTime.parse("0009-09-09 09:09:09.009-2134"); - Expect.equals(9, dt1.year); - Expect.equals(9, dt1.month); - Expect.equals(10, dt1.day); - Expect.equals(6, dt1.hour); - Expect.equals(43, dt1.minute); - Expect.equals(9, dt1.second); - Expect.equals(9, dt1.millisecond); - Expect.equals(true, dt1.isUtc); - - Expect.throwsFormatException(() => DateTime.parse("bad")); - var bad_year = - 1970 + (_MAX_MILLISECONDS ~/ (1000 * 60 * 60 * 24 * 365.2425)) + 1; - Expect.throwsFormatException( - () => DateTime.parse(bad_year.toString() + "-01-01")); - // The last valid time; should not throw. - dt1 = DateTime.parse("275760-09-13T00:00:00.000Z"); - Expect.throwsFormatException( - () => DateTime.parse("275760-09-14T00:00:00.000Z")); - Expect.throwsFormatException( - () => DateTime.parse("275760-09-13T00:00:00.001Z")); - if (supportsMicroseconds) { - Expect.throwsFormatException( - () => DateTime.parse("275760-09-13T00:00:00.000001Z")); - } else { - dt1 = DateTime.parse("275760-09-13T00:00:00.000001Z"); - } - - // first valid time; should not throw. - dt1 = DateTime.parse("-271821-04-20T00:00:00.000Z"); - Expect.throwsFormatException( - () => DateTime.parse("-271821-04-19T23:59:59.999Z")); - - if (supportsMicroseconds) { - Expect.throwsFormatException( - () => DateTime.parse("-271821-04-19T23:59:59.999999Z")); - } -} - -void testWeekday() { - // 2011-10-06 is Summertime. - var d = new DateTime(2011, 10, 6, 0, 45, 37, 0); - Expect.equals(DateTime.thursday, d.weekday); - d = new DateTime.utc(2011, 10, 6, 0, 45, 37, 0); - Expect.equals(DateTime.thursday, d.weekday); - d = new DateTime(2011, 10, 5, 23, 45, 37, 0); - Expect.equals(DateTime.wednesday, d.weekday); - d = new DateTime.utc(2011, 10, 5, 23, 45, 37, 0); - Expect.equals(DateTime.wednesday, d.weekday); - // 1970-01-01 is Wintertime. - d = new DateTime(1970, 1, 1, 0, 0, 0, 1); - Expect.equals(DateTime.thursday, d.weekday); - d = new DateTime.utc(1970, 1, 1, 0, 0, 0, 1); - Expect.equals(DateTime.thursday, d.weekday); - d = new DateTime.utc(1969, 12, 31, 23, 59, 59, 999); - Expect.equals(DateTime.wednesday, d.weekday); - d = new DateTime(1969, 12, 31, 23, 59, 59, 999); - Expect.equals(DateTime.wednesday, d.weekday); - d = new DateTime(2011, 10, 4, 23, 45, 37, 0); - Expect.equals(DateTime.tuesday, d.weekday); - d = new DateTime(2011, 10, 3, 23, 45, 37, 0); - Expect.equals(DateTime.monday, d.weekday); - d = new DateTime(2011, 10, 2, 23, 45, 37, 0); - Expect.equals(DateTime.sunday, d.weekday); - d = new DateTime(2011, 10, 1, 23, 45, 37, 0); - Expect.equals(DateTime.saturday, d.weekday); - d = new DateTime(2011, 9, 30, 23, 45, 37, 0); - Expect.equals(DateTime.friday, d.weekday); -} - -void testToStrings() { - void test(date, time) { - { - // UTC time. - String source1 = "$date ${time}Z"; - String source2 = "${date}T${time}Z"; - var utcTime1 = DateTime.parse(source1); - var utcTime2 = DateTime.parse(source2); - Expect.isTrue(utcTime1.isUtc); - Expect.equals(utcTime1, utcTime2); - Expect.equals(source1, utcTime1.toString()); - Expect.equals(source2, utcTime1.toIso8601String()); - } - { - // Local time - String source1 = "$date $time"; - String source2 = "${date}T$time"; - var utcTime1 = DateTime.parse(source1); - var utcTime2 = DateTime.parse(source2); - Expect.isFalse(utcTime1.isUtc); - Expect.equals(utcTime1, utcTime2); - Expect.equals(source1, utcTime1.toString()); - Expect.equals(source2, utcTime1.toIso8601String()); - } - } - - test("2000-01-01", "12:00:00.000"); - test("-2000-01-01", "12:00:00.000"); - test("1970-01-01", "00:00:00.000"); - test("1969-12-31", "23:59:59.999"); - test("1969-09-09", "00:09:09.009"); - - if (supportsMicroseconds) { - test("2000-01-01", "12:00:00.000001"); - test("-2000-01-01", "12:00:00.000001"); - test("1970-01-01", "00:00:00.000001"); - test("1969-12-31", "23:59:59.999999"); - test("1969-09-09", "00:09:09.009999"); - } -} - -void testIsoString() { - var d = new DateTime(9999, 1, 1, 23, 59, 59, 999); - Expect.equals("9999-01-01T23:59:59.999", d.toIso8601String()); - d = new DateTime(-9999, 1, 1, 23, 59, 59, 999); - Expect.equals("-9999-01-01T23:59:59.999", d.toIso8601String()); - d = new DateTime.utc(9999, 1, 1, 23, 59, 59, 999); - Expect.equals("9999-01-01T23:59:59.999Z", d.toIso8601String()); - d = new DateTime.utc(-9999, 1, 1, 23, 59, 59, 999); - Expect.equals("-9999-01-01T23:59:59.999Z", d.toIso8601String()); - - d = new DateTime(10000, 1, 1, 23, 59, 59, 999); - Expect.equals("+010000-01-01T23:59:59.999", d.toIso8601String()); - d = new DateTime(-10000, 1, 1, 23, 59, 59, 999); - Expect.equals("-010000-01-01T23:59:59.999", d.toIso8601String()); - d = new DateTime.utc(10000, 1, 1, 23, 59, 59, 999); - Expect.equals("+010000-01-01T23:59:59.999Z", d.toIso8601String()); - d = new DateTime.utc(-10000, 1, 1, 23, 59, 59, 999); - Expect.equals("-010000-01-01T23:59:59.999Z", d.toIso8601String()); - - if (!supportsMicroseconds) return; - - d = new DateTime(9999, 1, 1, 23, 59, 59, 999, 999); - Expect.equals("9999-01-01T23:59:59.999999", d.toIso8601String()); - d = new DateTime(-9999, 1, 1, 23, 59, 59, 999, 999); - Expect.equals("-9999-01-01T23:59:59.999999", d.toIso8601String()); - d = new DateTime.utc(9999, 1, 1, 23, 59, 59, 999, 999); - Expect.equals("9999-01-01T23:59:59.999999Z", d.toIso8601String()); - d = new DateTime.utc(-9999, 1, 1, 23, 59, 59, 999, 999); - Expect.equals("-9999-01-01T23:59:59.999999Z", d.toIso8601String()); - - d = new DateTime(10000, 1, 1, 23, 59, 59, 999, 999); - Expect.equals("+010000-01-01T23:59:59.999999", d.toIso8601String()); - d = new DateTime(-10000, 1, 1, 23, 59, 59, 999, 999); - Expect.equals("-010000-01-01T23:59:59.999999", d.toIso8601String()); - d = new DateTime.utc(10000, 1, 1, 23, 59, 59, 999, 999); - Expect.equals("+010000-01-01T23:59:59.999999Z", d.toIso8601String()); - d = new DateTime.utc(-10000, 1, 1, 23, 59, 59, 999, 999); - Expect.equals("-010000-01-01T23:59:59.999999Z", d.toIso8601String()); - - d = new DateTime(9999, 1, 1, 23, 49, 59, 989, 979); - Expect.equals("9999-01-01T23:49:59.989979", d.toIso8601String()); - d = new DateTime(-9999, 1, 1, 23, 49, 59, 989, 979); - Expect.equals("-9999-01-01T23:49:59.989979", d.toIso8601String()); - d = new DateTime.utc(9999, 1, 1, 23, 49, 59, 989, 979); - Expect.equals("9999-01-01T23:49:59.989979Z", d.toIso8601String()); - d = new DateTime.utc(-9999, 1, 1, 23, 49, 59, 989, 979); - Expect.equals("-9999-01-01T23:49:59.989979Z", d.toIso8601String()); - - d = new DateTime(10000, 1, 1, 23, 49, 59, 989, 979); - Expect.equals("+010000-01-01T23:49:59.989979", d.toIso8601String()); - d = new DateTime(-10000, 1, 1, 23, 49, 59, 989, 979); - Expect.equals("-010000-01-01T23:49:59.989979", d.toIso8601String()); - d = new DateTime.utc(10000, 1, 1, 23, 49, 59, 989, 979); - Expect.equals("+010000-01-01T23:49:59.989979Z", d.toIso8601String()); - d = new DateTime.utc(-10000, 1, 1, 23, 49, 59, 989, 979); - Expect.equals("-010000-01-01T23:49:59.989979Z", d.toIso8601String()); -} - -void testRegression46966() { - // See http://dartbug.com/46966 - // The constructor allowed numbers larger than 100_000_000 days - // from epoch, contrary to documentation (and web behavior). - - // Maximally allowed milliseconds on either side of epoch - // (±100 000 000 days). - var maxMilliseconds = 100000000 * 24 * 60 * 60 * 1000; - var maxDate = DateTime.fromMillisecondsSinceEpoch(maxMilliseconds); - var minDate = DateTime.fromMillisecondsSinceEpoch(-maxMilliseconds); - - // Throws if greater. - Expect.throws(() => DateTime.fromMillisecondsSinceEpoch(maxMilliseconds + 1)); - Expect.throws( - () => DateTime.fromMillisecondsSinceEpoch(-maxMilliseconds - 1)); - - // But also if much greater. - // The badMin value overflows 64-bits when multiplied by 1000. - var badMin = 0x20c49ba5e353f8; - Expect.throws(() => DateTime.fromMillisecondsSinceEpoch(badMin)); - Expect.throws(() => DateTime.fromMillisecondsSinceEpoch(-badMin)); - Expect.throws(() => DateTime.fromMillisecondsSinceEpoch(badMin + 1)); - Expect.throws(() => DateTime.fromMillisecondsSinceEpoch(-badMin - 1)); - var badMax = double.maxFinite.toInt(); // 2^63-1 on VM, max double on JS. - Expect.throws(() => DateTime.fromMillisecondsSinceEpoch(badMax)); - Expect.throws(() => DateTime.fromMillisecondsSinceEpoch(-badMax - 1)); -} - -void main() { - testNow(); - testMillisecondsSinceEpoch(); - testMicrosecondsSinceEpoch(); - testConstructors(); - testUTCGetters(); - testLocalGetters(); - testChangeTimeZone(); - testSubAdd(); - testUnderflowAndOverflow(); - testDateStrings(); - testEquivalentYears(); - testWeekday(); - testToStrings(); - testIsoString(); - testRegression46966(); -} diff --git a/tests/corelib_2/double_ceil2_test.dart b/tests/corelib_2/double_ceil2_test.dart deleted file mode 100644 index 478edd0f1ac..00000000000 --- a/tests/corelib_2/double_ceil2_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - Expect.throwsUnsupportedError(() => double.infinity.ceil()); - Expect.throwsUnsupportedError(() => double.negativeInfinity.ceil()); - Expect.throwsUnsupportedError(() => double.nan.ceil()); -} diff --git a/tests/corelib_2/double_ceil_test.dart b/tests/corelib_2/double_ceil_test.dart deleted file mode 100644 index 4199ea9f17b..00000000000 --- a/tests/corelib_2/double_ceil_test.dart +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - Expect.equals(0, 0.0.ceil()); - Expect.equals(1, double.minPositive.ceil()); - Expect.equals(1, (2.0 * double.minPositive).ceil()); - Expect.equals(1, (1.18e-38).ceil()); - Expect.equals(1, (1.18e-38 * 2).ceil()); - Expect.equals(1, 0.49999999999999994.ceil()); - Expect.equals(1, 0.5.ceil()); - Expect.equals(1, 0.9999999999999999.ceil()); - Expect.equals(1, 1.0.ceil()); - Expect.equals(2, 1.000000000000001.ceil()); - // The following numbers are on the border of 52 bits. - // For example: 4503599627370499 + 0.5 => 4503599627370500. - Expect.equals(4503599627370496, 4503599627370496.0.ceil()); - Expect.equals(4503599627370497, 4503599627370497.0.ceil()); - Expect.equals(4503599627370498, 4503599627370498.0.ceil()); - Expect.equals(4503599627370499, 4503599627370499.0.ceil()); - - Expect.equals(9007199254740991, 9007199254740991.0.ceil()); - Expect.equals(9007199254740992, 9007199254740992.0.ceil()); - Expect.equals(9223372036854775807, double.maxFinite.ceil()); // //# int64: ok - - Expect.equals(0, (-double.minPositive).ceil()); - Expect.equals(0, (2.0 * -double.minPositive).ceil()); - Expect.equals(0, (-1.18e-38).ceil()); - Expect.equals(0, (-1.18e-38 * 2).ceil()); - Expect.equals(0, (-0.49999999999999994).ceil()); - Expect.equals(0, (-0.5).ceil()); - Expect.equals(0, (-0.9999999999999999).ceil()); - Expect.equals(-1, (-1.0).ceil()); - Expect.equals(-1, (-1.000000000000001).ceil()); - Expect.equals(-4503599627370496, (-4503599627370496.0).ceil()); - Expect.equals(-4503599627370497, (-4503599627370497.0).ceil()); - Expect.equals(-4503599627370498, (-4503599627370498.0).ceil()); - Expect.equals(-4503599627370499, (-4503599627370499.0).ceil()); - Expect.equals(-9007199254740991, (-9007199254740991.0).ceil()); - Expect.equals(-9007199254740992, (-9007199254740992.0).ceil()); - Expect.equals(-9223372036854775808, (-double.maxFinite).ceil()); // //# int64: ok - - Expect.isTrue(0.0.ceil() is int); - Expect.isTrue(double.minPositive.ceil() is int); - Expect.isTrue((2.0 * double.minPositive).ceil() is int); - Expect.isTrue((1.18e-38).ceil() is int); - Expect.isTrue((1.18e-38 * 2).ceil() is int); - Expect.isTrue(0.49999999999999994.ceil() is int); - Expect.isTrue(0.5.ceil() is int); - Expect.isTrue(0.9999999999999999.ceil() is int); - Expect.isTrue(1.0.ceil() is int); - Expect.isTrue(1.000000000000001.ceil() is int); - Expect.isTrue(4503599627370496.0.ceil() is int); - Expect.isTrue(4503599627370497.0.ceil() is int); - Expect.isTrue(4503599627370498.0.ceil() is int); - Expect.isTrue(4503599627370499.0.ceil() is int); - Expect.isTrue(9007199254740991.0.ceil() is int); - Expect.isTrue(9007199254740992.0.ceil() is int); - Expect.isTrue(double.maxFinite.ceil() is int); - - Expect.isTrue((-double.minPositive).ceil() is int); - Expect.isTrue((2.0 * -double.minPositive).ceil() is int); - Expect.isTrue((-1.18e-38).ceil() is int); - Expect.isTrue((-1.18e-38 * 2).ceil() is int); - Expect.isTrue((-0.49999999999999994).ceil() is int); - Expect.isTrue((-0.5).ceil() is int); - Expect.isTrue((-0.9999999999999999).ceil() is int); - Expect.isTrue((-1.0).ceil() is int); - Expect.isTrue((-1.000000000000001).ceil() is int); - Expect.isTrue((-4503599627370496.0).ceil() is int); - Expect.isTrue((-4503599627370497.0).ceil() is int); - Expect.isTrue((-4503599627370498.0).ceil() is int); - Expect.isTrue((-4503599627370499.0).ceil() is int); - Expect.isTrue((-9007199254740991.0).ceil() is int); - Expect.isTrue((-9007199254740992.0).ceil() is int); - Expect.isTrue((-double.maxFinite).ceil() is int); -} diff --git a/tests/corelib_2/double_ceil_to_double_test.dart b/tests/corelib_2/double_ceil_to_double_test.dart deleted file mode 100644 index f1e4240b7e0..00000000000 --- a/tests/corelib_2/double_ceil_to_double_test.dart +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - Expect.equals(0.0, 0.0.ceilToDouble()); - Expect.equals(1.0, double.minPositive.ceilToDouble()); - Expect.equals(1.0, (2.0 * double.minPositive).ceilToDouble()); - Expect.equals(1.0, (1.18e-38).ceilToDouble()); - Expect.equals(1.0, (1.18e-38 * 2).ceilToDouble()); - Expect.equals(1.0, 0.49999999999999994.ceilToDouble()); - Expect.equals(1.0, 0.5.ceilToDouble()); - Expect.equals(1.0, 0.9999999999999999.ceilToDouble()); - Expect.equals(1.0, 1.0.ceilToDouble()); - Expect.equals(2.0, 1.000000000000001.ceilToDouble()); - // The following numbers are on the border of 52 bits. - // For example: 4503599627370499 + 0.5 => 4503599627370500. - Expect.equals(4503599627370496.0, 4503599627370496.0.ceilToDouble()); - Expect.equals(4503599627370497.0, 4503599627370497.0.ceilToDouble()); - Expect.equals(4503599627370498.0, 4503599627370498.0.ceilToDouble()); - Expect.equals(4503599627370499.0, 4503599627370499.0.ceilToDouble()); - - Expect.equals(9007199254740991.0, 9007199254740991.0.ceilToDouble()); - Expect.equals(9007199254740992.0, 9007199254740992.0.ceilToDouble()); - Expect.equals(double.maxFinite, double.maxFinite.ceilToDouble()); - - Expect.equals(0.0, (-double.minPositive).ceilToDouble()); - Expect.equals(0.0, (2.0 * -double.minPositive).ceilToDouble()); - Expect.equals(0.0, (-1.18e-38).ceilToDouble()); - Expect.equals(0.0, (-1.18e-38 * 2).ceilToDouble()); - Expect.equals(0.0, (-0.49999999999999994).ceilToDouble()); - Expect.equals(0.0, (-0.5).ceilToDouble()); - Expect.equals(0.0, (-0.9999999999999999).ceilToDouble()); - Expect.equals(-1.0, (-1.0).ceilToDouble()); - Expect.equals(-1.0, (-1.000000000000001).ceilToDouble()); - Expect.equals(-4503599627370496.0, (-4503599627370496.0).ceilToDouble()); - Expect.equals(-4503599627370497.0, (-4503599627370497.0).ceilToDouble()); - Expect.equals(-4503599627370498.0, (-4503599627370498.0).ceilToDouble()); - Expect.equals(-4503599627370499.0, (-4503599627370499.0).ceilToDouble()); - Expect.equals(-9007199254740991.0, (-9007199254740991.0).ceilToDouble()); - Expect.equals(-9007199254740992.0, (-9007199254740992.0).ceilToDouble()); - Expect.equals(-double.maxFinite, (-double.maxFinite).ceilToDouble()); - - Expect.equals(double.infinity, double.infinity.ceilToDouble()); - Expect.equals( - double.negativeInfinity, double.negativeInfinity.ceilToDouble()); - Expect.isTrue(double.nan.ceilToDouble().isNaN); - - Expect.isTrue(0.0.ceilToDouble() is double); - Expect.isTrue(double.minPositive.ceilToDouble() is double); - Expect.isTrue((2.0 * double.minPositive).ceilToDouble() is double); - Expect.isTrue((1.18e-38).ceilToDouble() is double); - Expect.isTrue((1.18e-38 * 2).ceilToDouble() is double); - Expect.isTrue(0.49999999999999994.ceilToDouble() is double); - Expect.isTrue(0.5.ceilToDouble() is double); - Expect.isTrue(0.9999999999999999.ceilToDouble() is double); - Expect.isTrue(1.0.ceilToDouble() is double); - Expect.isTrue(1.000000000000001.ceilToDouble() is double); - Expect.isTrue(4503599627370496.0.ceilToDouble() is double); - Expect.isTrue(4503599627370497.0.ceilToDouble() is double); - Expect.isTrue(4503599627370498.0.ceilToDouble() is double); - Expect.isTrue(4503599627370499.0.ceilToDouble() is double); - Expect.isTrue(9007199254740991.0.ceilToDouble() is double); - Expect.isTrue(9007199254740992.0.ceilToDouble() is double); - Expect.isTrue(double.maxFinite.ceilToDouble() is double); - - Expect.isTrue((-double.minPositive).ceilToDouble().isNegative); - Expect.isTrue((2.0 * -double.minPositive).ceilToDouble().isNegative); - Expect.isTrue((-1.18e-38).ceilToDouble().isNegative); - Expect.isTrue((-1.18e-38 * 2).ceilToDouble().isNegative); - Expect.isTrue((-0.49999999999999994).ceilToDouble().isNegative); - Expect.isTrue((-0.5).ceilToDouble().isNegative); - Expect.isTrue((-0.9999999999999999).ceilToDouble().isNegative); - - Expect.isTrue((-double.minPositive).ceilToDouble() is double); - Expect.isTrue((2.0 * -double.minPositive).ceilToDouble() is double); - Expect.isTrue((-1.18e-38).ceilToDouble() is double); - Expect.isTrue((-1.18e-38 * 2).ceilToDouble() is double); - Expect.isTrue((-0.49999999999999994).ceilToDouble() is double); - Expect.isTrue((-0.5).ceilToDouble() is double); - Expect.isTrue((-0.9999999999999999).ceilToDouble() is double); - Expect.isTrue((-1.0).ceilToDouble() is double); - Expect.isTrue((-1.000000000000001).ceilToDouble() is double); - Expect.isTrue((-4503599627370496.0).ceilToDouble() is double); - Expect.isTrue((-4503599627370497.0).ceilToDouble() is double); - Expect.isTrue((-4503599627370498.0).ceilToDouble() is double); - Expect.isTrue((-4503599627370499.0).ceilToDouble() is double); - Expect.isTrue((-9007199254740991.0).ceilToDouble() is double); - Expect.isTrue((-9007199254740992.0).ceilToDouble() is double); - Expect.isTrue((-double.maxFinite).ceilToDouble() is double); -} diff --git a/tests/corelib_2/double_compare_test.dart b/tests/corelib_2/double_compare_test.dart deleted file mode 100644 index 475bea7e10a..00000000000 --- a/tests/corelib_2/double_compare_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Dart test program for testing 'compare' on doubles. - -void main() { - Expect.equals(0, (0.0).compareTo(0.0)); - Expect.equals(0, (1.0).compareTo(1.0)); - Expect.equals(0, (-2.0).compareTo(-2.0)); - Expect.equals(0, (1e-50).compareTo(1e-50)); - Expect.equals(0, (-2e50).compareTo(-2e50)); - Expect.equals(0, double.nan.compareTo(double.nan)); - Expect.equals(0, double.infinity.compareTo(double.infinity)); - Expect.equals(0, double.negativeInfinity.compareTo(double.negativeInfinity)); - Expect.equals(0, (-0.0).compareTo(-0.0)); - Expect.isTrue((0.0).compareTo(1.0) < 0); - Expect.isTrue((1.0).compareTo(0.0) > 0); - Expect.isTrue((0.0).compareTo(-1.0) > 0); - Expect.isTrue((-1.0).compareTo(0.0) < 0); - Expect.isTrue((0.0).compareTo(1234e11) < 0); - Expect.isTrue((123e-112).compareTo(0.0) > 0); - Expect.isTrue((0.0).compareTo(-123.0e12) > 0); - Expect.isTrue((-1.0e8).compareTo(0.0) < 0); - - double maxDouble = 1.7976931348623157e308; - Expect.equals(0, maxDouble.compareTo(maxDouble)); - Expect.isTrue(maxDouble.compareTo(double.infinity) < 0); - Expect.isTrue(double.infinity.compareTo(maxDouble) > 0); - - double negMaxDouble = -maxDouble; - Expect.equals(0, negMaxDouble.compareTo(negMaxDouble)); - Expect.isTrue(double.negativeInfinity.compareTo(negMaxDouble) < 0); - Expect.isTrue(negMaxDouble.compareTo(double.negativeInfinity) > 0); - - Expect.isTrue((-0.0).compareTo(0.0) < 0); - Expect.isTrue((0.0).compareTo(-0.0) > 0); - Expect.isTrue(double.nan.compareTo(double.infinity) > 0); - Expect.isTrue(double.nan.compareTo(double.negativeInfinity) > 0); - Expect.isTrue(double.infinity.compareTo(double.nan) < 0); - Expect.isTrue(double.negativeInfinity.compareTo(double.nan) < 0); - Expect.isTrue(maxDouble.compareTo(double.nan) < 0); - Expect.isTrue(negMaxDouble.compareTo(double.nan) < 0); - Expect.isTrue(double.nan.compareTo(maxDouble) > 0); - Expect.isTrue(double.nan.compareTo(negMaxDouble) > 0); -} diff --git a/tests/corelib_2/double_floor2_test.dart b/tests/corelib_2/double_floor2_test.dart deleted file mode 100644 index 79e01ce4549..00000000000 --- a/tests/corelib_2/double_floor2_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - Expect.throwsUnsupportedError(() => double.infinity.floor()); - Expect.throwsUnsupportedError(() => double.negativeInfinity.floor()); - Expect.throwsUnsupportedError(() => double.nan.floor()); -} diff --git a/tests/corelib_2/double_floor_test.dart b/tests/corelib_2/double_floor_test.dart deleted file mode 100644 index 2bd1c9a8fe5..00000000000 --- a/tests/corelib_2/double_floor_test.dart +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - Expect.equals(0, 0.0.floor()); - Expect.equals(0, double.minPositive.floor()); - Expect.equals(0, (2.0 * double.minPositive).floor()); - Expect.equals(0, (1.18e-38).floor()); - Expect.equals(0, (1.18e-38 * 2).floor()); - Expect.equals(0, 0.49999999999999994.floor()); - Expect.equals(0, 0.5.floor()); - Expect.equals(0, 0.9999999999999999.floor()); - Expect.equals(1, 1.0.floor()); - Expect.equals(1, 1.000000000000001.floor()); - // The following numbers are on the border of 52 bits. - // For example: 4503599627370499 + 0.5 => 4503599627370500. - Expect.equals(4503599627370496, 4503599627370496.0.floor()); - Expect.equals(4503599627370497, 4503599627370497.0.floor()); - Expect.equals(4503599627370498, 4503599627370498.0.floor()); - Expect.equals(4503599627370499, 4503599627370499.0.floor()); - - Expect.equals(9007199254740991, 9007199254740991.0.floor()); - Expect.equals(9007199254740992, 9007199254740992.0.floor()); - Expect.equals(9223372036854775807, double.maxFinite.floor()); // //# int64: ok - - Expect.equals(-1, (-double.minPositive).floor()); - Expect.equals(-1, (2.0 * -double.minPositive).floor()); - Expect.equals(-1, (-1.18e-38).floor()); - Expect.equals(-1, (-1.18e-38 * 2).floor()); - Expect.equals(-1, (-0.49999999999999994).floor()); - Expect.equals(-1, (-0.5).floor()); - Expect.equals(-1, (-0.9999999999999999).floor()); - Expect.equals(-1, (-1.0).floor()); - Expect.equals(-2, (-1.000000000000001).floor()); - Expect.equals(-4503599627370496, (-4503599627370496.0).floor()); - Expect.equals(-4503599627370497, (-4503599627370497.0).floor()); - Expect.equals(-4503599627370498, (-4503599627370498.0).floor()); - Expect.equals(-4503599627370499, (-4503599627370499.0).floor()); - Expect.equals(-9007199254740991, (-9007199254740991.0).floor()); - Expect.equals(-9007199254740992, (-9007199254740992.0).floor()); - Expect.equals(-9223372036854775808, (-double.maxFinite).floor()); // //# int64: ok - - Expect.isTrue(0.0.floor() is int); - Expect.isTrue(double.minPositive.floor() is int); - Expect.isTrue((2.0 * double.minPositive).floor() is int); - Expect.isTrue((1.18e-38).floor() is int); - Expect.isTrue((1.18e-38 * 2).floor() is int); - Expect.isTrue(0.49999999999999994.floor() is int); - Expect.isTrue(0.5.floor() is int); - Expect.isTrue(0.9999999999999999.floor() is int); - Expect.isTrue(1.0.floor() is int); - Expect.isTrue(1.000000000000001.floor() is int); - Expect.isTrue(4503599627370496.0.floor() is int); - Expect.isTrue(4503599627370497.0.floor() is int); - Expect.isTrue(4503599627370498.0.floor() is int); - Expect.isTrue(4503599627370499.0.floor() is int); - Expect.isTrue(9007199254740991.0.floor() is int); - Expect.isTrue(9007199254740992.0.floor() is int); - Expect.isTrue(double.maxFinite.floor() is int); - - Expect.isTrue((-double.minPositive).floor() is int); - Expect.isTrue((2.0 * -double.minPositive).floor() is int); - Expect.isTrue((-1.18e-38).floor() is int); - Expect.isTrue((-1.18e-38 * 2).floor() is int); - Expect.isTrue((-0.49999999999999994).floor() is int); - Expect.isTrue((-0.5).floor() is int); - Expect.isTrue((-0.9999999999999999).floor() is int); - Expect.isTrue((-1.0).floor() is int); - Expect.isTrue((-1.000000000000001).floor() is int); - Expect.isTrue((-4503599627370496.0).floor() is int); - Expect.isTrue((-4503599627370497.0).floor() is int); - Expect.isTrue((-4503599627370498.0).floor() is int); - Expect.isTrue((-4503599627370499.0).floor() is int); - Expect.isTrue((-9007199254740991.0).floor() is int); - Expect.isTrue((-9007199254740992.0).floor() is int); - Expect.isTrue((-double.maxFinite).floor() is int); -} diff --git a/tests/corelib_2/double_floor_to_double_test.dart b/tests/corelib_2/double_floor_to_double_test.dart deleted file mode 100644 index abd1c7031fc..00000000000 --- a/tests/corelib_2/double_floor_to_double_test.dart +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - Expect.equals(0.0, 0.0.floorToDouble()); - Expect.equals(0.0, double.minPositive.floorToDouble()); - Expect.equals(0.0, (2.0 * double.minPositive).floorToDouble()); - Expect.equals(0.0, (1.18e-38).floorToDouble()); - Expect.equals(0.0, (1.18e-38 * 2).floorToDouble()); - Expect.equals(0.0, 0.49999999999999994.floorToDouble()); - Expect.equals(0.0, 0.5.floorToDouble()); - Expect.equals(0.0, 0.9999999999999999.floorToDouble()); - Expect.equals(1.0, 1.0.floorToDouble()); - Expect.equals(1.0, 1.000000000000001.floorToDouble()); - // The following numbers are on the border of 52 bits. - // For example: 4503599627370499 + 0.5 => 4503599627370500. - Expect.equals(4503599627370496.0, 4503599627370496.0.floorToDouble()); - Expect.equals(4503599627370497.0, 4503599627370497.0.floorToDouble()); - Expect.equals(4503599627370498.0, 4503599627370498.0.floorToDouble()); - Expect.equals(4503599627370499.0, 4503599627370499.0.floorToDouble()); - - Expect.equals(9007199254740991.0, 9007199254740991.0.floorToDouble()); - Expect.equals(9007199254740992.0, 9007199254740992.0.floorToDouble()); - Expect.equals(double.maxFinite, double.maxFinite.floorToDouble()); - - Expect.equals(-1.0, (-double.minPositive).floorToDouble()); - Expect.equals(-1.0, (2.0 * -double.minPositive).floorToDouble()); - Expect.equals(-1.0, (-1.18e-38).floorToDouble()); - Expect.equals(-1.0, (-1.18e-38 * 2).floorToDouble()); - Expect.equals(-1.0, (-0.49999999999999994).floorToDouble()); - Expect.equals(-1.0, (-0.5).floorToDouble()); - Expect.equals(-1.0, (-0.9999999999999999).floorToDouble()); - Expect.equals(-1.0, (-1.0).floorToDouble()); - Expect.equals(-2.0, (-1.000000000000001).floorToDouble()); - Expect.equals(-4503599627370496.0, (-4503599627370496.0).floorToDouble()); - Expect.equals(-4503599627370497.0, (-4503599627370497.0).floorToDouble()); - Expect.equals(-4503599627370498.0, (-4503599627370498.0).floorToDouble()); - Expect.equals(-4503599627370499.0, (-4503599627370499.0).floorToDouble()); - Expect.equals(-9007199254740991.0, (-9007199254740991.0).floorToDouble()); - Expect.equals(-9007199254740992.0, (-9007199254740992.0).floorToDouble()); - Expect.equals(-double.maxFinite, (-double.maxFinite).floorToDouble()); - - Expect.equals(double.infinity, double.infinity.floorToDouble()); - Expect.equals( - double.negativeInfinity, double.negativeInfinity.floorToDouble()); - Expect.isTrue(double.nan.floorToDouble().isNaN); - - Expect.isTrue(0.0.floorToDouble() is double); - Expect.isTrue(double.minPositive.floorToDouble() is double); - Expect.isTrue((2.0 * double.minPositive).floorToDouble() is double); - Expect.isTrue((1.18e-38).floorToDouble() is double); - Expect.isTrue((1.18e-38 * 2).floorToDouble() is double); - Expect.isTrue(0.49999999999999994.floorToDouble() is double); - Expect.isTrue(0.5.floorToDouble() is double); - Expect.isTrue(0.9999999999999999.floorToDouble() is double); - Expect.isTrue(1.0.floorToDouble() is double); - Expect.isTrue(1.000000000000001.floorToDouble() is double); - Expect.isTrue(4503599627370496.0.floorToDouble() is double); - Expect.isTrue(4503599627370497.0.floorToDouble() is double); - Expect.isTrue(4503599627370498.0.floorToDouble() is double); - Expect.isTrue(4503599627370499.0.floorToDouble() is double); - Expect.isTrue(9007199254740991.0.floorToDouble() is double); - Expect.isTrue(9007199254740992.0.floorToDouble() is double); - Expect.isTrue(double.maxFinite.floorToDouble() is double); - - Expect.isTrue((-double.minPositive).floorToDouble() is double); - Expect.isTrue((2.0 * -double.minPositive).floorToDouble() is double); - Expect.isTrue((-1.18e-38).floorToDouble() is double); - Expect.isTrue((-1.18e-38 * 2).floorToDouble() is double); - Expect.isTrue((-0.49999999999999994).floorToDouble() is double); - Expect.isTrue((-0.5).floorToDouble() is double); - Expect.isTrue((-0.9999999999999999).floorToDouble() is double); - Expect.isTrue((-1.0).floorToDouble() is double); - Expect.isTrue((-1.000000000000001).floorToDouble() is double); - Expect.isTrue((-4503599627370496.0).floorToDouble() is double); - Expect.isTrue((-4503599627370497.0).floorToDouble() is double); - Expect.isTrue((-4503599627370498.0).floorToDouble() is double); - Expect.isTrue((-4503599627370499.0).floorToDouble() is double); - Expect.isTrue((-9007199254740991.0).floorToDouble() is double); - Expect.isTrue((-9007199254740992.0).floorToDouble() is double); - Expect.isTrue((-double.maxFinite).floorToDouble() is double); -} diff --git a/tests/corelib_2/double_hash_code_test.dart b/tests/corelib_2/double_hash_code_test.dart deleted file mode 100644 index b85b8f7548f..00000000000 --- a/tests/corelib_2/double_hash_code_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2017, 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 - -// VMOptions=--intrinsify --use_sse41 -// VMOptions=--no_intrinsify --use_sse41 -// VMOptions=--intrinsify --no_use_sse41 -// VMOptions=--no_intrinsify --no_use_sse41 - -import 'package:expect/expect.dart'; - -main() { - for (int x in [0, 1, 0xffff, 0xffffffff, 0x111111111111, 0xffffffffffff]) { - test(x); - test(-x); - } - - // Test with ints outside the 53-bit range that are known to have an - // exact double representation. - test(9007199254840856); - test(144115188075954880); - test(936748722493162112); - test(0x8000000000000000); -} - -test(int x) { - Expect.equals(x, x.toDouble().toInt(), "bad test argument ($x)"); - Expect.equals(x.hashCode, x.toDouble().hashCode); -} diff --git a/tests/corelib_2/double_parse_test.dart b/tests/corelib_2/double_parse_test.dart deleted file mode 100644 index fcb54b50ec3..00000000000 --- a/tests/corelib_2/double_parse_test.dart +++ /dev/null @@ -1,1214 +0,0 @@ -// Copyright (c) 2014, 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. -// VMOptions=--no-use-field-guards -// VMOptions= - -// @dart = 2.9 - -import "dart:math" show pow; -import "package:expect/expect.dart"; - -const whiteSpace = const [ - "", - "\x09", - "\x0a", - "\x0b", - "\x0c", - "\x0d", - // JS implementations disagree on U+0085 being whitespace. - // U+0085 does not work well with testParseWhiteSpace, so omit it. - "\xa0", - "\u1680", - "\u2000", - "\u2001", - "\u2002", - "\u2003", - "\u2004", - "\u2005", - "\u2006", - "\u2007", - "\u2008", - "\u2009", - "\u200a", - "\u2028", - "\u2029", - "\u202f", - "\u205f", - "\u3000", - "\uFEFF" -]; - -void expectNumEquals(double expected, var actual, String message) { - if (expected.isNaN) { - Expect.isTrue(actual is double && actual.isNaN, "isNaN: $message"); - } else { - Expect.identical(expected, actual, message); - } -} - -// Test source surrounded by any combination of whitespace. -void testParseAllWhitespace(String source, double result) { - for (String ws1 in whiteSpace) { - for (String ws2 in whiteSpace) { - String padded = "$ws1$source$ws2"; - // Use Expect.identical because it also handles NaN and 0.0/-0.0. - // Except on dart2js: http://dartbug.com/11551 - expectNumEquals(result, double.parse(padded), "parse '$padded'"); - padded = "$ws1$ws2$source"; - expectNumEquals(result, double.parse(padded), "parse '$padded'"); - padded = "$source$ws1$ws2"; - expectNumEquals(result, double.parse(padded), "parse '$padded'"); - } - } -} - -// Test source and -source surrounded by any combination of whitespace. -void testParseWhitespace(String source, double result) { - assert(result >= 0); - testParseAllWhitespace(source, result); - testParseAllWhitespace("-$source", -result); -} - -// Test parsing source, optionally preceded and/or followed by whitespace. -void testParse(String source, double result, [name = ""]) { - expectNumEquals(result, double.parse(source), "parse '$source:$name"); - expectNumEquals(result, double.parse(" $source"), "parse ' $source':$name"); - expectNumEquals(result, double.parse("$source "), "parse '$source ':$name"); - expectNumEquals(result, double.parse(" $source "), "parse ' $source ':$name"); - - expectNumEquals(result, double.parse("+$source"), "parse '+$source:$name"); - expectNumEquals(result, double.parse(" +$source"), "parse ' +$source':$name"); - expectNumEquals(result, double.parse("+$source "), "parse '+$source ':$name"); - expectNumEquals( - result, double.parse(" +$source "), "parse ' +$source ':$name"); - - expectNumEquals(-result, double.parse("-$source"), "parse '-$source:$name"); - expectNumEquals( - -result, double.parse(" -$source"), "parse ' -$source':$name"); - expectNumEquals( - -result, double.parse("-$source "), "parse '-$source ':$name"); - expectNumEquals( - -result, double.parse(" -$source "), "parse ' -$source ':$name"); -} - -void testDouble(double value) { - testParse("$value", value); - if (value.isFinite) { - String exp = value.toStringAsExponential(); - String lcexp = exp.toLowerCase(); - testParse(lcexp, value); - String ucexp = exp.toUpperCase(); - testParse(ucexp, value); - } -} - -void testFail(String source) { - var object = new Object(); - Expect.throwsFormatException(() { - double.parse(source); - }); - Expect.equals(1.5, double.tryParse(source) ?? 1.5); -} - -void main() { - testDouble(0.0); - testDouble(5e-324); - testDouble(2.225073858507201e-308); - testDouble(2.2250738585072014e-308); - testDouble(0.49999999999999994); - testDouble(0.5); - testDouble(0.50000000000000006); - testDouble(0.9999999999999999); - testDouble(1.0); - testDouble(1.0000000000000002); - testDouble(4294967295.0); - testDouble(4294967296.0); - testDouble(4503599627370495.5); - testDouble(4503599627370497.0); - testDouble(9007199254740991.0); - testDouble(9007199254740992.0); - testDouble(1.7976931348623157e+308); - testDouble(double.infinity); - testDouble(double.nan); - - // Strings that cannot occur from toString of a number. - testParse("000000000000", 0.0); - testParse("000000000001", 1.0); - testParse("000000000000.0000000000000", 0.0); - testParse("000000000001.0000000000000", 1.0); - testParse("0e0", 0.0); - testParse("0e+0", 0.0); - testParse("0e-0", 0.0); - testParse("1e0", 1.0); - testParse("1e+0", 1.0); - testParse("1e-0", 1.0); - testParse("1.", 1.0); - testParse(".1", 0.1); - testParse("1.e1", 10.0); - testParse(".1e1", 1.0); - testParse("Infinity", double.infinity); - testParse("NaN", double.nan); - - // Cases where mantissa and 10^exponent are representable as a double. - for (int i = -22; i <= 22; i++) { - for (double j in [1.0, 9007199254740991.0, 9007199254740992.0]) { - var value = (i >= 0) ? j * pow(10.0, i) : j / pow(10.0, -i); - testParse("${j}e$i", value, "$i/$j"); - testParse("${j}E$i", value, "$i/$j"); - if (i >= 0) { - testParse("${j}e+$i", value, "$i/$j"); - testParse("${j}E+$i", value, "$i/$j"); - } - } - } - for (int i = 0; i <= 22; i++) { - var digits = "9007199254740991"; - for (int i = 0; i < digits.length; i++) { - int dotIndex = digits.length - i; - var string = "${digits.substring(0, dotIndex)}." - "${digits.substring(dotIndex)}e$i"; - testParse(string, 9007199254740991.0); - } - } - - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000012351641146031163604414219821705534309126495065358119110639" - "6420625168876817552187966324959090408998094949141173861429432731" - "6641775889849490996936990026954695315751782975778511319614542919" - "6224552592217965901424968268076250159685228839124609682811834931" - "8292403785007928846349518531559641397792756664639171692046759890" - "0776562329863178978731138323263641361002818700324274998854829973" - "5227010414083113118928696725368169503983880965288753370088162336" - "8004844756702677687292583305671118833393020810798402309572336459" - "2015026502876542452438269585569329582311976245631182694093981811" - "9686640211945509336174248834117544931694293962814151377997828762" - "2277536275946568454181273895934743339974841620248529105142565927" - "256981069188614130727188467062660492956638336181640625", - 0.0); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000024703282292062327208828439643411068618252990130716238221279" - "2841250337753635104375932649918180817996189898282347722858865463" - "3283551779698981993873980053909390631503565951557022639229085839" - "2449105184435931802849936536152500319370457678249219365623669863" - "6584807570015857692699037063119282795585513329278343384093519780" - "1553124659726357957462276646527282722005637400648549997709659947" - "0454020828166226237857393450736339007967761930577506740176324673" - "6009689513405355374585166611342237666786041621596804619144672918" - "4030053005753084904876539171138659164623952491262365388187963623" - "9373280423891018672348497668235089863388587925628302755995657524" - "4555072551893136908362547791869486679949683240497058210285131854" - "51396213837722826145437693412532098591327667236328125", - 0.0); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000024703282292062327208828439643411068618252990130716238221279" - "2841250337753635104375932649918180817996189898282347722858865463" - "3283551779698981993873980053909390631503565951557022639229085839" - "2449105184435931802849936536152500319370457678249219365623669863" - "6584807570015857692699037063119282795585513329278343384093519780" - "1553124659726357957462276646527282722005637400648549997709659947" - "0454020828166226237857393450736339007967761930577506740176324673" - "6009689513405355374585166611342237666786041621596804619144672918" - "4030053005753084904876539171138659164623952491262365388187963623" - "9373280423891018672348497668235089863388587925628302755995657524" - "4555072551893136908362547791869486679949683240497058210285131854" - "51396213837722826145437693412532098591327667236328125", - 0.0); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000024703282292062327208828439643411068627545332140664243314532" - "8041234170109088178685677591650492652607243027730579814636067699" - "1112238669661707327453443265068702897439863329200619332642599205" - "1806252781222000513169502627641523911022607448403553068808609405" - "1727798181294290864842608522062097649849550765341204993205100587" - "2127469658709242016690593998242808606978027857019419997429604579" - "7572623273334010723772922131119806567715298322567005234345331218" - "5169920860031716486480793611343761679481328431956040281530986197" - "8304604971452253283193290744072288902141724247846767401941767720" - "8561650585989659548591956327689896895290365125294085321852619688" - "9863888974446146846024033780172178553364579041996676675092137151" - "9705456298034409473812692774776868254618683783877327369245051207" - "5931578479504396230612962142122846982018227555473696607567828620" - "5497859173707553281928994692862033843994140625", - 5e-324); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000037054923438093490813242659465116602918087143186126352238665" - "4061891674274999582254154033144959392383231717975289492511095959" - "2096640779585747657231506869704773681319051549691937265430115392" - "9316510179867828993955338712739726887403536747219495345250565253" - "9734220743745353366904984135736109339114232557854653467028698863" - "1755341990606652876965097618075398198036065644601954996844545287" - "8562428797081554870870561495721040952204106503876761616095480465" - "4854302923481671949982122917011832487483775622035971266330696098" - "1770527542930458978998057183774359009418156980309146068528141338" - "9871550473737887132279287842897827763181104688776671568136524122" - "1523792405286695424882335699501538146509629059245968850620692484" - "3143597161396297062546730578356156393213233025204703880754948792" - "4068421520495603769387037857877153017981772444526303392432171379" - "4502140826292446718071005307137966156005859375", - 5e-324); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000037054923438093490813242659465116602927379485196074357331918" - "9261875506630452656563898974877271226994284847423521584288298194" - "9925327669548472990810970080864085947255348927335533958843628758" - "8673657776653897704274904804228750479055686517373829048435504795" - "4877211355023786539048555594678924193378269993917515076140279670" - "2329686989589536936193414969790924083008456100972824996564489920" - "5681031242249339356786090176104508511951642895866260110264487010" - "4014534270108033061877749917013356500179062432395206928717009377" - "6045079508629627357314808756707988746935928736893548082281945435" - "9059920635836528008522746502352634795082881888442454133993486286" - "6832608827839705362543821687804230019924524860745587315427697781" - "770943207565842392181565401187981478869915008544921875", - 5e-324); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000037054923438093490813242659465116602936671827206022362425172" - "4461859338985905730873643916609583061605337976871753676065500430" - "7754014559511198324390433292023398213191646304979130652257142124" - "8030805373439966414594470895717774070707836287528162751620444337" - "0020201966302219711192127053621739047642307429980376685251860477" - "2904031988572420995421732321506449967980846557343694996284434553" - "2799633687417123842701618856487976071699179287855758604433493555" - "3174765616734394173773376917014880512874349242754442591103322657" - "0319631474328795735631560329641618484453700493477950096035749532" - "8248290797935168884766205161807441826984659088108236699850448451" - "2141425250392715300205307676106921893339420662245205780234703079" - "2275266989920550781084577445403473184185067145693733619245051207" - "5931578479504396230612962142122846982018227555473696607567828620" - "5497859173707553281928994692862033843994140625", - 5e-324); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000049406564584124654417656879286822137236505980261432476442558" - "5682500675507270208751865299836361635992379796564695445717730926" - "6567103559397963987747960107818781263007131903114045278458171678" - "4898210368871863605699873072305000638740915356498438731247339727" - "3169615140031715385398074126238565591171026658556686768187039560" - "3106249319452715914924553293054565444011274801297099995419319894" - "0908041656332452475714786901472678015935523861155013480352649347" - "2019379026810710749170333222684475333572083243193609238289345836" - "8060106011506169809753078342277318329247904982524730776375927247" - "8746560847782037344696995336470179726777175851256605511991315048" - "9110145103786273816725095583738973359899366480994116420570263709" - "0279242767544565229087538682506419718265533447265625", - 5e-324); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000049406564584124654417656879286822137255090664281328486629065" - "6082468340218176357371355183300985305214486055461159629272135398" - "2224477339323414654906886530137405794879726658401238665285198410" - "3612505562444001026339005255283047822045214896807106137617218810" - "3455596362588581729685217044124195299699101530682409986410201174" - "4254939317418484033381187996485617213956055714038839994859209159" - "5145246546668021447545844262239613135430596645134010468690662437" - "0339841720063432972961587222687523358962656863912080563061972395" - "6609209942904506566386581488144577804283448495693534803883535441" - "7123301171979319097183912655379793790580730250588170643705239377" - "9727777948892293692048067560344357106729158083993353350184274303" - "9410912596068818947625385549553736509237367567754654738490102415" - "1863156959008792461225924284245693964036455110947393215135657241" - "099571834741510656385798938572406768798828125", - 5e-324); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000074109846876186981626485318930233205836174286372252704477330" - "8123783348549999164508308066289918784766463435950578985022191918" - "4193281559171495314463013739409547362638103099383874530860230785" - "8633020359735657987910677425479453774807073494438990690501130507" - "9468441487490706733809968271472218678228465115709306934057397726" - "3510683981213305753930195236150796396072131289203909993689090575" - "7124857594163109741741122991442081904408213007753523232190960930" - "9708605846963343899964245834023664974967551244071942532661392196" - "3541055085860917957996114367548718018836313960618292137056282677" - "9743100947475774264558575685795655526362209377553343136273048244" - "3047584810573390849764671399003076293019258118491937701241384968" - "6287194322792594125093461156712312786426466050409407761509897584" - "8136843040991207538774075715754306035963544889052606784864342758" - "900428165258489343614201061427593231201171875", - 5e-324); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000074109846876186981626485318930233205854758970392148714663837" - "8523751013260905313127797949754542453988569694847043168576596389" - "9850655339096945981621940161728171894510697854671067917687257517" - "7347315553307795408549809608457500958111373034747658096871009590" - "9754422710047573078097111189357848386756539987835030152280559340" - "4659373979179073872386829939581848166016912201945649993128979841" - "1362062484498678713572180352209017023903285791732520220528974020" - "8029068540216066123755499834026713000358124864790413857434018755" - "2090159017259254714629617513415977493871857473787096164563890871" - "8119841271673056017045493004705269590165763776884908267986972573" - "3665217655679410725087643375608460039849049721491174630855395563" - "54188641513168478436313080237596295773983001708984375", - 1e-323); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000074109846876186981626485318930233205873343654412044724850344" - "8923718677971811461747287833219166123210675953743507352131000861" - "5508029119022396648780866584046796426383292609958261304514284249" - "6061610746879932829188941791435548141415672575056325503240888674" - "0040403932604439422384254107243478095284614859960753370503720954" - "5808063977144841990843464643012899935961693114687389992568869106" - "5599267374834247685403237712975952143398358575711517208866987110" - "6349531233468788347546753834029761025748698485508885182206645314" - "0639262948657591471263120659283236968907400986955900192071499065" - "6496581595870337769532410323614883653969318176216473399700896902" - "4282850500785430600410615352213843786678841324490411560469406158" - "4550533979841101562169154890806946368370134291387467238490102415" - "1863156959008792461225924284245693964036455110947393215135657241" - "099571834741510656385798938572406768798828125", - 1e-323); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000011125369292" - "5360069154511635866620203210960799023116591527666370844360221740" - "6959097927141579506255510282033669865517905502576217080776730054" - "4280061926888594105653889967660011652398050737212918180359607825" - "2347125186710418762540332530832907947436024558998429581982425031" - "7954385059152437399890443876874974725790225802525457699928291235" - "4093225567689679024960579905428830259962166760571761950743978498" - "0479564444580149632075553173315669683173879325651468588102366281" - "5890742832175436061414318821022423405703806955738531400844926622" - "0550120807237108092835830752700771425423583764509515806613894483" - "6485368656166704349449158753391942346304638698898642932982747054" - "5684547703068233784351199339157645340492308605462312698364257812" - "5", - 1.1125369292536007e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000011125369292" - "5360069154511635866620203210960799023116610112350390740370408247" - "7359065591852485654875000165498293534740011761472681264331134525" - "9937435706814044772812816389978636184270645492500111567186634557" - "1061420380282556183179464713810955130740324099307096988352304114" - "8240366281709303744177586794760604434318300674651180918151452849" - "5241915565655447143417214608859882029906947673313501950183867763" - "4716769334915718603906610534082604802668952109630465576440379371" - "4211205525428158285205572821025471431094380576457002725617553180" - "9099224738635444849469333898568030900459127277678319834121502677" - "4862108980363986101936076072301556410108193098230208064696671383" - "6302180548174253659674171315763029087322100208461549627978268407" - "4131669828524253718537846867047316790971834120489029738490102415" - "1863156959008792461225924284245693964036455110947393215135657241" - "099571834741510656385798938572406768798828125", - 1.1125369292536007e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000011125369292" - "5360093857793927928947412039400442434185191195972481664588256512" - "9400380600184308462011953048487227014291989141962100620081191046" - "1906239926662125432368943599250777752029021933482747432761666932" - "6081935177574213144751136884007361083502182696938981541236215812" - "4253211406611428748302338022108627812847664259678077865798649401" - "4497660229450268863966221848525061212023023248478571949013749179" - "6696380382410806898101889263285073571646568472249978339940677865" - "3579969652328069212208231432361613047099274956616864695216972981" - "6031069881591856241078866777972171115011992742603077167294249913" - "7481908755860441269310739102717418145889672225195380557264480249" - "9621987409855350817390775154421748273612200242960133979035379072" - "1007951555248028896005922474205893068160932603143782761509897584" - "8136843040991207538774075715754306035963544889052606784864342758" - "900428165258489343614201061427593231201171875", - 1.1125369292536007e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000011125369292" - "5360093857793927928947412039400442434185209780656501560598443019" - "9800348264895214610631442931951850683514095400858564803635595517" - "7563613706587576099527870021569402283901616688769940819588693664" - "4796230371146350565390269066985408266806482237247648947606094895" - "4539192629168295092589480939994257521375739131803801084021811015" - "5646350227416036982422856551956112981967804161220311948453638445" - "0933585272746375869932946624052008691141641256228975328278690955" - "1900432345580791435999485432364661072489848577335336019989599540" - "4580173812990192997712369923839430590047536255771881194801858107" - "5858649080057723021797656421627032209693226624526945688978404579" - "0239620254961370692713747131027132020441991845959370908649389667" - "01396213837722826145437693412532098591327667236328125", - 1.1125369292536007e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000011125369292" - "5360093857793927928947412039400442434185228365340521456608629527" - "0200315929606120759250932815416474352736201659755028987189999989" - "3220987486513026766686796443888026815774211444057134206415720396" - "3510525564718487986029401249963455450110781777556316353975973978" - "4825173851725161436876623857879887229903814003929524302244972629" - "6795040225381805100879491255387164751912585073962051947893527710" - "5170790163081944841764003984818943810636714040207972316616704045" - "0220895038833513659790739432367709097880422198053807344762226099" - "3129277744388529754345873069706690065083079768940685222309466301" - "4235389404255004774284573740536646273496781023858510820692328908" - "0857253100067390568036719107632515767271783448958607838263400261" - "9271291212296536333081616208300526650104600844121842238490102415" - "1863156959008792461225924284245693964036455110947393215135657241" - "099571834741510656385798938572406768798828125", - 1.112536929253601e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000011125369292" - "5360118561076219991274620867840085845253828033646632276836664299" - "2641598602648849715007375581870031501510285299140912526494460981" - "0847165486286558093401850075478792915405182640326963458817779503" - "7245335555582282368240205603137908586176939915496868313229764759" - "1124000199184152785288518003113540316961252461082144468115330795" - "7199474887142394939885133198483395703973441561868861946163298392" - "1387606100912602107790340074788347699109403186806482068455015628" - "7910121858986146810584652043706898739275890198932140639134272458" - "8610226818743277902588909094978089754671488747034246582989821731" - "5231929503948741694146154089862122073081814550155248444974062103" - "4794692806854507601076294922896618700391675086456429118934521521" - "5279242767544565229087538682506419718265533447265625", - 1.112536929253601e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000011125369292" - "5360118561076219991274620867840085845253846618330652172846850806" - "3041566267359755863626865465334655170732391558037376710048865452" - "6504539266212008760560776497797417447277777395614156845644806235" - "5959630749154419788879337786115955769481239455805535719599643842" - "1409981421741019129575660920999170025489327333207867686338492409" - "8348164885108163058341767901914447473918222474610601945603187657" - "5624810991248171079621397435555282818604475970785479056793028718" - "6230584552238869034375906043709946764666463819650611963906899017" - "7159330750141614659222412240845349229707032260203050610497429925" - "3608669828146023446633071408771736136885368949486813576687986432" - "5412325651960527476399266899502002447221466689455666048548532116" - "4410912596068818947625385549553736509237367567754654738490102415" - "1863156959008792461225924284245693964036455110947393215135657241" - "099571834741510656385798938572406768798828125", - 1.112536929253601e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000011125369292" - "5360143264358512053601829696279729256322427701952743097064699071" - "5082881275691578670763818348323588650284368938526796065798921972" - "8473343486060089420116903707069559015036153836596792711219838611" - "0980145546446076750451009956312361722243098053437420272483555539" - "7422826546643144133700412148347193404018690918234764633985688961" - "7603909548902984778890775141579626656034298049775671944433069073" - "7604422038743259373816676164757751587582092333404991820293327212" - "5599348679138779961378564655046088380671358199810473933506318818" - "4091175893098026050831945120249489444259897725127807943670177161" - "6228469603642478614007734439187597872666848076451986069255795298" - "8732132513641624634115870738160721633511566723954250399605642781" - "1287194322792594125093461156712312786426466050409407761509897584" - "8136843040991207538774075715754306035963544889052606784864342758" - "900428165258489343614201061427593231201171875", - 1.112536929253601e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000011125369292" - "5360143264358512053601829696279729256322446286636762993074885578" - "5482848940402484819383308231788212319506475197423260249353326444" - "4130717265985540087275830129388183546908748591883986098046865342" - "9694440740018214171090142139290408905547397593746087678853434622" - "7708807769200010477987555066232823112546765790360487852208850575" - "8752599546868752897347409845010678425979078962517411943872958339" - "1841626929078828345647733525524686707077165117383988808631340302" - "3919811372391502185169818655049136406061931820528945258278945377" - "2640279824496362807465448266116748919295441238296611971177785355" - "4605209927839760366494651758097211936470402475783551200969719627" - "9349765358747644509438842714766105380341358326953487329219653376" - "04188641513168478436313080237596295773983001708984375", - 1.1125369292536017e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000011125369292" - "5360143264358512053601829696279729256322464871320782889085072085" - "5882816605113390968002798115252835988728581456319724432907730915" - "9788091045910990754434756551706808078781343347171179484873892074" - "8408735933590351591729274322268456088851697134054755085223313705" - "7994788991756876822274697984118452821074840662486211070432012189" - "9901289544834521015804044548441730195923859875259151943312847604" - "6078831819414397317478790886291621826572237901362985796969353392" - "2240274065644224408961072655052184431452505441247416583051571936" - "1189383755894699564098951411984008394330984751465415998685393549" - "2981950252037042118981569077006826000273956875115116332683643956" - "9967398203853664384761814691371489127171149929952724258833663970" - "9550533979841101562169154890806946368370134291387467238490102415" - "1863156959008792461225924284245693964036455110947393215135657241" - "099571834741510656385798938572406768798828125", - 1.1125369292536017e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000022250738585" - "0720138309023271733240406421921598046233183055332741688720443481" - "3918195854283159012511020564067339731035811005152434161553460108" - "8560123853777188211307779935320023304796101474425836360719215650" - "4694250373420837525080665061665815894872049117996859163964850063" - "5908770118304874799780887753749949451580451605050915399856582470" - "8186451135379358049921159810857660519924333521143523901487956996" - "0959128889160299264151106346631339366347758651302937176204732563" - "1781485664350872122828637642044846811407613911477062801689853244" - "1100241614474216185671661505401542850847167529019031613227788967" - "2970737312333408698898317506783884692609277397797285865965494109" - "1369095406136467568702398678315290680984617210924625396728515625", - 2.2250738585072014e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000022250738585" - "0720138309023271733240406421921598046233201640016761584730629988" - "4318163518994065161130510447531963400257917264048898345107864580" - "4217497633702638878466706357638647836668696229713029747546242382" - "3408545566992974945719797244643863078176348658305526570334729146" - "6194751340861741144068030671635579160108526477176638618079744084" - "9335141133345126168377794514288712289869114433885263900927846261" - "5196333779495868235982163707398274485842831435281934164542745653" - "0101948357603594346619891642047894836798187532195534126462479802" - "9649345545872552942305164651268802325882711042187835640735397161" - "1347477636530690451385234825693498756412831797128850997679418438" - "1986728251242487444025370654920674427814408813923862326342526219" - "9131669828524253718537846867047316790971834120489029738490102415" - "1863156959008792461225924284245693964036455110947393215135657241" - "099571834741510656385798938572406768798828125", - 2.2250738585072014e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000022250738585" - "0720163012305563795567615250361241457301782723638852508948478253" - "6359478527325887968267463330520896879809894644538317700857921100" - "6186301853550719538022833566910789404427072670695665613121274757" - "8429060364284631907291469414840269030938207255937411123218640844" - "2207596465763866148192781898983602538637890062203535565726940636" - "8590885797139947888926801753953891471985190009050333899757727677" - "7175944826990956530177442436600743254820447797901446928043044146" - "9470712484503505273622550253384036452803081912355396096061899603" - "6581190688828964333914697530672942540435576507112592973908144397" - "3967277412027145618759897856109360492194310924094023490247227304" - "5306535112923584601741974493579393614104508848422446677399636884" - "6007951555248028896005922474205893068160932603143782761509897584" - "8136843040991207538774075715754306035963544889052606784864342758" - "900428165258489343614201061427593231201171875", - 2.2250738585072014e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000022250738585" - "0720163012305563795567615250361241457301801308322872404958664760" - "6759446192036794116886953213985520549032000903434781884412325572" - "1843675633476170205181759989229413936299667425982858999948301489" - "7143355557856769327930601597818316214242506796246078529588519927" - "2493577688320732492479924816869232247165964934329258783950102250" - "9739575795105716007383436457384943241929970921792073899197616943" - "1413149717326525502008499797367678374315520581880443916381057236" - "7791175177756227497413804253387084478193655533073867420834526162" - "5130294620227301090548200676540202015471120020281397001415752591" - "2344017736224427371246815175018974555997865323425588621961151633" - "5924167958029604477064946470184777360934300451421683607013647479" - "51396213837722826145437693412532098591327667236328125", - 2.2250738585072014e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000022250738585" - "0720163012305563795567615250361241457301819893006892300968851267" - "7159413856747700265506443097450144218254107162331246067966730043" - "7501049413401620872340686411548038468172262181270052386775328221" - "5857650751428906748569733780796363397546806336554745935958399010" - "2779558910877598836767067734754861955694039806454982002173263865" - "0888265793071484125840071160815995011874751834533813898637506208" - "5650354607662094473839557158134613493810593365859440904719070326" - "6111637871008949721205058253390132503584229153792338745607152721" - "3679398551625637847181703822407461490506663533450201028923360785" - "0720758060421709123733732493928588619801419722757153753675075962" - "6541800803135624352387918446790161107764092054420920536627658074" - "4271291212296536333081616208300526650104600844121842238490102415" - "1863156959008792461225924284245693964036455110947393215135657241" - "099571834741510656385798938572406768798828125", - 2.225073858507202e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000022250738585" - "0720187715587855857894824078800884868370419561313003121196886039" - "9600696529790429221262885863903701367028190801717129607271191035" - "5127227413175152199055740043138804567803233377539881639177387328" - "9592460742292701130780538133970816533612964474495297895212189790" - "9078385258336590185178961879988515042751478263607602168043622031" - "1292700454832073964845713103912225963935608322440623896907276890" - "1867170545492751739865893248104017382283282512457950656557381910" - "3800864691161582871998970864729322144979697154670672039979199080" - "9160347625980385995424739847678861180095072511543762389603716215" - "1717298160115446043595312843254064419386453249053891377956809158" - "0479240509922741385427494262054264040883983691918741817298779334" - "0279242767544565229087538682506419718265533447265625", - 2.225073858507202e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000022250738585" - "0720187715587855857894824078800884868370438145997023017207072547" - "0000664194501335369882375747368325036250297060613593790825595507" - "0784601193100602866214666465457429099675828132827075026004414060" - "8306755935864838551419670316948863716917264014803965301582068873" - "9364366480893456529466104797874144751279553135733325386266783645" - "2441390452797842083302347807343277733880389235182363896347166155" - "6104375435828320711696950608870952501778355296436947644895395000" - "2121327384414305095790224864732370170370270775389143364751825639" - "7709451557378722752058242993546120655130616024712566417111324409" - "0094038484312727796082230162163678483190007648385456509670733487" - "1096873355028761260750466238659647787713775294917978746912789928" - "9410912596068818947625385549553736509237367567754654738490102415" - "1863156959008792461225924284245693964036455110947393215135657241" - "099571834741510656385798938572406768798828125", - 2.225073858507202e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000022250738585" - "0720212418870147920222032907240528279439019229619113941424920812" - "2041979202833158177019328630357258515802274441103013146575652027" - "2753405412948683525770793674729570667434204573809710891579446436" - "3327270733156495512991342487145269669679122612435849854465980571" - "5377211605795581533590856025222168129808916720760222333913980197" - "1697135116592663803851355047008456915996464810347433895177047571" - "8083986483323409005892229338073421270755971659056460408395693494" - "1490091511314216022792883476068511786375165155549005334351245440" - "4641296700335134143667775872950260869683481489637323750284071645" - "2713838259809182963456893192579540218971486775350629002238542353" - "4416680216709858418467070077318366974003875329416563097969900593" - "6287194322792594125093461156712312786426466050409407761509897584" - "8136843040991207538774075715754306035963544889052606784864342758" - "900428165258489343614201061427593231201171875", - 2.225073858507202e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000022250738585" - "0720212418870147920222032907240528279439037814303133837435107319" - "2441946867544064325638818513821882185024380699999477330130056498" - "8410779192874134192929720097048195199306799329096904278406473168" - "2041565926728632933630474670123316852983422152744517260835859654" - "5663192828352447877877998943107797838336991592885945552137141811" - "2845825114558431922307989750439508685941245723089173894616936837" - "2321191373658977977723286698840356390251044443035457396733706583" - "9810554204566938246584137476071559811765738776267476659123871999" - "3190400631733470900301279018817520344719025002806127777791679839" - "1090578584006464715943810511489154282775041174682194133952466682" - "5034313061815878293790042053923750720833666932415800027583911188" - "54188641513168478436313080237596295773983001708984375", - 2.2250738585072024e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000022250738585" - "0720212418870147920222032907240528279439056398987153733445293826" - "2841914532254970474258308397286505854246486958895941513684460970" - "4068152972799584860088646519366819731179394084384097665233499900" - "0755861120300770354269606853101364036287721693053184667205738737" - "5949174050909314222165141860993427546865066465011668770360303425" - "3994515112524200040764624453870560455886026635830913894056826102" - "6558396263994546949554344059607291509746117227014454385071719673" - "8131016897819660470375391476074607837156312396985947983896498558" - "1739504563131807656934782164684779819754568515974931805299288032" - "9467318908203746468430727830398768346578595574013759265666391011" - "5651945906921898169113014030529134467663458535415036957197921783" - "4550533979841101562169154890806946368370134291387467238490102415" - "1863156959008792461225924284245693964036455110947393215135657241" - "099571834741510656385798938572406768798828125", - 2.2250738585072024e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000100208418000448638899805402" - "5675081023947173151201955956352756465219477298834774949553868001" - "7172354813827222283890479851867436841402279176933922227531985191" - "9016883548022442028316027357265612083085166971723487691494714589" - "5578331812936322386545483369746322848628024994920311121080242823" - "5714326388663336759990619917681011604908667604621058852897083245" - "0816977893343649540492907374306035456728456338904015275857972276" - "1526157631250497160973795706924168310120033199859199012414074894" - "8202195091387650850548954516920927386376492603899633528627985383" - "2932104496700123254769405070337764094630065313795728259355401668" - "8207267296623786504114239553488532354086348874488976434804499149" - "322509765625", - 1.0020841800044864e-292); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000100208418000448638899805402" - "5675081023947173151201956040050732492021560444211472901925540702" - "1586014286915762763038748010206109436411449756840422987132589595" - "3085274649978096343836685185731606312366412920027708756586099963" - "7975552653362983131506665648352778744386705639822064232334712197" - "7867779247842315182877112028658635902319185766818606103345104073" - "9923514010434512590195330770391813338086311968111531328662618487" - "3315578521649250253839821623536466419018719481428679013982985346" - "1571995354000952600076951720089726239270930511481845755671197870" - "4747866889418540057514218596081876158765839665014133210631738825" - "4165335079883777074977685931654819161553596657523084699300803458" - "3609637179288099118793858900152420545987239088654699259390735847" - "0152049332041520812604025151794328168042160636342216519487980314" - "421878240614097350935640662328296457417309284210205078125", - 1.0020841800044864e-292); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000100208418000448650025174695" - "1035150178458809017822159083615579461533985681124447841542417041" - "9717793267880261310997721975562434111911014099603638548708110842" - "9228554372955381818449259496459629506201971760632184806762937040" - "5528236159220080404124633621972774900305368909016987591808198481" - "1515258588636795736994571683578362033288375244948969302377353651" - "5803667343942465515751063883649087835332767470268261173797304563" - "0216301185431893700183322963627539884395226243941187598947530725" - "0723137660949785162435276134774551939185861652055952702429699518" - "1666462911218814544860422297294423455917874727086839114692958995" - "8734568169530500282699951928714187892923739790353511103290941894" - "8525105836280134665557340439005224794505069516807613438973521965" - "4847950667958479187395974848205671831957839363657783480512019685" - "578121759385902649064359337671703542582690715789794921875", - 1.0020841800044864e-292); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000100208418000448650025174695" - "1035150178458809017822159167313555488336068826501145793914089742" - "4131452740968801790145990133901106706920184679510139308308715246" - "3296945474911036133969917324925623735483217708936405871854322414" - "7925456999646741149085815900579230796064049553918740703062667855" - "3668711447815774159881063794555986330698893407146516552825374480" - "4910203461033328565453487279734865716690623099475777226601950774" - "2005722075830646793049348880239837993293912525510667600516441176" - "4092937923563086911963273337943350792080299559638164929472912005" - "3482225303937231347605235823038535520053649078305244065969296152" - "4692635952790490853563398306880474700390987573387619367787246203" - "8909645359318233784351199339157645340492308605462312698364257812" - "5", - 1.0020841800044864e-292); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000100208418000448650025174695" - "1035150178458809017822159251011531515138151971877843746285762442" - "8545112214057342269294258292239779301929355259416640067909319649" - "7365336576866690449490575153391617964764463657240626936945707789" - "0322677840073401894046998179185686691822730198820493814317137229" - "5822164306994752582767555905533610628109411569344063803273395309" - "4016739578124191615155910675820643598048478728683293279406596985" - "3795142966229399885915374796852136102192598807080147602085351627" - "7462738186176388661491270541112149644974737467220377156516124492" - "5297987696655648150350049348782647584189423429523649017245633309" - "0650703736050481424426844685046761507858235356421727632283550512" - "9294184882356332903145058239310065886479547694117011957754993659" - "5152049332041520812604025151794328168042160636342216519487980314" - "421878240614097350935640662328296457417309284210205078125", - 1.0020841800044866e-292); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000200416836000897255548872220" - "0630023738871074569163505490783914884205771542336808210387292522" - "0426513773371285555269939139667533951768747348715410293510510274" - "9473643242267695845324274779211200861374232469021139022270213528" - "6462413252451807248010301677826829802384000871843763078195635583" - "5519882659021798720200352081612073758236883604191202305937584019" - "3447504651307941031064654937754410393532579156664506650227987556" - "2093186373340695057796485067216997253892307748415460848623417226" - "4622904518424429578269271391797007961345371296322204255566117522" - "4763967378926030323867148635273985338412963098572424905483014370" - "3443797280914164309330161600193180015563420351180667003643504189" - "5081099906363532431297601321684709319015382789075374603271484375", - 2.0041683600089726e-292); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000200416836000897255548872220" - "0630023738871074569163505574481890911007854687713506162758965222" - "4840173246459826034418207298006206546777917928621911053111114678" - "3542034344223350160844932607677195090655478417325360087361598902" - "8859634092878467992971483956433285698142681516745516189450104957" - "7673335518200777143086844192589698055647401766388749556385604848" - "2554040768398804080767078333840188274890434785872022703032633767" - "3882607263739448150662510983829295362790994029984940850192327677" - "7992704781037731327797268594965806814239809203904416482609330009" - "6579729771644447126611962161018097402548737449790829856759351526" - "9401865064174154880193607978359466823030668134214775268139808498" - "5465639429401631550091460221837129865002621877730073862662220222" - "0152049332041520812604025151794328168042160636342216519487980314" - "421878240614097350935640662328296457417309284210205078125", - 2.0041683600089726e-292); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000200416836000897266674241512" - "5990092893382710435783708618046737880520279924626481102375841562" - "2971952227424324582377181263362531222277482271385126614686635925" - "9685314067200635635457506918405218284491037257929836137538435979" - "6412317598735565265589451930053281854061344785940439548923591241" - "1320814858995257697204303847509424186616591244519112755417854425" - "8434194101906757006322811447097462772136890288028752548167319843" - "0783329927522091597006012323920368828167500792497449435156873056" - "7143847087986563890155593009650632514154740344478523429367831657" - "3498325793444721613958165862230644699700772511863535760820571697" - "3971098153820878087915873975418835554400811267045201672129946935" - "0381108086393667096854941760689934113520452305882988042245006340" - "4847950667958479187395974848205671831957839363657783480512019685" - "578121759385902649064359337671703542582690715789794921875", - 2.0041683600089726e-292); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000200416836000897266674241512" - "5990092893382710435783708701744713907322363070003179054747514262" - "7385611700512865061525449421701203817286652851291627374287240329" - "3753705169156289950978164746871212513772283206234057202629821353" - "8809538439162226010550634208659737749820025430842192660178060615" - "3474267718174236120090795958487048484027109406716660005865875254" - "7540730218997620056025234843183240653494745917236268600971966054" - "2572750817920844689872038240532666937066187074066929436725783508" - "0513647350599865639683590212819431367049178252060735656411044144" - "5314088186163138416702979387974756763836546863081940712096908853" - "9929165937080868658779320353585122361868059050079309936626251244" - "0765647609431766215648800660842354659507691394537687301635742187" - "5", - 2.004168360008973e-292); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000200416836000897266674241512" - "5990092893382710435783708785442689934124446215379877007119186963" - "1799271173601405540673717580039876412295823431198128133887844732" - "7822096271111944266498822575337206743053529154538278267721206728" - "1206759279588886755511816487266193645578706075743945771432529989" - "5627720577353214542977288069464672781437627568914207256313896083" - "6647266336088483105727658239269018534852601546443784653776612265" - "4362171708319597782738064157144965045964873355636409438294693959" - "3883447613213167389211587415988230219943616159642947883454256631" - "7129850578881555219447792913718868827972321214300345663373246010" - "5887233720340859229642766731751409169335306833113418201122555553" - "1150187132469865334442659560994775205494930483192386561026478034" - "5152049332041520812604025151794328168042160636342216519487980314" - "421878240614097350935640662328296457417309284210205078125", - 2.004168360008973e-292); - testParse("0.99999999999999988897769753748434595763683319091796875", - 0.9999999999999999); - testParse( - "0.99999999999999988897769753748434595763683319091796879176194859" - "5190556970945882299241904356487451251641385905655273315006228765" - "423911854226535211864757002331316471099853515625", - 0.9999999999999999); - testParse( - "0.99999999999999994448884876874217297881841659545898433323805140" - "4809443029054117700758095643512548748358614094344726684993771234" - "576088145773464788135242997668683528900146484375", - 0.9999999999999999); - testParse( - "0.999999999999999944488848768742172978818416595458984375", - 1.0); - testParse( - "0.99999999999999994448884876874217297881841659545898441676194859" - "5190556970945882299241904356487451251641385905655273315006228765" - "423911854226535211864757002331316471099853515625", - 1.0); - testParse("0.499999999999999944488848768742172978818416595458984375", - 0.49999999999999994); - testParse( - "0.49999999999999994448884876874217297881841659545898439588097429" - "7595278485472941149620952178243725625820692952827636657503114382" - "7119559271132676059323785011656582355499267578125", - 0.49999999999999994); - testParse( - "0.49999999999999997224442438437108648940920829772949216661902570" - "2404721514527058850379047821756274374179307047172363342496885617" - "2880440728867323940676214988343417644500732421875", - 0.49999999999999994); - testParse( - "0.4999999999999999722444243843710864894092082977294921875", - 0.5); - testParse( - "0.49999999999999997224442438437108648940920829772949220838097429" - "7595278485472941149620952178243725625820692952827636657503114382" - "7119559271132676059323785011656582355499267578125", - 0.5); - testParse("1.9999999999999997779553950749686919152736663818359375", - 1.9999999999999998); - testParse( - "1.99999999999999977795539507496869191527366638183593758352389719" - "0381113941891764598483808712974902503282771811310546630012457530" - "84782370845307042372951400466263294219970703125", - 1.9999999999999998); - testParse( - "1.99999999999999988897769753748434595763683319091796866647610280" - "9618886058108235401516191287025097496717228188689453369987542469" - "15217629154692957627048599533736705780029296875", - 1.9999999999999998); - testParse( - "1.99999999999999988897769753748434595763683319091796875", - 2.0); - testParse( - "1.99999999999999988897769753748434595763683319091796883352389719" - "0381113941891764598483808712974902503282771811310546630012457530" - "84782370845307042372951400466263294219970703125", - 2.0); - testParse("4503599627370495.5", 4503599627370495.5); - testParse( - "4503599627370495.50000000000000000000000000000000000018807909613" - "1566001274997845955559308450986489083534003441400273004546761512" - "75634765625", - 4503599627370495.5); - testParse( - "4503599627370495.74999999999999999999999999999999999981192090386" - "8433998725002154044440691549013510916465996558599726995453238487" - "24365234375", - 4503599627370495.5); - testParse("4503599627370495.75", 4503599627370496.0); - testParse( - "4503599627370495.75000000000000000000000000000000000018807909613" - "1566001274997845955559308450986489083534003441400273004546761512" - "75634765625", - 4503599627370496.0); - testParse("4503599627370496", 4503599627370496.0); - testParse( - "4503599627370496.00000000000000000000000000000000000037615819226" - "3132002549995691911118616901972978167068006882800546009093523025" - "5126953125", - 4503599627370496.0); - testParse( - "4503599627370496.49999999999999999999999999999999999962384180773" - "6867997450004308088881383098027021832931993117199453990906476974" - "4873046875", - 4503599627370496.0); - testParse("4503599627370496.5", 4503599627370496.0); - testParse( - "4503599627370496.50000000000000000000000000000000000037615819226" - "3132002549995691911118616901972978167068006882800546009093523025" - "5126953125", - 4503599627370497.0); - testParse("9007199254740991", 9007199254740991.0); - testParse( - "9007199254740991.00000000000000000000000000000000000037615819226" - "3132002549995691911118616901972978167068006882800546009093523025" - "5126953125", - 9007199254740991.0); - testParse( - "9007199254740991.49999999999999999999999999999999999962384180773" - "6867997450004308088881383098027021832931993117199453990906476974" - "4873046875", - 9007199254740991.0); - testParse("9007199254740991.5", 9007199254740992.0); - testParse( - "9007199254740991.50000000000000000000000000000000000037615819226" - "3132002549995691911118616901972978167068006882800546009093523025" - "5126953125", - 9007199254740992.0); - testParse( - "1797693134862315708145274237317043567980705675258449965989174768" - "0315726078002853876058955863276687817154045895351438246423432132" - "6889464182768467546703537516986049910576551282076245490090389328" - "9440758685084551339423045832369032229481658085593321233482747978" - "26204144723168738177180919299881250404026184124858368", - 1.7976931348623157e+308); - testParse( - "1797693134862315708145274237317043567980705675258450041064343056" - "0785749075118623426984641994452647172104399563141377322686588394" - "6121172130178666127034918365540069095282013901258936156392632590" - "7055367751483602939820315058278058002847941584484775356682545657" - "44106770877499077221865536419145864291265781790932992", - 1.7976931348623157e+308); - testParse( - "1797693134862315807937289714053034150799341327100378194286569501" - "7574473832160705543739215666582761354682674973879349714831499292" - "8620232455220458908340124972127889717295245764493583188543574449" - "7703035690903649098158444443687202655781915109457910629727393062" - "50541739356374003666875082388828428992938306508423168", - 1.7976931348623157e+308); - testParse( - "1797693134862315807937289714053034150799341327100378269361737789" - "8044496829276475094664901797758720709633028641669288791094655554" - "7851940402630657488671505820681908902000708383676273854845817711" - "5317644757302700698555713669596228429148198608349364752927190741" - "68444365510704342711559699508093042880177904174497792", - double.infinity); - testParse( - "1797693134862315807937289714053034150799341327100378344436906077" - "8514519826392244645590587928934680064583382309459227867357811816" - "7083648350040856069002886669235928086706171002858964521148060973" - "2932253823701752298952982895505254202514482107240818876126988420" - "86346991665034681756244316627357656767417501840572416", - double.infinity); - - // Edge cases of algorithm (e+-22/23). - testParse("1e22", 1e22); - testParse("1e23", 1e23); - testParse("1e-22", 1e-22); - testParse("1e-23", 1e-23); - - testParseWhitespace("1", 1.0); - testParseWhitespace("1.0", 1.0); - testParseWhitespace("1e1", 10.0); - testParseWhitespace(".1e1", 1.0); - testParseWhitespace("1.e1", 10.0); - testParseWhitespace("1e+1", 10.0); - testParseWhitespace("1e-1", 0.1); - - // Negative tests - things not to allow. - - // Spaces inside the numeral. - testFail("- 1"); - testFail("+ 1"); - testFail("2 2"); - testFail("1 ."); - testFail(". 1"); - testFail("1e 2"); - testFail("1 e2"); - // Invalid characters. - testFail("0x0"); - testFail("0x1H"); - testFail("12H"); - testFail("1x2"); - testFail("00x2"); - testFail("0x2.2"); - // Double exponent without value. - testFail(".e1"); - testFail("e1"); - testFail("e+1"); - testFail("e-1"); - testFail("-e1"); - testFail("-e+1"); - testFail("-e-1"); - // Too many signs. - testFail("--1"); - testFail("-+1"); - testFail("+-1"); - testFail("++1"); - // Incorrect ways to write NaN/Infinity. - testFail("infinity"); - testFail("INFINITY"); - testFail("1.#INF"); - testFail("inf"); - testFail("nan"); - testFail("NAN"); - testFail("1.#IND"); - testFail("indef"); - testFail("qnan"); - testFail("snan"); -} diff --git a/tests/corelib_2/double_round2_test.dart b/tests/corelib_2/double_round2_test.dart deleted file mode 100644 index 1ab9a37326b..00000000000 --- a/tests/corelib_2/double_round2_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - Expect.throwsUnsupportedError(() => double.infinity.round()); - Expect.throwsUnsupportedError(() => double.negativeInfinity.round()); - Expect.throwsUnsupportedError(() => double.nan.round()); -} diff --git a/tests/corelib_2/double_round3_test.dart b/tests/corelib_2/double_round3_test.dart deleted file mode 100644 index eff16dd6908..00000000000 --- a/tests/corelib_2/double_round3_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - Expect.equals(0, 0.49999999999999994.round()); - Expect.equals(0, (-0.49999999999999994).round()); - Expect.isTrue(0.49999999999999994.round() is int); - Expect.isTrue((-0.49999999999999994).round() is int); -} diff --git a/tests/corelib_2/double_round4_test.dart b/tests/corelib_2/double_round4_test.dart deleted file mode 100644 index beab41659a4..00000000000 --- a/tests/corelib_2/double_round4_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - // The following numbers are on the border of 52 bits. - // For example: 4503599627370499 + 0.5 => 4503599627370500. - Expect.equals(4503599627370496, 4503599627370496.0.round()); - Expect.equals(4503599627370497, 4503599627370497.0.round()); - Expect.equals(4503599627370498, 4503599627370498.0.round()); - Expect.equals(4503599627370499, 4503599627370499.0.round()); - - Expect.equals(9007199254740991, 9007199254740991.0.round()); - Expect.equals(9007199254740992, 9007199254740992.0.round()); - - Expect.equals(-4503599627370496, (-4503599627370496.0).round()); - Expect.equals(-4503599627370497, (-4503599627370497.0).round()); - Expect.equals(-4503599627370498, (-4503599627370498.0).round()); - Expect.equals(-4503599627370499, (-4503599627370499.0).round()); - - Expect.equals(-9007199254740991, (-9007199254740991.0).round()); - Expect.equals(-9007199254740992, (-9007199254740992.0).round()); - - Expect.isTrue(4503599627370496.0.round() is int); - Expect.isTrue(4503599627370497.0.round() is int); - Expect.isTrue(4503599627370498.0.round() is int); - Expect.isTrue(4503599627370499.0.round() is int); - Expect.isTrue(9007199254740991.0.round() is int); - Expect.isTrue(9007199254740992.0.round() is int); - Expect.isTrue((-4503599627370496.0).round() is int); - Expect.isTrue((-4503599627370497.0).round() is int); - Expect.isTrue((-4503599627370498.0).round() is int); - Expect.isTrue((-4503599627370499.0).round() is int); - Expect.isTrue((-9007199254740991.0).round() is int); - Expect.isTrue((-9007199254740992.0).round() is int); -} diff --git a/tests/corelib_2/double_round_test.dart b/tests/corelib_2/double_round_test.dart deleted file mode 100644 index b975be71c6f..00000000000 --- a/tests/corelib_2/double_round_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - Expect.equals(0, 0.0.round()); - Expect.equals(0, double.minPositive.round()); - Expect.equals(0, (2.0 * double.minPositive).round()); - Expect.equals(0, (1.18e-38).round()); - Expect.equals(0, (1.18e-38 * 2).round()); - Expect.equals(1, 0.5.round()); - Expect.equals(1, 0.9999999999999999.round()); - Expect.equals(1, 1.0.round()); - Expect.equals(1, 1.000000000000001.round()); - Expect.equals(9223372036854775807, double.maxFinite.round()); // //# int64: ok - - Expect.equals(0, (-double.minPositive).round()); - Expect.equals(0, (2.0 * -double.minPositive).round()); - Expect.equals(0, (-1.18e-38).round()); - Expect.equals(0, (-1.18e-38 * 2).round()); - Expect.equals(-1, (-0.5).round()); - Expect.equals(-1, (-0.9999999999999999).round()); - Expect.equals(-1, (-1.0).round()); - Expect.equals(-1, (-1.000000000000001).round()); - Expect.equals(-9223372036854775808, (-double.maxFinite).round()); // //# int64: ok - - Expect.isTrue(0.0.round() is int); - Expect.isTrue(double.minPositive.round() is int); - Expect.isTrue((2.0 * double.minPositive).round() is int); - Expect.isTrue((1.18e-38).round() is int); - Expect.isTrue((1.18e-38 * 2).round() is int); - Expect.isTrue(0.5.round() is int); - Expect.isTrue(0.9999999999999999.round() is int); - Expect.isTrue(1.0.round() is int); - Expect.isTrue(1.000000000000001.round() is int); - Expect.isTrue(double.maxFinite.round() is int); - - Expect.isTrue((-double.minPositive).round() is int); - Expect.isTrue((2.0 * -double.minPositive).round() is int); - Expect.isTrue((-1.18e-38).round() is int); - Expect.isTrue((-1.18e-38 * 2).round() is int); - Expect.isTrue((-0.5).round() is int); - Expect.isTrue((-0.9999999999999999).round() is int); - Expect.isTrue((-1.0).round() is int); - Expect.isTrue((-1.000000000000001).round() is int); - Expect.isTrue((-double.maxFinite).round() is int); -} diff --git a/tests/corelib_2/double_round_to_double2_test.dart b/tests/corelib_2/double_round_to_double2_test.dart deleted file mode 100644 index 630fe2c624b..00000000000 --- a/tests/corelib_2/double_round_to_double2_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - Expect.equals(0.0, 0.49999999999999994.roundToDouble()); - Expect.equals(0.0, (-0.49999999999999994).roundToDouble()); - Expect.isTrue(0.49999999999999994.roundToDouble() is double); - Expect.isTrue((-0.49999999999999994).roundToDouble().isNegative); - Expect.isTrue((-0.49999999999999994).roundToDouble() is double); -} diff --git a/tests/corelib_2/double_round_to_double3_test.dart b/tests/corelib_2/double_round_to_double3_test.dart deleted file mode 100644 index b29840b5d80..00000000000 --- a/tests/corelib_2/double_round_to_double3_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - // The following numbers are on the border of 52 bits. - // For example: 4503599627370499 + 0.5 => 4503599627370500. - Expect.equals(4503599627370496.0, 4503599627370496.0.roundToDouble()); - Expect.equals(4503599627370497.0, 4503599627370497.0.roundToDouble()); - Expect.equals(4503599627370498.0, 4503599627370498.0.roundToDouble()); - Expect.equals(4503599627370499.0, 4503599627370499.0.roundToDouble()); - Expect.equals(9007199254740991.0, 9007199254740991.0.roundToDouble()); - Expect.equals(9007199254740992.0, 9007199254740992.0.roundToDouble()); - Expect.equals(-4503599627370496.0, (-4503599627370496.0).roundToDouble()); - Expect.equals(-4503599627370497.0, (-4503599627370497.0).roundToDouble()); - Expect.equals(-4503599627370498.0, (-4503599627370498.0).roundToDouble()); - Expect.equals(-4503599627370499.0, (-4503599627370499.0).roundToDouble()); - Expect.equals(-9007199254740991.0, (-9007199254740991.0).roundToDouble()); - Expect.equals(-9007199254740992.0, (-9007199254740992.0).roundToDouble()); - Expect.isTrue(4503599627370496.0.roundToDouble() is double); - Expect.isTrue(4503599627370497.0.roundToDouble() is double); - Expect.isTrue(4503599627370498.0.roundToDouble() is double); - Expect.isTrue(4503599627370499.0.roundToDouble() is double); - Expect.isTrue(9007199254740991.0.roundToDouble() is double); - Expect.isTrue(9007199254740992.0.roundToDouble() is double); - Expect.isTrue((-4503599627370496.0).roundToDouble() is double); - Expect.isTrue((-4503599627370497.0).roundToDouble() is double); - Expect.isTrue((-4503599627370498.0).roundToDouble() is double); - Expect.isTrue((-4503599627370499.0).roundToDouble() is double); - Expect.isTrue((-9007199254740991.0).roundToDouble() is double); - Expect.isTrue((-9007199254740992.0).roundToDouble() is double); -} diff --git a/tests/corelib_2/double_round_to_double_test.dart b/tests/corelib_2/double_round_to_double_test.dart deleted file mode 100644 index 4111369a198..00000000000 --- a/tests/corelib_2/double_round_to_double_test.dart +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - Expect.equals(0.0, 0.0.roundToDouble()); - Expect.equals(0.0, double.minPositive.roundToDouble()); - Expect.equals(0.0, (2.0 * double.minPositive).roundToDouble()); - Expect.equals(0.0, (1.18e-38).roundToDouble()); - Expect.equals(0.0, (1.18e-38 * 2).roundToDouble()); - Expect.equals(1.0, 0.5.roundToDouble()); - Expect.equals(1.0, 0.9999999999999999.roundToDouble()); - Expect.equals(1.0, 1.0.roundToDouble()); - Expect.equals(1.0, 1.000000000000001.roundToDouble()); - Expect.equals(2.0, 1.5.roundToDouble()); - - Expect.equals(double.maxFinite, double.maxFinite.roundToDouble()); - - Expect.equals(0.0, (-double.minPositive).roundToDouble()); - Expect.equals(0.0, (2.0 * -double.minPositive).roundToDouble()); - Expect.equals(0.0, (-1.18e-38).roundToDouble()); - Expect.equals(0.0, (-1.18e-38 * 2).roundToDouble()); - Expect.equals(-1.0, (-0.5).roundToDouble()); - Expect.equals(-1.0, (-0.9999999999999999).roundToDouble()); - Expect.equals(-1.0, (-1.0).roundToDouble()); - Expect.equals(-1.0, (-1.000000000000001).roundToDouble()); - Expect.equals(-2.0, (-1.5).roundToDouble()); - Expect.equals(-double.maxFinite, (-double.maxFinite).roundToDouble()); - - Expect.equals(double.infinity, double.infinity.roundToDouble()); - Expect.equals( - double.negativeInfinity, double.negativeInfinity.roundToDouble()); - Expect.isTrue(double.nan.roundToDouble().isNaN); - - Expect.isTrue(0.0.roundToDouble() is double); - Expect.isTrue(double.minPositive.roundToDouble() is double); - Expect.isTrue((2.0 * double.minPositive).roundToDouble() is double); - Expect.isTrue((1.18e-38).roundToDouble() is double); - Expect.isTrue((1.18e-38 * 2).roundToDouble() is double); - Expect.isTrue(0.5.roundToDouble() is double); - Expect.isTrue(0.9999999999999999.roundToDouble() is double); - Expect.isTrue(1.0.roundToDouble() is double); - Expect.isTrue(1.000000000000001.roundToDouble() is double); - Expect.isTrue(double.maxFinite.roundToDouble() is double); - - Expect.isTrue((-double.minPositive).roundToDouble().isNegative); - Expect.isTrue((2.0 * -double.minPositive).roundToDouble().isNegative); - Expect.isTrue((-1.18e-38).roundToDouble().isNegative); - Expect.isTrue((-1.18e-38 * 2).roundToDouble().isNegative); - - Expect.isTrue((-double.minPositive).roundToDouble() is double); - Expect.isTrue((2.0 * -double.minPositive).roundToDouble() is double); - Expect.isTrue((-1.18e-38).roundToDouble() is double); - Expect.isTrue((-1.18e-38 * 2).roundToDouble() is double); - Expect.isTrue((-0.5).roundToDouble() is double); - Expect.isTrue((-0.9999999999999999).roundToDouble() is double); - Expect.isTrue((-1.0).roundToDouble() is double); - Expect.isTrue((-1.000000000000001).roundToDouble() is double); - Expect.isTrue((-double.maxFinite).roundToDouble() is double); -} diff --git a/tests/corelib_2/double_truncate2_test.dart b/tests/corelib_2/double_truncate2_test.dart deleted file mode 100644 index 11879caef33..00000000000 --- a/tests/corelib_2/double_truncate2_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - Expect.throwsUnsupportedError(() => double.infinity.truncate()); - Expect.throwsUnsupportedError(() => double.negativeInfinity.truncate()); - Expect.throwsUnsupportedError(() => double.nan.truncate()); -} diff --git a/tests/corelib_2/double_truncate_test.dart b/tests/corelib_2/double_truncate_test.dart deleted file mode 100644 index 221b8e5eaed..00000000000 --- a/tests/corelib_2/double_truncate_test.dart +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - Expect.equals(0, 0.0.truncate()); - Expect.equals(0, double.minPositive.truncate()); - Expect.equals(0, (2.0 * double.minPositive).truncate()); - Expect.equals(0, (1.18e-38).truncate()); - Expect.equals(0, (1.18e-38 * 2).truncate()); - Expect.equals(0, 0.49999999999999994.truncate()); - Expect.equals(0, 0.5.truncate()); - Expect.equals(0, 0.9999999999999999.truncate()); - Expect.equals(1, 1.0.truncate()); - Expect.equals(1, 1.000000000000001.truncate()); - // The following numbers are on the border of 52 bits. - // For example: 4503599627370499 + 0.5 => 4503599627370500. - Expect.equals(4503599627370496, 4503599627370496.0.truncate()); - Expect.equals(4503599627370497, 4503599627370497.0.truncate()); - Expect.equals(4503599627370498, 4503599627370498.0.truncate()); - Expect.equals(4503599627370499, 4503599627370499.0.truncate()); - - Expect.equals(9007199254740991, 9007199254740991.0.truncate()); - Expect.equals(9007199254740992, 9007199254740992.0.truncate()); - Expect.equals(9223372036854775807, double.maxFinite.truncate()); // //# int64: ok - - Expect.equals(0, (-double.minPositive).truncate()); - Expect.equals(0, (2.0 * -double.minPositive).truncate()); - Expect.equals(0, (-1.18e-38).truncate()); - Expect.equals(0, (-1.18e-38 * 2).truncate()); - Expect.equals(0, (-0.49999999999999994).truncate()); - Expect.equals(0, (-0.5).truncate()); - Expect.equals(0, (-0.9999999999999999).truncate()); - Expect.equals(-1, (-1.0).truncate()); - Expect.equals(-1, (-1.000000000000001).truncate()); - Expect.equals(-4503599627370496, (-4503599627370496.0).truncate()); - Expect.equals(-4503599627370497, (-4503599627370497.0).truncate()); - Expect.equals(-4503599627370498, (-4503599627370498.0).truncate()); - Expect.equals(-4503599627370499, (-4503599627370499.0).truncate()); - Expect.equals(-9007199254740991, (-9007199254740991.0).truncate()); - Expect.equals(-9007199254740992, (-9007199254740992.0).truncate()); - Expect.equals(-9223372036854775808, (-double.maxFinite).truncate()); // //# int64: ok - - Expect.isTrue(0.0.truncate() is int); - Expect.isTrue(double.minPositive.truncate() is int); - Expect.isTrue((2.0 * double.minPositive).truncate() is int); - Expect.isTrue((1.18e-38).truncate() is int); - Expect.isTrue((1.18e-38 * 2).truncate() is int); - Expect.isTrue(0.49999999999999994.truncate() is int); - Expect.isTrue(0.5.truncate() is int); - Expect.isTrue(0.9999999999999999.truncate() is int); - Expect.isTrue(1.0.truncate() is int); - Expect.isTrue(1.000000000000001.truncate() is int); - Expect.isTrue(4503599627370496.0.truncate() is int); - Expect.isTrue(4503599627370497.0.truncate() is int); - Expect.isTrue(4503599627370498.0.truncate() is int); - Expect.isTrue(4503599627370499.0.truncate() is int); - Expect.isTrue(9007199254740991.0.truncate() is int); - Expect.isTrue(9007199254740992.0.truncate() is int); - Expect.isTrue(double.maxFinite.truncate() is int); - - Expect.isTrue((-double.minPositive).truncateToDouble().isNegative); - Expect.isTrue((2.0 * -double.minPositive).truncateToDouble().isNegative); - Expect.isTrue((-1.18e-38).truncateToDouble().isNegative); - Expect.isTrue((-1.18e-38 * 2).truncateToDouble().isNegative); - Expect.isTrue((-0.49999999999999994).truncateToDouble().isNegative); - Expect.isTrue((-0.5).truncateToDouble().isNegative); - Expect.isTrue((-0.9999999999999999).truncateToDouble().isNegative); - - Expect.isTrue((-double.minPositive).truncate() is int); - Expect.isTrue((2.0 * -double.minPositive).truncate() is int); - Expect.isTrue((-1.18e-38).truncate() is int); - Expect.isTrue((-1.18e-38 * 2).truncate() is int); - Expect.isTrue((-0.49999999999999994).truncate() is int); - Expect.isTrue((-0.5).truncate() is int); - Expect.isTrue((-0.9999999999999999).truncate() is int); - Expect.isTrue((-1.0).truncate() is int); - Expect.isTrue((-1.000000000000001).truncate() is int); - Expect.isTrue((-4503599627370496.0).truncate() is int); - Expect.isTrue((-4503599627370497.0).truncate() is int); - Expect.isTrue((-4503599627370498.0).truncate() is int); - Expect.isTrue((-4503599627370499.0).truncate() is int); - Expect.isTrue((-9007199254740991.0).truncate() is int); - Expect.isTrue((-9007199254740992.0).truncate() is int); - Expect.isTrue((-double.maxFinite).truncate() is int); -} diff --git a/tests/corelib_2/double_truncate_to_double_test.dart b/tests/corelib_2/double_truncate_to_double_test.dart deleted file mode 100644 index dc725be9026..00000000000 --- a/tests/corelib_2/double_truncate_to_double_test.dart +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - Expect.equals(0.0, 0.0.truncateToDouble()); - Expect.equals(0.0, double.minPositive.truncateToDouble()); - Expect.equals(0.0, (2.0 * double.minPositive).truncateToDouble()); - Expect.equals(0.0, (1.18e-38).truncateToDouble()); - Expect.equals(0.0, (1.18e-38 * 2).truncateToDouble()); - Expect.equals(0.0, 0.49999999999999994.truncateToDouble()); - Expect.equals(0.0, 0.5.truncateToDouble()); - Expect.equals(0.0, 0.9999999999999999.truncateToDouble()); - Expect.equals(1.0, 1.0.truncateToDouble()); - Expect.equals(1.0, 1.000000000000001.truncateToDouble()); - // The following numbers are on the border of 52 bits. - // For example: 4503599627370499 + 0.5 => 4503599627370500. - Expect.equals(4503599627370496.0, 4503599627370496.0.truncateToDouble()); - Expect.equals(4503599627370497.0, 4503599627370497.0.truncateToDouble()); - Expect.equals(4503599627370498.0, 4503599627370498.0.truncateToDouble()); - Expect.equals(4503599627370499.0, 4503599627370499.0.truncateToDouble()); - - Expect.equals(9007199254740991.0, 9007199254740991.0.truncateToDouble()); - Expect.equals(9007199254740992.0, 9007199254740992.0.truncateToDouble()); - Expect.equals(double.maxFinite, double.maxFinite.truncateToDouble()); - - Expect.equals(0.0, (-double.minPositive).truncateToDouble()); - Expect.equals(0.0, (2.0 * -double.minPositive).truncateToDouble()); - Expect.equals(0.0, (-1.18e-38).truncateToDouble()); - Expect.equals(0.0, (-1.18e-38 * 2).truncateToDouble()); - Expect.equals(0.0, (-0.49999999999999994).truncateToDouble()); - Expect.equals(0.0, (-0.5).truncateToDouble()); - Expect.equals(0.0, (-0.9999999999999999).truncateToDouble()); - Expect.equals(-1.0, (-1.0).truncateToDouble()); - Expect.equals(-1.0, (-1.000000000000001).truncateToDouble()); - Expect.equals(-4503599627370496.0, (-4503599627370496.0).truncateToDouble()); - Expect.equals(-4503599627370497.0, (-4503599627370497.0).truncateToDouble()); - Expect.equals(-4503599627370498.0, (-4503599627370498.0).truncateToDouble()); - Expect.equals(-4503599627370499.0, (-4503599627370499.0).truncateToDouble()); - Expect.equals(-9007199254740991.0, (-9007199254740991.0).truncateToDouble()); - Expect.equals(-9007199254740992.0, (-9007199254740992.0).truncateToDouble()); - Expect.equals(-double.maxFinite, (-double.maxFinite).truncateToDouble()); - - Expect.equals(double.infinity, double.infinity.truncateToDouble()); - Expect.equals( - double.negativeInfinity, double.negativeInfinity.truncateToDouble()); - Expect.isTrue(double.nan.truncateToDouble().isNaN); - - Expect.isTrue(0.0.truncateToDouble() is double); - Expect.isTrue(double.minPositive.truncateToDouble() is double); - Expect.isTrue((2.0 * double.minPositive).truncateToDouble() is double); - Expect.isTrue((1.18e-38).truncateToDouble() is double); - Expect.isTrue((1.18e-38 * 2).truncateToDouble() is double); - Expect.isTrue(0.49999999999999994.truncateToDouble() is double); - Expect.isTrue(0.5.truncateToDouble() is double); - Expect.isTrue(0.9999999999999999.truncateToDouble() is double); - Expect.isTrue(1.0.truncateToDouble() is double); - Expect.isTrue(1.000000000000001.truncateToDouble() is double); - Expect.isTrue(4503599627370496.0.truncateToDouble() is double); - Expect.isTrue(4503599627370497.0.truncateToDouble() is double); - Expect.isTrue(4503599627370498.0.truncateToDouble() is double); - Expect.isTrue(4503599627370499.0.truncateToDouble() is double); - Expect.isTrue(9007199254740991.0.truncateToDouble() is double); - Expect.isTrue(9007199254740992.0.truncateToDouble() is double); - Expect.isTrue(double.maxFinite.truncateToDouble() is double); - - Expect.isTrue((-double.minPositive).truncateToDouble() is double); - Expect.isTrue((2.0 * -double.minPositive).truncateToDouble() is double); - Expect.isTrue((-1.18e-38).truncateToDouble() is double); - Expect.isTrue((-1.18e-38 * 2).truncateToDouble() is double); - Expect.isTrue((-0.49999999999999994).truncateToDouble() is double); - Expect.isTrue((-0.5).truncateToDouble() is double); - Expect.isTrue((-0.9999999999999999).truncateToDouble() is double); - Expect.isTrue((-1.0).truncateToDouble() is double); - Expect.isTrue((-1.000000000000001).truncateToDouble() is double); - Expect.isTrue((-4503599627370496.0).truncateToDouble() is double); - Expect.isTrue((-4503599627370497.0).truncateToDouble() is double); - Expect.isTrue((-4503599627370498.0).truncateToDouble() is double); - Expect.isTrue((-4503599627370499.0).truncateToDouble() is double); - Expect.isTrue((-9007199254740991.0).truncateToDouble() is double); - Expect.isTrue((-9007199254740992.0).truncateToDouble() is double); - Expect.isTrue((-double.maxFinite).truncateToDouble() is double); -} diff --git a/tests/corelib_2/double_try_parse_test.dart b/tests/corelib_2/double_try_parse_test.dart deleted file mode 100644 index 63b6048b2ae..00000000000 --- a/tests/corelib_2/double_try_parse_test.dart +++ /dev/null @@ -1,1211 +0,0 @@ -// Copyright (c) 2014, 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. -// VMOptions=--no-use-field-guards -// VMOptions= - -// @dart = 2.9 - -import "dart:math" show pow; -import "package:expect/expect.dart"; - -// U+0085 has been whitespace, isn't any more in all browsers. -const whiteSpace = const [ - "", - "\x09", - "\x0a", - "\x0b", - "\x0c", - "\x0d", - "\xa0", - "\u1680", - "\u2000", - "\u2001", - "\u2002", - "\u2003", - "\u2004", - "\u2005", - "\u2006", - "\u2007", - "\u2008", - "\u2009", - "\u200a", - "\u2028", - "\u2029", - "\u202f", - "\u205f", - "\u3000", - "\uFEFF" -]; - -void expectNumEquals(double expected, var actual, String message) { - if (expected.isNaN) { - Expect.isTrue(actual is double && actual.isNaN, "isNaN: $message"); - } else { - Expect.identical(expected, actual, message); - } -} - -// Test source surrounded by any combination of whitespace. -void testParseAllWhitespace(String source, double result) { - for (String ws1 in whiteSpace) { - for (String ws2 in whiteSpace) { - String padded = "$ws1$source$ws2"; - // Use Expect.identical because it also handles NaN and 0.0/-0.0. - // Except on dart2js: http://dartbug.com/11551 - expectNumEquals(result, double.tryParse(padded), "parse '$padded'"); - padded = "$ws1$ws2$source"; - expectNumEquals(result, double.tryParse(padded), "parse '$padded'"); - padded = "$source$ws1$ws2"; - expectNumEquals(result, double.tryParse(padded), "parse '$padded'"); - } - } -} - -// Test source and -source surrounded by any combination of whitespace. -void testParseWhitespace(String source, double result) { - assert(result >= 0); - testParseAllWhitespace(source, result); - testParseAllWhitespace("-$source", -result); -} - -// Test parsing source, optionally preceded and/or followed by whitespace. -void testParse(String source, double result, [name = ""]) { - expectNumEquals(result, double.tryParse(source), "parse '$source:$name"); - expectNumEquals( - result, double.tryParse(" $source"), "parse ' $source':$name"); - expectNumEquals( - result, double.tryParse("$source "), "parse '$source ':$name"); - expectNumEquals( - result, double.tryParse(" $source "), "parse ' $source ':$name"); - - expectNumEquals(result, double.tryParse("+$source"), "parse '+$source:$name"); - expectNumEquals( - result, double.tryParse(" +$source"), "parse ' +$source':$name"); - expectNumEquals( - result, double.tryParse("+$source "), "parse '+$source ':$name"); - expectNumEquals( - result, double.tryParse(" +$source "), "parse ' +$source ':$name"); - - expectNumEquals( - -result, double.tryParse("-$source"), "parse '-$source:$name"); - expectNumEquals( - -result, double.tryParse(" -$source"), "parse ' -$source':$name"); - expectNumEquals( - -result, double.tryParse("-$source "), "parse '-$source ':$name"); - expectNumEquals( - -result, double.tryParse(" -$source "), "parse ' -$source ':$name"); -} - -void testDouble(double value) { - testParse("$value", value); - if (value.isFinite) { - String exp = value.toStringAsExponential(); - String lcexp = exp.toLowerCase(); - testParse(lcexp, value); - String ucexp = exp.toUpperCase(); - testParse(ucexp, value); - } -} - -void testFail(String source) { - var object = new Object(); - Expect.isNull(double.tryParse(source), "Fail: '$source'"); -} - -void main() { - testDouble(0.0); - testDouble(5e-324); - testDouble(2.225073858507201e-308); - testDouble(2.2250738585072014e-308); - testDouble(0.49999999999999994); - testDouble(0.5); - testDouble(0.50000000000000006); - testDouble(0.9999999999999999); - testDouble(1.0); - testDouble(1.0000000000000002); - testDouble(4294967295.0); - testDouble(4294967296.0); - testDouble(4503599627370495.5); - testDouble(4503599627370497.0); - testDouble(9007199254740991.0); - testDouble(9007199254740992.0); - testDouble(1.7976931348623157e+308); - testDouble(double.infinity); - testDouble(double.nan); - - // Strings that cannot occur from toString of a number. - testParse("000000000000", 0.0); - testParse("000000000001", 1.0); - testParse("000000000000.0000000000000", 0.0); - testParse("000000000001.0000000000000", 1.0); - testParse("0e0", 0.0); - testParse("0e+0", 0.0); - testParse("0e-0", 0.0); - testParse("1e0", 1.0); - testParse("1e+0", 1.0); - testParse("1e-0", 1.0); - testParse("1.", 1.0); - testParse(".1", 0.1); - testParse("1.e1", 10.0); - testParse(".1e1", 1.0); - testParse("Infinity", double.infinity); - testParse("NaN", double.nan); - - // Cases where mantissa and 10^exponent are representable as a double. - for (int i = -22; i <= 22; i++) { - for (double j in [1.0, 9007199254740991.0, 9007199254740992.0]) { - var value = (i >= 0) ? j * pow(10.0, i) : j / pow(10.0, -i); - testParse("${j}e$i", value, "$i/$j"); - testParse("${j}E$i", value, "$i/$j"); - if (i >= 0) { - testParse("${j}e+$i", value, "$i/$j"); - testParse("${j}E+$i", value, "$i/$j"); - } - } - } - for (int i = 0; i <= 22; i++) { - var digits = "9007199254740991"; - for (int i = 0; i < digits.length; i++) { - int dotIndex = digits.length - i; - var string = "${digits.substring(0, dotIndex)}." - "${digits.substring(dotIndex)}e$i"; - testParse(string, 9007199254740991.0); - } - } - - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000012351641146031163604414219821705534309126495065358119110639" - "6420625168876817552187966324959090408998094949141173861429432731" - "6641775889849490996936990026954695315751782975778511319614542919" - "6224552592217965901424968268076250159685228839124609682811834931" - "8292403785007928846349518531559641397792756664639171692046759890" - "0776562329863178978731138323263641361002818700324274998854829973" - "5227010414083113118928696725368169503983880965288753370088162336" - "8004844756702677687292583305671118833393020810798402309572336459" - "2015026502876542452438269585569329582311976245631182694093981811" - "9686640211945509336174248834117544931694293962814151377997828762" - "2277536275946568454181273895934743339974841620248529105142565927" - "256981069188614130727188467062660492956638336181640625", - 0.0); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000024703282292062327208828439643411068618252990130716238221279" - "2841250337753635104375932649918180817996189898282347722858865463" - "3283551779698981993873980053909390631503565951557022639229085839" - "2449105184435931802849936536152500319370457678249219365623669863" - "6584807570015857692699037063119282795585513329278343384093519780" - "1553124659726357957462276646527282722005637400648549997709659947" - "0454020828166226237857393450736339007967761930577506740176324673" - "6009689513405355374585166611342237666786041621596804619144672918" - "4030053005753084904876539171138659164623952491262365388187963623" - "9373280423891018672348497668235089863388587925628302755995657524" - "4555072551893136908362547791869486679949683240497058210285131854" - "51396213837722826145437693412532098591327667236328125", - 0.0); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000024703282292062327208828439643411068618252990130716238221279" - "2841250337753635104375932649918180817996189898282347722858865463" - "3283551779698981993873980053909390631503565951557022639229085839" - "2449105184435931802849936536152500319370457678249219365623669863" - "6584807570015857692699037063119282795585513329278343384093519780" - "1553124659726357957462276646527282722005637400648549997709659947" - "0454020828166226237857393450736339007967761930577506740176324673" - "6009689513405355374585166611342237666786041621596804619144672918" - "4030053005753084904876539171138659164623952491262365388187963623" - "9373280423891018672348497668235089863388587925628302755995657524" - "4555072551893136908362547791869486679949683240497058210285131854" - "51396213837722826145437693412532098591327667236328125", - 0.0); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000024703282292062327208828439643411068627545332140664243314532" - "8041234170109088178685677591650492652607243027730579814636067699" - "1112238669661707327453443265068702897439863329200619332642599205" - "1806252781222000513169502627641523911022607448403553068808609405" - "1727798181294290864842608522062097649849550765341204993205100587" - "2127469658709242016690593998242808606978027857019419997429604579" - "7572623273334010723772922131119806567715298322567005234345331218" - "5169920860031716486480793611343761679481328431956040281530986197" - "8304604971452253283193290744072288902141724247846767401941767720" - "8561650585989659548591956327689896895290365125294085321852619688" - "9863888974446146846024033780172178553364579041996676675092137151" - "9705456298034409473812692774776868254618683783877327369245051207" - "5931578479504396230612962142122846982018227555473696607567828620" - "5497859173707553281928994692862033843994140625", // - 5e-324); // - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000037054923438093490813242659465116602918087143186126352238665" - "4061891674274999582254154033144959392383231717975289492511095959" - "2096640779585747657231506869704773681319051549691937265430115392" - "9316510179867828993955338712739726887403536747219495345250565253" - "9734220743745353366904984135736109339114232557854653467028698863" - "1755341990606652876965097618075398198036065644601954996844545287" - "8562428797081554870870561495721040952204106503876761616095480465" - "4854302923481671949982122917011832487483775622035971266330696098" - "1770527542930458978998057183774359009418156980309146068528141338" - "9871550473737887132279287842897827763181104688776671568136524122" - "1523792405286695424882335699501538146509629059245968850620692484" - "3143597161396297062546730578356156393213233025204703880754948792" - "4068421520495603769387037857877153017981772444526303392432171379" - "4502140826292446718071005307137966156005859375", - 5e-324); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000037054923438093490813242659465116602927379485196074357331918" - "9261875506630452656563898974877271226994284847423521584288298194" - "9925327669548472990810970080864085947255348927335533958843628758" - "8673657776653897704274904804228750479055686517373829048435504795" - "4877211355023786539048555594678924193378269993917515076140279670" - "2329686989589536936193414969790924083008456100972824996564489920" - "5681031242249339356786090176104508511951642895866260110264487010" - "4014534270108033061877749917013356500179062432395206928717009377" - "6045079508629627357314808756707988746935928736893548082281945435" - "9059920635836528008522746502352634795082881888442454133993486286" - "6832608827839705362543821687804230019924524860745587315427697781" - "770943207565842392181565401187981478869915008544921875", - 5e-324); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000037054923438093490813242659465116602936671827206022362425172" - "4461859338985905730873643916609583061605337976871753676065500430" - "7754014559511198324390433292023398213191646304979130652257142124" - "8030805373439966414594470895717774070707836287528162751620444337" - "0020201966302219711192127053621739047642307429980376685251860477" - "2904031988572420995421732321506449967980846557343694996284434553" - "2799633687417123842701618856487976071699179287855758604433493555" - "3174765616734394173773376917014880512874349242754442591103322657" - "0319631474328795735631560329641618484453700493477950096035749532" - "8248290797935168884766205161807441826984659088108236699850448451" - "2141425250392715300205307676106921893339420662245205780234703079" - "2275266989920550781084577445403473184185067145693733619245051207" - "5931578479504396230612962142122846982018227555473696607567828620" - "5497859173707553281928994692862033843994140625", - 5e-324); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000049406564584124654417656879286822137236505980261432476442558" - "5682500675507270208751865299836361635992379796564695445717730926" - "6567103559397963987747960107818781263007131903114045278458171678" - "4898210368871863605699873072305000638740915356498438731247339727" - "3169615140031715385398074126238565591171026658556686768187039560" - "3106249319452715914924553293054565444011274801297099995419319894" - "0908041656332452475714786901472678015935523861155013480352649347" - "2019379026810710749170333222684475333572083243193609238289345836" - "8060106011506169809753078342277318329247904982524730776375927247" - "8746560847782037344696995336470179726777175851256605511991315048" - "9110145103786273816725095583738973359899366480994116420570263709" - "0279242767544565229087538682506419718265533447265625", - 5e-324); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000049406564584124654417656879286822137255090664281328486629065" - "6082468340218176357371355183300985305214486055461159629272135398" - "2224477339323414654906886530137405794879726658401238665285198410" - "3612505562444001026339005255283047822045214896807106137617218810" - "3455596362588581729685217044124195299699101530682409986410201174" - "4254939317418484033381187996485617213956055714038839994859209159" - "5145246546668021447545844262239613135430596645134010468690662437" - "0339841720063432972961587222687523358962656863912080563061972395" - "6609209942904506566386581488144577804283448495693534803883535441" - "7123301171979319097183912655379793790580730250588170643705239377" - "9727777948892293692048067560344357106729158083993353350184274303" - "9410912596068818947625385549553736509237367567754654738490102415" - "1863156959008792461225924284245693964036455110947393215135657241" - "099571834741510656385798938572406768798828125", - 5e-324); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000074109846876186981626485318930233205836174286372252704477330" - "8123783348549999164508308066289918784766463435950578985022191918" - "4193281559171495314463013739409547362638103099383874530860230785" - "8633020359735657987910677425479453774807073494438990690501130507" - "9468441487490706733809968271472218678228465115709306934057397726" - "3510683981213305753930195236150796396072131289203909993689090575" - "7124857594163109741741122991442081904408213007753523232190960930" - "9708605846963343899964245834023664974967551244071942532661392196" - "3541055085860917957996114367548718018836313960618292137056282677" - "9743100947475774264558575685795655526362209377553343136273048244" - "3047584810573390849764671399003076293019258118491937701241384968" - "6287194322792594125093461156712312786426466050409407761509897584" - "8136843040991207538774075715754306035963544889052606784864342758" - "900428165258489343614201061427593231201171875", - 5e-324); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000074109846876186981626485318930233205854758970392148714663837" - "8523751013260905313127797949754542453988569694847043168576596389" - "9850655339096945981621940161728171894510697854671067917687257517" - "7347315553307795408549809608457500958111373034747658096871009590" - "9754422710047573078097111189357848386756539987835030152280559340" - "4659373979179073872386829939581848166016912201945649993128979841" - "1362062484498678713572180352209017023903285791732520220528974020" - "8029068540216066123755499834026713000358124864790413857434018755" - "2090159017259254714629617513415977493871857473787096164563890871" - "8119841271673056017045493004705269590165763776884908267986972573" - "3665217655679410725087643375608460039849049721491174630855395563" - "54188641513168478436313080237596295773983001708984375", // - 1e-323); // - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000074109846876186981626485318930233205873343654412044724850344" - "8923718677971811461747287833219166123210675953743507352131000861" - "5508029119022396648780866584046796426383292609958261304514284249" - "6061610746879932829188941791435548141415672575056325503240888674" - "0040403932604439422384254107243478095284614859960753370503720954" - "5808063977144841990843464643012899935961693114687389992568869106" - "5599267374834247685403237712975952143398358575711517208866987110" - "6349531233468788347546753834029761025748698485508885182206645314" - "0639262948657591471263120659283236968907400986955900192071499065" - "6496581595870337769532410323614883653969318176216473399700896902" - "4282850500785430600410615352213843786678841324490411560469406158" - "4550533979841101562169154890806946368370134291387467238490102415" - "1863156959008792461225924284245693964036455110947393215135657241" - "099571834741510656385798938572406768798828125", // - 1e-323); // - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000011125369292" - "5360069154511635866620203210960799023116591527666370844360221740" - "6959097927141579506255510282033669865517905502576217080776730054" - "4280061926888594105653889967660011652398050737212918180359607825" - "2347125186710418762540332530832907947436024558998429581982425031" - "7954385059152437399890443876874974725790225802525457699928291235" - "4093225567689679024960579905428830259962166760571761950743978498" - "0479564444580149632075553173315669683173879325651468588102366281" - "5890742832175436061414318821022423405703806955738531400844926622" - "0550120807237108092835830752700771425423583764509515806613894483" - "6485368656166704349449158753391942346304638698898642932982747054" - "5684547703068233784351199339157645340492308605462312698364257812" - "5", - 1.1125369292536007e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000011125369292" - "5360069154511635866620203210960799023116610112350390740370408247" - "7359065591852485654875000165498293534740011761472681264331134525" - "9937435706814044772812816389978636184270645492500111567186634557" - "1061420380282556183179464713810955130740324099307096988352304114" - "8240366281709303744177586794760604434318300674651180918151452849" - "5241915565655447143417214608859882029906947673313501950183867763" - "4716769334915718603906610534082604802668952109630465576440379371" - "4211205525428158285205572821025471431094380576457002725617553180" - "9099224738635444849469333898568030900459127277678319834121502677" - "4862108980363986101936076072301556410108193098230208064696671383" - "6302180548174253659674171315763029087322100208461549627978268407" - "4131669828524253718537846867047316790971834120489029738490102415" - "1863156959008792461225924284245693964036455110947393215135657241" - "099571834741510656385798938572406768798828125", - 1.1125369292536007e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000011125369292" - "5360093857793927928947412039400442434185191195972481664588256512" - "9400380600184308462011953048487227014291989141962100620081191046" - "1906239926662125432368943599250777752029021933482747432761666932" - "6081935177574213144751136884007361083502182696938981541236215812" - "4253211406611428748302338022108627812847664259678077865798649401" - "4497660229450268863966221848525061212023023248478571949013749179" - "6696380382410806898101889263285073571646568472249978339940677865" - "3579969652328069212208231432361613047099274956616864695216972981" - "6031069881591856241078866777972171115011992742603077167294249913" - "7481908755860441269310739102717418145889672225195380557264480249" - "9621987409855350817390775154421748273612200242960133979035379072" - "1007951555248028896005922474205893068160932603143782761509897584" - "8136843040991207538774075715754306035963544889052606784864342758" - "900428165258489343614201061427593231201171875", - 1.1125369292536007e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000011125369292" - "5360093857793927928947412039400442434185209780656501560598443019" - "9800348264895214610631442931951850683514095400858564803635595517" - "7563613706587576099527870021569402283901616688769940819588693664" - "4796230371146350565390269066985408266806482237247648947606094895" - "4539192629168295092589480939994257521375739131803801084021811015" - "5646350227416036982422856551956112981967804161220311948453638445" - "0933585272746375869932946624052008691141641256228975328278690955" - "1900432345580791435999485432364661072489848577335336019989599540" - "4580173812990192997712369923839430590047536255771881194801858107" - "5858649080057723021797656421627032209693226624526945688978404579" - "0239620254961370692713747131027132020441991845959370908649389667" - "01396213837722826145437693412532098591327667236328125", - 1.1125369292536007e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000011125369292" - "5360093857793927928947412039400442434185228365340521456608629527" - "0200315929606120759250932815416474352736201659755028987189999989" - "3220987486513026766686796443888026815774211444057134206415720396" - "3510525564718487986029401249963455450110781777556316353975973978" - "4825173851725161436876623857879887229903814003929524302244972629" - "6795040225381805100879491255387164751912585073962051947893527710" - "5170790163081944841764003984818943810636714040207972316616704045" - "0220895038833513659790739432367709097880422198053807344762226099" - "3129277744388529754345873069706690065083079768940685222309466301" - "4235389404255004774284573740536646273496781023858510820692328908" - "0857253100067390568036719107632515767271783448958607838263400261" - "9271291212296536333081616208300526650104600844121842238490102415" - "1863156959008792461225924284245693964036455110947393215135657241" - "099571834741510656385798938572406768798828125", // - 1.112536929253601e-308); // - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000011125369292" - "5360118561076219991274620867840085845253828033646632276836664299" - "2641598602648849715007375581870031501510285299140912526494460981" - "0847165486286558093401850075478792915405182640326963458817779503" - "7245335555582282368240205603137908586176939915496868313229764759" - "1124000199184152785288518003113540316961252461082144468115330795" - "7199474887142394939885133198483395703973441561868861946163298392" - "1387606100912602107790340074788347699109403186806482068455015628" - "7910121858986146810584652043706898739275890198932140639134272458" - "8610226818743277902588909094978089754671488747034246582989821731" - "5231929503948741694146154089862122073081814550155248444974062103" - "4794692806854507601076294922896618700391675086456429118934521521" - "5279242767544565229087538682506419718265533447265625", - 1.112536929253601e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000011125369292" - "5360118561076219991274620867840085845253846618330652172846850806" - "3041566267359755863626865465334655170732391558037376710048865452" - "6504539266212008760560776497797417447277777395614156845644806235" - "5959630749154419788879337786115955769481239455805535719599643842" - "1409981421741019129575660920999170025489327333207867686338492409" - "8348164885108163058341767901914447473918222474610601945603187657" - "5624810991248171079621397435555282818604475970785479056793028718" - "6230584552238869034375906043709946764666463819650611963906899017" - "7159330750141614659222412240845349229707032260203050610497429925" - "3608669828146023446633071408771736136885368949486813576687986432" - "5412325651960527476399266899502002447221466689455666048548532116" - "4410912596068818947625385549553736509237367567754654738490102415" - "1863156959008792461225924284245693964036455110947393215135657241" - "099571834741510656385798938572406768798828125", - 1.112536929253601e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000011125369292" - "5360143264358512053601829696279729256322427701952743097064699071" - "5082881275691578670763818348323588650284368938526796065798921972" - "8473343486060089420116903707069559015036153836596792711219838611" - "0980145546446076750451009956312361722243098053437420272483555539" - "7422826546643144133700412148347193404018690918234764633985688961" - "7603909548902984778890775141579626656034298049775671944433069073" - "7604422038743259373816676164757751587582092333404991820293327212" - "5599348679138779961378564655046088380671358199810473933506318818" - "4091175893098026050831945120249489444259897725127807943670177161" - "6228469603642478614007734439187597872666848076451986069255795298" - "8732132513641624634115870738160721633511566723954250399605642781" - "1287194322792594125093461156712312786426466050409407761509897584" - "8136843040991207538774075715754306035963544889052606784864342758" - "900428165258489343614201061427593231201171875", - 1.112536929253601e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000011125369292" - "5360143264358512053601829696279729256322446286636762993074885578" - "5482848940402484819383308231788212319506475197423260249353326444" - "4130717265985540087275830129388183546908748591883986098046865342" - "9694440740018214171090142139290408905547397593746087678853434622" - "7708807769200010477987555066232823112546765790360487852208850575" - "8752599546868752897347409845010678425979078962517411943872958339" - "1841626929078828345647733525524686707077165117383988808631340302" - "3919811372391502185169818655049136406061931820528945258278945377" - "2640279824496362807465448266116748919295441238296611971177785355" - "4605209927839760366494651758097211936470402475783551200969719627" - "9349765358747644509438842714766105380341358326953487329219653376" - "04188641513168478436313080237596295773983001708984375", // - 1.1125369292536017e-308); // - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000011125369292" - "5360143264358512053601829696279729256322464871320782889085072085" - "5882816605113390968002798115252835988728581456319724432907730915" - "9788091045910990754434756551706808078781343347171179484873892074" - "8408735933590351591729274322268456088851697134054755085223313705" - "7994788991756876822274697984118452821074840662486211070432012189" - "9901289544834521015804044548441730195923859875259151943312847604" - "6078831819414397317478790886291621826572237901362985796969353392" - "2240274065644224408961072655052184431452505441247416583051571936" - "1189383755894699564098951411984008394330984751465415998685393549" - "2981950252037042118981569077006826000273956875115116332683643956" - "9967398203853664384761814691371489127171149929952724258833663970" - "9550533979841101562169154890806946368370134291387467238490102415" - "1863156959008792461225924284245693964036455110947393215135657241" - "099571834741510656385798938572406768798828125", // - 1.1125369292536017e-308); // - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000022250738585" - "0720138309023271733240406421921598046233183055332741688720443481" - "3918195854283159012511020564067339731035811005152434161553460108" - "8560123853777188211307779935320023304796101474425836360719215650" - "4694250373420837525080665061665815894872049117996859163964850063" - "5908770118304874799780887753749949451580451605050915399856582470" - "8186451135379358049921159810857660519924333521143523901487956996" - "0959128889160299264151106346631339366347758651302937176204732563" - "1781485664350872122828637642044846811407613911477062801689853244" - "1100241614474216185671661505401542850847167529019031613227788967" - "2970737312333408698898317506783884692609277397797285865965494109" - "1369095406136467568702398678315290680984617210924625396728515625", - 2.2250738585072014e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000022250738585" - "0720138309023271733240406421921598046233201640016761584730629988" - "4318163518994065161130510447531963400257917264048898345107864580" - "4217497633702638878466706357638647836668696229713029747546242382" - "3408545566992974945719797244643863078176348658305526570334729146" - "6194751340861741144068030671635579160108526477176638618079744084" - "9335141133345126168377794514288712289869114433885263900927846261" - "5196333779495868235982163707398274485842831435281934164542745653" - "0101948357603594346619891642047894836798187532195534126462479802" - "9649345545872552942305164651268802325882711042187835640735397161" - "1347477636530690451385234825693498756412831797128850997679418438" - "1986728251242487444025370654920674427814408813923862326342526219" - "9131669828524253718537846867047316790971834120489029738490102415" - "1863156959008792461225924284245693964036455110947393215135657241" - "099571834741510656385798938572406768798828125", - 2.2250738585072014e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000022250738585" - "0720163012305563795567615250361241457301782723638852508948478253" - "6359478527325887968267463330520896879809894644538317700857921100" - "6186301853550719538022833566910789404427072670695665613121274757" - "8429060364284631907291469414840269030938207255937411123218640844" - "2207596465763866148192781898983602538637890062203535565726940636" - "8590885797139947888926801753953891471985190009050333899757727677" - "7175944826990956530177442436600743254820447797901446928043044146" - "9470712484503505273622550253384036452803081912355396096061899603" - "6581190688828964333914697530672942540435576507112592973908144397" - "3967277412027145618759897856109360492194310924094023490247227304" - "5306535112923584601741974493579393614104508848422446677399636884" - "6007951555248028896005922474205893068160932603143782761509897584" - "8136843040991207538774075715754306035963544889052606784864342758" - "900428165258489343614201061427593231201171875", - 2.2250738585072014e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000022250738585" - "0720163012305563795567615250361241457301801308322872404958664760" - "6759446192036794116886953213985520549032000903434781884412325572" - "1843675633476170205181759989229413936299667425982858999948301489" - "7143355557856769327930601597818316214242506796246078529588519927" - "2493577688320732492479924816869232247165964934329258783950102250" - "9739575795105716007383436457384943241929970921792073899197616943" - "1413149717326525502008499797367678374315520581880443916381057236" - "7791175177756227497413804253387084478193655533073867420834526162" - "5130294620227301090548200676540202015471120020281397001415752591" - "2344017736224427371246815175018974555997865323425588621961151633" - "5924167958029604477064946470184777360934300451421683607013647479" - "51396213837722826145437693412532098591327667236328125", - 2.2250738585072014e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000022250738585" - "0720163012305563795567615250361241457301819893006892300968851267" - "7159413856747700265506443097450144218254107162331246067966730043" - "7501049413401620872340686411548038468172262181270052386775328221" - "5857650751428906748569733780796363397546806336554745935958399010" - "2779558910877598836767067734754861955694039806454982002173263865" - "0888265793071484125840071160815995011874751834533813898637506208" - "5650354607662094473839557158134613493810593365859440904719070326" - "6111637871008949721205058253390132503584229153792338745607152721" - "3679398551625637847181703822407461490506663533450201028923360785" - "0720758060421709123733732493928588619801419722757153753675075962" - "6541800803135624352387918446790161107764092054420920536627658074" - "4271291212296536333081616208300526650104600844121842238490102415" - "1863156959008792461225924284245693964036455110947393215135657241" - "099571834741510656385798938572406768798828125", // - 2.225073858507202e-308); // - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000022250738585" - "0720187715587855857894824078800884868370419561313003121196886039" - "9600696529790429221262885863903701367028190801717129607271191035" - "5127227413175152199055740043138804567803233377539881639177387328" - "9592460742292701130780538133970816533612964474495297895212189790" - "9078385258336590185178961879988515042751478263607602168043622031" - "1292700454832073964845713103912225963935608322440623896907276890" - "1867170545492751739865893248104017382283282512457950656557381910" - "3800864691161582871998970864729322144979697154670672039979199080" - "9160347625980385995424739847678861180095072511543762389603716215" - "1717298160115446043595312843254064419386453249053891377956809158" - "0479240509922741385427494262054264040883983691918741817298779334" - "0279242767544565229087538682506419718265533447265625", - 2.225073858507202e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000022250738585" - "0720187715587855857894824078800884868370438145997023017207072547" - "0000664194501335369882375747368325036250297060613593790825595507" - "0784601193100602866214666465457429099675828132827075026004414060" - "8306755935864838551419670316948863716917264014803965301582068873" - "9364366480893456529466104797874144751279553135733325386266783645" - "2441390452797842083302347807343277733880389235182363896347166155" - "6104375435828320711696950608870952501778355296436947644895395000" - "2121327384414305095790224864732370170370270775389143364751825639" - "7709451557378722752058242993546120655130616024712566417111324409" - "0094038484312727796082230162163678483190007648385456509670733487" - "1096873355028761260750466238659647787713775294917978746912789928" - "9410912596068818947625385549553736509237367567754654738490102415" - "1863156959008792461225924284245693964036455110947393215135657241" - "099571834741510656385798938572406768798828125", - 2.225073858507202e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000022250738585" - "0720212418870147920222032907240528279439019229619113941424920812" - "2041979202833158177019328630357258515802274441103013146575652027" - "2753405412948683525770793674729570667434204573809710891579446436" - "3327270733156495512991342487145269669679122612435849854465980571" - "5377211605795581533590856025222168129808916720760222333913980197" - "1697135116592663803851355047008456915996464810347433895177047571" - "8083986483323409005892229338073421270755971659056460408395693494" - "1490091511314216022792883476068511786375165155549005334351245440" - "4641296700335134143667775872950260869683481489637323750284071645" - "2713838259809182963456893192579540218971486775350629002238542353" - "4416680216709858418467070077318366974003875329416563097969900593" - "6287194322792594125093461156712312786426466050409407761509897584" - "8136843040991207538774075715754306035963544889052606784864342758" - "900428165258489343614201061427593231201171875", - 2.225073858507202e-308); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000022250738585" - "0720212418870147920222032907240528279439037814303133837435107319" - "2441946867544064325638818513821882185024380699999477330130056498" - "8410779192874134192929720097048195199306799329096904278406473168" - "2041565926728632933630474670123316852983422152744517260835859654" - "5663192828352447877877998943107797838336991592885945552137141811" - "2845825114558431922307989750439508685941245723089173894616936837" - "2321191373658977977723286698840356390251044443035457396733706583" - "9810554204566938246584137476071559811765738776267476659123871999" - "3190400631733470900301279018817520344719025002806127777791679839" - "1090578584006464715943810511489154282775041174682194133952466682" - "5034313061815878293790042053923750720833666932415800027583911188" - "54188641513168478436313080237596295773983001708984375", // - 2.2250738585072024e-308); // - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000022250738585" - "0720212418870147920222032907240528279439056398987153733445293826" - "2841914532254970474258308397286505854246486958895941513684460970" - "4068152972799584860088646519366819731179394084384097665233499900" - "0755861120300770354269606853101364036287721693053184667205738737" - "5949174050909314222165141860993427546865066465011668770360303425" - "3994515112524200040764624453870560455886026635830913894056826102" - "6558396263994546949554344059607291509746117227014454385071719673" - "8131016897819660470375391476074607837156312396985947983896498558" - "1739504563131807656934782164684779819754568515974931805299288032" - "9467318908203746468430727830398768346578595574013759265666391011" - "5651945906921898169113014030529134467663458535415036957197921783" - "4550533979841101562169154890806946368370134291387467238490102415" - "1863156959008792461225924284245693964036455110947393215135657241" - "099571834741510656385798938572406768798828125", // - 2.2250738585072024e-308); // - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000100208418000448638899805402" - "5675081023947173151201955956352756465219477298834774949553868001" - "7172354813827222283890479851867436841402279176933922227531985191" - "9016883548022442028316027357265612083085166971723487691494714589" - "5578331812936322386545483369746322848628024994920311121080242823" - "5714326388663336759990619917681011604908667604621058852897083245" - "0816977893343649540492907374306035456728456338904015275857972276" - "1526157631250497160973795706924168310120033199859199012414074894" - "8202195091387650850548954516920927386376492603899633528627985383" - "2932104496700123254769405070337764094630065313795728259355401668" - "8207267296623786504114239553488532354086348874488976434804499149" - "322509765625", - 1.0020841800044864e-292); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000100208418000448638899805402" - "5675081023947173151201956040050732492021560444211472901925540702" - "1586014286915762763038748010206109436411449756840422987132589595" - "3085274649978096343836685185731606312366412920027708756586099963" - "7975552653362983131506665648352778744386705639822064232334712197" - "7867779247842315182877112028658635902319185766818606103345104073" - "9923514010434512590195330770391813338086311968111531328662618487" - "3315578521649250253839821623536466419018719481428679013982985346" - "1571995354000952600076951720089726239270930511481845755671197870" - "4747866889418540057514218596081876158765839665014133210631738825" - "4165335079883777074977685931654819161553596657523084699300803458" - "3609637179288099118793858900152420545987239088654699259390735847" - "0152049332041520812604025151794328168042160636342216519487980314" - "421878240614097350935640662328296457417309284210205078125", - 1.0020841800044864e-292); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000100208418000448650025174695" - "1035150178458809017822159083615579461533985681124447841542417041" - "9717793267880261310997721975562434111911014099603638548708110842" - "9228554372955381818449259496459629506201971760632184806762937040" - "5528236159220080404124633621972774900305368909016987591808198481" - "1515258588636795736994571683578362033288375244948969302377353651" - "5803667343942465515751063883649087835332767470268261173797304563" - "0216301185431893700183322963627539884395226243941187598947530725" - "0723137660949785162435276134774551939185861652055952702429699518" - "1666462911218814544860422297294423455917874727086839114692958995" - "8734568169530500282699951928714187892923739790353511103290941894" - "8525105836280134665557340439005224794505069516807613438973521965" - "4847950667958479187395974848205671831957839363657783480512019685" - "578121759385902649064359337671703542582690715789794921875", - 1.0020841800044864e-292); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000100208418000448650025174695" - "1035150178458809017822159167313555488336068826501145793914089742" - "4131452740968801790145990133901106706920184679510139308308715246" - "3296945474911036133969917324925623735483217708936405871854322414" - "7925456999646741149085815900579230796064049553918740703062667855" - "3668711447815774159881063794555986330698893407146516552825374480" - "4910203461033328565453487279734865716690623099475777226601950774" - "2005722075830646793049348880239837993293912525510667600516441176" - "4092937923563086911963273337943350792080299559638164929472912005" - "3482225303937231347605235823038535520053649078305244065969296152" - "4692635952790490853563398306880474700390987573387619367787246203" - "8909645359318233784351199339157645340492308605462312698364257812" - "5", - 1.0020841800044864e-292); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000100208418000448650025174695" - "1035150178458809017822159251011531515138151971877843746285762442" - "8545112214057342269294258292239779301929355259416640067909319649" - "7365336576866690449490575153391617964764463657240626936945707789" - "0322677840073401894046998179185686691822730198820493814317137229" - "5822164306994752582767555905533610628109411569344063803273395309" - "4016739578124191615155910675820643598048478728683293279406596985" - "3795142966229399885915374796852136102192598807080147602085351627" - "7462738186176388661491270541112149644974737467220377156516124492" - "5297987696655648150350049348782647584189423429523649017245633309" - "0650703736050481424426844685046761507858235356421727632283550512" - "9294184882356332903145058239310065886479547694117011957754993659" - "5152049332041520812604025151794328168042160636342216519487980314" - "421878240614097350935640662328296457417309284210205078125", // - 1.0020841800044866e-292); // - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000200416836000897255548872220" - "0630023738871074569163505490783914884205771542336808210387292522" - "0426513773371285555269939139667533951768747348715410293510510274" - "9473643242267695845324274779211200861374232469021139022270213528" - "6462413252451807248010301677826829802384000871843763078195635583" - "5519882659021798720200352081612073758236883604191202305937584019" - "3447504651307941031064654937754410393532579156664506650227987556" - "2093186373340695057796485067216997253892307748415460848623417226" - "4622904518424429578269271391797007961345371296322204255566117522" - "4763967378926030323867148635273985338412963098572424905483014370" - "3443797280914164309330161600193180015563420351180667003643504189" - "5081099906363532431297601321684709319015382789075374603271484375", - 2.0041683600089726e-292); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000200416836000897255548872220" - "0630023738871074569163505574481890911007854687713506162758965222" - "4840173246459826034418207298006206546777917928621911053111114678" - "3542034344223350160844932607677195090655478417325360087361598902" - "8859634092878467992971483956433285698142681516745516189450104957" - "7673335518200777143086844192589698055647401766388749556385604848" - "2554040768398804080767078333840188274890434785872022703032633767" - "3882607263739448150662510983829295362790994029984940850192327677" - "7992704781037731327797268594965806814239809203904416482609330009" - "6579729771644447126611962161018097402548737449790829856759351526" - "9401865064174154880193607978359466823030668134214775268139808498" - "5465639429401631550091460221837129865002621877730073862662220222" - "0152049332041520812604025151794328168042160636342216519487980314" - "421878240614097350935640662328296457417309284210205078125", - 2.0041683600089726e-292); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000200416836000897266674241512" - "5990092893382710435783708618046737880520279924626481102375841562" - "2971952227424324582377181263362531222277482271385126614686635925" - "9685314067200635635457506918405218284491037257929836137538435979" - "6412317598735565265589451930053281854061344785940439548923591241" - "1320814858995257697204303847509424186616591244519112755417854425" - "8434194101906757006322811447097462772136890288028752548167319843" - "0783329927522091597006012323920368828167500792497449435156873056" - "7143847087986563890155593009650632514154740344478523429367831657" - "3498325793444721613958165862230644699700772511863535760820571697" - "3971098153820878087915873975418835554400811267045201672129946935" - "0381108086393667096854941760689934113520452305882988042245006340" - "4847950667958479187395974848205671831957839363657783480512019685" - "578121759385902649064359337671703542582690715789794921875", - 2.0041683600089726e-292); - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000200416836000897266674241512" - "5990092893382710435783708701744713907322363070003179054747514262" - "7385611700512865061525449421701203817286652851291627374287240329" - "3753705169156289950978164746871212513772283206234057202629821353" - "8809538439162226010550634208659737749820025430842192660178060615" - "3474267718174236120090795958487048484027109406716660005865875254" - "7540730218997620056025234843183240653494745917236268600971966054" - "2572750817920844689872038240532666937066187074066929436725783508" - "0513647350599865639683590212819431367049178252060735656411044144" - "5314088186163138416702979387974756763836546863081940712096908853" - "9929165937080868658779320353585122361868059050079309936626251244" - "0765647609431766215648800660842354659507691394537687301635742187" - "5", // - 2.004168360008973e-292); // - testParse( - "0.00000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000200416836000897266674241512" - "5990092893382710435783708785442689934124446215379877007119186963" - "1799271173601405540673717580039876412295823431198128133887844732" - "7822096271111944266498822575337206743053529154538278267721206728" - "1206759279588886755511816487266193645578706075743945771432529989" - "5627720577353214542977288069464672781437627568914207256313896083" - "6647266336088483105727658239269018534852601546443784653776612265" - "4362171708319597782738064157144965045964873355636409438294693959" - "3883447613213167389211587415988230219943616159642947883454256631" - "7129850578881555219447792913718868827972321214300345663373246010" - "5887233720340859229642766731751409169335306833113418201122555553" - "1150187132469865334442659560994775205494930483192386561026478034" - "5152049332041520812604025151794328168042160636342216519487980314" - "421878240614097350935640662328296457417309284210205078125", // - 2.004168360008973e-292); // - testParse("0.99999999999999988897769753748434595763683319091796875", - 0.9999999999999999); - testParse( - "0.99999999999999988897769753748434595763683319091796879176194859" - "5190556970945882299241904356487451251641385905655273315006228765" - "423911854226535211864757002331316471099853515625", - 0.9999999999999999); - testParse( - "0.99999999999999994448884876874217297881841659545898433323805140" - "4809443029054117700758095643512548748358614094344726684993771234" - "576088145773464788135242997668683528900146484375", - 0.9999999999999999); - testParse("0.999999999999999944488848768742172978818416595458984375", 1.0); // - testParse( - "0.99999999999999994448884876874217297881841659545898441676194859" - "5190556970945882299241904356487451251641385905655273315006228765" - "423911854226535211864757002331316471099853515625", // - 1.0); // - testParse("0.499999999999999944488848768742172978818416595458984375", - 0.49999999999999994); - testParse( - "0.49999999999999994448884876874217297881841659545898439588097429" - "7595278485472941149620952178243725625820692952827636657503114382" - "7119559271132676059323785011656582355499267578125", - 0.49999999999999994); - testParse( - "0.49999999999999997224442438437108648940920829772949216661902570" - "2404721514527058850379047821756274374179307047172363342496885617" - "2880440728867323940676214988343417644500732421875", - 0.49999999999999994); - testParse( - "0.4999999999999999722444243843710864894092082977294921875", 0.5); // - testParse( - "0.49999999999999997224442438437108648940920829772949220838097429" - "7595278485472941149620952178243725625820692952827636657503114382" - "7119559271132676059323785011656582355499267578125", // - 0.5); // - testParse("1.9999999999999997779553950749686919152736663818359375", - 1.9999999999999998); - testParse( - "1.99999999999999977795539507496869191527366638183593758352389719" - "0381113941891764598483808712974902503282771811310546630012457530" - "84782370845307042372951400466263294219970703125", - 1.9999999999999998); - testParse( - "1.99999999999999988897769753748434595763683319091796866647610280" - "9618886058108235401516191287025097496717228188689453369987542469" - "15217629154692957627048599533736705780029296875", - 1.9999999999999998); - testParse("1.99999999999999988897769753748434595763683319091796875", 2.0); // - testParse( - "1.99999999999999988897769753748434595763683319091796883352389719" - "0381113941891764598483808712974902503282771811310546630012457530" - "84782370845307042372951400466263294219970703125", // - 2.0); // - testParse("4503599627370495.5", 4503599627370495.5); - testParse( - "4503599627370495.50000000000000000000000000000000000018807909613" - "1566001274997845955559308450986489083534003441400273004546761512" - "75634765625", - 4503599627370495.5); - testParse( - "4503599627370495.74999999999999999999999999999999999981192090386" - "8433998725002154044440691549013510916465996558599726995453238487" - "24365234375", - 4503599627370495.5); - testParse("4503599627370495.75", 4503599627370496.0); - testParse( - "4503599627370495.75000000000000000000000000000000000018807909613" - "1566001274997845955559308450986489083534003441400273004546761512" - "75634765625", - 4503599627370496.0); - testParse("4503599627370496", 4503599627370496.0); - testParse( - "4503599627370496.00000000000000000000000000000000000037615819226" - "3132002549995691911118616901972978167068006882800546009093523025" - "5126953125", - 4503599627370496.0); - testParse( - "4503599627370496.49999999999999999999999999999999999962384180773" - "6867997450004308088881383098027021832931993117199453990906476974" - "4873046875", - 4503599627370496.0); - testParse("4503599627370496.5", 4503599627370496.0); - testParse( - "4503599627370496.50000000000000000000000000000000000037615819226" - "3132002549995691911118616901972978167068006882800546009093523025" - "5126953125", - 4503599627370497.0); - testParse("9007199254740991", 9007199254740991.0); - testParse( - "9007199254740991.00000000000000000000000000000000000037615819226" - "3132002549995691911118616901972978167068006882800546009093523025" - "5126953125", - 9007199254740991.0); - testParse( - "9007199254740991.49999999999999999999999999999999999962384180773" - "6867997450004308088881383098027021832931993117199453990906476974" - "4873046875", - 9007199254740991.0); - testParse("9007199254740991.5", 9007199254740992.0); - testParse( - "9007199254740991.50000000000000000000000000000000000037615819226" - "3132002549995691911118616901972978167068006882800546009093523025" - "5126953125", - 9007199254740992.0); - testParse( - "1797693134862315708145274237317043567980705675258449965989174768" - "0315726078002853876058955863276687817154045895351438246423432132" - "6889464182768467546703537516986049910576551282076245490090389328" - "9440758685084551339423045832369032229481658085593321233482747978" - "26204144723168738177180919299881250404026184124858368", - 1.7976931348623157e+308); - testParse( - "1797693134862315708145274237317043567980705675258450041064343056" - "0785749075118623426984641994452647172104399563141377322686588394" - "6121172130178666127034918365540069095282013901258936156392632590" - "7055367751483602939820315058278058002847941584484775356682545657" - "44106770877499077221865536419145864291265781790932992", - 1.7976931348623157e+308); - testParse( - "1797693134862315807937289714053034150799341327100378194286569501" - "7574473832160705543739215666582761354682674973879349714831499292" - "8620232455220458908340124972127889717295245764493583188543574449" - "7703035690903649098158444443687202655781915109457910629727393062" - "50541739356374003666875082388828428992938306508423168", - 1.7976931348623157e+308); - testParse( - "1797693134862315807937289714053034150799341327100378269361737789" - "8044496829276475094664901797758720709633028641669288791094655554" - "7851940402630657488671505820681908902000708383676273854845817711" - "5317644757302700698555713669596228429148198608349364752927190741" - "68444365510704342711559699508093042880177904174497792", - double.infinity); - testParse( - "1797693134862315807937289714053034150799341327100378344436906077" - "8514519826392244645590587928934680064583382309459227867357811816" - "7083648350040856069002886669235928086706171002858964521148060973" - "2932253823701752298952982895505254202514482107240818876126988420" - "86346991665034681756244316627357656767417501840572416", - double.infinity); - - // Edge cases of algorithm (e+-22/23). - testParse("1e22", 1e22); - testParse("1e23", 1e23); - testParse("1e-22", 1e-22); - testParse("1e-23", 1e-23); - - testParseWhitespace("1", 1.0); - testParseWhitespace("1.0", 1.0); - testParseWhitespace("1e1", 10.0); - testParseWhitespace(".1e1", 1.0); - testParseWhitespace("1.e1", 10.0); - testParseWhitespace("1e+1", 10.0); - testParseWhitespace("1e-1", 0.1); - - // Negative tests - things not to allow. - - // Spaces inside the numeral. - testFail("- 1"); - testFail("+ 1"); - testFail("2 2"); - testFail("1 ."); - testFail(". 1"); - testFail("1e 2"); - testFail("1 e2"); - // Invalid characters. - testFail("0x0"); - testFail("0x1H"); - testFail("12H"); - testFail("1x2"); - testFail("00x2"); - testFail("0x2.2"); - // Double exponent without value. - testFail(".e1"); - testFail("e1"); - testFail("e+1"); - testFail("e-1"); - testFail("-e1"); - testFail("-e+1"); - testFail("-e-1"); - // Too many signs. - testFail("--1"); - testFail("-+1"); - testFail("+-1"); - testFail("++1"); - // Incorrect ways to write NaN/Infinity. - testFail("infinity"); - testFail("INFINITY"); - testFail("1.#INF"); - testFail("inf"); - testFail("nan"); - testFail("NAN"); - testFail("1.#IND"); - testFail("indef"); - testFail("qnan"); - testFail("snan"); -} diff --git a/tests/corelib_2/duration_big_num_test.dart b/tests/corelib_2/duration_big_num_test.dart deleted file mode 100644 index e4bb7a614e7..00000000000 --- a/tests/corelib_2/duration_big_num_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:math'; - -main() { - Duration d, d1; - - d1 = new Duration(microseconds: pow(2, 53)); - d = d1 * 2; - Expect.equals(pow(2, 54), d.inMicroseconds); - d = d1 * 1.5; - Expect.equals(pow(2, 53).toDouble() * 1.5, d.inMicroseconds); - Expect.isTrue(d.inMicroseconds is int); - - // Test that we lose precision when multiplying with a double. - d = new Duration(microseconds: pow(2, 53) + 1) * 1.0; - Expect.equals(0, d.inMicroseconds % 2); -} diff --git a/tests/corelib_2/duration_double_multiplication_test.dart b/tests/corelib_2/duration_double_multiplication_test.dart deleted file mode 100644 index fc631ff0362..00000000000 --- a/tests/corelib_2/duration_double_multiplication_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -main() { - Duration d, d1; - - d1 = new Duration(milliseconds: 1); - d = d1 * 0.005; - Expect.equals(1000 * 0.005, d.inMicroseconds); - d = d1 * 0.0; - Expect.equals(0, d.inMicroseconds); - d = d1 * -0.005; - Expect.equals(1000 * -0.005, d.inMicroseconds); - d = d1 * 0.0015; - Expect.equals((1000 * 0.0015).round(), d.inMicroseconds); -} diff --git a/tests/corelib_2/duration_test.dart b/tests/corelib_2/duration_test.dart deleted file mode 100644 index 9cab8e6b2b7..00000000000 --- a/tests/corelib_2/duration_test.dart +++ /dev/null @@ -1,335 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -main() { - Duration d; - d = new Duration(days: 1); - Expect.equals(86400000000, d.inMicroseconds); - Expect.equals(86400000, d.inMilliseconds); - Expect.equals(86400, d.inSeconds); - Expect.equals(1440, d.inMinutes); - Expect.equals(24, d.inHours); - Expect.equals(1, d.inDays); - d = const Duration(hours: 1); - Expect.equals(3600000000, d.inMicroseconds); - Expect.equals(3600000, d.inMilliseconds); - Expect.equals(3600, d.inSeconds); - Expect.equals(60, d.inMinutes); - Expect.equals(1, d.inHours); - Expect.equals(0, d.inDays); - d = new Duration(minutes: 1); - Expect.equals(60000000, d.inMicroseconds); - Expect.equals(60000, d.inMilliseconds); - Expect.equals(60, d.inSeconds); - Expect.equals(1, d.inMinutes); - Expect.equals(0, d.inHours); - Expect.equals(0, d.inDays); - d = const Duration(seconds: 1); - Expect.equals(1000000, d.inMicroseconds); - Expect.equals(1000, d.inMilliseconds); - Expect.equals(1, d.inSeconds); - Expect.equals(0, d.inMinutes); - Expect.equals(0, d.inHours); - Expect.equals(0, d.inDays); - d = new Duration(milliseconds: 1); - Expect.equals(1000, d.inMicroseconds); - Expect.equals(1, d.inMilliseconds); - Expect.equals(0, d.inSeconds); - Expect.equals(0, d.inMinutes); - Expect.equals(0, d.inHours); - Expect.equals(0, d.inDays); - d = new Duration(microseconds: 1); - Expect.equals(1, d.inMicroseconds); - Expect.equals(0, d.inMilliseconds); - Expect.equals(0, d.inSeconds); - Expect.equals(0, d.inMinutes); - Expect.equals(0, d.inHours); - Expect.equals(0, d.inDays); - - d = const Duration(milliseconds: 1, microseconds: 999); - Expect.equals(1999, d.inMicroseconds); - Expect.equals(1, d.inMilliseconds); - d = const Duration(seconds: 1, milliseconds: 999); - Expect.equals(1999, d.inMilliseconds); - Expect.equals(1, d.inSeconds); - d = new Duration(minutes: 1, seconds: 59); - Expect.equals(119, d.inSeconds); - Expect.equals(1, d.inMinutes); - d = const Duration(hours: 1, minutes: 59); - Expect.equals(119, d.inMinutes); - Expect.equals(1, d.inHours); - d = new Duration(days: 1, hours: 23); - Expect.equals(47, d.inHours); - Expect.equals(1, d.inDays); - d = const Duration( - days: 0, - hours: 23, - minutes: 59, - seconds: 59, - milliseconds: 999, - microseconds: 999); - Expect.equals(0, d.inDays); - - d = new Duration(days: -1); - Expect.equals(-86400000000, d.inMicroseconds); - Expect.equals(-86400000, d.inMilliseconds); - Expect.equals(-86400, d.inSeconds); - Expect.equals(-1440, d.inMinutes); - Expect.equals(-24, d.inHours); - Expect.equals(-1, d.inDays); - d = const Duration(hours: -1); - Expect.equals(-3600000000, d.inMicroseconds); - Expect.equals(-3600000, d.inMilliseconds); - Expect.equals(-3600, d.inSeconds); - Expect.equals(-60, d.inMinutes); - Expect.equals(-1, d.inHours); - Expect.equals(0, d.inDays); - d = new Duration(minutes: -1); - Expect.equals(-60000000, d.inMicroseconds); - Expect.equals(-60000, d.inMilliseconds); - Expect.equals(-60, d.inSeconds); - Expect.equals(-1, d.inMinutes); - Expect.equals(0, d.inHours); - Expect.equals(0, d.inDays); - d = const Duration(seconds: -1); - Expect.equals(-1000000, d.inMicroseconds); - Expect.equals(-1000, d.inMilliseconds); - Expect.equals(-1, d.inSeconds); - Expect.equals(0, d.inMinutes); - Expect.equals(0, d.inHours); - Expect.equals(0, d.inDays); - d = new Duration(milliseconds: -1); - Expect.equals(-1000, d.inMicroseconds); - Expect.equals(-1, d.inMilliseconds); - Expect.equals(0, d.inSeconds); - Expect.equals(0, d.inMinutes); - Expect.equals(0, d.inHours); - Expect.equals(0, d.inDays); - d = new Duration(microseconds: -1); - Expect.equals(-1, d.inMicroseconds); - Expect.equals(0, d.inMilliseconds); - Expect.equals(0, d.inSeconds); - Expect.equals(0, d.inMinutes); - Expect.equals(0, d.inHours); - Expect.equals(0, d.inDays); - - d = const Duration(days: 1, hours: -24); - Expect.equals(0, d.inMicroseconds); - d = new Duration(hours: 1, minutes: -60); - Expect.equals(0, d.inMicroseconds); - d = const Duration(minutes: 1, seconds: -60); - Expect.equals(0, d.inMicroseconds); - d = new Duration(seconds: 1, milliseconds: -1000); - Expect.equals(0, d.inMicroseconds); - d = new Duration(milliseconds: 1, microseconds: -1000); - Expect.equals(0, d.inMicroseconds); - - d = const Duration(hours: 25); - Expect.equals(1, d.inDays); - Expect.equals(25, d.inHours); - Expect.equals(1500, d.inMinutes); - Expect.equals(90000, d.inSeconds); - Expect.equals(90000000, d.inMilliseconds); - Expect.equals(90000000000, d.inMicroseconds); - d = new Duration(minutes: 61); - Expect.equals(0, d.inDays); - Expect.equals(1, d.inHours); - Expect.equals(61, d.inMinutes); - Expect.equals(3660, d.inSeconds); - Expect.equals(3660000, d.inMilliseconds); - Expect.equals(3660000000, d.inMicroseconds); - d = const Duration(seconds: 61); - Expect.equals(0, d.inDays); - Expect.equals(0, d.inHours); - Expect.equals(1, d.inMinutes); - Expect.equals(61, d.inSeconds); - Expect.equals(61000, d.inMilliseconds); - Expect.equals(61000000, d.inMicroseconds); - d = new Duration(milliseconds: 1001); - Expect.equals(0, d.inDays); - Expect.equals(0, d.inHours); - Expect.equals(0, d.inMinutes); - Expect.equals(1, d.inSeconds); - Expect.equals(1001, d.inMilliseconds); - Expect.equals(1001000, d.inMicroseconds); - d = new Duration(microseconds: 1001); - Expect.equals(0, d.inDays); - Expect.equals(0, d.inHours); - Expect.equals(0, d.inMinutes); - Expect.equals(0, d.inSeconds); - Expect.equals(1, d.inMilliseconds); - Expect.equals(1001, d.inMicroseconds); - - var d1 = const Duration(milliseconds: 1000); - var d2 = const Duration(seconds: 1); - Expect.identical(d1, d2); - - d1 = const Duration(microseconds: 1000); - d2 = const Duration(milliseconds: 1); - Expect.identical(d1, d2); - - d1 = new Duration(hours: 1); - d2 = new Duration(hours: -1); - d = d1 + d2; - Expect.equals(0, d.inMicroseconds); - d = d1 - d2; - Expect.equals(3600000000 * 2, d.inMicroseconds); - - d2 = new Duration(hours: 1); - d = d1 + d2; - Expect.equals(3600000000 * 2, d.inMicroseconds); - d = d1 - d2; - Expect.equals(0, d.inMicroseconds); - - d = d1 * 2; - Expect.equals(3600000000 * 2, d.inMicroseconds); - d = d1 * -1; - Expect.equals(-3600000000, d.inMicroseconds); - d = d1 * 0; - Expect.equals(0, d.inMicroseconds); - - d = d1 ~/ 2; - Expect.equals(1800000000, d.inMicroseconds); - d = d1 ~/ 3600000001; - Expect.equals(0, d.inMicroseconds); - d = d1 ~/ -3600000001; - Expect.equals(0, d.inMicroseconds); - d = d1 ~/ 3599999999; - Expect.equals(1, d.inMicroseconds); - d = d1 ~/ -3599999999; - Expect.equals(-1, d.inMicroseconds); - d = d1 ~/ -1; - Expect.equals(-3600000000, d.inMicroseconds); - d = d1 * 0; - Expect.equals(0, d.inMicroseconds); - Expect.throws(() => d1 ~/ 0, (e) => e is UnsupportedError); - - d = new Duration(microseconds: 0); - Expect.isTrue(d < new Duration(microseconds: 1)); - Expect.isTrue(d <= new Duration(microseconds: 1)); - Expect.isTrue(d <= d); - Expect.isTrue(d > new Duration(microseconds: -1)); - Expect.isTrue(d >= new Duration(microseconds: -1)); - Expect.isTrue(d >= d); - - d = const Duration( - days: 1, - hours: 3, - minutes: 17, - seconds: 42, - milliseconds: 823, - microseconds: 127); - Expect.equals("27:17:42.823127", d.toString()); - - d = const Duration(hours: 1999, minutes: 17, seconds: 42); - Expect.equals("1999:17:42.000000", d.toString()); - - d = const Duration( - days: -1, - hours: -3, - minutes: -17, - seconds: -42, - milliseconds: -823, - microseconds: -127); - Expect.equals("-27:17:42.823127", d.toString()); - - d = const Duration(hours: -1999, minutes: -17, seconds: -42); - Expect.equals("-1999:17:42.000000", d.toString()); - - // Edge conditions for toString of microseconds. - // Regression test for http://dartbug.com/15678 - - d = const Duration(microseconds: 1); - Expect.equals("0:00:00.000001", d.toString()); - - d = const Duration(microseconds: 9); - Expect.equals("0:00:00.000009", d.toString()); - - d = const Duration(microseconds: 10); - Expect.equals("0:00:00.000010", d.toString()); - - d = const Duration(microseconds: 99); - Expect.equals("0:00:00.000099", d.toString()); - - d = const Duration(microseconds: 100); - Expect.equals("0:00:00.000100", d.toString()); - - d = const Duration(microseconds: 999); - Expect.equals("0:00:00.000999", d.toString()); - - d = const Duration(microseconds: 1000); - Expect.equals("0:00:00.001000", d.toString()); - - d = const Duration(microseconds: 9999); - Expect.equals("0:00:00.009999", d.toString()); - - d = const Duration(microseconds: 10000); - Expect.equals("0:00:00.010000", d.toString()); - - d = const Duration(microseconds: 99999); - Expect.equals("0:00:00.099999", d.toString()); - - d = const Duration(microseconds: 100000); - Expect.equals("0:00:00.100000", d.toString()); - - d = const Duration(microseconds: 999999); - Expect.equals("0:00:00.999999", d.toString()); - - d = const Duration(microseconds: 1000000); - Expect.equals("0:00:01.000000", d.toString()); - - // Regression test: Infinite loop prior to fix. - d = const Duration(microseconds: -0x8000000000000000); - Expect.equals("-2562047788:00:54.775808", d.toString()); - - d = const Duration( - hours: -2562047788, minutes: 0, seconds: -54, microseconds: -775808); - Expect.equals(-0x8000000000000000, d.inMicroseconds); - - d1 = const Duration(hours: 1); - d2 = const Duration(hours: -1); - Expect.isFalse(d1.isNegative); - Expect.isTrue(d2.isNegative); - Expect.equals(d1, d1.abs()); - Expect.equals(d1, d2.abs()); - - Expect.equals(d2, -d1); - Expect.equals(d1, -d2); - - // Regression test for http://dartbug.com/48841 - d = const Duration(minutes: -1); - Expect.equals("-0:01:00.000000", d.toString()); - d = const Duration(seconds: -1); - Expect.equals("-0:00:01.000000", d.toString()); - d = const Duration(milliseconds: -1); - Expect.equals("-0:00:00.001000", d.toString()); - d = const Duration(microseconds: -1); - Expect.equals("-0:00:00.000001", d.toString()); - d = const Duration(microseconds: -9223372036854775808); // Min 64-bit int. - // Not checking precise values, because they will be off on the web. - Expect.equals("-2562047788:00:54.775808", d.toString()); - Expect.isTrue(d.toString().startsWith("-")); - Expect.isFalse(d.toString().startsWith("--")); - d = const Duration(minutes: -0); // is -0.0 on web. - Expect.equals("0:00:00.000000", d.toString()); - - // Regression test for https://github.com/dart-lang/sdk/issues/51584 - // (Didn't fix it all in 48841.) - d = const Duration(hours: -1); - Expect.equals("-1:00:00.000000", d.toString()); - - // Adding -0.0's gives -0.0 again. - d = const Duration( - days: -0, - hours: -0, - minutes: -0, - seconds: -0, - milliseconds: -0, - microseconds: -0); - Expect.equals("0:00:00.000000", d.toString()); -} diff --git a/tests/corelib_2/dynamic_nosuchmethod_test.dart b/tests/corelib_2/dynamic_nosuchmethod_test.dart deleted file mode 100644 index 78ba5bc5e53..00000000000 --- a/tests/corelib_2/dynamic_nosuchmethod_test.dart +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) 2017, 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 - -// VMOptions=--lazy-dispatchers -// VMOptions=--no-lazy-dispatchers - -import "package:expect/expect.dart"; - -// Test that noSuchMethod calls behave as expected for dynamic object invocations. -class BaseClass { - final dynamic finalField = "final!"; - - baz() => "baz!!"; - get bla => (() => "bla!!"); -} - -class ReturnInvocationName extends BaseClass { - var _bar; - - ReturnInvocationName(this._bar); - - noSuchMethod(Invocation invocation) { - var name = invocation.memberName.toString(); - var match = new RegExp(r'Symbol\("([^"]+)"\)').matchAsPrefix(name); - return match != null ? match.group(1) : name; - } - - bar() { - return _bar; - } -} - -class Foo {} - -main() { - dynamic x = new ReturnInvocationName(42); - Expect.equals('final!', x.finalField); - Expect.equals('foo', x.finalField = "foo", 'should call noSuchMethod'); - Expect.equals('final!', x.finalField, 'field was not set'); - - Expect.equals('_prototype', x._prototype); - Expect.equals('_prototype', x._prototype()); - - Expect.equals('prototype', x.prototype); - Expect.equals('prototype', x.prototype()); - - Expect.equals('constructor', x.constructor); - Expect.equals('constructor', x.constructor()); - - Expect.equals('__proto__', x.__proto__); - Expect.equals('__proto__', x.__proto__); - - Expect.equals(42, x.bar()); - Expect.equals(42, (x.bar)()); - - Expect.equals('unary-', -x); - Expect.equals('+', x + 42); - Expect.equals('[]', x[4]); - - dynamic b = new BaseClass(); - Expect.equals('final!', b.finalField); - Expect.throwsNoSuchMethodError(() => b.finalField = "foo"); - Expect.equals('final!', b.finalField, 'field was not set'); - - // Verify that noSuchMethod errors are triggered even when the JS object - // happens to have a matching member name. - dynamic f = new Foo(); - Expect.throwsNoSuchMethodError(() => f.prototype); - Expect.throwsNoSuchMethodError(() => f.prototype()); - Expect.throwsNoSuchMethodError(() => f.prototype = 42); - - Expect.throwsNoSuchMethodError(() => f.constructor); - Expect.throwsNoSuchMethodError(() => f.constructor()); - Expect.throwsNoSuchMethodError(() => f.constructor = 42); - - Expect.throwsNoSuchMethodError(() => f.__proto__); - - // These are valid JS properties but not Dart methods. - Expect.throwsNoSuchMethodError(() => f.toLocaleString); - - Expect.throwsNoSuchMethodError(() => f.hasOwnProperty); - - f = (int x) {}; - // Calls with the wrong number of arguments should be NoSuchMethodErrors. - Expect.throwsNoSuchMethodError(() => f()); - Expect.throwsNoSuchMethodError(() => f('hi', '!')); - Expect.throwsNoSuchMethodError(() => f(x: 42)); -} diff --git a/tests/corelib_2/error_stack_trace1_test.dart b/tests/corelib_2/error_stack_trace1_test.dart deleted file mode 100644 index 792a386ff26..00000000000 --- a/tests/corelib_2/error_stack_trace1_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A { - static Aa() => Ab(); - static Ab() => Ac(); - static Ac() => throw "abc"; -} - -class B { - static Ba() => Bb(); - static Bb() => Bc(); - static Bc() { - try { - A.Aa(); - } catch (e) { - // This should produce a NoSuchMethodError. - var trace = e.stackTrace; - } - } -} - -main() { - bool hasThrown = false; - try { - B.Ba(); - } catch (e, stackTrace) { - hasThrown = true; - var trace = stackTrace.toString(); - print(trace); - Expect.isTrue(trace.contains("Bc")); - Expect.isTrue(trace.contains("Bb")); - Expect.isTrue(trace.contains("Ba")); - Expect.isTrue(trace.contains("main")); - } - Expect.isTrue(hasThrown); -} diff --git a/tests/corelib_2/error_stack_trace2_test.dart b/tests/corelib_2/error_stack_trace2_test.dart deleted file mode 100644 index 26aacbfd12a..00000000000 --- a/tests/corelib_2/error_stack_trace2_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A { - get foo => cyclicStatic; -} - -var a = new A(); -dynamic cyclicStatic = (() => a.foo + 1)(); - -cyclicInitialization() { - return cyclicStatic; -} - -main() { - bool hasThrown = false; - try { - cyclicStatic + 1; - } catch (e2) { - var e = e2; - hasThrown = true; - Expect.isTrue( - e.stackTrace is StackTrace, "$e doesn't have a non-null stack trace"); - } - Expect.isTrue(hasThrown); -} diff --git a/tests/corelib_2/error_stack_trace_test.dart b/tests/corelib_2/error_stack_trace_test.dart deleted file mode 100644 index 3cd163b9043..00000000000 --- a/tests/corelib_2/error_stack_trace_test.dart +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -void argument() { - throw new ArgumentError(499); -} - -// Verify that -void noSuchMethod() { - (499 as dynamic).doesNotExist(); -} - -void nullThrown() { - throw null; -} - -void range() { - throw new RangeError.range(0, 1, 2); -} - -abstract class A { - foo(); -} - -void unsupported() { - throw new UnsupportedError("unsupported"); -} - -void unimplemented() { - throw new UnimplementedError("unimplemented"); -} - -void state() { - [1, 2].single; -} - -void cast() { - dynamic d = 1; - d as String; -} - -main() { - List errorFunctions = [ - argument, - noSuchMethod, - nullThrown, //# nullThrown: ok - range, - unsupported, - unimplemented, - state, - cast, - ]; - - for (var f in errorFunctions) { - bool hasThrown = false; - try { - f(); - } catch (e) { - hasThrown = true; - Expect.isTrue( - e.stackTrace is StackTrace, "$e doesn't have a non-null stack trace"); - } - Expect.isTrue(hasThrown); - } -} diff --git a/tests/corelib_2/error_throw_with_stacktrace_test.dart b/tests/corelib_2/error_throw_with_stacktrace_test.dart deleted file mode 100644 index d6c3b59bb33..00000000000 --- a/tests/corelib_2/error_throw_with_stacktrace_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) 2021, 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 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -// Test of Error.throwWithStackTrace. -main() { - // Ensure `systemStack` is different from any other stack tracek. - var systemStack = (() => StackTrace.current)(); - - // Test that an error can be thrown with a system stack trace.. - { - var error = ArgumentError("e1"); - try { - Error.throwWithStackTrace(error, systemStack); - Expect.fail("Didn't throw: e1.1"); - } on Error catch (e, s) { - Expect.identical(error, e, "e1.2"); - // No not expect *identical* stack trace objects. - Expect.equals("$systemStack", "$s", "e1.3"); - Expect.isNotNull(error.stackTrace, "e1.4"); - Expect.equals("$systemStack", "${error.stackTrace}", "e1.5"); - } - } - - // Test that an error can be thrown with a user-created stack trace.. - { - var stringStack = StackTrace.fromString("Nonce"); - var error = ArgumentError("e2"); - try { - Error.throwWithStackTrace(error, stringStack); - Expect.fail("Didn't throw: e2.1"); - } on Error catch (e, s) { - Expect.identical(error, e, "e2.2"); - // No not expect *identical* stack trace objects. - Expect.equals("$stringStack", "$s", "e2.3"); - Expect.isNotNull(error.stackTrace, "e2.4"); - Expect.equals("$stringStack", "${error.stackTrace}", "e2.5"); - } - } - - // Test that a non-error object can be thrown too. - { - var exception = FormatException("e3"); - try { - Error.throwWithStackTrace(exception, systemStack); - Expect.fail("Didn't throw: e3.1"); - } on Exception catch (e, s) { - Expect.identical(exception, e, "e3.2"); - // No not expect *identical* stack trace objects. - Expect.equals("$systemStack", "$s", "e3.3"); - } - } - - // Test that an [Error] not extending {Error} can be thrown, - // but doesn't (and cannot) set the stack trace. - { - var error = CustomError("e4"); - try { - Error.throwWithStackTrace(error, systemStack); - Expect.fail("Didn't throw: e4.1"); - } on Error catch (e, s) { - Expect.identical(error, e, "e4.2"); - // No not expect *identical* stack trace objects. - Expect.equals("$systemStack", "$s", "e4.3"); - Expect.isNull(error.stackTrace, "e4.4"); - } - } - - // Test that an already set stack trace isn't changed. - { - var error = ArgumentError("e5"); - StackTrace originalStack; - try { - throw error; - } on Error catch (e) { - originalStack = e.stackTrace; - } - Expect.isNotNull(originalStack); - Expect.notIdentical(originalStack, systemStack); - Expect.notEquals("$originalStack", ""); - try { - Error.throwWithStackTrace(error, systemStack); - Expect.fail("Didn't throw: e5.1"); - } on Error catch (e, s) { - Expect.identical(error, e, "e5.2"); - // No not expect *identical* stack trace objects. - Expect.equals("$systemStack", "$s", "e5.3"); - // Expect the already-set stack trace to stay. - Expect.isNotNull(error.stackTrace, "e5.4"); - Expect.equals("$originalStack", "${error.stackTrace}", "e5.5"); - } - } - - // Works with OutOfMemoryError. - { - var error = const OutOfMemoryError(); - try { - Error.throwWithStackTrace(error, systemStack); - } on Error catch (e, s) { - Expect.identical(error, e); - Expect.equals("$systemStack", "$s"); - } - } - - // Works with StackOverflowError. - { - var error = const StackOverflowError(); - try { - Error.throwWithStackTrace(error, systemStack); - } on Error catch (e, s) { - Expect.identical(error, e); - Expect.equals("$systemStack", "$s"); - } - } - - // Also for live, captured, StackOverflowError. - { - Object error; - int foo() => foo() + 1; - try { - foo(); // Force stack overflow. - } catch (e, s) { - error = e; - } - // Some platforms might use another error than StackOverflowError. - // Should work with whichever object gets here. - try { - Error.throwWithStackTrace(error, systemStack); - } catch (e, s) { - Expect.identical(error, e); - Expect.equals("$systemStack", "$s"); - } - } - - asyncTest(() async { - var theFuture = Future.value(null); - - // Test that throwing inside an asynchronous context can be caught. - { - var error = ArgumentError("e6"); - try { - await theFuture; - Error.throwWithStackTrace(error, systemStack); - Expect.fail("Didn't throw: e6.1"); - await theFuture; - } on Error catch (e, s) { - Expect.identical(error, e, "e6.2"); - // No not expect *identical* stack trace objects. - Expect.equals("$systemStack", "$s", "e6.3"); - Expect.isNotNull(error.stackTrace, "e6.4"); - Expect.equals("$systemStack", "${error.stackTrace}", "e6.5"); - } - } - - // Test that throwing in asynchronous context can be locally uncaught. - { - asyncStart(); - var error = ArgumentError("e7"); - var future = () async { - await theFuture; - Error.throwWithStackTrace(error, systemStack); - Expect.fail("Didn't throw: e7.1"); - await theFuture; - return null; // Force future type to Future - }(); - future.catchError((e, s) { - Expect.identical(error, e, "e7.2"); - // No not expect *identical* stack trace objects. - Expect.equals("$systemStack", "$s", "e7.3"); - Expect.isNotNull(error.stackTrace, "e7.4"); - Expect.equals("$systemStack", "${error.stackTrace}", "e7.5"); - asyncEnd(); - }); - } - - // Test throwing an uncaught async error caught by the Zone. - { - asyncStart(); - var error = ArgumentError("e8"); - await runZonedGuarded(() { - // Make an uncaught asynchronous error. - (() async { - await theFuture; - Error.throwWithStackTrace(error, systemStack); - Expect.fail("Didn't throw: e8.1"); - await theFuture; - }()); - }, (e, s) { - Expect.identical(error, e, "e8.2"); - // No not expect *identical* stack trace objects. - Expect.equals("$systemStack", "$s", "e8.3"); - Expect.isNotNull(error.stackTrace, "e8.4"); - Expect.equals("$systemStack", "${error.stackTrace}", "e8.5"); - asyncEnd(); - }); - } - }); -} - -class CustomError implements Error { - final String message; - CustomError(this.message); - StackTrace get stackTrace => null; - String toString() => "CustomError: $message"; -} diff --git a/tests/corelib_2/errors_test.dart b/tests/corelib_2/errors_test.dart deleted file mode 100644 index 8033bead1db..00000000000 --- a/tests/corelib_2/errors_test.dart +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -// Test that error constructors do what they are documented as doing. - -main() { - Expect.equals("Invalid argument(s)", new ArgumentError().toString()); - Expect.equals( - "Invalid argument(s): message", new ArgumentError("message").toString()); - Expect.equals( - "Invalid argument: null", new ArgumentError.value(null).toString()); - Expect.equals("Invalid argument: 42", new ArgumentError.value(42).toString()); - Expect.equals( - "Invalid argument: \"bad\"", new ArgumentError.value("bad").toString()); - Expect.equals("Invalid argument (foo): null", - new ArgumentError.value(null, "foo").toString()); - Expect.equals("Invalid argument (foo): 42", - new ArgumentError.value(42, "foo").toString()); - Expect.equals("Invalid argument (foo): message: 42", - new ArgumentError.value(42, "foo", "message").toString()); - Expect.equals("Invalid argument: message: 42", - new ArgumentError.value(42, null, "message").toString()); - Expect.equals("Invalid argument(s): Must not be null", - new ArgumentError.notNull().toString()); - Expect.equals("Invalid argument(s) (foo): Must not be null", - new ArgumentError.notNull("foo").toString()); - - Expect.equals("RangeError", new RangeError(null).toString()); - Expect.equals("RangeError: message", new RangeError("message").toString()); - Expect.equals("RangeError: Value not in range: 42", - new RangeError.value(42).toString()); - Expect.equals("RangeError (foo): Value not in range: 42", - new RangeError.value(42, "foo").toString()); - Expect.equals("RangeError (foo): message: 42", - new RangeError.value(42, "foo", "message").toString()); - Expect.equals("RangeError: message: 42", - new RangeError.value(42, null, "message").toString()); - - Expect.equals("RangeError: Invalid value: Not in inclusive range 2..9: 42", - new RangeError.range(42, 2, 9).toString()); - Expect.equals( - "RangeError (foo): Invalid value: Not in inclusive range 2..9: 42", - new RangeError.range(42, 2, 9, "foo").toString()); - Expect.equals("RangeError (foo): message: Not in inclusive range 2..9: 42", - new RangeError.range(42, 2, 9, "foo", "message").toString()); - Expect.equals("RangeError: message: Not in inclusive range 2..9: 42", - new RangeError.range(42, 2, 9, null, "message").toString()); - - Expect.equals( - "RangeError: Index out of range: " - "index should be less than 3: 42", - new IndexError.withLength(42, 3, indexable: [1, 2, 3]).toString()); - Expect.equals( - "RangeError (foo): Index out of range: " - "index should be less than 3: 42", - new IndexError.withLength(42, 3, indexable: [1, 2, 3], name: "foo") - .toString()); - Expect.equals( - "RangeError (foo): message: " - "index should be less than 3: 42", - new IndexError.withLength(42, 3, - indexable: [1, 2, 3], name: "foo", message: "message") - .toString()); - Expect.equals( - "RangeError: message: " - "index should be less than 3: 42", - new IndexError.withLength(42, 3, indexable: [1, 2, 3], message: "message") - .toString()); - Expect.equals( - "RangeError (foo): message: " - "index should be less than 2: 42", - new IndexError.withLength(42, 2, - indexable: [1, 2, 3], name: "foo", message: "message") - .toString()); - Expect.equals( - "RangeError: Index out of range: " - "index must not be negative: -5", - new IndexError.withLength(-5, 3, indexable: [1, 2, 3]).toString()); - - Expect.equals(42, ArgumentError.checkNotNull(42)); - Expect.equals(42, ArgumentError.checkNotNull(42, "name")); - Expect.throwsArgumentError(() => ArgumentError.checkNotNull(null)); - - Expect.equals(1, RangeError.checkNotNegative(1)); - Expect.equals(0, RangeError.checkNotNegative(0)); - Expect.throwsRangeError(() => RangeError.checkNotNegative(-1)); - - Expect.equals(1, RangeError.checkValueInInterval(1, 0, 2)); - Expect.equals(1, RangeError.checkValueInInterval(1, 1, 2)); - Expect.equals(1, RangeError.checkValueInInterval(1, 0, 1)); - Expect.equals(1, RangeError.checkValueInInterval(1, 1, 1)); - Expect.throwsRangeError(() => RangeError.checkValueInInterval(1, 2, 3)); - Expect.throwsRangeError(() => RangeError.checkValueInInterval(1, 1, 0)); - Expect.throwsRangeError(() => RangeError.checkValueInInterval(0, 1, 0)); - - Expect.equals(1, IndexError.check(1, 2, indexable: [1, 2])); - Expect.equals(1, IndexError.check(1, 2)); - Expect.throwsRangeError(() => IndexError.check(1, 0, indexable: [])); - Expect.throwsRangeError(() => IndexError.check(1, 1)); - Expect.throwsRangeError(() => IndexError.check(-1, 3, indexable: [1, 2, 3])); - Expect.throwsRangeError(() => IndexError.check(-1, 3)); -} diff --git a/tests/corelib_2/exception_implementation_test.dart b/tests/corelib_2/exception_implementation_test.dart deleted file mode 100644 index 18190ca894f..00000000000 --- a/tests/corelib_2/exception_implementation_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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 exception_implementation_test; - -import "package:expect/expect.dart"; - -main() { - final msg = 1; - try { - throw new Exception(msg); - Expect.fail("Unreachable"); - } on Exception catch (e) { - Expect.isTrue(e is Exception); - Expect.equals("Exception: $msg", e.toString()); - } -} diff --git a/tests/corelib_2/expando_test.dart b/tests/corelib_2/expando_test.dart deleted file mode 100644 index 631bf59d4a6..00000000000 --- a/tests/corelib_2/expando_test.dart +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) 2012, 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. -// -// VMOptions=--enable-ffi=true -// VMOptions=--enable-ffi=false - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class ExpandoTest { - static Expando visits; - - static testMain() { - visits = new Expando('visits'); - var legal = [ - new Object(), - [], - [1, 2, 3], - const [1, 2, 3], - new Map(), - {'x': 1, 'y': 2}, - const {'x': 1, 'y': 2}, - new Expando(), - new Expando('horse') - ]; - for (var object in legal) { - testNamedExpando(object); - testUnnamedExpando(object); - } - for (var object in legal) { - Expect.equals(2, visits[object], "$object"); - } - testIllegal(); - testIdentity(); - } - - static visit(object) { - int count = visits[object]; - count = (count == null) ? 1 : count + 1; - visits[object] = count; - } - - static testNamedExpando(object) { - Expando expando = new Expando('myexpando'); - Expect.equals('myexpando', expando.name); - Expect.isTrue(expando.toString().startsWith('Expando:myexpando')); - testExpando(expando, object); - } - - static testUnnamedExpando(object) { - Expando expando = new Expando(); - Expect.isNull(expando.name); - Expect.isTrue(expando.toString().startsWith('Expando:')); - testExpando(expando, object); - } - - static testExpando(Expando expando, object) { - visit(object); - - Expect.isNull(expando[object]); - expando[object] = 42; - Expect.equals(42, expando[object]); - expando[object] = null; - Expect.isNull(expando[object]); - - Expando alternative = new Expando('myexpando'); - Expect.isNull(alternative[object]); - alternative[object] = 87; - Expect.isNull(expando[object]); - expando[object] = 99; - Expect.equals(99, expando[object]); - Expect.equals(87, alternative[object]); - } - - static testIllegal() { - Expando expando = new Expando(); - Expect.throwsArgumentError(() => expando[null], "null"); - Expect.throwsArgumentError(() => expando['string'], "'string'"); - Expect.throwsArgumentError(() => expando[42], "42"); - Expect.throwsArgumentError(() => expando[42.87], "42.87"); - Expect.throwsArgumentError(() => expando[true], "true"); - Expect.throwsArgumentError(() => expando[false], "false"); - } - - static testIdentity() { - // Expando only depends on identity of object. - Expando expando = new Expando(); - var m1 = new Mutable(1); - var m2 = new Mutable(7); - var m3 = new Mutable(13); - expando[m1] = 42; - Expect.equals(42, expando[m1]); - m1.id = 37; - Expect.equals(42, expando[m1]); - expando[m2] = 37; - expando[m3] = 10; - m3.id = 1; - Expect.equals(42, expando[m1]); - Expect.equals(37, expando[m2]); - Expect.equals(10, expando[m3]); - } -} - -main() => ExpandoTest.testMain(); - -class Mutable { - int id; - Mutable(this.id); - int get hashCode => id; - bool operator ==(other) => other is Mutable && other.id == id; -} diff --git a/tests/corelib_2/expression_test.dart b/tests/corelib_2/expression_test.dart deleted file mode 100644 index 6d0dbb162ed..00000000000 --- a/tests/corelib_2/expression_test.dart +++ /dev/null @@ -1,119 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Tests basic expressions. Does not attempt to validate the details of arithmetic, coercion, and -// so forth. -class ExpressionTest { - ExpressionTest() {} - - int foo; - - static testMain() { - var test = new ExpressionTest(); - test.testBinary(); - test.testUnary(); - test.testShifts(); - test.testBitwise(); - test.testIncrement(); - test.testMangling(); - } - - testBinary() { - int x = 4, y = 2; - Expect.equals(6, x + y); - Expect.equals(2, x - y); - Expect.equals(8, x * y); - Expect.equals(2, x / y); - Expect.equals(0, x % y); - } - - testUnary() { - int x = 4, y = 2, z = -5; - bool t = true, f = false; - Expect.equals(-4, -x); - Expect.equals(4, ~z); - Expect.equals(f, !t); - } - - testShifts() { - int x = 4, y = 2; - Expect.equals(y, x >> 1); - Expect.equals(x, y << 1); - } - - testBitwise() { - int x = 4, y = 2; - Expect.equals(6, (x | y)); - Expect.equals(0, (x & y)); - Expect.equals(6, (x ^ y)); - } - - operator [](int index) { - return foo; - } - - operator []=(int index, int value) { - foo = value; - } - - testIncrement() { - int x = 4, a = x++; - Expect.equals(4, a); - Expect.equals(5, x); - Expect.equals(6, ++x); - Expect.equals(6, x++); - Expect.equals(7, x); - Expect.equals(6, --x); - Expect.equals(6, x--); - Expect.equals(5, x); - - this.foo = 0; - Expect.equals(0, this.foo++); - Expect.equals(1, this.foo); - Expect.equals(2, ++this.foo); - Expect.equals(2, this.foo); - Expect.equals(2, this.foo--); - Expect.equals(1, this.foo); - Expect.equals(0, --this.foo); - Expect.equals(0, this.foo); - - Expect.equals(0, this[0]++); - Expect.equals(1, this[0]); - Expect.equals(2, ++this[0]); - Expect.equals(2, this[0]); - Expect.equals(2, this[0]--); - Expect.equals(1, this[0]); - Expect.equals(0, --this[0]); - Expect.equals(0, this[0]); - - int $0 = 42, $1 = 87, $2 = 117; - Expect.equals(42, $0++); - Expect.equals(43, $0); - Expect.equals(44, ++$0); - Expect.equals(88, $0 += $0); - Expect.equals(87, $1++); - Expect.equals(88, $1); - Expect.equals(89, ++$1); - Expect.equals(178, ($1 += $1)); - Expect.equals(117, $2++); - Expect.equals(118, $2); - Expect.equals(119, ++$2); - } - - void testMangling() { - int $0 = 42, $1 = 87, $2 = 117; - this[0] = 0; - Expect.equals(42, (this[0] += $0)); - Expect.equals(129, (this[0] += $1)); - Expect.equals(246, (this[0] += $2)); - } -} - -main() { - ExpressionTest.testMain(); -} diff --git a/tests/corelib_2/for_in_test.dart b/tests/corelib_2/for_in_test.dart deleted file mode 100644 index fdfec44abdd..00000000000 --- a/tests/corelib_2/for_in_test.dart +++ /dev/null @@ -1,98 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class ForInTest { - static testMain() { - testSimple(); - testBreak(); - testContinue(); - testClosure(); - } - - static Set getSmallSet() { - Set set = new Set(); - set.add(1); - set.add(2); - set.add(4); - return set; - } - - static void testSimple() { - Set set = getSmallSet(); - int count = 0; - for (final i in set) { - count += i; - } - Expect.equals(7, count); - - count = 0; - for (var i in set) { - count += i; - } - Expect.equals(7, count); - - count = 0; - for (int i in set) { - count += i; - } - Expect.equals(7, count); - - count = 0; - for (final int i in set) { - count += i; - } - Expect.equals(7, count); - - count = 0; - int i = 0; - Expect.equals(false, set.contains(i)); // Used to test [i] after loop. - for (i in set) { - count += i; - } - Expect.equals(7, count); - Expect.equals(true, set.contains(i)); - // The default implementation of [Set] preserves order. - Expect.equals(4, i); - } - - static void testBreak() { - Set set = getSmallSet(); - int count = 0; - for (final i in set) { - if (i == 4) break; - count += i; - } - Expect.equals(true, count < 4); - } - - static void testContinue() { - Set set = getSmallSet(); - int count = 0; - for (final i in set) { - if (i < 4) continue; - count += i; - } - Expect.equals(4, count); - } - - static void testClosure() { - Set set = getSmallSet(); - List closures = new List.filled(set.length, null); - int index = 0; - for (var i in set) { - closures[index++] = () => i; - } - - Expect.equals(index, set.length); - Expect.equals(7, closures[0]() + closures[1]() + closures[2]()); - } -} - -main() { - ForInTest.testMain(); -} diff --git a/tests/corelib_2/format_exception_test.dart b/tests/corelib_2/format_exception_test.dart deleted file mode 100644 index 028cddbd770..00000000000 --- a/tests/corelib_2/format_exception_test.dart +++ /dev/null @@ -1,110 +0,0 @@ -// 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 format_exception_test; - -import "package:expect/expect.dart"; - -test(exn, message, source, offset, toString) { - Expect.equals(message, exn.message); - Expect.equals(source, exn.source); - Expect.equals(offset, exn.offset); - Expect.equals(toString, exn.toString()); -} - -main() { - var e; - e = new FormatException(); - test(e, "", null, null, "FormatException"); - e = new FormatException(""); - test(e, "", null, null, "FormatException"); - e = new FormatException(null); - test(e, null, null, null, "FormatException"); - - e = new FormatException("message"); - test(e, "message", null, null, "FormatException: message"); - - e = new FormatException("message", "source"); - test(e, "message", "source", null, "FormatException: message\nsource"); - - e = new FormatException("message", "source" * 25); - test(e, "message", "source" * 25, null, - "FormatException: message\n" + "source" * 12 + "sou..."); - e = new FormatException("message", "source" * 25); - test(e, "message", "source" * 25, null, - "FormatException: message\n" + "source" * 12 + "sou..."); - e = new FormatException("message", "s1\nsource\ns2"); - test(e, "message", "s1\nsource\ns2", null, - "FormatException: message\n" + "s1\nsource\ns2"); - - var o = new Object(); - e = new FormatException("message", o, 10); - test(e, "message", o, 10, "FormatException: message (at offset 10)"); - - e = new FormatException("message", "source", 3); - test(e, "message", "source", 3, - "FormatException: message (at character 4)\nsource\n ^\n"); - - e = new FormatException("message", "s1\nsource\ns2", 6); - test(e, "message", "s1\nsource\ns2", 6, - "FormatException: message (at line 2, character 4)\nsource\n ^\n"); - - var longline = "watermelon cantaloupe " * 8 + "watermelon"; // Length > 160. - var longsource = (longline + "\n") * 25; - var line10 = (longline.length + 1) * 9; - e = new FormatException("message", longsource, line10); - test( - e, - "message", - longsource, - line10, - "FormatException: message (at line 10, character 1)\n" - "${longline.substring(0, 75)}...\n^\n"); - - e = new FormatException("message", longsource, line10 - 1); - test( - e, - "message", - longsource, - line10 - 1, - "FormatException: message (at line 9, " - "character ${longline.length + 1})\n" - "...${longline.substring(longline.length - 75)}\n" - "${' ' * 78}^\n"); - - var half = longline.length ~/ 2; - e = new FormatException("message", longsource, line10 + half); - test( - e, - "message", - longsource, - line10 + half, - "FormatException: message (at line 10, character ${half + 1})\n" - "...${longline.substring(half - 36, half + 36)}...\n" - "${' ' * 39}^\n"); - - var sourceNL = "\nsource with leading NL"; - e = new FormatException("message", sourceNL, 2); - test( - e, - "message", - sourceNL, - 2, - "FormatException: message (at line 2, character 2)\n" - "source with leading NL\n" - " ^\n"); - - var sourceNL2 = "\n\nsource with leading NL"; - e = new FormatException("message", sourceNL2, 2); - test( - e, - "message", - sourceNL2, - 2, - "FormatException: message (at line 3, character 1)\n" - "source with leading NL\n" - "^\n"); -} diff --git a/tests/corelib_2/from_environment_const_type_test.dart b/tests/corelib_2/from_environment_const_type_test.dart deleted file mode 100644 index 8ba03a731e3..00000000000 --- a/tests/corelib_2/from_environment_const_type_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2014, 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. -// SharedOptions=-Da=true -Db=false -Dc=3 -Dd=STRING - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Foo {} - -const - bool // //# 01: ok - int // //# 02: compile-time error - String // //# 03: compile-time error - Foo // //# 04: compile-time error - a = const bool.fromEnvironment('a'); - -const - bool // //# 05: ok - int // //# 06: compile-time error - String // //# 07: compile-time error - Foo // //# 08: compile-time error - b = const bool.fromEnvironment('b'); - -const - bool // //# 09: compile-time error - int // //# 10: ok - String // //# 11: compile-time error - Foo // //# 12: compile-time error - c = const int.fromEnvironment('c'); - -const - bool // //# 13: compile-time error - int // //# 14: compile-time error - String // //# 15: ok - Foo // //# 16: compile-time error - d = const String.fromEnvironment('d'); - -main() { - Expect.equals(a, true); - Expect.equals(b, false); - Expect.equals(c, 3); - Expect.equals(d, 'STRING'); -} diff --git a/tests/corelib_2/from_environment_const_type_undefined_test.dart b/tests/corelib_2/from_environment_const_type_undefined_test.dart deleted file mode 100644 index c71e8468555..00000000000 --- a/tests/corelib_2/from_environment_const_type_undefined_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -class Foo {} - -const - bool // //# 01: ok - int // //# 02: compile-time error - String //# 03: compile-time error - Foo // //# 04: compile-time error - a = const bool.fromEnvironment('a'); - -const - bool // //# 05: ok - int // //# 06: compile-time error - String //# 07: compile-time error - Foo // //# 08: compile-time error - b = const bool.fromEnvironment('b'); - -const - bool // //# 09: compile-time error - int // //# 10: ok - String //# 11: compile-time error - Foo // //# 12: compile-time error - c = const int.fromEnvironment('c', defaultValue: 0); - -const - bool // //# 13: compile-time error - int // //# 14: compile-time error - String //# 15: ok - Foo // //# 16: compile-time error - d = const String.fromEnvironment('d', defaultValue: ''); - -main() { - Expect.equals(false, a); - Expect.equals(false, b); - Expect.equals(0, c); - Expect.equals('', d); -} diff --git a/tests/corelib_2/from_environment_default_value_test.dart b/tests/corelib_2/from_environment_default_value_test.dart deleted file mode 100644 index 972b24a2a6f..00000000000 --- a/tests/corelib_2/from_environment_default_value_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - // Verify that the default value is as expected. - Expect.equals(false, const bool.fromEnvironment('UNDEFINED_NAME')); - Expect.equals(0, const int.fromEnvironment('UNDEFINED_NAME')); - Expect.equals('', const String.fromEnvironment('UNDEFINED_NAME')); - - // Verify that `defaultValue` is used when passed, not the default values. - Expect.equals( - true, const bool.fromEnvironment('UNDEFINED_NAME', defaultValue: true)); - Expect.equals( - 1, const int.fromEnvironment('UNDEFINED_NAME', defaultValue: 1)); - Expect.equals('qux', - const String.fromEnvironment('UNDEFINED_NAME', defaultValue: 'qux')); -} diff --git a/tests/corelib_2/growable_list_test.dart b/tests/corelib_2/growable_list_test.dart deleted file mode 100644 index 6efb7ef51fb..00000000000 --- a/tests/corelib_2/growable_list_test.dart +++ /dev/null @@ -1,166 +0,0 @@ -// 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 - -// Sanity check on the growing behavior of a growable list. - -import "package:expect/expect.dart"; - -void main() { - testConstructor(); - // Concurrent modification checks are only guaranteed in checked mode. - testConcurrentModification(); -} - -// Iterable generating numbers in range [0..count). -// May perform callback at some point underways. -class TestIterableBase extends Iterable { - final int length; - final int count; - // call [callback] if generating callbackIndex. - final int callbackIndex; - final Function callback; - TestIterableBase(this.length, this.count, this.callbackIndex, this.callback); - Iterator get iterator => new CallbackIterator(this); -} - -class TestIterable extends TestIterableBase { - TestIterable(count, [callbackIndex = -1, callback]) - : super(-1, count, callbackIndex, callback); - int get length => throw "SHOULD NOT BE CALLED"; -} - -// Implement Set for private EfficientLengthIterable interface. -class EfficientTestIterable extends TestIterableBase implements Set { - EfficientTestIterable(length, count, [callbackIndex = -1, callback]) - : super(length, count, callbackIndex, callback); - // Avoid warnings because we don't actually implement Set. - noSuchMethod(i) => super.noSuchMethod(i); - Set cast() => throw "not used by test"; -} - -class CallbackIterator implements Iterator { - TestIterableBase _iterable; - int _current = null; - int _nextIndex = 0; - CallbackIterator(this._iterable); - bool moveNext() { - if (_nextIndex >= _iterable.count) { - _current = null; - return false; - } - _current = _nextIndex; - _nextIndex++; - if (_current == _iterable.callbackIndex) { - _iterable.callback(); - } - return true; - } - - int get current => _current; -} - -void testConstructor() { - // Constructor can make both growable and fixed-length lists. - testGrowable(list) { - Expect.isTrue(list is List); - Expect.isFalse(list is List); - int length = list.length; - list.add(42); - Expect.equals(list.length, length + 1); - } - - testFixedLength(list) { - Expect.isTrue(list is List); - int length = list.length; - Expect.throws(() { - list.add(42); - }, null, "adding to fixed-length list"); - Expect.equals(length, list.length); - } - - testThrowsOrTypeError(fn, [name]) { - Expect.throws(fn, null, name); - } - - testFixedLength(new List.filled(0, null)); - testFixedLength(new List.filled(5, null)); - testFixedLength(new List.filled(5, null)); // default growable: false. - testGrowable([]); - testGrowable([]..length = 5); - testGrowable(new List.filled(5, null, growable: true)); - Expect.throwsArgumentError(() => new List.filled(-1, null), "-1"); - // There must be limits. Fix this test if we ever allow 2^63 elements. - Expect.throws(() => new List.filled(0x7ffffffffffff000, null), - (e) => e is OutOfMemoryError || e is ArgumentError, "bignum"); - Expect.throwsArgumentError(() => new List.filled(null, null), "null"); - testThrowsOrTypeError( - () => new List.filled([] as Object, null), // Cast to avoid warning. - 'list'); - testThrowsOrTypeError(() => new List.filled([42] as Object, null), "list2"); -} - -void testConcurrentModification() { - // Without EfficientLengthIterable interface - { - // Change length of list after 200 additions. - var l = []; - var ci = new TestIterable(257, 200, () { - l.add("X"); - }); - Expect.throws(() { - l.addAll(ci); - }, (e) => e is ConcurrentModificationError, "cm1"); - } - - { - // Change length of list after 200 additions. - var l = []; - var ci = new TestIterable(257, 200, () { - l.length = 0; - }); - Expect.throws(() { - l.addAll(ci); - }, (e) => e is ConcurrentModificationError, "cm2"); - } - - // With EfficientLengthIterable interface (uses length). - { - // Change length of list after 20 additions. - var l = []; - var ci = new EfficientTestIterable(257, 257, 20, () { - l.add("X"); - }); - Expect.throws(() { - l.addAll(ci); - }, (e) => e is ConcurrentModificationError, "cm3"); - } - - { - var l = []; - var ci = new EfficientTestIterable(257, 257, 20, () { - l.length = 0; - }); - Expect.throws(() { - l.addAll(ci); - }, (e) => e is ConcurrentModificationError, "cm4"); - } - - { - // Length 500, only 250 elements. - var l = []; - var ci = new EfficientTestIterable(500, 250); - l.addAll(ci); - Expect.listEquals(new List.generate(250, (x) => x), l, "cm5"); - } - - { - // Length 250, but 500 elements. - var l = []; - var ci = new EfficientTestIterable(250, 500); - l.addAll(ci); - Expect.listEquals(new List.generate(500, (x) => x), l, "cm6"); - } -} diff --git a/tests/corelib_2/has_next_iterator_test.dart b/tests/corelib_2/has_next_iterator_test.dart deleted file mode 100644 index 553cbbd7750..00000000000 --- a/tests/corelib_2/has_next_iterator_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012, 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 hasNextIterator.test; - -import "package:expect/expect.dart"; -import 'dart:collection'; - -main() { - var it = new HasNextIterator([].iterator); - Expect.isFalse(it.hasNext); - Expect.isFalse(it.hasNext); - Expect.throwsStateError(() => it.next()); - Expect.isFalse(it.hasNext); - - it = new HasNextIterator([1].iterator); - Expect.isTrue(it.hasNext); - Expect.isTrue(it.hasNext); - Expect.equals(1, it.next()); - Expect.isFalse(it.hasNext); - Expect.isFalse(it.hasNext); - Expect.throwsStateError(() => it.next()); - Expect.isFalse(it.hasNext); - - it = new HasNextIterator([1, 2].iterator); - Expect.isTrue(it.hasNext); - Expect.isTrue(it.hasNext); - Expect.equals(1, it.next()); - Expect.isTrue(it.hasNext); - Expect.isTrue(it.hasNext); - Expect.equals(2, it.next()); - Expect.isFalse(it.hasNext); - Expect.isFalse(it.hasNext); - Expect.throwsStateError(() => it.next()); - Expect.isFalse(it.hasNext); -} diff --git a/tests/corelib_2/hash_map2_test.dart b/tests/corelib_2/hash_map2_test.dart deleted file mode 100644 index 4c00f7df307..00000000000 --- a/tests/corelib_2/hash_map2_test.dart +++ /dev/null @@ -1,313 +0,0 @@ -// Copyright (c) 2013, 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. -// -// VMOptions= -// VMOptions=--use_internal_hash_map - -// @dart = 2.9 - -// Tests of hash map behavior, with focus in iteration and concurrent -// modification errors. - -library hash_map2_test; - -import "package:expect/expect.dart"; -import 'dart:collection'; - -testMap(Map newMap(), Map newMapFrom(Map map)) { - Map gen(int from, int to) { - Map map = new LinkedHashMap(); - for (int i = from; i < to; i++) map[i] = i; - return map; - } - - bool odd(Object n) => ((n as int) & 1) == 1; - bool even(Object n) => ((n as int) & 1) == 0; - void addAll(Map toMap, Map fromMap) { - fromMap.forEach((k, v) { - toMap[k] = v; - }); - } - - { - // Test growing to largish capacity. - Map map = newMap(); - - for (int i = 0; i < 256; i++) { - map[i] = i; - } - addAll(map, gen(256, 512)); - addAll(map, newMapFrom(gen(512, 1000))); - Expect.equals(1000, map.length); - - // Remove half. - for (int i = 0; i < 1000; i += 2) map.remove(i); - Expect.equals(500, map.length); - Expect.isFalse(map.keys.any(even)); - Expect.isTrue(map.keys.every(odd)); - - // Re-add all. - addAll(map, gen(0, 1000)); - Expect.equals(1000, map.length); - } - - { - // Test having many deleted elements. - Map map = newMap(); - map[0] = 0; - for (int i = 0; i < 1000; i++) { - map[i + 1] = i + 1; - map.remove(i); - Expect.equals(1, map.length); - } - } - - { - // Test having many elements with same hashCode - Map map = newMap(); - for (int i = 0; i < 1000; i++) { - map[new BadHashCode()] = 0; - } - Expect.equals(1000, map.length); - } - - { - // Check concurrent modification - Map map = newMap() - ..[0] = 0 - ..[1] = 1; - - { - // Test adding before a moveNext. - Iterator iter = map.keys.iterator; - iter.moveNext(); - map[1] = 9; // Updating existing key isn't a modification. - iter.moveNext(); - map[2] = 2; - Expect.throws(iter.moveNext, (e) => e is Error); - } - - { - // Test adding after last element. - Iterator iter = map.keys.iterator; - Expect.equals(3, map.length); - iter.moveNext(); - iter.moveNext(); - iter.moveNext(); - map[3] = 3; - Expect.throws(iter.moveNext, (e) => e is Error); - } - - { - // Test removing during iteration. - Iterator iter = map.keys.iterator; - iter.moveNext(); - map.remove(1000); // Not a modification if it's not there. - iter.moveNext(); - int n = iter.current; - map.remove(n); - // Removing doesn't change current. - Expect.equals(n, iter.current); - Expect.throws(iter.moveNext, (e) => e is Error); - } - - { - // Test removing after last element. - Iterator iter = map.keys.iterator; - Expect.equals(3, map.length); - iter.moveNext(); - iter.moveNext(); - iter.moveNext(); - int n = iter.current; - map.remove(n); - // Removing doesn't change current. - Expect.equals(n, iter.current); - Expect.throws(iter.moveNext, (e) => e is Error); - } - - { - // Test that updating value of existing key doesn't cause concurrent - // modification error. - Iterator iter = map.keys.iterator; - Expect.equals(2, map.length); - iter.moveNext(); - int n = iter.current; - map[n] = n * 2; - iter.moveNext(); - Expect.equals(map[iter.current], iter.current); - } - - { - // Test that modification during putIfAbsent is not an error. - map.putIfAbsent(4, () { - map[5] = 5; - map[4] = -1; - return 4; - }); - Expect.equals(4, map[4]); - Expect.equals(5, map[5]); - } - - { - // Check adding many existing keys isn't considered modification. - Map map2 = newMap(); - for (var key in map.keys) { - map2[key] = map[key] + 1; - } - Iterator iter = map.keys.iterator; - addAll(map, map2); - // Shouldn't throw. - iter.moveNext(); - } - } - - { - // Regression test for bug in putIfAbsent where adding an element - // that make the table grow, can be lost. - Map map = newMap(); - map.putIfAbsent("S", () => 0); - map.putIfAbsent("T", () => 0); - map.putIfAbsent("U", () => 0); - map.putIfAbsent("C", () => 0); - map.putIfAbsent("a", () => 0); - map.putIfAbsent("b", () => 0); - map.putIfAbsent("n", () => 0); - Expect.isTrue(map.containsKey("n")); - } - - { - // Check that putIfAbsent works just as well as put. - Map map = newMap(); - for (int i = 0; i < 128; i++) { - map.putIfAbsent(i, () => i); - Expect.isTrue(map.containsKey(i)); - map.putIfAbsent(i >> 1, () => -1); // Never triggers. - } - for (int i = 0; i < 128; i++) { - Expect.equals(i, map[i]); - } - } - - { - // Check that updating existing elements is not a modification. - // This must be the case even if the underlying data structure is - // nearly full. - for (int i = 1; i < 128; i++) { - // Create maps of different sizes, some of which should be - // at a limit of the underlying data structure. - Map map = newMapFrom(gen(0, i)); - - // ForEach-iteration. - map.forEach((key, v) { - Expect.equals(key, map[key]); - map[key] = key + 1; - map.remove(1000); // Removing something not there. - map.putIfAbsent(key, () => Expect.fail("SHOULD NOT BE ABSENT")); - // Doesn't cause ConcurrentModificationError. - }); - - // for-in iteration. - for (int key in map.keys) { - Expect.equals(key + 1, map[key]); - map[key] = map[key] + 1; - map.remove(1000); // Removing something not there. - map.putIfAbsent(key, () => Expect.fail("SHOULD NOT BE ABSENT")); - // Doesn't cause ConcurrentModificationError. - } - - // Raw iterator. - Iterator iter = map.keys.iterator; - for (int key = 0; key < i; key++) { - Expect.equals(key + 2, map[key]); - map[key] = key + 3; - map.remove(1000); // Removing something not there. - map.putIfAbsent(key, () => Expect.fail("SHOULD NOT BE ABSENT")); - // Doesn't cause ConcurrentModificationError on the moveNext. - } - iter.moveNext(); // Should not throw. - - // Remove a lot of elements, which can cause a re-tabulation. - for (int key = 1; key < i; key++) { - Expect.equals(key + 3, map[key]); - map.remove(key); - } - iter = map.keys.iterator; - map[0] = 2; - iter.moveNext(); // Should not throw. - } - } - - { - // Check that null can be in the map. - Map map = newMap(); - map[null] = 0; - Expect.equals(1, map.length); - Expect.isTrue(map.containsKey(null)); - Expect.isNull(map.keys.first); - Expect.isNull(map.keys.last); - map[null] = 1; - Expect.equals(1, map.length); - Expect.isTrue(map.containsKey(null)); - map.remove(null); - Expect.isTrue(map.isEmpty); - Expect.isFalse(map.containsKey(null)); - - // Created using map.from. - map = newMapFrom(new Map()..[null] = 0); - Expect.equals(1, map.length); - Expect.isTrue(map.containsKey(null)); - Expect.isNull(map.keys.first); - Expect.isNull(map.keys.last); - map[null] = 1; - Expect.equals(1, map.length); - Expect.isTrue(map.containsKey(null)); - map.remove(null); - Expect.isTrue(map.isEmpty); - Expect.isFalse(map.containsKey(null)); - - Map fromMap = new Map(); - fromMap[1] = 0; - fromMap[2] = 0; - fromMap[3] = 0; - fromMap[null] = 0; - fromMap[4] = 0; - fromMap[5] = 0; - fromMap[6] = 0; - Expect.equals(7, fromMap.length); - - // map that grows with null in it. - map = newMapFrom(fromMap); - Expect.equals(7, map.length); - for (int i = 7; i < 128; i++) { - map[i] = 0; - } - Expect.equals(128, map.length); - Expect.isTrue(map.containsKey(null)); - map[null] = 1; - Expect.equals(128, map.length); - Expect.isTrue(map.containsKey(null)); - map.remove(null); - Expect.equals(127, map.length); - Expect.isFalse(map.containsKey(null)); - } -} - -void main() { - Expect.isTrue(new HashMap() is Map); - Expect.isTrue(new LinkedHashMap() is Map); - Expect.isTrue(new HashMap.from({}) is Map); - Expect.isTrue(new LinkedHashMap.from({}) is Map); - Expect.isTrue({} is Map); - Expect.isTrue(const {} is Map); - - testMap(() => new HashMap(), (m) => new HashMap.from(m)); - testMap(() => new LinkedHashMap(), (m) => new LinkedHashMap.from(m)); -} - -class BadHashCode { - static int idCounter = 0; - final int id; - BadHashCode() : id = idCounter++; - int get hashCode => 42; -} diff --git a/tests/corelib_2/hash_map_test.dart b/tests/corelib_2/hash_map_test.dart deleted file mode 100644 index 649907d8d03..00000000000 --- a/tests/corelib_2/hash_map_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Test program for the HashMap class. - -class HashMapTest { - static testMain() { - var m = new Map(); - Expect.equals(0, m.length); - Expect.equals(true, m.isEmpty); - m["one"] = 1; - Expect.equals(1, m.length); - Expect.equals(false, m.isEmpty); - Expect.equals(1, m["one"]); - } -} - -main() { - HashMapTest.testMain(); -} diff --git a/tests/corelib_2/hash_set_test.dart b/tests/corelib_2/hash_set_test.dart deleted file mode 100644 index 0181794526e..00000000000 --- a/tests/corelib_2/hash_set_test.dart +++ /dev/null @@ -1,385 +0,0 @@ -// Copyright (c) 2013, 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. -// -// VMOptions= - -// @dart = 2.9 - -// Tests of hash set behavior, with focus in iteration and concurrent -// modification errors. - -library hash_map2_test; - -import "package:expect/expect.dart"; -import 'dart:collection'; -import 'dart:math' as math; - -testSet(Set newSet(), Set newSetFrom(Iterable from)) { - Set gen(int from, int to) => - new Set.from(new Iterable.generate(to - from, (n) => n + from)); - - bool odd(n) => (n & 1) == 1; - bool even(n) => (n & 1) == 0; - - { - // Test growing to largish capacity. - Set set = newSet(); - - for (int i = 0; i < 256; i++) { - set.add(i); - } - - set.addAll(gen(256, 512)); - set.addAll(newSetFrom(gen(512, 1000))); - Expect.equals(1000, set.length); - - // Remove half. - for (int i = 0; i < 1000; i += 2) set.remove(i); - Expect.equals(500, set.length); - Expect.isFalse(set.any(even)); - Expect.isTrue(set.every(odd)); - - // Re-add all. - set.addAll(gen(0, 1000)); - Expect.equals(1000, set.length); - } - - { - // Test having many deleted elements. - Set set = newSet(); - set.add(0); - for (int i = 0; i < 1000; i++) { - set.add(i + 1); - set.remove(i); - Expect.equals(1, set.length); - } - } - - { - // Test having many elements with same hashCode - Set set = newSet(); - for (int i = 0; i < 1000; i++) { - set.add(new BadHashCode()); - } - Expect.equals(1000, set.length); - } - - { - // Check concurrent modification - Set set = newSet() - ..add(0) - ..add(1); - - { - // Test adding before a moveNext. - Iterator iter = set.iterator; - iter.moveNext(); - set.add(1); // Updating existing key isn't a modification. - iter.moveNext(); - set.add(2); - Expect.throws(iter.moveNext, (e) => e is Error); - } - - { - // Test adding after last element. - Iterator iter = set.iterator; - Expect.equals(3, set.length); - iter.moveNext(); - iter.moveNext(); - iter.moveNext(); - set.add(3); - Expect.throws(iter.moveNext, (e) => e is Error); - } - - { - // Test removing during iteration. - Iterator iter = set.iterator; - iter.moveNext(); - set.remove(1000); // Not a modification if it's not there. - iter.moveNext(); - int n = iter.current; - set.remove(n); - // Removing doesn't change current. - Expect.equals(n, iter.current); - Expect.throws(iter.moveNext, (e) => e is Error); - } - - { - // Test removing after last element. - Iterator iter = set.iterator; - Expect.equals(3, set.length); - iter.moveNext(); - iter.moveNext(); - iter.moveNext(); - int n = iter.current; - set.remove(n); - // Removing doesn't change current. - Expect.equals(n, iter.current); - Expect.throws(iter.moveNext, (e) => e is Error); - } - - { - // Test that updating value doesn't cause error. - Iterator iter = set.iterator; - Expect.equals(2, set.length); - iter.moveNext(); - int n = iter.current; - set.add(n); - iter.moveNext(); - Expect.isTrue(set.contains(iter.current)); - } - - { - // Check adding many existing values isn't considered modification. - Set set2 = newSet(); - for (var value in set) { - set2.add(value); - } - Iterator iter = set.iterator; - set.addAll(set2); - // Shouldn't throw. - iter.moveNext(); - } - } - - { - // Check that updating existing elements is not a modification. - // This must be the case even if the underlying data structure is - // nearly full. - for (int i = 1; i < 128; i++) { - // Create maps of different sizes, some of which should be - // at a limit of the underlying data structure. - Set set = newSetFrom(gen(0, i)); - Iterator iter = set.iterator; - for (int j = 0; j < i; j++) { - set.add(j); - } - iter.moveNext(); // Should not throw. - - for (int j = 1; j < i; j++) { - set.remove(j); - } - iter = set.iterator; - set.add(0); - iter.moveNext(); // Should not throw. - } - } - - { - // Check that null can be in the set. - Set set = newSet(); - set.add(null); - Expect.equals(1, set.length); - Expect.isTrue(set.contains(null)); - Expect.isNull(set.first); - Expect.isNull(set.last); - set.add(null); - Expect.equals(1, set.length); - Expect.isTrue(set.contains(null)); - set.remove(null); - Expect.isTrue(set.isEmpty); - Expect.isFalse(set.contains(null)); - - // Created using Set.from. - set = newSetFrom([null]); - Expect.equals(1, set.length); - Expect.isTrue(set.contains(null)); - Expect.isNull(set.first); - Expect.isNull(set.last); - set.add(null); - Expect.equals(1, set.length); - Expect.isTrue(set.contains(null)); - set.remove(null); - Expect.isTrue(set.isEmpty); - Expect.isFalse(set.contains(null)); - - // Set that grows with null in it. - set = newSetFrom([1, 2, 3, null, 4, 5, 6]); - Expect.equals(7, set.length); - for (int i = 7; i < 128; i++) { - set.add(i); - } - Expect.equals(128, set.length); - Expect.isTrue(set.contains(null)); - set.add(null); - Expect.equals(128, set.length); - Expect.isTrue(set.contains(null)); - set.remove(null); - Expect.equals(127, set.length); - Expect.isFalse(set.contains(null)); - } - - { - // Check that addAll and clear works. - Set set = newSet(); - set.addAll([]); - Expect.isTrue(set.isEmpty); - set.addAll([1, 3, 2]); - Expect.equals(3, set.length); - Expect.isTrue(set.contains(1)); - Expect.isTrue(set.contains(3)); - Expect.isTrue(set.contains(2)); - Expect.isFalse(set.contains(4)); - set.clear(); - Expect.isTrue(set.isEmpty); - } - - { - // Check that removeWhere and retainWhere work. - Set set = newSetFrom([1, 2, 3]); - set.removeWhere((each) => each == 2); - Expect.equals(2, set.length); - Expect.isTrue(set.contains(1)); - Expect.isFalse(set.contains(2)); - Expect.isTrue(set.contains(3)); - set.retainWhere((each) => each == 3); - Expect.equals(1, set.length); - Expect.isFalse(set.contains(1)); - Expect.isFalse(set.contains(2)); - Expect.isTrue(set.contains(3)); - } - - { - // Test lookup - Set set = newSet(); - var m1a = new Mutable(1); - var m1b = new Mutable(1); - var m2a = new Mutable(2); - var m2b = new Mutable(2); - Expect.isNull(set.lookup(m1a)); - Expect.isNull(set.lookup(m1b)); - set.add(m1a); - Expect.identical(m1a, set.lookup(m1a)); - Expect.identical(m1a, set.lookup(m1b)); - - Expect.isNull(set.lookup(m2a)); - Expect.isNull(set.lookup(m2b)); - set.add(m2a); - Expect.identical(m2a, set.lookup(m2a)); - Expect.identical(m2a, set.lookup(m2b)); - - set.add(m2b); // Adding doesn't change element. - Expect.identical(m2a, set.lookup(m2a)); - Expect.identical(m2a, set.lookup(m2b)); - - set.remove(m1a); - set.add(m1b); - Expect.identical(m1b, set.lookup(m1a)); - Expect.identical(m1b, set.lookup(m1b)); - - set.add(1); - Expect.identical(1, set.lookup(1.0)); - set.add(-0.0); - Expect.identical(-0.0, set.lookup(0.0)); - } - - { - // Test special hash codes - Set set = newSet(); - List keys = []; - // Powers of two - for (int i = 63; i >= 2; --i) { - keys.add(new Mutable(math.pow(2, i))); - } - for (var key in keys) { - Expect.isTrue(set.add(key)); - } - for (var key in keys) { - Expect.isTrue(set.contains(key)); - } - } -} - -void testIdentitySet(Set create()) { - Set set = create(); - set.add(1); - set.add(2); - set.add(1); // Integers are identical if equal. - Expect.equals(2, set.length); - var complex = 4; - complex = set.length == 2 ? complex ~/ 4 : 87; // Avoid compile-time constant. - Expect.isTrue(set.contains(complex)); // 1 is in set, even if computed. - set.clear(); - - // All compile time constants are identical to themselves. - var constants = [ - double.infinity, - double.nan, - -0.0, - 0.0, - 42, - "", - null, - false, - true, - #bif, - testIdentitySet - ]; - set.addAll(constants); - if (webNumbers) { - // 0.0 and -0.0 are identical in JS. - Expect.equals(constants.length - 1, set.length); - Expect.isTrue( - set.containsAll(constants.where((e) => !(e is double && e.isNaN))), - "constants: $set"); - } else { - Expect.equals(constants.length, set.length); - Expect.isTrue(set.containsAll(constants), "constants: $set"); - } - for (var c in constants) { - // identical(double.nan, double.nan) == false in JS. - if (webNumbers && c is double && c.isNaN) continue; - Expect.isTrue(set.contains(c), "constant: $c"); - } - set.clear(); - - var m1 = new Mutable(1); - var m2 = new Mutable(2); - var m3 = new Mutable(3); - var m4 = new Mutable(2); // Equal to m2, but not identical. - set.addAll([m1, m2, m3, m4]); - Expect.equals(4, set.length); - Expect.equals(3, m3.hashCode); - m3.id = 1; - Expect.equals(1, m3.hashCode); - // Changing hashCode doesn't affect lookup. - Expect.isTrue(set.contains(m3)); - Expect.isTrue(set.contains(m1)); - set.remove(m3); - Expect.isFalse(set.contains(m3)); - Expect.isTrue(set.contains(m1)); - - Expect.identical(m1, set.lookup(m1)); - Expect.identical(null, set.lookup(m3)); -} - -void main() { - testSet(() => new Set(), (m) => new Set.from(m)); - testSet(() => new HashSet(), (m) => new HashSet.from(m)); - testSet(() => new LinkedHashSet(), (m) => new LinkedHashSet.from(m)); - testIdentitySet(() => new Set.identity()); - testIdentitySet(() => new HashSet.identity()); - testIdentitySet(() => new LinkedHashSet.identity()); - testIdentitySet(() => new HashSet( - equals: (x, y) => identical(x, y), hashCode: (x) => identityHashCode(x))); - testIdentitySet(() => new LinkedHashSet( - equals: (x, y) => identical(x, y), hashCode: (x) => identityHashCode(x))); -} - -class BadHashCode { - static int idCounter = 0; - final int id; - BadHashCode() : id = idCounter++; - int get hashCode => 42; - // operator == is identity. - // Can't make a bad compareTo that isn't invalid. - int compareTo(BadHashCode other) => id - other.id; -} - -class Mutable { - int id; - Mutable(this.id); - int get hashCode => id; - bool operator ==(other) => other is Mutable && id == other.id; -} diff --git a/tests/corelib_2/hash_set_type_check_test.dart b/tests/corelib_2/hash_set_type_check_test.dart deleted file mode 100644 index 1b394090e67..00000000000 --- a/tests/corelib_2/hash_set_type_check_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2015, 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 - -// Tests of hash set type checking. - -library hash_set_type_check_test; - -import "package:expect/expect.dart"; -import 'dart:collection'; - -// TODO: all this test does now is verify that lookup takes a non-T -// should merge this with `hash_test_test`. -testSet(Set newSet()) { - Set s = newSet(); - Expect.isNull(s.lookup(1)); -} - -void main() { - testSet(() => new Set()); - testSet(() => new HashSet()); - testSet(() => new LinkedHashSet()); - testSet(() => new Set.identity()); - testSet(() => new HashSet.identity()); - testSet(() => new LinkedHashSet.identity()); - testSet(() => new HashSet( - equals: (x, y) => identical(x, y), hashCode: (x) => identityHashCode(x))); - testSet(() => new LinkedHashSet( - equals: (x, y) => identical(x, y), hashCode: (x) => identityHashCode(x))); -} diff --git a/tests/corelib_2/hashcode_boxed_test.dart b/tests/corelib_2/hashcode_boxed_test.dart deleted file mode 100644 index b4b52c8865f..00000000000 --- a/tests/corelib_2/hashcode_boxed_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -double fib(double n) { - return n <= 1.0 ? 1.0 : fib(n - 1) + fib(n - 2); -} - -main() { - // Compute the same value in a way that won't be optimized away so the results - // are different objects in memory. - var a = fib(5.0) + 1.0; - var b = fib(4.0) + 4.0; - - Expect.isTrue(identical(a, b)); - Expect.equals(identityHashCode(a), identityHashCode(b)); - Expect.equals(a, b); - Expect.equals(a.hashCode, b.hashCode); -} diff --git a/tests/corelib_2/hashcode_test.dart b/tests/corelib_2/hashcode_test.dart deleted file mode 100644 index b818ae13dcc..00000000000 --- a/tests/corelib_2/hashcode_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class Override { - int hash; - int get superHash => super.hashCode; - int get hashCode => hash; - - int foo() => hash; // Just some function that can be closurized. - - bool operator ==(Object other) => other is Override && other.hash == hash; -} - -int bar() => 42; // Some global function. - -main() { - var o = new Object(); - var hash = o.hashCode; - // Doesn't change. - Expect.equals(hash, o.hashCode); - Expect.equals(hash, identityHashCode(o)); - - var c = new Override(); - int identityHash = c.superHash; - hash = (identityHash == 42) ? 37 : 42; - c.hash = hash; - Expect.equals(hash, c.hashCode); - Expect.equals(identityHash, identityHashCode(c)); - - // These classes don't override hashCode. - var samples = [0, 0x10000000, 1.5, -0, null, true, false, const Object()]; - for (var v in samples) { - print(v); - Expect.equals(v.hashCode, identityHashCode(v)); - } - // These do, or might do, but we can still use hashCodeOf and get the same - // result each time. - samples = ["string", "", (x) => 42, c.foo, bar]; - for (var v in samples) { - print(v); - Expect.equals(v.hashCode, v.hashCode); - Expect.equals(identityHashCode(v), identityHashCode(v)); - } -} diff --git a/tests/corelib_2/hidden_library2_test.dart b/tests/corelib_2/hidden_library2_test.dart deleted file mode 100644 index 68770c7d291..00000000000 --- a/tests/corelib_2/hidden_library2_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that the internal hidden library doesn't make problems with taking -// stack-traces. - -main() { - print(['x'].where((_) { - // We actually don't really care for the successful case. We just want to - // make sure that the test doesn't crash when it is negative. - throw 'fisk'; // //# 01: runtime error - return true; - }).toList()); -} diff --git a/tests/corelib_2/int_ceil_test.dart b/tests/corelib_2/int_ceil_test.dart deleted file mode 100644 index b42d2809d6a..00000000000 --- a/tests/corelib_2/int_ceil_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - const int big = 0x123456789AB0000 + 0xCDEF; // Slightly rounded on web. - - Expect.equals(0, 0.ceil()); - Expect.equals(1, 1.ceil()); - Expect.equals(0x1234, 0x1234.ceil()); - Expect.equals(0x12345678, 0x12345678.ceil()); - Expect.equals(0x123456789AB, 0x123456789AB.ceil()); - Expect.equals(big, big.ceil()); - Expect.equals(-1, (-1).ceil()); - Expect.equals(-0x1234, (-0x1234).ceil()); - Expect.equals(-0x12345678, (-0x12345678).ceil()); - Expect.equals(-0x123456789AB, (-0x123456789AB).ceil()); - Expect.equals(-big, (-big).ceil()); - - Expect.isTrue(0.ceil() is int); - Expect.isTrue(1.ceil() is int); - Expect.isTrue(0x1234.ceil() is int); - Expect.isTrue(0x12345678.ceil() is int); - Expect.isTrue(0x123456789AB.ceil() is int); - Expect.isTrue(big.ceil() is int); - Expect.isTrue((-1).ceil() is int); - Expect.isTrue((-0x1234).ceil() is int); - Expect.isTrue((-0x12345678).ceil() is int); - Expect.isTrue((-0x123456789AB).ceil() is int); - Expect.isTrue((-big).ceil() is int); -} diff --git a/tests/corelib_2/int_ceil_to_double_test.dart b/tests/corelib_2/int_ceil_to_double_test.dart deleted file mode 100644 index 1c189b6ac53..00000000000 --- a/tests/corelib_2/int_ceil_to_double_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - const int big = 0x123456789AB0000 + 0xCDEF; // Slightly rounded on web. - - Expect.equals(0.0, 0.ceilToDouble()); - Expect.equals(1.0, 1.ceilToDouble()); - Expect.equals(0x1234, 0x1234.ceilToDouble()); - Expect.equals(0x12345678, 0x12345678.ceilToDouble()); - Expect.equals(0x123456789AB, 0x123456789AB.ceilToDouble()); - Expect.equals(81985529216486900.0, big.ceilToDouble()); - Expect.equals(-1.0, (-1).ceilToDouble()); - Expect.equals(-0x1234, (-0x1234).ceilToDouble()); - Expect.equals(-0x12345678, (-0x12345678).ceilToDouble()); - Expect.equals(-0x123456789AB, (-0x123456789AB).ceilToDouble()); - Expect.equals(-81985529216486900.0, (-big).ceilToDouble()); - - Expect.isTrue(0.ceilToDouble() is double); - Expect.isTrue(1.ceilToDouble() is double); - Expect.isTrue(0x1234.ceilToDouble() is double); - Expect.isTrue(0x12345678.ceilToDouble() is double); - Expect.isTrue(0x123456789AB.ceilToDouble() is double); - Expect.isTrue(big.ceilToDouble() is double); - Expect.isTrue((-1).ceilToDouble() is double); - Expect.isTrue((-0x1234).ceilToDouble() is double); - Expect.isTrue((-0x12345678).ceilToDouble() is double); - Expect.isTrue((-0x123456789AB).ceilToDouble() is double); - Expect.isTrue((-big).ceilToDouble() is double); -} diff --git a/tests/corelib_2/int_floor_test.dart b/tests/corelib_2/int_floor_test.dart deleted file mode 100644 index ca00b9cb037..00000000000 --- a/tests/corelib_2/int_floor_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - const int big = 0x123456789AB0000 + 0xCDEF; // Slightly rounded on web. - - Expect.equals(0, 0.floor()); - Expect.equals(1, 1.floor()); - Expect.equals(0x1234, 0x1234.floor()); - Expect.equals(0x12345678, 0x12345678.floor()); - Expect.equals(0x123456789AB, 0x123456789AB.floor()); - Expect.equals(big, big.floor()); - Expect.equals(-1, (-1).floor()); - Expect.equals(-0x1234, (-0x1234).floor()); - Expect.equals(-0x12345678, (-0x12345678).floor()); - Expect.equals(-0x123456789AB, (-0x123456789AB).floor()); - Expect.equals(-big, (-big).floor()); - - Expect.isTrue(0.floor() is int); - Expect.isTrue(1.floor() is int); - Expect.isTrue(0x1234.floor() is int); - Expect.isTrue(0x12345678.floor() is int); - Expect.isTrue(0x123456789AB.floor() is int); - Expect.isTrue(big.floor() is int); - Expect.isTrue((-1).floor() is int); - Expect.isTrue((-0x1234).floor() is int); - Expect.isTrue((-0x12345678).floor() is int); - Expect.isTrue((-0x123456789AB).floor() is int); - Expect.isTrue((-big).floor() is int); -} diff --git a/tests/corelib_2/int_floor_to_double_test.dart b/tests/corelib_2/int_floor_to_double_test.dart deleted file mode 100644 index 27f797a3008..00000000000 --- a/tests/corelib_2/int_floor_to_double_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - const int big = 0x123456789AB0000 + 0xCDEF; // Slightly rounded on web. - - Expect.equals(0.0, 0.floorToDouble()); - Expect.equals(1.0, 1.floorToDouble()); - Expect.equals(0x1234, 0x1234.floorToDouble()); - Expect.equals(0x12345678, 0x12345678.floorToDouble()); - Expect.equals(0x123456789AB, 0x123456789AB.floorToDouble()); - Expect.equals(81985529216486900.0, big.floorToDouble()); - Expect.equals(-1.0, (-1).floorToDouble()); - Expect.equals(-0x1234, (-0x1234).floorToDouble()); - Expect.equals(-0x12345678, (-0x12345678).floorToDouble()); - Expect.equals(-0x123456789AB, (-0x123456789AB).floorToDouble()); - Expect.equals(-81985529216486900.0, (-big).floorToDouble()); - - Expect.isTrue(0.floorToDouble() is double); - Expect.isTrue(1.floorToDouble() is double); - Expect.isTrue(0x1234.floorToDouble() is double); - Expect.isTrue(0x12345678.floorToDouble() is double); - Expect.isTrue(0x123456789AB.floorToDouble() is double); - Expect.isTrue(big.floorToDouble() is double); - Expect.isTrue((-1).floorToDouble() is double); - Expect.isTrue((-0x1234).floorToDouble() is double); - Expect.isTrue((-0x12345678).floorToDouble() is double); - Expect.isTrue((-0x123456789AB).floorToDouble() is double); - Expect.isTrue((-big).floorToDouble() is double); -} diff --git a/tests/corelib_2/int_from_environment2_test.dart b/tests/corelib_2/int_from_environment2_test.dart deleted file mode 100644 index 5284b222a31..00000000000 --- a/tests/corelib_2/int_from_environment2_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2013, 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. -// SharedOptions=-Da=x -Db=- -Dc=0xg -Dd=+ -Dd= - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - Expect.equals(0, const int.fromEnvironment('a')); - Expect.equals(0, const int.fromEnvironment('b')); - Expect.equals(0, const int.fromEnvironment('c')); - Expect.equals(0, const int.fromEnvironment('d')); - Expect.equals(0, const int.fromEnvironment('e')); -} diff --git a/tests/corelib_2/int_from_environment_int64_test.dart b/tests/corelib_2/int_from_environment_int64_test.dart deleted file mode 100644 index a00fd8c34be..00000000000 --- a/tests/corelib_2/int_from_environment_int64_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2013, 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. -// SharedOptions=-Df=-9223372036854775808 -Dg=9223372036854775807 - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - Expect.equals(-9223372036854775808, const int.fromEnvironment('f')); - Expect.equals(9223372036854775807, const int.fromEnvironment('g')); -} diff --git a/tests/corelib_2/int_from_environment_test.dart b/tests/corelib_2/int_from_environment_test.dart deleted file mode 100644 index 77f6d6a8893..00000000000 --- a/tests/corelib_2/int_from_environment_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2013, 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. -// SharedOptions=-Da=1 -Db=-12 -Dc=0x123 -Dd=-0x1234 -De=+0x112296 -Df=-9007199254740991 -Dg=9007199254740991 -Dh=-0x8000000000000000 -Di=0x8000000000000000 -Dj=0xDEADBEEFCAFE0000 - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - Expect.equals(1, const int.fromEnvironment('a')); - Expect.equals(-12, const int.fromEnvironment('b')); - Expect.equals(0x123, const int.fromEnvironment('c')); - Expect.equals(-0x1234, const int.fromEnvironment('d')); - Expect.equals(0x112296, const int.fromEnvironment('e')); - Expect.equals(-9007199254740991, const int.fromEnvironment('f')); - Expect.equals(9007199254740991, const int.fromEnvironment('g')); - Expect.equals(-0x8000000000000000, const int.fromEnvironment('h')); - Expect.equals(0x8000000000000000, const int.fromEnvironment('i')); - Expect.equals(0xDEADBEEFCAFE0000, const int.fromEnvironment('j')); -} diff --git a/tests/corelib_2/int_modpow_hard_test.dart b/tests/corelib_2/int_modpow_hard_test.dart deleted file mode 100644 index 1a6a011565f..00000000000 --- a/tests/corelib_2/int_modpow_hard_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Extreme values from int_modulo_arith_test. Test cases that have -// intermediate values that overflow the precision of 'int'. - -import "package:expect/expect.dart"; - -import "dart:math" show pow; - -main() { - test(x, e, m, expectedResult) { - var result = x.modPow(e, m); - Expect.equals(expectedResult, result, "$x.modPow($e, $m)"); - } - - for (int mBase in [ - 50000000, - 94906266, // Smallest integer with square over 2^53. - 100000000, - 1000000000, - 3037000500, // Smallest integer with square over 2^63. - 4000000000, - 0x7FFFFFFFFFFFF000 + 0xFFC - ]) { - // On 'web' platforms skip values outside web number safe range. - if (mBase == mBase + 1) continue; - - for (int mAdjustment in [0, 1, 2, 3, -1]) { - int m = mBase + mAdjustment; - for (int e = 1; e < 100; e++) { - // Test "M-k ^ N mod M == (-k) ^ N mod M" for some small values of k. - test(m - 1, e, m, pow(-1, e) % m); - if (e < 53) { - test(m - 2, e, m, pow(-2, e) % m); - } - if (e < 33) { - test(m - 3, e, m, pow(-3, e) % m); - } - if (e < 26) { - test(m - 4, e, m, pow(-4, e) % m); - } - } - } - } -} diff --git a/tests/corelib_2/int_modulo_arith_test.dart b/tests/corelib_2/int_modulo_arith_test.dart deleted file mode 100644 index ffaa981a6a2..00000000000 --- a/tests/corelib_2/int_modulo_arith_test.dart +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -import "dart:math" show pow; - -var smallNumber = 1234567890; // is 31-bit integer. -var mediumNumber = 1234567890123456; // is 53-bit integer - -testModPow() { - test(x, e, m, expectedResult) { - // Check that expected result is correct, using an unoptimized version. - assert(() { - if (1 is double) return true; // Don't have bignums. - slowModPow(x, e, m) { - var r = 1; - while (e > 0) { - if (e.isOdd) r = (r * x) % m; - e >>= 1; - x = (x * x) % m; - } - return r; - } - - return slowModPow(x, e, m) == expectedResult; - }()); - var result = x.modPow(e, m); - Expect.equals(expectedResult, result, "$x.modPow($e, $m)"); - } - - test(10, 20, 1, 0); - test(1234567890, 1000000001, 19, 11); - test(1234567890, 19, 1000000001, 122998977); - test(19, 1234567890, 1000000001, 619059596); - test(19, 1000000001, 1234567890, 84910879); - test(1000000001, 19, 1234567890, 872984351); - test(1000000001, 1234567890, 19, 0); -} - -testModInverse() { - test(x, m, expectedResult) { - //print("$x op $m == $expectedResult"); - // Check that expectedResult is an inverse. - assert(expectedResult < m); - // The 1 % m handles the m = 1 special case. - // This test may overflow if we don't have bignums, so only run on VM. - assert(1 is double || (((x % m) * expectedResult) - 1) % m == 0); - - var result = x.modInverse(m); - Expect.equals(expectedResult, result, "$x modinv $m"); - - if (x > m) { - x = x % m; - var result = x.modInverse(m); - Expect.equals(expectedResult, result, "$x modinv $m"); - } - } - - testThrows(x, m) { - // Throws if not co-prime, which is a symmetric property. - Expect.throws(() => x.modInverse(m), null, "$x modinv $m"); - Expect.throws(() => m.modInverse(x), null, "$m modinv $x"); - } - - test(1, 1, 0); - - testThrows(0, 1000000001); - testThrows(2, 4); - testThrows(99, 9); - testThrows(19, 1000000001); - - // Co-prime numbers - test(1234567890, 19, 11); - test(1234567890, 1000000001, 189108911); - test(19, 1234567890, 519818059); - test(1000000001, 1234567890, 1001100101); - - test(12345, 12346, 12345); - test(12345, 12346, 12345); - - test(smallNumber, 137, 42); - test(137, smallNumber, 856087223); - test(mediumNumber, 137, 77); - test(137, mediumNumber, 540686667207353); -} - -testGcd() { - // Call testFunc with all combinations and orders of plus/minus - // value and other. - callCombos(value, other, testFunc) { - testFunc(value, other); - testFunc(value, -other); - testFunc(-value, other); - testFunc(-value, -other); - if (value == other) return; - testFunc(other, value); - testFunc(other, -value); - testFunc(-other, value); - testFunc(-other, -value); - } - - // Test that gcd of value and other (non-negative) is expectedResult. - // Tests all combinations of positive and negative values and order of - // operands, so use positive values and order is not important. - test(value, other, expectedResult) { - // Check for bug in test. - assert(expectedResult == 0 || value % expectedResult == 0); - assert(expectedResult == 0 || other % expectedResult == 0); - callCombos(value, other, (a, b) { - var result = a.gcd(b); - - /// Check that the result is a divisor. - Expect.equals(0, result == 0 ? a : a % result, "$result | $a"); - Expect.equals(0, result == 0 ? b : b % result, "$result | $b"); - // Check for bug in test. If assert fails, the expected value is too low, - // and the gcd call has found a greater common divisor. - assert(result >= expectedResult); - Expect.equals(expectedResult, result, "$a.gcd($b)"); - }); - } - - // Test that gcd of value and other (non-negative) throws. - testThrows(value, other) { - callCombos(value, other, (a, b) { - Expect.throws(() => a.gcd(b), null, "$a.gcd($b)"); - }); - } - - testThrows(2.5, 5); // Not a method on double. - testThrows(5, 2.5); // Not accepting non-int arguments. - - // Format: - // test(value1, value2, expectedResult); - test(1, 1, 1); // both are 1 - test(1, 2, 1); // one is 1 - test(3, 5, 1); // coprime. - test(37, 37, 37); // Same larger prime. - - test(9999, 7272, 909); // Larger numbers - - test(0, 1000, 1000); // One operand is zero. - test(0, 0, 0); // Both operands are zero. - - // Multiplying both operands by a number multiplies result by same number. - test(693, 609, 21); - test(693 << 5, 609 << 5, 21 << 5); - test(693 * 937, 609 * 937, 21 * 937); - test(693 * pow(2, 32), 609 * pow(2, 32), 21 * pow(2, 32)); - test(693 * pow(2, 52), 609 * pow(2, 52), 21 * pow(2, 52)); - test(693 * pow(2, 53), 609 * pow(2, 53), 21 * pow(2, 53)); // Regression. - test(693 * pow(2, 99), 609 * pow(2, 99), 21 * pow(2, 99)); - - test(1234567890, 19, 1); - test(1234567890, 1000000001, 1); - test(19, 1000000001, 19); - - test(0x3FFFFFFF, 0x3FFFFFFF, 0x3FFFFFFF); - test(0x3FFFFFFF, 0x40000000, 1); - - test(pow(2, 54), pow(2, 53), pow(2, 53)); - - test((pow(2, 52) - 1) * pow(2, 10), (pow(2, 26) - 1) * pow(2, 22), - (pow(2, 26) - 1) * pow(2, 10)); -} - -main() { - testModPow(); // //# modPow: ok - testModInverse(); - testGcd(); -} diff --git a/tests/corelib_2/int_parse_radix_int64_test.dart b/tests/corelib_2/int_parse_radix_int64_test.dart deleted file mode 100644 index 2ad942e07c0..00000000000 --- a/tests/corelib_2/int_parse_radix_int64_test.dart +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; -import "dart:math" show pow, log; - -void main() { - const String oneByteWhiteSpace = "\x09\x0a\x0b\x0c\x0d\x20" - "\x85" //# 01: ok - "\xa0"; - const String whiteSpace = "$oneByteWhiteSpace\u1680" - "\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a" - "\u2028\u2029\u202f\u205f\u3000\ufeff"; - - var digits = "0123456789abcdefghijklmnopqrstuvwxyz"; - var zeros = "0" * 64; - - void testParse(int result, String radixString, int radix) { - var m = "$radixString/$radix->$result"; - Expect.equals( - result, int.parse(radixString.toLowerCase(), radix: radix), m); - Expect.equals( - result, int.parse(radixString.toUpperCase(), radix: radix), m); - Expect.equals(result, int.parse(" $radixString", radix: radix), m); - Expect.equals(result, int.parse("$radixString ", radix: radix), m); - Expect.equals(result, int.parse(" $radixString ", radix: radix), m); - Expect.equals(result, int.parse("+$radixString", radix: radix), m); - Expect.equals(result, int.parse(" +$radixString", radix: radix), m); - Expect.equals(result, int.parse("+$radixString ", radix: radix), m); - Expect.equals(result, int.parse(" +$radixString ", radix: radix), m); - Expect.equals(-result, int.parse("-$radixString", radix: radix), m); - Expect.equals(-result, int.parse(" -$radixString", radix: radix), m); - Expect.equals(-result, int.parse("-$radixString ", radix: radix), m); - Expect.equals(-result, int.parse(" -$radixString ", radix: radix), m); - Expect.equals( - result, - int.parse("$oneByteWhiteSpace$radixString$oneByteWhiteSpace", - radix: radix), - m); - Expect.equals( - -result, - int.parse("$oneByteWhiteSpace-$radixString$oneByteWhiteSpace", - radix: radix), - m); - Expect.equals(result, - int.parse("$whiteSpace$radixString$whiteSpace", radix: radix), m); - Expect.equals(-result, - int.parse("$whiteSpace-$radixString$whiteSpace", radix: radix), m); - - Expect.equals(result, int.parse("$zeros$radixString", radix: radix), m); - Expect.equals(result, int.parse("+$zeros$radixString", radix: radix), m); - Expect.equals(-result, int.parse("-$zeros$radixString", radix: radix), m); - } - - final max = 9223372036854775807; - for (int i = 2; i <= 36; i++) { // //# 02: ok - // Test with bignums. // //# 02: continued - final n = (log(max) / log(i)).truncate(); // //# 02: continued - var digit = digits[i - 1]; // //# 02: continued - testParse(pow(i, n) - 1, digit * n, i); // //# 02: continued - testParse(0, zeros, i); // //# 02: continued - } // //# 02: continued - - // Big number. - Expect.equals(9223372036854775807, int.parse("9223372036854775807")); - Expect.equals(-9223372036854775808, int.parse("-9223372036854775808")); -} diff --git a/tests/corelib_2/int_parse_radix_test.dart b/tests/corelib_2/int_parse_radix_test.dart deleted file mode 100644 index 7ed7b2e4202..00000000000 --- a/tests/corelib_2/int_parse_radix_test.dart +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; -import "dart:math" show pow, log; - -void main() { - const String oneByteWhiteSpace = "\x09\x0a\x0b\x0c\x0d\x20" - "\x85" //# 01: ok - "\xa0"; - const String whiteSpace = "$oneByteWhiteSpace\u1680" - "\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a" - "\u2028\u2029\u202f\u205f\u3000\ufeff"; - - var digits = "0123456789abcdefghijklmnopqrstuvwxyz"; - var zeros = "0" * 64; - - for (int i = 0; i < whiteSpace.length; i++) { - var ws = whiteSpace[i]; - Expect.equals(0, int.parse("${ws}0${ws}", radix: 2)); - } - - void testParse(int result, String radixString, int radix) { - var m = "$radixString/$radix->$result"; - Expect.equals( - result, int.parse(radixString.toLowerCase(), radix: radix), m); - Expect.equals( - result, int.parse(radixString.toUpperCase(), radix: radix), m); - Expect.equals(result, int.parse(" $radixString", radix: radix), m); - Expect.equals(result, int.parse("$radixString ", radix: radix), m); - Expect.equals(result, int.parse(" $radixString ", radix: radix), m); - Expect.equals(result, int.parse("+$radixString", radix: radix), m); - Expect.equals(result, int.parse(" +$radixString", radix: radix), m); - Expect.equals(result, int.parse("+$radixString ", radix: radix), m); - Expect.equals(result, int.parse(" +$radixString ", radix: radix), m); - Expect.equals(-result, int.parse("-$radixString", radix: radix), m); - Expect.equals(-result, int.parse(" -$radixString", radix: radix), m); - Expect.equals(-result, int.parse("-$radixString ", radix: radix), m); - Expect.equals(-result, int.parse(" -$radixString ", radix: radix), m); - Expect.equals( - result, - int.parse("$oneByteWhiteSpace$radixString$oneByteWhiteSpace", - radix: radix), - m); - Expect.equals( - -result, - int.parse("$oneByteWhiteSpace-$radixString$oneByteWhiteSpace", - radix: radix), - m); - Expect.equals(result, - int.parse("$whiteSpace$radixString$whiteSpace", radix: radix), m); - Expect.equals(-result, - int.parse("$whiteSpace-$radixString$whiteSpace", radix: radix), m); - - Expect.equals(result, int.parse("$zeros$radixString", radix: radix), m); - Expect.equals(result, int.parse("+$zeros$radixString", radix: radix), m); - Expect.equals(-result, int.parse("-$zeros$radixString", radix: radix), m); - } - - for (int r = 2; r <= 36; r++) { - for (int i = 0; i <= r * r; i++) { - String radixString = i.toRadixString(r); - testParse(i, radixString, r); - } - } - - final max = 0x1FFFFFFFFFFFFF; - for (int i = 2; i <= 36; i++) { // //# 02: ok - // Test with bignums. // //# 02: continued - final n = (log(max) / log(i)).truncate(); // //# 02: continued - var digit = digits[i - 1]; // //# 02: continued - testParse(pow(i, n) - 1, digit * n, i); // //# 02: continued - testParse(0, zeros, i); // //# 02: continued - } // //# 02: continued - - // Allow both upper- and lower-case letters. - Expect.equals(0xABCD, int.parse("ABCD", radix: 16)); - Expect.equals(0xABCD, int.parse("abcd", radix: 16)); - Expect.equals(15628859, int.parse("09azAZ", radix: 36)); - // Big-ish number. (2^53) - Expect.equals(9007199254740991, int.parse("9007199254740991")); - Expect.equals(-9007199254740991, int.parse("-9007199254740991")); - Expect.equals(-9223372036854775808, int.parse("-9223372036854775808")); - // Allow whitespace before and after the number. - Expect.equals(1, int.parse(" 1", radix: 2)); - Expect.equals(1, int.parse("1 ", radix: 2)); - Expect.equals(1, int.parse(" 1 ", radix: 2)); - Expect.equals(1, int.parse("\n1", radix: 2)); - Expect.equals(1, int.parse("1\n", radix: 2)); - Expect.equals(1, int.parse("\n1\n", radix: 2)); - Expect.equals(1, int.parse("+1", radix: 2)); - - void testFails(String source, int radix) { - Expect.throwsFormatException( - () => int.parse(source, radix: radix), "$source/$radix"); - Expect.equals(-999, int.tryParse(source, radix: radix) ?? -999); - } - - for (int i = 2; i < 36; i++) { - var char = i.toRadixString(36); - testFails(char.toLowerCase(), i); - testFails(char.toUpperCase(), i); - } - testFails("", 2); - testFails("+ 1", 2); // No space between sign and digits. - testFails("- 1", 2); // No space between sign and digits. - testFails("0x", null); - for (int i = 2; i <= 33; i++) { - // No 0x specially allowed. - // At radix 34 and above, "x" is a valid digit. - testFails("0x10", i); - } - - testBadArguments(String source, int radix) { - // If the types match, it should be an ArgumentError of some sort. - Expect.throwsArgumentError( - () => int.parse(source, radix: radix)); - } - - testBadArguments("0", -1); - testBadArguments("0", 0); - testBadArguments("0", 1); - testBadArguments("0", 37); - - // See also int_parse_radix_bad_handler_test.dart -} diff --git a/tests/corelib_2/int_parse_with_limited_ints_test.dart b/tests/corelib_2/int_parse_with_limited_ints_test.dart deleted file mode 100644 index 3cd9528ce1b..00000000000 --- a/tests/corelib_2/int_parse_with_limited_ints_test.dart +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2017, 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 - -// Test for int.parse with limited 64-bit integers. - -import "package:expect/expect.dart"; - -main() { - Expect.equals(0, int.parse("0")); - Expect.equals(1, int.parse("1")); - Expect.equals(-1, int.parse("-1")); - - Expect.equals(0x7ffffffffffffffe, int.parse("0x7ffffffffffffffe")); - Expect.equals(0x7fffffffffffffff, int.parse("0x7fffffffffffffff")); - Expect.equals(-0x7fffffffffffffff, int.parse("-0x7fffffffffffffff")); - Expect.equals(-0x7fffffffffffffff - 1, int.parse("-0x8000000000000000")); - Expect.equals(1 << 63, int.parse("0x8000000000000000")); - - Expect.equals(8999999999999999999, int.parse("8999999999999999999")); - Expect.equals(-8999999999999999999, int.parse("-8999999999999999999")); - Expect.equals(9223372036854775807, int.parse("9223372036854775807")); - Expect.equals(-9223372036854775807, int.parse("-9223372036854775807")); - Expect.equals(-9223372036854775807 - 1, int.parse("-9223372036854775808")); - - Expect.throws(() => int.parse("-0x8000000000000001")); - Expect.throws(() => int.parse("9223372036854775808")); - Expect.throws(() => int.parse("9223372036854775809")); - Expect.throws(() => int.parse("-9223372036854775809")); - Expect.throws(() => int.parse("10000000000000000000")); - - Expect.equals( - 0x7fffffffffffffff, - int.parse( - "111111111111111111111111111111111111111111111111111111111111111", - radix: 2)); - Expect.equals( - -0x7fffffffffffffff, - int.parse( - "-111111111111111111111111111111111111111111111111111111111111111", - radix: 2)); - Expect.equals( - -0x7fffffffffffffff - 1, - int.parse( - "-1000000000000000000000000000000000000000000000000000000000000000", - radix: 2)); - - Expect.throws(() => int.parse( - "1000000000000000000000000000000000000000000000000000000000000000", - radix: 2)); - Expect.throws(() => int.parse( - "1111111111111111111111111111111111111111111111111111111111111110", - radix: 2)); - Expect.throws(() => int.parse( - "1111111111111111111111111111111111111111111111111111111111111111", - radix: 2)); - Expect.throws(() => int.parse( - "-1000000000000000000000000000000000000000000000000000000000000001", - radix: 2)); -} diff --git a/tests/corelib_2/int_round_test.dart b/tests/corelib_2/int_round_test.dart deleted file mode 100644 index 8b3b25885ef..00000000000 --- a/tests/corelib_2/int_round_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - const int big = 0x123456789AB0000 + 0xCDEF; // truncating arithmetic on web. - - Expect.equals(0, 0.round()); - Expect.equals(1, 1.round()); - Expect.equals(0x1234, 0x1234.round()); - Expect.equals(0x12345678, 0x12345678.round()); - Expect.equals(0x123456789AB, 0x123456789AB.round()); - Expect.equals(big, big.round()); - Expect.equals(-1, (-1).round()); - Expect.equals(-0x1234, (-0x1234).round()); - Expect.equals(-0x12345678, (-0x12345678).round()); - Expect.equals(-0x123456789AB, (-0x123456789AB).round()); - Expect.equals(-big, (-big).round()); - - Expect.isTrue(0.round() is int); - Expect.isTrue(1.round() is int); - Expect.isTrue(0x1234.round() is int); - Expect.isTrue(0x12345678.round() is int); - Expect.isTrue(0x123456789AB.round() is int); - Expect.isTrue(big.round() is int); - Expect.isTrue((-1).round() is int); - Expect.isTrue((-0x1234).round() is int); - Expect.isTrue((-0x12345678).round() is int); - Expect.isTrue((-0x123456789AB).round() is int); - Expect.isTrue((-big).round() is int); -} diff --git a/tests/corelib_2/int_round_to_double_test.dart b/tests/corelib_2/int_round_to_double_test.dart deleted file mode 100644 index a6b0fd997d6..00000000000 --- a/tests/corelib_2/int_round_to_double_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - const int big = 0x123456789AB0000 + 0xCDEF; // Slightly rounded on web. - - Expect.equals(0.0, 0.roundToDouble()); - Expect.equals(1.0, 1.roundToDouble()); - Expect.equals(0x1234, 0x1234.roundToDouble()); - Expect.equals(0x12345678, 0x12345678.roundToDouble()); - Expect.equals(0x123456789AB, 0x123456789AB.roundToDouble()); - Expect.equals(81985529216486900.0, big.roundToDouble()); - Expect.equals(-1.0, (-1).roundToDouble()); - Expect.equals(-0x1234, (-0x1234).roundToDouble()); - Expect.equals(-0x12345678, (-0x12345678).roundToDouble()); - Expect.equals(-0x123456789AB, (-0x123456789AB).roundToDouble()); - Expect.equals(-81985529216486900.0, (-big).roundToDouble()); - - Expect.isTrue(0.roundToDouble() is double); - Expect.isTrue(1.roundToDouble() is double); - Expect.isTrue(0x1234.roundToDouble() is double); - Expect.isTrue(0x12345678.roundToDouble() is double); - Expect.isTrue(0x123456789AB.roundToDouble() is double); - Expect.isTrue(big.roundToDouble() is double); - Expect.isTrue((-1).roundToDouble() is double); - Expect.isTrue((-0x1234).roundToDouble() is double); - Expect.isTrue((-0x12345678).roundToDouble() is double); - Expect.isTrue((-0x123456789AB).roundToDouble() is double); - Expect.isTrue((-big).roundToDouble() is double); -} diff --git a/tests/corelib_2/int_to_int_test.dart b/tests/corelib_2/int_to_int_test.dart deleted file mode 100644 index ff0cbf2cb0f..00000000000 --- a/tests/corelib_2/int_to_int_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - const int big = 0x123456789AB0000 + 0xCDEF; // Slightly rounded on web. - - Expect.equals(0, 0.toInt()); - Expect.equals(1, 1.toInt()); - Expect.equals(0x1234, 0x1234.toInt()); - Expect.equals(0x12345678, 0x12345678.toInt()); - Expect.equals(0x123456789AB, 0x123456789AB.toInt()); - Expect.equals(big, big.toInt()); - Expect.equals(-1, (-1).toInt()); - Expect.equals(-0x1234, (-0x1234).toInt()); - Expect.equals(-0x12345678, (-0x12345678).toInt()); - Expect.equals(-0x123456789AB, (-0x123456789AB).toInt()); - Expect.equals(-big, (-big).toInt()); - - Expect.isTrue(0.toInt() is int); - Expect.isTrue(1.toInt() is int); - Expect.isTrue(0x1234.toInt() is int); - Expect.isTrue(0x12345678.toInt() is int); - Expect.isTrue(0x123456789AB.toInt() is int); - Expect.isTrue(big.toInt() is int); - Expect.isTrue((-1).toInt() is int); - Expect.isTrue((-0x1234).toInt() is int); - Expect.isTrue((-0x12345678).toInt() is int); - Expect.isTrue((-0x123456789AB).toInt() is int); - Expect.isTrue((-big).toInt() is int); -} diff --git a/tests/corelib_2/int_truncate_test.dart b/tests/corelib_2/int_truncate_test.dart deleted file mode 100644 index 02eb2e7d892..00000000000 --- a/tests/corelib_2/int_truncate_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - const int big = 0x123456789AB0000 + 0xCDEF; // Slightly rounded on web. - - Expect.equals(0, 0.truncate()); - Expect.equals(1, 1.truncate()); - Expect.equals(0x1234, 0x1234.truncate()); - Expect.equals(0x12345678, 0x12345678.truncate()); - Expect.equals(0x123456789AB, 0x123456789AB.truncate()); - Expect.equals(big, big.truncate()); - Expect.equals(-1, (-1).truncate()); - Expect.equals(-0x1234, (-0x1234).truncate()); - Expect.equals(-0x12345678, (-0x12345678).truncate()); - Expect.equals(-0x123456789AB, (-0x123456789AB).truncate()); - Expect.equals(-big, (-big).truncate()); - - Expect.isTrue(0.truncate() is int); - Expect.isTrue(1.truncate() is int); - Expect.isTrue(0x1234.truncate() is int); - Expect.isTrue(0x12345678.truncate() is int); - Expect.isTrue(0x123456789AB.truncate() is int); - Expect.isTrue(big.truncate() is int); - Expect.isTrue((-1).truncate() is int); - Expect.isTrue((-0x1234).truncate() is int); - Expect.isTrue((-0x12345678).truncate() is int); - Expect.isTrue((-0x123456789AB).truncate() is int); - Expect.isTrue((-big).truncate() is int); -} diff --git a/tests/corelib_2/int_truncate_to_double_test.dart b/tests/corelib_2/int_truncate_to_double_test.dart deleted file mode 100644 index ef3f104a173..00000000000 --- a/tests/corelib_2/int_truncate_to_double_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - const int big = 0x123456789AB0000 + 0xCDEF; // Slightly rounded on web. - - Expect.equals(0.0, 0.truncateToDouble()); - Expect.equals(1.0, 1.truncateToDouble()); - Expect.equals(0x1234, 0x1234.truncateToDouble()); - Expect.equals(0x12345678, 0x12345678.truncateToDouble()); - Expect.equals(0x123456789AB, 0x123456789AB.truncateToDouble()); - Expect.equals(81985529216486900.0, big.truncateToDouble()); - Expect.equals(-1.0, (-1).truncateToDouble()); - Expect.equals(-0x1234, (-0x1234).truncateToDouble()); - Expect.equals(-0x12345678, (-0x12345678).truncateToDouble()); - Expect.equals(-0x123456789AB, (-0x123456789AB).truncateToDouble()); - Expect.equals(-81985529216486900.0, (-big).truncateToDouble()); - - Expect.isTrue(0.truncateToDouble() is double); - Expect.isTrue(1.truncateToDouble() is double); - Expect.isTrue(0x1234.truncateToDouble() is double); - Expect.isTrue(0x12345678.truncateToDouble() is double); - Expect.isTrue(0x123456789AB.truncateToDouble() is double); - Expect.isTrue(big.truncateToDouble() is double); - Expect.isTrue((-1).truncateToDouble() is double); - Expect.isTrue((-0x1234).truncateToDouble() is double); - Expect.isTrue((-0x12345678).truncateToDouble() is double); - Expect.isTrue((-0x123456789AB).truncateToDouble() is double); - Expect.isTrue((-big).truncateToDouble() is double); -} diff --git a/tests/corelib_2/int_try_parse_int64_test.dart b/tests/corelib_2/int_try_parse_int64_test.dart deleted file mode 100644 index f90794ba25b..00000000000 --- a/tests/corelib_2/int_try_parse_int64_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; -import "dart:math" show pow, log; - -void main() { - // Big numbers (representable as both Int64 and double). - Expect.equals(9223372036854774784, int.tryParse("9223372036854774784")); - Expect.equals(-9223372036854775808, int.tryParse("-9223372036854775808")); -} diff --git a/tests/corelib_2/int_try_parse_test.dart b/tests/corelib_2/int_try_parse_test.dart deleted file mode 100644 index 0705314b3f0..00000000000 --- a/tests/corelib_2/int_try_parse_test.dart +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; -import "dart:math" show pow, log; - -void main() { - const String oneByteWhiteSpace = "\x09\x0a\x0b\x0c\x0d\x20\xa0"; - const String whiteSpace = "$oneByteWhiteSpace\u1680" - "\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a" - "\u2028\u2029\u202f\u205f\u3000\ufeff"; - - var digits = "0123456789abcdefghijklmnopqrstuvwxyz"; - var zeros = "0" * 64; - - for (int i = 0; i < whiteSpace.length; i++) { - var ws = whiteSpace[i]; - Expect.equals(0, int.parse("${ws}0${ws}", radix: 2)); - } - - void testParse(int result, String radixString, int radix) { - var m = "$radixString/$radix->$result"; - Expect.equals( - result, int.tryParse(radixString.toLowerCase(), radix: radix), m); - Expect.equals( - result, int.tryParse(radixString.toUpperCase(), radix: radix), m); - Expect.equals(result, int.tryParse(" $radixString", radix: radix), m); - Expect.equals(result, int.tryParse("$radixString ", radix: radix), m); - Expect.equals(result, int.tryParse(" $radixString ", radix: radix), m); - Expect.equals(result, int.tryParse("+$radixString", radix: radix), m); - Expect.equals(result, int.tryParse(" +$radixString", radix: radix), m); - Expect.equals(result, int.tryParse("+$radixString ", radix: radix), m); - Expect.equals(result, int.tryParse(" +$radixString ", radix: radix), m); - Expect.equals(-result, int.tryParse("-$radixString", radix: radix), m); - Expect.equals(-result, int.tryParse(" -$radixString", radix: radix), m); - Expect.equals(-result, int.tryParse("-$radixString ", radix: radix), m); - Expect.equals(-result, int.tryParse(" -$radixString ", radix: radix), m); - Expect.equals( - result, - int.tryParse("$oneByteWhiteSpace$radixString$oneByteWhiteSpace", - radix: radix), - m); - Expect.equals( - -result, - int.tryParse("$oneByteWhiteSpace-$radixString$oneByteWhiteSpace", - radix: radix), - m); - Expect.equals(result, - int.tryParse("$whiteSpace$radixString$whiteSpace", radix: radix), m); - Expect.equals(-result, - int.tryParse("$whiteSpace-$radixString$whiteSpace", radix: radix), m); - - Expect.equals(result, int.tryParse("$zeros$radixString", radix: radix), m); - Expect.equals(result, int.tryParse("+$zeros$radixString", radix: radix), m); - Expect.equals( - -result, int.tryParse("-$zeros$radixString", radix: radix), m); - } - - for (int r = 2; r <= 36; r++) { - for (int i = 0; i <= r * r; i++) { - String radixString = i.toRadixString(r); - testParse(i, radixString, r); - } - for (var v in [ - 0, - 0x10000, - 0x7FFFFFFF, - 0x80000000, - 0xFFFFFFFF, - 0x100000000, - 0x7FFFFFFFFFFFF8, - ]) { - var string = v.toRadixString(r); - Expect.equals(v, int.tryParse(string, radix: r)); - if (v > 0) { - Expect.equals(-v, int.tryParse("-$string", radix: r)); - if (r == 16) { - Expect.equals(v, int.tryParse("0x$string")); - Expect.equals(v, int.tryParse("0X$string")); - } - } - } - } - - // Allow both upper- and lower-case letters. - Expect.equals(0xABCD, int.tryParse("ABCD", radix: 16)); - Expect.equals(0xABCD, int.tryParse("abcd", radix: 16)); - Expect.equals(15628859, int.tryParse("09azAZ", radix: 36)); - // Bigish numbers (representable precisely as both Int64 and double (2^53)). - Expect.equals(9007199254740991, int.tryParse("9007199254740991")); - Expect.equals(-9007199254740991, int.tryParse("-9007199254740991")); - // Allow whitespace before and after the number. - Expect.equals(1, int.tryParse(" 1", radix: 2)); - Expect.equals(1, int.tryParse("1 ", radix: 2)); - Expect.equals(1, int.tryParse(" 1 ", radix: 2)); - Expect.equals(1, int.tryParse("\n1", radix: 2)); - Expect.equals(1, int.tryParse("1\n", radix: 2)); - Expect.equals(1, int.tryParse("\n1\n", radix: 2)); - Expect.equals(1, int.tryParse("+1", radix: 2)); - - void testFails(String source, int radix, [String message]) { - Expect.isNull(int.tryParse(source, radix: radix), message); - } - - for (int i = 2; i < 36; i++) { - var char = i.toRadixString(36); - testFails(char.toLowerCase(), i); - testFails(char.toUpperCase(), i); - } - testFails("", 2); - testFails("+ 1", 2); // No space between sign and digits. - testFails("- 1", 2); // No space between sign and digits. - testFails("0x", null); - for (int i = 2; i <= 33; i++) { - // No 0x specially allowed. - // At radix 34 and above, "x" is a valid digit. - testFails("0x10", i); - } - - int digitX = 33; - Expect.equals(((digitX * 34) + 1) * 34, int.tryParse("0x10", radix: 34)); - Expect.equals(((digitX * 35) + 1) * 35, int.tryParse("0x10", radix: 35)); - - // Radix must be in the range 2 .. 36. - Expect.throwsArgumentError(() => int.tryParse("0", radix: -1)); - Expect.throwsArgumentError(() => int.tryParse("0", radix: 0)); - Expect.throwsArgumentError(() => int.tryParse("0", radix: -1)); - Expect.throwsArgumentError(() => int.tryParse("0", radix: 37)); - - // Regression test for http://dartbug.com/32858 - Expect.equals( - -0x8000000000000000, int.tryParse("-0x8000000000000000"), "-minint"); - - // Tests run only with 64-bit integers. - if (0x8000000000000000 < 0) { - // `int` is 64-bit signed integers. - Expect.equals( - -0x8000000000000000, int.tryParse("0x8000000000000000"), "0xUnsigned"); - Expect.equals(-1, int.tryParse("0xFFFFFFFFFFFFFFFF"), "0xUnsigned2"); - - Expect.equals( - 0x8000000000000000 - 1, int.tryParse("0x7FFFFFFFFFFFFFFF"), "maxint"); - testFails("8000000000000000", 16, "2^63 radix: 16"); - testFails("FFFFFFFFFFFFFFFF", 16, "maxuint64 radix: 16"); - testFails("-0xC000000000000000", null, "signed uint64"); - } -} diff --git a/tests/corelib_2/integer_arith_vm_test.dart b/tests/corelib_2/integer_arith_vm_test.dart deleted file mode 100644 index d0748c128c8..00000000000 --- a/tests/corelib_2/integer_arith_vm_test.dart +++ /dev/null @@ -1,141 +0,0 @@ -// 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 - -// Testing integers with and without intrinsics. -// VMOptions= -// VMOptions=--no_intrinsify -// VMOptions=--optimization_counter_threshold=10 --no-background_compilation - -library integer_arithmetic_test; - -import "package:expect/expect.dart"; - -foo() => 1234567890123456789; - -testSmiOverflow() { - var a = 1073741823; - var b = 1073741822; - Expect.equals(2147483645, a + b); - a = -1000000000; - b = 1000000001; - Expect.equals(-2000000001, a - b); - Expect.equals(-1000000001000000000, a * b); -} - -testModPow() { - var x, e, m; - x = 1234567890; - e = 1000000001; - m = 19; - Expect.equals(11, x.modPow(e, m)); - x = 1234567890; - e = 19; - m = 1000000001; - Expect.equals(122998977, x.modPow(e, m)); - x = 19; - e = 1234567890; - m = 1000000001; - Expect.equals(619059596, x.modPow(e, m)); - x = 19; - e = 1000000001; - m = 1234567890; - Expect.equals(84910879, x.modPow(e, m)); - x = 1000000001; - e = 19; - m = 1234567890; - Expect.equals(872984351, x.modPow(e, m)); - x = 1000000001; - e = 1234567890; - m = 19; - Expect.equals(0, x.modPow(e, m)); -} - -testModInverse() { - var x, m; - x = 1; - m = 1; - Expect.equals(0, x.modInverse(m)); - x = 0; - m = 1000000001; - Expect.throws(() => x.modInverse(m), (e) => e is Exception); // Not coprime. - x = 1234567890; - m = 19; - Expect.equals(11, x.modInverse(m)); - x = 1234567890; - m = 1000000001; - Expect.equals(189108911, x.modInverse(m)); - x = 19; - m = 1000000001; - Expect.throws(() => x.modInverse(m), (e) => e is Exception); // Not coprime. - x = 19; - m = 1234567890; - Expect.equals(519818059, x.modInverse(m)); - x = 1000000001; - m = 1234567890; - Expect.equals(1001100101, x.modInverse(m)); - x = 1000000001; - m = 19; - Expect.throws(() => x.modInverse(m), (e) => e is Exception); // Not coprime. -} - -testGcd() { - var x, m; - x = 1; - m = 1; - Expect.equals(1, x.gcd(m)); - x = 693; - m = 609; - Expect.equals(21, x.gcd(m)); - x = 693 << 40; - m = 609 << 40; - Expect.equals(21 << 40, x.gcd(m)); - x = 609 << 40; - m = 693 << 40; - Expect.equals(21 << 40, x.gcd(m)); - x = 0; - m = 1000000001; - Expect.equals(m, x.gcd(m)); - x = 1000000001; - m = 0; - Expect.equals(x, x.gcd(m)); - x = 0; - m = -1000000001; - Expect.equals(-m, x.gcd(m)); - x = -1000000001; - m = 0; - Expect.equals(-x, x.gcd(m)); - x = 0; - m = 0; - Expect.equals(0, x.gcd(m)); - x = 1234567890; - m = 19; - Expect.equals(1, x.gcd(m)); - x = 1234567890; - m = 1000000001; - Expect.equals(1, x.gcd(m)); - x = 19; - m = 1000000001; - Expect.equals(19, x.gcd(m)); - x = 19; - m = 1234567890; - Expect.equals(1, x.gcd(m)); - x = 1000000001; - m = 1234567890; - Expect.equals(1, x.gcd(m)); - x = 1000000001; - m = 19; - Expect.equals(19, x.gcd(m)); -} - -main() { - for (int i = 0; i < 10; i++) { - Expect.equals(1234567890123456789, foo()); - testSmiOverflow(); - testModPow(); // //# modPow: ok - testModInverse(); - testGcd(); - } -} diff --git a/tests/corelib_2/integer_parsed_arith_vm_test.dart b/tests/corelib_2/integer_parsed_arith_vm_test.dart deleted file mode 100644 index 9e19f0c9735..00000000000 --- a/tests/corelib_2/integer_parsed_arith_vm_test.dart +++ /dev/null @@ -1,473 +0,0 @@ -// 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 - -// Testing integers with and without intrinsics. -// VMOptions= -// VMOptions=--no_intrinsify - -library integer_arithmetic_test; - -import "package:expect/expect.dart"; - -String toHexString(int value) => value >= 0 - ? "0x${value.toRadixString(16)}" - : "-0x${value.toRadixString(16).substring(1)}"; - -addSubParsed(String a, String b, String sum) { - int int_a = int.parse(a); - int int_b = int.parse(b); - int int_sum = int.parse(sum); - int computed_sum = int_a + int_b; - Expect.equals(int_sum, computed_sum); - String str_sum = toHexString(computed_sum); - Expect.equals(sum.toLowerCase(), str_sum); - int computed_difference1 = int_sum - int_a; - Expect.equals(int_b, computed_difference1); - String str_difference1 = toHexString(computed_difference1); - Expect.equals(b.toLowerCase(), str_difference1); - int computed_difference2 = int_sum - int_b; - Expect.equals(int_a, computed_difference2); - String str_difference2 = toHexString(computed_difference2); - Expect.equals(a.toLowerCase(), str_difference2); -} - -testAddSub() { - String zero = "0x0"; - String one = "0x1"; - String minus_one = "-0x1"; - - addSubParsed(zero, zero, zero); - addSubParsed(zero, one, one); - addSubParsed(one, zero, one); - addSubParsed(one, one, "0x2"); - addSubParsed(minus_one, minus_one, "-0x2"); - addSubParsed("0x123", zero, "0x123"); - addSubParsed(zero, "0x123", "0x123"); - addSubParsed("0x123", one, "0x124"); - addSubParsed(one, "0x123", "0x124"); - addSubParsed( - "0xFFFFFFF", - one, // 28 bit overflow. - "0x10000000"); - addSubParsed( - "0xFFFFFFFF", - one, // 32 bit overflow. - "0x100000000"); - addSubParsed( - "0xFFFFFFFFFFFFFF", - one, // 56 bit overflow. - "0x100000000000000"); - addSubParsed( - "0x7FFFFFFFFFFFFFFF", - one, // 64 bit overflow. - "-0x8000000000000000"); - addSubParsed( - minus_one, - one, // 64 bit overflow. - zero); - addSubParsed( - "0x8000000", // 28 bit overflow. - "0x8000000", - "0x10000000"); - addSubParsed( - "0x80000000", // 32 bit overflow. - "0x80000000", - "0x100000000"); - addSubParsed( - "0x80000000000000", // 56 bit overflow. - "0x80000000000000", - "0x100000000000000"); - addSubParsed( - "-0x8000000000000000", // 64 bit overflow. - "-0x8000000000000000", - zero); - - addSubParsed("-0x123", minus_one, "-0x124"); - addSubParsed(minus_one, "-0x123", "-0x124"); - addSubParsed( - "-0xFFFFFFF", - minus_one, // 28 bit overflow. - "-0x10000000"); - addSubParsed( - "-0xFFFFFFFF", - minus_one, // 32 bit overflow. - "-0x100000000"); - addSubParsed( - "-0xFFFFFFFFFFFFFF", - minus_one, // 56 bit overflow. - "-0x100000000000000"); - addSubParsed( - "-0x8000000000000000", - minus_one, // 64 bit overflow. - "0x7FFFFFFFFFFFFFFF"); - addSubParsed( - "-0x8000000", // 28 bit overflow. - "-0x8000000", - "-0x10000000"); - addSubParsed( - "-0x80000000", // 32 bit overflow. - "-0x80000000", - "-0x100000000"); - addSubParsed( - "-0x80000000000000", // 56 bit overflow. - "-0x80000000000000", - "-0x100000000000000"); - addSubParsed( - "-0x8000000000000000", // 64 bit overflow. - "-0x8000000000000000", - "0x0"); - - addSubParsed("0xB", "-0x7", "0x4"); - addSubParsed("-0xB", "-0x7", "-0x12"); - addSubParsed("0xB", "0x7", "0x12"); - addSubParsed("-0xB", "0x7", "-0x4"); - addSubParsed("-0x7", "0xB", "0x4"); - addSubParsed("-0x7", "-0xB", "-0x12"); - addSubParsed("0x7", "0xB", "0x12"); - addSubParsed("0x7", "-0xB", "-0x4"); -} - -shiftLeftParsed(String a, int amount, String result, - {String result_back_shifted}) { - result_back_shifted ??= a; - int int_a = int.parse(a); - int int_result = int.parse(result); - int int_result_back_shifted = int.parse(result_back_shifted); - int shifted = int_a << amount; - Expect.equals(int_result, shifted); - String str_shifted = toHexString(shifted); - Expect.equals(result.toLowerCase(), str_shifted); - int back_shifted = shifted >> amount; - Expect.equals(int_result_back_shifted, back_shifted); - String str_back_shifted = toHexString(back_shifted); - Expect.equals(result_back_shifted.toLowerCase(), str_back_shifted); -} - -testLeftShift() { - String zero = "0x0"; - String one = "0x1"; - String minus_one = "-0x1"; - - shiftLeftParsed(zero, 0, zero); - shiftLeftParsed(one, 0, one); - shiftLeftParsed("0x1234", 0, "0x1234"); - shiftLeftParsed(zero, 100000, zero); - shiftLeftParsed(one, 1, "0x2"); - shiftLeftParsed(one, 28, "0x10000000"); - shiftLeftParsed(one, 32, "0x100000000"); - shiftLeftParsed(one, 64, zero, result_back_shifted: zero); - shiftLeftParsed("0x5", 28, "0x50000000"); - shiftLeftParsed("0x5", 32, "0x500000000"); - shiftLeftParsed("0x5", 56, "0x500000000000000"); - shiftLeftParsed("0x5", 64, zero, result_back_shifted: zero); - shiftLeftParsed("0x5", 128, zero, result_back_shifted: zero); - shiftLeftParsed("0x5", 27, "0x28000000"); - shiftLeftParsed("0x5", 31, "0x280000000"); - shiftLeftParsed("0x5", 55, "0x280000000000000"); - shiftLeftParsed("0x5", 63, "-0x8000000000000000", - result_back_shifted: "-0x1"); - shiftLeftParsed("0x5", 127, zero, result_back_shifted: zero); - shiftLeftParsed("0x8000001", 1, "0x10000002"); - shiftLeftParsed("0x80000001", 1, "0x100000002"); - shiftLeftParsed("0x8000000000000001", 1, "0x2", result_back_shifted: "0x1"); - shiftLeftParsed("0x8000001", 29, "0x100000020000000"); - shiftLeftParsed("0x80000001", 33, "0x200000000", result_back_shifted: "0x1"); - shiftLeftParsed("0x8000000000000001", 65, zero, result_back_shifted: zero); - shiftLeftParsed("0x7fffffffffffffff", 1, "-0x2", result_back_shifted: "-0x1"); - shiftLeftParsed("0x7fffffffffffffff", 29, "-0x20000000", - result_back_shifted: "-0x1"); - shiftLeftParsed(minus_one, 0, minus_one); - shiftLeftParsed("-0x1234", 0, "-0x1234"); - shiftLeftParsed(minus_one, 1, "-0x2"); - shiftLeftParsed(minus_one, 28, "-0x10000000"); - shiftLeftParsed(minus_one, 32, "-0x100000000"); - shiftLeftParsed(minus_one, 64, zero, result_back_shifted: zero); - shiftLeftParsed("-0x5", 28, "-0x50000000"); - shiftLeftParsed("-0x5", 32, "-0x500000000"); - shiftLeftParsed("-0x5", 64, zero, result_back_shifted: zero); - shiftLeftParsed("-0x5", 27, "-0x28000000"); - shiftLeftParsed("-0x5", 31, "-0x280000000"); - shiftLeftParsed("-0x5", 63, "-0x8000000000000000", - result_back_shifted: minus_one); - shiftLeftParsed("-0x8000001", 1, "-0x10000002"); - shiftLeftParsed("-0x80000001", 1, "-0x100000002"); - shiftLeftParsed("-0x8000001", 29, "-0x100000020000000"); - shiftLeftParsed("-0x80000001", 33, "-0x200000000", - result_back_shifted: "-0x1"); - shiftLeftParsed("-0x7fffffffffffffff", 1, "0x2", result_back_shifted: "0x1"); - shiftLeftParsed("-0x7fffffffffffffff", 65, zero, result_back_shifted: zero); - shiftLeftParsed("-0x8000000000000000", 1, zero, result_back_shifted: zero); - shiftLeftParsed("-0x8000000000000000", 29, zero, result_back_shifted: zero); -} - -shiftRightParsed(String a, int amount, String result) { - int int_a = int.parse(a); - int int_result = int.parse(result); - int shifted = int_a >> amount; - Expect.equals(int_result, shifted); - String str_shifted = toHexString(shifted); - Expect.equals(result.toLowerCase(), str_shifted); -} - -testRightShift() { - String zero = "0x0"; - String one = "0x1"; - String minus_one = "-0x1"; - - shiftRightParsed(one, 1, zero); - shiftRightParsed(minus_one, 1, minus_one); - shiftRightParsed("-0x2", 1, minus_one); - shiftRightParsed("0x12345678", 29, zero); - shiftRightParsed("-0x12345678", 29, minus_one); - shiftRightParsed("-0x12345678", 100, minus_one); - shiftRightParsed("0x5", 1, "0x2"); - shiftRightParsed("0x5", 2, "0x1"); - shiftRightParsed("-0x5", 1, "-0x3"); - shiftRightParsed("-0x5", 2, "-0x2"); - shiftRightParsed("0x10000001", 28, one); - shiftRightParsed("0x100000001", 32, one); - shiftRightParsed("0x1000000000000001", 60, one); - shiftRightParsed("0x1000000000000001", 64, zero); - shiftRightParsed("-0x10000001", 28, "-0x2"); - shiftRightParsed("-0x100000001", 32, "-0x2"); - shiftRightParsed("-0x1000000000000001", 64, minus_one); - shiftRightParsed("0x30000000", 29, one); - shiftRightParsed("0x300000000", 33, one); - shiftRightParsed("0x3000000000000000", 61, one); - shiftRightParsed("0x3000000000000000", 65, zero); - shiftRightParsed("-0x30000000", 29, "-0x2"); - shiftRightParsed("-0x300000000", 33, "-0x2"); - shiftRightParsed("-0x3000000000000000", 60, "-0x3"); - shiftRightParsed("-0x3000000000000000", 65, minus_one); -} - -bitAndParsed(String a, String b, String result) { - int int_a = int.parse(a); - int int_b = int.parse(b); - int int_result = int.parse(result); - int anded = int_a & int_b; - Expect.equals(int_result, anded); - String str_anded = toHexString(anded); - Expect.equals(result.toLowerCase(), str_anded); - int anded2 = int_b & int_a; - Expect.equals(int_result, anded2); - String str_anded2 = toHexString(anded2); - Expect.equals(result.toLowerCase(), str_anded2); -} - -testBitAnd() { - String zero = "0x0"; - String one = "0x1"; - String minus_one = "-0x1"; - - bitAndParsed(one, zero, zero); - bitAndParsed(one, one, one); - bitAndParsed(minus_one, zero, zero); - bitAndParsed(minus_one, one, one); - bitAndParsed(minus_one, minus_one, minus_one); - bitAndParsed("0x5", "0x3", one); - bitAndParsed("0x5", minus_one, "0x5"); - bitAndParsed("0x50000000", one, zero); - bitAndParsed("0x50000000", minus_one, "0x50000000"); - bitAndParsed("0x500000000", one, zero); - bitAndParsed("0x500000000", minus_one, "0x500000000"); - bitAndParsed("0x5000000000000000", one, zero); - bitAndParsed("0x5000000000000000", minus_one, "0x5000000000000000"); - bitAndParsed("-0x50000000", "-0x50000000", "-0x50000000"); - bitAndParsed("-0x500000000", "-0x500000000", "-0x500000000"); - bitAndParsed("0x12345678", "0xFFFFFFF", "0x2345678"); - bitAndParsed("0x123456789", "0xFFFFFFFF", "0x23456789"); - bitAndParsed("-0x10000000", "0xFFFFFFF", "0x0"); - bitAndParsed("-0x100000000", "0xFFFFFFFF", "0x0"); - bitAndParsed("-0x10000001", "0xFFFFFFF", "0xFFFFFFF"); - bitAndParsed("-0x100000001", "0xFFFFFFFF", "0xFFFFFFFF"); - bitAndParsed("-0x10000001", "0x3FFFFFFF", "0x2FFFFFFF"); - bitAndParsed("-0x100000001", "0x3FFFFFFFF", "0x2FFFFFFFF"); - bitAndParsed("-0x100000000000000", "0xFFFFFFFFFFFFFF", "0x0"); - bitAndParsed( - "-0x1000000000000000", "0xFFFFFFFFFFFFFFFF", "-0x1000000000000000"); - bitAndParsed("-0x300000000000000", "0xFFFFFFFFFFFFFFF", "0xD00000000000000"); - bitAndParsed( - "-0x3000000000000000", "0xFFFFFFFFFFFFFFFF", "-0x3000000000000000"); - bitAndParsed("-0x10000000", "-0x10000000", "-0x10000000"); - bitAndParsed("-0x100000000", "-0x100000000", "-0x100000000"); - bitAndParsed( - "-0x100000000000000", "-0x100000000000000", "-0x100000000000000"); - bitAndParsed( - "-0x1000000000000000", "-0x1000000000000000", "-0x1000000000000000"); - bitAndParsed("-0x3", "-0x2", "-0x4"); - bitAndParsed("-0x10000000", "-0x10000001", "-0x20000000"); - bitAndParsed("-0x100000000", "-0x100000001", "-0x200000000"); - bitAndParsed( - "-0x100000000000000", "-0x100000000000001", "-0x200000000000000"); - bitAndParsed( - "-0x1000000000000000", "-0x1000000000000001", "-0x2000000000000000"); -} - -bitOrParsed(String a, String b, String result) { - int int_a = int.parse(a); - int int_b = int.parse(b); - int int_result = int.parse(result); - int ored = int_a | int_b; - Expect.equals(int_result, ored); - String str_ored = toHexString(ored); - Expect.equals(result.toLowerCase(), str_ored); - int ored2 = int_b | int_a; - Expect.equals(int_result, ored2); - String str_ored2 = toHexString(ored2); - Expect.equals(result.toLowerCase(), str_ored2); -} - -testBitOr() { - String zero = "0x0"; - String one = "0x1"; - String minus_one = "-0x1"; - - bitOrParsed(one, zero, one); - bitOrParsed(one, one, one); - bitOrParsed(minus_one, zero, minus_one); - bitOrParsed(minus_one, one, minus_one); - bitOrParsed(minus_one, minus_one, minus_one); - bitOrParsed("-0x3", one, "-0x3"); - bitOrParsed("0x5", "0x3", "0x7"); - bitOrParsed("0x5", minus_one, minus_one); - bitOrParsed("0x5", zero, "0x5"); - bitOrParsed("0x50000000", one, "0x50000001"); - bitOrParsed("0x50000000", minus_one, minus_one); - bitOrParsed("0x500000000", one, "0x500000001"); - bitOrParsed("0x500000000", minus_one, minus_one); - bitOrParsed("0x5000000000000000", one, "0x5000000000000001"); - bitOrParsed("0x5000000000000000", minus_one, minus_one); - bitOrParsed("-0x50000000", "-0x50000000", "-0x50000000"); - bitOrParsed("-0x500000000", "-0x500000000", "-0x500000000"); - bitOrParsed("0x12345678", "0xFFFFFFF", "0x1FFFFFFF"); - bitOrParsed("0x123456789", "0xFFFFFFFF", "0x1FFFFFFFF"); - bitOrParsed("-0x10000000", "0xFFFFFFF", "-0x1"); - bitOrParsed("-0x100000000", "0xFFFFFFFF", "-0x1"); - bitOrParsed("-0x10000001", "0xFFFFFFF", "-0x10000001"); - bitOrParsed("-0x100000001", "0xFFFFFFFF", "-0x100000001"); - bitOrParsed("-0x10000001", "0x3FFFFFFF", "-0x1"); - bitOrParsed("-0x100000001", "0x3FFFFFFFF", "-0x1"); - bitOrParsed("-0x1000000000000001", "0x3FFFFFFFFFFFFFFF", "-0x1"); - bitOrParsed("-0x100000000000000", "0xFFFFFFFFFFFFFF", "-0x1"); - bitOrParsed("-0x1000000000000000", "0xFFFFFFFFFFFFFFF", "-0x1"); - bitOrParsed("-0x300000000000000", "0xFFFFFFFFFFFFFFF", "-0x1"); - bitOrParsed("-0x3000000000000000", "0xFFFFFFFFFFFFFFFF", "-0x1"); - bitOrParsed("-0x10000000", "-0x10000000", "-0x10000000"); - bitOrParsed("-0x100000000", "-0x100000000", "-0x100000000"); - bitOrParsed("-0x100000000000000", "-0x100000000000000", "-0x100000000000000"); - bitOrParsed( - "-0x1000000000000000", "-0x1000000000000000", "-0x1000000000000000"); - bitOrParsed("-0x10000000", "-0x10000001", "-0x1"); - bitOrParsed("-0x100000000", "-0x100000001", "-0x1"); - bitOrParsed("-0x100000000000000", "-0x100000000000001", "-0x1"); - bitOrParsed("-0x1000000000000000", "-0x1000000000000001", "-0x1"); - bitOrParsed("-0x1000000000000000", "-0x1", "-0x1"); -} - -bitXorParsed(String a, String b, String result) { - int int_a = int.parse(a); - int int_b = int.parse(b); - int int_result = int.parse(result); - int xored = int_a ^ int_b; - Expect.equals(int_result, xored); - String str_xored = toHexString(xored); - Expect.equals(result.toLowerCase(), str_xored); - int xored2 = int_b ^ int_a; - Expect.equals(int_result, xored2); - String str_xored2 = toHexString(xored2); - Expect.equals(result.toLowerCase(), str_xored2); - int xored3 = int_a ^ xored2; - Expect.equals(int_b, xored3); - String str_xored3 = toHexString(xored3); - Expect.equals(b.toLowerCase(), str_xored3); -} - -testBitXor() { - String zero = "0x0"; - String one = "0x1"; - String minus_one = "-0x1"; - - bitXorParsed(one, zero, one); - bitXorParsed(one, one, zero); - bitXorParsed(minus_one, zero, minus_one); - bitXorParsed(minus_one, one, "-0x2"); - bitXorParsed(minus_one, minus_one, zero); - bitXorParsed("0x5", "0x3", "0x6"); - bitXorParsed("0x5", minus_one, "-0x6"); - bitXorParsed("0x5", zero, "0x5"); - bitXorParsed(minus_one, "-0x8", "0x7"); - bitXorParsed("0x50000000", one, "0x50000001"); - bitXorParsed("0x50000000", minus_one, "-0x50000001"); - bitXorParsed("0x500000000", one, "0x500000001"); - bitXorParsed("0x500000000", minus_one, "-0x500000001"); - bitXorParsed("0x5000000000000000", one, "0x5000000000000001"); - bitXorParsed("0x5000000000000000", minus_one, "-0x5000000000000001"); - bitXorParsed("-0x50000000", "-0x50000000", zero); - bitXorParsed("-0x500000000", "-0x500000000", zero); - bitXorParsed("0x12345678", "0xFFFFFFF", "0x1DCBA987"); - bitXorParsed("0x123456789", "0xFFFFFFFF", "0x1DCBA9876"); - bitXorParsed("-0x10000000", "0xFFFFFFF", "-0x1"); - bitXorParsed("-0x100000000", "0xFFFFFFFF", "-0x1"); - bitXorParsed("-0x10000001", "0xFFFFFFF", "-0x20000000"); - bitXorParsed("-0x100000001", "0xFFFFFFFF", "-0x200000000"); - bitXorParsed("-0x10000001", "0x3FFFFFFF", "-0x30000000"); - bitXorParsed("-0x100000001", "0x3FFFFFFFF", "-0x300000000"); - bitXorParsed( - "-0x1000000000000001", "0x3FFFFFFFFFFFFFFF", "-0x3000000000000000"); - bitXorParsed("-0x100000000000000", "0xFFFFFFFFFFFFFF", "-0x1"); - bitXorParsed("-0x1000000000000000", "0xFFFFFFFFFFFFFFF", "-0x1"); - bitXorParsed("-0x300000000000000", "0xFFFFFFFFFFFFFFF", "-0xD00000000000001"); - bitXorParsed("-0x3000000000000000", "-0x1", "0x2FFFFFFFFFFFFFFF"); - bitXorParsed("-0x10000000", "-0x10000000", zero); - bitXorParsed("-0x100000000", "-0x100000000", zero); - bitXorParsed("-0x100000000000000", "-0x100000000000000", zero); - bitXorParsed("-0x1000000000000000", "-0x1000000000000000", zero); - bitXorParsed("-0x10000000", "-0x10000001", "0x1FFFFFFF"); - bitXorParsed("-0x100000000", "-0x100000001", "0x1FFFFFFFF"); - bitXorParsed("-0x100000000000000", "-0x100000000000001", "0x1FFFFFFFFFFFFFF"); - bitXorParsed( - "-0x1000000000000000", "-0x1000000000000001", "0x1FFFFFFFFFFFFFFF"); -} - -bitNotParsed(String a, String result) { - int int_a = int.parse(a); - int int_result = int.parse(result); - int inverted = ~int_a; - Expect.equals(int_result, inverted); - String str_inverted = toHexString(inverted); - Expect.equals(result.toLowerCase(), str_inverted); - int back = ~inverted; - Expect.equals(int_a, back); - String str_back = toHexString(back); - Expect.equals(a.toLowerCase(), str_back); -} - -testBitNot() { - String zero = "0x0"; - String one = "0x1"; - String minus_one = "-0x1"; - - bitNotParsed(zero, minus_one); - bitNotParsed(one, "-0x2"); - bitNotParsed("0x5", "-0x6"); - bitNotParsed("0x50000000", "-0x50000001"); - bitNotParsed("0xFFFFFFF", "-0x10000000"); - bitNotParsed("0xFFFFFFFF", "-0x100000000"); - bitNotParsed("0xFFFFFFFFFFFFFF", "-0x100000000000000"); - bitNotParsed("0x7FFFFFFFFFFFFFFF", "-0x8000000000000000"); - bitNotParsed("-0x1", "0x0"); -} - -main() { - testAddSub(); - testLeftShift(); - testRightShift(); - testBitAnd(); - testBitOr(); - testBitXor(); - testBitNot(); -} diff --git a/tests/corelib_2/integer_parsed_div_rem_vm_test.dart b/tests/corelib_2/integer_parsed_div_rem_vm_test.dart deleted file mode 100644 index d6c1e11a74d..00000000000 --- a/tests/corelib_2/integer_parsed_div_rem_vm_test.dart +++ /dev/null @@ -1,68 +0,0 @@ -// 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 - -// Testing integers with and without intrinsics. -// VMOptions= -// VMOptions=--no_intrinsify - -library integer_arithmetic_test; - -import "package:expect/expect.dart"; - -divRemParsed(String a, String b, String quotient, String remainder) { - int int_a = int.parse(a); - int int_b = int.parse(b); - int int_quotient = int.parse(quotient); - int int_remainder = int.parse(remainder); - int computed_quotient = int_a ~/ int_b; - Expect.equals(int_quotient, computed_quotient); - String str_quotient = computed_quotient >= 0 - ? "0x${computed_quotient.toRadixString(16)}" - : "-0x${computed_quotient.toRadixString(16).substring(1)}"; - Expect.equals(quotient.toLowerCase(), str_quotient); - int computed_remainder = int_a.remainder(int_b); - Expect.equals(int_remainder, computed_remainder); - String str_remainder = computed_remainder >= 0 - ? "0x${computed_remainder.toRadixString(16)}" - : "-0x${computed_remainder.toRadixString(16).substring(1)}"; - Expect.equals(remainder.toLowerCase(), str_remainder); -} - -testDivideRemainder() { - String zero = "0x0"; - String one = "0x1"; - String minus_one = "-0x1"; - - divRemParsed(one, one, one, zero); - divRemParsed(zero, one, zero, zero); - divRemParsed(minus_one, one, minus_one, zero); - divRemParsed(one, "0x2", zero, one); - divRemParsed(minus_one, "0x7", zero, minus_one); - divRemParsed("0xB", "0x7", one, "0x4"); - divRemParsed("0x12345678", "0x7", "0x299C335", "0x5"); - divRemParsed("-0x12345678", "0x7", "-0x299C335", "-0x5"); - divRemParsed("0x12345678", "-0x7", "-0x299C335", "0x5"); - divRemParsed("-0x12345678", "-0x7", "0x299C335", "-0x5"); - divRemParsed("0x7", "0x12345678", zero, "0x7"); - divRemParsed("-0x7", "0x12345678", zero, "-0x7"); - divRemParsed("-0x7", "-0x12345678", zero, "-0x7"); - divRemParsed("0x7", "-0x12345678", zero, "0x7"); - divRemParsed("0x12345678", "0x7", "0x299C335", "0x5"); - divRemParsed("-0x12345678", "0x7", "-0x299C335", "-0x5"); - divRemParsed("0x12345678", "-0x7", "-0x299C335", "0x5"); - divRemParsed("-0x12345678", "-0x7", "0x299C335", "-0x5"); - divRemParsed("9223372036854775807", "0x7", "0x1249249249249249", "0x0"); - divRemParsed("9223372036854775807", "-0x7", "-0x1249249249249249", "0x0"); - divRemParsed("-9223372036854775807", "0x7", "-0x1249249249249249", "0x0"); - divRemParsed("-9223372036854775807", "-0x7", "0x1249249249249249", "0x0"); - divRemParsed("-9223372036854775808", "-1", "-0x8000000000000000", "0x0"); //# 01: ok - divRemParsed("-9223372036854775808", "0x7", "-0x1249249249249249", "-0x1"); - divRemParsed("-9223372036854775808", "-0x7", "0x1249249249249249", "-0x1"); -} - -main() { - testDivideRemainder(); -} diff --git a/tests/corelib_2/integer_parsed_mul_div_vm_test.dart b/tests/corelib_2/integer_parsed_mul_div_vm_test.dart deleted file mode 100644 index 2eaa655a214..00000000000 --- a/tests/corelib_2/integer_parsed_mul_div_vm_test.dart +++ /dev/null @@ -1,83 +0,0 @@ -// 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 - -// Testing integers with and without intrinsics. -// VMOptions= -// VMOptions=--no_intrinsify - -library integer_arithmetic_test; - -import "package:expect/expect.dart"; - -mulDivParsed(String a, String b, String product, - {String expected_quotient1, String expected_quotient2}) { - int int_a = int.parse(a); - int int_b = int.parse(b); - int int_product = int.parse(product); - int computed_product = int_a * int_b; - Expect.equals(int_product, computed_product); - String str_product = computed_product >= 0 - ? "0x${computed_product.toRadixString(16)}" - : "-0x${(-computed_product).toRadixString(16)}"; - Expect.equals(product.toLowerCase(), str_product); - int computed_product2 = int_b * int_a; - Expect.equals(int_product, computed_product2); - String str_product2 = computed_product2 >= 0 - ? "0x${computed_product2.toRadixString(16)}" - : "-0x${(-computed_product2).toRadixString(16)}"; - Expect.equals(product.toLowerCase(), str_product2); - - if (int_a != 0) { - expected_quotient1 ??= b; - int int_expected_quotient1 = int.parse(expected_quotient1); - int computed_quotient1 = int_product ~/ int_a; - Expect.equals(int_expected_quotient1, computed_quotient1); - String str_quotient1 = computed_quotient1 >= 0 - ? "0x${computed_quotient1.toRadixString(16)}" - : "-0x${(-computed_quotient1).toRadixString(16)}"; - Expect.equals(expected_quotient1.toLowerCase(), str_quotient1); - } - - if (int_b != 0) { - expected_quotient2 ??= a; - int int_expected_quotient2 = int.parse(expected_quotient2); - int computed_quotient2 = int_product ~/ int_b; - Expect.equals(int_expected_quotient2, computed_quotient2); - String str_quotient2 = computed_quotient2 >= 0 - ? "0x${computed_quotient2.toRadixString(16)}" - : "-0x${(-computed_quotient2).toRadixString(16)}"; - Expect.equals(expected_quotient2.toLowerCase(), str_quotient2); - } -} - -testMultiplyDivide() { - String zero = "0x0"; - String one = "0x1"; - String minus_one = "-0x1"; - - mulDivParsed(zero, zero, zero); - mulDivParsed(one, one, one); - mulDivParsed(one, zero, zero); - mulDivParsed(zero, one, zero); - mulDivParsed(one, minus_one, minus_one); - mulDivParsed(minus_one, minus_one, one); - mulDivParsed("0x42", one, "0x42"); - mulDivParsed("0x42", "0x2", "0x84"); - mulDivParsed("0xFFFF", "0x2", "0x1FFFE"); - mulDivParsed("0x3", "0x5", "0xF"); - mulDivParsed("0xFFFFF", "0x5", "0x4FFFFB"); - mulDivParsed("0xFFFFFFF", "0x5", "0x4FFFFFFB"); - mulDivParsed("0xFFFFFFFF", "0x5", "0x4FFFFFFFB"); - mulDivParsed("0x7FFFFFFFFFFFFFFF", "0x5", "0x7FFFFFFFFFFFFFFB", - expected_quotient1: zero, expected_quotient2: "0x1999999999999998"); - mulDivParsed("0x7FFFFFFFFFFFFFFF", "0x3039", "0x7FFFFFFFFFFFCFC7", - expected_quotient1: zero, expected_quotient2: "0x2A783BE38C73D"); - mulDivParsed("0x10000001", "0x5", "0x50000005"); -} - -main() { - testMultiplyDivide(); -} diff --git a/tests/corelib_2/integer_to_radix_string_test.dart b/tests/corelib_2/integer_to_radix_string_test.dart deleted file mode 100644 index 908b1613982..00000000000 --- a/tests/corelib_2/integer_to_radix_string_test.dart +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - // Test that we accept radix 2 to 36 and that we use lower-case - // letters. - var expected = [ - '0', - '1', - '2', - '3', - '4', - '5', - '6', - '7', - '8', - '9', - 'a', - 'b', - 'c', - 'd', - 'e', - 'f', - 'g', - 'h', - 'i', - 'j', - 'k', - 'l', - 'm', - 'n', - 'o', - 'p', - 'q', - 'r', - 's', - 't', - 'u', - 'v', - 'w', - 'x', - 'y', - 'z' - ]; - for (var radix = 2; radix <= 36; radix++) { - for (var i = 0; i < radix; i++) { - Expect.equals(expected[i], i.toRadixString(radix)); - } - } - - var illegalRadices = [-1, 0, 1, 37]; - for (var radix in illegalRadices) { - try { - 42.toRadixString(radix); - Expect.fail("Exception expected"); - } on ArgumentError catch (e) { - // Nothing to do. - } - } - - // Try large numbers (regression test for issue 15316). - var bignums = [ - 0x80000000, - 0x100000000, - 0x10000000000000, - 0x10000000000001, // 53 significant bits. - 0x20000000000000, - 0x20000000000002, - 0x1000000000000000, - 0x1000000000000100, - 0x2000000000000000, - 0x2000000000000200, - 0x8000000000000000, //# 01: ok - 0x8000000000000800, //# 02: ok - ]; - for (var bignum in bignums) { - for (int radix = 2; radix <= 36; radix++) { - String digits = bignum.toRadixString(radix); - int result = int.parse(digits, radix: radix); - Expect.equals( - bignum, result, "${bignum.toRadixString(16)} -> $digits/$radix"); - } - } -} diff --git a/tests/corelib_2/integer_to_string_test.dart b/tests/corelib_2/integer_to_string_test.dart deleted file mode 100644 index b33eb9d2642..00000000000 --- a/tests/corelib_2/integer_to_string_test.dart +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - /// Test that converting [value] to a string gives [expect]. - /// Also test that `-value` gives `"-"+expect`. - test(int value, String expect) { - Expect.equals(expect, value.toString()); - Expect.equals(expect, "$value"); - Expect.equals(expect, (new StringBuffer()..write(value)).toString()); - if (value <= 0) return; - expect = "-$expect"; - value = -value; - Expect.equals(expect, value.toString()); - Expect.equals(expect, "$value"); - Expect.equals(expect, (new StringBuffer()..write(value)).toString()); - } - - // Very simple tests. - test(0, "0"); - test(1, "1"); - test(2, "2"); - test(5, "5"); - - // Binary special cases. - - // ~2^30. - test(0x3fffffff, "1073741823"); - test(0x40000000, "1073741824"); - test(0x40000001, "1073741825"); - // ~2^31. - test(0x7fffffff, "2147483647"); - test(0x80000000, "2147483648"); - test(0x80000001, "2147483649"); - // ~2^32. - test(0xffffffff, "4294967295"); - test(0x100000000, "4294967296"); - test(0x100000001, "4294967297"); - - // ~2^51. - test(0x7ffffffffffff, "2251799813685247"); - test(0x8000000000000, "2251799813685248"); - test(0x8000000000001, "2251799813685249"); - // ~2^52. - test(0xfffffffffffff, "4503599627370495"); - test(0x10000000000000, "4503599627370496"); - test(0x10000000000001, "4503599627370497"); - // ~2^53. - test(0x1fffffffffffff, "9007199254740991"); - test(0x20000000000000, "9007199254740992"); - test(0x20000000000001, "9007199254740993"); // //# 01: ok - // ~2^62. - test(0x3fffffffffffffff, "4611686018427387903"); // //# 01: continued - test(0x4000000000000000, "4611686018427387904"); // //# 01: continued - test(0x4000000000000001, "4611686018427387905"); // //# 01: continued - // ~2^63. - test(0x7fffffffffffffff, "9223372036854775807"); // //# 01: continued - test(0x8000000000000000, "-9223372036854775808"); // //# 01: continued - test(0x8000000000000001, "-9223372036854775807"); // //# 01: continued - // ~2^64. - test(0xffffffffffffffff, "-1"); // //# 01: continued - - // Decimal special cases. - - int number = 10; - // Numbers 99..99, 100...00, and 100..01 up to 18 digits. - for (int i = 1; i < 15; i++) { - // Works in dart2js up to 10^15. - test(number - 1, "9" * i); - test(number, "1" + "0" * i); - test(number + 1, "1" + "0" * (i - 1) + "1"); - number *= 10; - } - // Fails to represent exactly in dart2js. - for (int i = 15; i < 19; i++) { // //# 01: continued - test(number - 1, "9" * i); // //# 01: continued - test(number, "1" + "0" * i); // //# 01: continued - test(number + 1, "1" + "0" * (i - 1) + "1"); // //# 01: continued - number *= 10; // //# 01: continued - } // //# 01: continued -} diff --git a/tests/corelib_2/invocation_test.dart b/tests/corelib_2/invocation_test.dart deleted file mode 100644 index 349339897b5..00000000000 --- a/tests/corelib_2/invocation_test.dart +++ /dev/null @@ -1,422 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// Tests the constructors of the Invocation class. - -main() { - { - var name = "getter"; - var invocation = new Invocation.getter(#name); - Expect.isTrue(invocation.isGetter, "$name:isGetter"); - Expect.isFalse(invocation.isSetter, "$name:isSetter"); - Expect.isTrue(invocation.isAccessor, "$name:isAccessor"); - Expect.isFalse(invocation.isMethod, "$name:isMethod"); - Expect.equals(#name, invocation.memberName, "$name:name"); - Expect.listEquals([], invocation.typeArguments, "$name:types"); - Expect.listEquals([], invocation.positionalArguments, "$name:pos"); - Expect.mapEquals({}, invocation.namedArguments, "$name: named"); - checkUnmodifiableList("$name types", invocation.typeArguments); - checkUnmodifiableList("$name positional", invocation.positionalArguments); - checkUnmodifiableMap("$name named", invocation.namedArguments); - } - { - var name = "setter"; - var argument = new Object(); - var invocation = new Invocation.setter(const Symbol("name="), argument); - Expect.isFalse(invocation.isGetter, "$name:isGetter"); - Expect.isTrue(invocation.isSetter, "$name:isSetter"); - Expect.isTrue(invocation.isAccessor, "$name:isAccessor"); - Expect.isFalse(invocation.isMethod, "$name:isMethod"); - Expect.equals(const Symbol("name="), invocation.memberName, "$name:name"); - Expect.listEquals([], invocation.typeArguments, "$name:types"); - Expect.listEquals([argument], invocation.positionalArguments, "$name:pos"); - Expect.mapEquals({}, invocation.namedArguments, "$name: named"); - checkUnmodifiableList("$name types", invocation.typeArguments); - checkUnmodifiableList("$name positional", invocation.positionalArguments); - checkUnmodifiableMap("$name named", invocation.namedArguments); - } - { - var name = ".name()"; - var invocation = new Invocation.method(#name, []); - Expect.isFalse(invocation.isGetter, "$name:isGetter"); - Expect.isFalse(invocation.isSetter, "$name:isSetter"); - Expect.isFalse(invocation.isAccessor, "$name:isAccessor"); - Expect.isTrue(invocation.isMethod, "$name:isMethod"); - Expect.equals(#name, invocation.memberName, "$name:name"); - Expect.listEquals([], invocation.typeArguments, "$name:types"); - Expect.listEquals([], invocation.positionalArguments, "$name:pos"); - Expect.mapEquals({}, invocation.namedArguments, "$name: named"); - checkUnmodifiableList("$name types", invocation.typeArguments); - checkUnmodifiableList("$name positional", invocation.positionalArguments); - checkUnmodifiableMap("$name named", invocation.namedArguments); - - expectInvocation("$name:", invocation, new Invocation.method(#name, null)); - expectInvocation( - "$name:", invocation, new Invocation.method(#name, [], null)); - expectInvocation( - "$name:", invocation, new Invocation.method(#name, [], {})); - - expectInvocation( - "$name:", invocation, new Invocation.genericMethod(#name, [], [])); - expectInvocation( - "$name:", invocation, new Invocation.genericMethod(#name, [], null)); - expectInvocation("$name:", invocation, - new Invocation.genericMethod(#name, [], [], null)); - expectInvocation( - "$name:", invocation, new Invocation.genericMethod(#name, [], [], {})); - expectInvocation( - "$name:", invocation, new Invocation.genericMethod(#name, null, [])); - expectInvocation( - "$name:", invocation, new Invocation.genericMethod(#name, null, null)); - expectInvocation("$name:", invocation, - new Invocation.genericMethod(#name, null, [], null)); - expectInvocation("$name:", invocation, - new Invocation.genericMethod(#name, null, [], {})); - } - { - var name = ".name(a)"; - var argument = new Object(); - var invocation = new Invocation.method(#name, [argument]); - Expect.isFalse(invocation.isGetter, "$name:isGetter"); - Expect.isFalse(invocation.isSetter, "$name:isSetter"); - Expect.isFalse(invocation.isAccessor, "$name:isAccessor"); - Expect.isTrue(invocation.isMethod, "$name:isMethod"); - Expect.equals(#name, invocation.memberName, "$name:name"); - Expect.listEquals([], invocation.typeArguments, "$name:types"); - Expect.listEquals([argument], invocation.positionalArguments, "$name:pos"); - Expect.mapEquals({}, invocation.namedArguments, "$name: named"); - checkUnmodifiableList("$name types", invocation.typeArguments); - checkUnmodifiableList("$name positional", invocation.positionalArguments); - checkUnmodifiableMap("$name named", invocation.namedArguments); - - expectInvocation( - "$name:", invocation, new Invocation.method(#name, [argument], null)); - expectInvocation( - "$name:", invocation, new Invocation.method(#name, [argument], {})); - - expectInvocation("$name:", invocation, - new Invocation.genericMethod(#name, [], [argument], null)); - expectInvocation("$name:", invocation, - new Invocation.genericMethod(#name, [], [argument], {})); - expectInvocation("$name:", invocation, - new Invocation.genericMethod(#name, null, [argument], null)); - expectInvocation("$name:", invocation, - new Invocation.genericMethod(#name, null, [argument], {})); - } - { - var name = ".name(a,b)"; - var argument = new Object(); - var argument2 = new Object(); - var invocation = new Invocation.method(#name, [argument, argument2]); - Expect.isFalse(invocation.isGetter, "$name:isGetter"); - Expect.isFalse(invocation.isSetter, "$name:isSetter"); - Expect.isFalse(invocation.isAccessor, "$name:isAccessor"); - Expect.isTrue(invocation.isMethod, "$name:isMethod"); - Expect.equals(#name, invocation.memberName, "$name:name"); - Expect.listEquals([], invocation.typeArguments, "$name:types"); - Expect.listEquals( - [argument, argument2], invocation.positionalArguments, "$name:pos"); - Expect.mapEquals({}, invocation.namedArguments, "$name: named"); - checkUnmodifiableList("$name types", invocation.typeArguments); - checkUnmodifiableList("$name positional", invocation.positionalArguments); - checkUnmodifiableMap("$name named", invocation.namedArguments); - - expectInvocation("$name:", invocation, - new Invocation.method(#name, [argument, argument2], null)); - expectInvocation("$name:", invocation, - new Invocation.method(#name, [argument, argument2], {})); - - expectInvocation("$name:", invocation, - new Invocation.genericMethod(#name, [], [argument, argument2], null)); - expectInvocation("$name:", invocation, - new Invocation.genericMethod(#name, [], [argument, argument2], {})); - expectInvocation("$name:", invocation, - new Invocation.genericMethod(#name, null, [argument, argument2], null)); - expectInvocation("$name:", invocation, - new Invocation.genericMethod(#name, null, [argument, argument2], {})); - } - { - var name = ".name(a,b:)"; - var argument = new Object(); - var argument2 = new Object(); - var invocation = - new Invocation.method(#name, [argument], {#arg: argument2}); - Expect.isFalse(invocation.isGetter, "$name:isGetter"); - Expect.isFalse(invocation.isSetter, "$name:isSetter"); - Expect.isFalse(invocation.isAccessor, "$name:isAccessor"); - Expect.isTrue(invocation.isMethod, "$name:isMethod"); - Expect.equals(#name, invocation.memberName, "$name:name"); - Expect.listEquals([], invocation.typeArguments, "$name:types"); - Expect.listEquals([argument], invocation.positionalArguments, "$name:pos"); - Expect.mapEquals( - {#arg: argument2}, invocation.namedArguments, "$name: named"); - checkUnmodifiableList("$name types", invocation.typeArguments); - checkUnmodifiableList("$name positional", invocation.positionalArguments); - checkUnmodifiableMap("$name named", invocation.namedArguments); - - expectInvocation( - "$name:", - invocation, - new Invocation.genericMethod( - #name, null, [argument], {#arg: argument2})); - } - { - var name = ".name(a:,b:)"; - var argument = new Object(); - var argument2 = new Object(); - var invocation = - new Invocation.method(#name, [], {#arg: argument, #arg2: argument2}); - Expect.isFalse(invocation.isGetter, "$name:isGetter"); - Expect.isFalse(invocation.isSetter, "$name:isSetter"); - Expect.isFalse(invocation.isAccessor, "$name:isAccessor"); - Expect.isTrue(invocation.isMethod, "$name:isMethod"); - Expect.equals(#name, invocation.memberName, "$name:name"); - Expect.listEquals([], invocation.typeArguments, "$name:types"); - Expect.listEquals([], invocation.positionalArguments, "$name:pos"); - Expect.mapEquals({#arg: argument, #arg2: argument2}, - invocation.namedArguments, "$name: named"); - checkUnmodifiableList("$name types", invocation.typeArguments); - checkUnmodifiableList("$name positional", invocation.positionalArguments); - checkUnmodifiableMap("$name named", invocation.namedArguments); - - expectInvocation("$name:", invocation, - new Invocation.method(#name, null, {#arg: argument, #arg2: argument2})); - expectInvocation( - "$name:", - invocation, - new Invocation.genericMethod( - #name, null, [], {#arg: argument, #arg2: argument2})); - expectInvocation( - "$name:", - invocation, - new Invocation.genericMethod( - #name, null, null, {#arg: argument, #arg2: argument2})); - } - { - var name = ".name()"; - var invocation = new Invocation.genericMethod(#name, [int], []); - Expect.isFalse(invocation.isGetter, "$name:isGetter"); - Expect.isFalse(invocation.isSetter, "$name:isSetter"); - Expect.isFalse(invocation.isAccessor, "$name:isAccessor"); - Expect.isTrue(invocation.isMethod, "$name:isMethod"); - Expect.equals(#name, invocation.memberName, "$name:name"); - Expect.listEquals([int], invocation.typeArguments, "$name:types"); - Expect.listEquals([], invocation.positionalArguments, "$name:pos"); - Expect.mapEquals({}, invocation.namedArguments, "$name: named"); - checkUnmodifiableList("$name types", invocation.typeArguments); - checkUnmodifiableList("$name positional", invocation.positionalArguments); - checkUnmodifiableMap("$name named", invocation.namedArguments); - - expectInvocation( - "$name:", invocation, new Invocation.genericMethod(#name, [int], null)); - expectInvocation("$name:", invocation, - new Invocation.genericMethod(#name, [int], [], null)); - expectInvocation("$name:", invocation, - new Invocation.genericMethod(#name, [int], null, null)); - expectInvocation("$name:", invocation, - new Invocation.genericMethod(#name, [int], [], {})); - expectInvocation("$name:", invocation, - new Invocation.genericMethod(#name, [int], null, {})); - } - { - var name = ".name(a)"; - var argument = new Object(); - var invocation = new Invocation.genericMethod(#name, [int], [argument]); - Expect.isFalse(invocation.isGetter, "$name:isGetter"); - Expect.isFalse(invocation.isSetter, "$name:isSetter"); - Expect.isFalse(invocation.isAccessor, "$name:isAccessor"); - Expect.isTrue(invocation.isMethod, "$name:isMethod"); - Expect.equals(#name, invocation.memberName, "$name:name"); - Expect.listEquals([int], invocation.typeArguments, "$name:types"); - Expect.listEquals([argument], invocation.positionalArguments, "$name:pos"); - Expect.mapEquals({}, invocation.namedArguments, "$name: named"); - checkUnmodifiableList("$name types", invocation.typeArguments); - checkUnmodifiableList("$name positional", invocation.positionalArguments); - checkUnmodifiableMap("$name named", invocation.namedArguments); - - expectInvocation("$name:", invocation, - new Invocation.genericMethod(#name, [int], [argument], null)); - expectInvocation("$name:", invocation, - new Invocation.genericMethod(#name, [int], [argument], {})); - } - { - var name = ".name(a,b)"; - var argument = new Object(); - var argument2 = new Object(); - var invocation = - new Invocation.genericMethod(#name, [int], [argument, argument2]); - Expect.isFalse(invocation.isGetter, "$name:isGetter"); - Expect.isFalse(invocation.isSetter, "$name:isSetter"); - Expect.isFalse(invocation.isAccessor, "$name:isAccessor"); - Expect.isTrue(invocation.isMethod, "$name:isMethod"); - Expect.equals(#name, invocation.memberName, "$name:name"); - Expect.listEquals([int], invocation.typeArguments, "$name:types"); - Expect.listEquals( - [argument, argument2], invocation.positionalArguments, "$name:pos"); - Expect.mapEquals({}, invocation.namedArguments, "$name: named"); - checkUnmodifiableList("$name types", invocation.typeArguments); - checkUnmodifiableList("$name positional", invocation.positionalArguments); - checkUnmodifiableMap("$name named", invocation.namedArguments); - - expectInvocation( - "$name:", - invocation, - new Invocation.genericMethod( - #name, [int], [argument, argument2], null)); - expectInvocation("$name:", invocation, - new Invocation.genericMethod(#name, [int], [argument, argument2], {})); - } - { - var name = ".name(a,b:)"; - var argument = new Object(); - var argument2 = new Object(); - var invocation = new Invocation.genericMethod( - #name, [int], [argument], {#arg: argument2}); - Expect.isFalse(invocation.isGetter, "$name:isGetter"); - Expect.isFalse(invocation.isSetter, "$name:isSetter"); - Expect.isFalse(invocation.isAccessor, "$name:isAccessor"); - Expect.isTrue(invocation.isMethod, "$name:isMethod"); - Expect.equals(#name, invocation.memberName, "$name:name"); - Expect.listEquals([int], invocation.typeArguments, "$name:types"); - Expect.listEquals([argument], invocation.positionalArguments, "$name:pos"); - Expect.mapEquals( - {#arg: argument2}, invocation.namedArguments, "$name: named"); - checkUnmodifiableList("$name types", invocation.typeArguments); - checkUnmodifiableList("$name positional", invocation.positionalArguments); - checkUnmodifiableMap("$name named", invocation.namedArguments); - } - { - var name = ".name(a:,b:)"; - var argument = new Object(); - var argument2 = new Object(); - var invocation = new Invocation.genericMethod( - #name, [int], [], {#arg: argument, #arg2: argument2}); - Expect.isFalse(invocation.isGetter, "$name:isGetter"); - Expect.isFalse(invocation.isSetter, "$name:isSetter"); - Expect.isFalse(invocation.isAccessor, "$name:isAccessor"); - Expect.isTrue(invocation.isMethod, "$name:isMethod"); - Expect.equals(#name, invocation.memberName, "$name:name"); - Expect.listEquals([int], invocation.typeArguments, "$name:types"); - Expect.listEquals([], invocation.positionalArguments, "$name:pos"); - Expect.mapEquals({#arg: argument, #arg2: argument2}, - invocation.namedArguments, "$name: named"); - checkUnmodifiableList("$name types", invocation.typeArguments); - checkUnmodifiableList("$name positional", invocation.positionalArguments); - checkUnmodifiableMap("$name named", invocation.namedArguments); - - expectInvocation( - "$name:", - invocation, - new Invocation.genericMethod( - #name, [int], null, {#arg: argument, #arg2: argument2})); - } - { - // Many arguments. - var name = ".name<..>(..,..:)"; - var argument = new Object(); - var argument2 = new Object(); - Type intList = new TypeHelper>().type; - var invocation = new Invocation.genericMethod( - #name, - [int, double, intList], - [argument, argument2, null, argument], - {#arg: argument, #arg2: argument2, #arg3: null, #arg4: argument}); - Expect.isFalse(invocation.isGetter, "$name:isGetter"); - Expect.isFalse(invocation.isSetter, "$name:isSetter"); - Expect.isFalse(invocation.isAccessor, "$name:isAccessor"); - Expect.isTrue(invocation.isMethod, "$name:isMethod"); - Expect.equals(#name, invocation.memberName, "$name:name"); - Expect.listEquals( - [int, double, intList], invocation.typeArguments, "$name:types"); - Expect.listEquals([argument, argument2, null, argument], - invocation.positionalArguments, "$name:pos"); - Expect.mapEquals( - {#arg: argument, #arg2: argument2, #arg3: null, #arg4: argument}, - invocation.namedArguments); - checkUnmodifiableList("$name types", invocation.typeArguments); - checkUnmodifiableList("$name positional", invocation.positionalArguments); - checkUnmodifiableMap("$name named", invocation.namedArguments); - } - { - // Accepts iterables, not just lists. - var name = "iterables"; - var argument = new Object(); - var argument2 = new Object(); - Type intList = new TypeHelper>().type; - var invocation = new Invocation.genericMethod( - #name, - [int, double, intList].where(kTrue), - [argument, argument2, null, argument].where(kTrue), - {#arg: argument, #arg2: argument2, #arg3: null, #arg4: argument}); - Expect.isFalse(invocation.isGetter, "$name:isGetter"); - Expect.isFalse(invocation.isSetter, "$name:isSetter"); - Expect.isFalse(invocation.isAccessor, "$name:isAccessor"); - Expect.isTrue(invocation.isMethod, "$name:isMethod"); - Expect.equals(#name, invocation.memberName, "$name:name"); - Expect.listEquals( - [int, double, intList], invocation.typeArguments, "$name:types"); - Expect.listEquals([argument, argument2, null, argument], - invocation.positionalArguments, "$name:pos"); - Expect.mapEquals( - {#arg: argument, #arg2: argument2, #arg3: null, #arg4: argument}, - invocation.namedArguments); - checkUnmodifiableList("$name types", invocation.typeArguments); - checkUnmodifiableList("$name positional", invocation.positionalArguments); - checkUnmodifiableMap("$name named", invocation.namedArguments); - } - // No null type arguments. - Expect.throws(() { - new Invocation.genericMethod(#name, [null], []); - }); - Expect.throws(() { - new Invocation.genericMethod(#name, [int, null], []); - }); -} - -void checkUnmodifiableList(String name, List list) { - if (list.isNotEmpty) { - Expect.throws(() { - list[0] = null; - }, null, "$name: list not unmodifiable"); - } - Expect.throws(() { - list.add(null); - }, null, "$name: list not unmodifiable"); -} - -void checkUnmodifiableMap(String name, Map map) { - Expect.throws(() { - map[#key] = null; - }, null, "$name: map not unmodifiable"); -} - -class TypeHelper { - Type get type => T; -} - -expectInvocation(String name, Invocation expect, Invocation actual) { - Expect.equals(expect.isGetter, actual.isGetter, "$name:isGetter"); - Expect.equals(expect.isSetter, actual.isSetter, "$name:isSetter"); - Expect.equals(expect.isAccessor, actual.isAccessor, "$name:isAccessor"); - Expect.equals(actual.isGetter || actual.isSetter, actual.isAccessor); - Expect.equals(expect.isMethod, actual.isMethod, "$name:isMethod"); - Expect.isTrue(actual.isMethod || actual.isGetter || actual.isSetter); - Expect.isFalse(actual.isMethod && actual.isGetter); - Expect.isFalse(actual.isMethod && actual.isSetter); - Expect.isFalse(actual.isSetter && actual.isGetter); - Expect.equals(expect.memberName, actual.memberName, "$name:memberName"); - Expect.listEquals(expect.typeArguments, actual.typeArguments, "$name:types"); - Expect.listEquals( - expect.positionalArguments, actual.positionalArguments, "$name:pos"); - Expect.mapEquals(expect.namedArguments, actual.namedArguments, "$name:named"); - checkUnmodifiableList(name, actual.typeArguments); - checkUnmodifiableList(name, actual.positionalArguments); - checkUnmodifiableMap(name, actual.namedArguments); -} - -bool kTrue(_) => true; diff --git a/tests/corelib_2/is_operator_basic_types_test.dart b/tests/corelib_2/is_operator_basic_types_test.dart deleted file mode 100644 index df7ce05ca80..00000000000 --- a/tests/corelib_2/is_operator_basic_types_test.dart +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2012, 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 test program for the "is" type test operator. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -check(args) { - var list = args[0]; - var string = args[1]; - var nullObject = args[2]; - - Expect.isTrue(list is Object); - Expect.isTrue(list is List); - Expect.isTrue(list is Iterable); - Expect.isFalse(list is Comparable); - Expect.isFalse(list is Pattern); - Expect.isFalse(list is String); - - Expect.isFalse(list is! List); - Expect.isFalse(list is! Iterable); - Expect.isTrue(list is! Comparable); - Expect.isTrue(list is! Pattern); - Expect.isTrue(list is! String); - - Expect.isTrue(string is Object); - Expect.isFalse(string is List); - Expect.isFalse(string is Iterable); - Expect.isTrue(string is Comparable); - Expect.isTrue(string is Pattern); - Expect.isTrue(string is String); - - Expect.isTrue(string is! List); - Expect.isTrue(string is! Iterable); - Expect.isFalse(string is! Comparable); - Expect.isFalse(string is! Pattern); - Expect.isFalse(string is! String); - - Expect.isTrue(nullObject is Object); - Expect.isFalse(nullObject is List); - Expect.isFalse(nullObject is Iterable); - Expect.isFalse(nullObject is Comparable); - Expect.isFalse(nullObject is Pattern); - Expect.isFalse(nullObject is String); - - Expect.isTrue(nullObject is! List); - Expect.isTrue(nullObject is! Iterable); - Expect.isTrue(nullObject is! Comparable); - Expect.isTrue(nullObject is! Pattern); - Expect.isTrue(nullObject is! String); -} - -main() { - // Try to make it hard for an optimizing compiler to inline the - // tests. - check([[], 'string', null]); - - // Try to make it even harder. - var string = new String.fromCharCodes([new DateTime.now().year % 100 + 1]); - check([string.codeUnits, string, null]); -} diff --git a/tests/corelib_2/iterable_contains2_test.dart b/tests/corelib_2/iterable_contains2_test.dart deleted file mode 100644 index febbb31e391..00000000000 --- a/tests/corelib_2/iterable_contains2_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Tests for the contains methods on lists. - -class A { - const A(); -} - -class B extends A { - const B(); -} - -main() { - var list = [new B()]; - var set = new Set(); - set.add(new B()); - var iterable1 = list.map((x) => x); - var iterable2 = list.take(1); - var list2 = const [const B()]; - var iterable3 = list2.map((x) => x); - var iterable4 = list2.take(1); - var iterables = [ - list, - set, - iterable1, - iterable2, - list2, - iterable3, - iterable4 - ]; - for (var iterable in iterables) { - Expect.isFalse(iterable.contains(new A())); - } -} diff --git a/tests/corelib_2/iterable_contains_test.dart b/tests/corelib_2/iterable_contains_test.dart deleted file mode 100644 index bbb9cca97f6..00000000000 --- a/tests/corelib_2/iterable_contains_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Tests for the contains methods on lists. - -test(list, notInList) { - testList(list) { - for (int i = 0; i < list.length; i++) { - var elem = list[i]; - Expect.isTrue(list.contains(list[i]), "$list.contains($elem)"); - } - Expect.isFalse(list.contains(notInList), "!$list.contains($notInList)"); - } - - List fixedList = new List.filled(list.length, null); - List growList = []; - for (int i = 0; i < list.length; i++) { - fixedList[i] = list[i]; - growList.add(list[i]); - } - testList(list); - testList(fixedList); - testList(growList); -} - -class C { - const C(); -} - -class Niet { - bool operator ==(other) => false; -} - -main() { - test(const ["a", "b", "c", null], "d"); - test(const [1, 2, 3, null], 0); - test(const [true, false], null); - test(const [const C(), const C(), null], new C()); - test([new C(), new C(), new C(), null], new C()); - test(const [0.0, 1.0, 5e-324, 1e+308, double.infinity], 2.0); - Expect.isTrue(const [-0.0].contains(0.0)); - Expect.isFalse(const [double.nan].contains(double.nan)); - var niet = new Niet(); - Expect.isFalse([niet].contains(niet)); -} diff --git a/tests/corelib_2/iterable_element_at_test.dart b/tests/corelib_2/iterable_element_at_test.dart deleted file mode 100644 index 8ea5ed403de..00000000000 --- a/tests/corelib_2/iterable_element_at_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - List list1 = [1, 2, 3]; - List list2 = const [4, 5, 6]; - List list3 = []; - Set set1 = new Set(); - set1..add(11)..add(12)..add(13); - Set set2 = new Set(); - - Expect.equals(1, list1.elementAt(0)); - Expect.equals(2, list1.elementAt(1)); - Expect.equals(3, list1.elementAt(2)); - list1.elementAt("2"); //# static: compile-time error - Expect.throwsArgumentError(() => list1.elementAt(-1)); - Expect.throwsRangeError(() => list1.elementAt(3)); - - Expect.equals(4, list2.elementAt(0)); - Expect.equals(5, list2.elementAt(1)); - Expect.equals(6, list2.elementAt(2)); - list2.elementAt("2"); //# static: compile-time error - Expect.throwsArgumentError(() => list2.elementAt(-1)); - Expect.throwsRangeError(() => list2.elementAt(3)); - - Expect.isTrue(set1.contains(set1.elementAt(0))); - Expect.isTrue(set1.contains(set1.elementAt(1))); - Expect.isTrue(set1.contains(set1.elementAt(2))); - Expect.throwsArgumentError(() => set1.elementAt(-1)); - Expect.throwsRangeError(() => set1.elementAt(3)); - - set2.elementAt("2"); //# static: compile-time error - Expect.throwsArgumentError(() => set2.elementAt(-1)); - Expect.throwsRangeError(() => set2.elementAt(0)); - Expect.throwsRangeError(() => set2.elementAt(1)); -} diff --git a/tests/corelib_2/iterable_empty_test.dart b/tests/corelib_2/iterable_empty_test.dart deleted file mode 100644 index c942bfe8a3c..00000000000 --- a/tests/corelib_2/iterable_empty_test.dart +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -main() { - testEmpty(name, Iterable it, [depth = 2]) { - Expect.isTrue(it.isEmpty, name); - Expect.isFalse(it.isNotEmpty, name); - Expect.equals(0, it.length, name); - Expect.isFalse(it.contains(null), name); - Expect.isFalse(it.any((x) => true), name); - Expect.isTrue(it.every((x) => false), name); - Expect.throwsStateError(() => it.first, name); - Expect.throwsStateError(() => it.last, name); - Expect.throwsStateError(() => it.single, name); - Expect.throwsRangeError(() => it.elementAt(0), name); - Expect.throwsStateError(() => it.reduce((a, b) => a), name); - Expect.throwsStateError(() => it.singleWhere((_) => true), name); - Expect.equals(42, it.fold(42, (a, b) => "not 42"), name); - Expect.equals(42, it.firstWhere((v) => true, orElse: () => 42), name); - Expect.equals(42, it.lastWhere((v) => true, orElse: () => 42), name); - Expect.equals("", it.join("separator"), name); - Expect.equals("()", it.toString(), name); - Expect.listEquals([], it.toList(), name); - Expect.listEquals([], it.toList(growable: false), name); - Expect.listEquals([], it.toList(growable: true), name); - Expect.equals(0, it.toSet().length, name); - // Doesn't throw: - it.forEach((v) => throw v); - for (var v in it) { - throw v; - } - // Check that returned iterables are also empty. - if (depth > 0) { - testEmpty("$name-map", it.map((x) => x), depth - 1); - testEmpty("$name-where", it.where((x) => true), depth - 1); - testEmpty("$name-expand", it.expand((x) => [x]), depth - 1); - testEmpty("$name-skip", it.skip(1), depth - 1); - testEmpty("$name-take", it.take(2), depth - 1); - testEmpty("$name-skipWhile", it.skipWhile((v) => false), depth - 1); - testEmpty("$name-takeWhile", it.takeWhile((v) => true), depth - 1); - } - } - - testType(name, it, [depth = 2]) { - Expect.isTrue(it is Iterable, name); - Expect.isFalse(it is Iterable, name); - if (depth > 0) { - testType("$name-where", it.where((_) => true), depth - 1); - testType("$name-skip", it.skip(1), depth - 1); - testType("$name-take", it.take(1), depth - 1); - testType("$name-skipWhile", it.skipWhile((_) => false), depth - 1); - testType("$name-takeWhile", it.takeWhile((_) => true), depth - 1); - testType("$name-toList", it.toList(), depth - 1); - testType("$name-toList", it.toList(growable: false), depth - 1); - testType("$name-toList", it.toList(growable: true), depth - 1); - testType("$name-toSet", it.toSet(), depth - 1); - } - } - - test(name, it) { - testEmpty(name, it); - testType(name, it); - } - - test("const", const Iterable.empty()); - test("new", new Iterable.empty()); -} diff --git a/tests/corelib_2/iterable_expand_test.dart b/tests/corelib_2/iterable_expand_test.dart deleted file mode 100644 index ed918a773e2..00000000000 --- a/tests/corelib_2/iterable_expand_test.dart +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:collection'; - -class MyList extends ListBase { - List list; - MyList(this.list); - - get length => list.length; - set length(val) { - list.length = val; - } - - operator [](index) => list[index]; - operator []=(index, val) => list[index] = val; - - String toString() => "[" + join(", ") + "]"; -} - -main() { - test(expectation, iterable) { - Expect.listEquals(expectation, iterable.toList()); - } - - // Function not called on empty iterable. - test( - [], - [].expand((x) { - throw "not called"; - })); - - // Creating the iterable doesn't call the function. - [1].expand((x) { - throw "not called"; - }); - - test([1], [1].expand((x) => [x])); - test([1, 2, 3], [1, 2, 3].expand((x) => [x])); - - test([], [1].expand((x) => [])); - test([], [1, 2, 3].expand((x) => [])); - test([2], [1, 2, 3].expand((x) => x == 2 ? [2] : [])); - - test([1, 1, 2, 2, 3, 3], [1, 2, 3].expand((x) => [x, x])); - test([1, 1, 2], [1, 2, 3].expand((x) => [x, x, x].skip(x))); - - test([1], new MyList([1]).expand((x) => [x])); - test([1, 2, 3], new MyList([1, 2, 3]).expand((x) => [x])); - - test([], new MyList([1]).expand((x) => [])); - test([], new MyList([1, 2, 3]).expand((x) => [])); - test([2], new MyList([1, 2, 3]).expand((x) => x == 2 ? [2] : [])); - - test([1, 1, 2, 2, 3, 3], new MyList([1, 2, 3]).expand((x) => [x, x])); - test([1, 1, 2], new MyList([1, 2, 3]).expand((x) => [x, x, x].skip(x))); - - // if function throws, iteration is stopped. - Iterable iterable = [1, 2, 3].expand((x) { - if (x == 2) throw "FAIL"; - return [x, x]; - }); - Iterator it = iterable.iterator; - Expect.isTrue(it.moveNext()); - Expect.equals(1, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(1, it.current); - Expect.throws(it.moveNext, (e) => e == "FAIL"); - // After throwing, iteration is ended. - Expect.equals(null, it.current); - Expect.isFalse(it.moveNext()); -} diff --git a/tests/corelib_2/iterable_first_test.dart b/tests/corelib_2/iterable_first_test.dart deleted file mode 100644 index 2e32935195c..00000000000 --- a/tests/corelib_2/iterable_first_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - List list1 = [1, 2, 3]; - List list2 = const [4, 5]; - List list3 = []; - Set set1 = new Set(); - set1..add(11)..add(12)..add(13); - Set set2 = new Set(); - - Expect.equals(1, list1.first); - Expect.equals(4, list2.first); - Expect.throwsStateError(() => list3.first); - - Expect.isTrue(set1.contains(set1.first)); - - Expect.throwsStateError(() => set2.first); -} diff --git a/tests/corelib_2/iterable_first_where_test.dart b/tests/corelib_2/iterable_first_where_test.dart deleted file mode 100644 index 3b17df48250..00000000000 --- a/tests/corelib_2/iterable_first_where_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'package:expect/expect.dart'; - -main() { - List list1 = [1, 2, 3]; - List list2 = const [4, 5]; - List list3 = []; - Set set1 = new Set(); - set1..add(11)..add(12)..add(13); - Set set2 = new Set(); - - Expect.equals(2, list1.firstWhere((x) => x.isEven)); - Expect.equals(1, list1.firstWhere((x) => x.isOdd)); - Expect.throwsStateError(() => list1.firstWhere((x) => x > 3)); - Expect.equals(null, list1.firstWhere((x) => x > 3, orElse: () => null)); - Expect.equals(499, list1.firstWhere((x) => x > 3, orElse: () => 499)); - - Expect.equals(4, list2.firstWhere((x) => x.isEven)); - Expect.equals(5, list2.firstWhere((x) => x.isOdd)); - Expect.throwsStateError(() => list2.firstWhere((x) => x == 0)); - Expect.equals(null, list2.firstWhere((x) => false, orElse: () => null)); - Expect.equals(499, list2.firstWhere((x) => false, orElse: () => 499)); - - Expect.throwsStateError(() => list3.firstWhere((x) => x == 0)); - Expect.throwsStateError(() => list3.firstWhere((x) => true)); - Expect.equals(null, list3.firstWhere((x) => true, orElse: () => null)); - Expect.equals("str", list3.firstWhere((x) => false, orElse: () => "str")); - - Expect.equals(12, set1.firstWhere((x) => x.isEven)); - var odd = set1.firstWhere((x) => x.isOdd); - Expect.isTrue(odd == 11 || odd == 13); - Expect.throwsStateError(() => set1.firstWhere((x) => false)); - Expect.equals(null, set1.firstWhere((x) => false, orElse: () => null)); - Expect.equals(499, set1.firstWhere((x) => false, orElse: () => 499)); - - Expect.throwsStateError(() => set2.firstWhere((x) => false)); - Expect.throwsStateError(() => set2.firstWhere((x) => true)); - Expect.equals(null, set2.firstWhere((x) => true, orElse: () => null)); - Expect.equals(499, set2.firstWhere((x) => false, orElse: () => 499)); -} diff --git a/tests/corelib_2/iterable_fold_test.dart b/tests/corelib_2/iterable_fold_test.dart deleted file mode 100644 index 88b1d294b1f..00000000000 --- a/tests/corelib_2/iterable_fold_test.dart +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; -import 'dart:collection'; -import 'dart:typed_data'; - -class MyList extends ListBase { - List list; - MyList(this.list); - - get length => list.length; - set length(val) { - list.length = val; - } - - operator [](index) => list[index]; - operator []=(index, val) => list[index] = val; -} - -Iterable id(Iterable x) => x; - -main() { - for (dynamic iterable in [ - const [1, 2, 3], - [1, 2, 3], - new List.filled(3, null) - ..[0] = 1 - ..[1] = 2 - ..[2] = 3, - {1: 1, 2: 2, 3: 3}.keys, - {1: 1, 2: 2, 3: 3}.values, - new Iterable.generate(3, (x) => x + 1), - new List.generate(3, (x) => x + 1), - [0, 1, 2, 3].where((x) => x > 0), - [0, 1, 2].map((x) => x + 1), - [ - [1, 2], - [3] - ].expand(id), - [3, 2, 1].reversed, - [0, 1, 2, 3].skip(1), - [1, 2, 3, 4].take(3), - new Uint8List(3) - ..[0] = 1 - ..[1] = 2 - ..[2] = 3, - (new HashMap() - ..[1] = 1 - ..[2] = 2 - ..[3] = 3) - .keys, - (new HashMap() - ..[1] = 1 - ..[2] = 2 - ..[3] = 3) - .values, - (new SplayTreeMap() - ..[1] = 0 - ..[2] = 0 - ..[3] = 0) - .keys, - (new SplayTreeMap() - ..[0] = 1 - ..[1] = 2 - ..[2] = 3) - .values, - new HashSet()..add(1)..add(2)..add(3), - new LinkedHashSet()..add(1)..add(2)..add(3), - new SplayTreeSet()..add(1)..add(2)..add(3), - "\x01\x02\x03".codeUnits, - "\x01\x02\x03".runes, - new MyList([1, 2, 3]), - ]) { - int callCount = 0; - var result = iterable.fold(0, (x, y) { - callCount++; - return x + y; - }); - Expect.equals(6, result, "${iterable.runtimeType}"); - Expect.equals(3, callCount); - } - - // Empty iterables are allowed. - for (var iterable in [ - const [], - [], - new List.filled(0, null), - {}.keys, - {}.values, - new Iterable.generate(0, (x) => x + 1), - new List.generate(0, (x) => x + 1), - [0, 1, 2, 3].where((x) => false), - [].map((x) => x + 1), - [[], []].expand(id), - [].reversed, - [0, 1, 2, 3].skip(4), - [1, 2, 3, 4].take(0), - new Uint8List(0), - (new HashMap()).keys, - (new HashMap()).values, - (new SplayTreeMap()).keys, - (new SplayTreeMap()).values, - new HashSet(), - new LinkedHashSet(), - new SplayTreeSet(), - "".codeUnits, - "".runes, - new MyList([]), - ]) { - Expect.equals(42, iterable.fold(42, (x, y) => throw "Unreachable")); - } - - // Singleton iterables are calling reduce function. - for (dynamic iterable in [ - const [1], - [1], - new List.filled(1, null)..[0] = 1, - {1: 1}.keys, - {1: 1}.values, - new Iterable.generate(1, (x) => x + 1), - new List.generate(1, (x) => x + 1), - [0, 1, 2, 3].where((x) => x == 1), - [0].map((x) => x + 1), - [ - [], - [1] - ].expand(id), - [1].reversed, - [0, 1].skip(1), - [1, 2, 3, 4].take(1), - new Uint8List(1)..[0] = 1, - (new HashMap()..[1] = 0).keys, - (new HashMap()..[0] = 1).values, - (new SplayTreeMap()..[1] = 0).keys, - (new SplayTreeMap()..[0] = 1).values, - new HashSet()..add(1), - new LinkedHashSet()..add(1), - new SplayTreeSet()..add(1), - "\x01".codeUnits, - "\x01".runes, - new MyList([1]), - ]) { - Expect.equals(43, iterable.fold(42, (x, y) => x + y)); - } - - // Concurrent modifications not allowed. - testModification(base, modify, transform) { - var iterable = transform(base); - Expect.throws(() { - iterable.fold(0, (x, y) { - modify(base); - return x + y; - }); - }, (e) => e is ConcurrentModificationError); - } - - void add4(collection) { - collection.add(4); - } - - void addListOf4(collection) { - collection.add([4]); - } - - void put4(map) { - map[4] = 4; - } - - testModification([1, 2, 3], add4, id); - testModification(new HashSet()..add(1)..add(2)..add(3), add4, id); - testModification(new LinkedHashSet()..add(1)..add(2)..add(3), add4, id); - testModification(new SplayTreeSet()..add(1)..add(2)..add(3), add4, id); - testModification(new MyList([1, 2, 3]), add4, id); - - testModification([0, 1, 2, 3], add4, (x) => x.where((int x) => x > 0)); - testModification([0, 1, 2], add4, (x) => x.map((x) => x + 1)); - testModification([ - [1, 2], - [3] - ], addListOf4, (x) => x.expand((List x) => x)); - testModification([3, 2, 1], add4, (x) => x.reversed); - testModification({1: 1, 2: 2, 3: 3}, put4, (x) => x.keys); - testModification({1: 1, 2: 2, 3: 3}, put4, (x) => x.values); - var hashMap = new HashMap() - ..[1] = 1 - ..[2] = 2 - ..[3] = 3; - testModification(hashMap, put4, (x) => x.keys); - hashMap = new HashMap() - ..[1] = 1 - ..[2] = 2 - ..[3] = 3; - testModification(hashMap, put4, (x) => x.values); - var splayMap = new SplayTreeMap() - ..[1] = 1 - ..[2] = 2 - ..[3] = 3; - testModification(splayMap, put4, (x) => x.keys); - splayMap = new SplayTreeMap() - ..[1] = 1 - ..[2] = 2 - ..[3] = 3; - testModification(splayMap, put4, (x) => x.values); -} diff --git a/tests/corelib_2/iterable_followed_by_test.dart b/tests/corelib_2/iterable_followed_by_test.dart deleted file mode 100644 index 4a56e2d5925..00000000000 --- a/tests/corelib_2/iterable_followed_by_test.dart +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) 2018, 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 - -import "dart:collection" show Queue; -import "dart:typed_data" show Int32List; - -import "package:expect/expect.dart"; - -// Tests behavior of result of an operation on a followedBy iterable. -test(List expects, Iterable iterable, [String name]) { - try { - Expect.isFalse(iterable is List, "$name is! List"); - Expect.isFalse(iterable is Set, "$name is! Set"); - Expect.isFalse(iterable is Queue, "$name is! Queue"); - if (expects.isNotEmpty) { - Expect.equals(expects.first, iterable.first, "$name: first"); - Expect.equals(expects.last, iterable.last, "$name: last"); - } else { - Expect.throwsStateError(() => iterable.first, "$name: first"); - Expect.throwsStateError(() => iterable.last, "$name: last"); - } - var it = iterable.iterator; - for (int index = 0; index < expects.length; index++) { - Expect.isTrue(it.moveNext(), "$name: has element $index"); - var expect = expects[index]; - Expect.equals(expect, it.current, "$name at $index"); - Expect.equals( - expect, iterable.elementAt(index), "$name: elementAt($index)"); - Expect.isTrue(iterable.contains(expect), "$name:contains $index"); - } - Expect.isFalse(it.moveNext(), - "$name: extra element at ${expects.length}: ${it.current}"); - } on Error { - print("Failed during: $name"); - rethrow; - } -} - -// Tests various operations on the a followedBy iterable. -tests(List expects, Iterable follow, [String name]) { - int length = expects.length; - test(expects, follow, name); - for (int i = 0; i <= length; i++) { - test(expects.sublist(i), follow.skip(i), "$name.skip($i)"); - } - for (int i = 0; i <= length; i++) { - test(expects.sublist(0, i), follow.take(i), "$name.take($i)"); - } - for (int i = 0; i <= length; i++) { - for (int j = 0; j <= length - i; j++) { - test(expects.sublist(i, i + j), follow.skip(i).take(j), - "$name.skiptake($i,${i+j})"); - test(expects.sublist(i, i + j), follow.take(i + j).skip(i), - "$name.takeskip($i,${i+j})"); - } - } -} - -// Tests various different types of iterables as first and second operand. -types(List expects, List first, List second, [String name]) { - var conversions = Function(List)>{ - "const": toConst, - "list": toList, - "unmod": toUnmodifiable, - "set": toSet, - "queue": toQueue, - "eff-len-iter": toELIter, - "non-eff-iter": toNEIter, - "typed": toTyped, - "keys": toKeys, - "values": toValues, - }; - conversions.forEach((n1, c1) { - conversions.forEach((n2, c2) { - tests(expects, c1(first).followedBy(c2(second)), "$name:$n1/$n2"); - }); - }); -} - -List toConst(List elements) => elements; -List toList(List elements) => elements.toList(); -List toUnmodifiable(List elements) => - new List.unmodifiable(elements); -Set toSet(List elements) => elements.toSet(); -Queue toQueue(List elements) => new Queue.from(elements); -// Creates an efficient-length iterable. -Iterable toELIter(List elements) => elements.map((x) => x); -// Creates a non-efficient-length iterable. -Iterable toNEIter(List elements) => elements.where((x) => true); -List toTyped(List elements) => new Int32List.fromList(elements); -Iterable toKeys(List elements) => - new Map.fromIterables(elements, elements).keys; -Iterable toValues(List elements) => - new Map.fromIterables(elements, elements).values; - -main() { - types([], const [], const [], "0+0"); - types([1, 2, 3, 4], const [], const [1, 2, 3, 4], "0+4"); - types([1, 2, 3, 4], const [1, 2], const [3, 4], "2+2"); - types([1, 2, 3, 4], const [1, 2, 3, 4], const [], "4+0"); -} diff --git a/tests/corelib_2/iterable_generate_test.dart b/tests/corelib_2/iterable_generate_test.dart deleted file mode 100644 index d541d04fd5c..00000000000 --- a/tests/corelib_2/iterable_generate_test.dart +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -main() { - void test(expectedList, generatedIterable) { - Expect.equals(expectedList.length, generatedIterable.length); - Expect.listEquals(expectedList, generatedIterable.toList()); - } - - test([], new Iterable.generate(0)); - test([0], new Iterable.generate(1)); - test([0, 1, 2, 3, 4], new Iterable.generate(5)); - test(["0", "1", "2", "3", "4"], new Iterable.generate(5, (x) => "$x")); - test([2, 3, 4, 5, 6], new Iterable.generate(7).skip(2)); - test([0, 1, 2, 3, 4], new Iterable.generate(7).take(5)); - test([], new Iterable.generate(5).skip(6)); - test([], new Iterable.generate(5).take(0)); - test([], new Iterable.generate(5).take(3).skip(3)); - test([], new Iterable.generate(5).skip(6).take(0)); - - // Test types. - - Iterable it = new Iterable.generate(5); - Expect.isTrue(it is Iterable); - Expect.isTrue(it.iterator is Iterator); - Expect.isTrue(it is! Iterable); - Expect.isTrue(it.iterator is! Iterator); - test([0, 1, 2, 3, 4], it); - - Iterable st = new Iterable.generate(5, (x) => "$x"); - Expect.isTrue(st is Iterable); - Expect.isTrue(st.iterator is Iterator); - Expect.isFalse(st is Iterable); - Expect.isFalse(st.iterator is Iterator); - test(["0", "1", "2", "3", "4"], st); - - Expect.throws(() => new Iterable.generate(5)); - - // Omitted generator function means `(int x) => x`, and the type parameters - // must then be compatible with `int`. - // Check that we catch invalid type parameters. - - // Valid types: - Iterable iter1 = new Iterable.generate(5); - Expect.equals(2, iter1.elementAt(2)); - Iterable iter2 = new Iterable.generate(5); - Expect.equals(2, iter2.elementAt(2)); - Iterable iter3 = new Iterable.generate(5); - Expect.equals(2, iter3.elementAt(2)); - Iterable iter4 = new Iterable.generate(5); - Expect.equals(2, iter4.elementAt(2)); - - // Invalid types: - Expect.throws(() => new Iterable.generate(5)); - Expect.throws(() => new Iterable.generate(5).elementAt(2)); //# 01: ok - Expect.throws(() => new Iterable.generate(5)); - - // Regression: https://github.com/dart-lang/sdk/issues/26358 - var count = 0; - var iter = new Iterable.generate(5, (v) { - count++; - return v; - }); - Expect.equals(0, count); - Expect.equals(2, iter.elementAt(2)); // Doesn't compute the earlier values. - Expect.equals(1, count); - Expect.equals(2, iter.skip(2).first); // Doesn't compute the skipped values. - Expect.equals(2, count); -} diff --git a/tests/corelib_2/iterable_join_test.dart b/tests/corelib_2/iterable_join_test.dart deleted file mode 100644 index 8bc35b90b15..00000000000 --- a/tests/corelib_2/iterable_join_test.dart +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class IC { - int count = 0; - String toString() => "${count++}"; -} - -testJoin(String expect, Iterable iterable, [String separator]) { - if (separator != null) { - Expect.equals(expect, iterable.join(separator)); - } else { - Expect.equals(expect, iterable.join()); - } -} - -testCollections() { - testJoin("", [], ","); - testJoin("", [], ""); - testJoin("", []); - testJoin("", new Set(), ","); - testJoin("", new Set(), ""); - testJoin("", new Set()); - - testJoin("42", [42], ","); - testJoin("42", [42], ""); - testJoin("42", [42]); - testJoin("42", new Set()..add(42), ","); - testJoin("42", new Set()..add(42), ""); - testJoin("42", new Set()..add(42)); - - testJoin("a,b,c,d", ["a", "b", "c", "d"], ","); - testJoin("abcd", ["a", "b", "c", "d"], ""); - testJoin("abcd", ["a", "b", "c", "d"]); - testJoin("null,b,c,d", [null, "b", "c", "d"], ","); - testJoin("1,2,3,4", [1, 2, 3, 4], ","); - var ic = new IC(); - testJoin("0,1,2,3", [ic, ic, ic, ic], ","); - - var set = new Set()..add(1)..add(2)..add(3); - var perm = new Set() - ..add("123") - ..add("132") - ..add("213") - ..add("231") - ..add("312") - ..add("321"); - var setString = set.join(); - Expect.isTrue(perm.contains(setString), "set: $setString"); - - void testArray(List array) { - testJoin("1,3,5,7,9", array.where((i) => i.isOdd), ","); - testJoin("0,2,4,6,8,10,12,14,16,18", array.map((i) => i * 2), ","); - testJoin("5,6,7,8,9", array.skip(5), ","); - testJoin("5,6,7,8,9", array.skipWhile((i) => i < 5), ","); - testJoin("0,1,2,3,4", array.take(5), ","); - testJoin("0,1,2,3,4", array.takeWhile((i) => i < 5), ","); - } - - testArray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]); - var fixedArray = new List.filled(10, null); - for (int i = 0; i < 10; i++) { - fixedArray[i] = i; - } - testArray(fixedArray); - testArray(const [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]); - - testJoin("a,b,c,d", ["a", "b", "c", "d"].map((x) => x), ","); - testJoin("abcd", ["a", "b", "c", "d"].map((x) => x), ""); - testJoin("abcd", ["a", "b", "c", "d"].map((x) => x)); - testJoin("null,b,c,d", [null, "b", "c", "d"].map((x) => x), ","); - testJoin("1,2,3,4", [1, 2, 3, 4].map((x) => x), ","); - testJoin("4,5,6,7", [ic, ic, ic, ic].map((x) => x), ","); -} - -void testStringVariants() { - // ASCII - testJoin("axbxcxd", ["a", "b", "c", "d"], "x"); - testJoin("a\u2000b\u2000c\u2000d", ["a", "b", "c", "d"], "\u2000"); - testJoin("abcd", ["a", "b", "c", "d"], ""); - testJoin("abcd", ["a", "b", "c", "d"]); - // Non-ASCII - testJoin("axbxcx\u2000", ["a", "b", "c", "\u2000"], "x"); - testJoin("a\u2000b\u2000c\u2000\u2000", ["a", "b", "c", "\u2000"], "\u2000"); - testJoin("abc\u2000", ["a", "b", "c", "\u2000"], ""); - testJoin("abc\u2000", ["a", "b", "c", "\u2000"]); - // Long-ASCII - testJoin("ax" * 255 + "a", new List.generate(256, (_) => "a"), "x"); - testJoin("a" * 256, new List.generate(256, (_) => "a")); - // Long-Non-ASCII - testJoin("a\u2000" * 255 + "a", new List.generate(256, (_) => "a"), "\u2000"); - testJoin("\u2000" * 256, new List.generate(256, (_) => "\u2000")); - testJoin( - "\u2000x" * 255 + "\u2000", new List.generate(256, (_) => "\u2000"), "x"); - - var o1 = new Stringable("x"); - var o2 = new Stringable("\ufeff"); - testJoin("xa" * 3 + "x", [o1, o1, o1, o1], "a"); - testJoin("x" * 4, [o1, o1, o1, o1], ""); - testJoin("x" * 4, [o1, o1, o1, o1]); - - testJoin("\ufeffx" * 3 + "\ufeff", [o2, o2, o2, o2], "x"); - testJoin("\ufeff" * 4, [o2, o2, o2, o2], ""); - testJoin("\ufeff" * 4, [o2, o2, o2, o2]); - - testJoin("a\u2000x\ufeff", ["a", "\u2000", o1, o2]); - testJoin("a\u2000\ufeffx", ["a", "\u2000", o2, o1]); - testJoin("ax\u2000\ufeff", ["a", o1, "\u2000", o2]); - testJoin("ax\ufeff\u2000", ["a", o1, o2, "\u2000"]); - testJoin("a\ufeffx\u2000", ["a", o2, o1, "\u2000"]); - testJoin("a\ufeff\u2000x", ["a", o2, "\u2000", o1]); - - testJoin("\u2000ax\ufeff", ["\u2000", "a", o1, o2]); - testJoin("\u2000a\ufeffx", ["\u2000", "a", o2, o1]); - testJoin("xa\u2000\ufeff", [o1, "a", "\u2000", o2]); - testJoin("xa\ufeff\u2000", [o1, "a", o2, "\u2000"]); - testJoin("\ufeffax\u2000", [o2, "a", o1, "\u2000"]); - testJoin("\ufeffa\u2000x", [o2, "a", "\u2000", o1]); - - testJoin("\u2000xa\ufeff", ["\u2000", o1, "a", o2]); - testJoin("\u2000\ufeffax", ["\u2000", o2, "a", o1]); - testJoin("x\u2000a\ufeff", [o1, "\u2000", "a", o2]); - testJoin("x\ufeffa\u2000", [o1, o2, "a", "\u2000"]); - testJoin("\ufeffxa\u2000", [o2, o1, "a", "\u2000"]); - testJoin("\ufeff\u2000ax", [o2, "\u2000", "a", o1]); - - testJoin("\u2000x\ufeffa", ["\u2000", o1, o2, "a"]); - testJoin("\u2000\ufeffxa", ["\u2000", o2, o1, "a"]); - testJoin("x\u2000\ufeffa", [o1, "\u2000", o2, "a"]); - testJoin("x\ufeff\u2000a", [o1, o2, "\u2000", "a"]); - testJoin("\ufeffx\u2000a", [o2, o1, "\u2000", "a"]); - testJoin("\ufeff\u2000xa", [o2, "\u2000", o1, "a"]); -} - -class Stringable { - final String value; - Stringable(this.value); - String toString() => value; -} - -main() { - testCollections(); - testStringVariants(); - // TODO(lrn): test scalar lists. -} diff --git a/tests/corelib_2/iterable_last_test.dart b/tests/corelib_2/iterable_last_test.dart deleted file mode 100644 index ae37bebb99f..00000000000 --- a/tests/corelib_2/iterable_last_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - List list1 = [1, 2, 3]; - List list2 = const [4, 5]; - List list3 = []; - Set set1 = new Set(); - set1..add(11)..add(12)..add(13); - Set set2 = new Set(); - - Expect.equals(3, list1.last); - Expect.equals(5, list2.last); - Expect.throwsStateError(() => list3.last); - - Expect.isTrue(set1.contains(set1.last)); - - Expect.throwsStateError(() => set2.last); -} diff --git a/tests/corelib_2/iterable_last_where_test.dart b/tests/corelib_2/iterable_last_where_test.dart deleted file mode 100644 index fd96e81faf8..00000000000 --- a/tests/corelib_2/iterable_last_where_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'package:expect/expect.dart'; - -main() { - List list1 = [1, 2, 3]; - List list2 = const [4, 5, 6]; - List list3 = []; - Set set1 = new Set(); - set1..add(11)..add(12)..add(13); - Set set2 = new Set(); - - Expect.equals(2, list1.lastWhere((x) => x.isEven)); - Expect.equals(3, list1.lastWhere((x) => x.isOdd)); - Expect.throwsStateError(() => list1.lastWhere((x) => x > 3)); - Expect.equals(null, list1.lastWhere((x) => x > 3, orElse: () => null)); - Expect.equals(499, list1.lastWhere((x) => x > 3, orElse: () => 499)); - - Expect.equals(6, list2.lastWhere((x) => x.isEven)); - Expect.equals(5, list2.lastWhere((x) => x.isOdd)); - Expect.throwsStateError(() => list2.lastWhere((x) => x == 0)); - Expect.equals(null, list2.lastWhere((x) => false, orElse: () => null)); - Expect.equals(499, list2.lastWhere((x) => false, orElse: () => 499)); - - Expect.throwsStateError(() => list3.lastWhere((x) => x == 0)); - Expect.throwsStateError(() => list3.lastWhere((x) => true)); - Expect.equals(null, list3.lastWhere((x) => true, orElse: () => null)); - Expect.equals("str", list3.lastWhere((x) => false, orElse: () => "str")); - - Expect.equals(12, set1.lastWhere((x) => x.isEven)); - var odd = set1.lastWhere((x) => x.isOdd); - Expect.isTrue(odd == 11 || odd == 13); - Expect.throwsStateError(() => set1.lastWhere((x) => false)); - Expect.equals(null, set1.lastWhere((x) => false, orElse: () => null)); - Expect.equals(499, set1.lastWhere((x) => false, orElse: () => 499)); - - Expect.throwsStateError(() => set2.lastWhere((x) => false)); - Expect.throwsStateError(() => set2.lastWhere((x) => true)); - Expect.equals(null, set2.lastWhere((x) => true, orElse: () => null)); - Expect.equals(499, set2.lastWhere((x) => false, orElse: () => 499)); -} diff --git a/tests/corelib_2/iterable_length_test.dart b/tests/corelib_2/iterable_length_test.dart deleted file mode 100644 index 692a4f5d0bd..00000000000 --- a/tests/corelib_2/iterable_length_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2012, 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 - -import "dart:collection"; -import "package:expect/expect.dart"; - -class A extends IterableBase { - int count; - A(this.count); - - Iterator get iterator { - return new AIterator(count); - } -} - -class AIterator implements Iterator { - int _count; - int _current; - - AIterator(this._count); - - bool moveNext() { - if (_count > 0) { - _current = _count; - _count--; - return true; - } - _current = null; - return false; - } - - get current => _current; -} - -main() { - var a = new A(10); - Expect.equals(10, a.length); - a = new A(0); - Expect.equals(0, a.length); - a = new A(5); - Expect.equals(5, a.map((e) => e + 1).length); - Expect.equals(3, a.where((e) => e >= 3).length); -} diff --git a/tests/corelib_2/iterable_mapping_test.dart b/tests/corelib_2/iterable_mapping_test.dart deleted file mode 100644 index 5c6f30006d8..00000000000 --- a/tests/corelib_2/iterable_mapping_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -main() { - List list1 = [1, 2, 3]; - List list2 = const [4, 5]; - List list3 = []; - Set set1 = new Set(); - set1.addAll([11, 12, 13]); - Set set2 = new Set(); - - Iterable mapped = list1.map((x) => x + 1); - Expect.listEquals([2, 3, 4], mapped.toList()); - - mapped = mapped.map((x) => x + 1); - Expect.listEquals([3, 4, 5], mapped.toList()); - - mapped = list2.map((x) => x + 1); - Expect.listEquals([5, 6], mapped.toList()); - - mapped = mapped.map((x) => x + 1); - Expect.listEquals([6, 7], mapped.toList()); - - mapped = list3.map((x) => x + 1); //# 01: compile-time error - Expect.listEquals([], mapped.toList()); //# 01: continued - - mapped = mapped.map((x) => x + 1); //# 01: continued - Expect.listEquals([], mapped.toList()); //# 01: continued - - var expected = new Set()..addAll([12, 13, 14]); - mapped = set1.map((x) => x + 1); - Expect.isFalse(mapped is List); - Expect.setEquals(expected, mapped.toSet()); - - expected = new Set()..addAll([13, 14, 15]); - mapped = mapped.map((x) => x + 1); - Expect.isFalse(mapped is List); - Expect.setEquals(expected, mapped.toSet()); - - mapped = set2.map((x) => x + 1); - Expect.isFalse(mapped is List); - Expect.listEquals([], mapped.toList()); - - mapped = mapped.map((x) => x + 1); - Expect.isFalse(mapped is List); - Expect.listEquals([], mapped.toList()); -} diff --git a/tests/corelib_2/iterable_reduce_test.dart b/tests/corelib_2/iterable_reduce_test.dart deleted file mode 100644 index 8b32959a2e4..00000000000 --- a/tests/corelib_2/iterable_reduce_test.dart +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; -import 'dart:collection'; -import 'dart:typed_data'; - -class MyList extends ListBase { - List list; - MyList(this.list); - - get length => list.length; - set length(val) { - list.length = val; - } - - operator [](index) => list[index]; - operator []=(index, val) => list[index] = val; -} - -Iterable id(Iterable x) => x; - -main() { - // Test functionality. - for (dynamic iterable in [ - const [1, 2, 3], - [1, 2, 3], - new List.filled(3, null) - ..[0] = 1 - ..[1] = 2 - ..[2] = 3, - {1: 1, 2: 2, 3: 3}.keys, - {1: 1, 2: 2, 3: 3}.values, - new Iterable.generate(3, (x) => x + 1), - new List.generate(3, (x) => x + 1), - [0, 1, 2, 3].where((x) => x > 0), - [0, 1, 2].map((x) => x + 1), - [ - [1, 2], - [3] - ].expand(id), - [3, 2, 1].reversed, - [0, 1, 2, 3].skip(1), - [1, 2, 3, 4].take(3), - new Uint8List(3) - ..[0] = 1 - ..[1] = 2 - ..[2] = 3, - (new HashMap() - ..[1] = 1 - ..[2] = 2 - ..[3] = 3) - .keys, - (new HashMap() - ..[1] = 1 - ..[2] = 2 - ..[3] = 3) - .values, - (new SplayTreeMap() - ..[1] = 0 - ..[2] = 0 - ..[3] = 0) - .keys, - (new SplayTreeMap() - ..[0] = 1 - ..[1] = 2 - ..[2] = 3) - .values, - new HashSet()..add(1)..add(2)..add(3), - new LinkedHashSet()..add(1)..add(2)..add(3), - new SplayTreeSet()..add(1)..add(2)..add(3), - "\x01\x02\x03".codeUnits, - "\x01\x02\x03".runes, - new MyList([1, 2, 3]), - ]) { - int callCount = 0; - var result = iterable.reduce((x, y) { - callCount++; - // Return type of reduce() callback should match element type. - return (x + y) as int; - }); - Expect.equals(6, result, "${iterable.runtimeType}"); - Expect.equals(2, callCount); - } - - // Empty iterables not allowed. - for (var iterable in [ - const [], - [], - new List.filled(0, null), - {}.keys, - {}.values, - new Iterable.generate(0, (x) => x + 1), - new List.generate(0, (x) => x + 1), - [0, 1, 2, 3].where((x) => false), - [].map((x) => x + 1), - [[], []].expand(id), - [].reversed, - [0, 1, 2, 3].skip(4), - [1, 2, 3, 4].take(0), - new Uint8List(0), - (new HashMap()).keys, - (new HashMap()).values, - (new SplayTreeMap()).keys, - (new SplayTreeMap()).values, - new HashSet(), - new LinkedHashSet(), - new SplayTreeSet(), - "".codeUnits, - "".runes, - new MyList([]), - ]) { - Expect - .throwsStateError(() => iterable.reduce((x, y) => throw "Unreachable")); - } - - // Singleton iterables not calling reduce function. - for (dynamic iterable in [ - const [1], - [1], - new List.filled(1, null)..[0] = 1, - {1: 1}.keys, - {1: 1}.values, - new Iterable.generate(1, (x) => x + 1), - new List.generate(1, (x) => x + 1), - [0, 1, 2, 3].where((x) => x == 1), - [0].map((x) => x + 1), - [ - [], - [1] - ].expand(id), - [1].reversed, - [0, 1].skip(1), - [1, 2, 3, 4].take(1), - new Uint8List(1)..[0] = 1, - (new HashMap()..[1] = 0).keys, - (new HashMap()..[0] = 1).values, - (new SplayTreeMap()..[1] = 0).keys, - (new SplayTreeMap()..[0] = 1).values, - new HashSet()..add(1), - new LinkedHashSet()..add(1), - new SplayTreeSet()..add(1), - "\x01".codeUnits, - "\x01".runes, - new MyList([1]), - ]) { - Expect.equals(1, iterable.reduce((x, y) => throw "Unreachable")); - } - - // Concurrent modifications not allowed. - testModification(base, modify, transform) { - var iterable = transform(base); - Expect.throws(() { - iterable.reduce((x, y) { - modify(base); - // Return type of reduce() callback should match element type. - return (x + y) as int; - }); - }, (e) => e is ConcurrentModificationError); - } - - void add4(collection) { - collection.add(4); - } - - void addListOf4(collection) { - collection.add([4]); - } - - void put4(map) { - map[4] = 4; - } - - testModification([1, 2, 3], add4, id); - testModification(new HashSet()..add(1)..add(2)..add(3), add4, id); - testModification(new LinkedHashSet()..add(1)..add(2)..add(3), add4, id); - testModification(new SplayTreeSet()..add(1)..add(2)..add(3), add4, id); - testModification(new MyList([1, 2, 3]), add4, id); - - testModification([0, 1, 2, 3], add4, (x) => x.where((int x) => x > 0)); - testModification([0, 1, 2], add4, (x) => x.map((x) => x + 1)); - testModification([ - [1, 2], - [3] - ], addListOf4, (x) => x.expand((List x) => x)); - testModification([3, 2, 1], add4, (x) => x.reversed); - testModification({1: 1, 2: 2, 3: 3}, put4, (x) => x.keys); - testModification({1: 1, 2: 2, 3: 3}, put4, (x) => x.values); - var hashMap = new HashMap() - ..[1] = 1 - ..[2] = 2 - ..[3] = 3; - testModification(hashMap, put4, (x) => x.keys); - hashMap = new HashMap() - ..[1] = 1 - ..[2] = 2 - ..[3] = 3; - testModification(hashMap, put4, (x) => x.values); - var splayMap = new SplayTreeMap() - ..[1] = 1 - ..[2] = 2 - ..[3] = 3; - testModification(splayMap, put4, (x) => x.keys); - splayMap = new SplayTreeMap() - ..[1] = 1 - ..[2] = 2 - ..[3] = 3; - testModification(splayMap, put4, (x) => x.values); -} diff --git a/tests/corelib_2/iterable_return_type_helper.dart b/tests/corelib_2/iterable_return_type_helper.dart deleted file mode 100644 index 29c133afb68..00000000000 --- a/tests/corelib_2/iterable_return_type_helper.dart +++ /dev/null @@ -1,45 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -testIntIterable(iterable) { - Expect.isTrue(iterable is Iterable, "${iterable.runtimeType}"); - Expect.isFalse(iterable is Iterable, "${iterable.runtimeType}"); -} - -void testIterable(Iterable iterable, [int depth = 3]) { - testIntIterable(iterable); - if (depth > 0) { - testIterable(iterable.where((x) => true), depth - 1); - testIterable(iterable.skip(1), depth - 1); - testIterable(iterable.take(1), depth - 1); - testIterable(iterable.skipWhile((x) => false), depth - 1); - testIterable(iterable.takeWhile((x) => true), depth - 1); - testList(iterable.toList(growable: true), depth - 1); - testList(iterable.toList(growable: false), depth - 1); - testIterable(iterable.toSet(), depth - 1); - } -} - -void testList(List list, [int depth = 3]) { - testIterable(list, depth); - if (depth > 0) { - testIterable(list.getRange(0, list.length), depth - 1); - testIterable(list.reversed, depth - 1); - testMap(list.asMap(), depth - 1); - } -} - -void testMap(Map map, [int depth = 3]) { - Expect.isTrue(map is Map); - Expect.isFalse(map is Map); - Expect.isFalse(map is Map); - if (depth > 0) { - testIterable(map.keys, depth - 1); - testIterable(map.values, depth - 1); - } -} diff --git a/tests/corelib_2/iterable_return_type_int64_test.dart b/tests/corelib_2/iterable_return_type_int64_test.dart deleted file mode 100644 index 0087c4786bc..00000000000 --- a/tests/corelib_2/iterable_return_type_int64_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Separate test for int64 support to be skipped on the web. - -import 'iterable_return_type_helper.dart'; - -import 'dart:collection'; -import 'dart:typed_data'; - -main() { - // Types for int64 support - testList(new Uint64List(1)..[0] = 1); - testList(new Int64List(1)..[0] = 1); -} diff --git a/tests/corelib_2/iterable_return_type_test.dart b/tests/corelib_2/iterable_return_type_test.dart deleted file mode 100644 index cb68bfbd2f2..00000000000 --- a/tests/corelib_2/iterable_return_type_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js where [List.addAll] was not typed -// correctly. - -import 'iterable_return_type_helper.dart'; - -import 'dart:collection'; -import 'dart:typed_data'; - -main() { - // Empty lists. - testList([]); - testList(new List.filled(0, null)); - testList([]); - testList(const []); - testList(new List.generate(0, (x) => x + 1)); - // Singleton lists. - testList([1]); - testList(new List.filled(1, null)..[0] = 1); - testList([]..add(1)); - testList(const [1]); - testList(new List.generate(1, (x) => x + 1)); - - // Typed lists. - testList(new Uint8List(1)..[0] = 1); - testList(new Int8List(1)..[0] = 1); - testList(new Uint16List(1)..[0] = 1); - testList(new Int16List(1)..[0] = 1); - testList(new Uint32List(1)..[0] = 1); - testList(new Int32List(1)..[0] = 1); - - testIterable(new Set()..add(1)); - testIterable(new HashSet()..add(1)); - testIterable(new LinkedHashSet()..add(1)); - testIterable(new SplayTreeSet()..add(1)); - - testIterable(new Queue()..add(1)); - testIterable(new DoubleLinkedQueue()..add(1)); - testIterable(new ListQueue()..add(1)); - - testMap(new Map()..[1] = 1); - testMap(new HashMap()..[1] = 1); - testMap(new LinkedHashMap()..[1] = 1); - testMap(new SplayTreeMap()..[1] = 1); - testMap({1: 1}); - testMap(const {1: 1}); -} diff --git a/tests/corelib_2/iterable_single_test.dart b/tests/corelib_2/iterable_single_test.dart deleted file mode 100644 index bee92bbb511..00000000000 --- a/tests/corelib_2/iterable_single_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - List list1a = [1]; - List list1b = [1, 2, 3]; - List list1c = []; - List list2a = const [5]; - List list2b = const [4, 5]; - List list2c = const []; - Set set1 = new Set(); - set1..add(22); - Set set2 = new Set(); - set2..add(11)..add(12)..add(13); - Set set3 = new Set(); - - Expect.equals(1, list1a.single); - Expect.throwsStateError(() => list1b.single); - Expect.throwsStateError(() => list1c.single); - - Expect.equals(5, list2a.single); - Expect.throwsStateError(() => list2b.single); - Expect.throwsStateError(() => list2c.single); - - Expect.equals(22, set1.single); - Expect.throwsStateError(() => set2.single); - Expect.throwsStateError(() => set3.single); -} diff --git a/tests/corelib_2/iterable_single_where_test.dart b/tests/corelib_2/iterable_single_where_test.dart deleted file mode 100644 index 0acd2c46185..00000000000 --- a/tests/corelib_2/iterable_single_where_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'package:expect/expect.dart'; - -main() { - List list1 = [1, 2, 3]; - List list2 = const [4, 5, 6]; - List list3 = []; - Set set1 = new Set(); - set1..add(11)..add(12)..add(13); - Set set2 = new Set(); - - Expect.equals(2, list1.singleWhere((x) => x.isEven)); - Expect.equals(3, list1.singleWhere((x) => x == 3)); - Expect.throwsStateError(() => list1.singleWhere((x) => x.isOdd)); - - Expect.equals(6, list2.singleWhere((x) => x == 6)); - Expect.equals(5, list2.singleWhere((x) => x.isOdd)); - Expect.throwsStateError(() => list2.singleWhere((x) => x.isEven)); - - Expect.throwsStateError(() => list3.singleWhere((x) => x == 0)); - - Expect.equals(12, set1.singleWhere((x) => x.isEven)); - Expect.equals(11, set1.singleWhere((x) => x == 11)); - Expect.throwsStateError(() => set1.singleWhere((x) => x.isOdd)); - - Expect.throwsStateError(() => set2.singleWhere((x) => true)); -} diff --git a/tests/corelib_2/iterable_skip_test.dart b/tests/corelib_2/iterable_skip_test.dart deleted file mode 100644 index c7a486d5ca5..00000000000 --- a/tests/corelib_2/iterable_skip_test.dart +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - List list1 = [1, 2, 3]; - List list2 = const [4, 5]; - List list3 = []; - Set set1 = new Set(); - set1..add(11)..add(12)..add(13); - Set set2 = new Set(); - - Iterable skip0 = list1.skip(0); - Expect.isTrue(skip0 is! List); - Iterator it = skip0.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(1, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(2, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(3, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - Iterable skip1 = list1.skip(1); - Expect.isTrue(skip1 is! List); - Expect.isTrue(skip1.skip(2).skip(1) is! List); - it = skip1.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(2, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(3, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - Iterable skip2 = list1.skip(2); - Expect.isTrue(skip2 is! List); - Expect.isTrue(skip2.skip(2).skip(1) is! List); - it = skip2.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(3, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - Iterable skip3 = list1.skip(3); - Expect.isTrue(skip3 is! List); - Expect.isTrue(skip3.skip(2).skip(1) is! List); - it = skip3.iterator; - Expect.isNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - Iterable skip4 = list1.skip(4); - Expect.isTrue(skip4 is! List); - Expect.isTrue(skip4.skip(2).skip(1) is! List); - it = skip4.iterator; - Expect.isNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - skip0 = list1.skip(0); - skip1 = skip0.skip(1); - skip2 = skip1.skip(1); - skip3 = skip2.skip(1); - skip4 = skip3.skip(1); - it = skip0.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(1, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(2, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(3, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - it = skip1.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(2, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(3, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - it = skip2.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(3, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - it = skip3.iterator; - Expect.isNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - it = skip4.iterator; - Expect.isNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - skip0 = list2.skip(0); - Expect.isTrue(skip0 is! List); - Expect.isTrue(skip0.skip(2).skip(1) is! List); - it = skip0.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(4, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(5, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - skip1 = list2.skip(1); - Expect.isTrue(skip1 is! List); - Expect.isTrue(skip1.skip(2).skip(1) is! List); - it = skip1.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(5, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - skip2 = list2.skip(2); - Expect.isTrue(skip2 is! List); - Expect.isTrue(skip2.skip(2).skip(1) is! List); - it = skip2.iterator; - Expect.isNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - skip3 = list2.skip(3); - Expect.isTrue(skip3 is! List); - Expect.isTrue(skip3.skip(2).skip(1) is! List); - it = skip3.iterator; - Expect.isNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - Iterable skip02 = list3.skip(0); - Expect.isTrue(skip02 is! List); - Expect.isTrue(skip02.skip(2).skip(1) is! List); - Iterator it2 = skip02.iterator; - Expect.isNull(it2.current); - Expect.isFalse(it2.moveNext()); - Expect.isNull(it2.current); - - Iterable skip12 = list3.skip(1); - Expect.isTrue(skip12 is! List); - Expect.isTrue(skip12.skip(2).skip(1) is! List); - it2 = skip12.iterator; - Expect.isNull(it2.current); - Expect.isFalse(it2.moveNext()); - Expect.isNull(it2.current); - - skip0 = set1.skip(0); - List copied = skip0.toList(); - Expect.equals(3, copied.length); - Expect.isTrue(set1.contains(copied[0])); - Expect.isTrue(set1.contains(copied[1])); - Expect.isTrue(set1.contains(copied[2])); - Expect.isTrue(copied[0] != copied[1]); - Expect.isTrue(copied[0] != copied[2]); - Expect.isTrue(copied[1] != copied[2]); - it = skip0.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.isNotNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.isNotNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.isNotNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - skip1 = set1.skip(1); - copied = skip1.toList(); - Expect.equals(2, copied.length); - Expect.isTrue(set1.contains(copied[0])); - Expect.isTrue(set1.contains(copied[1])); - Expect.isTrue(copied[0] != copied[1]); - it = skip1.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.isNotNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.isNotNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - skip2 = set1.skip(2); - copied = skip2.toList(); - Expect.equals(1, copied.length); - Expect.isTrue(set1.contains(copied[0])); - it = skip2.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.isNotNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - skip3 = set1.skip(3); - it = skip3.iterator; - Expect.isNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - skip4 = set1.skip(4); - it = skip4.iterator; - Expect.isNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - var dynamicSkip0 = set2.skip(0); - var dynamicIt = dynamicSkip0.iterator; - Expect.isNull(dynamicIt.current); - Expect.isFalse(dynamicIt.moveNext()); - Expect.isNull(dynamicIt.current); - - var dynamicSkip1 = set2.skip(1); - dynamicIt = dynamicSkip1.iterator; - Expect.isNull(dynamicIt.current); - Expect.isFalse(dynamicIt.moveNext()); - Expect.isNull(dynamicIt.current); - - testSkipTake(Iterable input, int skip, int take) { - List expected = []; - Iterator iter = input.iterator; - for (int i = 0; i < skip; i++) iter.moveNext(); - for (int i = 0; i < take; i++) { - if (!iter.moveNext()) break; - expected.add(iter.current); - } - Expect.listEquals(expected, input.skip(skip).take(take).toList()); - } - - List longList = [1, 4, 5, 3, 8, 11, 12, 6, 9, 10, 13, 7, 2, 14, 15]; - Set bigSet = longList.toSet(); - - for (Iterable collection in [longList, longList.reversed, bigSet]) { - testSkipTake(collection, 0, 0); - testSkipTake(collection, 0, 5); - testSkipTake(collection, 0, 15); - testSkipTake(collection, 0, 25); - testSkipTake(collection, 5, 0); - testSkipTake(collection, 5, 5); - testSkipTake(collection, 5, 10); - testSkipTake(collection, 5, 20); - testSkipTake(collection, 15, 0); - testSkipTake(collection, 15, 5); - testSkipTake(collection, 20, 0); - testSkipTake(collection, 20, 5); - Expect.throwsRangeError(() => longList.skip(-1)); - } -} diff --git a/tests/corelib_2/iterable_skip_while_test.dart b/tests/corelib_2/iterable_skip_while_test.dart deleted file mode 100644 index b8d26a8490e..00000000000 --- a/tests/corelib_2/iterable_skip_while_test.dart +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - List list1 = [1, 2, 3]; - List list2 = const [4, 5]; - List list3 = []; - Set set1 = new Set(); - set1..add(11)..add(12)..add(13); - Set set2 = new Set(); - - Iterable skipWhileTrue = list1.skipWhile((x) => true); - Iterator it = skipWhileTrue.iterator; - Expect.isNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - Iterable skipWhileOdd = list1.skipWhile((x) => x.isOdd); - it = skipWhileOdd.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(2, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(3, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - Iterable skipWhileLessThan3 = list1.skipWhile((x) => x < 3); - it = skipWhileLessThan3.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(3, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - Iterable skipWhileFalse = list1.skipWhile((x) => false); - it = skipWhileFalse.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(1, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(2, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(3, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - Iterable skipWhileEven = list1.skipWhile((x) => x.isEven); - it = skipWhileEven.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(1, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(2, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(3, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - skipWhileTrue = list2.skipWhile((x) => true); - it = skipWhileTrue.iterator; - Expect.isNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - skipWhileEven = list2.skipWhile((x) => x.isEven); - it = skipWhileEven.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(5, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - skipWhileOdd = list2.skipWhile((x) => x.isOdd); - it = skipWhileOdd.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(4, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(5, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - skipWhileFalse = list2.skipWhile((x) => false); - it = skipWhileFalse.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(4, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(5, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - Iterable skipWhileFalse2 = list3.skipWhile((x) => false); - Iterator it2 = skipWhileFalse2.iterator; - Expect.isNull(it2.current); - Expect.isFalse(it2.moveNext()); - Expect.isNull(it2.current); - - Iterable skipWhileTrue2 = list3.skipWhile((x) => true); - it2 = skipWhileTrue2.iterator; - Expect.isNull(it2.current); - Expect.isFalse(it2.moveNext()); - Expect.isNull(it2.current); - - skipWhileTrue = set1.skipWhile((x) => true); - it = skipWhileTrue.iterator; - Expect.isNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - skipWhileFalse = set1.skipWhile((x) => false); - List copied = skipWhileFalse.toList(); - Expect.equals(3, copied.length); - Expect.isTrue(set1.contains(copied[0])); - Expect.isTrue(set1.contains(copied[1])); - Expect.isTrue(set1.contains(copied[1])); - Expect.isTrue(copied[0] != copied[1]); - Expect.isTrue(copied[0] != copied[2]); - Expect.isTrue(copied[1] != copied[2]); - it = skipWhileFalse.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.isTrue(it.current != null); - Expect.isTrue(it.moveNext()); - Expect.isTrue(it.current != null); - Expect.isTrue(it.moveNext()); - Expect.isTrue(it.current != null); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - var dynamicSkipWhileTrue = set2.skipWhile((x) => true); - var dynamicIt = dynamicSkipWhileTrue.iterator; - Expect.isNull(dynamicIt.current); - Expect.isFalse(dynamicIt.moveNext()); - Expect.isNull(dynamicIt.current); - - var dynamicSkipWhileFalse = set2.skipWhile((x) => false); - dynamicIt = dynamicSkipWhileFalse.iterator; - Expect.isNull(dynamicIt.current); - Expect.isFalse(dynamicIt.moveNext()); - Expect.isNull(dynamicIt.current); -} diff --git a/tests/corelib_2/iterable_take_test.dart b/tests/corelib_2/iterable_take_test.dart deleted file mode 100644 index 34a2f287658..00000000000 --- a/tests/corelib_2/iterable_take_test.dart +++ /dev/null @@ -1,240 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - List list1 = [1, 2, 3]; - List list2 = const [4, 5]; - List list3 = []; - Set set1 = new Set(); - set1..add(11)..add(12)..add(13); - Set set2 = new Set(); - - Iterable take0 = list1.take(0); - Iterator it = take0.iterator; - Expect.isNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - Iterable take1 = list1.take(1); - it = take1.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(1, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - Iterable take2 = list1.take(2); - it = take2.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(1, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(2, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - Iterable take3 = list1.take(3); - it = take3.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(1, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(2, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(3, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - Iterable take4 = list1.take(4); - it = take4.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(1, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(2, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(3, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - take4 = list1.take(4); - take3 = take4.take(3); - take2 = take3.take(2); - take1 = take2.take(1); - take0 = take1.take(0); - it = take0.iterator; - Expect.isNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - it = take1.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(1, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - it = take2.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(1, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(2, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - it = take3.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(1, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(2, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(3, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - it = take4.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(1, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(2, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(3, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - take0 = list2.take(0); - it = take0.iterator; - Expect.isNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - take1 = list2.take(1); - it = take1.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(4, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - take2 = list2.take(2); - it = take2.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(4, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(5, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - take3 = list2.take(3); - it = take3.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(4, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(5, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - Iterable take02 = list3.take(0); - Iterator it2 = take02.iterator; - Expect.isNull(it2.current); - Expect.isFalse(it2.moveNext()); - Expect.isNull(it2.current); - - Iterable take12 = list3.take(1); - it2 = take12.iterator; - Expect.isNull(it2.current); - Expect.isFalse(it2.moveNext()); - Expect.isNull(it2.current); - - take0 = set1.take(0); - it = take0.iterator; - Expect.isNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - take1 = set1.take(1); - List copied = take1.toList(); - Expect.equals(1, copied.length); - Expect.isTrue(set1.contains(copied[0])); - it = take1.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.isNotNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - take2 = set1.take(2); - copied = take2.toList(); - Expect.equals(2, copied.length); - Expect.isTrue(set1.contains(copied[0])); - Expect.isTrue(set1.contains(copied[1])); - Expect.isTrue(copied[0] != copied[1]); - it = take2.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.isNotNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.isNotNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - take3 = set1.take(3); - copied = take3.toList(); - Expect.equals(3, copied.length); - Expect.isTrue(set1.contains(copied[0])); - Expect.isTrue(set1.contains(copied[1])); - Expect.isTrue(set1.contains(copied[2])); - Expect.isTrue(copied[0] != copied[1]); - Expect.isTrue(copied[0] != copied[2]); - Expect.isTrue(copied[1] != copied[2]); - it = take3.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.isNotNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.isNotNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.isNotNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - var dynamicTake0 = set2.take(0); - var dynamicIt = dynamicTake0.iterator; - Expect.isNull(dynamicIt.current); - Expect.isFalse(dynamicIt.moveNext()); - Expect.isNull(dynamicIt.current); - - var dynamicTake1 = set2.take(1); - dynamicIt = dynamicTake1.iterator; - Expect.isNull(dynamicIt.current); - Expect.isFalse(dynamicIt.moveNext()); - Expect.isNull(dynamicIt.current); - - Expect.throwsRangeError(() => list1.skip(-1)); - Expect.throwsRangeError(() => list2.skip(-1)); - Expect.throwsRangeError(() => list3.skip(-1)); - Expect.throwsRangeError(() => set1.skip(-1)); - Expect.throwsRangeError(() => set2.skip(-1)); - Expect.throwsRangeError(() => list1.map((x) => x).skip(-1)); - Expect.throwsRangeError(() => list2.map((x) => x).skip(-1)); - Expect.throwsRangeError(() => list3.map((x) => x).skip(-1)); - Expect.throwsRangeError(() => set1.map((x) => x).skip(-1)); - Expect.throwsRangeError(() => set2.map((x) => x).skip(-1)); - - Expect.throws(() => list1.take(null)); - Expect.throws(() => list2.take(null)); - Expect.throws(() => list3.take(null)); - Expect.throws(() => set1.take(null)); - Expect.throws(() => set2.take(null)); - Expect.throws(() => list1.map((x) => x).take(null)); - Expect.throws(() => list2.map((x) => x).take(null)); - Expect.throws(() => list3.map((x) => x).take(null)); - Expect.throws(() => set1.map((x) => x).take(null)); - Expect.throws(() => set2.map((x) => x).take(null)); -} diff --git a/tests/corelib_2/iterable_take_while_test.dart b/tests/corelib_2/iterable_take_while_test.dart deleted file mode 100644 index 38d133d7700..00000000000 --- a/tests/corelib_2/iterable_take_while_test.dart +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - List list1 = [1, 2, 3]; - List list2 = const [4, 5]; - List list3 = []; - Set set1 = new Set(); - set1..add(11)..add(12)..add(13); - Set set2 = new Set(); - - Iterable takeWhileFalse = list1.takeWhile((x) => false); - Iterator it = takeWhileFalse.iterator; - Expect.isNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - Iterable takeWhileOdd = list1.takeWhile((x) => x.isOdd); - it = takeWhileOdd.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(1, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - Iterable takeWhileLessThan3 = list1.takeWhile((x) => x < 3); - it = takeWhileLessThan3.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(1, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(2, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - Iterable takeEverything = list1.takeWhile((x) => true); - it = takeEverything.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(1, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(2, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(3, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - Iterable takeWhileEven = list1.takeWhile((x) => x.isEven); - it = takeWhileFalse.iterator; - Expect.isNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - takeWhileFalse = list2.takeWhile((x) => false); - it = takeWhileFalse.iterator; - Expect.isNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - takeWhileEven = list2.takeWhile((x) => x.isEven); - it = takeWhileEven.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(4, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - takeEverything = list2.takeWhile((x) => true); - it = takeEverything.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(4, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(5, it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - Iterable takeWhileFalse2 = list3.takeWhile((x) => false); - Iterator it2 = takeWhileFalse2.iterator; - Expect.isNull(it2.current); - Expect.isFalse(it2.moveNext()); - Expect.isNull(it2.current); - - Iterable takeEverything2 = list3.takeWhile((x) => true); - it2 = takeEverything2.iterator; - Expect.isNull(it2.current); - Expect.isFalse(it2.moveNext()); - Expect.isNull(it2.current); - - takeWhileFalse = set1.takeWhile((x) => false); - it = takeWhileFalse.iterator; - Expect.isNull(it.current); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - takeEverything = set1.takeWhile((x) => true); - List copied = takeEverything.toList(); - Expect.equals(3, copied.length); - Expect.isTrue(set1.contains(copied[0])); - Expect.isTrue(set1.contains(copied[1])); - Expect.isTrue(set1.contains(copied[1])); - Expect.isTrue(copied[0] != copied[1]); - Expect.isTrue(copied[0] != copied[2]); - Expect.isTrue(copied[1] != copied[2]); - it = takeEverything.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.isTrue(it.current != null); - Expect.isTrue(it.moveNext()); - Expect.isTrue(it.current != null); - Expect.isTrue(it.moveNext()); - Expect.isTrue(it.current != null); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - var dynamicTakeWhileFalse = set2.takeWhile((x) => false); - var dynamicIt = dynamicTakeWhileFalse.iterator; - Expect.isNull(dynamicIt.current); - Expect.isFalse(dynamicIt.moveNext()); - Expect.isNull(dynamicIt.current); - - var dynamicTakeEverything = set2.takeWhile((x) => true); - dynamicIt = dynamicTakeEverything.iterator; - Expect.isNull(dynamicIt.current); - Expect.isFalse(dynamicIt.moveNext()); - Expect.isNull(dynamicIt.current); -} diff --git a/tests/corelib_2/iterable_test.dart b/tests/corelib_2/iterable_test.dart deleted file mode 100644 index 827354da2eb..00000000000 --- a/tests/corelib_2/iterable_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js where [List.addAll] was not typed -// correctly. - -import "package:expect/expect.dart"; - -import 'dart:collection'; - -class MyIterable extends IterableBase { - get iterator => [].iterator; -} - -main() { - Expect.isTrue(([]..addAll(new MyIterable())).isEmpty); -} diff --git a/tests/corelib_2/iterable_to_list_test.dart b/tests/corelib_2/iterable_to_list_test.dart deleted file mode 100644 index e8316a59195..00000000000 --- a/tests/corelib_2/iterable_to_list_test.dart +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2012, 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 - -import "dart:collection" show Queue; -import "dart:typed_data" show Uint8List, Float32List; -import "package:expect/expect.dart"; - -main() { - // testIterable takes an iterable and a list expected to be equal to - // the iterable's toList result, including the type parameter of the list. - testIterable([], []); - testIterable([], []); - testIterable([], []); - testIterable([1, 2, 3], [1, 2, 3]); - testIterable([1, 2, 3], [1, 2, 3]); - testIterable(const [1, 2], [1, 2]); - testIterable(const [1, 2], [1, 2]); - testIterable({"x": 1, "y": 1}.keys, ["x", "y"]); - testIterable({"x": 1, "y": 1}.keys, ["x", "y"]); - testIterable({"x": 2, "y": 3}.values, [2, 3]); - testIterable({"x": 2, "y": 3}.values, [2, 3]); - testIterable(new Iterable.generate(3), [0, 1, 2]); - testIterable(new Iterable.generate(3), [0, 1, 2]); - testIterable( - new Iterable.generate(3, (x) => "$x"), ["0", "1", "2"]); - testIterable(new Set.from([1, 2, 3]), [1, 2, 3]); - testIterable(new Set.from([1, 2, 3]), [1, 2, 3]); - testIterable(new Queue.from([1, 2, 3]), [1, 2, 3]); - testIterable(new Queue.from([1, 2, 3]), [1, 2, 3]); - testIterable(new Uint8List.fromList([1, 2, 3]), // //# 01: ok - [1, 2, 3]); // //# 01: continued - testIterable(new Float32List.fromList([1.0, 2.0, 3.0]), // //# 01: continued - [1.0, 2.0, 3.0]); // //# 01: continued - testIterable("abc".codeUnits, [97, 98, 99]); // //# 01: continued - testIterable("abc".runes, [97, 98, 99]); -} - -testIterable(Iterable iterable, List expected, [int depth = 0]) { - print(" " * depth + "${iterable.runtimeType} vs ${expected.runtimeType}"); - test(iterable, expected); - test(iterable, expected, growable: true); - test(iterable, expected, growable: false); - if (depth < 2) { - depth++; - testIterable(iterable.map((x) => x), new List.from(expected), depth); - testIterable(iterable.where((x) => true), expected, depth); - testIterable(iterable.expand((x) => [x]), new List.from(expected), depth); - testIterable(iterable.map((x) => x), new List.from(expected), depth); - testIterable(iterable.skipWhile((x) => false), expected, depth); - testIterable(iterable.takeWhile((x) => true), expected, depth); - testIterable(iterable.skip(0), expected, depth); - testIterable(iterable.take(expected.length * 2), expected, depth); - testIterable(iterable.toSet(), expected, depth); - } -} - -test(Iterable iterable, List expected, {bool growable: true}) { - var list = iterable.toList(growable: growable); - Expect.listEquals(expected, list); - Expect.equals(expected is List, list is List, "int"); - Expect.equals(expected is List, list is List, "double"); - Expect.equals(expected is List, list is List, "str"); - if (growable) { - int length = list.length; - list.add(null); - Expect.equals(length + 1, list.length); - } else { - Expect.throws(() { - list.add(null); - }); - } -} diff --git a/tests/corelib_2/iterable_to_set_test.dart b/tests/corelib_2/iterable_to_set_test.dart deleted file mode 100644 index f44eb21bc93..00000000000 --- a/tests/corelib_2/iterable_to_set_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - List list1 = [1, 2, 3]; - List list2 = const [4, 4]; - List list3 = []; - Set set1 = new Set(); - set1..add(11)..add(12)..add(13); - Set set2 = new Set(); - set2..add("foo")..add("bar")..add("toto"); - Set set3 = new Set(); - - var setCopy = list1.toSet(); - Expect.equals(3, setCopy.length); - Expect.isTrue(setCopy.contains(1)); - Expect.isTrue(setCopy.contains(2)); - Expect.isTrue(setCopy.contains(3)); - Expect.isTrue(setCopy is Set); - Expect.isFalse(setCopy is Set); - - setCopy = list2.toSet(); - Expect.equals(1, setCopy.length); - Expect.isTrue(setCopy.contains(4)); - Expect.isTrue(setCopy is Set); - Expect.isFalse(setCopy is Set); - - var setStrCopy = list3.toSet(); - Expect.isTrue(setStrCopy.isEmpty); - Expect.isTrue(setStrCopy is Set); - Expect.isFalse(setStrCopy is Set); - - setCopy = set1.toSet(); - Expect.setEquals(set1, setCopy); - Expect.isTrue(setCopy is Set); - Expect.isFalse(setCopy is Set); - Expect.isFalse(identical(setCopy, set1)); - - setStrCopy = set2.toSet(); - Expect.setEquals(set2, setStrCopy); - Expect.isTrue(setStrCopy is Set); - Expect.isFalse(setStrCopy is Set); - Expect.isFalse(identical(setStrCopy, set2)); - - var set3Copy = set3.toSet(); - Expect.setEquals(set3, set3Copy); - Expect.isTrue(set3Copy is Set); - Expect.isFalse(set3Copy is Set); - Expect.isFalse(set3Copy is Set); - Expect.isFalse(identical(set3Copy, set3)); -} diff --git a/tests/corelib_2/iterable_tostring_test.dart b/tests/corelib_2/iterable_tostring_test.dart deleted file mode 100644 index bb85a1efcfb..00000000000 --- a/tests/corelib_2/iterable_tostring_test.dart +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test the IterableBase/IterableMixin toString method. - -import "package:expect/expect.dart"; -import "dart:collection"; - -String mkIt(int len, [func]) { - var list; - if (func == null) { - list = new List.generate(len, (x) => x); - } else { - list = new List.generate(len, func); - } - return new MyIterable(list).toString(); -} - -class MyIterable extends IterableBase { - final Iterable _base; - MyIterable(this._base); - Iterator get iterator => _base.iterator; -} - -void main() { - Expect.equals("()", mkIt(0)); - Expect.equals("(0)", mkIt(1)); - Expect.equals("(0, 1)", mkIt(2)); - Expect.equals("(0, 1, 2, 3, 4, 5, 6, 7, 8)", mkIt(9)); - - // Builds string up to 60 characters, then finishes with last two - // elements. - Expect.equals( - //0123456789012345678901234567890123456789 - 40 characters - "(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1" - "2, 13, 14, 15, 16, 17, 18, ..., 98, 99)", - mkIt(100)); - - Expect.equals( - //0123456789012345678901234567890123456789 - "(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1" - "2, 13, 14, 15, 16, 17, 18)", - mkIt(19)); - - Expect.equals( - //0123456789012345678901234567890123456789 - "(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1" - "2, 13, 14, 15, 16, 17, 18, 19)", - mkIt(20)); - - Expect.equals( - //0123456789012345678901234567890123456789 - "(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1" - "2, 13, 14, 15, 16, 17, 18, 19, 20)", - mkIt(21)); - - // Don't show last two elements if more than 100 elements total - // (can't be 100 elements in 80 characters including commas). - Expect.equals( - //0123456789012345678901234567890123456789 - "(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1" - "2, 13, 14, 15, 16, 17, 18, 19, 20, ...)", - mkIt(101)); - - // If last two elements bring total over 80 characters, drop some of - // the previous ones as well. - - Expect.equals( - //0123456789012345678901234567890123456789 - "(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1" - "2, 13, ..., 18, xxxxxxxxxxxxxxxxxxxx)", - mkIt(20, (x) => x == 19 ? "xxxxxxxxxxxxxxxxxxxx" : "$x")); - - // Never drop the first three or the last two. - Expect.equals( - //0123456789012345678901234567890123456789 - "(xxxxxxxxxxxxxxxxx, xxxxxxxxxxxxxxxxx, x" - "xxxxxxxxxxxxxxxx, ..., 18, xxxxxxxxxxxxx" - "xxxx)", - mkIt(20, (x) => (x < 3 || x == 19) ? "xxxxxxxxxxxxxxxxx" : "$x")); - - // Never drop the first three or the last two. - Expect.equals( - //0123456789012345678901234567890123456789 - "(xxxxxxxxxxxxxxxxx, xxxxxxxxxxxxxxxxx, x" - "xxxxxxxxxxxxxxxx, ..., xxxxxxxxxxxxxxxxx" - ", 19)", - mkIt(20, (x) => (x < 3 || x == 18) ? "xxxxxxxxxxxxxxxxx" : "$x")); - - // If the first three are very long, always include them anyway. - Expect.equals( - //0123456789012345678901234567890123456789 - "(xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx," - " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx," - " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx," - " ..., 98, 99)", - mkIt(100, - (x) => (x < 3) ? "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" : "$x")); - - Expect.equals( - //0123456789012345678901234567890123456789 - "(, , , , , , , , , , , , , , , , , , , ," - " , , , , , , , , , , , , , , , ..., , )", - mkIt(100, (_) => "")); -} diff --git a/tests/corelib_2/iterable_where_type_test.dart b/tests/corelib_2/iterable_where_type_test.dart deleted file mode 100644 index e9d7e23141c..00000000000 --- a/tests/corelib_2/iterable_where_type_test.dart +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 2018, 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 - -import "dart:collection" show Queue; -import "dart:typed_data" show Int32List; - -import "package:expect/expect.dart"; - -// Tests behavior of result of an operation on a followedBy iterable. -test(List expects, Iterable iterable, [String name]) { - try { - Expect.isFalse(iterable is List, "$name is! List"); - Expect.isFalse(iterable is Set, "$name is! Set"); - Expect.isFalse(iterable is Queue, "$name is! Queue"); - if (expects.isNotEmpty) { - Expect.equals(expects.first, iterable.first, "$name: first"); - Expect.equals(expects.last, iterable.last, "$name: last"); - } else { - Expect.throwsStateError(() => iterable.first, "$name: first"); - Expect.throwsStateError(() => iterable.last, "$name: last"); - } - var it = iterable.iterator; - for (int index = 0; index < expects.length; index++) { - Expect.isTrue(it.moveNext(), "$name: has element $index"); - var expect = expects[index]; - Expect.equals(expect, it.current, "$name at $index"); - Expect.equals( - expect, iterable.elementAt(index), "$name: elementAt($index)"); - Expect.isTrue(iterable.contains(expect), "$name:contains $index"); - } - Expect.isFalse(it.moveNext(), - "$name: extra element at ${expects.length}: ${it.current}"); - } on Error { - print("Failed during: $name"); - rethrow; - } -} - -main() { - var conversions = Function(List)>{ - "const": toConst, - "list": toList, - "unmod": toUnmodifiable, - "set": toSet, - "queue": toQueue, - "eff-len-iter": toELIter, - "non-eff-iter": toNEIter, - "typed": toTyped, - "keys": toKeys, - "values": toValues, - }; - for (var data in [ - const [], - const [1], - const [1, 2, 3] - ]) { - conversions.forEach((name, c) { - test(data, c(data).whereType(), "$name#${data.length}.wt"); - test(data, c(data).whereType(), "$name#${data.length}.wt"); - test([], c(data).whereType(), "$name#${data.length}.wt"); - }); - } - - test([1, 0.1], ["a", 1, new Object(), 0.1, null].whereType(), "mixed"); - - var o = new Object(); - var a = new A(); - var b = new B(); - var c = new C(); - var d = new D(); - var n = null; - test([o, a, b, c, d, n], [o, a, b, c, d, n].whereType(), "Object"); - test([a, b, c, d], [o, a, b, c, d, n].whereType(), "A"); - test([b, d], [o, a, b, c, d, n].whereType(), "B"); - test([c, d], [o, a, b, c, d, n].whereType(), "C"); - test([d], [o, a, b, c, d, n].whereType(), "D"); - test([n], [o, a, b, c, d, n].whereType(), "Null"); - - test([d], [d].whereType(), "Unrelated"); -} - -class A {} - -class B implements A {} - -class C implements A {} - -class D implements B, C {} - -List toConst(List elements) => elements; // Argument is const. -List toList(List elements) => elements.toList(); -List toUnmodifiable(List elements) => - new List.unmodifiable(elements); -Set toSet(List elements) => elements.toSet(); -Queue toQueue(List elements) => new Queue.from(elements); -// Creates an efficient-length iterable. -Iterable toELIter(List elements) => elements.map((x) => x); -// Creates a non-efficient-length iterable. -Iterable toNEIter(List elements) => elements.where((x) => true); -List toTyped(List elements) => new Int32List.fromList(elements); -Iterable toKeys(List elements) => - new Map.fromIterables(elements, elements).keys; -Iterable toValues(List elements) => - new Map.fromIterables(elements, elements).values; diff --git a/tests/corelib_2/json_map_test.dart b/tests/corelib_2/json_map_test.dart deleted file mode 100644 index d2e2723a4f2..00000000000 --- a/tests/corelib_2/json_map_test.dart +++ /dev/null @@ -1,345 +0,0 @@ -// 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 json_map_test; - -import "package:expect/expect.dart"; -import 'dart:convert' show json; -import 'dart:collection' show LinkedHashMap, HashMap; - -bool useReviver = false; -Map jsonify(Map map) { - String encoded = json.encode(map); - return useReviver - ? json.decode(encoded, reviver: (key, value) => value) - : json.decode(encoded); -} - -List listEach(Map map) { - var result = []; - map.forEach((key, value) { - result.add(key); - result.add(value); - }); - return result; -} - -void main() { - test(false); - test(true); -} - -void test(bool revive) { - useReviver = revive; - testEmpty(jsonify({})); - testAtoB(jsonify({'a': 'b'})); - - // You can write 'Map' here (or 'var' which infers the - // same), but if you write just 'Map' as the type, then the type of the - // constant argument in the addAll below is not inferred correctly. - var map = jsonify({}); - map['a'] = 'b'; - testAtoB(map); - - map = jsonify({}); - Expect.equals('b', map.putIfAbsent('a', () => 'b')); - testAtoB(map); - - map = jsonify({}); - map.addAll({'a': 'b'}); - testAtoB(map); - - testOrder(['a', 'b', 'c', 'd', 'e', 'f']); - - testProto(); - testToString(); - testConcurrentModifications(); - testType(); - testClear(); - - testListEntry(); - testMutation(); -} - -void testEmpty(Map map) { - for (int i = 0; i < 2; i++) { - Expect.equals(0, map.length); - Expect.isTrue(map.isEmpty); - Expect.isFalse(map.isNotEmpty); - Expect.listEquals([], map.keys.toList()); - Expect.listEquals([], map.values.toList()); - Expect.isNull(map['a']); - Expect.listEquals([], listEach(map)); - Expect.isFalse(map.containsKey('a')); - Expect.isFalse(map.containsValue('a')); - Expect.isNull(map.remove('a')); - testLookupNonExistingKeys(map); - testLookupNonExistingValues(map); - map.clear(); - } -} - -void testAtoB(Map map) { - Expect.equals(1, map.length); - Expect.isFalse(map.isEmpty); - Expect.isTrue(map.isNotEmpty); - Expect.listEquals(['a'], map.keys.toList()); - Expect.listEquals(['b'], map.values.toList()); - Expect.equals('b', map['a']); - Expect.listEquals(['a', 'b'], listEach(map)); - Expect.isTrue(map.containsKey('a')); - Expect.isFalse(map.containsKey('b')); - Expect.isTrue(map.containsValue('b')); - Expect.isFalse(map.containsValue('a')); - - testLookupNonExistingKeys(map); - testLookupNonExistingValues(map); - Expect.equals('b', map.remove('a')); - Expect.isNull(map.remove('b')); - testLookupNonExistingKeys(map); - testLookupNonExistingValues(map); - - map.clear(); - testEmpty(map); -} - -void testLookupNonExistingKeys(Map map) { - for (String key in ['__proto__', 'null', null]) { - Expect.isNull(map[key]); - Expect.isFalse(map.containsKey(key)); - } -} - -void testLookupNonExistingValues(Map map) { - for (var value in ['__proto__', 'null', null]) { - Expect.isFalse(map.containsValue(value)); - } -} - -void testOrder(List list) { - if (list.isEmpty) - return; - else - testOrder(list.skip(1).toList()); - - Map original = {}; - for (int i = 0; i < list.length; i++) { - original[list[i]] = i; - } - - Map map = jsonify(original); - Expect.equals(list.length, map.length); - Expect.listEquals(list, map.keys.toList()); - - for (int i = 0; i < 10; i++) { - map["$i"] = i; - Expect.equals(list.length + i + 1, map.length); - Expect.listEquals(list, map.keys.take(list.length).toList()); - } -} - -void testProto() { - Map map = jsonify({'__proto__': 0}); - Expect.equals(1, map.length); - Expect.isTrue(map.containsKey('__proto__')); - Expect.listEquals(['__proto__'], map.keys.toList()); - Expect.equals(0, map['__proto__']); - Expect.equals(0, map.remove('__proto__')); - testEmpty(map); - - map = jsonify({'__proto__': null}); - Expect.equals(1, map.length); - Expect.isTrue(map.containsKey('__proto__')); - Expect.listEquals(['__proto__'], map.keys.toList()); - Expect.isNull(map['__proto__']); - Expect.isNull(map.remove('__proto__')); - testEmpty(map); -} - -void testToString() { - Expect.equals("{}", jsonify({}).toString()); - Expect.equals("{a: 0}", jsonify({'a': 0}).toString()); -} - -void testConcurrentModifications() { - void testIterate(Map map, Iterable iterable, Function f) { - Iterator iterator = iterable.iterator; - f(map); - iterator.moveNext(); - } - - void testKeys(Map map, Function f) => testIterate(map, map.keys, f); - void testValues(Map map, Function f) => testIterate(map, map.values, f); - - void testForEach(Map map, Function f) { - map.forEach((key, value) { - f(map); - }); - } - - bool throwsCME(Function f) { - try { - f(); - } on ConcurrentModificationError catch (e) { - return true; - } catch (e) { - return false; - } - return false; - } - - Map map = {}; - Expect.isTrue(throwsCME(() => testKeys(jsonify(map), (map) => map['a'] = 0))); - Expect - .isTrue(throwsCME(() => testValues(jsonify(map), (map) => map['a'] = 0))); - Expect.isFalse( - throwsCME(() => testForEach(jsonify(map), (map) => map['a'] = 0))); - - Expect.isFalse(throwsCME(() => testKeys(jsonify(map), (map) => map.clear()))); - Expect - .isFalse(throwsCME(() => testValues(jsonify(map), (map) => map.clear()))); - Expect.isFalse( - throwsCME(() => testForEach(jsonify(map), (map) => map.clear()))); - - Expect.isFalse( - throwsCME(() => testKeys(jsonify(map), (map) => map.remove('a')))); - Expect.isFalse( - throwsCME(() => testValues(jsonify(map), (map) => map.remove('a')))); - Expect.isFalse( - throwsCME(() => testForEach(jsonify(map), (map) => map.remove('a')))); - - Expect.isTrue(throwsCME( - () => testKeys(jsonify(map), (map) => map.putIfAbsent('a', () => 0)))); - Expect.isTrue(throwsCME( - () => testValues(jsonify(map), (map) => map.putIfAbsent('a', () => 0)))); - Expect.isFalse(throwsCME( - () => testForEach(jsonify(map), (map) => map.putIfAbsent('a', () => 0)))); - - Expect.isFalse( - throwsCME(() => testKeys(jsonify(map), (map) => map.addAll({})))); - Expect.isFalse( - throwsCME(() => testValues(jsonify(map), (map) => map.addAll({})))); - Expect.isFalse( - throwsCME(() => testForEach(jsonify(map), (map) => map.addAll({})))); - - Expect.isTrue( - throwsCME(() => testKeys(jsonify(map), (map) => map.addAll({'a': 0})))); - Expect.isTrue( - throwsCME(() => testValues(jsonify(map), (map) => map.addAll({'a': 0})))); - Expect.isFalse(throwsCME( - () => testForEach(jsonify(map), (map) => map.addAll({'a': 0})))); - - map = {'a': 1}; - Expect - .isFalse(throwsCME(() => testKeys(jsonify(map), (map) => map['a'] = 0))); - Expect.isFalse( - throwsCME(() => testValues(jsonify(map), (map) => map['a'] = 0))); - Expect.isFalse( - throwsCME(() => testForEach(jsonify(map), (map) => map['a'] = 0))); - - Expect.isTrue(throwsCME(() => testKeys(jsonify(map), (map) => map['b'] = 0))); - Expect - .isTrue(throwsCME(() => testValues(jsonify(map), (map) => map['b'] = 0))); - Expect.isTrue( - throwsCME(() => testForEach(jsonify(map), (map) => map['b'] = 0))); - - Expect.isTrue(throwsCME(() => testKeys(jsonify(map), (map) => map.clear()))); - Expect - .isTrue(throwsCME(() => testValues(jsonify(map), (map) => map.clear()))); - Expect - .isTrue(throwsCME(() => testForEach(jsonify(map), (map) => map.clear()))); - - Expect.isTrue( - throwsCME(() => testKeys(jsonify(map), (map) => map.remove('a')))); - Expect.isTrue( - throwsCME(() => testValues(jsonify(map), (map) => map.remove('a')))); - Expect.isTrue( - throwsCME(() => testForEach(jsonify(map), (map) => map.remove('a')))); - - Expect.isFalse( - throwsCME(() => testKeys(jsonify(map), (map) => map.remove('b')))); - Expect.isFalse( - throwsCME(() => testValues(jsonify(map), (map) => map.remove('b')))); - Expect.isFalse( - throwsCME(() => testForEach(jsonify(map), (map) => map.remove('b')))); - - Expect.isFalse(throwsCME( - () => testKeys(jsonify(map), (map) => map.putIfAbsent('a', () => 0)))); - Expect.isFalse(throwsCME( - () => testValues(jsonify(map), (map) => map.putIfAbsent('a', () => 0)))); - Expect.isFalse(throwsCME( - () => testForEach(jsonify(map), (map) => map.putIfAbsent('a', () => 0)))); - - Expect.isTrue(throwsCME( - () => testKeys(jsonify(map), (map) => map.putIfAbsent('b', () => 0)))); - Expect.isTrue(throwsCME( - () => testValues(jsonify(map), (map) => map.putIfAbsent('b', () => 0)))); - Expect.isTrue(throwsCME( - () => testForEach(jsonify(map), (map) => map.putIfAbsent('b', () => 0)))); - - Expect.isFalse( - throwsCME(() => testKeys(jsonify(map), (map) => map.addAll({})))); - Expect.isFalse( - throwsCME(() => testValues(jsonify(map), (map) => map.addAll({})))); - Expect.isFalse( - throwsCME(() => testForEach(jsonify(map), (map) => map.addAll({})))); - - Expect.isFalse( - throwsCME(() => testKeys(jsonify(map), (map) => map.addAll({'a': 0})))); - Expect.isFalse( - throwsCME(() => testValues(jsonify(map), (map) => map.addAll({'a': 0})))); - Expect.isFalse(throwsCME( - () => testForEach(jsonify(map), (map) => map.addAll({'a': 0})))); - - Expect.isTrue( - throwsCME(() => testKeys(jsonify(map), (map) => map.addAll({'b': 0})))); - Expect.isTrue( - throwsCME(() => testValues(jsonify(map), (map) => map.addAll({'b': 0})))); - Expect.isTrue(throwsCME( - () => testForEach(jsonify(map), (map) => map.addAll({'b': 0})))); -} - -void testType() { - var map = jsonify({}); - var type = "${map.runtimeType}"; - - // The documentation of json.decode doesn't actually specify that it returns - // a map (it's marked dynamic), but it's a reasonable expectation if you - // don't provide a reviver function. - Expect.isTrue(map is Map, type); - Expect.isTrue(map is Map, type); - Expect.isFalse(map is Map, type); -} - -void testClear() { - Map map = jsonify({'a': 0}); - map.clear(); - Expect.equals(0, map.length); -} - -void testListEntry() { - Map map = jsonify({ - 'a': [ - 7, - 8, - {'b': 9} - ] - }); - List list = map['a']; - Expect.equals(3, list.length); - Expect.equals(7, list[0]); - Expect.equals(8, list[1]); - Expect.equals(9, list[2]['b']); -} - -void testMutation() { - Map map = jsonify({'a': 0}); - Expect.listEquals(['a', 0], listEach(map)); - map['a'] = 1; - Expect.listEquals(['a', 1], listEach(map)); - map['a']++; - Expect.listEquals(['a', 2], listEach(map)); -} diff --git a/tests/corelib_2/linked_hash_map_from_iterable_test.dart b/tests/corelib_2/linked_hash_map_from_iterable_test.dart deleted file mode 100644 index ae46abcf1f6..00000000000 --- a/tests/corelib_2/linked_hash_map_from_iterable_test.dart +++ /dev/null @@ -1,119 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; -import 'dart:collection'; - -main() { - defaultFunctionValuesTest(); - defaultKeyFunctionTest(); - defaultValueFunctionTest(); - noDefaultValuesTest(); - emptyIterableTest(); - equalElementsTest(); - genericTypeTest(); -} - -void defaultFunctionValuesTest() { - var map = new LinkedHashMap.fromIterable([1, 2, 3]); - - Expect.isTrue(map is Map); - Expect.isTrue(map is LinkedHashMap); - - Expect.equals(3, map.length); - Expect.equals(3, map.keys.length); - Expect.equals(3, map.values.length); - - Expect.equals(1, map[1]); - Expect.equals(2, map[2]); - Expect.equals(3, map[3]); -} - -void defaultKeyFunctionTest() { - var map = new LinkedHashMap.fromIterable([1, 2, 3], value: (x) => x + 1); - - Expect.isTrue(map is Map); - Expect.isTrue(map is LinkedHashMap); - - Expect.equals(3, map.length); - Expect.equals(3, map.keys.length); - Expect.equals(3, map.values.length); - - Expect.equals(2, map[1]); - Expect.equals(3, map[2]); - Expect.equals(4, map[3]); -} - -void defaultValueFunctionTest() { - var map = new LinkedHashMap.fromIterable([1, 2, 3], key: (x) => x + 1); - - Expect.isTrue(map is Map); - Expect.isTrue(map is LinkedHashMap); - - Expect.equals(3, map.length); - Expect.equals(3, map.keys.length); - Expect.equals(3, map.values.length); - - Expect.equals(1, map[2]); - Expect.equals(2, map[3]); - Expect.equals(3, map[4]); -} - -void noDefaultValuesTest() { - var map = new LinkedHashMap.fromIterable([1, 2, 3], - key: (x) => x + 1, value: (x) => x - 1); - - Expect.isTrue(map is Map); - Expect.isTrue(map is LinkedHashMap); - - Expect.equals(3, map.length); - Expect.equals(3, map.keys.length); - Expect.equals(3, map.values.length); - - Expect.equals(0, map[2]); - Expect.equals(1, map[3]); - Expect.equals(2, map[4]); -} - -void emptyIterableTest() { - var map = new LinkedHashMap.fromIterable([]); - Expect.isTrue(map is Map); - Expect.isTrue(map is LinkedHashMap); - - Expect.equals(0, map.length); - Expect.equals(0, map.keys.length); - Expect.equals(0, map.values.length); -} - -void equalElementsTest() { - var map = new LinkedHashMap.fromIterable([1, 2, 2], key: (x) => x + 1); - - Expect.isTrue(map is Map); - Expect.isTrue(map is LinkedHashMap); - - Expect.equals(2, map.length); - Expect.equals(2, map.keys.length); - Expect.equals(2, map.values.length); - - Expect.equals(1, map[2]); - Expect.equals(2, map[3]); -} - -void genericTypeTest() { - dynamic map = new LinkedHashMap.fromIterable([1, 2, 3], - value: (x) => '$x'); - Expect.isTrue(map is Map); - Expect.isTrue(map is LinkedHashMap); - - map = new LinkedHashMap.fromIterable([1, 2, 3], - key: (x) => '$x', value: (x) => '$x'); - Expect.isTrue(map is Map); - Expect.isTrue(map is LinkedHashMap); - - // Make sure it is not just LinkedHashMap. - Expect.isFalse(map is LinkedHashMap); - Expect.isFalse(map is LinkedHashMap); -} diff --git a/tests/corelib_2/linked_hash_map_from_iterables_test.dart b/tests/corelib_2/linked_hash_map_from_iterables_test.dart deleted file mode 100644 index 4c7cb848011..00000000000 --- a/tests/corelib_2/linked_hash_map_from_iterables_test.dart +++ /dev/null @@ -1,81 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; -import 'dart:collection'; - -main() { - positiveTest(); - emptyMapTest(); - fewerKeysIterableTest(); - fewerValuesIterableTest(); - equalElementsTest(); - genericTypeTest(); -} - -void positiveTest() { - var map = new LinkedHashMap.fromIterables([1, 2, 3], ["one", "two", "three"]); - Expect.isTrue(map is Map); - Expect.isTrue(map is LinkedHashMap); - - Expect.equals(3, map.length); - Expect.equals(3, map.keys.length); - Expect.equals(3, map.values.length); - - Expect.equals("one", map[1]); - Expect.equals("two", map[2]); - Expect.equals("three", map[3]); -} - -void emptyMapTest() { - var map = new LinkedHashMap.fromIterables([], []); - Expect.isTrue(map is Map); - Expect.isTrue(map is LinkedHashMap); - - Expect.equals(0, map.length); - Expect.equals(0, map.keys.length); - Expect.equals(0, map.values.length); -} - -void fewerValuesIterableTest() { - Expect.throws(() => new LinkedHashMap.fromIterables([1, 2], [0])); -} - -void fewerKeysIterableTest() { - Expect.throws(() => new LinkedHashMap.fromIterables([1], [0, 2])); -} - -void equalElementsTest() { - var map = new LinkedHashMap.fromIterables([1, 2, 2], ["one", "two", "three"]); - Expect.isTrue(map is Map); - Expect.isTrue(map is LinkedHashMap); - - Expect.equals(2, map.length); - Expect.equals(2, map.keys.length); - Expect.equals(2, map.values.length); - - Expect.equals("one", map[1]); - Expect.equals("three", map[2]); -} - -void genericTypeTest() { - var map = new LinkedHashMap.fromIterables( - [1, 2, 3], ["one", "two", "three"]); - Expect.isTrue(map is Map); - Expect.isTrue(map is LinkedHashMap); - - // Make sure it is not just LinkedHashMap. - Expect.isFalse(map is LinkedHashMap); - Expect.isFalse(map is LinkedHashMap); - - Expect.equals(3, map.length); - Expect.equals(3, map.keys.length); - Expect.equals(3, map.values.length); - - Expect.equals("one", map[1]); - Expect.equals("two", map[2]); - Expect.equals("three", map[3]); -} diff --git a/tests/corelib_2/linked_hash_map_test.dart b/tests/corelib_2/linked_hash_map_test.dart deleted file mode 100644 index 6764151b484..00000000000 --- a/tests/corelib_2/linked_hash_map_test.dart +++ /dev/null @@ -1,118 +0,0 @@ -// 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 - -// Dart test for linked hash-maps. -library linkedHashMap.test; - -import "package:expect/expect.dart"; -import 'dart:collection' show LinkedHashMap; - -class LinkedHashMapTest { - static void testMain() { - Map map = new LinkedHashMap(); - map["a"] = 1; - map["b"] = 2; - map["c"] = 3; - map["d"] = 4; - map["e"] = 5; - - List keys = new List.filled(5, null); - List values = new List.filled(5, null); - - int index; - - clear() { - index = 0; - for (int i = 0; i < keys.length; i++) { - keys[i] = null; - values[i] = null; - } - } - - verifyKeys(List correctKeys) { - for (int i = 0; i < correctKeys.length; i++) { - Expect.equals(correctKeys[i], keys[i]); - } - } - - verifyValues(List correctValues) { - for (int i = 0; i < correctValues.length; i++) { - Expect.equals(correctValues[i], values[i]); - } - } - - testForEachMap(Object key, Object value) { - Expect.equals(map[key], value); - keys[index] = key; - values[index] = value; - index++; - } - - testForEachValue(Object v) { - values[index++] = v; - } - - testForEachKey(Object v) { - keys[index++] = v; - } - - final keysInOrder = const ["a", "b", "c", "d", "e"]; - final valuesInOrder = const [1, 2, 3, 4, 5]; - - clear(); - map.forEach(testForEachMap); - verifyKeys(keysInOrder); - verifyValues(valuesInOrder); - - clear(); - map.keys.forEach(testForEachKey); - verifyKeys(keysInOrder); - - clear(); - map.values.forEach(testForEachValue); - verifyValues(valuesInOrder); - - // Remove and then insert. - map.remove("b"); - map["b"] = 6; - final keysAfterBMove = const ["a", "c", "d", "e", "b"]; - final valuesAfterBMove = const [1, 3, 4, 5, 6]; - - clear(); - map.forEach(testForEachMap); - verifyKeys(keysAfterBMove); - verifyValues(valuesAfterBMove); - - clear(); - map.keys.forEach(testForEachKey); - verifyKeys(keysAfterBMove); - - clear(); - map.values.forEach(testForEachValue); - verifyValues(valuesAfterBMove); - - // Update. - map["a"] = 0; - final valuesAfterAUpdate = const [0, 3, 4, 5, 6]; - - clear(); - map.forEach(testForEachMap); - verifyKeys(keysAfterBMove); - verifyValues(valuesAfterAUpdate); - - clear(); - map.keys.forEach(testForEachKey); - verifyKeys(keysAfterBMove); - - clear(); - map.values.forEach(testForEachValue); - verifyValues(valuesAfterAUpdate); - } -} - -main() { - LinkedHashMapTest.testMain(); -} diff --git a/tests/corelib_2/list_as_map_test.dart b/tests/corelib_2/list_as_map_test.dart deleted file mode 100644 index c86b716efde..00000000000 --- a/tests/corelib_2/list_as_map_test.dart +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -void testListMapCorrespondence(List list, Map map) { - Expect.equals(list.length, map.length); - for (int i = 0; i < list.length; i++) { - Expect.equals(list[i], map[i]); - } - Expect.isNull(map[list.length]); - Expect.isNull(map[-1]); - - Iterable keys = map.keys; - Iterable values = map.values; - Expect.isFalse(keys is List); - Expect.isFalse(values is List); - Expect.equals(list.length, keys.length); - Expect.equals(list.length, values.length); - for (int i = 0; i < list.length; i++) { - Expect.equals(i, keys.elementAt(i)); - Expect.equals(list[i], values.elementAt(i)); - } - - int forEachCount = 0; - map.forEach((key, value) { - Expect.equals(forEachCount, key); - Expect.equals(list[key], value); - forEachCount++; - }); - - for (int i = 0; i < list.length; i++) { - Expect.isTrue(map.containsKey(i)); - Expect.isTrue(map.containsValue(list[i])); - } - Expect.isFalse(map.containsKey(-1)); - Expect.isFalse(map.containsKey(list.length)); - - Expect.equals(list.length, forEachCount); - - Expect.equals(list.isEmpty, map.isEmpty); -} - -void testConstAsMap(List list) { - Map map = list.asMap(); - - testListMapCorrespondence(list, map); - - Expect.throwsUnsupportedError(() => map[0] = 499); - Expect.throwsUnsupportedError(() => map.putIfAbsent(0, () => 499)); - Expect.throwsUnsupportedError(() => map.clear()); -} - -void testFixedAsMap(List list) { - testConstAsMap(list); - - Map map = list.asMap(); - - if (!list.isEmpty) { - list[0] = 499; - // Check again to make sure the map is backed by the list. - testListMapCorrespondence(list, map); - } -} - -void testAsMap(List list) { - testFixedAsMap(list); - - Map map = list.asMap(); - - Iterable keys = map.keys; - Iterable values = map.values; - - list.add(42); - // Check again to make sure the map is backed by the list and that the - // length is not cached. - testListMapCorrespondence(list, map); - // Also check that the keys and values iterable from the map are backed by - // the list. - Expect.equals(list.length, keys.length); - Expect.equals(values.length, values.length); -} - -main() { - testConstAsMap(const [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - testAsMap([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - List list = new List.filled(10, null); - for (int i = 0; i < 10; i++) list[i] = i + 1; - testFixedAsMap(list); - - testConstAsMap(const []); - testAsMap([]); - testFixedAsMap(new List.filled(0, null)); -} diff --git a/tests/corelib_2/list_concurrent_modify_self_test.dart b/tests/corelib_2/list_concurrent_modify_self_test.dart deleted file mode 100644 index 25e20e9cade..00000000000 --- a/tests/corelib_2/list_concurrent_modify_self_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "dart:collection"; -import "dart:typed_data"; -import "package:expect/expect.dart"; - -void main() { - testConcurrentAddSelf([1, 2, 3]); -} - -testConcurrentAddSelf(List list) { - Expect.throws(() { - list.addAll(list); - }, (e) => e is ConcurrentModificationError, "testConcurrentAddSelf($list)"); -} diff --git a/tests/corelib_2/list_concurrent_modify_test.dart b/tests/corelib_2/list_concurrent_modify_test.dart deleted file mode 100644 index b9ee4d9a33f..00000000000 --- a/tests/corelib_2/list_concurrent_modify_test.dart +++ /dev/null @@ -1,93 +0,0 @@ -// 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 - -import "dart:collection"; -import "dart:typed_data"; -import "package:expect/expect.dart"; - -void main() { - // Growable lists. Initial length 0. - testConcurrentModification([]); - testConcurrentModification([].toList()); - testConcurrentModification(new List.filled(0, null).toList()); - testConcurrentModification(new List.filled(0, null, growable: true)); - testConcurrentModification([]); - testConcurrentModification(new List.from(const [])); - testConcurrentModification(new MyList([])); - testConcurrentModification(new MyList([]).toList()); - - testConcurrentModification(new Uint8List(0).toList()); - testConcurrentModification(new Int8List(0).toList()); - testConcurrentModification(new Uint16List(0).toList()); - testConcurrentModification(new Int16List(0).toList()); - testConcurrentModification(new Uint32List(0).toList()); - testConcurrentModification(new Int32List(0).toList()); -} - -void testConcurrentModification(List list) { - // add, removeLast. - list.clear(); - list.addAll([1, 2, 3, 2, 7, 9, 9, 7, 2, 3, 2, 1]); - - // Operations that change the length cause ConcurrentModificationError. - void testModification(action()) { - testIterator(int when) { - list.length = 4; - list.setAll(0, [0, 1, 2, 3]); - Expect.throws(() { - for (var element in list) { - if (element == when) action(); - } - }, (e) => e is ConcurrentModificationError); - } - - testForEach(int when) { - list.length = 4; - list.setAll(0, [0, 1, 2, 3]); - Expect.throws(() { - list.forEach((var element) { - if (element == when) action(); - }); - }, (e) => e is ConcurrentModificationError); - } - - // Test the change at different points of the iteration. - testIterator(0); - testIterator(1); - testIterator(3); - testForEach(0); - testForEach(1); - testForEach(3); - } - - testModification(() => list.add(5)); - testModification(() => list.addAll([5, 6])); - testModification(() => list.removeLast()); - for (int i = 0; i < 4; i++) { - testModification(() => list.remove(i)); - testModification(() => list.removeAt(i)); - testModification(() => list.removeWhere((x) => x == i)); - testModification(() => list.retainWhere((x) => x != i)); - testModification(() => list.insert(i, 5)); - testModification(() => list.insertAll(i, [5, 6])); - testModification(() => list.removeRange(i, i + 1)); - testModification(() => list.replaceRange(i, i + 1, [5, 6])); - } -} - -class MyList extends ListBase { - List _source; - MyList(this._source); - int get length => _source.length; - void set length(int length) { - _source.length = length; - } - - E operator [](int index) => _source[index]; - void operator []=(int index, E value) { - _source[index] = value; - } -} diff --git a/tests/corelib_2/list_contains_argument_order_test.dart b/tests/corelib_2/list_contains_argument_order_test.dart deleted file mode 100644 index 6912a0b4b5b..00000000000 --- a/tests/corelib_2/list_contains_argument_order_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A { - const A(); - bool operator ==(Object other) { - return false; - } -} - -class B { - bool operator ==(Object other) { - Expect.fail("Bad equality order."); - } -} - -main() { - test(iterable) { - Expect.isFalse(iterable.contains(new B())); - } - - var iterables = [ - [new A()], - new List.filled(1, null)..[0] = new A(), - []..add(new A()), - const [const A()], - new Set()..add(new A()), - (new Map()..[new A()] = 0).keys, - (new Map()..[0] = new A()).values - ]; - - for (var iterable in iterables) { - test(iterable); - test(iterable.map((x) => x)); - test(iterable.take(1)); - } -} diff --git a/tests/corelib_2/list_copy_range_test.dart b/tests/corelib_2/list_copy_range_test.dart deleted file mode 100644 index a5f2c8efa55..00000000000 --- a/tests/corelib_2/list_copy_range_test.dart +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) 2018, 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 - -import "dart:typed_data"; -import "package:expect/expect.dart"; - -// Tests of List.copyRange. - -void main() { - var list = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; - - List.copyRange(list, 3, [10, 11, 12, 13], 0, 4); - - Expect.listEquals([0, 1, 2, 10, 11, 12, 13, 7, 8, 9], list); - - List.copyRange(list, 6, [20, 21, 22, 23], 1, 3); - - Expect.listEquals([0, 1, 2, 10, 11, 12, 21, 22, 8, 9], list); - - // Empty ranges won't change anything. - List.copyRange(list, 7, [30, 31, 32, 33], 3, 3); - List.copyRange(list, list.length, [30, 31, 32, 33], 3, 3); - - Expect.listEquals([0, 1, 2, 10, 11, 12, 21, 22, 8, 9], list); - - List.copyRange(list, 0, [40, 41, 42, 43], 0, 2); - - Expect.listEquals([40, 41, 2, 10, 11, 12, 21, 22, 8, 9], list); - - // Overlapping self-ranges - - List.copyRange(list, 2, list, 0, 4); - - Expect.listEquals([40, 41, 40, 41, 2, 10, 21, 22, 8, 9], list); - - List.copyRange(list, 4, list, 6, 10); - - Expect.listEquals([40, 41, 40, 41, 21, 22, 8, 9, 8, 9], list); - - // Invalid source ranges. - - Expect.throwsArgumentError(() { - List.copyRange(list, 0, [0, 0, 0], -1, 1); - }); - - Expect.throwsArgumentError(() { - List.copyRange(list, 0, [0, 0, 0], 0, 4); - }); - - Expect.throwsArgumentError(() { - List.copyRange(list, 0, [0, 0, 0], 2, 1); - }); - - Expect.throwsArgumentError(() { - List.copyRange(list, 0, [], 1, 1); - }); - - // Invalid target range. - Expect.throwsArgumentError(() { - List.copyRange(list, list.length - 3, [0, 0, 0, 0], 0, 4); - }); - - // Invalid target range. - Expect.throwsArgumentError(() { - List.copyRange(list, list.length + 1, [0, 0, 0, 0], 0, 0); - }); - - // Argument errors throw before changing anything, so list is unchanged. - Expect.listEquals([40, 41, 40, 41, 21, 22, 8, 9, 8, 9], list); - - // Omitting start/end (or passing null). - List.copyRange(list, 2, [1, 2, 3]); - - Expect.listEquals([40, 41, 1, 2, 3, 22, 8, 9, 8, 9], list); - - List.copyRange(list, 5, [1, 2, 3], 1); - - Expect.listEquals([40, 41, 1, 2, 3, 2, 3, 9, 8, 9], list); - - // Other kinds of lists. - var listu8 = new Uint8List.fromList([1, 2, 3, 4]); - var list16 = new Int16List.fromList([11, 12, -13, -14]); - List.copyRange(listu8, 2, list16, 1, 3); - Expect.listEquals([1, 2, 12, 256 - 13], listu8); - - var clist = const [1, 2, 3, 4]; - var flist = new List.filled(4, null)..setAll(0, [10, 11, 12, 13]); - List.copyRange(flist, 1, clist, 1, 3); - Expect.listEquals([10, 2, 3, 13], flist); - - // Invoking with a type parameter that is a supertype of the list types - // is valid and useful. - List ilist = [1, 2, 3, 4]; - List nlist = [11, 12, 13, 14]; - - List.copyRange(ilist, 1, nlist, 1, 3); - Expect.listEquals([1, 12, 13, 4], ilist); - List.copyRange(ilist, 1, nlist, 0, 2); - Expect.listEquals([1, 11, 12, 4], ilist); - List.copyRange(ilist, 1, nlist, 2, 4); - Expect.listEquals([1, 13, 14, 4], ilist); - - var d = new D(); - List bdlist = [d]; - List cdlist = [null]; - List.copyRange(cdlist, 0, bdlist, 0, 1); - Expect.identical(d, cdlist[0]); -} - -class B {} - -class C {} - -class D implements B, C {} diff --git a/tests/corelib_2/list_fill_range_test.dart b/tests/corelib_2/list_fill_range_test.dart deleted file mode 100644 index 36dc8e3a789..00000000000 --- a/tests/corelib_2/list_fill_range_test.dart +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import "dart:collection"; - -test(List list, int start, int end, [fillValue]) { - List copy = list.toList(); - list.fillRange(start, end, fillValue); - Expect.equals(copy.length, list.length); - for (int i = 0; i < start; i++) { - Expect.equals(copy[i], list[i]); - } - for (int i = start; i < end; i++) { - Expect.equals(fillValue, list[i]); - } - for (int i = end; i < list.length; i++) { - Expect.equals(copy[i], list[i]); - } -} - -class MyList extends ListBase { - List list; - MyList(this.list); - get length => list.length; - set length(value) { - list.length = value; - } - - operator [](index) => list[index]; - operator []=(index, val) { - list[index] = val; - } - - toString() => list.toString(); -} - -main() { - test([1, 2, 3], 0, 1); - test([1, 2, 3], 0, 1, 99); - test([1, 2, 3], 1, 1); - test([1, 2, 3], 1, 1, 499); - test([1, 2, 3], 3, 3); - test([1, 2, 3], 3, 3, 499); - test([1, 2, 3].toList(growable: false), 0, 1); - test([1, 2, 3].toList(growable: false), 0, 1, 99); - test([1, 2, 3].toList(growable: false), 1, 1); - test([1, 2, 3].toList(growable: false), 1, 1, 499); - test([1, 2, 3].toList(growable: false), 3, 3); - test([1, 2, 3].toList(growable: false), 3, 3, 499); - test(new MyList([1, 2, 3]), 0, 1); - test(new MyList([1, 2, 3]), 0, 1, 99); - test(new MyList([1, 2, 3]), 1, 1); - test(new MyList([1, 2, 3]), 1, 1, 499); - test(new MyList([1, 2, 3]), 3, 3); - test(new MyList([1, 2, 3]), 3, 3, 499); - - Expect.throwsRangeError(() => test([1, 2, 3], -1, 0)); - Expect.throwsRangeError(() => test([1, 2, 3], 2, 1)); - Expect.throwsRangeError(() => test([1, 2, 3], 0, -1)); - Expect.throwsRangeError(() => test([1, 2, 3], 1, 4)); - Expect.throwsRangeError(() => test(new MyList([1, 2, 3]), -1, 0)); - Expect.throwsRangeError(() => test(new MyList([1, 2, 3]), 2, 1)); - Expect.throwsRangeError(() => test(new MyList([1, 2, 3]), 0, -1)); - Expect.throwsRangeError(() => test(new MyList([1, 2, 3]), 1, 4)); - Expect.throwsUnsupportedError(() => test(const [1, 2, 3], 2, 3)); - Expect.throwsUnsupportedError(() => test(const [1, 2, 3], -1, 0)); - Expect.throwsUnsupportedError(() => test(const [1, 2, 3], 2, 1)); - Expect.throwsUnsupportedError(() => test(const [1, 2, 3], 0, -1)); - Expect.throwsUnsupportedError(() => test(const [1, 2, 3], 1, 4)); -} diff --git a/tests/corelib_2/list_filled_type_argument_test.dart b/tests/corelib_2/list_filled_type_argument_test.dart deleted file mode 100644 index 2a60fa3f73d..00000000000 --- a/tests/corelib_2/list_filled_type_argument_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -main() { - var a = new List.filled(42, 42); - Expect.isTrue(a is List); - Expect.isFalse(a is List); - - a = new List.filled(42, 42, growable: true); - Expect.isTrue(a is List); - Expect.isFalse(a is List); -} diff --git a/tests/corelib_2/list_first_test.dart b/tests/corelib_2/list_first_test.dart deleted file mode 100644 index 193a0cf57e0..00000000000 --- a/tests/corelib_2/list_first_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -void test(List list) { - if (list.isEmpty) { - Expect.throwsStateError(() => list.first); - } else { - Expect.equals(list[0], list.first); - } -} - -main() { - test([1, 2, 3]); - test(const ["foo", "bar"]); - test([]); - test(const []); -} diff --git a/tests/corelib_2/list_fixed_test.dart b/tests/corelib_2/list_fixed_test.dart deleted file mode 100644 index d6510ff27c5..00000000000 --- a/tests/corelib_2/list_fixed_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - var a; - - a = new List.filled(42, null); - Expect.equals(42, a.length); - Expect.throwsUnsupportedError(() => a.add(499)); - Expect.equals(42, a.length); - for (int i = 0; i < 42; i++) { - Expect.equals(null, a[i]); - } - Expect.throwsUnsupportedError(() => a.clear()); - Expect.equals(42, a.length); - - a = new List.filled(42, -2); - Expect.equals(42, a.length); - Expect.throwsUnsupportedError(() => a.add(499)); - Expect.equals(42, a.length); - for (int i = 0; i < 42; i++) { - Expect.equals(-2, a[i]); - } - Expect.throwsUnsupportedError(() => a.clear()); - Expect.equals(42, a.length); -} diff --git a/tests/corelib_2/list_for_each_test.dart b/tests/corelib_2/list_for_each_test.dart deleted file mode 100644 index 0469a01bd03..00000000000 --- a/tests/corelib_2/list_for_each_test.dart +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import "dart:collection"; - -class MyList extends ListBase { - List list; - MyList(this.list); - get length => list.length; - set length(value) { - list.length = value; - } - - operator [](index) => list[index]; - operator []=(index, val) { - list[index] = val; - } - - toString() => list.toString(); -} - -void testWithoutModification(List list) { - var seen = []; - list.forEach(seen.add); - - Expect.listEquals(list, seen); -} - -void testWithModification(List list) { - if (list.isEmpty) return; - Expect.throws(() => list.forEach((_) => list.add(0)), - (e) => e is ConcurrentModificationError); -} - -main() { - List fixedLengthList = new List.filled(10, null); - for (int i = 0; i < 10; i++) fixedLengthList[i] = i + 1; - - List growableList = []; - growableList.length = 10; - for (int i = 0; i < 10; i++) growableList[i] = i + 1; - - var growableLists = [ - [], - [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], - new MyList([1, 2, 3, 4, 5]), - growableList, - ]; - var fixedLengthLists = [ - const [], - fixedLengthList, - const [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], - new MyList(const [1, 2]), - ]; - - for (var list in growableLists) { - print(list); - testWithoutModification(list); - testWithModification(list); - } - - for (var list in fixedLengthLists) { - testWithoutModification(list); - } -} diff --git a/tests/corelib_2/list_get_range_test.dart b/tests/corelib_2/list_get_range_test.dart deleted file mode 100644 index 291fd9f3a8b..00000000000 --- a/tests/corelib_2/list_get_range_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -testGetRange(list, start, end, bool isModifiable) { - Expect.throwsRangeError(() => list.getRange(-1, 0)); - Expect.throwsRangeError(() => list.getRange(0, -1)); - Expect.throwsRangeError(() => list.getRange(1, 0)); - Expect.throwsRangeError(() => list.getRange(0, list.length + 1)); - Expect.throwsRangeError( - () => list.getRange(list.length + 1, list.length + 1)); - Iterable iterable = list.getRange(start, end); - Expect.isFalse(iterable is List); - if (start == end) { - Expect.isTrue(iterable.isEmpty); - return; - } - - var iterator = iterable.iterator; - for (int i = start; i < end; i++) { - Expect.isTrue(iterator.moveNext()); - Expect.equals(iterator.current, list[i]); - } - Expect.isFalse(iterator.moveNext()); - - if (isModifiable) { - for (int i = 0; i < list.length; i++) { - list[i]++; - } - - iterator = iterable.iterator; - for (int i = start; i < end; i++) { - Expect.isTrue(iterator.moveNext()); - Expect.equals(iterator.current, list[i]); - } - } -} - -main() { - testGetRange([1, 2], 0, 1, true); - testGetRange([], 0, 0, true); - testGetRange([1, 2, 3], 0, 0, true); - testGetRange([1, 2, 3], 1, 3, true); - testGetRange(const [1, 2], 0, 1, false); - testGetRange(const [], 0, 0, false); - testGetRange(const [1, 2, 3], 0, 0, false); - testGetRange(const [1, 2, 3], 1, 3, false); - testGetRange("abcd".codeUnits, 0, 1, false); - testGetRange("abcd".codeUnits, 0, 0, false); - testGetRange("abcd".codeUnits, 1, 3, false); - - Expect.throwsRangeError(() => [1].getRange(-1, 1)); - Expect.throwsRangeError(() => [3].getRange(0, -1)); - Expect.throwsRangeError(() => [4].getRange(1, 0)); - - var list = [1, 2, 3, 4]; - var iterable = list.getRange(1, 3); - Expect.equals(2, iterable.first); - Expect.equals(3, iterable.last); - list.length = 1; - Expect.isTrue(iterable.isEmpty); - list.add(99); - Expect.equals(99, iterable.single); - list.add(499); - Expect.equals(499, iterable.last); - Expect.equals(2, iterable.length); -} diff --git a/tests/corelib_2/list_growable_test.dart b/tests/corelib_2/list_growable_test.dart deleted file mode 100644 index 55b20882fd6..00000000000 --- a/tests/corelib_2/list_growable_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - var a; - a = []; - a.add(499); - Expect.equals(1, a.length); - Expect.equals(499, a[0]); - a.clear(); - Expect.equals(0, a.length); - Expect.throwsRangeError(() => a[0]); - - a = new List.filled(42, null).toList(); - Expect.equals(42, a.length); - a.add(499); - Expect.equals(43, a.length); - Expect.equals(499, a[42]); - Expect.equals(null, a[23]); - a.clear(); - Expect.equals(0, a.length); - Expect.throwsRangeError(() => a[0]); - - a = new List.filled(42, null).toList(); - Expect.equals(42, a.length); - a.add(499); - Expect.equals(43, a.length); - Expect.equals(499, a[42]); - for (int i = 0; i < 42; i++) { - Expect.equals(null, a[i]); - } - a.clear(); - Expect.equals(0, a.length); - Expect.throwsRangeError(() => a[0]); -} diff --git a/tests/corelib_2/list_index_of_test.dart b/tests/corelib_2/list_index_of_test.dart deleted file mode 100644 index d840d8677d2..00000000000 --- a/tests/corelib_2/list_index_of_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -main() { - test(new List.filled(5, null)); - var l = []; - l.length = 5; - test(l); -} - -void test(List list) { - list[0] = 1; - list[1] = 2; - list[2] = 3; - list[3] = 4; - list[4] = 1; - - Expect.equals(3, list.indexOf(4, 0)); - Expect.equals(0, list.indexOf(1, 0)); - Expect.equals(4, list.lastIndexOf(1, list.length - 1)); - - Expect.equals(4, list.indexOf(1, 1)); - Expect.equals(-1, list.lastIndexOf(4, 2)); - - Expect.equals(3, list.indexOf(4, 2)); - Expect.equals(3, list.indexOf(4, -5)); - Expect.equals(-1, list.indexOf(4, 50)); - - Expect.equals(-1, list.lastIndexOf(4, 2)); - Expect.equals(-1, list.lastIndexOf(4, -5)); - Expect.equals(3, list.lastIndexOf(4, 50)); -} diff --git a/tests/corelib_2/list_insert_all_test.dart b/tests/corelib_2/list_insert_all_test.dart deleted file mode 100644 index 854ab207944..00000000000 --- a/tests/corelib_2/list_insert_all_test.dart +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import "dart:collection"; - -test(List list, int index, Iterable iterable) { - List copy = list.toList(); - list.insertAll(index, iterable); - List iterableList = iterable.toList(); - Expect.equals(copy.length + iterableList.length, list.length); - for (int i = 0; i < index; i++) { - Expect.equals(copy[i], list[i]); - } - for (int i = 0; i < iterableList.length; i++) { - Expect.equals(iterableList[i], list[i + index]); - } - for (int i = index + iterableList.length; i < copy.length; i++) { - Expect.equals(copy[i], list[i + iterableList.length]); - } -} - -class MyList extends ListBase { - List list; - MyList(this.list); - get length => list.length; - set length(value) { - list.length = value; - } - - operator [](index) => list[index]; - operator []=(index, val) { - list[index] = val; - } - - toString() => list.toString(); -} - -main() { - test([1, 2, 3], 0, [4, 5]); - test([1, 2, 3], 1, [4, 5]); - test([1, 2, 3], 2, [4, 5]); - test([1, 2, 3], 3, [4, 5]); - test([1, 2, 3], 2, [4]); - test([1, 2, 3], 3, []); - test([1, 2, 3], 0, [4, 5].map((x) => x)); - test([1, 2, 3], 1, [4, 5].map((x) => x)); - test([1, 2, 3], 2, [4, 5].map((x) => x)); - test([1, 2, 3], 3, [4, 5].map((x) => x)); - test([1, 2, 3], 2, [4].map((x) => x)); - test([1, 2, 3], 3, [].map((x) => x)); - test([1, 2, 3], 0, const [4, 5]); - test([1, 2, 3], 1, const [4, 5]); - test([1, 2, 3], 2, const [4, 5]); - test([1, 2, 3], 3, const [4, 5]); - test([1, 2, 3], 2, const [4]); - test([1, 2, 3], 3, const []); - test([1, 2, 3], 0, new Iterable.generate(2, (x) => x + 4)); - test([1, 2, 3], 1, new Iterable.generate(2, (x) => x + 4)); - test([1, 2, 3], 2, new Iterable.generate(2, (x) => x + 4)); - test([1, 2, 3], 3, new Iterable.generate(2, (x) => x + 4)); - test([1, 2, 3], 2, new Iterable.generate(1, (x) => x + 4)); - test([1, 2, 3], 3, new Iterable.generate(0, (x) => x + 4)); - test(new MyList([1, 2, 3]), 0, [4, 5]); - test(new MyList([1, 2, 3]), 1, [4, 5]); - test(new MyList([1, 2, 3]), 2, [4]); - test(new MyList([1, 2, 3]), 3, []); - test(new MyList([1, 2, 3]), 2, [4, 5]); - test(new MyList([1, 2, 3]), 3, [4, 5]); - test(new MyList([1, 2, 3]), 0, [4, 5].map((x) => x)); - test(new MyList([1, 2, 3]), 1, [4, 5].map((x) => x)); - test(new MyList([1, 2, 3]), 2, [4, 5].map((x) => x)); - test(new MyList([1, 2, 3]), 3, [4, 5].map((x) => x)); - test(new MyList([1, 2, 3]), 2, [4].map((x) => x)); - test(new MyList([1, 2, 3]), 3, [].map((x) => x)); - - Expect.throwsRangeError(() => test([1, 2, 3], -1, [4, 5])); - Expect.throwsUnsupportedError( - () => test([1, 2, 3].toList(growable: false), -1, [4, 5])); - Expect.throwsRangeError(() => test(new MyList([1, 2, 3]), -1, [4, 5])); - Expect.throwsUnsupportedError( - () => test([1, 2, 3].toList(growable: false), 0, [4, 5])); -} diff --git a/tests/corelib_2/list_insert_test.dart b/tests/corelib_2/list_insert_test.dart deleted file mode 100644 index c00cd69bfa5..00000000000 --- a/tests/corelib_2/list_insert_test.dart +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'dart:collection'; - -class MyList extends ListBase { - List list; - MyList(this.list); - - get length => list.length; - set length(val) { - list.length = val; - } - - operator [](index) => list[index]; - operator []=(index, val) => list[index] = val; - - String toString() => "[" + join(", ") + "]"; -} - -// l1 must be a modifiable list with 5 elements from 0 to 4. -void testModifiableList(l1) { - // Index must be integer and in range. - Expect.throwsRangeError(() => l1.insert(-1, 5), "negative"); - Expect.throwsRangeError(() => l1.insert(6, 5), "too large"); - Expect.throws(() => l1.insert(null, 5)); - Expect.throws(() => l1.insert("1", 5)); - Expect.throws(() => l1.insert(1.5, 5)); - - l1.insert(5, 5); - Expect.equals(6, l1.length); - Expect.equals(5, l1[5]); - Expect.equals("[0, 1, 2, 3, 4, 5]", l1.toString()); - - l1.insert(0, -1); - Expect.equals(7, l1.length); - Expect.equals(-1, l1[0]); - Expect.equals("[-1, 0, 1, 2, 3, 4, 5]", l1.toString()); -} - -void main() { - // Normal modifiable list. - testModifiableList([0, 1, 2, 3, 4]); - testModifiableList(new MyList([0, 1, 2, 3, 4])); - - // Fixed size list. - var l2 = new List.filled(5, null); - for (var i = 0; i < 5; i++) l2[i] = i; - Expect.throwsUnsupportedError(() => l2.insert(2, 5), "fixed-length"); - - // Unmodifiable list. - var l3 = const [0, 1, 2, 3, 4]; - Expect.throwsUnsupportedError(() => l3.insert(2, 5), "unmodifiable"); - - // Empty list is not special. - var l4 = []; - l4.insert(0, 499); - Expect.equals(1, l4.length); - Expect.equals(499, l4[0]); -} diff --git a/tests/corelib_2/list_iterators_test.dart b/tests/corelib_2/list_iterators_test.dart deleted file mode 100644 index 86fd7f0cd39..00000000000 --- a/tests/corelib_2/list_iterators_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class ListIteratorsTest { - static void checkListIterator(List a) { - Iterator it = a.iterator; - Expect.isNull(it.current); - for (int i = 0; i < a.length; i++) { - Expect.isTrue(it.moveNext()); - var elem = it.current; - Expect.equals(a[i], elem); - } - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - } - - static testMain() { - checkListIterator([]); - checkListIterator([1, 2]); - checkListIterator(new List.filled(0, null)); - checkListIterator(new List.filled(10, null)); - checkListIterator([]); - List g = []; - g.addAll([1, 2, 3]); - checkListIterator(g); - - // This is mostly undefined behavior. - Iterator it = g.iterator; - Expect.isTrue(it.moveNext()); - Expect.equals(1, it.current); - Expect.isTrue(it.moveNext()); - g[1] = 49; - // The iterator keeps the last value. - Expect.equals(2, it.current); - Expect.isTrue(it.moveNext()); - g.removeLast(); - // The iterator keeps the last value. - Expect.equals(3, it.current); - Expect.throws(it.moveNext, (e) => e is ConcurrentModificationError); - // No progress when throwing. - Expect.equals(3, it.current); - } -} - -main() { - ListIteratorsTest.testMain(); -} diff --git a/tests/corelib_2/list_last_test.dart b/tests/corelib_2/list_last_test.dart deleted file mode 100644 index 3c86628cd90..00000000000 --- a/tests/corelib_2/list_last_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -void test(List list) { - if (list.isEmpty) { - Expect.throwsStateError(() => list.last); - } else { - Expect.equals(list[list.length - 1], list.last); - } -} - -main() { - test([1, 2, 3]); - test(const ["foo", "bar"]); - test([]); - test(const []); -} diff --git a/tests/corelib_2/list_literal_is_growable_test.dart b/tests/corelib_2/list_literal_is_growable_test.dart deleted file mode 100644 index 40307566d4a..00000000000 --- a/tests/corelib_2/list_literal_is_growable_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -main() { - var l = []; - l.add(1); - Expect.equals(1, l.length); - Expect.equals(1, l[0]); -} diff --git a/tests/corelib_2/list_literal_test.dart b/tests/corelib_2/list_literal_test.dart deleted file mode 100644 index fe7439b5d06..00000000000 --- a/tests/corelib_2/list_literal_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Test that a list literal is expandable and modifiable. - -class ListLiteralTest { - static void testMain() { - var list = [1, 2, 3]; - Expect.equals(3, list.length); - list.add(4); - Expect.equals(4, list.length); - list.addAll([5, 6]); - Expect.equals(6, list.length); - list[0] = 0; - Expect.equals(0, list[0]); - } -} - -main() { - ListLiteralTest.testMain(); -} diff --git a/tests/corelib_2/list_map_test.dart b/tests/corelib_2/list_map_test.dart deleted file mode 100644 index 19f56643d45..00000000000 --- a/tests/corelib_2/list_map_test.dart +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - testOperations(); -} - -class ThrowMarker { - const ThrowMarker(); - String toString() => "<>"; -} - -void testOperations() { - // Comparison lists. - List l = const [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; - List r = const [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]; - // Function that reverses l and r lists when used to map. - int rev(x) => 11 - x; - // A base list that starts out like l, but isn't const. - List base = l.map((x) => x).toList(); - - Iterable reversed = l.map(rev); - - Expect.listEquals(r, l.map(rev).toList()); - Expect.listEquals(l, l.map(rev).map(rev).toList()); - for (int i = 0; i < r.length; i++) { - Expect.equals(r[i], reversed.elementAt(i)); - } - Expect.equals(4, base.indexOf(5)); - Expect.equals(5, reversed.toList().indexOf(5)); - - // Reversed followed by combinations of skip and take. - List subr = [8, 7, 6, 5, 4, 3]; - Expect.listEquals(subr, reversed.skip(2).take(6).toList()); - Expect.listEquals(subr, reversed.take(8).skip(2).toList()); - Expect.listEquals(subr, - reversed.toList().reversed.skip(2).take(6).toList().reversed.toList()); - Expect.listEquals(subr, - reversed.toList().reversed.take(8).skip(2).toList().reversed.toList()); - Expect.listEquals(subr, - reversed.take(8).toList().reversed.take(6).toList().reversed.toList()); - Expect.listEquals(subr, - reversed.toList().reversed.take(8).toList().reversed.take(6).toList()); - Expect.listEquals(subr, - reversed.toList().reversed.skip(2).toList().reversed.skip(2).toList()); - Expect.listEquals(subr, - reversed.skip(2).toList().reversed.skip(2).toList().reversed.toList()); - - void testList(List list) { - var throws = const ThrowMarker(); - var mappedList = new List.filled(list.length, null); - for (int i = 0; i < list.length; i++) { - mappedList[i] = rev(list[i]); - } - Iterable reversed = list.map(rev); - - void testEquals(v1, v2, path) { - if (v1 is Iterable) { - Iterator i1 = v1.iterator; - Iterator i2 = v2.iterator; - int index = 0; - while (i1.moveNext()) { - Expect.isTrue(i2.moveNext(), - "Too few actual values. Expected[$index] == ${i1.current}"); - testEquals(i1.current, i2.current, "$path[$index]"); - index++; - } - if (i2.moveNext()) { - Expect - .fail("Too many actual values. Actual[$index] == ${i2.current}"); - } - } else { - Expect.equals(v1, v2, path); - } - } - - void testOp(operation(Iterable mappedList), name) { - var expect; - try { - expect = operation(mappedList); - } catch (e) { - expect = throws; - } - var actual; - try { - actual = operation(reversed); - } catch (e) { - actual = throws; - } - testEquals(expect, actual, "$name: $list"); - } - - testOp((i) => i.first, "first"); - testOp((i) => i.last, "last"); - testOp((i) => i.single, "single"); - testOp((i) => i.firstWhere((n) => false), "firstWhere i.firstWhere((n) => n < 10), "firstWhere<10"); - testOp((i) => i.firstWhere((n) => n < 5), "firstWhere<5"); - testOp((i) => i.firstWhere((n) => true), "firstWhere i.lastWhere((n) => false), "lastWhere i.lastWhere((n) => n < 5), "lastWhere<5"); - testOp((i) => i.lastWhere((n) => n < 10), "lastWhere<10"); - testOp((i) => i.lastWhere((n) => true), "lastWhere i.singleWhere((n) => false), "singleWhere i.singleWhere((n) => n < 5), "singelWhere<5"); - testOp((i) => i.singleWhere((n) => n < 10), "singelWhere<10"); - testOp((i) => i.singleWhere((n) => true), "singleWhere i.contains(5), "contains(5)"); - testOp((i) => i.contains(10), "contains(10)"); - testOp((i) => i.any((n) => n < 5), "any<5"); - testOp((i) => i.any((n) => n < 10), "any<10"); - testOp((i) => i.every((n) => n < 5), "every<5"); - testOp((i) => i.every((n) => n < 10), "every<10"); - testOp((i) => i.reduce((a, b) => a + b), "reduce-sum"); - testOp((i) => i.fold/**/(0, (a, b) => a + b), "fold-sum"); - testOp((i) => i.join("-"), "join-"); - testOp((i) => i.join(""), "join"); - testOp((i) => i.join(), "join-null"); - testOp((i) => i.map((n) => n * 2), "map*2"); - testOp((i) => i.where((n) => n < 5), "where<5"); - testOp((i) => i.where((n) => n < 10), "where<10"); - testOp((i) => i.expand((n) => []), "expand[]"); - testOp((i) => i.expand((n) => [n]), "expand[n]"); - testOp((i) => i.expand((n) => [n, n]), "expand[n, n]"); - testOp((i) => i.take(0), "take(0)"); - testOp((i) => i.take(5), "take(5)"); - testOp((i) => i.take(10), "take(10)"); - testOp((i) => i.take(15), "take(15)"); - testOp((i) => i.skip(0), "skip(0)"); - testOp((i) => i.skip(5), "skip(5)"); - testOp((i) => i.skip(10), "skip(10)"); - testOp((i) => i.skip(15), "skip(15)"); - testOp((i) => i.takeWhile((n) => false), "takeWhile(t)"); - testOp((i) => i.takeWhile((n) => n < 5), "takeWhile(n<5)"); - testOp((i) => i.takeWhile((n) => n > 5), "takeWhile(n>5)"); - testOp((i) => i.takeWhile((n) => true), "takeWhile(f)"); - testOp((i) => i.skipWhile((n) => false), "skipWhile(t)"); - testOp((i) => i.skipWhile((n) => n < 5), "skipWhile(n<5)"); - testOp((i) => i.skipWhile((n) => n > 5), "skipWhile(n>5)"); - testOp((i) => i.skipWhile((n) => true), "skipWhile(f)"); - } - - // Combinations of lists with 0, 1 and more elements. - testList([]); - testList([0]); - testList([10]); - testList([0, 1]); - testList([0, 10]); - testList([10, 11]); - testList([0, 5, 10]); - testList([10, 5, 0]); - testList([0, 1, 2, 3]); - testList([3, 4, 5, 6]); - testList([10, 11, 12, 13]); - testList(l); - testList(r); - testList(base); - - // Reverse const list. - Expect.listEquals(r, l.map(rev).toList()); -} diff --git a/tests/corelib_2/list_remove_range_test.dart b/tests/corelib_2/list_remove_range_test.dart deleted file mode 100644 index fa5c2713afc..00000000000 --- a/tests/corelib_2/list_remove_range_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -main() { - var list = []; - list.removeRange(0, 0); - Expect.equals(0, list.length); - Expect.throwsRangeError(() => list.removeRange(0, 1)); - - list.add(1); - list.removeRange(0, 0); - Expect.equals(1, list.length); - Expect.equals(1, list[0]); - - Expect.throwsRangeError(() => list.removeRange(0, 2)); - Expect.equals(1, list.length); - Expect.equals(1, list[0]); - - list.removeRange(0, 1); - Expect.equals(0, list.length); - - list.addAll([3, 4, 5, 6]); - Expect.equals(4, list.length); - list.removeRange(0, 4); - Expect.listEquals([], list); - - list.addAll([3, 4, 5, 6]); - list.removeRange(2, 4); - Expect.listEquals([3, 4], list); - list.addAll([5, 6]); - - Expect.throwsRangeError(() => list.removeRange(4, 5)); - Expect.listEquals([3, 4, 5, 6], list); - - list.removeRange(1, 3); - Expect.listEquals([3, 6], list); - - testNegativeIndices(); -} - -void testNegativeIndices() { - var list = [1, 2]; - Expect.throwsRangeError(() => list.removeRange(-1, 1)); - Expect.listEquals([1, 2], list); - - Expect.throwsRangeError(() => list.removeRange(0, -1)); - Expect.listEquals([1, 2], list); - - Expect.throwsRangeError(() => list.removeRange(-1, -1)); - Expect.listEquals([1, 2], list); - - Expect.throwsRangeError(() => list.removeRange(-1, 0)); - - Expect.throwsRangeError(() => list.removeRange(4, 4)); - Expect.listEquals([1, 2], list); -} diff --git a/tests/corelib_2/list_removeat_test.dart b/tests/corelib_2/list_removeat_test.dart deleted file mode 100644 index 71e93799c47..00000000000 --- a/tests/corelib_2/list_removeat_test.dart +++ /dev/null @@ -1,63 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; -import 'dart:collection'; - -class MyList extends ListBase { - List list; - MyList(this.list); - - get length => list.length; - set length(val) { - list.length = val; - } - - operator [](index) => list[index]; - operator []=(index, val) => list[index] = val; - - String toString() => "[" + join(", ") + "]"; -} - -// l1 must be a modifiable list with 5 elements from 0 to 4. -void testModifiableList(l1) { - // Index must be integer and in range. - Expect.throwsRangeError(() => l1.removeAt(-1), "negative"); - Expect.throwsRangeError(() => l1.removeAt(5), "too large"); - Expect.throwsArgumentError(() => l1.removeAt(null), "too large"); - - Expect.equals(2, l1.removeAt(2), "l1-remove2"); - Expect.equals(1, l1[1], "l1-1[1]"); - - Expect.equals(3, l1[2], "l1-1[2]"); - Expect.equals(4, l1[3], "l1-1[3]"); - Expect.equals(4, l1.length, "length-1"); - - Expect.equals(0, l1.removeAt(0), "l1-remove0"); - Expect.equals(1, l1[0], "l1-2[0]"); - Expect.equals(3, l1[1], "l1-2[1]"); - Expect.equals(4, l1[2], "l1-2[2]"); - Expect.equals(3, l1.length, "length-2"); -} - -void main() { - // Normal modifiable list. - testModifiableList([0, 1, 2, 3, 4]); - testModifiableList(new MyList([0, 1, 2, 3, 4])); - - // Fixed size list. - var l2 = new List.filled(5, null); - for (var i = 0; i < 5; i++) l2[i] = i; - Expect.throwsUnsupportedError(() => l2.removeAt(2), "fixed-length"); - - // Unmodifiable list. - var l3 = const [0, 1, 2, 3, 4]; - Expect.throwsUnsupportedError(() => l3.removeAt(2), "unmodifiable"); - - // Empty list is not special. - var l4 = []; - Expect.throwsRangeError(() => l4.removeAt(0), "empty"); -} diff --git a/tests/corelib_2/list_replace_range_test.dart b/tests/corelib_2/list_replace_range_test.dart deleted file mode 100644 index 2c4e3985eb7..00000000000 --- a/tests/corelib_2/list_replace_range_test.dart +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import "dart:collection"; - -test(List list, int start, int end, Iterable iterable) { - List copy = list.toList(); - list.replaceRange(start, end, iterable); - List iterableList = iterable.toList(); - Expect.equals(copy.length + iterableList.length - (end - start), list.length); - for (int i = 0; i < start; i++) { - Expect.equals(copy[i], list[i]); - } - for (int i = 0; i < iterableList.length; i++) { - Expect.equals(iterableList[i], list[i + start]); - } - int removedLength = end - start; - for (int i = end; i < copy.length; i++) { - Expect.equals(copy[i], list[i + iterableList.length - removedLength]); - } -} - -class MyList extends ListBase { - List list; - MyList(this.list); - get length => list.length; - set length(value) { - list.length = value; - } - - operator [](index) => list[index]; - operator []=(index, val) { - list[index] = val; - } - - toString() => list.toString(); -} - -main() { - test([1, 2, 3], 0, 1, [4, 5]); - test([1, 2, 3], 1, 1, [4, 5]); - test([1, 2, 3], 2, 3, [4, 5]); - test([1, 2, 3], 3, 3, [4, 5]); - test([1, 2, 3], 0, 3, [4, 5]); - test([1, 2, 3], 2, 3, [4]); - test([1, 2, 3], 0, 3, []); - test([1, 2, 3], 0, 1, [4, 5].map((x) => x)); - test([1, 2, 3], 1, 1, [4, 5].map((x) => x)); - test([1, 2, 3], 2, 3, [4, 5].map((x) => x)); - test([1, 2, 3], 3, 3, [4, 5].map((x) => x)); - test([1, 2, 3], 0, 3, [4, 5].map((x) => x)); - test([1, 2, 3], 2, 3, [4].map((x) => x)); - test([1, 2, 3], 0, 3, [].map((x) => x)); - test([1, 2, 3], 0, 1, const [4, 5]); - test([1, 2, 3], 1, 1, const [4, 5]); - test([1, 2, 3], 2, 3, const [4, 5]); - test([1, 2, 3], 3, 3, const [4, 5]); - test([1, 2, 3], 0, 3, const [4, 5]); - test([1, 2, 3], 2, 3, const [4]); - test([1, 2, 3], 0, 3, const []); - test([1, 2, 3], 0, 1, new Iterable.generate(2, (x) => x + 4)); - test([1, 2, 3], 1, 1, new Iterable.generate(2, (x) => x + 4)); - test([1, 2, 3], 2, 3, new Iterable.generate(2, (x) => x + 4)); - test([1, 2, 3], 3, 3, new Iterable.generate(2, (x) => x + 4)); - test([1, 2, 3], 0, 3, new Iterable.generate(2, (x) => x + 4)); - test([1, 2, 3], 2, 3, new Iterable.generate(2, (x) => x + 4)); - test(new MyList([1, 2, 3]), 0, 1, [4, 5]); - test(new MyList([1, 2, 3]), 1, 1, [4, 5]); - test(new MyList([1, 2, 3]), 2, 3, [4, 5]); - test(new MyList([1, 2, 3]), 3, 3, [4, 5]); - test(new MyList([1, 2, 3]), 0, 3, [4, 5]); - test(new MyList([1, 2, 3]), 2, 3, [4]); - test(new MyList([1, 2, 3]), 0, 3, []); - test(new MyList([1, 2, 3]), 0, 1, [4, 5].map((x) => x)); - test(new MyList([1, 2, 3]), 1, 1, [4, 5].map((x) => x)); - test(new MyList([1, 2, 3]), 2, 3, [4, 5].map((x) => x)); - test(new MyList([1, 2, 3]), 3, 3, [4, 5].map((x) => x)); - test(new MyList([1, 2, 3]), 0, 3, [4, 5].map((x) => x)); - test(new MyList([1, 2, 3]), 2, 3, [4].map((x) => x)); - test(new MyList([1, 2, 3]), 0, 3, [].map((x) => x)); - test(new MyList([1, 2, 3]), 0, 1, const [4, 5]); - test(new MyList([1, 2, 3]), 1, 1, const [4, 5]); - test(new MyList([1, 2, 3]), 2, 3, const [4, 5]); - test(new MyList([1, 2, 3]), 3, 3, const [4, 5]); - test(new MyList([1, 2, 3]), 0, 3, const [4, 5]); - test(new MyList([1, 2, 3]), 2, 3, const [4]); - test(new MyList([1, 2, 3]), 0, 3, const []); - test(new MyList([1, 2, 3]), 0, 1, new Iterable.generate(2, (x) => x + 4)); - test(new MyList([1, 2, 3]), 1, 1, new Iterable.generate(2, (x) => x + 4)); - test(new MyList([1, 2, 3]), 2, 3, new Iterable.generate(2, (x) => x + 4)); - test(new MyList([1, 2, 3]), 3, 3, new Iterable.generate(2, (x) => x + 4)); - test(new MyList([1, 2, 3]), 0, 3, new Iterable.generate(2, (x) => x + 4)); - test(new MyList([1, 2, 3]), 2, 3, new Iterable.generate(2, (x) => x + 4)); - - Expect.throwsRangeError(() => test([1, 2, 3], -1, 0, [])); - Expect.throwsRangeError(() => test([1, 2, 3], 2, 1, [])); - Expect.throwsRangeError(() => test([1, 2, 3], 0, -1, [])); - Expect.throwsRangeError(() => test([1, 2, 3], 1, 4, [])); - Expect.throwsRangeError(() => test(new MyList([1, 2, 3]), -1, 0, [])); - Expect.throwsRangeError(() => test(new MyList([1, 2, 3]), 2, 1, [])); - Expect.throwsRangeError(() => test(new MyList([1, 2, 3]), 0, -1, [])); - Expect.throwsRangeError(() => test(new MyList([1, 2, 3]), 1, 4, [])); - Expect.throwsUnsupportedError( - () => test([1, 2, 3].toList(growable: false), 2, 3, [])); - Expect.throwsUnsupportedError( - () => test([1, 2, 3].toList(growable: false), -1, 0, [])); - Expect.throwsUnsupportedError( - () => test([1, 2, 3].toList(growable: false), 2, 1, [])); - Expect.throwsUnsupportedError( - () => test([1, 2, 3].toList(growable: false), 0, -1, [])); - Expect.throwsUnsupportedError( - () => test([1, 2, 3].toList(growable: false), 1, 4, [])); - Expect.throwsUnsupportedError(() => test(const [1, 2, 3], 2, 3, [])); - Expect.throwsUnsupportedError(() => test(const [1, 2, 3], -1, 0, [])); - Expect.throwsUnsupportedError(() => test(const [1, 2, 3], 2, 1, [])); - Expect.throwsUnsupportedError(() => test(const [1, 2, 3], 0, -1, [])); - Expect.throwsUnsupportedError(() => test(const [1, 2, 3], 1, 4, [])); -} diff --git a/tests/corelib_2/list_reversed_test.dart b/tests/corelib_2/list_reversed_test.dart deleted file mode 100644 index c56b0a60592..00000000000 --- a/tests/corelib_2/list_reversed_test.dart +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - testOperations(); -} - -class ThrowMarker { - const ThrowMarker(); - String toString() => "<>"; -} - -void testOperations() { - // Comparison lists. - var l = const [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; - var r = const [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]; - // A base list that starts out like l. - var base = l.toList(); - // A lazy reverse of base. - var reversed = base.reversed; - - Expect.listEquals(r, reversed.toList()); - Expect.listEquals(l, reversed.toList().reversed.toList()); - for (int i = 0; i < r.length; i++) { - Expect.equals(r[i], reversed.elementAt(i)); - } - Expect.equals(4, base.indexOf(5)); - Expect.equals(5, reversed.toList().indexOf(5)); - - // Reversed followed by combinations of skip and take. - List subr = [8, 7, 6, 5, 4, 3]; - Expect.listEquals(subr, reversed.skip(2).take(6).toList()); - Expect.listEquals(subr, reversed.take(8).skip(2).toList()); - Expect.listEquals(subr, - reversed.toList().reversed.skip(2).take(6).toList().reversed.toList()); - Expect.listEquals(subr, - reversed.toList().reversed.take(8).skip(2).toList().reversed.toList()); - Expect.listEquals(subr, - reversed.take(8).toList().reversed.take(6).toList().reversed.toList()); - Expect.listEquals(subr, - reversed.toList().reversed.take(8).toList().reversed.take(6).toList()); - Expect.listEquals(subr, - reversed.toList().reversed.skip(2).toList().reversed.skip(2).toList()); - Expect.listEquals(subr, - reversed.skip(2).toList().reversed.skip(2).toList().reversed.toList()); - - void testList(List list) { - var throws = const ThrowMarker(); - void testEquals(v1, v2, path) { - if (v1 is Iterable) { - Iterator i1 = v1.iterator; - Iterator i2 = v2.iterator; - int index = 0; - while (i1.moveNext()) { - Expect.isTrue(i2.moveNext(), - "Too few actual values. Expected[$index] == ${i1.current}"); - testEquals(i1.current, i2.current, "$path[$index]"); - index++; - } - if (i2.moveNext()) { - Expect - .fail("Too many actual values. Actual[$index] == ${i2.current}"); - } - } else { - Expect.equals(v1, v2, path); - } - } - - void testOp(operation(Iterable reversedList), name) { - var reversedList = new List.filled(list.length, null); - for (int i = 0; i < list.length; i++) { - reversedList[i] = list[list.length - 1 - i]; - } - var reversed = list.reversed; - var expect; - try { - expect = operation(reversedList); - } catch (e) { - expect = throws; - } - var actual; - try { - actual = operation(reversed); - } catch (e) { - actual = throws; - } - testEquals(expect, actual, "$name: $list"); - } - - testOp((i) => i.first, "first"); - testOp((i) => i.last, "last"); - testOp((i) => i.single, "single"); - testOp((i) => i.firstWhere((n) => n < 5), "firstWhere<5"); - testOp((i) => i.firstWhere((n) => n < 10), "firstWhere<10"); - testOp((i) => i.lastWhere((n) => n < 5), "lastWhere<5"); - testOp((i) => i.lastWhere((n) => n < 10), "lastWhere<10"); - testOp((i) => i.singleWhere((n) => n < 5), "singelWhere<5"); - testOp((i) => i.singleWhere((n) => n < 10), "singelWhere<10"); - testOp((i) => i.contains(5), "contains(5)"); - testOp((i) => i.contains(10), "contains(10)"); - testOp((i) => i.any((n) => n < 5), "any<5"); - testOp((i) => i.any((n) => n < 10), "any<10"); - testOp((i) => i.every((n) => n < 5), "every<5"); - testOp((i) => i.every((n) => n < 10), "every<10"); - testOp((i) => i.reduce((a, b) => a + b), "reduce-sum"); - testOp((i) => i.fold/**/(0, (a, b) => a + b), "fold-sum"); - testOp((i) => i.join("-"), "join-"); - testOp((i) => i.join(""), "join"); - testOp((i) => i.join(), "join-null"); - testOp((i) => i.map((n) => n * 2), "map*2"); - testOp((i) => i.where((n) => n < 5), "where<5"); - testOp((i) => i.where((n) => n < 10), "where<10"); - testOp((i) => i.expand((n) => []), "expand[]"); - testOp((i) => i.expand((n) => [n]), "expand[n]"); - testOp((i) => i.expand((n) => [n, n]), "expand[n, n]"); - } - - // Combinations of lists with 0, 1 and more elements. - testList([]); - testList([0]); - testList([10]); - testList([0, 1]); - testList([0, 10]); - testList([10, 11]); - testList([0, 5, 10]); - testList([10, 5, 0]); - testList([0, 1, 2, 3]); - testList([3, 4, 5, 6]); - testList([10, 11, 12, 13]); - - // Reverse const list. - Expect.listEquals(r, l.reversed.toList()); -} diff --git a/tests/corelib_2/list_set_all_test.dart b/tests/corelib_2/list_set_all_test.dart deleted file mode 100644 index 0b4b475253c..00000000000 --- a/tests/corelib_2/list_set_all_test.dart +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import "dart:collection"; - -test(List list, int index, Iterable iterable) { - List copy = list.toList(); - list.setAll(index, iterable); - Expect.equals(copy.length, list.length); - for (int i = 0; i < index; i++) { - Expect.equals(copy[i], list[i]); - } - List iterableList = iterable.toList(); - for (int i = 0; i < iterableList.length; i++) { - Expect.equals(iterableList[i], list[i + index]); - } - for (int i = index + iterableList.length; i < copy.length; i++) { - Expect.equals(copy[i], list[i]); - } -} - -class MyList extends ListBase { - List list; - MyList(this.list); - get length => list.length; - set length(value) { - list.length = value; - } - - operator [](index) => list[index]; - operator []=(index, val) { - list[index] = val; - } - - toString() => list.toString(); -} - -main() { - test([1, 2, 3], 0, [4, 5]); - test([1, 2, 3], 1, [4, 5]); - test([1, 2, 3], 2, [4]); - test([1, 2, 3], 3, []); - test([1, 2, 3], 0, [4, 5].map((x) => x)); - test([1, 2, 3], 1, [4, 5].map((x) => x)); - test([1, 2, 3], 2, [4].map((x) => x)); - test([1, 2, 3], 3, [].map((x) => x)); - test([1, 2, 3], 0, const [4, 5]); - test([1, 2, 3], 1, const [4, 5]); - test([1, 2, 3], 2, const [4]); - test([1, 2, 3], 3, const []); - test([1, 2, 3], 0, new Iterable.generate(2, (x) => x + 4)); - test([1, 2, 3], 1, new Iterable.generate(2, (x) => x + 4)); - test([1, 2, 3], 2, new Iterable.generate(1, (x) => x + 4)); - test([1, 2, 3], 3, new Iterable.generate(0, (x) => x + 4)); - test([1, 2, 3].toList(growable: false), 0, [4, 5]); - test([1, 2, 3].toList(growable: false), 1, [4, 5]); - test([1, 2, 3].toList(growable: false), 2, [4]); - test([1, 2, 3].toList(growable: false), 3, []); - test([1, 2, 3].toList(growable: false), 0, [4, 5].map((x) => x)); - test([1, 2, 3].toList(growable: false), 1, [4, 5].map((x) => x)); - test([1, 2, 3].toList(growable: false), 2, [4].map((x) => x)); - test([1, 2, 3].toList(growable: false), 3, [].map((x) => x)); - test([1, 2, 3].toList(growable: false), 0, const [4, 5]); - test([1, 2, 3].toList(growable: false), 1, const [4, 5]); - test([1, 2, 3].toList(growable: false), 2, const [4]); - test([1, 2, 3].toList(growable: false), 3, const []); - test([1, 2, 3].toList(growable: false), 0, - new Iterable.generate(2, (x) => x + 4)); - test([1, 2, 3].toList(growable: false), 1, - new Iterable.generate(2, (x) => x + 4)); - test([1, 2, 3].toList(growable: false), 2, - new Iterable.generate(1, (x) => x + 4)); - test([1, 2, 3].toList(growable: false), 3, - new Iterable.generate(0, (x) => x + 4)); - test(new MyList([1, 2, 3]), 0, [4, 5]); - test(new MyList([1, 2, 3]), 1, [4, 5]); - test(new MyList([1, 2, 3]), 2, [4]); - test(new MyList([1, 2, 3]), 3, []); - test(new MyList([1, 2, 3]), 0, [4, 5].map((x) => x)); - test(new MyList([1, 2, 3]), 1, [4, 5].map((x) => x)); - test(new MyList([1, 2, 3]), 2, [4].map((x) => x)); - test(new MyList([1, 2, 3]), 3, [].map((x) => x)); - - Expect.throwsRangeError(() => test([1, 2, 3], -1, [4, 5])); - Expect.throwsRangeError( - () => test([1, 2, 3].toList(growable: false), -1, [4, 5])); - Expect.throwsRangeError(() => test([1, 2, 3], 1, [4, 5, 6])); - Expect.throwsRangeError( - () => test([1, 2, 3].toList(growable: false), 1, [4, 5, 6])); - Expect.throwsRangeError(() => test(new MyList([1, 2, 3]), -1, [4, 5])); - Expect.throwsRangeError(() => test(new MyList([1, 2, 3]), 1, [4, 5, 6])); - Expect.throwsUnsupportedError(() => test(const [1, 2, 3], 0, [4, 5])); - Expect.throwsUnsupportedError(() => test(const [1, 2, 3], -1, [4, 5])); - Expect.throwsUnsupportedError(() => test(const [1, 2, 3], 1, [4, 5, 6])); -} diff --git a/tests/corelib_2/list_set_range_test.dart b/tests/corelib_2/list_set_range_test.dart deleted file mode 100644 index 186f77e98cf..00000000000 --- a/tests/corelib_2/list_set_range_test.dart +++ /dev/null @@ -1,87 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -main() { - var list = []; - list.setRange(0, 0, const []); - list.setRange(0, 0, []); - list.setRange(0, 0, const [], 1); - list.setRange(0, 0, [], 1); - Expect.equals(0, list.length); - Expect.throwsRangeError(() => list.setRange(0, 1, [])); - Expect.throwsRangeError(() => list.setRange(0, 1, [], 1)); - Expect.throwsRangeError(() => list.setRange(0, 1, [1], 0)); - - list.add(1); - list.setRange(0, 0, [], 0); - Expect.equals(1, list.length); - Expect.equals(1, list[0]); - list.setRange(0, 0, const [], 0); - Expect.equals(1, list.length); - Expect.equals(1, list[0]); - - Expect.throwsRangeError(() => list.setRange(0, 2, [1, 2])); - Expect.equals(1, list.length); - Expect.equals(1, list[0]); - - Expect.throwsStateError(() => list.setRange(0, 1, [1, 2], 2)); - Expect.equals(1, list.length); - Expect.equals(1, list[0]); - - list.setRange(0, 1, [2], 0); - Expect.equals(1, list.length); - Expect.equals(2, list[0]); - - list.setRange(0, 1, const [3], 0); - Expect.equals(1, list.length); - Expect.equals(3, list[0]); - - list.addAll([4, 5, 6]); - Expect.equals(4, list.length); - list.setRange(0, 4, [1, 2, 3, 4]); - Expect.listEquals([1, 2, 3, 4], list); - - list.setRange(2, 4, [5, 6, 7, 8]); - Expect.listEquals([1, 2, 5, 6], list); - - Expect.throwsRangeError(() => list.setRange(4, 5, [5, 6, 7, 8])); - Expect.listEquals([1, 2, 5, 6], list); - - list.setRange(1, 3, [9, 10, 11, 12]); - Expect.listEquals([1, 9, 10, 6], list); - - testNegativeIndices(); - - testNonExtendableList(); -} - -void testNegativeIndices() { - var list = [1, 2]; - Expect.throwsRangeError(() => list.setRange(-1, 1, [1])); - Expect.throwsArgumentError(() => list.setRange(0, 1, [1], -1)); - - Expect.throwsRangeError(() => list.setRange(2, 1, [1])); - - Expect.throwsArgumentError(() => list.setRange(-1, -2, [1], -1)); - Expect.listEquals([1, 2], list); - - Expect.throwsRangeError(() => list.setRange(-1, -1, [1])); - Expect.listEquals([1, 2], list); - - // The skipCount is only used if the length is not 0. - list.setRange(0, 0, [1], -1); - Expect.listEquals([1, 2], list); -} - -void testNonExtendableList() { - var list = new List.filled(6, null); - Expect.listEquals([null, null, null, null, null, null], list); - list.setRange(0, 3, [1, 2, 3, 4]); - list.setRange(3, 6, [1, 2, 3, 4]); - Expect.listEquals([1, 2, 3, 1, 2, 3], list); -} diff --git a/tests/corelib_2/list_sort_test.dart b/tests/corelib_2/list_sort_test.dart deleted file mode 100644 index 629c24cba0c..00000000000 --- a/tests/corelib_2/list_sort_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// 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 list_sort_test; - -import 'sort_helper.dart'; - -class ListSortTest { - static void testMain() { - var compare = Comparable.compare; - var sort = (List list) => list.sort(compare); - new SortHelper(sort, compare).run(); - - new SortHelper((List list) => list.sort(), compare).run(); - - compare = (a, b) => -a.compareTo(b); - new SortHelper(sort, compare).run(); - } -} - -main() { - ListSortTest.testMain(); -} diff --git a/tests/corelib_2/list_sublist_test.dart b/tests/corelib_2/list_sublist_test.dart deleted file mode 100644 index 8fbd5d187fc..00000000000 --- a/tests/corelib_2/list_sublist_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -main() { - Expect.listEquals([], [].sublist(0, 0)); - Expect.listEquals([], const [].sublist(0, 0)); - - Expect.listEquals([1, 2], [1, 2].sublist(0, 2)); - Expect.listEquals([1, 2], const [1, 2].sublist(0, 2)); - - Expect.listEquals([1], [1, 2].sublist(0, 1)); - Expect.listEquals([1], const [1, 2].sublist(0, 1)); - - Expect.listEquals([2], [1, 2].sublist(1, 2)); - Expect.listEquals([2], const [1, 2].sublist(1, 2)); - - Expect.listEquals([], [1, 2].sublist(0, 0)); - Expect.listEquals([], const [1, 2].sublist(0, 0)); - - Expect.listEquals([2, 3], [1, 2, 3, 4].sublist(1, 3)); - Expect.listEquals([2, 3], const [1, 2, 3, 4].sublist(1, 3)); - - Expect.listEquals([2, 3], [1, 2, 3, 4].sublist(1, 3)); - Expect.listEquals([2, 3], const [1, 2, 3, 4].sublist(1, 3)); - - Expect.throwsArgumentError(() => [].sublist(-1, null)); - Expect.throwsArgumentError(() => const [].sublist(-1, null)); - Expect.throwsArgumentError(() => [].sublist(-1, 0)); - Expect.throwsArgumentError(() => const [].sublist(-1, 0)); - Expect.throwsArgumentError(() => [].sublist(-1, -1)); - Expect.throwsArgumentError(() => const [].sublist(-1, -1)); - Expect.throwsArgumentError(() => [].sublist(-1, 1)); - Expect.throwsArgumentError(() => const [].sublist(-1, 1)); - Expect.throwsArgumentError(() => [].sublist(0, -1)); - Expect.throwsArgumentError(() => const [].sublist(0, -1)); - Expect.throwsArgumentError(() => [].sublist(0, 1)); - Expect.throwsArgumentError(() => const [].sublist(0, 1)); - Expect.throwsArgumentError(() => [].sublist(1, null)); - Expect.throwsArgumentError(() => const [].sublist(1, null)); - Expect.throwsArgumentError(() => [].sublist(1, 0)); - Expect.throwsArgumentError(() => const [].sublist(1, 0)); - Expect.throwsArgumentError(() => [].sublist(1, -1)); - Expect.throwsArgumentError(() => const [].sublist(1, -1)); - Expect.throwsArgumentError(() => [].sublist(1, 1)); - Expect.throwsArgumentError(() => const [].sublist(1, 1)); - - Expect.throwsArgumentError(() => [1].sublist(0, 2)); - Expect.throwsArgumentError(() => [1].sublist(1, 2)); - Expect.throwsArgumentError(() => [1].sublist(1, 0)); -} diff --git a/tests/corelib_2/list_test.dart b/tests/corelib_2/list_test.dart deleted file mode 100644 index f965479c667..00000000000 --- a/tests/corelib_2/list_test.dart +++ /dev/null @@ -1,584 +0,0 @@ -// 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 - -import "dart:collection"; -import "dart:typed_data"; -import "package:expect/expect.dart"; - -void main() { - // Typed lists - fixed length and can only contain integers. - testTypedList(new Uint8List(4)); - testTypedList(new Int8List(4)); - testTypedList(new Uint16List(4)); - testTypedList(new Int16List(4)); - testTypedList(new Uint32List(4)); - testTypedList(new Int32List(4)); - testTypedList(new Uint8List(4).toList(growable: false)); - testTypedList(new Int8List(4).toList(growable: false)); - testTypedList(new Uint16List(4).toList(growable: false)); - testTypedList(new Int16List(4).toList(growable: false)); - testTypedList(new Uint32List(4).toList(growable: false)); - testTypedList(new Int32List(4).toList(growable: false)); - - // Fixed length lists, length 4. - testFixedLengthList(() => new List.filled(4, null)); - testFixedLengthList(() => new List.filled(4, null).toList(growable: false)); - testFixedLengthList(() => ([]..length = 4).toList(growable: false)); - // ListBase implementation of List. - testFixedLengthList(() => new MyFixedList(new List.filled(4, null))); - testFixedLengthList(() => new MyFixedList(new List.filled(4, null)).toList(growable: false)); - - // Growable lists. Initial length 0. - testGrowableList(() => []); - testGrowableList(() => [].toList()); - testGrowableList(() => new List.filled(0, null).toList()); - testGrowableList(() => new List.filled(0, null, growable: true)); - testGrowableList(() => []); - testGrowableList(() => new List.from(const [])); - testGrowableList(() => new MyList([])); - testGrowableList(() => new MyList([]).toList()); - - testTypedGrowableList(new Uint8List(0).toList()); - testTypedGrowableList(new Int8List(0).toList()); - testTypedGrowableList(new Uint16List(0).toList()); - testTypedGrowableList(new Int16List(0).toList()); - testTypedGrowableList(new Uint32List(0).toList()); - testTypedGrowableList(new Int32List(0).toList()); - - testListConstructor(); - - testErrors(); -} - -void testErrors() { - // Regression for issue http://dartbug.com/24295 - testIndexError(list, index, name) { - try { - list[list.length]; - } on RangeError catch (err, s) { - Expect.isTrue(err is RangeError, "$name[$index]"); - Expect.equals(list.length, err.invalidValue, "$name[$index] value"); - Expect.equals(list.length - 1, err.end, "$name[$index] end"); - Expect.equals(0, err.start, "$name[$index] start"); - } - } - - testIndex(list, name) { - testIndexError(list, list.length, name); // Just too big. - testIndexError(list, -1, name); // Negative. - testIndexError(list, 0x123456789, name); // > 2^32. - testIndexError(list, -0x123456789, name); // < -2^32. - } - - // Slices. - testSliceError(list, start, end, name) { - name = "$name[$start:$end]"; - var realError; - try { - RangeError.checkValidRange(start, end, list.length); - } catch (e) { - realError = e; - } - var result; - try { - result = list.sublist(start, end); - } on RangeError catch (actualError) { - Expect.isNotNull(realError, "$name should not fail"); - Expect.isTrue(actualError is RangeError, "$name is-error: $actualError"); - Expect.equals(realError.name, actualError.name, "$name name"); - Expect.equals(realError.invalidValue, actualError.invalidValue, - "$name[0:l+1] value"); - Expect.equals(realError.start, actualError.start, "$name[0:l+1] start"); - Expect.equals(realError.end, actualError.end, "$name[0:l+1] end"); - return; - } - // Didn't throw. - Expect.isNull(realError, "$name should fail"); - Expect.equals(end - start, result.length, "$name result length"); - } - - testSlice(list, name) { - testSliceError(list, 0, list.length, name); // Should not fail. - testSliceError(list, 0, list.length + 1, name); - testSliceError(list, 0, 0x123456789, name); - testSliceError(list, -1, list.length, name); - testSliceError(list, -0x123456789, list.length, name); - testSliceError(list, list.length + 1, list.length + 1, name); - testSliceError(list, -1, null, name); - if (list.length > 0) { - testSliceError(list, list.length, list.length - 1, name); - } - } - - testRangeErrors(list, name) { - testIndex(list, "$name#${list.length} index"); - testSlice(list, "$name#${list.length} slice"); - } - - // Empty lists. - testRangeErrors([], "list"); - testRangeErrors(new List.filled(0, null), "fixed-list"); - testRangeErrors(const [], "const-list"); - testRangeErrors(new List.unmodifiable([]), "unmodifiable"); - testRangeErrors(new Uint8List(0), "typed-list"); - testRangeErrors(new Uint8List.view(new Uint8List(0).buffer), "typed-list"); - testRangeErrors([1, 2, 3].sublist(1, 1), "sub-list"); - // Non-empty lists. - testRangeErrors([1, 2, 3], "list"); - testRangeErrors(new List.filled(3, null), "fixed-list"); - testRangeErrors(const [1, 2, 3], "const-list"); - testRangeErrors(new List.unmodifiable([1, 2, 3]), "unmodifiable"); - testRangeErrors(new Uint8List(3), "typed-list"); - testRangeErrors(new Uint8List.view(new Uint8List(3).buffer), "typed-list"); - testRangeErrors([1, 2, 3, 4, 5].sublist(1, 3), "sub-list"); -} - -void testLength(int length, List list) { - Expect.equals(length, list.length); - (length == 0 ? Expect.isTrue : Expect.isFalse)(list.isEmpty); - (length != 0 ? Expect.isTrue : Expect.isFalse)(list.isNotEmpty); -} - -void testTypedLengthInvariantOperations(List list) { - // length - Expect.equals(list.length, 4); - // operators [], []=. - for (int i = 0; i < 4; i++) list[i] = 0; - list[0] = 4; - Expect.listEquals([4, 0, 0, 0], list); - list[1] = 7; - Expect.listEquals([4, 7, 0, 0], list); - list[3] = 2; - Expect.listEquals([4, 7, 0, 2], list); - - for (int i = 0; i < list.length; i++) { - list[i] = i; - } - - // indexOf, lastIndexOf - for (int i = 0; i < 4; i++) { - Expect.equals(i, list[i]); - Expect.equals(i, list.indexOf(i)); - Expect.equals(i, list.lastIndexOf(i)); - } - - // setRange. - list.setRange(0, 4, [3, 2, 1, 0]); - Expect.listEquals([3, 2, 1, 0], list); - - list.setRange(1, 4, list); - Expect.listEquals([3, 3, 2, 1], list); - - list.setRange(0, 3, list, 1); - Expect.listEquals([3, 2, 1, 1], list); - list.setRange(0, 3, list, 1); - Expect.listEquals([2, 1, 1, 1], list); - - list.setRange(2, 4, list, 0); - Expect.listEquals([2, 1, 2, 1], list); - - // setAll. - list.setAll(0, [3, 2, 0, 1]); - Expect.listEquals([3, 2, 0, 1], list); - list.setAll(1, [0, 1]); - Expect.listEquals([3, 0, 1, 1], list); - - // fillRange. - list.fillRange(1, 3, 7); - Expect.listEquals([3, 7, 7, 1], list); - list.fillRange(0, 0, 9); - Expect.listEquals([3, 7, 7, 1], list); - list.fillRange(4, 4, 9); - Expect.listEquals([3, 7, 7, 1], list); - list.fillRange(0, 4, 9); - Expect.listEquals([9, 9, 9, 9], list); - - // sort. - list.setRange(0, 4, [3, 2, 1, 0]); - list.sort(); - Expect.listEquals([0, 1, 2, 3], list); - list.setRange(0, 4, [1, 2, 3, 0]); - list.sort(); - Expect.listEquals([0, 1, 2, 3], list); - list.setRange(0, 4, [1, 3, 0, 2]); - list.sort((a, b) => b - a); // reverse compare. - Expect.listEquals([3, 2, 1, 0], list); - list.setRange(0, 4, [1, 2, 3, 0]); - list.sort((a, b) => b - a); - Expect.listEquals([3, 2, 1, 0], list); - - // Some Iterable methods. - - list.setRange(0, 4, [0, 1, 2, 3]); - // map. - testMap(val) { - return val * 2 + 10; - } - - List mapped = list.map(testMap).toList(); - Expect.equals(mapped.length, list.length); - for (var i = 0; i < list.length; i++) { - Expect.equals(mapped[i], list[i] * 2 + 10); - } - - matchAll(val) => true; - matchSome(val) { - return (val == 1 || val == 2); - } - - matchSomeFirst(val) { - return val == 0; - } - - matchSomeLast(val) { - return val == 3; - } - - matchNone(val) => false; - - // where. - Iterable filtered = list.where(matchSome); - Expect.equals(filtered.length, 2); - - // every - Expect.isTrue(list.every(matchAll)); - Expect.isFalse(list.every(matchSome)); - Expect.isFalse(list.every(matchNone)); - - // any - Expect.isTrue(list.any(matchAll)); - Expect.isTrue(list.any(matchSome)); - Expect.isTrue(list.any(matchSomeFirst)); - Expect.isTrue(list.any(matchSomeLast)); - Expect.isFalse(list.any(matchNone)); - - // Argument checking isn't implemented for typed arrays in browsers, - // so it's moved to the method below for now. -} - -void testUntypedListTests(List list) { - // Tests that need untyped lists. - list.setAll(0, [0, 1, 2, 3]); - Expect.equals(-1, list.indexOf(100)); - Expect.equals(-1, list.lastIndexOf(100)); - list[2] = new Yes(); - Expect.equals(2, list.indexOf(100)); - Expect.equals(2, list.lastIndexOf(100)); - list[3] = new Yes(); - Expect.equals(2, list.indexOf(100)); - Expect.equals(3, list.lastIndexOf(100)); - list[2] = 2; - Expect.equals(3, list.indexOf(100)); - Expect.equals(3, list.lastIndexOf(100)); - list[3] = 3; - Expect.equals(-1, list.indexOf(100)); - Expect.equals(-1, list.lastIndexOf(100)); -} - -void testLengthInvariantOperations(List list) { - testTypedLengthInvariantOperations(list); - - Expect.throwsTypeError(() => testUntypedListTests(list), - 'List cannot store non-ints'); - - // Argument errors on bad indices. List is still [0, 1, 2, 3]. - - // Direct indices (0 <= index < length). - Expect.throwsArgumentError(() => list[-1]); - Expect.throwsArgumentError(() => list[4]); - Expect.throwsArgumentError(() => list[-1] = 99); - Expect.throwsArgumentError(() => list[4] = 99); - Expect.throwsArgumentError(() => list.elementAt(-1)); - Expect.throwsArgumentError(() => list.elementAt(4)); - // Ranges (0 <= start <= end <= length). - Expect.throwsArgumentError(() => list.sublist(-1, 2)); - Expect.throwsArgumentError(() => list.sublist(-1, 5)); - Expect.throwsArgumentError(() => list.sublist(2, 5)); - Expect.throwsArgumentError(() => list.sublist(4, 2)); - Expect.throwsArgumentError(() => list.getRange(-1, 2)); - Expect.throwsArgumentError(() => list.getRange(-1, 5)); - Expect.throwsArgumentError(() => list.getRange(2, 5)); - Expect.throwsArgumentError(() => list.getRange(4, 2)); - Expect.throwsArgumentError(() => list.setRange(-1, 2, [1, 2, 3])); - Expect.throwsArgumentError(() => list.setRange(-1, 5, [1, 2, 3, 4, 5, 6])); - Expect.throwsArgumentError(() => list.setRange(2, 5, [1, 2, 3])); - Expect.throwsArgumentError(() => list.setRange(4, 2, [1, 2])); - // for setAll, end is implicitly start + values.length. - Expect.throwsArgumentError(() => list.setAll(-1, [])); - Expect.throwsArgumentError(() => list.setAll(5, [])); - Expect.throwsArgumentError(() => list.setAll(2, [1, 2, 3])); - Expect.throwsArgumentError(() => list.fillRange(-1, 2)); - Expect.throwsArgumentError(() => list.fillRange(-1, 5)); - Expect.throwsArgumentError(() => list.fillRange(2, 5)); - Expect.throwsArgumentError(() => list.fillRange(4, 2)); -} - -void testTypedList(List list) { - testTypedLengthInvariantOperations(list); - testCannotChangeLength(list); -} - -void testFixedLengthList(List Function() createList) { - testLengthInvariantOperations(createList()); - testCannotChangeLength(createList()); - testUntypedListTests(createList()); -} - -void testCannotChangeLength(List list) { - list.setAll(0, [0, 1, 2, 3]); - Expect.throwsUnsupportedError(() => list.add(0)); - Expect.throwsUnsupportedError(() => list.addAll([0])); - Expect.throwsUnsupportedError(() => list.removeLast()); - Expect.throwsUnsupportedError(() => list.insert(0, 1)); - Expect.throwsUnsupportedError(() => list.insertAll(0, [1])); - Expect.throwsUnsupportedError(() => list.clear()); - Expect.throwsUnsupportedError(() => list.remove(1)); - Expect.throwsUnsupportedError(() => list.removeAt(1)); - Expect.throwsUnsupportedError(() => list.removeRange(0, 1)); - Expect.throwsUnsupportedError(() => list.replaceRange(0, 1, [])); -} - -void testTypedGrowableList(List list) { - testLength(0, list); - // set length. - list.length = 4; - testLength(4, list); - - testTypedLengthInvariantOperations(list); - - testGrowableListOperations(list); -} - -void testGrowableList(List Function() createList) { - List list = createList(); - testLength(0, list); - list.length = 4; - testLength(4, list); - - testLengthInvariantOperations(list); - testGrowableListOperations(list); - - List listDynamic = createList(); - testLength(0, listDynamic); - listDynamic.length = 4; - testLength(4, listDynamic); - - testUntypedListTests(listDynamic); -} - -void testGrowableListOperations(List list) { - // add, removeLast. - list.clear(); - testLength(0, list); - list.add(4); - testLength(1, list); - Expect.equals(4, list.removeLast()); - testLength(0, list); - - for (int i = 0; i < 100; i++) { - list.add(i); - } - - Expect.equals(list.length, 100); - for (int i = 0; i < 100; i++) { - Expect.equals(i, list[i]); - } - - Expect.equals(17, list.indexOf(17)); - Expect.equals(17, list.lastIndexOf(17)); - Expect.equals(-1, list.indexOf(999)); - Expect.equals(-1, list.lastIndexOf(999)); - - Expect.equals(99, list.removeLast()); - testLength(99, list); - - // remove. - Expect.isTrue(list.remove(4)); - testLength(98, list); - Expect.isFalse(list.remove(4)); - testLength(98, list); - list.clear(); - testLength(0, list); - - list.add(4); - list.add(4); - testLength(2, list); - Expect.isTrue(list.remove(4)); - testLength(1, list); - Expect.isTrue(list.remove(4)); - testLength(0, list); - Expect.isFalse(list.remove(4)); - testLength(0, list); - - // removeWhere, retainWhere - for (int i = 0; i < 100; i++) { - list.add(i); - } - testLength(100, list); - list.removeWhere((int x) => x.isOdd); - testLength(50, list); - for (int i = 0; i < list.length; i++) { - Expect.isTrue(list[i].isEven); - } - list.retainWhere((int x) => (x % 3) == 0); - testLength(17, list); - for (int i = 0; i < list.length; i++) { - Expect.isTrue((list[i] % 6) == 0); - } - - // insert, remove, removeAt - list.clear(); - testLength(0, list); - - list.insert(0, 0); - Expect.listEquals([0], list); - - list.insert(0, 1); - Expect.listEquals([1, 0], list); - - list.insert(0, 2); - Expect.listEquals([2, 1, 0], list); - - Expect.isTrue(list.remove(1)); - Expect.listEquals([2, 0], list); - - list.insert(1, 1); - Expect.listEquals([2, 1, 0], list); - - list.removeAt(1); - Expect.listEquals([2, 0], list); - - list.removeAt(1); - Expect.listEquals([2], list); - - // insertAll - list.insertAll(0, [1, 2, 3]); - Expect.listEquals([1, 2, 3, 2], list); - - list.insertAll(2, []); - Expect.listEquals([1, 2, 3, 2], list); - - list.insertAll(4, [7, 9]); - Expect.listEquals([1, 2, 3, 2, 7, 9], list); - - // addAll - list.addAll(list.reversed.toList()); - Expect.listEquals([1, 2, 3, 2, 7, 9, 9, 7, 2, 3, 2, 1], list); - - list.addAll([]); - Expect.listEquals([1, 2, 3, 2, 7, 9, 9, 7, 2, 3, 2, 1], list); - - // replaceRange - list.replaceRange(3, 7, [0, 0]); - Expect.listEquals([1, 2, 3, 0, 0, 7, 2, 3, 2, 1], list); - - list.replaceRange(2, 3, [5, 5, 5]); - Expect.listEquals([1, 2, 5, 5, 5, 0, 0, 7, 2, 3, 2, 1], list); - - list.replaceRange(2, 4, [6, 6]); - Expect.listEquals([1, 2, 6, 6, 5, 0, 0, 7, 2, 3, 2, 1], list); - - list.replaceRange(6, 8, []); - Expect.listEquals([1, 2, 6, 6, 5, 0, 2, 3, 2, 1], list); - - // Any operation that doesn't change the length should be safe for iteration. - testSafeConcurrentModification(action()) { - list.length = 4; - list.setAll(0, [0, 1, 2, 3]); - for (var i in list) { - action(); - } - list.forEach((e) => action()); - } - - testSafeConcurrentModification(() { - list.add(5); - list.removeLast(); - }); - testSafeConcurrentModification(() { - list.add(list[0]); - list.removeAt(0); - }); - testSafeConcurrentModification(() { - list.insert(0, list.removeLast()); - }); - testSafeConcurrentModification(() { - list.replaceRange(1, 3, list.sublist(1, 3).reversed); - }); - - // Argument errors on bad indices for methods that are only allowed - // on growable lists. - list.length = 4; - list.setAll(0, [0, 1, 2, 3]); - - // Direct indices (0 <= index < length). - Expect.throwsArgumentError(() => list.removeAt(-1)); - Expect.throwsArgumentError(() => list.removeAt(4)); - // Direct indices including end (0 <= index <= length). - Expect.throwsArgumentError(() => list.insert(-1, 0)); - Expect.throwsArgumentError(() => list.insert(5, 0)); - Expect.throwsArgumentError(() => list.insertAll(-1, [0])); - Expect.throwsArgumentError(() => list.insertAll(5, [0])); - Expect.throwsArgumentError(() => list.insertAll(-1, [0])); - Expect.throwsArgumentError(() => list.insertAll(5, [0])); - // Ranges (0 <= start <= end <= length). - Expect.throwsArgumentError(() => list.removeRange(-1, 2)); - Expect.throwsArgumentError(() => list.removeRange(2, 5)); - Expect.throwsArgumentError(() => list.removeRange(-1, 5)); - Expect.throwsArgumentError(() => list.removeRange(4, 2)); - Expect.throwsArgumentError(() => list.replaceRange(-1, 2, [9])); - Expect.throwsArgumentError(() => list.replaceRange(2, 5, [9])); - Expect.throwsArgumentError(() => list.replaceRange(-1, 5, [9])); - Expect.throwsArgumentError(() => list.replaceRange(4, 2, [9])); -} - -class Yes { - operator ==(var other) => true; - int get hashCode => 0; -} - -class MyList extends ListBase { - List _source; - MyList(this._source); - int get length => _source.length; - void set length(int length) { - _source.length = length; - } - - E operator [](int index) => _source[index]; - void operator []=(int index, E value) { - _source[index] = value; - } -} - -class MyFixedList extends ListBase { - List _source; - MyFixedList(this._source); - int get length => _source.length; - void set length(int length) { - throw new UnsupportedError("Fixed length!"); - } - - E operator [](int index) => _source[index]; - void operator []=(int index, E value) { - _source[index] = value; - } -} - -void testListConstructor() { - // Is fixed-length. - Expect.throws(() => new List.filled(0, null).add(4)); - Expect.throws(() => new List.filled(-2, null)); // Not negative. //# 01: ok - // Not null. - Expect.throws(() => new List.filled(null, null)); - Expect.listEquals([4], []..add(4)); - // Is fixed-length. - Expect.throws(() => new List.filled(0, 42).add(4)); - // Not negative. - Expect.throws(() => new List.filled(-2, 42)); - // Not null. - Expect.throws(() => new List.filled(null, 42)); -} diff --git a/tests/corelib_2/list_to_string2_test.dart b/tests/corelib_2/list_to_string2_test.dart deleted file mode 100644 index 87cd3d7b23b..00000000000 --- a/tests/corelib_2/list_to_string2_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -main() { - List list = [1, 2]; - list.add(list); - - List list2 = new List.filled(4, null); - list2[0] = 1; - list2[1] = 2; - list2[2] = list2; - list2[3] = list; - - Expect.equals("[1, 2, [...]]", list.toString()); - Expect.equals("[1, 2, [...], [1, 2, [...]]]", list2.toString()); - - // Throwing in the middle of a toString does not leave the - // list as being visited. - List list3 = [1, 2, new ThrowOnToString(), 4]; - Expect.throws(list3.toString, (e) => e == "Bad!"); - list3[2] = 3; - Expect.equals("[1, 2, 3, 4]", list3.toString()); -} - -class ThrowOnToString { - String toString() { - throw "Bad!"; - } -} diff --git a/tests/corelib_2/list_to_string_test.dart b/tests/corelib_2/list_to_string_test.dart deleted file mode 100644 index 9abbbb85465..00000000000 --- a/tests/corelib_2/list_to_string_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:collection'; - -class MyList extends ListBase { - final list; - MyList(this.list); - - get length => list.length; - set length(val) { - list.length = val; - } - - operator [](index) => list[index]; - operator []=(index, val) => list[index] = val; -} - -main() { - Expect.equals("[]", [].toString()); - Expect.equals("[1]", [1].toString()); - Expect.equals("[1, 2]", [1, 2].toString()); - Expect.equals("[]", const [].toString()); - Expect.equals("[1]", const [1].toString()); - Expect.equals("[1, 2]", const [1, 2].toString()); - Expect.equals("[]", new MyList([]).toString()); - Expect.equals("[1]", new MyList([1]).toString()); - Expect.equals("[1, 2]", new MyList([1, 2]).toString()); -} diff --git a/tests/corelib_2/list_unmodifiable_cast_test.dart b/tests/corelib_2/list_unmodifiable_cast_test.dart deleted file mode 100644 index 8defd250aeb..00000000000 --- a/tests/corelib_2/list_unmodifiable_cast_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2018, 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 list_unmodifiable_cast_test; - -import "package:expect/expect.dart"; -import 'dart:collection'; - -void main() { - test(const [37]); - test(new UnmodifiableListView([37])); - - test(new UnmodifiableListView([37])); - test(new UnmodifiableListView([37])); - - test(new UnmodifiableListView([37]).cast()); - test(new UnmodifiableListView([37]).cast()); - test(new UnmodifiableListView([37]).cast()); - test(new UnmodifiableListView([37]).cast()); - - var m2 = new List.unmodifiable([37]); - test(m2); - test(m2.cast()); -} - -void test(List list) { - Expect.equals(1, list.length); - Expect.equals(37, list.first); - - Expect.throws(list.clear); - Expect.throws(() { - list.remove(37); - }); - Expect.throws(() { - list[0] = 42; - }); - Expect.throws(() { - list.addAll([42]); - }); -} diff --git a/tests/corelib_2/list_unmodifiable_test.dart b/tests/corelib_2/list_unmodifiable_test.dart deleted file mode 100644 index cbd217b0b1b..00000000000 --- a/tests/corelib_2/list_unmodifiable_test.dart +++ /dev/null @@ -1,314 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; -import "dart:collection"; -import "dart:typed_data"; - -main() { - var intTest = new Test(); - intTest.run("ConstList", createConstList); - intTest.run("FixedList", createFixedList); - intTest.run("GrowableList", createGrowableList); - intTest.run("ConstMapKeys", createConstMapKeys); - intTest.run("ConstMapValues", createConstMapValues); - intTest.run("MapKeys", createMapKeys); - intTest.run("MapValues", createMapValues); - intTest.run("SplayMapKeys", createSplayMapKeys); - intTest.run("SplayMapValues", createSplayMapValues); - intTest.run("Set", createSet); - intTest.run("SplaySet", createSplaySet); - intTest.run("Queue", createQueue); - intTest.run("ListMapKeys", createListMapKeys); - intTest.run("ListMapValues", createListMapValues); - intTest.run("CodeUnits", createCodeUnits); - intTest.run("TypedList", createTypedList); - - new Test().test("strings", ["a", "b", "c"]); - - new Test().test("superclass", [1, 2, 3]); - new Test().test("subclass", [1, 2, 3]); -} - -class Test { - run(name, Iterable create(int size)) { - test(name, create(0)); - test(name, create(1)); - test(name, create(3)); - } - - test(name, iterable) { - testSingle(name, iterable); - testSingle("$name-where", iterable.where((x) => true)); - testSingle("$name-map", iterable.map((x) => x)); - testSingle("$name-expand", iterable.expand((x) => [x, x])); - testSingle("$name-skip", iterable.skip(1)); - testSingle("$name-take", iterable.take(2)); - testSingle("$name-skipWhile", iterable.skipWhile((x) => false)); - testSingle("$name-takeWhile", iterable.takeWhile((x) => true)); - } - - testSingle(name, iterable) { - var elements = iterable.toList(); - int length = elements.length; - - var list = new List.unmodifiable(iterable); - - Expect.isTrue(list is List, "$name-type-$E"); - Expect.isTrue(list is! List, "$name-!type-!$E"); - - checkElements() { - Expect.equals(length, list.length); - for (int i = 0; i < length; i++) { - Expect.identical(elements[i], list[i], "$name-identical-$i"); - } - } - - checkElements(); - - throws(funcName, func) { - try { - func(); - } catch (e, s) { - Expect.isTrue(e is UnsupportedError, "$name: $funcName threw $e"); - return; - } - checkElements(); - Expect.fail("$name: $funcName didn't throw"); - } - - throws("[]=", () { - list[0] = null; - }); - throws("length=", () { - list.length = length + 1; - }); - throws("length=", () { - list.length = length - 1; - }); - throws("setAll", () { - list.setAll(0, []); - }); - throws("add", () { - list.add(null); - }); - throws("insert", () { - list.insert(0, null); - }); - throws("insertAll", () { - list.insertAll(0, []); - }); - throws("addAll", () { - list.addAll([]); - }); - throws("remove", () { - list.remove(null); - }); - throws("removeWhere", () { - list.removeWhere((x) => true); - }); - throws("retainWhere", () { - list.retainWhere((x) => false); - }); - throws("sort", () { - list.sort(); - }); - throws("shuffle", () { - list.shuffle(); - }); - throws("clear", () { - list.clear(); - }); - throws("removeAt", () { - list.removeAt(0); - }); - throws("removeLast", () { - list.removeLast(); - }); - throws("setRange", () { - list.setRange(0, 1, []); - }); - throws("removeRange", () { - list.removeRange(0, 1); - }); - throws("replaceRange", () { - list.replaceRange(0, 1, []); - }); - throws("fillRange", () { - list.fillRange(0, 1, null); - }); - - success(opName, op(List list), [bool throws = false]) { - if (throws) { - var e1, e2; - Expect.throws(() => op(elements), (e) { - e1 = e; - return true; - }, '$name :: $opName should throw for $elements'); - Expect.throws(() => op(list), (e) { - e2 = e; - return true; - }, '$name :: $opName should throw for $list'); - Expect.equals( - e1.runtimeType, - e2.runtimeType, - "$name :: $opName threw different errors for $elements and $list: " - "${e1.runtimeType} vs ${e2.runtimeType}"); - return; - } - var expect = op(elements); - var actual = op(list); - checkElements(); - if (expect is List) { - Expect.listEquals(expect, actual, "$name-$opName"); - } else if (expect is Iterable) { - Expect.isTrue(actual is Iterable); - Expect.listEquals(expect.toList(), actual.toList(), "$name-$opName"); - } else { - Expect.equals(expect, actual, "$name-$opName"); - } - } - - success("indexOf", (l) => l.indexOf(null)); - success("lastIndexOf", (l) => l.lastIndexOf(null)); - success("contains", (l) => l.contains(2)); - success("elementAt", (l) => l.elementAt(1), list.length < 2); - success("reversed", (l) => l.reversed); - success("sublist0-1", (l) => l.sublist(0, 1), list.isEmpty); - success("getRange0-1", (l) => l.getRange(0, 1), list.isEmpty); - success("asMap-keys", (l) => l.asMap().keys); - success("asMap-values", (l) => l.asMap().values); - success("where", (l) => l.where((x) => true)); - success("map", (l) => l.map((x) => x)); - success("expand", (l) => l.expand((x) => [x, x])); - success("skip", (l) => l.skip(1)); - success("take", (l) => l.take(1)); - success("skipWhile", (l) => l.skipWhile((x) => false)); - success("takeWhile", (l) => l.takeWhile((x) => true)); - success("first", (l) => l.first, list.isEmpty); - success("last", (l) => l.last, list.isEmpty); - success("single", (l) => l.single, list.length != 1); - success("firstWhere", (l) => l.firstWhere((x) => true), list.isEmpty); - success("lastWhere", (l) => l.lastWhere((x) => true), list.isEmpty); - success("singleWhere", (l) => l.singleWhere((x) => true), list.length != 1); - success("isEmpty", (l) => l.isEmpty); - success("isNotEmpty", (l) => l.isNotEmpty); - success("join", (l) => l.join("/")); - success("fold", (l) => l.fold("--", (a, b) => "$a/$b")); - if (elements is List && list is List) { - success( - "reduce", - (l) => (l as List).reduce((a, b) => (a + b).floor()), - list.isEmpty); - } - success("every", (l) => l.every((x) => x == 0)); - success("any", (l) => l.any((x) => x == 2)); - success("toList", (l) => l.toList()); - success("toSet", (l) => l.toSet()); - success("toString", (l) => l.toString()); - - var it = elements.iterator; - list.forEach((v) { - Expect.isTrue(it.moveNext()); - Expect.equals(it.current, v); - }); - Expect.isFalse(it.moveNext()); - - if (elements is List && list is List) { - success("String.fromCharCodes", - (l) => new String.fromCharCodes(l as List)); - } - } -} - -List createConstList(int n) { - if (n == 0) return const []; - return const [1, 2, 3]; -} - -List createFixedList(int n) { - var result = new List.filled(n, null); - for (int i = 0; i < n; i++) result[i] = n; - return result; -} - -List createGrowableList(int n) { - var result = []..length = n; - for (int i = 0; i < n; i++) result[i] = n; - return result; -} - -Iterable createIterable(int n) => new Iterable.generate(n); -Iterable createConstMapKeys(int n) { - if (n == 0) return const {}.keys; - return const {0: 0, 1: 1, 2: 2}.keys; -} - -Iterable createConstMapValues(int n) { - if (n == 0) return const {}.values; - return const {0: 0, 1: 1, 2: 2}.values; -} - -Iterable createMapKeys(int n) { - var map = {}; - for (int i = 0; i < n; i++) map[i] = i; - return map.keys; -} - -Iterable createMapValues(int n) { - var map = {}; - for (int i = 0; i < n; i++) map[i] = i; - return map.values; -} - -Iterable createSplayMapKeys(int n) { - var map = new SplayTreeMap(); - for (int i = 0; i < n; i++) map[i] = i; - return map.keys; -} - -Iterable createSplayMapValues(int n) { - var map = new SplayTreeMap(); - for (int i = 0; i < n; i++) map[i] = i; - return map.values; -} - -Set createSet(int n) { - var set = new Set(); - for (int i = 0; i < n; i++) set.add(i); - return set; -} - -SplayTreeSet createSplaySet(int n) { - var set = new SplayTreeSet(); - for (int i = 0; i < n; i++) set.add(i); - return set; -} - -Queue createQueue(int n) { - var queue = new Queue(); - for (int i = 0; i < n; i++) queue.add(i); - return queue; -} - -Iterable createListMapKeys(int n) { - return createGrowableList(n).asMap().keys; -} - -Iterable createListMapValues(int n) { - return createGrowableList(n).asMap().values; -} - -Iterable createCodeUnits(int n) { - var string = new String.fromCharCodes(new Iterable.generate(n)); - return string.codeUnits; -} - -Uint8List createTypedList(int n) { - var tl = new Uint8List(n); - for (int i = 0; i < n; i++) tl[i] = i; - return tl; -} diff --git a/tests/corelib_2/list_write_elements_test.dart b/tests/corelib_2/list_write_elements_test.dart deleted file mode 100644 index f850375c57f..00000000000 --- a/tests/corelib_2/list_write_elements_test.dart +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2018, 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 - -import "dart:typed_data"; -import "package:expect/expect.dart"; - -void main() { - test([1, 2, 3, 4], [5, 6], 2, [1, 2, 5, 6]); - test([1, 2, 3, 4], [5, 6], 0, [5, 6, 3, 4]); - test([1, 2, 3, 4], [5, 6], 1, [1, 5, 6, 4]); - test([1, 2, 3, 4], [], 2, [1, 2, 3, 4]); - test([1, 2, 3, 4], [5, 6], 2, [1, 2, 5, 6]); - test([1, 2, 3, 4], [5, 6], 2, [1, 2, 5, 6]); - test([1, 2, 3, 4], [5, 6], 2, [1, 2, 5, 6]); - test([], [], 0, []); - test([1], [2], 0, [2]); - - // Other (non-list) iterables. - test([1, 2, 3, 4], new Iterable.generate(2, (x) => x + 7), 1, [1, 7, 8, 4]); - test([1, 2, 3, 4], [9, 9, 5, 6].skip(2), 1, [1, 5, 6, 4]); - test([1, 2, 3, 4], [5, 6, 9, 9].take(2), 1, [1, 5, 6, 4]); - test([1, 2, 3, 4], [9, 5, 9, 6, 9, 9].where((x) => x != 9), 1, [1, 5, 6, 4]); - test([1, 2, 3, 4], new Set.from([5, 6]), 1, [1, 5, 6, 4]); - - // Other types of lists. - test(new Uint8List(4), [5, 6], 1, [0, 5, 6, 0]); - test(new Uint8List(4), [-5, 6], 1, [0, 256 - 5, 6, 0]); - - // Over-long iterables. Updates until end, then throws. - testThrows([], [1], 0); - testThrows([2], [1], 1); - testThrows([2], [1], 1); - testThrows([1, 2, 3, 4], [5, 6, 7, 8], 2, [1, 2, 5, 6]); - - // Throwing iterable. - Expect.throws(() { - Iterable throwingIterable() sync* { - yield 1; - throw "2"; - } - - List.writeIterable([1, 2, 3], 1, throwingIterable()); - }, (e) => e == "2"); - - // Bad start index. - testThrows([1, 2], [1], -1); - testThrows([1, 2], [1], 2); - - // Working at a supertype is practical and useful. - test([1, 2, 3, 4], [5, 6], 1, [1, 5, 6, 4]); - - var d = new D(); - test([null], [d], 0, [d]); -} - -testThrows(list, iterable, start, [expect]) { - Expect.throws(() { - List.writeIterable(list, start, iterable); - }); - if (expect != null) { - Expect.listEquals(expect, list); - } -} - -test(List list, Iterable iterable, int start, List expect) { - List.writeIterable(list, start, iterable); - Expect.listEquals(expect, list); -} - -class B {} - -class C {} - -class D implements B, C {} diff --git a/tests/corelib_2/local_date_time_test.dart b/tests/corelib_2/local_date_time_test.dart deleted file mode 100644 index b0aaae366bb..00000000000 --- a/tests/corelib_2/local_date_time_test.dart +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) 2021, 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 - -import "package:expect/expect.dart"; - -// Tests that local DateTime constructor works correctly around -// time zone changes. - -void main() { - // Find two points in time with different time zones. - // Search linearly back from 2020-01-01 in steps of 60 days. - // Stop if reaching 1970-01-01 (epoch) without finding anything. - var time = DateTime.utc(2020, 1, 1).millisecondsSinceEpoch; - var offset = - DateTime.fromMillisecondsSinceEpoch(time).timeZoneOffset.inMilliseconds; - var time2 = time; - var offset2 = offset; - // Whether the first change found moved the clock forward. - bool changeForward = false; - // 60 days. - const delta = 60 * Duration.millisecondsPerDay; - while (time2 > 0) { - time2 -= delta; - offset2 = DateTime.fromMillisecondsSinceEpoch(time2) - .timeZoneOffset - .inMilliseconds; - if (verbose) { - print("Search: ${tz(time2, offset2)} - ${tz(time, offset)}"); - } - if (offset2 != offset) { - // Two different time zones found. Now find the precise (to the minute) - // time where a change happened, and test that. - test(findChange(time2, time)); - // Remember if the change moved the clock forward or backward. - changeForward = offset2 < offset; - break; - } - } - time = time2; - // Find a change in the other direction. - // Keep iterating backwards to find another time zone - // where the change was in the other direction. - while (time > 0) { - time -= delta; - offset = - DateTime.fromMillisecondsSinceEpoch(time).timeZoneOffset.inMilliseconds; - if (verbose) { - print("Search: ${tz(time2, offset2)} - ${tz(time, offset)}"); - } - if (offset != offset2) { - if ((offset < offset2) != changeForward) { - test(findChange(time, time2)); - break; - } else { - // Another change in the same direction. - // Probably rare, but move use this time - // as end-point instead, so the binary search will be shorter. - time2 = time; - offset2 = offset; - } - } - } -} - -/// Tests that a local time zone change is correctly represented -/// by local time [DateTime] objects created from date-time values. -void test(TimeZoneChange change) { - if (verbose) print("Test of $change"); - // Sanity check. The time zones match the [change] one second - // before and after the change. - var before = DateTime.fromMillisecondsSinceEpoch( - change.msSinceEpoch - Duration.millisecondsPerSecond); - Expect.equals(change.msOffsetBefore, before.timeZoneOffset.inMilliseconds); - var after = DateTime.fromMillisecondsSinceEpoch( - change.msSinceEpoch + Duration.millisecondsPerSecond); - Expect.equals(change.msOffsetAfter, after.timeZoneOffset.inMilliseconds); - - if (verbose) print("From MS : ${dtz(before)} --- ${dtz(after)}"); - - // Create local DateTime objects for the same YMDHMS as the - // values above. See that we pick the correct local time for them. - - // One second before the change, even if clock moves backwards, - // we pick a value that is in the earlier time zone. - var localBefore = DateTime(before.year, before.month, before.day, before.hour, - before.minute, before.second); - Expect.equals(before, localBefore); - - // Asking for a calendar date one second after the change. - var localAfter = DateTime(after.year, after.month, after.day, after.hour, - after.minute, after.second); - if (verbose) print("From YMDHMS: ${dtz(localBefore)} --- ${dtz(localAfter)}"); - if (before.timeZoneOffset < after.timeZoneOffset) { - // Clock moved forwards. - // We're asking for a clock time which doesn't exist. - if (verbose) { - print("Forward: ${dtz(after)} vs ${dtz(localAfter)}"); - } - Expect.equals(after, localAfter); - } else { - // Clock moved backwards. - // We're asking for a clock time which exists more than once. - // Should be in the former time zone. - Expect.equals(before.timeZoneOffset, localAfter.timeZoneOffset); - } -} - -/// Finds a time zone change between [before] and [after]. -/// -/// The [before] time must be before [after], -/// and the local time zone at the two points must be different. -/// -/// Finds the point in time, with one minute precision, -/// where the time zone changed, and returns this point, -/// as well as the time zone offset before and after the change. -TimeZoneChange findChange(int before, int after) { - var min = Duration.millisecondsPerMinute; - assert(before % min == 0); - assert(after % min == 0); - var offsetBefore = - DateTime.fromMillisecondsSinceEpoch(before).timeZoneOffset.inMilliseconds; - var offsetAfter = - DateTime.fromMillisecondsSinceEpoch(after).timeZoneOffset.inMilliseconds; - // Binary search for the precise (to 1 minute increments) - // time where the change happened. - while (after - before > min) { - var mid = before + (after - before) ~/ 2; - mid -= mid % min; - var offsetMid = - DateTime.fromMillisecondsSinceEpoch(mid).timeZoneOffset.inMilliseconds; - if (verbose) { - print( - "Bsearch: ${tz(before, offsetBefore)} - ${tz(mid, offsetMid)} - ${tz(after, offsetAfter)}"); - } - if (offsetMid == offsetBefore) { - before = mid; - } else if (offsetMid == offsetAfter) { - after = mid; - } else { - // Third timezone in the middle. Probably rare. - // Use that as either before or after. - // Keep the direction of the time zone change. - var forwardChange = offsetAfter > offsetBefore; - if ((offsetMid > offsetBefore) == forwardChange) { - after = mid; - offsetAfter = offsetMid; - } else { - before = mid; - offsetBefore = offsetMid; - } - } - } - return TimeZoneChange(after, offsetBefore, offsetAfter); -} - -/// A local time zone change. -class TimeZoneChange { - /// The point in time where the clocks were adjusted. - final int msSinceEpoch; - - /// The time zone offset before the change. - final int msOffsetBefore; - - /// The time zone offset since the change. - final int msOffsetAfter; - TimeZoneChange(this.msSinceEpoch, this.msOffsetBefore, this.msOffsetAfter); - String toString() { - var local = DateTime.fromMillisecondsSinceEpoch(msSinceEpoch); - var offsetBefore = Duration(milliseconds: msOffsetBefore); - var offsetAfter = Duration(milliseconds: msOffsetAfter); - return "$local (${ltz(offsetBefore)} -> ${ltz(offsetAfter)})"; - } -} - -// Helpers when printing timezones. - -/// Point in time in ms since epoch, and known offset in ms. -String tz(int ms, int offset) => "${DateTime.fromMillisecondsSinceEpoch(ms)}" - "${ltz(Duration(milliseconds: offset))}"; - -/// Time plus Zone from DateTime -String dtz(DateTime dt) => "$dt${dt.isUtc ? "" : ltz(dt.timeZoneOffset)}"; - -/// Time zone from duration ("+h:ss" format). -String ltz(Duration d) => "${d.isNegative ? "-" : "+"}${d.inHours}" - ":${(d.inMinutes % 60).toString().padLeft(2, "0")}"; - -/// Set to true if debugging. -const bool verbose = false; diff --git a/tests/corelib_2/main_test.dart b/tests/corelib_2/main_test.dart deleted file mode 100644 index ee75e4e8f23..00000000000 --- a/tests/corelib_2/main_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2013, 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 main_test; - -import "package:expect/expect.dart"; - -main(List args) { - Expect.equals(0, args.length); -} diff --git a/tests/corelib_2/map_contains_key_test.dart b/tests/corelib_2/map_contains_key_test.dart deleted file mode 100644 index 182840ea92d..00000000000 --- a/tests/corelib_2/map_contains_key_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class A { - const A(); -} - -class B extends A { - const B(); -} - -main() { - var map1 = new Map(); - map1[const B()] = const B(); - var map2 = new Map(); - var list = [const B()]; - - var maps = [map1, map2]; - for (var map in maps) { - // Test that the map accepts a key is not of the same type: - // Map.containsValue(A) - Expect.isFalse(map.containsKey(new A())); - } -} diff --git a/tests/corelib_2/map_contains_value_test.dart b/tests/corelib_2/map_contains_value_test.dart deleted file mode 100644 index dc9ad1dc870..00000000000 --- a/tests/corelib_2/map_contains_value_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class A { - const A(); -} - -class B extends A { - const B(); -} - -main() { - var map1 = new Map(); - map1[const B()] = const B(); - var map2 = new Map(); - var list = [const B()]; - Map map3 = list.asMap(); - - var maps = [map1, map2, map3]; - for (var map in maps) { - // Test that the map accepts a value is not of the same type: - // Map.containsValue(A) - Expect.isFalse(map.containsValue(new A())); - } -} diff --git a/tests/corelib_2/map_entry_test.dart b/tests/corelib_2/map_entry_test.dart deleted file mode 100644 index fccd622b93f..00000000000 --- a/tests/corelib_2/map_entry_test.dart +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; -import 'dart:collection'; -import 'dart:convert' show json; - -var baseMap = const {"x": 0, "y": 1}; - -void main() { - var entry = new MapEntry(1, 2); - Expect.isTrue(entry is MapEntry); - Expect.isTrue(entry is! MapEntry); - Expect.isTrue(entry is! MapEntry); - Expect.equals(1, entry.key); - Expect.equals(2, entry.value); - Expect.equals("MapEntry(1: 2)", "$entry"); - dynamic dynEntry = entry; - Expect.throwsNoSuchMethodError(() { - dynEntry.key = 0; - }, "key not settable"); - Expect.throwsNoSuchMethodError(() { - dynEntry.value = 0; - }, "value not settable"); - - checkEntries(baseMap, baseMap); - checkEntries(baseMap, new Map.unmodifiable(baseMap)); - checkMap({"x": 0, "y": 1}); - checkMap(new Map.from(baseMap)); - checkMap(new HashMap.from(baseMap)); - checkMap(new LinkedHashMap.from(baseMap)); - checkMap(new SplayTreeMap.from(baseMap)); - checkMap(json.decode('{"x":0,"y":1}')); -} - -void checkMap(Map map) { - checkEntries(baseMap, map); - map.addEntries([new MapEntry("z", 2)]); - checkEntries({"x": 0, "y": 1, "z": 2}, map); - map.addEntries(>[ - new MapEntry("y", 11), - new MapEntry("v", 3), - new MapEntry("w", 4) - ]); - checkEntries({"v": 3, "w": 4, "x": 0, "y": 11, "z": 2}, map); - - var valueMap = map.map((key, value) => new MapEntry(value, key)); - checkEntries({0: "x", 2: "z", 3: "v", 4: "w", 11: "y"}, valueMap); -} - -void checkEntries(Map expected, Map map) { - int byKey(MapEntry e1, MapEntry e2) => e1.key.compareTo(e2.key); - Expect.equals(expected.length, map.entries.length); - var sorted = map.entries.toList()..sort(byKey); - Expect.equals(expected.length, sorted.length); - var expectedEntries = expected.entries.toList(); - for (int i = 0; i < sorted.length; i++) { - Expect.equals(expectedEntries[i].key, sorted[i].key); - Expect.equals(expectedEntries[i].value, sorted[i].value); - } -} diff --git a/tests/corelib_2/map_from_entries_test.dart b/tests/corelib_2/map_from_entries_test.dart deleted file mode 100644 index 9ec32e32949..00000000000 --- a/tests/corelib_2/map_from_entries_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:collection'; - -import 'package:expect/expect.dart'; - -main() { - runTests((entries) => Map.fromEntries(entries)); - runTests((entries) => HashMap.fromEntries(entries)); - runTests((entries) => LinkedHashMap.fromEntries(entries)); -} - -void runTests(Map Function(Iterable>) ctor) { - fromEntriesTest(ctor); - emptyIterableTest(ctor); - equalElementsTest(ctor); -} - -void fromEntriesTest(Map Function(Iterable>) ctor) { - var map = ctor([MapEntry(1, "one"), MapEntry(2, "two")]); - Expect.equals(2, map.length); - Expect.equals(2, map.keys.length); - Expect.equals(2, map.values.length); - Expect.equals("one", map[1]); - Expect.equals("two", map[2]); -} - -void emptyIterableTest( - Map Function(Iterable>) ctor) { - var map = ctor([]); - Expect.equals(0, map.length); - Expect.equals(0, map.keys.length); - Expect.equals(0, map.values.length); -} - -void equalElementsTest( - Map Function(Iterable>) ctor) { - var map = - ctor([MapEntry(1, "one"), MapEntry(2, "two"), MapEntry(2, "other")]); - Expect.equals(2, map.length); - Expect.equals(2, map.keys.length); - Expect.equals(2, map.values.length); - Expect.equals("one", map[1]); - Expect.equals("other", map[2]); -} diff --git a/tests/corelib_2/map_from_iterable_test.dart b/tests/corelib_2/map_from_iterable_test.dart deleted file mode 100644 index 06825aa6e94..00000000000 --- a/tests/corelib_2/map_from_iterable_test.dart +++ /dev/null @@ -1,113 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; -import 'dart:collection'; - -main() { - defaultFunctionValuesTest(); - defaultKeyFunctionTest(); - defaultValueFunctionTest(); - noDefaultValuesTest(); - emptyIterableTest(); - equalElementsTest(); - genericTypeTest(); -} - -void defaultFunctionValuesTest() { - var map = new HashMap.fromIterable([1, 2, 3]); - - Expect.isTrue(map is Map); - Expect.isTrue(map is HashMap); - - Expect.equals(3, map.length); - Expect.equals(3, map.keys.length); - Expect.equals(3, map.values.length); - - Expect.equals(1, map[1]); - Expect.equals(2, map[2]); - Expect.equals(3, map[3]); -} - -void defaultKeyFunctionTest() { - var map = new HashMap.fromIterable([1, 2, 3], value: (x) => x + 1); - - Expect.isTrue(map is Map); - Expect.isTrue(map is HashMap); - - Expect.equals(3, map.length); - Expect.equals(3, map.keys.length); - Expect.equals(3, map.values.length); - - Expect.equals(2, map[1]); - Expect.equals(3, map[2]); - Expect.equals(4, map[3]); -} - -void defaultValueFunctionTest() { - var map = new HashMap.fromIterable([1, 2, 3], key: (x) => x + 1); - - Expect.isTrue(map is Map); - Expect.isTrue(map is HashMap); - - Expect.equals(3, map.length); - Expect.equals(3, map.keys.length); - Expect.equals(3, map.values.length); - - Expect.equals(1, map[2]); - Expect.equals(2, map[3]); - Expect.equals(3, map[4]); -} - -void noDefaultValuesTest() { - var map = new HashMap.fromIterable([1, 2, 3], - key: (x) => x + 1, value: (x) => x - 1); - - Expect.isTrue(map is Map); - Expect.isTrue(map is HashMap); - - Expect.equals(3, map.length); - Expect.equals(3, map.keys.length); - Expect.equals(3, map.values.length); - - Expect.equals(0, map[2]); - Expect.equals(1, map[3]); - Expect.equals(2, map[4]); -} - -void emptyIterableTest() { - var map = new HashMap.fromIterable([]); - Expect.isTrue(map is Map); - Expect.isTrue(map is HashMap); - - Expect.equals(0, map.length); - Expect.equals(0, map.keys.length); - Expect.equals(0, map.values.length); -} - -void equalElementsTest() { - var map = new HashMap.fromIterable([1, 2, 2], key: (x) => x + 1); - - Expect.isTrue(map is Map); - Expect.isTrue(map is HashMap); - - Expect.equals(2, map.length); - Expect.equals(2, map.keys.length); - Expect.equals(2, map.values.length); - - Expect.equals(1, map[2]); - Expect.equals(2, map[3]); -} - -void genericTypeTest() { - var map = new HashMap.fromIterable([1, 2, 3], - key: (x) => '$x', value: (x) => '$x'); - Expect.isTrue(map is Map); - - // Make sure it is not just Map. - Expect.isFalse(map is Map); - Expect.isFalse(map is Map); -} diff --git a/tests/corelib_2/map_from_iterables_test.dart b/tests/corelib_2/map_from_iterables_test.dart deleted file mode 100644 index 99ab8cc807e..00000000000 --- a/tests/corelib_2/map_from_iterables_test.dart +++ /dev/null @@ -1,80 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; -import 'dart:collection'; - -main() { - positiveTest(); - emptyMapTest(); - fewerKeysIterableTest(); - fewerValuesIterableTest(); - equalElementsTest(); - genericTypeTest(); -} - -void positiveTest() { - var map = new Map.fromIterables([1, 2, 3], ["one", "two", "three"]); - Expect.isTrue(map is Map); - Expect.isTrue(map is LinkedHashMap); - - Expect.equals(3, map.length); - Expect.equals(3, map.keys.length); - Expect.equals(3, map.values.length); - - Expect.equals("one", map[1]); - Expect.equals("two", map[2]); - Expect.equals("three", map[3]); -} - -void emptyMapTest() { - var map = new Map.fromIterables([], []); - Expect.isTrue(map is Map); - Expect.isTrue(map is LinkedHashMap); - - Expect.equals(0, map.length); - Expect.equals(0, map.keys.length); - Expect.equals(0, map.values.length); -} - -void fewerValuesIterableTest() { - Expect.throws(() => new Map.fromIterables([1, 2], [0])); -} - -void fewerKeysIterableTest() { - Expect.throws(() => new Map.fromIterables([1], [0, 2])); -} - -void equalElementsTest() { - var map = new Map.fromIterables([1, 2, 2], ["one", "two", "three"]); - Expect.isTrue(map is Map); - Expect.isTrue(map is LinkedHashMap); - - Expect.equals(2, map.length); - Expect.equals(2, map.keys.length); - Expect.equals(2, map.values.length); - - Expect.equals("one", map[1]); - Expect.equals("three", map[2]); -} - -void genericTypeTest() { - var map = - new Map.fromIterables([1, 2, 3], ["one", "two", "three"]); - Expect.isTrue(map is Map); - - // Make sure it is not just Map. - Expect.isFalse(map is Map); - Expect.isFalse(map is Map); - - Expect.equals(3, map.length); - Expect.equals(3, map.keys.length); - Expect.equals(3, map.values.length); - - Expect.equals("one", map[1]); - Expect.equals("two", map[2]); - Expect.equals("three", map[3]); -} diff --git a/tests/corelib_2/map_from_test.dart b/tests/corelib_2/map_from_test.dart deleted file mode 100644 index ca4225718dc..00000000000 --- a/tests/corelib_2/map_from_test.dart +++ /dev/null @@ -1,99 +0,0 @@ -// 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 map.from.test; - -import "package:expect/expect.dart"; -import 'dart:collection'; - -main() { - testWithConstMap(); - testWithNonConstMap(); - testWithHashMap(); - testWithLinkedMap(); -} - -testWithConstMap() { - var map = const {'b': 42, 'a': 43}; - var otherMap = new Map.from(map); - Expect.isTrue(otherMap is Map); - Expect.isTrue(otherMap is LinkedHashMap); - - Expect.equals(2, otherMap.length); - Expect.equals(2, otherMap.keys.length); - Expect.equals(2, otherMap.values.length); - - var count = (map) { - int cnt = 0; - map.forEach((a, b) { - cnt += b; - }); - return cnt; - }; - - Expect.equals(42 + 43, count(map)); - Expect.equals(count(map), count(otherMap)); -} - -testWithNonConstMap() { - var map = {'b': 42, 'a': 43}; - var otherMap = new Map.from(map); - Expect.isTrue(otherMap is Map); - Expect.isTrue(otherMap is LinkedHashMap); - - Expect.equals(2, otherMap.length); - Expect.equals(2, otherMap.keys.length); - Expect.equals(2, otherMap.values.length); - - int count(map) { - int count = 0; - map.forEach((a, b) { - count += b; - }); - return count; - } - - ; - - Expect.equals(42 + 43, count(map)); - Expect.equals(count(map), count(otherMap)); - - // Test that adding to the original map does not change otherMap. - map['c'] = 44; - Expect.equals(3, map.length); - Expect.equals(2, otherMap.length); - Expect.equals(2, otherMap.keys.length); - Expect.equals(2, otherMap.values.length); - - // Test that adding to otherMap does not change the original map. - otherMap['c'] = 44; - Expect.equals(3, map.length); - Expect.equals(3, otherMap.length); - Expect.equals(3, otherMap.keys.length); - Expect.equals(3, otherMap.values.length); -} - -testWithHashMap() { - var map = const {'b': 1, 'a': 2, 'c': 3}; - var otherMap = new HashMap.from(map); - Expect.isTrue(otherMap is Map); - Expect.isTrue(otherMap is HashMap); - var i = 1; - for (var val in map.values) { - Expect.equals(i++, val); - } -} - -testWithLinkedMap() { - var map = const {'b': 1, 'a': 2, 'c': 3}; - var otherMap = new LinkedHashMap.from(map); - Expect.isTrue(otherMap is Map); - Expect.isTrue(otherMap is LinkedHashMap); - var i = 1; - for (var val in map.values) { - Expect.equals(i++, val); - } -} diff --git a/tests/corelib_2/map_index_test.dart b/tests/corelib_2/map_index_test.dart deleted file mode 100644 index 1bfe7da5315..00000000000 --- a/tests/corelib_2/map_index_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class A { - const A(); -} - -class B extends A { - const B(); -} - -main() { - var map1 = new Map(); - map1[const B()] = const B(); - var map2 = new Map(); - var list = [const B()]; - - var maps = [map1, map2]; - for (var map in maps) { - // Test that the map accepts a key is not of the same type: - // Map[A] - Expect.isNull(map[new A()]); - } -} diff --git a/tests/corelib_2/map_keys2_test.dart b/tests/corelib_2/map_keys2_test.dart deleted file mode 100644 index b813d7df337..00000000000 --- a/tests/corelib_2/map_keys2_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -main() { - var map1 = {"foo": 42, "bar": 499}; - var map2 = {}; - var map3 = const {"foo": 42, "bar": 499}; - var map4 = const {}; - var map5 = new Map(); - map5["foo"] = 43; - map5["bar"] = 500; - var map6 = new Map(); - - Expect.isTrue(map1.keys is Iterable); - Expect.isFalse(map1.keys is Iterable); - - Expect.isFalse(map2.keys is Iterable); - Expect.isFalse(map2.keys is Iterable); - - Expect.isTrue(map3.keys is Iterable); - Expect.isFalse(map3.keys is Iterable); - - Expect.isFalse(map4.keys is Iterable); - Expect.isFalse(map4.keys is Iterable); - - Expect.isTrue(map5.keys is Iterable); - Expect.isFalse(map5.keys is Iterable); - - Expect.isTrue(map6.keys is Iterable); - Expect.isFalse(map6.keys is Iterable); -} diff --git a/tests/corelib_2/map_keys_test.dart b/tests/corelib_2/map_keys_test.dart deleted file mode 100644 index 8b029b6571b..00000000000 --- a/tests/corelib_2/map_keys_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -main() { - var map1 = {"foo": 42, "bar": 499}; - var map2 = {}; - var map3 = const {"foo": 42, "bar": 499}; - var map4 = const {}; - var map5 = new Map(); - map5["foo"] = 43; - map5["bar"] = 500; - var map6 = new Map(); - - Expect.isTrue(map1.keys is Iterable); - Expect.isFalse(map1.keys is List); - Expect.equals(2, map1.keys.length); - Expect.equals("foo", map1.keys.first); - Expect.equals("bar", map1.keys.last); - - Expect.isTrue(map2.keys is Iterable); - Expect.isFalse(map2.keys is List); - Expect.equals(0, map2.keys.length); - - Expect.isTrue(map3.keys is Iterable); - Expect.isFalse(map3.keys is List); - Expect.equals(2, map3.keys.length); - Expect.equals("foo", map3.keys.first); - Expect.equals("bar", map3.keys.last); - - Expect.isTrue(map4.keys is Iterable); - Expect.isFalse(map4.keys is List); - Expect.equals(0, map4.keys.length); - - Expect.isTrue(map5.keys is Iterable); - Expect.isFalse(map5.keys is List); - Expect.equals(2, map5.keys.length); - Expect.isTrue(map5.keys.first == "foo" || map5.keys.first == "bar"); - Expect.isTrue(map5.keys.last == "foo" || map5.keys.last == "bar"); - Expect.notEquals(map5.keys.first, map5.keys.last); - - Expect.isTrue(map6.keys is Iterable); - Expect.isFalse(map6.keys is List); - Expect.equals(0, map6.keys.length); -} diff --git a/tests/corelib_2/map_of_test.dart b/tests/corelib_2/map_of_test.dart deleted file mode 100644 index a3ee874a073..00000000000 --- a/tests/corelib_2/map_of_test.dart +++ /dev/null @@ -1,66 +0,0 @@ -// 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 map.from.test; - -import "package:expect/expect.dart"; -import 'dart:collection'; - -main() { - for (Map map in [ - {}, - const {}, - new HashMap(), - new LinkedHashMap(), - new SplayTreeMap(), - {1: 11, 2: 12, 4: 14}, - const {1: 11, 2: 12, 4: 14}, - new Map() - ..[1] = 11 - ..[2] = 12 - ..[3] = 13, - new HashMap() - ..[1] = 11 - ..[2] = 12 - ..[3] = 13, - new LinkedHashMap() - ..[1] = 11 - ..[2] = 12 - ..[3] = 13, - new SplayTreeMap() - ..[1] = 11 - ..[2] = 12 - ..[3] = 13, - ]) { - expectThrows(void operation()) { - Expect.throwsTypeError(operation); - } - - var sourceType = map.runtimeType.toString(); - check(sourceType, map, new Map.of(map)); - check(sourceType, map, new Map.of(map)); - expectThrows(() => new Map.of(map)); - check(sourceType, map, new HashMap.of(map)); - check(sourceType, map, new HashMap.of(map)); - expectThrows(() => new HashMap.of(map)); - check(sourceType, map, new LinkedHashMap.of(map)); - check(sourceType, map, new LinkedHashMap.of(map)); - expectThrows(() => new LinkedHashMap.of(map)); - check(sourceType, map, new SplayTreeMap.of(map)); - check(sourceType, map, new SplayTreeMap.of(map)); - expectThrows(() => new SplayTreeMap.of(map)); - } -} - -check(String sourceType, Map expect, Map actual) { - var targetType = actual.runtimeType.toString(); - var name = "$sourceType->$targetType"; - Expect.equals(expect.length, actual.length, "$name.length"); - for (var key in expect.keys) { - Expect.isTrue(actual.containsKey(key), "$name?[$key]"); - Expect.equals(expect[key], actual[key], "$name[$key]"); - } -} diff --git a/tests/corelib_2/map_remove_test.dart b/tests/corelib_2/map_remove_test.dart deleted file mode 100644 index bfec31b09ca..00000000000 --- a/tests/corelib_2/map_remove_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class A { - const A(); -} - -class B extends A { - const B(); -} - -main() { - var map1 = new Map(); - map1[const B()] = const B(); - var map2 = new Map(); - var list = [const B()]; - - var maps = [map1, map2]; - for (var map in maps) { - // Test that the map accepts a key is not of the same type: - // Map.remove(A) - Expect.isNull(map.remove(new A())); - } -} diff --git a/tests/corelib_2/map_set_undefined_test.dart b/tests/corelib_2/map_set_undefined_test.dart deleted file mode 100644 index e56b62186a3..00000000000 --- a/tests/corelib_2/map_set_undefined_test.dart +++ /dev/null @@ -1,59 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:collection'; -import 'package:expect/expect.dart'; - -main() { - // Regression test for https://github.com/dart-lang/sdk/issues/36052. - // JS compilers shouldn't produce `undefined` when a Map/Set key is not found. - testMap({}); - testMap(Map.identity()); - testMap(LinkedHashMap( - equals: (x, y) => x == y, - hashCode: (x) => x.hashCode, - isValidKey: (_) => true)); - - testSet(Set()); - testSet(Set.identity()); - testSet(LinkedHashSet( - equals: (x, y) => x == y, - hashCode: (x) => x.hashCode, - isValidKey: (_) => true)); -} - -testMap(Map map) { - var t = map.runtimeType.toString(); - var s = ' (length ${map.length})'; - checkUndefined('$t.[]$s', map['hi']); - checkUndefined('$t.putIfAbsent$s', map.putIfAbsent('hi', () {})); - checkUndefined('$t.remove$s', map.remove('hi')); - if (map.isEmpty) { - map['hello'] = 'there'; - testMap(map); - } -} - -testSet(Set set) { - var t = set.runtimeType.toString(); - var s = ' (length ${set.length})'; - checkUndefined('$t.lookup$s', set.lookup('hi')); - if (set.isEmpty) { - set.add('hello'); - testSet(set); - } -} - -/// Fails if [x] incorrectly uses the default argument instead of being `null` -/// (i.e. because `x` is undefined). -checkUndefined(String method, [Object x = 'error']) { - // TODO(jmesserly): this check is specific to implementation details of DDC's - // current calling conventions. These conventions may change. - // Ideally we'd have an `undefined` constant in "package:js" and use that - // here instead. - Expect.isNull(x, - 'error in $method: result treated as missing argument (JS undefined?)'); -} diff --git a/tests/corelib_2/map_test.dart b/tests/corelib_2/map_test.dart deleted file mode 100644 index 65ae18f0845..00000000000 --- a/tests/corelib_2/map_test.dart +++ /dev/null @@ -1,1049 +0,0 @@ -// 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 map_test; - -import "package:expect/expect.dart"; -import 'dart:collection'; -import 'dart:convert' show json; - -Map newJsonMap() => json.decode('{}'); -Map newJsonMapCustomReviver() => - json.decode('{}', reviver: (key, value) => value); - -void main() { - test(new HashMap()); - test(new LinkedHashMap()); - test(new SplayTreeMap()); - test(new SplayTreeMap(Comparable.compare)); - test(new MapView(new HashMap())); - test(new MapView(new SplayTreeMap())); - test(new MapBaseMap()); - test(new MapMixinMap()); - test(newJsonMap()); - test(newJsonMapCustomReviver()); - testLinkedHashMap(); - testMapLiteral(); - testNullValue(); - testTypes(); - testUnmodifiableMaps(); - - testWeirdStringKeys(new Map()); - testWeirdStringKeys(new Map()); - testWeirdStringKeys(new HashMap()); - testWeirdStringKeys(new HashMap()); - testWeirdStringKeys(new LinkedHashMap()); - testWeirdStringKeys(new LinkedHashMap()); - testWeirdStringKeys(new SplayTreeMap()); - testWeirdStringKeys(new SplayTreeMap()); - testWeirdStringKeys(new MapBaseMap()); - testWeirdStringKeys(new MapMixinMap()); - testWeirdStringKeys(newJsonMap()); - testWeirdStringKeys(newJsonMapCustomReviver()); - - testNumericKeys(new Map()); - testNumericKeys(new Map()); - testNumericKeys(new HashMap()); - testNumericKeys(new HashMap()); - testNumericKeys(new HashMap.identity()); - testNumericKeys(new HashMap.identity()); - testNumericKeys(new LinkedHashMap()); - testNumericKeys(new LinkedHashMap()); - testNumericKeys(new LinkedHashMap.identity()); - testNumericKeys(new LinkedHashMap.identity()); - testNumericKeys(new MapBaseMap()); - testNumericKeys(new MapMixinMap()); - - testNaNKeys(new Map()); - testNaNKeys(new Map()); - testNaNKeys(new HashMap()); - testNaNKeys(new HashMap()); - testNaNKeys(new LinkedHashMap()); - testNaNKeys(new LinkedHashMap()); - testNaNKeys(new MapBaseMap()); - testNaNKeys(new MapMixinMap()); - // Identity maps fail the NaN-keys tests because the test assumes that - // NaN is not equal to NaN. - - testIdentityMap(new Map.identity()); - testIdentityMap(new HashMap.identity()); - testIdentityMap(new LinkedHashMap.identity()); - testIdentityMap(new HashMap(equals: identical, hashCode: identityHashCode)); - testIdentityMap( - new LinkedHashMap(equals: identical, hashCode: identityHashCode)); - testIdentityMap(new HashMap( - equals: (x, y) => identical(x, y), hashCode: (x) => identityHashCode(x))); - testIdentityMap(new LinkedHashMap( - equals: (x, y) => identical(x, y), hashCode: (x) => identityHashCode(x))); - - testCustomMap(new HashMap( - equals: myEquals, - hashCode: myHashCode, - isValidKey: (v) => v is Customer)); - testCustomMap(new LinkedHashMap( - equals: myEquals, - hashCode: myHashCode, - isValidKey: (v) => v is Customer)); - testCustomMap( - new HashMap(equals: myEquals, hashCode: myHashCode)); - - testCustomMap(new LinkedHashMap( - equals: myEquals, hashCode: myHashCode)); - - testIterationOrder(new LinkedHashMap()); - testIterationOrder(new LinkedHashMap.identity()); - testIterationOrder(newJsonMap()); - testIterationOrder(newJsonMapCustomReviver()); - - testOtherKeys(new SplayTreeMap()); - testOtherKeys( - new SplayTreeMap((int a, int b) => a - b, (v) => v is int)); - testOtherKeys(new SplayTreeMap((int a, int b) => a - b, (v) => v is int)); - testOtherKeys(new HashMap()); - testOtherKeys(new HashMap.identity()); - testOtherKeys(new HashMap( - hashCode: (v) => v.hashCode, isValidKey: (v) => v is int)); - testOtherKeys(new HashMap( - equals: (int x, int y) => x == y, - hashCode: (int v) => v.hashCode, - isValidKey: (v) => v is int)); - testOtherKeys(new LinkedHashMap()); - testOtherKeys(new LinkedHashMap.identity()); - testOtherKeys(new LinkedHashMap( - hashCode: (v) => v.hashCode, isValidKey: (v) => v is int)); - testOtherKeys(new LinkedHashMap( - equals: (int x, int y) => x == y, - hashCode: (int v) => v.hashCode, - isValidKey: (v) => v is int)); - testOtherKeys(new MapBaseMap()); - testOtherKeys(new MapMixinMap()); - - testUnmodifiableMap(const {1: 37}); - testUnmodifiableMap(new UnmodifiableMapView({1: 37})); - testUnmodifiableMap(new UnmodifiableMapBaseMap([1, 37])); - - testTypeAnnotations(new HashMap()); - testTypeAnnotations(new LinkedHashMap()); - testTypeAnnotations(new HashMap(equals: identical)); - testTypeAnnotations(new LinkedHashMap(equals: identical)); - testTypeAnnotations(new HashMap( - equals: (int a, int b) => a == b, - hashCode: (int a) => a.hashCode, - isValidKey: (a) => a is int)); - testTypeAnnotations(new LinkedHashMap( - equals: (int a, int b) => a == b, - hashCode: (int a) => a.hashCode, - isValidKey: (a) => a is int)); - - testFrom(); -} - -void test(Map map) { - testDeletedElement(map); - if (map is Map) { - testMap(map, 1, 2, 3, 4, 5, 6, 7, 8); - } else { - map.clear(); - testMap(map, "value1", "value2", "value3", "value4", "value5", "value6", - "value7", "value8"); - } -} - -void testLinkedHashMap() { - LinkedHashMap map = new LinkedHashMap(); - Expect.isFalse(map.containsKey(1)); - map[1] = 1; - map[1] = 2; - testLength(1, map); -} - -void testMap( - Map typedMap, key1, key2, key3, key4, key5, key6, key7, key8) { - Map map = typedMap; - int value1 = 10; - int value2 = 20; - int value3 = 30; - int value4 = 40; - int value5 = 50; - int value6 = 60; - int value7 = 70; - int value8 = 80; - - testLength(0, map); - - map[key1] = value1; - Expect.equals(value1, map[key1]); - map[key1] = value2; - Expect.isFalse(map.containsKey(key2)); - testLength(1, map); - - map[key1] = value1; - Expect.equals(value1, map[key1]); - // Add enough entries to make sure the table grows. - map[key2] = value2; - Expect.equals(value2, map[key2]); - testLength(2, map); - map[key3] = value3; - Expect.equals(value2, map[key2]); - Expect.equals(value3, map[key3]); - map[key4] = value4; - Expect.equals(value3, map[key3]); - Expect.equals(value4, map[key4]); - map[key5] = value5; - Expect.equals(value4, map[key4]); - Expect.equals(value5, map[key5]); - map[key6] = value6; - Expect.equals(value5, map[key5]); - Expect.equals(value6, map[key6]); - map[key7] = value7; - Expect.equals(value6, map[key6]); - Expect.equals(value7, map[key7]); - map[key8] = value8; - Expect.equals(value1, map[key1]); - Expect.equals(value2, map[key2]); - Expect.equals(value3, map[key3]); - Expect.equals(value4, map[key4]); - Expect.equals(value5, map[key5]); - Expect.equals(value6, map[key6]); - Expect.equals(value7, map[key7]); - Expect.equals(value8, map[key8]); - testLength(8, map); - - map.remove(key4); - Expect.isFalse(map.containsKey(key4)); - testLength(7, map); - - // Test clearing the table. - map.clear(); - testLength(0, map); - Expect.isFalse(map.containsKey(key1)); - Expect.isFalse(map.containsKey(key2)); - Expect.isFalse(map.containsKey(key3)); - Expect.isFalse(map.containsKey(key4)); - Expect.isFalse(map.containsKey(key5)); - Expect.isFalse(map.containsKey(key6)); - Expect.isFalse(map.containsKey(key7)); - Expect.isFalse(map.containsKey(key8)); - - // Test adding and removing again. - map[key1] = value1; - Expect.equals(value1, map[key1]); - testLength(1, map); - map[key2] = value2; - Expect.equals(value2, map[key2]); - testLength(2, map); - map[key3] = value3; - Expect.equals(value3, map[key3]); - map.remove(key3); - testLength(2, map); - map[key4] = value4; - Expect.equals(value4, map[key4]); - map.remove(key4); - testLength(2, map); - map[key5] = value5; - Expect.equals(value5, map[key5]); - map.remove(key5); - testLength(2, map); - map[key6] = value6; - Expect.equals(value6, map[key6]); - map.remove(key6); - testLength(2, map); - map[key7] = value7; - Expect.equals(value7, map[key7]); - map.remove(key7); - testLength(2, map); - map[key8] = value8; - Expect.equals(value8, map[key8]); - map.remove(key8); - testLength(2, map); - - Expect.isTrue(map.containsKey(key1)); - Expect.isTrue(map.containsValue(value1)); - - // Test Map.forEach. - Map otherMap = new Map(); - void testForEachMap(key, value) { - otherMap[key] = value; - } - - map.forEach(testForEachMap); - Expect.isTrue(otherMap.containsKey(key1)); - Expect.isTrue(otherMap.containsKey(key2)); - Expect.isTrue(otherMap.containsValue(value1)); - Expect.isTrue(otherMap.containsValue(value2)); - Expect.equals(2, otherMap.length); - - otherMap.clear(); - Expect.equals(0, otherMap.length); - - // Test Collection.keys. - void testForEachKey(key) { - otherMap[key] = null; - } - - Iterable keys = map.keys; - keys.forEach(testForEachKey); - Expect.isTrue(otherMap.containsKey(key1)); - Expect.isTrue(otherMap.containsKey(key2)); - Expect.isFalse(otherMap.containsKey(value1)); - Expect.isFalse(otherMap.containsKey(value2)); - - Expect.isTrue(otherMap.containsValue(null)); - Expect.isFalse(otherMap.containsValue(value1)); - Expect.isFalse(otherMap.containsValue(value2)); - Expect.equals(2, otherMap.length); - otherMap.clear(); - Expect.equals(0, otherMap.length); - - // Test Collection.values. - void testForEachValue(value) { - if (value == value1) { - otherMap[key1] = value; - } else if (value == value2) { - otherMap[key2] = value; - } else { - otherMap[key3] = null; - } - } - - Iterable values = map.values; - values.forEach(testForEachValue); - Expect.isTrue(otherMap.containsKey(key1)); - Expect.isTrue(otherMap.containsKey(key2)); - Expect.isFalse(otherMap.containsKey(value1)); - Expect.isFalse(otherMap.containsKey(value2)); - - Expect.isTrue(otherMap.containsValue(value1)); - Expect.isTrue(otherMap.containsValue(value2)); - Expect.isFalse(otherMap.containsValue(value3)); - Expect.isFalse(otherMap.containsValue(key1)); - Expect.isFalse(otherMap.containsValue(null)); - Expect.equals(2, otherMap.length); - otherMap.clear(); - Expect.equals(0, otherMap.length); - - // Test Map.putIfAbsent. - map.clear(); - Expect.isFalse(map.containsKey(key1)); - map.putIfAbsent(key1, () => 10); - Expect.isTrue(map.containsKey(key1)); - Expect.equals(10, map[key1]); - Expect.equals(10, map.putIfAbsent(key1, () => 11)); - - // Test Map.addAll. - map.clear(); - otherMap.clear(); - otherMap['99'] = 1; - otherMap['50'] = 50; - otherMap['1'] = 99; - map.addAll(otherMap); - Expect.equals(3, map.length); - Expect.equals(1, map['99']); - Expect.equals(50, map['50']); - Expect.equals(99, map['1']); - otherMap['50'] = 42; - map.addAll(new HashMap.from(otherMap)); - Expect.equals(3, map.length); - Expect.equals(1, map['99']); - Expect.equals(42, map['50']); - Expect.equals(99, map['1']); - otherMap['99'] = 7; - map.addAll(new SplayTreeMap.from(otherMap)); - Expect.equals(3, map.length); - Expect.equals(7, map['99']); - Expect.equals(42, map['50']); - Expect.equals(99, map['1']); - otherMap.remove('99'); - map['99'] = 0; - map.addAll(otherMap); - Expect.equals(3, map.length); - Expect.equals(0, map['99']); - Expect.equals(42, map['50']); - Expect.equals(99, map['1']); - map.clear(); - otherMap.clear(); - map.addAll(otherMap); - Expect.equals(0, map.length); -} - -void testDeletedElement(Map map) { - map.clear(); - for (int i = 0; i < 100; i++) { - map['1'] = 2; - testLength(1, map); - map.remove('1'); - testLength(0, map); - } - testLength(0, map); -} - -void testMapLiteral() { - Map m = {"a": 1, "b": 2, "c": 3}; - Expect.equals(3, m.length); - int sum = 0; - m.forEach((a, b) { - sum += b; - }); - Expect.equals(6, sum); - - List values = m.keys.toList(); - Expect.equals(3, values.length); - String first = values[0]; - String second = values[1]; - String third = values[2]; - String all = "${first}${second}${third}"; - Expect.equals(3, all.length); - Expect.isTrue(all.contains("a", 0)); - Expect.isTrue(all.contains("b", 0)); - Expect.isTrue(all.contains("c", 0)); -} - -void testNullValue() { - Map m = {"a": 1, "b": null, "c": 3}; - - Expect.equals(null, m["b"]); - Expect.isTrue(m.containsKey("b")); - Expect.equals(3, m.length); - - m["a"] = null; - m["c"] = null; - Expect.equals(null, m["a"]); - Expect.isTrue(m.containsKey("a")); - Expect.equals(null, m["c"]); - Expect.isTrue(m.containsKey("c")); - Expect.equals(3, m.length); - - m.remove("a"); - Expect.equals(2, m.length); - Expect.equals(null, m["a"]); - Expect.isFalse(m.containsKey("a")); -} - -void testTypes() { - testMap(Map map) { - Expect.isTrue(map is Map); - Expect.isTrue(map is! Map); - Expect.isTrue(map is! Map); - - // Use with properly typed keys and values. - map[42] = "text1"; - map[43] = "text2"; - map[42] = "text3"; - Expect.equals("text3", map.remove(42)); - Expect.equals(null, map[42]); - map[42] = "text4"; - - // Ensure that "containsKey", "containsValue" and "remove" - // accepts any object. - for (var object in [true, null, new Object()]) { - Expect.isFalse(map.containsKey(object)); - Expect.isFalse(map.containsValue(object)); - Expect.isNull(map.remove(object)); - Expect.isNull(map[object]); - } - } - - testMap(new HashMap()); - testMap(new LinkedHashMap()); - testMap(new SplayTreeMap()); - testMap(new SplayTreeMap(Comparable.compare)); - testMap(new SplayTreeMap((int a, int b) => a.compareTo(b))); - testMap(new HashMap()); - testMap(new LinkedHashMap()); - testMap(new SplayTreeMap()); - testMap(new SplayTreeMap(Comparable.compare)); - testMap(new SplayTreeMap((num a, num b) => a.compareTo(b))); -} - -void testWeirdStringKeys(Map map) { - // Test weird keys. - var weirdKeys = const [ - 'hasOwnProperty', - 'constructor', - 'toLocaleString', - 'propertyIsEnumerable', - '__defineGetter__', - '__defineSetter__', - '__lookupGetter__', - '__lookupSetter__', - 'isPrototypeOf', - 'toString', - 'valueOf', - '__proto__', - '__count__', - '__parent__', - '' - ]; - Expect.isTrue(map.isEmpty); - for (var key in weirdKeys) { - Expect.isFalse(map.containsKey(key)); - Expect.equals(null, map[key]); - var value = 'value:$key'; - map[key] = value; - Expect.isTrue(map.containsKey(key)); - Expect.equals(value, map[key]); - Expect.equals(value, map.remove(key)); - Expect.isFalse(map.containsKey(key)); - Expect.equals(null, map[key]); - } - Expect.isTrue(map.isEmpty); -} - -void testNumericKeys(Map map) { - var numericKeys = const [ - double.infinity, - double.negativeInfinity, - 0, - 0.0, - -0.0 - ]; - - Expect.isTrue(map.isEmpty); - for (var key in numericKeys) { - Expect.isFalse(map.containsKey(key)); - Expect.equals(null, map[key]); - var value = 'value:$key'; - map[key] = value; - Expect.isTrue(map.containsKey(key)); - Expect.equals(value, map[key]); - Expect.equals(value, map.remove(key)); - Expect.isFalse(map.containsKey(key)); - Expect.equals(null, map[key]); - } - Expect.isTrue(map.isEmpty); -} - -void testNaNKeys(Map map) { - Object nan = double.nan; - // Skip this test on platforms that use native-JS NaN semantics for speed. - if (!identical(nan, nan)) return; - - Expect.isTrue(map.isEmpty); - // Test NaN. - Expect.isFalse(map.containsKey(nan)); - Expect.equals(null, map[nan]); - - map[nan] = 'value:0'; - Expect.isFalse(map.containsKey(nan)); - Expect.equals(null, map[nan]); - testLength(1, map); - - map[nan] = 'value:1'; - Expect.isFalse(map.containsKey(nan)); - Expect.equals(null, map[nan]); - testLength(2, map); - - Expect.equals(null, map.remove(nan)); - testLength(2, map); - - var count = 0; - map.forEach((key, value) { - if (key.isNaN) count++; - }); - Expect.equals(2, count); - - map.clear(); - Expect.isTrue(map.isEmpty); -} - -void testLength(int length, Map map) { - Expect.equals(length, map.length); - Expect.equals(length, map.keys.length); - Expect.equals(length, map.values.length); - // Check being-empty. - var ifEmpty = (length == 0) ? Expect.isTrue : Expect.isFalse; - var ifNotEmpty = (length != 0) ? Expect.isTrue : Expect.isFalse; - ifEmpty(map.isEmpty); - ifNotEmpty(map.isNotEmpty); - ifEmpty(map.keys.isEmpty); - ifNotEmpty(map.keys.isNotEmpty); - ifEmpty(map.values.isEmpty); - ifNotEmpty(map.values.isNotEmpty); - // Test key/value iterators match their isEmpty/isNotEmpty. - ifNotEmpty(map.keys.iterator.moveNext()); - ifNotEmpty(map.values.iterator.moveNext()); - if (length == 0) { - for (var k in map.keys) Expect.fail("contains key when iterating: $k"); - for (var v in map.values) Expect.fail("contains values when iterating: $v"); - } -} - -testIdentityMap(Map typedMap) { - Map map = typedMap; - Expect.isTrue(map.isEmpty); - - var nan = double.nan; - // TODO(11551): Remove guard when dart2js makes identical(NaN, NaN) true. - if (identical(nan, nan)) { - map[nan] = 42; - testLength(1, map); - Expect.isTrue(map.containsKey(nan)); - Expect.equals(42, map[nan]); - map[nan] = 37; - testLength(1, map); - Expect.equals(37, map[nan]); - Expect.equals(37, map.remove(nan)); - testLength(0, map); - } - - Vampire v1 = const Vampire(1); - Vampire v2 = const Vampire(2); - Expect.isFalse(v1 == v1); - Expect.isFalse(v2 == v2); - Expect.isTrue(v2 == v1); // Snob! - - map[v1] = 1; - map[v2] = 2; - testLength(2, map); - - Expect.isTrue(map.containsKey(v1)); - Expect.isTrue(map.containsKey(v2)); - - Expect.equals(1, map[v1]); - Expect.equals(2, map[v2]); - - Expect.equals(1, map.remove(v1)); - testLength(1, map); - Expect.isFalse(map.containsKey(v1)); - Expect.isTrue(map.containsKey(v2)); - - Expect.isNull(map.remove(v1)); - Expect.equals(2, map.remove(v2)); - testLength(0, map); - - var eq01 = new Equalizer(0); - var eq02 = new Equalizer(0); - var eq11 = new Equalizer(1); - var eq12 = new Equalizer(1); - // Sanity. - Expect.equals(eq01, eq02); - Expect.equals(eq02, eq01); - Expect.equals(eq11, eq12); - Expect.equals(eq12, eq11); - Expect.notEquals(eq01, eq11); - Expect.notEquals(eq01, eq12); - Expect.notEquals(eq02, eq11); - Expect.notEquals(eq02, eq12); - Expect.notEquals(eq11, eq01); - Expect.notEquals(eq11, eq02); - Expect.notEquals(eq12, eq01); - Expect.notEquals(eq12, eq02); - - map[eq01] = 0; - map[eq02] = 1; - map[eq11] = 2; - map[eq12] = 3; - testLength(4, map); - - Expect.equals(0, map[eq01]); - Expect.equals(1, map[eq02]); - Expect.equals(2, map[eq11]); - Expect.equals(3, map[eq12]); - - Expect.isTrue(map.containsKey(eq01)); - Expect.isTrue(map.containsKey(eq02)); - Expect.isTrue(map.containsKey(eq11)); - Expect.isTrue(map.containsKey(eq12)); - - Expect.equals(1, map.remove(eq02)); - Expect.equals(3, map.remove(eq12)); - testLength(2, map); - Expect.isTrue(map.containsKey(eq01)); - Expect.isFalse(map.containsKey(eq02)); - Expect.isTrue(map.containsKey(eq11)); - Expect.isFalse(map.containsKey(eq12)); - - Expect.equals(0, map[eq01]); - Expect.equals(null, map[eq02]); - Expect.equals(2, map[eq11]); - Expect.equals(null, map[eq12]); - - Expect.equals(0, map.remove(eq01)); - Expect.equals(2, map.remove(eq11)); - testLength(0, map); - - map[eq01] = 0; - map[eq02] = 1; - map[eq11] = 2; - map[eq12] = 3; - testLength(4, map); - - // Transfer to equality-based map will collapse elements. - Map eqMap = new HashMap(); - eqMap.addAll(map); - testLength(2, eqMap); - Expect.isTrue(eqMap.containsKey(eq01)); - Expect.isTrue(eqMap.containsKey(eq02)); - Expect.isTrue(eqMap.containsKey(eq11)); - Expect.isTrue(eqMap.containsKey(eq12)); - - // Changing objects will not affect identity map. - map.clear(); - var m1 = new Mutable(1); - var m2 = new Mutable(2); - var m3 = new Mutable(3); - map[m1] = 1; - map[m2] = 2; - map[m3] = 3; - Expect.equals(3, map.length); - Expect.isTrue(map.containsKey(m1)); - Expect.isTrue(map.containsKey(m2)); - Expect.isTrue(map.containsKey(m3)); - Expect.notEquals(m1, m3); - m3.id = 1; - Expect.equals(m1, m3); - // Even if keys are equal, they are still not identical. - // Even if hashcode of m3 changed, it can still be found. - Expect.equals(1, map[m1]); - Expect.equals(3, map[m3]); -} - -/** Class of objects that are equal if they hold the same id. */ -class Equalizer { - int id; - Equalizer(this.id); - int get hashCode => id; - bool operator ==(Object other) => other is Equalizer && id == other.id; -} - -/** - * Objects that are not reflexive. - * - * They think they are better than their equals. - */ -class Vampire { - final int generation; - const Vampire(this.generation); - - int get hashCode => generation; - - // The double-fang operator falsely claims that a vampire is equal to - // any of its sire's generation. - bool operator ==(Object other) => - other is Vampire && generation - 1 == other.generation; -} - -void testCustomMap(Map typedMap) { - Map map = typedMap; - testLength(0, map); - var c11 = const Customer(1, 1); - var c12 = const Customer(1, 2); - var c21 = const Customer(2, 1); - var c22 = const Customer(2, 2); - // Sanity. - Expect.equals(c11, c12); - Expect.notEquals(c11, c21); - Expect.notEquals(c11, c22); - Expect.equals(c21, c22); - Expect.notEquals(c21, c11); - Expect.notEquals(c21, c12); - - Expect.isTrue(myEquals(c11, c21)); - Expect.isFalse(myEquals(c11, c12)); - Expect.isFalse(myEquals(c11, c22)); - Expect.isTrue(myEquals(c12, c22)); - Expect.isFalse(myEquals(c12, c11)); - Expect.isFalse(myEquals(c12, c21)); - - map[c11] = 42; - testLength(1, map); - Expect.isTrue(map.containsKey(c11)); - Expect.isTrue(map.containsKey(c21)); - Expect.isFalse(map.containsKey(c12)); - Expect.isFalse(map.containsKey(c22)); - Expect.equals(42, map[c11]); - Expect.equals(42, map[c21]); - - map[c21] = 37; - testLength(1, map); - Expect.isTrue(map.containsKey(c11)); - Expect.isTrue(map.containsKey(c21)); - Expect.isFalse(map.containsKey(c12)); - Expect.isFalse(map.containsKey(c22)); - Expect.equals(37, map[c11]); - Expect.equals(37, map[c21]); - - map[c22] = 42; - testLength(2, map); - Expect.isTrue(map.containsKey(c11)); - Expect.isTrue(map.containsKey(c21)); - Expect.isTrue(map.containsKey(c12)); - Expect.isTrue(map.containsKey(c22)); - Expect.equals(37, map[c11]); - Expect.equals(37, map[c21]); - Expect.equals(42, map[c12]); - Expect.equals(42, map[c22]); - - Expect.equals(42, map.remove(c12)); - testLength(1, map); - Expect.isTrue(map.containsKey(c11)); - Expect.isTrue(map.containsKey(c21)); - Expect.isFalse(map.containsKey(c12)); - Expect.isFalse(map.containsKey(c22)); - Expect.equals(37, map[c11]); - Expect.equals(37, map[c21]); - - Expect.equals(37, map.remove(c11)); - testLength(0, map); -} - -void testUnmodifiableMap(Map map) { - Expect.isTrue(map.containsKey(1)); - testLength(1, map); - Expect.equals(1, map.keys.first); - Expect.equals(37, map.values.first); - - Expect.throws(map.clear); - Expect.throws(() { - map.remove(1); - }); - Expect.throws(() { - map[2] = 42; - }); - Expect.throws(() { - map.addAll({2: 42}); - }); -} - -class Customer { - final int id; - final int secondId; - const Customer(this.id, this.secondId); - int get hashCode => id; - bool operator ==(Object other) { - if (other is! Customer) return false; - Customer otherCustomer = other; - return id == otherCustomer.id; - } -} - -int myHashCode(Customer c) => c.secondId; -bool myEquals(Customer a, Customer b) => a.secondId == b.secondId; - -void testIterationOrder(Map map) { - var order = ['0', '6', '4', '2', '7', '9', '7', '1', '2', '5', '3']; - for (int i = 0; i < order.length; i++) map[order[i]] = i; - Expect.listEquals( - map.keys.toList(), ['0', '6', '4', '2', '7', '9', '1', '5', '3']); - Expect.listEquals(map.values.toList(), [0, 1, 2, 8, 6, 5, 7, 9, 10]); -} - -void testOtherKeys(Map map) { - // Test that non-int keys are allowed in containsKey/remove/lookup. - // Custom hash sets and tree sets must be constructed so they don't - // use the equality/comparator on incompatible objects. - - // This should not throw in either checked or unchecked mode. - Expect.isFalse(map.containsKey("not an int")); - Expect.isFalse(map.containsKey(1.5)); - Expect.isNull(map.remove("not an int")); - Expect.isNull(map.remove(1.5)); - Expect.isNull(map["not an int"]); - Expect.isNull(map[1.5]); -} - -class Mutable { - int id; - Mutable(this.id); - int get hashCode => id; - bool operator ==(other) => other is Mutable && other.id == id; -} - -// Slow implementation of Map based on MapBase. -abstract class MapBaseOperations { - final List _keys = []; - final List _values = []; - int _modCount = 0; - - V operator [](Object key) { - int index = _keys.indexOf(key); - if (index < 0) return null; - return _values[index]; - } - - Iterable get keys => new TestKeyIterable(this); - - void operator []=(K key, V value) { - int index = _keys.indexOf(key); - if (index >= 0) { - _values[index] = value; - } else { - _modCount++; - _keys.add(key); - _values.add(value); - } - } - - V remove(Object key) { - int index = _keys.indexOf(key); - if (index >= 0) { - var result = _values[index]; - key = _keys.removeLast(); - var value = _values.removeLast(); - if (index != _keys.length) { - _keys[index] = key; - _values[index] = value; - } - _modCount++; - return result; - } - return null; - } - - void clear() { - // Clear cannot be based on remove, since remove won't remove keys that - // are not equal to themselves. It will fail the testNaNKeys test. - _keys.clear(); - _values.clear(); - _modCount++; - } -} - -class MapBaseMap = MapBase with MapBaseOperations; -class MapMixinMap = MapBaseOperations with MapMixin; - -class TestKeyIterable extends IterableBase { - final _map; - TestKeyIterable(this._map); - int get length => _map._keys.length; - Iterator get iterator => new TestKeyIterator(_map); -} - -class TestKeyIterator implements Iterator { - final _map; - final int _modCount; - int _index = 0; - var _current; - TestKeyIterator(map) - : _map = map, - _modCount = map._modCount; - bool moveNext() { - if (_modCount != _map._modCount) { - throw new ConcurrentModificationError(_map); - } - if (_index == _map._keys.length) { - _current = null; - return false; - } - _current = _map._keys[_index++]; - return true; - } - - K get current => _current; -} - -// Slow implementation of Map based on MapBase. -class UnmodifiableMapBaseMap extends UnmodifiableMapBase { - final List _keys = []; - final List _values = []; - UnmodifiableMapBaseMap(List pairs) { - for (int i = 0; i < pairs.length; i += 2) { - _keys.add(pairs[i]); - _values.add(pairs[i + 1]); - } - } - - int get _modCount => 0; - - V operator [](Object key) { - int index = _keys.indexOf(key); - if (index < 0) return null; - return _values[index]; - } - - Iterable get keys => _keys.skip(0); -} - -abstract class Super implements Comparable {} - -abstract class Interface implements Comparable {} - -class Sub extends Super implements Interface, Comparable { - int compareTo(dynamic other) => 0; - int get hashCode => 0; - bool operator ==(other) => other is Sub; -} - -expectMap(Map expect, Map actual) { - Expect.equals(expect.length, actual.length, "length"); - for (var key in expect.keys) { - Expect.isTrue(actual.containsKey(key), "containsKey $key"); - Expect.equals(expect[key], actual[key]); - } -} - -void testFrom() { - // Check contents. - for (var map in [ - {}, - {1: 1}, - {1: 2, 3: 4, 5: 6, 7: 8} - ]) { - expectMap(map, new Map.from(map)); - expectMap(map, new HashMap.from(map)); - expectMap(map, new LinkedHashMap.from(map)); - expectMap(map, new SplayTreeMap.from(map)); - } - // Test type combinations allowed. - Map intMap = {1: 2, 3: 4}; - Map numMap = {1: 2, 3: 4}; - expectMap(intMap, new Map.from(numMap)); - expectMap(intMap, new Map.from(intMap)); - expectMap(intMap, new HashMap.from(numMap)); - expectMap(intMap, new HashMap.from(intMap)); - expectMap(intMap, new LinkedHashMap.from(numMap)); - expectMap(intMap, new LinkedHashMap.from(intMap)); - expectMap(intMap, new SplayTreeMap.from(numMap)); - expectMap(intMap, new SplayTreeMap.from(intMap)); - - var sub = new Sub(); - Map superMap = {sub: sub}; - Map interfaceMap = {sub: sub}; - expectMap(superMap, new Map.from(interfaceMap)); - expectMap(superMap, new Map.from(superMap)); - expectMap(superMap, new HashMap.from(interfaceMap)); - expectMap(superMap, new HashMap.from(superMap)); - expectMap(superMap, new LinkedHashMap.from(interfaceMap)); - expectMap(superMap, new LinkedHashMap.from(superMap)); - expectMap(superMap, new SplayTreeMap.from(interfaceMap)); - expectMap(superMap, new SplayTreeMap.from(superMap)); -} - -void testTypeAnnotations(Map map) { - map[0] = 100; - map[999] = 101; - map[0x800000000] = 102; - map[0x20000000000000] = 103; - Expect.isFalse(map.containsKey("not an it")); - Expect.isNull(map.remove("not an it")); - - testLength(4, map); - Expect.equals(101, map.remove(999)); - testLength(3, map); - Expect.equals(102, map.remove(0x800000000)); - testLength(2, map); - Expect.equals(103, map.remove(0x20000000000000)); - testLength(1, map); -} - -void testUnmodifiableMaps() { - void checkUnmodifiable(Map map) { - Expect.throws(() => map[0] = 0); - Expect.throws(() => map.addAll({0: 0})); - Expect.throws(() => map.addEntries({0: 0}.entries)); - Expect.throws(() => map.clear()); - Expect.throws(() => map.putIfAbsent(0, () => 0)); - Expect.throws(() => map.remove(0)); - Expect.throws(() => map.removeWhere((k, v) => true)); - Expect.throws(() => map.update(0, (v) => v, ifAbsent: () => 0)); - Expect.throws(() => map.updateAll((k, v) => v)); - } - - checkUnmodifiable(const {1: 1}); - checkUnmodifiable(Map.unmodifiable({1: 1})); - checkUnmodifiable(UnmodifiableMapView({1: 1})); - checkUnmodifiable(const MapView({1: 1})); -} diff --git a/tests/corelib_2/map_to_string_test.dart b/tests/corelib_2/map_to_string_test.dart deleted file mode 100644 index d692759ebce..00000000000 --- a/tests/corelib_2/map_to_string_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -void main() { - Map m = new Map(); - - m[0] = 0; - m[1] = 1; - m[2] = m; - - Expect.equals('{0: 0, 1: 1, 2: {...}}', m.toString()); - - // Throwing in the middle of a toString does not leave the - // map as being visited - ThrowOnToString err = new ThrowOnToString(); - m[1] = err; - Expect.throws(m.toString, (e) => e == "Bad!"); - m[1] = 1; - Expect.equals('{0: 0, 1: 1, 2: {...}}', m.toString()); - m[err] = 1; - Expect.throws(m.toString, (e) => e == "Bad!"); - m.remove(err); -} - -class ThrowOnToString { - String toString() { - throw "Bad!"; - } -} diff --git a/tests/corelib_2/map_unmodifiable_cast_test.dart b/tests/corelib_2/map_unmodifiable_cast_test.dart deleted file mode 100644 index b45a3fd2d41..00000000000 --- a/tests/corelib_2/map_unmodifiable_cast_test.dart +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2018, 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 map_unmodifiable_cast_test; - -import "package:expect/expect.dart"; -import 'dart:collection'; - -void main() { - testNum(const {1: 37}, "const"); - testNum(const {1: 37}.cast(), "const.cast"); - - testNum(new UnmodifiableMapView({1: 37}), "unmod"); - testNum(new UnmodifiableMapView({1: 37}), "unmod.cast"); - testNum(new UnmodifiableMapView({1: 37}).cast(), - "unmodView(num).cast"); - testNum(new UnmodifiableMapView({1: 37}).cast(), - "unmodView(int).cast"); - testNum( - new UnmodifiableMapView({1: 37}) - .cast(), - "unmodView(num).cast"); - testNum( - new UnmodifiableMapView({1: 37}) - .cast(), - "unmodView(int).cast"); - - var m2 = new Map.unmodifiable({1: 37}); - testNum(m2, "Map.unmod"); - testNum(m2.cast(), "Map.unmod.cast"); - - Map nsm = new NsmMap().foo(a: 0); - test(nsm, #a, 0, "nsm", noSuchMethodMap: true); - test(nsm.cast(), #a, 0, "nsm.cast", noSuchMethodMap: true); -} - -void testNum(Map map, String name) { - test(map, 1, 37, name); -} - -void test( - Map map, Object firstKey, Object firstValue, String name, - {bool noSuchMethodMap: false}) { - if (!noSuchMethodMap) { - Expect.isTrue(map.containsKey(firstKey), "$name.containsKey"); - Expect.equals(1, map.length, "$name.length"); - Expect.equals(firstKey, map.keys.first, "$name.keys.first"); - Expect.equals(firstValue, map.values.first, "$name.values.first"); - } - - Expect.throwsUnsupportedError(map.clear, "$name.clear"); - Expect.throwsUnsupportedError(() { - map.remove(firstKey); - }, "$name.remove"); - Expect.throwsUnsupportedError(() { - map[null] = null; - }, "$name[]="); - Expect.throwsUnsupportedError(() { - map.addAll({null: null}); - }, "$name.addAll"); -} - -class NsmMap { - noSuchMethod(i) => i.namedArguments; - foo({a, b, c, d}); -} diff --git a/tests/corelib_2/map_update_test.dart b/tests/corelib_2/map_update_test.dart deleted file mode 100644 index fa2eebc4229..00000000000 --- a/tests/corelib_2/map_update_test.dart +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; -import 'dart:collection'; -import 'dart:convert' show json; - -Map newJsonMap() => json.decode('{}'); -Map newJsonMapCustomReviver() => - json.decode('{}', reviver: (key, value) => value); - -void main() { - test({}); - test(new LinkedHashMap()); - test(new HashMap()); - test(new LinkedHashMap.identity()); - test(new HashMap.identity()); - test(new MapView(new HashMap())); - test(new MapBaseMap()); - test(new MapMixinMap()); - test(newJsonMap()); - test(newJsonMapCustomReviver()); - testNonNull(new SplayTreeMap()); - testNonNull(new SplayTreeMap(Comparable.compare)); - testNonNull(new MapView(new SplayTreeMap())); -} - -void test(Map map) { - testNonNull(map); - - // Also works with null keys and values (omitted for splay-tree based maps) - map.clear(); - map.update(null, unreachable, ifAbsent: () => null); - Expect.mapEquals({null: null}, map); - map.update(null, (v) => "$v", ifAbsent: unreachable); - Expect.mapEquals({null: "null"}, map); - map.update(null, (v) => null, ifAbsent: unreachable); - Expect.mapEquals({null: null}, map); -} - -void testNonNull(Map map) { - // Only use literal String keys since JSON maps only accept strings, - // and literals works with identity-maps, and it's comparable for SplayTreeMap - // maps. - Expect.mapEquals({}, map); - map.update("key1", unreachable, ifAbsent: () => 42); - Expect.mapEquals({"key1": 42}, map); - map.clear(); - map["key1"] = 42; - map.update("key1", (v) => 1 + v, ifAbsent: unreachable); - Expect.mapEquals({"key1": 43}, map); - map.clear(); - - // Operations on maps with multiple elements. - var multi = { - "k1": 1, - "k2": 2, - "k3": 3, - "k4": 4, - "k5": 5, - "k6": 6, - "k7": 7, - "k8": 8, - "k9": 9, - "k10": 10, - }; - map.addAll(multi); - Expect.mapEquals(multi, map); - map.update("k3", (v) => 13); - map.update("k6", (v) => 16); - map.update("k11", unreachable, ifAbsent: () => 21); - Expect.mapEquals({ - "k1": 1, - "k2": 2, - "k3": 13, - "k4": 4, - "k5": 5, - "k6": 16, - "k7": 7, - "k8": 8, - "k9": 9, - "k10": 10, - "k11": 21, - }, map); - - map.clear(); - map.updateAll((k, v) => throw "unreachable"); - Expect.mapEquals({}, map); - - map.addAll(multi); - map.updateAll((k, v) => "$k:$v"); - Expect.mapEquals({ - "k1": "k1:1", - "k2": "k2:2", - "k3": "k3:3", - "k4": "k4:4", - "k5": "k5:5", - "k6": "k6:6", - "k7": "k7:7", - "k8": "k8:8", - "k9": "k9:9", - "k10": "k10:10", - }, map); - - map.clear(); - Expect.throws( - () => map.update("key1", unreachable, ifAbsent: () => throw "expected"), - (t) => t == "expected"); - - map["key1"] = 42; - Expect.throws(() => map.update("key1", (_) => throw "expected"), - (t) => t == "expected"); - - // No ifAbsent means throw if key not there. - Expect.throws(() => map.update("key-not", unreachable), (e) => e is Error); - - Expect.throws(() => map.update("key1", null), (e) => e is Error); - - // Works with null values. - map.clear(); - map.update("key1", unreachable, ifAbsent: () => null); - Expect.mapEquals({"key1": null}, map); - map.update("key1", (v) => "$v", ifAbsent: unreachable); - Expect.mapEquals({"key1": "null"}, map); - map.update("key1", (v) => null, ifAbsent: unreachable); - Expect.mapEquals({"key1": null}, map); -} - -// Slow implementation of Map based on MapBase. -abstract class MapBaseOperations { - final List _keys = []; - final List _values = []; - int _modCount = 0; - - V operator [](Object key) { - int index = _keys.indexOf(key); - if (index < 0) return null; - return _values[index]; - } - - Iterable get keys => new TestKeyIterable(this); - - void operator []=(K key, V value) { - int index = _keys.indexOf(key); - if (index >= 0) { - _values[index] = value; - } else { - _modCount++; - _keys.add(key); - _values.add(value); - } - } - - V remove(Object key) { - int index = _keys.indexOf(key); - if (index >= 0) { - var result = _values[index]; - key = _keys.removeLast(); - var value = _values.removeLast(); - if (index != _keys.length) { - _keys[index] = key; - _values[index] = value; - } - _modCount++; - return result; - } - return null; - } - - void clear() { - // Clear cannot be based on remove, since remove won't remove keys that - // are not equal to themselves. It will fail the testNaNKeys test. - _keys.clear(); - _values.clear(); - _modCount++; - } -} - -class MapBaseMap = MapBase with MapBaseOperations; -class MapMixinMap = MapBaseOperations with MapMixin; - -class TestKeyIterable extends IterableBase { - final _map; - TestKeyIterable(this._map); - int get length => _map._keys.length; - Iterator get iterator => new TestKeyIterator(_map); -} - -class TestKeyIterator implements Iterator { - final _map; - final int _modCount; - int _index = 0; - var _current; - TestKeyIterator(map) - : _map = map, - _modCount = map._modCount; - - bool moveNext() { - if (_modCount != _map._modCount) { - throw new ConcurrentModificationError(_map); - } - if (_index == _map._keys.length) { - _current = null; - return false; - } - _current = _map._keys[_index++]; - return true; - } - - K get current => _current; -} - -Null unreachable([_, __]) => throw "unreachable"; diff --git a/tests/corelib_2/map_values2_test.dart b/tests/corelib_2/map_values2_test.dart deleted file mode 100644 index c48dd8594b3..00000000000 --- a/tests/corelib_2/map_values2_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -main() { - var map1 = {"foo": 42, "bar": 499}; - var map2 = {}; - var map3 = const {"foo": 42, "bar": 499}; - var map4 = const {}; - var map5 = new Map(); - map5["foo"] = 43; - map5["bar"] = 500; - var map6 = new Map(); - - Expect.isTrue(map1.values is Iterable); - Expect.isFalse(map1.values is Iterable); - Expect.isFalse(map1.values is List); - Expect.equals(2, map1.values.length); - Expect.equals(42, map1.values.first); - Expect.equals(499, map1.values.last); - - Expect.isTrue(map2.values is Iterable); - Expect.isFalse(map2.values is Iterable); - Expect.isFalse(map2.values is List); - Expect.equals(0, map2.values.length); - - Expect.isTrue(map3.values is Iterable); - Expect.isFalse(map3.values is Iterable); - Expect.isFalse(map3.values is List); - Expect.equals(2, map3.values.length); - Expect.equals(42, map3.values.first); - Expect.equals(499, map3.values.last); - - Expect.isTrue(map4.values is Iterable); - Expect.isFalse(map4.values is Iterable); - Expect.isFalse(map4.values is List); - Expect.equals(0, map4.values.length); - - Expect.isTrue(map5.values is Iterable); - Expect.isFalse(map5.values is Iterable); - Expect.isFalse(map5.values is List); - Expect.equals(2, map5.values.length); - // new Map gives a LinkedHashMap, so we know the order. - Expect.isTrue(map5.values.first == 43); - Expect.isTrue(map5.values.last == 500); - - Expect.isTrue(map6.values is Iterable); - Expect.isFalse(map6.values is Iterable); - Expect.isFalse(map6.values is List); - Expect.equals(0, map6.values.length); -} diff --git a/tests/corelib_2/map_values3_test.dart b/tests/corelib_2/map_values3_test.dart deleted file mode 100644 index ef42c219d67..00000000000 --- a/tests/corelib_2/map_values3_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -main() { - var map1 = {1: "42", 2: "499"}; - var map2 = {}; - var map3 = const {3: "42", 4: "499"}; - var map4 = const {}; - var map5 = new Map(); - map5[5] = "43"; - map5[6] = "500"; - var map6 = new Map(); - - Expect.isTrue(map1.values is Iterable); - Expect.isFalse(map1.values is Iterable); - Expect.isFalse(map1.values is List); - Expect.equals(2, map1.values.length); - Expect.equals("42", map1.values.first); - Expect.equals("499", map1.values.last); - - Expect.isTrue(map2.values is Iterable); - Expect.isFalse(map2.values is Iterable); - Expect.isFalse(map2.values is List); - Expect.equals(0, map2.values.length); - - Expect.isTrue(map3.values is Iterable); - Expect.isFalse(map3.values is Iterable); - Expect.isFalse(map3.values is List); - Expect.equals(2, map3.values.length); - Expect.equals("42", map3.values.first); - Expect.equals("499", map3.values.last); - - Expect.isTrue(map4.values is Iterable); - Expect.isFalse(map4.values is Iterable); - Expect.isFalse(map4.values is List); - Expect.equals(0, map4.values.length); - - Expect.isTrue(map5.values is Iterable); - Expect.isFalse(map5.values is Iterable); - Expect.isFalse(map5.values is List); - Expect.equals(2, map5.values.length); - // new Map gives a LinkedHashMap, so we know the order. - Expect.isTrue(map5.values.first == "43"); - Expect.isTrue(map5.values.last == "500"); - - Expect.isTrue(map6.values is Iterable); - Expect.isFalse(map6.values is Iterable); - Expect.isFalse(map6.values is List); - Expect.equals(0, map6.values.length); -} diff --git a/tests/corelib_2/map_values4_test.dart b/tests/corelib_2/map_values4_test.dart deleted file mode 100644 index ffa51f019f3..00000000000 --- a/tests/corelib_2/map_values4_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -// Dart2js had a bug where the type information was not set correctly if the -// generic type of the map was not directly used (but only indirectly through -// map.values). - -main() { - var map1 = {1: "42", 2: "499"}; - Expect.isTrue(map1.values is Iterable); - Expect.isFalse(map1.values is Iterable); -} diff --git a/tests/corelib_2/map_values_test.dart b/tests/corelib_2/map_values_test.dart deleted file mode 100644 index 2813971ae38..00000000000 --- a/tests/corelib_2/map_values_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -main() { - var map1 = {"foo": 42, "bar": 499}; - var map2 = {}; - var map3 = const {"foo": 42, "bar": 499}; - var map4 = const {}; - var map5 = new Map(); - map5["foo"] = 43; - map5["bar"] = 500; - var map6 = new Map(); - - Expect.isTrue(map1.values is Iterable); - Expect.isFalse(map1.values is List); - Expect.equals(2, map1.values.length); - Expect.equals(42, map1.values.first); - Expect.equals(499, map1.values.last); - - Expect.isTrue(map2.values is Iterable); - Expect.isFalse(map2.values is List); - Expect.equals(0, map2.values.length); - - Expect.isTrue(map3.values is Iterable); - Expect.isFalse(map3.values is List); - Expect.equals(2, map3.values.length); - Expect.equals(42, map3.values.first); - Expect.equals(499, map3.values.last); - - Expect.isTrue(map4.values is Iterable); - Expect.isFalse(map4.values is List); - Expect.equals(0, map4.values.length); - - Expect.isTrue(map5.values is Iterable); - Expect.isFalse(map5.values is List); - Expect.equals(2, map5.values.length); - Expect.isTrue(map5.values.first == 43 || map5.values.first == 500); - Expect.isTrue(map5.values.last == 43 || map5.values.last == 500); - Expect.notEquals(map5.values.first, map5.values.last); - - Expect.isTrue(map6.values is Iterable); - Expect.isFalse(map6.values is List); - Expect.equals(0, map6.values.length); -} diff --git a/tests/corelib_2/nan_infinity_test.dart b/tests/corelib_2/nan_infinity_test.dart deleted file mode 100644 index a3e836b7004..00000000000 --- a/tests/corelib_2/nan_infinity_test.dart +++ /dev/null @@ -1,92 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Dart test program for testing NaN and Infinity. - -void main() { - // Sanity tests. - Expect.isFalse(1.5.isNaN); - Expect.isFalse(1.5.isInfinite); - Expect.isTrue(1.5.isFinite); - Expect.isFalse(1.5.isNegative); - Expect.isTrue((-1.5).isNegative); - Expect.isFalse(0.0.isNegative); - Expect.isTrue((-0.0).isNegative); - Expect.isTrue((-0.0).isFinite); - - Expect.isFalse(1.isNaN); - Expect.isFalse(1.isInfinite); - Expect.isTrue(1.isFinite); - Expect.isFalse(1.isNegative); - Expect.isTrue((-1).isNegative); - - // Test that predicates give the correct result. - Expect.isTrue(double.nan.isNaN); - Expect.isFalse(double.nan.isInfinite); - Expect.isFalse(double.nan.isFinite); - Expect.isFalse(double.nan.isNegative); - Expect.isFalse((-double.nan).isNegative); - - Expect.isFalse(double.infinity.isNaN); - Expect.isTrue(double.infinity.isInfinite); - Expect.isFalse(double.infinity.isFinite); - Expect.isFalse(double.infinity.isNegative); - Expect.isTrue((-double.infinity).isNegative); - - Expect.isFalse(double.negativeInfinity.isNaN); - Expect.isTrue(double.negativeInfinity.isInfinite); - Expect.isFalse(double.negativeInfinity.isFinite); - Expect.isTrue(double.negativeInfinity.isNegative); - Expect.isFalse((-double.negativeInfinity).isNegative); - - // Test toString. - Expect.equals("NaN", double.nan.toString()); - Expect.equals("Infinity", double.infinity.toString()); - Expect.equals("-Infinity", double.negativeInfinity.toString()); - - // Test identities. - Expect.isTrue(identical(double.nan, double.nan)); // //# 01: ok - Expect.isTrue(identical(double.infinity, double.infinity)); - Expect.isTrue(identical(double.negativeInfinity, double.negativeInfinity)); - Expect.isFalse(identical(double.nan, double.infinity)); - Expect.isFalse(identical(double.nan, double.negativeInfinity)); - Expect.isFalse(identical(double.infinity, double.negativeInfinity)); - Expect.isFalse(identical(double.nan, -double.nan)); - Expect.isTrue(identical(double.infinity, -double.negativeInfinity)); - Expect.isTrue(identical(double.negativeInfinity, -double.infinity)); - - // Test equalities - Expect.isTrue(double.infinity == double.infinity); - Expect.isTrue(double.negativeInfinity == double.negativeInfinity); - Expect.isFalse(double.infinity == double.negativeInfinity); - Expect.isFalse(double.negativeInfinity == double.infinity); - Expect.isFalse(double.nan == double.nan); - Expect.isFalse(double.nan == double.infinity); - Expect.isFalse(double.nan == double.negativeInfinity); - Expect.isFalse(double.infinity == double.nan); - Expect.isFalse(double.negativeInfinity == double.nan); - - // Test relational order. - Expect.isFalse(double.nan < double.nan); - Expect.isFalse(double.nan < double.infinity); - Expect.isFalse(double.nan < double.negativeInfinity); - Expect.isFalse(double.nan > double.nan); - Expect.isFalse(double.nan > double.infinity); - Expect.isFalse(double.nan > double.negativeInfinity); - Expect.isFalse(double.infinity < double.nan); - Expect.isFalse(double.negativeInfinity < double.nan); - Expect.isFalse(double.infinity > double.nan); - Expect.isFalse(double.negativeInfinity > double.nan); - Expect.isTrue(double.infinity > double.negativeInfinity); - Expect.isFalse(double.infinity < double.negativeInfinity); - - // NaN is contagious. - Expect.isTrue((3.0 * double.nan).isNaN); - Expect.isTrue((3.0 + double.nan).isNaN); - Expect.isTrue((-double.nan).isNaN); -} diff --git a/tests/corelib_2/nsm_invocation_generic_test.dart b/tests/corelib_2/nsm_invocation_generic_test.dart deleted file mode 100644 index 6123274b741..00000000000 --- a/tests/corelib_2/nsm_invocation_generic_test.dart +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// Test the invocations passed to noSuchMethod for generic invocations. - -main() { - var argument = new Object(); - var argument2 = new Object(); - // Method invocation. - expectInvocation( - new Invocation.genericMethod(#name, [int], []), nsm.name()); - expectInvocation(new Invocation.genericMethod(#name, [int], [argument]), - nsm.name(argument)); - expectInvocation( - new Invocation.genericMethod(#name, [int], [], {#arg: argument}), - nsm.name(arg: argument)); - expectInvocation( - new Invocation.genericMethod(#name, [int], [argument], {#arg: argument2}), - nsm.name(argument, arg: argument2)); - // Call invocation. - expectInvocation(new Invocation.genericMethod(#call, [int], []), nsm()); - expectInvocation(new Invocation.genericMethod(#call, [int], [argument]), - nsm(argument)); - expectInvocation( - new Invocation.genericMethod(#call, [int], [], {#arg: argument}), - nsm(arg: argument)); - expectInvocation( - new Invocation.genericMethod(#call, [int], [argument], {#arg: argument2}), - nsm(argument, arg: argument2)); -} - -dynamic nsm = new Recorder(); - -class Recorder { - noSuchMethod(Invocation invocation) { - return invocation; - } -} - -void checkUnmodifiableList(List list) { - if (list.isNotEmpty) { - Expect.throws(() { - list[0] = null; - }); - } - Expect.throws(() { - list.add(null); - }); -} - -void checkUnmodifiableMap(Map map) { - Expect.throws(() { - map[#key] = null; - }); -} - -expectInvocation(Invocation expect, Invocation actual) { - Expect.equals(expect.isGetter, actual.isGetter, "isGetter"); - Expect.equals(expect.isSetter, actual.isSetter, "isSetter"); - Expect.equals(expect.isAccessor, actual.isAccessor, "isAccessor"); - Expect.equals(actual.isGetter || actual.isSetter, actual.isAccessor); - Expect.equals(expect.isMethod, actual.isMethod, "isMethod"); - Expect.isTrue(actual.isMethod || actual.isGetter || actual.isSetter); - Expect.isFalse(actual.isMethod && actual.isGetter); - Expect.isFalse(actual.isMethod && actual.isSetter); - Expect.isFalse(actual.isSetter && actual.isGetter); - Expect.equals(expect.memberName, actual.memberName, "memberName"); - Expect.listEquals(expect.typeArguments, actual.typeArguments, "types"); - Expect.listEquals( - expect.positionalArguments, actual.positionalArguments, "positional"); - Expect.mapEquals(expect.namedArguments, actual.namedArguments, "named"); - checkUnmodifiableList(actual.typeArguments); - checkUnmodifiableList(actual.positionalArguments); - checkUnmodifiableMap(actual.namedArguments); -} diff --git a/tests/corelib_2/nsm_invocation_test.dart b/tests/corelib_2/nsm_invocation_test.dart deleted file mode 100644 index 0d8c98bfe5c..00000000000 --- a/tests/corelib_2/nsm_invocation_test.dart +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// Tests the constructors of the Invocation class. - -main() { - var argument = new Object(); - var argument2 = new Object(); - // Getter Invocation. - expectInvocation(new Invocation.getter(#name), nsm.name); - // Setter Invocation. - expectInvocation(new Invocation.setter(const Symbol("name="), argument), - (nsm..name = argument).last); - // Method invocation. - expectInvocation(new Invocation.method(#name, []), nsm.name()); - expectInvocation( - new Invocation.method(#name, [argument]), nsm.name(argument)); - expectInvocation(new Invocation.method(#name, [], {#arg: argument}), - nsm.name(arg: argument)); - expectInvocation(new Invocation.method(#name, [argument], {#arg: argument2}), - nsm.name(argument, arg: argument2)); - // Operator invocation. - expectInvocation(new Invocation.method(#+, [argument]), nsm + argument); - expectInvocation(new Invocation.method(#-, [argument]), nsm - argument); - expectInvocation(new Invocation.method(#~, []), ~nsm); - expectInvocation(new Invocation.method(Symbol.unaryMinus, []), -nsm); - expectInvocation(new Invocation.method(#[], [argument]), nsm[argument]); - nsm[argument] = argument2; - expectInvocation( - new Invocation.method(#[]=, [argument, argument2]), nsm.last); - // Call invocation. - expectInvocation(new Invocation.method(#call, []), nsm()); - expectInvocation(new Invocation.method(#call, [argument]), nsm(argument)); - expectInvocation( - new Invocation.method(#call, [], {#arg: argument}), nsm(arg: argument)); - expectInvocation(new Invocation.method(#call, [argument], {#arg: argument2}), - nsm(argument, arg: argument2)); -} - -dynamic nsm = new Recorder(); - -class Recorder { - Invocation last; - noSuchMethod(Invocation invocation) { - return last = invocation; - } -} - -void checkUnmodifiableList(List list) { - if (list.isNotEmpty) { - Expect.throws(() { - list[0] = null; - }); - } - Expect.throws(() { - list.add(null); - }); -} - -void checkUnmodifiableMap(Map map) { - Expect.throws(() { - map[#key] = null; - }); -} - -expectInvocation(Invocation expect, Invocation actual) { - Expect.equals(expect.isGetter, actual.isGetter, "isGetter"); - Expect.equals(expect.isSetter, actual.isSetter, "isSetter"); - Expect.equals(expect.isAccessor, actual.isAccessor, "isAccessor"); - Expect.equals(actual.isGetter || actual.isSetter, actual.isAccessor); - Expect.equals(expect.isMethod, actual.isMethod, "isMethod"); - Expect.isTrue(actual.isMethod || actual.isGetter || actual.isSetter); - Expect.isFalse(actual.isMethod && actual.isGetter); - Expect.isFalse(actual.isMethod && actual.isSetter); - Expect.isFalse(actual.isSetter && actual.isGetter); - Expect.equals(expect.memberName, actual.memberName, "memberName"); - Expect.listEquals(expect.typeArguments, actual.typeArguments, "types"); - Expect.listEquals( - expect.positionalArguments, actual.positionalArguments, "positional"); - Expect.mapEquals(expect.namedArguments, actual.namedArguments, "named"); - checkUnmodifiableList(actual.typeArguments); - checkUnmodifiableList(actual.positionalArguments); - checkUnmodifiableMap(actual.namedArguments); -} diff --git a/tests/corelib_2/null_closurized_method_tostring_test.dart b/tests/corelib_2/null_closurized_method_tostring_test.dart deleted file mode 100644 index e7439d82449..00000000000 --- a/tests/corelib_2/null_closurized_method_tostring_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2022, 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 "package:expect/expect.dart"; - -// The closurized methods of `null` have working `toString()` methods. -// See #48322. - -void main() { - check(null.toString); - check(null.noSuchMethod); -} - -void check(Object o) { - final s = o.toString(); - Expect.notEquals("", s); -} diff --git a/tests/corelib_2/null_nosuchmethod_test.dart b/tests/corelib_2/null_nosuchmethod_test.dart deleted file mode 100644 index 70a1f8ce807..00000000000 --- a/tests/corelib_2/null_nosuchmethod_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2012, 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 - -// VMOptions=--lazy-dispatchers -// VMOptions=--no-lazy-dispatchers - -import "package:expect/expect.dart"; - -// Test that Null's noSuchMethod can be closurized and called directly. - -class InvocationFactory { - static final dynamic instance = new InvocationFactory(); - noSuchMethod(i) => i; -} - -main() { - dynamic x; - // Non-existing method calls noSuchMethod. - Expect.throwsNoSuchMethodError(() => x.foo()); - - var invocation = InvocationFactory.instance.foo; - - // Calling noSuchMethod directly. - Expect.throwsNoSuchMethodError(() => x.noSuchMethod(invocation, [])); - - // Closurizing noSuchMethod and calling it. - dynamic nsm = x.noSuchMethod; - Expect.notEquals(null, nsm); - Expect.throwsTypeError(() => nsm("foo")); - - Expect.throwsNoSuchMethodError(() => nsm(invocation)); - Expect.throwsNoSuchMethodError( - () => nsm(invocation, [])); // wrong number of args - - // Wrong number and type of arguments. - Expect.throwsNoSuchMethodError(() => nsm("foo", [])); //# 01: ok -} diff --git a/tests/corelib_2/null_test.dart b/tests/corelib_2/null_test.dart deleted file mode 100644 index 0f066463df6..00000000000 --- a/tests/corelib_2/null_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test that Null inherits properties from Object. - -main() { - var x; - - Expect.isTrue(x is Object); - Expect.isTrue(x is dynamic); - Expect.isTrue(x is! String); - Expect.isTrue(x is! int); - - // These shouldn't throw. - x.runtimeType; - x.toString(); - x.hashCode; - - // operator== is inherited from Object. It's the same as identical. - // It's not really testable. - Expect.isTrue(identical(x, null)); - Expect.isTrue(x == null); - - // Methods can be closurized and yields the same result. - var ts = x.toString; - Expect.equals(null.toString(), ts()); - - // noSuchMethod is tested in null_nosuchmethod_test.dart. -} diff --git a/tests/corelib_2/num_clamp_test.dart b/tests/corelib_2/num_clamp_test.dart deleted file mode 100644 index 319fa9d7706..00000000000 --- a/tests/corelib_2/num_clamp_test.dart +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2012, 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. -// Test num.clamp. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -testIntClamp() { - Expect.equals(2, 2.clamp(1, 3)); - Expect.equals(1, 0.clamp(1, 3)); - Expect.equals(3, 4.clamp(1, 3)); - Expect.equals(-2, (-2).clamp(-3, -1)); - Expect.equals(-1, 0.clamp(-3, -1)); - Expect.equals(-3, (-4).clamp(-3, -1)); - Expect.equals(0, 1.clamp(0, 0)); - Expect.equals(0, (-1).clamp(0, 0)); - Expect.equals(0, 0.clamp(0, 0)); - Expect.throwsArgumentError(() => 0.clamp(0, -1)); -} - -testDoubleClamp() { - Expect.equals(2.0, 2.clamp(1.0, 3.0)); - Expect.equals(1.0, 0.clamp(1.0, 3.0)); - Expect.equals(3.0, 4.clamp(1.0, 3.0)); - Expect.equals(-2.0, (-2.0).clamp(-3.0, -1.0)); - Expect.equals(-1.0, 0.0.clamp(-3.0, -1.0)); - Expect.equals(-3.0, (-4.0).clamp(-3.0, -1.0)); - Expect.equals(0.0, 1.0.clamp(0.0, 0.0)); - Expect.equals(0.0, (-1.0).clamp(0.0, 0.0)); - Expect.equals(0.0, 0.0.clamp(0.0, 0.0)); - Expect.throwsArgumentError(() => 0.0.clamp(0.0, -1.0)); -} - -testDoubleClampInt() { - Expect.equals(2.0, 2.0.clamp(1, 3)); - Expect.equals(1, 0.0.clamp(1, 3)); - Expect.isTrue(0.0.clamp(1, 3) is int); - Expect.equals(3, 4.0.clamp(1, 3)); - Expect.isTrue(4.0.clamp(1, 3) is int); - Expect.equals(-2.0, (-2.0).clamp(-3, -1)); - Expect.equals(-1, 0.0.clamp(-3, -1)); - Expect.isTrue(0.0.clamp(-3, -1) is int); - Expect.equals(-3, (-4.0).clamp(-3, -1)); - Expect.isTrue((-4.0).clamp(-3, -1) is int); - Expect.equals(0, 1.0.clamp(0, 0)); - Expect.isTrue(1.0.clamp(0, 0) is int); - Expect.equals(0, (-1.0).clamp(0, 0)); - Expect.isTrue((-1.0).clamp(0, 0) is int); - Expect.equals(0.0, 0.0.clamp(0, 0)); - Expect.isTrue(0.0.clamp(0, 0) is double); - Expect.throwsArgumentError(() => 0.0.clamp(0, -1)); -} - -testDoubleClampExtremes() { - Expect.equals(2.0, 2.0.clamp(-double.infinity, double.infinity)); - Expect.equals(2.0, 2.0.clamp(-double.infinity, double.nan)); - Expect.equals(double.infinity, 2.0.clamp(double.infinity, double.nan)); - Expect.isTrue(2.0.clamp(double.nan, double.nan).isNaN); - Expect.throwsArgumentError(() => 0.0.clamp(double.nan, double.infinity)); -} - -main() { - testIntClamp(); - testDoubleClamp(); - testDoubleClampInt(); - testDoubleClampExtremes(); -} diff --git a/tests/corelib_2/num_parse_test.dart b/tests/corelib_2/num_parse_test.dart deleted file mode 100644 index 3b6450eeda4..00000000000 --- a/tests/corelib_2/num_parse_test.dart +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -const whiteSpace = const [ - "", - "\x09", - "\x0a", - "\x0b", - "\x0c", - "\x0d", - "\x85", - "\xa0", - "\u1680", - "\u2000", - "\u2001", - "\u2002", - "\u2003", - "\u2004", - "\u2005", - "\u2006", - "\u2007", - "\u2008", - "\u2009", - "\u200a", - "\u2028", - "\u2029", - "\u202f", - "\u205f", - "\u3000", - "\uFEFF" -]; - -void expectNumEquals(num expect, num actual, String message) { - if (expect is double && expect.isNaN) { - Expect.isTrue(actual is double && actual.isNaN, "isNaN: $message"); - } else { - Expect.identical(expect, actual, message); - } -} - -// Test source surrounded by any combination of whitespace. -void testParseAllWhitespace(String source, num result) { - for (String ws1 in whiteSpace) { - for (String ws2 in whiteSpace) { - String padded = "$ws1$source$ws2"; - // Use Expect.identical because it also handles NaN and 0.0/-0.0. - // Except on dart2js: http://dartbug.com/11551 - expectNumEquals(result, num.parse(padded), "parse '$padded'"); - padded = "$ws1$ws2$source"; - expectNumEquals(result, num.parse(padded), "parse '$padded'"); - padded = "$source$ws1$ws2"; - expectNumEquals(result, num.parse(padded), "parse '$padded'"); - } - } -} - -// Test source and -source surrounded by any combination of whitespace. -void testParseWhitespace(String source, num result) { - assert(result >= 0); - testParseAllWhitespace(source, result); - testParseAllWhitespace("-$source", -result); -} - -// Test parsing source, optionally preceded and/or followed by whitespace. -void testParse(String source, num result) { - expectNumEquals(result, num.parse(source), "parse '$source'"); - expectNumEquals(result, num.parse(" $source"), "parse ' $source'"); - expectNumEquals(result, num.parse("$source "), "parse '$source '"); - expectNumEquals(result, num.parse(" $source "), "parse ' $source '"); -} - -// Test parsing an integer in decimal or hex format, with or without signs. -void testInt(int value) { - testParse("$value", value); - testParse("+$value", value); - testParse("-$value", -value); - var hex = "0x${value.toRadixString(16)}"; - var lchex = hex.toLowerCase(); - testParse(lchex, value); - testParse("+$lchex", value); - testParse("-$lchex", -value); - var uchex = hex.toUpperCase(); - testParse(uchex, value); - testParse("+$uchex", value); - testParse("-$uchex", -value); -} - -// Test parsing an integer, and the integers just around it. -void testIntAround(int value) { - testInt(value - 1); - testInt(value); - testInt(value + 1); -} - -void testDouble(double value) { - testParse("$value", value); - testParse("+$value", value); - testParse("-$value", -value); - if (value.isFinite) { - String exp = value.toStringAsExponential(); - String lcexp = exp.toLowerCase(); - testParse(lcexp, value); - testParse("+$lcexp", value); - testParse("-$lcexp", -value); - String ucexp = exp.toUpperCase(); - testParse(ucexp, value); - testParse("+$ucexp", value); - testParse("-$ucexp", -value); - } -} - -void testFail(String source) { - var object = new Object(); - Expect.throwsFormatException(() { - num.parse(source); - }); -} - -void main() { - testInt(0); - testInt(1); - testInt(9); - testInt(10); - testInt(99); - testInt(100); - testIntAround(256); - testIntAround(0x80000000); // 2^31 - testIntAround(0x100000000); // 2^32 - testIntAround(0x10000000000000); // 2^52 - testIntAround(0x20000000000000); // 2^53 - testIntAround(0x40000000000000); // 2^54 - // 0x7ffffffffffffffe on int-is-64-bit implementations, rounded up on - // int-is-double implementations. - testIntAround(0x7ffffffffffff000 + 0xffe); // 2^63 - - testDouble(0.0); - testDouble(5e-324); - testDouble(2.225073858507201e-308); - testDouble(2.2250738585072014e-308); - testDouble(0.49999999999999994); - testDouble(0.5); - testDouble(0.50000000000000006); - testDouble(0.9999999999999999); - testDouble(1.0); - testDouble(1.0000000000000002); - testDouble(4294967295.0); - testDouble(4294967296.0); - testDouble(4503599627370495.5); - testDouble(4503599627370497.0); - testDouble(9007199254740991.0); - testDouble(9007199254740992.0); - testDouble(1.7976931348623157e+308); - testDouble(double.infinity); - testDouble(double.nan); // //# 01: ok - - // Strings that cannot occur from toString of a number. - testParse("000000000000", 0); - testParse("000000000001", 1); - testParse("000000000000.0000000000000", 0.0); - testParse("000000000001.0000000000000", 1.0); - testParse("0x0000000000", 0); - testParse("0e0", 0.0); - testParse("0e+0", 0.0); - testParse("0e-0", 0.0); - testParse("-0e0", -0.0); - testParse("-0e+0", -0.0); - testParse("-0e-0", -0.0); - testParse("1e0", 1.0); - testParse("1e+0", 1.0); - testParse("1e-0", 1.0); - testParse("-1e0", -1.0); - testParse("-1e+0", -1.0); - testParse("-1e-0", -1.0); - testParse("1.", 1.0); - testParse(".1", 0.1); - testParse("1.e1", 10.0); - testParse(".1e1", 1.0); - - testParseWhitespace("0x1", 1); - testParseWhitespace("1", 1); - testParseWhitespace("1.0", 1.0); - testParseWhitespace("1e1", 10.0); - testParseWhitespace(".1e1", 1.0); - testParseWhitespace("1.e1", 10.0); - testParseWhitespace("1e+1", 10.0); - testParseWhitespace("1e-1", 0.1); - - // Negative tests - things not to allow. - - // Spaces inside the numeral. - testFail("- 1"); - testFail("+ 1"); - testFail("2 2"); - testFail("0x 42"); - testFail("1 ."); - testFail(". 1"); - testFail("1e 2"); - testFail("1 e2"); - // Invalid characters. - testFail("0x1H"); - testFail("12H"); - testFail("1x2"); - testFail("00x2"); - testFail("0x2.2"); - // Empty hex number. - testFail("0x"); - testFail("-0x"); - testFail("+0x"); - // Double exponent without value. - testFail(".e1"); - testFail("e1"); - testFail("e+1"); - testFail("e-1"); - testFail("-e1"); - testFail("-e+1"); - testFail("-e-1"); - // Incorrect ways to write NaN/Infinity. - testFail("infinity"); - testFail("INFINITY"); - testFail("1.#INF"); - testFail("inf"); - testFail("nan"); - testFail("NAN"); - testFail("1.#IND"); - testFail("indef"); - testFail("qnan"); - testFail("snan"); -} diff --git a/tests/corelib_2/num_sign_test.dart b/tests/corelib_2/num_sign_test.dart deleted file mode 100644 index e2979e40853..00000000000 --- a/tests/corelib_2/num_sign_test.dart +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) 2013, 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. -// Test num.clamp. -// VMOptions=--no-use-field-guards -// VMOptions= - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Pedestrian implementation of sign, following its specification directly. -num sign(num value) { - if (value is int) { - if (value < 0) return -1; - if (value > 0) return 1; - return 0; - } - if (value.isNaN) return value; - if (value == 0.0) return value; - if (value > 0.0) return 1.0; - return -1.0; -} - -var numbers = [ - // Integers - 0, - 1, - 2, - 0x7f, // ~7 bits - 0x80, - 0xff, // ~8 bits - 0x100, - 0xffff, // ~16 bits - 0x10000, - 0x3fffffff, // ~30 bits (max positive 32-bit tagged smi) - 0x40000000, - 0x40000001, - 0x7fffffff, // ~31 bits - 0x80000000, - 0x80000001, - 0xfffffffff, // ~32 bits - 0x100000000, - 0x100000001, - 0x10000000000000, // ~53 bits - 0x10000000000001, - 0x1fffffffffffff, - 0x20000000000000, - // Use arithmetic to construct values below since they are not valid 'web - // integers'. On platforms that use doubles to represent integers, there will - // be some rounding in the arithmetic, testing a nearby value instead. - 0x20000000000000 + 1, // first integer not representable as double. - 0x20000000000000 + 2, - 0x7ffffffffffff000 + 0xfff, // ~63 bits - 0x8000000000000000, - 0x8000000000000000 + 1, - 0xfffffffffffff000 + 0xfff, // ~64 bits - // Doubles. - 0.0, - 5e-324, // min positive - 2.225073858507201e-308, // max denormal - 2.2250738585072014e-308, // min normal - 0.49999999999999994, // ~0.5 - 0.5, - 0.5000000000000001, - 0.9999999999999999, // ~1.0 - 1.0, - 1.0000000000000002, - 4294967295.0, // ~32 bits - 4294967296.0, - 4503599627370495.5, // max fractional - 4503599627370497.0, - 9007199254740991.0, - 9007199254740992.0, // max exact (+1 is not a double) - 1.7976931348623157e+308, // max finite double - 1.0 / 0.0, // Infinity - 0.0 / 0.0, // NaN -]; - -main() { - for (num number in numbers) { - test(number); - test(-number); - } -} - -void test(number) { - num expectSign = sign(number); - num actualSign = number.sign; - if (expectSign.isNaN) { - Expect.isTrue(actualSign.isNaN, "$number: $actualSign != NaN"); - } else { - if (number is int) { - Expect.isTrue(actualSign is int, "$number.sign is int"); - } else { - Expect.isTrue(actualSign is double, "$number.sign is double"); - } - Expect.equals(expectSign, actualSign, "$number"); - Expect.equals(number.isNegative, actualSign.isNegative, "$number:negative"); - var renumber = actualSign * number.abs(); - Expect.equals(number, renumber, "$number (sign*abs)"); - if (number is int) { - Expect.isTrue(renumber is int, "$number (sign*abs) is int"); - } else { - Expect.isTrue(renumber is double, "$number (sign*abs) is double"); - } - } -} diff --git a/tests/corelib_2/num_try_parse_test.dart b/tests/corelib_2/num_try_parse_test.dart deleted file mode 100644 index 52ad035eb3b..00000000000 --- a/tests/corelib_2/num_try_parse_test.dart +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -const whiteSpace = const [ - "", - "\x09", - "\x0a", - "\x0b", - "\x0c", - "\x0d", - "\xa0", - "\u1680", - "\u2000", - "\u2001", - "\u2002", - "\u2003", - "\u2004", - "\u2005", - "\u2006", - "\u2007", - "\u2008", - "\u2009", - "\u200a", - "\u2028", - "\u2029", - "\u202f", - "\u205f", - "\u3000", - "\uFEFF" -]; - -void expectNumEquals(num expect, num actual, String message) { - if (expect is double && expect.isNaN) { - Expect.isTrue(actual is double && actual.isNaN, "isNaN: $message"); - } else { - Expect.identical(expect, actual, message); - } -} - -// Test source surrounded by any combination of whitespace. -void testParseAllWhitespace(String source, num result) { - for (String ws1 in whiteSpace) { - for (String ws2 in whiteSpace) { - String padded = "$ws1$source$ws2"; - // Use Expect.identical because it also handles NaN and 0.0/-0.0. - // Except on dart2js: http://dartbug.com/11551 - expectNumEquals(result, num.parse(padded), "parse '$padded'"); - padded = "$ws1$ws2$source"; - expectNumEquals(result, num.parse(padded), "parse '$padded'"); - padded = "$source$ws1$ws2"; - expectNumEquals(result, num.parse(padded), "parse '$padded'"); - } - } -} - -// Test source and -source surrounded by any combination of whitespace. -void testParseWhitespace(String source, num result) { - assert(result >= 0); - testParseAllWhitespace(source, result); - testParseAllWhitespace("-$source", -result); -} - -void testParse(String source, num result) { - expectNumEquals(result, num.tryParse(source), "parse '$source'"); - expectNumEquals(result, num.tryParse(" $source"), "parse ' $source'"); - expectNumEquals(result, num.tryParse("$source "), "parse '$source '"); - expectNumEquals(result, num.tryParse(" $source "), "parse ' $source '"); -} - -// Test parsing an integer in decimal or hex format, with or without signs. -void testInt(int value) { - testParse("$value", value); - testParse("+$value", value); - testParse("-$value", -value); - var hex = "0x${value.toRadixString(16)}"; - var lchex = hex.toLowerCase(); - testParse(lchex, value); - testParse("+$lchex", value); - testParse("-$lchex", -value); - var uchex = hex.toUpperCase(); - testParse(uchex, value); - testParse("+$uchex", value); - testParse("-$uchex", -value); -} - -// Test parsing an integer, and the integers just around it. -void testIntAround(int value) { - testInt(value - 1); - testInt(value); - testInt(value + 1); -} - -void testDouble(double value) { - testParse("$value", value); - testParse("+$value", value); - testParse("-$value", -value); - if (value.isFinite) { - String exp = value.toStringAsExponential(); - String lcexp = exp.toLowerCase(); - testParse(lcexp, value); - testParse("+$lcexp", value); - testParse("-$lcexp", -value); - String ucexp = exp.toUpperCase(); - testParse(ucexp, value); - testParse("+$ucexp", value); - testParse("-$ucexp", -value); - } -} - -void testFail(String source) { - Expect.isNull(num.tryParse(source)); -} - -void main() { - testInt(0); - testInt(1); - testInt(9); - testInt(10); - testInt(99); - testInt(100); - testIntAround(256); - testIntAround(0x80000000); // 2^31 - testIntAround(0x100000000); // 2^32 - testIntAround(0x10000000000000); // 2^52 - testIntAround(0x1FFFFFFFFFFFFF); // 2^53 - 1 - - testDouble(0.0); - testDouble(5e-324); - testDouble(2.225073858507201e-308); - testDouble(2.2250738585072014e-308); - testDouble(0.49999999999999994); - testDouble(0.5); - testDouble(0.50000000000000006); - testDouble(0.9999999999999999); - testDouble(1.0); - testDouble(1.0000000000000002); - testDouble(4294967295.0); - testDouble(4294967296.0); - testDouble(4503599627370495.5); - testDouble(4503599627370497.0); - testDouble(9007199254740991.0); - testDouble(9007199254740992.0); - testDouble(1.7976931348623157e+308); - testDouble(double.infinity); - testDouble(double.nan); - - // Strings that cannot occur from toString of a number. - testParse("000000000000", 0); - testParse("000000000001", 1); - testParse("000000000000.0000000000000", 0.0); - testParse("000000000001.0000000000000", 1.0); - testParse("0x0000000000", 0); - testParse("0e0", 0.0); - testParse("0e+0", 0.0); - testParse("0e-0", 0.0); - testParse("-0e0", -0.0); - testParse("-0e+0", -0.0); - testParse("-0e-0", -0.0); - testParse("1e0", 1.0); - testParse("1e+0", 1.0); - testParse("1e-0", 1.0); - testParse("-1e0", -1.0); - testParse("-1e+0", -1.0); - testParse("-1e-0", -1.0); - testParse("1.", 1.0); - testParse(".1", 0.1); - testParse("1.e1", 10.0); - testParse(".1e1", 1.0); - - testParseWhitespace("0x1", 1); - testParseWhitespace("1", 1); - testParseWhitespace("1.0", 1.0); - testParseWhitespace("1e1", 10.0); - testParseWhitespace(".1e1", 1.0); - testParseWhitespace("1.e1", 10.0); - testParseWhitespace("1e+1", 10.0); - testParseWhitespace("1e-1", 0.1); - - // Negative tests - things not to allow. - - // Spaces inside the numeral. - testFail("- 1"); - testFail("+ 1"); - testFail("2 2"); - testFail("0x 42"); - testFail("1 ."); - testFail(". 1"); - testFail("1e 2"); - testFail("1 e2"); - // Invalid characters. - testFail("0x1H"); - testFail("12H"); - testFail("1x2"); - testFail("00x2"); - testFail("0x2.2"); - // Empty hex number. - testFail("0x"); - testFail("-0x"); - testFail("+0x"); - // Double exponent without value. - testFail(".e1"); - testFail("e1"); - testFail("e+1"); - testFail("e-1"); - testFail("-e1"); - testFail("-e+1"); - testFail("-e-1"); - // Incorrect ways to write NaN/Infinity. - testFail("infinity"); - testFail("INFINITY"); - testFail("1.#INF"); - testFail("inf"); - testFail("nan"); - testFail("NAN"); - testFail("1.#IND"); - testFail("indef"); - testFail("qnan"); - testFail("snan"); -} diff --git a/tests/corelib_2/object_hash_test.dart b/tests/corelib_2/object_hash_test.dart deleted file mode 100644 index c505b5c5926..00000000000 --- a/tests/corelib_2/object_hash_test.dart +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) 2018, 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 - -import "dart:math"; -import "dart:typed_data"; - -import "package:expect/expect.dart"; - -main() { - const nan = double.nan; - const inf = double.infinity; - - int hash1234 = Object.hash(1, 2, 3, 4); - Expect.type(hash1234); - Expect.equals(hash1234, Object.hash(1, 2, 3, 4)); // Consistent. - Expect.equals(hash1234, Object.hashAll([1, 2, 3, 4])); - Expect.equals(hash1234, Object.hashAll(Uint8List.fromList([1, 2, 3, 4]))); - - Expect.notEquals(hash1234, Object.hash(1, 2, 3, 4, null)); - - Expect.equals(Object.hash(1, 2, 3, 4, 5, 6, 7, 8, 9), - Object.hashAll([1, 2, 3, 4, 5, 6, 7, 8, 9])); - - // Check that we can call `hash` with 2-20 arguments, - // and they all agree with `hashAll`. - var random = Random(); - for (var i = 2; i <= 20; i++) { - var arguments = [for (var j = 0; j < i; j++) random.nextInt(256)]; - var hashAll = Object.hashAll(arguments); - var hash = Function.apply(Object.hash, arguments); - Expect.equals( - hashAll, - hash, - "hashAll and hash disagrees for $i values:\n" - "$arguments"); - } - - // Works for all kinds of objects; - int varHash = Object.hash( - "string", 3, nan, true, null, Type, #Symbol, const Object(), function); - Expect.equals( - varHash, - Object.hashAll([ - "string", - 3, - nan, - true, - null, - Type, - #Symbol, - const Object(), - function - ])); - - // Object doesn't matter, just its hash code. - Expect.equals(hash1234, - Object.hash(Hashable(1), Hashable(2), Hashable(3), Hashable(4))); - - // It's potentially possible to get a conflict, but it doesn't happen here. - Expect.notEquals("str".hashCode, Object.hashAll(["str"])); - - var hash12345 = Object.hashAllUnordered([1, 2, 3, 4, 5]); - for (var p in permutations([1, 2, 3, 4, 5])) { - Expect.equals(hash12345, Object.hashAllUnordered(p)); - } - Expect.notEquals( - Object.hashAllUnordered(["a", "a"]), Object.hashAllUnordered(["a"])); - - Expect.notEquals(Object.hashAllUnordered(["a", "a"]), - Object.hashAllUnordered(["a", "a", "a", "a"])); - - Expect.notEquals(Object.hashAllUnordered(["a", "b"]), - Object.hashAllUnordered(["a", "a", "a", "b"])); - - /// Unordered hashing works for all kinds of objects. - var unorderHash = Object.hashAllUnordered([ - "string", - 3, - nan, - true, - null, - Type, - #Symbol, - const Object(), - function, - ]); - - var unorderHash2 = Object.hashAllUnordered([ - true, - const Object(), - 3, - function, - Type, - "string", - null, - nan, - #Symbol, - ]); - Expect.equals(unorderHash, unorderHash2); -} - -/// Lazily emits all permutations of [values]. -/// -/// Modifies [values] rather than create a new list. -/// The [values] list is guaranteed to end up in its original state -/// after all permutations have been read. -Iterable> permutations(List values) { - Iterable> recPermute(int end) sync* { - if (end == 1) { - yield values; - return; - } - for (var i = 0; i < end; i++) { - yield* recPermute(end - 1); - // Rotate values[i:]. - var tmp = values.first; - for (var k = 1; k < end; k++) values[k - 1] = values[k]; - values[end - 1] = tmp; - } - } - - return recPermute(values.length); -} - -// static function, used as constant value. -void function() {} - -class Hashable { - final Object o; - Hashable(this.o); - bool operator ==(Object other) => other is Hashable && o == other.o; - int get hashCode => o.hashCode; -} diff --git a/tests/corelib_2/range_error_test.dart b/tests/corelib_2/range_error_test.dart deleted file mode 100644 index 9315ea558bf..00000000000 --- a/tests/corelib_2/range_error_test.dart +++ /dev/null @@ -1,97 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Dart test for testing out of range exceptions on arrays, and the content -// of range_error toString(). - -void main() { - testRead(); - testWrite(); - testToString(); -} - -void testRead() { - testListRead([], 0); - testListRead([], -1); - testListRead([], 1); - - var list = [1]; - testListRead(list, -1); - testListRead(list, 1); - - list = new List.filled(1, null); - testListRead(list, -1); - testListRead(list, 1); - - list = []; - testListRead(list, -1); - testListRead(list, 0); - testListRead(list, 1); -} - -void testWrite() { - testListWrite([], 0); - testListWrite([], -1); - testListWrite([], 1); - - var list = [1]; - testListWrite(list, -1); - testListWrite(list, 1); - - list = new List.filled(1, null); - testListWrite(list, -1); - testListWrite(list, 1); - - list = []; - testListWrite(list, -1); - testListWrite(list, 0); - testListWrite(list, 1); -} - -void testToString() { - for (var name in [null, "THENAME"]) { - for (var message in [null, "THEMESSAGE"]) { - var value = 37; - for (var re in [ - new ArgumentError.value(value, name, message), - new RangeError.value(value, name, message), - new IndexError.withLength(value, 0, - indexable: [], name: name, message: message), - new RangeError.range(value, 0, 24, name, message) - ]) { - var str = re.toString(); - if (name != null) Expect.isTrue(str.contains(name), "$name in $str"); - if (message != null) - Expect.isTrue(str.contains(message), "$message in $str"); - Expect.isTrue(str.contains("$value"), "$value in $str"); - // No empty ':' separated parts - in that case the colon is omitted too. - Expect.isFalse(str.contains(new RegExp(":\s*:"))); - } - } - } -} - -void testListRead(list, index) { - var exception = null; - try { - var e = list[index]; - } on RangeError catch (e) { - exception = e; - } - Expect.equals(true, exception != null); -} - -void testListWrite(list, index) { - var exception = null; - try { - list[index] = null; - } on RangeError catch (e) { - exception = e; - } - Expect.equals(true, exception != null); -} diff --git a/tests/corelib_2/reg_exp1_test.dart b/tests/corelib_2/reg_exp1_test.dart deleted file mode 100644 index b4105bfc318..00000000000 --- a/tests/corelib_2/reg_exp1_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// 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 test for testing regular expressions in Dart. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class RegExp1Test { - static testMain() { - RegExp exp1 = new RegExp("bar|foo"); - Expect.equals(true, exp1.hasMatch("foo")); - Expect.equals(true, exp1.hasMatch("bar")); - Expect.equals(false, exp1.hasMatch("gim")); - Expect.equals(true, exp1.hasMatch("just foo")); - Expect.equals("bar|foo", exp1.pattern); - Expect.equals(false, exp1.isMultiLine); - Expect.equals(true, exp1.isCaseSensitive); - - RegExp exp2 = new RegExp("o+", caseSensitive: false); - Expect.equals(true, exp2.hasMatch("this looks good")); - Expect.equals(true, exp2.hasMatch("fOO")); - Expect.equals(false, exp2.hasMatch("bar")); - Expect.equals("o+", exp2.pattern); - Expect.equals(false, exp2.isCaseSensitive); - Expect.equals(false, exp2.isMultiLine); - } -} - -main() { - RegExp1Test.testMain(); -} diff --git a/tests/corelib_2/reg_exp4_test.dart b/tests/corelib_2/reg_exp4_test.dart deleted file mode 100644 index eee1e9c98b0..00000000000 --- a/tests/corelib_2/reg_exp4_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// 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 test for testing regular expressions in Dart. - -// @dart = 2.9 - -// [NNBD non-migrated] Note: This test is specific to legacy mode and -// deliberately does not have a counter-part in corelib/. - -import "package:expect/expect.dart"; - -main() { - Expect.throwsArgumentError(() => new RegExp(null)); - Expect.throwsArgumentError(() => new RegExp(r"^\w+$").hasMatch(null)); - Expect.throwsArgumentError(() => new RegExp(r"^\w+$").firstMatch(null)); - Expect.throwsArgumentError(() => new RegExp(r"^\w+$").allMatches(null)); - Expect.throwsArgumentError(() => new RegExp(r"^\w+$").stringMatch(null)); -} diff --git a/tests/corelib_2/reg_exp5_test.dart b/tests/corelib_2/reg_exp5_test.dart deleted file mode 100644 index b6739d7aea1..00000000000 --- a/tests/corelib_2/reg_exp5_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// 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 test for testing regular expressions in Dart. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - String str = ""; - try { - RegExp ex = new RegExp(str); - } catch (e) { - if (!(e is ArgumentError)) { - Expect.fail("Expected: ArgumentError got: ${e}"); - } - } - Expect.isFalse(new RegExp(r"^\w+$").hasMatch(str)); - Match fm = new RegExp(r"^\w+$").firstMatch(str); - Expect.equals(null, fm); - - Iterable am = new RegExp(r"^\w+$").allMatches(str); - Expect.isFalse(am.iterator.moveNext()); - - Expect.equals(null, new RegExp(r"^\w+$").stringMatch(str)); -} diff --git a/tests/corelib_2/reg_exp_all_matches_test.dart b/tests/corelib_2/reg_exp_all_matches_test.dart deleted file mode 100644 index bbef4f27426..00000000000 --- a/tests/corelib_2/reg_exp_all_matches_test.dart +++ /dev/null @@ -1,121 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Dart test program for RegExp.allMatches. - -class RegExpAllMatchesTest { - static testIterator() { - var matches = new RegExp("foo").allMatches("foo foo"); - Iterator it = matches.iterator; - Expect.isNull(it.current); - Expect.isTrue(it.moveNext()); - Expect.equals('foo', it.current.group(0)); - Expect.isTrue(it.moveNext()); - Expect.equals('foo', it.current.group(0)); - Expect.isFalse(it.moveNext()); - - // Run two iterators over the same results. - it = matches.iterator; - Iterator it2 = matches.iterator; - Expect.isTrue(it.moveNext()); - Expect.isTrue(it2.moveNext()); - Expect.equals('foo', it.current.group(0)); - Expect.equals('foo', it2.current.group(0)); - Expect.isTrue(it.moveNext()); - Expect.isTrue(it2.moveNext()); - Expect.equals('foo', it.current.group(0)); - Expect.equals('foo', it2.current.group(0)); - Expect.equals(false, it.moveNext()); - Expect.equals(false, it2.moveNext()); - } - - static testForEach() { - var matches = new RegExp("foo").allMatches("foo foo"); - var strbuf = new StringBuffer(); - matches.forEach((Match m) { - strbuf.write(m.group(0)); - }); - Expect.equals("foofoo", strbuf.toString()); - } - - static testMap() { - var matches = new RegExp("foo?").allMatches("foo fo foo fo"); - var mapped = matches.map((Match m) => "${m.group(0)}bar"); - Expect.equals(4, mapped.length); - var strbuf = new StringBuffer(); - for (String s in mapped) { - strbuf.write(s); - } - Expect.equals("foobarfobarfoobarfobar", strbuf.toString()); - } - - static testFilter() { - var matches = new RegExp("foo?").allMatches("foo fo foo fo"); - var filtered = matches.where((Match m) { - return m.group(0) == 'foo'; - }); - Expect.equals(2, filtered.length); - var strbuf = new StringBuffer(); - for (Match m in filtered) { - strbuf.write(m.group(0)); - } - Expect.equals("foofoo", strbuf.toString()); - } - - static testEvery() { - var matches = new RegExp("foo?").allMatches("foo fo foo fo"); - Expect.equals(true, matches.every((Match m) { - return m.group(0).startsWith("fo"); - })); - Expect.equals(false, matches.every((Match m) { - return m.group(0).startsWith("foo"); - })); - } - - static testSome() { - var matches = new RegExp("foo?").allMatches("foo fo foo fo"); - Expect.equals(true, matches.any((Match m) { - return m.group(0).startsWith("fo"); - })); - Expect.equals(true, matches.any((Match m) { - return m.group(0).startsWith("foo"); - })); - Expect.equals(false, matches.any((Match m) { - return m.group(0).startsWith("fooo"); - })); - } - - static testIsEmpty() { - var matches = new RegExp("foo?").allMatches("foo fo foo fo"); - Expect.equals(false, matches.isEmpty); - matches = new RegExp("fooo").allMatches("foo fo foo fo"); - Expect.equals(true, matches.isEmpty); - } - - static testGetCount() { - var matches = new RegExp("foo?").allMatches("foo fo foo fo"); - Expect.equals(4, matches.length); - matches = new RegExp("fooo").allMatches("foo fo foo fo"); - Expect.equals(0, matches.length); - } - - static testMain() { - testIterator(); - testForEach(); - testMap(); - testFilter(); - testEvery(); - testSome(); - testIsEmpty(); - testGetCount(); - } -} - -main() { - RegExpAllMatchesTest.testMain(); -} diff --git a/tests/corelib_2/reg_exp_cache_test.dart b/tests/corelib_2/reg_exp_cache_test.dart deleted file mode 100644 index 66765654980..00000000000 --- a/tests/corelib_2/reg_exp_cache_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2017, 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 - -// Runs several similar regexps in a loop to see if an internal cache works (at -// least in easy conditions). - -import "package:expect/expect.dart"; - -void main() { - for (int j = 1; j < 50; j += 4) { - for (int i = 0; i < 15 * j; i++) { - var regExp = new RegExp("foo$i"); - var match = regExp.firstMatch("foo$i"); - Expect.isNotNull(match); - Expect.equals("foo$i", match[0]); - } - } -} diff --git a/tests/corelib_2/reg_exp_first_match_test.dart b/tests/corelib_2/reg_exp_first_match_test.dart deleted file mode 100644 index 48d6a31ef68..00000000000 --- a/tests/corelib_2/reg_exp_first_match_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Dart test program for RegExp.firstMatch. - -class RegExpFirstMatchTest { - static testMain() { - Expect.equals('cat', new RegExp("(\\w+)").firstMatch("cat dog")[0]); - Expect.equals(null, new RegExp("foo").firstMatch("bar")); - } -} - -main() { - RegExpFirstMatchTest.testMain(); -} diff --git a/tests/corelib_2/reg_exp_group_test.dart b/tests/corelib_2/reg_exp_group_test.dart deleted file mode 100644 index fe03c9f0b68..00000000000 --- a/tests/corelib_2/reg_exp_group_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Dart test program for RegExp.group. - -class RegExpGroupTest { - static testMain() { - var match = new RegExp("(a(b)((c|de)+))").firstMatch("abcde"); - Expect.equals('abcde', match.group(0)); - Expect.equals('abcde', match.group(1)); - Expect.equals('b', match.group(2)); - Expect.equals('cde', match[3]); - Expect.equals('de', match[4]); - } -} - -main() { - RegExpGroupTest.testMain(); -} diff --git a/tests/corelib_2/reg_exp_groups_test.dart b/tests/corelib_2/reg_exp_groups_test.dart deleted file mode 100644 index a6d4fbf8e08..00000000000 --- a/tests/corelib_2/reg_exp_groups_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Dart test program for RegExp.groups. - -class RegExpGroupsTest { - static testMain() { - var match = new RegExp("(a(b)((c|de)+))").firstMatch("abcde"); - var groups = match.groups([0, 4, 2, 3]); - Expect.equals('abcde', groups[0]); - Expect.equals('de', groups[1]); - Expect.equals('b', groups[2]); - Expect.equals('cde', groups[3]); - } -} - -main() { - RegExpGroupsTest.testMain(); -} diff --git a/tests/corelib_2/reg_exp_has_match_test.dart b/tests/corelib_2/reg_exp_has_match_test.dart deleted file mode 100644 index e11abfabceb..00000000000 --- a/tests/corelib_2/reg_exp_has_match_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Dart test program for RegExp.hasMatch. - -class RegExpHasMatchTest { - static testMain() { - Expect.equals(false, new RegExp("bar").hasMatch("foo")); - Expect.equals(true, new RegExp("bar|foo").hasMatch("foo")); - Expect.equals(true, new RegExp("o+").hasMatch("foo")); - } -} - -main() { - RegExpHasMatchTest.testMain(); -} diff --git a/tests/corelib_2/reg_exp_pattern_test.dart b/tests/corelib_2/reg_exp_pattern_test.dart deleted file mode 100644 index 5fa672a7fe5..00000000000 --- a/tests/corelib_2/reg_exp_pattern_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2014, 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 test for testing regular expressions in Dart. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Regression test for http://dartbug.com/17998 - -main() { - for (var s in [ - r"a", - r"a|b", - r"(?:)", - r"^", - r"$", - r"^$", - r"$^", - r"", - r"\\", - r"/", - r"[^]", - "\x00", - ]) { - Expect.equals(s, new RegExp(s).pattern); - } -} diff --git a/tests/corelib_2/reg_exp_receive_port_test.dart b/tests/corelib_2/reg_exp_receive_port_test.dart deleted file mode 100644 index a63f289b867..00000000000 --- a/tests/corelib_2/reg_exp_receive_port_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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. -// -// Checks that you can send and receive regex in a message. - -import "dart:async"; -import "dart:isolate"; - -import "package:async_helper/async_helper.dart"; -import "package:expect/expect.dart"; - -main(args) async { - asyncStart(); - final rp = ReceivePort(); - final r = RegExp('b'); - final match = r.firstMatch('bb'); - Expect.equals(match != null ? match.start : null, 0); - rp.sendPort.send(r); - - final si = StreamIterator(rp); - await si.moveNext(); - final x = si.current as RegExp; - final matchX = x.firstMatch('bb'); - Expect.equals(matchX != null ? matchX.start : null, 0); - rp.close(); - asyncEnd(); -} diff --git a/tests/corelib_2/reg_exp_start_end_test.dart b/tests/corelib_2/reg_exp_start_end_test.dart deleted file mode 100644 index f9c1b377887..00000000000 --- a/tests/corelib_2/reg_exp_start_end_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -main() { - var matches = new RegExp("(a(b)((c|de)+))").allMatches("abcde abcde abcde"); - var it = matches.iterator; - int start = 0; - int end = 5; - while (it.moveNext()) { - Match match = it.current; - Expect.equals(start, match.start); - Expect.equals(end, match.end); - start += 6; - end += 6; - } -} diff --git a/tests/corelib_2/reg_exp_string_match_test.dart b/tests/corelib_2/reg_exp_string_match_test.dart deleted file mode 100644 index b56173eaabc..00000000000 --- a/tests/corelib_2/reg_exp_string_match_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Dart test program for RegExp.stringMatch. - -class RegExpStringMatchTest { - static testMain() { - Expect.equals('cat', new RegExp("(\\w+)").stringMatch("cat dog")); - Expect.equals(null, new RegExp("foo").stringMatch("bar")); - } -} - -main() { - RegExpStringMatchTest.testMain(); -} diff --git a/tests/corelib_2/regexp/UC16_test.dart b/tests/corelib_2/regexp/UC16_test.dart deleted file mode 100644 index 413da283299..00000000000 --- a/tests/corelib_2/regexp/UC16_test.dart +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2008 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - // UC16 - // Characters used: - // "\u03a3\u03c2\u03c3\u039b\u03bb" - Sigma, final sigma, sigma, Lambda, - // lambda - shouldBe( - new RegExp(r"x(.)\1x", caseSensitive: false).firstMatch("x\u03a3\u03c3x"), - ["x\u03a3\u03c3x", "\u03a3"], - "backref-UC16"); - assertFalse( - new RegExp(r"x(...)\1", caseSensitive: false) - .hasMatch("x\u03a3\u03c2\u03c3\u03c2\u03c3"), - "\1 ASCII, string short"); - assertTrue( - new RegExp(r"\u03a3((?:))\1\1x", caseSensitive: false) - .hasMatch("\u03c2x"), - "backref-UC16-empty"); - assertTrue( - new RegExp(r"x(?:...|(...))\1x", caseSensitive: false) - .hasMatch("x\u03a3\u03c2\u03c3x"), - "backref-UC16-uncaptured"); - assertTrue( - new RegExp(r"x(?:...|(...))\1x", caseSensitive: false) - .hasMatch("x\u03c2\u03c3\u039b\u03a3\u03c2\u03bbx"), - "backref-UC16-backtrack"); - var longUC16String = - "x\u03a3\u03c2\u039b\u03c2\u03c3\u03bb\u03c3\u03a3\u03bb"; - shouldBe( - new RegExp(r"x(...)\1\1", caseSensitive: false) - .firstMatch(longUC16String), - [longUC16String, longUC16String.substring(1, 4)], - "backref-UC16-twice"); - - assertFalse(new RegExp(r"\xc1", caseSensitive: false).hasMatch('fooA'), - "quickcheck-uc16-pattern-ascii-subject"); - assertFalse(new RegExp(r"[\xe9]").hasMatch('i'), - "charclass-uc16-pattern-ascii-subject"); - assertFalse(new RegExp(r"\u5e74|\u6708").hasMatch('t'), - "alternation-uc16-pattern-ascii-subject"); -} diff --git a/tests/corelib_2/regexp/alternative-length-miscalculation_test.dart b/tests/corelib_2/regexp/alternative-length-miscalculation_test.dart deleted file mode 100644 index 9b6b9c8ad59..00000000000 --- a/tests/corelib_2/regexp/alternative-length-miscalculation_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - "This page tests for length miscalculations in regular expression processing."); - - var re = new RegExp(r"b|[^b]"); - assertEquals('a'.indexOf(re, 1), -1); - - var re2 = new RegExp(r"[^a]|ab"); - shouldBeFalse(re2.hasMatch('')); -} diff --git a/tests/corelib_2/regexp/alternatives_test.dart b/tests/corelib_2/regexp/alternatives_test.dart deleted file mode 100644 index c98bfbda6f3..00000000000 --- a/tests/corelib_2/regexp/alternatives_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description('Test regular expression processing with alternatives.'); - - var s1 = "

content

"; - shouldBe(firstMatch(s1, new RegExp(r"<((\\/([^>]+)>)|(([^>]+)>))")), - ["

", "p>", null, null, "p>", "p"]); - shouldBe(firstMatch(s1, new RegExp(r"<((ABC>)|(\\/([^>]+)>)|(([^>]+)>))")), - ["

", "p>", null, null, null, "p>", "p"]); - shouldBe(firstMatch(s1, new RegExp(r"<(a|\\/p|.+?)>")), ["

", "p"]); - - // Force YARR to use Interpreter by using iterative parentheses - shouldBe(firstMatch(s1, new RegExp(r"<((\\/([^>]+)>)|((([^>])+)>))")), - ["

", "p>", null, null, "p>", "p", "p"]); - shouldBe(firstMatch(s1, new RegExp(r"<((ABC>)|(\\/([^>]+)>)|((([^>])+)>))")), - ["

", "p>", null, null, null, "p>", "p", "p"]); - shouldBe(firstMatch(s1, new RegExp(r"<(a|\\/p|(.)+?)>")), ["

", "p", "p"]); - - // Force YARR to use Interpreter by using backreference - var s2 = "

p

"; - shouldBe(firstMatch(s2, new RegExp(r"<((\\/([^>]+)>)|(([^>]+)>))\5")), - ["

p", "p>", null, null, "p>", "p"]); - shouldBe(firstMatch(s2, new RegExp(r"<((ABC>)|(\\/([^>]+)>)|(([^>]+)>))\6")), - ["

p", "p>", null, null, null, "p>", "p"]); - shouldBe(firstMatch(s2, new RegExp(r"<(a|\\/p|.+?)>\1")), ["

p", "p"]); -} diff --git a/tests/corelib_2/regexp/ascii-regexp-subject_test.dart b/tests/corelib_2/regexp/ascii-regexp-subject_test.dart deleted file mode 100644 index 80cb099d0ee..00000000000 --- a/tests/corelib_2/regexp/ascii-regexp-subject_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2008 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -/** -* @fileoverview Check that an initial ^ will result in a faster match fail. -*/ - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - var s = "foo"; - var i; - - for (i = 0; i < 18; i++) { - s = s + s; - } - - dynamic repeatRegexp(re) { - for (i = 0; i < 1000; i++) { - re.hasMatch(s); - } - } - - repeatRegexp(new RegExp(r"^bar")); - repeatRegexp(new RegExp(r"^foo|^bar|^baz")); - repeatRegexp(new RegExp(r"(^bar)")); - repeatRegexp(new RegExp(r"(?=^bar)\w+")); -} diff --git a/tests/corelib_2/regexp/assertion_test.dart b/tests/corelib_2/regexp/assertion_test.dart deleted file mode 100644 index 10212dd482b..00000000000 --- a/tests/corelib_2/regexp/assertion_test.dart +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description("This page tests handling of parenthetical assertions."); - - var regex1 = new RegExp(r"(x)(?=\1)x"); - shouldBe(regex1.firstMatch('xx'), ['xx', 'x']); - - var regex2 = new RegExp(r"(.*?)a(?!(a+)b\2c)\2(.*)"); - shouldBe(regex2.firstMatch('baaabaac'), ['baaabaac', 'ba', null, 'abaac']); - - var regex3 = new RegExp(r"(?=(a+?))(\1ab)"); - shouldBe(regex3.firstMatch('aaab'), ['aab', 'a', 'aab']); - - var regex4 = new RegExp(r"(?=(a+?))(\1ab)"); - shouldBe(regex4.firstMatch('aaab'), ['aab', 'a', 'aab']); - - var regex5 = new RegExp(r"^P([1-6])(?=\1)([1-6])$"); - shouldBe(regex5.firstMatch('P11'), ['P11', '1', '1']); - - var regex6 = new RegExp(r"(([a-c])b*?\2)*"); - shouldBe(regex6.firstMatch('ababbbcbc'), ['ababb', 'bb', 'b']); - - var regex7 = new RegExp(r"(x)(?=x)x"); - shouldBe(regex7.firstMatch('xx'), ['xx', 'x']); - - var regex8 = new RegExp(r"(x)(\1)"); - shouldBe(regex8.firstMatch('xx'), ['xx', 'x', 'x']); - - var regex9 = new RegExp(r"(x)(?=\1)x"); - shouldBeNull(regex9.firstMatch('xy')); - - var regex10 = new RegExp(r"(x)(?=x)x"); - shouldBeNull(regex10.firstMatch('xy')); - - var regex11 = new RegExp(r"(x)(\1)"); - shouldBeNull(regex11.firstMatch('xy')); - - var regex12 = new RegExp(r"(x)(?=\1)x"); - shouldBeNull(regex12.firstMatch('x')); - shouldBe(regex12.firstMatch('xx'), ['xx', 'x']); - shouldBe(regex12.firstMatch('xxy'), ['xx', 'x']); - - var regex13 = new RegExp(r"(x)zzz(?=\1)x"); - shouldBe(regex13.firstMatch('xzzzx'), ['xzzzx', 'x']); - shouldBe(regex13.firstMatch('xzzzxy'), ['xzzzx', 'x']); - - var regex14 = new RegExp(r"(a)\1(?=(b*c))bc"); - shouldBe(regex14.firstMatch('aabc'), ['aabc', 'a', 'bc']); - shouldBe(regex14.firstMatch('aabcx'), ['aabc', 'a', 'bc']); - - var regex15 = new RegExp(r"(a)a(?=(b*c))bc"); - shouldBe(regex15.firstMatch('aabc'), ['aabc', 'a', 'bc']); - shouldBe(regex15.firstMatch('aabcx'), ['aabc', 'a', 'bc']); - - var regex16 = new RegExp(r"a(?=(b*c))bc"); - shouldBeNull(regex16.firstMatch('ab')); - shouldBe(regex16.firstMatch('abc'), ['abc', 'bc']); - - var regex17 = new RegExp(r"(?=((?:ab)*))a"); - shouldBe(regex17.firstMatch('ab'), ['a', 'ab']); - shouldBe(regex17.firstMatch('abc'), ['a', 'ab']); - - var regex18 = new RegExp(r"(?=((?:xx)*))x"); - shouldBe(regex18.firstMatch('x'), ['x', '']); - shouldBe(regex18.firstMatch('xx'), ['x', 'xx']); - shouldBe(regex18.firstMatch('xxx'), ['x', 'xx']); - - var regex19 = new RegExp(r"(?=((xx)*))x"); - shouldBe(regex19.firstMatch('x'), ['x', '', null]); - shouldBe(regex19.firstMatch('xx'), ['x', 'xx', 'xx']); - shouldBe(regex19.firstMatch('xxx'), ['x', 'xx', 'xx']); - - var regex20 = new RegExp(r"(?=(xx))+x"); - shouldBeNull(regex20.firstMatch('x')); - shouldBe(regex20.firstMatch('xx'), ['x', 'xx']); - shouldBe(regex20.firstMatch('xxx'), ['x', 'xx']); - - var regex21 = new RegExp(r"(?=a+b)aab"); - shouldBe(regex21.firstMatch('aab'), ['aab']); - - var regex22 = new RegExp( - r"(?!(u|m{0,}g+)u{1,}|2{2,}!1%n|(?!K|(?=y)|(?=ip))+?)(?=(?=(((?:7))*?)*?))p", - multiLine: true); - shouldBeNull(regex22.firstMatch('55up')); - - var regex23 = new RegExp(r"(?=(a)b|c?)()*d"); - shouldBeNull(regex23.firstMatch('ax')); - - var regex24 = new RegExp(r"(?=a|b?)c"); - shouldBeNull(regex24.firstMatch('x')); -} diff --git a/tests/corelib_2/regexp/backreferences_test.dart b/tests/corelib_2/regexp/backreferences_test.dart deleted file mode 100644 index 9aa7f23df70..00000000000 --- a/tests/corelib_2/regexp/backreferences_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - "Test to ensure correct behaviour when using backreferences in a RegExp"); - - shouldBeTrue(new RegExp(r"(...)\1$").hasMatch('abcabc')); - shouldBeFalse(new RegExp(r"(...)\1$").hasMatch('abcdef')); - shouldBeFalse(new RegExp(r"(...)\2$").hasMatch('abcabc')); - shouldBeFalse(new RegExp(r"(...)\2$").hasMatch('abc')); - shouldBeTrue(new RegExp(r"\1(...)$").hasMatch('abcabc')); - shouldBeTrue(new RegExp(r"\1(...)$").hasMatch('abcdef')); - shouldBeFalse(new RegExp(r"\2(...)$").hasMatch('abcabc')); - shouldBeFalse(new RegExp(r"\2(...)$").hasMatch('abc')); - shouldBeTrue(new RegExp(r"\1?(...)$").hasMatch('abc')); - shouldBeTrue(new RegExp(r"\1?(...)$").hasMatch('abc')); - - var re = new RegExp(r"[^b]*((..)|(\2))+Sz", caseSensitive: false); - - shouldBeFalse(re.hasMatch('axabcd')); - shouldBeTrue(re.hasMatch('axabcsz')); -} diff --git a/tests/corelib_2/regexp/bol-with-multiline_test.dart b/tests/corelib_2/regexp/bol-with-multiline_test.dart deleted file mode 100644 index 20d287e1a8d..00000000000 --- a/tests/corelib_2/regexp/bol-with-multiline_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - 'Test for beginning of line (BOL or ^) matching in a multiline string'); - - var s = "aced\nabc"; - shouldBeNull(firstMatch(s, new RegExp(r"^abc"))); - shouldBe(firstMatch(s, new RegExp(r"^abc", multiLine: true)), ["abc"]); - shouldBeNull(firstMatch(s, new RegExp(r"(^|X)abc"))); - shouldBe( - firstMatch(s, new RegExp(r"(^|X)abc", multiLine: true)), ["abc", ""]); - shouldBe( - firstMatch(s, new RegExp(r"(^a|Xa)bc", multiLine: true)), ["abc", "a"]); -} diff --git a/tests/corelib_2/regexp/bol_test.dart b/tests/corelib_2/regexp/bol_test.dart deleted file mode 100644 index 8cfc530f811..00000000000 --- a/tests/corelib_2/regexp/bol_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description('Test for beginning of line (BOL or ^) matching'); - - var s = "abc123def456xyzabc789abc999"; - shouldBeNull(firstMatch(s, new RegExp(r"^notHere"))); - shouldBe(firstMatch(s, new RegExp(r"^abc")), ["abc"]); - shouldBe(firstMatch(s, new RegExp(r"(^|X)abc")), ["abc", ""]); - shouldBe(firstMatch(s, new RegExp(r"^longer|123")), ["123"]); - shouldBe(firstMatch(s, new RegExp(r"(^abc|c)123")), ["abc123", "abc"]); - shouldBe(firstMatch(s, new RegExp(r"(c|^abc)123")), ["abc123", "abc"]); - shouldBe(firstMatch(s, new RegExp(r"(^ab|abc)123")), ["abc123", "abc"]); - shouldBe(firstMatch(s, new RegExp(r"(bc|^abc)([0-9]*)a")), - ["bc789a", "bc", "789"]); - shouldBeNull(new RegExp(r"(?:(Y)X)|(X)").firstMatch("abc")); - shouldBeNull(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("abc")); - shouldBeNull(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("abcd")); - shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("Xabcd"), ["X", null]); - shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("aXbcd"), ["X", "X"]); - shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("abXcd"), ["X", "X"]); - shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("abcXd"), ["X", "X"]); - shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("abcdX"), ["X", "X"]); - shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("YXabcd"), ["YX", null]); - shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("aYXbcd"), ["YX", null]); - shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("abYXcd"), ["YX", null]); - shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("abcYXd"), ["YX", null]); - shouldBe(new RegExp(r"(?:(?:^|Y)X)|(X)").firstMatch("abcdYX"), ["YX", null]); -} diff --git a/tests/corelib_2/regexp/capture-3_test.dart b/tests/corelib_2/regexp/capture-3_test.dart deleted file mode 100644 index ee26d42d604..00000000000 --- a/tests/corelib_2/regexp/capture-3_test.dart +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2009 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - dynamic oneMatch(re) { - assertEquals("acd", "abcd".replaceAll(re, "")); - } - - oneMatch(new RegExp(r"b")); - oneMatch(new RegExp(r"b")); - - assertEquals("acdacd", "abcdabcd".replaceAll(new RegExp(r"b"), "")); - - dynamic captureMatch(re) { - var match = firstMatch("abcd", re); - assertEquals("b", match.group(1)); - assertEquals("c", match.group(2)); - } - - captureMatch(new RegExp(r"(b)(c)")); - captureMatch(new RegExp(r"(b)(c)")); - - // A test that initially does a zero width match, but later does a non-zero - // width match. - var a = "foo bar baz".replaceAll(new RegExp(r"^|bar"), ""); - assertEquals("foo baz", a); - - a = "foo bar baz".replaceAll(new RegExp(r"^|bar"), "*"); - assertEquals("*foo * baz", a); - - // We test FilterASCII using regexps that will backtrack forever. Since - // a regexp with a non-ASCII character in it can never match an ASCII - // string we can test that the relevant node is removed by verifying that - // there is no hang. - dynamic NoHang(re) { - firstMatch("This is an ASCII string that could take forever", re); - } - - NoHang(new RegExp( - r"(((.*)*)*x)Ā")); // Continuation after loop is filtered, so is loop. - NoHang(new RegExp(r"(((.*)*)*Ā)foo")); // Body of loop filtered. - NoHang(new RegExp( - r"Ā(((.*)*)*x)")); // Everything after a filtered character is filtered. - NoHang(new RegExp( - r"(((.*)*)*x)Ā")); // Everything before a filtered character is filtered. - NoHang(new RegExp( - r"[ćăĀ](((.*)*)*x)")); // Everything after a filtered class is filtered. - NoHang(new RegExp( - r"(((.*)*)*x)[ćăĀ]")); // Everything before a filtered class is filtered. - NoHang(new RegExp(r"[^\x00-\xff](((.*)*)*x)")); // After negated class. - NoHang(new RegExp(r"(((.*)*)*x)[^\x00-\xff]")); // Before negated class. - NoHang(new RegExp(r"(?!(((.*)*)*x)Ā)foo")); // Negative lookahead is filtered. - NoHang(new RegExp( - r"(?!(((.*)*)*x))Ā")); // Continuation branch of negative lookahead. - NoHang(new RegExp(r"(?=(((.*)*)*x)Ā)foo")); // Positive lookahead is filtered. - NoHang(new RegExp( - r"(?=(((.*)*)*x))Ā")); // Continuation branch of positive lookahead. - NoHang(new RegExp( - r"(?=Ā)(((.*)*)*x)")); // Positive lookahead also prunes continuation. - NoHang(new RegExp( - r"(æ|ø|Ā)(((.*)*)*x)")); // All branches of alternation are filtered. - NoHang(new RegExp(r"(a|b|(((.*)*)*x))Ā")); // 1 out of 3 branches pruned. - NoHang(new RegExp( - r"(a|(((.*)*)*x)ă|(((.*)*)*x)Ā)")); // 2 out of 3 branches pruned. - - var s = "Don't prune based on a repetition of length 0"; - assertEquals(null, firstMatch(s, new RegExp(r"å{1,1}prune"))); - assertEquals("prune", (firstMatch(s, new RegExp(r"å{0,0}prune"))[0])); - - // Some very deep regexps where FilterASCII gives up in order not to make the - // stack overflow. - var regex6 = new RegExp(r"a*\u0100*\w"); - var input0 = "a"; - regex6.firstMatch(input0); - - var re = "\u0100*\\w"; - - for (var i = 0; i < 200; i++) re = "a*" + re; - - var regex7 = new RegExp(re); - regex7.firstMatch(input0); - - var regex8 = new RegExp(re, caseSensitive: false); - regex8.firstMatch(input0); - - re = "[\u0100]*\\w"; - for (var i = 0; i < 200; i++) re = "a*" + re; - - var regex9 = new RegExp(re); - regex9.firstMatch(input0); - - var regex10 = new RegExp(re, caseSensitive: false); - regex10.firstMatch(input0); - - var regex11 = new RegExp(r"^(?:[^\u0000-\u0080]|[0-9a-z?,.!&\s#()])+$", - caseSensitive: false); - regex11.firstMatch(input0); - - var regex12 = new RegExp( - r"u(\xf0{8}?\D*?|( ? !)$h??(|)*?(||)+?\6((?:\W\B|--\d-*-|)?$){0, }?|^Y( ? !1)\d+)+a"); - regex12.firstMatch(""); -} diff --git a/tests/corelib_2/regexp/capture_test.dart b/tests/corelib_2/regexp/capture_test.dart deleted file mode 100644 index f0020ae1a20..00000000000 --- a/tests/corelib_2/regexp/capture_test.dart +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2009 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - // Tests from http://blog.stevenlevithan.com/archives/npcg-javascript - - assertEquals(true, new RegExp(r"(x)?\1y").hasMatch("y")); - shouldBe(new RegExp(r"(x)?\1y").firstMatch("y"), ["y", null]); - shouldBe(new RegExp(r"(x)?y").firstMatch("y"), ["y", null]); - shouldBe(firstMatch("y", new RegExp(r"(x)?\1y")), ["y", null]); - shouldBe(firstMatch("y", new RegExp(r"(x)?y")), ["y", null]); - shouldBe(firstMatch("y", new RegExp(r"(x)?\1y")), ["y", null]); - Expect.listEquals(["", ""], "y".split(new RegExp(r"(x)?\1y"))); - Expect.listEquals(["", ""], "y".split(new RegExp(r"(x)?y"))); - assertEquals(0, "y".indexOf(new RegExp(r"(x)?\1y"))); - assertEquals("z", "y".replaceAll(new RegExp(r"(x)?\1y"), "z")); - - // See https://bugzilla.mozilla.org/show_bug.cgi?id=476146 - shouldBe(new RegExp(r"^(b+|a){1,2}?bc").firstMatch("bbc"), ["bbc", "b"]); - shouldBe( - new RegExp(r"((\3|b)\2(a)){2,}").firstMatch("bbaababbabaaaaabbaaaabba"), - ["bbaa", "a", "", "a"]); - - // From crbug.com/128821 - don't hang: - firstMatch( - "", - new RegExp( - r"((a|i|A|I|u|o|U|O)(s|c|b|c|d|f|g|h|j|k|l|m|n|p|q|r|s|t|v|w|x|y|z|B|C|D|F|G|H|J|K|L|M|N|P|Q|R|S|T|V|W|X|Y|Z)*) de\/da([.,!?\s]|$)")); -} diff --git a/tests/corelib_2/regexp/captures_test.dart b/tests/corelib_2/regexp/captures_test.dart deleted file mode 100644 index 9e4c896f443..00000000000 --- a/tests/corelib_2/regexp/captures_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2009 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - var re = new RegExp( - r"^(((N({)?)|(R)|(U)|(V)|(B)|(H)|(n((n)|(r)|(v)|(h))?)|(r(r)?)|(v)|(b((n)|(b))?)|(h))|((Y)|(A)|(E)|(o(u)?)|(p(u)?)|(q(u)?)|(s)|(t)|(u)|(w)|(x(u)?)|(y)|(z)|(a((T)|(A)|(L))?)|(c)|(e)|(f(u)?)|(g(u)?)|(i)|(j)|(l)|(m(u)?)))+"); - var str = "Avtnennan gunzvmu pubExnY nEvln vaTxh rmuhguhaTxnY"; - assertTrue(re.hasMatch(str)); -} diff --git a/tests/corelib_2/regexp/char-insensitive_test.dart b/tests/corelib_2/regexp/char-insensitive_test.dart deleted file mode 100644 index 38fe63ec1a0..00000000000 --- a/tests/corelib_2/regexp/char-insensitive_test.dart +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - "This test checks the case-insensitive matching of character literals."); - - shouldBeTrue(new RegExp(r"\u00E5", caseSensitive: false) - .hasMatch('new RegExp(r"\u00E5")')); - shouldBeTrue(new RegExp(r"\u00E5", caseSensitive: false) - .hasMatch('new RegExp(r"\u00C5")')); - shouldBeTrue(new RegExp(r"\u00C5", caseSensitive: false) - .hasMatch('new RegExp(r"\u00E5")')); - shouldBeTrue(new RegExp(r"\u00C5", caseSensitive: false) - .hasMatch('new RegExp(r"\u00C5")')); - - shouldBeFalse(new RegExp(r"\u00E5", caseSensitive: false).hasMatch('P')); - shouldBeFalse(new RegExp(r"\u00E5", caseSensitive: false).hasMatch('PASS')); - shouldBeFalse(new RegExp(r"\u00C5", caseSensitive: false).hasMatch('P')); - shouldBeFalse(new RegExp(r"\u00C5", caseSensitive: false).hasMatch('PASS')); - - shouldBeNull(firstMatch('PASS', new RegExp(r"\u00C5", caseSensitive: false))); - shouldBeNull(firstMatch('PASS', new RegExp(r"\u00C5", caseSensitive: false))); - - assertEquals( - 'PAS\u00E5'.replaceAll(new RegExp(r"\u00E5", caseSensitive: false), 'S'), - 'PASS'); - assertEquals( - 'PAS\u00E5'.replaceAll(new RegExp(r"\u00C5", caseSensitive: false), 'S'), - 'PASS'); - assertEquals( - 'PAS\u00C5'.replaceAll(new RegExp(r"\u00E5", caseSensitive: false), 'S'), - 'PASS'); - assertEquals( - 'PAS\u00C5'.replaceAll(new RegExp(r"\u00C5", caseSensitive: false), 'S'), - 'PASS'); - - assertEquals( - 'PASS'.replaceAll(new RegExp(r"\u00E5", caseSensitive: false), '%C3%A5'), - 'PASS'); - assertEquals( - 'PASS'.replaceAll(new RegExp(r"\u00C5", caseSensitive: false), '%C3%A5'), - 'PASS'); -} diff --git a/tests/corelib_2/regexp/character-match-out-of-order_test.dart b/tests/corelib_2/regexp/character-match-out-of-order_test.dart deleted file mode 100644 index 65269f8fbb4..00000000000 --- a/tests/corelib_2/regexp/character-match-out-of-order_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - 'Test to ensure RegExp generates single character matches in the correct order'); - - shouldBe(new RegExp(r"[\w']+").firstMatch("'_'"), ["'_'"]); -} diff --git a/tests/corelib_2/regexp/compile-crash_test.dart b/tests/corelib_2/regexp/compile-crash_test.dart deleted file mode 100644 index b677a24f4c8..00000000000 --- a/tests/corelib_2/regexp/compile-crash_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - 'Test regexp compiling to make sure it doens\'t crash like bug 16127'); - - shouldBeTrue(new RegExp(r"\)[;\s]+") != null); - assertThrows(() => new RegExp(r"[")); - assertThrows(() => new RegExp(r"[a")); - assertThrows(() => new RegExp(r"[-")); - shouldBeTrue(new RegExp(r"(a)\1") != null); - shouldBeTrue(new RegExp(r"(a)\1{1,3}") != null); -} diff --git a/tests/corelib_2/regexp/compile_test.dart b/tests/corelib_2/regexp/compile_test.dart deleted file mode 100644 index bd55c97afe4..00000000000 --- a/tests/corelib_2/regexp/compile_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description('Test RegExp.compile method.'); - - var re = new RegExp("a", caseSensitive: false); - shouldBeTrue(re.hasMatch('A')); - shouldBeFalse(re.isMultiLine); - shouldBeFalse(re.isCaseSensitive); - - re = new RegExp("a"); - shouldBeFalse(re.isMultiLine); - shouldBeTrue(re.isCaseSensitive); - shouldBeFalse(re.hasMatch('A')); - - assertThrows(() => new RegExp('+')); -} diff --git a/tests/corelib_2/regexp/constructor_test.dart b/tests/corelib_2/regexp/constructor_test.dart deleted file mode 100644 index f562ae37e1c..00000000000 --- a/tests/corelib_2/regexp/constructor_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description("This test checks use of the regexp constructor."); - - var re = new RegExp(r"abc"); - - // We do not guarantee that the same regular expression will or will not be shared. - // shouldBeTrue(identical(re, new RegExp(r"abc"))); - // shouldBeTrue(identical(re, new RegExp(r"abc", caseSensitive: true, multiLine: false))); - - shouldBeFalse( - identical(re, new RegExp(r"abc", caseSensitive: false, multiLine: true))); - shouldBeFalse( - identical(re, new RegExp(r"abc", caseSensitive: true, multiLine: true))); - shouldBeFalse(identical( - re, new RegExp(r"abc", caseSensitive: false, multiLine: false))); -} diff --git a/tests/corelib_2/regexp/default_arguments_test.dart b/tests/corelib_2/regexp/default_arguments_test.dart deleted file mode 100644 index 71d959eb6bc..00000000000 --- a/tests/corelib_2/regexp/default_arguments_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2015, 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 - -// Test that `null` is interpreted as `false` when passed as argument to -// `caseSensitive` and `multiLine`. - -import 'package:expect/expect.dart'; - -main() { - testCaseSensitive(); - testMultiLine(); -} - -testCaseSensitive() { - var r1 = new RegExp('foo'); - var r2 = new RegExp('foo', caseSensitive: true); - var r3 = new RegExp('foo', caseSensitive: false); - var r4 = new RegExp('foo', caseSensitive: null); - Expect.isNull(r1.firstMatch('Foo'), "r1.firstMatch('Foo')"); - Expect.isNull(r2.firstMatch('Foo'), "r2.firstMatch('Foo')"); - Expect.isNotNull(r3.firstMatch('Foo'), "r3.firstMatch('Foo')"); - Expect.isNotNull(r4.firstMatch('Foo'), "r4.firstMatch('Foo')"); -} - -testMultiLine() { - var r1 = new RegExp(r'^foo$'); - var r2 = new RegExp(r'^foo$', multiLine: true); - var r3 = new RegExp(r'^foo$', multiLine: false); - var r4 = new RegExp(r'^foo$', multiLine: null); - Expect.isNull(r1.firstMatch('\nfoo\n'), "r1.firstMatch('\\nfoo\\n')"); - Expect.isNotNull(r2.firstMatch('\nfoo\n'), "r2.firstMatch('\\nfoo\\n')"); - Expect.isNull(r3.firstMatch('\nfoo\n'), "r3.firstMatch('\\nfoo\\n')"); - Expect.isNull(r4.firstMatch('\nfoo\n'), "r4.firstMatch('\\nfoo\\n')"); -} diff --git a/tests/corelib_2/regexp/dot-all_test.dart b/tests/corelib_2/regexp/dot-all_test.dart deleted file mode 100644 index 09d015108c2..00000000000 --- a/tests/corelib_2/regexp/dot-all_test.dart +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) 2019, the Dart project authors. All rights reserved. -// Copyright 2017 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -import 'v8_regexp_utils.dart'; - -void main() { - // The flags accessors. - var re = new RegExp(r".", dotAll: true); - assertTrue(re.isCaseSensitive); - assertFalse(re.isMultiLine); - assertFalse(re.isUnicode); - assertTrue(re.isDotAll); - - re = new RegExp(r".", - caseSensitive: false, multiLine: true, unicode: true, dotAll: true); - assertFalse(re.isCaseSensitive); - assertTrue(re.isMultiLine); - assertTrue(re.isUnicode); - assertTrue(re.isDotAll); - - re = new RegExp(r".", caseSensitive: false, multiLine: true, unicode: true); - assertFalse(re.isCaseSensitive); - assertTrue(re.isMultiLine); - assertTrue(re.isUnicode); - assertFalse(re.isDotAll); - - // Default '.' behavior. - re = new RegExp(r"^.$"); - assertTrue(re.hasMatch("a")); - assertTrue(re.hasMatch("3")); - assertTrue(re.hasMatch("π")); - assertTrue(re.hasMatch("\u2027")); - assertTrue(re.hasMatch("\u0085")); - assertTrue(re.hasMatch("\v")); - assertTrue(re.hasMatch("\f")); - assertTrue(re.hasMatch("\u180E")); - assertFalse(re.hasMatch("\u{10300}")); // Supplementary plane. - assertFalse(re.hasMatch("\n")); - assertFalse(re.hasMatch("\r")); - assertFalse(re.hasMatch("\u2028")); - assertFalse(re.hasMatch("\u2029")); - - // Default '.' behavior (unicode). - re = new RegExp(r"^.$", unicode: true); - assertTrue(re.hasMatch("a")); - assertTrue(re.hasMatch("3")); - assertTrue(re.hasMatch("π")); - assertTrue(re.hasMatch("\u2027")); - assertTrue(re.hasMatch("\u0085")); - assertTrue(re.hasMatch("\v")); - assertTrue(re.hasMatch("\f")); - assertTrue(re.hasMatch("\u180E")); - assertTrue(re.hasMatch("\u{10300}")); // Supplementary plane. - assertFalse(re.hasMatch("\n")); - assertFalse(re.hasMatch("\r")); - assertFalse(re.hasMatch("\u2028")); - assertFalse(re.hasMatch("\u2029")); - - // DotAll '.' behavior. - re = new RegExp(r"^.$", dotAll: true); - assertTrue(re.hasMatch("a")); - assertTrue(re.hasMatch("3")); - assertTrue(re.hasMatch("π")); - assertTrue(re.hasMatch("\u2027")); - assertTrue(re.hasMatch("\u0085")); - assertTrue(re.hasMatch("\v")); - assertTrue(re.hasMatch("\f")); - assertTrue(re.hasMatch("\u180E")); - assertFalse(re.hasMatch("\u{10300}")); // Supplementary plane. - assertTrue(re.hasMatch("\n")); - assertTrue(re.hasMatch("\r")); - assertTrue(re.hasMatch("\u2028")); - assertTrue(re.hasMatch("\u2029")); - - // DotAll '.' behavior (unicode). - re = new RegExp(r"^.$", unicode: true, dotAll: true); - assertTrue(re.hasMatch("a")); - assertTrue(re.hasMatch("3")); - assertTrue(re.hasMatch("π")); - assertTrue(re.hasMatch("\u2027")); - assertTrue(re.hasMatch("\u0085")); - assertTrue(re.hasMatch("\v")); - assertTrue(re.hasMatch("\f")); - assertTrue(re.hasMatch("\u180E")); - assertTrue(re.hasMatch("\u{10300}")); // Supplementary plane. - assertTrue(re.hasMatch("\n")); - assertTrue(re.hasMatch("\r")); - assertTrue(re.hasMatch("\u2028")); - assertTrue(re.hasMatch("\u2029")); -} diff --git a/tests/corelib_2/regexp/dotstar_test.dart b/tests/corelib_2/regexp/dotstar_test.dart deleted file mode 100644 index 51624723b0b..00000000000 --- a/tests/corelib_2/regexp/dotstar_test.dart +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description("This page tests handling of parentheses subexpressions."); - - var regexp1 = new RegExp(r".*blah.*"); - shouldBeNull(regexp1.firstMatch('test')); - shouldBe(regexp1.firstMatch('blah'), ['blah']); - shouldBe(regexp1.firstMatch('1blah'), ['1blah']); - shouldBe(regexp1.firstMatch('blah1'), ['blah1']); - shouldBe(regexp1.firstMatch('blah blah blah'), ['blah blah blah']); - shouldBe(regexp1.firstMatch('blah\nsecond'), ['blah']); - shouldBe(regexp1.firstMatch('first\nblah'), ['blah']); - shouldBe(regexp1.firstMatch('first\nblah\nthird'), ['blah']); - shouldBe(regexp1.firstMatch('first\nblah2\nblah3'), ['blah2']); - - var regexp2 = new RegExp(r"^.*blah.*"); - shouldBeNull(regexp2.firstMatch('test')); - shouldBe(regexp2.firstMatch('blah'), ['blah']); - shouldBe(regexp2.firstMatch('1blah'), ['1blah']); - shouldBe(regexp2.firstMatch('blah1'), ['blah1']); - shouldBe(regexp2.firstMatch('blah blah blah'), ['blah blah blah']); - shouldBe(regexp2.firstMatch('blah\nsecond'), ['blah']); - shouldBeNull(regexp2.firstMatch('first\nblah')); - shouldBeNull(regexp2.firstMatch('first\nblah\nthird')); - shouldBeNull(regexp2.firstMatch('first\nblah2\nblah3')); - - var regexp3 = new RegExp(r".*blah.*$"); - shouldBeNull(regexp3.firstMatch('test')); - shouldBe(regexp3.firstMatch('blah'), ['blah']); - shouldBe(regexp3.firstMatch('1blah'), ['1blah']); - shouldBe(regexp3.firstMatch('blah1'), ['blah1']); - shouldBe(regexp3.firstMatch('blah blah blah'), ['blah blah blah']); - shouldBeNull(regexp3.firstMatch('blah\nsecond')); - shouldBe(regexp3.firstMatch('first\nblah'), ['blah']); - shouldBeNull(regexp3.firstMatch('first\nblah\nthird')); - shouldBe(regexp3.firstMatch('first\nblah2\nblah3'), ['blah3']); - - var regexp4 = new RegExp(r"^.*blah.*$"); - shouldBeNull(regexp4.firstMatch('test')); - shouldBe(regexp4.firstMatch('blah'), ['blah']); - shouldBe(regexp4.firstMatch('1blah'), ['1blah']); - shouldBe(regexp4.firstMatch('blah1'), ['blah1']); - shouldBe(regexp4.firstMatch('blah blah blah'), ['blah blah blah']); - shouldBeNull(regexp4.firstMatch('blah\nsecond')); - shouldBeNull(regexp4.firstMatch('first\nblah')); - shouldBeNull(regexp4.firstMatch('first\nblah\nthird')); - shouldBeNull(regexp4.firstMatch('first\nblah2\nblah3')); - - var regexp5 = new RegExp(r".*?blah.*"); - shouldBeNull(regexp5.firstMatch('test')); - shouldBe(regexp5.firstMatch('blah'), ['blah']); - shouldBe(regexp5.firstMatch('1blah'), ['1blah']); - shouldBe(regexp5.firstMatch('blah1'), ['blah1']); - shouldBe(regexp5.firstMatch('blah blah blah'), ['blah blah blah']); - shouldBe(regexp5.firstMatch('blah\nsecond'), ['blah']); - shouldBe(regexp5.firstMatch('first\nblah'), ['blah']); - shouldBe(regexp5.firstMatch('first\nblah\nthird'), ['blah']); - shouldBe(regexp5.firstMatch('first\nblah2\nblah3'), ['blah2']); - - var regexp6 = new RegExp(r".*blah.*?"); - shouldBeNull(regexp6.firstMatch('test')); - shouldBe(regexp6.firstMatch('blah'), ['blah']); - shouldBe(regexp6.firstMatch('1blah'), ['1blah']); - shouldBe(regexp6.firstMatch('blah1'), ['blah']); - shouldBe(regexp6.firstMatch('blah blah blah'), ['blah blah blah']); - shouldBe(regexp6.firstMatch('blah\nsecond'), ['blah']); - shouldBe(regexp6.firstMatch('first\nblah'), ['blah']); - shouldBe(regexp6.firstMatch('first\nblah\nthird'), ['blah']); - shouldBe(regexp6.firstMatch('first\nblah2\nblah3'), ['blah']); - - var regexp7 = new RegExp(r"^.*?blah.*?$"); - shouldBeNull(regexp7.firstMatch('test')); - shouldBe(regexp7.firstMatch('blah'), ['blah']); - shouldBe(regexp7.firstMatch('1blah'), ['1blah']); - shouldBe(regexp7.firstMatch('blah1'), ['blah1']); - shouldBe(regexp7.firstMatch('blah blah blah'), ['blah blah blah']); - shouldBeNull(regexp7.firstMatch('blah\nsecond')); - shouldBeNull(regexp7.firstMatch('first\nblah')); - shouldBeNull(regexp7.firstMatch('first\nblah\nthird')); - shouldBeNull(regexp7.firstMatch('first\nblah2\nblah3')); - - var regexp8 = new RegExp(r"^(.*)blah.*$"); - shouldBeNull(regexp8.firstMatch('test')); - shouldBe(regexp8.firstMatch('blah'), ['blah', '']); - shouldBe(regexp8.firstMatch('1blah'), ['1blah', '1']); - shouldBe(regexp8.firstMatch('blah1'), ['blah1', '']); - shouldBe( - regexp8.firstMatch('blah blah blah'), ['blah blah blah', 'blah blah ']); - shouldBeNull(regexp8.firstMatch('blah\nsecond')); - shouldBeNull(regexp8.firstMatch('first\nblah')); - shouldBeNull(regexp8.firstMatch('first\nblah\nthird')); - shouldBeNull(regexp8.firstMatch('first\nblah2\nblah3')); - - var regexp9 = new RegExp(r".*blah.*", multiLine: true); - shouldBeNull(regexp9.firstMatch('test')); - shouldBe(regexp9.firstMatch('blah'), ['blah']); - shouldBe(regexp9.firstMatch('1blah'), ['1blah']); - shouldBe(regexp9.firstMatch('blah1'), ['blah1']); - shouldBe(regexp9.firstMatch('blah blah blah'), ['blah blah blah']); - shouldBe(regexp9.firstMatch('blah\nsecond'), ['blah']); - shouldBe(regexp9.firstMatch('first\nblah'), ['blah']); - shouldBe(regexp9.firstMatch('first\nblah\nthird'), ['blah']); - shouldBe(regexp9.firstMatch('first\nblah2\nblah3'), ['blah2']); - - var regexp10 = new RegExp(r"^.*blah.*", multiLine: true); - shouldBeNull(regexp10.firstMatch('test')); - shouldBe(regexp10.firstMatch('blah'), ['blah']); - shouldBe(regexp10.firstMatch('1blah'), ['1blah']); - shouldBe(regexp10.firstMatch('blah1'), ['blah1']); - shouldBe(regexp10.firstMatch('blah blah blah'), ['blah blah blah']); - shouldBe(regexp10.firstMatch('blah\nsecond'), ['blah']); - shouldBe(regexp10.firstMatch('first\nblah'), ['blah']); - shouldBe(regexp10.firstMatch('first\nblah\nthird'), ['blah']); - shouldBe(regexp10.firstMatch('first\nblah2\nblah3'), ['blah2']); - - var regexp11 = new RegExp(r".*(?:blah).*$"); - shouldBeNull(regexp11.firstMatch('test')); - shouldBe(regexp11.firstMatch('blah'), ['blah']); - shouldBe(regexp11.firstMatch('1blah'), ['1blah']); - shouldBe(regexp11.firstMatch('blah1'), ['blah1']); - shouldBe(regexp11.firstMatch('blah blah blah'), ['blah blah blah']); - shouldBeNull(regexp11.firstMatch('blah\nsecond')); - shouldBe(regexp11.firstMatch('first\nblah'), ['blah']); - shouldBeNull(regexp11.firstMatch('first\nblah\nthird')); - shouldBe(regexp11.firstMatch('first\nblah2\nblah3'), ['blah3']); - - var regexp12 = new RegExp(r".*(?:blah|buzz|bang).*$"); - shouldBeNull(regexp12.firstMatch('test')); - shouldBe(regexp12.firstMatch('blah'), ['blah']); - shouldBe(regexp12.firstMatch('1blah'), ['1blah']); - shouldBe(regexp12.firstMatch('blah1'), ['blah1']); - shouldBe(regexp12.firstMatch('blah blah blah'), ['blah blah blah']); - shouldBeNull(regexp12.firstMatch('blah\nsecond')); - shouldBe(regexp12.firstMatch('first\nblah'), ['blah']); - shouldBeNull(regexp12.firstMatch('first\nblah\nthird')); - shouldBe(regexp12.firstMatch('first\nblah2\nblah3'), ['blah3']); - - var regexp13 = new RegExp(r".*\n\d+.*"); - shouldBe(regexp13.firstMatch('abc\n123'), ['abc\n123']); -} diff --git a/tests/corelib_2/regexp/early-acid3-86_test.dart b/tests/corelib_2/regexp/early-acid3-86_test.dart deleted file mode 100644 index 34ea0f04d75..00000000000 --- a/tests/corelib_2/regexp/early-acid3-86_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - 'Test that covers capturing brackets, and was adapted from a part of an early version of Acid3.'); - - // JS regexps aren't like Perl regexps, if their character - // classes start with a ] that means they're empty. So this - // is a syntax error; if we get here it's a bug. - assertThrows(() => new RegExp(r"TA[])]").firstMatch('TA]')); - shouldBeNull(new RegExp(r"[]").firstMatch('')); - shouldBe(new RegExp(r"(\3)(\1)(a)").firstMatch('cat'), ['a', '', '', 'a']); -} diff --git a/tests/corelib_2/regexp/ecma-regex-examples_test.dart b/tests/corelib_2/regexp/ecma-regex-examples_test.dart deleted file mode 100644 index 35a45a00605..00000000000 --- a/tests/corelib_2/regexp/ecma-regex-examples_test.dart +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - "This page tests the regex examples from the ECMA-262 specification."); - - var regex01 = new RegExp(r"a|ab"); - shouldBe(regex01.firstMatch("abc"), ["a"]); - - var regex02 = new RegExp(r"((a)|(ab))((c)|(bc))"); - shouldBe( - regex02.firstMatch("abc"), ["abc", "a", "a", null, "bc", null, "bc"]); - - var regex03 = new RegExp(r"a[a-z]{2,4}"); - shouldBe(regex03.firstMatch("abcdefghi"), ["abcde"]); - - var regex04 = new RegExp(r"a[a-z]{2,4}?"); - shouldBe(regex04.firstMatch("abcdefghi"), ["abc"]); - - var regex05 = new RegExp(r"(aa|aabaac|ba|b|c)*"); - shouldBe(regex05.firstMatch("aabaac"), ["aaba", "ba"]); - - var regex06 = new RegExp(r"^(a+)\1*,\1+$"); - Expect.equals( - "aaaaaaaaaa,aaaaaaaaaaaaaaa".replaceAllMapped(regex06, (m) => m.group(1)), - "aaaaa"); - - var regex07 = new RegExp(r"(z)((a+)?(b+)?(c))*"); - shouldBe(regex07.firstMatch("zaacbbbcac"), - ["zaacbbbcac", "z", "ac", "a", null, "c"]); - - var regex08 = new RegExp(r"(a*)*"); - shouldBe(regex08.firstMatch("b"), ["", null]); - - var regex09 = new RegExp(r"(a*)b\1+"); - shouldBe(regex09.firstMatch("baaaac"), ["b", ""]); - - var regex10 = new RegExp(r"(?=(a+))"); - shouldBe(regex10.firstMatch("baaabac"), ["", "aaa"]); - - var regex11 = new RegExp(r"(?=(a+))a*b\1"); - shouldBe(regex11.firstMatch("baaabac"), ["aba", "a"]); - - var regex12 = new RegExp(r"(.*?)a(?!(a+)b\2c)\2(.*)"); - shouldBe(regex12.firstMatch("baaabaac"), ["baaabaac", "ba", null, "abaac"]); -} diff --git a/tests/corelib_2/regexp/extended-characters-match_test.dart b/tests/corelib_2/regexp/extended-characters-match_test.dart deleted file mode 100644 index c39f53310a9..00000000000 --- a/tests/corelib_2/regexp/extended-characters-match_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - "This test checks regular expressions using extended (> 255) characters and character classes."); - - shouldBeNull((new RegExp("[\u0100-\u0101]")).firstMatch("a")); - shouldBeNull((new RegExp("[\u0100]")).firstMatch("a")); - shouldBeNull((new RegExp("\u0100")).firstMatch("a")); - assertEquals((new RegExp("[\u0061]")).firstMatch("a").group(0), "a"); - assertEquals((new RegExp("[\u0100-\u0101a]")).firstMatch("a").group(0), "a"); - assertEquals((new RegExp("[\u0100a]")).firstMatch("a").group(0), "a"); - assertEquals((new RegExp("\u0061")).firstMatch("a").group(0), "a"); - assertEquals((new RegExp("[a-\u0100]")).firstMatch("a").group(0), "a"); - assertEquals( - (new RegExp("[\u0100]")).firstMatch("\u0100").group(0), "\u0100"); - assertEquals( - (new RegExp("[\u0100-\u0101]")).firstMatch("\u0100").group(0), "\u0100"); - assertEquals((new RegExp("\u0100")).firstMatch("\u0100").group(0), "\u0100"); -} diff --git a/tests/corelib_2/regexp/extended-characters-more_test.dart b/tests/corelib_2/regexp/extended-characters-more_test.dart deleted file mode 100644 index 16bcaadce80..00000000000 --- a/tests/corelib_2/regexp/extended-characters-more_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - "This test checks a few cases of extended (> 127) characters in repeat regular expressions."); - - assertEquals( - "foo\u00a0\u00a0\u00a0" - .replaceFirst(new RegExp(new String.fromCharCode(0x00a0) + "*"), ""), - "foo\u00a0\u00a0\u00a0"); - assertEquals( - "foo\u00a0\u00a0\u00a0".replaceFirst(new RegExp(r"\u00a0+"), ""), "foo"); - assertEquals( - "foo\u00a0\u00a0\u00a0".replaceFirst(new RegExp(r"\u00a0*$"), ""), "foo"); -} diff --git a/tests/corelib_2/regexp/find-first-asserted_test.dart b/tests/corelib_2/regexp/find-first-asserted_test.dart deleted file mode 100644 index ee332c9addf..00000000000 --- a/tests/corelib_2/regexp/find-first-asserted_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - 'Tests some regular expressions that were doing the wrong thing with the "find first asserted" optimization.'); - - shouldBe( - new RegExp(r".*(.*).*").firstMatch("foobarbaz"), - ["foobarbaz", "bar"]); - shouldBe(new RegExp(r"\s*\s*").firstMatch(""), - ["", ""]); -} diff --git a/tests/corelib_2/regexp/global_test.dart b/tests/corelib_2/regexp/global_test.dart deleted file mode 100644 index 4f154166bca..00000000000 --- a/tests/corelib_2/regexp/global_test.dart +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2012 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - var str = "ABX X"; - str = str.replaceAll(new RegExp(r"(\w)?X"), "c"); - assertEquals("Ac c", str); - - // Test zero-length matches. - str = "Als Gregor Samsa eines Morgens"; - str = str.replaceAll(new RegExp(r"\b"), "/"); - assertEquals("/Als/ /Gregor/ /Samsa/ /eines/ /Morgens/", str); - - // Test zero-length matches that have non-zero-length sub-captures. - str = "It was a pleasure to burn."; - str = str.replaceAllMapped( - new RegExp(r"(?=(\w+))\b"), (Match m) => m.group(1).length.toString()); - assertEquals("2It 3was 1a 8pleasure 2to 4burn.", str); - - // Test multiple captures. - str = "Try not. Do, or do not. There is no try."; - str = str.replaceAllMapped( - new RegExp(r"(not?)|(do)|(try)", caseSensitive: false), (m) { - if (m.group(1) != null) return "-"; - if (m.group(2) != null) return "+"; - if (m.group(3) != null) return "="; - }); - assertEquals("= -. +, or + -. There is - =.", str); - - // Test multiple alternate captures. - str = "FOUR LEGS GOOD, TWO LEGS BAD!"; - str = str.replaceAllMapped(new RegExp(r"(FOUR|TWO) LEGS (GOOD|BAD)"), (m) { - if (m.group(1) == "FOUR") assertTrue(m.group(2) == "GOOD"); - if (m.group(1) == "TWO") assertTrue(m.group(2) == "BAD"); - return (m.group(0).length - 10).toString(); - }); - assertEquals("4, 2!", str); - - // The same tests with UC16. - - //Test that an optional capture is cleared between two matches. - str = "AB\u1234 \u1234"; - str = str.replaceAll(new RegExp(r"(\w)?\u1234"), "c"); - assertEquals("Ac c", str); - - // Test zero-length matches. - str = "Als \u2623\u2642 eines Morgens"; - str = str.replaceAll(new RegExp(r"\b"), "/"); - - // Test zero-length matches that have non-zero-length sub-captures. - str = "It was a pleasure to \u70e7."; - str = str.replaceAllMapped( - new RegExp(r"(?=(\w+))\b"), (m) => "${m.group(1).length}"); - assertEquals("2It 3was 1a 8pleasure 2to \u70e7.", str); - - // Test multiple captures. - str = "Try not. D\u26aa, or d\u26aa not. There is no try."; - str = str.replaceAllMapped( - new RegExp(r"(not?)|(d\u26aa)|(try)", caseSensitive: false), (m) { - if (m.group(1) != null) return "-"; - if (m.group(2) != null) return "+"; - if (m.group(3) != null) return "="; - }); - assertEquals("= -. +, or + -. There is - =.", str); - - // Test multiple alternate captures. - str = "FOUR \u817f GOOD, TWO \u817f BAD!"; - str = str.replaceAllMapped(new RegExp(r"(FOUR|TWO) \u817f (GOOD|BAD)"), (m) { - if (m.group(1) == "FOUR") assertTrue(m.group(2) == "GOOD"); - if (m.group(1) == "TWO") assertTrue(m.group(2) == "BAD"); - return (m.group(0).length - 7).toString(); - }); - assertEquals("4, 2!", str); - - // Test capture that is a real substring. - str = "Beasts of England, beasts of Ireland"; - str = str.replaceAll(new RegExp(r"(.*)"), '~'); - assertEquals("~~", str); - - // Test zero-length matches that have non-zero-length sub-captures that do not - // start at the match start position. - str = "up up up up"; - str = str.replaceAllMapped( - new RegExp(r"\b(?=u(p))"), (m) => "${m.group(1).length}"); - - assertEquals("1up 1up 1up 1up", str); - - // Create regexp that has a *lot* of captures. - var re_string = "(a)"; - for (var i = 0; i < 500; i++) { - re_string = "(" + re_string + ")"; - } - re_string = re_string + "1"; - // re_string = "(((...((a))...)))1" - - var regexps = []; - var last_match_expectations = []; - var first_capture_expectations = []; - - // Atomic regexp. - regexps.add(new RegExp(r"a1")); - last_match_expectations.add("a1"); - first_capture_expectations.add(""); - // Small regexp (no capture); - regexps.add(new RegExp(r"\w1")); - last_match_expectations.add("a1"); - first_capture_expectations.add(""); - // Small regexp (one capture). - regexps.add(new RegExp(r"(a)1")); - last_match_expectations.add("a1"); - first_capture_expectations.add("a"); - // Large regexp (a lot of captures). - regexps.add(new RegExp(re_string)); - last_match_expectations.add("a1"); - first_capture_expectations.add("a"); - - dynamic test_replace(result_expectation, subject, regexp, replacement) { - for (var i = 0; i < regexps.length; i++) { - // Conduct tests. - assertEquals( - result_expectation, subject.replaceAll(regexps[i], replacement)); - } - } - - // Test for different number of matches. - for (var m = 0; m < 33; m++) { - // Create string that matches m times. - var subject = ""; - var test_1_expectation = ""; - var test_2_expectation = ""; - var test_3_expectation = (m == 0) ? null : []; - for (var i = 0; i < m; i++) { - subject += "a11"; - test_1_expectation += "x1"; - test_2_expectation += "1"; - test_3_expectation.add("a1"); - } - - // Test 1a: String.replace with string. - test_replace(test_1_expectation, subject, new RegExp(r"a1"), "x"); - - // Test 2a: String.replace with empty string. - test_replace(test_2_expectation, subject, new RegExp(r"a1"), ""); - } - - // Test String hashing (compiling regular expression includes hashing). - var crosscheck = "\x80"; - for (var i = 0; i < 12; i++) crosscheck += crosscheck; - new RegExp(crosscheck); - - var subject = "ascii~only~string~here~"; - var replacement = "\x80"; - var result = subject.replaceAll(new RegExp(r"~"), replacement); - for (var i = 0; i < 5; i++) result += result; - new RegExp(result); -} diff --git a/tests/corelib_2/regexp/indexof_test.dart b/tests/corelib_2/regexp/indexof_test.dart deleted file mode 100644 index 4928c278948..00000000000 --- a/tests/corelib_2/regexp/indexof_test.dart +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2008 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - dynamic CheckMatch(re, str, matches) { - assertEquals(matches.length > 0, re.hasMatch(str)); - var result = re.allMatches(str).toList(); - if (matches.length > 0) { - assertEquals(matches.length, result.length); - var lastExpected; - var lastFrom; - var lastLength; - for (var idx = 0; idx < matches.length; idx++) { - var from = matches[idx][0]; - var length = matches[idx][1]; - var expected = str.substring(from, from + length); - var name = "$str[$from..${from+length}]"; - assertEquals(expected, result[idx].group(0), name); - } - } else { - assertTrue(result.isEmpty); - } - } - - CheckMatch(new RegExp(r"abc"), "xxxabcxxxabcxxx", [ - [3, 3], - [9, 3] - ]); - CheckMatch(new RegExp(r"abc"), "abcabcabc", [ - [0, 3], - [3, 3], - [6, 3] - ]); - CheckMatch(new RegExp(r"aba"), "ababababa", [ - [0, 3], - [4, 3] - ]); - CheckMatch(new RegExp(r"foo"), "ofooofoooofofooofo", [ - [1, 3], - [5, 3], - [12, 3] - ]); - CheckMatch(new RegExp(r"foobarbaz"), "xx", []); - CheckMatch(new RegExp(r"abc"), "abababa", []); - - assertEquals("xxxdefxxxdefxxx", - "xxxabcxxxabcxxx".replaceAll(new RegExp(r"abc"), "def")); - assertEquals( - "o-o-oofo-ofo", "ofooofoooofofooofo".replaceAll(new RegExp(r"foo"), "-")); - assertEquals("deded", "deded".replaceAll(new RegExp(r"x"), "-")); - assertEquals("-a-b-c-d-e-f-", "abcdef".replaceAll(new RegExp(""), "-")); - - CheckMatch(new RegExp(r"a(.)"), "xyzzyabxyzzyacxyzzy", [ - [5, 2], - [12, 2] - ]); - - CheckMatch(new RegExp(r"a|(?:)"), "aba", [ - [0, 1], - [1, 0], - [2, 1], - [3, 0] - ]); - CheckMatch(new RegExp(r"a|(?:)"), "baba", [ - [0, 0], - [1, 1], - [2, 0], - [3, 1], - [4, 0] - ]); - CheckMatch(new RegExp(r"a|(?:)"), "bab", [ - [0, 0], - [1, 1], - [2, 0], - [3, 0] - ]); -} diff --git a/tests/corelib_2/regexp/invalid-range-in-class_test.dart b/tests/corelib_2/regexp/invalid-range-in-class_test.dart deleted file mode 100644 index af193f2b74a..00000000000 --- a/tests/corelib_2/regexp/invalid-range-in-class_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description("This page tests invalid character ranges in character classes."); - - // These test a basic range / non range. - shouldBe(new RegExp(r"[a-c]+").firstMatch("-acbd"), ["acb"]); - shouldBe(new RegExp(r"[a\-c]+").firstMatch("-acbd"), ["-ac"]); - - // A reverse-range is invalid. - assertThrows(() => new RegExp(r"[c-a]+").firstMatch("-acbd")); - - // A character-class in a range is invalid, according to ECMA-262, but we allow it. - shouldBe(new RegExp(r"[\d-x]+").firstMatch("1-3xy"), ["1-3x"]); - shouldBe(new RegExp(r"[x-\d]+").firstMatch("1-3xy"), ["1-3x"]); - shouldBe(new RegExp(r"[\\d-\d]+").firstMatch("1-3xy"), ["1-3"]); - - // Whilst we break with ECMA-262's definition of CharacterRange, we do comply with - // the grammar, and as such in the following regex a-z cannot be matched as a range. - shouldBe(new RegExp(r"[\d-a-z]+").firstMatch("az1-3y"), ["az1-3"]); - - // An escaped hyphen should not be confused for an invalid range. - shouldBe(new RegExp(r"[\d\-x]+").firstMatch("1-3xy"), ["1-3x"]); - shouldBe(new RegExp(r"[x\-\d]+").firstMatch("1-3xy"), ["1-3x"]); - shouldBe(new RegExp(r"[\d\-\d]+").firstMatch("1-3xy"), ["1-3"]); - - // A hyphen after a character-class is not invalid. - shouldBe(new RegExp(r"[\d-]+").firstMatch("1-3xy"), ["1-3"]); -} diff --git a/tests/corelib_2/regexp/issue_19193_test.dart b/tests/corelib_2/regexp/issue_19193_test.dart deleted file mode 100644 index 6b95acae5e5..00000000000 --- a/tests/corelib_2/regexp/issue_19193_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'package:expect/expect.dart'; - -// Regression test for http://dartbug.com/19193 -main() { - RegExp re = new RegExp(r'.*(a+)+\d'); - Expect.isTrue("a0aaaaaaaaaaaaa".contains(re)); - Expect.isTrue("a0aaaaaaaaaaaaaa".contains(re)); // false when using JSCRE. -} diff --git a/tests/corelib_2/regexp/jemalloc_leak_backtracking_stack_test.dart b/tests/corelib_2/regexp/jemalloc_leak_backtracking_stack_test.dart deleted file mode 100644 index 79788c6222f..00000000000 --- a/tests/corelib_2/regexp/jemalloc_leak_backtracking_stack_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Regression test for https://github.com/flutter/flutter/issues/29007 - -String escape(String string) { - var regex = new RegExp("(\\?|\\\$|\\*|\\(|\\)|\\[)|\\+|\\.|\\\\"); - return string.replaceAllMapped( - regex, (Match m) => "\\" + string.substring(m.start, m.end)); -} - -main() { - var text = """ -Yet but three? Come one more. -Two of both kinds make up four. -"""; - var accumulate = 0; - for (var i = 0; i < 65536; i++) { - accumulate += escape(text).length; - } - - print(accumulate); -} diff --git a/tests/corelib_2/regexp/lastindex_test.dart b/tests/corelib_2/regexp/lastindex_test.dart deleted file mode 100644 index ddf41cb0ba4..00000000000 --- a/tests/corelib_2/regexp/lastindex_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - // 'Test for regression against "https://bugs.webkit.org/show_bug.cgi?id=5602" - // REGRESSION: RegExp("[^\\s$]+", "g") returns extra matches' - - var re = new RegExp(r"[^\s$]+"); - var accumulate = ""; - var match; - for (var match in re.allMatches(" abcdefg")) - accumulate += match.group(0) + "; "; - assertEquals(accumulate, "abcdefg; "); - - re = new RegExp(r"\d"); - accumulate = ""; - for (var match in re.allMatches("123456789")) - accumulate += match.group(0) + "; "; - assertEquals(accumulate, "1; 2; 3; 4; 5; 6; 7; 8; 9; "); -} diff --git a/tests/corelib_2/regexp/look-ahead_test.dart b/tests/corelib_2/regexp/look-ahead_test.dart deleted file mode 100644 index f52e3cd4946..00000000000 --- a/tests/corelib_2/regexp/look-ahead_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - 'Test for regression against Yarr Interpreter is crashing in some cases of look-ahead regex patterns'); - - shouldBe(firstMatch("ab", new RegExp(r"a(?=b|c)")), ["a"]); - shouldBe(firstMatch("abd", new RegExp(r"a(?=c|b)|d")), ["a"]); -} diff --git a/tests/corelib_2/regexp/lookahead_test.dart b/tests/corelib_2/regexp/lookahead_test.dart deleted file mode 100644 index afb4f99ab90..00000000000 --- a/tests/corelib_2/regexp/lookahead_test.dart +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2009 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - // Tests captures in positive and negative look-ahead in regular expressions. - - dynamic testRE(re, input, expected_result) { - if (expected_result) { - assertTrue(re.hasMatch(input)); - } else { - assertFalse(re.hasMatch(input)); - } - } - - dynamic execRE(re, input, expected_result) { - shouldBe(re.firstMatch(input), expected_result); - } - - // Test of simple positive lookahead. - - var re = new RegExp(r"^(?=a)"); - testRE(re, "a", true); - testRE(re, "b", false); - execRE(re, "a", [""]); - - re = new RegExp(r"^(?=\woo)f\w"); - testRE(re, "foo", true); - testRE(re, "boo", false); - testRE(re, "fao", false); - testRE(re, "foa", false); - execRE(re, "foo", ["fo"]); - - re = new RegExp(r"(?=\w).(?=\W)"); - testRE(re, ".a! ", true); - testRE(re, ".! ", false); - testRE(re, ".ab! ", true); - execRE(re, ".ab! ", ["b"]); - - re = new RegExp(r"(?=f(?=[^f]o)).."); - testRE(re, ", foo!", true); - testRE(re, ", fo!", false); - testRE(re, ", ffo", false); - execRE(re, ", foo!", ["fo"]); - - // Positive lookahead with captures. - re = new RegExp("^[^\'\"]*(?=([\'\"])).*\\1(\\w+)\\1"); - testRE(re, " 'foo' ", true); - testRE(re, ' "foo" ', true); - testRE(re, " \" 'foo' ", false); - testRE(re, " ' \"foo\" ", false); - testRE(re, " 'foo\" ", false); - testRE(re, " \"foo' ", false); - execRE(re, " 'foo' ", [" 'foo'", "'", "foo"]); - execRE(re, ' "foo" ', [' "foo"', '"', 'foo']); - - // Captures are cleared on backtrack past the look-ahead. - re = new RegExp(r"^(?:(?=(.))a|b)\1$"); - testRE(re, "aa", true); - testRE(re, "b", true); - testRE(re, "bb", false); - testRE(re, "a", false); - execRE(re, "aa", ["aa", "a"]); - execRE(re, "b", ["b", null]); - - re = new RegExp(r"^(?=(.)(?=(.)\1\2)\2\1)\1\2"); - testRE(re, "abab", true); - testRE(re, "ababxxxxxxxx", true); - testRE(re, "aba", false); - execRE(re, "abab", ["ab", "a", "b"]); - - re = new RegExp(r"^(?:(?=(.))a|b|c)$"); - testRE(re, "a", true); - testRE(re, "b", true); - testRE(re, "c", true); - testRE(re, "d", false); - execRE(re, "a", ["a", "a"]); - execRE(re, "b", ["b", null]); - execRE(re, "c", ["c", null]); - - execRE(new RegExp(r"^(?=(b))b"), "b", ["b", "b"]); - execRE(new RegExp(r"^(?:(?=(b))|a)b"), "ab", ["ab", null]); - execRE(new RegExp(r"^(?:(?=(b)(?:(?=(c))|d))|)bd"), "bd", ["bd", "b", null]); - - // Test of Negative Look-Ahead. - - re = new RegExp(r"(?!x)."); - testRE(re, "y", true); - testRE(re, "x", false); - execRE(re, "y", ["y"]); - - re = new RegExp(r"(?!(\d))|\d"); - testRE(re, "4", true); - execRE(re, "4", ["4", null]); - execRE(re, "x", ["", null]); - - // Test mixed nested look-ahead with captures. - - re = new RegExp(r"^(?=(x)(?=(y)))"); - testRE(re, "xy", true); - testRE(re, "xz", false); - execRE(re, "xy", ["", "x", "y"]); - - re = new RegExp(r"^(?!(x)(?!(y)))"); - testRE(re, "xy", true); - testRE(re, "xz", false); - execRE(re, "xy", ["", null, null]); - - re = new RegExp(r"^(?=(x)(?!(y)))"); - testRE(re, "xz", true); - testRE(re, "xy", false); - execRE(re, "xz", ["", "x", null]); - - re = new RegExp(r"^(?!(x)(?=(y)))"); - testRE(re, "xz", true); - testRE(re, "xy", false); - execRE(re, "xz", ["", null, null]); - - re = new RegExp(r"^(?=(x)(?!(y)(?=(z))))"); - testRE(re, "xaz", true); - testRE(re, "xya", true); - testRE(re, "xyz", false); - testRE(re, "a", false); - execRE(re, "xaz", ["", "x", null, null]); - execRE(re, "xya", ["", "x", null, null]); - - re = new RegExp(r"^(?!(x)(?=(y)(?!(z))))"); - testRE(re, "a", true); - testRE(re, "xa", true); - testRE(re, "xyz", true); - testRE(re, "xya", false); - execRE(re, "a", ["", null, null, null]); - execRE(re, "xa", ["", null, null, null]); - execRE(re, "xyz", ["", null, null, null]); -} diff --git a/tests/corelib_2/regexp/lookbehind_test.dart b/tests/corelib_2/regexp/lookbehind_test.dart deleted file mode 100644 index cdeee895c35..00000000000 --- a/tests/corelib_2/regexp/lookbehind_test.dart +++ /dev/null @@ -1,440 +0,0 @@ -// Copyright (c) 2019, the Dart project authors. All rights reserved. -// Copyright 2015 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -import 'v8_regexp_utils.dart'; - -void main() { - // Tests captures in positive and negative look-behind in regular expressions. - - void testRE(RegExp re, String input, bool expectedResult) { - if (expectedResult) { - assertTrue(re.hasMatch(input)); - } else { - assertFalse(re.hasMatch(input)); - } - } - - void execRE(RegExp re, String input, List expectedResult) { - assertTrue(re.hasMatch(input)); - shouldBe(re.firstMatch(input), expectedResult); - } - - void multiRE(RegExp re, String input, List> expectedResult) { - assertTrue(re.hasMatch(input)); - final matches = re.allMatches(input); - assertEquals(matches.length, expectedResult.length); - for (var i = 0; i < matches.length; i++) { - shouldBe(matches.elementAt(i), expectedResult[i]); - } - } - - // Simple fixed-length matches. - - var re = new RegExp(r"^.(?<=a)"); - execRE(re, "a", ["a"]); - testRE(re, "b", false); - - re = new RegExp(r"^f..(?<=.oo)"); - execRE(re, "foo1", ["foo"]); - - re = new RegExp(r"^f\w\w(?<=\woo)"); - execRE(re, "foo2", ["foo"]); - testRE(re, "boo", false); - testRE(re, "fao", false); - testRE(re, "foa", false); - - re = new RegExp(r"(?<=abc)\w\w\w"); - execRE(re, "abcdef", ["def"]); - - re = new RegExp(r"(?<=a.c)\w\w\w"); - execRE(re, "abcdef", ["def"]); - - re = new RegExp(r"(?<=a\wc)\w\w\w"); - execRE(re, "abcdef", ["def"]); - - re = new RegExp(r"(?<=a[a-z])\w\w\w"); - execRE(re, "abcdef", ["cde"]); - - re = new RegExp(r"(?<=a[a-z][a-z])\w\w\w"); - execRE(re, "abcdef", ["def"]); - - re = new RegExp(r"(?<=a[a-z]{2})\w\w\w"); - execRE(re, "abcdef", ["def"]); - - re = new RegExp(r"(?<=a{1})\w\w\w"); - execRE(re, "abcdef", ["bcd"]); - - re = new RegExp(r"(?<=a{1}b{1})\w\w\w"); - execRE(re, "abcdef", ["cde"]); - - re = new RegExp(r"(?<=a{1}[a-z]{2})\w\w\w"); - execRE(re, "abcdef", ["def"]); - - // Variable-length matches. - - re = new RegExp(r"(?<=[a|b|c]*)[^a|b|c]{3}"); - execRE(re, "abcdef", ["def"]); - - re = new RegExp(r"(?<=\w*)[^a|b|c]{3}"); - execRE(re, "abcdef", ["def"]); - - re = new RegExp(r"(?<=b|c)\w"); - multiRE(re, "abcdef", [ - ["c"], - ["d"] - ]); - - re = new RegExp(r"(?<=[b-e])\w{2}"); - multiRE(re, "abcdef", [ - ["cd"], - ["ef"] - ]); - - // Start of line matches. - - re = new RegExp(r"(?<=^abc)def"); - execRE(re, "abcdef", ["def"]); - - re = new RegExp(r"(?<=^[a-c]{3})def"); - execRE(re, "abcdef", ["def"]); - - re = new RegExp(r"(?<=^[a-c]{3})def", multiLine: true); - execRE(re, "xyz\nabcdef", ["def"]); - - re = new RegExp(r"(?<=^)\w+", multiLine: true); - multiRE(re, "ab\ncd\nefg", [ - ["ab"], - ["cd"], - ["efg"] - ]); - - re = new RegExp(r"\w+(?<=$)", multiLine: true); - multiRE(re, "ab\ncd\nefg", [ - ["ab"], - ["cd"], - ["efg"] - ]); - - re = new RegExp(r"(?<=^)\w+(?<=$)", multiLine: true); - multiRE(re, "ab\ncd\nefg", [ - ["ab"], - ["cd"], - ["efg"] - ]); - - re = new RegExp(r"(?<=^[^a-c]{3})def"); - testRE(re, "abcdef", false); - - re = new RegExp(r"^foooo(?<=^o+)$"); - testRE(re, "foooo", false); - - re = new RegExp(r"^foooo(?<=^o*)$"); - testRE(re, "foooo", false); - - re = new RegExp(r"^foo(?<=^fo+)$"); - execRE(re, "foo", ["foo"]); - - re = new RegExp(r"^foooo(?<=^fo*)"); - execRE(re, "foooo", ["foooo"]); - - re = new RegExp(r"^(f)oo(?<=^\1o+)$"); - testRE(re, "foo", true); - execRE(re, "foo", ["foo", "f"]); - - re = new RegExp(r"^(f)oo(?<=^\1o+)$", caseSensitive: false); - execRE(re, "foo", ["foo", "f"]); - - re = new RegExp(r"^(f)oo(?<=^\1o+).$", caseSensitive: false); - execRE(re, "foo\u1234", ["foo\u1234", "f"]); - - re = new RegExp(r"(?<=^\w+)def"); - execRE(re, "abcdefdef", ["def"]); - multiRE(re, "abcdefdef", [ - ["def"], - ["def"] - ]); - - // Word boundary matches. - - re = new RegExp(r"(?<=\b)[d-f]{3}"); - execRE(re, "abc def", ["def"]); - - re = new RegExp(r"(?<=\B)\w{3}"); - execRE(re, "ab cdef", ["def"]); - - re = new RegExp(r"(?<=\B)(?<=c(?<=\w))\w{3}"); - execRE(re, "ab cdef", ["def"]); - - re = new RegExp(r"(?<=\b)[d-f]{3}"); - testRE(re, "abcdef", false); - - // Negative lookbehind. - - re = new RegExp(r"(? new RegExp(r"(?<=.)*")); //# 01: ok - assertThrows(() => new RegExp(r"(?<=.)?")); //# 01: ok - assertThrows(() => new RegExp(r"(?<=.)+")); //# 01: ok - - assertThrows(() => new RegExp(r"(?<=.)*", unicode: true)); //# 01: ok - assertThrows(() => new RegExp(r"(?<=.){1,2}", unicode: true)); //# 01: ok -} diff --git a/tests/corelib_2/regexp/loop-capture_test.dart b/tests/corelib_2/regexp/loop-capture_test.dart deleted file mode 100644 index c540ae0f280..00000000000 --- a/tests/corelib_2/regexp/loop-capture_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2009 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - shouldBe(new RegExp(r"(?:(a)|(b)|(c))+").firstMatch("abc"), - ["abc", null, null, "c"]); - shouldBe(new RegExp(r"(?:(a)|b)*").firstMatch("ab"), ["ab", null]); -} diff --git a/tests/corelib_2/regexp/malformed-escapes_test.dart b/tests/corelib_2/regexp/malformed-escapes_test.dart deleted file mode 100644 index f048fdf8ccf..00000000000 --- a/tests/corelib_2/regexp/malformed-escapes_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description("This page tests handling of malformed escape sequences."); - - var regexp; - - regexp = new RegExp(r"\ug", multiLine: true); - shouldBeTrue(regexp.hasMatch('ug')); - - regexp = new RegExp(r"\xg", multiLine: true); - shouldBeTrue(regexp.hasMatch('xg')); - - regexp = new RegExp(r"\c_", multiLine: true); - shouldBeTrue(regexp.hasMatch('\\\\c_')); - - regexp = new RegExp(r"[\B]", multiLine: true); - shouldBeTrue(regexp.hasMatch('B')); - - regexp = new RegExp(r"[\b]", multiLine: true); - shouldBeTrue(regexp.hasMatch('\b')); - - regexp = new RegExp(r"\8", multiLine: true); - shouldBeTrue(regexp.hasMatch('\\\8')); - - regexp = new RegExp(r"^[\c]$"); - shouldBeTrue(regexp.hasMatch('c')); - - regexp = new RegExp(r"^[\c_]$"); - shouldBeFalse(regexp.hasMatch('c')); - - regexp = new RegExp(r"^[\c]]$"); - shouldBeTrue(regexp.hasMatch('c]')); -} diff --git a/tests/corelib_2/regexp/many-brackets_test.dart b/tests/corelib_2/regexp/many-brackets_test.dart deleted file mode 100644 index fd9662bca3f..00000000000 --- a/tests/corelib_2/regexp/many-brackets_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - 'Test regular expression processing with many capturing brackets (200).'); - - var count = 200; - - var regexp = ""; - for (var i = 0; i < count; ++i) regexp += "("; - regexp += "hello"; - for (var i = 0; i < count; ++i) regexp += ")"; - - var manyHellosArray = []; - for (var i = 0; i <= count; ++i) manyHellosArray.add("hello"); - - var manyBracketsRegExp = new RegExp(regexp); - shouldBe(firstMatch('hello', manyBracketsRegExp), manyHellosArray); -} diff --git a/tests/corelib_2/regexp/multiline_test.dart b/tests/corelib_2/regexp/multiline_test.dart deleted file mode 100644 index 3d4482f2534..00000000000 --- a/tests/corelib_2/regexp/multiline_test.dart +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2008 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -/** - * @fileoverview Check that various regexp constructs work as intended. - * Particularly those regexps that use ^ and $. - */ - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - assertTrue(new RegExp(r"^bar").hasMatch("bar")); - assertTrue(new RegExp(r"^bar").hasMatch("bar\nfoo")); - assertFalse(new RegExp(r"^bar").hasMatch("foo\nbar")); - assertTrue(new RegExp(r"^bar", multiLine: true).hasMatch("bar")); - assertTrue(new RegExp(r"^bar", multiLine: true).hasMatch("bar\nfoo")); - assertTrue(new RegExp(r"^bar", multiLine: true).hasMatch("foo\nbar")); - - assertTrue(new RegExp(r"bar$").hasMatch("bar")); - assertFalse(new RegExp(r"bar$").hasMatch("bar\nfoo")); - assertTrue(new RegExp(r"bar$").hasMatch("foo\nbar")); - assertTrue(new RegExp(r"bar$", multiLine: true).hasMatch("bar")); - assertTrue(new RegExp(r"bar$", multiLine: true).hasMatch("bar\nfoo")); - assertTrue(new RegExp(r"bar$", multiLine: true).hasMatch("foo\nbar")); - - assertFalse(new RegExp(r"^bxr").hasMatch("bar")); - assertFalse(new RegExp(r"^bxr").hasMatch("bar\nfoo")); - assertFalse(new RegExp(r"^bxr", multiLine: true).hasMatch("bar")); - assertFalse(new RegExp(r"^bxr", multiLine: true).hasMatch("bar\nfoo")); - assertFalse(new RegExp(r"^bxr", multiLine: true).hasMatch("foo\nbar")); - - assertFalse(new RegExp(r"bxr$").hasMatch("bar")); - assertFalse(new RegExp(r"bxr$").hasMatch("foo\nbar")); - assertFalse(new RegExp(r"bxr$", multiLine: true).hasMatch("bar")); - assertFalse(new RegExp(r"bxr$", multiLine: true).hasMatch("bar\nfoo")); - assertFalse(new RegExp(r"bxr$", multiLine: true).hasMatch("foo\nbar")); - - assertTrue(new RegExp(r"^.*$").hasMatch("")); - assertTrue(new RegExp(r"^.*$").hasMatch("foo")); - assertFalse(new RegExp(r"^.*$").hasMatch("\n")); - assertTrue(new RegExp(r"^.*$", multiLine: true).hasMatch("\n")); - - assertTrue(new RegExp(r"^[\s]*$").hasMatch(" ")); - assertTrue(new RegExp(r"^[\s]*$").hasMatch("\n")); - - assertTrue(new RegExp(r"^[^]*$").hasMatch("")); - assertTrue(new RegExp(r"^[^]*$").hasMatch("foo")); - assertTrue(new RegExp(r"^[^]*$").hasMatch("\n")); - - assertTrue(new RegExp(r"^([()\s]|.)*$").hasMatch("()\n()")); - assertTrue(new RegExp(r"^([()\n]|.)*$").hasMatch("()\n()")); - assertFalse(new RegExp(r"^([()]|.)*$").hasMatch("()\n()")); - assertTrue(new RegExp(r"^([()]|.)*$", multiLine: true).hasMatch("()\n()")); - assertTrue(new RegExp(r"^([()]|.)*$", multiLine: true).hasMatch("()\n")); - assertTrue(new RegExp(r"^[()]*$", multiLine: true).hasMatch("()\n.")); - - assertTrue(new RegExp(r"^[\].]*$").hasMatch("...]...")); - - dynamic check_case(lc, uc) { - var a = new RegExp("^" + lc + r"$"); - assertFalse(a.hasMatch(uc)); - a = new RegExp("^" + lc + r"$", caseSensitive: false); - assertTrue(a.hasMatch(uc)); - - var A = new RegExp("^" + uc + r"$"); - assertFalse(A.hasMatch(lc)); - A = new RegExp("^" + uc + r"$", caseSensitive: false); - assertTrue(A.hasMatch(lc)); - - a = new RegExp("^[" + lc + r"]$"); - assertFalse(a.hasMatch(uc)); - a = new RegExp("^[" + lc + r"]$", caseSensitive: false); - assertTrue(a.hasMatch(uc)); - - A = new RegExp("^[" + uc + r"]$"); - assertFalse(A.hasMatch(lc)); - A = new RegExp("^[" + uc + r"]$", caseSensitive: false); - assertTrue(A.hasMatch(lc)); - } - - check_case("a", "A"); - // Aring - check_case(new String.fromCharCode(229), new String.fromCharCode(197)); - // Russian G - check_case(new String.fromCharCode(0x413), new String.fromCharCode(0x433)); - - assertThrows(() => new RegExp('[z-a]')); -} diff --git a/tests/corelib_2/regexp/named_captures_2_test.dart b/tests/corelib_2/regexp/named_captures_2_test.dart deleted file mode 100644 index df8bc252b34..00000000000 --- a/tests/corelib_2/regexp/named_captures_2_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2022, the Dart project authors. All rights reserved. -// Copyright 2017 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; - -// These test cases really belong in `named_captures_test` but they've been -// broken out because they currently fail on all web backends. -void main() { - assertThrows(() => RegExp(r"(?<$𐒤>a)")); - assertThrows(() => RegExp("(?.)")); - assertThrows(() => RegExp(r"(?.)")); - assertThrows(() => RegExp("(?.)")); - assertThrows(() => RegExp(r"(?.)")); - assertThrows(() => RegExp("(?.)")); - assertThrows(() => RegExp(r"(?.)")); - assertThrows(() => RegExp("(?.)")); - assertThrows(() => RegExp(r"(?.)")); - assertThrows(() => RegExp("(?.)")); - assertThrows(() => RegExp(r"(?.)")); - assertThrows(() => RegExp(r"(?.)")); -} diff --git a/tests/corelib_2/regexp/named_captures_test.dart b/tests/corelib_2/regexp/named_captures_test.dart deleted file mode 100644 index 6709d5a0cc6..00000000000 --- a/tests/corelib_2/regexp/named_captures_test.dart +++ /dev/null @@ -1,344 +0,0 @@ -// Copyright (c) 2019, the Dart project authors. All rights reserved. -// Copyright 2017 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -import 'v8_regexp_utils.dart'; - -// TODO(50437): A number of test cases in this group currently fail on -// web backends, and so those cases were moved to `named_captures_2_test`. -// To highlight the connection between these tests, those test cases have been -// left in this file but commented out. -void main() { - void execRE(RegExp re, String input, List expectedResult) { - assertTrue(re.hasMatch(input)); - shouldBe(re.firstMatch(input), expectedResult); - } - - void execString(String pattern, String input, List expectedResult, - {bool unicode = true, bool caseSensitive = false}) { - execRE(RegExp(pattern, unicode: unicode, caseSensitive: caseSensitive), - input, expectedResult); - } - - void namedRE(RegExp re, String input, Map expectedResults) { - assertTrue(re.hasMatch(input)); - var match = re.firstMatch(input); - for (var s in expectedResults.keys) { - assertEquals(match.namedGroup(s), expectedResults[s]); - } - } - - void execStringGroups( - String pattern, String input, Map expectedResults, - {bool unicode = true, bool caseSensitive = false}) { - namedRE(RegExp(pattern, unicode: unicode, caseSensitive: caseSensitive), - input, expectedResults); - } - - void hasNames(RegExp re, String input, List expectedResults) { - assertTrue(re.hasMatch(input)); - var match = re.firstMatch(input); - for (var s in match.groupNames) { - assertTrue(expectedResults.contains(s)); - } - } - - void matchesIndexEqual(String input, RegExp re1, RegExp re2) { - var m1 = re1.firstMatch(input); - var m2 = re2.firstMatch(input); - if (m2 == null) { - assertNull(m1); - } else { - assertTrue(m1 != null); - assertEquals(m1.groupCount, m2.groupCount); - for (int i = 0; i < m1.groupCount; i++) { - assertEquals(m1.group(i), m2.group(i)); - } - } - } - - // Malformed named captures. - // Empty name. - assertThrows(() => RegExp(r"(?<>a)", unicode: true)); - // Unterminated name. - assertThrows(() => RegExp(r"(? RegExp(r"(?<42a>a)", unicode: true)); - // Name starting with invalid char. - assertThrows(() => RegExp(r"(?<:a>a)", unicode: true)); - // Name containing invalid char. - assertThrows(() => RegExp(r"(?a)", unicode: true)); - // Duplicate name. - assertThrows(() => RegExp(r"(?a)(?a)", unicode: true)); - // Duplicate name. - assertThrows(() => RegExp(r"(?a)(?b)(?a)", unicode: true)); - // Invalid reference. - assertThrows(() => RegExp(r"\k", unicode: true)); - // Unterminated reference. - assertThrows(() => RegExp(r"\k RegExp(r"\k", unicode: true)); - // Lone \k. - assertThrows(() => RegExp(r"(?.)\k", unicode: true)); - // Unterminated reference. - assertThrows(() => RegExp(r"(?.)\k RegExp(r"(?.)\k", unicode: true)); - // Invalid reference. - assertThrows(() => RegExp(r"(?a)\k", unicode: true)); - // Invalid reference. - assertThrows(() => RegExp(r"(?a)\k", unicode: true)); - // Invalid reference. - assertThrows(() => RegExp(r"\k(?a)", unicode: true)); - // Identity escape in capture. - assertThrows(() => RegExp(r"(?\a)", unicode: true)); - - // Behavior in non-unicode mode. - assertThrows(() => RegExp(r"(?<>a)")); - assertThrows(() => RegExp(r"(? RegExp(r"(?<42a>a)")); - assertThrows(() => RegExp(r"(?<:a>a)")); - assertThrows(() => RegExp(r"(?a)")); - assertThrows(() => RegExp(r"(?a)(?a)")); - assertThrows(() => RegExp(r"(?a)(?b)(?a)")); - assertTrue(RegExp(r"\k").hasMatch("k")); - assertTrue(RegExp(r"\k<4>").hasMatch("k<4>")); - assertTrue(RegExp(r"\k RegExp(r"(?.)\k")); - assertThrows(() => RegExp(r"(?.)\k RegExp(r"(?.)\k")); - assertThrows(() => RegExp(r"(?a)\k")); - assertThrows(() => RegExp(r"(?a)\k")); - assertThrows(() => RegExp(r"\k(?a)")); - assertThrows(() => RegExp(r"\ka)")); - assertTrue(RegExp(r"(?\a)").hasMatch("a")); - - var re = RegExp(r"\k"); - execRE(re, "xxxkxxx", ["k"]); - - re = RegExp(r"\kxxx", ["k.)(?.)(?.)\k\k\k"); - execRE(re, "abccba", ["abccba", "a", "b", "c"]); - namedRE(re, "abccba", {"a": "a", "b": "b", "c": "c"}); - hasNames(re, "abccba", ["a", "b", "c"]); - - // A couple of corner cases around '\k' as named back-references vs. identity - // escapes. - assertTrue(RegExp(r"\k(?<=>)a").hasMatch("ka")); - assertTrue(RegExp(r"\k(?a")); - assertTrue(RegExp(r"\k(x)").hasMatch("kx")); - assertTrue(RegExp(r"\k(?x)").hasMatch("x")); - assertThrows(() => RegExp(r"\k(?x)")); - assertThrows(() => RegExp(r"\k.)")); - assertThrows(() => RegExp(r"\k(?.)")); - - // Basic named groups. - execString(r"(?a)", "bab", ["a", "a"]); - execString(r"(?a)", "bab", ["a", "a"]); - execString(r"(?<_>a)", "bab", ["a", "a"]); - execString(r"(?<$>a)", "bab", ["a", "a"]); - execString(r".(?<$>a).", "bab", ["bab", "a"]); - execString(r".(?a)(.)", "bab", ["bab", "a", "b"]); - execString(r".(?a)(?.)", "bab", ["bab", "a", "b"]); - execString(r".(?\w\w)", "bab", ["bab", "ab"]); - execString(r"(?\w\w\w)", "bab", ["bab", "bab"]); - execString(r"(?\w\w)(?\w)", "bab", ["bab", "ba", "b"]); - - execString(r"(?a)", "bab", ["a", "a"], unicode: false); - execString(r"(?a)", "bab", ["a", "a"], unicode: false); - execString(r"(?<_>a)", "bab", ["a", "a"], unicode: false); - execString(r"(?<$>a)", "bab", ["a", "a"], unicode: false); - execString(r".(?<$>a).", "bab", ["bab", "a"], unicode: false); - execString(r".(?a)(.)", "bab", ["bab", "a", "b"], unicode: false); - execString(r".(?a)(?.)", "bab", ["bab", "a", "b"], unicode: false); - execString(r".(?\w\w)", "bab", ["bab", "ab"], unicode: false); - execString(r"(?\w\w\w)", "bab", ["bab", "bab"], unicode: false); - execString(r"(?\w\w)(?\w)", "bab", ["bab", "ba", "b"], unicode: false); - - matchesIndexEqual( - "bab", RegExp(r"(?a)", unicode: true), RegExp(r"(a)", unicode: true)); - matchesIndexEqual("bab", RegExp(r"(?a)", unicode: true), - RegExp(r"(a)", unicode: true)); - matchesIndexEqual( - "bab", RegExp(r"(?<_>a)", unicode: true), RegExp(r"(a)", unicode: true)); - matchesIndexEqual( - "bab", RegExp(r"(?<$>a)", unicode: true), RegExp(r"(a)", unicode: true)); - matchesIndexEqual("bab", RegExp(r".(?<$>a).", unicode: true), - RegExp(r".(a).", unicode: true)); - matchesIndexEqual("bab", RegExp(r".(?a)(.)", unicode: true), - RegExp(r".(a)(.)", unicode: true)); - matchesIndexEqual("bab", RegExp(r".(?a)(?.)", unicode: true), - RegExp(r".(a)(.)", unicode: true)); - matchesIndexEqual("bab", RegExp(r".(?\w\w)", unicode: true), - RegExp(r".(\w\w)", unicode: true)); - matchesIndexEqual("bab", RegExp(r"(?\w\w\w)", unicode: true), - RegExp(r"(\w\w\w)", unicode: true)); - matchesIndexEqual("bab", RegExp(r"(?\w\w)(?\w)", unicode: true), - RegExp(r"(\w\w)(\w)", unicode: true)); - - execString(r"(?b).\1", "bab", ["bab", "b"]); - execString(r"(.)(?a)\1\2", "baba", ["baba", "b", "a"]); - execString(r"(.)(?a)(?\1)(\2)", "baba", ["baba", "b", "a", "b", "a"]); - execString(r"(?<)a", ">)a", ">a", [">a", ">"]); - - // Named references. - var pattern = r"(?.).\k"; - execString(pattern, "bab", ["bab", "b"]); - assertFalse(RegExp(pattern, unicode: true).hasMatch("baa")); - - // Nested groups. - pattern = r"(?.(?.(?.)))"; - execString(pattern, "bab", ["bab", "bab", "ab", "b"]); - execStringGroups(pattern, "bab", {"a": "bab", "b": "ab", "c": "b"}); - - // Reference inside group. - pattern = r"(?\k\w).."; - execString(pattern, "bab", ["bab", "b"]); - execStringGroups(pattern, "bab", {"a": "b"}); - - // Reference before group. - pattern = r"\k(?b)\w\k"; - execString(pattern, "bab", ["bab", "b"], unicode: false); - execString(pattern, "bab", ["bab", "b"]); - execStringGroups(pattern, "bab", {"a": "b"}); - - pattern = r"(?b)\k(?a)\k"; - execString(pattern, "bab", ["bab", "b", "a"], unicode: false); - execString(pattern, "bab", ["bab", "b", "a"]); - execStringGroups(pattern, "bab", {"a": "a", "b": "b"}); - - // Reference named groups. - var match = RegExp(r"(?a)(?b)\k", unicode: true).firstMatch("aba"); - assertEquals("a", match.namedGroup("a")); - assertEquals("b", match.namedGroup("b")); - assertFalse(match.groupNames.contains("c")); - - match = - RegExp(r"(?a)(?b)\k|(?c)", unicode: true).firstMatch("aba"); - assertNull(match.namedGroup("c")); - - // Unicode names. - execStringGroups(r"(?<π>a)", "bab", {"π": "a"}); - execStringGroups(r"(?<\u{03C0}>a)", "bab", {"π": "a"}); - execStringGroups(r"(?<π>a)", "bab", {"\u03C0": "a"}); - execStringGroups(r"(?<\u{03C0}>a)", "bab", {"\u03C0": "a"}); - execStringGroups(r"(?<$>a)", "bab", {"\$": "a"}); - execStringGroups(r"(?<_>a)", "bab", {"_": "a"}); - execStringGroups(r"(?<$𐒤>a)", "bab", {"\$𐒤": "a"}); - execStringGroups(r"(?<_\u200C>a)", "bab", {"_\u200C": "a"}); - execStringGroups(r"(?<_\u200D>a)", "bab", {"_\u200D": "a"}); - execStringGroups(r"(?<ಠ_ಠ>a)", "bab", {"ಠ_ಠ": "a"}); - // ID_Continue but not ID_Start. - assertThrows(() => RegExp(r"/(?<❤>a)", unicode: true)); - assertThrows(() => RegExp(r"/(?<𐒤>a)", unicode: true)); - - execStringGroups(r"(?<π>a)", "bab", {"π": "a"}, unicode: false); - execStringGroups(r"(?<$>a)", "bab", {"\$": "a"}, unicode: false); - execStringGroups(r"(?<_>a)", "bab", {"_": "a"}, unicode: false); - // assertThrows(() => RegExp(r"(?<$𐒤>a)")); - execStringGroups(r"(?<ಠ_ಠ>a)", "bab", {"ಠ_ಠ": "a"}, unicode: false); - // ID_Continue but not ID_Start. - assertThrows(() => RegExp(r"/(?<❤>a)")); - assertThrows(() => RegExp(r"/(?<𐒤>a)")); - - // Interaction with lookbehind assertions. - pattern = r"(?<=(?\w){3})f"; - execString(pattern, "abcdef", ["f", "c"]); - execStringGroups(pattern, "abcdef", {"a": "c"}); - - execStringGroups(r"(?<=(?\w){4})f", "abcdef", {"a": "b"}); - execStringGroups(r"(?<=(?\w)+)f", "abcdef", {"a": "a"}); - assertFalse(RegExp(r"(?<=(?\w){6})f", unicode: true).hasMatch("abcdef")); - - execString(r"((?<=\w{3}))f", "abcdef", ["f", ""]); - execString(r"(?(?<=\w{3}))f", "abcdef", ["f", ""]); - - execString(r"(?\d){3})f", "abcdef", ["f", null]); - assertFalse(RegExp(r"(?\D){3})f", unicode: true).hasMatch("abcdef")); - - execString(r"(?\D){3})f|f", "abcdef", ["f", null]); - execString(r"(?(?.)|(?.)", unicode: true).firstMatch("abcd"); - Expect.setEquals(["fst", "snd"], match.groupNames); - - // Backslash as ID_Start and ID_Continue (v8:5868). - assertThrows(() => RegExp("(?<\\>.)")); // '\' misclassified as ID_Start. - assertThrows(() => RegExp("(?.)")); // '\' misclassified as ID_Continue. - - // Backreference before the group (exercises the capture mini-parser). - assertThrows(() => RegExp(r"/\1(?:.)", unicode: true)); - assertThrows(() => RegExp(r"/\1(?<=a).", unicode: true)); - assertThrows(() => RegExp(r"/\1(?.)", "abcd", ["a", "a"]); - - // Unicode escapes in capture names. (Testing both unicode interpreted by - // Dart string handling and also escaped unicode making it to RegExp parser.) - - // \u Lead \u Trail - assertTrue(RegExp("(?.)", unicode: true).hasMatch("a")); - assertTrue(RegExp(r"(?.)", unicode: true).hasMatch("a")); - assertThrows(() => RegExp("(?.)", unicode: true)); // \u Lead - assertThrows(() => RegExp(r"(?.)", unicode: true)); // \u Lead - assertThrows(() => RegExp("(?.)", unicode: true)); // \u Trail - assertThrows(() => RegExp(r"(?.)", unicode: true)); // \u Trail - // \u NonSurrogate - assertTrue(RegExp("(?<\u0041>.)", unicode: true).hasMatch("a")); - assertTrue(RegExp(r"(?<\u0041>.)", unicode: true).hasMatch("a")); - // \u{ Surrogate, ID_Continue } - assertTrue(RegExp("(?.)", unicode: true).hasMatch("a")); - assertTrue(RegExp(r"(?.)", unicode: true).hasMatch("a")); - - // \u{ Out-of-bounds } -- only need to test RegExp parser for this. - assertThrows(() => RegExp(r"(?.)", unicode: true)); - - // Also checking non-unicode patterns, where surrogate pairs will not - // be combined (so only \u0041 will have any success). - - // assertThrows(() => RegExp("(?.)")); - // assertThrows(() => RegExp(r"(?.)")); - // assertThrows(() => RegExp("(?.)")); - // assertThrows(() => RegExp(r"(?.)")); - // assertThrows(() => RegExp("(?.)")); - // assertThrows(() => RegExp(r"(?.)")); - assertTrue(RegExp("(?<\u0041>.)").hasMatch("a")); - assertTrue(RegExp(r"(?<\u0041>.)").hasMatch("a")); - // assertThrows(() => RegExp("(?.)")); - // assertThrows(() => RegExp(r"(?.)")); - // assertThrows(() => RegExp("(?.)")); - // assertThrows(() => RegExp(r"(?.)")); - // assertThrows(() => RegExp(r"(?.)")); -} diff --git a/tests/corelib_2/regexp/negative-special-characters_test.dart b/tests/corelib_2/regexp/negative-special-characters_test.dart deleted file mode 100644 index 2ce02a1f34f..00000000000 --- a/tests/corelib_2/regexp/negative-special-characters_test.dart +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description("This test checks Unicode in negative RegExp character classes."); - - dynamic testPassed(str) {} - dynamic testFailed(str) => Expect.fail(str); - - dynamic test(pattern, str, expected_length) { - var result = str.replaceAll( - new RegExp(pattern, caseSensitive: false, multiLine: true), ''); - - if (result.length == expected_length) - testPassed('"' + pattern + '", ' + '"' + str + '".'); - else - testFailed( - '"' + pattern + '", ' + '"' + str + '". Was "' + result + '".'); - } - - test("\\s", " \t\f\v\r\n", 0); // ASCII whitespace. - test("\\S", "Проверка", 0); // Cyrillic letters are non-whitespace... - test("\\s", "Проверка", 8); // ...and they aren't whitespace. - test("[\\s]", "Проверка", 8); - test("[\\S]", "Проверка", 0); - test("[^\\s]", "Проверка", 0); - test("[^\\S]", "Проверка", 8); - test("[\\s\\S]*", "\\u2002Проверка\\r\\n\\u00a0", 0); - test("\\S\\S", "уф", 0); - test("\\S{2}", "уф", 0); - - test("\\w", "Проверка", - 8); // Alas, only ASCII characters count as word ones in JS. - test("\\W", "Проверка", 0); - test("[\\w]", "Проверка", 8); - test("[\\W]", "Проверка", 0); - test("[^\\w]", "Проверка", 0); - test("[^\\W]", "Проверка", 8); - test("\\W\\W", "уф", 0); - test("\\W{2}", "уф", 0); - - test("\\d", "Проверка", 8); // Digit and non-digit. - test("\\D", "Проверка", 0); - test("[\\d]", "Проверка", 8); - test("[\\D]", "Проверка", 0); - test("[^\\d]", "Проверка", 0); - test("[^\\D]", "Проверка", 8); - test("\\D\\D", "уф", 0); - test("\\D{2}", "уф", 0); - - test("[\\S\\d]", "Проверка123", 0); - test("[\\d\\S]", "Проверка123", 0); - test("[^\\S\\d]", "Проверка123", 11); - test("[^\\d\\S]", "Проверка123", 11); - - test("[ \\S]", " Проверка ", 0); - test("[\\S ]", " Проверка ", 0); - test("[ф \\S]", " Проверка ", 0); - test("[\\Sф ]", " Проверка ", 0); - - test("[^р\\S]", " Проверка ", 8); - test("[^\\Sр]", " Проверка ", 8); - test("[^р\\s]", " Проверка ", 4); - test("[^\\sр]", " Проверка ", 4); - - test("[ф \\s\\S]", "Проверка \\r\\n", 0); - test("[\\S\\sф ]", "Проверка \\r\\n", 0); - - test("[^z]", "Проверка \\r\\n", 0); - test("[^ф]", "Проверка \\r\\n", 0); -} diff --git a/tests/corelib_2/regexp/no-extensions_test.dart b/tests/corelib_2/regexp/no-extensions_test.dart deleted file mode 100644 index 8e717c9ca3b..00000000000 --- a/tests/corelib_2/regexp/no-extensions_test.dart +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - 'Tests that regular expressions do not have extensions that diverge from the JavaScript specification. ' + - 'Because WebKit originally used a copy of PCRE, various non-JavaScript regular expression features were historically present. ' + - 'Also tests various related edge cases.'); - - shouldBeNull(new RegExp(r"\\x{41}").firstMatch("yA1")); - assertEquals(new RegExp(r"[\x{41}]").firstMatch("yA1").group(0), "1"); - assertEquals(new RegExp(r"\x1g").firstMatch("x1g").group(0), "x1g"); - assertEquals(new RegExp(r"[\x1g]").firstMatch("x").group(0), "x"); - assertEquals(new RegExp(r"[\x1g]").firstMatch("1").group(0), "1"); - assertEquals( - new RegExp(r"\2147483648") - .firstMatch(new String.fromCharCode(140) + "7483648") - .group(0), - new String.fromCharCode(140) + "7483648"); - assertEquals(new RegExp(r"\4294967296").firstMatch("\"94967296").group(0), - "\"94967296"); - assertEquals(new RegExp(r"\8589934592").firstMatch("\8589934592").group(0), - "\8589934592"); - assertEquals( - "\nAbc\n".replaceAllMapped(new RegExp(r"(\n)[^\n]+$"), (m) => m.group(1)), - "\nAbc\n"); - shouldBeNull(new RegExp(r"x$").firstMatch("x\n")); - assertThrows(() => new RegExp(r"x++")); - shouldBeNull(new RegExp(r"[]]").firstMatch("]")); - - assertEquals(new RegExp(r"\060").firstMatch("y01").group(0), "0"); - assertEquals(new RegExp(r"[\060]").firstMatch("y01").group(0), "0"); - assertEquals(new RegExp(r"\606").firstMatch("y06").group(0), "06"); - assertEquals(new RegExp(r"[\606]").firstMatch("y06").group(0), "0"); - assertEquals(new RegExp(r"[\606]").firstMatch("y6").group(0), "6"); - assertEquals(new RegExp(r"\101").firstMatch("yA1").group(0), "A"); - assertEquals(new RegExp(r"[\101]").firstMatch("yA1").group(0), "A"); - assertEquals(new RegExp(r"\1011").firstMatch("yA1").group(0), "A1"); - assertEquals(new RegExp(r"[\1011]").firstMatch("yA1").group(0), "A"); - assertEquals(new RegExp(r"[\1011]").firstMatch("y1").group(0), "1"); - assertEquals( - new RegExp(r"\10q") - .firstMatch("y" + new String.fromCharCode(8) + "q") - .group(0), - new String.fromCharCode(8) + "q"); - assertEquals( - new RegExp(r"[\10q]") - .firstMatch("y" + new String.fromCharCode(8) + "q") - .group(0), - new String.fromCharCode(8)); - assertEquals( - new RegExp(r"\1q") - .firstMatch("y" + new String.fromCharCode(1) + "q") - .group(0), - new String.fromCharCode(1) + "q"); - assertEquals( - new RegExp(r"[\1q]") - .firstMatch("y" + new String.fromCharCode(1) + "q") - .group(0), - new String.fromCharCode(1)); - assertEquals(new RegExp(r"[\1q]").firstMatch("yq").group(0), "q"); - assertEquals(new RegExp(r"\8q").firstMatch("\8q").group(0), "\8q"); - assertEquals(new RegExp(r"[\8q]").firstMatch("y8q").group(0), "8"); - assertEquals(new RegExp(r"[\8q]").firstMatch("yq").group(0), "q"); - shouldBe(new RegExp(r"(x)\1q").firstMatch("xxq"), ["xxq", "x"]); - shouldBe(new RegExp(r"(x)[\1q]").firstMatch("xxq"), ["xq", "x"]); - shouldBe( - new RegExp(r"(x)[\1q]").firstMatch("xx" + new String.fromCharCode(1)), - ["x" + new String.fromCharCode(1), "x"]); -} diff --git a/tests/corelib_2/regexp/non-bmp_test.dart b/tests/corelib_2/regexp/non-bmp_test.dart deleted file mode 100644 index 1bdf7434826..00000000000 --- a/tests/corelib_2/regexp/non-bmp_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description('Tests that regular expressions treat non-BMP characters as two separate characters. ' + - 'From a Unicode correctness point of view this is wrong, but it is what other browsers do. ' + - 'And given that we store strings as UTF-16, it is also more efficient to implement. ' + - 'Also test some other cases related to UTF-8 and UTF-16.'); - - var surrogatePair = - new String.fromCharCode(0xD800) + new String.fromCharCode(0xDC00); - - assertEquals(new RegExp(r".").firstMatch(surrogatePair).group(0).length, 1); - assertEquals(new RegExp(r"\D").firstMatch(surrogatePair).group(0).length, 1); - assertEquals(new RegExp(r"\S").firstMatch(surrogatePair).group(0).length, 1); - assertEquals(new RegExp(r"\W").firstMatch(surrogatePair).group(0).length, 1); - assertEquals( - new RegExp(r"[^x]").firstMatch(surrogatePair).group(0).length, 1); - - assertEquals( - new RegExp(r".{1,2}") - .firstMatch("!!" + new String.fromCharCode(0xA1)) - .group(0) - .length, - 2); - shouldBeNull(new RegExp(r".").firstMatch("")); -} diff --git a/tests/corelib_2/regexp/non-capturing-backtracking_test.dart b/tests/corelib_2/regexp/non-capturing-backtracking_test.dart deleted file mode 100644 index c6448a33f7b..00000000000 --- a/tests/corelib_2/regexp/non-capturing-backtracking_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - "This page tests for proper backtracking with greedy quantifiers and non-capturing parentheses."); - - var re = new RegExp(r"(?:a*)a"); - shouldBe(re.firstMatch('a'), ['a']); -} diff --git a/tests/corelib_2/regexp/non-capturing-groups_test.dart b/tests/corelib_2/regexp/non-capturing-groups_test.dart deleted file mode 100644 index d131843413c..00000000000 --- a/tests/corelib_2/regexp/non-capturing-groups_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - 'Test for behavior of non-capturing groups, as described in ' + - 'a blog post by Steven Levithan and bug 14931.'); - - shouldBeTrue(new RegExp(r"(x)?\1y").hasMatch("y")); - shouldBe(new RegExp(r"(x)?\1y").firstMatch("y"), ["y", null]); - shouldBe(new RegExp(r"(x)?y").firstMatch("y"), ["y", null]); - shouldBe(firstMatch("y", new RegExp(r"(x)?\1y")), ["y", null]); - shouldBe(firstMatch("y", new RegExp(r"(x)?y")), ["y", null]); - shouldBe(firstMatch("y", new RegExp(r"(x)?\1y")), ["y", null]); - Expect.listEquals("y".split(new RegExp(r"(x)?\1y")), ["", ""]); - Expect.listEquals("y".split(new RegExp(r"(x)?y")), ["", ""]); - assertEquals("y".indexOf(new RegExp(r"(x)?\1y")), 0); - assertEquals("y".replaceAll(new RegExp(r"(x)?\1y"), "z"), "z"); - assertEquals( - "y".replaceAllMapped(new RegExp(r"(x)?y"), (m) => m.group(1)), "null"); - assertEquals( - "y".replaceAllMapped(new RegExp(r"(x)?\1y"), (m) => m.group(1)), "null"); - assertEquals( - "y".replaceAllMapped(new RegExp(r"(x)?y"), (m) => m.group(1)), "null"); -} diff --git a/tests/corelib_2/regexp/non-character_test.dart b/tests/corelib_2/regexp/non-character_test.dart deleted file mode 100644 index 1a0c69c1a04..00000000000 --- a/tests/corelib_2/regexp/non-character_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - 'Test for regular expressions with non-character values in them, specifically in character classes.'); - - shouldBeNull(firstMatch("F", new RegExp(r"[\uD7FF]"))); - shouldBeNull(firstMatch("0", new RegExp(r"[\uD800]"))); - shouldBeNull(firstMatch("F", new RegExp(r"[\uDFFF]"))); - shouldBeNull(firstMatch("E", new RegExp(r"[\uE000]"))); - shouldBeNull(firstMatch("y", new RegExp(r"[\uFDBF]"))); - shouldBeNull(firstMatch("y", new RegExp(r"[\uFDD0]"))); - shouldBeNull(firstMatch("y", new RegExp(r"[\uFDEF]"))); - shouldBeNull(firstMatch("y", new RegExp(r"[\uFDF0]"))); - shouldBeNull(firstMatch("y", new RegExp(r"[\uFEFF]"))); - shouldBeNull(firstMatch("y", new RegExp(r"[\uFEFF]"))); - shouldBeNull(firstMatch("y", new RegExp(r"[\uFFFE]"))); - shouldBeNull(firstMatch("y", new RegExp(r"[\uFFFF]"))); - shouldBeNull(firstMatch("y", new RegExp(r"[\u10FFFF]"))); - shouldBeNull(firstMatch("y", new RegExp(r"[\u110000]"))); -} diff --git a/tests/corelib_2/regexp/non-greedy-parentheses_test.dart b/tests/corelib_2/regexp/non-greedy-parentheses_test.dart deleted file mode 100644 index 69a3ef352d5..00000000000 --- a/tests/corelib_2/regexp/non-greedy-parentheses_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - 'Test for regression against Wrong result in case of non-iterative matching of subpatterns in non-greedy cases in YARR Interpreter'); - - shouldBe(firstMatch("a", new RegExp(r"(a)??")), ["", null]); - shouldBe(firstMatch("b", new RegExp(r"(a)??")), ["", null]); - shouldBe(firstMatch("ab", new RegExp(r"(a)??b")), ["ab", "a"]); - shouldBe(firstMatch("aaab", new RegExp(r"(a+)??b")), ["aaab", "aaa"]); - shouldBe( - firstMatch("abbc", new RegExp(r"(a)??(b+)??c")), ["abbc", "a", "bb"]); - shouldBe(firstMatch("ac", new RegExp(r"(a)??(b)??c")), ["ac", "a", null]); - shouldBe(firstMatch("abc", new RegExp(r"(a(b)??)??c")), ["abc", "ab", "b"]); - shouldBe(firstMatch("ac", new RegExp(r"(a(b)??)??c")), ["ac", "a", null]); -} diff --git a/tests/corelib_2/regexp/norepeat_test.dart b/tests/corelib_2/regexp/norepeat_test.dart deleted file mode 100644 index c2a1d3d8309..00000000000 --- a/tests/corelib_2/regexp/norepeat_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description('Test for https://bugs.webkit.org/show_bug.cgi?id=46077'); - - var re = new RegExp(r"^b|^cd"); - var str = "abcd"; - shouldBeFalse(re.hasMatch(str)); -} diff --git a/tests/corelib_2/regexp/overflow_test.dart b/tests/corelib_2/regexp/overflow_test.dart deleted file mode 100644 index af3e2dcc8ee..00000000000 --- a/tests/corelib_2/regexp/overflow_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - "This test checks expressions with alternative lengths of appox. 2^31."); - - var regexp1 = new RegExp(r"(?:(?=g))|(?:m).{2147483648,}"); - shouldBeNull(regexp1.firstMatch('')); - - var regexp2 = new RegExp(r"(?:(?=g)).{2147483648,}"); - shouldBeNull(regexp2.firstMatch('')); - - var s3 = - r"&{6}u4a64YfQP{C}u88c4u5772Qu8693{4294967167}u85f2u7f3fs((uf202){4})u5bc6u1947"; - var regexp3 = new RegExp(s3); - shouldBeNull(regexp3.firstMatch(s3)); - - var regexp4 = new RegExp(r"[^a$]{4294967295}"); - shouldBeNull(regexp4.firstMatch(s3)); -} diff --git a/tests/corelib_2/regexp/parentheses_test.dart b/tests/corelib_2/regexp/parentheses_test.dart deleted file mode 100644 index 87bbe1362e5..00000000000 --- a/tests/corelib_2/regexp/parentheses_test.dart +++ /dev/null @@ -1,360 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description("This page tests handling of parentheses subexpressions."); - - var regexp1 = new RegExp(r"(a|A)(b|B)"); - shouldBe(regexp1.firstMatch('abc'), ['ab', 'a', 'b']); - - var regexp2 = new RegExp(r"(a((b)|c|d))e"); - shouldBe(regexp2.firstMatch('abacadabe'), ['abe', 'ab', 'b', 'b']); - - var regexp3 = new RegExp(r"(a(b|(c)|d))e"); - shouldBe(regexp3.firstMatch('abacadabe'), ['abe', 'ab', 'b', null]); - - var regexp4 = new RegExp(r"(a(b|c|(d)))e"); - shouldBe(regexp4.firstMatch('abacadabe'), ['abe', 'ab', 'b', null]); - - var regexp5 = new RegExp(r"(a((b)|(c)|(d)))e"); - shouldBe( - regexp5.firstMatch('abacadabe'), ['abe', 'ab', 'b', 'b', null, null]); - - var regexp6 = new RegExp(r"(a((b)|(c)|(d)))"); - shouldBe(regexp6.firstMatch('abcde'), ['ab', 'ab', 'b', 'b', null, null]); - - var regexp7 = new RegExp(r"(a(b)??)??c"); - shouldBe(regexp7.firstMatch('abc'), ['abc', 'ab', 'b']); - - var regexp8 = new RegExp(r"(a|(e|q))(x|y)"); - shouldBe(regexp8.firstMatch('bcaddxqy'), ['qy', 'q', 'q', 'y']); - - var regexp9 = new RegExp(r"((t|b)?|a)$"); - shouldBe( - regexp9.firstMatch('asdfjejgsdflaksdfjkeljghkjea'), ['a', 'a', null]); - - var regexp10 = new RegExp(r"(?:h|e?(?:t|b)?|a?(?:t|b)?)(?:$)"); - shouldBe(regexp10.firstMatch('asdfjejgsdflaksdfjkeljghat'), ['at']); - - var regexp11 = new RegExp(r"([Jj]ava([Ss]cript)?)\sis\s(fun\w*)"); - shouldBeNull(regexp11.firstMatch( - 'Developing with JavaScript is dangerous, do not try it without assistance')); - - var regexp12 = new RegExp(r"(?:(.+), )?(.+), (..) to (?:(.+), )?(.+), (..)"); - shouldBe(regexp12.firstMatch('Seattle, WA to Buckley, WA'), [ - 'Seattle, WA to Buckley, WA', - null, - 'Seattle', - 'WA', - null, - 'Buckley', - 'WA' - ]); - - var regexp13 = new RegExp(r"(A)?(A.*)"); - shouldBe(regexp13.firstMatch('zxcasd;fl\ ^AaaAAaaaf;lrlrzs'), - ['AaaAAaaaf;lrlrzs', null, 'AaaAAaaaf;lrlrzs']); - - var regexp14 = new RegExp(r"(a)|(b)"); - shouldBe(regexp14.firstMatch('b'), ['b', null, 'b']); - - var regexp15 = new RegExp(r"^(?!(ab)de|x)(abd)(f)"); - shouldBe(regexp15.firstMatch('abdf'), ['abdf', null, 'abd', 'f']); - - var regexp16 = new RegExp(r"(a|A)(b|B)"); - shouldBe(regexp16.firstMatch('abc'), ['ab', 'a', 'b']); - - var regexp17 = new RegExp(r"(a|d|q|)x", caseSensitive: false); - shouldBe(regexp17.firstMatch('bcaDxqy'), ['Dx', 'D']); - - var regexp18 = new RegExp(r"^.*?(:|$)"); - shouldBe(regexp18.firstMatch('Hello: World'), ['Hello:', ':']); - - var regexp19 = new RegExp(r"(ab|^.{0,2})bar"); - shouldBe(regexp19.firstMatch('barrel'), ['bar', '']); - - var regexp20 = new RegExp(r"(?:(?!foo)...|^.{0,2})bar(.*)"); - shouldBe(regexp20.firstMatch('barrel'), ['barrel', 'rel']); - shouldBe(regexp20.firstMatch('2barrel'), ['2barrel', 'rel']); - - var regexp21 = new RegExp(r"([a-g](b|B)|xyz)"); - shouldBe(regexp21.firstMatch('abc'), ['ab', 'ab', 'b']); - - var regexp22 = new RegExp(r"(?:^|;)\s*abc=([^;]*)"); - shouldBeNull(regexp22.firstMatch('abcdlskfgjdslkfg')); - - var regexp23 = new RegExp("\"[^<\"]*\"|'[^<']*'"); - shouldBe(regexp23.firstMatch('"\'\s]*)?)|(/?>)|.[^\w\s>]*)'); - shouldBe(regexp33.firstMatch('> '), ['>', null, null, '>']); - - var regexp34 = new RegExp(r"(?:^|\b)btn-\S+"); - shouldBeNull(regexp34.firstMatch('xyz123')); - shouldBe(regexp34.firstMatch('btn-abc'), ['btn-abc']); - shouldBeNull(regexp34.firstMatch('btn- abc')); - shouldBeNull(regexp34.firstMatch('XXbtn-abc')); - shouldBe(regexp34.firstMatch('XX btn-abc'), ['btn-abc']); - - var regexp35 = new RegExp(r"^((a|b)(x|xxx)|)$"); - shouldBe(regexp35.firstMatch('ax'), ['ax', 'ax', 'a', 'x']); - shouldBeNull(regexp35.firstMatch('axx')); - shouldBe(regexp35.firstMatch('axxx'), ['axxx', 'axxx', 'a', 'xxx']); - shouldBe(regexp35.firstMatch('bx'), ['bx', 'bx', 'b', 'x']); - shouldBeNull(regexp35.firstMatch('bxx')); - shouldBe(regexp35.firstMatch('bxxx'), ['bxxx', 'bxxx', 'b', 'xxx']); - - var regexp36 = new RegExp(r"^((\/|\.|\-)(\d\d|\d\d\d\d)|)$"); - shouldBe(regexp36.firstMatch('/2011'), ['/2011', '/2011', '/', '2011']); - shouldBe(regexp36.firstMatch('/11'), ['/11', '/11', '/', '11']); - shouldBeNull(regexp36.firstMatch('/123')); - - var regexp37 = new RegExp( - r"^([1][0-2]|[0]\d|\d)(\/|\.|\-)([0-2]\d|[3][0-1]|\d)((\/|\.|\-)(\d\d|\d\d\d\d)|)$"); - shouldBe(regexp37.firstMatch('7/4/1776'), - ['7/4/1776', '7', '/', '4', '/1776', '/', '1776']); - shouldBe(regexp37.firstMatch('07-04-1776'), - ['07-04-1776', '07', '-', '04', '-1776', '-', '1776']); - - var regexp38 = new RegExp(r"^(z|(x|xx)|b|)$"); - shouldBe(regexp38.firstMatch('xx'), ['xx', 'xx', 'xx']); - shouldBe(regexp38.firstMatch('b'), ['b', 'b', null]); - shouldBe(regexp38.firstMatch('z'), ['z', 'z', null]); - shouldBe(regexp38.firstMatch(''), ['', '', null]); - - var regexp39 = new RegExp(r"(8|((?=P)))?"); - shouldBe(regexp39.firstMatch(''), ['', null, null]); - shouldBe(regexp39.firstMatch('8'), ['8', '8', null]); - shouldBe(regexp39.firstMatch('zP'), ['', null, null]); - - var regexp40 = new RegExp(r"((8)|((?=P){4}))?()"); - shouldBe(regexp40.firstMatch(''), ['', null, null, null, '']); - shouldBe(regexp40.firstMatch('8'), ['8', '8', '8', null, '']); - shouldBe(regexp40.firstMatch('zPz'), ['', null, null, null, '']); - shouldBe(regexp40.firstMatch('zPPz'), ['', null, null, null, '']); - shouldBe(regexp40.firstMatch('zPPPz'), ['', null, null, null, '']); - shouldBe(regexp40.firstMatch('zPPPPz'), ['', null, null, null, '']); - - var regexp41 = new RegExp( - r"(([\w\-]+:\/\/?|www[.])[^\s()<>]+(?:([\w\d]+)|([^\[:punct:\]\s()<>\W]|\/)))"); - shouldBe( - regexp41.firstMatch( - 'Here is a link: http://www.acme.com/our_products/index.html. That is all we want!'), - [ - 'http://www.acme.com/our_products/index.html', - 'http://www.acme.com/our_products/index.html', - 'http://', - 'l', - null - ]); - - var regexp42 = new RegExp(r"((?:(4)?))?"); - shouldBe(regexp42.firstMatch(''), ['', null, null]); - shouldBe(regexp42.firstMatch('4'), ['4', '4', '4']); - shouldBe(regexp42.firstMatch('4321'), ['4', '4', '4']); - - shouldBeTrue(new RegExp(r"(?!(?=r{0}){2,})|((z)?)?", caseSensitive: false) - .hasMatch('')); - - var regexp43 = new RegExp(r"(?!(?:\1+s))"); - shouldBe(regexp43.firstMatch('SSS'), ['']); - - var regexp44 = new RegExp(r"(?!(?:\3+(s+?)))"); - shouldBe(regexp44.firstMatch('SSS'), ['', null]); - - var regexp45 = new RegExp(r"((?!(?:|)v{2,}|))"); - shouldBeNull(regexp45.firstMatch('vt')); - - var regexp46 = new RegExp(r"(w)(?:5{3}|())|pk"); - shouldBeNull(regexp46.firstMatch('5')); - shouldBe(regexp46.firstMatch('pk'), ['pk', null, null]); - shouldBe(regexp46.firstMatch('Xw555'), ['w555', 'w', null]); - shouldBe(regexp46.firstMatch('Xw55pk5'), ['w', 'w', '']); - - var regexp47 = new RegExp(r"(.*?)(?:(?:\?(.*?)?)?)(?:(?:#)?)$"); - shouldBe(regexp47.firstMatch('/www.acme.com/this/is/a/path/file.txt'), [ - '/www.acme.com/this/is/a/path/file.txt', - '/www.acme.com/this/is/a/path/file.txt', - null - ]); - - var regexp48 = new RegExp( - r"^(?:(\w+):\/*([\w\.\-\d]+)(?::(\d+)|)(?=(?:\/|$))|)(?:$|\/?(.*?)(?:\?(.*?)?|)(?:#(.*)|)$)"); - shouldBe(regexp48.firstMatch('http://www.acme.com/this/is/a/path/file.txt'), [ - 'http://www.acme.com/this/is/a/path/file.txt', - 'http', - 'www.acme.com', - null, - 'this/is/a/path/file.txt', - null, - null - ]); - - var regexp49 = new RegExp( - r"(?:([^:]*?)(?:(?:\?(.*?)?)?)(?:(?:#)?)$)|(?:^(?:(\w+):\/*([\w\.\-\d]+)(?::(\d+)|)(?=(?:\/|$))|)(?:$|\/?(.*?)(?:\?(.*?)?|)(?:#(.*)|)$))"); - shouldBe(regexp49.firstMatch('http://www.acme.com/this/is/a/path/file.txt'), [ - 'http://www.acme.com/this/is/a/path/file.txt', - null, - null, - 'http', - 'www.acme.com', - null, - 'this/is/a/path/file.txt', - null, - null - ]); - - var regexp50 = new RegExp(r"((a)b{28,}c|d)x"); - shouldBeNull(regexp50.firstMatch('((a)b{28,}c|d)x')); - shouldBe(regexp50.firstMatch('abbbbbbbbbbbbbbbbbbbbbbbbbbbbcx'), [ - 'abbbbbbbbbbbbbbbbbbbbbbbbbbbbcx', - 'abbbbbbbbbbbbbbbbbbbbbbbbbbbbc', - 'a' - ]); - shouldBe(regexp50.firstMatch('dx'), ['dx', 'd', null]); - - var s = "((.\s{-}).{28,}\P{Yi}?{,30}\|.)\x9e{-,}\P{Any}"; - var regexp51 = new RegExp(s); - shouldBeNull(regexp51.firstMatch('abc')); - shouldBe(regexp51.firstMatch(s), [')\x9e{-,}P{Any}', ')', null]); - - var regexp52 = new RegExp(r"(Rob)|(Bob)|(Robert)|(Bobby)"); - shouldBe(regexp52.firstMatch('Hi Bob'), ['Bob', null, 'Bob', null, null]); - - // Test cases discovered by fuzzing that crashed the compiler. - var regexp53 = new RegExp( - r"(?=(?:(?:(gB)|(?!cs|<))((?=(?!v6){0,})))|(?=#)+?)", - multiLine: true); - shouldBe(regexp53.firstMatch('#'), ['', null, '']); - var regexp54 = new RegExp(r"((?:(?:()|(?!))((?=(?!))))|())", multiLine: true); - shouldBe(regexp54.firstMatch('#'), ['', '', null, null, '']); - var regexp55 = new RegExp(r"(?:(?:(?:a?|(?:))((?:)))|a?)", multiLine: true); - shouldBe(regexp55.firstMatch('#'), ['', '']); - - // Test evaluation order of empty subpattern alternatives. - var regexp56 = new RegExp(r"(|a)"); - shouldBe(regexp56.firstMatch('a'), ['', '']); - var regexp57 = new RegExp(r"(a|)"); - shouldBe(regexp57.firstMatch('a'), ['a', 'a']); - - // Tests that non-greedy repeat quantified parentheses will backtrack through multiple frames of subpattern matches. - var regexp58 = new RegExp(r"a|b(?:[^b])*?c"); - shouldBe(regexp58.firstMatch('badbc'), ['a']); - var regexp59 = new RegExp(r"(X(?:.(?!X))*?Y)|(Y(?:.(?!Y))*?Z)"); - Expect.listEquals( - regexp59 - .allMatches('Y aaa X Match1 Y aaa Y Match2 Z') - .map((m) => m.group(0)) - .toList(), - ['X Match1 Y', 'Y Match2 Z']); -} diff --git a/tests/corelib_2/regexp/pcre-test-4_test.dart b/tests/corelib_2/regexp/pcre-test-4_test.dart deleted file mode 100644 index a73e42a75c3..00000000000 --- a/tests/corelib_2/regexp/pcre-test-4_test.dart +++ /dev/null @@ -1,1033 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - "A chunk of our port of PCRE's test suite, adapted to be more applicable to JavaScript."); - - var regex0 = new RegExp(r"a.b"); - var input0 = "acb"; - var results = ["acb"]; - shouldBe(regex0.firstMatch(input0), results); - var input1 = "a\x7fb"; - results = ["a\u007fb"]; - shouldBe(regex0.firstMatch(input1), results); - var input2 = "a\u0100b"; - results = ["a\u0100b"]; - shouldBe(regex0.firstMatch(input2), results); - // Failers - var input3 = "a\nb"; - results = null; - shouldBe(regex0.firstMatch(input3), results); - - var regex1 = new RegExp(r"a(.{3})b"); - input0 = "a\u4000xyb"; - results = ["a\u4000xyb", "\u4000xy"]; - shouldBe(regex1.firstMatch(input0), results); - input1 = "a\u4000\x7fyb"; - results = ["a\u4000\u007fyb", "\u4000\u007fy"]; - shouldBe(regex1.firstMatch(input1), results); - input2 = "a\u4000\u0100yb"; - results = ["a\u4000\u0100yb", "\u4000\u0100y"]; - shouldBe(regex1.firstMatch(input2), results); - // Failers - input3 = "a\u4000b"; - results = null; - shouldBe(regex1.firstMatch(input3), results); - var input4 = "ac\ncb"; - results = null; - shouldBe(regex1.firstMatch(input4), results); - - var regex2 = new RegExp(r"a(.*?)(.)"); - input0 = "a\xc0\x88b"; - results = ["a\xc0", "", "\xc0"]; - shouldBe(regex2.firstMatch(input0), results); - - var regex3 = new RegExp(r"a(.*?)(.)"); - input0 = "a\u0100b"; - results = ["a\u0100", "", "\u0100"]; - shouldBe(regex3.firstMatch(input0), results); - - var regex4 = new RegExp(r"a(.*)(.)"); - input0 = "a\xc0\x88b"; - results = ["a\xc0\x88b", "\xc0\x88", "b"]; - shouldBe(regex4.firstMatch(input0), results); - - var regex5 = new RegExp(r"a(.*)(.)"); - input0 = "a\u0100b"; - results = ["a\u0100b", "\u0100", "b"]; - shouldBe(regex5.firstMatch(input0), results); - - var regex6 = new RegExp(r"a(.)(.)"); - input0 = "a\xc0\x92bcd"; - results = ["a\xc0\x92", "\xc0", "\x92"]; - shouldBe(regex6.firstMatch(input0), results); - - var regex7 = new RegExp(r"a(.)(.)"); - input0 = "a\u0240bcd"; - results = ["a\u0240b", "\u0240", "b"]; - shouldBe(regex7.firstMatch(input0), results); - - var regex8 = new RegExp(r"a(.?)(.)"); - input0 = "a\xc0\x92bcd"; - results = ["a\xc0\x92", "\xc0", "\x92"]; - shouldBe(regex8.firstMatch(input0), results); - - var regex9 = new RegExp(r"a(.?)(.)"); - input0 = "a\u0240bcd"; - results = ["a\u0240b", "\u0240", "b"]; - shouldBe(regex9.firstMatch(input0), results); - - var regex10 = new RegExp(r"a(.??)(.)"); - input0 = "a\xc0\x92bcd"; - results = ["a\xc0", "", "\xc0"]; - shouldBe(regex10.firstMatch(input0), results); - - var regex11 = new RegExp(r"a(.??)(.)"); - input0 = "a\u0240bcd"; - results = ["a\u0240", "", "\u0240"]; - shouldBe(regex11.firstMatch(input0), results); - - var regex12 = new RegExp(r"a(.{3})b"); - input0 = "a\u1234xyb"; - results = ["a\u1234xyb", "\u1234xy"]; - shouldBe(regex12.firstMatch(input0), results); - input1 = "a\u1234\u4321yb"; - results = ["a\u1234\u4321yb", "\u1234\u4321y"]; - shouldBe(regex12.firstMatch(input1), results); - input2 = "a\u1234\u4321\u3412b"; - results = ["a\u1234\u4321\u3412b", "\u1234\u4321\u3412"]; - shouldBe(regex12.firstMatch(input2), results); - // Failers - input3 = "a\u1234b"; - results = null; - shouldBe(regex12.firstMatch(input3), results); - input4 = "ac\ncb"; - results = null; - shouldBe(regex12.firstMatch(input4), results); - - var regex13 = new RegExp(r"a(.{3,})b"); - input0 = "a\u1234xyb"; - results = ["a\u1234xyb", "\u1234xy"]; - shouldBe(regex13.firstMatch(input0), results); - input1 = "a\u1234\u4321yb"; - results = ["a\u1234\u4321yb", "\u1234\u4321y"]; - shouldBe(regex13.firstMatch(input1), results); - input2 = "a\u1234\u4321\u3412b"; - results = ["a\u1234\u4321\u3412b", "\u1234\u4321\u3412"]; - shouldBe(regex13.firstMatch(input2), results); - input3 = "axxxxbcdefghijb"; - results = ["axxxxbcdefghijb", "xxxxbcdefghij"]; - shouldBe(regex13.firstMatch(input3), results); - input4 = "a\u1234\u4321\u3412\u3421b"; - results = ["a\u1234\u4321\u3412\u3421b", "\u1234\u4321\u3412\u3421"]; - shouldBe(regex13.firstMatch(input4), results); - // Failers - var input5 = "a\u1234b"; - results = null; - shouldBe(regex13.firstMatch(input5), results); - - var regex14 = new RegExp(r"a(.{3,}?)b"); - input0 = "a\u1234xyb"; - results = ["a\u1234xyb", "\u1234xy"]; - shouldBe(regex14.firstMatch(input0), results); - input1 = "a\u1234\u4321yb"; - results = ["a\u1234\u4321yb", "\u1234\u4321y"]; - shouldBe(regex14.firstMatch(input1), results); - input2 = "a\u1234\u4321\u3412b"; - results = ["a\u1234\u4321\u3412b", "\u1234\u4321\u3412"]; - shouldBe(regex14.firstMatch(input2), results); - input3 = "axxxxbcdefghijb"; - results = ["axxxxb", "xxxx"]; - shouldBe(regex14.firstMatch(input3), results); - input4 = "a\u1234\u4321\u3412\u3421b"; - results = ["a\u1234\u4321\u3412\u3421b", "\u1234\u4321\u3412\u3421"]; - shouldBe(regex14.firstMatch(input4), results); - // Failers - input5 = "a\u1234b"; - results = null; - shouldBe(regex14.firstMatch(input5), results); - - var regex15 = new RegExp(r"a(.{3,5})b"); - input0 = "a\u1234xyb"; - results = ["a\u1234xyb", "\u1234xy"]; - shouldBe(regex15.firstMatch(input0), results); - input1 = "a\u1234\u4321yb"; - results = ["a\u1234\u4321yb", "\u1234\u4321y"]; - shouldBe(regex15.firstMatch(input1), results); - input2 = "a\u1234\u4321\u3412b"; - results = ["a\u1234\u4321\u3412b", "\u1234\u4321\u3412"]; - shouldBe(regex15.firstMatch(input2), results); - input3 = "axxxxbcdefghijb"; - results = ["axxxxb", "xxxx"]; - shouldBe(regex15.firstMatch(input3), results); - input4 = "a\u1234\u4321\u3412\u3421b"; - results = ["a\u1234\u4321\u3412\u3421b", "\u1234\u4321\u3412\u3421"]; - shouldBe(regex15.firstMatch(input4), results); - input5 = "axbxxbcdefghijb"; - results = ["axbxxb", "xbxx"]; - shouldBe(regex15.firstMatch(input5), results); - var input6 = "axxxxxbcdefghijb"; - results = ["axxxxxb", "xxxxx"]; - shouldBe(regex15.firstMatch(input6), results); - // Failers - var input7 = "a\u1234b"; - results = null; - shouldBe(regex15.firstMatch(input7), results); - var input8 = "axxxxxxbcdefghijb"; - results = null; - shouldBe(regex15.firstMatch(input8), results); - - var regex16 = new RegExp(r"a(.{3,5}?)b"); - input0 = "a\u1234xyb"; - results = ["a\u1234xyb", "\u1234xy"]; - shouldBe(regex16.firstMatch(input0), results); - input1 = "a\u1234\u4321yb"; - results = ["a\u1234\u4321yb", "\u1234\u4321y"]; - shouldBe(regex16.firstMatch(input1), results); - input2 = "a\u1234\u4321\u3412b"; - results = ["a\u1234\u4321\u3412b", "\u1234\u4321\u3412"]; - shouldBe(regex16.firstMatch(input2), results); - input3 = "axxxxbcdefghijb"; - results = ["axxxxb", "xxxx"]; - shouldBe(regex16.firstMatch(input3), results); - input4 = "a\u1234\u4321\u3412\u3421b"; - results = ["a\u1234\u4321\u3412\u3421b", "\u1234\u4321\u3412\u3421"]; - shouldBe(regex16.firstMatch(input4), results); - input5 = "axbxxbcdefghijb"; - results = ["axbxxb", "xbxx"]; - shouldBe(regex16.firstMatch(input5), results); - input6 = "axxxxxbcdefghijb"; - results = ["axxxxxb", "xxxxx"]; - shouldBe(regex16.firstMatch(input6), results); - // Failers - input7 = "a\u1234b"; - results = null; - shouldBe(regex16.firstMatch(input7), results); - input8 = "axxxxxxbcdefghijb"; - results = null; - shouldBe(regex16.firstMatch(input8), results); - - var regex17 = new RegExp(r"^[a\u00c0]"); - // Failers - input0 = "\u0100"; - results = null; - shouldBe(regex17.firstMatch(input0), results); - - var regex21 = new RegExp(r"(?:\u0100){3}b"); - input0 = "\u0100\u0100\u0100b"; - results = ["\u0100\u0100\u0100b"]; - shouldBe(regex21.firstMatch(input0), results); - // Failers - input1 = "\u0100\u0100b"; - results = null; - shouldBe(regex21.firstMatch(input1), results); - - var regex22 = new RegExp(r"\u00ab"); - input0 = "\u00ab"; - results = ["\u00ab"]; - shouldBe(regex22.firstMatch(input0), results); - input1 = "\xc2\xab"; - results = ["\u00ab"]; - shouldBe(regex22.firstMatch(input1), results); - // Failers - input2 = "\x00{ab}"; - results = null; - shouldBe(regex22.firstMatch(input2), results); - - var regex30 = new RegExp(r"^[^a]{2}"); - input0 = "\u0100bc"; - results = ["\u0100b"]; - shouldBe(regex30.firstMatch(input0), results); - - var regex31 = new RegExp(r"^[^a]{2,}"); - input0 = "\u0100bcAa"; - results = ["\u0100bcA"]; - shouldBe(regex31.firstMatch(input0), results); - - var regex32 = new RegExp(r"^[^a]{2,}?"); - input0 = "\u0100bca"; - results = ["\u0100b"]; - shouldBe(regex32.firstMatch(input0), results); - - var regex33 = new RegExp(r"^[^a]{2}", caseSensitive: false); - input0 = "\u0100bc"; - results = ["\u0100b"]; - shouldBe(regex33.firstMatch(input0), results); - - var regex34 = new RegExp(r"^[^a]{2,}", caseSensitive: false); - input0 = "\u0100bcAa"; - results = ["\u0100bc"]; - shouldBe(regex34.firstMatch(input0), results); - - var regex35 = new RegExp(r"^[^a]{2,}?", caseSensitive: false); - input0 = "\u0100bca"; - results = ["\u0100b"]; - shouldBe(regex35.firstMatch(input0), results); - - var regex36 = new RegExp(r"\u0100{0,0}"); - input0 = "abcd"; - results = [""]; - shouldBe(regex36.firstMatch(input0), results); - - var regex37 = new RegExp(r"\u0100?"); - input0 = "abcd"; - results = [""]; - shouldBe(regex37.firstMatch(input0), results); - input1 = "\u0100\u0100"; - results = ["\u0100"]; - shouldBe(regex37.firstMatch(input1), results); - - var regex38 = new RegExp(r"\u0100{0,3}"); - input0 = "\u0100\u0100"; - results = ["\u0100\u0100"]; - shouldBe(regex38.firstMatch(input0), results); - input1 = "\u0100\u0100\u0100\u0100"; - results = ["\u0100\u0100\u0100"]; - shouldBe(regex38.firstMatch(input1), results); - - var regex39 = new RegExp(r"\u0100*"); - input0 = "abce"; - results = [""]; - shouldBe(regex39.firstMatch(input0), results); - input1 = "\u0100\u0100\u0100\u0100"; - results = ["\u0100\u0100\u0100\u0100"]; - shouldBe(regex39.firstMatch(input1), results); - - var regex40 = new RegExp(r"\u0100{1,1}"); - input0 = "abcd\u0100\u0100\u0100\u0100"; - results = ["\u0100"]; - shouldBe(regex40.firstMatch(input0), results); - - var regex41 = new RegExp(r"\u0100{1,3}"); - input0 = "abcd\u0100\u0100\u0100\u0100"; - results = ["\u0100\u0100\u0100"]; - shouldBe(regex41.firstMatch(input0), results); - - var regex42 = new RegExp(r"\u0100+"); - input0 = "abcd\u0100\u0100\u0100\u0100"; - results = ["\u0100\u0100\u0100\u0100"]; - shouldBe(regex42.firstMatch(input0), results); - - var regex43 = new RegExp(r"\u0100{3}"); - input0 = "abcd\u0100\u0100\u0100XX"; - results = ["\u0100\u0100\u0100"]; - shouldBe(regex43.firstMatch(input0), results); - - var regex44 = new RegExp(r"\u0100{3,5}"); - input0 = "abcd\u0100\u0100\u0100\u0100\u0100\u0100\u0100XX"; - results = ["\u0100\u0100\u0100\u0100\u0100"]; - shouldBe(regex44.firstMatch(input0), results); - - var regex45 = new RegExp(r"\u0100{3,}"); - input0 = "abcd\u0100\u0100\u0100\u0100\u0100\u0100\u0100XX"; - results = ["\u0100\u0100\u0100\u0100\u0100\u0100\u0100"]; - shouldBe(regex45.firstMatch(input0), results); - - var regex47 = new RegExp(r"\D*"); - input0 = - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; - results = [ - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - ]; - shouldBe(regex47.firstMatch(input0), results); - - var regex48 = new RegExp(r"\D*"); - input0 = - "\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100"; - results = [ - "\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100" - ]; - shouldBe(regex48.firstMatch(input0), results); - - var regex49 = new RegExp(r"\D"); - input0 = "1X2"; - results = ["X"]; - shouldBe(regex49.firstMatch(input0), results); - input1 = "1\u01002"; - results = ["\u0100"]; - shouldBe(regex49.firstMatch(input1), results); - - var regex50 = new RegExp(r">\S"); - input0 = "> >X Y"; - results = [">X"]; - shouldBe(regex50.firstMatch(input0), results); - input1 = "> >\u0100 Y"; - results = [">\u0100"]; - shouldBe(regex50.firstMatch(input1), results); - - var regex51 = new RegExp(r"\d"); - input0 = "\u01003"; - results = ["3"]; - shouldBe(regex51.firstMatch(input0), results); - - var regex52 = new RegExp(r"\s"); - input0 = "\u0100 X"; - results = [" "]; - shouldBe(regex52.firstMatch(input0), results); - - var regex53 = new RegExp(r"\D+"); - input0 = "12abcd34"; - results = ["abcd"]; - shouldBe(regex53.firstMatch(input0), results); - // Failers - input1 = "1234"; - results = null; - shouldBe(regex53.firstMatch(input1), results); - - var regex54 = new RegExp(r"\D{2,3}"); - input0 = "12abcd34"; - results = ["abc"]; - shouldBe(regex54.firstMatch(input0), results); - input1 = "12ab34"; - results = ["ab"]; - shouldBe(regex54.firstMatch(input1), results); - // Failers - input2 = "1234"; - results = null; - shouldBe(regex54.firstMatch(input2), results); - input3 = "12a34"; - results = null; - shouldBe(regex54.firstMatch(input3), results); - - var regex55 = new RegExp(r"\D{2,3}?"); - input0 = "12abcd34"; - results = ["ab"]; - shouldBe(regex55.firstMatch(input0), results); - input1 = "12ab34"; - results = ["ab"]; - shouldBe(regex55.firstMatch(input1), results); - // Failers - input2 = "1234"; - results = null; - shouldBe(regex55.firstMatch(input2), results); - input3 = "12a34"; - results = null; - shouldBe(regex55.firstMatch(input3), results); - - var regex56 = new RegExp(r"\d+"); - input0 = "12abcd34"; - results = ["12"]; - shouldBe(regex56.firstMatch(input0), results); - - var regex57 = new RegExp(r"\d{2,3}"); - input0 = "12abcd34"; - results = ["12"]; - shouldBe(regex57.firstMatch(input0), results); - input1 = "1234abcd"; - results = ["123"]; - shouldBe(regex57.firstMatch(input1), results); - // Failers - input2 = "1.4"; - results = null; - shouldBe(regex57.firstMatch(input2), results); - - var regex58 = new RegExp(r"\d{2,3}?"); - input0 = "12abcd34"; - results = ["12"]; - shouldBe(regex58.firstMatch(input0), results); - input1 = "1234abcd"; - results = ["12"]; - shouldBe(regex58.firstMatch(input1), results); - // Failers - input2 = "1.4"; - results = null; - shouldBe(regex58.firstMatch(input2), results); - - var regex59 = new RegExp(r"\S+"); - input0 = "12abcd34"; - results = ["12abcd34"]; - shouldBe(regex59.firstMatch(input0), results); - // Failers - input1 = " "; - results = null; - shouldBe(regex59.firstMatch(input1), results); - - var regex60 = new RegExp(r"\S{2,3}"); - input0 = "12abcd34"; - results = ["12a"]; - shouldBe(regex60.firstMatch(input0), results); - input1 = "1234abcd"; - results = ["123"]; - shouldBe(regex60.firstMatch(input1), results); - // Failers - input2 = " "; - results = null; - shouldBe(regex60.firstMatch(input2), results); - - var regex61 = new RegExp(r"\S{2,3}?"); - input0 = "12abcd34"; - results = ["12"]; - shouldBe(regex61.firstMatch(input0), results); - input1 = "1234abcd"; - results = ["12"]; - shouldBe(regex61.firstMatch(input1), results); - // Failers - input2 = " "; - results = null; - shouldBe(regex61.firstMatch(input2), results); - - var regex62 = new RegExp(r">\s+<"); - input0 = "12> <34"; - results = ["> <"]; - shouldBe(regex62.firstMatch(input0), results); - - var regex63 = new RegExp(r">\s{2,3}<"); - input0 = "ab> <"]; - shouldBe(regex63.firstMatch(input0), results); - input1 = "ab> <"]; - shouldBe(regex63.firstMatch(input1), results); - // Failers - input2 = "ab> \s{2,3}?<"); - input0 = "ab> <"]; - shouldBe(regex64.firstMatch(input0), results); - input1 = "ab> <"]; - shouldBe(regex64.firstMatch(input1), results); - // Failers - input2 = "ab> m.group(0)).toList(), results); - - var regexGlobal1 = new RegExp(r"\S\S"); - input0 = "A\u00a3BC"; - results = ["A\u00a3", "BC"]; - Expect.listEquals(allStringMatches(input0, regexGlobal1), results); - - var regexGlobal2 = new RegExp(r"\S{2}"); - input0 = "A\u00a3BC"; - results = ["A\u00a3", "BC"]; - Expect.listEquals(allStringMatches(input0, regexGlobal2), results); - - var regexGlobal3 = new RegExp(r"\W\W"); - input0 = "+\u00a3=="; - results = ["+\u00a3", "=="]; - Expect.listEquals(allStringMatches(input0, regexGlobal3), results); - - var regexGlobal4 = new RegExp(r"\W{2}"); - input0 = "+\u00a3=="; - results = ["+\u00a3", "=="]; - Expect.listEquals(allStringMatches(input0, regexGlobal4), results); - - var regexGlobal5 = new RegExp(r"\S"); - input0 = "\u0442\u0435\u0441\u0442"; - results = ["\u0442", "\u0435", "\u0441", "\u0442"]; - Expect.listEquals(allStringMatches(input0, regexGlobal5), results); - - var regexGlobal6 = new RegExp(r"[\S]"); - input0 = "\u0442\u0435\u0441\u0442"; - results = ["\u0442", "\u0435", "\u0441", "\u0442"]; - Expect.listEquals(allStringMatches(input0, regexGlobal6), results); - - var regexGlobal7 = new RegExp(r"\D"); - input0 = "\u0442\u0435\u0441\u0442"; - results = ["\u0442", "\u0435", "\u0441", "\u0442"]; - Expect.listEquals(allStringMatches(input0, regexGlobal7), results); - - var regexGlobal8 = new RegExp(r"[\D]"); - input0 = "\u0442\u0435\u0441\u0442"; - results = ["\u0442", "\u0435", "\u0441", "\u0442"]; - Expect.listEquals(allStringMatches(input0, regexGlobal8), results); - - var regexGlobal9 = new RegExp(r"\W"); - input0 = "\u2442\u2435\u2441\u2442"; - results = ["\u2442", "\u2435", "\u2441", "\u2442"]; - Expect.listEquals(allStringMatches(input0, regexGlobal9), results); - - var regexGlobal10 = new RegExp(r"[\W]"); - input0 = "\u2442\u2435\u2441\u2442"; - results = ["\u2442", "\u2435", "\u2441", "\u2442"]; - Expect.listEquals(allStringMatches(input0, regexGlobal10), results); - - var regexGlobal11 = new RegExp(r"[\u041f\S]"); - input0 = "\u0442\u0435\u0441\u0442"; - results = ["\u0442", "\u0435", "\u0441", "\u0442"]; - Expect.listEquals(allStringMatches(input0, regexGlobal11), results); - - var regexGlobal12 = new RegExp(r".[^\S]."); - input0 = "abc def\u0442\u0443xyz\npqr"; - results = ["c d", "z\u000ap"]; - Expect.listEquals(allStringMatches(input0, regexGlobal12), results); - - var regexGlobal13 = new RegExp(r".[^\S\n]."); - input0 = "abc def\u0442\u0443xyz\npqr"; - results = ["c d"]; - Expect.listEquals(allStringMatches(input0, regexGlobal13), results); - - var regexGlobal14 = new RegExp(r"[\W]"); - input0 = "+\u2442"; - results = ["+", "\u2442"]; - Expect.listEquals(allStringMatches(input0, regexGlobal14), results); - - var regexGlobal15 = new RegExp(r"[^a-zA-Z]"); - input0 = "+\u2442"; - results = ["+", "\u2442"]; - Expect.listEquals(allStringMatches(input0, regexGlobal15), results); - - var regexGlobal16 = new RegExp(r"[^a-zA-Z]"); - input0 = "A\u0442"; - results = ["\u0442"]; - Expect.listEquals(allStringMatches(input0, regexGlobal16), results); - - var regexGlobal17 = new RegExp(r"[\S]"); - input0 = "A\u0442"; - results = ["A", "\u0442"]; - Expect.listEquals(allStringMatches(input0, regexGlobal17), results); - - var regexGlobal19 = new RegExp(r"[\D]"); - input0 = "A\u0442"; - results = ["A", "\u0442"]; - Expect.listEquals(allStringMatches(input0, regexGlobal19), results); - - var regexGlobal21 = new RegExp(r"[^a-z]"); - input0 = "A\u0422"; - results = ["A", "\u0422"]; - Expect.listEquals(allStringMatches(input0, regexGlobal21), results); - - var regexGlobal24 = new RegExp(r"[\S]"); - input0 = "A\u0442"; - results = ["A", "\u0442"]; - Expect.listEquals(allStringMatches(input0, regexGlobal24), results); - - var regexGlobal25 = new RegExp(r"[^A-Z]"); - input0 = "a\u0442"; - results = ["a", "\u0442"]; - Expect.listEquals(allStringMatches(input0, regexGlobal25), results); - - var regexGlobal26 = new RegExp(r"[\W]"); - input0 = "+\u2442"; - results = ["+", "\u2442"]; - Expect.listEquals(allStringMatches(input0, regexGlobal26), results); - - var regexGlobal27 = new RegExp(r"[\D]"); - input0 = "M\u0442"; - results = ["M", "\u0442"]; - Expect.listEquals(allStringMatches(input0, regexGlobal27), results); - - var regexGlobal28 = new RegExp(r"[^a]+", caseSensitive: false); - input0 = "bcd"; - results = ["bcd"]; - Expect.listEquals(allStringMatches(input0, regexGlobal28), results); - input1 = "\u0100aY\u0256Z"; - results = ["\u0100", "Y\u0256Z"]; - Expect.listEquals(allStringMatches(input1, regexGlobal28), results); - - var regexGlobal29 = new RegExp(r"(a|)"); - input0 = "catac"; - results = ["", "a", "", "a", "", ""]; - Expect.listEquals(allStringMatches(input0, regexGlobal29), results); - input1 = "a\u0256a"; - results = ["a", "", "a", ""]; - Expect.listEquals(allStringMatches(input1, regexGlobal29), results); -} diff --git a/tests/corelib_2/regexp/pcre_test.dart b/tests/corelib_2/regexp/pcre_test.dart deleted file mode 100644 index d987f87f9d7..00000000000 --- a/tests/corelib_2/regexp/pcre_test.dart +++ /dev/null @@ -1,7227 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Autogenerated from the PCRE test suite Mon Feb 2 15:14:04 CET 2009 - -// @dart = 2.9 - -// Note that some regexps in the PCRE test suite use features not present -// in JavaScript. These don't work in JS, but they fail to work in a -// predictable way, and the expected results reflect this. - -// PCRE comes with the following license - -// PCRE LICENCE -// ------------ -// -// PCRE is a library of functions to support regular expressions whose syntax -// and semantics are as close as possible to those of the Perl 5 language. -// -// Release 7 of PCRE is distributed under the terms of the "BSD" licence, as -// specified below. The documentation for PCRE, supplied in the "doc" -// directory, is distributed under the same terms as the software itself. -// -// The basic library functions are written in C and are freestanding. Also -// included in the distribution is a set of C++ wrapper functions. -// -// -// THE BASIC LIBRARY FUNCTIONS -// --------------------------- -// -// Written by: Philip Hazel -// Email local part: ph10 -// Email domain: cam.ac.uk -// -// University of Cambridge Computing Service, -// Cambridge, England. -// -// Copyright (c) 1997-2007 University of Cambridge -// All rights reserved. -// -// -// THE C++ WRAPPER FUNCTIONS -// ------------------------- -// -// Contributed by: Google Inc. -// -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// -// THE "BSD" LICENCE -// ----------------- -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// * Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// * Neither the name of the University of Cambridge nor the name of Google -// Inc. nor the names of their contributors may be used to endorse or -// promote products derived from this software without specific prior -// written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -// -// End - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - var res = []; - res.add(new RegExp(r"(a)b|", caseSensitive: false)); - res.add(new RegExp(r"abc", caseSensitive: false)); - res.add(new RegExp(r"^abc", caseSensitive: false)); - res.add(new RegExp(r"a+bc", caseSensitive: false)); - res.add(new RegExp(r"a*bc", caseSensitive: false)); - res.add(new RegExp(r"a{3}bc", caseSensitive: false)); - res.add(new RegExp(r"(abc|a+z)", caseSensitive: false)); - res.add(new RegExp(r"^abc$", caseSensitive: false)); - res.add(new RegExp(r"ab\idef")); - res.add(new RegExp(r".*b", caseSensitive: false)); - res.add(new RegExp(r".*?b", caseSensitive: false)); - res.add(new RegExp(r"cat|dog|elephant", caseSensitive: false)); - res.add(new RegExp(r"cat|dog|elephant", caseSensitive: false)); - res.add(new RegExp(r"cat|dog|elephant", caseSensitive: false)); - res.add(new RegExp(r"a|[bcd]", caseSensitive: false)); - res.add(new RegExp(r"(a|[^\dZ])", caseSensitive: false)); - res.add(new RegExp(r"(a|b)*[\s]", caseSensitive: false)); - res.add(new RegExp(r"(ab\2)")); - res.add(new RegExp(r"(a)(b)(c)\2", caseSensitive: false)); - res.add(new RegExp(r"(a)bc|(a)(b)\2", caseSensitive: false)); - res.add(new RegExp(r"abc$", caseSensitive: false)); - res.add(new RegExp(r"(a)(b)(c)(d)(e)\6")); - res.add(new RegExp(r"the quick brown fox", caseSensitive: false)); - res.add(new RegExp(r"^abc|def", caseSensitive: false)); - res.add(new RegExp(r".*((abc)$|(def))", caseSensitive: false)); - res.add(new RegExp(r"abc", caseSensitive: false)); - res.add(new RegExp(r"^abc|def", caseSensitive: false)); - res.add(new RegExp(r".*((abc)$|(def))", caseSensitive: false)); - res.add(new RegExp(r"the quick brown fox", caseSensitive: false)); - res.add(new RegExp(r"the quick brown fox", caseSensitive: false)); - res.add(new RegExp(r"abc.def", caseSensitive: false)); - res.add(new RegExp(r"abc$", caseSensitive: false)); - res.add(new RegExp(r"(abc)\2", caseSensitive: false)); - res.add(new RegExp(r"(abc\1)", caseSensitive: false)); - res.add(new RegExp(r"a[]b")); - res.add(new RegExp(r"[^aeiou ]{3,}", caseSensitive: false)); - res.add(new RegExp(r"<.*>", caseSensitive: false)); - res.add(new RegExp(r"<.*?>", caseSensitive: false)); - res.add(new RegExp(r"[abcd]", caseSensitive: false)); - res.add(new RegExp(r"(^a|^b)", multiLine: true, caseSensitive: false)); - res.add(new RegExp(r"a$", caseSensitive: false)); - res.add(new RegExp(r"a$", multiLine: true, caseSensitive: false)); - res.add(new RegExp(r"\Aabc", multiLine: true, caseSensitive: false)); - res.add(new RegExp(r"^abc", multiLine: true, caseSensitive: false)); - res.add(new RegExp(r"(?!alphabet)[ab]", caseSensitive: false)); - res.add(new RegExp( - r"The next three are in testinput2 because they have variable length branches")); - res.add(new RegExp(r"This one is here because Perl 5.005_02 doesn't fail it", - caseSensitive: false)); - res.add(new RegExp( - r"This one is here because I think Perl 5.005_02 gets the setting of $1 wrong", - caseSensitive: false)); - res.add(new RegExp(r"^(a\1?){4}$", caseSensitive: false)); - res.add(new RegExp(r"These are syntax tests from Perl 5.005", - caseSensitive: false)); - res.add(new RegExp(r"a[]b")); - res.add(new RegExp(r"\1")); - res.add(new RegExp(r"\2")); - res.add(new RegExp(r"(a)|\2")); - res.add(new RegExp(r"a[]b", caseSensitive: false)); - res.add(new RegExp(r"abc")); - res.add(new RegExp(r"abc")); - res.add(new RegExp(r"abc", caseSensitive: false)); - res.add(new RegExp(r"(a)bc(d)", caseSensitive: false)); - res.add(new RegExp(r"(.{20})", caseSensitive: false)); - res.add(new RegExp(r"(.{15})", caseSensitive: false)); - res.add(new RegExp(r"(.{16})", caseSensitive: false)); - res.add(new RegExp(r"^(a|(bc))de(f)", caseSensitive: false)); - res.add(new RegExp(r"^abc\00def", caseSensitive: false)); - res.add(new RegExp( - r"word ((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+\n)((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+ )((?:[a-zA-Z0-9]+\n)?)?)?)?)?)?)?)?)?otherword", - caseSensitive: false)); - res.add(new RegExp(r".*X", caseSensitive: false)); - res.add(new RegExp(r".*X", caseSensitive: false)); - res.add(new RegExp(r"(.*X|^B)", caseSensitive: false)); - res.add(new RegExp(r"(.*X|^B)", caseSensitive: false)); - res.add(new RegExp(r"\Biss\B", caseSensitive: false)); - res.add(new RegExp(r"\Biss\B", caseSensitive: false)); - res.add(new RegExp(r"iss", caseSensitive: false)); - res.add(new RegExp(r"\Biss\B", caseSensitive: false)); - res.add(new RegExp(r"\Biss\B", caseSensitive: false)); - res.add(new RegExp(r"^iss", caseSensitive: false)); - res.add(new RegExp(r".*iss", caseSensitive: false)); - res.add(new RegExp(r".i.", caseSensitive: false)); - res.add(new RegExp(r"^.is", caseSensitive: false)); - res.add(new RegExp(r"^ab\n", caseSensitive: false)); - res.add(new RegExp(r"^ab\n", multiLine: true, caseSensitive: false)); - res.add(new RegExp(r"abc", caseSensitive: false)); - res.add(new RegExp(r"abc|bac", caseSensitive: false)); - res.add(new RegExp(r"(abc|bac)", caseSensitive: false)); - res.add(new RegExp(r"(abc|(c|dc))", caseSensitive: false)); - res.add(new RegExp(r"(abc|(d|de)c)", caseSensitive: false)); - res.add(new RegExp(r"a*", caseSensitive: false)); - res.add(new RegExp(r"a+", caseSensitive: false)); - res.add(new RegExp(r"(baa|a+)", caseSensitive: false)); - res.add(new RegExp(r"a{0,3}", caseSensitive: false)); - res.add(new RegExp(r"baa{3,}", caseSensitive: false)); - res.add(new RegExp(r'"([^\\"]+|\.)*"', caseSensitive: false)); - res.add(new RegExp(r"(abc|ab[cd])", caseSensitive: false)); - res.add(new RegExp(r"(a|.)", caseSensitive: false)); - res.add(new RegExp(r"a|ba|\w", caseSensitive: false)); - res.add(new RegExp(r"abc(?=pqr)", caseSensitive: false)); - res.add(new RegExp(r"abc(?!pqr)", caseSensitive: false)); - res.add(new RegExp(r"ab.", caseSensitive: false)); - res.add(new RegExp(r"ab[xyz]", caseSensitive: false)); - res.add(new RegExp(r"abc*", caseSensitive: false)); - res.add(new RegExp(r"ab.c*", caseSensitive: false)); - res.add(new RegExp(r"a.c*", caseSensitive: false)); - res.add(new RegExp(r".c*", caseSensitive: false)); - res.add(new RegExp(r"ac*", caseSensitive: false)); - res.add(new RegExp(r"(a.c*|b.c*)", caseSensitive: false)); - res.add(new RegExp(r"a.c*|aba", caseSensitive: false)); - res.add(new RegExp(r".+a", caseSensitive: false)); - res.add(new RegExp(r"(?=abcda)a.*", caseSensitive: false)); - res.add(new RegExp(r"(?=a)a.*", caseSensitive: false)); - res.add(new RegExp(r"a(b)*", caseSensitive: false)); - res.add(new RegExp(r"a\d*", caseSensitive: false)); - res.add(new RegExp(r"ab\d*", caseSensitive: false)); - res.add(new RegExp(r"a(\d)*", caseSensitive: false)); - res.add(new RegExp(r"abcde{0,0}", caseSensitive: false)); - res.add(new RegExp(r"ab\d+", caseSensitive: false)); - res.add(new RegExp(r"ab\d{0}e", caseSensitive: false)); - res.add(new RegExp(r"a?b?", caseSensitive: false)); - res.add(new RegExp(r"|-", caseSensitive: false)); - res.add(new RegExp(r"a*(b+)(z)(z)", caseSensitive: false)); - res.add(new RegExp(r"^.?abcd", caseSensitive: false)); - res.add(new RegExp(r"^[[:alnum:]]")); - res.add(new RegExp(r"^[[:^alnum:]]")); - res.add(new RegExp(r"^[[:alpha:]]")); - res.add(new RegExp(r"^[[:^alpha:]]")); - res.add(new RegExp(r"[_[:alpha:]]", caseSensitive: false)); - res.add(new RegExp(r"^[[:ascii:]]")); - res.add(new RegExp(r"^[[:^ascii:]]")); - res.add(new RegExp(r"^[[:blank:]]")); - res.add(new RegExp(r"^[[:^blank:]]")); - res.add(new RegExp(r"[\n\x0b\x0c\x0d[:blank:]]", caseSensitive: false)); - res.add(new RegExp(r"^[[:cntrl:]]")); - res.add(new RegExp(r"^[[:digit:]]")); - res.add(new RegExp(r"^[[:graph:]]")); - res.add(new RegExp(r"^[[:lower:]]")); - res.add(new RegExp(r"^[[:print:]]")); - res.add(new RegExp(r"^[[:punct:]]")); - res.add(new RegExp(r"^[[:space:]]")); - res.add(new RegExp(r"^[[:upper:]]")); - res.add(new RegExp(r"^[[:xdigit:]]")); - res.add(new RegExp(r"^[[:word:]]")); - res.add(new RegExp(r"^[[:^cntrl:]]")); - res.add(new RegExp(r"^[12[:^digit:]]")); - res.add(new RegExp(r"^[[:^blank:]]")); - res.add(new RegExp(r"[01[:alpha:]%]")); - res.add(new RegExp(r"[[.ch.]]", caseSensitive: false)); - res.add(new RegExp(r"[[=ch=]]", caseSensitive: false)); - res.add(new RegExp(r"[[:rhubarb:]]", caseSensitive: false)); - res.add(new RegExp(r"[[:upper:]]", caseSensitive: false)); - res.add(new RegExp(r"[[:lower:]]", caseSensitive: false)); - res.add(new RegExp( - r"This one's here because of the large output vector needed", - caseSensitive: false)); - res.add(new RegExp( - r"(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\w+)\s+(\270)", - caseSensitive: false)); - res.add(new RegExp( - r"This one's here because Perl does this differently and PCRE can't at present", - caseSensitive: false)); - res.add(new RegExp(r"(main(O)?)+", caseSensitive: false)); - res.add(new RegExp( - r"These are all cases where Perl does it differently (nested captures)", - caseSensitive: false)); - res.add(new RegExp(r"^(a(b)?)+$", caseSensitive: false)); - res.add(new RegExp(r"^(aa(bb)?)+$", caseSensitive: false)); - res.add(new RegExp(r"^(aa|aa(bb))+$", caseSensitive: false)); - res.add(new RegExp(r"^(aa(bb)??)+$", caseSensitive: false)); - res.add(new RegExp(r"^(?:aa(bb)?)+$", caseSensitive: false)); - res.add(new RegExp(r"^(aa(b(b))?)+$", caseSensitive: false)); - res.add(new RegExp(r"^(?:aa(b(b))?)+$", caseSensitive: false)); - res.add(new RegExp(r"^(?:aa(b(?:b))?)+$", caseSensitive: false)); - res.add(new RegExp(r"^(?:aa(bb(?:b))?)+$", caseSensitive: false)); - res.add(new RegExp(r"^(?:aa(b(?:bb))?)+$", caseSensitive: false)); - res.add(new RegExp(r"^(?:aa(?:b(b))?)+$", caseSensitive: false)); - res.add(new RegExp(r"^(?:aa(?:b(bb))?)+$", caseSensitive: false)); - res.add(new RegExp(r"^(aa(b(bb))?)+$", caseSensitive: false)); - res.add(new RegExp(r"^(aa(bb(bb))?)+$", caseSensitive: false)); - res.add(new RegExp(r"a", caseSensitive: false)); - res.add(new RegExp(r"[\s]")); - res.add(new RegExp(r"[\S]")); - res.add(new RegExp( - r"123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890")); - res.add(new RegExp( - r"\Q123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890")); - res.add(new RegExp(r"\Q\E")); - res.add(new RegExp(r"\Q\Ex")); - res.add(new RegExp(r" \Q\E")); - res.add(new RegExp(r"a\Q\E")); - res.add(new RegExp(r"a\Q\Eb")); - res.add(new RegExp(r"\Q\Eabc")); - res.add(new RegExp(r"[.x.]", caseSensitive: false)); - res.add(new RegExp(r"[=x=]", caseSensitive: false)); - res.add(new RegExp(r"[:x:]", caseSensitive: false)); - res.add(new RegExp(r"\l", caseSensitive: false)); - res.add(new RegExp(r"\L", caseSensitive: false)); - res.add(new RegExp(r"\N{name}", caseSensitive: false)); - res.add(new RegExp(r"\u", caseSensitive: false)); - res.add(new RegExp(r"\U", caseSensitive: false)); - res.add(new RegExp(r"[[:space:]", caseSensitive: false)); - res.add(new RegExp(r"[\s]", caseSensitive: false)); - res.add(new RegExp(r"[[:space:]]", caseSensitive: false)); - res.add(new RegExp(r"[[:space:]abcde]", caseSensitive: false)); - res.add(new RegExp(r"(.*)\d+\1", caseSensitive: false)); - res.add(new RegExp(r"(.*)\d+", caseSensitive: false)); - res.add(new RegExp(r"(.*)\d+\1", caseSensitive: false)); - res.add(new RegExp(r"(.*)\d+", caseSensitive: false)); - res.add(new RegExp(r"(.*(xyz))\d+\2", caseSensitive: false)); - res.add(new RegExp(r"((.*))\d+\1", caseSensitive: false)); - res.add(new RegExp(r"a[b]", caseSensitive: false)); - res.add(new RegExp(r"(?=a).*", caseSensitive: false)); - res.add(new RegExp(r"(?=abc).xyz", caseSensitive: false)); - res.add(new RegExp(r"(?=a)(?=b)", caseSensitive: false)); - res.add(new RegExp(r"(?=.)a", caseSensitive: false)); - res.add(new RegExp(r"((?=abcda)a)", caseSensitive: false)); - res.add(new RegExp(r"((?=abcda)ab)", caseSensitive: false)); - res.add(new RegExp(r"()a", caseSensitive: false)); - res.add(new RegExp(r"(a)+", caseSensitive: false)); - res.add(new RegExp(r"(a){2,3}", caseSensitive: false)); - res.add(new RegExp(r"(a)*", caseSensitive: false)); - res.add(new RegExp(r"[a]", caseSensitive: false)); - res.add(new RegExp(r"[ab]", caseSensitive: false)); - res.add(new RegExp(r"[ab]", caseSensitive: false)); - res.add(new RegExp(r"[^a]", caseSensitive: false)); - res.add(new RegExp(r"\d456", caseSensitive: false)); - res.add(new RegExp(r"\d456", caseSensitive: false)); - res.add(new RegExp(r"a^b", caseSensitive: false)); - res.add(new RegExp(r"^a", multiLine: true, caseSensitive: false)); - res.add(new RegExp(r"c|abc", caseSensitive: false)); - res.add(new RegExp(r"(.*)a", caseSensitive: false)); - res.add(new RegExp(r"(.*)a\1", caseSensitive: false)); - res.add(new RegExp(r"(.*)a(b)\2", caseSensitive: false)); - res.add(new RegExp(r"((.*)a|(.*)b)z", caseSensitive: false)); - res.add(new RegExp(r"((.*)a|(.*)b)z\1", caseSensitive: false)); - res.add(new RegExp(r"((.*)a|(.*)b)z\2", caseSensitive: false)); - res.add(new RegExp(r"((.*)a|(.*)b)z\3", caseSensitive: false)); - res.add(new RegExp(r"((.*)a|^(.*)b)z\3", caseSensitive: false)); - res.add(new RegExp( - r"(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a", - caseSensitive: false)); - res.add(new RegExp( - r"(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\31", - caseSensitive: false)); - res.add(new RegExp( - r"(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)|(.*)a\32", - caseSensitive: false)); - res.add(new RegExp(r"(a)(bc)", caseSensitive: false)); - res.add(new RegExp(r"(a+)*zz", caseSensitive: false)); - res.add(new RegExp(r"((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)", - caseSensitive: false)); - res.add(new RegExp(r"((w\/|-|with)*(free|immediate)*.*?shipping\s*[!.-]*)", - caseSensitive: false)); - res.add(new RegExp(r"a*.*b", caseSensitive: false)); - res.add(new RegExp(r"(a|b)*.?c", caseSensitive: false)); - res.add(new RegExp(r"abcde", caseSensitive: false)); - res.add(new RegExp(r"a*b", caseSensitive: false)); - res.add(new RegExp(r"a+b", caseSensitive: false)); - res.add(new RegExp(r"(abc|def)x", caseSensitive: false)); - res.add(new RegExp(r"(ab|cd){3,4}", caseSensitive: false)); - res.add(new RegExp(r"([ab]{,4}c|xy)", caseSensitive: false)); - res.add(new RegExp(r"([ab]{1,4}c|xy){4,5}?123", caseSensitive: false)); - res.add(new RegExp(r"\b.*", caseSensitive: false)); - res.add(new RegExp(r"\b.*", caseSensitive: false)); - res.add(new RegExp(r"(?!.bcd).*", caseSensitive: false)); - res.add(new RegExp(r"abcde", caseSensitive: false)); - res.add(new RegExp(r"0{0,2}ABC", caseSensitive: false)); - res.add(new RegExp(r"\d{3,}ABC", caseSensitive: false)); - res.add(new RegExp(r"\d*ABC", caseSensitive: false)); - res.add(new RegExp(r"[abc]+DE", caseSensitive: false)); - res.add(new RegExp(r"[abc]?123", caseSensitive: false)); - res.add(new RegExp(r"^(?:\d){3,5}X", caseSensitive: false)); - res.add(new RegExp(r"^a", caseSensitive: false)); - res.add(new RegExp(r"line\nbreak", caseSensitive: false)); - res.add(new RegExp(r"line\nbreak", caseSensitive: false)); - res.add(new RegExp(r"line\nbreak", multiLine: true, caseSensitive: false)); - res.add(new RegExp(r"ab.cd", caseSensitive: false)); - res.add(new RegExp(r"ab.cd", caseSensitive: false)); - res.add(new RegExp(r"a(b)c", caseSensitive: false)); - res.add(new RegExp( - r"Inthisnexttest,Jisnotsetattheouterlevel;consequentlyitisn'tsetinthepattern'soptions;consequentlypcre_get_named_substring()producesarandomvalue.", - caseSensitive: false)); - res.add(new RegExp(r"\777", caseSensitive: false)); - res.add(new RegExp(r"\s*,\s*", caseSensitive: false)); - res.add(new RegExp(r"^abc", multiLine: true, caseSensitive: false)); - res.add(new RegExp(r"abc$", multiLine: true, caseSensitive: false)); - res.add(new RegExp(r"^abc", multiLine: true, caseSensitive: false)); - res.add(new RegExp(r"^abc", multiLine: true, caseSensitive: false)); - res.add(new RegExp(r"^abc", multiLine: true, caseSensitive: false)); - res.add(new RegExp(r"^abc", multiLine: true, caseSensitive: false)); - res.add(new RegExp(r"abc", caseSensitive: false)); - res.add(new RegExp(r".*", caseSensitive: false)); - res.add(new RegExp(r"\w+(.)(.)?def", caseSensitive: false)); - res.add(new RegExp( - r"()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(.(.))", - caseSensitive: false)); - res.add(new RegExp(r"()[ab]xyz", caseSensitive: false)); - res.add(new RegExp(r"(|)[ab]xyz", caseSensitive: false)); - res.add(new RegExp(r"(|c)[ab]xyz", caseSensitive: false)); - res.add(new RegExp(r"(|c?)[ab]xyz", caseSensitive: false)); - res.add(new RegExp(r"(d?|c?)[ab]xyz", caseSensitive: false)); - res.add(new RegExp(r"(d?|c)[ab]xyz", caseSensitive: false)); - res.add(new RegExp(r"^a*b\d")); - res.add(new RegExp(r"^a*?b\d")); - res.add(new RegExp(r"^a+A\d")); - res.add(new RegExp(r"^a*A\d", caseSensitive: false)); - res.add(new RegExp(r"(a*|b*)[cd]", caseSensitive: false)); - res.add(new RegExp(r"(a+|b*)[cd]", caseSensitive: false)); - res.add(new RegExp(r"(a*|b+)[cd]", caseSensitive: false)); - res.add(new RegExp(r"(a+|b+)[cd]", caseSensitive: false)); - res.add(new RegExp( - r"(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((a)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))", - caseSensitive: false)); - res.add(new RegExp(r"a*\d")); - res.add(new RegExp(r"a*\D")); - res.add(new RegExp(r"0*\d")); - res.add(new RegExp(r"0*\D")); - res.add(new RegExp(r"a*\s")); - res.add(new RegExp(r"a*\S")); - res.add(new RegExp(r" *\s")); - res.add(new RegExp(r" *\S")); - res.add(new RegExp(r"a*\w")); - res.add(new RegExp(r"a*\W")); - res.add(new RegExp(r"=*\w")); - res.add(new RegExp(r"=*\W")); - res.add(new RegExp(r"\d*a")); - res.add(new RegExp(r"\d*2")); - res.add(new RegExp(r"\d*\d")); - res.add(new RegExp(r"\d*\D")); - res.add(new RegExp(r"\d*\s")); - res.add(new RegExp(r"\d*\S")); - res.add(new RegExp(r"\d*\w")); - res.add(new RegExp(r"\d*\W")); - res.add(new RegExp(r"\D*a")); - res.add(new RegExp(r"\D*2")); - res.add(new RegExp(r"\D*\d")); - res.add(new RegExp(r"\D*\D")); - res.add(new RegExp(r"\D*\s")); - res.add(new RegExp(r"\D*\S")); - res.add(new RegExp(r"\D*\w")); - res.add(new RegExp(r"\D*\W")); - res.add(new RegExp(r"\s*a")); - res.add(new RegExp(r"\s*2")); - res.add(new RegExp(r"\s*\d")); - res.add(new RegExp(r"\s*\D")); - res.add(new RegExp(r"\s*\s")); - res.add(new RegExp(r"\s*\S")); - res.add(new RegExp(r"\s*\w")); - res.add(new RegExp(r"\s*\W")); - res.add(new RegExp(r"\S*a")); - res.add(new RegExp(r"\S*2")); - res.add(new RegExp(r"\S*\d")); - res.add(new RegExp(r"\S*\D")); - res.add(new RegExp(r"\S*\s")); - res.add(new RegExp(r"\S*\S")); - res.add(new RegExp(r"\S*\w")); - res.add(new RegExp(r"\S*\W")); - res.add(new RegExp(r"\w*a")); - res.add(new RegExp(r"\w*2")); - res.add(new RegExp(r"\w*\d")); - res.add(new RegExp(r"\w*\D")); - res.add(new RegExp(r"\w*\s")); - res.add(new RegExp(r"\w*\S")); - res.add(new RegExp(r"\w*\w")); - res.add(new RegExp(r"\w*\W")); - res.add(new RegExp(r"\W*a")); - res.add(new RegExp(r"\W*2")); - res.add(new RegExp(r"\W*\d")); - res.add(new RegExp(r"\W*\D")); - res.add(new RegExp(r"\W*\s")); - res.add(new RegExp(r"\W*\S")); - res.add(new RegExp(r"\W*\w")); - res.add(new RegExp(r"\W*\W")); - res.add(new RegExp(r"[^a]+a")); - res.add(new RegExp(r"[^a]+a", caseSensitive: false)); - res.add(new RegExp(r"[^a]+A", caseSensitive: false)); - res.add(new RegExp(r"[^a]+b")); - res.add(new RegExp(r"[^a]+\d")); - res.add(new RegExp(r"a*[^a]")); - res.add(new RegExp(r"^(?:(?:\1|X)(a|b))+")); - res.add(new RegExp(r"^[\E\Qa\E-\Qz\E]+")); - res.add(new RegExp(r"^[a\Q]bc\E]")); - res.add(new RegExp(r"(?=(\w+))\1:", caseSensitive: false)); - res.add(new RegExp(r"(a|)*\d")); - res.add(new RegExp(r"^a.b")); - res.add(new RegExp(r"^abc.", multiLine: true)); - res.add(new RegExp(r"abc.$", multiLine: true)); - res.add(new RegExp(r"a")); - res.add(new RegExp(r"a")); - res.add(new RegExp(r"^a\Rb", caseSensitive: false)); - res.add(new RegExp(r"^a\R*b", caseSensitive: false)); - res.add(new RegExp(r"^a\R+b", caseSensitive: false)); - res.add(new RegExp(r"^a\R{1,3}b", caseSensitive: false)); - res.add(new RegExp(r"^a[\R]b", caseSensitive: false)); - res.add(new RegExp(r"^(a(b))\1\g1\g{1}\g-1\g{-1}\g{-02}Z")); - res.add(new RegExp(r"^(a)\g-2")); - res.add(new RegExp(r"^(a)\g")); - res.add(new RegExp(r"^(a)\g{0}")); - res.add(new RegExp(r"^(a)\g{3")); - res.add(new RegExp(r"^(a)\g{4a}")); - res.add(new RegExp(r"^a.b")); - res.add(new RegExp(r".+foo")); - res.add(new RegExp(r".+foo")); - res.add(new RegExp(r".+foo")); - res.add(new RegExp(r".+foo")); - res.add(new RegExp(r"^$", multiLine: true)); - res.add(new RegExp(r"abc.$", multiLine: true)); - res.add(new RegExp(r"^X", multiLine: true)); - res.add(new RegExp(r"(foo)\Kbar")); - res.add(new RegExp(r"(foo)(\Kbar|baz)")); - res.add(new RegExp(r"(foo\Kbar)baz")); - res.add(new RegExp(r"\g{A")); - res.add(new RegExp(r"\H\h\V\v")); - res.add(new RegExp(r"\H*\h+\V?\v{3,4}")); - res.add(new RegExp(r"\H{3,4}")); - res.add(new RegExp(r".\h{3,4}.")); - res.add(new RegExp(r"\h*X\h?\H+Y\H?Z")); - res.add(new RegExp(r"\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c")); - res.add(new RegExp(r"[\h]")); - res.add(new RegExp(r"[\h]+")); - res.add(new RegExp(r"[\v]")); - res.add(new RegExp(r"[\H]")); - res.add(new RegExp(r"[^\h]")); - res.add(new RegExp(r"[\V]")); - res.add(new RegExp(r"[\x0a\V]")); - res.add(new RegExp(r"\H+\hY")); - res.add(new RegExp(r"\H+ Y")); - res.add(new RegExp(r"\h+A")); - res.add(new RegExp(r"\v*B")); - res.add(new RegExp(r"\V+\x0a")); - res.add(new RegExp(r"A+\h")); - res.add(new RegExp(r" *\H")); - res.add(new RegExp(r"A*\v")); - res.add(new RegExp(r"\x0b*\V")); - res.add(new RegExp(r"\d+\h")); - res.add(new RegExp(r"\d*\v")); - res.add(new RegExp(r"S+\h\S+\v")); - res.add(new RegExp(r"\w{3,}\h\w+\v")); - res.add(new RegExp(r"\h+\d\h+\w\h+\S\h+\H")); - res.add(new RegExp(r"\v+\d\v+\w\v+\S\v+\V")); - res.add(new RegExp(r"\H+\h\H+\d")); - res.add(new RegExp(r"\V+\v\V+\w")); - res.add(new RegExp(r"[\E]AAA")); - res.add(new RegExp(r"[\Q\E]AAA")); - res.add(new RegExp(r"[^\E]AAA")); - res.add(new RegExp(r"[^\Q\E]AAA")); - res.add(new RegExp(r"[\E^]AAA")); - res.add(new RegExp(r"[\Q\E^]AAA")); - res.add(new RegExp(r"\g6666666666")); - res.add(new RegExp(r"[\g6666666666]")); - res.add(new RegExp(r".+A")); - res.add(new RegExp(r"\nA")); - res.add(new RegExp(r"[\r\n]A")); - res.add(new RegExp(r"(\r|\n)A")); - res.add(new RegExp(r"a\Rb", caseSensitive: false)); - res.add(new RegExp(r"a\Rb", caseSensitive: false)); - res.add(new RegExp(r"a\R?b", caseSensitive: false)); - res.add(new RegExp(r"a\R?b", caseSensitive: false)); - res.add(new RegExp(r"a\R{2,4}b", caseSensitive: false)); - res.add(new RegExp(r"a\R{2,4}b", caseSensitive: false)); - res.add(new RegExp(r"\k''")); - res.add(new RegExp(r"\k<>")); - res.add(new RegExp(r"\k{}")); - res.add(new RegExp(r"[[:foo:]]")); - res.add(new RegExp(r"[[:1234:]]")); - res.add(new RegExp(r"[[:f\oo:]]")); - res.add(new RegExp(r"[[: :]]")); - res.add(new RegExp(r"[[:...:]]")); - res.add(new RegExp(r"[[:l\ower:]]")); - res.add(new RegExp(r"[[:abc\:]]")); - res.add(new RegExp(r"[abc[:x\]pqr:]]")); - res.add(new RegExp(r"[[:a\dz:]]")); - res.add(new RegExp(r"^(a|b\g<1>c)")); - res.add(new RegExp(r"^(a|b\g'1'c)")); - res.add(new RegExp(r"^(a|b\g'-1'c)")); - res.add(new RegExp(r"(^(a|b\g<-1>c))")); - res.add(new RegExp(r"(^(a|b\g<-1'c))")); - res.add(new RegExp(r"(^(a|b\g{-1}))")); - res.add(new RegExp(r"(\3)(\1)(a)")); - res.add(new RegExp(r"(\3)(\1)(a)")); - res.add(new RegExp(r"TA]")); - res.add(new RegExp(r"TA]")); - res.add(new RegExp(r"a[]b")); - res.add(new RegExp(r"a[^]b")); - res.add(new RegExp(r"a[]b")); - res.add(new RegExp(r"a[]+b")); - res.add(new RegExp(r"a[^]b")); - res.add(new RegExp(r"a[^]+b")); - res.add(new RegExp(r"a(?!)+b")); - res.add(new RegExp(r"(abc|pqr|123){0}[xyz]", caseSensitive: false)); - res.add(new RegExp(r" End of testinput2 ")); - res.add(new RegExp(r"a.b")); - res.add(new RegExp(r"a(.{3})b")); - res.add(new RegExp(r"a(.*?)(.)")); - res.add(new RegExp(r"a(.*?)(.)")); - res.add(new RegExp(r"a(.*)(.)")); - res.add(new RegExp(r"a(.*)(.)")); - res.add(new RegExp(r"a(.)(.)")); - res.add(new RegExp(r"a(.)(.)")); - res.add(new RegExp(r"a(.?)(.)")); - res.add(new RegExp(r"a(.?)(.)")); - res.add(new RegExp(r"a(.??)(.)")); - res.add(new RegExp(r"a(.??)(.)")); - res.add(new RegExp(r"a(.{3})b")); - res.add(new RegExp(r"a(.{3,})b")); - res.add(new RegExp(r"a(.{3,}?)b")); - res.add(new RegExp(r"a(.{3,5})b")); - res.add(new RegExp(r"a(.{3,5}?)b")); - res.add(new RegExp(r"X(\C{3})")); - res.add(new RegExp(r"X(\C{4})")); - res.add(new RegExp(r"X\C*")); - res.add(new RegExp(r"X\C*?")); - res.add(new RegExp(r"X\C{3,5}")); - res.add(new RegExp(r"X\C{3,5}?")); - res.add(new RegExp(r"[^a]+")); - res.add(new RegExp(r"^[^a]{2}")); - res.add(new RegExp(r"^[^a]{2,}")); - res.add(new RegExp(r"^[^a]{2,}?")); - res.add(new RegExp(r"[^a]+", caseSensitive: false)); - res.add(new RegExp(r"^[^a]{2}", caseSensitive: false)); - res.add(new RegExp(r"^[^a]{2,}", caseSensitive: false)); - res.add(new RegExp(r"^[^a]{2,}?", caseSensitive: false)); - res.add(new RegExp(r"\D*")); - res.add(new RegExp(r"\D*")); - res.add(new RegExp(r"\D")); - res.add(new RegExp(r">\S")); - res.add(new RegExp(r"\d")); - res.add(new RegExp(r"\s")); - res.add(new RegExp(r"\D+")); - res.add(new RegExp(r"\D{2,3}")); - res.add(new RegExp(r"\D{2,3}?")); - res.add(new RegExp(r"\d+")); - res.add(new RegExp(r"\d{2,3}")); - res.add(new RegExp(r"\d{2,3}?")); - res.add(new RegExp(r"\S+")); - res.add(new RegExp(r"\S{2,3}")); - res.add(new RegExp(r"\S{2,3}?")); - res.add(new RegExp(r">\s+<")); - res.add(new RegExp(r">\s{2,3}<")); - res.add(new RegExp(r">\s{2,3}?<")); - res.add(new RegExp(r"\w+")); - res.add(new RegExp(r"\w{2,3}")); - res.add(new RegExp(r"\w{2,3}?")); - res.add(new RegExp(r"\W+")); - res.add(new RegExp(r"\W{2,3}")); - res.add(new RegExp(r"\W{2,3}?")); - res.add(new RegExp(r"a\Cb")); - res.add(new RegExp(r"a\Cb")); - res.add(new RegExp(r"[\xFF]")); - res.add(new RegExp(r"[\xff]")); - res.add(new RegExp(r"[^\xFF]")); - res.add(new RegExp(r"[^\xff]")); - res.add(new RegExp(r"^[ac]*b")); - res.add(new RegExp(r"^[^x]*b", caseSensitive: false)); - res.add(new RegExp(r"^[^x]*b")); - res.add(new RegExp(r"^\d*b")); - res.add(new RegExp(r"(|a)")); - res.add(new RegExp(r"\S\S")); - res.add(new RegExp(r"\S{2}")); - res.add(new RegExp(r"\W\W")); - res.add(new RegExp(r"\W{2}")); - res.add(new RegExp(r"\S")); - res.add(new RegExp(r"[\S]")); - res.add(new RegExp(r"\D")); - res.add(new RegExp(r"[\D]")); - res.add(new RegExp(r"\W")); - res.add(new RegExp(r"[\W]")); - res.add(new RegExp(r"[\S\s]*")); - res.add(new RegExp(r".[^\S].")); - res.add(new RegExp(r".[^\S\n].")); - res.add(new RegExp(r"[[:^alnum:]]")); - res.add(new RegExp(r"[[:^alpha:]]")); - res.add(new RegExp(r"[[:^ascii:]]")); - res.add(new RegExp(r"[[:^blank:]]")); - res.add(new RegExp(r"[[:^cntrl:]]")); - res.add(new RegExp(r"[[:^digit:]]")); - res.add(new RegExp(r"[[:^graph:]]")); - res.add(new RegExp(r"[[:^lower:]]")); - res.add(new RegExp(r"[[:^print:]]")); - res.add(new RegExp(r"[[:^punct:]]")); - res.add(new RegExp(r"[[:^space:]]")); - res.add(new RegExp(r"[[:^upper:]]")); - res.add(new RegExp(r"[[:^word:]]")); - res.add(new RegExp(r"[[:^xdigit:]]")); - res.add(new RegExp(r"^[^d]*?$")); - res.add(new RegExp(r"^[^d]*?$")); - res.add(new RegExp(r"^[^d]*?$", caseSensitive: false)); - res.add(new RegExp(r"^[^d]*?$", caseSensitive: false)); - res.add(new RegExp(r" End of testinput4 ")); - res.add(new RegExp(r"\x80")); - res.add(new RegExp(r"\xff")); - res.add(new RegExp(r".{3,5}X")); - res.add(new RegExp(r".{3,5}?")); - res.add(new RegExp(r"X(\C)(.*)")); - res.add(new RegExp(r"^[ab]")); - res.add(new RegExp(r"^[^ab]")); - res.add(new RegExp(r"[^ab\xC0-\xF0]")); - res.add(new RegExp(r"[\xFF]")); - res.add(new RegExp(r"[\xff]")); - res.add(new RegExp(r"[^\xFF]")); - res.add(new RegExp(r"[^\xff]")); - res.add(new RegExp(r"anything")); - res.add(new RegExp(r"\W")); - res.add(new RegExp(r"\w")); - res.add(new RegExp(r"\777", caseSensitive: false)); - res.add(new RegExp(r"\777", caseSensitive: false)); - res.add(new RegExp(r"^abc.", multiLine: true)); - res.add(new RegExp(r"abc.$", multiLine: true)); - res.add(new RegExp(r"^a\Rb", caseSensitive: false)); - res.add(new RegExp(r"^a\R*b", caseSensitive: false)); - res.add(new RegExp(r"^a\R+b", caseSensitive: false)); - res.add(new RegExp(r"^a\R{1,3}b", caseSensitive: false)); - res.add(new RegExp(r"\H\h\V\v")); - res.add(new RegExp(r"\H*\h+\V?\v{3,4}")); - res.add(new RegExp(r"\H\h\V\v")); - res.add(new RegExp(r"\H*\h+\V?\v{3,4}")); - res.add(new RegExp(r"[\h]")); - res.add(new RegExp(r"[\h]{3,}")); - res.add(new RegExp(r"[\v]")); - res.add(new RegExp(r"[\H]")); - res.add(new RegExp(r"[\V]")); - res.add(new RegExp(r".*$")); - res.add(new RegExp(r"X")); - res.add(new RegExp(r"a\Rb", caseSensitive: false)); - res.add(new RegExp(r"a\Rb", caseSensitive: false)); - res.add(new RegExp(r"a\R?b", caseSensitive: false)); - res.add(new RegExp(r"a\R?b", caseSensitive: false)); - res.add(new RegExp(r".*a.*=.b.*")); - res.add(new RegExp(r"a[^]b")); - res.add(new RegExp(r"a[^]+b")); - res.add(new RegExp(r"X")); - res.add(new RegExp(r" End of testinput5 ")); - res.add(new RegExp(r"^\pC\pL\pM\pN\pP\pS\pZ<")); - res.add(new RegExp(r"^\PC")); - res.add(new RegExp(r"^\PL")); - res.add(new RegExp(r"^\PM")); - res.add(new RegExp(r"^\PN")); - res.add(new RegExp(r"^\PP")); - res.add(new RegExp(r"^\PS")); - res.add(new RegExp(r"^\PZ")); - res.add(new RegExp(r"^\p{Cc}")); - res.add(new RegExp(r"^\p{Cf}")); - res.add(new RegExp(r"^\p{Cn}")); - res.add(new RegExp(r"^\p{Co}")); - res.add(new RegExp(r"^\p{Cs}")); - res.add(new RegExp(r"^\p{Ll}")); - res.add(new RegExp(r"^\p{Lm}")); - res.add(new RegExp(r"^\p{Lo}")); - res.add(new RegExp(r"^\p{Lt}")); - res.add(new RegExp(r"^\p{Lu}")); - res.add(new RegExp(r"^\p{Mc}")); - res.add(new RegExp(r"^\p{Me}")); - res.add(new RegExp(r"^\p{Mn}")); - res.add(new RegExp(r"^\p{Nl}")); - res.add(new RegExp(r"^\p{No}")); - res.add(new RegExp(r"^\p{Pc}")); - res.add(new RegExp(r"^\p{Pd}")); - res.add(new RegExp(r"^\p{Pe}")); - res.add(new RegExp(r"^\p{Pf}")); - res.add(new RegExp(r"^\p{Pi}")); - res.add(new RegExp(r"^\p{Po}")); - res.add(new RegExp(r"^\p{Ps}")); - res.add(new RegExp(r"^\p{Sk}")); - res.add(new RegExp(r"^\p{So}")); - res.add(new RegExp(r"^\p{Zl}")); - res.add(new RegExp(r"^\p{Zp}")); - res.add(new RegExp(r"^\p{Zs}")); - res.add(new RegExp(r"\p{Nd}{2,}(..)")); - res.add(new RegExp(r"\p{Nd}{2,}?(..)")); - res.add(new RegExp(r"\p{Nd}*(..)")); - res.add(new RegExp(r"\p{Nd}*?(..)")); - res.add(new RegExp(r"\p{Nd}{2}(..)")); - res.add(new RegExp(r"\p{Nd}{2,3}(..)")); - res.add(new RegExp(r"\p{Nd}{2,3}?(..)")); - res.add(new RegExp(r"\p{Nd}?(..)")); - res.add(new RegExp(r"\p{Nd}??(..)")); - res.add(new RegExp(r"\p{Lu}", caseSensitive: false)); - res.add(new RegExp(r"\p{^Lu}", caseSensitive: false)); - res.add(new RegExp(r"\P{Lu}", caseSensitive: false)); - res.add(new RegExp(r"[\p{L}]")); - res.add(new RegExp(r"[\p{^L}]")); - res.add(new RegExp(r"[\P{L}]")); - res.add(new RegExp(r"[\P{^L}]")); - res.add(new RegExp(r"[\p{Nd}]")); - res.add(new RegExp(r"[\P{Nd}]+")); - res.add(new RegExp(r"\D+")); - res.add(new RegExp(r"[\D]+")); - res.add(new RegExp(r"[\P{Nd}]+")); - res.add(new RegExp(r"[\D\P{Nd}]+")); - res.add(new RegExp(r"\pL")); - res.add(new RegExp(r"\pL", caseSensitive: false)); - res.add(new RegExp(r"\p{Lu}")); - res.add(new RegExp(r"\p{Lu}", caseSensitive: false)); - res.add(new RegExp(r"\p{Ll}")); - res.add(new RegExp(r"\p{Ll}", caseSensitive: false)); - res.add(new RegExp(r"^\X")); - res.add(new RegExp(r"^[\X]")); - res.add(new RegExp(r"^(\X*)C")); - res.add(new RegExp(r"^(\X*?)C")); - res.add(new RegExp(r"^(\X*)(.)")); - res.add(new RegExp(r"^(\X*?)(.)")); - res.add(new RegExp(r"^\X(.)")); - res.add(new RegExp(r"^\X{2,3}(.)")); - res.add(new RegExp(r"^\X{2,3}?(.)")); - res.add(new RegExp(r"^[\p{Arabic}]")); - res.add(new RegExp(r"^[\P{Yi}]")); - res.add(new RegExp(r"^\p{Any}X")); - res.add(new RegExp(r"^\P{Any}X")); - res.add(new RegExp(r"^\p{Any}?X")); - res.add(new RegExp(r"^\P{Any}?X")); - res.add(new RegExp(r"^\p{Any}*X")); - res.add(new RegExp(r"^\P{Any}*X")); - res.add(new RegExp(r"^[\p{Any}]X")); - res.add(new RegExp(r"^[\P{Any}]X")); - res.add(new RegExp(r"^[\p{Any}]?X")); - res.add(new RegExp(r"^[\P{Any}]?X")); - res.add(new RegExp(r"^[\p{Any}]+X")); - res.add(new RegExp(r"^[\P{Any}]+X")); - res.add(new RegExp(r"^[\p{Any}]*X")); - res.add(new RegExp(r"^[\P{Any}]*X")); - res.add(new RegExp(r"^\p{Any}{3,5}?")); - res.add(new RegExp(r"^\p{Any}{3,5}")); - res.add(new RegExp(r"^\P{Any}{3,5}?")); - res.add(new RegExp(r"^\p{L&}X")); - res.add(new RegExp(r"^[\p{L&}]X")); - res.add(new RegExp(r"^[\p{L&}]+X")); - res.add(new RegExp(r"^[\p{L&}]+?X")); - res.add(new RegExp(r"^\P{L&}X")); - res.add(new RegExp(r"^[\P{L&}]X")); - res.add(new RegExp(r"^(\p{Z}[^\p{C}\p{Z}]+)*$")); - res.add(new RegExp(r"([\pL]=(abc))*X")); - res.add(new RegExp( - r"^\p{Balinese}\p{Cuneiform}\p{Nko}\p{Phags_Pa}\p{Phoenician}")); - res.add(new RegExp( - r"The next two are special cases where the lengths of the different cases of the \nsame character differ. The first went wrong with heap frame storage; the 2nd\nwas broken in all cases.")); - res.add(new RegExp(r"Check property support in non-UTF-8 mode")); - res.add(new RegExp(r"\p{L}{4}")); - res.add(new RegExp(r"\X{1,3}\d")); - res.add(new RegExp(r"\X?\d")); - res.add(new RegExp(r"\P{L}?\d")); - res.add(new RegExp(r"[\PPP\x8a]{1,}\x80")); - res.add(new RegExp(r"(?:[\PPa*]*){8,}")); - res.add(new RegExp(r"[\P{Any}]")); - res.add(new RegExp(r"[\P{Any}\E]")); - res.add(new RegExp(r"(\P{Yi}{2}\277)?")); - res.add(new RegExp(r"[\P{Yi}A]")); - res.add(new RegExp(r"[\P{Yi}\P{Yi}\P{Yi}A]")); - res.add(new RegExp(r"[^\P{Yi}A]")); - res.add(new RegExp(r"[^\P{Yi}\P{Yi}\P{Yi}A]")); - res.add(new RegExp(r"(\P{Yi}*\277)*")); - res.add(new RegExp(r"(\P{Yi}*?\277)*")); - res.add(new RegExp(r"(\P{Yi}?\277)*")); - res.add(new RegExp(r"(\P{Yi}??\277)*")); - res.add(new RegExp(r"(\P{Yi}{0,3}\277)*")); - res.add(new RegExp(r"(\P{Yi}{0,3}?\277)*")); - res.add(new RegExp(r"^[\p{Arabic}]")); - res.add(new RegExp(r"^\p{Cyrillic}")); - res.add(new RegExp(r"^\p{Common}")); - res.add(new RegExp(r"^\p{Inherited}")); - res.add(new RegExp(r"^\p{Shavian}")); - res.add(new RegExp(r"^\p{Deseret}")); - res.add(new RegExp(r"^\p{Osmanya}")); - res.add(new RegExp(r"\p{Zl}")); - res.add(new RegExp( - r"\p{Carian}\p{Cham}\p{Kayah_Li}\p{Lepcha}\p{Lycian}\p{Lydian}\p{Ol_Chiki}\p{Rejang}\p{Saurashtra}\p{Sundanese}\p{Vai}")); - res.add(new RegExp(r"(A)\1", caseSensitive: false)); - res.add(new RegExp(r" End of testinput6 ")); - res.add(new RegExp(r"abc")); - res.add(new RegExp(r"ab*c")); - res.add(new RegExp(r"ab+c")); - res.add(new RegExp(r"a*")); - res.add(new RegExp(r"(a|abcd|african)")); - res.add(new RegExp(r"^abc")); - res.add(new RegExp(r"^abc", multiLine: true)); - res.add(new RegExp(r"\Aabc")); - res.add(new RegExp(r"\Aabc", multiLine: true)); - res.add(new RegExp(r"\Gabc")); - res.add(new RegExp(r"x\dy\Dz")); - res.add(new RegExp(r"x\sy\Sz")); - res.add(new RegExp(r"x\wy\Wz")); - res.add(new RegExp(r"x.y")); - res.add(new RegExp(r"x.y")); - res.add(new RegExp(r"a\d\z")); - res.add(new RegExp(r"a\d\z", multiLine: true)); - res.add(new RegExp(r"a\d\Z")); - res.add(new RegExp(r"a\d\Z", multiLine: true)); - res.add(new RegExp(r"a\d$")); - res.add(new RegExp(r"a\d$", multiLine: true)); - res.add(new RegExp(r"abc", caseSensitive: false)); - res.add(new RegExp(r"[^a]")); - res.add(new RegExp(r"ab?\w")); - res.add(new RegExp(r"x{0,3}yz")); - res.add(new RegExp(r"x{3}yz")); - res.add(new RegExp(r"x{2,3}yz")); - res.add(new RegExp(r"[^a]+")); - res.add(new RegExp(r"[^a]*")); - res.add(new RegExp(r"[^a]{3,5}")); - res.add(new RegExp(r"\d*")); - res.add(new RegExp(r"\D*")); - res.add(new RegExp(r"\d+")); - res.add(new RegExp(r"\D+")); - res.add(new RegExp(r"\d?A")); - res.add(new RegExp(r"\D?A")); - res.add(new RegExp(r"a+")); - res.add(new RegExp(r"^.*xyz")); - res.add(new RegExp(r"^.+xyz")); - res.add(new RegExp(r"^.?xyz")); - res.add(new RegExp(r"^\d{2,3}X")); - res.add(new RegExp(r"^[abcd]\d")); - res.add(new RegExp(r"^[abcd]*\d")); - res.add(new RegExp(r"^[abcd]+\d")); - res.add(new RegExp(r"^a+X")); - res.add(new RegExp(r"^[abcd]?\d")); - res.add(new RegExp(r"^[abcd]{2,3}\d")); - res.add(new RegExp(r"^(abc)*\d")); - res.add(new RegExp(r"^(abc)+\d")); - res.add(new RegExp(r"^(abc)?\d")); - res.add(new RegExp(r"^(abc){2,3}\d")); - res.add(new RegExp(r"^(a*\w|ab)=(a*\w|ab)")); - res.add(new RegExp(r"^(?=abc)\w{5}:$")); - res.add(new RegExp(r"^(?!abc)\d\d$")); - res.add(new RegExp(r"(ab|cd){3,4}")); - res.add(new RegExp(r"^abc")); - res.add(new RegExp(r"^(a*|xyz)")); - res.add(new RegExp(r"xyz$")); - res.add(new RegExp(r"xyz$", multiLine: true)); - res.add(new RegExp(r"\Gabc")); - res.add(new RegExp(r"^abcdef")); - res.add(new RegExp(r"^a{2,4}\d+z")); - res.add(new RegExp(r"^abcdef")); - res.add(new RegExp(r"(ab*(cd|ef))+X")); - res.add(new RegExp(r"the quick brown fox")); - res.add(new RegExp(r"The quick brown fox", caseSensitive: false)); - res.add(new RegExp(r"abcd\t\n\r\f\a\e\071\x3b\$\\\?caxyz")); - res.add(new RegExp(r"a*abc?xyz+pqr{3}ab{2,}xy{4,5}pq{0,6}AB{0,}zz")); - res.add(new RegExp(r"^(abc){1,2}zz")); - res.add(new RegExp(r"^(b+?|a){1,2}?c")); - res.add(new RegExp(r"^(b+|a){1,2}c")); - res.add(new RegExp(r"^(b*|ba){1,2}?bc")); - res.add(new RegExp(r"^(ba|b*){1,2}?bc")); - res.add(new RegExp(r"^[ab\]cde]")); - res.add(new RegExp(r"^[]cde]")); - res.add(new RegExp(r"^[^ab\]cde]")); - res.add(new RegExp(r"^[^]cde]")); - res.add(new RegExp(r"^[0-9]+$")); - res.add(new RegExp(r"^.*nter")); - res.add(new RegExp(r"^xxx[0-9]+$")); - res.add(new RegExp(r"^.+[0-9][0-9][0-9]$")); - res.add(new RegExp(r"^.+?[0-9][0-9][0-9]$")); - res.add(new RegExp(r"^([^!]+)!(.+)=apquxz\.ixr\.zzz\.ac\.uk$")); - res.add(new RegExp(r":")); - res.add(new RegExp(r"([\da-f:]+)$", caseSensitive: false)); - res.add(new RegExp(r"^.*\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$")); - res.add(new RegExp(r"^(\d+)\s+IN\s+SOA\s+(\S+)\s+(\S+)\s*\(\s*$")); - res.add( - new RegExp(r"^[a-zA-Z\d][a-zA-Z\d\-]*(\.[a-zA-Z\d][a-zA-z\d\-]*)*\.$")); - res.add(new RegExp( - r"^\*\.[a-z]([a-z\-\d]*[a-z\d]+)?(\.[a-z]([a-z\-\d]*[a-z\d]+)?)*$")); - res.add(new RegExp(r"^(?=ab(de))(abd)(e)")); - res.add(new RegExp(r"^(?!(ab)de|x)(abd)(f)")); - res.add(new RegExp(r"^(?=(ab(cd)))(ab)")); - res.add(new RegExp(r"^[\da-f](\.[\da-f])*$", caseSensitive: false)); - res.add(new RegExp(r'^\".*\"\s*(;.*)?$')); - res.add(new RegExp(r"^$")); - res.add(new RegExp(r"^ab\sc$")); - res.add(new RegExp(r"^a\ b[c]d$")); - res.add(new RegExp(r"^(a(b(c)))(d(e(f)))(h(i(j)))(k(l(m)))$")); - res.add(new RegExp(r"^(?:a(b(c)))(?:d(e(f)))(?:h(i(j)))(?:k(l(m)))$")); - res.add(new RegExp(r"^[\w][\W][\s][\S][\d][\D][\b][\n][\c]][\022]")); - res.add(new RegExp(r"^a*\w")); - res.add(new RegExp(r"^a*?\w")); - res.add(new RegExp(r"^a+\w")); - res.add(new RegExp(r"^a+?\w")); - res.add(new RegExp(r"^\d{8}\w{2,}")); - res.add(new RegExp(r"^[aeiou\d]{4,5}$")); - res.add(new RegExp(r"^[aeiou\d]{4,5}?")); - res.add(new RegExp( - r"^From +([^ ]+) +[a-zA-Z][a-zA-Z][a-zA-Z] +[a-zA-Z][a-zA-Z][a-zA-Z] +[0-9]?[0-9] +[0-9][0-9]:[0-9][0-9]")); - res.add(new RegExp(r"^From\s+\S+\s+([a-zA-Z]{3}\s+){2}\d{1,2}\s+\d\d:\d\d")); - res.add(new RegExp(r"^12.34")); - res.add(new RegExp(r"\w+(?=\t)")); - res.add(new RegExp(r"foo(?!bar)(.*)")); - res.add(new RegExp(r"(?:(?!foo)...|^.{0,2})bar(.*)")); - res.add(new RegExp(r"^(\D*)(?=\d)(?!123)")); - res.add(new RegExp(r"^1234")); - res.add(new RegExp(r"^1234")); - res.add(new RegExp(r"abcd")); - res.add(new RegExp(r"^abcd")); - res.add(new RegExp(r"(?!^)abc")); - res.add(new RegExp(r"(?=^)abc")); - res.add(new RegExp(r"^[ab]{1,3}(ab*|b)")); - res.add(new RegExp(r"^[ab]{1,3}?(ab*|b)")); - res.add(new RegExp(r"^[ab]{1,3}?(ab*?|b)")); - res.add(new RegExp(r"^[ab]{1,3}(ab*?|b)")); - res.add(new RegExp( - r'(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*(?:(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|"(?:[^\\\x80-\xff\n\015"]|\\[^\x80-\xff])*")(?:(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*\.(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|"(?:[^\\\x80-\xff\n\015"]|\\[^\x80-\xff])*"))*(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*@(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\x80-\xff\n\015\[\]]|\\[^\x80-\xff])*\])(?:(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*\.(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\x80-\xff\n\015\[\]]|\\[^\x80-\xff])*\]))*|(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|"(?:[^\\\x80-\xff\n\015"]|\\[^\x80-\xff])*")(?:[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\)|"(?:[^\\\x80-\xff\n\015"]|\\[^\x80-\xff])*")*<(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*(?:@(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\x80-\xff\n\015\[\]]|\\[^\x80-\xff])*\])(?:(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*\.(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\x80-\xff\n\015\[\]]|\\[^\x80-\xff])*\]))*(?:(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*,(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*@(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\x80-\xff\n\015\[\]]|\\[^\x80-\xff])*\])(?:(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*\.(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\x80-\xff\n\015\[\]]|\\[^\x80-\xff])*\]))*)*:(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*)?(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|"(?:[^\\\x80-\xff\n\015"]|\\[^\x80-\xff])*")(?:(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*\.(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|"(?:[^\\\x80-\xff\n\015"]|\\[^\x80-\xff])*"))*(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*@(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\x80-\xff\n\015\[\]]|\\[^\x80-\xff])*\])(?:(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*\.(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\x80-\xff\n\015\[\]]|\\[^\x80-\xff])*\]))*(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*>)(?:[\040\t]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff]|\((?:[^\\\x80-\xff\n\015()]|\\[^\x80-\xff])*\))*\))*')); - res.add(new RegExp( - r'[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|"[^\\\x80-\xff\n\015"]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015"]*)*")[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:\.[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|"[^\\\x80-\xff\n\015"]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015"]*)*")[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*)*@[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\x80-\xff\n\015\[\]]|\\[^\x80-\xff])*\])[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:\.[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\x80-\xff\n\015\[\]]|\\[^\x80-\xff])*\])[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*)*|(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|"[^\\\x80-\xff\n\015"]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015"]*)*")[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037]*(?:(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)|"[^\\\x80-\xff\n\015"]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015"]*)*")[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037]*)*<[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:@[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\x80-\xff\n\015\[\]]|\\[^\x80-\xff])*\])[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:\.[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\x80-\xff\n\015\[\]]|\\[^\x80-\xff])*\])[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*)*(?:,[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*@[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\x80-\xff\n\015\[\]]|\\[^\x80-\xff])*\])[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:\.[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\x80-\xff\n\015\[\]]|\\[^\x80-\xff])*\])[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*)*)*:[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*)?(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|"[^\\\x80-\xff\n\015"]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015"]*)*")[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:\.[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|"[^\\\x80-\xff\n\015"]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015"]*)*")[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*)*@[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\x80-\xff\n\015\[\]]|\\[^\x80-\xff])*\])[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:\.[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*(?:[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff])|\[(?:[^\\\x80-\xff\n\015\[\]]|\\[^\x80-\xff])*\])[\040\t]*(?:\([^\\\x80-\xff\n\015()]*(?:(?:\\[^\x80-\xff]|\([^\\\x80-\xff\n\015()]*(?:\\[^\x80-\xff][^\\\x80-\xff\n\015()]*)*\))[^\\\x80-\xff\n\015()]*)*\)[\040\t]*)*)*>)')); - res.add(new RegExp(r"abc\x0def\x00pqr\x000xyz\x0000AB")); - res.add(new RegExp(r"^[\000-\037]")); - res.add(new RegExp(r"\0*")); - res.add(new RegExp(r"A\x0{2,3}Z")); - res.add(new RegExp(r"^\s")); - res.add(new RegExp(r"^abc")); - res.add(new RegExp(r"ab{1,3}bc")); - res.add(new RegExp(r"([^.]*)\.([^:]*):[T ]+(.*)")); - res.add(new RegExp(r"([^.]*)\.([^:]*):[T ]+(.*)", caseSensitive: false)); - res.add(new RegExp(r"([^.]*)\.([^:]*):[t ]+(.*)", caseSensitive: false)); - res.add(new RegExp(r"^[W-c]+$")); - res.add(new RegExp(r"^[W-c]+$", caseSensitive: false)); - res.add(new RegExp(r"^[\x3f-\x5F]+$", caseSensitive: false)); - res.add(new RegExp(r"^abc$", multiLine: true)); - res.add(new RegExp(r"^abc$")); - res.add(new RegExp(r"\Aabc\Z", multiLine: true)); - res.add(new RegExp(r"\A(.)*\Z")); - res.add(new RegExp(r"\A(.)*\Z", multiLine: true)); - res.add(new RegExp(r"(?:b)|(?::+)")); - res.add(new RegExp(r"[-az]+")); - res.add(new RegExp(r"[az-]+")); - res.add(new RegExp(r"[a\-z]+")); - res.add(new RegExp(r"[a-z]+")); - res.add(new RegExp(r"[\d-]+")); - res.add(new RegExp(r"[\d-z]+")); - res.add(new RegExp(r"\x5c")); - res.add(new RegExp(r"\x20Z")); - res.add(new RegExp(r"ab{3cd")); - res.add(new RegExp(r"ab{3,cd")); - res.add(new RegExp(r"ab{3,4a}cd")); - res.add(new RegExp(r"{4,5a}bc")); - res.add(new RegExp(r"^a.b")); - res.add(new RegExp(r"abc$")); - res.add(new RegExp(r"(abc)\123")); - res.add(new RegExp(r"(abc)\223")); - res.add(new RegExp(r"(abc)\323")); - res.add(new RegExp(r"(abc)\100")); - res.add(new RegExp(r"abc\81")); - res.add(new RegExp(r"abc\91")); - res.add(new RegExp(r"(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)\12\123")); - res.add(new RegExp(r"ab\idef")); - res.add(new RegExp(r"a{0}bc")); - res.add(new RegExp(r"(a|(bc)){0,0}?xyz")); - res.add(new RegExp(r"abc[\10]de")); - res.add(new RegExp(r"abc[\1]de")); - res.add(new RegExp(r"(abc)[\1]de")); - res.add(new RegExp(r"^([^a])([^\b])([^c]*)([^d]{3,4})")); - res.add(new RegExp(r"[^a]")); - res.add(new RegExp(r"[^a]", caseSensitive: false)); - res.add(new RegExp(r"[^a]+")); - res.add(new RegExp(r"[^a]+", caseSensitive: false)); - res.add(new RegExp(r"[^a]+")); - res.add(new RegExp(r"[^k]$")); - res.add(new RegExp(r"[^k]{2,3}$")); - res.add(new RegExp(r"^\d{8,}\@.+[^k]$")); - res.add(new RegExp(r"[^a]")); - res.add(new RegExp(r"[^a]", caseSensitive: false)); - res.add(new RegExp(r"[^az]")); - res.add(new RegExp(r"[^az]", caseSensitive: false)); - res.add(new RegExp( - r"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\042\043\044\045\046\047\050\051\052\053\054\055\056\057\060\061\062\063\064\065\066\067\070\071\072\073\074\075\076\077\100\101\102\103\104\105\106\107\110\111\112\113\114\115\116\117\120\121\122\123\124\125\126\127\130\131\132\133\134\135\136\137\140\141\142\143\144\145\146\147\150\151\152\153\154\155\156\157\160\161\162\163\164\165\166\167\170\171\172\173\174\175\176\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377")); - res.add(new RegExp(r"P[^*]TAIRE[^*]{1,6}?LL")); - res.add(new RegExp(r"P[^*]TAIRE[^*]{1,}?LL")); - res.add(new RegExp(r"(\.\d\d[1-9]?)\d+")); - res.add(new RegExp(r"(\.\d\d((?=0)|\d(?=\d)))")); - res.add(new RegExp(r"\b(foo)\s+(\w+)", caseSensitive: false)); - res.add(new RegExp(r"foo(.*)bar")); - res.add(new RegExp(r"foo(.*?)bar")); - res.add(new RegExp(r"(.*)(\d*)")); - res.add(new RegExp(r"(.*)(\d+)")); - res.add(new RegExp(r"(.*?)(\d*)")); - res.add(new RegExp(r"(.*?)(\d+)")); - res.add(new RegExp(r"(.*)(\d+)$")); - res.add(new RegExp(r"(.*?)(\d+)$")); - res.add(new RegExp(r"(.*)\b(\d+)$")); - res.add(new RegExp(r"(.*\D)(\d+)$")); - res.add(new RegExp(r"^\D*(?!123)")); - res.add(new RegExp(r"^(\D*)(?=\d)(?!123)")); - res.add(new RegExp(r"^[W-]46]")); - res.add(new RegExp(r"^[W-\]46]")); - res.add(new RegExp(r"\d\d\/\d\d\/\d\d\d\d")); - res.add(new RegExp(r"word (?:[a-zA-Z0-9]+ ){0,10}otherword")); - res.add(new RegExp(r"word (?:[a-zA-Z0-9]+ ){0,300}otherword")); - res.add(new RegExp(r"^(a){0,0}")); - res.add(new RegExp(r"^(a){0,1}")); - res.add(new RegExp(r"^(a){0,2}")); - res.add(new RegExp(r"^(a){0,3}")); - res.add(new RegExp(r"^(a){0,}")); - res.add(new RegExp(r"^(a){1,1}")); - res.add(new RegExp(r"^(a){1,2}")); - res.add(new RegExp(r"^(a){1,3}")); - res.add(new RegExp(r"^(a){1,}")); - res.add(new RegExp(r".*\.gif")); - res.add(new RegExp(r".{0,}\.gif")); - res.add(new RegExp(r".*\.gif", multiLine: true)); - res.add(new RegExp(r".*\.gif")); - res.add(new RegExp(r".*\.gif", multiLine: true)); - res.add(new RegExp(r".*$")); - res.add(new RegExp(r".*$", multiLine: true)); - res.add(new RegExp(r".*$")); - res.add(new RegExp(r".*$", multiLine: true)); - res.add(new RegExp(r".*$")); - res.add(new RegExp(r".*$", multiLine: true)); - res.add(new RegExp(r".*$")); - res.add(new RegExp(r".*$", multiLine: true)); - res.add(new RegExp(r"(.*X|^B)")); - res.add(new RegExp(r"(.*X|^B)", multiLine: true)); - res.add(new RegExp(r"(.*X|^B)")); - res.add(new RegExp(r"(.*X|^B)", multiLine: true)); - res.add(new RegExp(r"^.*B")); - res.add(new RegExp( - r"^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]")); - res.add(new RegExp(r"^\d\d\d\d\d\d\d\d\d\d\d\d")); - res.add(new RegExp(r"^[\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d][\d]")); - res.add(new RegExp(r"^[abc]{12}")); - res.add(new RegExp(r"^[a-c]{12}")); - res.add(new RegExp(r"^(a|b|c){12}")); - res.add(new RegExp(r"^[abcdefghijklmnopqrstuvwxy0123456789]")); - res.add(new RegExp(r"abcde{0,0}")); - res.add(new RegExp(r"ab[cd]{0,0}e")); - res.add(new RegExp(r"ab(c){0,0}d")); - res.add(new RegExp(r"a(b*)")); - res.add(new RegExp(r"ab\d{0}e")); - res.add(new RegExp(r'"([^\\"]+|\\.)*"')); - res.add(new RegExp(r".*?")); - res.add(new RegExp(r"\b")); - res.add(new RegExp(r"\b")); - res.add(new RegExp( - r"]{0,})>]{0,})>([\d]{0,}\.)(.*)((
([\w\W\s\d][^<>]{0,})|[\s]{0,}))<\/a><\/TD>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD>]{0,})>([\w\W\s\d][^<>]{0,})<\/TD><\/TR>", - caseSensitive: false)); - res.add(new RegExp(r"a[^a]b")); - res.add(new RegExp(r"a.b")); - res.add(new RegExp(r"a[^a]b")); - res.add(new RegExp(r"a.b")); - res.add(new RegExp(r"^(b+?|a){1,2}?c")); - res.add(new RegExp(r"^(b+|a){1,2}?c")); - res.add(new RegExp(r"(?!\A)x", multiLine: true)); - res.add(new RegExp(r"\x0{ab}")); - res.add(new RegExp(r"(A|B)*?CD")); - res.add(new RegExp(r"(A|B)*CD")); - res.add(new RegExp(r"\Aabc\z", multiLine: true)); - res.add(new RegExp(r"(\d+)(\w)")); - res.add(new RegExp(r"(a+|b+|c+)*c")); - res.add(new RegExp(r"(abc|)+")); - res.add(new RegExp(r"([a]*)*")); - res.add(new RegExp(r"([ab]*)*")); - res.add(new RegExp(r"([^a]*)*")); - res.add(new RegExp(r"([^ab]*)*")); - res.add(new RegExp(r"([a]*?)*")); - res.add(new RegExp(r"([ab]*?)*")); - res.add(new RegExp(r"([^a]*?)*")); - res.add(new RegExp(r"([^ab]*?)*")); - res.add(new RegExp( - r"The following tests are taken from the Perl 5.005 test suite; some of them")); - res.add(new RegExp( - r"are compatible with 5.004, but I'd rather not have to sort them out.")); - res.add(new RegExp(r"abc")); - res.add(new RegExp(r"ab*c")); - res.add(new RegExp(r"ab*bc")); - res.add(new RegExp(r".{1}")); - res.add(new RegExp(r".{3,4}")); - res.add(new RegExp(r"ab{0,}bc")); - res.add(new RegExp(r"ab+bc")); - res.add(new RegExp(r"ab{1,}bc")); - res.add(new RegExp(r"ab+bc")); - res.add(new RegExp(r"ab{1,}bc")); - res.add(new RegExp(r"ab{1,3}bc")); - res.add(new RegExp(r"ab{3,4}bc")); - res.add(new RegExp(r"ab{4,5}bc")); - res.add(new RegExp(r"ab?bc")); - res.add(new RegExp(r"ab{0,1}bc")); - res.add(new RegExp(r"ab?bc")); - res.add(new RegExp(r"ab?c")); - res.add(new RegExp(r"ab{0,1}c")); - res.add(new RegExp(r"^abc$")); - res.add(new RegExp(r"^abc")); - res.add(new RegExp(r"^abc$")); - res.add(new RegExp(r"abc$")); - res.add(new RegExp(r"^")); - res.add(new RegExp(r"$")); - res.add(new RegExp(r"a.c")); - res.add(new RegExp(r"a.*c")); - res.add(new RegExp(r"a[bc]d")); - res.add(new RegExp(r"a[b-d]e")); - res.add(new RegExp(r"a[b-d]")); - res.add(new RegExp(r"a[-b]")); - res.add(new RegExp(r"a[b-]")); - res.add(new RegExp(r"a]")); - res.add(new RegExp(r"a[]]b")); - res.add(new RegExp(r"a[^bc]d")); - res.add(new RegExp(r"a[^-b]c")); - res.add(new RegExp(r"a[^]b]c")); - res.add(new RegExp(r"\ba\b")); - res.add(new RegExp(r"\by\b")); - res.add(new RegExp(r"\Ba\B")); - res.add(new RegExp(r"\By\b")); - res.add(new RegExp(r"\by\B")); - res.add(new RegExp(r"\By\B")); - res.add(new RegExp(r"\w")); - res.add(new RegExp(r"\W")); - res.add(new RegExp(r"a\sb")); - res.add(new RegExp(r"a\Sb")); - res.add(new RegExp(r"\d")); - res.add(new RegExp(r"\D")); - res.add(new RegExp(r"[\w]")); - res.add(new RegExp(r"[\W]")); - res.add(new RegExp(r"a[\s]b")); - res.add(new RegExp(r"a[\S]b")); - res.add(new RegExp(r"[\d]")); - res.add(new RegExp(r"[\D]")); - res.add(new RegExp(r"ab|cd")); - res.add(new RegExp(r"()ef")); - res.add(new RegExp(r"$b")); - res.add(new RegExp(r"a\(b")); - res.add(new RegExp(r"a\\b")); - res.add(new RegExp(r"((a))")); - res.add(new RegExp(r"(a)b(c)")); - res.add(new RegExp(r"a+b+c")); - res.add(new RegExp(r"a{1,}b{1,}c")); - res.add(new RegExp(r"a.+?c")); - res.add(new RegExp(r"(a+|b)*")); - res.add(new RegExp(r"(a+|b){0,}")); - res.add(new RegExp(r"(a+|b)+")); - res.add(new RegExp(r"(a+|b){1,}")); - res.add(new RegExp(r"(a+|b)?")); - res.add(new RegExp(r"(a+|b){0,1}")); - res.add(new RegExp(r"[^ab]*")); - res.add(new RegExp(r"abc")); - res.add(new RegExp(r"a*")); - res.add(new RegExp(r"([abc])*d")); - res.add(new RegExp(r"([abc])*bcd")); - res.add(new RegExp(r"a|b|c|d|e")); - res.add(new RegExp(r"(a|b|c|d|e)f")); - res.add(new RegExp(r"abcd*efg")); - res.add(new RegExp(r"ab*")); - res.add(new RegExp(r"(ab|cd)e")); - res.add(new RegExp(r"[abhgefdc]ij")); - res.add(new RegExp(r"^(ab|cd)e")); - res.add(new RegExp(r"(abc|)ef")); - res.add(new RegExp(r"(a|b)c*d")); - res.add(new RegExp(r"(ab|ab*)bc")); - res.add(new RegExp(r"a([bc]*)c*")); - res.add(new RegExp(r"a([bc]*)(c*d)")); - res.add(new RegExp(r"a([bc]+)(c*d)")); - res.add(new RegExp(r"a([bc]*)(c+d)")); - res.add(new RegExp(r"a[bcd]*dcdcde")); - res.add(new RegExp(r"a[bcd]+dcdcde")); - res.add(new RegExp(r"(ab|a)b*c")); - res.add(new RegExp(r"((a)(b)c)(d)")); - res.add(new RegExp(r"[a-zA-Z_][a-zA-Z0-9_]*")); - res.add(new RegExp(r"^a(bc+|b[eh])g|.h$")); - res.add(new RegExp(r"(bc+d$|ef*g.|h?i(j|k))")); - res.add(new RegExp(r"((((((((((a))))))))))")); - res.add(new RegExp(r"(((((((((a)))))))))")); - res.add(new RegExp(r"multiple words of text")); - res.add(new RegExp(r"multiple words")); - res.add(new RegExp(r"(.*)c(.*)")); - res.add(new RegExp(r"\((.*), (.*)\)")); - res.add(new RegExp(r"[k]")); - res.add(new RegExp(r"abcd")); - res.add(new RegExp(r"a(bc)d")); - res.add(new RegExp(r"a[-]?c")); - res.add(new RegExp(r"abc", caseSensitive: false)); - res.add(new RegExp(r"ab*c", caseSensitive: false)); - res.add(new RegExp(r"ab*bc", caseSensitive: false)); - res.add(new RegExp(r"ab*?bc", caseSensitive: false)); - res.add(new RegExp(r"ab{0,}?bc", caseSensitive: false)); - res.add(new RegExp(r"ab+?bc", caseSensitive: false)); - res.add(new RegExp(r"ab+bc", caseSensitive: false)); - res.add(new RegExp(r"ab{1,}bc", caseSensitive: false)); - res.add(new RegExp(r"ab+bc", caseSensitive: false)); - res.add(new RegExp(r"ab{1,}?bc", caseSensitive: false)); - res.add(new RegExp(r"ab{1,3}?bc", caseSensitive: false)); - res.add(new RegExp(r"ab{3,4}?bc", caseSensitive: false)); - res.add(new RegExp(r"ab{4,5}?bc", caseSensitive: false)); - res.add(new RegExp(r"ab??bc", caseSensitive: false)); - res.add(new RegExp(r"ab{0,1}?bc", caseSensitive: false)); - res.add(new RegExp(r"ab??bc", caseSensitive: false)); - res.add(new RegExp(r"ab??c", caseSensitive: false)); - res.add(new RegExp(r"ab{0,1}?c", caseSensitive: false)); - res.add(new RegExp(r"^abc$", caseSensitive: false)); - res.add(new RegExp(r"^abc", caseSensitive: false)); - res.add(new RegExp(r"^abc$", caseSensitive: false)); - res.add(new RegExp(r"abc$", caseSensitive: false)); - res.add(new RegExp(r"^", caseSensitive: false)); - res.add(new RegExp(r"$", caseSensitive: false)); - res.add(new RegExp(r"a.c", caseSensitive: false)); - res.add(new RegExp(r"a.*?c", caseSensitive: false)); - res.add(new RegExp(r"a.*c", caseSensitive: false)); - res.add(new RegExp(r"a[bc]d", caseSensitive: false)); - res.add(new RegExp(r"a[b-d]e", caseSensitive: false)); - res.add(new RegExp(r"a[b-d]", caseSensitive: false)); - res.add(new RegExp(r"a[-b]", caseSensitive: false)); - res.add(new RegExp(r"a[b-]", caseSensitive: false)); - res.add(new RegExp(r"a]", caseSensitive: false)); - res.add(new RegExp(r"a[]]b", caseSensitive: false)); - res.add(new RegExp(r"a[^bc]d", caseSensitive: false)); - res.add(new RegExp(r"a[^-b]c", caseSensitive: false)); - res.add(new RegExp(r"a[^]b]c", caseSensitive: false)); - res.add(new RegExp(r"ab|cd", caseSensitive: false)); - res.add(new RegExp(r"()ef", caseSensitive: false)); - res.add(new RegExp(r"$b", caseSensitive: false)); - res.add(new RegExp(r"a\(b", caseSensitive: false)); - res.add(new RegExp(r"a\\b", caseSensitive: false)); - res.add(new RegExp(r"((a))", caseSensitive: false)); - res.add(new RegExp(r"(a)b(c)", caseSensitive: false)); - res.add(new RegExp(r"a+b+c", caseSensitive: false)); - res.add(new RegExp(r"a{1,}b{1,}c", caseSensitive: false)); - res.add(new RegExp(r"a.+?c", caseSensitive: false)); - res.add(new RegExp(r"a.*?c", caseSensitive: false)); - res.add(new RegExp(r"a.{0,5}?c", caseSensitive: false)); - res.add(new RegExp(r"(a+|b)*", caseSensitive: false)); - res.add(new RegExp(r"(a+|b){0,}", caseSensitive: false)); - res.add(new RegExp(r"(a+|b)+", caseSensitive: false)); - res.add(new RegExp(r"(a+|b){1,}", caseSensitive: false)); - res.add(new RegExp(r"(a+|b)?", caseSensitive: false)); - res.add(new RegExp(r"(a+|b){0,1}", caseSensitive: false)); - res.add(new RegExp(r"(a+|b){0,1}?", caseSensitive: false)); - res.add(new RegExp(r"[^ab]*", caseSensitive: false)); - res.add(new RegExp(r"abc", caseSensitive: false)); - res.add(new RegExp(r"a*", caseSensitive: false)); - res.add(new RegExp(r"([abc])*d", caseSensitive: false)); - res.add(new RegExp(r"([abc])*bcd", caseSensitive: false)); - res.add(new RegExp(r"a|b|c|d|e", caseSensitive: false)); - res.add(new RegExp(r"(a|b|c|d|e)f", caseSensitive: false)); - res.add(new RegExp(r"abcd*efg", caseSensitive: false)); - res.add(new RegExp(r"ab*", caseSensitive: false)); - res.add(new RegExp(r"(ab|cd)e", caseSensitive: false)); - res.add(new RegExp(r"[abhgefdc]ij", caseSensitive: false)); - res.add(new RegExp(r"^(ab|cd)e", caseSensitive: false)); - res.add(new RegExp(r"(abc|)ef", caseSensitive: false)); - res.add(new RegExp(r"(a|b)c*d", caseSensitive: false)); - res.add(new RegExp(r"(ab|ab*)bc", caseSensitive: false)); - res.add(new RegExp(r"a([bc]*)c*", caseSensitive: false)); - res.add(new RegExp(r"a([bc]*)(c*d)", caseSensitive: false)); - res.add(new RegExp(r"a([bc]+)(c*d)", caseSensitive: false)); - res.add(new RegExp(r"a([bc]*)(c+d)", caseSensitive: false)); - res.add(new RegExp(r"a[bcd]*dcdcde", caseSensitive: false)); - res.add(new RegExp(r"a[bcd]+dcdcde", caseSensitive: false)); - res.add(new RegExp(r"(ab|a)b*c", caseSensitive: false)); - res.add(new RegExp(r"((a)(b)c)(d)", caseSensitive: false)); - res.add(new RegExp(r"[a-zA-Z_][a-zA-Z0-9_]*", caseSensitive: false)); - res.add(new RegExp(r"^a(bc+|b[eh])g|.h$", caseSensitive: false)); - res.add(new RegExp(r"(bc+d$|ef*g.|h?i(j|k))", caseSensitive: false)); - res.add(new RegExp(r"((((((((((a))))))))))", caseSensitive: false)); - res.add(new RegExp(r"(((((((((a)))))))))", caseSensitive: false)); - res.add(new RegExp(r"(?:(?:(?:(?:(?:(?:(?:(?:(?:(a))))))))))", - caseSensitive: false)); - res.add(new RegExp(r"(?:(?:(?:(?:(?:(?:(?:(?:(?:(a|b|c))))))))))", - caseSensitive: false)); - res.add(new RegExp(r"multiple words of text", caseSensitive: false)); - res.add(new RegExp(r"multiple words", caseSensitive: false)); - res.add(new RegExp(r"(.*)c(.*)", caseSensitive: false)); - res.add(new RegExp(r"\((.*), (.*)\)", caseSensitive: false)); - res.add(new RegExp(r"[k]", caseSensitive: false)); - res.add(new RegExp(r"abcd", caseSensitive: false)); - res.add(new RegExp(r"a(bc)d", caseSensitive: false)); - res.add(new RegExp(r"a[-]?c", caseSensitive: false)); - res.add(new RegExp(r"a(?!b).")); - res.add(new RegExp(r"a(?=d).")); - res.add(new RegExp(r"a(?=c|d).")); - res.add(new RegExp(r"a(?:b|c|d)(.)")); - res.add(new RegExp(r"a(?:b|c|d)*(.)")); - res.add(new RegExp(r"a(?:b|c|d)+?(.)")); - res.add(new RegExp(r"a(?:b|c|d)+(.)")); - res.add(new RegExp(r"a(?:b|c|d){2}(.)")); - res.add(new RegExp(r"a(?:b|c|d){4,5}(.)")); - res.add(new RegExp(r"a(?:b|c|d){4,5}?(.)")); - res.add(new RegExp(r"((foo)|(bar))*")); - res.add(new RegExp(r"a(?:b|c|d){6,7}(.)")); - res.add(new RegExp(r"a(?:b|c|d){6,7}?(.)")); - res.add(new RegExp(r"a(?:b|c|d){5,6}(.)")); - res.add(new RegExp(r"a(?:b|c|d){5,6}?(.)")); - res.add(new RegExp(r"a(?:b|c|d){5,7}(.)")); - res.add(new RegExp(r"a(?:b|c|d){5,7}?(.)")); - res.add(new RegExp(r"a(?:b|(c|e){1,2}?|d)+?(.)")); - res.add(new RegExp(r"^(.+)?B")); - res.add(new RegExp(r"^([^a-z])|(\^)$")); - res.add(new RegExp(r"^[<>]&")); - res.add(new RegExp(r"(?:(f)(o)(o)|(b)(a)(r))*")); - res.add(new RegExp(r"(?:..)*a")); - res.add(new RegExp(r"(?:..)*?a")); - res.add(new RegExp(r"^(){3,5}")); - res.add(new RegExp(r"^(a+)*ax")); - res.add(new RegExp(r"^((a|b)+)*ax")); - res.add(new RegExp(r"^((a|bc)+)*ax")); - res.add(new RegExp(r"(a|x)*ab")); - res.add(new RegExp(r"(a)*ab")); - res.add(new RegExp(r"(?:c|d)(?:)(?:a(?:)(?:b)(?:b(?:))(?:b(?:)(?:b)))")); - res.add(new RegExp( - r"(?:c|d)(?:)(?:aaaaaaaa(?:)(?:bbbbbbbb)(?:bbbbbbbb(?:))(?:bbbbbbbb(?:)(?:bbbbbbbb)))")); - res.add(new RegExp(r"foo\w*\d{4}baz")); - res.add(new RegExp(r"x(~~)*(?:(?:F)?)?")); - res.add(new RegExp(r"^a{3}c")); - res.add(new RegExp(r"^a{3}c")); - res.add(new RegExp(r"^(?:a?b?)*$")); - res.add(new RegExp(r"^b")); - res.add(new RegExp(r"()^b")); - res.add(new RegExp(r"(\w+:)+")); - res.add(new RegExp(r"([\w:]+::)?(\w+)$")); - res.add(new RegExp(r"^[^bcd]*(c+)")); - res.add(new RegExp(r"(a*)b+")); - res.add(new RegExp(r"([\w:]+::)?(\w+)$")); - res.add(new RegExp(r"^[^bcd]*(c+)")); - res.add(new RegExp(r"(>a+)ab")); - res.add(new RegExp(r"([[:]+)")); - res.add(new RegExp(r"([[=]+)")); - res.add(new RegExp(r"([[.]+)")); - res.add(new RegExp(r"a\Z")); - res.add(new RegExp(r"b\Z")); - res.add(new RegExp(r"b\z")); - res.add(new RegExp(r"b\Z")); - res.add(new RegExp(r"b\z")); - res.add(new RegExp(r"((Z)+|A)*")); - res.add(new RegExp(r"(Z()|A)*")); - res.add(new RegExp(r"(Z(())|A)*")); - res.add(new RegExp(r"a*")); - res.add(new RegExp(r"^[\d-a]")); - res.add(new RegExp(r"[[:space:]]+")); - res.add(new RegExp(r"[[:blank:]]+")); - res.add(new RegExp(r"[\s]+")); - res.add(new RegExp(r"\s+")); - res.add(new RegExp(r"a b")); - res.add(new RegExp(r"(?!\A)x", multiLine: true)); - res.add(new RegExp(r"(?!^)x", multiLine: true)); - res.add(new RegExp(r"abc\Qabc\Eabc")); - res.add(new RegExp(r"abc\Qabc\Eabc")); - res.add(new RegExp(r"abc\Qliteral\E")); - res.add(new RegExp(r"abc\Qliteral")); - res.add(new RegExp(r"abc\Qliteral\E")); - res.add(new RegExp(r"abc\Qliteral\E")); - res.add(new RegExp(r"\Qabc\$xyz\E")); - res.add(new RegExp(r"\Qabc\E\$\Qxyz\E")); - res.add(new RegExp(r"\Gabc")); - res.add(new RegExp(r"\Gabc.")); - res.add(new RegExp(r"abc.")); - res.add(new RegExp(r"[z\Qa-d]\E]")); - res.add(new RegExp(r"[\z\C]")); - res.add(new RegExp(r"\M")); - res.add(new RegExp(r"(a+)*b")); - res.add(new RegExp(r"line\nbreak")); - res.add(new RegExp(r"line\nbreak")); - res.add(new RegExp(r"line\nbreak", multiLine: true)); - res.add(new RegExp(r"1234")); - res.add(new RegExp(r"1234")); - res.add(new RegExp(r"^", multiLine: true)); - res.add(new RegExp(r"Content-Type\x3A[^\r\n]{6,}")); - res.add(new RegExp(r"Content-Type\x3A[^\r\n]{6,}z")); - res.add(new RegExp(r"Content-Type\x3A[^a]{6,}")); - res.add(new RegExp(r"Content-Type\x3A[^a]{6,}z")); - res.add(new RegExp(r"^abc", multiLine: true)); - res.add(new RegExp(r"abc$", multiLine: true)); - res.add(new RegExp(r"^abc", multiLine: true)); - res.add(new RegExp(r"^abc", multiLine: true)); - res.add(new RegExp(r"^abc", multiLine: true)); - res.add(new RegExp(r".*")); - res.add(new RegExp(r"\w+(.)(.)?def")); - res.add(new RegExp(r"^\w+=.*(\\\n.*)*")); - res.add(new RegExp(r"^(a()*)*")); - res.add(new RegExp(r"^(?:a(?:(?:))*)*")); - res.add(new RegExp(r"^(a()+)+")); - res.add(new RegExp(r"^(?:a(?:(?:))+)+")); - res.add(new RegExp(r"(a|)*\d")); - res.add(new RegExp(r"(?:a|)*\d")); - res.add(new RegExp(r"^a.b")); - res.add(new RegExp(r"^abc.", multiLine: true)); - res.add(new RegExp(r"abc.$", multiLine: true)); - res.add(new RegExp(r"^a\Rb", caseSensitive: false)); - res.add(new RegExp(r"^a\R*b", caseSensitive: false)); - res.add(new RegExp(r"^a\R+b", caseSensitive: false)); - res.add(new RegExp(r"^a\R{1,3}b", caseSensitive: false)); - res.add(new RegExp(r"^a[\R]b", caseSensitive: false)); - res.add(new RegExp(r".+foo")); - res.add(new RegExp(r".+foo")); - res.add(new RegExp(r".+foo")); - res.add(new RegExp(r".+foo")); - res.add(new RegExp(r"^$", multiLine: true)); - res.add(new RegExp(r"^X", multiLine: true)); - res.add(new RegExp(r"\H\h\V\v")); - res.add(new RegExp(r"\H*\h+\V?\v{3,4}")); - res.add(new RegExp(r"\H{3,4}")); - res.add(new RegExp(r".\h{3,4}.")); - res.add(new RegExp(r"\h*X\h?\H+Y\H?Z")); - res.add(new RegExp(r"\v*X\v?Y\v+Z\V*\x0a\V+\x0b\V{2,3}\x0c")); - res.add(new RegExp(r".+A")); - res.add(new RegExp(r"\nA")); - res.add(new RegExp(r"[\r\n]A")); - res.add(new RegExp(r"(\r|\n)A")); - res.add(new RegExp(r"a\Rb", caseSensitive: false)); - res.add(new RegExp(r"a\Rb", caseSensitive: false)); - res.add(new RegExp(r"a\R?b", caseSensitive: false)); - res.add(new RegExp(r"a\R?b", caseSensitive: false)); - res.add(new RegExp(r"a\R{2,4}b", caseSensitive: false)); - res.add(new RegExp(r"a\R{2,4}b", caseSensitive: false)); - res.add(new RegExp(r"a(?!)|\wbc")); - res.add(new RegExp(r"a[]b")); - res.add(new RegExp(r"a[]+b")); - res.add(new RegExp(r"a[^]b")); - res.add(new RegExp(r"a[^]+b")); - res.add(new RegExp(r" End of testinput7 ")); - res.add(new RegExp(r"\bX")); - res.add(new RegExp(r"\BX")); - res.add(new RegExp(r"X\b")); - res.add(new RegExp(r"X\B")); - res.add(new RegExp(r"[^a]")); - res.add(new RegExp(r"abc")); - res.add(new RegExp(r"a.b")); - res.add(new RegExp(r"a(.{3})b")); - res.add(new RegExp(r"a(.*?)(.)")); - res.add(new RegExp(r"a(.*?)(.)")); - res.add(new RegExp(r"a(.*)(.)")); - res.add(new RegExp(r"a(.*)(.)")); - res.add(new RegExp(r"a(.)(.)")); - res.add(new RegExp(r"a(.)(.)")); - res.add(new RegExp(r"a(.?)(.)")); - res.add(new RegExp(r"a(.?)(.)")); - res.add(new RegExp(r"a(.??)(.)")); - res.add(new RegExp(r"a(.??)(.)")); - res.add(new RegExp(r"a(.{3})b")); - res.add(new RegExp(r"a(.{3,})b")); - res.add(new RegExp(r"a(.{3,}?)b")); - res.add(new RegExp(r"a(.{3,5})b")); - res.add(new RegExp(r"a(.{3,5}?)b")); - res.add(new RegExp(r"[^a]+")); - res.add(new RegExp(r"^[^a]{2}")); - res.add(new RegExp(r"^[^a]{2,}")); - res.add(new RegExp(r"^[^a]{2,}?")); - res.add(new RegExp(r"[^a]+", caseSensitive: false)); - res.add(new RegExp(r"^[^a]{2}", caseSensitive: false)); - res.add(new RegExp(r"^[^a]{2,}", caseSensitive: false)); - res.add(new RegExp(r"^[^a]{2,}?", caseSensitive: false)); - res.add(new RegExp(r"\D*")); - res.add(new RegExp(r"\D*")); - res.add(new RegExp(r"\D")); - res.add(new RegExp(r">\S")); - res.add(new RegExp(r"\d")); - res.add(new RegExp(r"\s")); - res.add(new RegExp(r"\D+")); - res.add(new RegExp(r"\D{2,3}")); - res.add(new RegExp(r"\D{2,3}?")); - res.add(new RegExp(r"\d+")); - res.add(new RegExp(r"\d{2,3}")); - res.add(new RegExp(r"\d{2,3}?")); - res.add(new RegExp(r"\S+")); - res.add(new RegExp(r"\S{2,3}")); - res.add(new RegExp(r"\S{2,3}?")); - res.add(new RegExp(r">\s+<")); - res.add(new RegExp(r">\s{2,3}<")); - res.add(new RegExp(r">\s{2,3}?<")); - res.add(new RegExp(r"\w+")); - res.add(new RegExp(r"\w{2,3}")); - res.add(new RegExp(r"\w{2,3}?")); - res.add(new RegExp(r"\W+")); - res.add(new RegExp(r"\W{2,3}")); - res.add(new RegExp(r"\W{2,3}?")); - res.add(new RegExp(r"[\xFF]")); - res.add(new RegExp(r"[\xff]")); - res.add(new RegExp(r"[^\xFF]")); - res.add(new RegExp(r"[^\xff]")); - res.add(new RegExp(r"^[ac]*b")); - res.add(new RegExp(r"^[^x]*b", caseSensitive: false)); - res.add(new RegExp(r"^[^x]*b")); - res.add(new RegExp(r"^\d*b")); - res.add(new RegExp(r"(|a)")); - res.add(new RegExp(r"^abc.", multiLine: true)); - res.add(new RegExp(r"abc.$", multiLine: true)); - res.add(new RegExp(r"^a\Rb", caseSensitive: false)); - res.add(new RegExp(r"^a\R*b", caseSensitive: false)); - res.add(new RegExp(r"^a\R+b", caseSensitive: false)); - res.add(new RegExp(r"^a\R{1,3}b", caseSensitive: false)); - res.add(new RegExp(r"\h+\V?\v{3,4}")); - res.add(new RegExp(r"\V?\v{3,4}")); - res.add(new RegExp(r"\h+\V?\v{3,4}")); - res.add(new RegExp(r"\V?\v{3,4}")); - res.add(new RegExp(r"\H\h\V\v")); - res.add(new RegExp(r"\H*\h+\V?\v{3,4}")); - res.add(new RegExp(r"\H\h\V\v")); - res.add(new RegExp(r"\H*\h+\V?\v{3,4}")); - res.add(new RegExp(r"a\Rb", caseSensitive: false)); - res.add(new RegExp(r"a\Rb", caseSensitive: false)); - res.add(new RegExp(r"a\R?b", caseSensitive: false)); - res.add(new RegExp(r"a\R?b", caseSensitive: false)); - res.add(new RegExp(r"X")); - res.add(new RegExp(r" End of testinput 8 ")); - res.add(new RegExp(r"\pL\P{Nd}")); - res.add(new RegExp(r"\X.")); - res.add(new RegExp(r"\X\X")); - res.add(new RegExp(r"^\pL+")); - res.add(new RegExp(r"^\PL+")); - res.add(new RegExp(r"^\X+")); - res.add(new RegExp(r"\X?abc")); - res.add(new RegExp(r"^\X?abc")); - res.add(new RegExp(r"\X*abc")); - res.add(new RegExp(r"^\X*abc")); - res.add(new RegExp(r"^\pL?=.")); - res.add(new RegExp(r"^\pL*=.")); - res.add(new RegExp(r"^\X{2,3}X")); - res.add(new RegExp(r"^\pC\pL\pM\pN\pP\pS\pZ<")); - res.add(new RegExp(r"^\PC")); - res.add(new RegExp(r"^\PL")); - res.add(new RegExp(r"^\PM")); - res.add(new RegExp(r"^\PN")); - res.add(new RegExp(r"^\PP")); - res.add(new RegExp(r"^\PS")); - res.add(new RegExp(r"^\PZ")); - res.add(new RegExp(r"^\p{Cc}")); - res.add(new RegExp(r"^\p{Cf}")); - res.add(new RegExp(r"^\p{Cn}")); - res.add(new RegExp(r"^\p{Co}")); - res.add(new RegExp(r"^\p{Cs}")); - res.add(new RegExp(r"^\p{Ll}")); - res.add(new RegExp(r"^\p{Lm}")); - res.add(new RegExp(r"^\p{Lo}")); - res.add(new RegExp(r"^\p{Lt}")); - res.add(new RegExp(r"^\p{Lu}")); - res.add(new RegExp(r"^\p{Mc}")); - res.add(new RegExp(r"^\p{Me}")); - res.add(new RegExp(r"^\p{Mn}")); - res.add(new RegExp(r"^\p{Nl}")); - res.add(new RegExp(r"^\p{No}")); - res.add(new RegExp(r"^\p{Pc}")); - res.add(new RegExp(r"^\p{Pd}")); - res.add(new RegExp(r"^\p{Pe}")); - res.add(new RegExp(r"^\p{Pf}")); - res.add(new RegExp(r"^\p{Pi}")); - res.add(new RegExp(r"^\p{Po}")); - res.add(new RegExp(r"^\p{Ps}")); - res.add(new RegExp(r"^\p{Sk}")); - res.add(new RegExp(r"^\p{So}")); - res.add(new RegExp(r"^\p{Zl}")); - res.add(new RegExp(r"^\p{Zp}")); - res.add(new RegExp(r"^\p{Zs}")); - res.add(new RegExp(r"\p{Nd}{2,}(..)")); - res.add(new RegExp(r"\p{Nd}{2,}?(..)")); - res.add(new RegExp(r"\p{Nd}*(..)")); - res.add(new RegExp(r"\p{Nd}*?(..)")); - res.add(new RegExp(r"\p{Nd}{2}(..)")); - res.add(new RegExp(r"\p{Nd}{2,3}(..)")); - res.add(new RegExp(r"\p{Nd}{2,3}?(..)")); - res.add(new RegExp(r"\p{Nd}?(..)")); - res.add(new RegExp(r"\p{Nd}??(..)")); - res.add(new RegExp(r"\p{Lu}", caseSensitive: false)); - res.add(new RegExp(r"\p{^Lu}", caseSensitive: false)); - res.add(new RegExp(r"\P{Lu}", caseSensitive: false)); - res.add(new RegExp(r"[\p{Nd}]")); - res.add(new RegExp(r"[\P{Nd}]+")); - res.add(new RegExp(r"\D+")); - res.add(new RegExp(r"[\D]+")); - res.add(new RegExp(r"[\P{Nd}]+")); - res.add(new RegExp(r"[\D\P{Nd}]+")); - res.add(new RegExp(r"\pL")); - res.add(new RegExp(r"\pL", caseSensitive: false)); - res.add(new RegExp(r"\p{Lu}")); - res.add(new RegExp(r"\p{Lu}", caseSensitive: false)); - res.add(new RegExp(r"\p{Ll}")); - res.add(new RegExp(r"\p{Ll}", caseSensitive: false)); - res.add(new RegExp(r"^\X")); - res.add(new RegExp(r"^[\X]")); - res.add(new RegExp(r"^(\X*)C")); - res.add(new RegExp(r"^(\X*?)C")); - res.add(new RegExp(r"^(\X*)(.)")); - res.add(new RegExp(r"^(\X*?)(.)")); - res.add(new RegExp(r"^\X(.)")); - res.add(new RegExp(r"^\X{2,3}(.)")); - res.add(new RegExp(r"^\X{2,3}?(.)")); - res.add(new RegExp(r"^\pN{2,3}X")); - res.add(new RegExp(r"^[\p{Arabic}]")); - res.add(new RegExp(r"^[\P{Yi}]")); - res.add(new RegExp(r"^\p{Any}X")); - res.add(new RegExp(r"^\P{Any}X")); - res.add(new RegExp(r"^\p{Any}?X")); - res.add(new RegExp(r"^\P{Any}?X")); - res.add(new RegExp(r"^\p{Any}*X")); - res.add(new RegExp(r"^\P{Any}*X")); - res.add(new RegExp(r"^[\p{Any}]X")); - res.add(new RegExp(r"^[\P{Any}]X")); - res.add(new RegExp(r"^[\p{Any}]?X")); - res.add(new RegExp(r"^[\P{Any}]?X")); - res.add(new RegExp(r"^[\p{Any}]+X")); - res.add(new RegExp(r"^[\P{Any}]+X")); - res.add(new RegExp(r"^[\p{Any}]*X")); - res.add(new RegExp(r"^[\P{Any}]*X")); - res.add(new RegExp(r"^\p{Any}{3,5}?")); - res.add(new RegExp(r"^\p{Any}{3,5}")); - res.add(new RegExp(r"^\P{Any}{3,5}?")); - res.add(new RegExp(r"^\p{L&}X")); - res.add(new RegExp(r"^[\p{L&}]X")); - res.add(new RegExp(r"^[\p{L&}]+X")); - res.add(new RegExp(r"^[\p{L&}]+?X")); - res.add(new RegExp(r"^\P{L&}X")); - res.add(new RegExp(r"^[\P{L&}]X")); - res.add(new RegExp(r"Check property support in non-UTF-8 mode")); - res.add(new RegExp(r"\p{L}{4}")); - res.add(new RegExp( - r"\p{Carian}\p{Cham}\p{Kayah_Li}\p{Lepcha}\p{Lycian}\p{Lydian}\p{Ol_Chiki}\p{Rejang}\p{Saurashtra}\p{Sundanese}\p{Vai}")); - res.add(new RegExp(r" End ")); - res.add(new RegExp(r"^[[:alnum:]]", multiLine: true)); - res.add(new RegExp(r"a", multiLine: true, caseSensitive: false)); - res.add(new RegExp(r"abcde", multiLine: true)); - res.add(new RegExp(r"\x80", multiLine: true)); - res.add(new RegExp(r"\xff", multiLine: true)); - res.add(new RegExp(r"[\p{L}]", multiLine: true)); - res.add(new RegExp(r"[\p{^L}]", multiLine: true)); - res.add(new RegExp(r"[\P{L}]", multiLine: true)); - res.add(new RegExp(r"[\P{^L}]", multiLine: true)); - res.add(new RegExp(r"[\p{Nd}]", multiLine: true)); - res.add(new RegExp(r"[a]", multiLine: true)); - res.add(new RegExp(r"[a]", multiLine: true)); - res.add(new RegExp(r"[\xaa]", multiLine: true)); - res.add(new RegExp(r"[\xaa]", multiLine: true)); - res.add(new RegExp(r"[^a]", multiLine: true)); - res.add(new RegExp(r"[^a]", multiLine: true)); - res.add(new RegExp(r"[^\xaa]", multiLine: true)); - res.add(new RegExp(r"[^\xaa]", multiLine: true)); - res.add(new RegExp(r" End of testinput10 ")); - assertToStringEquals("abc", res[1].firstMatch("abc"), 0); - assertToStringEquals("abc", res[1].firstMatch("defabc"), 1); - assertToStringEquals("abc", res[1].firstMatch("Aabc"), 2); - assertNull(res[1].firstMatch("*** Failers"), 3); - assertToStringEquals("abc", res[1].firstMatch("Adefabc"), 4); - assertToStringEquals("ABC", res[1].firstMatch("ABC"), 5); - assertToStringEquals("abc", res[2].firstMatch("abc"), 6); - assertNull(res[2].firstMatch("Aabc"), 7); - assertNull(res[2].firstMatch("*** Failers"), 8); - assertNull(res[2].firstMatch("defabc"), 9); - assertNull(res[2].firstMatch("Adefabc"), 10); - assertToStringEquals("abc", res[7].firstMatch("abc"), 11); - assertNull(res[7].firstMatch("*** Failers"), 12); - assertNull(res[7].firstMatch("def\nabc"), 13); - assertThrows(() => new RegExp(r"x{5,4}")); - assertThrows(() => new RegExp(r"[abcd")); - assertThrows(() => new RegExp(r"[z-a]")); - assertThrows(() => new RegExp(r"^*")); - assertThrows(() => new RegExp(r"(abc")); - assertThrows(() => new RegExp(r"(?# abc")); - assertToStringEquals( - "cat", res[11].firstMatch("this sentence eventually mentions a cat"), 20); - assertToStringEquals( - "elephant", - res[11].firstMatch( - "this sentences rambles on and on for a while and then reaches elephant"), - 21); - assertToStringEquals( - "cat", res[12].firstMatch("this sentence eventually mentions a cat"), 22); - assertToStringEquals( - "elephant", - res[12].firstMatch( - "this sentences rambles on and on for a while and then reaches elephant"), - 23); - assertToStringEquals("CAT", - res[13].firstMatch("this sentence eventually mentions a CAT cat"), 24); - assertToStringEquals( - "elephant", - res[13].firstMatch( - "this sentences rambles on and on for a while to elephant ElePhant"), - 25); - assertThrows(() => new RegExp(r"{4,5}abc")); - assertToStringEquals("abcb,a,b,c", res[18].firstMatch("abcb"), 27); - assertToStringEquals("abcb,a,b,c", res[18].firstMatch("O0abcb"), 28); - assertToStringEquals("abcb,a,b,c", res[18].firstMatch("O3abcb"), 29); - assertToStringEquals("abcb,a,b,c", res[18].firstMatch("O6abcb"), 30); - assertToStringEquals("abcb,a,b,c", res[18].firstMatch("O9abcb"), 31); - assertToStringEquals("abcb,a,b,c", res[18].firstMatch("O12abcb"), 32); - assertToStringEquals("abc,a,,", res[19].firstMatch("abc"), 33); - assertToStringEquals("abc,a,,", res[19].firstMatch("O0abc"), 34); - assertToStringEquals("abc,a,,", res[19].firstMatch("O3abc"), 35); - assertToStringEquals("abc,a,,", res[19].firstMatch("O6abc"), 36); - assertToStringEquals("aba,,a,b", res[19].firstMatch("aba"), 37); - assertToStringEquals("aba,,a,b", res[19].firstMatch("O0aba"), 38); - assertToStringEquals("aba,,a,b", res[19].firstMatch("O3aba"), 39); - assertToStringEquals("aba,,a,b", res[19].firstMatch("O6aba"), 40); - assertToStringEquals("aba,,a,b", res[19].firstMatch("O9aba"), 41); - assertToStringEquals("aba,,a,b", res[19].firstMatch("O12aba"), 42); - assertToStringEquals("abc", res[20].firstMatch("abc"), 43); - assertNull(res[20].firstMatch("*** Failers"), 44); - assertNull(res[20].firstMatch("abc\n"), 45); - assertNull(res[20].firstMatch("abc\ndef"), 46); - assertToStringEquals( - "the quick brown fox", res[22].firstMatch("the quick brown fox"), 47); - assertToStringEquals("the quick brown fox", - res[22].firstMatch("this is a line with the quick brown fox"), 48); - assertToStringEquals("abc", res[23].firstMatch("abcdef"), 49); - assertToStringEquals("abc", res[23].firstMatch("abcdefB"), 50); - assertToStringEquals("defabc,abc,abc,", res[24].firstMatch("defabc"), 51); - assertToStringEquals("Zdefabc,abc,abc,", res[24].firstMatch("Zdefabc"), 52); - assertToStringEquals("abc", res[25].firstMatch("abc"), 53); - assertNull(res[25].firstMatch("*** Failers"), 54); - assertToStringEquals("abc", res[26].firstMatch("abcdef"), 55); - assertToStringEquals("abc", res[26].firstMatch("abcdefB"), 56); - assertToStringEquals("defabc,abc,abc,", res[27].firstMatch("defabc"), 57); - assertToStringEquals("Zdefabc,abc,abc,", res[27].firstMatch("Zdefabc"), 58); - assertToStringEquals( - "the quick brown fox", res[28].firstMatch("the quick brown fox"), 59); - assertNull(res[28].firstMatch("*** Failers"), 60); - assertToStringEquals( - "The Quick Brown Fox", res[28].firstMatch("The Quick Brown Fox"), 61); - assertToStringEquals( - "the quick brown fox", res[29].firstMatch("the quick brown fox"), 62); - assertToStringEquals( - "The Quick Brown Fox", res[29].firstMatch("The Quick Brown Fox"), 63); - assertNull(res[30].firstMatch("*** Failers"), 64); - assertNull(res[30].firstMatch("abc\ndef"), 65); - assertToStringEquals("abc", res[31].firstMatch("abc"), 66); - assertNull(res[31].firstMatch("abc\n"), 67); - assertToStringEquals("abc,abc", res[33].firstMatch("abc"), 68); - assertThrows(() => new RegExp(r")")); - assertToStringEquals("-pr", res[35].firstMatch("co-processors, and for"), 70); - assertToStringEquals( - "ghi", res[36].firstMatch("abcghinop"), 71); - assertToStringEquals("", res[37].firstMatch("abcghinop"), 72); - assertToStringEquals("", res[37].firstMatch("abcghinop"), 73); - assertNull(res[37].firstMatch("abc========def"), 74); - assertNull(res[37].firstMatch("foo"), 75); - assertNull(res[37].firstMatch("catfoo"), 76); - assertNull(res[37].firstMatch("*** Failers"), 77); - assertNull(res[37].firstMatch("the barfoo"), 78); - assertNull(res[37].firstMatch("and cattlefoo"), 79); - assertToStringEquals("a", res[40].firstMatch("a"), 80); - assertNull(res[40].firstMatch("a\n"), 81); - assertNull(res[40].firstMatch("*** Failers"), 82); - assertToStringEquals("a", res[40].firstMatch("Za"), 83); - assertNull(res[40].firstMatch("Za\n"), 84); - assertToStringEquals("a", res[41].firstMatch("a"), 85); - assertToStringEquals("a", res[41].firstMatch("a\n"), 86); - assertToStringEquals("a", res[41].firstMatch("Za\n"), 87); - assertNull(res[41].firstMatch("*** Failers"), 88); - assertToStringEquals("a", res[41].firstMatch("Za"), 89); - assertToStringEquals("b", res[44].firstMatch("foo\nbarbar"), 90); - assertToStringEquals("a", res[44].firstMatch("***Failers"), 91); - assertToStringEquals("b", res[44].firstMatch("rhubarb"), 92); - assertToStringEquals("b", res[44].firstMatch("barbell"), 93); - assertToStringEquals("a", res[44].firstMatch("abc\nbarton"), 94); - assertToStringEquals("b", res[44].firstMatch("foo\nbarbar"), 95); - assertToStringEquals("a", res[44].firstMatch("***Failers"), 96); - assertToStringEquals("b", res[44].firstMatch("rhubarb"), 97); - assertToStringEquals("b", res[44].firstMatch("barbell"), 98); - assertToStringEquals("a", res[44].firstMatch("abc\nbarton"), 99); - assertToStringEquals("a", res[44].firstMatch("abc"), 100); - assertToStringEquals("a", res[44].firstMatch("def\nabc"), 101); - assertToStringEquals("a", res[44].firstMatch("*** Failers"), 102); - assertToStringEquals("a", res[44].firstMatch("defabc"), 103); - assertNull(res[45].firstMatch("the bullock-cart"), 104); - assertNull(res[45].firstMatch("a donkey-cart race"), 105); - assertNull(res[45].firstMatch("*** Failers"), 106); - assertNull(res[45].firstMatch("cart"), 107); - assertNull(res[45].firstMatch("horse-and-cart"), 108); - assertNull(res[45].firstMatch("alphabetabcd"), 109); - assertNull(res[45].firstMatch("endingxyz"), 110); - assertNull(res[45].firstMatch("abxyZZ"), 111); - assertNull(res[45].firstMatch("abXyZZ"), 112); - assertNull(res[45].firstMatch("ZZZ"), 113); - assertNull(res[45].firstMatch("zZZ"), 114); - assertNull(res[45].firstMatch("bZZ"), 115); - assertNull(res[45].firstMatch("BZZ"), 116); - assertNull(res[45].firstMatch("*** Failers"), 117); - assertNull(res[45].firstMatch("ZZ"), 118); - assertNull(res[45].firstMatch("abXYZZ"), 119); - assertNull(res[45].firstMatch("zzz"), 120); - assertNull(res[45].firstMatch("bzz"), 121); - assertNull(res[45].firstMatch("bar"), 122); - assertNull(res[45].firstMatch("foobbar"), 123); - assertNull(res[45].firstMatch("*** Failers"), 124); - assertNull(res[45].firstMatch("fooabar"), 125); - assertNull(res[46].firstMatch("*** Failers"), 126); - assertNull(res[46].firstMatch("a"), 127); - assertNull(res[48].firstMatch("aaaaaa"), 128); - assertThrows(() => new RegExp(r"a[b-a]"), 129); - assertThrows(() => new RegExp(r"a["), 130); - assertThrows(() => new RegExp(r"*a"), 131); - assertThrows(() => new RegExp(r"abc)"), 132); - assertThrows(() => new RegExp(r"(abc"), 133); - assertThrows(() => new RegExp(r"a**"), 134); - assertThrows(() => new RegExp(r")("), 135); - assertThrows(() => new RegExp(r"a[b-a]"), 136); - assertThrows(() => new RegExp(r"a["), 137); - assertThrows(() => new RegExp(r"*a"), 138); - assertThrows(() => new RegExp(r"abc)"), 139); - assertThrows(() => new RegExp(r"(abc"), 140); - assertThrows(() => new RegExp(r"a**"), 141); - assertThrows(() => new RegExp(r")("), 142); - assertThrows(() => new RegExp(r":(?:"), 143); - assertThrows(() => new RegExp(r"a(?{)b"), 144); - assertThrows(() => new RegExp(r"a(?{{})b"), 145); - assertThrows(() => new RegExp(r"a(?{}})b"), 146); - assertThrows(() => new RegExp(r'a(?{\"{\"})b'), 147); - assertThrows(() => new RegExp(r'a(?{\"{\"}})b'), 148); - assertThrows(() => new RegExp(r"[a[:xyz:"), 149); - assertThrows(() => new RegExp(r"a{37,17}"), 150); - assertToStringEquals("abcd,a,d", res[58].firstMatch("abcd"), 151); - assertToStringEquals("abcd,a,d", res[58].firstMatch("abcdC2"), 152); - assertToStringEquals("abcd,a,d", res[58].firstMatch("abcdC5"), 153); - assertToStringEquals("abcdefghijklmnopqrst,abcdefghijklmnopqrst", - res[59].firstMatch("abcdefghijklmnopqrstuvwxyz"), 154); - assertToStringEquals("abcdefghijklmnopqrst,abcdefghijklmnopqrst", - res[59].firstMatch("abcdefghijklmnopqrstuvwxyzC1"), 155); - assertToStringEquals("abcdefghijklmnopqrst,abcdefghijklmnopqrst", - res[59].firstMatch("abcdefghijklmnopqrstuvwxyzG1"), 156); - assertToStringEquals("abcdefghijklmno,abcdefghijklmno", - res[60].firstMatch("abcdefghijklmnopqrstuvwxyz"), 157); - assertToStringEquals("abcdefghijklmno,abcdefghijklmno", - res[60].firstMatch("abcdefghijklmnopqrstuvwxyzC1G1"), 158); - assertToStringEquals("abcdefghijklmnop,abcdefghijklmnop", - res[61].firstMatch("abcdefghijklmnopqrstuvwxyz"), 159); - assertToStringEquals("abcdefghijklmnop,abcdefghijklmnop", - res[61].firstMatch("abcdefghijklmnopqrstuvwxyzC1G1L"), 160); - assertToStringEquals("adef,a,,f", res[62].firstMatch("adefG1G2G3G4L"), 161); - assertToStringEquals( - "bcdef,bc,bc,f", res[62].firstMatch("bcdefG1G2G3G4L"), 162); - assertToStringEquals("adef,a,,f", res[62].firstMatch("adefghijkC0"), 163); - assertToStringEquals("abc\x00def", res[63].firstMatch("abc\x00defLC0"), 164); - assertToStringEquals("iss", res[69].firstMatch("Mississippi"), 165); - assertToStringEquals("iss", res[70].firstMatch("Mississippi"), 166); - assertToStringEquals("iss", res[71].firstMatch("Mississippi"), 167); - assertToStringEquals("iss", res[72].firstMatch("Mississippi"), 168); - assertToStringEquals("iss", res[73].firstMatch("Mississippi"), 169); - assertNull(res[73].firstMatch("*** Failers"), 170); - assertToStringEquals("iss", res[73].firstMatch("MississippiA"), 171); - assertToStringEquals("iss", res[73].firstMatch("Mississippi"), 172); - assertToStringEquals("iss", res[74].firstMatch("ississippi"), 174); - assertToStringEquals("abciss", res[75].firstMatch("abciss\nxyzisspqr"), 175); - assertToStringEquals("Mis", res[76].firstMatch("Mississippi"), 176); - assertToStringEquals("Mis", res[77].firstMatch("Mississippi"), 180); - assertToStringEquals("ab\n", res[78].firstMatch("ab\nab\ncd"), 181); - assertToStringEquals("ab\n", res[79].firstMatch("ab\nab\ncd"), 182); - assertToStringEquals("a", res[115].firstMatch("a"), 183); - assertToStringEquals("b", res[115].firstMatch("b"), 184); - assertToStringEquals("ab", res[115].firstMatch("ab"), 185); - assertToStringEquals("", res[115].firstMatch("\\"), 186); - assertToStringEquals("", res[115].firstMatch("*** Failers"), 187); - assertToStringEquals("", res[115].firstMatch("N"), 188); - assertToStringEquals("", res[116].firstMatch("abcd"), 189); - assertToStringEquals("", res[116].firstMatch("-abc"), 190); - assertToStringEquals("", res[116].firstMatch("Nab-c"), 191); - assertToStringEquals("", res[116].firstMatch("*** Failers"), 192); - assertToStringEquals("", res[116].firstMatch("Nabc"), 193); - assertToStringEquals( - "aaaabbbbzz,bbbb,z,z", res[117].firstMatch("aaaabbbbzzzz"), 194); - assertToStringEquals( - "aaaabbbbzz,bbbb,z,z", res[117].firstMatch("aaaabbbbzzzzO0"), 195); - assertToStringEquals( - "aaaabbbbzz,bbbb,z,z", res[117].firstMatch("aaaabbbbzzzzO1"), 196); - assertToStringEquals( - "aaaabbbbzz,bbbb,z,z", res[117].firstMatch("aaaabbbbzzzzO2"), 197); - assertToStringEquals( - "aaaabbbbzz,bbbb,z,z", res[117].firstMatch("aaaabbbbzzzzO3"), 198); - assertToStringEquals( - "aaaabbbbzz,bbbb,z,z", res[117].firstMatch("aaaabbbbzzzzO4"), 199); - assertToStringEquals( - "aaaabbbbzz,bbbb,z,z", res[117].firstMatch("aaaabbbbzzzzO5"), 200); - assertToStringEquals("(abcd", res[118].firstMatch("(abcd)"), 201); - assertToStringEquals("(abcd", res[118].firstMatch("(abcd)xyz"), 202); - assertNull(res[118].firstMatch("xyz(abcd)"), 203); - assertNull(res[118].firstMatch("(ab(xy)cd)pqr"), 204); - assertNull(res[118].firstMatch("(ab(xycd)pqr"), 205); - assertNull(res[118].firstMatch("() abc ()"), 206); - assertNull(res[118].firstMatch("12(abcde(fsh)xyz(foo(bar))lmno)89"), 207); - assertNull(res[118].firstMatch("*** Failers"), 208); - assertToStringEquals("abcd", res[118].firstMatch("abcd"), 209); - assertToStringEquals("abcd", res[118].firstMatch("abcd)"), 210); - assertToStringEquals("(abcd", res[118].firstMatch("(abcd"), 211); - assertNull(res[118].firstMatch("(ab(xy)cd)pqr"), 212); - assertNull(res[118].firstMatch("1(abcd)(x(y)z)pqr"), 213); - assertToStringEquals("(abcd", res[118].firstMatch("(abcd)"), 214); - assertNull(res[118].firstMatch("(ab(xy)cd)"), 215); - assertNull(res[118].firstMatch("(a(b(c)d)e)"), 216); - assertNull(res[118].firstMatch("((ab))"), 217); - assertNull(res[118].firstMatch("*** Failers"), 218); - assertNull(res[118].firstMatch("()"), 219); - assertNull(res[118].firstMatch("()"), 220); - assertNull(res[118].firstMatch("12(abcde(fsh)xyz(foo(bar))lmno)89"), 221); - assertNull(res[118].firstMatch("(ab(xy)cd)"), 222); - assertNull(res[118].firstMatch("(ab(xy)cd)"), 223); - assertNull(res[118].firstMatch("(ab(xy)cd)"), 224); - assertNull(res[118].firstMatch("(123ab(xy)cd)"), 225); - assertNull(res[118].firstMatch("(ab(xy)cd)"), 226); - assertNull(res[118].firstMatch("(123ab(xy)cd)"), 227); - assertNull(res[118].firstMatch("(ab(xy)cd)"), 228); - assertToStringEquals( - "(abcd", res[118].firstMatch("(abcd(xyz

qrs)123)"), 229); - assertNull(res[118].firstMatch("(ab(cd)ef)"), 230); - assertNull(res[118].firstMatch("(ab(cd(ef)gh)ij)"), 231); - assertNull(res[146].firstMatch("A"), 232); - assertNull(res[146].firstMatch("a"), 233); - assertNull(res[147].firstMatch("A"), 234); - assertNull(res[147].firstMatch("a"), 235); - assertNull(res[147].firstMatch("ab"), 236); - assertNull(res[147].firstMatch("aB"), 237); - assertNull(res[147].firstMatch("*** Failers"), 238); - assertNull(res[147].firstMatch("Ab"), 239); - assertNull(res[147].firstMatch("AB"), 240); - assertThrows(() => new RegExp(r"[\200-\110]"), 241); - // TODO(jgruber): Reintegrate stack-overflow2_test.dart once it passes. - assertToStringEquals("mainmain,main,", res[151].firstMatch("mainmain"), 243); - assertToStringEquals( - "mainOmain,main,", res[151].firstMatch("mainOmain"), 244); - assertToStringEquals("aba,a,", res[153].firstMatch("aba"), 245); - assertToStringEquals("aabbaa,aa,", res[154].firstMatch("aabbaa"), 246); - assertToStringEquals("aabbaa,aa,", res[155].firstMatch("aabbaa"), 247); - assertToStringEquals("aabbaa,aa,", res[156].firstMatch("aabbaa"), 248); - assertToStringEquals("aabbaa,", res[157].firstMatch("aabbaa"), 249); - assertToStringEquals("aabbaa,aa,,", res[158].firstMatch("aabbaa"), 250); - assertToStringEquals("aabbaa,,", res[159].firstMatch("aabbaa"), 251); - assertToStringEquals("aabbaa,", res[160].firstMatch("aabbaa"), 252); - assertToStringEquals("aabbbaa,", res[161].firstMatch("aabbbaa"), 253); - assertToStringEquals("aabbbaa,", res[162].firstMatch("aabbbaa"), 254); - assertToStringEquals("aabbaa,", res[163].firstMatch("aabbaa"), 255); - assertToStringEquals("aabbbaa,", res[164].firstMatch("aabbbaa"), 256); - assertToStringEquals("aabbbaa,aa,,", res[165].firstMatch("aabbbaa"), 257); - assertToStringEquals("aabbbbaa,aa,,", res[166].firstMatch("aabbbbaa"), 258); - // Dart does not have RegExp literals and thus no translatation of the below. - // assertThrows("var re = //;", 259); - assertToStringEquals("a", res[169].firstMatch("ab"), 260); - assertToStringEquals("a", res[169].firstMatch("aB"), 261); - assertToStringEquals("*", res[169].firstMatch("*** Failers"), 262); - assertToStringEquals("A", res[169].firstMatch("AB"), 263); - assertToStringEquals("a", res[169].firstMatch("ab"), 264); - assertToStringEquals("a", res[169].firstMatch("aB"), 265); - assertToStringEquals("*", res[169].firstMatch("*** Failers"), 266); - assertToStringEquals("A", res[169].firstMatch("AB"), 267); - assertNull(res[172].firstMatch("\\"), 268); - assertNull(res[177].firstMatch("*** Failers"), 269); - assertNull(res[177].firstMatch("xxxxx"), 270); - assertNull( - res[177].firstMatch( - "now is the time for all good men to come to the aid of the party"), - 271); - assertNull(res[177].firstMatch("*** Failers"), 272); - assertNull( - res[177].firstMatch("this is not a line with only words and spaces!"), - 273); - assertNull(res[177].firstMatch("12345a"), 274); - assertNull(res[177].firstMatch("*** Failers"), 275); - assertNull(res[177].firstMatch("12345+"), 276); - assertNull(res[177].firstMatch("aaab"), 277); - assertNull(res[177].firstMatch("aaab"), 278); - assertNull(res[177].firstMatch("aaab"), 279); - assertNull(res[177].firstMatch("((abc(ade)ufh()()x"), 280); - assertNull(res[177].firstMatch("(abc)"), 281); - assertNull(res[177].firstMatch("(abc(def)xyz)"), 282); - assertNull(res[177].firstMatch("*** Failers"), 283); - assertNull( - res[177].firstMatch("((()aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - 284); - assertNull(res[177].firstMatch("xaaaab"), 285); - assertNull(res[177].firstMatch("xaaaab"), 286); - assertThrows(() => new RegExp(r"["), 287); - assertThrows(() => new RegExp(r"[a-"), 288); - assertNull(res[189].firstMatch("<>"), 289); - assertNull(res[189].firstMatch(""), 290); - assertNull(res[189].firstMatch(" hij>"), 291); - assertNull(res[189].firstMatch(" hij>"), 292); - assertNull(res[189].firstMatch("def>"), 293); - assertNull(res[189].firstMatch(""), 294); - assertNull(res[189].firstMatch("*** Failers"), 295); - assertNull(res[189].firstMatch(""), 355); - assertToStringEquals("abc", res[215].firstMatch(""), 356); - assertToStringEquals("abc", res[215].firstMatch(" hij>"), 357); - assertToStringEquals("abc", res[215].firstMatch(" hij>"), 358); - assertToStringEquals("abc", res[215].firstMatch("def>"), 359); - assertToStringEquals("abc", res[215].firstMatch(""), 360); - assertNull(res[215].firstMatch("*** Failers"), 361); - assertToStringEquals("abc", res[215].firstMatch("\n\n\nPartner der LCO\nde\nPartner der LINEAS Consulting\nGmbH\nLINEAS Consulting GmbH Hamburg\nPartnerfirmen\n30 days\nindex,follow\n\nja\n3\nPartner\n\n\nLCO\nLINEAS Consulting\n15.10.2003\n\n\n\n\nDie Partnerfirmen der LINEAS Consulting\nGmbH\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"), - 448); - assertToStringEquals( - "line\nbreak", res[251].firstMatch("this is a line\nbreak"), 449); - assertToStringEquals( - "line\nbreak", - res[251].firstMatch("line one\nthis is a line\nbreak in the second line"), - 450); - assertToStringEquals( - "line\nbreak", res[252].firstMatch("this is a line\nbreak"), 451); - assertNull(res[252].firstMatch("** Failers"), 452); - assertToStringEquals( - "line\nbreak", - res[252].firstMatch("line one\nthis is a line\nbreak in the second line"), - 453); - assertToStringEquals( - "line\nbreak", res[253].firstMatch("this is a line\nbreak"), 454); - assertNull(res[253].firstMatch("** Failers"), 455); - assertToStringEquals( - "line\nbreak", - res[253].firstMatch("line one\nthis is a line\nbreak in the second line"), - 456); - assertToStringEquals("ab-cd", res[254].firstMatch("ab-cd"), 457); - assertToStringEquals("ab=cd", res[254].firstMatch("ab=cd"), 458); - assertNull(res[254].firstMatch("** Failers"), 459); - assertNull(res[254].firstMatch("ab\ncd"), 460); - assertToStringEquals("ab-cd", res[255].firstMatch("ab-cd"), 461); - assertToStringEquals("ab=cd", res[255].firstMatch("ab=cd"), 462); - assertNull(res[255].firstMatch("ab\ncd"), 463); - assertNull(res[255].firstMatch("AbCd"), 464); - assertNull(res[255].firstMatch("** Failers"), 465); - assertNull(res[255].firstMatch("abcd"), 466); - // We are compatible with JSC, and don't throw an exception in this case. - // assertThrows("var re = /(){2,4294967295}/;", 467); - assertNull(res[255].firstMatch("abcdefghijklAkB"), 468); - assertNull(res[255].firstMatch("abcdefghijklAkB"), 469); - assertNull(res[255].firstMatch("abcdefghijklAkB"), 470); - assertNull( - res[255].firstMatch( - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - 471); - assertNull( - res[255].firstMatch( - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - 472); - assertNull(res[255].firstMatch("(this(and)that"), 473); - assertNull(res[255].firstMatch("(this(and)that)"), 474); - assertNull(res[255].firstMatch("(this(and)that)stuff"), 475); - assertNull(res[255].firstMatch("(this(and)that"), 476); - assertNull(res[255].firstMatch("(this(and)that)"), 477); - assertNull(res[255].firstMatch("(this(and)that"), 478); - assertNull(res[255].firstMatch("(this(and)that)"), 479); - assertNull(res[255].firstMatch("(this(and)that"), 480); - assertNull(res[255].firstMatch("(this(and)that)"), 481); - assertNull(res[255].firstMatch("((this))"), 482); - assertNull(res[255].firstMatch("(this(and)that"), 483); - assertNull(res[255].firstMatch("(this(and)that)"), 484); - assertNull(res[255].firstMatch("(this)"), 485); - assertNull(res[255].firstMatch("((this))"), 486); - assertToStringEquals("abc,b", res[256].firstMatch("abc"), 487); - assertToStringEquals("abc,b", res[256].firstMatch("abc"), 488); - assertNull(res[256].firstMatch("a1bCA"), 489); - assertNull(res[256].firstMatch("a2bCA"), 490); - assertNull(res[257].firstMatch("a bc dCACBCC"), 491); - assertNull(res[257].firstMatch("aabc"), 492); - assertNull(res[257].firstMatch("bc"), 493); - assertNull(res[257].firstMatch("** Failers"), 494); - assertNull(res[257].firstMatch("abc"), 495); - assertNull(res[257].firstMatch("bXaX"), 496); - assertNull(res[257].firstMatch("bbXaaX"), 497); - assertNull(res[257].firstMatch("(b)\\Xa\\X"), 498); - assertNull(res[257].firstMatch("bXXaYYaY"), 499); - assertNull(res[257].firstMatch("bXYaXXaX"), 500); - assertNull(res[257].firstMatch("bXXaYYaY"), 501); - assertToStringEquals("\x0b,\x0b", res[259].firstMatch("\x0b,\x0b"), 502); - assertToStringEquals("\x0c,\x0d", res[259].firstMatch("\x0c,\x0d"), 503); - assertToStringEquals("abc", res[260].firstMatch("xyz\nabc"), 504); - assertToStringEquals("abc", res[260].firstMatch("xyz\nabc"), 505); - assertToStringEquals("abc", res[260].firstMatch("xyz\x0d\nabc"), 506); - assertToStringEquals("abc", res[260].firstMatch("xyz\x0dabc"), 507); - assertToStringEquals("abc", res[260].firstMatch("xyz\x0d\nabc"), 508); - assertNull(res[260].firstMatch("** Failers"), 509); - assertToStringEquals("abc", res[260].firstMatch("xyz\nabc"), 510); - assertToStringEquals("abc", res[260].firstMatch("xyz\x0d\nabc"), 511); - assertToStringEquals("abc", res[260].firstMatch("xyz\nabc"), 512); - assertToStringEquals("abc", res[260].firstMatch("xyz\x0dabc"), 513); - assertToStringEquals("abc", res[260].firstMatch("xyz\x0dabc"), 514); - assertToStringEquals("abc", res[261].firstMatch("xyzabc"), 515); - assertToStringEquals("abc", res[261].firstMatch("xyzabc\n"), 516); - assertToStringEquals("abc", res[261].firstMatch("xyzabc\npqr"), 517); - assertToStringEquals("abc", res[261].firstMatch("xyzabc\x0d"), 518); - assertToStringEquals("abc", res[261].firstMatch("xyzabc\x0dpqr"), 519); - assertToStringEquals("abc", res[261].firstMatch("xyzabc\x0d\n"), 520); - assertToStringEquals( - "abc", res[261].firstMatch("xyzabc\x0d\npqr"), 521); - assertNull(res[261].firstMatch("** Failers"), 522); - assertToStringEquals("abc", res[261].firstMatch("xyzabc\x0d"), 523); - assertToStringEquals("abc", res[261].firstMatch("xyzabc\x0dpqr"), 524); - assertToStringEquals("abc", res[261].firstMatch("xyzabc\x0d\n"), 525); - assertToStringEquals("abc", res[261].firstMatch("xyzabc\x0d\npqr"), 526); - assertToStringEquals("abc", res[262].firstMatch("xyz\x0dabcdef"), 527); - assertToStringEquals("abc", res[262].firstMatch("xyz\nabcdef"), 528); - assertNull(res[262].firstMatch("** Failers"), 529); - assertToStringEquals("abc", res[262].firstMatch("xyz\nabcdef"), 530); - assertToStringEquals("abc", res[263].firstMatch("xyz\nabcdef"), 531); - assertToStringEquals("abc", res[263].firstMatch("xyz\x0dabcdef"), 532); - assertNull(res[263].firstMatch("** Failers"), 533); - assertToStringEquals("abc", res[263].firstMatch("xyz\x0dabcdef"), 534); - assertToStringEquals("abc", res[264].firstMatch("xyz\x0d\nabcdef"), 535); - assertToStringEquals("abc", res[264].firstMatch("xyz\x0dabcdef"), 536); - assertNull(res[264].firstMatch("** Failers"), 537); - assertToStringEquals("abc", res[264].firstMatch("xyz\x0dabcdef"), 538); - assertToStringEquals("abc", res[266].firstMatch("xyz\x0dabc"), 539); - assertToStringEquals("abc", res[266].firstMatch("abc"), 540); - assertToStringEquals("abc", res[267].firstMatch("abc\ndef"), 541); - assertToStringEquals("abc", res[267].firstMatch("abc\x0ddef"), 542); - assertToStringEquals("abc", res[267].firstMatch("abc\x0d\ndef"), 543); - assertToStringEquals("abc", res[267].firstMatch("abc\ndef"), 544); - assertToStringEquals("abc", res[267].firstMatch("abc\x0ddef"), 545); - assertToStringEquals("abc", res[267].firstMatch("abc\x0d\ndef"), 546); - assertToStringEquals("abc", res[267].firstMatch("abc\ndef"), 547); - assertToStringEquals( - "abc", res[267].firstMatch("abc\x0ddef"), 548); - assertToStringEquals( - "abc", res[267].firstMatch("abc\x0d\ndef"), 549); - assertNull(res[268].firstMatch("abc\ndef"), 550); - assertNull(res[268].firstMatch("abc\x0ddef"), 551); - assertNull(res[268].firstMatch("abc\x0d\ndef"), 552); - assertToStringEquals( - "XY,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,XY,Y", - res[269].firstMatch("XYO400"), - 553); - assertToStringEquals("aaaA5", res[278].firstMatch("aaaA5"), 554); - assertNull(res[278].firstMatch("** Failers"), 555); - assertNull(res[278].firstMatch("aaaa5"), 556); - assertToStringEquals("aaaA5", res[279].firstMatch("aaaA5"), 557); - assertToStringEquals("aaaa5", res[279].firstMatch("aaaa5"), 558); - assertToStringEquals("x", res[350].firstMatch("xyCabcCxyz"), 559); - assertToStringEquals("x", res[350].firstMatch("xyCabcCxyz"), 560); - assertToStringEquals("b", res[350].firstMatch("bXaX"), 561); - assertToStringEquals("b", res[350].firstMatch("bXbX"), 562); - assertToStringEquals("*", res[350].firstMatch("** Failers"), 563); - assertToStringEquals("aX", res[350].firstMatch("aXaX"), 564); - assertToStringEquals("aX", res[350].firstMatch("aXbX"), 565); - assertToStringEquals("x", res[350].firstMatch("xx"), 566); - assertToStringEquals("x", res[350].firstMatch("xy"), 567); - assertToStringEquals("y", res[350].firstMatch("yy"), 568); - assertToStringEquals("y", res[350].firstMatch("yx"), 569); - assertToStringEquals("x", res[350].firstMatch("xx"), 570); - assertToStringEquals("x", res[350].firstMatch("xy"), 571); - assertToStringEquals("y", res[350].firstMatch("yy"), 572); - assertToStringEquals("y", res[350].firstMatch("yx"), 573); - assertToStringEquals("b", res[350].firstMatch("bxay"), 574); - assertToStringEquals("b", res[350].firstMatch("bxby"), 575); - assertToStringEquals("*", res[350].firstMatch("** Failers"), 576); - assertToStringEquals("ax", res[350].firstMatch("axby"), 577); - assertToStringEquals("X", res[350].firstMatch("XxXxxx"), 578); - assertToStringEquals("X", res[350].firstMatch("XxXyyx"), 579); - assertToStringEquals("X", res[350].firstMatch("XxXyxx"), 580); - assertToStringEquals("*", res[350].firstMatch("** Failers"), 581); - assertToStringEquals("x", res[350].firstMatch("x"), 582); - assertToStringEquals("ab", res[350].firstMatch("abcabc"), 583); - assertToStringEquals("Xaaa,a", res[351].firstMatch("Xaaa"), 584); - assertToStringEquals("Xaba,a", res[351].firstMatch("Xaba"), 585); - assertThrows(() => new RegExp(r"^[a-\\Q\\E]"), 586); - assertNull(res[353].firstMatch("(xy)x"), 587); - assertNull(res[353].firstMatch("1221"), 588); - assertNull(res[353].firstMatch("Satan, oscillate my metallic sonatas!"), 589); - assertNull(res[353].firstMatch("A man, a plan, a canal: Panama!"), 590); - assertNull(res[353].firstMatch("Able was I ere I saw Elba."), 591); - assertNull(res[353].firstMatch("*** Failers"), 592); - assertNull(res[353].firstMatch("The quick brown fox"), 593); - assertToStringEquals("abcd:,abcd", res[354].firstMatch("abcd:"), 594); - assertToStringEquals("abcd:,abcd", res[354].firstMatch("abcd:"), 595); - assertToStringEquals("a:,a", res[354].firstMatch("a:aaxyz"), 596); - assertToStringEquals("ab:,ab", res[354].firstMatch("ab:ababxyz"), 597); - assertNull(res[354].firstMatch("** Failers"), 598); - assertToStringEquals("a:,a", res[354].firstMatch("a:axyz"), 599); - assertToStringEquals("ab:,ab", res[354].firstMatch("ab:abxyz"), 600); - assertNull(res[354].firstMatch("abd"), 601); - assertNull(res[354].firstMatch("ce"), 602); - assertNull(res[354].firstMatch("abcabc1Xabc2XabcXabcabc"), 603); - assertNull(res[354].firstMatch("abcabc1Xabc2XabcXabcabc"), 604); - assertNull(res[354].firstMatch("abcabc1Xabc2XabcXabcabc"), 605); - assertNull(res[354].firstMatch("abcd"), 606); - assertNull(res[354].firstMatch("metcalfe 33"), 607); - assertNull(res[356].firstMatch("a\x0db"), 608); - assertNull(res[356].firstMatch("a\nb"), 609); - assertToStringEquals("a\x85b", res[356].firstMatch("a\x85b "), 610); - assertNull(res[356].firstMatch("** Failers"), 611); - assertNull(res[356].firstMatch("a\nb"), 612); - assertNull(res[356].firstMatch("a\nb"), 613); - assertNull(res[356].firstMatch("a\x0db"), 614); - assertNull(res[356].firstMatch("a\x0db"), 615); - assertToStringEquals("a\x85b", res[356].firstMatch("a\x85b "), 616); - assertNull(res[356].firstMatch("a\x0db"), 617); - assertToStringEquals( - "abc1", - res[357].firstMatch( - "abc1 \nabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\nabc6 \x85abc7 JUNK"), - 618); - assertToStringEquals( - "abc1", - res[358].firstMatch( - "abc1\n abc2\x0b abc3\x0c abc4\x0d abc5\x0d\n abc6\x85 abc7 abc9"), - 619); - assertNull(res[361].firstMatch("a\nb"), 620); - assertNull(res[361].firstMatch("a\x0db"), 621); - assertNull(res[361].firstMatch("a\x0d\nb"), 622); - assertNull(res[361].firstMatch("a\x0bb"), 623); - assertNull(res[361].firstMatch("a\x0cb"), 624); - assertNull(res[361].firstMatch("a\x85b"), 625); - assertNull(res[361].firstMatch("** Failers"), 626); - assertNull(res[361].firstMatch("a\n\x0db"), 627); - assertToStringEquals("ab", res[362].firstMatch("ab"), 628); - assertNull(res[362].firstMatch("a\nb"), 629); - assertNull(res[362].firstMatch("a\x0db"), 630); - assertNull(res[362].firstMatch("a\x0d\nb"), 631); - assertNull(res[362].firstMatch("a\x0bb"), 632); - assertNull(res[362].firstMatch("a\x0cb"), 633); - assertNull(res[362].firstMatch("a\x85b"), 634); - assertNull(res[362].firstMatch("a\n\x0db"), 635); - assertNull(res[362].firstMatch("a\n\x0d\x85\x0cb"), 636); - assertNull(res[363].firstMatch("a\nb"), 637); - assertNull(res[363].firstMatch("a\x0db"), 638); - assertNull(res[363].firstMatch("a\x0d\nb"), 639); - assertNull(res[363].firstMatch("a\x0bb"), 640); - assertNull(res[363].firstMatch("a\x0cb"), 641); - assertNull(res[363].firstMatch("a\x85b"), 642); - assertNull(res[363].firstMatch("a\n\x0db"), 643); - assertNull(res[363].firstMatch("a\n\x0d\x85\x0cb"), 644); - assertNull(res[363].firstMatch("** Failers"), 645); - assertNull(res[363].firstMatch("ab"), 646); - assertNull(res[364].firstMatch("a\nb"), 647); - assertNull(res[364].firstMatch("a\n\x0db"), 648); - assertNull(res[364].firstMatch("a\n\x0d\x85b"), 649); - assertNull(res[364].firstMatch("a\x0d\n\x0d\nb"), 650); - assertNull(res[364].firstMatch("a\x0d\n\x0d\n\x0d\nb"), 651); - assertNull(res[364].firstMatch("a\n\x0d\n\x0db"), 652); - assertNull(res[364].firstMatch("a\n\n\x0d\nb"), 653); - assertNull(res[364].firstMatch("** Failers"), 654); - assertNull(res[364].firstMatch("a\n\n\n\x0db"), 655); - assertNull(res[364].firstMatch("a\x0d"), 656); - assertToStringEquals("aRb", res[365].firstMatch("aRb"), 657); - assertNull(res[365].firstMatch("** Failers"), 658); - assertNull(res[365].firstMatch("a\nb"), 659); - assertNull(res[365].firstMatch("abcPXP123"), 660); - assertNull(res[365].firstMatch("abcPXP123"), 661); - assertNull(res[365].firstMatch("1.2.3.4"), 662); - assertNull(res[365].firstMatch("131.111.10.206"), 663); - assertNull(res[365].firstMatch("10.0.0.0"), 664); - assertNull(res[365].firstMatch("** Failers"), 665); - assertNull(res[365].firstMatch("10.6"), 666); - assertNull(res[365].firstMatch("455.3.4.5"), 667); - assertNull(res[365].firstMatch("1.2.3.4"), 668); - assertNull(res[365].firstMatch("131.111.10.206"), 669); - assertNull(res[365].firstMatch("10.0.0.0"), 670); - assertNull(res[365].firstMatch("** Failers"), 671); - assertNull(res[365].firstMatch("10.6"), 672); - assertNull(res[365].firstMatch("455.3.4.5"), 673); - assertNull(res[365].firstMatch("123axbaxbaxbx456"), 674); - assertNull(res[365].firstMatch("123axbaxbaxb456"), 675); - assertNull(res[365].firstMatch("123axbaxbaxbx456"), 676); - assertNull(res[365].firstMatch("123axbaxbaxbx456"), 677); - assertNull(res[365].firstMatch("123axbaxbaxbx456"), 678); - assertNull(res[366].firstMatch("ababababbbabZXXXX"), 679); - assertNull(res[372].firstMatch("a\x0db"), 680); - assertNull(res[372].firstMatch("*** Failers"), 681); - assertNull(res[372].firstMatch("a\nb"), 682); - assertToStringEquals("afoo", res[373].firstMatch("afoo"), 683); - assertNull(res[373].firstMatch("** Failers"), 684); - assertNull(res[373].firstMatch("\x0d\nfoo"), 685); - assertNull(res[373].firstMatch("\nfoo"), 686); - assertToStringEquals("afoo", res[374].firstMatch("afoo"), 687); - assertNull(res[374].firstMatch("\nfoo"), 688); - assertNull(res[374].firstMatch("** Failers"), 689); - assertNull(res[374].firstMatch("\x0d\nfoo"), 690); - assertToStringEquals("afoo", res[375].firstMatch("afoo"), 691); - assertNull(res[375].firstMatch("** Failers"), 692); - assertNull(res[375].firstMatch("\nfoo"), 693); - assertNull(res[375].firstMatch("\x0d\nfoo"), 694); - assertToStringEquals("afoo", res[376].firstMatch("afoo"), 695); - assertNull(res[376].firstMatch("\x0d\nfoo"), 696); - assertNull(res[376].firstMatch("\nfoo"), 697); - assertToStringEquals("", res[377].firstMatch("abc\x0d\x0dxyz"), 698); - assertToStringEquals("", res[377].firstMatch("abc\n\x0dxyz "), 699); - assertNull(res[377].firstMatch("** Failers "), 700); - assertToStringEquals("", res[377].firstMatch("abc\x0d\nxyz"), 701); - assertToStringEquals("", res[377].firstMatch("abc\x0d\n\x0d\n"), 702); - assertToStringEquals("", res[377].firstMatch("abc\x0d\n\x0d\n"), 703); - assertToStringEquals("", res[377].firstMatch("abc\x0d\n\x0d\n"), 704); - assertToStringEquals( - "abc1", - res[378].firstMatch( - "abc1\n abc2\x0b abc3\x0c abc4\x0d abc5\x0d\n abc6\x85 abc9"), - 705); - assertToStringEquals("X", res[379].firstMatch("XABC"), 706); - assertNull(res[379].firstMatch("** Failers "), 707); - assertToStringEquals("X", res[379].firstMatch("XABCB"), 708); - assertThrows(() => new RegExp(r"(ab|c)(?-1)"), 709); - assertNull(res[379].firstMatch("abc"), 710); - assertNull(res[379].firstMatch("xyabcabc"), 711); - assertNull(res[379].firstMatch("** Failers"), 712); - assertNull(res[379].firstMatch("xyabc "), 713); - assertThrows(() => new RegExp(r"x(?-0)y"), 714); - assertThrows(() => new RegExp(r"x(?-1)y"), 715); - assertNull(res[379].firstMatch("abcX"), 716); - assertNull(res[379].firstMatch("Y"), 717); - assertNull(res[379].firstMatch("** Failers"), 718); - assertNull(res[379].firstMatch("abcY "), 719); - assertNull(res[379].firstMatch("YabcXabc"), 720); - assertNull(res[379].firstMatch("YabcXabcXabc"), 721); - assertNull(res[379].firstMatch("** Failers"), 722); - assertToStringEquals("X", res[379].firstMatch("XabcXabc "), 723); - assertNull(res[379].firstMatch("Y!"), 724); - assertNull(res[380].firstMatch("foobar"), 725); - assertNull(res[381].firstMatch("foobar"), 726); - assertToStringEquals("foobaz,foo,baz", res[381].firstMatch("foobaz "), 727); - assertNull(res[382].firstMatch("foobarbaz"), 728); - assertNull(res[382].firstMatch("tom-tom"), 729); - assertNull(res[382].firstMatch("bon-bon "), 730); - assertNull(res[382].firstMatch("** Failers"), 731); - assertNull(res[382].firstMatch("tom-bon "), 732); - assertNull(res[382].firstMatch("tom-tom"), 733); - assertNull(res[382].firstMatch("bon-bon "), 734); - assertThrows(() => new RegExp(r"(?|(abc)|(xyz))"), 735); - assertThrows(() => new RegExp(r"(x)(?|(abc)|(xyz))(x)"), 736); - assertNull(res[383].firstMatch("xabcx"), 737); - assertNull(res[383].firstMatch("xxyzx "), 738); - assertThrows(() => new RegExp(r"(x)(?|(abc)(pqr)|(xyz))(x)"), 739); - assertNull(res[383].firstMatch("xabcpqrx"), 740); - assertNull(res[383].firstMatch("xxyzx "), 741); - assertThrows(() => new RegExp(r"(?|(abc)|(xyz))\1"), 742); - assertNull(res[383].firstMatch("abcabc"), 743); - assertNull(res[383].firstMatch("xyzxyz "), 744); - assertNull(res[383].firstMatch("** Failers"), 745); - assertNull(res[383].firstMatch("abcxyz"), 746); - assertNull(res[383].firstMatch("xyzabc "), 747); - assertNull(res[383].firstMatch("abcabc"), 748); - assertNull(res[383].firstMatch("xyzabc "), 749); - assertNull(res[383].firstMatch("** Failers "), 750); - assertNull(res[383].firstMatch("xyzxyz "), 751); - assertNull(res[384].firstMatch("X X\n"), 752); - assertNull(res[384].firstMatch("X\x09X\x0b"), 753); - assertNull(res[384].firstMatch("** Failers"), 754); - assertNull(res[384].firstMatch("\xa0 X\n "), 755); - assertNull(res[385].firstMatch("\x09 \xa0X\n\x0b\x0c\x0d\n"), 756); - assertNull(res[385].firstMatch("\x09 \xa0\n\x0b\x0c\x0d\n"), 757); - assertNull(res[385].firstMatch("\x09 \xa0\n\x0b\x0c"), 758); - assertNull(res[385].firstMatch("** Failers "), 759); - assertNull(res[385].firstMatch("\x09 \xa0\n\x0b"), 760); - assertNull(res[385].firstMatch(" "), 761); - assertNull(res[386].firstMatch("XY ABCDE"), 762); - assertNull(res[386].firstMatch("XY PQR ST "), 763); - assertNull(res[387].firstMatch("XY AB PQRS"), 764); - assertNull(res[388].firstMatch(">XNNNYZ"), 765); - assertNull(res[388].firstMatch("> X NYQZ"), 766); - assertNull(res[388].firstMatch("** Failers"), 767); - assertNull(res[388].firstMatch(">XYZ "), 768); - assertNull(res[388].firstMatch("> X NY Z"), 769); - assertNull(res[389].firstMatch(">XY\nZ\nA\x0bNN\x0c"), 770); - assertNull(res[389].firstMatch(">\n\x0dX\nY\n\x0bZZZ\nAAA\x0bNNN\x0c"), 771); - assertNull(res[390].firstMatch(">\x09<"), 772); - assertNull(res[391].firstMatch(">\x09 \xa0<"), 773); - assertNull(res[396].firstMatch("** Failers"), 774); - assertNull(res[396].firstMatch("XXXX"), 775); - assertNull(res[397].firstMatch("XXXX Y "), 776); - assertNull(res[419].firstMatch("aaaaaa"), 777); - assertNull(res[419].firstMatch("aaabccc"), 778); - assertNull(res[419].firstMatch("aaabccc"), 779); - assertNull(res[419].firstMatch("aaabccc"), 780); - assertNull(res[419].firstMatch("aaabcccaaabccc"), 781); - assertNull(res[419].firstMatch("aaaxxxxxx"), 782); - assertNull(res[419].firstMatch("aaa++++++ "), 783); - assertNull(res[419].firstMatch("bbbxxxxx"), 784); - assertNull(res[419].firstMatch("bbb+++++ "), 785); - assertNull(res[419].firstMatch("cccxxxx"), 786); - assertNull(res[419].firstMatch("ccc++++ "), 787); - assertNull(res[419].firstMatch("dddddddd "), 788); - assertNull(res[419].firstMatch("aaaxxxxxx"), 789); - assertNull(res[419].firstMatch("aaa++++++ "), 790); - assertNull(res[419].firstMatch("bbbxxxxx"), 791); - assertNull(res[419].firstMatch("bbb+++++ "), 792); - assertNull(res[419].firstMatch("cccxxxx"), 793); - assertNull(res[419].firstMatch("ccc++++ "), 794); - assertNull(res[419].firstMatch("dddddddd "), 795); - assertNull(res[419].firstMatch("aaabccc"), 796); - assertNull(res[419].firstMatch("ABX"), 797); - assertNull(res[419].firstMatch("AADE"), 798); - assertNull(res[419].firstMatch("ACDE"), 799); - assertNull(res[419].firstMatch("** Failers"), 800); - assertNull(res[419].firstMatch("AD "), 801); - assertNull(res[419].firstMatch(" "), 802); - assertNull(res[419].firstMatch("aaaaaa"), 803); - assertNull(res[419].firstMatch("aaabccc"), 804); - assertNull(res[419].firstMatch("aaabccc"), 805); - assertNull(res[419].firstMatch("aaabccc"), 806); - assertNull(res[419].firstMatch("aaabcccaaabccc"), 807); - assertNull(res[419].firstMatch("aaabccc"), 808); - assertNull(res[422].firstMatch("\x0d\nA"), 809); - assertToStringEquals("\nA", res[423].firstMatch("\x0d\nA "), 810); - assertToStringEquals("\nA", res[424].firstMatch("\x0d\nA "), 811); - assertToStringEquals("\nA,\n", res[425].firstMatch("\x0d\nA "), 812); - assertNull(res[425].firstMatch("a\nb"), 813); - assertNull(res[425].firstMatch("** Failers"), 814); - assertNull(res[425].firstMatch("a\x0db "), 815); - assertNull(res[425].firstMatch("a\nb"), 816); - assertNull(res[425].firstMatch("** Failers"), 817); - assertNull(res[425].firstMatch("a\x0db "), 818); - assertNull(res[425].firstMatch("a\x0db"), 819); - assertNull(res[425].firstMatch("** Failers"), 820); - assertNull(res[425].firstMatch("a\nb "), 821); - assertNull(res[425].firstMatch("a\x0db"), 822); - assertNull(res[425].firstMatch("a\nb "), 823); - assertNull(res[425].firstMatch("** Failers"), 824); - assertNull(res[425].firstMatch("a\x0d\nb "), 825); - assertNull(res[425].firstMatch("** Failers"), 826); - assertNull(res[425].firstMatch("a\x0db"), 827); - assertNull(res[425].firstMatch("a\nb "), 828); - assertNull(res[425].firstMatch("a\x0d\nb "), 829); - assertNull(res[425].firstMatch("** Failers"), 830); - assertNull(res[425].firstMatch("a\x0db"), 831); - assertNull(res[425].firstMatch("a\nb "), 832); - assertNull(res[425].firstMatch("a\x0d\nb "), 833); - assertNull(res[425].firstMatch("a\x85b "), 834); - assertNull(res[426].firstMatch("a\x0db"), 835); - assertNull(res[426].firstMatch("a\nb"), 836); - assertNull(res[426].firstMatch("a\x0d\nb"), 837); - assertNull(res[426].firstMatch("** Failers"), 838); - assertNull(res[426].firstMatch("a\x85b"), 839); - assertNull(res[426].firstMatch("a\x0bb "), 840); - assertNull(res[427].firstMatch("a\x0db"), 841); - assertNull(res[427].firstMatch("a\nb"), 842); - assertNull(res[427].firstMatch("a\x0d\nb"), 843); - assertNull(res[427].firstMatch("a\x85b"), 844); - assertNull(res[427].firstMatch("a\x0bb "), 845); - assertNull(res[427].firstMatch("** Failers "), 846); - assertNull(res[427].firstMatch("a\x85b"), 847); - assertNull(res[427].firstMatch("a\x0bb"), 848); - assertNull(res[428].firstMatch("a\x0db"), 849); - assertNull(res[428].firstMatch("a\nb"), 850); - assertNull(res[428].firstMatch("a\x0d\nb"), 851); - assertNull(res[428].firstMatch("** Failers"), 852); - assertNull(res[428].firstMatch("a\x85b"), 853); - assertNull(res[428].firstMatch("a\x0bb "), 854); - assertNull(res[429].firstMatch("a\x0db"), 855); - assertNull(res[429].firstMatch("a\nb"), 856); - assertNull(res[429].firstMatch("a\x0d\nb"), 857); - assertNull(res[429].firstMatch("a\x85b"), 858); - assertNull(res[429].firstMatch("a\x0bb "), 859); - assertNull(res[429].firstMatch("** Failers "), 860); - assertNull(res[429].firstMatch("a\x85b"), 861); - assertNull(res[429].firstMatch("a\x0bb"), 862); - assertNull(res[430].firstMatch("a\x0d\n\nb"), 863); - assertNull(res[430].firstMatch("a\n\x0d\x0db"), 864); - assertNull(res[430].firstMatch("a\x0d\n\x0d\n\x0d\n\x0d\nb"), 865); - assertNull(res[430].firstMatch("** Failers"), 866); - assertNull(res[430].firstMatch("a\x8585b"), 867); - assertNull(res[430].firstMatch("a\x0b\x00bb "), 868); - assertNull(res[431].firstMatch("a\x0d\x0db"), 869); - assertNull(res[431].firstMatch("a\n\n\nb"), 870); - assertNull(res[431].firstMatch("a\x0d\n\n\x0d\x0db"), 871); - assertNull(res[431].firstMatch("a\x8585b"), 872); - assertNull(res[431].firstMatch("a\x0b\x00bb "), 873); - assertNull(res[431].firstMatch("** Failers "), 874); - assertNull(res[431].firstMatch("a\x0d\x0d\x0d\x0d\x0db "), 875); - assertNull(res[431].firstMatch("a\x8585b"), 876); - assertNull(res[431].firstMatch("a\x0b\x00bb"), 877); - assertNull(res[431].firstMatch("a\nb"), 878); - assertNull(res[431].firstMatch("a\x0db "), 879); - assertNull(res[431].firstMatch("a\x85b"), 880); - assertNull(res[431].firstMatch("a\nb"), 881); - assertNull(res[431].firstMatch("a\x0db "), 882); - assertNull(res[431].firstMatch("a\x85b"), 883); - assertThrows(() => new RegExp(r"(?-+a)"), 884); - assertNull(res[443].firstMatch("aaaa"), 885); - assertNull(res[443].firstMatch("bacxxx"), 886); - assertNull(res[443].firstMatch("bbaccxxx "), 887); - assertNull(res[443].firstMatch("bbbacccxx"), 888); - assertNull(res[443].firstMatch("aaaa"), 889); - assertNull(res[443].firstMatch("bacxxx"), 890); - assertNull(res[443].firstMatch("bbaccxxx "), 891); - assertNull(res[443].firstMatch("bbbacccxx"), 892); - assertToStringEquals("a,a", res[444].firstMatch("aaaa"), 893); - assertNull(res[444].firstMatch("bacxxx"), 894); - assertNull(res[444].firstMatch("bbaccxxx "), 895); - assertNull(res[444].firstMatch("bbbacccxx"), 896); - assertToStringEquals("a,a", res[445].firstMatch("aaaa"), 897); - assertNull(res[445].firstMatch("bacxxx"), 898); - assertNull(res[445].firstMatch("bbaccxxx "), 899); - assertNull(res[445].firstMatch("bbbacccxx"), 900); - assertToStringEquals("a,a", res[446].firstMatch("aaaa"), 901); - assertNull(res[446].firstMatch("bacxxx"), 902); - assertNull(res[446].firstMatch("bbaccxxx "), 903); - assertNull(res[446].firstMatch("bbbacccxx"), 904); - assertToStringEquals("a,a,a", res[447].firstMatch("aaaa"), 905); - assertNull(res[447].firstMatch("bacxxx"), 906); - assertNull(res[447].firstMatch("bbaccxxx "), 907); - assertNull(res[447].firstMatch("bbbacccxx"), 908); - assertNull(res[449].firstMatch("bacxxx"), 909); - assertNull(res[449].firstMatch("XaaX"), 910); - assertNull(res[449].firstMatch("XAAX "), 911); - assertNull(res[449].firstMatch("XaaX"), 912); - assertNull(res[449].firstMatch("** Failers "), 913); - assertNull(res[449].firstMatch("XAAX "), 914); - assertNull(res[449].firstMatch("XaaX"), 915); - assertNull(res[449].firstMatch("XAAX "), 916); - assertNull(res[449].firstMatch("xzxx"), 917); - assertNull(res[449].firstMatch("yzyy "), 918); - assertNull(res[449].firstMatch("** Failers"), 919); - assertNull(res[449].firstMatch("xxz "), 920); - assertToStringEquals("a,,,a", res[450].firstMatch("cat"), 921); - assertToStringEquals("a,,,a", res[451].firstMatch("cat"), 922); - assertToStringEquals("TA]", res[452].firstMatch("The ACTA] comes "), 923); - assertToStringEquals("TA]", res[453].firstMatch("The ACTA] comes "), 924); - assertNull(res[453].firstMatch("abcbabc"), 925); - assertNull(res[453].firstMatch("abcbabc"), 926); - assertNull(res[453].firstMatch("abcbabc"), 927); - assertNull(res[453].firstMatch("** Failers "), 928); - assertNull(res[453].firstMatch("abcXabc"), 929); - assertNull(res[453].firstMatch("abcXabc"), 930); - assertNull(res[453].firstMatch("** Failers "), 931); - assertNull(res[453].firstMatch("abcbabc"), 932); - assertNull(res[453].firstMatch("xyzbabcxyz"), 933); - assertNull(res[456].firstMatch("** Failers"), 934); - assertNull(res[456].firstMatch("ab"), 935); - assertNull(res[457].firstMatch("** Failers"), 936); - assertNull(res[457].firstMatch("ab "), 937); - assertNull(res[457].firstMatch("** Failers"), 938); - assertNull(res[457].firstMatch("ab "), 939); - assertToStringEquals("aXb", res[458].firstMatch("aXb"), 940); - assertToStringEquals("a\nb", res[458].firstMatch("a\nb "), 941); - assertNull(res[458].firstMatch("** Failers"), 942); - assertNull(res[458].firstMatch("ab "), 943); - assertToStringEquals("aXb", res[459].firstMatch("aXb"), 944); - assertToStringEquals("a\nX\nXb", res[459].firstMatch("a\nX\nXb "), 945); - assertNull(res[459].firstMatch("** Failers"), 946); - assertNull(res[459].firstMatch("ab "), 947); - assertToStringEquals("acb", res[463].firstMatch("acb"), 948); - assertToStringEquals("ab", res[463].firstMatch("ab"), 949); - assertNull(res[463].firstMatch("ax{100}b "), 950); - assertNull(res[463].firstMatch("*** Failers"), 951); - assertNull(res[463].firstMatch("a\nb "), 952); - assertNull(res[464].firstMatch("ax{4000}xyb "), 953); - assertNull(res[464].firstMatch("ax{4000}yb "), 954); - assertNull(res[464].firstMatch("ax{4000}x{100}yb "), 955); - assertNull(res[464].firstMatch("*** Failers"), 956); - assertNull(res[464].firstMatch("ax{4000}b "), 957); - assertNull(res[464].firstMatch("ac\ncb "), 958); - assertToStringEquals("a\xc0,,\xc0", res[465].firstMatch("a\xc0\x88b"), 959); - assertToStringEquals("ax,,x", res[466].firstMatch("ax{100}b"), 960); - assertToStringEquals( - "a\xc0\x88b,\xc0\x88,b", res[467].firstMatch("a\xc0\x88b"), 961); - assertToStringEquals( - "ax{100}b,x{100},b", res[468].firstMatch("ax{100}b"), 962); - assertToStringEquals( - "a\xc0\x92,\xc0,\x92", res[469].firstMatch("a\xc0\x92bcd"), 963); - assertToStringEquals("ax{,x,{", res[470].firstMatch("ax{240}bcd"), 964); - assertToStringEquals( - "a\xc0\x92,\xc0,\x92", res[471].firstMatch("a\xc0\x92bcd"), 965); - assertToStringEquals("ax{,x,{", res[472].firstMatch("ax{240}bcd"), 966); - assertToStringEquals("a\xc0,,\xc0", res[473].firstMatch("a\xc0\x92bcd"), 967); - assertToStringEquals("ax,,x", res[474].firstMatch("ax{240}bcd"), 968); - assertNull(res[475].firstMatch("ax{1234}xyb "), 969); - assertNull(res[475].firstMatch("ax{1234}x{4321}yb "), 970); - assertNull(res[475].firstMatch("ax{1234}x{4321}x{3412}b "), 971); - assertNull(res[475].firstMatch("*** Failers"), 972); - assertNull(res[475].firstMatch("ax{1234}b "), 973); - assertNull(res[475].firstMatch("ac\ncb "), 974); - assertToStringEquals( - "ax{1234}xyb,x{1234}xy", res[476].firstMatch("ax{1234}xyb "), 975); - assertToStringEquals("ax{1234}x{4321}yb,x{1234}x{4321}y", - res[476].firstMatch("ax{1234}x{4321}yb "), 976); - assertToStringEquals("ax{1234}x{4321}x{3412}b,x{1234}x{4321}x{3412}", - res[476].firstMatch("ax{1234}x{4321}x{3412}b "), 977); - assertToStringEquals("axxxxbcdefghijb,xxxxbcdefghij", - res[476].firstMatch("axxxxbcdefghijb "), 978); - assertToStringEquals( - "ax{1234}x{4321}x{3412}x{3421}b,x{1234}x{4321}x{3412}x{3421}", - res[476].firstMatch("ax{1234}x{4321}x{3412}x{3421}b "), - 979); - assertNull(res[476].firstMatch("*** Failers"), 980); - assertToStringEquals( - "ax{1234}b,x{1234}", res[476].firstMatch("ax{1234}b "), 981); - assertToStringEquals( - "ax{1234}xyb,x{1234}xy", res[477].firstMatch("ax{1234}xyb "), 982); - assertToStringEquals("ax{1234}x{4321}yb,x{1234}x{4321}y", - res[477].firstMatch("ax{1234}x{4321}yb "), 983); - assertToStringEquals("ax{1234}x{4321}x{3412}b,x{1234}x{4321}x{3412}", - res[477].firstMatch("ax{1234}x{4321}x{3412}b "), 984); - assertToStringEquals( - "axxxxb,xxxx", res[477].firstMatch("axxxxbcdefghijb "), 985); - assertToStringEquals( - "ax{1234}x{4321}x{3412}x{3421}b,x{1234}x{4321}x{3412}x{3421}", - res[477].firstMatch("ax{1234}x{4321}x{3412}x{3421}b "), - 986); - assertNull(res[477].firstMatch("*** Failers"), 987); - assertToStringEquals( - "ax{1234}b,x{1234}", res[477].firstMatch("ax{1234}b "), 988); - assertNull(res[478].firstMatch("ax{1234}xyb "), 989); - assertNull(res[478].firstMatch("ax{1234}x{4321}yb "), 990); - assertNull(res[478].firstMatch("ax{1234}x{4321}x{3412}b "), 991); - assertToStringEquals( - "axxxxb,xxxx", res[478].firstMatch("axxxxbcdefghijb "), 992); - assertNull(res[478].firstMatch("ax{1234}x{4321}x{3412}x{3421}b "), 993); - assertToStringEquals( - "axbxxb,xbxx", res[478].firstMatch("axbxxbcdefghijb "), 994); - assertToStringEquals( - "axxxxxb,xxxxx", res[478].firstMatch("axxxxxbcdefghijb "), 995); - assertNull(res[478].firstMatch("*** Failers"), 996); - assertNull(res[478].firstMatch("ax{1234}b "), 997); - assertNull(res[478].firstMatch("axxxxxxbcdefghijb "), 998); - assertNull(res[479].firstMatch("ax{1234}xyb "), 999); - assertNull(res[479].firstMatch("ax{1234}x{4321}yb "), 1000); - assertNull(res[479].firstMatch("ax{1234}x{4321}x{3412}b "), 1001); - assertToStringEquals( - "axxxxb,xxxx", res[479].firstMatch("axxxxbcdefghijb "), 1002); - assertNull(res[479].firstMatch("ax{1234}x{4321}x{3412}x{3421}b "), 1003); - assertToStringEquals( - "axbxxb,xbxx", res[479].firstMatch("axbxxbcdefghijb "), 1004); - assertToStringEquals( - "axxxxxb,xxxxx", res[479].firstMatch("axxxxxbcdefghijb "), 1005); - assertNull(res[479].firstMatch("*** Failers"), 1006); - assertNull(res[479].firstMatch("ax{1234}b "), 1007); - assertNull(res[479].firstMatch("axxxxxxbcdefghijb "), 1008); - assertNull(res[479].firstMatch("*** Failers"), 1009); - assertNull(res[479].firstMatch("x{100}"), 1010); - assertNull(res[479].firstMatch("aXbcd"), 1011); - assertNull(res[479].firstMatch("ax{100}bcd"), 1012); - assertNull(res[479].firstMatch("ax{100000}bcd"), 1013); - assertNull(res[479].firstMatch("x{100}x{100}x{100}b"), 1014); - assertNull(res[479].firstMatch("*** Failers "), 1015); - assertNull(res[479].firstMatch("x{100}x{100}b"), 1016); - assertNull(res[479].firstMatch("x{ab} "), 1017); - assertNull(res[479].firstMatch("\xc2\xab"), 1018); - assertNull(res[479].firstMatch("*** Failers "), 1019); - assertNull(res[479].firstMatch("\x00{ab}"), 1020); - assertNull(res[479].firstMatch("WXYZ"), 1021); - assertNull(res[479].firstMatch("x{256}XYZ "), 1022); - assertNull(res[479].firstMatch("*** Failers"), 1023); - assertNull(res[479].firstMatch("XYZ "), 1024); - assertNull(res[480].firstMatch("Xx{1234}"), 1025); - assertNull(res[481].firstMatch("Xx{1234}YZ"), 1026); - assertToStringEquals("X", res[482].firstMatch("XYZabcdce"), 1027); - assertToStringEquals("X", res[483].firstMatch("XYZabcde"), 1028); - assertNull(res[484].firstMatch("Xabcdefg "), 1029); - assertNull(res[484].firstMatch("Xx{1234} "), 1030); - assertNull(res[484].firstMatch("Xx{1234}YZ"), 1031); - assertNull(res[484].firstMatch("Xx{1234}x{512} "), 1032); - assertNull(res[484].firstMatch("Xx{1234}x{512}YZ"), 1033); - assertNull(res[485].firstMatch("Xabcdefg "), 1034); - assertNull(res[485].firstMatch("Xx{1234} "), 1035); - assertNull(res[485].firstMatch("Xx{1234}YZ"), 1036); - assertNull(res[485].firstMatch("Xx{1234}x{512} "), 1037); - assertToStringEquals("bcd", res[486].firstMatch("bcd"), 1038); - assertToStringEquals("x{", res[487].firstMatch("x{100}bc"), 1040); - assertToStringEquals("x{100}bcA", res[488].firstMatch("x{100}bcAa"), 1041); - assertToStringEquals("x{", res[489].firstMatch("x{100}bca"), 1042); - assertToStringEquals("bcd", res[490].firstMatch("bcd"), 1043); - assertToStringEquals("x{", res[491].firstMatch("x{100}bc"), 1045); - assertToStringEquals("x{100}bc", res[492].firstMatch("x{100}bcAa"), 1046); - assertToStringEquals("x{", res[493].firstMatch("x{100}bca"), 1047); - assertNull(res[493].firstMatch("abcd"), 1048); - assertNull(res[493].firstMatch("abcd"), 1049); - assertToStringEquals("x{", res[493].firstMatch("x{100}x{100} "), 1050); - assertToStringEquals("x{", res[493].firstMatch("x{100}x{100} "), 1051); - assertToStringEquals( - "x{", res[493].firstMatch("x{100}x{100}x{100}x{100} "), 1052); - assertNull(res[493].firstMatch("abce"), 1053); - assertToStringEquals( - "x{", res[493].firstMatch("x{100}x{100}x{100}x{100} "), 1054); - assertNull(res[493].firstMatch("abcdx{100}x{100}x{100}x{100} "), 1055); - assertNull(res[493].firstMatch("abcdx{100}x{100}x{100}x{100} "), 1056); - assertNull(res[493].firstMatch("abcdx{100}x{100}x{100}x{100} "), 1057); - assertNull(res[493].firstMatch("abcdx{100}x{100}x{100}XX"), 1058); - assertNull( - res[493].firstMatch("abcdx{100}x{100}x{100}x{100}x{100}x{100}x{100}XX"), - 1059); - assertNull( - res[493].firstMatch("abcdx{100}x{100}x{100}x{100}x{100}x{100}x{100}XX"), - 1060); - assertToStringEquals( - "Xy", res[493].firstMatch("Xyyyax{100}x{100}bXzzz"), 1061); - assertToStringEquals("X", res[496].firstMatch("1X2"), 1062); - assertToStringEquals("x", res[496].firstMatch("1x{100}2 "), 1063); - assertToStringEquals(">X", res[497].firstMatch("> >X Y"), 1064); - assertToStringEquals(">x", res[497].firstMatch("> >x{100} Y"), 1065); - assertToStringEquals("1", res[498].firstMatch("x{100}3"), 1066); - assertToStringEquals(" ", res[499].firstMatch("x{100} X"), 1067); - assertToStringEquals("abcd", res[500].firstMatch("12abcd34"), 1068); - assertToStringEquals("*** Failers", res[500].firstMatch("*** Failers"), 1069); - assertToStringEquals(" ", res[500].firstMatch("1234 "), 1070); - assertToStringEquals("abc", res[501].firstMatch("12abcd34"), 1071); - assertToStringEquals("ab", res[501].firstMatch("12ab34"), 1072); - assertToStringEquals("***", res[501].firstMatch("*** Failers "), 1073); - assertNull(res[501].firstMatch("1234"), 1074); - assertToStringEquals(" ", res[501].firstMatch("12a34 "), 1075); - assertToStringEquals("ab", res[502].firstMatch("12abcd34"), 1076); - assertToStringEquals("ab", res[502].firstMatch("12ab34"), 1077); - assertToStringEquals("**", res[502].firstMatch("*** Failers "), 1078); - assertNull(res[502].firstMatch("1234"), 1079); - assertToStringEquals(" ", res[502].firstMatch("12a34 "), 1080); - assertToStringEquals("12", res[503].firstMatch("12abcd34"), 1081); - assertNull(res[503].firstMatch("*** Failers"), 1082); - assertToStringEquals("12", res[504].firstMatch("12abcd34"), 1083); - assertToStringEquals("123", res[504].firstMatch("1234abcd"), 1084); - assertNull(res[504].firstMatch("*** Failers "), 1085); - assertNull(res[504].firstMatch("1.4 "), 1086); - assertToStringEquals("12", res[505].firstMatch("12abcd34"), 1087); - assertToStringEquals("12", res[505].firstMatch("1234abcd"), 1088); - assertNull(res[505].firstMatch("*** Failers "), 1089); - assertNull(res[505].firstMatch("1.4 "), 1090); - assertToStringEquals("12abcd34", res[506].firstMatch("12abcd34"), 1091); - assertToStringEquals("***", res[506].firstMatch("*** Failers"), 1092); - assertNull(res[506].firstMatch(" "), 1093); - assertToStringEquals("12a", res[507].firstMatch("12abcd34"), 1094); - assertToStringEquals("123", res[507].firstMatch("1234abcd"), 1095); - assertToStringEquals("***", res[507].firstMatch("*** Failers"), 1096); - assertNull(res[507].firstMatch(" "), 1097); - assertToStringEquals("12", res[508].firstMatch("12abcd34"), 1098); - assertToStringEquals("12", res[508].firstMatch("1234abcd"), 1099); - assertToStringEquals("**", res[508].firstMatch("*** Failers"), 1100); - assertNull(res[508].firstMatch(" "), 1101); - assertToStringEquals("> <", res[509].firstMatch("12> <34"), 1102); - assertNull(res[509].firstMatch("*** Failers"), 1103); - assertToStringEquals("> <", res[510].firstMatch("ab> <", res[510].firstMatch("ab> <", res[511].firstMatch("ab> <", res[511].firstMatch("ab> \xff<"), 1186); - assertNull(res[521].firstMatch(">x{ff}<"), 1187); - assertToStringEquals("X", res[522].firstMatch("XYZ"), 1188); - assertToStringEquals("X", res[523].firstMatch("XYZ"), 1189); - assertToStringEquals("x", res[523].firstMatch("x{123} "), 1190); - assertToStringEquals(",", res[528].firstMatch("catac"), 1191); - assertToStringEquals(",", res[528].firstMatch("ax{256}a "), 1192); - assertToStringEquals(",", res[528].firstMatch("x{85}"), 1193); - assertToStringEquals(",", res[528].firstMatch("\u1234 "), 1194); - assertToStringEquals(",", res[528].firstMatch("\u1234 "), 1195); - assertToStringEquals(",", res[528].firstMatch("abcdefg"), 1196); - assertToStringEquals(",", res[528].firstMatch("ab"), 1197); - assertToStringEquals(",", res[528].firstMatch("a "), 1198); - assertToStringEquals("Ax", res[529].firstMatch("Ax{a3}BC"), 1199); - assertToStringEquals("Ax", res[530].firstMatch("Ax{a3}BC"), 1200); - assertToStringEquals("}=", res[531].firstMatch("+x{a3}== "), 1201); - assertToStringEquals("}=", res[532].firstMatch("+x{a3}== "), 1202); - assertToStringEquals( - "x", res[533].firstMatch("x{442}x{435}x{441}x{442}"), 1203); - assertToStringEquals( - "x", res[534].firstMatch("x{442}x{435}x{441}x{442}"), 1204); - assertToStringEquals( - "x", res[535].firstMatch("x{442}x{435}x{441}x{442}"), 1205); - assertToStringEquals( - "x", res[536].firstMatch("x{442}x{435}x{441}x{442}"), 1206); - assertToStringEquals( - "{", res[537].firstMatch("x{2442}x{2435}x{2441}x{2442}"), 1207); - assertToStringEquals( - "{", res[538].firstMatch("x{2442}x{2435}x{2441}x{2442}"), 1208); - assertToStringEquals("abc\n\x0dx{442}x{435}x{441}x{442}xyz ", - res[539].firstMatch("abc\n\x0dx{442}x{435}x{441}x{442}xyz "), 1209); - assertToStringEquals("x{442}x{435}x{441}x{442}", - res[539].firstMatch("x{442}x{435}x{441}x{442}"), 1210); - assertToStringEquals( - "c d", res[540].firstMatch("abc defx{442}x{443}xyz\npqr"), 1211); - assertToStringEquals( - "c d", res[541].firstMatch("abc defx{442}x{443}xyz\npqr"), 1212); - assertNull(res[542].firstMatch("+x{2442}"), 1213); - assertNull(res[543].firstMatch("+x{2442}"), 1214); - assertNull(res[544].firstMatch("Ax{442}"), 1215); - assertNull(res[545].firstMatch("Ax{442}"), 1216); - assertNull(res[546].firstMatch("Ax{442}"), 1217); - assertNull(res[547].firstMatch("Ax{442}"), 1218); - assertNull(res[548].firstMatch("\x19x{e01ff}"), 1219); - assertNull(res[549].firstMatch("Ax{422}"), 1220); - assertNull(res[550].firstMatch("x{19}x{e01ff}"), 1221); - assertNull(res[551].firstMatch("Ax{442}"), 1222); - assertNull(res[552].firstMatch("Ax{442}"), 1223); - assertNull(res[553].firstMatch("ax{442}"), 1224); - assertNull(res[554].firstMatch("+x{2442}"), 1225); - assertNull(res[555].firstMatch("Mx{442}"), 1226); - assertToStringEquals("abc", res[556].firstMatch("abc"), 1227); - assertToStringEquals("abc", res[557].firstMatch("abc"), 1228); - assertToStringEquals("abc", res[558].firstMatch("abc"), 1229); - assertToStringEquals("abc", res[559].firstMatch("abc"), 1230); - assertNull(res[560].firstMatch("x{100}ax{1234}bcd"), 1231); - assertNull(res[562].firstMatch("x{0041}x{2262}x{0391}x{002e}"), 1232); - assertNull(res[562].firstMatch("x{D55c}x{ad6d}x{C5B4} "), 1233); - assertNull(res[562].firstMatch("x{65e5}x{672c}x{8a9e}"), 1234); - assertToStringEquals( - "{861}X", res[563].firstMatch("x{212ab}x{212ab}x{212ab}x{861}X"), 1235); - assertToStringEquals( - "x{2", res[564].firstMatch("x{212ab}x{212ab}x{212ab}x{861}"), 1236); - assertToStringEquals("x{c", res[564].firstMatch("x{c0}b"), 1237); - assertToStringEquals("ax{", res[564].firstMatch("ax{c0}aaaa/ "), 1238); - assertToStringEquals("ax{", res[564].firstMatch("ax{c0}aaaa/ "), 1239); - assertToStringEquals("ax{", res[564].firstMatch("ax{c0}ax{c0}aaa/ "), 1240); - assertToStringEquals("ax{", res[564].firstMatch("ax{c0}aaaa/ "), 1241); - assertToStringEquals("ax{", res[564].firstMatch("ax{c0}ax{c0}aaa/ "), 1242); - assertToStringEquals("ax{", res[564].firstMatch("ax{c0}aaaa/ "), 1243); - assertToStringEquals("ax{", res[564].firstMatch("ax{c0}ax{c0}aaa/ "), 1244); - assertToStringEquals( - "Sho", res[564].firstMatch("Should produce an error diagnostic"), 1245); - assertNull(res[565].firstMatch("Xx{1234}"), 1246); - assertNull(res[565].firstMatch("X\nabc "), 1247); - assertToStringEquals("b", res[566].firstMatch("bar"), 1248); - assertNull(res[566].firstMatch("*** Failers"), 1249); - assertNull(res[566].firstMatch("c"), 1250); - assertNull(res[566].firstMatch("x{ff}"), 1251); - assertNull(res[566].firstMatch("x{100} "), 1252); - assertToStringEquals("c", res[567].firstMatch("c"), 1253); - assertToStringEquals("x", res[567].firstMatch("x{ff}"), 1254); - assertToStringEquals("x", res[567].firstMatch("x{100} "), 1255); - assertToStringEquals("*", res[567].firstMatch("*** Failers "), 1256); - assertNull(res[567].firstMatch("aaa"), 1257); - assertToStringEquals("x", res[568].firstMatch("x{f1}"), 1258); - assertToStringEquals("x", res[568].firstMatch("x{bf}"), 1259); - assertToStringEquals("x", res[568].firstMatch("x{100}"), 1260); - assertToStringEquals("x", res[568].firstMatch("x{1000} "), 1261); - assertToStringEquals("*", res[568].firstMatch("*** Failers"), 1262); - assertToStringEquals("x", res[568].firstMatch("x{c0} "), 1263); - assertToStringEquals("x", res[568].firstMatch("x{f0} "), 1264); - assertToStringEquals("1", res[568].firstMatch("1234"), 1265); - assertToStringEquals("\"", res[568].firstMatch("\"1234\" "), 1266); - assertToStringEquals("x", res[568].firstMatch("x{100}1234"), 1267); - assertToStringEquals("\"", res[568].firstMatch("\"x{100}1234\" "), 1268); - assertToStringEquals("x", res[568].firstMatch("x{100}x{100}12ab "), 1269); - assertToStringEquals("x", res[568].firstMatch("x{100}x{100}\"12\" "), 1270); - assertToStringEquals("*", res[568].firstMatch("*** Failers "), 1271); - assertToStringEquals("x", res[568].firstMatch("x{100}x{100}abcd"), 1272); - assertToStringEquals("A", res[568].firstMatch("A"), 1273); - assertToStringEquals("x", res[568].firstMatch("x{100}"), 1274); - assertToStringEquals("Z", res[568].firstMatch("Zx{100}"), 1275); - assertToStringEquals("x", res[568].firstMatch("x{100}Z"), 1276); - assertToStringEquals("*", res[568].firstMatch("*** Failers "), 1277); - assertToStringEquals("Z", res[568].firstMatch("Zx{100}"), 1278); - assertToStringEquals("x", res[568].firstMatch("x{100}"), 1279); - assertToStringEquals("x", res[568].firstMatch("x{100}Z"), 1280); - assertToStringEquals("*", res[568].firstMatch("*** Failers "), 1281); - assertToStringEquals("x", res[568].firstMatch("x{100}"), 1282); - assertToStringEquals("x", res[568].firstMatch("x{104}"), 1283); - assertToStringEquals("*", res[568].firstMatch("*** Failers"), 1284); - assertToStringEquals("x", res[568].firstMatch("x{105}"), 1285); - assertToStringEquals("x", res[568].firstMatch("x{ff} "), 1286); - assertToStringEquals("x", res[568].firstMatch("x{100}"), 1287); - assertToStringEquals("\u0100", res[568].firstMatch("\u0100 "), 1288); - assertToStringEquals("\xff", res[569].firstMatch(">\xff<"), 1289); - assertNull(res[570].firstMatch(">x{ff}<"), 1290); - assertToStringEquals( - "\xd6", res[572].firstMatch("\xd6 # Matches without Study"), 1291); - assertToStringEquals("x", res[572].firstMatch("x{d6}"), 1292); - assertToStringEquals( - "\xd6", res[572].firstMatch("\xd6 <-- Same with Study"), 1293); - assertToStringEquals("x", res[572].firstMatch("x{d6}"), 1294); - assertToStringEquals( - "\xd6", res[572].firstMatch("\xd6 # Matches without Study"), 1295); - assertToStringEquals("x", res[572].firstMatch("x{d6} "), 1296); - assertToStringEquals( - "\xd6", res[572].firstMatch("\xd6 <-- Same with Study"), 1297); - assertToStringEquals("x", res[572].firstMatch("x{d6} "), 1298); - assertToStringEquals("\ufffd", res[572].firstMatch("\ufffd]"), 1299); - assertToStringEquals("\ufffd", res[572].firstMatch("\ufffd"), 1300); - assertToStringEquals( - "\ufffd", res[572].firstMatch("\ufffd\ufffd\ufffd"), 1301); - assertToStringEquals( - "\ufffd", res[572].firstMatch("\ufffd\ufffd\ufffd?"), 1302); - assertNull(res[573].firstMatch("\xc0\x80"), 1303); - assertNull(res[573].firstMatch("\xc1\x8f "), 1304); - assertNull(res[573].firstMatch("\xe0\x9f\x80"), 1305); - assertNull(res[573].firstMatch("\xf0\x8f\x80\x80 "), 1306); - assertNull(res[573].firstMatch("\xf8\x87\x80\x80\x80 "), 1307); - assertNull(res[573].firstMatch("\xfc\x83\x80\x80\x80\x80"), 1308); - assertNull(res[573].firstMatch("\xfe\x80\x80\x80\x80\x80 "), 1309); - assertNull(res[573].firstMatch("\xff\x80\x80\x80\x80\x80 "), 1310); - assertNull(res[573].firstMatch("\xc3\x8f"), 1311); - assertNull(res[573].firstMatch("\xe0\xaf\x80"), 1312); - assertNull(res[573].firstMatch("\xe1\x80\x80"), 1313); - assertNull(res[573].firstMatch("\xf0\x9f\x80\x80 "), 1314); - assertNull(res[573].firstMatch("\xf1\x8f\x80\x80 "), 1315); - assertNull(res[573].firstMatch("\xf8\x88\x80\x80\x80 "), 1316); - assertNull(res[573].firstMatch("\xf9\x87\x80\x80\x80 "), 1317); - assertNull(res[573].firstMatch("\xfc\x84\x80\x80\x80\x80"), 1318); - assertNull(res[573].firstMatch("\xfd\x83\x80\x80\x80\x80"), 1319); - assertNull(res[573].firstMatch("?\xf8\x88\x80\x80\x80 "), 1320); - assertNull(res[573].firstMatch("?\xf9\x87\x80\x80\x80 "), 1321); - assertNull(res[573].firstMatch("?\xfc\x84\x80\x80\x80\x80"), 1322); - assertNull(res[573].firstMatch("?\xfd\x83\x80\x80\x80\x80"), 1323); - assertToStringEquals(".", res[574].firstMatch("A.B"), 1324); - assertToStringEquals("{", res[574].firstMatch("Ax{100}B "), 1325); - assertToStringEquals("x", res[575].firstMatch("x{100}X "), 1326); - assertToStringEquals("a", res[575].firstMatch("ax{1234}b"), 1327); - assertNull(res[577].firstMatch("AxxB "), 1328); - assertToStringEquals( - "abc1", - res[578].firstMatch( - "abc1 \nabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\nabc6 x{0085}abc7 x{2028}abc8 x{2029}abc9 JUNK"), - 1329); - assertToStringEquals( - "abc1", - res[579].firstMatch( - "abc1\n abc2\x0b abc3\x0c abc4\x0d abc5\x0d\n abc6x{0085} abc7x{2028} abc8x{2029} abc9"), - 1330); - assertNull(res[580].firstMatch("a\nb"), 1331); - assertNull(res[580].firstMatch("a\x0db"), 1332); - assertNull(res[580].firstMatch("a\x0d\nb"), 1333); - assertNull(res[580].firstMatch("a\x0bb"), 1334); - assertNull(res[580].firstMatch("a\x0cb"), 1335); - assertNull(res[580].firstMatch("ax{85}b "), 1336); - assertNull(res[580].firstMatch("ax{2028}b "), 1337); - assertNull(res[580].firstMatch("ax{2029}b "), 1338); - assertNull(res[580].firstMatch("** Failers"), 1339); - assertNull(res[580].firstMatch("a\n\x0db "), 1340); - assertToStringEquals("ab", res[581].firstMatch("ab"), 1341); - assertNull(res[581].firstMatch("a\nb"), 1342); - assertNull(res[581].firstMatch("a\x0db"), 1343); - assertNull(res[581].firstMatch("a\x0d\nb"), 1344); - assertNull(res[581].firstMatch("a\x0bb"), 1345); - assertNull(res[581].firstMatch("a\x0cx{2028}x{2029}b"), 1346); - assertNull(res[581].firstMatch("ax{85}b "), 1347); - assertNull(res[581].firstMatch("a\n\x0db "), 1348); - assertNull(res[581].firstMatch("a\n\x0dx{85}\x0cb "), 1349); - assertNull(res[582].firstMatch("a\nb"), 1350); - assertNull(res[582].firstMatch("a\x0db"), 1351); - assertNull(res[582].firstMatch("a\x0d\nb"), 1352); - assertNull(res[582].firstMatch("a\x0bb"), 1353); - assertNull(res[582].firstMatch("a\x0cx{2028}x{2029}b"), 1354); - assertNull(res[582].firstMatch("ax{85}b "), 1355); - assertNull(res[582].firstMatch("a\n\x0db "), 1356); - assertNull(res[582].firstMatch("a\n\x0dx{85}\x0cb "), 1357); - assertNull(res[582].firstMatch("** Failers"), 1358); - assertNull(res[582].firstMatch("ab "), 1359); - assertNull(res[583].firstMatch("a\nb"), 1360); - assertNull(res[583].firstMatch("a\n\x0db"), 1361); - assertNull(res[583].firstMatch("a\n\x0dx{85}b"), 1362); - assertNull(res[583].firstMatch("a\x0d\n\x0d\nb "), 1363); - assertNull(res[583].firstMatch("a\x0d\n\x0d\n\x0d\nb "), 1364); - assertNull(res[583].firstMatch("a\n\x0d\n\x0db"), 1365); - assertNull(res[583].firstMatch("a\n\n\x0d\nb "), 1366); - assertNull(res[583].firstMatch("** Failers"), 1367); - assertNull(res[583].firstMatch("a\n\n\n\x0db"), 1368); - assertNull(res[583].firstMatch("a\x0d"), 1369); - assertNull(res[584].firstMatch("X X\n"), 1370); - assertNull(res[584].firstMatch("X\x09X\x0b"), 1371); - assertNull(res[584].firstMatch("** Failers"), 1372); - assertNull(res[584].firstMatch("x{a0} X\n "), 1373); - assertNull(res[585].firstMatch("\x09 x{a0}X\n\x0b\x0c\x0d\n"), 1374); - assertNull(res[585].firstMatch("\x09 x{a0}\n\x0b\x0c\x0d\n"), 1375); - assertNull(res[585].firstMatch("\x09 x{a0}\n\x0b\x0c"), 1376); - assertNull(res[585].firstMatch("** Failers "), 1377); - assertNull(res[585].firstMatch("\x09 x{a0}\n\x0b"), 1378); - assertNull(res[585].firstMatch(" "), 1379); - assertNull(res[586].firstMatch("x{3001}x{3000}x{2030}x{2028}"), 1380); - assertNull(res[586].firstMatch("Xx{180e}Xx{85}"), 1381); - assertNull(res[586].firstMatch("** Failers"), 1382); - assertNull(res[586].firstMatch("x{2009} X\n "), 1383); - assertNull( - res[587].firstMatch("x{1680}x{180e}x{2007}Xx{2028}x{2029}\x0c\x0d\n"), - 1384); - assertNull( - res[587].firstMatch("\x09x{205f}x{a0}\nx{2029}\x0cx{2028}\n"), 1385); - assertNull(res[587].firstMatch("\x09 x{202f}\n\x0b\x0c"), 1386); - assertNull(res[587].firstMatch("** Failers "), 1387); - assertNull(res[587].firstMatch("\x09x{200a}x{a0}x{2028}\x0b"), 1388); - assertNull(res[587].firstMatch(" "), 1389); - assertNull(res[588].firstMatch(">x{1680}"), 1390); - assertNull( - res[589].firstMatch( - ">x{1680}x{180e}x{2000}x{2003}x{200a}x{202f}x{205f}x{3000}<"), - 1391); - assertToStringEquals("x{1ec5} ", res[593].firstMatch("x{1ec5} "), 1392); - assertNull(res[594].firstMatch("x{0}x{d7ff}x{e000}x{10ffff}"), 1393); - assertNull(res[594].firstMatch("x{d800}"), 1394); - assertNull(res[594].firstMatch("x{d800}?"), 1395); - assertNull(res[594].firstMatch("x{da00}"), 1396); - assertNull(res[594].firstMatch("x{da00}?"), 1397); - assertNull(res[594].firstMatch("x{dfff}"), 1398); - assertNull(res[594].firstMatch("x{dfff}?"), 1399); - assertNull(res[594].firstMatch("x{110000} "), 1400); - assertNull(res[594].firstMatch("x{110000}? "), 1401); - assertNull(res[594].firstMatch("x{2000000} "), 1402); - assertNull(res[594].firstMatch("x{2000000}? "), 1403); - assertNull(res[594].firstMatch("x{7fffffff} "), 1404); - assertNull(res[594].firstMatch("x{7fffffff}? "), 1405); - assertNull(res[595].firstMatch("a\x0db"), 1406); - assertNull(res[595].firstMatch("a\nb"), 1407); - assertNull(res[595].firstMatch("a\x0d\nb"), 1408); - assertNull(res[595].firstMatch("** Failers"), 1409); - assertNull(res[595].firstMatch("ax{85}b"), 1410); - assertNull(res[595].firstMatch("a\x0bb "), 1411); - assertNull(res[596].firstMatch("a\x0db"), 1412); - assertNull(res[596].firstMatch("a\nb"), 1413); - assertNull(res[596].firstMatch("a\x0d\nb"), 1414); - assertNull(res[596].firstMatch("ax{85}b"), 1415); - assertNull(res[596].firstMatch("a\x0bb "), 1416); - assertNull(res[596].firstMatch("** Failers "), 1417); - assertNull(res[596].firstMatch("ax{85}b"), 1418); - assertNull(res[596].firstMatch("a\x0bb"), 1419); - assertNull(res[597].firstMatch("a\x0db"), 1420); - assertNull(res[597].firstMatch("a\nb"), 1421); - assertNull(res[597].firstMatch("a\x0d\nb"), 1422); - assertNull(res[597].firstMatch("** Failers"), 1423); - assertNull(res[597].firstMatch("ax{85}b"), 1424); - assertNull(res[597].firstMatch("a\x0bb "), 1425); - assertNull(res[598].firstMatch("a\x0db"), 1426); - assertNull(res[598].firstMatch("a\nb"), 1427); - assertNull(res[598].firstMatch("a\x0d\nb"), 1428); - assertNull(res[598].firstMatch("ax{85}b"), 1429); - assertNull(res[598].firstMatch("a\x0bb "), 1430); - assertNull(res[598].firstMatch("** Failers "), 1431); - assertNull(res[598].firstMatch("ax{85}b"), 1432); - assertNull(res[598].firstMatch("a\x0bb"), 1433); - assertToStringEquals("QQQx{2029}ABCaXYZ=!bPQR", - res[599].firstMatch("QQQx{2029}ABCaXYZ=!bPQR"), 1434); - assertNull(res[599].firstMatch("** Failers"), 1435); - assertNull(res[599].firstMatch("ax{2029}b"), 1436); - assertNull(res[599].firstMatch("a\xe2\x80\xa9b "), 1437); - assertNull(res[600].firstMatch("ax{1234}b"), 1438); - assertToStringEquals("a\nb", res[600].firstMatch("a\nb "), 1439); - assertNull(res[600].firstMatch("** Failers"), 1440); - assertNull(res[600].firstMatch("ab "), 1441); - assertToStringEquals("aXb", res[601].firstMatch("aXb"), 1442); - assertToStringEquals( - "a\nX\nXx{1234}b", res[601].firstMatch("a\nX\nXx{1234}b "), 1443); - assertNull(res[601].firstMatch("** Failers"), 1444); - assertNull(res[601].firstMatch("ab "), 1445); - assertNull(res[601].firstMatch("x{de}x{de}"), 1446); - assertNull(res[601].firstMatch("x{123} "), 1447); - assertToStringEquals("X", res[602].firstMatch("Ax{1ec5}ABCXYZ"), 1448); - assertNull( - res[604].firstMatch("x{c0}x{30f}x{660}x{66c}x{f01}x{1680}<"), 1449); - assertNull(res[604].firstMatch("\npx{300}9!\$ < "), 1450); - assertNull(res[604].firstMatch("** Failers "), 1451); - assertNull(res[604].firstMatch("apx{300}9!\$ < "), 1452); - assertNull(res[605].firstMatch("X"), 1453); - assertNull(res[605].firstMatch("** Failers "), 1454); - assertNull(res[605].firstMatch(""), 1455); - assertNull(res[606].firstMatch("9"), 1456); - assertNull(res[606].firstMatch("** Failers "), 1457); - assertNull(res[606].firstMatch("x{c0}"), 1458); - assertNull(res[607].firstMatch("X"), 1459); - assertNull(res[607].firstMatch("** Failers "), 1460); - assertNull(res[607].firstMatch("x{30f}"), 1461); - assertNull(res[608].firstMatch("X"), 1462); - assertNull(res[608].firstMatch("** Failers "), 1463); - assertNull(res[608].firstMatch("x{660}"), 1464); - assertNull(res[609].firstMatch("X"), 1465); - assertNull(res[609].firstMatch("** Failers "), 1466); - assertNull(res[609].firstMatch("x{66c}"), 1467); - assertNull(res[610].firstMatch("X"), 1468); - assertNull(res[610].firstMatch("** Failers "), 1469); - assertNull(res[610].firstMatch("x{f01}"), 1470); - assertNull(res[611].firstMatch("X"), 1471); - assertNull(res[611].firstMatch("** Failers "), 1472); - assertNull(res[611].firstMatch("x{1680}"), 1473); - assertNull(res[612].firstMatch("x{017}"), 1474); - assertNull(res[612].firstMatch("x{09f} "), 1475); - assertNull(res[612].firstMatch("** Failers"), 1476); - assertNull(res[612].firstMatch("x{0600} "), 1477); - assertNull(res[613].firstMatch("x{601}"), 1478); - assertNull(res[613].firstMatch("** Failers"), 1479); - assertNull(res[613].firstMatch("x{09f} "), 1480); - assertNull(res[614].firstMatch("x{e0000}"), 1481); - assertNull(res[614].firstMatch("** Failers"), 1482); - assertNull(res[614].firstMatch("x{09f} "), 1483); - assertNull(res[615].firstMatch("x{f8ff}"), 1484); - assertNull(res[615].firstMatch("** Failers"), 1485); - assertNull(res[615].firstMatch("x{09f} "), 1486); - assertNull(res[616].firstMatch("?x{dfff}"), 1487); - assertNull(res[616].firstMatch("** Failers"), 1488); - assertNull(res[616].firstMatch("x{09f} "), 1489); - assertNull(res[617].firstMatch("a"), 1490); - assertNull(res[617].firstMatch("** Failers "), 1491); - assertNull(res[617].firstMatch("Z"), 1492); - assertNull(res[617].firstMatch("x{e000} "), 1493); - assertNull(res[618].firstMatch("x{2b0}"), 1494); - assertNull(res[618].firstMatch("** Failers"), 1495); - assertNull(res[618].firstMatch("a "), 1496); - assertNull(res[619].firstMatch("x{1bb}"), 1497); - assertNull(res[619].firstMatch("x{3400}"), 1498); - assertNull(res[619].firstMatch("x{3401}"), 1499); - assertNull(res[619].firstMatch("x{4d00}"), 1500); - assertNull(res[619].firstMatch("x{4db4}"), 1501); - assertNull(res[619].firstMatch("x{4db5} "), 1502); - assertNull(res[619].firstMatch("** Failers"), 1503); - assertNull(res[619].firstMatch("a "), 1504); - assertNull(res[619].firstMatch("x{2b0}"), 1505); - assertNull(res[619].firstMatch("x{4db6} "), 1506); - assertNull(res[620].firstMatch("x{1c5}"), 1507); - assertNull(res[620].firstMatch("** Failers"), 1508); - assertNull(res[620].firstMatch("a "), 1509); - assertNull(res[620].firstMatch("x{2b0}"), 1510); - assertNull(res[621].firstMatch("A"), 1511); - assertNull(res[621].firstMatch("** Failers"), 1512); - assertNull(res[621].firstMatch("x{2b0}"), 1513); - assertNull(res[622].firstMatch("x{903}"), 1514); - assertNull(res[622].firstMatch("** Failers"), 1515); - assertNull(res[622].firstMatch("X"), 1516); - assertNull(res[622].firstMatch("x{300}"), 1517); - assertNull(res[622].firstMatch(" "), 1518); - assertNull(res[623].firstMatch("x{488}"), 1519); - assertNull(res[623].firstMatch("** Failers"), 1520); - assertNull(res[623].firstMatch("X"), 1521); - assertNull(res[623].firstMatch("x{903}"), 1522); - assertNull(res[623].firstMatch("x{300}"), 1523); - assertNull(res[624].firstMatch("x{300}"), 1524); - assertNull(res[624].firstMatch("** Failers"), 1525); - assertNull(res[624].firstMatch("X"), 1526); - assertNull(res[624].firstMatch("x{903}"), 1527); - assertNull( - res[624].firstMatch( - "0123456789x{660}x{661}x{662}x{663}x{664}x{665}x{666}x{667}x{668}x{669}x{66a}"), - 1528); - assertNull( - res[624].firstMatch( - "x{6f0}x{6f1}x{6f2}x{6f3}x{6f4}x{6f5}x{6f6}x{6f7}x{6f8}x{6f9}x{6fa}"), - 1529); - assertNull( - res[624].firstMatch( - "x{966}x{967}x{968}x{969}x{96a}x{96b}x{96c}x{96d}x{96e}x{96f}x{970}"), - 1530); - assertNull(res[624].firstMatch("** Failers"), 1531); - assertNull(res[624].firstMatch("X"), 1532); - assertNull(res[625].firstMatch("x{16ee}"), 1533); - assertNull(res[625].firstMatch("** Failers"), 1534); - assertNull(res[625].firstMatch("X"), 1535); - assertNull(res[625].firstMatch("x{966}"), 1536); - assertNull(res[626].firstMatch("x{b2}"), 1537); - assertNull(res[626].firstMatch("x{b3}"), 1538); - assertNull(res[626].firstMatch("** Failers"), 1539); - assertNull(res[626].firstMatch("X"), 1540); - assertNull(res[626].firstMatch("x{16ee}"), 1541); - assertNull(res[627].firstMatch("_"), 1542); - assertNull(res[627].firstMatch("x{203f}"), 1543); - assertNull(res[627].firstMatch("** Failers"), 1544); - assertNull(res[627].firstMatch("X"), 1545); - assertNull(res[627].firstMatch("-"), 1546); - assertNull(res[627].firstMatch("x{58a}"), 1547); - assertNull(res[628].firstMatch("-"), 1548); - assertNull(res[628].firstMatch("x{58a}"), 1549); - assertNull(res[628].firstMatch("** Failers"), 1550); - assertNull(res[628].firstMatch("X"), 1551); - assertNull(res[628].firstMatch("x{203f}"), 1552); - assertNull(res[629].firstMatch(")"), 1553); - assertNull(res[629].firstMatch("]"), 1554); - assertNull(res[629].firstMatch("}"), 1555); - assertNull(res[629].firstMatch("x{f3b}"), 1556); - assertNull(res[629].firstMatch("** Failers"), 1557); - assertNull(res[629].firstMatch("X"), 1558); - assertNull(res[629].firstMatch("x{203f}"), 1559); - assertNull(res[629].firstMatch("("), 1560); - assertNull(res[629].firstMatch("["), 1561); - assertNull(res[629].firstMatch("{"), 1562); - assertNull(res[629].firstMatch("x{f3c}"), 1563); - assertNull(res[630].firstMatch("x{bb}"), 1564); - assertNull(res[630].firstMatch("x{2019}"), 1565); - assertNull(res[630].firstMatch("** Failers"), 1566); - assertNull(res[630].firstMatch("X"), 1567); - assertNull(res[630].firstMatch("x{203f}"), 1568); - assertNull(res[631].firstMatch("x{ab}"), 1569); - assertNull(res[631].firstMatch("x{2018}"), 1570); - assertNull(res[631].firstMatch("** Failers"), 1571); - assertNull(res[631].firstMatch("X"), 1572); - assertNull(res[631].firstMatch("x{203f}"), 1573); - assertNull(res[632].firstMatch("!"), 1574); - assertNull(res[632].firstMatch("x{37e}"), 1575); - assertNull(res[632].firstMatch("** Failers"), 1576); - assertNull(res[632].firstMatch("X"), 1577); - assertNull(res[632].firstMatch("x{203f}"), 1578); - assertNull(res[633].firstMatch("("), 1579); - assertNull(res[633].firstMatch("["), 1580); - assertNull(res[633].firstMatch("{"), 1581); - assertNull(res[633].firstMatch("x{f3c}"), 1582); - assertNull(res[633].firstMatch("** Failers"), 1583); - assertNull(res[633].firstMatch("X"), 1584); - assertNull(res[633].firstMatch(")"), 1585); - assertNull(res[633].firstMatch("]"), 1586); - assertNull(res[633].firstMatch("}"), 1587); - assertNull(res[633].firstMatch("x{f3b}"), 1588); - assertNull(res[633].firstMatch("\$x{a2}x{a3}x{a4}x{a5}x{a6}"), 1589); - assertNull(res[633].firstMatch("x{9f2}"), 1590); - assertNull(res[633].firstMatch("** Failers"), 1591); - assertNull(res[633].firstMatch("X"), 1592); - assertNull(res[633].firstMatch("x{2c2}"), 1593); - assertNull(res[634].firstMatch("x{2c2}"), 1594); - assertNull(res[634].firstMatch("** Failers"), 1595); - assertNull(res[634].firstMatch("X"), 1596); - assertNull(res[634].firstMatch("x{9f2}"), 1597); - assertNull(res[634].firstMatch("+<|~x{ac}x{2044}"), 1598); - assertNull(res[634].firstMatch("** Failers"), 1599); - assertNull(res[634].firstMatch("X"), 1600); - assertNull(res[634].firstMatch("x{9f2}"), 1601); - assertNull(res[635].firstMatch("x{a6}"), 1602); - assertNull(res[635].firstMatch("x{482} "), 1603); - assertNull(res[635].firstMatch("** Failers"), 1604); - assertNull(res[635].firstMatch("X"), 1605); - assertNull(res[635].firstMatch("x{9f2}"), 1606); - assertNull(res[636].firstMatch("x{2028}"), 1607); - assertNull(res[636].firstMatch("** Failers"), 1608); - assertNull(res[636].firstMatch("X"), 1609); - assertNull(res[636].firstMatch("x{2029}"), 1610); - assertNull(res[637].firstMatch("x{2029}"), 1611); - assertNull(res[637].firstMatch("** Failers"), 1612); - assertNull(res[637].firstMatch("X"), 1613); - assertNull(res[637].firstMatch("x{2028}"), 1614); - assertNull(res[638].firstMatch("\\ \\"), 1615); - assertNull(res[638].firstMatch("x{a0}"), 1616); - assertNull(res[638].firstMatch("x{1680}"), 1617); - assertNull(res[638].firstMatch("x{180e}"), 1618); - assertNull(res[638].firstMatch("x{2000}"), 1619); - assertNull(res[638].firstMatch("x{2001} "), 1620); - assertNull(res[638].firstMatch("** Failers"), 1621); - assertNull(res[638].firstMatch("x{2028}"), 1622); - assertNull(res[638].firstMatch("x{200d} "), 1623); - assertNull(res[638].firstMatch(" x{660}x{661}x{662}ABC"), 1624); - assertNull(res[638].firstMatch(" x{660}x{661}x{662}ABC"), 1625); - assertNull(res[639].firstMatch(" x{660}x{661}x{662}ABC"), 1626); - assertNull(res[640].firstMatch(" x{660}x{661}x{662}ABC"), 1627); - assertNull(res[641].firstMatch(" x{660}x{661}x{662}ABC"), 1628); - assertNull(res[642].firstMatch(" x{660}x{661}x{662}ABC"), 1629); - assertNull(res[643].firstMatch(" x{660}x{661}x{662}ABC"), 1630); - assertNull(res[644].firstMatch(" x{660}x{661}x{662}ABC"), 1631); - assertNull(res[645].firstMatch(" x{660}x{661}x{662}ABC"), 1632); - assertNull(res[646].firstMatch(" x{660}x{661}x{662}ABC"), 1633); - assertNull(res[647].firstMatch(" x{660}x{661}x{662}ABC"), 1634); - assertNull(res[647].firstMatch(" x{660}x{661}x{662}ABC"), 1635); - assertNull(res[647].firstMatch(" x{660}x{661}x{662}ABC"), 1636); - assertNull(res[647].firstMatch(" ** Failers"), 1637); - assertNull(res[647].firstMatch(" x{660}x{661}x{662}ABC"), 1638); - assertNull(res[648].firstMatch("A"), 1639); - assertNull(res[648].firstMatch("ax{10a0}B "), 1640); - assertNull(res[648].firstMatch("** Failers "), 1641); - assertNull(res[648].firstMatch("a"), 1642); - assertNull(res[648].firstMatch("x{1d00} "), 1643); - assertNull(res[649].firstMatch("1234"), 1644); - assertNull(res[649].firstMatch("** Failers"), 1645); - assertNull(res[649].firstMatch("ABC "), 1646); - assertNull(res[650].firstMatch("1234"), 1647); - assertNull(res[650].firstMatch("** Failers"), 1648); - assertNull(res[650].firstMatch("ABC "), 1649); - assertNull(res[650].firstMatch("A2XYZ"), 1650); - assertNull(res[650].firstMatch("123A5XYZPQR"), 1651); - assertNull(res[650].firstMatch("ABAx{660}XYZpqr"), 1652); - assertNull(res[650].firstMatch("** Failers"), 1653); - assertNull(res[650].firstMatch("AXYZ"), 1654); - assertNull(res[650].firstMatch("XYZ "), 1655); - assertNull(res[650].firstMatch("1XYZ"), 1656); - assertNull(res[650].firstMatch("AB=XYZ.. "), 1657); - assertNull(res[650].firstMatch("XYZ "), 1658); - assertNull(res[650].firstMatch("** Failers"), 1659); - assertNull(res[650].firstMatch("WXYZ "), 1660); - assertNull(res[655].firstMatch("1234"), 1661); - assertNull(res[655].firstMatch("1234"), 1662); - assertNull(res[655].firstMatch("12-34"), 1663); - assertToStringEquals("{", res[655].firstMatch("12+x{661}-34 "), 1664); - assertNull(res[655].firstMatch("** Failers"), 1665); - assertToStringEquals("d", res[655].firstMatch("abcd "), 1666); - assertToStringEquals("d", res[656].firstMatch("abcd"), 1667); - assertNull(res[656].firstMatch("** Failers"), 1668); - assertNull(res[656].firstMatch("1234"), 1669); - assertNull( - res[657].firstMatch( - "11111111111111111111111111111111111111111111111111111111111111111111111"), - 1670); - assertToStringEquals( - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - res[657].firstMatch( - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - 1671); - assertToStringEquals(" ", res[657].firstMatch(" "), 1672); - assertNull( - res[657].firstMatch( - "11111111111111111111111111111111111111111111111111111111111111111111111"), - 1673); - assertToStringEquals( - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - res[657].firstMatch( - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - 1674); - assertNull( - res[658].firstMatch( - "11111111111111111111111111111111111111111111111111111111111111111111111"), - 1675); - assertToStringEquals( - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - res[658].firstMatch( - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - 1676); - assertNull( - res[659].firstMatch( - "11111111111111111111111111111111111111111111111111111111111111111111111"), - 1677); - assertNull( - res[659].firstMatch( - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - 1678); - assertNull( - res[660].firstMatch( - "11111111111111111111111111111111111111111111111111111111111111111111111"), - 1679); - assertToStringEquals( - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - res[660].firstMatch( - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - 1680); - assertNull(res[661].firstMatch("a"), 1681); - assertNull(res[661].firstMatch("A "), 1682); - assertNull(res[662].firstMatch("a"), 1683); - assertNull(res[662].firstMatch("A "), 1684); - assertNull(res[663].firstMatch("A"), 1685); - assertNull(res[663].firstMatch("aZ"), 1686); - assertNull(res[663].firstMatch("** Failers"), 1687); - assertNull(res[663].firstMatch("abc "), 1688); - assertNull(res[664].firstMatch("A"), 1689); - assertNull(res[664].firstMatch("aZ"), 1690); - assertNull(res[664].firstMatch("** Failers"), 1691); - assertNull(res[664].firstMatch("abc "), 1692); - assertNull(res[665].firstMatch("a"), 1693); - assertNull(res[665].firstMatch("Az"), 1694); - assertNull(res[665].firstMatch("** Failers"), 1695); - assertNull(res[665].firstMatch("ABC "), 1696); - assertNull(res[666].firstMatch("a"), 1697); - assertNull(res[666].firstMatch("Az"), 1698); - assertNull(res[666].firstMatch("** Failers"), 1699); - assertNull(res[666].firstMatch("ABC "), 1700); - assertNull(res[666].firstMatch("x{c0}"), 1701); - assertNull(res[666].firstMatch("x{e0} "), 1702); - assertNull(res[666].firstMatch("x{c0}"), 1703); - assertNull(res[666].firstMatch("x{e0} "), 1704); - assertNull(res[666].firstMatch("Ax{391}x{10427}x{ff3a}x{1fb0}"), 1705); - assertNull(res[666].firstMatch("** Failers"), 1706); - assertNull(res[666].firstMatch("ax{391}x{10427}x{ff3a}x{1fb0} "), 1707); - assertNull(res[666].firstMatch("Ax{3b1}x{10427}x{ff3a}x{1fb0}"), 1708); - assertNull(res[666].firstMatch("Ax{391}x{1044F}x{ff3a}x{1fb0}"), 1709); - assertNull(res[666].firstMatch("Ax{391}x{10427}x{ff5a}x{1fb0}"), 1710); - assertNull(res[666].firstMatch("Ax{391}x{10427}x{ff3a}x{1fb8}"), 1711); - assertNull(res[666].firstMatch("Ax{391}x{10427}x{ff3a}x{1fb0}"), 1712); - assertNull(res[666].firstMatch("ax{391}x{10427}x{ff3a}x{1fb0} "), 1713); - assertNull(res[666].firstMatch("Ax{3b1}x{10427}x{ff3a}x{1fb0}"), 1714); - assertNull(res[666].firstMatch("Ax{391}x{1044F}x{ff3a}x{1fb0}"), 1715); - assertNull(res[666].firstMatch("Ax{391}x{10427}x{ff5a}x{1fb0}"), 1716); - assertNull(res[666].firstMatch("Ax{391}x{10427}x{ff3a}x{1fb8}"), 1717); - assertNull(res[666].firstMatch("x{391}x{3b1}x{3b1}x{3b1}x{391}"), 1718); - assertNull(res[666].firstMatch("x{391}x{3b1}x{3b1}x{3b1}x{391}X"), 1719); - assertNull(res[666].firstMatch("x{391}x{3b1}x{3b1}x{3b1}x{391}X"), 1720); - assertNull(res[666].firstMatch("x{391}"), 1721); - assertNull(res[666].firstMatch("x{ff3a}"), 1722); - assertNull(res[666].firstMatch("x{3b1}"), 1723); - assertNull(res[666].firstMatch("x{ff5a} "), 1724); - assertNull(res[666].firstMatch("x{c0}"), 1725); - assertNull(res[666].firstMatch("x{e0} "), 1726); - assertNull(res[666].firstMatch("x{104}"), 1727); - assertNull(res[666].firstMatch("x{105}"), 1728); - assertNull(res[666].firstMatch("x{109} "), 1729); - assertNull(res[666].firstMatch("** Failers"), 1730); - assertNull(res[666].firstMatch("x{100}"), 1731); - assertNull(res[666].firstMatch("x{10a} "), 1732); - assertNull(res[666].firstMatch("Z"), 1733); - assertNull(res[666].firstMatch("z"), 1734); - assertNull(res[666].firstMatch("x{39c}"), 1735); - assertNull(res[666].firstMatch("x{178}"), 1736); - assertNull(res[666].firstMatch("|"), 1737); - assertNull(res[666].firstMatch("x{80}"), 1738); - assertNull(res[666].firstMatch("x{ff}"), 1739); - assertNull(res[666].firstMatch("x{100}"), 1740); - assertNull(res[666].firstMatch("x{101} "), 1741); - assertNull(res[666].firstMatch("** Failers"), 1742); - assertNull(res[666].firstMatch("x{102}"), 1743); - assertNull(res[666].firstMatch("Y"), 1744); - assertNull(res[666].firstMatch("y "), 1745); - assertNull(res[667].firstMatch("A"), 1746); - assertNull(res[667].firstMatch("Ax{300}BC "), 1747); - assertNull(res[667].firstMatch("Ax{300}x{301}x{302}BC "), 1748); - assertNull(res[667].firstMatch("*** Failers"), 1749); - assertNull(res[667].firstMatch("x{300} "), 1750); - assertToStringEquals("X", res[668].firstMatch("X123"), 1751); - assertNull(res[668].firstMatch("*** Failers"), 1752); - assertNull(res[668].firstMatch("AXYZ"), 1753); - assertNull(res[669].firstMatch("Ax{300}x{301}x{302}BCAx{300}x{301} "), 1754); - assertNull(res[669].firstMatch("Ax{300}x{301}x{302}BCAx{300}x{301}C "), 1755); - assertNull(res[670].firstMatch("Ax{300}x{301}x{302}BCAx{300}x{301} "), 1756); - assertNull(res[670].firstMatch("Ax{300}x{301}x{302}BCAx{300}x{301}C "), 1757); - assertToStringEquals( - "A,,A", res[671].firstMatch("Ax{300}x{301}x{302}BCAx{300}x{301} "), 1758); - assertToStringEquals("A,,A", - res[671].firstMatch("Ax{300}x{301}x{302}BCAx{300}x{301}C "), 1759); - assertToStringEquals( - "A,,A", res[672].firstMatch("Ax{300}x{301}x{302}BCAx{300}x{301} "), 1760); - assertToStringEquals("A,,A", - res[672].firstMatch("Ax{300}x{301}x{302}BCAx{300}x{301}C "), 1761); - assertNull(res[673].firstMatch("*** Failers"), 1762); - assertNull(res[673].firstMatch("Ax{300}x{301}x{302}"), 1763); - assertNull(res[674].firstMatch("Ax{300}x{301}Bx{300}X"), 1764); - assertNull(res[674].firstMatch("Ax{300}x{301}Bx{300}Cx{300}x{301}"), 1765); - assertNull(res[674].firstMatch("Ax{300}x{301}Bx{300}Cx{300}x{301}X"), 1766); - assertNull( - res[674].firstMatch("Ax{300}x{301}Bx{300}Cx{300}x{301}DAx{300}X"), 1767); - assertNull(res[675].firstMatch("Ax{300}x{301}Bx{300}X"), 1768); - assertNull(res[675].firstMatch("Ax{300}x{301}Bx{300}Cx{300}x{301}"), 1769); - assertNull(res[675].firstMatch("Ax{300}x{301}Bx{300}Cx{300}x{301}X"), 1770); - assertNull( - res[675].firstMatch("Ax{300}x{301}Bx{300}Cx{300}x{301}DAx{300}X"), 1771); - assertNull(res[675].firstMatch("x{2e81}x{3007}x{2f804}x{31a0}"), 1772); - assertNull(res[675].firstMatch("** Failers"), 1773); - assertNull(res[675].firstMatch("x{2e7f} "), 1774); - assertNull(res[675].firstMatch("x{3105}"), 1775); - assertNull(res[675].firstMatch("** Failers"), 1776); - assertNull(res[675].firstMatch("x{30ff} "), 1777); - assertNull(res[676].firstMatch("x{06e9}"), 1778); - assertNull(res[676].firstMatch("x{060b}"), 1779); - assertNull(res[676].firstMatch("** Failers"), 1780); - assertNull(res[676].firstMatch("Xx{06e9} "), 1781); - assertNull(res[677].firstMatch("x{2f800}"), 1782); - assertNull(res[677].firstMatch("** Failers"), 1783); - assertNull(res[677].firstMatch("x{a014}"), 1784); - assertNull(res[677].firstMatch("x{a4c6} "), 1785); - assertNull(res[678].firstMatch("AXYZ"), 1786); - assertNull(res[678].firstMatch("x{1234}XYZ "), 1787); - assertNull(res[678].firstMatch("** Failers"), 1788); - assertNull(res[678].firstMatch("X "), 1789); - assertNull(res[679].firstMatch("** Failers"), 1790); - assertNull(res[679].firstMatch("AX"), 1791); - assertNull(res[680].firstMatch("XYZ"), 1792); - assertNull(res[680].firstMatch("AXYZ"), 1793); - assertNull(res[680].firstMatch("x{1234}XYZ "), 1794); - assertNull(res[680].firstMatch("** Failers"), 1795); - assertNull(res[680].firstMatch("ABXYZ "), 1796); - assertNull(res[681].firstMatch("XYZ"), 1797); - assertNull(res[681].firstMatch("** Failers"), 1798); - assertNull(res[681].firstMatch("AXYZ"), 1799); - assertNull(res[681].firstMatch("x{1234}XYZ "), 1800); - assertNull(res[681].firstMatch("ABXYZ "), 1801); - assertNull(res[681].firstMatch("AXYZ"), 1802); - assertNull(res[681].firstMatch("x{1234}XYZ"), 1803); - assertNull(res[681].firstMatch("Ax{1234}XYZ"), 1804); - assertNull(res[681].firstMatch("** Failers"), 1805); - assertNull(res[681].firstMatch("XYZ"), 1806); - assertNull(res[681].firstMatch("** Failers"), 1807); - assertNull(res[681].firstMatch("AXYZ"), 1808); - assertNull(res[681].firstMatch("x{1234}XYZ"), 1809); - assertNull(res[681].firstMatch("Ax{1234}XYZ"), 1810); - assertNull(res[681].firstMatch("XYZ"), 1811); - assertNull(res[682].firstMatch("XYZ"), 1812); - assertNull(res[682].firstMatch("AXYZ"), 1813); - assertNull(res[682].firstMatch("x{1234}XYZ"), 1814); - assertNull(res[682].firstMatch("Ax{1234}XYZ"), 1815); - assertNull(res[682].firstMatch("** Failers"), 1816); - assertNull(res[683].firstMatch("XYZ"), 1817); - assertNull(res[683].firstMatch("** Failers"), 1818); - assertNull(res[683].firstMatch("AXYZ"), 1819); - assertNull(res[683].firstMatch("x{1234}XYZ"), 1820); - assertNull(res[683].firstMatch("Ax{1234}XYZ"), 1821); - assertToStringEquals("AX", res[684].firstMatch("AXYZ"), 1822); - assertNull(res[684].firstMatch("x{1234}XYZ "), 1823); - assertNull(res[684].firstMatch("** Failers"), 1824); - assertNull(res[684].firstMatch("X "), 1825); - assertNull(res[685].firstMatch("** Failers"), 1826); - assertToStringEquals("AX", res[685].firstMatch("AX"), 1827); - assertToStringEquals("X", res[686].firstMatch("XYZ"), 1828); - assertToStringEquals("AX", res[686].firstMatch("AXYZ"), 1829); - assertNull(res[686].firstMatch("x{1234}XYZ "), 1830); - assertNull(res[686].firstMatch("** Failers"), 1831); - assertNull(res[686].firstMatch("ABXYZ "), 1832); - assertToStringEquals("X", res[687].firstMatch("XYZ"), 1833); - assertNull(res[687].firstMatch("** Failers"), 1834); - assertToStringEquals("AX", res[687].firstMatch("AXYZ"), 1835); - assertNull(res[687].firstMatch("x{1234}XYZ "), 1836); - assertNull(res[687].firstMatch("ABXYZ "), 1837); - assertToStringEquals("AX", res[688].firstMatch("AXYZ"), 1838); - assertNull(res[688].firstMatch("x{1234}XYZ"), 1839); - assertNull(res[688].firstMatch("Ax{1234}XYZ"), 1840); - assertNull(res[688].firstMatch("** Failers"), 1841); - assertNull(res[688].firstMatch("XYZ"), 1842); - assertNull(res[689].firstMatch("** Failers"), 1843); - assertToStringEquals("AX", res[689].firstMatch("AXYZ"), 1844); - assertNull(res[689].firstMatch("x{1234}XYZ"), 1845); - assertNull(res[689].firstMatch("Ax{1234}XYZ"), 1846); - assertNull(res[689].firstMatch("XYZ"), 1847); - assertToStringEquals("X", res[690].firstMatch("XYZ"), 1848); - assertToStringEquals("AX", res[690].firstMatch("AXYZ"), 1849); - assertNull(res[690].firstMatch("x{1234}XYZ"), 1850); - assertNull(res[690].firstMatch("Ax{1234}XYZ"), 1851); - assertNull(res[690].firstMatch("** Failers"), 1852); - assertToStringEquals("X", res[691].firstMatch("XYZ"), 1853); - assertNull(res[691].firstMatch("** Failers"), 1854); - assertToStringEquals("AX", res[691].firstMatch("AXYZ"), 1855); - assertNull(res[691].firstMatch("x{1234}XYZ"), 1856); - assertNull(res[691].firstMatch("Ax{1234}XYZ"), 1857); - assertNull(res[692].firstMatch("abcdefgh"), 1858); - assertNull(res[692].firstMatch("x{1234}\n\x0dx{3456}xyz "), 1859); - assertNull(res[693].firstMatch("abcdefgh"), 1860); - assertNull(res[693].firstMatch("x{1234}\n\x0dx{3456}xyz "), 1861); - assertNull(res[694].firstMatch("** Failers"), 1862); - assertNull(res[694].firstMatch("abcdefgh"), 1863); - assertNull(res[694].firstMatch("x{1234}\n\x0dx{3456}xyz "), 1864); - assertNull(res[695].firstMatch(" AXY"), 1865); - assertNull(res[695].firstMatch(" aXY"), 1866); - assertNull(res[695].firstMatch(" x{1c5}XY"), 1867); - assertNull(res[695].firstMatch(" ** Failers"), 1868); - assertNull(res[695].firstMatch(" x{1bb}XY"), 1869); - assertNull(res[695].firstMatch(" x{2b0}XY"), 1870); - assertNull(res[695].firstMatch(" !XY "), 1871); - assertNull(res[696].firstMatch(" AXY"), 1872); - assertNull(res[696].firstMatch(" aXY"), 1873); - assertNull(res[696].firstMatch(" x{1c5}XY"), 1874); - assertNull(res[696].firstMatch(" ** Failers"), 1875); - assertNull(res[696].firstMatch(" x{1bb}XY"), 1876); - assertNull(res[696].firstMatch(" x{2b0}XY"), 1877); - assertNull(res[696].firstMatch(" !XY "), 1878); - assertNull(res[696].firstMatch(" AXY"), 1879); - assertNull(res[696].firstMatch(" aXY"), 1880); - assertNull(res[696].firstMatch(" AbcdeXyz "), 1881); - assertNull(res[696].firstMatch(" x{1c5}AbXY"), 1882); - assertNull(res[696].firstMatch(" abcDEXypqreXlmn "), 1883); - assertNull(res[696].firstMatch(" ** Failers"), 1884); - assertNull(res[696].firstMatch(" x{1bb}XY"), 1885); - assertNull(res[696].firstMatch(" x{2b0}XY"), 1886); - assertNull(res[696].firstMatch(" !XY "), 1887); - assertNull(res[697].firstMatch(" AXY"), 1888); - assertNull(res[697].firstMatch(" aXY"), 1889); - assertNull(res[697].firstMatch(" AbcdeXyz "), 1890); - assertNull(res[697].firstMatch(" x{1c5}AbXY"), 1891); - assertNull(res[697].firstMatch(" abcDEXypqreXlmn "), 1892); - assertNull(res[697].firstMatch(" ** Failers"), 1893); - assertNull(res[697].firstMatch(" x{1bb}XY"), 1894); - assertNull(res[697].firstMatch(" x{2b0}XY"), 1895); - assertNull(res[697].firstMatch(" !XY "), 1896); - assertNull(res[697].firstMatch(" AXY"), 1897); - assertNull(res[697].firstMatch(" aXY"), 1898); - assertNull(res[697].firstMatch(" AbcdeXyz "), 1899); - assertNull(res[697].firstMatch(" x{1c5}AbXY"), 1900); - assertNull(res[697].firstMatch(" abcDEXypqreXlmn "), 1901); - assertNull(res[697].firstMatch(" ** Failers"), 1902); - assertNull(res[697].firstMatch(" x{1bb}XY"), 1903); - assertNull(res[697].firstMatch(" x{2b0}XY"), 1904); - assertNull(res[697].firstMatch(" !XY "), 1905); - assertNull(res[698].firstMatch(" AXY"), 1906); - assertNull(res[698].firstMatch(" aXY"), 1907); - assertNull(res[698].firstMatch(" AbcdeXyz "), 1908); - assertNull(res[698].firstMatch(" x{1c5}AbXY"), 1909); - assertNull(res[698].firstMatch(" abcDEXypqreXlmn "), 1910); - assertNull(res[698].firstMatch(" ** Failers"), 1911); - assertNull(res[698].firstMatch(" x{1bb}XY"), 1912); - assertNull(res[698].firstMatch(" x{2b0}XY"), 1913); - assertNull(res[698].firstMatch(" !XY "), 1914); - assertNull(res[699].firstMatch(" !XY"), 1915); - assertNull(res[699].firstMatch(" x{1bb}XY"), 1916); - assertNull(res[699].firstMatch(" x{2b0}XY"), 1917); - assertNull(res[699].firstMatch(" ** Failers"), 1918); - assertNull(res[699].firstMatch(" x{1c5}XY"), 1919); - assertNull(res[699].firstMatch(" AXY "), 1920); - assertNull(res[700].firstMatch(" !XY"), 1921); - assertNull(res[700].firstMatch(" x{1bb}XY"), 1922); - assertNull(res[700].firstMatch(" x{2b0}XY"), 1923); - assertNull(res[700].firstMatch(" ** Failers"), 1924); - assertNull(res[700].firstMatch(" x{1c5}XY"), 1925); - assertNull(res[700].firstMatch(" AXY "), 1926); - assertNull(res[701].firstMatch("\xa0!"), 1927); - assertNull(res[701].firstMatch("AabcabcYZ "), 1928); - assertToStringEquals("L=abcX,L=abc,abc", res[702].firstMatch("L=abcX"), 1929); - assertNull(res[702].firstMatch("x{c0}"), 1930); - assertNull(res[702].firstMatch("x{e0} "), 1931); - assertNull(res[702].firstMatch("x{c0}"), 1932); - assertNull(res[702].firstMatch("x{e0} "), 1933); - assertNull(res[703].firstMatch("x{1b00}x{12000}x{7c0}x{a840}x{10900}"), 1934); - assertNull(res[706].firstMatch("123abcdefg"), 1935); - assertNull(res[706].firstMatch("123abc\xc4\xc5zz"), 1936); - assertNull(res[710].firstMatch("A\x80"), 1937); - assertNull(res[725].firstMatch("x{60e} "), 1938); - assertNull(res[725].firstMatch("x{656} "), 1939); - assertNull(res[725].firstMatch("x{657} "), 1940); - assertNull(res[725].firstMatch("x{658} "), 1941); - assertNull(res[725].firstMatch("x{659} "), 1942); - assertNull(res[725].firstMatch("x{65a} "), 1943); - assertNull(res[725].firstMatch("x{65b} "), 1944); - assertNull(res[725].firstMatch("x{65c} "), 1945); - assertNull(res[725].firstMatch("x{65d} "), 1946); - assertNull(res[725].firstMatch("x{65e} "), 1947); - assertNull(res[725].firstMatch("x{66a} "), 1948); - assertNull(res[725].firstMatch("x{6e9} "), 1949); - assertNull(res[725].firstMatch("x{6ef}"), 1950); - assertNull(res[725].firstMatch("x{6fa} "), 1951); - assertNull(res[725].firstMatch("** Failers"), 1952); - assertNull(res[725].firstMatch("x{600}"), 1953); - assertNull(res[725].firstMatch("x{650}"), 1954); - assertNull(res[725].firstMatch("x{651} "), 1955); - assertNull(res[725].firstMatch("x{652} "), 1956); - assertNull(res[725].firstMatch("x{653} "), 1957); - assertNull(res[725].firstMatch("x{654} "), 1958); - assertNull(res[725].firstMatch("x{655} "), 1959); - assertNull(res[725].firstMatch("x{65f} "), 1960); - assertNull(res[726].firstMatch("x{1d2b} "), 1961); - assertNull(res[727].firstMatch("x{589}"), 1962); - assertNull(res[727].firstMatch("x{60c}"), 1963); - assertNull(res[727].firstMatch("x{61f} "), 1964); - assertNull(res[727].firstMatch("x{964}"), 1965); - assertNull(res[727].firstMatch("x{965} "), 1966); - assertNull(res[727].firstMatch("x{970} "), 1967); - assertNull(res[728].firstMatch("x{64b}"), 1968); - assertNull(res[728].firstMatch("x{654}"), 1969); - assertNull(res[728].firstMatch("x{655}"), 1970); - assertNull(res[728].firstMatch("x{200c} "), 1971); - assertNull(res[728].firstMatch("** Failers"), 1972); - assertNull(res[728].firstMatch("x{64a}"), 1973); - assertNull(res[728].firstMatch("x{656} "), 1974); - assertNull(res[729].firstMatch("x{10450}"), 1975); - assertNull(res[729].firstMatch("x{1047f}"), 1976); - assertNull(res[730].firstMatch("x{10400}"), 1977); - assertNull(res[730].firstMatch("x{1044f}"), 1978); - assertNull(res[731].firstMatch("x{10480}"), 1979); - assertNull(res[731].firstMatch("x{1049d}"), 1980); - assertNull(res[731].firstMatch("x{104a0}"), 1981); - assertNull(res[731].firstMatch("x{104a9}"), 1982); - assertNull(res[731].firstMatch("** Failers"), 1983); - assertNull(res[731].firstMatch("x{1049e}"), 1984); - assertNull(res[731].firstMatch("x{1049f}"), 1985); - assertNull(res[731].firstMatch("x{104aa} "), 1986); - assertNull(res[731].firstMatch("\xe2\x80\xa8\xe2\x80\xa8"), 1987); - assertNull(res[731].firstMatch("x{2028}x{2028}x{2028}"), 1988); - assertNull(res[732].firstMatch("x{c0}x{e0}x{116}x{117}"), 1989); - assertNull(res[732].firstMatch("x{c0}x{e0}x{116}x{117}"), 1990); - assertNull( - res[733].firstMatch( - "x{102A4}x{AA52}x{A91D}x{1C46}x{10283}x{1092E}x{1C6B}x{A93B}x{A8BF}x{1BA0}x{A50A}===="), - 1991); - assertNull(res[733].firstMatch("x{a77d}x{1d79}"), 1992); - assertNull(res[733].firstMatch("x{1d79}x{a77d} "), 1993); - assertNull(res[733].firstMatch("x{a77d}x{1d79}"), 1994); - assertNull(res[733].firstMatch("** Failers "), 1995); - assertNull(res[733].firstMatch("x{1d79}x{a77d} "), 1996); - assertToStringEquals("AA,A", res[734].firstMatch("AA"), 1997); - assertToStringEquals("Aa,A", res[734].firstMatch("Aa"), 1998); - assertToStringEquals("aa,a", res[734].firstMatch("aa"), 1999); - assertToStringEquals("aA,a", res[734].firstMatch("aA"), 2000); - assertNull(res[734].firstMatch("x{de}x{de}"), 2001); - assertNull(res[734].firstMatch("x{de}x{fe}"), 2002); - assertNull(res[734].firstMatch("x{fe}x{fe}"), 2003); - assertNull(res[734].firstMatch("x{fe}x{de}"), 2004); - assertNull(res[734].firstMatch("x{10a}x{10a}"), 2005); - assertNull(res[734].firstMatch("x{10a}x{10b}"), 2006); - assertNull(res[734].firstMatch("x{10b}x{10b}"), 2007); - assertNull(res[734].firstMatch("x{10b}x{10a}"), 2008); - assertToStringEquals("abc", res[736].firstMatch("abc"), 2009); - assertToStringEquals("abc", res[737].firstMatch("abc"), 2010); - assertToStringEquals("abbbbc", res[737].firstMatch("abbbbc"), 2011); - assertToStringEquals("ac", res[737].firstMatch("ac"), 2012); - assertToStringEquals("abc", res[738].firstMatch("abc"), 2013); - assertToStringEquals("abbbbbbc", res[738].firstMatch("abbbbbbc"), 2014); - assertNull(res[738].firstMatch("*** Failers "), 2015); - assertNull(res[738].firstMatch("ac"), 2016); - assertNull(res[738].firstMatch("ab"), 2017); - assertToStringEquals("a", res[739].firstMatch("a"), 2018); - assertToStringEquals( - "aaaaaaaaaaaaaaaaa", res[739].firstMatch("aaaaaaaaaaaaaaaaa"), 2019); - assertToStringEquals("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - res[739].firstMatch("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa "), 2020); - assertToStringEquals("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - res[739].firstMatch("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaF "), 2021); - assertToStringEquals("a,a", res[740].firstMatch("a"), 2022); - assertToStringEquals("a,a", res[740].firstMatch("abcd"), 2023); - assertToStringEquals("a,a", res[740].firstMatch("african"), 2024); - assertToStringEquals("abc", res[741].firstMatch("abcdef"), 2025); - assertNull(res[741].firstMatch("*** Failers"), 2026); - assertNull(res[741].firstMatch("xyzabc"), 2027); - assertNull(res[741].firstMatch("xyz\nabc "), 2028); - assertToStringEquals("abc", res[742].firstMatch("abcdef"), 2029); - assertToStringEquals("abc", res[742].firstMatch("xyz\nabc "), 2030); - assertNull(res[742].firstMatch("*** Failers"), 2031); - assertNull(res[742].firstMatch("xyzabc"), 2032); - assertNull(res[743].firstMatch("abcdef"), 2033); - assertNull(res[743].firstMatch("*** Failers"), 2034); - assertNull(res[743].firstMatch("xyzabc"), 2035); - assertNull(res[743].firstMatch("xyz\nabc "), 2036); - assertNull(res[744].firstMatch("abcdef"), 2037); - assertNull(res[744].firstMatch("*** Failers"), 2038); - assertNull(res[744].firstMatch("xyzabc"), 2039); - assertNull(res[744].firstMatch("xyz\nabc "), 2040); - assertNull(res[745].firstMatch("abcdef"), 2041); - assertNull(res[745].firstMatch("xyzabc>3"), 2042); - assertNull(res[745].firstMatch("*** Failers"), 2043); - assertNull(res[745].firstMatch("xyzabc "), 2044); - assertNull(res[745].firstMatch("xyzabc>2 "), 2045); - assertToStringEquals("x9yzz", res[746].firstMatch("x9yzz"), 2046); - assertToStringEquals("x0y+z", res[746].firstMatch("x0y+z"), 2047); - assertNull(res[746].firstMatch("*** Failers"), 2048); - assertNull(res[746].firstMatch("xyz"), 2049); - assertNull(res[746].firstMatch("xxy0z "), 2050); - assertToStringEquals("x yzz", res[747].firstMatch("x yzz"), 2051); - assertToStringEquals("x y+z", res[747].firstMatch("x y+z"), 2052); - assertNull(res[747].firstMatch("*** Failers"), 2053); - assertNull(res[747].firstMatch("xyz"), 2054); - assertNull(res[747].firstMatch("xxyyz"), 2055); - assertToStringEquals("xxy+z", res[748].firstMatch("xxy+z"), 2056); - assertNull(res[748].firstMatch("*** Failers"), 2057); - assertNull(res[748].firstMatch("xxy0z"), 2058); - assertNull(res[748].firstMatch("x+y+z "), 2059); - assertToStringEquals("x+y", res[749].firstMatch("x+y"), 2060); - assertToStringEquals("x-y", res[749].firstMatch("x-y"), 2061); - assertNull(res[749].firstMatch("*** Failers"), 2062); - assertNull(res[749].firstMatch("x\ny"), 2063); - assertToStringEquals("x+y", res[750].firstMatch("x+y"), 2064); - assertToStringEquals("x-y", res[750].firstMatch("x-y"), 2065); - assertNull(res[750].firstMatch("x\ny"), 2066); - assertNull(res[750].firstMatch("a+bc+dp+q"), 2067); - assertNull(res[750].firstMatch("a+bc\ndp+q"), 2068); - assertNull(res[750].firstMatch("x\nyp+q "), 2069); - assertNull(res[750].firstMatch("*** Failers "), 2070); - assertNull(res[750].firstMatch("a\nbc\ndp+q"), 2071); - assertNull(res[750].firstMatch("a+bc\ndp\nq"), 2072); - assertNull(res[750].firstMatch("x\nyp\nq "), 2073); - assertNull(res[751].firstMatch("ba0"), 2074); - assertNull(res[751].firstMatch("*** Failers"), 2075); - assertNull(res[751].firstMatch("ba0\n"), 2076); - assertNull(res[751].firstMatch("ba0\ncd "), 2077); - assertNull(res[752].firstMatch("ba0"), 2078); - assertNull(res[752].firstMatch("*** Failers"), 2079); - assertNull(res[752].firstMatch("ba0\n"), 2080); - assertNull(res[752].firstMatch("ba0\ncd "), 2081); - assertNull(res[753].firstMatch("ba0"), 2082); - assertNull(res[753].firstMatch("ba0\n"), 2083); - assertNull(res[753].firstMatch("*** Failers"), 2084); - assertNull(res[753].firstMatch("ba0\ncd "), 2085); - assertNull(res[754].firstMatch("ba0"), 2086); - assertNull(res[754].firstMatch("ba0\n"), 2087); - assertNull(res[754].firstMatch("*** Failers"), 2088); - assertNull(res[754].firstMatch("ba0\ncd "), 2089); - assertToStringEquals("a0", res[755].firstMatch("ba0"), 2090); - assertNull(res[755].firstMatch("ba0\n"), 2091); - assertNull(res[755].firstMatch("*** Failers"), 2092); - assertNull(res[755].firstMatch("ba0\ncd "), 2093); - assertToStringEquals("a0", res[756].firstMatch("ba0"), 2094); - assertToStringEquals("a0", res[756].firstMatch("ba0\n"), 2095); - assertToStringEquals("a0", res[756].firstMatch("ba0\ncd "), 2096); - assertNull(res[756].firstMatch("*** Failers"), 2097); - assertToStringEquals("abc", res[757].firstMatch("abc"), 2098); - assertToStringEquals("aBc", res[757].firstMatch("aBc"), 2099); - assertToStringEquals("ABC", res[757].firstMatch("ABC"), 2100); - assertToStringEquals("b", res[758].firstMatch("abcd"), 2101); - assertToStringEquals("abz", res[759].firstMatch("abz"), 2102); - assertToStringEquals("abb", res[759].firstMatch("abbz"), 2103); - assertToStringEquals("az", res[759].firstMatch("azz "), 2104); - assertToStringEquals("yz", res[760].firstMatch("ayzq"), 2105); - assertToStringEquals("xyz", res[760].firstMatch("axyzq"), 2106); - assertToStringEquals("xxyz", res[760].firstMatch("axxyz"), 2107); - assertToStringEquals("xxxyz", res[760].firstMatch("axxxyzq"), 2108); - assertToStringEquals("xxxyz", res[760].firstMatch("axxxxyzq"), 2109); - assertNull(res[760].firstMatch("*** Failers"), 2110); - assertNull(res[760].firstMatch("ax"), 2111); - assertNull(res[760].firstMatch("axx "), 2112); - assertNull(res[760].firstMatch(" "), 2113); - assertToStringEquals("xxxyz", res[761].firstMatch("axxxyzq"), 2114); - assertToStringEquals("xxxyz", res[761].firstMatch("axxxxyzq"), 2115); - assertNull(res[761].firstMatch("*** Failers"), 2116); - assertNull(res[761].firstMatch("ax"), 2117); - assertNull(res[761].firstMatch("axx "), 2118); - assertNull(res[761].firstMatch("ayzq"), 2119); - assertNull(res[761].firstMatch("axyzq"), 2120); - assertNull(res[761].firstMatch("axxyz"), 2121); - assertNull(res[761].firstMatch(" "), 2122); - assertToStringEquals("xxyz", res[762].firstMatch("axxyz"), 2123); - assertToStringEquals("xxxyz", res[762].firstMatch("axxxyzq"), 2124); - assertToStringEquals("xxxyz", res[762].firstMatch("axxxxyzq"), 2125); - assertNull(res[762].firstMatch("*** Failers"), 2126); - assertNull(res[762].firstMatch("ax"), 2127); - assertNull(res[762].firstMatch("axx "), 2128); - assertNull(res[762].firstMatch("ayzq"), 2129); - assertNull(res[762].firstMatch("axyzq"), 2130); - assertNull(res[762].firstMatch(" "), 2131); - assertToStringEquals("b", res[763].firstMatch("bac"), 2132); - assertToStringEquals("bcdef", res[763].firstMatch("bcdefax"), 2133); - assertToStringEquals("*** F", res[763].firstMatch("*** Failers"), 2134); - assertToStringEquals(" ", res[763].firstMatch("aaaaa "), 2135); - assertToStringEquals("b", res[764].firstMatch("bac"), 2136); - assertToStringEquals("bcdef", res[764].firstMatch("bcdefax"), 2137); - assertToStringEquals("*** F", res[764].firstMatch("*** Failers"), 2138); - assertToStringEquals("", res[764].firstMatch("aaaaa "), 2139); - assertToStringEquals("xyz", res[765].firstMatch("xyz"), 2140); - assertToStringEquals("wxyz", res[765].firstMatch("awxyza"), 2141); - assertToStringEquals("bcdef", res[765].firstMatch("abcdefa"), 2142); - assertToStringEquals("bcdef", res[765].firstMatch("abcdefghijk"), 2143); - assertToStringEquals("*** F", res[765].firstMatch("*** Failers"), 2144); - assertNull(res[765].firstMatch("axya"), 2145); - assertNull(res[765].firstMatch("axa"), 2146); - assertToStringEquals(" ", res[765].firstMatch("aaaaa "), 2147); - assertToStringEquals("1234", res[766].firstMatch("1234b567"), 2148); - assertToStringEquals("", res[766].firstMatch("xyz"), 2149); - assertToStringEquals("a", res[767].firstMatch("a1234b567"), 2150); - assertToStringEquals("xyz", res[767].firstMatch("xyz"), 2151); - assertToStringEquals(" ", res[767].firstMatch(" "), 2152); - assertToStringEquals("1234", res[768].firstMatch("ab1234c56"), 2153); - assertNull(res[768].firstMatch("*** Failers"), 2154); - assertNull(res[768].firstMatch("xyz"), 2155); - assertToStringEquals("ab", res[769].firstMatch("ab123c56"), 2156); - assertToStringEquals("*** Failers", res[769].firstMatch("*** Failers"), 2157); - assertNull(res[769].firstMatch("789"), 2158); - assertToStringEquals("5A", res[770].firstMatch("045ABC"), 2159); - assertToStringEquals("A", res[770].firstMatch("ABC"), 2160); - assertNull(res[770].firstMatch("*** Failers"), 2161); - assertNull(res[770].firstMatch("XYZ"), 2162); - assertToStringEquals("A", res[771].firstMatch("ABC"), 2163); - assertToStringEquals("BA", res[771].firstMatch("BAC"), 2164); - assertToStringEquals("A", res[771].firstMatch("9ABC "), 2165); - assertNull(res[771].firstMatch("*** Failers"), 2166); - assertToStringEquals("aaaa", res[772].firstMatch("aaaa"), 2167); - assertToStringEquals("xyz", res[773].firstMatch("xyz"), 2168); - assertToStringEquals("ggggggggxyz", res[773].firstMatch("ggggggggxyz"), 2169); - assertToStringEquals("abcdxyz", res[774].firstMatch("abcdxyz"), 2170); - assertToStringEquals("axyz", res[774].firstMatch("axyz"), 2171); - assertNull(res[774].firstMatch("*** Failers"), 2172); - assertNull(res[774].firstMatch("xyz"), 2173); - assertToStringEquals("xyz", res[775].firstMatch("xyz"), 2174); - assertToStringEquals("cxyz", res[775].firstMatch("cxyz "), 2175); - assertToStringEquals("12X", res[776].firstMatch("12X"), 2176); - assertToStringEquals("123X", res[776].firstMatch("123X"), 2177); - assertNull(res[776].firstMatch("*** Failers"), 2178); - assertNull(res[776].firstMatch("X"), 2179); - assertNull(res[776].firstMatch("1X"), 2180); - assertNull(res[776].firstMatch("1234X "), 2181); - assertToStringEquals("a4", res[777].firstMatch("a45"), 2182); - assertToStringEquals("b9", res[777].firstMatch("b93"), 2183); - assertToStringEquals("c9", res[777].firstMatch("c99z"), 2184); - assertToStringEquals("d0", res[777].firstMatch("d04"), 2185); - assertNull(res[777].firstMatch("*** Failers"), 2186); - assertNull(res[777].firstMatch("e45"), 2187); - assertNull(res[777].firstMatch("abcd "), 2188); - assertNull(res[777].firstMatch("abcd1234"), 2189); - assertNull(res[777].firstMatch("1234 "), 2190); - assertToStringEquals("a4", res[778].firstMatch("a45"), 2191); - assertToStringEquals("b9", res[778].firstMatch("b93"), 2192); - assertToStringEquals("c9", res[778].firstMatch("c99z"), 2193); - assertToStringEquals("d0", res[778].firstMatch("d04"), 2194); - assertToStringEquals("abcd1", res[778].firstMatch("abcd1234"), 2195); - assertToStringEquals("1", res[778].firstMatch("1234 "), 2196); - assertNull(res[778].firstMatch("*** Failers"), 2197); - assertNull(res[778].firstMatch("e45"), 2198); - assertNull(res[778].firstMatch("abcd "), 2199); - assertToStringEquals("a4", res[779].firstMatch("a45"), 2200); - assertToStringEquals("b9", res[779].firstMatch("b93"), 2201); - assertToStringEquals("c9", res[779].firstMatch("c99z"), 2202); - assertToStringEquals("d0", res[779].firstMatch("d04"), 2203); - assertToStringEquals("abcd1", res[779].firstMatch("abcd1234"), 2204); - assertNull(res[779].firstMatch("*** Failers"), 2205); - assertNull(res[779].firstMatch("1234 "), 2206); - assertNull(res[779].firstMatch("e45"), 2207); - assertNull(res[779].firstMatch("abcd "), 2208); - assertToStringEquals("aX", res[780].firstMatch("aX"), 2209); - assertToStringEquals("aaX", res[780].firstMatch("aaX "), 2210); - assertToStringEquals("a4", res[781].firstMatch("a45"), 2211); - assertToStringEquals("b9", res[781].firstMatch("b93"), 2212); - assertToStringEquals("c9", res[781].firstMatch("c99z"), 2213); - assertToStringEquals("d0", res[781].firstMatch("d04"), 2214); - assertToStringEquals("1", res[781].firstMatch("1234 "), 2215); - assertNull(res[781].firstMatch("*** Failers"), 2216); - assertNull(res[781].firstMatch("abcd1234"), 2217); - assertNull(res[781].firstMatch("e45"), 2218); - assertToStringEquals("ab4", res[782].firstMatch("ab45"), 2219); - assertToStringEquals("bcd9", res[782].firstMatch("bcd93"), 2220); - assertNull(res[782].firstMatch("*** Failers"), 2221); - assertNull(res[782].firstMatch("1234 "), 2222); - assertNull(res[782].firstMatch("a36 "), 2223); - assertNull(res[782].firstMatch("abcd1234"), 2224); - assertNull(res[782].firstMatch("ee45"), 2225); - assertToStringEquals("abc4,abc", res[783].firstMatch("abc45"), 2226); - assertToStringEquals( - "abcabcabc4,abc", res[783].firstMatch("abcabcabc45"), 2227); - assertToStringEquals("4,", res[783].firstMatch("42xyz "), 2228); - assertNull(res[783].firstMatch("*** Failers"), 2229); - assertToStringEquals("abc4,abc", res[784].firstMatch("abc45"), 2230); - assertToStringEquals( - "abcabcabc4,abc", res[784].firstMatch("abcabcabc45"), 2231); - assertNull(res[784].firstMatch("*** Failers"), 2232); - assertNull(res[784].firstMatch("42xyz "), 2233); - assertToStringEquals("abc4,abc", res[785].firstMatch("abc45"), 2234); - assertToStringEquals("4,", res[785].firstMatch("42xyz "), 2235); - assertNull(res[785].firstMatch("*** Failers"), 2236); - assertNull(res[785].firstMatch("abcabcabc45"), 2237); - assertToStringEquals("abcabc4,abc", res[786].firstMatch("abcabc45"), 2238); - assertToStringEquals( - "abcabcabc4,abc", res[786].firstMatch("abcabcabc45"), 2239); - assertNull(res[786].firstMatch("*** Failers"), 2240); - assertNull(res[786].firstMatch("abcabcabcabc45"), 2241); - assertNull(res[786].firstMatch("abc45"), 2242); - assertNull(res[786].firstMatch("42xyz "), 2243); - assertNull(res[786].firstMatch("1abc2abc3456"), 2244); - assertNull(res[786].firstMatch("1abc2xyz3456 "), 2245); - assertToStringEquals("ab=ab,ab,ab", res[787].firstMatch("ab=ab"), 2246); - assertToStringEquals("ab=ab,ab,ab", res[787].firstMatch("ab=ab"), 2247); - assertNull(res[787].firstMatch("abc"), 2248); - assertNull(res[787].firstMatch("a(b)c"), 2249); - assertNull(res[787].firstMatch("a(b(c))d "), 2250); - assertNull(res[787].firstMatch("*** Failers)"), 2251); - assertNull(res[787].firstMatch("a(b(c)d "), 2252); - assertNull(res[787].firstMatch(">abc>123abc>1(2)3abc>(1(2)3)"), 2259); - assertNull(res[787].firstMatch(""), 2260); - assertNull(res[787].firstMatch(" hij>"), 2261); - assertNull(res[787].firstMatch(" hij>"), 2262); - assertNull(res[787].firstMatch("def> "), 2263); - assertNull(res[787].firstMatch(" "), 2264); - assertNull(res[787].firstMatch("*** Failers"), 2265); - assertNull(res[787].firstMatch("3 "), 2323); - assertNull(res[795].firstMatch("*** Failers "), 2324); - assertNull(res[795].firstMatch("defabcxyz"), 2325); - assertNull(res[796].firstMatch("abP"), 2326); - assertNull(res[796].firstMatch("abcdeP"), 2327); - assertToStringEquals("abcdef", res[796].firstMatch("abcdefP"), 2328); - assertNull(res[796].firstMatch("*** Failers"), 2329); - assertNull(res[796].firstMatch("abxP "), 2330); - assertNull(res[797].firstMatch("aP"), 2331); - assertNull(res[797].firstMatch("aaP"), 2332); - assertNull(res[797].firstMatch("aa2P "), 2333); - assertNull(res[797].firstMatch("aaaP"), 2334); - assertNull(res[797].firstMatch("aaa23P "), 2335); - assertNull(res[797].firstMatch("aaaa12345P"), 2336); - assertToStringEquals("aa0z", res[797].firstMatch("aa0zP"), 2337); - assertToStringEquals( - "aaaa4444444444444z", res[797].firstMatch("aaaa4444444444444zP "), 2338); - assertNull(res[797].firstMatch("*** Failers"), 2339); - assertNull(res[797].firstMatch("azP "), 2340); - assertNull(res[797].firstMatch("aaaaaP "), 2341); - assertNull(res[797].firstMatch("a56P "), 2342); - assertNull( - res[799].firstMatch("adfadadaklhlkalkajhlkjahdfasdfasdfladsfjkjPZ"), - 2343); - assertNull( - res[799].firstMatch("lkjhlkjhlkjhlkjhabbbbbbcdaefabbbbbbbefaPBZ"), 2344); - assertNull(res[799].firstMatch("cdabbbbbbbbPRBZ"), 2345); - assertNull(res[799].firstMatch("efabbbbbbbbbbbbbbbbPRBZ"), 2346); - assertNull(res[799].firstMatch("bbbbbbbbbbbbcdXyasdfadfPRBZ "), 2347); - assertNull(res[799].firstMatch("abc"), 2348); - assertNull(res[799].firstMatch("** Failers"), 2349); - assertNull(res[799].firstMatch("def "), 2350); - assertToStringEquals( - "the quick brown fox", res[800].firstMatch("the quick brown fox"), 2351); - assertNull(res[800].firstMatch("The quick brown FOX"), 2352); - assertToStringEquals("the quick brown fox", - res[800].firstMatch("What do you know about the quick brown fox?"), 2353); - assertNull( - res[800].firstMatch("What do you know about THE QUICK BROWN FOX?"), 2354); - assertToStringEquals( - "the quick brown fox", res[801].firstMatch("the quick brown fox"), 2355); - assertToStringEquals( - "The quick brown FOX", res[801].firstMatch("The quick brown FOX"), 2356); - assertToStringEquals("the quick brown fox", - res[801].firstMatch("What do you know about the quick brown fox?"), 2357); - assertToStringEquals("THE QUICK BROWN FOX", - res[801].firstMatch("What do you know about THE QUICK BROWN FOX?"), 2358); - assertToStringEquals("abcd\x09\n\x0d\x0cae9;\$\\?caxyz", - res[802].firstMatch("abcd\x09\n\x0d\x0cae9;\$\\?caxyz"), 2359); - assertToStringEquals("abxyzpqrrrabbxyyyypqAzz", - res[803].firstMatch("abxyzpqrrrabbxyyyypqAzz"), 2360); - assertToStringEquals("abxyzpqrrrabbxyyyypqAzz", - res[803].firstMatch("abxyzpqrrrabbxyyyypqAzz"), 2361); - assertToStringEquals("aabxyzpqrrrabbxyyyypqAzz", - res[803].firstMatch("aabxyzpqrrrabbxyyyypqAzz"), 2362); - assertToStringEquals("aaabxyzpqrrrabbxyyyypqAzz", - res[803].firstMatch("aaabxyzpqrrrabbxyyyypqAzz"), 2363); - assertToStringEquals("aaaabxyzpqrrrabbxyyyypqAzz", - res[803].firstMatch("aaaabxyzpqrrrabbxyyyypqAzz"), 2364); - assertToStringEquals("abcxyzpqrrrabbxyyyypqAzz", - res[803].firstMatch("abcxyzpqrrrabbxyyyypqAzz"), 2365); - assertToStringEquals("aabcxyzpqrrrabbxyyyypqAzz", - res[803].firstMatch("aabcxyzpqrrrabbxyyyypqAzz"), 2366); - assertToStringEquals("aaabcxyzpqrrrabbxyyyypAzz", - res[803].firstMatch("aaabcxyzpqrrrabbxyyyypAzz"), 2367); - assertToStringEquals("aaabcxyzpqrrrabbxyyyypqAzz", - res[803].firstMatch("aaabcxyzpqrrrabbxyyyypqAzz"), 2368); - assertToStringEquals("aaabcxyzpqrrrabbxyyyypqqAzz", - res[803].firstMatch("aaabcxyzpqrrrabbxyyyypqqAzz"), 2369); - assertToStringEquals("aaabcxyzpqrrrabbxyyyypqqqAzz", - res[803].firstMatch("aaabcxyzpqrrrabbxyyyypqqqAzz"), 2370); - assertToStringEquals("aaabcxyzpqrrrabbxyyyypqqqqAzz", - res[803].firstMatch("aaabcxyzpqrrrabbxyyyypqqqqAzz"), 2371); - assertToStringEquals("aaabcxyzpqrrrabbxyyyypqqqqqAzz", - res[803].firstMatch("aaabcxyzpqrrrabbxyyyypqqqqqAzz"), 2372); - assertToStringEquals("aaabcxyzpqrrrabbxyyyypqqqqqqAzz", - res[803].firstMatch("aaabcxyzpqrrrabbxyyyypqqqqqqAzz"), 2373); - assertToStringEquals("aaaabcxyzpqrrrabbxyyyypqAzz", - res[803].firstMatch("aaaabcxyzpqrrrabbxyyyypqAzz"), 2374); - assertToStringEquals("abxyzzpqrrrabbxyyyypqAzz", - res[803].firstMatch("abxyzzpqrrrabbxyyyypqAzz"), 2375); - assertToStringEquals("aabxyzzzpqrrrabbxyyyypqAzz", - res[803].firstMatch("aabxyzzzpqrrrabbxyyyypqAzz"), 2376); - assertToStringEquals("aaabxyzzzzpqrrrabbxyyyypqAzz", - res[803].firstMatch("aaabxyzzzzpqrrrabbxyyyypqAzz"), 2377); - assertToStringEquals("aaaabxyzzzzpqrrrabbxyyyypqAzz", - res[803].firstMatch("aaaabxyzzzzpqrrrabbxyyyypqAzz"), 2378); - assertToStringEquals("abcxyzzpqrrrabbxyyyypqAzz", - res[803].firstMatch("abcxyzzpqrrrabbxyyyypqAzz"), 2379); - assertToStringEquals("aabcxyzzzpqrrrabbxyyyypqAzz", - res[803].firstMatch("aabcxyzzzpqrrrabbxyyyypqAzz"), 2380); - assertToStringEquals("aaabcxyzzzzpqrrrabbxyyyypqAzz", - res[803].firstMatch("aaabcxyzzzzpqrrrabbxyyyypqAzz"), 2381); - assertToStringEquals("aaaabcxyzzzzpqrrrabbxyyyypqAzz", - res[803].firstMatch("aaaabcxyzzzzpqrrrabbxyyyypqAzz"), 2382); - assertToStringEquals("aaaabcxyzzzzpqrrrabbbxyyyypqAzz", - res[803].firstMatch("aaaabcxyzzzzpqrrrabbbxyyyypqAzz"), 2383); - assertToStringEquals("aaaabcxyzzzzpqrrrabbbxyyyyypqAzz", - res[803].firstMatch("aaaabcxyzzzzpqrrrabbbxyyyyypqAzz"), 2384); - assertToStringEquals("aaabcxyzpqrrrabbxyyyypABzz", - res[803].firstMatch("aaabcxyzpqrrrabbxyyyypABzz"), 2385); - assertToStringEquals("aaabcxyzpqrrrabbxyyyypABBzz", - res[803].firstMatch("aaabcxyzpqrrrabbxyyyypABBzz"), 2386); - assertToStringEquals("aaabxyzpqrrrabbxyyyypqAzz", - res[803].firstMatch(">>>aaabxyzpqrrrabbxyyyypqAzz"), 2387); - assertToStringEquals("aaaabxyzpqrrrabbxyyyypqAzz", - res[803].firstMatch(">aaaabxyzpqrrrabbxyyyypqAzz"), 2388); - assertToStringEquals("abcxyzpqrrrabbxyyyypqAzz", - res[803].firstMatch(">>>>abcxyzpqrrrabbxyyyypqAzz"), 2389); - assertNull(res[803].firstMatch("*** Failers"), 2390); - assertNull(res[803].firstMatch("abxyzpqrrabbxyyyypqAzz"), 2391); - assertNull(res[803].firstMatch("abxyzpqrrrrabbxyyyypqAzz"), 2392); - assertNull(res[803].firstMatch("abxyzpqrrrabxyyyypqAzz"), 2393); - assertNull(res[803].firstMatch("aaaabcxyzzzzpqrrrabbbxyyyyyypqAzz"), 2394); - assertNull(res[803].firstMatch("aaaabcxyzzzzpqrrrabbbxyyypqAzz"), 2395); - assertNull(res[803].firstMatch("aaabcxyzpqrrrabbxyyyypqqqqqqqAzz"), 2396); - assertToStringEquals("abczz,abc", res[804].firstMatch("abczz"), 2397); - assertToStringEquals("abcabczz,abc", res[804].firstMatch("abcabczz"), 2398); - assertNull(res[804].firstMatch("*** Failers"), 2399); - assertNull(res[804].firstMatch("zz"), 2400); - assertNull(res[804].firstMatch("abcabcabczz"), 2401); - assertNull(res[804].firstMatch(">>abczz"), 2402); - assertToStringEquals("bc,b", res[805].firstMatch("bc"), 2403); - assertToStringEquals("bbc,b", res[805].firstMatch("bbc"), 2404); - assertToStringEquals("bbbc,bb", res[805].firstMatch("bbbc"), 2405); - assertToStringEquals("bac,a", res[805].firstMatch("bac"), 2406); - assertToStringEquals("bbac,a", res[805].firstMatch("bbac"), 2407); - assertToStringEquals("aac,a", res[805].firstMatch("aac"), 2408); - assertToStringEquals( - "abbbbbbbbbbbc,bbbbbbbbbbb", res[805].firstMatch("abbbbbbbbbbbc"), 2409); - assertToStringEquals( - "bbbbbbbbbbbac,a", res[805].firstMatch("bbbbbbbbbbbac"), 2410); - assertNull(res[805].firstMatch("*** Failers"), 2411); - assertNull(res[805].firstMatch("aaac"), 2412); - assertNull(res[805].firstMatch("abbbbbbbbbbbac"), 2413); - assertToStringEquals("bc,b", res[806].firstMatch("bc"), 2414); - assertToStringEquals("bbc,bb", res[806].firstMatch("bbc"), 2415); - assertToStringEquals("bbbc,bbb", res[806].firstMatch("bbbc"), 2416); - assertToStringEquals("bac,a", res[806].firstMatch("bac"), 2417); - assertToStringEquals("bbac,a", res[806].firstMatch("bbac"), 2418); - assertToStringEquals("aac,a", res[806].firstMatch("aac"), 2419); - assertToStringEquals( - "abbbbbbbbbbbc,bbbbbbbbbbb", res[806].firstMatch("abbbbbbbbbbbc"), 2420); - assertToStringEquals( - "bbbbbbbbbbbac,a", res[806].firstMatch("bbbbbbbbbbbac"), 2421); - assertNull(res[806].firstMatch("*** Failers"), 2422); - assertNull(res[806].firstMatch("aaac"), 2423); - assertNull(res[806].firstMatch("abbbbbbbbbbbac"), 2424); - assertToStringEquals("bbc,bb", res[806].firstMatch("bbc"), 2425); - assertToStringEquals("babc,ba", res[807].firstMatch("babc"), 2426); - assertToStringEquals("bbabc,ba", res[807].firstMatch("bbabc"), 2427); - assertToStringEquals("bababc,ba", res[807].firstMatch("bababc"), 2428); - assertNull(res[807].firstMatch("*** Failers"), 2429); - assertNull(res[807].firstMatch("bababbc"), 2430); - assertNull(res[807].firstMatch("babababc"), 2431); - assertToStringEquals("babc,ba", res[808].firstMatch("babc"), 2432); - assertToStringEquals("bbabc,ba", res[808].firstMatch("bbabc"), 2433); - assertToStringEquals("bababc,ba", res[808].firstMatch("bababc"), 2434); - assertNull(res[808].firstMatch("*** Failers"), 2435); - assertNull(res[808].firstMatch("bababbc"), 2436); - assertNull(res[808].firstMatch("babababc"), 2437); - assertThrows(() => new RegExp(r"^\\ca\\cA\\c[\\c{\\c:"), 2438); - assertNull(res[808].firstMatch("\x01\x01e;z"), 2439); - assertToStringEquals("a", res[809].firstMatch("athing"), 2440); - assertToStringEquals("b", res[809].firstMatch("bthing"), 2441); - assertToStringEquals("]", res[809].firstMatch("]thing"), 2442); - assertToStringEquals("c", res[809].firstMatch("cthing"), 2443); - assertToStringEquals("d", res[809].firstMatch("dthing"), 2444); - assertToStringEquals("e", res[809].firstMatch("ething"), 2445); - assertNull(res[809].firstMatch("*** Failers"), 2446); - assertNull(res[809].firstMatch("fthing"), 2447); - assertNull(res[809].firstMatch("[thing"), 2448); - assertNull(res[809].firstMatch("\\thing"), 2449); - assertNull(res[810].firstMatch("]thing"), 2450); - assertNull(res[810].firstMatch("cthing"), 2451); - assertNull(res[810].firstMatch("dthing"), 2452); - assertNull(res[810].firstMatch("ething"), 2453); - assertNull(res[810].firstMatch("*** Failers"), 2454); - assertNull(res[810].firstMatch("athing"), 2455); - assertNull(res[810].firstMatch("fthing"), 2456); - assertToStringEquals("f", res[811].firstMatch("fthing"), 2457); - assertToStringEquals("[", res[811].firstMatch("[thing"), 2458); - assertToStringEquals("\\", res[811].firstMatch("\\thing"), 2459); - assertToStringEquals("*", res[811].firstMatch("*** Failers"), 2460); - assertNull(res[811].firstMatch("athing"), 2461); - assertNull(res[811].firstMatch("bthing"), 2462); - assertNull(res[811].firstMatch("]thing"), 2463); - assertNull(res[811].firstMatch("cthing"), 2464); - assertNull(res[811].firstMatch("dthing"), 2465); - assertNull(res[811].firstMatch("ething"), 2466); - assertNull(res[812].firstMatch("athing"), 2467); - assertNull(res[812].firstMatch("fthing"), 2468); - assertNull(res[812].firstMatch("*** Failers"), 2469); - assertNull(res[812].firstMatch("]thing"), 2470); - assertNull(res[812].firstMatch("cthing"), 2471); - assertNull(res[812].firstMatch("dthing"), 2472); - assertNull(res[812].firstMatch("ething"), 2473); - assertNull(res[812].firstMatch("\ufffd"), 2474); - assertNull(res[812].firstMatch("\ufffd"), 2475); - assertToStringEquals("0", res[813].firstMatch("0"), 2476); - assertToStringEquals("1", res[813].firstMatch("1"), 2477); - assertToStringEquals("2", res[813].firstMatch("2"), 2478); - assertToStringEquals("3", res[813].firstMatch("3"), 2479); - assertToStringEquals("4", res[813].firstMatch("4"), 2480); - assertToStringEquals("5", res[813].firstMatch("5"), 2481); - assertToStringEquals("6", res[813].firstMatch("6"), 2482); - assertToStringEquals("7", res[813].firstMatch("7"), 2483); - assertToStringEquals("8", res[813].firstMatch("8"), 2484); - assertToStringEquals("9", res[813].firstMatch("9"), 2485); - assertToStringEquals("10", res[813].firstMatch("10"), 2486); - assertToStringEquals("100", res[813].firstMatch("100"), 2487); - assertNull(res[813].firstMatch("*** Failers"), 2488); - assertNull(res[813].firstMatch("abc"), 2489); - assertToStringEquals("enter", res[814].firstMatch("enter"), 2490); - assertToStringEquals("inter", res[814].firstMatch("inter"), 2491); - assertToStringEquals("uponter", res[814].firstMatch("uponter"), 2492); - assertToStringEquals("xxx0", res[815].firstMatch("xxx0"), 2493); - assertToStringEquals("xxx1234", res[815].firstMatch("xxx1234"), 2494); - assertNull(res[815].firstMatch("*** Failers"), 2495); - assertNull(res[815].firstMatch("xxx"), 2496); - assertToStringEquals("x123", res[816].firstMatch("x123"), 2497); - assertToStringEquals("xx123", res[816].firstMatch("xx123"), 2498); - assertToStringEquals("123456", res[816].firstMatch("123456"), 2499); - assertNull(res[816].firstMatch("*** Failers"), 2500); - assertNull(res[816].firstMatch("123"), 2501); - assertToStringEquals("x1234", res[816].firstMatch("x1234"), 2502); - assertToStringEquals("x123", res[817].firstMatch("x123"), 2503); - assertToStringEquals("xx123", res[817].firstMatch("xx123"), 2504); - assertToStringEquals("123456", res[817].firstMatch("123456"), 2505); - assertNull(res[817].firstMatch("*** Failers"), 2506); - assertNull(res[817].firstMatch("123"), 2507); - assertToStringEquals("x1234", res[817].firstMatch("x1234"), 2508); - assertToStringEquals("abc!pqr=apquxz.ixr.zzz.ac.uk,abc,pqr", - res[818].firstMatch("abc!pqr=apquxz.ixr.zzz.ac.uk"), 2509); - assertNull(res[818].firstMatch("*** Failers"), 2510); - assertNull(res[818].firstMatch("!pqr=apquxz.ixr.zzz.ac.uk"), 2511); - assertNull(res[818].firstMatch("abc!=apquxz.ixr.zzz.ac.uk"), 2512); - assertNull(res[818].firstMatch("abc!pqr=apquxz:ixr.zzz.ac.uk"), 2513); - assertNull(res[818].firstMatch("abc!pqr=apquxz.ixr.zzz.ac.ukk"), 2514); - assertToStringEquals( - ":", res[819].firstMatch("Well, we need a colon: somewhere"), 2515); - assertNull(res[819].firstMatch("*** Fail if we don't"), 2516); - assertToStringEquals("0abc,0abc", res[820].firstMatch("0abc"), 2517); - assertToStringEquals("abc,abc", res[820].firstMatch("abc"), 2518); - assertToStringEquals("fed,fed", res[820].firstMatch("fed"), 2519); - assertToStringEquals("E,E", res[820].firstMatch("E"), 2520); - assertToStringEquals("::,::", res[820].firstMatch("::"), 2521); - assertToStringEquals("5f03:12C0::932e,5f03:12C0::932e", - res[820].firstMatch("5f03:12C0::932e"), 2522); - assertToStringEquals("def,def", res[820].firstMatch("fed def"), 2523); - assertToStringEquals("ff,ff", res[820].firstMatch("Any old stuff"), 2524); - assertNull(res[820].firstMatch("*** Failers"), 2525); - assertNull(res[820].firstMatch("0zzz"), 2526); - assertNull(res[820].firstMatch("gzzz"), 2527); - assertNull(res[820].firstMatch("fed "), 2528); - assertNull(res[820].firstMatch("Any old rubbish"), 2529); - assertToStringEquals(".1.2.3,1,2,3", res[821].firstMatch(".1.2.3"), 2530); - assertToStringEquals( - "A.12.123.0,12,123,0", res[821].firstMatch("A.12.123.0"), 2531); - assertNull(res[821].firstMatch("*** Failers"), 2532); - assertNull(res[821].firstMatch(".1.2.3333"), 2533); - assertNull(res[821].firstMatch("1.2.3"), 2534); - assertNull(res[821].firstMatch("1234.2.3"), 2535); - assertToStringEquals("1 IN SOA non-sp1 non-sp2(,1,non-sp1,non-sp2", - res[822].firstMatch("1 IN SOA non-sp1 non-sp2("), 2536); - assertToStringEquals( - "1 IN SOA non-sp1 non-sp2 (,1,non-sp1,non-sp2", - res[822].firstMatch("1 IN SOA non-sp1 non-sp2 ("), - 2537); - assertNull(res[822].firstMatch("*** Failers"), 2538); - assertNull(res[822].firstMatch("1IN SOA non-sp1 non-sp2("), 2539); - assertToStringEquals("a.,", res[823].firstMatch("a."), 2540); - assertToStringEquals("Z.,", res[823].firstMatch("Z."), 2541); - assertToStringEquals("2.,", res[823].firstMatch("2."), 2542); - assertToStringEquals( - "ab-c.pq-r.,.pq-r", res[823].firstMatch("ab-c.pq-r."), 2543); - assertToStringEquals( - "sxk.zzz.ac.uk.,.uk", res[823].firstMatch("sxk.zzz.ac.uk."), 2544); - assertToStringEquals("x-.y-.,.y-", res[823].firstMatch("x-.y-."), 2545); - assertNull(res[823].firstMatch("*** Failers"), 2546); - assertNull(res[823].firstMatch("-abc.peq."), 2547); - assertToStringEquals("*.a,,,", res[824].firstMatch("*.a"), 2548); - assertToStringEquals("*.b0-a,0-a,,", res[824].firstMatch("*.b0-a"), 2549); - assertToStringEquals( - "*.c3-b.c,3-b,.c,", res[824].firstMatch("*.c3-b.c"), 2550); - assertToStringEquals( - "*.c-a.b-c,-a,.b-c,-c", res[824].firstMatch("*.c-a.b-c"), 2551); - assertNull(res[824].firstMatch("*** Failers"), 2552); - assertNull(res[824].firstMatch("*.0"), 2553); - assertNull(res[824].firstMatch("*.a-"), 2554); - assertNull(res[824].firstMatch("*.a-b.c-"), 2555); - assertNull(res[824].firstMatch("*.c-a.0-c"), 2556); - assertToStringEquals("abde,de,abd,e", res[825].firstMatch("abde"), 2557); - assertToStringEquals("abdf,,abd,f", res[826].firstMatch("abdf"), 2558); - assertToStringEquals("ab,abcd,cd,ab", res[827].firstMatch("abcd"), 2559); - assertToStringEquals("a.b.c.d,.d", res[828].firstMatch("a.b.c.d"), 2560); - assertToStringEquals("A.B.C.D,.D", res[828].firstMatch("A.B.C.D"), 2561); - assertToStringEquals( - "a.b.c.1.2.3.C,.C", res[828].firstMatch("a.b.c.1.2.3.C"), 2562); - assertToStringEquals("\"1234\",", res[829].firstMatch("\"1234\""), 2563); - assertToStringEquals("\"abcd\" ;,;", res[829].firstMatch("\"abcd\" ;"), 2564); - assertToStringEquals( - "\"\" ; rhubarb,; rhubarb", res[829].firstMatch("\"\" ; rhubarb"), 2565); - assertNull(res[829].firstMatch("*** Failers"), 2566); - assertNull(res[829].firstMatch("\"1234\" : things"), 2567); - assertNull(res[830].firstMatch("\\"), 2568); - assertNull(res[830].firstMatch("*** Failers"), 2569); - assertToStringEquals("ab c", res[831].firstMatch("ab c"), 2570); - assertNull(res[831].firstMatch("*** Failers"), 2571); - assertNull(res[831].firstMatch("abc"), 2572); - assertNull(res[831].firstMatch("ab cde"), 2573); - assertToStringEquals("ab c", res[831].firstMatch("ab c"), 2574); - assertNull(res[831].firstMatch("*** Failers"), 2575); - assertNull(res[831].firstMatch("abc"), 2576); - assertNull(res[831].firstMatch("ab cde"), 2577); - assertToStringEquals("a bcd", res[832].firstMatch("a bcd"), 2578); - assertNull(res[832].firstMatch("a b d"), 2579); - assertNull(res[832].firstMatch("*** Failers"), 2580); - assertNull(res[832].firstMatch("abcd"), 2581); - assertNull(res[832].firstMatch("ab d"), 2582); - assertToStringEquals("abcdefhijklm,abc,bc,c,def,ef,f,hij,ij,j,klm,lm,m", - res[833].firstMatch("abcdefhijklm"), 2583); - assertToStringEquals("abcdefhijklm,bc,c,ef,f,ij,j,lm,m", - res[834].firstMatch("abcdefhijklm"), 2584); - assertNull(res[835].firstMatch("a+ Z0+\x08\n\x1d\x12"), 2585); - assertNull(res[835].firstMatch(".^\$(*+)|{?,?}"), 2586); - assertToStringEquals("z", res[836].firstMatch("z"), 2587); - assertToStringEquals("az", res[836].firstMatch("az"), 2588); - assertToStringEquals("aaaz", res[836].firstMatch("aaaz"), 2589); - assertToStringEquals("a", res[836].firstMatch("a"), 2590); - assertToStringEquals("aa", res[836].firstMatch("aa"), 2591); - assertToStringEquals("aaaa", res[836].firstMatch("aaaa"), 2592); - assertToStringEquals("a", res[836].firstMatch("a+"), 2593); - assertToStringEquals("aa", res[836].firstMatch("aa+"), 2594); - assertToStringEquals("z", res[837].firstMatch("z"), 2595); - assertToStringEquals("a", res[837].firstMatch("az"), 2596); - assertToStringEquals("a", res[837].firstMatch("aaaz"), 2597); - assertToStringEquals("a", res[837].firstMatch("a"), 2598); - assertToStringEquals("a", res[837].firstMatch("aa"), 2599); - assertToStringEquals("a", res[837].firstMatch("aaaa"), 2600); - assertToStringEquals("a", res[837].firstMatch("a+"), 2601); - assertToStringEquals("a", res[837].firstMatch("aa+"), 2602); - assertToStringEquals("az", res[838].firstMatch("az"), 2603); - assertToStringEquals("aaaz", res[838].firstMatch("aaaz"), 2604); - assertToStringEquals("aa", res[838].firstMatch("aa"), 2605); - assertToStringEquals("aaaa", res[838].firstMatch("aaaa"), 2606); - assertToStringEquals("aa", res[838].firstMatch("aa+"), 2607); - assertToStringEquals("az", res[839].firstMatch("az"), 2608); - assertToStringEquals("aa", res[839].firstMatch("aaaz"), 2609); - assertToStringEquals("aa", res[839].firstMatch("aa"), 2610); - assertToStringEquals("aa", res[839].firstMatch("aaaa"), 2611); - assertToStringEquals("aa", res[839].firstMatch("aa+"), 2612); - assertToStringEquals("1234567890", res[840].firstMatch("1234567890"), 2613); - assertToStringEquals("12345678ab", res[840].firstMatch("12345678ab"), 2614); - assertToStringEquals("12345678__", res[840].firstMatch("12345678__"), 2615); - assertNull(res[840].firstMatch("*** Failers"), 2616); - assertNull(res[840].firstMatch("1234567"), 2617); - assertToStringEquals("uoie", res[841].firstMatch("uoie"), 2618); - assertToStringEquals("1234", res[841].firstMatch("1234"), 2619); - assertToStringEquals("12345", res[841].firstMatch("12345"), 2620); - assertToStringEquals("aaaaa", res[841].firstMatch("aaaaa"), 2621); - assertNull(res[841].firstMatch("*** Failers"), 2622); - assertNull(res[841].firstMatch("123456"), 2623); - assertToStringEquals("uoie", res[842].firstMatch("uoie"), 2624); - assertToStringEquals("1234", res[842].firstMatch("1234"), 2625); - assertToStringEquals("1234", res[842].firstMatch("12345"), 2626); - assertToStringEquals("aaaa", res[842].firstMatch("aaaaa"), 2627); - assertToStringEquals("1234", res[842].firstMatch("123456"), 2628); - assertToStringEquals("From abcd Mon Sep 01 12:33,abcd", - res[843].firstMatch("From abcd Mon Sep 01 12:33:02 1997"), 2629); - assertToStringEquals("From abcd Mon Sep 01 12:33,Sep ", - res[844].firstMatch("From abcd Mon Sep 01 12:33:02 1997"), 2630); - assertToStringEquals("From abcd Mon Sep 1 12:33,Sep ", - res[844].firstMatch("From abcd Mon Sep 1 12:33:02 1997"), 2631); - assertNull(res[844].firstMatch("*** Failers"), 2632); - assertNull(res[844].firstMatch("From abcd Sep 01 12:33:02 1997"), 2633); - assertNull(res[845].firstMatch("12\n34"), 2634); - assertNull(res[845].firstMatch("12\x0d34"), 2635); - assertToStringEquals( - "brown", res[846].firstMatch("the quick brown\x09 fox"), 2636); - assertToStringEquals("foolish see?,lish see?", - res[847].firstMatch("foobar is foolish see?"), 2637); - assertToStringEquals( - "rowbar etc, etc", res[848].firstMatch("foobar crowbar etc"), 2638); - assertToStringEquals("barrel,rel", res[848].firstMatch("barrel"), 2639); - assertToStringEquals("2barrel,rel", res[848].firstMatch("2barrel"), 2640); - assertToStringEquals("A barrel,rel", res[848].firstMatch("A barrel"), 2641); - assertToStringEquals("abc,abc", res[849].firstMatch("abc456"), 2642); - assertNull(res[849].firstMatch("*** Failers"), 2643); - assertNull(res[849].firstMatch("abc123"), 2644); - assertToStringEquals("1234", res[850].firstMatch("1234"), 2645); - assertToStringEquals("1234", res[851].firstMatch("1234"), 2646); - assertToStringEquals("abcd", res[852].firstMatch("abcd"), 2647); - assertToStringEquals("abcd", res[853].firstMatch("abcd"), 2648); - assertToStringEquals("abc", res[854].firstMatch("the abc"), 2649); - assertNull(res[854].firstMatch("*** Failers"), 2650); - assertNull(res[854].firstMatch("abc"), 2651); - assertToStringEquals("abc", res[855].firstMatch("abc"), 2652); - assertNull(res[855].firstMatch("*** Failers"), 2653); - assertNull(res[855].firstMatch("the abc"), 2654); - assertToStringEquals("aabb,b", res[856].firstMatch("aabbbbb"), 2655); - assertToStringEquals("aabbbbb,abbbbb", res[857].firstMatch("aabbbbb"), 2656); - assertToStringEquals("aa,a", res[858].firstMatch("aabbbbb"), 2657); - assertToStringEquals("aabb,b", res[859].firstMatch("aabbbbb"), 2658); - assertToStringEquals("Alan Other ", - res[860].firstMatch("Alan Other "), 2659); - assertToStringEquals( - "user@dom.ain", res[860].firstMatch(""), 2660); - assertToStringEquals( - "user@dom.ain", res[860].firstMatch("user@dom.ain"), 2661); - assertToStringEquals( - "\"A. Other\" (a comment)", - res[860].firstMatch("\"A. Other\" (a comment)"), - 2662); - assertToStringEquals(" Other (a comment)", - res[860].firstMatch("A. Other (a comment)"), 2663); - assertToStringEquals( - "\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"@x400-re.lay", - res[860].firstMatch( - "\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"@x400-re.lay"), - 2664); - assertToStringEquals("user@some.where", - res[860].firstMatch("A missing angle ", - res[861].firstMatch("Alan Other "), 2668); - assertToStringEquals( - "user@dom.ain", res[861].firstMatch(""), 2669); - assertToStringEquals( - "user@dom.ain", res[861].firstMatch("user@dom.ain"), 2670); - assertToStringEquals( - "\"A. Other\" ", - res[861].firstMatch("\"A. Other\" (a comment)"), - 2671); - assertToStringEquals(" Other ", - res[861].firstMatch("A. Other (a comment)"), 2672); - assertToStringEquals( - "\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"@x400-re.lay", - res[861].firstMatch( - "\"/s=user/ou=host/o=place/prmd=uu.yy/admd= /c=gb/\"@x400-re.lay"), - 2673); - assertToStringEquals("user@some.where", - res[861].firstMatch("A missing angle new RegExp(r"a(?)b"), 2834); - assertNull(res[925].firstMatch("ab "), 2835); - assertToStringEquals("foo table,foo,table", - res[926].firstMatch("Food is on the foo table"), 2836); - assertToStringEquals( - "food is under the bar in the bar,d is under the bar in the ", - res[927].firstMatch("The food is under the bar in the barn."), - 2837); - assertToStringEquals("food is under the bar,d is under the ", - res[928].firstMatch("The food is under the bar in the barn."), 2838); - assertToStringEquals("I have 2 numbers: 53147,I have 2 numbers: 53147,", - res[929].firstMatch("I have 2 numbers: 53147"), 2839); - assertToStringEquals("I have 2 numbers: 53147,I have 2 numbers: 5314,7", - res[930].firstMatch("I have 2 numbers: 53147"), 2840); - assertToStringEquals( - ",,", res[931].firstMatch("I have 2 numbers: 53147"), 2841); - assertToStringEquals("I have 2,I have ,2", - res[932].firstMatch("I have 2 numbers: 53147"), 2842); - assertToStringEquals("I have 2 numbers: 53147,I have 2 numbers: 5314,7", - res[933].firstMatch("I have 2 numbers: 53147"), 2843); - assertToStringEquals("I have 2 numbers: 53147,I have 2 numbers: ,53147", - res[934].firstMatch("I have 2 numbers: 53147"), 2844); - assertToStringEquals("I have 2 numbers: 53147,I have 2 numbers: ,53147", - res[935].firstMatch("I have 2 numbers: 53147"), 2845); - assertToStringEquals("I have 2 numbers: 53147,I have 2 numbers: ,53147", - res[936].firstMatch("I have 2 numbers: 53147"), 2846); - assertToStringEquals("AB", res[937].firstMatch("ABC123"), 2847); - assertToStringEquals(" ", res[937].firstMatch(" "), 2848); - assertToStringEquals("ABC,ABC", res[938].firstMatch("ABC445"), 2849); - assertNull(res[938].firstMatch("*** Failers"), 2850); - assertNull(res[938].firstMatch("ABC123"), 2851); - assertToStringEquals("W46]", res[939].firstMatch("W46]789 "), 2852); - assertToStringEquals("-46]", res[939].firstMatch("-46]789"), 2853); - assertNull(res[939].firstMatch("*** Failers"), 2854); - assertNull(res[939].firstMatch("Wall"), 2855); - assertNull(res[939].firstMatch("Zebra"), 2856); - assertNull(res[939].firstMatch("42"), 2857); - assertNull(res[939].firstMatch("[abcd] "), 2858); - assertNull(res[939].firstMatch("]abcd["), 2859); - assertNull(res[939].firstMatch(" "), 2860); - assertToStringEquals("W", res[940].firstMatch("W46]789 "), 2861); - assertToStringEquals("W", res[940].firstMatch("Wall"), 2862); - assertToStringEquals("Z", res[940].firstMatch("Zebra"), 2863); - assertToStringEquals("X", res[940].firstMatch("Xylophone "), 2864); - assertToStringEquals("4", res[940].firstMatch("42"), 2865); - assertToStringEquals("[", res[940].firstMatch("[abcd] "), 2866); - assertToStringEquals("]", res[940].firstMatch("]abcd["), 2867); - assertToStringEquals("\\", res[940].firstMatch("\\backslash "), 2868); - assertNull(res[940].firstMatch("*** Failers"), 2869); - assertNull(res[940].firstMatch("-46]789"), 2870); - assertNull(res[940].firstMatch("well"), 2871); - assertToStringEquals("01/01/2000", res[941].firstMatch("01/01/2000"), 2872); - assertToStringEquals("01/01/2000", res[941].firstMatch("01/01/2000"), 2872); - assertToStringEquals(",", res[944].firstMatch("bcd"), 2873); - assertToStringEquals(",", res[944].firstMatch("abc"), 2874); - assertToStringEquals(",", res[944].firstMatch("aab "), 2875); - assertToStringEquals(",", res[945].firstMatch("bcd"), 2876); - assertToStringEquals("a,a", res[945].firstMatch("abc"), 2877); - assertToStringEquals("a,a", res[945].firstMatch("aab "), 2878); - assertToStringEquals(",", res[946].firstMatch("bcd"), 2879); - assertToStringEquals("a,a", res[946].firstMatch("abc"), 2880); - assertToStringEquals("aa,a", res[946].firstMatch("aab "), 2881); - assertToStringEquals(",", res[947].firstMatch("bcd"), 2882); - assertToStringEquals("a,a", res[947].firstMatch("abc"), 2883); - assertToStringEquals("aa,a", res[947].firstMatch("aab"), 2884); - assertToStringEquals("aaa,a", res[947].firstMatch("aaa "), 2885); - assertToStringEquals(",", res[948].firstMatch("bcd"), 2886); - assertToStringEquals("a,a", res[948].firstMatch("abc"), 2887); - assertToStringEquals("aa,a", res[948].firstMatch("aab"), 2888); - assertToStringEquals("aaa,a", res[948].firstMatch("aaa"), 2889); - assertToStringEquals("aaaaaaaa,a", res[948].firstMatch("aaaaaaaa "), 2890); - assertNull(res[949].firstMatch("bcd"), 2891); - assertToStringEquals("a,a", res[949].firstMatch("abc"), 2892); - assertToStringEquals("a,a", res[949].firstMatch("aab "), 2893); - assertNull(res[950].firstMatch("bcd"), 2894); - assertToStringEquals("a,a", res[950].firstMatch("abc"), 2895); - assertToStringEquals("aa,a", res[950].firstMatch("aab "), 2896); - assertNull(res[951].firstMatch("bcd"), 2897); - assertToStringEquals("a,a", res[951].firstMatch("abc"), 2898); - assertToStringEquals("aa,a", res[951].firstMatch("aab"), 2899); - assertToStringEquals("aaa,a", res[951].firstMatch("aaa "), 2900); - assertNull(res[952].firstMatch("bcd"), 2901); - assertToStringEquals("a,a", res[952].firstMatch("abc"), 2902); - assertToStringEquals("aa,a", res[952].firstMatch("aab"), 2903); - assertToStringEquals("aaa,a", res[952].firstMatch("aaa"), 2904); - assertToStringEquals("aaaaaaaa,a", res[952].firstMatch("aaaaaaaa "), 2905); - assertToStringEquals( - "bib.gif", res[953].firstMatch("borfle\nbib.gif\nno"), 2906); - assertToStringEquals( - "bib.gif", res[954].firstMatch("borfle\nbib.gif\nno"), 2907); - assertToStringEquals( - "bib.gif", res[955].firstMatch("borfle\nbib.gif\nno"), 2908); - assertToStringEquals( - "bib.gif", res[956].firstMatch("borfle\nbib.gif\nno"), 2909); - assertToStringEquals( - "bib.gif", res[957].firstMatch("borfle\nbib.gif\nno"), 2910); - assertToStringEquals("no", res[958].firstMatch("borfle\nbib.gif\nno"), 2911); - assertToStringEquals( - "borfle", res[959].firstMatch("borfle\nbib.gif\nno"), 2912); - assertToStringEquals("no", res[960].firstMatch("borfle\nbib.gif\nno"), 2913); - assertToStringEquals( - "borfle", res[961].firstMatch("borfle\nbib.gif\nno"), 2914); - assertToStringEquals("", res[962].firstMatch("borfle\nbib.gif\nno\n"), 2915); - assertToStringEquals( - "borfle", res[963].firstMatch("borfle\nbib.gif\nno\n"), 2916); - assertToStringEquals("", res[964].firstMatch("borfle\nbib.gif\nno\n"), 2917); - assertToStringEquals( - "borfle", res[965].firstMatch("borfle\nbib.gif\nno\n"), 2918); - assertToStringEquals( - "1234X,1234X", res[966].firstMatch("abcde\n1234Xyz"), 2919); - assertToStringEquals("B,B", res[966].firstMatch("BarFoo "), 2920); - assertNull(res[966].firstMatch("*** Failers"), 2921); - assertNull(res[966].firstMatch("abcde\nBar "), 2922); - assertToStringEquals( - "1234X,1234X", res[967].firstMatch("abcde\n1234Xyz"), 2923); - assertToStringEquals("B,B", res[967].firstMatch("BarFoo "), 2924); - assertToStringEquals("B,B", res[967].firstMatch("abcde\nBar "), 2925); - assertToStringEquals( - "1234X,1234X", res[968].firstMatch("abcde\n1234Xyz"), 2926); - assertToStringEquals("B,B", res[968].firstMatch("BarFoo "), 2927); - assertNull(res[968].firstMatch("*** Failers"), 2928); - assertNull(res[968].firstMatch("abcde\nBar "), 2929); - assertToStringEquals( - "1234X,1234X", res[969].firstMatch("abcde\n1234Xyz"), 2930); - assertToStringEquals("B,B", res[969].firstMatch("BarFoo "), 2931); - assertToStringEquals("B,B", res[969].firstMatch("abcde\nBar "), 2932); - assertToStringEquals( - "1234X,1234X", res[969].firstMatch("abcde\n1234Xyz"), 2933); - assertToStringEquals("B,B", res[969].firstMatch("BarFoo "), 2934); - assertNull(res[969].firstMatch("*** Failers "), 2935); - assertToStringEquals("B,B", res[969].firstMatch("abcde\nBar "), 2936); - assertToStringEquals( - "1234X,1234X", res[969].firstMatch("abcde\n1234Xyz"), 2937); - assertToStringEquals("B,B", res[969].firstMatch("BarFoo "), 2938); - assertNull(res[969].firstMatch("*** Failers "), 2939); - assertToStringEquals("B,B", res[969].firstMatch("abcde\nBar "), 2940); - assertNull(res[970].firstMatch("**** Failers"), 2941); - assertNull(res[970].firstMatch("abc\nB"), 2942); - assertNull(res[970].firstMatch(" "), 2943); - assertNull(res[970].firstMatch("abc\nB"), 2944); - assertNull(res[970].firstMatch("abc\nB"), 2945); - assertNull(res[970].firstMatch(" "), 2946); - assertNull(res[970].firstMatch("abc\nB"), 2947); - assertNull(res[970].firstMatch("abc\nB"), 2948); - assertToStringEquals("B", res[970].firstMatch("B\n"), 2949); - assertToStringEquals( - "123456654321", res[971].firstMatch("123456654321"), 2950); - assertToStringEquals( - "123456654321", res[972].firstMatch("123456654321 "), 2951); - assertToStringEquals( - "123456654321", res[973].firstMatch("123456654321"), 2952); - assertToStringEquals( - "abcabcabcabc", res[974].firstMatch("abcabcabcabc"), 2953); - assertToStringEquals( - "abcabcabcabc", res[975].firstMatch("abcabcabcabc"), 2954); - assertToStringEquals( - "abcabcabcabc,c", res[976].firstMatch("abcabcabcabc "), 2955); - assertToStringEquals("n", res[977].firstMatch("n"), 2956); - assertNull(res[977].firstMatch("*** Failers "), 2957); - assertNull(res[977].firstMatch("z "), 2958); - assertToStringEquals("abcd", res[978].firstMatch("abcd"), 2959); - assertNull(res[978].firstMatch("*** Failers"), 2960); - assertNull(res[978].firstMatch("abce "), 2961); - assertToStringEquals("abe", res[979].firstMatch("abe"), 2962); - assertNull(res[979].firstMatch("*** Failers"), 2963); - assertNull(res[979].firstMatch("abcde "), 2964); - assertToStringEquals("abd,", res[980].firstMatch("abd"), 2965); - assertNull(res[980].firstMatch("*** Failers"), 2966); - assertNull(res[980].firstMatch("abcd "), 2967); - assertToStringEquals("a,", res[981].firstMatch("a"), 2968); - assertToStringEquals("ab,b", res[981].firstMatch("ab"), 2969); - assertToStringEquals("abbbb,bbbb", res[981].firstMatch("abbbb"), 2970); - assertToStringEquals("a,", res[981].firstMatch("*** Failers"), 2971); - assertNull(res[981].firstMatch("bbbbb "), 2972); - assertToStringEquals("abe", res[982].firstMatch("abe"), 2973); - assertNull(res[982].firstMatch("*** Failers"), 2974); - assertNull(res[982].firstMatch("ab1e "), 2975); - assertToStringEquals( - "\"quick\",quick", res[983].firstMatch("the \"quick\" brown fox"), 2976); - assertToStringEquals("\"the \\\"quick\\\" brown fox\", brown fox", - res[983].firstMatch("\"the \\\"quick\\\" brown fox\" "), 2977); - assertToStringEquals("", res[984].firstMatch("abc"), 2978); - assertToStringEquals("", res[985].firstMatch("abc "), 2979); - assertToStringEquals("", res[986].firstMatch("abc "), 2980); - // Dart does not have RegExp literals and thus no translatation of the below. - // assertThrows("var re = //;", 2981); - assertToStringEquals("", res[986].firstMatch("abc"), 2982); - assertToStringEquals("acb", res[988].firstMatch("acb"), 2983); - assertToStringEquals("a\nb", res[988].firstMatch("a\nb"), 2984); - assertToStringEquals("acb", res[989].firstMatch("acb"), 2985); - assertNull(res[989].firstMatch("*** Failers "), 2986); - assertNull(res[989].firstMatch("a\nb "), 2987); - assertToStringEquals("acb", res[990].firstMatch("acb"), 2988); - assertToStringEquals("a\nb", res[990].firstMatch("a\nb "), 2989); - assertToStringEquals("acb", res[991].firstMatch("acb"), 2990); - assertNull(res[991].firstMatch("a\nb "), 2991); - assertToStringEquals("bac,a", res[992].firstMatch("bac"), 2992); - assertToStringEquals("bbac,a", res[992].firstMatch("bbac"), 2993); - assertToStringEquals("bbbac,a", res[992].firstMatch("bbbac"), 2994); - assertToStringEquals("bbbbac,a", res[992].firstMatch("bbbbac"), 2995); - assertToStringEquals("bbbbbac,a", res[992].firstMatch("bbbbbac "), 2996); - assertToStringEquals("bac,a", res[993].firstMatch("bac"), 2997); - assertToStringEquals("bbac,a", res[993].firstMatch("bbac"), 2998); - assertToStringEquals("bbbac,a", res[993].firstMatch("bbbac"), 2999); - assertToStringEquals("bbbbac,a", res[993].firstMatch("bbbbac"), 3000); - assertToStringEquals("bbbbbac,a", res[993].firstMatch("bbbbbac "), 3001); - assertToStringEquals("x", res[994].firstMatch("x\nb\n"), 3002); - assertToStringEquals("x", res[994].firstMatch("a\x08x\n "), 3003); - assertNull(res[995].firstMatch("\x00{ab} "), 3004); - assertToStringEquals("CD,", res[996].firstMatch("CD "), 3005); - assertToStringEquals("CD,", res[997].firstMatch("CD "), 3006); - assertNull(res[997].firstMatch("foo"), 3007); - assertNull(res[997].firstMatch("catfood"), 3008); - assertNull(res[997].firstMatch("arfootle"), 3009); - assertNull(res[997].firstMatch("rfoosh"), 3010); - assertNull(res[997].firstMatch("*** Failers"), 3011); - assertNull(res[997].firstMatch("barfoo"), 3012); - assertNull(res[997].firstMatch("towbarfoo"), 3013); - assertNull(res[997].firstMatch("catfood"), 3014); - assertNull(res[997].firstMatch("*** Failers"), 3015); - assertNull(res[997].firstMatch("foo"), 3016); - assertNull(res[997].firstMatch("barfoo"), 3017); - assertNull(res[997].firstMatch("towbarfoo"), 3018); - assertNull(res[997].firstMatch("fooabar"), 3019); - assertNull(res[997].firstMatch("*** Failers"), 3020); - assertNull(res[997].firstMatch("bar"), 3021); - assertNull(res[997].firstMatch("foobbar"), 3022); - assertNull(res[997].firstMatch(" "), 3023); - assertNull(res[998].firstMatch("abc"), 3024); - assertNull(res[998].firstMatch("*** Failers"), 3025); - assertNull(res[998].firstMatch("abc\n "), 3026); - assertNull(res[998].firstMatch("qqq\nabc"), 3027); - assertNull(res[998].firstMatch("abc\nzzz"), 3028); - assertNull(res[998].firstMatch("qqq\nabc\nzzz"), 3029); - assertNull( - res[998].firstMatch( - "/this/is/a/very/long/line/in/deed/with/very/many/slashes/in/it/you/see/"), - 3030); - assertNull( - res[998].firstMatch( - "/this/is/a/very/long/line/in/deed/with/very/many/slashes/in/and/foo"), - 3031); - assertNull(res[998].firstMatch("1.230003938"), 3032); - assertNull(res[998].firstMatch("1.875000282"), 3033); - assertNull(res[998].firstMatch("*** Failers "), 3034); - assertNull(res[998].firstMatch("1.235 "), 3035); - assertNull( - res[998].firstMatch( - "now is the time for all good men to come to the aid of the party"), - 3036); - assertNull(res[998].firstMatch("*** Failers"), 3037); - assertNull( - res[998].firstMatch("this is not a line with only words and spaces!"), - 3038); - assertToStringEquals("12345a,12345,a", res[999].firstMatch("12345a"), 3039); - assertToStringEquals("12345,1234,5", res[999].firstMatch("12345+ "), 3040); - assertToStringEquals("12345a,12345,a", res[999].firstMatch("12345a"), 3041); - assertNull(res[999].firstMatch("*** Failers"), 3042); - assertToStringEquals("12345,1234,5", res[999].firstMatch("12345+ "), 3043); - assertNull(res[999].firstMatch("aaab"), 3044); - assertNull(res[999].firstMatch("aaab"), 3045); - assertNull(res[999].firstMatch("aaab"), 3046); - assertNull(res[999].firstMatch("aaabbbccc"), 3047); - assertNull(res[999].firstMatch("aaabbbbccccd"), 3048); - assertToStringEquals( - "aaabbbbcccc,ccc", res[1000].firstMatch("aaabbbbccccd"), 3049); - assertToStringEquals( - "abc,b", res[1000].firstMatch("((abc(ade)ufh()()x"), 3050); - assertNull(res[1000].firstMatch(""), 3051); - assertToStringEquals("abc,b", res[1000].firstMatch("(abc)"), 3052); - assertToStringEquals("abc,b", res[1000].firstMatch("(abc(def)xyz)"), 3053); - assertNull(res[1000].firstMatch("*** Failers"), 3054); - assertNull(res[1000].firstMatch("ab"), 3055); - assertNull(res[1000].firstMatch("Ab"), 3056); - assertNull(res[1000].firstMatch("*** Failers "), 3057); - assertNull(res[1000].firstMatch("aB"), 3058); - assertNull(res[1000].firstMatch("AB"), 3059); - assertNull(res[1000].firstMatch(" "), 3060); - assertToStringEquals("bc,b", res[1000].firstMatch("a bcd e"), 3061); - assertNull(res[1000].firstMatch("*** Failers"), 3062); - assertToStringEquals("c,", res[1000].firstMatch("a b cd e"), 3063); - assertToStringEquals("abc,b", res[1000].firstMatch("abcd e "), 3064); - assertToStringEquals("bc,b", res[1000].firstMatch("a bcde "), 3065); - assertToStringEquals("bc,b", res[1000].firstMatch("a bcde f"), 3066); - assertNull(res[1000].firstMatch("*** Failers"), 3067); - assertToStringEquals("abc,b", res[1000].firstMatch("abcdef "), 3068); - assertToStringEquals("abc,b", res[1000].firstMatch("abc"), 3069); - assertToStringEquals("c,", res[1000].firstMatch("aBc"), 3070); - assertNull(res[1000].firstMatch("*** Failers"), 3071); - assertNull(res[1000].firstMatch("abC"), 3072); - assertNull(res[1000].firstMatch("aBC "), 3073); - assertToStringEquals("bc,b", res[1000].firstMatch("Abc"), 3074); - assertToStringEquals("c,", res[1000].firstMatch("ABc"), 3075); - assertNull(res[1000].firstMatch("ABC"), 3076); - assertNull(res[1000].firstMatch("AbC"), 3077); - assertNull(res[1000].firstMatch(""), 3078); - assertToStringEquals("abc,b", res[1000].firstMatch("abc"), 3079); - assertToStringEquals("c,", res[1000].firstMatch("aBc"), 3080); - assertNull(res[1000].firstMatch("*** Failers "), 3081); - assertNull(res[1000].firstMatch("ABC"), 3082); - assertNull(res[1000].firstMatch("abC"), 3083); - assertNull(res[1000].firstMatch("aBC"), 3084); - assertNull(res[1000].firstMatch(""), 3085); - assertToStringEquals("c,", res[1000].firstMatch("aBc"), 3086); - assertToStringEquals("c,", res[1000].firstMatch("aBBc"), 3087); - assertNull(res[1000].firstMatch("*** Failers "), 3088); - assertNull(res[1000].firstMatch("aBC"), 3089); - assertNull(res[1000].firstMatch("aBBC"), 3090); - assertNull(res[1000].firstMatch(""), 3091); - assertToStringEquals("abc,b", res[1000].firstMatch("abcd"), 3092); - assertNull(res[1000].firstMatch("abCd"), 3093); - assertNull(res[1000].firstMatch("*** Failers"), 3094); - assertNull(res[1000].firstMatch("aBCd"), 3095); - assertToStringEquals("abc,b", res[1000].firstMatch("abcD "), 3096); - assertNull(res[1000].firstMatch(""), 3097); - assertNull(res[1000].firstMatch("more than million"), 3098); - assertNull(res[1000].firstMatch("more than MILLION"), 3099); - assertNull(res[1000].firstMatch("more \n than Million "), 3100); - assertNull(res[1000].firstMatch("*** Failers"), 3101); - assertNull(res[1000].firstMatch("MORE THAN MILLION "), 3102); - assertNull(res[1000].firstMatch("more \n than \n million "), 3103); - assertNull(res[1000].firstMatch("more than million"), 3104); - assertNull(res[1000].firstMatch("more than MILLION"), 3105); - assertNull(res[1000].firstMatch("more \n than Million "), 3106); - assertNull(res[1000].firstMatch("*** Failers"), 3107); - assertNull(res[1000].firstMatch("MORE THAN MILLION "), 3108); - assertNull(res[1000].firstMatch("more \n than \n million "), 3109); - assertNull(res[1000].firstMatch(""), 3110); - assertToStringEquals("abc,b", res[1000].firstMatch("abc"), 3111); - assertToStringEquals("bc,b", res[1000].firstMatch("aBbc"), 3112); - assertToStringEquals("c,", res[1000].firstMatch("aBBc "), 3113); - assertNull(res[1000].firstMatch("*** Failers"), 3114); - assertToStringEquals("bc,b", res[1000].firstMatch("Abc"), 3115); - assertNull(res[1000].firstMatch("abAb "), 3116); - assertNull(res[1000].firstMatch("abbC "), 3117); - assertNull(res[1000].firstMatch(""), 3118); - assertToStringEquals("abc,b", res[1000].firstMatch("abc"), 3119); - assertToStringEquals("c,", res[1000].firstMatch("aBc"), 3120); - assertNull(res[1000].firstMatch("*** Failers"), 3121); - assertNull(res[1000].firstMatch("Ab "), 3122); - assertNull(res[1000].firstMatch("abC"), 3123); - assertNull(res[1000].firstMatch("aBC "), 3124); - assertNull(res[1000].firstMatch(""), 3125); - assertToStringEquals("c,", res[1000].firstMatch("abxxc"), 3126); - assertToStringEquals("c,", res[1000].firstMatch("aBxxc"), 3127); - assertNull(res[1000].firstMatch("*** Failers"), 3128); - assertToStringEquals("c,", res[1000].firstMatch("Abxxc"), 3129); - assertToStringEquals("c,", res[1000].firstMatch("ABxxc"), 3130); - assertNull(res[1000].firstMatch("abxxC "), 3131); - assertToStringEquals("abc,b", res[1000].firstMatch("abc:"), 3132); - assertNull(res[1000].firstMatch("12"), 3133); - assertNull(res[1000].firstMatch("*** Failers"), 3134); - assertNull(res[1000].firstMatch("123"), 3135); - assertNull(res[1000].firstMatch("xyz "), 3136); - assertToStringEquals("abc,b", res[1000].firstMatch("abc:"), 3137); - assertNull(res[1000].firstMatch("12"), 3138); - assertNull(res[1000].firstMatch("*** Failers"), 3139); - assertNull(res[1000].firstMatch("123"), 3140); - assertNull(res[1000].firstMatch("xyz "), 3141); - assertNull(res[1000].firstMatch(""), 3142); - assertNull(res[1000].firstMatch("foobar"), 3143); - assertToStringEquals("c,", res[1000].firstMatch("cat"), 3144); - assertToStringEquals("c,", res[1000].firstMatch("fcat"), 3145); - assertToStringEquals("c,", res[1000].firstMatch("focat "), 3146); - assertNull(res[1000].firstMatch("*** Failers"), 3147); - assertToStringEquals("c,", res[1000].firstMatch("foocat "), 3148); - assertNull(res[1000].firstMatch("foobar"), 3149); - assertToStringEquals("c,", res[1000].firstMatch("cat"), 3150); - assertToStringEquals("c,", res[1000].firstMatch("fcat"), 3151); - assertToStringEquals("c,", res[1000].firstMatch("focat "), 3152); - assertNull(res[1000].firstMatch("*** Failers"), 3153); - assertToStringEquals("c,", res[1000].firstMatch("foocat "), 3154); - assertNull(res[1000].firstMatch("a"), 3155); - assertNull(res[1000].firstMatch("aa"), 3156); - assertNull(res[1000].firstMatch("aaaa"), 3157); - assertNull(res[1000].firstMatch(""), 3158); - assertToStringEquals("abc,abc", res[1001].firstMatch("abc"), 3159); - assertToStringEquals("abcabc,abc", res[1001].firstMatch("abcabc"), 3160); - assertToStringEquals( - "abcabcabc,abc", res[1001].firstMatch("abcabcabc"), 3161); - assertToStringEquals(",", res[1001].firstMatch("xyz "), 3162); - assertToStringEquals("a,a", res[1002].firstMatch("a"), 3163); - assertToStringEquals("aaaaa,aaaaa", res[1002].firstMatch("aaaaa "), 3164); - assertToStringEquals("a,a", res[1003].firstMatch("a"), 3165); - assertToStringEquals("b,b", res[1003].firstMatch("b"), 3166); - assertToStringEquals("ababab,ababab", res[1003].firstMatch("ababab"), 3167); - assertToStringEquals("aaaab,aaaab", res[1003].firstMatch("aaaabcde"), 3168); - assertToStringEquals("bbbb,bbbb", res[1003].firstMatch("bbbb "), 3169); - assertToStringEquals("b,b", res[1004].firstMatch("b"), 3170); - assertToStringEquals("bbbb,bbbb", res[1004].firstMatch("bbbb"), 3171); - assertToStringEquals(",", res[1004].firstMatch("aaa "), 3172); - assertToStringEquals("cccc,cccc", res[1005].firstMatch("cccc"), 3173); - assertToStringEquals(",", res[1005].firstMatch("abab "), 3174); - assertToStringEquals("a,a", res[1006].firstMatch("a"), 3175); - assertToStringEquals("aaaa,a", res[1006].firstMatch("aaaa "), 3176); - assertToStringEquals("a,a", res[1007].firstMatch("a"), 3177); - assertToStringEquals("b,b", res[1007].firstMatch("b"), 3178); - assertToStringEquals("abab,b", res[1007].firstMatch("abab"), 3179); - assertToStringEquals("baba,a", res[1007].firstMatch("baba "), 3180); - assertToStringEquals("b,b", res[1008].firstMatch("b"), 3181); - assertToStringEquals("bbbb,b", res[1008].firstMatch("bbbb"), 3182); - assertToStringEquals(",", res[1008].firstMatch("aaa "), 3183); - assertToStringEquals("c,c", res[1009].firstMatch("c"), 3184); - assertToStringEquals("cccc,c", res[1009].firstMatch("cccc"), 3185); - assertToStringEquals(",", res[1009].firstMatch("baba "), 3186); - assertToStringEquals(",", res[1009].firstMatch("a"), 3187); - assertToStringEquals(",", res[1009].firstMatch("aaabcde "), 3188); - assertToStringEquals(",", res[1009].firstMatch("aaaaa"), 3189); - assertToStringEquals(",", res[1009].firstMatch("aabbaa "), 3190); - assertToStringEquals(",", res[1009].firstMatch("aaaaa"), 3191); - assertToStringEquals(",", res[1009].firstMatch("aabbaa "), 3192); - assertToStringEquals("12-sep-98,8", res[1009].firstMatch("12-sep-98"), 3193); - assertToStringEquals("12-09-98,8", res[1009].firstMatch("12-09-98"), 3194); - assertToStringEquals("*** F,F", res[1009].firstMatch("*** Failers"), 3195); - assertToStringEquals("sep-12-98,8", res[1009].firstMatch("sep-12-98"), 3196); - assertToStringEquals(" , ", res[1009].firstMatch(" "), 3197); - assertToStringEquals("s,s", res[1009].firstMatch("saturday"), 3198); - assertToStringEquals("sund,d", res[1009].firstMatch("sunday"), 3199); - assertToStringEquals("S,S", res[1009].firstMatch("Saturday"), 3200); - assertToStringEquals("Sund,d", res[1009].firstMatch("Sunday"), 3201); - assertToStringEquals("SATURDAY,Y", res[1009].firstMatch("SATURDAY"), 3202); - assertToStringEquals("SUNDAY,Y", res[1009].firstMatch("SUNDAY"), 3203); - assertToStringEquals("SunD,D", res[1009].firstMatch("SunDay"), 3204); - assertToStringEquals(",", res[1009].firstMatch("abcx"), 3205); - assertToStringEquals(",", res[1009].firstMatch("aBCx"), 3206); - assertToStringEquals(",", res[1009].firstMatch("bbx"), 3207); - assertToStringEquals("BBx,x", res[1009].firstMatch("BBx"), 3208); - assertToStringEquals("*** F,F", res[1009].firstMatch("*** Failers"), 3209); - assertToStringEquals(",", res[1009].firstMatch("abcX"), 3210); - assertToStringEquals(",", res[1009].firstMatch("aBCX"), 3211); - assertToStringEquals(",", res[1009].firstMatch("bbX"), 3212); - assertToStringEquals( - "BBX , ", res[1009].firstMatch("BBX "), 3213); - assertToStringEquals(",", res[1009].firstMatch("ac"), 3214); - assertToStringEquals(",", res[1009].firstMatch("aC"), 3215); - assertToStringEquals(",", res[1009].firstMatch("bD"), 3216); - assertToStringEquals("eleph,h", res[1009].firstMatch("elephant"), 3217); - assertToStringEquals("Europe , ", res[1009].firstMatch("Europe "), 3218); - assertToStringEquals("frog,g", res[1009].firstMatch("frog"), 3219); - assertToStringEquals("Fr,r", res[1009].firstMatch("France"), 3220); - assertToStringEquals("*** F,F", res[1009].firstMatch("*** Failers"), 3221); - assertToStringEquals("Afric,c", res[1009].firstMatch("Africa "), 3222); - assertToStringEquals(",", res[1009].firstMatch("ab"), 3223); - assertToStringEquals(",", res[1009].firstMatch("aBd"), 3224); - assertToStringEquals("xy,y", res[1009].firstMatch("xy"), 3225); - assertToStringEquals("xY,Y", res[1009].firstMatch("xY"), 3226); - assertToStringEquals("ze,e", res[1009].firstMatch("zebra"), 3227); - assertToStringEquals("Z,Z", res[1009].firstMatch("Zambesi"), 3228); - assertToStringEquals("*** F,F", res[1009].firstMatch("*** Failers"), 3229); - assertToStringEquals(",", res[1009].firstMatch("aCD "), 3230); - assertToStringEquals("XY , ", res[1009].firstMatch("XY "), 3231); - assertToStringEquals("foo\n,\n", res[1009].firstMatch("foo\nbar"), 3232); - assertToStringEquals("*** F,F", res[1009].firstMatch("*** Failers"), 3233); - assertToStringEquals(",", res[1009].firstMatch("bar"), 3234); - assertToStringEquals(",", res[1009].firstMatch("baz\nbar "), 3235); - assertToStringEquals(",", res[1009].firstMatch("barbaz"), 3236); - assertToStringEquals(",", res[1009].firstMatch("barbarbaz "), 3237); - assertToStringEquals("koo,o", res[1009].firstMatch("koobarbaz "), 3238); - assertToStringEquals("*** F,F", res[1009].firstMatch("*** Failers"), 3239); - assertToStringEquals(",", res[1009].firstMatch("baz"), 3240); - assertToStringEquals("foo,o", res[1009].firstMatch("foobarbaz "), 3241); - assertToStringEquals("abc", res[1012].firstMatch("abc"), 3242); - assertToStringEquals("abc", res[1012].firstMatch("xabcy"), 3243); - assertToStringEquals("abc", res[1012].firstMatch("ababc"), 3244); - assertNull(res[1012].firstMatch("*** Failers"), 3245); - assertNull(res[1012].firstMatch("xbc"), 3246); - assertNull(res[1012].firstMatch("axc"), 3247); - assertNull(res[1012].firstMatch("abx"), 3248); - assertToStringEquals("abc", res[1013].firstMatch("abc"), 3249); - assertToStringEquals("abc", res[1014].firstMatch("abc"), 3250); - assertToStringEquals("abbc", res[1014].firstMatch("abbc"), 3251); - assertToStringEquals("abbbbc", res[1014].firstMatch("abbbbc"), 3252); - assertToStringEquals("a", res[1015].firstMatch("abbbbc"), 3253); - assertToStringEquals("abbb", res[1016].firstMatch("abbbbc"), 3254); - assertToStringEquals("abbbbc", res[1017].firstMatch("abbbbc"), 3255); - assertToStringEquals("abbc", res[1018].firstMatch("abbc"), 3256); - assertNull(res[1018].firstMatch("*** Failers"), 3257); - assertNull(res[1018].firstMatch("abc"), 3258); - assertNull(res[1018].firstMatch("abq"), 3259); - assertToStringEquals("abbbbc", res[1020].firstMatch("abbbbc"), 3260); - assertToStringEquals("abbbbc", res[1021].firstMatch("abbbbc"), 3261); - assertToStringEquals("abbbbc", res[1022].firstMatch("abbbbc"), 3262); - assertToStringEquals("abbbbc", res[1023].firstMatch("abbbbc"), 3263); - assertNull(res[1024].firstMatch("*** Failers"), 3264); - assertNull(res[1024].firstMatch("abq"), 3265); - assertNull(res[1024].firstMatch("abbbbc"), 3266); - assertToStringEquals("abbc", res[1025].firstMatch("abbc"), 3267); - assertToStringEquals("abc", res[1025].firstMatch("abc"), 3268); - assertToStringEquals("abc", res[1026].firstMatch("abc"), 3269); - assertToStringEquals("abc", res[1028].firstMatch("abc"), 3270); - assertToStringEquals("abc", res[1029].firstMatch("abc"), 3271); - assertToStringEquals("abc", res[1030].firstMatch("abc"), 3272); - assertNull(res[1030].firstMatch("*** Failers"), 3273); - assertNull(res[1030].firstMatch("abbbbc"), 3274); - assertNull(res[1030].firstMatch("abcc"), 3275); - assertToStringEquals("abc", res[1031].firstMatch("abcc"), 3276); - assertToStringEquals("abc", res[1033].firstMatch("aabc"), 3277); - assertNull(res[1033].firstMatch("*** Failers"), 3278); - assertToStringEquals("abc", res[1033].firstMatch("aabc"), 3279); - assertNull(res[1033].firstMatch("aabcd"), 3280); - assertToStringEquals("", res[1034].firstMatch("abc"), 3281); - assertToStringEquals("", res[1035].firstMatch("abc"), 3282); - assertToStringEquals("abc", res[1036].firstMatch("abc"), 3283); - assertToStringEquals("axc", res[1036].firstMatch("axc"), 3284); - assertToStringEquals("axyzc", res[1037].firstMatch("axyzc"), 3285); - assertToStringEquals("abd", res[1038].firstMatch("abd"), 3286); - assertNull(res[1038].firstMatch("*** Failers"), 3287); - assertNull(res[1038].firstMatch("axyzd"), 3288); - assertNull(res[1038].firstMatch("abc"), 3289); - assertToStringEquals("ace", res[1039].firstMatch("ace"), 3290); - assertToStringEquals("ac", res[1040].firstMatch("aac"), 3291); - assertToStringEquals("a-", res[1041].firstMatch("a-"), 3292); - assertToStringEquals("a-", res[1042].firstMatch("a-"), 3293); - assertToStringEquals("a]", res[1043].firstMatch("a]"), 3294); - assertNull(res[1044].firstMatch("a]b"), 3295); - assertToStringEquals("aed", res[1045].firstMatch("aed"), 3296); - assertNull(res[1045].firstMatch("*** Failers"), 3297); - assertNull(res[1045].firstMatch("abd"), 3298); - assertNull(res[1045].firstMatch("abd"), 3299); - assertToStringEquals("adc", res[1046].firstMatch("adc"), 3300); - assertNull(res[1047].firstMatch("adc"), 3301); - assertNull(res[1047].firstMatch("*** Failers"), 3302); - assertNull(res[1047].firstMatch("a-c"), 3303); - assertNull(res[1047].firstMatch("a]c"), 3304); - assertToStringEquals("a", res[1048].firstMatch("a-"), 3305); - assertToStringEquals("a", res[1048].firstMatch("-a"), 3306); - assertToStringEquals("a", res[1048].firstMatch("-a-"), 3307); - assertNull(res[1049].firstMatch("*** Failers"), 3308); - assertNull(res[1049].firstMatch("xy"), 3309); - assertNull(res[1049].firstMatch("yz"), 3310); - assertNull(res[1049].firstMatch("xyz"), 3311); - assertToStringEquals("a", res[1050].firstMatch("*** Failers"), 3312); - assertNull(res[1050].firstMatch("a-"), 3313); - assertNull(res[1050].firstMatch("-a"), 3314); - assertNull(res[1050].firstMatch("-a-"), 3315); - assertToStringEquals("y", res[1051].firstMatch("xy"), 3316); - assertToStringEquals("y", res[1052].firstMatch("yz"), 3317); - assertToStringEquals("y", res[1053].firstMatch("xyz"), 3318); - assertToStringEquals("a", res[1054].firstMatch("a"), 3319); - assertToStringEquals("-", res[1055].firstMatch("-"), 3320); - assertToStringEquals("*", res[1055].firstMatch("*** Failers"), 3321); - assertToStringEquals("-", res[1055].firstMatch("-"), 3322); - assertNull(res[1055].firstMatch("a"), 3323); - assertToStringEquals("a b", res[1056].firstMatch("a b"), 3324); - assertToStringEquals("a-b", res[1057].firstMatch("a-b"), 3325); - assertNull(res[1057].firstMatch("*** Failers"), 3326); - assertToStringEquals("a-b", res[1057].firstMatch("a-b"), 3327); - assertNull(res[1057].firstMatch("a b"), 3328); - assertToStringEquals("1", res[1058].firstMatch("1"), 3329); - assertToStringEquals("-", res[1059].firstMatch("-"), 3330); - assertToStringEquals("*", res[1059].firstMatch("*** Failers"), 3331); - assertToStringEquals("-", res[1059].firstMatch("-"), 3332); - assertNull(res[1059].firstMatch("1"), 3333); - assertToStringEquals("a", res[1060].firstMatch("a"), 3334); - assertToStringEquals("-", res[1061].firstMatch("-"), 3335); - assertToStringEquals("*", res[1061].firstMatch("*** Failers"), 3336); - assertToStringEquals("-", res[1061].firstMatch("-"), 3337); - assertNull(res[1061].firstMatch("a"), 3338); - assertToStringEquals("a b", res[1062].firstMatch("a b"), 3339); - assertToStringEquals("a-b", res[1063].firstMatch("a-b"), 3340); - assertNull(res[1063].firstMatch("*** Failers"), 3341); - assertToStringEquals("a-b", res[1063].firstMatch("a-b"), 3342); - assertNull(res[1063].firstMatch("a b"), 3343); - assertToStringEquals("1", res[1064].firstMatch("1"), 3344); - assertToStringEquals("-", res[1065].firstMatch("-"), 3345); - assertToStringEquals("*", res[1065].firstMatch("*** Failers"), 3346); - assertToStringEquals("-", res[1065].firstMatch("-"), 3347); - assertNull(res[1065].firstMatch("1"), 3348); - assertToStringEquals("ab", res[1066].firstMatch("abc"), 3349); - assertToStringEquals("ab", res[1066].firstMatch("abcd"), 3350); - assertToStringEquals("ef,", res[1067].firstMatch("def"), 3351); - assertToStringEquals("a(b", res[1069].firstMatch("a(b"), 3352); - assertNull(res[1069].firstMatch("ab"), 3353); - assertNull(res[1069].firstMatch("a((b"), 3354); - assertNull(res[1070].firstMatch("a\x08"), 3355); - assertToStringEquals("a,a,a", res[1071].firstMatch("abc"), 3356); - assertToStringEquals("abc,a,c", res[1072].firstMatch("abc"), 3357); - assertToStringEquals("abc", res[1073].firstMatch("aabbabc"), 3358); - assertToStringEquals("abc", res[1074].firstMatch("aabbabc"), 3359); - assertToStringEquals("abc", res[1075].firstMatch("abcabc"), 3360); - assertToStringEquals("ab,b", res[1076].firstMatch("ab"), 3361); - assertToStringEquals("ab,b", res[1077].firstMatch("ab"), 3362); - assertToStringEquals("ab,b", res[1078].firstMatch("ab"), 3363); - assertToStringEquals("ab,b", res[1079].firstMatch("ab"), 3364); - assertToStringEquals("a,a", res[1080].firstMatch("ab"), 3365); - assertToStringEquals("a,a", res[1081].firstMatch("ab"), 3366); - assertToStringEquals("cde", res[1082].firstMatch("cde"), 3367); - assertNull(res[1083].firstMatch("*** Failers"), 3368); - assertNull(res[1083].firstMatch("b"), 3369); - assertToStringEquals("abbbcd,c", res[1085].firstMatch("abbbcd"), 3370); - assertToStringEquals("abcd,a", res[1086].firstMatch("abcd"), 3371); - assertToStringEquals("e", res[1087].firstMatch("e"), 3372); - assertToStringEquals("ef,e", res[1088].firstMatch("ef"), 3373); - assertToStringEquals("abcdefg", res[1089].firstMatch("abcdefg"), 3374); - assertToStringEquals("ab", res[1090].firstMatch("xabyabbbz"), 3375); - assertToStringEquals("a", res[1090].firstMatch("xayabbbz"), 3376); - assertToStringEquals("cde,cd", res[1091].firstMatch("abcde"), 3377); - assertToStringEquals("hij", res[1092].firstMatch("hij"), 3378); - assertToStringEquals("ef,", res[1094].firstMatch("abcdef"), 3379); - assertToStringEquals("bcd,b", res[1095].firstMatch("abcd"), 3380); - assertToStringEquals("abc,a", res[1096].firstMatch("abc"), 3381); - assertToStringEquals("abc,bc", res[1097].firstMatch("abc"), 3382); - assertToStringEquals("abcd,bc,d", res[1098].firstMatch("abcd"), 3383); - assertToStringEquals("abcd,bc,d", res[1099].firstMatch("abcd"), 3384); - assertToStringEquals("abcd,b,cd", res[1100].firstMatch("abcd"), 3385); - assertToStringEquals("adcdcde", res[1101].firstMatch("adcdcde"), 3386); - assertNull(res[1102].firstMatch("*** Failers"), 3387); - assertNull(res[1102].firstMatch("abcde"), 3388); - assertNull(res[1102].firstMatch("adcdcde"), 3389); - assertToStringEquals("abc,ab", res[1103].firstMatch("abc"), 3390); - assertToStringEquals("abcd,abc,a,b,d", res[1104].firstMatch("abcd"), 3391); - assertToStringEquals("alpha", res[1105].firstMatch("alpha"), 3392); - assertToStringEquals("bh,", res[1106].firstMatch("abh"), 3393); - assertToStringEquals("effgz,effgz,", res[1107].firstMatch("effgz"), 3394); - assertToStringEquals("ij,ij,j", res[1107].firstMatch("ij"), 3395); - assertToStringEquals("effgz,effgz,", res[1107].firstMatch("reffgz"), 3396); - assertNull(res[1107].firstMatch("*** Failers"), 3397); - assertNull(res[1107].firstMatch("effg"), 3398); - assertNull(res[1107].firstMatch("bcdd"), 3399); - assertToStringEquals( - "a,a,a,a,a,a,a,a,a,a,a", res[1108].firstMatch("a"), 3400); - assertToStringEquals("a,a,a,a,a,a,a,a,a,a", res[1109].firstMatch("a"), 3401); - assertNull(res[1110].firstMatch("*** Failers"), 3402); - assertNull(res[1110].firstMatch("aa"), 3403); - assertNull(res[1110].firstMatch("uh-uh"), 3404); - assertToStringEquals( - "multiple words", res[1111].firstMatch("multiple words, yeah"), 3405); - assertToStringEquals("abcde,ab,de", res[1112].firstMatch("abcde"), 3406); - assertToStringEquals("(a, b),a,b", res[1113].firstMatch("(a, b)"), 3407); - assertToStringEquals("abcd", res[1115].firstMatch("abcd"), 3408); - assertToStringEquals("abcd,bc", res[1116].firstMatch("abcd"), 3409); - assertToStringEquals("ac", res[1117].firstMatch("ac"), 3410); - assertToStringEquals("ABC", res[1118].firstMatch("ABC"), 3411); - assertToStringEquals("ABC", res[1118].firstMatch("XABCY"), 3412); - assertToStringEquals("ABC", res[1118].firstMatch("ABABC"), 3413); - assertNull(res[1118].firstMatch("*** Failers"), 3414); - assertNull(res[1118].firstMatch("aaxabxbaxbbx"), 3415); - assertNull(res[1118].firstMatch("XBC"), 3416); - assertNull(res[1118].firstMatch("AXC"), 3417); - assertNull(res[1118].firstMatch("ABX"), 3418); - assertToStringEquals("ABC", res[1119].firstMatch("ABC"), 3419); - assertToStringEquals("ABC", res[1120].firstMatch("ABC"), 3420); - assertToStringEquals("ABBC", res[1120].firstMatch("ABBC"), 3421); - assertToStringEquals("ABBBBC", res[1121].firstMatch("ABBBBC"), 3422); - assertToStringEquals("ABBBBC", res[1122].firstMatch("ABBBBC"), 3423); - assertToStringEquals("ABBC", res[1123].firstMatch("ABBC"), 3424); - assertNull(res[1124].firstMatch("*** Failers"), 3425); - assertNull(res[1124].firstMatch("ABC"), 3426); - assertNull(res[1124].firstMatch("ABQ"), 3427); - assertToStringEquals("ABBBBC", res[1126].firstMatch("ABBBBC"), 3428); - assertToStringEquals("ABBBBC", res[1127].firstMatch("ABBBBC"), 3429); - assertToStringEquals("ABBBBC", res[1128].firstMatch("ABBBBC"), 3430); - assertToStringEquals("ABBBBC", res[1129].firstMatch("ABBBBC"), 3431); - assertNull(res[1130].firstMatch("*** Failers"), 3432); - assertNull(res[1130].firstMatch("ABQ"), 3433); - assertNull(res[1130].firstMatch("ABBBBC"), 3434); - assertToStringEquals("ABBC", res[1131].firstMatch("ABBC"), 3435); - assertToStringEquals("ABC", res[1131].firstMatch("ABC"), 3436); - assertToStringEquals("ABC", res[1132].firstMatch("ABC"), 3437); - assertToStringEquals("ABC", res[1134].firstMatch("ABC"), 3438); - assertToStringEquals("ABC", res[1135].firstMatch("ABC"), 3439); - assertToStringEquals("ABC", res[1136].firstMatch("ABC"), 3440); - assertNull(res[1136].firstMatch("*** Failers"), 3441); - assertNull(res[1136].firstMatch("ABBBBC"), 3442); - assertNull(res[1136].firstMatch("ABCC"), 3443); - assertToStringEquals("ABC", res[1137].firstMatch("ABCC"), 3444); - assertToStringEquals("ABC", res[1139].firstMatch("AABC"), 3445); - assertToStringEquals("", res[1140].firstMatch("ABC"), 3446); - assertToStringEquals("", res[1141].firstMatch("ABC"), 3447); - assertToStringEquals("ABC", res[1142].firstMatch("ABC"), 3448); - assertToStringEquals("AXC", res[1142].firstMatch("AXC"), 3449); - assertToStringEquals("AXYZC", res[1143].firstMatch("AXYZC"), 3450); - assertNull(res[1144].firstMatch("*** Failers"), 3451); - assertToStringEquals("AABC", res[1144].firstMatch("AABC"), 3452); - assertNull(res[1144].firstMatch("AXYZD"), 3453); - assertToStringEquals("ABD", res[1145].firstMatch("ABD"), 3454); - assertToStringEquals("ACE", res[1146].firstMatch("ACE"), 3455); - assertNull(res[1146].firstMatch("*** Failers"), 3456); - assertNull(res[1146].firstMatch("ABC"), 3457); - assertNull(res[1146].firstMatch("ABD"), 3458); - assertToStringEquals("AC", res[1147].firstMatch("AAC"), 3459); - assertToStringEquals("A-", res[1148].firstMatch("A-"), 3460); - assertToStringEquals("A-", res[1149].firstMatch("A-"), 3461); - assertToStringEquals("A]", res[1150].firstMatch("A]"), 3462); - assertNull(res[1151].firstMatch("A]B"), 3463); - assertToStringEquals("AED", res[1152].firstMatch("AED"), 3464); - assertToStringEquals("ADC", res[1153].firstMatch("ADC"), 3465); - assertNull(res[1153].firstMatch("*** Failers"), 3466); - assertNull(res[1153].firstMatch("ABD"), 3467); - assertNull(res[1153].firstMatch("A-C"), 3468); - assertNull(res[1154].firstMatch("ADC"), 3469); - assertToStringEquals("AB", res[1155].firstMatch("ABC"), 3470); - assertToStringEquals("AB", res[1155].firstMatch("ABCD"), 3471); - assertToStringEquals("EF,", res[1156].firstMatch("DEF"), 3472); - assertNull(res[1157].firstMatch("*** Failers"), 3473); - assertNull(res[1157].firstMatch("A]C"), 3474); - assertNull(res[1157].firstMatch("B"), 3475); - assertToStringEquals("A(B", res[1158].firstMatch("A(B"), 3476); - assertNull(res[1158].firstMatch("AB"), 3477); - assertNull(res[1158].firstMatch("A((B"), 3478); - assertNull(res[1159].firstMatch("AB"), 3479); - assertToStringEquals("A,A,A", res[1160].firstMatch("ABC"), 3480); - assertToStringEquals("ABC,A,C", res[1161].firstMatch("ABC"), 3481); - assertToStringEquals("ABC", res[1162].firstMatch("AABBABC"), 3482); - assertToStringEquals("ABC", res[1163].firstMatch("AABBABC"), 3483); - assertToStringEquals("ABC", res[1164].firstMatch("ABCABC"), 3484); - assertToStringEquals("ABC", res[1165].firstMatch("ABCABC"), 3485); - assertToStringEquals("ABC", res[1166].firstMatch("ABCABC"), 3486); - assertToStringEquals("AB,B", res[1167].firstMatch("AB"), 3487); - assertToStringEquals("AB,B", res[1168].firstMatch("AB"), 3488); - assertToStringEquals("AB,B", res[1169].firstMatch("AB"), 3489); - assertToStringEquals("AB,B", res[1170].firstMatch("AB"), 3490); - assertToStringEquals("A,A", res[1171].firstMatch("AB"), 3491); - assertToStringEquals("A,A", res[1172].firstMatch("AB"), 3492); - assertToStringEquals(",", res[1173].firstMatch("AB"), 3493); - assertToStringEquals("CDE", res[1174].firstMatch("CDE"), 3494); - assertToStringEquals("ABBBCD,C", res[1177].firstMatch("ABBBCD"), 3495); - assertToStringEquals("ABCD,A", res[1178].firstMatch("ABCD"), 3496); - assertToStringEquals("E", res[1179].firstMatch("E"), 3497); - assertToStringEquals("EF,E", res[1180].firstMatch("EF"), 3498); - assertToStringEquals("ABCDEFG", res[1181].firstMatch("ABCDEFG"), 3499); - assertToStringEquals("AB", res[1182].firstMatch("XABYABBBZ"), 3500); - assertToStringEquals("A", res[1182].firstMatch("XAYABBBZ"), 3501); - assertToStringEquals("CDE,CD", res[1183].firstMatch("ABCDE"), 3502); - assertToStringEquals("HIJ", res[1184].firstMatch("HIJ"), 3503); - assertNull(res[1185].firstMatch("ABCDE"), 3504); - assertToStringEquals("EF,", res[1186].firstMatch("ABCDEF"), 3505); - assertToStringEquals("BCD,B", res[1187].firstMatch("ABCD"), 3506); - assertToStringEquals("ABC,A", res[1188].firstMatch("ABC"), 3507); - assertToStringEquals("ABC,BC", res[1189].firstMatch("ABC"), 3508); - assertToStringEquals("ABCD,BC,D", res[1190].firstMatch("ABCD"), 3509); - assertToStringEquals("ABCD,BC,D", res[1191].firstMatch("ABCD"), 3510); - assertToStringEquals("ABCD,B,CD", res[1192].firstMatch("ABCD"), 3511); - assertToStringEquals("ADCDCDE", res[1193].firstMatch("ADCDCDE"), 3512); - assertToStringEquals("ABC,AB", res[1195].firstMatch("ABC"), 3513); - assertToStringEquals("ABCD,ABC,A,B,D", res[1196].firstMatch("ABCD"), 3514); - assertToStringEquals("ALPHA", res[1197].firstMatch("ALPHA"), 3515); - assertToStringEquals("BH,", res[1198].firstMatch("ABH"), 3516); - assertToStringEquals("EFFGZ,EFFGZ,", res[1199].firstMatch("EFFGZ"), 3517); - assertToStringEquals("IJ,IJ,J", res[1199].firstMatch("IJ"), 3518); - assertToStringEquals("EFFGZ,EFFGZ,", res[1199].firstMatch("REFFGZ"), 3519); - assertNull(res[1199].firstMatch("*** Failers"), 3520); - assertNull(res[1199].firstMatch("ADCDCDE"), 3521); - assertNull(res[1199].firstMatch("EFFG"), 3522); - assertNull(res[1199].firstMatch("BCDD"), 3523); - assertToStringEquals( - "A,A,A,A,A,A,A,A,A,A,A", res[1200].firstMatch("A"), 3524); - assertToStringEquals("A,A,A,A,A,A,A,A,A,A", res[1201].firstMatch("A"), 3525); - assertToStringEquals("A,A", res[1202].firstMatch("A"), 3526); - assertToStringEquals("C,C", res[1203].firstMatch("C"), 3527); - assertNull(res[1204].firstMatch("*** Failers"), 3528); - assertNull(res[1204].firstMatch("AA"), 3529); - assertNull(res[1204].firstMatch("UH-UH"), 3530); - assertToStringEquals( - "MULTIPLE WORDS", res[1205].firstMatch("MULTIPLE WORDS, YEAH"), 3531); - assertToStringEquals("ABCDE,AB,DE", res[1206].firstMatch("ABCDE"), 3532); - assertToStringEquals("(A, B),A,B", res[1207].firstMatch("(A, B)"), 3533); - assertToStringEquals("ABCD", res[1209].firstMatch("ABCD"), 3534); - assertToStringEquals("ABCD,BC", res[1210].firstMatch("ABCD"), 3535); - assertToStringEquals("AC", res[1211].firstMatch("AC"), 3536); - assertToStringEquals("ad", res[1212].firstMatch("abad"), 3537); - assertToStringEquals("ad", res[1213].firstMatch("abad"), 3538); - assertToStringEquals("ad", res[1214].firstMatch("abad"), 3539); - assertToStringEquals("ace,e", res[1215].firstMatch("ace"), 3540); - assertToStringEquals("ace,e", res[1216].firstMatch("ace"), 3541); - assertToStringEquals("ace,e", res[1217].firstMatch("ace"), 3542); - assertToStringEquals("acd,d", res[1217].firstMatch("acdbcdbe"), 3543); - assertToStringEquals("acdbcdbe,e", res[1218].firstMatch("acdbcdbe"), 3544); - assertToStringEquals("acdb,b", res[1219].firstMatch("acdbcdbe"), 3545); - assertToStringEquals("acdbcdb,b", res[1220].firstMatch("acdbcdbe"), 3546); - assertToStringEquals("acdbcd,d", res[1221].firstMatch("acdbcdbe"), 3547); - assertToStringEquals("foobar,bar,,bar", res[1222].firstMatch("foobar"), 3548); - assertToStringEquals("acdbcdbe,e", res[1223].firstMatch("acdbcdbe"), 3549); - assertToStringEquals("acdbcdbe,e", res[1224].firstMatch("acdbcdbe"), 3550); - assertToStringEquals("acdbcdbe,e", res[1225].firstMatch("acdbcdbe"), 3551); - assertToStringEquals("acdbcdb,b", res[1226].firstMatch("acdbcdbe"), 3552); - assertToStringEquals("acdbcdbe,e", res[1227].firstMatch("acdbcdbe"), 3553); - assertToStringEquals("acdbcdb,b", res[1228].firstMatch("acdbcdbe"), 3554); - assertToStringEquals("ace,c,e", res[1229].firstMatch("ace"), 3555); - assertToStringEquals("AB,A", res[1230].firstMatch("AB"), 3556); - assertToStringEquals(".,.,", res[1231].firstMatch("."), 3557); - assertToStringEquals("<&", res[1232].firstMatch("<&OUT"), 3558); - assertToStringEquals("foobar,,,,b,a,r", res[1233].firstMatch("foobar"), 3559); - assertToStringEquals(",,,,,,", res[1233].firstMatch("ab"), 3560); - assertToStringEquals(",,,,,,", res[1233].firstMatch("*** Failers"), 3561); - assertToStringEquals(",,,,,,", res[1233].firstMatch("cb"), 3562); - assertToStringEquals(",,,,,,", res[1233].firstMatch("b"), 3563); - assertToStringEquals(",,,,,,", res[1233].firstMatch("ab"), 3564); - assertToStringEquals(",,,,,,", res[1233].firstMatch("b"), 3565); - assertToStringEquals(",,,,,,", res[1233].firstMatch("b"), 3566); - assertToStringEquals("aba", res[1234].firstMatch("aba"), 3567); - assertToStringEquals("a", res[1235].firstMatch("aba"), 3568); - assertToStringEquals(",", res[1236].firstMatch("abc"), 3569); - assertToStringEquals("aax,a", res[1237].firstMatch("aax"), 3570); - assertToStringEquals("aax,a,a", res[1238].firstMatch("aax"), 3571); - assertToStringEquals("aax,a,a", res[1239].firstMatch("aax"), 3572); - assertToStringEquals("ab,", res[1240].firstMatch("cab"), 3573); - assertToStringEquals("ab,", res[1241].firstMatch("cab"), 3574); - assertToStringEquals("ab,", res[1241].firstMatch("ab"), 3575); - assertToStringEquals("ab,", res[1241].firstMatch("ab"), 3576); - assertNull(res[1241].firstMatch("Ab"), 3577); - assertNull(res[1241].firstMatch("Ab"), 3578); - assertNull(res[1241].firstMatch("*** Failers"), 3579); - assertNull(res[1241].firstMatch("cb"), 3580); - assertNull(res[1241].firstMatch("aB"), 3581); - assertToStringEquals("ab,", res[1241].firstMatch("ab"), 3582); - assertToStringEquals("ab,", res[1241].firstMatch("ab"), 3583); - assertNull(res[1241].firstMatch("Ab"), 3584); - assertNull(res[1241].firstMatch("Ab"), 3585); - assertNull(res[1241].firstMatch("*** Failers"), 3586); - assertNull(res[1241].firstMatch("aB"), 3587); - assertNull(res[1241].firstMatch("aB"), 3588); - assertToStringEquals("ab,", res[1241].firstMatch("ab"), 3589); - assertToStringEquals("ab,", res[1241].firstMatch("ab"), 3590); - assertNull(res[1241].firstMatch("aB"), 3591); - assertNull(res[1241].firstMatch("aB"), 3592); - assertNull(res[1241].firstMatch("*** Failers"), 3593); - assertNull(res[1241].firstMatch("aB"), 3594); - assertNull(res[1241].firstMatch("Ab"), 3595); - assertNull(res[1241].firstMatch("aB"), 3596); - assertNull(res[1241].firstMatch("aB"), 3597); - assertNull(res[1241].firstMatch("*** Failers"), 3598); - assertNull(res[1241].firstMatch("Ab"), 3599); - assertNull(res[1241].firstMatch("AB"), 3600); - assertToStringEquals("ab,", res[1241].firstMatch("ab"), 3601); - assertToStringEquals("ab,", res[1241].firstMatch("ab"), 3602); - assertNull(res[1241].firstMatch("aB"), 3603); - assertNull(res[1241].firstMatch("aB"), 3604); - assertNull(res[1241].firstMatch("*** Failers"), 3605); - assertNull(res[1241].firstMatch("AB"), 3606); - assertNull(res[1241].firstMatch("Ab"), 3607); - assertNull(res[1241].firstMatch("aB"), 3608); - assertNull(res[1241].firstMatch("aB"), 3609); - assertNull(res[1241].firstMatch("*** Failers"), 3610); - assertNull(res[1241].firstMatch("Ab"), 3611); - assertNull(res[1241].firstMatch("AB"), 3612); - assertNull(res[1241].firstMatch("*** Failers"), 3613); - assertNull(res[1241].firstMatch("AB"), 3614); - assertNull(res[1241].firstMatch("a\nB"), 3615); - assertNull(res[1241].firstMatch("a\nB"), 3616); - assertToStringEquals("cabbbb", res[1242].firstMatch("cabbbb"), 3617); - assertToStringEquals("caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", - res[1243].firstMatch("caaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"), 3618); - assertToStringEquals( - "foobar1234baz", res[1244].firstMatch("foobar1234baz"), 3619); - assertToStringEquals("x~~,~~", res[1245].firstMatch("x~~"), 3620); - assertToStringEquals("aaac", res[1246].firstMatch("aaac"), 3621); - assertToStringEquals("aaac", res[1247].firstMatch("aaac"), 3622); - assertNull(res[1247].firstMatch("*** Failers"), 3623); - assertNull(res[1247].firstMatch("B\nB"), 3624); - assertNull(res[1247].firstMatch("dbcb"), 3625); - assertNull(res[1247].firstMatch("dbaacb"), 3626); - assertNull(res[1247].firstMatch("dbaacb"), 3627); - assertNull(res[1247].firstMatch("cdaccb"), 3628); - assertNull(res[1248].firstMatch("*** Failers"), 3629); - assertNull(res[1248].firstMatch("dbcb"), 3630); - assertNull(res[1248].firstMatch("a--"), 3631); - assertNull(res[1248].firstMatch("a\nb\nc\n"), 3632); - assertNull(res[1248].firstMatch("a\nb\nc\n"), 3633); - assertNull(res[1248].firstMatch("a\nb\n"), 3634); - assertNull(res[1248].firstMatch("a\nb\n"), 3635); - assertNull(res[1248].firstMatch("a\nb\n"), 3636); - assertNull(res[1248].firstMatch("a\nb\n"), 3637); - assertNull(res[1248].firstMatch("a\nb\nc\n"), 3638); - assertNull(res[1248].firstMatch("a\nb\nc\n"), 3639); - assertNull(res[1248].firstMatch("a\nb\nc\n"), 3640); - assertNull(res[1248].firstMatch("a\nb\nc\n"), 3641); - assertNull(res[1250].firstMatch("*** Failers"), 3642); - assertNull(res[1250].firstMatch("a\nb\nc\n"), 3643); - assertNull(res[1250].firstMatch("a\nb\nc\n"), 3644); - assertNull(res[1250].firstMatch("a\nb\nc\n"), 3645); - assertNull(res[1250].firstMatch("a"), 3646); - assertNull(res[1250].firstMatch("*** Failers"), 3647); - assertNull(res[1250].firstMatch("a"), 3648); - assertNull(res[1250].firstMatch("a"), 3649); - assertNull(res[1250].firstMatch("a"), 3650); - assertToStringEquals("one:,one:", res[1251].firstMatch("one:"), 3651); - assertNull(res[1251].firstMatch("a"), 3652); - assertToStringEquals("abcd,,abcd", res[1252].firstMatch("abcd"), 3653); - assertToStringEquals( - "xy:z:::abcd,xy:z:::,abcd", res[1252].firstMatch("xy:z:::abcd"), 3654); - assertToStringEquals("aexyc,c", res[1253].firstMatch("aexycd"), 3655); - assertToStringEquals("aab,aa", res[1254].firstMatch("caab"), 3656); - assertToStringEquals("abcd,,abcd", res[1255].firstMatch("abcd"), 3657); - assertToStringEquals( - "xy:z:::abcd,xy:z:::,abcd", res[1255].firstMatch("xy:z:::abcd"), 3658); - assertToStringEquals( - "Failers,,Failers", res[1255].firstMatch("*** Failers"), 3659); - assertNull(res[1255].firstMatch("abcd:"), 3660); - assertNull(res[1255].firstMatch("abcd:"), 3661); - assertToStringEquals("aexyc,c", res[1256].firstMatch("aexycd"), 3662); - assertNull(res[1257].firstMatch("aaab"), 3663); - assertToStringEquals(":[,:[", res[1258].firstMatch("a:[b]:"), 3664); - assertToStringEquals("=[,=[", res[1259].firstMatch("a=[b]="), 3665); - assertToStringEquals(".[,.[", res[1260].firstMatch("a.[b]."), 3666); - assertNull(res[1260].firstMatch("aaab"), 3667); - assertNull(res[1260].firstMatch("aaab"), 3668); - assertNull(res[1260].firstMatch("((abc(ade)ufh()()x"), 3669); - assertNull(res[1261].firstMatch("*** Failers"), 3670); - assertNull(res[1261].firstMatch("aaab"), 3671); - assertNull(res[1261].firstMatch("a\nb\n"), 3672); - assertNull(res[1262].firstMatch("a\nb\n"), 3673); - assertNull(res[1264].firstMatch("a\nb"), 3674); - assertNull(res[1265].firstMatch("a\nb"), 3675); - assertNull(res[1265].firstMatch("*** Failers"), 3676); - assertNull(res[1265].firstMatch("alphabetabcd"), 3677); - assertNull(res[1265].firstMatch("endingwxyz"), 3678); - assertNull(res[1265].firstMatch("*** Failers"), 3679); - assertNull( - res[1265] - .firstMatch("a rather long string that doesn't end with one of them"), - 3680); - assertNull( - res[1265].firstMatch( - "word cat dog elephant mussel cow horse canary baboon snake shark otherword"), - 3681); - assertNull( - res[1265].firstMatch( - "word cat dog elephant mussel cow horse canary baboon snake shark"), - 3682); - assertNull( - res[1265].firstMatch( - "word cat dog elephant mussel cow horse canary baboon snake shark the quick brown fox and the lazy dog and several other words getting close to thirty by now I hope"), - 3683); - assertNull(res[1265].firstMatch("999foo"), 3684); - assertNull(res[1265].firstMatch("123999foo "), 3685); - assertNull(res[1265].firstMatch("*** Failers"), 3686); - assertNull(res[1265].firstMatch("123abcfoo"), 3687); - assertNull(res[1265].firstMatch("999foo"), 3688); - assertNull(res[1265].firstMatch("123999foo "), 3689); - assertNull(res[1265].firstMatch("*** Failers"), 3690); - assertNull(res[1265].firstMatch("123abcfoo"), 3691); - assertNull(res[1265].firstMatch("123abcfoo"), 3692); - assertNull(res[1265].firstMatch("123456foo "), 3693); - assertNull(res[1265].firstMatch("*** Failers"), 3694); - assertNull(res[1265].firstMatch("123999foo "), 3695); - assertNull(res[1265].firstMatch("123abcfoo "), 3696); - assertNull(res[1265].firstMatch("123456foo "), 3697); - assertNull(res[1265].firstMatch("*** Failers"), 3698); - assertNull(res[1265].firstMatch("123999foo "), 3699); - assertToStringEquals("ZA,A,", res[1266].firstMatch("ZABCDEFG"), 3700); - assertToStringEquals("ZA,A,", res[1267].firstMatch("ZABCDEFG"), 3701); - assertToStringEquals("ZA,A,,", res[1268].firstMatch("ZABCDEFG"), 3702); - assertToStringEquals("ZA,A,,", res[1268].firstMatch("ZABCDEFG"), 3703); - assertToStringEquals("ZA,A,,", res[1268].firstMatch("ZABCDEFG"), 3704); - assertToStringEquals("a", res[1269].firstMatch("abbab"), 3705); - assertToStringEquals("a", res[1270].firstMatch("abcde"), 3711); - assertToStringEquals("-", res[1270].firstMatch("-things"), 3712); - assertToStringEquals("0", res[1270].firstMatch("0digit"), 3713); - assertNull(res[1270].firstMatch("*** Failers"), 3714); - assertNull(res[1270].firstMatch("bcdef "), 3715); - assertNull(res[1271].firstMatch("> \x09\n\x0c\x0d\x0b<"), 3716); - assertNull(res[1271].firstMatch(" "), 3717); - assertNull(res[1272].firstMatch("> \x09\n\x0c\x0d\x0b<"), 3718); - assertNull(res[1272].firstMatch(" "), 3719); - assertToStringEquals(" \x09\n\x0c\x0d\x0b", - res[1273].firstMatch("> \x09\n\x0c\x0d\x0b<"), 3720); - assertToStringEquals(" ", res[1273].firstMatch(" "), 3721); - assertToStringEquals(" \x09\n\x0c\x0d\x0b", - res[1274].firstMatch("> \x09\n\x0c\x0d\x0b<"), 3722); - assertToStringEquals(" ", res[1274].firstMatch(" "), 3723); - assertNull(res[1275].firstMatch("ab"), 3724); - assertNull(res[1278].firstMatch("abcabcabc"), 3725); - assertNull(res[1278].firstMatch("abc(*+|abc "), 3726); - assertNull(res[1279].firstMatch("abc abcabc"), 3727); - assertNull(res[1279].firstMatch("*** Failers"), 3728); - assertNull(res[1279].firstMatch("abcabcabc "), 3729); - assertNull(res[1280].firstMatch("abc#not comment\n literal "), 3730); - assertNull(res[1281].firstMatch("abc#not comment\n literal "), 3731); - assertNull(res[1282].firstMatch("abc#not comment\n literal "), 3732); - assertNull(res[1283].firstMatch("abc#not comment\n literal "), 3733); - assertNull(res[1284].firstMatch("abc\\\$xyz"), 3734); - assertNull(res[1285].firstMatch("abc\\\$xyz"), 3735); - assertNull(res[1286].firstMatch("abc"), 3736); - assertNull(res[1286].firstMatch("*** Failers"), 3737); - assertNull(res[1286].firstMatch("xyzabc "), 3738); - assertNull(res[1287].firstMatch("abc1abc2xyzabc3"), 3739); - assertToStringEquals("abc1", res[1288].firstMatch("abc1abc2xyzabc3 "), 3740); - assertNull(res[1288].firstMatch("*** Failers "), 3742); - assertNull(res[1288].firstMatch("Xa b c d Y "), 3743); - assertToStringEquals("abcY", res[1288].firstMatch("XabcY"), 3744); - assertNull(res[1288].firstMatch("AxyzB "), 3745); - assertNull(res[1288].firstMatch("XabCY"), 3746); - assertNull(res[1288].firstMatch("*** Failers"), 3747); - assertToStringEquals("abcY", res[1288].firstMatch("XabcY "), 3748); - assertNull(res[1288].firstMatch("abCE"), 3749); - assertNull(res[1288].firstMatch("DE"), 3750); - assertNull(res[1288].firstMatch("*** Failers"), 3751); - assertToStringEquals("abcE", res[1288].firstMatch("abcE"), 3752); - assertNull(res[1288].firstMatch("abCe "), 3753); - assertNull(res[1288].firstMatch("dE"), 3754); - assertNull(res[1288].firstMatch("De "), 3755); - assertNull(res[1289].firstMatch("z"), 3756); - assertNull(res[1289].firstMatch("a"), 3757); - assertNull(res[1289].firstMatch("-"), 3758); - assertNull(res[1289].firstMatch("d"), 3759); - assertNull(res[1289].firstMatch("] "), 3760); - assertNull(res[1289].firstMatch("*** Failers"), 3761); - assertNull(res[1289].firstMatch("b "), 3762); - assertToStringEquals("z", res[1290].firstMatch("z"), 3763); - assertToStringEquals("C", res[1290].firstMatch("C "), 3764); - assertToStringEquals("M", res[1291].firstMatch("M "), 3765); - assertNull(res[1292].firstMatch(""), 3766); - assertNull(res[1292].firstMatch("REGular"), 3767); - assertNull(res[1292].firstMatch("regulaer"), 3768); - assertNull(res[1292].firstMatch("Regex "), 3769); - assertNull(res[1292].firstMatch("regul\ufffdr "), 3770); - assertNull(res[1292].firstMatch("\ufffd\ufffd\ufffd\ufffd\ufffd"), 3771); - assertNull(res[1292].firstMatch("\ufffd\ufffd\ufffd\ufffd\ufffd"), 3772); - assertNull(res[1292].firstMatch("\ufffd\ufffd\ufffd\ufffd\ufffd"), 3773); - assertNull(res[1292].firstMatch("\ufffd\ufffd\ufffd\ufffd\ufffd"), 3774); - assertNull(res[1292].firstMatch("\x84XAZXB"), 3775); - assertNull(res[1292].firstMatch("123a"), 3776); - assertNull(res[1292].firstMatch("ac"), 3777); - assertToStringEquals("b,", res[1292].firstMatch("bbbbc"), 3778); - assertToStringEquals("ab,a", res[1292].firstMatch("abc"), 3779); - assertNull(res[1292].firstMatch("*** Failers"), 3780); - assertToStringEquals("b,", res[1292].firstMatch("bca"), 3781); - assertNull(res[1292].firstMatch(""), 3782); - assertToStringEquals("ab,a", res[1292].firstMatch("abc"), 3783); - assertNull(res[1292].firstMatch("*** Failers"), 3784); - assertToStringEquals("b,", res[1292].firstMatch("bca"), 3785); - assertToStringEquals("ab,a", res[1292].firstMatch("abc"), 3786); - assertNull(res[1292].firstMatch("*** Failers"), 3787); - assertNull(res[1292].firstMatch("def "), 3788); - assertNull(res[1292].firstMatch(""), 3789); - assertToStringEquals("ab,a", res[1292].firstMatch("abc"), 3790); - assertNull(res[1292].firstMatch("*** Failers"), 3791); - assertNull(res[1292].firstMatch("def "), 3792); - assertNull(res[1292].firstMatch(""), 3793); - assertToStringEquals( - "line\nbreak", res[1293].firstMatch("this is a line\nbreak"), 3794); - assertToStringEquals( - "line\nbreak", - res[1293] - .firstMatch("line one\nthis is a line\nbreak in the second line "), - 3795); - assertToStringEquals( - "line\nbreak", res[1294].firstMatch("this is a line\nbreak"), 3796); - assertNull(res[1294].firstMatch("** Failers "), 3797); - assertToStringEquals( - "line\nbreak", - res[1294] - .firstMatch("line one\nthis is a line\nbreak in the second line "), - 3798); - assertToStringEquals( - "line\nbreak", res[1295].firstMatch("this is a line\nbreak"), 3799); - assertNull(res[1295].firstMatch("** Failers "), 3800); - assertToStringEquals( - "line\nbreak", - res[1295] - .firstMatch("line one\nthis is a line\nbreak in the second line "), - 3801); - assertNull(res[1296].firstMatch("123P"), 3802); - assertNull(res[1296].firstMatch("a4PR"), 3803); - assertNull(res[1297].firstMatch("123P"), 3804); - assertNull(res[1297].firstMatch("4PR"), 3805); - assertToStringEquals("", res[1298].firstMatch("a\nb\nc\n"), 3806); - assertToStringEquals("", res[1298].firstMatch(" "), 3807); - assertToStringEquals("", res[1298].firstMatch("A\nC\nC\n "), 3808); - assertToStringEquals("", res[1298].firstMatch("AB"), 3809); - assertToStringEquals("", res[1298].firstMatch("aB "), 3810); - assertToStringEquals("", res[1298].firstMatch("AB"), 3811); - assertToStringEquals("", res[1298].firstMatch("aB "), 3812); - assertToStringEquals("", res[1298].firstMatch("AB"), 3813); - assertToStringEquals("", res[1298].firstMatch("aB "), 3814); - assertToStringEquals("", res[1298].firstMatch("AB"), 3815); - assertToStringEquals("", res[1298].firstMatch("aB "), 3816); - assertToStringEquals("Content-Type:xxxxxyyy ", - res[1299].firstMatch("Content-Type:xxxxxyyy "), 3817); - assertToStringEquals("Content-Type:xxxxxyyyz", - res[1300].firstMatch("Content-Type:xxxxxyyyz"), 3818); - assertToStringEquals("Content-Type:xxxyyy ", - res[1301].firstMatch("Content-Type:xxxyyy "), 3819); - assertToStringEquals("Content-Type:xxxyyyz", - res[1302].firstMatch("Content-Type:xxxyyyz"), 3820); - assertToStringEquals("abc", res[1303].firstMatch("xyz\nabc"), 3821); - assertToStringEquals("abc", res[1303].firstMatch("xyz\nabc"), 3822); - assertToStringEquals("abc", res[1303].firstMatch("xyz\x0d\nabc"), 3823); - assertToStringEquals("abc", res[1303].firstMatch("xyz\x0dabc"), 3824); - assertToStringEquals("abc", res[1303].firstMatch("xyz\x0d\nabc"), 3825); - assertNull(res[1303].firstMatch("** Failers "), 3826); - assertToStringEquals("abc", res[1303].firstMatch("xyz\nabc"), 3827); - assertToStringEquals("abc", res[1303].firstMatch("xyz\x0d\nabc"), 3828); - assertToStringEquals("abc", res[1303].firstMatch("xyz\nabc"), 3829); - assertToStringEquals("abc", res[1303].firstMatch("xyz\x0dabc"), 3830); - assertToStringEquals("abc", res[1303].firstMatch("xyz\x0dabc"), 3831); - assertToStringEquals("abc", res[1304].firstMatch("xyzabc"), 3832); - assertToStringEquals("abc", res[1304].firstMatch("xyzabc\n "), 3833); - assertToStringEquals("abc", res[1304].firstMatch("xyzabc\npqr "), 3834); - assertToStringEquals("abc", res[1304].firstMatch("xyzabc\x0d "), 3835); - assertToStringEquals("abc", res[1304].firstMatch("xyzabc\x0dpqr "), 3836); - assertToStringEquals( - "abc", res[1304].firstMatch("xyzabc\x0d\n "), 3837); - assertToStringEquals( - "abc", res[1304].firstMatch("xyzabc\x0d\npqr "), 3838); - assertNull(res[1304].firstMatch("** Failers"), 3839); - assertToStringEquals("abc", res[1304].firstMatch("xyzabc\x0d "), 3840); - assertToStringEquals("abc", res[1304].firstMatch("xyzabc\x0dpqr "), 3841); - assertToStringEquals("abc", res[1304].firstMatch("xyzabc\x0d\n "), 3842); - assertToStringEquals("abc", res[1304].firstMatch("xyzabc\x0d\npqr "), 3843); - assertToStringEquals("abc", res[1305].firstMatch("xyz\x0dabcdef"), 3844); - assertToStringEquals("abc", res[1305].firstMatch("xyz\nabcdef"), 3845); - assertNull(res[1305].firstMatch("** Failers "), 3846); - assertToStringEquals("abc", res[1305].firstMatch("xyz\nabcdef"), 3847); - assertNull(res[1305].firstMatch(" "), 3848); - assertToStringEquals("abc", res[1306].firstMatch("xyz\nabcdef"), 3849); - assertToStringEquals("abc", res[1306].firstMatch("xyz\x0dabcdef"), 3850); - assertNull(res[1306].firstMatch("** Failers "), 3851); - assertToStringEquals("abc", res[1306].firstMatch("xyz\x0dabcdef"), 3852); - assertNull(res[1306].firstMatch(" "), 3853); - assertToStringEquals("abc", res[1307].firstMatch("xyz\x0d\nabcdef"), 3854); - assertToStringEquals("abc", res[1307].firstMatch("xyz\x0dabcdef"), 3855); - assertNull(res[1307].firstMatch("** Failers "), 3856); - assertToStringEquals("abc", res[1307].firstMatch("xyz\x0dabcdef"), 3857); - assertToStringEquals("abc", res[1308].firstMatch("abc\ndef"), 3858); - assertToStringEquals("abc", res[1308].firstMatch("abc\x0ddef"), 3859); - assertToStringEquals("abc", res[1308].firstMatch("abc\x0d\ndef"), 3860); - assertToStringEquals("abc", res[1308].firstMatch("abc\ndef"), 3861); - assertToStringEquals("abc", res[1308].firstMatch("abc\x0ddef"), 3862); - assertToStringEquals( - "abc", res[1308].firstMatch("abc\x0d\ndef"), 3863); - assertToStringEquals( - "abc", res[1308].firstMatch("abc\ndef"), 3864); - assertToStringEquals( - "abc", res[1308].firstMatch("abc\x0ddef"), 3865); - assertToStringEquals( - "abc", res[1308].firstMatch("abc\x0d\ndef"), 3866); - assertNull(res[1309].firstMatch("abc\ndef"), 3867); - assertNull(res[1309].firstMatch("abc\x0ddef"), 3868); - assertNull(res[1309].firstMatch("abc\x0d\ndef"), 3869); - assertToStringEquals( - "abc=xyz\\,", res[1310].firstMatch("abc=xyz\\\npqr"), 3870); - assertToStringEquals("aaaa,a,", res[1311].firstMatch("aaaa"), 3871); - assertToStringEquals("aaaa", res[1312].firstMatch("aaaa"), 3872); - assertToStringEquals("aaaa,a,", res[1313].firstMatch("aaaa"), 3873); - assertToStringEquals("aaaa", res[1314].firstMatch("aaaa"), 3874); - assertNull(res[1317].firstMatch("a\x0db"), 3875); - assertNull(res[1317].firstMatch("a\nb "), 3876); - assertNull(res[1317].firstMatch("** Failers"), 3877); - assertNull(res[1317].firstMatch("a\nb"), 3878); - assertNull(res[1317].firstMatch("a\nb"), 3879); - assertNull(res[1317].firstMatch("a\x0db "), 3880); - assertNull(res[1317].firstMatch("a\x0db "), 3881); - assertToStringEquals( - "abc1", - res[1318].firstMatch( - "abc1 \nabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\nabc6 \x85abc7 JUNK"), - 3882); - assertToStringEquals( - "abc1", - res[1319].firstMatch( - "abc1\n abc2\x0b abc3\x0c abc4\x0d abc5\x0d\n abc6\x85 abc9"), - 3883); - assertNull(res[1320].firstMatch("a\nb"), 3884); - assertNull(res[1320].firstMatch("a\x0db"), 3885); - assertNull(res[1320].firstMatch("a\x0d\nb"), 3886); - assertNull(res[1320].firstMatch("a\x0bb"), 3887); - assertNull(res[1320].firstMatch("a\x0cb"), 3888); - assertNull(res[1320].firstMatch("a\x85b "), 3889); - assertNull(res[1320].firstMatch("** Failers"), 3890); - assertNull(res[1320].firstMatch("a\n\x0db "), 3891); - assertToStringEquals("ab", res[1321].firstMatch("ab"), 3892); - assertNull(res[1321].firstMatch("a\nb"), 3893); - assertNull(res[1321].firstMatch("a\x0db"), 3894); - assertNull(res[1321].firstMatch("a\x0d\nb"), 3895); - assertNull(res[1321].firstMatch("a\x0bb"), 3896); - assertNull(res[1321].firstMatch("a\x0cb"), 3897); - assertNull(res[1321].firstMatch("a\x85b "), 3898); - assertNull(res[1321].firstMatch("a\n\x0db "), 3899); - assertNull(res[1321].firstMatch("a\n\x0d\x85\x0cb "), 3900); - assertNull(res[1322].firstMatch("a\nb"), 3901); - assertNull(res[1322].firstMatch("a\x0db"), 3902); - assertNull(res[1322].firstMatch("a\x0d\nb"), 3903); - assertNull(res[1322].firstMatch("a\x0bb"), 3904); - assertNull(res[1322].firstMatch("a\x0cb"), 3905); - assertNull(res[1322].firstMatch("a\x85b "), 3906); - assertNull(res[1322].firstMatch("a\n\x0db "), 3907); - assertNull(res[1322].firstMatch("a\n\x0d\x85\x0cb "), 3908); - assertNull(res[1322].firstMatch("** Failers"), 3909); - assertNull(res[1322].firstMatch("ab "), 3910); - assertNull(res[1323].firstMatch("a\nb"), 3911); - assertNull(res[1323].firstMatch("a\n\x0db"), 3912); - assertNull(res[1323].firstMatch("a\n\x0d\x85b"), 3913); - assertNull(res[1323].firstMatch("a\x0d\n\x0d\nb "), 3914); - assertNull(res[1323].firstMatch("a\x0d\n\x0d\n\x0d\nb "), 3915); - assertNull(res[1323].firstMatch("a\n\x0d\n\x0db"), 3916); - assertNull(res[1323].firstMatch("a\n\n\x0d\nb "), 3917); - assertNull(res[1323].firstMatch("** Failers"), 3918); - assertNull(res[1323].firstMatch("a\n\n\n\x0db"), 3919); - assertNull(res[1323].firstMatch("a\x0d"), 3920); - assertToStringEquals("aRb", res[1324].firstMatch("aRb"), 3921); - assertNull(res[1324].firstMatch("** Failers"), 3922); - assertNull(res[1324].firstMatch("a\nb "), 3923); - assertToStringEquals("afoo", res[1325].firstMatch("afoo"), 3924); - assertNull(res[1325].firstMatch("** Failers "), 3925); - assertNull(res[1325].firstMatch("\x0d\nfoo "), 3926); - assertNull(res[1325].firstMatch("\nfoo "), 3927); - assertToStringEquals("afoo", res[1326].firstMatch("afoo"), 3928); - assertNull(res[1326].firstMatch("\nfoo "), 3929); - assertNull(res[1326].firstMatch("** Failers "), 3930); - assertNull(res[1326].firstMatch("\x0d\nfoo "), 3931); - assertToStringEquals("afoo", res[1327].firstMatch("afoo"), 3932); - assertNull(res[1327].firstMatch("** Failers "), 3933); - assertNull(res[1327].firstMatch("\nfoo "), 3934); - assertNull(res[1327].firstMatch("\x0d\nfoo "), 3935); - assertToStringEquals("afoo", res[1328].firstMatch("afoo"), 3936); - assertNull(res[1328].firstMatch("\x0d\nfoo "), 3937); - assertNull(res[1328].firstMatch("\nfoo "), 3938); - assertToStringEquals("", res[1329].firstMatch("abc\x0d\x0dxyz"), 3939); - assertToStringEquals("", res[1329].firstMatch("abc\n\x0dxyz "), 3940); - assertNull(res[1329].firstMatch("** Failers "), 3941); - assertToStringEquals("", res[1329].firstMatch("abc\x0d\nxyz"), 3942); - assertToStringEquals("X", res[1330].firstMatch("XABC"), 3943); - assertNull(res[1330].firstMatch("** Failers "), 3944); - assertToStringEquals("X", res[1330].firstMatch("XABCB"), 3945); - assertNull(res[1330].firstMatch("abc\x0d\n\x0d\n"), 3946); - assertNull(res[1330].firstMatch("abc\x0d\n\x0d\n"), 3947); - assertNull(res[1330].firstMatch("abc\x0d\n\x0d\n"), 3948); - assertThrows(() => new RegExp(r"(?|(abc)|(xyz))"), 3949); - assertThrows(() => new RegExp(r"(x)(?|(abc)|(xyz))(x)"), 3950); - assertNull(res[1330].firstMatch("xabcx"), 3951); - assertNull(res[1330].firstMatch("xxyzx "), 3952); - assertThrows(() => new RegExp(r"(x)(?|(abc)(pqr)|(xyz))(x)"), 3953); - assertNull(res[1330].firstMatch("xabcpqrx"), 3954); - assertNull(res[1330].firstMatch("xxyzx "), 3955); - assertNull(res[1330].firstMatch("abcabc"), 3956); - assertNull(res[1330].firstMatch("xyzabc "), 3957); - assertNull(res[1330].firstMatch("** Failers "), 3958); - assertNull(res[1330].firstMatch("xyzxyz "), 3959); - assertNull(res[1331].firstMatch("X X\n"), 3960); - assertNull(res[1331].firstMatch("X\x09X\x0b"), 3961); - assertNull(res[1331].firstMatch("** Failers"), 3962); - assertNull(res[1331].firstMatch("\xa0 X\n "), 3963); - assertNull(res[1332].firstMatch("\x09 \xa0X\n\x0b\x0c\x0d\n"), 3964); - assertNull(res[1332].firstMatch("\x09 \xa0\n\x0b\x0c\x0d\n"), 3965); - assertNull(res[1332].firstMatch("\x09 \xa0\n\x0b\x0c"), 3966); - assertNull(res[1332].firstMatch("** Failers "), 3967); - assertNull(res[1332].firstMatch("\x09 \xa0\n\x0b"), 3968); - assertNull(res[1332].firstMatch(" "), 3969); - assertNull(res[1333].firstMatch("XY ABCDE"), 3970); - assertNull(res[1333].firstMatch("XY PQR ST "), 3971); - assertNull(res[1334].firstMatch("XY AB PQRS"), 3972); - assertNull(res[1335].firstMatch(">XNNNYZ"), 3973); - assertNull(res[1335].firstMatch("> X NYQZ"), 3974); - assertNull(res[1335].firstMatch("** Failers"), 3975); - assertNull(res[1335].firstMatch(">XYZ "), 3976); - assertNull(res[1335].firstMatch("> X NY Z"), 3977); - assertNull(res[1336].firstMatch(">XY\nZ\nA\x0bNN\x0c"), 3978); - assertNull( - res[1336].firstMatch(">\n\x0dX\nY\n\x0bZZZ\nAAA\x0bNNN\x0c"), 3979); - assertNull(res[1337].firstMatch("\x0d\nA"), 3980); - assertToStringEquals("\nA", res[1338].firstMatch("\x0d\nA "), 3981); - assertToStringEquals("\nA", res[1339].firstMatch("\x0d\nA "), 3982); - assertToStringEquals("\nA,\n", res[1340].firstMatch("\x0d\nA "), 3983); - assertNull(res[1341].firstMatch("a\x0db"), 3984); - assertNull(res[1341].firstMatch("a\nb"), 3985); - assertNull(res[1341].firstMatch("a\x0d\nb"), 3986); - assertNull(res[1341].firstMatch("** Failers"), 3987); - assertNull(res[1341].firstMatch("a\x85b"), 3988); - assertNull(res[1341].firstMatch("a\x0bb "), 3989); - assertNull(res[1342].firstMatch("a\x0db"), 3990); - assertNull(res[1342].firstMatch("a\nb"), 3991); - assertNull(res[1342].firstMatch("a\x0d\nb"), 3992); - assertNull(res[1342].firstMatch("a\x85b"), 3993); - assertNull(res[1342].firstMatch("a\x0bb "), 3994); - assertNull(res[1342].firstMatch("** Failers "), 3995); - assertNull(res[1342].firstMatch("a\x85b"), 3996); - assertNull(res[1342].firstMatch("a\x0bb"), 3997); - assertNull(res[1343].firstMatch("a\x0db"), 3998); - assertNull(res[1343].firstMatch("a\nb"), 3999); - assertNull(res[1343].firstMatch("a\x0d\nb"), 4000); - assertNull(res[1343].firstMatch("** Failers"), 4001); - assertNull(res[1343].firstMatch("a\x85b"), 4002); - assertNull(res[1343].firstMatch("a\x0bb "), 4003); - assertNull(res[1344].firstMatch("a\x0db"), 4004); - assertNull(res[1344].firstMatch("a\nb"), 4005); - assertNull(res[1344].firstMatch("a\x0d\nb"), 4006); - assertNull(res[1344].firstMatch("a\x85b"), 4007); - assertNull(res[1344].firstMatch("a\x0bb "), 4008); - assertNull(res[1344].firstMatch("** Failers "), 4009); - assertNull(res[1344].firstMatch("a\x85b"), 4010); - assertNull(res[1344].firstMatch("a\x0bb"), 4011); - assertNull(res[1345].firstMatch("a\x0d\n\nb"), 4012); - assertNull(res[1345].firstMatch("a\n\x0d\x0db"), 4013); - assertNull(res[1345].firstMatch("a\x0d\n\x0d\n\x0d\n\x0d\nb"), 4014); - assertNull(res[1345].firstMatch("** Failers"), 4015); - assertNull(res[1345].firstMatch("a\x8585b"), 4016); - assertNull(res[1345].firstMatch("a\x0b\x00bb "), 4017); - assertNull(res[1346].firstMatch("a\x0d\x0db"), 4018); - assertNull(res[1346].firstMatch("a\n\n\nb"), 4019); - assertNull(res[1346].firstMatch("a\x0d\n\n\x0d\x0db"), 4020); - assertNull(res[1346].firstMatch("a\x8585b"), 4021); - assertNull(res[1346].firstMatch("a\x0b\x00bb "), 4022); - assertNull(res[1346].firstMatch("** Failers "), 4023); - assertNull(res[1346].firstMatch("a\x0d\x0d\x0d\x0d\x0db "), 4024); - assertNull(res[1346].firstMatch("a\x8585b"), 4025); - assertNull(res[1346].firstMatch("a\x0b\x00bb"), 4026); - assertToStringEquals("abc", res[1347].firstMatch("abc "), 4027); - assertNull(res[1348].firstMatch("** Failers"), 4028); - assertNull(res[1348].firstMatch("ab"), 4029); - assertNull(res[1349].firstMatch("** Failers"), 4030); - assertNull(res[1349].firstMatch("ab "), 4031); - assertNull(res[1349].firstMatch("** Failers"), 4032); - assertNull(res[1349].firstMatch("ab "), 4033); - assertToStringEquals("aXb", res[1350].firstMatch("aXb"), 4034); - assertToStringEquals("a\nb", res[1350].firstMatch("a\nb "), 4035); - assertNull(res[1350].firstMatch("** Failers"), 4036); - assertNull(res[1350].firstMatch("ab "), 4037); - assertToStringEquals("aXb", res[1351].firstMatch("aXb"), 4038); - assertToStringEquals("a\nX\nXb", res[1351].firstMatch("a\nX\nXb "), 4039); - assertNull(res[1351].firstMatch("** Failers"), 4040); - assertNull(res[1351].firstMatch("ab "), 4041); - assertNull(res[1352].firstMatch("ab"), 4042); - assertNull(res[1352].firstMatch("ax{100}b "), 4043); - assertNull(res[1352].firstMatch("ax{100}x{100}b "), 4044); - assertNull(res[1352].firstMatch("ax{100}b "), 4045); - assertNull(res[1352].firstMatch("ax{100}x{100}b "), 4046); - assertNull(res[1352].firstMatch("*** Failers "), 4047); - assertNull(res[1352].firstMatch("ab"), 4048); - assertNull(res[1352].firstMatch(" "), 4049); - assertToStringEquals("X", res[1353].firstMatch("Xoanon"), 4050); - assertToStringEquals("X", res[1353].firstMatch("+Xoanon"), 4051); - assertToStringEquals("X", res[1353].firstMatch("x{300}Xoanon "), 4052); - assertNull(res[1353].firstMatch("*** Failers "), 4053); - assertNull(res[1353].firstMatch("YXoanon "), 4054); - assertToStringEquals("X", res[1354].firstMatch("YXoanon"), 4055); - assertNull(res[1354].firstMatch("*** Failers"), 4056); - assertNull(res[1354].firstMatch("Xoanon"), 4057); - assertNull(res[1354].firstMatch("+Xoanon "), 4058); - assertNull(res[1354].firstMatch("x{300}Xoanon "), 4059); - assertToStringEquals("X", res[1355].firstMatch("X+oanon"), 4060); - assertNull(res[1355].firstMatch("ZXx{300}oanon "), 4061); - assertToStringEquals("X", res[1355].firstMatch("FAX "), 4062); - assertNull(res[1355].firstMatch("*** Failers "), 4063); - assertNull(res[1355].firstMatch("Xoanon "), 4064); - assertToStringEquals("X", res[1356].firstMatch("Xoanon "), 4065); - assertNull(res[1356].firstMatch("*** Failers"), 4066); - assertNull(res[1356].firstMatch("X+oanon"), 4067); - assertToStringEquals("X", res[1356].firstMatch("ZXx{300}oanon "), 4068); - assertNull(res[1356].firstMatch("FAX "), 4069); - assertToStringEquals("b", res[1357].firstMatch("abcd"), 4070); - assertToStringEquals("x", res[1357].firstMatch("ax{100} "), 4071); - assertToStringEquals("b", res[1357].firstMatch("ab99"), 4072); - assertToStringEquals("x", res[1357].firstMatch("x{123}x{123}45"), 4073); - assertToStringEquals( - "x", res[1357].firstMatch("x{400}x{401}x{402}6 "), 4074); - assertToStringEquals("*", res[1357].firstMatch("*** Failers"), 4075); - assertToStringEquals("d", res[1357].firstMatch("d99"), 4076); - assertToStringEquals("x", res[1357].firstMatch("x{123}x{122}4 "), 4077); - assertToStringEquals("x", res[1357].firstMatch("x{400}x{403}6 "), 4078); - assertToStringEquals( - "x", res[1357].firstMatch("x{400}x{401}x{402}x{402}6 "), 4079); - assertNull(res[1358].firstMatch("\ufffd]"), 4080); - assertNull(res[1358].firstMatch("\ufffd"), 4081); - assertNull(res[1358].firstMatch("\ufffd\ufffd\ufffd"), 4082); - assertNull(res[1358].firstMatch("\ufffd\ufffd\ufffd?"), 4083); - assertToStringEquals("acb", res[1359].firstMatch("acb"), 4084); - assertToStringEquals("ab", res[1359].firstMatch("ab"), 4085); - assertNull(res[1359].firstMatch("ax{100}b "), 4086); - assertNull(res[1359].firstMatch("*** Failers"), 4087); - assertNull(res[1359].firstMatch("a\nb "), 4088); - assertNull(res[1360].firstMatch("ax{4000}xyb "), 4089); - assertNull(res[1360].firstMatch("ax{4000}yb "), 4090); - assertNull(res[1360].firstMatch("ax{4000}x{100}yb "), 4091); - assertNull(res[1360].firstMatch("*** Failers"), 4092); - assertNull(res[1360].firstMatch("ax{4000}b "), 4093); - assertNull(res[1360].firstMatch("ac\ncb "), 4094); - assertToStringEquals("a\xc0,,\xc0", res[1361].firstMatch("a\xc0\x88b"), 4095); - assertToStringEquals("ax,,x", res[1362].firstMatch("ax{100}b"), 4096); - assertToStringEquals( - "a\xc0\x88b,\xc0\x88,b", res[1363].firstMatch("a\xc0\x88b"), 4097); - assertToStringEquals( - "ax{100}b,x{100},b", res[1364].firstMatch("ax{100}b"), 4098); - assertToStringEquals( - "a\xc0\x92,\xc0,\x92", res[1365].firstMatch("a\xc0\x92bcd"), 4099); - assertToStringEquals("ax{,x,{", res[1366].firstMatch("ax{240}bcd"), 4100); - assertToStringEquals( - "a\xc0\x92,\xc0,\x92", res[1367].firstMatch("a\xc0\x92bcd"), 4101); - assertToStringEquals("ax{,x,{", res[1368].firstMatch("ax{240}bcd"), 4102); - assertToStringEquals( - "a\xc0,,\xc0", res[1369].firstMatch("a\xc0\x92bcd"), 4103); - assertToStringEquals("ax,,x", res[1370].firstMatch("ax{240}bcd"), 4104); - assertNull(res[1371].firstMatch("ax{1234}xyb "), 4105); - assertNull(res[1371].firstMatch("ax{1234}x{4321}yb "), 4106); - assertNull(res[1371].firstMatch("ax{1234}x{4321}x{3412}b "), 4107); - assertNull(res[1371].firstMatch("*** Failers"), 4108); - assertNull(res[1371].firstMatch("ax{1234}b "), 4109); - assertNull(res[1371].firstMatch("ac\ncb "), 4110); - assertToStringEquals( - "ax{1234}xyb,x{1234}xy", res[1372].firstMatch("ax{1234}xyb "), 4111); - assertToStringEquals("ax{1234}x{4321}yb,x{1234}x{4321}y", - res[1372].firstMatch("ax{1234}x{4321}yb "), 4112); - assertToStringEquals("ax{1234}x{4321}x{3412}b,x{1234}x{4321}x{3412}", - res[1372].firstMatch("ax{1234}x{4321}x{3412}b "), 4113); - assertToStringEquals("axxxxbcdefghijb,xxxxbcdefghij", - res[1372].firstMatch("axxxxbcdefghijb "), 4114); - assertToStringEquals( - "ax{1234}x{4321}x{3412}x{3421}b,x{1234}x{4321}x{3412}x{3421}", - res[1372].firstMatch("ax{1234}x{4321}x{3412}x{3421}b "), - 4115); - assertNull(res[1372].firstMatch("*** Failers"), 4116); - assertToStringEquals( - "ax{1234}b,x{1234}", res[1372].firstMatch("ax{1234}b "), 4117); - assertToStringEquals( - "ax{1234}xyb,x{1234}xy", res[1373].firstMatch("ax{1234}xyb "), 4118); - assertToStringEquals("ax{1234}x{4321}yb,x{1234}x{4321}y", - res[1373].firstMatch("ax{1234}x{4321}yb "), 4119); - assertToStringEquals("ax{1234}x{4321}x{3412}b,x{1234}x{4321}x{3412}", - res[1373].firstMatch("ax{1234}x{4321}x{3412}b "), 4120); - assertToStringEquals( - "axxxxb,xxxx", res[1373].firstMatch("axxxxbcdefghijb "), 4121); - assertToStringEquals( - "ax{1234}x{4321}x{3412}x{3421}b,x{1234}x{4321}x{3412}x{3421}", - res[1373].firstMatch("ax{1234}x{4321}x{3412}x{3421}b "), - 4122); - assertNull(res[1373].firstMatch("*** Failers"), 4123); - assertToStringEquals( - "ax{1234}b,x{1234}", res[1373].firstMatch("ax{1234}b "), 4124); - assertNull(res[1374].firstMatch("ax{1234}xyb "), 4125); - assertNull(res[1374].firstMatch("ax{1234}x{4321}yb "), 4126); - assertNull(res[1374].firstMatch("ax{1234}x{4321}x{3412}b "), 4127); - assertToStringEquals( - "axxxxb,xxxx", res[1374].firstMatch("axxxxbcdefghijb "), 4128); - assertNull(res[1374].firstMatch("ax{1234}x{4321}x{3412}x{3421}b "), 4129); - assertToStringEquals( - "axbxxb,xbxx", res[1374].firstMatch("axbxxbcdefghijb "), 4130); - assertToStringEquals( - "axxxxxb,xxxxx", res[1374].firstMatch("axxxxxbcdefghijb "), 4131); - assertNull(res[1374].firstMatch("*** Failers"), 4132); - assertNull(res[1374].firstMatch("ax{1234}b "), 4133); - assertNull(res[1374].firstMatch("axxxxxxbcdefghijb "), 4134); - assertNull(res[1375].firstMatch("ax{1234}xyb "), 4135); - assertNull(res[1375].firstMatch("ax{1234}x{4321}yb "), 4136); - assertNull(res[1375].firstMatch("ax{1234}x{4321}x{3412}b "), 4137); - assertToStringEquals( - "axxxxb,xxxx", res[1375].firstMatch("axxxxbcdefghijb "), 4138); - assertNull(res[1375].firstMatch("ax{1234}x{4321}x{3412}x{3421}b "), 4139); - assertToStringEquals( - "axbxxb,xbxx", res[1375].firstMatch("axbxxbcdefghijb "), 4140); - assertToStringEquals( - "axxxxxb,xxxxx", res[1375].firstMatch("axxxxxbcdefghijb "), 4141); - assertNull(res[1375].firstMatch("*** Failers"), 4142); - assertNull(res[1375].firstMatch("ax{1234}b "), 4143); - assertNull(res[1375].firstMatch("axxxxxxbcdefghijb "), 4144); - assertNull(res[1375].firstMatch("*** Failers"), 4145); - assertNull(res[1375].firstMatch("x{100}"), 4146); - assertNull(res[1375].firstMatch("aXbcd"), 4147); - assertNull(res[1375].firstMatch("ax{100}bcd"), 4148); - assertNull(res[1375].firstMatch("ax{100000}bcd"), 4149); - assertNull(res[1375].firstMatch("x{100}x{100}x{100}b"), 4150); - assertNull(res[1375].firstMatch("*** Failers "), 4151); - assertNull(res[1375].firstMatch("x{100}x{100}b"), 4152); - assertNull(res[1375].firstMatch("x{ab} "), 4153); - assertNull(res[1375].firstMatch("\xc2\xab"), 4154); - assertNull(res[1375].firstMatch("*** Failers "), 4155); - assertNull(res[1375].firstMatch("\x00{ab}"), 4156); - assertNull(res[1375].firstMatch("WXYZ"), 4157); - assertNull(res[1375].firstMatch("x{256}XYZ "), 4158); - assertNull(res[1375].firstMatch("*** Failers"), 4159); - assertNull(res[1375].firstMatch("XYZ "), 4160); - assertToStringEquals("bcd", res[1376].firstMatch("bcd"), 4161); - assertToStringEquals("x{", res[1377].firstMatch("x{100}bc"), 4163); - assertToStringEquals("x{100}bcA", res[1378].firstMatch("x{100}bcAa"), 4164); - assertToStringEquals("x{", res[1379].firstMatch("x{100}bca"), 4165); - assertToStringEquals("bcd", res[1380].firstMatch("bcd"), 4166); - assertToStringEquals("x{", res[1381].firstMatch("x{100}bc"), 4168); - assertToStringEquals("x{100}bc", res[1382].firstMatch("x{100}bcAa"), 4169); - assertToStringEquals("x{", res[1383].firstMatch("x{100}bca"), 4170); - assertNull(res[1383].firstMatch("abcd"), 4171); - assertNull(res[1383].firstMatch("abcd"), 4172); - assertToStringEquals("x{", res[1383].firstMatch("x{100}x{100} "), 4173); - assertToStringEquals("x{", res[1383].firstMatch("x{100}x{100} "), 4174); - assertToStringEquals( - "x{", res[1383].firstMatch("x{100}x{100}x{100}x{100} "), 4175); - assertNull(res[1383].firstMatch("abce"), 4176); - assertToStringEquals( - "x{", res[1383].firstMatch("x{100}x{100}x{100}x{100} "), 4177); - assertNull(res[1383].firstMatch("abcdx{100}x{100}x{100}x{100} "), 4178); - assertNull(res[1383].firstMatch("abcdx{100}x{100}x{100}x{100} "), 4179); - assertNull(res[1383].firstMatch("abcdx{100}x{100}x{100}x{100} "), 4180); - assertNull(res[1383].firstMatch("abcdx{100}x{100}x{100}XX"), 4181); - assertNull( - res[1383].firstMatch("abcdx{100}x{100}x{100}x{100}x{100}x{100}x{100}XX"), - 4182); - assertNull( - res[1383].firstMatch("abcdx{100}x{100}x{100}x{100}x{100}x{100}x{100}XX"), - 4183); - assertToStringEquals( - "Xy", res[1383].firstMatch("Xyyyax{100}x{100}bXzzz"), 4184); - assertToStringEquals("X", res[1386].firstMatch("1X2"), 4185); - assertToStringEquals("x", res[1386].firstMatch("1x{100}2 "), 4186); - assertToStringEquals(">X", res[1387].firstMatch("> >X Y"), 4187); - assertToStringEquals(">x", res[1387].firstMatch("> >x{100} Y"), 4188); - assertToStringEquals("1", res[1388].firstMatch("x{100}3"), 4189); - assertToStringEquals(" ", res[1389].firstMatch("x{100} X"), 4190); - assertToStringEquals("abcd", res[1390].firstMatch("12abcd34"), 4191); - assertToStringEquals( - "*** Failers", res[1390].firstMatch("*** Failers"), 4192); - assertToStringEquals(" ", res[1390].firstMatch("1234 "), 4193); - assertToStringEquals("abc", res[1391].firstMatch("12abcd34"), 4194); - assertToStringEquals("ab", res[1391].firstMatch("12ab34"), 4195); - assertToStringEquals("***", res[1391].firstMatch("*** Failers "), 4196); - assertNull(res[1391].firstMatch("1234"), 4197); - assertToStringEquals(" ", res[1391].firstMatch("12a34 "), 4198); - assertToStringEquals("ab", res[1392].firstMatch("12abcd34"), 4199); - assertToStringEquals("ab", res[1392].firstMatch("12ab34"), 4200); - assertToStringEquals("**", res[1392].firstMatch("*** Failers "), 4201); - assertNull(res[1392].firstMatch("1234"), 4202); - assertToStringEquals(" ", res[1392].firstMatch("12a34 "), 4203); - assertToStringEquals("12", res[1393].firstMatch("12abcd34"), 4204); - assertNull(res[1393].firstMatch("*** Failers"), 4205); - assertToStringEquals("12", res[1394].firstMatch("12abcd34"), 4206); - assertToStringEquals("123", res[1394].firstMatch("1234abcd"), 4207); - assertNull(res[1394].firstMatch("*** Failers "), 4208); - assertNull(res[1394].firstMatch("1.4 "), 4209); - assertToStringEquals("12", res[1395].firstMatch("12abcd34"), 4210); - assertToStringEquals("12", res[1395].firstMatch("1234abcd"), 4211); - assertNull(res[1395].firstMatch("*** Failers "), 4212); - assertNull(res[1395].firstMatch("1.4 "), 4213); - assertToStringEquals("12abcd34", res[1396].firstMatch("12abcd34"), 4214); - assertToStringEquals("***", res[1396].firstMatch("*** Failers"), 4215); - assertNull(res[1396].firstMatch(" "), 4216); - assertToStringEquals("12a", res[1397].firstMatch("12abcd34"), 4217); - assertToStringEquals("123", res[1397].firstMatch("1234abcd"), 4218); - assertToStringEquals("***", res[1397].firstMatch("*** Failers"), 4219); - assertNull(res[1397].firstMatch(" "), 4220); - assertToStringEquals("12", res[1398].firstMatch("12abcd34"), 4221); - assertToStringEquals("12", res[1398].firstMatch("1234abcd"), 4222); - assertToStringEquals("**", res[1398].firstMatch("*** Failers"), 4223); - assertNull(res[1398].firstMatch(" "), 4224); - assertToStringEquals("> <", res[1399].firstMatch("12> <34"), 4225); - assertNull(res[1399].firstMatch("*** Failers"), 4226); - assertToStringEquals("> <", res[1400].firstMatch("ab> <", res[1400].firstMatch("ab> <", res[1401].firstMatch("ab> <", res[1401].firstMatch("ab> \xff<"), 4303); - assertNull(res[1409].firstMatch(">x{ff}<"), 4304); - assertToStringEquals("X", res[1410].firstMatch("XYZ"), 4305); - assertToStringEquals("X", res[1411].firstMatch("XYZ"), 4306); - assertToStringEquals("x", res[1411].firstMatch("x{123} "), 4307); - assertToStringEquals(",", res[1416].firstMatch("catac"), 4308); - assertToStringEquals(",", res[1416].firstMatch("ax{256}a "), 4309); - assertToStringEquals(",", res[1416].firstMatch("x{85}"), 4310); - assertToStringEquals( - "abc1", - res[1417].firstMatch( - "abc1 \nabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\nabc6 x{0085}abc7 x{2028}abc8 x{2029}abc9 JUNK"), - 4311); - assertToStringEquals( - "abc1", - res[1418].firstMatch( - "abc1\n abc2\x0b abc3\x0c abc4\x0d abc5\x0d\n abc6x{0085} abc7x{2028} abc8x{2029} abc9"), - 4312); - assertNull(res[1419].firstMatch("a\nb"), 4313); - assertNull(res[1419].firstMatch("a\x0db"), 4314); - assertNull(res[1419].firstMatch("a\x0d\nb"), 4315); - assertNull(res[1419].firstMatch("a\x0bb"), 4316); - assertNull(res[1419].firstMatch("a\x0cb"), 4317); - assertNull(res[1419].firstMatch("ax{85}b "), 4318); - assertNull(res[1419].firstMatch("ax{2028}b "), 4319); - assertNull(res[1419].firstMatch("ax{2029}b "), 4320); - assertNull(res[1419].firstMatch("** Failers"), 4321); - assertNull(res[1419].firstMatch("a\n\x0db "), 4322); - assertToStringEquals("ab", res[1420].firstMatch("ab"), 4323); - assertNull(res[1420].firstMatch("a\nb"), 4324); - assertNull(res[1420].firstMatch("a\x0db"), 4325); - assertNull(res[1420].firstMatch("a\x0d\nb"), 4326); - assertNull(res[1420].firstMatch("a\x0bb"), 4327); - assertNull(res[1420].firstMatch("a\x0cx{2028}x{2029}b"), 4328); - assertNull(res[1420].firstMatch("ax{85}b "), 4329); - assertNull(res[1420].firstMatch("a\n\x0db "), 4330); - assertNull(res[1420].firstMatch("a\n\x0dx{85}\x0cb "), 4331); - assertNull(res[1421].firstMatch("a\nb"), 4332); - assertNull(res[1421].firstMatch("a\x0db"), 4333); - assertNull(res[1421].firstMatch("a\x0d\nb"), 4334); - assertNull(res[1421].firstMatch("a\x0bb"), 4335); - assertNull(res[1421].firstMatch("a\x0cx{2028}x{2029}b"), 4336); - assertNull(res[1421].firstMatch("ax{85}b "), 4337); - assertNull(res[1421].firstMatch("a\n\x0db "), 4338); - assertNull(res[1421].firstMatch("a\n\x0dx{85}\x0cb "), 4339); - assertNull(res[1421].firstMatch("** Failers"), 4340); - assertNull(res[1421].firstMatch("ab "), 4341); - assertNull(res[1422].firstMatch("a\nb"), 4342); - assertNull(res[1422].firstMatch("a\n\x0db"), 4343); - assertNull(res[1422].firstMatch("a\n\x0dx{85}b"), 4344); - assertNull(res[1422].firstMatch("a\x0d\n\x0d\nb "), 4345); - assertNull(res[1422].firstMatch("a\x0d\n\x0d\n\x0d\nb "), 4346); - assertNull(res[1422].firstMatch("a\n\x0d\n\x0db"), 4347); - assertNull(res[1422].firstMatch("a\n\n\x0d\nb "), 4348); - assertNull(res[1422].firstMatch("** Failers"), 4349); - assertNull(res[1422].firstMatch("a\n\n\n\x0db"), 4350); - assertNull(res[1422].firstMatch("a\x0d"), 4351); - assertNull(res[1423].firstMatch("\x09 x{a0}X\n\x0b\x0c\x0d\n"), 4352); - assertNull(res[1424].firstMatch(" x{a0}X\n\x0b\x0c\x0d\n"), 4353); - assertNull(res[1425].firstMatch(">\x09 x{a0}X\n\n\n<"), 4354); - assertNull(res[1426].firstMatch(">\x09 x{a0}X\n\n\n<"), 4355); - assertNull(res[1427].firstMatch("X X\n"), 4356); - assertNull(res[1427].firstMatch("X\x09X\x0b"), 4357); - assertNull(res[1427].firstMatch("** Failers"), 4358); - assertNull(res[1427].firstMatch("x{a0} X\n "), 4359); - assertNull(res[1428].firstMatch("\x09 x{a0}X\n\x0b\x0c\x0d\n"), 4360); - assertNull(res[1428].firstMatch("\x09 x{a0}\n\x0b\x0c\x0d\n"), 4361); - assertNull(res[1428].firstMatch("\x09 x{a0}\n\x0b\x0c"), 4362); - assertNull(res[1428].firstMatch("** Failers "), 4363); - assertNull(res[1428].firstMatch("\x09 x{a0}\n\x0b"), 4364); - assertNull(res[1428].firstMatch(" "), 4365); - assertNull(res[1429].firstMatch("x{3001}x{3000}x{2030}x{2028}"), 4366); - assertNull(res[1429].firstMatch("Xx{180e}Xx{85}"), 4367); - assertNull(res[1429].firstMatch("** Failers"), 4368); - assertNull(res[1429].firstMatch("x{2009} X\n "), 4369); - assertNull( - res[1430].firstMatch("x{1680}x{180e}x{2007}Xx{2028}x{2029}\x0c\x0d\n"), - 4370); - assertNull( - res[1430].firstMatch("\x09x{205f}x{a0}\nx{2029}\x0cx{2028}\n"), 4371); - assertNull(res[1430].firstMatch("\x09 x{202f}\n\x0b\x0c"), 4372); - assertNull(res[1430].firstMatch("** Failers "), 4373); - assertNull(res[1430].firstMatch("\x09x{200a}x{a0}x{2028}\x0b"), 4374); - assertNull(res[1430].firstMatch(" "), 4375); - assertNull(res[1431].firstMatch("a\x0db"), 4376); - assertNull(res[1431].firstMatch("a\nb"), 4377); - assertNull(res[1431].firstMatch("a\x0d\nb"), 4378); - assertNull(res[1431].firstMatch("** Failers"), 4379); - assertNull(res[1431].firstMatch("ax{85}b"), 4380); - assertNull(res[1431].firstMatch("a\x0bb "), 4381); - assertNull(res[1432].firstMatch("a\x0db"), 4382); - assertNull(res[1432].firstMatch("a\nb"), 4383); - assertNull(res[1432].firstMatch("a\x0d\nb"), 4384); - assertNull(res[1432].firstMatch("ax{85}b"), 4385); - assertNull(res[1432].firstMatch("a\x0bb "), 4386); - assertNull(res[1432].firstMatch("** Failers "), 4387); - assertNull(res[1432].firstMatch("ax{85}b"), 4388); - assertNull(res[1432].firstMatch("a\x0bb"), 4389); - assertNull(res[1433].firstMatch("a\x0db"), 4390); - assertNull(res[1433].firstMatch("a\nb"), 4391); - assertNull(res[1433].firstMatch("a\x0d\nb"), 4392); - assertNull(res[1433].firstMatch("** Failers"), 4393); - assertNull(res[1433].firstMatch("ax{85}b"), 4394); - assertNull(res[1433].firstMatch("a\x0bb "), 4395); - assertNull(res[1434].firstMatch("a\x0db"), 4396); - assertNull(res[1434].firstMatch("a\nb"), 4397); - assertNull(res[1434].firstMatch("a\x0d\nb"), 4398); - assertNull(res[1434].firstMatch("ax{85}b"), 4399); - assertNull(res[1434].firstMatch("a\x0bb "), 4400); - assertNull(res[1434].firstMatch("** Failers "), 4401); - assertNull(res[1434].firstMatch("ax{85}b"), 4402); - assertNull(res[1434].firstMatch("a\x0bb"), 4403); - assertToStringEquals("X", res[1435].firstMatch("Ax{1ec5}ABCXYZ"), 4404); - assertNull(res[1437].firstMatch("AB"), 4405); - assertNull(res[1437].firstMatch("*** Failers"), 4406); - assertNull(res[1437].firstMatch("A0"), 4407); - assertNull(res[1437].firstMatch("00 "), 4408); - assertNull(res[1438].firstMatch("AB"), 4409); - assertNull(res[1438].firstMatch("Ax{300}BC "), 4410); - assertNull(res[1438].firstMatch("Ax{300}x{301}x{302}BC "), 4411); - assertNull(res[1438].firstMatch("*** Failers"), 4412); - assertNull(res[1438].firstMatch("x{300} "), 4413); - assertNull(res[1439].firstMatch("ABC"), 4414); - assertNull(res[1439].firstMatch("Ax{300}Bx{300}x{301}C "), 4415); - assertNull(res[1439].firstMatch("Ax{300}x{301}x{302}BC "), 4416); - assertNull(res[1439].firstMatch("*** Failers"), 4417); - assertNull(res[1439].firstMatch("x{300} "), 4418); - assertNull(res[1440].firstMatch("abcd"), 4419); - assertNull(res[1440].firstMatch("a "), 4420); - assertNull(res[1440].firstMatch("*** Failers "), 4421); - assertNull(res[1441].firstMatch("1234"), 4422); - assertNull(res[1441].firstMatch("= "), 4423); - assertNull(res[1441].firstMatch("*** Failers "), 4424); - assertNull(res[1441].firstMatch("abcd "), 4425); - assertNull(res[1442].firstMatch("abcdAx{300}x{301}x{302}"), 4426); - assertNull(res[1442].firstMatch("Ax{300}x{301}x{302}"), 4427); - assertNull( - res[1442].firstMatch("Ax{300}x{301}x{302}Ax{300}x{301}x{302}"), 4428); - assertNull(res[1442].firstMatch("a "), 4429); - assertNull(res[1442].firstMatch("*** Failers "), 4430); - assertNull(res[1442].firstMatch("x{300}x{301}x{302}"), 4431); - assertToStringEquals("abc", res[1443].firstMatch("abc"), 4432); - assertToStringEquals("abc", res[1443].firstMatch("Ax{300}abc"), 4433); - assertToStringEquals( - "abc", - res[1443].firstMatch("Ax{300}x{301}x{302}Ax{300}Ax{300}Ax{300}abcxyz"), - 4434); - assertToStringEquals("abc", res[1443].firstMatch("x{300}abc "), 4435); - assertNull(res[1443].firstMatch("*** Failers"), 4436); - assertToStringEquals("abc", res[1444].firstMatch("abc"), 4437); - assertNull(res[1444].firstMatch("Ax{300}abc"), 4438); - assertNull(res[1444].firstMatch("*** Failers"), 4439); - assertNull( - res[1444].firstMatch("Ax{300}x{301}x{302}Ax{300}Ax{300}Ax{300}abcxyz"), - 4440); - assertNull(res[1444].firstMatch("x{300}abc "), 4441); - assertToStringEquals("abc", res[1445].firstMatch("abc"), 4442); - assertToStringEquals("abc", res[1445].firstMatch("Ax{300}abc"), 4443); - assertToStringEquals( - "abc", - res[1445].firstMatch("Ax{300}x{301}x{302}Ax{300}Ax{300}Ax{300}abcxyz"), - 4444); - assertToStringEquals("abc", res[1445].firstMatch("x{300}abc "), 4445); - assertNull(res[1445].firstMatch("*** Failers"), 4446); - assertToStringEquals("abc", res[1446].firstMatch("abc"), 4447); - assertNull(res[1446].firstMatch("Ax{300}abc"), 4448); - assertNull( - res[1446].firstMatch("Ax{300}x{301}x{302}Ax{300}Ax{300}Ax{300}abcxyz"), - 4449); - assertNull(res[1446].firstMatch("*** Failers"), 4450); - assertNull(res[1446].firstMatch("x{300}abc "), 4451); - assertNull(res[1447].firstMatch("A=b"), 4452); - assertNull(res[1447].firstMatch("=c "), 4453); - assertNull(res[1447].firstMatch("*** Failers"), 4454); - assertNull(res[1447].firstMatch("1=2 "), 4455); - assertNull(res[1447].firstMatch("AAAA=b "), 4456); - assertNull(res[1448].firstMatch("AAAA=b"), 4457); - assertNull(res[1448].firstMatch("=c "), 4458); - assertNull(res[1448].firstMatch("*** Failers"), 4459); - assertNull(res[1448].firstMatch("1=2 "), 4460); - assertNull( - res[1449].firstMatch("Ax{300}x{301}x{302}Ax{300}x{301}x{302}X"), 4461); - assertNull( - res[1449].firstMatch( - "Ax{300}x{301}x{302}Ax{300}x{301}x{302}Ax{300}x{301}x{302}X "), - 4462); - assertNull(res[1449].firstMatch("*** Failers"), 4463); - assertNull(res[1449].firstMatch("X"), 4464); - assertNull(res[1449].firstMatch("Ax{300}x{301}x{302}X"), 4465); - assertNull( - res[1449].firstMatch( - "Ax{300}x{301}x{302}Ax{300}x{301}x{302}Ax{300}x{301}x{302}Ax{300}x{301}x{302}X"), - 4466); - assertNull( - res[1450].firstMatch("x{c0}x{30f}x{660}x{66c}x{f01}x{1680}<"), 4467); - assertNull(res[1450].firstMatch("\npx{300}9!\$ < "), 4468); - assertNull(res[1450].firstMatch("** Failers "), 4469); - assertNull(res[1450].firstMatch("apx{300}9!\$ < "), 4470); - assertNull(res[1451].firstMatch("X"), 4471); - assertNull(res[1451].firstMatch("** Failers "), 4472); - assertNull(res[1451].firstMatch(""), 4473); - assertNull(res[1452].firstMatch("9"), 4474); - assertNull(res[1452].firstMatch("** Failers "), 4475); - assertNull(res[1452].firstMatch("x{c0}"), 4476); - assertNull(res[1453].firstMatch("X"), 4477); - assertNull(res[1453].firstMatch("** Failers "), 4478); - assertNull(res[1453].firstMatch("x{30f}"), 4479); - assertNull(res[1454].firstMatch("X"), 4480); - assertNull(res[1454].firstMatch("** Failers "), 4481); - assertNull(res[1454].firstMatch("x{660}"), 4482); - assertNull(res[1455].firstMatch("X"), 4483); - assertNull(res[1455].firstMatch("** Failers "), 4484); - assertNull(res[1455].firstMatch("x{66c}"), 4485); - assertNull(res[1456].firstMatch("X"), 4486); - assertNull(res[1456].firstMatch("** Failers "), 4487); - assertNull(res[1456].firstMatch("x{f01}"), 4488); - assertNull(res[1457].firstMatch("X"), 4489); - assertNull(res[1457].firstMatch("** Failers "), 4490); - assertNull(res[1457].firstMatch("x{1680}"), 4491); - assertNull(res[1458].firstMatch("x{017}"), 4492); - assertNull(res[1458].firstMatch("x{09f} "), 4493); - assertNull(res[1458].firstMatch("** Failers"), 4494); - assertNull(res[1458].firstMatch("x{0600} "), 4495); - assertNull(res[1459].firstMatch("x{601}"), 4496); - assertNull(res[1459].firstMatch("** Failers"), 4497); - assertNull(res[1459].firstMatch("x{09f} "), 4498); - assertNull(res[1460].firstMatch("** Failers"), 4499); - assertNull(res[1460].firstMatch("x{09f} "), 4500); - assertNull(res[1461].firstMatch("x{f8ff}"), 4501); - assertNull(res[1461].firstMatch("** Failers"), 4502); - assertNull(res[1461].firstMatch("x{09f} "), 4503); - assertNull(res[1462].firstMatch("?x{dfff}"), 4504); - assertNull(res[1462].firstMatch("** Failers"), 4505); - assertNull(res[1462].firstMatch("x{09f} "), 4506); - assertNull(res[1463].firstMatch("a"), 4507); - assertNull(res[1463].firstMatch("** Failers "), 4508); - assertNull(res[1463].firstMatch("Z"), 4509); - assertNull(res[1463].firstMatch("x{e000} "), 4510); - assertNull(res[1464].firstMatch("x{2b0}"), 4511); - assertNull(res[1464].firstMatch("** Failers"), 4512); - assertNull(res[1464].firstMatch("a "), 4513); - assertNull(res[1465].firstMatch("x{1bb}"), 4514); - assertNull(res[1465].firstMatch("** Failers"), 4515); - assertNull(res[1465].firstMatch("a "), 4516); - assertNull(res[1465].firstMatch("x{2b0}"), 4517); - assertNull(res[1466].firstMatch("x{1c5}"), 4518); - assertNull(res[1466].firstMatch("** Failers"), 4519); - assertNull(res[1466].firstMatch("a "), 4520); - assertNull(res[1466].firstMatch("x{2b0}"), 4521); - assertNull(res[1467].firstMatch("A"), 4522); - assertNull(res[1467].firstMatch("** Failers"), 4523); - assertNull(res[1467].firstMatch("x{2b0}"), 4524); - assertNull(res[1468].firstMatch("x{903}"), 4525); - assertNull(res[1468].firstMatch("** Failers"), 4526); - assertNull(res[1468].firstMatch("X"), 4527); - assertNull(res[1468].firstMatch("x{300}"), 4528); - assertNull(res[1468].firstMatch(" "), 4529); - assertNull(res[1469].firstMatch("x{488}"), 4530); - assertNull(res[1469].firstMatch("** Failers"), 4531); - assertNull(res[1469].firstMatch("X"), 4532); - assertNull(res[1469].firstMatch("x{903}"), 4533); - assertNull(res[1469].firstMatch("x{300}"), 4534); - assertNull(res[1470].firstMatch("x{300}"), 4535); - assertNull(res[1470].firstMatch("** Failers"), 4536); - assertNull(res[1470].firstMatch("X"), 4537); - assertNull(res[1470].firstMatch("x{903}"), 4538); - assertNull( - res[1470].firstMatch( - "0123456789x{660}x{661}x{662}x{663}x{664}x{665}x{666}x{667}x{668}x{669}x{66a}"), - 4539); - assertNull( - res[1470].firstMatch( - "x{6f0}x{6f1}x{6f2}x{6f3}x{6f4}x{6f5}x{6f6}x{6f7}x{6f8}x{6f9}x{6fa}"), - 4540); - assertNull( - res[1470].firstMatch( - "x{966}x{967}x{968}x{969}x{96a}x{96b}x{96c}x{96d}x{96e}x{96f}x{970}"), - 4541); - assertNull(res[1470].firstMatch("** Failers"), 4542); - assertNull(res[1470].firstMatch("X"), 4543); - assertNull(res[1471].firstMatch("x{16ee}"), 4544); - assertNull(res[1471].firstMatch("** Failers"), 4545); - assertNull(res[1471].firstMatch("X"), 4546); - assertNull(res[1471].firstMatch("x{966}"), 4547); - assertNull(res[1472].firstMatch("x{b2}"), 4548); - assertNull(res[1472].firstMatch("x{b3}"), 4549); - assertNull(res[1472].firstMatch("** Failers"), 4550); - assertNull(res[1472].firstMatch("X"), 4551); - assertNull(res[1472].firstMatch("x{16ee}"), 4552); - assertNull(res[1473].firstMatch("_"), 4553); - assertNull(res[1473].firstMatch("x{203f}"), 4554); - assertNull(res[1473].firstMatch("** Failers"), 4555); - assertNull(res[1473].firstMatch("X"), 4556); - assertNull(res[1473].firstMatch("-"), 4557); - assertNull(res[1473].firstMatch("x{58a}"), 4558); - assertNull(res[1474].firstMatch("-"), 4559); - assertNull(res[1474].firstMatch("x{58a}"), 4560); - assertNull(res[1474].firstMatch("** Failers"), 4561); - assertNull(res[1474].firstMatch("X"), 4562); - assertNull(res[1474].firstMatch("x{203f}"), 4563); - assertNull(res[1475].firstMatch(")"), 4564); - assertNull(res[1475].firstMatch("]"), 4565); - assertNull(res[1475].firstMatch("}"), 4566); - assertNull(res[1475].firstMatch("x{f3b}"), 4567); - assertNull(res[1475].firstMatch("** Failers"), 4568); - assertNull(res[1475].firstMatch("X"), 4569); - assertNull(res[1475].firstMatch("x{203f}"), 4570); - assertNull(res[1475].firstMatch("("), 4571); - assertNull(res[1475].firstMatch("["), 4572); - assertNull(res[1475].firstMatch("{"), 4573); - assertNull(res[1475].firstMatch("x{f3c}"), 4574); - assertNull(res[1476].firstMatch("x{bb}"), 4575); - assertNull(res[1476].firstMatch("x{2019}"), 4576); - assertNull(res[1476].firstMatch("** Failers"), 4577); - assertNull(res[1476].firstMatch("X"), 4578); - assertNull(res[1476].firstMatch("x{203f}"), 4579); - assertNull(res[1477].firstMatch("x{ab}"), 4580); - assertNull(res[1477].firstMatch("x{2018}"), 4581); - assertNull(res[1477].firstMatch("** Failers"), 4582); - assertNull(res[1477].firstMatch("X"), 4583); - assertNull(res[1477].firstMatch("x{203f}"), 4584); - assertNull(res[1478].firstMatch("!"), 4585); - assertNull(res[1478].firstMatch("x{37e}"), 4586); - assertNull(res[1478].firstMatch("** Failers"), 4587); - assertNull(res[1478].firstMatch("X"), 4588); - assertNull(res[1478].firstMatch("x{203f}"), 4589); - assertNull(res[1479].firstMatch("("), 4590); - assertNull(res[1479].firstMatch("["), 4591); - assertNull(res[1479].firstMatch("{"), 4592); - assertNull(res[1479].firstMatch("x{f3c}"), 4593); - assertNull(res[1479].firstMatch("** Failers"), 4594); - assertNull(res[1479].firstMatch("X"), 4595); - assertNull(res[1479].firstMatch(")"), 4596); - assertNull(res[1479].firstMatch("]"), 4597); - assertNull(res[1479].firstMatch("}"), 4598); - assertNull(res[1479].firstMatch("x{f3b}"), 4599); - assertNull(res[1479].firstMatch("\$x{a2}x{a3}x{a4}x{a5}x{a6}"), 4600); - assertNull(res[1479].firstMatch("x{9f2}"), 4601); - assertNull(res[1479].firstMatch("** Failers"), 4602); - assertNull(res[1479].firstMatch("X"), 4603); - assertNull(res[1479].firstMatch("x{2c2}"), 4604); - assertNull(res[1480].firstMatch("x{2c2}"), 4605); - assertNull(res[1480].firstMatch("** Failers"), 4606); - assertNull(res[1480].firstMatch("X"), 4607); - assertNull(res[1480].firstMatch("x{9f2}"), 4608); - assertNull(res[1480].firstMatch("+<|~x{ac}x{2044}"), 4609); - assertNull(res[1480].firstMatch("** Failers"), 4610); - assertNull(res[1480].firstMatch("X"), 4611); - assertNull(res[1480].firstMatch("x{9f2}"), 4612); - assertNull(res[1481].firstMatch("x{a6}"), 4613); - assertNull(res[1481].firstMatch("x{482} "), 4614); - assertNull(res[1481].firstMatch("** Failers"), 4615); - assertNull(res[1481].firstMatch("X"), 4616); - assertNull(res[1481].firstMatch("x{9f2}"), 4617); - assertNull(res[1482].firstMatch("x{2028}"), 4618); - assertNull(res[1482].firstMatch("** Failers"), 4619); - assertNull(res[1482].firstMatch("X"), 4620); - assertNull(res[1482].firstMatch("x{2029}"), 4621); - assertNull(res[1483].firstMatch("x{2029}"), 4622); - assertNull(res[1483].firstMatch("** Failers"), 4623); - assertNull(res[1483].firstMatch("X"), 4624); - assertNull(res[1483].firstMatch("x{2028}"), 4625); - assertNull(res[1484].firstMatch("\\ \\"), 4626); - assertNull(res[1484].firstMatch("x{a0}"), 4627); - assertNull(res[1484].firstMatch("x{1680}"), 4628); - assertNull(res[1484].firstMatch("x{180e}"), 4629); - assertNull(res[1484].firstMatch("x{2000}"), 4630); - assertNull(res[1484].firstMatch("x{2001} "), 4631); - assertNull(res[1484].firstMatch("** Failers"), 4632); - assertNull(res[1484].firstMatch("x{2028}"), 4633); - assertNull(res[1484].firstMatch("x{200d} "), 4634); - assertNull(res[1484].firstMatch(" x{660}x{661}x{662}ABC"), 4635); - assertNull(res[1484].firstMatch(" x{660}x{661}x{662}ABC"), 4636); - assertNull(res[1485].firstMatch(" x{660}x{661}x{662}ABC"), 4637); - assertNull(res[1486].firstMatch(" x{660}x{661}x{662}ABC"), 4638); - assertNull(res[1487].firstMatch(" x{660}x{661}x{662}ABC"), 4639); - assertNull(res[1488].firstMatch(" x{660}x{661}x{662}ABC"), 4640); - assertNull(res[1489].firstMatch(" x{660}x{661}x{662}ABC"), 4641); - assertNull(res[1490].firstMatch(" x{660}x{661}x{662}ABC"), 4642); - assertNull(res[1491].firstMatch(" x{660}x{661}x{662}ABC"), 4643); - assertNull(res[1492].firstMatch(" x{660}x{661}x{662}ABC"), 4644); - assertNull(res[1493].firstMatch(" x{660}x{661}x{662}ABC"), 4645); - assertNull(res[1493].firstMatch(" x{660}x{661}x{662}ABC"), 4646); - assertNull(res[1493].firstMatch(" x{660}x{661}x{662}ABC"), 4647); - assertNull(res[1493].firstMatch(" ** Failers"), 4648); - assertNull(res[1493].firstMatch(" x{660}x{661}x{662}ABC"), 4649); - assertNull(res[1494].firstMatch("A"), 4650); - assertNull(res[1494].firstMatch("ax{10a0}B "), 4651); - assertNull(res[1494].firstMatch("** Failers "), 4652); - assertNull(res[1494].firstMatch("a"), 4653); - assertNull(res[1494].firstMatch("x{1d00} "), 4654); - assertNull(res[1495].firstMatch("1234"), 4655); - assertNull(res[1495].firstMatch("** Failers"), 4656); - assertNull(res[1495].firstMatch("ABC "), 4657); - assertNull(res[1496].firstMatch("1234"), 4658); - assertNull(res[1496].firstMatch("** Failers"), 4659); - assertNull(res[1496].firstMatch("ABC "), 4660); - assertNull(res[1496].firstMatch("A2XYZ"), 4661); - assertNull(res[1496].firstMatch("123A5XYZPQR"), 4662); - assertNull(res[1496].firstMatch("ABAx{660}XYZpqr"), 4663); - assertNull(res[1496].firstMatch("** Failers"), 4664); - assertNull(res[1496].firstMatch("AXYZ"), 4665); - assertNull(res[1496].firstMatch("XYZ "), 4666); - assertNull(res[1496].firstMatch("1XYZ"), 4667); - assertNull(res[1496].firstMatch("AB=XYZ.. "), 4668); - assertNull(res[1496].firstMatch("XYZ "), 4669); - assertNull(res[1496].firstMatch("** Failers"), 4670); - assertNull(res[1496].firstMatch("WXYZ "), 4671); - assertNull(res[1497].firstMatch("1234"), 4672); - assertNull(res[1497].firstMatch("1234"), 4673); - assertNull(res[1497].firstMatch("12-34"), 4674); - assertToStringEquals("{", res[1497].firstMatch("12+x{661}-34 "), 4675); - assertNull(res[1497].firstMatch("** Failers"), 4676); - assertToStringEquals("d", res[1497].firstMatch("abcd "), 4677); - assertToStringEquals("d", res[1498].firstMatch("abcd"), 4678); - assertNull(res[1498].firstMatch("** Failers"), 4679); - assertNull(res[1498].firstMatch("1234"), 4680); - assertNull( - res[1499].firstMatch( - "11111111111111111111111111111111111111111111111111111111111111111111111"), - 4681); - assertToStringEquals( - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - res[1499].firstMatch( - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - 4682); - assertToStringEquals(" ", res[1499].firstMatch(" "), 4683); - assertNull( - res[1499].firstMatch( - "11111111111111111111111111111111111111111111111111111111111111111111111"), - 4684); - assertToStringEquals( - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - res[1499].firstMatch( - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - 4685); - assertNull( - res[1500].firstMatch( - "11111111111111111111111111111111111111111111111111111111111111111111111"), - 4686); - assertToStringEquals( - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - res[1500].firstMatch( - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - 4687); - assertNull( - res[1501].firstMatch( - "11111111111111111111111111111111111111111111111111111111111111111111111"), - 4688); - assertNull( - res[1501].firstMatch( - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - 4689); - assertNull( - res[1502].firstMatch( - "11111111111111111111111111111111111111111111111111111111111111111111111"), - 4690); - assertToStringEquals( - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - res[1502].firstMatch( - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), - 4691); - assertNull(res[1503].firstMatch("a"), 4692); - assertNull(res[1503].firstMatch("A "), 4693); - assertNull(res[1504].firstMatch("a"), 4694); - assertNull(res[1504].firstMatch("A "), 4695); - assertNull(res[1505].firstMatch("A"), 4696); - assertNull(res[1505].firstMatch("aZ"), 4697); - assertNull(res[1505].firstMatch("** Failers"), 4698); - assertNull(res[1505].firstMatch("abc "), 4699); - assertNull(res[1506].firstMatch("A"), 4700); - assertNull(res[1506].firstMatch("aZ"), 4701); - assertNull(res[1506].firstMatch("** Failers"), 4702); - assertNull(res[1506].firstMatch("abc "), 4703); - assertNull(res[1507].firstMatch("a"), 4704); - assertNull(res[1507].firstMatch("Az"), 4705); - assertNull(res[1507].firstMatch("** Failers"), 4706); - assertNull(res[1507].firstMatch("ABC "), 4707); - assertNull(res[1508].firstMatch("a"), 4708); - assertNull(res[1508].firstMatch("Az"), 4709); - assertNull(res[1508].firstMatch("** Failers"), 4710); - assertNull(res[1508].firstMatch("ABC "), 4711); - assertNull(res[1508].firstMatch("x{c0}"), 4712); - assertNull(res[1508].firstMatch("x{e0} "), 4713); - assertNull(res[1508].firstMatch("x{c0}"), 4714); - assertNull(res[1508].firstMatch("x{e0} "), 4715); - assertNull(res[1508].firstMatch("Ax{391}x{10427}x{ff3a}x{1fb0}"), 4716); - assertNull(res[1508].firstMatch("** Failers"), 4717); - assertNull(res[1508].firstMatch("ax{391}x{10427}x{ff3a}x{1fb0} "), 4718); - assertNull(res[1508].firstMatch("Ax{3b1}x{10427}x{ff3a}x{1fb0}"), 4719); - assertNull(res[1508].firstMatch("Ax{391}x{1044F}x{ff3a}x{1fb0}"), 4720); - assertNull(res[1508].firstMatch("Ax{391}x{10427}x{ff5a}x{1fb0}"), 4721); - assertNull(res[1508].firstMatch("Ax{391}x{10427}x{ff3a}x{1fb8}"), 4722); - assertNull(res[1508].firstMatch("Ax{391}x{10427}x{ff3a}x{1fb0}"), 4723); - assertNull(res[1508].firstMatch("ax{391}x{10427}x{ff3a}x{1fb0} "), 4724); - assertNull(res[1508].firstMatch("Ax{3b1}x{10427}x{ff3a}x{1fb0}"), 4725); - assertNull(res[1508].firstMatch("Ax{391}x{1044F}x{ff3a}x{1fb0}"), 4726); - assertNull(res[1508].firstMatch("Ax{391}x{10427}x{ff5a}x{1fb0}"), 4727); - assertNull(res[1508].firstMatch("Ax{391}x{10427}x{ff3a}x{1fb8}"), 4728); - assertNull(res[1508].firstMatch("x{391}x{3b1}x{3b1}x{3b1}x{391}"), 4729); - assertNull(res[1508].firstMatch("x{391}x{3b1}x{3b1}x{3b1}x{391}X"), 4730); - assertNull(res[1508].firstMatch("x{391}x{3b1}x{3b1}x{3b1}x{391}X"), 4731); - assertNull(res[1508].firstMatch("x{391}"), 4732); - assertNull(res[1508].firstMatch("x{ff3a}"), 4733); - assertNull(res[1508].firstMatch("x{3b1}"), 4734); - assertNull(res[1508].firstMatch("x{ff5a} "), 4735); - assertNull(res[1508].firstMatch("x{c0}"), 4736); - assertNull(res[1508].firstMatch("x{e0} "), 4737); - assertNull(res[1508].firstMatch("x{104}"), 4738); - assertNull(res[1508].firstMatch("x{105}"), 4739); - assertNull(res[1508].firstMatch("x{109} "), 4740); - assertNull(res[1508].firstMatch("** Failers"), 4741); - assertNull(res[1508].firstMatch("x{100}"), 4742); - assertNull(res[1508].firstMatch("x{10a} "), 4743); - assertNull(res[1508].firstMatch("Z"), 4744); - assertNull(res[1508].firstMatch("z"), 4745); - assertNull(res[1508].firstMatch("x{39c}"), 4746); - assertNull(res[1508].firstMatch("x{178}"), 4747); - assertNull(res[1508].firstMatch("|"), 4748); - assertNull(res[1508].firstMatch("x{80}"), 4749); - assertNull(res[1508].firstMatch("x{ff}"), 4750); - assertNull(res[1508].firstMatch("x{100}"), 4751); - assertNull(res[1508].firstMatch("x{101} "), 4752); - assertNull(res[1508].firstMatch("** Failers"), 4753); - assertNull(res[1508].firstMatch("x{102}"), 4754); - assertNull(res[1508].firstMatch("Y"), 4755); - assertNull(res[1508].firstMatch("y "), 4756); - assertNull(res[1509].firstMatch("A"), 4757); - assertNull(res[1509].firstMatch("Ax{300}BC "), 4758); - assertNull(res[1509].firstMatch("Ax{300}x{301}x{302}BC "), 4759); - assertNull(res[1509].firstMatch("*** Failers"), 4760); - assertNull(res[1509].firstMatch("x{300} "), 4761); - assertToStringEquals("X", res[1510].firstMatch("X123"), 4762); - assertNull(res[1510].firstMatch("*** Failers"), 4763); - assertNull(res[1510].firstMatch("AXYZ"), 4764); - assertNull(res[1511].firstMatch("Ax{300}x{301}x{302}BCAx{300}x{301} "), 4765); - assertNull( - res[1511].firstMatch("Ax{300}x{301}x{302}BCAx{300}x{301}C "), 4766); - assertNull(res[1512].firstMatch("Ax{300}x{301}x{302}BCAx{300}x{301} "), 4767); - assertNull( - res[1512].firstMatch("Ax{300}x{301}x{302}BCAx{300}x{301}C "), 4768); - assertToStringEquals("A,,A", - res[1513].firstMatch("Ax{300}x{301}x{302}BCAx{300}x{301} "), 4769); - assertToStringEquals("A,,A", - res[1513].firstMatch("Ax{300}x{301}x{302}BCAx{300}x{301}C "), 4770); - assertToStringEquals("A,,A", - res[1514].firstMatch("Ax{300}x{301}x{302}BCAx{300}x{301} "), 4771); - assertToStringEquals("A,,A", - res[1514].firstMatch("Ax{300}x{301}x{302}BCAx{300}x{301}C "), 4772); - assertNull(res[1515].firstMatch("*** Failers"), 4773); - assertNull(res[1515].firstMatch("Ax{300}x{301}x{302}"), 4774); - assertNull(res[1516].firstMatch("Ax{300}x{301}Bx{300}X"), 4775); - assertNull(res[1516].firstMatch("Ax{300}x{301}Bx{300}Cx{300}x{301}"), 4776); - assertNull(res[1516].firstMatch("Ax{300}x{301}Bx{300}Cx{300}x{301}X"), 4777); - assertNull( - res[1516].firstMatch("Ax{300}x{301}Bx{300}Cx{300}x{301}DAx{300}X"), 4778); - assertNull(res[1517].firstMatch("Ax{300}x{301}Bx{300}X"), 4779); - assertNull(res[1517].firstMatch("Ax{300}x{301}Bx{300}Cx{300}x{301}"), 4780); - assertNull(res[1517].firstMatch("Ax{300}x{301}Bx{300}Cx{300}x{301}X"), 4781); - assertNull( - res[1517].firstMatch("Ax{300}x{301}Bx{300}Cx{300}x{301}DAx{300}X"), 4782); - assertNull(res[1518].firstMatch("12X"), 4783); - assertNull(res[1518].firstMatch("123X"), 4784); - assertNull(res[1518].firstMatch("*** Failers"), 4785); - assertNull(res[1518].firstMatch("X"), 4786); - assertNull(res[1518].firstMatch("1X"), 4787); - assertNull(res[1518].firstMatch("1234X "), 4788); - assertNull(res[1518].firstMatch("x{100} "), 4789); - assertNull(res[1518].firstMatch("x{101} "), 4790); - assertNull(res[1518].firstMatch("x{2e81}x{3007}x{2f804}x{31a0}"), 4791); - assertNull(res[1518].firstMatch("** Failers"), 4792); - assertNull(res[1518].firstMatch("x{2e7f} "), 4793); - assertNull(res[1518].firstMatch("x{3105}"), 4794); - assertNull(res[1518].firstMatch("** Failers"), 4795); - assertNull(res[1518].firstMatch("x{30ff} "), 4796); - assertNull(res[1519].firstMatch("x{06e9}"), 4797); - assertNull(res[1519].firstMatch("x{060b}"), 4798); - assertNull(res[1519].firstMatch("** Failers"), 4799); - assertNull(res[1519].firstMatch("Xx{06e9} "), 4800); - assertNull(res[1520].firstMatch("x{2f800}"), 4801); - assertNull(res[1520].firstMatch("** Failers"), 4802); - assertNull(res[1520].firstMatch("x{a014}"), 4803); - assertNull(res[1520].firstMatch("x{a4c6} "), 4804); - assertNull(res[1521].firstMatch("AXYZ"), 4805); - assertNull(res[1521].firstMatch("x{1234}XYZ "), 4806); - assertNull(res[1521].firstMatch("** Failers"), 4807); - assertNull(res[1521].firstMatch("X "), 4808); - assertNull(res[1522].firstMatch("** Failers"), 4809); - assertNull(res[1522].firstMatch("AX"), 4810); - assertNull(res[1523].firstMatch("XYZ"), 4811); - assertNull(res[1523].firstMatch("AXYZ"), 4812); - assertNull(res[1523].firstMatch("x{1234}XYZ "), 4813); - assertNull(res[1523].firstMatch("** Failers"), 4814); - assertNull(res[1523].firstMatch("ABXYZ "), 4815); - assertNull(res[1524].firstMatch("XYZ"), 4816); - assertNull(res[1524].firstMatch("** Failers"), 4817); - assertNull(res[1524].firstMatch("AXYZ"), 4818); - assertNull(res[1524].firstMatch("x{1234}XYZ "), 4819); - assertNull(res[1524].firstMatch("ABXYZ "), 4820); - assertNull(res[1524].firstMatch("AXYZ"), 4821); - assertNull(res[1524].firstMatch("x{1234}XYZ"), 4822); - assertNull(res[1524].firstMatch("Ax{1234}XYZ"), 4823); - assertNull(res[1524].firstMatch("** Failers"), 4824); - assertNull(res[1524].firstMatch("XYZ"), 4825); - assertNull(res[1524].firstMatch("** Failers"), 4826); - assertNull(res[1524].firstMatch("AXYZ"), 4827); - assertNull(res[1524].firstMatch("x{1234}XYZ"), 4828); - assertNull(res[1524].firstMatch("Ax{1234}XYZ"), 4829); - assertNull(res[1524].firstMatch("XYZ"), 4830); - assertNull(res[1525].firstMatch("XYZ"), 4831); - assertNull(res[1525].firstMatch("AXYZ"), 4832); - assertNull(res[1525].firstMatch("x{1234}XYZ"), 4833); - assertNull(res[1525].firstMatch("Ax{1234}XYZ"), 4834); - assertNull(res[1525].firstMatch("** Failers"), 4835); - assertNull(res[1526].firstMatch("XYZ"), 4836); - assertNull(res[1526].firstMatch("** Failers"), 4837); - assertNull(res[1526].firstMatch("AXYZ"), 4838); - assertNull(res[1526].firstMatch("x{1234}XYZ"), 4839); - assertNull(res[1526].firstMatch("Ax{1234}XYZ"), 4840); - assertToStringEquals("AX", res[1527].firstMatch("AXYZ"), 4841); - assertNull(res[1527].firstMatch("x{1234}XYZ "), 4842); - assertNull(res[1527].firstMatch("** Failers"), 4843); - assertNull(res[1527].firstMatch("X "), 4844); - assertNull(res[1528].firstMatch("** Failers"), 4845); - assertToStringEquals("AX", res[1528].firstMatch("AX"), 4846); - assertToStringEquals("X", res[1529].firstMatch("XYZ"), 4847); - assertToStringEquals("AX", res[1529].firstMatch("AXYZ"), 4848); - assertNull(res[1529].firstMatch("x{1234}XYZ "), 4849); - assertNull(res[1529].firstMatch("** Failers"), 4850); - assertNull(res[1529].firstMatch("ABXYZ "), 4851); - assertToStringEquals("X", res[1530].firstMatch("XYZ"), 4852); - assertNull(res[1530].firstMatch("** Failers"), 4853); - assertToStringEquals("AX", res[1530].firstMatch("AXYZ"), 4854); - assertNull(res[1530].firstMatch("x{1234}XYZ "), 4855); - assertNull(res[1530].firstMatch("ABXYZ "), 4856); - assertToStringEquals("AX", res[1531].firstMatch("AXYZ"), 4857); - assertNull(res[1531].firstMatch("x{1234}XYZ"), 4858); - assertNull(res[1531].firstMatch("Ax{1234}XYZ"), 4859); - assertNull(res[1531].firstMatch("** Failers"), 4860); - assertNull(res[1531].firstMatch("XYZ"), 4861); - assertNull(res[1532].firstMatch("** Failers"), 4862); - assertToStringEquals("AX", res[1532].firstMatch("AXYZ"), 4863); - assertNull(res[1532].firstMatch("x{1234}XYZ"), 4864); - assertNull(res[1532].firstMatch("Ax{1234}XYZ"), 4865); - assertNull(res[1532].firstMatch("XYZ"), 4866); - assertToStringEquals("X", res[1533].firstMatch("XYZ"), 4867); - assertToStringEquals("AX", res[1533].firstMatch("AXYZ"), 4868); - assertNull(res[1533].firstMatch("x{1234}XYZ"), 4869); - assertNull(res[1533].firstMatch("Ax{1234}XYZ"), 4870); - assertNull(res[1533].firstMatch("** Failers"), 4871); - assertToStringEquals("X", res[1534].firstMatch("XYZ"), 4872); - assertNull(res[1534].firstMatch("** Failers"), 4873); - assertToStringEquals("AX", res[1534].firstMatch("AXYZ"), 4874); - assertNull(res[1534].firstMatch("x{1234}XYZ"), 4875); - assertNull(res[1534].firstMatch("Ax{1234}XYZ"), 4876); - assertNull(res[1535].firstMatch("abcdefgh"), 4877); - assertNull(res[1535].firstMatch("x{1234}\n\x0dx{3456}xyz "), 4878); - assertNull(res[1536].firstMatch("abcdefgh"), 4879); - assertNull(res[1536].firstMatch("x{1234}\n\x0dx{3456}xyz "), 4880); - assertNull(res[1537].firstMatch("** Failers"), 4881); - assertNull(res[1537].firstMatch("abcdefgh"), 4882); - assertNull(res[1537].firstMatch("x{1234}\n\x0dx{3456}xyz "), 4883); - assertNull(res[1538].firstMatch(" AXY"), 4884); - assertNull(res[1538].firstMatch(" aXY"), 4885); - assertNull(res[1538].firstMatch(" x{1c5}XY"), 4886); - assertNull(res[1538].firstMatch(" ** Failers"), 4887); - assertNull(res[1538].firstMatch(" x{1bb}XY"), 4888); - assertNull(res[1538].firstMatch(" x{2b0}XY"), 4889); - assertNull(res[1538].firstMatch(" !XY "), 4890); - assertNull(res[1539].firstMatch(" AXY"), 4891); - assertNull(res[1539].firstMatch(" aXY"), 4892); - assertNull(res[1539].firstMatch(" x{1c5}XY"), 4893); - assertNull(res[1539].firstMatch(" ** Failers"), 4894); - assertNull(res[1539].firstMatch(" x{1bb}XY"), 4895); - assertNull(res[1539].firstMatch(" x{2b0}XY"), 4896); - assertNull(res[1539].firstMatch(" !XY "), 4897); - assertNull(res[1539].firstMatch(" AXY"), 4898); - assertNull(res[1539].firstMatch(" aXY"), 4899); - assertNull(res[1539].firstMatch(" AbcdeXyz "), 4900); - assertNull(res[1539].firstMatch(" x{1c5}AbXY"), 4901); - assertNull(res[1539].firstMatch(" abcDEXypqreXlmn "), 4902); - assertNull(res[1539].firstMatch(" ** Failers"), 4903); - assertNull(res[1539].firstMatch(" x{1bb}XY"), 4904); - assertNull(res[1539].firstMatch(" x{2b0}XY"), 4905); - assertNull(res[1539].firstMatch(" !XY "), 4906); - assertNull(res[1540].firstMatch(" AXY"), 4907); - assertNull(res[1540].firstMatch(" aXY"), 4908); - assertNull(res[1540].firstMatch(" AbcdeXyz "), 4909); - assertNull(res[1540].firstMatch(" x{1c5}AbXY"), 4910); - assertNull(res[1540].firstMatch(" abcDEXypqreXlmn "), 4911); - assertNull(res[1540].firstMatch(" ** Failers"), 4912); - assertNull(res[1540].firstMatch(" x{1bb}XY"), 4913); - assertNull(res[1540].firstMatch(" x{2b0}XY"), 4914); - assertNull(res[1540].firstMatch(" !XY "), 4915); - assertNull(res[1540].firstMatch(" AXY"), 4916); - assertNull(res[1540].firstMatch(" aXY"), 4917); - assertNull(res[1540].firstMatch(" AbcdeXyz "), 4918); - assertNull(res[1540].firstMatch(" x{1c5}AbXY"), 4919); - assertNull(res[1540].firstMatch(" abcDEXypqreXlmn "), 4920); - assertNull(res[1540].firstMatch(" ** Failers"), 4921); - assertNull(res[1540].firstMatch(" x{1bb}XY"), 4922); - assertNull(res[1540].firstMatch(" x{2b0}XY"), 4923); - assertNull(res[1540].firstMatch(" !XY "), 4924); - assertNull(res[1541].firstMatch(" AXY"), 4925); - assertNull(res[1541].firstMatch(" aXY"), 4926); - assertNull(res[1541].firstMatch(" AbcdeXyz "), 4927); - assertNull(res[1541].firstMatch(" x{1c5}AbXY"), 4928); - assertNull(res[1541].firstMatch(" abcDEXypqreXlmn "), 4929); - assertNull(res[1541].firstMatch(" ** Failers"), 4930); - assertNull(res[1541].firstMatch(" x{1bb}XY"), 4931); - assertNull(res[1541].firstMatch(" x{2b0}XY"), 4932); - assertNull(res[1541].firstMatch(" !XY "), 4933); - assertNull(res[1542].firstMatch(" !XY"), 4934); - assertNull(res[1542].firstMatch(" x{1bb}XY"), 4935); - assertNull(res[1542].firstMatch(" x{2b0}XY"), 4936); - assertNull(res[1542].firstMatch(" ** Failers"), 4937); - assertNull(res[1542].firstMatch(" x{1c5}XY"), 4938); - assertNull(res[1542].firstMatch(" AXY "), 4939); - assertNull(res[1543].firstMatch(" !XY"), 4940); - assertNull(res[1543].firstMatch(" x{1bb}XY"), 4941); - assertNull(res[1543].firstMatch(" x{2b0}XY"), 4942); - assertNull(res[1543].firstMatch(" ** Failers"), 4943); - assertNull(res[1543].firstMatch(" x{1c5}XY"), 4944); - assertNull(res[1543].firstMatch(" AXY "), 4945); - assertNull(res[1543].firstMatch("x{c0}x{e0}x{116}x{117}"), 4946); - assertNull(res[1543].firstMatch("x{c0}x{e0}x{116}x{117}"), 4947); - assertNull(res[1545].firstMatch("123abcdefg"), 4948); - assertNull(res[1545].firstMatch("123abc\xc4\xc5zz"), 4949); - assertNull( - res[1546].firstMatch( - "x{102A4}x{AA52}x{A91D}x{1C46}x{10283}x{1092E}x{1C6B}x{A93B}x{A8BF}x{1BA0}x{A50A}===="), - 4950); - assertNull(res[1546].firstMatch("x{a77d}x{1d79}"), 4951); - assertNull(res[1546].firstMatch("x{1d79}x{a77d} "), 4952); - assertNull(res[1546].firstMatch("x{a77d}x{1d79}"), 4953); - assertNull(res[1546].firstMatch("** Failers "), 4954); - assertNull(res[1546].firstMatch("x{1d79}x{a77d} "), 4955); - // Dart does not have RegExp literals and thus no translatation of the below. - // assertThrows("var re = //;", 4956); -} diff --git a/tests/corelib_2/regexp/quantified-assertions_test.dart b/tests/corelib_2/regexp/quantified-assertions_test.dart deleted file mode 100644 index 6e03116c7a6..00000000000 --- a/tests/corelib_2/regexp/quantified-assertions_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description("This page tests assertions followed by quantifiers."); - - var regexp; - - regexp = new RegExp(r"(?=a){0}", multiLine: true); - shouldBeTrue(regexp.hasMatch('a')); - - regexp = new RegExp(r"(?=a){1}", multiLine: true); - shouldBeTrue(regexp.hasMatch('a')); - - regexp = new RegExp(r"(?!a){0}", multiLine: true); - shouldBeTrue(regexp.hasMatch('b')); - - regexp = new RegExp(r"(?!a){1}", multiLine: true); - shouldBeTrue(regexp.hasMatch('b')); - - shouldBeTrue(new RegExp(r"^(?=a)?b$").hasMatch("b")); -} diff --git a/tests/corelib_2/regexp/range-bound-ffff_test.dart b/tests/corelib_2/regexp/range-bound-ffff_test.dart deleted file mode 100644 index c5136612641..00000000000 --- a/tests/corelib_2/regexp/range-bound-ffff_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - 'Test for rdar:/68455379, a case-insensitive regex containing a character class containing a range with an upper bound of \uFFFF can lead to an infinite-loop.'); - - shouldBe( - firstMatch("A", new RegExp(r"[\u0001-\uFFFF]", caseSensitive: false)), - ["A"]); -} diff --git a/tests/corelib_2/regexp/range-out-of-order_test.dart b/tests/corelib_2/regexp/range-out-of-order_test.dart deleted file mode 100644 index 06505c906a9..00000000000 --- a/tests/corelib_2/regexp/range-out-of-order_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - 'Test for bug 16129: REGRESSION (r27761-r27811): malloc error while visiting http://mysit.es (crashes release build).'); - - assertThrows(() => new RegExp(r"^[\s{-.\[\]\(\)]$")); -} diff --git a/tests/corelib_2/regexp/ranges-and-escaped-hyphens_test.dart b/tests/corelib_2/regexp/ranges-and-escaped-hyphens_test.dart deleted file mode 100644 index b0643c22894..00000000000 --- a/tests/corelib_2/regexp/ranges-and-escaped-hyphens_test.dart +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - 'Tests for bug #21232, and related range issues described in bug.'); - - // Basic test for ranges - one to three and five are in regexp, four is not, and '-' should not match - var regexp01 = new RegExp(r"[1-35]+").firstMatch("-12354"); - shouldBe(regexp01, ["1235"]); - // Tests inserting an escape character class into the above pattern - where the spaces fall within the - // range it is no longer a range - hyphens should now match, two should not. - var regexp01a = new RegExp(r"[\s1-35]+").firstMatch("-123 54"); - shouldBe(regexp01a, ["123 5"]); - - // These are invalid ranges, according to ECMA-262, but we allow them. - var regexp01b = new RegExp(r"[1\s-35]+").firstMatch("21-3 54"); - shouldBe(regexp01b, ["1-3 5"]); - var regexp01c = new RegExp(r"[1-\s35]+").firstMatch("21-3 54"); - shouldBe(regexp01c, ["1-3 5"]); - - var regexp01d = new RegExp(r"[1-3\s5]+").firstMatch("-123 54"); - shouldBe(regexp01d, ["123 5"]); - var regexp01e = new RegExp(r"[1-35\s5]+").firstMatch("-123 54"); - shouldBe(regexp01e, ["123 5"]); - // hyphens are normal characters if a range is not fully specified. - var regexp01f = new RegExp(r"[-3]+").firstMatch("2-34"); - shouldBe(regexp01f, ["-3"]); - var regexp01g = new RegExp(r"[2-]+").firstMatch("12-3"); - shouldBe(regexp01g, ["2-"]); - - // Similar to the above tests, but where the hyphen is escaped this is never a range. - var regexp02 = new RegExp(r"[1\-35]+").firstMatch("21-354"); - shouldBe(regexp02, ["1-35"]); - // As above. - var regexp02a = new RegExp(r"[\s1\-35]+").firstMatch("21-3 54"); - shouldBe(regexp02a, ["1-3 5"]); - var regexp02b = new RegExp(r"[1\s\-35]+").firstMatch("21-3 54"); - shouldBe(regexp02b, ["1-3 5"]); - var regexp02c = new RegExp(r"[1\-\s35]+").firstMatch("21-3 54"); - shouldBe(regexp02c, ["1-3 5"]); - var regexp02d = new RegExp(r"[1\-3\s5]+").firstMatch("21-3 54"); - shouldBe(regexp02d, ["1-3 5"]); - var regexp02e = new RegExp(r"[1\-35\s5]+").firstMatch("21-3 54"); - shouldBe(regexp02e, ["1-3 5"]); - - // Test that an escaped hyphen can be used as a bound on a range. - var regexp03a = new RegExp(r"[\--0]+").firstMatch(",-.01"); - shouldBe(regexp03a, ["-.0"]); - var regexp03b = new RegExp(r"[+-\-]+").firstMatch("*+,-."); - shouldBe(regexp03b, ["+,-"]); - - // The actual bug reported. - var bug21232 = - (new RegExp(r"^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$")).hasMatch('@'); - shouldBeFalse(bug21232); -} diff --git a/tests/corelib_2/regexp/regexp_escape_test.dart b/tests/corelib_2/regexp/regexp_escape_test.dart deleted file mode 100644 index 433c6a0b649..00000000000 --- a/tests/corelib_2/regexp/regexp_escape_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -var escapeChars = r"([)}{]?*+.$^|\"; - -var nonEscapeAscii = "\x00\x01\x02\x03\x04\x05\x06\x07" // - "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" // - "\x10\x11\x12\x13\x14\x15\x16\x17" // - "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" // - """ !"#%&',-/0123456789:;<=>""" // - """@ABCDEFGHIJKLMNOPQRSTUVWXYZ_""" // - """`abcdefghijklmnopqrstuvwxyz~\x7f"""; -var someNonAscii = - new String.fromCharCodes(new List.generate(0x1000 - 128, (x) => x + 128)); - -test(String string, [bool shouldEscape]) { - var escape = RegExp.escape(string); - Expect.isTrue(new RegExp(escape).hasMatch(string), "$escape"); - Expect.equals(string, new RegExp(escape).firstMatch(string)[0], "$escape"); - if (shouldEscape == true) { - Expect.notEquals(string, escape); - } else if (shouldEscape == false) { - Expect.equals(string, escape); - } -} - -main() { - for (var c in escapeChars.split("")) { - test(c, true); - } - for (var c in nonEscapeAscii.split("")) { - test(c, false); - } - test(escapeChars, true); - test(nonEscapeAscii, false); - test(someNonAscii, false); - test((nonEscapeAscii + escapeChars) * 3, true); - test(r'.abc', true); // First only. - test(r'abc.', true); // Last only. -} diff --git a/tests/corelib_2/regexp/regexp_kde_test.dart b/tests/corelib_2/regexp/regexp_kde_test.dart deleted file mode 100644 index 8ed8f61a36d..00000000000 --- a/tests/corelib_2/regexp/regexp_kde_test.dart +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description("KDE JS Test"); - - var ri = new RegExp(r"a", caseSensitive: false); - var rm = new RegExp(r"a", multiLine: true); - var rg = new RegExp(r"a"); - - shouldBe(new RegExp(r"(b)c").firstMatch('abcd'), ["bc", "b"]); - - shouldBe(firstMatch('abcdefghi', new RegExp(r"(abc)def(ghi)")), - ['abcdefghi', 'abc', 'ghi']); - shouldBe(new RegExp(r"(abc)def(ghi)").firstMatch('abcdefghi'), - ['abcdefghi', 'abc', 'ghi']); - - shouldBe(firstMatch('abcdefghi', new RegExp(r"(a(b(c(d(e)f)g)h)i)")), - ['abcdefghi', 'abcdefghi', 'bcdefgh', 'cdefg', 'def', 'e']); - - shouldBe( - firstMatch('(100px 200px 150px 15px)', - new RegExp(r"\((\d+)(px)* (\d+)(px)* (\d+)(px)* (\d+)(px)*\)")), - [ - '(100px 200px 150px 15px)', - '100', - 'px', - '200', - 'px', - '150', - 'px', - '15', - 'px' - ]); - shouldBeNull(firstMatch( - '', new RegExp(r"\((\d+)(px)* (\d+)(px)* (\d+)(px)* (\d+)(px)*\)"))); - - var invalidChars = new RegExp(r"[^@\.\w]"); // #47092 - shouldBeTrue(firstMatch('faure@kde.org', invalidChars) == null); - shouldBeFalse(firstMatch('faure-kde@kde.org', invalidChars) == null); - - assertEquals('test1test2'.replaceAll('test', 'X'), 'X1X2'); - assertEquals('test1test2'.replaceAll(new RegExp(r"\d"), 'X'), 'testXtestX'); - assertEquals('1test2test3'.replaceAll(new RegExp(r"\d"), ''), 'testtest'); - assertEquals('test1test2'.replaceAll(new RegExp(r"test"), 'X'), 'X1X2'); - assertEquals('1test2test3'.replaceAll(new RegExp(r"\d"), ''), 'testtest'); - assertEquals('1test2test3'.replaceAll(new RegExp(r"x"), ''), '1test2test3'); - assertEquals( - 'test1test2'.replaceAllMapped( - new RegExp(r"(te)(st)"), (m) => "${m.group(2)}${m.group(1)}"), - 'stte1stte2'); - assertEquals('foo+bar'.replaceAll(new RegExp(r"\+"), '%2B'), 'foo%2Bbar'); - var caught = false; - try { - new RegExp("+"); - } catch (e) { - caught = true; - } - shouldBeTrue(caught); // #40435 - assertEquals('foo'.replaceAll(new RegExp(r"z?"), 'x'), 'xfxoxox'); - assertEquals( - 'test test'.replaceAll(new RegExp(r"\s*"), ''), 'testtest'); // #50985 - assertEquals( - 'abc\$%@'.replaceAll(new RegExp(r"[^0-9a-z]*", caseSensitive: false), ''), - 'abc'); // #50848 - assertEquals( - 'ab'.replaceAll(new RegExp(r"[^\d\.]*", caseSensitive: false), ''), - ''); // #75292 - assertEquals( - '1ab'.replaceAll(new RegExp(r"[^\d\.]*", caseSensitive: false), ''), - '1'); // #75292 - - Expect.listEquals( - '1test2test3blah'.split(new RegExp(r"test")), ['1', '2', '3blah']); - var reg = new RegExp(r"(\d\d )"); - var str = '98 76 blah'; - shouldBe(reg.firstMatch(str), ['98 ', '98 ']); - - str = "For more information, see Chapter 3.4.5.1"; - var re = new RegExp(r"(chapter \d+(\.\d)*)", caseSensitive: false); - // This returns the array containing Chapter 3.4.5.1,Chapter 3.4.5.1,.1 - // 'Chapter 3.4.5.1' is the first match and the first value remembered from (Chapter \d+(\.\d)*). - // '.1' is the second value remembered from (\.\d) - shouldBe(firstMatch(str, re), ['Chapter 3.4.5.1', 'Chapter 3.4.5.1', '.1']); - - str = "abcDdcba"; - // The returned array contains D, d. - re = new RegExp(r"d", caseSensitive: false); - var matches = re.allMatches(str); - Expect.listEquals(matches.map((m) => m.group(0)).toList(), ['D', 'd']); - - // unicode escape sequence - shouldBe(firstMatch('abc', new RegExp(r"\u0062")), ['b']); -} diff --git a/tests/corelib_2/regexp/regexp_regress_52182_test.dart b/tests/corelib_2/regexp/regexp_regress_52182_test.dart deleted file mode 100644 index c06b3c1cbe8..00000000000 --- a/tests/corelib_2/regexp/regexp_regress_52182_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2023, 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. -// -// Regression test for https://github.com/dart-lang/sdk/issues/52182 - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - // https://github.com/dart-lang/sdk/issues/52182 - Expect.isTrue(RegExp(r'a[^x]b', unicode: true).hasMatch('a\uD800\uDD01b')); -} diff --git a/tests/corelib_2/regexp/regexp_regression_39406_test.dart b/tests/corelib_2/regexp/regexp_regression_39406_test.dart deleted file mode 100644 index 6c4bd0dbbb3..00000000000 --- a/tests/corelib_2/regexp/regexp_regression_39406_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// See http://dartbug.com/39406 -// -// The following code must not throw. - -void main() { - var regExp = RegExp(r'\w+'); - var message = 'Hello world!'; - var match = regExp.firstMatch(message); - var groupNames = match.groupNames.toList(); - Expect.listEquals([], groupNames); - Expect.throwsArgumentError(() => match.namedGroup("x")); -} diff --git a/tests/corelib_2/regexp/regexp_test.dart b/tests/corelib_2/regexp/regexp_test.dart deleted file mode 100644 index b564235852e..00000000000 --- a/tests/corelib_2/regexp/regexp_test.dart +++ /dev/null @@ -1,626 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2012 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -void testEscape(str, regexp) { - assertEquals("foo:bar:baz", str.split(regexp).join(":")); -} - -void assertEquals(actual, expected, [message]) => - Expect.equals(actual, expected, message); -void assertTrue(actual, [message]) => Expect.isTrue(actual, message); -void assertFalse(actual, [message]) => Expect.isFalse(actual, message); -void assertThrows(fn) => Expect.throws(fn); - -void main() { - testEscape("foo\nbar\nbaz", new RegExp(r"\n")); - testEscape("foo bar baz", new RegExp(r"\s")); - testEscape("foo\tbar\tbaz", new RegExp(r"\s")); - testEscape("foo-bar-baz", new RegExp(r"\u002D")); - - // Test containing null char in regexp. - var s = '[' + new String.fromCharCode(0) + ']'; - var regexp = new RegExp(s); - assertEquals(regexp.allMatches(s).length, 1); - assertEquals(regexp.stringMatch(s), new String.fromCharCode(0)); - - final _vmFrame = new RegExp(r'^#\d+\s+(\S.*) \((.+?):(\d+)(?::(\d+))?\)$'); - final _traceLine = - "#0 Trace.Trace.parse (package:stack_trace/src/trace.dart:130:7)"; - Expect.equals(_vmFrame.firstMatch(_traceLine).group(0), _traceLine); - - // Test the UTF16 case insensitive comparison. - regexp = new RegExp(r"x(a)\1x", caseSensitive: false); - Expect.equals(regexp.firstMatch("xaAx\u1234").group(0), "xaAx"); - - // Test strings containing all line separators - s = 'aA\nbB\rcC\r\ndD\u2028eE\u2029fF'; - // any non-newline character at the beginning of a line - regexp = new RegExp(r"^.", multiLine: true); - var result = regexp.allMatches(s).toList(); - assertEquals(result.length, 6); - assertEquals(result[0][0], 'a'); - assertEquals(result[1][0], 'b'); - assertEquals(result[2][0], 'c'); - assertEquals(result[3][0], 'd'); - assertEquals(result[4][0], 'e'); - assertEquals(result[5][0], 'f'); - - // any non-newline character at the end of a line - regexp = new RegExp(r".$", multiLine: true); - result = regexp.allMatches(s).toList(); - assertEquals(result.length, 6); - assertEquals(result[0][0], 'A'); - assertEquals(result[1][0], 'B'); - assertEquals(result[2][0], 'C'); - assertEquals(result[3][0], 'D'); - assertEquals(result[4][0], 'E'); - assertEquals(result[5][0], 'F'); - - // *any* character at the beginning of a line - regexp = new RegExp(r"^[^]", multiLine: true); - result = regexp.allMatches(s).toList(); - assertEquals(result.length, 7); - assertEquals(result[0][0], 'a'); - assertEquals(result[1][0], 'b'); - assertEquals(result[2][0], 'c'); - assertEquals(result[3][0], '\n'); - assertEquals(result[4][0], 'd'); - assertEquals(result[5][0], 'e'); - assertEquals(result[6][0], 'f'); - - // *any* character at the end of a line - regexp = new RegExp(r"[^]$", multiLine: true); - result = regexp.allMatches(s).toList(); - assertEquals(result.length, 7); - assertEquals(result[0][0], 'A'); - assertEquals(result[1][0], 'B'); - assertEquals(result[2][0], 'C'); - assertEquals(result[3][0], '\r'); - assertEquals(result[4][0], 'D'); - assertEquals(result[5][0], 'E'); - assertEquals(result[6][0], 'F'); - - // Some tests from the Mozilla tests, where our behavior used to differ - // from SpiderMonkey. - // From ecma_3/RegExp/regress-334158.js - assertTrue("\x01".contains(new RegExp(r"\ca"))); - assertFalse("\\ca".contains(new RegExp(r"\ca"))); - assertFalse("ca".contains(new RegExp(r"\ca"))); - assertTrue("\\ca".contains(new RegExp(r"\c[a/]"))); - assertTrue("\\c/".contains(new RegExp(r"\c[a/]"))); - - // Test \c in character class - var re = r"^[\cM]$"; - assertTrue("\r".contains(new RegExp(re))); - assertFalse("M".contains(new RegExp(re))); - assertFalse("c".contains(new RegExp(re))); - assertFalse("\\".contains(new RegExp(re))); - assertFalse("\x03".contains(new RegExp(re))); // I.e., read as \cc - - re = r"^[\c]]$"; - assertTrue("c]".contains(new RegExp(re))); - assertTrue("\\]".contains(new RegExp(re))); - assertFalse("\x1d".contains(new RegExp(re))); // ']' & 0x1f - assertFalse("\x03]".contains(new RegExp(re))); // I.e., read as \cc - - // Digit control characters are masked in character classes. - re = r"^[\c1]$"; - assertTrue("\x11".contains(new RegExp(re))); - assertFalse("\\".contains(new RegExp(re))); - assertFalse("c".contains(new RegExp(re))); - assertFalse("1".contains(new RegExp(re))); - - // Underscore control character is masked in character classes. - re = r"^[\c_]$"; - assertTrue("\x1f".contains(new RegExp(re))); - assertFalse("\\".contains(new RegExp(re))); - assertFalse("c".contains(new RegExp(re))); - assertFalse("_".contains(new RegExp(re))); - - re = r"^[\c$]$"; // Other characters are interpreted literally. - assertFalse("\x04".contains(new RegExp(re))); - assertTrue("\\".contains(new RegExp(re))); - assertTrue("c".contains(new RegExp(re))); - assertTrue(r"$".contains(new RegExp(re))); - - assertTrue("Z[\\cde".contains(new RegExp(r"^[Z-\c-e]*$"))); - - // Test that we handle \s and \S correctly on special Unicode characters. - re = r"\s"; - assertTrue("\u2028".contains(new RegExp(re))); - assertTrue("\u2029".contains(new RegExp(re))); - assertTrue("\uFEFF".contains(new RegExp(re))); - - re = r"\S"; - assertFalse("\u2028".contains(new RegExp(re))); - assertFalse("\u2029".contains(new RegExp(re))); - assertFalse("\uFEFF".contains(new RegExp(re))); - - // Test that we handle \s and \S correctly inside some bizarre - // character classes. - re = r"[\s-:]"; - assertTrue('-'.contains(new RegExp(re))); - assertTrue(':'.contains(new RegExp(re))); - assertTrue(' '.contains(new RegExp(re))); - assertTrue('\t'.contains(new RegExp(re))); - assertTrue('\n'.contains(new RegExp(re))); - assertFalse('a'.contains(new RegExp(re))); - assertFalse('Z'.contains(new RegExp(re))); - - re = r"[\S-:]"; - assertTrue('-'.contains(new RegExp(re))); - assertTrue(':'.contains(new RegExp(re))); - assertFalse(' '.contains(new RegExp(re))); - assertFalse('\t'.contains(new RegExp(re))); - assertFalse('\n'.contains(new RegExp(re))); - assertTrue('a'.contains(new RegExp(re))); - assertTrue('Z'.contains(new RegExp(re))); - - re = r"[^\s-:]"; - assertFalse('-'.contains(new RegExp(re))); - assertFalse(':'.contains(new RegExp(re))); - assertFalse(' '.contains(new RegExp(re))); - assertFalse('\t'.contains(new RegExp(re))); - assertFalse('\n'.contains(new RegExp(re))); - assertTrue('a'.contains(new RegExp(re))); - assertTrue('Z'.contains(new RegExp(re))); - - re = r"[^\S-:]"; - assertFalse('-'.contains(new RegExp(re))); - assertFalse(':'.contains(new RegExp(re))); - assertTrue(' '.contains(new RegExp(re))); - assertTrue('\t'.contains(new RegExp(re))); - assertTrue('\n'.contains(new RegExp(re))); - assertFalse('a'.contains(new RegExp(re))); - assertFalse('Z'.contains(new RegExp(re))); - - re = r"[\s]"; - assertFalse('-'.contains(new RegExp(re))); - assertFalse(':'.contains(new RegExp(re))); - assertTrue(' '.contains(new RegExp(re))); - assertTrue('\t'.contains(new RegExp(re))); - assertTrue('\n'.contains(new RegExp(re))); - assertFalse('a'.contains(new RegExp(re))); - assertFalse('Z'.contains(new RegExp(re))); - - re = r"[^\s]"; - assertTrue('-'.contains(new RegExp(re))); - assertTrue(':'.contains(new RegExp(re))); - assertFalse(' '.contains(new RegExp(re))); - assertFalse('\t'.contains(new RegExp(re))); - assertFalse('\n'.contains(new RegExp(re))); - assertTrue('a'.contains(new RegExp(re))); - assertTrue('Z'.contains(new RegExp(re))); - - re = r"[\S]"; - assertTrue('-'.contains(new RegExp(re))); - assertTrue(':'.contains(new RegExp(re))); - assertFalse(' '.contains(new RegExp(re))); - assertFalse('\t'.contains(new RegExp(re))); - assertFalse('\n'.contains(new RegExp(re))); - assertTrue('a'.contains(new RegExp(re))); - assertTrue('Z'.contains(new RegExp(re))); - - re = r"[^\S]"; - assertFalse('-'.contains(new RegExp(re))); - assertFalse(':'.contains(new RegExp(re))); - assertTrue(' '.contains(new RegExp(re))); - assertTrue('\t'.contains(new RegExp(re))); - assertTrue('\n'.contains(new RegExp(re))); - assertFalse('a'.contains(new RegExp(re))); - assertFalse('Z'.contains(new RegExp(re))); - - re = r"[\s\S]"; - assertTrue('-'.contains(new RegExp(re))); - assertTrue(':'.contains(new RegExp(re))); - assertTrue(' '.contains(new RegExp(re))); - assertTrue('\t'.contains(new RegExp(re))); - assertTrue('\n'.contains(new RegExp(re))); - assertTrue('a'.contains(new RegExp(re))); - assertTrue('Z'.contains(new RegExp(re))); - - re = r"[^\s\S]"; - assertFalse('-'.contains(new RegExp(re))); - assertFalse(':'.contains(new RegExp(re))); - assertFalse(' '.contains(new RegExp(re))); - assertFalse('\t'.contains(new RegExp(re))); - assertFalse('\n'.contains(new RegExp(re))); - assertFalse('a'.contains(new RegExp(re))); - assertFalse('Z'.contains(new RegExp(re))); - - // First - is treated as range operator, second as literal minus. - // This follows the specification in parsing, but doesn't throw on - // the \s at the beginning of the range. - re = r"[\s-0-9]"; - assertTrue(' '.contains(new RegExp(re))); - assertTrue('\xA0'.contains(new RegExp(re))); - assertTrue('-'.contains(new RegExp(re))); - assertTrue('0'.contains(new RegExp(re))); - assertTrue('9'.contains(new RegExp(re))); - assertFalse('1'.contains(new RegExp(re))); - - // Test beginning and end of line assertions with or without the - // multiline flag. - re = r"^\d+"; - assertFalse("asdf\n123".contains(new RegExp(re))); - regexp = new RegExp(r"^\d+", multiLine: true); - assertTrue("asdf\n123".contains(regexp)); - - re = r"\d+$"; - assertFalse("123\nasdf".contains(new RegExp(re))); - regexp = new RegExp(r"\d+$", multiLine: true); - assertTrue("123\nasdf".contains(regexp)); - - // Test that empty matches are handled correctly for multiline global - // regexps. - regexp = new RegExp(r"^(.*)", multiLine: true); - assertEquals(3, regexp.allMatches("a\n\rb").length); - assertEquals( - "*a\n*b\r*c\n*\r*d\r*\n*e", - "a\nb\rc\n\rd\r\ne" - .replaceAllMapped(regexp, (Match m) => "*${m.group(1)}")); - - // Test that empty matches advance one character - regexp = new RegExp(""); - assertEquals("xAx", "A".replaceAll(regexp, "x")); - assertEquals(3, new String.fromCharCode(161).replaceAll(regexp, "x").length); - - // Check for lazy RegExp literal cregexpation - lazyLiteral(doit) { - if (doit) - return "".replaceAll(new RegExp(r"foo(", caseSensitive: false), ""); - return true; - } - - assertTrue(lazyLiteral(false)); - assertThrows(() => lazyLiteral(true)); - - // Check $01 and $10 - regexp = new RegExp("(.)(.)(.)(.)(.)(.)(.)(.)(.)(.)"); - assertEquals( - "t", "123456789t".replaceAllMapped(regexp, (Match m) => m.group(10))); - assertEquals("15", - "123456789t".replaceAllMapped(regexp, (Match m) => "${m.group(1)}5")); - assertEquals( - "1", "123456789t".replaceAllMapped(regexp, (Match m) => m.group(1))); - - assertFalse("football".contains(new RegExp(r"()foo$\1")), "football1"); - assertFalse("football".contains(new RegExp(r"foo$(?=ball)")), "football2"); - assertFalse("football".contains(new RegExp(r"foo$(?!bar)")), "football3"); - assertTrue("foo".contains(new RegExp(r"()foo$\1")), "football4"); - assertTrue("foo".contains(new RegExp(r"foo$(?=(ball)?)")), "football5"); - assertTrue("foo".contains(new RegExp(r"()foo$(?!bar)")), "football6"); - assertFalse("football".contains(new RegExp(r"(x?)foo$\1")), "football7"); - assertFalse("football".contains(new RegExp(r"foo$(?=ball)")), "football8"); - assertFalse("football".contains(new RegExp(r"foo$(?!bar)")), "football9"); - assertTrue("foo".contains(new RegExp(r"(x?)foo$\1")), "football10"); - assertTrue("foo".contains(new RegExp(r"foo$(?=(ball)?)")), "football11"); - assertTrue("foo".contains(new RegExp(r"foo$(?!bar)")), "football12"); - - // Check that the back reference has two successors. See - // BackReferenceNode::PropagateForward. - assertFalse('foo'.contains(new RegExp(r"f(o)\b\1"))); - assertTrue('foo'.contains(new RegExp(r"f(o)\B\1"))); - - // Back-reference, ignore case: - // ASCII - assertEquals( - "a", - new RegExp(r"x(a)\1x", caseSensitive: false).firstMatch("xaAx").group(1), - "backref-ASCII"); - assertFalse("xaaaaa".contains(new RegExp(r"x(...)\1", caseSensitive: false)), - "backref-ASCII-short"); - assertTrue("xx".contains(new RegExp(r"x((?:))\1\1x", caseSensitive: false)), - "backref-ASCII-empty"); - assertTrue( - "xabcx".contains(new RegExp(r"x(?:...|(...))\1x", caseSensitive: false)), - "backref-ASCII-uncaptured"); - assertTrue( - "xabcABCx" - .contains(new RegExp(r"x(?:...|(...))\1x", caseSensitive: false)), - "backref-ASCII-backtrack"); - assertEquals( - "aBc", - new RegExp(r"x(...)\1\1x", caseSensitive: false) - .firstMatch("xaBcAbCABCx") - .group(1), - "backref-ASCII-twice"); - - for (var i = 0; i < 128; i++) { - var testName = "backref-ASCII-char-$i,,${i^0x20}"; - var test = new String.fromCharCodes([i, i ^ 0x20]) - .contains(new RegExp(r"^(.)\1$", caseSensitive: false)); - if (('A'.codeUnitAt(0) <= i && i <= 'Z'.codeUnitAt(0)) || - ('a'.codeUnitAt(0) <= i && i <= 'z'.codeUnitAt(0))) { - assertTrue(test, testName); - } else { - assertFalse(test, testName); - } - } - - assertFalse('foo'.contains(new RegExp(r"f(o)$\1")), "backref detects at_end"); - - // Check decimal escapes doesn't overflow. - // (Note: \214 is interpreted as octal). - assertEquals( - "\x8c7483648", - new RegExp(r"\2147483648").firstMatch("\x8c7483648").group(0), - "Overflow decimal escape"); - - // Check numbers in quantifiers doesn't overflow and doesn't throw on - // too large numbers. - assertFalse( - 'b'.contains( - new RegExp(r"a{111111111111111111111111111111111111111111111}")), - "overlarge1"); - assertFalse( - 'b'.contains( - new RegExp(r"a{999999999999999999999999999999999999999999999}")), - "overlarge2"); - assertFalse( - 'b'.contains( - new RegExp(r"a{1,111111111111111111111111111111111111111111111}")), - "overlarge3"); - assertFalse( - 'b'.contains( - new RegExp(r"a{1,999999999999999999999999999999999999999999999}")), - "overlarge4"); - assertFalse('b'.contains(new RegExp(r"a{2147483648}")), "overlarge5"); - assertFalse('b'.contains(new RegExp(r"a{21474836471}")), "overlarge6"); - assertFalse('b'.contains(new RegExp(r"a{1,2147483648}")), "overlarge7"); - assertFalse('b'.contains(new RegExp(r"a{1,21474836471}")), "overlarge8"); - assertFalse( - 'b'.contains(new RegExp(r"a{2147483648,2147483648}")), "overlarge9"); - assertFalse( - 'b'.contains(new RegExp(r"a{21474836471,21474836471}")), "overlarge10"); - assertFalse('b'.contains(new RegExp(r"a{2147483647}")), "overlarge11"); - assertFalse('b'.contains(new RegExp(r"a{1,2147483647}")), "overlarge12"); - assertTrue('a'.contains(new RegExp(r"a{1,2147483647}")), "overlarge13"); - assertFalse( - 'a'.contains(new RegExp(r"a{2147483647,2147483647}")), "overlarge14"); - - // Check that we don't repad past the end of the string. - assertFalse('b'.contains(new RegExp(r"f"))); - assertFalse('x'.contains(new RegExp(r"[abc]f"))); - assertFalse('xa'.contains(new RegExp(r"[abc]f"))); - assertFalse('x'.contains(new RegExp(r"[abc]<"))); - assertFalse('xa'.contains(new RegExp(r"[abc]<"))); - assertFalse('b'.contains(new RegExp(r"f", caseSensitive: false))); - assertFalse('x'.contains(new RegExp(r"[abc]f", caseSensitive: false))); - assertFalse('xa'.contains(new RegExp(r"[abc]f", caseSensitive: false))); - assertFalse('x'.contains(new RegExp(r"[abc]<", caseSensitive: false))); - assertFalse('xa'.contains(new RegExp(r"[abc]<", caseSensitive: false))); - assertFalse('x'.contains(new RegExp(r"f[abc]"))); - assertFalse('xa'.contains(new RegExp(r"f[abc]"))); - assertFalse('x'.contains(new RegExp(r"<[abc]"))); - assertFalse('xa'.contains(new RegExp(r"<[abc]"))); - assertFalse('x'.contains(new RegExp(r"f[abc]", caseSensitive: false))); - assertFalse('xa'.contains(new RegExp(r"f[abc]", caseSensitive: false))); - assertFalse('x'.contains(new RegExp(r"<[abc]", caseSensitive: false))); - assertFalse('xa'.contains(new RegExp(r"<[abc]", caseSensitive: false))); - - // Test that merging of quick test masks gets it right. - assertFalse('x7%%y'.contains(new RegExp(r"x([0-7]%%x|[0-6]%%y)")), 'qt'); - assertFalse( - 'xy7%%%y' - .contains(new RegExp(r"()x\1(y([0-7]%%%x|[0-6]%%%y)|dkjasldkas)")), - 'qt2'); - assertFalse( - 'xy%%%y' - .contains(new RegExp(r"()x\1(y([0-7]%%%x|[0-6]%%%y)|dkjasldkas)")), - 'qt3'); - assertFalse( - 'xy7%%%y'.contains(new RegExp(r"()x\1y([0-7]%%%x|[0-6]%%%y)")), 'qt4'); - assertFalse( - 'xy%%%y' - .contains(new RegExp(r"()x\1(y([0-7]%%%x|[0-6]%%%y)|dkjasldkas)")), - 'qt5'); - assertFalse( - 'xy7%%%y'.contains(new RegExp(r"()x\1y([0-7]%%%x|[0-6]%%%y)")), 'qt6'); - assertFalse( - 'xy7%%%y'.contains(new RegExp(r"xy([0-7]%%%x|[0-6]%%%y)")), 'qt7'); - assertFalse('x7%%%y'.contains(new RegExp(r"x([0-7]%%%x|[0-6]%%%y)")), 'qt8'); - - // Don't hang on this one. - "".contains(new RegExp(r"[^\xfe-\xff]*")); - - var longbuffer = new StringBuffer("a"); - for (var i = 0; i < 100000; i++) { - longbuffer.write("a?"); - } - var long = longbuffer.toString(); - - // Don't crash on this one, but maybe throw an exception. - try { - new RegExp(long).allMatches("a"); - } catch (e) { - assertTrue(e.toString().indexOf("Stack overflow") >= 0, "overflow"); - } - - // Test boundary-checks. - void assertRegExpTest(re, input, test) { - assertEquals( - test, input.contains(new RegExp(re)), "test:" + re + ":" + input); - } - - assertRegExpTest(r"b\b", "b", true); - assertRegExpTest(r"b\b$", "b", true); - assertRegExpTest(r"\bb", "b", true); - assertRegExpTest(r"^\bb", "b", true); - assertRegExpTest(r",\b", ",", false); - assertRegExpTest(r",\b$", ",", false); - assertRegExpTest(r"\b,", ",", false); - assertRegExpTest(r"^\b,", ",", false); - - assertRegExpTest(r"b\B", "b", false); - assertRegExpTest(r"b\B$", "b", false); - assertRegExpTest(r"\Bb", "b", false); - assertRegExpTest(r"^\Bb", "b", false); - assertRegExpTest(r",\B", ",", true); - assertRegExpTest(r",\B$", ",", true); - assertRegExpTest(r"\B,", ",", true); - assertRegExpTest(r"^\B,", ",", true); - - assertRegExpTest(r"b\b", "b,", true); - assertRegExpTest(r"b\b", "ba", false); - assertRegExpTest(r"b\B", "b,", false); - assertRegExpTest(r"b\B", "ba", true); - - assertRegExpTest(r"b\Bb", "bb", true); - assertRegExpTest(r"b\bb", "bb", false); - - assertRegExpTest(r"b\b[,b]", "bb", false); - assertRegExpTest(r"b\B[,b]", "bb", true); - assertRegExpTest(r"b\b[,b]", "b,", true); - assertRegExpTest(r"b\B[,b]", "b,", false); - - assertRegExpTest(r"[,b]\bb", "bb", false); - assertRegExpTest(r"[,b]\Bb", "bb", true); - assertRegExpTest(r"[,b]\bb", ",b", true); - assertRegExpTest(r"[,b]\Bb", ",b", false); - - assertRegExpTest(r"[,b]\b[,b]", "bb", false); - assertRegExpTest(r"[,b]\B[,b]", "bb", true); - assertRegExpTest(r"[,b]\b[,b]", ",b", true); - assertRegExpTest(r"[,b]\B[,b]", ",b", false); - assertRegExpTest(r"[,b]\b[,b]", "b,", true); - assertRegExpTest(r"[,b]\B[,b]", "b,", false); - - // Skipped tests from V8: - - // Test that caching of result doesn't share result objects. - // More iterations increases the chance of hitting a GC. - - // Test that we perform the spec required conversions in the correct order. - - // Check that properties of RegExp have the correct permissions. - - // Check that end-anchored regexps are optimized correctly. - re = r"(?:a|bc)g$"; - assertTrue("ag".contains(new RegExp(re))); - assertTrue("bcg".contains(new RegExp(re))); - assertTrue("abcg".contains(new RegExp(re))); - assertTrue("zimbag".contains(new RegExp(re))); - assertTrue("zimbcg".contains(new RegExp(re))); - - assertFalse("g".contains(new RegExp(re))); - assertFalse("".contains(new RegExp(re))); - - // Global regexp (non-zero start). - re = r"(?:a|bc)g$"; - assertTrue("ag".contains(new RegExp(re))); - // Near start of string. - assertTrue(new RegExp(re).allMatches("zimbag", 1).isNotEmpty); - // At end of string. - assertTrue(new RegExp(re).allMatches("zimbag", 6).isEmpty); - // Near end of string. - assertTrue(new RegExp(re).allMatches("zimbag", 5).isEmpty); - assertTrue(new RegExp(re).allMatches("zimbag", 4).isNotEmpty); - - // Anchored at both ends. - re = r"^(?:a|bc)g$"; - assertTrue("ag".contains(new RegExp(re))); - assertTrue(new RegExp(re).allMatches("ag", 1).isEmpty); - assertTrue(new RegExp(re).allMatches("zag", 1).isEmpty); - - // Long max_length of RegExp. - re = r"VeryLongRegExp!{1,1000}$"; - assertTrue("BahoolaVeryLongRegExp!!!!!!".contains(new RegExp(re))); - assertFalse("VeryLongRegExp".contains(new RegExp(re))); - assertFalse("!".contains(new RegExp(re))); - - // End anchor inside disjunction. - re = r"(?:a$|bc$)"; - assertTrue("a".contains(new RegExp(re))); - assertTrue("bc".contains(new RegExp(re))); - assertTrue("abc".contains(new RegExp(re))); - assertTrue("zimzamzumba".contains(new RegExp(re))); - assertTrue("zimzamzumbc".contains(new RegExp(re))); - assertFalse("c".contains(new RegExp(re))); - assertFalse("".contains(new RegExp(re))); - - // Only partially anchored. - re = r"(?:a|bc$)"; - assertTrue("a".contains(new RegExp(re))); - assertTrue("bc".contains(new RegExp(re))); - assertEquals("a", new RegExp(re).firstMatch("abc").group(0)); - assertEquals(4, new RegExp(re).firstMatch("zimzamzumba").start); - assertEquals("bc", new RegExp(re).firstMatch("zimzomzumbc").group(0)); - assertFalse("c".contains(new RegExp(re))); - assertFalse("".contains(new RegExp(re))); - - // Valid syntax in ES5. - regexp = new RegExp("(?:x)*"); - regexp = new RegExp("(x)*"); - - // Syntax extension relative to ES5, for matching JSC (and ES3). - // Shouldn't throw. - regexp = new RegExp("(?=x)*"); - regexp = new RegExp("(?!x)*"); - - // Should throw. Shouldn't hit asserts in debug mode. - assertThrows(() => new RegExp('(*)')); - assertThrows(() => new RegExp('(?:*)')); - assertThrows(() => new RegExp('(?=*)')); - assertThrows(() => new RegExp('(?!*)')); - - // Test trimmed regular expression for RegExp.test(). - assertTrue("abc".contains(new RegExp(r".*abc"))); - assertFalse("q".contains(new RegExp(r".*\d+"))); - - // Tests skipped from V8: - // Test that RegExp.prototype.toString() throws TypeError for - // incompatible receivers (ES5 section 15.10.6 and 15.10.6.4). - testSticky(); -} - -testSticky() { - var regexp = new RegExp(r"foo.bar"); - Expect.isNotNull(regexp.matchAsPrefix("foo_bar", 0)); - Expect.isNull(regexp.matchAsPrefix("..foo_bar", 0)); - Expect.isNotNull(regexp.matchAsPrefix("..foo_bar", 2)); - - regexp = new RegExp(r"^foo"); - Expect.isNotNull(regexp.matchAsPrefix("foobar", 0)); - Expect.isNull(regexp.matchAsPrefix("..foo", 0)); - Expect.isNull(regexp.matchAsPrefix("..foo", 2)); - - regexp = new RegExp(r"^foo", multiLine: true); - Expect.isNotNull(regexp.matchAsPrefix("foobar", 0)); - Expect.isNull(regexp.matchAsPrefix("..\nfoo", 0)); - Expect.isNotNull(regexp.matchAsPrefix("..\nfoo", 3)); - Expect.isNull(regexp.matchAsPrefix("..\nfoofoo", 6)); - - regexp = new RegExp(r"bar$"); - Expect.isNull(regexp.matchAsPrefix("foobar", 0)); - Expect.isNotNull(regexp.matchAsPrefix("foobar", 3)); -} diff --git a/tests/corelib_2/regexp/regress-6-9-regexp_test.dart b/tests/corelib_2/regexp/regress-6-9-regexp_test.dart deleted file mode 100644 index f35c8787717..00000000000 --- a/tests/corelib_2/regexp/regress-6-9-regexp_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2009 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - // Check that the perfect mask check isn't overly optimistic. - - assertFalse(new RegExp(r"[6-9]").hasMatch('2')); -} diff --git a/tests/corelib_2/regexp/regress-regexp-codeflush_test.dart b/tests/corelib_2/regexp/regress-regexp-codeflush_test.dart deleted file mode 100644 index 6e1ac5fb93d..00000000000 --- a/tests/corelib_2/regexp/regress-regexp-codeflush_test.dart +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2011 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - // Flags: --gc_global - - // Regression test for regexp that has multiple matches and which - // internally calls RegExpImpl::IrregexpExecOnce more than once without - // ensuring that the regexp is compiled. - // This can create a crash if the code was exchanged with the sweep - // generation (for code flushing support) in GC during the matching. - - var re = new RegExp('(s)'); - - String foo(Match m) { - return "42"; - } - - // Run enough times to get a number of GC's (all mark sweep because of the - // --gc_global) flag. - for (var i = 0; i < 10; i++) { - // Make a long string with plenty of matches for re. - var x = "s foo s bar s foo s bar s"; - x = x + x; - x = x + x; - x = x + x; - x = x + x; - x = x + x; - x = x + x; - x = x + x; - x.replaceAllMapped(re, foo); - } -} diff --git a/tests/corelib_2/regexp/regress-regexp-construct-result_test.dart b/tests/corelib_2/regexp/regress-regexp-construct-result_test.dart deleted file mode 100644 index 764b1bfde77..00000000000 --- a/tests/corelib_2/regexp/regress-regexp-construct-result_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - // Create a huge regexp with many alternative capture groups, most of - // which do not capture anything, but the corresponding capture slot - // in the result object has to exist, even though filled with null. - // Having a large result array helps stressing GC. - - var num_captures = 1000; - var regexp_string = "(a)"; - for (var i = 0; i < num_captures - 1; i++) { - regexp_string += "|(b)"; - } - var regexp = new RegExp(regexp_string); - - for (var i = 0; i < 10; i++) { - var matches = regexp.firstMatch("a"); - var count = 0; - assertEquals(num_captures + 1, matches.groupCount + 1); - } -} diff --git a/tests/corelib_2/regexp/repeat-match-waldemar_test.dart b/tests/corelib_2/regexp/repeat-match-waldemar_test.dart deleted file mode 100644 index 10ff028cdc8..00000000000 --- a/tests/corelib_2/regexp/repeat-match-waldemar_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - // "Some test cases identified by Waldemar Horwat in response to this bug: - // https:new RegExp(r"/bugs.webkit.org")show_bug.cgi?id=48101" - - shouldBe(new RegExp(r"(?:a*?){2,}").firstMatch("aa"), ["aa"]); - shouldBe(new RegExp(r"(?:a*?){2,}").firstMatch("a"), ["a"]); - shouldBe(new RegExp(r"(?:a*?){2,}").firstMatch(""), [""]); - - shouldBe(new RegExp(r"(?:a*?)").firstMatch("aa"), [""]); - shouldBe(new RegExp(r"(?:a*?)").firstMatch("a"), [""]); - shouldBe(new RegExp(r"(?:a*?)").firstMatch(""), [""]); - - shouldBe(new RegExp(r"(?:a*?)(?:a*?)(?:a*?)").firstMatch("aa"), [""]); - shouldBe(new RegExp(r"(?:a*?)(?:a*?)(?:a*?)").firstMatch("a"), [""]); - shouldBe(new RegExp(r"(?:a*?)(?:a*?)(?:a*?)").firstMatch(""), [""]); - - shouldBe(new RegExp(r"(?:a*?){2}").firstMatch("aa"), [""]); - shouldBe(new RegExp(r"(?:a*?){2}").firstMatch("a"), [""]); - shouldBe(new RegExp(r"(?:a*?){2}").firstMatch(""), [""]); - - shouldBe(new RegExp(r"(?:a*?){2,3}").firstMatch("aa"), ["a"]); - shouldBe(new RegExp(r"(?:a*?){2,3}").firstMatch("a"), ["a"]); - shouldBe(new RegExp(r"(?:a*?){2,3}").firstMatch(""), [""]); - - shouldBe(new RegExp(r"(?:a*?)?").firstMatch("aa"), ["a"]); - shouldBe(new RegExp(r"(?:a*?)?").firstMatch("a"), ["a"]); - shouldBe(new RegExp(r"(?:a*?)?").firstMatch(""), [""]); - - shouldBe(new RegExp(r"(?:a*?)*").firstMatch("aa"), ["aa"]); - shouldBe(new RegExp(r"(?:a*?)*").firstMatch("a"), ["a"]); - shouldBe(new RegExp(r"(?:a*?)*").firstMatch(""), [""]); -} diff --git a/tests/corelib_2/regexp/results-cache_test.dart b/tests/corelib_2/regexp/results-cache_test.dart deleted file mode 100644 index 4e75e4a92b9..00000000000 --- a/tests/corelib_2/regexp/results-cache_test.dart +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2012 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - // Long string to trigger caching. - var string = """Friends, Romans, countrymen, lend me your ears! - I come to bury Caesar, not to praise him. - The evil that men do lives after them, - The good is oft interred with their bones; - So let it be with Caesar. The noble Brutus - Hath told you Caesar was ambitious; - If it were so, it was a grievous fault, - And grievously hath Caesar answer'd it. - Here, under leave of Brutus and the rest- - For Brutus is an honorable man; - So are they all, all honorable men- - Come I to speak in Caesar's funeral. - He was my friend, faithful and just to me; - But Brutus says he was ambitious, - And Brutus is an honorable man. - He hath brought many captives home to Rome, - Whose ransoms did the general coffers fill. - Did this in Caesar seem ambitious? - When that the poor have cried, Caesar hath wept; - Ambition should be made of sterner stuff: - Yet Brutus says he was ambitious, - And Brutus is an honorable man. - You all did see that on the Lupercal - I thrice presented him a kingly crown, - Which he did thrice refuse. Was this ambition? - Yet Brutus says he was ambitious, - And sure he is an honorable man. - I speak not to disprove what Brutus spoke, - But here I am to speak what I do know. - You all did love him once, not without cause; - What cause withholds you then to mourn for him? - O judgement, thou art fled to brutish beasts, - And men have lost their reason. Bear with me; - My heart is in the coffin there with Caesar, - And I must pause till it come back to me."""; - - var replaced = string.replaceAll(new RegExp(r"\b\w+\b"), "foo"); - for (var i = 0; i < 3; i++) { - assertEquals(replaced, string.replaceAll(new RegExp(r"\b\w+\b"), "foo")); - } - - // Check that the result is in a COW array. - var words = string.split(" "); - assertEquals("Friends,", words[0]); - words[0] = "Enemies,"; - words = string.split(" "); - assertEquals("Friends,", words[0]); -} diff --git a/tests/corelib_2/regexp/stack-overflow2_test.dart b/tests/corelib_2/regexp/stack-overflow2_test.dart deleted file mode 100644 index e5c071ffffa..00000000000 --- a/tests/corelib_2/regexp/stack-overflow2_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -// Failing tests extracted from pcre_test.dart. Large generated functions -// cause a stack overflow in DiscoverBlocks(). - -void main() { - var res149 = new RegExp( - r"(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\d+(?:\s|$))(\w+)\s+(\270)", - caseSensitive: false); - - assertToStringEquals( - "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 ABC ABC,1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 ,10 ,11 ,12 ,13 ,14 ,15 ,16 ,17 ,18 ,19 ,20 ,21 ,22 ,23 ,24 ,25 ,26 ,27 ,28 ,29 ,30 ,31 ,32 ,33 ,34 ,35 ,36 ,37 ,38 ,39 ,40 ,41 ,42 ,43 ,44 ,45 ,46 ,47 ,48 ,49 ,50 ,51 ,52 ,53 ,54 ,55 ,56 ,57 ,58 ,59 ,60 ,61 ,62 ,63 ,64 ,65 ,66 ,67 ,68 ,69 ,70 ,71 ,72 ,73 ,74 ,75 ,76 ,77 ,78 ,79 ,80 ,81 ,82 ,83 ,84 ,85 ,86 ,87 ,88 ,89 ,90 ,91 ,92 ,93 ,94 ,95 ,96 ,97 ,98 ,99 ,100 ,101 ,102 ,103 ,104 ,105 ,106 ,107 ,108 ,109 ,110 ,111 ,112 ,113 ,114 ,115 ,116 ,117 ,118 ,119 ,120 ,121 ,122 ,123 ,124 ,125 ,126 ,127 ,128 ,129 ,130 ,131 ,132 ,133 ,134 ,135 ,136 ,137 ,138 ,139 ,140 ,141 ,142 ,143 ,144 ,145 ,146 ,147 ,148 ,149 ,150 ,151 ,152 ,153 ,154 ,155 ,156 ,157 ,158 ,159 ,160 ,161 ,162 ,163 ,164 ,165 ,166 ,167 ,168 ,169 ,170 ,171 ,172 ,173 ,174 ,175 ,176 ,177 ,178 ,179 ,180 ,181 ,182 ,183 ,184 ,185 ,186 ,187 ,188 ,189 ,190 ,191 ,192 ,193 ,194 ,195 ,196 ,197 ,198 ,199 ,200 ,201 ,202 ,203 ,204 ,205 ,206 ,207 ,208 ,209 ,210 ,211 ,212 ,213 ,214 ,215 ,216 ,217 ,218 ,219 ,220 ,221 ,222 ,223 ,224 ,225 ,226 ,227 ,228 ,229 ,230 ,231 ,232 ,233 ,234 ,235 ,236 ,237 ,238 ,239 ,240 ,241 ,242 ,243 ,244 ,245 ,246 ,247 ,248 ,249 ,250 ,251 ,252 ,253 ,254 ,255 ,256 ,257 ,258 ,259 ,260 ,261 ,262 ,263 ,264 ,265 ,266 ,267 ,268 ,269 ,ABC,ABC", - res149.firstMatch( - "O900 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 ABC ABC"), - 242); -} diff --git a/tests/corelib_2/regexp/stack-overflow_test.dart b/tests/corelib_2/regexp/stack-overflow_test.dart deleted file mode 100644 index b6992379678..00000000000 --- a/tests/corelib_2/regexp/stack-overflow_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - 'Test for bug 8870: Crash typing in Yahoo auto-complete widget.'); - - var re = new RegExp( - r'^(\s+|[,:{}\[\]]|"(\\["\\\/bfnrtu]|[^\u0000-\u001f"\\]+)*"|-?\d+(\.\d*)?([eE][+-]?\d+)?|true|false|null)+$'); - - var result = re.firstMatch( - '{"ResultSet":{"totalResultsAvailable":"101000000","totalResultsReturned":100,"firstResultPosition":1,"Result":[{"Title":"Solar Eclipses of Saros 132","Summary":"Solar Eclipses of Saros 132 Solar Eclipses of Saros 132 The periodicity and recurrence of solar (and lunar) eclipses is governed by the Saros cycle, a period of approximately 6,585. 3 days (18 years 11 days 8 hours). When two eclipses are ...","Url":"http:\\/\\/sunearth.gsfc.nasa.gov\\/eclipse\\/SEsaros\\/SEsaros132.html","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBUBzdmMwF;_ylu=X3oDMTB2cXVjNTM5BGNvbG8DdwRsA1dTMQRwb3MDMQRzZWMDc3IEdnRpZAM-\\/SIG=19ip3vo9u\\/EXP=1147592336\\/**http%3a\\/\\/rdrw1.yahoo.com\\/click%3fu=http%3a\\/\\/sunearth.gsfc.nasa.gov\\/eclipse\\/SEsaros\\/SEsaros132.html%26y=0405DC60F30D6DD673%26i=482%26c=15685%26q=02%255ESSHPM%255BL7.,-6%26e=utf-8%26r=0%26d=wow%7eWBSV-en-us%26n=3O6KG7JU5PIK8T7I%26s=6%26t=%26m=44658D10%26x=05A6B5FDC2F29725CD6EE467684E0FE76D","ModificationDate":1146207600,"MimeType":"text\\/html"},{"Title":"Psalms 132 -Matthew Henry\'s Commentary - Bible Software by johnhurt.com","Summary":"Psalms 132 - Matthew Henry Commentary - Bible Software by johnhurt.com ... Henry\'s Psalms 131. Psalms 132. Outline of Psalms 132. David\'s care for the ark ...","Url":"http:\\/\\/www.htmlbible.com\\/kjv30\\/henry\\/H19C132.htm","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBVhzdmMwF;_ylu=X3oDMTB2ZjQ4dDExBGNvbG8DdwRsA1dTMQRwb3MDMgRzZWMDc3IEdnRpZAM-\\/SIG=1246fjpfq\\/EXP=1147592336\\/**http%3a\\/\\/www.htmlbible.com\\/kjv30\\/henry\\/H19C132.htm","ModificationDate":1015660800,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBWxzdmMwF;_ylu=X3oDMTBwZG5hOWwzBGNvbG8DdwRwb3MDMgRzZWMDc3IEdnRpZAM-\\/SIG=16llm3b1a\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.htmlbible.com\\/kjv30\\/henry\\/H19C132.htm%26w=132%26d=XlIIG0aqMlsm%26icp=1%26.intl=us","Size":"4160"}},{"Title":"General requirements. - 1910.132","Summary":"General%20requirements.%20-%201910.132 ... Regulations (Standards - 29 CFR) General requirements. - 1910.132 ... of any part of the body through absorption, inhalation or physical contact. 1910.132(b) Employee-owned equipment ...","Url":"http:\\/\\/www.osha.gov\\/pls\\/oshaweb\\/owadisp.show_document?p_table=STANDARDS&p_id=9777","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBXRzdmMwF;_ylu=X3oDMTB2M3MzdmZoBGNvbG8DdwRsA1dTMQRwb3MDMwRzZWMDc3IEdnRpZAM-\\/SIG=13916ebti\\/EXP=1147592336\\/**http%3a\\/\\/www.osha.gov\\/pls\\/oshaweb\\/owadisp.show_document%3fp_table=STANDARDS%26p_id=9777","ModificationDate":1147330800,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBYhzdmMwF;_ylu=X3oDMTBwZ2dpZ2ZkBGNvbG8DdwRwb3MDMwRzZWMDc3IEdnRpZAM-\\/SIG=186osem1n\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.osha.gov\\/pls\\/oshaweb\\/owadisp.show_document%253Fp_table%253DSTANDARDS%2526p_id%253D9777%26w=132%26d=Ujn5sEaqMw88%26icp=1%26.intl=us","Size":"29922"}},{"Title":"USCCB - NAB - Psalm 132","Summary":"Chapter 132. 1. 1 A song of ascents. 2 LORD, remember David and all his anxious care; 2. 3 How he swore an oath to the LORD, vowed to the Mighty One of Jacob: 3. \\"I will not enter the house where I live, nor lie on the couch where I sleep; ... 1 [Psalm 132] A song for a liturgical ceremony in which the ark, the throne of Israel\'s God, was carried in ...","Url":"http:\\/\\/www.usccb.org\\/nab\\/bible\\/psalms\\/psalm132.htm","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBZBzdmMwF;_ylu=X3oDMTB2OWM1MXQ5BGNvbG8DdwRsA1dTMQRwb3MDNARzZWMDc3IEdnRpZAM-\\/SIG=126n03p75\\/EXP=1147592336\\/**http%3a\\/\\/www.usccb.org\\/nab\\/bible\\/psalms\\/psalm132.htm","ModificationDate":1054623600,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBaRzdmMwF;_ylu=X3oDMTBwYzFnNmkxBGNvbG8DdwRwb3MDNARzZWMDc3IEdnRpZAM-\\/SIG=16nvcm74b\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.usccb.org\\/nab\\/bible\\/psalms\\/psalm132.htm%26w=132%26d=FMBGyUaqMh-a%26icp=1%26.intl=us","Size":"8840"}},{"Title":"* City of Lost Dreams Mod *","Summary":"Mafia game modification","Url":"http:\\/\\/www.citizen-132.com\\/","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBaxzdmMwF;_ylu=X3oDMTB2NW50aG1hBGNvbG8DdwRsA1dTMQRwb3MDNQRzZWMDc3IEdnRpZAM-\\/SIG=11fnqlf31\\/EXP=1147592336\\/**http%3a\\/\\/www.citizen-132.com\\/","ModificationDate":1107676800,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBcBzdmMwF;_ylu=X3oDMTBwdDJ0dDBoBGNvbG8DdwRwb3MDNQRzZWMDc3IEdnRpZAM-\\/SIG=160jdk4g3\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.citizen-132.com\\/%26w=132%26d=ZiSHAkaqMuny%26icp=1%26.intl=us","Size":"6861"}},{"Title":"BibleGateway.com: Search for a Bible passage in over 35 languages and 50 versions.","Summary":"English (EN) Espa\\u00f1ol (ES) Passage results ... Footnotes: Psalm 132:6 That is, Kiriath Jearim. Psalm 132:6 Or heard of it in ...","Url":"http:\\/\\/www.biblegateway.com\\/passage\\/?book_id=23&chapter=132&version=31","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBchzdmMwF;_ylu=X3oDMTB2azJrdmpwBGNvbG8DdwRsA1dTMQRwb3MDNgRzZWMDc3IEdnRpZAM-\\/SIG=1300p6cfh\\/EXP=1147592336\\/**http%3a\\/\\/www.biblegateway.com\\/passage\\/%3fbook_id=23%26chapter=132%26version=31","ModificationDate":1147158000,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBdxzdmMwF;_ylu=X3oDMTBwYmwxdWo4BGNvbG8DdwRwb3MDNgRzZWMDc3IEdnRpZAM-\\/SIG=183q9adk2\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.biblegateway.com\\/passage\\/%253Fbook_id%253D23%2526chapter%253D132%2526version%253D31%26w=132%26d=XUM-1kaqMwKY%26icp=1%26.intl=us","Size":"27373"}},{"Title":"132 - Wikipedia, the free encyclopedia","Summary":"From Wikipedia, the free encyclopedia. This article is about the year. For other uses, see 132 (number). Events. Roman Empire. The Olympeion in Athens is completed ... Your continued donations keep Wikipedia running! 132. From Wikipedia, the free encyclopedia ... For other uses, see 132 (number). Years: 128 129 130 131 - 132 - 133 134 135 136 ...","Url":"http:\\/\\/en.wikipedia.org\\/wiki\\/132","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBeRzdmMwF;_ylu=X3oDMTB2bDEyNXM5BGNvbG8DdwRsA1dTMQRwb3MDNwRzZWMDc3IEdnRpZAM-\\/SIG=11k81281i\\/EXP=1147592336\\/**http%3a\\/\\/en.wikipedia.org\\/wiki\\/132","ModificationDate":1145862000,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBfhzdmMwF;_ylu=X3oDMTBwMTB0ZWFoBGNvbG8DdwRwb3MDNwRzZWMDc3IEdnRpZAM-\\/SIG=165kmnv8l\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=en.wikipedia.org\\/wiki\\/132%26w=132%26d=OcxF4UaqMuf2%26icp=1%26.intl=us","Size":"15956"}},{"Title":"BBC SPORT | Football | Internationals","Summary":"Visit BBC Sport for all the action as it happens - up-to-the-minute news, results, breaking news, video, audio and feature stories. BBC Sport covers the major events and all the professional football clubs in the UK, plus cricket, rugby, golf, ...","Url":"http:\\/\\/news.bbc.co.uk\\/sport1\\/hi\\/football\\/internationals\\/default.stm","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBgBzdmMwF;_ylu=X3oDMTB2bTU4Zm85BGNvbG8DdwRsA1dTMQRwb3MDOARzZWMDc3IEdnRpZAM-\\/SIG=12n3aafin\\/EXP=1147592336\\/**http%3a\\/\\/news.bbc.co.uk\\/sport1\\/hi\\/football\\/internationals\\/default.stm","ModificationDate":1147417200,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBhRzdmMwF;_ylu=X3oDMTBwYTZ1aGtmBGNvbG8DdwRwb3MDOARzZWMDc3IEdnRpZAM-\\/SIG=178rplb9d\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=news.bbc.co.uk\\/sport1\\/hi\\/football\\/internationals\\/default.stm%26w=132%26d=PmSx-kaqMw8o%26icp=1%26.intl=us","Size":"52634"}},{"Title":"Metro Route 132 Timetable, Weekday","Summary":"... Custom Print Help. 132. Weekday: Feb. 11 thru June 2, 2006 ...","Url":"http:\\/\\/transit.metrokc.gov\\/tops\\/bus\\/schedules\\/s132_0_.html","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBhxzdmMwF;_ylu=X3oDMTB2dW8yNmN0BGNvbG8DdwRsA1dTMQRwb3MDOQRzZWMDc3IEdnRpZAM-\\/SIG=12eusl28m\\/EXP=1147592336\\/**http%3a\\/\\/transit.metrokc.gov\\/tops\\/bus\\/schedules\\/s132_0_.html","ModificationDate":1146553200,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBjBzdmMwF;_ylu=X3oDMTBwOTRzYmZlBGNvbG8DdwRwb3MDOQRzZWMDc3IEdnRpZAM-\\/SIG=16vd4gkvv\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=transit.metrokc.gov\\/tops\\/bus\\/schedules\\/s132_0_.html%26w=132%26d=Nvq_ekaqMulb%26icp=1%26.intl=us","Size":"27482"}},{"Title":"BBC NEWS | Politics | Bush arrives for state visit","Summary":"George Bush arrives in the UK for the first state visit by a US president amid some of the tightest security London has seen.","Url":"http:\\/\\/news.bbc.co.uk\\/1\\/hi\\/uk_politics\\/3279179.stm","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBjhzdmMwF;_ylu=X3oDMTEwc3RuNTk4BGNvbG8DdwRsA1dTMQRwb3MDMTAEc2VjA3NyBHZ0aWQD\\/SIG=126am8694\\/EXP=1147592336\\/**http%3a\\/\\/news.bbc.co.uk\\/1\\/hi\\/uk_politics\\/3279179.stm","ModificationDate":1147417200,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBkxzdmMwF;_ylu=X3oDMTBxNTUzbTg4BGNvbG8DdwRwb3MDMTAEc2VjA3NyBHZ0aWQD\\/SIG=16nt5u57o\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=news.bbc.co.uk\\/1\\/hi\\/uk_politics\\/3279179.stm%26w=132%26d=CxDE2UaqMw8U%26icp=1%26.intl=us","Size":"43537"}},{"Title":"132 (number) - Wikipedia, the free encyclopedia","Summary":"... you can make from 132, you get 132: 12 + 13 + 21 + 23 + 31 + 32 = 132. 132 is the smallest number ...","Url":"http:\\/\\/en.wikipedia.org\\/wiki\\/132_(number)","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBlRzdmMwF;_ylu=X3oDMTEwNXN0b3YwBGNvbG8DdwRsA1dTMQRwb3MDMTEEc2VjA3NyBHZ0aWQD\\/SIG=11thbnu67\\/EXP=1147592336\\/**http%3a\\/\\/en.wikipedia.org\\/wiki\\/132_(number)","ModificationDate":1145430000,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBmhzdmMwF;_ylu=X3oDMTBxYnA3amlzBGNvbG8DdwRwb3MDMTEEc2VjA3NyBHZ0aWQD\\/SIG=16m4qjjlq\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=en.wikipedia.org\\/wiki\\/132_%2528number%2529%26w=132%26d=Ygdh6EaqMsBb%26icp=1%26.intl=us","Size":"13154"}},{"Title":"Psalms, Chapter 132","Summary":"King James Reference Suite - Bible Software by johnhurt.com ... Chapter 132. 1. Lord, remember David, and all his afflictions ... Notes on Chapter 132. 1. 2. 3 ...","Url":"http:\\/\\/www.htmlbible.com\\/kjv30\\/B19C132.htm","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBnBzdmMwF;_ylu=X3oDMTEwNmgxNTZoBGNvbG8DdwRsA1dTMQRwb3MDMTIEc2VjA3NyBHZ0aWQD\\/SIG=11uujk8hq\\/EXP=1147592336\\/**http%3a\\/\\/www.htmlbible.com\\/kjv30\\/B19C132.htm","ModificationDate":1079942400,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBoRzdmMwF;_ylu=X3oDMTBxN2cybDkwBGNvbG8DdwRwb3MDMTIEc2VjA3NyBHZ0aWQD\\/SIG=16fpgk3vj\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.htmlbible.com\\/kjv30\\/B19C132.htm%26w=132%26d=TaFtBUaqMwcr%26icp=1%26.intl=us","Size":"8721"}},{"Title":"SPACE.com -- Privately Funded SpaceShipOne Breaks Sound Barrier","Summary":"A privately financed passenger-carrying sub-orbital rocket plane screamed its way through the sound barrier today, the 100th anniversary of the Wright Brothers historic 12-second flight over Kitty Hawk, North Carolina.","Url":"http:\\/\\/www.space.com\\/businesstechnology\\/technology\\/rutan_update_031217.html","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBoxzdmMwF;_ylu=X3oDMTEwNHRmcnV0BGNvbG8DdwRsA1dTMQRwb3MDMTMEc2VjA3NyBHZ0aWQD\\/SIG=12vltjpcd\\/EXP=1147592336\\/**http%3a\\/\\/www.space.com\\/businesstechnology\\/technology\\/rutan_update_031217.html","ModificationDate":1147330800,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBqBzdmMwF;_ylu=X3oDMTBxajcxM3AwBGNvbG8DdwRwb3MDMTMEc2VjA3NyBHZ0aWQD\\/SIG=17g6i6br5\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.space.com\\/businesstechnology\\/technology\\/rutan_update_031217.html%26w=132%26d=CklT2kaqMwqb%26icp=1%26.intl=us","Size":"39319"}},{"Title":"D&C 132","Summary":"THE DOCTRINE AND COVENANTS. SECTION 132 ... LDS HomeScriptures Doctrine and Covenants Sections Section 132. Prev | Next ... SECTION 132. Revelation given through Joseph Smith the Prophet, at Nauvoo, Illinois, recorded July 12, 1843 ...","Url":"http:\\/\\/scriptures.lds.org\\/dc\\/132","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBqhzdmMwF;_ylu=X3oDMTEwamo4ZjVjBGNvbG8DdwRsA1dTMQRwb3MDMTQEc2VjA3NyBHZ0aWQD\\/SIG=11k67f7oi\\/EXP=1147592336\\/**http%3a\\/\\/scriptures.lds.org\\/dc\\/132","ModificationDate":1146985200,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBrxzdmMwF;_ylu=X3oDMTBxcDhuOXFrBGNvbG8DdwRwb3MDMTQEc2VjA3NyBHZ0aWQD\\/SIG=165qbp40u\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=scriptures.lds.org\\/dc\\/132%26w=132%26d=KIW1S0aqMwF3%26icp=1%26.intl=us","Size":"51549"}},{"Title":"State Representative District 132","Summary":"State Representative District 132. State Representative District 132 is shaded area. SACO. BIDDEFORD. 127. 132. 133. 136. OLD ORCHARD BEACH. SACO","Url":"http:\\/\\/mainegov-images.informe.org\\/sos\\/cec\\/elec\\/apport\\/House\\/h132.pdf","ClickUrl":"http:\\/\\/mainegov-images.informe.org\\/sos\\/cec\\/elec\\/apport\\/House\\/h132.pdf#search=\'\'","ModificationDate":1075968000,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBtBzdmMwF;_ylu=X3oDMTBxbnZxbGc1BGNvbG8DdwRwb3MDMTUEc2VjA3NyBHZ0aWQD\\/SIG=17at7erej\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=mainegov-images.informe.org\\/sos\\/cec\\/elec\\/apport\\/House\\/h132.pdf%26w=132%26d=DsRim0aqMiIQ%26icp=1%26.intl=us","Size":"129767"}},{"Title":"BLB Psa 132","Summary":"We apologize, but the page layout is not visible because you are using an older browser. We recommend upgrading to a standards-compliant browser. Without such, this page will remain viewable, though unformatted.","Url":"http:\\/\\/www.blueletterbible.org\\/kjv\\/Psa\\/Psa132.html","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBthzdmMwF;_ylu=X3oDMTEwdXRzN2p1BGNvbG8DdwRsA1dTMQRwb3MDMTYEc2VjA3NyBHZ0aWQD\\/SIG=126nkscdr\\/EXP=1147592336\\/**http%3a\\/\\/www.blueletterbible.org\\/kjv\\/Psa\\/Psa132.html","ModificationDate":1146985200,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBuxzdmMwF;_ylu=X3oDMTBxdWpsMnAxBGNvbG8DdwRwb3MDMTYEc2VjA3NyBHZ0aWQD\\/SIG=16nmo95in\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.blueletterbible.org\\/kjv\\/Psa\\/Psa132.html%26w=132%26d=RzXlkkaqMwDE%26icp=1%26.intl=us","Size":"40835"}},{"Title":"ADL Found Guilty Of Spying By California Court","Summary":"ADL Found Guilty Of Spying. By California Court. By Barbara Ferguson. Arab News Correspondent. 4-27-2","Url":"http:\\/\\/www.rense.com\\/general24\\/adl.htm","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBvRzdmMwF;_ylu=X3oDMTEwcm5pb3BuBGNvbG8DdwRsA1dTMQRwb3MDMTcEc2VjA3NyBHZ0aWQD\\/SIG=11qjguns4\\/EXP=1147592336\\/**http%3a\\/\\/www.rense.com\\/general24\\/adl.htm","ModificationDate":1019890800,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBwhzdmMwF;_ylu=X3oDMTBxN2RrOGV1BGNvbG8DdwRwb3MDMTcEc2VjA3NyBHZ0aWQD\\/SIG=16bnmcrht\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.rense.com\\/general24\\/adl.htm%26w=132%26d=Xkre4EaqMuwO%26icp=1%26.intl=us","Size":"5916"}},{"Title":"FindLaw for Legal Professionals - Case Law, Federal and State Resources, Forms, and Code","Summary":"FindLaw for Legal Professionals is a free resource for attorneys that includes online case law, free state codes, free federal codes, free legal forms, and a directory of products and services for lawyers. This online legal Web site also includes...","Url":"http:\\/\\/caselaw.lp.findlaw.com\\/cgi-bin\\/getcase.pl?court=US&vol=391&invol=936","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBxBzdmMwF;_ylu=X3oDMTEwa2drb20xBGNvbG8DdwRsA1dTMQRwb3MDMTgEc2VjA3NyBHZ0aWQD\\/SIG=135rsl3q8\\/EXP=1147592336\\/**http%3a\\/\\/caselaw.lp.findlaw.com\\/cgi-bin\\/getcase.pl%3fcourt=US%26vol=391%26invol=936","ModificationDate":1147330800,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcByRzdmMwF;_ylu=X3oDMTBxZGJndmNzBGNvbG8DdwRwb3MDMTgEc2VjA3NyBHZ0aWQD\\/SIG=188s7bq1v\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=caselaw.lp.findlaw.com\\/cgi-bin\\/getcase.pl%253Fcourt%253DUS%2526vol%253D391%2526invol%253D936%26w=132%26d=GCWYIUaqMwZK%26icp=1%26.intl=us","Size":"57332"}},{"Title":"Chapter 132","Summary":"... Public Records. \\u00a7 132\\u20101. \\" Public records\\" defined ... Public records, as defined in G.S. 132\\u20101, shall not include written communications (and copies thereof) to any public ...","Url":"http:\\/\\/www.ncleg.net\\/EnactedLegislation\\/Statutes\\/HTML\\/ByChapter\\/Chapter_132.html","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcByxzdmMwF;_ylu=X3oDMTEwdjV0NWw0BGNvbG8DdwRsA1dTMQRwb3MDMTkEc2VjA3NyBHZ0aWQD\\/SIG=1349nldcc\\/EXP=1147592336\\/**http%3a\\/\\/www.ncleg.net\\/EnactedLegislation\\/Statutes\\/HTML\\/ByChapter\\/Chapter_132.html","ModificationDate":1141027200,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB0BzdmMwF;_ylu=X3oDMTBxdDJjbXM4BGNvbG8DdwRwb3MDMTkEc2VjA3NyBHZ0aWQD\\/SIG=17lgm2hmb\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.ncleg.net\\/EnactedLegislation\\/Statutes\\/HTML\\/ByChapter\\/Chapter_132.html%26w=132%26d=akl3I0aqMt5y%26icp=1%26.intl=us","Size":"76411"}},{"Title":"oremus Bible Browser : Psalm 132","Summary":"Psalm 132. A Song of Ascents. 1O Lord, remember in David\'s favour. all the hardships he endured; 2how he swore to the Lord. and vowed to the Mighty One of Jacob, 3 I will not enter my house. or get into my bed;","Url":"http:\\/\\/bible.oremus.org\\/?passage=Psalm+132","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB0hzdmMwF;_ylu=X3oDMTEwcDU0bmdlBGNvbG8DdwRsA1dTMQRwb3MDMjAEc2VjA3NyBHZ0aWQD\\/SIG=122hghelb\\/EXP=1147592336\\/**http%3a\\/\\/bible.oremus.org\\/%3fpassage=Psalm%2b132","ModificationDate":1138003200,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB1xzdmMwF;_ylu=X3oDMTBxbjVuNnZxBGNvbG8DdwRwb3MDMjAEc2VjA3NyBHZ0aWQD\\/SIG=16ppk73gi\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=bible.oremus.org\\/%253Fpassage%253DPsalm%2b132%26w=132%26d=MBPBT0aqMkLR%26icp=1%26.intl=us","Size":"6083"}},{"Title":"Electronic Code of Federal Regulations:","Summary":"... Application of part 132 requirements in Great Lakes States and Tribes ... Appendix A to Part 132 --Great Lakes Water Quality Initiative Methodologies for Development of Aquatic Life ...","Url":"http:\\/\\/ecfr.gpoaccess.gov\\/cgi\\/t\\/text\\/text-idx?c=ecfr&tpl=\\/ecfrbrowse\\/Title40\\/40cfr132_main_02.tpl","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB2RzdmMwF;_ylu=X3oDMTEwMGRnbnZ2BGNvbG8DdwRsA1dTMQRwb3MDMjEEc2VjA3NyBHZ0aWQD\\/SIG=13p811gl2\\/EXP=1147592336\\/**http%3a\\/\\/ecfr.gpoaccess.gov\\/cgi\\/t\\/text\\/text-idx%3fc=ecfr%26tpl=\\/ecfrbrowse\\/Title40\\/40cfr132_main_02.tpl","ModificationDate":1147244400,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB3hzdmMwF;_ylu=X3oDMTBxb2QzaXJsBGNvbG8DdwRwb3MDMjEEc2VjA3NyBHZ0aWQD\\/SIG=18m524f9v\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=ecfr.gpoaccess.gov\\/cgi\\/t\\/text\\/text-idx%253Fc%253Decfr%2526tpl%253D\\/ecfrbrowse\\/Title40\\/40cfr132_main_02.tpl%26w=132%26d=OC6Oa0aqMwQa%26icp=1%26.intl=us","Size":"24321"}},{"Title":"BibleGateway.com - Passage Lookup: Psalms 132;","Summary":"English (EN) Espa\\u00f1ol (ES) Passage results ... View commentary related to this passage : Psalm 132. Psalm 132 (Amplified Bible ...","Url":"http:\\/\\/www.biblegateway.com\\/passage?search=Psalms+132;&version=45;","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB4BzdmMwF;_ylu=X3oDMTEwMmJvNjYwBGNvbG8DdwRsA1dTMQRwb3MDMjIEc2VjA3NyBHZ0aWQD\\/SIG=12s5v8a5i\\/EXP=1147592336\\/**http%3a\\/\\/www.biblegateway.com\\/passage%3fsearch=Psalms%2b132;%26version=45;","ModificationDate":1139990400,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB5RzdmMwF;_ylu=X3oDMTBxOTdwc3RpBGNvbG8DdwRwb3MDMjIEc2VjA3NyBHZ0aWQD\\/SIG=1810cufkn\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.biblegateway.com\\/passage%253Fsearch%253DPsalms%2b132%253B%2526version%253D45%253B%26w=132%26d=KJ4R3EaqMjLm%26icp=1%26.intl=us","Size":"27611"}},{"Title":"N-132: Wu-ftpd Buffer Overflow Vulnerability","Summary":"INFORMATION BULLETIN. N-132: Wu-ftpd Buffer Overflow Vulnerability. [Red Hat Security Advisory RHSA-2003:245-15] July 31, 2003 18:00 GMT. [Revised 13 Aug 2003] [Revised 14 Aug 2003] [Revised 5 Sept 2003] [Revised 8 Oct 2003]","Url":"http:\\/\\/www.ciac.org\\/ciac\\/bulletins\\/n-132.shtml","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB5xzdmMwF;_ylu=X3oDMTEwZXVqN2J0BGNvbG8DdwRsA1dTMQRwb3MDMjMEc2VjA3NyBHZ0aWQD\\/SIG=122msf6uh\\/EXP=1147592336\\/**http%3a\\/\\/www.ciac.org\\/ciac\\/bulletins\\/n-132.shtml","ModificationDate":1146812400,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB7BzdmMwF;_ylu=X3oDMTBxbm8wZ2ZmBGNvbG8DdwRwb3MDMjMEc2VjA3NyBHZ0aWQD\\/SIG=16jq98ra6\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.ciac.org\\/ciac\\/bulletins\\/n-132.shtml%26w=132%26d=cBzeO0aqMu2t%26icp=1%26.intl=us","Size":"12337"}},{"Title":"Bumpy Objects","Summary":"Bumpy Objects","Url":"http:\\/\\/acm.uva.es\\/p\\/v1\\/132.html","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB7hzdmMwF;_ylu=X3oDMTEwZmNyM2VjBGNvbG8DdwRsA1dTMQRwb3MDMjQEc2VjA3NyBHZ0aWQD\\/SIG=11j1o5t64\\/EXP=1147592336\\/**http%3a\\/\\/acm.uva.es\\/p\\/v1\\/132.html","ModificationDate":1057820400,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB8xzdmMwF;_ylu=X3oDMTBxNWw4M3FvBGNvbG8DdwRwb3MDMjQEc2VjA3NyBHZ0aWQD\\/SIG=164vlv52k\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=acm.uva.es\\/p\\/v1\\/132.html%26w=132%26d=ZSctVkaqMvQs%26icp=1%26.intl=us","Size":"2803"}},{"Title":"The Hayes memo is important\\u2014but bogus. By Daniel Benjamin","Summary":"When they published their \\" Case Closed\\" cover story three weeks ago on the relationship between Saddam Hussein\'s Iraq and al-Qaida, the editors of the Weekly Standard aimed to set off a bomb. The article was centered on a sizable leak\\u2014a gusher...","Url":"http:\\/\\/www.slate.com\\/id\\/2092180\\/","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB9RzdmMwF;_ylu=X3oDMTEwamxzbHY1BGNvbG8DdwRsA1dTMQRwb3MDMjUEc2VjA3NyBHZ0aWQD\\/SIG=11kj0d4q1\\/EXP=1147592336\\/**http%3a\\/\\/www.slate.com\\/id\\/2092180\\/","ModificationDate":1147071600,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB.hzdmMwF;_ylu=X3oDMTBxdGc1MmltBGNvbG8DdwRwb3MDMjUEc2VjA3NyBHZ0aWQD\\/SIG=16507c1iu\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=slate.msn.com\\/id\\/2092180\\/%26w=132%26d=bWigBUaqMvyd%26icp=1%26.intl=us","Size":"40222"}},{"Title":"FNMOC WXMAP: North America","Summary":"UNCLASSIFIED. FNMOC WXMAP. Model: NOGAPS. Area: North America. DTG: 2006050500. UNCLASSIFIED","Url":"https:\\/\\/www.fnmoc.navy.mil\\/CGI\\/PUBLIC\\/wxmap_single.cgi?area=ngp_namer&prod=850&tau=132","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB_BzdmMwF;_ylu=X3oDMTEwNDNwbjA5BGNvbG8DdwRsA1dTMQRwb3MDMjYEc2VjA3NyBHZ0aWQD\\/SIG=13g43sejj\\/EXP=1147592336\\/**https%3a\\/\\/www.fnmoc.navy.mil\\/CGI\\/PUBLIC\\/wxmap_single.cgi%3farea=ngp_namer%26prod=850%26tau=132","ModificationDate":1146812400,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBAR3dmMwF;_ylu=X3oDMTBxN2ZrcnVrBGNvbG8DdwRwb3MDMjYEc2VjA3NyBHZ0aWQD\\/SIG=18s7gc72v\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=https%3a\\/\\/www.fnmoc.navy.mil\\/CGI\\/PUBLIC\\/wxmap_single.cgi%253Farea%253Dngp_namer%2526prod%253D850%2526tau%253D132%26w=132%26d=KiW5fUaqMvIm%26icp=1%26.intl=us","Size":"9048"}},{"Title":"O-132: BEA WebLogic Server and Express Certificate Spoofing Vulnerability","Summary":"INFORMATION BULLETIN. O-132: BEA WebLogic Server and Express Certificate Spoofing Vulnerability. [BEA Security Advisory: BEA04-54.00] April 30, 2004 20:00 GMT. PROBLEM:","Url":"http:\\/\\/ciac.llnl.gov\\/ciac\\/bulletins\\/o-132.shtml","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBAx3dmMwF;_ylu=X3oDMTEwb2lhN21nBGNvbG8DdwRsA1dTMQRwb3MDMjcEc2VjA3NyBHZ0aWQD\\/SIG=1231gt787\\/EXP=1147592336\\/**http%3a\\/\\/ciac.llnl.gov\\/ciac\\/bulletins\\/o-132.shtml","ModificationDate":1142064000,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBCB3dmMwF;_ylu=X3oDMTBxaGVsMDBlBGNvbG8DdwRwb3MDMjcEc2VjA3NyBHZ0aWQD\\/SIG=16k4puak0\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=ciac.llnl.gov\\/ciac\\/bulletins\\/o-132.shtml%26w=132%26d=ZZgzx0aqMjzn%26icp=1%26.intl=us","Size":"10701"}},{"Title":"NET Bible\\u00ae - Psalms 132","Summary":"... Psalms 132. Psalm 1321. A song of ascents.2. 132:1 O Lord, for David\'s sake remember ...","Url":"http:\\/\\/www.bible.org\\/netbible\\/psa132.htm","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBCh3dmMwF;_ylu=X3oDMTEwYjBiNjdsBGNvbG8DdwRsA1dTMQRwb3MDMjgEc2VjA3NyBHZ0aWQD\\/SIG=11sp4034c\\/EXP=1147592336\\/**http%3a\\/\\/www.bible.org\\/netbible\\/psa132.htm","ModificationDate":1133769600,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBDx3dmMwF;_ylu=X3oDMTBxOWNtc2JjBGNvbG8DdwRwb3MDMjgEc2VjA3NyBHZ0aWQD\\/SIG=16duuokm4\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.bible.org\\/netbible\\/psa132.htm%26w=132%26d=aVzzT0aqMwNl%26icp=1%26.intl=us","Size":"6048"}},{"Title":"HoustonChronicle.com - Sports: Fran Blinebury","Summary":"06, 2006. Column archive 2002. [an error occurred while processing this directive]","Url":"http:\\/\\/www.chron.com\\/content\\/chronicle\\/sports\\/blinebury\\/home","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBER3dmMwF;_ylu=X3oDMTEwcmlvNjMyBGNvbG8DdwRsA1dTMQRwb3MDMjkEc2VjA3NyBHZ0aWQD\\/SIG=12gac009r\\/EXP=1147592336\\/**http%3a\\/\\/www.chron.com\\/content\\/chronicle\\/sports\\/blinebury\\/home","ModificationDate":1146898800,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBFh3dmMwF;_ylu=X3oDMTBxNTVsY25mBGNvbG8DdwRwb3MDMjkEc2VjA3NyBHZ0aWQD\\/SIG=171sgehbh\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.chron.com\\/content\\/chronicle\\/sports\\/blinebury\\/home%26w=132%26d=I3QMYEaqMuxa%26icp=1%26.intl=us","Size":"27335"}},{"Title":"FNMOC WXMAP: North America","Summary":"UNCLASSIFIED. FNMOC WXMAP. Model: NOGAPS. Area: North America. DTG: 2006050512. UNCLASSIFIED","Url":"https:\\/\\/www.fnmoc.navy.mil\\/CGI\\/PUBLIC\\/wxmap_single.cgi?area=ngp_namer&prod=prp&tau=132","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBGB3dmMwF;_ylu=X3oDMTEwN2g4ZWdqBGNvbG8DdwRsA1dTMQRwb3MDMzAEc2VjA3NyBHZ0aWQD\\/SIG=13g08kode\\/EXP=1147592336\\/**https%3a\\/\\/www.fnmoc.navy.mil\\/CGI\\/PUBLIC\\/wxmap_single.cgi%3farea=ngp_namer%26prod=prp%26tau=132","ModificationDate":1146812400,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBHR3dmMwF;_ylu=X3oDMTBxaGdhODhjBGNvbG8DdwRwb3MDMzAEc2VjA3NyBHZ0aWQD\\/SIG=18solhmco\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=https%3a\\/\\/www.fnmoc.navy.mil\\/CGI\\/PUBLIC\\/wxmap_single.cgi%253Farea%253Dngp_namer%2526prod%253Dprp%2526tau%253D132%26w=132%26d=MKdCgkaqMuri%26icp=1%26.intl=us","Size":"9048"}},{"Title":"US CODE: Title 36,132. National School Lunch Week","Summary":"National School Lunch Week. Release date: 2005-10-11. (a) Designation.\\u2014. The week beginning on the second Sunday in October is National School Lunch Week. (b) Proclamation.\\u2014 ... TITLE 36 > Subtitle I > Part A > CHAPTER 1 > \\u00a7 132. Prev | Next. \\u00a7 132. National School Lunch Week ...","Url":"http:\\/\\/www4.law.cornell.edu\\/uscode\\/html\\/uscode36\\/usc_sec_36_00000132----000-.html","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBHx3dmMwF;_ylu=X3oDMTEwN3BsMm9vBGNvbG8DdwRsA1dTMQRwb3MDMzEEc2VjA3NyBHZ0aWQD\\/SIG=1359dp76s\\/EXP=1147592336\\/**http%3a\\/\\/www4.law.cornell.edu\\/uscode\\/html\\/uscode36\\/usc_sec_36_00000132----000-.html","ModificationDate":1145343600,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBJB3dmMwF;_ylu=X3oDMTBxNG81cnMxBGNvbG8DdwRwb3MDMzEEc2VjA3NyBHZ0aWQD\\/SIG=17m1he9ur\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www4.law.cornell.edu\\/uscode\\/html\\/uscode36\\/usc_sec_36_00000132----000-.html%26w=132%26d=NTi8bUaqMpvs%26icp=1%26.intl=us","Size":"8976"}},{"Title":"ATel #132: IGR J17464-3213","Summary":"Outside. Other. Present Time: 7 May 2006; 4:08 UT. RSS. XML Gamma Ray Bursts. IGR J17464-3213 ... IGR J17464-3213. ATel #132; M. Revnivtsev (IKI, Moscow; MPA, Garching), M ... XTE J1746-322 = IGR J17464-3213 = H1743-322. 132. IGR J17464-3213 ...","Url":"http:\\/\\/www.astronomerstelegram.org\\/?read=132","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBJh3dmMwF;_ylu=X3oDMTEwYWI0N2o2BGNvbG8DdwRsA1dTMQRwb3MDMzIEc2VjA3NyBHZ0aWQD\\/SIG=122qvcsd1\\/EXP=1147592336\\/**http%3a\\/\\/www.astronomerstelegram.org\\/%3fread=132","ModificationDate":1146985200,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBKx3dmMwF;_ylu=X3oDMTBxYmt2ZDZzBGNvbG8DdwRwb3MDMzIEc2VjA3NyBHZ0aWQD\\/SIG=16pipao89\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.astronomerstelegram.org\\/%253Fread%253D132%26w=132%26d=Pb4lcUaqMvBj%26icp=1%26.intl=us","Size":"9056"}},{"Title":"Vashegyite Mineral Data","Summary":"Vashegyite Mineral Data + General Vashegyite Information. Chemical Formula: Al11(PO4)9(OH)6\\u00b738(H2O) or Al6(PO4)5(OH)3\\u00b723(H2O) Composition: Molecular Weight = 1,938.16 gm. Aluminum 15.31 % Al 28.93 % Al2O3","Url":"http:\\/\\/www.webmineral.com\\/data\\/Vashegyite.shtml","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBLR3dmMwF;_ylu=X3oDMTEwNHFvMGppBGNvbG8DdwRsA1dTMQRwb3MDMzMEc2VjA3NyBHZ0aWQD\\/SIG=123ajp144\\/EXP=1147592336\\/**http%3a\\/\\/www.webmineral.com\\/data\\/Vashegyite.shtml","ModificationDate":1146898800,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBMh3dmMwF;_ylu=X3oDMTBxNzAwNWY0BGNvbG8DdwRwb3MDMzMEc2VjA3NyBHZ0aWQD\\/SIG=16ktl9ibf\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.webmineral.com\\/data\\/Vashegyite.shtml%26w=132%26d=W38GQkaqMvCt%26icp=1%26.intl=us","Size":"29234"}},{"Title":"2003 CFR Title 40, Volume 19","Summary":"... CHAPTER I--ENVIRONMENTAL PROTECTION AGENCY. PART 132--WATER QUALITY GUIDANCE FOR THE GREAT LAKES SYSTEM. 132.1. Scope, purpose, and availability of documents ...","Url":"http:\\/\\/www.access.gpo.gov\\/nara\\/cfr\\/waisidx_03\\/40cfr132_03.html","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBNB3dmMwF;_ylu=X3oDMTEwdHZ0ZXZxBGNvbG8DdwRsA1dTMQRwb3MDMzQEc2VjA3NyBHZ0aWQD\\/SIG=12imj9jh5\\/EXP=1147592336\\/**http%3a\\/\\/www.access.gpo.gov\\/nara\\/cfr\\/waisidx_03\\/40cfr132_03.html","ModificationDate":1123916400,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBOR3dmMwF;_ylu=X3oDMTBxcml1MjI5BGNvbG8DdwRwb3MDMzQEc2VjA3NyBHZ0aWQD\\/SIG=173ahs683\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.access.gpo.gov\\/nara\\/cfr\\/waisidx_03\\/40cfr132_03.html%26w=132%26d=c8h16UaqMjB2%26icp=1%26.intl=us","Size":"4704"}},{"Title":"Chapter HFS 132","Summary":"... 145. HFS 132.13. DEPARTMENT OF HEALTH AND FAMILY SERVICES ... Subchapter I \\u2014 General. HFS 132.11. Statutory authority. HFS 132.12 ...","Url":"http:\\/\\/www.legis.state.wi.us\\/rsb\\/code\\/hfs\\/hfs132.pdf","ClickUrl":"http:\\/\\/www.legis.state.wi.us\\/rsb\\/code\\/hfs\\/hfs132.pdf#search=\'\'","ModificationDate":1099033200,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBPh3dmMwF;_ylu=X3oDMTBxaXI5cmVpBGNvbG8DdwRwb3MDMzUEc2VjA3NyBHZ0aWQD\\/SIG=16p8cmh99\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.legis.state.wi.us\\/rsb\\/code\\/hfs\\/hfs132.pdf%26w=132%26d=CN-yI0aqMkhi%26icp=1%26.intl=us","Size":"283151"}},{"Title":"U.S. Senate: Legislation & Records Home > Votes > Roll Call Vote","Summary":"... Vote Number: 132. Vote Date: June 8, 2005, 05:30 PM ...","Url":"http:\\/\\/www.senate.gov\\/legislative\\/LIS\\/roll_call_lists\\/roll_call_vote_cfm.cfm?congress=109&session=1&vote=00132","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBQB3dmMwF;_ylu=X3oDMTEwdTlzNmU2BGNvbG8DdwRsA1dTMQRwb3MDMzYEc2VjA3NyBHZ0aWQD\\/SIG=148g3pmm4\\/EXP=1147592336\\/**http%3a\\/\\/www.senate.gov\\/legislative\\/LIS\\/roll_call_lists\\/roll_call_vote_cfm.cfm%3fcongress=109%26session=1%26vote=00132","ModificationDate":1143360000,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBRR3dmMwF;_ylu=X3oDMTBxOTlsaWYxBGNvbG8DdwRwb3MDMzYEc2VjA3NyBHZ0aWQD\\/SIG=19b3rasjc\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.senate.gov\\/legislative\\/LIS\\/roll_call_lists\\/roll_call_vote_cfm.cfm%253Fcongress%253D109%2526session%253D1%2526vote%253D00132%26w=132%26d=dtev60aqMh1g%26icp=1%26.intl=us","Size":"51433"}},{"Title":"Storm Prediction Center Tornado Watch 132","Summary":"Severe weather, tornado, thunderstorm, fire weather, storm report, tornado watch, severe thunderstorm watch, mesoscale discussion, convective outlook products from the Storm Prediction Center. ... SEL2 URGENT - IMMEDIATE BROADCAST REQUESTED TORNADO WATCH NUMBER 132 NWS STORM PREDICTION CENTER NORMAN OK 325 PM CDT ...","Url":"http:\\/\\/www.spc.noaa.gov\\/products\\/watch\\/ww0132.html","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBRx3dmMwF;_ylu=X3oDMTEwanQ3MzU2BGNvbG8DdwRsA1dTMQRwb3MDMzcEc2VjA3NyBHZ0aWQD\\/SIG=126urlun7\\/EXP=1147592336\\/**http%3a\\/\\/www.spc.noaa.gov\\/products\\/watch\\/ww0132.html","ModificationDate":1146812400,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBTB3dmMwF;_ylu=X3oDMTBxNDRkc3R1BGNvbG8DdwRwb3MDMzcEc2VjA3NyBHZ0aWQD\\/SIG=16n3e4s74\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.spc.noaa.gov\\/products\\/watch\\/ww0132.html%26w=132%26d=N4g-pUaqMusz%26icp=1%26.intl=us","Size":"19990"}},{"Title":"PLANT PHYSIOLOGY ONLINE -- Table of Contents (132 [2])","Summary":"To see an article, click its [Full Text] link. To review many abstracts, check the boxes to the left of the titles you want, and click the \'Get All Checked Abstract(s)\' button. To see one abstract at a time, click its [Abstract] link.","Url":"http:\\/\\/www.plantphysiol.org\\/content\\/vol132\\/issue2\\/index.shtml","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBTh3dmMwF;_ylu=X3oDMTEwa2NtaWpsBGNvbG8DdwRsA1dTMQRwb3MDMzgEc2VjA3NyBHZ0aWQD\\/SIG=12hg0jpkp\\/EXP=1147592336\\/**http%3a\\/\\/www.plantphysiol.org\\/content\\/vol132\\/issue2\\/index.shtml","ModificationDate":1141804800,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBUx3dmMwF;_ylu=X3oDMTBxYnZvM21yBGNvbG8DdwRwb3MDMzgEc2VjA3NyBHZ0aWQD\\/SIG=172cps28k\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.plantphysiol.org\\/content\\/vol132\\/issue2\\/index.shtml%26w=132%26d=Yvs4KUaqMjZc%26icp=1%26.intl=us","Size":"79038"}},{"Title":"AgGPS 132","Summary":"... The AgGPS 132 outputs sub- meter accuracy DGPS positions ... lightbar is connected to the. AgGPS 132. The AgGPS 132. can output positions up to 10 ...","Url":"http:\\/\\/www.farmgis.com\\/products\\/hardware\\/gps\\/aggps132.pdf","ClickUrl":"http:\\/\\/www.farmgis.com\\/products\\/hardware\\/gps\\/aggps132.pdf#search=\'\'","ModificationDate":1098169200,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBWB3dmMwF;_ylu=X3oDMTBxcXNibWtvBGNvbG8DdwRwb3MDMzkEc2VjA3NyBHZ0aWQD\\/SIG=16us46bp9\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.farmgis.com\\/products\\/hardware\\/gps\\/aggps132.pdf%26w=132%26d=EvLM70aqMkiV%26icp=1%26.intl=us","Size":"162160"}},{"Title":"Chapter 132 \\u2014 Grand Jury, Indictments and Other Accusatory Instruments","Summary":"The text appearing in this database was produced from material provided by the Legislative Counsel Committee of the Oregon Legislative Assembly. The official record copy is the printed published copy of the Oregon Revised Statutes. ... 132.010 Composition. A grand jury is a body of seven persons drawn from the jurors in attendance ... 132.030 Challenge of juror prohibited; when juror may be excused. Neither ...","Url":"http:\\/\\/www.leg.state.or.us\\/ors\\/132.html","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBWh3dmMwF;_ylu=X3oDMTEwYTAzbTUxBGNvbG8DdwRsA1dTMQRwb3MDNDAEc2VjA3NyBHZ0aWQD\\/SIG=11r91jes0\\/EXP=1147592336\\/**http%3a\\/\\/www.leg.state.or.us\\/ors\\/132.html","ModificationDate":1144220400,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBXx3dmMwF;_ylu=X3oDMTBxdGU5a2FhBGNvbG8DdwRwb3MDNDAEc2VjA3NyBHZ0aWQD\\/SIG=16cbqvrlb\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.leg.state.or.us\\/ors\\/132.html%26w=132%26d=MFh3EUaqMk41%26icp=1%26.intl=us","Size":"73717"}},{"Title":"Downloaded 19 Aug 2002 to 132.163.136.56. Redistribution subject to AIP license or copyright, see http:\\/\\/ojps.aip... ","Summary":"Downloaded 19 Aug 2002 to 132.163.136.56. Redistribution subject to AIP license or copyright, see http:\\/\\/ojps.aip.org\\/japo\\/japcr.jsp. Downloaded 19 Aug 2002 to 132.163.136.56.","Url":"http:\\/\\/tf.nist.gov\\/general\\/pdf\\/550.pdf","ClickUrl":"http:\\/\\/tf.nist.gov\\/general\\/pdf\\/550.pdf#search=\'\'","ModificationDate":1029740400,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBZB3dmMwF;_ylu=X3oDMTBxcDdtZjJoBGNvbG8DdwRwb3MDNDEEc2VjA3NyBHZ0aWQD\\/SIG=16bgqks5e\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=tf.nist.gov\\/general\\/pdf\\/550.pdf%26w=132%26d=PNXPXkaqMkLS%26icp=1%26.intl=us","Size":"2485625"}},{"Title":"Father Tom Inspired Pflugerville #132 To Evolve Into A Strong Fraternal Society","Summary":"... Monsignor Tom Frank is presented with the 2002 Society #132. Service Award by President Ray Pokorney ... ach year Society #132. of Pflugerville honors ...","Url":"http:\\/\\/www.kjtnet.org\\/web\\/benefits\\/newsletter\\/march03.pdf","ClickUrl":"http:\\/\\/www.kjtnet.org\\/web\\/benefits\\/newsletter\\/march03.pdf#search=\'\'","ModificationDate":1105603200,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBaR3dmMwF;_ylu=X3oDMTBxMWU2b2h1BGNvbG8DdwRwb3MDNDIEc2VjA3NyBHZ0aWQD\\/SIG=16u12rqgg\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.kjtnet.org\\/web\\/benefits\\/newsletter\\/march03.pdf%26w=132%26d=fjH4hEaqMwZd%26icp=1%26.intl=us","Size":"2791412"}},{"Title":"Alsakharovite-Zn Mineral Data","Summary":"Alsakharovite-Zn Mineral Data. [Log In] [Current Auction] [Register to Bid] [FAQ] [About Us] Tired of Ebay rip-offs, scams, and dishonest people?","Url":"http:\\/\\/www.webmineral.com\\/data\\/Alsakharovite-Zn.shtml","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBax3dmMwF;_ylu=X3oDMTEwN2JwMzlhBGNvbG8DdwRsA1dTMQRwb3MDNDMEc2VjA3NyBHZ0aWQD\\/SIG=129j54b3c\\/EXP=1147592336\\/**http%3a\\/\\/www.webmineral.com\\/data\\/Alsakharovite-Zn.shtml","ModificationDate":1147158000,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBcB3dmMwF;_ylu=X3oDMTBxamhmc2lnBGNvbG8DdwRwb3MDNDMEc2VjA3NyBHZ0aWQD\\/SIG=16q6pnttb\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.webmineral.com\\/data\\/Alsakharovite-Zn.shtml%26w=132%26d=B_smj0aqMwJU%26icp=1%26.intl=us","Size":"38594"}},{"Title":"Psalm 132","Summary":"... Psalm 132. The Eternal Dwelling of God in Zion ...","Url":"http:\\/\\/www.hope.edu\\/academic\\/religion\\/bandstra\\/BIBLE\\/PSA\\/PSA132.HTM","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBch3dmMwF;_ylu=X3oDMTEwdXE2dm1tBGNvbG8DdwRsA1dTMQRwb3MDNDQEc2VjA3NyBHZ0aWQD\\/SIG=12n448u4t\\/EXP=1147592336\\/**http%3a\\/\\/www.hope.edu\\/academic\\/religion\\/bandstra\\/BIBLE\\/PSA\\/PSA132.HTM","ModificationDate":1114758000,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBdx3dmMwF;_ylu=X3oDMTBxMjBjZXRuBGNvbG8DdwRwb3MDNDQEc2VjA3NyBHZ0aWQD\\/SIG=17829d5da\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.hope.edu\\/academic\\/religion\\/bandstra\\/BIBLE\\/PSA\\/PSA132.HTM%26w=132%26d=Gs9Yt0aqMhg_%26icp=1%26.intl=us","Size":"5137"}},{"Title":"Bug 132 - Heartbeat requires all nodes to be pre-configured in ha.cf","Summary":"... Bugzilla Bug 132. Heartbeat requires all nodes to be pre-configured in ha.cf ... Bug#: 132. Platform: All DEC HP Macintosh PC SGI Sun Other ...","Url":"http:\\/\\/www.osdl.org\\/developer_bugzilla\\/show_bug.cgi?id=132","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBeR3dmMwF;_ylu=X3oDMTEwa3QxajIyBGNvbG8DdwRsA1dTMQRwb3MDNDUEc2VjA3NyBHZ0aWQD\\/SIG=12g1vvd06\\/EXP=1147592336\\/**http%3a\\/\\/www.osdl.org\\/developer_bugzilla\\/show_bug.cgi%3fid=132","ModificationDate":1146553200,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBfh3dmMwF;_ylu=X3oDMTBxbHY2NGw5BGNvbG8DdwRwb3MDNDUEc2VjA3NyBHZ0aWQD\\/SIG=177hj2go7\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.osdl.org\\/developer_bugzilla\\/show_bug.cgi%253Fid%253D132%26w=132%26d=Uzd0n0aqMtwg%26icp=1%26.intl=us","Size":"40101"}},{"Title":"Bug 132 - ChargeDispositionPlea and ChargeDispositionVerdict","Summary":"... Bugzilla Bug 132. ChargeDispositionPlea and ChargeDispositionVerdict ... Bug#: 132. Domain: AAMVA Corrections Courts Juvenile Law Enforcement Parole Probation Prosecution Other ...","Url":"http:\\/\\/justicexml.gtri.gatech.edu\\/feedback\\/show_bug.cgi?id=132","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBgB3dmMwF;_ylu=X3oDMTEwdmhtYjA4BGNvbG8DdwRsA1dTMQRwb3MDNDYEc2VjA3NyBHZ0aWQD\\/SIG=12klknku3\\/EXP=1147592336\\/**http%3a\\/\\/justicexml.gtri.gatech.edu\\/feedback\\/show_bug.cgi%3fid=132","ModificationDate":1143360000,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBhR3dmMwF;_ylu=X3oDMTBxa2g2bWNnBGNvbG8DdwRwb3MDNDYEc2VjA3NyBHZ0aWQD\\/SIG=17bcs6mrt\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=justicexml.gtri.gatech.edu\\/feedback\\/show_bug.cgi%253Fid%253D132%26w=132%26d=e0Zoy0aqMjBn%26icp=1%26.intl=us","Size":"16410"}},{"Title":"Publications","Summary":"... Bulletin 132, Management of the California State Water Project, is a series of annual reports that describe the ... annual Appendix E to Bulletin 132 and the final edition of the ...","Url":"http:\\/\\/www.swpao.water.ca.gov\\/publications","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBhx3dmMwF;_ylu=X3oDMTEwZjVhYXMzBGNvbG8DdwRsA1dTMQRwb3MDNDcEc2VjA3NyBHZ0aWQD\\/SIG=11ud1cv0a\\/EXP=1147592336\\/**http%3a\\/\\/www.swpao.water.ca.gov\\/publications","ModificationDate":1143187200,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBjB3dmMwF;_ylu=X3oDMTBxcjNocmY0BGNvbG8DdwRwb3MDNDcEc2VjA3NyBHZ0aWQD\\/SIG=16fvue890\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.swpao.water.ca.gov\\/publications%26w=132%26d=CDqKvkaqMhfi%26icp=1%26.intl=us","Size":"27835"}},{"Title":"Sampling at Head Crater and Bench Crater","Summary":"... 132:10:41 Bean: Boy, this Hand Tool Carrier is light and nice compared to carrying it around ... 132:11:20 Bean: I can see everything from fine-grain basalt ...","Url":"http:\\/\\/www.hq.nasa.gov\\/alsj\\/a12\\/a12.head_bench.html","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBjh3dmMwF;_ylu=X3oDMTEwYjFmcHI4BGNvbG8DdwRsA1dTMQRwb3MDNDgEc2VjA3NyBHZ0aWQD\\/SIG=127h6jrgp\\/EXP=1147592336\\/**http%3a\\/\\/www.hq.nasa.gov\\/alsj\\/a12\\/a12.head_bench.html","ModificationDate":1139731200,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBkx3dmMwF;_ylu=X3oDMTBxazBuMTN2BGNvbG8DdwRwb3MDNDgEc2VjA3NyBHZ0aWQD\\/SIG=16of05gsq\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.hq.nasa.gov\\/alsj\\/a12\\/a12.head_bench.html%26w=132%26d=O2JTbEaqMul1%26icp=1%26.intl=us","Size":"91895"}},{"Title":"Psalms 132","Summary":"Psalms 132. 132:1 A Song of degrees.","Url":"http:\\/\\/www.masterstech-home.com\\/The_Library\\/The_Bible\\/Bible_Chapters\\/Psalms\\/132.html","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBlR3dmMwF;_ylu=X3oDMTEwOG85MWM5BGNvbG8DdwRsA1dTMQRwb3MDNDkEc2VjA3NyBHZ0aWQD\\/SIG=1381oeor0\\/EXP=1147592336\\/**http%3a\\/\\/www.masterstech-home.com\\/The_Library\\/The_Bible\\/Bible_Chapters\\/Psalms\\/132.html","ModificationDate":1135152000,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBmh3dmMwF;_ylu=X3oDMTBxNWpuM3FoBGNvbG8DdwRwb3MDNDkEc2VjA3NyBHZ0aWQD\\/SIG=17p7bjs0u\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.masterstech-home.com\\/The_Library\\/The_Bible\\/Bible_Chapters\\/Psalms\\/132.html%26w=132%26d=TUYYg0aqMhg4%26icp=1%26.intl=us","Size":"11669"}},{"Title":"California Highways (www.cahighways.org): Routes 129 through 136","Summary":"... The 2005 Transportation Bill included \$14.4 million to widen Route 132 from Route 99 west to Dakota Avenue ... between Coulterville and Mariposa was cosigned as Route 49 and Route 132 ...","Url":"http:\\/\\/www.cahighways.org\\/129-136.html","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBnB3dmMwF;_ylu=X3oDMTEwaXBqZ2lxBGNvbG8DdwRsA1dTMQRwb3MDNTAEc2VjA3NyBHZ0aWQD\\/SIG=11q1ne7f6\\/EXP=1147592336\\/**http%3a\\/\\/www.cahighways.org\\/129-136.html","ModificationDate":1145689200,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBoR3dmMwF;_ylu=X3oDMTBxbmZjMXVuBGNvbG8DdwRwb3MDNTAEc2VjA3NyBHZ0aWQD\\/SIG=16bhah065\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.cahighways.org\\/129-136.html%26w=132%26d=fRBtE0aqMqve%26icp=1%26.intl=us","Size":"49110"}},{"Title":"Downloaded 11 Nov 2002 to 132.64.1.37. Redistribution subject to AIP license or copyright, see http:\\/\\/ojps.aip.org\\/... ","Summary":"Downloaded 11 Nov 2002 to 132.64.1.37. Redistribution subject to AIP license or copyright, see http:\\/\\/ojps.aip.org\\/rsio\\/rsicr.jsp. Downloaded 11 Nov 2002 to 132.64.1.37.","Url":"http:\\/\\/chem.ch.huji.ac.il\\/~porath\\/NST2\\/Lecture%205\\/Kuk%20and%20Silverman%20Rev_Sci_Inst_60_165_1989.pdf","ClickUrl":"http:\\/\\/chem.ch.huji.ac.il\\/~porath\\/NST2\\/Lecture%205\\/Kuk%20and%20Silverman%20Rev_Sci_Inst_60_165_1989.pdf#search=\'\'","ModificationDate":1069660800,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBph3dmMwF;_ylu=X3oDMTBxZHJldXUyBGNvbG8DdwRwb3MDNTEEc2VjA3NyBHZ0aWQD\\/SIG=190pnnu1n\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=chem.ch.huji.ac.il\\/%257Eporath\\/NST2\\/Lecture%2525205\\/Kuk%252520and%252520Silverman%252520Rev_Sci_Inst_60_165_1989.pdf%26w=132%26d=F4c-T0aqMhfn%26icp=1%26.intl=us","Size":"3386219"}},{"Title":"Phelps Personnel Associates","Summary":"Welcome to Phelps Personnel Associates. Recruiting and Placing Engineers and Management Professionals since 1976. Concentration in the Carolinas and Southeastern job market. Permanent, Company fee-paid positions only. Confidential, courteous service","Url":"http:\\/\\/www.phelpspersonnel.com\\/","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBqB3dmMwF;_ylu=X3oDMTEwazlldjdwBGNvbG8DdwRsA1dTMQRwb3MDNTIEc2VjA3NyBHZ0aWQD\\/SIG=11j85rkug\\/EXP=1147592336\\/**http%3a\\/\\/www.phelpspersonnel.com\\/","ModificationDate":1060239600,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBrR3dmMwF;_ylu=X3oDMTBxZWJqMW1lBGNvbG8DdwRwb3MDNTIEc2VjA3NyBHZ0aWQD\\/SIG=164jn86me\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.phelpspersonnel.com\\/%26w=132%26d=KRPdjUaqMwQa%26icp=1%26.intl=us","Size":"6288"}},{"Title":"132 - Loss and resumption of Australian citizenship - Declaration of desre to resume Australian citizenship under ... ","Summary":"... retain another citizenship \\u0096 be under the age of 25 years. 132 (Design date 0705) - Page 1 ... 23A, 23AA, 23AB or 23B. 132 (Design date 0705) - Page 2 ...","Url":"http:\\/\\/www.immi.gov.au\\/allforms\\/pdf\\/132.pdf","ClickUrl":"http:\\/\\/www.immi.gov.au\\/allforms\\/pdf\\/132.pdf#search=\'\'","ModificationDate":1141113600,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBsh3dmMwF;_ylu=X3oDMTBxYzdmNTNvBGNvbG8DdwRwb3MDNTMEc2VjA3NyBHZ0aWQD\\/SIG=16gtd8vkd\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.immi.gov.au\\/allforms\\/pdf\\/132.pdf%26w=132%26d=XLvxbUaqMvqk%26icp=1%26.intl=us","Size":"118238"}},{"Title":"Communication Workersof America Local 3808","Summary":"News Highlights and Headlines. Nominations for one (1) 402 Franklin Road Area Representative will be taken at the June 6, 2006 Membership Meeting. BellSouth CONTRACT INFO. Frequently asked Q&A","Url":"http:\\/\\/cwa3808.org\\/","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBtB3dmMwF;_ylu=X3oDMTEwMGJ0MmQ1BGNvbG8DdwRsA1dTMQRwb3MDNTQEc2VjA3NyBHZ0aWQD\\/SIG=117pqud0l\\/EXP=1147592336\\/**http%3a\\/\\/cwa3808.org\\/","ModificationDate":1147071600,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBuR3dmMwF;_ylu=X3oDMTBxY3NiaDkyBGNvbG8DdwRwb3MDNTQEc2VjA3NyBHZ0aWQD\\/SIG=15od3j3p8\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=cwa3808.org\\/%26w=132%26d=ahqtKEaqMwC6%26icp=1%26.intl=us","Size":"53103"}},{"Title":"Mirabilis ICQ 98a Vulnerability","Summary":"... Bugtraq ID: 132. Class: Failure to Handle Exceptional Conditions ...","Url":"http:\\/\\/www.securityfocus.com\\/bid\\/132","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBux3dmMwF;_ylu=X3oDMTEwNXIwZzI2BGNvbG8DdwRsA1dTMQRwb3MDNTUEc2VjA3NyBHZ0aWQD\\/SIG=11ocj9p23\\/EXP=1147592336\\/**http%3a\\/\\/www.securityfocus.com\\/bid\\/132","ModificationDate":1146034800,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBwB3dmMwF;_ylu=X3oDMTBxbnNnYWFhBGNvbG8DdwRwb3MDNTUEc2VjA3NyBHZ0aWQD\\/SIG=169dn3s31\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.securityfocus.com\\/bid\\/132%26w=132%26d=bbuQiUaqMsU1%26icp=1%26.intl=us","Size":"11819"}},{"Title":"Downloaded 23 Dec 2001 to 132.76.33.15. Redistribution subject to AIP license or copyright, see http:\\/\\/ojps.aip.org\\/... ","Summary":"Downloaded 23 Dec 2001 to 132.76.33.15. Redistribution subject to AIP license or copyright, see http:\\/\\/ojps.aip.org\\/jcpo\\/jcpcr.jsp. Downloaded 23 Dec 2001 to 132.76.33.15.","Url":"http:\\/\\/theochem.weizmann.ac.il\\/AIPreprints\\/8.pdf","ClickUrl":"http:\\/\\/theochem.weizmann.ac.il\\/AIPreprints\\/8.pdf#search=\'\'","ModificationDate":1092294000,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBxR3dmMwF;_ylu=X3oDMTBxcjhpcTNrBGNvbG8DdwRwb3MDNTYEc2VjA3NyBHZ0aWQD\\/SIG=16l1r1fiu\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=theochem.weizmann.ac.il\\/AIPreprints\\/8.pdf%26w=132%26d=VrF160aqMjIt%26icp=1%26.intl=us","Size":"1754089"}},{"Title":"Chapter RL 132","Summary":"DEPARTMENT OF REGULATION AND LICENSING. Unofficial Text (See Printed Volume). Current through date and Register shown on Title Page. Register, July, 1999, No. 523. Chapter RL 132. APPLICATIONS. RL 132.01. Authority. RL 132.02 ... Note: Chapter RL 132 was created as an emergency rule effective 11\\u20131\\u201398 ...","Url":"http:\\/\\/www.legis.state.wi.us\\/rsb\\/code\\/rl\\/rl132.pdf","ClickUrl":"http:\\/\\/www.legis.state.wi.us\\/rsb\\/code\\/rl\\/rl132.pdf#search=\'\'","ModificationDate":1011859200,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcByh3dmMwF;_ylu=X3oDMTBxZjI4aHZhBGNvbG8DdwRwb3MDNTcEc2VjA3NyBHZ0aWQD\\/SIG=16nps3tc2\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.legis.state.wi.us\\/rsb\\/code\\/rl\\/rl132.pdf%26w=132%26d=VTECeUaqMi-4%26icp=1%26.intl=us","Size":"8138"}},{"Title":"Rebuffing Bush, 132 Mayors Embrace Kyoto Rules - New York Times","Summary":"Greg Nickels of Seattle and 131 other like-minded mayors have joined a bipartisan coalition to fight global warming on the local level.","Url":"http:\\/\\/www.nytimes.com\\/2005\\/05\\/14\\/national\\/14kyoto.html?ex=1273723200&en=c02e1cce1ca43706&ei=5088","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBzB3dmMwF;_ylu=X3oDMTEwbm43bzM3BGNvbG8DdwRsA1dTMQRwb3MDNTgEc2VjA3NyBHZ0aWQD\\/SIG=13repbe72\\/EXP=1147592336\\/**http%3a\\/\\/www.nytimes.com\\/2005\\/05\\/14\\/national\\/14kyoto.html%3fex=1273723200%26en=c02e1cce1ca43706%26ei=5088","ModificationDate":1147330800,"MimeType":"text\\/html"},{"Title":"DHS-Revised Rule 132","Summary":"Easy access to Illinois services and information ... an e-mail address to pose questions regarding Rule 132. Please review the Rule 132 Q&A document posted on ...","Url":"http:\\/\\/www.dhs.state.il.us\\/revisedRule132","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB0h3dmMwF;_ylu=X3oDMTEwMjl1dW84BGNvbG8DdwRsA1dTMQRwb3MDNTkEc2VjA3NyBHZ0aWQD\\/SIG=11tb4gcma\\/EXP=1147592336\\/**http%3a\\/\\/www.dhs.state.il.us\\/revisedRule132","ModificationDate":1147244400,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB1x3dmMwF;_ylu=X3oDMTBxOWMyazRxBGNvbG8DdwRwb3MDNTkEc2VjA3NyBHZ0aWQD\\/SIG=16e8khp3d\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.dhs.state.il.us\\/revisedRule132%26w=132%26d=Oc4YikaqMwgM%26icp=1%26.intl=us","Size":"22903"}},{"Title":"211 CMR: DIVISION OF INSURANCE 6\\/27\\/97 211 CMR - 837 211 CMR 132.00: ACTUARIAL OPINION AND MEMORANDUM REGULATION ... ","Summary":"... 132.01: Purpose. 132.02: Authority. 132.03: Scope. 132.04: Definitions. 132.05: General Requirements. 132.06: Required Opinions. 132 ... Adequacy Analysis. 132.08: Statement of Actuarial ...","Url":"http:\\/\\/www.mass.gov\\/doi\\/Legal_Hearings\\/211_132.PDF","ClickUrl":"http:\\/\\/www.mass.gov\\/doi\\/Legal_Hearings\\/211_132.PDF#search=\'\'","ModificationDate":1003906800,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB3B3dmMwF;_ylu=X3oDMTBxdG9ldThsBGNvbG8DdwRwb3MDNjAEc2VjA3NyBHZ0aWQD\\/SIG=16no3ibvg\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.mass.gov\\/doi\\/Legal_Hearings\\/211_132.PDF%26w=132%26d=C4QXPkaqMjRM%26icp=1%26.intl=us","Size":"45945"}},{"Title":"Downloaded 22 Jul 2003 to 132.66.16.23. Redistribution subject to AIP license or copyright, see http:\\/\\/ojps.aip.org\\/... ","Summary":"Downloaded 22 Jul 2003 to 132.66.16.23. Redistribution subject to AIP license or copyright, see http:\\/\\/ojps.aip.org\\/jcpo\\/jcpcr.jsp. Downloaded 22 Jul 2003 to 132.66.16.23.","Url":"http:\\/\\/star.tau.ac.il\\/~andelman\\/reprints\\/021_JCP_1987_87_7229.pdf","ClickUrl":"http:\\/\\/star.tau.ac.il\\/~andelman\\/reprints\\/021_JCP_1987_87_7229.pdf#search=\'\'","ModificationDate":1058857200,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB4R3dmMwF;_ylu=X3oDMTBxZzZxbDZiBGNvbG8DdwRwb3MDNjEEc2VjA3NyBHZ0aWQD\\/SIG=17adesqgt\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=star.tau.ac.il\\/%257Eandelman\\/reprints\\/021_JCP_1987_87_7229.pdf%26w=132%26d=Lvkyh0aqMh8L%26icp=1%26.intl=us","Size":"1798906"}},{"Title":"Special Troops Battalion, 4th Brigade, 10th Mountain Division Insignia","Summary":"The Institute of Heraldry\'s Special Troops Battalion Section, Special Troops Battalion, 4th Brigade, 10th Mountain Division Insignia Page","Url":"http:\\/\\/www.tioh.hqda.pentagon.mil\\/STB\\/STB4Brigade10MountainDivision.htm","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB4x3dmMwF;_ylu=X3oDMTEwZjFqOHFiBGNvbG8DdwRsA1dTMQRwb3MDNjIEc2VjA3NyBHZ0aWQD\\/SIG=12rjb6bu4\\/EXP=1147592336\\/**http%3a\\/\\/www.tioh.hqda.pentagon.mil\\/STB\\/STB4Brigade10MountainDivision.htm","ModificationDate":1109923200,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB6B3dmMwF;_ylu=X3oDMTBxZzN1cnRoBGNvbG8DdwRwb3MDNjIEc2VjA3NyBHZ0aWQD\\/SIG=17c61sq2b\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.tioh.hqda.pentagon.mil\\/STB\\/STB4Brigade10MountainDivision.htm%26w=132%26d=CjDx1kaqMwEn%26icp=1%26.intl=us","Size":"8896"}},{"Title":"NNSA\'s Brooks lauds partnership in nonproliferation","Summary":"... ite Way. U133. 132. A-4. 135. 134. 132. Fun With Science ...","Url":"http:\\/\\/www.llnl.gov\\/llnl\\/06news\\/employee\\/articles\\/2001\\/12.21.01newsline.pdf","ClickUrl":"http:\\/\\/www.llnl.gov\\/llnl\\/06news\\/employee\\/articles\\/2001\\/12.21.01newsline.pdf#search=\'\'","ModificationDate":1099555200,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB7R3dmMwF;_ylu=X3oDMTBxZ25nbWN0BGNvbG8DdwRwb3MDNjMEc2VjA3NyBHZ0aWQD\\/SIG=17go91rgp\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.llnl.gov\\/llnl\\/06news\\/employee\\/articles\\/2001\\/12.21.01newsline.pdf%26w=132%26d=aLdSWEaqMjYB%26icp=1%26.intl=us","Size":"472758"}},{"Title":"Psalms 132. The Holy Bible: King James Version.","Summary":"... Reference > The Bible > The King James Version > Psalms > 132 ... The Psalms. 132. A Prayer for Blessing on the Sanctuary ...","Url":"http:\\/\\/www.bartleby.com\\/108\\/19\\/132.html","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB7x3dmMwF;_ylu=X3oDMTEwdm1iOTMzBGNvbG8DdwRsA1dTMQRwb3MDNjQEc2VjA3NyBHZ0aWQD\\/SIG=11rfct28r\\/EXP=1147592336\\/**http%3a\\/\\/www.bartleby.com\\/108\\/19\\/132.html","ModificationDate":1134460800,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB9B3dmMwF;_ylu=X3oDMTBxa3RqY29tBGNvbG8DdwRwb3MDNjQEc2VjA3NyBHZ0aWQD\\/SIG=16ckhlf21\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.bartleby.com\\/108\\/19\\/132.html%26w=132%26d=Om0HPEaqMjyM%26icp=1%26.intl=us","Size":"26896"}},{"Title":"The Criterion Collection: Ruling Class, The","Summary":"Title Person. Film Info. 1972. 154 minutes. Color. 1.77:1. Dolby Digital Mono 1.0. Anamorphic. English. Release Info. Catalog Number: CC1575D. ISBN: 1-55940-922-3. UPC: 7-15515-0124-2-3. SRP: \$39.95. Synopsis","Url":"http:\\/\\/www.criterionco.com\\/asp\\/release.asp?id=132","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB9h3dmMwF;_ylu=X3oDMTEwcTRya2ltBGNvbG8DdwRsA1dTMQRwb3MDNjUEc2VjA3NyBHZ0aWQD\\/SIG=1272o9dh7\\/EXP=1147592336\\/**http%3a\\/\\/www.criterionco.com\\/asp\\/release.asp%3fid=132","ModificationDate":1147244400,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB.x3dmMwF;_ylu=X3oDMTBxdDMwMGJvBGNvbG8DdwRwb3MDNjUEc2VjA3NyBHZ0aWQD\\/SIG=16u4fa0dg\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.criterionco.com\\/asp\\/release.asp%253Fid%253D132%26w=132%26d=L2PGVEaqMwN7%26icp=1%26.intl=us","Size":"16920"}},{"Title":"AJP Legacy -- Table of Contents (February 28 1941, 132 [2])","Summary":"Contents: February 28 1941, Volume 132, Issue 2 [Index by Author] Other Issues: To see an article, click its [Full Text] link.","Url":"http:\\/\\/ajplegacy.physiology.org\\/content\\/vol132\\/issue2\\/index.shtml","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB_R3dmMwF;_ylu=X3oDMTEwZWhkczJpBGNvbG8DdwRsA1dTMQRwb3MDNjYEc2VjA3NyBHZ0aWQD\\/SIG=12lf1ce7j\\/EXP=1147592336\\/**http%3a\\/\\/ajplegacy.physiology.org\\/content\\/vol132\\/issue2\\/index.shtml","ModificationDate":1141459200,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBAh7dmMwF;_ylu=X3oDMTBxNzI0azAwBGNvbG8DdwRwb3MDNjYEc2VjA3NyBHZ0aWQD\\/SIG=176uub081\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=ajplegacy.physiology.org\\/content\\/vol132\\/issue2\\/index.shtml%26w=132%26d=Ms_vOEaqMj-H%26icp=1%26.intl=us","Size":"24095"}},{"Title":"released a letter (PDF)","Summary":"","Url":"http:\\/\\/www.house.gov\\/judiciary_democrats\\/letters\\/rovehrgrequestltr71405.pdf","ClickUrl":"http:\\/\\/www.house.gov\\/judiciary_democrats\\/letters\\/rovehrgrequestltr71405.pdf#search=\'\'","ModificationDate":1121410800,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBBx7dmMwF;_ylu=X3oDMTBxOXQ3MWF0BGNvbG8DdwRwb3MDNjcEc2VjA3NyBHZ0aWQD\\/SIG=17g69a880\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.house.gov\\/judiciary_democrats\\/letters\\/rovehrgrequestltr71405.pdf%26w=132%26d=LPrB50aqMqRY%26icp=1%26.intl=us","Size":"381000"}},{"Title":"NC General Statutes Chapter 132","Summary":"North Carolina. State Public Records Law. North Carolina General Statutes. Chapter 132. Public Records. Last updated December 10th, 1999. Contents. Section Title. 132-1. \\"Public records\\" defined. 132-1.1. ... Section Title. 132-1. \\"Public records\\" defined. 132-1.1. Confidential communications by legal counsel to public board or agency; State tax ...","Url":"http:\\/\\/www.ah.dcr.state.nc.us\\/e-records\\/ncgs\\/ncgs132.htm","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBCR7dmMwF;_ylu=X3oDMTEwMjJmbW84BGNvbG8DdwRsA1dTMQRwb3MDNjgEc2VjA3NyBHZ0aWQD\\/SIG=12ctoo16c\\/EXP=1147592336\\/**http%3a\\/\\/www.ah.dcr.state.nc.us\\/e-records\\/ncgs\\/ncgs132.htm","ModificationDate":953625600,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBDh7dmMwF;_ylu=X3oDMTBxYjJtcGphBGNvbG8DdwRwb3MDNjgEc2VjA3NyBHZ0aWQD\\/SIG=16t5vbni8\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.ah.dcr.state.nc.us\\/e-records\\/ncgs\\/ncgs132.htm%26w=132%26d=MyfGH0aqMwR0%26icp=1%26.intl=us","Size":"43695"}},{"Title":"Technical Introduction to CDMA","Summary":"Course 132. Technical. Introduction to CDMA. Technical. Introduction to CDMA. IS-95, CDMA2000 and a glimpse of 1xEV. February, 2005. 132 - 1. Technical Introduction to CDMA v4.0 (c) 2005 Scott Baxter. Course Outline. Basic CDMA Principles. Coding","Url":"http:\\/\\/www.howcdmaworks.com\\/intro\\/132v3.pdf","ClickUrl":"http:\\/\\/www.howcdmaworks.com\\/intro\\/132v3.pdf#search=\'\'","ModificationDate":1107590400,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBEx7dmMwF;_ylu=X3oDMTBxbTJnbmxhBGNvbG8DdwRwb3MDNjkEc2VjA3NyBHZ0aWQD\\/SIG=16ghr9cvr\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.howcdmaworks.com\\/intro\\/132v3.pdf%26w=132%26d=B6dAbEaqMu7t%26icp=1%26.intl=us","Size":"4342039"}},{"Title":"Thread Images Digitizing","Summary":"Free embroidery design. Specializes in providing custom quality embroidery designs to the professional embroiderer.","Url":"http:\\/\\/www.threadimages.com\\/","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBFR7dmMwF;_ylu=X3oDMTEwMmI2cWQzBGNvbG8DdwRsA1dTMQRwb3MDNzAEc2VjA3NyBHZ0aWQD\\/SIG=11gsp7523\\/EXP=1147592336\\/**http%3a\\/\\/www.threadimages.com\\/","ModificationDate":1147158000,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBGx7dmMwF;_ylu=X3oDMTBxaml0dDF0BGNvbG8DdwRwb3MDNzAEc2VjA3NyBHZ0aWQD\\/SIG=161ukrsfh\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.threadimages.com\\/%26w=132%26d=BmPG10aqMwgW%26icp=1%26.intl=us","Size":"55861"}},{"Title":"Psalms Chapter 132:1-18.","Summary":"Read the Hebrew Transliteration Psalms 132:1-18 Online.","Url":"http:\\/\\/bibledbdata.org\\/onlinebibles\\/hebrew_translit\\/19_132.htm","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBHR7dmMwF;_ylu=X3oDMTEwdXJnMnJuBGNvbG8DdwRsA1dTMQRwb3MDNzEEc2VjA3NyBHZ0aWQD\\/SIG=12i1mped7\\/EXP=1147592336\\/**http%3a\\/\\/bibledbdata.org\\/onlinebibles\\/hebrew_translit\\/19_132.htm","ModificationDate":1044172800,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBIh7dmMwF;_ylu=X3oDMTBxNmJocG1iBGNvbG8DdwRwb3MDNzEEc2VjA3NyBHZ0aWQD\\/SIG=173o8ajtj\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=bibledbdata.org\\/onlinebibles\\/hebrew_translit\\/19_132.htm%26w=132%26d=dfiAJkaqMi1u%26icp=1%26.intl=us","Size":"9706"}},{"Title":"PRC-132","Summary":"K6ERO Portable and pedestrian mobile amateur radio. PRC-132 & M50B. To the left is a Loral Terracom M50B. made in 1988 Serial#19 . Its 10 inches tall. with out battery box or external power. box , 3.5 inches wide and 5.25 inches. deep, weight 6.9 lbs . ... The M50B is the early issue version of the. PRC-132 special operations HF Radio ...","Url":"http:\\/\\/www.muttmotorpool.com\\/PRC-132","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBJB7dmMwF;_ylu=X3oDMTEwYm80YTY1BGNvbG8DdwRsA1dTMQRwb3MDNzIEc2VjA3NyBHZ0aWQD\\/SIG=11ou3h7bi\\/EXP=1147592336\\/**http%3a\\/\\/www.muttmotorpool.com\\/PRC-132","ModificationDate":1146294000,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBKR7dmMwF;_ylu=X3oDMTBxaDgzYWcxBGNvbG8DdwRwb3MDNzIEc2VjA3NyBHZ0aWQD\\/SIG=169r7ofhd\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.muttmotorpool.com\\/PRC-132%26w=132%26d=Utj0H0aqMs48%26icp=1%26.intl=us","Size":"19723"}},{"Title":"Firenze 132 \\/ 170","Summary":"Firenze 132 \\/ 170. Matte Presentation Paper. 132 gram 2-side coated. 170 gram single side coated. Magicl\\u00e9e\\u00ae Firenze 132 and Firenze 170 matte. papers are designed for poster applications and. have an impressive price performance ratio. The ... If using the 132 gram. paper for 2-sided imaging ink limit on ...","Url":"http:\\/\\/www.magicinkjet.com\\/client_data_pdf\\/guides\\/Firenze.pdf","ClickUrl":"http:\\/\\/www.magicinkjet.com\\/client_data_pdf\\/guides\\/Firenze.pdf#search=\'\'","ModificationDate":1081839600,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBLh7dmMwF;_ylu=X3oDMTBxbXY4b2luBGNvbG8DdwRwb3MDNzMEc2VjA3NyBHZ0aWQD\\/SIG=172sdum75\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.magicinkjet.com\\/client_data_pdf\\/guides\\/Firenze.pdf%26w=132%26d=Q4ILzEaqMh1n%26icp=1%26.intl=us","Size":"2152647"}},{"Title":"Museletter # 132 \\/ February 2003: The US and Eurasia: End Game for the Industrial Era?","Summary":"Defining democracy in the wake of the 2002 elections in the U.S.A..","Url":"http:\\/\\/www.museletter.com\\/archive\\/132.html","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBMB7dmMwF;_ylu=X3oDMTEwNGRiZ3FjBGNvbG8DdwRsA1dTMQRwb3MDNzQEc2VjA3NyBHZ0aWQD\\/SIG=11upr7v32\\/EXP=1147592336\\/**http%3a\\/\\/www.museletter.com\\/archive\\/132.html","ModificationDate":1108540800,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBNR7dmMwF;_ylu=X3oDMTBxZTNpbG1nBGNvbG8DdwRwb3MDNzQEc2VjA3NyBHZ0aWQD\\/SIG=16fg9g4no\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.museletter.com\\/archive\\/132.html%26w=132%26d=SS0AQEaqMvuR%26icp=1%26.intl=us","Size":"47428"}},{"Title":"Downloaded 25 Oct 2002 to 132.66.16.12. Redistribution subject to AIP license or copyright, see http:\\/\\/ojps.aip.org\\/... ","Summary":"Downloaded 25 Oct 2002 to 132.66.16.12. Redistribution subject to AIP license or copyright, see http:\\/\\/ojps.aip.org\\/jcpo\\/jcpcr.jsp. Downloaded 25 Oct 2002 to 132.66.16.12.","Url":"http:\\/\\/star.tau.ac.il\\/~andelman\\/reprints\\/018_JCP_1987_86_3673.pdf","ClickUrl":"http:\\/\\/star.tau.ac.il\\/~andelman\\/reprints\\/018_JCP_1987_86_3673.pdf#search=\'\'","ModificationDate":1035529200,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBOh7dmMwF;_ylu=X3oDMTBxbGZmanU1BGNvbG8DdwRwb3MDNzUEc2VjA3NyBHZ0aWQD\\/SIG=17a4s312u\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=star.tau.ac.il\\/%257Eandelman\\/reprints\\/018_JCP_1987_86_3673.pdf%26w=132%26d=YANT3kaqMhfd%26icp=1%26.intl=us","Size":"1204421"}},{"Title":"Hepatitis B Virus: A Comprehensive Strategy for Eliminating Transmission in the United States Through Universal ... ","Summary":"Hepatitis B Virus: A Comprehensive Strategy for Eliminating Transmission in the United States Through Universal Childhood Vaccination: Recommendations of the Immunization Practices Advisory Committee (ACIP)","Url":"http:\\/\\/www.cdc.gov\\/mmwr\\/preview\\/mmwrhtml\\/00033405.htm","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBPB7dmMwF;_ylu=X3oDMTEwb2NlbHRuBGNvbG8DdwRsA1dTMQRwb3MDNzYEc2VjA3NyBHZ0aWQD\\/SIG=129kdm2n4\\/EXP=1147592336\\/**http%3a\\/\\/www.cdc.gov\\/mmwr\\/preview\\/mmwrhtml\\/00033405.htm","ModificationDate":1139990400,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBQR7dmMwF;_ylu=X3oDMTBxZm44bG9sBGNvbG8DdwRwb3MDNzYEc2VjA3NyBHZ0aWQD\\/SIG=16qv48dkp\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.cdc.gov\\/mmwr\\/preview\\/mmwrhtml\\/00033405.htm%26w=132%26d=b-Kz6UaqMwIM%26icp=1%26.intl=us","Size":"87232"}},{"Title":"Tour de France 2005","Summary":"... QUICK STEP - INNERGETIC. 132 - CRETSKENS Wilfried (BEL) Born in 10\\/07\\/1976 \\u00e0 Herk-de-Stad (BEL ...","Url":"http:\\/\\/www.letour.fr\\/2005\\/TDF\\/RIDERS\\/us\\/coureurs\\/132.html","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBQx7dmMwF;_ylu=X3oDMTEwYjdwazg2BGNvbG8DdwRsA1dTMQRwb3MDNzcEc2VjA3NyBHZ0aWQD\\/SIG=12dpjmcf6\\/EXP=1147592336\\/**http%3a\\/\\/www.letour.fr\\/2005\\/TDF\\/RIDERS\\/us\\/coureurs\\/132.html","ModificationDate":1121583600,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBSB7dmMwF;_ylu=X3oDMTBxa21laGFvBGNvbG8DdwRwb3MDNzcEc2VjA3NyBHZ0aWQD\\/SIG=16u0nn96f\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.letour.fr\\/2005\\/TDF\\/RIDERS\\/us\\/coureurs\\/132.html%26w=132%26d=BTTUC0aqMv4Z%26icp=1%26.intl=us","Size":"12171"}},{"Title":"This American Life | Father\'s Day \'99","Summary":"... 6\\/18\\/99. Episode 132. For Father\'s Day, stories about fathers going out of their way to protect their kids, and kids going ...","Url":"http:\\/\\/www.thisamericanlife.org\\/pages\\/descriptions\\/99\\/132.html","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBSh7dmMwF;_ylu=X3oDMTEwNDFvam42BGNvbG8DdwRsA1dTMQRwb3MDNzgEc2VjA3NyBHZ0aWQD\\/SIG=12iobnkgv\\/EXP=1147592336\\/**http%3a\\/\\/www.thisamericanlife.org\\/pages\\/descriptions\\/99\\/132.html","ModificationDate":1146466800,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBTx7dmMwF;_ylu=X3oDMTBxZzFuNDV2BGNvbG8DdwRwb3MDNzgEc2VjA3NyBHZ0aWQD\\/SIG=1738d5fam\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.thisamericanlife.org\\/pages\\/descriptions\\/99\\/132.html%26w=132%26d=Ss_yvkaqMvWK%26icp=1%26.intl=us","Size":"8411"}},{"Title":"Downloaded 21 Jan 2004 to 132.66.16.34. Redistribution subject to AIP license or copyright, see http:\\/\\/ojps.aip.org\\/... ","Summary":"Downloaded 21 Jan 2004 to 132.66.16.34. Redistribution subject to AIP license or copyright, see http:\\/\\/ojps.aip.org\\/jcpo\\/jcpcr.jsp. Downloaded 21 Jan 2004 to 132.66.16.34.","Url":"http:\\/\\/femto.tau.ac.il\\/~nitzan\\/3.pdf","ClickUrl":"http:\\/\\/femto.tau.ac.il\\/~nitzan\\/3.pdf#search=\'\'","ModificationDate":1088665200,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBVB7dmMwF;_ylu=X3oDMTBxdXJmcnJsBGNvbG8DdwRwb3MDNzkEc2VjA3NyBHZ0aWQD\\/SIG=16da99c2u\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=femto.tau.ac.il\\/%257Enitzan\\/3.pdf%26w=132%26d=b5Br7UaqMjB1%26icp=1%26.intl=us","Size":"1071954"}},{"Title":"CHAPTER 12 ENVIRONMENTAL REVIEW \\u2013 EAST 132","Summary":"Solid Waste Management Plan. 12-1. October2004. DEIS. CHAPTER 12. ENVIRONMENTAL REVIEW \\u2013 EAST 132. ND. STREET SITE. 12.1 Introduction. The East 132. nd. Street Site is currently permitted to handle 2,999 tpd of putrescible waste, with a","Url":"http:\\/\\/www.nyc.gov\\/html\\/dsny\\/downloads\\/pdf\\/pubnrpts\\/swmp-4oct\\/deis\\/chapter12.pdf","ClickUrl":"http:\\/\\/www.nyc.gov\\/html\\/dsny\\/downloads\\/pdf\\/pubnrpts\\/swmp-4oct\\/deis\\/chapter12.pdf#search=\'\'","ModificationDate":1099555200,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBWR7dmMwF;_ylu=X3oDMTBxaHNlODZrBGNvbG8DdwRwb3MDODAEc2VjA3NyBHZ0aWQD\\/SIG=17llu5bkp\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.nyc.gov\\/html\\/dsny\\/downloads\\/pdf\\/pubnrpts\\/swmp-4oct\\/deis\\/chapter12.pdf%26w=132%26d=RPmqz0aqMiKh%26icp=1%26.intl=us","Size":"1417879"}},{"Title":"Psalms 132 \\/ Hebrew - English Bible \\/ Mechon-Mamre","Summary":"... 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 ... Psalms Chapter 132. \\u00e0 \\u00f9\\u00d1\\u00c4\\u00e9\\u00f8, \\u00e4\\u00c7\\u00ee\\u00cc\\u00c7\\u00f2\\u00c2\\u00ec\\u00e5\\u00c9\\u00fa ...","Url":"http:\\/\\/www.mechon-mamre.org\\/p\\/pt\\/pt26d2.htm","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBWx7dmMwF;_ylu=X3oDMTEwc3RoZXBrBGNvbG8DdwRsA1dTMQRwb3MDODEEc2VjA3NyBHZ0aWQD\\/SIG=11vhbotpk\\/EXP=1147592336\\/**http%3a\\/\\/www.mechon-mamre.org\\/p\\/pt\\/pt26d2.htm","ModificationDate":1138694400,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBYB7dmMwF;_ylu=X3oDMTBxNjUwMGs2BGNvbG8DdwRwb3MDODEEc2VjA3NyBHZ0aWQD\\/SIG=16gg7tf89\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.mechon-mamre.org\\/p\\/pt\\/pt26d2.htm%26w=132%26d=WTHLVUaqMu6s%26icp=1%26.intl=us","Size":"13881"}},{"Title":"US CODE: Title 28,132. Creation and composition of district courts","Summary":"Creation and composition of district courts. Release date: 2005-09-29. (a) There shall be in each judicial district a district court which shall be a court of record known as the United States District Court for the district.","Url":"http:\\/\\/www4.law.cornell.edu\\/uscode\\/28\\/132.html","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBYh7dmMwF;_ylu=X3oDMTEwcWlsMGMxBGNvbG8DdwRsA1dTMQRwb3MDODIEc2VjA3NyBHZ0aWQD\\/SIG=122ek55sr\\/EXP=1147592336\\/**http%3a\\/\\/www4.law.cornell.edu\\/uscode\\/28\\/132.html","ModificationDate":1143273600,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBZx7dmMwF;_ylu=X3oDMTBxYWs1NmFvBGNvbG8DdwRwb3MDODIEc2VjA3NyBHZ0aWQD\\/SIG=16jb47dcg\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www4.law.cornell.edu\\/uscode\\/28\\/132.html%26w=132%26d=QQ2S7EaqMjbv%26icp=1%26.intl=us","Size":"9107"}},{"Title":"Fiscal Note","Summary":"... Bill, Resolutions and Memorial Documents. SB05-132 ... Final Act\\/ Resolutions or Memorial: 132_enr.pdfn. 132.enrn. Preamended Documents ...","Url":"http:\\/\\/www.leg.state.co.us\\/Clics2005a\\/csl.nsf\\/fsbillcont3\\/A4058D1E27570DC987256F7E0059EAA8?Open&file=132_enr.pdf","ClickUrl":"http:\\/\\/www.leg.state.co.us\\/Clics2005a\\/csl.nsf\\/fsbillcont3\\/A4058D1E27570DC987256F7E0059EAA8?Open&file=132_enr.pdf#search=\'\'","ModificationDate":1124521200,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBbB7dmMwF;_ylu=X3oDMTBxbGJmNjEwBGNvbG8DdwRwb3MDODMEc2VjA3NyBHZ0aWQD\\/SIG=191n41l4b\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.leg.state.co.us\\/Clics2005a\\/csl.nsf\\/fsbillcont3\\/A4058D1E27570DC987256F7E0059EAA8%253FOpen%2526file%253D132_enr.pdf%26w=132%26d=LViIXUaqMkKL%26icp=1%26.intl=us","Size":"87930"}},{"Title":"Development -- Table of Contents (January 1 2005, 132 [1])","Summary":"To see an article, click its [Full Text] link. To review many abstracts, check the boxes to the left of the titles you want, and click the \'Get All Checked Abstract(s)\' button. To see one abstract at a time, click its [Abstract] link.","Url":"http:\\/\\/dev.biologists.org\\/content\\/vol132\\/issue1","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBbh7dmMwF;_ylu=X3oDMTEwdWdwcnIyBGNvbG8DdwRsA1dTMQRwb3MDODQEc2VjA3NyBHZ0aWQD\\/SIG=123019ojj\\/EXP=1147592336\\/**http%3a\\/\\/dev.biologists.org\\/content\\/vol132\\/issue1","ModificationDate":1147071600,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBcx7dmMwF;_ylu=X3oDMTBxczM2ZHFvBGNvbG8DdwRwb3MDODQEc2VjA3NyBHZ0aWQD\\/SIG=16kng2m03\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=dev.biologists.org\\/content\\/vol132\\/issue1%26w=132%26d=LFOVEUaqMwR5%26icp=1%26.intl=us","Size":"25711"}},{"Title":"Winter Carnival (1939)","Summary":"Winter Carnival - Cast, Crew, Reviews, Plot Summary, Comments, Discussion, Taglines, Trailers, Posters, Photos, Showtimes, Link to Official Site, Fan Sites","Url":"http:\\/\\/www.imdb.com\\/title\\/tt0032132\\/","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBdR7dmMwF;_ylu=X3oDMTEwb3IzajNvBGNvbG8DdwRsA1dTMQRwb3MDODUEc2VjA3NyBHZ0aWQD\\/SIG=11o6bhdhm\\/EXP=1147592336\\/**http%3a\\/\\/www.imdb.com\\/title\\/tt0032132\\/","ModificationDate":1147417200,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBeh7dmMwF;_ylu=X3oDMTBxcG9jdDNjBGNvbG8DdwRwb3MDODUEc2VjA3NyBHZ0aWQD\\/SIG=1696d85k0\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.imdb.com\\/title\\/tt0032132\\/%26w=132%26d=OnC3HUaqMw5H%26icp=1%26.intl=us","Size":"44616"}},{"Title":"XM Radio - C-SPAN Radio","Summary":"... XM 132. <Previous. Next ...","Url":"http:\\/\\/www.xmradio.com\\/programming\\/channel_page.jsp?ch=132","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBfB7dmMwF;_ylu=X3oDMTEwa3RyODBuBGNvbG8DdwRsA1dTMQRwb3MDODYEc2VjA3NyBHZ0aWQD\\/SIG=12gtfnvt7\\/EXP=1147592336\\/**http%3a\\/\\/www.xmradio.com\\/programming\\/channel_page.jsp%3fch=132","ModificationDate":1147158000,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBgR7dmMwF;_ylu=X3oDMTBxN24xYzc0BGNvbG8DdwRwb3MDODYEc2VjA3NyBHZ0aWQD\\/SIG=1774en6i4\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.xmradio.com\\/programming\\/channel_page.jsp%253Fch%253D132%26w=132%26d=WS_5a0aqMwE5%26icp=1%26.intl=us","Size":"23601"}},{"Title":"Al-Qaeda tape says bin Laden alive, urges Iraqis to fight - theage.com.au","Summary":"Arabic television channel Al Arabiya has aired what it says is an audiotape from an al-Qaeda spokesman who says Osama bin Laden is alive and well. - The Age","Url":"http:\\/\\/www.theage.com.au\\/articles\\/2003\\/08\\/18\\/1061059775995.html","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBgx7dmMwF;_ylu=X3oDMTEwNXU4aDFlBGNvbG8DdwRsA1dTMQRwb3MDODcEc2VjA3NyBHZ0aWQD\\/SIG=12jscc3ng\\/EXP=1147592336\\/**http%3a\\/\\/www.theage.com.au\\/articles\\/2003\\/08\\/18\\/1061059775995.html","ModificationDate":1147158000,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBiB7dmMwF;_ylu=X3oDMTBxZjFrNnYwBGNvbG8DdwRwb3MDODcEc2VjA3NyBHZ0aWQD\\/SIG=174fs4fo6\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.theage.com.au\\/articles\\/2003\\/08\\/18\\/1061059775995.html%26w=132%26d=VUVD3UaqMwJD%26icp=1%26.intl=us","Size":"25163"}},{"Title":"Psalms 132","Summary":"Psalms 132. 132:1. Lord, remember David, and all his afflictions: 132:2. How he sware unto the LORD, and vowed unto the mighty God of Jacob; 132:3 ... Psalms 132. Chapters: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ... 132:3. Surely I will not come into the tabernacle of my ...","Url":"http:\\/\\/www.maitreg.com\\/bible\\/view.asp?book=38&chapter=132","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBih7dmMwF;_ylu=X3oDMTEwZjVxcHI4BGNvbG8DdwRsA1dTMQRwb3MDODgEc2VjA3NyBHZ0aWQD\\/SIG=12hild8td\\/EXP=1147592336\\/**http%3a\\/\\/www.maitreg.com\\/bible\\/view.asp%3fbook=38%26chapter=132","ModificationDate":1117609200,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBjx7dmMwF;_ylu=X3oDMTBxb2JpMW5pBGNvbG8DdwRwb3MDODgEc2VjA3NyBHZ0aWQD\\/SIG=17elhve1h\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.maitreg.com\\/bible\\/view.asp%253Fbook%253D38%2526chapter%253D132%26w=132%26d=TMHn-UaqMjbU%26icp=1%26.intl=us","Size":"27216"}},{"Title":"132","Summary":"35 U.S.C. 132 Notice of rejection; reexamination. - Patent Laws. 35 U.S.C. 132 Notice of rejection; reexamination.","Url":"http:\\/\\/www.uspto.gov\\/web\\/offices\\/pac\\/mpep\\/documents\\/appxl_35_U_S_C_132.htm","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBkR7dmMwF;_ylu=X3oDMTEwNTA2aTh1BGNvbG8DdwRsA1dTMQRwb3MDODkEc2VjA3NyBHZ0aWQD\\/SIG=12ucmimjn\\/EXP=1147592336\\/**http%3a\\/\\/www.uspto.gov\\/web\\/offices\\/pac\\/mpep\\/documents\\/appxl_35_U_S_C_132.htm","ModificationDate":1133942400,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBlh7dmMwF;_ylu=X3oDMTBxNmVndjYxBGNvbG8DdwRwb3MDODkEc2VjA3NyBHZ0aWQD\\/SIG=17f2jjpsh\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.uspto.gov\\/web\\/offices\\/pac\\/mpep\\/documents\\/appxl_35_U_S_C_132.htm%26w=132%26d=Nil-N0aqMjBx%26icp=1%26.intl=us","Size":"8182"}},{"Title":"A CONCISE SUMMARY OF THE PUBLIC HEARINGS","Summary":"... hearing on Bill 132. It shows you who was for, who was ... Opposes BSL, pointed out many anomalies in Bill 132, for example you can\'t teach a pit bull to ...","Url":"http:\\/\\/www.dogwatch.net\\/bill132.pdf","ClickUrl":"http:\\/\\/www.dogwatch.net\\/bill132.pdf#search=\'\'","ModificationDate":1109232000,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBmx7dmMwF;_ylu=X3oDMTBxZ2gwNnM2BGNvbG8DdwRwb3MDOTAEc2VjA3NyBHZ0aWQD\\/SIG=168j23ta7\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.dogwatch.net\\/bill132.pdf%26w=132%26d=PkjRQEaqMuwO%26icp=1%26.intl=us","Size":"1982792"}},{"Title":"JPL News -- A Galaxy Far, Far Away Eyed by Linked Hawaiian Telescopes","Summary":"... Keck Observatory, Kamuela, Hawaii. 2003-132. Site Manager: Webmasters ...","Url":"http:\\/\\/www.jpl.nasa.gov\\/releases\\/2003\\/132.cfm","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBnR7dmMwF;_ylu=X3oDMTEwaTAxcXV0BGNvbG8DdwRsA1dTMQRwb3MDOTEEc2VjA3NyBHZ0aWQD\\/SIG=12170u1vu\\/EXP=1147592336\\/**http%3a\\/\\/www.jpl.nasa.gov\\/releases\\/2003\\/132.cfm","ModificationDate":1136016000,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBoh7dmMwF;_ylu=X3oDMTBxanNkbHBvBGNvbG8DdwRwb3MDOTEEc2VjA3NyBHZ0aWQD\\/SIG=16i2p31tn\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.jpl.nasa.gov\\/releases\\/2003\\/132.cfm%26w=132%26d=VNPrSUaqMkiG%26icp=1%26.intl=us","Size":"22198"}},{"Title":"(132) Justinian I","Summary":"(132) Justinian I - AV solidus, A.D. 527-545, 4.45 g. ( inv. 91.270). Obverse: Facing helmeted and cuirassed bust of Justinian, holding globus cruciger in r.; at l.","Url":"http:\\/\\/www.lawrence.edu\\/dept\\/art\\/buerger\\/catalogue\\/132.html","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBpB7dmMwF;_ylu=X3oDMTEwamM1Y3A2BGNvbG8DdwRsA1dTMQRwb3MDOTIEc2VjA3NyBHZ0aWQD\\/SIG=12f6r1r1h\\/EXP=1147592336\\/**http%3a\\/\\/www.lawrence.edu\\/dept\\/art\\/buerger\\/catalogue\\/132.html","ModificationDate":1006848000,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBqR7dmMwF;_ylu=X3oDMTBxZWNpdmpnBGNvbG8DdwRwb3MDOTIEc2VjA3NyBHZ0aWQD\\/SIG=1709bh559\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.lawrence.edu\\/dept\\/art\\/buerger\\/catalogue\\/132.html%26w=132%26d=BJJDnkaqMjfk%26icp=1%26.intl=us","Size":"3186"}},{"Title":"131","Summary":"35 U.S.C. 131 Examination of application. - Patent Laws. 35 U.S.C. 131 Examination of application.","Url":"http:\\/\\/www.uspto.gov\\/web\\/offices\\/pac\\/mpep\\/documents\\/appxl_35_U_S_C_131.htm","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBqx7dmMwF;_ylu=X3oDMTEwdDUzZHBhBGNvbG8DdwRsA1dTMQRwb3MDOTMEc2VjA3NyBHZ0aWQD\\/SIG=12u6cdfcn\\/EXP=1147592336\\/**http%3a\\/\\/www.uspto.gov\\/web\\/offices\\/pac\\/mpep\\/documents\\/appxl_35_U_S_C_131.htm","ModificationDate":1133942400,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBsB7dmMwF;_ylu=X3oDMTBxdXZhZWxkBGNvbG8DdwRwb3MDOTMEc2VjA3NyBHZ0aWQD\\/SIG=17f8j8d98\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.uspto.gov\\/web\\/offices\\/pac\\/mpep\\/documents\\/appxl_35_U_S_C_131.htm%26w=132%26d=R2aGhUaqMj30%26icp=1%26.intl=us","Size":"7341"}},{"Title":"132 on Flickr - Photo Sharing!","Summary":"... 132. To take full advantage of Flickr, you should use a JavaScript-enabled browser and ...","Url":"http:\\/\\/www.flickr.com\\/photos\\/brettsky\\/53839790\\/","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBsh7dmMwF;_ylu=X3oDMTEwZ2lxZDhhBGNvbG8DdwRsA1dTMQRwb3MDOTQEc2VjA3NyBHZ0aWQD\\/SIG=123ojcbf0\\/EXP=1147592336\\/**http%3a\\/\\/www.flickr.com\\/photos\\/brettsky\\/53839790\\/","ModificationDate":1145862000,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBtx7dmMwF;_ylu=X3oDMTBxYTJvNGFhBGNvbG8DdwRwb3MDOTQEc2VjA3NyBHZ0aWQD\\/SIG=16ks6e563\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.flickr.com\\/photos\\/brettsky\\/53839790\\/%26w=132%26d=GA_4oEaqMq4P%26icp=1%26.intl=us","Size":"74392"}},{"Title":"Ag GPS 124 \\/ 132","Summary":"AgGPS 124 \\/ 132. Operation Manual. AgGPS Receiver Firmware Version 1.40, 1.41 and 1.42. Part Number 38747-00-ENG. Revision C. September 2000. T. Support Offices. Trimble Precision Agricultural Systems. 9290 Bond Street, Suite 102. Overland Park, KS 66214 U.S.A. ... describes how to install and configure the AgGPS_ 124, 132, and 132. Air receivers ...","Url":"http:\\/\\/www.linco.com\\/AG124132REVB.PDF","ClickUrl":"http:\\/\\/www.linco.com\\/AG124132REVB.PDF#search=\'\'","ModificationDate":986281200,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBvB7dmMwF;_ylu=X3oDMTBxbDgxOWxkBGNvbG8DdwRwb3MDOTUEc2VjA3NyBHZ0aWQD\\/SIG=16ajtq3hk\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.linco.com\\/AG124132REVB.PDF%26w=132%26d=FCohUkaqMjOV%26icp=1%26.intl=us","Size":"3610097"}},{"Title":"Tehillim - Chapter 132 | Chabad.org","Summary":"Please login for more site features. Tehillim - Chapter 132. 1. A song of ascents. Remember, O Lord, onto David all his affliction. 2. That he swore to the Lord, he vowed to the Mighty One of Jacob; ... Chabad.org \\" Library \\" Classic Texts \\" The Bible (with Rashi) \\" K\'tuvim \\" Tehillim \\" Chapter 132 ...","Url":"http:\\/\\/www.chabad.org\\/library\\/article.asp?AID=16353","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBvh7dmMwF;_ylu=X3oDMTEwam44NW9vBGNvbG8DdwRsA1dTMQRwb3MDOTYEc2VjA3NyBHZ0aWQD\\/SIG=129b821nj\\/EXP=1147592336\\/**http%3a\\/\\/www.chabad.org\\/library\\/article.asp%3fAID=16353","ModificationDate":1146898800,"MimeType":"text\\/html","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBwx7dmMwF;_ylu=X3oDMTBxczRxYWlqBGNvbG8DdwRwb3MDOTYEc2VjA3NyBHZ0aWQD\\/SIG=170gmib5a\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.chabad.org\\/library\\/article.asp%253FAID%253D16353%26w=132%26d=I-adaEaqMvld%26icp=1%26.intl=us","Size":"41051"}},{"Title":"Downloaded 19 Jan 2003 to 132.77.4.43. Redistribution subject to AIP license or copyright, see http:\\/\\/ojps.aip.org\\/... ","Summary":"Downloaded 19 Jan 2003 to 132.77.4.43. Redistribution subject to AIP license or copyright, see http:\\/\\/ojps.aip.org\\/jcpo\\/jcpcr.jsp. Downloaded 19 Jan 2003 to 132.77.4.43.","Url":"http:\\/\\/www.weizmann.ac.il\\/chemphys\\/Frydman_group\\/Publications\\/ExchDynamics-JCP90.pdf","ClickUrl":"http:\\/\\/www.weizmann.ac.il\\/chemphys\\/Frydman_group\\/Publications\\/ExchDynamics-JCP90.pdf#search=\'\'","ModificationDate":1061622000,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcByB7dmMwF;_ylu=X3oDMTBxZGVwcTFiBGNvbG8DdwRwb3MDOTcEc2VjA3NyBHZ0aWQD\\/SIG=17p1893is\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.weizmann.ac.il\\/chemphys\\/Frydman_group\\/Publications\\/ExchDynamics-JCP90.pdf%26w=132%26d=KPVdS0aqMkW1%26icp=1%26.intl=us","Size":"816603"}},{"Title":"Downloaded 19 May 2003 to 132.77.4.43. Redistribution subject to AIP license or copyright, see http:\\/\\/ojps.aip.org\\/... ","Summary":"Downloaded 19 May 2003 to 132.77.4.43. Redistribution subject to AIP license or copyright, see http:\\/\\/ojps.aip.org\\/japo\\/japcr.jsp. Downloaded 19 May 2003 to 132.77.4.43.","Url":"http:\\/\\/www.weizmann.ac.il\\/wagner\\/COURSES\\/Reading%20material%20(papers)\\/030_JAP_1990_ContactAngle.pdf","ClickUrl":"http:\\/\\/www.weizmann.ac.il\\/wagner\\/COURSES\\/Reading%20material%20(papers)\\/030_JAP_1990_ContactAngle.pdf#search=\'\'","ModificationDate":1136880000,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcBzR7dmMwF;_ylu=X3oDMTBxMjBxZ2VoBGNvbG8DdwRwb3MDOTgEc2VjA3NyBHZ0aWQD\\/SIG=18pfdig62\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=www.weizmann.ac.il\\/wagner\\/COURSES\\/Reading%252520material%252520%2528papers%2529\\/030_JAP_1990_ContactAngle.pdf%26w=132%26d=Nf5MWEaqMkV0%26icp=1%26.intl=us","Size":"784314"}},{"Title":"Downloaded 24 Jul 2002 to 132.163.135.12. Redistribution subject to AIP license or copyright, see http:\\/\\/ojps.aip... ","Summary":"Downloaded 24 Jul 2002 to 132.163.135.12. Redistribution subject to AIP license or copyright, see http:\\/\\/ojps.aip.org\\/japo\\/japcr.jsp. Downloaded 24 Jul 2002 to 132.163.135.12.","Url":"http:\\/\\/tf.nist.gov\\/general\\/pdf\\/569.pdf","ClickUrl":"http:\\/\\/tf.nist.gov\\/general\\/pdf\\/569.pdf#search=\'\'","ModificationDate":1027494000,"MimeType":"application\\/pdf","Cache":{"Url":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB0h7dmMwF;_ylu=X3oDMTBxNmJhcjNhBGNvbG8DdwRwb3MDOTkEc2VjA3NyBHZ0aWQD\\/SIG=16b31en6n\\/EXP=1147592336\\/**http%3a\\/\\/66.218.69.11\\/search\\/cache%3fei=UTF-8%26query=132%26output=json%26results=100%26appid=jennyhan_ac%26u=tf.nist.gov\\/general\\/pdf\\/569.pdf%26w=132%26d=IpdTwEaqMirR%26icp=1%26.intl=us","Size":"1002734"}},{"Title":"[DB] naruto 132","Summary":"","Url":"http:\\/\\/yhbt.mine.nu\\/t\\/n132.torrent","ClickUrl":"http:\\/\\/uk.wrs.yahoo.com\\/_ylt=A0Je5VwQjWVEsGcB1B7dmMwF;_ylu=X3oDMTExaW11dG45BGNvbG8DdwRsA1dTMQRwb3MDMTAwBHNlYwNzcgR2dGlkAw--\\/SIG=11m58k4sj\\/EXP=1147592336\\/**http%3a\\/\\/yhbt.mine.nu\\/t\\/n132.torrent","ModificationDate":1114671600,"MimeType":"unknown"}]}}'); - - assertEquals(result.groupCount + 1, 5); -} diff --git a/tests/corelib_2/regexp/standalones_test.dart b/tests/corelib_2/regexp/standalones_test.dart deleted file mode 100644 index 580328d14b8..00000000000 --- a/tests/corelib_2/regexp/standalones_test.dart +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2008 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - /* Many of the Mozilla regexp tests used 'toSource' to test their - * results. Since we don't currently support toSource, those tests - * are disabled and standalone versions are included here. - */ - - // Tests from ecma_3/RegExp/regress-78156.js - var string = 'aaa\n789\r\nccc\r\n345'; - var pattern = new RegExp(r"^\d", multiLine: true); - var resultList = pattern.allMatches(string).toList(); - assertEquals(2, resultList.length, "1"); - assertEquals('7', resultList[0].group(0), "2"); - assertEquals('3', resultList[1].group(0), "3"); - - pattern = new RegExp(r"\d$", multiLine: true); - resultList = pattern.allMatches(string).toList(); - assertEquals(2, resultList.length, "4"); - assertEquals('9', resultList[0].group(0), "5"); - assertEquals('5', resultList[1].group(0), "6"); - - string = 'aaa\n789\r\nccc\r\nddd'; - pattern = new RegExp(r"^\d", multiLine: true); - resultList = pattern.allMatches(string).toList(); - assertEquals(1, resultList.length, "7"); - assertEquals('7', resultList[0].group(0), "8"); - - pattern = new RegExp(r"\d$", multiLine: true); - resultList = pattern.allMatches(string).toList(); - assertEquals(1, resultList.length, "9"); - assertEquals('9', resultList[0].group(0), "10"); - - // Tests from ecma_3/RegExp/regress-72964.js - pattern = new RegExp(r"[\S]+"); - string = '\u00BF\u00CD\u00BB\u00A7'; - var resultMatch = pattern.firstMatch(string); - assertEquals(1, resultMatch.groupCount + 1, "11"); - assertEquals(string, resultMatch.group(0), "12"); - - string = '\u00BF\u00CD \u00BB\u00A7'; - resultMatch = pattern.firstMatch(string); - assertEquals(1, resultMatch.groupCount + 1, "13"); - assertEquals('\u00BF\u00CD', resultMatch.group(0), "14"); - - string = '\u4e00\uac00\u4e03\u4e00'; - resultMatch = pattern.firstMatch(string); - assertEquals(1, resultMatch.groupCount + 1, "15"); - assertEquals(string, resultMatch.group(0), "16"); - - string = '\u4e00\uac00 \u4e03\u4e00'; - resultMatch = pattern.firstMatch(string); - assertEquals(1, resultMatch.groupCount + 1, "17"); - assertEquals('\u4e00\uac00', resultMatch.group(0), "18"); -} diff --git a/tests/corelib_2/regexp/toString_test.dart b/tests/corelib_2/regexp/toString_test.dart deleted file mode 100644 index d08bbfa5799..00000000000 --- a/tests/corelib_2/regexp/toString_test.dart +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - dynamic testForwardSlash(pattern, _string) { - var string = _string; - - var re1 = new RegExp(pattern); - - return re1.hasMatch(string); - } - - dynamic testLineTerminator(pattern) { - var re1 = new RegExp(pattern); - - return new RegExp(r"\n|\r|\u2028|\u2029").hasMatch(re1.toString()); - } - - // These strings are equivalent, since the '\' is identity escaping the '/' at the string level. - shouldBeTrue(testForwardSlash("^/\$", "/")); - shouldBeTrue(testForwardSlash("^\/\$", "/")); - // This string passes "^\/$" to the RegExp, so the '/' is escaped in the re! - shouldBeTrue(testForwardSlash("^\\/\$", "/")); - // These strings pass "^\\/$" and "^\\\/$" respectively to the RegExp, giving one '\' to match. - shouldBeTrue(testForwardSlash("^\\\\/\$", "\\/")); - shouldBeTrue(testForwardSlash("^\\\\\\/\$", "\\/")); - // These strings match two backslashes (the second with the '/' escaped). - shouldBeTrue(testForwardSlash("^\\\\\\\\/\$", "\\\\/")); - shouldBeTrue(testForwardSlash("^\\\\\\\\\\/\$", "\\\\/")); - // Test that nothing goes wrongif there are multiple forward slashes! - shouldBeTrue(testForwardSlash("x/x/x", "x/x/x")); - shouldBeTrue(testForwardSlash("x\\/x/x", "x/x/x")); - shouldBeTrue(testForwardSlash("x/x\\/x", "x/x/x")); - shouldBeTrue(testForwardSlash("x\\/x\\/x", "x/x/x")); - - shouldBeFalse(testLineTerminator("\\n")); - shouldBeFalse(testLineTerminator("\\\\n")); - shouldBeFalse(testLineTerminator("\\r")); - shouldBeFalse(testLineTerminator("\\\\r")); - shouldBeFalse(testLineTerminator("\\u2028")); - shouldBeFalse(testLineTerminator("\\\\u2028")); - shouldBeFalse(testLineTerminator("\\u2029")); - shouldBeFalse(testLineTerminator("\\\\u2029")); -} diff --git a/tests/corelib_2/regexp/unicode-character-ranges_test.dart b/tests/corelib_2/regexp/unicode-character-ranges_test.dart deleted file mode 100644 index e3867e59b44..00000000000 --- a/tests/corelib_2/regexp/unicode-character-ranges_test.dart +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) 2019, the Dart project authors. All rights reserved. -// Copyright 2011 the V8 project authors. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -import 'v8_regexp_utils.dart'; - -void execl(List expectation, RegExp re, String subject) { - shouldBe(re.firstMatch(subject), expectation); -} - -void execs(List expectation, String pattern, String subject) { - final re = RegExp(pattern, unicode: true); - shouldBe(re.firstMatch(subject), expectation); -} - -void main() { - // Character ranges. - execs(["A"], r"[A-D]", "A"); - execs(["ABCD"], r"[A-D]+", "ZABCDEF"); - - execs(["\u{12345}"], r"[\u1234-\u{12345}]", "\u{12345}"); - execs(null, r"[^\u1234-\u{12345}]", "\u{12345}"); - - execs(["\u{1234}"], r"[\u1234-\u{12345}]", "\u{1234}"); - execs(null, r"[^\u1234-\u{12345}]", "\u{1234}"); - - execs(null, r"[\u1234-\u{12345}]", "\u{1233}"); - execs(["\u{1233}"], r"[^\u1234-\u{12345}]", "\u{1233}"); - - execs(["\u{12346}"], r"[^\u1234-\u{12345}]", "\u{12346}"); - execs(null, r"[\u1234-\u{12345}]", "\u{12346}"); - - execs(["\u{12342}"], r"[\u{12340}-\u{12345}]", "\u{12342}"); - execs(["\u{12342}"], r"[\ud808\udf40-\ud808\udf45]", "\u{12342}"); - execs(null, r"[^\u{12340}-\u{12345}]", "\u{12342}"); - execs(null, r"[^\ud808\udf40-\ud808\udf45]", "\u{12342}"); - - execs(["\u{ffff}"], r"[\u{ff80}-\u{12345}]", "\u{ffff}"); - execs(["\u{ffff}"], r"[\u{ff80}-\ud808\udf45]", "\u{ffff}"); - execs(null, r"[^\u{ff80}-\u{12345}]", "\u{ffff}"); - execs(null, r"[^\u{ff80}-\ud808\udf45]", "\u{ffff}"); - - // Lone surrogate - execs(["\udc00"], r"[^\u{ff80}-\u{12345}]", "\uff99\u{dc00}A"); - execs(["\udc01"], r"[\u0100-\u{10ffff}]", "A\udc01"); - execs(["\udc03"], r"[\udc01-\udc03]", "\ud801\udc02\udc03"); - execs(["\ud801"], r"[\ud801-\ud803]", "\ud802\udc01\ud801"); - - // Paired surrogate. - execs(null, r"[^\u{ff80}-\u{12345}]", "\u{d800}\u{dc00}"); - execs(["\ud800\udc00"], r"[\u{ff80}-\u{12345}]", "\u{d800}\u{dc00}"); - execs(["foo\u{10e6d}bar"], r"foo\ud803\ude6dbar", "foo\u{10e6d}bar"); - - // Lone surrogates - execs(["\ud801\ud801"], r"\ud801+", "\ud801\udc01\ud801\ud801"); - execs(["\udc01\udc01"], r"\udc01+", "\ud801\ud801\udc01\udc01\udc01"); - - execs(["\udc02\udc03A"], r"\W\WA", "\ud801\udc01A\udc02\udc03A"); - execs(["\ud801\ud802"], r"\ud801.", "\ud801\udc01\ud801\ud802"); - execs(["\udc02\udc03A"], r"[\ud800-\udfff][\ud800-\udfff]A", - "\ud801\udc01A\udc02\udc03A"); - - // Character classes - execs(null, r"\w", "\ud801\udc01"); - execl(["\ud801"], RegExp(r"[^\w]"), "\ud801\udc01"); - execs(["\ud801\udc01"], r"[^\w]", "\ud801\udc01"); - execl(["\ud801"], RegExp(r"\W"), "\ud801\udc01"); - execs(["\ud801\udc01"], r"\W", "\ud801\udc01"); - - execs(["\ud800X"], r".X", "\ud800XaX"); - execs(["aX"], r".(? RegExp(r"\u", unicode: true)); - assertThrows(() => RegExp(r"\u12", unicode: true)); - assertThrows(() => RegExp(r"\ufoo", unicode: true)); - assertThrows(() => RegExp(r"\x", unicode: true)); - assertThrows(() => RegExp(r"\xfoo", unicode: true)); - assertThrows(() => RegExp(r"\z", unicode: true)); - assertThrows(() => RegExp(r"\8", unicode: true)); - assertThrows(() => RegExp(r"\9", unicode: true)); - - assertThrows(() => RegExp("\\u", unicode: true)); - assertThrows(() => RegExp("\\u12", unicode: true)); - assertThrows(() => RegExp("\\ufoo", unicode: true)); - assertThrows(() => RegExp("\\x", unicode: true)); - assertThrows(() => RegExp("\\xfoo", unicode: true)); - assertThrows(() => RegExp("\\z", unicode: true)); - assertThrows(() => RegExp("\\8", unicode: true)); - assertThrows(() => RegExp("\\9", unicode: true)); -} - -void TestTooBigHexEscape() { - // The hex number inside \u{} has a maximum value. - RegExp(r"\u{10ffff}", unicode: true); - RegExp("\\u{10ffff}", unicode: true); - assertThrows(() => RegExp(r"\u{110000}", unicode: true)); - assertThrows(() => RegExp("\\u{110000}", unicode: true)); - - // Without the u flag, they're of course fine ({x} is the count). - RegExp(r"\u{110000}"); - RegExp("\\u{110000}"); -} - -void TestSyntaxEscapes() { - // Syntax escapes work the same with or without the u flag. - void helper(RegExp r) { - assertTrue(r.hasMatch("foo[bar")); - assertFalse(r.hasMatch("foo]bar")); - } - - helper(RegExp(r"foo\[bar")); - helper(RegExp("foo\\[bar")); - helper(RegExp(r"foo\[bar", unicode: true)); - helper(RegExp("foo\\[bar", unicode: true)); -} - -void TestUnicodeSurrogates() { - // U+10E6D corresponds to the surrogate pair [U+D803, U+DE6D]. - void helper(RegExp r) { - assertTrue(r.hasMatch("foo\u{10e6d}bar")); - } - - helper(RegExp(r"foo\ud803\ude6dbar", unicode: true)); - helper(RegExp("foo\\ud803\\ude6dbar", unicode: true)); -} - -void main() { - TestUnicodeEscapes(); - TestUnicodeEscapesInCharacterClasses(); - TestBraceEscapesWithoutUnicodeFlag(); - TestInvalidEscapes(); - TestTooBigHexEscape(); - TestSyntaxEscapes(); - TestUnicodeSurrogates(); - - // Non-BMP patterns. - // Single character atom. - assertTrue(RegExp("\u{12345}", unicode: true).hasMatch("\u{12345}")); - assertTrue(RegExp(r"\u{12345}", unicode: true).hasMatch("\u{12345}")); - assertTrue(RegExp(r"\u{12345}", unicode: true).hasMatch("\ud808\udf45")); - assertTrue(RegExp(r"\u{12345}", unicode: true).hasMatch("\ud808\udf45")); - assertFalse(RegExp(r"\u{12345}", unicode: true).hasMatch("\udf45")); - assertFalse(RegExp(r"\u{12345}", unicode: true).hasMatch("\udf45")); - - // Multi-character atom. - assertTrue(RegExp(r"\u{12345}\u{23456}", unicode: true) - .hasMatch("a\u{12345}\u{23456}b")); - assertTrue(RegExp(r"\u{12345}\u{23456}", unicode: true) - .hasMatch("b\u{12345}\u{23456}c")); - assertFalse(RegExp(r"\u{12345}\u{23456}", unicode: true) - .hasMatch("a\udf45\u{23456}b")); - assertFalse(RegExp(r"\u{12345}\u{23456}", unicode: true) - .hasMatch("b\udf45\u{23456}c")); - - // Disjunction. - assertTrue(RegExp(r"\u{12345}(?:\u{23456})", unicode: true) - .hasMatch("a\u{12345}\u{23456}b")); - assertTrue(RegExp(r"\u{12345}(?:\u{23456})", unicode: true) - .hasMatch("b\u{12345}\u{23456}c")); - assertFalse(RegExp(r"\u{12345}(?:\u{23456})", unicode: true) - .hasMatch("a\udf45\u{23456}b")); - assertFalse(RegExp(r"\u{12345}(?:\u{23456})", unicode: true) - .hasMatch("b\udf45\u{23456}c")); - - // Alternative. - assertTrue( - RegExp(r"\u{12345}|\u{23456}", unicode: true).hasMatch("a\u{12345}b")); - assertTrue( - RegExp(r"\u{12345}|\u{23456}", unicode: true).hasMatch("b\u{23456}c")); - assertFalse( - RegExp(r"\u{12345}|\u{23456}", unicode: true).hasMatch("a\udf45\ud84db")); - assertFalse( - RegExp(r"\u{12345}|\u{23456}", unicode: true).hasMatch("b\udf45\ud808c")); - - // Capture. - assertTrue(RegExp("(\u{12345}|\u{23456}).\\1", unicode: true) - .hasMatch("\u{12345}b\u{12345}")); - assertTrue(RegExp(r"(\u{12345}|\u{23456}).\1", unicode: true) - .hasMatch("\u{12345}b\u{12345}")); - assertFalse(RegExp("(\u{12345}|\u{23456}).\\1", unicode: true) - .hasMatch("\u{12345}b\u{23456}")); - assertFalse(RegExp(r"(\u{12345}|\u{23456}).\1", unicode: true) - .hasMatch("\u{12345}b\u{23456}")); - - // Quantifier. - assertTrue(RegExp("\u{12345}{3}", unicode: true) - .hasMatch("\u{12345}\u{12345}\u{12345}")); - assertTrue(RegExp(r"\u{12345}{3}", unicode: true) - .hasMatch("\u{12345}\u{12345}\u{12345}")); - assertTrue(RegExp("\u{12345}{3}").hasMatch("\u{12345}\udf45\udf45")); - assertFalse(RegExp(r"\ud808\udf45{3}", unicode: true) - .hasMatch("\u{12345}\udf45\udf45")); - assertTrue(RegExp(r"\ud808\udf45{3}", unicode: true) - .hasMatch("\u{12345}\u{12345}\u{12345}")); - assertFalse( - RegExp("\u{12345}{3}", unicode: true).hasMatch("\u{12345}\udf45\udf45")); - assertFalse( - RegExp(r"\u{12345}{3}", unicode: true).hasMatch("\u{12345}\udf45\udf45")); - - // Literal surrogates. - shouldBe( - RegExp("\ud800\udc00+", unicode: true).firstMatch("\u{10000}\u{10000}"), - ["\u{10000}\u{10000}"]); - shouldBe( - RegExp("\\ud800\\udc00+", unicode: true).firstMatch("\u{10000}\u{10000}"), - ["\u{10000}\u{10000}"]); - - shouldBe( - RegExp("[\\ud800\\udc03-\\ud900\\udc01\]+", unicode: true) - .firstMatch("\u{10003}\u{50001}"), - ["\u{10003}\u{50001}"]); - shouldBe( - RegExp("[\ud800\udc03-\u{50001}\]+", unicode: true) - .firstMatch("\u{10003}\u{50001}"), - ["\u{10003}\u{50001}"]); - - // Unicode escape sequences to represent a non-BMP character cannot have - // mixed notation, and must follow the rules for RegExpUnicodeEscapeSequence. - assertThrows(() => RegExp("[\\ud800\udc03-\ud900\\udc01\]+", unicode: true)); - assertNull( - RegExp("\\ud800\udc00+", unicode: true).firstMatch("\u{10000}\u{10000}")); - assertNull( - RegExp("\ud800\\udc00+", unicode: true).firstMatch("\u{10000}\u{10000}")); - - assertNull(RegExp("[\\ud800\udc00]", unicode: true).firstMatch("\u{10000}")); - assertNull( - RegExp("[\\{ud800}\udc00]", unicode: true).firstMatch("\u{10000}")); - assertNull(RegExp("[\ud800\\udc00]", unicode: true).firstMatch("\u{10000}")); - assertNull( - RegExp("[\ud800\\{udc00}]", unicode: true).firstMatch("\u{10000}")); - - assertNull(RegExp(r"\u{d800}\u{dc00}+", unicode: true) - .firstMatch("\ud800\udc00\udc00")); - assertNull(RegExp(r"\ud800\u{dc00}+", unicode: true) - .firstMatch("\ud800\udc00\udc00")); - assertNull(RegExp(r"\u{d800}\udc00+", unicode: true) - .firstMatch("\ud800\udc00\udc00")); -} diff --git a/tests/corelib_2/regexp/unicode-handling_test.dart b/tests/corelib_2/regexp/unicode-handling_test.dart deleted file mode 100644 index d1a1f15dd33..00000000000 --- a/tests/corelib_2/regexp/unicode-handling_test.dart +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - 'Test for proper handling of Unicode RegExps and bug 7445: Gmail puts wrong subject in replies.'); - - // Regex to match Re in various languages straight from Gmail source - var I3 = new RegExp( - r"^\s*(fwd|re|aw|antw|antwort|wg|sv|ang|odp|betreff|betr|transf|reenv\.|reenv|in|res|resp|resp\.|enc|\u8f6c\u53d1|\u56DE\u590D|\u041F\u0435\u0440\u0435\u0441\u043B|\u041E\u0442\u0432\u0435\u0442):\s*(.*)$", - caseSensitive: false); - - // Other RegExs from Gmail source - var Ci = new RegExp(r"\s+"); - var BC = new RegExp(r"^ "); - var BG = new RegExp(r" $"); - - // This function replaces consecutive whitespace with a single space - // then removes a leading and trailing space if they exist. (From Gmail) - dynamic Gn(a) { - return a.replaceAll(Ci, " ").replaceAll(BC, "").replaceAll(BG, ""); - } - - // Strips leading Re or similar (from Gmail source) - dynamic cy(a) { - //var b = I3.firstMatch(a); - var b = I3.firstMatch(a); - - if (b != null) { - a = b.group(2); - } - - return Gn(a); - } - - assertEquals(cy('Re: Moose'), 'Moose'); - assertEquals(cy('\u8f6c\u53d1: Moose'), 'Moose'); - - // Test handling of \u2820 (skull and crossbones) - var sample = "sample bm\u2820p cm\\u2820p"; - - var inlineRe = new RegExp(r".m\u2820p"); - assertEquals(inlineRe.firstMatch(sample).group(0), 'bm\u2820p'); - - // Test handling of \u007c "|" - var bsample = "sample bm\u007cp cm\\u007cp"; - - var binlineRe = new RegExp(r".m\u007cp"); - - assertEquals(binlineRe.firstMatch(bsample).group(0), 'bm|p'); -} diff --git a/tests/corelib_2/regexp/unicode-property-binary_test.dart b/tests/corelib_2/regexp/unicode-property-binary_test.dart deleted file mode 100644 index 8580fd387da..00000000000 --- a/tests/corelib_2/regexp/unicode-property-binary_test.dart +++ /dev/null @@ -1,203 +0,0 @@ -// Copyright (c) 2019, the Dart project authors. All rights reserved. -// Copyright 2016 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -import 'v8_regexp_utils.dart'; - -void main() { - void t(RegExp re, String s) { - assertTrue(re.hasMatch(s)); - } - - void f(RegExp re, String s) { - assertFalse(re.hasMatch(s)); - } - - assertThrows(() => RegExp("\\p{Hiragana}", unicode: true)); - assertThrows(() => RegExp("\\p{Bidi_Class}", unicode: true)); - assertThrows(() => RegExp("\\p{Bidi_C=False}", unicode: true)); - assertThrows(() => RegExp("\\P{Bidi_Control=Y}", unicode: true)); - assertThrows(() => RegExp("\\p{AHex=Yes}", unicode: true)); - - assertThrows(() => RegExp("\\p{Composition_Exclusion}", unicode: true)); - assertThrows(() => RegExp("\\p{CE}", unicode: true)); - assertThrows(() => RegExp("\\p{Full_Composition_Exclusion}", unicode: true)); - assertThrows(() => RegExp("\\p{Comp_Ex}", unicode: true)); - assertThrows(() => RegExp("\\p{Grapheme_Link}", unicode: true)); - assertThrows(() => RegExp("\\p{Gr_Link}", unicode: true)); - assertThrows(() => RegExp("\\p{Hyphen}", unicode: true)); - assertThrows(() => RegExp("\\p{NFD_Inert}", unicode: true)); - assertThrows(() => RegExp("\\p{NFDK_Inert}", unicode: true)); - assertThrows(() => RegExp("\\p{NFC_Inert}", unicode: true)); - assertThrows(() => RegExp("\\p{NFKC_Inert}", unicode: true)); - assertThrows(() => RegExp("\\p{Segment_Starter}", unicode: true)); - - t(RegExp(r"\p{Alphabetic}", unicode: true), "æ"); - f(RegExp(r"\p{Alpha}", unicode: true), "1"); - - t(RegExp(r"\p{ASCII_Hex_Digit}", unicode: true), "f"); - f(RegExp(r"\p{AHex}", unicode: true), "g"); - - t(RegExp(r"\p{Bidi_Control}", unicode: true), "\u200e"); - f(RegExp(r"\p{Bidi_C}", unicode: true), "g"); - - t(RegExp(r"\p{Bidi_Mirrored}", unicode: true), "("); - f(RegExp(r"\p{Bidi_M}", unicode: true), "-"); - - t(RegExp(r"\p{Case_Ignorable}", unicode: true), "\u02b0"); - f(RegExp(r"\p{CI}", unicode: true), "a"); - - t(RegExp(r"\p{Changes_When_Casefolded}", unicode: true), "B"); - f(RegExp(r"\p{CWCF}", unicode: true), "1"); - - t(RegExp(r"\p{Changes_When_Casemapped}", unicode: true), "b"); - f(RegExp(r"\p{CWCM}", unicode: true), "1"); - - t(RegExp(r"\p{Changes_When_Lowercased}", unicode: true), "B"); - f(RegExp(r"\p{CWL}", unicode: true), "1"); - - t(RegExp(r"\p{Changes_When_Titlecased}", unicode: true), "b"); - f(RegExp(r"\p{CWT}", unicode: true), "1"); - - t(RegExp(r"\p{Changes_When_Uppercased}", unicode: true), "b"); - f(RegExp(r"\p{CWU}", unicode: true), "1"); - - t(RegExp(r"\p{Dash}", unicode: true), "-"); - f(RegExp(r"\p{Dash}", unicode: true), "1"); - - t(RegExp(r"\p{Default_Ignorable_Code_Point}", unicode: true), "\u00ad"); - f(RegExp(r"\p{DI}", unicode: true), "1"); - - t(RegExp(r"\p{Deprecated}", unicode: true), "\u17a3"); - f(RegExp(r"\p{Dep}", unicode: true), "1"); - - t(RegExp(r"\p{Diacritic}", unicode: true), "\u0301"); - f(RegExp(r"\p{Dia}", unicode: true), "1"); - - t(RegExp(r"\p{Emoji}", unicode: true), "\u2603"); - f(RegExp(r"\p{Emoji}", unicode: true), "x"); - - t(RegExp(r"\p{Emoji_Component}", unicode: true), "\u{1F1E6}"); - f(RegExp(r"\p{Emoji_Component}", unicode: true), "x"); - - t(RegExp(r"\p{Emoji_Modifier_Base}", unicode: true), "\u{1F6CC}"); - f(RegExp(r"\p{Emoji_Modifier_Base}", unicode: true), "x"); - - t(RegExp(r"\p{Emoji_Modifier}", unicode: true), "\u{1F3FE}"); - f(RegExp(r"\p{Emoji_Modifier}", unicode: true), "x"); - - t(RegExp(r"\p{Emoji_Presentation}", unicode: true), "\u{1F308}"); - f(RegExp(r"\p{Emoji_Presentation}", unicode: true), "x"); - - t(RegExp(r"\p{Extender}", unicode: true), "\u3005"); - f(RegExp(r"\p{Ext}", unicode: true), "x"); - - t(RegExp(r"\p{Grapheme_Base}", unicode: true), " "); - f(RegExp(r"\p{Gr_Base}", unicode: true), "\u0010"); - - t(RegExp(r"\p{Grapheme_Extend}", unicode: true), "\u0300"); - f(RegExp(r"\p{Gr_Ext}", unicode: true), "x"); - - t(RegExp(r"\p{Hex_Digit}", unicode: true), "a"); - f(RegExp(r"\p{Hex}", unicode: true), "g"); - - t(RegExp(r"\p{ID_Continue}", unicode: true), "1"); - f(RegExp(r"\p{IDC}", unicode: true), "."); - - t(RegExp(r"\p{ID_Start}", unicode: true), "a"); - f(RegExp(r"\p{IDS}", unicode: true), "1"); - - t(RegExp(r"\p{Ideographic}", unicode: true), "漢"); - f(RegExp(r"\p{Ideo}", unicode: true), "H"); - - t(RegExp(r"\p{IDS_Binary_Operator}", unicode: true), "\u2FF0"); - f(RegExp(r"\p{IDSB}", unicode: true), "a"); - - t(RegExp(r"\p{IDS_Trinary_Operator}", unicode: true), "\u2FF2"); - f(RegExp(r"\p{IDST}", unicode: true), "a"); - - t(RegExp(r"\p{Join_Control}", unicode: true), "\u200c"); - f(RegExp(r"\p{Join_C}", unicode: true), "a"); - - t(RegExp(r"\p{Logical_Order_Exception}", unicode: true), "\u0e40"); - f(RegExp(r"\p{LOE}", unicode: true), "a"); - - t(RegExp(r"\p{Lowercase}", unicode: true), "a"); - f(RegExp(r"\p{Lower}", unicode: true), "A"); - - t(RegExp(r"\p{Math}", unicode: true), "="); - f(RegExp(r"\p{Math}", unicode: true), "A"); - - t(RegExp(r"\p{Noncharacter_Code_Point}", unicode: true), "\uFDD0"); - f(RegExp(r"\p{NChar}", unicode: true), "A"); - - t(RegExp(r"\p{Pattern_Syntax}", unicode: true), "\u0021"); - f(RegExp(r"\p{NChar}", unicode: true), "A"); - - t(RegExp(r"\p{Pattern_White_Space}", unicode: true), "\u0009"); - f(RegExp(r"\p{Pat_Syn}", unicode: true), "A"); - - t(RegExp(r"\p{Quotation_Mark}", unicode: true), "'"); - f(RegExp(r"\p{QMark}", unicode: true), "A"); - - t(RegExp(r"\p{Radical}", unicode: true), "\u2FAD"); - f(RegExp(r"\p{Radical}", unicode: true), "A"); - - t(RegExp(r"\p{Regional_Indicator}", unicode: true), "\u{1F1E6}"); - f(RegExp(r"\p{Regional_Indicator}", unicode: true), "A"); - - t(RegExp(r"\p{Sentence_Terminal}", unicode: true), "!"); - f(RegExp(r"\p{STerm}", unicode: true), "A"); - - t(RegExp(r"\p{Soft_Dotted}", unicode: true), "i"); - f(RegExp(r"\p{SD}", unicode: true), "A"); - - t(RegExp(r"\p{Terminal_Punctuation}", unicode: true), "."); - f(RegExp(r"\p{Term}", unicode: true), "A"); - - t(RegExp(r"\p{Unified_Ideograph}", unicode: true), "\u4e00"); - f(RegExp(r"\p{UIdeo}", unicode: true), "A"); - - t(RegExp(r"\p{Uppercase}", unicode: true), "A"); - f(RegExp(r"\p{Upper}", unicode: true), "a"); - - t(RegExp(r"\p{Variation_Selector}", unicode: true), "\uFE00"); - f(RegExp(r"\p{VS}", unicode: true), "A"); - - t(RegExp(r"\p{White_Space}", unicode: true), " "); - f(RegExp(r"\p{WSpace}", unicode: true), "A"); - - t(RegExp(r"\p{XID_Continue}", unicode: true), "1"); - f(RegExp(r"\p{XIDC}", unicode: true), " "); - - t(RegExp(r"\p{XID_Start}", unicode: true), "A"); - f(RegExp(r"\p{XIDS}", unicode: true), " "); -} diff --git a/tests/corelib_2/regexp/unicode-property-char-class_test.dart b/tests/corelib_2/regexp/unicode-property-char-class_test.dart deleted file mode 100644 index fe6316ecec6..00000000000 --- a/tests/corelib_2/regexp/unicode-property-char-class_test.dart +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2019, the Dart project authors. All rights reserved. -// Copyright 2011 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -import 'v8_regexp_utils.dart'; - -void main() { - assertThrows(() => RegExp("[\\p]", unicode: true)); - assertThrows(() => RegExp("[\\p{garbage}]", unicode: true)); - assertThrows(() => RegExp("[\\p{}]", unicode: true)); - assertThrows(() => RegExp("[\\p{]", unicode: true)); - assertThrows(() => RegExp("[\\p}]", unicode: true)); - assertThrows(() => RegExp("^[\\p{Lu}-\\p{Ll}]+\$", unicode: true)); - - assertTrue(RegExp(r"^[\p{Lu}\p{Ll}]+$", unicode: true).hasMatch("ABCabc")); - assertTrue(RegExp(r"^[\p{Lu}-]+$", unicode: true).hasMatch("ABC-")); - assertFalse(RegExp(r"^[\P{Lu}\p{Ll}]+$", unicode: true).hasMatch("ABCabc")); - assertTrue(RegExp(r"^[\P{Lu}\p{Ll}]+$", unicode: true).hasMatch("abc")); - assertTrue(RegExp(r"^[\P{Lu}]+$", unicode: true).hasMatch("abc123")); - assertFalse(RegExp(r"^[\P{Lu}]+$", unicode: true).hasMatch("XYZ")); - assertTrue(RegExp(r"[\p{Math}]", unicode: true).hasMatch("+")); - assertTrue(RegExp(r"[\P{Bidi_M}]", unicode: true).hasMatch(" ")); - assertTrue(RegExp(r"[\p{Hex}]", unicode: true).hasMatch("A")); - - assertTrue(RegExp(r"^[^\P{Lu}]+$", unicode: true).hasMatch("XYZ")); - assertFalse(RegExp(r"^[^\p{Lu}\p{Ll}]+$", unicode: true).hasMatch("abc")); - assertFalse(RegExp(r"^[^\p{Lu}\p{Ll}]+$", unicode: true).hasMatch("ABC")); - assertTrue(RegExp(r"^[^\p{Lu}\p{Ll}]+$", unicode: true).hasMatch("123")); - assertTrue(RegExp(r"^[^\p{Lu}\P{Ll}]+$", unicode: true).hasMatch("abc")); -} diff --git a/tests/corelib_2/regexp/unicode-property-enumerated_test.dart b/tests/corelib_2/regexp/unicode-property-enumerated_test.dart deleted file mode 100644 index 82b32339677..00000000000 --- a/tests/corelib_2/regexp/unicode-property-enumerated_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2019, the Dart project authors. All rights reserved. -// Copyright 2016 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -import 'v8_regexp_utils.dart'; - -void main() { - assertThrows(() => RegExp("\\p{Bidi_Class=L}+", unicode: true)); - assertThrows(() => RegExp("\\p{bc=Left_To_Right}+", unicode: true)); - assertThrows(() => RegExp("\\p{bc=AL}+", unicode: true)); - assertThrows(() => RegExp("\\p{bc=Arabic_Letter}+", unicode: true)); - - assertThrows(() => RegExp("\\p{Line_Break=Glue}", unicode: true)); - assertThrows(() => RegExp("\\p{lb=AL}", unicode: true)); - - assertThrows(() => RegExp("\\p{Block=}", unicode: true)); - assertThrows(() => RegExp("\\p{=}", unicode: true)); - assertThrows(() => RegExp("\\p{=L}", unicode: true)); - assertThrows(() => RegExp("\\p{=Hiragana}", unicode: true)); - assertThrows(() => RegExp("\\p{Block=CJK=}", unicode: true)); - - assertThrows(() => RegExp("\\p{Age=V8_0}", unicode: true)); - assertDoesNotThrow( - () => RegExp("\\p{General_Category=Letter}", unicode: true)); - assertDoesNotThrow(() => RegExp("\\p{gc=L}", unicode: true)); - assertThrows( - () => RegExp("\\p{General_Category_Mask=Letter}", unicode: true)); - assertThrows(() => RegExp("\\p{gcm=L}", unicode: true)); -} diff --git a/tests/corelib_2/regexp/unicode-property-exact-match_test.dart b/tests/corelib_2/regexp/unicode-property-exact-match_test.dart deleted file mode 100644 index e4b1639edb8..00000000000 --- a/tests/corelib_2/regexp/unicode-property-exact-match_test.dart +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2019, the Dart project authors. All rights reserved. -// Copyright 2016 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -import 'v8_regexp_utils.dart'; - -void main() { - assertThrows(() => RegExp("\\p{In CJK}", unicode: true)); - assertThrows(() => RegExp("\\p{InCJKUnifiedIdeographs}", unicode: true)); - assertThrows(() => RegExp("\\p{InCJK}", unicode: true)); - assertThrows(() => RegExp("\\p{InCJK_Unified_Ideographs}", unicode: true)); - - assertThrows(() => RegExp("\\p{InCyrillic_Sup}", unicode: true)); - assertThrows(() => RegExp("\\p{InCyrillic_Supplement}", unicode: true)); - assertThrows(() => RegExp("\\p{InCyrillic_Supplementary}", unicode: true)); - assertThrows(() => RegExp("\\p{InCyrillicSupplementary}", unicode: true)); - assertThrows(() => RegExp("\\p{InCyrillic_supplementary}", unicode: true)); - - assertDoesNotThrow(() => RegExp("\\p{C}", unicode: true)); - assertDoesNotThrow(() => RegExp("\\p{Other}", unicode: true)); - assertDoesNotThrow(() => RegExp("\\p{Cc}", unicode: true)); - assertDoesNotThrow(() => RegExp("\\p{Control}", unicode: true)); - assertDoesNotThrow(() => RegExp("\\p{cntrl}", unicode: true)); - assertDoesNotThrow(() => RegExp("\\p{M}", unicode: true)); - assertDoesNotThrow(() => RegExp("\\p{Mark}", unicode: true)); - assertDoesNotThrow(() => RegExp("\\p{Combining_Mark}", unicode: true)); - assertThrows(() => RegExp("\\p{Combining Mark}", unicode: true)); - - assertDoesNotThrow(() => RegExp("\\p{Script=Copt}", unicode: true)); - assertThrows(() => RegExp("\\p{Coptic}", unicode: true)); - assertThrows(() => RegExp("\\p{Qaac}", unicode: true)); - assertThrows(() => RegExp("\\p{Egyp}", unicode: true)); - assertDoesNotThrow( - () => RegExp("\\p{Script=Egyptian_Hieroglyphs}", unicode: true)); - assertThrows(() => RegExp("\\p{EgyptianHieroglyphs}", unicode: true)); - - assertThrows(() => RegExp("\\p{BidiClass=LeftToRight}", unicode: true)); - assertThrows(() => RegExp("\\p{BidiC=LeftToRight}", unicode: true)); - assertThrows(() => RegExp("\\p{bidi_c=Left_To_Right}", unicode: true)); - - assertThrows(() => RegExp("\\p{Block=CJK}", unicode: true)); - assertThrows(() => RegExp("\\p{Block = CJK}", unicode: true)); - assertThrows(() => RegExp("\\p{Block=cjk}", unicode: true)); - assertThrows(() => RegExp("\\p{BLK=CJK}", unicode: true)); -} diff --git a/tests/corelib_2/regexp/unicode-property-general-category_test.dart b/tests/corelib_2/regexp/unicode-property-general-category_test.dart deleted file mode 100644 index 34d3ff082ae..00000000000 --- a/tests/corelib_2/regexp/unicode-property-general-category_test.dart +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) 2019, the Dart project authors. All rights reserved. -// Copyright 2016 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -import 'v8_regexp_utils.dart'; - -void main() { - assertThrows(() => RegExp("\\p", unicode: true)); - assertThrows(() => RegExp("\\p{garbage}", unicode: true)); - assertThrows(() => RegExp("\\p{}", unicode: true)); - assertThrows(() => RegExp("\\p{", unicode: true)); - assertThrows(() => RegExp("\\p}", unicode: true)); - assertThrows(() => RegExp("\\pL", unicode: true)); - assertThrows(() => RegExp("\\P", unicode: true)); - assertThrows(() => RegExp("\\P{garbage}", unicode: true)); - assertThrows(() => RegExp("\\P{}", unicode: true)); - assertThrows(() => RegExp("\\P{", unicode: true)); - assertThrows(() => RegExp("\\P}", unicode: true)); - assertThrows(() => RegExp("\\PL", unicode: true)); - - assertTrue(RegExp(r"\p{Ll}", unicode: true).hasMatch("a")); - assertFalse(RegExp(r"\P{Ll}", unicode: true).hasMatch("a")); - assertTrue(RegExp(r"\P{Ll}", unicode: true).hasMatch("A")); - assertFalse(RegExp(r"\p{Ll}", unicode: true).hasMatch("A")); - assertTrue(RegExp(r"\p{Ll}", unicode: true).hasMatch("\u{1D7BE}")); - assertFalse(RegExp(r"\P{Ll}", unicode: true).hasMatch("\u{1D7BE}")); - assertFalse(RegExp(r"\p{Ll}", unicode: true).hasMatch("\u{1D5E3}")); - assertTrue(RegExp(r"\P{Ll}", unicode: true).hasMatch("\u{1D5E3}")); - - assertTrue( - RegExp(r"\p{Ll}", caseSensitive: false, unicode: true).hasMatch("a")); - assertTrue(RegExp(r"\p{Ll}", caseSensitive: false, unicode: true) - .hasMatch("\u{118D4}")); - assertTrue( - RegExp(r"\p{Ll}", caseSensitive: false, unicode: true).hasMatch("A")); - assertTrue(RegExp(r"\p{Ll}", caseSensitive: false, unicode: true) - .hasMatch("\u{118B4}")); - assertTrue( - RegExp(r"\P{Ll}", caseSensitive: false, unicode: true).hasMatch("a")); - assertTrue(RegExp(r"\P{Ll}", caseSensitive: false, unicode: true) - .hasMatch("\u{118D4}")); - assertTrue( - RegExp(r"\P{Ll}", caseSensitive: false, unicode: true).hasMatch("A")); - assertTrue(RegExp(r"\P{Ll}", caseSensitive: false, unicode: true) - .hasMatch("\u{118B4}")); - - assertTrue(RegExp(r"\p{Lu}", unicode: true).hasMatch("A")); - assertFalse(RegExp(r"\P{Lu}", unicode: true).hasMatch("A")); - assertTrue(RegExp(r"\P{Lu}", unicode: true).hasMatch("a")); - assertFalse(RegExp(r"\p{Lu}", unicode: true).hasMatch("a")); - assertTrue(RegExp(r"\p{Lu}", unicode: true).hasMatch("\u{1D5E3}")); - assertFalse(RegExp(r"\P{Lu}", unicode: true).hasMatch("\u{1D5E3}")); - assertFalse(RegExp(r"\p{Lu}", unicode: true).hasMatch("\u{1D7BE}")); - assertTrue(RegExp(r"\P{Lu}", unicode: true).hasMatch("\u{1D7BE}")); - - assertTrue( - RegExp(r"\p{Lu}", caseSensitive: false, unicode: true).hasMatch("a")); - assertTrue(RegExp(r"\p{Lu}", caseSensitive: false, unicode: true) - .hasMatch("\u{118D4}")); - assertTrue( - RegExp(r"\p{Lu}", caseSensitive: false, unicode: true).hasMatch("A")); - assertTrue(RegExp(r"\p{Lu}", caseSensitive: false, unicode: true) - .hasMatch("\u{118B4}")); - assertTrue( - RegExp(r"\P{Lu}", caseSensitive: false, unicode: true).hasMatch("a")); - assertTrue(RegExp(r"\P{Lu}", caseSensitive: false, unicode: true) - .hasMatch("\u{118D4}")); - assertTrue( - RegExp(r"\P{Lu}", caseSensitive: false, unicode: true).hasMatch("A")); - assertTrue(RegExp(r"\P{Lu}", caseSensitive: false, unicode: true) - .hasMatch("\u{118B4}")); - - assertTrue(RegExp(r"\p{Sm}", unicode: true).hasMatch("+")); - assertFalse(RegExp(r"\P{Sm}", unicode: true).hasMatch("+")); - assertTrue(RegExp(r"\p{Sm}", unicode: true).hasMatch("\u{1D6C1}")); - assertFalse(RegExp(r"\P{Sm}", unicode: true).hasMatch("\u{1D6C1}")); - - assertFalse(RegExp(r"\p{L}", unicode: true).hasMatch("\uA6EE")); - assertTrue(RegExp(r"\P{L}", unicode: true).hasMatch("\uA6EE")); - - assertTrue(RegExp(r"\p{Lowercase_Letter}", unicode: true).hasMatch("a")); - assertTrue(RegExp(r"\p{Math_Symbol}", unicode: true).hasMatch("+")); - - assertTrue(RegExp(r"\p{gc=Ll}", unicode: true).hasMatch("a")); - assertTrue( - RegExp(r"\p{General_Category=Math_Symbol}", unicode: true).hasMatch("+")); - assertTrue(RegExp(r"\p{General_Category=L}", unicode: true).hasMatch("X")); -} diff --git a/tests/corelib_2/regexp/unicode-property-invalid_test.dart b/tests/corelib_2/regexp/unicode-property-invalid_test.dart deleted file mode 100644 index 48e1783cd0b..00000000000 --- a/tests/corelib_2/regexp/unicode-property-invalid_test.dart +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2019, the Dart project authors. All rights reserved. -// Copyright 2016 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -import 'v8_regexp_utils.dart'; - -void main() { - assertThrows(() => RegExp("\p{Block=ASCII}+", unicode: true)); - assertThrows(() => RegExp("\p{Block=ASCII}+", unicode: true)); - assertThrows(() => RegExp("\p{Block=Basic_Latin}+", unicode: true)); - assertThrows(() => RegExp("\p{Block=Basic_Latin}+", unicode: true)); - - assertThrows(() => RegExp("\p{blk=CJK}+", unicode: true)); - assertThrows(() => RegExp("\p{blk=CJK_Unified_Ideographs}+", unicode: true)); - assertThrows(() => RegExp("\p{blk=CJK}+", unicode: true)); - assertThrows(() => RegExp("\p{blk=CJK_Unified_Ideographs}+", unicode: true)); - - assertThrows(() => RegExp("\p{Block=ASCII}+", unicode: true)); - assertThrows(() => RegExp("\p{Block=ASCII}+", unicode: true)); - assertThrows(() => RegExp("\p{Block=Basic_Latin}+", unicode: true)); - assertThrows(() => RegExp("\p{Block=Basic_Latin}+", unicode: true)); - - assertThrows(() => RegExp("\p{NFKD_Quick_Check=Y}+", unicode: true)); - assertThrows(() => RegExp("\p{NFKD_QC=Yes}+", unicode: true)); - - assertThrows(() => RegExp("\p{Numeric_Type=Decimal}+", unicode: true)); - assertThrows(() => RegExp("\p{nt=De}+", unicode: true)); - - assertThrows(() => RegExp("\p{Bidi_Class=Arabic_Letter}+", unicode: true)); - assertThrows(() => RegExp("\p{Bidi_Class=AN}+", unicode: true)); - - assertThrows(() => RegExp("\p{ccc=OV}+", unicode: true)); - - assertThrows(() => RegExp("\p{Sentence_Break=Format}+", unicode: true)); - - assertThrows(() => RegExp("\\p{In}", unicode: true)); - assertThrows(() => RegExp("\\pI", unicode: true)); - assertThrows(() => RegExp("\\p{I}", unicode: true)); - assertThrows(() => RegExp("\\p{CJK}", unicode: true)); - - assertThrows(() => RegExp("\\p{}", unicode: true)); -} diff --git a/tests/corelib_2/regexp/unicode-property-scripts_test.dart b/tests/corelib_2/regexp/unicode-property-scripts_test.dart deleted file mode 100644 index aa027aa430a..00000000000 --- a/tests/corelib_2/regexp/unicode-property-scripts_test.dart +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2019, the Dart project authors. All rights reserved. -// Copyright 2016 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -import 'v8_regexp_utils.dart'; - -void main() { - void t(RegExp re, String s) { - assertTrue(re.hasMatch(s)); - } - - void f(RegExp re, String s) { - assertFalse(re.hasMatch(s)); - } - - t(RegExp(r"\p{Script=Common}+", unicode: true), "."); - f(RegExp(r"\p{Script=Common}+", unicode: true), - "supercalifragilisticexpialidocious"); - - t(RegExp(r"\p{Script=Han}+", unicode: true), "话说天下大势,分久必合,合久必分"); - t(RegExp(r"\p{Script=Hani}+", unicode: true), "吾庄后有一桃园,花开正盛"); - f(RegExp(r"\p{Script=Han}+", unicode: true), "おはようございます"); - f(RegExp(r"\p{Script=Hani}+", unicode: true), - "Something is rotten in the state of Denmark"); - - t(RegExp(r"\p{Script=Latin}+", unicode: true), - "Wie froh bin ich, daß ich weg bin!"); - t(RegExp(r"\p{Script=Latn}+", unicode: true), - "It was a bright day in April, and the clocks were striking thirteen"); - f(RegExp(r"\p{Script=Latin}+", unicode: true), "奔腾千里荡尘埃,渡水登山紫雾开"); - f(RegExp(r"\p{Script=Latn}+", unicode: true), "いただきます"); - - t(RegExp(r"\p{sc=Hiragana}", unicode: true), "いただきます"); - t(RegExp(r"\p{sc=Hira}", unicode: true), "ありがとうございました"); - f(RegExp(r"\p{sc=Hiragana}", unicode: true), - "Als Gregor Samsa eines Morgens aus unruhigen Träumen erwachte"); - f(RegExp(r"\p{sc=Hira}", unicode: true), "Call me Ishmael"); - - t(RegExp(r"\p{sc=Phoenician}", unicode: true), "\u{10900}\u{1091a}"); - t(RegExp(r"\p{sc=Phnx}", unicode: true), "\u{1091f}\u{10916}"); - f(RegExp(r"\p{sc=Phoenician}", unicode: true), "Arthur est un perroquet"); - f(RegExp(r"\p{sc=Phnx}", unicode: true), "设心狠毒非良士,操卓原来一路人"); - - t(RegExp(r"\p{sc=Grek}", unicode: true), - "ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ"); - t(RegExp(r"\p{sc=Greek}", unicode: true), - "μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος"); - f(RegExp(r"\p{sc=Greek}", unicode: true), "高贤未服英雄志,屈节偏生杰士疑"); - f(RegExp(r"\p{sc=Greek}", unicode: true), - "Mr. Jones, of the Manor Farm, had locked the hen-houses for the night"); -} diff --git a/tests/corelib_2/regexp/unicode-property-special_test.dart b/tests/corelib_2/regexp/unicode-property-special_test.dart deleted file mode 100644 index 49b66e6291a..00000000000 --- a/tests/corelib_2/regexp/unicode-property-special_test.dart +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) 2019, the Dart project authors. All rights reserved. -// Copyright 2016 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -import 'v8_regexp_utils.dart'; - -void main() { - void t(RegExp re, String s) { - assertTrue(re.hasMatch(s)); - } - - void f(RegExp re, String s) { - assertFalse(re.hasMatch(s)); - } - - t(RegExp(r"\p{ASCII}+", unicode: true), "abc123"); - f(RegExp(r"\p{ASCII}+", unicode: true), "ⓐⓑⓒ①②③"); - f(RegExp(r"\p{ASCII}+", unicode: true), "🄰🄱🄲①②③"); - f(RegExp(r"\P{ASCII}+", unicode: true), "abcd123"); - t(RegExp(r"\P{ASCII}+", unicode: true), "ⓐⓑⓒ①②③"); - t(RegExp(r"\P{ASCII}+", unicode: true), "🄰🄱🄲①②③"); - - f(RegExp(r"[^\p{ASCII}]+", unicode: true), "abc123"); - f(RegExp(r"[\p{ASCII}]+", unicode: true), "ⓐⓑⓒ①②③"); - f(RegExp(r"[\p{ASCII}]+", unicode: true), "🄰🄱🄲①②③"); - t(RegExp(r"[^\P{ASCII}]+", unicode: true), "abcd123"); - t(RegExp(r"[\P{ASCII}]+", unicode: true), "ⓐⓑⓒ①②③"); - f(RegExp(r"[^\P{ASCII}]+", unicode: true), "🄰🄱🄲①②③"); - - t(RegExp(r"\p{Any}+", unicode: true), "🄰🄱🄲①②③"); - - shouldBe( - RegExp(r"\p{Any}", unicode: true).firstMatch("\ud800\ud801"), ["\ud800"]); - shouldBe( - RegExp(r"\p{Any}", unicode: true).firstMatch("\udc00\udc01"), ["\udc00"]); - shouldBe(RegExp(r"\p{Any}", unicode: true).firstMatch("\ud800\udc01"), - ["\ud800\udc01"]); - shouldBe(RegExp(r"\p{Any}", unicode: true).firstMatch("\udc01"), ["\udc01"]); - - f(RegExp(r"\P{Any}+", unicode: true), "123"); - f(RegExp(r"[\P{Any}]+", unicode: true), "123"); - t(RegExp(r"[\P{Any}\d]+", unicode: true), "123"); - t(RegExp(r"[^\P{Any}]+", unicode: true), "123"); - - t(RegExp(r"\p{Assigned}+", unicode: true), "123"); - t(RegExp(r"\p{Assigned}+", unicode: true), "🄰🄱🄲"); - f(RegExp(r"\p{Assigned}+", unicode: true), "\ufdd0"); - f(RegExp(r"\p{Assigned}+", unicode: true), "\u{fffff}"); - - f(RegExp(r"\P{Assigned}+", unicode: true), "123"); - f(RegExp(r"\P{Assigned}+", unicode: true), "🄰🄱🄲"); - t(RegExp(r"\P{Assigned}+", unicode: true), "\ufdd0"); - t(RegExp(r"\P{Assigned}+", unicode: true), "\u{fffff}"); - f(RegExp(r"\P{Assigned}", unicode: true), ""); - - t(RegExp(r"[^\P{Assigned}]+", unicode: true), "123"); - f(RegExp(r"[\P{Assigned}]+", unicode: true), "🄰🄱🄲"); - f(RegExp(r"[^\P{Assigned}]+", unicode: true), "\ufdd0"); - t(RegExp(r"[\P{Assigned}]+", unicode: true), "\u{fffff}"); - f(RegExp(r"[\P{Assigned}]", unicode: true), ""); - - f(RegExp(r"[^\u1234\p{ASCII}]+", unicode: true), "\u1234"); - t(RegExp(r"[x\P{ASCII}]+", unicode: true), "x"); - t(RegExp(r"[\u1234\p{ASCII}]+", unicode: true), "\u1234"); - -// Contributory binary properties are not supported. - assertThrows(() => RegExp("\\p{Other_Alphabetic}", unicode: true)); - assertThrows(() => RegExp("\\P{OAlpha}", unicode: true)); - assertThrows( - () => RegExp("\\p{Other_Default_Ignorable_Code_Point}", unicode: true)); - assertThrows(() => RegExp("\\P{ODI}", unicode: true)); - assertThrows(() => RegExp("\\p{Other_Grapheme_Extend}", unicode: true)); - assertThrows(() => RegExp("\\P{OGr_Ext}", unicode: true)); - assertThrows(() => RegExp("\\p{Other_ID_Continue}", unicode: true)); - assertThrows(() => RegExp("\\P{OIDC}", unicode: true)); - assertThrows(() => RegExp("\\p{Other_ID_Start}", unicode: true)); - assertThrows(() => RegExp("\\P{OIDS}", unicode: true)); - assertThrows(() => RegExp("\\p{Other_Lowercase}", unicode: true)); - assertThrows(() => RegExp("\\P{OLower}", unicode: true)); - assertThrows(() => RegExp("\\p{Other_Math}", unicode: true)); - assertThrows(() => RegExp("\\P{OMath}", unicode: true)); - assertThrows(() => RegExp("\\p{Other_Uppercase}", unicode: true)); - assertThrows(() => RegExp("\\P{OUpper}", unicode: true)); -} diff --git a/tests/corelib_2/regexp/unicode-regexp-backrefs_test.dart b/tests/corelib_2/regexp/unicode-regexp-backrefs_test.dart deleted file mode 100644 index b05c8bc8719..00000000000 --- a/tests/corelib_2/regexp/unicode-regexp-backrefs_test.dart +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2019, the Dart project authors. All rights reserved. -// Copyright 2016 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -import 'v8_regexp_utils.dart'; - -String replace(String string) { - return string - .replaceAll("L", "\ud800") - .replaceAll("l", "\ud801") - .replaceAll("T", "\udc00") - .replaceAll(".", "[^]"); -} - -void test(List expectation, String regexp_source, String subject) { - if (expectation != null) expectation = expectation.map(replace).toList(); - subject = replace(subject); - regexp_source = replace(regexp_source); - shouldBe(new RegExp(regexp_source, unicode: true).firstMatch(subject), - expectation); -} - -void main() { - // Back reference does not end in the middle of a surrogate pair. - test(null, "(L)\\1", "LLT"); - test(["LLTLl", "L", "l"], "(L).*\\1(.)", "LLTLl"); - test(null, "(aL).*\\1", "aLaLT"); - test(["aLaLTaLl", "aL", "l"], "(aL).*\\1(.)", "aLaLTaLl"); - - var s = "TabcLxLTabcLxTabcLTyTabcLz"; - test([s, "TabcL", "z"], "([^x]+).*\\1(.)", s); - - // Back reference does not start in the middle of a surrogate pair. - test(["TLTabTc", "T", "c"], "(T).*\\1(.)", "TLTabTc"); - - // Lookbehinds. - test(null, "(?<=\\1(T)x)", "LTTx"); - test(["", "b", "T"], "(?<=(.)\\2.*(T)x)", "bTaLTTx"); - test(null, "(?<=\\1.*(L)x)", "LTLx"); - test(["", "b", "L"], "(?<=(.)\\2.*(L)x)", "bLaLTLx"); - - test(null, "([^x]+)x*\\1", "LxLT"); - test(null, "([^x]+)x*\\1", "TxLT"); - test(null, "([^x]+)x*\\1", "LTxL"); - test(null, "([^x]+)x*\\1", "LTxT"); - test(null, "([^x]+)x*\\1", "xLxLT"); - test(null, "([^x]+)x*\\1", "xTxLT"); - test(null, "([^x]+)x*\\1", "xLTxL"); - test(null, "([^x]+)x*\\1", "xLTxT"); - test(null, "([^x]+)x*\\1", "xxxLxxLTxx"); - test(null, "([^x]+)x*\\1", "xxxTxxLTxx"); - test(null, "([^x]+)x*\\1", "xxxLTxxLxx"); - test(null, "([^x]+)x*\\1", "xxxLTxxTxx"); - test(["LTTxxLTT", "LTT"], "([^x]+)x*\\1", "xxxLTTxxLTTxx"); -} diff --git a/tests/corelib_2/regexp/unicode-regexp-ignore-case_test.dart b/tests/corelib_2/regexp/unicode-regexp-ignore-case_test.dart deleted file mode 100644 index 5c73352c3d9..00000000000 --- a/tests/corelib_2/regexp/unicode-regexp-ignore-case_test.dart +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) 2019, the Dart project authors. All rights reserved. -// Copyright 2016 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -import 'v8_regexp_utils.dart'; - -void main() { - // Non-unicode use toUpperCase mappings. - assertFalse(RegExp(r"[\u00e5]", caseSensitive: false).hasMatch("\u212b")); - assertFalse( - RegExp(r"[\u212b]", caseSensitive: false).hasMatch("\u00e5\u1234")); - assertFalse(RegExp(r"[\u212b]", caseSensitive: false).hasMatch("\u00e5")); - - assertTrue("\u212b".toLowerCase() == "\u00e5"); - assertTrue("\u00c5".toLowerCase() == "\u00e5"); - assertTrue("\u00e5".toUpperCase() == "\u00c5"); - - // Unicode uses case folding mappings. - assertTrue(RegExp(r"\u00e5", caseSensitive: false, unicode: true) - .hasMatch("\u212b")); - assertTrue(RegExp(r"\u00e5", caseSensitive: false, unicode: true) - .hasMatch("\u00c5")); - assertTrue(RegExp(r"\u00e5", caseSensitive: false, unicode: true) - .hasMatch("\u00e5")); - assertTrue(RegExp(r"\u00e5", caseSensitive: false, unicode: true) - .hasMatch("\u212b")); - assertTrue(RegExp(r"\u00c5", caseSensitive: false, unicode: true) - .hasMatch("\u00e5")); - assertTrue(RegExp(r"\u00c5", caseSensitive: false, unicode: true) - .hasMatch("\u212b")); - assertTrue(RegExp(r"\u00c5", caseSensitive: false, unicode: true) - .hasMatch("\u00c5")); - assertTrue(RegExp(r"\u212b", caseSensitive: false, unicode: true) - .hasMatch("\u00c5")); - assertTrue(RegExp(r"\u212b", caseSensitive: false, unicode: true) - .hasMatch("\u00e5")); - assertTrue(RegExp(r"\u212b", caseSensitive: false, unicode: true) - .hasMatch("\u212b")); - - // Non-BMP. - assertFalse(RegExp(r"\u{10400}", caseSensitive: false).hasMatch("\u{10428}")); - assertTrue(RegExp(r"\u{10400}", caseSensitive: false, unicode: true) - .hasMatch("\u{10428}")); - assertTrue(RegExp(r"\ud801\udc00", caseSensitive: false, unicode: true) - .hasMatch("\u{10428}")); - assertTrue(RegExp(r"[\u{10428}]", caseSensitive: false, unicode: true) - .hasMatch("\u{10400}")); - assertTrue(RegExp(r"[\ud801\udc28]", caseSensitive: false, unicode: true) - .hasMatch("\u{10400}")); - shouldBe( - RegExp(r"[\uff40-\u{10428}]+", caseSensitive: false, unicode: true) - .firstMatch("\uff21\u{10400}abc"), - ["\uff21\u{10400}"]); - shouldBe( - RegExp(r"[^\uff40-\u{10428}]+", caseSensitive: false, unicode: true) - .firstMatch("\uff21\u{10400}abc\uff23"), - ["abc"]); - shouldBe( - RegExp(r"[\u24d5-\uff33]+", caseSensitive: false, unicode: true) - .firstMatch("\uff54\uff53\u24bb\u24ba"), - ["\uff53\u24bb"]); - - // Full mappings are ignored. - assertFalse( - RegExp(r"\u00df", caseSensitive: false, unicode: true).hasMatch("SS")); - assertFalse(RegExp(r"\u1f8d", caseSensitive: false, unicode: true) - .hasMatch("\u1f05\u03b9")); - - // Simple mappings work. - assertTrue(RegExp(r"\u1f8d", caseSensitive: false, unicode: true) - .hasMatch("\u1f85")); - - // Common mappings work. - assertTrue(RegExp(r"\u1f6b", caseSensitive: false, unicode: true) - .hasMatch("\u1f63")); - - // Back references. - shouldBe( - RegExp(r"(.)\1\1", caseSensitive: false, unicode: true) - .firstMatch("\u00e5\u212b\u00c5"), - ["\u00e5\u212b\u00c5", "\u00e5"]); - shouldBe( - RegExp(r"(.)\1", caseSensitive: false, unicode: true) - .firstMatch("\u{118aa}\u{118ca}"), - ["\u{118aa}\u{118ca}", "\u{118aa}"]); - - // Misc. - assertTrue(RegExp(r"\u00e5\u00e5\u00e5", caseSensitive: false, unicode: true) - .hasMatch("\u212b\u00e5\u00c5")); - assertTrue(RegExp(r"AB\u{10400}", caseSensitive: false, unicode: true) - .hasMatch("ab\u{10428}")); - - // Non-Latin1 maps to Latin1. - shouldBe( - RegExp(r"^\u017F", caseSensitive: false, unicode: true).firstMatch("s"), - ["s"]); - shouldBe( - RegExp(r"^\u017F", caseSensitive: false, unicode: true) - .firstMatch("s\u1234"), - ["s"]); - shouldBe( - RegExp(r"^a[\u017F]", caseSensitive: false, unicode: true) - .firstMatch("as"), - ["as"]); - shouldBe( - RegExp(r"^a[\u017F]", caseSensitive: false, unicode: true) - .firstMatch("as\u1234"), - ["as"]); -} diff --git a/tests/corelib_2/regexp/unicode-regexp-match-index_test.dart b/tests/corelib_2/regexp/unicode-regexp-match-index_test.dart deleted file mode 100644 index 21e5b8396e7..00000000000 --- a/tests/corelib_2/regexp/unicode-regexp-match-index_test.dart +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) 2019, the Dart project authors. All rights reserved. -// Copyright 2016 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -import 'v8_regexp_utils.dart'; - -void main() { - // Testing handling of paired and non-paired surrogates in unicode mode - var r = new RegExp(r".", unicode: true); - - var m = r.matchAsPrefix("\ud800\udc00\ud801\udc01"); - shouldBe(m, ["\ud800\udc00"]); - assertEquals(m.end, 2); - - m = r.matchAsPrefix("\ud800\udc00\ud801\udc01", 1); - shouldBe(m, ["\ud800\udc00"]); - assertEquals(m.end, 2); - - m = r.matchAsPrefix("\ud800\udc00\ud801\udc01", 2); - shouldBe(m, ["\ud801\udc01"]); - assertEquals(m.end, 4); - - m = r.matchAsPrefix("\ud800\udc00\ud801\udc01", 3); - shouldBe(m, ["\ud801\udc01"]); - assertEquals(m.end, 4); - - assertNull(r.matchAsPrefix("\ud800\udc00\ud801\udc01", 4)); - - m = r.matchAsPrefix("\ud800\udc00\ud801\ud802", 3); - shouldBe(m, ["\ud802"]); - - assertNull(r.matchAsPrefix("\ud800\udc00\ud801\ud802", 4)); - - // Testing handling of paired and non-paired surrogates in non-unicode mode - r = new RegExp(r"."); - - m = r.matchAsPrefix("\ud800\udc00\ud801\udc01"); - shouldBe(m, ["\ud800"]); - assertEquals(m.end, 1); - - m = r.matchAsPrefix("\ud800\udc00\ud801\udc01", 1); - shouldBe(m, ["\udc00"]); - assertEquals(m.end, 2); - - m = r.matchAsPrefix("\ud800\udc00\ud801\udc01", 2); - shouldBe(m, ["\ud801"]); - assertEquals(m.end, 3); - - m = r.matchAsPrefix("\ud800\udc00\ud801\udc01", 3); - shouldBe(m, ["\udc01"]); - assertEquals(m.end, 4); - - assertNull(r.matchAsPrefix("\ud800\udc00\ud801\udc01", 4)); - - // Testing same with start anchor, unicode mode. - r = new RegExp("^.", unicode: true); - - m = r.matchAsPrefix("\ud800\udc00\ud801\udc01"); - shouldBe(m, ["\ud800\udc00"]); - assertEquals(2, m.end); - - m = r.matchAsPrefix("\ud800\udc00\ud801\udc01", 1); - shouldBe(m, ["\ud800\udc00"]); - assertEquals(2, m.end); - - assertNull(r.matchAsPrefix("\ud800\udc00\ud801\udc01", 2)); - assertNull(r.matchAsPrefix("\ud800\udc00\ud801\udc01", 3)); - assertNull(r.matchAsPrefix("\ud800\udc00\ud801\udc01", 4)); - - // Testing same with start anchor, non-unicode mode. - r = new RegExp("^."); - m = r.matchAsPrefix("\ud800\udc00\ud801\udc01"); - shouldBe(m, ["\ud800"]); - assertEquals(1, m.end); - - assertNull(r.matchAsPrefix("\ud800\udc00\ud801\udc01", 1)); - assertNull(r.matchAsPrefix("\ud800\udc00\ud801\udc01", 2)); - assertNull(r.matchAsPrefix("\ud800\udc00\ud801\udc01", 3)); - assertNull(r.matchAsPrefix("\ud800\udc00\ud801\udc01", 4)); - - // Now with both anchored and not as alternatives (with the anchored - // version as a captured group), unicode mode. - r = new RegExp(r"(?:(^.)|.)", unicode: true); - - m = r.matchAsPrefix("\ud800\udc00\ud801\udc01"); - shouldBe(m, ["\ud800\udc00", "\ud800\udc00"]); - assertEquals(m.end, 2); - - m = r.matchAsPrefix("\ud800\udc00\ud801\udc01", 1); - shouldBe(m, ["\ud800\udc00", "\ud800\udc00"]); - assertEquals(m.end, 2); - - m = r.matchAsPrefix("\ud800\udc00\ud801\udc01", 2); - shouldBe(m, ["\ud801\udc01", null]); - assertEquals(m.end, 4); - - m = r.matchAsPrefix("\ud800\udc00\ud801\udc01", 3); - shouldBe(m, ["\ud801\udc01", null]); - assertEquals(m.end, 4); - - assertNull(r.matchAsPrefix("\ud800\udc00\ud801\udc01", 4)); - - m = r.matchAsPrefix("\ud800\udc00\ud801\ud802", 3); - shouldBe(m, ["\ud802", null]); - - assertNull(r.matchAsPrefix("\ud800\udc00\ud801\ud802", 4)); - - // Now with both anchored and not as alternatives (with the anchored - // version as a captured group), non-unicode mode. - r = new RegExp(r"(?:(^.)|.)"); - - m = r.matchAsPrefix("\ud800\udc00\ud801\udc01"); - shouldBe(m, ["\ud800", "\ud800"]); - assertEquals(m.end, 1); - - m = r.matchAsPrefix("\ud800\udc00\ud801\udc01", 1); - shouldBe(m, ["\udc00", null]); - assertEquals(m.end, 2); - - m = r.matchAsPrefix("\ud800\udc00\ud801\udc01", 2); - shouldBe(m, ["\ud801", null]); - assertEquals(m.end, 3); - - m = r.matchAsPrefix("\ud800\udc00\ud801\udc01", 3); - shouldBe(m, ["\udc01", null]); - assertEquals(m.end, 4); - - assertNull(r.matchAsPrefix("\ud800\udc00\ud801\udc01", 4)); -} diff --git a/tests/corelib_2/regexp/unicode-regexp-restricted-syntax_test.dart b/tests/corelib_2/regexp/unicode-regexp-restricted-syntax_test.dart deleted file mode 100644 index 5530da2d08b..00000000000 --- a/tests/corelib_2/regexp/unicode-regexp-restricted-syntax_test.dart +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2019, the Dart project authors. All rights reserved. -// Copyright 2016 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -import 'v8_regexp_utils.dart'; - -void main() { - // test262/data/test/language/literals/regexp/u-dec-esc - assertThrows(() => RegExp(r"\1", unicode: true)); - // test262/language/literals/regexp/u-invalid-char-range-a - assertThrows(() => RegExp(r"[\w-a]", unicode: true)); - // test262/language/literals/regexp/u-invalid-char-range-b - assertThrows(() => RegExp(r"[a-\w]", unicode: true)); - // test262/language/literals/regexp/u-invalid-char-esc - assertThrows(() => RegExp(r"\c", unicode: true)); - assertThrows(() => RegExp(r"\c0", unicode: true)); - // test262/built-ins/RegExp/unicode_restricted_quantifiable_assertion - assertThrows(() => RegExp(r"(?=.)*", unicode: true)); - assertThrows(() => RegExp(r"(?=.){1,2}", unicode: true)); - // test262/built-ins/RegExp/unicode_restricted_octal_escape - assertThrows(() => RegExp(r"[\1]", unicode: true)); - assertThrows(() => RegExp(r"\00", unicode: true)); - assertThrows(() => RegExp(r"\09", unicode: true)); - // test262/built-ins/RegExp/unicode_restricted_identity_escape_alpha - assertThrows(() => RegExp(r"[\c]", unicode: true)); - // test262/built-ins/RegExp/unicode_restricted_identity_escape_c - assertThrows(() => RegExp(r"[\c0]", unicode: true)); - // test262/built-ins/RegExp/unicode_restricted_incomple_quantifier - assertThrows(() => RegExp(r"a{", unicode: true)); - assertThrows(() => RegExp(r"a{1,", unicode: true)); - assertThrows(() => RegExp(r"{", unicode: true)); - assertThrows(() => RegExp(r"}", unicode: true)); - // test262/data/test/built-ins/RegExp/unicode_restricted_brackets - assertThrows(() => RegExp(r"]", unicode: true)); - // test262/built-ins/RegExp/unicode_identity_escape - assertDoesNotThrow(() => RegExp(r"\/", unicode: true)); - - // escaped \0 (as NUL) is allowed inside a character class. - shouldBe(RegExp(r"[\0]", unicode: true).firstMatch("\u0000"), ["\u0000"]); - // unless it is followed by another digit. - assertThrows(() => RegExp(r"[\00]", unicode: true)); - assertThrows(() => RegExp(r"[\01]", unicode: true)); - assertThrows(() => RegExp(r"[\09]", unicode: true)); - shouldBe(RegExp(r"[1\0a]+", unicode: true).firstMatch("b\u{0}1\u{0}a\u{0}2"), - ["\u{0}1\u{0}a\u{0}"]); - // escaped \- is allowed inside a character class. - shouldBe(RegExp(r"[a\-z]", unicode: true).firstMatch("12-34"), ["-"]); -} diff --git a/tests/corelib_2/regexp/unicode-regexp-unanchored-advance_test.dart b/tests/corelib_2/regexp/unicode-regexp-unanchored-advance_test.dart deleted file mode 100644 index 91683729b66..00000000000 --- a/tests/corelib_2/regexp/unicode-regexp-unanchored-advance_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2019, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -import 'v8_regexp_utils.dart'; - -void main() { - final s = "a" * 10000000 + "\u1234"; - shouldBe( - RegExp(r"(\u1234)", unicode: true).firstMatch(s), ["\u1234", "\u1234"]); -} diff --git a/tests/corelib_2/regexp/unicode-regexp-zero-length_test.dart b/tests/corelib_2/regexp/unicode-regexp-zero-length_test.dart deleted file mode 100644 index 080c6d3c185..00000000000 --- a/tests/corelib_2/regexp/unicode-regexp-zero-length_test.dart +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 2019, the Dart project authors. All rights reserved. -// Copyright 2016 the V8 project authors. All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -import 'v8_regexp_utils.dart'; - -void main() { - const L = "\ud800"; - const T = "\udc00"; - const x = "x"; - - var r = RegExp(r"()"); // Not unicode. - // Zero-length matches do not advance lastIndex. - var m = r.matchAsPrefix(L + T + L + T); - shouldBe(m, ["", ""]); - assertEquals(0, m.end); - - m = r.matchAsPrefix(L + T + L + T, 1); - shouldBe(m, ["", ""]); - assertEquals(1, m.end); - - var u = RegExp(r"()", unicode: true); - - // Zero-length matches do not advance lastIndex (but do respect paired - // surrogates). - m = u.matchAsPrefix(L + T + L + T); - shouldBe(m, ["", ""]); - assertEquals(0, m.end); - - m = u.matchAsPrefix(L + T + L + T, 1); - shouldBe(m, ["", ""]); - assertEquals(0, m.end); - - // However, with repeating matches, we do advance from match to match. - var ms = r.allMatches(L + T + L + T); - assertEquals(5, ms.length); - for (var i = 0; i < ms.length; i++) { - shouldBe(ms.elementAt(i), ["", ""]); - } - - // With unicode flag, we advance code point by code point. - ms = u.allMatches(L + T + L + T); - assertEquals(3, ms.length); - for (var i = 0; i < ms.length; i++) { - shouldBe(ms.elementAt(i), ["", ""]); - } - - // Test with a lot of copies. - const c = 100; - ms = u.allMatches((L + T) * c); - assertEquals(c + 1, ms.length); - for (var i = 0; i < ms.length; i++) { - shouldBe(ms.elementAt(i), ["", ""]); - } - - // Same with replaceAll(). - assertEquals( - x + L + x + T + x + L + x + T + x, (L + T + L + T).replaceAll(r, "x")); - - assertEquals(x + L + T + x + L + T + x, (L + T + L + T).replaceAll(u, "x")); - - assertEquals((x + L + T) * c + x, ((L + T) * c).replaceAll(u, "x")); - - // Also test String#split. - Expect.deepEquals( - ["\u{12345}"], "\u{12345}".split(RegExp(r"(?:)", unicode: true))); -} diff --git a/tests/corelib_2/regexp/unicodeCaseInsensitive_test.dart b/tests/corelib_2/regexp/unicodeCaseInsensitive_test.dart deleted file mode 100644 index 4e19c113482..00000000000 --- a/tests/corelib_2/regexp/unicodeCaseInsensitive_test.dart +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - shouldBeTrue( - new RegExp(r"ΣΤΙΓΜΑΣ", caseSensitive: false).hasMatch("στιγμας")); - shouldBeTrue(new RegExp(r"ΔΣΔ", caseSensitive: false).hasMatch("δςδ")); - shouldBeTrue(new RegExp(r"ς", caseSensitive: false).hasMatch("σ")); - shouldBeTrue(new RegExp(r"σ", caseSensitive: false).hasMatch("ς")); - - // Simple case, has no canonical equivalents - shouldBeTrue(new RegExp(r"\u1f16", caseSensitive: false).hasMatch("\u1f16")); - - // Test the sets of USC2 code points that have more than one canonically equivalent value. - dynamic ucs2CodePoint(x) => new String.fromCharCode(x); - dynamic testSet(s) { - for (var i in s) { - for (var j in s) { - shouldBeTrue(new RegExp(ucs2CodePoint(i), caseSensitive: false) - .hasMatch(ucs2CodePoint(j))); - shouldBeTrue(new RegExp( - "[${ucs2CodePoint(i - 1)}-${ucs2CodePoint(i + 1)}]", - caseSensitive: false) - .hasMatch(ucs2CodePoint(j))); - } - } - } - - testSet([0x01c4, 0x01c5, 0x01c6]); - testSet([0x01c7, 0x01c8, 0x01c9]); - testSet([0x01ca, 0x01cb, 0x01cc]); - testSet([0x01f1, 0x01f2, 0x01f3]); - testSet([0x0392, 0x03b2, 0x03d0]); - testSet([0x0395, 0x03b5, 0x03f5]); - testSet([0x0398, 0x03b8, 0x03d1]); - testSet([0x0345, 0x0399, 0x03b9, 0x1fbe]); - testSet([0x039a, 0x03ba, 0x03f0]); - testSet([0x00b5, 0x039c, 0x03bc]); - testSet([0x03a0, 0x03c0, 0x03d6]); - testSet([0x03a1, 0x03c1, 0x03f1]); - testSet([0x03a3, 0x03c2, 0x03c3]); - testSet([0x03a6, 0x03c6, 0x03d5]); - testSet([0x1e60, 0x1e61, 0x1e9b]); - - // Test a couple of lo/hi pairs - shouldBeTrue(new RegExp(r"\u03cf", caseSensitive: false).hasMatch("\u03cf")); - shouldBeTrue(new RegExp(r"\u03d7", caseSensitive: false).hasMatch("\u03cf")); - shouldBeTrue(new RegExp(r"\u03cf", caseSensitive: false).hasMatch("\u03d7")); - shouldBeTrue(new RegExp(r"\u03d7", caseSensitive: false).hasMatch("\u03d7")); - shouldBeTrue(new RegExp(r"\u1f11", caseSensitive: false).hasMatch("\u1f11")); - shouldBeTrue(new RegExp(r"\u1f19", caseSensitive: false).hasMatch("\u1f11")); - shouldBeTrue(new RegExp(r"\u1f11", caseSensitive: false).hasMatch("\u1f19")); - shouldBeTrue(new RegExp(r"\u1f19", caseSensitive: false).hasMatch("\u1f19")); - - // Test an aligned alternating capitalization pair. - shouldBeFalse(new RegExp(r"\u0489", caseSensitive: false).hasMatch("\u048a")); - shouldBeTrue(new RegExp(r"\u048a", caseSensitive: false).hasMatch("\u048a")); - shouldBeTrue(new RegExp(r"\u048b", caseSensitive: false).hasMatch("\u048a")); - shouldBeFalse(new RegExp(r"\u048c", caseSensitive: false).hasMatch("\u048a")); - shouldBeFalse(new RegExp(r"\u0489", caseSensitive: false).hasMatch("\u048b")); - shouldBeTrue(new RegExp(r"\u048a", caseSensitive: false).hasMatch("\u048b")); - shouldBeTrue(new RegExp(r"\u048b", caseSensitive: false).hasMatch("\u048b")); - shouldBeFalse(new RegExp(r"\u048c", caseSensitive: false).hasMatch("\u048b")); - shouldBeTrue( - new RegExp(r"[\u0489-\u048a]", caseSensitive: false).hasMatch("\u048b")); - shouldBeTrue( - new RegExp(r"[\u048b-\u048c]", caseSensitive: false).hasMatch("\u048a")); - - // Test an unaligned alternating capitalization pair. - shouldBeFalse(new RegExp(r"\u04c4", caseSensitive: false).hasMatch("\u04c5")); - shouldBeTrue(new RegExp(r"\u04c5", caseSensitive: false).hasMatch("\u04c5")); - shouldBeTrue(new RegExp(r"\u04c6", caseSensitive: false).hasMatch("\u04c5")); - shouldBeFalse(new RegExp(r"\u04c7", caseSensitive: false).hasMatch("\u04c5")); - shouldBeFalse(new RegExp(r"\u04c4", caseSensitive: false).hasMatch("\u04c6")); - shouldBeTrue(new RegExp(r"\u04c5", caseSensitive: false).hasMatch("\u04c6")); - shouldBeTrue(new RegExp(r"\u04c6", caseSensitive: false).hasMatch("\u04c6")); - shouldBeFalse(new RegExp(r"\u04c7", caseSensitive: false).hasMatch("\u04c6")); - shouldBeTrue( - new RegExp(r"[\u04c4-\u04c5]", caseSensitive: false).hasMatch("\u04c6")); - shouldBeTrue( - new RegExp(r"[\u04c6-\u04c7]", caseSensitive: false).hasMatch("\u04c5")); - - var successfullyParsed = true; -} diff --git a/tests/corelib_2/regexp/v8_regexp_utils.dart b/tests/corelib_2/regexp/v8_regexp_utils.dart deleted file mode 100644 index 0a5e1869715..00000000000 --- a/tests/corelib_2/regexp/v8_regexp_utils.dart +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2014, 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 - -// Utility functions to easily port V8 tests. - -import "package:expect/expect.dart"; - -void assertEquals(actual, expected, [String message = null]) { - Expect.equals(actual, expected, message); -} - -void assertTrue(actual, [String message = null]) { - Expect.isTrue(actual, message); -} - -void assertFalse(actual, [String message = null]) { - Expect.isFalse(actual, message); -} - -void assertThrows(fn, [num testid = null]) { - Expect.throws(fn, null, "Test $testid"); -} - -void assertDoesNotThrow(fn, [num testid = null]) { - fn(); -} - -void assertNull(actual, [num testid = null]) { - Expect.isNull(actual, "Test $testid"); -} - -void assertToStringEquals(str, match, num testid) { - var actual = []; - for (int i = 0; i <= match.groupCount; i++) { - var g = match.group(i); - actual.add((g == null) ? "" : g); - } - Expect.equals(str, actual.join(","), "Test $testid"); -} - -void shouldBeTrue(actual) { - Expect.isTrue(actual); -} - -void shouldBeFalse(actual) { - Expect.isFalse(actual); -} - -void shouldBeNull(actual) { - Expect.isNull(actual); -} - -void shouldBe(actual, expected, [String message = null]) { - if (expected == null) { - Expect.isNull(actual, message); - } else { - Expect.equals(expected.length, actual.groupCount + 1); - for (int i = 0; i <= actual.groupCount; i++) { - Expect.equals(expected[i], actual.group(i), message); - } - } -} - -Match firstMatch(String str, RegExp pattern) => pattern.firstMatch(str); -List allStringMatches(String str, RegExp pattern) => - pattern.allMatches(str).map((Match m) => m.group(0)).toList(); - -void description(str) {} diff --git a/tests/corelib_2/regexp/zero-length-alternatives_test.dart b/tests/corelib_2/regexp/zero-length-alternatives_test.dart deleted file mode 100644 index fb80f2c64fb..00000000000 --- a/tests/corelib_2/regexp/zero-length-alternatives_test.dart +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. All rights reserved. -// Copyright 2013 the V8 project authors. All rights reserved. -// Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY -// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY -// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// @dart = 2.9 - -import 'v8_regexp_utils.dart'; -import 'package:expect/expect.dart'; - -void main() { - description( - 'Test regular expression processing with alternatives that match consuming no characters'); - - var emptyStr = ""; - var s1 = "xxxx"; - var s2 = "aaaa"; - var s3 = "aax"; - var s4 = "abab"; - var s5 = "ab"; - var s6 = "xabx"; - var s7 = "g0"; - - // Non-capturing empty first alternative greedy '*' - var re1 = new RegExp(r"(?:|a|z)*"); - shouldBe(firstMatch(emptyStr, re1), [""]); - shouldBe(firstMatch(s1, re1), [""]); - shouldBe(firstMatch(s2, re1), ["aaaa"]); - shouldBe(firstMatch(s3, re1), ["aa"]); - - // Non-capturing empty middle alternative greedy '*' - var re2 = new RegExp(r"(?:a||z)*"); - shouldBe(firstMatch(emptyStr, re2), [""]); - shouldBe(firstMatch(s1, re2), [""]); - shouldBe(firstMatch(s2, re2), ["aaaa"]); - shouldBe(firstMatch(s3, re2), ["aa"]); - - // Non-capturing empty last alternative greedy '*' - var re3 = new RegExp(r"(?:a|z|)*"); - shouldBe(firstMatch(emptyStr, re3), [""]); - shouldBe(firstMatch(s1, re3), [""]); - shouldBe(firstMatch(s2, re3), ["aaaa"]); - shouldBe(firstMatch(s3, re3), ["aa"]); - - // Capturing empty first alternative greedy '*' - var re4 = new RegExp(r"(|a|z)*"); - shouldBe(firstMatch(emptyStr, re4), ["", null]); - shouldBe(firstMatch(s1, re4), ["", null]); - shouldBe(firstMatch(s2, re4), ["aaaa", "a"]); - shouldBe(firstMatch(s3, re4), ["aa", "a"]); - - // Capturing empty middle alternative greedy '*' - var re5 = new RegExp(r"(a||z)*"); - shouldBe(firstMatch(emptyStr, re5), ["", null]); - shouldBe(firstMatch(s1, re5), ["", null]); - shouldBe(firstMatch(s2, re5), ["aaaa", "a"]); - shouldBe(firstMatch(s3, re5), ["aa", "a"]); - - // Capturing empty last alternative greedy '*' - var re6 = new RegExp(r"(a|z|)*"); - shouldBe(firstMatch(emptyStr, re6), ["", null]); - shouldBe(firstMatch(s1, re6), ["", null]); - shouldBe(firstMatch(s2, re6), ["aaaa", "a"]); - shouldBe(firstMatch(s3, re6), ["aa", "a"]); - - // Non-capturing empty first alternative fixed-count - var re7 = new RegExp(r"(?:|a|z){2,5}"); - shouldBe(firstMatch(emptyStr, re7), [""]); - shouldBe(firstMatch(s1, re7), [""]); - shouldBe(firstMatch(s2, re7), ["aaa"]); - shouldBe(firstMatch(s3, re7), ["aa"]); - - // Non-capturing empty middle alternative fixed-count - var re8 = new RegExp(r"(?:a||z){2,5}"); - shouldBe(firstMatch(emptyStr, re8), [""]); - shouldBe(firstMatch(s1, re8), [""]); - shouldBe(firstMatch(s2, re8), ["aaaa"]); - shouldBe(firstMatch(s3, re8), ["aa"]); - - // Non-capturing empty last alternative fixed-count - var re9 = new RegExp(r"(?:a|z|){2,5}"); - shouldBe(firstMatch(emptyStr, re9), [""]); - shouldBe(firstMatch(s1, re9), [""]); - shouldBe(firstMatch(s2, re9), ["aaaa"]); - shouldBe(firstMatch(s3, re9), ["aa"]); - - // Non-capturing empty first alternative non-greedy '*' - var re10 = new RegExp(r"(?:|a|z)*?"); - shouldBe(firstMatch(emptyStr, re10), [""]); - shouldBe(firstMatch(s1, re10), [""]); - shouldBe(firstMatch(s2, re10), [""]); - shouldBe(firstMatch(s3, re10), [""]); - - // Non-capturing empty middle alternative non-greedy '*' - var re11 = new RegExp(r"(?:a||z)*?"); - shouldBe(firstMatch(emptyStr, re11), [""]); - shouldBe(firstMatch(s1, re11), [""]); - shouldBe(firstMatch(s2, re11), [""]); - shouldBe(firstMatch(s3, re11), [""]); - - // Non-capturing empty last alternative non-greedy '*' - var re12 = new RegExp(r"(?:a|z|)*?"); - shouldBe(firstMatch(emptyStr, re12), [""]); - shouldBe(firstMatch(s1, re12), [""]); - shouldBe(firstMatch(s2, re12), [""]); - shouldBe(firstMatch(s3, re12), [""]); - - // Capturing empty first alternative non-greedy '*' - var re13 = new RegExp(r"(|a|z)*?"); - shouldBe(firstMatch(emptyStr, re13), ["", null]); - shouldBe(firstMatch(s1, re13), ["", null]); - shouldBe(firstMatch(s2, re13), ["", null]); - shouldBe(firstMatch(s3, re13), ["", null]); - - // Capturing empty middle alternative non-greedy '*' - var re14 = new RegExp(r"(a||z)*?"); - shouldBe(firstMatch(emptyStr, re14), ["", null]); - shouldBe(firstMatch(s1, re14), ["", null]); - shouldBe(firstMatch(s2, re14), ["", null]); - shouldBe(firstMatch(s3, re14), ["", null]); - - // Capturing empty last alternative non-greedy '*' - var re15 = new RegExp(r"(a|z|)*?"); - shouldBe(firstMatch(emptyStr, re15), ["", null]); - shouldBe(firstMatch(s1, re15), ["", null]); - shouldBe(firstMatch(s2, re15), ["", null]); - shouldBe(firstMatch(s3, re15), ["", null]); - - // Non-capturing empty first alternative greedy '?' - var re16 = new RegExp(r"(?:|a|z)?"); - shouldBe(firstMatch(emptyStr, re16), [""]); - shouldBe(firstMatch(s1, re16), [""]); - shouldBe(firstMatch(s2, re16), ["a"]); - shouldBe(firstMatch(s3, re16), ["a"]); - - // Non-capturing empty middle alternative greedy '?' - var re17 = new RegExp(r"(?:a||z)?"); - shouldBe(firstMatch(emptyStr, re17), [""]); - shouldBe(firstMatch(s1, re17), [""]); - shouldBe(firstMatch(s2, re17), ["a"]); - shouldBe(firstMatch(s3, re17), ["a"]); - - // Non-capturing empty last alternative greedy '?' - var re18 = new RegExp(r"(?:a|z|)?"); - shouldBe(firstMatch(emptyStr, re18), [""]); - shouldBe(firstMatch(s1, re18), [""]); - shouldBe(firstMatch(s2, re18), ["a"]); - shouldBe(firstMatch(s3, re18), ["a"]); - - // Capturing empty first alternative greedy '?' - var re19 = new RegExp(r"(|a|z)?"); - shouldBe(firstMatch(emptyStr, re19), ["", null]); - shouldBe(firstMatch(s1, re19), ["", null]); - shouldBe(firstMatch(s2, re19), ["a", "a"]); - shouldBe(firstMatch(s3, re19), ["a", "a"]); - - // Capturing empty middle alternative greedy '?' - var re20 = new RegExp(r"(a||z)?"); - shouldBe(firstMatch(emptyStr, re20), ["", null]); - shouldBe(firstMatch(s1, re20), ["", null]); - shouldBe(firstMatch(s2, re20), ["a", "a"]); - shouldBe(firstMatch(s3, re20), ["a", "a"]); - - // Capturing empty last alternative greedy '?' - var re21 = new RegExp(r"(a|z|)?"); - shouldBe(firstMatch(emptyStr, re21), ["", null]); - shouldBe(firstMatch(s1, re21), ["", null]); - shouldBe(firstMatch(s2, re21), ["a", "a"]); - shouldBe(firstMatch(s3, re21), ["a", "a"]); - - // Non-capturing empty first alternative non-greedy '?' - var re22 = new RegExp(r"(?:|a|z)??"); - shouldBe(firstMatch(emptyStr, re22), [""]); - shouldBe(firstMatch(s1, re22), [""]); - shouldBe(firstMatch(s2, re22), [""]); - shouldBe(firstMatch(s3, re22), [""]); - - // Non-capturing empty middle alternative non-greedy '?' - var re23 = new RegExp(r"(?:a||z)??"); - shouldBe(firstMatch(emptyStr, re23), [""]); - shouldBe(firstMatch(s1, re23), [""]); - shouldBe(firstMatch(s2, re23), [""]); - shouldBe(firstMatch(s3, re23), [""]); - - // Non-capturing empty last alternative non-greedy '?' - var re24 = new RegExp(r"(?:a|z|)??"); - shouldBe(firstMatch(emptyStr, re24), [""]); - shouldBe(firstMatch(s1, re24), [""]); - shouldBe(firstMatch(s2, re24), [""]); - shouldBe(firstMatch(s3, re24), [""]); - - // Capturing empty first alternative non-greedy '?' - var re25 = new RegExp(r"(|a|z)??"); - shouldBe(firstMatch(emptyStr, re25), ["", null]); - shouldBe(firstMatch(s1, re25), ["", null]); - shouldBe(firstMatch(s2, re25), ["", null]); - shouldBe(firstMatch(s3, re25), ["", null]); - - // Capturing empty middle alternative non-greedy '?' - var re26 = new RegExp(r"(a||z)??"); - shouldBe(firstMatch(emptyStr, re26), ["", null]); - shouldBe(firstMatch(s1, re26), ["", null]); - shouldBe(firstMatch(s2, re26), ["", null]); - shouldBe(firstMatch(s3, re26), ["", null]); - - // Capturing empty last alternative non-greedy '?' - var re27 = new RegExp(r"(a|z|)??"); - shouldBe(firstMatch(emptyStr, re27), ["", null]); - shouldBe(firstMatch(s1, re27), ["", null]); - shouldBe(firstMatch(s2, re27), ["", null]); - shouldBe(firstMatch(s3, re27), ["", null]); - - // Non-capturing empty first alternative greedy '*' non-terminal - var re28 = new RegExp(r"(?:|a|z)*x"); - shouldBe(firstMatch(emptyStr, re28), null); - shouldBe(firstMatch(s1, re28), ["x"]); - shouldBe(firstMatch(s2, re28), null); - shouldBe(firstMatch(s3, re28), ["aax"]); - - // Non-capturing empty middle alternative greedy '*' non-terminal - var re29 = new RegExp(r"(?:a||z)*x"); - shouldBe(firstMatch(emptyStr, re29), null); - shouldBe(firstMatch(s1, re29), ["x"]); - shouldBe(firstMatch(s2, re29), null); - shouldBe(firstMatch(s3, re29), ["aax"]); - - // Non-capturing empty last alternative greedy '*' non-terminal - var re30 = new RegExp(r"(?:a|z|)*x"); - shouldBe(firstMatch(emptyStr, re30), null); - shouldBe(firstMatch(s1, re30), ["x"]); - shouldBe(firstMatch(s2, re30), null); - shouldBe(firstMatch(s3, re30), ["aax"]); - - // Non-capturing two possibly empty alternatives greedy '*' - var re31 = new RegExp(r"(?:a*|b*)*"); - shouldBe(firstMatch(emptyStr, re31), [""]); - shouldBe(firstMatch(s1, re31), [""]); - shouldBe(firstMatch(s3, re31), ["aa"]); - shouldBe(firstMatch(s4, re31), ["abab"]); - - // Non-capturing two possibly empty non-greedy alternatives non-greedy '*' - var re32 = new RegExp(r"(?:a*?|b*?)*"); - shouldBe(firstMatch(emptyStr, re32), [""]); - shouldBe(firstMatch(s1, re32), [""]); - shouldBe(firstMatch(s2, re32), ["aaaa"]); - shouldBe(firstMatch(s4, re32), ["abab"]); - shouldBe(firstMatch(s5, re32), ["ab"]); - shouldBe(firstMatch(s6, re32), [""]); - - // Three possibly empty alternatives with greedy + - var re33 = new RegExp(r"(?:(?:(?!))|g?|0*\*?)+"); - shouldBe(firstMatch(emptyStr, re33), [""]); - shouldBe(firstMatch(s1, re33), [""]); - shouldBe(firstMatch(s7, re33), ["g0"]); - - // first alternative zero length fixed count - var re34 = new RegExp(r"(?:|a)"); - shouldBe(firstMatch(emptyStr, re34), [""]); - shouldBe(firstMatch(s1, re34), [""]); - shouldBe(firstMatch(s2, re34), [""]); - shouldBe(firstMatch(s3, re34), [""]); -} diff --git a/tests/corelib_2/regress_11099_test.dart b/tests/corelib_2/regress_11099_test.dart deleted file mode 100644 index 8a0bb39b9cd..00000000000 --- a/tests/corelib_2/regress_11099_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2013, 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 - -void main() { - var l = [new MyTest(1), new MyTest(5), new MyTest(3)]; - l.sort(); - if (l.toString() != "[d{1}, d{3}, d{5}]") throw 'Wrong result!'; -} - -class MyTest implements Comparable { - final int a; - MyTest(this.a); - int compareTo(MyTest b) => this.a - b.a; - String toString() => "d{$a}"; -} diff --git a/tests/corelib_2/regress_33166_test.dart b/tests/corelib_2/regress_33166_test.dart deleted file mode 100644 index 65e7cba739b..00000000000 --- a/tests/corelib_2/regress_33166_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; -import "package:expect/expect.dart"; - -// Regression test for https://github.com/dart-lang/sdk/issues/33166 -void main() async { - // Check that a `null` data handler (like the one passe by `drain`) - // doesn't crash. - { - var stream = new Stream.fromIterable([1, 2, 3]); - Expect.equals(await stream.cast().drain().then((_) => 'Done'), 'Done'); - } - - // Check that type errors go into stream error channel. - { - var stream = new Stream.fromIterable([1, 2, 3]); - var errors = []; - var done = new Completer(); - var subscription = stream.cast().listen((value) { - Expect.fail("Unexpected value: $value"); - }, onError: (e, s) { - errors.add(e); - }, onDone: () { - done.complete(null); - }); - await done.future; - Expect.equals(3, errors.length); - } -} diff --git a/tests/corelib_2/regress_42011_test.dart b/tests/corelib_2/regress_42011_test.dart deleted file mode 100644 index 96c9f2f68c3..00000000000 --- a/tests/corelib_2/regress_42011_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Regression test for https://github.com/dart-lang/sdk/issues/42011 -main() { - var a = []; - // No elements are added, so should not get a ConcurrentModificationError. - a.addAll(a); -} diff --git a/tests/corelib_2/regress_r21715_test.dart b/tests/corelib_2/regress_r21715_test.dart deleted file mode 100644 index f3b0eb114ff..00000000000 --- a/tests/corelib_2/regress_r21715_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2014, 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 - -// VMOptions=--optimization_counter_threshold=5 --no-background_compilation - -import "package:expect/expect.dart"; - -sll(x, shift) => x << shift; - -main() { - for (int i = 0; i < 10; i++) { - var x = 0x50000000; - var shift = 34; - Expect.equals(sll(x, shift), 0x4000000000000000); - } -} diff --git a/tests/corelib_2/safe_to_string_test.dart b/tests/corelib_2/safe_to_string_test.dart deleted file mode 100644 index 9878fee7ae5..00000000000 --- a/tests/corelib_2/safe_to_string_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - Expect.stringEquals('1', Error.safeToString(1)); - Expect.stringEquals('0.5', Error.safeToString(0.5)); - Expect.stringEquals('"1"', Error.safeToString("1")); - Expect.stringEquals('"\'"', Error.safeToString("'")); - Expect.stringEquals('"\'\'"', Error.safeToString("''")); - Expect.stringEquals(r'"\""', Error.safeToString('"')); - Expect.stringEquals(r'"\"\""', Error.safeToString('""')); - - Expect.stringEquals(r'"\\\"\n\r"', Error.safeToString('\\"\n\r')); - - Expect.stringEquals(r'"\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007"', - Error.safeToString('\x00\x01\x02\x03\x04\x05\x06\x07')); - Expect.stringEquals(r'"\b\t\n\u000b\f\r\u000e\u000f"', - Error.safeToString('\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f')); - Expect.stringEquals(r'"\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017"', - Error.safeToString('\x10\x11\x12\x13\x14\x15\x16\x17')); - Expect.stringEquals(r'"\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f"', - Error.safeToString('\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f')); - Expect.stringEquals('" "', Error.safeToString(" ")); - - Expect.stringEquals('null', Error.safeToString(null)); - Expect.stringEquals('true', Error.safeToString(true)); - Expect.stringEquals('false', Error.safeToString(false)); - // The class name may be minified. - String className = "$Object"; - Expect.stringEquals( - "Instance of '$className'", Error.safeToString(new Object())); -} diff --git a/tests/corelib_2/set_containsAll_test.dart b/tests/corelib_2/set_containsAll_test.dart deleted file mode 100644 index 6bd9f723359..00000000000 --- a/tests/corelib_2/set_containsAll_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class A { - const A(); -} - -class B extends A { - const B(); -} - -main() { - var set1 = new Set(); - set1.add(const B()); - var set2 = new Set(); - var list = [const B()]; - var set3 = list.toSet(); - - var sets = [set1, set2, set3]; - for (var setToTest in sets) { - Expect.isFalse(setToTest.containsAll([new A()])); - } -} diff --git a/tests/corelib_2/set_contains_test.dart b/tests/corelib_2/set_contains_test.dart deleted file mode 100644 index c292d91d987..00000000000 --- a/tests/corelib_2/set_contains_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class A { - const A(); -} - -class B extends A { - const B(); -} - -main() { - var set1 = new Set(); - set1.add(const B()); - var set2 = new Set(); - var list = [const B()]; - var set3 = list.toSet(); - - var sets = [set1, set2, set3]; - for (var setToTest in sets) { - // Test that the set accepts a value that is not of the same type - // Set.contains(A) - Expect.isFalse(setToTest.contains(new A())); - } -} diff --git a/tests/corelib_2/set_intersection_test.dart b/tests/corelib_2/set_intersection_test.dart deleted file mode 100644 index abf1f14510f..00000000000 --- a/tests/corelib_2/set_intersection_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class A { - const A(); -} - -class B extends A { - const B(); -} - -main() { - var set1 = new Set(); - set1.add(const B()); - var set2 = new Set(); - var list = [const B()]; - var set3 = list.toSet(); - - var setOther = new Set(); - setOther.add(new A()); - var sets = [set1, set2, set3]; - for (var setToTest in sets) { - // Test that the set accepts another set that is not of the same type: - // Set.intersection(Set) - Set result = setToTest.intersection(setOther); - Expect.isTrue(result.isEmpty); - } -} diff --git a/tests/corelib_2/set_iterator_test.dart b/tests/corelib_2/set_iterator_test.dart deleted file mode 100644 index d904f46ad42..00000000000 --- a/tests/corelib_2/set_iterator_test.dart +++ /dev/null @@ -1,148 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class FixedHashCode { - final int _hashCode; - const FixedHashCode(this._hashCode); - int get hashCode { - return _hashCode; - } -} - -class SetIteratorTest { - static testMain() { - testSmallSet(); - testLargeSet(); - testEmptySet(); - testSetWithDeletedEntries(); - testBug5116829(); - testDifferentSizes(); - testDifferentHashCodes(); - } - - static int sum(int expected, Iterator it) { - int count = 0; - while (it.moveNext()) { - count += it.current; - } - Expect.equals(expected, count); - } - - static void testSmallSet() { - Set set = new Set(); - set.add(1); - set.add(2); - set.add(3); - - Iterator it = set.iterator; - sum(6, it); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - } - - static void testLargeSet() { - Set set = new Set(); - int count = 0; - for (int i = 0; i < 100; i++) { - count += i; - set.add(i); - } - Iterator it = set.iterator; - sum(count, it); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - } - - static void testEmptySet() { - Set set = new Set(); - Iterator it = set.iterator; - sum(0, it); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - } - - static void testSetWithDeletedEntries() { - Set set = new Set(); - for (int i = 0; i < 100; i++) { - set.add(i); - } - for (int i = 0; i < 100; i++) { - set.remove(i); - } - Iterator it = set.iterator; - Expect.isFalse(it.moveNext()); - it = set.iterator; - sum(0, it); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - - int count = 0; - for (int i = 0; i < 100; i++) { - set.add(i); - if (i % 2 == 0) - set.remove(i); - else - count += i; - } - it = set.iterator; - sum(count, it); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - } - - static void testBug5116829() { - // During iteration we skipped slot 0 of the hashset's key list. "A" was - // hashed to slot 0 and therefore triggered the bug. - Set mystrs = new Set(); - mystrs.add("A"); - int seen = 0; - for (String elt in mystrs) { - seen++; - Expect.equals("A", elt); - } - Expect.equals(1, seen); - } - - static void testDifferentSizes() { - for (int i = 1; i < 20; i++) { - Set set = new Set(); - int sum = 0; - for (int j = 0; j < i; j++) { - set.add(j); - sum += j; - } - int count = 0; - int controlSum = 0; - for (int x in set) { - controlSum += x; - count++; - } - Expect.equals(i, count); - Expect.equals(sum, controlSum); - } - } - - static void testDifferentHashCodes() { - for (int i = -20; i < 20; i++) { - Set set = new Set(); - var element = new FixedHashCode(i); - set.add(element); - Expect.equals(1, set.length); - bool foundIt = false; - for (var x in set) { - foundIt = true; - Expect.equals(true, identical(x, element)); - } - Expect.equals(true, foundIt); - } - } -} - -main() { - SetIteratorTest.testMain(); -} diff --git a/tests/corelib_2/set_removeAll_test.dart b/tests/corelib_2/set_removeAll_test.dart deleted file mode 100644 index f397c217877..00000000000 --- a/tests/corelib_2/set_removeAll_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class A { - const A(); -} - -class B extends A { - const B(); -} - -main() { - var set1 = new Set(); - set1.add(const B()); - var set2 = new Set(); - var list = [const B()]; - var set3 = list.toSet(); - - var sets = [set1, set2, set3]; - for (var setToTest in sets) { - // Test that the set accepts a list that is not of the same type: - // Set.removeAll(List) - Expect.isNull(setToTest.removeAll([new A()]) as dynamic); - } -} diff --git a/tests/corelib_2/set_remove_test.dart b/tests/corelib_2/set_remove_test.dart deleted file mode 100644 index 4e917d7f78d..00000000000 --- a/tests/corelib_2/set_remove_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class A { - const A(); -} - -class B extends A { - const B(); -} - -main() { - var set1 = new Set(); - set1.add(const B()); - var set2 = new Set(); - var list = [const B()]; - var set3 = list.toSet(); - - var sets = [set1, set2, set3]; - for (var setToTest in sets) { - // Test that the set accepts a value that is not of the same type - // Set.remove(A) - Expect.isFalse(setToTest.remove(new A())); - } -} diff --git a/tests/corelib_2/set_retainAll_test.dart b/tests/corelib_2/set_retainAll_test.dart deleted file mode 100644 index c4e1f5bfbb3..00000000000 --- a/tests/corelib_2/set_retainAll_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class A { - const A(); -} - -class B extends A { - const B(); -} - -main() { - var set1 = new Set(); - set1.add(const B()); - var set2 = new Set(); - var list = [const B()]; - var set3 = list.toSet(); - - var sets = [set1, set2, set3]; - for (var setToTest in sets) { - // Test that the set accepts a list that is not of the same type: - // Set.retainAll(List) - setToTest.retainAll([new A()]); - } -} diff --git a/tests/corelib_2/set_test.dart b/tests/corelib_2/set_test.dart deleted file mode 100644 index 1fb8211fe2e..00000000000 --- a/tests/corelib_2/set_test.dart +++ /dev/null @@ -1,621 +0,0 @@ -// 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 set_test; - -import 'package:expect/expect.dart'; -import "dart:collection"; - -void testMain(Set create()) { - testInts(create); - testStrings(create); - testInts(() => create().toSet()); - testStrings(() => create().toSet()); -} - -void testInts(Set create()) { - Set set = create(); - - testLength(0, set); - Expect.isTrue(set.add(1)); - testLength(1, set); - Expect.isTrue(set.contains(1)); - - Expect.isFalse(set.add(1)); - testLength(1, set); - Expect.isTrue(set.contains(1)); - - Expect.isTrue(set.remove(1)); - testLength(0, set); - Expect.isFalse(set.contains(1)); - - Expect.isFalse(set.remove(1)); - testLength(0, set); - Expect.isFalse(set.contains(1)); - - for (int i = 0; i < 10; i++) { - set.add(i); - } - - testLength(10, set); - for (int i = 0; i < 10; i++) { - Expect.isTrue(set.contains(i)); - } - - testLength(10, set); - - for (int i = 10; i < 20; i++) { - Expect.isFalse(set.contains(i)); - } - - // Test Set.forEach. - int sum = 0; - testForEach(Object val) { - sum += ((val as int) + 1); - } - - set.forEach(testForEach); - Expect.equals(10 + 9 + 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1, sum); - - Expect.isTrue(set.containsAll(set)); - - // Test Set.map. - testMap(Object val) { - return (val as int) * (val as int); - } - - Set mapped = set.map(testMap).toSet(); - Expect.equals(10, mapped.length); - - Expect.isTrue(mapped.contains(0)); - Expect.isTrue(mapped.contains(1)); - Expect.isTrue(mapped.contains(4)); - Expect.isTrue(mapped.contains(9)); - Expect.isTrue(mapped.contains(16)); - Expect.isTrue(mapped.contains(25)); - Expect.isTrue(mapped.contains(36)); - Expect.isTrue(mapped.contains(49)); - Expect.isTrue(mapped.contains(64)); - Expect.isTrue(mapped.contains(81)); - - sum = 0; - set.forEach(testForEach); - Expect.equals(10 + 9 + 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1, sum); - - sum = 0; - - mapped.forEach(testForEach); - Expect.equals(1 + 2 + 5 + 10 + 17 + 26 + 37 + 50 + 65 + 82, sum); - - // Test Set.filter. - testFilter(Object val) { - return (val as int).isEven; - } - - Set filtered = set.where(testFilter).toSet(); - - Expect.equals(5, filtered.length); - - Expect.isTrue(filtered.contains(0)); - Expect.isTrue(filtered.contains(2)); - Expect.isTrue(filtered.contains(4)); - Expect.isTrue(filtered.contains(6)); - Expect.isTrue(filtered.contains(8)); - - sum = 0; - filtered.forEach(testForEach); - Expect.equals(1 + 3 + 5 + 7 + 9, sum); - - Expect.isTrue(set.containsAll(filtered)); - - // Test Set.every. - testEvery(Object val) { - return ((val as int) < 10); - } - - Expect.isTrue(set.every(testEvery)); - Expect.isTrue(filtered.every(testEvery)); - - filtered.add(10); - Expect.isFalse(filtered.every(testEvery)); - - // Test Set.some. - testSome(Object val) { - return (val == 4); - } - - Expect.isTrue(set.any(testSome)); - Expect.isTrue(filtered.any(testSome)); - filtered.remove(4); - Expect.isFalse(filtered.any(testSome)); - - // Test Set.intersection. - Set intersection = set.intersection(filtered); - Expect.isTrue(set.contains(0)); - Expect.isTrue(set.contains(2)); - Expect.isTrue(set.contains(6)); - Expect.isTrue(set.contains(8)); - Expect.isFalse(intersection.contains(1)); - Expect.isFalse(intersection.contains(3)); - Expect.isFalse(intersection.contains(4)); - Expect.isFalse(intersection.contains(5)); - Expect.isFalse(intersection.contains(7)); - Expect.isFalse(intersection.contains(9)); - Expect.isFalse(intersection.contains(10)); - Expect.equals(4, intersection.length); - - Expect.isTrue(set.containsAll(intersection)); - Expect.isTrue(filtered.containsAll(intersection)); - - // Test Set.union. - Set twice = create()..addAll([0, 2, 4, 6, 8, 10, 12, 14]); - Set thrice = create()..addAll([0, 3, 6, 9, 12, 15]); - Set union = twice.union(thrice); - Expect.equals(11, union.length); - for (int i = 0; i < 16; i++) { - Expect.equals(i.isEven || (i % 3) == 0, union.contains(i)); - } - - // Test Set.difference. - Set difference = twice.difference(thrice); - Expect.equals(5, difference.length); - for (int i = 0; i < 16; i++) { - Expect.equals(i.isEven && (i % 3) != 0, difference.contains(i)); - } - Expect.isTrue(twice.difference(thrice).difference(twice).isEmpty); - - // Test Set.difference with non-element type. - Set diffSet = create()..addAll([0, 1, 2, 499, 999]); - Set objectSet = new Set(); - objectSet.add("foo"); - objectSet.add(499); - Set diffResult = diffSet.difference(objectSet); - Expect.equals(4, diffResult.length); - for (int value in [0, 1, 2, 999]) { - Expect.isTrue(diffResult.contains(value)); - } - - // Test Set.addAll. - List list = new List.filled(10, null); - for (int i = 0; i < 10; i++) { - list[i] = i + 10; - } - set.addAll(list); - testLength(20, set); - for (int i = 0; i < 20; i++) { - Expect.isTrue(set.contains(i)); - } - - // Test Set.removeAll - set.removeAll(list); - testLength(10, set); - for (int i = 0; i < 10; i++) { - Expect.isTrue(set.contains(i)); - } - for (int i = 10; i < 20; i++) { - Expect.isFalse(set.contains(i)); - } - - // Test Set.clear. - set.clear(); - testLength(0, set); - Expect.isTrue(set.add(11)); - testLength(1, set); - - // Test Set.toSet. - set.add(1); - set.add(21); - testLength(3, set); - var set2 = set.toSet(); - testLength(3, set2); - Expect.listEquals(set.toList(), set2.toList()); - set.add(31); - testLength(4, set); - testLength(3, set2); - - set2 = set.toSet()..clear(); - testLength(0, set2); - Expect.isTrue(set2.add(11)); - Expect.isTrue(set2.add(1)); - Expect.isTrue(set2.add(21)); - Expect.isTrue(set2.add(31)); - testLength(4, set2); - Expect.listEquals(set.toList(), set2.toList()); - - set2 = (set.toSet()..clear()).toSet(); // Cloning empty set shouldn't fail. - testLength(0, set2); -} - -void testLength(int length, Set set) { - Expect.equals(length, set.length); - (length == 0 ? Expect.isTrue : Expect.isFalse)(set.isEmpty); - (length != 0 ? Expect.isTrue : Expect.isFalse)(set.isNotEmpty); - if (length == 0) { - for (var e in set) { - Expect.fail("contains element when iterated: $e"); - } - } - (length == 0 ? Expect.isFalse : Expect.isTrue)(set.iterator.moveNext()); -} - -void testStrings(Set create()) { - var set = create(); - var strings = ["foo", "bar", "baz", "qux", "fisk", "hest", "svin", "pigvar"]; - set.addAll(strings); - testLength(8, set); - set.removeAll(strings.where((x) => x.length == 3)); - testLength(4, set); - Expect.isTrue(set.add("bar")); - Expect.isTrue(set.add("qux")); - testLength(6, set); - set.addAll(strings); - testLength(8, set); - set.removeWhere((x) => x.length != 3); - testLength(4, set); - set.retainWhere((x) => x[1] == "a"); - testLength(2, set); - Expect.isTrue(set.containsAll(["baz", "bar"])); - - set = set.union(strings.where((x) => x.length != 3).toSet()); - testLength(6, set); - set = set.intersection(["qux", "baz", "fisk", "egern"].toSet()); - testLength(2, set); - Expect.isTrue(set.containsAll(["baz", "fisk"])); -} - -void testTypeAnnotations(Set set) { - set.add(0); - set.add(999); - set.add(0x800000000); - set.add(0x20000000000000); - Expect.isFalse(set.contains("not an it")); - Expect.isFalse(set.remove("not an it")); - Expect.isFalse(set.containsAll(["Not an int", "Also no an int"])); - - testLength(4, set); - set.removeAll(["Not an int", 999, "Also no an int"]); - testLength(3, set); - set.retainAll(["Not an int", 0, "Also no an int"]); - testLength(1, set); -} - -void testRetainWhere( - Set create( - [CEEq equals, CEHash hashCode, ValidKey validKey, CECompare compare])) { - // The retainWhere method must not collapse the argument Iterable - // in a way that doesn't match the equality of the set. - // It must not throw away equal elements that are different in the - // equality of the set. - // It must not consider objects to be not there if they are equal - // in the equality of the set. - - // If set equality is natural equality, using different but equal objects - // must work. Can't use an identity set internally (as was done at some point - // during development). - var set = create(); - set.addAll([new CE(0), new CE(1), new CE(2)]); - Expect.equals(3, set.length); // All different. - set.retainAll([new CE(0), new CE(2)]); - Expect.equals(2, set.length); - Expect.isTrue(set.contains(new CE(0))); - Expect.isTrue(set.contains(new CE(2))); - - // If equality of set is identity, we can't internally use a non-identity - // based set because it might throw away equal objects that are not identical. - var elems = [new CE(0), new CE(1), new CE(2), new CE(0)]; - set = create(identical, null, null, identityCompare); - set.addAll(elems); - Expect.equals(4, set.length); - set.retainAll([elems[0], elems[2], elems[3]]); - Expect.equals(3, set.length); - Expect.isTrue(set.contains(elems[0])); - Expect.isTrue(set.contains(elems[2])); - Expect.isTrue(set.contains(elems[3])); - - // If set equality is less precise than equality, we must not use equality - // internally to see if the element is there: - set = create(customEq(3), customHash(3), validKey, customCompare(3)); - set.addAll([new CE(0), new CE(1), new CE(2)]); - Expect.equals(3, set.length); - set.retainAll([new CE(3), new CE(5)]); - Expect.equals(2, set.length); - Expect.isTrue(set.contains(new CE(6))); - Expect.isTrue(set.contains(new CE(8))); - - // It shouldn't matter if the input is a set. - set.clear(); - set.addAll([new CE(0), new CE(1), new CE(2)]); - Expect.equals(3, set.length); - set.retainAll(new Set.from([new CE(3), new CE(5)])); - Expect.equals(2, set.length); - Expect.isTrue(set.contains(new CE(6))); - Expect.isTrue(set.contains(new CE(8))); -} - -void testDifferenceIntersection(create([equals, hashCode, validKey, compare])) { - // Test that elements of intersection comes from receiver set. - CE ce1a = new CE(1); - CE ce1b = new CE(1); - CE ce2 = new CE(2); - CE ce3 = new CE(3); - Expect.equals(ce1a, ce1b); // Sanity check. - - var set1 = create(); - var set2 = create(); - set1.add(ce1a); - set1.add(ce2); - set2.add(ce1b); - set2.add(ce3); - - var difference = set1.difference(set2); - testLength(1, difference); - Expect.identical(ce2, difference.lookup(ce2)); - - difference = set2.difference(set1); - testLength(1, difference); - Expect.identical(ce3, difference.lookup(ce3)); - - // Difference uses other.contains to check for equality. - var set3 = create(identical, identityHashCode, null, identityCompare); - set3.add(ce1b); - difference = set1.difference(set3); - testLength(2, difference); // ce1a is not identical to element in set3. - Expect.identical(ce1a, difference.lookup(ce1a)); - Expect.identical(ce2, difference.lookup(ce2)); - - // Intersection always takes elements from receiver set. - var intersection = set1.intersection(set2); - testLength(1, intersection); - Expect.identical(ce1a, intersection.lookup(ce1a)); - - intersection = set1.intersection(set3); - testLength(0, intersection); -} - -// Objects that are equal based on data. -class CE implements Comparable { - final int id; - const CE(this.id); - int get hashCode => id; - bool operator ==(Object other) => other is CE && id == other.id; - int compareTo(CE other) => id - other.id; - String toString() => "CE($id)"; -} - -typedef int CECompare(CE e1, CE e2); -typedef int CEHash(CE e1); -typedef bool CEEq(CE e1, CE e2); -typedef bool ValidKey(Object o); -// Equality of Id objects based on id modulo value. -CEEq customEq(int mod) => (CE e1, CE e2) => ((e1.id - e2.id) % mod) == 0; -CEHash customHash(int mod) => (CE e) => e.id % mod; -CECompare customCompare(int mod) => - (CE e1, CE e2) => (e1.id % mod) - (e2.id % mod); -bool validKey(Object o) => o is CE; -final customId = new Map.identity(); -int counter = 0; -int identityCompare(e1, e2) { - if (identical(e1, e2)) return 0; - int i1 = customId.putIfAbsent(e1, () => ++counter); - int i2 = customId.putIfAbsent(e2, () => ++counter); - return i1 - i2; -} - -void testIdentity(Set create()) { - Set set = create(); - var e1 = new CE(0); - var e2 = new CE(0); - Expect.equals(e1, e2); - Expect.isFalse(identical(e1, e2)); - - testLength(0, set); - set.add(e1); - testLength(1, set); - Expect.isTrue(set.contains(e1)); - Expect.isFalse(set.contains(e2)); - - set.add(e2); - testLength(2, set); - Expect.isTrue(set.contains(e1)); - Expect.isTrue(set.contains(e2)); - - var set2 = set.toSet(); - testLength(2, set2); - Expect.isTrue(set2.contains(e1)); - Expect.isTrue(set2.contains(e2)); -} - -void testIntSetFrom(setFrom) { - List numList = [2, 3, 5, 7, 11, 13]; - - Set set1 = setFrom(numList); - Expect.listEquals(numList, set1.toList()..sort()); - - Set numSet = numList.toSet(); - Set set2 = setFrom(numSet); - Expect.listEquals(numList, set2.toList()..sort()); - - Iterable numIter = numList.where((x) => true); - Set set3 = setFrom(numIter); - Expect.listEquals(numList, set3.toList()..sort()); - - Set set4 = setFrom(new Iterable.generate(0)); - Expect.isTrue(set4.isEmpty); -} - -void testCESetFrom(setFrom) { - var ceList = [ - new CE(2), - new CE(3), - new CE(5), - new CE(7), - new CE(11), - new CE(13) - ]; - - Set set1 = setFrom(ceList); - Expect.listEquals(ceList, set1.toList()..sort()); - - Set ceSet = ceList.toSet(); - Set set2 = setFrom(ceSet); - Expect.listEquals(ceList, set2.toList()..sort()); - - Iterable ceIter = ceList.where((x) => true); - Set set3 = setFrom(ceIter); - Expect.listEquals(ceList, set3.toList()..sort()); - - Set set4 = setFrom(new Iterable.generate(0)); - Expect.isTrue(set4.isEmpty); -} - -class A {} - -class B {} - -class C implements A, B {} - -void testASetFrom(setFrom) { - List bList = [new C()]; - // Set.from allows to cast elements. - Set aSet = setFrom(bList); - Expect.isTrue(aSet.length == 1); -} - -void testUnmodifiable(Set source) { - var unmodifiable = Set.unmodifiable(source); - - Expect.throwsUnsupportedError(() { - unmodifiable.add(3); - }, "add"); - - Expect.throwsUnsupportedError(() { - unmodifiable.addAll({1, 2, 3}); - }, "addAll"); - - Expect.throwsUnsupportedError(() { - unmodifiable.addAll({}); - }, "addAll empty"); - - Expect.throwsUnsupportedError(() { - unmodifiable.remove(3); - }, "remove"); - - Expect.throwsUnsupportedError(() { - unmodifiable.removeAll({1, 2, 3}); - }, "removeAll"); - - Expect.throwsUnsupportedError(() { - unmodifiable.removeAll({}); - }, "removeAll empty"); - - Expect.throwsUnsupportedError(() { - unmodifiable.retainAll({1, 2, 3}); - }, "retainAll"); - - Expect.throwsUnsupportedError(() { - unmodifiable.retainAll({}); - }, "retainAll empty"); - - Expect.throwsUnsupportedError(() { - unmodifiable.removeWhere((_) => true); - }, "removeWhere"); - - Expect.throwsUnsupportedError(() { - unmodifiable.retainWhere((_) => false); - }, "retainWhere"); - - Expect.throwsUnsupportedError(() { - unmodifiable.clear(); - }, "clear"); -} - -void testUnmodifiableSetIsNotUpdatedIfSourceSetIsUpdated() { - var modifiable = {1}; - var unmodifiable = Set.unmodifiable(modifiable); - - modifiable.add(2); - Expect.notEquals(modifiable.length, unmodifiable.length); - Expect.setEquals({2}, modifiable.difference(unmodifiable)); - modifiable.removeAll({1, 2}); - Expect.setEquals({1}, unmodifiable.difference(modifiable)); - Expect.setEquals({1}, unmodifiable); -} - -main() { - testMain(() => new HashSet()); - testMain(() => new LinkedHashSet()); - testMain(() => new HashSet.identity()); - testMain(() => new LinkedHashSet.identity()); - testMain(() => new HashSet(equals: identical)); - testMain(() => new LinkedHashSet(equals: identical)); - testMain(() => new HashSet( - equals: (a, b) => a == b, - hashCode: (a) => -a.hashCode, - isValidKey: (a) => true)); - testMain(() => new LinkedHashSet( - equals: (a, b) => a == b, - hashCode: (a) => -a.hashCode, - isValidKey: (a) => true)); - testMain(() => new SplayTreeSet()); - - testIdentity(() => new HashSet.identity()); - testIdentity(() => new LinkedHashSet.identity()); - testIdentity(() => new HashSet(equals: identical)); - testIdentity(() => new LinkedHashSet(equals: identical)); - testIdentity(() => new SplayTreeSet(identityCompare)); - - testTypeAnnotations(new HashSet()); - testTypeAnnotations(new LinkedHashSet()); - testTypeAnnotations(new HashSet(equals: identical)); - testTypeAnnotations(new LinkedHashSet(equals: identical)); - testTypeAnnotations(new HashSet( - equals: (int a, int b) => a == b, - hashCode: (int a) => a.hashCode, - isValidKey: (a) => a is int)); - testTypeAnnotations(new LinkedHashSet( - equals: (int a, int b) => a == b, - hashCode: (int a) => a.hashCode, - isValidKey: (a) => a is int)); - testTypeAnnotations(new SplayTreeSet()); - - testRetainWhere(([equals, hashCode, validKey, comparator]) => - new HashSet(equals: equals, hashCode: hashCode, isValidKey: validKey)); - testRetainWhere(([equals, hashCode, validKey, comparator]) => - new LinkedHashSet( - equals: equals, hashCode: hashCode, isValidKey: validKey)); - testRetainWhere(([equals, hashCode, validKey, comparator]) => - new SplayTreeSet(comparator, validKey)); - - testDifferenceIntersection(([equals, hashCode, validKey, comparator]) => - new HashSet(equals: equals, hashCode: hashCode, isValidKey: validKey)); - testDifferenceIntersection(([equals, hashCode, validKey, comparator]) => - new LinkedHashSet( - equals: equals, hashCode: hashCode, isValidKey: validKey)); - testDifferenceIntersection(([equals, hashCode, validKey, comparator]) => - new SplayTreeSet(comparator, validKey)); - - testIntSetFrom((x) => new Set.from(x)); - testIntSetFrom((x) => new HashSet.from(x)); - testIntSetFrom((x) => new LinkedHashSet.from(x)); - testIntSetFrom((x) => new SplayTreeSet.from(x)); - - testCESetFrom((x) => new Set.from(x)); - testCESetFrom((x) => new HashSet.from(x)); - testCESetFrom((x) => new LinkedHashSet.from(x)); - testCESetFrom((x) => new SplayTreeSet.from(x)); - - testCESetFrom( - (x) => new SplayTreeSet.from(x, customCompare(20), validKey)); - testCESetFrom((x) => new SplayTreeSet.from(x, identityCompare)); - - testASetFrom((x) => new Set.from(x)); - testASetFrom((x) => new HashSet.from(x)); - testASetFrom((x) => new LinkedHashSet.from(x)); - testASetFrom((x) => new SplayTreeSet.from(x, identityCompare)); - - testUnmodifiable({1}); - testUnmodifiableSetIsNotUpdatedIfSourceSetIsUpdated(); -} diff --git a/tests/corelib_2/set_to_string_test.dart b/tests/corelib_2/set_to_string_test.dart deleted file mode 100644 index 32872dd21a3..00000000000 --- a/tests/corelib_2/set_to_string_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import "dart:collection"; - -void main() { - Set s = new HashSet(); - s.add(1); - Expect.equals("{1}", s.toString()); - s.remove(1); - s.add(s); - Expect.equals("{{...}}", s.toString()); - - Queue q = new ListQueue(4); - q.add(1); - q.add(2); - q.add(q); - q.add(s); - - Expect.equals("{1, 2, {...}, {{...}}}", q.toString()); - - // Throwing in the middle of a toString does not leave the - // set as being visited - q.addLast(new ThrowOnToString()); - Expect.throws(q.toString, (e) => e == "Bad!"); - q.removeLast(); - Expect.equals("{1, 2, {...}, {{...}}}", q.toString()); -} - -class ThrowOnToString { - String toString() { - throw "Bad!"; - } -} diff --git a/tests/corelib_2/set_unmodifiable_view_test.dart b/tests/corelib_2/set_unmodifiable_view_test.dart deleted file mode 100644 index 4a1dbed932e..00000000000 --- a/tests/corelib_2/set_unmodifiable_view_test.dart +++ /dev/null @@ -1,222 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; -import "dart:collection"; - -main() { - testIterableApi(); - testUnmodifiableSetApi(); - testMutatingApisThrow(); - testChangesInOriginalSetAreObservedInUnmodifiableView(); -} - -void testIterableApi() { - Set original = {1, 2, 3}; - Set copy = {...original}; - UnmodifiableSetView wrapped = new UnmodifiableSetView(original); - - Expect.equals(wrapped.any((_) => true), original.any((_) => true)); - Expect.equals(wrapped.any((_) => false), original.any((_) => false)); - - Expect.equals(wrapped.contains(0), original.contains(0)); - Expect.equals(wrapped.elementAt(0), original.elementAt(0)); - - Expect.equals(wrapped.every((_) => true), original.every((_) => true)); - Expect.equals(wrapped.every((_) => false), original.every((_) => false)); - - Expect.setEquals( - wrapped.expand((x) => [x, x]), original.expand((x) => [x, x])); - - Expect.equals(wrapped.first, original.first); - - Expect.equals( - wrapped.firstWhere((_) => true), original.firstWhere((_) => true)); - Expect.throwsStateError(() { - wrapped.firstWhere((_) => false); - }, "firstWhere"); - - Expect.equals(wrapped.fold(0, (x, y) => x + y), - original.fold(0, (x, y) => x + y)); - - testForeach(wrapped, original); - - Expect.equals(wrapped.isEmpty, original.isEmpty); - - Expect.equals(wrapped.isNotEmpty, original.isNotEmpty); - - testIterator(wrapped, original); - - Expect.equals(wrapped.join(""), original.join("")); - Expect.equals(wrapped.join("-"), original.join("-")); - - Expect.equals(wrapped.last, original.last); - - Expect.equals( - wrapped.lastWhere((_) => true), original.lastWhere((_) => true)); - Expect.throwsStateError(() { - wrapped.lastWhere((_) => false); - }, "lastWhere"); - - Expect.equals(wrapped.length, original.length); - - Expect.setEquals(wrapped.map((x) => "[$x]"), original.map((x) => "[$x]")); - - Expect.equals( - wrapped.reduce((x, y) => x + y), original.reduce((x, y) => x + y)); - - Expect.throwsStateError(() { - wrapped.single; - }, "single"); - - Expect.throwsStateError(() { - wrapped.singleWhere((_) => true); - }, "singleWhere true"); - Expect.throwsStateError(() { - wrapped.singleWhere((_) => false); - }, "singleWhere false"); - - Expect.setEquals(wrapped.skip(0), original.skip(0)); - Expect.setEquals(wrapped.skip(1), original.skip(1)); - - Expect.setEquals( - wrapped.skipWhile((_) => true), original.skipWhile((_) => true)); - Expect.setEquals( - wrapped.skipWhile((_) => false), original.skipWhile((_) => false)); - - Expect.setEquals(wrapped.take(0), original.take(0)); - Expect.setEquals(wrapped.take(1), original.take(1)); - - Expect.setEquals( - wrapped.takeWhile((_) => true), original.takeWhile((_) => true)); - Expect.setEquals( - wrapped.takeWhile((_) => false), original.takeWhile((_) => false)); - - var toListResult = wrapped.toList(); - Expect.listEquals(original.toList(), toListResult); - toListResult.add(4); - Expect.listEquals([1, 2, 3, 4], toListResult); - toListResult[3] = 5; - Expect.listEquals([1, 2, 3, 5], toListResult); - // wrapped and original are intact - Expect.setEquals(copy, wrapped); - Expect.setEquals(copy, original); - - var toSetResult = wrapped.toSet(); - Expect.setEquals(original.toSet(), toSetResult); - toSetResult.add(4); - Expect.setEquals({1, 2, 3, 4}, toSetResult); - // wrapped and original are intact - Expect.setEquals(copy, wrapped); - Expect.setEquals(copy, original); - - Expect.setEquals(wrapped.where((_) => true), original.where((_) => true)); - Expect.setEquals(wrapped.where((_) => false), original.where((_) => false)); -} - -void testUnmodifiableSetApi() { - Set original = {1, 2, 3}; - Set copy = {...original}; - UnmodifiableSetView wrapped = new UnmodifiableSetView(original); - - Expect.isTrue(wrapped.containsAll(copy)); - Expect.isTrue(wrapped.containsAll(copy.toList())); - Expect.isTrue(wrapped.containsAll([])); - - Expect.isTrue(wrapped.intersection({}).isEmpty); - Expect.setEquals(wrapped.intersection(copy), original); - - Expect.setEquals(wrapped.union({}), original); - Expect.setEquals(wrapped.union(copy), original); - - Expect.setEquals(wrapped.difference({}), original); - Expect.isTrue(wrapped.difference(copy).isEmpty); -} - -void testMutatingApisThrow() { - UnmodifiableSetView s = new UnmodifiableSetView({1, 2, 3}); - - Expect.throwsUnsupportedError(() { - s.add(3); - }, "add"); - - Expect.throwsUnsupportedError(() { - s.addAll({1, 2, 3}); - }, "addAll"); - - Expect.throwsUnsupportedError(() { - s.addAll({}); - }, "addAll empty"); - - Expect.throwsUnsupportedError(() { - s.remove(3); - }, "remove"); - - Expect.throwsUnsupportedError(() { - s.removeAll({1, 2, 3}); - }, "removeAll"); - - Expect.throwsUnsupportedError(() { - s.removeAll({}); - }, "removeAll empty"); - - Expect.throwsUnsupportedError(() { - s.retainAll({1, 2, 3}); - }, "retainAll"); - - Expect.throwsUnsupportedError(() { - s.retainAll({}); - }, "retainAll empty"); - - Expect.throwsUnsupportedError(() { - s.removeWhere((_) => true); - }, "removeWhere"); - - Expect.throwsUnsupportedError(() { - s.retainWhere((_) => false); - }, "retainWhere"); - - Expect.throwsUnsupportedError(() { - s.clear(); - }, "clear"); -} - -void testChangesInOriginalSetAreObservedInUnmodifiableView() { - Set original = {1, 2, 3}; - Set copy = {...original}; - UnmodifiableSetView wrapped = new UnmodifiableSetView(original); - - original.add(4); - Expect.setEquals(original, wrapped); - Expect.setEquals({4}, wrapped.difference(copy)); -} - -void testForeach(Set wrapped, Set original) { - var wrapCtr = 0; - var origCtr = 0; - - wrapped.forEach((x) { - wrapCtr += x; - }); - - original.forEach((x) { - origCtr += x; - }); - - Expect.equals(wrapCtr, origCtr); -} - -void testIterator(Set wrapped, Set original) { - Iterator wrapIter = wrapped.iterator; - Iterator origIter = original.iterator; - - while (origIter.moveNext()) { - Expect.isTrue(wrapIter.moveNext()); - Expect.equals(wrapIter.current, origIter.current); - } - - Expect.isFalse(wrapIter.moveNext()); -} diff --git a/tests/corelib_2/shuffle_test.dart b/tests/corelib_2/shuffle_test.dart deleted file mode 100644 index aaab68c7842..00000000000 --- a/tests/corelib_2/shuffle_test.dart +++ /dev/null @@ -1,129 +0,0 @@ -// 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 - -// Dart test for List.shuffle. -library shuffle_test; - -import "dart:typed_data"; -import "dart:math" show Random; -import "package:expect/expect.dart"; - -main() { - for (int size in [0, 1, 2, 3, 7, 15, 99, 1023]) { - var numbers = new List.generate(size, (x) => x); - testShuffle(numbers.toList(growable: true)); - testShuffle(numbers.toList(growable: false)); - testShuffle(new Uint32List(size)..setAll(0, numbers)); - testShuffle(new Int32List(size)..setAll(0, numbers)); - testShuffle(new Uint16List(size)..setAll(0, numbers)); - testShuffle(new Int16List(size)..setAll(0, numbers)); - // Some numbers will be truncated in the following two. - testShuffle(new Uint8List(size)..setAll(0, numbers)); - testShuffle(new Int8List(size)..setAll(0, numbers)); - //testShuffle(numbers.map((x) => "$x").toList()); - } - - // Check that it actually can keep the same list (regression test). - List l = [1, 2]; - success: - { - for (int i = 0; i < 266; i++) { - int first = l.first; - l.shuffle(); - if (l.first == first) break success; // List didn't change. - } - // Chance of changing 266 times in a row should be < 1:1e80. - Expect.fail("List changes every time."); - } - - testRandom(); -} - -void testShuffle(list) { - List copy = list.toList(); - list.shuffle(); - if (list.length < 2) { - Expect.listEquals(copy, list); - return; - } - // Test that the list after shuffling has the same elements as before, - // without considering order. - Map seen = {}; - for (var e in list) { - seen[e] = seen.putIfAbsent(e, () => 0) + 1; - } - for (var e in copy) { - int remaining = seen[e]; - remaining -= 1; // Throws if e was not in map at all. - if (remaining == 0) { - seen.remove(e); - } else { - seen[e] = remaining; - } - } - Expect.isTrue(seen.isEmpty); - // Test that shuffle actually does make a change. Repeat until the probability - // of a proper shuffling hitting the same list again is less than 10^80 - // (arbitrary bignum - approx. number of atoms in the universe). - // - // The probability of shuffling a list of length n into the same list is - // 1/n!. If one shuffle didn't change the list, repeat shuffling until - // probability of randomly hitting the same list every time is less than - // 1/1e80. - - bool listsDifferent() { - for (int i = 0; i < list.length; i++) { - if (list[i] != copy[i]) return true; - } - return false; - } - - if (list.length < 59) { - // 59! > 1e80. - double limit = 1e80; - double fact = 1.0; - for (int i = 2; i < list.length; i++) fact *= i; - double combos = fact; - - while (!listsDifferent() && combos < limit) { - list.shuffle(); - combos *= fact; - } - } - if (!listsDifferent()) { - Expect.fail("Didn't shuffle at all, p < 1:1e80: $list"); - } -} - -// Checks that the "random" argument to shuffle is used. -testRandom() { - List randomNums = [37, 87, 42, 157, 252, 17]; - List numbers = new List.generate(25, (x) => x); - List l1 = numbers.toList()..shuffle(new MockRandom(randomNums)); - for (int i = 0; i < 50; i++) { - // With same random sequence, we get the same shuffling each time. - List l2 = numbers.toList()..shuffle(new MockRandom(randomNums)); - Expect.listEquals(l1, l2); - } -} - -class MockRandom implements Random { - final List _values; - int index = 0; - MockRandom(this._values); - - int get _next { - int next = _values[index]; - index = (index + 1) % _values.length; - return next; - } - - int nextInt(int limit) => _next % limit; - - double nextDouble() => _next / 256.0; - - bool nextBool() => _next.isEven; -} diff --git a/tests/corelib_2/sort_helper.dart b/tests/corelib_2/sort_helper.dart deleted file mode 100644 index dcfaaeda956..00000000000 --- a/tests/corelib_2/sort_helper.dart +++ /dev/null @@ -1,157 +0,0 @@ -// 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 sort_helper; - -import "package:expect/expect.dart"; - -typedef Sorter = void Function(List); -typedef Comparer = int Function(num, num); - -class SortHelper { - SortHelper(this.sortFunction, this.compareFunction) {} - - void run() { - testSortIntLists(); - testSortDoubleLists(); - } - - bool isSorted(List a) { - for (int i = 1; i < a.length; i++) { - if (compareFunction(a[i - 1], a[i]) > 0) { - return false; - } - } - return true; - } - - void testSortIntLists() { - var a = new List.filled(40, null); - - for (int i = 0; i < a.length; i++) { - a[i] = i; - } - testSort(a); - - for (int i = 0; i < a.length; i++) { - a[a.length - i - 1] = i; - } - testSort(a); - - for (int i = 0; i < 21; i++) { - a[i] = 1; - } - for (int i = 21; i < a.length; i++) { - a[i] = 2; - } - testSort(a); - - // Same with bad pivot-choices. - for (int i = 0; i < 21; i++) { - a[i] = 1; - } - for (int i = 21; i < a.length; i++) { - a[i] = 2; - } - a[6] = 1; - a[13] = 1; - a[19] = 1; - a[25] = 1; - a[33] = 2; - testSort(a); - - for (int i = 0; i < 21; i++) { - a[i] = 2; - } - for (int i = 21; i < a.length; i++) { - a[i] = 1; - } - testSort(a); - - // Same with bad pivot-choices. - for (int i = 0; i < 21; i++) { - a[i] = 2; - } - for (int i = 21; i < a.length; i++) { - a[i] = 1; - } - a[6] = 2; - a[13] = 2; - a[19] = 2; - a[25] = 2; - a[33] = 1; - testSort(a); - - var a2 = new List.filled(0, null); - testSort(a2); - - var a3 = new List.filled(1, null); - a3[0] = 1; - testSort(a3); - - // -------- - // Test insertion sort. - testInsertionSort(0, 1, 2, 3); - testInsertionSort(0, 1, 3, 2); - testInsertionSort(0, 3, 2, 1); - testInsertionSort(0, 3, 1, 2); - testInsertionSort(0, 2, 1, 3); - testInsertionSort(0, 2, 3, 1); - testInsertionSort(1, 0, 2, 3); - testInsertionSort(1, 0, 3, 2); - testInsertionSort(1, 2, 3, 0); - testInsertionSort(1, 2, 0, 3); - testInsertionSort(1, 3, 2, 0); - testInsertionSort(1, 3, 0, 2); - testInsertionSort(2, 0, 1, 3); - testInsertionSort(2, 0, 3, 1); - testInsertionSort(2, 1, 3, 0); - testInsertionSort(2, 1, 0, 3); - testInsertionSort(2, 3, 1, 0); - testInsertionSort(2, 3, 0, 1); - testInsertionSort(3, 0, 1, 2); - testInsertionSort(3, 0, 2, 1); - testInsertionSort(3, 1, 2, 0); - testInsertionSort(3, 1, 0, 2); - testInsertionSort(3, 2, 1, 0); - testInsertionSort(3, 2, 0, 1); - } - - void testSort(List a) { - sortFunction(a); - Expect.isTrue(isSorted(a)); - } - - void testInsertionSort(int i1, int i2, int i3, int i4) { - var a = new List.filled(4, null); - a[0] = i1; - a[1] = i2; - a[2] = i3; - a[3] = i4; - testSort(a); - } - - void testSortDoubleLists() { - var a = new List.filled(40, null); - for (int i = 0; i < a.length; i++) { - a[i] = 1.0 * i + 0.5; - } - testSort(a); - - for (int i = 0; i < a.length; i++) { - a[i] = 1.0 * (a.length - i) + 0.5; - } - testSort(a); - - for (int i = 0; i < a.length; i++) { - a[i] = 1.5; - } - testSort(a); - } - - Sorter sortFunction; - Comparer compareFunction; -} diff --git a/tests/corelib_2/sort_test.dart b/tests/corelib_2/sort_test.dart deleted file mode 100644 index ddbb8104dcc..00000000000 --- a/tests/corelib_2/sort_test.dart +++ /dev/null @@ -1,315 +0,0 @@ -// 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 - -// Dart test for sort routines. -library sort_test; - -import "package:expect/expect.dart"; -import 'sort_helper.dart'; - -main() { - var compare = (num a, num b) => a.compareTo(b); - var sort = (List list) => list.sort(compare); - new SortHelper(sort, compare).run(); - - compare = (num a, num b) => -a.compareTo(b); - new SortHelper(sort, compare).run(); - - var intCompare = (int a, int b) => a.compareTo(b); - - // Pivot-candidate indices: 7, 15, 22, 29, 37 - // Test Dutch flag partitioning (candidates 2 and 4 are the same). - var list = [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 /**/, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1 /**/, - 1, - 1, - 1, - 1, - 1, - 1, - 1 /**/, - 1, - 1, - 1, - 1, - 1, - 1, - 1 /**/, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2 /**/, - 2, - 2, - 2, - 2, - 2, - 2, - 2 - ]; - list.sort(intCompare); - Expect.listEquals(list, [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2 - ]); - - list = [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1 /**/, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0 /**/, - 1, - 1, - 1, - 1, - 1, - 1, - 0 /**/, - 1, - 1, - 1, - 1, - 1, - 1, - 0 /**/, - 2 /**/, - 2, - 2, - 2, - 2, - 2, - 2, - 2 /**/, - 2, - 2, - 2, - 2, - 2, - 2, - 2 - ]; - list.sort(intCompare); - Expect.listEquals(list, [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2, - 2 - ]); - - // Pivots: 1 and 8. - // The second partition will be big (more than 2/3 of the list), and an - // optimization kicks in that removes the pivots from the partition. - list = [ - 0, - 9, - 0, - 9, - 3, - 9, - 0, - 1 /**/, - 1, - 0, - 1, - 9, - 8, - 2, - 1, - 1 /**/, - 4, - 5, - 2, - 5, - 0, - 1, - 8 /**/, - 8, - 8, - 5, - 2, - 2, - 9, - 8 /**/, - 8, - 4, - 4, - 1, - 5, - 3, - 2, - 8 /**/, - 5, - 1, - 2, - 8, - 5, - 6, - 8 - ]; - list.sort(intCompare); - Expect.listEquals(list, [ - 0, - 0, - 0, - 0, - 0, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 1, - 2, - 2, - 2, - 2, - 2, - 2, - 3, - 3, - 4, - 4, - 4, - 5, - 5, - 5, - 5, - 5, - 5, - 6, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 9, - 9, - 9, - 9, - 9 - ]); -} diff --git a/tests/corelib_2/splay_tree_from_iterable_test.dart b/tests/corelib_2/splay_tree_from_iterable_test.dart deleted file mode 100644 index 1207a5419a6..00000000000 --- a/tests/corelib_2/splay_tree_from_iterable_test.dart +++ /dev/null @@ -1,170 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; -import 'dart:collection'; - -main() { - defaultFunctionValuesTest(); - defaultKeyFunctionTest(); - defaultValueFunctionTest(); - noDefaultValuesTest(); - emptyIterableTest(); - equalElementsTest(); - genericTypeTest(); - typedTest(); -} - -void defaultFunctionValuesTest() { - var map = new SplayTreeMap.fromIterable([1, 2, 3]); - - Expect.isTrue(map is Map); - Expect.isTrue(map is SplayTreeMap); - Expect.isFalse(map is HashMap); - - Expect.equals(3, map.length); - Expect.equals(3, map.keys.length); - Expect.equals(3, map.values.length); - - Expect.equals(1, map[1]); - Expect.equals(2, map[2]); - Expect.equals(3, map[3]); -} - -void defaultKeyFunctionTest() { - var map = new SplayTreeMap.fromIterable([1, 2, 3], value: (x) => x + 1); - - Expect.isTrue(map is Map); - Expect.isTrue(map is SplayTreeMap); - Expect.isFalse(map is HashMap); - - Expect.equals(3, map.length); - Expect.equals(3, map.keys.length); - Expect.equals(3, map.values.length); - - Expect.equals(2, map[1]); - Expect.equals(3, map[2]); - Expect.equals(4, map[3]); -} - -void defaultValueFunctionTest() { - var map = new SplayTreeMap.fromIterable([1, 2, 3], key: (x) => x + 1); - - Expect.isTrue(map is Map); - Expect.isTrue(map is SplayTreeMap); - Expect.isFalse(map is HashMap); - - Expect.equals(3, map.length); - Expect.equals(3, map.keys.length); - Expect.equals(3, map.values.length); - - Expect.equals(1, map[2]); - Expect.equals(2, map[3]); - Expect.equals(3, map[4]); -} - -void noDefaultValuesTest() { - var map = new SplayTreeMap.fromIterable([1, 2, 3], - key: (x) => x + 1, value: (x) => x - 1); - - Expect.isTrue(map is Map); - Expect.isTrue(map is SplayTreeMap); - Expect.isFalse(map is HashMap); - - Expect.equals(3, map.length); - Expect.equals(3, map.keys.length); - Expect.equals(3, map.values.length); - - Expect.equals(0, map[2]); - Expect.equals(1, map[3]); - Expect.equals(2, map[4]); -} - -void emptyIterableTest() { - var map = new SplayTreeMap.fromIterable([]); - - Expect.isTrue(map is Map); - Expect.isTrue(map is SplayTreeMap); - Expect.isFalse(map is HashMap); - - Expect.equals(0, map.length); - Expect.equals(0, map.keys.length); - Expect.equals(0, map.values.length); -} - -void equalElementsTest() { - var map = new SplayTreeMap.fromIterable([1, 2, 2], key: (x) => x + 1); - - Expect.isTrue(map is Map); - Expect.isTrue(map is SplayTreeMap); - Expect.isFalse(map is HashMap); - - Expect.equals(2, map.length); - Expect.equals(2, map.keys.length); - Expect.equals(2, map.values.length); - - Expect.equals(1, map[2]); - Expect.equals(2, map[3]); -} - -void genericTypeTest() { - var map = - new SplayTreeMap.fromIterable([1, 2, 3], value: (x) => '$x'); - Expect.isTrue(map is Map); - Expect.isTrue(map is SplayTreeMap); - - // Make sure it is not just SplayTreeMap. - Expect.isFalse(map is SplayTreeMap); - Expect.isFalse(map is SplayTreeMap); -} - -typedef String objectToString(Object v); -typedef bool objectToBool(Object v); - -// Test in checked mode with explicitly given types. -void typedTest() { - // Assign functions to typed function variables. - objectToString key = (v) => "$v"; - objectToBool value = (v) => (v as int).isOdd; - Function id = (int i) => i; - - Expect.throws(() { - new SplayTreeMap.fromIterable([1, 2, 3], key: key - // No "value" map, defaults to identity, which returns int, not bool. - ); - }); - - Expect.throws(() { - new SplayTreeMap.fromIterable([1, 2, 3], - // No "key" map, defaults to identity, which returns int, not String. - value: value); - }); - - Expect.throws(() { - new SplayTreeMap.fromIterable([1, 2, 3], - key: id as dynamic, // wrong type. - value: value); - }); - - Expect.throws(() { - new SplayTreeMap.fromIterable([1, 2, 3], - key: key, value: id as dynamic // wrong type. - ); - }); - - // But it works with explicit types when used correctly. - SplayTreeMap map = new SplayTreeMap.fromIterable( - [1, 2, 3], - key: key, value: value); - Iterable keys = map.keys; - Iterable values = map.values; - List keyList = keys.toList(); - List valueList = values.toList(); - Expect.equals(3, keyList.length); - Expect.equals(3, valueList.length); - Expect.equals(keys.first, map.firstKey()); - Expect.equals(keys.last, map.lastKey()); -} diff --git a/tests/corelib_2/splay_tree_from_iterables_test.dart b/tests/corelib_2/splay_tree_from_iterables_test.dart deleted file mode 100644 index 4e8b63e4db1..00000000000 --- a/tests/corelib_2/splay_tree_from_iterables_test.dart +++ /dev/null @@ -1,87 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; -import 'dart:collection'; - -main() { - positiveTest(); - emptyMapTest(); - fewerKeysIterableTest(); - fewerValuesIterableTest(); - equalElementsTest(); - genericTypeTest(); -} - -void positiveTest() { - var map = new SplayTreeMap.fromIterables([1, 2, 3], ["one", "two", "three"]); - - Expect.isTrue(map is Map); - Expect.isTrue(map is SplayTreeMap); - Expect.isFalse(map is HashMap); - - Expect.equals(3, map.length); - Expect.equals(3, map.keys.length); - Expect.equals(3, map.values.length); - - Expect.equals("one", map[1]); - Expect.equals("two", map[2]); - Expect.equals("three", map[3]); -} - -void emptyMapTest() { - var map = new SplayTreeMap.fromIterables([], []); - - Expect.isTrue(map is Map); - Expect.isTrue(map is SplayTreeMap); - Expect.isFalse(map is HashMap); - - Expect.equals(0, map.length); - Expect.equals(0, map.keys.length); - Expect.equals(0, map.values.length); -} - -void fewerValuesIterableTest() { - Expect.throws(() => new SplayTreeMap.fromIterables([1, 2], [0])); -} - -void fewerKeysIterableTest() { - Expect.throws(() => new SplayTreeMap.fromIterables([1], [0, 2])); -} - -void equalElementsTest() { - var map = new SplayTreeMap.fromIterables([1, 2, 2], ["one", "two", "three"]); - - Expect.isTrue(map is Map); - Expect.isTrue(map is SplayTreeMap); - Expect.isFalse(map is HashMap); - - Expect.equals(2, map.length); - Expect.equals(2, map.keys.length); - Expect.equals(2, map.values.length); - - Expect.equals("one", map[1]); - Expect.equals("three", map[2]); -} - -void genericTypeTest() { - var map = new SplayTreeMap.fromIterables( - [1, 2, 3], ["one", "two", "three"]); - Expect.isTrue(map is Map); - Expect.isTrue(map is SplayTreeMap); - - // Make sure it is not just SplayTreeMap. - Expect.isFalse(map is SplayTreeMap); - Expect.isFalse(map is SplayTreeMap); - - Expect.equals(3, map.length); - Expect.equals(3, map.keys.length); - Expect.equals(3, map.values.length); - - Expect.equals("one", map[1]); - Expect.equals("two", map[2]); - Expect.equals("three", map[3]); -} diff --git a/tests/corelib_2/splay_tree_test.dart b/tests/corelib_2/splay_tree_test.dart deleted file mode 100644 index 2f7107417d1..00000000000 --- a/tests/corelib_2/splay_tree_test.dart +++ /dev/null @@ -1,197 +0,0 @@ -// 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 - -// Dart test for Splaytrees. -library splay_tree_test; - -import "package:expect/expect.dart"; -import 'dart:collection'; - -main() { - // Simple tests. - SplayTreeMap tree = new SplayTreeMap(); - tree[1] = "first"; - tree[3] = "third"; - tree[5] = "fifth"; - tree[2] = "second"; - tree[4] = "fourth"; - - var correctSolution = ["first", "second", "third", "fourth", "fifth"]; - - tree.forEach((key, value) { - Expect.equals(true, key >= 1); - Expect.equals(true, key <= 5); - Expect.equals(value, correctSolution[key - 1]); - }); - - for (var v in ["first", "second", "third", "fourth", "fifth"]) { - Expect.isTrue(tree.containsValue(v)); - } - Expect.isFalse(tree.containsValue("sixth")); - - tree[7] = "seventh"; - - Expect.equals(1, tree.firstKey()); - Expect.equals(7, tree.lastKey()); - - Expect.equals(2, tree.lastKeyBefore(3)); - Expect.equals(4, tree.firstKeyAfter(3)); - - Expect.equals(null, tree.lastKeyBefore(1)); - Expect.equals(2, tree.firstKeyAfter(1)); - - Expect.equals(4, tree.lastKeyBefore(5)); - Expect.equals(7, tree.firstKeyAfter(5)); - - Expect.equals(5, tree.lastKeyBefore(7)); - Expect.equals(null, tree.firstKeyAfter(7)); - - Expect.equals(5, tree.lastKeyBefore(6)); - Expect.equals(7, tree.firstKeyAfter(6)); - - testSetFrom(); - regressRemoveWhere(); - regressRemoveWhere2(); - regressFromCompare(); - regressIncomparable(); -} - -void regressRemoveWhere() { - // Regression test. Fix in https://codereview.chromium.org/148523006/ - var t = new SplayTreeSet(); - t.addAll([1, 3, 5, 7, 2, 4, 6, 8, 0]); - var seen = new List.filled(9, false); - t.removeWhere((x) { - // Called only once per element. - Expect.isFalse(seen[x], "seen $x"); - seen[x] = true; - return x.isOdd; - }); -} - -void regressRemoveWhere2() { - // Regression test for http://dartbug.com/18676 - // Removing all elements with removeWhere causes error. - - var t = new SplayTreeSet(); - t.addAll([1, 2, 3, 4, 5]); - t.removeWhere((_) => true); // Should not throw. - Expect.isTrue(t.isEmpty); - t.addAll([1, 2, 3, 4, 5]); - t.retainWhere((_) => false); // Should not throw. - Expect.isTrue(t.isEmpty); -} - -void testSetFrom() { - var set1 = new SplayTreeSet()..addAll([1, 2, 3, 4, 5]); - var set2 = new SplayTreeSet.from(set1); - Expect.equals(5, set2.length); - for (int i = 1; i <= 5; i++) { - Expect.isTrue(set2.contains(i)); - } - - set1 = new SplayTreeSet()..addAll([0, 1, 2.4, 3.14, 5]); - set2 = new SplayTreeSet.from(set1.where((x) => x is int)); - Expect.equals(3, set2.length); -} - -void regressFromCompare() { - // Regression test for http://dartbug.com/23387. - // The compare and isValidKey arguments to SplayTreeMap.from were ignored. - - int compare(a, b) { - if (a is IncomparableKey && b is IncomparableKey) { - return b.id - a.id; - } - throw "isValidKey failure"; - } - - bool isValidKey(o) => o is IncomparableKey; - IncomparableKey key(int n) => new IncomparableKey(n); - - var entries = {key(0): 0, key(1): 1, key(2): 2, key(0): 0}; - Expect.equals(4, entries.length); - var map = - new SplayTreeMap.from(entries, compare, isValidKey); - Expect.equals(3, map.length); - for (int i = 0; i < 3; i++) { - Expect.isTrue(map.containsKey(key(i))); - Expect.equals(i, map[key(i)]); - } - Expect.isFalse(map.containsKey(key(5))); - Expect.isFalse(map.containsKey(1)); - Expect.isFalse(map.containsKey("string")); - Expect.equals(null, map[key(5)]); - Expect.equals(null, map[1]); - Expect.equals(null, map["string"]); - map[1] = 42; //# 01: compile-time error - map["string"] = 42; //# 02: compile-time error - map[key(5)] = 42; - Expect.equals(4, map.length); - Expect.equals(42, map[key(5)]); -} - -// Incomparable keys throw when added, even on an empty collection. -void regressIncomparable() { - var set = SplayTreeSet(); - Expect.throws(() => set.add(IncomparableKey(0))); - Expect.throws(() => set.lookup(IncomparableKey(0))); - set.add(1); - Expect.throws(() => set.add(IncomparableKey(0))); - Expect.throws(() => set.lookup(IncomparableKey(0))); - - var map = SplayTreeMap(); - Expect.throws(() => map[IncomparableKey(0)] = 0); - Expect.throws(() => map.putIfAbsent(IncomparableKey(0), () => 0)); - map[1] = 1; - Expect.throws(() => map[IncomparableKey(0)] = 0); - Expect.throws(() => map.putIfAbsent(IncomparableKey(0), () => 0)); - - // But not if the compare function allows them. - // This now includes `null`. - int compare(Object o1, Object o2) { - if (o1 == null) return o2 == null ? 0 : -1; - if (o2 == null) return 1; - if (o1 is IncomparableKey && o2 is IncomparableKey) { - return o1.id - o2.id; - } - throw UnsupportedError("Nope"); - } - for (var key in [null, IncomparableKey(0)]) { - set = SplayTreeSet(compare); - set.add(key); - Expect.equals(1, set.length); - set.clear(); - Expect.isNull(set.lookup(key)); - set.clear(); - set.add(IncomparableKey(1)); - set.add(key); - Expect.identical(key, set.first); - Expect.identical(key, set.lookup(key)); - - map = SplayTreeMap(compare); - map[key] = 0; - Expect.isTrue(map.containsKey(key)); - map.clear(); - map.putIfAbsent(key, () => 0); - Expect.isTrue(map.containsKey(key)); - map.clear(); - map[IncomparableKey(1)] = 0; - map[key] = 0; - Expect.isTrue(map.containsKey(key)); - map.remove(key); - Expect.isFalse(map.containsKey(key)); - map.putIfAbsent(key, () => 0); - Expect.isTrue(map.containsKey(key)); - map.remove(key); - Expect.isFalse(map.containsKey(key)); - } -} - -class IncomparableKey { - final int id; - IncomparableKey(this.id); -} diff --git a/tests/corelib_2/stacktrace_current_test.dart b/tests/corelib_2/stacktrace_current_test.dart deleted file mode 100644 index bbf697bc59d..00000000000 --- a/tests/corelib_2/stacktrace_current_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:convert" show LineSplitter; - -import "package:expect/expect.dart"; - -void main() { - var st0; - var st1; - // Primitive way to get stack trace,. - try { - throw 0; - } catch (_, s) { - st0 = s; - } - st1 = StackTrace.current; - - var st0s = findMain(st0); - var st1s = findMain(st1); - // Stack traces are not equal (contains at least a different line number, - // and possible different frame numbers). - // They are *similar*, so check that they agree on everything but numbers. - var digits = new RegExp(r"\d+"); - Expect.equals(st0s.replaceAll(digits, "0"), st1s.replaceAll(digits, "0")); -} - -String findMain(StackTrace stack) { - var string = "$stack"; - var lines = LineSplitter.split(string).toList(); - while (lines.isNotEmpty && !lines.first.contains("main")) { - lines.removeAt(0); - } - return lines.join("\n"); -} diff --git a/tests/corelib_2/stacktrace_fromstring_test.dart b/tests/corelib_2/stacktrace_fromstring_test.dart deleted file mode 100644 index c5f4653f27e..00000000000 --- a/tests/corelib_2/stacktrace_fromstring_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; -import "dart:async"; - -void main() { - StackTrace stack; - try { - throw 0; - } catch (e, s) { - stack = s; - } - var string = "$stack"; - StackTrace stringTrace = new StackTrace.fromString(string); - Expect.isTrue(stringTrace is StackTrace); - Expect.equals(stack.toString(), stringTrace.toString()); - - string = "some random string, nothing like a StackTrace"; - stringTrace = new StackTrace.fromString(string); - Expect.isTrue(stringTrace is StackTrace); - Expect.equals(string, stringTrace.toString()); - - // Use stacktrace asynchronously. - asyncStart(); - var c = new Completer(); - c.completeError(0, stringTrace); - c.future.then((v) { - throw "Unexpected value: $v"; - }, onError: (e, s) { - Expect.equals(string, s.toString()); - }).then((_) { - var c = new StreamController(); - c.stream.listen((v) { - throw "Unexpected value: $v"; - }, onError: (e, s) { - Expect.equals(string, s.toString()); - asyncEnd(); - }); - c.addError(0, stringTrace); - c.close(); - }); -} diff --git a/tests/corelib_2/stopwatch2_test.dart b/tests/corelib_2/stopwatch2_test.dart deleted file mode 100644 index e66604b0cda..00000000000 --- a/tests/corelib_2/stopwatch2_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2013, 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 - -// Dart test program for elapsed getters in stopwatch support. - -import "package:expect/expect.dart"; - -main() { - Stopwatch sw = new Stopwatch()..start(); - while (sw.elapsedMilliseconds < 2) { - /* do nothing. */ - } - sw.stop(); - Expect.equals(sw.elapsedMicroseconds, sw.elapsed.inMicroseconds); - Expect.equals(sw.elapsedMilliseconds, sw.elapsed.inMilliseconds); -} diff --git a/tests/corelib_2/stopwatch_test.dart b/tests/corelib_2/stopwatch_test.dart deleted file mode 100644 index dfdeb0ca601..00000000000 --- a/tests/corelib_2/stopwatch_test.dart +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) 2012, 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 - -// Dart test program for testing stopwatch support. - -library stopwatch_test; - -import "package:expect/expect.dart"; - -class StopwatchTest { - static bool checkTicking(Stopwatch sw) { - Expect.isFalse(sw.isRunning); - sw.start(); - Expect.isTrue(sw.isRunning); - for (int i = 0; i < 1000000; i++) { - int.parse(i.toString()); - if (sw.elapsedTicks > 0) { - break; - } - } - return sw.elapsedTicks > 0; - } - - static bool checkStopping(Stopwatch sw) { - sw.stop(); - Expect.isFalse(sw.isRunning); - int v1 = sw.elapsedTicks; - Expect.isTrue(v1 > 0); // Expect a non-zero elapsed time. - Stopwatch sw2 = new Stopwatch(); // Used for verification. - sw2.start(); - Expect.isTrue(sw2.isRunning); - int sw2LastElapsed = 0; - for (int i = 0; i < 100000; i++) { - int.parse(i.toString()); - int v2 = sw.elapsedTicks; - if (v1 != v2) { - return false; - } - // If sw2 elapsed twice then sw must have advanced too if it wasn't - // stopped. - if (sw2LastElapsed > 0 && sw2.elapsedTicks > sw2LastElapsed) { - break; - } - sw2LastElapsed = sw2.elapsedTicks; - } - // The test only makes sense if measureable time elapsed and elapsed time - // on the stopped Stopwatch did not increase. - Expect.isTrue(sw2.elapsedTicks > 0); - return true; - } - - static checkRestart() { - Stopwatch sw = new Stopwatch(); - Expect.isFalse(sw.isRunning); - sw.start(); - Expect.isTrue(sw.isRunning); - for (int i = 0; i < 100000; i++) { - int.parse(i.toString()); - if (sw.elapsedTicks > 0) { - break; - } - } - sw.stop(); - Expect.isFalse(sw.isRunning); - int initial = sw.elapsedTicks; - sw.start(); - Expect.isTrue(sw.isRunning); - for (int i = 0; i < 100000; i++) { - int.parse(i.toString()); - if (sw.elapsedTicks > initial) { - break; - } - } - sw.stop(); - Expect.isFalse(sw.isRunning); - Expect.isTrue(sw.elapsedTicks > initial); - } - - static checkReset() { - Stopwatch sw = new Stopwatch(); - Expect.isFalse(sw.isRunning); - sw.start(); - Expect.isTrue(sw.isRunning); - for (int i = 0; i < 100000; i++) { - int.parse(i.toString()); - if (sw.elapsedTicks > 0) { - break; - } - } - sw.stop(); - Expect.isFalse(sw.isRunning); - sw.reset(); - Expect.isFalse(sw.isRunning); - Expect.equals(0, sw.elapsedTicks); - sw.start(); - Expect.isTrue(sw.isRunning); - for (int i = 0; i < 100000; i++) { - int.parse(i.toString()); - if (sw.elapsedTicks > 0) { - break; - } - } - sw.reset(); - Expect.isTrue(sw.isRunning); - for (int i = 0; i < 100000; i++) { - int.parse(i.toString()); - if (sw.elapsedTicks > 0) { - break; - } - } - sw.stop(); - Expect.isFalse(sw.isRunning); - Expect.isTrue(sw.elapsedTicks > 0); - } - - static testMain() { - Stopwatch sw = new Stopwatch(); - Expect.isTrue(checkTicking(sw)); - Expect.isTrue(checkStopping(sw)); - checkRestart(); - checkReset(); - } -} - -main() { - StopwatchTest.testMain(); -} diff --git a/tests/corelib_2/string_base_vm_static_test.dart b/tests/corelib_2/string_base_vm_static_test.dart deleted file mode 100644 index 283f4749f74..00000000000 --- a/tests/corelib_2/string_base_vm_static_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2017, 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 test program for testing class 'StringBase' (currently VM specific). - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -void main() { - String s4 = new String.fromCharCodes([0.0]); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE - // [cfe] A value of type 'double' can't be assigned to a variable of type 'int'. -} diff --git a/tests/corelib_2/string_base_vm_test.dart b/tests/corelib_2/string_base_vm_test.dart deleted file mode 100644 index 0b3d8879656..00000000000 --- a/tests/corelib_2/string_base_vm_test.dart +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing class 'StringBase' (currently VM specific). - -// @dart = 2.9 - -library string_base_test; - -import "package:expect/expect.dart"; - -class StringBaseTest { - StringBaseTest() {} - - toString() { - return "StringBase Tester"; - } - - static testInterpolation() { - var answer = 40 + 2; - var s = "The answer is $answer."; - Expect.equals("The answer is 42.", s); - - int numBottles = 33; - String wall = "wall"; - s = "${numBottles*3} bottles of beer on the $wall."; - Expect.equals("99 bottles of beer on the wall.", s); - } - - static testCreation() { - String s = "Hello"; - List a = new List.filled(s.length, null); - List ga = []; - bool exception_caught = false; - for (int i = 0; i < a.length; i++) { - a[i] = s.codeUnitAt(i); - ga.add(s.codeUnitAt(i)); - } - try { - String s4 = new String.fromCharCodes([-1]); - } on ArgumentError catch (ex) { - exception_caught = true; - } - Expect.equals(true, exception_caught); - } - - static testSubstring() { - String s = "Hello World"; - Expect.equals("World", s.substring(6, s.length)); - Expect.equals("", s.substring(8, 8)); - bool exception_caught = false; - try { - s.substring(5, 12); - } on RangeError catch (ex) { - exception_caught = true; - } - Expect.equals(true, exception_caught); - exception_caught = false; - try { - s.substring(5, 4); - } on RangeError catch (ex) { - exception_caught = true; - } - Expect.equals(true, exception_caught); - } - - static void testMain() { - testInterpolation(); - testCreation(); - testSubstring(); - } -} - -main() { - StringBaseTest.testMain(); -} diff --git a/tests/corelib_2/string_buffer_test.dart b/tests/corelib_2/string_buffer_test.dart deleted file mode 100644 index d5b6781c800..00000000000 --- a/tests/corelib_2/string_buffer_test.dart +++ /dev/null @@ -1,241 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// TODO(srdjan): Move StringBuffer to visible names. - -void testConstructor() { - StringBuffer bf = new StringBuffer(""); - testBufferLength(0, bf); - - bf = new StringBuffer("abc"); - testBufferLength(3, bf); - Expect.equals("abc", bf.toString()); - - bf = new StringBuffer("\x00"); -} - -void testWrite() { - StringBuffer bf = new StringBuffer(""); - Expect.equals(true, bf.isEmpty); - - bf.write("a"); - testBufferLength(1, bf); - Expect.equals("a", bf.toString()); - - bf = new StringBuffer(""); - bf.write("a"); - bf.write("b"); - Expect.equals("ab", bf.toString()); - - bf = new StringBuffer("abc"); - bf.write("d"); - bf.write("e"); - bf.write("f"); - bf.write("g"); - bf.write("h"); - bf.write("i"); - bf.write("j"); - bf.write("k"); - bf.write("l"); - bf.write("m"); - bf.write("n"); - bf.write("o"); - bf.write("p"); - bf.write("q"); - bf.write("r"); - bf.write("s"); - bf.write("t"); - bf.write("u"); - bf.write("v"); - bf.write("w"); - bf.write("x"); - bf.write("y"); - bf.write("z"); - bf.write("\n"); - bf.write("thequickbrownfoxjumpsoverthelazydog"); - Expect.equals( - "abcdefghijklmnopqrstuvwxyz\n" - "thequickbrownfoxjumpsoverthelazydog", - bf.toString()); - - bf = new StringBuffer(""); - for (int i = 0; i < 100000; i++) { - bf.write(''); - bf.write(""); - } - Expect.equals("", bf.toString()); -} - -void testLength() { - StringBuffer bf = new StringBuffer(""); - testBufferLength(0, bf); - bf.write("foo"); - testBufferLength(3, bf); - bf.write("bar"); - testBufferLength(6, bf); - bf.write(""); - testBufferLength(6, bf); -} - -void testIsEmpty() { - StringBuffer bf = new StringBuffer(""); - Expect.equals(true, bf.isEmpty); - bf.write("foo"); - Expect.equals(false, bf.isEmpty); -} - -void testWriteAll() { - StringBuffer bf = new StringBuffer(""); - bf.writeAll(["foo", "bar", "a", "b", "c"]); - Expect.equals("foobarabc", bf.toString()); - - bf.writeAll([]); - Expect.equals("foobarabc", bf.toString()); - - bf.writeAll(["", "", ""]); - Expect.equals("foobarabc", bf.toString()); - - bf.writeAll(["", "", ""], ""); - Expect.equals("foobarabc", bf.toString()); - - StringBuffer bf2 = new StringBuffer(""); - bf2.writeAll([], "s"); - Expect.equals("", bf2.toString()); - - StringBuffer bf3 = new StringBuffer(""); - bf3.writeAll(["a"], "s"); - Expect.equals("a", bf3.toString()); - - StringBuffer bf4 = new StringBuffer(""); - bf4.writeAll(["a", "b"], "s"); - Expect.equals("asb", bf4.toString()); -} - -void testWriteAll2() { - // Passing `null` for separator is an error that is checked when the iterable - // is not empty. This is not specified in the documentation but we want - // implementations to be consistent. - StringBuffer bf1 = new StringBuffer(""); - bf1.writeAll([], null); - Expect.equals("", bf1.toString()); - - StringBuffer bf2 = new StringBuffer(""); - Expect.throws(() { - bf2.writeAll([1], null); - }); -} - -void testWriteln() { - StringBuffer bf1 = new StringBuffer(""); - bf1.writeln("Hello"); - Expect.equals("Hello\n", bf1.toString()); - - StringBuffer bf2 = new StringBuffer(""); - bf2.writeln(); - Expect.equals("\n", bf2.toString()); - - StringBuffer bf3 = new StringBuffer(""); - bf3.writeln("\n"); - bf3.writeln(null); - bf3.writeln(1); - Expect.equals("\n\nnull\n1\n", bf3.toString()); -} - -void testClear() { - StringBuffer bf = new StringBuffer(""); - bf.write("foo"); - bf.clear(); - Expect.equals("", bf.toString()); - testBufferLength(0, bf); - - bf.write("bar"); - Expect.equals("bar", bf.toString()); - testBufferLength(3, bf); - bf.clear(); - Expect.equals("", bf.toString()); - testBufferLength(0, bf); -} - -void testToString() { - StringBuffer bf = new StringBuffer(""); - Expect.equals("", bf.toString()); - - bf = new StringBuffer("foo"); - Expect.equals("foo", bf.toString()); - - bf = new StringBuffer("foo"); - bf.write("bar"); - Expect.equals("foobar", bf.toString()); -} - -void testChaining() { - StringBuffer bf = new StringBuffer(""); - StringBuffer bf2 = new StringBuffer(""); - bf2.write("bf2"); - bf..write("foo")..write("bar")..write(bf2)..write(bf2)..write("toto"); - Expect.equals("foobarbf2bf2toto", bf.toString()); -} - -void testWriteCharCode() { - StringBuffer bf1 = new StringBuffer(); - StringBuffer bf2 = new StringBuffer(); - bf1.write("a"); - bf2.writeCharCode(0x61); // a - bf1.write("b"); - bf2.writeCharCode(0x62); // b - bf1.write("c"); - bf2.writeCharCode(0x63); // c - bf1.write(new String.fromCharCode(0xD823)); - bf2.writeCharCode(0xD823); - bf1.write(new String.fromCharCode(0xDC23)); - bf2.writeCharCode(0xDC23); - bf1.write("\u{1d49e}"); - bf2.writeCharCode(0x1d49e); - bf1.write("\x00"); - bf2.writeCharCode(0); - Expect.equals(bf1.toString(), bf2.toString()); - Expect.equals("abc\u{18c23}\u{1d49e}\x00", bf2.toString()); - - // Mixing strings and char-codes. - bf1.clear(); - bf1.write("abcde"); - bf1.writeCharCode(0x61); - bf1.writeCharCode(0x62); - bf1.writeCharCode(0x63); - bf1.write("d"); - bf1.writeCharCode(0x65); - Expect.equals("abcdeabcde", bf1.toString()); - - // Out-of-range character codes are not allowed. - Expect.throws(() { - bf2.writeCharCode(-1); - }); - Expect.throws(() { - bf2.writeCharCode(0x110000); - }); -} - -void testBufferLength(int length, StringBuffer bf) { - Expect.equals(length, bf.length); - (length == 0 ? Expect.isTrue : Expect.isFalse)(bf.isEmpty); - (length != 0 ? Expect.isTrue : Expect.isFalse)(bf.isNotEmpty); -} - -void main() { - testToString(); - testConstructor(); - testLength(); - testIsEmpty(); - testWrite(); - testWriteCharCode(); - testWriteAll(); - testWriteAll2(); - testWriteln(); - testClear(); - testChaining(); -} diff --git a/tests/corelib_2/string_case_test.dart b/tests/corelib_2/string_case_test.dart deleted file mode 100644 index 35cd9b87435..00000000000 --- a/tests/corelib_2/string_case_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -main() { - testLowerUpper(); - testSpecialCases(); -} - -void testLowerUpper() { - var a = "Stop! Smell the Roses."; - var allLower = "stop! smell the roses."; - var allUpper = "STOP! SMELL THE ROSES."; - Expect.equals(allUpper, a.toUpperCase()); - Expect.equals(allLower, a.toLowerCase()); -} - -void testSpecialCases() { - // Letters in Latin-1 where the upper case is not in Latin-1. - - // German sharp s. Upper case variant is "SS". - Expect.equals("SS", "\xdf".toUpperCase()); // //# 01: ok - Expect.equals("\xdf", "\xdf".toLowerCase()); - Expect.equals("ss", "\xdf".toUpperCase().toLowerCase()); // //# 01: continued - // Micro sign (not same as lower-case Greek letter mu, U+03BC). - Expect.equals("\u039c", "\xb5".toUpperCase()); // //# 02: ok - Expect.equals("\xb5", "\xb5".toLowerCase()); - Expect.equals("\u03Bc", // //# 02: continued - "\xb5".toUpperCase().toLowerCase()); // //# 02: continued - // Small letter y diaeresis. - Expect.equals("\u0178", "\xff".toUpperCase()); // //# 03: ok - Expect.equals("\xff", "\xff".toLowerCase()); - Expect.equals("\xff", "\xff".toUpperCase().toLowerCase()); // //# 03: continued - // Zero. - Expect.equals("\x00", "\x00".toLowerCase()); - Expect.equals("\x00", "\x00".toUpperCase()); - - // Test all combinations of ordering of lower-case, upper-case and - // special-when-upper-cased characters. - Expect.equals("AA\u0178", "Aa\xff".toUpperCase()); // //# 03: continued - Expect.equals("AA\u0178", "aA\xff".toUpperCase()); // //# 03: continued - Expect.equals("A\u0178A", "A\xffa".toUpperCase()); // //# 03: continued - Expect.equals("A\u0178A", "a\xffA".toUpperCase()); // //# 03: continued - Expect.equals("\u0178AA", "\xffAa".toUpperCase()); // //# 03: continued - Expect.equals("\u0178AA", "\xffaA".toUpperCase()); // //# 03: continued - - Expect.equals("aa\xff", "Aa\xff".toLowerCase()); - Expect.equals("aa\xff", "aA\xff".toLowerCase()); - Expect.equals("a\xffa", "A\xffa".toLowerCase()); - Expect.equals("a\xffa", "a\xffA".toLowerCase()); - Expect.equals("\xffaa", "\xffAa".toLowerCase()); - Expect.equals("\xffaa", "\xffaA".toLowerCase()); -} diff --git a/tests/corelib_2/string_codeunits_test.dart b/tests/corelib_2/string_codeunits_test.dart deleted file mode 100644 index 074ca909c66..00000000000 --- a/tests/corelib_2/string_codeunits_test.dart +++ /dev/null @@ -1,80 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -main() { - test(String s) { - List units = s.codeUnits; - List expectedUnits = []; - for (int i = 0; i < s.length; i++) { - expectedUnits.add(s.codeUnitAt(i)); - } - - Expect.equals(s.length, units.length); - for (int i = 0; i < s.length; i++) { - Expect.equals(s.codeUnitAt(i), units.elementAt(i)); - } - - // for-in - var res = []; - for (int unit in units) { - res.add(unit); - } - Expect.listEquals(expectedUnits, res); - - // .map - Expect.listEquals(expectedUnits.map((x) => x.toRadixString(16)).toList(), - units.map((x) => x.toRadixString(16)).toList()); - - if (s == "") { - Expect.throwsStateError(() => units.first); - Expect.throwsStateError(() => units.last); - Expect.throwsRangeError(() => units[0]); - Expect.throwsUnsupportedError(() => units[0] = 499); - Expect.listEquals([], units.sublist(0, 0)); - Expect.equals(-1, units.indexOf(42)); - Expect.equals(-1, units.lastIndexOf(499)); - } else { - Expect.equals(s.codeUnitAt(0), units.first); - Expect.equals(s.codeUnitAt(s.length - 1), units.last); - Expect.equals(s.codeUnitAt(0), units[0]); - Expect.throwsUnsupportedError(() => units[0] = 499); - List sub = units.sublist(1); - Expect.listEquals(s.substring(1, s.length).codeUnits, sub); - Expect.equals(-1, units.indexOf(-1)); - Expect.equals(0, units.indexOf(units[0])); - Expect.equals(-1, units.lastIndexOf(-1)); - Expect.equals( - units.length - 1, units.lastIndexOf(units[units.length - 1])); - } - - Iterable reversed = units.reversed; - int i = units.length - 1; - for (int codeUnit in reversed) { - Expect.equals(units[i--], codeUnit); - } - } - - test(""); - test("abc"); - test("\x00\u0000\u{000000}"); - test("\u{ffff}\u{10000}\u{10ffff}"); - String string = new String.fromCharCodes( - [0xdc00, 0xd800, 61, 0xd9ab, 0xd9ab, 0xddef, 0xddef, 62, 0xdc00, 0xd800]); - test(string); - string = "\x00\x7f\xff\u0100\ufeff\uffef\uffff" - "\u{10000}\u{12345}\u{1d800}\u{1dc00}\u{1ffef}\u{1ffff}"; - test(string); - - // Reading each unit of a surrogate pair works. - var r = "\u{10000}".codeUnits; - var it = r.iterator; - Expect.isTrue(it.moveNext()); - Expect.equals(0xD800, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(0xDC00, it.current); -} diff --git a/tests/corelib_2/string_from_environment2_test.dart b/tests/corelib_2/string_from_environment2_test.dart deleted file mode 100644 index 6a7b5914c57..00000000000 --- a/tests/corelib_2/string_from_environment2_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2013, 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. -// SharedOptions=-Da=a -Da=bb -Db=bb -Dc=ccc -Da=ccc -Db=ccc - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - Expect.equals('ccc', const String.fromEnvironment('a')); - Expect.equals('ccc', const String.fromEnvironment('b')); - Expect.equals('ccc', const String.fromEnvironment('c')); -} diff --git a/tests/corelib_2/string_from_environment3_test.dart b/tests/corelib_2/string_from_environment3_test.dart deleted file mode 100644 index 2d10f32e07c..00000000000 --- a/tests/corelib_2/string_from_environment3_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2013, 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() { - const String.fromEnvironment('NOT_FOUND', defaultValue: 1); // //# 01: compile-time error - const String.fromEnvironment('NOT_FOUND', defaultValue: true); // //# 02: compile-time error - const String.fromEnvironment(null); // //# 03: compile-time error - const String.fromEnvironment(1); // //# 04: compile-time error - const String.fromEnvironment([]); // //# 05: compile-time error -} diff --git a/tests/corelib_2/string_from_environment_test.dart b/tests/corelib_2/string_from_environment_test.dart deleted file mode 100644 index b55f9b00856..00000000000 --- a/tests/corelib_2/string_from_environment_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2013, 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. -// SharedOptions=-Da=a -Db=bb -Dc=ccc -Dd= --define=e=eeee - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - Expect.equals('a', const String.fromEnvironment('a')); - Expect.equals('bb', const String.fromEnvironment('b')); - Expect.equals('ccc', const String.fromEnvironment('c')); - Expect.equals('', const String.fromEnvironment('d')); - Expect.equals('eeee', const String.fromEnvironment('e')); -} diff --git a/tests/corelib_2/string_from_list_test.dart b/tests/corelib_2/string_from_list_test.dart deleted file mode 100644 index d7aa89727bc..00000000000 --- a/tests/corelib_2/string_from_list_test.dart +++ /dev/null @@ -1,84 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -void main() { - Expect.equals("", new String.fromCharCodes([])); - Expect.equals("", new String.fromCharCodes(const [])); - Expect.equals("AB", new String.fromCharCodes([65, 66])); - Expect.equals("AB", new String.fromCharCodes(const [65, 66])); - Expect.equals("Ærø", new String.fromCharCodes(const [0xc6, 0x72, 0xf8])); - Expect.equals("\u{1234}", new String.fromCharCodes([0x1234])); - Expect.equals("\u{12345}*", new String.fromCharCodes([0x12345, 42])); - { - var a = []; - a.add(65); - a.add(66); - Expect.equals("AB", new String.fromCharCodes(a)); - } - - // Long list (bug 6919). - for (int len in [499, 500, 501, 999, 100000]) { - List list = new List.filled(len, null); - for (int i = 0; i < len; i++) { - list[i] = 65 + (i % 26); - } - for (int i = len - 9; i < len; i++) { - list[i] = 48 + (len - i); - } - // We should not throw a stack overflow here. - String long = new String.fromCharCodes(list); - // Minimal sanity checking on the string. - Expect.isTrue(long.startsWith('ABCDE')); - Expect.isTrue(long.endsWith('987654321')); - int middle = len ~/ 2; - middle -= middle % 26; - Expect.equals('XYZABC', long.substring(middle - 3, middle + 3)); - Expect.equals(len, long.length); - } - - // Should work with iterables and non-default-lists (http://dartbug.com/8922) - Expect.equals("CBA", new String.fromCharCodes([65, 66, 67].reversed)); - Expect.equals( - "BCD", new String.fromCharCodes([65, 66, 67].map((x) => x + 1))); - Expect.equals( - "AC", new String.fromCharCodes([0x41, 0x42, 0x43].where((x) => x.isOdd))); - Expect.equals( - "CE", - new String.fromCharCodes( - [0x41, 0x42, 0x43].where((x) => x.isOdd).map((x) => x + 2))); - Expect.equals( - "ABC", new String.fromCharCodes(new Iterable.generate(3, (x) => 65 + x))); - Expect.equals("ABC", new String.fromCharCodes("ABC".codeUnits)); - Expect.equals( - "BCD", new String.fromCharCodes("ABC".codeUnits.map((x) => x + 1))); - Expect.equals("BCD", new String.fromCharCodes("ABC".runes.map((x) => x + 1))); - - var nonBmpCharCodes = [0, 0xD812, 0xDC34, 0x14834, 0xDC34, 0xD812]; - var nonBmp = new String.fromCharCodes(nonBmpCharCodes); - Expect.equals(7, nonBmp.length); - Expect.equals(0, nonBmp.codeUnitAt(0)); - Expect.equals(0xD812, nonBmp.codeUnitAt(1)); // Separated surrogate pair - Expect.equals(0xDC34, nonBmp.codeUnitAt(2)); - Expect.equals(0xD812, nonBmp.codeUnitAt(3)); // Single non-BMP code point. - Expect.equals(0xDC34, nonBmp.codeUnitAt(4)); - Expect.equals(0xDC34, nonBmp.codeUnitAt(5)); // Unmatched surrogate. - Expect.equals(0xD812, nonBmp.codeUnitAt(6)); // Unmatched surrogate. - - var reversedNonBmp = new String.fromCharCodes(nonBmpCharCodes.reversed); - Expect.equals(7, reversedNonBmp.length); - Expect.equals(0, reversedNonBmp.codeUnitAt(6)); - Expect.equals(0xD812, reversedNonBmp.codeUnitAt(5)); - Expect.equals(0xDC34, reversedNonBmp.codeUnitAt(4)); - Expect.equals(0xDC34, reversedNonBmp.codeUnitAt(3)); - Expect.equals(0xD812, reversedNonBmp.codeUnitAt(2)); - Expect.equals(0xDC34, reversedNonBmp.codeUnitAt(1)); - Expect.equals(0xD812, reversedNonBmp.codeUnitAt(0)); - - Expect.equals(nonBmp, new String.fromCharCodes(nonBmp.codeUnits)); - Expect.equals(nonBmp, new String.fromCharCodes(nonBmp.runes)); -} diff --git a/tests/corelib_2/string_fromcharcode_test.dart b/tests/corelib_2/string_fromcharcode_test.dart deleted file mode 100644 index 92176242730..00000000000 --- a/tests/corelib_2/string_fromcharcode_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - Expect.equals("A", new String.fromCharCode(65)); - Expect.equals("B", new String.fromCharCode(66)); - var gClef = new String.fromCharCode(0x1D11E); - Expect.equals(2, gClef.length); - Expect.equals(0xD834, gClef.codeUnitAt(0)); - Expect.equals(0xDD1E, gClef.codeUnitAt(1)); - - // Unmatched surrogates. - var unmatched = new String.fromCharCode(0xD800); - Expect.equals(1, unmatched.length); - Expect.equals(0xD800, unmatched.codeUnitAt(0)); - unmatched = new String.fromCharCode(0xDC00); - Expect.equals(1, unmatched.length); - Expect.equals(0xDC00, unmatched.codeUnitAt(0)); - - Expect.throwsArgumentError(() => new String.fromCharCode(-1)); - - // Invalid code point. - Expect.throwsArgumentError(() => new String.fromCharCode(0x110000)); - Expect.throwsArgumentError(() => new String.fromCharCode(0x110001)); -} diff --git a/tests/corelib_2/string_fromcharcodes_test.dart b/tests/corelib_2/string_fromcharcodes_test.dart deleted file mode 100644 index a93a11762e1..00000000000 --- a/tests/corelib_2/string_fromcharcodes_test.dart +++ /dev/null @@ -1,301 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; -import "dart:typed_data"; - -main() { - iter(count, [values]) => values is List - ? new Iterable.generate(count, (x) => values[x]) - : new Iterable.generate(count, (x) => values); - test(expect, iter, [start = 0, end]) { - var actual = new String.fromCharCodes(iter, start, end); - Expect.equals(expect, actual); - } - - testThrows(iterable, [start = 0, end]) { - Expect.throws(() { - new String.fromCharCodes(iterable, start, end); - }); - } - - test("", iter(0)); - test("", []); - test("", const []); - test("", new List.filled(0, null)); - test("", new Uint8List(0)); - test("", new Uint16List(0)); - test("", new Uint32List(0)); - test("", "".codeUnits); - - test("\x00", iter(1, 0)); - test("\x00", [0]); - test("\x00", const [0]); - test("\x00", new List.filled(1, null)..[0] = 0); - test("\x00", new Uint8List(1)); - test("\x00", new Uint16List(1)); - test("\x00", new Uint32List(1)); - test("\x00", "\x00".codeUnits); - - test("\xff", iter(1, 255)); - test("\xFF", [255]); - test("\xFF", const [255]); - test("\xFF", new List.filled(1, null)..[0] = 255); - test("\xFF", new Uint8List(1)..[0] = 255); - test("\xFF", new Uint16List(1)..[0] = 255); - test("\xFF", new Uint32List(1)..[0] = 255); - test("\xFF", "\xFF".codeUnits); - - test("\u0100", iter(1, 256)); - test("\u0100", [256]); - test("\u0100", const [256]); - test("\u0100", new List.filled(1, null)..[0] = 256); - test("\u0100", new Uint16List(1)..[0] = 256); - test("\u0100", new Uint32List(1)..[0] = 256); - test("\u0100", "\u0100".codeUnits); - - test("\uffff", iter(1, 65535)); - test("\uffff", [65535]); - test("\uffff", const [65535]); - test("\uffff", new List.filled(1, null)..[0] = 65535); - test("\uffff", new Uint16List(1)..[0] = 65535); - test("\uffff", new Uint32List(1)..[0] = 65535); - test("\uffff", "\uffff".codeUnits); - - test("\u{10000}", iter(1, 65536)); - test("\u{10000}", [65536]); - test("\u{10000}", const [65536]); - test("\u{10000}", new List.filled(1, null)..[0] = 65536); - test("\u{10000}", new Uint32List(1)..[0] = 65536); - test("\u{10000}", "\u{10000}".codeUnits); - - test("\u{10FFFF}", iter(1, 0x10FFFF)); - test("\u{10FFFF}", [0x10FFFF]); - test("\u{10FFFF}", const [0x10FFFF]); - test("\u{10FFFF}", new List.filled(1, null)..[0] = 0x10FFFF); - test("\u{10FFFF}", new Uint32List(1)..[0] = 0x10FFFF); - - test("\u{10ffff}", iter(2, [0xDBFF, 0xDFFF])); - test("\u{10ffff}", [0xDBFF, 0xDFFF]); - test("\u{10ffff}", const [0xDBFF, 0xDFFF]); - test( - "\u{10ffff}", - new List.filled(2, null) - ..[0] = 0xDBFF - ..[1] = 0xDFFF); - test( - "\u{10ffff}", - new Uint16List(2) - ..[0] = 0xDBFF - ..[1] = 0xDFFF); - test( - "\u{10ffff}", - new Uint32List(2) - ..[0] = 0xDBFF - ..[1] = 0xDFFF); - test("\u{10FFFF}", "\u{10FFFF}".codeUnits); - - var leadSurrogate = "\u{10ffff}"[0]; - test(leadSurrogate, iter(1, 0xDBFF)); - test(leadSurrogate, [0xDBFF]); - test(leadSurrogate, const [0xDBFF]); - test(leadSurrogate, new List.filled(1, null)..[0] = 0xDBFF); - test(leadSurrogate, new Uint16List(1)..[0] = 0xDBFF); - test(leadSurrogate, new Uint32List(1)..[0] = 0xDBFF); - test(leadSurrogate, leadSurrogate.codeUnits); - - var tailSurrogate = "\u{10ffff}"[1]; - test(tailSurrogate, iter(1, 0xDFFF)); - test(tailSurrogate, [0xDFFF]); - test(tailSurrogate, const [0xDFFF]); - test(tailSurrogate, new List.filled(1, null)..[0] = 0xDFFF); - test(tailSurrogate, new Uint16List(1)..[0] = 0xDFFF); - test(tailSurrogate, new Uint32List(1)..[0] = 0xDFFF); - test(tailSurrogate, tailSurrogate.codeUnits); - - testThrows(null); - testThrows("not an iterable"); - testThrows(42); - testThrows([-1]); - testThrows(new List.filled(1, null)..[0] = -1); - testThrows(const [-1]); - testThrows(new Int8List(1)..[0] = -1); - testThrows(new Int16List(1)..[0] = -1); - testThrows(new Int32List(1)..[0] = -1); - testThrows([0x110000]); - testThrows(new List.filled(1, null)..[0] = 0x110000); - testThrows(const [0x110000]); - testThrows(new Int32List(1)..[0] = 0x110000); - - // Check start/end - var list = const [0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48]; - for (var iterable in [ - iter(list.length, list), - list.toList(growable: true), - list.toList(growable: false), - list, - new Uint8List(8)..setRange(0, 8, list), - new Uint16List(8)..setRange(0, 8, list), - new Uint32List(8)..setRange(0, 8, list), - "ABCDEFGH".codeUnits, - ]) { - test("ABCDEFGH", iterable); - // start provided, end is null. - test("ABCDEFGH", iterable, 0); - test("BCDEFGH", iterable, 1); - test("H", iterable, 7); - test("", iterable, 8); - test("", iterable, 10); - // start = 0, end provided. - test("ABCDEFGH", iterable, 0); - test("A", iterable, 0, 1); - test("AB", iterable, 0, 2); - test("ABCDEFG", iterable, 0, 7); - test("ABCDEFGH", iterable, 0, 8); - test("ABCDEFGH", iterable, 0, 10); - test("", iterable, 0, 0); - // Both provided and start > 0. - test("GH", iterable, 6, 8); - test("GH", iterable, 6, 10); - test("DE", iterable, 3, 5); - test("", iterable, 8, 10); - test("", iterable, 10, 12); - test("", iterable, 3, 3); - } - // Can split surrogates in input, but not a single big code point. - test(leadSurrogate, [0xDBFF, 0xDFFF], 0, 1); - test(tailSurrogate, [0xDBFF, 0xDFFF], 1); - test("\u{10FFFF}", [0x10FFFF], 0, 1); - - void testThrowsRange(iterable, [start = 0, end]) { - Expect.throwsRangeError( - () => new String.fromCharCodes(iterable, start, end)); - } - - // Test varying slices of the code units of a string. - testSubstring(string) { - var codes = string.codeUnits; - int length = string.length; - for (var iterable in [ - iter(length, codes), - codes.toList(growable: true), - codes.toList(growable: false), - new Uint16List(length)..setRange(0, length, codes), - new Int32List(length)..setRange(0, length, codes), - new Uint32List(length)..setRange(0, length, codes), - codes, - ]) { - var newString = new String.fromCharCodes(iterable); - Expect.equals(string, newString); - for (int i = 0; i < length; i = i * 2 + 1) { - test(string.substring(i), iterable, i); - test(string.substring(0, i), iterable, 0, i); - for (int j = 0; i + j < length; j = j * 2 + 1) { - test(string.substring(i, i + j), iterable, i, i + j); - } - } - - testThrowsRange(iterable, -1); - testThrowsRange(iterable, 0, -1); - testThrowsRange(iterable, 2, 1); - - // Positions after end are acceptable. - test(string, iterable, 0, length + 1); - test(string.substring(string.length ~/ 2), iterable, string.length ~/ 2, - length + 1); - test("", iterable, length + 1); - test("", iterable, length + 1, length + 2); - } - } - - testSubstring(""); - testSubstring("ABCDEFGH"); - // length > 128 - testSubstring("ABCDEFGH" * 33); - testSubstring("\x00" * 357); - // length > 128 and non-ASCII. - testSubstring("\uFFFD\uFFFE\u{10000}\u{10ffff}c\x00" * 37); - - // Large List. - var megaList = ("abcde" * 200000).codeUnits.toList(); - test("abcde" * 199998, megaList, 5, 999995); - // Large Uint8List. - test("abcde" * 199998, new Uint8List.fromList(megaList), 5, 999995); - - const cLatin1 = const [0x00, 0xff]; - const cUtf16 = const [0x00, 0xffff, 0xdfff, 0xdbff, 0xdfff, 0xdbff]; - const cCodepoints = const [0x00, 0xffff, 0xdfff, 0x10ffff, 0xdbff]; - List gLatin1 = cLatin1.toList(growable: true); - List gUtf16 = cUtf16.toList(growable: true); - List gCodepoints = cCodepoints.toList(growable: true); - List fLatin1 = cLatin1.toList(growable: false); - List fUtf16 = cUtf16.toList(growable: false); - List fCodepoints = cCodepoints.toList(growable: false); - Uint8List bLatin1 = new Uint8List(2)..setRange(0, 2, cLatin1); - Uint16List wLatin1 = new Uint16List(2)..setRange(0, 2, cLatin1); - Uint16List wUtf16 = new Uint16List(6)..setRange(0, 6, cUtf16); - Uint32List lLatin1 = new Uint32List(2)..setRange(0, 2, cLatin1); - Uint32List lUtf16 = new Uint32List(6)..setRange(0, 6, cUtf16); - Uint32List lCodepoints = new Uint32List(5)..setRange(0, 5, cCodepoints); - Uint8List bvLatin1 = new Uint8List.view(bLatin1.buffer); - Uint16List wvLatin1 = new Uint16List.view(wLatin1.buffer); - Uint16List wvUtf16 = new Uint16List.view(wUtf16.buffer); - Uint32List lvLatin1 = new Uint32List.view(lLatin1.buffer); - Uint32List lvUtf16 = new Uint32List.view(lUtf16.buffer); - Uint32List lvCodepoints = new Uint32List.view(lCodepoints.buffer); - var buffer = new Uint8List(200).buffer; - Uint8List bbLatin1 = new Uint8List.view(buffer, 3, 2)..setAll(0, bLatin1); - Uint16List wbLatin1 = new Uint16List.view(buffer, 8, 2)..setAll(0, wLatin1); - Uint16List wbUtf16 = new Uint16List.view(buffer, 16, 6)..setAll(0, wUtf16); - Uint32List lbLatin1 = new Uint32List.view(buffer, 32, 2)..setAll(0, lLatin1); - Uint32List lbUtf16 = new Uint32List.view(buffer, 64, 6)..setAll(0, lUtf16); - Uint32List lbCodepoints = new Uint32List.view(buffer, 128, 5) - ..setAll(0, lCodepoints); - - String sLatin1 = "\x00\xff"; - String sUnicode = - "\x00\uffff$tailSurrogate$leadSurrogate$tailSurrogate$leadSurrogate"; - for (int i = 0; i < 2; i++) { - for (int j = i + 1; j < 2; j++) { - test(sLatin1.substring(i, j), cLatin1, i, j); - test(sLatin1.substring(i, j), gLatin1, i, j); - test(sLatin1.substring(i, j), fLatin1, i, j); - test(sLatin1.substring(i, j), bLatin1, i, j); - test(sLatin1.substring(i, j), wLatin1, i, j); - test(sLatin1.substring(i, j), lLatin1, i, j); - test(sLatin1.substring(i, j), bvLatin1, i, j); - test(sLatin1.substring(i, j), wvLatin1, i, j); - test(sLatin1.substring(i, j), lvLatin1, i, j); - test(sLatin1.substring(i, j), bbLatin1, i, j); - test(sLatin1.substring(i, j), wbLatin1, i, j); - test(sLatin1.substring(i, j), lbLatin1, i, j); - } - } - for (int i = 0; i < 6; i++) { - for (int j = i + 1; j < 6; j++) { - test(sUnicode.substring(i, j), cUtf16, i, j); - test(sUnicode.substring(i, j), gUtf16, i, j); - test(sUnicode.substring(i, j), fUtf16, i, j); - test(sUnicode.substring(i, j), wUtf16, i, j); - test(sUnicode.substring(i, j), lUtf16, i, j); - test(sUnicode.substring(i, j), wvUtf16, i, j); - test(sUnicode.substring(i, j), lvUtf16, i, j); - test(sUnicode.substring(i, j), wbUtf16, i, j); - test(sUnicode.substring(i, j), lbUtf16, i, j); - } - } - for (int i = 0; i < 5; i++) { - for (int j = i + 1; j < 5; j++) { - int stringEnd = j < 4 ? j : j + 1; - test(sUnicode.substring(i, stringEnd), cCodepoints, i, j); - test(sUnicode.substring(i, stringEnd), gCodepoints, i, j); - test(sUnicode.substring(i, stringEnd), fCodepoints, i, j); - test(sUnicode.substring(i, stringEnd), lCodepoints, i, j); - test(sUnicode.substring(i, stringEnd), lvCodepoints, i, j); - test(sUnicode.substring(i, stringEnd), lbCodepoints, i, j); - } - } -} diff --git a/tests/corelib_2/string_interpolation_error_test.dart b/tests/corelib_2/string_interpolation_error_test.dart deleted file mode 100644 index b9764e60efb..00000000000 --- a/tests/corelib_2/string_interpolation_error_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2021, 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 - -import "package:expect/expect.dart"; - -class BadToString { - @override - String toString() => null; -} - -void test(expected, object) { - var message = ''; - if (expected == null) { - Expect.throws(() => '$object', - (error) => '$error'.contains("toString method returned 'null'")); - } else { - Expect.equals(expected, '$object'); - } -} - -void main() { - test("123", 123); - test("null", null); - test(null, BadToString()); - test(null, [BadToString()]); - test(null, {BadToString()}); -} diff --git a/tests/corelib_2/string_operations_with_null_test.dart b/tests/corelib_2/string_operations_with_null_test.dart deleted file mode 100644 index 66ab5754057..00000000000 --- a/tests/corelib_2/string_operations_with_null_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -returnStringOrNull() { - return new DateTime.now().millisecondsSinceEpoch == 0 ? 'foo' : null; -} - -main() { - Expect.throwsArgumentError(() => 'foo' + returnStringOrNull()); - Expect.throws(() => 'foo'.split(returnStringOrNull()), - (e) => e is ArgumentError || e is NoSuchMethodError); -} diff --git a/tests/corelib_2/string_operator_multiply_test.dart b/tests/corelib_2/string_operator_multiply_test.dart deleted file mode 100644 index 0dc20f89ae8..00000000000 --- a/tests/corelib_2/string_operator_multiply_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2022, 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 "package:expect/expect.dart"; - -main() { - Expect.equals('', 'a' * -11); - Expect.equals('', 'α' * -11); - Expect.equals('', '∀' * -11); - - Expect.equals('', 'a' * 0); - Expect.equals('', 'α' * 0); - Expect.equals('', '∀' * 0); - - Expect.equals('a', 'a' * 1); - Expect.equals('α', 'α' * 1); - Expect.equals('∀', '∀' * 1); - - Expect.equals('aa', 'a' * 2); - Expect.equals('αα', 'α' * 2); - Expect.equals('∀∀', '∀' * 2); - - Expect.equals('aaa', 'a' * 3); - Expect.equals('ααα', 'α' * 3); - Expect.equals('∀∀∀', '∀' * 3); - - Expect.equals('', '' * 0x4000000000000000); - - Expect.throws(() => 'a' * 0x4000000000000000); - Expect.throws(() => 'α' * 0x4000000000000000); - Expect.throws(() => '∀' * 0x4000000000000000); - - for (final string in ['a', 'α', '∀', 'hello world', 'abc', 'α∀α']) { - for (final count in [0, 1, 10, 100, 255, 256, 257, 1000, 100000]) { - final expected = List.filled(count, string).join(); - final actual = string * count; - Expect.equals(expected, actual); - } - } - - // http://dartbug.com/49289 - Expect.throws(() => 'abcd' * 0x4000000000000000); - Expect.throws(() => 'αxyz' * 0x4000000000000000); - Expect.throws(() => '∀pqr' * 0x4000000000000000); - - Expect.throws(() => 'abcd' * (0x4000000000000000 + 1)); - Expect.throws(() => 'αxyz' * (0x4000000000000000 + 1)); - Expect.throws(() => '∀pqr' * (0x4000000000000000 + 1)); -} diff --git a/tests/corelib_2/string_pattern_test.dart b/tests/corelib_2/string_pattern_test.dart deleted file mode 100644 index 35d34ee7e8a..00000000000 --- a/tests/corelib_2/string_pattern_test.dart +++ /dev/null @@ -1,113 +0,0 @@ -// 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 test for testing String.allMatches. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -String str = "this is a string with hello here and hello there"; - -main() { - testNoMatch(); - testOneMatch(); - testTwoMatches(); - testEmptyPattern(); - testEmptyString(); - testEmptyPatternAndString(); - testMatchAsPrefix(); - testAllMatchesStart(); -} - -testNoMatch() { - // Also tests that RegExp groups don't work. - String helloPattern = "with (hello)"; - Iterable matches = helloPattern.allMatches(str); - Expect.isFalse(matches.iterator.moveNext()); -} - -testOneMatch() { - String helloPattern = "with hello"; - Iterable matches = helloPattern.allMatches(str); - var iterator = matches.iterator; - Expect.isTrue(iterator.moveNext()); - Match match = iterator.current; - Expect.isFalse(iterator.moveNext()); - Expect.equals(str.indexOf('with', 0), match.start); - Expect.equals(str.indexOf('with', 0) + helloPattern.length, match.end); - Expect.equals(helloPattern, match.pattern); - Expect.equals(str, match.input); - Expect.equals(helloPattern, match[0]); - Expect.equals(0, match.groupCount); -} - -testTwoMatches() { - String helloPattern = "hello"; - Iterable matches = helloPattern.allMatches(str); - - int count = 0; - int start = 0; - for (var match in matches) { - count++; - Expect.equals(str.indexOf('hello', start), match.start); - Expect.equals(str.indexOf('hello', start) + helloPattern.length, match.end); - Expect.equals(helloPattern, match.pattern); - Expect.equals(str, match.input); - Expect.equals(helloPattern, match[0]); - Expect.equals(0, match.groupCount); - start = match.end; - } - Expect.equals(2, count); -} - -testEmptyPattern() { - String pattern = ""; - Iterable matches = pattern.allMatches(str); - Expect.isTrue(matches.iterator.moveNext()); -} - -testEmptyString() { - String pattern = "foo"; - String str = ""; - Iterable matches = pattern.allMatches(str); - Expect.isFalse(matches.iterator.moveNext()); -} - -testEmptyPatternAndString() { - String pattern = ""; - String str = ""; - Iterable matches = pattern.allMatches(str); - Expect.isTrue(matches.iterator.moveNext()); -} - -testMatchAsPrefix() { - String pattern = "an"; - String str = "banana"; - Expect.isNull(pattern.matchAsPrefix(str)); - Expect.isNull(pattern.matchAsPrefix(str, 0)); - var m = pattern.matchAsPrefix(str, 1); - Expect.equals("an", m[0]); - Expect.equals(1, m.start); - Expect.isNull(pattern.matchAsPrefix(str, 2)); - m = pattern.matchAsPrefix(str, 3); - Expect.equals("an", m[0]); - Expect.equals(3, m.start); - Expect.isNull(pattern.matchAsPrefix(str, 4)); - Expect.isNull(pattern.matchAsPrefix(str, 5)); - Expect.isNull(pattern.matchAsPrefix(str, 6)); - Expect.throws(() => pattern.matchAsPrefix(str, -1)); - Expect.throws(() => pattern.matchAsPrefix(str, 7)); -} - -testAllMatchesStart() { - String p = "ass"; - String s = "assassin"; - Expect.equals(2, p.allMatches(s).length); - Expect.equals(2, p.allMatches(s, 0).length); - Expect.equals(1, p.allMatches(s, 1).length); - Expect.equals(0, p.allMatches(s, 4).length); - Expect.equals(0, p.allMatches(s, s.length).length); - Expect.throws(() => p.allMatches(s, -1)); - Expect.throws(() => p.allMatches(s, s.length + 1)); -} diff --git a/tests/corelib_2/string_replace_all_2_test.dart b/tests/corelib_2/string_replace_all_2_test.dart deleted file mode 100644 index 77dc24306c2..00000000000 --- a/tests/corelib_2/string_replace_all_2_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2012, 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. -// -// dart2jsOptions=-Ddart2js.testing.String.replaceAll.force.regexp=true - -// @dart = 2.9 - -import "string_replace_all_test.dart" as base; - -main() { - base.main(); -} diff --git a/tests/corelib_2/string_replace_all_common.dart b/tests/corelib_2/string_replace_all_common.dart deleted file mode 100644 index d4deff12e56..00000000000 --- a/tests/corelib_2/string_replace_all_common.dart +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -testAll(Pattern Function(Pattern) wrap) { - testReplaceAll(wrap); - testReplaceAllMapped(wrap); - testSplitMapJoin(wrap); -} - -testReplaceAll(Pattern Function(Pattern) wrap) { - Expect.equals("aXXcaXXdae", "abcabdae".replaceAll(wrap("b"), "XX")); - - // Test with the replaced string at the beginning. - Expect.equals("XXbcXXbdXXe", "abcabdae".replaceAll(wrap("a"), "XX")); - - // Test with the replaced string at the end. - Expect.equals("abcabdaXX", "abcabdae".replaceAll(wrap("e"), "XX")); - - // Test when there are no occurrence of the string to replace. - Expect.equals("abcabdae", "abcabdae".replaceAll(wrap("f"), "XX")); - - // Test when the string to change is the empty string. - Expect.equals("", "".replaceAll(wrap("from"), "to")); - - // Test when the string to change is a substring of the string to - // replace. - Expect.equals("fro", "fro".replaceAll(wrap("from"), "to")); - - // Test when the string to change is the replaced string. - Expect.equals("to", "from".replaceAll(wrap("from"), "to")); - - // Test when matches are adjacent - Expect.equals("toto", "fromfrom".replaceAll(wrap("from"), "to")); - - // Test when the string to change is the replacement string. - Expect.equals("to", "to".replaceAll(wrap("from"), "to")); - - // Test replacing by the empty string. - Expect.equals("bcbde", "abcabdae".replaceAll(wrap("a"), "")); - Expect.equals("AB", "AfromB".replaceAll(wrap("from"), "")); - - // Test changing the empty string. - Expect.equals("to", "".replaceAll(wrap(""), "to")); - - // Test replacing the empty string. - Expect.equals("toAtoBtoCto", "ABC".replaceAll(wrap(""), "to")); - - // Pattern strings containing RegExp metacharacters - these are not - // interpreted as RegExps. - Expect.equals(r"$$", "||".replaceAll(wrap("|"), r"$")); - Expect.equals(r"$$$$", "||".replaceAll(wrap("|"), r"$$")); - Expect.equals(r"x$|x", "x|.|x".replaceAll(wrap("|."), r"$")); - Expect.equals(r"$$", "..".replaceAll(wrap("."), r"$")); - Expect.equals(r"[$$$$]", "[..]".replaceAll(wrap("."), r"$$")); - Expect.equals(r"[$]", "[..]".replaceAll(wrap(".."), r"$")); - Expect.equals(r"$$", r"\\".replaceAll(wrap(r"\"), r"$")); -} - -testReplaceAllMapped(Pattern Function(Pattern) wrap) { - String mark(Match m) => "[${m[0]}]"; - Expect.equals("a[b]ca[b]dae", "abcabdae".replaceAllMapped(wrap("b"), mark)); - - // Test with the replaced string at the beginning. - Expect.equals("[a]bc[a]bd[a]e", "abcabdae".replaceAllMapped(wrap("a"), mark)); - - // Test with the replaced string at the end. - Expect.equals("abcabda[e]", "abcabdae".replaceAllMapped(wrap("e"), mark)); - - // Test when there are no occurrence of the string to replace. - Expect.equals("abcabdae", "abcabdae".replaceAllMapped(wrap("f"), mark)); - - // Test when the string to change is the empty string. - Expect.equals("", "".replaceAllMapped(wrap("from"), mark)); - - // Test when the string to change is a substring of the string to - // replace. - Expect.equals("fro", "fro".replaceAllMapped(wrap("from"), mark)); - - // Test when matches are adjacent - Expect.equals( - "[from][from]", "fromfrom".replaceAllMapped(wrap("from"), mark)); - - // Test replacing by the empty string. - Expect.equals("bcbde", "abcabdae".replaceAllMapped(wrap("a"), (m) => "")); - Expect.equals("AB", "AfromB".replaceAllMapped(wrap("from"), (m) => "")); - - // Test changing the empty string. - Expect.equals("[]", "".replaceAllMapped(wrap(""), mark)); - - // Test replacing the empty string. - Expect.equals("[]A[]B[]C[]", "ABC".replaceAllMapped(wrap(""), mark)); -} - -testSplitMapJoin(Pattern Function(Pattern) wrap) { - String mark(Match m) => "[${m[0]}]"; - String rest(String s) => "<${s}>"; - - Expect.equals("[b][b]", - "abcabdae".splitMapJoin(wrap("b"), onMatch: mark, onNonMatch: rest)); - - // Test with the replaced string at the beginning. - Expect.equals("<>[a][a][a]", - "abcabdae".splitMapJoin(wrap("a"), onMatch: mark, onNonMatch: rest)); - - // Test with the replaced string at the end. - Expect.equals("[e]<>", - "abcabdae".splitMapJoin(wrap("e"), onMatch: mark, onNonMatch: rest)); - - // Test when there are no occurrence of the string to replace. - Expect.equals("", - "abcabdae".splitMapJoin(wrap("f"), onMatch: mark, onNonMatch: rest)); - - // Test when the string to change is the empty string. - Expect.equals( - "<>", "".splitMapJoin(wrap("from"), onMatch: mark, onNonMatch: rest)); - - // Test when the string to change is a substring of the string to - // replace. - Expect.equals("", - "fro".splitMapJoin(wrap("from"), onMatch: mark, onNonMatch: rest)); - - // Test when matches are adjacent - Expect.equals("<>[from]<>[from]<>", - "fromfrom".splitMapJoin(wrap("from"), onMatch: mark, onNonMatch: rest)); - - // Test changing the empty string. - Expect.equals( - "<>[]<>", "".splitMapJoin(wrap(""), onMatch: mark, onNonMatch: rest)); - - // Test replacing the empty string. - Expect.equals("<>[][][][]<>", - "ABC".splitMapJoin(wrap(""), onMatch: mark, onNonMatch: rest)); - - // Test with only onMatch. - Expect.equals( - "[a]bc[a]bd[a]e", "abcabdae".splitMapJoin(wrap("a"), onMatch: mark)); - - // Test with only onNonMatch - Expect.equals( - "<>aaa", "abcabdae".splitMapJoin(wrap("a"), onNonMatch: rest)); -} diff --git a/tests/corelib_2/string_replace_all_pattern_test.dart b/tests/corelib_2/string_replace_all_pattern_test.dart deleted file mode 100644 index 10827c9a02b..00000000000 --- a/tests/corelib_2/string_replace_all_pattern_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2021, 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 - -import "string_replace_all_common.dart"; - -main() { - testAll(Wrapper.wrap); -} - -/// A wrapper that is not recognizable as a String or RegExp. -class Wrapper implements Pattern { - final Pattern _pattern; - Wrapper(this._pattern); - - static Pattern wrap(Pattern p) => Wrapper(p); - - Iterable allMatches(String string, [int start = 0]) => - _pattern.allMatches(string, start); - - Match matchAsPrefix(String string, [int start = 0]) => - _pattern.matchAsPrefix(string, start); - - String toString() => "Wrap($_pattern)"; -} diff --git a/tests/corelib_2/string_replace_all_test.dart b/tests/corelib_2/string_replace_all_test.dart deleted file mode 100644 index 9d43fb7eefd..00000000000 --- a/tests/corelib_2/string_replace_all_test.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2022, 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 - -import "string_replace_all_common.dart"; - -main() { - testAll((pattern) => pattern); // unwrapped -} diff --git a/tests/corelib_2/string_replace_dollar_test.dart b/tests/corelib_2/string_replace_dollar_test.dart deleted file mode 100644 index 7ab46916a97..00000000000 --- a/tests/corelib_2/string_replace_dollar_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - String jsText = r"""'$' -"""; - String htmlStr = '%%DART'; - String htmlOut = htmlStr.replaceAll("%%DART", jsText); - Expect.equals(jsText, htmlOut); - htmlOut = htmlStr.replaceFirst("%%DART", jsText); - Expect.equals(jsText, htmlOut); - htmlOut = htmlStr.replaceAll(new RegExp("%%DART"), jsText); - Expect.equals(jsText, htmlOut); - htmlOut = htmlStr.replaceFirst(new RegExp("%%DART"), jsText); - Expect.equals(jsText, htmlOut); - - // Regression test, http://dartbug.com/17886 - String doubleDollar = r"$'$`"; - var string = r"flip-flip-flop"; - var result = string.replaceFirst("flip", doubleDollar); - Expect.equals(r"$'$`-flip-flop", result); - result = string.replaceAll("flip", doubleDollar); - Expect.equals(r"$'$`-$'$`-flop", result); -} diff --git a/tests/corelib_2/string_replace_static_test.dart b/tests/corelib_2/string_replace_static_test.dart deleted file mode 100644 index 28c91d1bdf4..00000000000 --- a/tests/corelib_2/string_replace_static_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -void main() { - // Test object startIndex - "hello".replaceFirst("h", "X", new Object()); - // ^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CAST_NEW_EXPR - // ^ - // [cfe] The constructor returns type 'Object' that isn't of expected type 'int'. - - // Test object startIndex - "hello".replaceFirstMapped("h", (_) => "X", new Object()); - // ^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CAST_NEW_EXPR - // ^ - // [cfe] The constructor returns type 'Object' that isn't of expected type 'int'. - - "foo-bar".replaceFirstMapped("bar", (v) { - return 42; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE_FROM_CLOSURE - // [cfe] A value of type 'int' can't be assigned to a variable of type 'String'. - }); - - "hello".replaceRange(0, 0, 42); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'int' can't be assigned to the parameter type 'String'. - "hello".replaceRange(0, 0, ["x"]); - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'List' can't be assigned to the parameter type 'String'. -} - -// Fails to return a String on toString, throws if converted by "$naughty". -class Naughty { - toString() => this; - // ^^^^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'Naughty' can't be assigned to a variable of type 'String'. -} diff --git a/tests/corelib_2/string_replace_test.dart b/tests/corelib_2/string_replace_test.dart deleted file mode 100644 index 4a7bad94bcd..00000000000 --- a/tests/corelib_2/string_replace_test.dart +++ /dev/null @@ -1,201 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -main() { - // Test replaceFirst. - Expect.equals("AtoBtoCDtoE", "AfromBtoCDtoE".replaceFirst("from", "to")); - - // Test with the replaced string at the beginning. - Expect.equals("toABtoCDtoE", "fromABtoCDtoE".replaceFirst("from", "to")); - - // Test with the replaced string at the end. - Expect.equals("toABtoCDtoEto", "fromABtoCDtoEto".replaceFirst("from", "to")); - - // Test when there are no occurrence of the string to replace. - Expect.equals("ABC", "ABC".replaceFirst("from", "to")); - - // Test when the string to change is the empty string. - Expect.equals("", "".replaceFirst("from", "to")); - - // Test when the string to change is a substring of the string to - // replace. - Expect.equals("fro", "fro".replaceFirst("from", "to")); - - // Test when the string to change is the replaced string. - Expect.equals("to", "from".replaceFirst("from", "to")); - - // Test when the string to change is the replacement string. - Expect.equals("to", "to".replaceFirst("from", "to")); - - // Test replacing by the empty string. - Expect.equals("", "from".replaceFirst("from", "")); - Expect.equals("AB", "AfromB".replaceFirst("from", "")); - - // Test changing the empty string. - Expect.equals("to", "".replaceFirst("", "to")); - - // Test replacing the empty string. - Expect.equals("toAtoBtoCto", "AtoBtoCto".replaceFirst("", "to")); - - // Test startIndex. - Expect.equals( - "foo-AAA-foo-bar", "foo-bar-foo-bar".replaceFirst("bar", "AAA", 4)); - - // Test startIndex skipping one case at the beginning. - Expect.equals( - "foo-bar-AAA-bar", "foo-bar-foo-bar".replaceFirst("foo", "AAA", 1)); - - // Test startIndex skipping one case at the beginning. - Expect.equals( - "foo-bar-foo-AAA", "foo-bar-foo-bar".replaceFirst("bar", "AAA", 5)); - - // Test startIndex replacing with the empty string. - Expect.equals("foo-bar--bar", "foo-bar-foo-bar".replaceFirst("foo", "", 1)); - - // Test startIndex with a RegExp with carat - Expect.equals("foo-bar-foo-bar", - "foo-bar-foo-bar".replaceFirst(new RegExp(r"^foo"), "", 8)); - - // Test startIndex with a RegExp - Expect.equals( - "aaa{3}X{3}", "aaa{3}aaa{3}".replaceFirst(new RegExp(r"a{3}"), "X", 1)); - - // Test startIndex with regexp-looking String - Expect.equals("aaa{3}aaX", "aaa{3}aaa{3}".replaceFirst("a{3}", "X", 3)); - - // Test negative startIndex - Expect.throwsRangeError(() => "hello".replaceFirst("h", "X", -1)); - - // Test startIndex too large - Expect.throwsRangeError(() => "hello".replaceFirst("h", "X", 6)); - - // Test null startIndex - Expect.throwsArgumentError(() => "hello".replaceFirst("h", "X", null)); - - // Test replaceFirstMapped. - Expect.equals( - "AtoBtoCDtoE", "AfromBtoCDtoE".replaceFirstMapped("from", (_) => "to")); - - // Test with the replaced string at the beginning. - Expect.equals( - "toABtoCDtoE", "fromABtoCDtoE".replaceFirstMapped("from", (_) => "to")); - - // Test with the replaced string at the end. - Expect.equals("toABtoCDtoEto", - "fromABtoCDtoEto".replaceFirstMapped("from", (_) => "to")); - - // Test when there are no occurrence of the string to replace. - Expect.equals("ABC", "ABC".replaceFirstMapped("from", (_) => "to")); - - // Test when the string to change is the empty string. - Expect.equals("", "".replaceFirstMapped("from", (_) => "to")); - - // Test when the string to change is a substring of the string to - // replace. - Expect.equals("fro", "fro".replaceFirstMapped("from", (_) => "to")); - - // Test when the string to change is the replaced string. - Expect.equals("to", "from".replaceFirstMapped("from", (_) => "to")); - - // Test when the string to change is the replacement string. - Expect.equals("to", "to".replaceFirstMapped("from", (_) => "to")); - - // Test replacing by the empty string. - Expect.equals("", "from".replaceFirstMapped("from", (_) => "")); - Expect.equals("AB", "AfromB".replaceFirstMapped("from", (_) => "")); - - // Test changing the empty string. - Expect.equals("to", "".replaceFirstMapped("", (_) => "to")); - - // Test replacing the empty string. - Expect.equals("toAtoBtoCto", "AtoBtoCto".replaceFirstMapped("", (_) => "to")); - - // Test startIndex. - Expect.equals("foo-AAA-foo-bar", - "foo-bar-foo-bar".replaceFirstMapped("bar", (_) => "AAA", 4)); - - // Test startIndex skipping one case at the beginning. - Expect.equals("foo-bar-AAA-bar", - "foo-bar-foo-bar".replaceFirstMapped("foo", (_) => "AAA", 1)); - - // Test startIndex skipping one case at the beginning. - Expect.equals("foo-bar-foo-AAA", - "foo-bar-foo-bar".replaceFirstMapped("bar", (_) => "AAA", 5)); - - // Test startIndex replacing with the empty string. - Expect.equals("foo-bar--bar", - "foo-bar-foo-bar".replaceFirstMapped("foo", (_) => "", 1)); - - // Test startIndex with a RegExp with carat - Expect.equals("foo-bar-foo-bar", - "foo-bar-foo-bar".replaceFirstMapped(new RegExp(r"^foo"), (_) => "", 8)); - - // Test startIndex with a RegExp - Expect.equals("aaa{3}X{3}", - "aaa{3}aaa{3}".replaceFirstMapped(new RegExp(r"a{3}"), (_) => "X", 1)); - - // Test startIndex with regexp-looking String - Expect.equals( - "aaa{3}aaX", "aaa{3}aaa{3}".replaceFirstMapped("a{3}", (_) => "X", 3)); - - // Test negative startIndex - Expect.throwsRangeError( - () => "hello".replaceFirstMapped("h", (_) => "X", -1)); - - // Test startIndex too large - Expect.throwsRangeError(() => "hello".replaceFirstMapped("h", (_) => "X", 6)); - - // Test null startIndex - Expect.throwsArgumentError( - () => "hello".replaceFirstMapped("h", (_) => "X", null)); - - // Test replacement depending on argument. - Expect.equals("foo-BAR-foo-bar", - "foo-bar-foo-bar".replaceFirstMapped("bar", (v) => v[0].toUpperCase())); - - Expect.equals("foo-[bar]-foo-bar", - "foo-bar-foo-bar".replaceFirstMapped("bar", (v) => "[${v[0]}]")); - - Expect.equals("foo-foo-bar-foo-bar-foo-bar", - "foo-bar-foo-bar".replaceFirstMapped("bar", (v) => v.input)); - - // Test replacement throwing. - Expect.throws(() => "foo-bar".replaceFirstMapped("bar", (v) => throw 42), - (e) => e == 42); - - // Test replacement returning non-String. - var o = new Object(); - Expect.equals( - "foo-$o", - "foo-bar".replaceFirstMapped("bar", (v) { - // TODO(jmesserly): in strong mode, this function must return a string. - // If we want to allow any Object, we'll have to fix the API signature. - // See https://github.com/dart-lang/sdk/issues/30248. - return '$o'; - })); - - for (var string in ["", "x", "foo", "x\u2000z"]) { - for (var replacement in ["", "foo", string]) { - for (int start = 0; start <= string.length; start++) { - var expect; - for (int end = start; end <= string.length; end++) { - expect = - string.substring(0, start) + replacement + string.substring(end); - Expect.equals(expect, string.replaceRange(start, end, replacement), - '"$string"[$start:$end]="$replacement"'); - } - // Reuse expect from "end == string.length" case when omitting end. - Expect.equals(expect, string.replaceRange(start, null, replacement), - '"$string"[$start:]="$replacement"'); - } - } - Expect.throws(() => string.replaceRange(0, 0, null)); - Expect.throws(() => string.replaceRange(-1, 0, "x")); - Expect.throws(() => string.replaceRange(0, string.length + 1, "x")); - } -} diff --git a/tests/corelib_2/string_runes_test.dart b/tests/corelib_2/string_runes_test.dart deleted file mode 100644 index d8972843904..00000000000 --- a/tests/corelib_2/string_runes_test.dart +++ /dev/null @@ -1,86 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -main() { - test(String s, List expectedRunes) { - Runes runes = s.runes; - Expect.identical(s, runes.string); - - // for-in - var res = []; - for (int rune in runes) { - res.add(rune); - } - Expect.listEquals(expectedRunes, res); - - // manual iteration, backwards. - res = []; - for (var it = runes.iterator..reset(s.length); it.movePrevious();) { - res.add(it.current); - } - Expect.listEquals(expectedRunes.reversed.toList(), res); - - // Setting rawIndex. - RuneIterator it = runes.iterator; - it.rawIndex = 1; - Expect.equals(expectedRunes[1], it.current); - - it = runes.iterator; - it.moveNext(); - Expect.equals(0, it.rawIndex); - it.moveNext(); - Expect.equals(1, it.rawIndex); - it.moveNext(); - Expect.isTrue(1 < it.rawIndex); - it.rawIndex = 1; - Expect.equals(1, it.rawIndex); - Expect.equals(expectedRunes[1], it.current); - - // Reset, moveNext. - it.reset(1); - Expect.equals(-1, it.rawIndex); - Expect.equals(-1, it.current); - it.moveNext(); - Expect.equals(1, it.rawIndex); - Expect.equals(expectedRunes[1], it.current); - - // Reset, movePrevious. - it.reset(1); - Expect.equals(-1, it.rawIndex); - Expect.equals(-1, it.current); - it.movePrevious(); - Expect.equals(0, it.rawIndex); - Expect.equals(expectedRunes[0], it.current); - - // .map - Expect.listEquals(expectedRunes.map((x) => x.toRadixString(16)).toList(), - runes.map((x) => x.toRadixString(16)).toList()); - } - - // First character must be single-code-unit for test. - test("abc", [0x61, 0x62, 0x63]); - test("\x00\u0000\u{000000}", [0, 0, 0]); - test("\u{ffff}\u{10000}\u{10ffff}", [0xffff, 0x10000, 0x10ffff]); - String string = new String.fromCharCodes( - [0xdc00, 0xd800, 61, 0xd800, 0xdc00, 62, 0xdc00, 0xd800]); - test(string, [0xdc00, 0xd800, 61, 0x10000, 62, 0xdc00, 0xd800]); - - // Setting position in the middle of a surrogate pair is not allowed. - var r = new Runes("\u{10000}"); - var it = r.iterator; - it.moveNext(); - Expect.equals(0x10000, it.current); - - // Setting rawIndex inside surrogate pair. - Expect.throws(() { - it.rawIndex = 1; - }, (e) => e is Error); - Expect.throws(() { - it.reset(1); - }, (e) => e is Error); -} diff --git a/tests/corelib_2/string_source_test.dart b/tests/corelib_2/string_source_test.dart deleted file mode 100644 index 2f752de1070..00000000000 --- a/tests/corelib_2/string_source_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that different representations of the same string are all equal. - -import "dart:convert"; - -import "package:expect/expect.dart"; - -main() { - var base = "\u{10412}"; - var strings = [ - "\u{10412}", - "𐐒", - new String.fromCharCodes([0xd801, 0xdc12]), - base[0] + base[1], - "$base", - "${base[0]}${base[1]}", - "${base[0]}${base.substring(1)}", - new String.fromCharCodes([0x10412]), - ("a" + base).substring(1), - (new StringBuffer()..writeCharCode(0xd801)..writeCharCode(0xdc12)) - .toString(), - (new StringBuffer()..writeCharCode(0x10412)).toString(), - json.decode('"\u{10412}"'), - (json.decode('{"\u{10412}":[]}') as Map).keys.first - ]; - for (String string in strings) { - Expect.equals(base.length, string.length); - Expect.equals(base, string); - Expect.equals(base.hashCode, string.hashCode); - Expect.listEquals(base.codeUnits.toList(), string.codeUnits.toList()); - } -} diff --git a/tests/corelib_2/string_split_test.dart b/tests/corelib_2/string_split_test.dart deleted file mode 100644 index e1884fec0cb..00000000000 --- a/tests/corelib_2/string_split_test.dart +++ /dev/null @@ -1,146 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -main() { - testSplitString(); - testSplitRegExp(); - testSplitPattern(); -} - -testSplit(List expect, String string, Pattern pattern) { - String patternString; - if (pattern is String) { - patternString = '"$pattern"'; - } else if (pattern is RegExp) { - patternString = "/${pattern.pattern}/"; - } else { - patternString = pattern.toString(); - } - List actual = string.split(pattern); - - // Ensure that the correct type is reified. - actual = actual as List; - - // Check that store of the wrong type throws. Some platforms don't do this, - // so it's protected by multitest syntax. - Expect.throwsTypeError(() => actual.add(42), // //# checkedstore: ok - 'List.add should not accept an int'); // //# checkedstore: ok - - Expect.listEquals(expect, actual, '"$string".split($patternString)'); -} - -/** String patterns. */ -void testSplitString() { - // Normal match. - testSplit(["a", "b", "c"], "a b c", " "); - testSplit(["a", "b", "c"], "adbdc", "d"); - testSplit(["a", "b", "c"], "addbddc", "dd"); - // No match. - testSplit(["abc"], "abc", " "); - testSplit(["a"], "a", "b"); - testSplit([""], "", "b"); - // Empty match matches everywhere except start/end. - testSplit(["a", "b", "c"], "abc", ""); - // All empty parts. - testSplit(["", "", "", "", ""], "aaaa", "a"); - testSplit(["", "", "", "", ""], " ", " "); - testSplit(["", ""], "a", "a"); - // No overlapping matches. Match as early as possible. - testSplit(["", "", "", "a"], "aaaaaaa", "aa"); - // Cannot split the empty string. - testSplit([], "", ""); // Match. - testSplit([""], "", "a"); // No match. -} - -/** RegExp patterns. */ -void testSplitRegExp() { - testSplitWithRegExp((s) => new RegExp(s)); -} - -/** Non-String, non-RegExp patterns. */ -void testSplitPattern() { - testSplitWithRegExp((s) => new RegExpWrap(s)); -} - -void testSplitWithRegExp(makePattern) { - testSplit(["a", "b", "c"], "a b c", makePattern(r" ")); - - testSplit(["a", "b", "c"], "adbdc", makePattern(r"[dz]")); - - testSplit(["a", "b", "c"], "addbddc", makePattern(r"dd")); - - testSplit(["abc"], "abc", makePattern(r"b$")); - - testSplit(["a", "b", "c"], "abc", makePattern(r"")); - - testSplit(["", "", "", ""], " ", makePattern(r"[ ]")); - - // Non-zero-length match at end. - testSplit(["aa", ""], "aaa", makePattern(r"a$")); - - // Zero-length match at end. - testSplit(["aaa"], "aaa", makePattern(r"$")); - - // Non-zero-length match at start. - testSplit(["", "aa"], "aaa", makePattern(r"^a")); - - // Zero-length match at start. - testSplit(["aaa"], "aaa", makePattern(r"^")); - - // Picks first match, not longest or shortest. - testSplit(["", "", "", "a"], "aaaaaaa", makePattern(r"aa|aaa")); - - testSplit(["", "", "", "a"], "aaaaaaa", makePattern(r"aa|")); - - testSplit(["", "", "a"], "aaaaaaa", makePattern(r"aaa|aa")); - - // Zero-width match depending on the following. - testSplit(["a", "bc"], "abc", makePattern(r"(?=[ab])")); - - testSplit(["a", "b", "c"], "abc", makePattern(r"(?!^)")); - - // Cannot split empty string. - testSplit([], "", makePattern(r"")); - - testSplit([], "", makePattern(r"(?:)")); - - testSplit([], "", makePattern(r"$|(?=.)")); - - testSplit([""], "", makePattern(r"a")); - - // Can split singleton string if it matches. - testSplit(["", ""], "a", makePattern(r"a")); - - testSplit(["a"], "a", makePattern(r"b")); - - // Do not include captures. - testSplit(["a", "", "a"], "abba", makePattern(r"(b)")); - - testSplit(["a", "a"], "abba", makePattern(r"(bb)")); - - testSplit(["a", "a"], "abba", makePattern(r"(b*)")); - - testSplit(["a", "a"], "aa", makePattern(r"(b*)")); - - // But captures are still there, and do work with backreferences. - testSplit(["a", "cba"], "abcba", makePattern(r"([bc])(?=.*\1)")); -} - -// A Pattern implementation with the same capabilities as a RegExp, but not -// directly recognizable as a RegExp. -class RegExpWrap implements Pattern { - final regexp; - RegExpWrap(String source) : regexp = new RegExp(source); - Iterable allMatches(String string, [int start = 0]) => - regexp.allMatches(string, start); - - Match matchAsPrefix(String string, [int start = 0]) => - regexp.matchAsPrefix(string, start); - - String toString() => "Wrap(/${regexp.pattern}/)"; -} diff --git a/tests/corelib_2/string_static_test.dart b/tests/corelib_2/string_static_test.dart deleted file mode 100644 index e086b53f6d3..00000000000 --- a/tests/corelib_2/string_static_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -void main() { - testIllegalArgument(); -} - -void testIllegalArgument() { - String a = "Hello"; - var c = a[2.2]; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] A value of type 'double' can't be assigned to a variable of type 'int'. -} diff --git a/tests/corelib_2/string_substring_test.dart b/tests/corelib_2/string_substring_test.dart deleted file mode 100644 index c9a452a21a9..00000000000 --- a/tests/corelib_2/string_substring_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -main() { - // Test that not providing an optional argument goes to the end. - Expect.equals("".substring(0), ""); - Expect.throwsRangeError(() => "".substring(1)); - Expect.throwsRangeError(() => "".substring(-1)); - - Expect.equals("abc".substring(0), "abc"); - Expect.equals("abc".substring(1), "bc"); - Expect.equals("abc".substring(2), "c"); - Expect.equals("abc".substring(3), ""); - Expect.throwsRangeError(() => "abc".substring(4)); - Expect.throwsRangeError(() => "abc".substring(-1)); - - // Test that providing null goes to the end. - Expect.equals("".substring(0, null), ""); - Expect.throwsRangeError(() => "".substring(1, null)); - Expect.throwsRangeError(() => "".substring(-1, null)); - - Expect.equals("abc".substring(0, null), "abc"); - Expect.equals("abc".substring(1, null), "bc"); - Expect.equals("abc".substring(2, null), "c"); - Expect.equals("abc".substring(3, null), ""); - Expect.throwsRangeError(() => "abc".substring(4, null)); - Expect.throwsRangeError(() => "abc".substring(-1, null)); -} diff --git a/tests/corelib_2/string_test.dart b/tests/corelib_2/string_test.dart deleted file mode 100644 index d7789e67c12..00000000000 --- a/tests/corelib_2/string_test.dart +++ /dev/null @@ -1,480 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -void main() { - testOutOfRange(); - testConcat(); - testIndex(); - testCodeUnitAt(); - testEquals(); - testEndsWith(); - testStartsWith(); - testIndexOf(); - testLastIndexOf(); - testContains(); - testReplaceAll(); - testCompareTo(); - testCharCodes(); - testRepeat(); - testPadLeft(); - testPadRight(); -} - -void testLength() { - String str = ""; - for (var i = 0; i < 20; i++) { - testStringLength(i, str); - str += " "; - } -} - -void testOutOfRange() { - String a = "Hello"; - bool exception_caught = false; - try { - var c = a[20]; // Throw exception. - } on RangeError catch (e) { - exception_caught = true; - } - Expect.isTrue(exception_caught); -} - -void testIndex() { - String str = "string"; - for (int i = 0; i < str.length; i++) { - Expect.isTrue(str[i] is String); - testStringLength(1, str[i]); - } -} - -void testCodeUnitAt() { - String str = "string"; - for (int i = 0; i < str.length; i++) { - Expect.isTrue(str.codeUnitAt(i) is int); - } -} - -void testConcat() { - var a = "One"; - var b = "Four"; - var c = a + b; - testStringLength(7, c); - Expect.equals("OneFour", c); -} - -void testEquals() { - Expect.equals("str", "str"); - - Expect.equals("str", "s" + "t" + "r"); - Expect.equals("s" + "t" + "r", "str"); - - Expect.isFalse("str" == "s"); - Expect.isFalse("str" == "r"); - Expect.isFalse("str" == "st"); - Expect.isFalse("str" == "tr"); - - Expect.isFalse("s" == "str"); - Expect.isFalse("r" == "str"); - Expect.isFalse("st" == "str"); - Expect.isFalse("tr" == "str"); - - Expect.isFalse("" == "s"); - Expect.equals("", ""); -} - -void testEndsWith() { - Expect.isTrue("str".endsWith("r")); - Expect.isTrue("str".endsWith("tr")); - Expect.isTrue("str".endsWith("str")); - - Expect.isFalse("str".endsWith("stri")); - Expect.isFalse("str".endsWith("t")); - Expect.isFalse("str".endsWith("st")); - Expect.isFalse("str".endsWith("s")); - - Expect.isTrue("".endsWith("")); - Expect.isFalse("".endsWith("s")); -} - -void testStartsWith() { - Expect.isTrue("str".startsWith("s")); - Expect.isTrue("str".startsWith("st")); - Expect.isTrue("str".startsWith("str")); - - Expect.isFalse("str".startsWith("stri")); - Expect.isFalse("str".startsWith("r")); - Expect.isFalse("str".startsWith("tr")); - Expect.isFalse("str".startsWith("t")); - - Expect.isTrue("".startsWith("")); - Expect.isFalse("".startsWith("s")); - - Expect.isFalse("strstr".startsWith("s", 1)); - Expect.isFalse("strstr".startsWith("s", 2)); - Expect.isTrue("strstr".startsWith("s", 3)); - Expect.isFalse("strstr".startsWith("s", 4)); - - Expect.isFalse("strstr".startsWith("st", 1)); - Expect.isFalse("strstr".startsWith("st", 2)); - Expect.isTrue("strstr".startsWith("st", 3)); - Expect.isFalse("strstr".startsWith("st", 4)); - - Expect.isFalse("strstr".startsWith("str", 1)); - Expect.isFalse("strstr".startsWith("str", 2)); - Expect.isTrue("strstr".startsWith("str", 3)); - Expect.isFalse("strstr".startsWith("str", 4)); - - Expect.isTrue("str".startsWith("", 0)); - Expect.isTrue("str".startsWith("", 1)); - Expect.isTrue("str".startsWith("", 2)); - Expect.isTrue("str".startsWith("", 3)); - - Expect.throws(() => "str".startsWith("", -1)); - Expect.throws(() => "str".startsWith("", 4)); - - var regexp = new RegExp("s(?:tr?)?"); - Expect.isTrue("s".startsWith(regexp)); - Expect.isTrue("st".startsWith(regexp)); - Expect.isTrue("str".startsWith(regexp)); - Expect.isTrue("sX".startsWith(regexp)); - Expect.isTrue("stX".startsWith(regexp)); - Expect.isTrue("strX".startsWith(regexp)); - - Expect.isFalse("".startsWith(regexp)); - Expect.isFalse("astr".startsWith(regexp)); - - Expect.isTrue("".startsWith(new RegExp(""))); - Expect.isTrue("".startsWith(new RegExp("a?"))); - - Expect.isFalse("strstr".startsWith(regexp, 1)); - Expect.isFalse("strstr".startsWith(regexp, 2)); - Expect.isTrue("strstr".startsWith(regexp, 3)); - Expect.isFalse("strstr".startsWith(regexp, 4)); - - Expect.isTrue("str".startsWith(new RegExp(""), 0)); - Expect.isTrue("str".startsWith(new RegExp(""), 1)); - Expect.isTrue("str".startsWith(new RegExp(""), 2)); - Expect.isTrue("str".startsWith(new RegExp(""), 3)); - Expect.isTrue("str".startsWith(new RegExp("a?"), 0)); - Expect.isTrue("str".startsWith(new RegExp("a?"), 1)); - Expect.isTrue("str".startsWith(new RegExp("a?"), 2)); - Expect.isTrue("str".startsWith(new RegExp("a?"), 3)); - - Expect.throws(() => "str".startsWith(regexp, -1)); - Expect.throws(() => "str".startsWith(regexp, 4)); - - regexp = new RegExp("^str"); - Expect.isTrue("strstr".startsWith(regexp)); - Expect.isTrue("strstr".startsWith(regexp, 0)); - Expect.isFalse("strstr".startsWith(regexp, 1)); - Expect.isFalse("strstr".startsWith(regexp, 2)); - Expect.isFalse("strstr".startsWith(regexp, 3)); // Second "str" isn't at ^. -} - -void testIndexOf() { - Expect.equals(0, "str".indexOf("", 0)); - Expect.equals(0, "".indexOf("", 0)); - Expect.equals(-1, "".indexOf("a", 0)); - - Expect.equals(1, "str".indexOf("t", 0)); - Expect.equals(1, "str".indexOf("tr", 0)); - Expect.equals(0, "str".indexOf("str", 0)); - Expect.equals(0, "str".indexOf("st", 0)); - Expect.equals(0, "str".indexOf("s", 0)); - Expect.equals(2, "str".indexOf("r", 0)); - Expect.equals(-1, "str".indexOf("string", 0)); - - Expect.equals(1, "strstr".indexOf("t", 0)); - Expect.equals(1, "strstr".indexOf("tr", 0)); - Expect.equals(0, "strstr".indexOf("str", 0)); - Expect.equals(0, "strstr".indexOf("st", 0)); - Expect.equals(0, "strstr".indexOf("s", 0)); - Expect.equals(2, "strstr".indexOf("r", 0)); - Expect.equals(-1, "str".indexOf("string", 0)); - - Expect.equals(4, "strstr".indexOf("t", 2)); - Expect.equals(4, "strstr".indexOf("tr", 2)); - Expect.equals(3, "strstr".indexOf("str", 1)); - Expect.equals(3, "strstr".indexOf("str", 2)); - Expect.equals(3, "strstr".indexOf("str", 3)); - Expect.equals(3, "strstr".indexOf("st", 1)); - Expect.equals(3, "strstr".indexOf("s", 3)); - Expect.equals(5, "strstr".indexOf("r", 3)); - Expect.equals(5, "strstr".indexOf("r", 4)); - Expect.equals(5, "strstr".indexOf("r", 5)); - - String str = "hello"; - for (int i = 0; i < 10; i++) { - if (i > str.length) { - Expect.throws(() => str.indexOf("", i)); - } else { - int result = str.indexOf("", i); - Expect.equals(i, result); - } - } - - var re = new RegExp("an?"); - Expect.equals(1, "banana".indexOf(re)); - Expect.equals(1, "banana".indexOf(re, 0)); - Expect.equals(1, "banana".indexOf(re, 1)); - Expect.equals(3, "banana".indexOf(re, 2)); - Expect.equals(3, "banana".indexOf(re, 3)); - Expect.equals(5, "banana".indexOf(re, 4)); - Expect.equals(5, "banana".indexOf(re, 5)); - Expect.equals(-1, "banana".indexOf(re, 6)); - Expect.throws(() => "banana".indexOf(re, -1)); - Expect.throws(() => "banana".indexOf(re, 7)); - re = new RegExp("x?"); - for (int i = 0; i <= str.length; i++) { - Expect.equals(i, str.indexOf(re, i)); - } -} - -void testLastIndexOf() { - Expect.equals(2, "str".lastIndexOf("", 2)); - Expect.equals(0, "".lastIndexOf("", 0)); - Expect.equals(-1, "".lastIndexOf("a", 0)); - - Expect.equals(1, "str".lastIndexOf("t", 2)); - Expect.equals(1, "str".lastIndexOf("tr", 2)); - Expect.equals(0, "str".lastIndexOf("str", 2)); - Expect.equals(0, "str".lastIndexOf("st", 2)); - Expect.equals(0, "str".lastIndexOf("s", 2)); - Expect.equals(2, "str".lastIndexOf("r", 2)); - Expect.equals(-1, "str".lastIndexOf("string", 2)); - - Expect.equals(4, "strstr".lastIndexOf("t", 5)); - Expect.equals(4, "strstr".lastIndexOf("tr", 5)); - Expect.equals(3, "strstr".lastIndexOf("str", 5)); - Expect.equals(3, "strstr".lastIndexOf("st", 5)); - Expect.equals(3, "strstr".lastIndexOf("s", 5)); - Expect.equals(5, "strstr".lastIndexOf("r", 5)); - Expect.throws(() { - "str".lastIndexOf("string", 5); - }); - Expect.equals(4, "strstr".lastIndexOf("t", 5)); - Expect.equals(4, "strstr".lastIndexOf("tr", 5)); - Expect.equals(3, "strstr".lastIndexOf("str", 5)); - Expect.equals(3, "strstr".lastIndexOf("str", 5)); - Expect.equals(3, "strstr".lastIndexOf("str", 5)); - Expect.equals(3, "strstr".lastIndexOf("st", 5)); - Expect.equals(3, "strstr".lastIndexOf("s", 5)); - Expect.equals(5, "strstr".lastIndexOf("r", 5)); - Expect.equals(2, "strstr".lastIndexOf("r", 4)); - Expect.equals(2, "strstr".lastIndexOf("r", 3)); - Expect.equals(5, "strstr".lastIndexOf("r")); - Expect.equals(5, "strstr".lastIndexOf("r", null)); - - String str = "hello"; - for (int i = 0; i < 10; i++) { - if (i > str.length) { - Expect.throws(() => str.indexOf("", i)); - } else { - int result = str.lastIndexOf("", i); - Expect.equals(i, result); - } - } - - var re = new RegExp("an?"); - Expect.equals(5, "banana".lastIndexOf(re)); - Expect.equals(5, "banana".lastIndexOf(re, 6)); - Expect.equals(5, "banana".lastIndexOf(re, 5)); - Expect.equals(3, "banana".lastIndexOf(re, 4)); - Expect.equals(3, "banana".lastIndexOf(re, 3)); - Expect.equals(1, "banana".lastIndexOf(re, 2)); - Expect.equals(1, "banana".lastIndexOf(re, 1)); - Expect.equals(-1, "banana".lastIndexOf(re, 0)); - Expect.throws(() => "banana".lastIndexOf(re, -1)); - Expect.throws(() => "banana".lastIndexOf(re, 7)); - re = new RegExp("x?"); - for (int i = 0; i <= str.length; i++) { - Expect.equals(i, str.indexOf(re, i)); - } -} - -void testContains() { - Expect.isTrue("str".contains("s", 0)); - Expect.isTrue("str".contains("st", 0)); - Expect.isTrue("str".contains("str", 0)); - Expect.isTrue("str".contains("t", 0)); - Expect.isTrue("str".contains("r", 0)); - Expect.isTrue("str".contains("tr", 0)); - - Expect.isFalse("str".contains("sr", 0)); - Expect.isFalse("str".contains("string", 0)); - - Expect.isTrue("str".contains("", 0)); - Expect.isTrue("".contains("", 0)); - Expect.isFalse("".contains("s", 0)); -} - -void testReplaceAll() { - Expect.equals("AtoBtoCDtoE", "AfromBfromCDfromE".replaceAll("from", "to")); - - // Test with the replaced string at the beginning. - Expect.equals("toABtoCDtoE", "fromABfromCDfromE".replaceAll("from", "to")); - - // Test with the replaced string at the end. - Expect.equals( - "toABtoCDtoEto", "fromABfromCDfromEfrom".replaceAll("from", "to")); - - // Test when there are no occurrence of the string to replace. - Expect.equals("ABC", "ABC".replaceAll("from", "to")); - - // Test when the string to change is the empty string. - Expect.equals("", "".replaceAll("from", "to")); - - // Test when the string to change is a substring of the string to - // replace. - Expect.equals("fro", "fro".replaceAll("from", "to")); - - // Test when the string to change is the replaced string. - Expect.equals("to", "from".replaceAll("from", "to")); - - // Test when the string to change is the replacement string. - Expect.equals("to", "to".replaceAll("from", "to")); - - // Test replacing by the empty string. - Expect.equals("", "from".replaceAll("from", "")); - Expect.equals("AB", "AfromB".replaceAll("from", "")); - - // Test changing the empty string. - Expect.equals("to", "".replaceAll("", "to")); - - // Test replacing the empty string. - Expect.equals("toAtoBtoCto", "ABC".replaceAll("", "to")); -} - -void testCompareTo() { - Expect.equals(0, "".compareTo("")); - Expect.equals(0, "str".compareTo("str")); - Expect.equals(-1, "str".compareTo("string")); - Expect.equals(1, "string".compareTo("str")); - Expect.equals(1, "string".compareTo("")); - Expect.equals(-1, "".compareTo("string")); -} - -void testCharCodes() { - test(str) { - var list = str.codeUnits; - Expect.equals(str.length, list.length); - for (int i = 0; i < str.length; i++) { - Expect.equals(str.codeUnitAt(i), list[i]); - } - } - - test("abc"); - test(""); - test(" "); -} - -void testStringLength(int length, String str) { - Expect.equals(length, str.length); - (length == 0 ? Expect.isTrue : Expect.isFalse)(str.isEmpty); - (length != 0 ? Expect.isTrue : Expect.isFalse)(str.isNotEmpty); -} - -void testRepeat() { - List testStrings = [ - "", - "\x00", - "a", - "ab", - "\x80", - "\xff", - "\u2028", - "abcdef\u2028", - "\u{10002}", - "abcdef\u{10002}" - ]; - List counts = [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 127, - 128, - 129 - ]; - void testRepeat(str, repeat) { - String expect; - if (repeat <= 0) { - expect = ""; - } else if (repeat == 1) { - expect = str; - } else { - StringBuffer buf = new StringBuffer(); - for (int i = 0; i < repeat; i++) { - buf.write(str); - } - expect = buf.toString(); - } - String actual = str * repeat; - Expect.equals(expect, actual, "$str#${str.length} * $repeat"); - } - - for (String str in testStrings) { - for (int repeat in counts) { - testRepeat(str, repeat); - } - } -} - -void testPadLeft() { - Expect.equals(" 1", "1".padLeft(5, ' ')); - Expect.equals(" 11", "11".padLeft(5, ' ')); - Expect.equals(" 111", "111".padLeft(5, ' ')); - Expect.equals(" 1111", "1111".padLeft(5, ' ')); - Expect.equals("11111", "11111".padLeft(5, ' ')); - Expect.equals("111111", "111111".padLeft(5, ' ')); - Expect.equals(" \u{10002}", "\u{10002}".padLeft(5, ' ')); - Expect.equals('', ''.padLeft(0, 'a')); - Expect.equals('a', ''.padLeft(1, 'a')); - Expect.equals('aaaaa', ''.padLeft(5, 'a')); - Expect.equals('', ''.padLeft(-2, 'a')); - - Expect.equals('xyzxyzxyzxyzxyz', ''.padLeft(5, 'xyz')); - Expect.equals('xyzxyzxyzxyza', 'a'.padLeft(5, 'xyz')); - Expect.equals('xyzxyzxyzaa', 'aa'.padLeft(5, 'xyz')); - Expect.equals('\u{10002}\u{10002}\u{10002}aa', 'aa'.padLeft(5, '\u{10002}')); - Expect.equals('a', 'a'.padLeft(10, '')); -} - -void testPadRight() { - Expect.equals("1 ", "1".padRight(5, ' ')); - Expect.equals("11 ", "11".padRight(5, ' ')); - Expect.equals("111 ", "111".padRight(5, ' ')); - Expect.equals("1111 ", "1111".padRight(5, ' ')); - Expect.equals("11111", "11111".padRight(5, ' ')); - Expect.equals("111111", "111111".padRight(5, ' ')); - Expect.equals("\u{10002} ", "\u{10002}".padRight(5, ' ')); - Expect.equals('', ''.padRight(0, 'a')); - Expect.equals('a', ''.padRight(1, 'a')); - Expect.equals('aaaaa', ''.padRight(5, 'a')); - Expect.equals('', ''.padRight(-2, 'a')); - - Expect.equals('xyzxyzxyzxyzxyz', ''.padRight(5, 'xyz')); - Expect.equals('axyzxyzxyzxyz', 'a'.padRight(5, 'xyz')); - Expect.equals('aaxyzxyzxyz', 'aa'.padRight(5, 'xyz')); - Expect.equals('aa\u{10002}\u{10002}\u{10002}', 'aa'.padRight(5, '\u{10002}')); - Expect.equals('a', 'a'.padRight(10, '')); -} diff --git a/tests/corelib_2/string_to_lower_case_test.dart b/tests/corelib_2/string_to_lower_case_test.dart deleted file mode 100644 index 7abe023ee16..00000000000 --- a/tests/corelib_2/string_to_lower_case_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -void testOneByteSting() { - // Compare one-byte-string toLowerCase with a two-byte-string toLowerCase. - var oneByteString = - new String.fromCharCodes(new List.generate(256, (i) => i)).toLowerCase(); - var twoByteString = - new String.fromCharCodes(new List.generate(512, (i) => i)).toLowerCase(); - Expect.isTrue(twoByteString.codeUnits.any((u) => u >= 256)); - Expect.equals(oneByteString, twoByteString.substring(0, 256)); -} - -void main() { - testOneByteSting(); -} diff --git a/tests/corelib_2/string_trim2_test.dart b/tests/corelib_2/string_trim2_test.dart deleted file mode 100644 index a04737641c3..00000000000 --- a/tests/corelib_2/string_trim2_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -const WHITESPACE = const [ - 0x09, - 0x0A, - 0x0B, - 0x0C, - 0x0D, - 0x20, - 0x85, - 0xA0, - 0x1680, - 0x2000, - 0x2001, - 0x2002, - 0x2003, - 0x2004, - 0x2005, - 0x2006, - 0x2007, - 0x2008, - 0x2009, - 0x200A, - 0x202F, - 0x205F, - 0x3000, - 0x2028, - 0x2029, - 0xFEFF, -]; - -main() { - for (var ws in WHITESPACE) { - var name = ws.toRadixString(16); - var c = new String.fromCharCode(ws); - Expect.equals("", c.trim(), "$name"); - Expect.equals("a", ("a" + c).trim(), "a-$name"); - Expect.equals("a", (c + "a").trim(), "$name-a"); - Expect.equals("a", (c + c + "a" + c + c).trim(), "$name around"); - Expect.equals( - "a" + c + "a", (c + c + "a" + c + "a" + c + c).trim(), "$name many"); - } - Expect.equals("", new String.fromCharCodes(WHITESPACE).trim(), "ALL"); -} diff --git a/tests/corelib_2/string_trim_test.dart b/tests/corelib_2/string_trim_test.dart deleted file mode 100644 index 905abcdafb4..00000000000 --- a/tests/corelib_2/string_trim_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class StringTrimTest { - static testMain() { - Expect.equals("", " ".trim()); - Expect.equals("", " ".trim()); - var a = " lots of space on the left"; - Expect.equals("lots of space on the left", a.trim()); - a = "lots of space on the right "; - Expect.equals("lots of space on the right", a.trim()); - a = " lots of space "; - Expect.equals("lots of space", a.trim()); - a = " x "; - Expect.equals("x", a.trim()); - Expect.equals("", " \t \n \r ".trim()); - } -} - -main() { - StringTrimTest.testMain(); -} diff --git a/tests/corelib_2/string_trimlr_test.dart b/tests/corelib_2/string_trimlr_test.dart deleted file mode 100644 index 40fb76bd278..00000000000 --- a/tests/corelib_2/string_trimlr_test.dart +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -// Characters with Whitespace property (Unicode 6.3). -// 0009..000D ; White_Space # Cc .. -// 0020 ; White_Space # Zs SPACE -// 0085 ; White_Space # Cc -// 00A0 ; White_Space # Zs NO-BREAK SPACE -// 1680 ; White_Space # Zs OGHAM SPACE MARK -// 2000..200A ; White_Space # Zs EN QUAD..HAIR SPACE -// 2028 ; White_Space # Zl LINE SEPARATOR -// 2029 ; White_Space # Zp PARAGRAPH SEPARATOR -// 202F ; White_Space # Zs NARROW NO-BREAK SPACE -// 205F ; White_Space # Zs MEDIUM MATHEMATICAL SPACE -// 3000 ; White_Space # Zs IDEOGRAPHIC SPACE -// And BOM: -// FEFF ; Byte order mark. -const WHITESPACE = const [ - 0x09, - 0x0A, - 0x0B, - 0x0C, - 0x0D, - 0x20, - 0x85, - 0xA0, - 0x1680, - 0x2000, - 0x2001, - 0x2002, - 0x2003, - 0x2004, - 0x2005, - 0x2006, - 0x2007, - 0x2008, - 0x2009, - 0x200A, - 0x2028, - 0x2029, - 0x202F, - 0x205F, - 0x3000, - 0xFEFF, -]; - -main() { - // Test the whitespace in different positions. - test(ws) { - // trimLeft - Expect.equals("", ws.trimLeft(), "K1"); - Expect.equals("", (ws + ws).trimLeft(), "L2"); - Expect.equals("a" + ws, ("a" + ws).trimLeft(), "L3"); - Expect.equals("a", (ws + "a").trimLeft(), "L4"); - Expect.equals("a" + ws + ws, (ws + ws + "a" + ws + ws).trimLeft(), "L5"); - Expect.equals("a" + ws + "a", (ws + ws + "a" + ws + "a").trimLeft(), "L6"); - var untrimmable = "a" + ws + "a"; - Expect.identical(untrimmable, untrimmable.trimLeft(), "L7"); - // trimRight - Expect.equals("", ws.trimRight(), "R1"); - Expect.equals("", (ws + ws).trimRight(), "R2"); - Expect.equals("a", ("a" + ws).trimRight(), "R3"); - Expect.equals(ws + "a", (ws + "a").trimRight(), "R4"); - Expect.equals(ws + ws + "a", (ws + ws + "a" + ws + ws).trimRight(), "R5"); - Expect.equals("a" + ws + "a", ("a" + ws + "a" + ws + ws).trimRight(), "R6"); - Expect.identical(untrimmable, untrimmable.trimRight(), "R7"); - } - - // Test each whitespace at different locations. - for (var ws in WHITESPACE) { - var c = new String.fromCharCode(ws); - test(c); - } - // Test all whitespaces at once at different locations. - test(new String.fromCharCodes(WHITESPACE)); - - // Empty strings. - Expect.identical("", "".trimLeft()); - Expect.identical("", "".trimRight()); - - // Test all BMP chars and one surrogate pair. - for (int i = 0, j = 0; i <= 0x10000; i++) { - if (j < WHITESPACE.length && i == WHITESPACE[j]) { - j++; - continue; - } - // See below for these exceptions. - if (i == 0x180E) continue; - if (i == 0x200B) continue; - - var s = new String.fromCharCode(i); - Expect.identical(s, s.trimLeft()); - Expect.identical(s, s.trimRight()); - } - - // U+200b is not treated as whitespace, though historically, some JS engines - // did. - var s200B = new String.fromCharCode(0x200B); - Expect.identical(s200B, s200B.trimLeft()); - Expect.identical(s200B, s200B.trimRight()); - - // U+180E ceased to be whitespace in Unicode version 6.3.0 - // string_trimlr_test/unicode63 fails on implementations using earlier versions. - var s180E = new String.fromCharCode(0x180E); - Expect.identical(s180E, s180E.trimLeft()); // //# unicode63: ok - Expect.identical(s180E, s180E.trimRight()); // //# unicode63: ok -} diff --git a/tests/corelib_2/strings_test.dart b/tests/corelib_2/strings_test.dart deleted file mode 100644 index 5ae10d3e6f0..00000000000 --- a/tests/corelib_2/strings_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Dart test program for testing class 'Strings'. - -class StringsTest { - StringsTest() {} - - toString() { - return "Strings Tester"; - } - - static testCreation() { - String s = "Hello"; - List l = new List.filled(s.length, null); - for (int i = 0; i < l.length; i++) { - l[i] = s.codeUnitAt(i); - } - String s2 = new String.fromCharCodes(l); - Expect.equals(s, s2); - } - - static void testMain() { - testCreation(); - } -} - -main() { - StringsTest.testMain(); -} diff --git a/tests/corelib_2/symbol_map_helper.dart b/tests/corelib_2/symbol_map_helper.dart deleted file mode 100644 index 7e9ba355c27..00000000000 --- a/tests/corelib_2/symbol_map_helper.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2012, 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 dart.test.symbol_map_helper; - -// TODO(ahe): Update map literals to avoid this method. -Map symbolMapToStringMap(Map map) { - if (map == null) return null; - Map result = new Map(); - map.forEach((name, value) { - result[new Symbol(name)] = value; - }); - return result; -} diff --git a/tests/corelib_2/symbol_operator_test.dart b/tests/corelib_2/symbol_operator_test.dart deleted file mode 100644 index 18dce3b9d1c..00000000000 --- a/tests/corelib_2/symbol_operator_test.dart +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test of Symbol class for operators.. - -dynamic $ = new Symbolize(); - -main() { - testSymbol(#+, $ + $, "+"); - testSymbol(#-, $ - $, "-"); - testSymbol(#*, $ * $, "*"); - testSymbol(#/, $ / $, "/"); - testSymbol(#~/, $ ~/ $, "~/"); - testSymbol(#%, $ % $, "%"); - testSymbol(#<<, $ << $, "<<"); - testSymbol(#>>, $ >> $, ">>"); - testSymbol(#~, ~$, "~"); - testSymbol(#|, $ | $, "|"); - testSymbol(#&, $ & $, "&"); - testSymbol(#^, $ ^ $, "^"); - testSymbol(#<, $ < $, "<"); - testSymbol(#<=, $ <= $, "<="); - testSymbol(#>, $ > $, ">"); - testSymbol(#>=, $ >= $, ">="); - testSymbol(#==, new Symbol("=="), "=="); // Can't hit noSuchMethod. - testSymbol(#[], $[$], "[]"); - testSymbol(#[]=, ($[$] = $).lastMember, "[]="); - testSymbol(Symbol.unaryMinus, -$, "unary-"); - - testSymbolThrows(">>>"); // //# 03: ok - testSymbolThrows("!"); // //# 03: continued - testSymbolThrows("&&"); // //# 03: continued - testSymbolThrows("||"); // //# 03: continued - testSymbolThrows("?"); // //# 03: continued - testSymbolThrows("?:"); // //# 03: continued - testSymbolThrows("#"); // //# 03: continued - testSymbolThrows("//"); // //# 03: continued -} - -void testSymbol(Symbol constSymbol, var mirrorSymbol, String name) { - Symbol dynamicSymbol = new Symbol(name); - if (constSymbol != mirrorSymbol) { - throw "Not equal #$name, \$$name: $constSymbol, $mirrorSymbol"; - } - if (constSymbol != dynamicSymbol) { - throw "Not equal #$name, new Symbol('$name'): $constSymbol, $dynamicSymbol"; - } - if (mirrorSymbol != dynamicSymbol) { - throw "Not equal \$$name, new Symbol('$name'): " - "$mirrorSymbol, $dynamicSymbol"; - } - if (constSymbol.hashCode != mirrorSymbol.hashCode) { - throw "HashCode not equal #$name, \$$name: $constSymbol, $mirrorSymbol"; - } - if (constSymbol.hashCode != dynamicSymbol.hashCode) { - throw "HashCode not equal #$name, new Symbol('$name'): " - "$constSymbol, $dynamicSymbol"; - } - if (mirrorSymbol.hashCode != dynamicSymbol.hashCode) { - throw "HashCode not equal \$$name, new Symbol('$name'): " - "$mirrorSymbol, $dynamicSymbol"; - } -} - -void testSymbolThrows(name) { - bool fails = false; - try { - new Symbol(name); - } catch (e) { - fails = true; - } - if (!fails) { - throw "Didn't throw: $name"; - } -} - -class Symbolize { - Symbol lastMember; - noSuchMethod(m) => lastMember = m.memberName; -} diff --git a/tests/corelib_2/symbol_reserved_word_test.dart b/tests/corelib_2/symbol_reserved_word_test.dart deleted file mode 100644 index 1305da7887e..00000000000 --- a/tests/corelib_2/symbol_reserved_word_test.dart +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -void checkBadSymbol(String s) { - Expect.throwsArgumentError(() => new Symbol(s)); -} - -main() { - var x; - - // 'void' is allowed as a symbol name. - x = const Symbol('void'); // //# 01: ok - x = #void; // //# 02: ok - x = new Symbol('void'); // //# 03: ok - - // However, it is not allowed as a part of a symbol name. - x = const Symbol('void.foo'); // //# 04: compile-time error - x = #void.foo; // //# 05: compile-time error - checkBadSymbol('void.foo'); // //# 06: ok - x = const Symbol('foo.void'); // //# 07: compile-time error - x = #foo.void; // //# 08: compile-time error - checkBadSymbol('foo.void'); // //# 09: ok - - // All other reserved words are disallowed. - x = const Symbol('assert'); // //# 10: compile-time error - x = const Symbol('break'); // //# 10: continued - x = const Symbol('case'); // //# 10: continued - x = const Symbol('catch'); // //# 10: continued - x = const Symbol('class'); // //# 10: continued - x = const Symbol('const'); // //# 10: continued - x = const Symbol('continue'); // //# 10: continued - x = const Symbol('default'); // //# 10: continued - x = const Symbol('do'); // //# 10: continued - x = const Symbol('else'); // //# 10: continued - x = const Symbol('enum'); // //# 10: continued - x = const Symbol('extends'); // //# 10: continued - x = #assert; // //# 11: compile-time error - x = const Symbol('false'); // //# 10: continued - x = const Symbol('final'); // //# 10: continued - x = const Symbol('finally'); // //# 10: continued - x = const Symbol('for'); // //# 10: continued - x = const Symbol('if'); // //# 10: continued - x = const Symbol('in'); // //# 10: continued - x = const Symbol('is'); // //# 10: continued - x = const Symbol('new'); // //# 10: continued - x = const Symbol('null'); // //# 10: continued - x = const Symbol('rethrow'); // //# 10: continued - x = const Symbol('return'); // //# 10: continued - x = const Symbol('super'); // //# 10: continued - x = const Symbol('switch'); // //# 10: continued - x = const Symbol('this'); // //# 10: continued - x = const Symbol('throw'); // //# 10: continued - x = const Symbol('true'); // //# 10: continued - x = const Symbol('try'); // //# 10: continued - x = const Symbol('var'); // //# 10: continued - x = const Symbol('while'); // //# 10: continued - x = const Symbol('with'); // //# 10: continued - x = #break; // //# 11: continued - x = #case; // //# 11: continued - x = #catch; // //# 11: continued - x = #class; // //# 11: continued - x = #const; // //# 11: continued - x = #continue; // //# 11: continued - x = #default; // //# 11: continued - x = #do; // //# 11: continued - x = #else; // //# 11: continued - x = #enum; // //# 11: continued - x = #extends; // //# 11: continued - x = #false; // //# 11: continued - x = #final; // //# 11: continued - x = #finally; // //# 11: continued - x = #for; // //# 11: continued - x = #if; // //# 11: continued - x = #in; // //# 11: continued - x = #is; // //# 11: continued - x = #new; // //# 11: continued - x = #null; // //# 11: continued - x = #rethrow; // //# 11: continued - x = #return; // //# 11: continued - x = #super; // //# 11: continued - x = #switch; // //# 11: continued - x = #this; // //# 11: continued - x = #throw; // //# 11: continued - x = #true; // //# 11: continued - x = #try; // //# 11: continued - x = #var; // //# 11: continued - x = #while; // //# 11: continued - x = #with; // //# 11: continued - checkBadSymbol('assert'); // //# 12: ok - checkBadSymbol('break'); // //# 12: continued - checkBadSymbol('case'); // //# 12: continued - checkBadSymbol('catch'); // //# 12: continued - checkBadSymbol('class'); // //# 12: continued - checkBadSymbol('const'); // //# 12: continued - checkBadSymbol('continue'); // //# 12: continued - checkBadSymbol('default'); // //# 12: continued - checkBadSymbol('do'); // //# 12: continued - checkBadSymbol('else'); // //# 12: continued - checkBadSymbol('enum'); // //# 12: continued - checkBadSymbol('extends'); // //# 12: continued - checkBadSymbol('false'); // //# 12: continued - checkBadSymbol('final'); // //# 12: continued - checkBadSymbol('finally'); // //# 12: continued - checkBadSymbol('for'); // //# 12: continued - checkBadSymbol('if'); // //# 12: continued - checkBadSymbol('in'); // //# 12: continued - checkBadSymbol('is'); // //# 12: continued - checkBadSymbol('new'); // //# 12: continued - checkBadSymbol('null'); // //# 12: continued - checkBadSymbol('rethrow'); // //# 12: continued - checkBadSymbol('return'); // //# 12: continued - checkBadSymbol('super'); // //# 12: continued - checkBadSymbol('switch'); // //# 12: continued - checkBadSymbol('this'); // //# 12: continued - checkBadSymbol('throw'); // //# 12: continued - checkBadSymbol('true'); // //# 12: continued - checkBadSymbol('try'); // //# 12: continued - checkBadSymbol('var'); // //# 12: continued - checkBadSymbol('while'); // //# 12: continued - checkBadSymbol('with'); // //# 12: continued -} diff --git a/tests/corelib_2/symbol_test.dart b/tests/corelib_2/symbol_test.dart deleted file mode 100644 index 1cda51e68de..00000000000 --- a/tests/corelib_2/symbol_test.dart +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2013, 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 - -// Basic test of Symbol class. - -main() { - var x; - print(x = const Symbol('fisk')); - try { - print(const Symbol(0)); //# 01: compile-time error - } on NoSuchMethodError { - print('Caught NoSuchMethodError'); - } on TypeError { - print('Caught TypeError'); - } - - try { - print(const Symbol('0')); //# 02: compile-time error - } on ArgumentError catch (e) { - print('Caught $e'); - } - - try { - print(const Symbol('_')); //# 03: compile-time error - } on ArgumentError catch (e) { - print('Caught $e'); - } - - try { - print(new Symbol('0')); - throw 'Expected an ArgumentError'; - } on ArgumentError catch (e) { - print('Caught $e'); - } - - try { - print(new Symbol('_')); - throw 'Expected an ArgumentError'; - } on ArgumentError catch (e) { - print('Caught $e'); - } - - if (!identical(const Symbol('fisk'), x)) { - throw 'Symbol constant is not canonicalized'; - } - - if (const Symbol('fisk') != x) { - throw 'Symbol constant is not equal to itself'; - } - - if (const Symbol('fisk') != new Symbol('fisk')) { - throw 'Symbol constant is not equal to its non-const equivalent'; - } - - if (new Symbol('fisk') != new Symbol('fisk')) { - throw 'new Symbol is not equal to its equivalent'; - } - - if (new Symbol('fisk') == new Symbol('hest')) { - throw 'unrelated Symbols are equal'; - } - - if (new Symbol('fisk') == new Object()) { - throw 'unrelated objects are equal'; - } - - x.hashCode as int; - - new Symbol('fisk').hashCode as int; - - if (new Symbol('fisk').hashCode != x.hashCode) { - throw "non-const Symbol's hashCode not equal to its const equivalent"; - } - - if (new Symbol('') != Symbol.empty) { - throw 'empty Symbol not equals to itself'; - } -} diff --git a/tests/corelib_2/throw_half_surrogate_pair_test.dart b/tests/corelib_2/throw_half_surrogate_pair_test.dart deleted file mode 100644 index 69d40e7394e..00000000000 --- a/tests/corelib_2/throw_half_surrogate_pair_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2014, 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() { - var trebleClef = "\u{1D11E}"; - if (trebleClef.length != 2) throw "String should be a surrogate pair"; - // These uncaught exceptions should not cause the VM to crash attempting to - // print a malformed string. - throw trebleClef[0]; // //# 01: runtime error - throw trebleClef[1]; // //# 02: runtime error -} diff --git a/tests/corelib_2/toInt_test.dart b/tests/corelib_2/toInt_test.dart deleted file mode 100644 index b10154d75a0..00000000000 --- a/tests/corelib_2/toInt_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -main() { - Expect.equals(-0x80000001, (-0x80000001).toInt()); - Expect.equals(-0x80000000, (-0x80000000 - 0.7).toInt()); - Expect.equals(-0x80000000, (-0x80000000 - 0.3).toInt()); - Expect.equals(-0x7FFFFFFF, (-0x80000000 + 0.3).toInt()); - Expect.equals(-0x7FFFFFFF, (-0x80000000 + 0.7).toInt()); - Expect.equals(-0x7FFFFFFF, (-0x7FFFFFFF).toInt()); - Expect.equals(0x7FFFFFFE, (0x7FFFFFFE).toInt()); - Expect.equals(0x7FFFFFFE, (0x7FFFFFFF - 0.7).toInt()); - Expect.equals(0x7FFFFFFE, (0x7FFFFFFF - 0.3).toInt()); - Expect.equals(0x7FFFFFFF, (0x7FFFFFFF + 0.3).toInt()); - Expect.equals(0x7FFFFFFF, (0x7FFFFFFF + 0.7).toInt()); - Expect.equals(0x80000000, 0x80000000.toInt()); -} diff --git a/tests/corelib_2/type_hashcode_test.dart b/tests/corelib_2/type_hashcode_test.dart deleted file mode 100644 index 859c26ffcbb..00000000000 --- a/tests/corelib_2/type_hashcode_test.dart +++ /dev/null @@ -1,13 +0,0 @@ - -// @dart = 2.9 -import "package:expect/expect.dart"; - -void main() { - var h = "hello", w = "world"; - Expect.notEquals(h.hashCode, w.hashCode); - Expect.notEquals((String).hashCode, (int).hashCode); - var c = h.runtimeType.hashCode; - Expect.isTrue(c is int); - Expect.notEquals(c, null); - Expect.notEquals(c, 0); -} diff --git a/tests/corelib_2/type_tostring_test.dart b/tests/corelib_2/type_tostring_test.dart deleted file mode 100644 index ca420bc14e1..00000000000 --- a/tests/corelib_2/type_tostring_test.dart +++ /dev/null @@ -1,135 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Testing the behavior of `Type.toString`. -// -// The behavior is *unspecified*, but users may depend on it. -// This test ensures that we do not change the format inadvertently. -// If we decide to change the format, it should be deliberate and consistent. - -import "dart:async" show FutureOr; - -import "package:expect/expect.dart"; - -void expectType(Type type, Pattern text) { - var typeString = "$type"; - if (typeString.contains("minified:")) { - return; // No checks for minimized types. - } - if (text is String) { - Expect.equals(text, typeString); - return; - } - var match = text.matchAsPrefix(typeString); - if (match != null && match.end == typeString.length) return; - Expect.fail( - "$typeString was not matched by $text${match == null ? "" : ", match: ${match[0]}"}"); -} - -void expect(Pattern text) { - expectType(T, text); -} - -void main() { - // Simple interface types. - expect("int"); - expect("Object"); - expect("Null"); - expect("Base"); - expect("Mixin"); - // Named mixin applications use their name. - expect("MixinApplication"); - - // Non-class, non-function types. - expect("void"); - expect("dynamic"); - expect("Function"); - // TODO: Add Never with NNBD. - - // Generic interface types. - expect>("List"); - expect>("Iterable"); - expect, Future>>("Map, Future>"); - expect>("GenericMixin"); - - // Generic non-class, non-function type. - expect>("FutureOr"); - expect>("Object"); - expect>>>( - "FutureOr>>"); - expect>("Future?"); - // TODO: Add nullable types with NNBD. - - // Private names may be mangled. - expect<_Private>(re(r'_Private\b.*$')); - - // Function types. - expect("() => void"); - expect("() => String"); - expect("(String) => String"); - expect("(int, [String]) => String"); - expect("(int, {String z}) => String"); - expect("((String) => void) => int"); - expect("(String) => (void) => int"); - - // A type alias is expanded to its type. - expect("(dynamic) => dynamic"); - expect>("(int) => int"); - expectType(Typedef, "(dynamic) => dynamic"); - - // Generic functions do not promise to preserve type variable names, - // but do keep the structure of `(params) => result`. - - // Cannot pass a generic type as type argument, so passing the Type object - // derived from evaluating the typedef name. - - // Format: () => void - expectType(G0, re(r"<\w+>\(\) => void$")); - // Format: () => T - expectType(G1, re(r"<(\w+)>\(\) => \1$")); - // Format: (T) => T - expectType(G2, re(r"<(\w+)>\(\1\) => \1$")); - // Format: ((S, T) => S) => T - expectType(G3, re(r"<(\w+)>\(<(\w+)>\(\2, \1\) => \2\) => \1$")); - // Format: (S) => (S, T) => S - expectType(G4, re(r"<(\w+)>\(\1\) => <(\w+)>\(\1, \2\) => \1$")); - // Format: (S, T) => S - expectType(G5, re(r"<(\w+), (\w+)>\(\1, \2\) => \1$")); - - // Format: ((S) => S) => T - expectType(Weird, re(r"<(\w+)>\(<(\w+)>\(\2\) => \2\) => \1$")); - - // One with everything. - expect(Map>)])>>( - // Format: FutureOr<([(Map S>) => T]) => void> - re(r"FutureOr<\(\[<(\w+), (\w+)>\(Map \1>\) => \2\]\) => void>$")); -} - -// Types to test against. -class _Private {} - -class Base {} - -mixin Mixin {} - -class MixinApplication = Base with Mixin; - -mixin GenericMixin implements List {} - -typedef Typedef = T Function(T); - -// Generic function types. -typedef G0 = void Function(); -typedef G1 = T Function(); -typedef G2 = T Function(T); -typedef G3 = T Function(S Function(S, T)); -typedef G4 = S Function(S, T) Function(S); -typedef G5 = S Function(S, T); - -typedef Weird = X Function(X Function(X)); - -RegExp re(String source) => RegExp(source); diff --git a/tests/corelib_2/typed_data_with_limited_ints_test.dart b/tests/corelib_2/typed_data_with_limited_ints_test.dart deleted file mode 100644 index aaa1df1ca38..00000000000 --- a/tests/corelib_2/typed_data_with_limited_ints_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2017, 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. -// VMOptions=--optimization_counter_threshold=10 --no-background-compilation - -// @dart = 2.9 - -// Test for dart:typed_data (in particular, ByteData.get/setUint64 and -// UInt64List) with limited 64-bit integers. - -import 'dart:typed_data'; -import "package:expect/expect.dart"; - -testByteData() { - ByteData data = new ByteData(17); - - data.setInt64(5, -0x1122334455667788); - Expect.equals(-0x1122334455667788, data.getUint64(5)); - - data.setUint32(5, 0x10203040); - Expect.equals(0x10203040aa998878, data.getUint64(5)); - - data.setUint64(3, -1); - Expect.equals(-1, data.getInt64(3)); - - data.setUint64(7, 0x7fedcba987654321); - Expect.equals(0x7fedcba987654321, data.getInt64(7)); -} - -testUint64List() { - Uint64List u64 = new Uint64List(3); - Int64List i64 = new Int64List.view(u64.buffer); - - i64[0] = 0x7fffffffffffffff; - i64[1] = -1; - i64[2] = 42; - - Expect.equals(0x7fffffffffffffff, u64[0]); - Expect.equals(-1, u64[1]); - Expect.equals(42, u64[2]); - - u64[0] = -900000000000000; - Expect.equals(-900000000000000, i64[0]); -} - -main() { - for (int i = 0; i < 20; i++) { - testByteData(); - testUint64List(); - } -} diff --git a/tests/corelib_2/unicode2_test.dart b/tests/corelib_2/unicode2_test.dart deleted file mode 100755 index f641a554ae8..00000000000 --- a/tests/corelib_2/unicode2_test.dart +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'package:expect/expect.dart'; - -const String testPhrase = "The quick brown fox jumps over the lazy dog."; - -const List testCodepoints = const [ - 84, - 104, - 101, - 32, - 113, - 117, - 105, - 99, - 107, - 32, - 98, - 114, - 111, - 119, - 110, - 32, - 102, - 111, - 120, - 32, - 106, - 117, - 109, - 112, - 115, - 32, - 111, - 118, - 101, - 114, - 32, - 116, - 104, - 101, - 32, - 108, - 97, - 122, - 121, - 32, - 100, - 111, - 103, - 46 -]; - -main() { - testCodepointsToString(); - testStringCharCodes(); - testEmptyStringFromCharCodes(); - testEmptyStringCharCodes(); -} - -void testStringCharCodes() { - Expect.listEquals(testCodepoints, testPhrase.codeUnits); -} - -void testCodepointsToString() { - Expect.stringEquals(testPhrase, new String.fromCharCodes(testCodepoints)); -} - -void testEmptyStringFromCharCodes() { - Expect.stringEquals("", new String.fromCharCodes([])); -} - -void testEmptyStringCharCodes() { - Expect.listEquals([], "".codeUnits); -} diff --git a/tests/corelib_2/unicode_test.dart b/tests/corelib_2/unicode_test.dart deleted file mode 100644 index aaa9cf60c43..00000000000 --- a/tests/corelib_2/unicode_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class UnicodeTest { - static testMain() { - var lowerStrasse = new String.fromCharCodes([115, 116, 114, 97, 223, 101]); - Expect.equals("STRASSE", lowerStrasse.toUpperCase()); - } -} - -main() { - UnicodeTest.testMain(); -} diff --git a/tests/corelib_2/uri_base_test.dart b/tests/corelib_2/uri_base_test.dart deleted file mode 100644 index eb35e610806..00000000000 --- a/tests/corelib_2/uri_base_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - try { - Uri base = Uri.base; - Expect.isTrue(Uri.base.isScheme("file") || Uri.base.isScheme("http")); - } on UnsupportedError catch (e) { - Expect.isTrue(e.toString().contains("'Uri.base' is not supported")); - } -} diff --git a/tests/corelib_2/uri_file_test.dart b/tests/corelib_2/uri_file_test.dart deleted file mode 100644 index 198220cbaa5..00000000000 --- a/tests/corelib_2/uri_file_test.dart +++ /dev/null @@ -1,295 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -testFileUri() { - final unsupported = new UnsupportedError(""); - - var tests = [ - ["", "", ""], - ["relative", "relative", "relative"], - ["relative/", "relative/", "relative\\"], - ["a%20b", "a b", "a b"], - ["a%20b/", "a b/", "a b\\"], - ["a/b", "a/b", "a\\b"], - ["a/b/", "a/b/", "a\\b\\"], - ["a%20b/c%20d", "a b/c d", "a b\\c d"], - ["a%20b/c%20d/", "a b/c d/", "a b\\c d\\"], - ["file:///absolute", "/absolute", "\\absolute"], - ["file:///absolute", "/absolute", "\\absolute"], - ["file:///a/b", "/a/b", "\\a\\b"], - ["file:///a/b", "/a/b", "\\a\\b"], - ["file://server/a/b", unsupported, "\\\\server\\a\\b"], - ["file://server/a/b/", unsupported, "\\\\server\\a\\b\\"], - ["file:///C:/", "/C:/", "C:\\"], - ["file:///C:/a/b", "/C:/a/b", "C:\\a\\b"], - ["file:///C:/a/b/", "/C:/a/b/", "C:\\a\\b\\"], - ["http:/a/b", unsupported, unsupported], - ["https:/a/b", unsupported, unsupported], - ["urn:a:b", unsupported, unsupported], - ]; - - void check(String s, filePath, bool windows) { - Uri uri = Uri.parse(s); - if (filePath is Error) { - if (filePath is UnsupportedError) { - Expect.throwsUnsupportedError(() => uri.toFilePath(windows: windows)); - } else { - Expect.throws(() => uri.toFilePath(windows: windows)); - } - } else { - Expect.equals(filePath, uri.toFilePath(windows: windows)); - Expect.equals(s, new Uri.file(filePath, windows: windows).toString()); - } - } - - for (var test in tests) { - check(test[0], test[1], false); - check(test[0], test[2], true); - } - - Uri uri; - uri = Uri.parse("file:a"); - Expect.equals("/a", uri.toFilePath(windows: false)); - Expect.equals("\\a", uri.toFilePath(windows: true)); - uri = Uri.parse("file:a/"); - Expect.equals("/a/", uri.toFilePath(windows: false)); - Expect.equals("\\a\\", uri.toFilePath(windows: true)); -} - -testFileUriWindowsSlash() { - var tests = [ - ["", "", ""], - ["relative", "relative", "relative"], - ["relative/", "relative/", "relative\\"], - ["a%20b", "a b", "a b"], - ["a%20b/", "a b/", "a b\\"], - ["a/b", "a/b", "a\\b"], - ["a/b/", "a/b/", "a\\b\\"], - ["a%20b/c%20d", "a b/c d", "a b\\c d"], - ["a%20b/c%20d/", "a b/c d/", "a b\\c d\\"], - ["file:///absolute", "/absolute", "\\absolute"], - ["file:///absolute", "/absolute", "\\absolute"], - ["file:///a/b", "/a/b", "\\a\\b"], - ["file:///a/b", "/a/b", "\\a\\b"], - ["file://server/a/b", "//server/a/b", "\\\\server\\a\\b"], - ["file://server/a/b/", "//server/a/b/", "\\\\server\\a\\b\\"], - ["file:///C:/", "C:/", "C:\\"], - ["file:///C:/a/b", "C:/a/b", "C:\\a\\b"], - ["file:///C:/a/b/", "C:/a/b/", "C:\\a\\b\\"], - ]; - - for (var test in tests) { - Uri uri = new Uri.file(test[1], windows: true); - Expect.equals(test[0], uri.toString()); - Expect.equals(test[2], uri.toFilePath(windows: true)); - bool couldBeDir = uri.path.isEmpty || uri.path.endsWith('\\'); - Uri dirUri = new Uri.directory(test[1], windows: true); - Expect.isTrue(dirUri.path.isEmpty || dirUri.path.endsWith('/')); - if (couldBeDir) { - Expect.equals(uri, dirUri); - } - } -} - -testFileUriWindowsWin32Namespace() { - var tests = [ - ["\\\\?\\C:\\", "file:///C:/", "C:\\"], - ["\\\\?\\C:\\", "file:///C:/", "C:\\"], - [ - "\\\\?\\UNC\\server\\share\\file", - "file://server/share/file", - "\\\\server\\share\\file" - ], - ]; - - for (var test in tests) { - Uri uri = new Uri.file(test[0], windows: true); - Expect.equals(test[1], uri.toString()); - Expect.equals(test[2], uri.toFilePath(windows: true)); - } - - Expect.throwsArgumentError(() => new Uri.file("\\\\?\\file", windows: true)); - Expect.throwsArgumentError( - () => new Uri.file("\\\\?\\UNX\\server\\share\\file", windows: true)); - Expect.throwsArgumentError( - () => new Uri.directory("\\\\?\\file", windows: true)); - Expect.throwsArgumentError(() => - new Uri.directory("\\\\?\\UNX\\server\\share\\file", windows: true)); -} - -testFileUriDriveLetter() { - check(String s, String nonWindows, String windows) { - Uri uri; - uri = Uri.parse(s); - Expect.equals(nonWindows, uri.toFilePath(windows: false)); - if (windows != null) { - Expect.equals(windows, uri.toFilePath(windows: true)); - } else { - Expect.throwsUnsupportedError(() => uri.toFilePath(windows: true)); - } - } - - check("file:///C:", "/C:", "C:\\"); - check("file:///C:/", "/C:/", "C:\\"); - check("file:///C:a", "/C:a", null); - check("file:///C:a/", "/C:a/", null); - - Expect.throwsArgumentError(() => new Uri.file("C:", windows: true)); - Expect.throwsArgumentError(() => new Uri.file("C:a", windows: true)); - Expect.throwsArgumentError(() => new Uri.file("C:a\b", windows: true)); - Expect.throwsArgumentError(() => new Uri.directory("C:", windows: true)); - Expect.throwsArgumentError(() => new Uri.directory("C:a", windows: true)); - Expect.throwsArgumentError(() => new Uri.directory("C:a\b", windows: true)); -} - -testFileUriResolve() { - var tests = [ - ["file:///a", "/a", "", "\\a", ""], - ["file:///a/", "/a/", "", "\\a\\", ""], - ["file:///b", "/a", "b", "\\a", "b"], - ["file:///b/", "/a", "b/", "\\a", "b\\"], - ["file:///a/b", "/a/", "b", "\\a\\", "b"], - ["file:///a/b/", "/a/", "b/", "\\a\\", "b\\"], - ["file:///a/c/d", "/a/b", "c/d", "\\a\\b", "c\\d"], - ["file:///a/c/d/", "/a/b", "c/d/", "\\a\\b", "c\\d\\"], - ["file:///a/b/c/d", "/a/b/", "c/d", "\\a\\b\\", "c\\d"], - ["file:///a/b/c/d/", "/a/b/", "c/d/", "\\a\\b\\", "c\\d\\"], - ]; - - check(String s, String absolute, String relative, bool windows) { - Uri absoluteUri = new Uri.file(absolute, windows: windows); - Uri relativeUri = new Uri.file(relative, windows: windows); - String relativeString = windows ? relative.replaceAll("\\", "/") : relative; - Expect.equals(s, absoluteUri.resolve(relativeString).toString()); - Expect.equals(s, absoluteUri.resolveUri(relativeUri).toString()); - } - - for (var test in tests) { - check(test[0], test[1], test[2], false); - check(test[0], test[1], test[2], true); - check(test[0], test[1], test[4], true); - check(test[0], test[3], test[2], true); - check(test[0], test[3], test[4], true); - } -} - -testFileUriIllegalCharacters() { - // Slash is an invalid character in file names on both non-Windows - // and Windows. - Uri uri = Uri.parse("file:///a%2Fb"); - Expect.throwsUnsupportedError(() => uri.toFilePath(windows: false)); - Expect.throwsUnsupportedError(() => uri.toFilePath(windows: true)); - - // Illegal characters in windows file names. - var illegalWindowsPaths = [ - "ab", - "a:b", - "a\"b", - "a|b", - "a?b", - "a*b", - "\\\\?\\c:\\a/b" - ]; - - for (var test in illegalWindowsPaths) { - Expect.throwsArgumentError(() => new Uri.file(test, windows: true)); - Expect.throwsArgumentError(() => new Uri.file("\\$test", windows: true)); - Expect.throwsArgumentError(() => new Uri.directory(test, windows: true)); - Expect - .throwsArgumentError(() => new Uri.directory("\\$test", windows: true)); - - // It is possible to create non-Windows URIs, but not Windows URIs. - Uri uri = new Uri.file(test, windows: false); - Uri absoluteUri = new Uri.file("/$test", windows: false); - Uri dirUri = new Uri.directory(test, windows: false); - Uri dirAbsoluteUri = new Uri.directory("/$test", windows: false); - Expect.throwsArgumentError(() => new Uri.file(test, windows: true)); - Expect.throwsArgumentError(() => new Uri.file("\\$test", windows: true)); - Expect.throwsArgumentError(() => new Uri.directory(test, windows: true)); - Expect - .throwsArgumentError(() => new Uri.directory("\\$test", windows: true)); - - // It is possible to extract non-Windows file path, but not - // Windows file path. - Expect.equals(test, uri.toFilePath(windows: false)); - Expect.equals("/$test", absoluteUri.toFilePath(windows: false)); - Expect.equals("$test/", dirUri.toFilePath(windows: false)); - Expect.equals("/$test/", dirAbsoluteUri.toFilePath(windows: false)); - Expect.throwsUnsupportedError(() => uri.toFilePath(windows: true)); - Expect.throwsUnsupportedError(() => absoluteUri.toFilePath(windows: true)); - Expect.throwsUnsupportedError(() => dirUri.toFilePath(windows: true)); - Expect - .throwsUnsupportedError(() => dirAbsoluteUri.toFilePath(windows: true)); - } - - // Backslash - illegalWindowsPaths = ["a\\b", "a\\b\\"]; - for (var test in illegalWindowsPaths) { - // It is possible to create both non-Windows URIs, and Windows URIs. - Uri uri = new Uri.file(test, windows: false); - Uri absoluteUri = new Uri.file("/$test", windows: false); - Uri dirUri = new Uri.directory(test, windows: false); - Uri dirAbsoluteUri = new Uri.directory("/$test", windows: false); - new Uri.file(test, windows: true); - new Uri.file("\\$test", windows: true); - - // It is possible to extract non-Windows file path, but not - // Windows file path from the non-Windows URI (it has a backslash - // in a path segment). - Expect.equals(test, uri.toFilePath(windows: false)); - Expect.equals("/$test", absoluteUri.toFilePath(windows: false)); - Expect.equals("$test/", dirUri.toFilePath(windows: false)); - Expect.equals("/$test/", dirAbsoluteUri.toFilePath(windows: false)); - Expect.throwsUnsupportedError(() => uri.toFilePath(windows: true)); - Expect.throwsUnsupportedError(() => absoluteUri.toFilePath(windows: true)); - Expect.throwsUnsupportedError(() => dirUri.toFilePath(windows: true)); - Expect - .throwsUnsupportedError(() => dirAbsoluteUri.toFilePath(windows: true)); - } -} - -testFileUriIllegalDriveLetter() { - Expect.throwsArgumentError(() => new Uri.file("1:\\", windows: true)); - Expect.throwsArgumentError(() => new Uri.directory("1:\\", windows: true)); - Uri uri = new Uri.file("1:\\", windows: false); - Uri dirUri = new Uri.directory("1:\\", windows: false); - Expect.equals("1:\\", uri.toFilePath(windows: false)); - Expect.equals("1:\\/", dirUri.toFilePath(windows: false)); - Expect.throwsUnsupportedError(() => uri.toFilePath(windows: true)); - Expect.throwsUnsupportedError(() => dirUri.toFilePath(windows: true)); -} - -testAdditionalComponents() { - check(String s, {bool windowsOk: false}) { - Uri uri = Uri.parse(s); - Expect.throwsUnsupportedError(() => uri.toFilePath(windows: false)); - if (windowsOk) { - Expect.isTrue(uri.toFilePath(windows: true) is String); - } else { - Expect.throwsUnsupportedError(() => uri.toFilePath(windows: true)); - } - } - - check("file:///path?query"); - check("file:///path#fragment"); - check("file:///path?query#fragment"); - check("file://host/path", windowsOk: true); - check("file://user:password@host/path", windowsOk: true); -} - -main() { - testFileUri(); - testFileUriWindowsSlash(); - testFileUriDriveLetter(); - testFileUriWindowsWin32Namespace(); - testFileUriResolve(); - testFileUriIllegalCharacters(); - testFileUriIllegalDriveLetter(); - testAdditionalComponents(); -} diff --git a/tests/corelib_2/uri_http_test.dart b/tests/corelib_2/uri_http_test.dart deleted file mode 100644 index 2441c28afaa..00000000000 --- a/tests/corelib_2/uri_http_test.dart +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -void testHttpUri() { - void check(Uri uri, String expected) { - Expect.equals(expected, uri.toString()); - } - - check(new Uri.http("", ""), "http:"); - check(new Uri.http(""), "http:"); - check(new Uri.http("@:", ""), "http://"); - check(new Uri.http("@:"), "http://"); - check(new Uri.http("@:8080", ""), "http://:8080"); - check(new Uri.http("@:8080"), "http://:8080"); - check(new Uri.http("@host:", ""), "http://host"); - check(new Uri.http("@host:"), "http://host"); - check(new Uri.http("xxx:yyy@host:8080", ""), "http://xxx:yyy@host:8080"); - check(new Uri.http("host", "a"), "http://host/a"); - check(new Uri.http("host", "/a"), "http://host/a"); - check(new Uri.http("host", "a/"), "http://host/a/"); - check(new Uri.http("host", "/a/"), "http://host/a/"); - check(new Uri.http("host", "a/b"), "http://host/a/b"); - check(new Uri.http("host", "/a/b"), "http://host/a/b"); - check(new Uri.http("host", "a/b/"), "http://host/a/b/"); - check(new Uri.http("host", "/a/b/"), "http://host/a/b/"); - check(new Uri.http("host", "a b"), "http://host/a%20b"); - check(new Uri.http("host", "/a b"), "http://host/a%20b"); - check(new Uri.http("host", "/a b/"), "http://host/a%20b/"); - check(new Uri.http("host", "/a%2F"), "http://host/a%252F"); - check(new Uri.http("host", "/a%2F/"), "http://host/a%252F/"); - check(new Uri.http("host", "/a/b", {"c": "d"}), "http://host/a/b?c=d"); - check( - new Uri.http("host", "/a/b", {"c=": "&d"}), "http://host/a/b?c%3D=%26d"); - check(new Uri.http("[::]", "a"), "http://[::]/a"); - check(new Uri.http("[::127.0.0.1]", "a"), "http://[::127.0.0.1]/a"); - check(new Uri.http('[fe80::8eae:4c4d:fee9:8434%rename3]', ''), - 'http://[fe80::8eae:4c4d:fee9:8434%25rename3]'); - check(new Uri.http('[ff02::1%1%41]', ''), 'http://[ff02::1%251a]'); - check(new Uri.http('[ff02::1%321]', ''), 'http://[ff02::1%25321]'); - check(new Uri.http('[ff02::1%%321]', ''), 'http://[ff02::1%2521]'); -} - -void testHttpsUri() { - void check(Uri uri, String expected) { - Expect.equals(expected, uri.toString()); - } - - check(new Uri.https("", ""), "https:"); - check(new Uri.https("@:", ""), "https://"); - check(new Uri.https("@:8080", ""), "https://:8080"); - check(new Uri.https("@host:", ""), "https://host"); - check(new Uri.https("@host:", ""), "https://host"); - check(new Uri.https("xxx:yyy@host:8080", ""), "https://xxx:yyy@host:8080"); - check(new Uri.https("host", "a"), "https://host/a"); - check(new Uri.https("host", "/a"), "https://host/a"); - check(new Uri.https("host", "a/"), "https://host/a/"); - check(new Uri.https("host", "/a/"), "https://host/a/"); - check(new Uri.https("host", "a/b"), "https://host/a/b"); - check(new Uri.https("host", "/a/b"), "https://host/a/b"); - check(new Uri.https("host", "a/b/"), "https://host/a/b/"); - check(new Uri.https("host", "/a/b/"), "https://host/a/b/"); - check(new Uri.https("host", "a b"), "https://host/a%20b"); - check(new Uri.https("host", "/a b"), "https://host/a%20b"); - check(new Uri.https("host", "/a b/"), "https://host/a%20b/"); - check(new Uri.https("host", "/a%2F"), "https://host/a%252F"); - check(new Uri.https("host", "/a%2F/"), "https://host/a%252F/"); - check(new Uri.https("host", "/a/b", {"c": "d"}), "https://host/a/b?c=d"); - check(new Uri.https("host", "/a/b", {"c=": "&d"}), - "https://host/a/b?c%3D=%26d"); - check(new Uri.https("[::]", "a"), "https://[::]/a"); - check(new Uri.https("[::127.0.0.1]", "a"), "https://[::127.0.0.1]/a"); -} - -void testResolveHttpScheme() { - String s = "//myserver:1234/path/some/thing"; - Uri uri = Uri.parse(s); - Uri http = new Uri(scheme: "http"); - Uri https = new Uri(scheme: "https"); - Expect.equals("http:$s", http.resolveUri(uri).toString()); - Expect.equals("https:$s", https.resolveUri(uri).toString()); -} - -void testQuery() { - var uri = Uri.http("example.com", "a/b", { - "a": "b", - "c": ["d", "e"] - }); - Expect.equals(uri.toString(), "http://example.com/a/b?a=b&c=d&c=e"); - Expect.listEquals(uri.queryParametersAll["c"], ["d", "e"]); - - uri = Uri.https("example.com", "a/b", { - "a": "b", - "c": ["d", "e"] - }); - Expect.equals(uri.toString(), "https://example.com/a/b?a=b&c=d&c=e"); - Expect.listEquals(uri.queryParametersAll["c"], ["d", "e"]); - - uri = Uri.http("example.com", "a/b", { - "a b c": ["d e", "f g"] - }); - Expect.equals(uri.toString(), "http://example.com/a/b?a+b+c=d+e&a+b+c=f+g"); - uri = Uri.https("example.com", "a/b", { - "a b c": ["d e", "f g"] - }); - Expect.equals(uri.toString(), "https://example.com/a/b?a+b+c=d+e&a+b+c=f+g"); -} - -main() { - testHttpUri(); - testHttpsUri(); - testResolveHttpScheme(); - testQuery(); -} diff --git a/tests/corelib_2/uri_ipv4_test.dart b/tests/corelib_2/uri_ipv4_test.dart deleted file mode 100644 index d2780b533e2..00000000000 --- a/tests/corelib_2/uri_ipv4_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'package:expect/expect.dart'; - -void testParseIPv4Address() { - void pass(String host, List out) { - Expect.listEquals(Uri.parseIPv4Address(host), out); - } - - void fail(String host) { - Expect.throwsFormatException(() => Uri.parseIPv4Address(host)); - } - - pass('127.0.0.1', [127, 0, 0, 1]); - pass('128.0.0.1', [128, 0, 0, 1]); - pass('255.255.255.255', [255, 255, 255, 255]); - pass('0.0.0.0', [0, 0, 0, 0]); - fail('127.0.0.-1'); - fail('255.255.255.256'); - fail('0.0.0.0.'); - fail('0.0.0.0.0'); - fail('a.0.0.0'); - fail('0.0..0'); -} - -void main() { - testParseIPv4Address(); -} diff --git a/tests/corelib_2/uri_ipv6_test.dart b/tests/corelib_2/uri_ipv6_test.dart deleted file mode 100644 index 8bd10bdbedf..00000000000 --- a/tests/corelib_2/uri_ipv6_test.dart +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'package:expect/expect.dart'; - -void testValidIpv6Uri() { - var path = 'http://[::1]:1234/path?query=5#now'; - var uri = Uri.parse(path); - Expect.equals('http', uri.scheme); - Expect.equals('::1', uri.host); - Expect.equals(1234, uri.port); - Expect.equals('/path', uri.path); - Expect.equals('query=5', uri.query); - Expect.equals('now', uri.fragment); - Expect.equals(path, uri.toString()); - - path = 'http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:8080/index.html'; - uri = Uri.parse(path); - Expect.equals('http', uri.scheme); - Expect.equals('fedc:ba98:7654:3210:fedc:ba98:7654:3210', uri.host); - Expect.equals(8080, uri.port); - Expect.equals('/index.html', uri.path); - Expect.equals(path.toLowerCase(), uri.toString()); - - path = 'http://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:80/index.html'; - uri = Uri.parse(path); - Expect.equals('http', uri.scheme); - Expect.equals('fedc:ba98:7654:3210:fedc:ba98:7654:3210', uri.host); - Expect.equals(80, uri.port); - Expect.equals('/index.html', uri.path); - Expect.equals('http://[fedc:ba98:7654:3210:fedc:ba98:7654:3210]/index.html', - uri.toString()); - - path = 'https://[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:443/index.html'; - uri = Uri.parse(path); - Expect.equals('https', uri.scheme); - Expect.equals('fedc:ba98:7654:3210:fedc:ba98:7654:3210', uri.host); - Expect.equals(443, uri.port); - Expect.equals('/index.html', uri.path); - Expect.equals('https://[fedc:ba98:7654:3210:fedc:ba98:7654:3210]/index.html', - uri.toString()); - - path = 'http://[1080:0:0:0:8:800:200C:417A]/index.html'; - uri = Uri.parse(path); - Expect.equals('http', uri.scheme); - Expect.equals('1080:0:0:0:8:800:200c:417a', uri.host); - Expect.equals(80, uri.port); - Expect.equals('/index.html', uri.path); - Expect.equals(path.toLowerCase(), uri.toString()); - - path = 'http://[3ffe:2a00:100:7031::1]'; - uri = Uri.parse(path); - Expect.equals('http', uri.scheme); - Expect.equals('3ffe:2a00:100:7031::1', uri.host); - Expect.equals(80, uri.port); - Expect.equals('', uri.path); - Expect.equals(path, uri.toString()); - - path = 'http://[1080::8:800:200C:417A]/foo'; - uri = Uri.parse(path); - Expect.equals('http', uri.scheme); - Expect.equals('1080::8:800:200c:417a', uri.host); - Expect.equals(80, uri.port); - Expect.equals('/foo', uri.path); - Expect.equals(path.toLowerCase(), uri.toString()); - - path = 'http://[::192.9.5.5]/ipng'; - uri = Uri.parse(path); - Expect.equals('http', uri.scheme); - Expect.equals('::192.9.5.5', uri.host); - Expect.equals(80, uri.port); - Expect.equals('/ipng', uri.path); - Expect.equals(path, uri.toString()); - - path = 'http://[::FFFF:129.144.52.38]:8080/index.html'; - uri = Uri.parse(path); - Expect.equals('http', uri.scheme); - Expect.equals('::ffff:129.144.52.38', uri.host); - Expect.equals(8080, uri.port); - Expect.equals('/index.html', uri.path); - Expect.equals(path.toLowerCase(), uri.toString()); - - path = 'http://[::FFFF:129.144.52.38]:80/index.html'; - uri = Uri.parse(path); - Expect.equals('http', uri.scheme); - Expect.equals('::ffff:129.144.52.38', uri.host); - Expect.equals(80, uri.port); - Expect.equals('/index.html', uri.path); - Expect.equals('http://[::ffff:129.144.52.38]/index.html', uri.toString()); - - path = 'https://[::FFFF:129.144.52.38]:443/index.html'; - uri = Uri.parse(path); - Expect.equals('https', uri.scheme); - Expect.equals('::ffff:129.144.52.38', uri.host); - Expect.equals(443, uri.port); - Expect.equals('/index.html', uri.path); - Expect.equals('https://[::ffff:129.144.52.38]/index.html', uri.toString()); - - path = 'http://[2010:836B:4179::836B:4179]'; - uri = Uri.parse(path); - Expect.equals('http', uri.scheme); - Expect.equals('2010:836b:4179::836b:4179', uri.host); - Expect.equals(80, uri.port); - Expect.equals('', uri.path); - Expect.equals(path.toLowerCase(), uri.toString()); - - // Checks for ZoneID in RFC 6874 - path = 'https://[fe80::a%en1]:443/index.html'; - uri = Uri.parse(path); - Expect.equals('https', uri.scheme); - Expect.equals('fe80::a%25en1', uri.host); - Expect.equals(443, uri.port); - Expect.equals('/index.html', uri.path); - Expect.equals('https://[fe80::a%25en1]/index.html', uri.toString()); - - path = 'https://[fe80::a%25eE1]:443/index.html'; - uri = Uri.parse(path); - Expect.equals('https', uri.scheme); - Expect.equals('fe80::a%25eE1', uri.host); - Expect.equals(443, uri.port); - Expect.equals('/index.html', uri.path); - Expect.equals('https://[fe80::a%25eE1]/index.html', uri.toString()); - - // Recognize bare '%' and transform into '%25' - path = 'https://[fe80::a%1]:443/index.html'; - uri = Uri.parse(path); - Expect.equals('https', uri.scheme); - Expect.equals('fe80::a%251', uri.host); - Expect.equals(443, uri.port); - Expect.equals('/index.html', uri.path); - Expect.equals('https://[fe80::a%251]/index.html', uri.toString()); - - path = 'https://[ff02::5678%pvc1.3]/index.html'; - uri = Uri.parse(path); - Expect.equals('https', uri.scheme); - Expect.equals('ff02::5678%25pvc1.3', uri.host); - Expect.equals('/index.html', uri.path); - Expect.equals('https://[ff02::5678%25pvc1.3]/index.html', uri.toString()); - - // ZoneID contains percent encoded - path = 'https://[ff02::1%%321]/index.html'; - uri = Uri.parse(path); - Expect.equals('https', uri.scheme); - Expect.equals('ff02::1%2521', uri.host); - Expect.equals('/index.html', uri.path); - Expect.equals('https://[ff02::1%2521]/index.html', uri.toString()); - - path = 'https://[ff02::1%321]/index.html'; - uri = Uri.parse(path); - Expect.equals('https', uri.scheme); - Expect.equals('ff02::1%25321', uri.host); - Expect.equals('/index.html', uri.path); - Expect.equals('https://[ff02::1%25321]/index.html', uri.toString()); - - // Lower cases - path = 'https://[ff02::1%1%41]/index.html'; - uri = Uri.parse(path); - Expect.equals('https', uri.scheme); - Expect.equals('ff02::1%251a', uri.host); - Expect.equals('/index.html', uri.path); - Expect.equals('https://[ff02::1%251a]/index.html', uri.toString()); - - path = 'https://[fe80::8eae:4c4d:fee9:8434%rename3]/index.html'; - uri = Uri.parse(path); - Expect.equals('https', uri.scheme); - Expect.equals('fe80::8eae:4c4d:fee9:8434%25rename3', uri.host); - Expect.equals('/index.html', uri.path); - Expect.equals('https://[fe80::8eae:4c4d:fee9:8434%25rename3]/index.html', - uri.toString()); - - // Test constructors with host name - uri = Uri(scheme: 'https', host: '[ff02::5678%pvc1.3]'); - uri = Uri(scheme: 'https', host: '[fe80::a%1]'); - uri = Uri(scheme: 'https', host: '[fe80::a%25eE1]'); - uri = Uri(scheme: 'https', host: '[fe80::a%en1]'); -} - -void testParseIPv6Address() { - void pass(String host, List expected) { - Expect.listEquals(expected, Uri.parseIPv6Address(host)); - } - - void fail(String host) { - Expect.throwsFormatException(() => Uri.parseIPv6Address(host)); - } - - pass('::127.0.0.1', [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 0, 0, 1]); - pass('0::127.0.0.1', [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 0, 0, 1]); - pass('::', [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); - pass('0::', [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); - fail(':0::127.0.0.1'); - fail('0:::'); - fail(':::'); - fail('::0:'); - fail('::0::'); - fail('::0::0'); - fail('00000::0'); - fail('-1::0'); - fail('-AAA::0'); - fail('0::127.0.0.1:0'); - fail('0::127.0.0'); - pass('0::1111', [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 17]); - pass('2010:836B:4179::836B:4179', - [32, 16, 131, 107, 65, 121, 0, 0, 0, 0, 0, 0, 131, 107, 65, 121]); - fail('2010:836B:4179:0000:127.0.0.1'); - fail('2010:836B:4179:0000:0000:127.0.0.1'); - fail('2010:836B:4179:0000:0000:0000::127.0.0.1'); - fail('2010:836B:4179:0000:0000:0000:0000:127.0.0.1'); - pass('2010:836B:4179:0000:0000:0000:127.0.0.1', - [32, 16, 131, 107, 65, 121, 0, 0, 0, 0, 0, 0, 127, 0, 0, 1]); -} - -void main() { - testValidIpv6Uri(); - testParseIPv6Address(); -} diff --git a/tests/corelib_2/uri_normalize_path_test.dart b/tests/corelib_2/uri_normalize_path_test.dart deleted file mode 100644 index 9c4ce4e2edc..00000000000 --- a/tests/corelib_2/uri_normalize_path_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2012, 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 uriNormalizePathTest; - -import "package:expect/expect.dart"; - -test(String path, String normalizedPath) { - for (var scheme in ["http", "file", "unknown"]) { - for (var auth in [ - [null, "hostname", null], - ["userinfo", "hostname", 1234], - [null, null, null] - ]) { - for (var query in [null, "query"]) { - for (var fragment in [null, "fragment"]) { - var base = new Uri( - scheme: scheme, - userInfo: auth[0], - host: auth[1], - port: auth[2], - path: path, - query: query, - fragment: fragment); - var expected = base.replace( - path: (base.hasAuthority && normalizedPath.isEmpty) - ? "/" - : normalizedPath); - var actual = base.normalizePath(); - Expect.equals(expected, actual, "$base"); - } - } - } - } -} - -testNoChange(String path) { - test(path, path); -} - -main() { - testNoChange("foo/bar/baz"); - testNoChange("/foo/bar/baz"); - testNoChange("foo/bar/baz/"); - test("foo/bar/..", "foo/"); - test("foo/bar/.", "foo/bar/"); - test("foo/./bar/../baz", "foo/baz"); - test("../../foo", "foo"); - test("./../foo", "foo"); - test("./../", ""); - test("./../.", ""); - test("foo/bar/baz/../../../../qux", "/qux"); - test("/foo/bar/baz/../../../../qux", "/qux"); - test(".", ""); - test("..", ""); - test("/.", "/"); - test("/..", "/"); -} diff --git a/tests/corelib_2/uri_normalize_test.dart b/tests/corelib_2/uri_normalize_test.dart deleted file mode 100644 index 5a978404682..00000000000 --- a/tests/corelib_2/uri_normalize_test.dart +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -testNormalizePath() { - test(String expected, String path, {String scheme, String host}) { - var uri = new Uri(scheme: scheme, host: host, path: path); - Expect.equals(expected, uri.toString()); - if (scheme == null && host == null) { - Expect.equals(expected, uri.path); - } - } - - var unreserved = "-._~0123456789" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz"; - - test("A", "%41"); - test("AB", "%41%42"); - test("%40AB", "%40%41%42"); - test("a", "%61"); - test("ab", "%61%62"); - test("%60ab", "%60%61%62"); - test(unreserved, unreserved); - - var x = new StringBuffer(); - for (int i = 32; i < 128; i++) { - if (unreserved.indexOf(new String.fromCharCode(i)) != -1) { - x.writeCharCode(i); - } else { - x.write("%"); - x.write(i.toRadixString(16)); - } - } - Expect.equals(x.toString().toUpperCase(), - new Uri(path: x.toString()).toString().toUpperCase()); - - // Normalized paths. - - // Full absolute path normalization for absolute paths. - test("/a/b/c/", "/../a/./b/z/../c/d/.."); - test("/a/b/c/", "/./a/b/c/"); - test("/a/b/c/", "/./../a/b/c/"); - test("/a/b/c/", "/./../a/b/c/."); - test("/a/b/c/", "/./../a/b/c/z/./.."); - test("/", "/a/.."); - // Full absolute path normalization for URIs with scheme. - test("s:a/b/c/", "../a/./b/z/../c/d/..", scheme: "s"); - test("s:a/b/c/", "./a/b/c/", scheme: "s"); - test("s:a/b/c/", "./../a/b/c/", scheme: "s"); - test("s:a/b/c/", "./../a/b/c/.", scheme: "s"); - test("s:a/b/c/", "./../a/b/c/z/./..", scheme: "s"); - test("s:/", "/a/..", scheme: "s"); - test("s:/", "a/..", scheme: "s"); - // Full absolute path normalization for URIs with authority. - test("//h/a/b/c/", "../a/./b/z/../c/d/..", host: "h"); - test("//h/a/b/c/", "./a/b/c/", host: "h"); - test("//h/a/b/c/", "./../a/b/c/", host: "h"); - test("//h/a/b/c/", "./../a/b/c/.", host: "h"); - test("//h/a/b/c/", "./../a/b/c/z/./..", host: "h"); - test("//h/", "/a/..", host: "h"); - test("//h/", "a/..", host: "h"); - // Partial relative normalization (allowing leading .. or ./ for current dir). - test("../a/b/c/", "../a/./b/z/../c/d/.."); - test("a/b/c/", "./a/b/c/"); - test("../a/b/c/", "./../a/b/c/"); - test("../a/b/c/", "./../a/b/c/."); - test("../a/b/c/", "./../a/b/c/z/./.."); - test("/", "/a/.."); - test("./", "a/.."); -} - -main() { - testNormalizePath(); -} diff --git a/tests/corelib_2/uri_parameters_all_test.dart b/tests/corelib_2/uri_parameters_all_test.dart deleted file mode 100644 index b540a701da1..00000000000 --- a/tests/corelib_2/uri_parameters_all_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; -import 'dart:convert'; - -main() { - testAll(["a", "b", "c"]); - testAll([""]); - testAll(["a"]); - testAll(["", ""]); - testAll(["baz"]); - - testParse("z&y&w&z", { - "z": ["", ""], - "y": [""], - "w": [""] - }); - testParse("x=42&y=42&x=37&y=37", { - "x": ["42", "37"], - "y": ["42", "37"] - }); - testParse("x&x&x&x&x", { - "x": ["", "", "", "", ""] - }); - testParse("x=&&y", { - "x": [""], - "y": [""] - }); -} - -testAll(List values) { - var uri = - new Uri(scheme: "foo", path: "bar", queryParameters: {"baz": values}); - var list = uri.queryParametersAll["baz"]; - Expect.listEquals(values, list); -} - -testParse(query, results) { - var uri = new Uri(scheme: "foo", path: "bar", query: query); - var params = uri.queryParametersAll; - for (var k in results.keys) { - Expect.listEquals(results[k], params[k]); - } - uri = new Uri(scheme: "foo", path: "bar", queryParameters: results); - params = uri.queryParametersAll; - for (var k in results.keys) { - Expect.listEquals(results[k], params[k]); - } -} diff --git a/tests/corelib_2/uri_parse_test.dart b/tests/corelib_2/uri_parse_test.dart deleted file mode 100644 index 6fdced31648..00000000000 --- a/tests/corelib_2/uri_parse_test.dart +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -void testUriCombi() { - var schemes = ["", "file", "ws", "ftp"]; - var fragments = ["", "#", "#f", "#fragment", "#l:?/"]; - var queries = ["", "?", "?q", "?query", "?q:/"]; - var paths = ["/", "/x", "/x/y", "/x/y/", "/x:y", "x", "x/y", "x/y/"]; - var userInfos = ["", "x", "xxx", "x:4", "xxx:444", "x:4:x"]; - var hosts = ["", "h", "hhh", "h:4", "hhh:444", "[::1.2.3.4]"]; - - void check(uriString, scheme, fragment, query, path, user, host) { - for (var uri in [ - Uri.parse(uriString), - Uri.parse(">\u{10000}>$uriString<\u{10000}<", 4, uriString.length + 4), - Uri.parse( - "http://example.com/$uriString#?:/[]\"", 19, uriString.length + 19), - Uri.parse(uriString * 3, uriString.length, uriString.length * 2) - ]) { - String name = "$uriString -> $uri"; - Expect.equals(scheme, uri.scheme, name); - var uriFragment = uri.fragment; - if (fragment.startsWith('#')) uriFragment = "#$uriFragment"; - Expect.equals(fragment, uriFragment, name); - var uriQuery = uri.query; - if (query.startsWith('?')) uriQuery = "?$uriQuery"; - Expect.equals(query, uriQuery, name); - Expect.equals(path, uri.path, name); - Expect.equals(user, uri.userInfo, name); - var uriHost = uri.host; - if (host.startsWith("[")) uriHost = "[$uriHost]"; - if (uri.port != 0) uriHost += ":${uri.port}"; - Expect.equals(host, uriHost, name); - } - } - - for (var scheme in schemes) { - for (var fragment in fragments) { - for (var query in queries) { - for (var path in paths) { - // File scheme URIs always get a leading slash. - if (scheme == "file" && !path.startsWith('/')) continue; - for (var user in userInfos) { - for (var host in hosts) { - var auth = host; - var s = scheme; - if (user.isNotEmpty) auth = "$user@$auth"; - if (auth.isNotEmpty) auth = "//$auth"; - if (auth.isNotEmpty && !path.startsWith('/')) continue; - check( - "$scheme${scheme.isEmpty ? "" : ":"}" - "$auth$path$query$fragment", - scheme, - fragment, - query, - path, - user, - host); - } - } - } - } - } - } -} - -void main() { - testUriCombi(); -} diff --git a/tests/corelib_2/uri_path_test.dart b/tests/corelib_2/uri_path_test.dart deleted file mode 100644 index 984c44e1778..00000000000 --- a/tests/corelib_2/uri_path_test.dart +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) 2013, 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 - -import "dart:collection"; - -import "package:expect/expect.dart"; - -void testInvalidArguments() {} - -void testPath() { - void test(s, uri) { - Expect.equals(s, uri.toString()); - Expect.equals(uri, Uri.parse(s)); - } - - test("http:", new Uri(scheme: "http")); - test("http://host/xxx", new Uri(scheme: "http", host: "host", path: "xxx")); - test("http://host/xxx", new Uri(scheme: "http", host: "host", path: "/xxx")); - test("http://host/xxx", - new Uri(scheme: "http", host: "host", pathSegments: ["xxx"])); - test("http://host/xxx/yyy", - new Uri(scheme: "http", host: "host", path: "xxx/yyy")); - test("http://host/xxx/yyy", - new Uri(scheme: "http", host: "host", path: "/xxx/yyy")); - test("http://host/xxx/yyy", - new Uri(scheme: "http", host: "host", pathSegments: ["xxx", "yyy"])); - - test("urn:", new Uri(scheme: "urn")); - test("urn:xxx", new Uri(scheme: "urn", path: "xxx")); - test("urn:xxx:yyy", new Uri(scheme: "urn", path: "xxx:yyy")); - - Expect.equals(3, new Uri(path: "xxx/yyy/zzz").pathSegments.length); - Expect.equals(3, new Uri(path: "/xxx/yyy/zzz").pathSegments.length); - Expect.equals(3, Uri.parse("http://host/xxx/yyy/zzz").pathSegments.length); - Expect.equals(3, Uri.parse("file:///xxx/yyy/zzz").pathSegments.length); -} - -void testPathSegments() { - void test(String path, List segments) { - void check(uri) { - Expect.equals(path, uri.path); - Expect.equals(path, uri.toString()); - Expect.listEquals(segments, uri.pathSegments); - } - - var uri1 = new Uri(pathSegments: segments); - var uri2 = new Uri(path: path); - check(uri1); - check(uri2); - Expect.equals(uri1, uri2); - } - - test("", []); - test("%20", [" "]); - test("%20/%20%20", [" ", " "]); - test("A", ["A"]); - test("%C3%B8", ["ø"]); - test("%C3%B8/%C3%A5", ["ø", "å"]); - test("%C8%A4/%E5%B9%B3%E4%BB%AE%E5%90%8D", ["Ȥ", "平仮名"]); - test("A/b", ["A", "b"]); - test("A/%25", ["A", "%"]); - test("%2F/a%2Fb", ["/", "a/b"]); - test("name;v=1.1", ["name;v=1.1"]); - test("name,v=1.1", ["name,v=1.1"]); - test("name;v=1.1/name,v=1.1", ["name;v=1.1", "name,v=1.1"]); - - var unreserved = "-._~0123456789" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz"; - var subDelimiters = r"!$&'()*+,;="; - var additionalPathChars = ":@"; - var pchar = unreserved + subDelimiters + additionalPathChars; - - var encoded = new StringBuffer(); - var unencoded = new StringBuffer(); - for (int i = 32; i < 128; i++) { - if (pchar.indexOf(new String.fromCharCode(i)) != -1) { - encoded.writeCharCode(i); - } else { - encoded.write("%"); - encoded.write(i.toRadixString(16).toUpperCase()); - } - unencoded.writeCharCode(i); - } - var encodedStr = encoded.toString(); - var unencodedStr = unencoded.toString(); - test(encodedStr, [unencodedStr]); - test(encodedStr + "/" + encodedStr, [unencodedStr, unencodedStr]); - - Uri uri; - var pathSegments = ["xxx", "yyy", "zzz"]; - - uri = new Uri(pathSegments: pathSegments); - Expect.equals(3, uri.pathSegments.length); - uri = new Uri(pathSegments: pathSegments.where((_) => true)); - Expect.equals(3, uri.pathSegments.length); - uri = new Uri(pathSegments: new DoubleLinkedQueue.from(pathSegments)); - Expect.equals(3, uri.pathSegments.length); - - uri = new Uri(scheme: "http", host: "host", pathSegments: pathSegments); - Expect.equals(3, uri.pathSegments.length); - uri = new Uri( - scheme: "http", - host: "host", - pathSegments: pathSegments.where((_) => true)); - Expect.equals(3, uri.pathSegments.length); - uri = new Uri( - scheme: "http", - host: "host", - pathSegments: new DoubleLinkedQueue.from(pathSegments)); - Expect.equals(3, uri.pathSegments.length); - - uri = new Uri(scheme: "file", pathSegments: pathSegments); - Expect.equals(3, uri.pathSegments.length); - uri = new Uri(scheme: "file", pathSegments: pathSegments.where((_) => true)); - Expect.equals(3, uri.pathSegments.length); - uri = new Uri( - scheme: "file", pathSegments: new DoubleLinkedQueue.from(pathSegments)); - Expect.equals(3, uri.pathSegments.length); -} - -void testPathCompare() { - void test(Uri uri1, Uri uri2) { - Expect.equals(uri1, uri2); - Expect.equals(uri2, uri1); - } - - test(new Uri(scheme: "http", host: "host", path: "xxx"), - new Uri(scheme: "http", host: "host", path: "/xxx")); - test(new Uri(scheme: "http", host: "host", pathSegments: ["xxx"]), - new Uri(scheme: "http", host: "host", path: "/xxx")); - test(new Uri(scheme: "http", host: "host", pathSegments: ["xxx"]), - new Uri(scheme: "http", host: "host", path: "xxx")); - test(new Uri(scheme: "file", path: "xxx"), - new Uri(scheme: "file", path: "/xxx")); - test(new Uri(scheme: "file", pathSegments: ["xxx"]), - new Uri(scheme: "file", path: "/xxx")); - test(new Uri(scheme: "file", pathSegments: ["xxx"]), - new Uri(scheme: "file", path: "xxx")); -} - -testPathSegmentsUnmodifiableList() { - void test(list) { - Expect.equals("a", list[0]); - Expect.throwsUnsupportedError(() => list[0] = "c"); - Expect.equals(2, list.length); - Expect.throwsUnsupportedError(() => list.length = 1); - Expect.throwsUnsupportedError(() => list.add("c")); - Expect.throwsUnsupportedError(() => list.addAll(["c", "d"])); - Expect.listEquals(["b", "a"], list.reversed.toList()); - Expect.throws(() => list.sort()); - Expect.equals(0, list.indexOf("a")); - Expect.equals(0, list.lastIndexOf("a")); - Expect.throwsUnsupportedError(() => list.clear()); - Expect.throwsUnsupportedError(() => list.insert(1, "c")); - Expect.throwsUnsupportedError(() => list.insertAll(1, ["c", "d"])); - Expect.throwsUnsupportedError(() => list.setAll(1, ["c", "d"])); - Expect.throwsUnsupportedError(() => list.remove("a")); - Expect.throwsUnsupportedError(() => list.removeAt(0)); - Expect.throwsUnsupportedError(() => list.removeLast()); - Expect.throwsUnsupportedError(() => list.removeWhere((e) => true)); - Expect.throwsUnsupportedError(() => list.retainWhere((e) => false)); - Expect.listEquals(["a"], list.sublist(0, 1)); - Expect.listEquals(["a"], list.getRange(0, 1).toList()); - Expect.throwsUnsupportedError(() => list.setRange(0, 1, ["c"])); - Expect.throwsUnsupportedError(() => list.removeRange(0, 1)); - Expect.throwsUnsupportedError(() => list.fillRange(0, 1, "c")); - Expect.throwsUnsupportedError(() => list.replaceRange(0, 1, ["c"])); - Map map = new Map(); - map[0] = "a"; - map[1] = "b"; - Expect.mapEquals(list.asMap(), map); - } - - test(Uri.parse("a/b").pathSegments); - test(new Uri(pathSegments: ["a", "b"]).pathSegments); -} - -main() { - testInvalidArguments(); - testPath(); - testPathSegments(); - testPathCompare(); - testPathSegmentsUnmodifiableList(); -} diff --git a/tests/corelib_2/uri_query_test.dart b/tests/corelib_2/uri_query_test.dart deleted file mode 100644 index 6684cc457fc..00000000000 --- a/tests/corelib_2/uri_query_test.dart +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -void testInvalidArguments() {} - -void testEncodeQueryComponent() { - // This exact data is from posting a form in Chrome 26 with the one - // exception that * is encoded as %30 and ~ is not encoded as %7E. - Expect.equals( - "%21%22%23%24%25%26%27%28%29%2A%2B%2C-.%2F%" - "3A%3B%3C%3D%3E%3F%40%5B%5C%5D%5E_%60%7B%7C%7D~", - Uri.encodeQueryComponent("!\"#\$%&'()*+,-./:;<=>?@[\\]^_`{|}~")); - Expect.equals("+%2B+", Uri.encodeQueryComponent(" + ")); - Expect.equals("%2B+%2B", Uri.encodeQueryComponent("+ +")); -} - -void testQueryParameters() { - test(String query, Map parameters, [String normalizedQuery]) { - if (normalizedQuery == null) normalizedQuery = query; - check(uri) { - Expect.isTrue(uri.hasQuery); - Expect.equals(normalizedQuery, uri.query); - Expect.equals("?$normalizedQuery", uri.toString()); - if (parameters.containsValue(null)) { - var map = new Map.from(parameters); - map.forEach((k, v) { - if (v == null) map[k] = ""; - }); - Expect.mapEquals(map, uri.queryParameters); - } else { - Expect.mapEquals(parameters, uri.queryParameters); - } - } - - var uri1 = new Uri(queryParameters: parameters); - var uri2 = new Uri(query: query); - var uri3 = Uri.parse("?$query"); - check(uri1); - if (query != "") { - check(uri2); - } else { - Expect.isFalse(uri2.hasQuery); - } - check(uri3); - Expect.equals(uri1, uri3); - if (query != "") Expect.equals(uri2, uri3); - if (parameters.containsValue(null)) { - var map = new Map.from(parameters); - map.forEach((k, v) { - if (v == null) map[k] = ""; - }); - Expect.mapEquals(map, Uri.splitQueryString(query)); - } else { - Expect.mapEquals(parameters, Uri.splitQueryString(query)); - } - } - - test("", {}); - test("A", {"A": null}); - test("%25", {"%": null}); - test("%41", {"A": null}, "A"); - test("%41A", {"AA": null}, "AA"); - test("A", {"A": ""}); - test("%25", {"%": ""}); - test("%41", {"A": ""}, "A"); - test("%41A", {"AA": ""}, "AA"); - test("A=a", {"A": "a"}); - test("%25=a", {"%": "a"}); - test("%41=%61", {"A": "a"}, "A=a"); - test("A=+", {"A": " "}); - test("A=%2B", {"A": "+"}); - test("A=a&B", {"A": "a", "B": null}); - test("A=a&B", {"A": "a", "B": ""}); - test("A=a&B=b", {"A": "a", "B": "b"}); - test("%41=%61&%42=%62", {"A": "a", "B": "b"}, "A=a&B=b"); - - var unreserved = "-._~0123456789" - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz"; - var encoded = new StringBuffer(); - var allEncoded = new StringBuffer(); - var unencoded = new StringBuffer(); - for (int i = 32; i < 128; i++) { - if (i == 32) { - encoded.write("+"); - } else if (unreserved.indexOf(new String.fromCharCode(i)) != -1) { - encoded.writeCharCode(i); - } else { - encoded.write("%"); - encoded.write(i.toRadixString(16).toUpperCase()); - } - if (i == 32) { - allEncoded.write("+"); - } else { - allEncoded.write("%"); - allEncoded.write(i.toRadixString(16).toUpperCase()); - } - unencoded.writeCharCode(i); - } - var encodedStr = encoded.toString(); - var unencodedStr = unencoded.toString(); - test("a=$encodedStr", {"a": unencodedStr}); - test("a=$encodedStr&b=$encodedStr", {"a": unencodedStr, "b": unencodedStr}); - - var map = {}; - map[unencodedStr] = unencodedStr; - test("$encodedStr=$encodedStr", map); - test("$encodedStr=$allEncoded", map, "$encodedStr=$encodedStr"); - test("$allEncoded=$encodedStr", map, "$encodedStr=$encodedStr"); - test("$allEncoded=$allEncoded", map, "$encodedStr=$encodedStr"); - map[unencodedStr] = null; - test("$encodedStr", map); - map[unencodedStr] = ""; - test("$encodedStr", map); -} - -testInvalidQueryParameters() { - test(String query, Map parameters) { - check(uri) { - Expect.equals(query, uri.query); - if (query.isEmpty) { - Expect.equals(query, uri.toString()); - } else { - Expect.equals("?$query", uri.toString()); - } - if (parameters.containsValue(null)) {} else { - Expect.mapEquals(parameters, uri.queryParameters); - } - } - - var uri1 = new Uri(query: query); - var uri2 = Uri.parse("?$query"); - check(uri1); - check(uri2); - Expect.equals(uri1, uri2); - } - - test("=", {}); - test("=xxx", {}); - test("===", {}); - test("=xxx=yyy=zzz", {}); - test("=&=&=", {}); - test("=xxx&=yyy&=zzz", {}); - test("&=&=&", {}); - test("&=xxx&=xxx&", {}); -} - -testQueryParametersImmutableMap() { - test(map) { - Expect.isTrue(map.containsValue("b")); - Expect.isTrue(map.containsKey("a")); - Expect.equals("b", map["a"]); - Expect.throwsUnsupportedError(() => map["a"] = "c"); - Expect.throwsUnsupportedError(() => map.putIfAbsent("b", () => "e")); - Expect.throwsUnsupportedError(() => map.remove("a")); - Expect.throwsUnsupportedError(() => map.clear()); - var count = 0; - map.forEach((key, value) => count++); - Expect.equals(2, count); - Expect.equals(2, map.keys.length); - Expect.equals(2, map.values.length); - Expect.equals(2, map.length); - Expect.isFalse(map.isEmpty); - Expect.isTrue(map.isNotEmpty); - } - - test(Uri.parse("?a=b&c=d").queryParameters); - test(new Uri(queryParameters: {"a": "b", "c": "d"}).queryParameters); -} - -main() { - testInvalidArguments(); - testEncodeQueryComponent(); - testQueryParameters(); - testInvalidQueryParameters(); - testQueryParametersImmutableMap(); -} diff --git a/tests/corelib_2/uri_scheme_test.dart b/tests/corelib_2/uri_scheme_test.dart deleted file mode 100644 index 1e5b03c6154..00000000000 --- a/tests/corelib_2/uri_scheme_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -void testInvalidArguments() { - Expect.throwsFormatException(() => new Uri(scheme: "_")); - Expect.throwsFormatException(() => new Uri(scheme: "http_s")); - Expect.throwsFormatException(() => new Uri(scheme: "127.0.0.1:80")); -} - -void testScheme() { - test(String expectedScheme, String expectedUri, String scheme) { - var uri = new Uri(scheme: scheme); - Expect.equals(expectedScheme, uri.scheme); - Expect.equals(expectedUri, uri.toString()); - uri = Uri.parse("$scheme:"); - Expect.equals(expectedScheme, uri.scheme); - Expect.equals(expectedUri, uri.toString()); - } - - test("http", "http:", "http"); - test("http", "http:", "HTTP"); - test("http", "http:", "hTTP"); - test("http", "http:", "Http"); - test("http+ssl", "http+ssl:", "HTTP+ssl"); - test("urn", "urn:", "urn"); - test("urn", "urn:", "UrN"); - test("a123.432", "a123.432:", "a123.432"); -} - -main() { - testInvalidArguments(); - testScheme(); -} diff --git a/tests/corelib_2/uri_test.dart b/tests/corelib_2/uri_test.dart deleted file mode 100644 index e9249050b99..00000000000 --- a/tests/corelib_2/uri_test.dart +++ /dev/null @@ -1,817 +0,0 @@ -// Copyright (c) 2012, 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 uriTest; - -import "package:expect/expect.dart"; -import 'dart:convert'; - -testUri(String uriText, bool isAbsolute) { - var uri = Uri.parse(uriText); - - Expect.equals(isAbsolute, uri.isAbsolute); - Expect.stringEquals(uriText, uri.toString()); - - // Test equals and hashCode members. - var uri2 = Uri.parse(uriText); - Expect.equals(uri, uri2); - Expect.equals(uri.hashCode, uri2.hashCode); - - // Test that removeFragment doesn't change anything else. - if (uri.hasFragment) { - Expect.equals(Uri.parse(uriText.substring(0, uriText.indexOf('#'))), - uri.removeFragment()); - } else { - Expect.equals(uri, Uri.parse(uriText + "#fragment").removeFragment()); - } -} - -testEncodeDecode(String orig, String encoded) { - var e = Uri.encodeFull(orig); - Expect.stringEquals(encoded, e); - var d = Uri.decodeFull(encoded); - Expect.stringEquals(orig, d); -} - -testEncodeDecodeComponent(String orig, String encoded) { - var e = Uri.encodeComponent(orig); - Expect.stringEquals(encoded, e); - var d = Uri.decodeComponent(encoded); - Expect.stringEquals(orig, d); -} - -testEncodeDecodeQueryComponent(String orig, String encodedUTF8, - String encodedLatin1, String encodedAscii) { - var e, d; - e = Uri.encodeQueryComponent(orig); - Expect.stringEquals(encodedUTF8, e); - d = Uri.decodeQueryComponent(encodedUTF8); - Expect.stringEquals(orig, d); - - e = Uri.encodeQueryComponent(orig, encoding: utf8); - Expect.stringEquals(encodedUTF8, e); - d = Uri.decodeQueryComponent(encodedUTF8, encoding: utf8); - Expect.stringEquals(orig, d); - - e = Uri.encodeQueryComponent(orig, encoding: latin1); - Expect.stringEquals(encodedLatin1, e); - d = Uri.decodeQueryComponent(encodedLatin1, encoding: latin1); - Expect.stringEquals(orig, d); - - if (encodedAscii != null) { - e = Uri.encodeQueryComponent(orig, encoding: ascii); - Expect.stringEquals(encodedAscii, e); - d = Uri.decodeQueryComponent(encodedAscii, encoding: ascii); - Expect.stringEquals(orig, d); - } else { - Expect.throwsArgumentError( - () => Uri.encodeQueryComponent(orig, encoding: ascii)); - } -} - -testUriPerRFCs() { - final urisSample = "http://a/b/c/d;p?q"; - Uri base = Uri.parse(urisSample); - testResolve(expect, relative) { - Expect.stringEquals(expect, base.resolve(relative).toString()); - } - - // From RFC 3986. - testResolve("g:h", "g:h"); - testResolve("http://a/b/c/g", "g"); - testResolve("http://a/b/c/g", "./g"); - testResolve("http://a/b/c/g/", "g/"); - testResolve("http://a/g", "/g"); - testResolve("http://g", "//g"); - testResolve("http://a/b/c/d;p?y", "?y"); - testResolve("http://a/b/c/g?y", "g?y"); - testResolve("http://a/b/c/d;p?q#s", "#s"); - testResolve("http://a/b/c/g#s", "g#s"); - testResolve("http://a/b/c/g?y#s", "g?y#s"); - testResolve("http://a/b/c/;x", ";x"); - testResolve("http://a/b/c/g;x", "g;x"); - testResolve("http://a/b/c/g;x?y#s", "g;x?y#s"); - testResolve("http://a/b/c/d;p?q", ""); - testResolve("http://a/b/c/", "."); - testResolve("http://a/b/c/", "./"); - testResolve("http://a/b/", ".."); - testResolve("http://a/b/", "../"); - testResolve("http://a/b/g", "../g"); - testResolve("http://a/", "../.."); - testResolve("http://a/", "../../"); - testResolve("http://a/g", "../../g"); - testResolve("http://a/g", "../../../g"); - testResolve("http://a/g", "../../../../g"); - testResolve("http://a/g", "/./g"); - testResolve("http://a/g", "/../g"); - testResolve("http://a/b/c/g.", "g."); - testResolve("http://a/b/c/.g", ".g"); - testResolve("http://a/b/c/g..", "g.."); - testResolve("http://a/b/c/..g", "..g"); - testResolve("http://a/b/g", "./../g"); - testResolve("http://a/b/c/g/", "./g/."); - testResolve("http://a/b/c/g/h", "g/./h"); - testResolve("http://a/b/c/h", "g/../h"); - testResolve("http://a/b/c/g;x=1/y", "g;x=1/./y"); - testResolve("http://a/b/c/y", "g;x=1/../y"); - testResolve("http://a/b/c/g?y/./x", "g?y/./x"); - testResolve("http://a/b/c/g?y/../x", "g?y/../x"); - testResolve("http://a/b/c/g#s/./x", "g#s/./x"); - testResolve("http://a/b/c/g#s/../x", "g#s/../x"); - testResolve("http:g", "http:g"); - - // Additional tests (not from RFC 3986). - testResolve("http://a/b/g;p/h;s", "../g;p/h;s"); - - // Test non-URI base (no scheme, no authority, relative path). - base = Uri.parse("a/b/c?_#_"); - testResolve("a/b/g?q#f", "g?q#f"); - testResolve("../", "../../.."); - testResolve("a/b/", "."); - testResolve("c", "../../c"); - - base = Uri.parse("s:a/b"); - testResolve("s:/c", "../c"); -} - -void testResolvePath(String expected, String path) { - Expect.equals( - expected, new Uri(path: '/').resolveUri(new Uri(path: path)).path); - Expect.equals("http://localhost$expected", - Uri.parse("http://localhost").resolveUri(new Uri(path: path)).toString()); -} - -const ALPHA = r"abcdefghijklmnopqrstuvwxuzABCDEFGHIJKLMNOPQRSTUVWXUZ"; -const DIGIT = r"0123456789"; -const PERCENT_ENCODED = "%00%ff"; -const SUBDELIM = r"!$&'()*+,;="; - -const SCHEMECHAR = "$ALPHA$DIGIT+-."; -const UNRESERVED = "$ALPHA$DIGIT-._~"; -const REGNAMECHAR = "$UNRESERVED$SUBDELIM$PERCENT_ENCODED"; -const USERINFOCHAR = "$REGNAMECHAR:"; - -const PCHAR_NC = "$UNRESERVED$SUBDELIM$PERCENT_ENCODED@"; -const PCHAR = "$PCHAR_NC:"; -const QUERYCHAR = "$PCHAR/?"; - -void testValidCharacters() { - // test that all valid characters are accepted. - - for (var scheme in ["", "$SCHEMECHAR$SCHEMECHAR:"]) { - for (var userinfo in [ - "", - "@", - "$USERINFOCHAR$USERINFOCHAR@", - "$USERINFOCHAR:$DIGIT@" - ]) { - for (var host in [ - "", "$REGNAMECHAR$REGNAMECHAR", - "255.255.255.256", // valid reg-name. - "[ffff::ffff:ffff]", "[ffff::255.255.255.255]" - ]) { - for (var port in ["", ":", ":$DIGIT$DIGIT"]) { - var auth = "$userinfo$host$port"; - if (auth.isNotEmpty) auth = "//$auth"; - var paths = ["", "/", "/$PCHAR", "/$PCHAR/"]; // Absolute or empty. - if (auth.isNotEmpty) { - // Initial segment may be empty. - paths..add("//$PCHAR"); - } else { - // Path may begin with non-slash. - if (scheme.isEmpty) { - // Initial segment must not contain colon. - paths - ..add(PCHAR_NC) - ..add("$PCHAR_NC/$PCHAR") - ..add("$PCHAR_NC/$PCHAR/"); - } else { - paths..add(PCHAR)..add("$PCHAR/$PCHAR")..add("$PCHAR/$PCHAR/"); - } - } - for (var path in paths) { - for (var query in ["", "?", "?$QUERYCHAR"]) { - for (var fragment in ["", "#", "#$QUERYCHAR"]) { - var uri = "$scheme$auth$path$query$fragment"; - // Should not throw. - var result = Uri.parse(uri); - } - } - } - } - } - } - } -} - -void testInvalidUrls() { - void checkInvalid(uri) { - try { - var result = Uri.parse(uri); - Expect.fail("Invalid URI `$uri` parsed to $result\n" + dump(result)); - } on FormatException { - // Success. - } - } - - checkInvalid("s%41://x.x/"); // No escapes in scheme, - // and no colon before slash in path. - checkInvalid("1a://x.x/"); // Scheme must start with letter, - // and no colon before slash in path. - checkInvalid(".a://x.x/"); // Scheme must start with letter, - // and no colon before slash in path. - checkInvalid("_:"); // Character not valid in scheme, - // and no colon before slash in path. - checkInvalid(":"); // Scheme must start with letter, - // and no colon before slash in path. - - void checkInvalidReplaced(uri, invalid, replacement) { - var source = uri.replaceAll('{}', invalid); - var expected = uri.replaceAll('{}', replacement); - var result = Uri.parse(source); - Expect.equals(expected, "$result", "Source: $source\n${dump(result)}"); - } - - // Regression test for http://dartbug.com/16081 - checkInvalidReplaced( - "http://www.example.org/red%09ros{}#red)", "\u00e9", "%C3%A9"); - checkInvalidReplaced("http://r{}sum\{}.example.org", "\u00E9", "%C3%A9"); - - // Invalid characters. The characters must be rejected, even if normalizing - // the input would cause them to be valid (normalization happens after - // validation). - var invalidCharsAndReplacements = [ - "\xe7", "%C3%A7", // Arbitrary non-ASCII letter - " ", "%20", // Space, not allowed anywhere. - '"', "%22", // Quote, not allowed anywhere - "<>", "%3C%3E", // Less/greater-than, not allowed anywhere. - "\x7f", "%7F", // DEL, not allowed anywhere - "\xdf", "%C3%9F", // German lower-case scharf-S. - // Becomes ASCII when upper-cased. - "\u0130", "%C4%B0", // Latin capital dotted I, - // becomes ASCII lower-case in Turkish. - "%\uFB03", "%25%EF%AC%83", // % + Ligature ffi, - // becomes ASCII when upper-cased, - // should not be read as "%FFI". - "\u212a", "%E2%84%AA", // Kelvin sign. Becomes ASCII when lower-cased. - "%1g", "%251g", // Invalid escape. - "\u{10000}", "%F0%90%80%80", // Non-BMP character as surrogate pair. - ]; - for (int i = 0; i < invalidCharsAndReplacements.length; i += 2) { - var invalid = invalidCharsAndReplacements[i]; - var valid = invalidCharsAndReplacements[i + 1]; - checkInvalid("A{}b:///".replaceAll('{}', invalid)); - checkInvalid("{}b:///".replaceAll('{}', invalid)); - checkInvalidReplaced("s://user{}info@x.x/", invalid, valid); - checkInvalidReplaced("s://reg{}name/", invalid, valid); - checkInvalid("s://regname:12{}45/".replaceAll("{}", invalid)); - checkInvalidReplaced("s://regname/p{}ath/", invalid, valid); - checkInvalidReplaced("/p{}ath/", invalid, valid); - checkInvalidReplaced("p{}ath/", invalid, valid); - checkInvalidReplaced("s://regname/path/?x{}x", invalid, valid); - checkInvalidReplaced("s://regname/path/#x{}x", invalid, valid); - checkInvalidReplaced("s://regname/path/??#x{}x", invalid, valid); - } - - // At most one @ in userinfo. - checkInvalid("s://x@x@x.x/"); - // No colon in host except before a port. - checkInvalid("s://x@x:x/"); - // At most one port. - checkInvalid("s://x@x:9:9/"); - // @ not allowed in scheme. - checkInvalid("s@://x:9/x?x#x"); - // ] not allowed alone in host. - checkInvalid("s://xx]/"); - // IPv6 must be enclosed in [ and ] for Uri.parse. - // It is allowed un-enclosed as argument to `Uri(host:...)` because we don't - // need to delimit. - checkInvalid("s://ffff::ffff:1234/"); -} - -void testNormalization() { - // The Uri constructor and the Uri.parse function performs RFC-3986 - // syntax based normalization. - - var uri; - - // Scheme: Only case normalization. Schemes cannot contain escapes. - uri = Uri.parse("A:"); - Expect.equals("a", uri.scheme); - uri = Uri.parse("Z:"); - Expect.equals("z", uri.scheme); - uri = Uri.parse("$SCHEMECHAR:"); - Expect.equals(SCHEMECHAR.toLowerCase(), uri.scheme); - - // Percent escape normalization. - // Escapes of unreserved characters are converted to the character, - // subject to case normalization in reg-name. - for (var i = 0; i < UNRESERVED.length; i++) { - var char = UNRESERVED[i]; - var escape = "%" + char.codeUnitAt(0).toRadixString(16); // all > 0xf. - - uri = Uri.parse("s://xX${escape}xX@yY${escape}yY/zZ${escape}zZ" - "?vV${escape}vV#wW${escape}wW"); - Expect.equals("xX${char}xX", uri.userInfo); - Expect.equals("yY${char}yY".toLowerCase(), uri.host); - Expect.equals("/zZ${char}zZ", uri.path); - Expect.equals("vV${char}vV", uri.query); - Expect.equals("wW${char}wW", uri.fragment); - } - - // Escapes of reserved characters are kept, but upper-cased. - for (var escape in ["%00", "%1f", "%7F", "%fF"]) { - uri = Uri.parse("s://xX${escape}xX@yY${escape}yY/zZ${escape}zZ" - "?vV${escape}vV#wW${escape}wW"); - var normalizedEscape = escape.toUpperCase(); - Expect.equals("xX${normalizedEscape}xX", uri.userInfo); - Expect.equals("yy${normalizedEscape}yy", uri.host); - Expect.equals("/zZ${normalizedEscape}zZ", uri.path); - Expect.equals("vV${normalizedEscape}vV", uri.query); - Expect.equals("wW${normalizedEscape}wW", uri.fragment); - } - - // Some host normalization edge cases. - uri = Uri.parse("x://x%61X%41x%41X%61x/"); - Expect.equals("xaxaxaxax", uri.host); - - uri = Uri.parse("x://Xxxxxxxx/"); - Expect.equals("xxxxxxxx", uri.host); - - uri = Uri.parse("x://xxxxxxxX/"); - Expect.equals("xxxxxxxx", uri.host); - - uri = Uri.parse("x://xxxxxxxx%61/"); - Expect.equals("xxxxxxxxa", uri.host); - - uri = Uri.parse("x://%61xxxxxxxx/"); - Expect.equals("axxxxxxxx", uri.host); - - uri = Uri.parse("x://X/"); - Expect.equals("x", uri.host); - - uri = Uri.parse("x://%61/"); - Expect.equals("a", uri.host); - - uri = new Uri(scheme: "x", path: "//y"); - Expect.equals("//y", uri.path); - Expect.equals("x:////y", uri.toString()); - - uri = new Uri(scheme: "file", path: "//y"); - Expect.equals("//y", uri.path); - Expect.equals("file:////y", uri.toString()); - - // File scheme noralizes to always showing authority, even if empty. - uri = new Uri(scheme: "file", path: "/y"); - Expect.equals("file:///y", uri.toString()); - uri = new Uri(scheme: "file", path: "y"); - Expect.equals("file:///y", uri.toString()); - - // Empty host/query/fragment ensures the delimiter is there. - // Different from not being there. - Expect.equals("scheme:/", Uri.parse("scheme:/").toString()); - Expect.equals("scheme:/", new Uri(scheme: "scheme", path: "/").toString()); - - Expect.equals("scheme:///?#", Uri.parse("scheme:///?#").toString()); - Expect.equals( - "scheme:///#", - new Uri(scheme: "scheme", host: "", path: "/", query: "", fragment: "") - .toString()); - - // We allow, and escape, general delimiters in paths, queries and fragments. - // Allow `[` and `]` in path: - Expect.equals("s:/%5B%5D", Uri.parse("s:/[]").toString()); - Expect.equals("s:%5B%5D", Uri.parse("s:[]").toString()); - Expect.equals("%5B%5D", Uri.parse("[]").toString()); - // Allow `[`, `]` and `?` in query (anything after *first* `?`). - // The `?` is not escaped. - Expect.equals("s://xx/?%5B%5D?", Uri.parse("s://xx/?[]?").toString()); - // Allow `[`, `]`, `?` and `#` in fragment (anything after *first* `#`). - // The `?` is not escaped. - Expect.equals("s://xx/#%5B%5D%23?", Uri.parse("s://xx/#[]#?").toString()); -} - -void testReplace() { - var uris = [ - Uri.parse(""), - Uri.parse("a://@:/?#"), - Uri.parse("a://b@c:4/e/f?g#h"), - Uri.parse("$SCHEMECHAR://$USERINFOCHAR@$REGNAMECHAR:$DIGIT/$PCHAR/$PCHAR" - "?$QUERYCHAR#$QUERYCHAR"), - ]; - for (var uri1 in uris) { - for (var uri2 in uris) { - if (identical(uri1, uri2)) continue; - var scheme = uri1.scheme; - var userInfo = uri1.hasAuthority ? uri1.userInfo : ""; - var host = uri1.hasAuthority ? uri1.host : null; - var port = uri1.hasAuthority ? uri1.port : 0; - var path = uri1.path; - var query = uri1.hasQuery ? uri1.query : null; - var fragment = uri1.hasFragment ? uri1.fragment : null; - - var tmp1 = uri1; - - void test() { - var tmp2 = new Uri( - scheme: scheme, - userInfo: userInfo, - host: host, - port: port, - path: path, - query: query == "" ? null : query, - queryParameters: query == "" ? {} : null, - fragment: fragment); - Expect.equals(tmp1, tmp2); - } - - test(); - - scheme = uri2.scheme; - tmp1 = tmp1.replace(scheme: scheme); - test(); - - if (uri2.hasAuthority) { - userInfo = uri2.userInfo; - host = uri2.host; - port = uri2.port; - tmp1 = tmp1.replace(userInfo: userInfo, host: host, port: port); - test(); - } - - path = uri2.path; - tmp1 = tmp1.replace(path: path); - test(); - - if (uri2.hasQuery) { - query = uri2.query; - tmp1 = tmp1.replace(query: query); - test(); - } - - if (uri2.hasFragment) { - fragment = uri2.fragment; - tmp1 = tmp1.replace(fragment: fragment); - test(); - } - } - } - - // Regression test, http://dartbug.com/20814 - var uri = Uri.parse("/no-authority/"); - uri = uri.replace(fragment: "fragment"); - Expect.isFalse(uri.hasAuthority); - - uri = new Uri(scheme: "foo", path: "bar"); - uri = uri.replace(queryParameters: { - "x": ["42", "37"], - "y": ["43", "38"] - }); - var params = uri.queryParametersAll; - Expect.equals(2, params.length); - Expect.listEquals(["42", "37"], params["x"]); - Expect.listEquals(["43", "38"], params["y"]); -} - -void testPackageUris() { - // A URI is recognized as a package URI if it has: - // * "package" as scheme - // * no authority - // * a first path segment - // * containing no `%`, - // * which is not all "." characters, - // * and which ends with a `/`. - // - // If so, the package name is unaffected by path resolution. - var uri = Uri.parse("package:foo/bar/baz"); // Simple base URI. - - Expect.stringEquals("package:foo/qux", // Resolve simple URI. - uri.resolve("../../qux").toString()); - - Expect.stringEquals("package:foo/qux", - uri.resolve("/qux").toString()); - - Expect.stringEquals("package:foo/qux?%2F", // Resolve non-simple URI. - uri.resolve("../../qux?%2F").toString()); - - Expect.stringEquals("package:foo/qux?%2F", - uri.resolve("/qux?%2F").toString()); - - uri = Uri.parse("package:foo/%62ar/baz"); // Non-simple base URI. - - Expect.stringEquals("package:foo/qux", // Resolve simple URI. - uri.resolve("../../qux").toString()); - - Expect.stringEquals("package:foo/qux", - uri.resolve("/qux").toString()); - - Expect.stringEquals("package:foo/qux?%2F", // Resolve non-simple URI. - uri.resolve("../../qux?%2F").toString()); - - Expect.stringEquals("package:foo/qux?%2F", - uri.resolve("/qux?%2F").toString()); - - // The following base URIs are not recognized as package URIs: - uri = Uri.parse("puckage:foo/bar/baz"); // Not "package" scheme. - - Expect.stringEquals("puckage:/qux", - uri.resolve("../../qux").toString()); - - Expect.stringEquals("puckage:/qux", - uri.resolve("/qux").toString()); - - uri = Uri.parse("package://foo/bar/baz"); // Has authority. - - Expect.stringEquals("package://foo/qux", - uri.resolve("../../qux").toString()); - - Expect.stringEquals("package://foo/qux", - uri.resolve("/qux").toString()); - - uri = Uri.parse("package:/foo/bar/baz"); // Has empty package name. - - Expect.stringEquals("package:/qux", - uri.resolve("../../qux").toString()); - - Expect.stringEquals("package:/qux", - uri.resolve("/qux").toString()); - - uri = Uri.parse("package:f%2fo/bar/baz"); // Has escape in package name. - - Expect.stringEquals("package:/qux", - uri.resolve("../../qux").toString()); - - Expect.stringEquals("package:/qux", - uri.resolve("/qux").toString()); - - uri = Uri.parse("package:f:o/bar/baz"); // Has colon in package name. - - Expect.stringEquals("package:/qux", - uri.resolve("../../qux").toString()); - - Expect.stringEquals("package:/qux", - uri.resolve("/qux").toString()); - - uri = Uri.parse("package:.../bar/baz"); // Has only '.' in package name. - - Expect.stringEquals("package:/qux", - uri.resolve("../../qux").toString()); - - Expect.stringEquals("package:/qux", - uri.resolve("/qux").toString()); - - uri = Uri.parse("package:foo?/"); // Has no `/` after package name. - - // Resolving relative against non-absolute path gives - // a non-absolute path again. - // TODO(lrn): Is this a bug? - Expect.stringEquals("package:qux", - uri.resolve("../../qux").toString()); - - Expect.stringEquals("package:/qux", - uri.resolve("/qux").toString()); -} - -void testBackslashes() { - // Tests change which makes `\` be treated as `/` in - // authority and path. - - Expect.stringEquals("https://example.com/", - Uri.parse(r"https:\\example.com\").toString()); - - Expect.stringEquals("https://example.com/", - Uri.parse(r"https:\/example.com/").toString()); - Expect.stringEquals("https://example.com/", - Uri.parse(r"https:/\example.com/").toString()); - Expect.stringEquals("https://example.com/", - Uri.parse(r"https://example.com/").toString()); - Expect.stringEquals("https://example.com/foo//bar", - Uri.parse(r"https://example.com/foo\\bar").toString()); - - Expect.stringEquals("https:/example.com/foo?%5C#%5C", - Uri.parse(r"https:\example.com/foo?\#\").toString()); - - Expect.stringEquals("https://example.com/@example.net/foo", - Uri.parse(r"https://example.com\@example.net/foo").toString()); - - Expect.stringEquals("file:///foo", - Uri.parse(r"file:foo").toString()); - Expect.stringEquals("file:///foo", - Uri.parse(r"file:\foo").toString()); - Expect.stringEquals("file://foo/", - Uri.parse(r"file:\\foo").toString()); - Expect.stringEquals("file:///foo", - Uri.parse(r"file:\\\foo").toString()); - Expect.stringEquals("file:///foo", - Uri.parse(r"file:\//foo").toString()); - Expect.stringEquals("file:///foo", - Uri.parse(r"file:/\/foo").toString()); - Expect.stringEquals("file:///foo", - Uri.parse(r"file://\foo").toString()); - - // No scheme. - Expect.stringEquals("//example.com/foo", - Uri.parse(r"\\example.com\foo").toString()); - - // No authority. - Expect.stringEquals("http:/foo", - Uri.parse(r"http:\foo").toString()); - - /// No scheme or authority. - - Expect.stringEquals("foo/bar/baz", - Uri.parse(r"foo\bar\baz").toString()); - - Expect.stringEquals("foo/bar/baz", - Uri.parse(r"foo\bar\.\baz").toString()); - - Expect.stringEquals("foo/baz", - Uri.parse(r"foo\bar\..\baz").toString()); - - // Not converted to / in query or fragment, still escaped. - Expect.stringEquals("https://example.com/foo?%5C#%5C", - Uri.parse(r"https://example.com/foo?\#\").toString()); - - // Applies when a path is provided, but not when using path segments. - Expect.stringEquals("https://example.com/foo/bar", - Uri(scheme: "https", host: "example.com", path: r"\foo\bar").toString()); - - Expect.stringEquals("https://example.com/foo%5Cbar", - Uri(scheme: "https", host: "example.com", pathSegments: [r"foo\bar"]) - .toString()); - - // Does not apply to constructors which expect an unencoded path. - Expect.stringEquals("http://example.com/%5Cfoo%5Cbar", - Uri.http("example.com", r"\foo\bar").toString()); - Expect.stringEquals("https://example.com/%5Cfoo%5Cbar", - Uri.https("example.com", r"\foo\bar").toString()); -} - -main() { - testUri("http:", true); - testUri("file:///", true); - testUri("file", false); - testUri("http://user@example.com:8080/fisk?query=89&hest=silas", true); - testUri( - "http://user@example.com:8080/fisk?query=89&hest=silas#fragment", false); - Expect.stringEquals( - "http://user@example.com/a/b/c?query#fragment", - new Uri( - scheme: "http", - userInfo: "user", - host: "example.com", - port: 80, - path: "/a/b/c", - query: "query", - fragment: "fragment") - .toString()); - Expect.stringEquals( - "/a/b/c/", - new Uri( - scheme: null, - userInfo: null, - host: null, - port: 0, - path: "/a/b/c/", - query: null, - fragment: null) - .toString()); - Expect.stringEquals("file:///", Uri.parse("file:").toString()); - - testResolvePath("/a/g", "/a/b/c/./../../g"); - testResolvePath("/a/g", "/a/b/c/./../../g"); - testResolvePath("/mid/6", "mid/content=5/../6"); - testResolvePath("/a/b/e", "a/b/c/d/../../e"); - testResolvePath("/a/b/e", "../a/b/c/d/../../e"); - testResolvePath("/a/b/e", "./a/b/c/d/../../e"); - testResolvePath("/a/b/e", "../a/b/./c/d/../../e"); - testResolvePath("/a/b/e", "./a/b/./c/d/../../e"); - testResolvePath("/a/b/e/", "./a/b/./c/d/../../e/."); - testResolvePath("/a/b/e/", "./a/b/./c/d/../../e/./."); - testResolvePath("/a/b/e/", "./a/b/./c/d/../../e/././."); - - testUriPerRFCs(); - - Expect.stringEquals( - "http://example.com", Uri.parse("http://example.com/a/b/c").origin); - Expect.stringEquals( - "https://example.com", Uri.parse("https://example.com/a/b/c").origin); - Expect.stringEquals("http://example.com:1234", - Uri.parse("http://example.com:1234/a/b/c").origin); - Expect.stringEquals("https://example.com:1234", - Uri.parse("https://example.com:1234/a/b/c").origin); - Expect.throwsStateError(() => Uri.parse("http:").origin, - "origin for uri with empty host should fail"); - Expect.throwsStateError( - () => new Uri( - scheme: "http", - userInfo: null, - host: "", - port: 80, - path: "/a/b/c", - query: "query", - fragment: "fragment") - .origin, - "origin for uri with empty host should fail"); - Expect.throwsStateError( - () => new Uri( - scheme: null, - userInfo: null, - host: "", - port: 80, - path: "/a/b/c", - query: "query", - fragment: "fragment") - .origin, - "origin for uri with empty scheme should fail"); - Expect.throwsStateError( - () => new Uri( - scheme: "http", - userInfo: null, - host: null, - port: 80, - path: "/a/b/c", - query: "query", - fragment: "fragment") - .origin, - "origin for uri with empty host should fail"); - Expect.throwsStateError(() => Uri.parse("http://:80").origin, - "origin for uri with empty host should fail"); - Expect.throwsStateError(() => Uri.parse("file://localhost/test.txt").origin, - "origin for non-http/https uri should fail"); - - // URI encode tests - // Create a string with code point 0x10000 encoded as a surrogate pair. - var s = utf8.decode([0xf0, 0x90, 0x80, 0x80]); - - Expect.stringEquals("\u{10000}", s); - - testEncodeDecode("A + B", "A%20+%20B"); - testEncodeDecode("\uFFFE", "%EF%BF%BE"); - testEncodeDecode("\uFFFF", "%EF%BF%BF"); - testEncodeDecode("\uFFFE", "%EF%BF%BE"); - testEncodeDecode("\uFFFF", "%EF%BF%BF"); - testEncodeDecode("\x7f", "%7F"); - testEncodeDecode("\x80", "%C2%80"); - testEncodeDecode("\u0800", "%E0%A0%80"); - // All characters not escaped by encodeFull. - var unescapedFull = r"abcdefghijklmnopqrstuvwxyz" - r"ABCDEFGHIJKLMNOPQRSTUVWXYZ" - r"0123456789!#$&'()*+,-./:;=?@_~"; - // ASCII characters escaped by encodeFull: - var escapedFull = - "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" - "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" - r' "%<>[\]^`{|}' - "\x7f"; - var escapedTo = "%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%0E%0F" - "%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F" - "%20%22%25%3C%3E%5B%5C%5D%5E%60%7B%7C%7D%7F"; - testEncodeDecode(unescapedFull, unescapedFull); - testEncodeDecode(escapedFull, escapedTo); - var nonAscii = - "\x80-\xff-\u{100}-\u{7ff}-\u{800}-\u{ffff}-\u{10000}-\u{10ffff}"; - var nonAsciiEncoding = "%C2%80-%C3%BF-%C4%80-%DF%BF-%E0%A0%80-%EF%BF%BF-" - "%F0%90%80%80-%F4%8F%BF%BF"; - testEncodeDecode(nonAscii, nonAsciiEncoding); - testEncodeDecode(s, "%F0%90%80%80"); - testEncodeDecodeComponent("A + B", "A%20%2B%20B"); - testEncodeDecodeComponent("\uFFFE", "%EF%BF%BE"); - testEncodeDecodeComponent("\uFFFF", "%EF%BF%BF"); - testEncodeDecodeComponent("\uFFFE", "%EF%BF%BE"); - testEncodeDecodeComponent("\uFFFF", "%EF%BF%BF"); - testEncodeDecodeComponent("\x7f", "%7F"); - testEncodeDecodeComponent("\x80", "%C2%80"); - testEncodeDecodeComponent("\u0800", "%E0%A0%80"); - testEncodeDecodeComponent(":/@',;?&=+\$", "%3A%2F%40'%2C%3B%3F%26%3D%2B%24"); - testEncodeDecodeComponent(s, "%F0%90%80%80"); - testEncodeDecodeQueryComponent("A + B", "A+%2B+B", "A+%2B+B", "A+%2B+B"); - testEncodeDecodeQueryComponent( - "æ ø å", "%C3%A6+%C3%B8+%C3%A5", "%E6+%F8+%E5", null); - testEncodeDecodeComponent(nonAscii, nonAsciiEncoding); - - // Invalid URI - : and @ is swapped, port ("host") should be numeric. - Expect.throwsFormatException( - () => Uri.parse("file://user@password:host/path")); - - testValidCharacters(); - testInvalidUrls(); - testNormalization(); - testReplace(); - testPackageUris(); - testBackslashes(); -} - -String dump(Uri uri) { - return "URI: $uri\n" - " Scheme: ${uri.scheme} #${uri.scheme.length}\n" - " User-info: ${uri.userInfo} #${uri.userInfo.length}\n" - " Host: ${uri.host} #${uri.host.length}\n" - " Port: ${uri.port}\n" - " Path: ${uri.path} #${uri.path.length}\n" - " Query: ${uri.query} #${uri.query.length}\n" - " Fragment: ${uri.fragment} #${uri.fragment.length}\n"; -} diff --git a/tests/corelib_2/very_big_integer_test.dart b/tests/corelib_2/very_big_integer_test.dart deleted file mode 100644 index 11465f91aec..00000000000 --- a/tests/corelib_2/very_big_integer_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2021, 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 - -import "package:expect/expect.dart"; - -main() { - // x and y have lengths in 32-bit digits that overflow 16 bits. - var x = new BigInt.from(13) << (65000 * 32); - var y = new BigInt.from(42) << (65000 * 32); - print(x.bitLength); - Expect.equals(x, (x + y) - y); - Expect.equals(x, -((-x + y) - y)); - Expect.equals(x, (x << 2) >> 2); - Expect.equals(x, (x >> 3) << 3); - Expect.equals(0, (x ^ x).toInt()); - Expect.equals(0, (y ^ y).toInt()); -} diff --git a/tests/corelib_2/weak_mode/README b/tests/corelib_2/weak_mode/README deleted file mode 100644 index 9da48ae6dd1..00000000000 --- a/tests/corelib_2/weak_mode/README +++ /dev/null @@ -1,2 +0,0 @@ -This directory contains tests specific to null safety weak mode -behavior. \ No newline at end of file diff --git a/tests/corelib_2/weak_mode/asyncMap_accepts_null_test.dart b/tests/corelib_2/weak_mode/asyncMap_accepts_null_test.dart deleted file mode 100644 index d25a21ac93c..00000000000 --- a/tests/corelib_2/weak_mode/asyncMap_accepts_null_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// 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. - -// @dart = 2.7 - -import "dart:async"; -import "package:expect/expect.dart"; - -// Regression test for https://github.com/dart-lang/sdk/issues/41465 - -void main() { - var stream = Stream.fromIterable([1, 2, 3, 4]); - var eventsStream = - stream.asyncMap((i) => i % 2 == 0 ? i : null).where((i) => i != null); - eventsStream.listen(Expect.isNotNull); -} diff --git a/tests/corelib_2/weak_mode/future_sync_accepts_null_test.dart b/tests/corelib_2/weak_mode/future_sync_accepts_null_test.dart deleted file mode 100644 index 79ac0387b77..00000000000 --- a/tests/corelib_2/weak_mode/future_sync_accepts_null_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// 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. - -// @dart = 2.7 - -import "dart:async"; -import "package:expect/expect.dart"; - -// Regression test for https://github.com/dart-lang/sdk/issues/41465 - -void main() async { - var f = Future.sync(() => null); - Expect.isNull(await f); -} diff --git a/tests/dartdevc_2/assertion_failure_message_test.dart b/tests/dartdevc_2/assertion_failure_message_test.dart deleted file mode 100644 index f85d05eadca..00000000000 --- a/tests/dartdevc_2/assertion_failure_message_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// 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. - -// @dart = 2.6 - -import "utils.dart"; - -void main() { - try { - assert(false, "failure message"); - } on AssertionError catch (error) { - var message = error.toString(); - expectStringContains('Assertion failed:', message); - expectStringContains('assertion_failure_message_test.dart:11:12', message); - expectStringContains('false', message); - expectStringContains('failure message', message); - } - - // 失 All offsets and source code extractions should still be correct after - // non-UTF8 characters. See: https://github.com/dart-lang/sdk/issues/39271 - try { - assert(false, "after a non-UTF8 character"); - } on AssertionError catch (error) { - var message = error.toString(); - expectStringContains('Assertion failed:', message); - expectStringContains('assertion_failure_message_test.dart:23:12', message); - expectStringContains('false', message); - expectStringContains('after a non-UTF8 character', message); - } -} diff --git a/tests/dartdevc_2/cast_error/lib_a.dart b/tests/dartdevc_2/cast_error/lib_a.dart deleted file mode 100644 index 0939c6a44ea..00000000000 --- a/tests/dartdevc_2/cast_error/lib_a.dart +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) 2021, 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 - -class Animal {} diff --git a/tests/dartdevc_2/cast_error/lib_b.dart b/tests/dartdevc_2/cast_error/lib_b.dart deleted file mode 100644 index 0939c6a44ea..00000000000 --- a/tests/dartdevc_2/cast_error/lib_b.dart +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) 2021, 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 - -class Animal {} diff --git a/tests/dartdevc_2/cast_error/library_uri_in_message_test.dart b/tests/dartdevc_2/cast_error/library_uri_in_message_test.dart deleted file mode 100644 index c278d15cf46..00000000000 --- a/tests/dartdevc_2/cast_error/library_uri_in_message_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2021, 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 - -import "../utils.dart"; -import "lib_a.dart" as libA; -import "lib_b.dart" as libB; - -void main() { - // When the name of the class is the same the error message should include - // library URIs for the two classes. - var a = libA.Animal(); - try { - a as libB.Animal; - } on TypeError catch (error) { - var message = error.toString(); - expectStringContains( - "Expected a value of type 'Animal' " - "(in org-dartlang-app:/tests/dartdevc_2/cast_error/lib_b.dart)", - message); - expectStringContains( - "but got one of type 'Animal' " - "(in org-dartlang-app:/tests/dartdevc_2/cast_error/lib_a.dart)", - message); - } - // Verify the libraries are properly ordered. - var b = libB.Animal(); - try { - b as libA.Animal; - } on TypeError catch (error) { - var message = error.toString(); - expectStringContains( - "Expected a value of type 'Animal' " - "(in org-dartlang-app:/tests/dartdevc_2/cast_error/lib_a.dart)", - message); - expectStringContains( - "but got one of type 'Animal' " - "(in org-dartlang-app:/tests/dartdevc_2/cast_error/lib_b.dart)", - message); - } - - // URIs are not displayed when the class names are different. - try { - a as String; - } on TypeError catch (error) { - var message = error.toString(); - expectStringContains( - "Expected a value of type 'String', but got one of type 'Animal'", - message); - } -} diff --git a/tests/dartdevc_2/const_test.dart b/tests/dartdevc_2/const_test.dart deleted file mode 100644 index 63394cf7791..00000000000 --- a/tests/dartdevc_2/const_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// 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. - -// @dart = 2.6 - -import "package:expect/expect.dart"; -import 'dart:_foreign_helper' show JS; -import 'dart:_runtime' as dart; - -void main() { - var data = JS('', '[1, 2, 3, 4]'); - Expect.isFalse(data is List); - - var list = dart.constList(data, dart.unwrapType(int)); - Expect.isTrue(list is List); - Expect.throws(() { - list[0] = 0; - }); - - var set = dart.constSet(data); - Expect.isTrue(set is Set); - Expect.isTrue(set.contains(3)); - Expect.throws(() => set.clear()); - - var map = dart.constMap(data); - Expect.isTrue(map is Map); - Expect.equals(map[1], 2); - Expect.throws(() { - map[1] = 42; - }); -} diff --git a/tests/dartdevc_2/dartdevc_native_dartdevc.status b/tests/dartdevc_2/dartdevc_native_dartdevc.status deleted file mode 100644 index 29bea2bba07..00000000000 --- a/tests/dartdevc_2/dartdevc_native_dartdevc.status +++ /dev/null @@ -1,5 +0,0 @@ -# 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. - -# Sections in this file should contain "$compiler == ddc". diff --git a/tests/dartdevc_2/debugger/debugger_test.dart b/tests/dartdevc_2/debugger/debugger_test.dart deleted file mode 100644 index f3037362fce..00000000000 --- a/tests/dartdevc_2/debugger/debugger_test.dart +++ /dev/null @@ -1,367 +0,0 @@ -// @dart = 2.6 - -/// Debugger custom formatter tests. -/// If the tests fail, paste the expected output into the [expectedGolden] -/// string literal in this file and audit the diff to ensure changes are -/// expected. -/// -/// Currently only DDC supports debugging objects with custom formatters -/// but it is reasonable to add support to Dart2JS in the future. -@JS() -library debugger_test; - -import 'dart:html'; -import 'package:js/js.dart'; -import 'package:js/js_util.dart' as js_util; - -import 'package:expect/minitest.dart'; - -import 'dart:_debugger' as _debugger; - -class TestClass { - String name = 'test class'; - int date; - static List foo = [1, 2, 3, 4]; - static String greeting = 'Hello world'; - static Object bar = new Object(); - - static exampleStaticMethod(x) => x * 2; - - TestClass(this.date); - - String nameAndDate() => '$name on day $date'; - - int last(List list) => list.last; - - void addOne(String name) { - name = '${name}1'; - } - - get someInt => 42; - get someString => "Hello world"; - get someObject => this; - - Object returnObject() => bar; -} - -class TestGenericClass { - TestGenericClass(this.x); - X x; -} - -@JS('Object.getOwnPropertyNames') -external List getOwnPropertyNames(obj); - -@JS('devtoolsFormatters') -external List get _devtoolsFormatters; -List get devtoolsFormatters => _devtoolsFormatters; - -@JS('JSON.stringify') -external stringify(value, [Function replacer, int space]); - -// TODO(jacobr): this is only valid if the legacy library loader is used. -// We need a solution that works with all library loaders. -@JS('dart_library.import') -external importDartLibrary(String path); - -@JS('ExampleJSClass') -class ExampleJSClass { - external factory ExampleJSClass(T x); - external T get x; -} - -// Replacer normalizes file names that could vary depending on the test runner. -// styles. -replacer(String key, value) { - // The values for keys with name 'object' may be arbitrary Dart nested - // Objects so are not safe to stringify. - if (key == 'object') return ''; - if (value is String) { - if (value.contains('dart_sdk.js')) return ''; - if (new RegExp(r'[.](js|dart|html)').hasMatch(value)) return ''; - // Normalize the name of the `Event` type as it appears in this test. - // The new type system preserves the original name from the Dart source. - // TODO(48585): Remove when no longer running with the old type system. - value = value.replaceAll(r'Event$', 'Event'); - } - return value; -} - -String format(value) { - // Avoid double-escaping strings. - if (value is String) return value; - if (value is Function) value = allowInterop(value as Function); - return stringify(value, allowInterop(replacer), 4); -} - -class FormattedObject { - FormattedObject(this.object, this.config); - - Object object; - Object config; -} - -/// Extract all object tags from a json ml expression to enable -/// calling the custom formatter on the extracted object tag. -List extractNestedFormattedObjects(json) { - var ret = []; - if (json is String || json is bool || json is num) return ret; - if (json is List) { - for (var e in json) { - ret.addAll(extractNestedFormattedObjects(e)); - } - return ret; - } - - for (var name in getOwnPropertyNames(json)) { - if (name == 'object') { - // Found a nested formatted object. - ret.add(new FormattedObject(js_util.getProperty(json, 'object'), - js_util.getProperty(json, 'config'))); - return ret; - } - ret.addAll(extractNestedFormattedObjects(js_util.getProperty(json, name))); - } - return ret; -} - -main() async { - if (devtoolsFormatters == null) { - print("Warning: no devtools custom formatters specified. Skipping tests."); - return; - } - - // 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/dartdevc_2/debugger/' - 'debugger_test_golden.txt?cacheBlock=$cacheBlocker'; - - String golden; - try { - golden = (await HttpRequest.getString(goldenUrl)).trim(); - } catch (e) { - print("Warning: couldn't load golden file from $goldenUrl"); - } - - document.body.append(new ScriptElement() - ..type = 'text/javascript' - ..innerHtml = r""" -window.ExampleJSClass = function ExampleJSClass(x) { - this.x = x; -}; -"""); - - var _devtoolsFormatter = devtoolsFormatters.first; - - var actual = new StringBuffer(); - - // Accumulate the entire expected custom formatted data as a single - // massive string buffer so it is simple to update expectations when - // modifying the formatting code. - // Otherwise a small formatting change would result in tweaking lots - // of expectations. - // The verify golden match test cases does the final comparison of golden - // to expected output. - addGolden(String name, value) { - var text = format(value); - actual.write('Test: $name\n' - 'Value:\n' - '$text\n' - '-----------------------------------\n'); - } - - addFormatterGoldens(String name, object, [config]) { - addGolden( - '$name formatting header', _devtoolsFormatter.header(object, config)); - addGolden('$name formatting body', _devtoolsFormatter.body(object, config)); - } - - // Include goldens for the nested [[class]] definition field. - addNestedFormatterGoldens(String name, obj) { - addGolden('$name instance header', _devtoolsFormatter.header(obj, null)); - var body = _devtoolsFormatter.body(obj, null); - addGolden('$name instance body', body); - - var nestedObjects = extractNestedFormattedObjects(body); - var clazz = nestedObjects.last; - // By convention assume last nested object is the [[class]] definition - // describing the object's static members and inheritance hierarchy - addFormatterGoldens('$name definition', clazz.object, clazz.config); - } - - // Include goldens for the nested [[class]] definition field. - addAllNestedFormatterGoldens(String name, obj) { - addGolden('$name header', _devtoolsFormatter.header(obj, null)); - var body = _devtoolsFormatter.body(obj, null); - addGolden('$name body', body); - - var nestedObjects = extractNestedFormattedObjects(body); - var i = 0; - for (var nested in nestedObjects) { - addFormatterGoldens('$name child $i', nested.object, nested.config); - i++; - } - } - - group('Iterable formatting', () { - var list = ['foo', 'bar', 'baz']; - var iterable = list.map((x) => x * 5); - addFormatterGoldens('List', list); - - var listOfObjects = [42, 'bar', true]; - - addNestedFormatterGoldens('List', listOfObjects); - - var largeList = []; - for (var i = 0; i < 200; ++i) { - largeList.add(i * 10); - } - addNestedFormatterGoldens('List large', largeList); - - addNestedFormatterGoldens('Iterable', iterable); - - var s = new Set() - ..add("foo") - ..add(42) - ..add(true); - addNestedFormatterGoldens('Set', s); - }); - - group('Map formatting', () { - Map foo = new Map(); - foo = {'1': 2, 'x': 4, '5': 6}; - - addFormatterGoldens('Map', foo); - test('hasBody', () { - expect(_devtoolsFormatter.hasBody(foo, null), isTrue); - }); - - Map dynamicMap = new Map(); - dynamicMap = {1: 2, 'x': 4, true: "truthy"}; - - addNestedFormatterGoldens('Map', dynamicMap); - }); - - group('Function formatting', () { - adder(int a, int b) => a + b; - - addFormatterGoldens('Function', adder); - - test('hasBody', () { - expect(_devtoolsFormatter.hasBody(adder, null), isTrue); - }); - - addEventListener(String name, bool callback(Event e)) => null; - - addFormatterGoldens('Function with function arguments', addEventListener); - - // Closure - addGolden('dart:html method', window.addEventListener); - - // Get a reference to the JS constructor for a Dart class. - // This tracks a regression bug where overly verbose and confusing output - // was shown for this case. - var testClass = new TestClass(17); - var dartConstructor = js_util.getProperty( - js_util.objectGetPrototypeOf(testClass), 'constructor'); - addFormatterGoldens('Raw reference to dart constructor', dartConstructor); - }); - - group('Object formatting', () { - var object = new Object(); - addFormatterGoldens('Object', object); - test('hasBody', () { - expect(_devtoolsFormatter.hasBody(object, null), isTrue); - }); - }); - - group('Type formatting', () { - addFormatterGoldens('Type TestClass', TestClass); - addFormatterGoldens('Type HttpRequest', HttpRequest); - }); - - group('JS interop object formatting', () { - var object = js_util.newObject(); - js_util.setProperty(object, 'foo', 'bar'); - // Make sure we don't apply the Dart custom formatter to JS interop objects. - expect(_devtoolsFormatter.header(object, null), isNull); - }); - - group('Module formatting', () { - var moduleNames = _debugger.getModuleNames(); - var testModuleName = "debugger_test"; - expect(moduleNames.contains(testModuleName), isTrue); - - addAllNestedFormatterGoldens( - 'Test library Module', _debugger.getModuleLibraries(testModuleName)); - }); - - group('StackTrace formatting', () { - StackTrace stack; - try { - throw new Error(); - } catch (exception, stackTrace) { - stack = stackTrace; - } - addFormatterGoldens('StackTrace', stack); - test('hasBody', () { - expect(_devtoolsFormatter.hasBody(stack, null), isTrue); - }); - }); - - group('Class formatting', () { - addNestedFormatterGoldens('TestClass', new TestClass(17)); - // TODO(jmesserly): this includes a timeStamp, so it varies each run. - //addNestedFormatterGoldens('MouseEvent', new MouseEvent("click")); - // This is a good class to test as it has statics and a deep inheritance hierarchy - addNestedFormatterGoldens('HttpRequest', new HttpRequest()); - }); - - group('Generics formatting', () { - addNestedFormatterGoldens( - 'TestGenericClass', new TestGenericClass(42)); - addNestedFormatterGoldens( - 'TestGenericClassJSInterop', - new TestGenericClass, int>( - new ExampleJSClass("Hello"))); - }); - - test('verify golden match', () { - // Warning: all other test groups must have run for this test to be meaningful - var actualStr = actual.toString().trim(); - - if (actualStr != golden) { - var helpMessage = - 'Debugger output does not match the golden data found in:\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 ' - 'the diff using your favorite diff tool to make sure the custom ' - 'formatting output has not regressed.'; - print(helpMessage); - // Copy text to clipboard on page click. We can't copy to the clipboard - // without a click due to Chrome security. - TextAreaElement textField = new Element.tag('textarea'); - textField.maxLength = 100000000; - textField.text = actualStr; - textField.style - ..width = '800px' - ..height = '400px'; - document.body.append(new Element.tag('h3') - ..innerHtml = helpMessage.replaceAll('\n', '
')); - document.body.append(textField); - document.body.onClick.listen((_) { - textField.select(); - var result = document.execCommand('copy'); - if (result) { - print("Copy to clipboard successful"); - } else { - print("Copy to clipboard failed"); - } - }); - } - expect(actualStr == golden, isTrue); - }); -} diff --git a/tests/dartdevc_2/debugger/debugger_test_golden.txt b/tests/dartdevc_2/debugger/debugger_test_golden.txt deleted file mode 100644 index 60b3293cbe7..00000000000 --- a/tests/dartdevc_2/debugger/debugger_test_golden.txt +++ /dev/null @@ -1,7470 +0,0 @@ -Test: List formatting header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "List length 3" -] ------------------------------------ -Test: List formatting body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "0: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "foo" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "1: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "bar" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "2: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "baz" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "[[class]]: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: List instance header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "List length 3" -] ------------------------------------ -Test: List instance body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "0: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "42" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "1: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "bar" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "2: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "true" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "[[class]]: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: List definition formatting header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "List" -] ------------------------------------ -Test: List definition formatting body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "[[Instance Methods]]" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "+: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "add: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "addAll: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "any: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "asMap: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "cast: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "checkGrowable: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "checkMutable: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "clear: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "contains: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "elementAt: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "every: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "expand: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "fillRange: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "firstWhere: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "fold: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "followedBy: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "forEach: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "getRange: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "indexOf: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "indexWhere: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "insert: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "insertAll: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "join: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "lastIndexOf: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "lastIndexWhere: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "lastWhere: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "map: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "reduce: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "remove: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "removeAt: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "removeLast: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "removeRange: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "removeWhere: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "replaceRange: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "retainWhere: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "setAll: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "setRange: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "shuffle: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "singleWhere: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "skip: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "skipWhile: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "sort: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "sublist: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "take: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "takeWhile: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "toList: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "toSet: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "where: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "whereType: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "_get: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "_removeWhere: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "_set: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "_setLengthUnsafe: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "[[base class]]: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: List large instance header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "List length 200" -] ------------------------------------ -Test: List large instance body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "[[class]]: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: List large definition formatting header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "List" -] ------------------------------------ -Test: List large definition formatting body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "[[Instance Methods]]" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "+: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "add: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "addAll: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "any: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "asMap: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "cast: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "checkGrowable: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "checkMutable: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "clear: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "contains: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "elementAt: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "every: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "expand: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "fillRange: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "firstWhere: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "fold: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "followedBy: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "forEach: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "getRange: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "indexOf: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "indexWhere: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "insert: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "insertAll: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "join: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "lastIndexOf: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "lastIndexWhere: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "lastWhere: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "map: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "reduce: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "remove: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "removeAt: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "removeLast: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "removeRange: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "removeWhere: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "replaceRange: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "retainWhere: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "setAll: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "setRange: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "shuffle: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "singleWhere: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "skip: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "skipWhile: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "sort: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "sublist: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "take: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "takeWhile: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "toList: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "toSet: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "where: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "whereType: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "_get: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "_removeWhere: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "_set: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "_setLengthUnsafe: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "[[base class]]: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: Iterable instance header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "MappedListIterable length 3" -] ------------------------------------ -Test: Iterable instance body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "0: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "foofoofoofoofoo" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "1: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "barbarbarbarbar" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "2: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "bazbazbazbazbaz" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "[[class]]: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: Iterable definition formatting header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "MappedListIterable" -] ------------------------------------ -Test: Iterable definition formatting body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "[[Instance Methods]]" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "any: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "cast: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "contains: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "elementAt: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "every: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "expand: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "firstWhere: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "fold: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "followedBy: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "forEach: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "join: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "lastWhere: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "map: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "reduce: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "singleWhere: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "skip: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "skipWhile: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "take: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "takeWhile: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "toList: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "toSet: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "where: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "whereType: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "[[base class]]: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: Set instance header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "_HashSet length 3" -] ------------------------------------ -Test: Set instance body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "0: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "foo" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "1: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "42" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "2: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "true" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "[[class]]: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: Set definition formatting header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "_HashSet" -] ------------------------------------ -Test: Set definition formatting body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "[[Instance Methods]]" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "add: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "contains: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "lookup: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "remove: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "_newSet: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "_newSimilarSet: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "[[base class]]: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: Map formatting header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "IdentityMap length 3" -] ------------------------------------ -Test: Map formatting body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "0: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "1: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "2: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "[[class]]: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: Map instance header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "LinkedMap length 3" -] ------------------------------------ -Test: Map instance body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "0: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "1: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "2: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "[[class]]: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: Map definition formatting header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "LinkedMap" -] ------------------------------------ -Test: Map definition formatting body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "[[Instance Methods]]" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "clear: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "remove: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "_get: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "_set: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "[[base class]]: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: Function formatting header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "(int, int) => int" -] ------------------------------------ -Test: Function formatting body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "signature: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "(int, int) => int" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "JavaScript Function: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: Function with function arguments formatting header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "(String, (Event) => bool) => Null" -] ------------------------------------ -Test: Function with function arguments formatting body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "signature: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "(String, (Event) => bool) => Null" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "JavaScript Function: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: dart:html method -Value: -null ------------------------------------ -Test: Raw reference to dart constructor formatting header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "TestClass" -] ------------------------------------ -Test: Raw reference to dart constructor formatting body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "[[Instance Methods]]" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "addOne: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "last: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "nameAndDate: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "returnObject: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "[[base class]]: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: Object formatting header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "Instance of 'Object'" -] ------------------------------------ -Test: Object formatting body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "runtimeType: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "[[class]]: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: Type TestClass formatting header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "TestClass" -] ------------------------------------ -Test: Type TestClass formatting body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - } -] ------------------------------------ -Test: Type HttpRequest formatting header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "HttpRequest" -] ------------------------------------ -Test: Type HttpRequest formatting body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - } -] ------------------------------------ -Test: Test library Module header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "Library Module: debugger_test" -] ------------------------------------ -Test: Test library Module body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: Test library Module child 0 formatting header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "" -] ------------------------------------ -Test: Test library Module child 0 formatting body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "TestClass: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "TestGenericClass: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "ExampleJSClass: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "FormattedObject: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "replacer: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "format: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "extractNestedFormattedObjects: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "main: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "devtoolsFormatters: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: StackTrace formatting header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "StackTrace" -] ------------------------------------ -Test: StackTrace formatting body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;background-color: thistle;color: rgb(196, 26, 22);" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "Error: Instance of 'Error'" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "main.next ()" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "" - ] - ] - ] -] ------------------------------------ -Test: TestClass instance header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "Instance of 'TestClass'" -] ------------------------------------ -Test: TestClass instance body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "date: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "17" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "name: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "test class" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "runtimeType: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "someInt: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "42" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "someObject: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "someString: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "Hello world" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "[[class]]: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: TestClass definition formatting header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "TestClass" -] ------------------------------------ -Test: TestClass definition formatting body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "[[Instance Methods]]" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "addOne: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "last: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "nameAndDate: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "returnObject: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "[[base class]]: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: HttpRequest instance header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "[object XMLHttpRequest]" -] ------------------------------------ -Test: HttpRequest instance body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "on: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "onAbort: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "onError: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "onLoad: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "onLoadEnd: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "onLoadStart: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "onProgress: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "onReadyStateChange: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "onTimeout: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "readyState: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "0" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "response: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "responseHeaders: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "responseText: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "responseType: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "responseUrl: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "responseXml: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "runtimeType: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "status: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "0" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "statusText: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "timeout: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "0" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "upload: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "withCredentials: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "false" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "_get_response: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "[[class]]: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: HttpRequest definition formatting header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "HttpRequest" -] ------------------------------------ -Test: HttpRequest definition formatting body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "[[Instance Methods]]" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "abort: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "getAllResponseHeaders: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "getResponseHeader: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "open: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "overrideMimeType: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "send: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "setRequestHeader: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "[[base class]]: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: TestGenericClass instance header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "Instance of 'TestGenericClass>'" -] ------------------------------------ -Test: TestGenericClass instance body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "x: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - "42" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "runtimeType: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "[[class]]: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: TestGenericClass definition formatting header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "TestGenericClass>" -] ------------------------------------ -Test: TestGenericClass definition formatting body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "[[Instance Methods]]" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "noSuchMethod: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "toString: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "_equals: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "[[base class]]: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: TestGenericClassJSInterop instance header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "Instance of 'TestGenericClass, int>'" -] ------------------------------------ -Test: TestGenericClassJSInterop instance body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "x: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "runtimeType: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "[[class]]: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ -Test: TestGenericClassJSInterop definition formatting header -Value: -[ - "span", - { - "style": "background-color: #d9edf7;color: black" - }, - "TestGenericClass, int>" -] ------------------------------------ -Test: TestGenericClassJSInterop definition formatting body -Value: -[ - "ol", - { - "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;" - }, - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - {}, - [ - "span", - { - "style": "" - }, - "[[Instance Methods]]" - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "noSuchMethod: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "toString: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "_equals: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ], - [ - "li", - { - "style": "padding-left: 13px;" - }, - [ - "span", - { - "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px" - }, - "[[base class]]: " - ], - [ - "span", - { - "style": "margin-left: 13px" - }, - [ - "object", - { - "object": "", - "config": {} - } - ] - ] - ] -] ------------------------------------ \ No newline at end of file diff --git a/tests/dartdevc_2/developer_events_test.dart b/tests/dartdevc_2/developer_events_test.dart deleted file mode 100644 index b14581086a0..00000000000 --- a/tests/dartdevc_2/developer_events_test.dart +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) 2021, 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. - -@JS() -library developer_events_test; - -import 'dart:developer' - show postEvent, registerExtension, ServiceExtensionResponse; - -import 'package:js/js.dart'; -import 'package:expect/expect.dart'; -import 'package:expect/minitest.dart'; - -@JS(r'$emitDebugEvent') -external set emitDebugEvent(void Function(String, String) func); - -@JS(r'$emitDebugEvent') -external void Function(String, String) get emitDebugEvent; - -@JS(r'$emitRegisterEvent') -external set emitRegisterEvent(void Function(String)? func); - -@JS(r'$emitRegisterEvent') -external void Function(String) get emitRegisterEvent; - -@JS(r'console.warn') -external set consoleWarn(void Function(String) func); - -@JS(r'console.warn') -external void Function(String) get consoleWarn; - -@JS(r'console.debug') -external set consoleDebug(void Function(String) func); - -@JS(r'console.debug') -external void Function(String) get consoleDebug; - -@JS(r'$dwdsVersion') -external set dwdsVersion(String s); - -@JS(r'$dwdsVersion') -external String get dwdsVersion; - -class _TestDebugEvent { - final String kind; - final String eventData; - _TestDebugEvent(this.kind, this.eventData); -} - -void main() { - testRegisterExtensionWarningMessage(); - testPostEvent(); - testRegisterExtension(); -} - -/// Verify that warning messages are printed on the first call of -/// `registerExtension()` when the hooks are undefined. -/// -/// Calls to `postEvent()` are always a no-op when no extension has been -/// registered to listen which can never happen if the hook is undefined. -void testRegisterExtensionWarningMessage() { - final consoleWarnLog = []; - var savedConsoleWarn = consoleWarn; - try { - // Patch our own console.warn function for testing. - consoleWarn = allowInterop((String s) => consoleWarnLog.add(s)); - expect(consoleWarnLog.isEmpty, true); - - var data0 = {'key0': 'value0'}; - postEvent('kind0', data0); - - // Nothing is listening, so this was a no-op. - expect(consoleWarnLog.isEmpty, true); - - postEvent('kind0', data0); - var data1 = {'key1': 'value1'}; - postEvent('kind1', data1); - - // No warnings should be issued because postEvent is a no-op when no - // extensions have been registered to listen. - expect(consoleWarnLog.isEmpty, true); - - consoleWarnLog.clear(); - - var testHandler = (String s, Map m) async => - ServiceExtensionResponse.result('test result'); - - expect(consoleWarnLog.isEmpty, true); - - registerExtension('ext.method0', testHandler); - - // A warning message was issued about calling `registerExtension()` from - // dart:developer. - expect( - consoleWarnLog.single - .contains('registerExtension() from dart:developer'), - true); - - registerExtension('ext.method1', testHandler); - registerExtension('ext.method2', testHandler); - - // A warning is only issued on the first call of `registerExtension()`. - expect(consoleWarnLog.length, 1); - - consoleWarnLog.clear(); - - // The earlier call to registerExtension() was a no-op and printed a warning - // because no debugger hooks are defined. This means more calls to - // `postEvent()` are still no ops. - postEvent('kind0', data0); - postEvent('kind1', data1); - expect(consoleWarnLog.isEmpty, true); - } finally { - // Restore actual console.warn function. - consoleWarn = savedConsoleWarn; - } -} - -void testPostEvent() { - final debugEventLog = <_TestDebugEvent>[]; - var savedEmitDebugEvent = emitDebugEvent; - var savedDwdsVersion = dwdsVersion; - - try { - // Provide a test version of the $emitDebugEvent hook. - emitDebugEvent = allowInterop((String kind, String eventData) { - debugEventLog.add(_TestDebugEvent(kind, eventData)); - }); - // Provide a version to signal there is an attached debugger. - dwdsVersion = '1.0.0-for-test'; - expect(debugEventLog.isEmpty, true); - - var data0 = {'key0': 'value0'}; - postEvent('kind0', data0); - - expect(debugEventLog.single.kind, 'kind0'); - Expect.contains('"key0":"value0"', debugEventLog.single.eventData); - - var data1 = {'key1': 'value1'}; - var data2 = {'key2': 'value2'}; - postEvent('kind1', data1); - postEvent('kind2', data2); - - expect(debugEventLog.length, 3); - expect(debugEventLog[0].kind, 'kind0'); - Expect.contains('"key0":"value0"', debugEventLog[0].eventData); - expect(debugEventLog[1].kind, 'kind1'); - Expect.contains('"key1":"value1"', debugEventLog[1].eventData); - expect(debugEventLog[2].kind, 'kind2'); - Expect.contains('"key2":"value2"', debugEventLog[2].eventData); - } finally { - emitDebugEvent = savedEmitDebugEvent; - dwdsVersion = savedDwdsVersion; - } -} - -void testRegisterExtension() { - final registerEventLog = []; - var savedEmitRegisterEvent = emitRegisterEvent; - var savedDwdsVersion = dwdsVersion; - - try { - // Provide a test version of the $emitRegisterEvent hook. - emitRegisterEvent = allowInterop((String eventData) { - registerEventLog.add(eventData); - }); - // Provide a version to signal there is an attached debugger. - dwdsVersion = '1.0.0-for-test'; - expect(registerEventLog.isEmpty, true); - - var testHandler = (String s, Map m) async => - ServiceExtensionResponse.result('test result'); - registerExtension('ext.method0', testHandler); - - expect(registerEventLog.single, 'ext.method0'); - - registerExtension('ext.method1', testHandler); - registerExtension('ext.method2', testHandler); - - expect(registerEventLog.length, 3); - expect(registerEventLog[0], 'ext.method0'); - expect(registerEventLog[1], 'ext.method1'); - expect(registerEventLog[2], 'ext.method2'); - } finally { - emitRegisterEvent = savedEmitRegisterEvent; - dwdsVersion = savedDwdsVersion; - } -} diff --git a/tests/dartdevc_2/hot_restart_expando_test.dart b/tests/dartdevc_2/hot_restart_expando_test.dart deleted file mode 100644 index 12ce127c040..00000000000 --- a/tests/dartdevc_2/hot_restart_expando_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:_runtime' as dart; - -import 'package:expect/expect.dart'; -import 'package:js/js.dart'; - -final e = Expando(); - -@JS() -external void eval(String s); - -@JS() -external Object get singleton; - -void main() { - eval(''' - if (!self.singleton) { - self.singleton = {}; - } - '''); - var o = singleton; - Expect.equals(null, e[o]); - e[o] = 1; - - dart.hotRestart(); - Expect.equals(null, e[o]); -} diff --git a/tests/dartdevc_2/hot_restart_lazy_test.dart b/tests/dartdevc_2/hot_restart_lazy_test.dart deleted file mode 100644 index 6d1d0ccf6d8..00000000000 --- a/tests/dartdevc_2/hot_restart_lazy_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests that lazily-loaded fields are properly reset after hot restarts. - -import 'package:expect/expect.dart'; -import 'dart:_runtime' as dart; - -double lazy = 3.14; - -class Lazies { - static String s = "default"; -} - -main() { - Expect.equals(Lazies.s, "default"); - Lazies.s = "set"; - Expect.equals(Lazies.s, "set"); - Expect.equals(lazy, 3.14); - lazy = 2.72; - Expect.equals(lazy, 2.72); - - dart.hotRestart(); - - Expect.equals(Lazies.s, "default"); - Lazies.s = "set"; - Expect.equals(Lazies.s, "set"); - Expect.equals(lazy, 3.14); - lazy = 2.72; - Expect.equals(lazy, 2.72); - - dart.hotRestart(); - dart.hotRestart(); - - Expect.equals(Lazies.s, "default"); - Expect.equals(lazy, 3.14); -} diff --git a/tests/dartdevc_2/hot_restart_static_test.dart b/tests/dartdevc_2/hot_restart_static_test.dart deleted file mode 100644 index 73e93d19b6e..00000000000 --- a/tests/dartdevc_2/hot_restart_static_test.dart +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2022, 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 - -// Tests that static fields are properly reset after hot restarts. - -import 'dart:_runtime' as dart show hotRestart, resetFields; - -import 'package:expect/expect.dart'; - -String noInitializer; -int withInitializer = 1; - -class Statics { - static String noInitializer; - static int withInitializer = 2; -} - -class StaticsGeneric { - static String noInitializer; - static int withInitializer = 3; -} - -main() { - var resetFieldCount = dart.resetFields.length; - - // Set static fields without explicit initializers. Avoid calling getters for - // these statics to ensure they are reset even if they are never accessed. - noInitializer = 'set via setter'; - Statics.noInitializer = 'Statics set via setter'; - StaticsGeneric.noInitializer = 'StaticsGeneric set via setter'; - - // Initialized statics should contain their values. - Expect.equals(1, withInitializer); - Expect.equals(2, Statics.withInitializer); - Expect.equals(3, StaticsGeneric.withInitializer); - - // Six new field resets from 3 setter calls and 3 getter calls. - var expectedResets = resetFieldCount + 6; - Expect.equals(expectedResets, dart.resetFields.length); - - dart.hotRestart(); - resetFieldCount = dart.resetFields.length; - - // Uninitialized statics have been reset to their implicit null initial state. - Expect.equals(null, noInitializer); - Expect.equals(null, Statics.noInitializer); - Expect.equals(null, StaticsGeneric.noInitializer); - - noInitializer = 'set via setter'; - Statics.noInitializer = 'Statics set via setter'; - StaticsGeneric.noInitializer = 'StaticsGeneric set via setter'; - - // All statics should contain their set values. - Expect.equals('set via setter', noInitializer); - Expect.equals('Statics set via setter', Statics.noInitializer); - Expect.equals('StaticsGeneric set via setter', StaticsGeneric.noInitializer); - Expect.equals(1, withInitializer); - Expect.equals(2, Statics.withInitializer); - Expect.equals(3, StaticsGeneric.withInitializer); - - // Six total new field resets despite getter and setter calls on the same - // static fields. - expectedResets = resetFieldCount + 6; - Expect.equals(expectedResets, dart.resetFields.length); - - dart.hotRestart(); - dart.hotRestart(); - resetFieldCount = dart.resetFields.length; - - // All statics should contain their initial values. - Expect.equals(null, noInitializer); - Expect.equals(null, Statics.noInitializer); - Expect.equals(null, StaticsGeneric.noInitializer); - Expect.equals(1, withInitializer); - Expect.equals(2, Statics.withInitializer); - Expect.equals(3, StaticsGeneric.withInitializer); - - // Six new field resets from 6 getter calls. - expectedResets = resetFieldCount + 6; - Expect.equals(expectedResets, dart.resetFields.length); -} diff --git a/tests/dartdevc_2/hot_restart_test.dart b/tests/dartdevc_2/hot_restart_test.dart deleted file mode 100644 index c34f5d94809..00000000000 --- a/tests/dartdevc_2/hot_restart_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// 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. - -// @dart = 2.6 - -import 'package:expect/expect.dart'; -import 'dart:_foreign_helper' show JS; -import 'dart:_runtime' as dart; - -class Foo { - Type type() => typeOf>(); -} - -class Bar {} - -Type typeOf() => T; - -Type fooOf() => typeOf>(); - -typedef funcType = Function(String); - -void func(Object o) {} - -void main() { - var f1 = Foo(); - var t1 = typeOf>(); - Expect.equals(f1.type(), t1); - var s1 = fooOf(); - Expect.equals(t1, s1); - - Expect.isTrue(func is funcType); - - dart.hotRestart(); - - var f2 = Foo(); - Expect.isTrue(f2 is Foo); - var t2 = typeOf>(); - Expect.equals(f2.type(), t2); - var s2 = fooOf(); - Expect.equals(t2, s2); - - Expect.isTrue(func is funcType); -} diff --git a/tests/dartdevc_2/hot_restart_timer_test.dart b/tests/dartdevc_2/hot_restart_timer_test.dart deleted file mode 100644 index 2a8d6dff5bd..00000000000 --- a/tests/dartdevc_2/hot_restart_timer_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// 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. - -// @dart = 2.6 - -import 'package:expect/expect.dart'; -import 'dart:async'; -import 'dart:_runtime' as dart; - -void main() async { - await timeoutTest(); - await periodicTest(); -} - -void timeoutTest() async { - bool beforeRestart = true; - bool calledBeforeRestart = false; - bool calledAfterRestart = false; - void callback() { - if (beforeRestart) { - calledBeforeRestart = true; - } else { - calledAfterRestart = true; - } - } - - Timer(Duration(milliseconds: 500), callback); - dart.hotRestart(); - beforeRestart = false; - await new Future.delayed(Duration(milliseconds: 600)); - Expect.isFalse(calledBeforeRestart); - Expect.isFalse(calledAfterRestart); -} - -void periodicTest() async { - bool beforeRestart = true; - bool calledBeforeRestart = false; - bool calledAfterRestart = false; - void callback(_) { - if (beforeRestart) { - calledBeforeRestart = true; - } else { - calledAfterRestart = true; - } - } - - Timer.periodic(Duration(milliseconds: 10), callback); - await new Future.delayed(Duration(milliseconds: 100)); - dart.hotRestart(); - beforeRestart = false; - await new Future.delayed(Duration(milliseconds: 100)); - Expect.isTrue(calledBeforeRestart); - Expect.isFalse(calledAfterRestart); -} diff --git a/tests/dartdevc_2/js_interop_non_external_lib.dart b/tests/dartdevc_2/js_interop_non_external_lib.dart deleted file mode 100644 index c5ae5c46be2..00000000000 --- a/tests/dartdevc_2/js_interop_non_external_lib.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2022, 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 - -// Define a JS class in a different library to test that name resolution works -// for non-external factories and static methods. Also uses class type -// parameters to make sure we generate a generic class. - -@JS() -library js_interop_non_external_lib; - -import 'package:js/js.dart'; - -@JS('JSClass') -class OtherJSClass { - external OtherJSClass.cons(T t); - factory OtherJSClass(T t) { - field = 'unnamed'; - return OtherJSClass.cons(t); - } - - factory OtherJSClass.named(T t) { - field = 'named'; - return OtherJSClass.cons(t); - } - - factory OtherJSClass.redirecting(T t) = OtherJSClass; - - static String field = ''; - static String get getSet { - return field; - } - - static set getSet(String val) { - field = val; - } - - static String method() => field; - - static T genericMethod(T t) => t; -} diff --git a/tests/dartdevc_2/js_interop_non_external_test.dart b/tests/dartdevc_2/js_interop_non_external_test.dart deleted file mode 100644 index da46a43365e..00000000000 --- a/tests/dartdevc_2/js_interop_non_external_test.dart +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) 2022, 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 - -// Test non-external factories and static methods of JS interop classes. - -@JS() -library js_interop_non_external_test; - -import 'package:expect/minitest.dart'; -import 'package:js/js.dart'; - -import 'js_interop_non_external_lib.dart'; - -@JS() -external dynamic eval(String code); - -@JS() -class JSClass { - external JSClass.cons(); - factory JSClass() { - field = 'unnamed'; - return JSClass.cons(); - } - - factory JSClass.named() { - field = 'named'; - return JSClass.cons(); - } - - factory JSClass.redirecting() = JSClass; - - static String field = ''; - static String get getSet { - return field; - } - - static set getSet(String val) { - field = val; - } - - static String method() => field; - - static T genericMethod(T t) => t; -} - -@JS('JSClass') -@staticInterop -class StaticInterop { - external factory StaticInterop(); - factory StaticInterop.named() { - field = 'named'; - return StaticInterop(); - } - - static String field = ''; - - static String method() => field; -} - -@JS() -@anonymous -class Anonymous { - external factory Anonymous(); - - factory Anonymous.named() { - field = 'named'; - return Anonymous(); - } - - static String field = ''; - - static String method() => field; -} - -void testLocal() { - // Test field is initialized and modified. - expect(JSClass.field, ''); - JSClass.field = 'modified'; - expect(JSClass.field, 'modified'); - - // Test factories and side-effects to make sure body is executed. - JSClass(); - expect(JSClass.field, 'unnamed'); - JSClass.named(); - expect(JSClass.field, 'named'); - JSClass.redirecting(); - expect(JSClass.field, 'unnamed'); - - // Test getter and setter. - expect(JSClass.getSet, JSClass.field); - JSClass.getSet = 'set'; - expect(JSClass.field, 'set'); - - // Test methods and their tear-offs. - expect(JSClass.method(), JSClass.field); - expect(JSClass.genericMethod(JSClass.field), JSClass.field); - - expect((JSClass.method)(), JSClass.field); - expect((JSClass.genericMethod)(JSClass.field), JSClass.field); - - // Briefly check that other interop classes work too. - expect(StaticInterop.field, ''); - StaticInterop.field = 'modified'; - expect(StaticInterop.field, 'modified'); - StaticInterop.named(); - expect(StaticInterop.field, 'named'); - expect(StaticInterop.method(), StaticInterop.field); - - expect(Anonymous.field, ''); - Anonymous.field = 'modified'; - expect(Anonymous.field, 'modified'); - Anonymous.named(); - expect(Anonymous.field, 'named'); - expect(Anonymous.method(), Anonymous.field); -} - -// Run the same tests as `testLocal`, but with a class in a different library, -// and with class type args. -void testNonLocal() { - expect(OtherJSClass.field, ''); - OtherJSClass.field = 'modified'; - expect(OtherJSClass.field, 'modified'); - - OtherJSClass(0); - expect(OtherJSClass.field, 'unnamed'); - OtherJSClass.named(''); - expect(OtherJSClass.field, 'named'); - OtherJSClass.redirecting(true); - expect(OtherJSClass.field, 'unnamed'); - - expect(OtherJSClass.getSet, OtherJSClass.field); - OtherJSClass.getSet = 'set'; - expect(OtherJSClass.field, 'set'); - - expect(OtherJSClass.method(), OtherJSClass.field); - expect(OtherJSClass.genericMethod(OtherJSClass.field), OtherJSClass.field); - - expect((OtherJSClass.method)(), OtherJSClass.field); - expect((OtherJSClass.genericMethod)(OtherJSClass.field), OtherJSClass.field); -} - -void main() { - eval(''' - function JSClass(arg) {} - '''); - testLocal(); - testNonLocal(); -} diff --git a/tests/dartdevc_2/js_interop_test.dart b/tests/dartdevc_2/js_interop_test.dart deleted file mode 100644 index 10a102d8ecb..00000000000 --- a/tests/dartdevc_2/js_interop_test.dart +++ /dev/null @@ -1,270 +0,0 @@ -// 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. - -// @dart = 2.6 - -@JS() -library js_interop_test; - -import 'dart:_foreign_helper' as helper show JS; -import 'dart:_runtime' as dart; -import 'dart:js' show context; - -import 'package:expect/expect.dart'; -import 'package:js/js.dart'; - -@JS() -class Console { - @JS() - external void log(arg); -} - -@JS('console') -external Console get console; - -@JS('console.log') -external Function get _log; - -@JS('console.log') -external void log(String s); - -String dartStaticMethod() => 'hello'; - -@JS('jsStaticVariable') -external Function get _jsStaticVariable; - -@JS('jsStaticVariable') -external set _jsStaticVariable(Function f); - -@JS('jsStaticVariable') -external void jsStaticVariable(String s); - -@JS('jsStaticFunction') -external Function get _jsStaticFunction; - -@JS('jsStaticFunction') -external set _jsStaticFunction(Function f); - -@JS('jsStaticFunction') -external void jsStaticFunction(String Function() f); - -@JS() -class SomeClass { - external factory SomeClass(String Function() f); - external set jsFunctionFieldSetter(String Function() f); - external void Function(String Function() f) get jsFunctionFieldGetter; - external String jsInstanceMethod(String Function() f); - - external NestedJs get jsNonFunctionField; -} - -@JS() -@anonymous -class NestedJs { - external factory NestedJs({String Function() constructorArg}); - external String get stringField; -} - -@JS('someClass') -external set _someClass(dynamic s); -@JS('someClass') -external SomeClass get someClass; - -void main() { - Function(String) jsFunc = helper.JS('', '(x) => {}'); - Expect.equals(dart.assertInterop(jsFunc), jsFunc); - - Expect.equals(dart.assertInterop(_log), _log); - Expect.equals(dart.assertInterop(console.log), console.log); - Expect.throws(() => dart.assertInterop(dartStaticMethod)); - - Expect.isNull(_jsStaticVariable); - _jsStaticVariable = jsFunc; - Expect.isNotNull(_jsStaticVariable); - Expect.equals(dart.assertInterop(_jsStaticVariable), _jsStaticVariable); - - final dynamic wrappedDartStaticMethod = allowInterop(dartStaticMethod); - - final Function localNonNullLegacy = () => 'hello'; - final String Function() localNonNull = () => 'hello'; - - // Assignment to JS static field. - Expect.throws(() { - _jsStaticVariable = () => 'hello'; - }); - Expect.throws(() { - _jsStaticVariable = dartStaticMethod; - }); - Expect.throws(() { - _jsStaticVariable = localNonNullLegacy; - }); - Expect.throws(() { - _jsStaticVariable = localNonNull; - }); - _jsStaticVariable = allowInterop(dartStaticMethod); - _jsStaticVariable = wrappedDartStaticMethod; - - // Argument to static JS function. - Function(Function(String), String) jsFunc2 = helper.JS('', '(f) => f()'); - _jsStaticFunction = jsFunc2; - Expect.throws(() { - jsStaticFunction(() => 'hello'); - }); - Expect.throws(() { - jsStaticFunction(dartStaticMethod); - }); - Expect.throws(() { - jsStaticFunction(localNonNullLegacy); - }); - Expect.throws(() { - jsStaticFunction(localNonNull); - }); - jsStaticFunction(allowInterop(() => 'hello')); - jsStaticFunction(wrappedDartStaticMethod); - - // Argument to torn off static JS function - dynamic method = jsStaticFunction; - Expect.throws(() { - method(() => 'hello'); - }); - Expect.throws(() { - method(dartStaticMethod); - }); - Expect.throws(() { - method(localNonNullLegacy); - }); - Expect.throws(() { - method(localNonNull); - }); - method(allowInterop(() => 'hello')); - method(wrappedDartStaticMethod); - - // Assignment to instance field. - _someClass = helper.JS( - '', - '{"jsInstanceMethod": function(f) {return f();}, ' - '"jsNonFunctionField": {"stringField":"hello js"}, ' - '"jsFunctionFieldGetter": function(f) {return f();}}'); - Expect.throws((() { - someClass.jsFunctionFieldSetter = () => 'hello'; - })); - Expect.throws((() { - someClass.jsFunctionFieldSetter = dartStaticMethod; - })); - Expect.throws((() { - someClass.jsFunctionFieldSetter = localNonNullLegacy; - })); - Expect.throws((() { - someClass.jsFunctionFieldSetter = localNonNull; - })); - someClass.jsFunctionFieldSetter = allowInterop(() => 'hello'); - someClass.jsFunctionFieldSetter = wrappedDartStaticMethod; - - // Argument to instance method. - Expect.throws(() { - someClass.jsInstanceMethod(() => 'hello'); - }); - Expect.throws(() { - someClass.jsInstanceMethod(dartStaticMethod); - }); - Expect.throws(() { - someClass.jsInstanceMethod(localNonNullLegacy); - }); - Expect.throws(() { - someClass.jsInstanceMethod(localNonNull); - }); - someClass.jsInstanceMethod(allowInterop(() => 'hello')); - someClass.jsInstanceMethod(wrappedDartStaticMethod); - - // Argument to constructor. - context.callMethod('eval', ['function SomeClass(a) { a(); }']); - Expect.throws(() { - SomeClass(() => 'hello'); - }); - Expect.throws(() { - SomeClass(dartStaticMethod); - }); - Expect.throws(() { - SomeClass(localNonNullLegacy); - }); - Expect.throws(() { - SomeClass(localNonNull); - }); - SomeClass(allowInterop(() => 'hello')); - SomeClass(wrappedDartStaticMethod); - - // Argument to anonymous constructor. - Expect.throws(() { - NestedJs(constructorArg: () => 'hello'); - }); - Expect.throws(() { - NestedJs(constructorArg: dartStaticMethod); - }); - Expect.throws(() { - NestedJs(constructorArg: localNonNullLegacy); - }); - Expect.throws(() { - NestedJs(constructorArg: localNonNull); - }); - NestedJs(constructorArg: allowInterop(() => 'hello')); - NestedJs(constructorArg: wrappedDartStaticMethod); - - // Argument to torn off instance method. - method = someClass.jsInstanceMethod; - Expect.throws(() { - method(() => 'hello'); - }); - Expect.throws(() { - method(dartStaticMethod); - }); - Expect.throws(() { - method(localNonNullLegacy); - }); - Expect.throws(() { - method(localNonNull); - }); - method(allowInterop(() => 'hello')); - method(wrappedDartStaticMethod); - - // Function typed getter - Expect.throws(() { - someClass.jsFunctionFieldGetter(() => 'hello'); - }); - Expect.throws(() { - someClass.jsFunctionFieldGetter(dartStaticMethod); - }); - Expect.throws(() { - someClass.jsFunctionFieldGetter(localNonNullLegacy); - }); - Expect.throws(() { - someClass.jsFunctionFieldGetter(localNonNull); - }); - someClass.jsFunctionFieldGetter(allowInterop(() => 'hello')); - someClass.jsFunctionFieldGetter(wrappedDartStaticMethod); - - // Stored Function typed getter - method = someClass.jsFunctionFieldGetter; - // We lose safety after calling a getter that returns a function, which takes - // a function as an argument. Since this can be modeled with a method, instead - // of a getter returning a function, we don't expect this is a pattern likely - // to show up in real code. - //Expect.throws(() { - // method(() => 'hello'); - //}); - //Expect.throws(() { - // method(dartStaticMethod); - //}); - //Expect.throws(() { - // method(localNonNullLegacy); - //}); - //Expect.throws(() { - // method(localNonNull); - //}); - method(allowInterop(() => 'hello')); - method(wrappedDartStaticMethod); - - // Non-function fields - Expect.equals('hello js', someClass.jsNonFunctionField.stringField, - 'Does not wrap access to a field'); -} diff --git a/tests/dartdevc_2/libraries_part.dart b/tests/dartdevc_2/libraries_part.dart deleted file mode 100644 index c26498e1e43..00000000000 --- a/tests/dartdevc_2/libraries_part.dart +++ /dev/null @@ -1,7 +0,0 @@ -// 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. - -// @dart = 2.6 - -part of 'libraries_test.dart'; diff --git a/tests/dartdevc_2/libraries_test.dart b/tests/dartdevc_2/libraries_test.dart deleted file mode 100644 index 19d0bca6fe9..00000000000 --- a/tests/dartdevc_2/libraries_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// 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. - -// @dart = 2.6 - -import 'package:expect/expect.dart'; -import 'dart:_foreign_helper' show JS; -import 'dart:_runtime' as dart; - -part 'libraries_part.dart'; - -void main() { - // Test getLibraries() - var libraries = dart.getLibraries(); - Expect.isTrue(libraries.contains('dart:core')); - Expect.isTrue(libraries.contains('package:expect/expect.dart')); - - // Test getParts(...) - var expectParts = dart.getParts('package:expect/expect.dart'); - Expect.isTrue(expectParts.isEmpty); - - var testLibraries = - libraries.where((l) => l.endsWith('libraries_test.dart')).toList(); - Expect.isTrue(testLibraries.length == 1); - var testParts = dart.getParts(testLibraries.first); - Expect.isTrue(testParts.length == 1); - Expect.isTrue(testParts.first.endsWith('libraries_part.dart')); - - // Test getLibrary(...) - var core = dart.getLibrary('dart:core'); - // Using the print method to verify we get the same library object. - // The print method is only used here because we know it is a member of the - // dart:core library. - var printMethod = JS('', '#.print', core); - Expect.equals(print, printMethod); -} diff --git a/tests/dartdevc_2/mixin/mixin_application_test.dart b/tests/dartdevc_2/mixin/mixin_application_test.dart deleted file mode 100644 index 5c8273c9572..00000000000 --- a/tests/dartdevc_2/mixin/mixin_application_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// 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. - -// @dart=2.6 - -import 'package:expect/expect.dart'; -import 'mixin_declaration.dart'; - -void main() { - // Getter `foo` returns `B._foo` that is coming from the mixin declaration. - Expect.equals('B._foo', C0().foo); - Expect.equals('B._foo', D0().foo); - - // When mixin application is in a separate library from the declaration, - // private symbol from the current library is used to access `_foo`. - Expect.equals('A._foo', C()._foo); - Expect.equals('A._foo', D()._foo); - // Getter `foo` returns `B._foo` that is coming from the mixin declaration. - Expect.equals('B._foo', C().foo); - Expect.equals('B._foo', D().foo); - - // E overrides `_foo`. - Expect.equals('E._foo', E()._foo); -} - -class C0 = A0 with B; -class C = A with B; - -class D0 extends A0 with B {} - -class D extends A with B {} - -class E extends A with B { - String _foo = 'E._foo'; -} - -class A0 {} - -class A { - String _foo = 'A._foo'; -} diff --git a/tests/dartdevc_2/mixin/mixin_declaration.dart b/tests/dartdevc_2/mixin/mixin_declaration.dart deleted file mode 100644 index a217632ee43..00000000000 --- a/tests/dartdevc_2/mixin/mixin_declaration.dart +++ /dev/null @@ -1,10 +0,0 @@ -// 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. - -// @dart = 2.6 - -class B { - String _foo = 'B._foo'; - String get foo => _foo; -} diff --git a/tests/dartdevc_2/mixin/mixin_declaration_application_test.dart b/tests/dartdevc_2/mixin/mixin_declaration_application_test.dart deleted file mode 100644 index 952014dfd3a..00000000000 --- a/tests/dartdevc_2/mixin/mixin_declaration_application_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// 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. - -// @dart=2.6 - -import 'package:expect/expect.dart'; - -void main() { - // Getter `foo` returns `B._foo` that is coming from the mixin declaration. - Expect.equals('B._foo', C0().foo); - Expect.equals('B._foo', D0().foo); - - // When mixin application is in the same library as the declaration, - // private symbol from the mixin declaration `B._foo` overrides `A._foo`. - Expect.equals('B._foo', C()._foo); - Expect.equals('B._foo', D()._foo); - // Getter `foo` returns `B._foo` that is coming from the mixin declaration. - Expect.equals('B._foo', C().foo); - Expect.equals('B._foo', D().foo); - - // E overrides `_foo`. - Expect.equals('E._foo', E()._foo); -} - -class C0 = A0 with B; -class C = A with B; - -class D0 extends A0 with B {} - -class D extends A with B {} - -class E extends A with B { - String _foo = 'E._foo'; -} - -class A0 {} - -class A { - String _foo = 'A._foo'; -} - -class B { - String _foo = 'B._foo'; - String get foo => _foo; -} diff --git a/tests/dartdevc_2/no_such_method_errors_test.dart b/tests/dartdevc_2/no_such_method_errors_test.dart deleted file mode 100644 index 99fed5d0315..00000000000 --- a/tests/dartdevc_2/no_such_method_errors_test.dart +++ /dev/null @@ -1,313 +0,0 @@ -// 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. - -// @dart = 2.6 - -import 'package:expect/expect.dart'; -import 'package:expect/minitest.dart'; - -/// This test is currently written as a white box test to ensure we don't -/// regress on any of the existing code paths that lead to NoSuchMethod errors -/// from dynamic calls. The test cases written with the knowledge of what the -/// generated code will look like. - -// TODO(52190): Improve the NSM errors to make them more helpful. - -expectThrowsNSMWithExactError( - void Function() computation, String expectedErrorMessage) => - Expect.throws( - computation, (error) => error.toString() == expectedErrorMessage); - -class A { - String arity1(int val) { - val += 10; - return val.toString(); - } - - void genericArity2(T t, S s) => print('$T, $S'); - - static String staticArity1(int val) { - val += 10; - return val.toString(); - } - - static void staticGenericArity2(T t, S s) => print('$T, $S'); - - Function nullField; - - Function fieldArity1 = (int val) { - val += 10; - return val.toString(); - }; -} - -String arity1(int val) { - val += 10; - return val.toString(); -} - -void genericArity2(T t, S s) => print('$T, $S'); - -Function fieldArity1 = (int val) { - val += 10; - return val.toString(); -}; - -String namedArity1({bool fosse}) { - return fosse.toString(); -} - -int x; - -void main() { - group('Dynamic call of', () { - dynamic instanceOfA = A(); - test('instance of a class with no `call()` method', () { - // Compiled as `dcall()`. - expectThrowsNSMWithExactError( - () => instanceOfA(), - "NoSuchMethodError: 'call'\n" - "Dynamic call of object has no instance method 'call'.\n" - "Receiver: ${Error.safeToString(instanceOfA)}\n" - "Arguments: []"); - }); - group('null', () { - // TODO(49628): These should actually throw NoSuchMethodError with a - // helpful error message. - group('value', () { - dynamic nullVal = null; - test('without type arguments', () { - // Compiled as `dcall()`. - Expect.throws(() => nullVal()); - }); - test('passing type arguments', () { - // Compiled as `dgcall()`. - Expect.throws(() => nullVal()); - }); - }); - group('instance field', () { - test('without type arguments', () { - // Compiled as `dsend()`. - Expect.throws(() => instanceOfA.nullField()); - }); - test('passing type arguments', () { - // Compiled as `dgsend()`. - Expect.throws(() => instanceOfA.nullField()); - }); - }); - }); - group('class instance members that do not exist', () { - group('method', () { - test('without passing type arguments', () { - // Compiled as `dsend()`. - expectThrowsNSMWithExactError( - () => instanceOfA.doesNotExist(), - "NoSuchMethodError: 'doesNotExist'\n" - "Dynamic call of null.\n" - "Receiver: ${Error.safeToString(instanceOfA)}\n" - "Arguments: []"); - }); - test('passing type arguments', () { - // Compiled as `dgsend()`. - expectThrowsNSMWithExactError( - () => instanceOfA.doesNotExist(), - "NoSuchMethodError: 'doesNotExist'\n" - "Dynamic call of null.\n" - "Receiver: ${Error.safeToString(instanceOfA)}\n" - "Arguments: []"); - }); - }); - test('setter', () { - // Compiled as `dput()`. - expectThrowsNSMWithExactError( - () => instanceOfA.doesNotExist = 10, - "NoSuchMethodError: 'doesNotExist='\n" - "method not found\n" - "Receiver: ${Error.safeToString(instanceOfA)}\n" - "Arguments: [10]"); - }); - test('getter', () { - // Compiled as `dload()`. - expectThrowsNSMWithExactError( - () => x = instanceOfA.doesNotExist, - "NoSuchMethodError: 'doesNotExist'\n" - "method not found\n" - "Receiver: ${Error.safeToString(instanceOfA)}\n" - "Arguments: []"); - }); - }); - group('tearoff', () { - // The code path for throwing NoSuchMethodErrors because of the incorrect - // type arguments is shared by all forms of dynamic invocations. Simply - // using tearoffs to trigger each form of the error. - dynamic arity1Tearoff = arity1; - dynamic genericArity2Tearoff = genericArity2; - void Function(int, String) instantiatedFn = genericArity2; - dynamic instantiatedTearoff = instantiatedFn; - test('passing unexpected type arguments', () { - // Compiled as `dgcall()` and throws from `checkAndCall()`. - expectThrowsNSMWithExactError( - () => arity1Tearoff(42), - "NoSuchMethodError: 'arity1'\n" - "Dynamic call with unexpected type arguments. " - "Expected: 0 Actual: 1\n" - "Receiver: ${Error.safeToString(arity1Tearoff)}\n" - "Arguments: [42]"); - }); - test('passing too many type arguments', () { - // Compiled as `dgcall()` and throws from `checkAndCall()`. - expectThrowsNSMWithExactError( - () => genericArity2Tearoff(), - "NoSuchMethodError: 'genericArity2'\n" - "Dynamic call with incorrect number of type arguments. " - "Expected: 2 Actual: 3\n" - "Receiver: ${Error.safeToString(genericArity2Tearoff)}\n" - "Arguments: []"); - }); - test('passing too few type arguments', () { - // Compiled as `dgcall()` and throws from `checkAndCall()`. - expectThrowsNSMWithExactError( - () => genericArity2Tearoff(), - "NoSuchMethodError: 'genericArity2'\n" - "Dynamic call with incorrect number of type arguments. " - "Expected: 2 Actual: 1\n" - "Receiver: ${Error.safeToString(genericArity2Tearoff)}\n" - "Arguments: []"); - }); - test('already instantiated and passing type arguments ', () { - // Compiled as `dgcall()` and throws from `checkAndCall()`. - expectThrowsNSMWithExactError( - () => instantiatedTearoff(), - "NoSuchMethodError: 'result'\n" - "Dynamic call with unexpected type arguments. " - "Expected: 0 Actual: 2\n" - "Receiver: ${Error.safeToString(instantiatedTearoff)}\n" - "Arguments: []"); - }); - }); - group('`Function.apply()`', () { - Function arity1Tearoff = arity1; - Function namedArity1Tearoff = namedArity1; - // The code path for throwing NoSuchMethodErrors because of the wrong - // number of arguments or incorrect named arguments is shared by all - // forms of dynamic invocations. Function.apply used here for simplicity. - // Argument errors generated from `_argumentErrors()`. - test('passing too many arguments', () { - expectThrowsNSMWithExactError( - () => Function.apply(arity1Tearoff, [42, false]), - "NoSuchMethodError: 'arity1'\n" - "Dynamic call with too many arguments. Expected: 1 Actual: 2\n" - "Receiver: ${Error.safeToString(arity1Tearoff)}\n" - "Arguments: [42, false]"); - }); - test('passing too few arguments', () { - expectThrowsNSMWithExactError( - () => Function.apply(arity1Tearoff, []), - "NoSuchMethodError: 'arity1'\n" - "Dynamic call with too few arguments. Expected: 1 Actual: 0\n" - "Receiver: ${Error.safeToString(arity1Tearoff)}\n" - "Arguments: []"); - }); - test('passing unexpected named argument', () { - expectThrowsNSMWithExactError( - () => Function.apply( - namedArity1Tearoff, null, {#fosse: true, #cello: true}), - "NoSuchMethodError: 'namedArity1'\n" - "Dynamic call with unexpected named argument 'cello'.\n" - "Receiver: ${Error.safeToString(namedArity1Tearoff)}\n" - "Arguments: [fosse: true, cello: true]"); - }); - }); - }); - group('Descriptors appearing in `NoSuchMethodError` message for ', () { - // Some extra tests for the names that appear in all the forms of dynamic - // calls. All of these tests pass wrong number of arguments just to trigger - // the error message. - test('class instance method', () { - dynamic instanceOfA = A(); - Expect.throws(() => instanceOfA.arity1(), - (error) => error.toString().contains("NoSuchMethodError: 'arity1'")); - }); - test('class instance method tearoff', () { - dynamic tearoff = A().arity1; - Expect.throws( - () => tearoff(), - (error) => - error.toString().contains("NoSuchMethodError: 'bound arity1'")); - }); - test('class instance generic method', () { - dynamic instanceOfA = A(); - Expect.throws( - () => instanceOfA.genericArity2(), - (error) => - error.toString().contains("NoSuchMethodError: 'genericArity2'")); - }); - test('class instance generic method tearoff', () { - dynamic tearoff = A().genericArity2; - Expect.throws( - () => tearoff(10), - (error) => error - .toString() - .contains("NoSuchMethodError: 'bound genericArity2'")); - }); - test('class instance generic method tearoff instantiated', () { - void Function(int, String) instantiatedFn = A().genericArity2; - dynamic tearoff = instantiatedFn; - Expect.throws(() => tearoff(), - (error) => error.toString().contains("NoSuchMethodError: 'result'")); - }); - test('class instance field', () { - dynamic instanceOfA = A(); - Expect.throws( - () => instanceOfA.fieldArity1(), - (error) => - error.toString().contains("NoSuchMethodError: 'fieldArity1'")); - }); - test('class static method tearoff', () { - dynamic tearoff = A.staticArity1; - Expect.throws( - () => tearoff(), - (error) => - error.toString().contains("NoSuchMethodError: 'staticArity1'")); - }); - test('class static generic method tearoff', () { - dynamic tearoff = A.staticGenericArity2; - Expect.throws( - () => tearoff(), - (error) => error - .toString() - .contains("NoSuchMethodError: 'staticGenericArity2'")); - }); - test('class static generic method tearoff instantiated', () { - void Function(int, String) instantiatedFn = A.staticGenericArity2; - dynamic tearoff = instantiatedFn; - Expect.throws(() => tearoff(), - (error) => error.toString().contains("NoSuchMethodError: 'result'")); - }); - test('top level method tearoff', () { - dynamic tearoff = A.staticArity1; - Expect.throws( - () => tearoff(), - (error) => - error.toString().contains("NoSuchMethodError: 'staticArity1'")); - }); - test('top level generic method tearoff', () { - dynamic tearoff = genericArity2; - Expect.throws( - () => tearoff(), - (error) => - error.toString().contains("NoSuchMethodError: 'genericArity2'")); - }); - test('top level generic method tearoff instantiated', () { - void Function(int, String) instantiatedFn = genericArity2; - dynamic tearoff = instantiatedFn; - Expect.throws(() => tearoff(), - (error) => error.toString().contains("NoSuchMethodError: 'result'")); - }); - test('top level field', () { - Expect.throws(() => fieldArity1(), - (error) => error.toString().contains("NoSuchMethodError: ''")); - }); - }); -} diff --git a/tests/dartdevc_2/runtime_utils.dart b/tests/dartdevc_2/runtime_utils.dart deleted file mode 100644 index 08490951272..00000000000 --- a/tests/dartdevc_2/runtime_utils.dart +++ /dev/null @@ -1,53 +0,0 @@ -// 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. - -// @dart = 2.9 - -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: void -> void. -/// -// TODO(nshahan): The generic function type is created as a legacy type. -genericFunction(bound) => gFnType((T) => [typeRep(), []], (T) => [bound]); - -/// Returns an unwrapped generic function type with a bounded type argument in -/// the form: [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 -> [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.'); diff --git a/tests/dartdevc_2/subtype_test.dart b/tests/dartdevc_2/subtype_test.dart deleted file mode 100644 index 51e0c755ff8..00000000000 --- a/tests/dartdevc_2/subtype_test.dart +++ /dev/null @@ -1,150 +0,0 @@ -// 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. - -// @dart = 2.6 - -import 'dart:_runtime' show typeRep; -import 'dart:async' show FutureOr; - -import 'runtime_utils.dart'; - -class A {} - -class B extends A {} - -class C extends B {} - -class D {} - -class E {} - -class F extends E {} - -void main() { - // A <: dynamic - checkProperSubtype(typeRep(), typeRep()); - // A <: Object - checkProperSubtype(typeRep(), typeRep()); - // A <: Object - checkProperSubtype(typeRep(), typeRep()); - - // Null <: A - checkProperSubtype(typeRep(), typeRep()); - - // FutureOr <: Future - checkSubtype(typeRep>(), typeRep>()); - // Future <: FutureOr - checkSubtype(typeRep>(), typeRep>()); - // Future <: FutureOr - checkProperSubtype(typeRep>(), typeRep>()); - // B <: <: FutureOr - checkProperSubtype(typeRep(), typeRep>()); - // Future <: Future - checkProperSubtype(typeRep>(), typeRep>()); - // B <: A - checkProperSubtype(typeRep(), typeRep()); - - // A <: A - checkSubtype(typeRep(), typeRep()); - // C <: B - checkProperSubtype(typeRep(), typeRep()); - // C <: A - checkProperSubtype(typeRep(), typeRep()); - - // A -> B <: Function - checkProperSubtype(typeRep(), typeRep()); - - // A -> B <: A -> B - checkSubtype(typeRep(), typeRep()); - - // A -> B <: B -> B - checkProperSubtype(typeRep(), typeRep()); - - // A -> B <: A -> A - checkSubtype(typeRep(), typeRep()); - - // Generic Function Subtypes. - // Bound is a built in type. - // void -> void <: void -> void - checkSubtype( - genericFunction(typeRep()), genericFunction(typeRep())); - - // A -> T <: B -> T - checkProperSubtype(functionGenericReturn(typeRep(), typeRep()), - functionGenericReturn(typeRep(), typeRep())); - - // T -> B <: T -> A - checkProperSubtype(functionGenericArg(typeRep(), typeRep()), - functionGenericArg(typeRep(), typeRep())); - - // Bound is a function type. - // B> void -> void <: B> void -> void - checkSubtype(genericFunction(typeRep()), - genericFunction(typeRep())); - - // B> A -> T <: B> B -> T - checkProperSubtype( - functionGenericReturn(typeRep(), typeRep()), - functionGenericReturn(typeRep(), typeRep())); - - // B> T -> B <: B> T -> A - checkProperSubtype(functionGenericArg(typeRep(), typeRep()), - functionGenericArg(typeRep(), typeRep())); - - // Bound is a user defined class. - // void -> void <: void -> void - checkSubtype(genericFunction(typeRep()), genericFunction(typeRep())); - - // A -> T <: B -> T - checkProperSubtype(functionGenericReturn(typeRep(), typeRep()), - functionGenericReturn(typeRep(), typeRep())); - - // T -> B <: T -> A - checkProperSubtype(functionGenericArg(typeRep(), typeRep()), - functionGenericArg(typeRep(), typeRep())); - - // Bound is a Future. - // > void -> void <: > void -> void - checkSubtype(genericFunction(typeRep>()), - genericFunction(typeRep>())); - - // > A -> T <: > B -> T - checkProperSubtype(functionGenericReturn(typeRep>(), typeRep()), - functionGenericReturn(typeRep>(), typeRep())); - - // > T -> B <: > T -> A - checkProperSubtype(functionGenericArg(typeRep>(), typeRep()), - functionGenericArg(typeRep>(), typeRep())); - - // Bound is a FutureOr. - // > void -> void <: - // > void -> void - checkSubtype(genericFunction(typeRep>()), - genericFunction(typeRep>())); - - // > A -> T <: > B -> T - checkProperSubtype( - functionGenericReturn(typeRep>(), typeRep()), - functionGenericReturn(typeRep>(), typeRep())); - - // > T -> B <: > T -> A - checkProperSubtype(functionGenericArg(typeRep>(), typeRep()), - functionGenericArg(typeRep>(), typeRep())); - - // D <: D - checkSubtype(typeRep(), typeRep>()); - // D <: D - checkSubtype(typeRep>(), typeRep()); - // D <: D - checkSubtype(typeRep>(), typeRep>()); - - // F <: E - checkProperSubtype(typeRep(), typeRep()); - // F <: E - checkProperSubtype(typeRep(), typeRep>()); - // E <: E - checkProperSubtype(typeRep>(), typeRep()); - // // E <: E - checkProperSubtype(typeRep>(), typeRep>()); -} diff --git a/tests/dartdevc_2/utils.dart b/tests/dartdevc_2/utils.dart deleted file mode 100644 index dff17dc7ab1..00000000000 --- a/tests/dartdevc_2/utils.dart +++ /dev/null @@ -1,13 +0,0 @@ -// 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. - -// @dart = 2.6 - -import "package:expect/expect.dart"; - -/// Expects that [expected] appears as a substring in [actual]. -expectStringContains(String expected, String actual) { - Expect.isTrue(actual.contains(expected), - 'Failure: "$expected" should appear in: "$actual".'); -} diff --git a/tests/ffi/ffi_native_test.dart b/tests/ffi/ffi_native_test.dart index 99a22fee74d..0ed8f9b56f2 100644 --- a/tests/ffi/ffi_native_test.dart +++ b/tests/ffi/ffi_native_test.dart @@ -2,9 +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. -// NOTE: There is no `test/ffi_2/...` version of this test since annotations -// with type arguments isn't supported in that version of Dart. - import 'dart:ffi'; import 'dart:nativewrappers'; diff --git a/tests/ffi/generator/structs_by_value_tests_generator.dart b/tests/ffi/generator/structs_by_value_tests_generator.dart index 6a29690b8ed..3df50b7a6a3 100644 --- a/tests/ffi/generator/structs_by_value_tests_generator.dart +++ b/tests/ffi/generator/structs_by_value_tests_generator.dart @@ -1048,6 +1048,7 @@ import 'dart:ffi'; """; } +// TODO: Remove non-nnbd support. String compoundsPath({required bool isNnbd}) { final folder = isNnbd ? 'ffi' : 'ffi_2'; return Platform.script diff --git a/tests/ffi/vmspecific_ffi_native_test.dart b/tests/ffi/vmspecific_ffi_native_test.dart index 177192be9cc..1ad52da3928 100644 --- a/tests/ffi/vmspecific_ffi_native_test.dart +++ b/tests/ffi/vmspecific_ffi_native_test.dart @@ -4,9 +4,6 @@ // // SharedObjects=ffi_test_functions -// NOTE: There is no `test/ffi_2/...` version of this test since annotations -// with type arguments isn't supported in that version of Dart. - import 'dart:ffi'; import 'dart:nativewrappers'; diff --git a/tests/ffi/vmspecific_static_checks_ffinative_test.dart b/tests/ffi/vmspecific_static_checks_ffinative_test.dart index 221a03104fc..de292ff1f4c 100644 --- a/tests/ffi/vmspecific_static_checks_ffinative_test.dart +++ b/tests/ffi/vmspecific_static_checks_ffinative_test.dart @@ -2,9 +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. -// NOTE: There is no `test/ffi_2/...` version of this test since annotations -// with type arguments isn't supported in that version of Dart. - import 'dart:ffi'; import 'dart:nativewrappers'; diff --git a/tests/ffi_2/abi_specific_int_incomplete_aot_test.dart b/tests/ffi_2/abi_specific_int_incomplete_aot_test.dart deleted file mode 100644 index 84296529abf..00000000000 --- a/tests/ffi_2/abi_specific_int_incomplete_aot_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2021, 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 - -// SharedObjects=ffi_test_functions - -import 'dart:ffi'; - -// We want at least 1 mapping to satisfy the static checks. -const notTestingOn = Abi.fuchsiaArm64; - -@AbiSpecificIntegerMapping({ - notTestingOn: Int8(), -}) -class Incomplete extends AbiSpecificInteger { - const Incomplete(); -} - -void main() { - // Any use that causes the class to be used, causes a compile-time error - // during loading of the class. - nullptr.cast(); //# 1: compile-time error -} diff --git a/tests/ffi_2/abi_specific_int_incomplete_jit_test.dart b/tests/ffi_2/abi_specific_int_incomplete_jit_test.dart deleted file mode 100644 index b15274e4cfb..00000000000 --- a/tests/ffi_2/abi_specific_int_incomplete_jit_test.dart +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) 2021, 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 - -// SharedObjects=ffi_test_functions - -import 'dart:ffi'; - -import 'package:expect/expect.dart'; -import 'package:ffi/ffi.dart'; - -// We want at least 1 mapping to satisfy the static checks. -const notTestingOn = Abi.fuchsiaArm64; - -@AbiSpecificIntegerMapping({ - notTestingOn: Int8(), -}) -class Incomplete extends AbiSpecificInteger { - const Incomplete(); -} - -void main() { - if (Abi.current() == notTestingOn) { - return; - } - testSizeOf(); - testStoreLoad(); - testStoreLoadIndexed(); - testStruct(); - testInlineArray(); - testInlineArray2(); - testAsFunction(); -} - -void testSizeOf() { - Expect.throws(() { - sizeOf(); - }); -} - -void testStoreLoad() { - final p = calloc().cast(); - Expect.throws(() { - p.value = 10; - }); - Expect.throws(() { - p.value; - }); - calloc.free(p); -} - -void testStoreLoadIndexed() { - final p = calloc().cast(); - Expect.throws(() { - p[0] = 10; - }); - Expect.throws(() { - p[1]; - }); - calloc.free(p); -} - -class IncompleteStruct extends Struct { - @Incomplete() - int a0; - - @Incomplete() - int a1; -} - -void testStruct() { - final p = calloc(2).cast(); - Expect.throws(() { - p.ref.a0 = 1; - }); - Expect.throws(() { - p.ref.a0; - }); - calloc.free(p); -} - -class IncompleteArrayStruct extends Struct { - @Array(100) - Array a0; -} - -void testInlineArray() { - final p = calloc(100).cast(); - final array = p.ref.a0; - Expect.throws(() { - array[3] = 4; - }); - Expect.throws(() { - array[3]; - }); - calloc.free(p); -} - -const _dim1 = 8; -const _dim2 = 4; - -class IncompleteArrayArrayStruct extends Struct { - @Array(_dim1, _dim2) - Array> a0; -} - -void testInlineArray2() { - final p = calloc(100).cast(); - Expect.throws(() { - p.elementAt(3); - }); - calloc.free(p); -} - -void testAsFunction() { - Expect.throws(() { - nullptr - .cast>() - .asFunction(); - }); - Expect.throws(() { - nullptr - .cast>() - .asFunction(); - }); - Expect.throws(() { - nullptr - .cast>() - .asFunction(); - }); - Expect.throws(() { - nullptr - .cast>() - .asFunction(); - }); -} diff --git a/tests/ffi_2/abi_specific_int_test.dart b/tests/ffi_2/abi_specific_int_test.dart deleted file mode 100644 index 57daa3f3cf0..00000000000 --- a/tests/ffi_2/abi_specific_int_test.dart +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) 2021, 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 - -import 'dart:ffi'; -import 'dart:io'; - -import 'package:expect/expect.dart'; -import 'package:ffi/ffi.dart'; - -void main() { - testSizeOf(); - testStoreLoad(); - testStoreLoadIndexed(); - testStruct(); - testInlineArray(); - testInlineArray2(); -} - -void testSizeOf() { - final size = sizeOf(); - if (Platform.isWindows) { - Expect.equals(2, size); - } else { - Expect.equals(4, size); - } -} - -void testStoreLoad() { - final p = calloc(); - p.value = 10; - Expect.equals(10, p.value); - calloc.free(p); -} - -void testStoreLoadIndexed() { - final p = calloc(2); - p[0] = 10; - p[1] = 3; - Expect.equals(10, p[0]); - Expect.equals(3, p[1]); - calloc.free(p); -} - -class WCharStruct extends Struct { - @WChar() - int a0; - - @WChar() - int a1; -} - -void testStruct() { - final p = calloc(); - p.ref.a0 = 1; - Expect.equals(1, p.ref.a0); - p.ref.a0 = 2; - Expect.equals(2, p.ref.a0); - calloc.free(p); -} - -class WCharArrayStruct extends Struct { - @Array(100) - Array a0; -} - -void testInlineArray() { - final p = calloc(); - final array = p.ref.a0; - for (int i = 0; i < 100; i++) { - array[i] = i; - } - for (int i = 0; i < 100; i++) { - Expect.equals(i, array[i]); - } - calloc.free(p); -} - -const _dim0 = 3; -const _dim1 = 8; -const _dim2 = 4; - -class WCharArrayArrayStruct extends Struct { - @Array(_dim1, _dim2) - Array> a0; -} - -void testInlineArray2() { - int someValue(int a, int b, int c) => a * 1337 + b * 42 + c; - final p = calloc(_dim0); - for (int i0 = 0; i0 < _dim0; i0++) { - final array = p.elementAt(i0).ref.a0; - for (int i1 = 0; i1 < _dim1; i1++) { - final array2 = array[i1]; - for (int i2 = 0; i2 < _dim2; i2++) { - array2[i2] = someValue(i0, i1, i2); - } - } - } - for (int i0 = 0; i0 < _dim0; i0++) { - final array = p.elementAt(i0).ref.a0; - for (int i1 = 0; i1 < _dim1; i1++) { - final array2 = array[i1]; - for (int i2 = 0; i2 < _dim2; i2++) { - Expect.equals(someValue(i0, i1, i2), array2[i2]); - } - } - } - calloc.free(p); -} diff --git a/tests/ffi_2/abi_test.dart b/tests/ffi_2/abi_test.dart deleted file mode 100644 index d9c152e1b94..00000000000 --- a/tests/ffi_2/abi_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2021, 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 - -import 'dart:ffi'; -import 'dart:io'; - -import 'package:expect/expect.dart'; - -void main() { - testCurrent(); - testPlatformVersionCompatibility(); -} - -void testCurrent() { - final currentAbi = Abi.current(); - Expect.isTrue(Abi.values.contains(currentAbi)); -} - -void testPlatformVersionCompatibility() { - final abiStringFromPlatformVersion = Platform.version.split('"')[1]; - final abiStringFromCurrent = Abi.current().toString(); - Expect.equals(abiStringFromPlatformVersion, abiStringFromCurrent); -} diff --git a/tests/ffi_2/aliasing_test.dart b/tests/ffi_2/aliasing_test.dart deleted file mode 100644 index c3825d80432..00000000000 --- a/tests/ffi_2/aliasing_test.dart +++ /dev/null @@ -1,214 +0,0 @@ -// 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. -// -// Dart test programing for testing that optimizations do wrongly assume loads -// from and stores to C memory are not aliased. -// -// SharedObjects=ffi_test_functions -// VMOptions=--deterministic --optimization-counter-threshold=50 - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:ffi/ffi.dart"; -import "package:expect/expect.dart"; - -import 'ffi_test_helpers.dart'; - -void main() { - for (int i = 0; i < 100; ++i) { - testNonAlias(); - testAliasCast(); - testAliasCast2(); - testAliasOffsetBy(); - testAliasOffsetBy2(); - testAliasElementAt(); - testAliasElementAt2(); - testAliasFromAddress(); - testAliasFromAddress2(); - testAliasFromAddressViaMemory(); - testAliasFromAddressViaMemory2(); - testAliasFromAddressViaNativeFunction(); - testAliasFromAddressViaNativeFunction2(); - testPartialOverlap(); - } -} - -void testNonAlias() { - final source = calloc(); - source.value = 42; - final int a = source.value; - source.value = 1984; - // alias.value should be re-executed, as we wrote to alias. - Expect.notEquals(a, source.value); - calloc.free(source); -} - -void testAliasCast() { - final source = calloc(); - final alias = source.cast().cast(); - source.value = 42; - final int a = source.value; - alias.value = 1984; - // source.value should be re-executed, we wrote alias which aliases source. - Expect.notEquals(a, source.value); - calloc.free(source); -} - -void testAliasCast2() { - final source = calloc(); - final alias = source.cast().cast(); - final alias2 = source.cast().cast(); - alias.value = 42; - final int a = alias.value; - alias2.value = 1984; - // alias.value should be re-executed, we wrote alias2 which aliases alias. - Expect.notEquals(a, alias.value); - calloc.free(source); -} - -void testAliasOffsetBy() { - final source = calloc(2); - final alias = source.offsetBy(8).offsetBy(-8); - source.value = 42; - final int a = source.value; - alias.value = 1984; - // source.value should be re-executed, we wrote alias which aliases source. - Expect.notEquals(a, source.value); - calloc.free(source); -} - -void testAliasOffsetBy2() { - final source = calloc(3); - final alias = source.offsetBy(16).offsetBy(-16); - final alias2 = source.offsetBy(8).offsetBy(-8); - alias.value = 42; - final int a = alias.value; - alias2.value = 1984; - // alias.value should be re-executed, we wrote alias2 which aliases alias. - Expect.notEquals(a, alias.value); - calloc.free(source); -} - -void testAliasElementAt() { - final source = calloc(2); - final alias = source.elementAt(1).elementAt(-1); - source.value = 42; - final int a = source.value; - alias.value = 1984; - // source.value should be re-executed, we wrote alias which aliases source. - Expect.notEquals(a, source.value); - calloc.free(source); -} - -void testAliasElementAt2() { - final source = calloc(3); - final alias = source.elementAt(2).elementAt(-2); - final alias2 = source.elementAt(1).elementAt(-1); - alias.value = 42; - final int a = alias.value; - alias2.value = 1984; - // alias.value should be re-executed, we wrote alias2 which aliases alias. - Expect.notEquals(a, alias.value); - calloc.free(source); -} - -void testAliasFromAddress() { - final source = calloc(); - final alias = Pointer.fromAddress(source.address); - source.value = 42; - final int a = source.value; - alias.value = 1984; - // source.value should be re-executed, we wrote alias which aliases source. - Expect.notEquals(a, source.value); - calloc.free(source); -} - -void testAliasFromAddress2() { - final source = calloc(); - final alias = Pointer.fromAddress(source.address); - final alias2 = Pointer.fromAddress(source.address); - alias.value = 42; - final int a = alias.value; - alias2.value = 1984; - // alias.value should be re-executed, we wrote alias2 which aliases alias. - Expect.notEquals(a, alias.value); - calloc.free(source); -} - -void testAliasFromAddressViaMemory() { - final helper = calloc(); - final source = calloc(); - helper.value = source.address; - final alias = Pointer.fromAddress(helper.value); - source.value = 42; - final int a = source.value; - alias.value = 1984; - // source.value should be re-executed, we wrote alias which aliases source. - Expect.notEquals(a, source.value); - calloc.free(helper); - calloc.free(source); -} - -void testAliasFromAddressViaMemory2() { - final helper = calloc(); - final source = calloc(); - helper.value = source.address; - final alias = Pointer.fromAddress(helper.value); - final alias2 = Pointer.fromAddress(helper.value); - alias.value = 42; - final int a = alias.value; - alias2.value = 1984; - // alias.value should be re-executed, we wrote alias2 which aliases alias. - Expect.notEquals(a, alias.value); - calloc.free(helper); - calloc.free(source); -} - -typedef NativeQuadOpSigned = Int64 Function(Int8, Int16, Int32, Int64); -typedef QuadOp = int Function(int, int, int, int); - -QuadOp intComputation = ffiTestFunctions - .lookupFunction("IntComputation"); - -void testAliasFromAddressViaNativeFunction() { - final source = calloc(); - final alias = - Pointer.fromAddress(intComputation(0, 0, 0, source.address)); - source.value = 42; - final int a = source.value; - alias.value = 1984; - // source.value should be re-executed, we wrote alias which aliases source. - Expect.notEquals(a, source.value); - calloc.free(source); -} - -void testAliasFromAddressViaNativeFunction2() { - final source = calloc(); - final alias = - Pointer.fromAddress(intComputation(0, 0, 0, source.address)); - final alias2 = - Pointer.fromAddress(intComputation(0, 0, 0, source.address)); - alias.value = 42; - final int a = alias.value; - alias2.value = 1984; - // alias.value should be re-executed, we wrote alias2 which aliases alias. - Expect.notEquals(a, alias.value); - calloc.free(source); -} - -@pragma('vm:never-inline') -Pointer makeDerived(Pointer source) => - source.offsetBy(7).cast(); - -testPartialOverlap() { - final source = calloc(2); - final derived = makeDerived(source); - source.value = 0x1122334455667788; - final int value = source.value; - derived.value = 0xaa; - Expect.notEquals(value, source.value); - calloc.free(source); -} diff --git a/tests/ffi_2/all_positive.dart b/tests/ffi_2/all_positive.dart deleted file mode 100644 index a6810b66635..00000000000 --- a/tests/ffi_2/all_positive.dart +++ /dev/null @@ -1,104 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Generated by prepare_flutter_bundle.dart and not ignoring vmspecific. -// Used in fuchsia_test_component. -// -// Note that we are not using any VM flags here, so we are not exercising GC -// corner cases etc. However, we are mainly interested in exercising the -// calling convention on Fuchsia. - -import "dart:async"; - -import "aliasing_test.dart" as main0; -import "data_not_asan_test.dart" as main1; -import "data_test.dart" as main2; -import "dylib_isolates_test.dart" as main3; -import "extension_methods_test.dart" as main4; -import "external_typed_data_test.dart" as main5; -import "function_callbacks_many_test.dart" as main6; -import "function_callbacks_test.dart" as main7; -import "function_callbacks_very_many_test.dart" as main8; -import "function_structs_test.dart" as main9; -import "function_test.dart" as main10; -import "function_very_many_test.dart" as main11; -import "hardfp_test.dart" as main12; -import "negative_function_test.dart" as main13; -import "null_regress_39068_test.dart" as main14; -import "null_test.dart" as main15; -import "regress_37254_test.dart" as main16; -import "regress_39044_test.dart" as main17; -import "regress_39063_test.dart" as main18; -import "regress_39885_test.dart" as main19; -import "regress_40537_test.dart" as main20; -import "regress_43016_test.dart" as main21; -import "regress_43693_test.dart" as main22; -import "regress_jump_to_frame_test.dart" as main23; -import "sizeof_test.dart" as main24; -import "snapshot_test.dart" as main25; -import "stacktrace_regress_37910_test.dart" as main26; -import "structs_test.dart" as main27; -import "variance_function_test.dart" as main28; -import "vmspecific_function_callbacks_exit_test.dart" as main29; -import "vmspecific_function_test.dart" as main30; -import "vmspecific_handle_dynamically_linked_test.dart" as main31; -import "vmspecific_handle_test.dart" as main32; -import "vmspecific_null_test.dart" as main33; -import "vmspecific_object_gc_test.dart" as main34; -import "vmspecific_regress_37100_test.dart" as main35; -import "vmspecific_regress_37511_callbacks_test.dart" as main36; -import "vmspecific_regress_37511_test.dart" as main37; -import "vmspecific_regress_37780_test.dart" as main38; - -Future invoke(dynamic fun) async { - if (fun is void Function() || fun is Future Function()) { - return await fun(); - } else { - return await fun([]); - } -} - -dynamic main() async { - await invoke(main0.main); - await invoke(main1.main); - await invoke(main2.main); - await invoke(main3.main); - await invoke(main4.main); - await invoke(main5.main); - await invoke(main6.main); - await invoke(main7.main); - await invoke(main8.main); - await invoke(main9.main); - await invoke(main10.main); - await invoke(main11.main); - await invoke(main12.main); - await invoke(main13.main); - await invoke(main14.main); - await invoke(main15.main); - await invoke(main16.main); - await invoke(main17.main); - await invoke(main18.main); - await invoke(main19.main); - await invoke(main20.main); - await invoke(main21.main); - await invoke(main22.main); - await invoke(main23.main); - await invoke(main24.main); - await invoke(main25.main); - await invoke(main26.main); - await invoke(main27.main); - await invoke(main28.main); - await invoke(main29.main); - await invoke(main30.main); - await invoke(main31.main); - await invoke(main32.main); - await invoke(main33.main); - await invoke(main34.main); - await invoke(main35.main); - await invoke(main36.main); - await invoke(main37.main); - await invoke(main38.main); -} diff --git a/tests/ffi_2/allocator_test.dart b/tests/ffi_2/allocator_test.dart deleted file mode 100644 index 8bbc1b0a31d..00000000000 --- a/tests/ffi_2/allocator_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2021, 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 - -// Tests that we can implement the Allocator interface. - -import 'dart:ffi'; - -class MyAllocator implements Allocator { - const MyAllocator(); - - @override - Pointer allocate(int numBytes, {int alignment}) { - throw "Not implemented"; - } - - void free(Pointer pointer) {} -} - -const myAllocator = MyAllocator(); - -void main() { - print(myAllocator); -} diff --git a/tests/ffi_2/analysis_options.yaml b/tests/ffi_2/analysis_options.yaml deleted file mode 100644 index f8701d72382..00000000000 --- a/tests/ffi_2/analysis_options.yaml +++ /dev/null @@ -1,3 +0,0 @@ -analyzer: - exclude: - # Do analyze this subfolder in the tests/ even if tests/ is fully excluded. diff --git a/tests/ffi_2/bool_test.dart b/tests/ffi_2/bool_test.dart deleted file mode 100644 index 36af8a8b3bd..00000000000 --- a/tests/ffi_2/bool_test.dart +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) 2021, 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 test program for testing dart:ffi bools. - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; -import "package:ffi/ffi.dart"; - -import 'function_structs_by_value_generated_compounds.dart'; - -void main() { - testSizeOf(); - testStoreLoad(); - testStoreLoadIndexed(); - testStruct(); - testStruct2(); - testInlineArray(); -} - -void testSizeOf() { - Expect.equals(1, sizeOf()); -} - -void testStoreLoad() { - final p = calloc(); - p.value = true; - Expect.equals(true, p.value); - p.value = false; - Expect.equals(false, p.value); - calloc.free(p); -} - -void testStoreLoadIndexed() { - final p = calloc(2); - p[0] = true; - p[1] = false; - Expect.equals(true, p[0]); - Expect.equals(false, p[1]); - calloc.free(p); -} - -void testStruct() { - final p = calloc(); - p.ref.a0 = true; - Expect.equals(true, p.ref.a0); - p.ref.a0 = false; - Expect.equals(false, p.ref.a0); - calloc.free(p); -} - -void testStruct2() { - final p = calloc(); - p.ref.a0 = true; - p.ref.a1 = false; - p.ref.a2 = true; - p.ref.a3 = false; - p.ref.a4 = true; - p.ref.a5 = false; - p.ref.a6 = true; - p.ref.a7 = false; - p.ref.a8 = true; - p.ref.a9 = false; - Expect.equals(true, p.ref.a0); - Expect.equals(false, p.ref.a1); - Expect.equals(true, p.ref.a2); - Expect.equals(false, p.ref.a3); - Expect.equals(true, p.ref.a4); - Expect.equals(false, p.ref.a5); - Expect.equals(true, p.ref.a6); - Expect.equals(false, p.ref.a7); - Expect.equals(true, p.ref.a8); - Expect.equals(false, p.ref.a9); - calloc.free(p); -} - -void testInlineArray() { - final p = calloc(); - final array = p.ref.a0; - for (int i = 0; i < 10; i++) { - array[i] = i % 2 == 0; - } - for (int i = 0; i < 10; i++) { - Expect.equals(i % 2 == 0, array[i]); - } - calloc.free(p); -} diff --git a/tests/ffi_2/c_types_test.dart b/tests/ffi_2/c_types_test.dart deleted file mode 100644 index 7a651ce8c37..00000000000 --- a/tests/ffi_2/c_types_test.dart +++ /dev/null @@ -1,231 +0,0 @@ -// 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. -// -// Tests the sizes of c types from https://dartbug.com/36140. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; -import 'dart:io' show Platform; - -import 'package:expect/expect.dart'; -import 'package:ffi/ffi.dart'; - -import 'ffi_test_helpers.dart'; - -void main() { - printSizes(); - testSizes(); - testIntAssumptions(); - testSizeTAssumptions(); - testLongAssumptions(); - testWCharTAssumptions(); -} - -class CType { - final int ffiSize; - final int Function(Pointer) ffiLoad; - final String modifier; - final String type; - final String type2; - - CType(this.ffiSize, this.type, - {this.type2 = '', this.modifier = '', this.ffiLoad}); - - String get cRepresentation => '$modifier $type $type2'.trim(); - - String get _getSizeName => 'FfiSizeOf_$modifier\_$type\_$type2'; - - String get _getSignName => 'FfiSignOf_$modifier\_$type\_$type2'; - - int Function() get sizeFunction => ffiTestFunctions - .lookupFunction(_getSizeName); - - int Function() get signFunction => ffiTestFunctions - .lookupFunction(_getSignName); - - int get size => sizeFunction(); - - bool get isSigned => signFunction() != 0; - - bool get ffiIsSigned { - final ffiLoad_ = ffiLoad; - if (ffiLoad_ == null) { - return null; - } - assert(size < 8); - return using((Arena arena) { - final p = arena()..value = -1; - return ffiLoad_(p) < 0; - }); - } - - String toString() => cRepresentation; -} - -final char = CType( - sizeOf(), - 'char', - ffiLoad: (Pointer p) => p.cast().value, -); -final uchar = CType( - sizeOf(), - 'char', - modifier: 'unsigned', - ffiLoad: (Pointer p) => p.cast().value, -); -final schar = CType( - sizeOf(), - 'char', - modifier: 'signed', - ffiLoad: (Pointer p) => p.cast().value, -); -final short = CType( - sizeOf(), - 'short', - ffiLoad: (Pointer p) => p.cast().value, -); -final ushort = CType( - sizeOf(), - 'short', - modifier: 'unsigned', - ffiLoad: (Pointer p) => p.cast().value, -); -final int_ = CType( - sizeOf(), - 'int', - ffiLoad: (Pointer p) => p.cast().value, -); -final uint = CType( - sizeOf(), - 'int', - modifier: 'unsigned', - ffiLoad: (Pointer p) => p.cast().value, -); -final long = CType( - sizeOf(), - 'long', -); -final ulong = CType( - sizeOf(), - 'long', - modifier: 'unsigned', -); -final longlong = CType( - sizeOf(), - 'long', - type2: 'long', -); -final ulonglong = CType( - sizeOf(), - 'long', - type2: 'long', - modifier: 'unsigned', -); -final intptr_t = CType( - sizeOf(), - 'intptr_t', -); -final uintptr_t = CType( - sizeOf(), - 'uintptr_t', -); -final size_t = CType( - sizeOf(), - 'size_t', -); -final wchar_t = CType( - sizeOf(), - 'wchar_t', - ffiLoad: (Pointer p) => p.cast().value, -); - -final cTypes = [ - char, - uchar, - schar, - short, - ushort, - int_, - uint, - long, - ulong, - longlong, - ulonglong, - intptr_t, - uintptr_t, - size_t, - wchar_t, -]; - -void printSizes() { - cTypes.forEach((element) { - final cName = element.cRepresentation.padRight(20); - final size = element.size; - final signed = element.isSigned ? 'signed' : 'unsigned'; - print('$cName: $size $signed'); - }); -} - -void testSizes() { - cTypes.forEach((element) { - print(element); - Expect.equals(element.size, element.ffiSize); - final ffiIsSigned = element.ffiIsSigned; - if (ffiIsSigned != null) { - Expect.equals(element.isSigned, ffiIsSigned); - } - }); -} - -void testIntAssumptions() { - Expect.equals(4, int_.size); - Expect.equals(4, uint.size); -} - -void testSizeTAssumptions() { - Expect.equals(intptr_t.size, size_t.size); -} - -void testLongAssumptions() { - if (Platform.isWindows) { - Expect.equals(4, long.size); - Expect.equals(4, ulong.size); - } else { - Expect.equals(intptr_t.size, long.size); - Expect.equals(intptr_t.size, ulong.size); - } -} - -void testWCharTAssumptions() { - final bool isSigned = wchar_t.isSigned; - print('wchar_t isSigned $isSigned'); - if (Platform.isWindows) { - Expect.equals(2, wchar_t.size); - if (isSigned) { - Expect.equals(-0x8000, wCharMinValue()); - Expect.equals(0x7fff, wCharMaxValue()); - } else { - Expect.equals(0, wCharMinValue()); - Expect.equals(0xffff, wCharMaxValue()); - } - } else { - Expect.equals(4, wchar_t.size); - if (isSigned) { - Expect.equals(-0x80000000, wCharMinValue()); - Expect.equals(0x7fffffff, wCharMaxValue()); - } else { - Expect.equals(0, wCharMinValue()); - Expect.equals(0xffffffff, wCharMaxValue()); - } - } -} - -int Function() wCharMinValue = ffiTestFunctions - .lookupFunction('WCharMinValue'); - -int Function() wCharMaxValue = ffiTestFunctions - .lookupFunction('WCharMaxValue'); diff --git a/tests/ffi_2/callback_tests_utils.dart b/tests/ffi_2/callback_tests_utils.dart deleted file mode 100644 index 68621c0c40e..00000000000 --- a/tests/ffi_2/callback_tests_utils.dart +++ /dev/null @@ -1,46 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:ffi'; - -import 'dylib_utils.dart'; - -import "package:expect/expect.dart"; - -final ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); - -typedef NativeCallbackTest = Int32 Function(Pointer); -typedef NativeCallbackTestFn = int Function(Pointer); - -class CallbackTest { - final String name; - final Pointer callback; - final void Function() afterCallbackChecks; - final bool isLeaf; - - CallbackTest(this.name, this.callback, {this.isLeaf: false}) - : afterCallbackChecks = noChecks {} - CallbackTest.withCheck(this.name, this.callback, this.afterCallbackChecks, - {this.isLeaf: false}) {} - - void run() { - final NativeCallbackTestFn tester = isLeaf - ? ffiTestFunctions.lookupFunction("Test$name", isLeaf: true) - : ffiTestFunctions.lookupFunction("Test$name", isLeaf: false); - - final int testCode = tester(callback); - - if (testCode != 0) { - Expect.fail("Test $name failed."); - } - - afterCallbackChecks(); - } -} - -void noChecks() {} diff --git a/tests/ffi_2/calloc_test.dart b/tests/ffi_2/calloc_test.dart deleted file mode 100644 index 20af4fbffe5..00000000000 --- a/tests/ffi_2/calloc_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2021, 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 - -import 'dart:ffi'; - -import 'package:expect/expect.dart'; -import 'package:ffi/ffi.dart'; - -import 'coordinate.dart'; - -void main() { - testZeroInt(); - testZeroFloat(); - testZeroStruct(); -} - -void testZeroInt() { - final p = calloc(); - Expect.equals(0, p.value); - calloc.free(p); -} - -void testZeroFloat() { - final p = calloc(); - Expect.approxEquals(0.0, p.value); - calloc.free(p); -} - -void testZeroStruct() { - final p = calloc(); - Expect.approxEquals(0, p.ref.x); - Expect.approxEquals(0, p.ref.y); - Expect.equals(nullptr, p.ref.next); - calloc.free(p); -} diff --git a/tests/ffi_2/coordinate.dart b/tests/ffi_2/coordinate.dart deleted file mode 100644 index 6cec851a7e3..00000000000 --- a/tests/ffi_2/coordinate.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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. - -// @dart = 2.9 - -library FfiTest; - -import 'dart:ffi'; - -/// Sample struct for dart:ffi library. -class Coordinate extends Struct { - @Double() - double x; - - @Double() - double y; - - Pointer next; -} diff --git a/tests/ffi_2/data_not_asan_test.dart b/tests/ffi_2/data_not_asan_test.dart deleted file mode 100644 index f69d126a933..00000000000 --- a/tests/ffi_2/data_not_asan_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// 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. -// -// Dart test program for testing dart:ffi primitive data pointers. -// -// These callocs trigger an asan alarm, so these tests are in a separate file -// which is excluded in asan mode. - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:ffi/ffi.dart"; -import "package:expect/expect.dart"; - -void main() { - testPointerAllocateTooLarge(); - testPointerAllocateNegative(); -} - -void testPointerAllocateTooLarge() { - // Try to allocate something that doesn't fit in 64 bit address space. - int maxInt = 9223372036854775807; // 2^63 - 1 - Expect.throws(() => calloc(maxInt)); - - // Try to allocate almost the full 64 bit address space. - int maxInt1_8 = 1152921504606846975; // 2^60 -1 - Expect.throws(() => calloc(maxInt1_8)); -} - -void testPointerAllocateNegative() { - // Passing in -1 will be converted into an unsigned integer. So, it will try - // to allocate SIZE_MAX - 1 + 1 bytes. This will fail as it is the max amount - // of addressable memory on the system. - Expect.throws(() => calloc(-1)); -} diff --git a/tests/ffi_2/data_test.dart b/tests/ffi_2/data_test.dart deleted file mode 100644 index 931edda2c68..00000000000 --- a/tests/ffi_2/data_test.dart +++ /dev/null @@ -1,481 +0,0 @@ -// 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. -// -// Dart test program for testing dart:ffi primitive data pointers. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; -import "package:ffi/ffi.dart"; - -import 'ffi_test_helpers.dart'; - -void main() { - testPointerBasic(); - testPointerFromPointer(); - testPointerPointerArithmetic(); - testPointerPointerArithmeticSizes(); - testPointerAllocateZero(); - testPointerCast(); - testCastGeneric(); - testCastGeneric2(); - testCastNativeType(); - testCondensedNumbersInt8(); - testCondensedNumbersFloat(); - testRangeInt8(); - testRangeUint8(); - testRangeInt16(); - testRangeUint16(); - testRangeInt32(); - testRangeUint32(); - testRangeInt64(); - testRangeUint64(); - testRangeIntPtr(); - testFloat(); - testDouble(); - testVoid(); - testPointerPointer(); - testPointerPointerNull(); - testSizeOf(); - testPointerChain(100); - testTypeTest(); - testToString(); - testEquality(); - testAllocateVoid(); - testAllocateNativeFunction(); - testSizeOfVoid(); - testSizeOfNativeFunction(); - testDynamicInvocation(); - testMemoryAddressTruncation(); - testNullptrCast(); -} - -void testPointerBasic() { - Pointer p = calloc(); - p.value = 42; - Expect.equals(42, p.value); - calloc.free(p); -} - -void testPointerFromPointer() { - Pointer p = calloc(); - p.value = 1337; - int ptr = p.address; - Pointer p2 = Pointer.fromAddress(ptr); - Expect.equals(1337, p2.value); - calloc.free(p); -} - -void testPointerPointerArithmetic() { - Pointer p = calloc(2); - Pointer p2 = p.elementAt(1); - p2.value = 100; - Pointer p3 = p.offsetBy(8); - Expect.equals(100, p3.value); - calloc.free(p); -} - -void testPointerPointerArithmeticSizes() { - Pointer p = calloc(2); - Pointer p2 = p.elementAt(1); - int addr = p.address; - Expect.equals(addr + 8, p2.address); - calloc.free(p); - - Pointer p3 = calloc(2); - Pointer p4 = p3.elementAt(1); - addr = p3.address; - Expect.equals(addr + 4, p4.address); - calloc.free(p3); -} - -void testPointerAllocateZero() { - // > If size is 0, either a null pointer or a unique pointer that can be - // > successfully passed to calloc.free() shall be returned. - // http://pubs.opengroup.org/onlinepubs/009695399/functions/calloc.html - // - // Null pointer throws a Dart exception. - bool returnedNullPointer = false; - Pointer p; - try { - p = calloc(0); - } on Exception { - returnedNullPointer = true; - } - if (!returnedNullPointer) { - calloc.free(p); - } -} - -void testPointerCast() { - Pointer p = calloc(); - p.cast(); // gets the correct type args back - calloc.free(p); -} - -void testCastGeneric() { - Pointer generic(Pointer p) { - return p.cast(); - } - - Pointer p = calloc(); - Pointer p2 = generic(p); - calloc.free(p); -} - -void testCastGeneric2() { - Pointer generic(Pointer p) { - return p.cast(); - } - - Pointer p = calloc(); - Pointer p2 = generic(p); - calloc.free(p); -} - -void testCastNativeType() { - Pointer p = calloc(); - p.cast(); - calloc.free(p); -} - -void testCondensedNumbersInt8() { - Pointer p = calloc(8); - for (var i in [0, 1, 2, 3, 4, 5, 6, 7]) { - p[i] = i * 3; - } - for (var i in [0, 1, 2, 3, 4, 5, 6, 7]) { - Expect.equals(i * 3, p[i]); - } - calloc.free(p); -} - -void testCondensedNumbersFloat() { - Pointer p = calloc(8); - for (var i in [0, 1, 2, 3, 4, 5, 6, 7]) { - p[i] = 1.511366173271439e-13; - } - for (var i in [0, 1, 2, 3, 4, 5, 6, 7]) { - Expect.equals(1.511366173271439e-13, p[i]); - } - calloc.free(p); -} - -void testRangeInt8() { - Pointer p = calloc(); - p.value = 127; - Expect.equals(127, p.value); - p.value = -128; - Expect.equals(-128, p.value); - - Expect.equals(0x0000000000000080, 128); - Expect.equals(0xFFFFFFFFFFFFFF80, -128); - p.value = 128; - Expect.equals(-128, p.value); // truncated and sign extended - - Expect.equals(0xFFFFFFFFFFFFFF7F, -129); - Expect.equals(0x000000000000007F, 127); - p.value = -129; - Expect.equals(127, p.value); // truncated - calloc.free(p); -} - -void testRangeUint8() { - Pointer p = calloc(); - p.value = 255; - Expect.equals(255, p.value); - p.value = 0; - Expect.equals(0, p.value); - - Expect.equals(0x0000000000000000, 0); - Expect.equals(0x0000000000000100, 256); - p.value = 256; - Expect.equals(0, p.value); // truncated - - Expect.equals(0xFFFFFFFFFFFFFFFF, -1); - Expect.equals(0x00000000000000FF, 255); - p.value = -1; - Expect.equals(255, p.value); // truncated - calloc.free(p); -} - -void testRangeInt16() { - Pointer p = calloc(); - p.value = 0x7FFF; - Expect.equals(0x7FFF, p.value); - p.value = -0x8000; - Expect.equals(-0x8000, p.value); - p.value = 0x8000; - Expect.equals(0xFFFFFFFFFFFF8000, p.value); // truncated and sign extended - p.value = -0x8001; - Expect.equals(0x7FFF, p.value); // truncated - calloc.free(p); -} - -void testRangeUint16() { - Pointer p = calloc(); - p.value = 0xFFFF; - Expect.equals(0xFFFF, p.value); - p.value = 0; - Expect.equals(0, p.value); - p.value = 0x10000; - Expect.equals(0, p.value); // truncated - p.value = -1; - Expect.equals(0xFFFF, p.value); // truncated - calloc.free(p); -} - -void testRangeInt32() { - Pointer p = calloc(); - p.value = 0x7FFFFFFF; - Expect.equals(0x7FFFFFFF, p.value); - p.value = -0x80000000; - Expect.equals(-0x80000000, p.value); - p.value = 0x80000000; - Expect.equals(0xFFFFFFFF80000000, p.value); // truncated and sign extended - p.value = -0x80000001; - Expect.equals(0x7FFFFFFF, p.value); // truncated - calloc.free(p); -} - -void testRangeUint32() { - Pointer p = calloc(); - p.value = 0xFFFFFFFF; - Expect.equals(0xFFFFFFFF, p.value); - p.value = 0; - Expect.equals(0, p.value); - p.value = 0x100000000; - Expect.equals(0, p.value); // truncated - p.value = -1; - Expect.equals(0xFFFFFFFF, p.value); // truncated - calloc.free(p); -} - -void testRangeInt64() { - Pointer p = calloc(); - p.value = 0x7FFFFFFFFFFFFFFF; // 2 ^ 63 - 1 - Expect.equals(0x7FFFFFFFFFFFFFFF, p.value); - p.value = -0x8000000000000000; // -2 ^ 63 - Expect.equals(-0x8000000000000000, p.value); - calloc.free(p); -} - -void testRangeUint64() { - Pointer p = calloc(); - p.value = 0x7FFFFFFFFFFFFFFF; // 2 ^ 63 - 1 - Expect.equals(0x7FFFFFFFFFFFFFFF, p.value); - p.value = -0x8000000000000000; // -2 ^ 63 interpreted as 2 ^ 63 - Expect.equals(-0x8000000000000000, p.value); - - // Dart allows interpreting bits both signed and unsigned - Expect.equals(0xFFFFFFFFFFFFFFFF, -1); - p.value = -1; // -1 interpreted as 2 ^ 64 - 1 - Expect.equals(-1, p.value); - Expect.equals(0xFFFFFFFFFFFFFFFF, p.value); - calloc.free(p); -} - -void testRangeIntPtr() { - Pointer p = calloc(); - int pAddr = p.address; - p.value = pAddr; // its own address should fit - p.value = 0x7FFFFFFF; // and 32 bit addresses should fit - Expect.equals(0x7FFFFFFF, p.value); - p.value = -0x80000000; - Expect.equals(-0x80000000, p.value); - calloc.free(p); -} - -void testFloat() { - Pointer p = calloc(); - p.value = 1.511366173271439e-13; - Expect.equals(1.511366173271439e-13, p.value); - p.value = 1.4260258159703532e-105; // float does not have enough precision - Expect.notEquals(1.4260258159703532e-105, p.value); - calloc.free(p); -} - -void testDouble() { - Pointer p = calloc(); - p.value = 1.4260258159703532e-105; - Expect.equals(1.4260258159703532e-105, p.value); - calloc.free(p); -} - -void testVoid() { - Pointer p1 = calloc(); - Pointer p2 = p1.cast(); // make this dart pointer opaque - p2.address; // we can print the address - calloc.free(p2); -} - -void testPointerPointer() { - Pointer p = calloc(); - p.value = 17; - Pointer> p2 = calloc(); - p2.value = p; - Expect.equals(17, p2.value.value); - calloc.free(p2); - calloc.free(p); -} - -void testPointerPointerNull() { - Pointer> pointerToPointer = calloc(); - Pointer value = nullptr; - pointerToPointer.value = value; - value = pointerToPointer.value; - Expect.equals(value, nullptr); - value = calloc(); - pointerToPointer.value = value; - value = pointerToPointer.value; - Expect.isNotNull(value); - calloc.free(value); - value = nullptr; - pointerToPointer.value = value; - value = pointerToPointer.value; - Expect.equals(value, nullptr); - calloc.free(pointerToPointer); -} - -void testSizeOf() { - Expect.equals(1, sizeOf()); - Expect.equals(2, sizeOf()); - Expect.equals(4, sizeOf()); - Expect.equals(8, sizeOf()); - Expect.equals(1, sizeOf()); - Expect.equals(2, sizeOf()); - Expect.equals(4, sizeOf()); - Expect.equals(8, sizeOf()); - Expect.equals(true, 4 == sizeOf() || 8 == sizeOf()); - Expect.equals(4, sizeOf()); - Expect.equals(8, sizeOf()); -} - -// note: stack overflows at around 15k calls -void testPointerChain(int length) { - void createChain(Pointer head, int length, int value) { - if (length == 0) { - head.value = value; - return; - } - Pointer next = calloc(); - head.value = next.address; - createChain(next, length - 1, value); - } - - int getChainValue(Pointer head, int length) { - if (length == 0) { - return head.value; - } - Pointer next = Pointer.fromAddress(head.value); - return getChainValue(next, length - 1); - } - - void freeChain(Pointer head, int length) { - Pointer next = Pointer.fromAddress(head.value); - calloc.free(head); - if (length == 0) { - return; - } - freeChain(next, length - 1); - } - - Pointer head = calloc(); - createChain(head, length, 512); - int tailValue = getChainValue(head, length); - Expect.equals(512, tailValue); - freeChain(head, length); -} - -void testTypeTest() { - Pointer p = calloc(); - Expect.isTrue(p is Pointer); - calloc.free(p); -} - -void testToString() { - Pointer p = calloc(); - Expect.stringEquals("Pointer: address=0x", p.toString().substring(0, 19)); - calloc.free(p); - Pointer p2 = Pointer.fromAddress(0x123abc); - Expect.stringEquals("Pointer: address=0x123abc", p2.toString()); -} - -void testEquality() { - Pointer p = Pointer.fromAddress(12345678); - Pointer p2 = Pointer.fromAddress(12345678); - Expect.equals(p, p2); - Expect.equals(p.hashCode, p2.hashCode); - Pointer p3 = p.cast(); - Expect.equals(p, p3); - Expect.equals(p.hashCode, p3.hashCode); - Pointer p4 = p.offsetBy(1337); - Expect.notEquals(p, p4); -} - -typedef Int8UnOp = Int8 Function(Int8); - -void testAllocateVoid() { - Expect.throws(() { - Pointer p = calloc(); - }); -} - -void testAllocateNativeFunction() { - Expect.throws(() { - Pointer> p = calloc(); - }); -} - -void testSizeOfVoid() { - Expect.throws(() { - sizeOf(); - }); -} - -void testSizeOfNativeFunction() { - Expect.throws(() { - sizeOf>(); - }); -} - -void testDynamicInvocation() { - dynamic p = calloc(); - Expect.throws(() { - final int i = p.value; - }); - Expect.throws(() => p.value = 1); - Expect.throws(() => p.elementAt(5)); - final int addr = p.address; - final Pointer p2 = p.cast(); - calloc.free(p); -} - -final nullableInt64ElementAt1 = ffiTestFunctions.lookupFunction< - Pointer Function(Pointer), - Pointer Function(Pointer)>("NullableInt64ElemAt1"); - -void testNullptrCast() { - Pointer ptr = nullptr; - ptr = nullableInt64ElementAt1(ptr); - Expect.equals(ptr, nullptr); -} - -void testMemoryAddressTruncation() { - const int kIgnoreBytesPositive = 0x1122334400000000; - const int kIgnoreBytesNegative = 0xffddccbb00000000; - if (sizeOf() == 4) { - final p1 = Pointer.fromAddress(123); - final p2 = Pointer.fromAddress(123 + kIgnoreBytesPositive); - final p3 = Pointer.fromAddress(123 + kIgnoreBytesNegative); - Expect.equals(p1.address, p2.address); - Expect.equals(p1, p2); - Expect.equals(p1.address, p3.address); - Expect.equals(p1, p3); - } -} diff --git a/tests/ffi_2/dl_api_exit_enter_isolate_test.dart b/tests/ffi_2/dl_api_exit_enter_isolate_test.dart deleted file mode 100644 index 03abbb3ed50..00000000000 --- a/tests/ffi_2/dl_api_exit_enter_isolate_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2023, 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 - -// SharedObjects=ffi_test_functions - -import 'dart:ffi'; -import 'dart:isolate'; - -import 'package:expect/expect.dart'; - -import 'dylib_utils.dart'; - -final ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); - -final initializeApi = ffiTestFunctions.lookupFunction< - IntPtr Function(Pointer), - int Function(Pointer)>("InitDartApiDL"); -final enterBarrier = - ffiTestFunctions.lookupFunction( - "WaitUntilNThreadsEnterBarrier"); - -main() async { - const threadBarrierCount = 30; - - initializeApi(NativeApi.initializeApiDLData); - - final all = []; - for (int i = 0; i < threadBarrierCount; ++i) { - all.add(Isolate.run(() => enterBarrier(threadBarrierCount))); - } - await Future.wait(all); -} diff --git a/tests/ffi_2/dylib_close_test.dart b/tests/ffi_2/dylib_close_test.dart deleted file mode 100644 index 8814825f3c0..00000000000 --- a/tests/ffi_2/dylib_close_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2023, 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. -// -// SharedObjects=ffi_test_functions - -// @dart=2.9 - -import 'dart:ffi'; -import 'dart:io'; - -import 'package:expect/expect.dart'; - -import 'dylib_utils.dart'; - -void main() { - testClose(); - testUnclosable(); -} - -void testClose() { - final lib = dlopenPlatformSpecific("ffi_test_functions"); - lib.lookup('ReturnMaxUint8'); - - lib.close(); - Expect.throwsStateError( - () => lib.lookup('ReturnMaxUint8'), 'Illegal lookup in closed library'); - lib.close(); // Duplicate close should not crash. -} - -void testUnclosable() { - final proc = DynamicLibrary.process(); - final exec = DynamicLibrary.executable(); - - Expect.throwsStateError(proc.close); - Expect.throwsStateError(exec.close); -} diff --git a/tests/ffi_2/dylib_isolates_test.dart b/tests/ffi_2/dylib_isolates_test.dart deleted file mode 100644 index 1d5fd74afcc..00000000000 --- a/tests/ffi_2/dylib_isolates_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// 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. -// -// Test for DynamicLibrary.open behavior on multiple isolates. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; -import 'dart:io'; -import 'dart:isolate'; - -import "package:expect/expect.dart"; - -import 'dylib_utils.dart'; - -void main() async { - final dl = dlopenPlatformSpecific('ffi_test_functions'); - final dl2 = dlopenPlatformSpecific('ffi_test_functions'); - Expect.equals(dl, dl2); - Expect.isFalse(identical(dl, dl2)); - - final setGlobalVar = dl - .lookupFunction('SetGlobalVar'); - final getGlobalVar = - dl.lookupFunction('GetGlobalVar'); - setGlobalVar(123); - Expect.equals(123, getGlobalVar()); - - final receivePort = ReceivePort(); - Isolate.spawn(secondIsolateMain, receivePort.sendPort); - await receivePort.first; - if (!Platform.isIOS /* Static linking causes different behavior. */) { - Expect.equals(42, getGlobalVar()); - } -} - -void secondIsolateMain(SendPort sendPort) { - final dl = dlopenPlatformSpecific('ffi_test_functions'); - final setGlobalVar = dl - .lookupFunction('SetGlobalVar'); - setGlobalVar(42); - sendPort.send('done'); -} diff --git a/tests/ffi_2/dylib_utils.dart b/tests/ffi_2/dylib_utils.dart deleted file mode 100644 index d4f86fc1ce2..00000000000 --- a/tests/ffi_2/dylib_utils.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:ffi' as ffi; -import 'dart:io' show Platform; - -String _platformPath(String name, {String path}) { - if (path == null) path = ""; - if (Platform.isLinux || Platform.isAndroid || Platform.isFuchsia) - return path + "lib" + name + ".so"; - if (Platform.isMacOS) return path + "lib" + name + ".dylib"; - if (Platform.isWindows) return path + name + ".dll"; - throw Exception("Platform not implemented"); -} - -ffi.DynamicLibrary dlopenPlatformSpecific(String name, {String path}) { - String fullPath = _platformPath(name, path: path); - return ffi.DynamicLibrary.open(fullPath); -} diff --git a/tests/ffi_2/expando_test.dart b/tests/ffi_2/expando_test.dart deleted file mode 100644 index b9acf02a0ce..00000000000 --- a/tests/ffi_2/expando_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2021, 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 test program for testing dart:ffi primitive data pointers. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; - -void main() { - testPointer(); - testStruct(); -} - -Expando expando = Expando('myExpando'); - -void testPointer() { - final pointer = Pointer.fromAddress(0xdeadbeef); - Expect.throws(() { - expando[pointer]; - }); - Expect.throws(() { - expando[pointer] = 1234; - }); -} - -class MyStruct extends Struct { - Pointer notEmpty; -} - -void testStruct() { - final pointer = Pointer.fromAddress(0xdeadbeef); - final struct = pointer.ref; - Expect.throws(() { - expando[struct]; - }); - Expect.throws(() { - expando[struct] = 1234; - }); -} diff --git a/tests/ffi_2/extension_methods_test.dart b/tests/ffi_2/extension_methods_test.dart deleted file mode 100644 index cb124afabd6..00000000000 --- a/tests/ffi_2/extension_methods_test.dart +++ /dev/null @@ -1,106 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; -import "package:ffi/ffi.dart"; - -main(List arguments) { - for (int i = 0; i < 100; i++) { - testStoreLoad(); - testReifiedGeneric(); - testCompoundLoadAndStore(); - } -} - -testStoreLoad() { - final p = calloc(2); - p.value = 10; - Expect.equals(10, p.value); - p[1] = 20; - Expect.equals(20, p[1]); - if (sizeOf() == 4) { - // Test round tripping. - Expect.equals(20, p.elementAt(0x100000001).value); - Expect.equals(20, p[0x100000001]); - } - - // Test negative index. - final pUseNegative = p.elementAt(1); - Expect.equals(10, pUseNegative[-1]); - - final p1 = calloc(2); - p1.value = 10.0; - Expect.approxEquals(10.0, p1.value); - p1[1] = 20.0; - Expect.approxEquals(20.0, p1[1]); - calloc.free(p1); - - final p2 = calloc>(2); - p2.value = p; - Expect.equals(p, p2.value); - p2[1] = p; - Expect.equals(p, p2[1]); - calloc.free(p2); - calloc.free(p); - - final p3 = calloc(); - Foo foo = p3.ref; - foo.a = 1; - Expect.equals(1, foo.a); - calloc.free(p3); - - final p4 = calloc(2); - Foo src = p4[1]; - src.a = 2; - p4.ref = src; - Foo dst = p4.ref; - Expect.equals(2, dst.a); - calloc.free(p4); -} - -testReifiedGeneric() { - final p = calloc>(); - Pointer> p2 = p; - Expect.isTrue(p2.value is Pointer); - calloc.free(p); -} - -testCompoundLoadAndStore() { - final foos = calloc(10); - final reference = foos.ref..a = 10; - - for (var i = 1; i < 9; i++) { - foos[i] = reference; - Expect.isTrue(foos[i].a == 10); - - foos.elementAt(i).ref = reference; - Expect.isTrue(foos.elementAt(i).ref.a == 10); - } - - final bars = calloc(10); - bars[0].foo = reference; - - for (var i = 1; i < 9; i++) { - bars[i] = bars[0]; - Expect.isTrue(bars.elementAt(i).ref.foo.a == 10); - } - - calloc.free(foos); - calloc.free(bars); -} - -class Foo extends Struct { - @Int8() - int a; -} - -class Bar extends Union { - Foo foo; - @Int32() - int baz; -} diff --git a/tests/ffi_2/external_typed_data_test.dart b/tests/ffi_2/external_typed_data_test.dart deleted file mode 100644 index 40d3e74233b..00000000000 --- a/tests/ffi_2/external_typed_data_test.dart +++ /dev/null @@ -1,297 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:ffi'; -import 'dart:math'; -import 'dart:typed_data'; - -import 'package:expect/expect.dart'; -import "package:ffi/ffi.dart"; - -main() { - testInt8Load(); - testInt8Store(); - testUint8Load(); - testUint8Store(); - testInt16Load(); - testInt16Store(); - testUint16Load(); - testUint16Store(); - testInt32Load(); - testInt32Store(); - testUint32Load(); - testUint32Store(); - testInt64Load(); - testInt64Store(); - testUint64Load(); - testUint64Store(); - testFloatLoad(); - testFloatStore(); - testDoubleLoad(); - testDoubleStore(); - testArrayLoad(); - testArrayStore(); - testNegativeArray(); - testAlignment(); -} - -// For signed int tests, we store 0xf* and load -1 to check sign-extension. -// For unsigned int tests, we store 0xf* and load the same to check truncation. - -void testInt8Load() { - // Load - Pointer ptr = calloc(); - ptr.value = 0xff; - Int8List list = ptr.asTypedList(1); - Expect.equals(list[0], -1); - Expect.equals(list.length, 1); - calloc.free(ptr); -} - -void testInt8Store() { - // Store - Pointer ptr = calloc(); - Int8List list = ptr.asTypedList(1); - list[0] = 0xff; - Expect.equals(list.length, 1); - Expect.equals(ptr.value, -1); - calloc.free(ptr); -} - -void testUint8Load() { - // Load - Pointer ptr = calloc(); - ptr.value = 0xff; - Uint8List list = ptr.asTypedList(1); - Expect.equals(list[0], 0xff); - Expect.equals(list.length, 1); - calloc.free(ptr); -} - -void testUint8Store() { - // Store - Pointer ptr = calloc(); - Uint8List list = ptr.asTypedList(1); - list[0] = 0xff; - Expect.equals(list.length, 1); - Expect.equals(ptr.value, 0xff); - calloc.free(ptr); -} - -void testInt16Load() { - // Load - Pointer ptr = calloc(); - ptr.value = 0xffff; - Int16List list = ptr.asTypedList(1); - Expect.equals(list[0], -1); - Expect.equals(list.length, 1); - calloc.free(ptr); -} - -void testInt16Store() { - // Store - Pointer ptr = calloc(); - Int16List list = ptr.asTypedList(1); - list[0] = 0xffff; - Expect.equals(list.length, 1); - Expect.equals(ptr.value, -1); - calloc.free(ptr); -} - -void testUint16Load() { - // Load - Pointer ptr = calloc(); - ptr.value = 0xffff; - Uint16List list = ptr.asTypedList(1); - Expect.equals(list[0], 0xffff); - Expect.equals(list.length, 1); - calloc.free(ptr); -} - -void testUint16Store() { - // Store - Pointer ptr = calloc(); - Uint16List list = ptr.asTypedList(1); - list[0] = 0xffff; - Expect.equals(list.length, 1); - Expect.equals(ptr.value, 0xffff); - calloc.free(ptr); -} - -void testInt32Load() { - // Load - Pointer ptr = calloc(); - ptr.value = 0xffffffff; - Int32List list = ptr.asTypedList(1); - Expect.equals(list[0], -1); - Expect.equals(list.length, 1); - calloc.free(ptr); -} - -void testInt32Store() { - // Store - Pointer ptr = calloc(); - Int32List list = ptr.asTypedList(1); - list[0] = 0xffffffff; - Expect.equals(list.length, 1); - Expect.equals(ptr.value, -1); - calloc.free(ptr); -} - -void testUint32Load() { - // Load - Pointer ptr = calloc(); - ptr.value = 0xffffffff; - Uint32List list = ptr.asTypedList(1); - Expect.equals(list[0], 0xffffffff); - Expect.equals(list.length, 1); - calloc.free(ptr); -} - -void testUint32Store() { - // Store - Pointer ptr = calloc(); - Uint32List list = ptr.asTypedList(1); - list[0] = 0xffffffff; - Expect.equals(list.length, 1); - Expect.equals(ptr.value, 0xffffffff); - calloc.free(ptr); -} - -void testInt64Load() { - // Load - Pointer ptr = calloc(); - ptr.value = 0xffffffffffffffff; - Int64List list = ptr.asTypedList(1); - Expect.equals(list[0], -1); - Expect.equals(list.length, 1); - calloc.free(ptr); -} - -void testInt64Store() { - // Store - Pointer ptr = calloc(); - Int64List list = ptr.asTypedList(1); - list[0] = 0xffffffffffffffff; - Expect.equals(list.length, 1); - Expect.equals(ptr.value, -1); - calloc.free(ptr); -} - -void testUint64Load() { - // Load - Pointer ptr = calloc(); - ptr.value = 0xffffffffffffffff; - Uint64List list = ptr.asTypedList(1); - Expect.equals(list[0], 0xffffffffffffffff); - Expect.equals(list.length, 1); - calloc.free(ptr); -} - -void testUint64Store() { - // Store - Pointer ptr = calloc(); - Uint64List list = ptr.asTypedList(1); - list[0] = 0xffffffffffffffff; - Expect.equals(list.length, 1); - Expect.equals(ptr.value, 0xffffffffffffffff); - calloc.free(ptr); -} - -double maxFloat = (2 - pow(2, -23)) * pow(2, 127); -double maxDouble = (2 - pow(2, -52)) * pow(2, pow(2, 10) - 1); - -void testFloatLoad() { - // Load - Pointer ptr = calloc(); - ptr.value = maxFloat; - Float32List list = ptr.asTypedList(1); - Expect.equals(list[0], maxFloat); - Expect.equals(list.length, 1); - calloc.free(ptr); -} - -void testFloatStore() { - // Store - Pointer ptr = calloc(); - Float32List list = ptr.asTypedList(1); - list[0] = maxFloat; - Expect.equals(list.length, 1); - Expect.equals(ptr.value, maxFloat); - calloc.free(ptr); -} - -void testDoubleLoad() { - // Load - Pointer ptr = calloc(); - ptr.value = maxDouble; - Float64List list = ptr.asTypedList(1); - Expect.equals(list[0], maxDouble); - Expect.equals(list.length, 1); - calloc.free(ptr); -} - -void testDoubleStore() { - // Store - Pointer ptr = calloc(); - Float64List list = ptr.asTypedList(1); - list[0] = maxDouble; - Expect.equals(list.length, 1); - Expect.equals(ptr.value, maxDouble); - calloc.free(ptr); -} - -void testArrayLoad() { - const int count = 0x100; - Pointer ptr = calloc(count); - for (int i = 0; i < count; ++i) { - ptr[i] = i; - } - Int32List array = ptr.asTypedList(count); - for (int i = 0; i < count; ++i) { - Expect.equals(array[i], i); - } - calloc.free(ptr); -} - -void testArrayStore() { - const int count = 0x100; - Pointer ptr = calloc(count); - Int32List array = ptr.asTypedList(count); - for (int i = 0; i < count; ++i) { - array[i] = i; - } - for (int i = 0; i < count; ++i) { - Expect.equals(ptr[i], i); - } - calloc.free(ptr); -} - -void testNegativeArray() { - Pointer ptr = nullptr; - Expect.throws(() => ptr.asTypedList(-1)); -} - -// Tests that the address we're creating an ExternalTypedData from is aligned to -// the element size. -void testAlignment() { - Expect.throws( - () => Pointer.fromAddress(1).asTypedList(1)); - Expect.throws( - () => Pointer.fromAddress(2).asTypedList(1)); - Expect.throws( - () => Pointer.fromAddress(4).asTypedList(1)); - Expect.throws( - () => Pointer.fromAddress(1).asTypedList(1)); - Expect.throws( - () => Pointer.fromAddress(2).asTypedList(1)); - Expect.throws( - () => Pointer.fromAddress(4).asTypedList(1)); - Expect.throws( - () => Pointer.fromAddress(2).asTypedList(1)); - Expect.throws( - () => Pointer.fromAddress(4).asTypedList(1)); -} diff --git a/tests/ffi_2/ffi_2.status b/tests/ffi_2/ffi_2.status deleted file mode 100644 index 26a9238776e..00000000000 --- a/tests/ffi_2/ffi_2.status +++ /dev/null @@ -1,79 +0,0 @@ -# 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. - -function_callbacks_structs_by_value_test: Pass, Slow # https://dartbug.com/47304 https://dartbug.com/45007 -function_structs_by_value_generated_args_leaf_test: Pass, Slow # https://dartbug.com/47303 https://dartbug.com/45007 -function_structs_by_value_generated_args_test: Pass, Slow # https://dartbug.com/47303 https://dartbug.com/45007 -function_structs_by_value_generated_ret_arg_leaf_test: Pass, Slow # https://dartbug.com/47303 https://dartbug.com/45007 -function_structs_by_value_generated_ret_arg_test: Pass, Slow # https://dartbug.com/47303 https://dartbug.com/45007 -function_structs_by_value_generated_ret_leaf_test: Pass, Slow # https://dartbug.com/47303 https://dartbug.com/45007 -function_structs_by_value_generated_ret_test: Pass, Slow # https://dartbug.com/47303 https://dartbug.com/45007 - -[ $builder_tag == optimization_counter_threshold ] -aliasing_test: SkipByDesign # Already has VMOptions=--optimization-counter-threshold -function_callbacks_structs_by_value_generated_test: SkipByDesign # Already has VMOptions=--optimization-counter-threshold -function_callbacks_structs_by_value_test: SkipByDesign # Already has VMOptions=--optimization-counter-threshold -function_callbacks_very_many_test: SkipByDesign # Already has VMOptions=--optimization-counter-threshold -function_structs_by_value_generated_args_leaf_test: SkipByDesign # Already has VMOptions=--optimization-counter-threshold -function_structs_by_value_generated_args_test: SkipByDesign # Already has VMOptions=--optimization-counter-threshold -function_structs_by_value_generated_ret_arg_leaf_test: SkipByDesign # Already has VMOptions=--optimization-counter-threshold -function_structs_by_value_generated_ret_arg_test: SkipByDesign # Already has VMOptions=--optimization-counter-threshold -function_structs_by_value_generated_ret_leaf_test: SkipByDesign # Already has VMOptions=--optimization-counter-threshold -function_structs_by_value_generated_ret_test: SkipByDesign # Already has VMOptions=--optimization-counter-threshold -function_test: SkipByDesign # Already has VMOptions=--optimization-counter-threshold -function_very_many_test: SkipByDesign # Already has VMOptions=--optimization-counter-threshold -hardfp_test: SkipByDesign # Already has VMOptions=--optimization-counter-threshold -regress_43016_test: SkipByDesign # Already has VMOptions=--optimization-counter-threshold -structs_nnbd_workaround_test: SkipByDesign # Already has VMOptions=--optimization-counter-threshold -structs_test: SkipByDesign # Already has VMOptions=--optimization-counter-threshold -variance_function_test: SkipByDesign # Already has VMOptions=--optimization-counter-threshold -vmspecific_function_gc_test: SkipByDesign # Already has VMOptions=--optimization-counter-threshold -vmspecific_function_test: SkipByDesign # Already has VMOptions=--optimization-counter-threshold - -[ $compiler == app_jitk ] -vmspecific_leaf_call_test: Skip # https://dartbug.com/46125: Snapshot fails to generate. - -[ $mode == debug ] -function_callbacks_structs_by_value_generated_test: Pass, Slow - -[ $mode == product ] -regress_47594_test: Skip # Profiler is not available in Product. - -[ $system == android ] -*: Pass, Slow # https://github.com/dart-lang/sdk/issues/38489 -regress_47594_test: Skip # DartDev is not available on Android. -vmspecific_native_finalizer_isolate_groups_test: Skip # SpawnUri not available on Android tester. - -[ $system == windows ] -regress_47594_test: Skip # DynamicLibrary.process() is not available on Windows. - -[ $simulator ] -*: Skip # FFI not yet supported on the arm simulator. - -[ $compiler != dart2analyzer && $compiler != fasta && $runtime != dart_precompiled && $runtime != vm ] -*: SkipByDesign # FFI is a VM-only feature. (This test suite is part of the default set.) - -[ $compiler == dartkp && $system == windows ] -vmspecific_handle_test: SkipByDesign # Symbols are not exposed on purpose and are not linked in Windows Precompiled. dartbug.com/40579 - -[ $system != android && $system != linux && $system != macos && $system != windows ] -*: Skip # FFI not yet supported on other OSes. - -# These tests trigger and catch an abort (intentionally) and terminate the VM. -# They're incompatible with ASAN because not all memory is freed when aborting and -# with AppJit because the abort the VM before it can generate a snapshot. -[ $compiler == app_jitk || $sanitizer == asan ] -vmspecific_function_callbacks_exit_test: SkipByDesign - -[ $compiler == dart2analyzer || $compiler == fasta ] -vmspecific_enable_ffi_test: SkipByDesign # This is a check for VM only. - -[ $compiler == dartkp || $arch == arm64 && $system == fuchsia ] -abi_specific_int_incomplete_jit_test: SkipByDesign # Only intended to run in JIT mode. - -[ $compiler != dartkp || $arch == arm64 && $system == fuchsia ] -abi_specific_int_incomplete_aot_test: SkipByDesign # Only intended to run in AOT mode. - -[ $sanitizer == asan || $sanitizer == msan || $sanitizer == tsan ] -data_not_asan_test: SkipByDesign # This test tries to allocate too much memory on purpose. diff --git a/tests/ffi_2/ffi_callback_unique_test.dart b/tests/ffi_2/ffi_callback_unique_test.dart deleted file mode 100644 index 30e074a99da..00000000000 --- a/tests/ffi_2/ffi_callback_unique_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2022, 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:ffi'; - -import 'package:expect/expect.dart'; - -void main() { - final a = []; - final b = []; - for (int i = 0; i < 10; ++i) { - // Several pointers for same call site. - a.add( - Pointer.fromFunction(nativeToDartCallback, 0).address); - b.add( - Pointer.fromFunction(nativeToDartCallback, 1).address); - } - - ensureEqualEntries(a); - ensureEqualEntries(b); - - // The two functions have different exceptional return and should have - // therefore a different ffi trampoline. - Expect.notEquals(a.first, b.first); -} - -void ensureEqualEntries(List entries) { - final first = entries.first; - for (int i = 1; i < entries.length; ++i) { - Expect.equals(first, entries[i]); - } -} - -int nativeToDartCallback() => 42; diff --git a/tests/ffi_2/ffi_test_helpers.dart b/tests/ffi_2/ffi_test_helpers.dart deleted file mode 100644 index 9573a5c3ff3..00000000000 --- a/tests/ffi_2/ffi_test_helpers.dart +++ /dev/null @@ -1,65 +0,0 @@ -// 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. -// -// Helpers for tests which trigger GC in delicate places. - -// @dart = 2.9 - -// ignore: import_internal_library, unused_import -import 'dart:_internal'; -import 'dart:ffi'; - -import 'dylib_utils.dart'; - -typedef NativeNullaryOp = Void Function(); -typedef NullaryOpVoid = void Function(); - -typedef NativeUnaryOp = Void Function(IntPtr); -typedef UnaryOpVoid = void Function(int); - -final DynamicLibrary ffiTestFunctions = - dlopenPlatformSpecific("ffi_test_functions"); - -final collectOnNthAllocation = ffiTestFunctions - .lookupFunction("CollectOnNthAllocation"); - -extension PointerOffsetBy on Pointer { - Pointer offsetBy(int bytes) => Pointer.fromAddress(address + bytes); -} - -/// Triggers garbage collection. -// Defined in `dart:_internal`. -// ignore: undefined_identifier -void triggerGc() => VMInternalsForTesting.collectAllGarbage(); - -void Function(String) _namedPrint(String name) { - if (name != null) { - return (String value) => print('$name: $value'); - } - return (String value) => print(value); -} - -/// Does a GC and if [doAwait] awaits a future to enable running finalizers. -/// -/// Also prints for debug purposes. -/// -/// If provided, [name] prefixes the debug prints. -void doGC({String name}) { - final _print = _namedPrint(name); - - _print('Do GC.'); - triggerGc(); - _print('GC done'); -} - -void createAndLoseFinalizable(Pointer token) { - final myFinalizable = MyFinalizable(); - setTokenFinalizer.attach(myFinalizable, token.cast()); -} - -final setTokenTo42Ptr = - ffiTestFunctions.lookup("SetArgumentTo42"); -final setTokenFinalizer = NativeFinalizer(setTokenTo42Ptr); - -class MyFinalizable implements Finalizable {} diff --git a/tests/ffi_2/finalizer_external_size_accounting_test.dart b/tests/ffi_2/finalizer_external_size_accounting_test.dart deleted file mode 100644 index dd3755996f5..00000000000 --- a/tests/ffi_2/finalizer_external_size_accounting_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2022, 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. - -// Issue https://github.com/dart-lang/sdk/issues/50537 - -// @dart=2.9 - -import "dart:async"; -import "dart:ffi"; -import "dart:io"; - -final libc = DynamicLibrary.process(); -typedef MallocForeign = Pointer Function(IntPtr size); -typedef MallocNative = Pointer Function(int size); -final malloc = libc.lookupFunction('malloc'); -typedef FreeForeign = Void Function(Pointer); -final free = libc.lookup>('free'); -final freeFinalizer = NativeFinalizer(free); - -class Resource implements Finalizable { - Pointer _target; - Resource() : _target = malloc(8) { - if (_target == nullptr) { - throw OutOfMemoryError(); - } - freeFinalizer.attach(this, _target, detach: this, externalSize: 8); - } -} - -void main() { - if (Platform.isWindows) { - print("No malloc via self process lookup on Windows"); - return; - } - - // Split across turns so the internal finalizer cleanup can run. - // Cf. https://github.com/dart-lang/sdk/issues/50570 - final sw = Stopwatch()..start(); - step() { - if (sw.elapsedMilliseconds < 2000) { - // VM assertion: external size of each generation should always be - // non-negative. - List.generate(1000, (_) => new Resource()); - Timer.run(step); - } - } - - Timer.run(step); -} diff --git a/tests/ffi_2/function_callbacks_many_test.dart b/tests/ffi_2/function_callbacks_many_test.dart deleted file mode 100644 index f34b4ae0f10..00000000000 --- a/tests/ffi_2/function_callbacks_many_test.dart +++ /dev/null @@ -1,1044 +0,0 @@ -// 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. -// -// Dart test program for testing dart:ffi function pointers with callbacks. -// -// VMOptions=--stacktrace-every=100 -// VMOptions=--write-protect-code --no-dual-map-code -// VMOptions=--write-protect-code --no-dual-map-code --stacktrace-every=100 -// VMOptions=--use-slow-path -// VMOptions=--use-slow-path --stacktrace-every=100 -// VMOptions=--use-slow-path --write-protect-code --no-dual-map-code -// VMOptions=--use-slow-path --write-protect-code --no-dual-map-code --stacktrace-every=100 -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import 'callback_tests_utils.dart'; - -typedef SimpleAdditionType = Int32 Function(Int32, Int32); -int simpleAddition(int x, int y) => x + y; - -void main() { - testManyCallbacks(); -} - -void testManyCallbacks() { - // Create enough callbacks (1000) to overflow one page of the JIT callback - // trampolines. The use of distinct exceptional return values forces separate - // trampolines. - final List pointers = []; - - // All the parameters of 'fromFunction' are forced to be constant so that we - // only need to generate one trampoline per 'fromFunction' call-site. - // - // As a consequence, to force the creation of 1000 trampolines (and prevent - // any possible caching), we need literally 1000 call-sites. - pointers.add(Pointer.fromFunction(simpleAddition, 0)); - pointers.add(Pointer.fromFunction(simpleAddition, 1)); - pointers.add(Pointer.fromFunction(simpleAddition, 2)); - pointers.add(Pointer.fromFunction(simpleAddition, 3)); - pointers.add(Pointer.fromFunction(simpleAddition, 4)); - pointers.add(Pointer.fromFunction(simpleAddition, 5)); - pointers.add(Pointer.fromFunction(simpleAddition, 6)); - pointers.add(Pointer.fromFunction(simpleAddition, 7)); - pointers.add(Pointer.fromFunction(simpleAddition, 8)); - pointers.add(Pointer.fromFunction(simpleAddition, 9)); - pointers.add(Pointer.fromFunction(simpleAddition, 10)); - pointers.add(Pointer.fromFunction(simpleAddition, 11)); - pointers.add(Pointer.fromFunction(simpleAddition, 12)); - pointers.add(Pointer.fromFunction(simpleAddition, 13)); - pointers.add(Pointer.fromFunction(simpleAddition, 14)); - pointers.add(Pointer.fromFunction(simpleAddition, 15)); - pointers.add(Pointer.fromFunction(simpleAddition, 16)); - pointers.add(Pointer.fromFunction(simpleAddition, 17)); - pointers.add(Pointer.fromFunction(simpleAddition, 18)); - pointers.add(Pointer.fromFunction(simpleAddition, 19)); - pointers.add(Pointer.fromFunction(simpleAddition, 20)); - pointers.add(Pointer.fromFunction(simpleAddition, 21)); - pointers.add(Pointer.fromFunction(simpleAddition, 22)); - pointers.add(Pointer.fromFunction(simpleAddition, 23)); - pointers.add(Pointer.fromFunction(simpleAddition, 24)); - pointers.add(Pointer.fromFunction(simpleAddition, 25)); - pointers.add(Pointer.fromFunction(simpleAddition, 26)); - pointers.add(Pointer.fromFunction(simpleAddition, 27)); - pointers.add(Pointer.fromFunction(simpleAddition, 28)); - pointers.add(Pointer.fromFunction(simpleAddition, 29)); - pointers.add(Pointer.fromFunction(simpleAddition, 30)); - pointers.add(Pointer.fromFunction(simpleAddition, 31)); - pointers.add(Pointer.fromFunction(simpleAddition, 32)); - pointers.add(Pointer.fromFunction(simpleAddition, 33)); - pointers.add(Pointer.fromFunction(simpleAddition, 34)); - pointers.add(Pointer.fromFunction(simpleAddition, 35)); - pointers.add(Pointer.fromFunction(simpleAddition, 36)); - pointers.add(Pointer.fromFunction(simpleAddition, 37)); - pointers.add(Pointer.fromFunction(simpleAddition, 38)); - pointers.add(Pointer.fromFunction(simpleAddition, 39)); - pointers.add(Pointer.fromFunction(simpleAddition, 40)); - pointers.add(Pointer.fromFunction(simpleAddition, 41)); - pointers.add(Pointer.fromFunction(simpleAddition, 42)); - pointers.add(Pointer.fromFunction(simpleAddition, 43)); - pointers.add(Pointer.fromFunction(simpleAddition, 44)); - pointers.add(Pointer.fromFunction(simpleAddition, 45)); - pointers.add(Pointer.fromFunction(simpleAddition, 46)); - pointers.add(Pointer.fromFunction(simpleAddition, 47)); - pointers.add(Pointer.fromFunction(simpleAddition, 48)); - pointers.add(Pointer.fromFunction(simpleAddition, 49)); - pointers.add(Pointer.fromFunction(simpleAddition, 50)); - pointers.add(Pointer.fromFunction(simpleAddition, 51)); - pointers.add(Pointer.fromFunction(simpleAddition, 52)); - pointers.add(Pointer.fromFunction(simpleAddition, 53)); - pointers.add(Pointer.fromFunction(simpleAddition, 54)); - pointers.add(Pointer.fromFunction(simpleAddition, 55)); - pointers.add(Pointer.fromFunction(simpleAddition, 56)); - pointers.add(Pointer.fromFunction(simpleAddition, 57)); - pointers.add(Pointer.fromFunction(simpleAddition, 58)); - pointers.add(Pointer.fromFunction(simpleAddition, 59)); - pointers.add(Pointer.fromFunction(simpleAddition, 60)); - pointers.add(Pointer.fromFunction(simpleAddition, 61)); - pointers.add(Pointer.fromFunction(simpleAddition, 62)); - pointers.add(Pointer.fromFunction(simpleAddition, 63)); - pointers.add(Pointer.fromFunction(simpleAddition, 64)); - pointers.add(Pointer.fromFunction(simpleAddition, 65)); - pointers.add(Pointer.fromFunction(simpleAddition, 66)); - pointers.add(Pointer.fromFunction(simpleAddition, 67)); - pointers.add(Pointer.fromFunction(simpleAddition, 68)); - pointers.add(Pointer.fromFunction(simpleAddition, 69)); - pointers.add(Pointer.fromFunction(simpleAddition, 70)); - pointers.add(Pointer.fromFunction(simpleAddition, 71)); - pointers.add(Pointer.fromFunction(simpleAddition, 72)); - pointers.add(Pointer.fromFunction(simpleAddition, 73)); - pointers.add(Pointer.fromFunction(simpleAddition, 74)); - pointers.add(Pointer.fromFunction(simpleAddition, 75)); - pointers.add(Pointer.fromFunction(simpleAddition, 76)); - pointers.add(Pointer.fromFunction(simpleAddition, 77)); - pointers.add(Pointer.fromFunction(simpleAddition, 78)); - pointers.add(Pointer.fromFunction(simpleAddition, 79)); - pointers.add(Pointer.fromFunction(simpleAddition, 80)); - pointers.add(Pointer.fromFunction(simpleAddition, 81)); - pointers.add(Pointer.fromFunction(simpleAddition, 82)); - pointers.add(Pointer.fromFunction(simpleAddition, 83)); - pointers.add(Pointer.fromFunction(simpleAddition, 84)); - pointers.add(Pointer.fromFunction(simpleAddition, 85)); - pointers.add(Pointer.fromFunction(simpleAddition, 86)); - pointers.add(Pointer.fromFunction(simpleAddition, 87)); - pointers.add(Pointer.fromFunction(simpleAddition, 88)); - pointers.add(Pointer.fromFunction(simpleAddition, 89)); - pointers.add(Pointer.fromFunction(simpleAddition, 90)); - pointers.add(Pointer.fromFunction(simpleAddition, 91)); - pointers.add(Pointer.fromFunction(simpleAddition, 92)); - pointers.add(Pointer.fromFunction(simpleAddition, 93)); - pointers.add(Pointer.fromFunction(simpleAddition, 94)); - pointers.add(Pointer.fromFunction(simpleAddition, 95)); - pointers.add(Pointer.fromFunction(simpleAddition, 96)); - pointers.add(Pointer.fromFunction(simpleAddition, 97)); - pointers.add(Pointer.fromFunction(simpleAddition, 98)); - pointers.add(Pointer.fromFunction(simpleAddition, 99)); - pointers.add(Pointer.fromFunction(simpleAddition, 100)); - pointers.add(Pointer.fromFunction(simpleAddition, 101)); - pointers.add(Pointer.fromFunction(simpleAddition, 102)); - pointers.add(Pointer.fromFunction(simpleAddition, 103)); - pointers.add(Pointer.fromFunction(simpleAddition, 104)); - pointers.add(Pointer.fromFunction(simpleAddition, 105)); - pointers.add(Pointer.fromFunction(simpleAddition, 106)); - pointers.add(Pointer.fromFunction(simpleAddition, 107)); - pointers.add(Pointer.fromFunction(simpleAddition, 108)); - pointers.add(Pointer.fromFunction(simpleAddition, 109)); - pointers.add(Pointer.fromFunction(simpleAddition, 110)); - pointers.add(Pointer.fromFunction(simpleAddition, 111)); - pointers.add(Pointer.fromFunction(simpleAddition, 112)); - pointers.add(Pointer.fromFunction(simpleAddition, 113)); - pointers.add(Pointer.fromFunction(simpleAddition, 114)); - pointers.add(Pointer.fromFunction(simpleAddition, 115)); - pointers.add(Pointer.fromFunction(simpleAddition, 116)); - pointers.add(Pointer.fromFunction(simpleAddition, 117)); - pointers.add(Pointer.fromFunction(simpleAddition, 118)); - pointers.add(Pointer.fromFunction(simpleAddition, 119)); - pointers.add(Pointer.fromFunction(simpleAddition, 120)); - pointers.add(Pointer.fromFunction(simpleAddition, 121)); - pointers.add(Pointer.fromFunction(simpleAddition, 122)); - pointers.add(Pointer.fromFunction(simpleAddition, 123)); - pointers.add(Pointer.fromFunction(simpleAddition, 124)); - pointers.add(Pointer.fromFunction(simpleAddition, 125)); - pointers.add(Pointer.fromFunction(simpleAddition, 126)); - pointers.add(Pointer.fromFunction(simpleAddition, 127)); - pointers.add(Pointer.fromFunction(simpleAddition, 128)); - pointers.add(Pointer.fromFunction(simpleAddition, 129)); - pointers.add(Pointer.fromFunction(simpleAddition, 130)); - pointers.add(Pointer.fromFunction(simpleAddition, 131)); - pointers.add(Pointer.fromFunction(simpleAddition, 132)); - pointers.add(Pointer.fromFunction(simpleAddition, 133)); - pointers.add(Pointer.fromFunction(simpleAddition, 134)); - pointers.add(Pointer.fromFunction(simpleAddition, 135)); - pointers.add(Pointer.fromFunction(simpleAddition, 136)); - pointers.add(Pointer.fromFunction(simpleAddition, 137)); - pointers.add(Pointer.fromFunction(simpleAddition, 138)); - pointers.add(Pointer.fromFunction(simpleAddition, 139)); - pointers.add(Pointer.fromFunction(simpleAddition, 140)); - pointers.add(Pointer.fromFunction(simpleAddition, 141)); - pointers.add(Pointer.fromFunction(simpleAddition, 142)); - pointers.add(Pointer.fromFunction(simpleAddition, 143)); - pointers.add(Pointer.fromFunction(simpleAddition, 144)); - pointers.add(Pointer.fromFunction(simpleAddition, 145)); - pointers.add(Pointer.fromFunction(simpleAddition, 146)); - pointers.add(Pointer.fromFunction(simpleAddition, 147)); - pointers.add(Pointer.fromFunction(simpleAddition, 148)); - pointers.add(Pointer.fromFunction(simpleAddition, 149)); - pointers.add(Pointer.fromFunction(simpleAddition, 150)); - pointers.add(Pointer.fromFunction(simpleAddition, 151)); - pointers.add(Pointer.fromFunction(simpleAddition, 152)); - pointers.add(Pointer.fromFunction(simpleAddition, 153)); - pointers.add(Pointer.fromFunction(simpleAddition, 154)); - pointers.add(Pointer.fromFunction(simpleAddition, 155)); - pointers.add(Pointer.fromFunction(simpleAddition, 156)); - pointers.add(Pointer.fromFunction(simpleAddition, 157)); - pointers.add(Pointer.fromFunction(simpleAddition, 158)); - pointers.add(Pointer.fromFunction(simpleAddition, 159)); - pointers.add(Pointer.fromFunction(simpleAddition, 160)); - pointers.add(Pointer.fromFunction(simpleAddition, 161)); - pointers.add(Pointer.fromFunction(simpleAddition, 162)); - pointers.add(Pointer.fromFunction(simpleAddition, 163)); - pointers.add(Pointer.fromFunction(simpleAddition, 164)); - pointers.add(Pointer.fromFunction(simpleAddition, 165)); - pointers.add(Pointer.fromFunction(simpleAddition, 166)); - pointers.add(Pointer.fromFunction(simpleAddition, 167)); - pointers.add(Pointer.fromFunction(simpleAddition, 168)); - pointers.add(Pointer.fromFunction(simpleAddition, 169)); - pointers.add(Pointer.fromFunction(simpleAddition, 170)); - pointers.add(Pointer.fromFunction(simpleAddition, 171)); - pointers.add(Pointer.fromFunction(simpleAddition, 172)); - pointers.add(Pointer.fromFunction(simpleAddition, 173)); - pointers.add(Pointer.fromFunction(simpleAddition, 174)); - pointers.add(Pointer.fromFunction(simpleAddition, 175)); - pointers.add(Pointer.fromFunction(simpleAddition, 176)); - pointers.add(Pointer.fromFunction(simpleAddition, 177)); - pointers.add(Pointer.fromFunction(simpleAddition, 178)); - pointers.add(Pointer.fromFunction(simpleAddition, 179)); - pointers.add(Pointer.fromFunction(simpleAddition, 180)); - pointers.add(Pointer.fromFunction(simpleAddition, 181)); - pointers.add(Pointer.fromFunction(simpleAddition, 182)); - pointers.add(Pointer.fromFunction(simpleAddition, 183)); - pointers.add(Pointer.fromFunction(simpleAddition, 184)); - pointers.add(Pointer.fromFunction(simpleAddition, 185)); - pointers.add(Pointer.fromFunction(simpleAddition, 186)); - pointers.add(Pointer.fromFunction(simpleAddition, 187)); - pointers.add(Pointer.fromFunction(simpleAddition, 188)); - pointers.add(Pointer.fromFunction(simpleAddition, 189)); - pointers.add(Pointer.fromFunction(simpleAddition, 190)); - pointers.add(Pointer.fromFunction(simpleAddition, 191)); - pointers.add(Pointer.fromFunction(simpleAddition, 192)); - pointers.add(Pointer.fromFunction(simpleAddition, 193)); - pointers.add(Pointer.fromFunction(simpleAddition, 194)); - pointers.add(Pointer.fromFunction(simpleAddition, 195)); - pointers.add(Pointer.fromFunction(simpleAddition, 196)); - pointers.add(Pointer.fromFunction(simpleAddition, 197)); - pointers.add(Pointer.fromFunction(simpleAddition, 198)); - pointers.add(Pointer.fromFunction(simpleAddition, 199)); - pointers.add(Pointer.fromFunction(simpleAddition, 200)); - pointers.add(Pointer.fromFunction(simpleAddition, 201)); - pointers.add(Pointer.fromFunction(simpleAddition, 202)); - pointers.add(Pointer.fromFunction(simpleAddition, 203)); - pointers.add(Pointer.fromFunction(simpleAddition, 204)); - pointers.add(Pointer.fromFunction(simpleAddition, 205)); - pointers.add(Pointer.fromFunction(simpleAddition, 206)); - pointers.add(Pointer.fromFunction(simpleAddition, 207)); - pointers.add(Pointer.fromFunction(simpleAddition, 208)); - pointers.add(Pointer.fromFunction(simpleAddition, 209)); - pointers.add(Pointer.fromFunction(simpleAddition, 210)); - pointers.add(Pointer.fromFunction(simpleAddition, 211)); - pointers.add(Pointer.fromFunction(simpleAddition, 212)); - pointers.add(Pointer.fromFunction(simpleAddition, 213)); - pointers.add(Pointer.fromFunction(simpleAddition, 214)); - pointers.add(Pointer.fromFunction(simpleAddition, 215)); - pointers.add(Pointer.fromFunction(simpleAddition, 216)); - pointers.add(Pointer.fromFunction(simpleAddition, 217)); - pointers.add(Pointer.fromFunction(simpleAddition, 218)); - pointers.add(Pointer.fromFunction(simpleAddition, 219)); - pointers.add(Pointer.fromFunction(simpleAddition, 220)); - pointers.add(Pointer.fromFunction(simpleAddition, 221)); - pointers.add(Pointer.fromFunction(simpleAddition, 222)); - pointers.add(Pointer.fromFunction(simpleAddition, 223)); - pointers.add(Pointer.fromFunction(simpleAddition, 224)); - pointers.add(Pointer.fromFunction(simpleAddition, 225)); - pointers.add(Pointer.fromFunction(simpleAddition, 226)); - pointers.add(Pointer.fromFunction(simpleAddition, 227)); - pointers.add(Pointer.fromFunction(simpleAddition, 228)); - pointers.add(Pointer.fromFunction(simpleAddition, 229)); - pointers.add(Pointer.fromFunction(simpleAddition, 230)); - pointers.add(Pointer.fromFunction(simpleAddition, 231)); - pointers.add(Pointer.fromFunction(simpleAddition, 232)); - pointers.add(Pointer.fromFunction(simpleAddition, 233)); - pointers.add(Pointer.fromFunction(simpleAddition, 234)); - pointers.add(Pointer.fromFunction(simpleAddition, 235)); - pointers.add(Pointer.fromFunction(simpleAddition, 236)); - pointers.add(Pointer.fromFunction(simpleAddition, 237)); - pointers.add(Pointer.fromFunction(simpleAddition, 238)); - pointers.add(Pointer.fromFunction(simpleAddition, 239)); - pointers.add(Pointer.fromFunction(simpleAddition, 240)); - pointers.add(Pointer.fromFunction(simpleAddition, 241)); - pointers.add(Pointer.fromFunction(simpleAddition, 242)); - pointers.add(Pointer.fromFunction(simpleAddition, 243)); - pointers.add(Pointer.fromFunction(simpleAddition, 244)); - pointers.add(Pointer.fromFunction(simpleAddition, 245)); - pointers.add(Pointer.fromFunction(simpleAddition, 246)); - pointers.add(Pointer.fromFunction(simpleAddition, 247)); - pointers.add(Pointer.fromFunction(simpleAddition, 248)); - pointers.add(Pointer.fromFunction(simpleAddition, 249)); - pointers.add(Pointer.fromFunction(simpleAddition, 250)); - pointers.add(Pointer.fromFunction(simpleAddition, 251)); - pointers.add(Pointer.fromFunction(simpleAddition, 252)); - pointers.add(Pointer.fromFunction(simpleAddition, 253)); - pointers.add(Pointer.fromFunction(simpleAddition, 254)); - pointers.add(Pointer.fromFunction(simpleAddition, 255)); - pointers.add(Pointer.fromFunction(simpleAddition, 256)); - pointers.add(Pointer.fromFunction(simpleAddition, 257)); - pointers.add(Pointer.fromFunction(simpleAddition, 258)); - pointers.add(Pointer.fromFunction(simpleAddition, 259)); - pointers.add(Pointer.fromFunction(simpleAddition, 260)); - pointers.add(Pointer.fromFunction(simpleAddition, 261)); - pointers.add(Pointer.fromFunction(simpleAddition, 262)); - pointers.add(Pointer.fromFunction(simpleAddition, 263)); - pointers.add(Pointer.fromFunction(simpleAddition, 264)); - pointers.add(Pointer.fromFunction(simpleAddition, 265)); - pointers.add(Pointer.fromFunction(simpleAddition, 266)); - pointers.add(Pointer.fromFunction(simpleAddition, 267)); - pointers.add(Pointer.fromFunction(simpleAddition, 268)); - pointers.add(Pointer.fromFunction(simpleAddition, 269)); - pointers.add(Pointer.fromFunction(simpleAddition, 270)); - pointers.add(Pointer.fromFunction(simpleAddition, 271)); - pointers.add(Pointer.fromFunction(simpleAddition, 272)); - pointers.add(Pointer.fromFunction(simpleAddition, 273)); - pointers.add(Pointer.fromFunction(simpleAddition, 274)); - pointers.add(Pointer.fromFunction(simpleAddition, 275)); - pointers.add(Pointer.fromFunction(simpleAddition, 276)); - pointers.add(Pointer.fromFunction(simpleAddition, 277)); - pointers.add(Pointer.fromFunction(simpleAddition, 278)); - pointers.add(Pointer.fromFunction(simpleAddition, 279)); - pointers.add(Pointer.fromFunction(simpleAddition, 280)); - pointers.add(Pointer.fromFunction(simpleAddition, 281)); - pointers.add(Pointer.fromFunction(simpleAddition, 282)); - pointers.add(Pointer.fromFunction(simpleAddition, 283)); - pointers.add(Pointer.fromFunction(simpleAddition, 284)); - pointers.add(Pointer.fromFunction(simpleAddition, 285)); - pointers.add(Pointer.fromFunction(simpleAddition, 286)); - pointers.add(Pointer.fromFunction(simpleAddition, 287)); - pointers.add(Pointer.fromFunction(simpleAddition, 288)); - pointers.add(Pointer.fromFunction(simpleAddition, 289)); - pointers.add(Pointer.fromFunction(simpleAddition, 290)); - pointers.add(Pointer.fromFunction(simpleAddition, 291)); - pointers.add(Pointer.fromFunction(simpleAddition, 292)); - pointers.add(Pointer.fromFunction(simpleAddition, 293)); - pointers.add(Pointer.fromFunction(simpleAddition, 294)); - pointers.add(Pointer.fromFunction(simpleAddition, 295)); - pointers.add(Pointer.fromFunction(simpleAddition, 296)); - pointers.add(Pointer.fromFunction(simpleAddition, 297)); - pointers.add(Pointer.fromFunction(simpleAddition, 298)); - pointers.add(Pointer.fromFunction(simpleAddition, 299)); - pointers.add(Pointer.fromFunction(simpleAddition, 300)); - pointers.add(Pointer.fromFunction(simpleAddition, 301)); - pointers.add(Pointer.fromFunction(simpleAddition, 302)); - pointers.add(Pointer.fromFunction(simpleAddition, 303)); - pointers.add(Pointer.fromFunction(simpleAddition, 304)); - pointers.add(Pointer.fromFunction(simpleAddition, 305)); - pointers.add(Pointer.fromFunction(simpleAddition, 306)); - pointers.add(Pointer.fromFunction(simpleAddition, 307)); - pointers.add(Pointer.fromFunction(simpleAddition, 308)); - pointers.add(Pointer.fromFunction(simpleAddition, 309)); - pointers.add(Pointer.fromFunction(simpleAddition, 310)); - pointers.add(Pointer.fromFunction(simpleAddition, 311)); - pointers.add(Pointer.fromFunction(simpleAddition, 312)); - pointers.add(Pointer.fromFunction(simpleAddition, 313)); - pointers.add(Pointer.fromFunction(simpleAddition, 314)); - pointers.add(Pointer.fromFunction(simpleAddition, 315)); - pointers.add(Pointer.fromFunction(simpleAddition, 316)); - pointers.add(Pointer.fromFunction(simpleAddition, 317)); - pointers.add(Pointer.fromFunction(simpleAddition, 318)); - pointers.add(Pointer.fromFunction(simpleAddition, 319)); - pointers.add(Pointer.fromFunction(simpleAddition, 320)); - pointers.add(Pointer.fromFunction(simpleAddition, 321)); - pointers.add(Pointer.fromFunction(simpleAddition, 322)); - pointers.add(Pointer.fromFunction(simpleAddition, 323)); - pointers.add(Pointer.fromFunction(simpleAddition, 324)); - pointers.add(Pointer.fromFunction(simpleAddition, 325)); - pointers.add(Pointer.fromFunction(simpleAddition, 326)); - pointers.add(Pointer.fromFunction(simpleAddition, 327)); - pointers.add(Pointer.fromFunction(simpleAddition, 328)); - pointers.add(Pointer.fromFunction(simpleAddition, 329)); - pointers.add(Pointer.fromFunction(simpleAddition, 330)); - pointers.add(Pointer.fromFunction(simpleAddition, 331)); - pointers.add(Pointer.fromFunction(simpleAddition, 332)); - pointers.add(Pointer.fromFunction(simpleAddition, 333)); - pointers.add(Pointer.fromFunction(simpleAddition, 334)); - pointers.add(Pointer.fromFunction(simpleAddition, 335)); - pointers.add(Pointer.fromFunction(simpleAddition, 336)); - pointers.add(Pointer.fromFunction(simpleAddition, 337)); - pointers.add(Pointer.fromFunction(simpleAddition, 338)); - pointers.add(Pointer.fromFunction(simpleAddition, 339)); - pointers.add(Pointer.fromFunction(simpleAddition, 340)); - pointers.add(Pointer.fromFunction(simpleAddition, 341)); - pointers.add(Pointer.fromFunction(simpleAddition, 342)); - pointers.add(Pointer.fromFunction(simpleAddition, 343)); - pointers.add(Pointer.fromFunction(simpleAddition, 344)); - pointers.add(Pointer.fromFunction(simpleAddition, 345)); - pointers.add(Pointer.fromFunction(simpleAddition, 346)); - pointers.add(Pointer.fromFunction(simpleAddition, 347)); - pointers.add(Pointer.fromFunction(simpleAddition, 348)); - pointers.add(Pointer.fromFunction(simpleAddition, 349)); - pointers.add(Pointer.fromFunction(simpleAddition, 350)); - pointers.add(Pointer.fromFunction(simpleAddition, 351)); - pointers.add(Pointer.fromFunction(simpleAddition, 352)); - pointers.add(Pointer.fromFunction(simpleAddition, 353)); - pointers.add(Pointer.fromFunction(simpleAddition, 354)); - pointers.add(Pointer.fromFunction(simpleAddition, 355)); - pointers.add(Pointer.fromFunction(simpleAddition, 356)); - pointers.add(Pointer.fromFunction(simpleAddition, 357)); - pointers.add(Pointer.fromFunction(simpleAddition, 358)); - pointers.add(Pointer.fromFunction(simpleAddition, 359)); - pointers.add(Pointer.fromFunction(simpleAddition, 360)); - pointers.add(Pointer.fromFunction(simpleAddition, 361)); - pointers.add(Pointer.fromFunction(simpleAddition, 362)); - pointers.add(Pointer.fromFunction(simpleAddition, 363)); - pointers.add(Pointer.fromFunction(simpleAddition, 364)); - pointers.add(Pointer.fromFunction(simpleAddition, 365)); - pointers.add(Pointer.fromFunction(simpleAddition, 366)); - pointers.add(Pointer.fromFunction(simpleAddition, 367)); - pointers.add(Pointer.fromFunction(simpleAddition, 368)); - pointers.add(Pointer.fromFunction(simpleAddition, 369)); - pointers.add(Pointer.fromFunction(simpleAddition, 370)); - pointers.add(Pointer.fromFunction(simpleAddition, 371)); - pointers.add(Pointer.fromFunction(simpleAddition, 372)); - pointers.add(Pointer.fromFunction(simpleAddition, 373)); - pointers.add(Pointer.fromFunction(simpleAddition, 374)); - pointers.add(Pointer.fromFunction(simpleAddition, 375)); - pointers.add(Pointer.fromFunction(simpleAddition, 376)); - pointers.add(Pointer.fromFunction(simpleAddition, 377)); - pointers.add(Pointer.fromFunction(simpleAddition, 378)); - pointers.add(Pointer.fromFunction(simpleAddition, 379)); - pointers.add(Pointer.fromFunction(simpleAddition, 380)); - pointers.add(Pointer.fromFunction(simpleAddition, 381)); - pointers.add(Pointer.fromFunction(simpleAddition, 382)); - pointers.add(Pointer.fromFunction(simpleAddition, 383)); - pointers.add(Pointer.fromFunction(simpleAddition, 384)); - pointers.add(Pointer.fromFunction(simpleAddition, 385)); - pointers.add(Pointer.fromFunction(simpleAddition, 386)); - pointers.add(Pointer.fromFunction(simpleAddition, 387)); - pointers.add(Pointer.fromFunction(simpleAddition, 388)); - pointers.add(Pointer.fromFunction(simpleAddition, 389)); - pointers.add(Pointer.fromFunction(simpleAddition, 390)); - pointers.add(Pointer.fromFunction(simpleAddition, 391)); - pointers.add(Pointer.fromFunction(simpleAddition, 392)); - pointers.add(Pointer.fromFunction(simpleAddition, 393)); - pointers.add(Pointer.fromFunction(simpleAddition, 394)); - pointers.add(Pointer.fromFunction(simpleAddition, 395)); - pointers.add(Pointer.fromFunction(simpleAddition, 396)); - pointers.add(Pointer.fromFunction(simpleAddition, 397)); - pointers.add(Pointer.fromFunction(simpleAddition, 398)); - pointers.add(Pointer.fromFunction(simpleAddition, 399)); - pointers.add(Pointer.fromFunction(simpleAddition, 400)); - pointers.add(Pointer.fromFunction(simpleAddition, 401)); - pointers.add(Pointer.fromFunction(simpleAddition, 402)); - pointers.add(Pointer.fromFunction(simpleAddition, 403)); - pointers.add(Pointer.fromFunction(simpleAddition, 404)); - pointers.add(Pointer.fromFunction(simpleAddition, 405)); - pointers.add(Pointer.fromFunction(simpleAddition, 406)); - pointers.add(Pointer.fromFunction(simpleAddition, 407)); - pointers.add(Pointer.fromFunction(simpleAddition, 408)); - pointers.add(Pointer.fromFunction(simpleAddition, 409)); - pointers.add(Pointer.fromFunction(simpleAddition, 410)); - pointers.add(Pointer.fromFunction(simpleAddition, 411)); - pointers.add(Pointer.fromFunction(simpleAddition, 412)); - pointers.add(Pointer.fromFunction(simpleAddition, 413)); - pointers.add(Pointer.fromFunction(simpleAddition, 414)); - pointers.add(Pointer.fromFunction(simpleAddition, 415)); - pointers.add(Pointer.fromFunction(simpleAddition, 416)); - pointers.add(Pointer.fromFunction(simpleAddition, 417)); - pointers.add(Pointer.fromFunction(simpleAddition, 418)); - pointers.add(Pointer.fromFunction(simpleAddition, 419)); - pointers.add(Pointer.fromFunction(simpleAddition, 420)); - pointers.add(Pointer.fromFunction(simpleAddition, 421)); - pointers.add(Pointer.fromFunction(simpleAddition, 422)); - pointers.add(Pointer.fromFunction(simpleAddition, 423)); - pointers.add(Pointer.fromFunction(simpleAddition, 424)); - pointers.add(Pointer.fromFunction(simpleAddition, 425)); - pointers.add(Pointer.fromFunction(simpleAddition, 426)); - pointers.add(Pointer.fromFunction(simpleAddition, 427)); - pointers.add(Pointer.fromFunction(simpleAddition, 428)); - pointers.add(Pointer.fromFunction(simpleAddition, 429)); - pointers.add(Pointer.fromFunction(simpleAddition, 430)); - pointers.add(Pointer.fromFunction(simpleAddition, 431)); - pointers.add(Pointer.fromFunction(simpleAddition, 432)); - pointers.add(Pointer.fromFunction(simpleAddition, 433)); - pointers.add(Pointer.fromFunction(simpleAddition, 434)); - pointers.add(Pointer.fromFunction(simpleAddition, 435)); - pointers.add(Pointer.fromFunction(simpleAddition, 436)); - pointers.add(Pointer.fromFunction(simpleAddition, 437)); - pointers.add(Pointer.fromFunction(simpleAddition, 438)); - pointers.add(Pointer.fromFunction(simpleAddition, 439)); - pointers.add(Pointer.fromFunction(simpleAddition, 440)); - pointers.add(Pointer.fromFunction(simpleAddition, 441)); - pointers.add(Pointer.fromFunction(simpleAddition, 442)); - pointers.add(Pointer.fromFunction(simpleAddition, 443)); - pointers.add(Pointer.fromFunction(simpleAddition, 444)); - pointers.add(Pointer.fromFunction(simpleAddition, 445)); - pointers.add(Pointer.fromFunction(simpleAddition, 446)); - pointers.add(Pointer.fromFunction(simpleAddition, 447)); - pointers.add(Pointer.fromFunction(simpleAddition, 448)); - pointers.add(Pointer.fromFunction(simpleAddition, 449)); - pointers.add(Pointer.fromFunction(simpleAddition, 450)); - pointers.add(Pointer.fromFunction(simpleAddition, 451)); - pointers.add(Pointer.fromFunction(simpleAddition, 452)); - pointers.add(Pointer.fromFunction(simpleAddition, 453)); - pointers.add(Pointer.fromFunction(simpleAddition, 454)); - pointers.add(Pointer.fromFunction(simpleAddition, 455)); - pointers.add(Pointer.fromFunction(simpleAddition, 456)); - pointers.add(Pointer.fromFunction(simpleAddition, 457)); - pointers.add(Pointer.fromFunction(simpleAddition, 458)); - pointers.add(Pointer.fromFunction(simpleAddition, 459)); - pointers.add(Pointer.fromFunction(simpleAddition, 460)); - pointers.add(Pointer.fromFunction(simpleAddition, 461)); - pointers.add(Pointer.fromFunction(simpleAddition, 462)); - pointers.add(Pointer.fromFunction(simpleAddition, 463)); - pointers.add(Pointer.fromFunction(simpleAddition, 464)); - pointers.add(Pointer.fromFunction(simpleAddition, 465)); - pointers.add(Pointer.fromFunction(simpleAddition, 466)); - pointers.add(Pointer.fromFunction(simpleAddition, 467)); - pointers.add(Pointer.fromFunction(simpleAddition, 468)); - pointers.add(Pointer.fromFunction(simpleAddition, 469)); - pointers.add(Pointer.fromFunction(simpleAddition, 470)); - pointers.add(Pointer.fromFunction(simpleAddition, 471)); - pointers.add(Pointer.fromFunction(simpleAddition, 472)); - pointers.add(Pointer.fromFunction(simpleAddition, 473)); - pointers.add(Pointer.fromFunction(simpleAddition, 474)); - pointers.add(Pointer.fromFunction(simpleAddition, 475)); - pointers.add(Pointer.fromFunction(simpleAddition, 476)); - pointers.add(Pointer.fromFunction(simpleAddition, 477)); - pointers.add(Pointer.fromFunction(simpleAddition, 478)); - pointers.add(Pointer.fromFunction(simpleAddition, 479)); - pointers.add(Pointer.fromFunction(simpleAddition, 480)); - pointers.add(Pointer.fromFunction(simpleAddition, 481)); - pointers.add(Pointer.fromFunction(simpleAddition, 482)); - pointers.add(Pointer.fromFunction(simpleAddition, 483)); - pointers.add(Pointer.fromFunction(simpleAddition, 484)); - pointers.add(Pointer.fromFunction(simpleAddition, 485)); - pointers.add(Pointer.fromFunction(simpleAddition, 486)); - pointers.add(Pointer.fromFunction(simpleAddition, 487)); - pointers.add(Pointer.fromFunction(simpleAddition, 488)); - pointers.add(Pointer.fromFunction(simpleAddition, 489)); - pointers.add(Pointer.fromFunction(simpleAddition, 490)); - pointers.add(Pointer.fromFunction(simpleAddition, 491)); - pointers.add(Pointer.fromFunction(simpleAddition, 492)); - pointers.add(Pointer.fromFunction(simpleAddition, 493)); - pointers.add(Pointer.fromFunction(simpleAddition, 494)); - pointers.add(Pointer.fromFunction(simpleAddition, 495)); - pointers.add(Pointer.fromFunction(simpleAddition, 496)); - pointers.add(Pointer.fromFunction(simpleAddition, 497)); - pointers.add(Pointer.fromFunction(simpleAddition, 498)); - pointers.add(Pointer.fromFunction(simpleAddition, 499)); - pointers.add(Pointer.fromFunction(simpleAddition, 500)); - pointers.add(Pointer.fromFunction(simpleAddition, 501)); - pointers.add(Pointer.fromFunction(simpleAddition, 502)); - pointers.add(Pointer.fromFunction(simpleAddition, 503)); - pointers.add(Pointer.fromFunction(simpleAddition, 504)); - pointers.add(Pointer.fromFunction(simpleAddition, 505)); - pointers.add(Pointer.fromFunction(simpleAddition, 506)); - pointers.add(Pointer.fromFunction(simpleAddition, 507)); - pointers.add(Pointer.fromFunction(simpleAddition, 508)); - pointers.add(Pointer.fromFunction(simpleAddition, 509)); - pointers.add(Pointer.fromFunction(simpleAddition, 510)); - pointers.add(Pointer.fromFunction(simpleAddition, 511)); - pointers.add(Pointer.fromFunction(simpleAddition, 512)); - pointers.add(Pointer.fromFunction(simpleAddition, 513)); - pointers.add(Pointer.fromFunction(simpleAddition, 514)); - pointers.add(Pointer.fromFunction(simpleAddition, 515)); - pointers.add(Pointer.fromFunction(simpleAddition, 516)); - pointers.add(Pointer.fromFunction(simpleAddition, 517)); - pointers.add(Pointer.fromFunction(simpleAddition, 518)); - pointers.add(Pointer.fromFunction(simpleAddition, 519)); - pointers.add(Pointer.fromFunction(simpleAddition, 520)); - pointers.add(Pointer.fromFunction(simpleAddition, 521)); - pointers.add(Pointer.fromFunction(simpleAddition, 522)); - pointers.add(Pointer.fromFunction(simpleAddition, 523)); - pointers.add(Pointer.fromFunction(simpleAddition, 524)); - pointers.add(Pointer.fromFunction(simpleAddition, 525)); - pointers.add(Pointer.fromFunction(simpleAddition, 526)); - pointers.add(Pointer.fromFunction(simpleAddition, 527)); - pointers.add(Pointer.fromFunction(simpleAddition, 528)); - pointers.add(Pointer.fromFunction(simpleAddition, 529)); - pointers.add(Pointer.fromFunction(simpleAddition, 530)); - pointers.add(Pointer.fromFunction(simpleAddition, 531)); - pointers.add(Pointer.fromFunction(simpleAddition, 532)); - pointers.add(Pointer.fromFunction(simpleAddition, 533)); - pointers.add(Pointer.fromFunction(simpleAddition, 534)); - pointers.add(Pointer.fromFunction(simpleAddition, 535)); - pointers.add(Pointer.fromFunction(simpleAddition, 536)); - pointers.add(Pointer.fromFunction(simpleAddition, 537)); - pointers.add(Pointer.fromFunction(simpleAddition, 538)); - pointers.add(Pointer.fromFunction(simpleAddition, 539)); - pointers.add(Pointer.fromFunction(simpleAddition, 540)); - pointers.add(Pointer.fromFunction(simpleAddition, 541)); - pointers.add(Pointer.fromFunction(simpleAddition, 542)); - pointers.add(Pointer.fromFunction(simpleAddition, 543)); - pointers.add(Pointer.fromFunction(simpleAddition, 544)); - pointers.add(Pointer.fromFunction(simpleAddition, 545)); - pointers.add(Pointer.fromFunction(simpleAddition, 546)); - pointers.add(Pointer.fromFunction(simpleAddition, 547)); - pointers.add(Pointer.fromFunction(simpleAddition, 548)); - pointers.add(Pointer.fromFunction(simpleAddition, 549)); - pointers.add(Pointer.fromFunction(simpleAddition, 550)); - pointers.add(Pointer.fromFunction(simpleAddition, 551)); - pointers.add(Pointer.fromFunction(simpleAddition, 552)); - pointers.add(Pointer.fromFunction(simpleAddition, 553)); - pointers.add(Pointer.fromFunction(simpleAddition, 554)); - pointers.add(Pointer.fromFunction(simpleAddition, 555)); - pointers.add(Pointer.fromFunction(simpleAddition, 556)); - pointers.add(Pointer.fromFunction(simpleAddition, 557)); - pointers.add(Pointer.fromFunction(simpleAddition, 558)); - pointers.add(Pointer.fromFunction(simpleAddition, 559)); - pointers.add(Pointer.fromFunction(simpleAddition, 560)); - pointers.add(Pointer.fromFunction(simpleAddition, 561)); - pointers.add(Pointer.fromFunction(simpleAddition, 562)); - pointers.add(Pointer.fromFunction(simpleAddition, 563)); - pointers.add(Pointer.fromFunction(simpleAddition, 564)); - pointers.add(Pointer.fromFunction(simpleAddition, 565)); - pointers.add(Pointer.fromFunction(simpleAddition, 566)); - pointers.add(Pointer.fromFunction(simpleAddition, 567)); - pointers.add(Pointer.fromFunction(simpleAddition, 568)); - pointers.add(Pointer.fromFunction(simpleAddition, 569)); - pointers.add(Pointer.fromFunction(simpleAddition, 570)); - pointers.add(Pointer.fromFunction(simpleAddition, 571)); - pointers.add(Pointer.fromFunction(simpleAddition, 572)); - pointers.add(Pointer.fromFunction(simpleAddition, 573)); - pointers.add(Pointer.fromFunction(simpleAddition, 574)); - pointers.add(Pointer.fromFunction(simpleAddition, 575)); - pointers.add(Pointer.fromFunction(simpleAddition, 576)); - pointers.add(Pointer.fromFunction(simpleAddition, 577)); - pointers.add(Pointer.fromFunction(simpleAddition, 578)); - pointers.add(Pointer.fromFunction(simpleAddition, 579)); - pointers.add(Pointer.fromFunction(simpleAddition, 580)); - pointers.add(Pointer.fromFunction(simpleAddition, 581)); - pointers.add(Pointer.fromFunction(simpleAddition, 582)); - pointers.add(Pointer.fromFunction(simpleAddition, 583)); - pointers.add(Pointer.fromFunction(simpleAddition, 584)); - pointers.add(Pointer.fromFunction(simpleAddition, 585)); - pointers.add(Pointer.fromFunction(simpleAddition, 586)); - pointers.add(Pointer.fromFunction(simpleAddition, 587)); - pointers.add(Pointer.fromFunction(simpleAddition, 588)); - pointers.add(Pointer.fromFunction(simpleAddition, 589)); - pointers.add(Pointer.fromFunction(simpleAddition, 590)); - pointers.add(Pointer.fromFunction(simpleAddition, 591)); - pointers.add(Pointer.fromFunction(simpleAddition, 592)); - pointers.add(Pointer.fromFunction(simpleAddition, 593)); - pointers.add(Pointer.fromFunction(simpleAddition, 594)); - pointers.add(Pointer.fromFunction(simpleAddition, 595)); - pointers.add(Pointer.fromFunction(simpleAddition, 596)); - pointers.add(Pointer.fromFunction(simpleAddition, 597)); - pointers.add(Pointer.fromFunction(simpleAddition, 598)); - pointers.add(Pointer.fromFunction(simpleAddition, 599)); - pointers.add(Pointer.fromFunction(simpleAddition, 600)); - pointers.add(Pointer.fromFunction(simpleAddition, 601)); - pointers.add(Pointer.fromFunction(simpleAddition, 602)); - pointers.add(Pointer.fromFunction(simpleAddition, 603)); - pointers.add(Pointer.fromFunction(simpleAddition, 604)); - pointers.add(Pointer.fromFunction(simpleAddition, 605)); - pointers.add(Pointer.fromFunction(simpleAddition, 606)); - pointers.add(Pointer.fromFunction(simpleAddition, 607)); - pointers.add(Pointer.fromFunction(simpleAddition, 608)); - pointers.add(Pointer.fromFunction(simpleAddition, 609)); - pointers.add(Pointer.fromFunction(simpleAddition, 610)); - pointers.add(Pointer.fromFunction(simpleAddition, 611)); - pointers.add(Pointer.fromFunction(simpleAddition, 612)); - pointers.add(Pointer.fromFunction(simpleAddition, 613)); - pointers.add(Pointer.fromFunction(simpleAddition, 614)); - pointers.add(Pointer.fromFunction(simpleAddition, 615)); - pointers.add(Pointer.fromFunction(simpleAddition, 616)); - pointers.add(Pointer.fromFunction(simpleAddition, 617)); - pointers.add(Pointer.fromFunction(simpleAddition, 618)); - pointers.add(Pointer.fromFunction(simpleAddition, 619)); - pointers.add(Pointer.fromFunction(simpleAddition, 620)); - pointers.add(Pointer.fromFunction(simpleAddition, 621)); - pointers.add(Pointer.fromFunction(simpleAddition, 622)); - pointers.add(Pointer.fromFunction(simpleAddition, 623)); - pointers.add(Pointer.fromFunction(simpleAddition, 624)); - pointers.add(Pointer.fromFunction(simpleAddition, 625)); - pointers.add(Pointer.fromFunction(simpleAddition, 626)); - pointers.add(Pointer.fromFunction(simpleAddition, 627)); - pointers.add(Pointer.fromFunction(simpleAddition, 628)); - pointers.add(Pointer.fromFunction(simpleAddition, 629)); - pointers.add(Pointer.fromFunction(simpleAddition, 630)); - pointers.add(Pointer.fromFunction(simpleAddition, 631)); - pointers.add(Pointer.fromFunction(simpleAddition, 632)); - pointers.add(Pointer.fromFunction(simpleAddition, 633)); - pointers.add(Pointer.fromFunction(simpleAddition, 634)); - pointers.add(Pointer.fromFunction(simpleAddition, 635)); - pointers.add(Pointer.fromFunction(simpleAddition, 636)); - pointers.add(Pointer.fromFunction(simpleAddition, 637)); - pointers.add(Pointer.fromFunction(simpleAddition, 638)); - pointers.add(Pointer.fromFunction(simpleAddition, 639)); - pointers.add(Pointer.fromFunction(simpleAddition, 640)); - pointers.add(Pointer.fromFunction(simpleAddition, 641)); - pointers.add(Pointer.fromFunction(simpleAddition, 642)); - pointers.add(Pointer.fromFunction(simpleAddition, 643)); - pointers.add(Pointer.fromFunction(simpleAddition, 644)); - pointers.add(Pointer.fromFunction(simpleAddition, 645)); - pointers.add(Pointer.fromFunction(simpleAddition, 646)); - pointers.add(Pointer.fromFunction(simpleAddition, 647)); - pointers.add(Pointer.fromFunction(simpleAddition, 648)); - pointers.add(Pointer.fromFunction(simpleAddition, 649)); - pointers.add(Pointer.fromFunction(simpleAddition, 650)); - pointers.add(Pointer.fromFunction(simpleAddition, 651)); - pointers.add(Pointer.fromFunction(simpleAddition, 652)); - pointers.add(Pointer.fromFunction(simpleAddition, 653)); - pointers.add(Pointer.fromFunction(simpleAddition, 654)); - pointers.add(Pointer.fromFunction(simpleAddition, 655)); - pointers.add(Pointer.fromFunction(simpleAddition, 656)); - pointers.add(Pointer.fromFunction(simpleAddition, 657)); - pointers.add(Pointer.fromFunction(simpleAddition, 658)); - pointers.add(Pointer.fromFunction(simpleAddition, 659)); - pointers.add(Pointer.fromFunction(simpleAddition, 660)); - pointers.add(Pointer.fromFunction(simpleAddition, 661)); - pointers.add(Pointer.fromFunction(simpleAddition, 662)); - pointers.add(Pointer.fromFunction(simpleAddition, 663)); - pointers.add(Pointer.fromFunction(simpleAddition, 664)); - pointers.add(Pointer.fromFunction(simpleAddition, 665)); - pointers.add(Pointer.fromFunction(simpleAddition, 666)); - pointers.add(Pointer.fromFunction(simpleAddition, 667)); - pointers.add(Pointer.fromFunction(simpleAddition, 668)); - pointers.add(Pointer.fromFunction(simpleAddition, 669)); - pointers.add(Pointer.fromFunction(simpleAddition, 670)); - pointers.add(Pointer.fromFunction(simpleAddition, 671)); - pointers.add(Pointer.fromFunction(simpleAddition, 672)); - pointers.add(Pointer.fromFunction(simpleAddition, 673)); - pointers.add(Pointer.fromFunction(simpleAddition, 674)); - pointers.add(Pointer.fromFunction(simpleAddition, 675)); - pointers.add(Pointer.fromFunction(simpleAddition, 676)); - pointers.add(Pointer.fromFunction(simpleAddition, 677)); - pointers.add(Pointer.fromFunction(simpleAddition, 678)); - pointers.add(Pointer.fromFunction(simpleAddition, 679)); - pointers.add(Pointer.fromFunction(simpleAddition, 680)); - pointers.add(Pointer.fromFunction(simpleAddition, 681)); - pointers.add(Pointer.fromFunction(simpleAddition, 682)); - pointers.add(Pointer.fromFunction(simpleAddition, 683)); - pointers.add(Pointer.fromFunction(simpleAddition, 684)); - pointers.add(Pointer.fromFunction(simpleAddition, 685)); - pointers.add(Pointer.fromFunction(simpleAddition, 686)); - pointers.add(Pointer.fromFunction(simpleAddition, 687)); - pointers.add(Pointer.fromFunction(simpleAddition, 688)); - pointers.add(Pointer.fromFunction(simpleAddition, 689)); - pointers.add(Pointer.fromFunction(simpleAddition, 690)); - pointers.add(Pointer.fromFunction(simpleAddition, 691)); - pointers.add(Pointer.fromFunction(simpleAddition, 692)); - pointers.add(Pointer.fromFunction(simpleAddition, 693)); - pointers.add(Pointer.fromFunction(simpleAddition, 694)); - pointers.add(Pointer.fromFunction(simpleAddition, 695)); - pointers.add(Pointer.fromFunction(simpleAddition, 696)); - pointers.add(Pointer.fromFunction(simpleAddition, 697)); - pointers.add(Pointer.fromFunction(simpleAddition, 698)); - pointers.add(Pointer.fromFunction(simpleAddition, 699)); - pointers.add(Pointer.fromFunction(simpleAddition, 700)); - pointers.add(Pointer.fromFunction(simpleAddition, 701)); - pointers.add(Pointer.fromFunction(simpleAddition, 702)); - pointers.add(Pointer.fromFunction(simpleAddition, 703)); - pointers.add(Pointer.fromFunction(simpleAddition, 704)); - pointers.add(Pointer.fromFunction(simpleAddition, 705)); - pointers.add(Pointer.fromFunction(simpleAddition, 706)); - pointers.add(Pointer.fromFunction(simpleAddition, 707)); - pointers.add(Pointer.fromFunction(simpleAddition, 708)); - pointers.add(Pointer.fromFunction(simpleAddition, 709)); - pointers.add(Pointer.fromFunction(simpleAddition, 710)); - pointers.add(Pointer.fromFunction(simpleAddition, 711)); - pointers.add(Pointer.fromFunction(simpleAddition, 712)); - pointers.add(Pointer.fromFunction(simpleAddition, 713)); - pointers.add(Pointer.fromFunction(simpleAddition, 714)); - pointers.add(Pointer.fromFunction(simpleAddition, 715)); - pointers.add(Pointer.fromFunction(simpleAddition, 716)); - pointers.add(Pointer.fromFunction(simpleAddition, 717)); - pointers.add(Pointer.fromFunction(simpleAddition, 718)); - pointers.add(Pointer.fromFunction(simpleAddition, 719)); - pointers.add(Pointer.fromFunction(simpleAddition, 720)); - pointers.add(Pointer.fromFunction(simpleAddition, 721)); - pointers.add(Pointer.fromFunction(simpleAddition, 722)); - pointers.add(Pointer.fromFunction(simpleAddition, 723)); - pointers.add(Pointer.fromFunction(simpleAddition, 724)); - pointers.add(Pointer.fromFunction(simpleAddition, 725)); - pointers.add(Pointer.fromFunction(simpleAddition, 726)); - pointers.add(Pointer.fromFunction(simpleAddition, 727)); - pointers.add(Pointer.fromFunction(simpleAddition, 728)); - pointers.add(Pointer.fromFunction(simpleAddition, 729)); - pointers.add(Pointer.fromFunction(simpleAddition, 730)); - pointers.add(Pointer.fromFunction(simpleAddition, 731)); - pointers.add(Pointer.fromFunction(simpleAddition, 732)); - pointers.add(Pointer.fromFunction(simpleAddition, 733)); - pointers.add(Pointer.fromFunction(simpleAddition, 734)); - pointers.add(Pointer.fromFunction(simpleAddition, 735)); - pointers.add(Pointer.fromFunction(simpleAddition, 736)); - pointers.add(Pointer.fromFunction(simpleAddition, 737)); - pointers.add(Pointer.fromFunction(simpleAddition, 738)); - pointers.add(Pointer.fromFunction(simpleAddition, 739)); - pointers.add(Pointer.fromFunction(simpleAddition, 740)); - pointers.add(Pointer.fromFunction(simpleAddition, 741)); - pointers.add(Pointer.fromFunction(simpleAddition, 742)); - pointers.add(Pointer.fromFunction(simpleAddition, 743)); - pointers.add(Pointer.fromFunction(simpleAddition, 744)); - pointers.add(Pointer.fromFunction(simpleAddition, 745)); - pointers.add(Pointer.fromFunction(simpleAddition, 746)); - pointers.add(Pointer.fromFunction(simpleAddition, 747)); - pointers.add(Pointer.fromFunction(simpleAddition, 748)); - pointers.add(Pointer.fromFunction(simpleAddition, 749)); - pointers.add(Pointer.fromFunction(simpleAddition, 750)); - pointers.add(Pointer.fromFunction(simpleAddition, 751)); - pointers.add(Pointer.fromFunction(simpleAddition, 752)); - pointers.add(Pointer.fromFunction(simpleAddition, 753)); - pointers.add(Pointer.fromFunction(simpleAddition, 754)); - pointers.add(Pointer.fromFunction(simpleAddition, 755)); - pointers.add(Pointer.fromFunction(simpleAddition, 756)); - pointers.add(Pointer.fromFunction(simpleAddition, 757)); - pointers.add(Pointer.fromFunction(simpleAddition, 758)); - pointers.add(Pointer.fromFunction(simpleAddition, 759)); - pointers.add(Pointer.fromFunction(simpleAddition, 760)); - pointers.add(Pointer.fromFunction(simpleAddition, 761)); - pointers.add(Pointer.fromFunction(simpleAddition, 762)); - pointers.add(Pointer.fromFunction(simpleAddition, 763)); - pointers.add(Pointer.fromFunction(simpleAddition, 764)); - pointers.add(Pointer.fromFunction(simpleAddition, 765)); - pointers.add(Pointer.fromFunction(simpleAddition, 766)); - pointers.add(Pointer.fromFunction(simpleAddition, 767)); - pointers.add(Pointer.fromFunction(simpleAddition, 768)); - pointers.add(Pointer.fromFunction(simpleAddition, 769)); - pointers.add(Pointer.fromFunction(simpleAddition, 770)); - pointers.add(Pointer.fromFunction(simpleAddition, 771)); - pointers.add(Pointer.fromFunction(simpleAddition, 772)); - pointers.add(Pointer.fromFunction(simpleAddition, 773)); - pointers.add(Pointer.fromFunction(simpleAddition, 774)); - pointers.add(Pointer.fromFunction(simpleAddition, 775)); - pointers.add(Pointer.fromFunction(simpleAddition, 776)); - pointers.add(Pointer.fromFunction(simpleAddition, 777)); - pointers.add(Pointer.fromFunction(simpleAddition, 778)); - pointers.add(Pointer.fromFunction(simpleAddition, 779)); - pointers.add(Pointer.fromFunction(simpleAddition, 780)); - pointers.add(Pointer.fromFunction(simpleAddition, 781)); - pointers.add(Pointer.fromFunction(simpleAddition, 782)); - pointers.add(Pointer.fromFunction(simpleAddition, 783)); - pointers.add(Pointer.fromFunction(simpleAddition, 784)); - pointers.add(Pointer.fromFunction(simpleAddition, 785)); - pointers.add(Pointer.fromFunction(simpleAddition, 786)); - pointers.add(Pointer.fromFunction(simpleAddition, 787)); - pointers.add(Pointer.fromFunction(simpleAddition, 788)); - pointers.add(Pointer.fromFunction(simpleAddition, 789)); - pointers.add(Pointer.fromFunction(simpleAddition, 790)); - pointers.add(Pointer.fromFunction(simpleAddition, 791)); - pointers.add(Pointer.fromFunction(simpleAddition, 792)); - pointers.add(Pointer.fromFunction(simpleAddition, 793)); - pointers.add(Pointer.fromFunction(simpleAddition, 794)); - pointers.add(Pointer.fromFunction(simpleAddition, 795)); - pointers.add(Pointer.fromFunction(simpleAddition, 796)); - pointers.add(Pointer.fromFunction(simpleAddition, 797)); - pointers.add(Pointer.fromFunction(simpleAddition, 798)); - pointers.add(Pointer.fromFunction(simpleAddition, 799)); - pointers.add(Pointer.fromFunction(simpleAddition, 800)); - pointers.add(Pointer.fromFunction(simpleAddition, 801)); - pointers.add(Pointer.fromFunction(simpleAddition, 802)); - pointers.add(Pointer.fromFunction(simpleAddition, 803)); - pointers.add(Pointer.fromFunction(simpleAddition, 804)); - pointers.add(Pointer.fromFunction(simpleAddition, 805)); - pointers.add(Pointer.fromFunction(simpleAddition, 806)); - pointers.add(Pointer.fromFunction(simpleAddition, 807)); - pointers.add(Pointer.fromFunction(simpleAddition, 808)); - pointers.add(Pointer.fromFunction(simpleAddition, 809)); - pointers.add(Pointer.fromFunction(simpleAddition, 810)); - pointers.add(Pointer.fromFunction(simpleAddition, 811)); - pointers.add(Pointer.fromFunction(simpleAddition, 812)); - pointers.add(Pointer.fromFunction(simpleAddition, 813)); - pointers.add(Pointer.fromFunction(simpleAddition, 814)); - pointers.add(Pointer.fromFunction(simpleAddition, 815)); - pointers.add(Pointer.fromFunction(simpleAddition, 816)); - pointers.add(Pointer.fromFunction(simpleAddition, 817)); - pointers.add(Pointer.fromFunction(simpleAddition, 818)); - pointers.add(Pointer.fromFunction(simpleAddition, 819)); - pointers.add(Pointer.fromFunction(simpleAddition, 820)); - pointers.add(Pointer.fromFunction(simpleAddition, 821)); - pointers.add(Pointer.fromFunction(simpleAddition, 822)); - pointers.add(Pointer.fromFunction(simpleAddition, 823)); - pointers.add(Pointer.fromFunction(simpleAddition, 824)); - pointers.add(Pointer.fromFunction(simpleAddition, 825)); - pointers.add(Pointer.fromFunction(simpleAddition, 826)); - pointers.add(Pointer.fromFunction(simpleAddition, 827)); - pointers.add(Pointer.fromFunction(simpleAddition, 828)); - pointers.add(Pointer.fromFunction(simpleAddition, 829)); - pointers.add(Pointer.fromFunction(simpleAddition, 830)); - pointers.add(Pointer.fromFunction(simpleAddition, 831)); - pointers.add(Pointer.fromFunction(simpleAddition, 832)); - pointers.add(Pointer.fromFunction(simpleAddition, 833)); - pointers.add(Pointer.fromFunction(simpleAddition, 834)); - pointers.add(Pointer.fromFunction(simpleAddition, 835)); - pointers.add(Pointer.fromFunction(simpleAddition, 836)); - pointers.add(Pointer.fromFunction(simpleAddition, 837)); - pointers.add(Pointer.fromFunction(simpleAddition, 838)); - pointers.add(Pointer.fromFunction(simpleAddition, 839)); - pointers.add(Pointer.fromFunction(simpleAddition, 840)); - pointers.add(Pointer.fromFunction(simpleAddition, 841)); - pointers.add(Pointer.fromFunction(simpleAddition, 842)); - pointers.add(Pointer.fromFunction(simpleAddition, 843)); - pointers.add(Pointer.fromFunction(simpleAddition, 844)); - pointers.add(Pointer.fromFunction(simpleAddition, 845)); - pointers.add(Pointer.fromFunction(simpleAddition, 846)); - pointers.add(Pointer.fromFunction(simpleAddition, 847)); - pointers.add(Pointer.fromFunction(simpleAddition, 848)); - pointers.add(Pointer.fromFunction(simpleAddition, 849)); - pointers.add(Pointer.fromFunction(simpleAddition, 850)); - pointers.add(Pointer.fromFunction(simpleAddition, 851)); - pointers.add(Pointer.fromFunction(simpleAddition, 852)); - pointers.add(Pointer.fromFunction(simpleAddition, 853)); - pointers.add(Pointer.fromFunction(simpleAddition, 854)); - pointers.add(Pointer.fromFunction(simpleAddition, 855)); - pointers.add(Pointer.fromFunction(simpleAddition, 856)); - pointers.add(Pointer.fromFunction(simpleAddition, 857)); - pointers.add(Pointer.fromFunction(simpleAddition, 858)); - pointers.add(Pointer.fromFunction(simpleAddition, 859)); - pointers.add(Pointer.fromFunction(simpleAddition, 860)); - pointers.add(Pointer.fromFunction(simpleAddition, 861)); - pointers.add(Pointer.fromFunction(simpleAddition, 862)); - pointers.add(Pointer.fromFunction(simpleAddition, 863)); - pointers.add(Pointer.fromFunction(simpleAddition, 864)); - pointers.add(Pointer.fromFunction(simpleAddition, 865)); - pointers.add(Pointer.fromFunction(simpleAddition, 866)); - pointers.add(Pointer.fromFunction(simpleAddition, 867)); - pointers.add(Pointer.fromFunction(simpleAddition, 868)); - pointers.add(Pointer.fromFunction(simpleAddition, 869)); - pointers.add(Pointer.fromFunction(simpleAddition, 870)); - pointers.add(Pointer.fromFunction(simpleAddition, 871)); - pointers.add(Pointer.fromFunction(simpleAddition, 872)); - pointers.add(Pointer.fromFunction(simpleAddition, 873)); - pointers.add(Pointer.fromFunction(simpleAddition, 874)); - pointers.add(Pointer.fromFunction(simpleAddition, 875)); - pointers.add(Pointer.fromFunction(simpleAddition, 876)); - pointers.add(Pointer.fromFunction(simpleAddition, 877)); - pointers.add(Pointer.fromFunction(simpleAddition, 878)); - pointers.add(Pointer.fromFunction(simpleAddition, 879)); - pointers.add(Pointer.fromFunction(simpleAddition, 880)); - pointers.add(Pointer.fromFunction(simpleAddition, 881)); - pointers.add(Pointer.fromFunction(simpleAddition, 882)); - pointers.add(Pointer.fromFunction(simpleAddition, 883)); - pointers.add(Pointer.fromFunction(simpleAddition, 884)); - pointers.add(Pointer.fromFunction(simpleAddition, 885)); - pointers.add(Pointer.fromFunction(simpleAddition, 886)); - pointers.add(Pointer.fromFunction(simpleAddition, 887)); - pointers.add(Pointer.fromFunction(simpleAddition, 888)); - pointers.add(Pointer.fromFunction(simpleAddition, 889)); - pointers.add(Pointer.fromFunction(simpleAddition, 890)); - pointers.add(Pointer.fromFunction(simpleAddition, 891)); - pointers.add(Pointer.fromFunction(simpleAddition, 892)); - pointers.add(Pointer.fromFunction(simpleAddition, 893)); - pointers.add(Pointer.fromFunction(simpleAddition, 894)); - pointers.add(Pointer.fromFunction(simpleAddition, 895)); - pointers.add(Pointer.fromFunction(simpleAddition, 896)); - pointers.add(Pointer.fromFunction(simpleAddition, 897)); - pointers.add(Pointer.fromFunction(simpleAddition, 898)); - pointers.add(Pointer.fromFunction(simpleAddition, 899)); - pointers.add(Pointer.fromFunction(simpleAddition, 900)); - pointers.add(Pointer.fromFunction(simpleAddition, 901)); - pointers.add(Pointer.fromFunction(simpleAddition, 902)); - pointers.add(Pointer.fromFunction(simpleAddition, 903)); - pointers.add(Pointer.fromFunction(simpleAddition, 904)); - pointers.add(Pointer.fromFunction(simpleAddition, 905)); - pointers.add(Pointer.fromFunction(simpleAddition, 906)); - pointers.add(Pointer.fromFunction(simpleAddition, 907)); - pointers.add(Pointer.fromFunction(simpleAddition, 908)); - pointers.add(Pointer.fromFunction(simpleAddition, 909)); - pointers.add(Pointer.fromFunction(simpleAddition, 910)); - pointers.add(Pointer.fromFunction(simpleAddition, 911)); - pointers.add(Pointer.fromFunction(simpleAddition, 912)); - pointers.add(Pointer.fromFunction(simpleAddition, 913)); - pointers.add(Pointer.fromFunction(simpleAddition, 914)); - pointers.add(Pointer.fromFunction(simpleAddition, 915)); - pointers.add(Pointer.fromFunction(simpleAddition, 916)); - pointers.add(Pointer.fromFunction(simpleAddition, 917)); - pointers.add(Pointer.fromFunction(simpleAddition, 918)); - pointers.add(Pointer.fromFunction(simpleAddition, 919)); - pointers.add(Pointer.fromFunction(simpleAddition, 920)); - pointers.add(Pointer.fromFunction(simpleAddition, 921)); - pointers.add(Pointer.fromFunction(simpleAddition, 922)); - pointers.add(Pointer.fromFunction(simpleAddition, 923)); - pointers.add(Pointer.fromFunction(simpleAddition, 924)); - pointers.add(Pointer.fromFunction(simpleAddition, 925)); - pointers.add(Pointer.fromFunction(simpleAddition, 926)); - pointers.add(Pointer.fromFunction(simpleAddition, 927)); - pointers.add(Pointer.fromFunction(simpleAddition, 928)); - pointers.add(Pointer.fromFunction(simpleAddition, 929)); - pointers.add(Pointer.fromFunction(simpleAddition, 930)); - pointers.add(Pointer.fromFunction(simpleAddition, 931)); - pointers.add(Pointer.fromFunction(simpleAddition, 932)); - pointers.add(Pointer.fromFunction(simpleAddition, 933)); - pointers.add(Pointer.fromFunction(simpleAddition, 934)); - pointers.add(Pointer.fromFunction(simpleAddition, 935)); - pointers.add(Pointer.fromFunction(simpleAddition, 936)); - pointers.add(Pointer.fromFunction(simpleAddition, 937)); - pointers.add(Pointer.fromFunction(simpleAddition, 938)); - pointers.add(Pointer.fromFunction(simpleAddition, 939)); - pointers.add(Pointer.fromFunction(simpleAddition, 940)); - pointers.add(Pointer.fromFunction(simpleAddition, 941)); - pointers.add(Pointer.fromFunction(simpleAddition, 942)); - pointers.add(Pointer.fromFunction(simpleAddition, 943)); - pointers.add(Pointer.fromFunction(simpleAddition, 944)); - pointers.add(Pointer.fromFunction(simpleAddition, 945)); - pointers.add(Pointer.fromFunction(simpleAddition, 946)); - pointers.add(Pointer.fromFunction(simpleAddition, 947)); - pointers.add(Pointer.fromFunction(simpleAddition, 948)); - pointers.add(Pointer.fromFunction(simpleAddition, 949)); - pointers.add(Pointer.fromFunction(simpleAddition, 950)); - pointers.add(Pointer.fromFunction(simpleAddition, 951)); - pointers.add(Pointer.fromFunction(simpleAddition, 952)); - pointers.add(Pointer.fromFunction(simpleAddition, 953)); - pointers.add(Pointer.fromFunction(simpleAddition, 954)); - pointers.add(Pointer.fromFunction(simpleAddition, 955)); - pointers.add(Pointer.fromFunction(simpleAddition, 956)); - pointers.add(Pointer.fromFunction(simpleAddition, 957)); - pointers.add(Pointer.fromFunction(simpleAddition, 958)); - pointers.add(Pointer.fromFunction(simpleAddition, 959)); - pointers.add(Pointer.fromFunction(simpleAddition, 960)); - pointers.add(Pointer.fromFunction(simpleAddition, 961)); - pointers.add(Pointer.fromFunction(simpleAddition, 962)); - pointers.add(Pointer.fromFunction(simpleAddition, 963)); - pointers.add(Pointer.fromFunction(simpleAddition, 964)); - pointers.add(Pointer.fromFunction(simpleAddition, 965)); - pointers.add(Pointer.fromFunction(simpleAddition, 966)); - pointers.add(Pointer.fromFunction(simpleAddition, 967)); - pointers.add(Pointer.fromFunction(simpleAddition, 968)); - pointers.add(Pointer.fromFunction(simpleAddition, 969)); - pointers.add(Pointer.fromFunction(simpleAddition, 970)); - pointers.add(Pointer.fromFunction(simpleAddition, 971)); - pointers.add(Pointer.fromFunction(simpleAddition, 972)); - pointers.add(Pointer.fromFunction(simpleAddition, 973)); - pointers.add(Pointer.fromFunction(simpleAddition, 974)); - pointers.add(Pointer.fromFunction(simpleAddition, 975)); - pointers.add(Pointer.fromFunction(simpleAddition, 976)); - pointers.add(Pointer.fromFunction(simpleAddition, 977)); - pointers.add(Pointer.fromFunction(simpleAddition, 978)); - pointers.add(Pointer.fromFunction(simpleAddition, 979)); - pointers.add(Pointer.fromFunction(simpleAddition, 980)); - pointers.add(Pointer.fromFunction(simpleAddition, 981)); - pointers.add(Pointer.fromFunction(simpleAddition, 982)); - pointers.add(Pointer.fromFunction(simpleAddition, 983)); - pointers.add(Pointer.fromFunction(simpleAddition, 984)); - pointers.add(Pointer.fromFunction(simpleAddition, 985)); - pointers.add(Pointer.fromFunction(simpleAddition, 986)); - pointers.add(Pointer.fromFunction(simpleAddition, 987)); - pointers.add(Pointer.fromFunction(simpleAddition, 988)); - pointers.add(Pointer.fromFunction(simpleAddition, 989)); - pointers.add(Pointer.fromFunction(simpleAddition, 990)); - pointers.add(Pointer.fromFunction(simpleAddition, 991)); - pointers.add(Pointer.fromFunction(simpleAddition, 992)); - pointers.add(Pointer.fromFunction(simpleAddition, 993)); - pointers.add(Pointer.fromFunction(simpleAddition, 994)); - pointers.add(Pointer.fromFunction(simpleAddition, 995)); - pointers.add(Pointer.fromFunction(simpleAddition, 996)); - pointers.add(Pointer.fromFunction(simpleAddition, 997)); - pointers.add(Pointer.fromFunction(simpleAddition, 998)); - pointers.add(Pointer.fromFunction(simpleAddition, 999)); - - for (final pointer in pointers) { - CallbackTest("SimpleAddition", pointer).run(); - } -} diff --git a/tests/ffi_2/function_callbacks_structs_by_value_generated_test.dart b/tests/ffi_2/function_callbacks_structs_by_value_generated_test.dart deleted file mode 100644 index 7d3796a4620..00000000000 --- a/tests/ffi_2/function_callbacks_structs_by_value_generated_test.dart +++ /dev/null @@ -1,12346 +0,0 @@ -// 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. -// -// This file has been automatically generated. Please do not edit it manually. -// Generated by tests/ffi/generator/structs_by_value_tests_generator.dart. -// -// SharedObjects=ffi_test_functions -// VMOptions= -// VMOptions=--deterministic --optimization-counter-threshold=20 -// VMOptions=--use-slow-path -// VMOptions=--use-slow-path --stacktrace-every=100 - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; -import "package:ffi/ffi.dart"; - -import 'callback_tests_utils.dart'; - -import 'dylib_utils.dart'; - -// Reuse the compound classes. -import 'function_structs_by_value_generated_compounds.dart'; - -final ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); - -void main() { - testCases.forEach((t) { - print("==== Running " + t.name); - t.run(); - }); -} - -final testCases = [ - CallbackTest.withCheck( - "PassStruct1ByteIntx10", - Pointer.fromFunction(passStruct1ByteIntx10, 0), - passStruct1ByteIntx10AfterCallback), - CallbackTest.withCheck( - "PassStruct3BytesHomogeneousUint8x10", - Pointer.fromFunction( - passStruct3BytesHomogeneousUint8x10, 0), - passStruct3BytesHomogeneousUint8x10AfterCallback), - CallbackTest.withCheck( - "PassStruct3BytesInt2ByteAlignedx10", - Pointer.fromFunction( - passStruct3BytesInt2ByteAlignedx10, 0), - passStruct3BytesInt2ByteAlignedx10AfterCallback), - CallbackTest.withCheck( - "PassStruct4BytesHomogeneousInt16x10", - Pointer.fromFunction( - passStruct4BytesHomogeneousInt16x10, 0), - passStruct4BytesHomogeneousInt16x10AfterCallback), - CallbackTest.withCheck( - "PassStruct7BytesHomogeneousUint8x10", - Pointer.fromFunction( - passStruct7BytesHomogeneousUint8x10, 0), - passStruct7BytesHomogeneousUint8x10AfterCallback), - CallbackTest.withCheck( - "PassStruct7BytesInt4ByteAlignedx10", - Pointer.fromFunction( - passStruct7BytesInt4ByteAlignedx10, 0), - passStruct7BytesInt4ByteAlignedx10AfterCallback), - CallbackTest.withCheck( - "PassStruct8BytesIntx10", - Pointer.fromFunction( - passStruct8BytesIntx10, 0), - passStruct8BytesIntx10AfterCallback), - CallbackTest.withCheck( - "PassStruct8BytesHomogeneousFloatx10", - Pointer.fromFunction( - passStruct8BytesHomogeneousFloatx10, 0.0), - passStruct8BytesHomogeneousFloatx10AfterCallback), - CallbackTest.withCheck( - "PassStruct8BytesMixedx10", - Pointer.fromFunction( - passStruct8BytesMixedx10, 0.0), - passStruct8BytesMixedx10AfterCallback), - CallbackTest.withCheck( - "PassStruct9BytesHomogeneousUint8x10", - Pointer.fromFunction( - passStruct9BytesHomogeneousUint8x10, 0), - passStruct9BytesHomogeneousUint8x10AfterCallback), - CallbackTest.withCheck( - "PassStruct9BytesInt4Or8ByteAlignedx10", - Pointer.fromFunction( - passStruct9BytesInt4Or8ByteAlignedx10, 0), - passStruct9BytesInt4Or8ByteAlignedx10AfterCallback), - CallbackTest.withCheck( - "PassStruct12BytesHomogeneousFloatx6", - Pointer.fromFunction( - passStruct12BytesHomogeneousFloatx6, 0.0), - passStruct12BytesHomogeneousFloatx6AfterCallback), - CallbackTest.withCheck( - "PassStruct16BytesHomogeneousFloatx5", - Pointer.fromFunction( - passStruct16BytesHomogeneousFloatx5, 0.0), - passStruct16BytesHomogeneousFloatx5AfterCallback), - CallbackTest.withCheck( - "PassStruct16BytesMixedx10", - Pointer.fromFunction( - passStruct16BytesMixedx10, 0.0), - passStruct16BytesMixedx10AfterCallback), - CallbackTest.withCheck( - "PassStruct16BytesMixed2x10", - Pointer.fromFunction( - passStruct16BytesMixed2x10, 0.0), - passStruct16BytesMixed2x10AfterCallback), - CallbackTest.withCheck( - "PassStruct17BytesIntx10", - Pointer.fromFunction( - passStruct17BytesIntx10, 0), - passStruct17BytesIntx10AfterCallback), - CallbackTest.withCheck( - "PassStruct19BytesHomogeneousUint8x10", - Pointer.fromFunction( - passStruct19BytesHomogeneousUint8x10, 0), - passStruct19BytesHomogeneousUint8x10AfterCallback), - CallbackTest.withCheck( - "PassStruct20BytesHomogeneousInt32x10", - Pointer.fromFunction( - passStruct20BytesHomogeneousInt32x10, 0), - passStruct20BytesHomogeneousInt32x10AfterCallback), - CallbackTest.withCheck( - "PassStruct20BytesHomogeneousFloat", - Pointer.fromFunction( - passStruct20BytesHomogeneousFloat, 0.0), - passStruct20BytesHomogeneousFloatAfterCallback), - CallbackTest.withCheck( - "PassStruct32BytesHomogeneousDoublex5", - Pointer.fromFunction( - passStruct32BytesHomogeneousDoublex5, 0.0), - passStruct32BytesHomogeneousDoublex5AfterCallback), - CallbackTest.withCheck( - "PassStruct40BytesHomogeneousDouble", - Pointer.fromFunction( - passStruct40BytesHomogeneousDouble, 0.0), - passStruct40BytesHomogeneousDoubleAfterCallback), - CallbackTest.withCheck( - "PassStruct1024BytesHomogeneousUint64", - Pointer.fromFunction( - passStruct1024BytesHomogeneousUint64, 0), - passStruct1024BytesHomogeneousUint64AfterCallback), - CallbackTest.withCheck( - "PassFloatStruct16BytesHomogeneousFloatFloatStruct1", - Pointer.fromFunction< - PassFloatStruct16BytesHomogeneousFloatFloatStruct1Type>( - passFloatStruct16BytesHomogeneousFloatFloatStruct1, 0.0), - passFloatStruct16BytesHomogeneousFloatFloatStruct1AfterCallback), - CallbackTest.withCheck( - "PassFloatStruct32BytesHomogeneousDoubleFloatStruct", - Pointer.fromFunction< - PassFloatStruct32BytesHomogeneousDoubleFloatStructType>( - passFloatStruct32BytesHomogeneousDoubleFloatStruct, 0.0), - passFloatStruct32BytesHomogeneousDoubleFloatStructAfterCallback), - CallbackTest.withCheck( - "PassInt8Struct16BytesMixedInt8Struct16BytesMixedIn", - Pointer.fromFunction< - PassInt8Struct16BytesMixedInt8Struct16BytesMixedInType>( - passInt8Struct16BytesMixedInt8Struct16BytesMixedIn, 0.0), - passInt8Struct16BytesMixedInt8Struct16BytesMixedInAfterCallback), - CallbackTest.withCheck( - "PassDoublex6Struct16BytesMixedx4Int32", - Pointer.fromFunction( - passDoublex6Struct16BytesMixedx4Int32, 0.0), - passDoublex6Struct16BytesMixedx4Int32AfterCallback), - CallbackTest.withCheck( - "PassInt32x4Struct16BytesMixedx4Double", - Pointer.fromFunction( - passInt32x4Struct16BytesMixedx4Double, 0.0), - passInt32x4Struct16BytesMixedx4DoubleAfterCallback), - CallbackTest.withCheck( - "PassStruct40BytesHomogeneousDoubleStruct4BytesHomo", - Pointer.fromFunction< - PassStruct40BytesHomogeneousDoubleStruct4BytesHomoType>( - passStruct40BytesHomogeneousDoubleStruct4BytesHomo, 0.0), - passStruct40BytesHomogeneousDoubleStruct4BytesHomoAfterCallback), - CallbackTest.withCheck( - "PassInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int", - Pointer.fromFunction< - PassInt32x8Doublex8Int64Int8Struct1ByteIntInt64IntType>( - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int, 0.0), - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64IntAfterCallback), - CallbackTest.withCheck( - "PassStructAlignmentInt16", - Pointer.fromFunction( - passStructAlignmentInt16, 0), - passStructAlignmentInt16AfterCallback), - CallbackTest.withCheck( - "PassStructAlignmentInt32", - Pointer.fromFunction( - passStructAlignmentInt32, 0), - passStructAlignmentInt32AfterCallback), - CallbackTest.withCheck( - "PassStructAlignmentInt64", - Pointer.fromFunction( - passStructAlignmentInt64, 0), - passStructAlignmentInt64AfterCallback), - CallbackTest.withCheck( - "PassStruct8BytesNestedIntx10", - Pointer.fromFunction( - passStruct8BytesNestedIntx10, 0), - passStruct8BytesNestedIntx10AfterCallback), - CallbackTest.withCheck( - "PassStruct8BytesNestedFloatx10", - Pointer.fromFunction( - passStruct8BytesNestedFloatx10, 0.0), - passStruct8BytesNestedFloatx10AfterCallback), - CallbackTest.withCheck( - "PassStruct8BytesNestedFloat2x10", - Pointer.fromFunction( - passStruct8BytesNestedFloat2x10, 0.0), - passStruct8BytesNestedFloat2x10AfterCallback), - CallbackTest.withCheck( - "PassStruct8BytesNestedMixedx10", - Pointer.fromFunction( - passStruct8BytesNestedMixedx10, 0.0), - passStruct8BytesNestedMixedx10AfterCallback), - CallbackTest.withCheck( - "PassStruct16BytesNestedIntx2", - Pointer.fromFunction( - passStruct16BytesNestedIntx2, 0), - passStruct16BytesNestedIntx2AfterCallback), - CallbackTest.withCheck( - "PassStruct32BytesNestedIntx2", - Pointer.fromFunction( - passStruct32BytesNestedIntx2, 0), - passStruct32BytesNestedIntx2AfterCallback), - CallbackTest.withCheck( - "PassStructNestedIntStructAlignmentInt16", - Pointer.fromFunction( - passStructNestedIntStructAlignmentInt16, 0), - passStructNestedIntStructAlignmentInt16AfterCallback), - CallbackTest.withCheck( - "PassStructNestedIntStructAlignmentInt32", - Pointer.fromFunction( - passStructNestedIntStructAlignmentInt32, 0), - passStructNestedIntStructAlignmentInt32AfterCallback), - CallbackTest.withCheck( - "PassStructNestedIntStructAlignmentInt64", - Pointer.fromFunction( - passStructNestedIntStructAlignmentInt64, 0), - passStructNestedIntStructAlignmentInt64AfterCallback), - CallbackTest.withCheck( - "PassStructNestedIrregularEvenBiggerx4", - Pointer.fromFunction( - passStructNestedIrregularEvenBiggerx4, 0.0), - passStructNestedIrregularEvenBiggerx4AfterCallback), - CallbackTest.withCheck( - "PassStruct8BytesInlineArrayIntx4", - Pointer.fromFunction( - passStruct8BytesInlineArrayIntx4, 0), - passStruct8BytesInlineArrayIntx4AfterCallback), - CallbackTest.withCheck( - "PassStructInlineArrayIrregularx4", - Pointer.fromFunction( - passStructInlineArrayIrregularx4, 0), - passStructInlineArrayIrregularx4AfterCallback), - CallbackTest.withCheck( - "PassStructInlineArray100Bytes", - Pointer.fromFunction( - passStructInlineArray100Bytes, 0), - passStructInlineArray100BytesAfterCallback), - CallbackTest.withCheck( - "PassStructStruct16BytesHomogeneousFloat2x5", - Pointer.fromFunction( - passStructStruct16BytesHomogeneousFloat2x5, 0.0), - passStructStruct16BytesHomogeneousFloat2x5AfterCallback), - CallbackTest.withCheck( - "PassStructStruct32BytesHomogeneousDouble2x5", - Pointer.fromFunction( - passStructStruct32BytesHomogeneousDouble2x5, 0.0), - passStructStruct32BytesHomogeneousDouble2x5AfterCallback), - CallbackTest.withCheck( - "PassStructStruct16BytesMixed3x10", - Pointer.fromFunction( - passStructStruct16BytesMixed3x10, 0.0), - passStructStruct16BytesMixed3x10AfterCallback), - CallbackTest.withCheck( - "PassUint8Struct32BytesInlineArrayMultiDimensionalI", - Pointer.fromFunction< - PassUint8Struct32BytesInlineArrayMultiDimensionalIType>( - passUint8Struct32BytesInlineArrayMultiDimensionalI, 0), - passUint8Struct32BytesInlineArrayMultiDimensionalIAfterCallback), - CallbackTest.withCheck( - "PassUint8Struct4BytesInlineArrayMultiDimensionalIn", - Pointer.fromFunction< - PassUint8Struct4BytesInlineArrayMultiDimensionalInType>( - passUint8Struct4BytesInlineArrayMultiDimensionalIn, 0), - passUint8Struct4BytesInlineArrayMultiDimensionalInAfterCallback), - CallbackTest.withCheck( - "PassStruct3BytesPackedIntx10", - Pointer.fromFunction( - passStruct3BytesPackedIntx10, 0), - passStruct3BytesPackedIntx10AfterCallback), - CallbackTest.withCheck( - "PassStruct8BytesPackedIntx10", - Pointer.fromFunction( - passStruct8BytesPackedIntx10, 0), - passStruct8BytesPackedIntx10AfterCallback), - CallbackTest.withCheck( - "PassStruct9BytesPackedMixedx10DoubleInt32x2", - Pointer.fromFunction( - passStruct9BytesPackedMixedx10DoubleInt32x2, 0.0), - passStruct9BytesPackedMixedx10DoubleInt32x2AfterCallback), - CallbackTest.withCheck( - "PassStruct5BytesPackedMixed", - Pointer.fromFunction( - passStruct5BytesPackedMixed, 0.0), - passStruct5BytesPackedMixedAfterCallback), - CallbackTest.withCheck( - "PassStructNestedAlignmentStruct5BytesPackedMixed", - Pointer.fromFunction< - PassStructNestedAlignmentStruct5BytesPackedMixedType>( - passStructNestedAlignmentStruct5BytesPackedMixed, 0.0), - passStructNestedAlignmentStruct5BytesPackedMixedAfterCallback), - CallbackTest.withCheck( - "PassStruct6BytesInlineArrayInt", - Pointer.fromFunction( - passStruct6BytesInlineArrayInt, 0.0), - passStruct6BytesInlineArrayIntAfterCallback), - CallbackTest.withCheck( - "PassStruct15BytesInlineArrayMixed", - Pointer.fromFunction( - passStruct15BytesInlineArrayMixed, 0.0), - passStruct15BytesInlineArrayMixedAfterCallback), - CallbackTest.withCheck( - "PassUnion4BytesMixedx10", - Pointer.fromFunction( - passUnion4BytesMixedx10, 0.0), - passUnion4BytesMixedx10AfterCallback), - CallbackTest.withCheck( - "PassUnion8BytesNestedFloatx10", - Pointer.fromFunction( - passUnion8BytesNestedFloatx10, 0.0), - passUnion8BytesNestedFloatx10AfterCallback), - CallbackTest.withCheck( - "PassUnion9BytesNestedIntx10", - Pointer.fromFunction( - passUnion9BytesNestedIntx10, 0.0), - passUnion9BytesNestedIntx10AfterCallback), - CallbackTest.withCheck( - "PassUnion16BytesNestedInlineArrayFloatx10", - Pointer.fromFunction( - passUnion16BytesNestedInlineArrayFloatx10, 0.0), - passUnion16BytesNestedInlineArrayFloatx10AfterCallback), - CallbackTest.withCheck( - "PassUnion16BytesNestedFloatx10", - Pointer.fromFunction( - passUnion16BytesNestedFloatx10, 0.0), - passUnion16BytesNestedFloatx10AfterCallback), - CallbackTest.withCheck( - "PassUint8Boolx9Struct10BytesHomogeneousBoolBool", - Pointer.fromFunction( - passUint8Boolx9Struct10BytesHomogeneousBoolBool, 0), - passUint8Boolx9Struct10BytesHomogeneousBoolBoolAfterCallback), - CallbackTest.withCheck( - "PassUint8Boolx9Struct10BytesInlineArrayBoolBool", - Pointer.fromFunction( - passUint8Boolx9Struct10BytesInlineArrayBoolBool, 0), - passUint8Boolx9Struct10BytesInlineArrayBoolBoolAfterCallback), - CallbackTest.withCheck( - "PassUint8Struct1ByteBool", - Pointer.fromFunction( - passUint8Struct1ByteBool, false), - passUint8Struct1ByteBoolAfterCallback), - CallbackTest.withCheck( - "PassWCharStructInlineArrayIntUintPtrx2LongUnsigned", - Pointer.fromFunction< - PassWCharStructInlineArrayIntUintPtrx2LongUnsignedType>( - passWCharStructInlineArrayIntUintPtrx2LongUnsigned, 0), - passWCharStructInlineArrayIntUintPtrx2LongUnsignedAfterCallback), - CallbackTest.withCheck( - "PassInt64x7Struct12BytesHomogeneousInt32", - Pointer.fromFunction( - passInt64x7Struct12BytesHomogeneousInt32, 0), - passInt64x7Struct12BytesHomogeneousInt32AfterCallback), - CallbackTest.withCheck( - "ReturnStruct1ByteInt", - Pointer.fromFunction(returnStruct1ByteInt), - returnStruct1ByteIntAfterCallback), - CallbackTest.withCheck( - "ReturnStruct3BytesHomogeneousUint8", - Pointer.fromFunction( - returnStruct3BytesHomogeneousUint8), - returnStruct3BytesHomogeneousUint8AfterCallback), - CallbackTest.withCheck( - "ReturnStruct3BytesInt2ByteAligned", - Pointer.fromFunction( - returnStruct3BytesInt2ByteAligned), - returnStruct3BytesInt2ByteAlignedAfterCallback), - CallbackTest.withCheck( - "ReturnStruct4BytesHomogeneousInt16", - Pointer.fromFunction( - returnStruct4BytesHomogeneousInt16), - returnStruct4BytesHomogeneousInt16AfterCallback), - CallbackTest.withCheck( - "ReturnStruct7BytesHomogeneousUint8", - Pointer.fromFunction( - returnStruct7BytesHomogeneousUint8), - returnStruct7BytesHomogeneousUint8AfterCallback), - CallbackTest.withCheck( - "ReturnStruct7BytesInt4ByteAligned", - Pointer.fromFunction( - returnStruct7BytesInt4ByteAligned), - returnStruct7BytesInt4ByteAlignedAfterCallback), - CallbackTest.withCheck( - "ReturnStruct8BytesInt", - Pointer.fromFunction(returnStruct8BytesInt), - returnStruct8BytesIntAfterCallback), - CallbackTest.withCheck( - "ReturnStruct8BytesHomogeneousFloat", - Pointer.fromFunction( - returnStruct8BytesHomogeneousFloat), - returnStruct8BytesHomogeneousFloatAfterCallback), - CallbackTest.withCheck( - "ReturnStruct8BytesMixed", - Pointer.fromFunction( - returnStruct8BytesMixed), - returnStruct8BytesMixedAfterCallback), - CallbackTest.withCheck( - "ReturnStruct9BytesHomogeneousUint8", - Pointer.fromFunction( - returnStruct9BytesHomogeneousUint8), - returnStruct9BytesHomogeneousUint8AfterCallback), - CallbackTest.withCheck( - "ReturnStruct9BytesInt4Or8ByteAligned", - Pointer.fromFunction( - returnStruct9BytesInt4Or8ByteAligned), - returnStruct9BytesInt4Or8ByteAlignedAfterCallback), - CallbackTest.withCheck( - "ReturnStruct12BytesHomogeneousFloat", - Pointer.fromFunction( - returnStruct12BytesHomogeneousFloat), - returnStruct12BytesHomogeneousFloatAfterCallback), - CallbackTest.withCheck( - "ReturnStruct16BytesHomogeneousFloat", - Pointer.fromFunction( - returnStruct16BytesHomogeneousFloat), - returnStruct16BytesHomogeneousFloatAfterCallback), - CallbackTest.withCheck( - "ReturnStruct16BytesMixed", - Pointer.fromFunction( - returnStruct16BytesMixed), - returnStruct16BytesMixedAfterCallback), - CallbackTest.withCheck( - "ReturnStruct16BytesMixed2", - Pointer.fromFunction( - returnStruct16BytesMixed2), - returnStruct16BytesMixed2AfterCallback), - CallbackTest.withCheck( - "ReturnStruct17BytesInt", - Pointer.fromFunction(returnStruct17BytesInt), - returnStruct17BytesIntAfterCallback), - CallbackTest.withCheck( - "ReturnStruct19BytesHomogeneousUint8", - Pointer.fromFunction( - returnStruct19BytesHomogeneousUint8), - returnStruct19BytesHomogeneousUint8AfterCallback), - CallbackTest.withCheck( - "ReturnStruct20BytesHomogeneousInt32", - Pointer.fromFunction( - returnStruct20BytesHomogeneousInt32), - returnStruct20BytesHomogeneousInt32AfterCallback), - CallbackTest.withCheck( - "ReturnStruct20BytesHomogeneousFloat", - Pointer.fromFunction( - returnStruct20BytesHomogeneousFloat), - returnStruct20BytesHomogeneousFloatAfterCallback), - CallbackTest.withCheck( - "ReturnStruct32BytesHomogeneousDouble", - Pointer.fromFunction( - returnStruct32BytesHomogeneousDouble), - returnStruct32BytesHomogeneousDoubleAfterCallback), - CallbackTest.withCheck( - "ReturnStruct40BytesHomogeneousDouble", - Pointer.fromFunction( - returnStruct40BytesHomogeneousDouble), - returnStruct40BytesHomogeneousDoubleAfterCallback), - CallbackTest.withCheck( - "ReturnStruct1024BytesHomogeneousUint64", - Pointer.fromFunction( - returnStruct1024BytesHomogeneousUint64), - returnStruct1024BytesHomogeneousUint64AfterCallback), - CallbackTest.withCheck( - "ReturnStruct3BytesPackedInt", - Pointer.fromFunction( - returnStruct3BytesPackedInt), - returnStruct3BytesPackedIntAfterCallback), - CallbackTest.withCheck( - "ReturnStruct8BytesPackedInt", - Pointer.fromFunction( - returnStruct8BytesPackedInt), - returnStruct8BytesPackedIntAfterCallback), - CallbackTest.withCheck( - "ReturnStruct9BytesPackedMixed", - Pointer.fromFunction( - returnStruct9BytesPackedMixed), - returnStruct9BytesPackedMixedAfterCallback), - CallbackTest.withCheck( - "ReturnUnion4BytesMixed", - Pointer.fromFunction(returnUnion4BytesMixed), - returnUnion4BytesMixedAfterCallback), - CallbackTest.withCheck( - "ReturnUnion8BytesNestedFloat", - Pointer.fromFunction( - returnUnion8BytesNestedFloat), - returnUnion8BytesNestedFloatAfterCallback), - CallbackTest.withCheck( - "ReturnUnion9BytesNestedInt", - Pointer.fromFunction( - returnUnion9BytesNestedInt), - returnUnion9BytesNestedIntAfterCallback), - CallbackTest.withCheck( - "ReturnUnion16BytesNestedFloat", - Pointer.fromFunction( - returnUnion16BytesNestedFloat), - returnUnion16BytesNestedFloatAfterCallback), - CallbackTest.withCheck( - "ReturnStructArgumentStruct1ByteInt", - Pointer.fromFunction( - returnStructArgumentStruct1ByteInt), - returnStructArgumentStruct1ByteIntAfterCallback), - CallbackTest.withCheck( - "ReturnStructArgumentInt32x8Struct1ByteInt", - Pointer.fromFunction( - returnStructArgumentInt32x8Struct1ByteInt), - returnStructArgumentInt32x8Struct1ByteIntAfterCallback), - CallbackTest.withCheck( - "ReturnStructArgumentStruct8BytesHomogeneousFloat", - Pointer.fromFunction< - ReturnStructArgumentStruct8BytesHomogeneousFloatType>( - returnStructArgumentStruct8BytesHomogeneousFloat), - returnStructArgumentStruct8BytesHomogeneousFloatAfterCallback), - CallbackTest.withCheck( - "ReturnStructArgumentStruct20BytesHomogeneousInt32", - Pointer.fromFunction< - ReturnStructArgumentStruct20BytesHomogeneousInt32Type>( - returnStructArgumentStruct20BytesHomogeneousInt32), - returnStructArgumentStruct20BytesHomogeneousInt32AfterCallback), - CallbackTest.withCheck( - "ReturnStructArgumentInt32x8Struct20BytesHomogeneou", - Pointer.fromFunction< - ReturnStructArgumentInt32x8Struct20BytesHomogeneouType>( - returnStructArgumentInt32x8Struct20BytesHomogeneou), - returnStructArgumentInt32x8Struct20BytesHomogeneouAfterCallback), - CallbackTest.withCheck( - "ReturnStructArgumentStruct8BytesInlineArrayInt", - Pointer.fromFunction( - returnStructArgumentStruct8BytesInlineArrayInt), - returnStructArgumentStruct8BytesInlineArrayIntAfterCallback), - CallbackTest.withCheck( - "ReturnStructArgumentStructStruct16BytesHomogeneous", - Pointer.fromFunction< - ReturnStructArgumentStructStruct16BytesHomogeneousType>( - returnStructArgumentStructStruct16BytesHomogeneous), - returnStructArgumentStructStruct16BytesHomogeneousAfterCallback), - CallbackTest.withCheck( - "ReturnStructArgumentStructStruct32BytesHomogeneous", - Pointer.fromFunction< - ReturnStructArgumentStructStruct32BytesHomogeneousType>( - returnStructArgumentStructStruct32BytesHomogeneous), - returnStructArgumentStructStruct32BytesHomogeneousAfterCallback), - CallbackTest.withCheck( - "ReturnStructArgumentStructStruct16BytesMixed3", - Pointer.fromFunction( - returnStructArgumentStructStruct16BytesMixed3), - returnStructArgumentStructStruct16BytesMixed3AfterCallback), - CallbackTest.withCheck( - "ReturnStructAlignmentInt16", - Pointer.fromFunction( - returnStructAlignmentInt16), - returnStructAlignmentInt16AfterCallback), - CallbackTest.withCheck( - "ReturnStructAlignmentInt32", - Pointer.fromFunction( - returnStructAlignmentInt32), - returnStructAlignmentInt32AfterCallback), - CallbackTest.withCheck( - "ReturnStructAlignmentInt64", - Pointer.fromFunction( - returnStructAlignmentInt64), - returnStructAlignmentInt64AfterCallback), - CallbackTest.withCheck( - "ReturnStruct8BytesNestedInt", - Pointer.fromFunction( - returnStruct8BytesNestedInt), - returnStruct8BytesNestedIntAfterCallback), - CallbackTest.withCheck( - "ReturnStruct8BytesNestedFloat", - Pointer.fromFunction( - returnStruct8BytesNestedFloat), - returnStruct8BytesNestedFloatAfterCallback), - CallbackTest.withCheck( - "ReturnStruct8BytesNestedFloat2", - Pointer.fromFunction( - returnStruct8BytesNestedFloat2), - returnStruct8BytesNestedFloat2AfterCallback), - CallbackTest.withCheck( - "ReturnStruct8BytesNestedMixed", - Pointer.fromFunction( - returnStruct8BytesNestedMixed), - returnStruct8BytesNestedMixedAfterCallback), - CallbackTest.withCheck( - "ReturnStruct16BytesNestedInt", - Pointer.fromFunction( - returnStruct16BytesNestedInt), - returnStruct16BytesNestedIntAfterCallback), - CallbackTest.withCheck( - "ReturnStruct32BytesNestedInt", - Pointer.fromFunction( - returnStruct32BytesNestedInt), - returnStruct32BytesNestedIntAfterCallback), - CallbackTest.withCheck( - "ReturnStructNestedIntStructAlignmentInt16", - Pointer.fromFunction( - returnStructNestedIntStructAlignmentInt16), - returnStructNestedIntStructAlignmentInt16AfterCallback), - CallbackTest.withCheck( - "ReturnStructNestedIntStructAlignmentInt32", - Pointer.fromFunction( - returnStructNestedIntStructAlignmentInt32), - returnStructNestedIntStructAlignmentInt32AfterCallback), - CallbackTest.withCheck( - "ReturnStructNestedIntStructAlignmentInt64", - Pointer.fromFunction( - returnStructNestedIntStructAlignmentInt64), - returnStructNestedIntStructAlignmentInt64AfterCallback), - CallbackTest.withCheck( - "ReturnStructNestedIrregularEvenBigger", - Pointer.fromFunction( - returnStructNestedIrregularEvenBigger), - returnStructNestedIrregularEvenBiggerAfterCallback), -]; -typedef PassStruct1ByteIntx10Type = Int64 Function( - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt); - -// Global variables to be able to test inputs after callback returned. -Struct1ByteInt passStruct1ByteIntx10_a0 = - Pointer.fromAddress(0).ref; -Struct1ByteInt passStruct1ByteIntx10_a1 = - Pointer.fromAddress(0).ref; -Struct1ByteInt passStruct1ByteIntx10_a2 = - Pointer.fromAddress(0).ref; -Struct1ByteInt passStruct1ByteIntx10_a3 = - Pointer.fromAddress(0).ref; -Struct1ByteInt passStruct1ByteIntx10_a4 = - Pointer.fromAddress(0).ref; -Struct1ByteInt passStruct1ByteIntx10_a5 = - Pointer.fromAddress(0).ref; -Struct1ByteInt passStruct1ByteIntx10_a6 = - Pointer.fromAddress(0).ref; -Struct1ByteInt passStruct1ByteIntx10_a7 = - Pointer.fromAddress(0).ref; -Struct1ByteInt passStruct1ByteIntx10_a8 = - Pointer.fromAddress(0).ref; -Struct1ByteInt passStruct1ByteIntx10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStruct1ByteIntx10Result = 0; - -int passStruct1ByteIntx10CalculateResult() { - int result = 0; - - result += passStruct1ByteIntx10_a0.a0; - result += passStruct1ByteIntx10_a1.a0; - result += passStruct1ByteIntx10_a2.a0; - result += passStruct1ByteIntx10_a3.a0; - result += passStruct1ByteIntx10_a4.a0; - result += passStruct1ByteIntx10_a5.a0; - result += passStruct1ByteIntx10_a6.a0; - result += passStruct1ByteIntx10_a7.a0; - result += passStruct1ByteIntx10_a8.a0; - result += passStruct1ByteIntx10_a9.a0; - - passStruct1ByteIntx10Result = result; - - return result; -} - -/// Smallest struct with data. -/// 10 struct arguments will exhaust available registers. -int passStruct1ByteIntx10( - Struct1ByteInt a0, - Struct1ByteInt a1, - Struct1ByteInt a2, - Struct1ByteInt a3, - Struct1ByteInt a4, - Struct1ByteInt a5, - Struct1ByteInt a6, - Struct1ByteInt a7, - Struct1ByteInt a8, - Struct1ByteInt a9) { - print( - "passStruct1ByteIntx10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct1ByteIntx10 throwing on purpose!"); - } - - passStruct1ByteIntx10_a0 = a0; - passStruct1ByteIntx10_a1 = a1; - passStruct1ByteIntx10_a2 = a2; - passStruct1ByteIntx10_a3 = a3; - passStruct1ByteIntx10_a4 = a4; - passStruct1ByteIntx10_a5 = a5; - passStruct1ByteIntx10_a6 = a6; - passStruct1ByteIntx10_a7 = a7; - passStruct1ByteIntx10_a8 = a8; - passStruct1ByteIntx10_a9 = a9; - - final result = passStruct1ByteIntx10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct1ByteIntx10AfterCallback() { - final result = passStruct1ByteIntx10CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(5, result); -} - -typedef PassStruct3BytesHomogeneousUint8x10Type = Int64 Function( - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8); - -// Global variables to be able to test inputs after callback returned. -Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a0 = - Pointer.fromAddress(0).ref; -Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a1 = - Pointer.fromAddress(0).ref; -Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a2 = - Pointer.fromAddress(0).ref; -Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a3 = - Pointer.fromAddress(0).ref; -Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a4 = - Pointer.fromAddress(0).ref; -Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a5 = - Pointer.fromAddress(0).ref; -Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a6 = - Pointer.fromAddress(0).ref; -Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a7 = - Pointer.fromAddress(0).ref; -Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a8 = - Pointer.fromAddress(0).ref; -Struct3BytesHomogeneousUint8 passStruct3BytesHomogeneousUint8x10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStruct3BytesHomogeneousUint8x10Result = 0; - -int passStruct3BytesHomogeneousUint8x10CalculateResult() { - int result = 0; - - result += passStruct3BytesHomogeneousUint8x10_a0.a0; - result += passStruct3BytesHomogeneousUint8x10_a0.a1; - result += passStruct3BytesHomogeneousUint8x10_a0.a2; - result += passStruct3BytesHomogeneousUint8x10_a1.a0; - result += passStruct3BytesHomogeneousUint8x10_a1.a1; - result += passStruct3BytesHomogeneousUint8x10_a1.a2; - result += passStruct3BytesHomogeneousUint8x10_a2.a0; - result += passStruct3BytesHomogeneousUint8x10_a2.a1; - result += passStruct3BytesHomogeneousUint8x10_a2.a2; - result += passStruct3BytesHomogeneousUint8x10_a3.a0; - result += passStruct3BytesHomogeneousUint8x10_a3.a1; - result += passStruct3BytesHomogeneousUint8x10_a3.a2; - result += passStruct3BytesHomogeneousUint8x10_a4.a0; - result += passStruct3BytesHomogeneousUint8x10_a4.a1; - result += passStruct3BytesHomogeneousUint8x10_a4.a2; - result += passStruct3BytesHomogeneousUint8x10_a5.a0; - result += passStruct3BytesHomogeneousUint8x10_a5.a1; - result += passStruct3BytesHomogeneousUint8x10_a5.a2; - result += passStruct3BytesHomogeneousUint8x10_a6.a0; - result += passStruct3BytesHomogeneousUint8x10_a6.a1; - result += passStruct3BytesHomogeneousUint8x10_a6.a2; - result += passStruct3BytesHomogeneousUint8x10_a7.a0; - result += passStruct3BytesHomogeneousUint8x10_a7.a1; - result += passStruct3BytesHomogeneousUint8x10_a7.a2; - result += passStruct3BytesHomogeneousUint8x10_a8.a0; - result += passStruct3BytesHomogeneousUint8x10_a8.a1; - result += passStruct3BytesHomogeneousUint8x10_a8.a2; - result += passStruct3BytesHomogeneousUint8x10_a9.a0; - result += passStruct3BytesHomogeneousUint8x10_a9.a1; - result += passStruct3BytesHomogeneousUint8x10_a9.a2; - - passStruct3BytesHomogeneousUint8x10Result = result; - - return result; -} - -/// Not a multiple of word size, not a power of two. -/// 10 struct arguments will exhaust available registers. -int passStruct3BytesHomogeneousUint8x10( - Struct3BytesHomogeneousUint8 a0, - Struct3BytesHomogeneousUint8 a1, - Struct3BytesHomogeneousUint8 a2, - Struct3BytesHomogeneousUint8 a3, - Struct3BytesHomogeneousUint8 a4, - Struct3BytesHomogeneousUint8 a5, - Struct3BytesHomogeneousUint8 a6, - Struct3BytesHomogeneousUint8 a7, - Struct3BytesHomogeneousUint8 a8, - Struct3BytesHomogeneousUint8 a9) { - print( - "passStruct3BytesHomogeneousUint8x10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct3BytesHomogeneousUint8x10 throwing on purpose!"); - } - - passStruct3BytesHomogeneousUint8x10_a0 = a0; - passStruct3BytesHomogeneousUint8x10_a1 = a1; - passStruct3BytesHomogeneousUint8x10_a2 = a2; - passStruct3BytesHomogeneousUint8x10_a3 = a3; - passStruct3BytesHomogeneousUint8x10_a4 = a4; - passStruct3BytesHomogeneousUint8x10_a5 = a5; - passStruct3BytesHomogeneousUint8x10_a6 = a6; - passStruct3BytesHomogeneousUint8x10_a7 = a7; - passStruct3BytesHomogeneousUint8x10_a8 = a8; - passStruct3BytesHomogeneousUint8x10_a9 = a9; - - final result = passStruct3BytesHomogeneousUint8x10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct3BytesHomogeneousUint8x10AfterCallback() { - final result = passStruct3BytesHomogeneousUint8x10CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(465, result); -} - -typedef PassStruct3BytesInt2ByteAlignedx10Type = Int64 Function( - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned); - -// Global variables to be able to test inputs after callback returned. -Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a0 = - Pointer.fromAddress(0).ref; -Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a1 = - Pointer.fromAddress(0).ref; -Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a2 = - Pointer.fromAddress(0).ref; -Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a3 = - Pointer.fromAddress(0).ref; -Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a4 = - Pointer.fromAddress(0).ref; -Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a5 = - Pointer.fromAddress(0).ref; -Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a6 = - Pointer.fromAddress(0).ref; -Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a7 = - Pointer.fromAddress(0).ref; -Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a8 = - Pointer.fromAddress(0).ref; -Struct3BytesInt2ByteAligned passStruct3BytesInt2ByteAlignedx10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStruct3BytesInt2ByteAlignedx10Result = 0; - -int passStruct3BytesInt2ByteAlignedx10CalculateResult() { - int result = 0; - - result += passStruct3BytesInt2ByteAlignedx10_a0.a0; - result += passStruct3BytesInt2ByteAlignedx10_a0.a1; - result += passStruct3BytesInt2ByteAlignedx10_a1.a0; - result += passStruct3BytesInt2ByteAlignedx10_a1.a1; - result += passStruct3BytesInt2ByteAlignedx10_a2.a0; - result += passStruct3BytesInt2ByteAlignedx10_a2.a1; - result += passStruct3BytesInt2ByteAlignedx10_a3.a0; - result += passStruct3BytesInt2ByteAlignedx10_a3.a1; - result += passStruct3BytesInt2ByteAlignedx10_a4.a0; - result += passStruct3BytesInt2ByteAlignedx10_a4.a1; - result += passStruct3BytesInt2ByteAlignedx10_a5.a0; - result += passStruct3BytesInt2ByteAlignedx10_a5.a1; - result += passStruct3BytesInt2ByteAlignedx10_a6.a0; - result += passStruct3BytesInt2ByteAlignedx10_a6.a1; - result += passStruct3BytesInt2ByteAlignedx10_a7.a0; - result += passStruct3BytesInt2ByteAlignedx10_a7.a1; - result += passStruct3BytesInt2ByteAlignedx10_a8.a0; - result += passStruct3BytesInt2ByteAlignedx10_a8.a1; - result += passStruct3BytesInt2ByteAlignedx10_a9.a0; - result += passStruct3BytesInt2ByteAlignedx10_a9.a1; - - passStruct3BytesInt2ByteAlignedx10Result = result; - - return result; -} - -/// Not a multiple of word size, not a power of two. -/// With alignment rules taken into account size is 4 bytes. -/// 10 struct arguments will exhaust available registers. -int passStruct3BytesInt2ByteAlignedx10( - Struct3BytesInt2ByteAligned a0, - Struct3BytesInt2ByteAligned a1, - Struct3BytesInt2ByteAligned a2, - Struct3BytesInt2ByteAligned a3, - Struct3BytesInt2ByteAligned a4, - Struct3BytesInt2ByteAligned a5, - Struct3BytesInt2ByteAligned a6, - Struct3BytesInt2ByteAligned a7, - Struct3BytesInt2ByteAligned a8, - Struct3BytesInt2ByteAligned a9) { - print( - "passStruct3BytesInt2ByteAlignedx10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct3BytesInt2ByteAlignedx10 throwing on purpose!"); - } - - passStruct3BytesInt2ByteAlignedx10_a0 = a0; - passStruct3BytesInt2ByteAlignedx10_a1 = a1; - passStruct3BytesInt2ByteAlignedx10_a2 = a2; - passStruct3BytesInt2ByteAlignedx10_a3 = a3; - passStruct3BytesInt2ByteAlignedx10_a4 = a4; - passStruct3BytesInt2ByteAlignedx10_a5 = a5; - passStruct3BytesInt2ByteAlignedx10_a6 = a6; - passStruct3BytesInt2ByteAlignedx10_a7 = a7; - passStruct3BytesInt2ByteAlignedx10_a8 = a8; - passStruct3BytesInt2ByteAlignedx10_a9 = a9; - - final result = passStruct3BytesInt2ByteAlignedx10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct3BytesInt2ByteAlignedx10AfterCallback() { - final result = passStruct3BytesInt2ByteAlignedx10CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(10, result); -} - -typedef PassStruct4BytesHomogeneousInt16x10Type = Int64 Function( - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16); - -// Global variables to be able to test inputs after callback returned. -Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a0 = - Pointer.fromAddress(0).ref; -Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a1 = - Pointer.fromAddress(0).ref; -Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a2 = - Pointer.fromAddress(0).ref; -Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a3 = - Pointer.fromAddress(0).ref; -Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a4 = - Pointer.fromAddress(0).ref; -Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a5 = - Pointer.fromAddress(0).ref; -Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a6 = - Pointer.fromAddress(0).ref; -Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a7 = - Pointer.fromAddress(0).ref; -Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a8 = - Pointer.fromAddress(0).ref; -Struct4BytesHomogeneousInt16 passStruct4BytesHomogeneousInt16x10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStruct4BytesHomogeneousInt16x10Result = 0; - -int passStruct4BytesHomogeneousInt16x10CalculateResult() { - int result = 0; - - result += passStruct4BytesHomogeneousInt16x10_a0.a0; - result += passStruct4BytesHomogeneousInt16x10_a0.a1; - result += passStruct4BytesHomogeneousInt16x10_a1.a0; - result += passStruct4BytesHomogeneousInt16x10_a1.a1; - result += passStruct4BytesHomogeneousInt16x10_a2.a0; - result += passStruct4BytesHomogeneousInt16x10_a2.a1; - result += passStruct4BytesHomogeneousInt16x10_a3.a0; - result += passStruct4BytesHomogeneousInt16x10_a3.a1; - result += passStruct4BytesHomogeneousInt16x10_a4.a0; - result += passStruct4BytesHomogeneousInt16x10_a4.a1; - result += passStruct4BytesHomogeneousInt16x10_a5.a0; - result += passStruct4BytesHomogeneousInt16x10_a5.a1; - result += passStruct4BytesHomogeneousInt16x10_a6.a0; - result += passStruct4BytesHomogeneousInt16x10_a6.a1; - result += passStruct4BytesHomogeneousInt16x10_a7.a0; - result += passStruct4BytesHomogeneousInt16x10_a7.a1; - result += passStruct4BytesHomogeneousInt16x10_a8.a0; - result += passStruct4BytesHomogeneousInt16x10_a8.a1; - result += passStruct4BytesHomogeneousInt16x10_a9.a0; - result += passStruct4BytesHomogeneousInt16x10_a9.a1; - - passStruct4BytesHomogeneousInt16x10Result = result; - - return result; -} - -/// Exactly word size on 32-bit architectures. -/// 10 struct arguments will exhaust available registers. -int passStruct4BytesHomogeneousInt16x10( - Struct4BytesHomogeneousInt16 a0, - Struct4BytesHomogeneousInt16 a1, - Struct4BytesHomogeneousInt16 a2, - Struct4BytesHomogeneousInt16 a3, - Struct4BytesHomogeneousInt16 a4, - Struct4BytesHomogeneousInt16 a5, - Struct4BytesHomogeneousInt16 a6, - Struct4BytesHomogeneousInt16 a7, - Struct4BytesHomogeneousInt16 a8, - Struct4BytesHomogeneousInt16 a9) { - print( - "passStruct4BytesHomogeneousInt16x10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct4BytesHomogeneousInt16x10 throwing on purpose!"); - } - - passStruct4BytesHomogeneousInt16x10_a0 = a0; - passStruct4BytesHomogeneousInt16x10_a1 = a1; - passStruct4BytesHomogeneousInt16x10_a2 = a2; - passStruct4BytesHomogeneousInt16x10_a3 = a3; - passStruct4BytesHomogeneousInt16x10_a4 = a4; - passStruct4BytesHomogeneousInt16x10_a5 = a5; - passStruct4BytesHomogeneousInt16x10_a6 = a6; - passStruct4BytesHomogeneousInt16x10_a7 = a7; - passStruct4BytesHomogeneousInt16x10_a8 = a8; - passStruct4BytesHomogeneousInt16x10_a9 = a9; - - final result = passStruct4BytesHomogeneousInt16x10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct4BytesHomogeneousInt16x10AfterCallback() { - final result = passStruct4BytesHomogeneousInt16x10CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(10, result); -} - -typedef PassStruct7BytesHomogeneousUint8x10Type = Int64 Function( - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8); - -// Global variables to be able to test inputs after callback returned. -Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a0 = - Pointer.fromAddress(0).ref; -Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a1 = - Pointer.fromAddress(0).ref; -Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a2 = - Pointer.fromAddress(0).ref; -Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a3 = - Pointer.fromAddress(0).ref; -Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a4 = - Pointer.fromAddress(0).ref; -Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a5 = - Pointer.fromAddress(0).ref; -Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a6 = - Pointer.fromAddress(0).ref; -Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a7 = - Pointer.fromAddress(0).ref; -Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a8 = - Pointer.fromAddress(0).ref; -Struct7BytesHomogeneousUint8 passStruct7BytesHomogeneousUint8x10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStruct7BytesHomogeneousUint8x10Result = 0; - -int passStruct7BytesHomogeneousUint8x10CalculateResult() { - int result = 0; - - result += passStruct7BytesHomogeneousUint8x10_a0.a0; - result += passStruct7BytesHomogeneousUint8x10_a0.a1; - result += passStruct7BytesHomogeneousUint8x10_a0.a2; - result += passStruct7BytesHomogeneousUint8x10_a0.a3; - result += passStruct7BytesHomogeneousUint8x10_a0.a4; - result += passStruct7BytesHomogeneousUint8x10_a0.a5; - result += passStruct7BytesHomogeneousUint8x10_a0.a6; - result += passStruct7BytesHomogeneousUint8x10_a1.a0; - result += passStruct7BytesHomogeneousUint8x10_a1.a1; - result += passStruct7BytesHomogeneousUint8x10_a1.a2; - result += passStruct7BytesHomogeneousUint8x10_a1.a3; - result += passStruct7BytesHomogeneousUint8x10_a1.a4; - result += passStruct7BytesHomogeneousUint8x10_a1.a5; - result += passStruct7BytesHomogeneousUint8x10_a1.a6; - result += passStruct7BytesHomogeneousUint8x10_a2.a0; - result += passStruct7BytesHomogeneousUint8x10_a2.a1; - result += passStruct7BytesHomogeneousUint8x10_a2.a2; - result += passStruct7BytesHomogeneousUint8x10_a2.a3; - result += passStruct7BytesHomogeneousUint8x10_a2.a4; - result += passStruct7BytesHomogeneousUint8x10_a2.a5; - result += passStruct7BytesHomogeneousUint8x10_a2.a6; - result += passStruct7BytesHomogeneousUint8x10_a3.a0; - result += passStruct7BytesHomogeneousUint8x10_a3.a1; - result += passStruct7BytesHomogeneousUint8x10_a3.a2; - result += passStruct7BytesHomogeneousUint8x10_a3.a3; - result += passStruct7BytesHomogeneousUint8x10_a3.a4; - result += passStruct7BytesHomogeneousUint8x10_a3.a5; - result += passStruct7BytesHomogeneousUint8x10_a3.a6; - result += passStruct7BytesHomogeneousUint8x10_a4.a0; - result += passStruct7BytesHomogeneousUint8x10_a4.a1; - result += passStruct7BytesHomogeneousUint8x10_a4.a2; - result += passStruct7BytesHomogeneousUint8x10_a4.a3; - result += passStruct7BytesHomogeneousUint8x10_a4.a4; - result += passStruct7BytesHomogeneousUint8x10_a4.a5; - result += passStruct7BytesHomogeneousUint8x10_a4.a6; - result += passStruct7BytesHomogeneousUint8x10_a5.a0; - result += passStruct7BytesHomogeneousUint8x10_a5.a1; - result += passStruct7BytesHomogeneousUint8x10_a5.a2; - result += passStruct7BytesHomogeneousUint8x10_a5.a3; - result += passStruct7BytesHomogeneousUint8x10_a5.a4; - result += passStruct7BytesHomogeneousUint8x10_a5.a5; - result += passStruct7BytesHomogeneousUint8x10_a5.a6; - result += passStruct7BytesHomogeneousUint8x10_a6.a0; - result += passStruct7BytesHomogeneousUint8x10_a6.a1; - result += passStruct7BytesHomogeneousUint8x10_a6.a2; - result += passStruct7BytesHomogeneousUint8x10_a6.a3; - result += passStruct7BytesHomogeneousUint8x10_a6.a4; - result += passStruct7BytesHomogeneousUint8x10_a6.a5; - result += passStruct7BytesHomogeneousUint8x10_a6.a6; - result += passStruct7BytesHomogeneousUint8x10_a7.a0; - result += passStruct7BytesHomogeneousUint8x10_a7.a1; - result += passStruct7BytesHomogeneousUint8x10_a7.a2; - result += passStruct7BytesHomogeneousUint8x10_a7.a3; - result += passStruct7BytesHomogeneousUint8x10_a7.a4; - result += passStruct7BytesHomogeneousUint8x10_a7.a5; - result += passStruct7BytesHomogeneousUint8x10_a7.a6; - result += passStruct7BytesHomogeneousUint8x10_a8.a0; - result += passStruct7BytesHomogeneousUint8x10_a8.a1; - result += passStruct7BytesHomogeneousUint8x10_a8.a2; - result += passStruct7BytesHomogeneousUint8x10_a8.a3; - result += passStruct7BytesHomogeneousUint8x10_a8.a4; - result += passStruct7BytesHomogeneousUint8x10_a8.a5; - result += passStruct7BytesHomogeneousUint8x10_a8.a6; - result += passStruct7BytesHomogeneousUint8x10_a9.a0; - result += passStruct7BytesHomogeneousUint8x10_a9.a1; - result += passStruct7BytesHomogeneousUint8x10_a9.a2; - result += passStruct7BytesHomogeneousUint8x10_a9.a3; - result += passStruct7BytesHomogeneousUint8x10_a9.a4; - result += passStruct7BytesHomogeneousUint8x10_a9.a5; - result += passStruct7BytesHomogeneousUint8x10_a9.a6; - - passStruct7BytesHomogeneousUint8x10Result = result; - - return result; -} - -/// Sub word size on 64 bit architectures. -/// 10 struct arguments will exhaust available registers. -int passStruct7BytesHomogeneousUint8x10( - Struct7BytesHomogeneousUint8 a0, - Struct7BytesHomogeneousUint8 a1, - Struct7BytesHomogeneousUint8 a2, - Struct7BytesHomogeneousUint8 a3, - Struct7BytesHomogeneousUint8 a4, - Struct7BytesHomogeneousUint8 a5, - Struct7BytesHomogeneousUint8 a6, - Struct7BytesHomogeneousUint8 a7, - Struct7BytesHomogeneousUint8 a8, - Struct7BytesHomogeneousUint8 a9) { - print( - "passStruct7BytesHomogeneousUint8x10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct7BytesHomogeneousUint8x10 throwing on purpose!"); - } - - passStruct7BytesHomogeneousUint8x10_a0 = a0; - passStruct7BytesHomogeneousUint8x10_a1 = a1; - passStruct7BytesHomogeneousUint8x10_a2 = a2; - passStruct7BytesHomogeneousUint8x10_a3 = a3; - passStruct7BytesHomogeneousUint8x10_a4 = a4; - passStruct7BytesHomogeneousUint8x10_a5 = a5; - passStruct7BytesHomogeneousUint8x10_a6 = a6; - passStruct7BytesHomogeneousUint8x10_a7 = a7; - passStruct7BytesHomogeneousUint8x10_a8 = a8; - passStruct7BytesHomogeneousUint8x10_a9 = a9; - - final result = passStruct7BytesHomogeneousUint8x10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct7BytesHomogeneousUint8x10AfterCallback() { - final result = passStruct7BytesHomogeneousUint8x10CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(2485, result); -} - -typedef PassStruct7BytesInt4ByteAlignedx10Type = Int64 Function( - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned); - -// Global variables to be able to test inputs after callback returned. -Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a0 = - Pointer.fromAddress(0).ref; -Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a1 = - Pointer.fromAddress(0).ref; -Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a2 = - Pointer.fromAddress(0).ref; -Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a3 = - Pointer.fromAddress(0).ref; -Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a4 = - Pointer.fromAddress(0).ref; -Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a5 = - Pointer.fromAddress(0).ref; -Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a6 = - Pointer.fromAddress(0).ref; -Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a7 = - Pointer.fromAddress(0).ref; -Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a8 = - Pointer.fromAddress(0).ref; -Struct7BytesInt4ByteAligned passStruct7BytesInt4ByteAlignedx10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStruct7BytesInt4ByteAlignedx10Result = 0; - -int passStruct7BytesInt4ByteAlignedx10CalculateResult() { - int result = 0; - - result += passStruct7BytesInt4ByteAlignedx10_a0.a0; - result += passStruct7BytesInt4ByteAlignedx10_a0.a1; - result += passStruct7BytesInt4ByteAlignedx10_a0.a2; - result += passStruct7BytesInt4ByteAlignedx10_a1.a0; - result += passStruct7BytesInt4ByteAlignedx10_a1.a1; - result += passStruct7BytesInt4ByteAlignedx10_a1.a2; - result += passStruct7BytesInt4ByteAlignedx10_a2.a0; - result += passStruct7BytesInt4ByteAlignedx10_a2.a1; - result += passStruct7BytesInt4ByteAlignedx10_a2.a2; - result += passStruct7BytesInt4ByteAlignedx10_a3.a0; - result += passStruct7BytesInt4ByteAlignedx10_a3.a1; - result += passStruct7BytesInt4ByteAlignedx10_a3.a2; - result += passStruct7BytesInt4ByteAlignedx10_a4.a0; - result += passStruct7BytesInt4ByteAlignedx10_a4.a1; - result += passStruct7BytesInt4ByteAlignedx10_a4.a2; - result += passStruct7BytesInt4ByteAlignedx10_a5.a0; - result += passStruct7BytesInt4ByteAlignedx10_a5.a1; - result += passStruct7BytesInt4ByteAlignedx10_a5.a2; - result += passStruct7BytesInt4ByteAlignedx10_a6.a0; - result += passStruct7BytesInt4ByteAlignedx10_a6.a1; - result += passStruct7BytesInt4ByteAlignedx10_a6.a2; - result += passStruct7BytesInt4ByteAlignedx10_a7.a0; - result += passStruct7BytesInt4ByteAlignedx10_a7.a1; - result += passStruct7BytesInt4ByteAlignedx10_a7.a2; - result += passStruct7BytesInt4ByteAlignedx10_a8.a0; - result += passStruct7BytesInt4ByteAlignedx10_a8.a1; - result += passStruct7BytesInt4ByteAlignedx10_a8.a2; - result += passStruct7BytesInt4ByteAlignedx10_a9.a0; - result += passStruct7BytesInt4ByteAlignedx10_a9.a1; - result += passStruct7BytesInt4ByteAlignedx10_a9.a2; - - passStruct7BytesInt4ByteAlignedx10Result = result; - - return result; -} - -/// Sub word size on 64 bit architectures. -/// With alignment rules taken into account size is 8 bytes. -/// 10 struct arguments will exhaust available registers. -int passStruct7BytesInt4ByteAlignedx10( - Struct7BytesInt4ByteAligned a0, - Struct7BytesInt4ByteAligned a1, - Struct7BytesInt4ByteAligned a2, - Struct7BytesInt4ByteAligned a3, - Struct7BytesInt4ByteAligned a4, - Struct7BytesInt4ByteAligned a5, - Struct7BytesInt4ByteAligned a6, - Struct7BytesInt4ByteAligned a7, - Struct7BytesInt4ByteAligned a8, - Struct7BytesInt4ByteAligned a9) { - print( - "passStruct7BytesInt4ByteAlignedx10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct7BytesInt4ByteAlignedx10 throwing on purpose!"); - } - - passStruct7BytesInt4ByteAlignedx10_a0 = a0; - passStruct7BytesInt4ByteAlignedx10_a1 = a1; - passStruct7BytesInt4ByteAlignedx10_a2 = a2; - passStruct7BytesInt4ByteAlignedx10_a3 = a3; - passStruct7BytesInt4ByteAlignedx10_a4 = a4; - passStruct7BytesInt4ByteAlignedx10_a5 = a5; - passStruct7BytesInt4ByteAlignedx10_a6 = a6; - passStruct7BytesInt4ByteAlignedx10_a7 = a7; - passStruct7BytesInt4ByteAlignedx10_a8 = a8; - passStruct7BytesInt4ByteAlignedx10_a9 = a9; - - final result = passStruct7BytesInt4ByteAlignedx10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct7BytesInt4ByteAlignedx10AfterCallback() { - final result = passStruct7BytesInt4ByteAlignedx10CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(15, result); -} - -typedef PassStruct8BytesIntx10Type = Int64 Function( - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt); - -// Global variables to be able to test inputs after callback returned. -Struct8BytesInt passStruct8BytesIntx10_a0 = - Pointer.fromAddress(0).ref; -Struct8BytesInt passStruct8BytesIntx10_a1 = - Pointer.fromAddress(0).ref; -Struct8BytesInt passStruct8BytesIntx10_a2 = - Pointer.fromAddress(0).ref; -Struct8BytesInt passStruct8BytesIntx10_a3 = - Pointer.fromAddress(0).ref; -Struct8BytesInt passStruct8BytesIntx10_a4 = - Pointer.fromAddress(0).ref; -Struct8BytesInt passStruct8BytesIntx10_a5 = - Pointer.fromAddress(0).ref; -Struct8BytesInt passStruct8BytesIntx10_a6 = - Pointer.fromAddress(0).ref; -Struct8BytesInt passStruct8BytesIntx10_a7 = - Pointer.fromAddress(0).ref; -Struct8BytesInt passStruct8BytesIntx10_a8 = - Pointer.fromAddress(0).ref; -Struct8BytesInt passStruct8BytesIntx10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStruct8BytesIntx10Result = 0; - -int passStruct8BytesIntx10CalculateResult() { - int result = 0; - - result += passStruct8BytesIntx10_a0.a0; - result += passStruct8BytesIntx10_a0.a1; - result += passStruct8BytesIntx10_a0.a2; - result += passStruct8BytesIntx10_a1.a0; - result += passStruct8BytesIntx10_a1.a1; - result += passStruct8BytesIntx10_a1.a2; - result += passStruct8BytesIntx10_a2.a0; - result += passStruct8BytesIntx10_a2.a1; - result += passStruct8BytesIntx10_a2.a2; - result += passStruct8BytesIntx10_a3.a0; - result += passStruct8BytesIntx10_a3.a1; - result += passStruct8BytesIntx10_a3.a2; - result += passStruct8BytesIntx10_a4.a0; - result += passStruct8BytesIntx10_a4.a1; - result += passStruct8BytesIntx10_a4.a2; - result += passStruct8BytesIntx10_a5.a0; - result += passStruct8BytesIntx10_a5.a1; - result += passStruct8BytesIntx10_a5.a2; - result += passStruct8BytesIntx10_a6.a0; - result += passStruct8BytesIntx10_a6.a1; - result += passStruct8BytesIntx10_a6.a2; - result += passStruct8BytesIntx10_a7.a0; - result += passStruct8BytesIntx10_a7.a1; - result += passStruct8BytesIntx10_a7.a2; - result += passStruct8BytesIntx10_a8.a0; - result += passStruct8BytesIntx10_a8.a1; - result += passStruct8BytesIntx10_a8.a2; - result += passStruct8BytesIntx10_a9.a0; - result += passStruct8BytesIntx10_a9.a1; - result += passStruct8BytesIntx10_a9.a2; - - passStruct8BytesIntx10Result = result; - - return result; -} - -/// Exactly word size struct on 64bit architectures. -/// 10 struct arguments will exhaust available registers. -int passStruct8BytesIntx10( - Struct8BytesInt a0, - Struct8BytesInt a1, - Struct8BytesInt a2, - Struct8BytesInt a3, - Struct8BytesInt a4, - Struct8BytesInt a5, - Struct8BytesInt a6, - Struct8BytesInt a7, - Struct8BytesInt a8, - Struct8BytesInt a9) { - print( - "passStruct8BytesIntx10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct8BytesIntx10 throwing on purpose!"); - } - - passStruct8BytesIntx10_a0 = a0; - passStruct8BytesIntx10_a1 = a1; - passStruct8BytesIntx10_a2 = a2; - passStruct8BytesIntx10_a3 = a3; - passStruct8BytesIntx10_a4 = a4; - passStruct8BytesIntx10_a5 = a5; - passStruct8BytesIntx10_a6 = a6; - passStruct8BytesIntx10_a7 = a7; - passStruct8BytesIntx10_a8 = a8; - passStruct8BytesIntx10_a9 = a9; - - final result = passStruct8BytesIntx10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct8BytesIntx10AfterCallback() { - final result = passStruct8BytesIntx10CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(15, result); -} - -typedef PassStruct8BytesHomogeneousFloatx10Type = Float Function( - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat); - -// Global variables to be able to test inputs after callback returned. -Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a0 = - Pointer.fromAddress(0).ref; -Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a1 = - Pointer.fromAddress(0).ref; -Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a2 = - Pointer.fromAddress(0).ref; -Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a3 = - Pointer.fromAddress(0).ref; -Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a4 = - Pointer.fromAddress(0).ref; -Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a5 = - Pointer.fromAddress(0).ref; -Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a6 = - Pointer.fromAddress(0).ref; -Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a7 = - Pointer.fromAddress(0).ref; -Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a8 = - Pointer.fromAddress(0).ref; -Struct8BytesHomogeneousFloat passStruct8BytesHomogeneousFloatx10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passStruct8BytesHomogeneousFloatx10Result = 0.0; - -double passStruct8BytesHomogeneousFloatx10CalculateResult() { - double result = 0; - - result += passStruct8BytesHomogeneousFloatx10_a0.a0; - result += passStruct8BytesHomogeneousFloatx10_a0.a1; - result += passStruct8BytesHomogeneousFloatx10_a1.a0; - result += passStruct8BytesHomogeneousFloatx10_a1.a1; - result += passStruct8BytesHomogeneousFloatx10_a2.a0; - result += passStruct8BytesHomogeneousFloatx10_a2.a1; - result += passStruct8BytesHomogeneousFloatx10_a3.a0; - result += passStruct8BytesHomogeneousFloatx10_a3.a1; - result += passStruct8BytesHomogeneousFloatx10_a4.a0; - result += passStruct8BytesHomogeneousFloatx10_a4.a1; - result += passStruct8BytesHomogeneousFloatx10_a5.a0; - result += passStruct8BytesHomogeneousFloatx10_a5.a1; - result += passStruct8BytesHomogeneousFloatx10_a6.a0; - result += passStruct8BytesHomogeneousFloatx10_a6.a1; - result += passStruct8BytesHomogeneousFloatx10_a7.a0; - result += passStruct8BytesHomogeneousFloatx10_a7.a1; - result += passStruct8BytesHomogeneousFloatx10_a8.a0; - result += passStruct8BytesHomogeneousFloatx10_a8.a1; - result += passStruct8BytesHomogeneousFloatx10_a9.a0; - result += passStruct8BytesHomogeneousFloatx10_a9.a1; - - passStruct8BytesHomogeneousFloatx10Result = result; - - return result; -} - -/// Arguments passed in FP registers as long as they fit. -/// 10 struct arguments will exhaust available registers. -double passStruct8BytesHomogeneousFloatx10( - Struct8BytesHomogeneousFloat a0, - Struct8BytesHomogeneousFloat a1, - Struct8BytesHomogeneousFloat a2, - Struct8BytesHomogeneousFloat a3, - Struct8BytesHomogeneousFloat a4, - Struct8BytesHomogeneousFloat a5, - Struct8BytesHomogeneousFloat a6, - Struct8BytesHomogeneousFloat a7, - Struct8BytesHomogeneousFloat a8, - Struct8BytesHomogeneousFloat a9) { - print( - "passStruct8BytesHomogeneousFloatx10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct8BytesHomogeneousFloatx10 throwing on purpose!"); - } - - passStruct8BytesHomogeneousFloatx10_a0 = a0; - passStruct8BytesHomogeneousFloatx10_a1 = a1; - passStruct8BytesHomogeneousFloatx10_a2 = a2; - passStruct8BytesHomogeneousFloatx10_a3 = a3; - passStruct8BytesHomogeneousFloatx10_a4 = a4; - passStruct8BytesHomogeneousFloatx10_a5 = a5; - passStruct8BytesHomogeneousFloatx10_a6 = a6; - passStruct8BytesHomogeneousFloatx10_a7 = a7; - passStruct8BytesHomogeneousFloatx10_a8 = a8; - passStruct8BytesHomogeneousFloatx10_a9 = a9; - - final result = passStruct8BytesHomogeneousFloatx10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct8BytesHomogeneousFloatx10AfterCallback() { - final result = passStruct8BytesHomogeneousFloatx10CalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(10.0, result); -} - -typedef PassStruct8BytesMixedx10Type = Float Function( - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed); - -// Global variables to be able to test inputs after callback returned. -Struct8BytesMixed passStruct8BytesMixedx10_a0 = - Pointer.fromAddress(0).ref; -Struct8BytesMixed passStruct8BytesMixedx10_a1 = - Pointer.fromAddress(0).ref; -Struct8BytesMixed passStruct8BytesMixedx10_a2 = - Pointer.fromAddress(0).ref; -Struct8BytesMixed passStruct8BytesMixedx10_a3 = - Pointer.fromAddress(0).ref; -Struct8BytesMixed passStruct8BytesMixedx10_a4 = - Pointer.fromAddress(0).ref; -Struct8BytesMixed passStruct8BytesMixedx10_a5 = - Pointer.fromAddress(0).ref; -Struct8BytesMixed passStruct8BytesMixedx10_a6 = - Pointer.fromAddress(0).ref; -Struct8BytesMixed passStruct8BytesMixedx10_a7 = - Pointer.fromAddress(0).ref; -Struct8BytesMixed passStruct8BytesMixedx10_a8 = - Pointer.fromAddress(0).ref; -Struct8BytesMixed passStruct8BytesMixedx10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passStruct8BytesMixedx10Result = 0.0; - -double passStruct8BytesMixedx10CalculateResult() { - double result = 0; - - result += passStruct8BytesMixedx10_a0.a0; - result += passStruct8BytesMixedx10_a0.a1; - result += passStruct8BytesMixedx10_a0.a2; - result += passStruct8BytesMixedx10_a1.a0; - result += passStruct8BytesMixedx10_a1.a1; - result += passStruct8BytesMixedx10_a1.a2; - result += passStruct8BytesMixedx10_a2.a0; - result += passStruct8BytesMixedx10_a2.a1; - result += passStruct8BytesMixedx10_a2.a2; - result += passStruct8BytesMixedx10_a3.a0; - result += passStruct8BytesMixedx10_a3.a1; - result += passStruct8BytesMixedx10_a3.a2; - result += passStruct8BytesMixedx10_a4.a0; - result += passStruct8BytesMixedx10_a4.a1; - result += passStruct8BytesMixedx10_a4.a2; - result += passStruct8BytesMixedx10_a5.a0; - result += passStruct8BytesMixedx10_a5.a1; - result += passStruct8BytesMixedx10_a5.a2; - result += passStruct8BytesMixedx10_a6.a0; - result += passStruct8BytesMixedx10_a6.a1; - result += passStruct8BytesMixedx10_a6.a2; - result += passStruct8BytesMixedx10_a7.a0; - result += passStruct8BytesMixedx10_a7.a1; - result += passStruct8BytesMixedx10_a7.a2; - result += passStruct8BytesMixedx10_a8.a0; - result += passStruct8BytesMixedx10_a8.a1; - result += passStruct8BytesMixedx10_a8.a2; - result += passStruct8BytesMixedx10_a9.a0; - result += passStruct8BytesMixedx10_a9.a1; - result += passStruct8BytesMixedx10_a9.a2; - - passStruct8BytesMixedx10Result = result; - - return result; -} - -/// On x64, arguments go in int registers because it is not only float. -/// 10 struct arguments will exhaust available registers. -double passStruct8BytesMixedx10( - Struct8BytesMixed a0, - Struct8BytesMixed a1, - Struct8BytesMixed a2, - Struct8BytesMixed a3, - Struct8BytesMixed a4, - Struct8BytesMixed a5, - Struct8BytesMixed a6, - Struct8BytesMixed a7, - Struct8BytesMixed a8, - Struct8BytesMixed a9) { - print( - "passStruct8BytesMixedx10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct8BytesMixedx10 throwing on purpose!"); - } - - passStruct8BytesMixedx10_a0 = a0; - passStruct8BytesMixedx10_a1 = a1; - passStruct8BytesMixedx10_a2 = a2; - passStruct8BytesMixedx10_a3 = a3; - passStruct8BytesMixedx10_a4 = a4; - passStruct8BytesMixedx10_a5 = a5; - passStruct8BytesMixedx10_a6 = a6; - passStruct8BytesMixedx10_a7 = a7; - passStruct8BytesMixedx10_a8 = a8; - passStruct8BytesMixedx10_a9 = a9; - - final result = passStruct8BytesMixedx10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct8BytesMixedx10AfterCallback() { - final result = passStruct8BytesMixedx10CalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(15.0, result); -} - -typedef PassStruct9BytesHomogeneousUint8x10Type = Int64 Function( - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8); - -// Global variables to be able to test inputs after callback returned. -Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a0 = - Pointer.fromAddress(0).ref; -Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a1 = - Pointer.fromAddress(0).ref; -Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a2 = - Pointer.fromAddress(0).ref; -Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a3 = - Pointer.fromAddress(0).ref; -Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a4 = - Pointer.fromAddress(0).ref; -Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a5 = - Pointer.fromAddress(0).ref; -Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a6 = - Pointer.fromAddress(0).ref; -Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a7 = - Pointer.fromAddress(0).ref; -Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a8 = - Pointer.fromAddress(0).ref; -Struct9BytesHomogeneousUint8 passStruct9BytesHomogeneousUint8x10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStruct9BytesHomogeneousUint8x10Result = 0; - -int passStruct9BytesHomogeneousUint8x10CalculateResult() { - int result = 0; - - result += passStruct9BytesHomogeneousUint8x10_a0.a0; - result += passStruct9BytesHomogeneousUint8x10_a0.a1; - result += passStruct9BytesHomogeneousUint8x10_a0.a2; - result += passStruct9BytesHomogeneousUint8x10_a0.a3; - result += passStruct9BytesHomogeneousUint8x10_a0.a4; - result += passStruct9BytesHomogeneousUint8x10_a0.a5; - result += passStruct9BytesHomogeneousUint8x10_a0.a6; - result += passStruct9BytesHomogeneousUint8x10_a0.a7; - result += passStruct9BytesHomogeneousUint8x10_a0.a8; - result += passStruct9BytesHomogeneousUint8x10_a1.a0; - result += passStruct9BytesHomogeneousUint8x10_a1.a1; - result += passStruct9BytesHomogeneousUint8x10_a1.a2; - result += passStruct9BytesHomogeneousUint8x10_a1.a3; - result += passStruct9BytesHomogeneousUint8x10_a1.a4; - result += passStruct9BytesHomogeneousUint8x10_a1.a5; - result += passStruct9BytesHomogeneousUint8x10_a1.a6; - result += passStruct9BytesHomogeneousUint8x10_a1.a7; - result += passStruct9BytesHomogeneousUint8x10_a1.a8; - result += passStruct9BytesHomogeneousUint8x10_a2.a0; - result += passStruct9BytesHomogeneousUint8x10_a2.a1; - result += passStruct9BytesHomogeneousUint8x10_a2.a2; - result += passStruct9BytesHomogeneousUint8x10_a2.a3; - result += passStruct9BytesHomogeneousUint8x10_a2.a4; - result += passStruct9BytesHomogeneousUint8x10_a2.a5; - result += passStruct9BytesHomogeneousUint8x10_a2.a6; - result += passStruct9BytesHomogeneousUint8x10_a2.a7; - result += passStruct9BytesHomogeneousUint8x10_a2.a8; - result += passStruct9BytesHomogeneousUint8x10_a3.a0; - result += passStruct9BytesHomogeneousUint8x10_a3.a1; - result += passStruct9BytesHomogeneousUint8x10_a3.a2; - result += passStruct9BytesHomogeneousUint8x10_a3.a3; - result += passStruct9BytesHomogeneousUint8x10_a3.a4; - result += passStruct9BytesHomogeneousUint8x10_a3.a5; - result += passStruct9BytesHomogeneousUint8x10_a3.a6; - result += passStruct9BytesHomogeneousUint8x10_a3.a7; - result += passStruct9BytesHomogeneousUint8x10_a3.a8; - result += passStruct9BytesHomogeneousUint8x10_a4.a0; - result += passStruct9BytesHomogeneousUint8x10_a4.a1; - result += passStruct9BytesHomogeneousUint8x10_a4.a2; - result += passStruct9BytesHomogeneousUint8x10_a4.a3; - result += passStruct9BytesHomogeneousUint8x10_a4.a4; - result += passStruct9BytesHomogeneousUint8x10_a4.a5; - result += passStruct9BytesHomogeneousUint8x10_a4.a6; - result += passStruct9BytesHomogeneousUint8x10_a4.a7; - result += passStruct9BytesHomogeneousUint8x10_a4.a8; - result += passStruct9BytesHomogeneousUint8x10_a5.a0; - result += passStruct9BytesHomogeneousUint8x10_a5.a1; - result += passStruct9BytesHomogeneousUint8x10_a5.a2; - result += passStruct9BytesHomogeneousUint8x10_a5.a3; - result += passStruct9BytesHomogeneousUint8x10_a5.a4; - result += passStruct9BytesHomogeneousUint8x10_a5.a5; - result += passStruct9BytesHomogeneousUint8x10_a5.a6; - result += passStruct9BytesHomogeneousUint8x10_a5.a7; - result += passStruct9BytesHomogeneousUint8x10_a5.a8; - result += passStruct9BytesHomogeneousUint8x10_a6.a0; - result += passStruct9BytesHomogeneousUint8x10_a6.a1; - result += passStruct9BytesHomogeneousUint8x10_a6.a2; - result += passStruct9BytesHomogeneousUint8x10_a6.a3; - result += passStruct9BytesHomogeneousUint8x10_a6.a4; - result += passStruct9BytesHomogeneousUint8x10_a6.a5; - result += passStruct9BytesHomogeneousUint8x10_a6.a6; - result += passStruct9BytesHomogeneousUint8x10_a6.a7; - result += passStruct9BytesHomogeneousUint8x10_a6.a8; - result += passStruct9BytesHomogeneousUint8x10_a7.a0; - result += passStruct9BytesHomogeneousUint8x10_a7.a1; - result += passStruct9BytesHomogeneousUint8x10_a7.a2; - result += passStruct9BytesHomogeneousUint8x10_a7.a3; - result += passStruct9BytesHomogeneousUint8x10_a7.a4; - result += passStruct9BytesHomogeneousUint8x10_a7.a5; - result += passStruct9BytesHomogeneousUint8x10_a7.a6; - result += passStruct9BytesHomogeneousUint8x10_a7.a7; - result += passStruct9BytesHomogeneousUint8x10_a7.a8; - result += passStruct9BytesHomogeneousUint8x10_a8.a0; - result += passStruct9BytesHomogeneousUint8x10_a8.a1; - result += passStruct9BytesHomogeneousUint8x10_a8.a2; - result += passStruct9BytesHomogeneousUint8x10_a8.a3; - result += passStruct9BytesHomogeneousUint8x10_a8.a4; - result += passStruct9BytesHomogeneousUint8x10_a8.a5; - result += passStruct9BytesHomogeneousUint8x10_a8.a6; - result += passStruct9BytesHomogeneousUint8x10_a8.a7; - result += passStruct9BytesHomogeneousUint8x10_a8.a8; - result += passStruct9BytesHomogeneousUint8x10_a9.a0; - result += passStruct9BytesHomogeneousUint8x10_a9.a1; - result += passStruct9BytesHomogeneousUint8x10_a9.a2; - result += passStruct9BytesHomogeneousUint8x10_a9.a3; - result += passStruct9BytesHomogeneousUint8x10_a9.a4; - result += passStruct9BytesHomogeneousUint8x10_a9.a5; - result += passStruct9BytesHomogeneousUint8x10_a9.a6; - result += passStruct9BytesHomogeneousUint8x10_a9.a7; - result += passStruct9BytesHomogeneousUint8x10_a9.a8; - - passStruct9BytesHomogeneousUint8x10Result = result; - - return result; -} - -/// Argument is a single byte over a multiple of word size. -/// 10 struct arguments will exhaust available registers. -/// Struct only has 1-byte aligned fields to test struct alignment itself. -/// Tests upper bytes in the integer registers that are partly filled. -/// Tests stack alignment of non word size stack arguments. -int passStruct9BytesHomogeneousUint8x10( - Struct9BytesHomogeneousUint8 a0, - Struct9BytesHomogeneousUint8 a1, - Struct9BytesHomogeneousUint8 a2, - Struct9BytesHomogeneousUint8 a3, - Struct9BytesHomogeneousUint8 a4, - Struct9BytesHomogeneousUint8 a5, - Struct9BytesHomogeneousUint8 a6, - Struct9BytesHomogeneousUint8 a7, - Struct9BytesHomogeneousUint8 a8, - Struct9BytesHomogeneousUint8 a9) { - print( - "passStruct9BytesHomogeneousUint8x10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct9BytesHomogeneousUint8x10 throwing on purpose!"); - } - - passStruct9BytesHomogeneousUint8x10_a0 = a0; - passStruct9BytesHomogeneousUint8x10_a1 = a1; - passStruct9BytesHomogeneousUint8x10_a2 = a2; - passStruct9BytesHomogeneousUint8x10_a3 = a3; - passStruct9BytesHomogeneousUint8x10_a4 = a4; - passStruct9BytesHomogeneousUint8x10_a5 = a5; - passStruct9BytesHomogeneousUint8x10_a6 = a6; - passStruct9BytesHomogeneousUint8x10_a7 = a7; - passStruct9BytesHomogeneousUint8x10_a8 = a8; - passStruct9BytesHomogeneousUint8x10_a9 = a9; - - final result = passStruct9BytesHomogeneousUint8x10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct9BytesHomogeneousUint8x10AfterCallback() { - final result = passStruct9BytesHomogeneousUint8x10CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(4095, result); -} - -typedef PassStruct9BytesInt4Or8ByteAlignedx10Type = Int64 Function( - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned); - -// Global variables to be able to test inputs after callback returned. -Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a0 = - Pointer.fromAddress(0).ref; -Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a1 = - Pointer.fromAddress(0).ref; -Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a2 = - Pointer.fromAddress(0).ref; -Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a3 = - Pointer.fromAddress(0).ref; -Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a4 = - Pointer.fromAddress(0).ref; -Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a5 = - Pointer.fromAddress(0).ref; -Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a6 = - Pointer.fromAddress(0).ref; -Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a7 = - Pointer.fromAddress(0).ref; -Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a8 = - Pointer.fromAddress(0).ref; -Struct9BytesInt4Or8ByteAligned passStruct9BytesInt4Or8ByteAlignedx10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStruct9BytesInt4Or8ByteAlignedx10Result = 0; - -int passStruct9BytesInt4Or8ByteAlignedx10CalculateResult() { - int result = 0; - - result += passStruct9BytesInt4Or8ByteAlignedx10_a0.a0; - result += passStruct9BytesInt4Or8ByteAlignedx10_a0.a1; - result += passStruct9BytesInt4Or8ByteAlignedx10_a1.a0; - result += passStruct9BytesInt4Or8ByteAlignedx10_a1.a1; - result += passStruct9BytesInt4Or8ByteAlignedx10_a2.a0; - result += passStruct9BytesInt4Or8ByteAlignedx10_a2.a1; - result += passStruct9BytesInt4Or8ByteAlignedx10_a3.a0; - result += passStruct9BytesInt4Or8ByteAlignedx10_a3.a1; - result += passStruct9BytesInt4Or8ByteAlignedx10_a4.a0; - result += passStruct9BytesInt4Or8ByteAlignedx10_a4.a1; - result += passStruct9BytesInt4Or8ByteAlignedx10_a5.a0; - result += passStruct9BytesInt4Or8ByteAlignedx10_a5.a1; - result += passStruct9BytesInt4Or8ByteAlignedx10_a6.a0; - result += passStruct9BytesInt4Or8ByteAlignedx10_a6.a1; - result += passStruct9BytesInt4Or8ByteAlignedx10_a7.a0; - result += passStruct9BytesInt4Or8ByteAlignedx10_a7.a1; - result += passStruct9BytesInt4Or8ByteAlignedx10_a8.a0; - result += passStruct9BytesInt4Or8ByteAlignedx10_a8.a1; - result += passStruct9BytesInt4Or8ByteAlignedx10_a9.a0; - result += passStruct9BytesInt4Or8ByteAlignedx10_a9.a1; - - passStruct9BytesInt4Or8ByteAlignedx10Result = result; - - return result; -} - -/// Argument is a single byte over a multiple of word size. -/// With alignment rules taken into account size is 12 or 16 bytes. -/// 10 struct arguments will exhaust available registers. -/// -int passStruct9BytesInt4Or8ByteAlignedx10( - Struct9BytesInt4Or8ByteAligned a0, - Struct9BytesInt4Or8ByteAligned a1, - Struct9BytesInt4Or8ByteAligned a2, - Struct9BytesInt4Or8ByteAligned a3, - Struct9BytesInt4Or8ByteAligned a4, - Struct9BytesInt4Or8ByteAligned a5, - Struct9BytesInt4Or8ByteAligned a6, - Struct9BytesInt4Or8ByteAligned a7, - Struct9BytesInt4Or8ByteAligned a8, - Struct9BytesInt4Or8ByteAligned a9) { - print( - "passStruct9BytesInt4Or8ByteAlignedx10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception( - "PassStruct9BytesInt4Or8ByteAlignedx10 throwing on purpose!"); - } - - passStruct9BytesInt4Or8ByteAlignedx10_a0 = a0; - passStruct9BytesInt4Or8ByteAlignedx10_a1 = a1; - passStruct9BytesInt4Or8ByteAlignedx10_a2 = a2; - passStruct9BytesInt4Or8ByteAlignedx10_a3 = a3; - passStruct9BytesInt4Or8ByteAlignedx10_a4 = a4; - passStruct9BytesInt4Or8ByteAlignedx10_a5 = a5; - passStruct9BytesInt4Or8ByteAlignedx10_a6 = a6; - passStruct9BytesInt4Or8ByteAlignedx10_a7 = a7; - passStruct9BytesInt4Or8ByteAlignedx10_a8 = a8; - passStruct9BytesInt4Or8ByteAlignedx10_a9 = a9; - - final result = passStruct9BytesInt4Or8ByteAlignedx10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct9BytesInt4Or8ByteAlignedx10AfterCallback() { - final result = passStruct9BytesInt4Or8ByteAlignedx10CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(10, result); -} - -typedef PassStruct12BytesHomogeneousFloatx6Type = Float Function( - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat); - -// Global variables to be able to test inputs after callback returned. -Struct12BytesHomogeneousFloat passStruct12BytesHomogeneousFloatx6_a0 = - Pointer.fromAddress(0).ref; -Struct12BytesHomogeneousFloat passStruct12BytesHomogeneousFloatx6_a1 = - Pointer.fromAddress(0).ref; -Struct12BytesHomogeneousFloat passStruct12BytesHomogeneousFloatx6_a2 = - Pointer.fromAddress(0).ref; -Struct12BytesHomogeneousFloat passStruct12BytesHomogeneousFloatx6_a3 = - Pointer.fromAddress(0).ref; -Struct12BytesHomogeneousFloat passStruct12BytesHomogeneousFloatx6_a4 = - Pointer.fromAddress(0).ref; -Struct12BytesHomogeneousFloat passStruct12BytesHomogeneousFloatx6_a5 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passStruct12BytesHomogeneousFloatx6Result = 0.0; - -double passStruct12BytesHomogeneousFloatx6CalculateResult() { - double result = 0; - - result += passStruct12BytesHomogeneousFloatx6_a0.a0; - result += passStruct12BytesHomogeneousFloatx6_a0.a1; - result += passStruct12BytesHomogeneousFloatx6_a0.a2; - result += passStruct12BytesHomogeneousFloatx6_a1.a0; - result += passStruct12BytesHomogeneousFloatx6_a1.a1; - result += passStruct12BytesHomogeneousFloatx6_a1.a2; - result += passStruct12BytesHomogeneousFloatx6_a2.a0; - result += passStruct12BytesHomogeneousFloatx6_a2.a1; - result += passStruct12BytesHomogeneousFloatx6_a2.a2; - result += passStruct12BytesHomogeneousFloatx6_a3.a0; - result += passStruct12BytesHomogeneousFloatx6_a3.a1; - result += passStruct12BytesHomogeneousFloatx6_a3.a2; - result += passStruct12BytesHomogeneousFloatx6_a4.a0; - result += passStruct12BytesHomogeneousFloatx6_a4.a1; - result += passStruct12BytesHomogeneousFloatx6_a4.a2; - result += passStruct12BytesHomogeneousFloatx6_a5.a0; - result += passStruct12BytesHomogeneousFloatx6_a5.a1; - result += passStruct12BytesHomogeneousFloatx6_a5.a2; - - passStruct12BytesHomogeneousFloatx6Result = result; - - return result; -} - -/// Arguments in FPU registers on arm hardfp and arm64. -/// Struct arguments will exhaust available registers, and leave some empty. -/// The last argument is to test whether arguments are backfilled. -double passStruct12BytesHomogeneousFloatx6( - Struct12BytesHomogeneousFloat a0, - Struct12BytesHomogeneousFloat a1, - Struct12BytesHomogeneousFloat a2, - Struct12BytesHomogeneousFloat a3, - Struct12BytesHomogeneousFloat a4, - Struct12BytesHomogeneousFloat a5) { - print( - "passStruct12BytesHomogeneousFloatx6(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct12BytesHomogeneousFloatx6 throwing on purpose!"); - } - - passStruct12BytesHomogeneousFloatx6_a0 = a0; - passStruct12BytesHomogeneousFloatx6_a1 = a1; - passStruct12BytesHomogeneousFloatx6_a2 = a2; - passStruct12BytesHomogeneousFloatx6_a3 = a3; - passStruct12BytesHomogeneousFloatx6_a4 = a4; - passStruct12BytesHomogeneousFloatx6_a5 = a5; - - final result = passStruct12BytesHomogeneousFloatx6CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct12BytesHomogeneousFloatx6AfterCallback() { - final result = passStruct12BytesHomogeneousFloatx6CalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(9.0, result); -} - -typedef PassStruct16BytesHomogeneousFloatx5Type = Float Function( - Struct16BytesHomogeneousFloat, - Struct16BytesHomogeneousFloat, - Struct16BytesHomogeneousFloat, - Struct16BytesHomogeneousFloat, - Struct16BytesHomogeneousFloat); - -// Global variables to be able to test inputs after callback returned. -Struct16BytesHomogeneousFloat passStruct16BytesHomogeneousFloatx5_a0 = - Pointer.fromAddress(0).ref; -Struct16BytesHomogeneousFloat passStruct16BytesHomogeneousFloatx5_a1 = - Pointer.fromAddress(0).ref; -Struct16BytesHomogeneousFloat passStruct16BytesHomogeneousFloatx5_a2 = - Pointer.fromAddress(0).ref; -Struct16BytesHomogeneousFloat passStruct16BytesHomogeneousFloatx5_a3 = - Pointer.fromAddress(0).ref; -Struct16BytesHomogeneousFloat passStruct16BytesHomogeneousFloatx5_a4 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passStruct16BytesHomogeneousFloatx5Result = 0.0; - -double passStruct16BytesHomogeneousFloatx5CalculateResult() { - double result = 0; - - result += passStruct16BytesHomogeneousFloatx5_a0.a0; - result += passStruct16BytesHomogeneousFloatx5_a0.a1; - result += passStruct16BytesHomogeneousFloatx5_a0.a2; - result += passStruct16BytesHomogeneousFloatx5_a0.a3; - result += passStruct16BytesHomogeneousFloatx5_a1.a0; - result += passStruct16BytesHomogeneousFloatx5_a1.a1; - result += passStruct16BytesHomogeneousFloatx5_a1.a2; - result += passStruct16BytesHomogeneousFloatx5_a1.a3; - result += passStruct16BytesHomogeneousFloatx5_a2.a0; - result += passStruct16BytesHomogeneousFloatx5_a2.a1; - result += passStruct16BytesHomogeneousFloatx5_a2.a2; - result += passStruct16BytesHomogeneousFloatx5_a2.a3; - result += passStruct16BytesHomogeneousFloatx5_a3.a0; - result += passStruct16BytesHomogeneousFloatx5_a3.a1; - result += passStruct16BytesHomogeneousFloatx5_a3.a2; - result += passStruct16BytesHomogeneousFloatx5_a3.a3; - result += passStruct16BytesHomogeneousFloatx5_a4.a0; - result += passStruct16BytesHomogeneousFloatx5_a4.a1; - result += passStruct16BytesHomogeneousFloatx5_a4.a2; - result += passStruct16BytesHomogeneousFloatx5_a4.a3; - - passStruct16BytesHomogeneousFloatx5Result = result; - - return result; -} - -/// On Linux x64 argument is transferred on stack because it is over 16 bytes. -/// Arguments in FPU registers on arm hardfp and arm64. -/// 5 struct arguments will exhaust available registers. -double passStruct16BytesHomogeneousFloatx5( - Struct16BytesHomogeneousFloat a0, - Struct16BytesHomogeneousFloat a1, - Struct16BytesHomogeneousFloat a2, - Struct16BytesHomogeneousFloat a3, - Struct16BytesHomogeneousFloat a4) { - print( - "passStruct16BytesHomogeneousFloatx5(${a0}, ${a1}, ${a2}, ${a3}, ${a4})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct16BytesHomogeneousFloatx5 throwing on purpose!"); - } - - passStruct16BytesHomogeneousFloatx5_a0 = a0; - passStruct16BytesHomogeneousFloatx5_a1 = a1; - passStruct16BytesHomogeneousFloatx5_a2 = a2; - passStruct16BytesHomogeneousFloatx5_a3 = a3; - passStruct16BytesHomogeneousFloatx5_a4 = a4; - - final result = passStruct16BytesHomogeneousFloatx5CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct16BytesHomogeneousFloatx5AfterCallback() { - final result = passStruct16BytesHomogeneousFloatx5CalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(10.0, result); -} - -typedef PassStruct16BytesMixedx10Type = Double Function( - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed); - -// Global variables to be able to test inputs after callback returned. -Struct16BytesMixed passStruct16BytesMixedx10_a0 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed passStruct16BytesMixedx10_a1 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed passStruct16BytesMixedx10_a2 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed passStruct16BytesMixedx10_a3 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed passStruct16BytesMixedx10_a4 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed passStruct16BytesMixedx10_a5 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed passStruct16BytesMixedx10_a6 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed passStruct16BytesMixedx10_a7 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed passStruct16BytesMixedx10_a8 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed passStruct16BytesMixedx10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passStruct16BytesMixedx10Result = 0.0; - -double passStruct16BytesMixedx10CalculateResult() { - double result = 0; - - result += passStruct16BytesMixedx10_a0.a0; - result += passStruct16BytesMixedx10_a0.a1; - result += passStruct16BytesMixedx10_a1.a0; - result += passStruct16BytesMixedx10_a1.a1; - result += passStruct16BytesMixedx10_a2.a0; - result += passStruct16BytesMixedx10_a2.a1; - result += passStruct16BytesMixedx10_a3.a0; - result += passStruct16BytesMixedx10_a3.a1; - result += passStruct16BytesMixedx10_a4.a0; - result += passStruct16BytesMixedx10_a4.a1; - result += passStruct16BytesMixedx10_a5.a0; - result += passStruct16BytesMixedx10_a5.a1; - result += passStruct16BytesMixedx10_a6.a0; - result += passStruct16BytesMixedx10_a6.a1; - result += passStruct16BytesMixedx10_a7.a0; - result += passStruct16BytesMixedx10_a7.a1; - result += passStruct16BytesMixedx10_a8.a0; - result += passStruct16BytesMixedx10_a8.a1; - result += passStruct16BytesMixedx10_a9.a0; - result += passStruct16BytesMixedx10_a9.a1; - - passStruct16BytesMixedx10Result = result; - - return result; -} - -/// On x64, arguments are split over FP and int registers. -/// On x64, it will exhaust the integer registers with the 6th argument. -/// The rest goes on the stack. -/// On arm, arguments are 8 byte aligned. -double passStruct16BytesMixedx10( - Struct16BytesMixed a0, - Struct16BytesMixed a1, - Struct16BytesMixed a2, - Struct16BytesMixed a3, - Struct16BytesMixed a4, - Struct16BytesMixed a5, - Struct16BytesMixed a6, - Struct16BytesMixed a7, - Struct16BytesMixed a8, - Struct16BytesMixed a9) { - print( - "passStruct16BytesMixedx10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct16BytesMixedx10 throwing on purpose!"); - } - - passStruct16BytesMixedx10_a0 = a0; - passStruct16BytesMixedx10_a1 = a1; - passStruct16BytesMixedx10_a2 = a2; - passStruct16BytesMixedx10_a3 = a3; - passStruct16BytesMixedx10_a4 = a4; - passStruct16BytesMixedx10_a5 = a5; - passStruct16BytesMixedx10_a6 = a6; - passStruct16BytesMixedx10_a7 = a7; - passStruct16BytesMixedx10_a8 = a8; - passStruct16BytesMixedx10_a9 = a9; - - final result = passStruct16BytesMixedx10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct16BytesMixedx10AfterCallback() { - final result = passStruct16BytesMixedx10CalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(10.0, result); -} - -typedef PassStruct16BytesMixed2x10Type = Float Function( - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2); - -// Global variables to be able to test inputs after callback returned. -Struct16BytesMixed2 passStruct16BytesMixed2x10_a0 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed2 passStruct16BytesMixed2x10_a1 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed2 passStruct16BytesMixed2x10_a2 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed2 passStruct16BytesMixed2x10_a3 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed2 passStruct16BytesMixed2x10_a4 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed2 passStruct16BytesMixed2x10_a5 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed2 passStruct16BytesMixed2x10_a6 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed2 passStruct16BytesMixed2x10_a7 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed2 passStruct16BytesMixed2x10_a8 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed2 passStruct16BytesMixed2x10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passStruct16BytesMixed2x10Result = 0.0; - -double passStruct16BytesMixed2x10CalculateResult() { - double result = 0; - - result += passStruct16BytesMixed2x10_a0.a0; - result += passStruct16BytesMixed2x10_a0.a1; - result += passStruct16BytesMixed2x10_a0.a2; - result += passStruct16BytesMixed2x10_a0.a3; - result += passStruct16BytesMixed2x10_a1.a0; - result += passStruct16BytesMixed2x10_a1.a1; - result += passStruct16BytesMixed2x10_a1.a2; - result += passStruct16BytesMixed2x10_a1.a3; - result += passStruct16BytesMixed2x10_a2.a0; - result += passStruct16BytesMixed2x10_a2.a1; - result += passStruct16BytesMixed2x10_a2.a2; - result += passStruct16BytesMixed2x10_a2.a3; - result += passStruct16BytesMixed2x10_a3.a0; - result += passStruct16BytesMixed2x10_a3.a1; - result += passStruct16BytesMixed2x10_a3.a2; - result += passStruct16BytesMixed2x10_a3.a3; - result += passStruct16BytesMixed2x10_a4.a0; - result += passStruct16BytesMixed2x10_a4.a1; - result += passStruct16BytesMixed2x10_a4.a2; - result += passStruct16BytesMixed2x10_a4.a3; - result += passStruct16BytesMixed2x10_a5.a0; - result += passStruct16BytesMixed2x10_a5.a1; - result += passStruct16BytesMixed2x10_a5.a2; - result += passStruct16BytesMixed2x10_a5.a3; - result += passStruct16BytesMixed2x10_a6.a0; - result += passStruct16BytesMixed2x10_a6.a1; - result += passStruct16BytesMixed2x10_a6.a2; - result += passStruct16BytesMixed2x10_a6.a3; - result += passStruct16BytesMixed2x10_a7.a0; - result += passStruct16BytesMixed2x10_a7.a1; - result += passStruct16BytesMixed2x10_a7.a2; - result += passStruct16BytesMixed2x10_a7.a3; - result += passStruct16BytesMixed2x10_a8.a0; - result += passStruct16BytesMixed2x10_a8.a1; - result += passStruct16BytesMixed2x10_a8.a2; - result += passStruct16BytesMixed2x10_a8.a3; - result += passStruct16BytesMixed2x10_a9.a0; - result += passStruct16BytesMixed2x10_a9.a1; - result += passStruct16BytesMixed2x10_a9.a2; - result += passStruct16BytesMixed2x10_a9.a3; - - passStruct16BytesMixed2x10Result = result; - - return result; -} - -/// On x64, arguments are split over FP and int registers. -/// On x64, it will exhaust the integer registers with the 6th argument. -/// The rest goes on the stack. -/// On arm, arguments are 4 byte aligned. -double passStruct16BytesMixed2x10( - Struct16BytesMixed2 a0, - Struct16BytesMixed2 a1, - Struct16BytesMixed2 a2, - Struct16BytesMixed2 a3, - Struct16BytesMixed2 a4, - Struct16BytesMixed2 a5, - Struct16BytesMixed2 a6, - Struct16BytesMixed2 a7, - Struct16BytesMixed2 a8, - Struct16BytesMixed2 a9) { - print( - "passStruct16BytesMixed2x10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct16BytesMixed2x10 throwing on purpose!"); - } - - passStruct16BytesMixed2x10_a0 = a0; - passStruct16BytesMixed2x10_a1 = a1; - passStruct16BytesMixed2x10_a2 = a2; - passStruct16BytesMixed2x10_a3 = a3; - passStruct16BytesMixed2x10_a4 = a4; - passStruct16BytesMixed2x10_a5 = a5; - passStruct16BytesMixed2x10_a6 = a6; - passStruct16BytesMixed2x10_a7 = a7; - passStruct16BytesMixed2x10_a8 = a8; - passStruct16BytesMixed2x10_a9 = a9; - - final result = passStruct16BytesMixed2x10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct16BytesMixed2x10AfterCallback() { - final result = passStruct16BytesMixed2x10CalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(20.0, result); -} - -typedef PassStruct17BytesIntx10Type = Int64 Function( - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt); - -// Global variables to be able to test inputs after callback returned. -Struct17BytesInt passStruct17BytesIntx10_a0 = - Pointer.fromAddress(0).ref; -Struct17BytesInt passStruct17BytesIntx10_a1 = - Pointer.fromAddress(0).ref; -Struct17BytesInt passStruct17BytesIntx10_a2 = - Pointer.fromAddress(0).ref; -Struct17BytesInt passStruct17BytesIntx10_a3 = - Pointer.fromAddress(0).ref; -Struct17BytesInt passStruct17BytesIntx10_a4 = - Pointer.fromAddress(0).ref; -Struct17BytesInt passStruct17BytesIntx10_a5 = - Pointer.fromAddress(0).ref; -Struct17BytesInt passStruct17BytesIntx10_a6 = - Pointer.fromAddress(0).ref; -Struct17BytesInt passStruct17BytesIntx10_a7 = - Pointer.fromAddress(0).ref; -Struct17BytesInt passStruct17BytesIntx10_a8 = - Pointer.fromAddress(0).ref; -Struct17BytesInt passStruct17BytesIntx10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStruct17BytesIntx10Result = 0; - -int passStruct17BytesIntx10CalculateResult() { - int result = 0; - - result += passStruct17BytesIntx10_a0.a0; - result += passStruct17BytesIntx10_a0.a1; - result += passStruct17BytesIntx10_a0.a2; - result += passStruct17BytesIntx10_a1.a0; - result += passStruct17BytesIntx10_a1.a1; - result += passStruct17BytesIntx10_a1.a2; - result += passStruct17BytesIntx10_a2.a0; - result += passStruct17BytesIntx10_a2.a1; - result += passStruct17BytesIntx10_a2.a2; - result += passStruct17BytesIntx10_a3.a0; - result += passStruct17BytesIntx10_a3.a1; - result += passStruct17BytesIntx10_a3.a2; - result += passStruct17BytesIntx10_a4.a0; - result += passStruct17BytesIntx10_a4.a1; - result += passStruct17BytesIntx10_a4.a2; - result += passStruct17BytesIntx10_a5.a0; - result += passStruct17BytesIntx10_a5.a1; - result += passStruct17BytesIntx10_a5.a2; - result += passStruct17BytesIntx10_a6.a0; - result += passStruct17BytesIntx10_a6.a1; - result += passStruct17BytesIntx10_a6.a2; - result += passStruct17BytesIntx10_a7.a0; - result += passStruct17BytesIntx10_a7.a1; - result += passStruct17BytesIntx10_a7.a2; - result += passStruct17BytesIntx10_a8.a0; - result += passStruct17BytesIntx10_a8.a1; - result += passStruct17BytesIntx10_a8.a2; - result += passStruct17BytesIntx10_a9.a0; - result += passStruct17BytesIntx10_a9.a1; - result += passStruct17BytesIntx10_a9.a2; - - passStruct17BytesIntx10Result = result; - - return result; -} - -/// Arguments are passed as pointer to copy on arm64. -/// Tests that the memory allocated for copies are rounded up to word size. -int passStruct17BytesIntx10( - Struct17BytesInt a0, - Struct17BytesInt a1, - Struct17BytesInt a2, - Struct17BytesInt a3, - Struct17BytesInt a4, - Struct17BytesInt a5, - Struct17BytesInt a6, - Struct17BytesInt a7, - Struct17BytesInt a8, - Struct17BytesInt a9) { - print( - "passStruct17BytesIntx10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct17BytesIntx10 throwing on purpose!"); - } - - passStruct17BytesIntx10_a0 = a0; - passStruct17BytesIntx10_a1 = a1; - passStruct17BytesIntx10_a2 = a2; - passStruct17BytesIntx10_a3 = a3; - passStruct17BytesIntx10_a4 = a4; - passStruct17BytesIntx10_a5 = a5; - passStruct17BytesIntx10_a6 = a6; - passStruct17BytesIntx10_a7 = a7; - passStruct17BytesIntx10_a8 = a8; - passStruct17BytesIntx10_a9 = a9; - - final result = passStruct17BytesIntx10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct17BytesIntx10AfterCallback() { - final result = passStruct17BytesIntx10CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(15, result); -} - -typedef PassStruct19BytesHomogeneousUint8x10Type = Int64 Function( - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8); - -// Global variables to be able to test inputs after callback returned. -Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a0 = - Pointer.fromAddress(0).ref; -Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a1 = - Pointer.fromAddress(0).ref; -Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a2 = - Pointer.fromAddress(0).ref; -Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a3 = - Pointer.fromAddress(0).ref; -Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a4 = - Pointer.fromAddress(0).ref; -Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a5 = - Pointer.fromAddress(0).ref; -Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a6 = - Pointer.fromAddress(0).ref; -Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a7 = - Pointer.fromAddress(0).ref; -Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a8 = - Pointer.fromAddress(0).ref; -Struct19BytesHomogeneousUint8 passStruct19BytesHomogeneousUint8x10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStruct19BytesHomogeneousUint8x10Result = 0; - -int passStruct19BytesHomogeneousUint8x10CalculateResult() { - int result = 0; - - result += passStruct19BytesHomogeneousUint8x10_a0.a0; - result += passStruct19BytesHomogeneousUint8x10_a0.a1; - result += passStruct19BytesHomogeneousUint8x10_a0.a2; - result += passStruct19BytesHomogeneousUint8x10_a0.a3; - result += passStruct19BytesHomogeneousUint8x10_a0.a4; - result += passStruct19BytesHomogeneousUint8x10_a0.a5; - result += passStruct19BytesHomogeneousUint8x10_a0.a6; - result += passStruct19BytesHomogeneousUint8x10_a0.a7; - result += passStruct19BytesHomogeneousUint8x10_a0.a8; - result += passStruct19BytesHomogeneousUint8x10_a0.a9; - result += passStruct19BytesHomogeneousUint8x10_a0.a10; - result += passStruct19BytesHomogeneousUint8x10_a0.a11; - result += passStruct19BytesHomogeneousUint8x10_a0.a12; - result += passStruct19BytesHomogeneousUint8x10_a0.a13; - result += passStruct19BytesHomogeneousUint8x10_a0.a14; - result += passStruct19BytesHomogeneousUint8x10_a0.a15; - result += passStruct19BytesHomogeneousUint8x10_a0.a16; - result += passStruct19BytesHomogeneousUint8x10_a0.a17; - result += passStruct19BytesHomogeneousUint8x10_a0.a18; - result += passStruct19BytesHomogeneousUint8x10_a1.a0; - result += passStruct19BytesHomogeneousUint8x10_a1.a1; - result += passStruct19BytesHomogeneousUint8x10_a1.a2; - result += passStruct19BytesHomogeneousUint8x10_a1.a3; - result += passStruct19BytesHomogeneousUint8x10_a1.a4; - result += passStruct19BytesHomogeneousUint8x10_a1.a5; - result += passStruct19BytesHomogeneousUint8x10_a1.a6; - result += passStruct19BytesHomogeneousUint8x10_a1.a7; - result += passStruct19BytesHomogeneousUint8x10_a1.a8; - result += passStruct19BytesHomogeneousUint8x10_a1.a9; - result += passStruct19BytesHomogeneousUint8x10_a1.a10; - result += passStruct19BytesHomogeneousUint8x10_a1.a11; - result += passStruct19BytesHomogeneousUint8x10_a1.a12; - result += passStruct19BytesHomogeneousUint8x10_a1.a13; - result += passStruct19BytesHomogeneousUint8x10_a1.a14; - result += passStruct19BytesHomogeneousUint8x10_a1.a15; - result += passStruct19BytesHomogeneousUint8x10_a1.a16; - result += passStruct19BytesHomogeneousUint8x10_a1.a17; - result += passStruct19BytesHomogeneousUint8x10_a1.a18; - result += passStruct19BytesHomogeneousUint8x10_a2.a0; - result += passStruct19BytesHomogeneousUint8x10_a2.a1; - result += passStruct19BytesHomogeneousUint8x10_a2.a2; - result += passStruct19BytesHomogeneousUint8x10_a2.a3; - result += passStruct19BytesHomogeneousUint8x10_a2.a4; - result += passStruct19BytesHomogeneousUint8x10_a2.a5; - result += passStruct19BytesHomogeneousUint8x10_a2.a6; - result += passStruct19BytesHomogeneousUint8x10_a2.a7; - result += passStruct19BytesHomogeneousUint8x10_a2.a8; - result += passStruct19BytesHomogeneousUint8x10_a2.a9; - result += passStruct19BytesHomogeneousUint8x10_a2.a10; - result += passStruct19BytesHomogeneousUint8x10_a2.a11; - result += passStruct19BytesHomogeneousUint8x10_a2.a12; - result += passStruct19BytesHomogeneousUint8x10_a2.a13; - result += passStruct19BytesHomogeneousUint8x10_a2.a14; - result += passStruct19BytesHomogeneousUint8x10_a2.a15; - result += passStruct19BytesHomogeneousUint8x10_a2.a16; - result += passStruct19BytesHomogeneousUint8x10_a2.a17; - result += passStruct19BytesHomogeneousUint8x10_a2.a18; - result += passStruct19BytesHomogeneousUint8x10_a3.a0; - result += passStruct19BytesHomogeneousUint8x10_a3.a1; - result += passStruct19BytesHomogeneousUint8x10_a3.a2; - result += passStruct19BytesHomogeneousUint8x10_a3.a3; - result += passStruct19BytesHomogeneousUint8x10_a3.a4; - result += passStruct19BytesHomogeneousUint8x10_a3.a5; - result += passStruct19BytesHomogeneousUint8x10_a3.a6; - result += passStruct19BytesHomogeneousUint8x10_a3.a7; - result += passStruct19BytesHomogeneousUint8x10_a3.a8; - result += passStruct19BytesHomogeneousUint8x10_a3.a9; - result += passStruct19BytesHomogeneousUint8x10_a3.a10; - result += passStruct19BytesHomogeneousUint8x10_a3.a11; - result += passStruct19BytesHomogeneousUint8x10_a3.a12; - result += passStruct19BytesHomogeneousUint8x10_a3.a13; - result += passStruct19BytesHomogeneousUint8x10_a3.a14; - result += passStruct19BytesHomogeneousUint8x10_a3.a15; - result += passStruct19BytesHomogeneousUint8x10_a3.a16; - result += passStruct19BytesHomogeneousUint8x10_a3.a17; - result += passStruct19BytesHomogeneousUint8x10_a3.a18; - result += passStruct19BytesHomogeneousUint8x10_a4.a0; - result += passStruct19BytesHomogeneousUint8x10_a4.a1; - result += passStruct19BytesHomogeneousUint8x10_a4.a2; - result += passStruct19BytesHomogeneousUint8x10_a4.a3; - result += passStruct19BytesHomogeneousUint8x10_a4.a4; - result += passStruct19BytesHomogeneousUint8x10_a4.a5; - result += passStruct19BytesHomogeneousUint8x10_a4.a6; - result += passStruct19BytesHomogeneousUint8x10_a4.a7; - result += passStruct19BytesHomogeneousUint8x10_a4.a8; - result += passStruct19BytesHomogeneousUint8x10_a4.a9; - result += passStruct19BytesHomogeneousUint8x10_a4.a10; - result += passStruct19BytesHomogeneousUint8x10_a4.a11; - result += passStruct19BytesHomogeneousUint8x10_a4.a12; - result += passStruct19BytesHomogeneousUint8x10_a4.a13; - result += passStruct19BytesHomogeneousUint8x10_a4.a14; - result += passStruct19BytesHomogeneousUint8x10_a4.a15; - result += passStruct19BytesHomogeneousUint8x10_a4.a16; - result += passStruct19BytesHomogeneousUint8x10_a4.a17; - result += passStruct19BytesHomogeneousUint8x10_a4.a18; - result += passStruct19BytesHomogeneousUint8x10_a5.a0; - result += passStruct19BytesHomogeneousUint8x10_a5.a1; - result += passStruct19BytesHomogeneousUint8x10_a5.a2; - result += passStruct19BytesHomogeneousUint8x10_a5.a3; - result += passStruct19BytesHomogeneousUint8x10_a5.a4; - result += passStruct19BytesHomogeneousUint8x10_a5.a5; - result += passStruct19BytesHomogeneousUint8x10_a5.a6; - result += passStruct19BytesHomogeneousUint8x10_a5.a7; - result += passStruct19BytesHomogeneousUint8x10_a5.a8; - result += passStruct19BytesHomogeneousUint8x10_a5.a9; - result += passStruct19BytesHomogeneousUint8x10_a5.a10; - result += passStruct19BytesHomogeneousUint8x10_a5.a11; - result += passStruct19BytesHomogeneousUint8x10_a5.a12; - result += passStruct19BytesHomogeneousUint8x10_a5.a13; - result += passStruct19BytesHomogeneousUint8x10_a5.a14; - result += passStruct19BytesHomogeneousUint8x10_a5.a15; - result += passStruct19BytesHomogeneousUint8x10_a5.a16; - result += passStruct19BytesHomogeneousUint8x10_a5.a17; - result += passStruct19BytesHomogeneousUint8x10_a5.a18; - result += passStruct19BytesHomogeneousUint8x10_a6.a0; - result += passStruct19BytesHomogeneousUint8x10_a6.a1; - result += passStruct19BytesHomogeneousUint8x10_a6.a2; - result += passStruct19BytesHomogeneousUint8x10_a6.a3; - result += passStruct19BytesHomogeneousUint8x10_a6.a4; - result += passStruct19BytesHomogeneousUint8x10_a6.a5; - result += passStruct19BytesHomogeneousUint8x10_a6.a6; - result += passStruct19BytesHomogeneousUint8x10_a6.a7; - result += passStruct19BytesHomogeneousUint8x10_a6.a8; - result += passStruct19BytesHomogeneousUint8x10_a6.a9; - result += passStruct19BytesHomogeneousUint8x10_a6.a10; - result += passStruct19BytesHomogeneousUint8x10_a6.a11; - result += passStruct19BytesHomogeneousUint8x10_a6.a12; - result += passStruct19BytesHomogeneousUint8x10_a6.a13; - result += passStruct19BytesHomogeneousUint8x10_a6.a14; - result += passStruct19BytesHomogeneousUint8x10_a6.a15; - result += passStruct19BytesHomogeneousUint8x10_a6.a16; - result += passStruct19BytesHomogeneousUint8x10_a6.a17; - result += passStruct19BytesHomogeneousUint8x10_a6.a18; - result += passStruct19BytesHomogeneousUint8x10_a7.a0; - result += passStruct19BytesHomogeneousUint8x10_a7.a1; - result += passStruct19BytesHomogeneousUint8x10_a7.a2; - result += passStruct19BytesHomogeneousUint8x10_a7.a3; - result += passStruct19BytesHomogeneousUint8x10_a7.a4; - result += passStruct19BytesHomogeneousUint8x10_a7.a5; - result += passStruct19BytesHomogeneousUint8x10_a7.a6; - result += passStruct19BytesHomogeneousUint8x10_a7.a7; - result += passStruct19BytesHomogeneousUint8x10_a7.a8; - result += passStruct19BytesHomogeneousUint8x10_a7.a9; - result += passStruct19BytesHomogeneousUint8x10_a7.a10; - result += passStruct19BytesHomogeneousUint8x10_a7.a11; - result += passStruct19BytesHomogeneousUint8x10_a7.a12; - result += passStruct19BytesHomogeneousUint8x10_a7.a13; - result += passStruct19BytesHomogeneousUint8x10_a7.a14; - result += passStruct19BytesHomogeneousUint8x10_a7.a15; - result += passStruct19BytesHomogeneousUint8x10_a7.a16; - result += passStruct19BytesHomogeneousUint8x10_a7.a17; - result += passStruct19BytesHomogeneousUint8x10_a7.a18; - result += passStruct19BytesHomogeneousUint8x10_a8.a0; - result += passStruct19BytesHomogeneousUint8x10_a8.a1; - result += passStruct19BytesHomogeneousUint8x10_a8.a2; - result += passStruct19BytesHomogeneousUint8x10_a8.a3; - result += passStruct19BytesHomogeneousUint8x10_a8.a4; - result += passStruct19BytesHomogeneousUint8x10_a8.a5; - result += passStruct19BytesHomogeneousUint8x10_a8.a6; - result += passStruct19BytesHomogeneousUint8x10_a8.a7; - result += passStruct19BytesHomogeneousUint8x10_a8.a8; - result += passStruct19BytesHomogeneousUint8x10_a8.a9; - result += passStruct19BytesHomogeneousUint8x10_a8.a10; - result += passStruct19BytesHomogeneousUint8x10_a8.a11; - result += passStruct19BytesHomogeneousUint8x10_a8.a12; - result += passStruct19BytesHomogeneousUint8x10_a8.a13; - result += passStruct19BytesHomogeneousUint8x10_a8.a14; - result += passStruct19BytesHomogeneousUint8x10_a8.a15; - result += passStruct19BytesHomogeneousUint8x10_a8.a16; - result += passStruct19BytesHomogeneousUint8x10_a8.a17; - result += passStruct19BytesHomogeneousUint8x10_a8.a18; - result += passStruct19BytesHomogeneousUint8x10_a9.a0; - result += passStruct19BytesHomogeneousUint8x10_a9.a1; - result += passStruct19BytesHomogeneousUint8x10_a9.a2; - result += passStruct19BytesHomogeneousUint8x10_a9.a3; - result += passStruct19BytesHomogeneousUint8x10_a9.a4; - result += passStruct19BytesHomogeneousUint8x10_a9.a5; - result += passStruct19BytesHomogeneousUint8x10_a9.a6; - result += passStruct19BytesHomogeneousUint8x10_a9.a7; - result += passStruct19BytesHomogeneousUint8x10_a9.a8; - result += passStruct19BytesHomogeneousUint8x10_a9.a9; - result += passStruct19BytesHomogeneousUint8x10_a9.a10; - result += passStruct19BytesHomogeneousUint8x10_a9.a11; - result += passStruct19BytesHomogeneousUint8x10_a9.a12; - result += passStruct19BytesHomogeneousUint8x10_a9.a13; - result += passStruct19BytesHomogeneousUint8x10_a9.a14; - result += passStruct19BytesHomogeneousUint8x10_a9.a15; - result += passStruct19BytesHomogeneousUint8x10_a9.a16; - result += passStruct19BytesHomogeneousUint8x10_a9.a17; - result += passStruct19BytesHomogeneousUint8x10_a9.a18; - - passStruct19BytesHomogeneousUint8x10Result = result; - - return result; -} - -/// The minimum alignment of this struct is only 1 byte based on its fields. -/// Test that the memory backing these structs is extended to the right size. -/// -int passStruct19BytesHomogeneousUint8x10( - Struct19BytesHomogeneousUint8 a0, - Struct19BytesHomogeneousUint8 a1, - Struct19BytesHomogeneousUint8 a2, - Struct19BytesHomogeneousUint8 a3, - Struct19BytesHomogeneousUint8 a4, - Struct19BytesHomogeneousUint8 a5, - Struct19BytesHomogeneousUint8 a6, - Struct19BytesHomogeneousUint8 a7, - Struct19BytesHomogeneousUint8 a8, - Struct19BytesHomogeneousUint8 a9) { - print( - "passStruct19BytesHomogeneousUint8x10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception( - "PassStruct19BytesHomogeneousUint8x10 throwing on purpose!"); - } - - passStruct19BytesHomogeneousUint8x10_a0 = a0; - passStruct19BytesHomogeneousUint8x10_a1 = a1; - passStruct19BytesHomogeneousUint8x10_a2 = a2; - passStruct19BytesHomogeneousUint8x10_a3 = a3; - passStruct19BytesHomogeneousUint8x10_a4 = a4; - passStruct19BytesHomogeneousUint8x10_a5 = a5; - passStruct19BytesHomogeneousUint8x10_a6 = a6; - passStruct19BytesHomogeneousUint8x10_a7 = a7; - passStruct19BytesHomogeneousUint8x10_a8 = a8; - passStruct19BytesHomogeneousUint8x10_a9 = a9; - - final result = passStruct19BytesHomogeneousUint8x10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct19BytesHomogeneousUint8x10AfterCallback() { - final result = passStruct19BytesHomogeneousUint8x10CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(18145, result); -} - -typedef PassStruct20BytesHomogeneousInt32x10Type = Int32 Function( - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32); - -// Global variables to be able to test inputs after callback returned. -Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a0 = - Pointer.fromAddress(0).ref; -Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a1 = - Pointer.fromAddress(0).ref; -Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a2 = - Pointer.fromAddress(0).ref; -Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a3 = - Pointer.fromAddress(0).ref; -Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a4 = - Pointer.fromAddress(0).ref; -Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a5 = - Pointer.fromAddress(0).ref; -Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a6 = - Pointer.fromAddress(0).ref; -Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a7 = - Pointer.fromAddress(0).ref; -Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a8 = - Pointer.fromAddress(0).ref; -Struct20BytesHomogeneousInt32 passStruct20BytesHomogeneousInt32x10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStruct20BytesHomogeneousInt32x10Result = 0; - -int passStruct20BytesHomogeneousInt32x10CalculateResult() { - int result = 0; - - result += passStruct20BytesHomogeneousInt32x10_a0.a0; - result += passStruct20BytesHomogeneousInt32x10_a0.a1; - result += passStruct20BytesHomogeneousInt32x10_a0.a2; - result += passStruct20BytesHomogeneousInt32x10_a0.a3; - result += passStruct20BytesHomogeneousInt32x10_a0.a4; - result += passStruct20BytesHomogeneousInt32x10_a1.a0; - result += passStruct20BytesHomogeneousInt32x10_a1.a1; - result += passStruct20BytesHomogeneousInt32x10_a1.a2; - result += passStruct20BytesHomogeneousInt32x10_a1.a3; - result += passStruct20BytesHomogeneousInt32x10_a1.a4; - result += passStruct20BytesHomogeneousInt32x10_a2.a0; - result += passStruct20BytesHomogeneousInt32x10_a2.a1; - result += passStruct20BytesHomogeneousInt32x10_a2.a2; - result += passStruct20BytesHomogeneousInt32x10_a2.a3; - result += passStruct20BytesHomogeneousInt32x10_a2.a4; - result += passStruct20BytesHomogeneousInt32x10_a3.a0; - result += passStruct20BytesHomogeneousInt32x10_a3.a1; - result += passStruct20BytesHomogeneousInt32x10_a3.a2; - result += passStruct20BytesHomogeneousInt32x10_a3.a3; - result += passStruct20BytesHomogeneousInt32x10_a3.a4; - result += passStruct20BytesHomogeneousInt32x10_a4.a0; - result += passStruct20BytesHomogeneousInt32x10_a4.a1; - result += passStruct20BytesHomogeneousInt32x10_a4.a2; - result += passStruct20BytesHomogeneousInt32x10_a4.a3; - result += passStruct20BytesHomogeneousInt32x10_a4.a4; - result += passStruct20BytesHomogeneousInt32x10_a5.a0; - result += passStruct20BytesHomogeneousInt32x10_a5.a1; - result += passStruct20BytesHomogeneousInt32x10_a5.a2; - result += passStruct20BytesHomogeneousInt32x10_a5.a3; - result += passStruct20BytesHomogeneousInt32x10_a5.a4; - result += passStruct20BytesHomogeneousInt32x10_a6.a0; - result += passStruct20BytesHomogeneousInt32x10_a6.a1; - result += passStruct20BytesHomogeneousInt32x10_a6.a2; - result += passStruct20BytesHomogeneousInt32x10_a6.a3; - result += passStruct20BytesHomogeneousInt32x10_a6.a4; - result += passStruct20BytesHomogeneousInt32x10_a7.a0; - result += passStruct20BytesHomogeneousInt32x10_a7.a1; - result += passStruct20BytesHomogeneousInt32x10_a7.a2; - result += passStruct20BytesHomogeneousInt32x10_a7.a3; - result += passStruct20BytesHomogeneousInt32x10_a7.a4; - result += passStruct20BytesHomogeneousInt32x10_a8.a0; - result += passStruct20BytesHomogeneousInt32x10_a8.a1; - result += passStruct20BytesHomogeneousInt32x10_a8.a2; - result += passStruct20BytesHomogeneousInt32x10_a8.a3; - result += passStruct20BytesHomogeneousInt32x10_a8.a4; - result += passStruct20BytesHomogeneousInt32x10_a9.a0; - result += passStruct20BytesHomogeneousInt32x10_a9.a1; - result += passStruct20BytesHomogeneousInt32x10_a9.a2; - result += passStruct20BytesHomogeneousInt32x10_a9.a3; - result += passStruct20BytesHomogeneousInt32x10_a9.a4; - - passStruct20BytesHomogeneousInt32x10Result = result; - - return result; -} - -/// Argument too big to go into integer registers on arm64. -/// The arguments are passed as pointers to copies. -/// The amount of arguments exhausts the number of integer registers, such that -/// pointers to copies are also passed on the stack. -int passStruct20BytesHomogeneousInt32x10( - Struct20BytesHomogeneousInt32 a0, - Struct20BytesHomogeneousInt32 a1, - Struct20BytesHomogeneousInt32 a2, - Struct20BytesHomogeneousInt32 a3, - Struct20BytesHomogeneousInt32 a4, - Struct20BytesHomogeneousInt32 a5, - Struct20BytesHomogeneousInt32 a6, - Struct20BytesHomogeneousInt32 a7, - Struct20BytesHomogeneousInt32 a8, - Struct20BytesHomogeneousInt32 a9) { - print( - "passStruct20BytesHomogeneousInt32x10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception( - "PassStruct20BytesHomogeneousInt32x10 throwing on purpose!"); - } - - passStruct20BytesHomogeneousInt32x10_a0 = a0; - passStruct20BytesHomogeneousInt32x10_a1 = a1; - passStruct20BytesHomogeneousInt32x10_a2 = a2; - passStruct20BytesHomogeneousInt32x10_a3 = a3; - passStruct20BytesHomogeneousInt32x10_a4 = a4; - passStruct20BytesHomogeneousInt32x10_a5 = a5; - passStruct20BytesHomogeneousInt32x10_a6 = a6; - passStruct20BytesHomogeneousInt32x10_a7 = a7; - passStruct20BytesHomogeneousInt32x10_a8 = a8; - passStruct20BytesHomogeneousInt32x10_a9 = a9; - - final result = passStruct20BytesHomogeneousInt32x10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct20BytesHomogeneousInt32x10AfterCallback() { - final result = passStruct20BytesHomogeneousInt32x10CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(25, result); -} - -typedef PassStruct20BytesHomogeneousFloatType = Float Function( - Struct20BytesHomogeneousFloat); - -// Global variables to be able to test inputs after callback returned. -Struct20BytesHomogeneousFloat passStruct20BytesHomogeneousFloat_a0 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passStruct20BytesHomogeneousFloatResult = 0.0; - -double passStruct20BytesHomogeneousFloatCalculateResult() { - double result = 0; - - result += passStruct20BytesHomogeneousFloat_a0.a0; - result += passStruct20BytesHomogeneousFloat_a0.a1; - result += passStruct20BytesHomogeneousFloat_a0.a2; - result += passStruct20BytesHomogeneousFloat_a0.a3; - result += passStruct20BytesHomogeneousFloat_a0.a4; - - passStruct20BytesHomogeneousFloatResult = result; - - return result; -} - -/// Argument too big to go into FPU registers in hardfp and arm64. -double passStruct20BytesHomogeneousFloat(Struct20BytesHomogeneousFloat a0) { - print("passStruct20BytesHomogeneousFloat(${a0})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct20BytesHomogeneousFloat throwing on purpose!"); - } - - passStruct20BytesHomogeneousFloat_a0 = a0; - - final result = passStruct20BytesHomogeneousFloatCalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct20BytesHomogeneousFloatAfterCallback() { - final result = passStruct20BytesHomogeneousFloatCalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(-3.0, result); -} - -typedef PassStruct32BytesHomogeneousDoublex5Type = Double Function( - Struct32BytesHomogeneousDouble, - Struct32BytesHomogeneousDouble, - Struct32BytesHomogeneousDouble, - Struct32BytesHomogeneousDouble, - Struct32BytesHomogeneousDouble); - -// Global variables to be able to test inputs after callback returned. -Struct32BytesHomogeneousDouble passStruct32BytesHomogeneousDoublex5_a0 = - Pointer.fromAddress(0).ref; -Struct32BytesHomogeneousDouble passStruct32BytesHomogeneousDoublex5_a1 = - Pointer.fromAddress(0).ref; -Struct32BytesHomogeneousDouble passStruct32BytesHomogeneousDoublex5_a2 = - Pointer.fromAddress(0).ref; -Struct32BytesHomogeneousDouble passStruct32BytesHomogeneousDoublex5_a3 = - Pointer.fromAddress(0).ref; -Struct32BytesHomogeneousDouble passStruct32BytesHomogeneousDoublex5_a4 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passStruct32BytesHomogeneousDoublex5Result = 0.0; - -double passStruct32BytesHomogeneousDoublex5CalculateResult() { - double result = 0; - - result += passStruct32BytesHomogeneousDoublex5_a0.a0; - result += passStruct32BytesHomogeneousDoublex5_a0.a1; - result += passStruct32BytesHomogeneousDoublex5_a0.a2; - result += passStruct32BytesHomogeneousDoublex5_a0.a3; - result += passStruct32BytesHomogeneousDoublex5_a1.a0; - result += passStruct32BytesHomogeneousDoublex5_a1.a1; - result += passStruct32BytesHomogeneousDoublex5_a1.a2; - result += passStruct32BytesHomogeneousDoublex5_a1.a3; - result += passStruct32BytesHomogeneousDoublex5_a2.a0; - result += passStruct32BytesHomogeneousDoublex5_a2.a1; - result += passStruct32BytesHomogeneousDoublex5_a2.a2; - result += passStruct32BytesHomogeneousDoublex5_a2.a3; - result += passStruct32BytesHomogeneousDoublex5_a3.a0; - result += passStruct32BytesHomogeneousDoublex5_a3.a1; - result += passStruct32BytesHomogeneousDoublex5_a3.a2; - result += passStruct32BytesHomogeneousDoublex5_a3.a3; - result += passStruct32BytesHomogeneousDoublex5_a4.a0; - result += passStruct32BytesHomogeneousDoublex5_a4.a1; - result += passStruct32BytesHomogeneousDoublex5_a4.a2; - result += passStruct32BytesHomogeneousDoublex5_a4.a3; - - passStruct32BytesHomogeneousDoublex5Result = result; - - return result; -} - -/// Arguments in FPU registers on arm64. -/// 5 struct arguments will exhaust available registers. -double passStruct32BytesHomogeneousDoublex5( - Struct32BytesHomogeneousDouble a0, - Struct32BytesHomogeneousDouble a1, - Struct32BytesHomogeneousDouble a2, - Struct32BytesHomogeneousDouble a3, - Struct32BytesHomogeneousDouble a4) { - print( - "passStruct32BytesHomogeneousDoublex5(${a0}, ${a1}, ${a2}, ${a3}, ${a4})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception( - "PassStruct32BytesHomogeneousDoublex5 throwing on purpose!"); - } - - passStruct32BytesHomogeneousDoublex5_a0 = a0; - passStruct32BytesHomogeneousDoublex5_a1 = a1; - passStruct32BytesHomogeneousDoublex5_a2 = a2; - passStruct32BytesHomogeneousDoublex5_a3 = a3; - passStruct32BytesHomogeneousDoublex5_a4 = a4; - - final result = passStruct32BytesHomogeneousDoublex5CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct32BytesHomogeneousDoublex5AfterCallback() { - final result = passStruct32BytesHomogeneousDoublex5CalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(10.0, result); -} - -typedef PassStruct40BytesHomogeneousDoubleType = Double Function( - Struct40BytesHomogeneousDouble); - -// Global variables to be able to test inputs after callback returned. -Struct40BytesHomogeneousDouble passStruct40BytesHomogeneousDouble_a0 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passStruct40BytesHomogeneousDoubleResult = 0.0; - -double passStruct40BytesHomogeneousDoubleCalculateResult() { - double result = 0; - - result += passStruct40BytesHomogeneousDouble_a0.a0; - result += passStruct40BytesHomogeneousDouble_a0.a1; - result += passStruct40BytesHomogeneousDouble_a0.a2; - result += passStruct40BytesHomogeneousDouble_a0.a3; - result += passStruct40BytesHomogeneousDouble_a0.a4; - - passStruct40BytesHomogeneousDoubleResult = result; - - return result; -} - -/// Argument too big to go into FPU registers in arm64. -double passStruct40BytesHomogeneousDouble(Struct40BytesHomogeneousDouble a0) { - print("passStruct40BytesHomogeneousDouble(${a0})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct40BytesHomogeneousDouble throwing on purpose!"); - } - - passStruct40BytesHomogeneousDouble_a0 = a0; - - final result = passStruct40BytesHomogeneousDoubleCalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct40BytesHomogeneousDoubleAfterCallback() { - final result = passStruct40BytesHomogeneousDoubleCalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(-3.0, result); -} - -typedef PassStruct1024BytesHomogeneousUint64Type = Uint64 Function( - Struct1024BytesHomogeneousUint64); - -// Global variables to be able to test inputs after callback returned. -Struct1024BytesHomogeneousUint64 passStruct1024BytesHomogeneousUint64_a0 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStruct1024BytesHomogeneousUint64Result = 0; - -int passStruct1024BytesHomogeneousUint64CalculateResult() { - int result = 0; - - result += passStruct1024BytesHomogeneousUint64_a0.a0; - result += passStruct1024BytesHomogeneousUint64_a0.a1; - result += passStruct1024BytesHomogeneousUint64_a0.a2; - result += passStruct1024BytesHomogeneousUint64_a0.a3; - result += passStruct1024BytesHomogeneousUint64_a0.a4; - result += passStruct1024BytesHomogeneousUint64_a0.a5; - result += passStruct1024BytesHomogeneousUint64_a0.a6; - result += passStruct1024BytesHomogeneousUint64_a0.a7; - result += passStruct1024BytesHomogeneousUint64_a0.a8; - result += passStruct1024BytesHomogeneousUint64_a0.a9; - result += passStruct1024BytesHomogeneousUint64_a0.a10; - result += passStruct1024BytesHomogeneousUint64_a0.a11; - result += passStruct1024BytesHomogeneousUint64_a0.a12; - result += passStruct1024BytesHomogeneousUint64_a0.a13; - result += passStruct1024BytesHomogeneousUint64_a0.a14; - result += passStruct1024BytesHomogeneousUint64_a0.a15; - result += passStruct1024BytesHomogeneousUint64_a0.a16; - result += passStruct1024BytesHomogeneousUint64_a0.a17; - result += passStruct1024BytesHomogeneousUint64_a0.a18; - result += passStruct1024BytesHomogeneousUint64_a0.a19; - result += passStruct1024BytesHomogeneousUint64_a0.a20; - result += passStruct1024BytesHomogeneousUint64_a0.a21; - result += passStruct1024BytesHomogeneousUint64_a0.a22; - result += passStruct1024BytesHomogeneousUint64_a0.a23; - result += passStruct1024BytesHomogeneousUint64_a0.a24; - result += passStruct1024BytesHomogeneousUint64_a0.a25; - result += passStruct1024BytesHomogeneousUint64_a0.a26; - result += passStruct1024BytesHomogeneousUint64_a0.a27; - result += passStruct1024BytesHomogeneousUint64_a0.a28; - result += passStruct1024BytesHomogeneousUint64_a0.a29; - result += passStruct1024BytesHomogeneousUint64_a0.a30; - result += passStruct1024BytesHomogeneousUint64_a0.a31; - result += passStruct1024BytesHomogeneousUint64_a0.a32; - result += passStruct1024BytesHomogeneousUint64_a0.a33; - result += passStruct1024BytesHomogeneousUint64_a0.a34; - result += passStruct1024BytesHomogeneousUint64_a0.a35; - result += passStruct1024BytesHomogeneousUint64_a0.a36; - result += passStruct1024BytesHomogeneousUint64_a0.a37; - result += passStruct1024BytesHomogeneousUint64_a0.a38; - result += passStruct1024BytesHomogeneousUint64_a0.a39; - result += passStruct1024BytesHomogeneousUint64_a0.a40; - result += passStruct1024BytesHomogeneousUint64_a0.a41; - result += passStruct1024BytesHomogeneousUint64_a0.a42; - result += passStruct1024BytesHomogeneousUint64_a0.a43; - result += passStruct1024BytesHomogeneousUint64_a0.a44; - result += passStruct1024BytesHomogeneousUint64_a0.a45; - result += passStruct1024BytesHomogeneousUint64_a0.a46; - result += passStruct1024BytesHomogeneousUint64_a0.a47; - result += passStruct1024BytesHomogeneousUint64_a0.a48; - result += passStruct1024BytesHomogeneousUint64_a0.a49; - result += passStruct1024BytesHomogeneousUint64_a0.a50; - result += passStruct1024BytesHomogeneousUint64_a0.a51; - result += passStruct1024BytesHomogeneousUint64_a0.a52; - result += passStruct1024BytesHomogeneousUint64_a0.a53; - result += passStruct1024BytesHomogeneousUint64_a0.a54; - result += passStruct1024BytesHomogeneousUint64_a0.a55; - result += passStruct1024BytesHomogeneousUint64_a0.a56; - result += passStruct1024BytesHomogeneousUint64_a0.a57; - result += passStruct1024BytesHomogeneousUint64_a0.a58; - result += passStruct1024BytesHomogeneousUint64_a0.a59; - result += passStruct1024BytesHomogeneousUint64_a0.a60; - result += passStruct1024BytesHomogeneousUint64_a0.a61; - result += passStruct1024BytesHomogeneousUint64_a0.a62; - result += passStruct1024BytesHomogeneousUint64_a0.a63; - result += passStruct1024BytesHomogeneousUint64_a0.a64; - result += passStruct1024BytesHomogeneousUint64_a0.a65; - result += passStruct1024BytesHomogeneousUint64_a0.a66; - result += passStruct1024BytesHomogeneousUint64_a0.a67; - result += passStruct1024BytesHomogeneousUint64_a0.a68; - result += passStruct1024BytesHomogeneousUint64_a0.a69; - result += passStruct1024BytesHomogeneousUint64_a0.a70; - result += passStruct1024BytesHomogeneousUint64_a0.a71; - result += passStruct1024BytesHomogeneousUint64_a0.a72; - result += passStruct1024BytesHomogeneousUint64_a0.a73; - result += passStruct1024BytesHomogeneousUint64_a0.a74; - result += passStruct1024BytesHomogeneousUint64_a0.a75; - result += passStruct1024BytesHomogeneousUint64_a0.a76; - result += passStruct1024BytesHomogeneousUint64_a0.a77; - result += passStruct1024BytesHomogeneousUint64_a0.a78; - result += passStruct1024BytesHomogeneousUint64_a0.a79; - result += passStruct1024BytesHomogeneousUint64_a0.a80; - result += passStruct1024BytesHomogeneousUint64_a0.a81; - result += passStruct1024BytesHomogeneousUint64_a0.a82; - result += passStruct1024BytesHomogeneousUint64_a0.a83; - result += passStruct1024BytesHomogeneousUint64_a0.a84; - result += passStruct1024BytesHomogeneousUint64_a0.a85; - result += passStruct1024BytesHomogeneousUint64_a0.a86; - result += passStruct1024BytesHomogeneousUint64_a0.a87; - result += passStruct1024BytesHomogeneousUint64_a0.a88; - result += passStruct1024BytesHomogeneousUint64_a0.a89; - result += passStruct1024BytesHomogeneousUint64_a0.a90; - result += passStruct1024BytesHomogeneousUint64_a0.a91; - result += passStruct1024BytesHomogeneousUint64_a0.a92; - result += passStruct1024BytesHomogeneousUint64_a0.a93; - result += passStruct1024BytesHomogeneousUint64_a0.a94; - result += passStruct1024BytesHomogeneousUint64_a0.a95; - result += passStruct1024BytesHomogeneousUint64_a0.a96; - result += passStruct1024BytesHomogeneousUint64_a0.a97; - result += passStruct1024BytesHomogeneousUint64_a0.a98; - result += passStruct1024BytesHomogeneousUint64_a0.a99; - result += passStruct1024BytesHomogeneousUint64_a0.a100; - result += passStruct1024BytesHomogeneousUint64_a0.a101; - result += passStruct1024BytesHomogeneousUint64_a0.a102; - result += passStruct1024BytesHomogeneousUint64_a0.a103; - result += passStruct1024BytesHomogeneousUint64_a0.a104; - result += passStruct1024BytesHomogeneousUint64_a0.a105; - result += passStruct1024BytesHomogeneousUint64_a0.a106; - result += passStruct1024BytesHomogeneousUint64_a0.a107; - result += passStruct1024BytesHomogeneousUint64_a0.a108; - result += passStruct1024BytesHomogeneousUint64_a0.a109; - result += passStruct1024BytesHomogeneousUint64_a0.a110; - result += passStruct1024BytesHomogeneousUint64_a0.a111; - result += passStruct1024BytesHomogeneousUint64_a0.a112; - result += passStruct1024BytesHomogeneousUint64_a0.a113; - result += passStruct1024BytesHomogeneousUint64_a0.a114; - result += passStruct1024BytesHomogeneousUint64_a0.a115; - result += passStruct1024BytesHomogeneousUint64_a0.a116; - result += passStruct1024BytesHomogeneousUint64_a0.a117; - result += passStruct1024BytesHomogeneousUint64_a0.a118; - result += passStruct1024BytesHomogeneousUint64_a0.a119; - result += passStruct1024BytesHomogeneousUint64_a0.a120; - result += passStruct1024BytesHomogeneousUint64_a0.a121; - result += passStruct1024BytesHomogeneousUint64_a0.a122; - result += passStruct1024BytesHomogeneousUint64_a0.a123; - result += passStruct1024BytesHomogeneousUint64_a0.a124; - result += passStruct1024BytesHomogeneousUint64_a0.a125; - result += passStruct1024BytesHomogeneousUint64_a0.a126; - result += passStruct1024BytesHomogeneousUint64_a0.a127; - - passStruct1024BytesHomogeneousUint64Result = result; - - return result; -} - -/// Test 1kb struct. -int passStruct1024BytesHomogeneousUint64(Struct1024BytesHomogeneousUint64 a0) { - print("passStruct1024BytesHomogeneousUint64(${a0})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception( - "PassStruct1024BytesHomogeneousUint64 throwing on purpose!"); - } - - passStruct1024BytesHomogeneousUint64_a0 = a0; - - final result = passStruct1024BytesHomogeneousUint64CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct1024BytesHomogeneousUint64AfterCallback() { - final result = passStruct1024BytesHomogeneousUint64CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(8256, result); -} - -typedef PassFloatStruct16BytesHomogeneousFloatFloatStruct1Type = Float Function( - Float, - Struct16BytesHomogeneousFloat, - Float, - Struct16BytesHomogeneousFloat, - Float, - Struct16BytesHomogeneousFloat, - Float, - Struct16BytesHomogeneousFloat, - Float); - -// Global variables to be able to test inputs after callback returned. -double passFloatStruct16BytesHomogeneousFloatFloatStruct1_a0 = 0.0; -Struct16BytesHomogeneousFloat - passFloatStruct16BytesHomogeneousFloatFloatStruct1_a1 = - Pointer.fromAddress(0).ref; -double passFloatStruct16BytesHomogeneousFloatFloatStruct1_a2 = 0.0; -Struct16BytesHomogeneousFloat - passFloatStruct16BytesHomogeneousFloatFloatStruct1_a3 = - Pointer.fromAddress(0).ref; -double passFloatStruct16BytesHomogeneousFloatFloatStruct1_a4 = 0.0; -Struct16BytesHomogeneousFloat - passFloatStruct16BytesHomogeneousFloatFloatStruct1_a5 = - Pointer.fromAddress(0).ref; -double passFloatStruct16BytesHomogeneousFloatFloatStruct1_a6 = 0.0; -Struct16BytesHomogeneousFloat - passFloatStruct16BytesHomogeneousFloatFloatStruct1_a7 = - Pointer.fromAddress(0).ref; -double passFloatStruct16BytesHomogeneousFloatFloatStruct1_a8 = 0.0; - -// Result variable also global, so we can delete it after the callback. -double passFloatStruct16BytesHomogeneousFloatFloatStruct1Result = 0.0; - -double passFloatStruct16BytesHomogeneousFloatFloatStruct1CalculateResult() { - double result = 0; - - result += passFloatStruct16BytesHomogeneousFloatFloatStruct1_a0; - result += passFloatStruct16BytesHomogeneousFloatFloatStruct1_a1.a0; - result += passFloatStruct16BytesHomogeneousFloatFloatStruct1_a1.a1; - result += passFloatStruct16BytesHomogeneousFloatFloatStruct1_a1.a2; - result += passFloatStruct16BytesHomogeneousFloatFloatStruct1_a1.a3; - result += passFloatStruct16BytesHomogeneousFloatFloatStruct1_a2; - result += passFloatStruct16BytesHomogeneousFloatFloatStruct1_a3.a0; - result += passFloatStruct16BytesHomogeneousFloatFloatStruct1_a3.a1; - result += passFloatStruct16BytesHomogeneousFloatFloatStruct1_a3.a2; - result += passFloatStruct16BytesHomogeneousFloatFloatStruct1_a3.a3; - result += passFloatStruct16BytesHomogeneousFloatFloatStruct1_a4; - result += passFloatStruct16BytesHomogeneousFloatFloatStruct1_a5.a0; - result += passFloatStruct16BytesHomogeneousFloatFloatStruct1_a5.a1; - result += passFloatStruct16BytesHomogeneousFloatFloatStruct1_a5.a2; - result += passFloatStruct16BytesHomogeneousFloatFloatStruct1_a5.a3; - result += passFloatStruct16BytesHomogeneousFloatFloatStruct1_a6; - result += passFloatStruct16BytesHomogeneousFloatFloatStruct1_a7.a0; - result += passFloatStruct16BytesHomogeneousFloatFloatStruct1_a7.a1; - result += passFloatStruct16BytesHomogeneousFloatFloatStruct1_a7.a2; - result += passFloatStruct16BytesHomogeneousFloatFloatStruct1_a7.a3; - result += passFloatStruct16BytesHomogeneousFloatFloatStruct1_a8; - - passFloatStruct16BytesHomogeneousFloatFloatStruct1Result = result; - - return result; -} - -/// Tests the alignment of structs in FPU registers and backfilling. -double passFloatStruct16BytesHomogeneousFloatFloatStruct1( - double a0, - Struct16BytesHomogeneousFloat a1, - double a2, - Struct16BytesHomogeneousFloat a3, - double a4, - Struct16BytesHomogeneousFloat a5, - double a6, - Struct16BytesHomogeneousFloat a7, - double a8) { - print( - "passFloatStruct16BytesHomogeneousFloatFloatStruct1(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception( - "PassFloatStruct16BytesHomogeneousFloatFloatStruct1 throwing on purpose!"); - } - - passFloatStruct16BytesHomogeneousFloatFloatStruct1_a0 = a0; - passFloatStruct16BytesHomogeneousFloatFloatStruct1_a1 = a1; - passFloatStruct16BytesHomogeneousFloatFloatStruct1_a2 = a2; - passFloatStruct16BytesHomogeneousFloatFloatStruct1_a3 = a3; - passFloatStruct16BytesHomogeneousFloatFloatStruct1_a4 = a4; - passFloatStruct16BytesHomogeneousFloatFloatStruct1_a5 = a5; - passFloatStruct16BytesHomogeneousFloatFloatStruct1_a6 = a6; - passFloatStruct16BytesHomogeneousFloatFloatStruct1_a7 = a7; - passFloatStruct16BytesHomogeneousFloatFloatStruct1_a8 = a8; - - final result = - passFloatStruct16BytesHomogeneousFloatFloatStruct1CalculateResult(); - - print("result = $result"); - - return result; -} - -void passFloatStruct16BytesHomogeneousFloatFloatStruct1AfterCallback() { - final result = - passFloatStruct16BytesHomogeneousFloatFloatStruct1CalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(-11.0, result); -} - -typedef PassFloatStruct32BytesHomogeneousDoubleFloatStructType - = Double Function( - Float, - Struct32BytesHomogeneousDouble, - Float, - Struct32BytesHomogeneousDouble, - Float, - Struct32BytesHomogeneousDouble, - Float, - Struct32BytesHomogeneousDouble, - Float); - -// Global variables to be able to test inputs after callback returned. -double passFloatStruct32BytesHomogeneousDoubleFloatStruct_a0 = 0.0; -Struct32BytesHomogeneousDouble - passFloatStruct32BytesHomogeneousDoubleFloatStruct_a1 = - Pointer.fromAddress(0).ref; -double passFloatStruct32BytesHomogeneousDoubleFloatStruct_a2 = 0.0; -Struct32BytesHomogeneousDouble - passFloatStruct32BytesHomogeneousDoubleFloatStruct_a3 = - Pointer.fromAddress(0).ref; -double passFloatStruct32BytesHomogeneousDoubleFloatStruct_a4 = 0.0; -Struct32BytesHomogeneousDouble - passFloatStruct32BytesHomogeneousDoubleFloatStruct_a5 = - Pointer.fromAddress(0).ref; -double passFloatStruct32BytesHomogeneousDoubleFloatStruct_a6 = 0.0; -Struct32BytesHomogeneousDouble - passFloatStruct32BytesHomogeneousDoubleFloatStruct_a7 = - Pointer.fromAddress(0).ref; -double passFloatStruct32BytesHomogeneousDoubleFloatStruct_a8 = 0.0; - -// Result variable also global, so we can delete it after the callback. -double passFloatStruct32BytesHomogeneousDoubleFloatStructResult = 0.0; - -double passFloatStruct32BytesHomogeneousDoubleFloatStructCalculateResult() { - double result = 0; - - result += passFloatStruct32BytesHomogeneousDoubleFloatStruct_a0; - result += passFloatStruct32BytesHomogeneousDoubleFloatStruct_a1.a0; - result += passFloatStruct32BytesHomogeneousDoubleFloatStruct_a1.a1; - result += passFloatStruct32BytesHomogeneousDoubleFloatStruct_a1.a2; - result += passFloatStruct32BytesHomogeneousDoubleFloatStruct_a1.a3; - result += passFloatStruct32BytesHomogeneousDoubleFloatStruct_a2; - result += passFloatStruct32BytesHomogeneousDoubleFloatStruct_a3.a0; - result += passFloatStruct32BytesHomogeneousDoubleFloatStruct_a3.a1; - result += passFloatStruct32BytesHomogeneousDoubleFloatStruct_a3.a2; - result += passFloatStruct32BytesHomogeneousDoubleFloatStruct_a3.a3; - result += passFloatStruct32BytesHomogeneousDoubleFloatStruct_a4; - result += passFloatStruct32BytesHomogeneousDoubleFloatStruct_a5.a0; - result += passFloatStruct32BytesHomogeneousDoubleFloatStruct_a5.a1; - result += passFloatStruct32BytesHomogeneousDoubleFloatStruct_a5.a2; - result += passFloatStruct32BytesHomogeneousDoubleFloatStruct_a5.a3; - result += passFloatStruct32BytesHomogeneousDoubleFloatStruct_a6; - result += passFloatStruct32BytesHomogeneousDoubleFloatStruct_a7.a0; - result += passFloatStruct32BytesHomogeneousDoubleFloatStruct_a7.a1; - result += passFloatStruct32BytesHomogeneousDoubleFloatStruct_a7.a2; - result += passFloatStruct32BytesHomogeneousDoubleFloatStruct_a7.a3; - result += passFloatStruct32BytesHomogeneousDoubleFloatStruct_a8; - - passFloatStruct32BytesHomogeneousDoubleFloatStructResult = result; - - return result; -} - -/// Tests the alignment of structs in FPU registers and backfilling. -double passFloatStruct32BytesHomogeneousDoubleFloatStruct( - double a0, - Struct32BytesHomogeneousDouble a1, - double a2, - Struct32BytesHomogeneousDouble a3, - double a4, - Struct32BytesHomogeneousDouble a5, - double a6, - Struct32BytesHomogeneousDouble a7, - double a8) { - print( - "passFloatStruct32BytesHomogeneousDoubleFloatStruct(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception( - "PassFloatStruct32BytesHomogeneousDoubleFloatStruct throwing on purpose!"); - } - - passFloatStruct32BytesHomogeneousDoubleFloatStruct_a0 = a0; - passFloatStruct32BytesHomogeneousDoubleFloatStruct_a1 = a1; - passFloatStruct32BytesHomogeneousDoubleFloatStruct_a2 = a2; - passFloatStruct32BytesHomogeneousDoubleFloatStruct_a3 = a3; - passFloatStruct32BytesHomogeneousDoubleFloatStruct_a4 = a4; - passFloatStruct32BytesHomogeneousDoubleFloatStruct_a5 = a5; - passFloatStruct32BytesHomogeneousDoubleFloatStruct_a6 = a6; - passFloatStruct32BytesHomogeneousDoubleFloatStruct_a7 = a7; - passFloatStruct32BytesHomogeneousDoubleFloatStruct_a8 = a8; - - final result = - passFloatStruct32BytesHomogeneousDoubleFloatStructCalculateResult(); - - print("result = $result"); - - return result; -} - -void passFloatStruct32BytesHomogeneousDoubleFloatStructAfterCallback() { - final result = - passFloatStruct32BytesHomogeneousDoubleFloatStructCalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(-11.0, result); -} - -typedef PassInt8Struct16BytesMixedInt8Struct16BytesMixedInType - = Double Function(Int8, Struct16BytesMixed, Int8, Struct16BytesMixed, Int8, - Struct16BytesMixed, Int8, Struct16BytesMixed, Int8); - -// Global variables to be able to test inputs after callback returned. -int passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a0 = 0; -Struct16BytesMixed passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a1 = - Pointer.fromAddress(0).ref; -int passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a2 = 0; -Struct16BytesMixed passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a3 = - Pointer.fromAddress(0).ref; -int passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a4 = 0; -Struct16BytesMixed passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a5 = - Pointer.fromAddress(0).ref; -int passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a6 = 0; -Struct16BytesMixed passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a7 = - Pointer.fromAddress(0).ref; -int passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a8 = 0; - -// Result variable also global, so we can delete it after the callback. -double passInt8Struct16BytesMixedInt8Struct16BytesMixedInResult = 0.0; - -double passInt8Struct16BytesMixedInt8Struct16BytesMixedInCalculateResult() { - double result = 0; - - result += passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a0; - result += passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a1.a0; - result += passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a1.a1; - result += passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a2; - result += passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a3.a0; - result += passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a3.a1; - result += passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a4; - result += passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a5.a0; - result += passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a5.a1; - result += passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a6; - result += passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a7.a0; - result += passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a7.a1; - result += passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a8; - - passInt8Struct16BytesMixedInt8Struct16BytesMixedInResult = result; - - return result; -} - -/// Tests the alignment of structs in integers registers and on the stack. -/// Arm32 aligns this struct at 8. -/// Also, arm32 allocates the second struct partially in registers, partially -/// on stack. -/// Test backfilling of integer registers. -double passInt8Struct16BytesMixedInt8Struct16BytesMixedIn( - int a0, - Struct16BytesMixed a1, - int a2, - Struct16BytesMixed a3, - int a4, - Struct16BytesMixed a5, - int a6, - Struct16BytesMixed a7, - int a8) { - print( - "passInt8Struct16BytesMixedInt8Struct16BytesMixedIn(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception( - "PassInt8Struct16BytesMixedInt8Struct16BytesMixedIn throwing on purpose!"); - } - - passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a0 = a0; - passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a1 = a1; - passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a2 = a2; - passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a3 = a3; - passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a4 = a4; - passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a5 = a5; - passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a6 = a6; - passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a7 = a7; - passInt8Struct16BytesMixedInt8Struct16BytesMixedIn_a8 = a8; - - final result = - passInt8Struct16BytesMixedInt8Struct16BytesMixedInCalculateResult(); - - print("result = $result"); - - return result; -} - -void passInt8Struct16BytesMixedInt8Struct16BytesMixedInAfterCallback() { - final result = - passInt8Struct16BytesMixedInt8Struct16BytesMixedInCalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(-7.0, result); -} - -typedef PassDoublex6Struct16BytesMixedx4Int32Type = Double Function( - Double, - Double, - Double, - Double, - Double, - Double, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Int32); - -// Global variables to be able to test inputs after callback returned. -double passDoublex6Struct16BytesMixedx4Int32_a0 = 0.0; -double passDoublex6Struct16BytesMixedx4Int32_a1 = 0.0; -double passDoublex6Struct16BytesMixedx4Int32_a2 = 0.0; -double passDoublex6Struct16BytesMixedx4Int32_a3 = 0.0; -double passDoublex6Struct16BytesMixedx4Int32_a4 = 0.0; -double passDoublex6Struct16BytesMixedx4Int32_a5 = 0.0; -Struct16BytesMixed passDoublex6Struct16BytesMixedx4Int32_a6 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed passDoublex6Struct16BytesMixedx4Int32_a7 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed passDoublex6Struct16BytesMixedx4Int32_a8 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed passDoublex6Struct16BytesMixedx4Int32_a9 = - Pointer.fromAddress(0).ref; -int passDoublex6Struct16BytesMixedx4Int32_a10 = 0; - -// Result variable also global, so we can delete it after the callback. -double passDoublex6Struct16BytesMixedx4Int32Result = 0.0; - -double passDoublex6Struct16BytesMixedx4Int32CalculateResult() { - double result = 0; - - result += passDoublex6Struct16BytesMixedx4Int32_a0; - result += passDoublex6Struct16BytesMixedx4Int32_a1; - result += passDoublex6Struct16BytesMixedx4Int32_a2; - result += passDoublex6Struct16BytesMixedx4Int32_a3; - result += passDoublex6Struct16BytesMixedx4Int32_a4; - result += passDoublex6Struct16BytesMixedx4Int32_a5; - result += passDoublex6Struct16BytesMixedx4Int32_a6.a0; - result += passDoublex6Struct16BytesMixedx4Int32_a6.a1; - result += passDoublex6Struct16BytesMixedx4Int32_a7.a0; - result += passDoublex6Struct16BytesMixedx4Int32_a7.a1; - result += passDoublex6Struct16BytesMixedx4Int32_a8.a0; - result += passDoublex6Struct16BytesMixedx4Int32_a8.a1; - result += passDoublex6Struct16BytesMixedx4Int32_a9.a0; - result += passDoublex6Struct16BytesMixedx4Int32_a9.a1; - result += passDoublex6Struct16BytesMixedx4Int32_a10; - - passDoublex6Struct16BytesMixedx4Int32Result = result; - - return result; -} - -/// On Linux x64, it will exhaust xmm registers first, after 6 doubles and 2 -/// structs. The rest of the structs will go on the stack. -/// The int will be backfilled into the int register. -double passDoublex6Struct16BytesMixedx4Int32( - double a0, - double a1, - double a2, - double a3, - double a4, - double a5, - Struct16BytesMixed a6, - Struct16BytesMixed a7, - Struct16BytesMixed a8, - Struct16BytesMixed a9, - int a10) { - print( - "passDoublex6Struct16BytesMixedx4Int32(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9}, ${a10})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception( - "PassDoublex6Struct16BytesMixedx4Int32 throwing on purpose!"); - } - - passDoublex6Struct16BytesMixedx4Int32_a0 = a0; - passDoublex6Struct16BytesMixedx4Int32_a1 = a1; - passDoublex6Struct16BytesMixedx4Int32_a2 = a2; - passDoublex6Struct16BytesMixedx4Int32_a3 = a3; - passDoublex6Struct16BytesMixedx4Int32_a4 = a4; - passDoublex6Struct16BytesMixedx4Int32_a5 = a5; - passDoublex6Struct16BytesMixedx4Int32_a6 = a6; - passDoublex6Struct16BytesMixedx4Int32_a7 = a7; - passDoublex6Struct16BytesMixedx4Int32_a8 = a8; - passDoublex6Struct16BytesMixedx4Int32_a9 = a9; - passDoublex6Struct16BytesMixedx4Int32_a10 = a10; - - final result = passDoublex6Struct16BytesMixedx4Int32CalculateResult(); - - print("result = $result"); - - return result; -} - -void passDoublex6Struct16BytesMixedx4Int32AfterCallback() { - final result = passDoublex6Struct16BytesMixedx4Int32CalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(-8.0, result); -} - -typedef PassInt32x4Struct16BytesMixedx4DoubleType = Double Function( - Int32, - Int32, - Int32, - Int32, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Double); - -// Global variables to be able to test inputs after callback returned. -int passInt32x4Struct16BytesMixedx4Double_a0 = 0; -int passInt32x4Struct16BytesMixedx4Double_a1 = 0; -int passInt32x4Struct16BytesMixedx4Double_a2 = 0; -int passInt32x4Struct16BytesMixedx4Double_a3 = 0; -Struct16BytesMixed passInt32x4Struct16BytesMixedx4Double_a4 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed passInt32x4Struct16BytesMixedx4Double_a5 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed passInt32x4Struct16BytesMixedx4Double_a6 = - Pointer.fromAddress(0).ref; -Struct16BytesMixed passInt32x4Struct16BytesMixedx4Double_a7 = - Pointer.fromAddress(0).ref; -double passInt32x4Struct16BytesMixedx4Double_a8 = 0.0; - -// Result variable also global, so we can delete it after the callback. -double passInt32x4Struct16BytesMixedx4DoubleResult = 0.0; - -double passInt32x4Struct16BytesMixedx4DoubleCalculateResult() { - double result = 0; - - result += passInt32x4Struct16BytesMixedx4Double_a0; - result += passInt32x4Struct16BytesMixedx4Double_a1; - result += passInt32x4Struct16BytesMixedx4Double_a2; - result += passInt32x4Struct16BytesMixedx4Double_a3; - result += passInt32x4Struct16BytesMixedx4Double_a4.a0; - result += passInt32x4Struct16BytesMixedx4Double_a4.a1; - result += passInt32x4Struct16BytesMixedx4Double_a5.a0; - result += passInt32x4Struct16BytesMixedx4Double_a5.a1; - result += passInt32x4Struct16BytesMixedx4Double_a6.a0; - result += passInt32x4Struct16BytesMixedx4Double_a6.a1; - result += passInt32x4Struct16BytesMixedx4Double_a7.a0; - result += passInt32x4Struct16BytesMixedx4Double_a7.a1; - result += passInt32x4Struct16BytesMixedx4Double_a8; - - passInt32x4Struct16BytesMixedx4DoubleResult = result; - - return result; -} - -/// On Linux x64, it will exhaust int registers first. -/// The rest of the structs will go on the stack. -/// The double will be backfilled into the xmm register. -double passInt32x4Struct16BytesMixedx4Double( - int a0, - int a1, - int a2, - int a3, - Struct16BytesMixed a4, - Struct16BytesMixed a5, - Struct16BytesMixed a6, - Struct16BytesMixed a7, - double a8) { - print( - "passInt32x4Struct16BytesMixedx4Double(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception( - "PassInt32x4Struct16BytesMixedx4Double throwing on purpose!"); - } - - passInt32x4Struct16BytesMixedx4Double_a0 = a0; - passInt32x4Struct16BytesMixedx4Double_a1 = a1; - passInt32x4Struct16BytesMixedx4Double_a2 = a2; - passInt32x4Struct16BytesMixedx4Double_a3 = a3; - passInt32x4Struct16BytesMixedx4Double_a4 = a4; - passInt32x4Struct16BytesMixedx4Double_a5 = a5; - passInt32x4Struct16BytesMixedx4Double_a6 = a6; - passInt32x4Struct16BytesMixedx4Double_a7 = a7; - passInt32x4Struct16BytesMixedx4Double_a8 = a8; - - final result = passInt32x4Struct16BytesMixedx4DoubleCalculateResult(); - - print("result = $result"); - - return result; -} - -void passInt32x4Struct16BytesMixedx4DoubleAfterCallback() { - final result = passInt32x4Struct16BytesMixedx4DoubleCalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(-7.0, result); -} - -typedef PassStruct40BytesHomogeneousDoubleStruct4BytesHomoType - = Double Function(Struct40BytesHomogeneousDouble, - Struct4BytesHomogeneousInt16, Struct8BytesHomogeneousFloat); - -// Global variables to be able to test inputs after callback returned. -Struct40BytesHomogeneousDouble - passStruct40BytesHomogeneousDoubleStruct4BytesHomo_a0 = - Pointer.fromAddress(0).ref; -Struct4BytesHomogeneousInt16 - passStruct40BytesHomogeneousDoubleStruct4BytesHomo_a1 = - Pointer.fromAddress(0).ref; -Struct8BytesHomogeneousFloat - passStruct40BytesHomogeneousDoubleStruct4BytesHomo_a2 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passStruct40BytesHomogeneousDoubleStruct4BytesHomoResult = 0.0; - -double passStruct40BytesHomogeneousDoubleStruct4BytesHomoCalculateResult() { - double result = 0; - - result += passStruct40BytesHomogeneousDoubleStruct4BytesHomo_a0.a0; - result += passStruct40BytesHomogeneousDoubleStruct4BytesHomo_a0.a1; - result += passStruct40BytesHomogeneousDoubleStruct4BytesHomo_a0.a2; - result += passStruct40BytesHomogeneousDoubleStruct4BytesHomo_a0.a3; - result += passStruct40BytesHomogeneousDoubleStruct4BytesHomo_a0.a4; - result += passStruct40BytesHomogeneousDoubleStruct4BytesHomo_a1.a0; - result += passStruct40BytesHomogeneousDoubleStruct4BytesHomo_a1.a1; - result += passStruct40BytesHomogeneousDoubleStruct4BytesHomo_a2.a0; - result += passStruct40BytesHomogeneousDoubleStruct4BytesHomo_a2.a1; - - passStruct40BytesHomogeneousDoubleStruct4BytesHomoResult = result; - - return result; -} - -/// On various architectures, first struct is allocated on stack. -/// Check that the other two arguments are allocated on registers. -double passStruct40BytesHomogeneousDoubleStruct4BytesHomo( - Struct40BytesHomogeneousDouble a0, - Struct4BytesHomogeneousInt16 a1, - Struct8BytesHomogeneousFloat a2) { - print( - "passStruct40BytesHomogeneousDoubleStruct4BytesHomo(${a0}, ${a1}, ${a2})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception( - "PassStruct40BytesHomogeneousDoubleStruct4BytesHomo throwing on purpose!"); - } - - passStruct40BytesHomogeneousDoubleStruct4BytesHomo_a0 = a0; - passStruct40BytesHomogeneousDoubleStruct4BytesHomo_a1 = a1; - passStruct40BytesHomogeneousDoubleStruct4BytesHomo_a2 = a2; - - final result = - passStruct40BytesHomogeneousDoubleStruct4BytesHomoCalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct40BytesHomogeneousDoubleStruct4BytesHomoAfterCallback() { - final result = - passStruct40BytesHomogeneousDoubleStruct4BytesHomoCalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(-5.0, result); -} - -typedef PassInt32x8Doublex8Int64Int8Struct1ByteIntInt64IntType - = Double Function( - Int32, - Int32, - Int32, - Int32, - Int32, - Int32, - Int32, - Int32, - Double, - Double, - Double, - Double, - Double, - Double, - Double, - Double, - Int64, - Int8, - Struct1ByteInt, - Int64, - Int8, - Struct4BytesHomogeneousInt16, - Int64, - Int8, - Struct8BytesInt, - Int64, - Int8, - Struct8BytesHomogeneousFloat, - Int64, - Int8, - Struct8BytesMixed, - Int64, - Int8, - StructAlignmentInt16, - Int64, - Int8, - StructAlignmentInt32, - Int64, - Int8, - StructAlignmentInt64); - -// Global variables to be able to test inputs after callback returned. -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a0 = 0; -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a1 = 0; -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a2 = 0; -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a3 = 0; -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a4 = 0; -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a5 = 0; -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a6 = 0; -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a7 = 0; -double passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a8 = 0.0; -double passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a9 = 0.0; -double passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a10 = 0.0; -double passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a11 = 0.0; -double passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a12 = 0.0; -double passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a13 = 0.0; -double passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a14 = 0.0; -double passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a15 = 0.0; -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a16 = 0; -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a17 = 0; -Struct1ByteInt passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a18 = - Pointer.fromAddress(0).ref; -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a19 = 0; -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a20 = 0; -Struct4BytesHomogeneousInt16 - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a21 = - Pointer.fromAddress(0).ref; -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a22 = 0; -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a23 = 0; -Struct8BytesInt passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a24 = - Pointer.fromAddress(0).ref; -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a25 = 0; -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a26 = 0; -Struct8BytesHomogeneousFloat - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a27 = - Pointer.fromAddress(0).ref; -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a28 = 0; -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a29 = 0; -Struct8BytesMixed passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a30 = - Pointer.fromAddress(0).ref; -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a31 = 0; -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a32 = 0; -StructAlignmentInt16 passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a33 = - Pointer.fromAddress(0).ref; -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a34 = 0; -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a35 = 0; -StructAlignmentInt32 passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a36 = - Pointer.fromAddress(0).ref; -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a37 = 0; -int passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a38 = 0; -StructAlignmentInt64 passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a39 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passInt32x8Doublex8Int64Int8Struct1ByteIntInt64IntResult = 0.0; - -double passInt32x8Doublex8Int64Int8Struct1ByteIntInt64IntCalculateResult() { - double result = 0; - - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a0; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a1; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a2; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a3; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a4; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a5; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a6; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a7; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a8; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a9; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a10; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a11; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a12; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a13; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a14; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a15; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a16; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a17; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a18.a0; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a19; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a20; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a21.a0; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a21.a1; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a22; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a23; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a24.a0; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a24.a1; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a24.a2; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a25; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a26; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a27.a0; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a27.a1; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a28; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a29; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a30.a0; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a30.a1; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a30.a2; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a31; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a32; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a33.a0; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a33.a1; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a33.a2; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a34; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a35; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a36.a0; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a36.a1; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a36.a2; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a37; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a38; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a39.a0; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a39.a1; - result += passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a39.a2; - - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64IntResult = result; - - return result; -} - -/// Test alignment and padding of 16 byte int within struct. -double passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int( - int a0, - int a1, - int a2, - int a3, - int a4, - int a5, - int a6, - int a7, - double a8, - double a9, - double a10, - double a11, - double a12, - double a13, - double a14, - double a15, - int a16, - int a17, - Struct1ByteInt a18, - int a19, - int a20, - Struct4BytesHomogeneousInt16 a21, - int a22, - int a23, - Struct8BytesInt a24, - int a25, - int a26, - Struct8BytesHomogeneousFloat a27, - int a28, - int a29, - Struct8BytesMixed a30, - int a31, - int a32, - StructAlignmentInt16 a33, - int a34, - int a35, - StructAlignmentInt32 a36, - int a37, - int a38, - StructAlignmentInt64 a39) { - print( - "passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9}, ${a10}, ${a11}, ${a12}, ${a13}, ${a14}, ${a15}, ${a16}, ${a17}, ${a18}, ${a19}, ${a20}, ${a21}, ${a22}, ${a23}, ${a24}, ${a25}, ${a26}, ${a27}, ${a28}, ${a29}, ${a30}, ${a31}, ${a32}, ${a33}, ${a34}, ${a35}, ${a36}, ${a37}, ${a38}, ${a39})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception( - "PassInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int throwing on purpose!"); - } - - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a0 = a0; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a1 = a1; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a2 = a2; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a3 = a3; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a4 = a4; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a5 = a5; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a6 = a6; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a7 = a7; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a8 = a8; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a9 = a9; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a10 = a10; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a11 = a11; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a12 = a12; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a13 = a13; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a14 = a14; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a15 = a15; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a16 = a16; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a17 = a17; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a18 = a18; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a19 = a19; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a20 = a20; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a21 = a21; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a22 = a22; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a23 = a23; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a24 = a24; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a25 = a25; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a26 = a26; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a27 = a27; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a28 = a28; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a29 = a29; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a30 = a30; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a31 = a31; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a32 = a32; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a33 = a33; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a34 = a34; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a35 = a35; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a36 = a36; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a37 = a37; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a38 = a38; - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int_a39 = a39; - - final result = - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64IntCalculateResult(); - - print("result = $result"); - - return result; -} - -void passInt32x8Doublex8Int64Int8Struct1ByteIntInt64IntAfterCallback() { - final result = - passInt32x8Doublex8Int64Int8Struct1ByteIntInt64IntCalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(26.0, result); -} - -typedef PassStructAlignmentInt16Type = Int64 Function(StructAlignmentInt16); - -// Global variables to be able to test inputs after callback returned. -StructAlignmentInt16 passStructAlignmentInt16_a0 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStructAlignmentInt16Result = 0; - -int passStructAlignmentInt16CalculateResult() { - int result = 0; - - result += passStructAlignmentInt16_a0.a0; - result += passStructAlignmentInt16_a0.a1; - result += passStructAlignmentInt16_a0.a2; - - passStructAlignmentInt16Result = result; - - return result; -} - -/// Test alignment and padding of 16 byte int within struct. -int passStructAlignmentInt16(StructAlignmentInt16 a0) { - print("passStructAlignmentInt16(${a0})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStructAlignmentInt16 throwing on purpose!"); - } - - passStructAlignmentInt16_a0 = a0; - - final result = passStructAlignmentInt16CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStructAlignmentInt16AfterCallback() { - final result = passStructAlignmentInt16CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(-2, result); -} - -typedef PassStructAlignmentInt32Type = Int64 Function(StructAlignmentInt32); - -// Global variables to be able to test inputs after callback returned. -StructAlignmentInt32 passStructAlignmentInt32_a0 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStructAlignmentInt32Result = 0; - -int passStructAlignmentInt32CalculateResult() { - int result = 0; - - result += passStructAlignmentInt32_a0.a0; - result += passStructAlignmentInt32_a0.a1; - result += passStructAlignmentInt32_a0.a2; - - passStructAlignmentInt32Result = result; - - return result; -} - -/// Test alignment and padding of 32 byte int within struct. -int passStructAlignmentInt32(StructAlignmentInt32 a0) { - print("passStructAlignmentInt32(${a0})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStructAlignmentInt32 throwing on purpose!"); - } - - passStructAlignmentInt32_a0 = a0; - - final result = passStructAlignmentInt32CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStructAlignmentInt32AfterCallback() { - final result = passStructAlignmentInt32CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(-2, result); -} - -typedef PassStructAlignmentInt64Type = Int64 Function(StructAlignmentInt64); - -// Global variables to be able to test inputs after callback returned. -StructAlignmentInt64 passStructAlignmentInt64_a0 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStructAlignmentInt64Result = 0; - -int passStructAlignmentInt64CalculateResult() { - int result = 0; - - result += passStructAlignmentInt64_a0.a0; - result += passStructAlignmentInt64_a0.a1; - result += passStructAlignmentInt64_a0.a2; - - passStructAlignmentInt64Result = result; - - return result; -} - -/// Test alignment and padding of 64 byte int within struct. -int passStructAlignmentInt64(StructAlignmentInt64 a0) { - print("passStructAlignmentInt64(${a0})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStructAlignmentInt64 throwing on purpose!"); - } - - passStructAlignmentInt64_a0 = a0; - - final result = passStructAlignmentInt64CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStructAlignmentInt64AfterCallback() { - final result = passStructAlignmentInt64CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(-2, result); -} - -typedef PassStruct8BytesNestedIntx10Type = Int64 Function( - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt); - -// Global variables to be able to test inputs after callback returned. -Struct8BytesNestedInt passStruct8BytesNestedIntx10_a0 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedInt passStruct8BytesNestedIntx10_a1 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedInt passStruct8BytesNestedIntx10_a2 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedInt passStruct8BytesNestedIntx10_a3 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedInt passStruct8BytesNestedIntx10_a4 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedInt passStruct8BytesNestedIntx10_a5 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedInt passStruct8BytesNestedIntx10_a6 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedInt passStruct8BytesNestedIntx10_a7 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedInt passStruct8BytesNestedIntx10_a8 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedInt passStruct8BytesNestedIntx10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStruct8BytesNestedIntx10Result = 0; - -int passStruct8BytesNestedIntx10CalculateResult() { - int result = 0; - - result += passStruct8BytesNestedIntx10_a0.a0.a0; - result += passStruct8BytesNestedIntx10_a0.a0.a1; - result += passStruct8BytesNestedIntx10_a0.a1.a0; - result += passStruct8BytesNestedIntx10_a0.a1.a1; - result += passStruct8BytesNestedIntx10_a1.a0.a0; - result += passStruct8BytesNestedIntx10_a1.a0.a1; - result += passStruct8BytesNestedIntx10_a1.a1.a0; - result += passStruct8BytesNestedIntx10_a1.a1.a1; - result += passStruct8BytesNestedIntx10_a2.a0.a0; - result += passStruct8BytesNestedIntx10_a2.a0.a1; - result += passStruct8BytesNestedIntx10_a2.a1.a0; - result += passStruct8BytesNestedIntx10_a2.a1.a1; - result += passStruct8BytesNestedIntx10_a3.a0.a0; - result += passStruct8BytesNestedIntx10_a3.a0.a1; - result += passStruct8BytesNestedIntx10_a3.a1.a0; - result += passStruct8BytesNestedIntx10_a3.a1.a1; - result += passStruct8BytesNestedIntx10_a4.a0.a0; - result += passStruct8BytesNestedIntx10_a4.a0.a1; - result += passStruct8BytesNestedIntx10_a4.a1.a0; - result += passStruct8BytesNestedIntx10_a4.a1.a1; - result += passStruct8BytesNestedIntx10_a5.a0.a0; - result += passStruct8BytesNestedIntx10_a5.a0.a1; - result += passStruct8BytesNestedIntx10_a5.a1.a0; - result += passStruct8BytesNestedIntx10_a5.a1.a1; - result += passStruct8BytesNestedIntx10_a6.a0.a0; - result += passStruct8BytesNestedIntx10_a6.a0.a1; - result += passStruct8BytesNestedIntx10_a6.a1.a0; - result += passStruct8BytesNestedIntx10_a6.a1.a1; - result += passStruct8BytesNestedIntx10_a7.a0.a0; - result += passStruct8BytesNestedIntx10_a7.a0.a1; - result += passStruct8BytesNestedIntx10_a7.a1.a0; - result += passStruct8BytesNestedIntx10_a7.a1.a1; - result += passStruct8BytesNestedIntx10_a8.a0.a0; - result += passStruct8BytesNestedIntx10_a8.a0.a1; - result += passStruct8BytesNestedIntx10_a8.a1.a0; - result += passStruct8BytesNestedIntx10_a8.a1.a1; - result += passStruct8BytesNestedIntx10_a9.a0.a0; - result += passStruct8BytesNestedIntx10_a9.a0.a1; - result += passStruct8BytesNestedIntx10_a9.a1.a0; - result += passStruct8BytesNestedIntx10_a9.a1.a1; - - passStruct8BytesNestedIntx10Result = result; - - return result; -} - -/// Simple nested struct. No alignment gaps on any architectures. -/// 10 arguments exhaust registers on all platforms. -int passStruct8BytesNestedIntx10( - Struct8BytesNestedInt a0, - Struct8BytesNestedInt a1, - Struct8BytesNestedInt a2, - Struct8BytesNestedInt a3, - Struct8BytesNestedInt a4, - Struct8BytesNestedInt a5, - Struct8BytesNestedInt a6, - Struct8BytesNestedInt a7, - Struct8BytesNestedInt a8, - Struct8BytesNestedInt a9) { - print( - "passStruct8BytesNestedIntx10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0.a0 == 42 || a0.a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct8BytesNestedIntx10 throwing on purpose!"); - } - - passStruct8BytesNestedIntx10_a0 = a0; - passStruct8BytesNestedIntx10_a1 = a1; - passStruct8BytesNestedIntx10_a2 = a2; - passStruct8BytesNestedIntx10_a3 = a3; - passStruct8BytesNestedIntx10_a4 = a4; - passStruct8BytesNestedIntx10_a5 = a5; - passStruct8BytesNestedIntx10_a6 = a6; - passStruct8BytesNestedIntx10_a7 = a7; - passStruct8BytesNestedIntx10_a8 = a8; - passStruct8BytesNestedIntx10_a9 = a9; - - final result = passStruct8BytesNestedIntx10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct8BytesNestedIntx10AfterCallback() { - final result = passStruct8BytesNestedIntx10CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(20, result); -} - -typedef PassStruct8BytesNestedFloatx10Type = Float Function( - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat); - -// Global variables to be able to test inputs after callback returned. -Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a0 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a1 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a2 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a3 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a4 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a5 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a6 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a7 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a8 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedFloat passStruct8BytesNestedFloatx10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passStruct8BytesNestedFloatx10Result = 0.0; - -double passStruct8BytesNestedFloatx10CalculateResult() { - double result = 0; - - result += passStruct8BytesNestedFloatx10_a0.a0.a0; - result += passStruct8BytesNestedFloatx10_a0.a1.a0; - result += passStruct8BytesNestedFloatx10_a1.a0.a0; - result += passStruct8BytesNestedFloatx10_a1.a1.a0; - result += passStruct8BytesNestedFloatx10_a2.a0.a0; - result += passStruct8BytesNestedFloatx10_a2.a1.a0; - result += passStruct8BytesNestedFloatx10_a3.a0.a0; - result += passStruct8BytesNestedFloatx10_a3.a1.a0; - result += passStruct8BytesNestedFloatx10_a4.a0.a0; - result += passStruct8BytesNestedFloatx10_a4.a1.a0; - result += passStruct8BytesNestedFloatx10_a5.a0.a0; - result += passStruct8BytesNestedFloatx10_a5.a1.a0; - result += passStruct8BytesNestedFloatx10_a6.a0.a0; - result += passStruct8BytesNestedFloatx10_a6.a1.a0; - result += passStruct8BytesNestedFloatx10_a7.a0.a0; - result += passStruct8BytesNestedFloatx10_a7.a1.a0; - result += passStruct8BytesNestedFloatx10_a8.a0.a0; - result += passStruct8BytesNestedFloatx10_a8.a1.a0; - result += passStruct8BytesNestedFloatx10_a9.a0.a0; - result += passStruct8BytesNestedFloatx10_a9.a1.a0; - - passStruct8BytesNestedFloatx10Result = result; - - return result; -} - -/// Simple nested struct. No alignment gaps on any architectures. -/// 10 arguments exhaust fpu registers on all platforms. -double passStruct8BytesNestedFloatx10( - Struct8BytesNestedFloat a0, - Struct8BytesNestedFloat a1, - Struct8BytesNestedFloat a2, - Struct8BytesNestedFloat a3, - Struct8BytesNestedFloat a4, - Struct8BytesNestedFloat a5, - Struct8BytesNestedFloat a6, - Struct8BytesNestedFloat a7, - Struct8BytesNestedFloat a8, - Struct8BytesNestedFloat a9) { - print( - "passStruct8BytesNestedFloatx10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0.a0 == 42 || a0.a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct8BytesNestedFloatx10 throwing on purpose!"); - } - - passStruct8BytesNestedFloatx10_a0 = a0; - passStruct8BytesNestedFloatx10_a1 = a1; - passStruct8BytesNestedFloatx10_a2 = a2; - passStruct8BytesNestedFloatx10_a3 = a3; - passStruct8BytesNestedFloatx10_a4 = a4; - passStruct8BytesNestedFloatx10_a5 = a5; - passStruct8BytesNestedFloatx10_a6 = a6; - passStruct8BytesNestedFloatx10_a7 = a7; - passStruct8BytesNestedFloatx10_a8 = a8; - passStruct8BytesNestedFloatx10_a9 = a9; - - final result = passStruct8BytesNestedFloatx10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct8BytesNestedFloatx10AfterCallback() { - final result = passStruct8BytesNestedFloatx10CalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(10.0, result); -} - -typedef PassStruct8BytesNestedFloat2x10Type = Float Function( - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2); - -// Global variables to be able to test inputs after callback returned. -Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a0 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a1 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a2 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a3 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a4 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a5 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a6 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a7 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a8 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedFloat2 passStruct8BytesNestedFloat2x10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passStruct8BytesNestedFloat2x10Result = 0.0; - -double passStruct8BytesNestedFloat2x10CalculateResult() { - double result = 0; - - result += passStruct8BytesNestedFloat2x10_a0.a0.a0; - result += passStruct8BytesNestedFloat2x10_a0.a1; - result += passStruct8BytesNestedFloat2x10_a1.a0.a0; - result += passStruct8BytesNestedFloat2x10_a1.a1; - result += passStruct8BytesNestedFloat2x10_a2.a0.a0; - result += passStruct8BytesNestedFloat2x10_a2.a1; - result += passStruct8BytesNestedFloat2x10_a3.a0.a0; - result += passStruct8BytesNestedFloat2x10_a3.a1; - result += passStruct8BytesNestedFloat2x10_a4.a0.a0; - result += passStruct8BytesNestedFloat2x10_a4.a1; - result += passStruct8BytesNestedFloat2x10_a5.a0.a0; - result += passStruct8BytesNestedFloat2x10_a5.a1; - result += passStruct8BytesNestedFloat2x10_a6.a0.a0; - result += passStruct8BytesNestedFloat2x10_a6.a1; - result += passStruct8BytesNestedFloat2x10_a7.a0.a0; - result += passStruct8BytesNestedFloat2x10_a7.a1; - result += passStruct8BytesNestedFloat2x10_a8.a0.a0; - result += passStruct8BytesNestedFloat2x10_a8.a1; - result += passStruct8BytesNestedFloat2x10_a9.a0.a0; - result += passStruct8BytesNestedFloat2x10_a9.a1; - - passStruct8BytesNestedFloat2x10Result = result; - - return result; -} - -/// Simple nested struct. No alignment gaps on any architectures. -/// 10 arguments exhaust fpu registers on all platforms. -/// The nesting is irregular, testing homogenous float rules on arm and arm64, -/// and the fpu register usage on x64. -double passStruct8BytesNestedFloat2x10( - Struct8BytesNestedFloat2 a0, - Struct8BytesNestedFloat2 a1, - Struct8BytesNestedFloat2 a2, - Struct8BytesNestedFloat2 a3, - Struct8BytesNestedFloat2 a4, - Struct8BytesNestedFloat2 a5, - Struct8BytesNestedFloat2 a6, - Struct8BytesNestedFloat2 a7, - Struct8BytesNestedFloat2 a8, - Struct8BytesNestedFloat2 a9) { - print( - "passStruct8BytesNestedFloat2x10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0.a0 == 42 || a0.a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct8BytesNestedFloat2x10 throwing on purpose!"); - } - - passStruct8BytesNestedFloat2x10_a0 = a0; - passStruct8BytesNestedFloat2x10_a1 = a1; - passStruct8BytesNestedFloat2x10_a2 = a2; - passStruct8BytesNestedFloat2x10_a3 = a3; - passStruct8BytesNestedFloat2x10_a4 = a4; - passStruct8BytesNestedFloat2x10_a5 = a5; - passStruct8BytesNestedFloat2x10_a6 = a6; - passStruct8BytesNestedFloat2x10_a7 = a7; - passStruct8BytesNestedFloat2x10_a8 = a8; - passStruct8BytesNestedFloat2x10_a9 = a9; - - final result = passStruct8BytesNestedFloat2x10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct8BytesNestedFloat2x10AfterCallback() { - final result = passStruct8BytesNestedFloat2x10CalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(10.0, result); -} - -typedef PassStruct8BytesNestedMixedx10Type = Double Function( - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed); - -// Global variables to be able to test inputs after callback returned. -Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a0 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a1 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a2 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a3 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a4 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a5 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a6 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a7 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a8 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedMixed passStruct8BytesNestedMixedx10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passStruct8BytesNestedMixedx10Result = 0.0; - -double passStruct8BytesNestedMixedx10CalculateResult() { - double result = 0; - - result += passStruct8BytesNestedMixedx10_a0.a0.a0; - result += passStruct8BytesNestedMixedx10_a0.a0.a1; - result += passStruct8BytesNestedMixedx10_a0.a1.a0; - result += passStruct8BytesNestedMixedx10_a1.a0.a0; - result += passStruct8BytesNestedMixedx10_a1.a0.a1; - result += passStruct8BytesNestedMixedx10_a1.a1.a0; - result += passStruct8BytesNestedMixedx10_a2.a0.a0; - result += passStruct8BytesNestedMixedx10_a2.a0.a1; - result += passStruct8BytesNestedMixedx10_a2.a1.a0; - result += passStruct8BytesNestedMixedx10_a3.a0.a0; - result += passStruct8BytesNestedMixedx10_a3.a0.a1; - result += passStruct8BytesNestedMixedx10_a3.a1.a0; - result += passStruct8BytesNestedMixedx10_a4.a0.a0; - result += passStruct8BytesNestedMixedx10_a4.a0.a1; - result += passStruct8BytesNestedMixedx10_a4.a1.a0; - result += passStruct8BytesNestedMixedx10_a5.a0.a0; - result += passStruct8BytesNestedMixedx10_a5.a0.a1; - result += passStruct8BytesNestedMixedx10_a5.a1.a0; - result += passStruct8BytesNestedMixedx10_a6.a0.a0; - result += passStruct8BytesNestedMixedx10_a6.a0.a1; - result += passStruct8BytesNestedMixedx10_a6.a1.a0; - result += passStruct8BytesNestedMixedx10_a7.a0.a0; - result += passStruct8BytesNestedMixedx10_a7.a0.a1; - result += passStruct8BytesNestedMixedx10_a7.a1.a0; - result += passStruct8BytesNestedMixedx10_a8.a0.a0; - result += passStruct8BytesNestedMixedx10_a8.a0.a1; - result += passStruct8BytesNestedMixedx10_a8.a1.a0; - result += passStruct8BytesNestedMixedx10_a9.a0.a0; - result += passStruct8BytesNestedMixedx10_a9.a0.a1; - result += passStruct8BytesNestedMixedx10_a9.a1.a0; - - passStruct8BytesNestedMixedx10Result = result; - - return result; -} - -/// Simple nested struct. No alignment gaps on any architectures. -/// 10 arguments exhaust all registers on all platforms. -double passStruct8BytesNestedMixedx10( - Struct8BytesNestedMixed a0, - Struct8BytesNestedMixed a1, - Struct8BytesNestedMixed a2, - Struct8BytesNestedMixed a3, - Struct8BytesNestedMixed a4, - Struct8BytesNestedMixed a5, - Struct8BytesNestedMixed a6, - Struct8BytesNestedMixed a7, - Struct8BytesNestedMixed a8, - Struct8BytesNestedMixed a9) { - print( - "passStruct8BytesNestedMixedx10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0.a0 == 42 || a0.a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct8BytesNestedMixedx10 throwing on purpose!"); - } - - passStruct8BytesNestedMixedx10_a0 = a0; - passStruct8BytesNestedMixedx10_a1 = a1; - passStruct8BytesNestedMixedx10_a2 = a2; - passStruct8BytesNestedMixedx10_a3 = a3; - passStruct8BytesNestedMixedx10_a4 = a4; - passStruct8BytesNestedMixedx10_a5 = a5; - passStruct8BytesNestedMixedx10_a6 = a6; - passStruct8BytesNestedMixedx10_a7 = a7; - passStruct8BytesNestedMixedx10_a8 = a8; - passStruct8BytesNestedMixedx10_a9 = a9; - - final result = passStruct8BytesNestedMixedx10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct8BytesNestedMixedx10AfterCallback() { - final result = passStruct8BytesNestedMixedx10CalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(15.0, result); -} - -typedef PassStruct16BytesNestedIntx2Type = Int64 Function( - Struct16BytesNestedInt, Struct16BytesNestedInt); - -// Global variables to be able to test inputs after callback returned. -Struct16BytesNestedInt passStruct16BytesNestedIntx2_a0 = - Pointer.fromAddress(0).ref; -Struct16BytesNestedInt passStruct16BytesNestedIntx2_a1 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStruct16BytesNestedIntx2Result = 0; - -int passStruct16BytesNestedIntx2CalculateResult() { - int result = 0; - - result += passStruct16BytesNestedIntx2_a0.a0.a0.a0; - result += passStruct16BytesNestedIntx2_a0.a0.a0.a1; - result += passStruct16BytesNestedIntx2_a0.a0.a1.a0; - result += passStruct16BytesNestedIntx2_a0.a0.a1.a1; - result += passStruct16BytesNestedIntx2_a0.a1.a0.a0; - result += passStruct16BytesNestedIntx2_a0.a1.a0.a1; - result += passStruct16BytesNestedIntx2_a0.a1.a1.a0; - result += passStruct16BytesNestedIntx2_a0.a1.a1.a1; - result += passStruct16BytesNestedIntx2_a1.a0.a0.a0; - result += passStruct16BytesNestedIntx2_a1.a0.a0.a1; - result += passStruct16BytesNestedIntx2_a1.a0.a1.a0; - result += passStruct16BytesNestedIntx2_a1.a0.a1.a1; - result += passStruct16BytesNestedIntx2_a1.a1.a0.a0; - result += passStruct16BytesNestedIntx2_a1.a1.a0.a1; - result += passStruct16BytesNestedIntx2_a1.a1.a1.a0; - result += passStruct16BytesNestedIntx2_a1.a1.a1.a1; - - passStruct16BytesNestedIntx2Result = result; - - return result; -} - -/// Deeper nested struct to test recursive member access. -int passStruct16BytesNestedIntx2( - Struct16BytesNestedInt a0, Struct16BytesNestedInt a1) { - print("passStruct16BytesNestedIntx2(${a0}, ${a1})"); - - // In legacy mode, possibly return null. - if (a0.a0.a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0.a0.a0 == 42 || a0.a0.a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct16BytesNestedIntx2 throwing on purpose!"); - } - - passStruct16BytesNestedIntx2_a0 = a0; - passStruct16BytesNestedIntx2_a1 = a1; - - final result = passStruct16BytesNestedIntx2CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct16BytesNestedIntx2AfterCallback() { - final result = passStruct16BytesNestedIntx2CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(8, result); -} - -typedef PassStruct32BytesNestedIntx2Type = Int64 Function( - Struct32BytesNestedInt, Struct32BytesNestedInt); - -// Global variables to be able to test inputs after callback returned. -Struct32BytesNestedInt passStruct32BytesNestedIntx2_a0 = - Pointer.fromAddress(0).ref; -Struct32BytesNestedInt passStruct32BytesNestedIntx2_a1 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStruct32BytesNestedIntx2Result = 0; - -int passStruct32BytesNestedIntx2CalculateResult() { - int result = 0; - - result += passStruct32BytesNestedIntx2_a0.a0.a0.a0.a0; - result += passStruct32BytesNestedIntx2_a0.a0.a0.a0.a1; - result += passStruct32BytesNestedIntx2_a0.a0.a0.a1.a0; - result += passStruct32BytesNestedIntx2_a0.a0.a0.a1.a1; - result += passStruct32BytesNestedIntx2_a0.a0.a1.a0.a0; - result += passStruct32BytesNestedIntx2_a0.a0.a1.a0.a1; - result += passStruct32BytesNestedIntx2_a0.a0.a1.a1.a0; - result += passStruct32BytesNestedIntx2_a0.a0.a1.a1.a1; - result += passStruct32BytesNestedIntx2_a0.a1.a0.a0.a0; - result += passStruct32BytesNestedIntx2_a0.a1.a0.a0.a1; - result += passStruct32BytesNestedIntx2_a0.a1.a0.a1.a0; - result += passStruct32BytesNestedIntx2_a0.a1.a0.a1.a1; - result += passStruct32BytesNestedIntx2_a0.a1.a1.a0.a0; - result += passStruct32BytesNestedIntx2_a0.a1.a1.a0.a1; - result += passStruct32BytesNestedIntx2_a0.a1.a1.a1.a0; - result += passStruct32BytesNestedIntx2_a0.a1.a1.a1.a1; - result += passStruct32BytesNestedIntx2_a1.a0.a0.a0.a0; - result += passStruct32BytesNestedIntx2_a1.a0.a0.a0.a1; - result += passStruct32BytesNestedIntx2_a1.a0.a0.a1.a0; - result += passStruct32BytesNestedIntx2_a1.a0.a0.a1.a1; - result += passStruct32BytesNestedIntx2_a1.a0.a1.a0.a0; - result += passStruct32BytesNestedIntx2_a1.a0.a1.a0.a1; - result += passStruct32BytesNestedIntx2_a1.a0.a1.a1.a0; - result += passStruct32BytesNestedIntx2_a1.a0.a1.a1.a1; - result += passStruct32BytesNestedIntx2_a1.a1.a0.a0.a0; - result += passStruct32BytesNestedIntx2_a1.a1.a0.a0.a1; - result += passStruct32BytesNestedIntx2_a1.a1.a0.a1.a0; - result += passStruct32BytesNestedIntx2_a1.a1.a0.a1.a1; - result += passStruct32BytesNestedIntx2_a1.a1.a1.a0.a0; - result += passStruct32BytesNestedIntx2_a1.a1.a1.a0.a1; - result += passStruct32BytesNestedIntx2_a1.a1.a1.a1.a0; - result += passStruct32BytesNestedIntx2_a1.a1.a1.a1.a1; - - passStruct32BytesNestedIntx2Result = result; - - return result; -} - -/// Even deeper nested struct to test recursive member access. -int passStruct32BytesNestedIntx2( - Struct32BytesNestedInt a0, Struct32BytesNestedInt a1) { - print("passStruct32BytesNestedIntx2(${a0}, ${a1})"); - - // In legacy mode, possibly return null. - if (a0.a0.a0.a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0.a0.a0.a0 == 42 || a0.a0.a0.a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct32BytesNestedIntx2 throwing on purpose!"); - } - - passStruct32BytesNestedIntx2_a0 = a0; - passStruct32BytesNestedIntx2_a1 = a1; - - final result = passStruct32BytesNestedIntx2CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct32BytesNestedIntx2AfterCallback() { - final result = passStruct32BytesNestedIntx2CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(16, result); -} - -typedef PassStructNestedIntStructAlignmentInt16Type = Int64 Function( - StructNestedIntStructAlignmentInt16); - -// Global variables to be able to test inputs after callback returned. -StructNestedIntStructAlignmentInt16 passStructNestedIntStructAlignmentInt16_a0 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStructNestedIntStructAlignmentInt16Result = 0; - -int passStructNestedIntStructAlignmentInt16CalculateResult() { - int result = 0; - - result += passStructNestedIntStructAlignmentInt16_a0.a0.a0; - result += passStructNestedIntStructAlignmentInt16_a0.a0.a1; - result += passStructNestedIntStructAlignmentInt16_a0.a0.a2; - result += passStructNestedIntStructAlignmentInt16_a0.a1.a0; - result += passStructNestedIntStructAlignmentInt16_a0.a1.a1; - result += passStructNestedIntStructAlignmentInt16_a0.a1.a2; - - passStructNestedIntStructAlignmentInt16Result = result; - - return result; -} - -/// Test alignment and padding of nested struct with 16 byte int. -int passStructNestedIntStructAlignmentInt16( - StructNestedIntStructAlignmentInt16 a0) { - print("passStructNestedIntStructAlignmentInt16(${a0})"); - - // In legacy mode, possibly return null. - if (a0.a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0.a0 == 42 || a0.a0.a0 == 84) { - print("throwing!"); - throw Exception( - "PassStructNestedIntStructAlignmentInt16 throwing on purpose!"); - } - - passStructNestedIntStructAlignmentInt16_a0 = a0; - - final result = passStructNestedIntStructAlignmentInt16CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStructNestedIntStructAlignmentInt16AfterCallback() { - final result = passStructNestedIntStructAlignmentInt16CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(3, result); -} - -typedef PassStructNestedIntStructAlignmentInt32Type = Int64 Function( - StructNestedIntStructAlignmentInt32); - -// Global variables to be able to test inputs after callback returned. -StructNestedIntStructAlignmentInt32 passStructNestedIntStructAlignmentInt32_a0 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStructNestedIntStructAlignmentInt32Result = 0; - -int passStructNestedIntStructAlignmentInt32CalculateResult() { - int result = 0; - - result += passStructNestedIntStructAlignmentInt32_a0.a0.a0; - result += passStructNestedIntStructAlignmentInt32_a0.a0.a1; - result += passStructNestedIntStructAlignmentInt32_a0.a0.a2; - result += passStructNestedIntStructAlignmentInt32_a0.a1.a0; - result += passStructNestedIntStructAlignmentInt32_a0.a1.a1; - result += passStructNestedIntStructAlignmentInt32_a0.a1.a2; - - passStructNestedIntStructAlignmentInt32Result = result; - - return result; -} - -/// Test alignment and padding of nested struct with 32 byte int. -int passStructNestedIntStructAlignmentInt32( - StructNestedIntStructAlignmentInt32 a0) { - print("passStructNestedIntStructAlignmentInt32(${a0})"); - - // In legacy mode, possibly return null. - if (a0.a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0.a0 == 42 || a0.a0.a0 == 84) { - print("throwing!"); - throw Exception( - "PassStructNestedIntStructAlignmentInt32 throwing on purpose!"); - } - - passStructNestedIntStructAlignmentInt32_a0 = a0; - - final result = passStructNestedIntStructAlignmentInt32CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStructNestedIntStructAlignmentInt32AfterCallback() { - final result = passStructNestedIntStructAlignmentInt32CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(3, result); -} - -typedef PassStructNestedIntStructAlignmentInt64Type = Int64 Function( - StructNestedIntStructAlignmentInt64); - -// Global variables to be able to test inputs after callback returned. -StructNestedIntStructAlignmentInt64 passStructNestedIntStructAlignmentInt64_a0 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStructNestedIntStructAlignmentInt64Result = 0; - -int passStructNestedIntStructAlignmentInt64CalculateResult() { - int result = 0; - - result += passStructNestedIntStructAlignmentInt64_a0.a0.a0; - result += passStructNestedIntStructAlignmentInt64_a0.a0.a1; - result += passStructNestedIntStructAlignmentInt64_a0.a0.a2; - result += passStructNestedIntStructAlignmentInt64_a0.a1.a0; - result += passStructNestedIntStructAlignmentInt64_a0.a1.a1; - result += passStructNestedIntStructAlignmentInt64_a0.a1.a2; - - passStructNestedIntStructAlignmentInt64Result = result; - - return result; -} - -/// Test alignment and padding of nested struct with 64 byte int. -int passStructNestedIntStructAlignmentInt64( - StructNestedIntStructAlignmentInt64 a0) { - print("passStructNestedIntStructAlignmentInt64(${a0})"); - - // In legacy mode, possibly return null. - if (a0.a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0.a0 == 42 || a0.a0.a0 == 84) { - print("throwing!"); - throw Exception( - "PassStructNestedIntStructAlignmentInt64 throwing on purpose!"); - } - - passStructNestedIntStructAlignmentInt64_a0 = a0; - - final result = passStructNestedIntStructAlignmentInt64CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStructNestedIntStructAlignmentInt64AfterCallback() { - final result = passStructNestedIntStructAlignmentInt64CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(3, result); -} - -typedef PassStructNestedIrregularEvenBiggerx4Type = Double Function( - StructNestedIrregularEvenBigger, - StructNestedIrregularEvenBigger, - StructNestedIrregularEvenBigger, - StructNestedIrregularEvenBigger); - -// Global variables to be able to test inputs after callback returned. -StructNestedIrregularEvenBigger passStructNestedIrregularEvenBiggerx4_a0 = - Pointer.fromAddress(0).ref; -StructNestedIrregularEvenBigger passStructNestedIrregularEvenBiggerx4_a1 = - Pointer.fromAddress(0).ref; -StructNestedIrregularEvenBigger passStructNestedIrregularEvenBiggerx4_a2 = - Pointer.fromAddress(0).ref; -StructNestedIrregularEvenBigger passStructNestedIrregularEvenBiggerx4_a3 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passStructNestedIrregularEvenBiggerx4Result = 0.0; - -double passStructNestedIrregularEvenBiggerx4CalculateResult() { - double result = 0; - - result += passStructNestedIrregularEvenBiggerx4_a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a0.a1.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a0.a1.a0.a1.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a0.a1.a0.a1.a0.a1; - result += passStructNestedIrregularEvenBiggerx4_a0.a1.a0.a1.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a0.a1.a0.a2; - result += passStructNestedIrregularEvenBiggerx4_a0.a1.a0.a3.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a0.a1.a0.a3.a1; - result += passStructNestedIrregularEvenBiggerx4_a0.a1.a0.a4; - result += passStructNestedIrregularEvenBiggerx4_a0.a1.a0.a5.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a0.a1.a0.a5.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a0.a1.a0.a6; - result += passStructNestedIrregularEvenBiggerx4_a0.a1.a1.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a0.a1.a1.a0.a1; - result += passStructNestedIrregularEvenBiggerx4_a0.a1.a1.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a0.a1.a2; - result += passStructNestedIrregularEvenBiggerx4_a0.a1.a3; - result += passStructNestedIrregularEvenBiggerx4_a0.a2.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a0.a2.a0.a1.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a0.a2.a0.a1.a0.a1; - result += passStructNestedIrregularEvenBiggerx4_a0.a2.a0.a1.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a0.a2.a0.a2; - result += passStructNestedIrregularEvenBiggerx4_a0.a2.a0.a3.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a0.a2.a0.a3.a1; - result += passStructNestedIrregularEvenBiggerx4_a0.a2.a0.a4; - result += passStructNestedIrregularEvenBiggerx4_a0.a2.a0.a5.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a0.a2.a0.a5.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a0.a2.a0.a6; - result += passStructNestedIrregularEvenBiggerx4_a0.a2.a1.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a0.a2.a1.a0.a1; - result += passStructNestedIrregularEvenBiggerx4_a0.a2.a1.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a0.a2.a2; - result += passStructNestedIrregularEvenBiggerx4_a0.a2.a3; - result += passStructNestedIrregularEvenBiggerx4_a0.a3; - result += passStructNestedIrregularEvenBiggerx4_a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a1.a1.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a1.a1.a0.a1.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a1.a1.a0.a1.a0.a1; - result += passStructNestedIrregularEvenBiggerx4_a1.a1.a0.a1.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a1.a1.a0.a2; - result += passStructNestedIrregularEvenBiggerx4_a1.a1.a0.a3.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a1.a1.a0.a3.a1; - result += passStructNestedIrregularEvenBiggerx4_a1.a1.a0.a4; - result += passStructNestedIrregularEvenBiggerx4_a1.a1.a0.a5.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a1.a1.a0.a5.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a1.a1.a0.a6; - result += passStructNestedIrregularEvenBiggerx4_a1.a1.a1.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a1.a1.a1.a0.a1; - result += passStructNestedIrregularEvenBiggerx4_a1.a1.a1.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a1.a1.a2; - result += passStructNestedIrregularEvenBiggerx4_a1.a1.a3; - result += passStructNestedIrregularEvenBiggerx4_a1.a2.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a1.a2.a0.a1.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a1.a2.a0.a1.a0.a1; - result += passStructNestedIrregularEvenBiggerx4_a1.a2.a0.a1.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a1.a2.a0.a2; - result += passStructNestedIrregularEvenBiggerx4_a1.a2.a0.a3.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a1.a2.a0.a3.a1; - result += passStructNestedIrregularEvenBiggerx4_a1.a2.a0.a4; - result += passStructNestedIrregularEvenBiggerx4_a1.a2.a0.a5.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a1.a2.a0.a5.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a1.a2.a0.a6; - result += passStructNestedIrregularEvenBiggerx4_a1.a2.a1.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a1.a2.a1.a0.a1; - result += passStructNestedIrregularEvenBiggerx4_a1.a2.a1.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a1.a2.a2; - result += passStructNestedIrregularEvenBiggerx4_a1.a2.a3; - result += passStructNestedIrregularEvenBiggerx4_a1.a3; - result += passStructNestedIrregularEvenBiggerx4_a2.a0; - result += passStructNestedIrregularEvenBiggerx4_a2.a1.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a2.a1.a0.a1.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a2.a1.a0.a1.a0.a1; - result += passStructNestedIrregularEvenBiggerx4_a2.a1.a0.a1.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a2.a1.a0.a2; - result += passStructNestedIrregularEvenBiggerx4_a2.a1.a0.a3.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a2.a1.a0.a3.a1; - result += passStructNestedIrregularEvenBiggerx4_a2.a1.a0.a4; - result += passStructNestedIrregularEvenBiggerx4_a2.a1.a0.a5.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a2.a1.a0.a5.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a2.a1.a0.a6; - result += passStructNestedIrregularEvenBiggerx4_a2.a1.a1.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a2.a1.a1.a0.a1; - result += passStructNestedIrregularEvenBiggerx4_a2.a1.a1.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a2.a1.a2; - result += passStructNestedIrregularEvenBiggerx4_a2.a1.a3; - result += passStructNestedIrregularEvenBiggerx4_a2.a2.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a2.a2.a0.a1.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a2.a2.a0.a1.a0.a1; - result += passStructNestedIrregularEvenBiggerx4_a2.a2.a0.a1.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a2.a2.a0.a2; - result += passStructNestedIrregularEvenBiggerx4_a2.a2.a0.a3.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a2.a2.a0.a3.a1; - result += passStructNestedIrregularEvenBiggerx4_a2.a2.a0.a4; - result += passStructNestedIrregularEvenBiggerx4_a2.a2.a0.a5.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a2.a2.a0.a5.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a2.a2.a0.a6; - result += passStructNestedIrregularEvenBiggerx4_a2.a2.a1.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a2.a2.a1.a0.a1; - result += passStructNestedIrregularEvenBiggerx4_a2.a2.a1.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a2.a2.a2; - result += passStructNestedIrregularEvenBiggerx4_a2.a2.a3; - result += passStructNestedIrregularEvenBiggerx4_a2.a3; - result += passStructNestedIrregularEvenBiggerx4_a3.a0; - result += passStructNestedIrregularEvenBiggerx4_a3.a1.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a3.a1.a0.a1.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a3.a1.a0.a1.a0.a1; - result += passStructNestedIrregularEvenBiggerx4_a3.a1.a0.a1.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a3.a1.a0.a2; - result += passStructNestedIrregularEvenBiggerx4_a3.a1.a0.a3.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a3.a1.a0.a3.a1; - result += passStructNestedIrregularEvenBiggerx4_a3.a1.a0.a4; - result += passStructNestedIrregularEvenBiggerx4_a3.a1.a0.a5.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a3.a1.a0.a5.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a3.a1.a0.a6; - result += passStructNestedIrregularEvenBiggerx4_a3.a1.a1.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a3.a1.a1.a0.a1; - result += passStructNestedIrregularEvenBiggerx4_a3.a1.a1.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a3.a1.a2; - result += passStructNestedIrregularEvenBiggerx4_a3.a1.a3; - result += passStructNestedIrregularEvenBiggerx4_a3.a2.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a3.a2.a0.a1.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a3.a2.a0.a1.a0.a1; - result += passStructNestedIrregularEvenBiggerx4_a3.a2.a0.a1.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a3.a2.a0.a2; - result += passStructNestedIrregularEvenBiggerx4_a3.a2.a0.a3.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a3.a2.a0.a3.a1; - result += passStructNestedIrregularEvenBiggerx4_a3.a2.a0.a4; - result += passStructNestedIrregularEvenBiggerx4_a3.a2.a0.a5.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a3.a2.a0.a5.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a3.a2.a0.a6; - result += passStructNestedIrregularEvenBiggerx4_a3.a2.a1.a0.a0; - result += passStructNestedIrregularEvenBiggerx4_a3.a2.a1.a0.a1; - result += passStructNestedIrregularEvenBiggerx4_a3.a2.a1.a1.a0; - result += passStructNestedIrregularEvenBiggerx4_a3.a2.a2; - result += passStructNestedIrregularEvenBiggerx4_a3.a2.a3; - result += passStructNestedIrregularEvenBiggerx4_a3.a3; - - passStructNestedIrregularEvenBiggerx4Result = result; - - return result; -} - -/// Return big irregular struct as smoke test. -double passStructNestedIrregularEvenBiggerx4( - StructNestedIrregularEvenBigger a0, - StructNestedIrregularEvenBigger a1, - StructNestedIrregularEvenBigger a2, - StructNestedIrregularEvenBigger a3) { - print("passStructNestedIrregularEvenBiggerx4(${a0}, ${a1}, ${a2}, ${a3})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception( - "PassStructNestedIrregularEvenBiggerx4 throwing on purpose!"); - } - - passStructNestedIrregularEvenBiggerx4_a0 = a0; - passStructNestedIrregularEvenBiggerx4_a1 = a1; - passStructNestedIrregularEvenBiggerx4_a2 = a2; - passStructNestedIrregularEvenBiggerx4_a3 = a3; - - final result = passStructNestedIrregularEvenBiggerx4CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStructNestedIrregularEvenBiggerx4AfterCallback() { - final result = passStructNestedIrregularEvenBiggerx4CalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(1572.0, result); -} - -typedef PassStruct8BytesInlineArrayIntx4Type = Int32 Function( - Struct8BytesInlineArrayInt, - Struct8BytesInlineArrayInt, - Struct8BytesInlineArrayInt, - Struct8BytesInlineArrayInt); - -// Global variables to be able to test inputs after callback returned. -Struct8BytesInlineArrayInt passStruct8BytesInlineArrayIntx4_a0 = - Pointer.fromAddress(0).ref; -Struct8BytesInlineArrayInt passStruct8BytesInlineArrayIntx4_a1 = - Pointer.fromAddress(0).ref; -Struct8BytesInlineArrayInt passStruct8BytesInlineArrayIntx4_a2 = - Pointer.fromAddress(0).ref; -Struct8BytesInlineArrayInt passStruct8BytesInlineArrayIntx4_a3 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStruct8BytesInlineArrayIntx4Result = 0; - -int passStruct8BytesInlineArrayIntx4CalculateResult() { - int result = 0; - - result += passStruct8BytesInlineArrayIntx4_a0.a0[0]; - result += passStruct8BytesInlineArrayIntx4_a0.a0[1]; - result += passStruct8BytesInlineArrayIntx4_a0.a0[2]; - result += passStruct8BytesInlineArrayIntx4_a0.a0[3]; - result += passStruct8BytesInlineArrayIntx4_a0.a0[4]; - result += passStruct8BytesInlineArrayIntx4_a0.a0[5]; - result += passStruct8BytesInlineArrayIntx4_a0.a0[6]; - result += passStruct8BytesInlineArrayIntx4_a0.a0[7]; - result += passStruct8BytesInlineArrayIntx4_a1.a0[0]; - result += passStruct8BytesInlineArrayIntx4_a1.a0[1]; - result += passStruct8BytesInlineArrayIntx4_a1.a0[2]; - result += passStruct8BytesInlineArrayIntx4_a1.a0[3]; - result += passStruct8BytesInlineArrayIntx4_a1.a0[4]; - result += passStruct8BytesInlineArrayIntx4_a1.a0[5]; - result += passStruct8BytesInlineArrayIntx4_a1.a0[6]; - result += passStruct8BytesInlineArrayIntx4_a1.a0[7]; - result += passStruct8BytesInlineArrayIntx4_a2.a0[0]; - result += passStruct8BytesInlineArrayIntx4_a2.a0[1]; - result += passStruct8BytesInlineArrayIntx4_a2.a0[2]; - result += passStruct8BytesInlineArrayIntx4_a2.a0[3]; - result += passStruct8BytesInlineArrayIntx4_a2.a0[4]; - result += passStruct8BytesInlineArrayIntx4_a2.a0[5]; - result += passStruct8BytesInlineArrayIntx4_a2.a0[6]; - result += passStruct8BytesInlineArrayIntx4_a2.a0[7]; - result += passStruct8BytesInlineArrayIntx4_a3.a0[0]; - result += passStruct8BytesInlineArrayIntx4_a3.a0[1]; - result += passStruct8BytesInlineArrayIntx4_a3.a0[2]; - result += passStruct8BytesInlineArrayIntx4_a3.a0[3]; - result += passStruct8BytesInlineArrayIntx4_a3.a0[4]; - result += passStruct8BytesInlineArrayIntx4_a3.a0[5]; - result += passStruct8BytesInlineArrayIntx4_a3.a0[6]; - result += passStruct8BytesInlineArrayIntx4_a3.a0[7]; - - passStruct8BytesInlineArrayIntx4Result = result; - - return result; -} - -/// Simple struct with inline array. -int passStruct8BytesInlineArrayIntx4( - Struct8BytesInlineArrayInt a0, - Struct8BytesInlineArrayInt a1, - Struct8BytesInlineArrayInt a2, - Struct8BytesInlineArrayInt a3) { - print("passStruct8BytesInlineArrayIntx4(${a0}, ${a1}, ${a2}, ${a3})"); - - // In legacy mode, possibly return null. - if (a0.a0[0] == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0[0] == 42 || a0.a0[0] == 84) { - print("throwing!"); - throw Exception("PassStruct8BytesInlineArrayIntx4 throwing on purpose!"); - } - - passStruct8BytesInlineArrayIntx4_a0 = a0; - passStruct8BytesInlineArrayIntx4_a1 = a1; - passStruct8BytesInlineArrayIntx4_a2 = a2; - passStruct8BytesInlineArrayIntx4_a3 = a3; - - final result = passStruct8BytesInlineArrayIntx4CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct8BytesInlineArrayIntx4AfterCallback() { - final result = passStruct8BytesInlineArrayIntx4CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(528, result); -} - -typedef PassStructInlineArrayIrregularx4Type = Int32 Function( - StructInlineArrayIrregular, - StructInlineArrayIrregular, - StructInlineArrayIrregular, - StructInlineArrayIrregular); - -// Global variables to be able to test inputs after callback returned. -StructInlineArrayIrregular passStructInlineArrayIrregularx4_a0 = - Pointer.fromAddress(0).ref; -StructInlineArrayIrregular passStructInlineArrayIrregularx4_a1 = - Pointer.fromAddress(0).ref; -StructInlineArrayIrregular passStructInlineArrayIrregularx4_a2 = - Pointer.fromAddress(0).ref; -StructInlineArrayIrregular passStructInlineArrayIrregularx4_a3 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStructInlineArrayIrregularx4Result = 0; - -int passStructInlineArrayIrregularx4CalculateResult() { - int result = 0; - - result += passStructInlineArrayIrregularx4_a0.a0[0].a0; - result += passStructInlineArrayIrregularx4_a0.a0[0].a1; - result += passStructInlineArrayIrregularx4_a0.a0[1].a0; - result += passStructInlineArrayIrregularx4_a0.a0[1].a1; - result += passStructInlineArrayIrregularx4_a0.a1; - result += passStructInlineArrayIrregularx4_a1.a0[0].a0; - result += passStructInlineArrayIrregularx4_a1.a0[0].a1; - result += passStructInlineArrayIrregularx4_a1.a0[1].a0; - result += passStructInlineArrayIrregularx4_a1.a0[1].a1; - result += passStructInlineArrayIrregularx4_a1.a1; - result += passStructInlineArrayIrregularx4_a2.a0[0].a0; - result += passStructInlineArrayIrregularx4_a2.a0[0].a1; - result += passStructInlineArrayIrregularx4_a2.a0[1].a0; - result += passStructInlineArrayIrregularx4_a2.a0[1].a1; - result += passStructInlineArrayIrregularx4_a2.a1; - result += passStructInlineArrayIrregularx4_a3.a0[0].a0; - result += passStructInlineArrayIrregularx4_a3.a0[0].a1; - result += passStructInlineArrayIrregularx4_a3.a0[1].a0; - result += passStructInlineArrayIrregularx4_a3.a0[1].a1; - result += passStructInlineArrayIrregularx4_a3.a1; - - passStructInlineArrayIrregularx4Result = result; - - return result; -} - -/// Irregular struct with inline array. -int passStructInlineArrayIrregularx4( - StructInlineArrayIrregular a0, - StructInlineArrayIrregular a1, - StructInlineArrayIrregular a2, - StructInlineArrayIrregular a3) { - print("passStructInlineArrayIrregularx4(${a0}, ${a1}, ${a2}, ${a3})"); - - // In legacy mode, possibly return null. - if (a0.a0[0].a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0[0].a0 == 42 || a0.a0[0].a0 == 84) { - print("throwing!"); - throw Exception("PassStructInlineArrayIrregularx4 throwing on purpose!"); - } - - passStructInlineArrayIrregularx4_a0 = a0; - passStructInlineArrayIrregularx4_a1 = a1; - passStructInlineArrayIrregularx4_a2 = a2; - passStructInlineArrayIrregularx4_a3 = a3; - - final result = passStructInlineArrayIrregularx4CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStructInlineArrayIrregularx4AfterCallback() { - final result = passStructInlineArrayIrregularx4CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(50, result); -} - -typedef PassStructInlineArray100BytesType = Int32 Function( - StructInlineArray100Bytes); - -// Global variables to be able to test inputs after callback returned. -StructInlineArray100Bytes passStructInlineArray100Bytes_a0 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStructInlineArray100BytesResult = 0; - -int passStructInlineArray100BytesCalculateResult() { - int result = 0; - - result += passStructInlineArray100Bytes_a0.a0[0]; - result += passStructInlineArray100Bytes_a0.a0[1]; - result += passStructInlineArray100Bytes_a0.a0[2]; - result += passStructInlineArray100Bytes_a0.a0[3]; - result += passStructInlineArray100Bytes_a0.a0[4]; - result += passStructInlineArray100Bytes_a0.a0[5]; - result += passStructInlineArray100Bytes_a0.a0[6]; - result += passStructInlineArray100Bytes_a0.a0[7]; - result += passStructInlineArray100Bytes_a0.a0[8]; - result += passStructInlineArray100Bytes_a0.a0[9]; - result += passStructInlineArray100Bytes_a0.a0[10]; - result += passStructInlineArray100Bytes_a0.a0[11]; - result += passStructInlineArray100Bytes_a0.a0[12]; - result += passStructInlineArray100Bytes_a0.a0[13]; - result += passStructInlineArray100Bytes_a0.a0[14]; - result += passStructInlineArray100Bytes_a0.a0[15]; - result += passStructInlineArray100Bytes_a0.a0[16]; - result += passStructInlineArray100Bytes_a0.a0[17]; - result += passStructInlineArray100Bytes_a0.a0[18]; - result += passStructInlineArray100Bytes_a0.a0[19]; - result += passStructInlineArray100Bytes_a0.a0[20]; - result += passStructInlineArray100Bytes_a0.a0[21]; - result += passStructInlineArray100Bytes_a0.a0[22]; - result += passStructInlineArray100Bytes_a0.a0[23]; - result += passStructInlineArray100Bytes_a0.a0[24]; - result += passStructInlineArray100Bytes_a0.a0[25]; - result += passStructInlineArray100Bytes_a0.a0[26]; - result += passStructInlineArray100Bytes_a0.a0[27]; - result += passStructInlineArray100Bytes_a0.a0[28]; - result += passStructInlineArray100Bytes_a0.a0[29]; - result += passStructInlineArray100Bytes_a0.a0[30]; - result += passStructInlineArray100Bytes_a0.a0[31]; - result += passStructInlineArray100Bytes_a0.a0[32]; - result += passStructInlineArray100Bytes_a0.a0[33]; - result += passStructInlineArray100Bytes_a0.a0[34]; - result += passStructInlineArray100Bytes_a0.a0[35]; - result += passStructInlineArray100Bytes_a0.a0[36]; - result += passStructInlineArray100Bytes_a0.a0[37]; - result += passStructInlineArray100Bytes_a0.a0[38]; - result += passStructInlineArray100Bytes_a0.a0[39]; - result += passStructInlineArray100Bytes_a0.a0[40]; - result += passStructInlineArray100Bytes_a0.a0[41]; - result += passStructInlineArray100Bytes_a0.a0[42]; - result += passStructInlineArray100Bytes_a0.a0[43]; - result += passStructInlineArray100Bytes_a0.a0[44]; - result += passStructInlineArray100Bytes_a0.a0[45]; - result += passStructInlineArray100Bytes_a0.a0[46]; - result += passStructInlineArray100Bytes_a0.a0[47]; - result += passStructInlineArray100Bytes_a0.a0[48]; - result += passStructInlineArray100Bytes_a0.a0[49]; - result += passStructInlineArray100Bytes_a0.a0[50]; - result += passStructInlineArray100Bytes_a0.a0[51]; - result += passStructInlineArray100Bytes_a0.a0[52]; - result += passStructInlineArray100Bytes_a0.a0[53]; - result += passStructInlineArray100Bytes_a0.a0[54]; - result += passStructInlineArray100Bytes_a0.a0[55]; - result += passStructInlineArray100Bytes_a0.a0[56]; - result += passStructInlineArray100Bytes_a0.a0[57]; - result += passStructInlineArray100Bytes_a0.a0[58]; - result += passStructInlineArray100Bytes_a0.a0[59]; - result += passStructInlineArray100Bytes_a0.a0[60]; - result += passStructInlineArray100Bytes_a0.a0[61]; - result += passStructInlineArray100Bytes_a0.a0[62]; - result += passStructInlineArray100Bytes_a0.a0[63]; - result += passStructInlineArray100Bytes_a0.a0[64]; - result += passStructInlineArray100Bytes_a0.a0[65]; - result += passStructInlineArray100Bytes_a0.a0[66]; - result += passStructInlineArray100Bytes_a0.a0[67]; - result += passStructInlineArray100Bytes_a0.a0[68]; - result += passStructInlineArray100Bytes_a0.a0[69]; - result += passStructInlineArray100Bytes_a0.a0[70]; - result += passStructInlineArray100Bytes_a0.a0[71]; - result += passStructInlineArray100Bytes_a0.a0[72]; - result += passStructInlineArray100Bytes_a0.a0[73]; - result += passStructInlineArray100Bytes_a0.a0[74]; - result += passStructInlineArray100Bytes_a0.a0[75]; - result += passStructInlineArray100Bytes_a0.a0[76]; - result += passStructInlineArray100Bytes_a0.a0[77]; - result += passStructInlineArray100Bytes_a0.a0[78]; - result += passStructInlineArray100Bytes_a0.a0[79]; - result += passStructInlineArray100Bytes_a0.a0[80]; - result += passStructInlineArray100Bytes_a0.a0[81]; - result += passStructInlineArray100Bytes_a0.a0[82]; - result += passStructInlineArray100Bytes_a0.a0[83]; - result += passStructInlineArray100Bytes_a0.a0[84]; - result += passStructInlineArray100Bytes_a0.a0[85]; - result += passStructInlineArray100Bytes_a0.a0[86]; - result += passStructInlineArray100Bytes_a0.a0[87]; - result += passStructInlineArray100Bytes_a0.a0[88]; - result += passStructInlineArray100Bytes_a0.a0[89]; - result += passStructInlineArray100Bytes_a0.a0[90]; - result += passStructInlineArray100Bytes_a0.a0[91]; - result += passStructInlineArray100Bytes_a0.a0[92]; - result += passStructInlineArray100Bytes_a0.a0[93]; - result += passStructInlineArray100Bytes_a0.a0[94]; - result += passStructInlineArray100Bytes_a0.a0[95]; - result += passStructInlineArray100Bytes_a0.a0[96]; - result += passStructInlineArray100Bytes_a0.a0[97]; - result += passStructInlineArray100Bytes_a0.a0[98]; - result += passStructInlineArray100Bytes_a0.a0[99]; - - passStructInlineArray100BytesResult = result; - - return result; -} - -/// Regular larger struct with inline array. -int passStructInlineArray100Bytes(StructInlineArray100Bytes a0) { - print("passStructInlineArray100Bytes(${a0})"); - - // In legacy mode, possibly return null. - if (a0.a0[0] == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0[0] == 42 || a0.a0[0] == 84) { - print("throwing!"); - throw Exception("PassStructInlineArray100Bytes throwing on purpose!"); - } - - passStructInlineArray100Bytes_a0 = a0; - - final result = passStructInlineArray100BytesCalculateResult(); - - print("result = $result"); - - return result; -} - -void passStructInlineArray100BytesAfterCallback() { - final result = passStructInlineArray100BytesCalculateResult(); - - print("after callback result = $result"); - - Expect.equals(5050, result); -} - -typedef PassStructStruct16BytesHomogeneousFloat2x5Type = Float Function( - StructStruct16BytesHomogeneousFloat2, - StructStruct16BytesHomogeneousFloat2, - StructStruct16BytesHomogeneousFloat2, - StructStruct16BytesHomogeneousFloat2, - StructStruct16BytesHomogeneousFloat2); - -// Global variables to be able to test inputs after callback returned. -StructStruct16BytesHomogeneousFloat2 - passStructStruct16BytesHomogeneousFloat2x5_a0 = - Pointer.fromAddress(0).ref; -StructStruct16BytesHomogeneousFloat2 - passStructStruct16BytesHomogeneousFloat2x5_a1 = - Pointer.fromAddress(0).ref; -StructStruct16BytesHomogeneousFloat2 - passStructStruct16BytesHomogeneousFloat2x5_a2 = - Pointer.fromAddress(0).ref; -StructStruct16BytesHomogeneousFloat2 - passStructStruct16BytesHomogeneousFloat2x5_a3 = - Pointer.fromAddress(0).ref; -StructStruct16BytesHomogeneousFloat2 - passStructStruct16BytesHomogeneousFloat2x5_a4 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passStructStruct16BytesHomogeneousFloat2x5Result = 0.0; - -double passStructStruct16BytesHomogeneousFloat2x5CalculateResult() { - double result = 0; - - result += passStructStruct16BytesHomogeneousFloat2x5_a0.a0.a0; - result += passStructStruct16BytesHomogeneousFloat2x5_a0.a1[0].a0; - result += passStructStruct16BytesHomogeneousFloat2x5_a0.a1[1].a0; - result += passStructStruct16BytesHomogeneousFloat2x5_a0.a2; - result += passStructStruct16BytesHomogeneousFloat2x5_a1.a0.a0; - result += passStructStruct16BytesHomogeneousFloat2x5_a1.a1[0].a0; - result += passStructStruct16BytesHomogeneousFloat2x5_a1.a1[1].a0; - result += passStructStruct16BytesHomogeneousFloat2x5_a1.a2; - result += passStructStruct16BytesHomogeneousFloat2x5_a2.a0.a0; - result += passStructStruct16BytesHomogeneousFloat2x5_a2.a1[0].a0; - result += passStructStruct16BytesHomogeneousFloat2x5_a2.a1[1].a0; - result += passStructStruct16BytesHomogeneousFloat2x5_a2.a2; - result += passStructStruct16BytesHomogeneousFloat2x5_a3.a0.a0; - result += passStructStruct16BytesHomogeneousFloat2x5_a3.a1[0].a0; - result += passStructStruct16BytesHomogeneousFloat2x5_a3.a1[1].a0; - result += passStructStruct16BytesHomogeneousFloat2x5_a3.a2; - result += passStructStruct16BytesHomogeneousFloat2x5_a4.a0.a0; - result += passStructStruct16BytesHomogeneousFloat2x5_a4.a1[0].a0; - result += passStructStruct16BytesHomogeneousFloat2x5_a4.a1[1].a0; - result += passStructStruct16BytesHomogeneousFloat2x5_a4.a2; - - passStructStruct16BytesHomogeneousFloat2x5Result = result; - - return result; -} - -/// Arguments in FPU registers on arm hardfp and arm64. -/// 5 struct arguments will exhaust available registers. -double passStructStruct16BytesHomogeneousFloat2x5( - StructStruct16BytesHomogeneousFloat2 a0, - StructStruct16BytesHomogeneousFloat2 a1, - StructStruct16BytesHomogeneousFloat2 a2, - StructStruct16BytesHomogeneousFloat2 a3, - StructStruct16BytesHomogeneousFloat2 a4) { - print( - "passStructStruct16BytesHomogeneousFloat2x5(${a0}, ${a1}, ${a2}, ${a3}, ${a4})"); - - // In legacy mode, possibly return null. - if (a0.a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0.a0 == 42 || a0.a0.a0 == 84) { - print("throwing!"); - throw Exception( - "PassStructStruct16BytesHomogeneousFloat2x5 throwing on purpose!"); - } - - passStructStruct16BytesHomogeneousFloat2x5_a0 = a0; - passStructStruct16BytesHomogeneousFloat2x5_a1 = a1; - passStructStruct16BytesHomogeneousFloat2x5_a2 = a2; - passStructStruct16BytesHomogeneousFloat2x5_a3 = a3; - passStructStruct16BytesHomogeneousFloat2x5_a4 = a4; - - final result = passStructStruct16BytesHomogeneousFloat2x5CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStructStruct16BytesHomogeneousFloat2x5AfterCallback() { - final result = passStructStruct16BytesHomogeneousFloat2x5CalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(10.0, result); -} - -typedef PassStructStruct32BytesHomogeneousDouble2x5Type = Double Function( - StructStruct32BytesHomogeneousDouble2, - StructStruct32BytesHomogeneousDouble2, - StructStruct32BytesHomogeneousDouble2, - StructStruct32BytesHomogeneousDouble2, - StructStruct32BytesHomogeneousDouble2); - -// Global variables to be able to test inputs after callback returned. -StructStruct32BytesHomogeneousDouble2 - passStructStruct32BytesHomogeneousDouble2x5_a0 = - Pointer.fromAddress(0).ref; -StructStruct32BytesHomogeneousDouble2 - passStructStruct32BytesHomogeneousDouble2x5_a1 = - Pointer.fromAddress(0).ref; -StructStruct32BytesHomogeneousDouble2 - passStructStruct32BytesHomogeneousDouble2x5_a2 = - Pointer.fromAddress(0).ref; -StructStruct32BytesHomogeneousDouble2 - passStructStruct32BytesHomogeneousDouble2x5_a3 = - Pointer.fromAddress(0).ref; -StructStruct32BytesHomogeneousDouble2 - passStructStruct32BytesHomogeneousDouble2x5_a4 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passStructStruct32BytesHomogeneousDouble2x5Result = 0.0; - -double passStructStruct32BytesHomogeneousDouble2x5CalculateResult() { - double result = 0; - - result += passStructStruct32BytesHomogeneousDouble2x5_a0.a0.a0; - result += passStructStruct32BytesHomogeneousDouble2x5_a0.a1[0].a0; - result += passStructStruct32BytesHomogeneousDouble2x5_a0.a1[1].a0; - result += passStructStruct32BytesHomogeneousDouble2x5_a0.a2; - result += passStructStruct32BytesHomogeneousDouble2x5_a1.a0.a0; - result += passStructStruct32BytesHomogeneousDouble2x5_a1.a1[0].a0; - result += passStructStruct32BytesHomogeneousDouble2x5_a1.a1[1].a0; - result += passStructStruct32BytesHomogeneousDouble2x5_a1.a2; - result += passStructStruct32BytesHomogeneousDouble2x5_a2.a0.a0; - result += passStructStruct32BytesHomogeneousDouble2x5_a2.a1[0].a0; - result += passStructStruct32BytesHomogeneousDouble2x5_a2.a1[1].a0; - result += passStructStruct32BytesHomogeneousDouble2x5_a2.a2; - result += passStructStruct32BytesHomogeneousDouble2x5_a3.a0.a0; - result += passStructStruct32BytesHomogeneousDouble2x5_a3.a1[0].a0; - result += passStructStruct32BytesHomogeneousDouble2x5_a3.a1[1].a0; - result += passStructStruct32BytesHomogeneousDouble2x5_a3.a2; - result += passStructStruct32BytesHomogeneousDouble2x5_a4.a0.a0; - result += passStructStruct32BytesHomogeneousDouble2x5_a4.a1[0].a0; - result += passStructStruct32BytesHomogeneousDouble2x5_a4.a1[1].a0; - result += passStructStruct32BytesHomogeneousDouble2x5_a4.a2; - - passStructStruct32BytesHomogeneousDouble2x5Result = result; - - return result; -} - -/// Arguments in FPU registers on arm64. -/// 5 struct arguments will exhaust available registers. -double passStructStruct32BytesHomogeneousDouble2x5( - StructStruct32BytesHomogeneousDouble2 a0, - StructStruct32BytesHomogeneousDouble2 a1, - StructStruct32BytesHomogeneousDouble2 a2, - StructStruct32BytesHomogeneousDouble2 a3, - StructStruct32BytesHomogeneousDouble2 a4) { - print( - "passStructStruct32BytesHomogeneousDouble2x5(${a0}, ${a1}, ${a2}, ${a3}, ${a4})"); - - // In legacy mode, possibly return null. - if (a0.a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0.a0 == 42 || a0.a0.a0 == 84) { - print("throwing!"); - throw Exception( - "PassStructStruct32BytesHomogeneousDouble2x5 throwing on purpose!"); - } - - passStructStruct32BytesHomogeneousDouble2x5_a0 = a0; - passStructStruct32BytesHomogeneousDouble2x5_a1 = a1; - passStructStruct32BytesHomogeneousDouble2x5_a2 = a2; - passStructStruct32BytesHomogeneousDouble2x5_a3 = a3; - passStructStruct32BytesHomogeneousDouble2x5_a4 = a4; - - final result = passStructStruct32BytesHomogeneousDouble2x5CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStructStruct32BytesHomogeneousDouble2x5AfterCallback() { - final result = passStructStruct32BytesHomogeneousDouble2x5CalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(10.0, result); -} - -typedef PassStructStruct16BytesMixed3x10Type = Float Function( - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3); - -// Global variables to be able to test inputs after callback returned. -StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a0 = - Pointer.fromAddress(0).ref; -StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a1 = - Pointer.fromAddress(0).ref; -StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a2 = - Pointer.fromAddress(0).ref; -StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a3 = - Pointer.fromAddress(0).ref; -StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a4 = - Pointer.fromAddress(0).ref; -StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a5 = - Pointer.fromAddress(0).ref; -StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a6 = - Pointer.fromAddress(0).ref; -StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a7 = - Pointer.fromAddress(0).ref; -StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a8 = - Pointer.fromAddress(0).ref; -StructStruct16BytesMixed3 passStructStruct16BytesMixed3x10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passStructStruct16BytesMixed3x10Result = 0.0; - -double passStructStruct16BytesMixed3x10CalculateResult() { - double result = 0; - - result += passStructStruct16BytesMixed3x10_a0.a0.a0; - result += passStructStruct16BytesMixed3x10_a0.a1[0].a0; - result += passStructStruct16BytesMixed3x10_a0.a1[0].a1; - result += passStructStruct16BytesMixed3x10_a0.a1[0].a2; - result += passStructStruct16BytesMixed3x10_a0.a2[0]; - result += passStructStruct16BytesMixed3x10_a0.a2[1]; - result += passStructStruct16BytesMixed3x10_a1.a0.a0; - result += passStructStruct16BytesMixed3x10_a1.a1[0].a0; - result += passStructStruct16BytesMixed3x10_a1.a1[0].a1; - result += passStructStruct16BytesMixed3x10_a1.a1[0].a2; - result += passStructStruct16BytesMixed3x10_a1.a2[0]; - result += passStructStruct16BytesMixed3x10_a1.a2[1]; - result += passStructStruct16BytesMixed3x10_a2.a0.a0; - result += passStructStruct16BytesMixed3x10_a2.a1[0].a0; - result += passStructStruct16BytesMixed3x10_a2.a1[0].a1; - result += passStructStruct16BytesMixed3x10_a2.a1[0].a2; - result += passStructStruct16BytesMixed3x10_a2.a2[0]; - result += passStructStruct16BytesMixed3x10_a2.a2[1]; - result += passStructStruct16BytesMixed3x10_a3.a0.a0; - result += passStructStruct16BytesMixed3x10_a3.a1[0].a0; - result += passStructStruct16BytesMixed3x10_a3.a1[0].a1; - result += passStructStruct16BytesMixed3x10_a3.a1[0].a2; - result += passStructStruct16BytesMixed3x10_a3.a2[0]; - result += passStructStruct16BytesMixed3x10_a3.a2[1]; - result += passStructStruct16BytesMixed3x10_a4.a0.a0; - result += passStructStruct16BytesMixed3x10_a4.a1[0].a0; - result += passStructStruct16BytesMixed3x10_a4.a1[0].a1; - result += passStructStruct16BytesMixed3x10_a4.a1[0].a2; - result += passStructStruct16BytesMixed3x10_a4.a2[0]; - result += passStructStruct16BytesMixed3x10_a4.a2[1]; - result += passStructStruct16BytesMixed3x10_a5.a0.a0; - result += passStructStruct16BytesMixed3x10_a5.a1[0].a0; - result += passStructStruct16BytesMixed3x10_a5.a1[0].a1; - result += passStructStruct16BytesMixed3x10_a5.a1[0].a2; - result += passStructStruct16BytesMixed3x10_a5.a2[0]; - result += passStructStruct16BytesMixed3x10_a5.a2[1]; - result += passStructStruct16BytesMixed3x10_a6.a0.a0; - result += passStructStruct16BytesMixed3x10_a6.a1[0].a0; - result += passStructStruct16BytesMixed3x10_a6.a1[0].a1; - result += passStructStruct16BytesMixed3x10_a6.a1[0].a2; - result += passStructStruct16BytesMixed3x10_a6.a2[0]; - result += passStructStruct16BytesMixed3x10_a6.a2[1]; - result += passStructStruct16BytesMixed3x10_a7.a0.a0; - result += passStructStruct16BytesMixed3x10_a7.a1[0].a0; - result += passStructStruct16BytesMixed3x10_a7.a1[0].a1; - result += passStructStruct16BytesMixed3x10_a7.a1[0].a2; - result += passStructStruct16BytesMixed3x10_a7.a2[0]; - result += passStructStruct16BytesMixed3x10_a7.a2[1]; - result += passStructStruct16BytesMixed3x10_a8.a0.a0; - result += passStructStruct16BytesMixed3x10_a8.a1[0].a0; - result += passStructStruct16BytesMixed3x10_a8.a1[0].a1; - result += passStructStruct16BytesMixed3x10_a8.a1[0].a2; - result += passStructStruct16BytesMixed3x10_a8.a2[0]; - result += passStructStruct16BytesMixed3x10_a8.a2[1]; - result += passStructStruct16BytesMixed3x10_a9.a0.a0; - result += passStructStruct16BytesMixed3x10_a9.a1[0].a0; - result += passStructStruct16BytesMixed3x10_a9.a1[0].a1; - result += passStructStruct16BytesMixed3x10_a9.a1[0].a2; - result += passStructStruct16BytesMixed3x10_a9.a2[0]; - result += passStructStruct16BytesMixed3x10_a9.a2[1]; - - passStructStruct16BytesMixed3x10Result = result; - - return result; -} - -/// On x64, arguments are split over FP and int registers. -/// On x64, it will exhaust the integer registers with the 6th argument. -/// The rest goes on the stack. -/// On arm, arguments are 4 byte aligned. -double passStructStruct16BytesMixed3x10( - StructStruct16BytesMixed3 a0, - StructStruct16BytesMixed3 a1, - StructStruct16BytesMixed3 a2, - StructStruct16BytesMixed3 a3, - StructStruct16BytesMixed3 a4, - StructStruct16BytesMixed3 a5, - StructStruct16BytesMixed3 a6, - StructStruct16BytesMixed3 a7, - StructStruct16BytesMixed3 a8, - StructStruct16BytesMixed3 a9) { - print( - "passStructStruct16BytesMixed3x10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0.a0 == 42 || a0.a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStructStruct16BytesMixed3x10 throwing on purpose!"); - } - - passStructStruct16BytesMixed3x10_a0 = a0; - passStructStruct16BytesMixed3x10_a1 = a1; - passStructStruct16BytesMixed3x10_a2 = a2; - passStructStruct16BytesMixed3x10_a3 = a3; - passStructStruct16BytesMixed3x10_a4 = a4; - passStructStruct16BytesMixed3x10_a5 = a5; - passStructStruct16BytesMixed3x10_a6 = a6; - passStructStruct16BytesMixed3x10_a7 = a7; - passStructStruct16BytesMixed3x10_a8 = a8; - passStructStruct16BytesMixed3x10_a9 = a9; - - final result = passStructStruct16BytesMixed3x10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStructStruct16BytesMixed3x10AfterCallback() { - final result = passStructStruct16BytesMixed3x10CalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(30.0, result); -} - -typedef PassUint8Struct32BytesInlineArrayMultiDimensionalIType - = Uint32 Function( - Uint8, - Struct32BytesInlineArrayMultiDimensionalInt, - Uint8, - Struct8BytesInlineArrayMultiDimensionalInt, - Uint8, - Struct8BytesInlineArrayMultiDimensionalInt, - Uint8); - -// Global variables to be able to test inputs after callback returned. -int passUint8Struct32BytesInlineArrayMultiDimensionalI_a0 = 0; -Struct32BytesInlineArrayMultiDimensionalInt - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1 = - Pointer.fromAddress(0).ref; -int passUint8Struct32BytesInlineArrayMultiDimensionalI_a2 = 0; -Struct8BytesInlineArrayMultiDimensionalInt - passUint8Struct32BytesInlineArrayMultiDimensionalI_a3 = - Pointer.fromAddress(0).ref; -int passUint8Struct32BytesInlineArrayMultiDimensionalI_a4 = 0; -Struct8BytesInlineArrayMultiDimensionalInt - passUint8Struct32BytesInlineArrayMultiDimensionalI_a5 = - Pointer.fromAddress(0).ref; -int passUint8Struct32BytesInlineArrayMultiDimensionalI_a6 = 0; - -// Result variable also global, so we can delete it after the callback. -int passUint8Struct32BytesInlineArrayMultiDimensionalIResult = 0; - -int passUint8Struct32BytesInlineArrayMultiDimensionalICalculateResult() { - int result = 0; - - result += passUint8Struct32BytesInlineArrayMultiDimensionalI_a0; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[0][0][0][0][0]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[0][0][0][0][1]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[0][0][0][1][0]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[0][0][0][1][1]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[0][0][1][0][0]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[0][0][1][0][1]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[0][0][1][1][0]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[0][0][1][1][1]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[0][1][0][0][0]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[0][1][0][0][1]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[0][1][0][1][0]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[0][1][0][1][1]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[0][1][1][0][0]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[0][1][1][0][1]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[0][1][1][1][0]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[0][1][1][1][1]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[1][0][0][0][0]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[1][0][0][0][1]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[1][0][0][1][0]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[1][0][0][1][1]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[1][0][1][0][0]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[1][0][1][0][1]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[1][0][1][1][0]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[1][0][1][1][1]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[1][1][0][0][0]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[1][1][0][0][1]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[1][1][0][1][0]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[1][1][0][1][1]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[1][1][1][0][0]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[1][1][1][0][1]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[1][1][1][1][0]; - result += - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1.a0[1][1][1][1][1]; - result += passUint8Struct32BytesInlineArrayMultiDimensionalI_a2; - result += passUint8Struct32BytesInlineArrayMultiDimensionalI_a3.a0[0][0][0]; - result += passUint8Struct32BytesInlineArrayMultiDimensionalI_a3.a0[0][0][1]; - result += passUint8Struct32BytesInlineArrayMultiDimensionalI_a3.a0[0][1][0]; - result += passUint8Struct32BytesInlineArrayMultiDimensionalI_a3.a0[0][1][1]; - result += passUint8Struct32BytesInlineArrayMultiDimensionalI_a3.a0[1][0][0]; - result += passUint8Struct32BytesInlineArrayMultiDimensionalI_a3.a0[1][0][1]; - result += passUint8Struct32BytesInlineArrayMultiDimensionalI_a3.a0[1][1][0]; - result += passUint8Struct32BytesInlineArrayMultiDimensionalI_a3.a0[1][1][1]; - result += passUint8Struct32BytesInlineArrayMultiDimensionalI_a4; - result += passUint8Struct32BytesInlineArrayMultiDimensionalI_a5.a0[0][0][0]; - result += passUint8Struct32BytesInlineArrayMultiDimensionalI_a5.a0[0][0][1]; - result += passUint8Struct32BytesInlineArrayMultiDimensionalI_a5.a0[0][1][0]; - result += passUint8Struct32BytesInlineArrayMultiDimensionalI_a5.a0[0][1][1]; - result += passUint8Struct32BytesInlineArrayMultiDimensionalI_a5.a0[1][0][0]; - result += passUint8Struct32BytesInlineArrayMultiDimensionalI_a5.a0[1][0][1]; - result += passUint8Struct32BytesInlineArrayMultiDimensionalI_a5.a0[1][1][0]; - result += passUint8Struct32BytesInlineArrayMultiDimensionalI_a5.a0[1][1][1]; - result += passUint8Struct32BytesInlineArrayMultiDimensionalI_a6; - - passUint8Struct32BytesInlineArrayMultiDimensionalIResult = result; - - return result; -} - -/// Test multi dimensional inline array struct as argument. -int passUint8Struct32BytesInlineArrayMultiDimensionalI( - int a0, - Struct32BytesInlineArrayMultiDimensionalInt a1, - int a2, - Struct8BytesInlineArrayMultiDimensionalInt a3, - int a4, - Struct8BytesInlineArrayMultiDimensionalInt a5, - int a6) { - print( - "passUint8Struct32BytesInlineArrayMultiDimensionalI(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception( - "PassUint8Struct32BytesInlineArrayMultiDimensionalI throwing on purpose!"); - } - - passUint8Struct32BytesInlineArrayMultiDimensionalI_a0 = a0; - passUint8Struct32BytesInlineArrayMultiDimensionalI_a1 = a1; - passUint8Struct32BytesInlineArrayMultiDimensionalI_a2 = a2; - passUint8Struct32BytesInlineArrayMultiDimensionalI_a3 = a3; - passUint8Struct32BytesInlineArrayMultiDimensionalI_a4 = a4; - passUint8Struct32BytesInlineArrayMultiDimensionalI_a5 = a5; - passUint8Struct32BytesInlineArrayMultiDimensionalI_a6 = a6; - - final result = - passUint8Struct32BytesInlineArrayMultiDimensionalICalculateResult(); - - print("result = $result"); - - return result; -} - -void passUint8Struct32BytesInlineArrayMultiDimensionalIAfterCallback() { - final result = - passUint8Struct32BytesInlineArrayMultiDimensionalICalculateResult(); - - print("after callback result = $result"); - - Expect.equals(1378, result); -} - -typedef PassUint8Struct4BytesInlineArrayMultiDimensionalInType = Uint32 - Function(Uint8, Struct4BytesInlineArrayMultiDimensionalInt, Uint8); - -// Global variables to be able to test inputs after callback returned. -int passUint8Struct4BytesInlineArrayMultiDimensionalIn_a0 = 0; -Struct4BytesInlineArrayMultiDimensionalInt - passUint8Struct4BytesInlineArrayMultiDimensionalIn_a1 = - Pointer.fromAddress(0).ref; -int passUint8Struct4BytesInlineArrayMultiDimensionalIn_a2 = 0; - -// Result variable also global, so we can delete it after the callback. -int passUint8Struct4BytesInlineArrayMultiDimensionalInResult = 0; - -int passUint8Struct4BytesInlineArrayMultiDimensionalInCalculateResult() { - int result = 0; - - result += passUint8Struct4BytesInlineArrayMultiDimensionalIn_a0; - result += passUint8Struct4BytesInlineArrayMultiDimensionalIn_a1.a0[0][0].a0; - result += passUint8Struct4BytesInlineArrayMultiDimensionalIn_a1.a0[0][1].a0; - result += passUint8Struct4BytesInlineArrayMultiDimensionalIn_a1.a0[1][0].a0; - result += passUint8Struct4BytesInlineArrayMultiDimensionalIn_a1.a0[1][1].a0; - result += passUint8Struct4BytesInlineArrayMultiDimensionalIn_a2; - - passUint8Struct4BytesInlineArrayMultiDimensionalInResult = result; - - return result; -} - -/// Test struct in multi dimensional inline array. -int passUint8Struct4BytesInlineArrayMultiDimensionalIn( - int a0, Struct4BytesInlineArrayMultiDimensionalInt a1, int a2) { - print( - "passUint8Struct4BytesInlineArrayMultiDimensionalIn(${a0}, ${a1}, ${a2})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception( - "PassUint8Struct4BytesInlineArrayMultiDimensionalIn throwing on purpose!"); - } - - passUint8Struct4BytesInlineArrayMultiDimensionalIn_a0 = a0; - passUint8Struct4BytesInlineArrayMultiDimensionalIn_a1 = a1; - passUint8Struct4BytesInlineArrayMultiDimensionalIn_a2 = a2; - - final result = - passUint8Struct4BytesInlineArrayMultiDimensionalInCalculateResult(); - - print("result = $result"); - - return result; -} - -void passUint8Struct4BytesInlineArrayMultiDimensionalInAfterCallback() { - final result = - passUint8Struct4BytesInlineArrayMultiDimensionalInCalculateResult(); - - print("after callback result = $result"); - - Expect.equals(5, result); -} - -typedef PassStruct3BytesPackedIntx10Type = Int64 Function( - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt); - -// Global variables to be able to test inputs after callback returned. -Struct3BytesPackedInt passStruct3BytesPackedIntx10_a0 = - Pointer.fromAddress(0).ref; -Struct3BytesPackedInt passStruct3BytesPackedIntx10_a1 = - Pointer.fromAddress(0).ref; -Struct3BytesPackedInt passStruct3BytesPackedIntx10_a2 = - Pointer.fromAddress(0).ref; -Struct3BytesPackedInt passStruct3BytesPackedIntx10_a3 = - Pointer.fromAddress(0).ref; -Struct3BytesPackedInt passStruct3BytesPackedIntx10_a4 = - Pointer.fromAddress(0).ref; -Struct3BytesPackedInt passStruct3BytesPackedIntx10_a5 = - Pointer.fromAddress(0).ref; -Struct3BytesPackedInt passStruct3BytesPackedIntx10_a6 = - Pointer.fromAddress(0).ref; -Struct3BytesPackedInt passStruct3BytesPackedIntx10_a7 = - Pointer.fromAddress(0).ref; -Struct3BytesPackedInt passStruct3BytesPackedIntx10_a8 = - Pointer.fromAddress(0).ref; -Struct3BytesPackedInt passStruct3BytesPackedIntx10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStruct3BytesPackedIntx10Result = 0; - -int passStruct3BytesPackedIntx10CalculateResult() { - int result = 0; - - result += passStruct3BytesPackedIntx10_a0.a0; - result += passStruct3BytesPackedIntx10_a0.a1; - result += passStruct3BytesPackedIntx10_a1.a0; - result += passStruct3BytesPackedIntx10_a1.a1; - result += passStruct3BytesPackedIntx10_a2.a0; - result += passStruct3BytesPackedIntx10_a2.a1; - result += passStruct3BytesPackedIntx10_a3.a0; - result += passStruct3BytesPackedIntx10_a3.a1; - result += passStruct3BytesPackedIntx10_a4.a0; - result += passStruct3BytesPackedIntx10_a4.a1; - result += passStruct3BytesPackedIntx10_a5.a0; - result += passStruct3BytesPackedIntx10_a5.a1; - result += passStruct3BytesPackedIntx10_a6.a0; - result += passStruct3BytesPackedIntx10_a6.a1; - result += passStruct3BytesPackedIntx10_a7.a0; - result += passStruct3BytesPackedIntx10_a7.a1; - result += passStruct3BytesPackedIntx10_a8.a0; - result += passStruct3BytesPackedIntx10_a8.a1; - result += passStruct3BytesPackedIntx10_a9.a0; - result += passStruct3BytesPackedIntx10_a9.a1; - - passStruct3BytesPackedIntx10Result = result; - - return result; -} - -/// Small struct with mis-aligned member. -int passStruct3BytesPackedIntx10( - Struct3BytesPackedInt a0, - Struct3BytesPackedInt a1, - Struct3BytesPackedInt a2, - Struct3BytesPackedInt a3, - Struct3BytesPackedInt a4, - Struct3BytesPackedInt a5, - Struct3BytesPackedInt a6, - Struct3BytesPackedInt a7, - Struct3BytesPackedInt a8, - Struct3BytesPackedInt a9) { - print( - "passStruct3BytesPackedIntx10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct3BytesPackedIntx10 throwing on purpose!"); - } - - passStruct3BytesPackedIntx10_a0 = a0; - passStruct3BytesPackedIntx10_a1 = a1; - passStruct3BytesPackedIntx10_a2 = a2; - passStruct3BytesPackedIntx10_a3 = a3; - passStruct3BytesPackedIntx10_a4 = a4; - passStruct3BytesPackedIntx10_a5 = a5; - passStruct3BytesPackedIntx10_a6 = a6; - passStruct3BytesPackedIntx10_a7 = a7; - passStruct3BytesPackedIntx10_a8 = a8; - passStruct3BytesPackedIntx10_a9 = a9; - - final result = passStruct3BytesPackedIntx10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct3BytesPackedIntx10AfterCallback() { - final result = passStruct3BytesPackedIntx10CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(10, result); -} - -typedef PassStruct8BytesPackedIntx10Type = Int64 Function( - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt); - -// Global variables to be able to test inputs after callback returned. -Struct8BytesPackedInt passStruct8BytesPackedIntx10_a0 = - Pointer.fromAddress(0).ref; -Struct8BytesPackedInt passStruct8BytesPackedIntx10_a1 = - Pointer.fromAddress(0).ref; -Struct8BytesPackedInt passStruct8BytesPackedIntx10_a2 = - Pointer.fromAddress(0).ref; -Struct8BytesPackedInt passStruct8BytesPackedIntx10_a3 = - Pointer.fromAddress(0).ref; -Struct8BytesPackedInt passStruct8BytesPackedIntx10_a4 = - Pointer.fromAddress(0).ref; -Struct8BytesPackedInt passStruct8BytesPackedIntx10_a5 = - Pointer.fromAddress(0).ref; -Struct8BytesPackedInt passStruct8BytesPackedIntx10_a6 = - Pointer.fromAddress(0).ref; -Struct8BytesPackedInt passStruct8BytesPackedIntx10_a7 = - Pointer.fromAddress(0).ref; -Struct8BytesPackedInt passStruct8BytesPackedIntx10_a8 = - Pointer.fromAddress(0).ref; -Struct8BytesPackedInt passStruct8BytesPackedIntx10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passStruct8BytesPackedIntx10Result = 0; - -int passStruct8BytesPackedIntx10CalculateResult() { - int result = 0; - - result += passStruct8BytesPackedIntx10_a0.a0; - result += passStruct8BytesPackedIntx10_a0.a1; - result += passStruct8BytesPackedIntx10_a0.a2; - result += passStruct8BytesPackedIntx10_a0.a3; - result += passStruct8BytesPackedIntx10_a0.a4; - result += passStruct8BytesPackedIntx10_a1.a0; - result += passStruct8BytesPackedIntx10_a1.a1; - result += passStruct8BytesPackedIntx10_a1.a2; - result += passStruct8BytesPackedIntx10_a1.a3; - result += passStruct8BytesPackedIntx10_a1.a4; - result += passStruct8BytesPackedIntx10_a2.a0; - result += passStruct8BytesPackedIntx10_a2.a1; - result += passStruct8BytesPackedIntx10_a2.a2; - result += passStruct8BytesPackedIntx10_a2.a3; - result += passStruct8BytesPackedIntx10_a2.a4; - result += passStruct8BytesPackedIntx10_a3.a0; - result += passStruct8BytesPackedIntx10_a3.a1; - result += passStruct8BytesPackedIntx10_a3.a2; - result += passStruct8BytesPackedIntx10_a3.a3; - result += passStruct8BytesPackedIntx10_a3.a4; - result += passStruct8BytesPackedIntx10_a4.a0; - result += passStruct8BytesPackedIntx10_a4.a1; - result += passStruct8BytesPackedIntx10_a4.a2; - result += passStruct8BytesPackedIntx10_a4.a3; - result += passStruct8BytesPackedIntx10_a4.a4; - result += passStruct8BytesPackedIntx10_a5.a0; - result += passStruct8BytesPackedIntx10_a5.a1; - result += passStruct8BytesPackedIntx10_a5.a2; - result += passStruct8BytesPackedIntx10_a5.a3; - result += passStruct8BytesPackedIntx10_a5.a4; - result += passStruct8BytesPackedIntx10_a6.a0; - result += passStruct8BytesPackedIntx10_a6.a1; - result += passStruct8BytesPackedIntx10_a6.a2; - result += passStruct8BytesPackedIntx10_a6.a3; - result += passStruct8BytesPackedIntx10_a6.a4; - result += passStruct8BytesPackedIntx10_a7.a0; - result += passStruct8BytesPackedIntx10_a7.a1; - result += passStruct8BytesPackedIntx10_a7.a2; - result += passStruct8BytesPackedIntx10_a7.a3; - result += passStruct8BytesPackedIntx10_a7.a4; - result += passStruct8BytesPackedIntx10_a8.a0; - result += passStruct8BytesPackedIntx10_a8.a1; - result += passStruct8BytesPackedIntx10_a8.a2; - result += passStruct8BytesPackedIntx10_a8.a3; - result += passStruct8BytesPackedIntx10_a8.a4; - result += passStruct8BytesPackedIntx10_a9.a0; - result += passStruct8BytesPackedIntx10_a9.a1; - result += passStruct8BytesPackedIntx10_a9.a2; - result += passStruct8BytesPackedIntx10_a9.a3; - result += passStruct8BytesPackedIntx10_a9.a4; - - passStruct8BytesPackedIntx10Result = result; - - return result; -} - -/// Struct with mis-aligned member. -int passStruct8BytesPackedIntx10( - Struct8BytesPackedInt a0, - Struct8BytesPackedInt a1, - Struct8BytesPackedInt a2, - Struct8BytesPackedInt a3, - Struct8BytesPackedInt a4, - Struct8BytesPackedInt a5, - Struct8BytesPackedInt a6, - Struct8BytesPackedInt a7, - Struct8BytesPackedInt a8, - Struct8BytesPackedInt a9) { - print( - "passStruct8BytesPackedIntx10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct8BytesPackedIntx10 throwing on purpose!"); - } - - passStruct8BytesPackedIntx10_a0 = a0; - passStruct8BytesPackedIntx10_a1 = a1; - passStruct8BytesPackedIntx10_a2 = a2; - passStruct8BytesPackedIntx10_a3 = a3; - passStruct8BytesPackedIntx10_a4 = a4; - passStruct8BytesPackedIntx10_a5 = a5; - passStruct8BytesPackedIntx10_a6 = a6; - passStruct8BytesPackedIntx10_a7 = a7; - passStruct8BytesPackedIntx10_a8 = a8; - passStruct8BytesPackedIntx10_a9 = a9; - - final result = passStruct8BytesPackedIntx10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct8BytesPackedIntx10AfterCallback() { - final result = passStruct8BytesPackedIntx10CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(1275, result); -} - -typedef PassStruct9BytesPackedMixedx10DoubleInt32x2Type = Double Function( - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Double, - Int32, - Int32); - -// Global variables to be able to test inputs after callback returned. -Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a0 = - Pointer.fromAddress(0).ref; -Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a1 = - Pointer.fromAddress(0).ref; -Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a2 = - Pointer.fromAddress(0).ref; -Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a3 = - Pointer.fromAddress(0).ref; -Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a4 = - Pointer.fromAddress(0).ref; -Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a5 = - Pointer.fromAddress(0).ref; -Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a6 = - Pointer.fromAddress(0).ref; -Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a7 = - Pointer.fromAddress(0).ref; -Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a8 = - Pointer.fromAddress(0).ref; -Struct9BytesPackedMixed passStruct9BytesPackedMixedx10DoubleInt32x2_a9 = - Pointer.fromAddress(0).ref; -double passStruct9BytesPackedMixedx10DoubleInt32x2_a10 = 0.0; -int passStruct9BytesPackedMixedx10DoubleInt32x2_a11 = 0; -int passStruct9BytesPackedMixedx10DoubleInt32x2_a12 = 0; - -// Result variable also global, so we can delete it after the callback. -double passStruct9BytesPackedMixedx10DoubleInt32x2Result = 0.0; - -double passStruct9BytesPackedMixedx10DoubleInt32x2CalculateResult() { - double result = 0; - - result += passStruct9BytesPackedMixedx10DoubleInt32x2_a0.a0; - result += passStruct9BytesPackedMixedx10DoubleInt32x2_a0.a1; - result += passStruct9BytesPackedMixedx10DoubleInt32x2_a1.a0; - result += passStruct9BytesPackedMixedx10DoubleInt32x2_a1.a1; - result += passStruct9BytesPackedMixedx10DoubleInt32x2_a2.a0; - result += passStruct9BytesPackedMixedx10DoubleInt32x2_a2.a1; - result += passStruct9BytesPackedMixedx10DoubleInt32x2_a3.a0; - result += passStruct9BytesPackedMixedx10DoubleInt32x2_a3.a1; - result += passStruct9BytesPackedMixedx10DoubleInt32x2_a4.a0; - result += passStruct9BytesPackedMixedx10DoubleInt32x2_a4.a1; - result += passStruct9BytesPackedMixedx10DoubleInt32x2_a5.a0; - result += passStruct9BytesPackedMixedx10DoubleInt32x2_a5.a1; - result += passStruct9BytesPackedMixedx10DoubleInt32x2_a6.a0; - result += passStruct9BytesPackedMixedx10DoubleInt32x2_a6.a1; - result += passStruct9BytesPackedMixedx10DoubleInt32x2_a7.a0; - result += passStruct9BytesPackedMixedx10DoubleInt32x2_a7.a1; - result += passStruct9BytesPackedMixedx10DoubleInt32x2_a8.a0; - result += passStruct9BytesPackedMixedx10DoubleInt32x2_a8.a1; - result += passStruct9BytesPackedMixedx10DoubleInt32x2_a9.a0; - result += passStruct9BytesPackedMixedx10DoubleInt32x2_a9.a1; - result += passStruct9BytesPackedMixedx10DoubleInt32x2_a10; - result += passStruct9BytesPackedMixedx10DoubleInt32x2_a11; - result += passStruct9BytesPackedMixedx10DoubleInt32x2_a12; - - passStruct9BytesPackedMixedx10DoubleInt32x2Result = result; - - return result; -} - -/// Struct with mis-aligned member. -/// Tests backfilling of CPU and FPU registers. -double passStruct9BytesPackedMixedx10DoubleInt32x2( - Struct9BytesPackedMixed a0, - Struct9BytesPackedMixed a1, - Struct9BytesPackedMixed a2, - Struct9BytesPackedMixed a3, - Struct9BytesPackedMixed a4, - Struct9BytesPackedMixed a5, - Struct9BytesPackedMixed a6, - Struct9BytesPackedMixed a7, - Struct9BytesPackedMixed a8, - Struct9BytesPackedMixed a9, - double a10, - int a11, - int a12) { - print( - "passStruct9BytesPackedMixedx10DoubleInt32x2(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9}, ${a10}, ${a11}, ${a12})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception( - "PassStruct9BytesPackedMixedx10DoubleInt32x2 throwing on purpose!"); - } - - passStruct9BytesPackedMixedx10DoubleInt32x2_a0 = a0; - passStruct9BytesPackedMixedx10DoubleInt32x2_a1 = a1; - passStruct9BytesPackedMixedx10DoubleInt32x2_a2 = a2; - passStruct9BytesPackedMixedx10DoubleInt32x2_a3 = a3; - passStruct9BytesPackedMixedx10DoubleInt32x2_a4 = a4; - passStruct9BytesPackedMixedx10DoubleInt32x2_a5 = a5; - passStruct9BytesPackedMixedx10DoubleInt32x2_a6 = a6; - passStruct9BytesPackedMixedx10DoubleInt32x2_a7 = a7; - passStruct9BytesPackedMixedx10DoubleInt32x2_a8 = a8; - passStruct9BytesPackedMixedx10DoubleInt32x2_a9 = a9; - passStruct9BytesPackedMixedx10DoubleInt32x2_a10 = a10; - passStruct9BytesPackedMixedx10DoubleInt32x2_a11 = a11; - passStruct9BytesPackedMixedx10DoubleInt32x2_a12 = a12; - - final result = passStruct9BytesPackedMixedx10DoubleInt32x2CalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct9BytesPackedMixedx10DoubleInt32x2AfterCallback() { - final result = passStruct9BytesPackedMixedx10DoubleInt32x2CalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(188.0, result); -} - -typedef PassStruct5BytesPackedMixedType = Double Function( - Struct5BytesPackedMixed); - -// Global variables to be able to test inputs after callback returned. -Struct5BytesPackedMixed passStruct5BytesPackedMixed_a0 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passStruct5BytesPackedMixedResult = 0.0; - -double passStruct5BytesPackedMixedCalculateResult() { - double result = 0; - - result += passStruct5BytesPackedMixed_a0.a0; - result += passStruct5BytesPackedMixed_a0.a1; - - passStruct5BytesPackedMixedResult = result; - - return result; -} - -/// This packed struct happens to have only aligned members. -double passStruct5BytesPackedMixed(Struct5BytesPackedMixed a0) { - print("passStruct5BytesPackedMixed(${a0})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassStruct5BytesPackedMixed throwing on purpose!"); - } - - passStruct5BytesPackedMixed_a0 = a0; - - final result = passStruct5BytesPackedMixedCalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct5BytesPackedMixedAfterCallback() { - final result = passStruct5BytesPackedMixedCalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(1.0, result); -} - -typedef PassStructNestedAlignmentStruct5BytesPackedMixedType = Double Function( - StructNestedAlignmentStruct5BytesPackedMixed); - -// Global variables to be able to test inputs after callback returned. -StructNestedAlignmentStruct5BytesPackedMixed - passStructNestedAlignmentStruct5BytesPackedMixed_a0 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passStructNestedAlignmentStruct5BytesPackedMixedResult = 0.0; - -double passStructNestedAlignmentStruct5BytesPackedMixedCalculateResult() { - double result = 0; - - result += passStructNestedAlignmentStruct5BytesPackedMixed_a0.a0; - result += passStructNestedAlignmentStruct5BytesPackedMixed_a0.a1.a0; - result += passStructNestedAlignmentStruct5BytesPackedMixed_a0.a1.a1; - - passStructNestedAlignmentStruct5BytesPackedMixedResult = result; - - return result; -} - -/// Check alignment of packed struct in non-packed struct. -double passStructNestedAlignmentStruct5BytesPackedMixed( - StructNestedAlignmentStruct5BytesPackedMixed a0) { - print("passStructNestedAlignmentStruct5BytesPackedMixed(${a0})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception( - "PassStructNestedAlignmentStruct5BytesPackedMixed throwing on purpose!"); - } - - passStructNestedAlignmentStruct5BytesPackedMixed_a0 = a0; - - final result = - passStructNestedAlignmentStruct5BytesPackedMixedCalculateResult(); - - print("result = $result"); - - return result; -} - -void passStructNestedAlignmentStruct5BytesPackedMixedAfterCallback() { - final result = - passStructNestedAlignmentStruct5BytesPackedMixedCalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(6.0, result); -} - -typedef PassStruct6BytesInlineArrayIntType = Double Function( - Struct6BytesInlineArrayInt); - -// Global variables to be able to test inputs after callback returned. -Struct6BytesInlineArrayInt passStruct6BytesInlineArrayInt_a0 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passStruct6BytesInlineArrayIntResult = 0.0; - -double passStruct6BytesInlineArrayIntCalculateResult() { - double result = 0; - - result += passStruct6BytesInlineArrayInt_a0.a0[0].a0; - result += passStruct6BytesInlineArrayInt_a0.a0[0].a1; - result += passStruct6BytesInlineArrayInt_a0.a0[1].a0; - result += passStruct6BytesInlineArrayInt_a0.a0[1].a1; - - passStruct6BytesInlineArrayIntResult = result; - - return result; -} - -/// Check alignment of packed struct array in non-packed struct. -double passStruct6BytesInlineArrayInt(Struct6BytesInlineArrayInt a0) { - print("passStruct6BytesInlineArrayInt(${a0})"); - - // In legacy mode, possibly return null. - if (a0.a0[0].a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0[0].a0 == 42 || a0.a0[0].a0 == 84) { - print("throwing!"); - throw Exception("PassStruct6BytesInlineArrayInt throwing on purpose!"); - } - - passStruct6BytesInlineArrayInt_a0 = a0; - - final result = passStruct6BytesInlineArrayIntCalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct6BytesInlineArrayIntAfterCallback() { - final result = passStruct6BytesInlineArrayIntCalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(2.0, result); -} - -typedef PassStruct15BytesInlineArrayMixedType = Double Function( - Struct15BytesInlineArrayMixed); - -// Global variables to be able to test inputs after callback returned. -Struct15BytesInlineArrayMixed passStruct15BytesInlineArrayMixed_a0 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passStruct15BytesInlineArrayMixedResult = 0.0; - -double passStruct15BytesInlineArrayMixedCalculateResult() { - double result = 0; - - result += passStruct15BytesInlineArrayMixed_a0.a0[0].a0; - result += passStruct15BytesInlineArrayMixed_a0.a0[0].a1; - result += passStruct15BytesInlineArrayMixed_a0.a0[1].a0; - result += passStruct15BytesInlineArrayMixed_a0.a0[1].a1; - result += passStruct15BytesInlineArrayMixed_a0.a0[2].a0; - result += passStruct15BytesInlineArrayMixed_a0.a0[2].a1; - - passStruct15BytesInlineArrayMixedResult = result; - - return result; -} - -/// Check alignment of packed struct array in non-packed struct. -double passStruct15BytesInlineArrayMixed(Struct15BytesInlineArrayMixed a0) { - print("passStruct15BytesInlineArrayMixed(${a0})"); - - // In legacy mode, possibly return null. - if (a0.a0[0].a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0[0].a0 == 42 || a0.a0[0].a0 == 84) { - print("throwing!"); - throw Exception("PassStruct15BytesInlineArrayMixed throwing on purpose!"); - } - - passStruct15BytesInlineArrayMixed_a0 = a0; - - final result = passStruct15BytesInlineArrayMixedCalculateResult(); - - print("result = $result"); - - return result; -} - -void passStruct15BytesInlineArrayMixedAfterCallback() { - final result = passStruct15BytesInlineArrayMixedCalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(3.0, result); -} - -typedef PassUnion4BytesMixedx10Type = Double Function( - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed); - -// Global variables to be able to test inputs after callback returned. -Union4BytesMixed passUnion4BytesMixedx10_a0 = - Pointer.fromAddress(0).ref; -Union4BytesMixed passUnion4BytesMixedx10_a1 = - Pointer.fromAddress(0).ref; -Union4BytesMixed passUnion4BytesMixedx10_a2 = - Pointer.fromAddress(0).ref; -Union4BytesMixed passUnion4BytesMixedx10_a3 = - Pointer.fromAddress(0).ref; -Union4BytesMixed passUnion4BytesMixedx10_a4 = - Pointer.fromAddress(0).ref; -Union4BytesMixed passUnion4BytesMixedx10_a5 = - Pointer.fromAddress(0).ref; -Union4BytesMixed passUnion4BytesMixedx10_a6 = - Pointer.fromAddress(0).ref; -Union4BytesMixed passUnion4BytesMixedx10_a7 = - Pointer.fromAddress(0).ref; -Union4BytesMixed passUnion4BytesMixedx10_a8 = - Pointer.fromAddress(0).ref; -Union4BytesMixed passUnion4BytesMixedx10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passUnion4BytesMixedx10Result = 0.0; - -double passUnion4BytesMixedx10CalculateResult() { - double result = 0; - - result += passUnion4BytesMixedx10_a0.a0; - result += passUnion4BytesMixedx10_a1.a0; - result += passUnion4BytesMixedx10_a2.a0; - result += passUnion4BytesMixedx10_a3.a0; - result += passUnion4BytesMixedx10_a4.a0; - result += passUnion4BytesMixedx10_a5.a0; - result += passUnion4BytesMixedx10_a6.a0; - result += passUnion4BytesMixedx10_a7.a0; - result += passUnion4BytesMixedx10_a8.a0; - result += passUnion4BytesMixedx10_a9.a0; - - passUnion4BytesMixedx10Result = result; - - return result; -} - -/// Check placement of mixed integer/float union. -double passUnion4BytesMixedx10( - Union4BytesMixed a0, - Union4BytesMixed a1, - Union4BytesMixed a2, - Union4BytesMixed a3, - Union4BytesMixed a4, - Union4BytesMixed a5, - Union4BytesMixed a6, - Union4BytesMixed a7, - Union4BytesMixed a8, - Union4BytesMixed a9) { - print( - "passUnion4BytesMixedx10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassUnion4BytesMixedx10 throwing on purpose!"); - } - - passUnion4BytesMixedx10_a0 = a0; - passUnion4BytesMixedx10_a1 = a1; - passUnion4BytesMixedx10_a2 = a2; - passUnion4BytesMixedx10_a3 = a3; - passUnion4BytesMixedx10_a4 = a4; - passUnion4BytesMixedx10_a5 = a5; - passUnion4BytesMixedx10_a6 = a6; - passUnion4BytesMixedx10_a7 = a7; - passUnion4BytesMixedx10_a8 = a8; - passUnion4BytesMixedx10_a9 = a9; - - final result = passUnion4BytesMixedx10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passUnion4BytesMixedx10AfterCallback() { - final result = passUnion4BytesMixedx10CalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(55.0, result); -} - -typedef PassUnion8BytesNestedFloatx10Type = Double Function( - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat); - -// Global variables to be able to test inputs after callback returned. -Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a0 = - Pointer.fromAddress(0).ref; -Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a1 = - Pointer.fromAddress(0).ref; -Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a2 = - Pointer.fromAddress(0).ref; -Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a3 = - Pointer.fromAddress(0).ref; -Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a4 = - Pointer.fromAddress(0).ref; -Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a5 = - Pointer.fromAddress(0).ref; -Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a6 = - Pointer.fromAddress(0).ref; -Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a7 = - Pointer.fromAddress(0).ref; -Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a8 = - Pointer.fromAddress(0).ref; -Union8BytesNestedFloat passUnion8BytesNestedFloatx10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passUnion8BytesNestedFloatx10Result = 0.0; - -double passUnion8BytesNestedFloatx10CalculateResult() { - double result = 0; - - result += passUnion8BytesNestedFloatx10_a0.a0; - result += passUnion8BytesNestedFloatx10_a1.a0; - result += passUnion8BytesNestedFloatx10_a2.a0; - result += passUnion8BytesNestedFloatx10_a3.a0; - result += passUnion8BytesNestedFloatx10_a4.a0; - result += passUnion8BytesNestedFloatx10_a5.a0; - result += passUnion8BytesNestedFloatx10_a6.a0; - result += passUnion8BytesNestedFloatx10_a7.a0; - result += passUnion8BytesNestedFloatx10_a8.a0; - result += passUnion8BytesNestedFloatx10_a9.a0; - - passUnion8BytesNestedFloatx10Result = result; - - return result; -} - -/// Check placement of mixed floats union. -double passUnion8BytesNestedFloatx10( - Union8BytesNestedFloat a0, - Union8BytesNestedFloat a1, - Union8BytesNestedFloat a2, - Union8BytesNestedFloat a3, - Union8BytesNestedFloat a4, - Union8BytesNestedFloat a5, - Union8BytesNestedFloat a6, - Union8BytesNestedFloat a7, - Union8BytesNestedFloat a8, - Union8BytesNestedFloat a9) { - print( - "passUnion8BytesNestedFloatx10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("PassUnion8BytesNestedFloatx10 throwing on purpose!"); - } - - passUnion8BytesNestedFloatx10_a0 = a0; - passUnion8BytesNestedFloatx10_a1 = a1; - passUnion8BytesNestedFloatx10_a2 = a2; - passUnion8BytesNestedFloatx10_a3 = a3; - passUnion8BytesNestedFloatx10_a4 = a4; - passUnion8BytesNestedFloatx10_a5 = a5; - passUnion8BytesNestedFloatx10_a6 = a6; - passUnion8BytesNestedFloatx10_a7 = a7; - passUnion8BytesNestedFloatx10_a8 = a8; - passUnion8BytesNestedFloatx10_a9 = a9; - - final result = passUnion8BytesNestedFloatx10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passUnion8BytesNestedFloatx10AfterCallback() { - final result = passUnion8BytesNestedFloatx10CalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(5.0, result); -} - -typedef PassUnion9BytesNestedIntx10Type = Double Function( - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt); - -// Global variables to be able to test inputs after callback returned. -Union9BytesNestedInt passUnion9BytesNestedIntx10_a0 = - Pointer.fromAddress(0).ref; -Union9BytesNestedInt passUnion9BytesNestedIntx10_a1 = - Pointer.fromAddress(0).ref; -Union9BytesNestedInt passUnion9BytesNestedIntx10_a2 = - Pointer.fromAddress(0).ref; -Union9BytesNestedInt passUnion9BytesNestedIntx10_a3 = - Pointer.fromAddress(0).ref; -Union9BytesNestedInt passUnion9BytesNestedIntx10_a4 = - Pointer.fromAddress(0).ref; -Union9BytesNestedInt passUnion9BytesNestedIntx10_a5 = - Pointer.fromAddress(0).ref; -Union9BytesNestedInt passUnion9BytesNestedIntx10_a6 = - Pointer.fromAddress(0).ref; -Union9BytesNestedInt passUnion9BytesNestedIntx10_a7 = - Pointer.fromAddress(0).ref; -Union9BytesNestedInt passUnion9BytesNestedIntx10_a8 = - Pointer.fromAddress(0).ref; -Union9BytesNestedInt passUnion9BytesNestedIntx10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passUnion9BytesNestedIntx10Result = 0.0; - -double passUnion9BytesNestedIntx10CalculateResult() { - double result = 0; - - result += passUnion9BytesNestedIntx10_a0.a0.a0; - result += passUnion9BytesNestedIntx10_a0.a0.a1; - result += passUnion9BytesNestedIntx10_a0.a0.a2; - result += passUnion9BytesNestedIntx10_a1.a0.a0; - result += passUnion9BytesNestedIntx10_a1.a0.a1; - result += passUnion9BytesNestedIntx10_a1.a0.a2; - result += passUnion9BytesNestedIntx10_a2.a0.a0; - result += passUnion9BytesNestedIntx10_a2.a0.a1; - result += passUnion9BytesNestedIntx10_a2.a0.a2; - result += passUnion9BytesNestedIntx10_a3.a0.a0; - result += passUnion9BytesNestedIntx10_a3.a0.a1; - result += passUnion9BytesNestedIntx10_a3.a0.a2; - result += passUnion9BytesNestedIntx10_a4.a0.a0; - result += passUnion9BytesNestedIntx10_a4.a0.a1; - result += passUnion9BytesNestedIntx10_a4.a0.a2; - result += passUnion9BytesNestedIntx10_a5.a0.a0; - result += passUnion9BytesNestedIntx10_a5.a0.a1; - result += passUnion9BytesNestedIntx10_a5.a0.a2; - result += passUnion9BytesNestedIntx10_a6.a0.a0; - result += passUnion9BytesNestedIntx10_a6.a0.a1; - result += passUnion9BytesNestedIntx10_a6.a0.a2; - result += passUnion9BytesNestedIntx10_a7.a0.a0; - result += passUnion9BytesNestedIntx10_a7.a0.a1; - result += passUnion9BytesNestedIntx10_a7.a0.a2; - result += passUnion9BytesNestedIntx10_a8.a0.a0; - result += passUnion9BytesNestedIntx10_a8.a0.a1; - result += passUnion9BytesNestedIntx10_a8.a0.a2; - result += passUnion9BytesNestedIntx10_a9.a0.a0; - result += passUnion9BytesNestedIntx10_a9.a0.a1; - result += passUnion9BytesNestedIntx10_a9.a0.a2; - - passUnion9BytesNestedIntx10Result = result; - - return result; -} - -/// Mixed-size union argument. -double passUnion9BytesNestedIntx10( - Union9BytesNestedInt a0, - Union9BytesNestedInt a1, - Union9BytesNestedInt a2, - Union9BytesNestedInt a3, - Union9BytesNestedInt a4, - Union9BytesNestedInt a5, - Union9BytesNestedInt a6, - Union9BytesNestedInt a7, - Union9BytesNestedInt a8, - Union9BytesNestedInt a9) { - print( - "passUnion9BytesNestedIntx10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0.a0 == 42 || a0.a0.a0 == 84) { - print("throwing!"); - throw Exception("PassUnion9BytesNestedIntx10 throwing on purpose!"); - } - - passUnion9BytesNestedIntx10_a0 = a0; - passUnion9BytesNestedIntx10_a1 = a1; - passUnion9BytesNestedIntx10_a2 = a2; - passUnion9BytesNestedIntx10_a3 = a3; - passUnion9BytesNestedIntx10_a4 = a4; - passUnion9BytesNestedIntx10_a5 = a5; - passUnion9BytesNestedIntx10_a6 = a6; - passUnion9BytesNestedIntx10_a7 = a7; - passUnion9BytesNestedIntx10_a8 = a8; - passUnion9BytesNestedIntx10_a9 = a9; - - final result = passUnion9BytesNestedIntx10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passUnion9BytesNestedIntx10AfterCallback() { - final result = passUnion9BytesNestedIntx10CalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(15.0, result); -} - -typedef PassUnion16BytesNestedInlineArrayFloatx10Type = Double Function( - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat); - -// Global variables to be able to test inputs after callback returned. -Union16BytesNestedInlineArrayFloat - passUnion16BytesNestedInlineArrayFloatx10_a0 = - Pointer.fromAddress(0).ref; -Union16BytesNestedInlineArrayFloat - passUnion16BytesNestedInlineArrayFloatx10_a1 = - Pointer.fromAddress(0).ref; -Union16BytesNestedInlineArrayFloat - passUnion16BytesNestedInlineArrayFloatx10_a2 = - Pointer.fromAddress(0).ref; -Union16BytesNestedInlineArrayFloat - passUnion16BytesNestedInlineArrayFloatx10_a3 = - Pointer.fromAddress(0).ref; -Union16BytesNestedInlineArrayFloat - passUnion16BytesNestedInlineArrayFloatx10_a4 = - Pointer.fromAddress(0).ref; -Union16BytesNestedInlineArrayFloat - passUnion16BytesNestedInlineArrayFloatx10_a5 = - Pointer.fromAddress(0).ref; -Union16BytesNestedInlineArrayFloat - passUnion16BytesNestedInlineArrayFloatx10_a6 = - Pointer.fromAddress(0).ref; -Union16BytesNestedInlineArrayFloat - passUnion16BytesNestedInlineArrayFloatx10_a7 = - Pointer.fromAddress(0).ref; -Union16BytesNestedInlineArrayFloat - passUnion16BytesNestedInlineArrayFloatx10_a8 = - Pointer.fromAddress(0).ref; -Union16BytesNestedInlineArrayFloat - passUnion16BytesNestedInlineArrayFloatx10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passUnion16BytesNestedInlineArrayFloatx10Result = 0.0; - -double passUnion16BytesNestedInlineArrayFloatx10CalculateResult() { - double result = 0; - - result += passUnion16BytesNestedInlineArrayFloatx10_a0.a0[0]; - result += passUnion16BytesNestedInlineArrayFloatx10_a0.a0[1]; - result += passUnion16BytesNestedInlineArrayFloatx10_a0.a0[2]; - result += passUnion16BytesNestedInlineArrayFloatx10_a0.a0[3]; - result += passUnion16BytesNestedInlineArrayFloatx10_a1.a0[0]; - result += passUnion16BytesNestedInlineArrayFloatx10_a1.a0[1]; - result += passUnion16BytesNestedInlineArrayFloatx10_a1.a0[2]; - result += passUnion16BytesNestedInlineArrayFloatx10_a1.a0[3]; - result += passUnion16BytesNestedInlineArrayFloatx10_a2.a0[0]; - result += passUnion16BytesNestedInlineArrayFloatx10_a2.a0[1]; - result += passUnion16BytesNestedInlineArrayFloatx10_a2.a0[2]; - result += passUnion16BytesNestedInlineArrayFloatx10_a2.a0[3]; - result += passUnion16BytesNestedInlineArrayFloatx10_a3.a0[0]; - result += passUnion16BytesNestedInlineArrayFloatx10_a3.a0[1]; - result += passUnion16BytesNestedInlineArrayFloatx10_a3.a0[2]; - result += passUnion16BytesNestedInlineArrayFloatx10_a3.a0[3]; - result += passUnion16BytesNestedInlineArrayFloatx10_a4.a0[0]; - result += passUnion16BytesNestedInlineArrayFloatx10_a4.a0[1]; - result += passUnion16BytesNestedInlineArrayFloatx10_a4.a0[2]; - result += passUnion16BytesNestedInlineArrayFloatx10_a4.a0[3]; - result += passUnion16BytesNestedInlineArrayFloatx10_a5.a0[0]; - result += passUnion16BytesNestedInlineArrayFloatx10_a5.a0[1]; - result += passUnion16BytesNestedInlineArrayFloatx10_a5.a0[2]; - result += passUnion16BytesNestedInlineArrayFloatx10_a5.a0[3]; - result += passUnion16BytesNestedInlineArrayFloatx10_a6.a0[0]; - result += passUnion16BytesNestedInlineArrayFloatx10_a6.a0[1]; - result += passUnion16BytesNestedInlineArrayFloatx10_a6.a0[2]; - result += passUnion16BytesNestedInlineArrayFloatx10_a6.a0[3]; - result += passUnion16BytesNestedInlineArrayFloatx10_a7.a0[0]; - result += passUnion16BytesNestedInlineArrayFloatx10_a7.a0[1]; - result += passUnion16BytesNestedInlineArrayFloatx10_a7.a0[2]; - result += passUnion16BytesNestedInlineArrayFloatx10_a7.a0[3]; - result += passUnion16BytesNestedInlineArrayFloatx10_a8.a0[0]; - result += passUnion16BytesNestedInlineArrayFloatx10_a8.a0[1]; - result += passUnion16BytesNestedInlineArrayFloatx10_a8.a0[2]; - result += passUnion16BytesNestedInlineArrayFloatx10_a8.a0[3]; - result += passUnion16BytesNestedInlineArrayFloatx10_a9.a0[0]; - result += passUnion16BytesNestedInlineArrayFloatx10_a9.a0[1]; - result += passUnion16BytesNestedInlineArrayFloatx10_a9.a0[2]; - result += passUnion16BytesNestedInlineArrayFloatx10_a9.a0[3]; - - passUnion16BytesNestedInlineArrayFloatx10Result = result; - - return result; -} - -/// Union with homogenous floats. -double passUnion16BytesNestedInlineArrayFloatx10( - Union16BytesNestedInlineArrayFloat a0, - Union16BytesNestedInlineArrayFloat a1, - Union16BytesNestedInlineArrayFloat a2, - Union16BytesNestedInlineArrayFloat a3, - Union16BytesNestedInlineArrayFloat a4, - Union16BytesNestedInlineArrayFloat a5, - Union16BytesNestedInlineArrayFloat a6, - Union16BytesNestedInlineArrayFloat a7, - Union16BytesNestedInlineArrayFloat a8, - Union16BytesNestedInlineArrayFloat a9) { - print( - "passUnion16BytesNestedInlineArrayFloatx10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0[0] == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0[0] == 42 || a0.a0[0] == 84) { - print("throwing!"); - throw Exception( - "PassUnion16BytesNestedInlineArrayFloatx10 throwing on purpose!"); - } - - passUnion16BytesNestedInlineArrayFloatx10_a0 = a0; - passUnion16BytesNestedInlineArrayFloatx10_a1 = a1; - passUnion16BytesNestedInlineArrayFloatx10_a2 = a2; - passUnion16BytesNestedInlineArrayFloatx10_a3 = a3; - passUnion16BytesNestedInlineArrayFloatx10_a4 = a4; - passUnion16BytesNestedInlineArrayFloatx10_a5 = a5; - passUnion16BytesNestedInlineArrayFloatx10_a6 = a6; - passUnion16BytesNestedInlineArrayFloatx10_a7 = a7; - passUnion16BytesNestedInlineArrayFloatx10_a8 = a8; - passUnion16BytesNestedInlineArrayFloatx10_a9 = a9; - - final result = passUnion16BytesNestedInlineArrayFloatx10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passUnion16BytesNestedInlineArrayFloatx10AfterCallback() { - final result = passUnion16BytesNestedInlineArrayFloatx10CalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(20.0, result); -} - -typedef PassUnion16BytesNestedFloatx10Type = Double Function( - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat); - -// Global variables to be able to test inputs after callback returned. -Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a0 = - Pointer.fromAddress(0).ref; -Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a1 = - Pointer.fromAddress(0).ref; -Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a2 = - Pointer.fromAddress(0).ref; -Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a3 = - Pointer.fromAddress(0).ref; -Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a4 = - Pointer.fromAddress(0).ref; -Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a5 = - Pointer.fromAddress(0).ref; -Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a6 = - Pointer.fromAddress(0).ref; -Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a7 = - Pointer.fromAddress(0).ref; -Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a8 = - Pointer.fromAddress(0).ref; -Union16BytesNestedFloat passUnion16BytesNestedFloatx10_a9 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -double passUnion16BytesNestedFloatx10Result = 0.0; - -double passUnion16BytesNestedFloatx10CalculateResult() { - double result = 0; - - result += passUnion16BytesNestedFloatx10_a0.a0.a0; - result += passUnion16BytesNestedFloatx10_a0.a0.a1; - result += passUnion16BytesNestedFloatx10_a1.a0.a0; - result += passUnion16BytesNestedFloatx10_a1.a0.a1; - result += passUnion16BytesNestedFloatx10_a2.a0.a0; - result += passUnion16BytesNestedFloatx10_a2.a0.a1; - result += passUnion16BytesNestedFloatx10_a3.a0.a0; - result += passUnion16BytesNestedFloatx10_a3.a0.a1; - result += passUnion16BytesNestedFloatx10_a4.a0.a0; - result += passUnion16BytesNestedFloatx10_a4.a0.a1; - result += passUnion16BytesNestedFloatx10_a5.a0.a0; - result += passUnion16BytesNestedFloatx10_a5.a0.a1; - result += passUnion16BytesNestedFloatx10_a6.a0.a0; - result += passUnion16BytesNestedFloatx10_a6.a0.a1; - result += passUnion16BytesNestedFloatx10_a7.a0.a0; - result += passUnion16BytesNestedFloatx10_a7.a0.a1; - result += passUnion16BytesNestedFloatx10_a8.a0.a0; - result += passUnion16BytesNestedFloatx10_a8.a0.a1; - result += passUnion16BytesNestedFloatx10_a9.a0.a0; - result += passUnion16BytesNestedFloatx10_a9.a0.a1; - - passUnion16BytesNestedFloatx10Result = result; - - return result; -} - -/// Union with homogenous floats. -double passUnion16BytesNestedFloatx10( - Union16BytesNestedFloat a0, - Union16BytesNestedFloat a1, - Union16BytesNestedFloat a2, - Union16BytesNestedFloat a3, - Union16BytesNestedFloat a4, - Union16BytesNestedFloat a5, - Union16BytesNestedFloat a6, - Union16BytesNestedFloat a7, - Union16BytesNestedFloat a8, - Union16BytesNestedFloat a9) { - print( - "passUnion16BytesNestedFloatx10(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"); - - // In legacy mode, possibly return null. - if (a0.a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0.a0 == 42 || a0.a0.a0 == 84) { - print("throwing!"); - throw Exception("PassUnion16BytesNestedFloatx10 throwing on purpose!"); - } - - passUnion16BytesNestedFloatx10_a0 = a0; - passUnion16BytesNestedFloatx10_a1 = a1; - passUnion16BytesNestedFloatx10_a2 = a2; - passUnion16BytesNestedFloatx10_a3 = a3; - passUnion16BytesNestedFloatx10_a4 = a4; - passUnion16BytesNestedFloatx10_a5 = a5; - passUnion16BytesNestedFloatx10_a6 = a6; - passUnion16BytesNestedFloatx10_a7 = a7; - passUnion16BytesNestedFloatx10_a8 = a8; - passUnion16BytesNestedFloatx10_a9 = a9; - - final result = passUnion16BytesNestedFloatx10CalculateResult(); - - print("result = $result"); - - return result; -} - -void passUnion16BytesNestedFloatx10AfterCallback() { - final result = passUnion16BytesNestedFloatx10CalculateResult(); - - print("after callback result = $result"); - - Expect.approxEquals(10.0, result); -} - -typedef PassUint8Boolx9Struct10BytesHomogeneousBoolBoolType = Int32 Function( - Uint8, - Bool, - Bool, - Bool, - Bool, - Bool, - Bool, - Bool, - Bool, - Bool, - Struct10BytesHomogeneousBool, - Bool); - -// Global variables to be able to test inputs after callback returned. -int passUint8Boolx9Struct10BytesHomogeneousBoolBool_a0 = 0; -bool passUint8Boolx9Struct10BytesHomogeneousBoolBool_a1 = false; -bool passUint8Boolx9Struct10BytesHomogeneousBoolBool_a2 = false; -bool passUint8Boolx9Struct10BytesHomogeneousBoolBool_a3 = false; -bool passUint8Boolx9Struct10BytesHomogeneousBoolBool_a4 = false; -bool passUint8Boolx9Struct10BytesHomogeneousBoolBool_a5 = false; -bool passUint8Boolx9Struct10BytesHomogeneousBoolBool_a6 = false; -bool passUint8Boolx9Struct10BytesHomogeneousBoolBool_a7 = false; -bool passUint8Boolx9Struct10BytesHomogeneousBoolBool_a8 = false; -bool passUint8Boolx9Struct10BytesHomogeneousBoolBool_a9 = false; -Struct10BytesHomogeneousBool - passUint8Boolx9Struct10BytesHomogeneousBoolBool_a10 = - Pointer.fromAddress(0).ref; -bool passUint8Boolx9Struct10BytesHomogeneousBoolBool_a11 = false; - -// Result variable also global, so we can delete it after the callback. -int passUint8Boolx9Struct10BytesHomogeneousBoolBoolResult = 0; - -int passUint8Boolx9Struct10BytesHomogeneousBoolBoolCalculateResult() { - int result = 0; - - result += passUint8Boolx9Struct10BytesHomogeneousBoolBool_a0; - result += passUint8Boolx9Struct10BytesHomogeneousBoolBool_a1 ? 1 : 0; - result += passUint8Boolx9Struct10BytesHomogeneousBoolBool_a2 ? 1 : 0; - result += passUint8Boolx9Struct10BytesHomogeneousBoolBool_a3 ? 1 : 0; - result += passUint8Boolx9Struct10BytesHomogeneousBoolBool_a4 ? 1 : 0; - result += passUint8Boolx9Struct10BytesHomogeneousBoolBool_a5 ? 1 : 0; - result += passUint8Boolx9Struct10BytesHomogeneousBoolBool_a6 ? 1 : 0; - result += passUint8Boolx9Struct10BytesHomogeneousBoolBool_a7 ? 1 : 0; - result += passUint8Boolx9Struct10BytesHomogeneousBoolBool_a8 ? 1 : 0; - result += passUint8Boolx9Struct10BytesHomogeneousBoolBool_a9 ? 1 : 0; - result += passUint8Boolx9Struct10BytesHomogeneousBoolBool_a10.a0 ? 1 : 0; - result += passUint8Boolx9Struct10BytesHomogeneousBoolBool_a10.a1 ? 1 : 0; - result += passUint8Boolx9Struct10BytesHomogeneousBoolBool_a10.a2 ? 1 : 0; - result += passUint8Boolx9Struct10BytesHomogeneousBoolBool_a10.a3 ? 1 : 0; - result += passUint8Boolx9Struct10BytesHomogeneousBoolBool_a10.a4 ? 1 : 0; - result += passUint8Boolx9Struct10BytesHomogeneousBoolBool_a10.a5 ? 1 : 0; - result += passUint8Boolx9Struct10BytesHomogeneousBoolBool_a10.a6 ? 1 : 0; - result += passUint8Boolx9Struct10BytesHomogeneousBoolBool_a10.a7 ? 1 : 0; - result += passUint8Boolx9Struct10BytesHomogeneousBoolBool_a10.a8 ? 1 : 0; - result += passUint8Boolx9Struct10BytesHomogeneousBoolBool_a10.a9 ? 1 : 0; - result += passUint8Boolx9Struct10BytesHomogeneousBoolBool_a11 ? 1 : 0; - - passUint8Boolx9Struct10BytesHomogeneousBoolBoolResult = result; - - return result; -} - -/// Passing bools and a struct with bools. -/// Exhausts the registers to test bools and the bool struct alignment on the -/// stack. -int passUint8Boolx9Struct10BytesHomogeneousBoolBool( - int a0, - bool a1, - bool a2, - bool a3, - bool a4, - bool a5, - bool a6, - bool a7, - bool a8, - bool a9, - Struct10BytesHomogeneousBool a10, - bool a11) { - print( - "passUint8Boolx9Struct10BytesHomogeneousBoolBool(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9}, ${a10}, ${a11})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception( - "PassUint8Boolx9Struct10BytesHomogeneousBoolBool throwing on purpose!"); - } - - passUint8Boolx9Struct10BytesHomogeneousBoolBool_a0 = a0; - passUint8Boolx9Struct10BytesHomogeneousBoolBool_a1 = a1; - passUint8Boolx9Struct10BytesHomogeneousBoolBool_a2 = a2; - passUint8Boolx9Struct10BytesHomogeneousBoolBool_a3 = a3; - passUint8Boolx9Struct10BytesHomogeneousBoolBool_a4 = a4; - passUint8Boolx9Struct10BytesHomogeneousBoolBool_a5 = a5; - passUint8Boolx9Struct10BytesHomogeneousBoolBool_a6 = a6; - passUint8Boolx9Struct10BytesHomogeneousBoolBool_a7 = a7; - passUint8Boolx9Struct10BytesHomogeneousBoolBool_a8 = a8; - passUint8Boolx9Struct10BytesHomogeneousBoolBool_a9 = a9; - passUint8Boolx9Struct10BytesHomogeneousBoolBool_a10 = a10; - passUint8Boolx9Struct10BytesHomogeneousBoolBool_a11 = a11; - - final result = - passUint8Boolx9Struct10BytesHomogeneousBoolBoolCalculateResult(); - - print("result = $result"); - - return result; -} - -void passUint8Boolx9Struct10BytesHomogeneousBoolBoolAfterCallback() { - final result = - passUint8Boolx9Struct10BytesHomogeneousBoolBoolCalculateResult(); - - print("after callback result = $result"); - - Expect.equals(11, result); -} - -typedef PassUint8Boolx9Struct10BytesInlineArrayBoolBoolType = Int32 Function( - Uint8, - Bool, - Bool, - Bool, - Bool, - Bool, - Bool, - Bool, - Bool, - Bool, - Struct10BytesInlineArrayBool, - Bool); - -// Global variables to be able to test inputs after callback returned. -int passUint8Boolx9Struct10BytesInlineArrayBoolBool_a0 = 0; -bool passUint8Boolx9Struct10BytesInlineArrayBoolBool_a1 = false; -bool passUint8Boolx9Struct10BytesInlineArrayBoolBool_a2 = false; -bool passUint8Boolx9Struct10BytesInlineArrayBoolBool_a3 = false; -bool passUint8Boolx9Struct10BytesInlineArrayBoolBool_a4 = false; -bool passUint8Boolx9Struct10BytesInlineArrayBoolBool_a5 = false; -bool passUint8Boolx9Struct10BytesInlineArrayBoolBool_a6 = false; -bool passUint8Boolx9Struct10BytesInlineArrayBoolBool_a7 = false; -bool passUint8Boolx9Struct10BytesInlineArrayBoolBool_a8 = false; -bool passUint8Boolx9Struct10BytesInlineArrayBoolBool_a9 = false; -Struct10BytesInlineArrayBool - passUint8Boolx9Struct10BytesInlineArrayBoolBool_a10 = - Pointer.fromAddress(0).ref; -bool passUint8Boolx9Struct10BytesInlineArrayBoolBool_a11 = false; - -// Result variable also global, so we can delete it after the callback. -int passUint8Boolx9Struct10BytesInlineArrayBoolBoolResult = 0; - -int passUint8Boolx9Struct10BytesInlineArrayBoolBoolCalculateResult() { - int result = 0; - - result += passUint8Boolx9Struct10BytesInlineArrayBoolBool_a0; - result += passUint8Boolx9Struct10BytesInlineArrayBoolBool_a1 ? 1 : 0; - result += passUint8Boolx9Struct10BytesInlineArrayBoolBool_a2 ? 1 : 0; - result += passUint8Boolx9Struct10BytesInlineArrayBoolBool_a3 ? 1 : 0; - result += passUint8Boolx9Struct10BytesInlineArrayBoolBool_a4 ? 1 : 0; - result += passUint8Boolx9Struct10BytesInlineArrayBoolBool_a5 ? 1 : 0; - result += passUint8Boolx9Struct10BytesInlineArrayBoolBool_a6 ? 1 : 0; - result += passUint8Boolx9Struct10BytesInlineArrayBoolBool_a7 ? 1 : 0; - result += passUint8Boolx9Struct10BytesInlineArrayBoolBool_a8 ? 1 : 0; - result += passUint8Boolx9Struct10BytesInlineArrayBoolBool_a9 ? 1 : 0; - result += passUint8Boolx9Struct10BytesInlineArrayBoolBool_a10.a0[0] ? 1 : 0; - result += passUint8Boolx9Struct10BytesInlineArrayBoolBool_a10.a0[1] ? 1 : 0; - result += passUint8Boolx9Struct10BytesInlineArrayBoolBool_a10.a0[2] ? 1 : 0; - result += passUint8Boolx9Struct10BytesInlineArrayBoolBool_a10.a0[3] ? 1 : 0; - result += passUint8Boolx9Struct10BytesInlineArrayBoolBool_a10.a0[4] ? 1 : 0; - result += passUint8Boolx9Struct10BytesInlineArrayBoolBool_a10.a0[5] ? 1 : 0; - result += passUint8Boolx9Struct10BytesInlineArrayBoolBool_a10.a0[6] ? 1 : 0; - result += passUint8Boolx9Struct10BytesInlineArrayBoolBool_a10.a0[7] ? 1 : 0; - result += passUint8Boolx9Struct10BytesInlineArrayBoolBool_a10.a0[8] ? 1 : 0; - result += passUint8Boolx9Struct10BytesInlineArrayBoolBool_a10.a0[9] ? 1 : 0; - result += passUint8Boolx9Struct10BytesInlineArrayBoolBool_a11 ? 1 : 0; - - passUint8Boolx9Struct10BytesInlineArrayBoolBoolResult = result; - - return result; -} - -/// Passing bools and a struct with bools. -/// Exhausts the registers to test bools and the bool struct alignment on the -/// stack. -int passUint8Boolx9Struct10BytesInlineArrayBoolBool( - int a0, - bool a1, - bool a2, - bool a3, - bool a4, - bool a5, - bool a6, - bool a7, - bool a8, - bool a9, - Struct10BytesInlineArrayBool a10, - bool a11) { - print( - "passUint8Boolx9Struct10BytesInlineArrayBoolBool(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9}, ${a10}, ${a11})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception( - "PassUint8Boolx9Struct10BytesInlineArrayBoolBool throwing on purpose!"); - } - - passUint8Boolx9Struct10BytesInlineArrayBoolBool_a0 = a0; - passUint8Boolx9Struct10BytesInlineArrayBoolBool_a1 = a1; - passUint8Boolx9Struct10BytesInlineArrayBoolBool_a2 = a2; - passUint8Boolx9Struct10BytesInlineArrayBoolBool_a3 = a3; - passUint8Boolx9Struct10BytesInlineArrayBoolBool_a4 = a4; - passUint8Boolx9Struct10BytesInlineArrayBoolBool_a5 = a5; - passUint8Boolx9Struct10BytesInlineArrayBoolBool_a6 = a6; - passUint8Boolx9Struct10BytesInlineArrayBoolBool_a7 = a7; - passUint8Boolx9Struct10BytesInlineArrayBoolBool_a8 = a8; - passUint8Boolx9Struct10BytesInlineArrayBoolBool_a9 = a9; - passUint8Boolx9Struct10BytesInlineArrayBoolBool_a10 = a10; - passUint8Boolx9Struct10BytesInlineArrayBoolBool_a11 = a11; - - final result = - passUint8Boolx9Struct10BytesInlineArrayBoolBoolCalculateResult(); - - print("result = $result"); - - return result; -} - -void passUint8Boolx9Struct10BytesInlineArrayBoolBoolAfterCallback() { - final result = - passUint8Boolx9Struct10BytesInlineArrayBoolBoolCalculateResult(); - - print("after callback result = $result"); - - Expect.equals(11, result); -} - -typedef PassUint8Struct1ByteBoolType = Bool Function(Uint8, Struct1ByteBool); - -// Global variables to be able to test inputs after callback returned. -int passUint8Struct1ByteBool_a0 = 0; -Struct1ByteBool passUint8Struct1ByteBool_a1 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -bool passUint8Struct1ByteBoolResult = false; - -bool passUint8Struct1ByteBoolCalculateResult() { - int result = 0; - - result += passUint8Struct1ByteBool_a0; - result += passUint8Struct1ByteBool_a1.a0 ? 1 : 0; - - passUint8Struct1ByteBoolResult = result % 2 != 0; - - return result % 2 != 0; -} - -/// Returning a bool. -bool passUint8Struct1ByteBool(int a0, Struct1ByteBool a1) { - print("passUint8Struct1ByteBool(${a0}, ${a1})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("PassUint8Struct1ByteBool throwing on purpose!"); - } - - passUint8Struct1ByteBool_a0 = a0; - passUint8Struct1ByteBool_a1 = a1; - - final result = passUint8Struct1ByteBoolCalculateResult(); - - print("result = $result"); - - return result; -} - -void passUint8Struct1ByteBoolAfterCallback() { - final result = passUint8Struct1ByteBoolCalculateResult(); - - print("after callback result = $result"); - - Expect.equals(1 % 2 != 0, result); -} - -typedef PassWCharStructInlineArrayIntUintPtrx2LongUnsignedType = WChar Function( - WChar, StructInlineArrayInt, UintPtr, UintPtr, Long, UnsignedLong); - -// Global variables to be able to test inputs after callback returned. -int passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a0 = 0; -StructInlineArrayInt passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a1 = - Pointer.fromAddress(0).ref; -int passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a2 = 0; -int passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a3 = 0; -int passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a4 = 0; -int passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a5 = 0; - -// Result variable also global, so we can delete it after the callback. -int passWCharStructInlineArrayIntUintPtrx2LongUnsignedResult = 0; - -int passWCharStructInlineArrayIntUintPtrx2LongUnsignedCalculateResult() { - int result = 0; - - result += passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a0; - result += passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a1.a0[0]; - result += passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a1.a0[1]; - result += passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a1.a0[2]; - result += passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a1.a0[3]; - result += passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a1.a0[4]; - result += passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a1.a0[5]; - result += passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a1.a0[6]; - result += passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a1.a0[7]; - result += passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a1.a0[8]; - result += passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a1.a0[9]; - result += passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a2; - result += passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a3; - result += passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a4; - result += passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a5; - - passWCharStructInlineArrayIntUintPtrx2LongUnsignedResult = result; - - return result; -} - -/// Returning a wchar. -int passWCharStructInlineArrayIntUintPtrx2LongUnsigned( - int a0, StructInlineArrayInt a1, int a2, int a3, int a4, int a5) { - print( - "passWCharStructInlineArrayIntUintPtrx2LongUnsigned(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception( - "PassWCharStructInlineArrayIntUintPtrx2LongUnsigned throwing on purpose!"); - } - - passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a0 = a0; - passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a1 = a1; - passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a2 = a2; - passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a3 = a3; - passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a4 = a4; - passWCharStructInlineArrayIntUintPtrx2LongUnsigned_a5 = a5; - - final result = - passWCharStructInlineArrayIntUintPtrx2LongUnsignedCalculateResult(); - - print("result = $result"); - - return result; -} - -void passWCharStructInlineArrayIntUintPtrx2LongUnsignedAfterCallback() { - final result = - passWCharStructInlineArrayIntUintPtrx2LongUnsignedCalculateResult(); - - print("after callback result = $result"); - - Expect.equals(120, result); -} - -typedef PassInt64x7Struct12BytesHomogeneousInt32Type = Int64 Function(Int64, - Int64, Int64, Int64, Int64, Int64, Int64, Struct12BytesHomogeneousInt32); - -// Global variables to be able to test inputs after callback returned. -int passInt64x7Struct12BytesHomogeneousInt32_a0 = 0; -int passInt64x7Struct12BytesHomogeneousInt32_a1 = 0; -int passInt64x7Struct12BytesHomogeneousInt32_a2 = 0; -int passInt64x7Struct12BytesHomogeneousInt32_a3 = 0; -int passInt64x7Struct12BytesHomogeneousInt32_a4 = 0; -int passInt64x7Struct12BytesHomogeneousInt32_a5 = 0; -int passInt64x7Struct12BytesHomogeneousInt32_a6 = 0; -Struct12BytesHomogeneousInt32 passInt64x7Struct12BytesHomogeneousInt32_a7 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -int passInt64x7Struct12BytesHomogeneousInt32Result = 0; - -int passInt64x7Struct12BytesHomogeneousInt32CalculateResult() { - int result = 0; - - result += passInt64x7Struct12BytesHomogeneousInt32_a0; - result += passInt64x7Struct12BytesHomogeneousInt32_a1; - result += passInt64x7Struct12BytesHomogeneousInt32_a2; - result += passInt64x7Struct12BytesHomogeneousInt32_a3; - result += passInt64x7Struct12BytesHomogeneousInt32_a4; - result += passInt64x7Struct12BytesHomogeneousInt32_a5; - result += passInt64x7Struct12BytesHomogeneousInt32_a6; - result += passInt64x7Struct12BytesHomogeneousInt32_a7.a0; - result += passInt64x7Struct12BytesHomogeneousInt32_a7.a1; - result += passInt64x7Struct12BytesHomogeneousInt32_a7.a2; - - passInt64x7Struct12BytesHomogeneousInt32Result = result; - - return result; -} - -/// Struct stradles last argument register -int passInt64x7Struct12BytesHomogeneousInt32(int a0, int a1, int a2, int a3, - int a4, int a5, int a6, Struct12BytesHomogeneousInt32 a7) { - print( - "passInt64x7Struct12BytesHomogeneousInt32(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception( - "PassInt64x7Struct12BytesHomogeneousInt32 throwing on purpose!"); - } - - passInt64x7Struct12BytesHomogeneousInt32_a0 = a0; - passInt64x7Struct12BytesHomogeneousInt32_a1 = a1; - passInt64x7Struct12BytesHomogeneousInt32_a2 = a2; - passInt64x7Struct12BytesHomogeneousInt32_a3 = a3; - passInt64x7Struct12BytesHomogeneousInt32_a4 = a4; - passInt64x7Struct12BytesHomogeneousInt32_a5 = a5; - passInt64x7Struct12BytesHomogeneousInt32_a6 = a6; - passInt64x7Struct12BytesHomogeneousInt32_a7 = a7; - - final result = passInt64x7Struct12BytesHomogeneousInt32CalculateResult(); - - print("result = $result"); - - return result; -} - -void passInt64x7Struct12BytesHomogeneousInt32AfterCallback() { - final result = passInt64x7Struct12BytesHomogeneousInt32CalculateResult(); - - print("after callback result = $result"); - - Expect.equals(5, result); -} - -typedef ReturnStruct1ByteIntType = Struct1ByteInt Function(Int8); - -// Global variables to be able to test inputs after callback returned. -int returnStruct1ByteInt_a0 = 0; - -// Result variable also global, so we can delete it after the callback. -Pointer returnStruct1ByteIntResultPointer = nullptr; - -Struct1ByteInt returnStruct1ByteIntCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct1ByteInt_a0; - - returnStruct1ByteIntResultPointer = resultPointer; - - return result; -} - -/// Smallest struct with data. -Struct1ByteInt returnStruct1ByteInt(int a0) { - print("returnStruct1ByteInt(${a0})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct1ByteInt throwing on purpose!"); - } - - returnStruct1ByteInt_a0 = a0; - - final result = returnStruct1ByteIntCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct1ByteIntAfterCallback() { - calloc.free(returnStruct1ByteIntResultPointer); - - final result = returnStruct1ByteIntCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct1ByteIntResultPointer); -} - -typedef ReturnStruct3BytesHomogeneousUint8Type = Struct3BytesHomogeneousUint8 - Function(Uint8, Uint8, Uint8); - -// Global variables to be able to test inputs after callback returned. -int returnStruct3BytesHomogeneousUint8_a0 = 0; -int returnStruct3BytesHomogeneousUint8_a1 = 0; -int returnStruct3BytesHomogeneousUint8_a2 = 0; - -// Result variable also global, so we can delete it after the callback. -Pointer - returnStruct3BytesHomogeneousUint8ResultPointer = nullptr; - -Struct3BytesHomogeneousUint8 - returnStruct3BytesHomogeneousUint8CalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct3BytesHomogeneousUint8_a0; - result.a1 = returnStruct3BytesHomogeneousUint8_a1; - result.a2 = returnStruct3BytesHomogeneousUint8_a2; - - returnStruct3BytesHomogeneousUint8ResultPointer = resultPointer; - - return result; -} - -/// Smaller than word size return value on all architectures. -Struct3BytesHomogeneousUint8 returnStruct3BytesHomogeneousUint8( - int a0, int a1, int a2) { - print("returnStruct3BytesHomogeneousUint8(${a0}, ${a1}, ${a2})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct3BytesHomogeneousUint8 throwing on purpose!"); - } - - returnStruct3BytesHomogeneousUint8_a0 = a0; - returnStruct3BytesHomogeneousUint8_a1 = a1; - returnStruct3BytesHomogeneousUint8_a2 = a2; - - final result = returnStruct3BytesHomogeneousUint8CalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct3BytesHomogeneousUint8AfterCallback() { - calloc.free(returnStruct3BytesHomogeneousUint8ResultPointer); - - final result = returnStruct3BytesHomogeneousUint8CalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct3BytesHomogeneousUint8ResultPointer); -} - -typedef ReturnStruct3BytesInt2ByteAlignedType = Struct3BytesInt2ByteAligned - Function(Int16, Int8); - -// Global variables to be able to test inputs after callback returned. -int returnStruct3BytesInt2ByteAligned_a0 = 0; -int returnStruct3BytesInt2ByteAligned_a1 = 0; - -// Result variable also global, so we can delete it after the callback. -Pointer - returnStruct3BytesInt2ByteAlignedResultPointer = nullptr; - -Struct3BytesInt2ByteAligned returnStruct3BytesInt2ByteAlignedCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct3BytesInt2ByteAligned_a0; - result.a1 = returnStruct3BytesInt2ByteAligned_a1; - - returnStruct3BytesInt2ByteAlignedResultPointer = resultPointer; - - return result; -} - -/// Smaller than word size return value on all architectures. -/// With alignment rules taken into account size is 4 bytes. -Struct3BytesInt2ByteAligned returnStruct3BytesInt2ByteAligned(int a0, int a1) { - print("returnStruct3BytesInt2ByteAligned(${a0}, ${a1})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct3BytesInt2ByteAligned throwing on purpose!"); - } - - returnStruct3BytesInt2ByteAligned_a0 = a0; - returnStruct3BytesInt2ByteAligned_a1 = a1; - - final result = returnStruct3BytesInt2ByteAlignedCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct3BytesInt2ByteAlignedAfterCallback() { - calloc.free(returnStruct3BytesInt2ByteAlignedResultPointer); - - final result = returnStruct3BytesInt2ByteAlignedCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct3BytesInt2ByteAlignedResultPointer); -} - -typedef ReturnStruct4BytesHomogeneousInt16Type = Struct4BytesHomogeneousInt16 - Function(Int16, Int16); - -// Global variables to be able to test inputs after callback returned. -int returnStruct4BytesHomogeneousInt16_a0 = 0; -int returnStruct4BytesHomogeneousInt16_a1 = 0; - -// Result variable also global, so we can delete it after the callback. -Pointer - returnStruct4BytesHomogeneousInt16ResultPointer = nullptr; - -Struct4BytesHomogeneousInt16 - returnStruct4BytesHomogeneousInt16CalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct4BytesHomogeneousInt16_a0; - result.a1 = returnStruct4BytesHomogeneousInt16_a1; - - returnStruct4BytesHomogeneousInt16ResultPointer = resultPointer; - - return result; -} - -/// Word size return value on 32 bit architectures.. -Struct4BytesHomogeneousInt16 returnStruct4BytesHomogeneousInt16( - int a0, int a1) { - print("returnStruct4BytesHomogeneousInt16(${a0}, ${a1})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct4BytesHomogeneousInt16 throwing on purpose!"); - } - - returnStruct4BytesHomogeneousInt16_a0 = a0; - returnStruct4BytesHomogeneousInt16_a1 = a1; - - final result = returnStruct4BytesHomogeneousInt16CalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct4BytesHomogeneousInt16AfterCallback() { - calloc.free(returnStruct4BytesHomogeneousInt16ResultPointer); - - final result = returnStruct4BytesHomogeneousInt16CalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct4BytesHomogeneousInt16ResultPointer); -} - -typedef ReturnStruct7BytesHomogeneousUint8Type = Struct7BytesHomogeneousUint8 - Function(Uint8, Uint8, Uint8, Uint8, Uint8, Uint8, Uint8); - -// Global variables to be able to test inputs after callback returned. -int returnStruct7BytesHomogeneousUint8_a0 = 0; -int returnStruct7BytesHomogeneousUint8_a1 = 0; -int returnStruct7BytesHomogeneousUint8_a2 = 0; -int returnStruct7BytesHomogeneousUint8_a3 = 0; -int returnStruct7BytesHomogeneousUint8_a4 = 0; -int returnStruct7BytesHomogeneousUint8_a5 = 0; -int returnStruct7BytesHomogeneousUint8_a6 = 0; - -// Result variable also global, so we can delete it after the callback. -Pointer - returnStruct7BytesHomogeneousUint8ResultPointer = nullptr; - -Struct7BytesHomogeneousUint8 - returnStruct7BytesHomogeneousUint8CalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct7BytesHomogeneousUint8_a0; - result.a1 = returnStruct7BytesHomogeneousUint8_a1; - result.a2 = returnStruct7BytesHomogeneousUint8_a2; - result.a3 = returnStruct7BytesHomogeneousUint8_a3; - result.a4 = returnStruct7BytesHomogeneousUint8_a4; - result.a5 = returnStruct7BytesHomogeneousUint8_a5; - result.a6 = returnStruct7BytesHomogeneousUint8_a6; - - returnStruct7BytesHomogeneousUint8ResultPointer = resultPointer; - - return result; -} - -/// Non-wordsize return value. -Struct7BytesHomogeneousUint8 returnStruct7BytesHomogeneousUint8( - int a0, int a1, int a2, int a3, int a4, int a5, int a6) { - print( - "returnStruct7BytesHomogeneousUint8(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct7BytesHomogeneousUint8 throwing on purpose!"); - } - - returnStruct7BytesHomogeneousUint8_a0 = a0; - returnStruct7BytesHomogeneousUint8_a1 = a1; - returnStruct7BytesHomogeneousUint8_a2 = a2; - returnStruct7BytesHomogeneousUint8_a3 = a3; - returnStruct7BytesHomogeneousUint8_a4 = a4; - returnStruct7BytesHomogeneousUint8_a5 = a5; - returnStruct7BytesHomogeneousUint8_a6 = a6; - - final result = returnStruct7BytesHomogeneousUint8CalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct7BytesHomogeneousUint8AfterCallback() { - calloc.free(returnStruct7BytesHomogeneousUint8ResultPointer); - - final result = returnStruct7BytesHomogeneousUint8CalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct7BytesHomogeneousUint8ResultPointer); -} - -typedef ReturnStruct7BytesInt4ByteAlignedType = Struct7BytesInt4ByteAligned - Function(Int32, Int16, Int8); - -// Global variables to be able to test inputs after callback returned. -int returnStruct7BytesInt4ByteAligned_a0 = 0; -int returnStruct7BytesInt4ByteAligned_a1 = 0; -int returnStruct7BytesInt4ByteAligned_a2 = 0; - -// Result variable also global, so we can delete it after the callback. -Pointer - returnStruct7BytesInt4ByteAlignedResultPointer = nullptr; - -Struct7BytesInt4ByteAligned returnStruct7BytesInt4ByteAlignedCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct7BytesInt4ByteAligned_a0; - result.a1 = returnStruct7BytesInt4ByteAligned_a1; - result.a2 = returnStruct7BytesInt4ByteAligned_a2; - - returnStruct7BytesInt4ByteAlignedResultPointer = resultPointer; - - return result; -} - -/// Non-wordsize return value. -/// With alignment rules taken into account size is 8 bytes. -Struct7BytesInt4ByteAligned returnStruct7BytesInt4ByteAligned( - int a0, int a1, int a2) { - print("returnStruct7BytesInt4ByteAligned(${a0}, ${a1}, ${a2})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct7BytesInt4ByteAligned throwing on purpose!"); - } - - returnStruct7BytesInt4ByteAligned_a0 = a0; - returnStruct7BytesInt4ByteAligned_a1 = a1; - returnStruct7BytesInt4ByteAligned_a2 = a2; - - final result = returnStruct7BytesInt4ByteAlignedCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct7BytesInt4ByteAlignedAfterCallback() { - calloc.free(returnStruct7BytesInt4ByteAlignedResultPointer); - - final result = returnStruct7BytesInt4ByteAlignedCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct7BytesInt4ByteAlignedResultPointer); -} - -typedef ReturnStruct8BytesIntType = Struct8BytesInt Function( - Int16, Int16, Int32); - -// Global variables to be able to test inputs after callback returned. -int returnStruct8BytesInt_a0 = 0; -int returnStruct8BytesInt_a1 = 0; -int returnStruct8BytesInt_a2 = 0; - -// Result variable also global, so we can delete it after the callback. -Pointer returnStruct8BytesIntResultPointer = nullptr; - -Struct8BytesInt returnStruct8BytesIntCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct8BytesInt_a0; - result.a1 = returnStruct8BytesInt_a1; - result.a2 = returnStruct8BytesInt_a2; - - returnStruct8BytesIntResultPointer = resultPointer; - - return result; -} - -/// Return value in integer registers on many architectures. -Struct8BytesInt returnStruct8BytesInt(int a0, int a1, int a2) { - print("returnStruct8BytesInt(${a0}, ${a1}, ${a2})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct8BytesInt throwing on purpose!"); - } - - returnStruct8BytesInt_a0 = a0; - returnStruct8BytesInt_a1 = a1; - returnStruct8BytesInt_a2 = a2; - - final result = returnStruct8BytesIntCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct8BytesIntAfterCallback() { - calloc.free(returnStruct8BytesIntResultPointer); - - final result = returnStruct8BytesIntCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct8BytesIntResultPointer); -} - -typedef ReturnStruct8BytesHomogeneousFloatType = Struct8BytesHomogeneousFloat - Function(Float, Float); - -// Global variables to be able to test inputs after callback returned. -double returnStruct8BytesHomogeneousFloat_a0 = 0.0; -double returnStruct8BytesHomogeneousFloat_a1 = 0.0; - -// Result variable also global, so we can delete it after the callback. -Pointer - returnStruct8BytesHomogeneousFloatResultPointer = nullptr; - -Struct8BytesHomogeneousFloat - returnStruct8BytesHomogeneousFloatCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct8BytesHomogeneousFloat_a0; - result.a1 = returnStruct8BytesHomogeneousFloat_a1; - - returnStruct8BytesHomogeneousFloatResultPointer = resultPointer; - - return result; -} - -/// Return value in FP registers on many architectures. -Struct8BytesHomogeneousFloat returnStruct8BytesHomogeneousFloat( - double a0, double a1) { - print("returnStruct8BytesHomogeneousFloat(${a0}, ${a1})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct8BytesHomogeneousFloat throwing on purpose!"); - } - - returnStruct8BytesHomogeneousFloat_a0 = a0; - returnStruct8BytesHomogeneousFloat_a1 = a1; - - final result = returnStruct8BytesHomogeneousFloatCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct8BytesHomogeneousFloatAfterCallback() { - calloc.free(returnStruct8BytesHomogeneousFloatResultPointer); - - final result = returnStruct8BytesHomogeneousFloatCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct8BytesHomogeneousFloatResultPointer); -} - -typedef ReturnStruct8BytesMixedType = Struct8BytesMixed Function( - Float, Int16, Int16); - -// Global variables to be able to test inputs after callback returned. -double returnStruct8BytesMixed_a0 = 0.0; -int returnStruct8BytesMixed_a1 = 0; -int returnStruct8BytesMixed_a2 = 0; - -// Result variable also global, so we can delete it after the callback. -Pointer returnStruct8BytesMixedResultPointer = nullptr; - -Struct8BytesMixed returnStruct8BytesMixedCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct8BytesMixed_a0; - result.a1 = returnStruct8BytesMixed_a1; - result.a2 = returnStruct8BytesMixed_a2; - - returnStruct8BytesMixedResultPointer = resultPointer; - - return result; -} - -/// Return value split over FP and integer register in x64. -Struct8BytesMixed returnStruct8BytesMixed(double a0, int a1, int a2) { - print("returnStruct8BytesMixed(${a0}, ${a1}, ${a2})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct8BytesMixed throwing on purpose!"); - } - - returnStruct8BytesMixed_a0 = a0; - returnStruct8BytesMixed_a1 = a1; - returnStruct8BytesMixed_a2 = a2; - - final result = returnStruct8BytesMixedCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct8BytesMixedAfterCallback() { - calloc.free(returnStruct8BytesMixedResultPointer); - - final result = returnStruct8BytesMixedCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct8BytesMixedResultPointer); -} - -typedef ReturnStruct9BytesHomogeneousUint8Type = Struct9BytesHomogeneousUint8 - Function(Uint8, Uint8, Uint8, Uint8, Uint8, Uint8, Uint8, Uint8, Uint8); - -// Global variables to be able to test inputs after callback returned. -int returnStruct9BytesHomogeneousUint8_a0 = 0; -int returnStruct9BytesHomogeneousUint8_a1 = 0; -int returnStruct9BytesHomogeneousUint8_a2 = 0; -int returnStruct9BytesHomogeneousUint8_a3 = 0; -int returnStruct9BytesHomogeneousUint8_a4 = 0; -int returnStruct9BytesHomogeneousUint8_a5 = 0; -int returnStruct9BytesHomogeneousUint8_a6 = 0; -int returnStruct9BytesHomogeneousUint8_a7 = 0; -int returnStruct9BytesHomogeneousUint8_a8 = 0; - -// Result variable also global, so we can delete it after the callback. -Pointer - returnStruct9BytesHomogeneousUint8ResultPointer = nullptr; - -Struct9BytesHomogeneousUint8 - returnStruct9BytesHomogeneousUint8CalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct9BytesHomogeneousUint8_a0; - result.a1 = returnStruct9BytesHomogeneousUint8_a1; - result.a2 = returnStruct9BytesHomogeneousUint8_a2; - result.a3 = returnStruct9BytesHomogeneousUint8_a3; - result.a4 = returnStruct9BytesHomogeneousUint8_a4; - result.a5 = returnStruct9BytesHomogeneousUint8_a5; - result.a6 = returnStruct9BytesHomogeneousUint8_a6; - result.a7 = returnStruct9BytesHomogeneousUint8_a7; - result.a8 = returnStruct9BytesHomogeneousUint8_a8; - - returnStruct9BytesHomogeneousUint8ResultPointer = resultPointer; - - return result; -} - -/// The minimum alignment of this struct is only 1 byte based on its fields. -/// Test that the memory backing these structs is the right size and that -/// dart:ffi trampolines do not write outside this size. -Struct9BytesHomogeneousUint8 returnStruct9BytesHomogeneousUint8( - int a0, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8) { - print( - "returnStruct9BytesHomogeneousUint8(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct9BytesHomogeneousUint8 throwing on purpose!"); - } - - returnStruct9BytesHomogeneousUint8_a0 = a0; - returnStruct9BytesHomogeneousUint8_a1 = a1; - returnStruct9BytesHomogeneousUint8_a2 = a2; - returnStruct9BytesHomogeneousUint8_a3 = a3; - returnStruct9BytesHomogeneousUint8_a4 = a4; - returnStruct9BytesHomogeneousUint8_a5 = a5; - returnStruct9BytesHomogeneousUint8_a6 = a6; - returnStruct9BytesHomogeneousUint8_a7 = a7; - returnStruct9BytesHomogeneousUint8_a8 = a8; - - final result = returnStruct9BytesHomogeneousUint8CalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct9BytesHomogeneousUint8AfterCallback() { - calloc.free(returnStruct9BytesHomogeneousUint8ResultPointer); - - final result = returnStruct9BytesHomogeneousUint8CalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct9BytesHomogeneousUint8ResultPointer); -} - -typedef ReturnStruct9BytesInt4Or8ByteAlignedType - = Struct9BytesInt4Or8ByteAligned Function(Int64, Int8); - -// Global variables to be able to test inputs after callback returned. -int returnStruct9BytesInt4Or8ByteAligned_a0 = 0; -int returnStruct9BytesInt4Or8ByteAligned_a1 = 0; - -// Result variable also global, so we can delete it after the callback. -Pointer - returnStruct9BytesInt4Or8ByteAlignedResultPointer = nullptr; - -Struct9BytesInt4Or8ByteAligned - returnStruct9BytesInt4Or8ByteAlignedCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct9BytesInt4Or8ByteAligned_a0; - result.a1 = returnStruct9BytesInt4Or8ByteAligned_a1; - - returnStruct9BytesInt4Or8ByteAlignedResultPointer = resultPointer; - - return result; -} - -/// Return value in two integer registers on x64. -/// With alignment rules taken into account size is 12 or 16 bytes. -Struct9BytesInt4Or8ByteAligned returnStruct9BytesInt4Or8ByteAligned( - int a0, int a1) { - print("returnStruct9BytesInt4Or8ByteAligned(${a0}, ${a1})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception( - "ReturnStruct9BytesInt4Or8ByteAligned throwing on purpose!"); - } - - returnStruct9BytesInt4Or8ByteAligned_a0 = a0; - returnStruct9BytesInt4Or8ByteAligned_a1 = a1; - - final result = returnStruct9BytesInt4Or8ByteAlignedCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct9BytesInt4Or8ByteAlignedAfterCallback() { - calloc.free(returnStruct9BytesInt4Or8ByteAlignedResultPointer); - - final result = returnStruct9BytesInt4Or8ByteAlignedCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct9BytesInt4Or8ByteAlignedResultPointer); -} - -typedef ReturnStruct12BytesHomogeneousFloatType = Struct12BytesHomogeneousFloat - Function(Float, Float, Float); - -// Global variables to be able to test inputs after callback returned. -double returnStruct12BytesHomogeneousFloat_a0 = 0.0; -double returnStruct12BytesHomogeneousFloat_a1 = 0.0; -double returnStruct12BytesHomogeneousFloat_a2 = 0.0; - -// Result variable also global, so we can delete it after the callback. -Pointer - returnStruct12BytesHomogeneousFloatResultPointer = nullptr; - -Struct12BytesHomogeneousFloat - returnStruct12BytesHomogeneousFloatCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct12BytesHomogeneousFloat_a0; - result.a1 = returnStruct12BytesHomogeneousFloat_a1; - result.a2 = returnStruct12BytesHomogeneousFloat_a2; - - returnStruct12BytesHomogeneousFloatResultPointer = resultPointer; - - return result; -} - -/// Return value in FPU registers, but does not use all registers on arm hardfp -/// and arm64. -Struct12BytesHomogeneousFloat returnStruct12BytesHomogeneousFloat( - double a0, double a1, double a2) { - print("returnStruct12BytesHomogeneousFloat(${a0}, ${a1}, ${a2})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct12BytesHomogeneousFloat throwing on purpose!"); - } - - returnStruct12BytesHomogeneousFloat_a0 = a0; - returnStruct12BytesHomogeneousFloat_a1 = a1; - returnStruct12BytesHomogeneousFloat_a2 = a2; - - final result = returnStruct12BytesHomogeneousFloatCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct12BytesHomogeneousFloatAfterCallback() { - calloc.free(returnStruct12BytesHomogeneousFloatResultPointer); - - final result = returnStruct12BytesHomogeneousFloatCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct12BytesHomogeneousFloatResultPointer); -} - -typedef ReturnStruct16BytesHomogeneousFloatType = Struct16BytesHomogeneousFloat - Function(Float, Float, Float, Float); - -// Global variables to be able to test inputs after callback returned. -double returnStruct16BytesHomogeneousFloat_a0 = 0.0; -double returnStruct16BytesHomogeneousFloat_a1 = 0.0; -double returnStruct16BytesHomogeneousFloat_a2 = 0.0; -double returnStruct16BytesHomogeneousFloat_a3 = 0.0; - -// Result variable also global, so we can delete it after the callback. -Pointer - returnStruct16BytesHomogeneousFloatResultPointer = nullptr; - -Struct16BytesHomogeneousFloat - returnStruct16BytesHomogeneousFloatCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct16BytesHomogeneousFloat_a0; - result.a1 = returnStruct16BytesHomogeneousFloat_a1; - result.a2 = returnStruct16BytesHomogeneousFloat_a2; - result.a3 = returnStruct16BytesHomogeneousFloat_a3; - - returnStruct16BytesHomogeneousFloatResultPointer = resultPointer; - - return result; -} - -/// Return value in FPU registers on arm hardfp and arm64. -Struct16BytesHomogeneousFloat returnStruct16BytesHomogeneousFloat( - double a0, double a1, double a2, double a3) { - print("returnStruct16BytesHomogeneousFloat(${a0}, ${a1}, ${a2}, ${a3})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct16BytesHomogeneousFloat throwing on purpose!"); - } - - returnStruct16BytesHomogeneousFloat_a0 = a0; - returnStruct16BytesHomogeneousFloat_a1 = a1; - returnStruct16BytesHomogeneousFloat_a2 = a2; - returnStruct16BytesHomogeneousFloat_a3 = a3; - - final result = returnStruct16BytesHomogeneousFloatCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct16BytesHomogeneousFloatAfterCallback() { - calloc.free(returnStruct16BytesHomogeneousFloatResultPointer); - - final result = returnStruct16BytesHomogeneousFloatCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct16BytesHomogeneousFloatResultPointer); -} - -typedef ReturnStruct16BytesMixedType = Struct16BytesMixed Function( - Double, Int64); - -// Global variables to be able to test inputs after callback returned. -double returnStruct16BytesMixed_a0 = 0.0; -int returnStruct16BytesMixed_a1 = 0; - -// Result variable also global, so we can delete it after the callback. -Pointer returnStruct16BytesMixedResultPointer = nullptr; - -Struct16BytesMixed returnStruct16BytesMixedCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct16BytesMixed_a0; - result.a1 = returnStruct16BytesMixed_a1; - - returnStruct16BytesMixedResultPointer = resultPointer; - - return result; -} - -/// Return value split over FP and integer register in x64. -Struct16BytesMixed returnStruct16BytesMixed(double a0, int a1) { - print("returnStruct16BytesMixed(${a0}, ${a1})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct16BytesMixed throwing on purpose!"); - } - - returnStruct16BytesMixed_a0 = a0; - returnStruct16BytesMixed_a1 = a1; - - final result = returnStruct16BytesMixedCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct16BytesMixedAfterCallback() { - calloc.free(returnStruct16BytesMixedResultPointer); - - final result = returnStruct16BytesMixedCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct16BytesMixedResultPointer); -} - -typedef ReturnStruct16BytesMixed2Type = Struct16BytesMixed2 Function( - Float, Float, Float, Int32); - -// Global variables to be able to test inputs after callback returned. -double returnStruct16BytesMixed2_a0 = 0.0; -double returnStruct16BytesMixed2_a1 = 0.0; -double returnStruct16BytesMixed2_a2 = 0.0; -int returnStruct16BytesMixed2_a3 = 0; - -// Result variable also global, so we can delete it after the callback. -Pointer returnStruct16BytesMixed2ResultPointer = nullptr; - -Struct16BytesMixed2 returnStruct16BytesMixed2CalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct16BytesMixed2_a0; - result.a1 = returnStruct16BytesMixed2_a1; - result.a2 = returnStruct16BytesMixed2_a2; - result.a3 = returnStruct16BytesMixed2_a3; - - returnStruct16BytesMixed2ResultPointer = resultPointer; - - return result; -} - -/// Return value split over FP and integer register in x64. -/// The integer register contains half float half int. -Struct16BytesMixed2 returnStruct16BytesMixed2( - double a0, double a1, double a2, int a3) { - print("returnStruct16BytesMixed2(${a0}, ${a1}, ${a2}, ${a3})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct16BytesMixed2 throwing on purpose!"); - } - - returnStruct16BytesMixed2_a0 = a0; - returnStruct16BytesMixed2_a1 = a1; - returnStruct16BytesMixed2_a2 = a2; - returnStruct16BytesMixed2_a3 = a3; - - final result = returnStruct16BytesMixed2CalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct16BytesMixed2AfterCallback() { - calloc.free(returnStruct16BytesMixed2ResultPointer); - - final result = returnStruct16BytesMixed2CalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct16BytesMixed2ResultPointer); -} - -typedef ReturnStruct17BytesIntType = Struct17BytesInt Function( - Int64, Int64, Int8); - -// Global variables to be able to test inputs after callback returned. -int returnStruct17BytesInt_a0 = 0; -int returnStruct17BytesInt_a1 = 0; -int returnStruct17BytesInt_a2 = 0; - -// Result variable also global, so we can delete it after the callback. -Pointer returnStruct17BytesIntResultPointer = nullptr; - -Struct17BytesInt returnStruct17BytesIntCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct17BytesInt_a0; - result.a1 = returnStruct17BytesInt_a1; - result.a2 = returnStruct17BytesInt_a2; - - returnStruct17BytesIntResultPointer = resultPointer; - - return result; -} - -/// Return value returned in preallocated space passed by pointer on most ABIs. -/// Is non word size on purpose, to test that structs are rounded up to word size -/// on all ABIs. -Struct17BytesInt returnStruct17BytesInt(int a0, int a1, int a2) { - print("returnStruct17BytesInt(${a0}, ${a1}, ${a2})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct17BytesInt throwing on purpose!"); - } - - returnStruct17BytesInt_a0 = a0; - returnStruct17BytesInt_a1 = a1; - returnStruct17BytesInt_a2 = a2; - - final result = returnStruct17BytesIntCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct17BytesIntAfterCallback() { - calloc.free(returnStruct17BytesIntResultPointer); - - final result = returnStruct17BytesIntCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct17BytesIntResultPointer); -} - -typedef ReturnStruct19BytesHomogeneousUint8Type - = Struct19BytesHomogeneousUint8 Function( - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8); - -// Global variables to be able to test inputs after callback returned. -int returnStruct19BytesHomogeneousUint8_a0 = 0; -int returnStruct19BytesHomogeneousUint8_a1 = 0; -int returnStruct19BytesHomogeneousUint8_a2 = 0; -int returnStruct19BytesHomogeneousUint8_a3 = 0; -int returnStruct19BytesHomogeneousUint8_a4 = 0; -int returnStruct19BytesHomogeneousUint8_a5 = 0; -int returnStruct19BytesHomogeneousUint8_a6 = 0; -int returnStruct19BytesHomogeneousUint8_a7 = 0; -int returnStruct19BytesHomogeneousUint8_a8 = 0; -int returnStruct19BytesHomogeneousUint8_a9 = 0; -int returnStruct19BytesHomogeneousUint8_a10 = 0; -int returnStruct19BytesHomogeneousUint8_a11 = 0; -int returnStruct19BytesHomogeneousUint8_a12 = 0; -int returnStruct19BytesHomogeneousUint8_a13 = 0; -int returnStruct19BytesHomogeneousUint8_a14 = 0; -int returnStruct19BytesHomogeneousUint8_a15 = 0; -int returnStruct19BytesHomogeneousUint8_a16 = 0; -int returnStruct19BytesHomogeneousUint8_a17 = 0; -int returnStruct19BytesHomogeneousUint8_a18 = 0; - -// Result variable also global, so we can delete it after the callback. -Pointer - returnStruct19BytesHomogeneousUint8ResultPointer = nullptr; - -Struct19BytesHomogeneousUint8 - returnStruct19BytesHomogeneousUint8CalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct19BytesHomogeneousUint8_a0; - result.a1 = returnStruct19BytesHomogeneousUint8_a1; - result.a2 = returnStruct19BytesHomogeneousUint8_a2; - result.a3 = returnStruct19BytesHomogeneousUint8_a3; - result.a4 = returnStruct19BytesHomogeneousUint8_a4; - result.a5 = returnStruct19BytesHomogeneousUint8_a5; - result.a6 = returnStruct19BytesHomogeneousUint8_a6; - result.a7 = returnStruct19BytesHomogeneousUint8_a7; - result.a8 = returnStruct19BytesHomogeneousUint8_a8; - result.a9 = returnStruct19BytesHomogeneousUint8_a9; - result.a10 = returnStruct19BytesHomogeneousUint8_a10; - result.a11 = returnStruct19BytesHomogeneousUint8_a11; - result.a12 = returnStruct19BytesHomogeneousUint8_a12; - result.a13 = returnStruct19BytesHomogeneousUint8_a13; - result.a14 = returnStruct19BytesHomogeneousUint8_a14; - result.a15 = returnStruct19BytesHomogeneousUint8_a15; - result.a16 = returnStruct19BytesHomogeneousUint8_a16; - result.a17 = returnStruct19BytesHomogeneousUint8_a17; - result.a18 = returnStruct19BytesHomogeneousUint8_a18; - - returnStruct19BytesHomogeneousUint8ResultPointer = resultPointer; - - return result; -} - -/// The minimum alignment of this struct is only 1 byte based on its fields. -/// Test that the memory backing these structs is the right size and that -/// dart:ffi trampolines do not write outside this size. -Struct19BytesHomogeneousUint8 returnStruct19BytesHomogeneousUint8( - int a0, - int a1, - int a2, - int a3, - int a4, - int a5, - int a6, - int a7, - int a8, - int a9, - int a10, - int a11, - int a12, - int a13, - int a14, - int a15, - int a16, - int a17, - int a18) { - print( - "returnStruct19BytesHomogeneousUint8(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9}, ${a10}, ${a11}, ${a12}, ${a13}, ${a14}, ${a15}, ${a16}, ${a17}, ${a18})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct19BytesHomogeneousUint8 throwing on purpose!"); - } - - returnStruct19BytesHomogeneousUint8_a0 = a0; - returnStruct19BytesHomogeneousUint8_a1 = a1; - returnStruct19BytesHomogeneousUint8_a2 = a2; - returnStruct19BytesHomogeneousUint8_a3 = a3; - returnStruct19BytesHomogeneousUint8_a4 = a4; - returnStruct19BytesHomogeneousUint8_a5 = a5; - returnStruct19BytesHomogeneousUint8_a6 = a6; - returnStruct19BytesHomogeneousUint8_a7 = a7; - returnStruct19BytesHomogeneousUint8_a8 = a8; - returnStruct19BytesHomogeneousUint8_a9 = a9; - returnStruct19BytesHomogeneousUint8_a10 = a10; - returnStruct19BytesHomogeneousUint8_a11 = a11; - returnStruct19BytesHomogeneousUint8_a12 = a12; - returnStruct19BytesHomogeneousUint8_a13 = a13; - returnStruct19BytesHomogeneousUint8_a14 = a14; - returnStruct19BytesHomogeneousUint8_a15 = a15; - returnStruct19BytesHomogeneousUint8_a16 = a16; - returnStruct19BytesHomogeneousUint8_a17 = a17; - returnStruct19BytesHomogeneousUint8_a18 = a18; - - final result = returnStruct19BytesHomogeneousUint8CalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct19BytesHomogeneousUint8AfterCallback() { - calloc.free(returnStruct19BytesHomogeneousUint8ResultPointer); - - final result = returnStruct19BytesHomogeneousUint8CalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct19BytesHomogeneousUint8ResultPointer); -} - -typedef ReturnStruct20BytesHomogeneousInt32Type = Struct20BytesHomogeneousInt32 - Function(Int32, Int32, Int32, Int32, Int32); - -// Global variables to be able to test inputs after callback returned. -int returnStruct20BytesHomogeneousInt32_a0 = 0; -int returnStruct20BytesHomogeneousInt32_a1 = 0; -int returnStruct20BytesHomogeneousInt32_a2 = 0; -int returnStruct20BytesHomogeneousInt32_a3 = 0; -int returnStruct20BytesHomogeneousInt32_a4 = 0; - -// Result variable also global, so we can delete it after the callback. -Pointer - returnStruct20BytesHomogeneousInt32ResultPointer = nullptr; - -Struct20BytesHomogeneousInt32 - returnStruct20BytesHomogeneousInt32CalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct20BytesHomogeneousInt32_a0; - result.a1 = returnStruct20BytesHomogeneousInt32_a1; - result.a2 = returnStruct20BytesHomogeneousInt32_a2; - result.a3 = returnStruct20BytesHomogeneousInt32_a3; - result.a4 = returnStruct20BytesHomogeneousInt32_a4; - - returnStruct20BytesHomogeneousInt32ResultPointer = resultPointer; - - return result; -} - -/// Return value too big to go in cpu registers on arm64. -Struct20BytesHomogeneousInt32 returnStruct20BytesHomogeneousInt32( - int a0, int a1, int a2, int a3, int a4) { - print( - "returnStruct20BytesHomogeneousInt32(${a0}, ${a1}, ${a2}, ${a3}, ${a4})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct20BytesHomogeneousInt32 throwing on purpose!"); - } - - returnStruct20BytesHomogeneousInt32_a0 = a0; - returnStruct20BytesHomogeneousInt32_a1 = a1; - returnStruct20BytesHomogeneousInt32_a2 = a2; - returnStruct20BytesHomogeneousInt32_a3 = a3; - returnStruct20BytesHomogeneousInt32_a4 = a4; - - final result = returnStruct20BytesHomogeneousInt32CalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct20BytesHomogeneousInt32AfterCallback() { - calloc.free(returnStruct20BytesHomogeneousInt32ResultPointer); - - final result = returnStruct20BytesHomogeneousInt32CalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct20BytesHomogeneousInt32ResultPointer); -} - -typedef ReturnStruct20BytesHomogeneousFloatType = Struct20BytesHomogeneousFloat - Function(Float, Float, Float, Float, Float); - -// Global variables to be able to test inputs after callback returned. -double returnStruct20BytesHomogeneousFloat_a0 = 0.0; -double returnStruct20BytesHomogeneousFloat_a1 = 0.0; -double returnStruct20BytesHomogeneousFloat_a2 = 0.0; -double returnStruct20BytesHomogeneousFloat_a3 = 0.0; -double returnStruct20BytesHomogeneousFloat_a4 = 0.0; - -// Result variable also global, so we can delete it after the callback. -Pointer - returnStruct20BytesHomogeneousFloatResultPointer = nullptr; - -Struct20BytesHomogeneousFloat - returnStruct20BytesHomogeneousFloatCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct20BytesHomogeneousFloat_a0; - result.a1 = returnStruct20BytesHomogeneousFloat_a1; - result.a2 = returnStruct20BytesHomogeneousFloat_a2; - result.a3 = returnStruct20BytesHomogeneousFloat_a3; - result.a4 = returnStruct20BytesHomogeneousFloat_a4; - - returnStruct20BytesHomogeneousFloatResultPointer = resultPointer; - - return result; -} - -/// Return value too big to go in FPU registers on x64, arm hardfp and arm64. -Struct20BytesHomogeneousFloat returnStruct20BytesHomogeneousFloat( - double a0, double a1, double a2, double a3, double a4) { - print( - "returnStruct20BytesHomogeneousFloat(${a0}, ${a1}, ${a2}, ${a3}, ${a4})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct20BytesHomogeneousFloat throwing on purpose!"); - } - - returnStruct20BytesHomogeneousFloat_a0 = a0; - returnStruct20BytesHomogeneousFloat_a1 = a1; - returnStruct20BytesHomogeneousFloat_a2 = a2; - returnStruct20BytesHomogeneousFloat_a3 = a3; - returnStruct20BytesHomogeneousFloat_a4 = a4; - - final result = returnStruct20BytesHomogeneousFloatCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct20BytesHomogeneousFloatAfterCallback() { - calloc.free(returnStruct20BytesHomogeneousFloatResultPointer); - - final result = returnStruct20BytesHomogeneousFloatCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct20BytesHomogeneousFloatResultPointer); -} - -typedef ReturnStruct32BytesHomogeneousDoubleType - = Struct32BytesHomogeneousDouble Function(Double, Double, Double, Double); - -// Global variables to be able to test inputs after callback returned. -double returnStruct32BytesHomogeneousDouble_a0 = 0.0; -double returnStruct32BytesHomogeneousDouble_a1 = 0.0; -double returnStruct32BytesHomogeneousDouble_a2 = 0.0; -double returnStruct32BytesHomogeneousDouble_a3 = 0.0; - -// Result variable also global, so we can delete it after the callback. -Pointer - returnStruct32BytesHomogeneousDoubleResultPointer = nullptr; - -Struct32BytesHomogeneousDouble - returnStruct32BytesHomogeneousDoubleCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct32BytesHomogeneousDouble_a0; - result.a1 = returnStruct32BytesHomogeneousDouble_a1; - result.a2 = returnStruct32BytesHomogeneousDouble_a2; - result.a3 = returnStruct32BytesHomogeneousDouble_a3; - - returnStruct32BytesHomogeneousDoubleResultPointer = resultPointer; - - return result; -} - -/// Return value in FPU registers on arm64. -Struct32BytesHomogeneousDouble returnStruct32BytesHomogeneousDouble( - double a0, double a1, double a2, double a3) { - print("returnStruct32BytesHomogeneousDouble(${a0}, ${a1}, ${a2}, ${a3})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception( - "ReturnStruct32BytesHomogeneousDouble throwing on purpose!"); - } - - returnStruct32BytesHomogeneousDouble_a0 = a0; - returnStruct32BytesHomogeneousDouble_a1 = a1; - returnStruct32BytesHomogeneousDouble_a2 = a2; - returnStruct32BytesHomogeneousDouble_a3 = a3; - - final result = returnStruct32BytesHomogeneousDoubleCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct32BytesHomogeneousDoubleAfterCallback() { - calloc.free(returnStruct32BytesHomogeneousDoubleResultPointer); - - final result = returnStruct32BytesHomogeneousDoubleCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct32BytesHomogeneousDoubleResultPointer); -} - -typedef ReturnStruct40BytesHomogeneousDoubleType - = Struct40BytesHomogeneousDouble Function( - Double, Double, Double, Double, Double); - -// Global variables to be able to test inputs after callback returned. -double returnStruct40BytesHomogeneousDouble_a0 = 0.0; -double returnStruct40BytesHomogeneousDouble_a1 = 0.0; -double returnStruct40BytesHomogeneousDouble_a2 = 0.0; -double returnStruct40BytesHomogeneousDouble_a3 = 0.0; -double returnStruct40BytesHomogeneousDouble_a4 = 0.0; - -// Result variable also global, so we can delete it after the callback. -Pointer - returnStruct40BytesHomogeneousDoubleResultPointer = nullptr; - -Struct40BytesHomogeneousDouble - returnStruct40BytesHomogeneousDoubleCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct40BytesHomogeneousDouble_a0; - result.a1 = returnStruct40BytesHomogeneousDouble_a1; - result.a2 = returnStruct40BytesHomogeneousDouble_a2; - result.a3 = returnStruct40BytesHomogeneousDouble_a3; - result.a4 = returnStruct40BytesHomogeneousDouble_a4; - - returnStruct40BytesHomogeneousDoubleResultPointer = resultPointer; - - return result; -} - -/// Return value too big to go in FPU registers on arm64. -Struct40BytesHomogeneousDouble returnStruct40BytesHomogeneousDouble( - double a0, double a1, double a2, double a3, double a4) { - print( - "returnStruct40BytesHomogeneousDouble(${a0}, ${a1}, ${a2}, ${a3}, ${a4})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception( - "ReturnStruct40BytesHomogeneousDouble throwing on purpose!"); - } - - returnStruct40BytesHomogeneousDouble_a0 = a0; - returnStruct40BytesHomogeneousDouble_a1 = a1; - returnStruct40BytesHomogeneousDouble_a2 = a2; - returnStruct40BytesHomogeneousDouble_a3 = a3; - returnStruct40BytesHomogeneousDouble_a4 = a4; - - final result = returnStruct40BytesHomogeneousDoubleCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct40BytesHomogeneousDoubleAfterCallback() { - calloc.free(returnStruct40BytesHomogeneousDoubleResultPointer); - - final result = returnStruct40BytesHomogeneousDoubleCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct40BytesHomogeneousDoubleResultPointer); -} - -typedef ReturnStruct1024BytesHomogeneousUint64Type - = Struct1024BytesHomogeneousUint64 Function( - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64); - -// Global variables to be able to test inputs after callback returned. -int returnStruct1024BytesHomogeneousUint64_a0 = 0; -int returnStruct1024BytesHomogeneousUint64_a1 = 0; -int returnStruct1024BytesHomogeneousUint64_a2 = 0; -int returnStruct1024BytesHomogeneousUint64_a3 = 0; -int returnStruct1024BytesHomogeneousUint64_a4 = 0; -int returnStruct1024BytesHomogeneousUint64_a5 = 0; -int returnStruct1024BytesHomogeneousUint64_a6 = 0; -int returnStruct1024BytesHomogeneousUint64_a7 = 0; -int returnStruct1024BytesHomogeneousUint64_a8 = 0; -int returnStruct1024BytesHomogeneousUint64_a9 = 0; -int returnStruct1024BytesHomogeneousUint64_a10 = 0; -int returnStruct1024BytesHomogeneousUint64_a11 = 0; -int returnStruct1024BytesHomogeneousUint64_a12 = 0; -int returnStruct1024BytesHomogeneousUint64_a13 = 0; -int returnStruct1024BytesHomogeneousUint64_a14 = 0; -int returnStruct1024BytesHomogeneousUint64_a15 = 0; -int returnStruct1024BytesHomogeneousUint64_a16 = 0; -int returnStruct1024BytesHomogeneousUint64_a17 = 0; -int returnStruct1024BytesHomogeneousUint64_a18 = 0; -int returnStruct1024BytesHomogeneousUint64_a19 = 0; -int returnStruct1024BytesHomogeneousUint64_a20 = 0; -int returnStruct1024BytesHomogeneousUint64_a21 = 0; -int returnStruct1024BytesHomogeneousUint64_a22 = 0; -int returnStruct1024BytesHomogeneousUint64_a23 = 0; -int returnStruct1024BytesHomogeneousUint64_a24 = 0; -int returnStruct1024BytesHomogeneousUint64_a25 = 0; -int returnStruct1024BytesHomogeneousUint64_a26 = 0; -int returnStruct1024BytesHomogeneousUint64_a27 = 0; -int returnStruct1024BytesHomogeneousUint64_a28 = 0; -int returnStruct1024BytesHomogeneousUint64_a29 = 0; -int returnStruct1024BytesHomogeneousUint64_a30 = 0; -int returnStruct1024BytesHomogeneousUint64_a31 = 0; -int returnStruct1024BytesHomogeneousUint64_a32 = 0; -int returnStruct1024BytesHomogeneousUint64_a33 = 0; -int returnStruct1024BytesHomogeneousUint64_a34 = 0; -int returnStruct1024BytesHomogeneousUint64_a35 = 0; -int returnStruct1024BytesHomogeneousUint64_a36 = 0; -int returnStruct1024BytesHomogeneousUint64_a37 = 0; -int returnStruct1024BytesHomogeneousUint64_a38 = 0; -int returnStruct1024BytesHomogeneousUint64_a39 = 0; -int returnStruct1024BytesHomogeneousUint64_a40 = 0; -int returnStruct1024BytesHomogeneousUint64_a41 = 0; -int returnStruct1024BytesHomogeneousUint64_a42 = 0; -int returnStruct1024BytesHomogeneousUint64_a43 = 0; -int returnStruct1024BytesHomogeneousUint64_a44 = 0; -int returnStruct1024BytesHomogeneousUint64_a45 = 0; -int returnStruct1024BytesHomogeneousUint64_a46 = 0; -int returnStruct1024BytesHomogeneousUint64_a47 = 0; -int returnStruct1024BytesHomogeneousUint64_a48 = 0; -int returnStruct1024BytesHomogeneousUint64_a49 = 0; -int returnStruct1024BytesHomogeneousUint64_a50 = 0; -int returnStruct1024BytesHomogeneousUint64_a51 = 0; -int returnStruct1024BytesHomogeneousUint64_a52 = 0; -int returnStruct1024BytesHomogeneousUint64_a53 = 0; -int returnStruct1024BytesHomogeneousUint64_a54 = 0; -int returnStruct1024BytesHomogeneousUint64_a55 = 0; -int returnStruct1024BytesHomogeneousUint64_a56 = 0; -int returnStruct1024BytesHomogeneousUint64_a57 = 0; -int returnStruct1024BytesHomogeneousUint64_a58 = 0; -int returnStruct1024BytesHomogeneousUint64_a59 = 0; -int returnStruct1024BytesHomogeneousUint64_a60 = 0; -int returnStruct1024BytesHomogeneousUint64_a61 = 0; -int returnStruct1024BytesHomogeneousUint64_a62 = 0; -int returnStruct1024BytesHomogeneousUint64_a63 = 0; -int returnStruct1024BytesHomogeneousUint64_a64 = 0; -int returnStruct1024BytesHomogeneousUint64_a65 = 0; -int returnStruct1024BytesHomogeneousUint64_a66 = 0; -int returnStruct1024BytesHomogeneousUint64_a67 = 0; -int returnStruct1024BytesHomogeneousUint64_a68 = 0; -int returnStruct1024BytesHomogeneousUint64_a69 = 0; -int returnStruct1024BytesHomogeneousUint64_a70 = 0; -int returnStruct1024BytesHomogeneousUint64_a71 = 0; -int returnStruct1024BytesHomogeneousUint64_a72 = 0; -int returnStruct1024BytesHomogeneousUint64_a73 = 0; -int returnStruct1024BytesHomogeneousUint64_a74 = 0; -int returnStruct1024BytesHomogeneousUint64_a75 = 0; -int returnStruct1024BytesHomogeneousUint64_a76 = 0; -int returnStruct1024BytesHomogeneousUint64_a77 = 0; -int returnStruct1024BytesHomogeneousUint64_a78 = 0; -int returnStruct1024BytesHomogeneousUint64_a79 = 0; -int returnStruct1024BytesHomogeneousUint64_a80 = 0; -int returnStruct1024BytesHomogeneousUint64_a81 = 0; -int returnStruct1024BytesHomogeneousUint64_a82 = 0; -int returnStruct1024BytesHomogeneousUint64_a83 = 0; -int returnStruct1024BytesHomogeneousUint64_a84 = 0; -int returnStruct1024BytesHomogeneousUint64_a85 = 0; -int returnStruct1024BytesHomogeneousUint64_a86 = 0; -int returnStruct1024BytesHomogeneousUint64_a87 = 0; -int returnStruct1024BytesHomogeneousUint64_a88 = 0; -int returnStruct1024BytesHomogeneousUint64_a89 = 0; -int returnStruct1024BytesHomogeneousUint64_a90 = 0; -int returnStruct1024BytesHomogeneousUint64_a91 = 0; -int returnStruct1024BytesHomogeneousUint64_a92 = 0; -int returnStruct1024BytesHomogeneousUint64_a93 = 0; -int returnStruct1024BytesHomogeneousUint64_a94 = 0; -int returnStruct1024BytesHomogeneousUint64_a95 = 0; -int returnStruct1024BytesHomogeneousUint64_a96 = 0; -int returnStruct1024BytesHomogeneousUint64_a97 = 0; -int returnStruct1024BytesHomogeneousUint64_a98 = 0; -int returnStruct1024BytesHomogeneousUint64_a99 = 0; -int returnStruct1024BytesHomogeneousUint64_a100 = 0; -int returnStruct1024BytesHomogeneousUint64_a101 = 0; -int returnStruct1024BytesHomogeneousUint64_a102 = 0; -int returnStruct1024BytesHomogeneousUint64_a103 = 0; -int returnStruct1024BytesHomogeneousUint64_a104 = 0; -int returnStruct1024BytesHomogeneousUint64_a105 = 0; -int returnStruct1024BytesHomogeneousUint64_a106 = 0; -int returnStruct1024BytesHomogeneousUint64_a107 = 0; -int returnStruct1024BytesHomogeneousUint64_a108 = 0; -int returnStruct1024BytesHomogeneousUint64_a109 = 0; -int returnStruct1024BytesHomogeneousUint64_a110 = 0; -int returnStruct1024BytesHomogeneousUint64_a111 = 0; -int returnStruct1024BytesHomogeneousUint64_a112 = 0; -int returnStruct1024BytesHomogeneousUint64_a113 = 0; -int returnStruct1024BytesHomogeneousUint64_a114 = 0; -int returnStruct1024BytesHomogeneousUint64_a115 = 0; -int returnStruct1024BytesHomogeneousUint64_a116 = 0; -int returnStruct1024BytesHomogeneousUint64_a117 = 0; -int returnStruct1024BytesHomogeneousUint64_a118 = 0; -int returnStruct1024BytesHomogeneousUint64_a119 = 0; -int returnStruct1024BytesHomogeneousUint64_a120 = 0; -int returnStruct1024BytesHomogeneousUint64_a121 = 0; -int returnStruct1024BytesHomogeneousUint64_a122 = 0; -int returnStruct1024BytesHomogeneousUint64_a123 = 0; -int returnStruct1024BytesHomogeneousUint64_a124 = 0; -int returnStruct1024BytesHomogeneousUint64_a125 = 0; -int returnStruct1024BytesHomogeneousUint64_a126 = 0; -int returnStruct1024BytesHomogeneousUint64_a127 = 0; - -// Result variable also global, so we can delete it after the callback. -Pointer - returnStruct1024BytesHomogeneousUint64ResultPointer = nullptr; - -Struct1024BytesHomogeneousUint64 - returnStruct1024BytesHomogeneousUint64CalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct1024BytesHomogeneousUint64_a0; - result.a1 = returnStruct1024BytesHomogeneousUint64_a1; - result.a2 = returnStruct1024BytesHomogeneousUint64_a2; - result.a3 = returnStruct1024BytesHomogeneousUint64_a3; - result.a4 = returnStruct1024BytesHomogeneousUint64_a4; - result.a5 = returnStruct1024BytesHomogeneousUint64_a5; - result.a6 = returnStruct1024BytesHomogeneousUint64_a6; - result.a7 = returnStruct1024BytesHomogeneousUint64_a7; - result.a8 = returnStruct1024BytesHomogeneousUint64_a8; - result.a9 = returnStruct1024BytesHomogeneousUint64_a9; - result.a10 = returnStruct1024BytesHomogeneousUint64_a10; - result.a11 = returnStruct1024BytesHomogeneousUint64_a11; - result.a12 = returnStruct1024BytesHomogeneousUint64_a12; - result.a13 = returnStruct1024BytesHomogeneousUint64_a13; - result.a14 = returnStruct1024BytesHomogeneousUint64_a14; - result.a15 = returnStruct1024BytesHomogeneousUint64_a15; - result.a16 = returnStruct1024BytesHomogeneousUint64_a16; - result.a17 = returnStruct1024BytesHomogeneousUint64_a17; - result.a18 = returnStruct1024BytesHomogeneousUint64_a18; - result.a19 = returnStruct1024BytesHomogeneousUint64_a19; - result.a20 = returnStruct1024BytesHomogeneousUint64_a20; - result.a21 = returnStruct1024BytesHomogeneousUint64_a21; - result.a22 = returnStruct1024BytesHomogeneousUint64_a22; - result.a23 = returnStruct1024BytesHomogeneousUint64_a23; - result.a24 = returnStruct1024BytesHomogeneousUint64_a24; - result.a25 = returnStruct1024BytesHomogeneousUint64_a25; - result.a26 = returnStruct1024BytesHomogeneousUint64_a26; - result.a27 = returnStruct1024BytesHomogeneousUint64_a27; - result.a28 = returnStruct1024BytesHomogeneousUint64_a28; - result.a29 = returnStruct1024BytesHomogeneousUint64_a29; - result.a30 = returnStruct1024BytesHomogeneousUint64_a30; - result.a31 = returnStruct1024BytesHomogeneousUint64_a31; - result.a32 = returnStruct1024BytesHomogeneousUint64_a32; - result.a33 = returnStruct1024BytesHomogeneousUint64_a33; - result.a34 = returnStruct1024BytesHomogeneousUint64_a34; - result.a35 = returnStruct1024BytesHomogeneousUint64_a35; - result.a36 = returnStruct1024BytesHomogeneousUint64_a36; - result.a37 = returnStruct1024BytesHomogeneousUint64_a37; - result.a38 = returnStruct1024BytesHomogeneousUint64_a38; - result.a39 = returnStruct1024BytesHomogeneousUint64_a39; - result.a40 = returnStruct1024BytesHomogeneousUint64_a40; - result.a41 = returnStruct1024BytesHomogeneousUint64_a41; - result.a42 = returnStruct1024BytesHomogeneousUint64_a42; - result.a43 = returnStruct1024BytesHomogeneousUint64_a43; - result.a44 = returnStruct1024BytesHomogeneousUint64_a44; - result.a45 = returnStruct1024BytesHomogeneousUint64_a45; - result.a46 = returnStruct1024BytesHomogeneousUint64_a46; - result.a47 = returnStruct1024BytesHomogeneousUint64_a47; - result.a48 = returnStruct1024BytesHomogeneousUint64_a48; - result.a49 = returnStruct1024BytesHomogeneousUint64_a49; - result.a50 = returnStruct1024BytesHomogeneousUint64_a50; - result.a51 = returnStruct1024BytesHomogeneousUint64_a51; - result.a52 = returnStruct1024BytesHomogeneousUint64_a52; - result.a53 = returnStruct1024BytesHomogeneousUint64_a53; - result.a54 = returnStruct1024BytesHomogeneousUint64_a54; - result.a55 = returnStruct1024BytesHomogeneousUint64_a55; - result.a56 = returnStruct1024BytesHomogeneousUint64_a56; - result.a57 = returnStruct1024BytesHomogeneousUint64_a57; - result.a58 = returnStruct1024BytesHomogeneousUint64_a58; - result.a59 = returnStruct1024BytesHomogeneousUint64_a59; - result.a60 = returnStruct1024BytesHomogeneousUint64_a60; - result.a61 = returnStruct1024BytesHomogeneousUint64_a61; - result.a62 = returnStruct1024BytesHomogeneousUint64_a62; - result.a63 = returnStruct1024BytesHomogeneousUint64_a63; - result.a64 = returnStruct1024BytesHomogeneousUint64_a64; - result.a65 = returnStruct1024BytesHomogeneousUint64_a65; - result.a66 = returnStruct1024BytesHomogeneousUint64_a66; - result.a67 = returnStruct1024BytesHomogeneousUint64_a67; - result.a68 = returnStruct1024BytesHomogeneousUint64_a68; - result.a69 = returnStruct1024BytesHomogeneousUint64_a69; - result.a70 = returnStruct1024BytesHomogeneousUint64_a70; - result.a71 = returnStruct1024BytesHomogeneousUint64_a71; - result.a72 = returnStruct1024BytesHomogeneousUint64_a72; - result.a73 = returnStruct1024BytesHomogeneousUint64_a73; - result.a74 = returnStruct1024BytesHomogeneousUint64_a74; - result.a75 = returnStruct1024BytesHomogeneousUint64_a75; - result.a76 = returnStruct1024BytesHomogeneousUint64_a76; - result.a77 = returnStruct1024BytesHomogeneousUint64_a77; - result.a78 = returnStruct1024BytesHomogeneousUint64_a78; - result.a79 = returnStruct1024BytesHomogeneousUint64_a79; - result.a80 = returnStruct1024BytesHomogeneousUint64_a80; - result.a81 = returnStruct1024BytesHomogeneousUint64_a81; - result.a82 = returnStruct1024BytesHomogeneousUint64_a82; - result.a83 = returnStruct1024BytesHomogeneousUint64_a83; - result.a84 = returnStruct1024BytesHomogeneousUint64_a84; - result.a85 = returnStruct1024BytesHomogeneousUint64_a85; - result.a86 = returnStruct1024BytesHomogeneousUint64_a86; - result.a87 = returnStruct1024BytesHomogeneousUint64_a87; - result.a88 = returnStruct1024BytesHomogeneousUint64_a88; - result.a89 = returnStruct1024BytesHomogeneousUint64_a89; - result.a90 = returnStruct1024BytesHomogeneousUint64_a90; - result.a91 = returnStruct1024BytesHomogeneousUint64_a91; - result.a92 = returnStruct1024BytesHomogeneousUint64_a92; - result.a93 = returnStruct1024BytesHomogeneousUint64_a93; - result.a94 = returnStruct1024BytesHomogeneousUint64_a94; - result.a95 = returnStruct1024BytesHomogeneousUint64_a95; - result.a96 = returnStruct1024BytesHomogeneousUint64_a96; - result.a97 = returnStruct1024BytesHomogeneousUint64_a97; - result.a98 = returnStruct1024BytesHomogeneousUint64_a98; - result.a99 = returnStruct1024BytesHomogeneousUint64_a99; - result.a100 = returnStruct1024BytesHomogeneousUint64_a100; - result.a101 = returnStruct1024BytesHomogeneousUint64_a101; - result.a102 = returnStruct1024BytesHomogeneousUint64_a102; - result.a103 = returnStruct1024BytesHomogeneousUint64_a103; - result.a104 = returnStruct1024BytesHomogeneousUint64_a104; - result.a105 = returnStruct1024BytesHomogeneousUint64_a105; - result.a106 = returnStruct1024BytesHomogeneousUint64_a106; - result.a107 = returnStruct1024BytesHomogeneousUint64_a107; - result.a108 = returnStruct1024BytesHomogeneousUint64_a108; - result.a109 = returnStruct1024BytesHomogeneousUint64_a109; - result.a110 = returnStruct1024BytesHomogeneousUint64_a110; - result.a111 = returnStruct1024BytesHomogeneousUint64_a111; - result.a112 = returnStruct1024BytesHomogeneousUint64_a112; - result.a113 = returnStruct1024BytesHomogeneousUint64_a113; - result.a114 = returnStruct1024BytesHomogeneousUint64_a114; - result.a115 = returnStruct1024BytesHomogeneousUint64_a115; - result.a116 = returnStruct1024BytesHomogeneousUint64_a116; - result.a117 = returnStruct1024BytesHomogeneousUint64_a117; - result.a118 = returnStruct1024BytesHomogeneousUint64_a118; - result.a119 = returnStruct1024BytesHomogeneousUint64_a119; - result.a120 = returnStruct1024BytesHomogeneousUint64_a120; - result.a121 = returnStruct1024BytesHomogeneousUint64_a121; - result.a122 = returnStruct1024BytesHomogeneousUint64_a122; - result.a123 = returnStruct1024BytesHomogeneousUint64_a123; - result.a124 = returnStruct1024BytesHomogeneousUint64_a124; - result.a125 = returnStruct1024BytesHomogeneousUint64_a125; - result.a126 = returnStruct1024BytesHomogeneousUint64_a126; - result.a127 = returnStruct1024BytesHomogeneousUint64_a127; - - returnStruct1024BytesHomogeneousUint64ResultPointer = resultPointer; - - return result; -} - -/// Test 1kb struct. -Struct1024BytesHomogeneousUint64 returnStruct1024BytesHomogeneousUint64( - int a0, - int a1, - int a2, - int a3, - int a4, - int a5, - int a6, - int a7, - int a8, - int a9, - int a10, - int a11, - int a12, - int a13, - int a14, - int a15, - int a16, - int a17, - int a18, - int a19, - int a20, - int a21, - int a22, - int a23, - int a24, - int a25, - int a26, - int a27, - int a28, - int a29, - int a30, - int a31, - int a32, - int a33, - int a34, - int a35, - int a36, - int a37, - int a38, - int a39, - int a40, - int a41, - int a42, - int a43, - int a44, - int a45, - int a46, - int a47, - int a48, - int a49, - int a50, - int a51, - int a52, - int a53, - int a54, - int a55, - int a56, - int a57, - int a58, - int a59, - int a60, - int a61, - int a62, - int a63, - int a64, - int a65, - int a66, - int a67, - int a68, - int a69, - int a70, - int a71, - int a72, - int a73, - int a74, - int a75, - int a76, - int a77, - int a78, - int a79, - int a80, - int a81, - int a82, - int a83, - int a84, - int a85, - int a86, - int a87, - int a88, - int a89, - int a90, - int a91, - int a92, - int a93, - int a94, - int a95, - int a96, - int a97, - int a98, - int a99, - int a100, - int a101, - int a102, - int a103, - int a104, - int a105, - int a106, - int a107, - int a108, - int a109, - int a110, - int a111, - int a112, - int a113, - int a114, - int a115, - int a116, - int a117, - int a118, - int a119, - int a120, - int a121, - int a122, - int a123, - int a124, - int a125, - int a126, - int a127) { - print( - "returnStruct1024BytesHomogeneousUint64(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9}, ${a10}, ${a11}, ${a12}, ${a13}, ${a14}, ${a15}, ${a16}, ${a17}, ${a18}, ${a19}, ${a20}, ${a21}, ${a22}, ${a23}, ${a24}, ${a25}, ${a26}, ${a27}, ${a28}, ${a29}, ${a30}, ${a31}, ${a32}, ${a33}, ${a34}, ${a35}, ${a36}, ${a37}, ${a38}, ${a39}, ${a40}, ${a41}, ${a42}, ${a43}, ${a44}, ${a45}, ${a46}, ${a47}, ${a48}, ${a49}, ${a50}, ${a51}, ${a52}, ${a53}, ${a54}, ${a55}, ${a56}, ${a57}, ${a58}, ${a59}, ${a60}, ${a61}, ${a62}, ${a63}, ${a64}, ${a65}, ${a66}, ${a67}, ${a68}, ${a69}, ${a70}, ${a71}, ${a72}, ${a73}, ${a74}, ${a75}, ${a76}, ${a77}, ${a78}, ${a79}, ${a80}, ${a81}, ${a82}, ${a83}, ${a84}, ${a85}, ${a86}, ${a87}, ${a88}, ${a89}, ${a90}, ${a91}, ${a92}, ${a93}, ${a94}, ${a95}, ${a96}, ${a97}, ${a98}, ${a99}, ${a100}, ${a101}, ${a102}, ${a103}, ${a104}, ${a105}, ${a106}, ${a107}, ${a108}, ${a109}, ${a110}, ${a111}, ${a112}, ${a113}, ${a114}, ${a115}, ${a116}, ${a117}, ${a118}, ${a119}, ${a120}, ${a121}, ${a122}, ${a123}, ${a124}, ${a125}, ${a126}, ${a127})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception( - "ReturnStruct1024BytesHomogeneousUint64 throwing on purpose!"); - } - - returnStruct1024BytesHomogeneousUint64_a0 = a0; - returnStruct1024BytesHomogeneousUint64_a1 = a1; - returnStruct1024BytesHomogeneousUint64_a2 = a2; - returnStruct1024BytesHomogeneousUint64_a3 = a3; - returnStruct1024BytesHomogeneousUint64_a4 = a4; - returnStruct1024BytesHomogeneousUint64_a5 = a5; - returnStruct1024BytesHomogeneousUint64_a6 = a6; - returnStruct1024BytesHomogeneousUint64_a7 = a7; - returnStruct1024BytesHomogeneousUint64_a8 = a8; - returnStruct1024BytesHomogeneousUint64_a9 = a9; - returnStruct1024BytesHomogeneousUint64_a10 = a10; - returnStruct1024BytesHomogeneousUint64_a11 = a11; - returnStruct1024BytesHomogeneousUint64_a12 = a12; - returnStruct1024BytesHomogeneousUint64_a13 = a13; - returnStruct1024BytesHomogeneousUint64_a14 = a14; - returnStruct1024BytesHomogeneousUint64_a15 = a15; - returnStruct1024BytesHomogeneousUint64_a16 = a16; - returnStruct1024BytesHomogeneousUint64_a17 = a17; - returnStruct1024BytesHomogeneousUint64_a18 = a18; - returnStruct1024BytesHomogeneousUint64_a19 = a19; - returnStruct1024BytesHomogeneousUint64_a20 = a20; - returnStruct1024BytesHomogeneousUint64_a21 = a21; - returnStruct1024BytesHomogeneousUint64_a22 = a22; - returnStruct1024BytesHomogeneousUint64_a23 = a23; - returnStruct1024BytesHomogeneousUint64_a24 = a24; - returnStruct1024BytesHomogeneousUint64_a25 = a25; - returnStruct1024BytesHomogeneousUint64_a26 = a26; - returnStruct1024BytesHomogeneousUint64_a27 = a27; - returnStruct1024BytesHomogeneousUint64_a28 = a28; - returnStruct1024BytesHomogeneousUint64_a29 = a29; - returnStruct1024BytesHomogeneousUint64_a30 = a30; - returnStruct1024BytesHomogeneousUint64_a31 = a31; - returnStruct1024BytesHomogeneousUint64_a32 = a32; - returnStruct1024BytesHomogeneousUint64_a33 = a33; - returnStruct1024BytesHomogeneousUint64_a34 = a34; - returnStruct1024BytesHomogeneousUint64_a35 = a35; - returnStruct1024BytesHomogeneousUint64_a36 = a36; - returnStruct1024BytesHomogeneousUint64_a37 = a37; - returnStruct1024BytesHomogeneousUint64_a38 = a38; - returnStruct1024BytesHomogeneousUint64_a39 = a39; - returnStruct1024BytesHomogeneousUint64_a40 = a40; - returnStruct1024BytesHomogeneousUint64_a41 = a41; - returnStruct1024BytesHomogeneousUint64_a42 = a42; - returnStruct1024BytesHomogeneousUint64_a43 = a43; - returnStruct1024BytesHomogeneousUint64_a44 = a44; - returnStruct1024BytesHomogeneousUint64_a45 = a45; - returnStruct1024BytesHomogeneousUint64_a46 = a46; - returnStruct1024BytesHomogeneousUint64_a47 = a47; - returnStruct1024BytesHomogeneousUint64_a48 = a48; - returnStruct1024BytesHomogeneousUint64_a49 = a49; - returnStruct1024BytesHomogeneousUint64_a50 = a50; - returnStruct1024BytesHomogeneousUint64_a51 = a51; - returnStruct1024BytesHomogeneousUint64_a52 = a52; - returnStruct1024BytesHomogeneousUint64_a53 = a53; - returnStruct1024BytesHomogeneousUint64_a54 = a54; - returnStruct1024BytesHomogeneousUint64_a55 = a55; - returnStruct1024BytesHomogeneousUint64_a56 = a56; - returnStruct1024BytesHomogeneousUint64_a57 = a57; - returnStruct1024BytesHomogeneousUint64_a58 = a58; - returnStruct1024BytesHomogeneousUint64_a59 = a59; - returnStruct1024BytesHomogeneousUint64_a60 = a60; - returnStruct1024BytesHomogeneousUint64_a61 = a61; - returnStruct1024BytesHomogeneousUint64_a62 = a62; - returnStruct1024BytesHomogeneousUint64_a63 = a63; - returnStruct1024BytesHomogeneousUint64_a64 = a64; - returnStruct1024BytesHomogeneousUint64_a65 = a65; - returnStruct1024BytesHomogeneousUint64_a66 = a66; - returnStruct1024BytesHomogeneousUint64_a67 = a67; - returnStruct1024BytesHomogeneousUint64_a68 = a68; - returnStruct1024BytesHomogeneousUint64_a69 = a69; - returnStruct1024BytesHomogeneousUint64_a70 = a70; - returnStruct1024BytesHomogeneousUint64_a71 = a71; - returnStruct1024BytesHomogeneousUint64_a72 = a72; - returnStruct1024BytesHomogeneousUint64_a73 = a73; - returnStruct1024BytesHomogeneousUint64_a74 = a74; - returnStruct1024BytesHomogeneousUint64_a75 = a75; - returnStruct1024BytesHomogeneousUint64_a76 = a76; - returnStruct1024BytesHomogeneousUint64_a77 = a77; - returnStruct1024BytesHomogeneousUint64_a78 = a78; - returnStruct1024BytesHomogeneousUint64_a79 = a79; - returnStruct1024BytesHomogeneousUint64_a80 = a80; - returnStruct1024BytesHomogeneousUint64_a81 = a81; - returnStruct1024BytesHomogeneousUint64_a82 = a82; - returnStruct1024BytesHomogeneousUint64_a83 = a83; - returnStruct1024BytesHomogeneousUint64_a84 = a84; - returnStruct1024BytesHomogeneousUint64_a85 = a85; - returnStruct1024BytesHomogeneousUint64_a86 = a86; - returnStruct1024BytesHomogeneousUint64_a87 = a87; - returnStruct1024BytesHomogeneousUint64_a88 = a88; - returnStruct1024BytesHomogeneousUint64_a89 = a89; - returnStruct1024BytesHomogeneousUint64_a90 = a90; - returnStruct1024BytesHomogeneousUint64_a91 = a91; - returnStruct1024BytesHomogeneousUint64_a92 = a92; - returnStruct1024BytesHomogeneousUint64_a93 = a93; - returnStruct1024BytesHomogeneousUint64_a94 = a94; - returnStruct1024BytesHomogeneousUint64_a95 = a95; - returnStruct1024BytesHomogeneousUint64_a96 = a96; - returnStruct1024BytesHomogeneousUint64_a97 = a97; - returnStruct1024BytesHomogeneousUint64_a98 = a98; - returnStruct1024BytesHomogeneousUint64_a99 = a99; - returnStruct1024BytesHomogeneousUint64_a100 = a100; - returnStruct1024BytesHomogeneousUint64_a101 = a101; - returnStruct1024BytesHomogeneousUint64_a102 = a102; - returnStruct1024BytesHomogeneousUint64_a103 = a103; - returnStruct1024BytesHomogeneousUint64_a104 = a104; - returnStruct1024BytesHomogeneousUint64_a105 = a105; - returnStruct1024BytesHomogeneousUint64_a106 = a106; - returnStruct1024BytesHomogeneousUint64_a107 = a107; - returnStruct1024BytesHomogeneousUint64_a108 = a108; - returnStruct1024BytesHomogeneousUint64_a109 = a109; - returnStruct1024BytesHomogeneousUint64_a110 = a110; - returnStruct1024BytesHomogeneousUint64_a111 = a111; - returnStruct1024BytesHomogeneousUint64_a112 = a112; - returnStruct1024BytesHomogeneousUint64_a113 = a113; - returnStruct1024BytesHomogeneousUint64_a114 = a114; - returnStruct1024BytesHomogeneousUint64_a115 = a115; - returnStruct1024BytesHomogeneousUint64_a116 = a116; - returnStruct1024BytesHomogeneousUint64_a117 = a117; - returnStruct1024BytesHomogeneousUint64_a118 = a118; - returnStruct1024BytesHomogeneousUint64_a119 = a119; - returnStruct1024BytesHomogeneousUint64_a120 = a120; - returnStruct1024BytesHomogeneousUint64_a121 = a121; - returnStruct1024BytesHomogeneousUint64_a122 = a122; - returnStruct1024BytesHomogeneousUint64_a123 = a123; - returnStruct1024BytesHomogeneousUint64_a124 = a124; - returnStruct1024BytesHomogeneousUint64_a125 = a125; - returnStruct1024BytesHomogeneousUint64_a126 = a126; - returnStruct1024BytesHomogeneousUint64_a127 = a127; - - final result = returnStruct1024BytesHomogeneousUint64CalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct1024BytesHomogeneousUint64AfterCallback() { - calloc.free(returnStruct1024BytesHomogeneousUint64ResultPointer); - - final result = returnStruct1024BytesHomogeneousUint64CalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct1024BytesHomogeneousUint64ResultPointer); -} - -typedef ReturnStruct3BytesPackedIntType = Struct3BytesPackedInt Function( - Int8, Int16); - -// Global variables to be able to test inputs after callback returned. -int returnStruct3BytesPackedInt_a0 = 0; -int returnStruct3BytesPackedInt_a1 = 0; - -// Result variable also global, so we can delete it after the callback. -Pointer returnStruct3BytesPackedIntResultPointer = - nullptr; - -Struct3BytesPackedInt returnStruct3BytesPackedIntCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct3BytesPackedInt_a0; - result.a1 = returnStruct3BytesPackedInt_a1; - - returnStruct3BytesPackedIntResultPointer = resultPointer; - - return result; -} - -/// Small struct with mis-aligned member. -Struct3BytesPackedInt returnStruct3BytesPackedInt(int a0, int a1) { - print("returnStruct3BytesPackedInt(${a0}, ${a1})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct3BytesPackedInt throwing on purpose!"); - } - - returnStruct3BytesPackedInt_a0 = a0; - returnStruct3BytesPackedInt_a1 = a1; - - final result = returnStruct3BytesPackedIntCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct3BytesPackedIntAfterCallback() { - calloc.free(returnStruct3BytesPackedIntResultPointer); - - final result = returnStruct3BytesPackedIntCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct3BytesPackedIntResultPointer); -} - -typedef ReturnStruct8BytesPackedIntType = Struct8BytesPackedInt Function( - Uint8, Uint32, Uint8, Uint8, Uint8); - -// Global variables to be able to test inputs after callback returned. -int returnStruct8BytesPackedInt_a0 = 0; -int returnStruct8BytesPackedInt_a1 = 0; -int returnStruct8BytesPackedInt_a2 = 0; -int returnStruct8BytesPackedInt_a3 = 0; -int returnStruct8BytesPackedInt_a4 = 0; - -// Result variable also global, so we can delete it after the callback. -Pointer returnStruct8BytesPackedIntResultPointer = - nullptr; - -Struct8BytesPackedInt returnStruct8BytesPackedIntCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct8BytesPackedInt_a0; - result.a1 = returnStruct8BytesPackedInt_a1; - result.a2 = returnStruct8BytesPackedInt_a2; - result.a3 = returnStruct8BytesPackedInt_a3; - result.a4 = returnStruct8BytesPackedInt_a4; - - returnStruct8BytesPackedIntResultPointer = resultPointer; - - return result; -} - -/// Struct with mis-aligned member. -Struct8BytesPackedInt returnStruct8BytesPackedInt( - int a0, int a1, int a2, int a3, int a4) { - print("returnStruct8BytesPackedInt(${a0}, ${a1}, ${a2}, ${a3}, ${a4})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct8BytesPackedInt throwing on purpose!"); - } - - returnStruct8BytesPackedInt_a0 = a0; - returnStruct8BytesPackedInt_a1 = a1; - returnStruct8BytesPackedInt_a2 = a2; - returnStruct8BytesPackedInt_a3 = a3; - returnStruct8BytesPackedInt_a4 = a4; - - final result = returnStruct8BytesPackedIntCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct8BytesPackedIntAfterCallback() { - calloc.free(returnStruct8BytesPackedIntResultPointer); - - final result = returnStruct8BytesPackedIntCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct8BytesPackedIntResultPointer); -} - -typedef ReturnStruct9BytesPackedMixedType = Struct9BytesPackedMixed Function( - Uint8, Double); - -// Global variables to be able to test inputs after callback returned. -int returnStruct9BytesPackedMixed_a0 = 0; -double returnStruct9BytesPackedMixed_a1 = 0.0; - -// Result variable also global, so we can delete it after the callback. -Pointer returnStruct9BytesPackedMixedResultPointer = - nullptr; - -Struct9BytesPackedMixed returnStruct9BytesPackedMixedCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStruct9BytesPackedMixed_a0; - result.a1 = returnStruct9BytesPackedMixed_a1; - - returnStruct9BytesPackedMixedResultPointer = resultPointer; - - return result; -} - -/// Struct with mis-aligned member. -/// Tests backfilling of CPU and FPU registers. -Struct9BytesPackedMixed returnStruct9BytesPackedMixed(int a0, double a1) { - print("returnStruct9BytesPackedMixed(${a0}, ${a1})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct9BytesPackedMixed throwing on purpose!"); - } - - returnStruct9BytesPackedMixed_a0 = a0; - returnStruct9BytesPackedMixed_a1 = a1; - - final result = returnStruct9BytesPackedMixedCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct9BytesPackedMixedAfterCallback() { - calloc.free(returnStruct9BytesPackedMixedResultPointer); - - final result = returnStruct9BytesPackedMixedCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct9BytesPackedMixedResultPointer); -} - -typedef ReturnUnion4BytesMixedType = Union4BytesMixed Function(Uint32); - -// Global variables to be able to test inputs after callback returned. -int returnUnion4BytesMixed_a0 = 0; - -// Result variable also global, so we can delete it after the callback. -Pointer returnUnion4BytesMixedResultPointer = nullptr; - -Union4BytesMixed returnUnion4BytesMixedCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnUnion4BytesMixed_a0; - - returnUnion4BytesMixedResultPointer = resultPointer; - - return result; -} - -/// Returning a mixed integer/float union. -Union4BytesMixed returnUnion4BytesMixed(int a0) { - print("returnUnion4BytesMixed(${a0})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnUnion4BytesMixed throwing on purpose!"); - } - - returnUnion4BytesMixed_a0 = a0; - - final result = returnUnion4BytesMixedCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnUnion4BytesMixedAfterCallback() { - calloc.free(returnUnion4BytesMixedResultPointer); - - final result = returnUnion4BytesMixedCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnUnion4BytesMixedResultPointer); -} - -typedef ReturnUnion8BytesNestedFloatType = Union8BytesNestedFloat Function( - Double); - -// Global variables to be able to test inputs after callback returned. -double returnUnion8BytesNestedFloat_a0 = 0.0; - -// Result variable also global, so we can delete it after the callback. -Pointer returnUnion8BytesNestedFloatResultPointer = - nullptr; - -Union8BytesNestedFloat returnUnion8BytesNestedFloatCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnUnion8BytesNestedFloat_a0; - - returnUnion8BytesNestedFloatResultPointer = resultPointer; - - return result; -} - -/// Returning a floating point only union. -Union8BytesNestedFloat returnUnion8BytesNestedFloat(double a0) { - print("returnUnion8BytesNestedFloat(${a0})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnUnion8BytesNestedFloat throwing on purpose!"); - } - - returnUnion8BytesNestedFloat_a0 = a0; - - final result = returnUnion8BytesNestedFloatCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnUnion8BytesNestedFloatAfterCallback() { - calloc.free(returnUnion8BytesNestedFloatResultPointer); - - final result = returnUnion8BytesNestedFloatCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnUnion8BytesNestedFloatResultPointer); -} - -typedef ReturnUnion9BytesNestedIntType = Union9BytesNestedInt Function( - Struct8BytesInt); - -// Global variables to be able to test inputs after callback returned. -Struct8BytesInt returnUnion9BytesNestedInt_a0 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -Pointer returnUnion9BytesNestedIntResultPointer = nullptr; - -Union9BytesNestedInt returnUnion9BytesNestedIntCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0.a0 = returnUnion9BytesNestedInt_a0.a0; - result.a0.a1 = returnUnion9BytesNestedInt_a0.a1; - result.a0.a2 = returnUnion9BytesNestedInt_a0.a2; - - returnUnion9BytesNestedIntResultPointer = resultPointer; - - return result; -} - -/// Returning a mixed-size union. -Union9BytesNestedInt returnUnion9BytesNestedInt(Struct8BytesInt a0) { - print("returnUnion9BytesNestedInt(${a0})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("ReturnUnion9BytesNestedInt throwing on purpose!"); - } - - returnUnion9BytesNestedInt_a0 = a0; - - final result = returnUnion9BytesNestedIntCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnUnion9BytesNestedIntAfterCallback() { - calloc.free(returnUnion9BytesNestedIntResultPointer); - - final result = returnUnion9BytesNestedIntCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnUnion9BytesNestedIntResultPointer); -} - -typedef ReturnUnion16BytesNestedFloatType = Union16BytesNestedFloat Function( - Struct8BytesHomogeneousFloat); - -// Global variables to be able to test inputs after callback returned. -Struct8BytesHomogeneousFloat returnUnion16BytesNestedFloat_a0 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -Pointer returnUnion16BytesNestedFloatResultPointer = - nullptr; - -Union16BytesNestedFloat returnUnion16BytesNestedFloatCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0.a0 = returnUnion16BytesNestedFloat_a0.a0; - result.a0.a1 = returnUnion16BytesNestedFloat_a0.a1; - - returnUnion16BytesNestedFloatResultPointer = resultPointer; - - return result; -} - -/// Returning union with homogenous floats. -Union16BytesNestedFloat returnUnion16BytesNestedFloat( - Struct8BytesHomogeneousFloat a0) { - print("returnUnion16BytesNestedFloat(${a0})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("ReturnUnion16BytesNestedFloat throwing on purpose!"); - } - - returnUnion16BytesNestedFloat_a0 = a0; - - final result = returnUnion16BytesNestedFloatCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnUnion16BytesNestedFloatAfterCallback() { - calloc.free(returnUnion16BytesNestedFloatResultPointer); - - final result = returnUnion16BytesNestedFloatCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnUnion16BytesNestedFloatResultPointer); -} - -typedef ReturnStructArgumentStruct1ByteIntType = Struct1ByteInt Function( - Struct1ByteInt); - -// Global variables to be able to test inputs after callback returned. -Struct1ByteInt returnStructArgumentStruct1ByteInt_a0 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -Struct1ByteInt returnStructArgumentStruct1ByteIntResult = - Pointer.fromAddress(0).ref; - -Struct1ByteInt returnStructArgumentStruct1ByteIntCalculateResult() { - Struct1ByteInt result = returnStructArgumentStruct1ByteInt_a0; - - returnStructArgumentStruct1ByteIntResult = result; - - return result; -} - -/// Test that a struct passed in as argument can be returned. -/// Especially for ffi callbacks. -/// Struct is passed in int registers in most ABIs. -Struct1ByteInt returnStructArgumentStruct1ByteInt(Struct1ByteInt a0) { - print("returnStructArgumentStruct1ByteInt(${a0})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("ReturnStructArgumentStruct1ByteInt throwing on purpose!"); - } - - returnStructArgumentStruct1ByteInt_a0 = a0; - - final result = returnStructArgumentStruct1ByteIntCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStructArgumentStruct1ByteIntAfterCallback() { - final result = returnStructArgumentStruct1ByteIntCalculateResult(); - - print("after callback result = $result"); -} - -typedef ReturnStructArgumentInt32x8Struct1ByteIntType = Struct1ByteInt Function( - Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Struct1ByteInt); - -// Global variables to be able to test inputs after callback returned. -int returnStructArgumentInt32x8Struct1ByteInt_a0 = 0; -int returnStructArgumentInt32x8Struct1ByteInt_a1 = 0; -int returnStructArgumentInt32x8Struct1ByteInt_a2 = 0; -int returnStructArgumentInt32x8Struct1ByteInt_a3 = 0; -int returnStructArgumentInt32x8Struct1ByteInt_a4 = 0; -int returnStructArgumentInt32x8Struct1ByteInt_a5 = 0; -int returnStructArgumentInt32x8Struct1ByteInt_a6 = 0; -int returnStructArgumentInt32x8Struct1ByteInt_a7 = 0; -Struct1ByteInt returnStructArgumentInt32x8Struct1ByteInt_a8 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -Struct1ByteInt returnStructArgumentInt32x8Struct1ByteIntResult = - Pointer.fromAddress(0).ref; - -Struct1ByteInt returnStructArgumentInt32x8Struct1ByteIntCalculateResult() { - Struct1ByteInt result = returnStructArgumentInt32x8Struct1ByteInt_a8; - - returnStructArgumentInt32x8Struct1ByteIntResult = result; - - return result; -} - -/// Test that a struct passed in as argument can be returned. -/// Especially for ffi callbacks. -/// Struct is passed on stack on all ABIs. -Struct1ByteInt returnStructArgumentInt32x8Struct1ByteInt(int a0, int a1, int a2, - int a3, int a4, int a5, int a6, int a7, Struct1ByteInt a8) { - print( - "returnStructArgumentInt32x8Struct1ByteInt(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception( - "ReturnStructArgumentInt32x8Struct1ByteInt throwing on purpose!"); - } - - returnStructArgumentInt32x8Struct1ByteInt_a0 = a0; - returnStructArgumentInt32x8Struct1ByteInt_a1 = a1; - returnStructArgumentInt32x8Struct1ByteInt_a2 = a2; - returnStructArgumentInt32x8Struct1ByteInt_a3 = a3; - returnStructArgumentInt32x8Struct1ByteInt_a4 = a4; - returnStructArgumentInt32x8Struct1ByteInt_a5 = a5; - returnStructArgumentInt32x8Struct1ByteInt_a6 = a6; - returnStructArgumentInt32x8Struct1ByteInt_a7 = a7; - returnStructArgumentInt32x8Struct1ByteInt_a8 = a8; - - final result = returnStructArgumentInt32x8Struct1ByteIntCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStructArgumentInt32x8Struct1ByteIntAfterCallback() { - final result = returnStructArgumentInt32x8Struct1ByteIntCalculateResult(); - - print("after callback result = $result"); -} - -typedef ReturnStructArgumentStruct8BytesHomogeneousFloatType - = Struct8BytesHomogeneousFloat Function(Struct8BytesHomogeneousFloat); - -// Global variables to be able to test inputs after callback returned. -Struct8BytesHomogeneousFloat - returnStructArgumentStruct8BytesHomogeneousFloat_a0 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -Struct8BytesHomogeneousFloat - returnStructArgumentStruct8BytesHomogeneousFloatResult = - Pointer.fromAddress(0).ref; - -Struct8BytesHomogeneousFloat - returnStructArgumentStruct8BytesHomogeneousFloatCalculateResult() { - Struct8BytesHomogeneousFloat result = - returnStructArgumentStruct8BytesHomogeneousFloat_a0; - - returnStructArgumentStruct8BytesHomogeneousFloatResult = result; - - return result; -} - -/// Test that a struct passed in as argument can be returned. -/// Especially for ffi callbacks. -/// Struct is passed in float registers in most ABIs. -Struct8BytesHomogeneousFloat returnStructArgumentStruct8BytesHomogeneousFloat( - Struct8BytesHomogeneousFloat a0) { - print("returnStructArgumentStruct8BytesHomogeneousFloat(${a0})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception( - "ReturnStructArgumentStruct8BytesHomogeneousFloat throwing on purpose!"); - } - - returnStructArgumentStruct8BytesHomogeneousFloat_a0 = a0; - - final result = - returnStructArgumentStruct8BytesHomogeneousFloatCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStructArgumentStruct8BytesHomogeneousFloatAfterCallback() { - final result = - returnStructArgumentStruct8BytesHomogeneousFloatCalculateResult(); - - print("after callback result = $result"); -} - -typedef ReturnStructArgumentStruct20BytesHomogeneousInt32Type - = Struct20BytesHomogeneousInt32 Function(Struct20BytesHomogeneousInt32); - -// Global variables to be able to test inputs after callback returned. -Struct20BytesHomogeneousInt32 - returnStructArgumentStruct20BytesHomogeneousInt32_a0 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -Struct20BytesHomogeneousInt32 - returnStructArgumentStruct20BytesHomogeneousInt32Result = - Pointer.fromAddress(0).ref; - -Struct20BytesHomogeneousInt32 - returnStructArgumentStruct20BytesHomogeneousInt32CalculateResult() { - Struct20BytesHomogeneousInt32 result = - returnStructArgumentStruct20BytesHomogeneousInt32_a0; - - returnStructArgumentStruct20BytesHomogeneousInt32Result = result; - - return result; -} - -/// On arm64, both argument and return value are passed in by pointer. -Struct20BytesHomogeneousInt32 returnStructArgumentStruct20BytesHomogeneousInt32( - Struct20BytesHomogeneousInt32 a0) { - print("returnStructArgumentStruct20BytesHomogeneousInt32(${a0})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception( - "ReturnStructArgumentStruct20BytesHomogeneousInt32 throwing on purpose!"); - } - - returnStructArgumentStruct20BytesHomogeneousInt32_a0 = a0; - - final result = - returnStructArgumentStruct20BytesHomogeneousInt32CalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStructArgumentStruct20BytesHomogeneousInt32AfterCallback() { - final result = - returnStructArgumentStruct20BytesHomogeneousInt32CalculateResult(); - - print("after callback result = $result"); -} - -typedef ReturnStructArgumentInt32x8Struct20BytesHomogeneouType - = Struct20BytesHomogeneousInt32 Function(Int32, Int32, Int32, Int32, Int32, - Int32, Int32, Int32, Struct20BytesHomogeneousInt32); - -// Global variables to be able to test inputs after callback returned. -int returnStructArgumentInt32x8Struct20BytesHomogeneou_a0 = 0; -int returnStructArgumentInt32x8Struct20BytesHomogeneou_a1 = 0; -int returnStructArgumentInt32x8Struct20BytesHomogeneou_a2 = 0; -int returnStructArgumentInt32x8Struct20BytesHomogeneou_a3 = 0; -int returnStructArgumentInt32x8Struct20BytesHomogeneou_a4 = 0; -int returnStructArgumentInt32x8Struct20BytesHomogeneou_a5 = 0; -int returnStructArgumentInt32x8Struct20BytesHomogeneou_a6 = 0; -int returnStructArgumentInt32x8Struct20BytesHomogeneou_a7 = 0; -Struct20BytesHomogeneousInt32 - returnStructArgumentInt32x8Struct20BytesHomogeneou_a8 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -Struct20BytesHomogeneousInt32 - returnStructArgumentInt32x8Struct20BytesHomogeneouResult = - Pointer.fromAddress(0).ref; - -Struct20BytesHomogeneousInt32 - returnStructArgumentInt32x8Struct20BytesHomogeneouCalculateResult() { - Struct20BytesHomogeneousInt32 result = - returnStructArgumentInt32x8Struct20BytesHomogeneou_a8; - - returnStructArgumentInt32x8Struct20BytesHomogeneouResult = result; - - return result; -} - -/// On arm64, both argument and return value are passed in by pointer. -/// Ints exhaust registers, so that pointer is passed on stack. -Struct20BytesHomogeneousInt32 - returnStructArgumentInt32x8Struct20BytesHomogeneou( - int a0, - int a1, - int a2, - int a3, - int a4, - int a5, - int a6, - int a7, - Struct20BytesHomogeneousInt32 a8) { - print( - "returnStructArgumentInt32x8Struct20BytesHomogeneou(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception( - "ReturnStructArgumentInt32x8Struct20BytesHomogeneou throwing on purpose!"); - } - - returnStructArgumentInt32x8Struct20BytesHomogeneou_a0 = a0; - returnStructArgumentInt32x8Struct20BytesHomogeneou_a1 = a1; - returnStructArgumentInt32x8Struct20BytesHomogeneou_a2 = a2; - returnStructArgumentInt32x8Struct20BytesHomogeneou_a3 = a3; - returnStructArgumentInt32x8Struct20BytesHomogeneou_a4 = a4; - returnStructArgumentInt32x8Struct20BytesHomogeneou_a5 = a5; - returnStructArgumentInt32x8Struct20BytesHomogeneou_a6 = a6; - returnStructArgumentInt32x8Struct20BytesHomogeneou_a7 = a7; - returnStructArgumentInt32x8Struct20BytesHomogeneou_a8 = a8; - - final result = - returnStructArgumentInt32x8Struct20BytesHomogeneouCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStructArgumentInt32x8Struct20BytesHomogeneouAfterCallback() { - final result = - returnStructArgumentInt32x8Struct20BytesHomogeneouCalculateResult(); - - print("after callback result = $result"); -} - -typedef ReturnStructArgumentStruct8BytesInlineArrayIntType - = Struct8BytesInlineArrayInt Function(Struct8BytesInlineArrayInt); - -// Global variables to be able to test inputs after callback returned. -Struct8BytesInlineArrayInt returnStructArgumentStruct8BytesInlineArrayInt_a0 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -Struct8BytesInlineArrayInt - returnStructArgumentStruct8BytesInlineArrayIntResult = - Pointer.fromAddress(0).ref; - -Struct8BytesInlineArrayInt - returnStructArgumentStruct8BytesInlineArrayIntCalculateResult() { - Struct8BytesInlineArrayInt result = - returnStructArgumentStruct8BytesInlineArrayInt_a0; - - returnStructArgumentStruct8BytesInlineArrayIntResult = result; - - return result; -} - -/// Test returning struct with inline array. -Struct8BytesInlineArrayInt returnStructArgumentStruct8BytesInlineArrayInt( - Struct8BytesInlineArrayInt a0) { - print("returnStructArgumentStruct8BytesInlineArrayInt(${a0})"); - - // In legacy mode, possibly return null. - if (a0.a0[0] == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0[0] == 42 || a0.a0[0] == 84) { - print("throwing!"); - throw Exception( - "ReturnStructArgumentStruct8BytesInlineArrayInt throwing on purpose!"); - } - - returnStructArgumentStruct8BytesInlineArrayInt_a0 = a0; - - final result = - returnStructArgumentStruct8BytesInlineArrayIntCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStructArgumentStruct8BytesInlineArrayIntAfterCallback() { - final result = - returnStructArgumentStruct8BytesInlineArrayIntCalculateResult(); - - print("after callback result = $result"); -} - -typedef ReturnStructArgumentStructStruct16BytesHomogeneousType - = StructStruct16BytesHomogeneousFloat2 Function( - StructStruct16BytesHomogeneousFloat2); - -// Global variables to be able to test inputs after callback returned. -StructStruct16BytesHomogeneousFloat2 - returnStructArgumentStructStruct16BytesHomogeneous_a0 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -StructStruct16BytesHomogeneousFloat2 - returnStructArgumentStructStruct16BytesHomogeneousResult = - Pointer.fromAddress(0).ref; - -StructStruct16BytesHomogeneousFloat2 - returnStructArgumentStructStruct16BytesHomogeneousCalculateResult() { - StructStruct16BytesHomogeneousFloat2 result = - returnStructArgumentStructStruct16BytesHomogeneous_a0; - - returnStructArgumentStructStruct16BytesHomogeneousResult = result; - - return result; -} - -/// Return value in FPU registers on arm hardfp and arm64. -StructStruct16BytesHomogeneousFloat2 - returnStructArgumentStructStruct16BytesHomogeneous( - StructStruct16BytesHomogeneousFloat2 a0) { - print("returnStructArgumentStructStruct16BytesHomogeneous(${a0})"); - - // In legacy mode, possibly return null. - if (a0.a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0.a0 == 42 || a0.a0.a0 == 84) { - print("throwing!"); - throw Exception( - "ReturnStructArgumentStructStruct16BytesHomogeneous throwing on purpose!"); - } - - returnStructArgumentStructStruct16BytesHomogeneous_a0 = a0; - - final result = - returnStructArgumentStructStruct16BytesHomogeneousCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStructArgumentStructStruct16BytesHomogeneousAfterCallback() { - final result = - returnStructArgumentStructStruct16BytesHomogeneousCalculateResult(); - - print("after callback result = $result"); -} - -typedef ReturnStructArgumentStructStruct32BytesHomogeneousType - = StructStruct32BytesHomogeneousDouble2 Function( - StructStruct32BytesHomogeneousDouble2); - -// Global variables to be able to test inputs after callback returned. -StructStruct32BytesHomogeneousDouble2 - returnStructArgumentStructStruct32BytesHomogeneous_a0 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -StructStruct32BytesHomogeneousDouble2 - returnStructArgumentStructStruct32BytesHomogeneousResult = - Pointer.fromAddress(0).ref; - -StructStruct32BytesHomogeneousDouble2 - returnStructArgumentStructStruct32BytesHomogeneousCalculateResult() { - StructStruct32BytesHomogeneousDouble2 result = - returnStructArgumentStructStruct32BytesHomogeneous_a0; - - returnStructArgumentStructStruct32BytesHomogeneousResult = result; - - return result; -} - -/// Return value in FPU registers on arm64. -StructStruct32BytesHomogeneousDouble2 - returnStructArgumentStructStruct32BytesHomogeneous( - StructStruct32BytesHomogeneousDouble2 a0) { - print("returnStructArgumentStructStruct32BytesHomogeneous(${a0})"); - - // In legacy mode, possibly return null. - if (a0.a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0.a0 == 42 || a0.a0.a0 == 84) { - print("throwing!"); - throw Exception( - "ReturnStructArgumentStructStruct32BytesHomogeneous throwing on purpose!"); - } - - returnStructArgumentStructStruct32BytesHomogeneous_a0 = a0; - - final result = - returnStructArgumentStructStruct32BytesHomogeneousCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStructArgumentStructStruct32BytesHomogeneousAfterCallback() { - final result = - returnStructArgumentStructStruct32BytesHomogeneousCalculateResult(); - - print("after callback result = $result"); -} - -typedef ReturnStructArgumentStructStruct16BytesMixed3Type - = StructStruct16BytesMixed3 Function(StructStruct16BytesMixed3); - -// Global variables to be able to test inputs after callback returned. -StructStruct16BytesMixed3 returnStructArgumentStructStruct16BytesMixed3_a0 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -StructStruct16BytesMixed3 returnStructArgumentStructStruct16BytesMixed3Result = - Pointer.fromAddress(0).ref; - -StructStruct16BytesMixed3 - returnStructArgumentStructStruct16BytesMixed3CalculateResult() { - StructStruct16BytesMixed3 result = - returnStructArgumentStructStruct16BytesMixed3_a0; - - returnStructArgumentStructStruct16BytesMixed3Result = result; - - return result; -} - -/// On x64 Linux, return value is split over FP and int registers. -StructStruct16BytesMixed3 returnStructArgumentStructStruct16BytesMixed3( - StructStruct16BytesMixed3 a0) { - print("returnStructArgumentStructStruct16BytesMixed3(${a0})"); - - // In legacy mode, possibly return null. - if (a0.a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0.a0 == 42 || a0.a0.a0 == 84) { - print("throwing!"); - throw Exception( - "ReturnStructArgumentStructStruct16BytesMixed3 throwing on purpose!"); - } - - returnStructArgumentStructStruct16BytesMixed3_a0 = a0; - - final result = returnStructArgumentStructStruct16BytesMixed3CalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStructArgumentStructStruct16BytesMixed3AfterCallback() { - final result = returnStructArgumentStructStruct16BytesMixed3CalculateResult(); - - print("after callback result = $result"); -} - -typedef ReturnStructAlignmentInt16Type = StructAlignmentInt16 Function( - Int8, Int16, Int8); - -// Global variables to be able to test inputs after callback returned. -int returnStructAlignmentInt16_a0 = 0; -int returnStructAlignmentInt16_a1 = 0; -int returnStructAlignmentInt16_a2 = 0; - -// Result variable also global, so we can delete it after the callback. -Pointer returnStructAlignmentInt16ResultPointer = nullptr; - -StructAlignmentInt16 returnStructAlignmentInt16CalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStructAlignmentInt16_a0; - result.a1 = returnStructAlignmentInt16_a1; - result.a2 = returnStructAlignmentInt16_a2; - - returnStructAlignmentInt16ResultPointer = resultPointer; - - return result; -} - -/// Test alignment and padding of 16 byte int within struct. -StructAlignmentInt16 returnStructAlignmentInt16(int a0, int a1, int a2) { - print("returnStructAlignmentInt16(${a0}, ${a1}, ${a2})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStructAlignmentInt16 throwing on purpose!"); - } - - returnStructAlignmentInt16_a0 = a0; - returnStructAlignmentInt16_a1 = a1; - returnStructAlignmentInt16_a2 = a2; - - final result = returnStructAlignmentInt16CalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStructAlignmentInt16AfterCallback() { - calloc.free(returnStructAlignmentInt16ResultPointer); - - final result = returnStructAlignmentInt16CalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStructAlignmentInt16ResultPointer); -} - -typedef ReturnStructAlignmentInt32Type = StructAlignmentInt32 Function( - Int8, Int32, Int8); - -// Global variables to be able to test inputs after callback returned. -int returnStructAlignmentInt32_a0 = 0; -int returnStructAlignmentInt32_a1 = 0; -int returnStructAlignmentInt32_a2 = 0; - -// Result variable also global, so we can delete it after the callback. -Pointer returnStructAlignmentInt32ResultPointer = nullptr; - -StructAlignmentInt32 returnStructAlignmentInt32CalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStructAlignmentInt32_a0; - result.a1 = returnStructAlignmentInt32_a1; - result.a2 = returnStructAlignmentInt32_a2; - - returnStructAlignmentInt32ResultPointer = resultPointer; - - return result; -} - -/// Test alignment and padding of 32 byte int within struct. -StructAlignmentInt32 returnStructAlignmentInt32(int a0, int a1, int a2) { - print("returnStructAlignmentInt32(${a0}, ${a1}, ${a2})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStructAlignmentInt32 throwing on purpose!"); - } - - returnStructAlignmentInt32_a0 = a0; - returnStructAlignmentInt32_a1 = a1; - returnStructAlignmentInt32_a2 = a2; - - final result = returnStructAlignmentInt32CalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStructAlignmentInt32AfterCallback() { - calloc.free(returnStructAlignmentInt32ResultPointer); - - final result = returnStructAlignmentInt32CalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStructAlignmentInt32ResultPointer); -} - -typedef ReturnStructAlignmentInt64Type = StructAlignmentInt64 Function( - Int8, Int64, Int8); - -// Global variables to be able to test inputs after callback returned. -int returnStructAlignmentInt64_a0 = 0; -int returnStructAlignmentInt64_a1 = 0; -int returnStructAlignmentInt64_a2 = 0; - -// Result variable also global, so we can delete it after the callback. -Pointer returnStructAlignmentInt64ResultPointer = nullptr; - -StructAlignmentInt64 returnStructAlignmentInt64CalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStructAlignmentInt64_a0; - result.a1 = returnStructAlignmentInt64_a1; - result.a2 = returnStructAlignmentInt64_a2; - - returnStructAlignmentInt64ResultPointer = resultPointer; - - return result; -} - -/// Test alignment and padding of 64 byte int within struct. -StructAlignmentInt64 returnStructAlignmentInt64(int a0, int a1, int a2) { - print("returnStructAlignmentInt64(${a0}, ${a1}, ${a2})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception("ReturnStructAlignmentInt64 throwing on purpose!"); - } - - returnStructAlignmentInt64_a0 = a0; - returnStructAlignmentInt64_a1 = a1; - returnStructAlignmentInt64_a2 = a2; - - final result = returnStructAlignmentInt64CalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStructAlignmentInt64AfterCallback() { - calloc.free(returnStructAlignmentInt64ResultPointer); - - final result = returnStructAlignmentInt64CalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStructAlignmentInt64ResultPointer); -} - -typedef ReturnStruct8BytesNestedIntType = Struct8BytesNestedInt Function( - Struct4BytesHomogeneousInt16, Struct4BytesHomogeneousInt16); - -// Global variables to be able to test inputs after callback returned. -Struct4BytesHomogeneousInt16 returnStruct8BytesNestedInt_a0 = - Pointer.fromAddress(0).ref; -Struct4BytesHomogeneousInt16 returnStruct8BytesNestedInt_a1 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -Pointer returnStruct8BytesNestedIntResultPointer = - nullptr; - -Struct8BytesNestedInt returnStruct8BytesNestedIntCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0.a0 = returnStruct8BytesNestedInt_a0.a0; - result.a0.a1 = returnStruct8BytesNestedInt_a0.a1; - result.a1.a0 = returnStruct8BytesNestedInt_a1.a0; - result.a1.a1 = returnStruct8BytesNestedInt_a1.a1; - - returnStruct8BytesNestedIntResultPointer = resultPointer; - - return result; -} - -/// Simple nested struct. -Struct8BytesNestedInt returnStruct8BytesNestedInt( - Struct4BytesHomogeneousInt16 a0, Struct4BytesHomogeneousInt16 a1) { - print("returnStruct8BytesNestedInt(${a0}, ${a1})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct8BytesNestedInt throwing on purpose!"); - } - - returnStruct8BytesNestedInt_a0 = a0; - returnStruct8BytesNestedInt_a1 = a1; - - final result = returnStruct8BytesNestedIntCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct8BytesNestedIntAfterCallback() { - calloc.free(returnStruct8BytesNestedIntResultPointer); - - final result = returnStruct8BytesNestedIntCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct8BytesNestedIntResultPointer); -} - -typedef ReturnStruct8BytesNestedFloatType = Struct8BytesNestedFloat Function( - Struct4BytesFloat, Struct4BytesFloat); - -// Global variables to be able to test inputs after callback returned. -Struct4BytesFloat returnStruct8BytesNestedFloat_a0 = - Pointer.fromAddress(0).ref; -Struct4BytesFloat returnStruct8BytesNestedFloat_a1 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -Pointer returnStruct8BytesNestedFloatResultPointer = - nullptr; - -Struct8BytesNestedFloat returnStruct8BytesNestedFloatCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0.a0 = returnStruct8BytesNestedFloat_a0.a0; - result.a1.a0 = returnStruct8BytesNestedFloat_a1.a0; - - returnStruct8BytesNestedFloatResultPointer = resultPointer; - - return result; -} - -/// Simple nested struct with floats. -Struct8BytesNestedFloat returnStruct8BytesNestedFloat( - Struct4BytesFloat a0, Struct4BytesFloat a1) { - print("returnStruct8BytesNestedFloat(${a0}, ${a1})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct8BytesNestedFloat throwing on purpose!"); - } - - returnStruct8BytesNestedFloat_a0 = a0; - returnStruct8BytesNestedFloat_a1 = a1; - - final result = returnStruct8BytesNestedFloatCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct8BytesNestedFloatAfterCallback() { - calloc.free(returnStruct8BytesNestedFloatResultPointer); - - final result = returnStruct8BytesNestedFloatCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct8BytesNestedFloatResultPointer); -} - -typedef ReturnStruct8BytesNestedFloat2Type = Struct8BytesNestedFloat2 Function( - Struct4BytesFloat, Float); - -// Global variables to be able to test inputs after callback returned. -Struct4BytesFloat returnStruct8BytesNestedFloat2_a0 = - Pointer.fromAddress(0).ref; -double returnStruct8BytesNestedFloat2_a1 = 0.0; - -// Result variable also global, so we can delete it after the callback. -Pointer returnStruct8BytesNestedFloat2ResultPointer = - nullptr; - -Struct8BytesNestedFloat2 returnStruct8BytesNestedFloat2CalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0.a0 = returnStruct8BytesNestedFloat2_a0.a0; - result.a1 = returnStruct8BytesNestedFloat2_a1; - - returnStruct8BytesNestedFloat2ResultPointer = resultPointer; - - return result; -} - -/// The nesting is irregular, testing homogenous float rules on arm and arm64, -/// and the fpu register usage on x64. -Struct8BytesNestedFloat2 returnStruct8BytesNestedFloat2( - Struct4BytesFloat a0, double a1) { - print("returnStruct8BytesNestedFloat2(${a0}, ${a1})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct8BytesNestedFloat2 throwing on purpose!"); - } - - returnStruct8BytesNestedFloat2_a0 = a0; - returnStruct8BytesNestedFloat2_a1 = a1; - - final result = returnStruct8BytesNestedFloat2CalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct8BytesNestedFloat2AfterCallback() { - calloc.free(returnStruct8BytesNestedFloat2ResultPointer); - - final result = returnStruct8BytesNestedFloat2CalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct8BytesNestedFloat2ResultPointer); -} - -typedef ReturnStruct8BytesNestedMixedType = Struct8BytesNestedMixed Function( - Struct4BytesHomogeneousInt16, Struct4BytesFloat); - -// Global variables to be able to test inputs after callback returned. -Struct4BytesHomogeneousInt16 returnStruct8BytesNestedMixed_a0 = - Pointer.fromAddress(0).ref; -Struct4BytesFloat returnStruct8BytesNestedMixed_a1 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -Pointer returnStruct8BytesNestedMixedResultPointer = - nullptr; - -Struct8BytesNestedMixed returnStruct8BytesNestedMixedCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0.a0 = returnStruct8BytesNestedMixed_a0.a0; - result.a0.a1 = returnStruct8BytesNestedMixed_a0.a1; - result.a1.a0 = returnStruct8BytesNestedMixed_a1.a0; - - returnStruct8BytesNestedMixedResultPointer = resultPointer; - - return result; -} - -/// Simple nested struct with mixed members. -Struct8BytesNestedMixed returnStruct8BytesNestedMixed( - Struct4BytesHomogeneousInt16 a0, Struct4BytesFloat a1) { - print("returnStruct8BytesNestedMixed(${a0}, ${a1})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct8BytesNestedMixed throwing on purpose!"); - } - - returnStruct8BytesNestedMixed_a0 = a0; - returnStruct8BytesNestedMixed_a1 = a1; - - final result = returnStruct8BytesNestedMixedCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct8BytesNestedMixedAfterCallback() { - calloc.free(returnStruct8BytesNestedMixedResultPointer); - - final result = returnStruct8BytesNestedMixedCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct8BytesNestedMixedResultPointer); -} - -typedef ReturnStruct16BytesNestedIntType = Struct16BytesNestedInt Function( - Struct8BytesNestedInt, Struct8BytesNestedInt); - -// Global variables to be able to test inputs after callback returned. -Struct8BytesNestedInt returnStruct16BytesNestedInt_a0 = - Pointer.fromAddress(0).ref; -Struct8BytesNestedInt returnStruct16BytesNestedInt_a1 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -Pointer returnStruct16BytesNestedIntResultPointer = - nullptr; - -Struct16BytesNestedInt returnStruct16BytesNestedIntCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0.a0.a0 = returnStruct16BytesNestedInt_a0.a0.a0; - result.a0.a0.a1 = returnStruct16BytesNestedInt_a0.a0.a1; - result.a0.a1.a0 = returnStruct16BytesNestedInt_a0.a1.a0; - result.a0.a1.a1 = returnStruct16BytesNestedInt_a0.a1.a1; - result.a1.a0.a0 = returnStruct16BytesNestedInt_a1.a0.a0; - result.a1.a0.a1 = returnStruct16BytesNestedInt_a1.a0.a1; - result.a1.a1.a0 = returnStruct16BytesNestedInt_a1.a1.a0; - result.a1.a1.a1 = returnStruct16BytesNestedInt_a1.a1.a1; - - returnStruct16BytesNestedIntResultPointer = resultPointer; - - return result; -} - -/// Deeper nested struct to test recursive member access. -Struct16BytesNestedInt returnStruct16BytesNestedInt( - Struct8BytesNestedInt a0, Struct8BytesNestedInt a1) { - print("returnStruct16BytesNestedInt(${a0}, ${a1})"); - - // In legacy mode, possibly return null. - if (a0.a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0.a0 == 42 || a0.a0.a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct16BytesNestedInt throwing on purpose!"); - } - - returnStruct16BytesNestedInt_a0 = a0; - returnStruct16BytesNestedInt_a1 = a1; - - final result = returnStruct16BytesNestedIntCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct16BytesNestedIntAfterCallback() { - calloc.free(returnStruct16BytesNestedIntResultPointer); - - final result = returnStruct16BytesNestedIntCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct16BytesNestedIntResultPointer); -} - -typedef ReturnStruct32BytesNestedIntType = Struct32BytesNestedInt Function( - Struct16BytesNestedInt, Struct16BytesNestedInt); - -// Global variables to be able to test inputs after callback returned. -Struct16BytesNestedInt returnStruct32BytesNestedInt_a0 = - Pointer.fromAddress(0).ref; -Struct16BytesNestedInt returnStruct32BytesNestedInt_a1 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -Pointer returnStruct32BytesNestedIntResultPointer = - nullptr; - -Struct32BytesNestedInt returnStruct32BytesNestedIntCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0.a0.a0.a0 = returnStruct32BytesNestedInt_a0.a0.a0.a0; - result.a0.a0.a0.a1 = returnStruct32BytesNestedInt_a0.a0.a0.a1; - result.a0.a0.a1.a0 = returnStruct32BytesNestedInt_a0.a0.a1.a0; - result.a0.a0.a1.a1 = returnStruct32BytesNestedInt_a0.a0.a1.a1; - result.a0.a1.a0.a0 = returnStruct32BytesNestedInt_a0.a1.a0.a0; - result.a0.a1.a0.a1 = returnStruct32BytesNestedInt_a0.a1.a0.a1; - result.a0.a1.a1.a0 = returnStruct32BytesNestedInt_a0.a1.a1.a0; - result.a0.a1.a1.a1 = returnStruct32BytesNestedInt_a0.a1.a1.a1; - result.a1.a0.a0.a0 = returnStruct32BytesNestedInt_a1.a0.a0.a0; - result.a1.a0.a0.a1 = returnStruct32BytesNestedInt_a1.a0.a0.a1; - result.a1.a0.a1.a0 = returnStruct32BytesNestedInt_a1.a0.a1.a0; - result.a1.a0.a1.a1 = returnStruct32BytesNestedInt_a1.a0.a1.a1; - result.a1.a1.a0.a0 = returnStruct32BytesNestedInt_a1.a1.a0.a0; - result.a1.a1.a0.a1 = returnStruct32BytesNestedInt_a1.a1.a0.a1; - result.a1.a1.a1.a0 = returnStruct32BytesNestedInt_a1.a1.a1.a0; - result.a1.a1.a1.a1 = returnStruct32BytesNestedInt_a1.a1.a1.a1; - - returnStruct32BytesNestedIntResultPointer = resultPointer; - - return result; -} - -/// Even deeper nested struct to test recursive member access. -Struct32BytesNestedInt returnStruct32BytesNestedInt( - Struct16BytesNestedInt a0, Struct16BytesNestedInt a1) { - print("returnStruct32BytesNestedInt(${a0}, ${a1})"); - - // In legacy mode, possibly return null. - if (a0.a0.a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0.a0.a0 == 42 || a0.a0.a0.a0 == 84) { - print("throwing!"); - throw Exception("ReturnStruct32BytesNestedInt throwing on purpose!"); - } - - returnStruct32BytesNestedInt_a0 = a0; - returnStruct32BytesNestedInt_a1 = a1; - - final result = returnStruct32BytesNestedIntCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStruct32BytesNestedIntAfterCallback() { - calloc.free(returnStruct32BytesNestedIntResultPointer); - - final result = returnStruct32BytesNestedIntCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStruct32BytesNestedIntResultPointer); -} - -typedef ReturnStructNestedIntStructAlignmentInt16Type - = StructNestedIntStructAlignmentInt16 Function( - StructAlignmentInt16, StructAlignmentInt16); - -// Global variables to be able to test inputs after callback returned. -StructAlignmentInt16 returnStructNestedIntStructAlignmentInt16_a0 = - Pointer.fromAddress(0).ref; -StructAlignmentInt16 returnStructNestedIntStructAlignmentInt16_a1 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -Pointer - returnStructNestedIntStructAlignmentInt16ResultPointer = nullptr; - -StructNestedIntStructAlignmentInt16 - returnStructNestedIntStructAlignmentInt16CalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0.a0 = returnStructNestedIntStructAlignmentInt16_a0.a0; - result.a0.a1 = returnStructNestedIntStructAlignmentInt16_a0.a1; - result.a0.a2 = returnStructNestedIntStructAlignmentInt16_a0.a2; - result.a1.a0 = returnStructNestedIntStructAlignmentInt16_a1.a0; - result.a1.a1 = returnStructNestedIntStructAlignmentInt16_a1.a1; - result.a1.a2 = returnStructNestedIntStructAlignmentInt16_a1.a2; - - returnStructNestedIntStructAlignmentInt16ResultPointer = resultPointer; - - return result; -} - -/// Test alignment and padding of nested struct with 16 byte int. -StructNestedIntStructAlignmentInt16 returnStructNestedIntStructAlignmentInt16( - StructAlignmentInt16 a0, StructAlignmentInt16 a1) { - print("returnStructNestedIntStructAlignmentInt16(${a0}, ${a1})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception( - "ReturnStructNestedIntStructAlignmentInt16 throwing on purpose!"); - } - - returnStructNestedIntStructAlignmentInt16_a0 = a0; - returnStructNestedIntStructAlignmentInt16_a1 = a1; - - final result = returnStructNestedIntStructAlignmentInt16CalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStructNestedIntStructAlignmentInt16AfterCallback() { - calloc.free(returnStructNestedIntStructAlignmentInt16ResultPointer); - - final result = returnStructNestedIntStructAlignmentInt16CalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStructNestedIntStructAlignmentInt16ResultPointer); -} - -typedef ReturnStructNestedIntStructAlignmentInt32Type - = StructNestedIntStructAlignmentInt32 Function( - StructAlignmentInt32, StructAlignmentInt32); - -// Global variables to be able to test inputs after callback returned. -StructAlignmentInt32 returnStructNestedIntStructAlignmentInt32_a0 = - Pointer.fromAddress(0).ref; -StructAlignmentInt32 returnStructNestedIntStructAlignmentInt32_a1 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -Pointer - returnStructNestedIntStructAlignmentInt32ResultPointer = nullptr; - -StructNestedIntStructAlignmentInt32 - returnStructNestedIntStructAlignmentInt32CalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0.a0 = returnStructNestedIntStructAlignmentInt32_a0.a0; - result.a0.a1 = returnStructNestedIntStructAlignmentInt32_a0.a1; - result.a0.a2 = returnStructNestedIntStructAlignmentInt32_a0.a2; - result.a1.a0 = returnStructNestedIntStructAlignmentInt32_a1.a0; - result.a1.a1 = returnStructNestedIntStructAlignmentInt32_a1.a1; - result.a1.a2 = returnStructNestedIntStructAlignmentInt32_a1.a2; - - returnStructNestedIntStructAlignmentInt32ResultPointer = resultPointer; - - return result; -} - -/// Test alignment and padding of nested struct with 32 byte int. -StructNestedIntStructAlignmentInt32 returnStructNestedIntStructAlignmentInt32( - StructAlignmentInt32 a0, StructAlignmentInt32 a1) { - print("returnStructNestedIntStructAlignmentInt32(${a0}, ${a1})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception( - "ReturnStructNestedIntStructAlignmentInt32 throwing on purpose!"); - } - - returnStructNestedIntStructAlignmentInt32_a0 = a0; - returnStructNestedIntStructAlignmentInt32_a1 = a1; - - final result = returnStructNestedIntStructAlignmentInt32CalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStructNestedIntStructAlignmentInt32AfterCallback() { - calloc.free(returnStructNestedIntStructAlignmentInt32ResultPointer); - - final result = returnStructNestedIntStructAlignmentInt32CalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStructNestedIntStructAlignmentInt32ResultPointer); -} - -typedef ReturnStructNestedIntStructAlignmentInt64Type - = StructNestedIntStructAlignmentInt64 Function( - StructAlignmentInt64, StructAlignmentInt64); - -// Global variables to be able to test inputs after callback returned. -StructAlignmentInt64 returnStructNestedIntStructAlignmentInt64_a0 = - Pointer.fromAddress(0).ref; -StructAlignmentInt64 returnStructNestedIntStructAlignmentInt64_a1 = - Pointer.fromAddress(0).ref; - -// Result variable also global, so we can delete it after the callback. -Pointer - returnStructNestedIntStructAlignmentInt64ResultPointer = nullptr; - -StructNestedIntStructAlignmentInt64 - returnStructNestedIntStructAlignmentInt64CalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0.a0 = returnStructNestedIntStructAlignmentInt64_a0.a0; - result.a0.a1 = returnStructNestedIntStructAlignmentInt64_a0.a1; - result.a0.a2 = returnStructNestedIntStructAlignmentInt64_a0.a2; - result.a1.a0 = returnStructNestedIntStructAlignmentInt64_a1.a0; - result.a1.a1 = returnStructNestedIntStructAlignmentInt64_a1.a1; - result.a1.a2 = returnStructNestedIntStructAlignmentInt64_a1.a2; - - returnStructNestedIntStructAlignmentInt64ResultPointer = resultPointer; - - return result; -} - -/// Test alignment and padding of nested struct with 64 byte int. -StructNestedIntStructAlignmentInt64 returnStructNestedIntStructAlignmentInt64( - StructAlignmentInt64 a0, StructAlignmentInt64 a1) { - print("returnStructNestedIntStructAlignmentInt64(${a0}, ${a1})"); - - // In legacy mode, possibly return null. - if (a0.a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0.a0 == 42 || a0.a0 == 84) { - print("throwing!"); - throw Exception( - "ReturnStructNestedIntStructAlignmentInt64 throwing on purpose!"); - } - - returnStructNestedIntStructAlignmentInt64_a0 = a0; - returnStructNestedIntStructAlignmentInt64_a1 = a1; - - final result = returnStructNestedIntStructAlignmentInt64CalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStructNestedIntStructAlignmentInt64AfterCallback() { - calloc.free(returnStructNestedIntStructAlignmentInt64ResultPointer); - - final result = returnStructNestedIntStructAlignmentInt64CalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStructNestedIntStructAlignmentInt64ResultPointer); -} - -typedef ReturnStructNestedIrregularEvenBiggerType - = StructNestedIrregularEvenBigger Function(Uint64, - StructNestedIrregularBigger, StructNestedIrregularBigger, Double); - -// Global variables to be able to test inputs after callback returned. -int returnStructNestedIrregularEvenBigger_a0 = 0; -StructNestedIrregularBigger returnStructNestedIrregularEvenBigger_a1 = - Pointer.fromAddress(0).ref; -StructNestedIrregularBigger returnStructNestedIrregularEvenBigger_a2 = - Pointer.fromAddress(0).ref; -double returnStructNestedIrregularEvenBigger_a3 = 0.0; - -// Result variable also global, so we can delete it after the callback. -Pointer - returnStructNestedIrregularEvenBiggerResultPointer = nullptr; - -StructNestedIrregularEvenBigger - returnStructNestedIrregularEvenBiggerCalculateResult() { - final resultPointer = calloc(); - final result = resultPointer.ref; - - result.a0 = returnStructNestedIrregularEvenBigger_a0; - result.a1.a0.a0 = returnStructNestedIrregularEvenBigger_a1.a0.a0; - result.a1.a0.a1.a0.a0 = returnStructNestedIrregularEvenBigger_a1.a0.a1.a0.a0; - result.a1.a0.a1.a0.a1 = returnStructNestedIrregularEvenBigger_a1.a0.a1.a0.a1; - result.a1.a0.a1.a1.a0 = returnStructNestedIrregularEvenBigger_a1.a0.a1.a1.a0; - result.a1.a0.a2 = returnStructNestedIrregularEvenBigger_a1.a0.a2; - result.a1.a0.a3.a0.a0 = returnStructNestedIrregularEvenBigger_a1.a0.a3.a0.a0; - result.a1.a0.a3.a1 = returnStructNestedIrregularEvenBigger_a1.a0.a3.a1; - result.a1.a0.a4 = returnStructNestedIrregularEvenBigger_a1.a0.a4; - result.a1.a0.a5.a0.a0 = returnStructNestedIrregularEvenBigger_a1.a0.a5.a0.a0; - result.a1.a0.a5.a1.a0 = returnStructNestedIrregularEvenBigger_a1.a0.a5.a1.a0; - result.a1.a0.a6 = returnStructNestedIrregularEvenBigger_a1.a0.a6; - result.a1.a1.a0.a0 = returnStructNestedIrregularEvenBigger_a1.a1.a0.a0; - result.a1.a1.a0.a1 = returnStructNestedIrregularEvenBigger_a1.a1.a0.a1; - result.a1.a1.a1.a0 = returnStructNestedIrregularEvenBigger_a1.a1.a1.a0; - result.a1.a2 = returnStructNestedIrregularEvenBigger_a1.a2; - result.a1.a3 = returnStructNestedIrregularEvenBigger_a1.a3; - result.a2.a0.a0 = returnStructNestedIrregularEvenBigger_a2.a0.a0; - result.a2.a0.a1.a0.a0 = returnStructNestedIrregularEvenBigger_a2.a0.a1.a0.a0; - result.a2.a0.a1.a0.a1 = returnStructNestedIrregularEvenBigger_a2.a0.a1.a0.a1; - result.a2.a0.a1.a1.a0 = returnStructNestedIrregularEvenBigger_a2.a0.a1.a1.a0; - result.a2.a0.a2 = returnStructNestedIrregularEvenBigger_a2.a0.a2; - result.a2.a0.a3.a0.a0 = returnStructNestedIrregularEvenBigger_a2.a0.a3.a0.a0; - result.a2.a0.a3.a1 = returnStructNestedIrregularEvenBigger_a2.a0.a3.a1; - result.a2.a0.a4 = returnStructNestedIrregularEvenBigger_a2.a0.a4; - result.a2.a0.a5.a0.a0 = returnStructNestedIrregularEvenBigger_a2.a0.a5.a0.a0; - result.a2.a0.a5.a1.a0 = returnStructNestedIrregularEvenBigger_a2.a0.a5.a1.a0; - result.a2.a0.a6 = returnStructNestedIrregularEvenBigger_a2.a0.a6; - result.a2.a1.a0.a0 = returnStructNestedIrregularEvenBigger_a2.a1.a0.a0; - result.a2.a1.a0.a1 = returnStructNestedIrregularEvenBigger_a2.a1.a0.a1; - result.a2.a1.a1.a0 = returnStructNestedIrregularEvenBigger_a2.a1.a1.a0; - result.a2.a2 = returnStructNestedIrregularEvenBigger_a2.a2; - result.a2.a3 = returnStructNestedIrregularEvenBigger_a2.a3; - result.a3 = returnStructNestedIrregularEvenBigger_a3; - - returnStructNestedIrregularEvenBiggerResultPointer = resultPointer; - - return result; -} - -/// Return big irregular struct as smoke test. -StructNestedIrregularEvenBigger returnStructNestedIrregularEvenBigger(int a0, - StructNestedIrregularBigger a1, StructNestedIrregularBigger a2, double a3) { - print("returnStructNestedIrregularEvenBigger(${a0}, ${a1}, ${a2}, ${a3})"); - - // In legacy mode, possibly return null. - if (a0 == 84) { - print("returning null!"); - return null; - } - - // In both nnbd and legacy mode, possibly throw. - if (a0 == 42 || a0 == 84) { - print("throwing!"); - throw Exception( - "ReturnStructNestedIrregularEvenBigger throwing on purpose!"); - } - - returnStructNestedIrregularEvenBigger_a0 = a0; - returnStructNestedIrregularEvenBigger_a1 = a1; - returnStructNestedIrregularEvenBigger_a2 = a2; - returnStructNestedIrregularEvenBigger_a3 = a3; - - final result = returnStructNestedIrregularEvenBiggerCalculateResult(); - - print("result = $result"); - - return result; -} - -void returnStructNestedIrregularEvenBiggerAfterCallback() { - calloc.free(returnStructNestedIrregularEvenBiggerResultPointer); - - final result = returnStructNestedIrregularEvenBiggerCalculateResult(); - - print("after callback result = $result"); - - calloc.free(returnStructNestedIrregularEvenBiggerResultPointer); -} diff --git a/tests/ffi_2/function_callbacks_structs_by_value_test.dart b/tests/ffi_2/function_callbacks_structs_by_value_test.dart deleted file mode 100644 index 0392513ed93..00000000000 --- a/tests/ffi_2/function_callbacks_structs_by_value_test.dart +++ /dev/null @@ -1,143 +0,0 @@ -// 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. -// -// SharedObjects=ffi_test_functions -// -// VMOptions=--deterministic --optimization-counter-threshold=90 --use-slow-path --stacktrace-every=100 - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; -import "package:ffi/ffi.dart"; - -import 'dylib_utils.dart'; - -// Reuse the struct classes. -import 'function_structs_by_value_generated_compounds.dart'; - -final ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); - -void main() { - for (int i = 0; i < 100; i++) { - recursiveTest(10); - recursiveTest(11); - testCopyLogic(); - } -} - -void recursiveTest(int recursionCounter) { - final pointer = calloc(); - final struct = pointer.ref; - struct.a0 = 1; - struct.a1 = 2; - struct.a2 = 3; - struct.a3 = 4; - struct.a4 = 5; - final result = dartPassStructRecursive(recursionCounter, struct); - Expect.equals(struct.a0 + recursionCounter * 2, result.a0); - Expect.equals(struct.a1, result.a1); - Expect.equals(struct.a2, result.a2); - Expect.equals(struct.a3, result.a3); - Expect.equals(struct.a4, result.a4); - calloc.free(pointer); -} - -Struct20BytesHomogeneousInt32 dartPassStructRecursive( - int recursionCounter, Struct20BytesHomogeneousInt32 struct) { - print("callbackPassStructRecursive($recursionCounter, $struct)"); - struct.a0++; - final structA0Saved = struct.a0; - if (recursionCounter <= 0) { - print("returning"); - return struct; - } - - final result = - cPassStructRecursive(recursionCounter - 1, struct, functionPointer); - result.a0++; - - // Check struct.a0 is not modified by Dart->C call. - Expect.equals(structA0Saved, struct.a0); - - // Check struct.a0 is not modified by C->Dart callback, if so struct.a4 == 0. - Expect.notEquals(0, struct.a4); - - return result; -} - -final functionPointer = Pointer.fromFunction< - Struct20BytesHomogeneousInt32 Function( - Int64, Struct20BytesHomogeneousInt32)>(dartPassStructRecursive); - -final cPassStructRecursive = ffiTestFunctions.lookupFunction< - Struct20BytesHomogeneousInt32 Function(Int64 recursionCounter, - Struct20BytesHomogeneousInt32 struct, Pointer callbackAddress), - Struct20BytesHomogeneousInt32 Function(int recursionCounter, - Struct20BytesHomogeneousInt32, Pointer)>("PassStructRecursive"); - -Struct8BytesNestedInt typedDataBackedStruct = - Pointer.fromAddress(0).ref; -bool typedDataBackedStructSet = false; -void _receiveStructByValue(Struct8BytesNestedInt struct) { - typedDataBackedStruct = struct; - typedDataBackedStructSet = true; -} - -final _receiveStructByValuePointer = - Pointer.fromFunction( - _receiveStructByValue); - -final _invokeReceiveStructByValue = ffiTestFunctions.lookupFunction< - Void Function( - Pointer>), - void Function( - Pointer>)>( - "CallbackWithStruct"); - -void testCopyLogic() { - _invokeReceiveStructByValue(_receiveStructByValuePointer); - Expect.isTrue(typedDataBackedStructSet); - - final pointer = calloc(); - final pointerBackedStruct = pointer.ref; - - void reset() { - pointerBackedStruct.a0.a0 = 1; - pointerBackedStruct.a0.a1 = 2; - pointerBackedStruct.a1.a0 = 3; - pointerBackedStruct.a1.a1 = 4; - typedDataBackedStruct.a0.a0 = 5; - typedDataBackedStruct.a0.a1 = 6; - typedDataBackedStruct.a1.a0 = 7; - typedDataBackedStruct.a1.a1 = 8; - } - - // Pointer -> Pointer. - reset(); - pointerBackedStruct.a1 = pointerBackedStruct.a0; - Expect.equals(1, pointerBackedStruct.a1.a0); - Expect.equals(2, pointerBackedStruct.a1.a1); - - // Pointer -> TypedData. - reset(); - typedDataBackedStruct.a1 = pointerBackedStruct.a0; - Expect.equals(1, typedDataBackedStruct.a1.a0); - Expect.equals(2, typedDataBackedStruct.a1.a1); - - // TypedData -> Pointer. - reset(); - pointerBackedStruct.a1 = typedDataBackedStruct.a0; - Expect.equals(5, pointerBackedStruct.a1.a0); - Expect.equals(6, pointerBackedStruct.a1.a1); - - // TypedData -> TypedData. - reset(); - typedDataBackedStruct.a1 = typedDataBackedStruct.a0; - Expect.equals(5, typedDataBackedStruct.a1.a0); - Expect.equals(6, typedDataBackedStruct.a1.a1); - - calloc.free(pointer); -} diff --git a/tests/ffi_2/function_callbacks_test.dart b/tests/ffi_2/function_callbacks_test.dart deleted file mode 100644 index c7d5aa82434..00000000000 --- a/tests/ffi_2/function_callbacks_test.dart +++ /dev/null @@ -1,236 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Dart test program for testing dart:ffi function pointers with callbacks. -// -// VMOptions=--stacktrace-every=100 -// VMOptions=--write-protect-code --no-dual-map-code -// VMOptions=--write-protect-code --no-dual-map-code --stacktrace-every=100 -// VMOptions=--use-slow-path -// VMOptions=--use-slow-path --stacktrace-every=100 -// VMOptions=--use-slow-path --write-protect-code --no-dual-map-code -// VMOptions=--use-slow-path --write-protect-code --no-dual-map-code --stacktrace-every=100 -// VMOptions=--dwarf_stack_traces --no-retain_function_objects --no-retain_code_objects -// VMOptions=--test_il_serialization -// SharedObjects=ffi_test_functions - -import 'dart:ffi'; - -import 'callback_tests_utils.dart'; - -typedef SimpleAdditionType = Int32 Function(Int32, Int32); -int simpleAddition(int x, int y) { - print("simpleAddition($x, $y)"); - return x + y; -} - -class Foo { - static int simpleAddition(int x, int y) { - print("Foo.simpleAddition($x, $y)"); - return x + y; - } -} - -typedef IntComputationType = Int64 Function(Int8, Int16, Int32, Int64); -int intComputation(int a, int b, int c, int d) { - print("intComputation($a, $b, $c, $d)"); - return d - c + b - a; -} - -typedef UintComputationType = Uint64 Function(Uint8, Uint16, Uint32, Uint64); -int uintComputation(int a, int b, int c, int d) { - print("uintComputation($a, $b, $c, $d)"); - return d - c + b - a; -} - -typedef SimpleMultiplyType = Double Function(Double); -double simpleMultiply(double x) { - print("simpleMultiply($x)"); - return x * 1.337; -} - -typedef SimpleMultiplyFloatType = Float Function(Float); -double simpleMultiplyFloat(double x) { - print("simpleMultiplyFloat($x)"); - return x * 1.337; -} - -typedef ManyIntsType = IntPtr Function(IntPtr, IntPtr, IntPtr, IntPtr, IntPtr, - IntPtr, IntPtr, IntPtr, IntPtr, IntPtr); -int manyInts( - int a, int b, int c, int d, int e, int f, int g, int h, int i, int j) { - print("manyInts($a, $b, $c, $d, $e, $f, $g, $h, $i, $j"); - return a + b + c + d + e + f + g + h + i + j; -} - -typedef ManyDoublesType = Double Function(Double, Double, Double, Double, - Double, Double, Double, Double, Double, Double); -double manyDoubles(double a, double b, double c, double d, double e, double f, - double g, double h, double i, double j) { - print("manyDoubles($a, $b, $c, $d, $e, $f, $g, $h, $i, $j"); - return a + b + c + d + e + f + g + h + i + j; -} - -typedef ManyArgsType = Double Function( - IntPtr, - Float, - IntPtr, - Double, - IntPtr, - Float, - IntPtr, - Double, - IntPtr, - Float, - IntPtr, - Double, - IntPtr, - Float, - IntPtr, - Double, - IntPtr, - Float, - IntPtr, - Double); -double manyArgs( - int _1, - double _2, - int _3, - double _4, - int _5, - double _6, - int _7, - double _8, - int _9, - double _10, - int _11, - double _12, - int _13, - double _14, - int _15, - double _16, - int _17, - double _18, - int _19, - double _20) { - print("manyArgs( $_1, $_2, $_3, $_4, $_5, $_6, $_7, $_8, $_9, $_10," + - "$_11, $_12, $_13, $_14, $_15, $_16, $_17, $_18, $_19, $_20)"); - return _1 + - _2 + - _3 + - _4 + - _5 + - _6 + - _7 + - _8 + - _9 + - _10 + - _11 + - _12 + - _13 + - _14 + - _15 + - _16 + - _17 + - _18 + - _19 + - _20; -} - -typedef StoreType = Pointer Function(Pointer); -Pointer store(Pointer ptr) => ptr.elementAt(1)..value = 1337; - -typedef NullPointersType = Pointer Function(Pointer); -Pointer nullPointers(Pointer ptr) => ptr.elementAt(1); - -typedef ReturnVoid = Void Function(); -void returnVoid() {} - -void throwException() { - throw "Exception."; -} - -typedef ThrowExceptionInt = IntPtr Function(); -int throwExceptionInt() { - throw "Exception."; -} - -typedef ThrowExceptionDouble = Double Function(); -double throwExceptionDouble() { - throw "Exception."; -} - -typedef ThrowExceptionPointer = Pointer Function(); -Pointer throwExceptionPointer() { - throw "Exception."; -} - -typedef TakeMaxUint8x10Type = IntPtr Function( - Uint8, Uint8, Uint8, Uint8, Uint8, Uint8, Uint8, Uint8, Uint8, Uint8); -int takeMaxUint8x10( - int a, int b, int c, int d, int e, int f, int g, int h, int i, int j) { - print("takeMaxUint8x10($a, $b, $c, $d, $e, $f, $g, $h, $i, $j)"); - return a == 0xff && - b == 0xff && - c == 0xff && - d == 0xff && - e == 0xff && - f == 0xff && - g == 0xff && - h == 0xff && - i == 0xff && - j == 0xff - ? 1 - : 0; -} - -typedef ReturnMaxUint8Type = Uint8 Function(); -int returnMaxUint8() { - return 0xff; -} - -int returnMaxUint8v2() { - return 0xabcff; -} - -final testcases = [ - CallbackTest("SimpleAddition", - Pointer.fromFunction(simpleAddition, 0)), - CallbackTest("SimpleAddition", - Pointer.fromFunction(Foo.simpleAddition, 0)), - CallbackTest("IntComputation", - Pointer.fromFunction(intComputation, 0)), - CallbackTest("UintComputation", - Pointer.fromFunction(uintComputation, 0)), - CallbackTest("SimpleMultiply", - Pointer.fromFunction(simpleMultiply, 0.0)), - CallbackTest("SimpleMultiplyFloat", - Pointer.fromFunction(simpleMultiplyFloat, 0.0)), - CallbackTest("ManyInts", Pointer.fromFunction(manyInts, 0)), - CallbackTest( - "ManyDoubles", Pointer.fromFunction(manyDoubles, 0.0)), - CallbackTest("ManyArgs", Pointer.fromFunction(manyArgs, 0.0)), - CallbackTest("Store", Pointer.fromFunction(store)), - CallbackTest( - "NullPointers", Pointer.fromFunction(nullPointers)), - CallbackTest("ReturnVoid", Pointer.fromFunction(returnVoid)), - CallbackTest("ThrowExceptionDouble", - Pointer.fromFunction(throwExceptionDouble, 42.0)), - CallbackTest("ThrowExceptionPointer", - Pointer.fromFunction(throwExceptionPointer)), - CallbackTest("ThrowException", - Pointer.fromFunction(throwExceptionInt, 42)), - CallbackTest("TakeMaxUint8x10", - Pointer.fromFunction(takeMaxUint8x10, 0)), - CallbackTest("ReturnMaxUint8", - Pointer.fromFunction(returnMaxUint8, 0)), - CallbackTest("ReturnMaxUint8", - Pointer.fromFunction(returnMaxUint8v2, 0)), -]; - -void main() { - testcases.forEach((t) => t.run()); -} diff --git a/tests/ffi_2/function_callbacks_very_many_test.dart b/tests/ffi_2/function_callbacks_very_many_test.dart deleted file mode 100644 index d9d25bf5657..00000000000 --- a/tests/ffi_2/function_callbacks_very_many_test.dart +++ /dev/null @@ -1,296 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Dart test program for testing dart:ffi function pointers with callbacks. -// -// VMOptions=--deterministic --optimization-counter-threshold=90 -// VMOptions=--stacktrace-every=100 -// VMOptions=--write-protect-code --no-dual-map-code -// VMOptions=--write-protect-code --no-dual-map-code --stacktrace-every=100 -// VMOptions=--use-slow-path -// VMOptions=--use-slow-path --stacktrace-every=100 -// VMOptions=--use-slow-path --write-protect-code --no-dual-map-code -// VMOptions=--use-slow-path --write-protect-code --no-dual-map-code --stacktrace-every=100 -// SharedObjects=ffi_test_functions - -import 'dart:ffi'; - -import 'callback_tests_utils.dart'; - -final testcases = [ - CallbackTest("SumVeryManySmallInts", - Pointer.fromFunction(sumVeryManySmallInts, 0)), - CallbackTest( - "SumVeryManyFloatsDoubles", - Pointer.fromFunction( - sumVeryManyDoubles, 0.0)), -]; - -void main() { - for (int i = 0; i < 100; ++i) { - testcases.forEach((t) => t.run()); - } -} - -int sumVeryManySmallInts( - int _1, - int _2, - int _3, - int _4, - int _5, - int _6, - int _7, - int _8, - int _9, - int _10, - int _11, - int _12, - int _13, - int _14, - int _15, - int _16, - int _17, - int _18, - int _19, - int _20, - int _21, - int _22, - int _23, - int _24, - int _25, - int _26, - int _27, - int _28, - int _29, - int _30, - int _31, - int _32, - int _33, - int _34, - int _35, - int _36, - int _37, - int _38, - int _39, - int _40) { - print("sumVeryManySmallInts(" + - "$_1, $_2, $_3, $_4, $_5, $_6, $_7, $_8, $_9, $_10, " + - "$_11, $_12, $_13, $_14, $_15, $_16, $_17, $_18, $_19, $_20, " + - "$_21, $_22, $_23, $_24, $_25, $_26, $_27, $_28, $_29, $_30, " + - "$_31, $_32, $_33, $_34, $_35, $_36, $_37, $_38, $_39, $_40)"); - return _1 + - _2 + - _3 + - _4 + - _5 + - _6 + - _7 + - _8 + - _9 + - _10 + - _11 + - _12 + - _13 + - _14 + - _15 + - _16 + - _17 + - _18 + - _19 + - _20 + - _21 + - _22 + - _23 + - _24 + - _25 + - _26 + - _27 + - _28 + - _29 + - _30 + - _31 + - _32 + - _33 + - _34 + - _35 + - _36 + - _37 + - _38 + - _39 + - _40; -} - -double sumVeryManyDoubles( - double _1, - double _2, - double _3, - double _4, - double _5, - double _6, - double _7, - double _8, - double _9, - double _10, - double _11, - double _12, - double _13, - double _14, - double _15, - double _16, - double _17, - double _18, - double _19, - double _20, - double _21, - double _22, - double _23, - double _24, - double _25, - double _26, - double _27, - double _28, - double _29, - double _30, - double _31, - double _32, - double _33, - double _34, - double _35, - double _36, - double _37, - double _38, - double _39, - double _40) { - print("sumVeryManyDoubles(" + - "$_1, $_2, $_3, $_4, $_5, $_6, $_7, $_8, $_9, $_10, " + - "$_11, $_12, $_13, $_14, $_15, $_16, $_17, $_18, $_19, $_20, " + - "$_21, $_22, $_23, $_24, $_25, $_26, $_27, $_28, $_29, $_30, " + - "$_31, $_32, $_33, $_34, $_35, $_36, $_37, $_38, $_39, $_40)"); - return _1 + - _2 + - _3 + - _4 + - _5 + - _6 + - _7 + - _8 + - _9 + - _10 + - _11 + - _12 + - _13 + - _14 + - _15 + - _16 + - _17 + - _18 + - _19 + - _20 + - _21 + - _22 + - _23 + - _24 + - _25 + - _26 + - _27 + - _28 + - _29 + - _30 + - _31 + - _32 + - _33 + - _34 + - _35 + - _36 + - _37 + - _38 + - _39 + - _40; -} - -typedef NativeVeryManyIntsOp = Int16 Function( - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16); - -typedef NativeVeryManyFloatsDoublesOp = Double Function( - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double); diff --git a/tests/ffi_2/function_structs_by_value_generated_args_leaf_test.dart b/tests/ffi_2/function_structs_by_value_generated_args_leaf_test.dart deleted file mode 100644 index 866c0bec764..00000000000 --- a/tests/ffi_2/function_structs_by_value_generated_args_leaf_test.dart +++ /dev/null @@ -1,5501 +0,0 @@ -// Copyright (c) 2021, 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. -// -// This file has been automatically generated. Please do not edit it manually. -// Generated by tests/ffi/generator/structs_by_value_tests_generator.dart. -// -// SharedObjects=ffi_test_functions -// VMOptions= -// VMOptions=--deterministic --optimization-counter-threshold=90 -// VMOptions=--use-slow-path -// VMOptions=--use-slow-path --stacktrace-every=100 - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; -import "package:ffi/ffi.dart"; - -import 'dylib_utils.dart'; - -// Reuse the compound classes. -import 'function_structs_by_value_generated_compounds.dart'; - -final ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); -void main() { - for (int i = 0; i < 100; ++i) { - testPassStruct1ByteIntx10Leaf(); - testPassStruct3BytesHomogeneousUint8x10Leaf(); - testPassStruct3BytesInt2ByteAlignedx10Leaf(); - testPassStruct4BytesHomogeneousInt16x10Leaf(); - testPassStruct7BytesHomogeneousUint8x10Leaf(); - testPassStruct7BytesInt4ByteAlignedx10Leaf(); - testPassStruct8BytesIntx10Leaf(); - testPassStruct8BytesHomogeneousFloatx10Leaf(); - testPassStruct8BytesMixedx10Leaf(); - testPassStruct9BytesHomogeneousUint8x10Leaf(); - testPassStruct9BytesInt4Or8ByteAlignedx10Leaf(); - testPassStruct12BytesHomogeneousFloatx6Leaf(); - testPassStruct16BytesHomogeneousFloatx5Leaf(); - testPassStruct16BytesMixedx10Leaf(); - testPassStruct16BytesMixed2x10Leaf(); - testPassStruct17BytesIntx10Leaf(); - testPassStruct19BytesHomogeneousUint8x10Leaf(); - testPassStruct20BytesHomogeneousInt32x10Leaf(); - testPassStruct20BytesHomogeneousFloatLeaf(); - testPassStruct32BytesHomogeneousDoublex5Leaf(); - testPassStruct40BytesHomogeneousDoubleLeaf(); - testPassStruct1024BytesHomogeneousUint64Leaf(); - testPassFloatStruct16BytesHomogeneousFloatFloatStruct1Leaf(); - testPassFloatStruct32BytesHomogeneousDoubleFloatStructLeaf(); - testPassInt8Struct16BytesMixedInt8Struct16BytesMixedInLeaf(); - testPassDoublex6Struct16BytesMixedx4Int32Leaf(); - testPassInt32x4Struct16BytesMixedx4DoubleLeaf(); - testPassStruct40BytesHomogeneousDoubleStruct4BytesHomoLeaf(); - testPassInt32x8Doublex8Int64Int8Struct1ByteIntInt64IntLeaf(); - testPassStructAlignmentInt16Leaf(); - testPassStructAlignmentInt32Leaf(); - testPassStructAlignmentInt64Leaf(); - testPassStruct8BytesNestedIntx10Leaf(); - testPassStruct8BytesNestedFloatx10Leaf(); - testPassStruct8BytesNestedFloat2x10Leaf(); - testPassStruct8BytesNestedMixedx10Leaf(); - testPassStruct16BytesNestedIntx2Leaf(); - testPassStruct32BytesNestedIntx2Leaf(); - testPassStructNestedIntStructAlignmentInt16Leaf(); - testPassStructNestedIntStructAlignmentInt32Leaf(); - testPassStructNestedIntStructAlignmentInt64Leaf(); - testPassStructNestedIrregularEvenBiggerx4Leaf(); - testPassStruct8BytesInlineArrayIntx4Leaf(); - testPassStructInlineArrayIrregularx4Leaf(); - testPassStructInlineArray100BytesLeaf(); - testPassStructStruct16BytesHomogeneousFloat2x5Leaf(); - testPassStructStruct32BytesHomogeneousDouble2x5Leaf(); - testPassStructStruct16BytesMixed3x10Leaf(); - testPassUint8Struct32BytesInlineArrayMultiDimensionalILeaf(); - testPassUint8Struct4BytesInlineArrayMultiDimensionalInLeaf(); - testPassStruct3BytesPackedIntx10Leaf(); - testPassStruct8BytesPackedIntx10Leaf(); - testPassStruct9BytesPackedMixedx10DoubleInt32x2Leaf(); - testPassStruct5BytesPackedMixedLeaf(); - testPassStructNestedAlignmentStruct5BytesPackedMixedLeaf(); - testPassStruct6BytesInlineArrayIntLeaf(); - testPassStruct15BytesInlineArrayMixedLeaf(); - testPassUnion4BytesMixedx10Leaf(); - testPassUnion8BytesNestedFloatx10Leaf(); - testPassUnion9BytesNestedIntx10Leaf(); - testPassUnion16BytesNestedInlineArrayFloatx10Leaf(); - testPassUnion16BytesNestedFloatx10Leaf(); - testPassUint8Boolx9Struct10BytesHomogeneousBoolBoolLeaf(); - testPassUint8Boolx9Struct10BytesInlineArrayBoolBoolLeaf(); - testPassUint8Struct1ByteBoolLeaf(); - testPassWCharStructInlineArrayIntUintPtrx2LongUnsignedLeaf(); - testPassInt64x7Struct12BytesHomogeneousInt32Leaf(); - } -} - -final passStruct1ByteIntx10Leaf = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt), - int Function( - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt)>("PassStruct1ByteIntx10", isLeaf: true); - -/// Smallest struct with data. -/// 10 struct arguments will exhaust available registers. -void testPassStruct1ByteIntx10Leaf() { - final a0Pointer = calloc(); - final Struct1ByteInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct1ByteInt a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct1ByteInt a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct1ByteInt a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct1ByteInt a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct1ByteInt a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct1ByteInt a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct1ByteInt a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct1ByteInt a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct1ByteInt a9 = a9Pointer.ref; - - a0.a0 = -1; - a1.a0 = 2; - a2.a0 = -3; - a3.a0 = 4; - a4.a0 = -5; - a5.a0 = 6; - a6.a0 = -7; - a7.a0 = 8; - a8.a0 = -9; - a9.a0 = 10; - - final result = - passStruct1ByteIntx10Leaf(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(5, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct3BytesHomogeneousUint8x10Leaf = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8), - int Function( - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8)>( - "PassStruct3BytesHomogeneousUint8x10", - isLeaf: true); - -/// Not a multiple of word size, not a power of two. -/// 10 struct arguments will exhaust available registers. -void testPassStruct3BytesHomogeneousUint8x10Leaf() { - final a0Pointer = calloc(); - final Struct3BytesHomogeneousUint8 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct3BytesHomogeneousUint8 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct3BytesHomogeneousUint8 a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct3BytesHomogeneousUint8 a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct3BytesHomogeneousUint8 a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct3BytesHomogeneousUint8 a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct3BytesHomogeneousUint8 a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct3BytesHomogeneousUint8 a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct3BytesHomogeneousUint8 a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct3BytesHomogeneousUint8 a9 = a9Pointer.ref; - - a0.a0 = 1; - a0.a1 = 2; - a0.a2 = 3; - a1.a0 = 4; - a1.a1 = 5; - a1.a2 = 6; - a2.a0 = 7; - a2.a1 = 8; - a2.a2 = 9; - a3.a0 = 10; - a3.a1 = 11; - a3.a2 = 12; - a4.a0 = 13; - a4.a1 = 14; - a4.a2 = 15; - a5.a0 = 16; - a5.a1 = 17; - a5.a2 = 18; - a6.a0 = 19; - a6.a1 = 20; - a6.a2 = 21; - a7.a0 = 22; - a7.a1 = 23; - a7.a2 = 24; - a8.a0 = 25; - a8.a1 = 26; - a8.a2 = 27; - a9.a0 = 28; - a9.a1 = 29; - a9.a2 = 30; - - final result = passStruct3BytesHomogeneousUint8x10Leaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(465, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct3BytesInt2ByteAlignedx10Leaf = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned), - int Function( - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned)>("PassStruct3BytesInt2ByteAlignedx10", - isLeaf: true); - -/// Not a multiple of word size, not a power of two. -/// With alignment rules taken into account size is 4 bytes. -/// 10 struct arguments will exhaust available registers. -void testPassStruct3BytesInt2ByteAlignedx10Leaf() { - final a0Pointer = calloc(); - final Struct3BytesInt2ByteAligned a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct3BytesInt2ByteAligned a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct3BytesInt2ByteAligned a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct3BytesInt2ByteAligned a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct3BytesInt2ByteAligned a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct3BytesInt2ByteAligned a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct3BytesInt2ByteAligned a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct3BytesInt2ByteAligned a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct3BytesInt2ByteAligned a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct3BytesInt2ByteAligned a9 = a9Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a1.a0 = -3; - a1.a1 = 4; - a2.a0 = -5; - a2.a1 = 6; - a3.a0 = -7; - a3.a1 = 8; - a4.a0 = -9; - a4.a1 = 10; - a5.a0 = -11; - a5.a1 = 12; - a6.a0 = -13; - a6.a1 = 14; - a7.a0 = -15; - a7.a1 = 16; - a8.a0 = -17; - a8.a1 = 18; - a9.a0 = -19; - a9.a1 = 20; - - final result = passStruct3BytesInt2ByteAlignedx10Leaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(10, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct4BytesHomogeneousInt16x10Leaf = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16), - int Function( - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16)>( - "PassStruct4BytesHomogeneousInt16x10", - isLeaf: true); - -/// Exactly word size on 32-bit architectures. -/// 10 struct arguments will exhaust available registers. -void testPassStruct4BytesHomogeneousInt16x10Leaf() { - final a0Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a9 = a9Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a1.a0 = -3; - a1.a1 = 4; - a2.a0 = -5; - a2.a1 = 6; - a3.a0 = -7; - a3.a1 = 8; - a4.a0 = -9; - a4.a1 = 10; - a5.a0 = -11; - a5.a1 = 12; - a6.a0 = -13; - a6.a1 = 14; - a7.a0 = -15; - a7.a1 = 16; - a8.a0 = -17; - a8.a1 = 18; - a9.a0 = -19; - a9.a1 = 20; - - final result = passStruct4BytesHomogeneousInt16x10Leaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(10, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct7BytesHomogeneousUint8x10Leaf = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8), - int Function( - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8)>( - "PassStruct7BytesHomogeneousUint8x10", - isLeaf: true); - -/// Sub word size on 64 bit architectures. -/// 10 struct arguments will exhaust available registers. -void testPassStruct7BytesHomogeneousUint8x10Leaf() { - final a0Pointer = calloc(); - final Struct7BytesHomogeneousUint8 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct7BytesHomogeneousUint8 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct7BytesHomogeneousUint8 a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct7BytesHomogeneousUint8 a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct7BytesHomogeneousUint8 a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct7BytesHomogeneousUint8 a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct7BytesHomogeneousUint8 a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct7BytesHomogeneousUint8 a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct7BytesHomogeneousUint8 a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct7BytesHomogeneousUint8 a9 = a9Pointer.ref; - - a0.a0 = 1; - a0.a1 = 2; - a0.a2 = 3; - a0.a3 = 4; - a0.a4 = 5; - a0.a5 = 6; - a0.a6 = 7; - a1.a0 = 8; - a1.a1 = 9; - a1.a2 = 10; - a1.a3 = 11; - a1.a4 = 12; - a1.a5 = 13; - a1.a6 = 14; - a2.a0 = 15; - a2.a1 = 16; - a2.a2 = 17; - a2.a3 = 18; - a2.a4 = 19; - a2.a5 = 20; - a2.a6 = 21; - a3.a0 = 22; - a3.a1 = 23; - a3.a2 = 24; - a3.a3 = 25; - a3.a4 = 26; - a3.a5 = 27; - a3.a6 = 28; - a4.a0 = 29; - a4.a1 = 30; - a4.a2 = 31; - a4.a3 = 32; - a4.a4 = 33; - a4.a5 = 34; - a4.a6 = 35; - a5.a0 = 36; - a5.a1 = 37; - a5.a2 = 38; - a5.a3 = 39; - a5.a4 = 40; - a5.a5 = 41; - a5.a6 = 42; - a6.a0 = 43; - a6.a1 = 44; - a6.a2 = 45; - a6.a3 = 46; - a6.a4 = 47; - a6.a5 = 48; - a6.a6 = 49; - a7.a0 = 50; - a7.a1 = 51; - a7.a2 = 52; - a7.a3 = 53; - a7.a4 = 54; - a7.a5 = 55; - a7.a6 = 56; - a8.a0 = 57; - a8.a1 = 58; - a8.a2 = 59; - a8.a3 = 60; - a8.a4 = 61; - a8.a5 = 62; - a8.a6 = 63; - a9.a0 = 64; - a9.a1 = 65; - a9.a2 = 66; - a9.a3 = 67; - a9.a4 = 68; - a9.a5 = 69; - a9.a6 = 70; - - final result = passStruct7BytesHomogeneousUint8x10Leaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(2485, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct7BytesInt4ByteAlignedx10Leaf = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned), - int Function( - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned)>("PassStruct7BytesInt4ByteAlignedx10", - isLeaf: true); - -/// Sub word size on 64 bit architectures. -/// With alignment rules taken into account size is 8 bytes. -/// 10 struct arguments will exhaust available registers. -void testPassStruct7BytesInt4ByteAlignedx10Leaf() { - final a0Pointer = calloc(); - final Struct7BytesInt4ByteAligned a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct7BytesInt4ByteAligned a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct7BytesInt4ByteAligned a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct7BytesInt4ByteAligned a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct7BytesInt4ByteAligned a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct7BytesInt4ByteAligned a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct7BytesInt4ByteAligned a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct7BytesInt4ByteAligned a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct7BytesInt4ByteAligned a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct7BytesInt4ByteAligned a9 = a9Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - a1.a0 = 4; - a1.a1 = -5; - a1.a2 = 6; - a2.a0 = -7; - a2.a1 = 8; - a2.a2 = -9; - a3.a0 = 10; - a3.a1 = -11; - a3.a2 = 12; - a4.a0 = -13; - a4.a1 = 14; - a4.a2 = -15; - a5.a0 = 16; - a5.a1 = -17; - a5.a2 = 18; - a6.a0 = -19; - a6.a1 = 20; - a6.a2 = -21; - a7.a0 = 22; - a7.a1 = -23; - a7.a2 = 24; - a8.a0 = -25; - a8.a1 = 26; - a8.a2 = -27; - a9.a0 = 28; - a9.a1 = -29; - a9.a2 = 30; - - final result = passStruct7BytesInt4ByteAlignedx10Leaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(15, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct8BytesIntx10Leaf = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt), - int Function( - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt)>("PassStruct8BytesIntx10", isLeaf: true); - -/// Exactly word size struct on 64bit architectures. -/// 10 struct arguments will exhaust available registers. -void testPassStruct8BytesIntx10Leaf() { - final a0Pointer = calloc(); - final Struct8BytesInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct8BytesInt a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct8BytesInt a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct8BytesInt a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct8BytesInt a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct8BytesInt a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct8BytesInt a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct8BytesInt a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct8BytesInt a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct8BytesInt a9 = a9Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - a1.a0 = 4; - a1.a1 = -5; - a1.a2 = 6; - a2.a0 = -7; - a2.a1 = 8; - a2.a2 = -9; - a3.a0 = 10; - a3.a1 = -11; - a3.a2 = 12; - a4.a0 = -13; - a4.a1 = 14; - a4.a2 = -15; - a5.a0 = 16; - a5.a1 = -17; - a5.a2 = 18; - a6.a0 = -19; - a6.a1 = 20; - a6.a2 = -21; - a7.a0 = 22; - a7.a1 = -23; - a7.a2 = 24; - a8.a0 = -25; - a8.a1 = 26; - a8.a2 = -27; - a9.a0 = 28; - a9.a1 = -29; - a9.a2 = 30; - - final result = - passStruct8BytesIntx10Leaf(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(15, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct8BytesHomogeneousFloatx10Leaf = ffiTestFunctions.lookupFunction< - Float Function( - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat), - double Function( - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat)>( - "PassStruct8BytesHomogeneousFloatx10", - isLeaf: true); - -/// Arguments passed in FP registers as long as they fit. -/// 10 struct arguments will exhaust available registers. -void testPassStruct8BytesHomogeneousFloatx10Leaf() { - final a0Pointer = calloc(); - final Struct8BytesHomogeneousFloat a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct8BytesHomogeneousFloat a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct8BytesHomogeneousFloat a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct8BytesHomogeneousFloat a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct8BytesHomogeneousFloat a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct8BytesHomogeneousFloat a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct8BytesHomogeneousFloat a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct8BytesHomogeneousFloat a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct8BytesHomogeneousFloat a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct8BytesHomogeneousFloat a9 = a9Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2.0; - a1.a0 = -3.0; - a1.a1 = 4.0; - a2.a0 = -5.0; - a2.a1 = 6.0; - a3.a0 = -7.0; - a3.a1 = 8.0; - a4.a0 = -9.0; - a4.a1 = 10.0; - a5.a0 = -11.0; - a5.a1 = 12.0; - a6.a0 = -13.0; - a6.a1 = 14.0; - a7.a0 = -15.0; - a7.a1 = 16.0; - a8.a0 = -17.0; - a8.a1 = 18.0; - a9.a0 = -19.0; - a9.a1 = 20.0; - - final result = passStruct8BytesHomogeneousFloatx10Leaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(10.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct8BytesMixedx10Leaf = ffiTestFunctions.lookupFunction< - Float Function( - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed), - double Function( - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed)>("PassStruct8BytesMixedx10", isLeaf: true); - -/// On x64, arguments go in int registers because it is not only float. -/// 10 struct arguments will exhaust available registers. -void testPassStruct8BytesMixedx10Leaf() { - final a0Pointer = calloc(); - final Struct8BytesMixed a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct8BytesMixed a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct8BytesMixed a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct8BytesMixed a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct8BytesMixed a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct8BytesMixed a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct8BytesMixed a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct8BytesMixed a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct8BytesMixed a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct8BytesMixed a9 = a9Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2; - a0.a2 = -3; - a1.a0 = 4.0; - a1.a1 = -5; - a1.a2 = 6; - a2.a0 = -7.0; - a2.a1 = 8; - a2.a2 = -9; - a3.a0 = 10.0; - a3.a1 = -11; - a3.a2 = 12; - a4.a0 = -13.0; - a4.a1 = 14; - a4.a2 = -15; - a5.a0 = 16.0; - a5.a1 = -17; - a5.a2 = 18; - a6.a0 = -19.0; - a6.a1 = 20; - a6.a2 = -21; - a7.a0 = 22.0; - a7.a1 = -23; - a7.a2 = 24; - a8.a0 = -25.0; - a8.a1 = 26; - a8.a2 = -27; - a9.a0 = 28.0; - a9.a1 = -29; - a9.a2 = 30; - - final result = - passStruct8BytesMixedx10Leaf(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(15.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct9BytesHomogeneousUint8x10Leaf = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8), - int Function( - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8)>( - "PassStruct9BytesHomogeneousUint8x10", - isLeaf: true); - -/// Argument is a single byte over a multiple of word size. -/// 10 struct arguments will exhaust available registers. -/// Struct only has 1-byte aligned fields to test struct alignment itself. -/// Tests upper bytes in the integer registers that are partly filled. -/// Tests stack alignment of non word size stack arguments. -void testPassStruct9BytesHomogeneousUint8x10Leaf() { - final a0Pointer = calloc(); - final Struct9BytesHomogeneousUint8 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct9BytesHomogeneousUint8 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct9BytesHomogeneousUint8 a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct9BytesHomogeneousUint8 a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct9BytesHomogeneousUint8 a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct9BytesHomogeneousUint8 a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct9BytesHomogeneousUint8 a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct9BytesHomogeneousUint8 a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct9BytesHomogeneousUint8 a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct9BytesHomogeneousUint8 a9 = a9Pointer.ref; - - a0.a0 = 1; - a0.a1 = 2; - a0.a2 = 3; - a0.a3 = 4; - a0.a4 = 5; - a0.a5 = 6; - a0.a6 = 7; - a0.a7 = 8; - a0.a8 = 9; - a1.a0 = 10; - a1.a1 = 11; - a1.a2 = 12; - a1.a3 = 13; - a1.a4 = 14; - a1.a5 = 15; - a1.a6 = 16; - a1.a7 = 17; - a1.a8 = 18; - a2.a0 = 19; - a2.a1 = 20; - a2.a2 = 21; - a2.a3 = 22; - a2.a4 = 23; - a2.a5 = 24; - a2.a6 = 25; - a2.a7 = 26; - a2.a8 = 27; - a3.a0 = 28; - a3.a1 = 29; - a3.a2 = 30; - a3.a3 = 31; - a3.a4 = 32; - a3.a5 = 33; - a3.a6 = 34; - a3.a7 = 35; - a3.a8 = 36; - a4.a0 = 37; - a4.a1 = 38; - a4.a2 = 39; - a4.a3 = 40; - a4.a4 = 41; - a4.a5 = 42; - a4.a6 = 43; - a4.a7 = 44; - a4.a8 = 45; - a5.a0 = 46; - a5.a1 = 47; - a5.a2 = 48; - a5.a3 = 49; - a5.a4 = 50; - a5.a5 = 51; - a5.a6 = 52; - a5.a7 = 53; - a5.a8 = 54; - a6.a0 = 55; - a6.a1 = 56; - a6.a2 = 57; - a6.a3 = 58; - a6.a4 = 59; - a6.a5 = 60; - a6.a6 = 61; - a6.a7 = 62; - a6.a8 = 63; - a7.a0 = 64; - a7.a1 = 65; - a7.a2 = 66; - a7.a3 = 67; - a7.a4 = 68; - a7.a5 = 69; - a7.a6 = 70; - a7.a7 = 71; - a7.a8 = 72; - a8.a0 = 73; - a8.a1 = 74; - a8.a2 = 75; - a8.a3 = 76; - a8.a4 = 77; - a8.a5 = 78; - a8.a6 = 79; - a8.a7 = 80; - a8.a8 = 81; - a9.a0 = 82; - a9.a1 = 83; - a9.a2 = 84; - a9.a3 = 85; - a9.a4 = 86; - a9.a5 = 87; - a9.a6 = 88; - a9.a7 = 89; - a9.a8 = 90; - - final result = passStruct9BytesHomogeneousUint8x10Leaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(4095, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct9BytesInt4Or8ByteAlignedx10Leaf = - ffiTestFunctions.lookupFunction< - Int64 Function( - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned), - int Function( - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned)>( - "PassStruct9BytesInt4Or8ByteAlignedx10", - isLeaf: true); - -/// Argument is a single byte over a multiple of word size. -/// With alignment rules taken into account size is 12 or 16 bytes. -/// 10 struct arguments will exhaust available registers. -/// -void testPassStruct9BytesInt4Or8ByteAlignedx10Leaf() { - final a0Pointer = calloc(); - final Struct9BytesInt4Or8ByteAligned a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct9BytesInt4Or8ByteAligned a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct9BytesInt4Or8ByteAligned a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct9BytesInt4Or8ByteAligned a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct9BytesInt4Or8ByteAligned a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct9BytesInt4Or8ByteAligned a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct9BytesInt4Or8ByteAligned a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct9BytesInt4Or8ByteAligned a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct9BytesInt4Or8ByteAligned a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct9BytesInt4Or8ByteAligned a9 = a9Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a1.a0 = -3; - a1.a1 = 4; - a2.a0 = -5; - a2.a1 = 6; - a3.a0 = -7; - a3.a1 = 8; - a4.a0 = -9; - a4.a1 = 10; - a5.a0 = -11; - a5.a1 = 12; - a6.a0 = -13; - a6.a1 = 14; - a7.a0 = -15; - a7.a1 = 16; - a8.a0 = -17; - a8.a1 = 18; - a9.a0 = -19; - a9.a1 = 20; - - final result = passStruct9BytesInt4Or8ByteAlignedx10Leaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(10, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct12BytesHomogeneousFloatx6Leaf = ffiTestFunctions.lookupFunction< - Float Function( - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat), - double Function( - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat)>( - "PassStruct12BytesHomogeneousFloatx6", - isLeaf: true); - -/// Arguments in FPU registers on arm hardfp and arm64. -/// Struct arguments will exhaust available registers, and leave some empty. -/// The last argument is to test whether arguments are backfilled. -void testPassStruct12BytesHomogeneousFloatx6Leaf() { - final a0Pointer = calloc(); - final Struct12BytesHomogeneousFloat a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct12BytesHomogeneousFloat a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct12BytesHomogeneousFloat a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct12BytesHomogeneousFloat a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct12BytesHomogeneousFloat a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct12BytesHomogeneousFloat a5 = a5Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2.0; - a0.a2 = -3.0; - a1.a0 = 4.0; - a1.a1 = -5.0; - a1.a2 = 6.0; - a2.a0 = -7.0; - a2.a1 = 8.0; - a2.a2 = -9.0; - a3.a0 = 10.0; - a3.a1 = -11.0; - a3.a2 = 12.0; - a4.a0 = -13.0; - a4.a1 = 14.0; - a4.a2 = -15.0; - a5.a0 = 16.0; - a5.a1 = -17.0; - a5.a2 = 18.0; - - final result = - passStruct12BytesHomogeneousFloatx6Leaf(a0, a1, a2, a3, a4, a5); - - print("result = $result"); - - Expect.approxEquals(9.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); -} - -final passStruct16BytesHomogeneousFloatx5Leaf = ffiTestFunctions.lookupFunction< - Float Function( - Struct16BytesHomogeneousFloat, - Struct16BytesHomogeneousFloat, - Struct16BytesHomogeneousFloat, - Struct16BytesHomogeneousFloat, - Struct16BytesHomogeneousFloat), - double Function( - Struct16BytesHomogeneousFloat, - Struct16BytesHomogeneousFloat, - Struct16BytesHomogeneousFloat, - Struct16BytesHomogeneousFloat, - Struct16BytesHomogeneousFloat)>( - "PassStruct16BytesHomogeneousFloatx5", - isLeaf: true); - -/// On Linux x64 argument is transferred on stack because it is over 16 bytes. -/// Arguments in FPU registers on arm hardfp and arm64. -/// 5 struct arguments will exhaust available registers. -void testPassStruct16BytesHomogeneousFloatx5Leaf() { - final a0Pointer = calloc(); - final Struct16BytesHomogeneousFloat a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct16BytesHomogeneousFloat a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct16BytesHomogeneousFloat a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct16BytesHomogeneousFloat a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct16BytesHomogeneousFloat a4 = a4Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2.0; - a0.a2 = -3.0; - a0.a3 = 4.0; - a1.a0 = -5.0; - a1.a1 = 6.0; - a1.a2 = -7.0; - a1.a3 = 8.0; - a2.a0 = -9.0; - a2.a1 = 10.0; - a2.a2 = -11.0; - a2.a3 = 12.0; - a3.a0 = -13.0; - a3.a1 = 14.0; - a3.a2 = -15.0; - a3.a3 = 16.0; - a4.a0 = -17.0; - a4.a1 = 18.0; - a4.a2 = -19.0; - a4.a3 = 20.0; - - final result = passStruct16BytesHomogeneousFloatx5Leaf(a0, a1, a2, a3, a4); - - print("result = $result"); - - Expect.approxEquals(10.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); -} - -final passStruct16BytesMixedx10Leaf = ffiTestFunctions.lookupFunction< - Double Function( - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed), - double Function( - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed)>("PassStruct16BytesMixedx10", isLeaf: true); - -/// On x64, arguments are split over FP and int registers. -/// On x64, it will exhaust the integer registers with the 6th argument. -/// The rest goes on the stack. -/// On arm, arguments are 8 byte aligned. -void testPassStruct16BytesMixedx10Leaf() { - final a0Pointer = calloc(); - final Struct16BytesMixed a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct16BytesMixed a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct16BytesMixed a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct16BytesMixed a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct16BytesMixed a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct16BytesMixed a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct16BytesMixed a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct16BytesMixed a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct16BytesMixed a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct16BytesMixed a9 = a9Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2; - a1.a0 = -3.0; - a1.a1 = 4; - a2.a0 = -5.0; - a2.a1 = 6; - a3.a0 = -7.0; - a3.a1 = 8; - a4.a0 = -9.0; - a4.a1 = 10; - a5.a0 = -11.0; - a5.a1 = 12; - a6.a0 = -13.0; - a6.a1 = 14; - a7.a0 = -15.0; - a7.a1 = 16; - a8.a0 = -17.0; - a8.a1 = 18; - a9.a0 = -19.0; - a9.a1 = 20; - - final result = - passStruct16BytesMixedx10Leaf(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(10.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct16BytesMixed2x10Leaf = ffiTestFunctions.lookupFunction< - Float Function( - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2), - double Function( - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2)>("PassStruct16BytesMixed2x10", isLeaf: true); - -/// On x64, arguments are split over FP and int registers. -/// On x64, it will exhaust the integer registers with the 6th argument. -/// The rest goes on the stack. -/// On arm, arguments are 4 byte aligned. -void testPassStruct16BytesMixed2x10Leaf() { - final a0Pointer = calloc(); - final Struct16BytesMixed2 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct16BytesMixed2 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct16BytesMixed2 a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct16BytesMixed2 a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct16BytesMixed2 a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct16BytesMixed2 a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct16BytesMixed2 a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct16BytesMixed2 a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct16BytesMixed2 a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct16BytesMixed2 a9 = a9Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2.0; - a0.a2 = -3.0; - a0.a3 = 4; - a1.a0 = -5.0; - a1.a1 = 6.0; - a1.a2 = -7.0; - a1.a3 = 8; - a2.a0 = -9.0; - a2.a1 = 10.0; - a2.a2 = -11.0; - a2.a3 = 12; - a3.a0 = -13.0; - a3.a1 = 14.0; - a3.a2 = -15.0; - a3.a3 = 16; - a4.a0 = -17.0; - a4.a1 = 18.0; - a4.a2 = -19.0; - a4.a3 = 20; - a5.a0 = -21.0; - a5.a1 = 22.0; - a5.a2 = -23.0; - a5.a3 = 24; - a6.a0 = -25.0; - a6.a1 = 26.0; - a6.a2 = -27.0; - a6.a3 = 28; - a7.a0 = -29.0; - a7.a1 = 30.0; - a7.a2 = -31.0; - a7.a3 = 32; - a8.a0 = -33.0; - a8.a1 = 34.0; - a8.a2 = -35.0; - a8.a3 = 36; - a9.a0 = -37.0; - a9.a1 = 38.0; - a9.a2 = -39.0; - a9.a3 = 40; - - final result = - passStruct16BytesMixed2x10Leaf(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(20.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct17BytesIntx10Leaf = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt), - int Function( - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt)>("PassStruct17BytesIntx10", isLeaf: true); - -/// Arguments are passed as pointer to copy on arm64. -/// Tests that the memory allocated for copies are rounded up to word size. -void testPassStruct17BytesIntx10Leaf() { - final a0Pointer = calloc(); - final Struct17BytesInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct17BytesInt a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct17BytesInt a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct17BytesInt a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct17BytesInt a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct17BytesInt a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct17BytesInt a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct17BytesInt a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct17BytesInt a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct17BytesInt a9 = a9Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - a1.a0 = 4; - a1.a1 = -5; - a1.a2 = 6; - a2.a0 = -7; - a2.a1 = 8; - a2.a2 = -9; - a3.a0 = 10; - a3.a1 = -11; - a3.a2 = 12; - a4.a0 = -13; - a4.a1 = 14; - a4.a2 = -15; - a5.a0 = 16; - a5.a1 = -17; - a5.a2 = 18; - a6.a0 = -19; - a6.a1 = 20; - a6.a2 = -21; - a7.a0 = 22; - a7.a1 = -23; - a7.a2 = 24; - a8.a0 = -25; - a8.a1 = 26; - a8.a2 = -27; - a9.a0 = 28; - a9.a1 = -29; - a9.a2 = 30; - - final result = - passStruct17BytesIntx10Leaf(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(15, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct19BytesHomogeneousUint8x10Leaf = - ffiTestFunctions.lookupFunction< - Int64 Function( - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8), - int Function( - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8)>( - "PassStruct19BytesHomogeneousUint8x10", - isLeaf: true); - -/// The minimum alignment of this struct is only 1 byte based on its fields. -/// Test that the memory backing these structs is extended to the right size. -/// -void testPassStruct19BytesHomogeneousUint8x10Leaf() { - final a0Pointer = calloc(); - final Struct19BytesHomogeneousUint8 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct19BytesHomogeneousUint8 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct19BytesHomogeneousUint8 a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct19BytesHomogeneousUint8 a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct19BytesHomogeneousUint8 a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct19BytesHomogeneousUint8 a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct19BytesHomogeneousUint8 a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct19BytesHomogeneousUint8 a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct19BytesHomogeneousUint8 a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct19BytesHomogeneousUint8 a9 = a9Pointer.ref; - - a0.a0 = 1; - a0.a1 = 2; - a0.a2 = 3; - a0.a3 = 4; - a0.a4 = 5; - a0.a5 = 6; - a0.a6 = 7; - a0.a7 = 8; - a0.a8 = 9; - a0.a9 = 10; - a0.a10 = 11; - a0.a11 = 12; - a0.a12 = 13; - a0.a13 = 14; - a0.a14 = 15; - a0.a15 = 16; - a0.a16 = 17; - a0.a17 = 18; - a0.a18 = 19; - a1.a0 = 20; - a1.a1 = 21; - a1.a2 = 22; - a1.a3 = 23; - a1.a4 = 24; - a1.a5 = 25; - a1.a6 = 26; - a1.a7 = 27; - a1.a8 = 28; - a1.a9 = 29; - a1.a10 = 30; - a1.a11 = 31; - a1.a12 = 32; - a1.a13 = 33; - a1.a14 = 34; - a1.a15 = 35; - a1.a16 = 36; - a1.a17 = 37; - a1.a18 = 38; - a2.a0 = 39; - a2.a1 = 40; - a2.a2 = 41; - a2.a3 = 42; - a2.a4 = 43; - a2.a5 = 44; - a2.a6 = 45; - a2.a7 = 46; - a2.a8 = 47; - a2.a9 = 48; - a2.a10 = 49; - a2.a11 = 50; - a2.a12 = 51; - a2.a13 = 52; - a2.a14 = 53; - a2.a15 = 54; - a2.a16 = 55; - a2.a17 = 56; - a2.a18 = 57; - a3.a0 = 58; - a3.a1 = 59; - a3.a2 = 60; - a3.a3 = 61; - a3.a4 = 62; - a3.a5 = 63; - a3.a6 = 64; - a3.a7 = 65; - a3.a8 = 66; - a3.a9 = 67; - a3.a10 = 68; - a3.a11 = 69; - a3.a12 = 70; - a3.a13 = 71; - a3.a14 = 72; - a3.a15 = 73; - a3.a16 = 74; - a3.a17 = 75; - a3.a18 = 76; - a4.a0 = 77; - a4.a1 = 78; - a4.a2 = 79; - a4.a3 = 80; - a4.a4 = 81; - a4.a5 = 82; - a4.a6 = 83; - a4.a7 = 84; - a4.a8 = 85; - a4.a9 = 86; - a4.a10 = 87; - a4.a11 = 88; - a4.a12 = 89; - a4.a13 = 90; - a4.a14 = 91; - a4.a15 = 92; - a4.a16 = 93; - a4.a17 = 94; - a4.a18 = 95; - a5.a0 = 96; - a5.a1 = 97; - a5.a2 = 98; - a5.a3 = 99; - a5.a4 = 100; - a5.a5 = 101; - a5.a6 = 102; - a5.a7 = 103; - a5.a8 = 104; - a5.a9 = 105; - a5.a10 = 106; - a5.a11 = 107; - a5.a12 = 108; - a5.a13 = 109; - a5.a14 = 110; - a5.a15 = 111; - a5.a16 = 112; - a5.a17 = 113; - a5.a18 = 114; - a6.a0 = 115; - a6.a1 = 116; - a6.a2 = 117; - a6.a3 = 118; - a6.a4 = 119; - a6.a5 = 120; - a6.a6 = 121; - a6.a7 = 122; - a6.a8 = 123; - a6.a9 = 124; - a6.a10 = 125; - a6.a11 = 126; - a6.a12 = 127; - a6.a13 = 128; - a6.a14 = 129; - a6.a15 = 130; - a6.a16 = 131; - a6.a17 = 132; - a6.a18 = 133; - a7.a0 = 134; - a7.a1 = 135; - a7.a2 = 136; - a7.a3 = 137; - a7.a4 = 138; - a7.a5 = 139; - a7.a6 = 140; - a7.a7 = 141; - a7.a8 = 142; - a7.a9 = 143; - a7.a10 = 144; - a7.a11 = 145; - a7.a12 = 146; - a7.a13 = 147; - a7.a14 = 148; - a7.a15 = 149; - a7.a16 = 150; - a7.a17 = 151; - a7.a18 = 152; - a8.a0 = 153; - a8.a1 = 154; - a8.a2 = 155; - a8.a3 = 156; - a8.a4 = 157; - a8.a5 = 158; - a8.a6 = 159; - a8.a7 = 160; - a8.a8 = 161; - a8.a9 = 162; - a8.a10 = 163; - a8.a11 = 164; - a8.a12 = 165; - a8.a13 = 166; - a8.a14 = 167; - a8.a15 = 168; - a8.a16 = 169; - a8.a17 = 170; - a8.a18 = 171; - a9.a0 = 172; - a9.a1 = 173; - a9.a2 = 174; - a9.a3 = 175; - a9.a4 = 176; - a9.a5 = 177; - a9.a6 = 178; - a9.a7 = 179; - a9.a8 = 180; - a9.a9 = 181; - a9.a10 = 182; - a9.a11 = 183; - a9.a12 = 184; - a9.a13 = 185; - a9.a14 = 186; - a9.a15 = 187; - a9.a16 = 188; - a9.a17 = 189; - a9.a18 = 190; - - final result = passStruct19BytesHomogeneousUint8x10Leaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(18145, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct20BytesHomogeneousInt32x10Leaf = - ffiTestFunctions.lookupFunction< - Int32 Function( - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32), - int Function( - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32)>( - "PassStruct20BytesHomogeneousInt32x10", - isLeaf: true); - -/// Argument too big to go into integer registers on arm64. -/// The arguments are passed as pointers to copies. -/// The amount of arguments exhausts the number of integer registers, such that -/// pointers to copies are also passed on the stack. -void testPassStruct20BytesHomogeneousInt32x10Leaf() { - final a0Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a9 = a9Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - a0.a3 = 4; - a0.a4 = -5; - a1.a0 = 6; - a1.a1 = -7; - a1.a2 = 8; - a1.a3 = -9; - a1.a4 = 10; - a2.a0 = -11; - a2.a1 = 12; - a2.a2 = -13; - a2.a3 = 14; - a2.a4 = -15; - a3.a0 = 16; - a3.a1 = -17; - a3.a2 = 18; - a3.a3 = -19; - a3.a4 = 20; - a4.a0 = -21; - a4.a1 = 22; - a4.a2 = -23; - a4.a3 = 24; - a4.a4 = -25; - a5.a0 = 26; - a5.a1 = -27; - a5.a2 = 28; - a5.a3 = -29; - a5.a4 = 30; - a6.a0 = -31; - a6.a1 = 32; - a6.a2 = -33; - a6.a3 = 34; - a6.a4 = -35; - a7.a0 = 36; - a7.a1 = -37; - a7.a2 = 38; - a7.a3 = -39; - a7.a4 = 40; - a8.a0 = -41; - a8.a1 = 42; - a8.a2 = -43; - a8.a3 = 44; - a8.a4 = -45; - a9.a0 = 46; - a9.a1 = -47; - a9.a2 = 48; - a9.a3 = -49; - a9.a4 = 50; - - final result = passStruct20BytesHomogeneousInt32x10Leaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(25, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct20BytesHomogeneousFloatLeaf = ffiTestFunctions.lookupFunction< - Float Function(Struct20BytesHomogeneousFloat), - double Function(Struct20BytesHomogeneousFloat)>( - "PassStruct20BytesHomogeneousFloat", - isLeaf: true); - -/// Argument too big to go into FPU registers in hardfp and arm64. -void testPassStruct20BytesHomogeneousFloatLeaf() { - final a0Pointer = calloc(); - final Struct20BytesHomogeneousFloat a0 = a0Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2.0; - a0.a2 = -3.0; - a0.a3 = 4.0; - a0.a4 = -5.0; - - final result = passStruct20BytesHomogeneousFloatLeaf(a0); - - print("result = $result"); - - Expect.approxEquals(-3.0, result); - - calloc.free(a0Pointer); -} - -final passStruct32BytesHomogeneousDoublex5Leaf = - ffiTestFunctions.lookupFunction< - Double Function( - Struct32BytesHomogeneousDouble, - Struct32BytesHomogeneousDouble, - Struct32BytesHomogeneousDouble, - Struct32BytesHomogeneousDouble, - Struct32BytesHomogeneousDouble), - double Function( - Struct32BytesHomogeneousDouble, - Struct32BytesHomogeneousDouble, - Struct32BytesHomogeneousDouble, - Struct32BytesHomogeneousDouble, - Struct32BytesHomogeneousDouble)>( - "PassStruct32BytesHomogeneousDoublex5", - isLeaf: true); - -/// Arguments in FPU registers on arm64. -/// 5 struct arguments will exhaust available registers. -void testPassStruct32BytesHomogeneousDoublex5Leaf() { - final a0Pointer = calloc(); - final Struct32BytesHomogeneousDouble a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct32BytesHomogeneousDouble a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct32BytesHomogeneousDouble a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct32BytesHomogeneousDouble a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct32BytesHomogeneousDouble a4 = a4Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2.0; - a0.a2 = -3.0; - a0.a3 = 4.0; - a1.a0 = -5.0; - a1.a1 = 6.0; - a1.a2 = -7.0; - a1.a3 = 8.0; - a2.a0 = -9.0; - a2.a1 = 10.0; - a2.a2 = -11.0; - a2.a3 = 12.0; - a3.a0 = -13.0; - a3.a1 = 14.0; - a3.a2 = -15.0; - a3.a3 = 16.0; - a4.a0 = -17.0; - a4.a1 = 18.0; - a4.a2 = -19.0; - a4.a3 = 20.0; - - final result = passStruct32BytesHomogeneousDoublex5Leaf(a0, a1, a2, a3, a4); - - print("result = $result"); - - Expect.approxEquals(10.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); -} - -final passStruct40BytesHomogeneousDoubleLeaf = ffiTestFunctions.lookupFunction< - Double Function(Struct40BytesHomogeneousDouble), - double Function(Struct40BytesHomogeneousDouble)>( - "PassStruct40BytesHomogeneousDouble", - isLeaf: true); - -/// Argument too big to go into FPU registers in arm64. -void testPassStruct40BytesHomogeneousDoubleLeaf() { - final a0Pointer = calloc(); - final Struct40BytesHomogeneousDouble a0 = a0Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2.0; - a0.a2 = -3.0; - a0.a3 = 4.0; - a0.a4 = -5.0; - - final result = passStruct40BytesHomogeneousDoubleLeaf(a0); - - print("result = $result"); - - Expect.approxEquals(-3.0, result); - - calloc.free(a0Pointer); -} - -final passStruct1024BytesHomogeneousUint64Leaf = - ffiTestFunctions.lookupFunction< - Uint64 Function(Struct1024BytesHomogeneousUint64), - int Function(Struct1024BytesHomogeneousUint64)>( - "PassStruct1024BytesHomogeneousUint64", - isLeaf: true); - -/// Test 1kb struct. -void testPassStruct1024BytesHomogeneousUint64Leaf() { - final a0Pointer = calloc(); - final Struct1024BytesHomogeneousUint64 a0 = a0Pointer.ref; - - a0.a0 = 1; - a0.a1 = 2; - a0.a2 = 3; - a0.a3 = 4; - a0.a4 = 5; - a0.a5 = 6; - a0.a6 = 7; - a0.a7 = 8; - a0.a8 = 9; - a0.a9 = 10; - a0.a10 = 11; - a0.a11 = 12; - a0.a12 = 13; - a0.a13 = 14; - a0.a14 = 15; - a0.a15 = 16; - a0.a16 = 17; - a0.a17 = 18; - a0.a18 = 19; - a0.a19 = 20; - a0.a20 = 21; - a0.a21 = 22; - a0.a22 = 23; - a0.a23 = 24; - a0.a24 = 25; - a0.a25 = 26; - a0.a26 = 27; - a0.a27 = 28; - a0.a28 = 29; - a0.a29 = 30; - a0.a30 = 31; - a0.a31 = 32; - a0.a32 = 33; - a0.a33 = 34; - a0.a34 = 35; - a0.a35 = 36; - a0.a36 = 37; - a0.a37 = 38; - a0.a38 = 39; - a0.a39 = 40; - a0.a40 = 41; - a0.a41 = 42; - a0.a42 = 43; - a0.a43 = 44; - a0.a44 = 45; - a0.a45 = 46; - a0.a46 = 47; - a0.a47 = 48; - a0.a48 = 49; - a0.a49 = 50; - a0.a50 = 51; - a0.a51 = 52; - a0.a52 = 53; - a0.a53 = 54; - a0.a54 = 55; - a0.a55 = 56; - a0.a56 = 57; - a0.a57 = 58; - a0.a58 = 59; - a0.a59 = 60; - a0.a60 = 61; - a0.a61 = 62; - a0.a62 = 63; - a0.a63 = 64; - a0.a64 = 65; - a0.a65 = 66; - a0.a66 = 67; - a0.a67 = 68; - a0.a68 = 69; - a0.a69 = 70; - a0.a70 = 71; - a0.a71 = 72; - a0.a72 = 73; - a0.a73 = 74; - a0.a74 = 75; - a0.a75 = 76; - a0.a76 = 77; - a0.a77 = 78; - a0.a78 = 79; - a0.a79 = 80; - a0.a80 = 81; - a0.a81 = 82; - a0.a82 = 83; - a0.a83 = 84; - a0.a84 = 85; - a0.a85 = 86; - a0.a86 = 87; - a0.a87 = 88; - a0.a88 = 89; - a0.a89 = 90; - a0.a90 = 91; - a0.a91 = 92; - a0.a92 = 93; - a0.a93 = 94; - a0.a94 = 95; - a0.a95 = 96; - a0.a96 = 97; - a0.a97 = 98; - a0.a98 = 99; - a0.a99 = 100; - a0.a100 = 101; - a0.a101 = 102; - a0.a102 = 103; - a0.a103 = 104; - a0.a104 = 105; - a0.a105 = 106; - a0.a106 = 107; - a0.a107 = 108; - a0.a108 = 109; - a0.a109 = 110; - a0.a110 = 111; - a0.a111 = 112; - a0.a112 = 113; - a0.a113 = 114; - a0.a114 = 115; - a0.a115 = 116; - a0.a116 = 117; - a0.a117 = 118; - a0.a118 = 119; - a0.a119 = 120; - a0.a120 = 121; - a0.a121 = 122; - a0.a122 = 123; - a0.a123 = 124; - a0.a124 = 125; - a0.a125 = 126; - a0.a126 = 127; - a0.a127 = 128; - - final result = passStruct1024BytesHomogeneousUint64Leaf(a0); - - print("result = $result"); - - Expect.equals(8256, result); - - calloc.free(a0Pointer); -} - -final passFloatStruct16BytesHomogeneousFloatFloatStruct1Leaf = - ffiTestFunctions.lookupFunction< - Float Function( - Float, - Struct16BytesHomogeneousFloat, - Float, - Struct16BytesHomogeneousFloat, - Float, - Struct16BytesHomogeneousFloat, - Float, - Struct16BytesHomogeneousFloat, - Float), - double Function( - double, - Struct16BytesHomogeneousFloat, - double, - Struct16BytesHomogeneousFloat, - double, - Struct16BytesHomogeneousFloat, - double, - Struct16BytesHomogeneousFloat, - double)>("PassFloatStruct16BytesHomogeneousFloatFloatStruct1", - isLeaf: true); - -/// Tests the alignment of structs in FPU registers and backfilling. -void testPassFloatStruct16BytesHomogeneousFloatFloatStruct1Leaf() { - double a0; - final a1Pointer = calloc(); - final Struct16BytesHomogeneousFloat a1 = a1Pointer.ref; - double a2; - final a3Pointer = calloc(); - final Struct16BytesHomogeneousFloat a3 = a3Pointer.ref; - double a4; - final a5Pointer = calloc(); - final Struct16BytesHomogeneousFloat a5 = a5Pointer.ref; - double a6; - final a7Pointer = calloc(); - final Struct16BytesHomogeneousFloat a7 = a7Pointer.ref; - double a8; - - a0 = -1.0; - a1.a0 = 2.0; - a1.a1 = -3.0; - a1.a2 = 4.0; - a1.a3 = -5.0; - a2 = 6.0; - a3.a0 = -7.0; - a3.a1 = 8.0; - a3.a2 = -9.0; - a3.a3 = 10.0; - a4 = -11.0; - a5.a0 = 12.0; - a5.a1 = -13.0; - a5.a2 = 14.0; - a5.a3 = -15.0; - a6 = 16.0; - a7.a0 = -17.0; - a7.a1 = 18.0; - a7.a2 = -19.0; - a7.a3 = 20.0; - a8 = -21.0; - - final result = passFloatStruct16BytesHomogeneousFloatFloatStruct1Leaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8); - - print("result = $result"); - - Expect.approxEquals(-11.0, result); - - calloc.free(a1Pointer); - calloc.free(a3Pointer); - calloc.free(a5Pointer); - calloc.free(a7Pointer); -} - -final passFloatStruct32BytesHomogeneousDoubleFloatStructLeaf = - ffiTestFunctions.lookupFunction< - Double Function( - Float, - Struct32BytesHomogeneousDouble, - Float, - Struct32BytesHomogeneousDouble, - Float, - Struct32BytesHomogeneousDouble, - Float, - Struct32BytesHomogeneousDouble, - Float), - double Function( - double, - Struct32BytesHomogeneousDouble, - double, - Struct32BytesHomogeneousDouble, - double, - Struct32BytesHomogeneousDouble, - double, - Struct32BytesHomogeneousDouble, - double)>("PassFloatStruct32BytesHomogeneousDoubleFloatStruct", - isLeaf: true); - -/// Tests the alignment of structs in FPU registers and backfilling. -void testPassFloatStruct32BytesHomogeneousDoubleFloatStructLeaf() { - double a0; - final a1Pointer = calloc(); - final Struct32BytesHomogeneousDouble a1 = a1Pointer.ref; - double a2; - final a3Pointer = calloc(); - final Struct32BytesHomogeneousDouble a3 = a3Pointer.ref; - double a4; - final a5Pointer = calloc(); - final Struct32BytesHomogeneousDouble a5 = a5Pointer.ref; - double a6; - final a7Pointer = calloc(); - final Struct32BytesHomogeneousDouble a7 = a7Pointer.ref; - double a8; - - a0 = -1.0; - a1.a0 = 2.0; - a1.a1 = -3.0; - a1.a2 = 4.0; - a1.a3 = -5.0; - a2 = 6.0; - a3.a0 = -7.0; - a3.a1 = 8.0; - a3.a2 = -9.0; - a3.a3 = 10.0; - a4 = -11.0; - a5.a0 = 12.0; - a5.a1 = -13.0; - a5.a2 = 14.0; - a5.a3 = -15.0; - a6 = 16.0; - a7.a0 = -17.0; - a7.a1 = 18.0; - a7.a2 = -19.0; - a7.a3 = 20.0; - a8 = -21.0; - - final result = passFloatStruct32BytesHomogeneousDoubleFloatStructLeaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8); - - print("result = $result"); - - Expect.approxEquals(-11.0, result); - - calloc.free(a1Pointer); - calloc.free(a3Pointer); - calloc.free(a5Pointer); - calloc.free(a7Pointer); -} - -final passInt8Struct16BytesMixedInt8Struct16BytesMixedInLeaf = - ffiTestFunctions.lookupFunction< - Double Function(Int8, Struct16BytesMixed, Int8, Struct16BytesMixed, - Int8, Struct16BytesMixed, Int8, Struct16BytesMixed, Int8), - double Function( - int, - Struct16BytesMixed, - int, - Struct16BytesMixed, - int, - Struct16BytesMixed, - int, - Struct16BytesMixed, - int)>("PassInt8Struct16BytesMixedInt8Struct16BytesMixedIn", - isLeaf: true); - -/// Tests the alignment of structs in integers registers and on the stack. -/// Arm32 aligns this struct at 8. -/// Also, arm32 allocates the second struct partially in registers, partially -/// on stack. -/// Test backfilling of integer registers. -void testPassInt8Struct16BytesMixedInt8Struct16BytesMixedInLeaf() { - int a0; - final a1Pointer = calloc(); - final Struct16BytesMixed a1 = a1Pointer.ref; - int a2; - final a3Pointer = calloc(); - final Struct16BytesMixed a3 = a3Pointer.ref; - int a4; - final a5Pointer = calloc(); - final Struct16BytesMixed a5 = a5Pointer.ref; - int a6; - final a7Pointer = calloc(); - final Struct16BytesMixed a7 = a7Pointer.ref; - int a8; - - a0 = -1; - a1.a0 = 2.0; - a1.a1 = -3; - a2 = 4; - a3.a0 = -5.0; - a3.a1 = 6; - a4 = -7; - a5.a0 = 8.0; - a5.a1 = -9; - a6 = 10; - a7.a0 = -11.0; - a7.a1 = 12; - a8 = -13; - - final result = passInt8Struct16BytesMixedInt8Struct16BytesMixedInLeaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8); - - print("result = $result"); - - Expect.approxEquals(-7.0, result); - - calloc.free(a1Pointer); - calloc.free(a3Pointer); - calloc.free(a5Pointer); - calloc.free(a7Pointer); -} - -final passDoublex6Struct16BytesMixedx4Int32Leaf = - ffiTestFunctions.lookupFunction< - Double Function( - Double, - Double, - Double, - Double, - Double, - Double, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Int32), - double Function( - double, - double, - double, - double, - double, - double, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - int)>("PassDoublex6Struct16BytesMixedx4Int32", isLeaf: true); - -/// On Linux x64, it will exhaust xmm registers first, after 6 doubles and 2 -/// structs. The rest of the structs will go on the stack. -/// The int will be backfilled into the int register. -void testPassDoublex6Struct16BytesMixedx4Int32Leaf() { - double a0; - double a1; - double a2; - double a3; - double a4; - double a5; - final a6Pointer = calloc(); - final Struct16BytesMixed a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct16BytesMixed a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct16BytesMixed a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct16BytesMixed a9 = a9Pointer.ref; - int a10; - - a0 = -1.0; - a1 = 2.0; - a2 = -3.0; - a3 = 4.0; - a4 = -5.0; - a5 = 6.0; - a6.a0 = -7.0; - a6.a1 = 8; - a7.a0 = -9.0; - a7.a1 = 10; - a8.a0 = -11.0; - a8.a1 = 12; - a9.a0 = -13.0; - a9.a1 = 14; - a10 = -15; - - final result = passDoublex6Struct16BytesMixedx4Int32Leaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); - - print("result = $result"); - - Expect.approxEquals(-8.0, result); - - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passInt32x4Struct16BytesMixedx4DoubleLeaf = - ffiTestFunctions.lookupFunction< - Double Function(Int32, Int32, Int32, Int32, Struct16BytesMixed, - Struct16BytesMixed, Struct16BytesMixed, Struct16BytesMixed, Double), - double Function( - int, - int, - int, - int, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - double)>("PassInt32x4Struct16BytesMixedx4Double", isLeaf: true); - -/// On Linux x64, it will exhaust int registers first. -/// The rest of the structs will go on the stack. -/// The double will be backfilled into the xmm register. -void testPassInt32x4Struct16BytesMixedx4DoubleLeaf() { - int a0; - int a1; - int a2; - int a3; - final a4Pointer = calloc(); - final Struct16BytesMixed a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct16BytesMixed a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct16BytesMixed a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct16BytesMixed a7 = a7Pointer.ref; - double a8; - - a0 = -1; - a1 = 2; - a2 = -3; - a3 = 4; - a4.a0 = -5.0; - a4.a1 = 6; - a5.a0 = -7.0; - a5.a1 = 8; - a6.a0 = -9.0; - a6.a1 = 10; - a7.a0 = -11.0; - a7.a1 = 12; - a8 = -13.0; - - final result = passInt32x4Struct16BytesMixedx4DoubleLeaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8); - - print("result = $result"); - - Expect.approxEquals(-7.0, result); - - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); -} - -final passStruct40BytesHomogeneousDoubleStruct4BytesHomoLeaf = - ffiTestFunctions.lookupFunction< - Double Function(Struct40BytesHomogeneousDouble, - Struct4BytesHomogeneousInt16, Struct8BytesHomogeneousFloat), - double Function(Struct40BytesHomogeneousDouble, - Struct4BytesHomogeneousInt16, Struct8BytesHomogeneousFloat)>( - "PassStruct40BytesHomogeneousDoubleStruct4BytesHomo", - isLeaf: true); - -/// On various architectures, first struct is allocated on stack. -/// Check that the other two arguments are allocated on registers. -void testPassStruct40BytesHomogeneousDoubleStruct4BytesHomoLeaf() { - final a0Pointer = calloc(); - final Struct40BytesHomogeneousDouble a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct8BytesHomogeneousFloat a2 = a2Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2.0; - a0.a2 = -3.0; - a0.a3 = 4.0; - a0.a4 = -5.0; - a1.a0 = 6; - a1.a1 = -7; - a2.a0 = 8.0; - a2.a1 = -9.0; - - final result = - passStruct40BytesHomogeneousDoubleStruct4BytesHomoLeaf(a0, a1, a2); - - print("result = $result"); - - Expect.approxEquals(-5.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); -} - -final passInt32x8Doublex8Int64Int8Struct1ByteIntInt64IntLeaf = - ffiTestFunctions.lookupFunction< - Double Function( - Int32, - Int32, - Int32, - Int32, - Int32, - Int32, - Int32, - Int32, - Double, - Double, - Double, - Double, - Double, - Double, - Double, - Double, - Int64, - Int8, - Struct1ByteInt, - Int64, - Int8, - Struct4BytesHomogeneousInt16, - Int64, - Int8, - Struct8BytesInt, - Int64, - Int8, - Struct8BytesHomogeneousFloat, - Int64, - Int8, - Struct8BytesMixed, - Int64, - Int8, - StructAlignmentInt16, - Int64, - Int8, - StructAlignmentInt32, - Int64, - Int8, - StructAlignmentInt64), - double Function( - int, - int, - int, - int, - int, - int, - int, - int, - double, - double, - double, - double, - double, - double, - double, - double, - int, - int, - Struct1ByteInt, - int, - int, - Struct4BytesHomogeneousInt16, - int, - int, - Struct8BytesInt, - int, - int, - Struct8BytesHomogeneousFloat, - int, - int, - Struct8BytesMixed, - int, - int, - StructAlignmentInt16, - int, - int, - StructAlignmentInt32, - int, - int, - StructAlignmentInt64)>("PassInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int", isLeaf: true); - -/// Test alignment and padding of 16 byte int within struct. -void testPassInt32x8Doublex8Int64Int8Struct1ByteIntInt64IntLeaf() { - int a0; - int a1; - int a2; - int a3; - int a4; - int a5; - int a6; - int a7; - double a8; - double a9; - double a10; - double a11; - double a12; - double a13; - double a14; - double a15; - int a16; - int a17; - final a18Pointer = calloc(); - final Struct1ByteInt a18 = a18Pointer.ref; - int a19; - int a20; - final a21Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a21 = a21Pointer.ref; - int a22; - int a23; - final a24Pointer = calloc(); - final Struct8BytesInt a24 = a24Pointer.ref; - int a25; - int a26; - final a27Pointer = calloc(); - final Struct8BytesHomogeneousFloat a27 = a27Pointer.ref; - int a28; - int a29; - final a30Pointer = calloc(); - final Struct8BytesMixed a30 = a30Pointer.ref; - int a31; - int a32; - final a33Pointer = calloc(); - final StructAlignmentInt16 a33 = a33Pointer.ref; - int a34; - int a35; - final a36Pointer = calloc(); - final StructAlignmentInt32 a36 = a36Pointer.ref; - int a37; - int a38; - final a39Pointer = calloc(); - final StructAlignmentInt64 a39 = a39Pointer.ref; - - a0 = -1; - a1 = 2; - a2 = -3; - a3 = 4; - a4 = -5; - a5 = 6; - a6 = -7; - a7 = 8; - a8 = -9.0; - a9 = 10.0; - a10 = -11.0; - a11 = 12.0; - a12 = -13.0; - a13 = 14.0; - a14 = -15.0; - a15 = 16.0; - a16 = -17; - a17 = 18; - a18.a0 = -19; - a19 = 20; - a20 = -21; - a21.a0 = 22; - a21.a1 = -23; - a22 = 24; - a23 = -25; - a24.a0 = 26; - a24.a1 = -27; - a24.a2 = 28; - a25 = -29; - a26 = 30; - a27.a0 = -31.0; - a27.a1 = 32.0; - a28 = -33; - a29 = 34; - a30.a0 = -35.0; - a30.a1 = 36; - a30.a2 = -37; - a31 = 38; - a32 = -39; - a33.a0 = 40; - a33.a1 = -41; - a33.a2 = 42; - a34 = -43; - a35 = 44; - a36.a0 = -45; - a36.a1 = 46; - a36.a2 = -47; - a37 = 48; - a38 = -49; - a39.a0 = 50; - a39.a1 = -51; - a39.a2 = 52; - - final result = passInt32x8Doublex8Int64Int8Struct1ByteIntInt64IntLeaf( - a0, - a1, - a2, - a3, - a4, - a5, - a6, - a7, - a8, - a9, - a10, - a11, - a12, - a13, - a14, - a15, - a16, - a17, - a18, - a19, - a20, - a21, - a22, - a23, - a24, - a25, - a26, - a27, - a28, - a29, - a30, - a31, - a32, - a33, - a34, - a35, - a36, - a37, - a38, - a39); - - print("result = $result"); - - Expect.approxEquals(26.0, result); - - calloc.free(a18Pointer); - calloc.free(a21Pointer); - calloc.free(a24Pointer); - calloc.free(a27Pointer); - calloc.free(a30Pointer); - calloc.free(a33Pointer); - calloc.free(a36Pointer); - calloc.free(a39Pointer); -} - -final passStructAlignmentInt16Leaf = ffiTestFunctions.lookupFunction< - Int64 Function(StructAlignmentInt16), - int Function( - StructAlignmentInt16)>("PassStructAlignmentInt16", isLeaf: true); - -/// Test alignment and padding of 16 byte int within struct. -void testPassStructAlignmentInt16Leaf() { - final a0Pointer = calloc(); - final StructAlignmentInt16 a0 = a0Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - - final result = passStructAlignmentInt16Leaf(a0); - - print("result = $result"); - - Expect.equals(-2, result); - - calloc.free(a0Pointer); -} - -final passStructAlignmentInt32Leaf = ffiTestFunctions.lookupFunction< - Int64 Function(StructAlignmentInt32), - int Function( - StructAlignmentInt32)>("PassStructAlignmentInt32", isLeaf: true); - -/// Test alignment and padding of 32 byte int within struct. -void testPassStructAlignmentInt32Leaf() { - final a0Pointer = calloc(); - final StructAlignmentInt32 a0 = a0Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - - final result = passStructAlignmentInt32Leaf(a0); - - print("result = $result"); - - Expect.equals(-2, result); - - calloc.free(a0Pointer); -} - -final passStructAlignmentInt64Leaf = ffiTestFunctions.lookupFunction< - Int64 Function(StructAlignmentInt64), - int Function( - StructAlignmentInt64)>("PassStructAlignmentInt64", isLeaf: true); - -/// Test alignment and padding of 64 byte int within struct. -void testPassStructAlignmentInt64Leaf() { - final a0Pointer = calloc(); - final StructAlignmentInt64 a0 = a0Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - - final result = passStructAlignmentInt64Leaf(a0); - - print("result = $result"); - - Expect.equals(-2, result); - - calloc.free(a0Pointer); -} - -final passStruct8BytesNestedIntx10Leaf = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt), - int Function( - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt)>("PassStruct8BytesNestedIntx10", isLeaf: true); - -/// Simple nested struct. No alignment gaps on any architectures. -/// 10 arguments exhaust registers on all platforms. -void testPassStruct8BytesNestedIntx10Leaf() { - final a0Pointer = calloc(); - final Struct8BytesNestedInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct8BytesNestedInt a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct8BytesNestedInt a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct8BytesNestedInt a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct8BytesNestedInt a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct8BytesNestedInt a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct8BytesNestedInt a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct8BytesNestedInt a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct8BytesNestedInt a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct8BytesNestedInt a9 = a9Pointer.ref; - - a0.a0.a0 = -1; - a0.a0.a1 = 2; - a0.a1.a0 = -3; - a0.a1.a1 = 4; - a1.a0.a0 = -5; - a1.a0.a1 = 6; - a1.a1.a0 = -7; - a1.a1.a1 = 8; - a2.a0.a0 = -9; - a2.a0.a1 = 10; - a2.a1.a0 = -11; - a2.a1.a1 = 12; - a3.a0.a0 = -13; - a3.a0.a1 = 14; - a3.a1.a0 = -15; - a3.a1.a1 = 16; - a4.a0.a0 = -17; - a4.a0.a1 = 18; - a4.a1.a0 = -19; - a4.a1.a1 = 20; - a5.a0.a0 = -21; - a5.a0.a1 = 22; - a5.a1.a0 = -23; - a5.a1.a1 = 24; - a6.a0.a0 = -25; - a6.a0.a1 = 26; - a6.a1.a0 = -27; - a6.a1.a1 = 28; - a7.a0.a0 = -29; - a7.a0.a1 = 30; - a7.a1.a0 = -31; - a7.a1.a1 = 32; - a8.a0.a0 = -33; - a8.a0.a1 = 34; - a8.a1.a0 = -35; - a8.a1.a1 = 36; - a9.a0.a0 = -37; - a9.a0.a1 = 38; - a9.a1.a0 = -39; - a9.a1.a1 = 40; - - final result = - passStruct8BytesNestedIntx10Leaf(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(20, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct8BytesNestedFloatx10Leaf = ffiTestFunctions.lookupFunction< - Float Function( - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat), - double Function( - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat)>("PassStruct8BytesNestedFloatx10", - isLeaf: true); - -/// Simple nested struct. No alignment gaps on any architectures. -/// 10 arguments exhaust fpu registers on all platforms. -void testPassStruct8BytesNestedFloatx10Leaf() { - final a0Pointer = calloc(); - final Struct8BytesNestedFloat a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct8BytesNestedFloat a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct8BytesNestedFloat a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct8BytesNestedFloat a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct8BytesNestedFloat a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct8BytesNestedFloat a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct8BytesNestedFloat a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct8BytesNestedFloat a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct8BytesNestedFloat a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct8BytesNestedFloat a9 = a9Pointer.ref; - - a0.a0.a0 = -1.0; - a0.a1.a0 = 2.0; - a1.a0.a0 = -3.0; - a1.a1.a0 = 4.0; - a2.a0.a0 = -5.0; - a2.a1.a0 = 6.0; - a3.a0.a0 = -7.0; - a3.a1.a0 = 8.0; - a4.a0.a0 = -9.0; - a4.a1.a0 = 10.0; - a5.a0.a0 = -11.0; - a5.a1.a0 = 12.0; - a6.a0.a0 = -13.0; - a6.a1.a0 = 14.0; - a7.a0.a0 = -15.0; - a7.a1.a0 = 16.0; - a8.a0.a0 = -17.0; - a8.a1.a0 = 18.0; - a9.a0.a0 = -19.0; - a9.a1.a0 = 20.0; - - final result = passStruct8BytesNestedFloatx10Leaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(10.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct8BytesNestedFloat2x10Leaf = ffiTestFunctions.lookupFunction< - Float Function( - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2), - double Function( - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2)>("PassStruct8BytesNestedFloat2x10", - isLeaf: true); - -/// Simple nested struct. No alignment gaps on any architectures. -/// 10 arguments exhaust fpu registers on all platforms. -/// The nesting is irregular, testing homogenous float rules on arm and arm64, -/// and the fpu register usage on x64. -void testPassStruct8BytesNestedFloat2x10Leaf() { - final a0Pointer = calloc(); - final Struct8BytesNestedFloat2 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct8BytesNestedFloat2 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct8BytesNestedFloat2 a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct8BytesNestedFloat2 a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct8BytesNestedFloat2 a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct8BytesNestedFloat2 a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct8BytesNestedFloat2 a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct8BytesNestedFloat2 a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct8BytesNestedFloat2 a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct8BytesNestedFloat2 a9 = a9Pointer.ref; - - a0.a0.a0 = -1.0; - a0.a1 = 2.0; - a1.a0.a0 = -3.0; - a1.a1 = 4.0; - a2.a0.a0 = -5.0; - a2.a1 = 6.0; - a3.a0.a0 = -7.0; - a3.a1 = 8.0; - a4.a0.a0 = -9.0; - a4.a1 = 10.0; - a5.a0.a0 = -11.0; - a5.a1 = 12.0; - a6.a0.a0 = -13.0; - a6.a1 = 14.0; - a7.a0.a0 = -15.0; - a7.a1 = 16.0; - a8.a0.a0 = -17.0; - a8.a1 = 18.0; - a9.a0.a0 = -19.0; - a9.a1 = 20.0; - - final result = passStruct8BytesNestedFloat2x10Leaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(10.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct8BytesNestedMixedx10Leaf = ffiTestFunctions.lookupFunction< - Double Function( - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed), - double Function( - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed)>("PassStruct8BytesNestedMixedx10", - isLeaf: true); - -/// Simple nested struct. No alignment gaps on any architectures. -/// 10 arguments exhaust all registers on all platforms. -void testPassStruct8BytesNestedMixedx10Leaf() { - final a0Pointer = calloc(); - final Struct8BytesNestedMixed a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct8BytesNestedMixed a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct8BytesNestedMixed a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct8BytesNestedMixed a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct8BytesNestedMixed a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct8BytesNestedMixed a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct8BytesNestedMixed a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct8BytesNestedMixed a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct8BytesNestedMixed a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct8BytesNestedMixed a9 = a9Pointer.ref; - - a0.a0.a0 = -1; - a0.a0.a1 = 2; - a0.a1.a0 = -3.0; - a1.a0.a0 = 4; - a1.a0.a1 = -5; - a1.a1.a0 = 6.0; - a2.a0.a0 = -7; - a2.a0.a1 = 8; - a2.a1.a0 = -9.0; - a3.a0.a0 = 10; - a3.a0.a1 = -11; - a3.a1.a0 = 12.0; - a4.a0.a0 = -13; - a4.a0.a1 = 14; - a4.a1.a0 = -15.0; - a5.a0.a0 = 16; - a5.a0.a1 = -17; - a5.a1.a0 = 18.0; - a6.a0.a0 = -19; - a6.a0.a1 = 20; - a6.a1.a0 = -21.0; - a7.a0.a0 = 22; - a7.a0.a1 = -23; - a7.a1.a0 = 24.0; - a8.a0.a0 = -25; - a8.a0.a1 = 26; - a8.a1.a0 = -27.0; - a9.a0.a0 = 28; - a9.a0.a1 = -29; - a9.a1.a0 = 30.0; - - final result = passStruct8BytesNestedMixedx10Leaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(15.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct16BytesNestedIntx2Leaf = ffiTestFunctions.lookupFunction< - Int64 Function(Struct16BytesNestedInt, Struct16BytesNestedInt), - int Function(Struct16BytesNestedInt, - Struct16BytesNestedInt)>("PassStruct16BytesNestedIntx2", isLeaf: true); - -/// Deeper nested struct to test recursive member access. -void testPassStruct16BytesNestedIntx2Leaf() { - final a0Pointer = calloc(); - final Struct16BytesNestedInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct16BytesNestedInt a1 = a1Pointer.ref; - - a0.a0.a0.a0 = -1; - a0.a0.a0.a1 = 2; - a0.a0.a1.a0 = -3; - a0.a0.a1.a1 = 4; - a0.a1.a0.a0 = -5; - a0.a1.a0.a1 = 6; - a0.a1.a1.a0 = -7; - a0.a1.a1.a1 = 8; - a1.a0.a0.a0 = -9; - a1.a0.a0.a1 = 10; - a1.a0.a1.a0 = -11; - a1.a0.a1.a1 = 12; - a1.a1.a0.a0 = -13; - a1.a1.a0.a1 = 14; - a1.a1.a1.a0 = -15; - a1.a1.a1.a1 = 16; - - final result = passStruct16BytesNestedIntx2Leaf(a0, a1); - - print("result = $result"); - - Expect.equals(8, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); -} - -final passStruct32BytesNestedIntx2Leaf = ffiTestFunctions.lookupFunction< - Int64 Function(Struct32BytesNestedInt, Struct32BytesNestedInt), - int Function(Struct32BytesNestedInt, - Struct32BytesNestedInt)>("PassStruct32BytesNestedIntx2", isLeaf: true); - -/// Even deeper nested struct to test recursive member access. -void testPassStruct32BytesNestedIntx2Leaf() { - final a0Pointer = calloc(); - final Struct32BytesNestedInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct32BytesNestedInt a1 = a1Pointer.ref; - - a0.a0.a0.a0.a0 = -1; - a0.a0.a0.a0.a1 = 2; - a0.a0.a0.a1.a0 = -3; - a0.a0.a0.a1.a1 = 4; - a0.a0.a1.a0.a0 = -5; - a0.a0.a1.a0.a1 = 6; - a0.a0.a1.a1.a0 = -7; - a0.a0.a1.a1.a1 = 8; - a0.a1.a0.a0.a0 = -9; - a0.a1.a0.a0.a1 = 10; - a0.a1.a0.a1.a0 = -11; - a0.a1.a0.a1.a1 = 12; - a0.a1.a1.a0.a0 = -13; - a0.a1.a1.a0.a1 = 14; - a0.a1.a1.a1.a0 = -15; - a0.a1.a1.a1.a1 = 16; - a1.a0.a0.a0.a0 = -17; - a1.a0.a0.a0.a1 = 18; - a1.a0.a0.a1.a0 = -19; - a1.a0.a0.a1.a1 = 20; - a1.a0.a1.a0.a0 = -21; - a1.a0.a1.a0.a1 = 22; - a1.a0.a1.a1.a0 = -23; - a1.a0.a1.a1.a1 = 24; - a1.a1.a0.a0.a0 = -25; - a1.a1.a0.a0.a1 = 26; - a1.a1.a0.a1.a0 = -27; - a1.a1.a0.a1.a1 = 28; - a1.a1.a1.a0.a0 = -29; - a1.a1.a1.a0.a1 = 30; - a1.a1.a1.a1.a0 = -31; - a1.a1.a1.a1.a1 = 32; - - final result = passStruct32BytesNestedIntx2Leaf(a0, a1); - - print("result = $result"); - - Expect.equals(16, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); -} - -final passStructNestedIntStructAlignmentInt16Leaf = - ffiTestFunctions.lookupFunction< - Int64 Function(StructNestedIntStructAlignmentInt16), - int Function(StructNestedIntStructAlignmentInt16)>( - "PassStructNestedIntStructAlignmentInt16", - isLeaf: true); - -/// Test alignment and padding of nested struct with 16 byte int. -void testPassStructNestedIntStructAlignmentInt16Leaf() { - final a0Pointer = calloc(); - final StructNestedIntStructAlignmentInt16 a0 = a0Pointer.ref; - - a0.a0.a0 = -1; - a0.a0.a1 = 2; - a0.a0.a2 = -3; - a0.a1.a0 = 4; - a0.a1.a1 = -5; - a0.a1.a2 = 6; - - final result = passStructNestedIntStructAlignmentInt16Leaf(a0); - - print("result = $result"); - - Expect.equals(3, result); - - calloc.free(a0Pointer); -} - -final passStructNestedIntStructAlignmentInt32Leaf = - ffiTestFunctions.lookupFunction< - Int64 Function(StructNestedIntStructAlignmentInt32), - int Function(StructNestedIntStructAlignmentInt32)>( - "PassStructNestedIntStructAlignmentInt32", - isLeaf: true); - -/// Test alignment and padding of nested struct with 32 byte int. -void testPassStructNestedIntStructAlignmentInt32Leaf() { - final a0Pointer = calloc(); - final StructNestedIntStructAlignmentInt32 a0 = a0Pointer.ref; - - a0.a0.a0 = -1; - a0.a0.a1 = 2; - a0.a0.a2 = -3; - a0.a1.a0 = 4; - a0.a1.a1 = -5; - a0.a1.a2 = 6; - - final result = passStructNestedIntStructAlignmentInt32Leaf(a0); - - print("result = $result"); - - Expect.equals(3, result); - - calloc.free(a0Pointer); -} - -final passStructNestedIntStructAlignmentInt64Leaf = - ffiTestFunctions.lookupFunction< - Int64 Function(StructNestedIntStructAlignmentInt64), - int Function(StructNestedIntStructAlignmentInt64)>( - "PassStructNestedIntStructAlignmentInt64", - isLeaf: true); - -/// Test alignment and padding of nested struct with 64 byte int. -void testPassStructNestedIntStructAlignmentInt64Leaf() { - final a0Pointer = calloc(); - final StructNestedIntStructAlignmentInt64 a0 = a0Pointer.ref; - - a0.a0.a0 = -1; - a0.a0.a1 = 2; - a0.a0.a2 = -3; - a0.a1.a0 = 4; - a0.a1.a1 = -5; - a0.a1.a2 = 6; - - final result = passStructNestedIntStructAlignmentInt64Leaf(a0); - - print("result = $result"); - - Expect.equals(3, result); - - calloc.free(a0Pointer); -} - -final passStructNestedIrregularEvenBiggerx4Leaf = - ffiTestFunctions.lookupFunction< - Double Function( - StructNestedIrregularEvenBigger, - StructNestedIrregularEvenBigger, - StructNestedIrregularEvenBigger, - StructNestedIrregularEvenBigger), - double Function( - StructNestedIrregularEvenBigger, - StructNestedIrregularEvenBigger, - StructNestedIrregularEvenBigger, - StructNestedIrregularEvenBigger)>( - "PassStructNestedIrregularEvenBiggerx4", - isLeaf: true); - -/// Return big irregular struct as smoke test. -void testPassStructNestedIrregularEvenBiggerx4Leaf() { - final a0Pointer = calloc(); - final StructNestedIrregularEvenBigger a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final StructNestedIrregularEvenBigger a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final StructNestedIrregularEvenBigger a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final StructNestedIrregularEvenBigger a3 = a3Pointer.ref; - - a0.a0 = 1; - a0.a1.a0.a0 = 2; - a0.a1.a0.a1.a0.a0 = -3; - a0.a1.a0.a1.a0.a1 = 4; - a0.a1.a0.a1.a1.a0 = -5.0; - a0.a1.a0.a2 = 6; - a0.a1.a0.a3.a0.a0 = -7.0; - a0.a1.a0.a3.a1 = 8.0; - a0.a1.a0.a4 = 9; - a0.a1.a0.a5.a0.a0 = 10.0; - a0.a1.a0.a5.a1.a0 = -11.0; - a0.a1.a0.a6 = 12; - a0.a1.a1.a0.a0 = -13; - a0.a1.a1.a0.a1 = 14; - a0.a1.a1.a1.a0 = -15.0; - a0.a1.a2 = 16.0; - a0.a1.a3 = -17.0; - a0.a2.a0.a0 = 18; - a0.a2.a0.a1.a0.a0 = -19; - a0.a2.a0.a1.a0.a1 = 20; - a0.a2.a0.a1.a1.a0 = -21.0; - a0.a2.a0.a2 = 22; - a0.a2.a0.a3.a0.a0 = -23.0; - a0.a2.a0.a3.a1 = 24.0; - a0.a2.a0.a4 = 25; - a0.a2.a0.a5.a0.a0 = 26.0; - a0.a2.a0.a5.a1.a0 = -27.0; - a0.a2.a0.a6 = 28; - a0.a2.a1.a0.a0 = -29; - a0.a2.a1.a0.a1 = 30; - a0.a2.a1.a1.a0 = -31.0; - a0.a2.a2 = 32.0; - a0.a2.a3 = -33.0; - a0.a3 = 34.0; - a1.a0 = 35; - a1.a1.a0.a0 = 36; - a1.a1.a0.a1.a0.a0 = -37; - a1.a1.a0.a1.a0.a1 = 38; - a1.a1.a0.a1.a1.a0 = -39.0; - a1.a1.a0.a2 = 40; - a1.a1.a0.a3.a0.a0 = -41.0; - a1.a1.a0.a3.a1 = 42.0; - a1.a1.a0.a4 = 43; - a1.a1.a0.a5.a0.a0 = 44.0; - a1.a1.a0.a5.a1.a0 = -45.0; - a1.a1.a0.a6 = 46; - a1.a1.a1.a0.a0 = -47; - a1.a1.a1.a0.a1 = 48; - a1.a1.a1.a1.a0 = -49.0; - a1.a1.a2 = 50.0; - a1.a1.a3 = -51.0; - a1.a2.a0.a0 = 52; - a1.a2.a0.a1.a0.a0 = -53; - a1.a2.a0.a1.a0.a1 = 54; - a1.a2.a0.a1.a1.a0 = -55.0; - a1.a2.a0.a2 = 56; - a1.a2.a0.a3.a0.a0 = -57.0; - a1.a2.a0.a3.a1 = 58.0; - a1.a2.a0.a4 = 59; - a1.a2.a0.a5.a0.a0 = 60.0; - a1.a2.a0.a5.a1.a0 = -61.0; - a1.a2.a0.a6 = 62; - a1.a2.a1.a0.a0 = -63; - a1.a2.a1.a0.a1 = 64; - a1.a2.a1.a1.a0 = -65.0; - a1.a2.a2 = 66.0; - a1.a2.a3 = -67.0; - a1.a3 = 68.0; - a2.a0 = 69; - a2.a1.a0.a0 = 70; - a2.a1.a0.a1.a0.a0 = -71; - a2.a1.a0.a1.a0.a1 = 72; - a2.a1.a0.a1.a1.a0 = -73.0; - a2.a1.a0.a2 = 74; - a2.a1.a0.a3.a0.a0 = -75.0; - a2.a1.a0.a3.a1 = 76.0; - a2.a1.a0.a4 = 77; - a2.a1.a0.a5.a0.a0 = 78.0; - a2.a1.a0.a5.a1.a0 = -79.0; - a2.a1.a0.a6 = 80; - a2.a1.a1.a0.a0 = -81; - a2.a1.a1.a0.a1 = 82; - a2.a1.a1.a1.a0 = -83.0; - a2.a1.a2 = 84.0; - a2.a1.a3 = -85.0; - a2.a2.a0.a0 = 86; - a2.a2.a0.a1.a0.a0 = -87; - a2.a2.a0.a1.a0.a1 = 88; - a2.a2.a0.a1.a1.a0 = -89.0; - a2.a2.a0.a2 = 90; - a2.a2.a0.a3.a0.a0 = -91.0; - a2.a2.a0.a3.a1 = 92.0; - a2.a2.a0.a4 = 93; - a2.a2.a0.a5.a0.a0 = 94.0; - a2.a2.a0.a5.a1.a0 = -95.0; - a2.a2.a0.a6 = 96; - a2.a2.a1.a0.a0 = -97; - a2.a2.a1.a0.a1 = 98; - a2.a2.a1.a1.a0 = -99.0; - a2.a2.a2 = 100.0; - a2.a2.a3 = -101.0; - a2.a3 = 102.0; - a3.a0 = 103; - a3.a1.a0.a0 = 104; - a3.a1.a0.a1.a0.a0 = -105; - a3.a1.a0.a1.a0.a1 = 106; - a3.a1.a0.a1.a1.a0 = -107.0; - a3.a1.a0.a2 = 108; - a3.a1.a0.a3.a0.a0 = -109.0; - a3.a1.a0.a3.a1 = 110.0; - a3.a1.a0.a4 = 111; - a3.a1.a0.a5.a0.a0 = 112.0; - a3.a1.a0.a5.a1.a0 = -113.0; - a3.a1.a0.a6 = 114; - a3.a1.a1.a0.a0 = -115; - a3.a1.a1.a0.a1 = 116; - a3.a1.a1.a1.a0 = -117.0; - a3.a1.a2 = 118.0; - a3.a1.a3 = -119.0; - a3.a2.a0.a0 = 120; - a3.a2.a0.a1.a0.a0 = -121; - a3.a2.a0.a1.a0.a1 = 122; - a3.a2.a0.a1.a1.a0 = -123.0; - a3.a2.a0.a2 = 124; - a3.a2.a0.a3.a0.a0 = -125.0; - a3.a2.a0.a3.a1 = 126.0; - a3.a2.a0.a4 = 127; - a3.a2.a0.a5.a0.a0 = 128.0; - a3.a2.a0.a5.a1.a0 = -129.0; - a3.a2.a0.a6 = 130; - a3.a2.a1.a0.a0 = -131; - a3.a2.a1.a0.a1 = 132; - a3.a2.a1.a1.a0 = -133.0; - a3.a2.a2 = 134.0; - a3.a2.a3 = -135.0; - a3.a3 = 136.0; - - final result = passStructNestedIrregularEvenBiggerx4Leaf(a0, a1, a2, a3); - - print("result = $result"); - - Expect.approxEquals(1572.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); -} - -final passStruct8BytesInlineArrayIntx4Leaf = ffiTestFunctions.lookupFunction< - Int32 Function(Struct8BytesInlineArrayInt, Struct8BytesInlineArrayInt, - Struct8BytesInlineArrayInt, Struct8BytesInlineArrayInt), - int Function( - Struct8BytesInlineArrayInt, - Struct8BytesInlineArrayInt, - Struct8BytesInlineArrayInt, - Struct8BytesInlineArrayInt)>("PassStruct8BytesInlineArrayIntx4", - isLeaf: true); - -/// Simple struct with inline array. -void testPassStruct8BytesInlineArrayIntx4Leaf() { - final a0Pointer = calloc(); - final Struct8BytesInlineArrayInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct8BytesInlineArrayInt a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct8BytesInlineArrayInt a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct8BytesInlineArrayInt a3 = a3Pointer.ref; - - a0.a0[0] = 1; - a0.a0[1] = 2; - a0.a0[2] = 3; - a0.a0[3] = 4; - a0.a0[4] = 5; - a0.a0[5] = 6; - a0.a0[6] = 7; - a0.a0[7] = 8; - a1.a0[0] = 9; - a1.a0[1] = 10; - a1.a0[2] = 11; - a1.a0[3] = 12; - a1.a0[4] = 13; - a1.a0[5] = 14; - a1.a0[6] = 15; - a1.a0[7] = 16; - a2.a0[0] = 17; - a2.a0[1] = 18; - a2.a0[2] = 19; - a2.a0[3] = 20; - a2.a0[4] = 21; - a2.a0[5] = 22; - a2.a0[6] = 23; - a2.a0[7] = 24; - a3.a0[0] = 25; - a3.a0[1] = 26; - a3.a0[2] = 27; - a3.a0[3] = 28; - a3.a0[4] = 29; - a3.a0[5] = 30; - a3.a0[6] = 31; - a3.a0[7] = 32; - - final result = passStruct8BytesInlineArrayIntx4Leaf(a0, a1, a2, a3); - - print("result = $result"); - - Expect.equals(528, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); -} - -final passStructInlineArrayIrregularx4Leaf = ffiTestFunctions.lookupFunction< - Int32 Function(StructInlineArrayIrregular, StructInlineArrayIrregular, - StructInlineArrayIrregular, StructInlineArrayIrregular), - int Function( - StructInlineArrayIrregular, - StructInlineArrayIrregular, - StructInlineArrayIrregular, - StructInlineArrayIrregular)>("PassStructInlineArrayIrregularx4", - isLeaf: true); - -/// Irregular struct with inline array. -void testPassStructInlineArrayIrregularx4Leaf() { - final a0Pointer = calloc(); - final StructInlineArrayIrregular a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final StructInlineArrayIrregular a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final StructInlineArrayIrregular a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final StructInlineArrayIrregular a3 = a3Pointer.ref; - - a0.a0[0].a0 = -1; - a0.a0[0].a1 = 2; - a0.a0[1].a0 = -3; - a0.a0[1].a1 = 4; - a0.a1 = 5; - a1.a0[0].a0 = 6; - a1.a0[0].a1 = -7; - a1.a0[1].a0 = 8; - a1.a0[1].a1 = -9; - a1.a1 = 10; - a2.a0[0].a0 = -11; - a2.a0[0].a1 = 12; - a2.a0[1].a0 = -13; - a2.a0[1].a1 = 14; - a2.a1 = 15; - a3.a0[0].a0 = 16; - a3.a0[0].a1 = -17; - a3.a0[1].a0 = 18; - a3.a0[1].a1 = -19; - a3.a1 = 20; - - final result = passStructInlineArrayIrregularx4Leaf(a0, a1, a2, a3); - - print("result = $result"); - - Expect.equals(50, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); -} - -final passStructInlineArray100BytesLeaf = ffiTestFunctions.lookupFunction< - Int32 Function(StructInlineArray100Bytes), - int Function(StructInlineArray100Bytes)>( - "PassStructInlineArray100Bytes", - isLeaf: true); - -/// Regular larger struct with inline array. -void testPassStructInlineArray100BytesLeaf() { - final a0Pointer = calloc(); - final StructInlineArray100Bytes a0 = a0Pointer.ref; - - a0.a0[0] = 1; - a0.a0[1] = 2; - a0.a0[2] = 3; - a0.a0[3] = 4; - a0.a0[4] = 5; - a0.a0[5] = 6; - a0.a0[6] = 7; - a0.a0[7] = 8; - a0.a0[8] = 9; - a0.a0[9] = 10; - a0.a0[10] = 11; - a0.a0[11] = 12; - a0.a0[12] = 13; - a0.a0[13] = 14; - a0.a0[14] = 15; - a0.a0[15] = 16; - a0.a0[16] = 17; - a0.a0[17] = 18; - a0.a0[18] = 19; - a0.a0[19] = 20; - a0.a0[20] = 21; - a0.a0[21] = 22; - a0.a0[22] = 23; - a0.a0[23] = 24; - a0.a0[24] = 25; - a0.a0[25] = 26; - a0.a0[26] = 27; - a0.a0[27] = 28; - a0.a0[28] = 29; - a0.a0[29] = 30; - a0.a0[30] = 31; - a0.a0[31] = 32; - a0.a0[32] = 33; - a0.a0[33] = 34; - a0.a0[34] = 35; - a0.a0[35] = 36; - a0.a0[36] = 37; - a0.a0[37] = 38; - a0.a0[38] = 39; - a0.a0[39] = 40; - a0.a0[40] = 41; - a0.a0[41] = 42; - a0.a0[42] = 43; - a0.a0[43] = 44; - a0.a0[44] = 45; - a0.a0[45] = 46; - a0.a0[46] = 47; - a0.a0[47] = 48; - a0.a0[48] = 49; - a0.a0[49] = 50; - a0.a0[50] = 51; - a0.a0[51] = 52; - a0.a0[52] = 53; - a0.a0[53] = 54; - a0.a0[54] = 55; - a0.a0[55] = 56; - a0.a0[56] = 57; - a0.a0[57] = 58; - a0.a0[58] = 59; - a0.a0[59] = 60; - a0.a0[60] = 61; - a0.a0[61] = 62; - a0.a0[62] = 63; - a0.a0[63] = 64; - a0.a0[64] = 65; - a0.a0[65] = 66; - a0.a0[66] = 67; - a0.a0[67] = 68; - a0.a0[68] = 69; - a0.a0[69] = 70; - a0.a0[70] = 71; - a0.a0[71] = 72; - a0.a0[72] = 73; - a0.a0[73] = 74; - a0.a0[74] = 75; - a0.a0[75] = 76; - a0.a0[76] = 77; - a0.a0[77] = 78; - a0.a0[78] = 79; - a0.a0[79] = 80; - a0.a0[80] = 81; - a0.a0[81] = 82; - a0.a0[82] = 83; - a0.a0[83] = 84; - a0.a0[84] = 85; - a0.a0[85] = 86; - a0.a0[86] = 87; - a0.a0[87] = 88; - a0.a0[88] = 89; - a0.a0[89] = 90; - a0.a0[90] = 91; - a0.a0[91] = 92; - a0.a0[92] = 93; - a0.a0[93] = 94; - a0.a0[94] = 95; - a0.a0[95] = 96; - a0.a0[96] = 97; - a0.a0[97] = 98; - a0.a0[98] = 99; - a0.a0[99] = 100; - - final result = passStructInlineArray100BytesLeaf(a0); - - print("result = $result"); - - Expect.equals(5050, result); - - calloc.free(a0Pointer); -} - -final passStructStruct16BytesHomogeneousFloat2x5Leaf = - ffiTestFunctions.lookupFunction< - Float Function( - StructStruct16BytesHomogeneousFloat2, - StructStruct16BytesHomogeneousFloat2, - StructStruct16BytesHomogeneousFloat2, - StructStruct16BytesHomogeneousFloat2, - StructStruct16BytesHomogeneousFloat2), - double Function( - StructStruct16BytesHomogeneousFloat2, - StructStruct16BytesHomogeneousFloat2, - StructStruct16BytesHomogeneousFloat2, - StructStruct16BytesHomogeneousFloat2, - StructStruct16BytesHomogeneousFloat2)>( - "PassStructStruct16BytesHomogeneousFloat2x5", - isLeaf: true); - -/// Arguments in FPU registers on arm hardfp and arm64. -/// 5 struct arguments will exhaust available registers. -void testPassStructStruct16BytesHomogeneousFloat2x5Leaf() { - final a0Pointer = calloc(); - final StructStruct16BytesHomogeneousFloat2 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final StructStruct16BytesHomogeneousFloat2 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final StructStruct16BytesHomogeneousFloat2 a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final StructStruct16BytesHomogeneousFloat2 a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final StructStruct16BytesHomogeneousFloat2 a4 = a4Pointer.ref; - - a0.a0.a0 = -1.0; - a0.a1[0].a0 = 2.0; - a0.a1[1].a0 = -3.0; - a0.a2 = 4.0; - a1.a0.a0 = -5.0; - a1.a1[0].a0 = 6.0; - a1.a1[1].a0 = -7.0; - a1.a2 = 8.0; - a2.a0.a0 = -9.0; - a2.a1[0].a0 = 10.0; - a2.a1[1].a0 = -11.0; - a2.a2 = 12.0; - a3.a0.a0 = -13.0; - a3.a1[0].a0 = 14.0; - a3.a1[1].a0 = -15.0; - a3.a2 = 16.0; - a4.a0.a0 = -17.0; - a4.a1[0].a0 = 18.0; - a4.a1[1].a0 = -19.0; - a4.a2 = 20.0; - - final result = - passStructStruct16BytesHomogeneousFloat2x5Leaf(a0, a1, a2, a3, a4); - - print("result = $result"); - - Expect.approxEquals(10.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); -} - -final passStructStruct32BytesHomogeneousDouble2x5Leaf = - ffiTestFunctions.lookupFunction< - Double Function( - StructStruct32BytesHomogeneousDouble2, - StructStruct32BytesHomogeneousDouble2, - StructStruct32BytesHomogeneousDouble2, - StructStruct32BytesHomogeneousDouble2, - StructStruct32BytesHomogeneousDouble2), - double Function( - StructStruct32BytesHomogeneousDouble2, - StructStruct32BytesHomogeneousDouble2, - StructStruct32BytesHomogeneousDouble2, - StructStruct32BytesHomogeneousDouble2, - StructStruct32BytesHomogeneousDouble2)>( - "PassStructStruct32BytesHomogeneousDouble2x5", - isLeaf: true); - -/// Arguments in FPU registers on arm64. -/// 5 struct arguments will exhaust available registers. -void testPassStructStruct32BytesHomogeneousDouble2x5Leaf() { - final a0Pointer = calloc(); - final StructStruct32BytesHomogeneousDouble2 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final StructStruct32BytesHomogeneousDouble2 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final StructStruct32BytesHomogeneousDouble2 a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final StructStruct32BytesHomogeneousDouble2 a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final StructStruct32BytesHomogeneousDouble2 a4 = a4Pointer.ref; - - a0.a0.a0 = -1.0; - a0.a1[0].a0 = 2.0; - a0.a1[1].a0 = -3.0; - a0.a2 = 4.0; - a1.a0.a0 = -5.0; - a1.a1[0].a0 = 6.0; - a1.a1[1].a0 = -7.0; - a1.a2 = 8.0; - a2.a0.a0 = -9.0; - a2.a1[0].a0 = 10.0; - a2.a1[1].a0 = -11.0; - a2.a2 = 12.0; - a3.a0.a0 = -13.0; - a3.a1[0].a0 = 14.0; - a3.a1[1].a0 = -15.0; - a3.a2 = 16.0; - a4.a0.a0 = -17.0; - a4.a1[0].a0 = 18.0; - a4.a1[1].a0 = -19.0; - a4.a2 = 20.0; - - final result = - passStructStruct32BytesHomogeneousDouble2x5Leaf(a0, a1, a2, a3, a4); - - print("result = $result"); - - Expect.approxEquals(10.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); -} - -final passStructStruct16BytesMixed3x10Leaf = ffiTestFunctions.lookupFunction< - Float Function( - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3), - double Function( - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3)>("PassStructStruct16BytesMixed3x10", - isLeaf: true); - -/// On x64, arguments are split over FP and int registers. -/// On x64, it will exhaust the integer registers with the 6th argument. -/// The rest goes on the stack. -/// On arm, arguments are 4 byte aligned. -void testPassStructStruct16BytesMixed3x10Leaf() { - final a0Pointer = calloc(); - final StructStruct16BytesMixed3 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final StructStruct16BytesMixed3 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final StructStruct16BytesMixed3 a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final StructStruct16BytesMixed3 a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final StructStruct16BytesMixed3 a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final StructStruct16BytesMixed3 a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final StructStruct16BytesMixed3 a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final StructStruct16BytesMixed3 a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final StructStruct16BytesMixed3 a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final StructStruct16BytesMixed3 a9 = a9Pointer.ref; - - a0.a0.a0 = -1.0; - a0.a1[0].a0 = 2.0; - a0.a1[0].a1 = -3; - a0.a1[0].a2 = 4; - a0.a2[0] = -5; - a0.a2[1] = 6; - a1.a0.a0 = -7.0; - a1.a1[0].a0 = 8.0; - a1.a1[0].a1 = -9; - a1.a1[0].a2 = 10; - a1.a2[0] = -11; - a1.a2[1] = 12; - a2.a0.a0 = -13.0; - a2.a1[0].a0 = 14.0; - a2.a1[0].a1 = -15; - a2.a1[0].a2 = 16; - a2.a2[0] = -17; - a2.a2[1] = 18; - a3.a0.a0 = -19.0; - a3.a1[0].a0 = 20.0; - a3.a1[0].a1 = -21; - a3.a1[0].a2 = 22; - a3.a2[0] = -23; - a3.a2[1] = 24; - a4.a0.a0 = -25.0; - a4.a1[0].a0 = 26.0; - a4.a1[0].a1 = -27; - a4.a1[0].a2 = 28; - a4.a2[0] = -29; - a4.a2[1] = 30; - a5.a0.a0 = -31.0; - a5.a1[0].a0 = 32.0; - a5.a1[0].a1 = -33; - a5.a1[0].a2 = 34; - a5.a2[0] = -35; - a5.a2[1] = 36; - a6.a0.a0 = -37.0; - a6.a1[0].a0 = 38.0; - a6.a1[0].a1 = -39; - a6.a1[0].a2 = 40; - a6.a2[0] = -41; - a6.a2[1] = 42; - a7.a0.a0 = -43.0; - a7.a1[0].a0 = 44.0; - a7.a1[0].a1 = -45; - a7.a1[0].a2 = 46; - a7.a2[0] = -47; - a7.a2[1] = 48; - a8.a0.a0 = -49.0; - a8.a1[0].a0 = 50.0; - a8.a1[0].a1 = -51; - a8.a1[0].a2 = 52; - a8.a2[0] = -53; - a8.a2[1] = 54; - a9.a0.a0 = -55.0; - a9.a1[0].a0 = 56.0; - a9.a1[0].a1 = -57; - a9.a1[0].a2 = 58; - a9.a2[0] = -59; - a9.a2[1] = 60; - - final result = passStructStruct16BytesMixed3x10Leaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(30.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passUint8Struct32BytesInlineArrayMultiDimensionalILeaf = - ffiTestFunctions.lookupFunction< - Uint32 Function( - Uint8, - Struct32BytesInlineArrayMultiDimensionalInt, - Uint8, - Struct8BytesInlineArrayMultiDimensionalInt, - Uint8, - Struct8BytesInlineArrayMultiDimensionalInt, - Uint8), - int Function( - int, - Struct32BytesInlineArrayMultiDimensionalInt, - int, - Struct8BytesInlineArrayMultiDimensionalInt, - int, - Struct8BytesInlineArrayMultiDimensionalInt, - int)>("PassUint8Struct32BytesInlineArrayMultiDimensionalI", - isLeaf: true); - -/// Test multi dimensional inline array struct as argument. -void testPassUint8Struct32BytesInlineArrayMultiDimensionalILeaf() { - int a0; - final a1Pointer = calloc(); - final Struct32BytesInlineArrayMultiDimensionalInt a1 = a1Pointer.ref; - int a2; - final a3Pointer = calloc(); - final Struct8BytesInlineArrayMultiDimensionalInt a3 = a3Pointer.ref; - int a4; - final a5Pointer = calloc(); - final Struct8BytesInlineArrayMultiDimensionalInt a5 = a5Pointer.ref; - int a6; - - a0 = 1; - a1.a0[0][0][0][0][0] = 2; - a1.a0[0][0][0][0][1] = 3; - a1.a0[0][0][0][1][0] = 4; - a1.a0[0][0][0][1][1] = 5; - a1.a0[0][0][1][0][0] = 6; - a1.a0[0][0][1][0][1] = 7; - a1.a0[0][0][1][1][0] = 8; - a1.a0[0][0][1][1][1] = 9; - a1.a0[0][1][0][0][0] = 10; - a1.a0[0][1][0][0][1] = 11; - a1.a0[0][1][0][1][0] = 12; - a1.a0[0][1][0][1][1] = 13; - a1.a0[0][1][1][0][0] = 14; - a1.a0[0][1][1][0][1] = 15; - a1.a0[0][1][1][1][0] = 16; - a1.a0[0][1][1][1][1] = 17; - a1.a0[1][0][0][0][0] = 18; - a1.a0[1][0][0][0][1] = 19; - a1.a0[1][0][0][1][0] = 20; - a1.a0[1][0][0][1][1] = 21; - a1.a0[1][0][1][0][0] = 22; - a1.a0[1][0][1][0][1] = 23; - a1.a0[1][0][1][1][0] = 24; - a1.a0[1][0][1][1][1] = 25; - a1.a0[1][1][0][0][0] = 26; - a1.a0[1][1][0][0][1] = 27; - a1.a0[1][1][0][1][0] = 28; - a1.a0[1][1][0][1][1] = 29; - a1.a0[1][1][1][0][0] = 30; - a1.a0[1][1][1][0][1] = 31; - a1.a0[1][1][1][1][0] = 32; - a1.a0[1][1][1][1][1] = 33; - a2 = 34; - a3.a0[0][0][0] = 35; - a3.a0[0][0][1] = 36; - a3.a0[0][1][0] = 37; - a3.a0[0][1][1] = 38; - a3.a0[1][0][0] = 39; - a3.a0[1][0][1] = 40; - a3.a0[1][1][0] = 41; - a3.a0[1][1][1] = 42; - a4 = 43; - a5.a0[0][0][0] = 44; - a5.a0[0][0][1] = 45; - a5.a0[0][1][0] = 46; - a5.a0[0][1][1] = 47; - a5.a0[1][0][0] = 48; - a5.a0[1][0][1] = 49; - a5.a0[1][1][0] = 50; - a5.a0[1][1][1] = 51; - a6 = 52; - - final result = passUint8Struct32BytesInlineArrayMultiDimensionalILeaf( - a0, a1, a2, a3, a4, a5, a6); - - print("result = $result"); - - Expect.equals(1378, result); - - calloc.free(a1Pointer); - calloc.free(a3Pointer); - calloc.free(a5Pointer); -} - -final passUint8Struct4BytesInlineArrayMultiDimensionalInLeaf = - ffiTestFunctions.lookupFunction< - Uint32 Function( - Uint8, Struct4BytesInlineArrayMultiDimensionalInt, Uint8), - int Function(int, Struct4BytesInlineArrayMultiDimensionalInt, int)>( - "PassUint8Struct4BytesInlineArrayMultiDimensionalIn", - isLeaf: true); - -/// Test struct in multi dimensional inline array. -void testPassUint8Struct4BytesInlineArrayMultiDimensionalInLeaf() { - int a0; - final a1Pointer = calloc(); - final Struct4BytesInlineArrayMultiDimensionalInt a1 = a1Pointer.ref; - int a2; - - a0 = 1; - a1.a0[0][0].a0 = 2; - a1.a0[0][1].a0 = -3; - a1.a0[1][0].a0 = 4; - a1.a0[1][1].a0 = -5; - a2 = 6; - - final result = - passUint8Struct4BytesInlineArrayMultiDimensionalInLeaf(a0, a1, a2); - - print("result = $result"); - - Expect.equals(5, result); - - calloc.free(a1Pointer); -} - -final passStruct3BytesPackedIntx10Leaf = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt), - int Function( - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt)>("PassStruct3BytesPackedIntx10", isLeaf: true); - -/// Small struct with mis-aligned member. -void testPassStruct3BytesPackedIntx10Leaf() { - final a0Pointer = calloc(); - final Struct3BytesPackedInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct3BytesPackedInt a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct3BytesPackedInt a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct3BytesPackedInt a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct3BytesPackedInt a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct3BytesPackedInt a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct3BytesPackedInt a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct3BytesPackedInt a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct3BytesPackedInt a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct3BytesPackedInt a9 = a9Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a1.a0 = -3; - a1.a1 = 4; - a2.a0 = -5; - a2.a1 = 6; - a3.a0 = -7; - a3.a1 = 8; - a4.a0 = -9; - a4.a1 = 10; - a5.a0 = -11; - a5.a1 = 12; - a6.a0 = -13; - a6.a1 = 14; - a7.a0 = -15; - a7.a1 = 16; - a8.a0 = -17; - a8.a1 = 18; - a9.a0 = -19; - a9.a1 = 20; - - final result = - passStruct3BytesPackedIntx10Leaf(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(10, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct8BytesPackedIntx10Leaf = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt), - int Function( - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt)>("PassStruct8BytesPackedIntx10", isLeaf: true); - -/// Struct with mis-aligned member. -void testPassStruct8BytesPackedIntx10Leaf() { - final a0Pointer = calloc(); - final Struct8BytesPackedInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct8BytesPackedInt a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct8BytesPackedInt a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct8BytesPackedInt a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct8BytesPackedInt a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct8BytesPackedInt a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct8BytesPackedInt a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct8BytesPackedInt a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct8BytesPackedInt a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct8BytesPackedInt a9 = a9Pointer.ref; - - a0.a0 = 1; - a0.a1 = 2; - a0.a2 = 3; - a0.a3 = 4; - a0.a4 = 5; - a1.a0 = 6; - a1.a1 = 7; - a1.a2 = 8; - a1.a3 = 9; - a1.a4 = 10; - a2.a0 = 11; - a2.a1 = 12; - a2.a2 = 13; - a2.a3 = 14; - a2.a4 = 15; - a3.a0 = 16; - a3.a1 = 17; - a3.a2 = 18; - a3.a3 = 19; - a3.a4 = 20; - a4.a0 = 21; - a4.a1 = 22; - a4.a2 = 23; - a4.a3 = 24; - a4.a4 = 25; - a5.a0 = 26; - a5.a1 = 27; - a5.a2 = 28; - a5.a3 = 29; - a5.a4 = 30; - a6.a0 = 31; - a6.a1 = 32; - a6.a2 = 33; - a6.a3 = 34; - a6.a4 = 35; - a7.a0 = 36; - a7.a1 = 37; - a7.a2 = 38; - a7.a3 = 39; - a7.a4 = 40; - a8.a0 = 41; - a8.a1 = 42; - a8.a2 = 43; - a8.a3 = 44; - a8.a4 = 45; - a9.a0 = 46; - a9.a1 = 47; - a9.a2 = 48; - a9.a3 = 49; - a9.a4 = 50; - - final result = - passStruct8BytesPackedIntx10Leaf(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(1275, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct9BytesPackedMixedx10DoubleInt32x2Leaf = - ffiTestFunctions.lookupFunction< - Double Function( - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Double, - Int32, - Int32), - double Function( - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - double, - int, - int)>("PassStruct9BytesPackedMixedx10DoubleInt32x2", isLeaf: true); - -/// Struct with mis-aligned member. -/// Tests backfilling of CPU and FPU registers. -void testPassStruct9BytesPackedMixedx10DoubleInt32x2Leaf() { - final a0Pointer = calloc(); - final Struct9BytesPackedMixed a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct9BytesPackedMixed a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct9BytesPackedMixed a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct9BytesPackedMixed a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct9BytesPackedMixed a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct9BytesPackedMixed a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct9BytesPackedMixed a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct9BytesPackedMixed a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct9BytesPackedMixed a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct9BytesPackedMixed a9 = a9Pointer.ref; - double a10; - int a11; - int a12; - - a0.a0 = 1; - a0.a1 = 2.0; - a1.a0 = 3; - a1.a1 = 4.0; - a2.a0 = 5; - a2.a1 = 6.0; - a3.a0 = 7; - a3.a1 = 8.0; - a4.a0 = 9; - a4.a1 = 10.0; - a5.a0 = 11; - a5.a1 = 12.0; - a6.a0 = 13; - a6.a1 = 14.0; - a7.a0 = 15; - a7.a1 = 16.0; - a8.a0 = 17; - a8.a1 = 18.0; - a9.a0 = 19; - a9.a1 = 20.0; - a10 = -21.0; - a11 = 22; - a12 = -23; - - final result = passStruct9BytesPackedMixedx10DoubleInt32x2Leaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); - - print("result = $result"); - - Expect.approxEquals(188.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct5BytesPackedMixedLeaf = ffiTestFunctions.lookupFunction< - Double Function(Struct5BytesPackedMixed), - double Function( - Struct5BytesPackedMixed)>("PassStruct5BytesPackedMixed", isLeaf: true); - -/// This packed struct happens to have only aligned members. -void testPassStruct5BytesPackedMixedLeaf() { - final a0Pointer = calloc(); - final Struct5BytesPackedMixed a0 = a0Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2; - - final result = passStruct5BytesPackedMixedLeaf(a0); - - print("result = $result"); - - Expect.approxEquals(1.0, result); - - calloc.free(a0Pointer); -} - -final passStructNestedAlignmentStruct5BytesPackedMixedLeaf = - ffiTestFunctions.lookupFunction< - Double Function(StructNestedAlignmentStruct5BytesPackedMixed), - double Function(StructNestedAlignmentStruct5BytesPackedMixed)>( - "PassStructNestedAlignmentStruct5BytesPackedMixed", - isLeaf: true); - -/// Check alignment of packed struct in non-packed struct. -void testPassStructNestedAlignmentStruct5BytesPackedMixedLeaf() { - final a0Pointer = calloc(); - final StructNestedAlignmentStruct5BytesPackedMixed a0 = a0Pointer.ref; - - a0.a0 = 1; - a0.a1.a0 = 2.0; - a0.a1.a1 = 3; - - final result = passStructNestedAlignmentStruct5BytesPackedMixedLeaf(a0); - - print("result = $result"); - - Expect.approxEquals(6.0, result); - - calloc.free(a0Pointer); -} - -final passStruct6BytesInlineArrayIntLeaf = ffiTestFunctions.lookupFunction< - Double Function(Struct6BytesInlineArrayInt), - double Function(Struct6BytesInlineArrayInt)>( - "PassStruct6BytesInlineArrayInt", - isLeaf: true); - -/// Check alignment of packed struct array in non-packed struct. -void testPassStruct6BytesInlineArrayIntLeaf() { - final a0Pointer = calloc(); - final Struct6BytesInlineArrayInt a0 = a0Pointer.ref; - - a0.a0[0].a0 = -1; - a0.a0[0].a1 = 2; - a0.a0[1].a0 = -3; - a0.a0[1].a1 = 4; - - final result = passStruct6BytesInlineArrayIntLeaf(a0); - - print("result = $result"); - - Expect.approxEquals(2.0, result); - - calloc.free(a0Pointer); -} - -final passStruct15BytesInlineArrayMixedLeaf = ffiTestFunctions.lookupFunction< - Double Function(Struct15BytesInlineArrayMixed), - double Function(Struct15BytesInlineArrayMixed)>( - "PassStruct15BytesInlineArrayMixed", - isLeaf: true); - -/// Check alignment of packed struct array in non-packed struct. -void testPassStruct15BytesInlineArrayMixedLeaf() { - final a0Pointer = calloc(); - final Struct15BytesInlineArrayMixed a0 = a0Pointer.ref; - - a0.a0[0].a0 = -1.0; - a0.a0[0].a1 = 2; - a0.a0[1].a0 = -3.0; - a0.a0[1].a1 = 4; - a0.a0[2].a0 = -5.0; - a0.a0[2].a1 = 6; - - final result = passStruct15BytesInlineArrayMixedLeaf(a0); - - print("result = $result"); - - Expect.approxEquals(3.0, result); - - calloc.free(a0Pointer); -} - -final passUnion4BytesMixedx10Leaf = ffiTestFunctions.lookupFunction< - Double Function( - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed), - double Function( - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed)>("PassUnion4BytesMixedx10", isLeaf: true); - -/// Check placement of mixed integer/float union. -void testPassUnion4BytesMixedx10Leaf() { - final a0Pointer = calloc(); - final Union4BytesMixed a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Union4BytesMixed a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Union4BytesMixed a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Union4BytesMixed a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Union4BytesMixed a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Union4BytesMixed a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Union4BytesMixed a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Union4BytesMixed a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Union4BytesMixed a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Union4BytesMixed a9 = a9Pointer.ref; - - a0.a0 = 1; - a1.a0 = 2; - a2.a0 = 3; - a3.a0 = 4; - a4.a0 = 5; - a5.a0 = 6; - a6.a0 = 7; - a7.a0 = 8; - a8.a0 = 9; - a9.a0 = 10; - - final result = - passUnion4BytesMixedx10Leaf(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(55.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passUnion8BytesNestedFloatx10Leaf = ffiTestFunctions.lookupFunction< - Double Function( - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat), - double Function( - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat)>("PassUnion8BytesNestedFloatx10", isLeaf: true); - -/// Check placement of mixed floats union. -void testPassUnion8BytesNestedFloatx10Leaf() { - final a0Pointer = calloc(); - final Union8BytesNestedFloat a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Union8BytesNestedFloat a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Union8BytesNestedFloat a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Union8BytesNestedFloat a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Union8BytesNestedFloat a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Union8BytesNestedFloat a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Union8BytesNestedFloat a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Union8BytesNestedFloat a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Union8BytesNestedFloat a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Union8BytesNestedFloat a9 = a9Pointer.ref; - - a0.a0 = -1.0; - a1.a0 = 2.0; - a2.a0 = -3.0; - a3.a0 = 4.0; - a4.a0 = -5.0; - a5.a0 = 6.0; - a6.a0 = -7.0; - a7.a0 = 8.0; - a8.a0 = -9.0; - a9.a0 = 10.0; - - final result = - passUnion8BytesNestedFloatx10Leaf(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(5.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passUnion9BytesNestedIntx10Leaf = ffiTestFunctions.lookupFunction< - Double Function( - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt), - double Function( - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt)>("PassUnion9BytesNestedIntx10", isLeaf: true); - -/// Mixed-size union argument. -void testPassUnion9BytesNestedIntx10Leaf() { - final a0Pointer = calloc(); - final Union9BytesNestedInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Union9BytesNestedInt a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Union9BytesNestedInt a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Union9BytesNestedInt a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Union9BytesNestedInt a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Union9BytesNestedInt a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Union9BytesNestedInt a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Union9BytesNestedInt a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Union9BytesNestedInt a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Union9BytesNestedInt a9 = a9Pointer.ref; - - a0.a0.a0 = -1; - a0.a0.a1 = 2; - a0.a0.a2 = -3; - a1.a0.a0 = 4; - a1.a0.a1 = -5; - a1.a0.a2 = 6; - a2.a0.a0 = -7; - a2.a0.a1 = 8; - a2.a0.a2 = -9; - a3.a0.a0 = 10; - a3.a0.a1 = -11; - a3.a0.a2 = 12; - a4.a0.a0 = -13; - a4.a0.a1 = 14; - a4.a0.a2 = -15; - a5.a0.a0 = 16; - a5.a0.a1 = -17; - a5.a0.a2 = 18; - a6.a0.a0 = -19; - a6.a0.a1 = 20; - a6.a0.a2 = -21; - a7.a0.a0 = 22; - a7.a0.a1 = -23; - a7.a0.a2 = 24; - a8.a0.a0 = -25; - a8.a0.a1 = 26; - a8.a0.a2 = -27; - a9.a0.a0 = 28; - a9.a0.a1 = -29; - a9.a0.a2 = 30; - - final result = - passUnion9BytesNestedIntx10Leaf(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(15.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passUnion16BytesNestedInlineArrayFloatx10Leaf = - ffiTestFunctions.lookupFunction< - Double Function( - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat), - double Function( - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat)>( - "PassUnion16BytesNestedInlineArrayFloatx10", - isLeaf: true); - -/// Union with homogenous floats. -void testPassUnion16BytesNestedInlineArrayFloatx10Leaf() { - final a0Pointer = calloc(); - final Union16BytesNestedInlineArrayFloat a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Union16BytesNestedInlineArrayFloat a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Union16BytesNestedInlineArrayFloat a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Union16BytesNestedInlineArrayFloat a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Union16BytesNestedInlineArrayFloat a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Union16BytesNestedInlineArrayFloat a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Union16BytesNestedInlineArrayFloat a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Union16BytesNestedInlineArrayFloat a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Union16BytesNestedInlineArrayFloat a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Union16BytesNestedInlineArrayFloat a9 = a9Pointer.ref; - - a0.a0[0] = -1.0; - a0.a0[1] = 2.0; - a0.a0[2] = -3.0; - a0.a0[3] = 4.0; - a1.a0[0] = -5.0; - a1.a0[1] = 6.0; - a1.a0[2] = -7.0; - a1.a0[3] = 8.0; - a2.a0[0] = -9.0; - a2.a0[1] = 10.0; - a2.a0[2] = -11.0; - a2.a0[3] = 12.0; - a3.a0[0] = -13.0; - a3.a0[1] = 14.0; - a3.a0[2] = -15.0; - a3.a0[3] = 16.0; - a4.a0[0] = -17.0; - a4.a0[1] = 18.0; - a4.a0[2] = -19.0; - a4.a0[3] = 20.0; - a5.a0[0] = -21.0; - a5.a0[1] = 22.0; - a5.a0[2] = -23.0; - a5.a0[3] = 24.0; - a6.a0[0] = -25.0; - a6.a0[1] = 26.0; - a6.a0[2] = -27.0; - a6.a0[3] = 28.0; - a7.a0[0] = -29.0; - a7.a0[1] = 30.0; - a7.a0[2] = -31.0; - a7.a0[3] = 32.0; - a8.a0[0] = -33.0; - a8.a0[1] = 34.0; - a8.a0[2] = -35.0; - a8.a0[3] = 36.0; - a9.a0[0] = -37.0; - a9.a0[1] = 38.0; - a9.a0[2] = -39.0; - a9.a0[3] = 40.0; - - final result = passUnion16BytesNestedInlineArrayFloatx10Leaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(20.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passUnion16BytesNestedFloatx10Leaf = ffiTestFunctions.lookupFunction< - Double Function( - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat), - double Function( - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat)>("PassUnion16BytesNestedFloatx10", - isLeaf: true); - -/// Union with homogenous floats. -void testPassUnion16BytesNestedFloatx10Leaf() { - final a0Pointer = calloc(); - final Union16BytesNestedFloat a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Union16BytesNestedFloat a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Union16BytesNestedFloat a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Union16BytesNestedFloat a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Union16BytesNestedFloat a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Union16BytesNestedFloat a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Union16BytesNestedFloat a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Union16BytesNestedFloat a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Union16BytesNestedFloat a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Union16BytesNestedFloat a9 = a9Pointer.ref; - - a0.a0.a0 = -1.0; - a0.a0.a1 = 2.0; - a1.a0.a0 = -3.0; - a1.a0.a1 = 4.0; - a2.a0.a0 = -5.0; - a2.a0.a1 = 6.0; - a3.a0.a0 = -7.0; - a3.a0.a1 = 8.0; - a4.a0.a0 = -9.0; - a4.a0.a1 = 10.0; - a5.a0.a0 = -11.0; - a5.a0.a1 = 12.0; - a6.a0.a0 = -13.0; - a6.a0.a1 = 14.0; - a7.a0.a0 = -15.0; - a7.a0.a1 = 16.0; - a8.a0.a0 = -17.0; - a8.a0.a1 = 18.0; - a9.a0.a0 = -19.0; - a9.a0.a1 = 20.0; - - final result = passUnion16BytesNestedFloatx10Leaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(10.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passUint8Boolx9Struct10BytesHomogeneousBoolBoolLeaf = - ffiTestFunctions - .lookupFunction< - Int32 Function(Uint8, Bool, Bool, Bool, Bool, Bool, Bool, Bool, - Bool, Bool, Struct10BytesHomogeneousBool, Bool), - int Function( - int, - bool, - bool, - bool, - bool, - bool, - bool, - bool, - bool, - bool, - Struct10BytesHomogeneousBool, - bool)>("PassUint8Boolx9Struct10BytesHomogeneousBoolBool", - isLeaf: true); - -/// Passing bools and a struct with bools. -/// Exhausts the registers to test bools and the bool struct alignment on the -/// stack. -void testPassUint8Boolx9Struct10BytesHomogeneousBoolBoolLeaf() { - int a0; - bool a1; - bool a2; - bool a3; - bool a4; - bool a5; - bool a6; - bool a7; - bool a8; - bool a9; - final a10Pointer = calloc(); - final Struct10BytesHomogeneousBool a10 = a10Pointer.ref; - bool a11; - - a0 = 1; - a1 = false; - a2 = true; - a3 = false; - a4 = true; - a5 = false; - a6 = true; - a7 = false; - a8 = true; - a9 = false; - a10.a0 = true; - a10.a1 = false; - a10.a2 = true; - a10.a3 = false; - a10.a4 = true; - a10.a5 = false; - a10.a6 = true; - a10.a7 = false; - a10.a8 = true; - a10.a9 = false; - a11 = true; - - final result = passUint8Boolx9Struct10BytesHomogeneousBoolBoolLeaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); - - print("result = $result"); - - Expect.equals(11, result); - - calloc.free(a10Pointer); -} - -final passUint8Boolx9Struct10BytesInlineArrayBoolBoolLeaf = - ffiTestFunctions - .lookupFunction< - Int32 Function(Uint8, Bool, Bool, Bool, Bool, Bool, Bool, Bool, - Bool, Bool, Struct10BytesInlineArrayBool, Bool), - int Function( - int, - bool, - bool, - bool, - bool, - bool, - bool, - bool, - bool, - bool, - Struct10BytesInlineArrayBool, - bool)>("PassUint8Boolx9Struct10BytesInlineArrayBoolBool", - isLeaf: true); - -/// Passing bools and a struct with bools. -/// Exhausts the registers to test bools and the bool struct alignment on the -/// stack. -void testPassUint8Boolx9Struct10BytesInlineArrayBoolBoolLeaf() { - int a0; - bool a1; - bool a2; - bool a3; - bool a4; - bool a5; - bool a6; - bool a7; - bool a8; - bool a9; - final a10Pointer = calloc(); - final Struct10BytesInlineArrayBool a10 = a10Pointer.ref; - bool a11; - - a0 = 1; - a1 = false; - a2 = true; - a3 = false; - a4 = true; - a5 = false; - a6 = true; - a7 = false; - a8 = true; - a9 = false; - a10.a0[0] = true; - a10.a0[1] = false; - a10.a0[2] = true; - a10.a0[3] = false; - a10.a0[4] = true; - a10.a0[5] = false; - a10.a0[6] = true; - a10.a0[7] = false; - a10.a0[8] = true; - a10.a0[9] = false; - a11 = true; - - final result = passUint8Boolx9Struct10BytesInlineArrayBoolBoolLeaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); - - print("result = $result"); - - Expect.equals(11, result); - - calloc.free(a10Pointer); -} - -final passUint8Struct1ByteBoolLeaf = ffiTestFunctions.lookupFunction< - Bool Function(Uint8, Struct1ByteBool), - bool Function( - int, Struct1ByteBool)>("PassUint8Struct1ByteBool", isLeaf: true); - -/// Returning a bool. -void testPassUint8Struct1ByteBoolLeaf() { - int a0; - final a1Pointer = calloc(); - final Struct1ByteBool a1 = a1Pointer.ref; - - a0 = 1; - a1.a0 = false; - - final result = passUint8Struct1ByteBoolLeaf(a0, a1); - - print("result = $result"); - - Expect.equals(1 % 2 != 0, result); - - calloc.free(a1Pointer); -} - -final passWCharStructInlineArrayIntUintPtrx2LongUnsignedLeaf = ffiTestFunctions - .lookupFunction< - WChar Function(WChar, StructInlineArrayInt, UintPtr, UintPtr, Long, - UnsignedLong), - int Function(int, StructInlineArrayInt, int, int, int, int)>( - "PassWCharStructInlineArrayIntUintPtrx2LongUnsigned", - isLeaf: true); - -/// Returning a wchar. -void testPassWCharStructInlineArrayIntUintPtrx2LongUnsignedLeaf() { - int a0; - final a1Pointer = calloc(); - final StructInlineArrayInt a1 = a1Pointer.ref; - int a2; - int a3; - int a4; - int a5; - - a0 = 1; - a1.a0[0] = 2; - a1.a0[1] = 3; - a1.a0[2] = 4; - a1.a0[3] = 5; - a1.a0[4] = 6; - a1.a0[5] = 7; - a1.a0[6] = 8; - a1.a0[7] = 9; - a1.a0[8] = 10; - a1.a0[9] = 11; - a2 = 12; - a3 = 13; - a4 = 14; - a5 = 15; - - final result = passWCharStructInlineArrayIntUintPtrx2LongUnsignedLeaf( - a0, a1, a2, a3, a4, a5); - - print("result = $result"); - - Expect.equals(120, result); - - calloc.free(a1Pointer); -} - -final passInt64x7Struct12BytesHomogeneousInt32Leaf = - ffiTestFunctions.lookupFunction< - Int64 Function(Int64, Int64, Int64, Int64, Int64, Int64, Int64, - Struct12BytesHomogeneousInt32), - int Function(int, int, int, int, int, int, int, - Struct12BytesHomogeneousInt32)>( - "PassInt64x7Struct12BytesHomogeneousInt32", - isLeaf: true); - -/// Struct stradles last argument register -void testPassInt64x7Struct12BytesHomogeneousInt32Leaf() { - int a0; - int a1; - int a2; - int a3; - int a4; - int a5; - int a6; - final a7Pointer = calloc(); - final Struct12BytesHomogeneousInt32 a7 = a7Pointer.ref; - - a0 = -1; - a1 = 2; - a2 = -3; - a3 = 4; - a4 = -5; - a5 = 6; - a6 = -7; - a7.a0 = 8; - a7.a1 = -9; - a7.a2 = 10; - - final result = passInt64x7Struct12BytesHomogeneousInt32Leaf( - a0, a1, a2, a3, a4, a5, a6, a7); - - print("result = $result"); - - Expect.equals(5, result); - - calloc.free(a7Pointer); -} diff --git a/tests/ffi_2/function_structs_by_value_generated_args_test.dart b/tests/ffi_2/function_structs_by_value_generated_args_test.dart deleted file mode 100644 index 999ea7ddaa4..00000000000 --- a/tests/ffi_2/function_structs_by_value_generated_args_test.dart +++ /dev/null @@ -1,5423 +0,0 @@ -// 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. -// -// This file has been automatically generated. Please do not edit it manually. -// Generated by tests/ffi/generator/structs_by_value_tests_generator.dart. -// -// SharedObjects=ffi_test_functions -// VMOptions= -// VMOptions=--deterministic --optimization-counter-threshold=90 -// VMOptions=--use-slow-path -// VMOptions=--use-slow-path --stacktrace-every=100 - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; -import "package:ffi/ffi.dart"; - -import 'dylib_utils.dart'; - -// Reuse the compound classes. -import 'function_structs_by_value_generated_compounds.dart'; - -final ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); -void main() { - for (int i = 0; i < 100; ++i) { - testPassStruct1ByteIntx10(); - testPassStruct3BytesHomogeneousUint8x10(); - testPassStruct3BytesInt2ByteAlignedx10(); - testPassStruct4BytesHomogeneousInt16x10(); - testPassStruct7BytesHomogeneousUint8x10(); - testPassStruct7BytesInt4ByteAlignedx10(); - testPassStruct8BytesIntx10(); - testPassStruct8BytesHomogeneousFloatx10(); - testPassStruct8BytesMixedx10(); - testPassStruct9BytesHomogeneousUint8x10(); - testPassStruct9BytesInt4Or8ByteAlignedx10(); - testPassStruct12BytesHomogeneousFloatx6(); - testPassStruct16BytesHomogeneousFloatx5(); - testPassStruct16BytesMixedx10(); - testPassStruct16BytesMixed2x10(); - testPassStruct17BytesIntx10(); - testPassStruct19BytesHomogeneousUint8x10(); - testPassStruct20BytesHomogeneousInt32x10(); - testPassStruct20BytesHomogeneousFloat(); - testPassStruct32BytesHomogeneousDoublex5(); - testPassStruct40BytesHomogeneousDouble(); - testPassStruct1024BytesHomogeneousUint64(); - testPassFloatStruct16BytesHomogeneousFloatFloatStruct1(); - testPassFloatStruct32BytesHomogeneousDoubleFloatStruct(); - testPassInt8Struct16BytesMixedInt8Struct16BytesMixedIn(); - testPassDoublex6Struct16BytesMixedx4Int32(); - testPassInt32x4Struct16BytesMixedx4Double(); - testPassStruct40BytesHomogeneousDoubleStruct4BytesHomo(); - testPassInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int(); - testPassStructAlignmentInt16(); - testPassStructAlignmentInt32(); - testPassStructAlignmentInt64(); - testPassStruct8BytesNestedIntx10(); - testPassStruct8BytesNestedFloatx10(); - testPassStruct8BytesNestedFloat2x10(); - testPassStruct8BytesNestedMixedx10(); - testPassStruct16BytesNestedIntx2(); - testPassStruct32BytesNestedIntx2(); - testPassStructNestedIntStructAlignmentInt16(); - testPassStructNestedIntStructAlignmentInt32(); - testPassStructNestedIntStructAlignmentInt64(); - testPassStructNestedIrregularEvenBiggerx4(); - testPassStruct8BytesInlineArrayIntx4(); - testPassStructInlineArrayIrregularx4(); - testPassStructInlineArray100Bytes(); - testPassStructStruct16BytesHomogeneousFloat2x5(); - testPassStructStruct32BytesHomogeneousDouble2x5(); - testPassStructStruct16BytesMixed3x10(); - testPassUint8Struct32BytesInlineArrayMultiDimensionalI(); - testPassUint8Struct4BytesInlineArrayMultiDimensionalIn(); - testPassStruct3BytesPackedIntx10(); - testPassStruct8BytesPackedIntx10(); - testPassStruct9BytesPackedMixedx10DoubleInt32x2(); - testPassStruct5BytesPackedMixed(); - testPassStructNestedAlignmentStruct5BytesPackedMixed(); - testPassStruct6BytesInlineArrayInt(); - testPassStruct15BytesInlineArrayMixed(); - testPassUnion4BytesMixedx10(); - testPassUnion8BytesNestedFloatx10(); - testPassUnion9BytesNestedIntx10(); - testPassUnion16BytesNestedInlineArrayFloatx10(); - testPassUnion16BytesNestedFloatx10(); - testPassUint8Boolx9Struct10BytesHomogeneousBoolBool(); - testPassUint8Boolx9Struct10BytesInlineArrayBoolBool(); - testPassUint8Struct1ByteBool(); - testPassWCharStructInlineArrayIntUintPtrx2LongUnsigned(); - testPassInt64x7Struct12BytesHomogeneousInt32(); - } -} - -final passStruct1ByteIntx10 = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt), - int Function( - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt, - Struct1ByteInt)>("PassStruct1ByteIntx10"); - -/// Smallest struct with data. -/// 10 struct arguments will exhaust available registers. -void testPassStruct1ByteIntx10() { - final a0Pointer = calloc(); - final Struct1ByteInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct1ByteInt a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct1ByteInt a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct1ByteInt a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct1ByteInt a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct1ByteInt a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct1ByteInt a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct1ByteInt a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct1ByteInt a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct1ByteInt a9 = a9Pointer.ref; - - a0.a0 = -1; - a1.a0 = 2; - a2.a0 = -3; - a3.a0 = 4; - a4.a0 = -5; - a5.a0 = 6; - a6.a0 = -7; - a7.a0 = 8; - a8.a0 = -9; - a9.a0 = 10; - - final result = passStruct1ByteIntx10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(5, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct3BytesHomogeneousUint8x10 = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8), - int Function( - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8, - Struct3BytesHomogeneousUint8)>("PassStruct3BytesHomogeneousUint8x10"); - -/// Not a multiple of word size, not a power of two. -/// 10 struct arguments will exhaust available registers. -void testPassStruct3BytesHomogeneousUint8x10() { - final a0Pointer = calloc(); - final Struct3BytesHomogeneousUint8 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct3BytesHomogeneousUint8 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct3BytesHomogeneousUint8 a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct3BytesHomogeneousUint8 a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct3BytesHomogeneousUint8 a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct3BytesHomogeneousUint8 a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct3BytesHomogeneousUint8 a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct3BytesHomogeneousUint8 a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct3BytesHomogeneousUint8 a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct3BytesHomogeneousUint8 a9 = a9Pointer.ref; - - a0.a0 = 1; - a0.a1 = 2; - a0.a2 = 3; - a1.a0 = 4; - a1.a1 = 5; - a1.a2 = 6; - a2.a0 = 7; - a2.a1 = 8; - a2.a2 = 9; - a3.a0 = 10; - a3.a1 = 11; - a3.a2 = 12; - a4.a0 = 13; - a4.a1 = 14; - a4.a2 = 15; - a5.a0 = 16; - a5.a1 = 17; - a5.a2 = 18; - a6.a0 = 19; - a6.a1 = 20; - a6.a2 = 21; - a7.a0 = 22; - a7.a1 = 23; - a7.a2 = 24; - a8.a0 = 25; - a8.a1 = 26; - a8.a2 = 27; - a9.a0 = 28; - a9.a1 = 29; - a9.a2 = 30; - - final result = passStruct3BytesHomogeneousUint8x10( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(465, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct3BytesInt2ByteAlignedx10 = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned), - int Function( - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned, - Struct3BytesInt2ByteAligned)>("PassStruct3BytesInt2ByteAlignedx10"); - -/// Not a multiple of word size, not a power of two. -/// With alignment rules taken into account size is 4 bytes. -/// 10 struct arguments will exhaust available registers. -void testPassStruct3BytesInt2ByteAlignedx10() { - final a0Pointer = calloc(); - final Struct3BytesInt2ByteAligned a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct3BytesInt2ByteAligned a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct3BytesInt2ByteAligned a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct3BytesInt2ByteAligned a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct3BytesInt2ByteAligned a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct3BytesInt2ByteAligned a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct3BytesInt2ByteAligned a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct3BytesInt2ByteAligned a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct3BytesInt2ByteAligned a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct3BytesInt2ByteAligned a9 = a9Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a1.a0 = -3; - a1.a1 = 4; - a2.a0 = -5; - a2.a1 = 6; - a3.a0 = -7; - a3.a1 = 8; - a4.a0 = -9; - a4.a1 = 10; - a5.a0 = -11; - a5.a1 = 12; - a6.a0 = -13; - a6.a1 = 14; - a7.a0 = -15; - a7.a1 = 16; - a8.a0 = -17; - a8.a1 = 18; - a9.a0 = -19; - a9.a1 = 20; - - final result = passStruct3BytesInt2ByteAlignedx10( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(10, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct4BytesHomogeneousInt16x10 = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16), - int Function( - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16)>("PassStruct4BytesHomogeneousInt16x10"); - -/// Exactly word size on 32-bit architectures. -/// 10 struct arguments will exhaust available registers. -void testPassStruct4BytesHomogeneousInt16x10() { - final a0Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a9 = a9Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a1.a0 = -3; - a1.a1 = 4; - a2.a0 = -5; - a2.a1 = 6; - a3.a0 = -7; - a3.a1 = 8; - a4.a0 = -9; - a4.a1 = 10; - a5.a0 = -11; - a5.a1 = 12; - a6.a0 = -13; - a6.a1 = 14; - a7.a0 = -15; - a7.a1 = 16; - a8.a0 = -17; - a8.a1 = 18; - a9.a0 = -19; - a9.a1 = 20; - - final result = passStruct4BytesHomogeneousInt16x10( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(10, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct7BytesHomogeneousUint8x10 = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8), - int Function( - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8, - Struct7BytesHomogeneousUint8)>("PassStruct7BytesHomogeneousUint8x10"); - -/// Sub word size on 64 bit architectures. -/// 10 struct arguments will exhaust available registers. -void testPassStruct7BytesHomogeneousUint8x10() { - final a0Pointer = calloc(); - final Struct7BytesHomogeneousUint8 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct7BytesHomogeneousUint8 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct7BytesHomogeneousUint8 a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct7BytesHomogeneousUint8 a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct7BytesHomogeneousUint8 a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct7BytesHomogeneousUint8 a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct7BytesHomogeneousUint8 a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct7BytesHomogeneousUint8 a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct7BytesHomogeneousUint8 a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct7BytesHomogeneousUint8 a9 = a9Pointer.ref; - - a0.a0 = 1; - a0.a1 = 2; - a0.a2 = 3; - a0.a3 = 4; - a0.a4 = 5; - a0.a5 = 6; - a0.a6 = 7; - a1.a0 = 8; - a1.a1 = 9; - a1.a2 = 10; - a1.a3 = 11; - a1.a4 = 12; - a1.a5 = 13; - a1.a6 = 14; - a2.a0 = 15; - a2.a1 = 16; - a2.a2 = 17; - a2.a3 = 18; - a2.a4 = 19; - a2.a5 = 20; - a2.a6 = 21; - a3.a0 = 22; - a3.a1 = 23; - a3.a2 = 24; - a3.a3 = 25; - a3.a4 = 26; - a3.a5 = 27; - a3.a6 = 28; - a4.a0 = 29; - a4.a1 = 30; - a4.a2 = 31; - a4.a3 = 32; - a4.a4 = 33; - a4.a5 = 34; - a4.a6 = 35; - a5.a0 = 36; - a5.a1 = 37; - a5.a2 = 38; - a5.a3 = 39; - a5.a4 = 40; - a5.a5 = 41; - a5.a6 = 42; - a6.a0 = 43; - a6.a1 = 44; - a6.a2 = 45; - a6.a3 = 46; - a6.a4 = 47; - a6.a5 = 48; - a6.a6 = 49; - a7.a0 = 50; - a7.a1 = 51; - a7.a2 = 52; - a7.a3 = 53; - a7.a4 = 54; - a7.a5 = 55; - a7.a6 = 56; - a8.a0 = 57; - a8.a1 = 58; - a8.a2 = 59; - a8.a3 = 60; - a8.a4 = 61; - a8.a5 = 62; - a8.a6 = 63; - a9.a0 = 64; - a9.a1 = 65; - a9.a2 = 66; - a9.a3 = 67; - a9.a4 = 68; - a9.a5 = 69; - a9.a6 = 70; - - final result = passStruct7BytesHomogeneousUint8x10( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(2485, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct7BytesInt4ByteAlignedx10 = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned), - int Function( - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned, - Struct7BytesInt4ByteAligned)>("PassStruct7BytesInt4ByteAlignedx10"); - -/// Sub word size on 64 bit architectures. -/// With alignment rules taken into account size is 8 bytes. -/// 10 struct arguments will exhaust available registers. -void testPassStruct7BytesInt4ByteAlignedx10() { - final a0Pointer = calloc(); - final Struct7BytesInt4ByteAligned a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct7BytesInt4ByteAligned a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct7BytesInt4ByteAligned a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct7BytesInt4ByteAligned a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct7BytesInt4ByteAligned a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct7BytesInt4ByteAligned a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct7BytesInt4ByteAligned a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct7BytesInt4ByteAligned a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct7BytesInt4ByteAligned a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct7BytesInt4ByteAligned a9 = a9Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - a1.a0 = 4; - a1.a1 = -5; - a1.a2 = 6; - a2.a0 = -7; - a2.a1 = 8; - a2.a2 = -9; - a3.a0 = 10; - a3.a1 = -11; - a3.a2 = 12; - a4.a0 = -13; - a4.a1 = 14; - a4.a2 = -15; - a5.a0 = 16; - a5.a1 = -17; - a5.a2 = 18; - a6.a0 = -19; - a6.a1 = 20; - a6.a2 = -21; - a7.a0 = 22; - a7.a1 = -23; - a7.a2 = 24; - a8.a0 = -25; - a8.a1 = 26; - a8.a2 = -27; - a9.a0 = 28; - a9.a1 = -29; - a9.a2 = 30; - - final result = passStruct7BytesInt4ByteAlignedx10( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(15, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct8BytesIntx10 = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt), - int Function( - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt, - Struct8BytesInt)>("PassStruct8BytesIntx10"); - -/// Exactly word size struct on 64bit architectures. -/// 10 struct arguments will exhaust available registers. -void testPassStruct8BytesIntx10() { - final a0Pointer = calloc(); - final Struct8BytesInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct8BytesInt a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct8BytesInt a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct8BytesInt a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct8BytesInt a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct8BytesInt a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct8BytesInt a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct8BytesInt a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct8BytesInt a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct8BytesInt a9 = a9Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - a1.a0 = 4; - a1.a1 = -5; - a1.a2 = 6; - a2.a0 = -7; - a2.a1 = 8; - a2.a2 = -9; - a3.a0 = 10; - a3.a1 = -11; - a3.a2 = 12; - a4.a0 = -13; - a4.a1 = 14; - a4.a2 = -15; - a5.a0 = 16; - a5.a1 = -17; - a5.a2 = 18; - a6.a0 = -19; - a6.a1 = 20; - a6.a2 = -21; - a7.a0 = 22; - a7.a1 = -23; - a7.a2 = 24; - a8.a0 = -25; - a8.a1 = 26; - a8.a2 = -27; - a9.a0 = 28; - a9.a1 = -29; - a9.a2 = 30; - - final result = passStruct8BytesIntx10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(15, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct8BytesHomogeneousFloatx10 = ffiTestFunctions.lookupFunction< - Float Function( - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat), - double Function( - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat, - Struct8BytesHomogeneousFloat)>("PassStruct8BytesHomogeneousFloatx10"); - -/// Arguments passed in FP registers as long as they fit. -/// 10 struct arguments will exhaust available registers. -void testPassStruct8BytesHomogeneousFloatx10() { - final a0Pointer = calloc(); - final Struct8BytesHomogeneousFloat a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct8BytesHomogeneousFloat a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct8BytesHomogeneousFloat a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct8BytesHomogeneousFloat a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct8BytesHomogeneousFloat a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct8BytesHomogeneousFloat a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct8BytesHomogeneousFloat a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct8BytesHomogeneousFloat a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct8BytesHomogeneousFloat a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct8BytesHomogeneousFloat a9 = a9Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2.0; - a1.a0 = -3.0; - a1.a1 = 4.0; - a2.a0 = -5.0; - a2.a1 = 6.0; - a3.a0 = -7.0; - a3.a1 = 8.0; - a4.a0 = -9.0; - a4.a1 = 10.0; - a5.a0 = -11.0; - a5.a1 = 12.0; - a6.a0 = -13.0; - a6.a1 = 14.0; - a7.a0 = -15.0; - a7.a1 = 16.0; - a8.a0 = -17.0; - a8.a1 = 18.0; - a9.a0 = -19.0; - a9.a1 = 20.0; - - final result = passStruct8BytesHomogeneousFloatx10( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(10.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct8BytesMixedx10 = ffiTestFunctions.lookupFunction< - Float Function( - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed), - double Function( - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed, - Struct8BytesMixed)>("PassStruct8BytesMixedx10"); - -/// On x64, arguments go in int registers because it is not only float. -/// 10 struct arguments will exhaust available registers. -void testPassStruct8BytesMixedx10() { - final a0Pointer = calloc(); - final Struct8BytesMixed a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct8BytesMixed a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct8BytesMixed a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct8BytesMixed a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct8BytesMixed a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct8BytesMixed a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct8BytesMixed a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct8BytesMixed a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct8BytesMixed a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct8BytesMixed a9 = a9Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2; - a0.a2 = -3; - a1.a0 = 4.0; - a1.a1 = -5; - a1.a2 = 6; - a2.a0 = -7.0; - a2.a1 = 8; - a2.a2 = -9; - a3.a0 = 10.0; - a3.a1 = -11; - a3.a2 = 12; - a4.a0 = -13.0; - a4.a1 = 14; - a4.a2 = -15; - a5.a0 = 16.0; - a5.a1 = -17; - a5.a2 = 18; - a6.a0 = -19.0; - a6.a1 = 20; - a6.a2 = -21; - a7.a0 = 22.0; - a7.a1 = -23; - a7.a2 = 24; - a8.a0 = -25.0; - a8.a1 = 26; - a8.a2 = -27; - a9.a0 = 28.0; - a9.a1 = -29; - a9.a2 = 30; - - final result = - passStruct8BytesMixedx10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(15.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct9BytesHomogeneousUint8x10 = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8), - int Function( - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8, - Struct9BytesHomogeneousUint8)>("PassStruct9BytesHomogeneousUint8x10"); - -/// Argument is a single byte over a multiple of word size. -/// 10 struct arguments will exhaust available registers. -/// Struct only has 1-byte aligned fields to test struct alignment itself. -/// Tests upper bytes in the integer registers that are partly filled. -/// Tests stack alignment of non word size stack arguments. -void testPassStruct9BytesHomogeneousUint8x10() { - final a0Pointer = calloc(); - final Struct9BytesHomogeneousUint8 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct9BytesHomogeneousUint8 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct9BytesHomogeneousUint8 a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct9BytesHomogeneousUint8 a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct9BytesHomogeneousUint8 a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct9BytesHomogeneousUint8 a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct9BytesHomogeneousUint8 a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct9BytesHomogeneousUint8 a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct9BytesHomogeneousUint8 a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct9BytesHomogeneousUint8 a9 = a9Pointer.ref; - - a0.a0 = 1; - a0.a1 = 2; - a0.a2 = 3; - a0.a3 = 4; - a0.a4 = 5; - a0.a5 = 6; - a0.a6 = 7; - a0.a7 = 8; - a0.a8 = 9; - a1.a0 = 10; - a1.a1 = 11; - a1.a2 = 12; - a1.a3 = 13; - a1.a4 = 14; - a1.a5 = 15; - a1.a6 = 16; - a1.a7 = 17; - a1.a8 = 18; - a2.a0 = 19; - a2.a1 = 20; - a2.a2 = 21; - a2.a3 = 22; - a2.a4 = 23; - a2.a5 = 24; - a2.a6 = 25; - a2.a7 = 26; - a2.a8 = 27; - a3.a0 = 28; - a3.a1 = 29; - a3.a2 = 30; - a3.a3 = 31; - a3.a4 = 32; - a3.a5 = 33; - a3.a6 = 34; - a3.a7 = 35; - a3.a8 = 36; - a4.a0 = 37; - a4.a1 = 38; - a4.a2 = 39; - a4.a3 = 40; - a4.a4 = 41; - a4.a5 = 42; - a4.a6 = 43; - a4.a7 = 44; - a4.a8 = 45; - a5.a0 = 46; - a5.a1 = 47; - a5.a2 = 48; - a5.a3 = 49; - a5.a4 = 50; - a5.a5 = 51; - a5.a6 = 52; - a5.a7 = 53; - a5.a8 = 54; - a6.a0 = 55; - a6.a1 = 56; - a6.a2 = 57; - a6.a3 = 58; - a6.a4 = 59; - a6.a5 = 60; - a6.a6 = 61; - a6.a7 = 62; - a6.a8 = 63; - a7.a0 = 64; - a7.a1 = 65; - a7.a2 = 66; - a7.a3 = 67; - a7.a4 = 68; - a7.a5 = 69; - a7.a6 = 70; - a7.a7 = 71; - a7.a8 = 72; - a8.a0 = 73; - a8.a1 = 74; - a8.a2 = 75; - a8.a3 = 76; - a8.a4 = 77; - a8.a5 = 78; - a8.a6 = 79; - a8.a7 = 80; - a8.a8 = 81; - a9.a0 = 82; - a9.a1 = 83; - a9.a2 = 84; - a9.a3 = 85; - a9.a4 = 86; - a9.a5 = 87; - a9.a6 = 88; - a9.a7 = 89; - a9.a8 = 90; - - final result = passStruct9BytesHomogeneousUint8x10( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(4095, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct9BytesInt4Or8ByteAlignedx10 = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned), - int Function( - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned, - Struct9BytesInt4Or8ByteAligned)>( - "PassStruct9BytesInt4Or8ByteAlignedx10"); - -/// Argument is a single byte over a multiple of word size. -/// With alignment rules taken into account size is 12 or 16 bytes. -/// 10 struct arguments will exhaust available registers. -/// -void testPassStruct9BytesInt4Or8ByteAlignedx10() { - final a0Pointer = calloc(); - final Struct9BytesInt4Or8ByteAligned a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct9BytesInt4Or8ByteAligned a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct9BytesInt4Or8ByteAligned a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct9BytesInt4Or8ByteAligned a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct9BytesInt4Or8ByteAligned a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct9BytesInt4Or8ByteAligned a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct9BytesInt4Or8ByteAligned a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct9BytesInt4Or8ByteAligned a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct9BytesInt4Or8ByteAligned a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct9BytesInt4Or8ByteAligned a9 = a9Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a1.a0 = -3; - a1.a1 = 4; - a2.a0 = -5; - a2.a1 = 6; - a3.a0 = -7; - a3.a1 = 8; - a4.a0 = -9; - a4.a1 = 10; - a5.a0 = -11; - a5.a1 = 12; - a6.a0 = -13; - a6.a1 = 14; - a7.a0 = -15; - a7.a1 = 16; - a8.a0 = -17; - a8.a1 = 18; - a9.a0 = -19; - a9.a1 = 20; - - final result = passStruct9BytesInt4Or8ByteAlignedx10( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(10, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct12BytesHomogeneousFloatx6 = ffiTestFunctions.lookupFunction< - Float Function( - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat), - double Function( - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat, - Struct12BytesHomogeneousFloat)>("PassStruct12BytesHomogeneousFloatx6"); - -/// Arguments in FPU registers on arm hardfp and arm64. -/// Struct arguments will exhaust available registers, and leave some empty. -/// The last argument is to test whether arguments are backfilled. -void testPassStruct12BytesHomogeneousFloatx6() { - final a0Pointer = calloc(); - final Struct12BytesHomogeneousFloat a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct12BytesHomogeneousFloat a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct12BytesHomogeneousFloat a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct12BytesHomogeneousFloat a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct12BytesHomogeneousFloat a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct12BytesHomogeneousFloat a5 = a5Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2.0; - a0.a2 = -3.0; - a1.a0 = 4.0; - a1.a1 = -5.0; - a1.a2 = 6.0; - a2.a0 = -7.0; - a2.a1 = 8.0; - a2.a2 = -9.0; - a3.a0 = 10.0; - a3.a1 = -11.0; - a3.a2 = 12.0; - a4.a0 = -13.0; - a4.a1 = 14.0; - a4.a2 = -15.0; - a5.a0 = 16.0; - a5.a1 = -17.0; - a5.a2 = 18.0; - - final result = passStruct12BytesHomogeneousFloatx6(a0, a1, a2, a3, a4, a5); - - print("result = $result"); - - Expect.approxEquals(9.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); -} - -final passStruct16BytesHomogeneousFloatx5 = ffiTestFunctions.lookupFunction< - Float Function( - Struct16BytesHomogeneousFloat, - Struct16BytesHomogeneousFloat, - Struct16BytesHomogeneousFloat, - Struct16BytesHomogeneousFloat, - Struct16BytesHomogeneousFloat), - double Function( - Struct16BytesHomogeneousFloat, - Struct16BytesHomogeneousFloat, - Struct16BytesHomogeneousFloat, - Struct16BytesHomogeneousFloat, - Struct16BytesHomogeneousFloat)>("PassStruct16BytesHomogeneousFloatx5"); - -/// On Linux x64 argument is transferred on stack because it is over 16 bytes. -/// Arguments in FPU registers on arm hardfp and arm64. -/// 5 struct arguments will exhaust available registers. -void testPassStruct16BytesHomogeneousFloatx5() { - final a0Pointer = calloc(); - final Struct16BytesHomogeneousFloat a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct16BytesHomogeneousFloat a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct16BytesHomogeneousFloat a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct16BytesHomogeneousFloat a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct16BytesHomogeneousFloat a4 = a4Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2.0; - a0.a2 = -3.0; - a0.a3 = 4.0; - a1.a0 = -5.0; - a1.a1 = 6.0; - a1.a2 = -7.0; - a1.a3 = 8.0; - a2.a0 = -9.0; - a2.a1 = 10.0; - a2.a2 = -11.0; - a2.a3 = 12.0; - a3.a0 = -13.0; - a3.a1 = 14.0; - a3.a2 = -15.0; - a3.a3 = 16.0; - a4.a0 = -17.0; - a4.a1 = 18.0; - a4.a2 = -19.0; - a4.a3 = 20.0; - - final result = passStruct16BytesHomogeneousFloatx5(a0, a1, a2, a3, a4); - - print("result = $result"); - - Expect.approxEquals(10.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); -} - -final passStruct16BytesMixedx10 = ffiTestFunctions.lookupFunction< - Double Function( - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed), - double Function( - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed)>("PassStruct16BytesMixedx10"); - -/// On x64, arguments are split over FP and int registers. -/// On x64, it will exhaust the integer registers with the 6th argument. -/// The rest goes on the stack. -/// On arm, arguments are 8 byte aligned. -void testPassStruct16BytesMixedx10() { - final a0Pointer = calloc(); - final Struct16BytesMixed a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct16BytesMixed a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct16BytesMixed a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct16BytesMixed a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct16BytesMixed a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct16BytesMixed a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct16BytesMixed a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct16BytesMixed a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct16BytesMixed a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct16BytesMixed a9 = a9Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2; - a1.a0 = -3.0; - a1.a1 = 4; - a2.a0 = -5.0; - a2.a1 = 6; - a3.a0 = -7.0; - a3.a1 = 8; - a4.a0 = -9.0; - a4.a1 = 10; - a5.a0 = -11.0; - a5.a1 = 12; - a6.a0 = -13.0; - a6.a1 = 14; - a7.a0 = -15.0; - a7.a1 = 16; - a8.a0 = -17.0; - a8.a1 = 18; - a9.a0 = -19.0; - a9.a1 = 20; - - final result = - passStruct16BytesMixedx10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(10.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct16BytesMixed2x10 = ffiTestFunctions.lookupFunction< - Float Function( - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2), - double Function( - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2, - Struct16BytesMixed2)>("PassStruct16BytesMixed2x10"); - -/// On x64, arguments are split over FP and int registers. -/// On x64, it will exhaust the integer registers with the 6th argument. -/// The rest goes on the stack. -/// On arm, arguments are 4 byte aligned. -void testPassStruct16BytesMixed2x10() { - final a0Pointer = calloc(); - final Struct16BytesMixed2 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct16BytesMixed2 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct16BytesMixed2 a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct16BytesMixed2 a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct16BytesMixed2 a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct16BytesMixed2 a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct16BytesMixed2 a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct16BytesMixed2 a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct16BytesMixed2 a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct16BytesMixed2 a9 = a9Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2.0; - a0.a2 = -3.0; - a0.a3 = 4; - a1.a0 = -5.0; - a1.a1 = 6.0; - a1.a2 = -7.0; - a1.a3 = 8; - a2.a0 = -9.0; - a2.a1 = 10.0; - a2.a2 = -11.0; - a2.a3 = 12; - a3.a0 = -13.0; - a3.a1 = 14.0; - a3.a2 = -15.0; - a3.a3 = 16; - a4.a0 = -17.0; - a4.a1 = 18.0; - a4.a2 = -19.0; - a4.a3 = 20; - a5.a0 = -21.0; - a5.a1 = 22.0; - a5.a2 = -23.0; - a5.a3 = 24; - a6.a0 = -25.0; - a6.a1 = 26.0; - a6.a2 = -27.0; - a6.a3 = 28; - a7.a0 = -29.0; - a7.a1 = 30.0; - a7.a2 = -31.0; - a7.a3 = 32; - a8.a0 = -33.0; - a8.a1 = 34.0; - a8.a2 = -35.0; - a8.a3 = 36; - a9.a0 = -37.0; - a9.a1 = 38.0; - a9.a2 = -39.0; - a9.a3 = 40; - - final result = - passStruct16BytesMixed2x10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(20.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct17BytesIntx10 = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt), - int Function( - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt, - Struct17BytesInt)>("PassStruct17BytesIntx10"); - -/// Arguments are passed as pointer to copy on arm64. -/// Tests that the memory allocated for copies are rounded up to word size. -void testPassStruct17BytesIntx10() { - final a0Pointer = calloc(); - final Struct17BytesInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct17BytesInt a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct17BytesInt a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct17BytesInt a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct17BytesInt a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct17BytesInt a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct17BytesInt a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct17BytesInt a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct17BytesInt a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct17BytesInt a9 = a9Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - a1.a0 = 4; - a1.a1 = -5; - a1.a2 = 6; - a2.a0 = -7; - a2.a1 = 8; - a2.a2 = -9; - a3.a0 = 10; - a3.a1 = -11; - a3.a2 = 12; - a4.a0 = -13; - a4.a1 = 14; - a4.a2 = -15; - a5.a0 = 16; - a5.a1 = -17; - a5.a2 = 18; - a6.a0 = -19; - a6.a1 = 20; - a6.a2 = -21; - a7.a0 = 22; - a7.a1 = -23; - a7.a2 = 24; - a8.a0 = -25; - a8.a1 = 26; - a8.a2 = -27; - a9.a0 = 28; - a9.a1 = -29; - a9.a2 = 30; - - final result = - passStruct17BytesIntx10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(15, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct19BytesHomogeneousUint8x10 = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8), - int Function( - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8, - Struct19BytesHomogeneousUint8)>("PassStruct19BytesHomogeneousUint8x10"); - -/// The minimum alignment of this struct is only 1 byte based on its fields. -/// Test that the memory backing these structs is extended to the right size. -/// -void testPassStruct19BytesHomogeneousUint8x10() { - final a0Pointer = calloc(); - final Struct19BytesHomogeneousUint8 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct19BytesHomogeneousUint8 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct19BytesHomogeneousUint8 a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct19BytesHomogeneousUint8 a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct19BytesHomogeneousUint8 a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct19BytesHomogeneousUint8 a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct19BytesHomogeneousUint8 a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct19BytesHomogeneousUint8 a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct19BytesHomogeneousUint8 a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct19BytesHomogeneousUint8 a9 = a9Pointer.ref; - - a0.a0 = 1; - a0.a1 = 2; - a0.a2 = 3; - a0.a3 = 4; - a0.a4 = 5; - a0.a5 = 6; - a0.a6 = 7; - a0.a7 = 8; - a0.a8 = 9; - a0.a9 = 10; - a0.a10 = 11; - a0.a11 = 12; - a0.a12 = 13; - a0.a13 = 14; - a0.a14 = 15; - a0.a15 = 16; - a0.a16 = 17; - a0.a17 = 18; - a0.a18 = 19; - a1.a0 = 20; - a1.a1 = 21; - a1.a2 = 22; - a1.a3 = 23; - a1.a4 = 24; - a1.a5 = 25; - a1.a6 = 26; - a1.a7 = 27; - a1.a8 = 28; - a1.a9 = 29; - a1.a10 = 30; - a1.a11 = 31; - a1.a12 = 32; - a1.a13 = 33; - a1.a14 = 34; - a1.a15 = 35; - a1.a16 = 36; - a1.a17 = 37; - a1.a18 = 38; - a2.a0 = 39; - a2.a1 = 40; - a2.a2 = 41; - a2.a3 = 42; - a2.a4 = 43; - a2.a5 = 44; - a2.a6 = 45; - a2.a7 = 46; - a2.a8 = 47; - a2.a9 = 48; - a2.a10 = 49; - a2.a11 = 50; - a2.a12 = 51; - a2.a13 = 52; - a2.a14 = 53; - a2.a15 = 54; - a2.a16 = 55; - a2.a17 = 56; - a2.a18 = 57; - a3.a0 = 58; - a3.a1 = 59; - a3.a2 = 60; - a3.a3 = 61; - a3.a4 = 62; - a3.a5 = 63; - a3.a6 = 64; - a3.a7 = 65; - a3.a8 = 66; - a3.a9 = 67; - a3.a10 = 68; - a3.a11 = 69; - a3.a12 = 70; - a3.a13 = 71; - a3.a14 = 72; - a3.a15 = 73; - a3.a16 = 74; - a3.a17 = 75; - a3.a18 = 76; - a4.a0 = 77; - a4.a1 = 78; - a4.a2 = 79; - a4.a3 = 80; - a4.a4 = 81; - a4.a5 = 82; - a4.a6 = 83; - a4.a7 = 84; - a4.a8 = 85; - a4.a9 = 86; - a4.a10 = 87; - a4.a11 = 88; - a4.a12 = 89; - a4.a13 = 90; - a4.a14 = 91; - a4.a15 = 92; - a4.a16 = 93; - a4.a17 = 94; - a4.a18 = 95; - a5.a0 = 96; - a5.a1 = 97; - a5.a2 = 98; - a5.a3 = 99; - a5.a4 = 100; - a5.a5 = 101; - a5.a6 = 102; - a5.a7 = 103; - a5.a8 = 104; - a5.a9 = 105; - a5.a10 = 106; - a5.a11 = 107; - a5.a12 = 108; - a5.a13 = 109; - a5.a14 = 110; - a5.a15 = 111; - a5.a16 = 112; - a5.a17 = 113; - a5.a18 = 114; - a6.a0 = 115; - a6.a1 = 116; - a6.a2 = 117; - a6.a3 = 118; - a6.a4 = 119; - a6.a5 = 120; - a6.a6 = 121; - a6.a7 = 122; - a6.a8 = 123; - a6.a9 = 124; - a6.a10 = 125; - a6.a11 = 126; - a6.a12 = 127; - a6.a13 = 128; - a6.a14 = 129; - a6.a15 = 130; - a6.a16 = 131; - a6.a17 = 132; - a6.a18 = 133; - a7.a0 = 134; - a7.a1 = 135; - a7.a2 = 136; - a7.a3 = 137; - a7.a4 = 138; - a7.a5 = 139; - a7.a6 = 140; - a7.a7 = 141; - a7.a8 = 142; - a7.a9 = 143; - a7.a10 = 144; - a7.a11 = 145; - a7.a12 = 146; - a7.a13 = 147; - a7.a14 = 148; - a7.a15 = 149; - a7.a16 = 150; - a7.a17 = 151; - a7.a18 = 152; - a8.a0 = 153; - a8.a1 = 154; - a8.a2 = 155; - a8.a3 = 156; - a8.a4 = 157; - a8.a5 = 158; - a8.a6 = 159; - a8.a7 = 160; - a8.a8 = 161; - a8.a9 = 162; - a8.a10 = 163; - a8.a11 = 164; - a8.a12 = 165; - a8.a13 = 166; - a8.a14 = 167; - a8.a15 = 168; - a8.a16 = 169; - a8.a17 = 170; - a8.a18 = 171; - a9.a0 = 172; - a9.a1 = 173; - a9.a2 = 174; - a9.a3 = 175; - a9.a4 = 176; - a9.a5 = 177; - a9.a6 = 178; - a9.a7 = 179; - a9.a8 = 180; - a9.a9 = 181; - a9.a10 = 182; - a9.a11 = 183; - a9.a12 = 184; - a9.a13 = 185; - a9.a14 = 186; - a9.a15 = 187; - a9.a16 = 188; - a9.a17 = 189; - a9.a18 = 190; - - final result = passStruct19BytesHomogeneousUint8x10( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(18145, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct20BytesHomogeneousInt32x10 = ffiTestFunctions.lookupFunction< - Int32 Function( - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32), - int Function( - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32, - Struct20BytesHomogeneousInt32)>("PassStruct20BytesHomogeneousInt32x10"); - -/// Argument too big to go into integer registers on arm64. -/// The arguments are passed as pointers to copies. -/// The amount of arguments exhausts the number of integer registers, such that -/// pointers to copies are also passed on the stack. -void testPassStruct20BytesHomogeneousInt32x10() { - final a0Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a9 = a9Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - a0.a3 = 4; - a0.a4 = -5; - a1.a0 = 6; - a1.a1 = -7; - a1.a2 = 8; - a1.a3 = -9; - a1.a4 = 10; - a2.a0 = -11; - a2.a1 = 12; - a2.a2 = -13; - a2.a3 = 14; - a2.a4 = -15; - a3.a0 = 16; - a3.a1 = -17; - a3.a2 = 18; - a3.a3 = -19; - a3.a4 = 20; - a4.a0 = -21; - a4.a1 = 22; - a4.a2 = -23; - a4.a3 = 24; - a4.a4 = -25; - a5.a0 = 26; - a5.a1 = -27; - a5.a2 = 28; - a5.a3 = -29; - a5.a4 = 30; - a6.a0 = -31; - a6.a1 = 32; - a6.a2 = -33; - a6.a3 = 34; - a6.a4 = -35; - a7.a0 = 36; - a7.a1 = -37; - a7.a2 = 38; - a7.a3 = -39; - a7.a4 = 40; - a8.a0 = -41; - a8.a1 = 42; - a8.a2 = -43; - a8.a3 = 44; - a8.a4 = -45; - a9.a0 = 46; - a9.a1 = -47; - a9.a2 = 48; - a9.a3 = -49; - a9.a4 = 50; - - final result = passStruct20BytesHomogeneousInt32x10( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(25, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct20BytesHomogeneousFloat = ffiTestFunctions.lookupFunction< - Float Function(Struct20BytesHomogeneousFloat), - double Function( - Struct20BytesHomogeneousFloat)>("PassStruct20BytesHomogeneousFloat"); - -/// Argument too big to go into FPU registers in hardfp and arm64. -void testPassStruct20BytesHomogeneousFloat() { - final a0Pointer = calloc(); - final Struct20BytesHomogeneousFloat a0 = a0Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2.0; - a0.a2 = -3.0; - a0.a3 = 4.0; - a0.a4 = -5.0; - - final result = passStruct20BytesHomogeneousFloat(a0); - - print("result = $result"); - - Expect.approxEquals(-3.0, result); - - calloc.free(a0Pointer); -} - -final passStruct32BytesHomogeneousDoublex5 = ffiTestFunctions.lookupFunction< - Double Function( - Struct32BytesHomogeneousDouble, - Struct32BytesHomogeneousDouble, - Struct32BytesHomogeneousDouble, - Struct32BytesHomogeneousDouble, - Struct32BytesHomogeneousDouble), - double Function( - Struct32BytesHomogeneousDouble, - Struct32BytesHomogeneousDouble, - Struct32BytesHomogeneousDouble, - Struct32BytesHomogeneousDouble, - Struct32BytesHomogeneousDouble)>( - "PassStruct32BytesHomogeneousDoublex5"); - -/// Arguments in FPU registers on arm64. -/// 5 struct arguments will exhaust available registers. -void testPassStruct32BytesHomogeneousDoublex5() { - final a0Pointer = calloc(); - final Struct32BytesHomogeneousDouble a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct32BytesHomogeneousDouble a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct32BytesHomogeneousDouble a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct32BytesHomogeneousDouble a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct32BytesHomogeneousDouble a4 = a4Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2.0; - a0.a2 = -3.0; - a0.a3 = 4.0; - a1.a0 = -5.0; - a1.a1 = 6.0; - a1.a2 = -7.0; - a1.a3 = 8.0; - a2.a0 = -9.0; - a2.a1 = 10.0; - a2.a2 = -11.0; - a2.a3 = 12.0; - a3.a0 = -13.0; - a3.a1 = 14.0; - a3.a2 = -15.0; - a3.a3 = 16.0; - a4.a0 = -17.0; - a4.a1 = 18.0; - a4.a2 = -19.0; - a4.a3 = 20.0; - - final result = passStruct32BytesHomogeneousDoublex5(a0, a1, a2, a3, a4); - - print("result = $result"); - - Expect.approxEquals(10.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); -} - -final passStruct40BytesHomogeneousDouble = ffiTestFunctions.lookupFunction< - Double Function(Struct40BytesHomogeneousDouble), - double Function( - Struct40BytesHomogeneousDouble)>("PassStruct40BytesHomogeneousDouble"); - -/// Argument too big to go into FPU registers in arm64. -void testPassStruct40BytesHomogeneousDouble() { - final a0Pointer = calloc(); - final Struct40BytesHomogeneousDouble a0 = a0Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2.0; - a0.a2 = -3.0; - a0.a3 = 4.0; - a0.a4 = -5.0; - - final result = passStruct40BytesHomogeneousDouble(a0); - - print("result = $result"); - - Expect.approxEquals(-3.0, result); - - calloc.free(a0Pointer); -} - -final passStruct1024BytesHomogeneousUint64 = ffiTestFunctions.lookupFunction< - Uint64 Function(Struct1024BytesHomogeneousUint64), - int Function(Struct1024BytesHomogeneousUint64)>( - "PassStruct1024BytesHomogeneousUint64"); - -/// Test 1kb struct. -void testPassStruct1024BytesHomogeneousUint64() { - final a0Pointer = calloc(); - final Struct1024BytesHomogeneousUint64 a0 = a0Pointer.ref; - - a0.a0 = 1; - a0.a1 = 2; - a0.a2 = 3; - a0.a3 = 4; - a0.a4 = 5; - a0.a5 = 6; - a0.a6 = 7; - a0.a7 = 8; - a0.a8 = 9; - a0.a9 = 10; - a0.a10 = 11; - a0.a11 = 12; - a0.a12 = 13; - a0.a13 = 14; - a0.a14 = 15; - a0.a15 = 16; - a0.a16 = 17; - a0.a17 = 18; - a0.a18 = 19; - a0.a19 = 20; - a0.a20 = 21; - a0.a21 = 22; - a0.a22 = 23; - a0.a23 = 24; - a0.a24 = 25; - a0.a25 = 26; - a0.a26 = 27; - a0.a27 = 28; - a0.a28 = 29; - a0.a29 = 30; - a0.a30 = 31; - a0.a31 = 32; - a0.a32 = 33; - a0.a33 = 34; - a0.a34 = 35; - a0.a35 = 36; - a0.a36 = 37; - a0.a37 = 38; - a0.a38 = 39; - a0.a39 = 40; - a0.a40 = 41; - a0.a41 = 42; - a0.a42 = 43; - a0.a43 = 44; - a0.a44 = 45; - a0.a45 = 46; - a0.a46 = 47; - a0.a47 = 48; - a0.a48 = 49; - a0.a49 = 50; - a0.a50 = 51; - a0.a51 = 52; - a0.a52 = 53; - a0.a53 = 54; - a0.a54 = 55; - a0.a55 = 56; - a0.a56 = 57; - a0.a57 = 58; - a0.a58 = 59; - a0.a59 = 60; - a0.a60 = 61; - a0.a61 = 62; - a0.a62 = 63; - a0.a63 = 64; - a0.a64 = 65; - a0.a65 = 66; - a0.a66 = 67; - a0.a67 = 68; - a0.a68 = 69; - a0.a69 = 70; - a0.a70 = 71; - a0.a71 = 72; - a0.a72 = 73; - a0.a73 = 74; - a0.a74 = 75; - a0.a75 = 76; - a0.a76 = 77; - a0.a77 = 78; - a0.a78 = 79; - a0.a79 = 80; - a0.a80 = 81; - a0.a81 = 82; - a0.a82 = 83; - a0.a83 = 84; - a0.a84 = 85; - a0.a85 = 86; - a0.a86 = 87; - a0.a87 = 88; - a0.a88 = 89; - a0.a89 = 90; - a0.a90 = 91; - a0.a91 = 92; - a0.a92 = 93; - a0.a93 = 94; - a0.a94 = 95; - a0.a95 = 96; - a0.a96 = 97; - a0.a97 = 98; - a0.a98 = 99; - a0.a99 = 100; - a0.a100 = 101; - a0.a101 = 102; - a0.a102 = 103; - a0.a103 = 104; - a0.a104 = 105; - a0.a105 = 106; - a0.a106 = 107; - a0.a107 = 108; - a0.a108 = 109; - a0.a109 = 110; - a0.a110 = 111; - a0.a111 = 112; - a0.a112 = 113; - a0.a113 = 114; - a0.a114 = 115; - a0.a115 = 116; - a0.a116 = 117; - a0.a117 = 118; - a0.a118 = 119; - a0.a119 = 120; - a0.a120 = 121; - a0.a121 = 122; - a0.a122 = 123; - a0.a123 = 124; - a0.a124 = 125; - a0.a125 = 126; - a0.a126 = 127; - a0.a127 = 128; - - final result = passStruct1024BytesHomogeneousUint64(a0); - - print("result = $result"); - - Expect.equals(8256, result); - - calloc.free(a0Pointer); -} - -final passFloatStruct16BytesHomogeneousFloatFloatStruct1 = - ffiTestFunctions.lookupFunction< - Float Function( - Float, - Struct16BytesHomogeneousFloat, - Float, - Struct16BytesHomogeneousFloat, - Float, - Struct16BytesHomogeneousFloat, - Float, - Struct16BytesHomogeneousFloat, - Float), - double Function( - double, - Struct16BytesHomogeneousFloat, - double, - Struct16BytesHomogeneousFloat, - double, - Struct16BytesHomogeneousFloat, - double, - Struct16BytesHomogeneousFloat, - double)>("PassFloatStruct16BytesHomogeneousFloatFloatStruct1"); - -/// Tests the alignment of structs in FPU registers and backfilling. -void testPassFloatStruct16BytesHomogeneousFloatFloatStruct1() { - double a0; - final a1Pointer = calloc(); - final Struct16BytesHomogeneousFloat a1 = a1Pointer.ref; - double a2; - final a3Pointer = calloc(); - final Struct16BytesHomogeneousFloat a3 = a3Pointer.ref; - double a4; - final a5Pointer = calloc(); - final Struct16BytesHomogeneousFloat a5 = a5Pointer.ref; - double a6; - final a7Pointer = calloc(); - final Struct16BytesHomogeneousFloat a7 = a7Pointer.ref; - double a8; - - a0 = -1.0; - a1.a0 = 2.0; - a1.a1 = -3.0; - a1.a2 = 4.0; - a1.a3 = -5.0; - a2 = 6.0; - a3.a0 = -7.0; - a3.a1 = 8.0; - a3.a2 = -9.0; - a3.a3 = 10.0; - a4 = -11.0; - a5.a0 = 12.0; - a5.a1 = -13.0; - a5.a2 = 14.0; - a5.a3 = -15.0; - a6 = 16.0; - a7.a0 = -17.0; - a7.a1 = 18.0; - a7.a2 = -19.0; - a7.a3 = 20.0; - a8 = -21.0; - - final result = passFloatStruct16BytesHomogeneousFloatFloatStruct1( - a0, a1, a2, a3, a4, a5, a6, a7, a8); - - print("result = $result"); - - Expect.approxEquals(-11.0, result); - - calloc.free(a1Pointer); - calloc.free(a3Pointer); - calloc.free(a5Pointer); - calloc.free(a7Pointer); -} - -final passFloatStruct32BytesHomogeneousDoubleFloatStruct = - ffiTestFunctions.lookupFunction< - Double Function( - Float, - Struct32BytesHomogeneousDouble, - Float, - Struct32BytesHomogeneousDouble, - Float, - Struct32BytesHomogeneousDouble, - Float, - Struct32BytesHomogeneousDouble, - Float), - double Function( - double, - Struct32BytesHomogeneousDouble, - double, - Struct32BytesHomogeneousDouble, - double, - Struct32BytesHomogeneousDouble, - double, - Struct32BytesHomogeneousDouble, - double)>("PassFloatStruct32BytesHomogeneousDoubleFloatStruct"); - -/// Tests the alignment of structs in FPU registers and backfilling. -void testPassFloatStruct32BytesHomogeneousDoubleFloatStruct() { - double a0; - final a1Pointer = calloc(); - final Struct32BytesHomogeneousDouble a1 = a1Pointer.ref; - double a2; - final a3Pointer = calloc(); - final Struct32BytesHomogeneousDouble a3 = a3Pointer.ref; - double a4; - final a5Pointer = calloc(); - final Struct32BytesHomogeneousDouble a5 = a5Pointer.ref; - double a6; - final a7Pointer = calloc(); - final Struct32BytesHomogeneousDouble a7 = a7Pointer.ref; - double a8; - - a0 = -1.0; - a1.a0 = 2.0; - a1.a1 = -3.0; - a1.a2 = 4.0; - a1.a3 = -5.0; - a2 = 6.0; - a3.a0 = -7.0; - a3.a1 = 8.0; - a3.a2 = -9.0; - a3.a3 = 10.0; - a4 = -11.0; - a5.a0 = 12.0; - a5.a1 = -13.0; - a5.a2 = 14.0; - a5.a3 = -15.0; - a6 = 16.0; - a7.a0 = -17.0; - a7.a1 = 18.0; - a7.a2 = -19.0; - a7.a3 = 20.0; - a8 = -21.0; - - final result = passFloatStruct32BytesHomogeneousDoubleFloatStruct( - a0, a1, a2, a3, a4, a5, a6, a7, a8); - - print("result = $result"); - - Expect.approxEquals(-11.0, result); - - calloc.free(a1Pointer); - calloc.free(a3Pointer); - calloc.free(a5Pointer); - calloc.free(a7Pointer); -} - -final passInt8Struct16BytesMixedInt8Struct16BytesMixedIn = - ffiTestFunctions.lookupFunction< - Double Function(Int8, Struct16BytesMixed, Int8, Struct16BytesMixed, - Int8, Struct16BytesMixed, Int8, Struct16BytesMixed, Int8), - double Function( - int, - Struct16BytesMixed, - int, - Struct16BytesMixed, - int, - Struct16BytesMixed, - int, - Struct16BytesMixed, - int)>("PassInt8Struct16BytesMixedInt8Struct16BytesMixedIn"); - -/// Tests the alignment of structs in integers registers and on the stack. -/// Arm32 aligns this struct at 8. -/// Also, arm32 allocates the second struct partially in registers, partially -/// on stack. -/// Test backfilling of integer registers. -void testPassInt8Struct16BytesMixedInt8Struct16BytesMixedIn() { - int a0; - final a1Pointer = calloc(); - final Struct16BytesMixed a1 = a1Pointer.ref; - int a2; - final a3Pointer = calloc(); - final Struct16BytesMixed a3 = a3Pointer.ref; - int a4; - final a5Pointer = calloc(); - final Struct16BytesMixed a5 = a5Pointer.ref; - int a6; - final a7Pointer = calloc(); - final Struct16BytesMixed a7 = a7Pointer.ref; - int a8; - - a0 = -1; - a1.a0 = 2.0; - a1.a1 = -3; - a2 = 4; - a3.a0 = -5.0; - a3.a1 = 6; - a4 = -7; - a5.a0 = 8.0; - a5.a1 = -9; - a6 = 10; - a7.a0 = -11.0; - a7.a1 = 12; - a8 = -13; - - final result = passInt8Struct16BytesMixedInt8Struct16BytesMixedIn( - a0, a1, a2, a3, a4, a5, a6, a7, a8); - - print("result = $result"); - - Expect.approxEquals(-7.0, result); - - calloc.free(a1Pointer); - calloc.free(a3Pointer); - calloc.free(a5Pointer); - calloc.free(a7Pointer); -} - -final passDoublex6Struct16BytesMixedx4Int32 = ffiTestFunctions.lookupFunction< - Double Function( - Double, - Double, - Double, - Double, - Double, - Double, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Int32), - double Function( - double, - double, - double, - double, - double, - double, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - int)>("PassDoublex6Struct16BytesMixedx4Int32"); - -/// On Linux x64, it will exhaust xmm registers first, after 6 doubles and 2 -/// structs. The rest of the structs will go on the stack. -/// The int will be backfilled into the int register. -void testPassDoublex6Struct16BytesMixedx4Int32() { - double a0; - double a1; - double a2; - double a3; - double a4; - double a5; - final a6Pointer = calloc(); - final Struct16BytesMixed a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct16BytesMixed a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct16BytesMixed a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct16BytesMixed a9 = a9Pointer.ref; - int a10; - - a0 = -1.0; - a1 = 2.0; - a2 = -3.0; - a3 = 4.0; - a4 = -5.0; - a5 = 6.0; - a6.a0 = -7.0; - a6.a1 = 8; - a7.a0 = -9.0; - a7.a1 = 10; - a8.a0 = -11.0; - a8.a1 = 12; - a9.a0 = -13.0; - a9.a1 = 14; - a10 = -15; - - final result = passDoublex6Struct16BytesMixedx4Int32( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); - - print("result = $result"); - - Expect.approxEquals(-8.0, result); - - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passInt32x4Struct16BytesMixedx4Double = ffiTestFunctions.lookupFunction< - Double Function(Int32, Int32, Int32, Int32, Struct16BytesMixed, - Struct16BytesMixed, Struct16BytesMixed, Struct16BytesMixed, Double), - double Function( - int, - int, - int, - int, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - Struct16BytesMixed, - double)>("PassInt32x4Struct16BytesMixedx4Double"); - -/// On Linux x64, it will exhaust int registers first. -/// The rest of the structs will go on the stack. -/// The double will be backfilled into the xmm register. -void testPassInt32x4Struct16BytesMixedx4Double() { - int a0; - int a1; - int a2; - int a3; - final a4Pointer = calloc(); - final Struct16BytesMixed a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct16BytesMixed a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct16BytesMixed a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct16BytesMixed a7 = a7Pointer.ref; - double a8; - - a0 = -1; - a1 = 2; - a2 = -3; - a3 = 4; - a4.a0 = -5.0; - a4.a1 = 6; - a5.a0 = -7.0; - a5.a1 = 8; - a6.a0 = -9.0; - a6.a1 = 10; - a7.a0 = -11.0; - a7.a1 = 12; - a8 = -13.0; - - final result = - passInt32x4Struct16BytesMixedx4Double(a0, a1, a2, a3, a4, a5, a6, a7, a8); - - print("result = $result"); - - Expect.approxEquals(-7.0, result); - - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); -} - -final passStruct40BytesHomogeneousDoubleStruct4BytesHomo = - ffiTestFunctions.lookupFunction< - Double Function(Struct40BytesHomogeneousDouble, - Struct4BytesHomogeneousInt16, Struct8BytesHomogeneousFloat), - double Function(Struct40BytesHomogeneousDouble, - Struct4BytesHomogeneousInt16, Struct8BytesHomogeneousFloat)>( - "PassStruct40BytesHomogeneousDoubleStruct4BytesHomo"); - -/// On various architectures, first struct is allocated on stack. -/// Check that the other two arguments are allocated on registers. -void testPassStruct40BytesHomogeneousDoubleStruct4BytesHomo() { - final a0Pointer = calloc(); - final Struct40BytesHomogeneousDouble a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct8BytesHomogeneousFloat a2 = a2Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2.0; - a0.a2 = -3.0; - a0.a3 = 4.0; - a0.a4 = -5.0; - a1.a0 = 6; - a1.a1 = -7; - a2.a0 = 8.0; - a2.a1 = -9.0; - - final result = passStruct40BytesHomogeneousDoubleStruct4BytesHomo(a0, a1, a2); - - print("result = $result"); - - Expect.approxEquals(-5.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); -} - -final passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int = - ffiTestFunctions.lookupFunction< - Double Function( - Int32, - Int32, - Int32, - Int32, - Int32, - Int32, - Int32, - Int32, - Double, - Double, - Double, - Double, - Double, - Double, - Double, - Double, - Int64, - Int8, - Struct1ByteInt, - Int64, - Int8, - Struct4BytesHomogeneousInt16, - Int64, - Int8, - Struct8BytesInt, - Int64, - Int8, - Struct8BytesHomogeneousFloat, - Int64, - Int8, - Struct8BytesMixed, - Int64, - Int8, - StructAlignmentInt16, - Int64, - Int8, - StructAlignmentInt32, - Int64, - Int8, - StructAlignmentInt64), - double Function( - int, - int, - int, - int, - int, - int, - int, - int, - double, - double, - double, - double, - double, - double, - double, - double, - int, - int, - Struct1ByteInt, - int, - int, - Struct4BytesHomogeneousInt16, - int, - int, - Struct8BytesInt, - int, - int, - Struct8BytesHomogeneousFloat, - int, - int, - Struct8BytesMixed, - int, - int, - StructAlignmentInt16, - int, - int, - StructAlignmentInt32, - int, - int, - StructAlignmentInt64)>("PassInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int"); - -/// Test alignment and padding of 16 byte int within struct. -void testPassInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int() { - int a0; - int a1; - int a2; - int a3; - int a4; - int a5; - int a6; - int a7; - double a8; - double a9; - double a10; - double a11; - double a12; - double a13; - double a14; - double a15; - int a16; - int a17; - final a18Pointer = calloc(); - final Struct1ByteInt a18 = a18Pointer.ref; - int a19; - int a20; - final a21Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a21 = a21Pointer.ref; - int a22; - int a23; - final a24Pointer = calloc(); - final Struct8BytesInt a24 = a24Pointer.ref; - int a25; - int a26; - final a27Pointer = calloc(); - final Struct8BytesHomogeneousFloat a27 = a27Pointer.ref; - int a28; - int a29; - final a30Pointer = calloc(); - final Struct8BytesMixed a30 = a30Pointer.ref; - int a31; - int a32; - final a33Pointer = calloc(); - final StructAlignmentInt16 a33 = a33Pointer.ref; - int a34; - int a35; - final a36Pointer = calloc(); - final StructAlignmentInt32 a36 = a36Pointer.ref; - int a37; - int a38; - final a39Pointer = calloc(); - final StructAlignmentInt64 a39 = a39Pointer.ref; - - a0 = -1; - a1 = 2; - a2 = -3; - a3 = 4; - a4 = -5; - a5 = 6; - a6 = -7; - a7 = 8; - a8 = -9.0; - a9 = 10.0; - a10 = -11.0; - a11 = 12.0; - a12 = -13.0; - a13 = 14.0; - a14 = -15.0; - a15 = 16.0; - a16 = -17; - a17 = 18; - a18.a0 = -19; - a19 = 20; - a20 = -21; - a21.a0 = 22; - a21.a1 = -23; - a22 = 24; - a23 = -25; - a24.a0 = 26; - a24.a1 = -27; - a24.a2 = 28; - a25 = -29; - a26 = 30; - a27.a0 = -31.0; - a27.a1 = 32.0; - a28 = -33; - a29 = 34; - a30.a0 = -35.0; - a30.a1 = 36; - a30.a2 = -37; - a31 = 38; - a32 = -39; - a33.a0 = 40; - a33.a1 = -41; - a33.a2 = 42; - a34 = -43; - a35 = 44; - a36.a0 = -45; - a36.a1 = 46; - a36.a2 = -47; - a37 = 48; - a38 = -49; - a39.a0 = 50; - a39.a1 = -51; - a39.a2 = 52; - - final result = passInt32x8Doublex8Int64Int8Struct1ByteIntInt64Int( - a0, - a1, - a2, - a3, - a4, - a5, - a6, - a7, - a8, - a9, - a10, - a11, - a12, - a13, - a14, - a15, - a16, - a17, - a18, - a19, - a20, - a21, - a22, - a23, - a24, - a25, - a26, - a27, - a28, - a29, - a30, - a31, - a32, - a33, - a34, - a35, - a36, - a37, - a38, - a39); - - print("result = $result"); - - Expect.approxEquals(26.0, result); - - calloc.free(a18Pointer); - calloc.free(a21Pointer); - calloc.free(a24Pointer); - calloc.free(a27Pointer); - calloc.free(a30Pointer); - calloc.free(a33Pointer); - calloc.free(a36Pointer); - calloc.free(a39Pointer); -} - -final passStructAlignmentInt16 = ffiTestFunctions.lookupFunction< - Int64 Function(StructAlignmentInt16), - int Function(StructAlignmentInt16)>("PassStructAlignmentInt16"); - -/// Test alignment and padding of 16 byte int within struct. -void testPassStructAlignmentInt16() { - final a0Pointer = calloc(); - final StructAlignmentInt16 a0 = a0Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - - final result = passStructAlignmentInt16(a0); - - print("result = $result"); - - Expect.equals(-2, result); - - calloc.free(a0Pointer); -} - -final passStructAlignmentInt32 = ffiTestFunctions.lookupFunction< - Int64 Function(StructAlignmentInt32), - int Function(StructAlignmentInt32)>("PassStructAlignmentInt32"); - -/// Test alignment and padding of 32 byte int within struct. -void testPassStructAlignmentInt32() { - final a0Pointer = calloc(); - final StructAlignmentInt32 a0 = a0Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - - final result = passStructAlignmentInt32(a0); - - print("result = $result"); - - Expect.equals(-2, result); - - calloc.free(a0Pointer); -} - -final passStructAlignmentInt64 = ffiTestFunctions.lookupFunction< - Int64 Function(StructAlignmentInt64), - int Function(StructAlignmentInt64)>("PassStructAlignmentInt64"); - -/// Test alignment and padding of 64 byte int within struct. -void testPassStructAlignmentInt64() { - final a0Pointer = calloc(); - final StructAlignmentInt64 a0 = a0Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - - final result = passStructAlignmentInt64(a0); - - print("result = $result"); - - Expect.equals(-2, result); - - calloc.free(a0Pointer); -} - -final passStruct8BytesNestedIntx10 = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt), - int Function( - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt, - Struct8BytesNestedInt)>("PassStruct8BytesNestedIntx10"); - -/// Simple nested struct. No alignment gaps on any architectures. -/// 10 arguments exhaust registers on all platforms. -void testPassStruct8BytesNestedIntx10() { - final a0Pointer = calloc(); - final Struct8BytesNestedInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct8BytesNestedInt a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct8BytesNestedInt a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct8BytesNestedInt a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct8BytesNestedInt a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct8BytesNestedInt a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct8BytesNestedInt a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct8BytesNestedInt a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct8BytesNestedInt a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct8BytesNestedInt a9 = a9Pointer.ref; - - a0.a0.a0 = -1; - a0.a0.a1 = 2; - a0.a1.a0 = -3; - a0.a1.a1 = 4; - a1.a0.a0 = -5; - a1.a0.a1 = 6; - a1.a1.a0 = -7; - a1.a1.a1 = 8; - a2.a0.a0 = -9; - a2.a0.a1 = 10; - a2.a1.a0 = -11; - a2.a1.a1 = 12; - a3.a0.a0 = -13; - a3.a0.a1 = 14; - a3.a1.a0 = -15; - a3.a1.a1 = 16; - a4.a0.a0 = -17; - a4.a0.a1 = 18; - a4.a1.a0 = -19; - a4.a1.a1 = 20; - a5.a0.a0 = -21; - a5.a0.a1 = 22; - a5.a1.a0 = -23; - a5.a1.a1 = 24; - a6.a0.a0 = -25; - a6.a0.a1 = 26; - a6.a1.a0 = -27; - a6.a1.a1 = 28; - a7.a0.a0 = -29; - a7.a0.a1 = 30; - a7.a1.a0 = -31; - a7.a1.a1 = 32; - a8.a0.a0 = -33; - a8.a0.a1 = 34; - a8.a1.a0 = -35; - a8.a1.a1 = 36; - a9.a0.a0 = -37; - a9.a0.a1 = 38; - a9.a1.a0 = -39; - a9.a1.a1 = 40; - - final result = - passStruct8BytesNestedIntx10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(20, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct8BytesNestedFloatx10 = ffiTestFunctions.lookupFunction< - Float Function( - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat), - double Function( - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat, - Struct8BytesNestedFloat)>("PassStruct8BytesNestedFloatx10"); - -/// Simple nested struct. No alignment gaps on any architectures. -/// 10 arguments exhaust fpu registers on all platforms. -void testPassStruct8BytesNestedFloatx10() { - final a0Pointer = calloc(); - final Struct8BytesNestedFloat a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct8BytesNestedFloat a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct8BytesNestedFloat a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct8BytesNestedFloat a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct8BytesNestedFloat a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct8BytesNestedFloat a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct8BytesNestedFloat a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct8BytesNestedFloat a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct8BytesNestedFloat a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct8BytesNestedFloat a9 = a9Pointer.ref; - - a0.a0.a0 = -1.0; - a0.a1.a0 = 2.0; - a1.a0.a0 = -3.0; - a1.a1.a0 = 4.0; - a2.a0.a0 = -5.0; - a2.a1.a0 = 6.0; - a3.a0.a0 = -7.0; - a3.a1.a0 = 8.0; - a4.a0.a0 = -9.0; - a4.a1.a0 = 10.0; - a5.a0.a0 = -11.0; - a5.a1.a0 = 12.0; - a6.a0.a0 = -13.0; - a6.a1.a0 = 14.0; - a7.a0.a0 = -15.0; - a7.a1.a0 = 16.0; - a8.a0.a0 = -17.0; - a8.a1.a0 = 18.0; - a9.a0.a0 = -19.0; - a9.a1.a0 = 20.0; - - final result = - passStruct8BytesNestedFloatx10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(10.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct8BytesNestedFloat2x10 = ffiTestFunctions.lookupFunction< - Float Function( - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2), - double Function( - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2, - Struct8BytesNestedFloat2)>("PassStruct8BytesNestedFloat2x10"); - -/// Simple nested struct. No alignment gaps on any architectures. -/// 10 arguments exhaust fpu registers on all platforms. -/// The nesting is irregular, testing homogenous float rules on arm and arm64, -/// and the fpu register usage on x64. -void testPassStruct8BytesNestedFloat2x10() { - final a0Pointer = calloc(); - final Struct8BytesNestedFloat2 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct8BytesNestedFloat2 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct8BytesNestedFloat2 a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct8BytesNestedFloat2 a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct8BytesNestedFloat2 a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct8BytesNestedFloat2 a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct8BytesNestedFloat2 a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct8BytesNestedFloat2 a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct8BytesNestedFloat2 a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct8BytesNestedFloat2 a9 = a9Pointer.ref; - - a0.a0.a0 = -1.0; - a0.a1 = 2.0; - a1.a0.a0 = -3.0; - a1.a1 = 4.0; - a2.a0.a0 = -5.0; - a2.a1 = 6.0; - a3.a0.a0 = -7.0; - a3.a1 = 8.0; - a4.a0.a0 = -9.0; - a4.a1 = 10.0; - a5.a0.a0 = -11.0; - a5.a1 = 12.0; - a6.a0.a0 = -13.0; - a6.a1 = 14.0; - a7.a0.a0 = -15.0; - a7.a1 = 16.0; - a8.a0.a0 = -17.0; - a8.a1 = 18.0; - a9.a0.a0 = -19.0; - a9.a1 = 20.0; - - final result = - passStruct8BytesNestedFloat2x10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(10.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct8BytesNestedMixedx10 = ffiTestFunctions.lookupFunction< - Double Function( - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed), - double Function( - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed, - Struct8BytesNestedMixed)>("PassStruct8BytesNestedMixedx10"); - -/// Simple nested struct. No alignment gaps on any architectures. -/// 10 arguments exhaust all registers on all platforms. -void testPassStruct8BytesNestedMixedx10() { - final a0Pointer = calloc(); - final Struct8BytesNestedMixed a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct8BytesNestedMixed a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct8BytesNestedMixed a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct8BytesNestedMixed a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct8BytesNestedMixed a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct8BytesNestedMixed a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct8BytesNestedMixed a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct8BytesNestedMixed a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct8BytesNestedMixed a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct8BytesNestedMixed a9 = a9Pointer.ref; - - a0.a0.a0 = -1; - a0.a0.a1 = 2; - a0.a1.a0 = -3.0; - a1.a0.a0 = 4; - a1.a0.a1 = -5; - a1.a1.a0 = 6.0; - a2.a0.a0 = -7; - a2.a0.a1 = 8; - a2.a1.a0 = -9.0; - a3.a0.a0 = 10; - a3.a0.a1 = -11; - a3.a1.a0 = 12.0; - a4.a0.a0 = -13; - a4.a0.a1 = 14; - a4.a1.a0 = -15.0; - a5.a0.a0 = 16; - a5.a0.a1 = -17; - a5.a1.a0 = 18.0; - a6.a0.a0 = -19; - a6.a0.a1 = 20; - a6.a1.a0 = -21.0; - a7.a0.a0 = 22; - a7.a0.a1 = -23; - a7.a1.a0 = 24.0; - a8.a0.a0 = -25; - a8.a0.a1 = 26; - a8.a1.a0 = -27.0; - a9.a0.a0 = 28; - a9.a0.a1 = -29; - a9.a1.a0 = 30.0; - - final result = - passStruct8BytesNestedMixedx10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(15.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct16BytesNestedIntx2 = ffiTestFunctions.lookupFunction< - Int64 Function(Struct16BytesNestedInt, Struct16BytesNestedInt), - int Function(Struct16BytesNestedInt, - Struct16BytesNestedInt)>("PassStruct16BytesNestedIntx2"); - -/// Deeper nested struct to test recursive member access. -void testPassStruct16BytesNestedIntx2() { - final a0Pointer = calloc(); - final Struct16BytesNestedInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct16BytesNestedInt a1 = a1Pointer.ref; - - a0.a0.a0.a0 = -1; - a0.a0.a0.a1 = 2; - a0.a0.a1.a0 = -3; - a0.a0.a1.a1 = 4; - a0.a1.a0.a0 = -5; - a0.a1.a0.a1 = 6; - a0.a1.a1.a0 = -7; - a0.a1.a1.a1 = 8; - a1.a0.a0.a0 = -9; - a1.a0.a0.a1 = 10; - a1.a0.a1.a0 = -11; - a1.a0.a1.a1 = 12; - a1.a1.a0.a0 = -13; - a1.a1.a0.a1 = 14; - a1.a1.a1.a0 = -15; - a1.a1.a1.a1 = 16; - - final result = passStruct16BytesNestedIntx2(a0, a1); - - print("result = $result"); - - Expect.equals(8, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); -} - -final passStruct32BytesNestedIntx2 = ffiTestFunctions.lookupFunction< - Int64 Function(Struct32BytesNestedInt, Struct32BytesNestedInt), - int Function(Struct32BytesNestedInt, - Struct32BytesNestedInt)>("PassStruct32BytesNestedIntx2"); - -/// Even deeper nested struct to test recursive member access. -void testPassStruct32BytesNestedIntx2() { - final a0Pointer = calloc(); - final Struct32BytesNestedInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct32BytesNestedInt a1 = a1Pointer.ref; - - a0.a0.a0.a0.a0 = -1; - a0.a0.a0.a0.a1 = 2; - a0.a0.a0.a1.a0 = -3; - a0.a0.a0.a1.a1 = 4; - a0.a0.a1.a0.a0 = -5; - a0.a0.a1.a0.a1 = 6; - a0.a0.a1.a1.a0 = -7; - a0.a0.a1.a1.a1 = 8; - a0.a1.a0.a0.a0 = -9; - a0.a1.a0.a0.a1 = 10; - a0.a1.a0.a1.a0 = -11; - a0.a1.a0.a1.a1 = 12; - a0.a1.a1.a0.a0 = -13; - a0.a1.a1.a0.a1 = 14; - a0.a1.a1.a1.a0 = -15; - a0.a1.a1.a1.a1 = 16; - a1.a0.a0.a0.a0 = -17; - a1.a0.a0.a0.a1 = 18; - a1.a0.a0.a1.a0 = -19; - a1.a0.a0.a1.a1 = 20; - a1.a0.a1.a0.a0 = -21; - a1.a0.a1.a0.a1 = 22; - a1.a0.a1.a1.a0 = -23; - a1.a0.a1.a1.a1 = 24; - a1.a1.a0.a0.a0 = -25; - a1.a1.a0.a0.a1 = 26; - a1.a1.a0.a1.a0 = -27; - a1.a1.a0.a1.a1 = 28; - a1.a1.a1.a0.a0 = -29; - a1.a1.a1.a0.a1 = 30; - a1.a1.a1.a1.a0 = -31; - a1.a1.a1.a1.a1 = 32; - - final result = passStruct32BytesNestedIntx2(a0, a1); - - print("result = $result"); - - Expect.equals(16, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); -} - -final passStructNestedIntStructAlignmentInt16 = ffiTestFunctions.lookupFunction< - Int64 Function(StructNestedIntStructAlignmentInt16), - int Function(StructNestedIntStructAlignmentInt16)>( - "PassStructNestedIntStructAlignmentInt16"); - -/// Test alignment and padding of nested struct with 16 byte int. -void testPassStructNestedIntStructAlignmentInt16() { - final a0Pointer = calloc(); - final StructNestedIntStructAlignmentInt16 a0 = a0Pointer.ref; - - a0.a0.a0 = -1; - a0.a0.a1 = 2; - a0.a0.a2 = -3; - a0.a1.a0 = 4; - a0.a1.a1 = -5; - a0.a1.a2 = 6; - - final result = passStructNestedIntStructAlignmentInt16(a0); - - print("result = $result"); - - Expect.equals(3, result); - - calloc.free(a0Pointer); -} - -final passStructNestedIntStructAlignmentInt32 = ffiTestFunctions.lookupFunction< - Int64 Function(StructNestedIntStructAlignmentInt32), - int Function(StructNestedIntStructAlignmentInt32)>( - "PassStructNestedIntStructAlignmentInt32"); - -/// Test alignment and padding of nested struct with 32 byte int. -void testPassStructNestedIntStructAlignmentInt32() { - final a0Pointer = calloc(); - final StructNestedIntStructAlignmentInt32 a0 = a0Pointer.ref; - - a0.a0.a0 = -1; - a0.a0.a1 = 2; - a0.a0.a2 = -3; - a0.a1.a0 = 4; - a0.a1.a1 = -5; - a0.a1.a2 = 6; - - final result = passStructNestedIntStructAlignmentInt32(a0); - - print("result = $result"); - - Expect.equals(3, result); - - calloc.free(a0Pointer); -} - -final passStructNestedIntStructAlignmentInt64 = ffiTestFunctions.lookupFunction< - Int64 Function(StructNestedIntStructAlignmentInt64), - int Function(StructNestedIntStructAlignmentInt64)>( - "PassStructNestedIntStructAlignmentInt64"); - -/// Test alignment and padding of nested struct with 64 byte int. -void testPassStructNestedIntStructAlignmentInt64() { - final a0Pointer = calloc(); - final StructNestedIntStructAlignmentInt64 a0 = a0Pointer.ref; - - a0.a0.a0 = -1; - a0.a0.a1 = 2; - a0.a0.a2 = -3; - a0.a1.a0 = 4; - a0.a1.a1 = -5; - a0.a1.a2 = 6; - - final result = passStructNestedIntStructAlignmentInt64(a0); - - print("result = $result"); - - Expect.equals(3, result); - - calloc.free(a0Pointer); -} - -final passStructNestedIrregularEvenBiggerx4 = ffiTestFunctions.lookupFunction< - Double Function( - StructNestedIrregularEvenBigger, - StructNestedIrregularEvenBigger, - StructNestedIrregularEvenBigger, - StructNestedIrregularEvenBigger), - double Function( - StructNestedIrregularEvenBigger, - StructNestedIrregularEvenBigger, - StructNestedIrregularEvenBigger, - StructNestedIrregularEvenBigger)>( - "PassStructNestedIrregularEvenBiggerx4"); - -/// Return big irregular struct as smoke test. -void testPassStructNestedIrregularEvenBiggerx4() { - final a0Pointer = calloc(); - final StructNestedIrregularEvenBigger a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final StructNestedIrregularEvenBigger a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final StructNestedIrregularEvenBigger a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final StructNestedIrregularEvenBigger a3 = a3Pointer.ref; - - a0.a0 = 1; - a0.a1.a0.a0 = 2; - a0.a1.a0.a1.a0.a0 = -3; - a0.a1.a0.a1.a0.a1 = 4; - a0.a1.a0.a1.a1.a0 = -5.0; - a0.a1.a0.a2 = 6; - a0.a1.a0.a3.a0.a0 = -7.0; - a0.a1.a0.a3.a1 = 8.0; - a0.a1.a0.a4 = 9; - a0.a1.a0.a5.a0.a0 = 10.0; - a0.a1.a0.a5.a1.a0 = -11.0; - a0.a1.a0.a6 = 12; - a0.a1.a1.a0.a0 = -13; - a0.a1.a1.a0.a1 = 14; - a0.a1.a1.a1.a0 = -15.0; - a0.a1.a2 = 16.0; - a0.a1.a3 = -17.0; - a0.a2.a0.a0 = 18; - a0.a2.a0.a1.a0.a0 = -19; - a0.a2.a0.a1.a0.a1 = 20; - a0.a2.a0.a1.a1.a0 = -21.0; - a0.a2.a0.a2 = 22; - a0.a2.a0.a3.a0.a0 = -23.0; - a0.a2.a0.a3.a1 = 24.0; - a0.a2.a0.a4 = 25; - a0.a2.a0.a5.a0.a0 = 26.0; - a0.a2.a0.a5.a1.a0 = -27.0; - a0.a2.a0.a6 = 28; - a0.a2.a1.a0.a0 = -29; - a0.a2.a1.a0.a1 = 30; - a0.a2.a1.a1.a0 = -31.0; - a0.a2.a2 = 32.0; - a0.a2.a3 = -33.0; - a0.a3 = 34.0; - a1.a0 = 35; - a1.a1.a0.a0 = 36; - a1.a1.a0.a1.a0.a0 = -37; - a1.a1.a0.a1.a0.a1 = 38; - a1.a1.a0.a1.a1.a0 = -39.0; - a1.a1.a0.a2 = 40; - a1.a1.a0.a3.a0.a0 = -41.0; - a1.a1.a0.a3.a1 = 42.0; - a1.a1.a0.a4 = 43; - a1.a1.a0.a5.a0.a0 = 44.0; - a1.a1.a0.a5.a1.a0 = -45.0; - a1.a1.a0.a6 = 46; - a1.a1.a1.a0.a0 = -47; - a1.a1.a1.a0.a1 = 48; - a1.a1.a1.a1.a0 = -49.0; - a1.a1.a2 = 50.0; - a1.a1.a3 = -51.0; - a1.a2.a0.a0 = 52; - a1.a2.a0.a1.a0.a0 = -53; - a1.a2.a0.a1.a0.a1 = 54; - a1.a2.a0.a1.a1.a0 = -55.0; - a1.a2.a0.a2 = 56; - a1.a2.a0.a3.a0.a0 = -57.0; - a1.a2.a0.a3.a1 = 58.0; - a1.a2.a0.a4 = 59; - a1.a2.a0.a5.a0.a0 = 60.0; - a1.a2.a0.a5.a1.a0 = -61.0; - a1.a2.a0.a6 = 62; - a1.a2.a1.a0.a0 = -63; - a1.a2.a1.a0.a1 = 64; - a1.a2.a1.a1.a0 = -65.0; - a1.a2.a2 = 66.0; - a1.a2.a3 = -67.0; - a1.a3 = 68.0; - a2.a0 = 69; - a2.a1.a0.a0 = 70; - a2.a1.a0.a1.a0.a0 = -71; - a2.a1.a0.a1.a0.a1 = 72; - a2.a1.a0.a1.a1.a0 = -73.0; - a2.a1.a0.a2 = 74; - a2.a1.a0.a3.a0.a0 = -75.0; - a2.a1.a0.a3.a1 = 76.0; - a2.a1.a0.a4 = 77; - a2.a1.a0.a5.a0.a0 = 78.0; - a2.a1.a0.a5.a1.a0 = -79.0; - a2.a1.a0.a6 = 80; - a2.a1.a1.a0.a0 = -81; - a2.a1.a1.a0.a1 = 82; - a2.a1.a1.a1.a0 = -83.0; - a2.a1.a2 = 84.0; - a2.a1.a3 = -85.0; - a2.a2.a0.a0 = 86; - a2.a2.a0.a1.a0.a0 = -87; - a2.a2.a0.a1.a0.a1 = 88; - a2.a2.a0.a1.a1.a0 = -89.0; - a2.a2.a0.a2 = 90; - a2.a2.a0.a3.a0.a0 = -91.0; - a2.a2.a0.a3.a1 = 92.0; - a2.a2.a0.a4 = 93; - a2.a2.a0.a5.a0.a0 = 94.0; - a2.a2.a0.a5.a1.a0 = -95.0; - a2.a2.a0.a6 = 96; - a2.a2.a1.a0.a0 = -97; - a2.a2.a1.a0.a1 = 98; - a2.a2.a1.a1.a0 = -99.0; - a2.a2.a2 = 100.0; - a2.a2.a3 = -101.0; - a2.a3 = 102.0; - a3.a0 = 103; - a3.a1.a0.a0 = 104; - a3.a1.a0.a1.a0.a0 = -105; - a3.a1.a0.a1.a0.a1 = 106; - a3.a1.a0.a1.a1.a0 = -107.0; - a3.a1.a0.a2 = 108; - a3.a1.a0.a3.a0.a0 = -109.0; - a3.a1.a0.a3.a1 = 110.0; - a3.a1.a0.a4 = 111; - a3.a1.a0.a5.a0.a0 = 112.0; - a3.a1.a0.a5.a1.a0 = -113.0; - a3.a1.a0.a6 = 114; - a3.a1.a1.a0.a0 = -115; - a3.a1.a1.a0.a1 = 116; - a3.a1.a1.a1.a0 = -117.0; - a3.a1.a2 = 118.0; - a3.a1.a3 = -119.0; - a3.a2.a0.a0 = 120; - a3.a2.a0.a1.a0.a0 = -121; - a3.a2.a0.a1.a0.a1 = 122; - a3.a2.a0.a1.a1.a0 = -123.0; - a3.a2.a0.a2 = 124; - a3.a2.a0.a3.a0.a0 = -125.0; - a3.a2.a0.a3.a1 = 126.0; - a3.a2.a0.a4 = 127; - a3.a2.a0.a5.a0.a0 = 128.0; - a3.a2.a0.a5.a1.a0 = -129.0; - a3.a2.a0.a6 = 130; - a3.a2.a1.a0.a0 = -131; - a3.a2.a1.a0.a1 = 132; - a3.a2.a1.a1.a0 = -133.0; - a3.a2.a2 = 134.0; - a3.a2.a3 = -135.0; - a3.a3 = 136.0; - - final result = passStructNestedIrregularEvenBiggerx4(a0, a1, a2, a3); - - print("result = $result"); - - Expect.approxEquals(1572.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); -} - -final passStruct8BytesInlineArrayIntx4 = ffiTestFunctions.lookupFunction< - Int32 Function(Struct8BytesInlineArrayInt, Struct8BytesInlineArrayInt, - Struct8BytesInlineArrayInt, Struct8BytesInlineArrayInt), - int Function( - Struct8BytesInlineArrayInt, - Struct8BytesInlineArrayInt, - Struct8BytesInlineArrayInt, - Struct8BytesInlineArrayInt)>("PassStruct8BytesInlineArrayIntx4"); - -/// Simple struct with inline array. -void testPassStruct8BytesInlineArrayIntx4() { - final a0Pointer = calloc(); - final Struct8BytesInlineArrayInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct8BytesInlineArrayInt a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct8BytesInlineArrayInt a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct8BytesInlineArrayInt a3 = a3Pointer.ref; - - a0.a0[0] = 1; - a0.a0[1] = 2; - a0.a0[2] = 3; - a0.a0[3] = 4; - a0.a0[4] = 5; - a0.a0[5] = 6; - a0.a0[6] = 7; - a0.a0[7] = 8; - a1.a0[0] = 9; - a1.a0[1] = 10; - a1.a0[2] = 11; - a1.a0[3] = 12; - a1.a0[4] = 13; - a1.a0[5] = 14; - a1.a0[6] = 15; - a1.a0[7] = 16; - a2.a0[0] = 17; - a2.a0[1] = 18; - a2.a0[2] = 19; - a2.a0[3] = 20; - a2.a0[4] = 21; - a2.a0[5] = 22; - a2.a0[6] = 23; - a2.a0[7] = 24; - a3.a0[0] = 25; - a3.a0[1] = 26; - a3.a0[2] = 27; - a3.a0[3] = 28; - a3.a0[4] = 29; - a3.a0[5] = 30; - a3.a0[6] = 31; - a3.a0[7] = 32; - - final result = passStruct8BytesInlineArrayIntx4(a0, a1, a2, a3); - - print("result = $result"); - - Expect.equals(528, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); -} - -final passStructInlineArrayIrregularx4 = ffiTestFunctions.lookupFunction< - Int32 Function(StructInlineArrayIrregular, StructInlineArrayIrregular, - StructInlineArrayIrregular, StructInlineArrayIrregular), - int Function( - StructInlineArrayIrregular, - StructInlineArrayIrregular, - StructInlineArrayIrregular, - StructInlineArrayIrregular)>("PassStructInlineArrayIrregularx4"); - -/// Irregular struct with inline array. -void testPassStructInlineArrayIrregularx4() { - final a0Pointer = calloc(); - final StructInlineArrayIrregular a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final StructInlineArrayIrregular a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final StructInlineArrayIrregular a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final StructInlineArrayIrregular a3 = a3Pointer.ref; - - a0.a0[0].a0 = -1; - a0.a0[0].a1 = 2; - a0.a0[1].a0 = -3; - a0.a0[1].a1 = 4; - a0.a1 = 5; - a1.a0[0].a0 = 6; - a1.a0[0].a1 = -7; - a1.a0[1].a0 = 8; - a1.a0[1].a1 = -9; - a1.a1 = 10; - a2.a0[0].a0 = -11; - a2.a0[0].a1 = 12; - a2.a0[1].a0 = -13; - a2.a0[1].a1 = 14; - a2.a1 = 15; - a3.a0[0].a0 = 16; - a3.a0[0].a1 = -17; - a3.a0[1].a0 = 18; - a3.a0[1].a1 = -19; - a3.a1 = 20; - - final result = passStructInlineArrayIrregularx4(a0, a1, a2, a3); - - print("result = $result"); - - Expect.equals(50, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); -} - -final passStructInlineArray100Bytes = ffiTestFunctions.lookupFunction< - Int32 Function(StructInlineArray100Bytes), - int Function(StructInlineArray100Bytes)>("PassStructInlineArray100Bytes"); - -/// Regular larger struct with inline array. -void testPassStructInlineArray100Bytes() { - final a0Pointer = calloc(); - final StructInlineArray100Bytes a0 = a0Pointer.ref; - - a0.a0[0] = 1; - a0.a0[1] = 2; - a0.a0[2] = 3; - a0.a0[3] = 4; - a0.a0[4] = 5; - a0.a0[5] = 6; - a0.a0[6] = 7; - a0.a0[7] = 8; - a0.a0[8] = 9; - a0.a0[9] = 10; - a0.a0[10] = 11; - a0.a0[11] = 12; - a0.a0[12] = 13; - a0.a0[13] = 14; - a0.a0[14] = 15; - a0.a0[15] = 16; - a0.a0[16] = 17; - a0.a0[17] = 18; - a0.a0[18] = 19; - a0.a0[19] = 20; - a0.a0[20] = 21; - a0.a0[21] = 22; - a0.a0[22] = 23; - a0.a0[23] = 24; - a0.a0[24] = 25; - a0.a0[25] = 26; - a0.a0[26] = 27; - a0.a0[27] = 28; - a0.a0[28] = 29; - a0.a0[29] = 30; - a0.a0[30] = 31; - a0.a0[31] = 32; - a0.a0[32] = 33; - a0.a0[33] = 34; - a0.a0[34] = 35; - a0.a0[35] = 36; - a0.a0[36] = 37; - a0.a0[37] = 38; - a0.a0[38] = 39; - a0.a0[39] = 40; - a0.a0[40] = 41; - a0.a0[41] = 42; - a0.a0[42] = 43; - a0.a0[43] = 44; - a0.a0[44] = 45; - a0.a0[45] = 46; - a0.a0[46] = 47; - a0.a0[47] = 48; - a0.a0[48] = 49; - a0.a0[49] = 50; - a0.a0[50] = 51; - a0.a0[51] = 52; - a0.a0[52] = 53; - a0.a0[53] = 54; - a0.a0[54] = 55; - a0.a0[55] = 56; - a0.a0[56] = 57; - a0.a0[57] = 58; - a0.a0[58] = 59; - a0.a0[59] = 60; - a0.a0[60] = 61; - a0.a0[61] = 62; - a0.a0[62] = 63; - a0.a0[63] = 64; - a0.a0[64] = 65; - a0.a0[65] = 66; - a0.a0[66] = 67; - a0.a0[67] = 68; - a0.a0[68] = 69; - a0.a0[69] = 70; - a0.a0[70] = 71; - a0.a0[71] = 72; - a0.a0[72] = 73; - a0.a0[73] = 74; - a0.a0[74] = 75; - a0.a0[75] = 76; - a0.a0[76] = 77; - a0.a0[77] = 78; - a0.a0[78] = 79; - a0.a0[79] = 80; - a0.a0[80] = 81; - a0.a0[81] = 82; - a0.a0[82] = 83; - a0.a0[83] = 84; - a0.a0[84] = 85; - a0.a0[85] = 86; - a0.a0[86] = 87; - a0.a0[87] = 88; - a0.a0[88] = 89; - a0.a0[89] = 90; - a0.a0[90] = 91; - a0.a0[91] = 92; - a0.a0[92] = 93; - a0.a0[93] = 94; - a0.a0[94] = 95; - a0.a0[95] = 96; - a0.a0[96] = 97; - a0.a0[97] = 98; - a0.a0[98] = 99; - a0.a0[99] = 100; - - final result = passStructInlineArray100Bytes(a0); - - print("result = $result"); - - Expect.equals(5050, result); - - calloc.free(a0Pointer); -} - -final passStructStruct16BytesHomogeneousFloat2x5 = - ffiTestFunctions.lookupFunction< - Float Function( - StructStruct16BytesHomogeneousFloat2, - StructStruct16BytesHomogeneousFloat2, - StructStruct16BytesHomogeneousFloat2, - StructStruct16BytesHomogeneousFloat2, - StructStruct16BytesHomogeneousFloat2), - double Function( - StructStruct16BytesHomogeneousFloat2, - StructStruct16BytesHomogeneousFloat2, - StructStruct16BytesHomogeneousFloat2, - StructStruct16BytesHomogeneousFloat2, - StructStruct16BytesHomogeneousFloat2)>( - "PassStructStruct16BytesHomogeneousFloat2x5"); - -/// Arguments in FPU registers on arm hardfp and arm64. -/// 5 struct arguments will exhaust available registers. -void testPassStructStruct16BytesHomogeneousFloat2x5() { - final a0Pointer = calloc(); - final StructStruct16BytesHomogeneousFloat2 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final StructStruct16BytesHomogeneousFloat2 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final StructStruct16BytesHomogeneousFloat2 a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final StructStruct16BytesHomogeneousFloat2 a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final StructStruct16BytesHomogeneousFloat2 a4 = a4Pointer.ref; - - a0.a0.a0 = -1.0; - a0.a1[0].a0 = 2.0; - a0.a1[1].a0 = -3.0; - a0.a2 = 4.0; - a1.a0.a0 = -5.0; - a1.a1[0].a0 = 6.0; - a1.a1[1].a0 = -7.0; - a1.a2 = 8.0; - a2.a0.a0 = -9.0; - a2.a1[0].a0 = 10.0; - a2.a1[1].a0 = -11.0; - a2.a2 = 12.0; - a3.a0.a0 = -13.0; - a3.a1[0].a0 = 14.0; - a3.a1[1].a0 = -15.0; - a3.a2 = 16.0; - a4.a0.a0 = -17.0; - a4.a1[0].a0 = 18.0; - a4.a1[1].a0 = -19.0; - a4.a2 = 20.0; - - final result = passStructStruct16BytesHomogeneousFloat2x5(a0, a1, a2, a3, a4); - - print("result = $result"); - - Expect.approxEquals(10.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); -} - -final passStructStruct32BytesHomogeneousDouble2x5 = - ffiTestFunctions.lookupFunction< - Double Function( - StructStruct32BytesHomogeneousDouble2, - StructStruct32BytesHomogeneousDouble2, - StructStruct32BytesHomogeneousDouble2, - StructStruct32BytesHomogeneousDouble2, - StructStruct32BytesHomogeneousDouble2), - double Function( - StructStruct32BytesHomogeneousDouble2, - StructStruct32BytesHomogeneousDouble2, - StructStruct32BytesHomogeneousDouble2, - StructStruct32BytesHomogeneousDouble2, - StructStruct32BytesHomogeneousDouble2)>( - "PassStructStruct32BytesHomogeneousDouble2x5"); - -/// Arguments in FPU registers on arm64. -/// 5 struct arguments will exhaust available registers. -void testPassStructStruct32BytesHomogeneousDouble2x5() { - final a0Pointer = calloc(); - final StructStruct32BytesHomogeneousDouble2 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final StructStruct32BytesHomogeneousDouble2 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final StructStruct32BytesHomogeneousDouble2 a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final StructStruct32BytesHomogeneousDouble2 a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final StructStruct32BytesHomogeneousDouble2 a4 = a4Pointer.ref; - - a0.a0.a0 = -1.0; - a0.a1[0].a0 = 2.0; - a0.a1[1].a0 = -3.0; - a0.a2 = 4.0; - a1.a0.a0 = -5.0; - a1.a1[0].a0 = 6.0; - a1.a1[1].a0 = -7.0; - a1.a2 = 8.0; - a2.a0.a0 = -9.0; - a2.a1[0].a0 = 10.0; - a2.a1[1].a0 = -11.0; - a2.a2 = 12.0; - a3.a0.a0 = -13.0; - a3.a1[0].a0 = 14.0; - a3.a1[1].a0 = -15.0; - a3.a2 = 16.0; - a4.a0.a0 = -17.0; - a4.a1[0].a0 = 18.0; - a4.a1[1].a0 = -19.0; - a4.a2 = 20.0; - - final result = - passStructStruct32BytesHomogeneousDouble2x5(a0, a1, a2, a3, a4); - - print("result = $result"); - - Expect.approxEquals(10.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); -} - -final passStructStruct16BytesMixed3x10 = ffiTestFunctions.lookupFunction< - Float Function( - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3), - double Function( - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3, - StructStruct16BytesMixed3)>("PassStructStruct16BytesMixed3x10"); - -/// On x64, arguments are split over FP and int registers. -/// On x64, it will exhaust the integer registers with the 6th argument. -/// The rest goes on the stack. -/// On arm, arguments are 4 byte aligned. -void testPassStructStruct16BytesMixed3x10() { - final a0Pointer = calloc(); - final StructStruct16BytesMixed3 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final StructStruct16BytesMixed3 a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final StructStruct16BytesMixed3 a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final StructStruct16BytesMixed3 a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final StructStruct16BytesMixed3 a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final StructStruct16BytesMixed3 a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final StructStruct16BytesMixed3 a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final StructStruct16BytesMixed3 a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final StructStruct16BytesMixed3 a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final StructStruct16BytesMixed3 a9 = a9Pointer.ref; - - a0.a0.a0 = -1.0; - a0.a1[0].a0 = 2.0; - a0.a1[0].a1 = -3; - a0.a1[0].a2 = 4; - a0.a2[0] = -5; - a0.a2[1] = 6; - a1.a0.a0 = -7.0; - a1.a1[0].a0 = 8.0; - a1.a1[0].a1 = -9; - a1.a1[0].a2 = 10; - a1.a2[0] = -11; - a1.a2[1] = 12; - a2.a0.a0 = -13.0; - a2.a1[0].a0 = 14.0; - a2.a1[0].a1 = -15; - a2.a1[0].a2 = 16; - a2.a2[0] = -17; - a2.a2[1] = 18; - a3.a0.a0 = -19.0; - a3.a1[0].a0 = 20.0; - a3.a1[0].a1 = -21; - a3.a1[0].a2 = 22; - a3.a2[0] = -23; - a3.a2[1] = 24; - a4.a0.a0 = -25.0; - a4.a1[0].a0 = 26.0; - a4.a1[0].a1 = -27; - a4.a1[0].a2 = 28; - a4.a2[0] = -29; - a4.a2[1] = 30; - a5.a0.a0 = -31.0; - a5.a1[0].a0 = 32.0; - a5.a1[0].a1 = -33; - a5.a1[0].a2 = 34; - a5.a2[0] = -35; - a5.a2[1] = 36; - a6.a0.a0 = -37.0; - a6.a1[0].a0 = 38.0; - a6.a1[0].a1 = -39; - a6.a1[0].a2 = 40; - a6.a2[0] = -41; - a6.a2[1] = 42; - a7.a0.a0 = -43.0; - a7.a1[0].a0 = 44.0; - a7.a1[0].a1 = -45; - a7.a1[0].a2 = 46; - a7.a2[0] = -47; - a7.a2[1] = 48; - a8.a0.a0 = -49.0; - a8.a1[0].a0 = 50.0; - a8.a1[0].a1 = -51; - a8.a1[0].a2 = 52; - a8.a2[0] = -53; - a8.a2[1] = 54; - a9.a0.a0 = -55.0; - a9.a1[0].a0 = 56.0; - a9.a1[0].a1 = -57; - a9.a1[0].a2 = 58; - a9.a2[0] = -59; - a9.a2[1] = 60; - - final result = - passStructStruct16BytesMixed3x10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(30.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passUint8Struct32BytesInlineArrayMultiDimensionalI = - ffiTestFunctions.lookupFunction< - Uint32 Function( - Uint8, - Struct32BytesInlineArrayMultiDimensionalInt, - Uint8, - Struct8BytesInlineArrayMultiDimensionalInt, - Uint8, - Struct8BytesInlineArrayMultiDimensionalInt, - Uint8), - int Function( - int, - Struct32BytesInlineArrayMultiDimensionalInt, - int, - Struct8BytesInlineArrayMultiDimensionalInt, - int, - Struct8BytesInlineArrayMultiDimensionalInt, - int)>("PassUint8Struct32BytesInlineArrayMultiDimensionalI"); - -/// Test multi dimensional inline array struct as argument. -void testPassUint8Struct32BytesInlineArrayMultiDimensionalI() { - int a0; - final a1Pointer = calloc(); - final Struct32BytesInlineArrayMultiDimensionalInt a1 = a1Pointer.ref; - int a2; - final a3Pointer = calloc(); - final Struct8BytesInlineArrayMultiDimensionalInt a3 = a3Pointer.ref; - int a4; - final a5Pointer = calloc(); - final Struct8BytesInlineArrayMultiDimensionalInt a5 = a5Pointer.ref; - int a6; - - a0 = 1; - a1.a0[0][0][0][0][0] = 2; - a1.a0[0][0][0][0][1] = 3; - a1.a0[0][0][0][1][0] = 4; - a1.a0[0][0][0][1][1] = 5; - a1.a0[0][0][1][0][0] = 6; - a1.a0[0][0][1][0][1] = 7; - a1.a0[0][0][1][1][0] = 8; - a1.a0[0][0][1][1][1] = 9; - a1.a0[0][1][0][0][0] = 10; - a1.a0[0][1][0][0][1] = 11; - a1.a0[0][1][0][1][0] = 12; - a1.a0[0][1][0][1][1] = 13; - a1.a0[0][1][1][0][0] = 14; - a1.a0[0][1][1][0][1] = 15; - a1.a0[0][1][1][1][0] = 16; - a1.a0[0][1][1][1][1] = 17; - a1.a0[1][0][0][0][0] = 18; - a1.a0[1][0][0][0][1] = 19; - a1.a0[1][0][0][1][0] = 20; - a1.a0[1][0][0][1][1] = 21; - a1.a0[1][0][1][0][0] = 22; - a1.a0[1][0][1][0][1] = 23; - a1.a0[1][0][1][1][0] = 24; - a1.a0[1][0][1][1][1] = 25; - a1.a0[1][1][0][0][0] = 26; - a1.a0[1][1][0][0][1] = 27; - a1.a0[1][1][0][1][0] = 28; - a1.a0[1][1][0][1][1] = 29; - a1.a0[1][1][1][0][0] = 30; - a1.a0[1][1][1][0][1] = 31; - a1.a0[1][1][1][1][0] = 32; - a1.a0[1][1][1][1][1] = 33; - a2 = 34; - a3.a0[0][0][0] = 35; - a3.a0[0][0][1] = 36; - a3.a0[0][1][0] = 37; - a3.a0[0][1][1] = 38; - a3.a0[1][0][0] = 39; - a3.a0[1][0][1] = 40; - a3.a0[1][1][0] = 41; - a3.a0[1][1][1] = 42; - a4 = 43; - a5.a0[0][0][0] = 44; - a5.a0[0][0][1] = 45; - a5.a0[0][1][0] = 46; - a5.a0[0][1][1] = 47; - a5.a0[1][0][0] = 48; - a5.a0[1][0][1] = 49; - a5.a0[1][1][0] = 50; - a5.a0[1][1][1] = 51; - a6 = 52; - - final result = passUint8Struct32BytesInlineArrayMultiDimensionalI( - a0, a1, a2, a3, a4, a5, a6); - - print("result = $result"); - - Expect.equals(1378, result); - - calloc.free(a1Pointer); - calloc.free(a3Pointer); - calloc.free(a5Pointer); -} - -final passUint8Struct4BytesInlineArrayMultiDimensionalIn = - ffiTestFunctions.lookupFunction< - Uint32 Function( - Uint8, Struct4BytesInlineArrayMultiDimensionalInt, Uint8), - int Function(int, Struct4BytesInlineArrayMultiDimensionalInt, - int)>("PassUint8Struct4BytesInlineArrayMultiDimensionalIn"); - -/// Test struct in multi dimensional inline array. -void testPassUint8Struct4BytesInlineArrayMultiDimensionalIn() { - int a0; - final a1Pointer = calloc(); - final Struct4BytesInlineArrayMultiDimensionalInt a1 = a1Pointer.ref; - int a2; - - a0 = 1; - a1.a0[0][0].a0 = 2; - a1.a0[0][1].a0 = -3; - a1.a0[1][0].a0 = 4; - a1.a0[1][1].a0 = -5; - a2 = 6; - - final result = passUint8Struct4BytesInlineArrayMultiDimensionalIn(a0, a1, a2); - - print("result = $result"); - - Expect.equals(5, result); - - calloc.free(a1Pointer); -} - -final passStruct3BytesPackedIntx10 = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt), - int Function( - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt, - Struct3BytesPackedInt)>("PassStruct3BytesPackedIntx10"); - -/// Small struct with mis-aligned member. -void testPassStruct3BytesPackedIntx10() { - final a0Pointer = calloc(); - final Struct3BytesPackedInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct3BytesPackedInt a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct3BytesPackedInt a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct3BytesPackedInt a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct3BytesPackedInt a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct3BytesPackedInt a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct3BytesPackedInt a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct3BytesPackedInt a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct3BytesPackedInt a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct3BytesPackedInt a9 = a9Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a1.a0 = -3; - a1.a1 = 4; - a2.a0 = -5; - a2.a1 = 6; - a3.a0 = -7; - a3.a1 = 8; - a4.a0 = -9; - a4.a1 = 10; - a5.a0 = -11; - a5.a1 = 12; - a6.a0 = -13; - a6.a1 = 14; - a7.a0 = -15; - a7.a1 = 16; - a8.a0 = -17; - a8.a1 = 18; - a9.a0 = -19; - a9.a1 = 20; - - final result = - passStruct3BytesPackedIntx10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(10, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct8BytesPackedIntx10 = ffiTestFunctions.lookupFunction< - Int64 Function( - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt), - int Function( - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt, - Struct8BytesPackedInt)>("PassStruct8BytesPackedIntx10"); - -/// Struct with mis-aligned member. -void testPassStruct8BytesPackedIntx10() { - final a0Pointer = calloc(); - final Struct8BytesPackedInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct8BytesPackedInt a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct8BytesPackedInt a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct8BytesPackedInt a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct8BytesPackedInt a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct8BytesPackedInt a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct8BytesPackedInt a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct8BytesPackedInt a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct8BytesPackedInt a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct8BytesPackedInt a9 = a9Pointer.ref; - - a0.a0 = 1; - a0.a1 = 2; - a0.a2 = 3; - a0.a3 = 4; - a0.a4 = 5; - a1.a0 = 6; - a1.a1 = 7; - a1.a2 = 8; - a1.a3 = 9; - a1.a4 = 10; - a2.a0 = 11; - a2.a1 = 12; - a2.a2 = 13; - a2.a3 = 14; - a2.a4 = 15; - a3.a0 = 16; - a3.a1 = 17; - a3.a2 = 18; - a3.a3 = 19; - a3.a4 = 20; - a4.a0 = 21; - a4.a1 = 22; - a4.a2 = 23; - a4.a3 = 24; - a4.a4 = 25; - a5.a0 = 26; - a5.a1 = 27; - a5.a2 = 28; - a5.a3 = 29; - a5.a4 = 30; - a6.a0 = 31; - a6.a1 = 32; - a6.a2 = 33; - a6.a3 = 34; - a6.a4 = 35; - a7.a0 = 36; - a7.a1 = 37; - a7.a2 = 38; - a7.a3 = 39; - a7.a4 = 40; - a8.a0 = 41; - a8.a1 = 42; - a8.a2 = 43; - a8.a3 = 44; - a8.a4 = 45; - a9.a0 = 46; - a9.a1 = 47; - a9.a2 = 48; - a9.a3 = 49; - a9.a4 = 50; - - final result = - passStruct8BytesPackedIntx10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.equals(1275, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct9BytesPackedMixedx10DoubleInt32x2 = - ffiTestFunctions.lookupFunction< - Double Function( - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Double, - Int32, - Int32), - double Function( - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - Struct9BytesPackedMixed, - double, - int, - int)>("PassStruct9BytesPackedMixedx10DoubleInt32x2"); - -/// Struct with mis-aligned member. -/// Tests backfilling of CPU and FPU registers. -void testPassStruct9BytesPackedMixedx10DoubleInt32x2() { - final a0Pointer = calloc(); - final Struct9BytesPackedMixed a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct9BytesPackedMixed a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Struct9BytesPackedMixed a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Struct9BytesPackedMixed a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Struct9BytesPackedMixed a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Struct9BytesPackedMixed a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Struct9BytesPackedMixed a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Struct9BytesPackedMixed a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Struct9BytesPackedMixed a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Struct9BytesPackedMixed a9 = a9Pointer.ref; - double a10; - int a11; - int a12; - - a0.a0 = 1; - a0.a1 = 2.0; - a1.a0 = 3; - a1.a1 = 4.0; - a2.a0 = 5; - a2.a1 = 6.0; - a3.a0 = 7; - a3.a1 = 8.0; - a4.a0 = 9; - a4.a1 = 10.0; - a5.a0 = 11; - a5.a1 = 12.0; - a6.a0 = 13; - a6.a1 = 14.0; - a7.a0 = 15; - a7.a1 = 16.0; - a8.a0 = 17; - a8.a1 = 18.0; - a9.a0 = 19; - a9.a1 = 20.0; - a10 = -21.0; - a11 = 22; - a12 = -23; - - final result = passStruct9BytesPackedMixedx10DoubleInt32x2( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); - - print("result = $result"); - - Expect.approxEquals(188.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passStruct5BytesPackedMixed = ffiTestFunctions.lookupFunction< - Double Function(Struct5BytesPackedMixed), - double Function(Struct5BytesPackedMixed)>("PassStruct5BytesPackedMixed"); - -/// This packed struct happens to have only aligned members. -void testPassStruct5BytesPackedMixed() { - final a0Pointer = calloc(); - final Struct5BytesPackedMixed a0 = a0Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2; - - final result = passStruct5BytesPackedMixed(a0); - - print("result = $result"); - - Expect.approxEquals(1.0, result); - - calloc.free(a0Pointer); -} - -final passStructNestedAlignmentStruct5BytesPackedMixed = - ffiTestFunctions.lookupFunction< - Double Function(StructNestedAlignmentStruct5BytesPackedMixed), - double Function(StructNestedAlignmentStruct5BytesPackedMixed)>( - "PassStructNestedAlignmentStruct5BytesPackedMixed"); - -/// Check alignment of packed struct in non-packed struct. -void testPassStructNestedAlignmentStruct5BytesPackedMixed() { - final a0Pointer = calloc(); - final StructNestedAlignmentStruct5BytesPackedMixed a0 = a0Pointer.ref; - - a0.a0 = 1; - a0.a1.a0 = 2.0; - a0.a1.a1 = 3; - - final result = passStructNestedAlignmentStruct5BytesPackedMixed(a0); - - print("result = $result"); - - Expect.approxEquals(6.0, result); - - calloc.free(a0Pointer); -} - -final passStruct6BytesInlineArrayInt = ffiTestFunctions.lookupFunction< - Double Function(Struct6BytesInlineArrayInt), - double Function( - Struct6BytesInlineArrayInt)>("PassStruct6BytesInlineArrayInt"); - -/// Check alignment of packed struct array in non-packed struct. -void testPassStruct6BytesInlineArrayInt() { - final a0Pointer = calloc(); - final Struct6BytesInlineArrayInt a0 = a0Pointer.ref; - - a0.a0[0].a0 = -1; - a0.a0[0].a1 = 2; - a0.a0[1].a0 = -3; - a0.a0[1].a1 = 4; - - final result = passStruct6BytesInlineArrayInt(a0); - - print("result = $result"); - - Expect.approxEquals(2.0, result); - - calloc.free(a0Pointer); -} - -final passStruct15BytesInlineArrayMixed = ffiTestFunctions.lookupFunction< - Double Function(Struct15BytesInlineArrayMixed), - double Function( - Struct15BytesInlineArrayMixed)>("PassStruct15BytesInlineArrayMixed"); - -/// Check alignment of packed struct array in non-packed struct. -void testPassStruct15BytesInlineArrayMixed() { - final a0Pointer = calloc(); - final Struct15BytesInlineArrayMixed a0 = a0Pointer.ref; - - a0.a0[0].a0 = -1.0; - a0.a0[0].a1 = 2; - a0.a0[1].a0 = -3.0; - a0.a0[1].a1 = 4; - a0.a0[2].a0 = -5.0; - a0.a0[2].a1 = 6; - - final result = passStruct15BytesInlineArrayMixed(a0); - - print("result = $result"); - - Expect.approxEquals(3.0, result); - - calloc.free(a0Pointer); -} - -final passUnion4BytesMixedx10 = ffiTestFunctions.lookupFunction< - Double Function( - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed), - double Function( - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed, - Union4BytesMixed)>("PassUnion4BytesMixedx10"); - -/// Check placement of mixed integer/float union. -void testPassUnion4BytesMixedx10() { - final a0Pointer = calloc(); - final Union4BytesMixed a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Union4BytesMixed a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Union4BytesMixed a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Union4BytesMixed a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Union4BytesMixed a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Union4BytesMixed a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Union4BytesMixed a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Union4BytesMixed a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Union4BytesMixed a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Union4BytesMixed a9 = a9Pointer.ref; - - a0.a0 = 1; - a1.a0 = 2; - a2.a0 = 3; - a3.a0 = 4; - a4.a0 = 5; - a5.a0 = 6; - a6.a0 = 7; - a7.a0 = 8; - a8.a0 = 9; - a9.a0 = 10; - - final result = - passUnion4BytesMixedx10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(55.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passUnion8BytesNestedFloatx10 = ffiTestFunctions.lookupFunction< - Double Function( - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat), - double Function( - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat, - Union8BytesNestedFloat)>("PassUnion8BytesNestedFloatx10"); - -/// Check placement of mixed floats union. -void testPassUnion8BytesNestedFloatx10() { - final a0Pointer = calloc(); - final Union8BytesNestedFloat a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Union8BytesNestedFloat a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Union8BytesNestedFloat a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Union8BytesNestedFloat a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Union8BytesNestedFloat a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Union8BytesNestedFloat a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Union8BytesNestedFloat a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Union8BytesNestedFloat a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Union8BytesNestedFloat a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Union8BytesNestedFloat a9 = a9Pointer.ref; - - a0.a0 = -1.0; - a1.a0 = 2.0; - a2.a0 = -3.0; - a3.a0 = 4.0; - a4.a0 = -5.0; - a5.a0 = 6.0; - a6.a0 = -7.0; - a7.a0 = 8.0; - a8.a0 = -9.0; - a9.a0 = 10.0; - - final result = - passUnion8BytesNestedFloatx10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(5.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passUnion9BytesNestedIntx10 = ffiTestFunctions.lookupFunction< - Double Function( - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt), - double Function( - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt, - Union9BytesNestedInt)>("PassUnion9BytesNestedIntx10"); - -/// Mixed-size union argument. -void testPassUnion9BytesNestedIntx10() { - final a0Pointer = calloc(); - final Union9BytesNestedInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Union9BytesNestedInt a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Union9BytesNestedInt a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Union9BytesNestedInt a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Union9BytesNestedInt a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Union9BytesNestedInt a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Union9BytesNestedInt a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Union9BytesNestedInt a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Union9BytesNestedInt a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Union9BytesNestedInt a9 = a9Pointer.ref; - - a0.a0.a0 = -1; - a0.a0.a1 = 2; - a0.a0.a2 = -3; - a1.a0.a0 = 4; - a1.a0.a1 = -5; - a1.a0.a2 = 6; - a2.a0.a0 = -7; - a2.a0.a1 = 8; - a2.a0.a2 = -9; - a3.a0.a0 = 10; - a3.a0.a1 = -11; - a3.a0.a2 = 12; - a4.a0.a0 = -13; - a4.a0.a1 = 14; - a4.a0.a2 = -15; - a5.a0.a0 = 16; - a5.a0.a1 = -17; - a5.a0.a2 = 18; - a6.a0.a0 = -19; - a6.a0.a1 = 20; - a6.a0.a2 = -21; - a7.a0.a0 = 22; - a7.a0.a1 = -23; - a7.a0.a2 = 24; - a8.a0.a0 = -25; - a8.a0.a1 = 26; - a8.a0.a2 = -27; - a9.a0.a0 = 28; - a9.a0.a1 = -29; - a9.a0.a2 = 30; - - final result = - passUnion9BytesNestedIntx10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(15.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passUnion16BytesNestedInlineArrayFloatx10 = - ffiTestFunctions.lookupFunction< - Double Function( - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat), - double Function( - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat, - Union16BytesNestedInlineArrayFloat)>( - "PassUnion16BytesNestedInlineArrayFloatx10"); - -/// Union with homogenous floats. -void testPassUnion16BytesNestedInlineArrayFloatx10() { - final a0Pointer = calloc(); - final Union16BytesNestedInlineArrayFloat a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Union16BytesNestedInlineArrayFloat a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Union16BytesNestedInlineArrayFloat a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Union16BytesNestedInlineArrayFloat a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Union16BytesNestedInlineArrayFloat a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Union16BytesNestedInlineArrayFloat a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Union16BytesNestedInlineArrayFloat a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Union16BytesNestedInlineArrayFloat a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Union16BytesNestedInlineArrayFloat a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Union16BytesNestedInlineArrayFloat a9 = a9Pointer.ref; - - a0.a0[0] = -1.0; - a0.a0[1] = 2.0; - a0.a0[2] = -3.0; - a0.a0[3] = 4.0; - a1.a0[0] = -5.0; - a1.a0[1] = 6.0; - a1.a0[2] = -7.0; - a1.a0[3] = 8.0; - a2.a0[0] = -9.0; - a2.a0[1] = 10.0; - a2.a0[2] = -11.0; - a2.a0[3] = 12.0; - a3.a0[0] = -13.0; - a3.a0[1] = 14.0; - a3.a0[2] = -15.0; - a3.a0[3] = 16.0; - a4.a0[0] = -17.0; - a4.a0[1] = 18.0; - a4.a0[2] = -19.0; - a4.a0[3] = 20.0; - a5.a0[0] = -21.0; - a5.a0[1] = 22.0; - a5.a0[2] = -23.0; - a5.a0[3] = 24.0; - a6.a0[0] = -25.0; - a6.a0[1] = 26.0; - a6.a0[2] = -27.0; - a6.a0[3] = 28.0; - a7.a0[0] = -29.0; - a7.a0[1] = 30.0; - a7.a0[2] = -31.0; - a7.a0[3] = 32.0; - a8.a0[0] = -33.0; - a8.a0[1] = 34.0; - a8.a0[2] = -35.0; - a8.a0[3] = 36.0; - a9.a0[0] = -37.0; - a9.a0[1] = 38.0; - a9.a0[2] = -39.0; - a9.a0[3] = 40.0; - - final result = passUnion16BytesNestedInlineArrayFloatx10( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(20.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passUnion16BytesNestedFloatx10 = ffiTestFunctions.lookupFunction< - Double Function( - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat), - double Function( - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat, - Union16BytesNestedFloat)>("PassUnion16BytesNestedFloatx10"); - -/// Union with homogenous floats. -void testPassUnion16BytesNestedFloatx10() { - final a0Pointer = calloc(); - final Union16BytesNestedFloat a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Union16BytesNestedFloat a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final Union16BytesNestedFloat a2 = a2Pointer.ref; - final a3Pointer = calloc(); - final Union16BytesNestedFloat a3 = a3Pointer.ref; - final a4Pointer = calloc(); - final Union16BytesNestedFloat a4 = a4Pointer.ref; - final a5Pointer = calloc(); - final Union16BytesNestedFloat a5 = a5Pointer.ref; - final a6Pointer = calloc(); - final Union16BytesNestedFloat a6 = a6Pointer.ref; - final a7Pointer = calloc(); - final Union16BytesNestedFloat a7 = a7Pointer.ref; - final a8Pointer = calloc(); - final Union16BytesNestedFloat a8 = a8Pointer.ref; - final a9Pointer = calloc(); - final Union16BytesNestedFloat a9 = a9Pointer.ref; - - a0.a0.a0 = -1.0; - a0.a0.a1 = 2.0; - a1.a0.a0 = -3.0; - a1.a0.a1 = 4.0; - a2.a0.a0 = -5.0; - a2.a0.a1 = 6.0; - a3.a0.a0 = -7.0; - a3.a0.a1 = 8.0; - a4.a0.a0 = -9.0; - a4.a0.a1 = 10.0; - a5.a0.a0 = -11.0; - a5.a0.a1 = 12.0; - a6.a0.a0 = -13.0; - a6.a0.a1 = 14.0; - a7.a0.a0 = -15.0; - a7.a0.a1 = 16.0; - a8.a0.a0 = -17.0; - a8.a0.a1 = 18.0; - a9.a0.a0 = -19.0; - a9.a0.a1 = 20.0; - - final result = - passUnion16BytesNestedFloatx10(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); - - print("result = $result"); - - Expect.approxEquals(10.0, result); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); - calloc.free(a2Pointer); - calloc.free(a3Pointer); - calloc.free(a4Pointer); - calloc.free(a5Pointer); - calloc.free(a6Pointer); - calloc.free(a7Pointer); - calloc.free(a8Pointer); - calloc.free(a9Pointer); -} - -final passUint8Boolx9Struct10BytesHomogeneousBoolBool = - ffiTestFunctions.lookupFunction< - Int32 Function(Uint8, Bool, Bool, Bool, Bool, Bool, Bool, Bool, Bool, - Bool, Struct10BytesHomogeneousBool, Bool), - int Function( - int, - bool, - bool, - bool, - bool, - bool, - bool, - bool, - bool, - bool, - Struct10BytesHomogeneousBool, - bool)>("PassUint8Boolx9Struct10BytesHomogeneousBoolBool"); - -/// Passing bools and a struct with bools. -/// Exhausts the registers to test bools and the bool struct alignment on the -/// stack. -void testPassUint8Boolx9Struct10BytesHomogeneousBoolBool() { - int a0; - bool a1; - bool a2; - bool a3; - bool a4; - bool a5; - bool a6; - bool a7; - bool a8; - bool a9; - final a10Pointer = calloc(); - final Struct10BytesHomogeneousBool a10 = a10Pointer.ref; - bool a11; - - a0 = 1; - a1 = false; - a2 = true; - a3 = false; - a4 = true; - a5 = false; - a6 = true; - a7 = false; - a8 = true; - a9 = false; - a10.a0 = true; - a10.a1 = false; - a10.a2 = true; - a10.a3 = false; - a10.a4 = true; - a10.a5 = false; - a10.a6 = true; - a10.a7 = false; - a10.a8 = true; - a10.a9 = false; - a11 = true; - - final result = passUint8Boolx9Struct10BytesHomogeneousBoolBool( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); - - print("result = $result"); - - Expect.equals(11, result); - - calloc.free(a10Pointer); -} - -final passUint8Boolx9Struct10BytesInlineArrayBoolBool = - ffiTestFunctions.lookupFunction< - Int32 Function(Uint8, Bool, Bool, Bool, Bool, Bool, Bool, Bool, Bool, - Bool, Struct10BytesInlineArrayBool, Bool), - int Function( - int, - bool, - bool, - bool, - bool, - bool, - bool, - bool, - bool, - bool, - Struct10BytesInlineArrayBool, - bool)>("PassUint8Boolx9Struct10BytesInlineArrayBoolBool"); - -/// Passing bools and a struct with bools. -/// Exhausts the registers to test bools and the bool struct alignment on the -/// stack. -void testPassUint8Boolx9Struct10BytesInlineArrayBoolBool() { - int a0; - bool a1; - bool a2; - bool a3; - bool a4; - bool a5; - bool a6; - bool a7; - bool a8; - bool a9; - final a10Pointer = calloc(); - final Struct10BytesInlineArrayBool a10 = a10Pointer.ref; - bool a11; - - a0 = 1; - a1 = false; - a2 = true; - a3 = false; - a4 = true; - a5 = false; - a6 = true; - a7 = false; - a8 = true; - a9 = false; - a10.a0[0] = true; - a10.a0[1] = false; - a10.a0[2] = true; - a10.a0[3] = false; - a10.a0[4] = true; - a10.a0[5] = false; - a10.a0[6] = true; - a10.a0[7] = false; - a10.a0[8] = true; - a10.a0[9] = false; - a11 = true; - - final result = passUint8Boolx9Struct10BytesInlineArrayBoolBool( - a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); - - print("result = $result"); - - Expect.equals(11, result); - - calloc.free(a10Pointer); -} - -final passUint8Struct1ByteBool = ffiTestFunctions.lookupFunction< - Bool Function(Uint8, Struct1ByteBool), - bool Function(int, Struct1ByteBool)>("PassUint8Struct1ByteBool"); - -/// Returning a bool. -void testPassUint8Struct1ByteBool() { - int a0; - final a1Pointer = calloc(); - final Struct1ByteBool a1 = a1Pointer.ref; - - a0 = 1; - a1.a0 = false; - - final result = passUint8Struct1ByteBool(a0, a1); - - print("result = $result"); - - Expect.equals(1 % 2 != 0, result); - - calloc.free(a1Pointer); -} - -final passWCharStructInlineArrayIntUintPtrx2LongUnsigned = - ffiTestFunctions.lookupFunction< - WChar Function( - WChar, StructInlineArrayInt, UintPtr, UintPtr, Long, UnsignedLong), - int Function(int, StructInlineArrayInt, int, int, int, - int)>("PassWCharStructInlineArrayIntUintPtrx2LongUnsigned"); - -/// Returning a wchar. -void testPassWCharStructInlineArrayIntUintPtrx2LongUnsigned() { - int a0; - final a1Pointer = calloc(); - final StructInlineArrayInt a1 = a1Pointer.ref; - int a2; - int a3; - int a4; - int a5; - - a0 = 1; - a1.a0[0] = 2; - a1.a0[1] = 3; - a1.a0[2] = 4; - a1.a0[3] = 5; - a1.a0[4] = 6; - a1.a0[5] = 7; - a1.a0[6] = 8; - a1.a0[7] = 9; - a1.a0[8] = 10; - a1.a0[9] = 11; - a2 = 12; - a3 = 13; - a4 = 14; - a5 = 15; - - final result = passWCharStructInlineArrayIntUintPtrx2LongUnsigned( - a0, a1, a2, a3, a4, a5); - - print("result = $result"); - - Expect.equals(120, result); - - calloc.free(a1Pointer); -} - -final passInt64x7Struct12BytesHomogeneousInt32 = - ffiTestFunctions.lookupFunction< - Int64 Function(Int64, Int64, Int64, Int64, Int64, Int64, Int64, - Struct12BytesHomogeneousInt32), - int Function(int, int, int, int, int, int, int, - Struct12BytesHomogeneousInt32)>( - "PassInt64x7Struct12BytesHomogeneousInt32"); - -/// Struct stradles last argument register -void testPassInt64x7Struct12BytesHomogeneousInt32() { - int a0; - int a1; - int a2; - int a3; - int a4; - int a5; - int a6; - final a7Pointer = calloc(); - final Struct12BytesHomogeneousInt32 a7 = a7Pointer.ref; - - a0 = -1; - a1 = 2; - a2 = -3; - a3 = 4; - a4 = -5; - a5 = 6; - a6 = -7; - a7.a0 = 8; - a7.a1 = -9; - a7.a2 = 10; - - final result = - passInt64x7Struct12BytesHomogeneousInt32(a0, a1, a2, a3, a4, a5, a6, a7); - - print("result = $result"); - - Expect.equals(5, result); - - calloc.free(a7Pointer); -} diff --git a/tests/ffi_2/function_structs_by_value_generated_compounds.dart b/tests/ffi_2/function_structs_by_value_generated_compounds.dart deleted file mode 100644 index 19e9aeb7417..00000000000 --- a/tests/ffi_2/function_structs_by_value_generated_compounds.dart +++ /dev/null @@ -1,1281 +0,0 @@ -// Copyright (c) 2021, 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. -// -// This file has been automatically generated. Please do not edit it manually. -// Generated by tests/ffi/generator/structs_by_value_tests_generator.dart. - -// @dart = 2.9 - -import 'dart:ffi'; - -class Struct1ByteBool extends Struct { - @Bool() - bool a0; - - String toString() => "(${a0})"; -} - -class Struct1ByteInt extends Struct { - @Int8() - int a0; - - String toString() => "(${a0})"; -} - -class Struct3BytesHomogeneousUint8 extends Struct { - @Uint8() - int a0; - - @Uint8() - int a1; - - @Uint8() - int a2; - - String toString() => "(${a0}, ${a1}, ${a2})"; -} - -class Struct3BytesInt2ByteAligned extends Struct { - @Int16() - int a0; - - @Int8() - int a1; - - String toString() => "(${a0}, ${a1})"; -} - -class Struct4BytesHomogeneousInt16 extends Struct { - @Int16() - int a0; - - @Int16() - int a1; - - String toString() => "(${a0}, ${a1})"; -} - -class Struct4BytesFloat extends Struct { - @Float() - double a0; - - String toString() => "(${a0})"; -} - -class Struct7BytesHomogeneousUint8 extends Struct { - @Uint8() - int a0; - - @Uint8() - int a1; - - @Uint8() - int a2; - - @Uint8() - int a3; - - @Uint8() - int a4; - - @Uint8() - int a5; - - @Uint8() - int a6; - - String toString() => "(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6})"; -} - -class Struct7BytesInt4ByteAligned extends Struct { - @Int32() - int a0; - - @Int16() - int a1; - - @Int8() - int a2; - - String toString() => "(${a0}, ${a1}, ${a2})"; -} - -class Struct8BytesInt extends Struct { - @Int16() - int a0; - - @Int16() - int a1; - - @Int32() - int a2; - - String toString() => "(${a0}, ${a1}, ${a2})"; -} - -class Struct8BytesHomogeneousFloat extends Struct { - @Float() - double a0; - - @Float() - double a1; - - String toString() => "(${a0}, ${a1})"; -} - -class Struct8BytesFloat extends Struct { - @Double() - double a0; - - String toString() => "(${a0})"; -} - -class Struct8BytesMixed extends Struct { - @Float() - double a0; - - @Int16() - int a1; - - @Int16() - int a2; - - String toString() => "(${a0}, ${a1}, ${a2})"; -} - -class Struct9BytesHomogeneousUint8 extends Struct { - @Uint8() - int a0; - - @Uint8() - int a1; - - @Uint8() - int a2; - - @Uint8() - int a3; - - @Uint8() - int a4; - - @Uint8() - int a5; - - @Uint8() - int a6; - - @Uint8() - int a7; - - @Uint8() - int a8; - - String toString() => - "(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8})"; -} - -class Struct9BytesInt4Or8ByteAligned extends Struct { - @Int64() - int a0; - - @Int8() - int a1; - - String toString() => "(${a0}, ${a1})"; -} - -class Struct10BytesHomogeneousBool extends Struct { - @Bool() - bool a0; - - @Bool() - bool a1; - - @Bool() - bool a2; - - @Bool() - bool a3; - - @Bool() - bool a4; - - @Bool() - bool a5; - - @Bool() - bool a6; - - @Bool() - bool a7; - - @Bool() - bool a8; - - @Bool() - bool a9; - - String toString() => - "(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9})"; -} - -class Struct12BytesHomogeneousFloat extends Struct { - @Float() - double a0; - - @Float() - double a1; - - @Float() - double a2; - - String toString() => "(${a0}, ${a1}, ${a2})"; -} - -class Struct12BytesHomogeneousInt32 extends Struct { - @Int32() - int a0; - - @Int32() - int a1; - - @Int32() - int a2; - - String toString() => "(${a0}, ${a1}, ${a2})"; -} - -class Struct16BytesHomogeneousFloat extends Struct { - @Float() - double a0; - - @Float() - double a1; - - @Float() - double a2; - - @Float() - double a3; - - String toString() => "(${a0}, ${a1}, ${a2}, ${a3})"; -} - -class Struct16BytesMixed extends Struct { - @Double() - double a0; - - @Int64() - int a1; - - String toString() => "(${a0}, ${a1})"; -} - -class Struct16BytesMixed2 extends Struct { - @Float() - double a0; - - @Float() - double a1; - - @Float() - double a2; - - @Int32() - int a3; - - String toString() => "(${a0}, ${a1}, ${a2}, ${a3})"; -} - -class Struct17BytesInt extends Struct { - @Int64() - int a0; - - @Int64() - int a1; - - @Int8() - int a2; - - String toString() => "(${a0}, ${a1}, ${a2})"; -} - -class Struct19BytesHomogeneousUint8 extends Struct { - @Uint8() - int a0; - - @Uint8() - int a1; - - @Uint8() - int a2; - - @Uint8() - int a3; - - @Uint8() - int a4; - - @Uint8() - int a5; - - @Uint8() - int a6; - - @Uint8() - int a7; - - @Uint8() - int a8; - - @Uint8() - int a9; - - @Uint8() - int a10; - - @Uint8() - int a11; - - @Uint8() - int a12; - - @Uint8() - int a13; - - @Uint8() - int a14; - - @Uint8() - int a15; - - @Uint8() - int a16; - - @Uint8() - int a17; - - @Uint8() - int a18; - - String toString() => - "(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9}, ${a10}, ${a11}, ${a12}, ${a13}, ${a14}, ${a15}, ${a16}, ${a17}, ${a18})"; -} - -class Struct20BytesHomogeneousInt32 extends Struct { - @Int32() - int a0; - - @Int32() - int a1; - - @Int32() - int a2; - - @Int32() - int a3; - - @Int32() - int a4; - - String toString() => "(${a0}, ${a1}, ${a2}, ${a3}, ${a4})"; -} - -class Struct20BytesHomogeneousFloat extends Struct { - @Float() - double a0; - - @Float() - double a1; - - @Float() - double a2; - - @Float() - double a3; - - @Float() - double a4; - - String toString() => "(${a0}, ${a1}, ${a2}, ${a3}, ${a4})"; -} - -class Struct32BytesHomogeneousDouble extends Struct { - @Double() - double a0; - - @Double() - double a1; - - @Double() - double a2; - - @Double() - double a3; - - String toString() => "(${a0}, ${a1}, ${a2}, ${a3})"; -} - -class Struct40BytesHomogeneousDouble extends Struct { - @Double() - double a0; - - @Double() - double a1; - - @Double() - double a2; - - @Double() - double a3; - - @Double() - double a4; - - String toString() => "(${a0}, ${a1}, ${a2}, ${a3}, ${a4})"; -} - -class Struct1024BytesHomogeneousUint64 extends Struct { - @Uint64() - int a0; - - @Uint64() - int a1; - - @Uint64() - int a2; - - @Uint64() - int a3; - - @Uint64() - int a4; - - @Uint64() - int a5; - - @Uint64() - int a6; - - @Uint64() - int a7; - - @Uint64() - int a8; - - @Uint64() - int a9; - - @Uint64() - int a10; - - @Uint64() - int a11; - - @Uint64() - int a12; - - @Uint64() - int a13; - - @Uint64() - int a14; - - @Uint64() - int a15; - - @Uint64() - int a16; - - @Uint64() - int a17; - - @Uint64() - int a18; - - @Uint64() - int a19; - - @Uint64() - int a20; - - @Uint64() - int a21; - - @Uint64() - int a22; - - @Uint64() - int a23; - - @Uint64() - int a24; - - @Uint64() - int a25; - - @Uint64() - int a26; - - @Uint64() - int a27; - - @Uint64() - int a28; - - @Uint64() - int a29; - - @Uint64() - int a30; - - @Uint64() - int a31; - - @Uint64() - int a32; - - @Uint64() - int a33; - - @Uint64() - int a34; - - @Uint64() - int a35; - - @Uint64() - int a36; - - @Uint64() - int a37; - - @Uint64() - int a38; - - @Uint64() - int a39; - - @Uint64() - int a40; - - @Uint64() - int a41; - - @Uint64() - int a42; - - @Uint64() - int a43; - - @Uint64() - int a44; - - @Uint64() - int a45; - - @Uint64() - int a46; - - @Uint64() - int a47; - - @Uint64() - int a48; - - @Uint64() - int a49; - - @Uint64() - int a50; - - @Uint64() - int a51; - - @Uint64() - int a52; - - @Uint64() - int a53; - - @Uint64() - int a54; - - @Uint64() - int a55; - - @Uint64() - int a56; - - @Uint64() - int a57; - - @Uint64() - int a58; - - @Uint64() - int a59; - - @Uint64() - int a60; - - @Uint64() - int a61; - - @Uint64() - int a62; - - @Uint64() - int a63; - - @Uint64() - int a64; - - @Uint64() - int a65; - - @Uint64() - int a66; - - @Uint64() - int a67; - - @Uint64() - int a68; - - @Uint64() - int a69; - - @Uint64() - int a70; - - @Uint64() - int a71; - - @Uint64() - int a72; - - @Uint64() - int a73; - - @Uint64() - int a74; - - @Uint64() - int a75; - - @Uint64() - int a76; - - @Uint64() - int a77; - - @Uint64() - int a78; - - @Uint64() - int a79; - - @Uint64() - int a80; - - @Uint64() - int a81; - - @Uint64() - int a82; - - @Uint64() - int a83; - - @Uint64() - int a84; - - @Uint64() - int a85; - - @Uint64() - int a86; - - @Uint64() - int a87; - - @Uint64() - int a88; - - @Uint64() - int a89; - - @Uint64() - int a90; - - @Uint64() - int a91; - - @Uint64() - int a92; - - @Uint64() - int a93; - - @Uint64() - int a94; - - @Uint64() - int a95; - - @Uint64() - int a96; - - @Uint64() - int a97; - - @Uint64() - int a98; - - @Uint64() - int a99; - - @Uint64() - int a100; - - @Uint64() - int a101; - - @Uint64() - int a102; - - @Uint64() - int a103; - - @Uint64() - int a104; - - @Uint64() - int a105; - - @Uint64() - int a106; - - @Uint64() - int a107; - - @Uint64() - int a108; - - @Uint64() - int a109; - - @Uint64() - int a110; - - @Uint64() - int a111; - - @Uint64() - int a112; - - @Uint64() - int a113; - - @Uint64() - int a114; - - @Uint64() - int a115; - - @Uint64() - int a116; - - @Uint64() - int a117; - - @Uint64() - int a118; - - @Uint64() - int a119; - - @Uint64() - int a120; - - @Uint64() - int a121; - - @Uint64() - int a122; - - @Uint64() - int a123; - - @Uint64() - int a124; - - @Uint64() - int a125; - - @Uint64() - int a126; - - @Uint64() - int a127; - - String toString() => - "(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8}, ${a9}, ${a10}, ${a11}, ${a12}, ${a13}, ${a14}, ${a15}, ${a16}, ${a17}, ${a18}, ${a19}, ${a20}, ${a21}, ${a22}, ${a23}, ${a24}, ${a25}, ${a26}, ${a27}, ${a28}, ${a29}, ${a30}, ${a31}, ${a32}, ${a33}, ${a34}, ${a35}, ${a36}, ${a37}, ${a38}, ${a39}, ${a40}, ${a41}, ${a42}, ${a43}, ${a44}, ${a45}, ${a46}, ${a47}, ${a48}, ${a49}, ${a50}, ${a51}, ${a52}, ${a53}, ${a54}, ${a55}, ${a56}, ${a57}, ${a58}, ${a59}, ${a60}, ${a61}, ${a62}, ${a63}, ${a64}, ${a65}, ${a66}, ${a67}, ${a68}, ${a69}, ${a70}, ${a71}, ${a72}, ${a73}, ${a74}, ${a75}, ${a76}, ${a77}, ${a78}, ${a79}, ${a80}, ${a81}, ${a82}, ${a83}, ${a84}, ${a85}, ${a86}, ${a87}, ${a88}, ${a89}, ${a90}, ${a91}, ${a92}, ${a93}, ${a94}, ${a95}, ${a96}, ${a97}, ${a98}, ${a99}, ${a100}, ${a101}, ${a102}, ${a103}, ${a104}, ${a105}, ${a106}, ${a107}, ${a108}, ${a109}, ${a110}, ${a111}, ${a112}, ${a113}, ${a114}, ${a115}, ${a116}, ${a117}, ${a118}, ${a119}, ${a120}, ${a121}, ${a122}, ${a123}, ${a124}, ${a125}, ${a126}, ${a127})"; -} - -class StructAlignmentInt16 extends Struct { - @Int8() - int a0; - - @Int16() - int a1; - - @Int8() - int a2; - - String toString() => "(${a0}, ${a1}, ${a2})"; -} - -class StructAlignmentInt32 extends Struct { - @Int8() - int a0; - - @Int32() - int a1; - - @Int8() - int a2; - - String toString() => "(${a0}, ${a1}, ${a2})"; -} - -class StructAlignmentInt64 extends Struct { - @Int8() - int a0; - - @Int64() - int a1; - - @Int8() - int a2; - - String toString() => "(${a0}, ${a1}, ${a2})"; -} - -class Struct8BytesNestedInt extends Struct { - Struct4BytesHomogeneousInt16 a0; - - Struct4BytesHomogeneousInt16 a1; - - String toString() => "(${a0}, ${a1})"; -} - -class Struct8BytesNestedFloat extends Struct { - Struct4BytesFloat a0; - - Struct4BytesFloat a1; - - String toString() => "(${a0}, ${a1})"; -} - -class Struct8BytesNestedFloat2 extends Struct { - Struct4BytesFloat a0; - - @Float() - double a1; - - String toString() => "(${a0}, ${a1})"; -} - -class Struct8BytesNestedMixed extends Struct { - Struct4BytesHomogeneousInt16 a0; - - Struct4BytesFloat a1; - - String toString() => "(${a0}, ${a1})"; -} - -class Struct16BytesNestedInt extends Struct { - Struct8BytesNestedInt a0; - - Struct8BytesNestedInt a1; - - String toString() => "(${a0}, ${a1})"; -} - -class Struct32BytesNestedInt extends Struct { - Struct16BytesNestedInt a0; - - Struct16BytesNestedInt a1; - - String toString() => "(${a0}, ${a1})"; -} - -class StructNestedIntStructAlignmentInt16 extends Struct { - StructAlignmentInt16 a0; - - StructAlignmentInt16 a1; - - String toString() => "(${a0}, ${a1})"; -} - -class StructNestedIntStructAlignmentInt32 extends Struct { - StructAlignmentInt32 a0; - - StructAlignmentInt32 a1; - - String toString() => "(${a0}, ${a1})"; -} - -class StructNestedIntStructAlignmentInt64 extends Struct { - StructAlignmentInt64 a0; - - StructAlignmentInt64 a1; - - String toString() => "(${a0}, ${a1})"; -} - -class StructNestedIrregularBig extends Struct { - @Uint16() - int a0; - - Struct8BytesNestedMixed a1; - - @Uint16() - int a2; - - Struct8BytesNestedFloat2 a3; - - @Uint16() - int a4; - - Struct8BytesNestedFloat a5; - - @Uint16() - int a6; - - String toString() => "(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6})"; -} - -class StructNestedIrregularBigger extends Struct { - StructNestedIrregularBig a0; - - Struct8BytesNestedMixed a1; - - @Float() - double a2; - - @Double() - double a3; - - String toString() => "(${a0}, ${a1}, ${a2}, ${a3})"; -} - -class StructNestedIrregularEvenBigger extends Struct { - @Uint64() - int a0; - - StructNestedIrregularBigger a1; - - StructNestedIrregularBigger a2; - - @Double() - double a3; - - String toString() => "(${a0}, ${a1}, ${a2}, ${a3})"; -} - -class Struct8BytesInlineArrayInt extends Struct { - @Array(8) - Array a0; - - String toString() => "(${[for (var i0 = 0; i0 < 8; i0 += 1) a0[i0]]})"; -} - -class Struct10BytesInlineArrayBool extends Struct { - @Array(10) - Array a0; - - String toString() => "(${[for (var i0 = 0; i0 < 10; i0 += 1) a0[i0]]})"; -} - -class StructInlineArrayIrregular extends Struct { - @Array(2) - Array a0; - - @Uint8() - int a1; - - String toString() => "(${[for (var i0 = 0; i0 < 2; i0 += 1) a0[i0]]}, ${a1})"; -} - -class StructInlineArray100Bytes extends Struct { - @Array(100) - Array a0; - - String toString() => "(${[for (var i0 = 0; i0 < 100; i0 += 1) a0[i0]]})"; -} - -class StructInlineArrayBig extends Struct { - @Uint32() - int a0; - - @Uint32() - int a1; - - @Array(4000) - Array a2; - - String toString() => - "(${a0}, ${a1}, ${[for (var i0 = 0; i0 < 4000; i0 += 1) a2[i0]]})"; -} - -class StructStruct16BytesHomogeneousFloat2 extends Struct { - Struct4BytesFloat a0; - - @Array(2) - Array a1; - - @Float() - double a2; - - String toString() => - "(${a0}, ${[for (var i0 = 0; i0 < 2; i0 += 1) a1[i0]]}, ${a2})"; -} - -class StructStruct32BytesHomogeneousDouble2 extends Struct { - Struct8BytesFloat a0; - - @Array(2) - Array a1; - - @Double() - double a2; - - String toString() => - "(${a0}, ${[for (var i0 = 0; i0 < 2; i0 += 1) a1[i0]]}, ${a2})"; -} - -class StructStruct16BytesMixed3 extends Struct { - Struct4BytesFloat a0; - - @Array(1) - Array a1; - - @Array(2) - Array a2; - - String toString() => "(${a0}, ${[ - for (var i0 = 0; i0 < 1; i0 += 1) a1[i0] - ]}, ${[for (var i0 = 0; i0 < 2; i0 += 1) a2[i0]]})"; -} - -class Struct8BytesInlineArrayMultiDimensionalInt extends Struct { - @Array(2, 2, 2) - Array>> a0; - - String toString() => "(${[ - for (var i0 = 0; i0 < 2; i0 += 1) - [ - for (var i1 = 0; i1 < 2; i1 += 1) - [for (var i2 = 0; i2 < 2; i2 += 1) a0[i0][i1][i2]] - ] - ]})"; -} - -class Struct32BytesInlineArrayMultiDimensionalInt extends Struct { - @Array(2, 2, 2, 2, 2) - Array>>>> a0; - - String toString() => "(${[ - for (var i0 = 0; i0 < 2; i0 += 1) - [ - for (var i1 = 0; i1 < 2; i1 += 1) - [ - for (var i2 = 0; i2 < 2; i2 += 1) - [ - for (var i3 = 0; i3 < 2; i3 += 1) - [for (var i4 = 0; i4 < 2; i4 += 1) a0[i0][i1][i2][i3][i4]] - ] - ] - ] - ]})"; -} - -class Struct64BytesInlineArrayMultiDimensionalInt extends Struct { - @Array.multi([2, 2, 2, 2, 2, 2]) - Array>>>>> a0; - - String toString() => "(${[ - for (var i0 = 0; i0 < 2; i0 += 1) - [ - for (var i1 = 0; i1 < 2; i1 += 1) - [ - for (var i2 = 0; i2 < 2; i2 += 1) - [ - for (var i3 = 0; i3 < 2; i3 += 1) - [ - for (var i4 = 0; i4 < 2; i4 += 1) - [ - for (var i5 = 0; i5 < 2; i5 += 1) - a0[i0][i1][i2][i3][i4][i5] - ] - ] - ] - ] - ] - ]})"; -} - -class Struct4BytesInlineArrayMultiDimensionalInt extends Struct { - @Array(2, 2) - Array> a0; - - String toString() => "(${[ - for (var i0 = 0; i0 < 2; i0 += 1) - [for (var i1 = 0; i1 < 2; i1 += 1) a0[i0][i1]] - ]})"; -} - -@Packed(1) -class Struct3BytesPackedInt extends Struct { - @Int8() - int a0; - - @Int16() - int a1; - - String toString() => "(${a0}, ${a1})"; -} - -@Packed(1) -class Struct3BytesPackedIntMembersAligned extends Struct { - @Int8() - int a0; - - @Int16() - int a1; - - String toString() => "(${a0}, ${a1})"; -} - -@Packed(1) -class Struct5BytesPackedMixed extends Struct { - @Float() - double a0; - - @Uint8() - int a1; - - String toString() => "(${a0}, ${a1})"; -} - -class StructNestedAlignmentStruct5BytesPackedMixed extends Struct { - @Uint8() - int a0; - - Struct5BytesPackedMixed a1; - - String toString() => "(${a0}, ${a1})"; -} - -class Struct6BytesInlineArrayInt extends Struct { - @Array(2) - Array a0; - - String toString() => "(${[for (var i0 = 0; i0 < 2; i0 += 1) a0[i0]]})"; -} - -@Packed(1) -class Struct8BytesPackedInt extends Struct { - @Uint8() - int a0; - - @Uint32() - int a1; - - @Uint8() - int a2; - - @Uint8() - int a3; - - @Uint8() - int a4; - - String toString() => "(${a0}, ${a1}, ${a2}, ${a3}, ${a4})"; -} - -@Packed(1) -class Struct9BytesPackedMixed extends Struct { - @Uint8() - int a0; - - @Double() - double a1; - - String toString() => "(${a0}, ${a1})"; -} - -class Struct15BytesInlineArrayMixed extends Struct { - @Array(3) - Array a0; - - String toString() => "(${[for (var i0 = 0; i0 < 3; i0 += 1) a0[i0]]})"; -} - -class Union4BytesMixed extends Union { - @Uint32() - int a0; - - @Float() - double a1; - - String toString() => "(${a0}, ${a1})"; -} - -class Union8BytesNestedFloat extends Union { - @Double() - double a0; - - Struct8BytesHomogeneousFloat a1; - - String toString() => "(${a0}, ${a1})"; -} - -class Union9BytesNestedInt extends Union { - Struct8BytesInt a0; - - Struct9BytesHomogeneousUint8 a1; - - String toString() => "(${a0}, ${a1})"; -} - -class Union16BytesNestedInlineArrayFloat extends Union { - @Array(4) - Array a0; - - Struct16BytesHomogeneousFloat a1; - - String toString() => "(${[for (var i0 = 0; i0 < 4; i0 += 1) a0[i0]]}, ${a1})"; -} - -class Union16BytesNestedFloat extends Union { - Struct8BytesHomogeneousFloat a0; - - Struct12BytesHomogeneousFloat a1; - - Struct16BytesHomogeneousFloat a2; - - String toString() => "(${a0}, ${a1}, ${a2})"; -} - -class StructInlineArrayInt extends Struct { - @Array(10) - Array a0; - - String toString() => "(${[for (var i0 = 0; i0 < 10; i0 += 1) a0[i0]]})"; -} diff --git a/tests/ffi_2/function_structs_by_value_generated_ret_arg_leaf_test.dart b/tests/ffi_2/function_structs_by_value_generated_ret_arg_leaf_test.dart deleted file mode 100644 index 9f85c7507cd..00000000000 --- a/tests/ffi_2/function_structs_by_value_generated_ret_arg_leaf_test.dart +++ /dev/null @@ -1,855 +0,0 @@ -// Copyright (c) 2021, 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. -// -// This file has been automatically generated. Please do not edit it manually. -// Generated by tests/ffi/generator/structs_by_value_tests_generator.dart. -// -// SharedObjects=ffi_test_functions -// VMOptions= -// VMOptions=--deterministic --optimization-counter-threshold=90 -// VMOptions=--use-slow-path -// VMOptions=--use-slow-path --stacktrace-every=100 - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; -import "package:ffi/ffi.dart"; - -import 'dylib_utils.dart'; - -// Reuse the compound classes. -import 'function_structs_by_value_generated_compounds.dart'; - -final ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); -void main() { - for (int i = 0; i < 100; ++i) { - testReturnStructArgumentStruct1ByteIntLeaf(); - testReturnStructArgumentInt32x8Struct1ByteIntLeaf(); - testReturnStructArgumentStruct8BytesHomogeneousFloatLeaf(); - testReturnStructArgumentStruct20BytesHomogeneousInt32Leaf(); - testReturnStructArgumentInt32x8Struct20BytesHomogeneouLeaf(); - testReturnStructArgumentStruct8BytesInlineArrayIntLeaf(); - testReturnStructArgumentStructStruct16BytesHomogeneousLeaf(); - testReturnStructArgumentStructStruct32BytesHomogeneousLeaf(); - testReturnStructArgumentStructStruct16BytesMixed3Leaf(); - testReturnStructAlignmentInt16Leaf(); - testReturnStructAlignmentInt32Leaf(); - testReturnStructAlignmentInt64Leaf(); - testReturnStruct8BytesNestedIntLeaf(); - testReturnStruct8BytesNestedFloatLeaf(); - testReturnStruct8BytesNestedFloat2Leaf(); - testReturnStruct8BytesNestedMixedLeaf(); - testReturnStruct16BytesNestedIntLeaf(); - testReturnStruct32BytesNestedIntLeaf(); - testReturnStructNestedIntStructAlignmentInt16Leaf(); - testReturnStructNestedIntStructAlignmentInt32Leaf(); - testReturnStructNestedIntStructAlignmentInt64Leaf(); - testReturnStructNestedIrregularEvenBiggerLeaf(); - } -} - -final returnStructArgumentStruct1ByteIntLeaf = ffiTestFunctions.lookupFunction< - Struct1ByteInt Function(Struct1ByteInt), - Struct1ByteInt Function( - Struct1ByteInt)>("ReturnStructArgumentStruct1ByteInt", isLeaf: true); - -/// Test that a struct passed in as argument can be returned. -/// Especially for ffi callbacks. -/// Struct is passed in int registers in most ABIs. -void testReturnStructArgumentStruct1ByteIntLeaf() { - final a0Pointer = calloc(); - final Struct1ByteInt a0 = a0Pointer.ref; - - a0.a0 = -1; - - final result = returnStructArgumentStruct1ByteIntLeaf(a0); - - print("result = $result"); - - Expect.equals(a0.a0, result.a0); - - calloc.free(a0Pointer); -} - -final returnStructArgumentInt32x8Struct1ByteIntLeaf = - ffiTestFunctions - .lookupFunction< - Struct1ByteInt Function(Int32, Int32, Int32, Int32, Int32, Int32, - Int32, Int32, Struct1ByteInt), - Struct1ByteInt Function( - int, int, int, int, int, int, int, int, Struct1ByteInt)>( - "ReturnStructArgumentInt32x8Struct1ByteInt", - isLeaf: true); - -/// Test that a struct passed in as argument can be returned. -/// Especially for ffi callbacks. -/// Struct is passed on stack on all ABIs. -void testReturnStructArgumentInt32x8Struct1ByteIntLeaf() { - int a0; - int a1; - int a2; - int a3; - int a4; - int a5; - int a6; - int a7; - final a8Pointer = calloc(); - final Struct1ByteInt a8 = a8Pointer.ref; - - a0 = -1; - a1 = 2; - a2 = -3; - a3 = 4; - a4 = -5; - a5 = 6; - a6 = -7; - a7 = 8; - a8.a0 = -9; - - final result = returnStructArgumentInt32x8Struct1ByteIntLeaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8); - - print("result = $result"); - - Expect.equals(a8.a0, result.a0); - - calloc.free(a8Pointer); -} - -final returnStructArgumentStruct8BytesHomogeneousFloatLeaf = - ffiTestFunctions.lookupFunction< - Struct8BytesHomogeneousFloat Function(Struct8BytesHomogeneousFloat), - Struct8BytesHomogeneousFloat Function( - Struct8BytesHomogeneousFloat)>( - "ReturnStructArgumentStruct8BytesHomogeneousFloat", - isLeaf: true); - -/// Test that a struct passed in as argument can be returned. -/// Especially for ffi callbacks. -/// Struct is passed in float registers in most ABIs. -void testReturnStructArgumentStruct8BytesHomogeneousFloatLeaf() { - final a0Pointer = calloc(); - final Struct8BytesHomogeneousFloat a0 = a0Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2.0; - - final result = returnStructArgumentStruct8BytesHomogeneousFloatLeaf(a0); - - print("result = $result"); - - Expect.approxEquals(a0.a0, result.a0); - Expect.approxEquals(a0.a1, result.a1); - - calloc.free(a0Pointer); -} - -final returnStructArgumentStruct20BytesHomogeneousInt32Leaf = - ffiTestFunctions - .lookupFunction< - Struct20BytesHomogeneousInt32 Function( - Struct20BytesHomogeneousInt32), - Struct20BytesHomogeneousInt32 Function( - Struct20BytesHomogeneousInt32)>( - "ReturnStructArgumentStruct20BytesHomogeneousInt32", - isLeaf: true); - -/// On arm64, both argument and return value are passed in by pointer. -void testReturnStructArgumentStruct20BytesHomogeneousInt32Leaf() { - final a0Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a0 = a0Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - a0.a3 = 4; - a0.a4 = -5; - - final result = returnStructArgumentStruct20BytesHomogeneousInt32Leaf(a0); - - print("result = $result"); - - Expect.equals(a0.a0, result.a0); - Expect.equals(a0.a1, result.a1); - Expect.equals(a0.a2, result.a2); - Expect.equals(a0.a3, result.a3); - Expect.equals(a0.a4, result.a4); - - calloc.free(a0Pointer); -} - -final returnStructArgumentInt32x8Struct20BytesHomogeneouLeaf = - ffiTestFunctions.lookupFunction< - Struct20BytesHomogeneousInt32 Function(Int32, Int32, Int32, Int32, - Int32, Int32, Int32, Int32, Struct20BytesHomogeneousInt32), - Struct20BytesHomogeneousInt32 Function(int, int, int, int, int, int, - int, int, Struct20BytesHomogeneousInt32)>( - "ReturnStructArgumentInt32x8Struct20BytesHomogeneou", - isLeaf: true); - -/// On arm64, both argument and return value are passed in by pointer. -/// Ints exhaust registers, so that pointer is passed on stack. -void testReturnStructArgumentInt32x8Struct20BytesHomogeneouLeaf() { - int a0; - int a1; - int a2; - int a3; - int a4; - int a5; - int a6; - int a7; - final a8Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a8 = a8Pointer.ref; - - a0 = -1; - a1 = 2; - a2 = -3; - a3 = 4; - a4 = -5; - a5 = 6; - a6 = -7; - a7 = 8; - a8.a0 = -9; - a8.a1 = 10; - a8.a2 = -11; - a8.a3 = 12; - a8.a4 = -13; - - final result = returnStructArgumentInt32x8Struct20BytesHomogeneouLeaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8); - - print("result = $result"); - - Expect.equals(a8.a0, result.a0); - Expect.equals(a8.a1, result.a1); - Expect.equals(a8.a2, result.a2); - Expect.equals(a8.a3, result.a3); - Expect.equals(a8.a4, result.a4); - - calloc.free(a8Pointer); -} - -final returnStructArgumentStruct8BytesInlineArrayIntLeaf = - ffiTestFunctions.lookupFunction< - Struct8BytesInlineArrayInt Function(Struct8BytesInlineArrayInt), - Struct8BytesInlineArrayInt Function(Struct8BytesInlineArrayInt)>( - "ReturnStructArgumentStruct8BytesInlineArrayInt", - isLeaf: true); - -/// Test returning struct with inline array. -void testReturnStructArgumentStruct8BytesInlineArrayIntLeaf() { - final a0Pointer = calloc(); - final Struct8BytesInlineArrayInt a0 = a0Pointer.ref; - - a0.a0[0] = 1; - a0.a0[1] = 2; - a0.a0[2] = 3; - a0.a0[3] = 4; - a0.a0[4] = 5; - a0.a0[5] = 6; - a0.a0[6] = 7; - a0.a0[7] = 8; - - final result = returnStructArgumentStruct8BytesInlineArrayIntLeaf(a0); - - print("result = $result"); - - for (int i = 0; i < 8; i++) { - Expect.equals(a0.a0[i], result.a0[i]); - } - - calloc.free(a0Pointer); -} - -final returnStructArgumentStructStruct16BytesHomogeneousLeaf = - ffiTestFunctions.lookupFunction< - StructStruct16BytesHomogeneousFloat2 Function( - StructStruct16BytesHomogeneousFloat2), - StructStruct16BytesHomogeneousFloat2 Function( - StructStruct16BytesHomogeneousFloat2)>( - "ReturnStructArgumentStructStruct16BytesHomogeneous", - isLeaf: true); - -/// Return value in FPU registers on arm hardfp and arm64. -void testReturnStructArgumentStructStruct16BytesHomogeneousLeaf() { - final a0Pointer = calloc(); - final StructStruct16BytesHomogeneousFloat2 a0 = a0Pointer.ref; - - a0.a0.a0 = -1.0; - a0.a1[0].a0 = 2.0; - a0.a1[1].a0 = -3.0; - a0.a2 = 4.0; - - final result = returnStructArgumentStructStruct16BytesHomogeneousLeaf(a0); - - print("result = $result"); - - Expect.approxEquals(a0.a0.a0, result.a0.a0); - for (int i = 0; i < 2; i++) { - Expect.approxEquals(a0.a1[i].a0, result.a1[i].a0); - } - Expect.approxEquals(a0.a2, result.a2); - - calloc.free(a0Pointer); -} - -final returnStructArgumentStructStruct32BytesHomogeneousLeaf = - ffiTestFunctions.lookupFunction< - StructStruct32BytesHomogeneousDouble2 Function( - StructStruct32BytesHomogeneousDouble2), - StructStruct32BytesHomogeneousDouble2 Function( - StructStruct32BytesHomogeneousDouble2)>( - "ReturnStructArgumentStructStruct32BytesHomogeneous", - isLeaf: true); - -/// Return value in FPU registers on arm64. -void testReturnStructArgumentStructStruct32BytesHomogeneousLeaf() { - final a0Pointer = calloc(); - final StructStruct32BytesHomogeneousDouble2 a0 = a0Pointer.ref; - - a0.a0.a0 = -1.0; - a0.a1[0].a0 = 2.0; - a0.a1[1].a0 = -3.0; - a0.a2 = 4.0; - - final result = returnStructArgumentStructStruct32BytesHomogeneousLeaf(a0); - - print("result = $result"); - - Expect.approxEquals(a0.a0.a0, result.a0.a0); - for (int i = 0; i < 2; i++) { - Expect.approxEquals(a0.a1[i].a0, result.a1[i].a0); - } - Expect.approxEquals(a0.a2, result.a2); - - calloc.free(a0Pointer); -} - -final returnStructArgumentStructStruct16BytesMixed3Leaf = - ffiTestFunctions.lookupFunction< - StructStruct16BytesMixed3 Function(StructStruct16BytesMixed3), - StructStruct16BytesMixed3 Function(StructStruct16BytesMixed3)>( - "ReturnStructArgumentStructStruct16BytesMixed3", - isLeaf: true); - -/// On x64 Linux, return value is split over FP and int registers. -void testReturnStructArgumentStructStruct16BytesMixed3Leaf() { - final a0Pointer = calloc(); - final StructStruct16BytesMixed3 a0 = a0Pointer.ref; - - a0.a0.a0 = -1.0; - a0.a1[0].a0 = 2.0; - a0.a1[0].a1 = -3; - a0.a1[0].a2 = 4; - a0.a2[0] = -5; - a0.a2[1] = 6; - - final result = returnStructArgumentStructStruct16BytesMixed3Leaf(a0); - - print("result = $result"); - - Expect.approxEquals(a0.a0.a0, result.a0.a0); - for (int i = 0; i < 1; i++) { - Expect.approxEquals(a0.a1[i].a0, result.a1[i].a0); - Expect.equals(a0.a1[i].a1, result.a1[i].a1); - Expect.equals(a0.a1[i].a2, result.a1[i].a2); - } - for (int i = 0; i < 2; i++) { - Expect.equals(a0.a2[i], result.a2[i]); - } - - calloc.free(a0Pointer); -} - -final returnStructAlignmentInt16Leaf = ffiTestFunctions.lookupFunction< - StructAlignmentInt16 Function(Int8, Int16, Int8), - StructAlignmentInt16 Function( - int, int, int)>("ReturnStructAlignmentInt16", isLeaf: true); - -/// Test alignment and padding of 16 byte int within struct. -void testReturnStructAlignmentInt16Leaf() { - int a0; - int a1; - int a2; - - a0 = -1; - a1 = 2; - a2 = -3; - - final result = returnStructAlignmentInt16Leaf(a0, a1, a2); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); -} - -final returnStructAlignmentInt32Leaf = ffiTestFunctions.lookupFunction< - StructAlignmentInt32 Function(Int8, Int32, Int8), - StructAlignmentInt32 Function( - int, int, int)>("ReturnStructAlignmentInt32", isLeaf: true); - -/// Test alignment and padding of 32 byte int within struct. -void testReturnStructAlignmentInt32Leaf() { - int a0; - int a1; - int a2; - - a0 = -1; - a1 = 2; - a2 = -3; - - final result = returnStructAlignmentInt32Leaf(a0, a1, a2); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); -} - -final returnStructAlignmentInt64Leaf = ffiTestFunctions.lookupFunction< - StructAlignmentInt64 Function(Int8, Int64, Int8), - StructAlignmentInt64 Function( - int, int, int)>("ReturnStructAlignmentInt64", isLeaf: true); - -/// Test alignment and padding of 64 byte int within struct. -void testReturnStructAlignmentInt64Leaf() { - int a0; - int a1; - int a2; - - a0 = -1; - a1 = 2; - a2 = -3; - - final result = returnStructAlignmentInt64Leaf(a0, a1, a2); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); -} - -final returnStruct8BytesNestedIntLeaf = ffiTestFunctions.lookupFunction< - Struct8BytesNestedInt Function( - Struct4BytesHomogeneousInt16, Struct4BytesHomogeneousInt16), - Struct8BytesNestedInt Function( - Struct4BytesHomogeneousInt16, Struct4BytesHomogeneousInt16)>( - "ReturnStruct8BytesNestedInt", - isLeaf: true); - -/// Simple nested struct. -void testReturnStruct8BytesNestedIntLeaf() { - final a0Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a1 = a1Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a1.a0 = -3; - a1.a1 = 4; - - final result = returnStruct8BytesNestedIntLeaf(a0, a1); - - print("result = $result"); - - Expect.equals(a0.a0, result.a0.a0); - Expect.equals(a0.a1, result.a0.a1); - Expect.equals(a1.a0, result.a1.a0); - Expect.equals(a1.a1, result.a1.a1); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); -} - -final returnStruct8BytesNestedFloatLeaf = ffiTestFunctions.lookupFunction< - Struct8BytesNestedFloat Function(Struct4BytesFloat, Struct4BytesFloat), - Struct8BytesNestedFloat Function(Struct4BytesFloat, - Struct4BytesFloat)>("ReturnStruct8BytesNestedFloat", isLeaf: true); - -/// Simple nested struct with floats. -void testReturnStruct8BytesNestedFloatLeaf() { - final a0Pointer = calloc(); - final Struct4BytesFloat a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct4BytesFloat a1 = a1Pointer.ref; - - a0.a0 = -1.0; - a1.a0 = 2.0; - - final result = returnStruct8BytesNestedFloatLeaf(a0, a1); - - print("result = $result"); - - Expect.approxEquals(a0.a0, result.a0.a0); - Expect.approxEquals(a1.a0, result.a1.a0); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); -} - -final returnStruct8BytesNestedFloat2Leaf = ffiTestFunctions.lookupFunction< - Struct8BytesNestedFloat2 Function(Struct4BytesFloat, Float), - Struct8BytesNestedFloat2 Function(Struct4BytesFloat, - double)>("ReturnStruct8BytesNestedFloat2", isLeaf: true); - -/// The nesting is irregular, testing homogenous float rules on arm and arm64, -/// and the fpu register usage on x64. -void testReturnStruct8BytesNestedFloat2Leaf() { - final a0Pointer = calloc(); - final Struct4BytesFloat a0 = a0Pointer.ref; - double a1; - - a0.a0 = -1.0; - a1 = 2.0; - - final result = returnStruct8BytesNestedFloat2Leaf(a0, a1); - - print("result = $result"); - - Expect.approxEquals(a0.a0, result.a0.a0); - Expect.approxEquals(a1, result.a1); - - calloc.free(a0Pointer); -} - -final returnStruct8BytesNestedMixedLeaf = ffiTestFunctions.lookupFunction< - Struct8BytesNestedMixed Function( - Struct4BytesHomogeneousInt16, Struct4BytesFloat), - Struct8BytesNestedMixed Function(Struct4BytesHomogeneousInt16, - Struct4BytesFloat)>("ReturnStruct8BytesNestedMixed", isLeaf: true); - -/// Simple nested struct with mixed members. -void testReturnStruct8BytesNestedMixedLeaf() { - final a0Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct4BytesFloat a1 = a1Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a1.a0 = -3.0; - - final result = returnStruct8BytesNestedMixedLeaf(a0, a1); - - print("result = $result"); - - Expect.equals(a0.a0, result.a0.a0); - Expect.equals(a0.a1, result.a0.a1); - Expect.approxEquals(a1.a0, result.a1.a0); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); -} - -final returnStruct16BytesNestedIntLeaf = ffiTestFunctions.lookupFunction< - Struct16BytesNestedInt Function( - Struct8BytesNestedInt, Struct8BytesNestedInt), - Struct16BytesNestedInt Function(Struct8BytesNestedInt, - Struct8BytesNestedInt)>("ReturnStruct16BytesNestedInt", isLeaf: true); - -/// Deeper nested struct to test recursive member access. -void testReturnStruct16BytesNestedIntLeaf() { - final a0Pointer = calloc(); - final Struct8BytesNestedInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct8BytesNestedInt a1 = a1Pointer.ref; - - a0.a0.a0 = -1; - a0.a0.a1 = 2; - a0.a1.a0 = -3; - a0.a1.a1 = 4; - a1.a0.a0 = -5; - a1.a0.a1 = 6; - a1.a1.a0 = -7; - a1.a1.a1 = 8; - - final result = returnStruct16BytesNestedIntLeaf(a0, a1); - - print("result = $result"); - - Expect.equals(a0.a0.a0, result.a0.a0.a0); - Expect.equals(a0.a0.a1, result.a0.a0.a1); - Expect.equals(a0.a1.a0, result.a0.a1.a0); - Expect.equals(a0.a1.a1, result.a0.a1.a1); - Expect.equals(a1.a0.a0, result.a1.a0.a0); - Expect.equals(a1.a0.a1, result.a1.a0.a1); - Expect.equals(a1.a1.a0, result.a1.a1.a0); - Expect.equals(a1.a1.a1, result.a1.a1.a1); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); -} - -final returnStruct32BytesNestedIntLeaf = ffiTestFunctions.lookupFunction< - Struct32BytesNestedInt Function( - Struct16BytesNestedInt, Struct16BytesNestedInt), - Struct32BytesNestedInt Function(Struct16BytesNestedInt, - Struct16BytesNestedInt)>("ReturnStruct32BytesNestedInt", isLeaf: true); - -/// Even deeper nested struct to test recursive member access. -void testReturnStruct32BytesNestedIntLeaf() { - final a0Pointer = calloc(); - final Struct16BytesNestedInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct16BytesNestedInt a1 = a1Pointer.ref; - - a0.a0.a0.a0 = -1; - a0.a0.a0.a1 = 2; - a0.a0.a1.a0 = -3; - a0.a0.a1.a1 = 4; - a0.a1.a0.a0 = -5; - a0.a1.a0.a1 = 6; - a0.a1.a1.a0 = -7; - a0.a1.a1.a1 = 8; - a1.a0.a0.a0 = -9; - a1.a0.a0.a1 = 10; - a1.a0.a1.a0 = -11; - a1.a0.a1.a1 = 12; - a1.a1.a0.a0 = -13; - a1.a1.a0.a1 = 14; - a1.a1.a1.a0 = -15; - a1.a1.a1.a1 = 16; - - final result = returnStruct32BytesNestedIntLeaf(a0, a1); - - print("result = $result"); - - Expect.equals(a0.a0.a0.a0, result.a0.a0.a0.a0); - Expect.equals(a0.a0.a0.a1, result.a0.a0.a0.a1); - Expect.equals(a0.a0.a1.a0, result.a0.a0.a1.a0); - Expect.equals(a0.a0.a1.a1, result.a0.a0.a1.a1); - Expect.equals(a0.a1.a0.a0, result.a0.a1.a0.a0); - Expect.equals(a0.a1.a0.a1, result.a0.a1.a0.a1); - Expect.equals(a0.a1.a1.a0, result.a0.a1.a1.a0); - Expect.equals(a0.a1.a1.a1, result.a0.a1.a1.a1); - Expect.equals(a1.a0.a0.a0, result.a1.a0.a0.a0); - Expect.equals(a1.a0.a0.a1, result.a1.a0.a0.a1); - Expect.equals(a1.a0.a1.a0, result.a1.a0.a1.a0); - Expect.equals(a1.a0.a1.a1, result.a1.a0.a1.a1); - Expect.equals(a1.a1.a0.a0, result.a1.a1.a0.a0); - Expect.equals(a1.a1.a0.a1, result.a1.a1.a0.a1); - Expect.equals(a1.a1.a1.a0, result.a1.a1.a1.a0); - Expect.equals(a1.a1.a1.a1, result.a1.a1.a1.a1); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); -} - -final returnStructNestedIntStructAlignmentInt16Leaf = - ffiTestFunctions.lookupFunction< - StructNestedIntStructAlignmentInt16 Function( - StructAlignmentInt16, StructAlignmentInt16), - StructNestedIntStructAlignmentInt16 Function( - StructAlignmentInt16, StructAlignmentInt16)>( - "ReturnStructNestedIntStructAlignmentInt16", - isLeaf: true); - -/// Test alignment and padding of nested struct with 16 byte int. -void testReturnStructNestedIntStructAlignmentInt16Leaf() { - final a0Pointer = calloc(); - final StructAlignmentInt16 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final StructAlignmentInt16 a1 = a1Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - a1.a0 = 4; - a1.a1 = -5; - a1.a2 = 6; - - final result = returnStructNestedIntStructAlignmentInt16Leaf(a0, a1); - - print("result = $result"); - - Expect.equals(a0.a0, result.a0.a0); - Expect.equals(a0.a1, result.a0.a1); - Expect.equals(a0.a2, result.a0.a2); - Expect.equals(a1.a0, result.a1.a0); - Expect.equals(a1.a1, result.a1.a1); - Expect.equals(a1.a2, result.a1.a2); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); -} - -final returnStructNestedIntStructAlignmentInt32Leaf = - ffiTestFunctions.lookupFunction< - StructNestedIntStructAlignmentInt32 Function( - StructAlignmentInt32, StructAlignmentInt32), - StructNestedIntStructAlignmentInt32 Function( - StructAlignmentInt32, StructAlignmentInt32)>( - "ReturnStructNestedIntStructAlignmentInt32", - isLeaf: true); - -/// Test alignment and padding of nested struct with 32 byte int. -void testReturnStructNestedIntStructAlignmentInt32Leaf() { - final a0Pointer = calloc(); - final StructAlignmentInt32 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final StructAlignmentInt32 a1 = a1Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - a1.a0 = 4; - a1.a1 = -5; - a1.a2 = 6; - - final result = returnStructNestedIntStructAlignmentInt32Leaf(a0, a1); - - print("result = $result"); - - Expect.equals(a0.a0, result.a0.a0); - Expect.equals(a0.a1, result.a0.a1); - Expect.equals(a0.a2, result.a0.a2); - Expect.equals(a1.a0, result.a1.a0); - Expect.equals(a1.a1, result.a1.a1); - Expect.equals(a1.a2, result.a1.a2); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); -} - -final returnStructNestedIntStructAlignmentInt64Leaf = - ffiTestFunctions.lookupFunction< - StructNestedIntStructAlignmentInt64 Function( - StructAlignmentInt64, StructAlignmentInt64), - StructNestedIntStructAlignmentInt64 Function( - StructAlignmentInt64, StructAlignmentInt64)>( - "ReturnStructNestedIntStructAlignmentInt64", - isLeaf: true); - -/// Test alignment and padding of nested struct with 64 byte int. -void testReturnStructNestedIntStructAlignmentInt64Leaf() { - final a0Pointer = calloc(); - final StructAlignmentInt64 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final StructAlignmentInt64 a1 = a1Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - a1.a0 = 4; - a1.a1 = -5; - a1.a2 = 6; - - final result = returnStructNestedIntStructAlignmentInt64Leaf(a0, a1); - - print("result = $result"); - - Expect.equals(a0.a0, result.a0.a0); - Expect.equals(a0.a1, result.a0.a1); - Expect.equals(a0.a2, result.a0.a2); - Expect.equals(a1.a0, result.a1.a0); - Expect.equals(a1.a1, result.a1.a1); - Expect.equals(a1.a2, result.a1.a2); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); -} - -final returnStructNestedIrregularEvenBiggerLeaf = - ffiTestFunctions.lookupFunction< - StructNestedIrregularEvenBigger Function(Uint64, - StructNestedIrregularBigger, StructNestedIrregularBigger, Double), - StructNestedIrregularEvenBigger Function( - int, - StructNestedIrregularBigger, - StructNestedIrregularBigger, - double)>("ReturnStructNestedIrregularEvenBigger", isLeaf: true); - -/// Return big irregular struct as smoke test. -void testReturnStructNestedIrregularEvenBiggerLeaf() { - int a0; - final a1Pointer = calloc(); - final StructNestedIrregularBigger a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final StructNestedIrregularBigger a2 = a2Pointer.ref; - double a3; - - a0 = 1; - a1.a0.a0 = 2; - a1.a0.a1.a0.a0 = -3; - a1.a0.a1.a0.a1 = 4; - a1.a0.a1.a1.a0 = -5.0; - a1.a0.a2 = 6; - a1.a0.a3.a0.a0 = -7.0; - a1.a0.a3.a1 = 8.0; - a1.a0.a4 = 9; - a1.a0.a5.a0.a0 = 10.0; - a1.a0.a5.a1.a0 = -11.0; - a1.a0.a6 = 12; - a1.a1.a0.a0 = -13; - a1.a1.a0.a1 = 14; - a1.a1.a1.a0 = -15.0; - a1.a2 = 16.0; - a1.a3 = -17.0; - a2.a0.a0 = 18; - a2.a0.a1.a0.a0 = -19; - a2.a0.a1.a0.a1 = 20; - a2.a0.a1.a1.a0 = -21.0; - a2.a0.a2 = 22; - a2.a0.a3.a0.a0 = -23.0; - a2.a0.a3.a1 = 24.0; - a2.a0.a4 = 25; - a2.a0.a5.a0.a0 = 26.0; - a2.a0.a5.a1.a0 = -27.0; - a2.a0.a6 = 28; - a2.a1.a0.a0 = -29; - a2.a1.a0.a1 = 30; - a2.a1.a1.a0 = -31.0; - a2.a2 = 32.0; - a2.a3 = -33.0; - a3 = 34.0; - - final result = returnStructNestedIrregularEvenBiggerLeaf(a0, a1, a2, a3); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1.a0.a0, result.a1.a0.a0); - Expect.equals(a1.a0.a1.a0.a0, result.a1.a0.a1.a0.a0); - Expect.equals(a1.a0.a1.a0.a1, result.a1.a0.a1.a0.a1); - Expect.approxEquals(a1.a0.a1.a1.a0, result.a1.a0.a1.a1.a0); - Expect.equals(a1.a0.a2, result.a1.a0.a2); - Expect.approxEquals(a1.a0.a3.a0.a0, result.a1.a0.a3.a0.a0); - Expect.approxEquals(a1.a0.a3.a1, result.a1.a0.a3.a1); - Expect.equals(a1.a0.a4, result.a1.a0.a4); - Expect.approxEquals(a1.a0.a5.a0.a0, result.a1.a0.a5.a0.a0); - Expect.approxEquals(a1.a0.a5.a1.a0, result.a1.a0.a5.a1.a0); - Expect.equals(a1.a0.a6, result.a1.a0.a6); - Expect.equals(a1.a1.a0.a0, result.a1.a1.a0.a0); - Expect.equals(a1.a1.a0.a1, result.a1.a1.a0.a1); - Expect.approxEquals(a1.a1.a1.a0, result.a1.a1.a1.a0); - Expect.approxEquals(a1.a2, result.a1.a2); - Expect.approxEquals(a1.a3, result.a1.a3); - Expect.equals(a2.a0.a0, result.a2.a0.a0); - Expect.equals(a2.a0.a1.a0.a0, result.a2.a0.a1.a0.a0); - Expect.equals(a2.a0.a1.a0.a1, result.a2.a0.a1.a0.a1); - Expect.approxEquals(a2.a0.a1.a1.a0, result.a2.a0.a1.a1.a0); - Expect.equals(a2.a0.a2, result.a2.a0.a2); - Expect.approxEquals(a2.a0.a3.a0.a0, result.a2.a0.a3.a0.a0); - Expect.approxEquals(a2.a0.a3.a1, result.a2.a0.a3.a1); - Expect.equals(a2.a0.a4, result.a2.a0.a4); - Expect.approxEquals(a2.a0.a5.a0.a0, result.a2.a0.a5.a0.a0); - Expect.approxEquals(a2.a0.a5.a1.a0, result.a2.a0.a5.a1.a0); - Expect.equals(a2.a0.a6, result.a2.a0.a6); - Expect.equals(a2.a1.a0.a0, result.a2.a1.a0.a0); - Expect.equals(a2.a1.a0.a1, result.a2.a1.a0.a1); - Expect.approxEquals(a2.a1.a1.a0, result.a2.a1.a1.a0); - Expect.approxEquals(a2.a2, result.a2.a2); - Expect.approxEquals(a2.a3, result.a2.a3); - Expect.approxEquals(a3, result.a3); - - calloc.free(a1Pointer); - calloc.free(a2Pointer); -} diff --git a/tests/ffi_2/function_structs_by_value_generated_ret_arg_test.dart b/tests/ffi_2/function_structs_by_value_generated_ret_arg_test.dart deleted file mode 100644 index 2a2bf81a8ae..00000000000 --- a/tests/ffi_2/function_structs_by_value_generated_ret_arg_test.dart +++ /dev/null @@ -1,833 +0,0 @@ -// 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. -// -// This file has been automatically generated. Please do not edit it manually. -// Generated by tests/ffi/generator/structs_by_value_tests_generator.dart. -// -// SharedObjects=ffi_test_functions -// VMOptions= -// VMOptions=--deterministic --optimization-counter-threshold=90 -// VMOptions=--use-slow-path -// VMOptions=--use-slow-path --stacktrace-every=100 - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; -import "package:ffi/ffi.dart"; - -import 'dylib_utils.dart'; - -// Reuse the compound classes. -import 'function_structs_by_value_generated_compounds.dart'; - -final ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); -void main() { - for (int i = 0; i < 100; ++i) { - testReturnStructArgumentStruct1ByteInt(); - testReturnStructArgumentInt32x8Struct1ByteInt(); - testReturnStructArgumentStruct8BytesHomogeneousFloat(); - testReturnStructArgumentStruct20BytesHomogeneousInt32(); - testReturnStructArgumentInt32x8Struct20BytesHomogeneou(); - testReturnStructArgumentStruct8BytesInlineArrayInt(); - testReturnStructArgumentStructStruct16BytesHomogeneous(); - testReturnStructArgumentStructStruct32BytesHomogeneous(); - testReturnStructArgumentStructStruct16BytesMixed3(); - testReturnStructAlignmentInt16(); - testReturnStructAlignmentInt32(); - testReturnStructAlignmentInt64(); - testReturnStruct8BytesNestedInt(); - testReturnStruct8BytesNestedFloat(); - testReturnStruct8BytesNestedFloat2(); - testReturnStruct8BytesNestedMixed(); - testReturnStruct16BytesNestedInt(); - testReturnStruct32BytesNestedInt(); - testReturnStructNestedIntStructAlignmentInt16(); - testReturnStructNestedIntStructAlignmentInt32(); - testReturnStructNestedIntStructAlignmentInt64(); - testReturnStructNestedIrregularEvenBigger(); - } -} - -final returnStructArgumentStruct1ByteInt = ffiTestFunctions.lookupFunction< - Struct1ByteInt Function(Struct1ByteInt), - Struct1ByteInt Function( - Struct1ByteInt)>("ReturnStructArgumentStruct1ByteInt"); - -/// Test that a struct passed in as argument can be returned. -/// Especially for ffi callbacks. -/// Struct is passed in int registers in most ABIs. -void testReturnStructArgumentStruct1ByteInt() { - final a0Pointer = calloc(); - final Struct1ByteInt a0 = a0Pointer.ref; - - a0.a0 = -1; - - final result = returnStructArgumentStruct1ByteInt(a0); - - print("result = $result"); - - Expect.equals(a0.a0, result.a0); - - calloc.free(a0Pointer); -} - -final returnStructArgumentInt32x8Struct1ByteInt = - ffiTestFunctions.lookupFunction< - Struct1ByteInt Function(Int32, Int32, Int32, Int32, Int32, Int32, Int32, - Int32, Struct1ByteInt), - Struct1ByteInt Function(int, int, int, int, int, int, int, int, - Struct1ByteInt)>("ReturnStructArgumentInt32x8Struct1ByteInt"); - -/// Test that a struct passed in as argument can be returned. -/// Especially for ffi callbacks. -/// Struct is passed on stack on all ABIs. -void testReturnStructArgumentInt32x8Struct1ByteInt() { - int a0; - int a1; - int a2; - int a3; - int a4; - int a5; - int a6; - int a7; - final a8Pointer = calloc(); - final Struct1ByteInt a8 = a8Pointer.ref; - - a0 = -1; - a1 = 2; - a2 = -3; - a3 = 4; - a4 = -5; - a5 = 6; - a6 = -7; - a7 = 8; - a8.a0 = -9; - - final result = returnStructArgumentInt32x8Struct1ByteInt( - a0, a1, a2, a3, a4, a5, a6, a7, a8); - - print("result = $result"); - - Expect.equals(a8.a0, result.a0); - - calloc.free(a8Pointer); -} - -final returnStructArgumentStruct8BytesHomogeneousFloat = - ffiTestFunctions.lookupFunction< - Struct8BytesHomogeneousFloat Function(Struct8BytesHomogeneousFloat), - Struct8BytesHomogeneousFloat Function( - Struct8BytesHomogeneousFloat)>( - "ReturnStructArgumentStruct8BytesHomogeneousFloat"); - -/// Test that a struct passed in as argument can be returned. -/// Especially for ffi callbacks. -/// Struct is passed in float registers in most ABIs. -void testReturnStructArgumentStruct8BytesHomogeneousFloat() { - final a0Pointer = calloc(); - final Struct8BytesHomogeneousFloat a0 = a0Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2.0; - - final result = returnStructArgumentStruct8BytesHomogeneousFloat(a0); - - print("result = $result"); - - Expect.approxEquals(a0.a0, result.a0); - Expect.approxEquals(a0.a1, result.a1); - - calloc.free(a0Pointer); -} - -final returnStructArgumentStruct20BytesHomogeneousInt32 = - ffiTestFunctions - .lookupFunction< - Struct20BytesHomogeneousInt32 Function( - Struct20BytesHomogeneousInt32), - Struct20BytesHomogeneousInt32 Function( - Struct20BytesHomogeneousInt32)>( - "ReturnStructArgumentStruct20BytesHomogeneousInt32"); - -/// On arm64, both argument and return value are passed in by pointer. -void testReturnStructArgumentStruct20BytesHomogeneousInt32() { - final a0Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a0 = a0Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - a0.a3 = 4; - a0.a4 = -5; - - final result = returnStructArgumentStruct20BytesHomogeneousInt32(a0); - - print("result = $result"); - - Expect.equals(a0.a0, result.a0); - Expect.equals(a0.a1, result.a1); - Expect.equals(a0.a2, result.a2); - Expect.equals(a0.a3, result.a3); - Expect.equals(a0.a4, result.a4); - - calloc.free(a0Pointer); -} - -final returnStructArgumentInt32x8Struct20BytesHomogeneou = - ffiTestFunctions.lookupFunction< - Struct20BytesHomogeneousInt32 Function(Int32, Int32, Int32, Int32, - Int32, Int32, Int32, Int32, Struct20BytesHomogeneousInt32), - Struct20BytesHomogeneousInt32 Function(int, int, int, int, int, int, - int, int, Struct20BytesHomogeneousInt32)>( - "ReturnStructArgumentInt32x8Struct20BytesHomogeneou"); - -/// On arm64, both argument and return value are passed in by pointer. -/// Ints exhaust registers, so that pointer is passed on stack. -void testReturnStructArgumentInt32x8Struct20BytesHomogeneou() { - int a0; - int a1; - int a2; - int a3; - int a4; - int a5; - int a6; - int a7; - final a8Pointer = calloc(); - final Struct20BytesHomogeneousInt32 a8 = a8Pointer.ref; - - a0 = -1; - a1 = 2; - a2 = -3; - a3 = 4; - a4 = -5; - a5 = 6; - a6 = -7; - a7 = 8; - a8.a0 = -9; - a8.a1 = 10; - a8.a2 = -11; - a8.a3 = 12; - a8.a4 = -13; - - final result = returnStructArgumentInt32x8Struct20BytesHomogeneou( - a0, a1, a2, a3, a4, a5, a6, a7, a8); - - print("result = $result"); - - Expect.equals(a8.a0, result.a0); - Expect.equals(a8.a1, result.a1); - Expect.equals(a8.a2, result.a2); - Expect.equals(a8.a3, result.a3); - Expect.equals(a8.a4, result.a4); - - calloc.free(a8Pointer); -} - -final returnStructArgumentStruct8BytesInlineArrayInt = - ffiTestFunctions.lookupFunction< - Struct8BytesInlineArrayInt Function(Struct8BytesInlineArrayInt), - Struct8BytesInlineArrayInt Function(Struct8BytesInlineArrayInt)>( - "ReturnStructArgumentStruct8BytesInlineArrayInt"); - -/// Test returning struct with inline array. -void testReturnStructArgumentStruct8BytesInlineArrayInt() { - final a0Pointer = calloc(); - final Struct8BytesInlineArrayInt a0 = a0Pointer.ref; - - a0.a0[0] = 1; - a0.a0[1] = 2; - a0.a0[2] = 3; - a0.a0[3] = 4; - a0.a0[4] = 5; - a0.a0[5] = 6; - a0.a0[6] = 7; - a0.a0[7] = 8; - - final result = returnStructArgumentStruct8BytesInlineArrayInt(a0); - - print("result = $result"); - - for (int i = 0; i < 8; i++) { - Expect.equals(a0.a0[i], result.a0[i]); - } - - calloc.free(a0Pointer); -} - -final returnStructArgumentStructStruct16BytesHomogeneous = - ffiTestFunctions.lookupFunction< - StructStruct16BytesHomogeneousFloat2 Function( - StructStruct16BytesHomogeneousFloat2), - StructStruct16BytesHomogeneousFloat2 Function( - StructStruct16BytesHomogeneousFloat2)>( - "ReturnStructArgumentStructStruct16BytesHomogeneous"); - -/// Return value in FPU registers on arm hardfp and arm64. -void testReturnStructArgumentStructStruct16BytesHomogeneous() { - final a0Pointer = calloc(); - final StructStruct16BytesHomogeneousFloat2 a0 = a0Pointer.ref; - - a0.a0.a0 = -1.0; - a0.a1[0].a0 = 2.0; - a0.a1[1].a0 = -3.0; - a0.a2 = 4.0; - - final result = returnStructArgumentStructStruct16BytesHomogeneous(a0); - - print("result = $result"); - - Expect.approxEquals(a0.a0.a0, result.a0.a0); - for (int i = 0; i < 2; i++) { - Expect.approxEquals(a0.a1[i].a0, result.a1[i].a0); - } - Expect.approxEquals(a0.a2, result.a2); - - calloc.free(a0Pointer); -} - -final returnStructArgumentStructStruct32BytesHomogeneous = - ffiTestFunctions.lookupFunction< - StructStruct32BytesHomogeneousDouble2 Function( - StructStruct32BytesHomogeneousDouble2), - StructStruct32BytesHomogeneousDouble2 Function( - StructStruct32BytesHomogeneousDouble2)>( - "ReturnStructArgumentStructStruct32BytesHomogeneous"); - -/// Return value in FPU registers on arm64. -void testReturnStructArgumentStructStruct32BytesHomogeneous() { - final a0Pointer = calloc(); - final StructStruct32BytesHomogeneousDouble2 a0 = a0Pointer.ref; - - a0.a0.a0 = -1.0; - a0.a1[0].a0 = 2.0; - a0.a1[1].a0 = -3.0; - a0.a2 = 4.0; - - final result = returnStructArgumentStructStruct32BytesHomogeneous(a0); - - print("result = $result"); - - Expect.approxEquals(a0.a0.a0, result.a0.a0); - for (int i = 0; i < 2; i++) { - Expect.approxEquals(a0.a1[i].a0, result.a1[i].a0); - } - Expect.approxEquals(a0.a2, result.a2); - - calloc.free(a0Pointer); -} - -final returnStructArgumentStructStruct16BytesMixed3 = - ffiTestFunctions.lookupFunction< - StructStruct16BytesMixed3 Function(StructStruct16BytesMixed3), - StructStruct16BytesMixed3 Function(StructStruct16BytesMixed3)>( - "ReturnStructArgumentStructStruct16BytesMixed3"); - -/// On x64 Linux, return value is split over FP and int registers. -void testReturnStructArgumentStructStruct16BytesMixed3() { - final a0Pointer = calloc(); - final StructStruct16BytesMixed3 a0 = a0Pointer.ref; - - a0.a0.a0 = -1.0; - a0.a1[0].a0 = 2.0; - a0.a1[0].a1 = -3; - a0.a1[0].a2 = 4; - a0.a2[0] = -5; - a0.a2[1] = 6; - - final result = returnStructArgumentStructStruct16BytesMixed3(a0); - - print("result = $result"); - - Expect.approxEquals(a0.a0.a0, result.a0.a0); - for (int i = 0; i < 1; i++) { - Expect.approxEquals(a0.a1[i].a0, result.a1[i].a0); - Expect.equals(a0.a1[i].a1, result.a1[i].a1); - Expect.equals(a0.a1[i].a2, result.a1[i].a2); - } - for (int i = 0; i < 2; i++) { - Expect.equals(a0.a2[i], result.a2[i]); - } - - calloc.free(a0Pointer); -} - -final returnStructAlignmentInt16 = ffiTestFunctions.lookupFunction< - StructAlignmentInt16 Function(Int8, Int16, Int8), - StructAlignmentInt16 Function(int, int, int)>("ReturnStructAlignmentInt16"); - -/// Test alignment and padding of 16 byte int within struct. -void testReturnStructAlignmentInt16() { - int a0; - int a1; - int a2; - - a0 = -1; - a1 = 2; - a2 = -3; - - final result = returnStructAlignmentInt16(a0, a1, a2); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); -} - -final returnStructAlignmentInt32 = ffiTestFunctions.lookupFunction< - StructAlignmentInt32 Function(Int8, Int32, Int8), - StructAlignmentInt32 Function(int, int, int)>("ReturnStructAlignmentInt32"); - -/// Test alignment and padding of 32 byte int within struct. -void testReturnStructAlignmentInt32() { - int a0; - int a1; - int a2; - - a0 = -1; - a1 = 2; - a2 = -3; - - final result = returnStructAlignmentInt32(a0, a1, a2); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); -} - -final returnStructAlignmentInt64 = ffiTestFunctions.lookupFunction< - StructAlignmentInt64 Function(Int8, Int64, Int8), - StructAlignmentInt64 Function(int, int, int)>("ReturnStructAlignmentInt64"); - -/// Test alignment and padding of 64 byte int within struct. -void testReturnStructAlignmentInt64() { - int a0; - int a1; - int a2; - - a0 = -1; - a1 = 2; - a2 = -3; - - final result = returnStructAlignmentInt64(a0, a1, a2); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); -} - -final returnStruct8BytesNestedInt = ffiTestFunctions.lookupFunction< - Struct8BytesNestedInt Function( - Struct4BytesHomogeneousInt16, Struct4BytesHomogeneousInt16), - Struct8BytesNestedInt Function(Struct4BytesHomogeneousInt16, - Struct4BytesHomogeneousInt16)>("ReturnStruct8BytesNestedInt"); - -/// Simple nested struct. -void testReturnStruct8BytesNestedInt() { - final a0Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a1 = a1Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a1.a0 = -3; - a1.a1 = 4; - - final result = returnStruct8BytesNestedInt(a0, a1); - - print("result = $result"); - - Expect.equals(a0.a0, result.a0.a0); - Expect.equals(a0.a1, result.a0.a1); - Expect.equals(a1.a0, result.a1.a0); - Expect.equals(a1.a1, result.a1.a1); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); -} - -final returnStruct8BytesNestedFloat = ffiTestFunctions.lookupFunction< - Struct8BytesNestedFloat Function(Struct4BytesFloat, Struct4BytesFloat), - Struct8BytesNestedFloat Function( - Struct4BytesFloat, Struct4BytesFloat)>("ReturnStruct8BytesNestedFloat"); - -/// Simple nested struct with floats. -void testReturnStruct8BytesNestedFloat() { - final a0Pointer = calloc(); - final Struct4BytesFloat a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct4BytesFloat a1 = a1Pointer.ref; - - a0.a0 = -1.0; - a1.a0 = 2.0; - - final result = returnStruct8BytesNestedFloat(a0, a1); - - print("result = $result"); - - Expect.approxEquals(a0.a0, result.a0.a0); - Expect.approxEquals(a1.a0, result.a1.a0); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); -} - -final returnStruct8BytesNestedFloat2 = ffiTestFunctions.lookupFunction< - Struct8BytesNestedFloat2 Function(Struct4BytesFloat, Float), - Struct8BytesNestedFloat2 Function( - Struct4BytesFloat, double)>("ReturnStruct8BytesNestedFloat2"); - -/// The nesting is irregular, testing homogenous float rules on arm and arm64, -/// and the fpu register usage on x64. -void testReturnStruct8BytesNestedFloat2() { - final a0Pointer = calloc(); - final Struct4BytesFloat a0 = a0Pointer.ref; - double a1; - - a0.a0 = -1.0; - a1 = 2.0; - - final result = returnStruct8BytesNestedFloat2(a0, a1); - - print("result = $result"); - - Expect.approxEquals(a0.a0, result.a0.a0); - Expect.approxEquals(a1, result.a1); - - calloc.free(a0Pointer); -} - -final returnStruct8BytesNestedMixed = ffiTestFunctions.lookupFunction< - Struct8BytesNestedMixed Function( - Struct4BytesHomogeneousInt16, Struct4BytesFloat), - Struct8BytesNestedMixed Function(Struct4BytesHomogeneousInt16, - Struct4BytesFloat)>("ReturnStruct8BytesNestedMixed"); - -/// Simple nested struct with mixed members. -void testReturnStruct8BytesNestedMixed() { - final a0Pointer = calloc(); - final Struct4BytesHomogeneousInt16 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct4BytesFloat a1 = a1Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a1.a0 = -3.0; - - final result = returnStruct8BytesNestedMixed(a0, a1); - - print("result = $result"); - - Expect.equals(a0.a0, result.a0.a0); - Expect.equals(a0.a1, result.a0.a1); - Expect.approxEquals(a1.a0, result.a1.a0); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); -} - -final returnStruct16BytesNestedInt = ffiTestFunctions.lookupFunction< - Struct16BytesNestedInt Function( - Struct8BytesNestedInt, Struct8BytesNestedInt), - Struct16BytesNestedInt Function(Struct8BytesNestedInt, - Struct8BytesNestedInt)>("ReturnStruct16BytesNestedInt"); - -/// Deeper nested struct to test recursive member access. -void testReturnStruct16BytesNestedInt() { - final a0Pointer = calloc(); - final Struct8BytesNestedInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct8BytesNestedInt a1 = a1Pointer.ref; - - a0.a0.a0 = -1; - a0.a0.a1 = 2; - a0.a1.a0 = -3; - a0.a1.a1 = 4; - a1.a0.a0 = -5; - a1.a0.a1 = 6; - a1.a1.a0 = -7; - a1.a1.a1 = 8; - - final result = returnStruct16BytesNestedInt(a0, a1); - - print("result = $result"); - - Expect.equals(a0.a0.a0, result.a0.a0.a0); - Expect.equals(a0.a0.a1, result.a0.a0.a1); - Expect.equals(a0.a1.a0, result.a0.a1.a0); - Expect.equals(a0.a1.a1, result.a0.a1.a1); - Expect.equals(a1.a0.a0, result.a1.a0.a0); - Expect.equals(a1.a0.a1, result.a1.a0.a1); - Expect.equals(a1.a1.a0, result.a1.a1.a0); - Expect.equals(a1.a1.a1, result.a1.a1.a1); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); -} - -final returnStruct32BytesNestedInt = ffiTestFunctions.lookupFunction< - Struct32BytesNestedInt Function( - Struct16BytesNestedInt, Struct16BytesNestedInt), - Struct32BytesNestedInt Function(Struct16BytesNestedInt, - Struct16BytesNestedInt)>("ReturnStruct32BytesNestedInt"); - -/// Even deeper nested struct to test recursive member access. -void testReturnStruct32BytesNestedInt() { - final a0Pointer = calloc(); - final Struct16BytesNestedInt a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final Struct16BytesNestedInt a1 = a1Pointer.ref; - - a0.a0.a0.a0 = -1; - a0.a0.a0.a1 = 2; - a0.a0.a1.a0 = -3; - a0.a0.a1.a1 = 4; - a0.a1.a0.a0 = -5; - a0.a1.a0.a1 = 6; - a0.a1.a1.a0 = -7; - a0.a1.a1.a1 = 8; - a1.a0.a0.a0 = -9; - a1.a0.a0.a1 = 10; - a1.a0.a1.a0 = -11; - a1.a0.a1.a1 = 12; - a1.a1.a0.a0 = -13; - a1.a1.a0.a1 = 14; - a1.a1.a1.a0 = -15; - a1.a1.a1.a1 = 16; - - final result = returnStruct32BytesNestedInt(a0, a1); - - print("result = $result"); - - Expect.equals(a0.a0.a0.a0, result.a0.a0.a0.a0); - Expect.equals(a0.a0.a0.a1, result.a0.a0.a0.a1); - Expect.equals(a0.a0.a1.a0, result.a0.a0.a1.a0); - Expect.equals(a0.a0.a1.a1, result.a0.a0.a1.a1); - Expect.equals(a0.a1.a0.a0, result.a0.a1.a0.a0); - Expect.equals(a0.a1.a0.a1, result.a0.a1.a0.a1); - Expect.equals(a0.a1.a1.a0, result.a0.a1.a1.a0); - Expect.equals(a0.a1.a1.a1, result.a0.a1.a1.a1); - Expect.equals(a1.a0.a0.a0, result.a1.a0.a0.a0); - Expect.equals(a1.a0.a0.a1, result.a1.a0.a0.a1); - Expect.equals(a1.a0.a1.a0, result.a1.a0.a1.a0); - Expect.equals(a1.a0.a1.a1, result.a1.a0.a1.a1); - Expect.equals(a1.a1.a0.a0, result.a1.a1.a0.a0); - Expect.equals(a1.a1.a0.a1, result.a1.a1.a0.a1); - Expect.equals(a1.a1.a1.a0, result.a1.a1.a1.a0); - Expect.equals(a1.a1.a1.a1, result.a1.a1.a1.a1); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); -} - -final returnStructNestedIntStructAlignmentInt16 = - ffiTestFunctions.lookupFunction< - StructNestedIntStructAlignmentInt16 Function( - StructAlignmentInt16, StructAlignmentInt16), - StructNestedIntStructAlignmentInt16 Function(StructAlignmentInt16, - StructAlignmentInt16)>("ReturnStructNestedIntStructAlignmentInt16"); - -/// Test alignment and padding of nested struct with 16 byte int. -void testReturnStructNestedIntStructAlignmentInt16() { - final a0Pointer = calloc(); - final StructAlignmentInt16 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final StructAlignmentInt16 a1 = a1Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - a1.a0 = 4; - a1.a1 = -5; - a1.a2 = 6; - - final result = returnStructNestedIntStructAlignmentInt16(a0, a1); - - print("result = $result"); - - Expect.equals(a0.a0, result.a0.a0); - Expect.equals(a0.a1, result.a0.a1); - Expect.equals(a0.a2, result.a0.a2); - Expect.equals(a1.a0, result.a1.a0); - Expect.equals(a1.a1, result.a1.a1); - Expect.equals(a1.a2, result.a1.a2); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); -} - -final returnStructNestedIntStructAlignmentInt32 = - ffiTestFunctions.lookupFunction< - StructNestedIntStructAlignmentInt32 Function( - StructAlignmentInt32, StructAlignmentInt32), - StructNestedIntStructAlignmentInt32 Function(StructAlignmentInt32, - StructAlignmentInt32)>("ReturnStructNestedIntStructAlignmentInt32"); - -/// Test alignment and padding of nested struct with 32 byte int. -void testReturnStructNestedIntStructAlignmentInt32() { - final a0Pointer = calloc(); - final StructAlignmentInt32 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final StructAlignmentInt32 a1 = a1Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - a1.a0 = 4; - a1.a1 = -5; - a1.a2 = 6; - - final result = returnStructNestedIntStructAlignmentInt32(a0, a1); - - print("result = $result"); - - Expect.equals(a0.a0, result.a0.a0); - Expect.equals(a0.a1, result.a0.a1); - Expect.equals(a0.a2, result.a0.a2); - Expect.equals(a1.a0, result.a1.a0); - Expect.equals(a1.a1, result.a1.a1); - Expect.equals(a1.a2, result.a1.a2); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); -} - -final returnStructNestedIntStructAlignmentInt64 = - ffiTestFunctions.lookupFunction< - StructNestedIntStructAlignmentInt64 Function( - StructAlignmentInt64, StructAlignmentInt64), - StructNestedIntStructAlignmentInt64 Function(StructAlignmentInt64, - StructAlignmentInt64)>("ReturnStructNestedIntStructAlignmentInt64"); - -/// Test alignment and padding of nested struct with 64 byte int. -void testReturnStructNestedIntStructAlignmentInt64() { - final a0Pointer = calloc(); - final StructAlignmentInt64 a0 = a0Pointer.ref; - final a1Pointer = calloc(); - final StructAlignmentInt64 a1 = a1Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - a1.a0 = 4; - a1.a1 = -5; - a1.a2 = 6; - - final result = returnStructNestedIntStructAlignmentInt64(a0, a1); - - print("result = $result"); - - Expect.equals(a0.a0, result.a0.a0); - Expect.equals(a0.a1, result.a0.a1); - Expect.equals(a0.a2, result.a0.a2); - Expect.equals(a1.a0, result.a1.a0); - Expect.equals(a1.a1, result.a1.a1); - Expect.equals(a1.a2, result.a1.a2); - - calloc.free(a0Pointer); - calloc.free(a1Pointer); -} - -final returnStructNestedIrregularEvenBigger = ffiTestFunctions.lookupFunction< - StructNestedIrregularEvenBigger Function(Uint64, - StructNestedIrregularBigger, StructNestedIrregularBigger, Double), - StructNestedIrregularEvenBigger Function( - int, - StructNestedIrregularBigger, - StructNestedIrregularBigger, - double)>("ReturnStructNestedIrregularEvenBigger"); - -/// Return big irregular struct as smoke test. -void testReturnStructNestedIrregularEvenBigger() { - int a0; - final a1Pointer = calloc(); - final StructNestedIrregularBigger a1 = a1Pointer.ref; - final a2Pointer = calloc(); - final StructNestedIrregularBigger a2 = a2Pointer.ref; - double a3; - - a0 = 1; - a1.a0.a0 = 2; - a1.a0.a1.a0.a0 = -3; - a1.a0.a1.a0.a1 = 4; - a1.a0.a1.a1.a0 = -5.0; - a1.a0.a2 = 6; - a1.a0.a3.a0.a0 = -7.0; - a1.a0.a3.a1 = 8.0; - a1.a0.a4 = 9; - a1.a0.a5.a0.a0 = 10.0; - a1.a0.a5.a1.a0 = -11.0; - a1.a0.a6 = 12; - a1.a1.a0.a0 = -13; - a1.a1.a0.a1 = 14; - a1.a1.a1.a0 = -15.0; - a1.a2 = 16.0; - a1.a3 = -17.0; - a2.a0.a0 = 18; - a2.a0.a1.a0.a0 = -19; - a2.a0.a1.a0.a1 = 20; - a2.a0.a1.a1.a0 = -21.0; - a2.a0.a2 = 22; - a2.a0.a3.a0.a0 = -23.0; - a2.a0.a3.a1 = 24.0; - a2.a0.a4 = 25; - a2.a0.a5.a0.a0 = 26.0; - a2.a0.a5.a1.a0 = -27.0; - a2.a0.a6 = 28; - a2.a1.a0.a0 = -29; - a2.a1.a0.a1 = 30; - a2.a1.a1.a0 = -31.0; - a2.a2 = 32.0; - a2.a3 = -33.0; - a3 = 34.0; - - final result = returnStructNestedIrregularEvenBigger(a0, a1, a2, a3); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1.a0.a0, result.a1.a0.a0); - Expect.equals(a1.a0.a1.a0.a0, result.a1.a0.a1.a0.a0); - Expect.equals(a1.a0.a1.a0.a1, result.a1.a0.a1.a0.a1); - Expect.approxEquals(a1.a0.a1.a1.a0, result.a1.a0.a1.a1.a0); - Expect.equals(a1.a0.a2, result.a1.a0.a2); - Expect.approxEquals(a1.a0.a3.a0.a0, result.a1.a0.a3.a0.a0); - Expect.approxEquals(a1.a0.a3.a1, result.a1.a0.a3.a1); - Expect.equals(a1.a0.a4, result.a1.a0.a4); - Expect.approxEquals(a1.a0.a5.a0.a0, result.a1.a0.a5.a0.a0); - Expect.approxEquals(a1.a0.a5.a1.a0, result.a1.a0.a5.a1.a0); - Expect.equals(a1.a0.a6, result.a1.a0.a6); - Expect.equals(a1.a1.a0.a0, result.a1.a1.a0.a0); - Expect.equals(a1.a1.a0.a1, result.a1.a1.a0.a1); - Expect.approxEquals(a1.a1.a1.a0, result.a1.a1.a1.a0); - Expect.approxEquals(a1.a2, result.a1.a2); - Expect.approxEquals(a1.a3, result.a1.a3); - Expect.equals(a2.a0.a0, result.a2.a0.a0); - Expect.equals(a2.a0.a1.a0.a0, result.a2.a0.a1.a0.a0); - Expect.equals(a2.a0.a1.a0.a1, result.a2.a0.a1.a0.a1); - Expect.approxEquals(a2.a0.a1.a1.a0, result.a2.a0.a1.a1.a0); - Expect.equals(a2.a0.a2, result.a2.a0.a2); - Expect.approxEquals(a2.a0.a3.a0.a0, result.a2.a0.a3.a0.a0); - Expect.approxEquals(a2.a0.a3.a1, result.a2.a0.a3.a1); - Expect.equals(a2.a0.a4, result.a2.a0.a4); - Expect.approxEquals(a2.a0.a5.a0.a0, result.a2.a0.a5.a0.a0); - Expect.approxEquals(a2.a0.a5.a1.a0, result.a2.a0.a5.a1.a0); - Expect.equals(a2.a0.a6, result.a2.a0.a6); - Expect.equals(a2.a1.a0.a0, result.a2.a1.a0.a0); - Expect.equals(a2.a1.a0.a1, result.a2.a1.a0.a1); - Expect.approxEquals(a2.a1.a1.a0, result.a2.a1.a1.a0); - Expect.approxEquals(a2.a2, result.a2.a2); - Expect.approxEquals(a2.a3, result.a2.a3); - Expect.approxEquals(a3, result.a3); - - calloc.free(a1Pointer); - calloc.free(a2Pointer); -} diff --git a/tests/ffi_2/function_structs_by_value_generated_ret_leaf_test.dart b/tests/ffi_2/function_structs_by_value_generated_ret_leaf_test.dart deleted file mode 100644 index 503c827dc20..00000000000 --- a/tests/ffi_2/function_structs_by_value_generated_ret_leaf_test.dart +++ /dev/null @@ -1,1643 +0,0 @@ -// Copyright (c) 2021, 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. -// -// This file has been automatically generated. Please do not edit it manually. -// Generated by tests/ffi/generator/structs_by_value_tests_generator.dart. -// -// SharedObjects=ffi_test_functions -// VMOptions= -// VMOptions=--deterministic --optimization-counter-threshold=90 -// VMOptions=--use-slow-path -// VMOptions=--use-slow-path --stacktrace-every=100 - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; -import "package:ffi/ffi.dart"; - -import 'dylib_utils.dart'; - -// Reuse the compound classes. -import 'function_structs_by_value_generated_compounds.dart'; - -final ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); -void main() { - for (int i = 0; i < 100; ++i) { - testReturnStruct1ByteIntLeaf(); - testReturnStruct3BytesHomogeneousUint8Leaf(); - testReturnStruct3BytesInt2ByteAlignedLeaf(); - testReturnStruct4BytesHomogeneousInt16Leaf(); - testReturnStruct7BytesHomogeneousUint8Leaf(); - testReturnStruct7BytesInt4ByteAlignedLeaf(); - testReturnStruct8BytesIntLeaf(); - testReturnStruct8BytesHomogeneousFloatLeaf(); - testReturnStruct8BytesMixedLeaf(); - testReturnStruct9BytesHomogeneousUint8Leaf(); - testReturnStruct9BytesInt4Or8ByteAlignedLeaf(); - testReturnStruct12BytesHomogeneousFloatLeaf(); - testReturnStruct16BytesHomogeneousFloatLeaf(); - testReturnStruct16BytesMixedLeaf(); - testReturnStruct16BytesMixed2Leaf(); - testReturnStruct17BytesIntLeaf(); - testReturnStruct19BytesHomogeneousUint8Leaf(); - testReturnStruct20BytesHomogeneousInt32Leaf(); - testReturnStruct20BytesHomogeneousFloatLeaf(); - testReturnStruct32BytesHomogeneousDoubleLeaf(); - testReturnStruct40BytesHomogeneousDoubleLeaf(); - testReturnStruct1024BytesHomogeneousUint64Leaf(); - testReturnStruct3BytesPackedIntLeaf(); - testReturnStruct8BytesPackedIntLeaf(); - testReturnStruct9BytesPackedMixedLeaf(); - testReturnUnion4BytesMixedLeaf(); - testReturnUnion8BytesNestedFloatLeaf(); - testReturnUnion9BytesNestedIntLeaf(); - testReturnUnion16BytesNestedFloatLeaf(); - } -} - -final returnStruct1ByteIntLeaf = ffiTestFunctions.lookupFunction< - Struct1ByteInt Function(Int8), - Struct1ByteInt Function(int)>("ReturnStruct1ByteInt", isLeaf: true); - -/// Smallest struct with data. -void testReturnStruct1ByteIntLeaf() { - int a0; - - a0 = -1; - - final result = returnStruct1ByteIntLeaf(a0); - - print("result = $result"); - - Expect.equals(a0, result.a0); -} - -final returnStruct3BytesHomogeneousUint8Leaf = ffiTestFunctions.lookupFunction< - Struct3BytesHomogeneousUint8 Function(Uint8, Uint8, Uint8), - Struct3BytesHomogeneousUint8 Function( - int, int, int)>("ReturnStruct3BytesHomogeneousUint8", isLeaf: true); - -/// Smaller than word size return value on all architectures. -void testReturnStruct3BytesHomogeneousUint8Leaf() { - int a0; - int a1; - int a2; - - a0 = 1; - a1 = 2; - a2 = 3; - - final result = returnStruct3BytesHomogeneousUint8Leaf(a0, a1, a2); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); -} - -final returnStruct3BytesInt2ByteAlignedLeaf = ffiTestFunctions.lookupFunction< - Struct3BytesInt2ByteAligned Function(Int16, Int8), - Struct3BytesInt2ByteAligned Function( - int, int)>("ReturnStruct3BytesInt2ByteAligned", isLeaf: true); - -/// Smaller than word size return value on all architectures. -/// With alignment rules taken into account size is 4 bytes. -void testReturnStruct3BytesInt2ByteAlignedLeaf() { - int a0; - int a1; - - a0 = -1; - a1 = 2; - - final result = returnStruct3BytesInt2ByteAlignedLeaf(a0, a1); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); -} - -final returnStruct4BytesHomogeneousInt16Leaf = ffiTestFunctions.lookupFunction< - Struct4BytesHomogeneousInt16 Function(Int16, Int16), - Struct4BytesHomogeneousInt16 Function( - int, int)>("ReturnStruct4BytesHomogeneousInt16", isLeaf: true); - -/// Word size return value on 32 bit architectures.. -void testReturnStruct4BytesHomogeneousInt16Leaf() { - int a0; - int a1; - - a0 = -1; - a1 = 2; - - final result = returnStruct4BytesHomogeneousInt16Leaf(a0, a1); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); -} - -final returnStruct7BytesHomogeneousUint8Leaf = ffiTestFunctions.lookupFunction< - Struct7BytesHomogeneousUint8 Function( - Uint8, Uint8, Uint8, Uint8, Uint8, Uint8, Uint8), - Struct7BytesHomogeneousUint8 Function(int, int, int, int, int, int, - int)>("ReturnStruct7BytesHomogeneousUint8", isLeaf: true); - -/// Non-wordsize return value. -void testReturnStruct7BytesHomogeneousUint8Leaf() { - int a0; - int a1; - int a2; - int a3; - int a4; - int a5; - int a6; - - a0 = 1; - a1 = 2; - a2 = 3; - a3 = 4; - a4 = 5; - a5 = 6; - a6 = 7; - - final result = - returnStruct7BytesHomogeneousUint8Leaf(a0, a1, a2, a3, a4, a5, a6); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); - Expect.equals(a3, result.a3); - Expect.equals(a4, result.a4); - Expect.equals(a5, result.a5); - Expect.equals(a6, result.a6); -} - -final returnStruct7BytesInt4ByteAlignedLeaf = ffiTestFunctions.lookupFunction< - Struct7BytesInt4ByteAligned Function(Int32, Int16, Int8), - Struct7BytesInt4ByteAligned Function( - int, int, int)>("ReturnStruct7BytesInt4ByteAligned", isLeaf: true); - -/// Non-wordsize return value. -/// With alignment rules taken into account size is 8 bytes. -void testReturnStruct7BytesInt4ByteAlignedLeaf() { - int a0; - int a1; - int a2; - - a0 = -1; - a1 = 2; - a2 = -3; - - final result = returnStruct7BytesInt4ByteAlignedLeaf(a0, a1, a2); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); -} - -final returnStruct8BytesIntLeaf = ffiTestFunctions.lookupFunction< - Struct8BytesInt Function(Int16, Int16, Int32), - Struct8BytesInt Function( - int, int, int)>("ReturnStruct8BytesInt", isLeaf: true); - -/// Return value in integer registers on many architectures. -void testReturnStruct8BytesIntLeaf() { - int a0; - int a1; - int a2; - - a0 = -1; - a1 = 2; - a2 = -3; - - final result = returnStruct8BytesIntLeaf(a0, a1, a2); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); -} - -final returnStruct8BytesHomogeneousFloatLeaf = ffiTestFunctions.lookupFunction< - Struct8BytesHomogeneousFloat Function(Float, Float), - Struct8BytesHomogeneousFloat Function( - double, double)>("ReturnStruct8BytesHomogeneousFloat", isLeaf: true); - -/// Return value in FP registers on many architectures. -void testReturnStruct8BytesHomogeneousFloatLeaf() { - double a0; - double a1; - - a0 = -1.0; - a1 = 2.0; - - final result = returnStruct8BytesHomogeneousFloatLeaf(a0, a1); - - print("result = $result"); - - Expect.approxEquals(a0, result.a0); - Expect.approxEquals(a1, result.a1); -} - -final returnStruct8BytesMixedLeaf = ffiTestFunctions.lookupFunction< - Struct8BytesMixed Function(Float, Int16, Int16), - Struct8BytesMixed Function( - double, int, int)>("ReturnStruct8BytesMixed", isLeaf: true); - -/// Return value split over FP and integer register in x64. -void testReturnStruct8BytesMixedLeaf() { - double a0; - int a1; - int a2; - - a0 = -1.0; - a1 = 2; - a2 = -3; - - final result = returnStruct8BytesMixedLeaf(a0, a1, a2); - - print("result = $result"); - - Expect.approxEquals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); -} - -final returnStruct9BytesHomogeneousUint8Leaf = ffiTestFunctions.lookupFunction< - Struct9BytesHomogeneousUint8 Function( - Uint8, Uint8, Uint8, Uint8, Uint8, Uint8, Uint8, Uint8, Uint8), - Struct9BytesHomogeneousUint8 Function(int, int, int, int, int, int, int, - int, int)>("ReturnStruct9BytesHomogeneousUint8", isLeaf: true); - -/// The minimum alignment of this struct is only 1 byte based on its fields. -/// Test that the memory backing these structs is the right size and that -/// dart:ffi trampolines do not write outside this size. -void testReturnStruct9BytesHomogeneousUint8Leaf() { - int a0; - int a1; - int a2; - int a3; - int a4; - int a5; - int a6; - int a7; - int a8; - - a0 = 1; - a1 = 2; - a2 = 3; - a3 = 4; - a4 = 5; - a5 = 6; - a6 = 7; - a7 = 8; - a8 = 9; - - final result = returnStruct9BytesHomogeneousUint8Leaf( - a0, a1, a2, a3, a4, a5, a6, a7, a8); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); - Expect.equals(a3, result.a3); - Expect.equals(a4, result.a4); - Expect.equals(a5, result.a5); - Expect.equals(a6, result.a6); - Expect.equals(a7, result.a7); - Expect.equals(a8, result.a8); -} - -final returnStruct9BytesInt4Or8ByteAlignedLeaf = - ffiTestFunctions.lookupFunction< - Struct9BytesInt4Or8ByteAligned Function(Int64, Int8), - Struct9BytesInt4Or8ByteAligned Function( - int, int)>("ReturnStruct9BytesInt4Or8ByteAligned", isLeaf: true); - -/// Return value in two integer registers on x64. -/// With alignment rules taken into account size is 12 or 16 bytes. -void testReturnStruct9BytesInt4Or8ByteAlignedLeaf() { - int a0; - int a1; - - a0 = -1; - a1 = 2; - - final result = returnStruct9BytesInt4Or8ByteAlignedLeaf(a0, a1); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); -} - -final returnStruct12BytesHomogeneousFloatLeaf = ffiTestFunctions.lookupFunction< - Struct12BytesHomogeneousFloat Function(Float, Float, Float), - Struct12BytesHomogeneousFloat Function(double, double, - double)>("ReturnStruct12BytesHomogeneousFloat", isLeaf: true); - -/// Return value in FPU registers, but does not use all registers on arm hardfp -/// and arm64. -void testReturnStruct12BytesHomogeneousFloatLeaf() { - double a0; - double a1; - double a2; - - a0 = -1.0; - a1 = 2.0; - a2 = -3.0; - - final result = returnStruct12BytesHomogeneousFloatLeaf(a0, a1, a2); - - print("result = $result"); - - Expect.approxEquals(a0, result.a0); - Expect.approxEquals(a1, result.a1); - Expect.approxEquals(a2, result.a2); -} - -final returnStruct16BytesHomogeneousFloatLeaf = ffiTestFunctions.lookupFunction< - Struct16BytesHomogeneousFloat Function(Float, Float, Float, Float), - Struct16BytesHomogeneousFloat Function(double, double, double, - double)>("ReturnStruct16BytesHomogeneousFloat", isLeaf: true); - -/// Return value in FPU registers on arm hardfp and arm64. -void testReturnStruct16BytesHomogeneousFloatLeaf() { - double a0; - double a1; - double a2; - double a3; - - a0 = -1.0; - a1 = 2.0; - a2 = -3.0; - a3 = 4.0; - - final result = returnStruct16BytesHomogeneousFloatLeaf(a0, a1, a2, a3); - - print("result = $result"); - - Expect.approxEquals(a0, result.a0); - Expect.approxEquals(a1, result.a1); - Expect.approxEquals(a2, result.a2); - Expect.approxEquals(a3, result.a3); -} - -final returnStruct16BytesMixedLeaf = ffiTestFunctions.lookupFunction< - Struct16BytesMixed Function(Double, Int64), - Struct16BytesMixed Function( - double, int)>("ReturnStruct16BytesMixed", isLeaf: true); - -/// Return value split over FP and integer register in x64. -void testReturnStruct16BytesMixedLeaf() { - double a0; - int a1; - - a0 = -1.0; - a1 = 2; - - final result = returnStruct16BytesMixedLeaf(a0, a1); - - print("result = $result"); - - Expect.approxEquals(a0, result.a0); - Expect.equals(a1, result.a1); -} - -final returnStruct16BytesMixed2Leaf = ffiTestFunctions.lookupFunction< - Struct16BytesMixed2 Function(Float, Float, Float, Int32), - Struct16BytesMixed2 Function(double, double, double, - int)>("ReturnStruct16BytesMixed2", isLeaf: true); - -/// Return value split over FP and integer register in x64. -/// The integer register contains half float half int. -void testReturnStruct16BytesMixed2Leaf() { - double a0; - double a1; - double a2; - int a3; - - a0 = -1.0; - a1 = 2.0; - a2 = -3.0; - a3 = 4; - - final result = returnStruct16BytesMixed2Leaf(a0, a1, a2, a3); - - print("result = $result"); - - Expect.approxEquals(a0, result.a0); - Expect.approxEquals(a1, result.a1); - Expect.approxEquals(a2, result.a2); - Expect.equals(a3, result.a3); -} - -final returnStruct17BytesIntLeaf = ffiTestFunctions.lookupFunction< - Struct17BytesInt Function(Int64, Int64, Int8), - Struct17BytesInt Function( - int, int, int)>("ReturnStruct17BytesInt", isLeaf: true); - -/// Return value returned in preallocated space passed by pointer on most ABIs. -/// Is non word size on purpose, to test that structs are rounded up to word size -/// on all ABIs. -void testReturnStruct17BytesIntLeaf() { - int a0; - int a1; - int a2; - - a0 = -1; - a1 = 2; - a2 = -3; - - final result = returnStruct17BytesIntLeaf(a0, a1, a2); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); -} - -final returnStruct19BytesHomogeneousUint8Leaf = ffiTestFunctions.lookupFunction< - Struct19BytesHomogeneousUint8 Function( - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8), - Struct19BytesHomogeneousUint8 Function( - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int)>("ReturnStruct19BytesHomogeneousUint8", isLeaf: true); - -/// The minimum alignment of this struct is only 1 byte based on its fields. -/// Test that the memory backing these structs is the right size and that -/// dart:ffi trampolines do not write outside this size. -void testReturnStruct19BytesHomogeneousUint8Leaf() { - int a0; - int a1; - int a2; - int a3; - int a4; - int a5; - int a6; - int a7; - int a8; - int a9; - int a10; - int a11; - int a12; - int a13; - int a14; - int a15; - int a16; - int a17; - int a18; - - a0 = 1; - a1 = 2; - a2 = 3; - a3 = 4; - a4 = 5; - a5 = 6; - a6 = 7; - a7 = 8; - a8 = 9; - a9 = 10; - a10 = 11; - a11 = 12; - a12 = 13; - a13 = 14; - a14 = 15; - a15 = 16; - a16 = 17; - a17 = 18; - a18 = 19; - - final result = returnStruct19BytesHomogeneousUint8Leaf(a0, a1, a2, a3, a4, a5, - a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); - Expect.equals(a3, result.a3); - Expect.equals(a4, result.a4); - Expect.equals(a5, result.a5); - Expect.equals(a6, result.a6); - Expect.equals(a7, result.a7); - Expect.equals(a8, result.a8); - Expect.equals(a9, result.a9); - Expect.equals(a10, result.a10); - Expect.equals(a11, result.a11); - Expect.equals(a12, result.a12); - Expect.equals(a13, result.a13); - Expect.equals(a14, result.a14); - Expect.equals(a15, result.a15); - Expect.equals(a16, result.a16); - Expect.equals(a17, result.a17); - Expect.equals(a18, result.a18); -} - -final returnStruct20BytesHomogeneousInt32Leaf = ffiTestFunctions.lookupFunction< - Struct20BytesHomogeneousInt32 Function(Int32, Int32, Int32, Int32, Int32), - Struct20BytesHomogeneousInt32 Function(int, int, int, int, - int)>("ReturnStruct20BytesHomogeneousInt32", isLeaf: true); - -/// Return value too big to go in cpu registers on arm64. -void testReturnStruct20BytesHomogeneousInt32Leaf() { - int a0; - int a1; - int a2; - int a3; - int a4; - - a0 = -1; - a1 = 2; - a2 = -3; - a3 = 4; - a4 = -5; - - final result = returnStruct20BytesHomogeneousInt32Leaf(a0, a1, a2, a3, a4); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); - Expect.equals(a3, result.a3); - Expect.equals(a4, result.a4); -} - -final returnStruct20BytesHomogeneousFloatLeaf = ffiTestFunctions.lookupFunction< - Struct20BytesHomogeneousFloat Function(Float, Float, Float, Float, Float), - Struct20BytesHomogeneousFloat Function(double, double, double, double, - double)>("ReturnStruct20BytesHomogeneousFloat", isLeaf: true); - -/// Return value too big to go in FPU registers on x64, arm hardfp and arm64. -void testReturnStruct20BytesHomogeneousFloatLeaf() { - double a0; - double a1; - double a2; - double a3; - double a4; - - a0 = -1.0; - a1 = 2.0; - a2 = -3.0; - a3 = 4.0; - a4 = -5.0; - - final result = returnStruct20BytesHomogeneousFloatLeaf(a0, a1, a2, a3, a4); - - print("result = $result"); - - Expect.approxEquals(a0, result.a0); - Expect.approxEquals(a1, result.a1); - Expect.approxEquals(a2, result.a2); - Expect.approxEquals(a3, result.a3); - Expect.approxEquals(a4, result.a4); -} - -final returnStruct32BytesHomogeneousDoubleLeaf = - ffiTestFunctions.lookupFunction< - Struct32BytesHomogeneousDouble Function(Double, Double, Double, Double), - Struct32BytesHomogeneousDouble Function(double, double, double, - double)>("ReturnStruct32BytesHomogeneousDouble", isLeaf: true); - -/// Return value in FPU registers on arm64. -void testReturnStruct32BytesHomogeneousDoubleLeaf() { - double a0; - double a1; - double a2; - double a3; - - a0 = -1.0; - a1 = 2.0; - a2 = -3.0; - a3 = 4.0; - - final result = returnStruct32BytesHomogeneousDoubleLeaf(a0, a1, a2, a3); - - print("result = $result"); - - Expect.approxEquals(a0, result.a0); - Expect.approxEquals(a1, result.a1); - Expect.approxEquals(a2, result.a2); - Expect.approxEquals(a3, result.a3); -} - -final returnStruct40BytesHomogeneousDoubleLeaf = - ffiTestFunctions.lookupFunction< - Struct40BytesHomogeneousDouble Function( - Double, Double, Double, Double, Double), - Struct40BytesHomogeneousDouble Function(double, double, double, double, - double)>("ReturnStruct40BytesHomogeneousDouble", isLeaf: true); - -/// Return value too big to go in FPU registers on arm64. -void testReturnStruct40BytesHomogeneousDoubleLeaf() { - double a0; - double a1; - double a2; - double a3; - double a4; - - a0 = -1.0; - a1 = 2.0; - a2 = -3.0; - a3 = 4.0; - a4 = -5.0; - - final result = returnStruct40BytesHomogeneousDoubleLeaf(a0, a1, a2, a3, a4); - - print("result = $result"); - - Expect.approxEquals(a0, result.a0); - Expect.approxEquals(a1, result.a1); - Expect.approxEquals(a2, result.a2); - Expect.approxEquals(a3, result.a3); - Expect.approxEquals(a4, result.a4); -} - -final returnStruct1024BytesHomogeneousUint64Leaf = - ffiTestFunctions.lookupFunction< - Struct1024BytesHomogeneousUint64 Function( - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64), - Struct1024BytesHomogeneousUint64 Function( - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int)>("ReturnStruct1024BytesHomogeneousUint64", isLeaf: true); - -/// Test 1kb struct. -void testReturnStruct1024BytesHomogeneousUint64Leaf() { - int a0; - int a1; - int a2; - int a3; - int a4; - int a5; - int a6; - int a7; - int a8; - int a9; - int a10; - int a11; - int a12; - int a13; - int a14; - int a15; - int a16; - int a17; - int a18; - int a19; - int a20; - int a21; - int a22; - int a23; - int a24; - int a25; - int a26; - int a27; - int a28; - int a29; - int a30; - int a31; - int a32; - int a33; - int a34; - int a35; - int a36; - int a37; - int a38; - int a39; - int a40; - int a41; - int a42; - int a43; - int a44; - int a45; - int a46; - int a47; - int a48; - int a49; - int a50; - int a51; - int a52; - int a53; - int a54; - int a55; - int a56; - int a57; - int a58; - int a59; - int a60; - int a61; - int a62; - int a63; - int a64; - int a65; - int a66; - int a67; - int a68; - int a69; - int a70; - int a71; - int a72; - int a73; - int a74; - int a75; - int a76; - int a77; - int a78; - int a79; - int a80; - int a81; - int a82; - int a83; - int a84; - int a85; - int a86; - int a87; - int a88; - int a89; - int a90; - int a91; - int a92; - int a93; - int a94; - int a95; - int a96; - int a97; - int a98; - int a99; - int a100; - int a101; - int a102; - int a103; - int a104; - int a105; - int a106; - int a107; - int a108; - int a109; - int a110; - int a111; - int a112; - int a113; - int a114; - int a115; - int a116; - int a117; - int a118; - int a119; - int a120; - int a121; - int a122; - int a123; - int a124; - int a125; - int a126; - int a127; - - a0 = 1; - a1 = 2; - a2 = 3; - a3 = 4; - a4 = 5; - a5 = 6; - a6 = 7; - a7 = 8; - a8 = 9; - a9 = 10; - a10 = 11; - a11 = 12; - a12 = 13; - a13 = 14; - a14 = 15; - a15 = 16; - a16 = 17; - a17 = 18; - a18 = 19; - a19 = 20; - a20 = 21; - a21 = 22; - a22 = 23; - a23 = 24; - a24 = 25; - a25 = 26; - a26 = 27; - a27 = 28; - a28 = 29; - a29 = 30; - a30 = 31; - a31 = 32; - a32 = 33; - a33 = 34; - a34 = 35; - a35 = 36; - a36 = 37; - a37 = 38; - a38 = 39; - a39 = 40; - a40 = 41; - a41 = 42; - a42 = 43; - a43 = 44; - a44 = 45; - a45 = 46; - a46 = 47; - a47 = 48; - a48 = 49; - a49 = 50; - a50 = 51; - a51 = 52; - a52 = 53; - a53 = 54; - a54 = 55; - a55 = 56; - a56 = 57; - a57 = 58; - a58 = 59; - a59 = 60; - a60 = 61; - a61 = 62; - a62 = 63; - a63 = 64; - a64 = 65; - a65 = 66; - a66 = 67; - a67 = 68; - a68 = 69; - a69 = 70; - a70 = 71; - a71 = 72; - a72 = 73; - a73 = 74; - a74 = 75; - a75 = 76; - a76 = 77; - a77 = 78; - a78 = 79; - a79 = 80; - a80 = 81; - a81 = 82; - a82 = 83; - a83 = 84; - a84 = 85; - a85 = 86; - a86 = 87; - a87 = 88; - a88 = 89; - a89 = 90; - a90 = 91; - a91 = 92; - a92 = 93; - a93 = 94; - a94 = 95; - a95 = 96; - a96 = 97; - a97 = 98; - a98 = 99; - a99 = 100; - a100 = 101; - a101 = 102; - a102 = 103; - a103 = 104; - a104 = 105; - a105 = 106; - a106 = 107; - a107 = 108; - a108 = 109; - a109 = 110; - a110 = 111; - a111 = 112; - a112 = 113; - a113 = 114; - a114 = 115; - a115 = 116; - a116 = 117; - a117 = 118; - a118 = 119; - a119 = 120; - a120 = 121; - a121 = 122; - a122 = 123; - a123 = 124; - a124 = 125; - a125 = 126; - a126 = 127; - a127 = 128; - - final result = returnStruct1024BytesHomogeneousUint64Leaf( - a0, - a1, - a2, - a3, - a4, - a5, - a6, - a7, - a8, - a9, - a10, - a11, - a12, - a13, - a14, - a15, - a16, - a17, - a18, - a19, - a20, - a21, - a22, - a23, - a24, - a25, - a26, - a27, - a28, - a29, - a30, - a31, - a32, - a33, - a34, - a35, - a36, - a37, - a38, - a39, - a40, - a41, - a42, - a43, - a44, - a45, - a46, - a47, - a48, - a49, - a50, - a51, - a52, - a53, - a54, - a55, - a56, - a57, - a58, - a59, - a60, - a61, - a62, - a63, - a64, - a65, - a66, - a67, - a68, - a69, - a70, - a71, - a72, - a73, - a74, - a75, - a76, - a77, - a78, - a79, - a80, - a81, - a82, - a83, - a84, - a85, - a86, - a87, - a88, - a89, - a90, - a91, - a92, - a93, - a94, - a95, - a96, - a97, - a98, - a99, - a100, - a101, - a102, - a103, - a104, - a105, - a106, - a107, - a108, - a109, - a110, - a111, - a112, - a113, - a114, - a115, - a116, - a117, - a118, - a119, - a120, - a121, - a122, - a123, - a124, - a125, - a126, - a127); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); - Expect.equals(a3, result.a3); - Expect.equals(a4, result.a4); - Expect.equals(a5, result.a5); - Expect.equals(a6, result.a6); - Expect.equals(a7, result.a7); - Expect.equals(a8, result.a8); - Expect.equals(a9, result.a9); - Expect.equals(a10, result.a10); - Expect.equals(a11, result.a11); - Expect.equals(a12, result.a12); - Expect.equals(a13, result.a13); - Expect.equals(a14, result.a14); - Expect.equals(a15, result.a15); - Expect.equals(a16, result.a16); - Expect.equals(a17, result.a17); - Expect.equals(a18, result.a18); - Expect.equals(a19, result.a19); - Expect.equals(a20, result.a20); - Expect.equals(a21, result.a21); - Expect.equals(a22, result.a22); - Expect.equals(a23, result.a23); - Expect.equals(a24, result.a24); - Expect.equals(a25, result.a25); - Expect.equals(a26, result.a26); - Expect.equals(a27, result.a27); - Expect.equals(a28, result.a28); - Expect.equals(a29, result.a29); - Expect.equals(a30, result.a30); - Expect.equals(a31, result.a31); - Expect.equals(a32, result.a32); - Expect.equals(a33, result.a33); - Expect.equals(a34, result.a34); - Expect.equals(a35, result.a35); - Expect.equals(a36, result.a36); - Expect.equals(a37, result.a37); - Expect.equals(a38, result.a38); - Expect.equals(a39, result.a39); - Expect.equals(a40, result.a40); - Expect.equals(a41, result.a41); - Expect.equals(a42, result.a42); - Expect.equals(a43, result.a43); - Expect.equals(a44, result.a44); - Expect.equals(a45, result.a45); - Expect.equals(a46, result.a46); - Expect.equals(a47, result.a47); - Expect.equals(a48, result.a48); - Expect.equals(a49, result.a49); - Expect.equals(a50, result.a50); - Expect.equals(a51, result.a51); - Expect.equals(a52, result.a52); - Expect.equals(a53, result.a53); - Expect.equals(a54, result.a54); - Expect.equals(a55, result.a55); - Expect.equals(a56, result.a56); - Expect.equals(a57, result.a57); - Expect.equals(a58, result.a58); - Expect.equals(a59, result.a59); - Expect.equals(a60, result.a60); - Expect.equals(a61, result.a61); - Expect.equals(a62, result.a62); - Expect.equals(a63, result.a63); - Expect.equals(a64, result.a64); - Expect.equals(a65, result.a65); - Expect.equals(a66, result.a66); - Expect.equals(a67, result.a67); - Expect.equals(a68, result.a68); - Expect.equals(a69, result.a69); - Expect.equals(a70, result.a70); - Expect.equals(a71, result.a71); - Expect.equals(a72, result.a72); - Expect.equals(a73, result.a73); - Expect.equals(a74, result.a74); - Expect.equals(a75, result.a75); - Expect.equals(a76, result.a76); - Expect.equals(a77, result.a77); - Expect.equals(a78, result.a78); - Expect.equals(a79, result.a79); - Expect.equals(a80, result.a80); - Expect.equals(a81, result.a81); - Expect.equals(a82, result.a82); - Expect.equals(a83, result.a83); - Expect.equals(a84, result.a84); - Expect.equals(a85, result.a85); - Expect.equals(a86, result.a86); - Expect.equals(a87, result.a87); - Expect.equals(a88, result.a88); - Expect.equals(a89, result.a89); - Expect.equals(a90, result.a90); - Expect.equals(a91, result.a91); - Expect.equals(a92, result.a92); - Expect.equals(a93, result.a93); - Expect.equals(a94, result.a94); - Expect.equals(a95, result.a95); - Expect.equals(a96, result.a96); - Expect.equals(a97, result.a97); - Expect.equals(a98, result.a98); - Expect.equals(a99, result.a99); - Expect.equals(a100, result.a100); - Expect.equals(a101, result.a101); - Expect.equals(a102, result.a102); - Expect.equals(a103, result.a103); - Expect.equals(a104, result.a104); - Expect.equals(a105, result.a105); - Expect.equals(a106, result.a106); - Expect.equals(a107, result.a107); - Expect.equals(a108, result.a108); - Expect.equals(a109, result.a109); - Expect.equals(a110, result.a110); - Expect.equals(a111, result.a111); - Expect.equals(a112, result.a112); - Expect.equals(a113, result.a113); - Expect.equals(a114, result.a114); - Expect.equals(a115, result.a115); - Expect.equals(a116, result.a116); - Expect.equals(a117, result.a117); - Expect.equals(a118, result.a118); - Expect.equals(a119, result.a119); - Expect.equals(a120, result.a120); - Expect.equals(a121, result.a121); - Expect.equals(a122, result.a122); - Expect.equals(a123, result.a123); - Expect.equals(a124, result.a124); - Expect.equals(a125, result.a125); - Expect.equals(a126, result.a126); - Expect.equals(a127, result.a127); -} - -final returnStruct3BytesPackedIntLeaf = ffiTestFunctions.lookupFunction< - Struct3BytesPackedInt Function(Int8, Int16), - Struct3BytesPackedInt Function( - int, int)>("ReturnStruct3BytesPackedInt", isLeaf: true); - -/// Small struct with mis-aligned member. -void testReturnStruct3BytesPackedIntLeaf() { - int a0; - int a1; - - a0 = -1; - a1 = 2; - - final result = returnStruct3BytesPackedIntLeaf(a0, a1); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); -} - -final returnStruct8BytesPackedIntLeaf = ffiTestFunctions.lookupFunction< - Struct8BytesPackedInt Function(Uint8, Uint32, Uint8, Uint8, Uint8), - Struct8BytesPackedInt Function( - int, int, int, int, int)>("ReturnStruct8BytesPackedInt", isLeaf: true); - -/// Struct with mis-aligned member. -void testReturnStruct8BytesPackedIntLeaf() { - int a0; - int a1; - int a2; - int a3; - int a4; - - a0 = 1; - a1 = 2; - a2 = 3; - a3 = 4; - a4 = 5; - - final result = returnStruct8BytesPackedIntLeaf(a0, a1, a2, a3, a4); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); - Expect.equals(a3, result.a3); - Expect.equals(a4, result.a4); -} - -final returnStruct9BytesPackedMixedLeaf = ffiTestFunctions.lookupFunction< - Struct9BytesPackedMixed Function(Uint8, Double), - Struct9BytesPackedMixed Function( - int, double)>("ReturnStruct9BytesPackedMixed", isLeaf: true); - -/// Struct with mis-aligned member. -/// Tests backfilling of CPU and FPU registers. -void testReturnStruct9BytesPackedMixedLeaf() { - int a0; - double a1; - - a0 = 1; - a1 = 2.0; - - final result = returnStruct9BytesPackedMixedLeaf(a0, a1); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.approxEquals(a1, result.a1); -} - -final returnUnion4BytesMixedLeaf = ffiTestFunctions.lookupFunction< - Union4BytesMixed Function(Uint32), - Union4BytesMixed Function(int)>("ReturnUnion4BytesMixed", isLeaf: true); - -/// Returning a mixed integer/float union. -void testReturnUnion4BytesMixedLeaf() { - int a0; - - a0 = 1; - - final result = returnUnion4BytesMixedLeaf(a0); - - print("result = $result"); - - Expect.equals(a0, result.a0); -} - -final returnUnion8BytesNestedFloatLeaf = ffiTestFunctions.lookupFunction< - Union8BytesNestedFloat Function(Double), - Union8BytesNestedFloat Function( - double)>("ReturnUnion8BytesNestedFloat", isLeaf: true); - -/// Returning a floating point only union. -void testReturnUnion8BytesNestedFloatLeaf() { - double a0; - - a0 = -1.0; - - final result = returnUnion8BytesNestedFloatLeaf(a0); - - print("result = $result"); - - Expect.approxEquals(a0, result.a0); -} - -final returnUnion9BytesNestedIntLeaf = ffiTestFunctions.lookupFunction< - Union9BytesNestedInt Function(Struct8BytesInt), - Union9BytesNestedInt Function( - Struct8BytesInt)>("ReturnUnion9BytesNestedInt", isLeaf: true); - -/// Returning a mixed-size union. -void testReturnUnion9BytesNestedIntLeaf() { - final a0Pointer = calloc(); - final Struct8BytesInt a0 = a0Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - - final result = returnUnion9BytesNestedIntLeaf(a0); - - print("result = $result"); - - Expect.equals(a0.a0, result.a0.a0); - Expect.equals(a0.a1, result.a0.a1); - Expect.equals(a0.a2, result.a0.a2); - - calloc.free(a0Pointer); -} - -final returnUnion16BytesNestedFloatLeaf = ffiTestFunctions.lookupFunction< - Union16BytesNestedFloat Function(Struct8BytesHomogeneousFloat), - Union16BytesNestedFloat Function(Struct8BytesHomogeneousFloat)>( - "ReturnUnion16BytesNestedFloat", - isLeaf: true); - -/// Returning union with homogenous floats. -void testReturnUnion16BytesNestedFloatLeaf() { - final a0Pointer = calloc(); - final Struct8BytesHomogeneousFloat a0 = a0Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2.0; - - final result = returnUnion16BytesNestedFloatLeaf(a0); - - print("result = $result"); - - Expect.approxEquals(a0.a0, result.a0.a0); - Expect.approxEquals(a0.a1, result.a0.a1); - - calloc.free(a0Pointer); -} diff --git a/tests/ffi_2/function_structs_by_value_generated_ret_test.dart b/tests/ffi_2/function_structs_by_value_generated_ret_test.dart deleted file mode 100644 index a5bf84e5b93..00000000000 --- a/tests/ffi_2/function_structs_by_value_generated_ret_test.dart +++ /dev/null @@ -1,1631 +0,0 @@ -// 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. -// -// This file has been automatically generated. Please do not edit it manually. -// Generated by tests/ffi/generator/structs_by_value_tests_generator.dart. -// -// SharedObjects=ffi_test_functions -// VMOptions= -// VMOptions=--deterministic --optimization-counter-threshold=90 -// VMOptions=--use-slow-path -// VMOptions=--use-slow-path --stacktrace-every=100 - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; -import "package:ffi/ffi.dart"; - -import 'dylib_utils.dart'; - -// Reuse the compound classes. -import 'function_structs_by_value_generated_compounds.dart'; - -final ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); -void main() { - for (int i = 0; i < 100; ++i) { - testReturnStruct1ByteInt(); - testReturnStruct3BytesHomogeneousUint8(); - testReturnStruct3BytesInt2ByteAligned(); - testReturnStruct4BytesHomogeneousInt16(); - testReturnStruct7BytesHomogeneousUint8(); - testReturnStruct7BytesInt4ByteAligned(); - testReturnStruct8BytesInt(); - testReturnStruct8BytesHomogeneousFloat(); - testReturnStruct8BytesMixed(); - testReturnStruct9BytesHomogeneousUint8(); - testReturnStruct9BytesInt4Or8ByteAligned(); - testReturnStruct12BytesHomogeneousFloat(); - testReturnStruct16BytesHomogeneousFloat(); - testReturnStruct16BytesMixed(); - testReturnStruct16BytesMixed2(); - testReturnStruct17BytesInt(); - testReturnStruct19BytesHomogeneousUint8(); - testReturnStruct20BytesHomogeneousInt32(); - testReturnStruct20BytesHomogeneousFloat(); - testReturnStruct32BytesHomogeneousDouble(); - testReturnStruct40BytesHomogeneousDouble(); - testReturnStruct1024BytesHomogeneousUint64(); - testReturnStruct3BytesPackedInt(); - testReturnStruct8BytesPackedInt(); - testReturnStruct9BytesPackedMixed(); - testReturnUnion4BytesMixed(); - testReturnUnion8BytesNestedFloat(); - testReturnUnion9BytesNestedInt(); - testReturnUnion16BytesNestedFloat(); - } -} - -final returnStruct1ByteInt = ffiTestFunctions.lookupFunction< - Struct1ByteInt Function(Int8), - Struct1ByteInt Function(int)>("ReturnStruct1ByteInt"); - -/// Smallest struct with data. -void testReturnStruct1ByteInt() { - int a0; - - a0 = -1; - - final result = returnStruct1ByteInt(a0); - - print("result = $result"); - - Expect.equals(a0, result.a0); -} - -final returnStruct3BytesHomogeneousUint8 = ffiTestFunctions.lookupFunction< - Struct3BytesHomogeneousUint8 Function(Uint8, Uint8, Uint8), - Struct3BytesHomogeneousUint8 Function( - int, int, int)>("ReturnStruct3BytesHomogeneousUint8"); - -/// Smaller than word size return value on all architectures. -void testReturnStruct3BytesHomogeneousUint8() { - int a0; - int a1; - int a2; - - a0 = 1; - a1 = 2; - a2 = 3; - - final result = returnStruct3BytesHomogeneousUint8(a0, a1, a2); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); -} - -final returnStruct3BytesInt2ByteAligned = ffiTestFunctions.lookupFunction< - Struct3BytesInt2ByteAligned Function(Int16, Int8), - Struct3BytesInt2ByteAligned Function( - int, int)>("ReturnStruct3BytesInt2ByteAligned"); - -/// Smaller than word size return value on all architectures. -/// With alignment rules taken into account size is 4 bytes. -void testReturnStruct3BytesInt2ByteAligned() { - int a0; - int a1; - - a0 = -1; - a1 = 2; - - final result = returnStruct3BytesInt2ByteAligned(a0, a1); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); -} - -final returnStruct4BytesHomogeneousInt16 = ffiTestFunctions.lookupFunction< - Struct4BytesHomogeneousInt16 Function(Int16, Int16), - Struct4BytesHomogeneousInt16 Function( - int, int)>("ReturnStruct4BytesHomogeneousInt16"); - -/// Word size return value on 32 bit architectures.. -void testReturnStruct4BytesHomogeneousInt16() { - int a0; - int a1; - - a0 = -1; - a1 = 2; - - final result = returnStruct4BytesHomogeneousInt16(a0, a1); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); -} - -final returnStruct7BytesHomogeneousUint8 = ffiTestFunctions.lookupFunction< - Struct7BytesHomogeneousUint8 Function( - Uint8, Uint8, Uint8, Uint8, Uint8, Uint8, Uint8), - Struct7BytesHomogeneousUint8 Function(int, int, int, int, int, int, - int)>("ReturnStruct7BytesHomogeneousUint8"); - -/// Non-wordsize return value. -void testReturnStruct7BytesHomogeneousUint8() { - int a0; - int a1; - int a2; - int a3; - int a4; - int a5; - int a6; - - a0 = 1; - a1 = 2; - a2 = 3; - a3 = 4; - a4 = 5; - a5 = 6; - a6 = 7; - - final result = returnStruct7BytesHomogeneousUint8(a0, a1, a2, a3, a4, a5, a6); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); - Expect.equals(a3, result.a3); - Expect.equals(a4, result.a4); - Expect.equals(a5, result.a5); - Expect.equals(a6, result.a6); -} - -final returnStruct7BytesInt4ByteAligned = ffiTestFunctions.lookupFunction< - Struct7BytesInt4ByteAligned Function(Int32, Int16, Int8), - Struct7BytesInt4ByteAligned Function( - int, int, int)>("ReturnStruct7BytesInt4ByteAligned"); - -/// Non-wordsize return value. -/// With alignment rules taken into account size is 8 bytes. -void testReturnStruct7BytesInt4ByteAligned() { - int a0; - int a1; - int a2; - - a0 = -1; - a1 = 2; - a2 = -3; - - final result = returnStruct7BytesInt4ByteAligned(a0, a1, a2); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); -} - -final returnStruct8BytesInt = ffiTestFunctions.lookupFunction< - Struct8BytesInt Function(Int16, Int16, Int32), - Struct8BytesInt Function(int, int, int)>("ReturnStruct8BytesInt"); - -/// Return value in integer registers on many architectures. -void testReturnStruct8BytesInt() { - int a0; - int a1; - int a2; - - a0 = -1; - a1 = 2; - a2 = -3; - - final result = returnStruct8BytesInt(a0, a1, a2); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); -} - -final returnStruct8BytesHomogeneousFloat = ffiTestFunctions.lookupFunction< - Struct8BytesHomogeneousFloat Function(Float, Float), - Struct8BytesHomogeneousFloat Function( - double, double)>("ReturnStruct8BytesHomogeneousFloat"); - -/// Return value in FP registers on many architectures. -void testReturnStruct8BytesHomogeneousFloat() { - double a0; - double a1; - - a0 = -1.0; - a1 = 2.0; - - final result = returnStruct8BytesHomogeneousFloat(a0, a1); - - print("result = $result"); - - Expect.approxEquals(a0, result.a0); - Expect.approxEquals(a1, result.a1); -} - -final returnStruct8BytesMixed = ffiTestFunctions.lookupFunction< - Struct8BytesMixed Function(Float, Int16, Int16), - Struct8BytesMixed Function(double, int, int)>("ReturnStruct8BytesMixed"); - -/// Return value split over FP and integer register in x64. -void testReturnStruct8BytesMixed() { - double a0; - int a1; - int a2; - - a0 = -1.0; - a1 = 2; - a2 = -3; - - final result = returnStruct8BytesMixed(a0, a1, a2); - - print("result = $result"); - - Expect.approxEquals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); -} - -final returnStruct9BytesHomogeneousUint8 = ffiTestFunctions.lookupFunction< - Struct9BytesHomogeneousUint8 Function( - Uint8, Uint8, Uint8, Uint8, Uint8, Uint8, Uint8, Uint8, Uint8), - Struct9BytesHomogeneousUint8 Function(int, int, int, int, int, int, int, - int, int)>("ReturnStruct9BytesHomogeneousUint8"); - -/// The minimum alignment of this struct is only 1 byte based on its fields. -/// Test that the memory backing these structs is the right size and that -/// dart:ffi trampolines do not write outside this size. -void testReturnStruct9BytesHomogeneousUint8() { - int a0; - int a1; - int a2; - int a3; - int a4; - int a5; - int a6; - int a7; - int a8; - - a0 = 1; - a1 = 2; - a2 = 3; - a3 = 4; - a4 = 5; - a5 = 6; - a6 = 7; - a7 = 8; - a8 = 9; - - final result = - returnStruct9BytesHomogeneousUint8(a0, a1, a2, a3, a4, a5, a6, a7, a8); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); - Expect.equals(a3, result.a3); - Expect.equals(a4, result.a4); - Expect.equals(a5, result.a5); - Expect.equals(a6, result.a6); - Expect.equals(a7, result.a7); - Expect.equals(a8, result.a8); -} - -final returnStruct9BytesInt4Or8ByteAligned = ffiTestFunctions.lookupFunction< - Struct9BytesInt4Or8ByteAligned Function(Int64, Int8), - Struct9BytesInt4Or8ByteAligned Function( - int, int)>("ReturnStruct9BytesInt4Or8ByteAligned"); - -/// Return value in two integer registers on x64. -/// With alignment rules taken into account size is 12 or 16 bytes. -void testReturnStruct9BytesInt4Or8ByteAligned() { - int a0; - int a1; - - a0 = -1; - a1 = 2; - - final result = returnStruct9BytesInt4Or8ByteAligned(a0, a1); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); -} - -final returnStruct12BytesHomogeneousFloat = ffiTestFunctions.lookupFunction< - Struct12BytesHomogeneousFloat Function(Float, Float, Float), - Struct12BytesHomogeneousFloat Function( - double, double, double)>("ReturnStruct12BytesHomogeneousFloat"); - -/// Return value in FPU registers, but does not use all registers on arm hardfp -/// and arm64. -void testReturnStruct12BytesHomogeneousFloat() { - double a0; - double a1; - double a2; - - a0 = -1.0; - a1 = 2.0; - a2 = -3.0; - - final result = returnStruct12BytesHomogeneousFloat(a0, a1, a2); - - print("result = $result"); - - Expect.approxEquals(a0, result.a0); - Expect.approxEquals(a1, result.a1); - Expect.approxEquals(a2, result.a2); -} - -final returnStruct16BytesHomogeneousFloat = ffiTestFunctions.lookupFunction< - Struct16BytesHomogeneousFloat Function(Float, Float, Float, Float), - Struct16BytesHomogeneousFloat Function( - double, double, double, double)>("ReturnStruct16BytesHomogeneousFloat"); - -/// Return value in FPU registers on arm hardfp and arm64. -void testReturnStruct16BytesHomogeneousFloat() { - double a0; - double a1; - double a2; - double a3; - - a0 = -1.0; - a1 = 2.0; - a2 = -3.0; - a3 = 4.0; - - final result = returnStruct16BytesHomogeneousFloat(a0, a1, a2, a3); - - print("result = $result"); - - Expect.approxEquals(a0, result.a0); - Expect.approxEquals(a1, result.a1); - Expect.approxEquals(a2, result.a2); - Expect.approxEquals(a3, result.a3); -} - -final returnStruct16BytesMixed = ffiTestFunctions.lookupFunction< - Struct16BytesMixed Function(Double, Int64), - Struct16BytesMixed Function(double, int)>("ReturnStruct16BytesMixed"); - -/// Return value split over FP and integer register in x64. -void testReturnStruct16BytesMixed() { - double a0; - int a1; - - a0 = -1.0; - a1 = 2; - - final result = returnStruct16BytesMixed(a0, a1); - - print("result = $result"); - - Expect.approxEquals(a0, result.a0); - Expect.equals(a1, result.a1); -} - -final returnStruct16BytesMixed2 = ffiTestFunctions.lookupFunction< - Struct16BytesMixed2 Function(Float, Float, Float, Int32), - Struct16BytesMixed2 Function( - double, double, double, int)>("ReturnStruct16BytesMixed2"); - -/// Return value split over FP and integer register in x64. -/// The integer register contains half float half int. -void testReturnStruct16BytesMixed2() { - double a0; - double a1; - double a2; - int a3; - - a0 = -1.0; - a1 = 2.0; - a2 = -3.0; - a3 = 4; - - final result = returnStruct16BytesMixed2(a0, a1, a2, a3); - - print("result = $result"); - - Expect.approxEquals(a0, result.a0); - Expect.approxEquals(a1, result.a1); - Expect.approxEquals(a2, result.a2); - Expect.equals(a3, result.a3); -} - -final returnStruct17BytesInt = ffiTestFunctions.lookupFunction< - Struct17BytesInt Function(Int64, Int64, Int8), - Struct17BytesInt Function(int, int, int)>("ReturnStruct17BytesInt"); - -/// Return value returned in preallocated space passed by pointer on most ABIs. -/// Is non word size on purpose, to test that structs are rounded up to word size -/// on all ABIs. -void testReturnStruct17BytesInt() { - int a0; - int a1; - int a2; - - a0 = -1; - a1 = 2; - a2 = -3; - - final result = returnStruct17BytesInt(a0, a1, a2); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); -} - -final returnStruct19BytesHomogeneousUint8 = ffiTestFunctions.lookupFunction< - Struct19BytesHomogeneousUint8 Function( - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8, - Uint8), - Struct19BytesHomogeneousUint8 Function( - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int)>("ReturnStruct19BytesHomogeneousUint8"); - -/// The minimum alignment of this struct is only 1 byte based on its fields. -/// Test that the memory backing these structs is the right size and that -/// dart:ffi trampolines do not write outside this size. -void testReturnStruct19BytesHomogeneousUint8() { - int a0; - int a1; - int a2; - int a3; - int a4; - int a5; - int a6; - int a7; - int a8; - int a9; - int a10; - int a11; - int a12; - int a13; - int a14; - int a15; - int a16; - int a17; - int a18; - - a0 = 1; - a1 = 2; - a2 = 3; - a3 = 4; - a4 = 5; - a5 = 6; - a6 = 7; - a7 = 8; - a8 = 9; - a9 = 10; - a10 = 11; - a11 = 12; - a12 = 13; - a13 = 14; - a14 = 15; - a15 = 16; - a16 = 17; - a17 = 18; - a18 = 19; - - final result = returnStruct19BytesHomogeneousUint8(a0, a1, a2, a3, a4, a5, a6, - a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); - Expect.equals(a3, result.a3); - Expect.equals(a4, result.a4); - Expect.equals(a5, result.a5); - Expect.equals(a6, result.a6); - Expect.equals(a7, result.a7); - Expect.equals(a8, result.a8); - Expect.equals(a9, result.a9); - Expect.equals(a10, result.a10); - Expect.equals(a11, result.a11); - Expect.equals(a12, result.a12); - Expect.equals(a13, result.a13); - Expect.equals(a14, result.a14); - Expect.equals(a15, result.a15); - Expect.equals(a16, result.a16); - Expect.equals(a17, result.a17); - Expect.equals(a18, result.a18); -} - -final returnStruct20BytesHomogeneousInt32 = ffiTestFunctions.lookupFunction< - Struct20BytesHomogeneousInt32 Function(Int32, Int32, Int32, Int32, Int32), - Struct20BytesHomogeneousInt32 Function( - int, int, int, int, int)>("ReturnStruct20BytesHomogeneousInt32"); - -/// Return value too big to go in cpu registers on arm64. -void testReturnStruct20BytesHomogeneousInt32() { - int a0; - int a1; - int a2; - int a3; - int a4; - - a0 = -1; - a1 = 2; - a2 = -3; - a3 = 4; - a4 = -5; - - final result = returnStruct20BytesHomogeneousInt32(a0, a1, a2, a3, a4); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); - Expect.equals(a3, result.a3); - Expect.equals(a4, result.a4); -} - -final returnStruct20BytesHomogeneousFloat = ffiTestFunctions.lookupFunction< - Struct20BytesHomogeneousFloat Function(Float, Float, Float, Float, Float), - Struct20BytesHomogeneousFloat Function(double, double, double, double, - double)>("ReturnStruct20BytesHomogeneousFloat"); - -/// Return value too big to go in FPU registers on x64, arm hardfp and arm64. -void testReturnStruct20BytesHomogeneousFloat() { - double a0; - double a1; - double a2; - double a3; - double a4; - - a0 = -1.0; - a1 = 2.0; - a2 = -3.0; - a3 = 4.0; - a4 = -5.0; - - final result = returnStruct20BytesHomogeneousFloat(a0, a1, a2, a3, a4); - - print("result = $result"); - - Expect.approxEquals(a0, result.a0); - Expect.approxEquals(a1, result.a1); - Expect.approxEquals(a2, result.a2); - Expect.approxEquals(a3, result.a3); - Expect.approxEquals(a4, result.a4); -} - -final returnStruct32BytesHomogeneousDouble = ffiTestFunctions.lookupFunction< - Struct32BytesHomogeneousDouble Function(Double, Double, Double, Double), - Struct32BytesHomogeneousDouble Function(double, double, double, - double)>("ReturnStruct32BytesHomogeneousDouble"); - -/// Return value in FPU registers on arm64. -void testReturnStruct32BytesHomogeneousDouble() { - double a0; - double a1; - double a2; - double a3; - - a0 = -1.0; - a1 = 2.0; - a2 = -3.0; - a3 = 4.0; - - final result = returnStruct32BytesHomogeneousDouble(a0, a1, a2, a3); - - print("result = $result"); - - Expect.approxEquals(a0, result.a0); - Expect.approxEquals(a1, result.a1); - Expect.approxEquals(a2, result.a2); - Expect.approxEquals(a3, result.a3); -} - -final returnStruct40BytesHomogeneousDouble = ffiTestFunctions.lookupFunction< - Struct40BytesHomogeneousDouble Function( - Double, Double, Double, Double, Double), - Struct40BytesHomogeneousDouble Function(double, double, double, double, - double)>("ReturnStruct40BytesHomogeneousDouble"); - -/// Return value too big to go in FPU registers on arm64. -void testReturnStruct40BytesHomogeneousDouble() { - double a0; - double a1; - double a2; - double a3; - double a4; - - a0 = -1.0; - a1 = 2.0; - a2 = -3.0; - a3 = 4.0; - a4 = -5.0; - - final result = returnStruct40BytesHomogeneousDouble(a0, a1, a2, a3, a4); - - print("result = $result"); - - Expect.approxEquals(a0, result.a0); - Expect.approxEquals(a1, result.a1); - Expect.approxEquals(a2, result.a2); - Expect.approxEquals(a3, result.a3); - Expect.approxEquals(a4, result.a4); -} - -final returnStruct1024BytesHomogeneousUint64 = ffiTestFunctions.lookupFunction< - Struct1024BytesHomogeneousUint64 Function( - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64, - Uint64), - Struct1024BytesHomogeneousUint64 Function( - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int)>("ReturnStruct1024BytesHomogeneousUint64"); - -/// Test 1kb struct. -void testReturnStruct1024BytesHomogeneousUint64() { - int a0; - int a1; - int a2; - int a3; - int a4; - int a5; - int a6; - int a7; - int a8; - int a9; - int a10; - int a11; - int a12; - int a13; - int a14; - int a15; - int a16; - int a17; - int a18; - int a19; - int a20; - int a21; - int a22; - int a23; - int a24; - int a25; - int a26; - int a27; - int a28; - int a29; - int a30; - int a31; - int a32; - int a33; - int a34; - int a35; - int a36; - int a37; - int a38; - int a39; - int a40; - int a41; - int a42; - int a43; - int a44; - int a45; - int a46; - int a47; - int a48; - int a49; - int a50; - int a51; - int a52; - int a53; - int a54; - int a55; - int a56; - int a57; - int a58; - int a59; - int a60; - int a61; - int a62; - int a63; - int a64; - int a65; - int a66; - int a67; - int a68; - int a69; - int a70; - int a71; - int a72; - int a73; - int a74; - int a75; - int a76; - int a77; - int a78; - int a79; - int a80; - int a81; - int a82; - int a83; - int a84; - int a85; - int a86; - int a87; - int a88; - int a89; - int a90; - int a91; - int a92; - int a93; - int a94; - int a95; - int a96; - int a97; - int a98; - int a99; - int a100; - int a101; - int a102; - int a103; - int a104; - int a105; - int a106; - int a107; - int a108; - int a109; - int a110; - int a111; - int a112; - int a113; - int a114; - int a115; - int a116; - int a117; - int a118; - int a119; - int a120; - int a121; - int a122; - int a123; - int a124; - int a125; - int a126; - int a127; - - a0 = 1; - a1 = 2; - a2 = 3; - a3 = 4; - a4 = 5; - a5 = 6; - a6 = 7; - a7 = 8; - a8 = 9; - a9 = 10; - a10 = 11; - a11 = 12; - a12 = 13; - a13 = 14; - a14 = 15; - a15 = 16; - a16 = 17; - a17 = 18; - a18 = 19; - a19 = 20; - a20 = 21; - a21 = 22; - a22 = 23; - a23 = 24; - a24 = 25; - a25 = 26; - a26 = 27; - a27 = 28; - a28 = 29; - a29 = 30; - a30 = 31; - a31 = 32; - a32 = 33; - a33 = 34; - a34 = 35; - a35 = 36; - a36 = 37; - a37 = 38; - a38 = 39; - a39 = 40; - a40 = 41; - a41 = 42; - a42 = 43; - a43 = 44; - a44 = 45; - a45 = 46; - a46 = 47; - a47 = 48; - a48 = 49; - a49 = 50; - a50 = 51; - a51 = 52; - a52 = 53; - a53 = 54; - a54 = 55; - a55 = 56; - a56 = 57; - a57 = 58; - a58 = 59; - a59 = 60; - a60 = 61; - a61 = 62; - a62 = 63; - a63 = 64; - a64 = 65; - a65 = 66; - a66 = 67; - a67 = 68; - a68 = 69; - a69 = 70; - a70 = 71; - a71 = 72; - a72 = 73; - a73 = 74; - a74 = 75; - a75 = 76; - a76 = 77; - a77 = 78; - a78 = 79; - a79 = 80; - a80 = 81; - a81 = 82; - a82 = 83; - a83 = 84; - a84 = 85; - a85 = 86; - a86 = 87; - a87 = 88; - a88 = 89; - a89 = 90; - a90 = 91; - a91 = 92; - a92 = 93; - a93 = 94; - a94 = 95; - a95 = 96; - a96 = 97; - a97 = 98; - a98 = 99; - a99 = 100; - a100 = 101; - a101 = 102; - a102 = 103; - a103 = 104; - a104 = 105; - a105 = 106; - a106 = 107; - a107 = 108; - a108 = 109; - a109 = 110; - a110 = 111; - a111 = 112; - a112 = 113; - a113 = 114; - a114 = 115; - a115 = 116; - a116 = 117; - a117 = 118; - a118 = 119; - a119 = 120; - a120 = 121; - a121 = 122; - a122 = 123; - a123 = 124; - a124 = 125; - a125 = 126; - a126 = 127; - a127 = 128; - - final result = returnStruct1024BytesHomogeneousUint64( - a0, - a1, - a2, - a3, - a4, - a5, - a6, - a7, - a8, - a9, - a10, - a11, - a12, - a13, - a14, - a15, - a16, - a17, - a18, - a19, - a20, - a21, - a22, - a23, - a24, - a25, - a26, - a27, - a28, - a29, - a30, - a31, - a32, - a33, - a34, - a35, - a36, - a37, - a38, - a39, - a40, - a41, - a42, - a43, - a44, - a45, - a46, - a47, - a48, - a49, - a50, - a51, - a52, - a53, - a54, - a55, - a56, - a57, - a58, - a59, - a60, - a61, - a62, - a63, - a64, - a65, - a66, - a67, - a68, - a69, - a70, - a71, - a72, - a73, - a74, - a75, - a76, - a77, - a78, - a79, - a80, - a81, - a82, - a83, - a84, - a85, - a86, - a87, - a88, - a89, - a90, - a91, - a92, - a93, - a94, - a95, - a96, - a97, - a98, - a99, - a100, - a101, - a102, - a103, - a104, - a105, - a106, - a107, - a108, - a109, - a110, - a111, - a112, - a113, - a114, - a115, - a116, - a117, - a118, - a119, - a120, - a121, - a122, - a123, - a124, - a125, - a126, - a127); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); - Expect.equals(a3, result.a3); - Expect.equals(a4, result.a4); - Expect.equals(a5, result.a5); - Expect.equals(a6, result.a6); - Expect.equals(a7, result.a7); - Expect.equals(a8, result.a8); - Expect.equals(a9, result.a9); - Expect.equals(a10, result.a10); - Expect.equals(a11, result.a11); - Expect.equals(a12, result.a12); - Expect.equals(a13, result.a13); - Expect.equals(a14, result.a14); - Expect.equals(a15, result.a15); - Expect.equals(a16, result.a16); - Expect.equals(a17, result.a17); - Expect.equals(a18, result.a18); - Expect.equals(a19, result.a19); - Expect.equals(a20, result.a20); - Expect.equals(a21, result.a21); - Expect.equals(a22, result.a22); - Expect.equals(a23, result.a23); - Expect.equals(a24, result.a24); - Expect.equals(a25, result.a25); - Expect.equals(a26, result.a26); - Expect.equals(a27, result.a27); - Expect.equals(a28, result.a28); - Expect.equals(a29, result.a29); - Expect.equals(a30, result.a30); - Expect.equals(a31, result.a31); - Expect.equals(a32, result.a32); - Expect.equals(a33, result.a33); - Expect.equals(a34, result.a34); - Expect.equals(a35, result.a35); - Expect.equals(a36, result.a36); - Expect.equals(a37, result.a37); - Expect.equals(a38, result.a38); - Expect.equals(a39, result.a39); - Expect.equals(a40, result.a40); - Expect.equals(a41, result.a41); - Expect.equals(a42, result.a42); - Expect.equals(a43, result.a43); - Expect.equals(a44, result.a44); - Expect.equals(a45, result.a45); - Expect.equals(a46, result.a46); - Expect.equals(a47, result.a47); - Expect.equals(a48, result.a48); - Expect.equals(a49, result.a49); - Expect.equals(a50, result.a50); - Expect.equals(a51, result.a51); - Expect.equals(a52, result.a52); - Expect.equals(a53, result.a53); - Expect.equals(a54, result.a54); - Expect.equals(a55, result.a55); - Expect.equals(a56, result.a56); - Expect.equals(a57, result.a57); - Expect.equals(a58, result.a58); - Expect.equals(a59, result.a59); - Expect.equals(a60, result.a60); - Expect.equals(a61, result.a61); - Expect.equals(a62, result.a62); - Expect.equals(a63, result.a63); - Expect.equals(a64, result.a64); - Expect.equals(a65, result.a65); - Expect.equals(a66, result.a66); - Expect.equals(a67, result.a67); - Expect.equals(a68, result.a68); - Expect.equals(a69, result.a69); - Expect.equals(a70, result.a70); - Expect.equals(a71, result.a71); - Expect.equals(a72, result.a72); - Expect.equals(a73, result.a73); - Expect.equals(a74, result.a74); - Expect.equals(a75, result.a75); - Expect.equals(a76, result.a76); - Expect.equals(a77, result.a77); - Expect.equals(a78, result.a78); - Expect.equals(a79, result.a79); - Expect.equals(a80, result.a80); - Expect.equals(a81, result.a81); - Expect.equals(a82, result.a82); - Expect.equals(a83, result.a83); - Expect.equals(a84, result.a84); - Expect.equals(a85, result.a85); - Expect.equals(a86, result.a86); - Expect.equals(a87, result.a87); - Expect.equals(a88, result.a88); - Expect.equals(a89, result.a89); - Expect.equals(a90, result.a90); - Expect.equals(a91, result.a91); - Expect.equals(a92, result.a92); - Expect.equals(a93, result.a93); - Expect.equals(a94, result.a94); - Expect.equals(a95, result.a95); - Expect.equals(a96, result.a96); - Expect.equals(a97, result.a97); - Expect.equals(a98, result.a98); - Expect.equals(a99, result.a99); - Expect.equals(a100, result.a100); - Expect.equals(a101, result.a101); - Expect.equals(a102, result.a102); - Expect.equals(a103, result.a103); - Expect.equals(a104, result.a104); - Expect.equals(a105, result.a105); - Expect.equals(a106, result.a106); - Expect.equals(a107, result.a107); - Expect.equals(a108, result.a108); - Expect.equals(a109, result.a109); - Expect.equals(a110, result.a110); - Expect.equals(a111, result.a111); - Expect.equals(a112, result.a112); - Expect.equals(a113, result.a113); - Expect.equals(a114, result.a114); - Expect.equals(a115, result.a115); - Expect.equals(a116, result.a116); - Expect.equals(a117, result.a117); - Expect.equals(a118, result.a118); - Expect.equals(a119, result.a119); - Expect.equals(a120, result.a120); - Expect.equals(a121, result.a121); - Expect.equals(a122, result.a122); - Expect.equals(a123, result.a123); - Expect.equals(a124, result.a124); - Expect.equals(a125, result.a125); - Expect.equals(a126, result.a126); - Expect.equals(a127, result.a127); -} - -final returnStruct3BytesPackedInt = ffiTestFunctions.lookupFunction< - Struct3BytesPackedInt Function(Int8, Int16), - Struct3BytesPackedInt Function(int, int)>("ReturnStruct3BytesPackedInt"); - -/// Small struct with mis-aligned member. -void testReturnStruct3BytesPackedInt() { - int a0; - int a1; - - a0 = -1; - a1 = 2; - - final result = returnStruct3BytesPackedInt(a0, a1); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); -} - -final returnStruct8BytesPackedInt = ffiTestFunctions.lookupFunction< - Struct8BytesPackedInt Function(Uint8, Uint32, Uint8, Uint8, Uint8), - Struct8BytesPackedInt Function( - int, int, int, int, int)>("ReturnStruct8BytesPackedInt"); - -/// Struct with mis-aligned member. -void testReturnStruct8BytesPackedInt() { - int a0; - int a1; - int a2; - int a3; - int a4; - - a0 = 1; - a1 = 2; - a2 = 3; - a3 = 4; - a4 = 5; - - final result = returnStruct8BytesPackedInt(a0, a1, a2, a3, a4); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.equals(a1, result.a1); - Expect.equals(a2, result.a2); - Expect.equals(a3, result.a3); - Expect.equals(a4, result.a4); -} - -final returnStruct9BytesPackedMixed = ffiTestFunctions.lookupFunction< - Struct9BytesPackedMixed Function(Uint8, Double), - Struct9BytesPackedMixed Function( - int, double)>("ReturnStruct9BytesPackedMixed"); - -/// Struct with mis-aligned member. -/// Tests backfilling of CPU and FPU registers. -void testReturnStruct9BytesPackedMixed() { - int a0; - double a1; - - a0 = 1; - a1 = 2.0; - - final result = returnStruct9BytesPackedMixed(a0, a1); - - print("result = $result"); - - Expect.equals(a0, result.a0); - Expect.approxEquals(a1, result.a1); -} - -final returnUnion4BytesMixed = ffiTestFunctions.lookupFunction< - Union4BytesMixed Function(Uint32), - Union4BytesMixed Function(int)>("ReturnUnion4BytesMixed"); - -/// Returning a mixed integer/float union. -void testReturnUnion4BytesMixed() { - int a0; - - a0 = 1; - - final result = returnUnion4BytesMixed(a0); - - print("result = $result"); - - Expect.equals(a0, result.a0); -} - -final returnUnion8BytesNestedFloat = ffiTestFunctions.lookupFunction< - Union8BytesNestedFloat Function(Double), - Union8BytesNestedFloat Function(double)>("ReturnUnion8BytesNestedFloat"); - -/// Returning a floating point only union. -void testReturnUnion8BytesNestedFloat() { - double a0; - - a0 = -1.0; - - final result = returnUnion8BytesNestedFloat(a0); - - print("result = $result"); - - Expect.approxEquals(a0, result.a0); -} - -final returnUnion9BytesNestedInt = ffiTestFunctions.lookupFunction< - Union9BytesNestedInt Function(Struct8BytesInt), - Union9BytesNestedInt Function( - Struct8BytesInt)>("ReturnUnion9BytesNestedInt"); - -/// Returning a mixed-size union. -void testReturnUnion9BytesNestedInt() { - final a0Pointer = calloc(); - final Struct8BytesInt a0 = a0Pointer.ref; - - a0.a0 = -1; - a0.a1 = 2; - a0.a2 = -3; - - final result = returnUnion9BytesNestedInt(a0); - - print("result = $result"); - - Expect.equals(a0.a0, result.a0.a0); - Expect.equals(a0.a1, result.a0.a1); - Expect.equals(a0.a2, result.a0.a2); - - calloc.free(a0Pointer); -} - -final returnUnion16BytesNestedFloat = ffiTestFunctions.lookupFunction< - Union16BytesNestedFloat Function(Struct8BytesHomogeneousFloat), - Union16BytesNestedFloat Function( - Struct8BytesHomogeneousFloat)>("ReturnUnion16BytesNestedFloat"); - -/// Returning union with homogenous floats. -void testReturnUnion16BytesNestedFloat() { - final a0Pointer = calloc(); - final Struct8BytesHomogeneousFloat a0 = a0Pointer.ref; - - a0.a0 = -1.0; - a0.a1 = 2.0; - - final result = returnUnion16BytesNestedFloat(a0); - - print("result = $result"); - - Expect.approxEquals(a0.a0, result.a0.a0); - Expect.approxEquals(a0.a1, result.a0.a1); - - calloc.free(a0Pointer); -} diff --git a/tests/ffi_2/function_structs_test.dart b/tests/ffi_2/function_structs_test.dart deleted file mode 100644 index 2aa80edfce3..00000000000 --- a/tests/ffi_2/function_structs_test.dart +++ /dev/null @@ -1,131 +0,0 @@ -// 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. -// -// Dart test program for testing dart:ffi function pointers with struct -// arguments. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; -import "package:ffi/ffi.dart"; - -import 'coordinate.dart'; -import 'dylib_utils.dart'; -import 'very_large_struct.dart'; - -typedef NativeCoordinateOp = Pointer Function(Pointer); - -void main() { - for (final isLeaf in [false, true]) { - testFunctionWithStruct(isLeaf: isLeaf); - testFunctionWithStructArray(isLeaf: isLeaf); - testFunctionWithVeryLargeStruct(isLeaf: isLeaf); - } -} - -DynamicLibrary ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); - -/// pass a struct to a c function and get a struct as return value -void testFunctionWithStruct({bool isLeaf: false}) { - Pointer> p1 = - ffiTestFunctions.lookup("TransposeCoordinate"); - NativeCoordinateOp f1 = - (isLeaf ? p1.asFunction(isLeaf: true) : p1.asFunction(isLeaf: false)); - - final c1 = calloc() - ..ref.x = 10.0 - ..ref.y = 20.0; - final c2 = calloc() - ..ref.x = 42.0 - ..ref.y = 84.0 - ..ref.next = c1; - c1.ref.next = c2; - - Coordinate result = f1(c1).ref; - - Expect.approxEquals(20.0, c1.ref.x); - Expect.approxEquals(30.0, c1.ref.y); - - Expect.approxEquals(42.0, result.x); - Expect.approxEquals(84.0, result.y); - - calloc.free(c1); - calloc.free(c2); -} - -/// pass an array of structs to a c function -void testFunctionWithStructArray({bool isLeaf: false}) { - Pointer> p1 = - ffiTestFunctions.lookup("CoordinateElemAt1"); - NativeCoordinateOp f1 = - (isLeaf ? p1.asFunction(isLeaf: true) : p1.asFunction(isLeaf: false)); - - final coordinateArray = calloc(3); - Coordinate c1 = coordinateArray[0]; - Coordinate c2 = coordinateArray[1]; - Coordinate c3 = coordinateArray[2]; - c1.x = 10.0; - c1.y = 10.0; - c1.next = coordinateArray.elementAt(2); - c2.x = 20.0; - c2.y = 20.0; - c2.next = coordinateArray.elementAt(0); - c3.x = 30.0; - c3.y = 30.0; - c3.next = coordinateArray.elementAt(1); - - Coordinate result = f1(coordinateArray.elementAt(0)).ref; - Expect.approxEquals(20.0, result.x); - Expect.approxEquals(20.0, result.y); - - calloc.free(coordinateArray); -} - -typedef VeryLargeStructSum = int Function(Pointer); -typedef NativeVeryLargeStructSum = Int64 Function(Pointer); - -void testFunctionWithVeryLargeStruct({bool isLeaf: false}) { - Pointer> p1 = - ffiTestFunctions.lookup("SumVeryLargeStruct"); - VeryLargeStructSum f = - (isLeaf ? p1.asFunction(isLeaf: true) : p1.asFunction(isLeaf: false)); - - final vlsArray = calloc(2); - VeryLargeStruct vls1 = vlsArray[0]; - VeryLargeStruct vls2 = vlsArray[1]; - List structs = [vls1, vls2]; - for (VeryLargeStruct struct in structs) { - struct.a = 1; - struct.b = 2; - struct.c = 4; - struct.d = 8; - struct.e = 16; - struct.f = 32; - struct.g = 64; - struct.h = 128; - struct.i = 256; - struct.j = 512; - struct.k = 1024; - struct.smallLastField = 1; - } - vls1.parent = vlsArray.elementAt(1); - vls1.numChildren = 2; - vls1.children = vlsArray.elementAt(0); - vls2.parent = vlsArray.elementAt(1); - vls2.parent = nullptr; - vls2.numChildren = 0; - vls2.children = nullptr; - - int result = f(vlsArray.elementAt(0)); - Expect.equals(2051, result); - - result = f(vlsArray.elementAt(1)); - Expect.equals(2048, result); - - calloc.free(vlsArray); -} diff --git a/tests/ffi_2/function_test.dart b/tests/ffi_2/function_test.dart deleted file mode 100644 index c0f9657159c..00000000000 --- a/tests/ffi_2/function_test.dart +++ /dev/null @@ -1,475 +0,0 @@ -// 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. -// -// Dart test program for testing dart:ffi function pointers. -// -// VMOptions= -// VMOptions=--deterministic --optimization-counter-threshold=10 -// VMOptions=--use-slow-path -// VMOptions=--use-slow-path --stacktrace-every=100 -// VMOptions=--write-protect-code --no-dual-map-code -// VMOptions=--write-protect-code --no-dual-map-code --use-slow-path -// VMOptions=--write-protect-code --no-dual-map-code --stacktrace-every=100 -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:ffi/ffi.dart"; -import "package:expect/expect.dart"; - -import 'dylib_utils.dart'; - -void main() { - for (int i = 0; i < 100; ++i) { - testNativeFunctionFromCast(); - testNativeFunctionFromLookup(); - test64bitInterpretations(); - testExtension(); - testTruncation(); - testNativeFunctionDoubles(); - testNativeFunctionFloats(); - testNativeFunctionManyArguments1(); - testNativeFunctionManyArguments2(); - testNativeFunctionManyArguments3(); - testNativeFunctionManyArguments4(); - testNativeFunctionManyArguments5(); - testNativeFunctionPointer(); - testNullPointers(); - testFloatRounding(); - testVoidReturn(); - testNoArgs(); - testNativeFunctionNullableInt(); - } -} - -final ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); - -typedef NativeBinaryOp = Int32 Function(Int32, Int32); -typedef UnaryOp = int Function(int); -typedef BinaryOp = int Function(int, int); -typedef GenericBinaryOp = int Function(int, T); - -void testNativeFunctionFromCast() { - Pointer p1 = calloc(); - Pointer> p2 = p1.cast(); - p2.asFunction(); - p2.asFunction>(); - calloc.free(p1); -} - -typedef NativeQuadOpSigned = Int64 Function(Int8, Int16, Int32, Int64); -typedef QuadOp = int Function(int, int, int, int); -typedef NativeQuadOpUnsigned = Uint64 Function(Uint8, Uint16, Uint32, Uint64); - -BinaryOp sumPlus42 = - ffiTestFunctions.lookupFunction("SumPlus42"); - -QuadOp intComputation = ffiTestFunctions - .lookupFunction("IntComputation"); - -void testNativeFunctionFromLookup() { - Expect.equals(49, sumPlus42(3, 4)); - Expect.equals(49, (sumPlus42 as dynamic)(3, 4)); - Expect.throwsNoSuchMethodError(() => (sumPlus42 as dynamic)()); - Expect.throwsTypeError(() => (sumPlus42 as dynamic)(3, 4.0)); - - Expect.equals(625, intComputation(125, 250, 500, 1000)); - Expect.equals(625, (intComputation as dynamic)(125, 250, 500, 1000)); - - Expect.equals( - 0x7FFFFFFFFFFFFFFF, intComputation(0, 0, 0, 0x7FFFFFFFFFFFFFFF)); - Expect.equals( - -0x8000000000000000, intComputation(0, 0, 0, -0x8000000000000000)); - - Expect.equals(0x7FFFFFFFFFFFFFFF, - (intComputation as dynamic)(0, 0, 0, 0x7FFFFFFFFFFFFFFF)); - Expect.equals(-0x8000000000000000, - (intComputation as dynamic)(0, 0, 0, -0x8000000000000000)); -} - -typedef NativeReturnMaxUint8 = Uint8 Function(); -int Function() returnMaxUint8 = ffiTestFunctions - .lookup("ReturnMaxUint8") - .cast>() - .asFunction(); -int Function() returnMaxUint8v2 = ffiTestFunctions - .lookup("ReturnMaxUint8v2") - .cast>() - .asFunction(); - -typedef NativeReturnMaxUint16 = Uint16 Function(); -int Function() returnMaxUint16 = ffiTestFunctions - .lookup("ReturnMaxUint16") - .cast>() - .asFunction(); -int Function() returnMaxUint16v2 = ffiTestFunctions - .lookup("ReturnMaxUint16v2") - .cast>() - .asFunction(); - -typedef NativeReturnMaxUint32 = Uint32 Function(); -int Function() returnMaxUint32 = ffiTestFunctions - .lookup("ReturnMaxUint32") - .cast>() - .asFunction(); -int Function() returnMaxUint32v2 = ffiTestFunctions - .lookup("ReturnMaxUint32v2") - .cast>() - .asFunction(); - -typedef NativeReturnMinInt8 = Int8 Function(); -int Function() returnMinInt8 = ffiTestFunctions - .lookup("ReturnMinInt8") - .cast>() - .asFunction(); -int Function() returnMinInt8v2 = ffiTestFunctions - .lookup("ReturnMinInt8v2") - .cast>() - .asFunction(); - -typedef NativeReturnMinInt16 = Int16 Function(); -int Function() returnMinInt16 = ffiTestFunctions - .lookup("ReturnMinInt16") - .cast>() - .asFunction(); -int Function() returnMinInt16v2 = ffiTestFunctions - .lookup("ReturnMinInt16v2") - .cast>() - .asFunction(); - -typedef NativeReturnMinInt32 = Int32 Function(); -int Function() returnMinInt32 = ffiTestFunctions - .lookup("ReturnMinInt32") - .cast>() - .asFunction(); -int Function() returnMinInt32v2 = ffiTestFunctions - .lookup("ReturnMinInt32v2") - .cast>() - .asFunction(); - -typedef NativeTakeMaxUint8 = IntPtr Function(Uint8); -int Function(int) takeMaxUint8 = ffiTestFunctions - .lookup("TakeMaxUint8") - .cast>() - .asFunction(); - -typedef NativeTakeMaxUint16 = IntPtr Function(Uint16); -int Function(int) takeMaxUint16 = ffiTestFunctions - .lookup("TakeMaxUint16") - .cast>() - .asFunction(); - -typedef NativeTakeMaxUint32 = IntPtr Function(Uint32); -int Function(int) takeMaxUint32 = ffiTestFunctions - .lookup("TakeMaxUint32") - .cast>() - .asFunction(); - -typedef NativeTakeMinInt8 = IntPtr Function(Int8); -int Function(int) takeMinInt8 = ffiTestFunctions - .lookup("TakeMinInt8") - .cast>() - .asFunction(); - -typedef NativeTakeMinInt16 = IntPtr Function(Int16); -int Function(int) takeMinInt16 = ffiTestFunctions - .lookup("TakeMinInt16") - .cast>() - .asFunction(); - -typedef NativeTakeMinInt32 = IntPtr Function(Int32); -int Function(int) takeMinInt32 = ffiTestFunctions - .lookup("TakeMinInt32") - .cast>() - .asFunction(); - -typedef NativeTakeMaxUint8x10 = IntPtr Function( - Uint8, Uint8, Uint8, Uint8, Uint8, Uint8, Uint8, Uint8, Uint8, Uint8); -int Function(int, int, int, int, int, int, int, int, int, int) takeMaxUint8x10 = - ffiTestFunctions - .lookup("TakeMaxUint8x10") - .cast>() - .asFunction(); - -void testExtension() { - // Sign extension on the way back to Dart. - Expect.equals(0xff, returnMaxUint8()); - Expect.equals(0xffff, returnMaxUint16()); - Expect.equals(0xffffffff, returnMaxUint32()); - Expect.equals(-0x80, returnMinInt8()); - Expect.equals(-0x8000, returnMinInt16()); - Expect.equals(-0x80000000, returnMinInt32()); - // Truncation in C, and sign extension back to Dart. - Expect.equals(0xff, returnMaxUint8v2()); - Expect.equals(0xffff, returnMaxUint16v2()); - Expect.equals(0xffffffff, returnMaxUint32v2()); - Expect.equals(-0x80, returnMinInt8v2()); - Expect.equals(-0x8000, returnMinInt16v2()); - Expect.equals(-0x80000000, returnMinInt32v2()); - - // Upper bits propper, should work without truncation. - Expect.equals(1, takeMaxUint8(0xff)); - Expect.equals(1, takeMaxUint16(0xffff)); - Expect.equals(1, takeMaxUint32(0xffffffff)); - Expect.equals(1, takeMinInt8(-0x80)); - Expect.equals(1, takeMinInt16(-0x8000)); - Expect.equals(1, takeMinInt32(-0x80000000)); - Expect.equals( - 1, - takeMaxUint8x10( - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff)); - // Upper bits garbage, needs to truncate. - Expect.equals(1, takeMaxUint8(0xabcff)); - Expect.equals(1, takeMaxUint16(0xabcffff)); - Expect.equals(1, takeMaxUint32(0xabcffffffff)); - Expect.equals(1, takeMinInt8(0x8abc80)); - Expect.equals(1, takeMinInt16(0x8abc8000)); - Expect.equals(1, takeMinInt32(0x8abc80000000)); - Expect.equals( - 1, - takeMaxUint8x10(0xabcff, 0xabcff, 0xabcff, 0xabcff, 0xabcff, 0xabcff, - 0xabcff, 0xabcff, 0xabcff, 0xabcff)); -} - -QuadOp uintComputation = ffiTestFunctions - .lookupFunction("UintComputation"); - -void test64bitInterpretations() { - // 2 ^ 63 - 1 - Expect.equals( - 0x7FFFFFFFFFFFFFFF, uintComputation(0, 0, 0, 0x7FFFFFFFFFFFFFFF)); - // -2 ^ 63 interpreted as 2 ^ 63 - Expect.equals( - -0x8000000000000000, uintComputation(0, 0, 0, -0x8000000000000000)); - // -1 interpreted as 2 ^ 64 - 1 - Expect.equals(-1, uintComputation(0, 0, 0, -1)); -} - -typedef NativeSenaryOp = Int64 Function( - Int8, Int16, Int32, Uint8, Uint16, Uint32); -typedef SenaryOp = int Function(int, int, int, int, int, int); - -SenaryOp sumSmallNumbers = ffiTestFunctions - .lookupFunction("SumSmallNumbers"); - -void testTruncation() { - sumSmallNumbers(128, 0, 0, 0, 0, 0); - sumSmallNumbers(-129, 0, 0, 0, 0, 0); - sumSmallNumbers(0, 0, 0, 256, 0, 0); - sumSmallNumbers(0, 0, 0, -1, 0, 0); - - sumSmallNumbers(0, 0x8000, 0, 0, 0, 0); - sumSmallNumbers(0, 0xFFFFFFFFFFFF7FFF, 0, 0, 0, 0); - sumSmallNumbers(0, 0, 0, 0, 0x10000, 0); - sumSmallNumbers(0, 0, 0, 0, -1, 0); - - Expect.equals(0xFFFFFFFF80000000, sumSmallNumbers(0, 0, 0x80000000, 0, 0, 0)); - Expect.equals( - 0x000000007FFFFFFF, sumSmallNumbers(0, 0, 0xFFFFFFFF7FFFFFFF, 0, 0, 0)); - Expect.equals(0, sumSmallNumbers(0, 0, 0, 0, 0, 0x100000000)); - Expect.equals(0xFFFFFFFF, sumSmallNumbers(0, 0, 0, 0, 0, -1)); -} - -typedef NativeDoubleUnaryOp = Double Function(Double); -typedef DoubleUnaryOp = double Function(double); - -DoubleUnaryOp times1_337Double = ffiTestFunctions - .lookupFunction("Times1_337Double"); - -void testNativeFunctionDoubles() { - Expect.approxEquals(2.0 * 1.337, times1_337Double(2.0)); -} - -typedef NativeFloatUnaryOp = Float Function(Float); - -DoubleUnaryOp times1_337Float = ffiTestFunctions - .lookupFunction("Times1_337Float"); - -void testNativeFunctionFloats() { - Expect.approxEquals(1337.0, times1_337Float(1000.0)); -} - -typedef NativeDecenaryOp = IntPtr Function(IntPtr, IntPtr, IntPtr, IntPtr, - IntPtr, IntPtr, IntPtr, IntPtr, IntPtr, IntPtr); -typedef NativeDecenaryOp2 = Int16 Function( - Int8, Int16, Int8, Int16, Int8, Int16, Int8, Int16, Int8, Int16); -typedef DecenaryOp = int Function( - int, int, int, int, int, int, int, int, int, int); - -DecenaryOp sumManyInts = ffiTestFunctions - .lookupFunction("SumManyInts"); - -void testNativeFunctionManyArguments1() { - Expect.equals(55, sumManyInts(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)); -} - -DecenaryOp sumManySmallInts = ffiTestFunctions - .lookupFunction("SumManySmallInts"); - -void testNativeFunctionManyArguments5() { - Expect.equals(55, sumManySmallInts(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)); -} - -typedef NativeUndenaryOp = IntPtr Function(IntPtr, IntPtr, IntPtr, IntPtr, - IntPtr, IntPtr, IntPtr, IntPtr, IntPtr, IntPtr, IntPtr); -typedef UndenaryOp = int Function( - int, int, int, int, int, int, int, int, int, int, int); - -UndenaryOp sumManyIntsOdd = ffiTestFunctions - .lookupFunction("SumManyIntsOdd"); - -void testNativeFunctionManyArguments4() { - Expect.equals(66, sumManyIntsOdd(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)); -} - -typedef NativeDoubleDecenaryOp = Double Function(Double, Double, Double, Double, - Double, Double, Double, Double, Double, Double); -typedef DoubleDecenaryOp = double Function(double, double, double, double, - double, double, double, double, double, double); - -DoubleDecenaryOp sumManyDoubles = ffiTestFunctions - .lookupFunction("SumManyDoubles"); - -void testNativeFunctionManyArguments2() { - Expect.approxEquals( - 55.0, sumManyDoubles(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0)); -} - -typedef NativeVigesimalOp = Double Function( - IntPtr, - Float, - IntPtr, - Double, - IntPtr, - Float, - IntPtr, - Double, - IntPtr, - Float, - IntPtr, - Double, - IntPtr, - Float, - IntPtr, - Double, - IntPtr, - Float, - IntPtr, - Double); -typedef VigesimalOp = double Function( - int, - double, - int, - double, - int, - double, - int, - double, - int, - double, - int, - double, - int, - double, - int, - double, - int, - double, - int, - double); - -VigesimalOp sumManyNumbers = ffiTestFunctions - .lookupFunction("SumManyNumbers"); - -void testNativeFunctionManyArguments3() { - Expect.approxEquals( - 210.0, - sumManyNumbers(1, 2.0, 3, 4.0, 5, 6.0, 7, 8.0, 9, 10.0, 11, 12.0, 13, - 14.0, 15, 16.0, 17, 18.0, 19, 20.0)); -} - -typedef Int64PointerUnOp = Pointer Function(Pointer); - -Int64PointerUnOp assign1337Index1 = ffiTestFunctions - .lookupFunction("Assign1337Index1"); - -void testNativeFunctionPointer() { - Pointer p2 = calloc(2); - p2.value = 42; - p2[1] = 1000; - Pointer result = assign1337Index1(p2); - Expect.equals(1337, result.value); - Expect.equals(1337, p2[1]); - Expect.equals(p2.elementAt(1).address, result.address); - calloc.free(p2); -} - -Int64PointerUnOp nullableInt64ElemAt1 = ffiTestFunctions - .lookupFunction("NullableInt64ElemAt1"); - -void testNullPointers() { - Pointer result = nullableInt64ElemAt1(nullptr); - Expect.equals(result, nullptr); - - Pointer p2 = calloc(2); - result = nullableInt64ElemAt1(p2); - Expect.notEquals(result, nullptr); - calloc.free(p2); -} - -typedef NativeFloatPointerToBool = Uint8 Function(Pointer); -typedef FloatPointerToBool = int Function(Pointer); - -FloatPointerToBool isRoughly1337 = ffiTestFunctions.lookupFunction< - NativeFloatPointerToBool, FloatPointerToBool>("IsRoughly1337"); - -void testFloatRounding() { - Pointer p2 = calloc(); - p2.value = 1337.0; - - int result = isRoughly1337(p2); - Expect.equals(1, result); - - calloc.free(p2); -} - -typedef NativeFloatToVoid = Void Function(Float); -typedef DoubleToVoid = void Function(double); - -DoubleToVoid devNullFloat = ffiTestFunctions - .lookupFunction("DevNullFloat"); - -void testVoidReturn() { - devNullFloat(1337.0); - - dynamic loseSignature = devNullFloat; - dynamic result = loseSignature(1337.0); - Expect.isNull(result); -} - -typedef NativeVoidToFloat = Float Function(); -typedef VoidToDouble = double Function(); - -VoidToDouble inventFloatValue = ffiTestFunctions - .lookupFunction("InventFloatValue"); - -void testNoArgs() { - double result = inventFloatValue(); - Expect.approxEquals(1337.0, result); -} - -void testNativeFunctionNullableInt() { - final sumPlus42 = ffiTestFunctions.lookupFunction< - Int32 Function(Int32, Int32), int Function(int, int)>("SumPlus42"); - - try { - sumPlus42(3, null); - } catch (e) { - // TODO(http://dartbug.com/47098): Save param names to dwarf. - Expect.isTrue(e.toString().contains('ffi_param2') || - e.toString().contains('')); - } -} diff --git a/tests/ffi_2/function_very_many_test.dart b/tests/ffi_2/function_very_many_test.dart deleted file mode 100644 index 5ac314204c5..00000000000 --- a/tests/ffi_2/function_very_many_test.dart +++ /dev/null @@ -1,301 +0,0 @@ -// 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. -// -// Dart test program for testing dart:ffi calls argument passing. -// -// VMOptions= -// VMOptions=--deterministic --optimization-counter-threshold=10 -// VMOptions=--use-slow-path -// VMOptions=--use-slow-path --stacktrace-every=100 -// VMOptions=--write-protect-code --no-dual-map-code -// VMOptions=--write-protect-code --no-dual-map-code --use-slow-path -// VMOptions=--write-protect-code --no-dual-map-code --stacktrace-every=100 -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import 'dylib_utils.dart'; - -import "package:expect/expect.dart"; - -void main() { - for (int i = 0; i < 100; ++i) { - testSumVeryManySmallInts(); - testSumVeryManyFloatsDoubles(); - } -} - -final ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); - -VeryManyIntsOp sumVeryManySmallInts = - ffiTestFunctions.lookupFunction( - "SumVeryManySmallInts"); -// Very many small integers, tests alignment on stack. -void testSumVeryManySmallInts() { - Expect.equals( - 40 * 41 / 2, - sumVeryManySmallInts( - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40)); -} - -VeryManyFloatsDoublesOp sumVeryManyFloatsDoubles = ffiTestFunctions - .lookupFunction( - "SumVeryManyFloatsDoubles"); - -// Very many floating points, tests alignment on stack, and packing in -// floating point registers in hardfp. -void testSumVeryManyFloatsDoubles() { - Expect.approxEquals( - 40.0 * 41.0 / 2.0, - sumVeryManyFloatsDoubles( - 1.0, - 2.0, - 3.0, - 4.0, - 5.0, - 6.0, - 7.0, - 8.0, - 9.0, - 10.0, - 11.0, - 12.0, - 13.0, - 14.0, - 15.0, - 16.0, - 17.0, - 18.0, - 19.0, - 20.0, - 21.0, - 22.0, - 23.0, - 24.0, - 25.0, - 26.0, - 27.0, - 28.0, - 29.0, - 30.0, - 31.0, - 32.0, - 33.0, - 34.0, - 35.0, - 36.0, - 37.0, - 38.0, - 39.0, - 40.0)); -} - -typedef NativeVeryManyIntsOp = Int16 Function( - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16, - Int8, - Int16); - -typedef VeryManyIntsOp = int Function( - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int, - int); - -typedef NativeVeryManyFloatsDoublesOp = Double Function( - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double, - Float, - Double); - -typedef VeryManyFloatsDoublesOp = double Function( - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double, - double); diff --git a/tests/ffi_2/hardfp_test.dart b/tests/ffi_2/hardfp_test.dart deleted file mode 100644 index 0fd7a8e7eee..00000000000 --- a/tests/ffi_2/hardfp_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// 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. -// -// Dart test program for testing dart:ffi function pointers. -// -// VMOptions= -// VMOptions=--deterministic --optimization-counter-threshold=10 -// VMOptions=--use-slow-path -// VMOptions=--use-slow-path --stacktrace-every=100 -// VMOptions=--write-protect-code --no-dual-map-code -// VMOptions=--write-protect-code --no-dual-map-code --use-slow-path -// VMOptions=--write-protect-code --no-dual-map-code --stacktrace-every=100 -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; - -import 'callback_tests_utils.dart'; -import 'dylib_utils.dart'; - -void main() { - for (int i = 0; i < 100; ++i) { - testSumFloatsAndDoubles(); - testSumFloatsAndDoublesCallback(); - } -} - -DynamicLibrary ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); - -final sumFloatsAndDoubles = ffiTestFunctions.lookupFunction< - Double Function(Float, Double, Float), - double Function(double, double, double)>("SumFloatsAndDoubles"); - -void testSumFloatsAndDoubles() { - Expect.approxEquals(6.0, sumFloatsAndDoubles(1.0, 2.0, 3.0)); -} - -void testSumFloatsAndDoublesCallback() { - CallbackTest( - "SumFloatsAndDoubles", - Pointer.fromFunction( - sumFloatsAndDoublesDart, 0.0)) - .run(); -} - -double sumFloatsAndDoublesDart(double a, double b, double c) { - print("sumFloatsAndDoublesDart($a, $b, $c)"); - return a + b + c; -} diff --git a/tests/ffi_2/has_symbol_test.dart b/tests/ffi_2/has_symbol_test.dart deleted file mode 100644 index d07f544a2ea..00000000000 --- a/tests/ffi_2/has_symbol_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2021, 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. -// -// SharedObjects=ffi_test_functions - -// @dart=2.9 - -import 'dart:ffi'; -import 'dart:io'; - -import 'package:expect/expect.dart'; - -import 'ffi_test_helpers.dart'; - -void main() { - testHasSymbol(); -} - -void testHasSymbol() { - Expect.isTrue(ffiTestFunctions.providesSymbol('ReturnMaxUint8')); - Expect.isFalse(ffiTestFunctions.providesSymbol('SymbolNotInLibrary')); - - final p = DynamicLibrary.process(); - Expect.isFalse(p.providesSymbol('symbol_that_does_not_exist_in_process')); - if (Platform.isWindows) { - Expect.isTrue(p.providesSymbol('HeapAlloc')); - Expect.isTrue(p.providesSymbol('CoTaskMemAlloc')); - } else { - Expect.isTrue(p.providesSymbol('dlopen')); - } - - final e = DynamicLibrary.executable(); - Expect.isTrue(e.providesSymbol('Dart_Invoke')); - Expect.isFalse(e.providesSymbol('symbol_that_does_not_exist_in_executable')); -} diff --git a/tests/ffi_2/inline_array_multi_dimensional_test.dart b/tests/ffi_2/inline_array_multi_dimensional_test.dart deleted file mode 100644 index d3a7b404583..00000000000 --- a/tests/ffi_2/inline_array_multi_dimensional_test.dart +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) 2021, 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. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; -import 'package:ffi/ffi.dart'; - -// Reuse compound definitions. -import 'function_structs_by_value_generated_compounds.dart'; - -void main() { - testSizeOf(); - testLoad(); - testLoadMultiAnnotation(); - testStore(); - testToString(); - testRange(); -} - -void testSizeOf() { - Expect.equals(32, sizeOf()); - Expect.equals(64, sizeOf()); -} - -/// Tests the load of nested `Array`s. -/// -/// Only stores into arrays which do not have nested arrays. -void testLoad() { - final Pointer pointer = calloc(); - final struct = pointer.ref; - final array = struct.a0; - for (int i = 0; i < 2; i++) { - for (int j = 0; j < 2; j++) { - for (int k = 0; k < 2; k++) { - for (int l = 0; l < 2; l++) { - for (int m = 0; m < 2; m++) { - array[i][j][k][l][m] = i + j + k + l + m; - } - } - } - } - } - for (int i = 0; i < 2; i++) { - for (int j = 0; j < 2; j++) { - for (int k = 0; k < 2; k++) { - for (int l = 0; l < 2; l++) { - for (int m = 0; m < 2; m++) { - Expect.equals(i + j + k + l + m, array[i][j][k][l][m]); - } - } - } - } - } - calloc.free(pointer); -} - -/// Tests the load of nested `Array`s. -/// -/// Only stores into arrays which do not have nested arrays. -void testLoadMultiAnnotation() { - final Pointer pointer = calloc(); - final struct = pointer.ref; - final array = struct.a0; - for (int i = 0; i < 2; i++) { - for (int j = 0; j < 2; j++) { - for (int k = 0; k < 2; k++) { - for (int l = 0; l < 2; l++) { - for (int m = 0; m < 2; m++) { - for (int o = 0; o < 2; o++) { - array[i][j][k][l][m][o] = i + j + k + l + m + o; - } - } - } - } - } - } - for (int i = 0; i < 2; i++) { - for (int j = 0; j < 2; j++) { - for (int k = 0; k < 2; k++) { - for (int l = 0; l < 2; l++) { - for (int m = 0; m < 2; m++) { - for (int o = 0; o < 2; o++) { - Expect.equals(i + j + k + l + m + o, array[i][j][k][l][m][o]); - } - } - } - } - } - } - calloc.free(pointer); -} - -void testStore() { - final Pointer pointer = calloc(); - final struct = pointer.ref; - final array = struct.a0; - for (int i = 0; i < 2; i++) { - for (int j = 0; j < 2; j++) { - for (int k = 0; k < 2; k++) { - for (int l = 0; l < 2; l++) { - for (int m = 0; m < 2; m++) { - array[i][j][k][l][m] = i + j + k + l + m; - } - } - } - } - } - array[0] = array[1]; // Copy many things. - for (int j = 0; j < 2; j++) { - for (int k = 0; k < 2; k++) { - for (int l = 0; l < 2; l++) { - for (int m = 0; m < 2; m++) { - Expect.equals(array[1][j][k][l][m], array[0][j][k][l][m]); - } - } - } - } - calloc.free(pointer); -} - -// // Tests the toString of the test generator. -void testToString() { - final Pointer pointer = calloc(); - final struct = pointer.ref; - final array = struct.a0; - for (int i = 0; i < 2; i++) { - for (int j = 0; j < 2; j++) { - for (int k = 0; k < 2; k++) { - for (int l = 0; l < 2; l++) { - for (int m = 0; m < 2; m++) { - array[i][j][k][l][m] = 16 * i + 8 * j + 4 * k + 2 * l + m; - } - } - } - } - } - Expect.equals( - "([[[[[0, 1], [2, 3]], [[4, 5], [6, 7]]], [[[8, 9], [10, 11]], [[12, 13], [14, 15]]]], [[[[16, 17], [18, 19]], [[20, 21], [22, 23]]], [[[24, 25], [26, 27]], [[28, 29], [30, 31]]]]])", - struct.toString()); - calloc.free(pointer); -} - -void testRange() { - final pointer = calloc(); - final struct = pointer.ref; - final array = struct.a0; - array[0]; - array[1]; - Expect.throws(() => array[-1]); - Expect.throws(() => array[-1] = array[1]); - Expect.throws(() => array[2]); - Expect.throws(() => array[2] = array[1]); - array[0][0]; - array[0][1]; - Expect.throws(() => array[0][-1]); - Expect.throws(() => array[0][-1] = array[0][1]); - Expect.throws(() => array[0][2]); - Expect.throws(() => array[0][2] = array[0][1]); - calloc.free(pointer); -} diff --git a/tests/ffi_2/inline_array_test.dart b/tests/ffi_2/inline_array_test.dart deleted file mode 100644 index f3ff6ba8bce..00000000000 --- a/tests/ffi_2/inline_array_test.dart +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2021, 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. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; -import 'package:ffi/ffi.dart'; - -// Reuse compound definitions. -import 'function_structs_by_value_generated_compounds.dart'; - -void main() { - testSizeOf(); - testLoad(); - testStore(); - testToString(); - testRange(); -} - -void testSizeOf() { - Expect.equals(8, sizeOf()); - Expect.equals(10, sizeOf()); - Expect.equals(4008, sizeOf()); -} - -// Only tests with Pointer as backing store. -void testLoad() { - final pointer = calloc(); - final struct = pointer.ref; - final array = struct.a0; - pointer.cast()[0] = 42; - pointer.cast()[7] = 3; - Expect.equals(42, array[0]); - Expect.equals(3, array[7]); - calloc.free(pointer); -} - -// Only tests with Pointer as backing store. -void testStore() { - final pointer = calloc(); - pointer.cast()[0] = 42; - pointer.cast()[7] = 3; - final pointer2 = calloc(); - pointer2.ref.a0 = pointer.ref.a0; - Expect.equals(42, pointer2.ref.a0[0]); - Expect.equals(3, pointer2.ref.a0[7]); - calloc.free(pointer); - calloc.free(pointer2); -} - -// Tests the toString of the test generator. -void testToString() { - final pointer = calloc(); - final struct = pointer.ref; - final array = struct.a0; - for (var i = 0; i < 8; i++) { - array[i] = i; - } - Expect.equals("([0, 1, 2, 3, 4, 5, 6, 7])", struct.toString()); - calloc.free(pointer); - - final pointer2 = calloc(); - final struct2 = pointer2.ref; - struct2.a0[0].a0 = 0; - struct2.a0[0].a1 = 1; - struct2.a0[1].a0 = 2; - struct2.a0[1].a1 = 3; - struct2.a1 = 4; - print(struct2); - Expect.equals("([(0, 1), (2, 3)], 4)", struct2.toString()); - calloc.free(pointer2); -} - -void testRange() { - final pointer = calloc(); - final struct = pointer.ref; - final array = struct.a0; - array[0] = 1; - Expect.equals(1, array[0]); - array[7] = 7; - Expect.equals(7, array[7]); - Expect.throws(() => array[-1]); - Expect.throws(() => array[-1] = 0); - Expect.throws(() => array[8]); - Expect.throws(() => array[8] = 0); - calloc.free(pointer); -} diff --git a/tests/ffi_2/invoke_callback_after_suspension_test.dart b/tests/ffi_2/invoke_callback_after_suspension_test.dart deleted file mode 100644 index 256d6757726..00000000000 --- a/tests/ffi_2/invoke_callback_after_suspension_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2023, 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 - -// SharedObjects=ffi_test_functions - -import 'dart:async'; -import 'dart:isolate'; -import 'dart:ffi'; - -import 'callback_tests_utils.dart'; - -typedef SimpleAdditionType = Int32 Function(Int32, Int32); -int simpleAddition(int x, int y) { - print("simpleAddition($x, $y)"); - return x + y; -} - -void main() async { - // The main isolate is very special and cannot be suspended (due to having an - // active api scope throughout it's lifetime), so we run this test in a helper - // isolate. - const int count = 50; - final futures = []; - for (int i = 0; i < count; ++i) { - futures.add(Isolate.run(() async { - // First make the callback pointer. - final callbackFunctionPointer = - Pointer.fromFunction(simpleAddition, 0); - - // Then cause suspenion of [Thread]. - await Future.delayed(const Duration(seconds: 1)); - - // Then make use of callback. - CallbackTest("SimpleAddition", callbackFunctionPointer).run(); - })); - } - await Future.wait(futures); -} diff --git a/tests/ffi_2/native_effect_test.dart b/tests/ffi_2/native_effect_test.dart deleted file mode 100644 index 9a7f222a7a6..00000000000 --- a/tests/ffi_2/native_effect_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2021, 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. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -// Tests that the dart:internal _nativeEffect flow graph builder works. - -import 'dart:ffi'; - -import "package:expect/expect.dart"; - -import 'dylib_utils.dart'; - -void main() { - testReturnStruct1ByteInt(); -} - -final ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); - -final returnStruct1ByteInt = ffiTestFunctions.lookupFunction< - Struct1ByteInt Function(Int8), - Struct1ByteInt Function(int)>("ReturnStruct1ByteInt"); - -void testReturnStruct1ByteInt() { - final result = returnStruct1ByteInt(1); - Expect.equals(1, result.a0); -} - -class Struct1ByteInt extends Struct { - @Int8() - int a0; -} diff --git a/tests/ffi_2/negative_function_test.dart b/tests/ffi_2/negative_function_test.dart deleted file mode 100644 index 338706d571f..00000000000 --- a/tests/ffi_2/negative_function_test.dart +++ /dev/null @@ -1,85 +0,0 @@ -// 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. -// -// Dart test program for testing error handling with dart:ffi functions. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi' as ffi; -import 'dylib_utils.dart'; -import "package:expect/expect.dart"; - -main() { - testWrongArity(); - testWrongTypes(); - testDynamicAsFunction(); - testDynamicLookupFunction(); -} - -ffi.DynamicLibrary ffiTestFunctions = - dlopenPlatformSpecific("ffi_test_functions"); - -typedef NativeBinaryOp = ffi.Int32 Function(ffi.Int32, ffi.Int32); -typedef BinaryOp = int Function(int, int); - -typedef NativeUnaryOp = ffi.Int64 Function(ffi.Pointer); -typedef UnaryOp = int Function(ffi.Pointer); - -void testWrongArity() { - { - dynamic sumPlus42 = - ffiTestFunctions.lookupFunction("SumPlus42"); - Expect.throwsNoSuchMethodError(() => sumPlus42(10)); - Expect.throwsNoSuchMethodError(() => sumPlus42(10, 11, 12)); - Expect.throwsNoSuchMethodError(() => sumPlus42(10, 11, 12, y: 13)); - } - - { - Function sumPlus42 = - ffiTestFunctions.lookupFunction("SumPlus42"); - Expect.throwsNoSuchMethodError(() => sumPlus42(10)); - Expect.throwsNoSuchMethodError(() => sumPlus42(10, 11, 12)); - Expect.throwsNoSuchMethodError(() => sumPlus42(10, 11, 12, y: 13)); - } -} - -void testWrongTypes() { - { - dynamic sumPlus42 = - ffiTestFunctions.lookupFunction("SumPlus42"); - Expect.throwsTypeError(() => sumPlus42("abc", "def")); - } - - { - Function sumPlus42 = - ffiTestFunctions.lookupFunction("SumPlus42"); - Expect.throwsTypeError(() => sumPlus42("abc", "def")); - } - - { - dynamic pointerOp = ffiTestFunctions - .lookupFunction("Assign1337Index1"); - Expect.throwsTypeError(() => pointerOp(0)); - } -} - -// Test that invoking 'Pointer.asFunction' with a dynamic receiver type throws -// an exception. -void testDynamicAsFunction() { - dynamic x = ffi.nullptr.cast>(); - Expect.throwsNoSuchMethodError(() { - x.asFunction(); - }); -} - -// Test that invoking 'DynamicLibrary.lookupFunction' with a dynamic receiver -// type throws an exception. -void testDynamicLookupFunction() { - dynamic lib = ffiTestFunctions; - Expect.throwsNoSuchMethodError(() { - lib.lookupFunction("_"); - }); -} diff --git a/tests/ffi_2/null_regress_39068_test.dart b/tests/ffi_2/null_regress_39068_test.dart deleted file mode 100644 index de8e7cd71ef..00000000000 --- a/tests/ffi_2/null_regress_39068_test.dart +++ /dev/null @@ -1,73 +0,0 @@ -// 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. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import "dart:ffi"; - -import "package:expect/expect.dart"; - -import "dylib_utils.dart"; - -typedef VigesimalOp = double Function( - int, - double, - int, - double, - int, - double, - int, - double, - int, - double, - int, - double, - int, - double, - int, - double, - int, - double, - int, - double); - -typedef NativeVigesimalOp = Double Function( - IntPtr, - Float, - IntPtr, - Double, - IntPtr, - Float, - IntPtr, - Double, - IntPtr, - Float, - IntPtr, - Double, - IntPtr, - Float, - IntPtr, - Double, - IntPtr, - Float, - IntPtr, - Double); - -main() { - final ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); - - final sumManyNumbers = ffiTestFunctions - .lookupFunction("SumManyNumbers"); - - bool gotException = false; - try { - sumManyNumbers(1, 2.0, 3, 4.0, 5, 6.0, 7, 8.0, 9, 10.0, 11, 12.0, 13, 14.0, - 15, 16.0, 17, 18.0, null, 20.0); - } on Error { - gotException = true; - } - Expect.isTrue(gotException); -} diff --git a/tests/ffi_2/null_test.dart b/tests/ffi_2/null_test.dart deleted file mode 100644 index 75185e96014..00000000000 --- a/tests/ffi_2/null_test.dart +++ /dev/null @@ -1,224 +0,0 @@ -// 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. -// -// Dart test program for testing dart:ffi with null values. -// -// Separated into a separate file to make NNBD testing easier. -// -// VMOptions= -// VMOptions=--deterministic --optimization-counter-threshold=90 -// VMOptions=--use-slow-path -// VMOptions=--use-slow-path --stacktrace-every=100 -// VMOptions=--write-protect-code --no-dual-map-code -// VMOptions=--write-protect-code --no-dual-map-code --use-slow-path -// VMOptions=--write-protect-code --no-dual-map-code --stacktrace-every=100 -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; -import "package:ffi/ffi.dart"; - -import 'dylib_utils.dart'; -import 'ffi_test_helpers.dart'; - -void main() { - for (int i = 0; i < 100; i++) { - testPointerStoreNull(); - testEquality(); - testNullReceivers(); - testNullIndices(); - testNullArguments(); - testNullInt(); - testNullDouble(); - testNullManyArgs(); - testException(); - testNullReturnCallback(); - } -} - -void testPointerStoreNull() { - int i = null; - Pointer p = calloc(); - Expect.throws(() => p.value = i); - calloc.free(p); - double d = null; - Pointer p2 = calloc(); - Expect.throws(() => p2.value = d); - calloc.free(p2); - Pointer x = null; - Pointer> p3 = calloc(); - Expect.throws(() => p3.value = x); - calloc.free(p3); -} - -void testEquality() { - Pointer p = Pointer.fromAddress(12345678); - Expect.notEquals(p, null); - Expect.notEquals(null, p); -} - -/// With extension methods, the receiver position can be null. -testNullReceivers() { - Pointer p = calloc(); - - Pointer p4 = null; - Expect.throws(() => Expect.equals(10, p4.value)); - Expect.throws(() => p4.value = 10); - - Pointer> p5 = null; - Expect.throws(() => Expect.equals(10, p5.value)); - Expect.throws(() => p5.value = p); - - Pointer p6 = null; - Expect.throws(() => Expect.equals(10, p6.ref)); - - calloc.free(p); -} - -testNullIndices() { - Pointer p = calloc(); - - Expect.throws(() => Expect.equals(10, p[null])); - Expect.throws(() => p[null] = 10); - - Pointer> p5 = p.cast(); - Expect.throws(() => Expect.equals(10, p5[null])); - Expect.throws(() => p5[null] = p); - - Pointer p6 = p.cast(); - Expect.throws(() => Expect.equals(10, p6[null])); - - calloc.free(p); -} - -testNullArguments() { - Pointer p = calloc(); - Expect.throws(() => p.value = null); - calloc.free(p); -} - -class Foo extends Struct { - @Int8() - int a; -} - -void testNullInt() { - Expect.throws(() => sumPlus42(43, null)); -} - -void testNullDouble() { - Expect.throws(() => times1_337Double(null)); -} - -void testNullManyArgs() { - Expect.throws(() => sumManyNumbers(1, 2.0, 3, 4.0, 5, 6.0, 7, 8.0, 9, 10.0, - 11, 12.0, 13, 14.0, 15, 16.0, 17, 18.0, null, 20.0)); -} - -typedef NativeBinaryOp = Int32 Function(Int32, Int32); -typedef BinaryOp = int Function(int, int); - -typedef NativeDoubleUnaryOp = Double Function(Double); -typedef DoubleUnaryOp = double Function(double); - -DoubleUnaryOp times1_337Double = ffiTestFunctions - .lookupFunction("Times1_337Double"); - -typedef NativeVigesimalOp = Double Function( - IntPtr, - Float, - IntPtr, - Double, - IntPtr, - Float, - IntPtr, - Double, - IntPtr, - Float, - IntPtr, - Double, - IntPtr, - Float, - IntPtr, - Double, - IntPtr, - Float, - IntPtr, - Double); -typedef VigesimalOp = double Function( - int, - double, - int, - double, - int, - double, - int, - double, - int, - double, - int, - double, - int, - double, - int, - double, - int, - double, - int, - double); - -VigesimalOp sumManyNumbers = ffiTestFunctions - .lookupFunction("SumManyNumbers"); - -// Throw an exception from within the trampoline and collect a stacktrace -// include its frame. -void testException() { - try { - sumPlus42(null, null); - } catch (e, s) { - return; - } - throw "Didn't throw!"; -} - -BinaryOp sumPlus42 = - ffiTestFunctions.lookupFunction("SumPlus42"); - -void testNullReturnCallback() { - final test = - Test("ReturnNull", Pointer.fromFunction(returnNull, 42)); - test.run(); -} - -typedef NativeCallbackTest = Int32 Function(Pointer); -typedef NativeCallbackTestFn = int Function(Pointer); - -final DynamicLibrary testLibrary = dlopenPlatformSpecific("ffi_test_functions"); - -class Test { - final String name; - final Pointer callback; - final bool skip; - - Test(this.name, this.callback, {bool skipIf: false}) : skip = skipIf {} - - void run() { - if (skip) return; - - final NativeCallbackTestFn tester = testLibrary - .lookupFunction("Test$name"); - final int testCode = tester(callback); - if (testCode != 0) { - Expect.fail("Test $name failed."); - } - } -} - -typedef ReturnNullType = Int32 Function(); -int returnNull() { - return null; -} diff --git a/tests/ffi_2/prepare_flutter_bundle.dart b/tests/ffi_2/prepare_flutter_bundle.dart deleted file mode 100644 index 802060bc810..00000000000 --- a/tests/ffi_2/prepare_flutter_bundle.dart +++ /dev/null @@ -1,229 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:async'; -import 'dart:io'; - -import 'package:path/path.dart' as path; - -main(List args) async { - if (args.length != 1) { - print('Usage ${Platform.executable} ${Platform.script} '); - exit(1); - } - - final sdkRoot = - path.canonicalize(path.join(Platform.script.path, '../../..')); - final flutterTestsDir = args.single; - - print('Using SDK root: $sdkRoot'); - final testFiles = []; - final failedOrTimedOut = []; - final filteredTests = []; - await for (final testFile in listTestFiles(sdkRoot, filteredTests)) { - final duration = await run(sdkRoot, testFile); - if (duration != null && duration.inSeconds < 5) { - testFiles.add(testFile); - } else { - failedOrTimedOut.add(testFile); - } - } - testFiles.sort(); - failedOrTimedOut.sort(); - filteredTests.sort(); - - dumpTestList(testFiles, 'The following tests will be included:'); - dumpTestList(failedOrTimedOut, - 'The following tests will be excluded due to timeout or test failure:'); - dumpTestList( - filteredTests, - 'The following tests were filtered due to using ' - 'dart_api.h/async/DynamicLibrary.{process,executable}/...'); - - final allFiles = {}; - allFiles.add(path.join(sdkRoot, 'pkg/expect/lib/expect.dart')); - for (final testFile in testFiles) { - allFiles.add(testFile); - await addImportedFilesTo(allFiles, testFile); - } - - await generateCleanDir(flutterTestsDir); - - final dartTestsDirRelative = 'example/lib'; - final dartTestsDir = path.join(flutterTestsDir, dartTestsDirRelative); - await generateDartTests(dartTestsDir, allFiles, testFiles); - - final ccDirRelative = 'ios/Classes'; - final ccDir = path.join(flutterTestsDir, ccDirRelative); - await generateCLibs(sdkRoot, ccDir, allFiles, testFiles); - - print(''' - -Files generated in: - * $dartTestsDir - * $ccDir - -Generate flutter test application with: - flutter create --platforms=android,ios --template=plugin - -Please copy generated files into FFI flutter test application: - cd && cp -r $flutterTestsDir ./ - -After copying modify the test application: - * Modify example/pubspec.yaml to depend on package:ffi. - * Modify example/lib/main.dart to invoke all.dart while rendering. - * Open example/ios/Runner.xcworkspace in Xcode. - * Add the cpp files to Pods/Development Pods//ios/Classes - to ensure they are statically linked to the app. -'''); -} - -void dumpTestList(List testFiles, String message) { - if (testFiles.isEmpty) return; - - print(message); - for (final testFile in testFiles) { - print(' ${path.basename(testFile)}'); - } -} - -final importRegExp = RegExp(r'''^import.*['"](.+)['"].*;'''); - -Future addImportedFilesTo(Set allFiles, String testFile) async { - final content = await File(testFile).readAsString(); - for (final line in content.split('\n')) { - final match = importRegExp.matchAsPrefix(line); - if (match != null) { - final filename = match.group(1); - if (!filename.contains('dart:') && - !filename.contains('package:expect') && - !filename.contains('package:ffi')) { - final importedFile = Uri.file(testFile).resolve(filename).toFilePath(); - if (allFiles.add(importedFile)) { - addImportedFilesTo(allFiles, importedFile); - } - } - } - } -} - -Future generateCLibs(String sdkRoot, String destDir, Set allFiles, - List testFiles) async { - final dir = await generateCleanDir(destDir); - - String destinationFile; - - final lib1 = - path.join(sdkRoot, 'runtime/bin/ffi_test/ffi_test_dynamic_library.cc'); - destinationFile = - path.join(dir.path, path.basename(lib1)).replaceAll('.cc', '.cpp'); - File(destinationFile).writeAsStringSync(File(lib1).readAsStringSync()); - - final lib2 = path.join(sdkRoot, 'runtime/bin/ffi_test/ffi_test_functions.cc'); - destinationFile = - path.join(dir.path, path.basename(lib2)).replaceAll('.cc', '.cpp'); - File(destinationFile).writeAsStringSync(File(lib2).readAsStringSync()); - - final lib3 = path.join( - sdkRoot, 'runtime/bin/ffi_test/ffi_test_functions_generated.cc'); - destinationFile = - path.join(dir.path, path.basename(lib3)).replaceAll('.cc', '.cpp'); - File(destinationFile).writeAsStringSync(File(lib3).readAsStringSync()); -} - -String cleanDart(String content) { - return content.replaceAll('package:expect/expect.dart', 'expect.dart'); -} - -Future generateDartTests( - String destDir, Set allFiles, List testFiles) async { - final dir = await generateCleanDir(destDir); - - final sink = File(path.join(dir.path, 'all.dart')).openWrite(); - sink.writeln('import "dart:async";'); - sink.writeln(''); - for (int i = 0; i < testFiles.length; ++i) { - sink.writeln('import "${path.basename(testFiles[i])}" as main$i;'); - } - sink.writeln(''); - sink.writeln('Future invoke(dynamic fun) async {'); - sink.writeln(' if (fun is void Function() || fun is Future Function()) {'); - sink.writeln(' return await fun();'); - sink.writeln(' } else {'); - sink.writeln(' return await fun([]);'); - sink.writeln(' }'); - sink.writeln('}'); - sink.writeln(''); - sink.writeln('dynamic main() async {'); - for (int i = 0; i < testFiles.length; ++i) { - sink.writeln(' await invoke(main$i.main);'); - } - sink.writeln('}'); - await sink.close(); - - for (final file in allFiles) { - File(path.join(dir.path, path.basename(file))) - .writeAsStringSync(cleanDart(File(file).readAsStringSync())); - } - - File(path.join(dir.path, 'dylib_utils.dart')).writeAsStringSync(''' -import 'dart:ffi' as ffi; -import 'dart:io' show Platform; - -ffi.DynamicLibrary dlopenPlatformSpecific(String name, {String path}) { - return Platform.isAndroid - ? ffi.DynamicLibrary.open('libffi_tests.so') - : ffi.DynamicLibrary.process(); -} -'''); -} - -Stream listTestFiles( - String sdkRoot, List filteredTests) async* { - await for (final file - in Directory(path.join(sdkRoot, 'tests/ffi_2')).list()) { - if (file is File && file.path.endsWith('_test.dart')) { - // These tests are VM specific and cannot necessarily be run on Flutter. - if (path.basename(file.path).startsWith('vmspecific_')) { - filteredTests.add(file.path); - continue; - } - // These tests use special features which are hard to test on Flutter. - final contents = file.readAsStringSync(); - if (contents.contains(RegExp('//# .* compile-time error')) || - contents.contains('DynamicLibrary.process') || - contents.contains('DynamicLibrary.executable')) { - filteredTests.add(file.path); - continue; - } - yield file.path; - } - } -} - -Future run(String sdkRoot, String testFile) async { - final env = Map.from(Platform.environment); - env['LD_LIBRARY_PATH'] = path.join(sdkRoot, 'out/ReleaseX64'); - final sw = Stopwatch()..start(); - final Process process = await Process.start( - Platform.executable, [testFile], - environment: env); - final timer = Timer(const Duration(seconds: 3), () => process.kill()); - process.stdout.listen((_) {}); - process.stderr.listen((_) {}); - if (await process.exitCode != 0) return null; - timer.cancel(); - return sw.elapsed; -} - -Future generateCleanDir(String dirname) async { - final directory = Directory(dirname); - if (await directory.exists()) { - await directory.delete(recursive: true); - } - await directory.create(recursive: true); - return directory; -} diff --git a/tests/ffi_2/regress_37254_test.dart b/tests/ffi_2/regress_37254_test.dart deleted file mode 100644 index f5a92ee8a61..00000000000 --- a/tests/ffi_2/regress_37254_test.dart +++ /dev/null @@ -1,250 +0,0 @@ -// 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. -// -// This program tests interaction with generic Pointers. -// -// Notation used in following tables: -// * static_type//dynamic_type -// * P = Pointer -// * I = Int8 -// * NT = NativeType -// -// Note #1: When NNBD is landed, implicit downcasts will be static errors. -// -// Note #2: When we switch to extension methods we will _only_ use the static -// type of the container. -// -// ===== a.value = b ====== -// Does a.value = b, where a and b have specific static and dynamic types: run -// fine, fail at compile time, or fail at runtime? -// ======================= -// b P//P P//P P//P -// a -// P>//P> 1 ok 2 implicit downcast 3 implicit downcast -// of argument: of argument: -// static error static error -// -// P>//P> 4 ok 5 ok 6 fail at runtime -// -// P>//P> 7 ok 8 ok 9 ok -// -// ====== final c = a.value ====== -// What is the (inferred) static type and runtime type of `a.value`. Note that -// we assume extension method here: on Pointer> { Pointer load(); } -// ================================ -// a a.value -// inferred static type*//runtime type -// P>//P> P//P -// -// P>//P> P//P -// -// P>//P> P//P -// -// * The inferred static type when we get extension methods. -// -// ====== b = a.value ====== -// What happens when we try to assign the result of a.value to variable b with -// a specific static type: runs fine, fails at compile time, or fails at runtime. -// ========================== -// b P P -// a -// P>//P> 1 ok 2 ok -// -// P>//P> 3 implicit downcast 4 ok -// of returnvalue: ok -// -// P>//P> 5 implicit downcast 6 ok -// of returnvalue: fail -// at runtime -// -// These are the normal Dart assignment rules. - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; -import "package:ffi/ffi.dart"; - -// ===== a.value = b ====== -// The tests follow table cells left to right, top to bottom. -void store1() { - final Pointer> a = calloc>(); - final Pointer b = calloc(); - - a.value = b; - - calloc.free(a); - calloc.free(b); -} - -void store2() { - final Pointer> a = calloc>(); - final Pointer b = - calloc(); // Reified Pointer at runtime. - - // Successful implicit downcast of argument at runtime. - // Should succeed now, should statically be rejected when NNBD lands. - a.value = b; - - calloc.free(a); - calloc.free(b); -} - -void store3() { - final Pointer> a = calloc>(); - final Pointer b = calloc().cast>(); - - // Type arguments are not reified. - a.value = b; - - calloc.free(a); - calloc.free(b); -} - -void store4() { - // Type arguments are not reified. - final Pointer> a = calloc>(); - - final Pointer b = calloc(); - - a.value = b; - - calloc.free(a); - calloc.free(b); -} - -void store5() { - // Type arguments are not reified. - final Pointer> a = calloc>(); - final Pointer b = calloc(); - - a.value = b; - - calloc.free(a); - calloc.free(b); -} - -void store6() { - // Reified as Pointer> at runtime. - final Pointer> a = calloc>(); - final Pointer b = calloc().cast>(); - - // Type arguments are not reified. - a.value = b; - - calloc.free(a); - calloc.free(b); -} - -void store7() { - final Pointer> a = calloc>(); - final Pointer b = calloc(); - - a.value = b; - - calloc.free(a); - calloc.free(b); -} - -void store8() { - final Pointer> a = calloc>(); - - // Reified as Pointer at runtime. - final Pointer b = calloc(); - - a.value = b; - - calloc.free(a); - calloc.free(b); -} - -void store9() { - final Pointer> a = calloc>(); - final Pointer b = calloc().cast>(); - - a.value = b; - - calloc.free(a); - calloc.free(b); -} - -// ====== b = a.value ====== -// The tests follow table cells left to right, top to bottom. -void load1() { - final Pointer> a = calloc>(); - - Pointer b = a.value; - Expect.type>(b); - - calloc.free(a); -} - -void load2() { - final Pointer> a = calloc>(); - - Pointer b = a.value; - Expect.type>(b); - - calloc.free(a); -} - -void load3() { - // Reified as Pointer> at runtime. - final Pointer> a = calloc>(); - - Pointer b = a.value; - Expect.type>(b); - - calloc.free(a); -} - -void load4() { - // Reified as Pointer> at runtime. - final Pointer> a = calloc>(); - - // Return value runtime type is Pointer. - Pointer b = a.value; - Expect.type>(b); - - calloc.free(a); -} - -void load5() { - final Pointer> a = calloc>(); - - // Type arguments are not reified. - Pointer b = a.value; - - calloc.free(a); -} - -void load6() { - final Pointer> a = calloc>(); - - Pointer b = a.value; - Expect.type>(b); - - calloc.free(a); -} - -void main() { - for (int i = 0; i < 100; i++) { - store1(); - store2(); - store3(); - store4(); - store5(); - store6(); - store7(); - store8(); - store9(); - load1(); - load2(); - load3(); - load4(); - load5(); - load6(); - } -} diff --git a/tests/ffi_2/regress_39044_test.dart b/tests/ffi_2/regress_39044_test.dart deleted file mode 100644 index 38345935dab..00000000000 --- a/tests/ffi_2/regress_39044_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// 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. -// -// Check that the optimizer does not fuse constants with different -// representations. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import "dart:ffi"; - -import "package:expect/expect.dart"; - -import "dylib_utils.dart"; - -main() { - final ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); - - final intComputation = ffiTestFunctions.lookupFunction< - Int64 Function(Int64, Int8), int Function(int, int)>("Regress39044"); - - // The arguments are the same Smi constant, however they are different sizes. - final result = intComputation( - /* dart::kUnboxedInt64 --> int64_t */ 1, - /* dart::kUnboxedInt32 --> truncated to int8_t */ 1); - - Expect.equals(0, result); -} diff --git a/tests/ffi_2/regress_39063_test.dart b/tests/ffi_2/regress_39063_test.dart deleted file mode 100644 index e8c9570175c..00000000000 --- a/tests/ffi_2/regress_39063_test.dart +++ /dev/null @@ -1,69 +0,0 @@ -// 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. -// -// Check that the optimizer does not fuse constants with different -// representations. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import "dart:ffi"; - -import "dylib_utils.dart"; - -typedef VigesimalOp = double Function( - int, - double, - int, - double, - int, - double, - int, - double, - int, - double, - int, - double, - int, - double, - int, - double, - int, - double, - int, - double); - -typedef NativeVigesimalOp = Double Function( - IntPtr, - Float, - IntPtr, - Double, - IntPtr, - Float, - IntPtr, - Double, - IntPtr, - Float, - IntPtr, - Double, - IntPtr, - Float, - IntPtr, - Double, - IntPtr, - Float, - IntPtr, - Double); - -main() { - final ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); - - final sumManyNumbers = ffiTestFunctions - .lookupFunction("SumManyNumbers"); - - // Should not crash. - sumManyNumbers(1, 2.0, 3, 4.0, 5, 6.0, 7, 8.0, 9, 10.0, 11, 12.0, 13, 14.0, - 15, 16.0, 17, 18.0, 19, 20.0); -} diff --git a/tests/ffi_2/regress_39885_test.dart b/tests/ffi_2/regress_39885_test.dart deleted file mode 100644 index 14911677815..00000000000 --- a/tests/ffi_2/regress_39885_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:ffi/ffi.dart"; - -main() { - final data = calloc(3); - for (int i = 0; i < 3; ++i) { - data.elementAt(i).value = 1; - } - calloc.free(data); -} diff --git a/tests/ffi_2/regress_40537_test.dart b/tests/ffi_2/regress_40537_test.dart deleted file mode 100644 index bb5eb583202..00000000000 --- a/tests/ffi_2/regress_40537_test.dart +++ /dev/null @@ -1,83 +0,0 @@ -// 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. -// -// Truncation and sign extension of small ints, tested with something else than -// equality. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; - -import "dylib_utils.dart"; - -main() { - variant1Negative(); - variant1Positive(); - variant2Negative(); - variant2Positive(); - variant3Negative(); -} - -/// `return x == 249 ? 1 : 0`. -/// -/// This doesn't catch the error. -final regress40537 = ffiTestFunctions - .lookupFunction("Regress40537"); - -variant1Negative() { - // 0xF9 = -7 in 2s complement. - // 0xF9 = 249 in unsigned. - final result = regress40537(-7); - print(result); - Expect.equals(1, result); -} - -variant1Positive() { - // 0xF9 = 249 in unsigned. - final result = regress40537(0xFFFFFFF9); - print(result); - Expect.equals(1, result); -} - -/// `return x`. -/// -/// This does. -final regress40537Variant2 = - ffiTestFunctions.lookupFunction( - "Regress40537Variant2"); - -variant2Negative() { - // The 32 bit representation of -7 is 0xFFFFFFF9. - // Only the lowest byte, 0xF9, should be interpreted by calling convention, - // or it should be truncated and zero extended before calling. - final result = regress40537Variant2(-7); - print(result); - Expect.equals(249, result); -} - -variant2Positive() { - // Only the lowest byte, 0xF9, should be interpreted by calling convention, - // or it should be truncated and zero extended before calling. - final result = regress40537Variant2(0xFFFFFFF9); - print(result); - Expect.equals(249, result); -} - -/// `return x`. -final regress40537Variant3 = - ffiTestFunctions.lookupFunction( - "Regress40537Variant3"); - -variant3Negative() { - // This really passes -7 its intptr_t. - final result = regress40537Variant3(-7); - print(result); - Expect.equals(249, result); -} - -final ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); diff --git a/tests/ffi_2/regress_43016_test.dart b/tests/ffi_2/regress_43016_test.dart deleted file mode 100644 index c1927c99be9..00000000000 --- a/tests/ffi_2/regress_43016_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// 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. -// -// SharedObjects=ffi_test_functions -// -// VMOptions=--optimization-counter-threshold=200 - -// @dart = 2.9 - -import 'dart:ffi'; - -import 'dylib_utils.dart'; - -class MyStruct extends Struct { - @Int8() - int a; -} - -typedef _c_pass_struct = Int32 Function(Pointer arg0); - -typedef _dart_pass_struct = int Function(Pointer arg0); - -int pass_struct(Pointer arg0) { - _pass_struct ??= ffiTestFunctions - .lookupFunction<_c_pass_struct, _dart_pass_struct>('PassStruct'); - return _pass_struct(arg0); -} - -_dart_pass_struct _pass_struct; - -final ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); - -void main() { - for (int i = 0; i < 10000; i++) { - pass_struct(nullptr); - } -} diff --git a/tests/ffi_2/regress_43693_test.dart b/tests/ffi_2/regress_43693_test.dart deleted file mode 100644 index 47e71f5976a..00000000000 --- a/tests/ffi_2/regress_43693_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// 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. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import 'package:ffi/ffi.dart'; -import 'package:expect/expect.dart'; - -import 'dylib_utils.dart'; - -class Struct43693 extends Struct { - Pointer somePtr; - - @Uint64() - int someValue; -} - -final int Function(Pointer) readMyStructSomeValue = - ffiTestFunctions - .lookup)>>( - "Regress43693") - .asFunction)>(); - -final ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); - -void main() { - final myStructs = calloc(); - myStructs[0].somePtr = nullptr; - myStructs[0].someValue = 0xAAAAAAAABBBBBBBB; - final result = readMyStructSomeValue(myStructs); - Expect.equals(0xAAAAAAAABBBBBBBB, result); - calloc.free(myStructs); -} diff --git a/tests/ffi_2/regress_44985_test.dart b/tests/ffi_2/regress_44985_test.dart deleted file mode 100644 index 50fbbef5813..00000000000 --- a/tests/ffi_2/regress_44985_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2021, 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 - -import "dart:ffi"; - -class S2 extends Struct { - Pointer notEmpty; - - Struct s; //# 01: compile-time error -} - -void main() { - S2 s2; -} diff --git a/tests/ffi_2/regress_44986_test.dart b/tests/ffi_2/regress_44986_test.dart deleted file mode 100644 index ab3bac83d3c..00000000000 --- a/tests/ffi_2/regress_44986_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2021, 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 - -import "dart:ffi"; - -class S2 extends Struct { - Pointer notEmpty; - - Null s; //# 01: compile-time error -} - -void main() { - S2 s2; -} diff --git a/tests/ffi_2/regress_45189_test.dart b/tests/ffi_2/regress_45189_test.dart deleted file mode 100644 index 72ac798cd22..00000000000 --- a/tests/ffi_2/regress_45189_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2021, 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 - -import "dart:ffi"; - -import "package:ffi/ffi.dart"; -import 'package:expect/expect.dart'; - -class Struct8BytesInlineArrayInt extends Struct { - @Array(8) - Array a0; -} - -void main() { - final pointer = calloc(); - final array = pointer.ref.a0; - try { - array[8]; // RangeError: Invalid value: Not in inclusive range 0..8: 8 - } on RangeError catch (exception) { - final toString = exception.toString(); - Expect.equals( - "RangeError: Invalid value: Not in inclusive range 0..7: 8", toString); - } - calloc.free(pointer); -} diff --git a/tests/ffi_2/regress_45198_test.dart b/tests/ffi_2/regress_45198_test.dart deleted file mode 100644 index 49fdc26d651..00000000000 --- a/tests/ffi_2/regress_45198_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2021, 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 - -import "dart:ffi"; - -import "package:expect/expect.dart"; -import "package:ffi/ffi.dart"; - -class Struct8BytesInlineArrayInt extends Struct { - @Array(2) - Array> a0; -} - -void main() { - final arrayPointer = calloc(); - - final pointer = Pointer.fromAddress(0xdeadbeef); - - final array = arrayPointer.ref.a0; - print(arrayPointer); - print(array); - Expect.type>>(array); - Expect.equals(nullptr, array[0]); - array[0] = pointer; - Expect.equals(pointer, array[0]); - - calloc.free(arrayPointer); -} diff --git a/tests/ffi_2/regress_45507_test.dart b/tests/ffi_2/regress_45507_test.dart deleted file mode 100644 index d126d4e97ac..00000000000 --- a/tests/ffi_2/regress_45507_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2021, 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 - -import "dart:ffi"; - -import "package:expect/expect.dart"; - -const EIGHT = 8; - -class Struct8BytesInlineArrayInt extends Struct { - @Array(EIGHT) - Array a0; -} - -void main() { - Expect.equals(8, sizeOf()); -} diff --git a/tests/ffi_2/regress_45988_test.dart b/tests/ffi_2/regress_45988_test.dart deleted file mode 100644 index bcb6f4e24d6..00000000000 --- a/tests/ffi_2/regress_45988_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2021, 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 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; -import "package:ffi/ffi.dart"; - -class DartValueFields extends Union { - Pointer p1; - Pointer p2; - Pointer p3; - Pointer p4; -} - -void main() { - final p = calloc(); - Expect.equals(0, p.ref.p4.address); - calloc.free(p); -} diff --git a/tests/ffi_2/regress_46004_test.dart b/tests/ffi_2/regress_46004_test.dart deleted file mode 100644 index 90d8963e3ce..00000000000 --- a/tests/ffi_2/regress_46004_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2021, 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 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; -import "package:ffi/ffi.dart"; - -class COMObject extends Struct { - Pointer lpVtbl; - - // This should not be interpreted as a native field. - Pointer get vtable => Pointer.fromAddress(lpVtbl.value); -} - -void main() { - Expect.equals(sizeOf(), sizeOf()); - - final comObjectPointer = calloc(); - final vTablePointer = calloc(); - vTablePointer.value = 1234; - final comObject = comObjectPointer.ref; - comObject.lpVtbl = vTablePointer; - Expect.equals(1234, comObject.vtable.address); - calloc.free(comObjectPointer); - calloc.free(vTablePointer); -} diff --git a/tests/ffi_2/regress_46085_test.dart b/tests/ffi_2/regress_46085_test.dart deleted file mode 100644 index 8ef31548e5b..00000000000 --- a/tests/ffi_2/regress_46085_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2021, 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 - -import "dart:ffi"; - -class MyStruct extends Struct { - Pointer notEmpty; - - @Array.multi([]) //# 01: compile-time error - Array a0; //# 01: compile-time error - - @Array.multi([1]) //# 02: compile-time error - Array> a1; //# 02: compile-time error -} - -void main() { - MyStruct ms = null; -} diff --git a/tests/ffi_2/regress_46127_test.dart b/tests/ffi_2/regress_46127_test.dart deleted file mode 100644 index b3f5b276bd8..00000000000 --- a/tests/ffi_2/regress_46127_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2021, 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 - -// SharedObjects=ffi_test_functions - -import 'dart:ffi'; - -import "package:expect/expect.dart"; - -import 'dylib_utils.dart'; - -final nativeLib = dlopenPlatformSpecific("ffi_test_functions"); - -class Struct46127 extends Struct { - @Uint64() - int val; -} - -void main() { - final struct = - nativeLib.lookupFunction( - 'Regress46127')(); - Expect.equals(123, struct.val); -} diff --git a/tests/ffi_2/regress_47594_test.dart b/tests/ffi_2/regress_47594_test.dart deleted file mode 100644 index 623b77f32e7..00000000000 --- a/tests/ffi_2/regress_47594_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2021, 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. -// -// Regression test for http://dartbug.com/47594. -// FFI leaf calls did not mark the thread for the transition and would cause -// the stack walker to segfault when it was unable to interpret the frame. -// -// VMOptions=--deterministic --enable-vm-service=0 --profiler --disable-dart-dev - -import 'dart:ffi'; - -import 'package:ffi/ffi.dart'; - -final strerror = DynamicLibrary.process() - .lookupFunction Function(Int32), Pointer Function(int)>( - 'strerror', - isLeaf: true); - -void main() { - for (var i = 0; i < 10000; i++) strerror(0).toDartString(); -} diff --git a/tests/ffi_2/regress_47673_2_test.dart b/tests/ffi_2/regress_47673_2_test.dart deleted file mode 100644 index 2258af8a140..00000000000 --- a/tests/ffi_2/regress_47673_2_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2021, 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. -// -// SharedObjects=ffi_test_functions - -// @dart=2.9 - -import 'dart:ffi'; - -class A extends Struct { - @Array.multi([16]) - Array a; - - // This should not crash the FFI transform. - @Array.multi([16]) //# 1: compile-time error - Array b; //# 1: compile-time error -} - -main() {} diff --git a/tests/ffi_2/regress_47673_test.dart b/tests/ffi_2/regress_47673_test.dart deleted file mode 100644 index 9044ed5c670..00000000000 --- a/tests/ffi_2/regress_47673_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2021, 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. -// -// SharedObjects=ffi_test_functions - -// @dart=2.9 - -import 'dart:ffi'; - -typedef T = Int64; //# 1: compile-time error - -class A extends Struct { - @Array.multi([16]) - Array a; - - // In language version 2.12 we do not support non-function typedefs. - // This should not crash the FFI transform. - @Array.multi([16]) //# 1: compile-time error - Array b; //# 1: compile-time error -} - -main() {} diff --git a/tests/ffi_2/regress_49402_test.dart b/tests/ffi_2/regress_49402_test.dart deleted file mode 100644 index e9a71ba7512..00000000000 --- a/tests/ffi_2/regress_49402_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2022, 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 - -import 'dart:ffi'; - -class A implements Finalizable {} - -void b([A a]) {} - -void main() { - b(); -} diff --git a/tests/ffi_2/regress_51315_test.dart b/tests/ffi_2/regress_51315_test.dart deleted file mode 100644 index 8706539333d..00000000000 --- a/tests/ffi_2/regress_51315_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2023, 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 - -// VMOptions=--deterministic --optimization-counter-threshold=100 - -import 'dart:ffi'; - -import "package:ffi/ffi.dart"; - -main(List arguments) { - for (int i = 0; i < 1000; i++) { - testCompoundLoadAndStore(); - } - print('done'); -} - -const count = 10; - -testCompoundLoadAndStore() { - final foos = calloc(count); - final reference = foos.ref; - reference.a = count; - - for (var j = 1; j < count; j++) { - final foo = foos.elementAt(j); - foo.ref = reference; - } - - calloc.free(foos); -} - -class Foo extends Struct { - @Int8() - int a; -} diff --git a/tests/ffi_2/regress_b_261224444_test.dart b/tests/ffi_2/regress_b_261224444_test.dart deleted file mode 100644 index 44524fab014..00000000000 --- a/tests/ffi_2/regress_b_261224444_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2022, 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 - -import 'dart:ffi'; - -import 'ffi_test_helpers.dart'; - -main() { - // Ensure we have FfiTrampolineData in heap. - final malloc = DynamicLibrary.process() - .lookup Function(IntPtr)>>("malloc") - .asFunction Function(int)>(); - print(malloc); - - triggerGc(); - - final pointer = malloc(100); - - print(pointer.address); - - final free = DynamicLibrary.process() - .lookupFunction('free'); - free(pointer); -} diff --git a/tests/ffi_2/regress_flutter79441_test.dart b/tests/ffi_2/regress_flutter79441_test.dart deleted file mode 100644 index 2bce29c8fc1..00000000000 --- a/tests/ffi_2/regress_flutter79441_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2021, 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 - -// Regression test for https://github.com/flutter/flutter/issues/79441. - -import 'dart:ffi'; - -// FFI signature -typedef _dart_memset = void Function(Pointer, int, int); -typedef _c_memset = Void Function(Pointer, Int32, IntPtr); - -_dart_memset fbMemset; - -void _fallbackMemset(Pointer ptr, int byte, int size) { - final bytes = ptr.cast(); - for (var i = 0; i < size; i++) { - bytes[i] = byte; - } -} - -void main() { - try { - fbMemset = DynamicLibrary.process() - .lookupFunction<_c_memset, _dart_memset>('memset'); - } catch (_) { - // This works: - // fbMemset = _fallbackMemset; - - // This doesn't: /aot/precompiler.cc: 2761: error: unreachable code - fbMemset = (Pointer ptr, int byte, int size) { - final bytes = ptr.cast(); - for (var i = 0; i < size; i++) { - bytes[i] = byte; - } - }; - } -} diff --git a/tests/ffi_2/regress_flutter97301_test.dart b/tests/ffi_2/regress_flutter97301_test.dart deleted file mode 100644 index 83f97c769b3..00000000000 --- a/tests/ffi_2/regress_flutter97301_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2022, 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. -// -// Verifies that there are no deoptimizing IntConverter instructions -// used when converting Pointer to TypedData. -// Regression test for https://github.com/flutter/flutter/issues/97301. - -// @dart = 2.9 - -import "dart:ffi"; -import "package:ffi/ffi.dart"; - -@pragma("vm:never-inline") -Pointer foo() => calloc(4); - -main() { - final Pointer offsetsPtr = foo(); - - for (var i = 0; i < 2; i++) { - print(offsetsPtr.asTypedList(1)); - } - - calloc.free(offsetsPtr); -} diff --git a/tests/ffi_2/regress_jump_to_frame_test.dart b/tests/ffi_2/regress_jump_to_frame_test.dart deleted file mode 100644 index 7ff59f8c7c4..00000000000 --- a/tests/ffi_2/regress_jump_to_frame_test.dart +++ /dev/null @@ -1,66 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Check that JumpToFrame does not use LR clobbered by slow path of -// TransitionNativeToGenerated. -// VMOptions=--use-slow-path - -import 'dart:ffi'; - -import 'package:ffi/ffi.dart'; -import 'package:expect/expect.dart'; - -typedef CallbackDartType = Object Function(); -typedef CallbackNativeType = Handle Function(); - -Object alwaysThrows() { - throw 'exception'; -} - -void alwaysCatches(CallbackDartType f) { - try { - propagateError(f()); - } catch (e) { - Expect.equals('exception', e); - return; - } - Expect.isTrue(false); -} - -void main() { - final ptr = Pointer.fromFunction(alwaysThrows); - final f = ptr.asFunction(); - alwaysCatches(f); -} - -typedef Dart_PropagateError_NativeType = Void Function(Handle); -typedef Dart_PropagateError_DartType = void Function(Object); - -final Dart_PropagateError_DartType propagateError = () { - final Pointer<_DartApi> dlapi = NativeApi.initializeApiDLData.cast(); - for (int i = 0; dlapi.ref.functions[i].name != nullptr; i++) { - final name = dlapi.ref.functions[i].name.cast().toDartString(); - if (name == 'Dart_PropagateError') { - return dlapi.ref.functions[i].function - .cast>() - .asFunction(); - } - } - throw 'Not found'; -}(); - -class _DartEntry extends Struct { - Pointer name; - Pointer function; -} - -class _DartApi extends Struct { - @Int32() - int major; - @Int32() - int minor; - Pointer<_DartEntry> functions; -} diff --git a/tests/ffi_2/sizeof_test.dart b/tests/ffi_2/sizeof_test.dart deleted file mode 100644 index ec65d593c82..00000000000 --- a/tests/ffi_2/sizeof_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// 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. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; - -import "coordinate.dart"; - -get is32Bit => 4 == sizeOf(); -get is64Bit => 8 == sizeOf(); - -void main() async { - if (is32Bit) { - Expect.equals(4, sizeOf()); - // Struct is 20 bytes on ia32 and arm32-iOS, but 24 bytes on arm32-Android - // and arm32-Linux due to alignment. - Expect.isTrue(20 == sizeOf() || 24 == sizeOf()); - } else if (is64Bit) { - Expect.equals(8, sizeOf()); - Expect.equals(24, sizeOf()); - } - Expect.throws(() => sizeOf()); -} diff --git a/tests/ffi_2/snapshot_test.dart b/tests/ffi_2/snapshot_test.dart deleted file mode 100644 index 0452b5b3285..00000000000 --- a/tests/ffi_2/snapshot_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Checks that the VM throws an appropriate exception when FFI objects are -// passed between isolates. - -import 'dart:ffi'; -import 'dart:isolate'; - -import 'package:expect/expect.dart'; - -main(args) async { - try { - await Isolate.spawn(print, Pointer.fromAddress(1)); - } catch (e) { - Expect.type(e); - return; - } - - throw "Test didn't throw an exception!"; -} diff --git a/tests/ffi_2/stacktrace_regress_37910_test.dart b/tests/ffi_2/stacktrace_regress_37910_test.dart deleted file mode 100644 index 3ef8376bd34..00000000000 --- a/tests/ffi_2/stacktrace_regress_37910_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// 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. -// -// VMOptions=--stacktrace_every=100 - -// @dart = 2.9 - -import 'dart:ffi' as ffi; - -typedef fooFfi1Type = ffi.Int32 Function(); -int fooFfi1() { - int a = 0; - for (int i = 0; i < 1000; ++i) { - a += i; - } - return a; -} - -int Function() foo1 = ffi.Pointer.fromFunction(fooFfi1, 0) - .cast>() - .asFunction(); - -main() { - foo1(); -} diff --git a/tests/ffi_2/structs_nested_test.dart b/tests/ffi_2/structs_nested_test.dart deleted file mode 100644 index 40e8090591e..00000000000 --- a/tests/ffi_2/structs_nested_test.dart +++ /dev/null @@ -1,105 +0,0 @@ -// 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. -// -// This tests the non trampoline aspects of nested structs. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; -import "package:ffi/ffi.dart"; - -import 'dylib_utils.dart'; - -final ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); -void main() { - for (int i = 0; i < 10; ++i) { - testSizeOf(); - testAllocate(); - testRead(); - testWrite(); - testCopy(); - } -} - -class Struct4BytesHomogeneousInt16 extends Struct { - @Int16() - int a0; - - @Int16() - int a1; - - String toString() => "(${a0}, ${a1})"; -} - -class Struct8BytesNestedInt extends Struct { - Struct4BytesHomogeneousInt16 a0; - - Struct4BytesHomogeneousInt16 a1; - - String toString() => "(${a0}, ${a1})"; -} - -void testSizeOf() { - print(sizeOf()); - Expect.equals(8, sizeOf()); -} - -void testAllocate() { - final p = calloc(); - Expect.type>(p); - print(p); - calloc.free(p); -} - -/// Test that reading does not segfault, even uninitialized. -void testRead() { - print("read"); - final p = calloc(); - print(p); - print(p.ref.runtimeType); - print(p.address); - print(p.ref.a0.runtimeType); - print(p.ref.a0.a0); - calloc.free(p); - print("read"); -} - -void testWrite() { - print("write"); - final p = calloc(2); - p[0].a0.a0 = 12; - p[0].a0.a1 = 13; - p[0].a1.a0 = 14; - p[0].a1.a1 = 15; - p[1].a0.a0 = 16; - p[1].a0.a1 = 17; - p[1].a1.a0 = 18; - p[1].a1.a1 = 19; - Expect.equals(12, p[0].a0.a0); - Expect.equals(13, p[0].a0.a1); - Expect.equals(14, p[0].a1.a0); - Expect.equals(15, p[0].a1.a1); - Expect.equals(16, p[1].a0.a0); - Expect.equals(17, p[1].a0.a1); - Expect.equals(18, p[1].a1.a0); - Expect.equals(19, p[1].a1.a1); - calloc.free(p); - print("written"); -} - -void testCopy() { - print("copy"); - final p = calloc(); - p.ref.a0.a0 = 12; - p.ref.a0.a1 = 13; - p.ref.a1 = p.ref.a0; - Expect.equals(12, p.ref.a1.a0); - Expect.equals(13, p.ref.a1.a1); - calloc.free(p); - print("copied"); -} diff --git a/tests/ffi_2/structs_packed_test.dart b/tests/ffi_2/structs_packed_test.dart deleted file mode 100644 index 6834ee7f183..00000000000 --- a/tests/ffi_2/structs_packed_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2021, 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. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; - -import 'dylib_utils.dart'; - -// Reuse compound definitions. -import 'function_structs_by_value_generated_compounds.dart'; - -void main() { - testSizeOfC(); - testSizeOfDart(); -} - -final ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); - -final sizeOfStruct3BytesPackedInt = - ffiTestFunctions.lookupFunction( - "SizeOfStruct3BytesPackedInt"); - -void testSizeOfC() { - Expect.equals(3, sizeOfStruct3BytesPackedInt()); -} - -void testSizeOfDart() { - // No packing needed to get to 3 bytes. - Expect.equals(3, sizeOf()); - - // Contents 3 bytes, but alignment forces it to be 4 bytes. - Expect.equals(4, sizeOf()); - - // Alignment gets the same content back to 3 bytes. - Expect.equals(3, sizeOf()); -} diff --git a/tests/ffi_2/structs_test.dart b/tests/ffi_2/structs_test.dart deleted file mode 100644 index 813acaa34f6..00000000000 --- a/tests/ffi_2/structs_test.dart +++ /dev/null @@ -1,148 +0,0 @@ -// 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. -// -// Dart test program for testing dart:ffi struct pointers. -// -// VMOptions=--deterministic --optimization-counter-threshold=50 - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; -import "package:ffi/ffi.dart"; - -import 'coordinate.dart'; - -void main() { - for (int i = 0; i < 100; i++) { - testStructAllocate(); - testStructFromAddress(); - testStructIndexedAccess(); - testStructWithNulls(); - testTypeTest(); - testUtf8(); - testDotDotRef(); - } -} - -/// Allocates each coordinate separately in c memory. -void testStructAllocate() { - final c1 = calloc() - ..ref.x = 10.0 - ..ref.y = 10.0; - final c2 = calloc() - ..ref.x = 20.0 - ..ref.y = 20.0 - ..ref.next = c1; - final c3 = calloc() - ..ref.x = 30.0 - ..ref.y = 30.0 - ..ref.next = c2; - c1.ref.next = c3; - - Coordinate currentCoordinate = c1.ref; - Expect.equals(10.0, currentCoordinate.x); - currentCoordinate = currentCoordinate.next.ref; - Expect.equals(30.0, currentCoordinate.x); - currentCoordinate = currentCoordinate.next.ref; - Expect.equals(20.0, currentCoordinate.x); - currentCoordinate = currentCoordinate.next.ref; - Expect.equals(10.0, currentCoordinate.x); - - calloc.free(c1); - calloc.free(c2); - calloc.free(c3); -} - -/// Allocates coordinates consecutively in c memory. -void testStructFromAddress() { - Pointer c1 = calloc(3); - Pointer c2 = c1.elementAt(1); - Pointer c3 = c1.elementAt(2); - c1.ref - ..x = 10.0 - ..y = 10.0 - ..next = c3; - c2.ref - ..x = 20.0 - ..y = 20.0 - ..next = c1; - c3.ref - ..x = 30.0 - ..y = 30.0 - ..next = c2; - - Coordinate currentCoordinate = c1.ref; - Expect.equals(10.0, currentCoordinate.x); - currentCoordinate = currentCoordinate.next.ref; - Expect.equals(30.0, currentCoordinate.x); - currentCoordinate = currentCoordinate.next.ref; - Expect.equals(20.0, currentCoordinate.x); - currentCoordinate = currentCoordinate.next.ref; - Expect.equals(10.0, currentCoordinate.x); - - calloc.free(c1); -} - -/// Allocates coordinates consecutively in c memory. -void testStructIndexedAccess() { - Pointer cs = calloc(3); - cs[0] - ..x = 10.0 - ..y = 10.0 - ..next = cs.elementAt(2); - cs[1] - ..x = 20.0 - ..y = 20.0 - ..next = cs; - cs[2] - ..x = 30.0 - ..y = 30.0 - ..next = cs.elementAt(1); - - Coordinate currentCoordinate = cs.ref; - Expect.equals(10.0, currentCoordinate.x); - currentCoordinate = currentCoordinate.next.ref; - Expect.equals(30.0, currentCoordinate.x); - currentCoordinate = currentCoordinate.next.ref; - Expect.equals(20.0, currentCoordinate.x); - currentCoordinate = currentCoordinate.next.ref; - Expect.equals(10.0, currentCoordinate.x); - - calloc.free(cs); -} - -void testStructWithNulls() { - final coordinate = calloc() - ..ref.x = 10.0 - ..ref.y = 10.0; - Expect.equals(coordinate.ref.next, nullptr); - coordinate.ref.next = coordinate; - Expect.notEquals(coordinate.ref.next, nullptr); - coordinate.ref.next = nullptr; - Expect.equals(coordinate.ref.next, nullptr); - calloc.free(coordinate); -} - -void testTypeTest() { - final pointer = calloc(); - Coordinate c = pointer.ref; - Expect.isTrue(c is Struct); - calloc.free(pointer); -} - -void testUtf8() { - final String test = 'Hasta Mañana'; - final Pointer medium = test.toNativeUtf8(); - Expect.equals(test, medium.toDartString()); - calloc.free(medium); -} - -void testDotDotRef() { - final pointer = calloc() - ..ref.x = 1 - ..ref.y = 1; - calloc.free(pointer); -} diff --git a/tests/ffi_2/unaligned_test.dart b/tests/ffi_2/unaligned_test.dart deleted file mode 100644 index 27405ebd0a2..00000000000 --- a/tests/ffi_2/unaligned_test.dart +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2021, 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 - -// This tests exercises misaligned reads/writes on memory. -// -// The only architecture on which this is known to fail is arm32 on Android. - -import 'dart:ffi'; -import 'dart:io'; - -import 'package:expect/expect.dart'; -import 'package:ffi/ffi.dart'; - -void main() { - print("hello"); - testUnalignedInt16(); //# 01: ok - testUnalignedInt32(); //# 02: ok - testUnalignedInt64(); //# 03: ok - if (!Platform.isAndroid || sizeOf() == 8) { - // TODO(http://dartbug.com/45009): Support unaligned reads/writes on - // Android arm32. - testUnalignedFloat(); //# 04: ok - testUnalignedDouble(); //# 05: ok - } - _freeAll(); -} - -void testUnalignedInt16() { - final pointer = _allocateUnaligned(); - pointer.value = 20; - Expect.equals(20, pointer.value); -} - -void testUnalignedInt32() { - final pointer = _allocateUnaligned(); - pointer.value = 20; - Expect.equals(20, pointer.value); -} - -void testUnalignedInt64() { - final pointer = _allocateUnaligned(); - pointer.value = 20; - Expect.equals(20, pointer.value); -} - -void testUnalignedFloat() { - final pointer = _allocateUnaligned(); - pointer.value = 20.0; - Expect.approxEquals(20.0, pointer.value); -} - -void testUnalignedDouble() { - final pointer = _allocateUnaligned(); - pointer.value = 20.0; - Expect.equals(20.0, pointer.value); -} - -final Set _pool = {}; - -void _freeAll() { - for (final pointer in _pool) { - calloc.free(pointer); - } -} - -/// Up to `size() == 8`. -Pointer _allocateUnaligned() { - final pointer = calloc(16); - _pool.add(pointer); - final misaligned = pointer.elementAt(1).cast(); - Expect.equals(1, misaligned.address % 2); - return misaligned; -} diff --git a/tests/ffi_2/variance_function_test.dart b/tests/ffi_2/variance_function_test.dart deleted file mode 100644 index 27ebc93c95d..00000000000 --- a/tests/ffi_2/variance_function_test.dart +++ /dev/null @@ -1,239 +0,0 @@ -// 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. -// -// VMOptions= -// VMOptions=--deterministic --optimization-counter-threshold=90 -// VMOptions=--use-slow-path -// SharedObjects=ffi_test_functions -// -// This file tests subtyping relationships (at compile time and at runtime) of -// parameters and return types of ffi trampolines and ffi callback trampolines. - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; -import "package:ffi/ffi.dart"; - -import 'dylib_utils.dart'; - -typedef Int64PointerParamOpDart = void Function(Pointer); -typedef Int64PointerParamOp = Void Function(Pointer); -typedef NaTyPointerParamOpDart = void Function(Pointer); -typedef NaTyPointerParamOp = Void Function(Pointer); -typedef Int64PointerReturnOp = Pointer Function(); -typedef NaTyPointerReturnOp = Pointer Function(); - -final paramOpName = "NativeTypePointerParam"; -final returnOpName = "NativeTypePointerReturn"; - -final DynamicLibrary ffiTestFunctions = - dlopenPlatformSpecific("ffi_test_functions"); - -// ============================================= -// Tests calls from Dart to native (asFunction). -// ============================================= - -void paramInvariant1() { - final fp = - ffiTestFunctions.lookup>(paramOpName); - final f = fp.asFunction(); - final arg = calloc(); - f(arg); - calloc.free(arg); -} - -void paramInvariant2() { - final fp = - ffiTestFunctions.lookup>(paramOpName); - final f = fp.asFunction(); - final arg = calloc().cast(); - Expect.type>(arg); - f(arg); - calloc.free(arg); -} - -// Pass a statically and dynamically subtyped argument. -void paramSubtype1() { - final fp = - ffiTestFunctions.lookup>(paramOpName); - final f = fp.asFunction(); - final arg = calloc(); - Expect.type>(arg); - f(arg); - calloc.free(arg); -} - -// Pass a statically subtyped but dynamically invariant argument. -void paramSubtype2() { - final fp = - ffiTestFunctions.lookup>(paramOpName); - final f = fp.asFunction(); - final Pointer arg = calloc(); - Expect.type>(arg); - f(arg); - calloc.free(arg); -} - -void returnInvariant1() { - final fp = ffiTestFunctions - .lookup>(returnOpName); - final f = fp.asFunction(); - final result = f(); - Expect.type>(result); -} - -void returnInvariant2() { - final fp = ffiTestFunctions - .lookup>(returnOpName); - final f = fp.asFunction(); - final result = f(); - Expect.type>(result); -} - -void returnSubtype() { - final fp = ffiTestFunctions - .lookup>(returnOpName); - final f = fp.asFunction(); - final NaTyPointerReturnOp f2 = f; - Expect.type(f2); - final result = f2(); - Expect.type>(result); -} - -void functionArgumentVariance() { - final p = Pointer< - NativeFunction< - Pointer Function(Pointer)>> Function( - Pointer< - NativeFunction< - Pointer Function( - Pointer)>>)>>.fromAddress(0x1234); - final f = p.asFunction< - Pointer Function(Pointer)>> Function( - Pointer< - NativeFunction Function(Pointer)>>)>(); -} - -void asFunctionTests() { - for (int i = 0; i < 100; ++i) { - paramInvariant1(); // Parameter invariant: Pointer. - paramInvariant2(); // Parameter invariant: Pointer. - paramSubtype1(); // Parameter statically and dynamically subtyped. - paramSubtype2(); // Parameter statically invariant, dynamically subtyped. - returnInvariant1(); // Return value invariant: Pointer. - returnInvariant2(); // Return value invariant: Pointer. - returnSubtype(); // Return value static subtyped, dynamically invariant. - functionArgumentVariance(); // Check nested function signatures. - } -} - -// ======================================================= -// Test with callbacks from native to Dart (fromFunction). -// ======================================================= - -typedef CallbackInt64PointerParamOpDart = void Function( - Pointer>); -typedef CallbackInt64PointerParamOp = Void Function( - Pointer>); - -typedef CallbackNaTyPointerParamOpDart = void Function( - Pointer>); -typedef CallbackNaTyPointerParamOp = Void Function( - Pointer>); - -typedef CallbackInt64PointerReturnOpDart = void Function( - Pointer>); -typedef CallbackInt64PointerReturnOp = Void Function( - Pointer>); - -typedef CallbackNaTyPointerReturnOpDart = void Function( - Pointer>); -typedef CallbackNaTyPointerReturnOp = Void Function( - Pointer>); - -final callbackParamOpName = "CallbackNativeTypePointerParam"; -final callbackReturnOpName = "CallbackNativeTypePointerReturn"; - -void int64PointerParamOp(Pointer p) { - p.value = 42; -} - -void naTyPointerParamOp(Pointer p) { - final Pointer asInt8 = p.cast(); - asInt8.value = 42; -} - -// Pointer to return to C when C calls back into Dart and asks for a Pointer. -Pointer data; - -Pointer int64PointerReturnOp() { - return data; -} - -Pointer naTyPointerReturnOp() { - return data; -} - -void callbackParamInvariant1() { - final callback = ffiTestFunctions.lookupFunction(callbackParamOpName); - final fp = Pointer.fromFunction(int64PointerParamOp); - callback(fp); -} - -void callbackParamInvariant2() { - final callback = ffiTestFunctions.lookupFunction(callbackParamOpName); - final fp = Pointer.fromFunction(naTyPointerParamOp); - callback(fp); -} - -void callbackParamImplicitDowncast1() { - final callback = ffiTestFunctions.lookupFunction(callbackParamOpName); - final fp = Pointer.fromFunction(int64PointerParamOp); - // Pointer type arguments are not reified, any cast will succeed. - callback(fp); -} - -void callbackParamSubtype1() { - final callback = ffiTestFunctions.lookupFunction(callbackParamOpName); - final fp = Pointer.fromFunction(int64PointerParamOp); - callback(fp); -} - -void callbackReturnInvariant1() { - final callback = ffiTestFunctions.lookupFunction(callbackReturnOpName); - final fp = Pointer.fromFunction(int64PointerReturnOp); - callback(fp); -} - -void callbackReturnInvariant2() { - final callback = ffiTestFunctions.lookupFunction(callbackReturnOpName); - final fp = Pointer.fromFunction(naTyPointerReturnOp); - callback(fp); -} - -void fromFunctionTests() { - data = calloc(); - for (int i = 0; i < 100; ++i) { - callbackParamInvariant1(); // Pointer invariant - callbackParamInvariant2(); // Pointer invariant - callbackParamImplicitDowncast1(); // static and dynamically supertyped - callbackParamSubtype1(); // static and dynamically subtyped - callbackReturnInvariant1(); // Pointer invariant - callbackReturnInvariant2(); // Pointer invariant - } - calloc.free(data); -} - -void main() { - asFunctionTests(); - fromFunctionTests(); -} diff --git a/tests/ffi_2/very_large_struct.dart b/tests/ffi_2/very_large_struct.dart deleted file mode 100644 index 16ce9adeb12..00000000000 --- a/tests/ffi_2/very_large_struct.dart +++ /dev/null @@ -1,53 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:ffi'; - -/// Large sample struct for dart:ffi library. -class VeryLargeStruct extends Struct { - @Int8() - int a; - - @Int16() - int b; - - @Int32() - int c; - - @Int64() - int d; - - @Uint8() - int e; - - @Uint16() - int f; - - @Uint32() - int g; - - @Uint64() - int h; - - @IntPtr() - int i; - - @Double() - double j; - - @Float() - double k; - - Pointer parent; - - @IntPtr() - int numChildren; - - Pointer children; - - @Int8() - int smallLastField; -} diff --git a/tests/ffi_2/vmspecific_dynamic_library_test.dart b/tests/ffi_2/vmspecific_dynamic_library_test.dart deleted file mode 100644 index 5cdd035392f..00000000000 --- a/tests/ffi_2/vmspecific_dynamic_library_test.dart +++ /dev/null @@ -1,89 +0,0 @@ -// 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. -// -// Dart test program for testing dart:ffi dynamic library loading. -// -// SharedObjects=ffi_test_dynamic_library ffi_test_functions - -// @dart = 2.9 - -import 'dart:io'; -import 'dart:ffi'; - -import 'package:expect/expect.dart'; - -import 'dylib_utils.dart'; - -void main() { - testOpen(); - testOpenError(); - testLookup(); - testLookupError(); - testToString(); - testEquality(); - testHandle(); -} - -void testOpen() { - DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library"); -} - -void testOpenError() { - Expect.throws( - () => dlopenPlatformSpecific("doesnotexistforsurelibrary123409876")); -} - -typedef NativeDoubleUnOp = Double Function(Double); - -typedef DoubleUnOp = double Function(double); - -void testLookup() { - final l = dlopenPlatformSpecific("ffi_test_dynamic_library"); - var timesFour = l.lookupFunction("timesFour"); - Expect.approxEquals(12.0, timesFour(3)); - - final p = DynamicLibrary.process(); - if (Platform.isWindows) { - Expect.isTrue(p.lookup("HeapAlloc") != nullptr); - Expect.isTrue(p.lookup("CoTaskMemAlloc") != nullptr); - } else { - // Lookup a symbol from 'libc' since it's loaded with global visibility. - Expect.isTrue(p.lookup("strcmp") != nullptr); - } - - final e = DynamicLibrary.executable(); - Expect.isTrue(e.lookup("Dart_Invoke") != nullptr); -} - -void testLookupError() { - DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library"); - Expect.throws(() => l.lookupFunction( - "functionnamethatdoesnotexistforsure749237593845")); -} - -void testToString() { - DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library"); - Expect.stringEquals( - "DynamicLibrary: handle=0x", l.toString().substring(0, 25)); -} - -void testEquality() { - DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library"); - DynamicLibrary l2 = dlopenPlatformSpecific("ffi_test_dynamic_library"); - Expect.equals(l, l2); - Expect.equals(l.hashCode, l2.hashCode); - DynamicLibrary l3 = dlopenPlatformSpecific("ffi_test_functions"); - Expect.notEquals(l, l3); -} - -void testHandle() { - DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library"); - DynamicLibrary l2 = dlopenPlatformSpecific("ffi_test_dynamic_library"); - Pointer h = l.handle; - Pointer h2 = l2.handle; - Expect.equals(h, h2); - DynamicLibrary l3 = dlopenPlatformSpecific("ffi_test_functions"); - Pointer h3 = l3.handle; - Expect.notEquals(h, h3); -} diff --git a/tests/ffi_2/vmspecific_enable_ffi_test.dart b/tests/ffi_2/vmspecific_enable_ffi_test.dart deleted file mode 100644 index 0381db353ef..00000000000 --- a/tests/ffi_2/vmspecific_enable_ffi_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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. -// -// Dart test program for testing the --enable-ffi=false flag. -// -// VMOptions=--enable-ffi=false - -// @dart = 2.9 - -import 'dart:ffi'; //# 01: compile-time error - -import 'package:ffi/ffi.dart'; //# 01: compile-time error - -void main() { - Pointer p = //# 01: compile-time error - calloc(); //# 01: compile-time error - print(p.address); //# 01: compile-time error - calloc.free(p); //# 01: compile-time error -} diff --git a/tests/ffi_2/vmspecific_function_callbacks_exit_test.dart b/tests/ffi_2/vmspecific_function_callbacks_exit_test.dart deleted file mode 100644 index ec8c8b57474..00000000000 --- a/tests/ffi_2/vmspecific_function_callbacks_exit_test.dart +++ /dev/null @@ -1,66 +0,0 @@ -// 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. -// -// Dart test program for testing dart:ffi function pointers with callbacks. -// -// VMOptions= -// VMOptions=--use-slow-path -// SharedObjects=ffi_test_functions - -// @dart = 2.9 -import 'dart:io'; -import 'dart:ffi'; -import 'dart:isolate'; - -import "package:expect/expect.dart"; - -import 'callback_tests_utils.dart'; -import 'dylib_utils.dart'; - -final testLibrary = dlopenPlatformSpecific("ffi_test_functions"); - -typedef ReturnVoid = Void Function(); -void returnVoid() {} -testCallbackWrongThread() { - print("Test CallbackWrongThread."); - CallbackTest( - "CallbackWrongThread", Pointer.fromFunction(returnVoid)) - .run(); -} - -testCallbackOutsideIsolate() { - print("Test CallbackOutsideIsolate."); - CallbackTest("CallbackOutsideIsolate", - Pointer.fromFunction(returnVoid)) - .run(); -} - -isolateHelper(int callbackPointer) { - final Pointer ptr = Pointer.fromAddress(callbackPointer); - final NativeCallbackTestFn tester = - testLibrary.lookupFunction( - "TestCallbackWrongIsolate"); - Expect.equals(0, tester(ptr)); -} - -testCallbackWrongIsolate() async { - final int callbackPointer = - Pointer.fromFunction(returnVoid).address; - final ReceivePort exitPort = ReceivePort(); - await Isolate.spawn(isolateHelper, callbackPointer, - errorsAreFatal: true, onExit: exitPort.sendPort); - await exitPort.first; -} - -void main() async { - // These tests terminate the process after successful completion, so we have - // to run them separately. - // - // Since they use signal handlers they only run on Linux. - if (Platform.isLinux && !const bool.fromEnvironment("dart.vm.product")) { - testCallbackWrongThread(); //# 01: ok - testCallbackOutsideIsolate(); //# 02: ok - await testCallbackWrongIsolate(); //# 03: ok - } -} diff --git a/tests/ffi_2/vmspecific_function_callbacks_negative_test.dart b/tests/ffi_2/vmspecific_function_callbacks_negative_test.dart deleted file mode 100644 index f832e0fbf34..00000000000 --- a/tests/ffi_2/vmspecific_function_callbacks_negative_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// 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. -// -// Dart test program for testing dart:ffi function pointers with callbacks. - -// @dart = 2.9 - -import 'dart:ffi'; - -import 'dylib_utils.dart'; - -final DynamicLibrary testLibrary = dlopenPlatformSpecific("ffi_test_functions"); - -// Correct type of exceptionalReturn argument to Pointer.fromFunction. -double testExceptionalReturn() { - Pointer.fromFunction(returnVoid, null); //# 59: compile-time error - Pointer.fromFunction(returnVoid, 0); //# 60: compile-time error - Pointer.fromFunction(testExceptionalReturn, "abc"); //# 61: compile-time error - Pointer.fromFunction(testExceptionalReturn, 0); //# 62: compile-time error - Pointer.fromFunction(testExceptionalReturn); //# 63: compile-time error - - return 0.0; // not used -} - -void main() { - testExceptionalReturn(); -} diff --git a/tests/ffi_2/vmspecific_function_callbacks_test.dart b/tests/ffi_2/vmspecific_function_callbacks_test.dart deleted file mode 100644 index 63bcc6775f7..00000000000 --- a/tests/ffi_2/vmspecific_function_callbacks_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Dart test program for testing dart:ffi function pointers with callbacks. -// -// SharedObjects=ffi_test_functions -// VMOptions=--stacktrace-every=100 -// VMOptions=--use-slow-path -// VMOptions=--use-slow-path --stacktrace-every=100 -// VMOptions=--use-slow-path --write-protect-code --no-dual-map-code -// VMOptions=--use-slow-path --write-protect-code --no-dual-map-code --stacktrace-every=100 -// VMOptions=--write-protect-code --no-dual-map-code -// VMOptions=--write-protect-code --no-dual-map-code --stacktrace-every=100 - -import 'dart:ffi'; - -import 'ffi_test_helpers.dart'; -import 'callback_tests_utils.dart'; -import 'dylib_utils.dart'; - -typedef ReturnVoid = Void Function(); - -final testLibrary = dlopenPlatformSpecific("ffi_test_functions"); - -void testGC() { - triggerGc(); -} - -typedef WaitForHelperNative = Void Function(Pointer); -typedef WaitForHelper = void Function(Pointer); - -void waitForHelper(Pointer helper) { - print("helper: $helper"); - testLibrary.lookupFunction( - "WaitForHelper")(helper); -} - -final testcases = [ - CallbackTest("GC", Pointer.fromFunction(testGC)), - CallbackTest("UnprotectCode", - Pointer.fromFunction(waitForHelper)), -]; - -const double zeroPointZero = 0.0; - -// Correct type of exceptionalReturn argument to Pointer.fromFunction. -double testExceptionalReturn() { - Pointer.fromFunction(testExceptionalReturn, 0.0); - Pointer.fromFunction(testExceptionalReturn, zeroPointZero); - - return 0.0; -} - -void main() { - testExceptionalReturn(); - - testcases.forEach((t) => t.run()); -} diff --git a/tests/ffi_2/vmspecific_function_gc_test.dart b/tests/ffi_2/vmspecific_function_gc_test.dart deleted file mode 100644 index 462601bf93b..00000000000 --- a/tests/ffi_2/vmspecific_function_gc_test.dart +++ /dev/null @@ -1,123 +0,0 @@ -// 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. -// -// VMOptions=--deterministic --optimization-counter-threshold=500 -// VMOptions=--deterministic --optimization-counter-threshold=-1 -// VMOptions=--deterministic --optimization-counter-threshold=500 --no-dual-map-code --write-protect-code -// VMOptions=--deterministic --optimization-counter-threshold=-1 --no-dual-map-code --write-protect-code -// VMOptions=--no-dual-map-code --write-protect-code -// VMOptions=--no-dual-map-code --write-protect-code --stacktrace-every=100 -// -// Dart test program for stress-testing boxing and GC in return paths from FFI -// trampolines. -// -// NOTE: This test does not produce useful stderr when it fails because the -// stderr is redirected to a file for reflection. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi' as ffi; -import "package:expect/expect.dart"; -import 'ffi_test_helpers.dart'; - -main() async { - testBoxInt64(); - testBoxInt32(); - testBoxDouble(); - testBoxPointer(); - testAllocateInNative(); - testRegress37069(); - testWriteProtection(); -} - -typedef NativeNullaryOp64 = ffi.Int64 Function(); -typedef NativeNullaryOp32 = ffi.Int32 Function(); -typedef NativeNullaryOpDouble = ffi.Double Function(); -typedef NativeNullaryOpPtr = ffi.Pointer Function(); -typedef NativeUnaryOp = ffi.Void Function(ffi.Uint64); -typedef NativeUndenaryOp = ffi.Uint64 Function( - ffi.Uint64, - ffi.Uint64, - ffi.Uint64, - ffi.Uint64, - ffi.Uint64, - ffi.Uint64, - ffi.Uint64, - ffi.Uint64, - ffi.Uint64, - ffi.Uint64, - ffi.Uint64); -typedef NullaryOp = int Function(); -typedef NullaryOpDbl = double Function(); -typedef NullaryOpPtr = ffi.Pointer Function(); -typedef UnaryOp = void Function(int); -typedef UndenaryOp = int Function( - int, int, int, int, int, int, int, int, int, int, int); - -//// These functions return values that require boxing into different types. - -final minInt64 = - ffiTestFunctions.lookupFunction("MinInt64"); - -// Forces boxing into Mint on all platforms. -void testBoxInt64() { - Expect.equals(0x8000000000000000, minInt64()); -} - -NullaryOp minInt32 = - ffiTestFunctions.lookupFunction("MinInt32"); - -// Forces boxing into Mint on 32-bit platforms only. -void testBoxInt32() { - Expect.equals(-0x80000000, minInt32()); -} - -final smallDouble = ffiTestFunctions - .lookupFunction("SmallDouble"); - -// Forces boxing into Double. -void testBoxDouble() { - Expect.equals(0x80000000 * -1.0, smallDouble()); -} - -final largePointer = ffiTestFunctions - .lookupFunction("LargePointer"); - -// Forces boxing into ffi.Pointer and ffi.Mint. -void testBoxPointer() { - ffi.Pointer pointer = largePointer(); - if (ffi.sizeOf() == 4) { - Expect.equals(0x82000000, pointer.address); - } else { - Expect.equals(0x8100000082000000, pointer.address); - } -} - -// Test GC in the FFI call path by calling a C function which triggers GC -// directly. -void testAllocateInNative() => triggerGc(); - -// This also works as a regression test for 37176. - -final regress37069 = ffiTestFunctions - .lookupFunction("Regress37069"); - -// Test GC in the FFI call path by calling a C function which triggers GC -// directly. -void testRegress37069() { - regress37069(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); -} - -final unprotectCode = ffiTestFunctions.lookupFunction< - ffi.Pointer Function(ffi.Pointer), - ffi.Pointer Function(ffi.Pointer)>("TestUnprotectCode"); -final waitForHelper = ffiTestFunctions.lookupFunction< - ffi.Void Function(ffi.Pointer), - void Function(ffi.Pointer)>("WaitForHelper"); - -void testWriteProtection() { - waitForHelper(unprotectCode(ffi.nullptr)); -} diff --git a/tests/ffi_2/vmspecific_function_test.dart b/tests/ffi_2/vmspecific_function_test.dart deleted file mode 100644 index ee787803fe2..00000000000 --- a/tests/ffi_2/vmspecific_function_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// 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. -// -// Dart test program for testing dart:ffi function pointers. -// -// VMOptions= -// VMOptions=--deterministic --optimization-counter-threshold=10 -// VMOptions=--use-slow-path -// VMOptions=--use-slow-path --stacktrace-every=100 -// VMOptions=--write-protect-code --no-dual-map-code -// VMOptions=--write-protect-code --no-dual-map-code --use-slow-path -// VMOptions=--write-protect-code --no-dual-map-code --stacktrace-every=100 -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import 'dylib_utils.dart'; - -void main() { - for (int i = 0; i < 100; ++i) { - testLookupFunctionPointerNativeType(); - } -} - -final ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); - -typedef NativeTypeNFT = Pointer Function( - Pointer>, Int8); -typedef NativeTypeFT = Pointer Function( - Pointer>, int); - -void testLookupFunctionPointerNativeType() { - // The function signature does not match up, but that does not matter since - // this test does not use the trampoline. - ffiTestFunctions.lookupFunction("LargePointer"); -} diff --git a/tests/ffi_2/vmspecific_handle_dynamically_linked_test.dart b/tests/ffi_2/vmspecific_handle_dynamically_linked_test.dart deleted file mode 100644 index 950a0234ac0..00000000000 --- a/tests/ffi_2/vmspecific_handle_dynamically_linked_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -// 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. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import 'package:expect/expect.dart'; - -import 'dylib_utils.dart'; - -void main() { - doDynamicLinking(); - testHandle(); - testNativeAPIs(); -} - -void doDynamicLinking() { - Expect.isTrue(NativeApi.majorVersion == 2); - Expect.isTrue(NativeApi.minorVersion >= 2); - final initializeApi = testLibrary.lookupFunction< - IntPtr Function(Pointer), - int Function(Pointer)>("InitDartApiDL"); - Expect.isTrue(initializeApi(NativeApi.initializeApiDLData) == 0); -} - -void testHandle() { - final s = SomeClass(123); - print("passObjectToC($s)"); - final result = passObjectToC(s); - print("result = $result"); - Expect.isTrue(identical(s, result)); -} - -void testNativeAPIs() { - // No need to expect here, `lookupFunction` throws an argument error if lookup fails. - testLibrary.lookupFunction( - "Dart_IsNull_DL"); -} - -class SomeClass { - // We use this getter in the native api, don't tree shake it. - @pragma("vm:entry-point") - final int a; - SomeClass(this.a); -} - -final testLibrary = dlopenPlatformSpecific("ffi_test_functions"); - -final passObjectToC = testLibrary.lookupFunction("PassObjectToCUseDynamicLinking"); diff --git a/tests/ffi_2/vmspecific_handle_test.dart b/tests/ffi_2/vmspecific_handle_test.dart deleted file mode 100644 index ab67c402a67..00000000000 --- a/tests/ffi_2/vmspecific_handle_test.dart +++ /dev/null @@ -1,279 +0,0 @@ -// 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. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import 'package:expect/expect.dart'; - -import 'dylib_utils.dart'; - -void main() { - testHandle(); - testHandleWithInteger(); - testReadField(); - testTrueHandle(); - testClosureCallback(); - testReturnHandleInCallback(); - testPropagateError(); - testCallbackReturnException(); - testDeepException(); - testDeepException2(); - testNull(); - testDeepRecursive(); - testNoHandlePropagateError(); -} - -void testHandle() { - print("testHandle"); - final s = SomeClass(123); - print("passObjectToC($s)"); - final result = passObjectToC(s); - print("result = $result"); - Expect.isTrue(identical(s, result)); -} - -void testHandleWithInteger() { - print("testHandleWithInteger"); - final s = 1337; - print("passObjectToC($s)"); - final result = passObjectToC(s); - print("result = $result"); - Expect.isTrue(identical(s, result)); -} - -void testReadField() { - final s = SomeClass(123); - final result = handleReadFieldValue(s); - Expect.equals(s.a, result); -} - -void testTrueHandle() { - final result = trueHandle(); - Expect.isTrue(result); -} - -int globalCounter = 0; - -void increaseCounter() { - print("increaseCounter"); - globalCounter++; -} - -void doClosureCallback(Object callback) { - print("doClosureCallback"); - print(callback.runtimeType); - print(callback); - final callback_as_function = callback as void Function(); - callback_as_function(); -} - -final closureCallbackPointer = - Pointer.fromFunction(doClosureCallback); - -void testClosureCallback() { - print("testClosureCallback $closureCallbackPointer"); - Expect.equals(0, globalCounter); - closureCallbackThroughHandle(closureCallbackPointer, increaseCounter); - Expect.equals(1, globalCounter); - closureCallbackThroughHandle(closureCallbackPointer, increaseCounter); - Expect.equals(2, globalCounter); -} - -final someObject = SomeClass(12356789); - -Object returnHandleCallback() { - print("returnHandleCallback returning $someObject"); - return someObject; -} - -final returnHandleCallbackPointer = - Pointer.fromFunction(returnHandleCallback); - -void testReturnHandleInCallback() { - print("testReturnHandleInCallback"); - final result = returnHandleInCallback(returnHandleCallbackPointer); - Expect.isTrue(identical(someObject, result)); -} - -class SomeClass { - // We use this getter in the native api, don't tree shake it. - @pragma("vm:entry-point") - final int a; - SomeClass(this.a); -} - -void testPropagateError() { - final s = SomeOtherClass(123); - Expect.throws(() => handleReadFieldValue(s)); -} - -class SomeOtherClass { - final int notA; - SomeOtherClass(this.notA); -} - -final someException = Exception("exceptionHandleCallback exception"); - -Object exceptionHandleCallback() { - print("exceptionHandleCallback throwing ($someException)"); - throw someException; -} - -final exceptionHandleCallbackPointer = - Pointer.fromFunction(exceptionHandleCallback); - -void testCallbackReturnException() { - print("testCallbackReturnException"); - bool throws = false; - try { - final result = returnHandleInCallback(exceptionHandleCallbackPointer); - print(result); - } catch (e) { - throws = true; - print("caught ($e)"); - Expect.isTrue(identical(someException, e)); - } - Expect.isTrue(throws); -} - -Object callCAgainFromCallback() { - print("callCAgainFromCallback"); - final s = SomeOtherClass(123); - Expect.throws(() => handleReadFieldValue(s)); - return someObject; -} - -final callCAgainFromCallbackPointer = - Pointer.fromFunction(callCAgainFromCallback); - -void testDeepException() { - print("testDeepException"); - final result = returnHandleInCallback(callCAgainFromCallbackPointer); - Expect.isTrue(identical(someObject, result)); -} - -Object callCAgainFromCallback2() { - print("callCAgainFromCallback2"); - final s = SomeOtherClass(123); - handleReadFieldValue(s); // throws. - return someObject; -} - -final callCAgainFromCallbackPointer2 = - Pointer.fromFunction(callCAgainFromCallback2); - -void testDeepException2() { - print("testDeepException2"); - Expect.throws(() => returnHandleInCallback(callCAgainFromCallbackPointer2)); -} - -Object returnNullHandleCallback() { - print("returnHandleCallback returning null"); - return null; -} - -final returnNullHandleCallbackPointer = - Pointer.fromFunction(returnNullHandleCallback); - -void testNull() { - print("testNull"); - final result = passObjectToC(null); - Expect.isNull(result); - - final result2 = returnHandleInCallback(returnNullHandleCallbackPointer); - Expect.isNull(result2); -} - -Object recurseAbove0(int i) { - print("recurseAbove0($i)"); - if (i == 0) { - print("throwing"); - throw someException; - } - if (i < 0) { - print("returning"); - return someObject; - } - final result = - handleRecursion(SomeClassWithMethod(), recurseAbove0Pointer, i - 1); - print("return $i"); - return result; -} - -final recurseAbove0Pointer = - Pointer.fromFunction(recurseAbove0); - -class SomeClassWithMethod { - // We use this method in the native api, don't tree shake it. - @pragma("vm:entry-point") - Object a(int i) => recurseAbove0(i); -} - -void testDeepRecursive() { - // works on arm. - Expect.throws(() { - handleRecursion(123, recurseAbove0Pointer, 1); - }); - - Expect.throws(() { - handleRecursion(SomeClassWithMethod(), recurseAbove0Pointer, 1); - }); - - Expect.throws(() { - recurseAbove0(100); - }); - - final result = recurseAbove0(101); - Expect.isTrue(identical(someObject, result)); -} - -void testNoHandlePropagateError() { - bool throws = false; - try { - final result = propagateErrorWithoutHandle(exceptionHandleCallbackPointer); - print(result); - } catch (e) { - throws = true; - print("caught ($e)"); - Expect.isTrue(identical(someException, e)); - } - Expect.isTrue(throws); -} - -final testLibrary = dlopenPlatformSpecific("ffi_test_functions"); - -final passObjectToC = testLibrary.lookupFunction("PassObjectToC"); - -final handleReadFieldValue = - testLibrary.lookupFunction( - "HandleReadFieldValue"); - -final trueHandle = testLibrary - .lookupFunction("TrueHandle"); - -final closureCallbackThroughHandle = testLibrary.lookupFunction< - Void Function(Pointer>, Handle), - void Function(Pointer>, - Object)>("ClosureCallbackThroughHandle"); - -final returnHandleInCallback = testLibrary.lookupFunction< - Handle Function(Pointer>), - Object Function( - Pointer>)>("ReturnHandleInCallback"); - -final handleRecursion = testLibrary.lookupFunction< - Handle Function( - Handle, Pointer>, Int64), - Object Function(Object, Pointer>, - int)>("HandleRecursion"); - -final propagateErrorWithoutHandle = testLibrary.lookupFunction< - Int64 Function(Pointer>), - int Function(Pointer>)>( - "PropagateErrorWithoutHandle"); diff --git a/tests/ffi_2/vmspecific_highmem_32bit_test.dart b/tests/ffi_2/vmspecific_highmem_32bit_test.dart deleted file mode 100644 index b0fb8e2c998..00000000000 --- a/tests/ffi_2/vmspecific_highmem_32bit_test.dart +++ /dev/null @@ -1,134 +0,0 @@ -// 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 - -// @dart = 2.9 - -import 'dart:ffi'; -import 'dart:io'; - -import 'package:expect/expect.dart'; - -import 'ffi_test_helpers.dart'; - -// void* mmap(void* addr, size_t length, -// int prot, int flags, -// int fd, off_t offset) -typedef MMapNative = Pointer Function(Pointer address, IntPtr len, - IntPtr prot, IntPtr flags, IntPtr fd, IntPtr offset); -typedef MMap = Pointer Function( - Pointer address, int len, int prot, int flags, int fd, int offset); -final mmap = processSymbols.lookupFunction('mmap'); - -// int munmap(void *addr, size_t length) -typedef MUnMapNative = IntPtr Function(Pointer address, IntPtr len); -typedef MUnMap = int Function(Pointer address, int len); -final munmap = processSymbols.lookupFunction('munmap'); - -final processSymbols = DynamicLibrary.process(); - -const int kProtRead = 1; -const int kProtWrite = 2; - -const int kMapPrivate = 2; -const int kMapFixed = 16; -final int kMapAnonymous = Platform.isMacOS ? 0x1000 : 0x20; - -const int kMapFailed = -1; - -// On 32-bit platforms the upper 4 bytes should be ignored. -const int kIgnoreBytesPositive = 0x1122334400000000; -const int kIgnoreBytesNegative = 0xffddccbb00000000; - -void swapBytes( - Pointer memoryView, int indexOffset, int indexA, int indexB) { - final int oldA = memoryView[indexOffset + indexA]; - memoryView[indexOffset + indexA] = memoryView[indexOffset + indexB]; - memoryView[indexOffset + indexB] = oldA; -} - -void testLoadsAndStores(int indexOffset, Pointer memory) { - for (int i = 0; i < 10; ++i) { - memory[indexOffset + i] = 10 + i; - } - Expect.listEquals([10, 11, 12, 13, 14, 15, 16, 17, 18, 19], - memory.offsetBy(indexOffset).asTypedList(10)); - - for (int i = 0; i < 9; ++i) { - swapBytes(memory, indexOffset + 0, i, i + 1); - } - Expect.listEquals([11, 12, 13, 14, 15, 16, 17, 18, 19, 10], - memory.offsetBy(indexOffset).asTypedList(10)); - for (int i = 0; i < 9; ++i) { - swapBytes(memory, indexOffset + kIgnoreBytesPositive, i, i + 1); - } - Expect.listEquals([12, 13, 14, 15, 16, 17, 18, 19, 10, 11], - memory.offsetBy(indexOffset).asTypedList(10)); - for (int i = 0; i < 9; ++i) { - swapBytes(memory, indexOffset + kIgnoreBytesNegative, i, i + 1); - } - Expect.listEquals([13, 14, 15, 16, 17, 18, 19, 10, 11, 12], - memory.offsetBy(indexOffset).asTypedList(10)); -} - -void testOnHighOrLowMemory(Pointer memory, int indexOffset) { - testLoadsAndStores(indexOffset, memory); - testLoadsAndStores(indexOffset, memory.offsetBy(5)); - testLoadsAndStores(indexOffset, memory.offsetBy(-5)); - testLoadsAndStores(indexOffset, memory.offsetBy(kIgnoreBytesPositive + 5)); - testLoadsAndStores(indexOffset, memory.offsetBy(kIgnoreBytesNegative + 5)); - testLoadsAndStores(indexOffset, memory.offsetBy(kIgnoreBytesPositive - 5)); - testLoadsAndStores(indexOffset, memory.offsetBy(kIgnoreBytesNegative - 5)); - final m2 = Pointer.fromAddress(kIgnoreBytesPositive + memory.address); - Expect.equals(memory, m2); //# 01: ok - Expect.equals(memory.address, m2.address); //# 01: ok - testLoadsAndStores(indexOffset, m2); - final m3 = Pointer.fromAddress(kIgnoreBytesNegative + memory.address); - Expect.equals(memory, m3); //# 01: ok - Expect.equals(memory.address, m3.address); //# 01: ok - testLoadsAndStores(indexOffset, m3); -} - -const int kPageSize = 4096; - -withMMapedAddress( - Pointer fixedAddress, void fun(Pointer address)) { - final result = mmap(fixedAddress, kPageSize, kProtRead | kProtWrite, - kMapAnonymous | kMapFixed | kMapPrivate, 0, 0); - if (result.address == kMapFailed) { - throw 'Could not mmap @0x${fixedAddress.address.toRadixString(16)}!'; - } - Expect.equals(fixedAddress, result); //# 01: ok - Expect.equals(fixedAddress.address, result.address); //# 01: ok - try { - fun(result); - } finally { - if (munmap(result, kPageSize) != 0) { - throw 'Failed to unmap memory!'; - } - } -} - -main() { - final bool is32BitProcess = sizeOf>() == 4; - - // User space processes usually have - // * the lower 3 GB available on Linux/Android on 32bit OS - // * full 4 GB available on Linux/Android on 64bit OS - // * full 4 GB available on MacOS - // So we choose high and low addresses that fall into lower 3 GB. - if (is32BitProcess && !Platform.isWindows) { - final highMemoryAddress = Pointer.fromAddress(0xaaaa0000); - final lowMemoryAddress = Pointer.fromAddress(0x11110000); - withMMapedAddress(lowMemoryAddress, (Pointer lowMemory) { - withMMapedAddress(highMemoryAddress, (Pointer highMemory) { - testOnHighOrLowMemory(lowMemory, 2048); - testOnHighOrLowMemory(highMemory, 2048); - testOnHighOrLowMemory( - lowMemory, 2048 + highMemory.address - lowMemory.address); - testOnHighOrLowMemory( - highMemory, 2048 + lowMemory.address - highMemory.address); - }); - }); - } -} diff --git a/tests/ffi_2/vmspecific_leaf_call_test.dart b/tests/ffi_2/vmspecific_leaf_call_test.dart deleted file mode 100644 index 05937af2b99..00000000000 --- a/tests/ffi_2/vmspecific_leaf_call_test.dart +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2021, 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 - -// SharedObjects=ffi_test_functions - -import 'dart:ffi'; -import 'dart:io'; - -import 'package:expect/expect.dart'; - -import 'callback_tests_utils.dart'; -import 'dylib_utils.dart'; - -DynamicLibrary ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); - -testLeafCall() { - // Regular calls should transition generated -> native. - final isThreadInGenerated = ffiTestFunctions - .lookupFunction("IsThreadInGenerated"); - Expect.equals(0, isThreadInGenerated()); - // Leaf calls should remain in generated state. - final isThreadInGeneratedLeaf = ffiTestFunctions - .lookupFunction("IsThreadInGenerated", - isLeaf: true); - Expect.equals(1, isThreadInGeneratedLeaf()); -} - -testLeafCallApi() { - // Note: This will only crash as expected in debug build mode. In other modes - // it's effectively skip. - final f = ffiTestFunctions.lookupFunction( - "TestLeafCallApi", - isLeaf: true); - // Calling Dart_.. API is unsafe from leaf calls since we explicitly haven't - // made the generated -> native transition. - f(); -} - -void nop() {} - -testCallbackLeaf() { - // This should crash with "expected: T->IsAtSafepoint()", since it's unsafe to - // do callbacks from leaf calls (otherwise they wouldn't be leaf calls). - // Note: This will only crash as expected in debug build mode. In other modes - // it's effectively skip. - CallbackTest("CallbackLeaf", Pointer.fromFunction(nop), - isLeaf: true) - .run(); -} - -main() { - testLeafCall(); //# 01: ok - // These tests terminate the process after successful completion, so we have - // to run them separately. - // - // Since they use signal handlers they only run on Linux. - if (Platform.isLinux && !const bool.fromEnvironment("dart.vm.product")) { - testLeafCallApi(); //# 02: ok - testCallbackLeaf(); //# 03: ok - } -} diff --git a/tests/ffi_2/vmspecific_native_finalizer_2_test.dart b/tests/ffi_2/vmspecific_native_finalizer_2_test.dart deleted file mode 100644 index 4f651db1fc6..00000000000 --- a/tests/ffi_2/vmspecific_native_finalizer_2_test.dart +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2022, 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. -// -// SharedObjects=ffi_test_functions -// -// VMOptions=--trace-finalizers - -// @dart = 2.9 - -import 'dart:ffi'; - -import 'package:expect/expect.dart'; -import 'package:ffi/ffi.dart'; - -import 'dylib_utils.dart'; -import 'ffi_test_helpers.dart'; - -void main() { - testFinalizerRuns(); - testFinalizerDetach(); - testDoubleDetach(); - testDetachNonDetach(); - testWrongArguments(); -} - -DynamicLibrary ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); - -void testFinalizerRuns() { - using((Arena allocator) { - final token = allocator(); - createAndLoseFinalizable(token); - doGC(); - Expect.equals(42, token.value); - }); -} - -void createAndLoseFinalizable(Pointer token) { - final myFinalizable = MyFinalizable(); - setTokenFinalizer.attach(myFinalizable, token.cast()); - Expect.equals(0, token.value); -} - -void testFinalizerDetach() { - using((Arena allocator) { - final token = allocator(); - attachAndDetach(token); - doGC(); - Expect.equals(0, token.value); - }); -} - -class Detach { - String identifier; - - Detach(this.identifier); -} - -void attachAndDetach(Pointer token) { - final myFinalizable = MyFinalizable(); - final detach = Detach('detach 123'); - setTokenFinalizer.attach(myFinalizable, token.cast(), detach: detach); - setTokenFinalizer.detach(detach); - Expect.equals(0, token.value); -} - -void testDoubleDetach() { - using((Arena allocator) { - final token = allocator(); - final myFinalizable = MyFinalizable(); - final detach = Detach('detach 321'); - setTokenFinalizer.attach(myFinalizable, token.cast(), detach: detach); - setTokenFinalizer.detach(detach); - setTokenFinalizer.detach(detach); - Expect.equals(0, token.value); - }); -} - -void testDetachNonDetach() { - final detach = Detach('detach 456'); - setTokenFinalizer.detach(detach); - setTokenFinalizer.detach(detach); -} - -void testWrongArguments() { - using((Arena allocator) { - final token = allocator().cast(); - Expect.throws(() { - final myFinalizable = MyFinalizable(); - setTokenFinalizer.attach(myFinalizable, token, externalSize: -1024); - }); - Expect.throws(() { - final myFinalizable = MyFinalizable(); - setTokenFinalizer.attach(myFinalizable, token, detach: 123); - }); - }); -} diff --git a/tests/ffi_2/vmspecific_native_finalizer_isolate_groups_test.dart b/tests/ffi_2/vmspecific_native_finalizer_isolate_groups_test.dart deleted file mode 100644 index c68f4a39ece..00000000000 --- a/tests/ffi_2/vmspecific_native_finalizer_isolate_groups_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2022, 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. -// -// SharedObjects=ffi_test_functions -// -// VMOptions=--trace-finalizers - -// @dart = 2.9 - -import 'dart:async'; -import 'dart:ffi'; -import 'dart:io'; -import 'dart:isolate'; - -import 'package:expect/expect.dart'; -import 'package:ffi/ffi.dart'; - -import 'ffi_test_helpers.dart'; - -void main(List args, int address) async { - if (address != null) { - await mainHelper(args, address); - } else { - await testFinalizerRunsOnIsolateGroupShutdown(); - } -} - -Future mainHelper(List args, int address) async { - final token = Pointer.fromAddress(address); - createAndLoseFinalizable(token); - print('Isolate done.'); -} - -Future testFinalizerRunsOnIsolateGroupShutdown() async { - await using((Arena allocator) async { - final token = allocator(); - Expect.equals(0, token.value); - final portExitMessage = ReceivePort(); - await Isolate.spawnUri( - Platform.script, - [], - token.address, - onExit: portExitMessage.sendPort, - ); - await portExitMessage.first; - print('Helper isolate has exited.'); - - Expect.equals(42, token.value); - - print('End of test, shutting down.'); - }); -} diff --git a/tests/ffi_2/vmspecific_native_finalizer_isolates_test.dart b/tests/ffi_2/vmspecific_native_finalizer_isolates_test.dart deleted file mode 100644 index 94a2243d8d2..00000000000 --- a/tests/ffi_2/vmspecific_native_finalizer_isolates_test.dart +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2022, 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. -// -// SharedObjects=ffi_test_functions -// -// VMOptions=--trace-finalizers - -// @dart = 2.9 - -import 'dart:async'; -import 'dart:ffi'; -import 'dart:isolate'; - -import 'package:expect/expect.dart'; -import 'package:ffi/ffi.dart'; - -import 'dylib_utils.dart'; -import 'ffi_test_helpers.dart'; - -void main() async { - await testSendAndExitFinalizable(); - await testSendAndExitFinalizer(); - await testFinalizerRunsOnIsolateShutdown(); - print('End of test, shutting down.'); -} - -DynamicLibrary ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); - -void runIsolateAttachFinalizer(int address) { - final token = Pointer.fromAddress(address); - createAndLoseFinalizable(token); - print('Isolate done.'); -} - -Future testFinalizerRunsOnIsolateShutdown() async { - await using((Arena allocator) async { - final token = allocator(); - Expect.equals(0, token.value); - final portExitMessage = ReceivePort(); - await Isolate.spawn( - runIsolateAttachFinalizer, - token.address, - onExit: portExitMessage.sendPort, - ); - await portExitMessage.first; - - doGC(); - Expect.equals(42, token.value); - }); -} - -Future testSendAndExitFinalizable() async { - final receivePort = ReceivePort(); - await Isolate.spawn( - (SendPort sendPort) { - try { - Isolate.exit(sendPort, MyFinalizable()); - } catch (e) { - print('Expected exception: $e.'); - Isolate.exit(sendPort, e.toString()); - } - }, - receivePort.sendPort, - ); - final result = await receivePort.first; - Expect.contains("Invalid argument: is unsendable", result); -} - -Future testSendAndExitFinalizer() async { - final receivePort = ReceivePort(); - await Isolate.spawn( - (SendPort sendPort) { - try { - Isolate.exit(sendPort, MyFinalizable()); - } catch (e) { - print('Expected exception: $e.'); - Isolate.exit(sendPort, e.toString()); - } - }, - receivePort.sendPort, - ); - final result = await receivePort.first; - Expect.contains("Invalid argument: is unsendable", result); -} diff --git a/tests/ffi_2/vmspecific_native_finalizer_test.dart b/tests/ffi_2/vmspecific_native_finalizer_test.dart deleted file mode 100644 index f596609cf97..00000000000 --- a/tests/ffi_2/vmspecific_native_finalizer_test.dart +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) 2022, 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. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; -import 'dart:io'; - -import 'dylib_utils.dart'; -import 'ffi_test_helpers.dart'; - -void main() { - testMallocFree(); - print('end of test, shutting down'); -} - -DynamicLibrary ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); - -void testMallocFree() { - if (Platform.isWindows) { - // malloc and free not supported. - return; - } - - print('freePtr $freePtr'); - - { - final resource = MyNativeResource(); - resource.close(); - doGC(); - } - - { - MyNativeResource(); - doGC(); - } - - // Run finalizer on shutdown (or on a GC that runs before shutdown). - MyNativeResource(); -} - -class MyNativeResource implements Finalizable { - final Pointer pointer; - - bool _closed = false; - - MyNativeResource._(this.pointer, {int externalSize}) { - print('pointer $pointer'); - freeFinalizer.attach(this, pointer, - externalSize: externalSize, detach: this); - } - - factory MyNativeResource() { - const num = 1; - const size = 16; - final pointer = calloc(num, size); - return MyNativeResource._(pointer, externalSize: size); - } - - /// Eagerly stop using the native resource. Cancelling the finalizer. - void close() { - _closed = true; - freeFinalizer.detach(this); - free(pointer); - } - - void useResource() { - if (_closed) { - throw UnsupportedError('The native resource has already been released'); - } - print(pointer.address); - } -} - -final DynamicLibrary stdlib = DynamicLibrary.process(); - -typedef PosixCallocNative = Pointer Function(IntPtr num, IntPtr size); -typedef PosixCalloc = Pointer Function(int num, int size); -final PosixCalloc calloc = - stdlib.lookupFunction('calloc'); - -typedef PosixFreeNative = Void Function(Pointer); -final freePtr = stdlib.lookup>('free'); -final free = freePtr.asFunction)>(); - -final freeFinalizer = NativeFinalizer(freePtr); diff --git a/tests/ffi_2/vmspecific_null_test.dart b/tests/ffi_2/vmspecific_null_test.dart deleted file mode 100644 index f974f956dc4..00000000000 --- a/tests/ffi_2/vmspecific_null_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// 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. -// -// Dart test program for testing dart:ffi with null values. -// -// Separated into a separate file to make NNBD testing easier. -// -// SharedObjects=ffi_test_dynamic_library ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import 'package:expect/expect.dart'; - -import 'dylib_utils.dart'; - -void main() { - testOpen(); - testEquality(); -} - -void testOpen() { - DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library"); - Expect.notEquals(null, l); -} - -typedef NativeDoubleUnOp = Double Function(Double); - -typedef DoubleUnOp = double Function(double); - -void testEquality() { - DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library"); - Expect.notEquals(l, null); - Expect.notEquals(null, l); -} diff --git a/tests/ffi_2/vmspecific_object_gc_test.dart b/tests/ffi_2/vmspecific_object_gc_test.dart deleted file mode 100644 index 6f5bfe7c2b0..00000000000 --- a/tests/ffi_2/vmspecific_object_gc_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// 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. -// -// Tests GC of Pointer objects. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; - -import 'dylib_utils.dart'; - -DynamicLibrary ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); - -final triggerGc = ffiTestFunctions - .lookupFunction("TriggerGC"); - -void main() async { - testGC(); -} - -dynamic bar; - -Future testGC() async { - bar = Pointer.fromAddress(11); - - // Verify that the objects manufactured by 'fromAddress' can be scanned by the - // GC. - triggerGc(); - - Expect.equals(11, bar.address); -} diff --git a/tests/ffi_2/vmspecific_regress_37100_test.dart b/tests/ffi_2/vmspecific_regress_37100_test.dart deleted file mode 100644 index 7f4808c9771..00000000000 --- a/tests/ffi_2/vmspecific_regress_37100_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// 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. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:expect/expect.dart"; - -import 'dylib_utils.dart'; - -class EVP_MD extends Opaque {} - -DynamicLibrary ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); - -final EVP_sha1 = ffiTestFunctions.lookupFunction Function(), - Pointer Function()>('LargePointer'); - -main() { - int result = EVP_sha1().address; - // On 32 bit only the lowest 32 bits are returned, so only test those. - result &= 0x00000000FFFFFFFF; - Expect.equals(0x0000000082000000, result); -} diff --git a/tests/ffi_2/vmspecific_regress_37511_callbacks_test.dart b/tests/ffi_2/vmspecific_regress_37511_callbacks_test.dart deleted file mode 100644 index 3e6708114a5..00000000000 --- a/tests/ffi_2/vmspecific_regress_37511_callbacks_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -// 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. -// -// Dart test program for testing dart:ffi struct pointers. -// -// VMOptions=--deterministic -// -// SharedObjects=ffi_test_functions -// -// TODO(37295): Merge this file with regress_37511_test.dart when callback -// support lands. - -// @dart = 2.9 - -import 'dart:ffi'; - -import 'ffi_test_helpers.dart'; - -/// Estimate of how many allocations functions in `functionsToTest` do at most. -const gcAfterNAllocationsMax = 10; - -void main() { - for (Function() f in functionsToTest) { - f(); // Ensure code is compiled. - - for (int n = 1; n <= gcAfterNAllocationsMax; n++) { - collectOnNthAllocation(n); - f(); - } - } -} - -final List functionsToTest = [ - // Callback trampolines. - doFromFunction, - () => callbackSmallDouble(dartFunctionPointer), -]; - -// Callback trampoline helpers. -typedef NativeCallbackTest = Int32 Function(Pointer); -typedef NativeCallbackTestFn = int Function(Pointer); - -final callbackSmallDouble = - ffiTestFunctions.lookupFunction( - "TestSimpleMultiply"); - -typedef SimpleMultiplyType = Double Function(Double); -double simpleMultiply(double x) => x * 1.337; - -final doFromFunction = - () => Pointer.fromFunction(simpleMultiply, 0.0); - -final dartFunctionPointer = doFromFunction(); diff --git a/tests/ffi_2/vmspecific_regress_37511_test.dart b/tests/ffi_2/vmspecific_regress_37511_test.dart deleted file mode 100644 index 290c4e80b31..00000000000 --- a/tests/ffi_2/vmspecific_regress_37511_test.dart +++ /dev/null @@ -1,108 +0,0 @@ -// 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. -// -// Dart test program for testing dart:ffi struct pointers. -// -// VMOptions=--deterministic -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import 'dylib_utils.dart'; -import 'ffi_test_helpers.dart'; - -/// Estimate of how many allocations functions in `functionsToTest` do at most. -const gcAfterNAllocationsMax = 10; - -void main() { - for (Function() f in functionsToTest) { - f(); // Ensure code is compiled. - - for (int n = 1; n <= gcAfterNAllocationsMax; n++) { - collectOnNthAllocation(n); - f(); - } - } -} - -final List functionsToTest = [ - // Pointer operations. - () => highAddressPointer.cast(), - () => Pointer.fromAddress(highAddressPointer.address), - () => highAddressPointer.address, - () => highAddressPointer.elementAt(1), - () => highAddressPointer.offsetBy(1), - () => highAddressPointer.asTypedList(1), - - // DynamicLibrary operations. - doDlopen, - doDlsym, // Includes `asFunction`. - () => ffiTestFunctions.handle, - - // Trampolines. - () => sumManyIntsOdd(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, mint64bit), - () => sumManyDoubles(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0), - minInt64, - minInt32, - smallDouble, - largePointer, - - // Callback trampolines. - // - // In regress_37511_callbacks_test.dart because callbacks are not supported - // in AOT yet. -]; - -// Pointer operation helpers. -const mint32bit = 0xFFFFFFF0; -const mint64bit = 0x7FFFFFFFFFFFFFF0; - -final int highAddress = sizeOf() == 4 ? mint32bit : mint64bit; - -final Pointer highAddressPointer = Pointer.fromAddress(highAddress); - -// Dynamic library operation helpers. -final doDlopen = () => dlopenPlatformSpecific("ffi_test_functions"); - -final doDlsym = () => ffiTestFunctions - .lookupFunction("TriggerGC"); - -// Trampoline helpers. -typedef NativeUndenaryOp = IntPtr Function(IntPtr, IntPtr, IntPtr, IntPtr, - IntPtr, IntPtr, IntPtr, IntPtr, IntPtr, IntPtr, IntPtr); -typedef UndenaryOp = int Function( - int, int, int, int, int, int, int, int, int, int, int); - -final UndenaryOp sumManyIntsOdd = ffiTestFunctions - .lookupFunction("SumManyIntsOdd"); - -typedef NativeDoubleDecenaryOp = Double Function(Double, Double, Double, Double, - Double, Double, Double, Double, Double, Double); -typedef DoubleDecenaryOp = double Function(double, double, double, double, - double, double, double, double, double, double); - -final DoubleDecenaryOp sumManyDoubles = ffiTestFunctions - .lookupFunction("SumManyDoubles"); - -typedef NativeNullaryOp64 = Int64 Function(); -typedef NativeNullaryOp32 = Int32 Function(); -typedef NativeNullaryOpDouble = Double Function(); -typedef NullaryOpPtr = Pointer Function(); -typedef NullaryOp = int Function(); -typedef NullaryOpDbl = double Function(); - -final minInt64 = - ffiTestFunctions.lookupFunction("MinInt64"); - -final minInt32 = - ffiTestFunctions.lookupFunction("MinInt32"); - -final smallDouble = ffiTestFunctions - .lookupFunction("SmallDouble"); - -final largePointer = - ffiTestFunctions.lookupFunction("LargePointer"); diff --git a/tests/ffi_2/vmspecific_regress_37780_test.dart b/tests/ffi_2/vmspecific_regress_37780_test.dart deleted file mode 100644 index 6284cc51c20..00000000000 --- a/tests/ffi_2/vmspecific_regress_37780_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import 'dylib_utils.dart'; - -DynamicLibrary ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions"); - -final triggerGc = ffiTestFunctions - .lookupFunction("TriggerGC"); - -main(List args) { - final foo = [Float(), Double(), Uint8()]; - triggerGc(); - print(foo); -} diff --git a/tests/ffi_2/vmspecific_regress_38993_test.dart b/tests/ffi_2/vmspecific_regress_38993_test.dart deleted file mode 100644 index e9266cce80d..00000000000 --- a/tests/ffi_2/vmspecific_regress_38993_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// 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. -// -// Tests a compile time error that should not crash the analyzer or CFE. - -// @dart = 2.9 - -import "dart:ffi"; - -class C extends Struct { - dynamic x; //# 1: compile-time error - - Pointer notEmpty; -} - -main() {} diff --git a/tests/ffi_2/vmspecific_send_port_id_test.dart b/tests/ffi_2/vmspecific_send_port_id_test.dart deleted file mode 100644 index 9051878ff8a..00000000000 --- a/tests/ffi_2/vmspecific_send_port_id_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:async'; -import 'dart:ffi'; -import 'dart:isolate'; - -import 'package:expect/expect.dart'; - -typedef Dart_PostIntegerNFT = IntPtr Function(Int64 port, Int64 message); -typedef Dart_PostIntegerFT = int Function(int port, int message); - -main() async { - const int message = 112344556677888; - - final completer = Completer(); - - final receivePort = ReceivePort() - ..listen((receivedMessage) => completer.complete(receivedMessage)); - - final executableSymbols = DynamicLibrary.executable(); - - final postInteger = - executableSymbols.lookupFunction( - "Dart_PostInteger"); - - // Issue(dartbug.com/38545): The dart:ffi doesn't have a bool type yet. - final bool success = - postInteger(receivePort.sendPort.nativePort, message) != 0; - Expect.isTrue(success); - - final postedMessage = await completer.future; - Expect.equals(message, postedMessage); - - receivePort.close(); -} diff --git a/tests/ffi_2/vmspecific_static_checks_test.dart b/tests/ffi_2/vmspecific_static_checks_test.dart deleted file mode 100644 index 78897506b62..00000000000 --- a/tests/ffi_2/vmspecific_static_checks_test.dart +++ /dev/null @@ -1,1315 +0,0 @@ -// 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. -// -// Dart test program for testing dart:ffi extra checks -// -// SharedObjects=ffi_test_dynamic_library ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import "package:ffi/ffi.dart"; - -import 'dylib_utils.dart'; - -void main() { - testGetGeneric(); - testGetGeneric2(); - testGetVoid(); - testGetNativeFunction(); - testGetNativeType(); - testGetTypeMismatch(); - testSetGeneric(); - testSetGeneric2(); - testSetVoid(); - testSetNativeFunction(); - testSetNativeType(); - testSetTypeMismatch(); - testAsFunctionGeneric(); - testAsFunctionGeneric2(); - testAsFunctionWrongNativeFunctionSignature(); - testAsFunctionTypeMismatch(); - testFromFunctionGeneric(); - testFromFunctionGeneric2(); - testFromFunctionWrongNativeFunctionSignature(); - testFromFunctionTypeMismatch(); - testFromFunctionClosure(); - testFromFunctionTearOff(); - testFromFunctionAbstract(); - testFromFunctionFunctionExceptionValueMustBeConst(); - testLookupFunctionGeneric(); - testLookupFunctionGeneric2(); - testLookupFunctionWrongNativeFunctionSignature(); - testLookupFunctionTypeMismatch(); - testLookupFunctionPointervoid(); - testLookupFunctionPointerNFdyn(); - testHandleVariance(); - testEmptyStructLookupFunctionArgument(); - testEmptyStructLookupFunctionReturn(); - testEmptyStructAsFunctionArgument(); - testEmptyStructAsFunctionReturn(); - testEmptyStructFromFunctionArgument(); - testEmptyStructFromFunctionReturn(); - testAllocateGeneric(); - testAllocateNativeType(); - testRefStruct(); - testSizeOfGeneric(); - testSizeOfNativeType(); - testSizeOfHandle(); - testElementAtGeneric(); - testElementAtNativeType(); - testLookupFunctionIsLeafMustBeConst(); - testAsFunctionIsLeafMustBeConst(); - testLookupFunctionTakesHandle(); - testAsFunctionTakesHandle(); - testLookupFunctionReturnsHandle(); - testAsFunctionReturnsHandle(); -} - -typedef Int8UnOp = Int8 Function(Int8); -typedef IntUnOp = int Function(int); - -void testGetGeneric() { - int generic(Pointer p) { - int result; - result = p.value; - // ^^^^^ - // [cfe] The getter 'value' isn't defined for the class 'Pointer'. - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - return result; - } - - Pointer p = calloc(); - p.value = 123; - Pointer loseType = p; - generic(loseType); - calloc.free(p); -} - -void testGetGeneric2() { - T generic() { - Pointer p = calloc(); - p.value = 123; - T result; - result = p.value; - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'int' can't be assigned to a variable of type 'T'. - calloc.free(p); - return result; - } - - generic(); -} - -void testGetVoid() { - Pointer p1 = calloc(); - Pointer p2 = p1.cast(); - - p2.value; - // ^^^^^ - // [cfe] The getter 'value' isn't defined for the class 'Pointer'. - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - - calloc.free(p1); -} - -void testGetNativeFunction() { - Pointer> p = Pointer.fromAddress(1337); - IntUnOp f = p.value; - // ^^^^^ - // [cfe] The getter 'value' isn't defined for the class 'Pointer>'. - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER -} - -void testGetNativeType() { - // Is it possible to obtain a Pointer at all? -} - -void testGetTypeMismatch() { - Pointer> p = calloc(); - Pointer typedNull = nullptr; - p.value = typedNull; - - // this fails to compile due to type mismatch - Pointer p2 = p.value; - // ^ - // [cfe] A value of type 'Pointer' can't be assigned to a variable of type 'Pointer'. - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - - calloc.free(p); -} - -void testSetGeneric() { - void generic(Pointer p) { - p.value = 123; - //^^^^^ - // [cfe] The setter 'value' isn't defined for the class 'Pointer'. - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER - } - - Pointer p = calloc(); - p.value = 123; - Pointer loseType = p; - generic(loseType); - calloc.free(p); -} - -void testSetGeneric2() { - void generic(T arg) { - Pointer p = calloc(); - p.value = arg; - // ^^^ - // [cfe] A value of type 'T' can't be assigned to a variable of type 'int'. - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - calloc.free(p); - } - - generic(123); -} - -void testSetVoid() { - Pointer p1 = calloc(); - Pointer p2 = p1.cast(); - - p2.value = 1234; - // ^^^^^ - // [cfe] The setter 'value' isn't defined for the class 'Pointer'. - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER - - calloc.free(p1); -} - -void testSetNativeFunction() { - Pointer> p = Pointer.fromAddress(1337); - IntUnOp f = (a) => a + 1; - p.value = f; - //^^^^^ - // [cfe] The setter 'value' isn't defined for the class 'Pointer>'. - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER -} - -void testSetNativeType() { - // Is it possible to obtain a Pointer at all? -} - -void testSetTypeMismatch() { - // the pointer to pointer types must match up - Pointer pHelper = calloc(); - pHelper.value = 123; - - Pointer> p = calloc(); - - // this fails to compile due to type mismatch - p.value = pHelper; - // ^^^^^^^ - // [cfe] A value of type 'Pointer' can't be assigned to a variable of type 'Pointer'. - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - - calloc.free(pHelper); - calloc.free(p); -} - -void testAsFunctionGeneric() { - T generic() { - Pointer> p = Pointer.fromAddress(1337); - Function f; - f = p.asFunction(); - // ^ - // [cfe] Expected type 'T' to be 'int Function(int)', which is the Dart type corresponding to 'NativeFunction'. - // ^ - // [analyzer] COMPILE_TIME_ERROR.NON_CONSTANT_TYPE_ARGUMENT - return f; - } - - generic(); -} - -void testAsFunctionGeneric2() { - generic(Pointer p) { - Function f; - f = p.asFunction(); - // ^ - // [cfe] Expected type 'NativeFunction' to be a valid and instantiated subtype of 'NativeType'. - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_NATIVE_FUNCTION_TYPE_ARGUMENT_TO_POINTER - return f; - } - - Pointer> p = Pointer.fromAddress(1337); - generic(p); -} - -void testAsFunctionWrongNativeFunctionSignature() { - Pointer> p; - Function f = p.asFunction(); - // ^ - // [cfe] Expected type 'NativeFunction' to be a valid and instantiated subtype of 'NativeType'. - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_NATIVE_FUNCTION_TYPE_ARGUMENT_TO_POINTER -} - -typedef IntBinOp = int Function(int, int); - -void testAsFunctionTypeMismatch() { - Pointer> p = Pointer.fromAddress(1337); - IntBinOp f = p.asFunction(); - // ^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.MUST_BE_A_SUBTYPE - // ^ - // [cfe] Expected type 'int Function(int, int)' to be 'int Function(int)', which is the Dart type corresponding to 'NativeFunction'. -} - -typedef NativeDoubleUnOp = Double Function(Double); -typedef DoubleUnOp = double Function(double); - -double myTimesThree(double d) => d * 3; - -int myTimesFour(int i) => i * 4; - -void testFromFunctionGeneric() { - Pointer generic(T f) { - Pointer> result; - result = Pointer.fromFunction(f); - // ^ - // [cfe] fromFunction expects a static function as parameter. dart:ffi only supports calling static Dart functions from native code. Closures and tear-offs are not supported because they can capture context. - // [analyzer] COMPILE_TIME_ERROR.MUST_BE_A_SUBTYPE - return result; - } - - generic(myTimesThree); -} - -void testFromFunctionGeneric2() { - Pointer> generic() { - Pointer> result; - result = Pointer.fromFunction(myTimesThree); - // ^^^^^^^^^^^^ - // [cfe] Expected type 'NativeFunction' to be a valid and instantiated subtype of 'NativeType'. - // [analyzer] COMPILE_TIME_ERROR.MUST_BE_A_NATIVE_FUNCTION_TYPE - return result; - } - - generic(); -} - -void testFromFunctionWrongNativeFunctionSignature() { - Pointer.fromFunction(myTimesFour); - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.MUST_BE_A_NATIVE_FUNCTION_TYPE - // ^ - // [cfe] Expected type 'NativeFunction' to be a valid and instantiated subtype of 'NativeType'. -} - -void testFromFunctionTypeMismatch() { - Pointer> p; - p = Pointer.fromFunction(myTimesFour); - // ^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.MUST_BE_A_SUBTYPE - // ^ - // [cfe] Expected type 'int Function(int)' to be 'double Function(double)', which is the Dart type corresponding to 'NativeFunction'. -} - -void testFromFunctionClosure() { - DoubleUnOp someClosure = (double z) => z / 27.0; - Pointer> p; - p = Pointer.fromFunction(someClosure); - // ^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.MISSING_EXCEPTION_VALUE - // ^ - // [cfe] fromFunction expects a static function as parameter. dart:ffi only supports calling static Dart functions from native code. Closures and tear-offs are not supported because they can capture context. -} - -class X { - double tearoff(double d) => d / 27.0; -} - -void testFromFunctionTearOff() { - DoubleUnOp fld = X().tearoff; - Pointer> p; - p = Pointer.fromFunction(fld); - // ^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.MISSING_EXCEPTION_VALUE - // ^ - // [cfe] fromFunction expects a static function as parameter. dart:ffi only supports calling static Dart functions from native code. Closures and tear-offs are not supported because they can capture context. -} - -void testFromFunctionAbstract() { - Pointer.fromFunction(testFromFunctionAbstract); - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.MUST_BE_A_NATIVE_FUNCTION_TYPE - // ^ - // [cfe] Expected type 'NativeFunction' to be a valid and instantiated subtype of 'NativeType'. -} - -void testFromFunctionFunctionExceptionValueMustBeConst() { - final notAConst = 1.1; - Pointer> p; - p = Pointer.fromFunction(myTimesThree, notAConst); - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_MUST_BE_A_CONSTANT - // ^ - // [cfe] Exceptional return value must be a constant. -} - -void testLookupFunctionGeneric() { - Function generic() { - DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library"); - Function result; - result = l.lookupFunction("cos"); - // ^ - // [analyzer] COMPILE_TIME_ERROR.MUST_BE_A_NATIVE_FUNCTION_TYPE - // ^ - // [cfe] Expected type 'NativeFunction' to be a valid and instantiated subtype of 'NativeType'. - return result; - } - - generic(); -} - -void testLookupFunctionGeneric2() { - Function generic() { - DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library"); - Function result; - result = l.lookupFunction("cos"); - // ^ - // [analyzer] COMPILE_TIME_ERROR.MUST_BE_A_SUBTYPE - // ^ - // [cfe] Expected type 'T' to be 'double Function(double)', which is the Dart type corresponding to 'NativeFunction'. - return result; - } - - generic(); -} - -void testLookupFunctionWrongNativeFunctionSignature() { - DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library"); - l.lookupFunction("cos"); - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.MUST_BE_A_NATIVE_FUNCTION_TYPE - //^ - // [cfe] Expected type 'NativeFunction' to be a valid and instantiated subtype of 'NativeType'. -} - -void testLookupFunctionTypeMismatch() { - DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library"); - l.lookupFunction("cos"); - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.MUST_BE_A_SUBTYPE - //^ - // [cfe] Expected type 'int Function(int)' to be 'double Function(double)', which is the Dart type corresponding to 'NativeFunction'. -} - -typedef PointervoidN = Void Function(Pointer); -typedef PointervoidD = void Function(Pointer); - -void testLookupFunctionPointervoid() { - DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library"); - // TODO(https://dartbug.com/44593): This should be a compile-time error in CFE. - // l.lookupFunction("cos"); -} - -typedef PointerNFdynN = Void Function(Pointer); -typedef PointerNFdynD = void Function(Pointer); - -void testLookupFunctionPointerNFdyn() { - DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library"); - // TODO(https://dartbug.com/44594): Should this be an error or not? - // l.lookupFunction("cos"); -} - -// error on missing field annotation -class TestStruct extends Struct { - @Double() - double x; - - /**/ double y; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.MISSING_ANNOTATION_ON_STRUCT_FIELD - // ^ - // [cfe] Field 'y' requires exactly one annotation to declare its native type, which cannot be Void. dart:ffi Structs and Unions cannot have regular Dart fields. -} - -// Cannot extend structs. -class TestStruct3 extends TestStruct {} -// ^^^^^^^^^^^ -// [cfe] Class 'TestStruct' cannot be extended or implemented. -// [cfe] TestStruct 'TestStruct3' is empty. Empty structs and unions are undefined behavior. -// ^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_STRUCT_CLASS - -// error on double annotation -class TestStruct4 extends Struct { - @Double() - /**/ @Double() - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_ANNOTATION_ON_STRUCT_FIELD - double z; - // ^ - // [cfe] Field 'z' requires exactly one annotation to declare its native type, which cannot be Void. dart:ffi Structs and Unions cannot have regular Dart fields. -} - -// error on annotation not matching up -class TestStruct5 extends Struct { - /**/ @Int64() - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.MISMATCHED_ANNOTATION_ON_STRUCT_FIELD - double z; - // ^ - // [cfe] Expected type 'double' to be 'int', which is the Dart type corresponding to 'Int64'. - - Pointer notEmpty; -} - -// error on annotation not matching up -class TestStruct6 extends Struct { - /**/ @Void() - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.MISMATCHED_ANNOTATION_ON_STRUCT_FIELD - // [analyzer] COMPILE_TIME_ERROR.NON_CONSTANT_ANNOTATION_CONSTRUCTOR - // ^ - // [cfe] The class 'Void' is abstract and can't be instantiated. - double z; - // ^ - // [cfe] Field 'z' requires exactly one annotation to declare its native type, which cannot be Void. dart:ffi Structs and Unions cannot have regular Dart fields. - - Pointer notEmpty; -} - -// error on annotation not matching up -class TestStruct7 extends Struct { - /**/ @NativeType() - // ^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.MISMATCHED_ANNOTATION_ON_STRUCT_FIELD - // ^ - // [cfe] The class 'NativeType' is abstract and can't be instantiated. - double z; - // ^ - // [cfe] Field 'z' requires exactly one annotation to declare its native type, which cannot be Void. dart:ffi Structs and Unions cannot have regular Dart fields. - - Pointer notEmpty; -} - -// error on field initializer on field -class TestStruct8 extends Struct { - @Double() - double z = 10.0; - // ^ - // [cfe] Field 'z' is a dart:ffi Pointer to a struct field and therefore cannot be initialized before constructor execution. - // [analyzer] COMPILE_TIME_ERROR.FIELD_IN_STRUCT_WITH_INITIALIZER - - Pointer notEmpty; -} - -// error on field initializer in constructor -class TestStruct9 extends Struct { - @Double() - double z; - // ^ - // [cfe] Field 'z' is a dart:ffi Pointer to a struct field and therefore cannot be initialized before constructor execution. - - Pointer notEmpty; - - TestStruct9() : z = 0.0 {} - // ^ - // [cfe] Field 'z' is a dart:ffi Pointer to a struct field and therefore cannot be initialized before constructor execution. - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_IN_STRUCT -} - -// Struct classes may not be generic. -class TestStruct11 extends Struct> {} -// ^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.EMPTY_STRUCT -// [analyzer] COMPILE_TIME_ERROR.GENERIC_STRUCT_SUBCLASS -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// [cfe] Expected 0 type arguments. -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS - -// Structs may not appear inside structs (currently, there is no suitable -// annotation). -class TestStruct12 extends Struct { - /**/ @Pointer - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ANNOTATION - // ^ - // [cfe] This can't be used as an annotation; an annotation should be a reference to a compile-time constant variable, or a call to a constant constructor. - TestStruct9 struct; - - Pointer notEmpty; -} - -class DummyAnnotation { - const DummyAnnotation(); -} - -// Structs fields may have other annotations. -class TestStruct13 extends Struct { - @DummyAnnotation() - @Double() - double z; -} - -// Cannot extend native types. - -class ENativeType extends NativeType {} -// ^^^^^^^^^^ -// [cfe] The class 'NativeType' can't be extended outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class EInt8 extends Int8 {} -// ^^^^ -// [cfe] The class 'Int8' can't be extended outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class EInt16 extends Int16 {} -// ^^^^^ -// [cfe] The class 'Int16' can't be extended outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class EInt32 extends Int32 {} -// ^^^^^ -// [cfe] The class 'Int32' can't be extended outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class EInt64 extends Int64 {} -// ^^^^^ -// [cfe] The class 'Int64' can't be extended outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class EUint8 extends Uint8 {} -// ^^^^^ -// [cfe] The class 'Uint8' can't be extended outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class EUint16 extends Uint16 {} -// ^^^^^^ -// [cfe] The class 'Uint16' can't be extended outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class EUint32 extends Uint32 {} -// ^^^^^^ -// [cfe] The class 'Uint32' can't be extended outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class EUint64 extends Uint64 {} -// ^^^^^^ -// [cfe] The class 'Uint64' can't be extended outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class EIntPtr extends IntPtr {} -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY -// [cfe] The class 'IntPtr' can't be extended outside of its library because it's a final class. -// ^ -// [cfe] Class 'IntPtr' cannot be extended or implemented. -// [cfe] Classes extending 'AbiSpecificInteger' must have exactly one 'AbiSpecificIntegerMapping' annotation specifying the mapping from ABI to a NativeType integer with a fixed size. -// [cfe] Classes extending 'AbiSpecificInteger' must have exactly one const constructor, no other members, and no type arguments. - -class EFloat extends Float {} -// ^^^^^ -// [cfe] The class 'Float' can't be extended outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class EDouble extends Double {} -// ^^^^^^ -// [cfe] The class 'Double' can't be extended outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class EVoid extends Void {} -// ^^^^ -// [cfe] The class 'Void' can't be extended outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class ENativeFunction extends NativeFunction {} -// ^^^^^^^^^^^^^^ -// [cfe] The class 'NativeFunction' can't be extended outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class EPointer extends Pointer {} -// ^^^^^^^ -// [cfe] The class 'Pointer' can't be extended outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.NO_GENERATIVE_CONSTRUCTORS_IN_SUPERCLASS -// ^ -// [cfe] The superclass, 'Pointer', has no unnamed constructor that takes no arguments. - -// Cannot implement native natives or Struct. - -// Cannot extend native types. - -class INativeType implements NativeType {} -// ^^^^^^^^^^ -// [cfe] The class 'NativeType' can't be implemented outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class IInt8 implements Int8 {} -// ^^^^ -// [cfe] The class 'Int8' can't be implemented outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class IInt16 implements Int16 {} -// ^^^^^ -// [cfe] The class 'Int16' can't be implemented outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class IInt32 implements Int32 {} -// ^^^^^ -// [cfe] The class 'Int32' can't be implemented outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class IInt64 implements Int64 {} -// ^^^^^ -// [cfe] The class 'Int64' can't be implemented outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class IUint8 implements Uint8 {} -// ^^^^^ -// [cfe] The class 'Uint8' can't be implemented outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class IUint16 implements Uint16 {} -// ^^^^^^ -// [cfe] The class 'Uint16' can't be implemented outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class IUint32 implements Uint32 {} -// ^^^^^^ -// [cfe] The class 'Uint32' can't be implemented outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class IUint64 implements Uint64 {} -// ^^^^^^ -// [cfe] The class 'Uint64' can't be implemented outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class IIntPtr implements IntPtr {} -// ^^^^^^ -// [cfe] The class 'IntPtr' can't be implemented outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY -// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_STRUCT_CLASS -// ^ -// [cfe] Class 'Object' cannot be extended or implemented. - -class IFloat implements Float {} -// ^^^^^ -// [cfe] The class 'Float' can't be implemented outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class IDouble implements Double {} -// ^^^^^^ -// [cfe] The class 'Double' can't be implemented outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class IVoid implements Void {} -// ^^^^ -// [cfe] The class 'Void' can't be implemented outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class INativeFunction implements NativeFunction {} -// ^^^^^^^^^^^^^^ -// [cfe] The class 'NativeFunction' can't be implemented outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class IPointer implements Pointer {} -// ^^^^^^^^ -// [cfe] The non-abstract class 'IPointer' is missing implementations for these members: -// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER -// ^^^^^^^ -// [cfe] The class 'Pointer' can't be implemented outside of its library because it's a final class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class IStruct implements Struct {} -// ^^^^^^^ -// [cfe] Class 'Object' cannot be extended or implemented. -// ^^^^^^ -// [cfe] The class 'Struct' can't be implemented outside of its library because it's a base class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class IOpaque implements Opaque {} -// ^^^^^^^ -// [cfe] Class 'Object' cannot be extended or implemented. -// ^^^^^^ -// [cfe] The class 'Opaque' can't be implemented outside of its library because it's a base class. -// [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - -class MyClass { - int x; - MyClass(this.x); -} - -final testLibrary = dlopenPlatformSpecific("ffi_test_functions"); - -void testHandleVariance() { - // Taking a more specific argument is okay. - testLibrary.lookupFunction( - "PassObjectToC"); - - // Requiring a more specific return type is not, this requires a cast from - // the user. - testLibrary.lookupFunction( - // ^^^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.MUST_BE_A_SUBTYPE - // ^ - // [cfe] Expected type 'MyClass Function(Object)' to be 'Object Function(Object)', which is the Dart type corresponding to 'NativeFunction'. - "PassObjectToC"); -} - -class TestStruct1001 extends Struct { - /**/ Handle handle; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_FIELD_TYPE_IN_STRUCT - // ^ - // [cfe] Field 'handle' requires exactly one annotation to declare its native type, which cannot be Void. dart:ffi Structs and Unions cannot have regular Dart fields. - - Pointer notEmpty; -} - -class TestStruct1002 extends Struct { - /**/ @Handle() - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_CONSTANT_ANNOTATION_CONSTRUCTOR - // ^ - // [cfe] The class 'Handle' is abstract and can't be instantiated. - /**/ Object handle; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_FIELD_TYPE_IN_STRUCT - // ^ - // [cfe] Field 'handle' requires exactly one annotation to declare its native type, which cannot be Void. dart:ffi Structs and Unions cannot have regular Dart fields. - - Pointer notEmpty; -} - -class EmptyStruct extends Struct {} -// ^^^^^^^^^^^ -// [cfe] Struct 'EmptyStruct' is empty. Empty structs and unions are undefined behavior. -// [analyzer] COMPILE_TIME_ERROR.EMPTY_STRUCT - -class EmptyStruct extends Struct {} -// ^^^^^^^^^^^ -// [cfe] 'EmptyStruct' is already declared in this scope. -// [cfe] Struct 'EmptyStruct#1#0' is empty. Empty structs and unions are undefined behavior. -// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION -// [analyzer] COMPILE_TIME_ERROR.EMPTY_STRUCT - -void testEmptyStructLookupFunctionArgument() { - testLibrary.lookupFunction< - // ^ - // [cfe] Expected type 'NativeFunction' to be a valid and instantiated subtype of 'NativeType'. - /**/ Void Function(EmptyStruct), - // ^^^^^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.MUST_BE_A_NATIVE_FUNCTION_TYPE - // ^ - // [cfe] Can't use 'EmptyStruct' because it is declared more than once. - void Function(EmptyStruct)>("DoesNotExist"); - // ^ - // [cfe] Can't use 'EmptyStruct' because it is declared more than once. -} -// [cfe] Can't use 'EmptyStruct' because it is declared more than once. - -class EmptyStruct extends Struct {} -// ^^^^^^^^^^^ -// [cfe] 'EmptyStruct' is already declared in this scope. -// [cfe] Struct 'EmptyStruct#2#0' is empty. Empty structs and unions are undefined behavior. -// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION -// [analyzer] COMPILE_TIME_ERROR.EMPTY_STRUCT - -void testEmptyStructLookupFunctionReturn() { - testLibrary.lookupFunction( - // ^^^^^^^^^^^^^^^^^^^^^^ - // [cfe] Can't use 'EmptyStruct' because it is declared more than once. - // [analyzer] COMPILE_TIME_ERROR.MUST_BE_A_NATIVE_FUNCTION_TYPE - // ^ - // [cfe] Can't use 'EmptyStruct' because it is declared more than once. - // ^ - // [cfe] Expected type 'NativeFunction' to be a valid and instantiated subtype of 'NativeType'. - "DoesNotExist"); -} - -class EmptyStruct extends Struct {} -// ^^^^^^^^^^^ -// [cfe] 'EmptyStruct' is already declared in this scope. -// [cfe] Struct 'EmptyStruct#3#0' is empty. Empty structs and unions are undefined behavior. -// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION -// [analyzer] COMPILE_TIME_ERROR.EMPTY_STRUCT - -void testEmptyStructAsFunctionArgument() { - final Pointer> pointer = - // ^ - // [cfe] Can't use 'EmptyStruct' because it is declared more than once. - Pointer.fromAddress(1234); - pointer.asFunction(); - // ^ - // [cfe] Can't use 'EmptyStruct' because it is declared more than once. - // ^ - // [cfe] Expected type 'NativeFunction' to be a valid and instantiated subtype of 'NativeType'. - // ^^^^^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_NATIVE_FUNCTION_TYPE_ARGUMENT_TO_POINTER -} - -class EmptyStruct extends Struct {} -// ^^^^^^^^^^^ -// [cfe] 'EmptyStruct' is already declared in this scope. -// [cfe] Struct 'EmptyStruct#4#0' is empty. Empty structs and unions are undefined behavior. -// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION -// [analyzer] COMPILE_TIME_ERROR.EMPTY_STRUCT - -void testEmptyStructAsFunctionReturn() { - final Pointer> pointer = - // ^ - // [cfe] Can't use 'EmptyStruct' because it is declared more than once. - Pointer.fromAddress(1234); - pointer.asFunction(); - // ^^^^^^^^^^^^^^^^^^^^^^ - // [cfe] Can't use 'EmptyStruct' because it is declared more than once. - // [analyzer] COMPILE_TIME_ERROR.NON_NATIVE_FUNCTION_TYPE_ARGUMENT_TO_POINTER - // ^ - // [cfe] Expected type 'NativeFunction' to be a valid and instantiated subtype of 'NativeType'. -} - -class EmptyStruct extends Struct {} -// ^^^^^^^^^^^ -// [cfe] 'EmptyStruct' is already declared in this scope. -// [cfe] Struct 'EmptyStruct#5#0' is empty. Empty structs and unions are undefined behavior. -// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION -// [analyzer] COMPILE_TIME_ERROR.EMPTY_STRUCT - -void _consumeEmptyStruct(EmptyStruct e) => print(e); -// ^ -// [cfe] 'EmptyStruct' isn't a type. -// [cfe] Can't use 'EmptyStruct' because it is declared more than once. - -void testEmptyStructFromFunctionArgument() { - Pointer.fromFunction(_consumeEmptyStruct); - // ^ - // [cfe] Expected type 'NativeFunction' to be a valid and instantiated subtype of 'NativeType'. - // ^ - // [cfe] Can't use 'EmptyStruct' because it is declared more than once. - // ^^^^^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.MUST_BE_A_NATIVE_FUNCTION_TYPE -} - -class EmptyStruct extends Struct {} -// ^^^^^^^^^^^ -// [cfe] 'EmptyStruct' is already declared in this scope. -// [cfe] Struct 'EmptyStruct#6#0' is empty. Empty structs and unions are undefined behavior. -// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION -// [analyzer] COMPILE_TIME_ERROR.EMPTY_STRUCT - -/**/ EmptyStruct _returnEmptyStruct() => EmptyStruct(); -// ^^^^^^^^^^^ -// [cfe] Can't use 'EmptyStruct' because it is declared more than once. -// [analyzer] COMPILE_TIME_ERROR.CREATION_OF_STRUCT_OR_UNION -// ^ -// [cfe] 'EmptyStruct' isn't a type. - -void testEmptyStructFromFunctionReturn() { - Pointer.fromFunction(_returnEmptyStruct); - // ^^^^^^^^^^^^^^^^^^^^^^ - // [cfe] Can't use 'EmptyStruct' because it is declared more than once. - // [analyzer] COMPILE_TIME_ERROR.MUST_BE_A_NATIVE_FUNCTION_TYPE - // ^ - // [cfe] Expected type 'NativeFunction' to be a valid and instantiated subtype of 'NativeType'. -} - -class EmptyStruct extends Struct {} -// ^^^^^^^^^^^ -// [cfe] 'EmptyStruct' is already declared in this scope. -// [cfe] Struct 'EmptyStruct#7#0' is empty. Empty structs and unions are undefined behavior. -// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION -// [analyzer] COMPILE_TIME_ERROR.EMPTY_STRUCT - -class HasNestedEmptyStruct extends Struct { - EmptyStruct nestedEmptyStruct; -//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.EMPTY_STRUCT - // ^ - // [cfe] Field 'nestedEmptyStruct' requires exactly one annotation to declare its native type, which cannot be Void. dart:ffi Structs and Unions cannot have regular Dart fields. -//^ - // [cfe] 'EmptyStruct' isn't a type. - // [cfe] Can't use 'EmptyStruct' because it is declared more than once. - - Pointer notEmpty; -} - -void testAllocateGeneric() { - Pointer generic() { - Pointer pointer = nullptr; - pointer = calloc(); - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_CONSTANT_TYPE_ARGUMENT - // ^ - // [cfe] Expected type 'T' to be a valid and instantiated subtype of 'NativeType'. - return pointer; - } - - Pointer p = generic(); -} - -void testAllocateNativeType() { - /**/ calloc(); - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_CONSTANT_TYPE_ARGUMENT - // ^ - // [cfe] Expected type 'NativeType' to be a valid and instantiated subtype of 'NativeType'. -} - -void testRefStruct() { - final myStructPointer = calloc(); - Pointer structPointer = myStructPointer; - /**/ structPointer.ref; - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_CONSTANT_TYPE_ARGUMENT - // ^ - // [cfe] Expected type 'Struct' to be a valid and instantiated subtype of 'NativeType'. - calloc.free(myStructPointer); -} - -T genericRef(Pointer p) => p.ref; -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_CONSTANT_TYPE_ARGUMENT -// ^ -// [cfe] Expected type 'T' to be a valid and instantiated subtype of 'NativeType'. - -T genericRef2(Pointer p) => p.cast().ref; -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_CONSTANT_TYPE_ARGUMENT -// ^ -// [cfe] Expected type 'T' to be a valid and instantiated subtype of 'NativeType'. - -T genericRef3(Pointer p) => p[0]; -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_CONSTANT_TYPE_ARGUMENT -// ^ -// [cfe] Expected type 'T' to be a valid and instantiated subtype of 'NativeType'. - -T genericRef4(Array p) => p[0]; -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_CONSTANT_TYPE_ARGUMENT -// ^ -// [cfe] Expected type 'T' to be a valid and instantiated subtype of 'NativeType'. - -void testSizeOfGeneric() { - int generic() { - int size = sizeOf(); - size = sizeOf(); - // ^^^^^^^^^^^ - // [cfe] Expected type 'T' to be a valid and instantiated subtype of 'NativeType'. - // [analyzer] COMPILE_TIME_ERROR.NON_CONSTANT_TYPE_ARGUMENT - return size; - } - - int size = generic>(); -} - -void testSizeOfNativeType() { - sizeOf(); -//^^^^^^^^ - // [cfe] Expected type 'NativeType' to be a valid and instantiated subtype of 'NativeType'. - // [analyzer] COMPILE_TIME_ERROR.NON_CONSTANT_TYPE_ARGUMENT -} - -void testSizeOfHandle() { - sizeOf(); -//^^^^^^^^^^^^^^^^ - // [cfe] Expected type 'Handle' to be a valid and instantiated subtype of 'NativeType'. - // [analyzer] COMPILE_TIME_ERROR.NON_CONSTANT_TYPE_ARGUMENT -} - -void testElementAtGeneric() { - Pointer generic(Pointer pointer) { - Pointer returnValue = pointer; - returnValue = returnValue.elementAt(1); - // ^^^^^^^^^ - // [cfe] The method 'elementAt' isn't defined for the class 'Pointer'. - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD - return returnValue; - } - - Pointer p = calloc(); - p.elementAt(1); - generic(p); - calloc.free(p); -} - -void testElementAtNativeType() { - Pointer p = calloc(); - p.elementAt(1); - Pointer p2 = p; - p2.elementAt(1); - // ^^^^^^^^^ - // [cfe] The method 'elementAt' isn't defined for the class 'Pointer'. - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD - calloc.free(p); -} - -class TestStruct1400 extends Struct { - @Array(8) - @Array(8) -//^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_SIZE_ANNOTATION_CARRAY - Array a0; - // ^ - // [cfe] Field 'a0' must have exactly one 'Array' annotation. -} - -class TestStruct1401 extends Struct { - /**/ Array a0; - // ^ - // [cfe] Field 'a0' must have exactly one 'Array' annotation. - // ^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.MISSING_SIZE_ANNOTATION_CARRAY - - Pointer notEmpty; -} - -class TestStruct1402 extends Struct { - /**/ @Array(8, 8, 8) - // ^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.SIZE_ANNOTATION_DIMENSIONS - Array> a0; - // ^ - // [cfe] Field 'a0' must have an 'Array' annotation that matches the dimensions. - - Pointer notEmpty; -} - -class TestStruct1403 extends Struct { - /**/ @Array(8, 8) - // ^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.SIZE_ANNOTATION_DIMENSIONS - Array>> a0; - // ^ - // [cfe] Field 'a0' must have an 'Array' annotation that matches the dimensions. - - Pointer notEmpty; -} - -class TestStruct1404 extends Struct { - /**/ @Array.multi([8, 8, 8]) - // ^^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.SIZE_ANNOTATION_DIMENSIONS - Array> a0; - // ^ - // [cfe] Field 'a0' must have an 'Array' annotation that matches the dimensions. - - Pointer notEmpty; -} - -class TestStruct1405 extends Struct { - /**/ @Array.multi([8, 8]) - // ^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.SIZE_ANNOTATION_DIMENSIONS - Array>> a0; - // ^ - // [cfe] Field 'a0' must have an 'Array' annotation that matches the dimensions. - - Pointer notEmpty; -} - -void testLookupFunctionIsLeafMustBeConst() { - bool notAConst = false; - DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library"); - /**/ l.lookupFunction("timesFour", - // ^ - // [cfe] Argument 'isLeaf' must be a constant. - isLeaf: notAConst); - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_MUST_BE_A_CONSTANT -} - -void testAsFunctionIsLeafMustBeConst() { - bool notAConst = false; - Pointer> p = Pointer.fromAddress(1337); - IntUnOp f = p.asFunction(isLeaf: notAConst); - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_MUST_BE_A_CONSTANT - // ^ - // [cfe] Argument 'isLeaf' must be a constant. -} - -typedef NativeTakesHandle = Void Function(Handle); -typedef TakesHandle = void Function(Object); - -void testLookupFunctionTakesHandle() { - DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library"); - l.lookupFunction("takesHandle", isLeaf: true); - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.LEAF_CALL_MUST_NOT_TAKE_HANDLE - //^ - // [cfe] FFI leaf call must not have Handle argument types. -} - -void testAsFunctionTakesHandle() { - Pointer> p = Pointer.fromAddress(1337); - TakesHandle f = p.asFunction(isLeaf: true); - // ^^^^^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.LEAF_CALL_MUST_NOT_TAKE_HANDLE - // ^ - // [cfe] FFI leaf call must not have Handle argument types. -} - -typedef NativeReturnsHandle = Handle Function(); -typedef ReturnsHandle = Object Function(); - -void testLookupFunctionReturnsHandle() { - DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library"); - /**/ l.lookupFunction("returnsHandle", - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.LEAF_CALL_MUST_NOT_RETURN_HANDLE - // ^ - // [cfe] FFI leaf call must not have Handle return type. - isLeaf: true); -} - -void testAsFunctionReturnsHandle() { - Pointer> p = Pointer.fromAddress(1337); - ReturnsHandle f = p.asFunction(isLeaf: true); - // ^^^^^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.LEAF_CALL_MUST_NOT_RETURN_HANDLE - // ^ - // [cfe] FFI leaf call must not have Handle return type. -} - -@Packed(1) -class TestStruct1600 extends Struct { - Pointer notEmpty; -} - -@Packed(1) -/**/ @Packed(1) -// ^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.PACKED_ANNOTATION -class TestStruct1601 extends Struct { - // ^ - // [cfe] Struct 'TestStruct1601' must have at most one 'Packed' annotation. - Pointer notEmpty; -} - -@Packed(3) -// ^ -// [analyzer] COMPILE_TIME_ERROR.PACKED_ANNOTATION_ALIGNMENT -class TestStruct1602 extends Struct { - // ^ - // [cfe] Only packing to 1, 2, 4, 8, and 16 bytes is supported. - Pointer notEmpty; -} - -@Packed(0) -// ^ -// [analyzer] COMPILE_TIME_ERROR.PACKED_ANNOTATION_ALIGNMENT -class TestStruct1607 extends Struct { - // ^ - // [cfe] Only packing to 1, 2, 4, 8, and 16 bytes is supported. - Pointer notEmpty; -} - -class TestStruct1800 extends Struct { - Pointer notEmpty; - - @Array(-1) - // ^^ - // [analyzer] COMPILE_TIME_ERROR.NON_POSITIVE_ARRAY_DIMENSION - Array inlineArray; - // ^ - // [cfe] Array dimensions must be positive numbers. -} - -class TestStruct1801 extends Struct { - Pointer notEmpty; - - /**/ @Array(1, -1) - // ^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.SIZE_ANNOTATION_DIMENSIONS - // ^^ - // [analyzer] COMPILE_TIME_ERROR.NON_POSITIVE_ARRAY_DIMENSION - Array inlineArray; - // ^ - // [cfe] Array dimensions must be positive numbers. - // [cfe] Field 'inlineArray' must have an 'Array' annotation that matches the dimensions. -} - -class TestStruct1802 extends Struct { - Pointer notEmpty; - - /**/ @Array.multi([2, 2, 2, 2, 2, 2, -1]) - // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.SIZE_ANNOTATION_DIMENSIONS - // ^^ - // [analyzer] COMPILE_TIME_ERROR.NON_POSITIVE_ARRAY_DIMENSION - Array inlineArray; - // ^ - // [cfe] Array dimensions must be positive numbers. - // [cfe] Field 'inlineArray' must have an 'Array' annotation that matches the dimensions. -} - -@AbiSpecificIntegerMapping({ - Abi.androidArm: Uint32(), - Abi.androidArm64: IntPtr(), - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ABI_SPECIFIC_INTEGER_MAPPING_UNSUPPORTED - Abi.androidIA32: AbiSpecificInteger1(), - // ^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ABI_SPECIFIC_INTEGER_MAPPING_UNSUPPORTED -}) -/**/ @AbiSpecificIntegerMapping({}) -// ^^^^^^^^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ABI_SPECIFIC_INTEGER_MAPPING_EXTRA -class AbiSpecificInteger1 extends AbiSpecificInteger { - // ^^^^^^^^^^^^^^^^^^^ - // [cfe] Classes extending 'AbiSpecificInteger' must have exactly one 'AbiSpecificIntegerMapping' annotation specifying the mapping from ABI to a NativeType integer with a fixed size. - // [cfe] Classes extending 'AbiSpecificInteger' must have exactly one const constructor, no other members, and no type arguments. - // [analyzer] COMPILE_TIME_ERROR.ABI_SPECIFIC_INTEGER_INVALID - const AbiSpecificInteger1(); - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD - // [cfe] Constructor is marked 'const' so all fields must be final. - - int get a => 4; - - int b; -} - -class AbiSpecificInteger2 implements AbiSpecificInteger { - // ^^^^^^^^^^^^^^^^^^^ - // [cfe] Class 'Object' cannot be extended or implemented. - // ^^^^^^^^^^^^^^^^^^ - // [cfe] The class 'AbiSpecificInteger' can't be implemented outside of its library because it's a base class. - // [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - const AbiSpecificInteger2(); -} - -class AbiSpecificInteger3 extends AbiSpecificInteger1 { - // ^^^^^^^^^^^^^^^^^^^ - // [cfe] Class 'AbiSpecificInteger1' cannot be extended or implemented. - // [cfe] Classes extending 'AbiSpecificInteger' must have exactly one 'AbiSpecificIntegerMapping' annotation specifying the mapping from ABI to a NativeType integer with a fixed size. - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_STRUCT_CLASS - const AbiSpecificInteger3(); - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD -} - -class AbiSpecificInteger4 implements AbiSpecificInteger1 { - // ^^^^^^^^^^^^^^^^^^^ - // [cfe] Class 'Object' cannot be extended or implemented. - // [cfe] The non-abstract class 'AbiSpecificInteger4' is missing implementations for these members: - // [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER - // ^^^^^^^^^^^^^^^^^^^ - // [cfe] The class 'AbiSpecificInteger' can't be implemented outside of its library because it's a base class. - // [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_STRUCT_CLASS - // [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - // [analyzer] COMPILE_TIME_ERROR.INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY - const AbiSpecificInteger4(); -} - -class MyFinalizableStruct extends Struct implements Finalizable { - // ^^^^^^^^^^^^^^^^^^^ - // [cfe] Struct 'MyFinalizableStruct' can't implement Finalizable. - // [analyzer] COMPILE_TIME_ERROR.COMPOUND_IMPLEMENTS_FINALIZABLE - Pointer field; -} diff --git a/tests/ffi_2/vmspecific_variance_function_checks_test.dart b/tests/ffi_2/vmspecific_variance_function_checks_test.dart deleted file mode 100644 index 0241e41bce9..00000000000 --- a/tests/ffi_2/vmspecific_variance_function_checks_test.dart +++ /dev/null @@ -1,69 +0,0 @@ -// 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. -// -// SharedObjects=ffi_test_functions - -// @dart = 2.9 - -import 'dart:ffi'; - -import 'dylib_utils.dart'; - -// ============================================ -// Tests checks on Dart to native (asFunction). -// ============================================ - -typedef Int64PointerParamOpDart = void Function(Pointer); -typedef Int64PointerParamOp = Void Function(Pointer); -typedef Int64PointerReturnOp = Pointer Function(); -typedef NaTyPointerReturnOp = Pointer Function(); - -final paramOpName = "NativeTypePointerParam"; -final returnOpName = "NativeTypePointerReturn"; - -final DynamicLibrary ffiTestFunctions = - dlopenPlatformSpecific("ffi_test_functions"); - -final p1 = - ffiTestFunctions.lookup>(paramOpName); -final nonInvariantBinding1 = //# 1: compile-time error - p1.asFunction(); //# 1: continued - -final p2 = - ffiTestFunctions.lookup>(returnOpName); -final nonInvariantBinding2 = //# 2: compile-time error - p2.asFunction(); //# 2: continued - -final p3 = Pointer< - NativeFunction< - Pointer Function()>> - Function()>>.fromAddress(0x1234); -final f3 = p3 //# 10: compile-time error - .asFunction< //# 10: continued - Pointer< //# 10: continued - NativeFunction< //# 10: continued - Pointer Function()>> //# 10: continued - Function()>(); //# 10: continued - -// =========================================================== -// Test check on callbacks from native to Dart (fromFunction). -// =========================================================== - -void naTyPointerParamOp(Pointer p) { - final Pointer asInt8 = p.cast(); - asInt8.value = 42; -} - -Pointer int64PointerReturnOp() { - return Pointer.fromAddress(0x13370000); -} - -final implicitDowncast1 = //# 3: compile-time error - Pointer.fromFunction(//# 3: continued - naTyPointerParamOp); //# 3: continued -final implicitDowncast2 = //# 4: compile-time error - Pointer.fromFunction(//# 4: continued - int64PointerReturnOp); //# 4: continued - -void main() {} diff --git a/tests/language_2/abstract/beats_arguments_test.dart b/tests/language_2/abstract/beats_arguments_test.dart deleted file mode 100644 index dc1ac1ada2a..00000000000 --- a/tests/language_2/abstract/beats_arguments_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -// TODO(rnystrom): This test should be renamed since now it's just about -// testing that constructing an abstract class generates an error. - -abstract class A { - A() {} -} - -void main() { - new A(); - // ^ - // [analyzer] COMPILE_TIME_ERROR.INSTANTIATE_ABSTRACT_CLASS - // [cfe] The class 'A' is abstract and can't be instantiated. -} diff --git a/tests/language_2/abstract/equal_test.dart b/tests/language_2/abstract/equal_test.dart deleted file mode 100644 index 37c49826ec1..00000000000 --- a/tests/language_2/abstract/equal_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// 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. - -// @dart = 2.9 - -class A { - bool operator ==(other); - const A(); -} - -class B implements A { - const B(); -} - -class C extends A { - const C(); -} - -class Invalid { - bool operator ==(other) => false; - const Invalid(); -} - -class D implements Invalid { - const D(); -} - -main() { - print(const {A(): 1}); - print(const {B(): 2}); - print(const {C(): 3}); - print(const {D(): 4}); -} diff --git a/tests/language_2/abstract/exact_selector_runtime_test.dart b/tests/language_2/abstract/exact_selector_runtime_test.dart deleted file mode 100644 index eb8d0c8727c..00000000000 --- a/tests/language_2/abstract/exact_selector_runtime_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Regression test for dart2js that used to duplicate some `Object` -// methods to handle `noSuchMethod`. - -import "package:expect/expect.dart"; - -class Foo { - noSuchMethod(im) => 42; -} - -@pragma('vm:never-inline') -@pragma('dart2js:noInline') -returnFoo() { - (() => 42)(); - return new Foo(); -} - -class Bar { - operator ==(other) => false; -} - -var a = [false, true, new Object(), new Bar()]; - -main() { - if (a[0]) { - // This `==` call will make the compiler create a selector with an - // exact `TypeMask` of `Foo`. Since `Foo` is abstract, such a call - // cannot happen, but we still used to generate a `==` method on - // the `Object` class to handle `noSuchMethod`. - print(returnFoo() == 42); - } else { - Expect.isFalse(a[2] == 42); - } -} diff --git a/tests/language_2/abstract/exact_selector_test.dart b/tests/language_2/abstract/exact_selector_test.dart deleted file mode 100644 index dff88cb1261..00000000000 --- a/tests/language_2/abstract/exact_selector_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to duplicate some `Object` -// methods to handle `noSuchMethod`. - -import "package:expect/expect.dart"; - -abstract class Foo { - noSuchMethod(im) => 42; -} - -@pragma('vm:never-inline') -@pragma('dart2js:noInline') -returnFoo() { - (() => 42)(); - return new Foo(); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.INSTANTIATE_ABSTRACT_CLASS - // [cfe] The class 'Foo' is abstract and can't be instantiated. -} - -class Bar { - operator ==(other) => false; -} - -var a = [false, true, new Object(), new Bar()]; - -main() { - if (a[0]) { - // This `==` call will make the compiler create a selector with an - // exact `TypeMask` of `Foo`. Since `Foo` is abstract, such a call - // cannot happen, but we still used to generate a `==` method on - // the `Object` class to handle `noSuchMethod`. - print(returnFoo() == 42); - } else { - Expect.isFalse(a[2] == 42); - } -} diff --git a/tests/language_2/abstract/factory_constructor_runtime_test.dart b/tests/language_2/abstract/factory_constructor_runtime_test.dart deleted file mode 100644 index fc7b3517c50..00000000000 --- a/tests/language_2/abstract/factory_constructor_runtime_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 test program for constructors and initializers. - -// Exercises issue 2282, factory constructors in abstract classes should -// not emit a static type warning - -class B extends A1 { - B() {} - method() {} -} - -abstract class A1 { - A1() {} - method(); // Abstract. - factory A1.make() { - return new B(); - } -} - -class A2 { - // Intentionally abstract method. - - A2.make() {} -} - -main() { - new A1.make(); - -} diff --git a/tests/language_2/abstract/factory_constructor_test.dart b/tests/language_2/abstract/factory_constructor_test.dart deleted file mode 100644 index fbfe12e0f12..00000000000 --- a/tests/language_2/abstract/factory_constructor_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2012, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Exercises issue 2282, factory constructors in abstract classes should -// not emit a static type warning - -class B extends A1 { - B() {} - method() {} -} - -abstract class A1 { - A1() {} - method(); // Abstract. - factory A1.make() { - return new B(); - } -} - -class A2 { -// ^ -// [cfe] The non-abstract class 'A2' is missing implementations for these members: - - // Intentionally abstract method. - method(); -//^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER - A2.make() {} -} - -main() { - new A1.make(); - new A2.make(); -} diff --git a/tests/language_2/abstract/getter2_test.dart b/tests/language_2/abstract/getter2_test.dart deleted file mode 100644 index e1154d9fd7c..00000000000 --- a/tests/language_2/abstract/getter2_test.dart +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -class A { - int get x => 100; -} - -abstract class B extends A { - int _x; - - int get x; - set x(int v) { - _x = v; - } -} - -class C extends B { - int get x => super.x; -} - -class GetterConcrete { - var _foo; - - get foo => _foo; - set foo(x) => _foo = x; - - var _bar; - - get bar => _bar; - set bar(x) => _bar = x; -} - -class AbstractGetterOverride1 extends GetterConcrete { - get foo; - set bar(x); -} - -class AbstractGetterOverride2 extends Object with GetterConcrete { - get foo; - set bar(x); -} - -void main() { - B b = new C(); - b.x = 42; - Expect.equals(b._x, 42); - Expect.equals(b.x, 100); - - /// Tests that overriding either the getter or setter with an abstract member - /// has no effect. - /// Regression test for https://github.com/dart-lang/sdk/issues/29914 - var c1 = AbstractGetterOverride1() - ..foo = 123 - ..bar = 456; - Expect.equals(c1.foo, 123); - Expect.equals(c1.bar, 456); - - var c2 = AbstractGetterOverride2() - ..foo = 123 - ..bar = 456; - Expect.equals(c2.foo, 123); - Expect.equals(c2.bar, 456); -} diff --git a/tests/language_2/abstract/getter_test.dart b/tests/language_2/abstract/getter_test.dart deleted file mode 100644 index 6c3b06a3280..00000000000 --- a/tests/language_2/abstract/getter_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test to ensure that an abstract getter is not mistaken for a field. - -class Foo { -// ^ -// [cfe] The non-abstract class 'Foo' is missing implementations for these members: - - // Intentionally abstract: - get i; -//^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER -} - -class Bar {} - -checkIt(f) { - Expect.throwsNoSuchMethodError(() => f.i = 'hi'); - Expect.throwsNoSuchMethodError(() => print(f.i)); - Expect.throwsNoSuchMethodError(() => print(f.i())); -} - -main() { - checkIt(new Foo()); - checkIt(new Bar()); -} diff --git a/tests/language_2/abstract/method_test.dart b/tests/language_2/abstract/method_test.dart deleted file mode 100644 index fb856c8f6ad..00000000000 --- a/tests/language_2/abstract/method_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -// Checks that abstract instance methods are correctly resolved. - -int get length => throw "error: top-level getter called"; -set height(x) { - throw "error: top-level setter called"; -} - -width() { - throw "error: top-level function called"; -} - -abstract class A { - int get length; // Abstract instance getter. - set height(int x); // Abstract instance setter. - int width(); // Abstract instance method. - - // Must resolve to non-abstract length getter in subclass. - get useLength => length; - // Must resolve to non-abstract height setter in subclass. - setHeight(x) => height = x; - // Must resolve to non-abstract width() method in subclass. - useWidth() => width(); -} - -class A1 extends A { - int length; // Implies a length getter. - int height; // Implies a height setter. - int width() => 345; - A1(this.length); -} - -main() { - var a = new A1(123); - Expect.equals(123, a.useLength); - a.setHeight(234); - Expect.equals(234, a.height); - Expect.equals(345, a.useWidth()); - print([a.useLength, a.height, a.useWidth()]); -} diff --git a/tests/language_2/abstract/object_method_test.dart b/tests/language_2/abstract/object_method_test.dart deleted file mode 100644 index 87a9e85f155..00000000000 --- a/tests/language_2/abstract/object_method_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A { - noSuchMethod(_) { - Expect.fail('Should not reach here'); - } -} - -class B extends A { - operator ==(other); -} - -class C extends B {} - -var a = [new C()]; - -main() { - C c = a[0]; - a.add(c); - Expect.isTrue(c == a[1]); -} diff --git a/tests/language_2/abstract/override_adds_optional_args_concrete_subclass_test.dart b/tests/language_2/abstract/override_adds_optional_args_concrete_subclass_test.dart deleted file mode 100644 index d60e4ebfff3..00000000000 --- a/tests/language_2/abstract/override_adds_optional_args_concrete_subclass_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2017, 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 - -class A { - void foo() {} -} - -abstract class B extends A { - // If this class were concrete, there would be a problem, since `new - // B().foo(42)` would be statically allowed, but would lead to invalid - // arguments being passed to A.foo. But since the class is abstract, there is - // no problem. - void foo([x]); -} - -class C extends B { -// ^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_IMPLEMENTATION_OVERRIDE -// [cfe] The implementation of 'foo' in the non-abstract class 'C' does not conform to its interface. - - // However, there is a problem here because this class is concrete and doesn't - // override foo. -} - -void f(B b) { - b.foo(); -} - -main() { - f(new C()); -} diff --git a/tests/language_2/abstract/override_adds_optional_args_concrete_test.dart b/tests/language_2/abstract/override_adds_optional_args_concrete_test.dart deleted file mode 100644 index 69e5586074b..00000000000 --- a/tests/language_2/abstract/override_adds_optional_args_concrete_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2017, 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 - -class A { - void foo() {} -} - -class B extends A { -// ^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_IMPLEMENTATION_OVERRIDE -// [cfe] The implementation of 'foo' in the non-abstract class 'B' does not conform to its interface. - - // This class declaration violates soundness, since it allows `new - // B().foo(42)`, which would lead to invalid arguments being passed to A.foo. - void foo([x]); -} - -void f(B b) { - b.foo(); -} - -main() { - f(new B()); -} diff --git a/tests/language_2/abstract/override_adds_optional_args_supercall_test.dart b/tests/language_2/abstract/override_adds_optional_args_supercall_test.dart deleted file mode 100644 index 91dca0dbc85..00000000000 --- a/tests/language_2/abstract/override_adds_optional_args_supercall_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2017, 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 - -class A { - void foo() {} -} - -abstract class B extends A { - // If this class were concrete, there would be a problem, since `new - // B().foo(42)` would be statically allowed, but would lead to invalid - // arguments being passed to A.foo. But since the class is abstract, there is - // no problem. - void foo([x]); -} - -class C extends B { - void foo([x]) { - // But it is a problem to try to pass `x` along to super, since the super - // method is A.foo. - super.foo(x); - // ^ - // [cfe] Too many positional arguments: 0 allowed, but 1 found. - // ^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS - } -} - -void f(B b) { - b.foo(42); -} - -main() { - f(new C()); -} diff --git a/tests/language_2/abstract/override_adds_optional_args_test.dart b/tests/language_2/abstract/override_adds_optional_args_test.dart deleted file mode 100644 index b740d588949..00000000000 --- a/tests/language_2/abstract/override_adds_optional_args_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2017, 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 - -// This test exercises a corner case of override checking that is safe from a -// soundness perspective, but which we haven't decided whether or not to allow -// from a usability perspective. - -class A { - void foo() {} -} - -abstract class B extends A { - // If this class were concrete, there would be a problem, since `new - // B().foo(42)` would be statically allowed, but would lead to invalid - // arguments being passed to A.foo. But since the class is abstract, there is - // no problem. - void foo([x]); -} - -class C extends B { - void foo([x]) { - super.foo(); - } -} - -void f(B b) { - b.foo(42); -} - -main() { - f(new C()); -} diff --git a/tests/language_2/abstract/syntax_runtime_test.dart b/tests/language_2/abstract/syntax_runtime_test.dart deleted file mode 100644 index 58d46126130..00000000000 --- a/tests/language_2/abstract/syntax_runtime_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 "package:expect/expect.dart"; - -main() { - var b = new B(); - Expect.equals(42, b.foo()); -} - -class A { - - -} - -class B extends A { - foo() => 42; - bar() => 87; -} diff --git a/tests/language_2/abstract/syntax_test.dart b/tests/language_2/abstract/syntax_test.dart deleted file mode 100644 index 028ba03bc1f..00000000000 --- a/tests/language_2/abstract/syntax_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - var b = new B(); - Expect.equals(42, b.foo()); -} - -class A { -// ^ -// [cfe] The non-abstract class 'A' is missing implementations for these members: - foo(); -//^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER - static bar(); - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_FUNCTION_BODY - // [cfe] Expected a function body or '=>'. -} - -class B extends A { - foo() => 42; - bar() => 87; -} diff --git a/tests/language_2/accessor_conflict/export2_helper.dart b/tests/language_2/accessor_conflict/export2_helper.dart deleted file mode 100644 index aeaabb713ee..00000000000 --- a/tests/language_2/accessor_conflict/export2_helper.dart +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2016, 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 - -export "setter.dart"; -export "getter.dart"; diff --git a/tests/language_2/accessor_conflict/export2_test.dart b/tests/language_2/accessor_conflict/export2_test.dart deleted file mode 100644 index fa0974c8085..00000000000 --- a/tests/language_2/accessor_conflict/export2_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2016, 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 - -// Verify that a getter and its corresponding setter can be imported from two -// different files via a common export. In this test the setter is imported -// first. - -import "package:expect/expect.dart"; - -import "export2_helper.dart"; - -main() { - getValue = 123; - Expect.equals(x, 123); - x = 456; - Expect.equals(setValue, 456); -} diff --git a/tests/language_2/accessor_conflict/export_helper.dart b/tests/language_2/accessor_conflict/export_helper.dart deleted file mode 100644 index 0cdfeb702ff..00000000000 --- a/tests/language_2/accessor_conflict/export_helper.dart +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2016, 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 - -export "getter.dart"; -export "setter.dart"; diff --git a/tests/language_2/accessor_conflict/export_test.dart b/tests/language_2/accessor_conflict/export_test.dart deleted file mode 100644 index 07e3273c480..00000000000 --- a/tests/language_2/accessor_conflict/export_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2016, 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 - -// Verify that a getter and its corresponding setter can be imported from two -// different files via a common export. In this test the getter is imported -// first. - -import "package:expect/expect.dart"; - -import "export_helper.dart"; - -main() { - getValue = 123; - Expect.equals(x, 123); - x = 456; - Expect.equals(setValue, 456); -} diff --git a/tests/language_2/accessor_conflict/getter.dart b/tests/language_2/accessor_conflict/getter.dart deleted file mode 100644 index ee5e14e6cb7..00000000000 --- a/tests/language_2/accessor_conflict/getter.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2016, 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 - -var getValue; - -get x => getValue; diff --git a/tests/language_2/accessor_conflict/import2_test.dart b/tests/language_2/accessor_conflict/import2_test.dart deleted file mode 100644 index 52f2fb0942d..00000000000 --- a/tests/language_2/accessor_conflict/import2_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2016, 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 - -// Verify that a getter and its corresponding setter can be imported from two -// different files. In this test the setter is imported first. - -import "package:expect/expect.dart"; - -import "setter.dart"; -import "getter.dart"; - -main() { - getValue = 123; - Expect.equals(x, 123); - x = 456; - Expect.equals(setValue, 456); -} diff --git a/tests/language_2/accessor_conflict/import_prefixed2_test.dart b/tests/language_2/accessor_conflict/import_prefixed2_test.dart deleted file mode 100644 index 267ebf4b792..00000000000 --- a/tests/language_2/accessor_conflict/import_prefixed2_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2016, 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 - -// Verify that a getter and its corresponding setter can be imported from two -// different files. In this test the setter is imported first. - -import "package:expect/expect.dart"; - -import "setter.dart" as p; -import "getter.dart" as p; - -main() { - p.getValue = 123; - Expect.equals(p.x, 123); - p.x = 456; - Expect.equals(p.setValue, 456); -} diff --git a/tests/language_2/accessor_conflict/import_prefixed_test.dart b/tests/language_2/accessor_conflict/import_prefixed_test.dart deleted file mode 100644 index 8fa2bcc07eb..00000000000 --- a/tests/language_2/accessor_conflict/import_prefixed_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2016, 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 - -// Verify that a getter and its corresponding setter can be imported from two -// different files. In this test the getter is imported first. - -import "package:expect/expect.dart"; - -import "getter.dart" as p; -import "setter.dart" as p; - -main() { - p.getValue = 123; - Expect.equals(p.x, 123); - p.x = 456; - Expect.equals(p.setValue, 456); -} diff --git a/tests/language_2/accessor_conflict/import_test.dart b/tests/language_2/accessor_conflict/import_test.dart deleted file mode 100644 index aad3437db8f..00000000000 --- a/tests/language_2/accessor_conflict/import_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2016, 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 - -// Verify that a getter and its corresponding setter can be imported from two -// different files. In this test the getter is imported first. - -import "package:expect/expect.dart"; - -import "getter.dart"; -import "setter.dart"; - -main() { - getValue = 123; - Expect.equals(x, 123); - x = 456; - Expect.equals(setValue, 456); -} diff --git a/tests/language_2/accessor_conflict/setter.dart b/tests/language_2/accessor_conflict/setter.dart deleted file mode 100644 index 559f7d15823..00000000000 --- a/tests/language_2/accessor_conflict/setter.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2016, 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 - -var setValue; - -set x(value) { - setValue = value; -} diff --git a/tests/language_2/argument/assignability_function_typed_runtime_1_test.dart b/tests/language_2/argument/assignability_function_typed_runtime_1_test.dart deleted file mode 100644 index 909f90c901a..00000000000 --- a/tests/language_2/argument/assignability_function_typed_runtime_1_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -// [NNBD non-migrated] Note: This test is specific to legacy mode and -// deliberately does not have a counter-part in language/. - -import "package:expect/expect.dart"; - -void f(num callback(num x)) {} - -Object intToObject(int x) => null; -Object numToObject(num x) => null; -Object objectToObject(Object x) => null; -int intToInt(int x) => null; -int numToInt(num x) => null; -int objectToInt(Object x) => null; -num intToNum(int x) => null; -num numToNum(num x) => null; -num objectToNum(Object x) => null; - -main() { - // Unrelated types (not assignable) - - - - // Assignable but fails at runtime. - var intToObject2 = intToObject; - Expect.throwsTypeError(() => f(intToObject2)); - var intToNum2 = intToNum; - - var numToObject2 = numToObject; - - - // Ok - - - - -} diff --git a/tests/language_2/argument/assignability_function_typed_runtime_2_test.dart b/tests/language_2/argument/assignability_function_typed_runtime_2_test.dart deleted file mode 100644 index d77618c0101..00000000000 --- a/tests/language_2/argument/assignability_function_typed_runtime_2_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -// [NNBD non-migrated] Note: This test is specific to legacy mode and -// deliberately does not have a counter-part in language/. - -import "package:expect/expect.dart"; - -void f(num callback(num x)) {} - -Object intToObject(int x) => null; -Object numToObject(num x) => null; -Object objectToObject(Object x) => null; -int intToInt(int x) => null; -int numToInt(num x) => null; -int objectToInt(Object x) => null; -num intToNum(int x) => null; -num numToNum(num x) => null; -num objectToNum(Object x) => null; - -main() { - // Unrelated types (not assignable) - - - - // Assignable but fails at runtime. - var intToObject2 = intToObject; - - var intToNum2 = intToNum; - Expect.throwsTypeError(() => f(intToNum2)); - var numToObject2 = numToObject; - - - // Ok - - - - -} diff --git a/tests/language_2/argument/assignability_function_typed_runtime_3_test.dart b/tests/language_2/argument/assignability_function_typed_runtime_3_test.dart deleted file mode 100644 index 31b75a06305..00000000000 --- a/tests/language_2/argument/assignability_function_typed_runtime_3_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -// [NNBD non-migrated] Note: This test is specific to legacy mode and -// deliberately does not have a counter-part in language/. - -import "package:expect/expect.dart"; - -void f(num callback(num x)) {} - -Object intToObject(int x) => null; -Object numToObject(num x) => null; -Object objectToObject(Object x) => null; -int intToInt(int x) => null; -int numToInt(num x) => null; -int objectToInt(Object x) => null; -num intToNum(int x) => null; -num numToNum(num x) => null; -num objectToNum(Object x) => null; - -main() { - // Unrelated types (not assignable) - - - - // Assignable but fails at runtime. - var intToObject2 = intToObject; - - var intToNum2 = intToNum; - - var numToObject2 = numToObject; - Expect.throwsTypeError(() => f(numToObject2)); - - // Ok - - - - -} diff --git a/tests/language_2/argument/assignability_function_typed_runtime_4_test.dart b/tests/language_2/argument/assignability_function_typed_runtime_4_test.dart deleted file mode 100644 index 8a6b65088e5..00000000000 --- a/tests/language_2/argument/assignability_function_typed_runtime_4_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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 "package:expect/expect.dart"; - -void f(num callback(num x)) {} - -Object intToObject(int x) => null; -Object numToObject(num x) => null; -Object objectToObject(Object x) => null; -int intToInt(int x) => null; -int numToInt(num x) => null; -int objectToInt(Object x) => null; -num intToNum(int x) => null; -num numToNum(num x) => null; -num objectToNum(Object x) => null; - -main() { - // Unrelated types (not assignable) - - - - // Assignable but fails at runtime. - var intToObject2 = intToObject; - - var intToNum2 = intToNum; - - var numToObject2 = numToObject; - - - // Ok - f(numToNum); - - - -} diff --git a/tests/language_2/argument/assignability_function_typed_runtime_5_test.dart b/tests/language_2/argument/assignability_function_typed_runtime_5_test.dart deleted file mode 100644 index 257e0d50681..00000000000 --- a/tests/language_2/argument/assignability_function_typed_runtime_5_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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 "package:expect/expect.dart"; - -void f(num callback(num x)) {} - -Object intToObject(int x) => null; -Object numToObject(num x) => null; -Object objectToObject(Object x) => null; -int intToInt(int x) => null; -int numToInt(num x) => null; -int objectToInt(Object x) => null; -num intToNum(int x) => null; -num numToNum(num x) => null; -num objectToNum(Object x) => null; - -main() { - // Unrelated types (not assignable) - - - - // Assignable but fails at runtime. - var intToObject2 = intToObject; - - var intToNum2 = intToNum; - - var numToObject2 = numToObject; - - - // Ok - - f(numToInt); - - -} diff --git a/tests/language_2/argument/assignability_function_typed_runtime_6_test.dart b/tests/language_2/argument/assignability_function_typed_runtime_6_test.dart deleted file mode 100644 index 3c25c0b5aa6..00000000000 --- a/tests/language_2/argument/assignability_function_typed_runtime_6_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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 "package:expect/expect.dart"; - -void f(num callback(num x)) {} - -Object intToObject(int x) => null; -Object numToObject(num x) => null; -Object objectToObject(Object x) => null; -int intToInt(int x) => null; -int numToInt(num x) => null; -int objectToInt(Object x) => null; -num intToNum(int x) => null; -num numToNum(num x) => null; -num objectToNum(Object x) => null; - -main() { - // Unrelated types (not assignable) - - - - // Assignable but fails at runtime. - var intToObject2 = intToObject; - - var intToNum2 = intToNum; - - var numToObject2 = numToObject; - - - // Ok - - - f(objectToNum); - -} diff --git a/tests/language_2/argument/assignability_function_typed_runtime_7_test.dart b/tests/language_2/argument/assignability_function_typed_runtime_7_test.dart deleted file mode 100644 index 31aa28c66a2..00000000000 --- a/tests/language_2/argument/assignability_function_typed_runtime_7_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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 "package:expect/expect.dart"; - -void f(num callback(num x)) {} - -Object intToObject(int x) => null; -Object numToObject(num x) => null; -Object objectToObject(Object x) => null; -int intToInt(int x) => null; -int numToInt(num x) => null; -int objectToInt(Object x) => null; -num intToNum(int x) => null; -num numToNum(num x) => null; -num objectToNum(Object x) => null; - -main() { - // Unrelated types (not assignable) - - - - // Assignable but fails at runtime. - var intToObject2 = intToObject; - - var intToNum2 = intToNum; - - var numToObject2 = numToObject; - - - // Ok - - - - f(objectToInt); -} diff --git a/tests/language_2/argument/assignability_function_typed_runtime_test.dart b/tests/language_2/argument/assignability_function_typed_runtime_test.dart deleted file mode 100644 index 45375c71d07..00000000000 --- a/tests/language_2/argument/assignability_function_typed_runtime_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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 "package:expect/expect.dart"; - -void f(num callback(num x)) {} - -Object intToObject(int x) => null; -Object numToObject(num x) => null; -Object objectToObject(Object x) => null; -int intToInt(int x) => null; -int numToInt(num x) => null; -int objectToInt(Object x) => null; -num intToNum(int x) => null; -num numToNum(num x) => null; -num objectToNum(Object x) => null; - -main() { - // Unrelated types (not assignable) - - - - // Assignable but fails at runtime. - var intToObject2 = intToObject; - - var intToNum2 = intToNum; - - var numToObject2 = numToObject; - - - // Ok - - - - -} diff --git a/tests/language_2/argument/assignability_function_typed_test.dart b/tests/language_2/argument/assignability_function_typed_test.dart deleted file mode 100644 index 561149483b6..00000000000 --- a/tests/language_2/argument/assignability_function_typed_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -void f(num callback(num x)) {} - -Object intToObject(int x) => null; -Object numToObject(num x) => null; -Object objectToObject(Object x) => null; -int intToInt(int x) => null; -int numToInt(num x) => null; -int objectToInt(Object x) => null; -num intToNum(int x) => null; -num numToNum(num x) => null; -num objectToNum(Object x) => null; - -main() { - // Unrelated types (not assignable) - f(intToInt); - //^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'int Function(int)' can't be assigned to the parameter type 'num Function(num)'. - f(objectToObject); - //^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'Object Function(Object)' can't be assigned to the parameter type 'num Function(num)'. - - // Assignable but fails at runtime. - var intToObject2 = intToObject; - Expect.throwsTypeError(() => f(intToObject2)); - var intToNum2 = intToNum; - Expect.throwsTypeError(() => f(intToNum2)); - var numToObject2 = numToObject; - Expect.throwsTypeError(() => f(numToObject2)); - - // Ok - f(numToNum); - f(numToInt); - f(objectToNum); - f(objectToInt); -} diff --git a/tests/language_2/argument/named_argument_test.dart b/tests/language_2/argument/named_argument_test.dart deleted file mode 100644 index a9b09ecc5f5..00000000000 --- a/tests/language_2/argument/named_argument_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - var c1 = ({b, a}) => 'a: $a b: $b'; - var c2 = ({a, b}) => 'a: $a b: $b'; - - Expect.equals('a: 2 b: 1', c1(b: 1, a: 2)); - Expect.equals('a: 1 b: 2', c1(a: 1, b: 2)); - - Expect.equals('a: 2 b: 1', c2(b: 1, a: 2)); - Expect.equals('a: 1 b: 2', c2(a: 1, b: 2)); -} diff --git a/tests/language_2/argument/named_in_const_creation_test.dart b/tests/language_2/argument/named_in_const_creation_test.dart deleted file mode 100644 index 9db0b4eac55..00000000000 --- a/tests/language_2/argument/named_in_const_creation_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - final x; - final y; - const A(a, {b}) - : x = a, - y = b; - static const test = const A(1, b: 2); -} - -main() { - A a = A.test; - Expect.equals(1, a.x); - Expect.equals(2, a.y); -} diff --git a/tests/language_2/argument/not_enough_positional_arguments_test.dart b/tests/language_2/argument/not_enough_positional_arguments_test.dart deleted file mode 100644 index 61d3de48069..00000000000 --- a/tests/language_2/argument/not_enough_positional_arguments_test.dart +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2012, 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 - -foo(a, [b]) {} - -bar(a, {b}) {} - -class A { - A(); - A.test(a, [b]); -} - -class B { - B() - : super.test(b: 1) - //^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER - // [cfe] Superclass has no constructor named 'Object.test'. - ; -} - -class C extends A { - C() - : super.test(b: 1) - // ^ - // [analyzer] COMPILE_TIME_ERROR.NOT_ENOUGH_POSITIONAL_ARGUMENTS - // ^^^^^^ - // [cfe] Too few positional arguments: 1 required, 0 given. - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_NAMED_PARAMETER - ; -} - -class D { - D(); - D.test(a, {b}); -} - -class E extends D { - E() - : super.test(b: 1) - // ^ - // [analyzer] COMPILE_TIME_ERROR.NOT_ENOUGH_POSITIONAL_ARGUMENTS - // ^^^^^^ - // [cfe] Too few positional arguments: 1 required, 0 given. - ; -} - -main() { - new A.test(b: 1); - // ^ - // [analyzer] COMPILE_TIME_ERROR.NOT_ENOUGH_POSITIONAL_ARGUMENTS - // ^^^^^^ - // [cfe] Too few positional arguments: 1 required, 0 given. - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_NAMED_PARAMETER - new B(); - new C(); - new D.test(b: 1); - // ^ - // [analyzer] COMPILE_TIME_ERROR.NOT_ENOUGH_POSITIONAL_ARGUMENTS - // ^^^^^^ - // [cfe] Too few positional arguments: 1 required, 0 given. - new E(); - foo(b: 1); - // ^ - // [analyzer] COMPILE_TIME_ERROR.NOT_ENOUGH_POSITIONAL_ARGUMENTS - // ^^^^^^ - // [cfe] Too few positional arguments: 1 required, 0 given. - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_NAMED_PARAMETER - bar(b: 1); - // ^ - // [analyzer] COMPILE_TIME_ERROR.NOT_ENOUGH_POSITIONAL_ARGUMENTS - // ^^^^^^ - // [cfe] Too few positional arguments: 1 required, 0 given. -} diff --git a/tests/language_2/argument/not_enough_positional_runtime_test.dart b/tests/language_2/argument/not_enough_positional_runtime_test.dart deleted file mode 100644 index 64450ae65ce..00000000000 --- a/tests/language_2/argument/not_enough_positional_runtime_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -foo(a, [b]) {} - -bar(a, {b}) {} - -class A { - A(); - A.test(a, [b]); -} - -class B { - B() - - ; -} - -class C extends A { - C() - - ; -} - -class D { - D(); - D.test(a, {b}); -} - -class E extends D { - E() - - ; -} - -main() { - - new B(); - new C(); - - new E(); - - -} diff --git a/tests/language_2/assert/assert_test.dart b/tests/language_2/assert/assert_test.dart deleted file mode 100644 index 5914dcb218f..00000000000 --- a/tests/language_2/assert/assert_test.dart +++ /dev/null @@ -1,98 +0,0 @@ -// 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. -// VMOptions=--enable-asserts -// dart2jsOptions=--enable-asserts -// dart2wasmOptions=--enable-asserts - -// @dart = 2.9 - -// Dart test program testing assert statements. - -import "package:expect/expect.dart"; - -int testTrue() { - int i = 0; - try { - assert(true); - } on AssertionError { - i = 1; - } - return i; -} - -int testFalse() { - int i = 0; - try { - assert(false); - } on AssertionError { - i = 1; - } - return i; -} - -dynamic unknown(dynamic a) { - return a ? true : false; -} - -int testBoolean(bool value) { - int i = 0; - try { - assert(value); - } on AssertionError { - i = 1; - } - return i; -} - -int testDynamic(dynamic value) { - int i = 0; - try { - assert(value); - } on AssertionError { - i = 1; - } - return i; -} - -int testImmediatelyInvokedFunctionExpression(bool value) { - int i = 0; - try { - assert((() => value)()); - } on AssertionError { - i = 1; - } - return i; -} - -AssertionError testMessage(value, message) { - try { - assert(value, message); - } on AssertionError catch (error) { - return error; - } - return null; -} - -main() { - Expect.equals(0, testTrue()); - Expect.equals(0, testBoolean(true)); - Expect.equals(0, testDynamic(unknown(true))); - Expect.equals(0, testImmediatelyInvokedFunctionExpression(true)); - - Expect.equals(1, testFalse()); - Expect.equals(1, testBoolean(false)); - Expect.equals(1, testDynamic(unknown(false))); - Expect.equals(1, testImmediatelyInvokedFunctionExpression(false)); - - Expect.throwsTypeError(() => testBoolean(null)); - Expect.throwsTypeError(() => testDynamic(null)); - Expect.throwsTypeError(() => testDynamic(42)); - Expect.throwsTypeError(() => testDynamic(() => true)); - Expect.throwsTypeError(() => testDynamic(() => false)); - Expect.throwsTypeError(() => testDynamic(() => 42)); - Expect.throwsTypeError(() => testDynamic(() => null)); - - Expect.equals(1234, testMessage(false, 1234).message); - Expect.equals('hi', testMessage(false, 'hi').message); -} diff --git a/tests/language_2/assert/assignable_type_test.dart b/tests/language_2/assert/assignable_type_test.dart deleted file mode 100644 index b7639d5c2eb..00000000000 --- a/tests/language_2/assert/assignable_type_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2013, 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 test program to test arithmetic operations. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -// This test crashes if we recompute type of AssertAssignableInstr based on its -// output types. By doing that we would eliminate not only the unnecessary -// AssertAssignableInstr but also the trailing class check. - -main() { - // Foul up IC data in integer's unary minus. - var y = -0x80000000; - testInt64List(); -} - -testInt64List() { - var array = new List.filled(10, null); - testInt64ListImpl(array); -} - -testInt64ListImpl(array) { - for (int i = 0; i < 10; ++i) {} - int sum = 0; - for (int i = 0; i < 10; ++i) { - array[i] = -0x80000000000000 + i; - } -} diff --git a/tests/language_2/assert/initializer_const_error2_runtime_test.dart b/tests/language_2/assert/initializer_const_error2_runtime_test.dart deleted file mode 100644 index 30d70193d5d..00000000000 --- a/tests/language_2/assert/initializer_const_error2_runtime_test.dart +++ /dev/null @@ -1,89 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. -// VMOptions=--enable-asserts -// dart2jsOptions=--enable-asserts -// -// Test of asserts in initializer lists. - -import "package:expect/expect.dart"; - -class C { - final int x; - // Const constructors. - const C.cc01(this.x, y) : assert(x < y); - const C.cc02(x, y) - : x = x, - assert(x < y); - const C.cc03(x, y) - : assert(x < y), - x = x; - const C.cc04(this.x, y) - : assert(x < y), - super(); - const C.cc05(x, y) - : x = x, - assert(x < y), - super(); - const C.cc06(x, y) - : assert(x < y), - x = x, - super(); - const C.cc07(x, y) - : assert(x < y), - x = x, - assert(y > x), - super(); - const C.cc08(this.x, y) : assert(x < y, "$x < $y"); - const C.cc09(this.x, y) : assert(x < y,); - const C.cc10(this.x, y) : assert(x < y, "$x < $y",); -} - -main() { - const x = 3; - { - - const C.cc01(2, x); - } - { - - const C.cc02(2, x); - } - { - - const C.cc03(2, x); - } - { - - const C.cc04(2, x); - } - { - - const C.cc05(2, x); - } - { - - const C.cc06(2, x); - } - { - - const C.cc07(2, x); - } - { - - const C.cc08(2, x); - } - { - - const C.cc09(2, x); - } - { - - const C.cc10(2, x); - } -} diff --git a/tests/language_2/assert/initializer_const_error2_test.dart b/tests/language_2/assert/initializer_const_error2_test.dart deleted file mode 100644 index 26cfb85e3ad..00000000000 --- a/tests/language_2/assert/initializer_const_error2_test.dart +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) 2018, 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. -// VMOptions=--enable-asserts -// dart2jsOptions=--enable-asserts -// -// Test of asserts in initializer lists. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class C { - final int x; - // Const constructors. - const C.cc01(this.x, y) : assert(x < y); - const C.cc02(x, y) - : x = x, - assert(x < y); - const C.cc03(x, y) - : assert(x < y), - x = x; - const C.cc04(this.x, y) - : assert(x < y), - super(); - const C.cc05(x, y) - : x = x, - assert(x < y), - super(); - const C.cc06(x, y) - : assert(x < y), - x = x, - super(); - const C.cc07(x, y) - : assert(x < y), - x = x, - assert(y > x), - super(); - const C.cc08(this.x, y) : assert(x < y, "$x < $y"); - const C.cc09(this.x, y) : assert(x < y,); - const C.cc10(this.x, y) : assert(x < y, "$x < $y",); -} - -main() { - const x = 3; - { - const x = 1; - const C.cc01(2, x); -// ^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_THROWS_EXCEPTION -// ^ -// [cfe] Constant evaluation error: - } - { - const x = 1; - const C.cc02(2, x); -// ^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_THROWS_EXCEPTION -// ^ -// [cfe] Constant evaluation error: - } - { - const x = 1; - const C.cc03(2, x); -// ^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_THROWS_EXCEPTION -// ^ -// [cfe] Constant evaluation error: - } - { - const x = 1; - const C.cc04(2, x); -// ^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_THROWS_EXCEPTION -// ^ -// [cfe] Constant evaluation error: - } - { - const x = 1; - const C.cc05(2, x); -// ^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_THROWS_EXCEPTION -// ^ -// [cfe] Constant evaluation error: - } - { - const x = 1; - const C.cc06(2, x); -// ^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_THROWS_EXCEPTION -// ^ -// [cfe] Constant evaluation error: - } - { - const x = 1; - const C.cc07(2, x); -// ^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_THROWS_EXCEPTION -// ^ -// [cfe] Constant evaluation error: - } - { - const x = 1; - const C.cc08(2, x); -// ^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_THROWS_EXCEPTION -// ^ -// [cfe] Constant evaluation error: - } - { - const x = 1; - const C.cc09(2, x); -// ^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_THROWS_EXCEPTION -// ^ -// [cfe] Constant evaluation error: - } - { - const x = 1; - const C.cc10(2, x); -// ^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_THROWS_EXCEPTION -// ^ -// [cfe] Constant evaluation error: - } -} diff --git a/tests/language_2/assert/initializer_const_error_runtime_test.dart b/tests/language_2/assert/initializer_const_error_runtime_test.dart deleted file mode 100644 index 2296e0de71d..00000000000 --- a/tests/language_2/assert/initializer_const_error_runtime_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -class C { - static bool check(x, y) => x < y; - final int x; - const C(this.x); - // The expression is not a potentially constant expression. - // This is a compile-time error even in production mode. - const C.bc03(this.x, y) - - ; -} - -main() { - var c = new C.bc03(1, 2); - if (c.x != 1) throw "non-trivial use of c"; -} diff --git a/tests/language_2/assert/initializer_const_error_test.dart b/tests/language_2/assert/initializer_const_error_test.dart deleted file mode 100644 index d3a3db5b7c9..00000000000 --- a/tests/language_2/assert/initializer_const_error_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2017, 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 - -class C { - static bool check(x, y) => x < y; - final int x; - const C(this.x); - // The expression is not a potentially constant expression. - // This is a compile-time error even in production mode. - const C.bc03(this.x, y) - : assert(check(x, y)) - // ^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CONSTANT - // [cfe] Method invocation is not a constant expression. - ; -} - -main() { - var c = new C.bc03(1, 2); - if (c.x != 1) throw "non-trivial use of c"; -} diff --git a/tests/language_2/assert/initializer_const_function_runtime_test.dart b/tests/language_2/assert/initializer_const_function_runtime_test.dart deleted file mode 100644 index 78a2d005f3b..00000000000 --- a/tests/language_2/assert/initializer_const_function_runtime_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -class C { - static bool staticTrue() => true; - final int x; - - // Functions as parameters to assert are no longer supported in Dart 2.0, so - // this is now a static type error. - const C.bc01(this.x, y) - - ; -} - -main() { - new C.bc01(1, 2); -} diff --git a/tests/language_2/assert/initializer_const_function_test.dart b/tests/language_2/assert/initializer_const_function_test.dart deleted file mode 100644 index 3c071d8cb4c..00000000000 --- a/tests/language_2/assert/initializer_const_function_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2017, 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 - -class C { - static bool staticTrue() => true; - final int x; - - // Functions as parameters to assert are no longer supported in Dart 2.0, so - // this is now a static type error. - const C.bc01(this.x, y) - : assert(staticTrue) - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_EXPRESSION - // [cfe] A value of type 'bool Function()' can't be assigned to a variable of type 'bool'. - ; -} - -main() { - new C.bc01(1, 2); -} diff --git a/tests/language_2/assert/initializer_test.dart b/tests/language_2/assert/initializer_test.dart deleted file mode 100644 index ffc91231232..00000000000 --- a/tests/language_2/assert/initializer_test.dart +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) 2017, 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. -// VMOptions=--enable-asserts -// dart2jsOptions=--enable-asserts -// dart2wasmOptions=--enable-asserts - -// @dart = 2.9 - -// Dart test program testing assert statements. - -import "package:expect/expect.dart"; - -class C { - static bool check(x, y) => x < y; - static bool staticTrue() => true; - final int x; - const C(this.x); - - C.c01(this.x, y) : assert(x < y); - C.c02(x, y) : x = x, assert(x < y); - C.c03(x, y) : assert(x < y), x = x; - C.c05(this.x, y) : assert(x < y), super(); - C.c06(x, y) : x = x, assert(x < y), super(); - C.c07(x, y) : assert(x < y), x = x, super(); - C.c08(x, y) : assert(x < y), x = x, assert(y > x), super(); - C.c09(this.x, y) : assert(x < y, "$x < $y"); - C.c10(this.x, y) : assert(x < y,); - C.c11(this.x, y) : assert(x < y, "$x < $y",); - - const C.cc01(this.x, y) : assert(x < y); - const C.cc02(x, y) : x = x, assert(x < y); - const C.cc03(x, y) : assert(x < y), x = x; - const C.cc05(this.x, y) : assert(x < y), super(); - const C.cc06(x, y) : x = x, assert(x < y), super(); - const C.cc07(x, y) : assert(x < y), x = x, super(); - const C.cc08(x, y) : assert(x < y), x = x, assert(y > x), super(); - const C.cc09(this.x, y) : assert(x < y, "$x < $y"); - const C.cc10(this.x, y) : assert(x < y,); - const C.cc11(this.x, y) : assert(x < y, "$x < $y",); - - C.nc01(this.x, y) : assert(check(x, y)); - C.nc02(x, y) : x = x, assert(check(x, y)); - C.nc03(x, y) : assert(check(x, y)), x = x; - C.nc05(this.x, y) : assert(check(x, y)), super(); - C.nc06(x, y) : x = x, assert(check(x, y)), super(); - C.nc07(x, y) : assert(check(x, y)), x = x, super(); - C.nc08(x, y) : assert(check(x, y)), x = x, assert(y > x), super(); - C.nc09(this.x, y) : assert(check(x, y), "$x < $y"); - C.nc10(this.x, y) : assert(check(x, y),); - C.nc11(this.x, y) : assert(check(x, y), "$x < $y",); - - C.fc01(this.x, y) : assert((() => x < y)()); - C.fc02(x, y) : x = x, assert((() => x < y)()); - C.fc03(x, y) : assert((() => x < y)()), x = x; - C.fc05(this.x, y) : assert((() => x < y)()), super(); - C.fc06(x, y) : x = x, assert((() => x < y)()), super(); - C.fc07(x, y) : assert((() => x < y)()), x = x, super(); - C.fc08(x, y) : assert((() => x < y)()),x = x, assert(y > x), super(); - C.fc09(this.x, y) : assert((() => x < y)(), "$x < $y"); - C.fc10(this.x, y) : assert((() => x < y)(),); - C.fc11(this.x, y) : assert((() => x < y)(), "$x < $y",); -} - - -main() { - // Test all constructors with both succeeding and failing asserts. - test(1, 2); - test(2, 1); - - const c1 = const C(1); - - // Asserts do not affect canonization. - Expect.identical(c1, const C.cc01(1, 2)); - Expect.identical(c1, const C.cc02(1, 2)); - Expect.identical(c1, const C.cc03(1, 2)); - Expect.identical(c1, const C.cc05(1, 2)); - Expect.identical(c1, const C.cc06(1, 2)); - Expect.identical(c1, const C.cc07(1, 2)); - Expect.identical(c1, const C.cc08(1, 2)); - Expect.identical(c1, const C.cc09(1, 2)); - Expect.identical(c1, const C.cc10(1, 2)); - Expect.identical(c1, const C.cc11(1, 2)); -} - -void test(int x, int y) { - bool assertionsEnabled = false; - assert(assertionsEnabled = true); - - bool Function(C Function()) doTest = (assertionsEnabled && x >= y) - ? (f) { Expect.throwsAssertionError(f); } - : (f) { Expect.equals(x, f().x); }; - - doTest(() => new C.c01(x, y)); - doTest(() => new C.c02(x, y)); - doTest(() => new C.c03(x, y)); - doTest(() => new C.c05(x, y)); - doTest(() => new C.c06(x, y)); - doTest(() => new C.c07(x, y)); - doTest(() => new C.c08(x, y)); - doTest(() => new C.c09(x, y)); - doTest(() => new C.c10(x, y)); - doTest(() => new C.c11(x, y)); - doTest(() => new C.cc01(x, y)); - doTest(() => new C.cc02(x, y)); - doTest(() => new C.cc03(x, y)); - doTest(() => new C.cc05(x, y)); - doTest(() => new C.cc06(x, y)); - doTest(() => new C.cc07(x, y)); - doTest(() => new C.cc08(x, y)); - doTest(() => new C.cc09(x, y)); - doTest(() => new C.cc10(x, y)); - doTest(() => new C.cc11(x, y)); - doTest(() => new C.nc01(x, y)); - doTest(() => new C.nc02(x, y)); - doTest(() => new C.nc03(x, y)); - doTest(() => new C.nc05(x, y)); - doTest(() => new C.nc06(x, y)); - doTest(() => new C.nc07(x, y)); - doTest(() => new C.nc08(x, y)); - doTest(() => new C.nc09(x, y)); - doTest(() => new C.nc10(x, y)); - doTest(() => new C.nc11(x, y)); - doTest(() => new C.fc01(x, y)); - doTest(() => new C.fc02(x, y)); - doTest(() => new C.fc03(x, y)); - doTest(() => new C.fc05(x, y)); - doTest(() => new C.fc06(x, y)); - doTest(() => new C.fc07(x, y)); - doTest(() => new C.fc08(x, y)); - doTest(() => new C.fc09(x, y)); - doTest(() => new C.fc10(x, y)); - doTest(() => new C.fc11(x, y)); -} - diff --git a/tests/language_2/assert/message_test.dart b/tests/language_2/assert/message_test.dart deleted file mode 100644 index df011194bdb..00000000000 --- a/tests/language_2/assert/message_test.dart +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2016, 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 - -import "dart:async"; - -import "package:async_helper/async_helper.dart"; -import "package:expect/expect.dart"; - -// TODO(rnystrom): Unify with assert_with_message_test.dart. - -main() { - // Only run with asserts enabled mode. - bool assertsEnabled = false; - assert(assertsEnabled = true); - if (!assertsEnabled) return; - - // Basics. - assert(true, ""); - - int x = null; - // Successful asserts won't execute message. - assert(true, x + 42); - assert(true, throw "unreachable"); - - // Can use any value as message. - try { - assert(false, 42); - } on AssertionError catch (e) { - Expect.equals(42, e.message); - } - - try { - assert(false, ""); - } on AssertionError catch (e) { - Expect.equals("", e.message); - } - - try { - assert(false, null); - } on AssertionError catch (e) { - Expect.equals(null, e.message); - } - - // Test expression can throw. - try { - assert(throw "test", throw "message"); - } on String catch (e) { - Expect.equals("test", e); - } - - // Message expression can throw. - try { - assert(false, throw "message"); - } on String catch (e) { - Expect.equals("message", e); - } - - // Failing asserts evaluate message after test. - var list = []; - try { - assert((list..add(1)).isEmpty, (list..add(3)).length); - } on AssertionError catch (e) { - Expect.equals(2, e.message); - Expect.listEquals([1, 3], list); - } - - asyncStart(); - asyncTests().then((_) { - asyncEnd(); - }); -} - -Future asyncTests() async { - // You can await in both condition and message. - assert(true, await 0); - assert(await true, 1); - assert(await true, await 2); - - // Successful asserts won't await/evaluate message. - Future unreachable() => throw "unreachable"; - assert(await true, await unreachable()); - - try { - assert(false, await 3); - } on AssertionError catch (e) { - Expect.equals(3, e.message); - } - - var falseFuture = new Future.value(false); - var numFuture = new Future.value(4); - - try { - assert(await falseFuture, await numFuture); - } on AssertionError catch (e) { - Expect.equals(4, e.message); - } - - try { - assert(await falseFuture, await new Future.error("error")); - } on String catch (e) { - Expect.equals("error", e); - } -} diff --git a/tests/language_2/assert/trailing_comma_runtime_test.dart b/tests/language_2/assert/trailing_comma_runtime_test.dart deleted file mode 100644 index 00556ca4b9f..00000000000 --- a/tests/language_2/assert/trailing_comma_runtime_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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() { - assert(true); - assert(true,); - assert(true,"message"); - assert(true,"message",); - - -} diff --git a/tests/language_2/assert/trailing_comma_test.dart b/tests/language_2/assert/trailing_comma_test.dart deleted file mode 100644 index 5a27888f71b..00000000000 --- a/tests/language_2/assert/trailing_comma_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2017, 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() { - assert(true); - assert(true,); - assert(true,"message"); - assert(true,"message",); - assert(true,"message",extra); - // ^^^^^ - // [analyzer] SYNTACTIC_ERROR.UNEXPECTED_TOKEN - // [cfe] Unexpected token 'extra'. - assert(true,"message",,); - // ^ - // [analyzer] SYNTACTIC_ERROR.UNEXPECTED_TOKEN - // [cfe] Unexpected token ','. -} diff --git a/tests/language_2/assert/with_message_test.dart b/tests/language_2/assert/with_message_test.dart deleted file mode 100644 index 78c486358a0..00000000000 --- a/tests/language_2/assert/with_message_test.dart +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -main() { - var assertsEnabled = false; - assert((assertsEnabled = true)); - if (!assertsEnabled) return; - - // TODO(rnystrom): Test cases where the first argument to assert() is a - // function. - - testAssertFails(); - testAssertDoesNotFail(); - testNullMessage(); - testDoesNotEvaluateMessageIfAssertSucceeds(); - testMessageExpressionThatThrows(); - testCallsToStringOnMessageLazily(); -} - -/// A class with a custom toString() that tracks when it is called. -class ToString { - bool calledToString = false; - - String toString() { - calledToString = true; - return "toString!"; - } -} - -testAssertFails() { - try { - assert(false, "Oops"); - Expect.fail("Assert should throw."); - } catch (e) { - Expect.isTrue(e.toString().contains("Oops")); - } -} - -testAssertDoesNotFail() { - try { - assert(true, "Oops"); - } catch (e) { - Expect.fail("Assert should not throw."); - } -} - -testNullMessage() { - try { - assert(false, null); - Expect.fail("Assert should throw."); - } catch (e) { - Expect.isTrue(e.toString().contains("is not true")); - } -} - -testDoesNotEvaluateMessageIfAssertSucceeds() { - try { - var evaluated = false; - assert(true, evaluated = true); - Expect.isFalse(evaluated); - } catch (e) { - Expect.fail("Assert should not throw."); - } -} - -testMessageExpressionThatThrows() { - try { - assert(false, throw "dang"); - Expect.fail("Should throw"); - } catch (e) { - Expect.equals(e, "dang"); - } -} - -testCallsToStringOnMessageLazily() { - var toString = new ToString(); - try { - assert(false, toString); - Expect.fail("Assert should throw."); - } catch (e) { - Expect.isFalse(toString.calledToString); - Expect.isTrue(e.toString().contains("Instance of 'ToString'")); - Expect.isFalse(toString.calledToString); - } -} diff --git a/tests/language_2/assert/with_type_test_or_cast_test.dart b/tests/language_2/assert/with_type_test_or_cast_test.dart deleted file mode 100644 index a5f642f92e4..00000000000 --- a/tests/language_2/assert/with_type_test_or_cast_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2012, 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 - -// Issue 3741: generic type tests and casts fail in assertion statements -// when run in production mode. -// -// The cause was incomplete generic type skipping, so each of the assert -// statements below would fail. -// -// VMOptions= -// VMOptions=--enable_asserts - -main() { - var names = []; - - // Generic type test. - assert(names is List); - - // Negated generic type test. - assert(names is! List); - - // Generic type cast. - assert((names as List).length == 0); - - // Generic type test inside expression. - assert((names is List)); -} diff --git a/tests/language_2/assign/instance_method_test.dart b/tests/language_2/assign/instance_method_test.dart deleted file mode 100644 index f7aea3fddbd..00000000000 --- a/tests/language_2/assign/instance_method_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// 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 - -import 'package:expect/expect.dart'; - -class A { - A() {} - imethod() { - return 0; - } -} - -main() { - dynamic a = new A(); - - // Illegal, can't change a member method. - Expect.throws(() { - a.imethod = () { - return 1; - }; - }); -} diff --git a/tests/language_2/assign/op_test.dart b/tests/language_2/assign/op_test.dart deleted file mode 100644 index 0f265ffa6a5..00000000000 --- a/tests/language_2/assign/op_test.dart +++ /dev/null @@ -1,98 +0,0 @@ -// 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 test program for testing assign operators. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class AssignOpTest { - AssignOpTest() {} - - static testMain() { - var b = 0; - b += 1; - Expect.equals(1, b); - b *= 5; - Expect.equals(5, b); - b -= 1; - Expect.equals(4, b); - b ~/= 2; - Expect.equals(2, b); - - f = 0; - f += 1; - Expect.equals(1, f); - f *= 5; - Expect.equals(5, f); - f -= 1; - Expect.equals(4, f); - f ~/= 2; - Expect.equals(2, f); - f /= 4; - Expect.equals(.5, f); - - AssignOpTest.f = 0; - AssignOpTest.f += 1; - Expect.equals(1, AssignOpTest.f); - AssignOpTest.f *= 5; - Expect.equals(5, AssignOpTest.f); - AssignOpTest.f -= 1; - Expect.equals(4, AssignOpTest.f); - AssignOpTest.f ~/= 2; - Expect.equals(2, AssignOpTest.f); - AssignOpTest.f /= 4; - Expect.equals(.5, f); - - var o = new AssignOpTest(); - o.instf = 0; - o.instf += 1; - Expect.equals(1, o.instf); - o.instf *= 5; - Expect.equals(5, o.instf); - o.instf -= 1; - Expect.equals(4, o.instf); - o.instf ~/= 2; - Expect.equals(2, o.instf); - o.instf /= 4; - Expect.equals(.5, o.instf); - - var x = 0xFF; - x >>= 3; - Expect.equals(0x1F, x); - x <<= 3; - Expect.equals(0xF8, x); - x |= 0xF00; - Expect.equals(0xFF8, x); - x &= 0xF0; - Expect.equals(0xF0, x); - x ^= 0x11; - Expect.equals(0xE1, x); - - var y = 100; - y += 1 << 3; - Expect.equals(108, y); - y *= 2 + 1; - Expect.equals(324, y); - y -= 3 - 2; - Expect.equals(323, y); - y += 3 * 4; - Expect.equals(335, y); - - var a = [1, 2, 3]; - var ix = 0; - a[ix] |= 12; - Expect.equals(13, a[ix]); - } - - static var f; - var instf; -} - -main() { - for (int i = 0; i < 20; i++) { - AssignOpTest.testMain(); - } -} diff --git a/tests/language_2/assign/static_type_runtime_test.dart b/tests/language_2/assign/static_type_runtime_test.dart deleted file mode 100644 index d916029abe6..00000000000 --- a/tests/language_2/assign/static_type_runtime_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -// This test insures that statically initialized variables, fields, and -// parameters report compile-time errors. - - - -class A { - - - - A() { - - } - method( - [ - - g = "String"]) { - return g; - } -} - -main() {} diff --git a/tests/language_2/assign/static_type_test.dart b/tests/language_2/assign/static_type_test.dart deleted file mode 100644 index f3c949411df..00000000000 --- a/tests/language_2/assign/static_type_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2012, 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 - -// This test insures that statically initialized variables, fields, and -// parameters report compile-time errors. - -int a = "String"; -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT -// [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. - -class A { - static const int c = "String"; - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. - final int d = "String"; - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. - int e = "String"; - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. - A() { - int f = "String"; - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. - } - method([int g = "String"]) { - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. - return g; - } -} - -main() {} diff --git a/tests/language_2/assign/to_type_runtime_test.dart b/tests/language_2/assign/to_type_runtime_test.dart deleted file mode 100644 index ffafd1ba334..00000000000 --- a/tests/language_2/assign/to_type_runtime_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify that an attempt to assign to a class, enum, typedef, or type -// parameter produces a compile error. - -class C { - f() { - - } -} - -class D {} - -enum E { e0 } - -typedef void F(); - -main() { - new C().f(); - - - -} diff --git a/tests/language_2/assign/to_type_test.dart b/tests/language_2/assign/to_type_test.dart deleted file mode 100644 index 2548b16933d..00000000000 --- a/tests/language_2/assign/to_type_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2015, 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 - -// Verify that an attempt to assign to a class, enum, typedef, or type -// parameter produces a compile error. - -class C { - f() { - T = null; -// ^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE -// [cfe] Can't assign to a type literal. - } -} - -class D {} - -enum E { e0 } - -typedef void F(); - -main() { - new C().f(); - D = null; -//^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE -// [cfe] Can't assign to a type literal. - E = null; -//^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE -// [cfe] Can't assign to a type literal. - F = null; -//^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE -// [cfe] Can't assign to a type literal. -} diff --git a/tests/language_2/assign/top_method_test.dart b/tests/language_2/assign/top_method_test.dart deleted file mode 100644 index 44abb8dd806..00000000000 --- a/tests/language_2/assign/top_method_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -method() { - return 0; -} - -main() { - // Illegal, can't change a top level method - method = () { -//^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FUNCTION -// [cfe] Setter not found: 'method'. - return 1; - }; -} diff --git a/tests/language_2/async/and_or_test.dart b/tests/language_2/async/and_or_test.dart deleted file mode 100644 index 8a45868e4da..00000000000 --- a/tests/language_2/async/and_or_test.dart +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) 2015, 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. - -// VMOptions= -// VMOptions=--stress_write_barrier_elimination - -// @dart = 2.9 -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(x) { - return x; -} - -test1() async { - Expect.isFalse(await confuse(false) && await confuse(false)); - Expect.isFalse(await confuse(false) && await confuse(true)); - Expect.isFalse(await confuse(true) && await confuse(false)); - Expect.isTrue(await confuse(true) && await confuse(true)); - - Expect.isFalse(await confuse(false) || await confuse(false)); - Expect.isTrue(await confuse(false) || await confuse(true)); - Expect.isTrue(await confuse(true) || await confuse(false)); - Expect.isTrue(await confuse(true) || await confuse(true)); -} - -String trace; - -traceA(x) { - trace += "a"; - return x; -} - -traceB(x) { - trace += "b"; - return x; -} - -testEvaluation(Future fn()) async { - trace = ""; - await fn(); -} - -test2() async { - await testEvaluation(() async { - Expect.isFalse( - await confuse(traceA(false)) && await confuse(traceB(false))); - Expect.equals("a", trace); - }); - await testEvaluation(() async { - Expect.isFalse(await confuse(traceA(false)) && await confuse(traceB(true))); - Expect.equals("a", trace); - }); - await testEvaluation(() async { - Expect.isFalse(await confuse(traceA(true)) && await confuse(traceB(false))); - Expect.equals("ab", trace); - }); - await testEvaluation(() async { - Expect.isTrue(await confuse(traceA(true)) && await confuse(traceB(true))); - Expect.equals("ab", trace); - }); - - await testEvaluation(() async { - Expect.isFalse( - await confuse(traceA(false)) || await confuse(traceB(false))); - Expect.equals("ab", trace); - }); - await testEvaluation(() async { - Expect.isTrue(await confuse(traceA(false)) || await confuse(traceB(true))); - Expect.equals("ab", trace); - }); - await testEvaluation(() async { - Expect.isTrue(await confuse(traceA(true)) || await confuse(traceB(false))); - Expect.equals("a", trace); - }); - await testEvaluation(() async { - Expect.isTrue(await confuse(traceA(true)) || await confuse(traceB(true))); - Expect.equals("a", trace); - }); -} - -test() async { - await test1(); - await test2(); -} - -main() { - asyncStart(); - test().then((_) => asyncEnd()); -} diff --git a/tests/language_2/async/async_test.dart b/tests/language_2/async/async_test.dart deleted file mode 100644 index 27fcecf9684..00000000000 --- a/tests/language_2/async/async_test.dart +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) 2014, 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. - -// VMOptions= -// VMOptions=--stress_write_barrier_elimination - -// @dart = 2.9 - -import 'package:async_helper/async_helper.dart'; -import 'package:expect/expect.dart'; - -import 'dart:async'; - -topLevelFunction() async {} - -Future topLevelWithParameter(int a) async { - return 7 + a; -} - -topLevelWithParameterWrongType(int a) async { - return 7 + a; -} - -var what = 'async getter'; -Future get topLevelGetter async { - return 'I want to be an ${what}'; -} - -class A { - static int staticVar = 1; - - static staticMethod(int param) async => staticVar + param; - static get staticGetter async => staticVar + 3; - - int _x; - A(this._x); - - operator +(A other) async { - return new A(_x + other._x); - } - - get value => _x; -} - -class B { - final _y; - const B._internal(this._y); - - B() : _y = null; -} - -main() { - Future asyncReturn; - - asyncReturn = topLevelFunction(); - Expect.isTrue(asyncReturn is Future); - - asyncReturn = topLevelWithParameter(4); - Expect.isTrue(asyncReturn is Future); - asyncStart(); - asyncReturn.then((Object result) { - Expect.equals(result, 11); - asyncEnd(); - }); - - asyncReturn = topLevelGetter; - Expect.isTrue(asyncReturn is Future); - asyncStart(); - asyncReturn.then((Object result) { - Expect.stringEquals(result, 'I want to be an async getter'); - asyncEnd(); - }); - - asyncReturn = A.staticMethod(2); - Expect.isTrue(asyncReturn is Future); - asyncStart(); - asyncReturn.then((Object result) { - Expect.equals(result, 3); - asyncEnd(); - }); - - asyncReturn = A.staticGetter; - Expect.isTrue(asyncReturn is Future); - asyncStart(); - asyncReturn.then((Object result) { - Expect.equals(result, 4); - asyncEnd(); - }); - - A a = new A(13); - - var b = new A(9); - asyncReturn = a + b; - Expect.isTrue(asyncReturn is Future); - asyncStart(); - asyncReturn.then((Object result) { - Expect.equals((result as A).value, 22); - asyncEnd(); - }); - - var foo = 17; - bar(int p1, p2) async { - var z = 8; - return p2 + z + foo; - } - - asyncReturn = bar(1, 2); - Expect.isTrue(asyncReturn is Future); - asyncStart(); - asyncReturn.then((Object result) { - Expect.equals(result, 27); - asyncEnd(); - }); - - var moreNesting = (int shadowP1, String p2, num p3) { - var z = 3; - aa(int shadowP1) async { - return foo + z + p3 + shadowP1; - } - - return aa(6); - }; - asyncReturn = moreNesting(1, "ignore", 2); - Expect.isTrue(asyncReturn is Future); - asyncStart(); - asyncReturn.then((Object result) { - Expect.equals(result, 28); - asyncEnd(); - }); - - var checkAsync = (var someFunc) { - var toTest = someFunc(); - Expect.isTrue(toTest is Future); - asyncStart(); - toTest.then((int result) { - Expect.equals(result, 4); - asyncEnd(); - }); - }; - checkAsync(() async => 4); -} diff --git a/tests/language_2/async/await_catch_regression_test.dart b/tests/language_2/async/await_catch_regression_test.dart deleted file mode 100644 index 4fea20578b5..00000000000 --- a/tests/language_2/async/await_catch_regression_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -foo() async { - throw 42; -} - -test() async { - var exception; - try { - await foo(); - } catch (e) { - print(await (e)); - await (exception = await e); - } - Expect.equals(42, exception); -} - -main() { - asyncStart(); - test().then((_) => asyncEnd()); -} diff --git a/tests/language_2/async/await_foreign_test.dart b/tests/language_2/async/await_foreign_test.dart deleted file mode 100644 index 92abe155618..00000000000 --- a/tests/language_2/async/await_foreign_test.dart +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2017, 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 - -import 'dart:async'; -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; - -typedef Future Task(); - -class ForeignFuture implements Future { - ForeignFuture(List tasks) { - tasks.forEach(_addTask); - } - - Future _future; - - void _addTask(Task task) { - _future = (_future == null) ? task() : _future.then((_) => task()); - } - - Future then(FutureOr onValue(Null _), {Function onError}) { - assert(_future != null); - return _future.then((_) { - _future = null; - return onValue(null); - }, onError: (error, trace) { - _future = null; - if (onError != null) { - onError(error, trace); - } - }); - } - - Stream asStream() { - return new Stream.fromFuture(this); - } - - Future catchError(onError, {bool test(Object error)}) { - print('Unimplemented catchError'); - return null; - } - - Future timeout(Duration timeLimit, {onTimeout()}) { - print('Unimplemented timeout'); - return null; - } - - Future whenComplete(action()) { - print('Unimplemented whenComplete'); - return null; - } -} - -var r1; - -Future hello() async { - r1 = 'hello'; - throw new Exception('error'); -} - -Future world() async { - try { - await new ForeignFuture([hello]); - } catch (e) {} - return 'world'; -} - -void main() { - asyncStart(); - () async { - var r2 = await world(); - Expect.equals('hello', r1); - Expect.equals('world', r2); - asyncEnd(); - }(); -} diff --git a/tests/language_2/async/await_syntax_test.dart b/tests/language_2/async/await_syntax_test.dart deleted file mode 100644 index 687935b429a..00000000000 --- a/tests/language_2/async/await_syntax_test.dart +++ /dev/null @@ -1,303 +0,0 @@ -// Copyright (c) 2015, 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 - -// Test async/await syntax. - -import 'dart:async' show Stream; - -var yield = 0; -var await = 0; -get st => new Stream.fromIterable([]); - -a01a() async => null; // //# a01a: ok -a01b() async* => null; // //# a01b: syntax error -a01c() sync* => null; // //# a01c: syntax error -a01d() async => yield 5; // //# a01d: syntax error -a02a() async {} // //# a02a: ok -a03a() async* {} // //# a03a: ok -a03b() async * {} // //# a03b: ok -a04a() sync* {} // //# a04a: ok -a04b() sync {} // //# a04b: syntax error -a04c() sync * {} // //# a04c: ok -a05a() async { await 0; } // //# a05a: ok -a05b() async { // //# a05b: ok - await(a) {}; // //# a05b: continued - await(0); // //# a05b: continued -} // //# a05b: continued -a05c() { // //# a05c: ok - await(a) {}; // //# a05c: continued - await(0); // //# a05c: continued -} // //# a05c: continued -a05d() async { // //# a05d: syntax error - await(a) {} // //# a05d: continued - await(0); // //# a05d: continued -} // //# a05d: continued -a05e() { // //# a05e: ok - await(a) {} // //# a05e: continued - await(0); // //# a05e: continued -} // //# a05e: continued -a05f() async { // //# a05f: syntax error - var await = (a) {}; // //# a05f: continued - await(0); // //# a05f: continued -} // //# a05f: continued -a05g() async { // //# a05g: compile-time error - yield 5; // //# a05g: continued -} // //# a05g: continued -a05h() async { // //# a05h: continued - yield* st; // //# a05h: compile-time error -} // //# a05h: continued -a06a() async { await for (var o in st) {} } // //# a06a: ok -a06b() sync* { await for (var o in st) {} } // //# a06b: compile-time error -a07a() sync* { yield 0; } // //# a07a: ok -a07b() sync { yield 0; } // //# a07b: syntax error -a08a() sync* { yield* []; } // //# a08a: ok -a08b() sync { yield 0; } // //# a08b: syntax error -a09a() async* { yield 0; } // //# a09a: ok -a10a() async* { yield* []; } // //# a10a: compile-time error - -get sync sync {} // //# a11a: syntax error -get sync sync* {} // //# a11b: ok -get async async {} // //# a11c: ok -get async async* {} // //# a11d: ok - -get sync {} // //# a12a: ok -get sync* {} // //# a12b: syntax error -get async {} // //# a12c: ok -get async* {} // //# a12d: syntax error -get a12e sync* => null; // //# a12e: syntax error -get a12f async* => null; // //# a12f: syntax error -get a12g async => null; // //# a12g: ok - -int sync; // //# a13a: ok -int sync*; // //# a13b: syntax error -int async; // //# a13c: ok -int async*; // //# a13d: syntax error - -var sync; // //# a14a: ok -var sync*; // //# a14b: syntax error -var async; // //# a14c: ok -var async*; // //# a14d: syntax error - -sync() {} // //# a15a: ok -sync*() {} // //# a15b: syntax error -async() {} // //# a15c: ok -async*() {} // //# a15d: syntax error - -abstract class B { - b00a() async; // //# b00a: syntax error - b00b() async*; // //# b00b: syntax error - b00c() sync*; // //# b00c: syntax error - b00d() sync; // //# b00d: syntax error -} - -class C extends B { - C(); - - factory C.e1() async { return null; } // //# e1: compile-time error - factory C.e2() async* { return null; } // //# e2: compile-time error - factory C.e3() sync* { return null; } // //# e3: compile-time error - factory C.e4() async = C; // //# e4: syntax error - factory C.e5() async* = C; // //# e5: syntax error - factory C.e6() sync* = C; // //# e6: syntax error - C.e7() async {} // //# e7: compile-time error - C.e8() async* {} // //# e8: compile-time error - C.e9() sync* {} // //# e9: compile-time error - - b00a() {} // //# b00a: continued - b00b() {} // //# b00b: continued - b00c() {} // //# b00c: continued - b00d() {} // //# b00d: continued - - b01a() async => null; // //# b01a: ok - b01b() async* => null; // //# b01b: syntax error - b01c() sync* => null; // //# b01c: syntax error - b02a() async {} // //# b02a: ok - b03a() async* {} // //# b03a: ok - b04a() sync* {} // //# b04a: ok - b04b() sync {} // //# b04b: syntax error - b05a() async { await 0; } // //# b05a: ok - b06a() async { await for (var o in st) {} } // //# b06a: ok - b06b() async { await for ( ; ; ) {} } // //# b06b: compile-time error - b07a() sync* { yield 0; } // //# b07a: ok - b08a() sync* { yield* []; } // //# b08a: ok - b09a() async* { yield 0; } // //# b09a: ok - b10a() async* { yield* []; } // //# b10a: compile-time error - b10b() async { yield 0; } // //# b10b: compile-time error - - get sync sync {} // //# b11a: syntax error - get sync sync* {} // //# b11b: ok - get async async {} // //# b11c: ok - get async async* {} // //# b11d: ok - - get sync {} // //# b12a: ok - get sync* {} // //# b12b: syntax error - get async {} // //# b12c: ok - get async* {} // //# b12d: syntax error - get b12e sync* => null; // //# b12e: syntax error - get b12f async* => null; // //# b12f: syntax error - get b12g async => null; // //# b12g: ok - - int sync; // //# b13a: ok - int sync*; // //# b13b: syntax error - int async; // //# b13c: ok - int async*; // //# b13d: syntax error - - var sync; // //# b14a: ok - var sync*; // //# b14b: syntax error - var async; // //# b14c: ok - var async*; // //# b14d: syntax error - - sync() {} // //# b15a: ok - sync*() {} // //# b15b: syntax error - async() {} // //# b15c: ok - async*() {} // //# b15d: syntax error -} - -method1() { - c01a() async => null; c01a(); // //# c01a: ok - c01b() async* => null; c01b(); // //# c01b: syntax error - c01c() sync* => null; c01c(); // //# c01c: syntax error - c02a() async {} c02a(); // //# c02a: ok - c03a() async* {} c03a(); // //# c03a: ok - c04a() sync* {} c04a(); // //# c04a: ok - c04b() sync {} c04b(); // //# c04b: syntax error - c05a() async { await 0; } c05a(); // //# c05a: ok - c06a() async { await for (var o in st) {} } c06a(); // //# c06a: ok - c07a() sync* { yield 0; } c07a(); // //# c07a: ok - c08a() sync* { yield* []; } c08a(); // //# c08a: ok - c09a() async* { yield 0; } c09a(); // //# c09a: ok - c10a() async* { yield* []; } c10a(); // //# c10a: compile-time error - c11a() async { yield -5; } c11a(); // //# c11a: compile-time error - c11b() async { yield* st; } c11b(); // //# c11b: compile-time error -} - -method2() { - var d01a = () async => null; d01a(); // //# d01a: ok - var d01b = () async* => null; d01b(); // //# d01b: syntax error - var d01c = () sync* => null; d01c(); // //# d01c: syntax error - var d02a = () async {}; d02a(); // //# d02a: ok - var d03a = () async* {}; d03a(); // //# d03a: ok - var d04a = () sync* {}; d04a(); // //# d04a: ok - var d04b = () sync {}; d04b(); // //# d04b: syntax error - var d05a = () async { await 0; }; d05a(); // //# d05a: ok - var d06a = () async { await for (var o in st) {} }; d06a(); // //# d06a: ok - var d07a = () sync* { yield 0; }; d07a(); // //# d07a: ok - var d08a = () sync* { yield* []; }; d08a(); // //# d08a: ok - var d08b = () sync* { yield*0+1; }; d08b(); // //# d08b: compile-time error - var d08c = () { yield*0+1; }; d08c(); // //# d08c: ok - var d09a = () async* { yield 0; }; d09a(); // //# d09a: ok - var d10a = () async* { yield* []; }; d10a(); // //# d10a: compile-time error -} - -void main() { - var a; - var c = new C(); - c = new C.e1(); //# e1: continued - c = new C.e2(); //# e2: continued - c = new C.e3(); //# e3: continued - c = new C.e4(); //# e4: continued - c = new C.e5(); //# e5: continued - c = new C.e6(); //# e6: continued - c = new C.e7(); //# e7: continued - c = new C.e8(); //# e8: continued - c = new C.e9(); //# e9: continued - - a01a(); // //# a01a: continued - a01b(); // //# a01b: continued - a01c(); // //# a01c: continued - a01d(); // //# a01d: continued - a02a(); // //# a02a: continued - a03a(); // //# a03a: continued - a03b(); // //# a03b: continued - a04a(); // //# a04a: continued - a04b(); // //# a04b: continued - a04c(); // //# a04c: continued - a05a(); // //# a05a: continued - a05b(); // //# a05b: continued - a05c(); // //# a05c: continued - a05d(); // //# a05d: continued - a05e(); // //# a05e: continued - a05f(); // //# a05f: continued - a05g(); // //# a05g: continued - a05h(); // //# a05h: continued - a06a(); // //# a06a: continued - a06b(); // //# a06b: continued - a07a(); // //# a07a: continued - a07b(); // //# a07b: continued - a08a(); // //# a08a: continued - a08b(); // //# a08b: continued - a09a(); // //# a09a: continued - a10a(); // //# a10a: continued - a = sync; // //# a11a: continued - a = sync; // //# a11b: continued - a = async; // //# a11c: continued - a = async; // //# a11d: continued - a = sync; // //# a12a: continued - a = sync; // //# a12b: continued - a = async; // //# a12c: continued - a = async; // //# a12d: continued - a = a12e; // //# a12e: continued - a = a12f; // //# a12f: continued - a = a12g; // //# a12g: continued - a = sync; // //# a13a: continued - a = sync; // //# a13b: continued - a = async; // //# a13c: continued - a = async; // //# a13d: continued - a = sync; // //# a14a: continued - a = sync; // //# a14b: continued - a = async; // //# a14c: continued - a = async; // //# a14d: continued - sync(); // //# a15a: continued - sync(); // //# a15b: continued - async(); // //# a15c: continued - async(); // //# a15d: continued - - c.b00a(); // //# b00a: continued - c.b00b(); // //# b00b: continued - c.b00c(); // //# b00c: continued - c.b00d(); // //# b00d: continued - c.b01a(); // //# b01a: continued - c.b01b(); // //# b01b: continued - c.b01c(); // //# b01c: continued - c.b02a(); // //# b02a: continued - c.b03a(); // //# b03a: continued - c.b04a(); // //# b04a: continued - c.b04b(); // //# b04b: continued - c.b05a(); // //# b05a: continued - c.b06a(); // //# b06a: continued - c.b06b(); // //# b06b: continued - c.b07a(); // //# b07a: continued - c.b08a(); // //# b08a: continued - c.b09a(); // //# b09a: continued - c.b10a(); // //# b10a: continued - c.b10b(); // //# b10b: continued - a = c.sync; // //# b11a: continued - a = c.sync; // //# b11b: continued - a = c.async; // //# b11c: continued - a = c.async; // //# b11d: continued - a = c.sync; // //# b12a: continued - a = c.sync; // //# b12b: continued - a = c.async; // //# b12c: continued - a = c.async; // //# b12d: continued - a = c.b12e; // //# b12e: continued - a = c.b12f; // //# b12f: continued - a = c.b12g; // //# b12g: continued - a = c.sync; // //# b13a: continued - a = c.sync; // //# b13b: continued - a = c.async; // //# b13c: continued - a = c.async; // //# b13d: continued - a = c.sync; // //# b14a: continued - a = c.sync; // //# b14b: continued - a = c.async; // //# b14c: continued - a = c.async; // //# b14d: continued - c.sync(); // //# b15a: continued - c.sync(); // //# b15b: continued - c.async(); // //# b15c: continued - c.async(); // //# b15d: continued - - method1(); - method2(); -} diff --git a/tests/language_2/async/await_test.dart b/tests/language_2/async/await_test.dart deleted file mode 100644 index c0e86417f00..00000000000 --- a/tests/language_2/async/await_test.dart +++ /dev/null @@ -1,2307 +0,0 @@ -// Copyright (c) 2015, 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 - -// VMOptions= -// VMOptions=--optimization-counter-threshold=20 - -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; -import "dart:async"; - -typedef dynamic DynamicToDynamic(dynamic d); - -main() { - asyncStart(); - group("basic", () { - test("async w/o await", () { - f() async { - return id(42); - } - - return expect42(f()); - }); - - test("async starts synchronously", () { - // Calling an "async" function starts immediately. - var result = []; - f() async { - result.add(1); - return id(42); - } - - ; - var future = f(); - result.add(0); - return future.whenComplete(() { - expect(result, equals([1, 0])); - }); - }); - - test("async throws", () { - f() async { - throw "err"; - return id(42); - } - - return throwsErr(f()); - }); - - test("await future", () { - f() async { - var v = await new Future.value(42); - return v; - } - - ; - return expect42(f()); - }); - - test("await value", () { - f() async { - var v = await id(42); - return v; - } - - ; - return expect42(f()); - }); - - test("await null", () { - f() async { - var v = await null; - expect(v, equals(null)); - } - - ; - return f(); - }); - - test("await await", () { - f() async { - return await await new Future.value(42); - } - - return expect42(f()); - }); - - test("await fake value future", () { - f() async { - return await new FakeValueFuture(42); - } - - return expect42(f()); - }); - - test("await fake error future", () { - f() async { - return await new FakeErrorFuture("err"); - } - - return throwsErr(f()); - }); - - test("await value is delayed", () { - f() async { - bool x = false; - scheduleMicrotask(() { - x = true; - }); - var y = await true; - expect(x, equals(y)); - } - - return f(); - }); - - test("await throw", () { - f() async { - await (throw "err"); // Check grammar: Are parentheses necessary? - return id(42); - } - - return throwsErr(f()); - }); - - test("throw before await", () { - f() async { - var x = throw "err"; - await x; // Check grammar: Are parentheses necessary? - return id(42); - } - - return throwsErr(f()); - }); - - if (assertStatementsEnabled) { - test("assert before await", () { - f(v) async { - assert(v == 87); - return await new Future.microtask(() => 42); - } - - return f(42).then((_) { - fail("assert didn't throw"); - }, onError: (e, s) { - expect(e is AssertionError, isTrue); - }); - }); - - test("assert after await", () { - f(v) async { - var x = await new Future.microtask(() => 42); - assert(v == 87); - return x; - } - - return f(42).then((_) { - fail("assert didn't throw"); - }, onError: (e, s) { - expect(e is AssertionError, isTrue); - }); - }); - } - - test("async await error", () { - f() async { - await new Future.error("err"); - return id(42); - } - - return throwsErr(f()); - }); - - test("async flattens futures", () { - f() async { - return new Future.value(42); // Not awaited. - } - - ; - return f().then((v) { - expect(v, equals(42)); // And not a Future with value 42. - }); - }); - - test("async flattens futures, error", () { - f() async { - return new Future.error("err"); // Not awaited. - } - - return throwsErr(f()); - }); - - test("await for", () { - f(Stream s) async { - int i = 0; - await for (int v in s) { - i += v; - } - return i; - } - - return f(mkStream()).then((v) { - expect(v, equals(45)); // 0 + 1 + ... + 9 - }); - }); - - test("await for w/ await", () { - f(Stream s) async { - int i = 0; - await for (int v in s) { - i += await new Future.value(v); - } - return i; - } - - return f(mkStream()).then((v) { - expect(v, equals(45)); // 0 + 1 + ... + 9 - }); - }); - - test("await for empty", () { - f(Stream s) async { - int v = 0; - await for (int i in s) { - v += i; - } - return v; - } - - var s = (new StreamController()..close()).stream; - return f(s).then((v) { - expect(v, equals(0)); - }); - }); - - if (assertStatementsEnabled) { - test("await for w/ await, asseert", () { - f(Stream s) async { - int i = 0; - await for (int v in s) { - i += await new Future.microtask(() => v); - assert(v < 8); - } - return i; - } - - return f(mkStream()).then((v) { - fail("assert didn't throw"); - }, onError: (e, s) { - expect(e is AssertionError, isTrue); - }); - }); - } - }); - - group("for", () { - test("await in for-loop", () { - f() async { - int v = 0; - for (int i = 0; i < 10; i++) { - v += await new Future.value(42); - } - return v; - } - - return f().then((v) { - expect(v, equals(10 * id(42))); - }); - }); - - test("await in for-init", () { - f() async { - int v = 0; - for (int i = await new Future.value(42); i >= 0; i -= 10) { - v += 10; - } - return v; - } - - return f().then((v) { - expect(v, equals(10 * 5)); - }); - }); - - test("await in for-test", () { - f() async { - int v = 0; - for (int i = 0; i < await new Future.value(42); i += 10) { - v += 10; - } - return v; - } - - return f().then((v) { - expect(v, equals(10 * 5)); - }); - }); - - test("await in for-incr", () { - f() async { - int v = 0; - for (int i = 0; i < 100; i += await new Future.value(42)) { - v += 10; - } - return v; - } - - return f().then((v) { - expect(v, equals(10 * 3)); - }); - }); - - test("await err in for-loop", () { - f() async { - int v = 0; - for (int i = 0; i < 10; i++) { - v += await new Future.error("err"); - } - return v; - } - - return throwsErr(f()); - }); - - test("await err in for-init", () { - f() async { - int v = 0; - for (int i = await new Future.error("err"); i >= 0; i -= 10) { - v += 10; - } - return v; - } - - return throwsErr(f()); - }); - - test("await err in for-test", () { - f() async { - int v = 0; - for (int i = 0; i < await new Future.error("err"); i += 10) { - v += 10; - } - return v; - } - - return throwsErr(f()); - }); - - test("await err in for-incr", () { - f() async { - int v = 0; - for (int i = 0; i < 100; i += await new Future.error("err")) { - v += 10; - } - return v; - } - - return throwsErr(f()); - }); - - test("await in empty for-loop", () { - f() async { - int v = 0; - for (int i = 0; i > 0; i += 1) { - v += await new Future.value(42); - } - return v; - } - - return f().then((v) { - expect(v, equals(0)); - }); - }); - - test("await in empty for-loop 2", () { - f() async { - int v = 0; - for (int i = 0; i > 0; i += await new Future.value(1)) { - v += 1; - } - return v; - } - - return f().then((v) { - expect(v, equals(0)); - }); - }); - - test("break before await in for-loop", () { - f() async { - int v = 0; - for (int i = 0; i < 10; i += 1) { - if (i == 2) break; - v += await new Future.value(42); - } - return v; - } - - return f().then((v) { - expect(v, equals(42 * 2)); - }); - }); - - test("break before await in for-loop 2", () { - f() async { - int v = 0; - for (int i = 0; i < 10; i += await new Future.value(1)) { - if (i == 2) break; - v += id(42); - } - return v; - } - - return f().then((v) { - expect(v, equals(42 * 2)); - }); - }); - - test("continue before await", () { - f() async { - int v = 0; - for (int i = 0; i < 10; i += 1) { - if (i == 2) continue; - v += await new Future.value(42); - } - return v; - } - - return f().then((v) { - expect(v, equals(42 * 9)); - }); - }); - - test("continue after await", () { - f() async { - int v = 0; - for (int i = 0; i < 10; i += 1) { - var j = await new Future.value(42); - if (i == 2) continue; - v += j; - } - return v; - } - - return f().then((v) { - expect(v, equals(42 * 9)); - }); - }); - }); - - group("while", () { - test("await in while-loop", () { - f() async { - int v = 0; - int i = 0; - while (i < 10) { - v += await new Future.value(42); - i++; - } - return v; - } - - return f().then((v) { - expect(v, equals(10 * id(42))); - }); - }); - - test("await in while-test", () { - f() async { - int v = 0; - int i = 0; - while (i < await new Future.value(42)) { - v += 10; - i += 10; - } - return v; - } - - return f().then((v) { - expect(v, equals(10 * 5)); - }); - }); - - test("await err in loop", () { - f() async { - int v = 0; - int i = 0; - while (i < 10) { - v += await new Future.error("err"); - i++; - } - return v; - } - - return throwsErr(f()); - }); - - test("await err in test", () { - f() async { - int v = 0; - int i = 0; - while (i < await new Future.error("err")) { - v += 10; - i += 10; - } - return v; - } - - return throwsErr(f()); - }); - - test("break before await", () { - f() async { - int v = 0; - int i = 0; - while (i < 10) { - if (i == 2) break; - v += await new Future.value(42); - i += 1; - } - return v; - } - - return f().then((v) { - expect(v, equals(42 * 2)); - }); - }); - - test("break after await", () { - f() async { - int v = 0; - int i = 0; - while (i < 10) { - v += await new Future.value(42); - if (i == 2) break; - i += 1; - } - return v; - } - - return f().then((v) { - expect(v, equals(42 * 3)); - }); - }); - - test("continue before await", () { - f() async { - int v = 0; - int i = 0; - while (i < 10) { - i += 1; - if (i == 2) continue; - v += await new Future.value(42); - } - return v; - } - - return f().then((v) { - expect(v, equals(42 * 9)); - }); - }); - - test("continue after await", () { - f() async { - int v = 0; - int i = 0; - while (i < 10) { - i += 1; - int j = await new Future.value(42); - if (i == 2) continue; - v += j; - } - return v; - } - - return f().then((v) { - expect(v, equals(42 * 9)); - }); - }); - }); - - group("do-while", () { - test("await in loop", () { - f() async { - int v = 0; - int i = 0; - do { - v += await new Future.value(42); - i++; - } while (i < 10); - return v; - } - - return f().then((v) { - expect(v, equals(10 * id(42))); - }); - }); - - test("await in test", () { - f() async { - int v = 0; - int i = 0; - do { - v += 10; - i += 10; - } while (i < await new Future.value(42)); - return v; - } - - return f().then((v) { - expect(v, equals(10 * 5)); - }); - }); - - test("await err in loop", () { - f() async { - int v = 0; - int i = 0; - do { - v += await new Future.error("err"); - i++; - } while (i < 10); - return v; - } - - return f().then((v) { - fail("didn't throw"); - }, onError: (e) { - expect(e, equals("err")); - }); - }); - - test("await err in test", () { - f() async { - int v = 0; - int i = 0; - do { - v += 10; - i += 10; - } while (i < await new Future.error("err")); - return v; - } - - return f().then((v) { - fail("didn't throw"); - }, onError: (e) { - expect(e, equals("err")); - }); - }); - - test("break before await", () { - f() async { - int v = 0; - int i = 0; - do { - if (i == 2) break; - v += await new Future.value(42); - i += 1; - } while (i < 10); - return v; - } - - return f().then((v) { - expect(v, equals(42 * 2)); - }); - }); - - test("break after await", () { - f() async { - int v = 0; - int i = 0; - do { - v += await new Future.value(42); - if (i == 2) break; - i += 1; - } while (i < 10); - return v; - } - - return f().then((v) { - expect(v, equals(42 * 3)); - }); - }); - - test("continue before await", () { - f() async { - int v = 0; - int i = 0; - do { - i += 1; - if (i == 2) continue; - v += await new Future.value(42); - } while (i < 10); - return v; - } - - return f().then((v) { - expect(v, equals(42 * 9)); - }); - }); - - test("continue after await", () { - f() async { - int v = 0; - int i = 0; - do { - i += 1; - int j = await new Future.value(42); - if (i == 2) continue; - v += j; - } while (i < 10); - return v; - } - - return f().then((v) { - expect(v, equals(42 * 9)); - }); - }); - }); - - group("for-in", () { - test("await in for-in", () { - f() async { - var v = 0; - for (var fut in [1, 2, 3].map((v) => new Future.value(v))) { - v += await fut; - } - return v; - } - - return f().then((v) { - expect(v, equals(6)); - }); - }); - - test("await in for-in iterable", () { - f() async { - var v = 0; - for (var i in await new Future.value([1, 2, 3])) { - v += i; - } - return v; - } - - return f().then((v) { - expect(v, equals(6)); - }); - }); - - test("await err in for-in", () { - f() async { - var v = 0; - for (var fut in [1, 2, 3].map( - (v) => (v != 1) ? new Future.value(v) : new Future.error("err"))) { - v += await fut; - } - return v; - } - - return f().then((v) { - fail("didn't throw"); - }, onError: (e) { - expect(e, equals("err")); - }); - }); - - test("await err in for-in iterable", () { - f() async { - var v = 0; - for (var i in await new Future.error("err")) { - v += i; - } - return v; - } - - return f().then((v) { - fail("didn't throw"); - }, onError: (e) { - expect(e, equals("err")); - }); - }); - - test("break before await in for-in", () { - f() async { - var v = 0; - for (var fut in [1, 2, 3].map((v) => new Future.value(v))) { - if (v == 3) break; - v += await fut; - } - return v; - } - - return f().then((v) { - expect(v, equals(3)); - }); - }); - }); - - group("try-catch", () { - test("try-no-catch", () { - f() async { - try { - return await id(42); - } catch (e) { - return 37; - } - } - - return expect42(f()); - }); - - test("await in body", () { - f() async { - try { - await new Future.error(42); - } catch (e) { - return e; - } - } - - return expect42(f()); - }); - - test("throw before await in body", () { - int i = id(0); - f() async { - try { - if (i >= 0) throw id(42); - return await new Future.value(10); - } catch (e) { - return e; - } - } - - return expect42(f()); - }); - - test("try-catch await in catch", () { - f() async { - try { - throw id(42); - } catch (e) { - return await new Future.value(e); - } - } - - return expect42(f()); - }); - - test("try-catch await error in catch", () { - f() async { - try { - throw id(42); - } catch (e) { - await new Future.error("err"); - } - } - - return f().then((v) { - fail("didn't throw"); - }, onError: (e) { - expect(e, equals("err")); - }); - }); - - test("try-catch-rethrow", () { - f() async { - try { - await new Future.error("err"); - } catch (e) { - if (e == id(42)) return; - rethrow; - } - } - - return f().then((v) { - fail("didn't throw"); - }, onError: (e) { - expect(e, equals("err")); - }); - }); - }); - - group("try-finally", () { - test("await in body", () { - f() async { - try { - return await new Future.value(42); - } finally { - // Don't do anything. - } - } - - return expect42(f()); - }); - - test("await in finally", () { - var x = 0; - f() async { - try { - return id(42); - } finally { - x = await new Future.value(37); - } - } - - return f().then((v) { - expect(v, equals(42)); - expect(x, equals(37)); - }); - }); - - test("await err in body", () { - f() async { - try { - return await new Future.error("err"); - } finally { - // Don't do anything. - } - } - - return f().then((v) { - fail("didn't throw"); - }, onError: (e) { - expect(e, equals("err")); - }); - }); - - test("await err in finally", () { - f() async { - try { - return id(42); - } finally { - await new Future.error("err"); - } - } - - return f().then((v) { - fail("didn't throw"); - }, onError: (e) { - expect(e, equals("err")); - }); - }); - - test("await err in both", () { - f() async { - try { - await new Future.error("not err"); - } finally { - await new Future.error("err"); - } - } - - return f().then((v) { - fail("didn't throw"); - }, onError: (e) { - expect(e, equals("err")); - }); - }); - - test("await err in body, override in finally", () { - f() async { - try { - return await new Future.error("err"); - } finally { - return id(42); - } - } - - return expect42(f()); - }); - - test("await in body, override in finally", () { - f() async { - label: - try { - return await new Future.value(37); - } finally { - break label; - } - return id(42); - } - - return expect42(f()); - }); - - test("await, override in finally", () { - var x = 0; - f() async { - label: - try { - return 87; - } finally { - x = await new Future.value(37); - break label; - } - return id(42); - } - - return f().then((v) { - expect(v, equals(42)); - expect(x, equals(37)); - }); - }); - - test("throw in body, await, override in finally 3", () { - var x = 0; - f() async { - label: - try { - throw "err"; - } finally { - x = await new Future.value(37); - break label; - } - return id(42); - } - - return f().then((v) { - expect(v, equals(42)); - expect(x, equals(37)); - }); - }); - - test("await err in body, override in finally 2", () { - f() async { - label: - try { - return await new Future.error("err"); - } finally { - break label; - } - return id(42); - } - - return expect42(f()); - }); - - test("await in body, no-exit in finally", () { - f() async { - for (int i = 0; i < 10; i++) { - try { - return await i; - } finally { - continue; - } - } - return id(42); - } - - return expect42(f()); - }); - - test("no-exit after await in finally", () { - f() async { - int i = 0; - for (; i < 10; i++) { - try { - break; - } finally { - await new Future.value(42); - continue; - } - } - return id(i); - } - - return f().then((v) { - expect(v, equals(10)); - }); - }); - - test("exit after continue, await in finally", () { - f() async { - int i = 0; - for (; i < 10; i++) { - try { - continue; - } finally { - await new Future.value(42); - break; - } - } - return id(i); - } - - return f().then((v) { - expect(v, equals(0)); - }); - }); - - test("no-exit before await in finally 2", () { - f() async { - for (int i = 0; i < 10; i++) { - try { - return i; - } finally { - if (i >= 0) continue; - await new Future.value(42); - } - } - return id(42); - } - - return expect42(f()); - }); - - test("no-exit after await in finally", () { - f() async { - for (int i = 0; i < 10; i++) { - try { - return i; - } finally { - await new Future.value(42); - continue; - } - } - return id(42); - } - - return expect42(f()); - }); - - test("nested finallies", () { - var x = 0; - f() async { - try { - try { - return 42; - } finally { - x = await new Future.value(37); - } - } finally { - x += await new Future.value(37); - } - } - - return f().then((v) { - expect(v, equals(42)); - expect(x, equals(74)); - }); - }); - - test("nested finallies 2", () { - var x = 0; - f() async { - label: - try { - try { - break label; - } finally { - x = await new Future.value(37); - } - } finally { - x += await new Future.value(37); - } - return 42; - } - - return f().then((v) { - expect(v, equals(42)); - expect(x, equals(74)); - }); - }); - - test("nested finallies 3", () { - var x = 0; - f() async { - label: - try { - try { - break label; - } finally { - return await new Future.value(42); - } - } finally { - break label; - } - return 42; - } - - return expect42(f()); - }); - - test("nested finallies, throw", () { - var x = 0; - f() async { - try { - try { - throw "err"; - } finally { - x = await new Future.value(37); - } - } finally { - x += await new Future.value(37); - } - } - - return f().then((v) { - fail("didn't throw"); - }, onError: (e) { - expect(e, equals("err")); - expect(x, equals(2 * 37)); - }); - }); - }); - - group("try-catch-finally", () { - test("await in body", () { - f() async { - try { - return await new Future.value(42); - } catch (e) { - throw null; - } finally { - if (id(42) == id(10)) return 10; - } - } - - return expect42(f()); - }); - - test("await in catch, not hit", () { - f() async { - try { - return id(42); - } catch (e) { - await new Future.error("err"); - } finally { - if (id(42) == id(10)) return 10; - } - } - - return expect42(f()); - }); - - test("await in catch, hit", () { - f() async { - try { - return throw id(42); - } catch (e) { - return await new Future.value(e); - } finally { - if (id(42) == id(10)) return 10; - } - } - - return expect42(f()); - }); - - test("await in finally", () { - var x = 0; - f() async { - try { - return id(42); - } catch (e) { - throw null; - } finally { - x = await new Future.value(37); - if (id(42) == id(10)) return 10; - } - } - - return f().then((v) { - expect(v, equals(42)); - expect(x, equals(37)); - }); - }); - }); - - group("switch", () { - test("await in expression", () { - f(v) async { - switch (await new Future.value(v)) { - case 1: - return 1; - case 2: - return 42; - default: - return 3; - } - return null; - } - - return expect42(f(2)); - }); - - test("await err in expression", () { - f(v) async { - switch (await new Future.error("err")) { - case 1: - return 1; - case 2: - return 42; - default: - return 3; - } - return null; - } - - return throwsErr(f(2)); - }); - - test("await in case", () { - f(v) async { - switch (v) { - case 1: - return 1; - case 2: - return await new Future.value(42); - default: - return 3; - } - return null; - } - - return expect42(f(2)); - }); - - test("await err in case", () { - f(v) async { - switch (v) { - case 1: - return 1; - case 2: - return await new Future.error("err"); - default: - return 3; - } - return null; - } - - return throwsErr(f(2)); - }); - // TODO(jmesserly): restore this when we fix - // https://github.com/dart-lang/dev_compiler/issues/263 - /*test("continue before await in case", () { - f(v) async { - switch (v) { - label: - case 1: return 42; - case 2: - if (v <= 2) continue label; - return await new Future.value(10); - default: return 3; - } - return null; - } - return expect42(f(2)); - }); - - test("continue after await in case", () { - f(v) async { - switch (v) { - label: - case 1: return 42; - case 2: - await new Future.value(10); - continue label; - default: return 3; - } - return null; - } - return expect42(f(2)); - });*/ - }); - - group("if", () { - test("await in test", () { - f(v) async { - if (await new Future.value(v)) { - return 42; - } else { - return 37; - } - } - - return expect42(f(true)); - }); - - test("await err in test", () { - f(v) async { - if (await new Future.error("err")) { - return 42; - } else { - return 37; - } - } - - return throwsErr(f(true)); - }); - - test("await in then", () { - f(v) async { - if (v) { - return await new Future.value(42); - } - return 37; - } - - return expect42(f(true)); - }); - - test("await err in then", () { - f(v) async { - if (v) { - return await new Future.error("err"); - } - return 37; - } - - return throwsErr(f(true)); - }); - - test("await in then with else", () { - f(v) async { - if (v) { - return await new Future.value(42); - } else { - return 87; - } - return 37; - } - - return expect42(f(true)); - }); - - test("await err in then with else", () { - f(v) async { - if (v) { - return await new Future.error("err"); - } else { - return 87; - } - return 37; - } - - return throwsErr(f(true)); - }); - - test("await in else", () { - f(v) async { - if (v) { - return 37; - } else { - return await new Future.value(42); - } - return 87; - } - - return expect42(f(false)); - }); - - test("await err in else", () { - f(v) async { - if (v) { - return 37; - } else { - return await new Future.error("err"); - } - return 87; - } - - return throwsErr(f(false)); - }); - - test("await in else-if test", () { - f(v) async { - if (v) { - return 37; - } else if (!await new Future.value(v)) { - return 42; - } else { - return 37; - } - return 87; - } - - return expect42(f(false)); - }); - - test("await in else-if then", () { - f(v) async { - if (v) { - return 37; - } else if (!v) { - return await new Future.value(42); - } else { - return 37; - } - return 87; - } - - return expect42(f(false)); - }); - }); - - group("conditional operator", () { - test("await in test", () { - f(v) async { - return (await new Future.value(v)) ? 42 : 37; - } - - return expect42(f(true)); - }); - - test("await err in test", () { - f(v) async { - return (await new Future.error("err")) ? 42 : 37; - } - - return throwsErr(f(true)); - }); - - test("await in then", () { - f(v) async { - return v ? (await new Future.value(42)) : 37; - } - - return expect42(f(true)); - }); - - test("await err in then", () { - f(v) async { - return v ? (await new Future.error("err")) : 37; - } - - return throwsErr(f(true)); - }); - - test("await in else", () { - f(v) async { - return v ? 37 : (await new Future.value(42)); - } - - return expect42(f(false)); - }); - - test("await err in else", () { - f(v) async { - return v ? 37 : (await new Future.error("err")); - } - - return throwsErr(f(false)); - }); - }); - - group("async declarations", () { - var f42 = new Future.value(42); - - // Top-level declarations or local declarations in top-level functions. - test("topMethod", () { - return expect42(topMethod(f42)); - }); - - test("topArrowMethod", () { - return expect42(topArrowMethod(f42)); - }); - - test("topGetter", () { - return expect42(topGetter); - }); - - test("topArrowGetter", () { - return expect42(topArrowGetter); - }); - - test("topLocal", () { - return expect42(topLocal(f42)); - }); - - test("topArrowLocal", () { - return expect42(topArrowLocal(f42)); - }); - - test("topExpression", () { - return expect42(topExpression(f42)); - }); - - test("topArrowExpression", () { - return expect42(topArrowExpression(f42)); - }); - - test("topVarExpression", () { - return expect42(topVarExpression(f42)); - }); - - test("topVarArrowExpression", () { - return expect42(topVarArrowExpression(f42)); - }); - - // Static declarations or local declarations in static functions. - test("staticMethod", () { - return expect42(Async.staticMethod(f42)); - }); - - test("staticArrowMethod", () { - return expect42(Async.staticArrowMethod(f42)); - }); - - test("staticGetter", () { - return expect42(Async.staticGetter); - }); - - test("staticArrowGetter", () { - return expect42(Async.staticArrowGetter); - }); - - test("staticLocal", () { - return expect42(Async.staticLocal(f42)); - }); - - test("staticArrowLocal", () { - return expect42(Async.staticArrowLocal(f42)); - }); - - test("staticExpression", () { - return expect42(Async.staticExpression(f42)); - }); - - test("staticArrowExpression", () { - return expect42(Async.staticArrowExpression(f42)); - }); - - test("staticVarExpression", () { - return expect42(Async.staticVarExpression(f42)); - }); - - test("staticVarArrowExpression", () { - return expect42(Async.staticVarArrowExpression(f42)); - }); - - // Instance declarations or local declarations in instance functions. - var async = new Async(); - - test("instanceMethod", () { - return expect42(async.instanceMethod(f42)); - }); - - test("instanceArrowMethod", () { - return expect42(async.instanceArrowMethod(f42)); - }); - - test("instanceGetter", () { - return expect42(async.instanceGetter); - }); - - test("instanceArrowGetter", () { - return expect42(async.instanceArrowGetter); - }); - - test("instanceLocal", () { - return expect42(async.instanceLocal(f42)); - }); - - test("instanceArrowLocal", () { - return expect42(async.instanceArrowLocal(f42)); - }); - - test("instanceExpression", () { - return expect42(async.instanceExpression(f42)); - }); - - test("instanceArrowExpression", () { - return expect42(async.instanceArrowExpression(f42)); - }); - - test("instanceVarExpression", () { - return expect42(async.instanceVarExpression(f42)); - }); - - test("instanceVarArrowExpression", () { - return expect42(async.instanceVarArrowExpression(f42)); - }); - - // Local functions in constructor initializer list. - test("initializerExpression", () { - var async = new Async.initializer(f42); - return expect42(async.initValue); - }); - - test("initializerArrowExpression", () { - var async = new Async.initializerArrow(f42); - return expect42(async.initValue); - }); - - test("async in async", () { - return expect42(asyncInAsync(f42)); - }); - - test("sync in async", () { - return expect42(syncInAsync(f42)); - }); - - test("async in sync", () { - return expect42(asyncInSync(f42)); - }); - - test("Identical and equals", () { - expect(async.instanceMethod, equals(async.instanceMethod)); - expect(Async.staticMethod, same(Async.staticMethod)); - expect(topMethod, same(topMethod)); - }); - }); - - group("await expression", () { - const c42 = 42; - final v42 = 42; - - test("local variable", () { - var l42 = 42; - f() async { - return await l42; - } - - return expect42(f()); - }); - - test("parameter", () { - f(p) async { - return await p; - } - - return expect42(f(42)); - }); - - test("final local variable", () { - f() async { - return await v42; - } - - return expect42(f()); - }); - - test("const local variable", () { - f() async { - return await c42; - } - - return expect42(f()); - }); - - test("unary prefix operator", () { - f() async { - return -await -42; - } - - return expect42(f()); - }); - - test("suffix operator", () { - f() async { - var v = [42]; - return await v[0]; - } - - return expect42(f()); - }); - - test("unary postfix operator", () { - f() async { - var x = 42; - return await x++; - } - - return expect42(f()); - }); - - test("suffix operator + increment", () { - f() async { - var v = [42]; - return await v[0]++; - } - - return expect42(f()); - }); - - test("suffix operator + increment 2", () { - f() async { - var v = [42]; - return await v[await 0]++; - } - - return expect42(f()); - }); - - test("unary pre-increment operator", () { - f() async { - var x = 41; - return await ++x; - } - - return expect42(f()); - }); - - test("suffix operator + pre-increment", () { - f() async { - var v = [41]; - return await ++v[0]; - } - - return expect42(f()); - }); - - test("assignment operator", () { - f() async { - var x = 37; - return await (x = 42); - } - - return expect42(f()); - }); - - test("assignment-op operator", () { - f() async { - var x = 37; - return await (x += 5); - } - - return expect42(f()); - }); - - test("binary operator", () { - f() async { - return await (10 + 11) + await (10 + 11); - } - - return expect42(f()); - }); - - test("ternary operator", () { - f(v) async { - return await ((v == 10) ? new Future.value(42) : 37); - } - - return expect42(f(10)); - }); - - test("top-level function call", () { - f() async { - return await topMethod(42); - } - - return expect42(f()); - }); - - test("static function call", () { - f() async { - return await Async.staticMethod(42); - } - - return expect42(f()); - }); - - test("instance function call", () { - f() async { - var a = new Async(); - return await a.instanceMethod(42); - } - - return expect42(f()); - }); - - test("top-level function call w/ await", () { - f() async { - return await topMethod(await 42); - } - - return expect42(f()); - }); - - test("static function call w/ await", () { - f() async { - return await Async.staticMethod(await 42); - } - - return expect42(f()); - }); - - test("instance function call w/ await", () { - f() async { - var a = new Async(); - return await a.instanceMethod(await 42); - } - - return expect42(f()); - }); - - test("top-level getter call", () { - f() async { - return await topGetter; - } - - return expect42(f()); - }); - - test("static getter call", () { - f() async { - return await Async.staticGetter; - } - - return expect42(f()); - }); - - test("top-level getter call", () { - f() async { - var a = new Async(); - return await a.instanceGetter; - } - - return expect42(f()); - }); - - if (!assertStatementsEnabled) return; - - test("inside assert, true", () { // //# 03: ok - f() async { // //# 03: continued - assert(await new Future.microtask(() => true)); // //# 03: continued - return 42; // //# 03: continued - } // //# 03: continued - return expect42(f()); // //# 03: continued - }); // //# 03: continued - - test("inside assert, false", () { // //# 03: continued - f() async { // //# 03: continued - assert(await new Future.microtask(() => false)); // //# 03: continued - return 42; // //# 03: continued - } // //# 03: continued - return f().then((_) { // //# 03: continued - fail("assert didn't throw"); // //# 03: continued - }, onError: (e, s) { // //# 03: continued - expect(e is AssertionError, isTrue); // //# 03: continued - }); // //# 03: continued - }); // //# 03: continued - - test("inside assert, function -> false", () { // //# 03: continued - f() async { // //# 03: continued - assert(await new Future.microtask(() => false)); // //# 03: continued - return 42; // //# 03: continued - } // //# 03: continued - return f().then((_) { // //# 03: continued - fail("assert didn't throw"); // //# 03: continued - }, onError: (e, s) { // //# 03: continued - expect(e is AssertionError, isTrue); // //# 03: continued - }); // //# 03: continued - }); // //# 03: continued - }); - - group("syntax", () { - test("async as variable", () { - // Valid identifiers outside of async function. - var async = 42; - expect(async, equals(42)); - }); - - test("await as variable", () { // //# 02: ok - // Valid identifiers outside of async function. // //# 02: continued - var await = 42; // //# 02: continued - expect(await, equals(42)); // //# 02: continued - }); // //# 02: continued - - test("yield as variable", () { - // Valid identifiers outside of async function. - var yield = 42; - expect(yield, equals(42)); - }); - }); - asyncEnd(); -} - -// Mock test framework sufficient to run tests. - -String _currentName = ""; - -test(name, action()) { - var oldName = _currentName; - _currentName = [oldName, name].join(" "); - runZoned(() { - asyncTest(() => new Future.sync(action)); - }, zoneValues: {#testName: _currentName}); - _currentName = oldName; -} - -group(name, entries()) { - var oldName = _currentName; - _currentName = [oldName, name].join(" "); - entries(); - _currentName = oldName; -} - -expect(value, expectation) { - var name = Zone.current[#testName]; - if (expectation is bool) { - // Just for better error message. - (expectation ? Expect.isTrue : Expect.isFalse)(value, name); - return; - } - if (expectation is List) { - Expect.listEquals(expectation, value, name); - return; - } - if (expectation is Function(Object, String)) { - expectation(value, name); - return; - } - Expect.equals(expectation, value, name); -} - -equals(x) => x; -final isTrue = true; -same(v) => (Object o, String name) => Expect.identical(v, o, name); -fail(message) { - var name = Zone.current[#testName]; - Expect.fail("$name: $message"); -} - -// End mock. - -// Attempt to obfuscates value to avoid too much constant folding. -id(v) { - try { - if (v != null) throw v; - } catch (e) { - return e; - } - return null; -} - -// Create a stream for testing "async for-in". -Stream mkStream() { - StreamController c; - int i = 0; - next() { - c.add(i++); - if (i == 10) { - c.close(); - } else { - scheduleMicrotask(next); - } - } - - c = new StreamController(onListen: () { - scheduleMicrotask(next); - }); - return c.stream; -} - -// Check that future contains the error "err". -Future throwsErr(Future future) { - return future.then((v) { - fail("didn't throw"); - }, onError: (e) { - expect(e, equals("err")); - }); -} - -// Check that future contains the value 42. -Future expect42(Future future) { - return future.then((v) { - expect(v, equals(42)); - }); -} - -// Various async declarations. - -Future topMethod(f) async { - return await f; -} - -Future topArrowMethod(f) async => await f; - -Future get topGetter async { - return await new Future.value(42); -} - -Future get topArrowGetter async => await new Future.value(42); - -Future topLocal(f) { - local() async { - return await f; - } - - return local(); -} - -Future topArrowLocal(f) { - local() async => await f; - return local(); -} - -Future topExpression(f) { - return () async { - return await f; - }(); -} - -Future topArrowExpression(f) { - return (() async => await f)(); -} - -DynamicToDynamic topVarExpression = (f) async { - return await f; -}; - -var topVarArrowExpression = (f) async => await f; - -class Async { - var initValue; - Async(); - - Async.initializer(f) - : initValue = (() async { - return await f; - }()); - - Async.initializerArrow(f) : initValue = ((() async => await f)()); - - /* static */ - static Future staticMethod(f) async { - return await f; - } - - static Future staticArrowMethod(f) async => await f; - - static Future get staticGetter async { - return await new Future.value(42); - } - - static Future get staticArrowGetter async => await new Future.value(42); - - static Future staticLocal(f) { - local() async { - return await f; - } - - return local(); - } - - static Future staticArrowLocal(f) { - local() async => await f; - return local(); - } - - static Future staticExpression(f) { - return () async { - return await f; - }(); - } - - static Future staticArrowExpression(f) { - return (() async => await f)(); - } - - static DynamicToDynamic staticVarExpression = (f) async { - return await f; - }; - - static var staticVarArrowExpression = (f) async => await f; - - /* instance */ - Future instanceMethod(f) async { - return await f; - } - - Future instanceArrowMethod(f) async => await f; - - Future get instanceGetter async { - return await new Future.value(42); - } - - Future get instanceArrowGetter async => await new Future.value(42); - - Future instanceLocal(f) { - local() async { - return await f; - } - - return local(); - } - - Future instanceArrowLocal(f) { - local() async => await f; - return local(); - } - - Future instanceExpression(f) { - return () async { - return await f; - }(); - } - - Future instanceArrowExpression(f) { - return (() async => await f)(); - } - - DynamicToDynamic instanceVarExpression = (f) async { - return await f; - }; - - var instanceVarArrowExpression = (f) async => await f; -} - -Future asyncInAsync(f) async { - inner(f) async { - return await f; - } - - return await inner(f); -} - -Future asyncInSync(f) { - inner(f) async { - return await f; - } - - return inner(f); -} - -Future syncInAsync(f) async { - inner(f) { - return f; - } - - return await inner(f); -} - -/** - * A non-standard implementation of Future with a value. - */ -class FakeValueFuture implements Future { - final _value; - FakeValueFuture(this._value); - Future then(callback(value), {Function onError}) { - return new Future.microtask(() => callback(_value)); - } - - Future whenComplete(callback()) { - return new Future.microtask(() { - callback(); - }); - } - - Future catchError(Function onError, {bool test(error)}) => this; - Stream asStream() => (new StreamController() - ..add(_value) - ..close()) - .stream; - Future timeout(Duration duration, {onTimeout()}) => this; -} - -typedef OnErrorCallback2 = dynamic Function(Object, StackTrace); -typedef OnErrorCallback1 = dynamic Function(Object); - -/** - * A non-standard implementation of Future with an error. - */ -class FakeErrorFuture implements Future { - final _error; - FakeErrorFuture(this._error); - Future then(callback(value), {Function onError}) { - if (onError != null) { - if (onError is OnErrorCallback2) { - return new Future.microtask(() => onError(_error, StackTrace.empty)); - } else if (onError is OnErrorCallback1) { - return new Future.microtask(() => onError(_error)); - } else { - throw new ArgumentError.value( - onError, - "onError", - "Error handler must accept one Object or one Object and a StackTrace" - " as arguments, and return a valid result"); - } - } - return new Future.error(_error); - } - - Future whenComplete(callback()) { - return new Future.microtask(() { - callback(); - }).then((_) => this); - } - - Future catchError(Function onError, {bool test(error)}) { - return new Future.microtask(() { - if (test != null && !test(_error)) return this; - if (onError is OnErrorCallback2) { - return onError(_error, null); - } else if (onError is OnErrorCallback1) { - return onError(_error); - } else { - throw new ArgumentError.value( - onError, - "onError", - "Error handler must accept one Object or one Object and a StackTrace" - " as arguments, and return a valid result"); - } - }); - } - - Stream asStream() => (new StreamController() - ..addError(_error) - ..close()) - .stream; - Future timeout(Duration duration, {onTimeout()}) => this; -} diff --git a/tests/language_2/async/await_user_defined_future_soundness_test.dart b/tests/language_2/async/await_user_defined_future_soundness_test.dart deleted file mode 100644 index 269cd10dafb..00000000000 --- a/tests/language_2/async/await_user_defined_future_soundness_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2022, 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 - -// Verifies that a user-defined Future cannot provide a value of incorrect -// type by casting 'onValue' callback. -// Regression test for https://github.com/dart-lang/sdk/issues/49345. - -import 'dart:async'; - -import "package:expect/expect.dart"; - -List executionTrace = []; - -Future foo(Future f) async { - executionTrace.add('Checkpoint 1'); - final String result = await f; - executionTrace.add('Checkpoint 3'); - print(result.runtimeType); -} - -// Immediately calls onValue callback with an ill-typed argument. -class CustomFuture1 implements Future { - Future then(FutureOr Function(String) onValue, {Function onError}) { - executionTrace.add('Checkpoint 2'); - final result = (onValue as FutureOr Function(dynamic))(10); - executionTrace.add('Checkpoint 4'); - return Future.value(result); - } - - @override - dynamic noSuchMethod(i) => throw UnimplementedError(); -} - -// Schedules microtask to call onValue callback with an ill-typed argument. -class CustomFuture2 implements Future { - final Completer done = Completer(); - Future then(FutureOr Function(T) onValue, {Function onError}) { - scheduleMicrotask(() { - Expect.throws(() { - executionTrace.add('Checkpoint 2'); - (onValue as FutureOr Function(dynamic))(10); - executionTrace.add('Checkpoint 4'); - }); - done.complete(); - }); - return Future.value(); - } - - @override - dynamic noSuchMethod(i) => throw UnimplementedError(); -} - -void main() async { - bool seenError = false; - runZoned(() { - foo(CustomFuture1()); - }, onError: (e, st) { - seenError = true; - }); - Expect.listEquals(['Checkpoint 1', 'Checkpoint 2'], executionTrace); - Expect.isTrue(seenError); - - executionTrace.clear(); - final customFuture2 = CustomFuture2(); - foo(customFuture2); - await customFuture2.done.future; - Expect.listEquals(['Checkpoint 1', 'Checkpoint 2'], executionTrace); -} diff --git a/tests/language_2/async/backwards_compatibility_1_test.dart b/tests/language_2/async/backwards_compatibility_1_test.dart deleted file mode 100644 index b29fa7ec509..00000000000 --- a/tests/language_2/async/backwards_compatibility_1_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'dart:async'; -import 'helper_lib.dart' as async; - -class A { - async.async get x => null; -} - -class B { - int get async => null; -} - -async.async topLevel() => null; - -main() { - var a = new A(); - var b = a.x; - var c = topLevel(); - var d = new B(); - var e = d.async; -} diff --git a/tests/language_2/async/backwards_compatibility_2_test.dart b/tests/language_2/async/backwards_compatibility_2_test.dart deleted file mode 100644 index c295d6d3d7a..00000000000 --- a/tests/language_2/async/backwards_compatibility_2_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2014, 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 - -int get async { - return 1; -} - -class A { - async() => null; -} - -main() { - var a = async; - var b = new A(); - var c = b.async(); -} diff --git a/tests/language_2/async/break_in_finally_test.dart b/tests/language_2/async/break_in_finally_test.dart deleted file mode 100644 index 72232f5c2df..00000000000 --- a/tests/language_2/async/break_in_finally_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -then43() async { - label: - try { - return await 42; - } finally { - break label; - } - return await 43; -} - -then42() async { - label: - try { - return await 42; - } finally {} - return await 43; -} - -now43() { - label: - try { - return 42; - } finally { - break label; - } - return 43; -} - -now42() { - label: - try { - return 42; - } finally {} - return 43; -} - -test() async { - Expect.equals(42, await then42()); - Expect.equals(43, await then43()); - Expect.equals(42, now42()); - Expect.equals(43, now43()); -} - -main() { - asyncStart(); - test().then((_) => asyncEnd()); -} diff --git a/tests/language_2/async/call_test.dart b/tests/language_2/async/call_test.dart deleted file mode 100644 index 9234b11b7a2..00000000000 --- a/tests/language_2/async/call_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2017, 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 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -var result = ""; - -foo() { - result += "foo"; -} - -bar() async { - result += "bar"; - await null; - result += "bar2"; -} - -main() { - asyncStart(); - () async { - var f = new Future(foo); - var b = bar(); - Expect.equals("bar", result); - scheduleMicrotask(() => result += "micro"); - await b; - await f; - - // Validates that bar is scheduled as a microtask, before foo. - Expect.equals("barbar2microfoo", result); - asyncEnd(); - }(); -} diff --git a/tests/language_2/async/cascade_test.dart b/tests/language_2/async/cascade_test.dart deleted file mode 100644 index 6f8d9df9961..00000000000 --- a/tests/language_2/async/cascade_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'dart:async'; - -import 'package:expect/expect.dart'; - -// Note, this is a regression test for: -// https://github.com/dart-lang/sdk/issues/29252 -class Foo { - Future _x; - int z; - List list = []; - - Future foo() async { - _x ??= new Future(() async { - z = await new Future.value(42); - list = list.toList()..add(z); - }); - await _x; - return list[0]; - } -} - -main() async { - var f = new Foo(); - var result = await f.foo(); - Expect.equals(42, result); -} diff --git a/tests/language_2/async/congruence_local_runtime_test.dart b/tests/language_2/async/congruence_local_runtime_test.dart deleted file mode 100644 index dfecf905d6b..00000000000 --- a/tests/language_2/async/congruence_local_runtime_test.dart +++ /dev/null @@ -1,125 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -// This test verifies that for a local async function, the following three -// types are all appropriately matched: -// - The static return type -// - The return type of reified runtime type of a tearoff of the function or -// method -// - The reified type of the future returned by the function or method -// -// Specific attention is paid to the following conditions: -// - The static return type is determined by type inference -// - The static return type is `dynamic` -// - The function or method immediately returns a value or future with a -// different type (possibly using `=>` syntax) - -import 'dart:async'; - -import 'package:expect/expect.dart'; - -class A {} - -class B extends A {} - -class B2 extends A {} - -Future quick() async {} - -Future futureB() => new Future.value(new B()); - -void checkDynamic(dynamic tearoff) { - Expect.isTrue(tearoff is dynamic Function()); - Expect.isFalse(tearoff is Future Function()); - dynamic f = tearoff(); - Expect.isTrue(f is Future); - Expect.isFalse(f is Future); -} - -void checkFutureObject(dynamic tearoff) { - Expect.isTrue(tearoff is Future Function()); - Expect.isFalse(tearoff is Future Function()); - dynamic f = tearoff(); - Expect.isTrue(f is Future); - Expect.isFalse(f is Future); -} - -void checkFutureA(dynamic tearoff) { - Expect.isTrue(tearoff is Future Function()); - Expect.isFalse(tearoff is Future Function()); - dynamic f = tearoff(); - Expect.isTrue(f is Future); - Expect.isFalse(f is Future); -} - -main() { - f_inferred_futureObject() async { - await quick(); - if (false) { - return 0; - } else { - return new A(); - } - } - - f_inferred_A() async { - await quick(); - if (false) { - return new A(); - } else { - return new B(); - } - } - - dynamic f_dynamic() async { - await quick(); - return new B(); - } - - Future f_A() async { - await quick(); - return new B(); - } - - Future f_immediateReturn_B() async { - return new B(); - } - - Future f_immediateReturn_FutureB() async { - return futureB(); - } - - Future f_expressionSyntax_B() async => new B(); - - Future f_expressionSyntax_FutureB() async => futureB(); - - // Not executed - void checkStaticTypes() { - // Check that f_inferred_futureObject's static return type is - // `Future`, by verifying that its return value can be assigned to - // `Future` but not `int`. - Future v1 = f_inferred_futureObject(); - - - // Check that f_inferred_A's static return type is `Future`, by verifying - // that its return value can be assigned to `Future` but not - // `Future`. - Future v3 = f_inferred_A(); - - } - - checkFutureObject(f_inferred_futureObject); - checkFutureA(f_inferred_A); - checkDynamic(f_dynamic); - checkFutureA(f_A); - checkFutureA(f_immediateReturn_B); - checkFutureA(f_immediateReturn_FutureB); - checkFutureA(f_expressionSyntax_B); - checkFutureA(f_expressionSyntax_FutureB); -} diff --git a/tests/language_2/async/congruence_local_test.dart b/tests/language_2/async/congruence_local_test.dart deleted file mode 100644 index 1ae9dfaf7a3..00000000000 --- a/tests/language_2/async/congruence_local_test.dart +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) 2017, 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 - -// This test verifies that for a local async function, the following three -// types are all appropriately matched: -// - The static return type -// - The return type of reified runtime type of a tearoff of the function or -// method -// - The reified type of the future returned by the function or method -// -// Specific attention is paid to the following conditions: -// - The static return type is determined by type inference -// - The static return type is `dynamic` -// - The function or method immediately returns a value or future with a -// different type (possibly using `=>` syntax) - -import 'dart:async'; - -import 'package:expect/expect.dart'; - -class A {} - -class B extends A {} - -class B2 extends A {} - -Future quick() async {} - -Future futureB() => new Future.value(new B()); - -void checkDynamic(dynamic tearoff) { - Expect.isTrue(tearoff is dynamic Function()); - Expect.isFalse(tearoff is Future Function()); - dynamic f = tearoff(); - Expect.isTrue(f is Future); - Expect.isFalse(f is Future); -} - -void checkFutureObject(dynamic tearoff) { - Expect.isTrue(tearoff is Future Function()); - Expect.isFalse(tearoff is Future Function()); - dynamic f = tearoff(); - Expect.isTrue(f is Future); - Expect.isFalse(f is Future); -} - -void checkFutureA(dynamic tearoff) { - Expect.isTrue(tearoff is Future Function()); - Expect.isFalse(tearoff is Future Function()); - dynamic f = tearoff(); - Expect.isTrue(f is Future); - Expect.isFalse(f is Future); -} - -main() { - f_inferred_futureObject() async { - await quick(); - if (false) { - return 0; - } else { - return new A(); - } - } - - f_inferred_A() async { - await quick(); - if (false) { - return new A(); - } else { - return new B(); - } - } - - dynamic f_dynamic() async { - await quick(); - return new B(); - } - - Future f_A() async { - await quick(); - return new B(); - } - - Future f_immediateReturn_B() async { - return new B(); - } - - Future f_immediateReturn_FutureB() async { - return futureB(); - } - - Future f_expressionSyntax_B() async => new B(); - - Future f_expressionSyntax_FutureB() async => futureB(); - - // Not executed - void checkStaticTypes() { - // Check that f_inferred_futureObject's static return type is - // `Future`, by verifying that its return value can be assigned to - // `Future` but not `int`. - Future v1 = f_inferred_futureObject(); - int v2 = f_inferred_futureObject(); - // ^^^^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'Future' can't be assigned to a variable of type 'int'. - - // Check that f_inferred_A's static return type is `Future`, by verifying - // that its return value can be assigned to `Future` but not - // `Future`. - Future v3 = f_inferred_A(); - Future v4 = f_inferred_A(); - // ^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'Future' can't be assigned to a variable of type 'Future'. - } - - checkFutureObject(f_inferred_futureObject); - checkFutureA(f_inferred_A); - checkDynamic(f_dynamic); - checkFutureA(f_A); - checkFutureA(f_immediateReturn_B); - checkFutureA(f_immediateReturn_FutureB); - checkFutureA(f_expressionSyntax_B); - checkFutureA(f_expressionSyntax_FutureB); -} diff --git a/tests/language_2/async/congruence_method_runtime_test.dart b/tests/language_2/async/congruence_method_runtime_test.dart deleted file mode 100644 index 48ff41a5ff7..00000000000 --- a/tests/language_2/async/congruence_method_runtime_test.dart +++ /dev/null @@ -1,118 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -// This test verifies that for an async method, the following three -// types are all appropriately matched: -// - The static return type -// - The return type of reified runtime type of a tearoff of the function or -// method -// - The reified type of the future returned by the function or method -// -// Specific attention is paid to the following conditions: -// - The static return type is determined by type inference -// - The static return type is `dynamic` -// - The function or method immediately returns a value or future with a -// different type (possibly using `=>` syntax) - -import 'dart:async'; - -import 'package:expect/expect.dart'; - -class A {} - -class B extends A {} - -class B2 extends A {} - -Future quick() async {} - -Future futureB() => new Future.value(new B()); - -abstract class I { - dynamic f_inferred_dynamic(); - Future f_inferred_A(); -} - -class C implements I { - f_inferred_dynamic() async { - await quick(); - return new B(); - } - - f_inferred_A() async { - await quick(); - return new B(); - } - - dynamic f_dynamic() async { - await quick(); - return new B(); - } - - Future f_A() async { - await quick(); - return new B(); - } - - Future f_immediateReturn_B() async { - return new B(); - } - - Future f_immediateReturn_FutureB() async { - return futureB(); - } - - Future f_expressionSyntax_B() async => new B(); - - Future f_expressionSyntax_FutureB() async => futureB(); -} - -// Not executed -void checkStaticTypes(C c) { - // Check that f_inferred_dynamic's static return type is `dynamic`, by - // verifying that no error occurs if we try to call `foo` on its return value. - c.f_inferred_dynamic().foo(); - - // Check that f_inferred_A's static return type is `Future`, by verifying - // that its return value can be assigned to `Future` but not - // `Future`. - Future v1 = c.f_inferred_A(); - -} - -void checkDynamic(dynamic tearoff) { - Expect.isTrue(tearoff is dynamic Function()); - Expect.isFalse(tearoff is Future Function()); - dynamic f = tearoff(); - Expect.isTrue(f is Future); - Expect.isFalse(f is Future); -} - -void checkFutureA(dynamic tearoff) { - Expect.isTrue(tearoff is Future Function()); - Expect.isFalse(tearoff is Future Function()); - dynamic f = tearoff(); - Expect.isTrue(f is Future); - Expect.isFalse(f is Future); -} - -void test(C c) { - checkDynamic(c.f_inferred_dynamic); - checkFutureA(c.f_inferred_A); - checkDynamic(c.f_dynamic); - checkFutureA(c.f_A); - checkFutureA(c.f_immediateReturn_B); - checkFutureA(c.f_immediateReturn_FutureB); - checkFutureA(c.f_expressionSyntax_B); - checkFutureA(c.f_expressionSyntax_FutureB); -} - -main() { - test(new C()); -} diff --git a/tests/language_2/async/congruence_method_test.dart b/tests/language_2/async/congruence_method_test.dart deleted file mode 100644 index 689b1cee37e..00000000000 --- a/tests/language_2/async/congruence_method_test.dart +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) 2017, 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 - -// This test verifies that for an async method, the following three -// types are all appropriately matched: -// - The static return type -// - The return type of reified runtime type of a tearoff of the function or -// method -// - The reified type of the future returned by the function or method -// -// Specific attention is paid to the following conditions: -// - The static return type is determined by type inference -// - The static return type is `dynamic` -// - The function or method immediately returns a value or future with a -// different type (possibly using `=>` syntax) - -import 'dart:async'; - -import 'package:expect/expect.dart'; - -class A {} - -class B extends A {} - -class B2 extends A {} - -Future quick() async {} - -Future futureB() => new Future.value(new B()); - -abstract class I { - dynamic f_inferred_dynamic(); - Future f_inferred_A(); -} - -class C implements I { - f_inferred_dynamic() async { - await quick(); - return new B(); - } - - f_inferred_A() async { - await quick(); - return new B(); - } - - dynamic f_dynamic() async { - await quick(); - return new B(); - } - - Future f_A() async { - await quick(); - return new B(); - } - - Future f_immediateReturn_B() async { - return new B(); - } - - Future f_immediateReturn_FutureB() async { - return futureB(); - } - - Future f_expressionSyntax_B() async => new B(); - - Future f_expressionSyntax_FutureB() async => futureB(); -} - -// Not executed -void checkStaticTypes(C c) { - // Check that f_inferred_dynamic's static return type is `dynamic`, by - // verifying that no error occurs if we try to call `foo` on its return value. - c.f_inferred_dynamic().foo(); - - // Check that f_inferred_A's static return type is `Future`, by verifying - // that its return value can be assigned to `Future` but not - // `Future`. - Future v1 = c.f_inferred_A(); - Future v2 = c.f_inferred_A(); - // ^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'Future' can't be assigned to a variable of type 'Future'. -} - -void checkDynamic(dynamic tearoff) { - Expect.isTrue(tearoff is dynamic Function()); - Expect.isFalse(tearoff is Future Function()); - dynamic f = tearoff(); - Expect.isTrue(f is Future); - Expect.isFalse(f is Future); -} - -void checkFutureA(dynamic tearoff) { - Expect.isTrue(tearoff is Future Function()); - Expect.isFalse(tearoff is Future Function()); - dynamic f = tearoff(); - Expect.isTrue(f is Future); - Expect.isFalse(f is Future); -} - -void test(C c) { - checkDynamic(c.f_inferred_dynamic); - checkFutureA(c.f_inferred_A); - checkDynamic(c.f_dynamic); - checkFutureA(c.f_A); - checkFutureA(c.f_immediateReturn_B); - checkFutureA(c.f_immediateReturn_FutureB); - checkFutureA(c.f_expressionSyntax_B); - checkFutureA(c.f_expressionSyntax_FutureB); -} - -main() { - test(new C()); -} diff --git a/tests/language_2/async/congruence_top_level_test.dart b/tests/language_2/async/congruence_top_level_test.dart deleted file mode 100644 index 85a44a6e648..00000000000 --- a/tests/language_2/async/congruence_top_level_test.dart +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2017, 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 - -// This test verifies that for a top level async function, the following three -// types are all appropriately matched: -// - The static return type -// - The return type of reified runtime type of a tearoff of the function or -// method -// - The reified type of the future returned by the function or method -// -// Specific attention is paid to the following conditions: -// - The static return type is determined by type inference -// - The static return type is `dynamic` -// - The function or method immediately returns a value or future with a -// different type (possibly using `=>` syntax) - -import 'dart:async'; - -import 'package:expect/expect.dart'; - -class A {} - -class B extends A {} - -Future quick() async {} - -Future futureB() => new Future.value(new B()); - -f_inferred() async { - await quick(); - return new B(); -} - -dynamic f_dynamic() async { - await quick(); - return new B(); -} - -Future f_A() async { - await quick(); - return new B(); -} - -Future f_immediateReturn_B() async { - return new B(); -} - -Future f_immediateReturn_FutureB() async { - return futureB(); -} - -Future f_expressionSyntax_B() async => new B(); - -Future f_expressionSyntax_FutureB() async => futureB(); - -// Not executed -void checkStaticTypes() { - // Check that f_inferred's static return type is `dynamic`, by verifying that - // no error occurs if we try to call `foo` on its return value. - f_inferred().foo(); -} - -void checkDynamic(dynamic tearoff) { - Expect.isTrue(tearoff is dynamic Function()); - Expect.isFalse(tearoff is Future Function()); - dynamic f = tearoff(); - Expect.isTrue(f is Future); - Expect.isFalse(f is Future); -} - -void checkFutureA(dynamic tearoff) { - Expect.isTrue(tearoff is Future Function()); - Expect.isFalse(tearoff is Future Function()); - dynamic f = tearoff(); - Expect.isTrue(f is Future); - Expect.isFalse(f is Future); -} - -main() { - checkDynamic(f_inferred); - checkDynamic(f_dynamic); - checkFutureA(f_A); - checkFutureA(f_immediateReturn_B); - checkFutureA(f_immediateReturn_FutureB); - checkFutureA(f_expressionSyntax_B); - checkFutureA(f_expressionSyntax_FutureB); -} diff --git a/tests/language_2/async/congruence_unnamed_runtime_test.dart b/tests/language_2/async/congruence_unnamed_runtime_test.dart deleted file mode 100644 index 5ba4c18a875..00000000000 --- a/tests/language_2/async/congruence_unnamed_runtime_test.dart +++ /dev/null @@ -1,145 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -// This test verifies that for an unnamed async closure, the following three -// types are all appropriately matched: -// - The static return type -// - The return type of reified runtime type of a tearoff of the function or -// method -// - The reified type of the future returned by the function or method -// -// Specific attention is paid to the following conditions: -// - The static return type is determined by type inference -// - The static return type is `dynamic` -// - The function or method immediately returns a value or future with a -// different type (possibly using `=>` syntax) - -import 'dart:async'; - -import 'package:expect/expect.dart'; - -class A {} - -class B extends A {} - -class B2 extends A {} - -Future quick() async {} - -Future futureA() => new Future.value(new A()); - -Future futureB() => new Future.value(new B()); - -void checkFutureObject(dynamic tearoff) { - Expect.isTrue(tearoff is Future Function()); - Expect.isFalse(tearoff is Future Function()); - dynamic f = tearoff(); - Expect.isTrue(f is Future); - Expect.isFalse(f is Future); -} - -void checkFutureDynamic(dynamic tearoff) { - Expect.isTrue(tearoff is Future Function()); - Expect.isFalse(tearoff is Future Function()); - dynamic f = tearoff(); - Expect.isTrue(f is Future); - Expect.isFalse(f is Future); -} - -void checkFutureA(dynamic tearoff) { - Expect.isTrue(tearoff is Future Function()); - Expect.isFalse(tearoff is Future Function()); - dynamic f = tearoff(); - Expect.isTrue(f is Future); - Expect.isFalse(f is Future); -} - -main() { - var f_inferred_futureObject = () async { - await quick(); - if (false) { - return 0; - } else { - return new A(); - } - }; - - var f_inferred_A = () async { - await quick(); - if (false) { - return new A(); - } else { - return new B(); - } - }; - - Future Function() f_futureDynamic = () async { - await quick(); - if (false) { - return 0; - } else { - return new B(); - } - }; - - Future Function() f_A = () async { - await quick(); - if (false) { - return new A(); - } else { - return new B(); - } - }; - - Future Function() f_immediateReturn_B = () async { - if (false) { - return new A(); - } else { - return new B(); - } - }; - - Future Function() f_immediateReturn_FutureB = () async { - if (false) { - return new A(); - } else { - return futureB(); - } - }; - - Future Function() f_expressionSyntax_B = - () async => false ? new A() : new B(); - - Future Function() f_expressionSyntax_FutureB = - () async => false ? futureA() : futureB(); - - // Not executed - void checkStaticTypes() { - // Check that f_inferred_futureObject's static return type is - // `Future`, by verifying that its return value can be assigned to - // `Future` but not `int`. - Future v1 = f_inferred_futureObject(); - - - // Check that f_inferred_A's static return type is `Future`, by verifying - // that its return value can be assigned to `Future` but not - // `Future`. - Future v3 = f_inferred_A(); - - } - - checkFutureObject(f_inferred_futureObject); - checkFutureA(f_inferred_A); - checkFutureDynamic(f_futureDynamic); - checkFutureA(f_A); - checkFutureA(f_immediateReturn_B); - checkFutureA(f_immediateReturn_FutureB); - checkFutureA(f_expressionSyntax_B); - checkFutureA(f_expressionSyntax_FutureB); -} diff --git a/tests/language_2/async/congruence_unnamed_test.dart b/tests/language_2/async/congruence_unnamed_test.dart deleted file mode 100644 index 4c069d9c4a7..00000000000 --- a/tests/language_2/async/congruence_unnamed_test.dart +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) 2017, 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 - -// This test verifies that for an unnamed async closure, the following three -// types are all appropriately matched: -// - The static return type -// - The return type of reified runtime type of a tearoff of the function or -// method -// - The reified type of the future returned by the function or method -// -// Specific attention is paid to the following conditions: -// - The static return type is determined by type inference -// - The static return type is `dynamic` -// - The function or method immediately returns a value or future with a -// different type (possibly using `=>` syntax) - -import 'dart:async'; - -import 'package:expect/expect.dart'; - -class A {} - -class B extends A {} - -class B2 extends A {} - -Future quick() async {} - -Future futureA() => new Future.value(new A()); - -Future futureB() => new Future.value(new B()); - -void checkFutureObject(dynamic tearoff) { - Expect.isTrue(tearoff is Future Function()); - Expect.isFalse(tearoff is Future Function()); - dynamic f = tearoff(); - Expect.isTrue(f is Future); - Expect.isFalse(f is Future); -} - -void checkFutureDynamic(dynamic tearoff) { - Expect.isTrue(tearoff is Future Function()); - Expect.isFalse(tearoff is Future Function()); - dynamic f = tearoff(); - Expect.isTrue(f is Future); - Expect.isFalse(f is Future); -} - -void checkFutureA(dynamic tearoff) { - Expect.isTrue(tearoff is Future Function()); - Expect.isFalse(tearoff is Future Function()); - dynamic f = tearoff(); - Expect.isTrue(f is Future); - Expect.isFalse(f is Future); -} - -main() { - var f_inferred_futureObject = () async { - await quick(); - if (false) { - return 0; - } else { - return new A(); - } - }; - - var f_inferred_A = () async { - await quick(); - if (false) { - return new A(); - } else { - return new B(); - } - }; - - Future Function() f_futureDynamic = () async { - await quick(); - if (false) { - return 0; - } else { - return new B(); - } - }; - - Future Function() f_A = () async { - await quick(); - if (false) { - return new A(); - } else { - return new B(); - } - }; - - Future Function() f_immediateReturn_B = () async { - if (false) { - return new A(); - } else { - return new B(); - } - }; - - Future Function() f_immediateReturn_FutureB = () async { - if (false) { - return new A(); - } else { - return futureB(); - } - }; - - Future Function() f_expressionSyntax_B = - () async => false ? new A() : new B(); - - Future Function() f_expressionSyntax_FutureB = - () async => false ? futureA() : futureB(); - - // Not executed - void checkStaticTypes() { - // Check that f_inferred_futureObject's static return type is - // `Future`, by verifying that its return value can be assigned to - // `Future` but not `int`. - Future v1 = f_inferred_futureObject(); - int v2 = f_inferred_futureObject(); - // ^^^^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'Future' can't be assigned to a variable of type 'int'. - - // Check that f_inferred_A's static return type is `Future`, by verifying - // that its return value can be assigned to `Future` but not - // `Future`. - Future v3 = f_inferred_A(); - Future v4 = f_inferred_A(); - // ^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'Future' can't be assigned to a variable of type 'Future'. - } - - checkFutureObject(f_inferred_futureObject); - checkFutureA(f_inferred_A); - checkFutureDynamic(f_futureDynamic); - checkFutureA(f_A); - checkFutureA(f_immediateReturn_B); - checkFutureA(f_immediateReturn_FutureB); - checkFutureA(f_expressionSyntax_B); - checkFutureA(f_expressionSyntax_FutureB); -} diff --git a/tests/language_2/async/continue_label_test.dart b/tests/language_2/async/continue_label_test.dart deleted file mode 100644 index 9df59e15d66..00000000000 --- a/tests/language_2/async/continue_label_test.dart +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -// Two loop variables -test1() async { - var r = 0; - label: - for (var i = 1, - j = - await //# await_in_init: ok - 10; - i < 10 && - j > - await //# await_in_condition: ok - -5; - j--, - i += - await //# await_in_update: ok - 1) { - if (i < - await //# await_in_body: ok - 5 || - j < -5) { - continue label; - } - r++; - } - Expect.equals(5, r); -} - -// One loop variable -test2() async { - var r = 0; - label: - for (var i = - await //# await_in_init: ok - 0; - i < - await //# await_in_condition: ok - 10; - i += - await //# await_in_update: ok - 1) { - if (i < - await //# await_in_body: ok - 5) { - continue label; - } - r++; - } - Expect.equals(5, r); -} - -// Variable not declared in initializer; -test3() async { - var r = 0, i, j; - label: - for (i = - await //# await_in_init: ok - 0; - i < - await //# await_in_condition: ok - 10; - i += - await //# await_in_update: ok - 1) { - if (i < - await //# await_in_body: ok - 5) { - continue label; - } - r++; - } - Expect.equals(5, r); -} - -// Nested loop -test4() async { - var r = 0; - label: - for (var i = - await //# await_in_init: ok - 0; - i < - await //# await_in_condition: ok - 10; - i += - await //# await_in_update: ok - 1) { - if (i < - await //# await_in_body: ok - 5) { - for (int i = 0; i < 10; i++) { - continue label; - } - } - r++; - } - Expect.equals(5, r); -} - -test() async { - await test1(); - await test2(); - await test3(); - await test4(); -} - -main() { - asyncStart(); - test().then((_) => asyncEnd()); -} diff --git a/tests/language_2/async/control_structures_test.dart b/tests/language_2/async/control_structures_test.dart deleted file mode 100644 index 787197c3446..00000000000 --- a/tests/language_2/async/control_structures_test.dart +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2014, 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 - -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -import 'package:expect/expect.dart'; - -import 'dart:async'; - -expectThenValue(future, value) { - Expect.isTrue(future is Future); - future.then((result) { - Expect.equals(value, result); - }); -} - -asyncIf(condition) async { - if (condition) { - return 1; - } else { - return 2; - } - // This return is never reached as the finally block returns from the - // function. - return 3; -} - -asyncFor(condition) async { - for (int i = 0; i < 10; i++) { - if (i == 5 && condition) { - return 1; - } - } - return 2; -} - -asyncTryCatchFinally(overrideInFinally, doThrow) async { - try { - if (doThrow) throw 444; - return 1; - } catch (e) { - return e; - } finally { - if (overrideInFinally) return 3; - } -} - -asyncTryCatchLoop() async { - var i = 0; - var throws = 13; - while (true) { - try { - throw throws; - } catch (e) { - if (i == throws) { - return e; - } - } finally { - i++; - } - } -} - -asyncImplicitReturn() async { - try {} catch (e) {} finally {} -} - -main() { - var asyncReturn; - - for (int i = 0; i < 10; i++) { - asyncReturn = asyncIf(true); - expectThenValue(asyncReturn, 1); - asyncReturn = asyncIf(false); - expectThenValue(asyncReturn, 2); - - asyncReturn = asyncFor(true); - expectThenValue(asyncReturn, 1); - asyncReturn = asyncFor(false); - expectThenValue(asyncReturn, 2); - - asyncReturn = asyncTryCatchFinally(true, false); - expectThenValue(asyncReturn, 3); - asyncReturn = asyncTryCatchFinally(false, false); - expectThenValue(asyncReturn, 1); - asyncReturn = asyncTryCatchFinally(true, true); - expectThenValue(asyncReturn, 3); - asyncReturn = asyncTryCatchFinally(false, true); - expectThenValue(asyncReturn, 444); - asyncReturn = asyncTryCatchLoop(); - expectThenValue(asyncReturn, 13); - - asyncReturn = asyncImplicitReturn(); - expectThenValue(asyncReturn, null); - } -} diff --git a/tests/language_2/async/covariant_type_test.dart b/tests/language_2/async/covariant_type_test.dart deleted file mode 100644 index cb050f79b72..00000000000 --- a/tests/language_2/async/covariant_type_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test that TypeErrors happen for async methods without using returned Future. - -import 'dart:async'; -import 'package:expect/expect.dart'; - -class D { - // Parametric covariance check is usually compiled into method. - Future add(T n) async { - return n; - } -} - -main() async { - D d = new D(); - Expect.throwsTypeError(() => d.add(4.6)); -} diff --git a/tests/language_2/async/dcall_type_test.dart b/tests/language_2/async/dcall_type_test.dart deleted file mode 100644 index 96d7a2e9a0f..00000000000 --- a/tests/language_2/async/dcall_type_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test that TypeErrors happen for async methods without using returned Future. - -import 'dart:async'; -import 'package:expect/expect.dart'; - -Future iota(int n) async { - await null; - return n; -} - -class C { - Future add(int n) async { - await null; - return n; - } -} - -main() async { - dynamic f = iota; - Expect.throwsTypeError(() => f('ten')); - Expect.throwsTypeError(() => f(4.7)); - - dynamic o = new C(); - Expect.throwsTypeError(() => o.add('ten')); - Expect.throwsTypeError(() => o.add(4.7)); -} diff --git a/tests/language_2/async/error_timing_test.dart b/tests/language_2/async/error_timing_test.dart deleted file mode 100644 index dd4251c4e0b..00000000000 --- a/tests/language_2/async/error_timing_test.dart +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright (c) 2017, 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 - -import 'dart:async'; -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; - -class AsyncTracker { - int runningAsyncs = 0; - List expectedEvents; - final List actualEvents = []; - - AsyncTracker() { - asyncStart(); - } - - void start(String event) { - actualEvents.add("start $event"); - runningAsyncs++; - } - - void stop(String event) { - actualEvents.add("stop $event"); - if (--runningAsyncs == 0) { - Expect.listEquals(expectedEvents, actualEvents); - asyncEnd(); - } - } - - void add(e) { - actualEvents.add(e); - } -} - -void test1() { - var tracker = new AsyncTracker(); - - Future foo() async { - tracker.add("error-foo"); - throw "foo"; - } - - tracker.start("micro1"); - scheduleMicrotask(() { - tracker.start("micro2"); - scheduleMicrotask(() { - tracker.stop("micro2"); - }); - tracker.stop("micro1"); - }); - - tracker.start("foo"); - foo().catchError((e) { - tracker.stop("foo"); - }); - tracker.start("micro3"); - scheduleMicrotask(() { - tracker.stop("micro3"); - }); - - tracker.expectedEvents = [ - "start micro1", - "start foo", - "error-foo", - "start micro3", - "start micro2", - "stop micro1", - "stop foo", - "stop micro3", - "stop micro2", - ]; -} - -void test2() { - var tracker = new AsyncTracker(); - - Future bar() async { - tracker.add("await null"); - await null; - tracker.add("error-bar"); - throw "bar"; - } - - tracker.start("micro1"); - scheduleMicrotask(() { - tracker.start("micro2"); - scheduleMicrotask(() { - tracker.start("micro3"); - scheduleMicrotask(() { - tracker.stop("micro3"); - }); - tracker.stop("micro2"); - }); - tracker.stop("micro1"); - }); - - tracker.start("bar"); - bar().catchError((e) { - tracker.stop("bar"); - }); - tracker.start("micro4"); - scheduleMicrotask(() { - tracker.start("micro5"); - scheduleMicrotask(() { - tracker.stop("micro5"); - }); - tracker.stop("micro4"); - }); - - tracker.expectedEvents = [ - "start micro1", - "start bar", - "await null", - "start micro4", - "start micro2", - "stop micro1", - "error-bar", - "stop bar", - "start micro5", - "stop micro4", - "start micro3", - "stop micro2", - "stop micro5", - "stop micro3", - ]; -} - -void test3() { - var tracker = new AsyncTracker(); - - Future gee() async { - tracker.add("error-gee"); - return new Future.error("gee"); - } - - tracker.start("micro1"); - scheduleMicrotask(() { - tracker.start("micro2"); - scheduleMicrotask(() { - tracker.stop("micro2"); - }); - tracker.stop("micro1"); - }); - - tracker.start("gee"); - gee().catchError((e) { - tracker.stop("gee"); - }); - tracker.start("micro3"); - scheduleMicrotask(() { - tracker.stop("micro3"); - }); - - tracker.expectedEvents = [ - "start micro1", - "start gee", - "error-gee", - "start micro3", - "start micro2", - "stop micro1", - "stop gee", - "stop micro3", - "stop micro2", - ]; -} - -void test4() { - var tracker = new AsyncTracker(); - - Future toto() async { - tracker.add("await null"); - await null; - tracker.add("error-toto"); - return new Future.error("toto"); - } - - tracker.start("micro1"); - scheduleMicrotask(() { - tracker.start("micro2"); - scheduleMicrotask(() { - tracker.start("micro3"); - scheduleMicrotask(() { - tracker.stop("micro3"); - }); - tracker.stop("micro2"); - }); - tracker.stop("micro1"); - }); - - tracker.start("toto"); - toto().catchError((e) { - tracker.stop("toto"); - }); - tracker.start("micro4"); - scheduleMicrotask(() { - tracker.start("micro5"); - scheduleMicrotask(() { - tracker.stop("micro5"); - }); - tracker.stop("micro4"); - }); - - tracker.expectedEvents = [ - "start micro1", - "start toto", - "await null", - "start micro4", - "start micro2", - "stop micro1", - "error-toto", - "start micro5", - "stop micro4", - "start micro3", - "stop micro2", - "stop toto", - "stop micro5", - "stop micro3", - ]; -} - -void test5() { - var tracker = new AsyncTracker(); - - Future foo() async { - tracker.add("throw"); - throw "foo"; - } - - bar() async { - tracker.start('micro'); - scheduleMicrotask(() { - tracker.stop('micro'); - }); - try { - tracker.start('foo'); - await foo(); - } catch (e) { - tracker.stop('foo'); - } - tracker.stop("bar"); - } - - tracker.start('bar'); - - tracker.expectedEvents = [ - "start bar", - "start micro", - "start foo", - "throw", - "stop micro", - "stop foo", - "stop bar", - ]; -} - -main() { - asyncStart(); - test1(); - test2(); - test3(); - test4(); - asyncEnd(); -} diff --git a/tests/language_2/async/finally_rethrow_test.dart b/tests/language_2/async/finally_rethrow_test.dart deleted file mode 100644 index 5cdb7df896f..00000000000 --- a/tests/language_2/async/finally_rethrow_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:async"; -import "package:expect/expect.dart"; - -foo() async { - try { - await 1; - throw "error"; - } on String catch (e) { - await 2; - throw e; - } finally { - await 3; - } -} - -main() async { - var error = "no error"; - try { - await foo(); - } catch (e) { - error = e; - } - Expect.equals("error", error); -} diff --git a/tests/language_2/async/helper_lib.dart b/tests/language_2/async/helper_lib.dart deleted file mode 100644 index 51e6a216fa2..00000000000 --- a/tests/language_2/async/helper_lib.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2014, 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 async; - -class async {} diff --git a/tests/language_2/async/identifier_test.dart b/tests/language_2/async/identifier_test.dart deleted file mode 100644 index c253ae70e2b..00000000000 --- a/tests/language_2/async/identifier_test.dart +++ /dev/null @@ -1,216 +0,0 @@ -// 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. - -// @dart = 2.9 - -// VMOptions= -// VMOptions=--dwarf_stack_traces --no-retain_function_objects --no-retain_code_objects - -import 'dart:async' as async; -import 'lib.dart' as l; // Minimal library containing "int async;". - -// Adapted from Analyzer test testing where `async` was not previously allowed. - -// Helpers -void ignore(argument) {} - -class GNamed { - void g({Object async = null}) {} -} - -class AGet { - int get async => 1; - set async(int i) {} -} - -class ACall { - int async() => 1; -} - -main() { - // Each test declares a separate async function, tests that `async` - // can occur in it, and makes sure the function is run. - { - const int async = 0; - f() async { - g(@async x) {} - g(0); - } - - f(); - } - { - f(c) async { - c.g(async: 0); - } - - f(GNamed()); - } - { - f() async { - var async = 1; - ignore(async); - } - - f(); - } - { - f() async* { - var async = 1; - ignore(async); - } - - f().forEach(ignore); - } - { - f() async { - async: - while (true) { - break async; - } - } - - f(); - } - { - g() {} - f() async { - try { - g(); - } catch (async) {} - } - - f(); - } - { - g() {} - f() async { - try { - g(); - } catch (e, async) {} - } - - f(); - } - { - f() async { - async: - while (true) { - if (false) continue async; - break; - } - } - - f(); - } - { - var async; - f() async { - for (async in []) {} - } - - f(); - } - { - f() async { - g(int async) {} - g(0); - } - - f(); - } - { - f() async { - return new AGet().async; - } - - f(); - } - { - f() async { - return new ACall().async(); - } - - f(); - } - { - f() async { - return new ACall()..async(); - } - - f(); - } - { - g() {} - f() async { - async: - g(); - } - - f(); - } - { - f() async { - int async() => null; - async(); - } - - f(); - } - { - f() async { - return async.Future.value(0); - } - - f(); - } - { - f() async { - new AGet().async = 1; - } - - f(); - } - { - f() async { - return new AGet()..async = 1; - } - - f(); - } - { - int async = 1; - f() async { - return "$async"; - } - - f(); - } - { - f() async { - return l.async; - } - - f(); - } - { - f() async { - switch (0) { - async: - case 0: - break; - } - } - - f(); - } - { - f() sync* { - var async = 1; - ignore(async); - } - - f(); - } -} diff --git a/tests/language_2/async/lib.dart b/tests/language_2/async/lib.dart deleted file mode 100644 index ce829a95752..00000000000 --- a/tests/language_2/async/lib.dart +++ /dev/null @@ -1,9 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Helper library for async_identifier_test.dart - -int async; diff --git a/tests/language_2/async/or_generator_return_type_stacktrace_runtime_test.dart b/tests/language_2/async/or_generator_return_type_stacktrace_runtime_test.dart deleted file mode 100644 index 8adb77ea535..00000000000 --- a/tests/language_2/async/or_generator_return_type_stacktrace_runtime_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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 "package:expect/expect.dart"; - - - - - -void main() {} diff --git a/tests/language_2/async/or_generator_return_type_stacktrace_test.dart b/tests/language_2/async/or_generator_return_type_stacktrace_test.dart deleted file mode 100644 index 414686c4bab..00000000000 --- a/tests/language_2/async/or_generator_return_type_stacktrace_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -int badReturnTypeAsync() async {} -// [error line 9, column 1, length 3] -// [analyzer] COMPILE_TIME_ERROR.ILLEGAL_ASYNC_RETURN_TYPE -// ^ -// [cfe] Functions marked 'async' must have a return type assignable to 'Future'. -int badReturnTypeAsyncStar() async* {} -// [error line 14, column 1, length 3] -// [analyzer] COMPILE_TIME_ERROR.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE -// ^ -// [cfe] Functions marked 'async*' must have a return type assignable to 'Stream'. -int badReturnTypeSyncStar() sync* {} -// [error line 19, column 1, length 3] -// [analyzer] COMPILE_TIME_ERROR.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE -// ^ -// [cfe] Functions marked 'sync*' must have a return type assignable to 'Iterable'. - -void main() {} diff --git a/tests/language_2/async/regression_23058_test.dart b/tests/language_2/async/regression_23058_test.dart deleted file mode 100644 index 7947806fb95..00000000000 --- a/tests/language_2/async/regression_23058_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2015, 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 - -// Regression test for issue 23058. - -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -class A { - var x = new B(); - - foo() async { - return x.foo == 2 ? 42 : x.foo; - } -} - -class B { - var x = 0; - - get foo { - if (x == -1) { - return 0; - } else { - return x++; - } - } -} - -main() { - asyncStart(); - new A().foo().then((result) { - Expect.equals(1, result); - asyncEnd(); - }); -} diff --git a/tests/language_2/async/rethrow_test.dart b/tests/language_2/async/rethrow_test.dart deleted file mode 100644 index be87dfd1148..00000000000 --- a/tests/language_2/async/rethrow_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:async"; -import "package:expect/expect.dart"; - -const String exceptionString = "exceptionalString"; - -throwString() async { - try { - throw exceptionString; - } catch (e) { - await 1; - throw e; - } -} - -rethrowString() async { - try { - throw exceptionString; - } catch (e) { - await 1; - rethrow; - } -} - -testThrow() { - Future f = throwString(); - f.then((v) { - Expect.fail("Exception not thrown"); - }, onError: (e) { - Expect.equals(exceptionString, e); - }); -} - -testRethrow() { - Future f = rethrowString(); - f.then((v) { - Expect.fail("Exception not thrown"); - }, onError: (e) { - Expect.equals(exceptionString, e); - }); -} - -main() { - testThrow(); - testRethrow(); -} diff --git a/tests/language_2/async/return_throw_test.dart b/tests/language_2/async/return_throw_test.dart deleted file mode 100644 index d24c4c5fe8e..00000000000 --- a/tests/language_2/async/return_throw_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -Future f() async { - throw 'f'; -} - -Future g() async { - try { - // Should obtain the `Future`, await it, then throw. - return f(); - } catch (e) { - // Having caught the exception, we return a value. - return 'g'; - } -} - -void main() async { - Expect.equals('g', await g()); -} diff --git a/tests/language_2/async/return_types_runtime_test.dart b/tests/language_2/async/return_types_runtime_test.dart deleted file mode 100644 index 34f4142f560..00000000000 --- a/tests/language_2/async/return_types_runtime_test.dart +++ /dev/null @@ -1,77 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -Future foo1() async { - return 3; -} - -Future foo2() async { - return 3; -} - - -foo3() async { - return "String"; -} - - -foo4() async { - return "String"; -} - - -foo5() async { - return 3; -} - -Future foo6() async { - // This is fine, the future is flattened - return new Future.value(3); -} - - -foo7() async { - return new Future.value(3); -} - -Iterable foo8() sync* { - yield 1; - // Can only have valueless return in sync* functions. - return - - ; -} - -Stream foo9() async* { - yield 1; - // Can only have valueless return in async* functions. - return - - ; -} - -test() async { - Expect.equals(3, await foo1()); - Expect.equals(3, await foo2()); - Expect.equals("String", await foo3()); - Expect.equals("String", await foo4()); - Expect.equals(3, await foo5()); - Expect.equals(3, await await foo6()); - Expect.equals(3, await await foo7()); - Expect.listEquals([1], foo8().toList()); - Expect.listEquals([1], await foo9().toList()); -} - -main() { - asyncTest(test); -} diff --git a/tests/language_2/async/return_types_test.dart b/tests/language_2/async/return_types_test.dart deleted file mode 100644 index 0e977829502..00000000000 --- a/tests/language_2/async/return_types_test.dart +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -Future foo1() async { - return 3; -} - -Future foo2() async { - return 3; -} - -Future -foo3() async { - return "String"; - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'Future' can't be assigned to a variable of type 'FutureOr'. -} - -Future -// [error line 27, column 1, length 19] -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS -// [cfe] Expected 1 type arguments. -foo4() async { - return "String"; -} - -int -// [error line 35, column 1, length 3] -// [analyzer] COMPILE_TIME_ERROR.ILLEGAL_ASYNC_RETURN_TYPE -foo5() async { -// [error line 38, column 1] -// [cfe] Functions marked 'async' must have a return type assignable to 'Future'. - return 3; -} - -Future foo6() async { - // This is fine, the future is flattened - return new Future.value(3); -} - -Future> -foo7() async { - return new Future.value(3); - // ^^^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE -} - -Iterable foo8() sync* { - yield 1; - // Can only have valueless return in sync* functions. - return 8; -//^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.RETURN_IN_GENERATOR -//^^^^^^^^^ -// [cfe] 'sync*' and 'async*' can't return a value. -} - -Stream foo9() async* { - yield 1; - // Can only have valueless return in async* functions. - return 8; -//^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.RETURN_IN_GENERATOR -//^^^^^^^^^ -// [cfe] 'sync*' and 'async*' can't return a value. -} - -test() async { - Expect.equals(3, await foo1()); - Expect.equals(3, await foo2()); - Expect.equals("String", await foo3()); - Expect.equals("String", await foo4()); - Expect.equals(3, await foo5()); - Expect.equals(3, await await foo6()); - Expect.equals(3, await await foo7()); - Expect.listEquals([1], foo8().toList()); - Expect.listEquals([1], await foo9().toList()); -} - -main() { - asyncTest(test); -} diff --git a/tests/language_2/async/switch_test.dart b/tests/language_2/async/switch_test.dart deleted file mode 100644 index 7d8754aaacc..00000000000 --- a/tests/language_2/async/switch_test.dart +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -foo1(a) async { - int k = 0; - switch (a) { - case 1: - await 3; - k += 1; - break; - case 2: - k += a; - return k + 2; - default: k = 2; //# withDefault: ok - } - return k; -} - -foo2(a) async { - int k = 0; - switch (await a) { - case 1: - await 3; - k += 1; - break; - case 2: - k += await a; - return k + 2; - default: k = 2; //# withDefault: ok - } - return k; -} - -foo3(a) async { - int k = 0; - switch (a) { - case 1: - k += 1; - break; - case 2: - k += a; - return k + 2; - default: k = 2; //# withDefault: ok - } - return k; -} - -foo4(value) async { - int k = 0; - switch (await value) { - case 1: - k += 1; - break; - case 2: - k += 2; - return 2 + k; - default: k = 2; //# withDefault: ok - } - return k; -} - -futureOf(a) async => await a; - -test() async { - Expect.equals(1, await foo1(1)); - Expect.equals(4, await foo1(2)); - Expect.equals(2, await foo1(3)); //# withDefault: ok - Expect.equals(0, await foo1(3)); //# none: ok - Expect.equals(1, await foo2(futureOf(1))); - Expect.equals(4, await foo2(futureOf(2))); - Expect.equals(2, await foo2(futureOf(3))); //# withDefault: ok - Expect.equals(0, await foo2(futureOf(3))); //# none: ok - Expect.equals(1, await foo3(1)); - Expect.equals(4, await foo3(2)); - Expect.equals(2, await foo3(3)); //# withDefault: ok - Expect.equals(0, await foo3(3)); //# none: ok - Expect.equals(1, await foo4(futureOf(1))); - Expect.equals(4, await foo4(futureOf(2))); - Expect.equals(2, await foo4(futureOf(3))); //# withDefault: ok - Expect.equals(0, await foo4(futureOf(3))); //# none: ok -} - -void main() { - asyncStart(); - test().then((_) => asyncEnd()); -} diff --git a/tests/language_2/async/this_bound_test.dart b/tests/language_2/async/this_bound_test.dart deleted file mode 100644 index f5d724e6b3d..00000000000 --- a/tests/language_2/async/this_bound_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -class A { - int a = -1; - - @pragma('dart2js:noInline') - foo(ignored, val) { - Expect.equals(val, this.a); - } -} - -testA() async { - var a = new A(); - a.foo(await false, -1); - a.a = 0; - a.foo(await false, 0); -} - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(x) => x; - -class B { - var f; - var b = 10; - - B(this.f); - - bar(x) => b; -} - -foo(x) => 499; -bar(x) => 42; - -change(x) { - x.f = (x) => 99; -} - -testB() async { - var b = confuse(new B(foo)); - Expect.equals(99, b.f(await change(b))); - var b2 = confuse(new B(bar)); - Expect.equals(10, b2.f(await (b2.f = b2.bar))); -} - -test() async { - await testA(); - await testB(); -} - -void main() { - asyncStart(); - test().then((_) => asyncEnd()); -} diff --git a/tests/language_2/async/throw_in_catch_test.dart b/tests/language_2/async/throw_in_catch_test.dart deleted file mode 100644 index f2489821ce1..00000000000 --- a/tests/language_2/async/throw_in_catch_test.dart +++ /dev/null @@ -1,473 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -class Tracer { - final String expected; - final String name; - int counter = 0; - - Tracer(this.expected, [this.name]); - - void trace(msg) { - Expect.equals(expected[counter], msg); - counter++; - } - - void done() { - Expect.equals(expected.length, counter, "Received too few traces"); - } -} - -foo1(Tracer tracer) async { - try { - tracer.trace("a"); - // This await forces dart2js to rewrite the try into a state machine - // instead of relying on the existing structure. - await new Future.value(3); //# forceAwait: ok - tracer.trace("b"); - throw "Error"; - } catch (error) { - tracer.trace("c"); - Expect.equals("Error", error); - throw "Error2"; - tracer.trace("d"); - } finally { - tracer.trace("e"); - } - tracer.trace("f"); -} - -foo2(Tracer tracer) async { - try { - tracer.trace("a"); - await new Future.value(3); //# forceAwait: continued - tracer.trace("b"); - throw "Error"; - tracer.trace("c"); - } catch (error) { - tracer.trace("d"); - Expect.equals("Error", error); - await new Future.error("Error2"); - } finally { - tracer.trace("e"); - } - tracer.trace("f"); -} - -foo3(Tracer tracer) async { - try { - tracer.trace("a"); - await new Future.value(3); //# forceAwait: continued - tracer.trace("b"); - throw "Error"; - tracer.trace("c"); - } catch (error) { - Expect.equals("Error", error); - tracer.trace("d"); - return; - } finally { - tracer.trace("e"); - } - tracer.trace("f"); -} - -foo4(Tracer tracer) async { - try { - try { - await new Future.value(3); //# forceAwait: continued - tracer.trace("a"); - throw "Error"; - } catch (error) { - tracer.trace("b"); - Expect.equals("Error", error); - throw "Error2"; - } - } catch (error) { - Expect.equals("Error2", error); - tracer.trace("c"); - } - tracer.trace("d"); -} - -foo5(Tracer tracer) async { - try { - tracer.trace("a"); - try { - await new Future.value(3); //# forceAwait: continued - tracer.trace("b"); - throw "Error"; - } catch (error) { - tracer.trace("c"); - Expect.equals("Error", error); - throw "Error2"; - } - } finally { - tracer.trace("d"); - } - tracer.trace("e"); -} - -foo6(Tracer tracer) async { - try { - try { - await new Future.value(3); //# forceAwait: continued - tracer.trace("a"); - throw "Error"; - } catch (error) { - tracer.trace("b"); - Expect.equals("Error", error); - throw "Error2"; - } finally { - tracer.trace("c"); - throw "Error3"; - } - } catch (error) { - tracer.trace("d"); - Expect.equals("Error3", error); - } - tracer.trace("e"); -} - -foo7(Tracer tracer) async { - try { - try { - await new Future.value(3); //# forceAwait: continued - tracer.trace("a"); - throw "Error"; - } catch (error) { - Expect.equals("Error", error); - tracer.trace("b"); - throw "Error2"; - } finally { - tracer.trace("c"); - throw "Error3"; - } - } finally { - tracer.trace("d"); - } - tracer.trace("e"); -} - -foo8(Tracer tracer) async { - try { - try { - await new Future.value(3); //# forceAwait: continued - tracer.trace("a"); - throw "Error"; - } catch (error) { - Expect.equals("Error", error); - tracer.trace("b"); - return; - } finally { - tracer.trace("c"); - throw "Error3"; - } - } finally { - tracer.trace("d"); - } - tracer.trace("e"); -} - -foo9(Tracer tracer) async { - try { - while (true) { - try { - await new Future.value(3); //# forceAwait: continued - tracer.trace("a"); - throw "Error"; - } catch (error) { - Expect.equals("Error", error); - tracer.trace("b"); - return; - } finally { - tracer.trace("c"); - break; - } - tracer.trace("d"); - } - } finally { - tracer.trace("e"); - } - tracer.trace("f"); -} - -foo10(Tracer tracer) async { - try { - int i = 0; - while (true) { - try { - try { - tracer.trace("a"); - throw "Error"; - } catch (error) { - tracer.trace("b"); - try { - await new Future.value(3); // //# forceAwait: continued - throw "Error2"; - } catch (error) { - tracer.trace("c"); - } finally { - tracer.trace("d"); - } - tracer.trace("e"); - throw "Error3"; - } finally { - tracer.trace("f"); - // Continue and breaks 'eats' Error3. - if (i == 0) continue; - if (i == 1) break; - } - } finally { - tracer.trace("g"); - i++; - } - } - } finally { - tracer.trace("h"); - } - tracer.trace("i"); -} - -foo11(Tracer tracer) async { - try { - bool firstTime = true; - while (true) { - tracer.trace("a"); - if (firstTime) { - try { - await new Future.value(3); //# forceAwait: continued - tracer.trace("b"); - throw "Error"; - } catch (error) { - Expect.equals("Error", error); - tracer.trace("c"); - firstTime = false; - continue; - } finally { - tracer.trace("d"); - } - } else { - tracer.trace("e"); - return; - } - } - } finally { - tracer.trace("f"); - } - tracer.trace("g"); -} - -foo12(Tracer tracer) async { - try { - bool firstTime = true; - while (true) { - tracer.trace("a"); - if (firstTime) { - try { - await new Future.value(3); //# forceAwait: continued - tracer.trace("b"); - throw "Error"; - } catch (error) { - Expect.equals("Error", error); - tracer.trace("c"); - firstTime = false; - continue; - } finally { - tracer.trace("d"); - break; - } - } else { - tracer.trace("e"); - return; - } - } - } finally { - tracer.trace("f"); - } - tracer.trace("g"); -} - -foo13(Tracer tracer) async { - try { - try { - tracer.trace("a"); - return; - } catch (error) { - tracer.trace("b"); - } finally { - tracer.trace("c"); - try { - try { - await new Future.value(3); // //# forceAwait: continued - tracer.trace("d"); - throw "Error"; - } finally { - tracer.trace("e"); - } - } finally { - tracer.trace("f"); - } - } - } finally { - tracer.trace("g"); - } - tracer.trace("h"); -} - -foo14(Tracer tracer) async { - try { - try { - tracer.trace("a"); - throw "Error"; - } catch (error) { - tracer.trace("b"); - try { - await new Future.value(3); // //# forceAwait: continued - throw "Error2"; - } catch (error) { - tracer.trace("c"); - } finally { - tracer.trace("d"); - } - tracer.trace("e"); - throw "Error3"; - } finally { - tracer.trace("f"); - } - } finally { - tracer.trace("g"); - } - tracer.trace("h"); -} - -foo15(Tracer tracer) async { - try { - try { - tracer.trace("a"); - throw "Error"; - } catch (error) { - tracer.trace("b"); - try { - await new Future.value(3); // //# forceAwait: continued - throw "Error2"; - } catch (error) { - tracer.trace("c"); - } finally { - tracer.trace("d"); - } - tracer.trace("e"); - throw "Error3"; - } finally { - tracer.trace("f"); - return; - } - } finally { - tracer.trace("g"); - } - tracer.trace("h"); -} - -foo16(Tracer tracer) async { - try { - try { - tracer.trace("a"); - throw "Error"; - } catch (error) { - tracer.trace("b"); - try { - await new Future.value(3); // //# forceAwait: continued - throw "Error2"; - } catch (error) { - tracer.trace("c"); - } finally { - tracer.trace("d"); - return; - } - tracer.trace("e"); - throw "Error3"; - } finally { - tracer.trace("f"); - } - } finally { - tracer.trace("g"); - } - tracer.trace("h"); -} - -foo17(Tracer tracer) async { - try { - tracer.trace("a"); - } finally { - try { - tracer.trace("b"); - throw "Error"; - } catch (error) { - await new Future.value(3); // //# forceAwait: continued - Expect.equals("Error", error); - tracer.trace("c"); - } finally { - tracer.trace("d"); - } - tracer.trace("e"); - } - tracer.trace("f"); -} - -foo18(Tracer tracer) async { - try { - tracer.trace("a"); - } finally { - try { - tracer.trace("b"); - } finally { - await new Future.value(3); // //# forceAwait: continued - tracer.trace("c"); - } - tracer.trace("d"); - } - tracer.trace("e"); -} - -runTest(expectedTrace, fun, [expectedError]) async { - Tracer tracer = new Tracer(expectedTrace, expectedTrace); - try { - await fun(tracer); - } catch (error) { - Expect.equals(expectedError, error); - tracer.trace("X"); - } - tracer.done(); -} - -test() async { - await runTest("abceX", foo1, "Error2"); - await runTest("abdeX", foo2, "Error2"); - await runTest("abde", foo3); - await runTest("abcd", foo4); - await runTest("abcdX", foo5, "Error2"); - await runTest("abcde", foo6); - await runTest("abcdX", foo7, "Error3"); - await runTest("abcdX", foo8, "Error3"); - await runTest("abcef", foo9); - await runTest("abcdefgabcdefghi", foo10); - await runTest("abcdaef", foo11); - await runTest("abcdfg", foo12); - await runTest("acdefgX", foo13, "Error"); - await runTest("abcdefgX", foo14, "Error3"); - await runTest("abcdefgX", foo14, "Error3"); - await runTest("abcdefg", foo15); - await runTest("abcdfg", foo16); - await runTest("abcdef", foo17); - await runTest("abcde", foo18); -} - -void main() { - asyncTest(test); -} diff --git a/tests/language_2/async_nested/async_nested01_test.dart b/tests/language_2/async_nested/async_nested01_test.dart deleted file mode 100644 index 0eea7942d83..00000000000 --- a/tests/language_2/async_nested/async_nested01_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10"; - Node node = new Node('1', [ - new Node('2', []), - await new Future.value(new Node('3', [ - await new Future.value(new Node('4', [ - new Node('5', [ - await new Future.value(new Node('6', [ - await new Future.value(new Node('7', [])), - ])), - await new Future.value(new Node('8', [])), - await new Future.value(new Node('9', [])), - ]), - ])), - ])), - await new Future.value(new Node('10', [])), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested02_test.dart b/tests/language_2/async_nested/async_nested02_test.dart deleted file mode 100644 index e5efb09c3ef..00000000000 --- a/tests/language_2/async_nested/async_nested02_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11"; - Node node = new Node('1', [ - new Node('2', [ - new Node('3', []), - ]), - await new Future.value(new Node('4', [ - await new Future.value(new Node('5', [])), - new Node('6', [ - new Node('7', []), - await new Future.value(new Node('8', [])), - ]), - await new Future.value(new Node('9', [])), - ])), - await new Future.value(new Node('10', [])), - new Node('11', []), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested03_test.dart b/tests/language_2/async_nested/async_nested03_test.dart deleted file mode 100644 index 863fb09518a..00000000000 --- a/tests/language_2/async_nested/async_nested03_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12"; - Node node = new Node('1', [ - new Node('2', [ - await new Future.value(new Node('3', [])), - await new Future.value(new Node('4', [ - new Node('5', []), - await new Future.value(new Node('6', [])), - await new Future.value(new Node('7', [])), - new Node('8', []), - ])), - new Node('9', []), - new Node('10', [ - new Node('11', [ - await new Future.value(new Node('12', [])), - ]), - ]), - ]), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested04_test.dart b/tests/language_2/async_nested/async_nested04_test.dart deleted file mode 100644 index 3f2890a6653..00000000000 --- a/tests/language_2/async_nested/async_nested04_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12"; - Node node = await new Future.value(new Node('1', [ - await new Future.value(new Node('2', [])), - await new Future.value(new Node('3', [])), - await new Future.value(new Node('4', [ - await new Future.value(new Node('5', [])), - new Node('6', []), - new Node('7', [ - new Node('8', []), - await new Future.value(new Node('9', [])), - ]), - await new Future.value(new Node('10', [])), - ])), - new Node('11', []), - await new Future.value(new Node('12', [])), - ])); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested05_test.dart b/tests/language_2/async_nested/async_nested05_test.dart deleted file mode 100644 index 95387e398de..00000000000 --- a/tests/language_2/async_nested/async_nested05_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12"; - Node node = await new Future.value(new Node('1', [ - await new Future.value(new Node('2', [])), - await new Future.value(new Node('3', [ - await new Future.value(new Node('4', [])), - await new Future.value(new Node('5', [])), - await new Future.value(new Node('6', [])), - ])), - new Node('7', []), - new Node('8', [ - new Node('9', []), - await new Future.value(new Node('10', [])), - new Node('11', []), - await new Future.value(new Node('12', [])), - ]), - ])); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested06_test.dart b/tests/language_2/async_nested/async_nested06_test.dart deleted file mode 100644 index 551eb384f32..00000000000 --- a/tests/language_2/async_nested/async_nested06_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12"; - Node node = new Node('1', [ - new Node('2', [ - await new Future.value(new Node('3', [ - new Node('4', []), - ])), - new Node('5', [ - await new Future.value(new Node('6', [ - await new Future.value(new Node('7', [ - new Node('8', []), - ])), - new Node('9', []), - await new Future.value(new Node('10', [])), - ])), - await new Future.value(new Node('11', [])), - await new Future.value(new Node('12', [])), - ]), - ]), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested07_test.dart b/tests/language_2/async_nested/async_nested07_test.dart deleted file mode 100644 index 3571995a246..00000000000 --- a/tests/language_2/async_nested/async_nested07_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12"; - Node node = await new Future.value(new Node('1', [ - await new Future.value(new Node('2', [])), - await new Future.value(new Node('3', [ - new Node('4', []), - new Node('5', []), - await new Future.value(new Node('6', [])), - new Node('7', [ - await new Future.value(new Node('8', [ - new Node('9', []), - ])), - await new Future.value(new Node('10', [])), - ]), - ])), - new Node('11', [ - await new Future.value(new Node('12', [])), - ]), - ])); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested08_test.dart b/tests/language_2/async_nested/async_nested08_test.dart deleted file mode 100644 index be11233340e..00000000000 --- a/tests/language_2/async_nested/async_nested08_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13"; - Node node = await new Future.value(new Node('1', [ - await new Future.value(new Node('2', [ - await new Future.value(new Node('3', [])), - ])), - await new Future.value(new Node('4', [ - await new Future.value(new Node('5', [])), - await new Future.value(new Node('6', [])), - new Node('7', []), - new Node('8', []), - new Node('9', [ - await new Future.value(new Node('10', [])), - ]), - new Node('11', []), - new Node('12', []), - ])), - await new Future.value(new Node('13', [])), - ])); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested09_test.dart b/tests/language_2/async_nested/async_nested09_test.dart deleted file mode 100644 index bd7057a9b9a..00000000000 --- a/tests/language_2/async_nested/async_nested09_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13"; - Node node = new Node('1', [ - new Node('2', [ - await new Future.value(new Node('3', [])), - await new Future.value(new Node('4', [ - new Node('5', []), - new Node('6', []), - new Node('7', []), - new Node('8', []), - await new Future.value(new Node('9', [ - new Node('10', [ - new Node('11', []), - ]), - ])), - await new Future.value(new Node('12', [])), - ])), - await new Future.value(new Node('13', [])), - ]), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested10_test.dart b/tests/language_2/async_nested/async_nested10_test.dart deleted file mode 100644 index 06e15c2d70f..00000000000 --- a/tests/language_2/async_nested/async_nested10_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13"; - Node node = new Node('1', [ - await new Future.value(new Node('2', [ - new Node('3', []), - await new Future.value(new Node('4', [ - await new Future.value(new Node('5', [ - new Node('6', []), - new Node('7', [ - new Node('8', []), - ]), - await new Future.value(new Node('9', [])), - new Node('10', [ - new Node('11', []), - ]), - ])), - ])), - await new Future.value(new Node('12', [ - new Node('13', []), - ])), - ])), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested11_test.dart b/tests/language_2/async_nested/async_nested11_test.dart deleted file mode 100644 index c9641a7c6db..00000000000 --- a/tests/language_2/async_nested/async_nested11_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13"; - Node node = await new Future.value(new Node('1', [ - await new Future.value(new Node('2', [ - new Node('3', []), - new Node('4', [ - new Node('5', []), - new Node('6', []), - await new Future.value(new Node('7', [ - new Node('8', [ - new Node('9', []), - ]), - new Node('10', []), - new Node('11', [ - await new Future.value(new Node('12', [])), - ]), - ])), - await new Future.value(new Node('13', [])), - ]), - ])), - ])); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested12_test.dart b/tests/language_2/async_nested/async_nested12_test.dart deleted file mode 100644 index db02de61e86..00000000000 --- a/tests/language_2/async_nested/async_nested12_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13"; - Node node = new Node('1', [ - await new Future.value(new Node('2', [])), - await new Future.value(new Node('3', [])), - new Node('4', [ - await new Future.value(new Node('5', [ - new Node('6', []), - new Node('7', []), - await new Future.value(new Node('8', [ - new Node('9', []), - ])), - ])), - new Node('10', [ - new Node('11', []), - await new Future.value(new Node('12', [])), - ]), - ]), - await new Future.value(new Node('13', [])), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested13_test.dart b/tests/language_2/async_nested/async_nested13_test.dart deleted file mode 100644 index a607205b916..00000000000 --- a/tests/language_2/async_nested/async_nested13_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14"; - Node node = new Node('1', [ - new Node('2', []), - await new Future.value(new Node('3', [])), - await new Future.value(new Node('4', [ - new Node('5', [ - await new Future.value(new Node('6', [ - new Node('7', [ - new Node('8', [ - new Node('9', []), - new Node('10', []), - await new Future.value(new Node('11', [])), - ]), - await new Future.value(new Node('12', [])), - ]), - ])), - await new Future.value(new Node('13', [ - new Node('14', []), - ])), - ]), - ])), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested14_test.dart b/tests/language_2/async_nested/async_nested14_test.dart deleted file mode 100644 index a39870b30a7..00000000000 --- a/tests/language_2/async_nested/async_nested14_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14"; - Node node = new Node('1', [ - new Node('2', []), - await new Future.value(new Node('3', [ - new Node('4', [ - await new Future.value(new Node('5', [])), - new Node('6', []), - new Node('7', []), - new Node('8', [ - await new Future.value(new Node('9', [ - new Node('10', []), - await new Future.value(new Node('11', [])), - ])), - ]), - await new Future.value(new Node('12', [])), - ]), - new Node('13', []), - ])), - await new Future.value(new Node('14', [])), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested15_test.dart b/tests/language_2/async_nested/async_nested15_test.dart deleted file mode 100644 index 83e5292f47e..00000000000 --- a/tests/language_2/async_nested/async_nested15_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14"; - Node node = new Node('1', [ - await new Future.value(new Node('2', [ - await new Future.value(new Node('3', [ - new Node('4', []), - await new Future.value(new Node('5', [ - await new Future.value(new Node('6', [])), - new Node('7', [ - new Node('8', []), - await new Future.value(new Node('9', [])), - new Node('10', []), - new Node('11', [ - new Node('12', []), - ]), - ]), - ])), - new Node('13', [ - await new Future.value(new Node('14', [])), - ]), - ])), - ])), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested16_test.dart b/tests/language_2/async_nested/async_nested16_test.dart deleted file mode 100644 index aa742d452fa..00000000000 --- a/tests/language_2/async_nested/async_nested16_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14"; - Node node = await new Future.value(new Node('1', [ - new Node('2', []), - await new Future.value(new Node('3', [ - new Node('4', []), - new Node('5', []), - new Node('6', []), - new Node('7', []), - new Node('8', [ - await new Future.value(new Node('9', [ - await new Future.value(new Node('10', [])), - ])), - ]), - new Node('11', []), - ])), - new Node('12', [ - new Node('13', [ - await new Future.value(new Node('14', [])), - ]), - ]), - ])); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested17_test.dart b/tests/language_2/async_nested/async_nested17_test.dart deleted file mode 100644 index 62aa700a50f..00000000000 --- a/tests/language_2/async_nested/async_nested17_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14"; - Node node = await new Future.value(new Node('1', [ - new Node('2', []), - await new Future.value(new Node('3', [ - new Node('4', [ - await new Future.value(new Node('5', [])), - new Node('6', []), - new Node('7', []), - ]), - await new Future.value(new Node('8', [])), - new Node('9', [ - new Node('10', []), - await new Future.value(new Node('11', [])), - ]), - await new Future.value(new Node('12', [])), - ])), - await new Future.value(new Node('13', [])), - new Node('14', []), - ])); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested18_test.dart b/tests/language_2/async_nested/async_nested18_test.dart deleted file mode 100644 index 73cb3aef23f..00000000000 --- a/tests/language_2/async_nested/async_nested18_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"; - Node node = new Node('1', [ - new Node('2', []), - new Node('3', [ - await new Future.value(new Node('4', [])), - new Node('5', [ - new Node('6', [ - new Node('7', [ - await new Future.value(new Node('8', [ - new Node('9', []), - new Node('10', []), - await new Future.value(new Node('11', [])), - await new Future.value(new Node('12', [])), - new Node('13', []), - ])), - await new Future.value(new Node('14', [ - new Node('15', []), - ])), - ]), - ]), - ]), - ]), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested19_test.dart b/tests/language_2/async_nested/async_nested19_test.dart deleted file mode 100644 index 46c48bf8135..00000000000 --- a/tests/language_2/async_nested/async_nested19_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"; - Node node = await new Future.value(new Node('1', [ - new Node('2', []), - new Node('3', []), - new Node('4', [ - new Node('5', []), - ]), - new Node('6', [ - new Node('7', []), - ]), - new Node('8', [ - new Node('9', [ - await new Future.value(new Node('10', [ - new Node('11', [ - new Node('12', []), - new Node('13', []), - await new Future.value(new Node('14', [])), - ]), - ])), - await new Future.value(new Node('15', [])), - ]), - ]), - ])); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested20_test.dart b/tests/language_2/async_nested/async_nested20_test.dart deleted file mode 100644 index 2d13af9fda2..00000000000 --- a/tests/language_2/async_nested/async_nested20_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"; - Node node = await new Future.value(new Node('1', [ - await new Future.value(new Node('2', [ - new Node('3', []), - await new Future.value(new Node('4', [ - await new Future.value(new Node('5', [ - new Node('6', []), - new Node('7', [ - await new Future.value(new Node('8', [ - new Node('9', []), - ])), - new Node('10', []), - new Node('11', []), - new Node('12', [ - await new Future.value(new Node('13', [])), - new Node('14', []), - ]), - ]), - ])), - await new Future.value(new Node('15', [])), - ])), - ])), - ])); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested21_test.dart b/tests/language_2/async_nested/async_nested21_test.dart deleted file mode 100644 index a7fe3aed423..00000000000 --- a/tests/language_2/async_nested/async_nested21_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"; - Node node = await new Future.value(new Node('1', [ - await new Future.value(new Node('2', [ - new Node('3', [ - new Node('4', [ - await new Future.value(new Node('5', [])), - new Node('6', [ - await new Future.value(new Node('7', [ - new Node('8', [ - await new Future.value(new Node('9', [])), - new Node('10', []), - ]), - new Node('11', []), - await new Future.value(new Node('12', [])), - new Node('13', []), - ])), - new Node('14', [ - await new Future.value(new Node('15', [])), - ]), - ]), - ]), - ]), - ])), - ])); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested22_test.dart b/tests/language_2/async_nested/async_nested22_test.dart deleted file mode 100644 index f407cd60bb4..00000000000 --- a/tests/language_2/async_nested/async_nested22_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"; - Node node = new Node('1', [ - await new Future.value(new Node('2', [])), - new Node('3', []), - await new Future.value(new Node('4', [ - await new Future.value(new Node('5', [])), - new Node('6', [ - new Node('7', [ - new Node('8', [ - new Node('9', []), - ]), - ]), - await new Future.value(new Node('10', [ - new Node('11', []), - ])), - await new Future.value(new Node('12', [])), - ]), - new Node('13', []), - ])), - await new Future.value(new Node('14', [])), - new Node('15', []), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested23_test.dart b/tests/language_2/async_nested/async_nested23_test.dart deleted file mode 100644 index b7082d5800b..00000000000 --- a/tests/language_2/async_nested/async_nested23_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"; - Node node = new Node('1', [ - await new Future.value(new Node('2', [])), - await new Future.value(new Node('3', [ - new Node('4', [ - new Node('5', [ - new Node('6', []), - new Node('7', [ - new Node('8', []), - ]), - new Node('9', []), - await new Future.value(new Node('10', [])), - new Node('11', []), - ]), - ]), - new Node('12', []), - await new Future.value(new Node('13', [])), - ])), - await new Future.value(new Node('14', [])), - new Node('15', []), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested24_test.dart b/tests/language_2/async_nested/async_nested24_test.dart deleted file mode 100644 index 66a18f0df9f..00000000000 --- a/tests/language_2/async_nested/async_nested24_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"; - Node node = await new Future.value(new Node('1', [ - new Node('2', []), - new Node('3', []), - await new Future.value(new Node('4', [ - await new Future.value(new Node('5', [])), - new Node('6', []), - await new Future.value(new Node('7', [])), - await new Future.value(new Node('8', [])), - ])), - new Node('9', []), - new Node('10', [ - await new Future.value(new Node('11', [])), - new Node('12', [ - await new Future.value(new Node('13', [])), - new Node('14', []), - await new Future.value(new Node('15', [])), - ]), - ]), - ])); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested25_test.dart b/tests/language_2/async_nested/async_nested25_test.dart deleted file mode 100644 index 9606cad1526..00000000000 --- a/tests/language_2/async_nested/async_nested25_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"; - Node node = new Node('1', [ - new Node('2', [ - new Node('3', [ - new Node('4', []), - await new Future.value(new Node('5', [ - await new Future.value(new Node('6', [ - new Node('7', [ - await new Future.value(new Node('8', [])), - new Node('9', []), - await new Future.value(new Node('10', [])), - await new Future.value(new Node('11', [])), - new Node('12', [ - await new Future.value(new Node('13', [])), - ]), - new Node('14', []), - ]), - ])), - await new Future.value(new Node('15', [])), - ])), - ]), - ]), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested26_test.dart b/tests/language_2/async_nested/async_nested26_test.dart deleted file mode 100644 index a9e0e9c5ade..00000000000 --- a/tests/language_2/async_nested/async_nested26_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14"; - Node node = new Node('1', [ - new Node('2', [ - await new Future.value(new Node('3', [])), - ]), - await new Future.value(new Node('4', [ - await new Future.value(new Node('5', [ - new Node('6', [ - new Node('7', []), - ]), - new Node('8', []), - await new Future.value(new Node('9', [])), - new Node('10', []), - new Node('11', []), - ])), - await new Future.value(new Node('12', [])), - new Node('13', []), - new Node('14', []), - ])), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested27_test.dart b/tests/language_2/async_nested/async_nested27_test.dart deleted file mode 100644 index 2c832cd596f..00000000000 --- a/tests/language_2/async_nested/async_nested27_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16"; - Node node = new Node('1', [ - new Node('2', []), - await new Future.value(new Node('3', [ - new Node('4', []), - await new Future.value(new Node('5', [ - new Node('6', []), - await new Future.value(new Node('7', [ - new Node('8', []), - ])), - ])), - ])), - await new Future.value(new Node('9', [ - new Node('10', [ - new Node('11', []), - new Node('12', []), - await new Future.value(new Node('13', [])), - await new Future.value(new Node('14', [])), - await new Future.value(new Node('15', [])), - new Node('16', []), - ]), - ])), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested28_test.dart b/tests/language_2/async_nested/async_nested28_test.dart deleted file mode 100644 index c9b4bf4597b..00000000000 --- a/tests/language_2/async_nested/async_nested28_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16"; - Node node = new Node('1', [ - await new Future.value(new Node('2', [ - new Node('3', []), - new Node('4', []), - new Node('5', [ - new Node('6', []), - await new Future.value(new Node('7', [ - new Node('8', [ - new Node('9', []), - new Node('10', [ - new Node('11', [ - new Node('12', []), - new Node('13', []), - await new Future.value(new Node('14', [])), - ]), - ]), - ]), - ])), - new Node('15', []), - await new Future.value(new Node('16', [])), - ]), - ])), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested29_test.dart b/tests/language_2/async_nested/async_nested29_test.dart deleted file mode 100644 index b312e4fb0ef..00000000000 --- a/tests/language_2/async_nested/async_nested29_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16"; - Node node = new Node('1', [ - await new Future.value(new Node('2', [ - new Node('3', []), - await new Future.value(new Node('4', [])), - new Node('5', [ - new Node('6', []), - await new Future.value(new Node('7', [ - new Node('8', [ - await new Future.value(new Node('9', [])), - await new Future.value(new Node('10', [ - new Node('11', [ - new Node('12', [ - await new Future.value(new Node('13', [])), - ]), - new Node('14', []), - await new Future.value(new Node('15', [])), - ]), - ])), - await new Future.value(new Node('16', [])), - ]), - ])), - ]), - ])), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested30_test.dart b/tests/language_2/async_nested/async_nested30_test.dart deleted file mode 100644 index c98b92a2172..00000000000 --- a/tests/language_2/async_nested/async_nested30_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16"; - Node node = new Node('1', [ - new Node('2', [ - new Node('3', []), - new Node('4', []), - new Node('5', [ - await new Future.value(new Node('6', [ - new Node('7', []), - new Node('8', [ - await new Future.value(new Node('9', [])), - await new Future.value(new Node('10', [])), - await new Future.value(new Node('11', [])), - ]), - await new Future.value(new Node('12', [])), - new Node('13', []), - ])), - new Node('14', [ - await new Future.value(new Node('15', [ - new Node('16', []), - ])), - ]), - ]), - ]), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested31_test.dart b/tests/language_2/async_nested/async_nested31_test.dart deleted file mode 100644 index ccf6a0d34f1..00000000000 --- a/tests/language_2/async_nested/async_nested31_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16"; - Node node = new Node('1', [ - await new Future.value(new Node('2', [])), - await new Future.value(new Node('3', [ - new Node('4', [ - new Node('5', []), - new Node('6', []), - await new Future.value(new Node('7', [])), - await new Future.value(new Node('8', [ - new Node('9', []), - ])), - new Node('10', [ - new Node('11', [ - new Node('12', []), - ]), - ]), - ]), - ])), - await new Future.value(new Node('13', [])), - await new Future.value(new Node('14', [])), - new Node('15', []), - await new Future.value(new Node('16', [])), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested32_test.dart b/tests/language_2/async_nested/async_nested32_test.dart deleted file mode 100644 index ca169a229f7..00000000000 --- a/tests/language_2/async_nested/async_nested32_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16"; - Node node = new Node('1', [ - new Node('2', [ - new Node('3', []), - new Node('4', []), - await new Future.value(new Node('5', [ - await new Future.value(new Node('6', [ - await new Future.value(new Node('7', [])), - new Node('8', [ - new Node('9', []), - await new Future.value(new Node('10', [])), - ]), - ])), - ])), - await new Future.value(new Node('11', [])), - new Node('12', [ - new Node('13', []), - await new Future.value(new Node('14', [ - await new Future.value(new Node('15', [])), - ])), - new Node('16', []), - ]), - ]), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested33_test.dart b/tests/language_2/async_nested/async_nested33_test.dart deleted file mode 100644 index ce7f5b8f798..00000000000 --- a/tests/language_2/async_nested/async_nested33_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16"; - Node node = new Node('1', [ - new Node('2', []), - new Node('3', [ - await new Future.value(new Node('4', [])), - new Node('5', [ - new Node('6', [ - new Node('7', [ - await new Future.value(new Node('8', [])), - await new Future.value(new Node('9', [ - await new Future.value(new Node('10', [ - new Node('11', []), - ])), - await new Future.value(new Node('12', [])), - await new Future.value(new Node('13', [ - await new Future.value(new Node('14', [])), - ])), - ])), - await new Future.value(new Node('15', [])), - new Node('16', []), - ]), - ]), - ]), - ]), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested34_test.dart b/tests/language_2/async_nested/async_nested34_test.dart deleted file mode 100644 index b510e5bd986..00000000000 --- a/tests/language_2/async_nested/async_nested34_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16"; - Node node = await new Future.value(new Node('1', [ - await new Future.value(new Node('2', [ - new Node('3', []), - new Node('4', []), - new Node('5', [ - await new Future.value(new Node('6', [ - new Node('7', [ - new Node('8', []), - new Node('9', [ - new Node('10', []), - await new Future.value(new Node('11', [])), - ]), - ]), - await new Future.value(new Node('12', [])), - ])), - new Node('13', [ - await new Future.value(new Node('14', [])), - await new Future.value(new Node('15', [])), - new Node('16', []), - ]), - ]), - ])), - ])); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested35_test.dart b/tests/language_2/async_nested/async_nested35_test.dart deleted file mode 100644 index a94b750972b..00000000000 --- a/tests/language_2/async_nested/async_nested35_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16"; - Node node = await new Future.value(new Node('1', [ - new Node('2', []), - await new Future.value(new Node('3', [ - await new Future.value(new Node('4', [])), - await new Future.value(new Node('5', [ - new Node('6', []), - new Node('7', []), - await new Future.value(new Node('8', [])), - await new Future.value(new Node('9', [])), - ])), - new Node('10', [ - new Node('11', [ - new Node('12', [ - new Node('13', []), - ]), - ]), - new Node('14', [ - await new Future.value(new Node('15', [])), - ]), - new Node('16', []), - ]), - ])), - ])); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested36_test.dart b/tests/language_2/async_nested/async_nested36_test.dart deleted file mode 100644 index db491d63dce..00000000000 --- a/tests/language_2/async_nested/async_nested36_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"; - Node node = await new Future.value(new Node('1', [ - await new Future.value(new Node('2', [ - await new Future.value(new Node('3', [])), - new Node('4', []), - await new Future.value(new Node('5', [ - new Node('6', [ - new Node('7', []), - await new Future.value(new Node('8', [])), - ]), - new Node('9', []), - await new Future.value(new Node('10', [])), - ])), - new Node('11', [ - new Node('12', []), - ]), - new Node('13', [ - await new Future.value(new Node('14', [])), - ]), - ])), - await new Future.value(new Node('15', [])), - ])); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested37_test.dart b/tests/language_2/async_nested/async_nested37_test.dart deleted file mode 100644 index d43ae706dcc..00000000000 --- a/tests/language_2/async_nested/async_nested37_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16"; - Node node = new Node('1', [ - new Node('2', []), - await new Future.value(new Node('3', [])), - new Node('4', [ - new Node('5', [ - new Node('6', []), - new Node('7', []), - ]), - ]), - await new Future.value(new Node('8', [ - await new Future.value(new Node('9', [])), - await new Future.value(new Node('10', [ - new Node('11', []), - new Node('12', []), - await new Future.value(new Node('13', [])), - ])), - ])), - await new Future.value(new Node('14', [])), - new Node('15', [ - new Node('16', []), - ]), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested38_test.dart b/tests/language_2/async_nested/async_nested38_test.dart deleted file mode 100644 index 8272c1e21b0..00000000000 --- a/tests/language_2/async_nested/async_nested38_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16"; - Node node = await new Future.value(new Node('1', [ - new Node('2', []), - new Node('3', [ - new Node('4', []), - ]), - new Node('5', []), - new Node('6', []), - await new Future.value(new Node('7', [])), - await new Future.value(new Node('8', [ - await new Future.value(new Node('9', [])), - new Node('10', [ - new Node('11', []), - await new Future.value(new Node('12', [])), - ]), - ])), - new Node('13', [ - new Node('14', []), - ]), - await new Future.value(new Node('15', [])), - await new Future.value(new Node('16', [])), - ])); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested39_test.dart b/tests/language_2/async_nested/async_nested39_test.dart deleted file mode 100644 index e029484660e..00000000000 --- a/tests/language_2/async_nested/async_nested39_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9"; - Node node = await new Future.value(new Node('1', [ - new Node('2', []), - await new Future.value(new Node('3', [ - new Node('4', []), - new Node('5', []), - await new Future.value(new Node('6', [ - new Node('7', []), - ])), - ])), - new Node('8', []), - await new Future.value(new Node('9', [])), - ])); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested40_test.dart b/tests/language_2/async_nested/async_nested40_test.dart deleted file mode 100644 index c631f92b1a8..00000000000 --- a/tests/language_2/async_nested/async_nested40_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9"; - Node node = await new Future.value(new Node('1', [ - new Node('2', [ - new Node('3', [ - new Node('4', []), - ]), - ]), - await new Future.value(new Node('5', [ - new Node('6', []), - new Node('7', []), - await new Future.value(new Node('8', [])), - ])), - await new Future.value(new Node('9', [])), - ])); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_nested/async_nested41_test.dart b/tests/language_2/async_nested/async_nested41_test.dart deleted file mode 100644 index 105e525e39d..00000000000 --- a/tests/language_2/async_nested/async_nested41_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2018, 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 - -// This has been automatically generated by script -// "async_nested_test_generator.dart". - -import 'dart:async'; - -void main() async { - String expected = "1 2 3 4 5 6 7 8 9"; - Node node = new Node('1', [ - await new Future.value(new Node('2', [])), - await new Future.value(new Node('3', [ - new Node('4', []), - await new Future.value(new Node('5', [ - new Node('6', []), - ])), - await new Future.value(new Node('7', [])), - new Node('8', []), - ])), - await new Future.value(new Node('9', [])), - ]); - String actual = node.toSimpleString(); - print(actual); - if (actual != expected) { - throw "Expected '$expected' but got '$actual'"; - } -} - -class Node { - final List nested; - final String name; - - Node(this.name, [this.nested]) {} - - String toString() => '<$name:[${nested?.join(', ')}]>'; - - toSimpleString() { - var tmp = nested?.map((child) => child.toSimpleString()); - return '$name ${tmp?.join(' ')}'.trim(); - } -} diff --git a/tests/language_2/async_star/async_star2_regression_test.dart b/tests/language_2/async_star/async_star2_regression_test.dart deleted file mode 100644 index 07e8e44985f..00000000000 --- a/tests/language_2/async_star/async_star2_regression_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// 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. - -// @dart = 2.9 - -library async_start_test; - -import "dart:async"; - -import "package:expect/expect.dart"; - -void main() async { - var results = []; - - f() async* { - yield 0; - yield 1; - yield 2; - } - - //Broken, the value 1 was lost. - await for (var i in f()) { - results.add(i); - if (i == 0) { - // This should pause the stream subscription. - await Future.delayed(Duration(milliseconds: 500)); - } - } - - Expect.listEquals([0, 1, 2], results); -} diff --git a/tests/language_2/async_star/async_star_await_for_test.dart b/tests/language_2/async_star/async_star_await_for_test.dart deleted file mode 100644 index 030be3e4236..00000000000 --- a/tests/language_2/async_star/async_star_await_for_test.dart +++ /dev/null @@ -1,378 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test that `await for` and `async*` interact correctly. - -// An `await for` must pause its subscription immediately -// if the `await for` body does anything asynchronous -// (any `await`, `await for`, or pausing at a `yield`/`yield*`) -// A pause happening synchronously in an event delivery -// must pause the `sync*` method at the `yield` sending the event. -// A break happening synchronously in an event delivery, -// or while paused at a `yield`, must exit at that `yield`. - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -Stream stream(List log) async* { - log.add("^"); - try { - log.add("?1"); - yield 1; - log.add("?2"); - yield 2; - log.add("?3"); - yield 3; - } finally { - log.add(r"$"); - } -} - -Stream consume(List log, - {int breakAt = -1, - int yieldAt = -1, - int yieldStarAt = -1, - int pauseAt = -1}) async* { - // Create stream. - var s = stream(log); - log.add("("); - // The "consume loop". - await for (var event in s) { - // Should be acting synchronously wrt. the delivery of the event. - // The source stream should be at the yield now. - log.add("!$event"); - if (event == pauseAt) { - log.add("p$event["); - // Async operation causes subscription to pause. - // Nothing should happen in the source stream - // until the end of the loop body where the subscription is resumed. - await Future.delayed(Duration(microseconds: 1)); - log.add("]"); - } - if (event == yieldAt) { - log.add("y$event["); - // Yield may cause subscription to pause or cancel. - // This loop should stay at the yield until the event has been delivered. - // If the receiver pauses or cancels, we delay or break the loop here. - yield event; - log.add("]"); - } - if (event == yieldStarAt) { - log.add("Y$event["); - // Yield* will always cause the subscription for this loop to pause. - // If the listener pauses, this stream is paused. If the listener cancels, - // this stream is cancelled, and the yield* acts like return, cancelling - // the loop subscription and waiting for the cancel future. - yield* Stream.fromIterable([event]); - log.add("]"); - } - if (event == breakAt) { - log.add("b$event"); - // Breaks the loop. This cancels the loop subscription and waits for the - // cancel future. - break; - } - } - // Done event from stream or cancel future has completed. - log.add(")"); -} - -main() async { - asyncStart(); - - // Just run the loop over the stream. The consume stream emits no events. - { - var log = []; - await for (var _ in consume(log)) { - throw "unreachable"; - } - await Future.delayed(Duration(milliseconds: 1)); - var trace = log.join(""); - Expects.equals(r"(^?1!1?2!2?3!3$)", trace, "straight through"); - } - - // Pause at 1, then resume. - // Consume loop forces a pause when it receives the 1 event. - // Nothing should happen until that pause is resumed. - { - var log = []; - await for (var _ in consume(log, pauseAt: 1)) { - throw "unreachable"; - } - await Future.delayed(Duration(milliseconds: 10)); - var trace = log.join(""); - String message = "pause at 1"; - if (trace.contains("p1[?2")) { - message += " (did not pause in time)"; - } - Expects.equals(r"(^?1!1p1[]?2!2?3!3$)", trace, message); - } - - // Break at 1. - // Consume loop breaks after receiving the 1 event. - // The consume stream emits no events. - { - var log = []; - await for (var _ in consume(log, breakAt: 1)) { - throw "unreachable"; - } - await Future.delayed(Duration(milliseconds: 10)); - var trace = log.join(""); - String message = "break at 1"; - if (trace.contains("b1?2")) { - message += " (did not cancel in time)"; - } - Expects.equals(r"(^?1!1b1$)", trace, message); - } - - // Pause then break at 1. - // Consume loop pauses after receiving the 1 event, - // then breaks before resuming. It should still be at the yield. - // The consume stream emits no events. - { - var log = []; - await for (var _ in consume(log, pauseAt: 1, breakAt: 1)) { - throw "unreachable"; - } - await Future.delayed(Duration(milliseconds: 10)); - var trace = log.join(""); - String message = "pause then break at 1"; - if (trace.contains("p1[?2")) { - message += " (did not pause in time)"; - } - if (trace.contains("b1?2")) { - message += " (did not cancel in time)"; - } - Expects.equals(r"(^?1!1p1[]b1$)", trace, message); - } - - // Yield at 1. - // The consume loop re-emits the 1 event. - // The test loop should receive that event while the consume loop is still - // at the yield statement. - // The consume loop may or may not pause, it should make no difference. - { - var log = []; - await for (var s in consume(log, yieldAt: 1)) { - log.add("e$s"); - } - await Future.delayed(Duration(milliseconds: 10)); - var trace = log.join(""); - String message = "yield at 1"; - if (trace.contains("y1[?2")) { - message += " (did not wait for delivery)"; - } - Expects.equals(r"(^?1!1y1[e1]?2!2?3!3$)", trace, message); - } - - // Yield at 1, then pause at yield. - // The consume loop re-emits the 1 event. - // The test loop should receive that event while the consume loop is still - // at the yield statement. - // The test loop then pauses. - // Nothing should happen in either the original yield - // or the consume-function yield until the test loop ends. - { - var log = []; - await for (var s in consume(log, yieldAt: 1)) { - log.add("e$s<"); - // Force pause at yield. - await Future.delayed(Duration(milliseconds: 1)); - log.add(">"); - } - await Future.delayed(Duration(milliseconds: 10)); - var trace = log.join(""); - String message = "yield at 1, pause at yield"; - if (trace.contains("y1[?2")) { - message += " (did not wait for delivery)"; - } - if (trace.contains("e1]?2!2?3!3$)", trace, message); - } - - // Yield at 1, then break at yield. - // The consume loop re-emits the 1 event. - // The test loop should receive that event while the consume loop is still - // at the yield statement. - // The test loop then breaks. That makes the consume loop yield return, - // breaking the consume loop, which makes the source yield return. - { - var log = []; - await for (var s in consume(log, yieldAt: 1)) { - log.add("e${s}B$s"); - break; // Force break at yield*. - } - await Future.delayed(Duration(milliseconds: 10)); - var trace = log.join(""); - String message = "yield at 1, break at yield"; - if (trace.contains("y1[?2")) { - message += " (did not wait for delivery)"; - } - if (trace.contains("B1?2")) { - message += " (did not break in time)"; - } - Expects.equals(r"(^?1!1y1[e1B1$", trace, message); - } - - // Yield* at 1. - // The consume loop re-emits a stream containing the 1 event. - // The test loop should receive that event before the consume loop - // continues from the `yield*`, which again happens before the source - // stream continues from its `yield`. - { - var log = []; - await for (var s in consume(log, yieldStarAt: 1)) { - log.add("e$s"); - } - await Future.delayed(Duration(milliseconds: 10)); - var trace = log.join(""); - String message = "yield* at 1"; - if (trace.contains("Y1[?2")) { - message += " (did not wait for delivery)"; - } - Expects.equals(r"(^?1!1Y1[e1]?2!2?3!3$)", trace, message); - } - - // Yield* at 1, pause at yield. - // The consume loop re-emits a stream containing the 1 event. - // The test loop should receive that event before the consume loop - // continues from the `yield*`. The test loop then force a pause. - // Nothing further should happen during that pause. - { - var log = []; - await for (var s in consume(log, yieldStarAt: 1)) { - log.add("e$s<"); - await Future.delayed(Duration(milliseconds: 1)); // force pause. - log.add(">"); - } - await Future.delayed(Duration(milliseconds: 10)); - var trace = log.join(""); - String message = "yield* then pause at 1"; - if (trace.contains("Y1[?2")) { - message += " (did not wait for delivery)"; - } - if (trace.contains("e1]?2!2?3!3$)", trace, message); - } - - // Yield* at 1, then break at 1. - // The consume loop re-emits a stream containing the 1 event. - // The test loop should receive that event before the consume loop - // continues from the `yield*`. - // When the consume loop continues, it breaks, - // forcing the waiting source yield to return. - { - var log = []; - await for (var s in consume(log, yieldStarAt: 1, breakAt: 1)) { - log.add("e$s"); - } - await Future.delayed(Duration(milliseconds: 10)); - var trace = log.join(""); - String message = "yield* then pause at 1"; - if (trace.contains("Y1[?2")) { - message += " (did not wait for delivery)"; - } - Expects.equals(r"(^?1!1Y1[e1]b1$)", trace, message); - } - - // Yield* at 1, pause at yield, then break at 1. - // The consume loop re-emits a stream containing the 1 event. - // The test loop should receive that event before the consume loop - // continues from the `yield*`. After the `yield*`, the consume loop breaks. - // This forces the waiting source yield to return. - { - var log = []; - await for (var s in consume(log, yieldStarAt: 1, breakAt: 1)) { - log.add("e$s<"); - await Future.delayed(Duration(milliseconds: 1)); // force pause. - log.add(">"); - } - await Future.delayed(Duration(milliseconds: 10)); - var trace = log.join(""); - String message = "yield* then pause at 1"; - Expects.equals(r"(^?1!1Y1[e1<>]b1$)", trace, message); - } - - // Yield* at 1, break at yield. - // The consume loop re-emits a stream containing the 1 event. - // The test loop should receive that event before the consume loop - // continues from the `yield*`. The test loop then breaks, - // forcing the two waiting yields to return. - { - var log = []; - await for (var s in consume(log, yieldStarAt: 1)) { - log.add("e${s}B$s"); - break; - } - await Future.delayed(Duration(milliseconds: 10)); - var trace = log.join(""); - String message = "yield* then break at 1"; - if (trace.contains("Y1[?2")) { - message += " (did not deliver event in time)"; - } - if (trace.contains("e1?2")) { - message += " (did not cancel in time)"; - } - Expects.equals(r"(^?1!1Y1[e1B1$", trace, message); - } - - // Yield* at 1, pause at yield, then break at yield. - // The consume loop re-emits a stream containing the 1 event. - // The test loop should receive that event before the consume loop - // continues from the `yield*`. The test loop then forces a pause, - // and then breaks before that pause is resumed. - // This forces the two waiting yields to return. - { - var log = []; - await for (var s in consume(log, yieldStarAt: 1)) { - log.add("e$s<"); - await Future.delayed(Duration(milliseconds: 1)); // force pause. - log.add(">B$s"); - break; // And break. - } - await Future.delayed(Duration(milliseconds: 10)); - var trace = log.join(""); - String message = "yield* then pause then break at 1"; - Expects.equals(r"(^?1!1Y1[e1<>B1$", trace, message); - } - - Expects.summarize(); - asyncEnd(); -} - -class Expects { - static var _errors = []; - static int _tests = 0; - static void summarize() { - if (_errors.isNotEmpty) { - var buffer = StringBuffer(); - for (var es in _errors) { - buffer.writeln("FAILURE:"); - buffer.writeln(es[0]); // error - buffer.writeln(es[1]); // stack trace - } - ; - buffer.writeln("Expectations failed: ${_errors.length}" - ", succeeded: ${_tests - _errors.length}"); - throw ExpectException(buffer.toString()); - } - } - - static void equals(o1, o2, String message) { - _tests++; - try { - Expect.equals(o1, o2, message); - } on ExpectException catch (e) { - var stack = StackTrace.current; - _errors.add([e, stack]); - } - } -} diff --git a/tests/language_2/async_star/async_star_cancel_test.dart b/tests/language_2/async_star/async_star_cancel_test.dart deleted file mode 100644 index 80f716c4aef..00000000000 --- a/tests/language_2/async_star/async_star_cancel_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test that stream cancellation is checked immediately after delivering the -// event, and before continuing after the yield. - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -main() async { - asyncStart(); - var log = []; - Stream f() async* { - try { - log.add("-1"); - yield 1; - log.add("-2"); - yield 2; - } finally { - log.add("x"); - } - } - - var completer = Completer(); - var s; - s = f().listen((e) { - log.add("+$e"); - // The `cancel` operation makes all `yield` operations act as returns. - // It should make the `finally` block in `f` log an "x", - // and nothing else. - completer.complete(s.cancel()); - }, onError: (e) { - // Should never be reached, but if it does, we'll make the await - // below terminate. - completer.complete(new Future.sync(() { - Expect.fail("$e"); - })); - }, onDone: () { - completer.complete(null); - }); - await completer.future; - Expect.listEquals(["-1", "+1", "x"], log, "cancel"); - asyncEnd(); -} diff --git a/tests/language_2/async_star/async_star_invalid_test.dart b/tests/language_2/async_star/async_star_invalid_test.dart deleted file mode 100644 index c4d3123eafb..00000000000 --- a/tests/language_2/async_star/async_star_invalid_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test that various invalid uses of `yield` are disallowed. - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -var yield = 42; - -main() async { - asyncStart(); - Stream f() async* { - // Invalid syntax. - yield ("a", "b"); //# 01: syntax error - yield yield "twice"; //# 02: syntax error - - // Valid but curious syntax. - yield throw "throw"; //# 03: runtime error - - // Type error. - yield* "one"; //# 04: compile-time error - - label: yield "ok"; - } - var completer = Completer(); - f().listen(completer.complete, onError: completer.completeError, - onDone: () { - if (!completer.isCompleted) completer.completeError("not ok?"); - }); - Expect.equals("ok", await completer.future); - asyncEnd(); -} diff --git a/tests/language_2/async_star/async_star_test.dart b/tests/language_2/async_star/async_star_test.dart deleted file mode 100644 index 28d9b7fc0f0..00000000000 --- a/tests/language_2/async_star/async_star_test.dart +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) 2018, 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 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -main() async { - asyncStart(); - // Normal operations. - { - Stream f() async* { - yield 1; - yield 2; - yield 3; - } - - Expect.listEquals([1, 2, 3], await f().toList(), "basic1"); - } - - { - Stream f() async* { - yield 1; - yield 2; - yield 3; - } - - var log = []; - var completer = Completer(); - f().listen(log.add, - onError: (e) { - // Shouldn't be reached. - completer.complete(new Future.sync(() { - Expect.fail("$e"); - })); - }, - onDone: () => completer.complete(null)); - await completer.future; - Expect.listEquals([1, 2, 3], log, "basic2"); - } - - { - var log = []; - Stream f() async* { - log.add("-1"); - yield 1; - log.add("-2"); - yield 2; - } - - await f().forEach((e) { - log.add("+$e"); - }); - Expect.listEquals(["-1", "+1", "-2", "+2"], log, "basic3"); - } - - { - var log = []; - Stream f() async* { - log.add("-1"); - yield 1; - log.add("-2"); - yield 2; - } - - await for (var e in f()) { - log.add("+$e"); - } - Expect.listEquals(["-1", "+1", "-2", "+2"], log, "basic4"); - } - - // async - { - Stream f() async* { - yield 1; - await Future(() {}); - yield 2; - await Future(() {}); - yield 3; - } - - Expect.listEquals([1, 2, 3], await f().toList(), "async"); - } - - // Yield* - { - Stream f(n) async* { - yield n; - if (n == 0) return; - yield* f(n - 1); - yield n; - } - - Expect.listEquals([3, 2, 1, 0, 1, 2, 3], await f(3).toList(), "yield*"); - } - - // Errors - { - var log = []; - Stream f() async* { - yield 1; - throw "error"; - } - - await f().handleError((e) { - log.add(e); - }).forEach(log.add); - Expect.listEquals([1, "error"], log, "error"); - } - - { - var log = []; - Stream f() async* { - yield 1; - yield* Future.error("error").asStream(); // Emits error as error. - yield 3; - } - - await f().handleError((e) { - log.add(e); - }).forEach(log.add); - Expect.listEquals([1, "error", 3], log, "error2"); - } - - // Pause is checked after delivering event. - { - var log = []; - Stream f() async* { - log.add("-1"); - yield 1; - log.add("-2"); - yield 2; - } - - var completer = Completer(); - var s; - s = f().listen((e) { - log.add("+$e"); - s.pause(Future(() {})); - log.add("++$e"); - }, onError: (e) { - completer.complete(new Future.sync(() { - Expect.fail("$e"); - })); - }, onDone: () => completer.complete(null)); - await completer.future; - Expect.listEquals(["-1", "+1", "++1", "-2", "+2", "++2"], log, "pause"); - } - - // Await for-loop pauses between events. - { - var log = []; - Stream f() async* { - log.add("-1"); - yield 1; - log.add("-2"); - yield 2; - } - - await for (var e in f()) { - log.add("+$e"); - await Future(() {}); // One timer tick. - log.add("++$e"); - } - Expect.listEquals(["-1", "+1", "++1", "-2", "+2", "++2"], log, "looppause"); - } - - // Await for-loop break works immediately. - { - var log = []; - Stream f() async* { - try { - log.add("-1"); - yield 1; - log.add("-2"); - yield 2; - log.add("-3"); - yield 3; - } finally { - log.add("x"); - } - } - - await for (var e in f()) { - log.add("+$e"); - await Future(() {}); // One timer tick, pauses function at yield. - log.add("++$e"); - if (e == 2) break; - } - Expect.listEquals( - ["-1", "+1", "++1", "-2", "+2", "++2", "x"], log, "loop-pause-break"); - } - asyncEnd(); -} diff --git a/tests/language_2/async_star/await_for_test.dart b/tests/language_2/async_star/await_for_test.dart deleted file mode 100644 index cef97c1d984..00000000000 --- a/tests/language_2/async_star/await_for_test.dart +++ /dev/null @@ -1,150 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:async'; - -import 'package:async_helper/async_minitest.dart'; - -import 'utils.dart'; - -main() { - test('simple stream', () { - f(s) async { - var r = 0; - await for (var v in s) r += v; - return r; - } - - return f(mkStream(5)).then((v) { - expect(v, equals(10)); - }); - }); - - test('simple stream, await', () { - f(s) async { - var r = 0; - await for (var v in s) r += await Future.microtask(() => v); - return r; - } - - return f(mkStream(5)).then((v) { - expect(v, equals(10)); - }); - }); - - test('simple stream - take', () { - f(s) async { - var r = 0; - await for (var v in s.take(5)) r += v; - return r; - } - - return f(mkStream(10)).then((v) { - expect(v, equals(10)); - }); - }); - - test('simple stream reyield', () { - f(s) async* { - var r = 0; - await for (var v in s) yield r += v; - } - - return expectList(f(mkStream(5)), [0, 1, 3, 6, 10]); - }); - - test('simple stream, await, reyield', () { - f(s) async* { - var r = 0; - await for (var v in s) yield r += await Future.microtask(() => v); - } - - return expectList(f(mkStream(5)), [0, 1, 3, 6, 10]); - }); - - test('simple stream - take, reyield', () { - f(s) async* { - var r = 0; - await for (var v in s.take(5)) yield r += v; - } - - return expectList(f(mkStream(10)), [0, 1, 3, 6, 10]); - }); - - test('nested', () { - f() async { - var r = 0; - await for (var i in mkStream(5)) { - await for (var j in mkStream(3)) { - r += i * j; - } - } - return r; - } - - return f().then((v) { - expect(v, equals((1 + 2 + 3 + 4) * (1 + 2))); - }); - }); - - test('nested, await', () { - f() async { - var r = 0; - await for (var i in mkStream(5)) { - await for (var j in mkStream(3)) { - r += await Future.microtask(() => i * j); - } - } - return r; - } - - return f().then((v) { - expect(v, equals((1 + 2 + 3 + 4) * (1 + 2))); - }); - }); - - test('nested, await * 2', () { - f() async { - var r = 0; - await for (var i in mkStream(5)) { - var ai = await Future.microtask(() => i); - await for (var j in mkStream(3)) { - r += await Future.microtask(() => ai * j); - } - } - return r; - } - - return f().then((v) { - expect(v, equals((1 + 2 + 3 + 4) * (1 + 2))); - }); - }); - - test('await pauses loop', () { - var sc; - var i = 0; - void send() { - if (i == 5) { - sc.close(); - } else { - sc.add(i++); - } - } - - sc = StreamController(onListen: send, onResume: send); - f(s) async { - var r = 0; - await for (var i in s) { - r += await Future.delayed(ms * 10, () => i); - } - return r; - } - - return f(sc.stream).then((v) { - expect(v, equals(10)); - }); - }); -} diff --git a/tests/language_2/async_star/await_pauses_test.dart b/tests/language_2/async_star/await_pauses_test.dart deleted file mode 100644 index cde8a0a21fe..00000000000 --- a/tests/language_2/async_star/await_pauses_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -main() { - var sc; - var i = 0; - void send() { - if (i == 5) { - sc.close(); - } else { - sc.add(i++); - } - } - - sc = new StreamController(onListen: send, onResume: send); - - f(s) async { - var r = 0; - await for (var i in s) { - r += await new Future.delayed(new Duration(milliseconds: 10), () => i); - } - return r; - } - - asyncStart(); - f(sc.stream).then((v) { - Expect.equals(10, v); - asyncEnd(); - }); -} diff --git a/tests/language_2/async_star/basic_test.dart b/tests/language_2/async_star/basic_test.dart deleted file mode 100644 index 92f437dd102..00000000000 --- a/tests/language_2/async_star/basic_test.dart +++ /dev/null @@ -1,155 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:async'; - -import 'package:async_helper/async_minitest.dart'; - -import 'utils.dart'; - -class NotAStream { - listen(oData, {onError, onDone, cancelOnError}) { - fail('Not implementing Stream.'); - } -} - -StreamTransformer getErrors = - StreamTransformer.fromHandlers(handleData: (data, sink) { - fail('Unexpected value'); -}, handleError: (e, s, sink) { - sink.add(e); -}, handleDone: (sink) { - sink.close(); -}); - -// Obscuring identity function. -id(x) { - try { - if (x != null) throw x; - } catch (e) { - return e; - } - return null; -} - -main() { - test('empty', () { - f() async* {} - return f().toList().then((v) { - expect(v, equals([])); - }); - }); - - test('single', () { - f() async* { - yield 42; - } - - return f().toList().then((v) { - expect(v, equals([42])); - }); - }); - - test('call delays', () { - var list = []; - f() async* { - list.add(1); - yield 2; - } - - var res = f().forEach(list.add); - list.add(0); - return res.whenComplete(() { - expect(list, equals([0, 1, 2])); - }); - }); - - test('throws', () { - f() async* { - yield 1; - throw 2; - } - - var completer = Completer(); - var list = []; - f().listen(list.add, - onError: (v) => list.add('$v'), onDone: completer.complete); - return completer.future.whenComplete(() { - expect(list, equals([1, '2'])); - }); - }); - - test('multiple', () { - f() async* { - for (int i = 0; i < 10; i++) { - yield i; - } - } - - return expectList(f(), List.generate(10, id)); - }); - - test('allows await', () { - f() async* { - var x = await Future.value(42); - yield x; - x = await Future.value(42); - } - - return expectList(f(), [42]); - }); - - test('allows await in loop', () { - f() async* { - for (int i = 0; i < 10; i++) { - yield await i; - } - } - - return expectList(f(), List.generate(10, id)); - }); - - test('allows yield*', () { - f() async* { - yield* Stream.fromIterable([1, 2, 3]); - } - - return expectList(f(), [1, 2, 3]); - }); - - test('allows yield* of async*', () { - f(n) async* { - yield n; - if (n == 0) return; - yield* f(n - 1); - yield n; - } - - return expectList(f(3), [3, 2, 1, 0, 1, 2, 3]); - }); - - test('Cannot yield* non-stream', () { - f(Object s) async* { - yield* s; - } - - return f(42).transform(getErrors).single.then((v) { - // Not implementing Stream. - expect(v is Error, isTrue); - }); - }); - - test('Cannot yield* non-stream 2', () { - f(Object s) async* { - yield* s; - } - - return f(NotAStream()).transform(getErrors).single.then((v) { - // Not implementing Stream. - expect(v is Error, isTrue); - }); - }); -} diff --git a/tests/language_2/async_star/cancel_and_throw_in_finally_test.dart b/tests/language_2/async_star/cancel_and_throw_in_finally_test.dart deleted file mode 100644 index 7773af7a684..00000000000 --- a/tests/language_2/async_star/cancel_and_throw_in_finally_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -// When an exception is thrown in the finally block cleaning up after a cancel, -// the future returned from cancel should complete with an error. - -foo() async* { - try { - int i = 0; - while (true) { - yield i++; - } - } finally { - throw "Error"; - } -} - -test() async { - var completer = new Completer(); - var s; - s = foo().listen((e) async { - Expect.equals(0, e); - try { - await s.cancel(); - Expect.fail("Did not throw"); - } catch (e) { - Expect.equals("Error", e); - completer.complete(); - } - }); - await completer.future; -} - -main() { - asyncStart(); - test().then((_) => asyncEnd()); -} diff --git a/tests/language_2/async_star/cancel_test.dart b/tests/language_2/async_star/cancel_test.dart deleted file mode 100644 index 1c01a34c33c..00000000000 --- a/tests/language_2/async_star/cancel_test.dart +++ /dev/null @@ -1,144 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:async'; - -import 'package:async_helper/async_minitest.dart'; - -import 'utils.dart'; - -main() { - // Stream.take(n) automatically cancels after seeing the n'th value. - test('cancels at yield', () { - Completer exits = Completer(); - var list = []; - f() async* { - try { - list.add(0); - list.add(1); - yield null; - list.add(2); - } finally { - exits.complete(3); - } - } - - // No events must be fired synchronously in response to a listen. - var subscription = f().listen((v) { - fail('Received event $v'); - }, onDone: () { - fail('Received done'); - }); - // No events must be delivered after a cancel. - subscription.cancel(); - return exits.future.then((v) { - expect(v, equals(3)); - expect(list, equals([0, 1])); - }); - }); - - test('does cancel eventually', () { - var exits = Completer(); - var list = []; - f() async* { - int i = 0; - try { - while (true) yield i++; - } finally { - list.add('a'); - exits.complete(i); - } - } - - return expectList(f().take(5), [0, 1, 2, 3, 4]) - .then((_) => exits.future) - .then((v) { - expect(v, greaterThan(4)); - expect(list, ['a']); - }); - }); - - group('at index', () { - f() async* { - try { - yield await Future.microtask(() => 1); - } finally { - try { - yield await Future.microtask(() => 2); - } finally { - yield await Future.microtask(() => 3); - } - } - } - - test('- all, sanity check', () { - return expectList(f(), [1, 2, 3]); - }); - test('after end', () { - return expectList(f().take(4), [1, 2, 3]); - }); - test('at end', () { - return expectList(f().take(3), [1, 2, 3]); - }); - test('before end', () { - return expectList(f().take(2), [1, 2]); - }); - test('early', () { - return expectList(f().take(1), [1]); - }); - test('at start', () { - return expectList(f().take(0), []); - }); - }); - - test('regression-fugl/fisk', () { - var res = []; - fisk() async* { - res.add('+fisk'); - try { - for (int i = 0; i < 2; i++) { - yield await Future.microtask(() => i); - } - } finally { - res.add('-fisk'); - } - } - - fugl(int count) async { - res.add('fisk $count'); - try { - await for (int i in fisk().take(count)) res.add(i); - } finally { - res.add('done'); - } - } - - return fugl(3) - .whenComplete(() => fugl(2)) - .whenComplete(() => fugl(1)) - .whenComplete(() { - expect(res, [ - 'fisk 3', - '+fisk', - 0, - 1, - '-fisk', - 'done', - 'fisk 2', - '+fisk', - 0, - 1, - '-fisk', - 'done', - 'fisk 1', - '+fisk', - 0, - '-fisk', - 'done', - ]); - }); - }); -} diff --git a/tests/language_2/async_star/cancel_while_paused_at_yield_test.dart b/tests/language_2/async_star/cancel_while_paused_at_yield_test.dart deleted file mode 100644 index d2c8abb0d65..00000000000 --- a/tests/language_2/async_star/cancel_while_paused_at_yield_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:async'; - -import 'package:async_helper/async_minitest.dart'; - -import 'utils.dart'; - -main() { - test('canceling while paused at yield', () { - var list = []; - var sync = Sync(); - f() async* { - list.add('*1'); - yield 1; - await sync.wait(); - sync.release(); - list.add('*2'); - yield 2; - list.add('*3'); - } - - var stream = f(); - // TODO(jmesserly): added workaround for: - // https://github.com/dart-lang/dev_compiler/issues/269 - var sub = stream.listen((x) => list.add(x)); - return sync.wait().whenComplete(() { - expect(list, equals(['*1', 1])); - sub.pause(); - return sync.wait(); - }).whenComplete(() { - expect(list, equals(['*1', 1, '*2'])); - sub.cancel(); - return Future.delayed(ms * 200, () { - // Should not have yielded 2 or added *3 while paused. - expect(list, equals(['*1', 1, '*2'])); - }); - }); - }); -} diff --git a/tests/language_2/async_star/cancel_while_paused_test.dart b/tests/language_2/async_star/cancel_while_paused_test.dart deleted file mode 100644 index ec9040a33c9..00000000000 --- a/tests/language_2/async_star/cancel_while_paused_test.dart +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2015, 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 - -// This is a regression test for issue 22853. - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -main() { - var list = []; - var sync = new Sync(); - f() async* { - list.add("*1"); - yield 1; - await sync.wait(); - sync.release(); - list.add("*2"); - yield 2; - list.add("*3"); - } - - ; - var stream = f(); - var sub = stream.listen(list.add); - - asyncStart(); - return sync.wait().whenComplete(() { - Expect.listEquals(["*1", 1], list); - sub.pause(); - return sync.wait(); - }).whenComplete(() { - Expect.listEquals(["*1", 1, "*2"], list); - sub.cancel(); - new Future.delayed(new Duration(milliseconds: 200), () { - // Should not have yielded 2 or added *3 while paused. - Expect.listEquals(["*1", 1, "*2"], list); - asyncEnd(); - }); - }); -} - -/** - * Allows two asynchronous executions to synchronize. - * - * Calling [wait] and waiting for the returned future to complete will - * wait for the other executions to call [wait] again. At that point, - * the waiting execution is allowed to continue (the returned future completes), - * and the more recent call to [wait] is now the waiting execution. - */ -class Sync { - Completer _completer = null; - // Release whoever is currently waiting and start waiting yourself. - Future wait([v]) { - if (_completer != null) _completer.complete(v); - _completer = new Completer(); - return _completer.future; - } - - // Release whoever is currently waiting. - void release([v]) { - if (_completer != null) { - _completer.complete(v); - _completer = null; - } - } -} diff --git a/tests/language_2/async_star/concat_test.dart b/tests/language_2/async_star/concat_test.dart deleted file mode 100644 index 793f8b3f2ce..00000000000 --- a/tests/language_2/async_star/concat_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -range(start, end) async* { - for (int i = start; i < end; i++) { - yield i; - } -} - -concat(a, b) async* { - yield* a; - yield* b; -} - -test() async { - Expect.listEquals( - [1, 2, 3, 11, 12, 13], await concat(range(1, 4), range(11, 14)).toList()); -} - -main() { - asyncStart(); - test().then((_) { - asyncEnd(); - }); -} diff --git a/tests/language_2/async_star/covariant_type_test.dart b/tests/language_2/async_star/covariant_type_test.dart deleted file mode 100644 index 47e9789498f..00000000000 --- a/tests/language_2/async_star/covariant_type_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test that TypeErrors for async* methods happen without using returned Stream. - -import 'dart:async'; -import 'package:expect/expect.dart'; - -class D { - // Parametric covariance check is usually compiled into method. - Stream add(T n) async* { - yield n; - } -} - -main() async { - D d = new D(); - Expect.throwsTypeError(() => d.add(4.6)); -} diff --git a/tests/language_2/async_star/dcall_type_test.dart b/tests/language_2/async_star/dcall_type_test.dart deleted file mode 100644 index 972c917f558..00000000000 --- a/tests/language_2/async_star/dcall_type_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test that TypeErrors for async* methods happen without using returned Stream. - -import 'dart:async'; -import 'package:expect/expect.dart'; - -Stream iota(int n) async* { - yield n; -} - -class C { - Stream add(int n) async* { - yield n; - } -} - -main() async { - dynamic f = iota; - Expect.throwsTypeError(() => f('ten')); - Expect.throwsTypeError(() => f(4.7)); - - dynamic o = new C(); - Expect.throwsTypeError(() => o.add('ten')); - Expect.throwsTypeError(() => o.add(4.7)); -} diff --git a/tests/language_2/async_star/error_test.dart b/tests/language_2/async_star/error_test.dart deleted file mode 100644 index 5d279f4dea9..00000000000 --- a/tests/language_2/async_star/error_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2018, 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 - -import "dart:async"; -import "package:async_helper/async_minitest.dart"; - -/// Tests for exceptions raised in async* -main() { - test('async* with Stream.first should complete with an error', () async { - var expectedStack; - Stream foo() async* { - try { - throw 'oops'; - } catch (e, s) { - expectedStack = s; - try { - throw 'oops again!'; - } catch (e2, _) {} - await new Future.error(e, s); - } - yield 42; - } - - try { - await foo().first; - fail('should not get here, an error should be thrown'); - } catch (e, s) { - expect(e, 'oops'); - expect(s, expectedStack); - } - }); -} diff --git a/tests/language_2/async_star/loops_test.dart b/tests/language_2/async_star/loops_test.dart deleted file mode 100644 index 1c65c70616a..00000000000 --- a/tests/language_2/async_star/loops_test.dart +++ /dev/null @@ -1,102 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:async_helper/async_minitest.dart'; - -import 'utils.dart'; - -main() { - test('simple yield', () { - f() async* { - for (int i = 0; i < 3; i++) { - yield i; - } - } - - return expectList(f(), [0, 1, 2]); - }); - - test('yield in double loop', () { - f() async* { - for (int i = 0; i < 3; i++) { - for (int j = 0; j < 2; j++) { - yield i * 2 + j; - } - } - } - - return expectList(f(), [0, 1, 2, 3, 4, 5]); - }); - - test('yield in try body', () { - var list = []; - f() async* { - for (int i = 0; i < 3; i++) { - try { - yield i; - } finally { - list.add('$i'); - } - } - } - - return expectList(f(), [0, 1, 2]).whenComplete(() { - expect(list, equals(['0', '1', '2'])); - }); - }); - - test('yield in catch', () { - var list = []; - f() async* { - for (int i = 0; i < 3; i++) { - try { - throw i; - } catch (e) { - yield e; - } finally { - list.add('$i'); - } - } - } - - return expectList(f(), [0, 1, 2]).whenComplete(() { - expect(list, equals(['0', '1', '2'])); - }); - }); - - test('yield in finally', () { - var list = []; - f() async* { - for (int i = 0; i < 3; i++) { - try { - throw i; - } finally { - yield i; - list.add('$i'); - continue; - } - } - } - - return expectList(f(), [0, 1, 2]).whenComplete(() { - expect(list, equals(['0', '1', '2'])); - }); - }); - - test('keep yielding after cancel', () { - f() async* { - for (int i = 0; i < 10; i++) { - try { - yield i; - } finally { - continue; - } - } - } - - return expectList(f().take(3), [0, 1, 2]); - }); -} diff --git a/tests/language_2/async_star/no_cancel2_test.dart b/tests/language_2/async_star/no_cancel2_test.dart deleted file mode 100644 index 067fccf8489..00000000000 --- a/tests/language_2/async_star/no_cancel2_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2016, 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 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -var events = []; - -var timer; -ticker(period) async* { - var sc; - sc = new StreamController(onListen: () { - events.add("listen"); - timer = new Timer.periodic(period, (_) { - sc.add(null); - }); - }, onCancel: () { - events.add("cancel"); - timer.cancel(); - }); - - try { - var counter = 0; - await for (var tick in sc.stream) { - counter++; - } - } finally { - events.add("finally"); - } -} - -void main() { - asyncStart(); - events.add("main"); - final subscription = - ticker(const Duration(milliseconds: 20)).listen((val) {}); - - bool cancelFinished = false; - new Timer(const Duration(milliseconds: 100), () async { - // Despite the cancel call below, the stream doesn't stop. - // The async* function is not blocked at any await (since the inner timer - // continuously ticks), but since there/ is no yield-point in the function - // it won't cancel. - new Timer(const Duration(milliseconds: 30), () { - Expect.isFalse(cancelFinished); - Expect.listEquals(["main", "listen", "invoke cancel"], events); - timer.cancel(); - asyncEnd(); - }); - - events.add("invoke cancel"); - await subscription.cancel(); - // This line should never be reached, since the cancel-future doesn't - // complete. - cancelFinished = true; - }); -} diff --git a/tests/language_2/async_star/no_cancel_test.dart b/tests/language_2/async_star/no_cancel_test.dart deleted file mode 100644 index 179bdf0539e..00000000000 --- a/tests/language_2/async_star/no_cancel_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2016, 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 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -var events = []; - -ticker() async* { - var sc; - var sentTickCount = 0; - sc = new StreamController(onListen: () { - events.add("listen"); - }, onCancel: () { - events.add("cancel"); - }); - - try { - var counter = 0; - await for (var tick in sc.stream) { - counter++; - } - } finally { - events.add("finally"); - } -} - -void main() { - asyncStart(); - events.add("main"); - final subscription = ticker().listen((val) {}); - - bool cancelFinished = false; - // Cancel the subscription. - // The async* function is blocked on an `await` (the inner stream) and won't - // be able to complete. - Timer.run(() { - events.add("invoke cancel"); - subscription.cancel().then((_) => cancelFinished = true); - }); - - new Timer(const Duration(milliseconds: 100), () { - Expect.isFalse(cancelFinished); - Expect.listEquals(["main", "listen", "invoke cancel"], events); - asyncEnd(); - }); -} diff --git a/tests/language_2/async_star/pause2_test.dart b/tests/language_2/async_star/pause2_test.dart deleted file mode 100644 index f6e8d5fb58f..00000000000 --- a/tests/language_2/async_star/pause2_test.dart +++ /dev/null @@ -1,101 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:async'; - -import 'package:async_helper/async_minitest.dart'; - -import 'utils.dart'; - -main() { - test('pauses execution at yield for at least a microtask', () { - var list = []; - f() async* { - list.add(1); - yield 2; - list.add(3); - yield 4; - list.add(5); - } - - var done = Completer(); - var sub = f().listen((v) { - if (v == 2) { - expect(list, equals([1])); - } else if (v == 4) { - expect(list, equals([1, 3])); - } else { - fail('Unexpected value $v'); - } - }, onDone: () { - expect(list, equals([1, 3, 5])); - done.complete(); - }); - return done.future; - }); - - test('pause stops execution at yield', () { - var list = []; - f() async* { - list.add(1); - yield 2; - list.add(3); - yield 4; - list.add(5); - } - - var done = Completer(); - var sub; - sub = f().listen((v) { - if (v == 2) { - expect(list, equals([1])); - sub.pause(); - Timer(ms * 300, () { - expect(list.length, lessThan(3)); - sub.resume(); - }); - } else if (v == 4) { - expect(list, equals([1, 3])); - } else { - fail('Unexpected value $v'); - } - }, onDone: () { - expect(list, equals([1, 3, 5])); - done.complete(); - }); - return done.future; - }); - - test('pause stops execution at yield 2', () { - var list = []; - f() async* { - int i = 0; - while (true) { - list.add(i); - yield i; - i++; - } - } - - int expected = 0; - var done = Completer(); - var sub; - sub = f().listen((v) { - expect(v, equals(expected++)); - if (v % 5 == 0) { - sub.pause(Future.delayed(ms * 300)); - } else if (v == 17) { - sub.cancel(); - done.complete(); - } - }, onDone: () { - fail('Unexpected done!'); - }); - return done.future.whenComplete(() { - expect(list.length == 18 || list.length == 19, isTrue); - }); - }); -} diff --git a/tests/language_2/async_star/pause_test.dart b/tests/language_2/async_star/pause_test.dart deleted file mode 100644 index fbfe05073c2..00000000000 --- a/tests/language_2/async_star/pause_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2015, 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 async_star_pause_test; - -import "package:async_helper/async_helper.dart"; -import "package:expect/expect.dart"; -import "dart:async"; - -main() { - // await for pauses stream during body. - asyncTest(() async { - // Assumes await-for uses streamIterator. - var log = []; - var s = () async* { - for (int i = 0; i < 3; i++) { - log.add("$i-"); - yield i; - // Should pause here until next iteration of await-for loop. - log.add("$i+"); - } - }(); - await for (var i in s) { - log.add("$i?"); - await nextMicrotask(); - log.add("$i!"); - } - Expect.listEquals([ - "0-", - "0?", - "0!", - "0+", - "1-", - "1?", - "1!", - "1+", - "2-", - "2?", - "2!", - "2+" - ], log); - }); -} - -Future nextMicrotask() => new Future.microtask(() {}); diff --git a/tests/language_2/async_star/regression_2238_test.dart b/tests/language_2/async_star/regression_2238_test.dart deleted file mode 100644 index 515ede1e9d8..00000000000 --- a/tests/language_2/async_star/regression_2238_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2015, 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 - -// This is a regression test for issue 2238 -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -main() { - f() async* { - label1: - label2: - yield 0; - } - - asyncStart(); - f().toList().then((list) { - Expect.listEquals([0], list); - asyncEnd(); - }); -} diff --git a/tests/language_2/async_star/regression_23116_test.dart b/tests/language_2/async_star/regression_23116_test.dart deleted file mode 100644 index e69059c1cfd..00000000000 --- a/tests/language_2/async_star/regression_23116_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2015, 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 - -// Regression test for https://code.google.com/p/dart/issues/detail?id=23116 - -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; -import 'dart:async'; - -Stream foo(Completer completer, Future future) async* { - completer.complete(100); - int x = await future; - Expect.equals(42, x); -} - -test() async { - Completer completer1 = new Completer(); - Completer completer2 = new Completer(); - StreamSubscription s = foo(completer1, completer2.future).listen((v) => null); - await completer1.future; - // At this moment foo is waiting on the given future. - s.pause(); - // Ensure that execution of foo is not resumed - the future is not completed - // yet. - s.resume(); - completer2.complete(42); -} - -main() { - asyncStart(); - test().then((_) => asyncEnd()); -} diff --git a/tests/language_2/async_star/regression_47610_test.dart b/tests/language_2/async_star/regression_47610_test.dart deleted file mode 100644 index 4fd78150f90..00000000000 --- a/tests/language_2/async_star/regression_47610_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2021, 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 - -// Regression test for https://github.com/dart-lang/sdk/issues/47610. -// Tests returning value from a deep context depth along with -// breaking from 'await for'. - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -Stream foo() async* { - for (int i = 0; i < 2; ++i) { - for (int j = 0; j < 2; ++j) { - for (int k = 0; k < 2; ++k) { - yield i + j + k; - } - } - } -} - -void test() async { - await for (var x in foo()) { - Expect.equals(0, x); - break; - } -} - -void main() { - asyncTest(test); -} diff --git a/tests/language_2/async_star/regression_fisk_test.dart b/tests/language_2/async_star/regression_fisk_test.dart deleted file mode 100644 index fe01969e902..00000000000 --- a/tests/language_2/async_star/regression_fisk_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2015, 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 - -// This test may crash dart2js. - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -main() { - var res = []; - fisk() async* { - res.add("+fisk"); - try { - for (int i = 0; i < 2; i++) { - yield await new Future.microtask(() => i); - } - } finally { - res.add("-fisk"); - } - } - - fugl(int count) async { - res.add("fisk $count"); - try { - await for (int i in fisk().take(count)) res.add(i); - } finally { - res.add("done"); - } - } - - asyncStart(); - fugl(3) - .whenComplete(() => fugl(2)) - .whenComplete(() => fugl(1)) - .whenComplete(() { - Expect.listEquals([ - "fisk 3", - "+fisk", - 0, - 1, - "-fisk", - "done", - "fisk 2", - "+fisk", - 0, - 1, - "-fisk", - "done", - "fisk 1", - "+fisk", - 0, - "-fisk", - "done" - ], res); - asyncEnd(); - }); -} diff --git a/tests/language_2/async_star/stream_take_test.dart b/tests/language_2/async_star/stream_take_test.dart deleted file mode 100644 index e8a01c70445..00000000000 --- a/tests/language_2/async_star/stream_take_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -Stream makeStream(int n) async* { - for (int i = 0; i < n; i++) yield i; -} - -main() { - f(Stream s) async { - var r = 0; - await for (var v in s.take(5)) r += v; - return r; - } - - asyncStart(); - f(makeStream(10)).then((v) { - Expect.equals(10, v); - asyncEnd(); - }); -} diff --git a/tests/language_2/async_star/take_reyield_test.dart b/tests/language_2/async_star/take_reyield_test.dart deleted file mode 100644 index c389bec008f..00000000000 --- a/tests/language_2/async_star/take_reyield_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -expectList(actualStream, expectedList) { - return actualStream.toList().then((v) { - Expect.listEquals(expectedList, v); - }); -} - -Stream makeStream(int n) async* { - for (int i = 0; i < n; i++) yield i; -} - -main() { - fivePartialSums(Stream s) async* { - var r = 0; - await for (var v in s.take(5)) yield r += v; - } - - asyncStart(); - expectList(fivePartialSums(makeStream(10)), [0, 1, 3, 6, 10]) - .then(asyncSuccess); -} diff --git a/tests/language_2/async_star/throw_in_catch_test.dart b/tests/language_2/async_star/throw_in_catch_test.dart deleted file mode 100644 index 6a26245b809..00000000000 --- a/tests/language_2/async_star/throw_in_catch_test.dart +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -class Tracer { - final String expected; - final String name; - String _trace = ""; - int counter = 0; - - Tracer(this.expected, [this.name]); - - void trace(msg) { - _trace += msg; - counter++; - } - - void done() { - Expect.equals(expected, _trace); - } -} - -foo1(Tracer tracer) async* { - try { - tracer.trace("a"); - await new Future.value(3); - tracer.trace("b"); - throw "Error"; - } catch (e) { - Expect.equals("Error", e); - tracer.trace("c"); - yield 1; - tracer.trace("d"); - yield 2; - tracer.trace("e"); - yield 3; - tracer.trace("f"); - } finally { - tracer.trace("g"); - } - tracer.trace("h"); -} - -foo2(Tracer tracer) async* { - try { - tracer.trace("a"); - throw "Error"; - } catch (error) { - Expect.equals("Error", error); - tracer.trace("b"); - rethrow; - } finally { - tracer.trace("c"); - } -} - -foo3(Tracer tracer) async* { - try { - tracer.trace("a"); - throw "Error"; - } catch (error) { - Expect.equals("Error", error); - tracer.trace("b"); - rethrow; - } finally { - tracer.trace("c"); - yield 1; - } -} - -foo4(Tracer tracer) async* { - try { - tracer.trace("a"); - await new Future.value(3); - tracer.trace("b"); - throw "Error"; - } catch (e) { - Expect.equals("Error", e); - tracer.trace("c"); - yield 1; - tracer.trace("d"); - yield 2; - tracer.trace("e"); - await new Future.error("Error2"); - } finally { - tracer.trace("f"); - } - tracer.trace("g"); -} - -runTest(test, expectedTrace, expectedError, shouldCancel) { - Tracer tracer = new Tracer(expectedTrace, expectedTrace); - Completer done = new Completer(); - var subscription; - subscription = test(tracer).listen((event) async { - tracer.trace("Y"); - if (shouldCancel) { - await subscription.cancel(); - tracer.trace("C"); - done.complete(null); - } - }, onError: (error) { - Expect.equals(expectedError, error); - tracer.trace("X"); - }, onDone: () { - tracer.done(); - done.complete(null); - }); - return done.future.then((_) => tracer.done()); -} - -test() async { - // TODO(sigurdm): These tests are too dependent on scheduling, and buffering - // behavior. - await runTest(foo1, "abcYgC", null, true); - await runTest(foo2, "abcX", "Error", false); - await runTest(foo3, "abcYX", "Error", false); - await runTest(foo4, "abcYdYefX", "Error2", false); -} - -void main() { - asyncTest(test); -} diff --git a/tests/language_2/async_star/utils.dart b/tests/language_2/async_star/utils.dart deleted file mode 100644 index be8e165c7a9..00000000000 --- a/tests/language_2/async_star/utils.dart +++ /dev/null @@ -1,45 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:async'; - -import 'package:async_helper/async_minitest.dart'; - -const ms = const Duration(milliseconds: 1); - -/// Allows two asynchronous executions to synchronize. -/// -/// Calling [wait] and waiting for the returned future to complete will wait for -/// the other executions to call [wait] again. At that point, the waiting -/// execution is allowed to continue (the returned future completes), and the -/// more resent call to [wait] is now the waiting execution. -class Sync { - Completer _completer = null; - // Release whoever is currently waiting and start waiting yourself. - Future wait([v]) { - if (_completer != null) _completer.complete(v); - _completer = Completer(); - return _completer.future; - } - - // Release whoever is currently waiting. - void release([v]) { - if (_completer != null) { - _completer.complete(v); - _completer = null; - } - } -} - -expectList(stream, list) { - return stream.toList().then((v) { - expect(v, equals(list)); - }); -} - -mkStream(int n) async* { - for (int i = 0; i < n; i++) yield i; -} diff --git a/tests/language_2/async_star/void_async_star_test.dart b/tests/language_2/async_star/void_async_star_test.dart deleted file mode 100644 index 79bc14f4df9..00000000000 --- a/tests/language_2/async_star/void_async_star_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// 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. - -// @dart = 2.9 - -// It is an error for an `async*` function to have return type `void`. - -import 'dart:async'; - -/*space*/ void f1() async* { - // ^^^^ - // [analyzer] unspecified - // [cfe] unspecified -} - -class C { - static void f2() async* { - // ^^^^ - // [analyzer] unspecified - // [cfe] unspecified - } - - /*space*/ void f3() async* { - // ^^^^ - // [analyzer] unspecified - // [cfe] unspecified - } -} - -void main() { - /*space*/ void f4() async* { - // ^^^^ - // [analyzer] unspecified - // [cfe] unspecified - } - - // No function literal: It is probably not possible to infer the - // return type `void` for a function literal marked `async*`. -} diff --git a/tests/language_2/async_star/yield_expressions_test.dart b/tests/language_2/async_star/yield_expressions_test.dart deleted file mode 100644 index 9d6527dc09b..00000000000 --- a/tests/language_2/async_star/yield_expressions_test.dart +++ /dev/null @@ -1,179 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:async_helper/async_minitest.dart'; - -import 'utils.dart'; - -main() { - test('local variable', () { - f() async* { - var x = 42; - yield x; - } - - return expectList(f(), [42]); - }); - - test('constant variable', () { - f() async* { - const x = 42; - yield x; - } - - return expectList(f(), [42]); - }); - - test('function call', () { - g() => 42; - f() async* { - yield g(); - } - - return expectList(f(), [42]); - }); - - test('unary operator', () { - f() async* { - var x = -42; - yield -x; - } - - return expectList(f(), [42]); - }); - - test('binary operator', () { - f() async* { - var x = 21; - yield x + x; - } - - return expectList(f(), [42]); - }); - - test('ternary operator', () { - f() async* { - var x = 21; - yield x == 21 ? x + x : x; - } - - return expectList(f(), [42]); - }); - - test('suffix post-increment', () { - f() async* { - var x = 42; - yield x++; - } - - return expectList(f(), [42]); - }); - - test('suffix pre-increment', () { - f() async* { - var x = 41; - yield ++x; - } - - return expectList(f(), [42]); - }); - - test('assignment', () { - f() async* { - var x = 37; - yield x = 42; - } - - return expectList(f(), [42]); - }); - - test('assignment op', () { - f() async* { - var x = 41; - yield x += 1; - } - - return expectList(f(), [42]); - }); - - test('await', () { - f() async* { - yield await Future.value(42); - } - - return expectList(f(), [42]); - }); - - test('index operator', () { - f() async* { - var x = [42]; - yield x[0]; - } - - return expectList(f(), [42]); - }); - - test('function expression block', () { - var o = Object(); - f() async* { - yield () { - return o; - }; - } - - return f().first.then((v) { - expect(v(), same(o)); - }); - }); - - test('function expression arrow', () { - var o = Object(); - f() async* { - yield () => o; - } - - return f().first.then((v) { - expect(v(), same(o)); - }); - }); - - test('function expression block async', () { - var o = Object(); - f() async* { - yield () async { - return o; - }; - } - - return f().first.then((v) => v()).then((v) { - expect(v, same(o)); - }); - }); - - test('function expression arrow async', () { - var o = Object(); - f() async* { - yield () async => o; - } - - return f().first.then((v) => v()).then((v) { - expect(v, same(o)); - }); - }); - - test('function expression block async*', () { - var o = Object(); - f() async* { - yield () async* { - yield o; - }; - } - - return f().first.then((v) => v().first).then((v) { - expect(v, same(o)); - }); - }); -} diff --git a/tests/language_2/async_star/yield_from_catch_test.dart b/tests/language_2/async_star/yield_from_catch_test.dart deleted file mode 100644 index 3af2d083b67..00000000000 --- a/tests/language_2/async_star/yield_from_catch_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Test for issue: https://github.com/dart-lang/sdk/issues/39994 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -Stream testStream() async* { - try { - await testThrow(); - yield "A"; - } catch (e) { - yield "B"; - yield "C"; - yield "D"; - } -} - -testThrow() async { - throw Exception(); -} - -test() async { - var result = await testStream().toList(); - Expect.listEquals(["B", "C", "D"], result); -} - -main() { - asyncTest(test); -} diff --git a/tests/language_2/async_star/yield_statement_context_test.dart b/tests/language_2/async_star/yield_statement_context_test.dart deleted file mode 100644 index 7e64c9b05d1..00000000000 --- a/tests/language_2/async_star/yield_statement_context_test.dart +++ /dev/null @@ -1,209 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:async_helper/async_minitest.dart'; - -import 'utils.dart'; - -void main() { - test('plain', () { - f() async* { - yield 0; - } - - return expectList(f(), [0]); - }); - - test('if-then-else', () { - f(b) async* { - if (b) - yield 0; - else - yield 1; - } - - return expectList(f(true), [0]).whenComplete(() { - expectList(f(false), [1]); - }); - }); - - test('block', () { - f() async* { - yield 0; - { - yield 1; - } - yield 2; - } - - return expectList(f(), [0, 1, 2]); - }); - - test('labeled', () { - f() async* { - label1: - yield 0; - } - - return expectList(f(), [0]); - }); - - test('two labels on same line', () { - f() async* { - // DO NOT RUN dart format on this file. The labels should be on the same. - // line. Originally VM issue #2238. - label1: label2: yield 0; - } - - return expectList(f(), [0]); - }); - - test('for-loop', () { - f() async* { - for (int i = 0; i < 3; i++) yield i; - } - - return expectList(f(), [0, 1, 2]); - }); - - test('for-in-loop', () { - f() async* { - for (var i in [0, 1, 2]) yield i; - } - - return expectList(f(), [0, 1, 2]); - }); - - test('await for-in-loop', () { - f() async* { - await for (var i in Stream.fromIterable([0, 1, 2])) yield i; - } - - return expectList(f(), [0, 1, 2]); - }); - - test('while-loop', () { - f() async* { - int i = 0; - while (i < 3) yield i++; - } - - return expectList(f(), [0, 1, 2]); - }); - - test('do-while-loop', () { - f() async* { - int i = 0; - do yield i++; while (i < 3); - } - - return expectList(f(), [0, 1, 2]); - }); - - test('try-catch-finally', () { - f() async* { - try { - yield 0; - } catch (e) { - yield 1; - } finally { - yield 2; - } - } - - return expectList(f(), [0, 2]); - }); - - test('try-catch-finally 2', () { - f() async* { - try { - yield throw 0; - } catch (e) { - yield 1; - } finally { - yield 2; - } - } - - return expectList(f(), [1, 2]); - }); - - test('switch-case', () { - f(v) async* { - switch (v) { - case 0: - yield 0; - continue label1; - label1: - case 1: - yield 1; - break; - default: - yield 2; - } - } - - return expectList(f(0), [0, 1]).whenComplete(() { - return expectList(f(1), [1]); - }).whenComplete(() { - return expectList(f(2), [2]); - }); - }); - - test('dead-code return', () { - f() async* { - return; - yield 1; - } - - return expectList(f(), []); - }); - - test('dead-code throw', () { - f() async* { - try { - throw 0; - yield 1; - } catch (_) {} - } - - return expectList(f(), []); - }); - - test('dead-code break', () { - f() async* { - while (true) { - break; - yield 1; - } - } - - return expectList(f(), []); - }); - - test('dead-code break 2', () { - f() async* { - label: - { - break label; - yield 1; - } - } - - return expectList(f(), []); - }); - - test('dead-code continue', () { - f() async* { - do { - continue; - yield 1; - } while (false); - } - - return expectList(f(), []); - }); -} diff --git a/tests/language_2/async_star/yield_test.dart b/tests/language_2/async_star/yield_test.dart deleted file mode 100644 index 081174fe2c8..00000000000 --- a/tests/language_2/async_star/yield_test.dart +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -Stream foo1() async* { - yield 1; - var p = await new Future.value(10); - yield p + 10; -} - -Stream foo2() async* { - int i = 0; - while (true) { - await (new Future.delayed(new Duration(milliseconds: 0), () {})); - if (i > 10) return; - yield i; - i++; - } -} - -Stream foo3(p) async* { - int i = 0; - bool t = false; - yield null; - while (true) { - i++; - a: - for (int i = 0; i < p; i++) { - if (!t) { - for (int j = 0; j < 3; j++) { - yield -1; - t = true; - break a; - } - } - await 4; - yield i; - } - } -} - -Completer finalized = new Completer(); - -Stream foo4() async* { - int i = 0; - try { - while (true) { - yield i; - i++; - } - } finally { - // Canceling the stream-subscription should run the finalizer. - finalized.complete(true); - } -} - -test() async { - Expect.listEquals([1, 20], await (foo1().toList())); - Expect.listEquals([0, 1, 2, 3], await (foo2().take(4).toList())); - Expect.listEquals( - [null, -1, 0, 1, 2, 3, 0, 1, 2, 3], await (foo3(4).take(10).toList())); - Expect.listEquals( - [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], await (foo4().take(10).toList())); - Expect.isTrue(await (finalized.future)); -} - -main() { - asyncStart(); - test().then((_) { - asyncEnd(); - }); -} diff --git a/tests/language_2/async_star/yieldstar_test.dart b/tests/language_2/async_star/yieldstar_test.dart deleted file mode 100644 index 23647a49452..00000000000 --- a/tests/language_2/async_star/yieldstar_test.dart +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -Stream subStream(p) async* { - yield p; - yield p + 1; -} - -Stream foo(Completer finalized) async* { - int i = 0; - try { - while (true) { - yield "outer"; - yield* subStream(i); - i++; - } - } finally { - // See that we did not run too many iterations. - Expect.isTrue(i < 10); - // Canceling the stream-subscription should run the finalizer. - finalized.complete(true); - } -} - -foo2(Stream subStream) async* { - yield* subStream; -} - -test() async { - Expect.listEquals([0, 1], await (subStream(0).toList())); - Completer finalized = new Completer(); - Expect.listEquals(["outer", 0, 1, "outer", 1, 2, "outer", 2], - await (foo(finalized).take(8).toList())); - Expect.isTrue(await (finalized.future)); - - finalized = new Completer(); - // Canceling the stream while it is yield*-ing from the sub-stream. - Expect.listEquals(["outer", 0, 1, "outer", 1, 2, "outer"], - await (foo(finalized).take(7).toList())); - Expect.isTrue(await (finalized.future)); - finalized = new Completer(); - - Completer pausedCompleter = new Completer(); - Completer resumedCompleter = new Completer(); - Completer canceledCompleter = new Completer(); - - StreamController controller; - int i = 0; - addNext() { - if (i >= 10) return; - controller.add(i); - i++; - if (!controller.isPaused) { - scheduleMicrotask(addNext); - } - } - - controller = new StreamController(onListen: () { - scheduleMicrotask(addNext); - }, onPause: () { - pausedCompleter.complete(true); - }, onResume: () { - resumedCompleter.complete(true); - scheduleMicrotask(addNext); - }, onCancel: () { - canceledCompleter.complete(true); - }); - - StreamSubscription subscription; - // Test that the yield*'ed stream is paused and resumed. - subscription = foo2(controller.stream).listen((event) { - if (event == 2) { - subscription.pause(); - scheduleMicrotask(() { - subscription.resume(); - }); - } - if (event == 5) { - subscription.cancel(); - } - }); - // Test that the yield*'ed streamSubscription is paused, resumed and canceled - // by the async* stream. - Expect.isTrue(await pausedCompleter.future); - Expect.isTrue(await resumedCompleter.future); - Expect.isTrue(await canceledCompleter.future); -} - -main() { - asyncStart(); - test().then((_) { - asyncEnd(); - }); -} diff --git a/tests/language_2/await/and_ifnull_test.dart b/tests/language_2/await/and_ifnull_test.dart deleted file mode 100644 index b1ec0cf24db..00000000000 --- a/tests/language_2/await/and_ifnull_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2017, 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 - -import 'dart:async'; -import 'package:expect/expect.dart'; - -Future foo(bool x) async => x ? "foo" : null; - -Future bar(bool x) async { - return ((await foo(x)) ?? "bar").toUpperCase(); -} - -main() async { - Expect.equals(await bar(true), "FOO"); - Expect.equals(await bar(false), "BAR"); -} diff --git a/tests/language_2/await/await_test.dart b/tests/language_2/await/await_test.dart deleted file mode 100644 index 22aa1833ce4..00000000000 --- a/tests/language_2/await/await_test.dart +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) 2014, 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 - -// VMOptions=---optimization-counter-threshold=10 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; - -import 'dart:async'; - -int globalVariable = 1; -int topLevelFoo(int param) => 1; -int get topLevelGetter => globalVariable; -void set topLevelSetter(val) { - globalVariable = val; -} - -class C { - static int staticField = 1; - static int get staticGetter => staticField; - static void set staticSetter(val) { - staticField = val; - } - - static int staticFoo(int param) => param; - - int field = 1; - int get getter => field; - void set setter(val) { - field = val; - } - - int foo(int param) => param; -} - -dummy() => 1; - -staticMembers() async { - var a = C.staticField + await dummy(); - Expect.equals(a, 2); - var f = (C.staticField = 1) + await dummy(); - Expect.equals(f, 2); - var b = C.staticGetter + await dummy(); - Expect.equals(b, 2); - var c = (C.staticSetter = 1) + await dummy(); - Expect.equals(c, 2); - var d = C.staticFoo(2) + await dummy(); - Expect.equals(d, 3); - var e = C.staticField + - C.staticGetter + - (C.staticSetter = 1) + - C.staticFoo(1) + - await dummy(); - Expect.equals(e, 5); -} - -topLevelMembers() async { - var a = globalVariable + await dummy(); - Expect.equals(a, 2); - var b = topLevelGetter + await dummy(); - Expect.equals(b, 2); - var c = (topLevelSetter = 1) + await dummy(); - Expect.equals(c, 2); - var d = topLevelFoo(1) + await dummy(); - Expect.equals(d, 2); - var e = globalVariable + - topLevelGetter + - (topLevelSetter = 1) + - topLevelFoo(1) + - await dummy(); - Expect.equals(e, 5); -} - -instanceMembers() async { - var inst = new C(); - var a = inst.field + await dummy(); - Expect.equals(a, 2); - var b = inst.getter + await dummy(); - Expect.equals(b, 2); - var c = (inst.setter = 1) + await dummy(); - Expect.equals(c, 2); - var d = inst.foo(1) + await dummy(); - Expect.equals(d, 2); - var e = inst.field + - inst.getter + - (inst.setter = 1) + - inst.foo(1) + - await dummy(); - Expect.equals(e, 5); -} - -others() async { - var a = "${globalVariable} ${await dummy()} " + await "someString"; - Expect.equals(a, "1 1 someString"); - var c = new C(); - var d = c.field + await dummy(); - var cnt = 2; - var b = [1, 2, 3]; - b[cnt] = await dummy(); - Expect.equals(b[cnt], 1); - var e = b[0] + await dummy(); - Expect.equals(e, 2); -} - -conditionals() async { - var a = false; - var b = true; - var c = (a || b) || await dummy(); - Expect.isTrue(c); - var d = (a || b) ? a : await dummy(); - Expect.isFalse(d); - var e = (a is int) ? await dummy() : 2; - Expect.equals(e, 2); - try { - var f = (a is int) ? await dummy() : 2; - } catch (e) {} -} - -asserts() async { - for (final FutureOr Function(T) func in [id, future]) { - assert(await func(true)); - assert(id(true), await func("message")); - assert(await func(true), await (func("message"))); - bool success = true; - try { - assert(await func(false), await (func("message"))); - if (assertStatementsEnabled) Expect.fail("Didn't throw"); - } on AssertionError catch (e) { - Expect.equals("message", e.message); - } - } -} - -controlFlow() async { - for (final FutureOr Function(T) func in [id, future]) { - // For. - var c = 0; - for (var i = await (func(0)); await func(i < 5); await func(i++)) { - c++; - } - Expect.equals(5, c); - // While. - c = 0; - while (await func(c < 5)) c++; - Expect.equals(5, c); - // Do-while. - c = 0; - do { - c++; - } while (await func(c < 5)); - Expect.equals(5, c); - // If. - if (await func(c == 5)) { - Expect.equals(5, c); - } else { - Expect.fail("unreachable"); - } - // Throw. - try { - throw await func("string"); - } on String { - // OK. - } - - try { - await (throw "string"); - } on String { - // OK. - } - // Try/catch/finally - try { - try { - throw "string"; - } catch (e) { - Expect.equals("string", e); - Expect.equals(0, await func(0)); - rethrow; - } finally { - Expect.equals(0, await func(0)); - } - } catch (e) { - Expect.equals(0, await func(0)); - Expect.equals("string", e); - } finally { - Expect.equals(0, await func(0)); - } - // Switch - switch (await func(2)) { - case 2: - break; - default: - Expect.fail("unreachable"); - } - // Return. - Expect.equals( - 42, - await () async { - return await func(42); - }()); - Expect.equals( - 42, - await () async { - return func(42); - }()); - // Yield. - Stream testStream1() async* { - yield await func(42); - } - - Expect.listEquals([42], await testStream1().toList()); - // Yield* - Stream testStream2() async* { - yield* await func(intStream()); - } - - Expect.listEquals([42], await testStream2().toList()); - } -} - -FutureOr future(T value) async => value; -FutureOr id(T value) => value; - -Stream intStream() async* { - yield 42; -} - -main() { - asyncStart(); - for (int i = 0; i < 11; i++) { - asyncTest(staticMembers); - asyncTest(topLevelMembers); - asyncTest(instanceMembers); - asyncTest(conditionals); - asyncTest(others); - asyncTest(asserts); - asyncTest(controlFlow); - } - asyncEnd(); -} diff --git a/tests/language_2/await/backwards_compatibility_runtime_test.dart b/tests/language_2/await/backwards_compatibility_runtime_test.dart deleted file mode 100644 index c755f58b403..00000000000 --- a/tests/language_2/await/backwards_compatibility_runtime_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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:async'; - -import 'package:expect/expect.dart'; - -get await => 4; - -// For functions that are declared with the async modifier we treat await as -// keyword. - -test0() async { - var x = await 7; - Expect.equals(7, x); - -} - -test1() async { - var x = await 9; - Expect.equals(9, x); - -} - -// For functions that are not declared with the async modifier we allow await to -// be used as an identifier. - -test2() { - var y = await; - Expect.equals(4, y); - -} - -test3() { - var await = 3; - Expect.equals(3, await); - -} - -main() { - test0(); - test1(); - test2(); - test3(); -} diff --git a/tests/language_2/await/backwards_compatibility_test.dart b/tests/language_2/await/backwards_compatibility_test.dart deleted file mode 100644 index f8960bcc6f4..00000000000 --- a/tests/language_2/await/backwards_compatibility_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'dart:async'; - -import 'package:expect/expect.dart'; - -get await => 4; - -// For functions that are declared with the async modifier we treat await as -// keyword. - -test0() async { - var x = await 7; - Expect.equals(7, x); - var await = 1; - // ^^^^^ - // [analyzer] SYNTACTIC_ERROR.ASYNC_KEYWORD_USED_AS_IDENTIFIER - // [cfe] 'await' can't be used as an identifier in 'async', 'async*', or 'sync*' methods. -} - -test1() async { - var x = await 9; - Expect.equals(9, x); - var y = await; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] Expected an identifier, but got ';'. -} - -// For functions that are not declared with the async modifier we allow await to -// be used as an identifier. - -test2() { - var y = await; - Expect.equals(4, y); - var x = await 1; - // ^^^^^ - // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN - // [cfe] Expected ';' after this. -} - -test3() { - var await = 3; - Expect.equals(3, await); - var x = await 1; - // ^^^^^ - // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN - // [cfe] Expected ';' after this. -} - -main() { - test0(); - test1(); - test2(); - test3(); -} diff --git a/tests/language_2/await/exceptions_test.dart b/tests/language_2/await/exceptions_test.dart deleted file mode 100644 index 5057f7d6870..00000000000 --- a/tests/language_2/await/exceptions_test.dart +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) 2014, 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 - -// VMOptions=--optimization-counter-threshold=20 - -import 'package:expect/expect.dart'; -import "package:async_helper/async_helper.dart"; - -import 'dart:async'; - -// It does not matter where a future is generated. -bar(p) async => p; -baz(p) => new Future(() => p); - -test0_1() async { - throw 1; -} - -test0() async { - try { - await test0_1(); - } catch (e) { - Expect.equals(1, e); - } -} - -test1_1() async { - throw 1; -} - -test1_2() async { - try { - await test1_1(); - } catch (e) { - throw e + 1; - } -} - -test1() async { - try { - await test1_2(); - } catch (e) { - Expect.equals(2, e); - } -} - -test2() async { - var x; - var test2_1 = () async { - try { - throw 'a'; - } catch (e) { - throw e + 'b'; - } - }; - try { - try { - await test2_1(); - } catch (e) { - var y = await bar(e + 'c'); - throw y; - } - } catch (e) { - x = e + 'd'; - return '?'; - } finally { - return x; - } - return '!'; -} - -test() async { - var result; - for (int i = 0; i < 10; i++) { - await test0(); - await test1(); - result = await test2(); - Expect.equals('abcd', result); - } - await 1; -} - -foo() { - throw "Error"; -} - -awaitFoo() async { - await foo(); -} - -main() { - asyncStart(); - test() - .then((_) => awaitFoo().then((_) => Expect.fail("Should have thrown"), - onError: (error) => Expect.equals("Error", error))) - .whenComplete(asyncEnd); -} diff --git a/tests/language_2/await/for_cancel_test.dart b/tests/language_2/await/for_cancel_test.dart deleted file mode 100644 index 981c7b64752..00000000000 --- a/tests/language_2/await/for_cancel_test.dart +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 2014, 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 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -bool canceled; - -test1() async { - canceled = false; - try { - StreamController controller = infiniteStreamController(); - outer: - while (true) { - await for (var x in controller.stream) { - for (int j = 0; j < 10; j++) { - if (j == 5) break outer; - } - } - } - } finally { - Expect.isTrue(canceled); - } -} - -test2() async { - canceled = false; - try { - StreamController controller = infiniteStreamController(); - bool first = true; - outer: - while (true) { - if (first) { - first = false; - } else { - break; - } - await for (var x in controller.stream) { - for (int j = 0; j < 10; j++) { - if (j == 5) continue outer; - } - } - } - } finally { - Expect.isTrue(canceled); - } -} - -test() async { - await test1(); - await test2(); -} - -main() { - asyncStart(); - test().then((_) { - asyncEnd(); - }); -} - -// Create a stream that produces numbers [1, 2, ... ] -StreamController infiniteStreamController() { - StreamController controller; - Timer timer; - int counter = 0; - - void tick() { - if (controller.isPaused) { - return; - } - if (canceled) { - return; - } - counter++; - controller.add(counter); // Ask stream to send counter values as event. - Timer.run(tick); - } - - void startTimer() { - Timer.run(tick); - } - - controller = new StreamController( - onListen: startTimer, - onResume: startTimer, - onCancel: () { - canceled = true; - }); - - return controller; -} diff --git a/tests/language_2/await/for_test.dart b/tests/language_2/await/for_test.dart deleted file mode 100644 index da1c7e278dd..00000000000 --- a/tests/language_2/await/for_test.dart +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) 2014, 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. - -// VMOptions= -// VMOptions=--stress_write_barrier_elimination - -// @dart = 2.9 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -class Trace { - String trace = ""; - record(x) { - trace += x.toString(); - } - - toString() => trace; -} - -Stream makeMeAStream() { - return timedCounter(5); -} - -Trace t1 = new Trace(); - -Future consumeOne() async { - // Equivalent to await for (x in makeMeAStream()) { ... } - var s = makeMeAStream(); - var it = new StreamIterator(s); - while (await it.moveNext()) { - var x = it.current; - t1.record(x); - } - t1.record("X"); -} - -Trace t2 = new Trace(); - -Future consumeTwo() async { - await for (var x in makeMeAStream()) { - t2.record(x); - } - t2.record("Y"); -} - -Trace t3 = new Trace(); - -Future consumeNested() async { - await for (var x in makeMeAStream()) { - t3.record(x); - await for (var y in makeMeAStream()) { - t3.record(y); - } - t3.record("|"); - } - t3.record("Z"); -} - -Trace t4 = new Trace(); - -Future consumeSomeOfInfinite() async { - int i = 0; - await for (var x in infiniteStream()) { - i++; - if (i > 10) break; - t4.record(x); - } - t4.record("U"); -} - -main() { - var f1 = consumeOne(); - t1.record("T1:"); - - var f2 = consumeTwo(); - t2.record("T2:"); - - var f3 = consumeNested(); - t3.record("T3:"); - - var f4 = consumeSomeOfInfinite(); - t4.record("T4:"); - - asyncStart(); - Future.wait([f1, f2, f3, f4]).then((_) { - Expect.equals("T1:12345X", t1.toString()); - Expect.equals("T2:12345Y", t2.toString()); - Expect.equals("T3:112345|212345|312345|412345|512345|Z", t3.toString()); - Expect.equals("T4:12345678910U", t4.toString()); - asyncEnd(); - }); -} - -// Create a stream that produces numbers [1, 2, ... maxCount] -Stream timedCounter(int maxCount) { - StreamController controller; - Timer timer; - int counter = 0; - - void tick(_) { - counter++; - controller.add(counter); // Ask stream to send counter values as event. - if (counter >= maxCount) { - timer.cancel(); - controller.close(); // Ask stream to shut down and tell listeners. - } - } - - void startTimer() { - timer = new Timer.periodic(const Duration(milliseconds: 10), tick); - } - - void stopTimer() { - if (timer != null) { - timer.cancel(); - timer = null; - } - } - - controller = new StreamController( - onListen: startTimer, - onPause: stopTimer, - onResume: startTimer, - onCancel: stopTimer); - - return controller.stream; -} - -// Create a stream that produces numbers [1, 2, ... ] -Stream infiniteStream() { - StreamController controller; - Timer timer; - int counter = 0; - - void tick(_) { - counter++; - controller.add(counter); // Ask stream to send counter values as event. - } - - void startTimer() { - timer = new Timer.periodic(const Duration(milliseconds: 10), tick); - } - - void stopTimer() { - if (timer != null) { - timer.cancel(); - timer = null; - } - } - - controller = new StreamController( - onListen: startTimer, - onPause: stopTimer, - onResume: startTimer, - onCancel: stopTimer); - - return controller.stream; -} diff --git a/tests/language_2/await/for_use_local_test.dart b/tests/language_2/await/for_use_local_test.dart deleted file mode 100644 index 2b72662b0c9..00000000000 --- a/tests/language_2/await/for_use_local_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -sumStream(s) async { - int accum = 0; - await for (var v in s) { - accum += v; - } - return accum; -} - -test() async { - var countStreamController; - int i = 0; - void tick() { - if (i < 10) { - countStreamController.add(i); - i++; - scheduleMicrotask(tick); - } else { - countStreamController.close(); - } - } - - countStreamController = new StreamController(onListen: () { - scheduleMicrotask(tick); - }); - Expect.equals(45, await sumStream(countStreamController.stream)); -} - -void main() { - asyncStart(); - test().then((_) => asyncEnd()); -} diff --git a/tests/language_2/await/future_test.dart b/tests/language_2/await/future_test.dart deleted file mode 100644 index 67af0b259fa..00000000000 --- a/tests/language_2/await/future_test.dart +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright (c) 2014, 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 - -// VMOptions= -// VMOptions=--optimization-counter-threshold=20 - -import 'package:expect/expect.dart'; -import "package:async_helper/async_helper.dart"; - -import 'dart:async'; - -// It does not matter where a future is generated. -bar(p) async => p; -baz(p) => new Future(() => p); - -foo() async { - var b = 0; - for (int i = 0; i < 10; i++) { - b += (await bar(1)) + (await baz(2)); - } - return b; -} - -faa() async => (await bar('faa')).length; - -quaz(p) async { - var x = 0; - try { - for (var j = 0; j < 10; j++) { - x += await baz(j); - } - return x; - } finally { - Expect.equals(x, 45); - return p; - } -} - -quazz() async { - var x = 0; - try { - try { - x = await bar(1); - throw x; - } catch (e1) { - var y = await baz(e1 + 1); - throw y; - } - } catch (e2) { - return e2; - } -} - -nesting() async { - try { - try { - var x = 1; - var y = () async { - try { - var z = (await bar(3)) + x; - throw z; - } catch (e1) { - return e1; - } - }; - var a = await y(); - throw a; - } catch (e2) { - throw e2 + 1; - } - } catch (e3) { - return e3; - } -} - -awaitAsUnary(a, b) async { - return await a + await b; -} - -awaitIf(p) async { - if (p < (await bar(5))) { - return "p<5"; - } else { - return "p>=5"; - } -} - -awaitNestedIf(p, q) async { - if (p == (await bar(5))) { - if (q < (await bar(7))) { - return "q<7"; - } else { - return "q>=7"; - } - } else { - return "p!=5"; - } - return "!"; -} - -awaitElseIf(p) async { - if (p > (await bar(5))) { - return "p>5"; - } else if (p < (await bar(5))) { - return "p<5"; - } else { - return "p==5"; - } - return "!"; -} - -awaitReturn() async { - return await bar(17); -} - -awaitSwitch() async { - switch (await bar(3)) { - case 1: - return 1; - break; - case 3: - return 3; - break; - default: - return -1; - } -} - -awaitNestedWhile(int i, int j) async { - int savedJ = j; - var decI = () async { - return i--; - }; - var decJ = () async { - return j--; - }; - var k = 0; - while ((await decI()) > 0) { - j = savedJ; - while (0 < (await decJ())) { - k++; - } - } - return k; -} - -awaitNestedDoWhile(int i, int j) async { - int savedJ = j; - var decI = () async { - return i--; - }; - var decJ = () async { - return j--; - }; - var k = 0; - do { - do { - k++; - } while (0 < (await decI())); - } while ((await decJ()) > 0); - return k; -} - -awaitFor() async { - var asyncInc = (p) async => p + 1; - var k = 0; - for (int j = (await bar(0)), i = (await bar(1)); - j < (await bar(5)); - j = (await asyncInc(j)), i = (await asyncInc(i))) { - k += i; - k += j; - } - return k; -} - -awaitForIn() async { - var list = ['a', 'b', 'c']; - var k = ''; - for (var c in (await bar(list))) { - k += c; - } - return k; -} - -test() async { - var result; - for (int i = 0; i < 10; i++) { - result = await foo(); - Expect.equals(30, result); - result = await faa(); - Expect.equals(3, result); - result = await quaz(17); - Expect.equals(17, result); - result = await quazz(); - Expect.equals(2, result); - result = await nesting(); - Expect.equals(5, result); - result = await awaitIf(3); - Expect.equals("p<5", result); - result = await awaitIf(5); - Expect.equals("p>=5", result); - result = await awaitNestedIf(5, 3); - Expect.equals("q<7", result); - result = await awaitNestedIf(5, 8); - Expect.equals("q>=7", result); - result = await awaitNestedIf(3, 8); - Expect.equals("p!=5", result); - result = await awaitReturn(); - Expect.equals(17, result); - result = await awaitSwitch(); - Expect.equals(3, result); - result = await awaitElseIf(6); - Expect.equals("p>5", result); - result = await awaitElseIf(4); - Expect.equals("p<5", result); - result = await awaitElseIf(5); - Expect.equals("p==5", result); - result = await awaitNestedWhile(5, 3); - Expect.equals(15, result); - result = await awaitNestedWhile(4, 6); - Expect.equals(24, result); - result = await awaitAsUnary(bar(1), bar(2)); - Expect.equals(3, result); - result = await awaitFor(); - Expect.equals(25, result); - result = await awaitForIn(); - Expect.equals('abc', result); - } -} - -main() { - asyncStart(); - test().then((_) { - asyncEnd(); - }); -} diff --git a/tests/language_2/await/in_cascade_test.dart b/tests/language_2/await/in_cascade_test.dart deleted file mode 100644 index 86bda2a834c..00000000000 --- a/tests/language_2/await/in_cascade_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'dart:async'; -import 'package:expect/expect.dart'; - -class C { - Future> m() async => []..add(await _m()); - Future _m() async => 42; -} - -main() async { - Expect.equals((await new C().m()).first, 42); -} diff --git a/tests/language_2/await/nonfuture_test.dart b/tests/language_2/await/nonfuture_test.dart deleted file mode 100644 index 26c64d5284d..00000000000 --- a/tests/language_2/await/nonfuture_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2014, 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 - -// VMOptions=--optimization-counter-threshold=20 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; - -var X = 0; - -foo() async { - Expect.equals(X, 0); - await 5; - Expect.equals(X, 10); - return await 499; -} - -main() { - asyncStart(); - var f = foo(); - f.then((res) { - Expect.equals(499, res); - asyncEnd(); - }); - X = 10; -} diff --git a/tests/language_2/await/null_aware_test.dart b/tests/language_2/await/null_aware_test.dart deleted file mode 100644 index 9c6b273da77..00000000000 --- a/tests/language_2/await/null_aware_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2015, 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 - -// Regression test for issue dartbug.com/24392 - -import 'package:expect/expect.dart'; -import 'dart:async'; - -Future f() async { - // Unreachable. - Expect.isTrue(false); -} - -main() async { - int x = 1; - x ??= await f(); - Expect.equals(1, x); - - int y = 1; - y = y ?? await f(); - Expect.equals(1, y); -} diff --git a/tests/language_2/await/postfix_expr_test.dart b/tests/language_2/await/postfix_expr_test.dart deleted file mode 100644 index 787ebab7343..00000000000 --- a/tests/language_2/await/postfix_expr_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -post0(a) async { - return await a++; -} - -post1(a) async { - return await a++ + await a++; -} - -pref0(a) async { - return await ++a; -} - -pref1(a) async { - return await ++a + await ++a; -} - -sum(a) async { - var s = 0; - for (int i = 0; i < a.length; /* nothing */) { - s += a[await i++]; - } - return s; -} - -// Adapted from repro case for issue 22875. -sum2(n) async { - int i, s = 0; - for (i = 1; i <= n; await i++) { - // The loop-local variable j was necessary for the crash in 22785. - var j = await i; - s += j; - } - return s; -} - -test() async { - Expect.equals(10, await post0(10)); - Expect.equals(21, await post1(10)); - Expect.equals(11, await pref0(10)); - Expect.equals(23, await pref1(10)); - Expect.equals(10, await sum([1, 2, 3, 4])); - Expect.equals(10, await sum2(4)); -} - -main() { - asyncStart(); - test().then((_) { - asyncEnd(); - }); -} diff --git a/tests/language_2/await/regression_test.dart b/tests/language_2/await/regression_test.dart deleted file mode 100644 index 1bd365db575..00000000000 --- a/tests/language_2/await/regression_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'dart:async'; -import 'package:expect/expect.dart'; - -later(vodka) => new Future.value(vodka); - -manana(tequila) async => tequila; - -// Regression test for issue 21536. -testNestedFunctions() async { - var a = await later('Asterix').then((tonic) { - return later(tonic); - }); - var o = await manana('Obelix').then(manana); - Expect.equals("$a and $o", "Asterix and Obelix"); -} - -addLater({a, b}) => new Future.value(a + b); - -// Regression test for issue 21480. -testNamedArguments() async { - var sum = await addLater(a: 5, b: 10); - Expect.equals(sum, 15); - sum = await addLater(b: 11, a: -11); - Expect.equals(sum, 0); -} - -testSideEffects() async { - Future foo(int a1, int a2) { - Expect.equals(10, a1); - Expect.equals(11, a2); - return new Future.value(); - } - - int a = 10; - await foo(a++, a++); - Expect.equals(12, a); -} - -main() async { - testNestedFunctions(); - testNamedArguments(); - testSideEffects(); -} diff --git a/tests/language_2/await/started_immediately_test.dart b/tests/language_2/await/started_immediately_test.dart deleted file mode 100644 index 28361d24e58..00000000000 --- a/tests/language_2/await/started_immediately_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2015, 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 - -// Test that an async function does start immediately. - -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -var x = 0; - -foo() async { - x++; - await 1; - x++; -} - -void main() { - asyncStart(); - foo().then((_) => Expect.equals(2, x)).whenComplete(asyncEnd); - Expect.equals(1, x); -} diff --git a/tests/language_2/await_type_error_test.dart b/tests/language_2/await_type_error_test.dart deleted file mode 100644 index d680d5d0cf3..00000000000 --- a/tests/language_2/await_type_error_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -main() async { - int i = 1; - Future fi = Future.value(i); - Future> ffi = Future>.value(fi); - Future>> fffi = Future>>.value(ffi); - - String v1 = await i; - // ^ - // [analyzer] unspecified - // [cfe] unspecified - - String v2 = await fi; - // ^^ - // [analyzer] unspecified - // [cfe] unspecified - - int v3 = await ffi; - // ^^^ - // [analyzer] unspecified - // [cfe] unspecified - - Future v4 = await fffi; - // ^^^^ - // [analyzer] unspecified - // [cfe] unspecified - - Future v5 = await i; - // ^ - // [analyzer] unspecified - // [cfe] unspecified - - Future v6 = await fi; - // ^^ - // [analyzer] unspecified - // [cfe] unspecified - - Future> v7 = await fi; - // ^^ - // [analyzer] unspecified - // [cfe] unspecified - - Future> v8 = await ffi; - // ^^^ - // [analyzer] unspecified - // [cfe] unspecified -} diff --git a/tests/language_2/await_type_test.dart b/tests/language_2/await_type_test.dart deleted file mode 100644 index 396b70e1dea..00000000000 --- a/tests/language_2/await_type_test.dart +++ /dev/null @@ -1,85 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -void main() async { - asyncStart(); - - // Sanity check. - Expect.equals(type(), type(1)); - - { - int v = null; // // Variable with type T. - var f = await v; // // Variable with type FLATTEN(T). - Expect.equals(type(), type(f)); // Dynamic check of static type of f. - int s = f; // // Static check upper bound of f. - f = 1; // // Static check lower bound of f. - s.toString(); // // Avoid "unused variable" warning. - } - - { - Future v = null; - var f = await v; - Expect.equals(type(), type(f)); - int s = f; - f = 1; - s.toString(); - } - - { - Future> v = null; - var f = await v; - Expect.equals(type>(), type(f)); - Future s = f; - f = Future.value(1); - s.toString(); - } - - { - FutureOr v = null; - var f = await v; - Expect.equals(type(), type(f)); - int s = f; - f = 1; - s.toString(); - } - - { - FutureOr> v = null; - var f = await v; - Expect.equals(type>(), type(f)); - Future s = f; - f = Future.value(1); - s.toString(); - } - - { - Future> v = null; - var f = await v; - Expect.equals(type>(), type(f)); - FutureOr s = f; - f = 1; - f = Future.value(1); - s.toString(); - } - - { - FutureOr> v = null; - var f = await v; - Expect.equals(type>(), type(f)); - FutureOr s = f; - f = 1; - f = Future.value(1); - s.toString(); - } - - asyncEnd(); -} - -Type type([T of]) => T; diff --git a/tests/language_2/bool/bool_test.dart b/tests/language_2/bool/bool_test.dart deleted file mode 100644 index 642e2eff85b..00000000000 --- a/tests/language_2/bool/bool_test.dart +++ /dev/null @@ -1,212 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class BoolTest { - static void testEquality() { - Expect.equals(true, true); - Expect.equals(false, false); - Expect.isTrue(identical(true, true)); - Expect.isFalse(identical(true, false)); - Expect.isTrue(identical(false, false)); - Expect.isFalse(identical(false, true)); - Expect.isFalse(!identical(true, true)); - Expect.isTrue(!identical(true, false)); - Expect.isFalse(!identical(false, false)); - Expect.isTrue(!identical(false, true)); - Expect.isTrue(true == true); - Expect.isFalse(true == false); - Expect.isTrue(false == false); - Expect.isFalse(false == true); - Expect.isFalse(true != true); - Expect.isTrue(true != false); - Expect.isFalse(false != false); - Expect.isTrue(false != true); - Expect.isTrue(identical(true, (true == true))); - Expect.isTrue(identical(false, (true == false))); - Expect.isTrue(identical(true, (false == false))); - Expect.isTrue(identical(false, (false == true))); - Expect.isFalse(!identical(true, (true == true))); - Expect.isFalse(!identical(false, (true == false))); - Expect.isFalse(!identical(true, (false == false))); - Expect.isFalse(!identical(false, (false == true))); - Expect.isFalse(identical(false, (true == true))); - Expect.isFalse(identical(true, (true == false))); - Expect.isFalse(identical(false, (false == false))); - Expect.isFalse(identical(true, (false == true))); - Expect.isTrue(!identical(false, (true == true))); - Expect.isTrue(!identical(true, (true == false))); - Expect.isTrue(!identical(false, (false == false))); - Expect.isTrue(!identical(true, (false == true))); - // Expect.equals could rely on a broken boolean equality. - if (true == false) { - throw "Expect.equals broken"; - } - if (false == true) { - throw "Expect.equals broken"; - } - if (identical(true, false)) { - throw "Expect.equals broken"; - } - if (identical(false, true)) { - throw "Expect.equals broken"; - } - if (true == true) {} else { - throw "Expect.equals broken"; - } - if (false == false) {} else { - throw "Expect.equals broken"; - } - if (identical(true, true)) {} else { - throw "Expect.equals broken"; - } - if (identical(false, false)) {} else { - throw "Expect.equals broken"; - } - if (true != false) {} else { - throw "Expect.equals broken"; - } - if (false != true) {} else { - throw "Expect.equals broken"; - } - if (!identical(true, false)) {} else { - throw "Expect.equals broken"; - } - if (!identical(false, true)) {} else { - throw "Expect.equals broken"; - } - if (true != true) { - throw "Expect.equals broken"; - } - if (false != false) { - throw "Expect.equals broken"; - } - if (!identical(true, true)) { - throw "Expect.equals broken"; - } - if (!identical(false, false)) { - throw "Expect.equals broken"; - } - } - - static void testToString() { - Expect.equals("true", true.toString()); - Expect.equals("false", false.toString()); - } - - static void testNegate(isTrue, isFalse) { - Expect.equals(true, !false); - Expect.equals(false, !true); - Expect.equals(true, !isFalse); - Expect.equals(false, !isTrue); - } - - static void testLogicalOp() { - testOr(a, b, onTypeError) { - try { - return a || b; - } on TypeError catch (t) { - return onTypeError; - } - } - - testAnd(a, b, onTypeError) { - try { - return a && b; - } on TypeError catch (t) { - return onTypeError; - } - } - - var isTrue = true; - var isFalse = false; - Expect.equals(true, testAnd(isTrue, isTrue, false)); - Expect.equals(false, testAnd(isTrue, 0, false)); - Expect.equals(false, testAnd(isTrue, 1, false)); - Expect.equals(false, testAnd(isTrue, "true", false)); - Expect.equals(false, testAnd(0, isTrue, false)); - Expect.equals(false, testAnd(1, isTrue, false)); - - Expect.equals(true, testOr(isTrue, isTrue, false)); - Expect.equals(true, testOr(isFalse, isTrue, false)); - Expect.equals(true, testOr(isTrue, isFalse, false)); - Expect.equals(true, testOr(isTrue, 0, true)); - Expect.equals(true, testOr(isTrue, 1, true)); - Expect.equals(false, testOr(isFalse, 0, false)); - Expect.equals(false, testOr(isFalse, 1, false)); - Expect.equals(true, testOr(0, isTrue, true)); - Expect.equals(true, testOr(1, isTrue, true)); - Expect.equals(false, testOr(0, isFalse, false)); - Expect.equals(false, testOr(1, isFalse, false)); - - // Test side effects. - int trueCount = 0, falseCount = 0; - - trueFunc() { - trueCount++; - return true; - } - - falseFunc() { - falseCount++; - return false; - } - - Expect.equals(0, trueCount); - Expect.equals(0, falseCount); - - trueFunc() && trueFunc(); - Expect.equals(2, trueCount); - Expect.equals(0, falseCount); - - trueCount = falseCount = 0; - falseFunc() && trueFunc(); - Expect.equals(0, trueCount); - Expect.equals(1, falseCount); - - trueCount = falseCount = 0; - trueFunc() && falseFunc(); - Expect.equals(1, trueCount); - Expect.equals(1, falseCount); - - trueCount = falseCount = 0; - falseFunc() && falseFunc(); - Expect.equals(0, trueCount); - Expect.equals(1, falseCount); - - trueCount = falseCount = 0; - trueFunc() || trueFunc(); - Expect.equals(1, trueCount); - Expect.equals(0, falseCount); - - trueCount = falseCount = 0; - falseFunc() || trueFunc(); - Expect.equals(1, trueCount); - Expect.equals(1, falseCount); - - trueCount = falseCount = 0; - trueFunc() || falseFunc(); - Expect.equals(1, trueCount); - Expect.equals(0, falseCount); - - trueCount = falseCount = 0; - falseFunc() || falseFunc(); - Expect.equals(0, trueCount); - Expect.equals(2, falseCount); - } - - static void testMain() { - testEquality(); - testNegate(true, false); - testToString(); - testLogicalOp(); - } -} - -main() { - BoolTest.testMain(); -} diff --git a/tests/language_2/bool/check_test.dart b/tests/language_2/bool/check_test.dart deleted file mode 100644 index 26faa725522..00000000000 --- a/tests/language_2/bool/check_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2014, 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 - -// [NNBD non-migrated]: This file is migrated to check_strong_test.dart and -// check_weak_test.dart. -import "package:expect/expect.dart"; - -main() { - Expect.throwsAssertionError(() { - if (null) {} - }); - - Expect.throwsTypeError(() { - if ("true" as dynamic) {} - }); -} diff --git a/tests/language_2/bool/condition_check_test.dart b/tests/language_2/bool/condition_check_test.dart deleted file mode 100644 index 4ed7925708c..00000000000 --- a/tests/language_2/bool/condition_check_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2015, 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 - -// Check that passing `null` for a boolean typed parameter will still cause -// a boolean conversion error when used in a condition. - -// [NNBD non-migrated]: This file is migrated to condition_strong_test.dart and -// condition_weak_test.dart. -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -String check({bool a, bool b}) { - String aString = a ? 'a' : ''; - String bString = b ? 'b' : ''; - return '$aString$bString'; -} - -class Class { - final String field; - Class({bool a: false, bool b: true}) : this.field = check(a: a, b: b); -} - -main() { - Expect.throwsAssertionError(() => new Class(a: null, b: null).field); -} diff --git a/tests/language_2/bool/conditional_expression_condition_context_error_test.dart b/tests/language_2/bool/conditional_expression_condition_context_error_test.dart deleted file mode 100644 index ade91d554a3..00000000000 --- a/tests/language_2/bool/conditional_expression_condition_context_error_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2022, 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. - -T castObject(Object value) => value as T; - -main() { - print((castObject(true)..whatever()) ? 1 : 2); - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD - // [cfe] The method 'whatever' isn't defined for the class 'bool'. -} diff --git a/tests/language_2/bool/has_environment_not_new_test.dart b/tests/language_2/bool/has_environment_not_new_test.dart deleted file mode 100644 index fdae175596a..00000000000 --- a/tests/language_2/bool/has_environment_not_new_test.dart +++ /dev/null @@ -1,11 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - Expect.throws(() => new bool.hasEnvironment("Anything")); -} diff --git a/tests/language_2/bool/has_environment_test.dart b/tests/language_2/bool/has_environment_test.dart deleted file mode 100644 index df21062f00f..00000000000 --- a/tests/language_2/bool/has_environment_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// 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. - -// @dart = 2.9 - -// SharedOptions=-Da= -Db=b -Dc=Something - -import 'package:expect/expect.dart'; - -main() { - Expect.isTrue(const bool.hasEnvironment('dart.library.core')); - Expect.isTrue(const bool.hasEnvironment('a')); - Expect.isTrue(const bool.hasEnvironment('b')); - Expect.isTrue(const bool.hasEnvironment('c')); - Expect.isFalse(const bool.hasEnvironment('d')); -} diff --git a/tests/language_2/call/argument_inference_test.dart b/tests/language_2/call/argument_inference_test.dart deleted file mode 100644 index bf5d6ecb2d7..00000000000 --- a/tests/language_2/call/argument_inference_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A { - call(a) => a is num; -} - -main() { - Expect.isTrue(new A().call(42)); - Expect.isFalse(new A()('foo')); -} diff --git a/tests/language_2/call/call_test.dart b/tests/language_2/call/call_test.dart deleted file mode 100644 index c912710dba4..00000000000 --- a/tests/language_2/call/call_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2012, 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. -// VMOptions=--optimization_counter_threshold=10 --no-background_compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - bar(a) { - return a is String; - } - - for (var i = 0; i < 20; i++) { - Expect.isFalse(bar(1)); - Expect.isTrue(bar.call('foo')); - } - - opt_arg([a = "a"]) => a is String; - - for (var i = 0; i < 20; i++) { - Expect.isFalse(opt_arg(1)); - Expect.isFalse(opt_arg.call(1)); - Expect.isTrue(opt_arg()); - Expect.isTrue(opt_arg.call()); - Expect.isTrue(opt_arg("b")); - Expect.isTrue(opt_arg.call("b")); - } - - named_arg({x: 11, y: 22}) => "$x$y"; - - for (var i = 0; i < 20; i++) { - Expect.equals("1122", named_arg()); - Expect.equals("1122", named_arg.call()); - Expect.equals("4455", named_arg(y: 55, x: 44)); - Expect.equals("4455", named_arg.call(y: 55, x: 44)); - Expect.equals("4455", named_arg(x: 44, y: 55)); - Expect.equals("4455", named_arg.call(x: 44, y: 55)); - } - - Expect.throwsNoSuchMethodError(() => (bar as dynamic).call()); - Expect.throwsNoSuchMethodError(() => (opt_arg as dynamic).call(x: "p")); - Expect.throwsNoSuchMethodError(() => (named_arg as dynamic).call("p", "q")); -} diff --git a/tests/language_2/call/closurization_test.dart b/tests/language_2/call/closurization_test.dart deleted file mode 100644 index 32236430730..00000000000 --- a/tests/language_2/call/closurization_test.dart +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2014, 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. -// VMOptions=--optimization_counter_threshold=10 --no-background_compilation - -// @dart = 2.9 - -// VMOptions=--lazy-dispatchers -// VMOptions=--no-lazy-dispatchers - -import "package:expect/expect.dart"; - -main() { - bar(a) { - return a is String; - } - - var bar_tearOff = bar.call; - - for (var i = 0; i < 20; i++) { - Expect.isFalse(bar_tearOff(1)); - Expect.isTrue(bar_tearOff.call('foo')); - Expect.isFalse(bar_tearOff.call(1)); - Expect.isTrue(bar_tearOff('foo')); - } - - opt_arg([a = "a"]) => a is String; - var opt_arg_tearOff = opt_arg.call; - - for (var i = 0; i < 20; i++) { - Expect.isFalse(opt_arg_tearOff(1)); - Expect.isFalse(opt_arg_tearOff.call(1)); - Expect.isTrue(opt_arg_tearOff()); - Expect.isTrue(opt_arg_tearOff.call()); - Expect.isTrue(opt_arg_tearOff("b")); - Expect.isTrue(opt_arg_tearOff.call("b")); - } - - named_arg({x: 11, y: 22}) => "$x$y"; - var named_arg_tearOff = named_arg.call; - - for (var i = 0; i < 20; i++) { - Expect.equals("1122", named_arg_tearOff()); - Expect.equals("1122", named_arg_tearOff.call()); - Expect.equals("4455", named_arg_tearOff(y: 55, x: 44)); - Expect.equals("4455", named_arg_tearOff.call(y: 55, x: 44)); - Expect.equals("4455", named_arg_tearOff(x: 44, y: 55)); - Expect.equals("4455", named_arg_tearOff.call(x: 44, y: 55)); - } - - // In order to test runtime behavior of calling with invalid arguments, - // we cast to dynamic to make the type system forget about the actual types. - dynamic bar_tearOff_d = bar_tearOff; - dynamic opt_arg_tearOff_d = opt_arg_tearOff; - dynamic named_arg_tearOff_d = named_arg_tearOff; - Expect.throws(() => bar_tearOff_d.call()); - Expect.throwsNoSuchMethodError(() => opt_arg_tearOff_d.call(x: "p")); - Expect.throwsNoSuchMethodError(() => named_arg_tearOff_d.call("p", "q")); -} diff --git a/tests/language_2/call/constructor_on_unresolvable_class_runtime_test.dart b/tests/language_2/call/constructor_on_unresolvable_class_runtime_test.dart deleted file mode 100644 index 27064a689a5..00000000000 --- a/tests/language_2/call/constructor_on_unresolvable_class_runtime_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -// Check that calling a constructor of a class that cannot be resolved causes -// compile error. - -import "package:expect/expect.dart"; -import 'dart:math'; - -main() { - - - -} diff --git a/tests/language_2/call/constructor_on_unresolvable_class_test.dart b/tests/language_2/call/constructor_on_unresolvable_class_test.dart deleted file mode 100644 index a8e22776360..00000000000 --- a/tests/language_2/call/constructor_on_unresolvable_class_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012, 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 - -// Check that calling a constructor of a class that cannot be resolved causes -// compile error. - -import "package:expect/expect.dart"; -import 'dart:math'; - -main() { - new A(); - // ^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // [cfe] Couldn't find constructor 'A'. - new A.foo(); - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // [cfe] Couldn't find constructor 'A.foo'. - new lib.A(); - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // [cfe] Couldn't find constructor 'lib.A'. -} diff --git a/tests/language_2/call/dynamic_call_through_getter_test.dart b/tests/language_2/call/dynamic_call_through_getter_test.dart deleted file mode 100644 index 48dc8ce283d..00000000000 --- a/tests/language_2/call/dynamic_call_through_getter_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2022, 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 - -// Reduction of https://github.com/flutter/flutter/issues/116405 - -import "package:expect/expect.dart"; - -class Foo { - Foo(this.bar); - Bar bar; -} - -class Bar { - int call(int x) => x * 2; -} - -@pragma("vm:never-inline") -@pragma("dart2js:noInline") -int doCallThroughGetter(dynamic foo, int x) { - return foo.bar(x); -} - -void main() { - Expect.equals(4, doCallThroughGetter(Foo(Bar()), 2)); -} diff --git a/tests/language_2/call/function2_test.dart b/tests/language_2/call/function2_test.dart deleted file mode 100644 index cdb61c1b1dd..00000000000 --- a/tests/language_2/call/function2_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -typedef Object Func(Object x); - -class Bar { - int x = 42; - - Object call(Object x) { - return 'Bar $x'; - } -} - -Object baz(Object x) => x; - -var map = {'baz': baz, 'bar': new Bar()}; - -Object test(String str, Object arg) { - return map[str].call(arg); -} - -void main() { - Expect.equals(42, test('baz', 42)); - Expect.equals('Bar 42', test('bar', 42)); -} diff --git a/tests/language_2/call/function_apply_test.dart b/tests/language_2/call/function_apply_test.dart deleted file mode 100644 index 1a1180f22ff..00000000000 --- a/tests/language_2/call/function_apply_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -class A { - call({a: 42}) { - return 499 + a; - } -} - -main() { - Expect.equals(497, Function.apply(new A(), [], {#a: -2})); -} diff --git a/tests/language_2/call/function_test.dart b/tests/language_2/call/function_test.dart deleted file mode 100644 index 3daecf4712a..00000000000 --- a/tests/language_2/call/function_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -Object bar(Object x) { - return x; -} - -Function baz = bar; - -dynamic dyn = bar; - -class Foo { - Object call(Object x) { - return 'Foo$x'; - } -} - -typedef Object FooType(Object x); -FooType foo = bar; - -void main() { - Expect.equals(42, bar.call(42)); - Expect.equals(42, baz.call(42)); - Expect.equals(42, foo.call(42)); - Expect.equals(42, dyn.call(42)); - Expect.equals(42, bar(42)); - Expect.equals(42, baz(42)); - Expect.equals(42, foo(42)); - Expect.equals(42, dyn(42)); - - baz = new Foo(); - foo = new Foo(); - dyn = new Foo(); - Expect.equals('Foo42', baz.call(42)); - Expect.equals('Foo42', foo.call(42)); - Expect.equals('Foo42', dyn.call(42)); - Expect.equals('Foo42', baz(42)); - Expect.equals('Foo42', foo(42)); - Expect.equals('Foo42', dyn(42)); - - var s = (FooType).toString(); - var minified = s != 'FooType'; // dart2js --minify has minified names. - dynamic d = null; - Expect.throws(() => d(), - (e) => e is NoSuchMethodError && (minified || '$e'.contains('call'))); -} diff --git a/tests/language_2/call/implicit_tearoff_assignment_test.dart b/tests/language_2/call/implicit_tearoff_assignment_test.dart deleted file mode 100644 index 87ccd155d58..00000000000 --- a/tests/language_2/call/implicit_tearoff_assignment_test.dart +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) 2022, 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. - -// This test ensures that when a `.call` tearoff occurs on the right hand side -// of an assignment, the resulting expression has an appropriate type. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -import '../static_type_helper.dart'; - -dynamic _topLevelPropertySetValue; - -set topLevelProperty(void Function() value) { - Expect.isNull(_topLevelPropertySetValue); - _topLevelPropertySetValue = value; -} - -class C { - static dynamic _staticPropertySetValue; - - void call() {} - - static set staticProperty(void Function() value) { - Expect.isNull(_staticPropertySetValue); - _staticPropertySetValue = value; - } -} - -class Base { - dynamic _basePropertySetValue; - - set baseProperty(void Function() value) { - Expect.isNull(_basePropertySetValue); - _basePropertySetValue = value; - } -} - -class Derived extends Base { - dynamic _indexSetValue; - dynamic _instanceSetValue; - - operator []=(int index, void Function() value) { - Expect.isNull(_indexSetValue); - _indexSetValue = value; - } - - set instanceProperty(void Function() value) { - Expect.isNull(_instanceSetValue); - _instanceSetValue = value; - } - - void testSuperPropertySet() { - Expect.type((super.baseProperty = C()) - ..expectStaticType>()); - Expect.type(super._basePropertySetValue); - } -} - -class Extended { - dynamic _extensionIndexSetValue; - dynamic _extensionPropertySetValue; -} - -extension on Extended { - operator []=(int index, void Function() value) { - Expect.isNull(_extensionIndexSetValue); - _extensionIndexSetValue = value; - } - - set extensionProperty(void Function() value) { - Expect.isNull(_extensionPropertySetValue); - _extensionPropertySetValue = value; - } -} - -void testExtensionIndexSet() { - Extended e = Extended(); - Expect.type( - (e[0] = C())..expectStaticType>()); - Expect.type(e._extensionIndexSetValue); -} - -void testExtensionSet() { - Extended e = Extended(); - Expect.type((e.extensionProperty = C()) - ..expectStaticType>()); - Expect.type(e._extensionPropertySetValue); -} - -void testIndexSet() { - Derived d = Derived(); - Expect.type( - (d[0] = C())..expectStaticType>()); - Expect.type(d._indexSetValue); -} - -void testInstanceSet() { - Derived d = Derived(); - Expect.type( - (d.instanceProperty = C())..expectStaticType>()); - Expect.type(d._instanceSetValue); -} - -void testNullAwarePropertySet() { - Derived d = Derived(); - Expect.type((d?.instanceProperty = C()) - ..expectStaticType>()); - Expect.type(d._instanceSetValue); -} - -void testStaticSet() { - C._staticPropertySetValue = null; - Expect.type( - (C.staticProperty = C())..expectStaticType>()); - Expect.type(C._staticPropertySetValue); -} - -void testTopLevelSet() { - _topLevelPropertySetValue = null; - Expect.type( - (topLevelProperty = C())..expectStaticType>()); - Expect.type(_topLevelPropertySetValue); -} - -void testVariableSet() { - void Function() f; - Expect.type( - (f = C())..expectStaticType>()); - Expect.type(f); -} - -main() { - testExtensionIndexSet(); - testExtensionSet(); - testIndexSet(); - testInstanceSet(); - testStaticSet(); - Derived().testSuperPropertySet(); - testTopLevelSet(); - testVariableSet(); -} diff --git a/tests/language_2/call/implicit_tearoff_error_test.dart b/tests/language_2/call/implicit_tearoff_error_test.dart deleted file mode 100644 index 2de93470506..00000000000 --- a/tests/language_2/call/implicit_tearoff_error_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2022, 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. - -// This test exercises a corner case of implicit `.call` tearoffs that is -// easiest to see through its effect on erroneous code. - -// NOTICE: This test checks the currently implemented behavior, even though the -// implemented behavior does not match the language specification. Until an -// official decision has been made about whether to change the implementation to -// match the specification, or vice versa, this regression test is intended to -// protect against inadvertent implementation changes. - -// @dart = 2.9 - -import '../static_type_helper.dart'; - -class A {} - -class C extends A { - void call() {} -} - -class D extends A { - void call() {} -} - -void testConditionalExpressionWithUnrelatedClasses(bool b, C c, D d) { - // Verify that `b ? c : d` is not interpreted as `(b ? c.call : d.call)` by - // confirming that it's an error to use it in a function context (because - // `b ? c : d` has static type `A`). - context(b ? c : d); - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // ^ - // [cfe] The argument type 'A' can't be assigned to the parameter type 'void Function()'. -} diff --git a/tests/language_2/call/implicit_tearoff_exceptions_test.dart b/tests/language_2/call/implicit_tearoff_exceptions_test.dart deleted file mode 100644 index 5ff09e9b3ee..00000000000 --- a/tests/language_2/call/implicit_tearoff_exceptions_test.dart +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) 2022, 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. - -// There are a few circumstances where implicit tear-off of `call` methods does -// not occur; this test exercises the user-visible static analysis behaviors -// arising from those circumstances. - -// NOTICE: This test checks the currently implemented behavior, even though the -// implemented behavior does not match the language specification. Until an -// official decision has been made about whether to change the implementation to -// match the specification, or vice versa, this regression test is intended to -// protect against inadvertent implementation changes. - -// A note on how the tests work: in several places we use the pattern -// `context(b ? d : (E..expectStaticType>()))` (where `b` has type -// `bool` and `d` has type `dynamic`). This pattern ensures that `E` will be -// type analyzed with a context of `C`, and tests that the resulting expression -// has a type of `T`. However, the presence of `b ? d :` at the beginning -// ensures that the overall expression has type `dynamic`, so no assignability -// error will occur if types `C` and `T` are different. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -import '../static_type_helper.dart'; - -class A {} - -class C extends A { - void call() {} - void m() {} -} - -// These are top level getters rather than local variables to avoid triggering -// flow analysis. -bool get bTrue => true; -bool get bFalse => false; - -void testCascadeTarget() { - C c = C(); - // Even though the subexpression `c` has type `C` and context `void - // Function()`, we don't tear off `.call` for subexpressions that are the - // target of a cascade; instead, we tear-off `.call` on the full cascade - // expression. So `c..m()` is equivalent to `(c..m()).call` (which is valid) - // rather than `(c.call)..m()` (which is not). - context(c..m()); - - // Same as above, but confirm that extra parens around `c` don't change the - // behavior. - context((c)..m()); - context(((c))..m()); -} - -void testConditional() { - A a = A(); - C c = C(); - dynamic d = null; - // Even though the subexpression `c` has type `C` and context `void - // Function()`, we don't tear off `.call` for the `then` or `else` - // subexpressions of a conditional expression; instead, we tear off `.call` - // for the conditional expression as a whole (if appropriate). So, in - // `(bTrue ? c : a)..expectStaticType<...>()`, no implicit tearoff of `c` - // occurs, and the subexpression `bTrue ? c : a` gets assigned a static type - // of `A`. - Expect.throws(() => context( - bFalse ? d : ((bTrue ? c : a)..expectStaticType>()))); - Expect.throws(() => context( - bFalse ? d : ((bFalse ? a : c)..expectStaticType>()))); - - // Same as above, but confirm that extra parens around `c` don't change the - // behavior. - Expect.throws(() => context( - bFalse ? d : ((bTrue ? (c) : a)..expectStaticType>()))); - Expect.throws(() => context( - bFalse ? d : ((bFalse ? a : (c))..expectStaticType>()))); - Expect.throws(() => context( - bFalse ? d : ((bTrue ? ((c)) : a)..expectStaticType>()))); - Expect.throws(() => context( - bFalse ? d : ((bFalse ? a : ((c)))..expectStaticType>()))); -} - -void testIfNull() { - A a = A(); - A aq = null; - C c = C(); - dynamic d = null; - // Even though the subexpression `c` has type `C` and context `void - // Function()`, we don't tear off `.call` for the LHS of a `??` expression; - // instead, we tear off `.call` for the `??` expression as a whole (if - // appropriate). So, in - // `(c ?? a)..expectStaticType<...>()`, no implicit tearoff of `c` occurs, and - // the subexpression `c ?? a` gets assigned a static type of `A`. - Expect.throws(() => context( - bFalse ? d : ((c ?? a)..expectStaticType>()))); - Expect.throws(() => context( - bFalse ? d : ((aq ?? c)..expectStaticType>()))); - - // Same as above, but confirm that extra parens around `c` don't change the - // behavior. - Expect.throws(() => context( - bFalse ? d : (((c) ?? a)..expectStaticType>()))); - Expect.throws(() => context( - bFalse ? d : ((aq ?? (c))..expectStaticType>()))); - Expect.throws(() => context( - bFalse ? d : ((((c)) ?? a)..expectStaticType>()))); - Expect.throws(() => context( - bFalse ? d : ((aq ?? ((c)))..expectStaticType>()))); -} - -main() { - testCascadeTarget(); - testConditional(); - testIfNull(); -} diff --git a/tests/language_2/call/implicit_tearoff_local_assignment_test.dart b/tests/language_2/call/implicit_tearoff_local_assignment_test.dart deleted file mode 100644 index 210ace03c82..00000000000 --- a/tests/language_2/call/implicit_tearoff_local_assignment_test.dart +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2022, 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. - -// This test is the pre-null-safety variant of the null safety test -// `implicit_tearoff_local_assignment_test.dart`, which verifies that when -// considering whether to perform a `.call` tearoff on the RHS of an assignment, -// the implementations use the unpromoted type of the variable (rather than the -// promoted type). For the pre-null-safety variant, the same logic doesn't -// really apply, because a variable can't be promoted in a block that contains -// an assignment to it. But we can still test the unpromoted cases. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -import '../static_type_helper.dart'; - -class B { - Object call() => 'B.call called'; -} - -class C extends B { - String call() => 'C.call called'; -} - -void testClassUnpromoted() { - B x = B(); - var y = x = C(); // No implicit tearoff of `.call`, no promotion - x.expectStaticType>(); - Expect.type(x); - Expect.equals('C.call called', x()); - y.expectStaticType>(); - Expect.type(y); - Expect.equals('C.call called', y()); -} - -void testFunctionUnpromoted() { - Object f() => 'f called'; - Object Function() x = f; - var y = x = B(); // Implicit tearoff of `.call`, no promotion - x.expectStaticType>(); - Expect.type(x); - Expect.equals('B.call called', x()); - y.expectStaticType>(); - Expect.type(y); - Expect.equals('B.call called', y()); -} - -void testObjectUnpromoted() { - Object x = 'initial value'; - var y = x = B(); // No implicit tearoff of `.call`, no promotion - x.expectStaticType>(); - Expect.type(x); - Expect.equals('B.call called', (x as B)()); - y.expectStaticType>(); - Expect.type(y); - Expect.equals('B.call called', y()); -} - -main() { - testClassUnpromoted(); - testFunctionUnpromoted(); - testObjectUnpromoted(); -} diff --git a/tests/language_2/call/implicit_tearoff_test.dart b/tests/language_2/call/implicit_tearoff_test.dart deleted file mode 100644 index ec30ced3c5d..00000000000 --- a/tests/language_2/call/implicit_tearoff_test.dart +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) 2022, 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. - -// This test exercises all the grammar constructs for which implicit tear-off of -// `call` methods should occur. - -// NOTICE: This test checks the currently implemented behavior, even though the -// implemented behavior does not match the language specification. Until an -// official decision has been made about whether to change the implementation to -// match the specification, or vice versa, this regression test is intended to -// protect against inadvertent implementation changes. - -// @dart = 2.9 - -import '../static_type_helper.dart'; - -class B {} - -class C extends B { - void call() {} - void m() {} - void testThisExpression() { - context(this); - } -} - -class D { - C operator +(other) => C(); - C operator -() => C(); - C instanceMethod() => C(); - static C staticMethod() => C(); - C get instanceGetter => C(); -} - -C topLevelMethod() => C(); - -// These are top level getters rather than local variables to avoid triggering -// flow analysis. -bool get bTrue => true; -bool get bFalse => false; - -void testAsExpression() { - dynamic d = C(); - context(d as C); -} - -void testAssignmentExpression() { - B b = B(); // ignore: unused_local_variable - context(b = C()); -} - -Future testAwaitExpression() async { - Future fc = Future.value(C()); - context(await fc); -} - -void testBinaryExpression() { - D d = D(); - context(d + d); -} - -void testCascadeExpression() { - // Note: we don't apply implicit `.call` tear-offs to the *target* of a - // cascade, but we do apply them to the cascade expression as a whole, so - // `c..m()` is equivalent to `(c..m()).call`. - C c = C(); - context(c..m()); -} - -void testConditionalExpression() { - // Note: we know from `implicit_tearoff_exceptions_test.dart` that the two - // branches of the conditional expression are *not* subject to implicit - // `.call` tearoff, so the `.call` tearoff in this case is applied to the - // whole conditional expression. In other words, `b ? c : c` desugars to - // `(b ? c : c).call` rather than `(b ? c.call : c.call)`. - C c = C(); - context(bFalse ? c : c); - context(bTrue ? c : c); -} - -void testFunctionExpressionInvocation() { - C c = C(); - context((() => c)()); -} - -void testFunctionInvocationLocal() { - C localFunction() => C(); - context(localFunction()); -} - -void testFunctionInvocationStatic() { - context(D.staticMethod()); -} - -void testFunctionInvocationTopLevel() { - context(topLevelMethod()); -} - -void testIfNullExpression() { - C c1 = bTrue ? C() : null; - C c2 = C(); - context(c1 ?? c2); - c1 = null; - context(c1 ?? c2); -} - -void testIndexExpression() { - List l = [C()]; - context(l[0]); -} - -void testInstanceCreationExpressionExplicit() { - context(new C()); -} - -void testInstanceCreationExpressionImplicit() { - context(C()); -} - -void testInstanceGetGeneral() { - D Function() dFunction = () => D(); - context(dFunction().instanceGetter); -} - -void testInstanceGetViaPrefixedIdentifier() { - D d = D(); - context(d.instanceGetter); -} - -void testMethodInvocation() { - context(D().instanceMethod()); -} - -void testParenthesizedExpression() { - C c = C(); - context((c)); -} - -void testUnaryMinusExpression() { - D d = D(); - context(-d); -} - -extension on C { - void testThisExpressionExtension() { - context(this); - } -} - -main() async { - testAsExpression(); - testAssignmentExpression(); - await testAwaitExpression(); - testBinaryExpression(); - testCascadeExpression(); - testConditionalExpression(); - testFunctionExpressionInvocation(); - testFunctionInvocationLocal(); - testFunctionInvocationStatic(); - testFunctionInvocationTopLevel(); - testIfNullExpression(); - testIndexExpression(); - testInstanceCreationExpressionExplicit(); - testInstanceCreationExpressionImplicit(); - testInstanceGetGeneral(); - testInstanceGetViaPrefixedIdentifier(); - testMethodInvocation(); - testParenthesizedExpression(); - testUnaryMinusExpression(); - C().testThisExpression(); - C().testThisExpressionExtension(); -} diff --git a/tests/language_2/call/method_as_cast_test.dart b/tests/language_2/call/method_as_cast_test.dart deleted file mode 100644 index f6e75e4dccd..00000000000 --- a/tests/language_2/call/method_as_cast_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2018, 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 test program to test arithmetic operations. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class B {} - -class C { - B call(B b) => b; -} - -class D implements Function { - B call(B b) => b; -} - -typedef B BToB(B x); - -typedef Object NullToObject(Null x); - -main() { - // The presence of a `.call` method does not cause class `C` to become a - // subtype of any function type. - C c = new C(); - Expect.throwsTypeError(() => c as BToB); //# 01: ok - Expect.throwsTypeError(() => c as NullToObject); //# 02: ok - Expect.throwsTypeError(() => c as Function); //# 03: ok - - // The same goes for class `D`: `implements Function` is ignored in Dart 2. - D d = new D(); - Expect.throwsTypeError(() => d as BToB); //# 04: ok - Expect.throwsTypeError(() => d as NullToObject); //# 05: ok - Expect.throwsTypeError(() => d as Function); //# 06: ok -} diff --git a/tests/language_2/call/method_function_typed_value_test.dart b/tests/language_2/call/method_function_typed_value_test.dart deleted file mode 100644 index cbc975ea93d..00000000000 --- a/tests/language_2/call/method_function_typed_value_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2018, 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 test program to test arithmetic operations. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -int f(int i) => 2 * i; - -typedef int IntToInt(int x); - -main() { - // It is possible to use `.call` on a function-typed value (even though it is - // redundant). Similarly, it is possible to tear off `.call` on a - // function-typed value (but it is a no-op). - Expect.equals(f.call(1), 2); //# 01: ok - Expect.identical(f.call, f); //# 02: ok - IntToInt f2 = f; - Expect.equals(f2.call(1), 2); //# 03: ok - Expect.identical(f2.call, f); //# 04: ok - Function f3 = f; - Expect.equals(f3.call(1), 2); //# 05: ok - Expect.identical(f3.call, f); //# 06: ok - dynamic d = f; - Expect.equals(d.call(1), 2); //# 07: ok - Expect.identical(d.call, f); //# 08: ok -} diff --git a/tests/language_2/call/method_implicit_invoke_instance_test.dart b/tests/language_2/call/method_implicit_invoke_instance_test.dart deleted file mode 100644 index 975a5bb1fc9..00000000000 --- a/tests/language_2/call/method_implicit_invoke_instance_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2018, 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 test program to test arithmetic operations. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class C1 { - int call(int i) => 2 * i; -} - -class C2 implements Function { - int call(int i) => 2 * i; -} - -class D { - C1 c1 = new C1(); - dynamic d1 = new C1(); - C2 c2 = new C2(); - dynamic d2 = new C2(); - - void test() { - // Implicitly invokes c1.call(1) - Expect.equals(c1(1), 2); //# 01: ok - // Implicitly invokes d1.call(1) - Expect.equals(d1(1), 2); //# 02: ok - // Implicitly invokes c2.call(1) - Expect.equals(c2(1), 2); //# 03: ok - // Implicitly invokes d2.call(1) - Expect.equals(d2(1), 2); //# 04: ok - } -} - -main() { - new D().test(); - // Implicitly invokes D.c1.call(1) - Expect.equals(new D().c1(1), 2); //# 05: ok - // Implicitly invokes D.d1.call(1) - Expect.equals(new D().d1(1), 2); //# 06: ok - // Implicitly invokes D.c2.call(1) - Expect.equals(new D().c2(1), 2); //# 07: ok - // Implicitly invokes D.d2.call(1) - Expect.equals(new D().d2(1), 2); //# 08: ok - D d = new D(); - // Implicitly invokes d.c1.call(1) - Expect.equals(d.c1(1), 2); //# 09: ok - // Implicitly invokes d.d1.call(1) - Expect.equals(d.d1(1), 2); //# 10: ok - // Implicitly invokes d.c2.call(1) - Expect.equals(d.c2(1), 2); //# 11: ok - // Implicitly invokes d.d2.call(1) - Expect.equals(d.d2(1), 2); //# 12: ok -} diff --git a/tests/language_2/call/method_implicit_invoke_local_runtime_1_test.dart b/tests/language_2/call/method_implicit_invoke_local_runtime_1_test.dart deleted file mode 100644 index 98709fff98f..00000000000 --- a/tests/language_2/call/method_implicit_invoke_local_runtime_1_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 test program to test arithmetic operations. - -import "package:expect/expect.dart"; - -class C1 { - int call(int i) => 2 * i; -} - -class C2 implements Function { - int call(int i) => 2 * i; -} - -main() { - C1 c1 = new C1(); - // Implicitly invokes c1.call(1) - Expect.equals(c1(1), 2); - dynamic d1 = c1; - // Implicitly invokes d1.call(1) - - C2 c2 = new C2(); - // Implicitly invokes c2.call(1) - - dynamic d2 = c2; - // Implicitly invokes d2.call(1) - - // Cannot invoke with the wrong signature. - - -} diff --git a/tests/language_2/call/method_implicit_invoke_local_runtime_2_test.dart b/tests/language_2/call/method_implicit_invoke_local_runtime_2_test.dart deleted file mode 100644 index c52d23adb17..00000000000 --- a/tests/language_2/call/method_implicit_invoke_local_runtime_2_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 test program to test arithmetic operations. - -import "package:expect/expect.dart"; - -class C1 { - int call(int i) => 2 * i; -} - -class C2 implements Function { - int call(int i) => 2 * i; -} - -main() { - C1 c1 = new C1(); - // Implicitly invokes c1.call(1) - - dynamic d1 = c1; - // Implicitly invokes d1.call(1) - Expect.equals(d1(1), 2); - C2 c2 = new C2(); - // Implicitly invokes c2.call(1) - - dynamic d2 = c2; - // Implicitly invokes d2.call(1) - - // Cannot invoke with the wrong signature. - - -} diff --git a/tests/language_2/call/method_implicit_invoke_local_runtime_3_test.dart b/tests/language_2/call/method_implicit_invoke_local_runtime_3_test.dart deleted file mode 100644 index 59237f9f267..00000000000 --- a/tests/language_2/call/method_implicit_invoke_local_runtime_3_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 test program to test arithmetic operations. - -import "package:expect/expect.dart"; - -class C1 { - int call(int i) => 2 * i; -} - -class C2 implements Function { - int call(int i) => 2 * i; -} - -main() { - C1 c1 = new C1(); - // Implicitly invokes c1.call(1) - - dynamic d1 = c1; - // Implicitly invokes d1.call(1) - - C2 c2 = new C2(); - // Implicitly invokes c2.call(1) - Expect.equals(c2(1), 2); - dynamic d2 = c2; - // Implicitly invokes d2.call(1) - - // Cannot invoke with the wrong signature. - - -} diff --git a/tests/language_2/call/method_implicit_invoke_local_runtime_4_test.dart b/tests/language_2/call/method_implicit_invoke_local_runtime_4_test.dart deleted file mode 100644 index 9132ea9d939..00000000000 --- a/tests/language_2/call/method_implicit_invoke_local_runtime_4_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 test program to test arithmetic operations. - -import "package:expect/expect.dart"; - -class C1 { - int call(int i) => 2 * i; -} - -class C2 implements Function { - int call(int i) => 2 * i; -} - -main() { - C1 c1 = new C1(); - // Implicitly invokes c1.call(1) - - dynamic d1 = c1; - // Implicitly invokes d1.call(1) - - C2 c2 = new C2(); - // Implicitly invokes c2.call(1) - - dynamic d2 = c2; - // Implicitly invokes d2.call(1) - Expect.equals(d2(1), 2); - // Cannot invoke with the wrong signature. - - -} diff --git a/tests/language_2/call/method_implicit_invoke_local_runtime_test.dart b/tests/language_2/call/method_implicit_invoke_local_runtime_test.dart deleted file mode 100644 index 24b848c12b6..00000000000 --- a/tests/language_2/call/method_implicit_invoke_local_runtime_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 test program to test arithmetic operations. - -import "package:expect/expect.dart"; - -class C1 { - int call(int i) => 2 * i; -} - -class C2 implements Function { - int call(int i) => 2 * i; -} - -main() { - C1 c1 = new C1(); - // Implicitly invokes c1.call(1) - - dynamic d1 = c1; - // Implicitly invokes d1.call(1) - - C2 c2 = new C2(); - // Implicitly invokes c2.call(1) - - dynamic d2 = c2; - // Implicitly invokes d2.call(1) - - // Cannot invoke with the wrong signature. - - -} diff --git a/tests/language_2/call/method_implicit_invoke_local_test.dart b/tests/language_2/call/method_implicit_invoke_local_test.dart deleted file mode 100644 index 0f5b5208313..00000000000 --- a/tests/language_2/call/method_implicit_invoke_local_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2018, 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 test program to test arithmetic operations. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class C1 { - int call(int i) => 2 * i; -} - -class C2 implements Function { - int call(int i) => 2 * i; -} - -main() { - C1 c1 = new C1(); - // Implicitly invokes c1.call(1) - Expect.equals(c1(1), 2); - dynamic d1 = c1; - // Implicitly invokes d1.call(1) - Expect.equals(d1(1), 2); - C2 c2 = new C2(); - // Implicitly invokes c2.call(1) - Expect.equals(c2(1), 2); - dynamic d2 = c2; - // Implicitly invokes d2.call(1) - Expect.equals(d2(1), 2); - // Cannot invoke with the wrong signature. - c2(); - // ^ - // [analyzer] COMPILE_TIME_ERROR.NOT_ENOUGH_POSITIONAL_ARGUMENTS - //^^ - // [cfe] Too few positional arguments: 1 required, 0 given. - c2(3, 4); - // ^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS - //^^^^^^ - // [cfe] Too many positional arguments: 1 allowed, but 2 found. -} diff --git a/tests/language_2/call/method_implicit_invoke_static_test.dart b/tests/language_2/call/method_implicit_invoke_static_test.dart deleted file mode 100644 index f162a0e2238..00000000000 --- a/tests/language_2/call/method_implicit_invoke_static_test.dart +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2018, 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 test program to test arithmetic operations. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class C1 { - int call(int i) => 2 * i; -} - -class C2 implements Function { - int call(int i) => 2 * i; -} - -class D { - static C1 c1 = new C1(); - static dynamic d1 = new C1(); - static C2 c2 = new C2(); - static dynamic d2 = new C2(); - - void test1() { - // Implicitly invokes c1.call(1) - Expect.equals(c1(1), 2); //# 01: ok - // Implicitly invokes d1.call(1) - Expect.equals(d1(1), 2); //# 02: ok - // Implicitly invokes c2.call(1) - Expect.equals(c2(1), 2); //# 03: ok - // Implicitly invokes d2.call(1) - Expect.equals(d2(1), 2); //# 04: ok - } - - static void test2() { - // Implicitly invokes c1.call(1) - Expect.equals(c1(1), 2); //# 05: ok - // Implicitly invokes d1.call(1) - Expect.equals(d1(1), 2); //# 06: ok - // Implicitly invokes c2.call(1) - Expect.equals(c2(1), 2); //# 07: ok - // Implicitly invokes d2.call(1) - Expect.equals(d2(1), 2); //# 08: ok - } -} - -main() { - new D().test1(); - D.test2(); - // Implicitly invokes D.c1.call(1) - Expect.equals(D.c1(1), 2); //# 09: ok - // Implicitly invokes D.d1.call(1) - Expect.equals(D.d1(1), 2); //# 10: ok - // Implicitly invokes D.c2.call(1) - Expect.equals(D.c2(1), 2); //# 11: ok - // Implicitly invokes D.d2.call(1) - Expect.equals(D.d2(1), 2); //# 12: ok -} diff --git a/tests/language_2/call/method_implicit_invoke_top_level_test.dart b/tests/language_2/call/method_implicit_invoke_top_level_test.dart deleted file mode 100644 index c9fce668aaa..00000000000 --- a/tests/language_2/call/method_implicit_invoke_top_level_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2018, 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 test program to test arithmetic operations. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class C1 { - int call(int i) => 2 * i; -} - -class C2 implements Function { - int call(int i) => 2 * i; -} - -C1 c1 = new C1(); -dynamic d1 = new C1(); -C2 c2 = new C2(); -dynamic d2 = new C2(); - -main() { - // Implicitly invokes c1.call(1) - Expect.equals(c1(1), 2); //# 01: ok - // Implicitly invokes d1.call(1) - Expect.equals(d1(1), 2); //# 02: ok - // Implicitly invokes c2.call(1) - Expect.equals(c2(1), 2); //# 03: ok - // Implicitly invokes d2.call(1) - Expect.equals(d2(1), 2); //# 04: ok -} diff --git a/tests/language_2/call/method_implicit_tear_off_assignable_test.dart b/tests/language_2/call/method_implicit_tear_off_assignable_test.dart deleted file mode 100644 index 75ad6557672..00000000000 --- a/tests/language_2/call/method_implicit_tear_off_assignable_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'package:expect/expect.dart'; - -abstract class I { - void call(); -} - -class C implements I { - void call([int x]) {} -} - -main() { - I i = new C(); - // The implicit tear-off of i.call should be ok because its type (void - // Function()) is a supertype of the expected type, hence it is assignable. - void Function([int]) f = i; - Expect.equals(f, i.call); -} diff --git a/tests/language_2/call/method_implicit_tear_off_nullable_test.dart b/tests/language_2/call/method_implicit_tear_off_nullable_test.dart deleted file mode 100644 index ab0bd111569..00000000000 --- a/tests/language_2/call/method_implicit_tear_off_nullable_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2018, 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 test program to test arithmetic operations. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class B {} - -class C { - B call(B b) => b; -} - -typedef B BToB(B x); - -C c = null; - -void check(BToB f) { - Expect.isNull(f); -} - -main() { - // The implicit tear-off of `.call` should be tolerant of `null`. - check(c); // Equivalent to `check(c?.call);` -} diff --git a/tests/language_2/call/method_implicit_tear_off_test.dart b/tests/language_2/call/method_implicit_tear_off_test.dart deleted file mode 100644 index 218f0bb3c22..00000000000 --- a/tests/language_2/call/method_implicit_tear_off_test.dart +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) 2018, 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 test program to test arithmetic operations. - -// @dart = 2.9 - -import "dart:async"; -import "package:expect/expect.dart"; - -class B {} - -class C { - B call(B b) => b; -} - -typedef B BToB(B x); - -typedef Object NullToObject(Null x); - -C c = new C(); - -void check1(BToB f) { - Expect.isFalse(identical(c, f)); - Expect.equals(c.call, f); - B b = new B(); - Expect.identical(f(b), b); -} - -void check2(FutureOr f) { - Expect.isFalse(identical(c, f)); - Expect.equals(c.call, f); - BToB f2 = f; - Expect.identical(f, f2); - B b = new B(); - Expect.identical(f2(b), b); -} - -void check3(NullToObject f) { - Expect.isFalse(identical(c, f)); - Expect.equals(c.call, f); - Expect.isNull(f(null)); -} - -void check4(FutureOr f) { - Expect.isFalse(identical(c, f)); - Expect.equals(c.call, f); - NullToObject f2 = f; - Expect.identical(f, f2); - Expect.isNull(f2(null)); -} - -void check5(Function f) { - Expect.isFalse(identical(c, f)); - Expect.equals(c.call, f); - B b = new B(); - Expect.identical(f(b), b); -} - -void check6(FutureOr f) { - Expect.isFalse(identical(c, f)); - Expect.equals(c.call, f); - Function f2 = f; - Expect.identical(f, f2); - B b = new B(); - Expect.identical(f2(b), b); -} - -void check7(C x) { - Expect.identical(c, x); -} - -void check8(FutureOr x) { - Expect.identical(c, x); -} - -void check9(Object o) { - Expect.identical(c, o); -} - -void check10(FutureOr o) { - Expect.identical(c, o); -} - -void check11(dynamic d) { - Expect.identical(c, d); -} - -void check12(FutureOr d) { - Expect.identical(c, d); -} - -main() { - // Implicitly tears off c.call - check1(c); //# 01: ok - check2(c); //# 02: ok - check3(c); //# 03: ok - check4(c); //# 04: ok - check5(c); //# 05: ok - check6(c); //# 06: ok - // Does not tear off c.call - check7(c); //# 07: ok - check8(c); //# 08: ok - check9(c); //# 09: ok - check10(c); //# 10: ok - check11(c); //# 11: ok - check12(c); //# 12: ok -} diff --git a/tests/language_2/call/method_is_check_test.dart b/tests/language_2/call/method_is_check_test.dart deleted file mode 100644 index aed411c42f2..00000000000 --- a/tests/language_2/call/method_is_check_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2018, 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 test program to test arithmetic operations. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class B {} - -class C { - B call(B b) => b; -} - -class D implements Function { - B call(B b) => b; -} - -typedef B BToB(B x); - -typedef Object NullToObject(Null x); - -main() { - // The presence of a `.call` method does not cause class `C` to become a - // subtype of any function type. - C c = new C(); - Expect.isFalse(c is BToB); //# 01: ok - Expect.isFalse(c is NullToObject); //# 02: ok - Expect.isFalse(c is Function); //# 03: ok - - // The same goes for class `D`: `implements Function` is ignored in Dart 2. - D d = new D(); - Expect.isFalse(d is BToB); //# 04: ok - Expect.isFalse(d is NullToObject); //# 05: ok - Expect.isFalse(d is Function); //# 06: ok -} diff --git a/tests/language_2/call/method_must_not_be_field_test.dart b/tests/language_2/call/method_must_not_be_field_test.dart deleted file mode 100644 index 6d178cb9cb3..00000000000 --- a/tests/language_2/call/method_must_not_be_field_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2018, 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 test program to test arithmetic operations. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class C { - void Function() call = () {}; -} - -main() { - C c = new C(); - dynamic d = c; - - // The presence of a field named `call` does not permit the class `C` to be - // implicitly called. - c(); //# 01: compile-time error - // Nor does it permit an implicit tear-off of `call`. - void Function() f = c; //# 02: compile-time error - // Nor does it permit a dynamic invocation of `call`. - Expect.throws(() => d()); //# 03: ok - - // However, all these things are possible if `call` is mentioned explicitly. - c.call(); //# 04: ok - void Function() f = c.call; //# 05: ok - d.call(); //# 06: ok - (d.call)(); //# 07: ok -} diff --git a/tests/language_2/call/method_must_not_be_getter_test.dart b/tests/language_2/call/method_must_not_be_getter_test.dart deleted file mode 100644 index f5bd0eb37de..00000000000 --- a/tests/language_2/call/method_must_not_be_getter_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2018, 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 test program to test arithmetic operations. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class C { - void Function() get call => () {}; -} - -class D { - get call => this; -} - -// Recurs outside the try-block to avoid disabling inlining. -callD() { - dynamic d = new D(); - d(); -} - -main() { - C c = new C(); - dynamic d = c; - - // The presence of a getter named `call` does not permit the class `C` to be - // implicitly called. - c(); //# 01: compile-time error - // Nor does it permit an implicit tear-off of `call`. - void Function() f = c; //# 02: compile-time error - // Nor does it permit a dynamic invocation of `call`. - Expect.throws(() => d()); //# 03: ok - // Same as previous line, but with a getter that can stack overflow if - // incorrect behavior is present. Merged from issue21159_test. - Expect.throwsNoSuchMethodError(() => callD()); //# 03: ok - - // However, all these things are possible if `call` is mentioned explicitly. - c.call(); //# 04: ok - void Function() f = c.call; //# 05: ok - d.call(); //# 06: ok -} diff --git a/tests/language_2/call/method_override_runtime_test.dart b/tests/language_2/call/method_override_runtime_test.dart deleted file mode 100644 index fc6b765417e..00000000000 --- a/tests/language_2/call/method_override_runtime_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 test program to test arithmetic operations. - -class B {} - -class C { - B call(B b) => b; -} - -typedef B BToB(B x); - -class D { - BToB f() => null; - void g(C x) {} -} - -class E extends D { - // This override is illegal because C is not a subtype of BToB. - - - // This override is illegal because BToB is not a supertype of C. - -} - -main() { - new E(); -} diff --git a/tests/language_2/call/method_override_test.dart b/tests/language_2/call/method_override_test.dart deleted file mode 100644 index f7b8c549403..00000000000 --- a/tests/language_2/call/method_override_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2018, 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 test program to test arithmetic operations. - -// @dart = 2.9 - -class B {} - -class C { - B call(B b) => b; -} - -typedef B BToB(B x); - -class D { - BToB f() => null; - void g(C x) {} -} - -class E extends D { - // This override is illegal because C is not a subtype of BToB. - C f() => null; - //^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE - // [cfe] The return type of the method 'E.f' is 'C', which does not match the return type, 'B Function(B)', of the overridden method, 'D.f'. - - // This override is illegal because BToB is not a supertype of C. - void g(BToB x) {} - // ^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE - // ^ - // [cfe] The parameter 'x' of the method 'E.g' has type 'B Function(B)', which does not match the corresponding type, 'C', in the overridden method, 'D.g'. -} - -main() { - new E(); -} diff --git a/tests/language_2/call/non_method_field_runtime_test.dart b/tests/language_2/call/non_method_field_runtime_test.dart deleted file mode 100644 index ff4606948f7..00000000000 --- a/tests/language_2/call/non_method_field_runtime_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -// Tests calling an object's field which is not a method. - -class Fisk { - int i; -} - -class Hest extends Fisk {} - -main() { - Fisk x1 = new Fisk(); - - - Hest x2 = new Hest(); - -} diff --git a/tests/language_2/call/non_method_field_test.dart b/tests/language_2/call/non_method_field_test.dart deleted file mode 100644 index 3e129c001e1..00000000000 --- a/tests/language_2/call/non_method_field_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2012, 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 - -// Tests calling an object's field which is not a method. - -class Fisk { - int i; -} - -class Hest extends Fisk {} - -main() { - Fisk x1 = new Fisk(); - x1.i(); -//^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION -// ^ -// [cfe] 'i' isn't a function or method and can't be invoked. - - Hest x2 = new Hest(); - x2.i(); -//^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION -// ^ -// [cfe] 'i' isn't a function or method and can't be invoked. -} diff --git a/tests/language_2/call/nonexistent_constructor_runtime_test.dart b/tests/language_2/call/nonexistent_constructor_runtime_test.dart deleted file mode 100644 index aaea0026ac9..00000000000 --- a/tests/language_2/call/nonexistent_constructor_runtime_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 "package:expect/expect.dart"; - -// When attempting to call a nonexistent constructor, check that a -// compile error is reported. - -foo() { - throw 'hest'; -} - -class A { - A.foo(var x) {} -} - -main() { - new A.foo(42); - - -} diff --git a/tests/language_2/call/nonexistent_constructor_test.dart b/tests/language_2/call/nonexistent_constructor_test.dart deleted file mode 100644 index 906b57dc73e..00000000000 --- a/tests/language_2/call/nonexistent_constructor_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// When attempting to call a nonexistent constructor, check that a -// compile error is reported. - -foo() { - throw 'hest'; -} - -class A { - A.foo(var x) {} -} - -main() { - new A.foo(42); - new A.bar(foo()); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR - // [cfe] Couldn't find constructor 'A.bar'. - new A(); - // ^ - // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT - // [cfe] Couldn't find constructor 'A'. -} diff --git a/tests/language_2/call/nonexistent_static_test.dart b/tests/language_2/call/nonexistent_static_test.dart deleted file mode 100644 index 170d3e6e799..00000000000 --- a/tests/language_2/call/nonexistent_static_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// When attempting to call a nonexistent static method, getter or setter, check -// that a compile error is reported. - -class C {} - -class D { - get hest => 1; //# 04: continued - set hest(val) {} //# 05: continued -} - -get fisk => 2; //# 09: continued -set fisk(val) {} //# 10: continued - -main() { - C.hest = 1; //# 01: compile-time error - C.hest; //# 02: compile-time error - C.hest(); //# 03: compile-time error - - D.hest = 1; //# 04: compile-time error - D.hest; //# 05: compile-time error - fisk = 1; //# 06: compile-time error - fisk; //# 07: compile-time error - fisk(); //# 08: compile-time error - fisk = 1; //# 09: compile-time error - fisk; //# 10: compile-time error -} diff --git a/tests/language_2/call/object_has_no_call_method_test.dart b/tests/language_2/call/object_has_no_call_method_test.dart deleted file mode 100644 index 40057b93229..00000000000 --- a/tests/language_2/call/object_has_no_call_method_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2017, 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 - -void test(dynamic d, Object o, Function f) { - d(); - o(); -//^ -// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION -// ^ -// [cfe] The method 'call' isn't defined for the class 'Object'. - f(); - d.call; - o.call; - //^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'call' isn't defined for the class 'Object'. - f.call; - d.call(); - o.call(); - //^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD - // [cfe] The method 'call' isn't defined for the class 'Object'. - f.call(); -} - -main() {} diff --git a/tests/language_2/call/object_has_no_call_runtime_1_test.dart b/tests/language_2/call/object_has_no_call_runtime_1_test.dart deleted file mode 100644 index e80d86b358b..00000000000 --- a/tests/language_2/call/object_has_no_call_runtime_1_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -void test(dynamic d, Object o, Function f) { - d(); - - - - - - - - -} - -main() {} diff --git a/tests/language_2/call/object_has_no_call_runtime_2_test.dart b/tests/language_2/call/object_has_no_call_runtime_2_test.dart deleted file mode 100644 index 29248019758..00000000000 --- a/tests/language_2/call/object_has_no_call_runtime_2_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -void test(dynamic d, Object o, Function f) { - - - f(); - - - - - - -} - -main() {} diff --git a/tests/language_2/call/object_has_no_call_runtime_3_test.dart b/tests/language_2/call/object_has_no_call_runtime_3_test.dart deleted file mode 100644 index 9056e42fcad..00000000000 --- a/tests/language_2/call/object_has_no_call_runtime_3_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -void test(dynamic d, Object o, Function f) { - - - - d.call; - - - - - -} - -main() {} diff --git a/tests/language_2/call/object_has_no_call_runtime_4_test.dart b/tests/language_2/call/object_has_no_call_runtime_4_test.dart deleted file mode 100644 index c04fe5b60bd..00000000000 --- a/tests/language_2/call/object_has_no_call_runtime_4_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -void test(dynamic d, Object o, Function f) { - - - - - - f.call; - - - -} - -main() {} diff --git a/tests/language_2/call/object_has_no_call_runtime_5_test.dart b/tests/language_2/call/object_has_no_call_runtime_5_test.dart deleted file mode 100644 index 961b4db36d1..00000000000 --- a/tests/language_2/call/object_has_no_call_runtime_5_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -void test(dynamic d, Object o, Function f) { - - - - - - - d.call(); - - -} - -main() {} diff --git a/tests/language_2/call/object_has_no_call_runtime_6_test.dart b/tests/language_2/call/object_has_no_call_runtime_6_test.dart deleted file mode 100644 index 5642d64d291..00000000000 --- a/tests/language_2/call/object_has_no_call_runtime_6_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -void test(dynamic d, Object o, Function f) { - - - - - - - - - f.call(); -} - -main() {} diff --git a/tests/language_2/call/object_has_no_call_runtime_test.dart b/tests/language_2/call/object_has_no_call_runtime_test.dart deleted file mode 100644 index 8ebd5dcd1dd..00000000000 --- a/tests/language_2/call/object_has_no_call_runtime_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -void test(dynamic d, Object o, Function f) { - - - - - - - - - -} - -main() {} diff --git a/tests/language_2/call/operator_test.dart b/tests/language_2/call/operator_test.dart deleted file mode 100644 index 18ccb3bd525..00000000000 --- a/tests/language_2/call/operator_test.dart +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// simple test with no types in signature -class A1 { - call() => 42; -} - -// same test, include return type -class A2 { - int call() => 35; -} - -class B { - call() => 28; -} - -// A call() operator can have any arity -class C { - call(arg) => 7 * arg; -} - -// Test named arguments -class D { - call([arg = 6]) => 7 * arg; -} - -// Non-trivial method body combination of positional and named. -class E { - String call(String str, {int count: 1}) { - StringBuffer buffer = new StringBuffer(); - for (var i = 0; i < count; i++) { - buffer.write(str); - if (i < count - 1) { - buffer.write(":"); - } - } - return buffer.toString(); - } -} - -main() { - var a1 = new A1(); - Expect.equals(42, a1()); - Expect.equals(42, a1.call()); - - var a2 = new A2(); - Expect.equals(35, a2()); - Expect.equals(35, a2.call()); - - var b = new B(); - Expect.equals(28, b()); - Expect.equals(28, b.call()); - - var c = new C(); - Expect.equals(42, c(6)); - Expect.equals(42, c.call(6)); - - var d = new D(); - Expect.equals(42, d()); - Expect.equals(7, d(1)); - Expect.equals(14, d(2)); - Expect.equals(42, d.call()); - Expect.equals(7, d.call(1)); - Expect.equals(14, d.call(2)); - - var e = new E(); - Expect.equals("foo", e("foo")); - Expect.equals("foo:foo", e("foo", count: 2)); - Expect.equals("foo:foo:foo", e("foo", count: 3)); - Expect.equals("foo", e.call("foo")); - Expect.equals("foo:foo", e.call("foo", count: 2)); - Expect.equals("foo:foo:foo", e.call("foo", count: 3)); - - Expect.isFalse(a1 is Function); //# 01: ok - Expect.isFalse(e is Function); //# 02: ok -} diff --git a/tests/language_2/call/property_test.dart b/tests/language_2/call/property_test.dart deleted file mode 100644 index 5f6ddbe7727..00000000000 --- a/tests/language_2/call/property_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that a class with a [call] property does not implement [Function] or -// a typedef of function type. - -import 'package:expect/expect.dart'; - -class Call { - int get call => 0; -} - -typedef void F(); - -main() { - Expect.isFalse(new Call() is Function); - Expect.isFalse(new Call() is F); -} diff --git a/tests/language_2/call/through_getter_runtime_test.dart b/tests/language_2/call/through_getter_runtime_test.dart deleted file mode 100644 index 1faba5dfc3b..00000000000 --- a/tests/language_2/call/through_getter_runtime_test.dart +++ /dev/null @@ -1,181 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -import "package:expect/expect.dart"; - -// Tests that we can call functions through getters. - -const TOP_LEVEL_CONST = 1; -const TOP_LEVEL_CONST_REF = TOP_LEVEL_CONST; -const TOP_LEVEL_NULL = null; - -var topLevel; - -class CallThroughGetterTest { - static void testMain() { - testTopLevel(); - testField(); - testGetter(); - testMethod(); - testEvaluationOrder(); - } - - static void testTopLevel() { - topLevel = () { - return 2; - }; - Expect.equals(1, TOP_LEVEL_CONST); - Expect.equals(1, TOP_LEVEL_CONST_REF); - Expect.equals(2, topLevel()); - - - - } - - static void testField() { - A a = new A(); - a.field = () => 42; - Expect.equals(42, a.field()); - Expect.equals(42, (a.field)()); - - a.field = () => 87; - Expect.equals(87, a.field()); - Expect.equals(87, (a.field)()); - - a.field = 99; - Expect.throwsNoSuchMethodError(() => a.field()); - Expect.throwsNoSuchMethodError(() => (a.field)()); - } - - static void testGetter() { - A a = new A(); - a.field = () => 42; - Expect.equals(42, a.getter()); - Expect.equals(42, (a.getter)()); - - a.field = () => 87; - Expect.equals(87, a.getter()); - Expect.equals(87, (a.getter)()); - - a.field = 99; - Expect.throwsNoSuchMethodError(() => a.getter()); - Expect.throwsNoSuchMethodError(() => (a.getter)()); - } - - static void testMethod() { - A a = new A(); - a.field = () => 42; - Expect.equals(true, a.method() is Function); - Expect.equals(42, a.method()()); - - a.field = () => 87; - Expect.equals(true, a.method() is Function); - Expect.equals(87, a.method()()); - - a.field = null; - Expect.equals(null, a.method()); - } - - static void testEvaluationOrder() { - B b = new B(); - Expect.equals("gf", b.g0()); - b = new B(); - Expect.equals("gf", (b.g0)()); - - b = new B(); - Expect.equals("xgf", b.g1(b.x)); - b = new B(); - Expect.equals("gxf", (b.g1)(b.x)); - - b = new B(); - Expect.equals("xygf", b.g2(b.x, b.y)); - b = new B(); - Expect.equals("gxyf", (b.g2)(b.x, b.y)); - - b = new B(); - Expect.equals("xyzgf", b.g3(b.x, b.y, b.z)); - b = new B(); - Expect.equals("gxyzf", (b.g3)(b.x, b.y, b.z)); - - b = new B(); - Expect.equals("yzxgf", b.g3(b.y, b.z, b.x)); - b = new B(); - Expect.equals("gyzxf", (b.g3)(b.y, b.z, b.x)); - } -} - -class A { - A() {} - var field; - get getter { - return field; - } - - method() { - return field; - } -} - -class B { - B() : _order = new StringBuffer("") {} - - get g0 { - _mark('g'); - return () { - return _mark('f'); - }; - } - - get g1 { - _mark('g'); - return (x) { - return _mark('f'); - }; - } - - get g2 { - _mark('g'); - return (x, y) { - return _mark('f'); - }; - } - - get g3 { - _mark('g'); - return (x, y, z) { - return _mark('f'); - }; - } - - get x { - _mark('x'); - return 0; - } - - get y { - _mark('y'); - return 1; - } - - get z { - _mark('z'); - return 2; - } - - _mark(m) { - _order.write(m); - return _order.toString(); - } - - StringBuffer _order; -} - -main() { - CallThroughGetterTest.testMain(); -} diff --git a/tests/language_2/call/through_getter_test.dart b/tests/language_2/call/through_getter_test.dart deleted file mode 100644 index 7a13b34fa7e..00000000000 --- a/tests/language_2/call/through_getter_test.dart +++ /dev/null @@ -1,186 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Tests that we can call functions through getters. - -const TOP_LEVEL_CONST = 1; -const TOP_LEVEL_CONST_REF = TOP_LEVEL_CONST; -const TOP_LEVEL_NULL = null; - -var topLevel; - -class CallThroughGetterTest { - static void testMain() { - testTopLevel(); - testField(); - testGetter(); - testMethod(); - testEvaluationOrder(); - } - - static void testTopLevel() { - topLevel = () { - return 2; - }; - Expect.equals(1, TOP_LEVEL_CONST); - Expect.equals(1, TOP_LEVEL_CONST_REF); - Expect.equals(2, topLevel()); - - TOP_LEVEL_CONST(); -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION -// ^ -// [cfe] The method 'call' isn't defined for the class 'int'. - (TOP_LEVEL_CONST)(); -// ^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION -// ^ -// [cfe] The method 'call' isn't defined for the class 'int'. - } - - static void testField() { - A a = new A(); - a.field = () => 42; - Expect.equals(42, a.field()); - Expect.equals(42, (a.field)()); - - a.field = () => 87; - Expect.equals(87, a.field()); - Expect.equals(87, (a.field)()); - - a.field = 99; - Expect.throwsNoSuchMethodError(() => a.field()); - Expect.throwsNoSuchMethodError(() => (a.field)()); - } - - static void testGetter() { - A a = new A(); - a.field = () => 42; - Expect.equals(42, a.getter()); - Expect.equals(42, (a.getter)()); - - a.field = () => 87; - Expect.equals(87, a.getter()); - Expect.equals(87, (a.getter)()); - - a.field = 99; - Expect.throwsNoSuchMethodError(() => a.getter()); - Expect.throwsNoSuchMethodError(() => (a.getter)()); - } - - static void testMethod() { - A a = new A(); - a.field = () => 42; - Expect.equals(true, a.method() is Function); - Expect.equals(42, a.method()()); - - a.field = () => 87; - Expect.equals(true, a.method() is Function); - Expect.equals(87, a.method()()); - - a.field = null; - Expect.equals(null, a.method()); - } - - static void testEvaluationOrder() { - B b = new B(); - Expect.equals("gf", b.g0()); - b = new B(); - Expect.equals("gf", (b.g0)()); - - b = new B(); - Expect.equals("xgf", b.g1(b.x)); - b = new B(); - Expect.equals("gxf", (b.g1)(b.x)); - - b = new B(); - Expect.equals("xygf", b.g2(b.x, b.y)); - b = new B(); - Expect.equals("gxyf", (b.g2)(b.x, b.y)); - - b = new B(); - Expect.equals("xyzgf", b.g3(b.x, b.y, b.z)); - b = new B(); - Expect.equals("gxyzf", (b.g3)(b.x, b.y, b.z)); - - b = new B(); - Expect.equals("yzxgf", b.g3(b.y, b.z, b.x)); - b = new B(); - Expect.equals("gyzxf", (b.g3)(b.y, b.z, b.x)); - } -} - -class A { - A() {} - var field; - get getter { - return field; - } - - method() { - return field; - } -} - -class B { - B() : _order = new StringBuffer("") {} - - get g0 { - _mark('g'); - return () { - return _mark('f'); - }; - } - - get g1 { - _mark('g'); - return (x) { - return _mark('f'); - }; - } - - get g2 { - _mark('g'); - return (x, y) { - return _mark('f'); - }; - } - - get g3 { - _mark('g'); - return (x, y, z) { - return _mark('f'); - }; - } - - get x { - _mark('x'); - return 0; - } - - get y { - _mark('y'); - return 1; - } - - get z { - _mark('z'); - return 2; - } - - _mark(m) { - _order.write(m); - return _order.toString(); - } - - StringBuffer _order; -} - -main() { - CallThroughGetterTest.testMain(); -} diff --git a/tests/language_2/call/through_null_getter_test.dart b/tests/language_2/call/through_null_getter_test.dart deleted file mode 100644 index 82d0a1adbba..00000000000 --- a/tests/language_2/call/through_null_getter_test.dart +++ /dev/null @@ -1,69 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Tests that we can call functions through getters which return null. - -const dynamic TOP_LEVEL_NULL = null; - -var topLevel; - -class CallThroughNullGetterTest { - static void testMain() { - testTopLevel(); - testField(); - testGetter(); - testMethod(); - } - - static void testTopLevel() { - topLevel = null; - Expect.throwsNoSuchMethodError(() => topLevel()); - Expect.throwsNoSuchMethodError(() => (topLevel)()); - Expect.throwsNoSuchMethodError(() => TOP_LEVEL_NULL()); - Expect.throwsNoSuchMethodError(() => (TOP_LEVEL_NULL)()); - } - - static void testField() { - A a = new A(); - - a.field = null; - Expect.throwsNoSuchMethodError(() => a.field()); - Expect.throwsNoSuchMethodError(() => (a.field)()); - } - - static void testGetter() { - A a = new A(); - - a.field = null; - Expect.throwsNoSuchMethodError(() => a.getter()); - Expect.throwsNoSuchMethodError(() => (a.getter)()); - } - - static void testMethod() { - A a = new A(); - - a.field = null; - Expect.throwsNoSuchMethodError(() => a.method()()); - } -} - -class A { - A() {} - var field; - get getter { - return field; - } - - method() { - return field; - } -} - -main() { - CallThroughNullGetterTest.testMain(); -} diff --git a/tests/language_2/call/type_literal_test.dart b/tests/language_2/call/type_literal_test.dart deleted file mode 100644 index f4a125cc6e1..00000000000 --- a/tests/language_2/call/type_literal_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2013, 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 - -class C { - void a() {} -} - -void main() { - C().a(); -} diff --git a/tests/language_2/call/with_no_such_method_test.dart b/tests/language_2/call/with_no_such_method_test.dart deleted file mode 100644 index 3b6413de271..00000000000 --- a/tests/language_2/call/with_no_such_method_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class F { - final int value; - F(this.value); - call() => value; - noSuchMethod(Invocation i) { - if (i.memberName == #call && i.isMethod) { - return i.positionalArguments[0]; - } - return super.noSuchMethod(i); - } -} - -main() { - F f = new F(42); - // Tears off f.call, fails with nSM (wrong number of arguments). - Expect.throwsNoSuchMethodError(() => Function.apply(f, ['a', 'b', 'c', 'd'])); - - dynamic d = f; - var result = d('a', 'b', 'c', 'd'); // calls F.noSuchMethod - Expect.equals('a', result); - - // Tears off f.call, call succeeds - Expect.equals(42, Function.apply(f, [])); -} diff --git a/tests/language_2/canonicalize/const2_test.dart b/tests/language_2/canonicalize/const2_test.dart deleted file mode 100644 index 4cc7f6ee250..00000000000 --- a/tests/language_2/canonicalize/const2_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Check that compile-time constants are correctly canonicalized. - -main() { - Expect.isFalse(identical(const [1, 2], const [1.0, 2.0])); -} diff --git a/tests/language_2/canonicalize/const3_test.dart b/tests/language_2/canonicalize/const3_test.dart deleted file mode 100644 index 453a75f5796..00000000000 --- a/tests/language_2/canonicalize/const3_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2013, 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. -// -// Check proper canonicalization (fields must be canonicalized as well). - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - Expect.isFalse(identical(new Duration(days: 1), new Duration(days: 1))); - Expect.isTrue(identical(const Duration(days: 2), const Duration(days: 2))); - Expect.isTrue(identical(const B(3.0), const B(3.0))); - Expect.isTrue(identical(const F(main), const F(main))); -} - -class A { - final a; - const A(v) : a = v + 3.4; -} - -class B extends A { - final b; - const B(v) - : b = v + 1.0, - super(v); -} - -class F { - final f; - const F(v) : f = v; -} diff --git a/tests/language_2/canonicalize/const_test.dart b/tests/language_2/canonicalize/const_test.dart deleted file mode 100644 index 50f0d344349..00000000000 --- a/tests/language_2/canonicalize/const_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// 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. -// Check that initializers of static const fields are compile time constants. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class CanonicalConstTest { - static const A = const C1(); - static const B = const C2(); - - static testMain() { - Expect.identical(null, null); - Expect.isFalse(identical(null, 0)); - Expect.identical(1, 1); - Expect.isFalse(identical(1, 2)); - Expect.identical(true, true); - Expect.identical("so", "so"); - Expect.identical(const Object(), const Object()); - Expect.isFalse(identical(const Object(), const C1())); - Expect.identical(const C1(), const C1()); - Expect.identical(A, const C1()); - Expect.isFalse(identical(const C1(), const C2())); - Expect.identical(B, const C2()); - Expect.isFalse(identical(const [2, 1], const [1, 2])); - Expect.identical(const [1, 2], const [1, 2]); - Expect.identical(const [1, 2], const [1, 2]); - Expect.isFalse(identical(const [1, 2], const [1.0, 2.0])); - Expect.identical(const {"a": 1, "b": 2}, const {"a": 1, "b": 2}); - Expect.isFalse(identical(const {"a": 1, "b": 2}, const {"a": 2, "b": 2})); - } -} - -class C1 { - const C1(); -} - -class C2 extends C1 { - const C2() : super(); -} - -main() { - CanonicalConstTest.testMain(); -} diff --git a/tests/language_2/canonicalize/hashing_memoize_array_test.dart b/tests/language_2/canonicalize/hashing_memoize_array_test.dart deleted file mode 100644 index dde26b25b37..00000000000 --- a/tests/language_2/canonicalize/hashing_memoize_array_test.dart +++ /dev/null @@ -1,220 +0,0 @@ -// 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. - -// @dart = 2.9 - -// If canonicalization uses deep structural hashing without memoizing, this -// will exhibit superlinear time. - -const list1_0 = [null, null]; -const list1_1 = [list1_0, list1_0]; -const list1_2 = [list1_1, list1_1]; -const list1_3 = [list1_2, list1_2]; -const list1_4 = [list1_3, list1_3]; -const list1_5 = [list1_4, list1_4]; -const list1_6 = [list1_5, list1_5]; -const list1_7 = [list1_6, list1_6]; -const list1_8 = [list1_7, list1_7]; -const list1_9 = [list1_8, list1_8]; -const list1_10 = [list1_9, list1_9]; -const list1_11 = [list1_10, list1_10]; -const list1_12 = [list1_11, list1_11]; -const list1_13 = [list1_12, list1_12]; -const list1_14 = [list1_13, list1_13]; -const list1_15 = [list1_14, list1_14]; -const list1_16 = [list1_15, list1_15]; -const list1_17 = [list1_16, list1_16]; -const list1_18 = [list1_17, list1_17]; -const list1_19 = [list1_18, list1_18]; -const list1_20 = [list1_19, list1_19]; -const list1_21 = [list1_20, list1_20]; -const list1_22 = [list1_21, list1_21]; -const list1_23 = [list1_22, list1_22]; -const list1_24 = [list1_23, list1_23]; -const list1_25 = [list1_24, list1_24]; -const list1_26 = [list1_25, list1_25]; -const list1_27 = [list1_26, list1_26]; -const list1_28 = [list1_27, list1_27]; -const list1_29 = [list1_28, list1_28]; -const list1_30 = [list1_29, list1_29]; -const list1_31 = [list1_30, list1_30]; -const list1_32 = [list1_31, list1_31]; -const list1_33 = [list1_32, list1_32]; -const list1_34 = [list1_33, list1_33]; -const list1_35 = [list1_34, list1_34]; -const list1_36 = [list1_35, list1_35]; -const list1_37 = [list1_36, list1_36]; -const list1_38 = [list1_37, list1_37]; -const list1_39 = [list1_38, list1_38]; -const list1_40 = [list1_39, list1_39]; -const list1_41 = [list1_40, list1_40]; -const list1_42 = [list1_41, list1_41]; -const list1_43 = [list1_42, list1_42]; -const list1_44 = [list1_43, list1_43]; -const list1_45 = [list1_44, list1_44]; -const list1_46 = [list1_45, list1_45]; -const list1_47 = [list1_46, list1_46]; -const list1_48 = [list1_47, list1_47]; -const list1_49 = [list1_48, list1_48]; -const list1_50 = [list1_49, list1_49]; -const list1_51 = [list1_50, list1_50]; -const list1_52 = [list1_51, list1_51]; -const list1_53 = [list1_52, list1_52]; -const list1_54 = [list1_53, list1_53]; -const list1_55 = [list1_54, list1_54]; -const list1_56 = [list1_55, list1_55]; -const list1_57 = [list1_56, list1_56]; -const list1_58 = [list1_57, list1_57]; -const list1_59 = [list1_58, list1_58]; -const list1_60 = [list1_59, list1_59]; -const list1_61 = [list1_60, list1_60]; -const list1_62 = [list1_61, list1_61]; -const list1_63 = [list1_62, list1_62]; -const list1_64 = [list1_63, list1_63]; -const list1_65 = [list1_64, list1_64]; -const list1_66 = [list1_65, list1_65]; -const list1_67 = [list1_66, list1_66]; -const list1_68 = [list1_67, list1_67]; -const list1_69 = [list1_68, list1_68]; -const list1_70 = [list1_69, list1_69]; -const list1_71 = [list1_70, list1_70]; -const list1_72 = [list1_71, list1_71]; -const list1_73 = [list1_72, list1_72]; -const list1_74 = [list1_73, list1_73]; -const list1_75 = [list1_74, list1_74]; -const list1_76 = [list1_75, list1_75]; -const list1_77 = [list1_76, list1_76]; -const list1_78 = [list1_77, list1_77]; -const list1_79 = [list1_78, list1_78]; -const list1_80 = [list1_79, list1_79]; -const list1_81 = [list1_80, list1_80]; -const list1_82 = [list1_81, list1_81]; -const list1_83 = [list1_82, list1_82]; -const list1_84 = [list1_83, list1_83]; -const list1_85 = [list1_84, list1_84]; -const list1_86 = [list1_85, list1_85]; -const list1_87 = [list1_86, list1_86]; -const list1_88 = [list1_87, list1_87]; -const list1_89 = [list1_88, list1_88]; -const list1_90 = [list1_89, list1_89]; -const list1_91 = [list1_90, list1_90]; -const list1_92 = [list1_91, list1_91]; -const list1_93 = [list1_92, list1_92]; -const list1_94 = [list1_93, list1_93]; -const list1_95 = [list1_94, list1_94]; -const list1_96 = [list1_95, list1_95]; -const list1_97 = [list1_96, list1_96]; -const list1_98 = [list1_97, list1_97]; -const list1_99 = [list1_98, list1_98]; - -const list2_0 = [null, null]; -const list2_1 = [list2_0, list2_0]; -const list2_2 = [list2_1, list2_1]; -const list2_3 = [list2_2, list2_2]; -const list2_4 = [list2_3, list2_3]; -const list2_5 = [list2_4, list2_4]; -const list2_6 = [list2_5, list2_5]; -const list2_7 = [list2_6, list2_6]; -const list2_8 = [list2_7, list2_7]; -const list2_9 = [list2_8, list2_8]; -const list2_10 = [list2_9, list2_9]; -const list2_11 = [list2_10, list2_10]; -const list2_12 = [list2_11, list2_11]; -const list2_13 = [list2_12, list2_12]; -const list2_14 = [list2_13, list2_13]; -const list2_15 = [list2_14, list2_14]; -const list2_16 = [list2_15, list2_15]; -const list2_17 = [list2_16, list2_16]; -const list2_18 = [list2_17, list2_17]; -const list2_19 = [list2_18, list2_18]; -const list2_20 = [list2_19, list2_19]; -const list2_21 = [list2_20, list2_20]; -const list2_22 = [list2_21, list2_21]; -const list2_23 = [list2_22, list2_22]; -const list2_24 = [list2_23, list2_23]; -const list2_25 = [list2_24, list2_24]; -const list2_26 = [list2_25, list2_25]; -const list2_27 = [list2_26, list2_26]; -const list2_28 = [list2_27, list2_27]; -const list2_29 = [list2_28, list2_28]; -const list2_30 = [list2_29, list2_29]; -const list2_31 = [list2_30, list2_30]; -const list2_32 = [list2_31, list2_31]; -const list2_33 = [list2_32, list2_32]; -const list2_34 = [list2_33, list2_33]; -const list2_35 = [list2_34, list2_34]; -const list2_36 = [list2_35, list2_35]; -const list2_37 = [list2_36, list2_36]; -const list2_38 = [list2_37, list2_37]; -const list2_39 = [list2_38, list2_38]; -const list2_40 = [list2_39, list2_39]; -const list2_41 = [list2_40, list2_40]; -const list2_42 = [list2_41, list2_41]; -const list2_43 = [list2_42, list2_42]; -const list2_44 = [list2_43, list2_43]; -const list2_45 = [list2_44, list2_44]; -const list2_46 = [list2_45, list2_45]; -const list2_47 = [list2_46, list2_46]; -const list2_48 = [list2_47, list2_47]; -const list2_49 = [list2_48, list2_48]; -const list2_50 = [list2_49, list2_49]; -const list2_51 = [list2_50, list2_50]; -const list2_52 = [list2_51, list2_51]; -const list2_53 = [list2_52, list2_52]; -const list2_54 = [list2_53, list2_53]; -const list2_55 = [list2_54, list2_54]; -const list2_56 = [list2_55, list2_55]; -const list2_57 = [list2_56, list2_56]; -const list2_58 = [list2_57, list2_57]; -const list2_59 = [list2_58, list2_58]; -const list2_60 = [list2_59, list2_59]; -const list2_61 = [list2_60, list2_60]; -const list2_62 = [list2_61, list2_61]; -const list2_63 = [list2_62, list2_62]; -const list2_64 = [list2_63, list2_63]; -const list2_65 = [list2_64, list2_64]; -const list2_66 = [list2_65, list2_65]; -const list2_67 = [list2_66, list2_66]; -const list2_68 = [list2_67, list2_67]; -const list2_69 = [list2_68, list2_68]; -const list2_70 = [list2_69, list2_69]; -const list2_71 = [list2_70, list2_70]; -const list2_72 = [list2_71, list2_71]; -const list2_73 = [list2_72, list2_72]; -const list2_74 = [list2_73, list2_73]; -const list2_75 = [list2_74, list2_74]; -const list2_76 = [list2_75, list2_75]; -const list2_77 = [list2_76, list2_76]; -const list2_78 = [list2_77, list2_77]; -const list2_79 = [list2_78, list2_78]; -const list2_80 = [list2_79, list2_79]; -const list2_81 = [list2_80, list2_80]; -const list2_82 = [list2_81, list2_81]; -const list2_83 = [list2_82, list2_82]; -const list2_84 = [list2_83, list2_83]; -const list2_85 = [list2_84, list2_84]; -const list2_86 = [list2_85, list2_85]; -const list2_87 = [list2_86, list2_86]; -const list2_88 = [list2_87, list2_87]; -const list2_89 = [list2_88, list2_88]; -const list2_90 = [list2_89, list2_89]; -const list2_91 = [list2_90, list2_90]; -const list2_92 = [list2_91, list2_91]; -const list2_93 = [list2_92, list2_92]; -const list2_94 = [list2_93, list2_93]; -const list2_95 = [list2_94, list2_94]; -const list2_96 = [list2_95, list2_95]; -const list2_97 = [list2_96, list2_96]; -const list2_98 = [list2_97, list2_97]; -const list2_99 = [list2_98, list2_98]; - -confuse(x) { - try { throw x; } catch (e) { return e; } -} - -main() { - if (!identical(confuse(list1_99), confuse(list2_99))) { - throw new Exception("list1_99 !== list2_99"); - } -} diff --git a/tests/language_2/canonicalize/hashing_memoize_instance_test.dart b/tests/language_2/canonicalize/hashing_memoize_instance_test.dart deleted file mode 100644 index 613d391a82c..00000000000 --- a/tests/language_2/canonicalize/hashing_memoize_instance_test.dart +++ /dev/null @@ -1,226 +0,0 @@ -// 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. - -// @dart = 2.9 - -// If canonicalization uses deep structural hashing without memoizing, this -// will exhibit superlinear time. - -class Box { - final Object content1; - final Object content2; - const Box(this.content1, this.content2); -} - -const box1_0 = Box(null, null); -const box1_1 = Box(box1_0, box1_0); -const box1_2 = Box(box1_1, box1_1); -const box1_3 = Box(box1_2, box1_2); -const box1_4 = Box(box1_3, box1_3); -const box1_5 = Box(box1_4, box1_4); -const box1_6 = Box(box1_5, box1_5); -const box1_7 = Box(box1_6, box1_6); -const box1_8 = Box(box1_7, box1_7); -const box1_9 = Box(box1_8, box1_8); -const box1_10 = Box(box1_9, box1_9); -const box1_11 = Box(box1_10, box1_10); -const box1_12 = Box(box1_11, box1_11); -const box1_13 = Box(box1_12, box1_12); -const box1_14 = Box(box1_13, box1_13); -const box1_15 = Box(box1_14, box1_14); -const box1_16 = Box(box1_15, box1_15); -const box1_17 = Box(box1_16, box1_16); -const box1_18 = Box(box1_17, box1_17); -const box1_19 = Box(box1_18, box1_18); -const box1_20 = Box(box1_19, box1_19); -const box1_21 = Box(box1_20, box1_20); -const box1_22 = Box(box1_21, box1_21); -const box1_23 = Box(box1_22, box1_22); -const box1_24 = Box(box1_23, box1_23); -const box1_25 = Box(box1_24, box1_24); -const box1_26 = Box(box1_25, box1_25); -const box1_27 = Box(box1_26, box1_26); -const box1_28 = Box(box1_27, box1_27); -const box1_29 = Box(box1_28, box1_28); -const box1_30 = Box(box1_29, box1_29); -const box1_31 = Box(box1_30, box1_30); -const box1_32 = Box(box1_31, box1_31); -const box1_33 = Box(box1_32, box1_32); -const box1_34 = Box(box1_33, box1_33); -const box1_35 = Box(box1_34, box1_34); -const box1_36 = Box(box1_35, box1_35); -const box1_37 = Box(box1_36, box1_36); -const box1_38 = Box(box1_37, box1_37); -const box1_39 = Box(box1_38, box1_38); -const box1_40 = Box(box1_39, box1_39); -const box1_41 = Box(box1_40, box1_40); -const box1_42 = Box(box1_41, box1_41); -const box1_43 = Box(box1_42, box1_42); -const box1_44 = Box(box1_43, box1_43); -const box1_45 = Box(box1_44, box1_44); -const box1_46 = Box(box1_45, box1_45); -const box1_47 = Box(box1_46, box1_46); -const box1_48 = Box(box1_47, box1_47); -const box1_49 = Box(box1_48, box1_48); -const box1_50 = Box(box1_49, box1_49); -const box1_51 = Box(box1_50, box1_50); -const box1_52 = Box(box1_51, box1_51); -const box1_53 = Box(box1_52, box1_52); -const box1_54 = Box(box1_53, box1_53); -const box1_55 = Box(box1_54, box1_54); -const box1_56 = Box(box1_55, box1_55); -const box1_57 = Box(box1_56, box1_56); -const box1_58 = Box(box1_57, box1_57); -const box1_59 = Box(box1_58, box1_58); -const box1_60 = Box(box1_59, box1_59); -const box1_61 = Box(box1_60, box1_60); -const box1_62 = Box(box1_61, box1_61); -const box1_63 = Box(box1_62, box1_62); -const box1_64 = Box(box1_63, box1_63); -const box1_65 = Box(box1_64, box1_64); -const box1_66 = Box(box1_65, box1_65); -const box1_67 = Box(box1_66, box1_66); -const box1_68 = Box(box1_67, box1_67); -const box1_69 = Box(box1_68, box1_68); -const box1_70 = Box(box1_69, box1_69); -const box1_71 = Box(box1_70, box1_70); -const box1_72 = Box(box1_71, box1_71); -const box1_73 = Box(box1_72, box1_72); -const box1_74 = Box(box1_73, box1_73); -const box1_75 = Box(box1_74, box1_74); -const box1_76 = Box(box1_75, box1_75); -const box1_77 = Box(box1_76, box1_76); -const box1_78 = Box(box1_77, box1_77); -const box1_79 = Box(box1_78, box1_78); -const box1_80 = Box(box1_79, box1_79); -const box1_81 = Box(box1_80, box1_80); -const box1_82 = Box(box1_81, box1_81); -const box1_83 = Box(box1_82, box1_82); -const box1_84 = Box(box1_83, box1_83); -const box1_85 = Box(box1_84, box1_84); -const box1_86 = Box(box1_85, box1_85); -const box1_87 = Box(box1_86, box1_86); -const box1_88 = Box(box1_87, box1_87); -const box1_89 = Box(box1_88, box1_88); -const box1_90 = Box(box1_89, box1_89); -const box1_91 = Box(box1_90, box1_90); -const box1_92 = Box(box1_91, box1_91); -const box1_93 = Box(box1_92, box1_92); -const box1_94 = Box(box1_93, box1_93); -const box1_95 = Box(box1_94, box1_94); -const box1_96 = Box(box1_95, box1_95); -const box1_97 = Box(box1_96, box1_96); -const box1_98 = Box(box1_97, box1_97); -const box1_99 = Box(box1_98, box1_98); - -const box2_0 = Box(null, null); -const box2_1 = Box(box2_0, box2_0); -const box2_2 = Box(box2_1, box2_1); -const box2_3 = Box(box2_2, box2_2); -const box2_4 = Box(box2_3, box2_3); -const box2_5 = Box(box2_4, box2_4); -const box2_6 = Box(box2_5, box2_5); -const box2_7 = Box(box2_6, box2_6); -const box2_8 = Box(box2_7, box2_7); -const box2_9 = Box(box2_8, box2_8); -const box2_10 = Box(box2_9, box2_9); -const box2_11 = Box(box2_10, box2_10); -const box2_12 = Box(box2_11, box2_11); -const box2_13 = Box(box2_12, box2_12); -const box2_14 = Box(box2_13, box2_13); -const box2_15 = Box(box2_14, box2_14); -const box2_16 = Box(box2_15, box2_15); -const box2_17 = Box(box2_16, box2_16); -const box2_18 = Box(box2_17, box2_17); -const box2_19 = Box(box2_18, box2_18); -const box2_20 = Box(box2_19, box2_19); -const box2_21 = Box(box2_20, box2_20); -const box2_22 = Box(box2_21, box2_21); -const box2_23 = Box(box2_22, box2_22); -const box2_24 = Box(box2_23, box2_23); -const box2_25 = Box(box2_24, box2_24); -const box2_26 = Box(box2_25, box2_25); -const box2_27 = Box(box2_26, box2_26); -const box2_28 = Box(box2_27, box2_27); -const box2_29 = Box(box2_28, box2_28); -const box2_30 = Box(box2_29, box2_29); -const box2_31 = Box(box2_30, box2_30); -const box2_32 = Box(box2_31, box2_31); -const box2_33 = Box(box2_32, box2_32); -const box2_34 = Box(box2_33, box2_33); -const box2_35 = Box(box2_34, box2_34); -const box2_36 = Box(box2_35, box2_35); -const box2_37 = Box(box2_36, box2_36); -const box2_38 = Box(box2_37, box2_37); -const box2_39 = Box(box2_38, box2_38); -const box2_40 = Box(box2_39, box2_39); -const box2_41 = Box(box2_40, box2_40); -const box2_42 = Box(box2_41, box2_41); -const box2_43 = Box(box2_42, box2_42); -const box2_44 = Box(box2_43, box2_43); -const box2_45 = Box(box2_44, box2_44); -const box2_46 = Box(box2_45, box2_45); -const box2_47 = Box(box2_46, box2_46); -const box2_48 = Box(box2_47, box2_47); -const box2_49 = Box(box2_48, box2_48); -const box2_50 = Box(box2_49, box2_49); -const box2_51 = Box(box2_50, box2_50); -const box2_52 = Box(box2_51, box2_51); -const box2_53 = Box(box2_52, box2_52); -const box2_54 = Box(box2_53, box2_53); -const box2_55 = Box(box2_54, box2_54); -const box2_56 = Box(box2_55, box2_55); -const box2_57 = Box(box2_56, box2_56); -const box2_58 = Box(box2_57, box2_57); -const box2_59 = Box(box2_58, box2_58); -const box2_60 = Box(box2_59, box2_59); -const box2_61 = Box(box2_60, box2_60); -const box2_62 = Box(box2_61, box2_61); -const box2_63 = Box(box2_62, box2_62); -const box2_64 = Box(box2_63, box2_63); -const box2_65 = Box(box2_64, box2_64); -const box2_66 = Box(box2_65, box2_65); -const box2_67 = Box(box2_66, box2_66); -const box2_68 = Box(box2_67, box2_67); -const box2_69 = Box(box2_68, box2_68); -const box2_70 = Box(box2_69, box2_69); -const box2_71 = Box(box2_70, box2_70); -const box2_72 = Box(box2_71, box2_71); -const box2_73 = Box(box2_72, box2_72); -const box2_74 = Box(box2_73, box2_73); -const box2_75 = Box(box2_74, box2_74); -const box2_76 = Box(box2_75, box2_75); -const box2_77 = Box(box2_76, box2_76); -const box2_78 = Box(box2_77, box2_77); -const box2_79 = Box(box2_78, box2_78); -const box2_80 = Box(box2_79, box2_79); -const box2_81 = Box(box2_80, box2_80); -const box2_82 = Box(box2_81, box2_81); -const box2_83 = Box(box2_82, box2_82); -const box2_84 = Box(box2_83, box2_83); -const box2_85 = Box(box2_84, box2_84); -const box2_86 = Box(box2_85, box2_85); -const box2_87 = Box(box2_86, box2_86); -const box2_88 = Box(box2_87, box2_87); -const box2_89 = Box(box2_88, box2_88); -const box2_90 = Box(box2_89, box2_89); -const box2_91 = Box(box2_90, box2_90); -const box2_92 = Box(box2_91, box2_91); -const box2_93 = Box(box2_92, box2_92); -const box2_94 = Box(box2_93, box2_93); -const box2_95 = Box(box2_94, box2_94); -const box2_96 = Box(box2_95, box2_95); -const box2_97 = Box(box2_96, box2_96); -const box2_98 = Box(box2_97, box2_97); -const box2_99 = Box(box2_98, box2_98); - -confuse(x) { - try { throw x; } catch (e) { return e; } -} - -main() { - if (!identical(confuse(box1_99), confuse(box2_99))) { - throw new Exception("box1_99 !== box2_99"); - } -} diff --git a/tests/language_2/canonicalize/hashing_shallow_collision_array_test.dart b/tests/language_2/canonicalize/hashing_shallow_collision_array_test.dart deleted file mode 100644 index 38de63769e3..00000000000 --- a/tests/language_2/canonicalize/hashing_shallow_collision_array_test.dart +++ /dev/null @@ -1,20026 +0,0 @@ -// 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. - -// @dart = 2.9 - -// If canonicalization hashes with only a field's cid, this will exhibit -// quadratic time. - -// 10,000 elements. -const list1 = [ -[[0]], -[[1]], -[[2]], -[[3]], -[[4]], -[[5]], -[[6]], -[[7]], -[[8]], -[[9]], -[[10]], -[[11]], -[[12]], -[[13]], -[[14]], -[[15]], -[[16]], -[[17]], -[[18]], -[[19]], -[[20]], -[[21]], -[[22]], -[[23]], -[[24]], -[[25]], -[[26]], -[[27]], -[[28]], -[[29]], -[[30]], -[[31]], -[[32]], -[[33]], -[[34]], -[[35]], -[[36]], -[[37]], -[[38]], -[[39]], -[[40]], -[[41]], -[[42]], -[[43]], -[[44]], -[[45]], -[[46]], -[[47]], -[[48]], -[[49]], -[[50]], -[[51]], -[[52]], -[[53]], -[[54]], -[[55]], -[[56]], -[[57]], -[[58]], -[[59]], -[[60]], -[[61]], -[[62]], -[[63]], -[[64]], -[[65]], -[[66]], -[[67]], -[[68]], -[[69]], -[[70]], -[[71]], -[[72]], -[[73]], -[[74]], -[[75]], -[[76]], -[[77]], -[[78]], -[[79]], -[[80]], -[[81]], -[[82]], -[[83]], -[[84]], -[[85]], -[[86]], -[[87]], -[[88]], -[[89]], -[[90]], -[[91]], -[[92]], -[[93]], -[[94]], -[[95]], -[[96]], -[[97]], -[[98]], -[[99]], -[[100]], -[[101]], -[[102]], -[[103]], -[[104]], -[[105]], -[[106]], -[[107]], -[[108]], -[[109]], -[[110]], -[[111]], -[[112]], -[[113]], -[[114]], -[[115]], -[[116]], -[[117]], -[[118]], -[[119]], -[[120]], -[[121]], -[[122]], -[[123]], -[[124]], -[[125]], -[[126]], -[[127]], -[[128]], -[[129]], -[[130]], -[[131]], -[[132]], -[[133]], -[[134]], -[[135]], -[[136]], -[[137]], -[[138]], -[[139]], -[[140]], -[[141]], -[[142]], -[[143]], -[[144]], -[[145]], -[[146]], -[[147]], -[[148]], -[[149]], -[[150]], -[[151]], -[[152]], -[[153]], -[[154]], -[[155]], -[[156]], -[[157]], -[[158]], -[[159]], -[[160]], -[[161]], -[[162]], -[[163]], -[[164]], -[[165]], -[[166]], -[[167]], -[[168]], -[[169]], -[[170]], -[[171]], -[[172]], -[[173]], -[[174]], -[[175]], -[[176]], -[[177]], -[[178]], -[[179]], -[[180]], -[[181]], -[[182]], -[[183]], -[[184]], -[[185]], -[[186]], -[[187]], -[[188]], -[[189]], -[[190]], -[[191]], -[[192]], -[[193]], -[[194]], -[[195]], -[[196]], -[[197]], -[[198]], -[[199]], -[[200]], -[[201]], -[[202]], -[[203]], -[[204]], -[[205]], -[[206]], -[[207]], -[[208]], -[[209]], -[[210]], -[[211]], -[[212]], -[[213]], -[[214]], -[[215]], -[[216]], -[[217]], -[[218]], -[[219]], -[[220]], -[[221]], -[[222]], -[[223]], -[[224]], -[[225]], -[[226]], -[[227]], -[[228]], -[[229]], -[[230]], -[[231]], -[[232]], -[[233]], -[[234]], -[[235]], -[[236]], -[[237]], -[[238]], -[[239]], -[[240]], -[[241]], -[[242]], -[[243]], -[[244]], -[[245]], -[[246]], -[[247]], -[[248]], -[[249]], -[[250]], -[[251]], -[[252]], -[[253]], -[[254]], -[[255]], -[[256]], -[[257]], -[[258]], -[[259]], -[[260]], -[[261]], -[[262]], -[[263]], -[[264]], -[[265]], -[[266]], -[[267]], -[[268]], -[[269]], -[[270]], -[[271]], -[[272]], -[[273]], -[[274]], -[[275]], -[[276]], -[[277]], -[[278]], -[[279]], -[[280]], -[[281]], -[[282]], -[[283]], -[[284]], -[[285]], -[[286]], -[[287]], -[[288]], -[[289]], -[[290]], -[[291]], -[[292]], -[[293]], -[[294]], -[[295]], -[[296]], -[[297]], -[[298]], -[[299]], -[[300]], -[[301]], -[[302]], -[[303]], -[[304]], -[[305]], -[[306]], -[[307]], -[[308]], -[[309]], -[[310]], -[[311]], -[[312]], -[[313]], -[[314]], -[[315]], -[[316]], -[[317]], -[[318]], -[[319]], -[[320]], -[[321]], -[[322]], -[[323]], -[[324]], -[[325]], -[[326]], -[[327]], -[[328]], -[[329]], -[[330]], -[[331]], -[[332]], -[[333]], -[[334]], -[[335]], -[[336]], -[[337]], -[[338]], -[[339]], -[[340]], -[[341]], -[[342]], -[[343]], -[[344]], -[[345]], -[[346]], -[[347]], -[[348]], -[[349]], -[[350]], -[[351]], -[[352]], -[[353]], -[[354]], -[[355]], -[[356]], -[[357]], -[[358]], -[[359]], -[[360]], -[[361]], -[[362]], -[[363]], -[[364]], -[[365]], -[[366]], -[[367]], -[[368]], -[[369]], -[[370]], -[[371]], -[[372]], -[[373]], -[[374]], -[[375]], -[[376]], -[[377]], -[[378]], -[[379]], -[[380]], -[[381]], -[[382]], -[[383]], -[[384]], -[[385]], -[[386]], -[[387]], -[[388]], -[[389]], -[[390]], -[[391]], -[[392]], -[[393]], -[[394]], -[[395]], -[[396]], -[[397]], -[[398]], -[[399]], -[[400]], -[[401]], -[[402]], -[[403]], -[[404]], -[[405]], -[[406]], -[[407]], -[[408]], -[[409]], -[[410]], -[[411]], -[[412]], -[[413]], -[[414]], -[[415]], -[[416]], -[[417]], -[[418]], -[[419]], -[[420]], -[[421]], -[[422]], -[[423]], -[[424]], -[[425]], -[[426]], -[[427]], -[[428]], -[[429]], -[[430]], -[[431]], -[[432]], -[[433]], -[[434]], -[[435]], -[[436]], -[[437]], -[[438]], -[[439]], -[[440]], -[[441]], -[[442]], -[[443]], -[[444]], -[[445]], -[[446]], -[[447]], -[[448]], -[[449]], -[[450]], -[[451]], -[[452]], -[[453]], -[[454]], -[[455]], -[[456]], -[[457]], -[[458]], -[[459]], -[[460]], -[[461]], -[[462]], -[[463]], -[[464]], -[[465]], -[[466]], -[[467]], -[[468]], -[[469]], -[[470]], -[[471]], -[[472]], -[[473]], -[[474]], -[[475]], -[[476]], -[[477]], -[[478]], -[[479]], -[[480]], -[[481]], -[[482]], -[[483]], -[[484]], -[[485]], -[[486]], -[[487]], -[[488]], -[[489]], -[[490]], -[[491]], -[[492]], -[[493]], -[[494]], -[[495]], -[[496]], -[[497]], -[[498]], -[[499]], -[[500]], -[[501]], -[[502]], -[[503]], -[[504]], -[[505]], -[[506]], -[[507]], -[[508]], -[[509]], -[[510]], -[[511]], -[[512]], -[[513]], -[[514]], -[[515]], -[[516]], -[[517]], -[[518]], -[[519]], -[[520]], -[[521]], -[[522]], -[[523]], -[[524]], -[[525]], -[[526]], -[[527]], -[[528]], -[[529]], -[[530]], -[[531]], -[[532]], -[[533]], -[[534]], -[[535]], -[[536]], -[[537]], -[[538]], -[[539]], -[[540]], -[[541]], -[[542]], -[[543]], -[[544]], -[[545]], -[[546]], -[[547]], -[[548]], -[[549]], -[[550]], -[[551]], -[[552]], -[[553]], -[[554]], -[[555]], -[[556]], -[[557]], -[[558]], -[[559]], -[[560]], -[[561]], -[[562]], -[[563]], -[[564]], -[[565]], -[[566]], -[[567]], -[[568]], -[[569]], -[[570]], -[[571]], -[[572]], -[[573]], -[[574]], -[[575]], -[[576]], -[[577]], -[[578]], -[[579]], -[[580]], -[[581]], -[[582]], -[[583]], -[[584]], -[[585]], -[[586]], -[[587]], -[[588]], -[[589]], -[[590]], -[[591]], -[[592]], -[[593]], -[[594]], -[[595]], -[[596]], -[[597]], -[[598]], -[[599]], -[[600]], -[[601]], -[[602]], -[[603]], -[[604]], -[[605]], -[[606]], -[[607]], -[[608]], -[[609]], -[[610]], -[[611]], -[[612]], -[[613]], -[[614]], -[[615]], -[[616]], -[[617]], -[[618]], -[[619]], -[[620]], -[[621]], -[[622]], -[[623]], -[[624]], -[[625]], -[[626]], -[[627]], -[[628]], -[[629]], -[[630]], -[[631]], -[[632]], -[[633]], -[[634]], -[[635]], -[[636]], -[[637]], -[[638]], -[[639]], -[[640]], -[[641]], -[[642]], -[[643]], -[[644]], -[[645]], -[[646]], -[[647]], -[[648]], -[[649]], -[[650]], -[[651]], -[[652]], -[[653]], -[[654]], -[[655]], -[[656]], -[[657]], -[[658]], -[[659]], -[[660]], -[[661]], -[[662]], -[[663]], -[[664]], -[[665]], -[[666]], -[[667]], -[[668]], -[[669]], -[[670]], -[[671]], -[[672]], -[[673]], -[[674]], -[[675]], -[[676]], -[[677]], -[[678]], -[[679]], -[[680]], -[[681]], -[[682]], -[[683]], -[[684]], -[[685]], -[[686]], -[[687]], -[[688]], -[[689]], -[[690]], -[[691]], -[[692]], -[[693]], -[[694]], -[[695]], -[[696]], -[[697]], -[[698]], -[[699]], -[[700]], -[[701]], -[[702]], -[[703]], -[[704]], -[[705]], -[[706]], -[[707]], -[[708]], -[[709]], -[[710]], -[[711]], -[[712]], -[[713]], -[[714]], -[[715]], -[[716]], -[[717]], -[[718]], -[[719]], -[[720]], -[[721]], -[[722]], -[[723]], -[[724]], -[[725]], -[[726]], -[[727]], -[[728]], -[[729]], -[[730]], -[[731]], -[[732]], -[[733]], -[[734]], -[[735]], -[[736]], -[[737]], -[[738]], -[[739]], -[[740]], -[[741]], -[[742]], -[[743]], -[[744]], -[[745]], -[[746]], -[[747]], -[[748]], -[[749]], -[[750]], -[[751]], -[[752]], -[[753]], -[[754]], -[[755]], -[[756]], -[[757]], -[[758]], -[[759]], -[[760]], -[[761]], -[[762]], -[[763]], -[[764]], -[[765]], -[[766]], -[[767]], -[[768]], -[[769]], -[[770]], -[[771]], -[[772]], -[[773]], -[[774]], -[[775]], -[[776]], -[[777]], -[[778]], -[[779]], -[[780]], -[[781]], -[[782]], -[[783]], -[[784]], -[[785]], -[[786]], -[[787]], -[[788]], -[[789]], -[[790]], -[[791]], -[[792]], -[[793]], -[[794]], -[[795]], -[[796]], -[[797]], -[[798]], -[[799]], -[[800]], -[[801]], -[[802]], -[[803]], -[[804]], -[[805]], -[[806]], -[[807]], -[[808]], -[[809]], -[[810]], -[[811]], -[[812]], -[[813]], -[[814]], -[[815]], -[[816]], -[[817]], -[[818]], -[[819]], -[[820]], -[[821]], -[[822]], -[[823]], -[[824]], -[[825]], -[[826]], -[[827]], -[[828]], -[[829]], -[[830]], -[[831]], -[[832]], -[[833]], -[[834]], -[[835]], -[[836]], -[[837]], -[[838]], -[[839]], -[[840]], -[[841]], -[[842]], -[[843]], -[[844]], -[[845]], -[[846]], -[[847]], -[[848]], -[[849]], -[[850]], -[[851]], -[[852]], -[[853]], -[[854]], -[[855]], -[[856]], -[[857]], -[[858]], -[[859]], -[[860]], -[[861]], -[[862]], -[[863]], -[[864]], -[[865]], -[[866]], -[[867]], -[[868]], -[[869]], -[[870]], -[[871]], -[[872]], -[[873]], -[[874]], -[[875]], -[[876]], -[[877]], -[[878]], -[[879]], -[[880]], -[[881]], -[[882]], -[[883]], -[[884]], -[[885]], -[[886]], -[[887]], -[[888]], -[[889]], -[[890]], -[[891]], -[[892]], -[[893]], -[[894]], -[[895]], -[[896]], -[[897]], -[[898]], -[[899]], -[[900]], -[[901]], -[[902]], -[[903]], -[[904]], -[[905]], -[[906]], -[[907]], -[[908]], -[[909]], -[[910]], -[[911]], -[[912]], -[[913]], -[[914]], -[[915]], -[[916]], -[[917]], -[[918]], -[[919]], -[[920]], -[[921]], -[[922]], -[[923]], -[[924]], -[[925]], -[[926]], -[[927]], -[[928]], -[[929]], -[[930]], -[[931]], -[[932]], -[[933]], -[[934]], -[[935]], -[[936]], -[[937]], -[[938]], -[[939]], -[[940]], -[[941]], -[[942]], -[[943]], -[[944]], -[[945]], -[[946]], -[[947]], -[[948]], -[[949]], -[[950]], -[[951]], -[[952]], -[[953]], -[[954]], -[[955]], -[[956]], -[[957]], -[[958]], -[[959]], -[[960]], -[[961]], -[[962]], -[[963]], -[[964]], -[[965]], -[[966]], -[[967]], -[[968]], -[[969]], -[[970]], -[[971]], -[[972]], -[[973]], -[[974]], -[[975]], -[[976]], -[[977]], -[[978]], -[[979]], -[[980]], -[[981]], -[[982]], -[[983]], -[[984]], -[[985]], -[[986]], -[[987]], -[[988]], -[[989]], -[[990]], -[[991]], -[[992]], -[[993]], -[[994]], -[[995]], -[[996]], -[[997]], -[[998]], -[[999]], -[[1000]], -[[1001]], -[[1002]], -[[1003]], -[[1004]], -[[1005]], -[[1006]], -[[1007]], -[[1008]], -[[1009]], -[[1010]], -[[1011]], -[[1012]], -[[1013]], -[[1014]], -[[1015]], -[[1016]], -[[1017]], -[[1018]], -[[1019]], -[[1020]], -[[1021]], -[[1022]], -[[1023]], -[[1024]], -[[1025]], -[[1026]], -[[1027]], -[[1028]], -[[1029]], -[[1030]], -[[1031]], -[[1032]], -[[1033]], -[[1034]], -[[1035]], -[[1036]], -[[1037]], -[[1038]], -[[1039]], -[[1040]], -[[1041]], -[[1042]], -[[1043]], -[[1044]], -[[1045]], -[[1046]], -[[1047]], -[[1048]], -[[1049]], -[[1050]], -[[1051]], -[[1052]], -[[1053]], -[[1054]], -[[1055]], -[[1056]], -[[1057]], -[[1058]], -[[1059]], -[[1060]], -[[1061]], -[[1062]], -[[1063]], -[[1064]], -[[1065]], -[[1066]], -[[1067]], -[[1068]], -[[1069]], -[[1070]], -[[1071]], -[[1072]], -[[1073]], -[[1074]], -[[1075]], -[[1076]], -[[1077]], -[[1078]], -[[1079]], -[[1080]], -[[1081]], -[[1082]], -[[1083]], -[[1084]], -[[1085]], -[[1086]], -[[1087]], -[[1088]], -[[1089]], -[[1090]], -[[1091]], -[[1092]], -[[1093]], -[[1094]], -[[1095]], -[[1096]], -[[1097]], -[[1098]], -[[1099]], -[[1100]], -[[1101]], -[[1102]], -[[1103]], -[[1104]], -[[1105]], -[[1106]], -[[1107]], -[[1108]], -[[1109]], -[[1110]], -[[1111]], -[[1112]], -[[1113]], -[[1114]], -[[1115]], -[[1116]], -[[1117]], -[[1118]], -[[1119]], -[[1120]], -[[1121]], -[[1122]], -[[1123]], -[[1124]], -[[1125]], -[[1126]], -[[1127]], -[[1128]], -[[1129]], -[[1130]], -[[1131]], -[[1132]], -[[1133]], -[[1134]], -[[1135]], -[[1136]], -[[1137]], -[[1138]], -[[1139]], -[[1140]], -[[1141]], -[[1142]], -[[1143]], -[[1144]], -[[1145]], -[[1146]], -[[1147]], -[[1148]], -[[1149]], -[[1150]], -[[1151]], -[[1152]], -[[1153]], -[[1154]], -[[1155]], -[[1156]], -[[1157]], -[[1158]], -[[1159]], -[[1160]], -[[1161]], -[[1162]], -[[1163]], -[[1164]], -[[1165]], -[[1166]], -[[1167]], -[[1168]], -[[1169]], -[[1170]], -[[1171]], -[[1172]], -[[1173]], -[[1174]], -[[1175]], -[[1176]], -[[1177]], -[[1178]], -[[1179]], -[[1180]], -[[1181]], -[[1182]], -[[1183]], -[[1184]], -[[1185]], -[[1186]], -[[1187]], -[[1188]], -[[1189]], -[[1190]], -[[1191]], -[[1192]], -[[1193]], -[[1194]], -[[1195]], -[[1196]], -[[1197]], -[[1198]], -[[1199]], -[[1200]], -[[1201]], -[[1202]], -[[1203]], -[[1204]], -[[1205]], -[[1206]], -[[1207]], -[[1208]], -[[1209]], -[[1210]], -[[1211]], -[[1212]], -[[1213]], -[[1214]], -[[1215]], -[[1216]], -[[1217]], -[[1218]], -[[1219]], -[[1220]], -[[1221]], -[[1222]], -[[1223]], -[[1224]], -[[1225]], -[[1226]], -[[1227]], -[[1228]], -[[1229]], -[[1230]], -[[1231]], -[[1232]], -[[1233]], -[[1234]], -[[1235]], -[[1236]], -[[1237]], -[[1238]], -[[1239]], -[[1240]], -[[1241]], -[[1242]], -[[1243]], -[[1244]], -[[1245]], -[[1246]], -[[1247]], -[[1248]], -[[1249]], -[[1250]], -[[1251]], -[[1252]], -[[1253]], -[[1254]], -[[1255]], -[[1256]], -[[1257]], -[[1258]], -[[1259]], -[[1260]], -[[1261]], -[[1262]], -[[1263]], -[[1264]], -[[1265]], -[[1266]], -[[1267]], -[[1268]], -[[1269]], -[[1270]], -[[1271]], -[[1272]], -[[1273]], -[[1274]], -[[1275]], -[[1276]], -[[1277]], -[[1278]], -[[1279]], -[[1280]], -[[1281]], -[[1282]], -[[1283]], -[[1284]], -[[1285]], -[[1286]], -[[1287]], -[[1288]], -[[1289]], -[[1290]], -[[1291]], -[[1292]], -[[1293]], -[[1294]], -[[1295]], -[[1296]], -[[1297]], -[[1298]], -[[1299]], -[[1300]], -[[1301]], -[[1302]], -[[1303]], -[[1304]], -[[1305]], -[[1306]], -[[1307]], -[[1308]], -[[1309]], -[[1310]], -[[1311]], -[[1312]], -[[1313]], -[[1314]], -[[1315]], -[[1316]], -[[1317]], -[[1318]], -[[1319]], -[[1320]], -[[1321]], -[[1322]], -[[1323]], -[[1324]], -[[1325]], -[[1326]], -[[1327]], -[[1328]], -[[1329]], -[[1330]], -[[1331]], -[[1332]], -[[1333]], -[[1334]], -[[1335]], -[[1336]], -[[1337]], -[[1338]], -[[1339]], -[[1340]], -[[1341]], -[[1342]], -[[1343]], -[[1344]], -[[1345]], -[[1346]], -[[1347]], -[[1348]], -[[1349]], -[[1350]], -[[1351]], -[[1352]], -[[1353]], -[[1354]], -[[1355]], -[[1356]], -[[1357]], -[[1358]], -[[1359]], -[[1360]], -[[1361]], -[[1362]], -[[1363]], -[[1364]], -[[1365]], -[[1366]], -[[1367]], -[[1368]], -[[1369]], -[[1370]], -[[1371]], -[[1372]], -[[1373]], -[[1374]], -[[1375]], -[[1376]], -[[1377]], -[[1378]], -[[1379]], -[[1380]], -[[1381]], -[[1382]], -[[1383]], -[[1384]], -[[1385]], -[[1386]], -[[1387]], -[[1388]], -[[1389]], -[[1390]], -[[1391]], -[[1392]], -[[1393]], -[[1394]], -[[1395]], -[[1396]], -[[1397]], -[[1398]], -[[1399]], -[[1400]], -[[1401]], -[[1402]], -[[1403]], -[[1404]], -[[1405]], -[[1406]], -[[1407]], -[[1408]], -[[1409]], -[[1410]], -[[1411]], -[[1412]], -[[1413]], -[[1414]], -[[1415]], -[[1416]], -[[1417]], -[[1418]], -[[1419]], -[[1420]], -[[1421]], -[[1422]], -[[1423]], -[[1424]], -[[1425]], -[[1426]], -[[1427]], -[[1428]], -[[1429]], -[[1430]], -[[1431]], -[[1432]], -[[1433]], -[[1434]], -[[1435]], -[[1436]], -[[1437]], -[[1438]], -[[1439]], -[[1440]], -[[1441]], -[[1442]], -[[1443]], -[[1444]], -[[1445]], -[[1446]], -[[1447]], -[[1448]], -[[1449]], -[[1450]], -[[1451]], -[[1452]], -[[1453]], -[[1454]], -[[1455]], -[[1456]], -[[1457]], -[[1458]], -[[1459]], -[[1460]], -[[1461]], -[[1462]], -[[1463]], -[[1464]], -[[1465]], -[[1466]], -[[1467]], -[[1468]], -[[1469]], -[[1470]], -[[1471]], -[[1472]], -[[1473]], -[[1474]], -[[1475]], -[[1476]], -[[1477]], -[[1478]], -[[1479]], -[[1480]], -[[1481]], -[[1482]], -[[1483]], -[[1484]], -[[1485]], -[[1486]], -[[1487]], -[[1488]], -[[1489]], -[[1490]], -[[1491]], -[[1492]], -[[1493]], -[[1494]], -[[1495]], -[[1496]], -[[1497]], -[[1498]], -[[1499]], -[[1500]], -[[1501]], -[[1502]], -[[1503]], -[[1504]], -[[1505]], -[[1506]], -[[1507]], -[[1508]], -[[1509]], -[[1510]], -[[1511]], -[[1512]], -[[1513]], -[[1514]], -[[1515]], -[[1516]], -[[1517]], -[[1518]], -[[1519]], -[[1520]], -[[1521]], -[[1522]], -[[1523]], -[[1524]], -[[1525]], -[[1526]], -[[1527]], -[[1528]], -[[1529]], -[[1530]], -[[1531]], -[[1532]], -[[1533]], -[[1534]], -[[1535]], -[[1536]], -[[1537]], -[[1538]], -[[1539]], -[[1540]], -[[1541]], -[[1542]], -[[1543]], -[[1544]], -[[1545]], -[[1546]], -[[1547]], -[[1548]], -[[1549]], -[[1550]], -[[1551]], -[[1552]], -[[1553]], -[[1554]], -[[1555]], -[[1556]], -[[1557]], -[[1558]], -[[1559]], -[[1560]], -[[1561]], -[[1562]], -[[1563]], -[[1564]], -[[1565]], -[[1566]], -[[1567]], -[[1568]], -[[1569]], -[[1570]], -[[1571]], -[[1572]], -[[1573]], -[[1574]], -[[1575]], -[[1576]], -[[1577]], -[[1578]], -[[1579]], -[[1580]], -[[1581]], -[[1582]], -[[1583]], -[[1584]], -[[1585]], -[[1586]], -[[1587]], -[[1588]], -[[1589]], -[[1590]], -[[1591]], -[[1592]], -[[1593]], -[[1594]], -[[1595]], -[[1596]], -[[1597]], -[[1598]], -[[1599]], -[[1600]], -[[1601]], -[[1602]], -[[1603]], -[[1604]], -[[1605]], -[[1606]], -[[1607]], -[[1608]], -[[1609]], -[[1610]], -[[1611]], -[[1612]], -[[1613]], -[[1614]], -[[1615]], -[[1616]], -[[1617]], -[[1618]], -[[1619]], -[[1620]], -[[1621]], -[[1622]], -[[1623]], -[[1624]], -[[1625]], -[[1626]], -[[1627]], -[[1628]], -[[1629]], -[[1630]], -[[1631]], -[[1632]], -[[1633]], -[[1634]], -[[1635]], -[[1636]], -[[1637]], -[[1638]], -[[1639]], -[[1640]], -[[1641]], -[[1642]], -[[1643]], -[[1644]], -[[1645]], -[[1646]], -[[1647]], -[[1648]], -[[1649]], -[[1650]], -[[1651]], -[[1652]], -[[1653]], -[[1654]], -[[1655]], -[[1656]], -[[1657]], -[[1658]], -[[1659]], -[[1660]], -[[1661]], -[[1662]], -[[1663]], -[[1664]], -[[1665]], -[[1666]], -[[1667]], -[[1668]], -[[1669]], -[[1670]], -[[1671]], -[[1672]], -[[1673]], -[[1674]], -[[1675]], -[[1676]], -[[1677]], -[[1678]], -[[1679]], -[[1680]], -[[1681]], -[[1682]], -[[1683]], -[[1684]], -[[1685]], -[[1686]], -[[1687]], -[[1688]], -[[1689]], -[[1690]], -[[1691]], -[[1692]], -[[1693]], -[[1694]], -[[1695]], -[[1696]], -[[1697]], -[[1698]], -[[1699]], -[[1700]], -[[1701]], -[[1702]], -[[1703]], -[[1704]], -[[1705]], -[[1706]], -[[1707]], -[[1708]], -[[1709]], -[[1710]], -[[1711]], -[[1712]], -[[1713]], -[[1714]], -[[1715]], -[[1716]], -[[1717]], -[[1718]], -[[1719]], -[[1720]], -[[1721]], -[[1722]], -[[1723]], -[[1724]], -[[1725]], -[[1726]], -[[1727]], -[[1728]], -[[1729]], -[[1730]], -[[1731]], -[[1732]], -[[1733]], -[[1734]], -[[1735]], -[[1736]], -[[1737]], -[[1738]], -[[1739]], -[[1740]], -[[1741]], -[[1742]], -[[1743]], -[[1744]], -[[1745]], -[[1746]], -[[1747]], -[[1748]], -[[1749]], -[[1750]], -[[1751]], -[[1752]], -[[1753]], -[[1754]], -[[1755]], -[[1756]], -[[1757]], -[[1758]], -[[1759]], -[[1760]], -[[1761]], -[[1762]], -[[1763]], -[[1764]], -[[1765]], -[[1766]], -[[1767]], -[[1768]], -[[1769]], -[[1770]], -[[1771]], -[[1772]], -[[1773]], -[[1774]], -[[1775]], -[[1776]], -[[1777]], -[[1778]], -[[1779]], -[[1780]], -[[1781]], -[[1782]], -[[1783]], -[[1784]], -[[1785]], -[[1786]], -[[1787]], -[[1788]], -[[1789]], -[[1790]], -[[1791]], -[[1792]], -[[1793]], -[[1794]], -[[1795]], -[[1796]], -[[1797]], -[[1798]], -[[1799]], -[[1800]], -[[1801]], -[[1802]], -[[1803]], -[[1804]], -[[1805]], -[[1806]], -[[1807]], -[[1808]], -[[1809]], -[[1810]], -[[1811]], -[[1812]], -[[1813]], -[[1814]], -[[1815]], -[[1816]], -[[1817]], -[[1818]], -[[1819]], -[[1820]], -[[1821]], -[[1822]], -[[1823]], -[[1824]], -[[1825]], -[[1826]], -[[1827]], -[[1828]], -[[1829]], -[[1830]], -[[1831]], -[[1832]], -[[1833]], -[[1834]], -[[1835]], -[[1836]], -[[1837]], -[[1838]], -[[1839]], -[[1840]], -[[1841]], -[[1842]], -[[1843]], -[[1844]], -[[1845]], -[[1846]], -[[1847]], -[[1848]], -[[1849]], -[[1850]], -[[1851]], -[[1852]], -[[1853]], -[[1854]], -[[1855]], -[[1856]], -[[1857]], -[[1858]], -[[1859]], -[[1860]], -[[1861]], -[[1862]], -[[1863]], -[[1864]], -[[1865]], -[[1866]], -[[1867]], -[[1868]], -[[1869]], -[[1870]], -[[1871]], -[[1872]], -[[1873]], -[[1874]], -[[1875]], -[[1876]], -[[1877]], -[[1878]], -[[1879]], -[[1880]], -[[1881]], -[[1882]], -[[1883]], -[[1884]], -[[1885]], -[[1886]], -[[1887]], -[[1888]], -[[1889]], -[[1890]], -[[1891]], -[[1892]], -[[1893]], -[[1894]], -[[1895]], -[[1896]], -[[1897]], -[[1898]], -[[1899]], -[[1900]], -[[1901]], -[[1902]], -[[1903]], -[[1904]], -[[1905]], -[[1906]], -[[1907]], -[[1908]], -[[1909]], -[[1910]], -[[1911]], -[[1912]], -[[1913]], -[[1914]], -[[1915]], -[[1916]], -[[1917]], -[[1918]], -[[1919]], -[[1920]], -[[1921]], -[[1922]], -[[1923]], -[[1924]], -[[1925]], -[[1926]], -[[1927]], -[[1928]], -[[1929]], -[[1930]], -[[1931]], -[[1932]], -[[1933]], -[[1934]], -[[1935]], -[[1936]], -[[1937]], -[[1938]], -[[1939]], -[[1940]], -[[1941]], -[[1942]], -[[1943]], -[[1944]], -[[1945]], -[[1946]], -[[1947]], -[[1948]], -[[1949]], -[[1950]], -[[1951]], -[[1952]], -[[1953]], -[[1954]], -[[1955]], -[[1956]], -[[1957]], -[[1958]], -[[1959]], -[[1960]], -[[1961]], -[[1962]], -[[1963]], -[[1964]], -[[1965]], -[[1966]], -[[1967]], -[[1968]], -[[1969]], -[[1970]], -[[1971]], -[[1972]], -[[1973]], -[[1974]], -[[1975]], -[[1976]], -[[1977]], -[[1978]], -[[1979]], -[[1980]], -[[1981]], -[[1982]], -[[1983]], -[[1984]], -[[1985]], -[[1986]], -[[1987]], -[[1988]], -[[1989]], -[[1990]], -[[1991]], -[[1992]], -[[1993]], -[[1994]], -[[1995]], -[[1996]], -[[1997]], -[[1998]], -[[1999]], -[[2000]], -[[2001]], -[[2002]], -[[2003]], -[[2004]], -[[2005]], -[[2006]], -[[2007]], -[[2008]], -[[2009]], -[[2010]], -[[2011]], -[[2012]], -[[2013]], -[[2014]], -[[2015]], -[[2016]], -[[2017]], -[[2018]], -[[2019]], -[[2020]], -[[2021]], -[[2022]], -[[2023]], -[[2024]], -[[2025]], -[[2026]], -[[2027]], -[[2028]], -[[2029]], -[[2030]], -[[2031]], -[[2032]], -[[2033]], -[[2034]], -[[2035]], -[[2036]], -[[2037]], -[[2038]], -[[2039]], -[[2040]], -[[2041]], -[[2042]], -[[2043]], -[[2044]], -[[2045]], -[[2046]], -[[2047]], -[[2048]], -[[2049]], -[[2050]], -[[2051]], -[[2052]], -[[2053]], -[[2054]], -[[2055]], -[[2056]], -[[2057]], -[[2058]], -[[2059]], -[[2060]], -[[2061]], -[[2062]], -[[2063]], -[[2064]], -[[2065]], -[[2066]], -[[2067]], -[[2068]], -[[2069]], -[[2070]], -[[2071]], -[[2072]], -[[2073]], -[[2074]], -[[2075]], -[[2076]], -[[2077]], -[[2078]], -[[2079]], -[[2080]], -[[2081]], -[[2082]], -[[2083]], -[[2084]], -[[2085]], -[[2086]], -[[2087]], -[[2088]], -[[2089]], -[[2090]], -[[2091]], -[[2092]], -[[2093]], -[[2094]], -[[2095]], -[[2096]], -[[2097]], -[[2098]], -[[2099]], -[[2100]], -[[2101]], -[[2102]], -[[2103]], -[[2104]], -[[2105]], -[[2106]], -[[2107]], -[[2108]], -[[2109]], -[[2110]], -[[2111]], -[[2112]], -[[2113]], -[[2114]], -[[2115]], -[[2116]], -[[2117]], -[[2118]], -[[2119]], -[[2120]], -[[2121]], -[[2122]], -[[2123]], -[[2124]], -[[2125]], -[[2126]], -[[2127]], -[[2128]], -[[2129]], -[[2130]], -[[2131]], -[[2132]], -[[2133]], -[[2134]], -[[2135]], -[[2136]], -[[2137]], -[[2138]], -[[2139]], -[[2140]], -[[2141]], -[[2142]], -[[2143]], -[[2144]], -[[2145]], -[[2146]], -[[2147]], -[[2148]], -[[2149]], -[[2150]], -[[2151]], -[[2152]], -[[2153]], -[[2154]], -[[2155]], -[[2156]], -[[2157]], -[[2158]], -[[2159]], -[[2160]], -[[2161]], -[[2162]], -[[2163]], -[[2164]], -[[2165]], -[[2166]], -[[2167]], -[[2168]], -[[2169]], -[[2170]], -[[2171]], -[[2172]], -[[2173]], -[[2174]], -[[2175]], -[[2176]], -[[2177]], -[[2178]], -[[2179]], -[[2180]], -[[2181]], -[[2182]], -[[2183]], -[[2184]], -[[2185]], -[[2186]], -[[2187]], -[[2188]], -[[2189]], -[[2190]], -[[2191]], -[[2192]], -[[2193]], -[[2194]], -[[2195]], -[[2196]], -[[2197]], -[[2198]], -[[2199]], -[[2200]], -[[2201]], -[[2202]], -[[2203]], -[[2204]], -[[2205]], -[[2206]], -[[2207]], -[[2208]], -[[2209]], -[[2210]], -[[2211]], -[[2212]], -[[2213]], -[[2214]], -[[2215]], -[[2216]], -[[2217]], -[[2218]], -[[2219]], -[[2220]], -[[2221]], -[[2222]], -[[2223]], -[[2224]], -[[2225]], -[[2226]], -[[2227]], -[[2228]], -[[2229]], -[[2230]], -[[2231]], -[[2232]], -[[2233]], -[[2234]], -[[2235]], -[[2236]], -[[2237]], -[[2238]], -[[2239]], -[[2240]], -[[2241]], -[[2242]], -[[2243]], -[[2244]], -[[2245]], -[[2246]], -[[2247]], -[[2248]], -[[2249]], -[[2250]], -[[2251]], -[[2252]], -[[2253]], -[[2254]], -[[2255]], -[[2256]], -[[2257]], -[[2258]], -[[2259]], -[[2260]], -[[2261]], -[[2262]], -[[2263]], -[[2264]], -[[2265]], -[[2266]], -[[2267]], -[[2268]], -[[2269]], -[[2270]], -[[2271]], -[[2272]], -[[2273]], -[[2274]], -[[2275]], -[[2276]], -[[2277]], -[[2278]], -[[2279]], -[[2280]], -[[2281]], -[[2282]], -[[2283]], -[[2284]], -[[2285]], -[[2286]], -[[2287]], -[[2288]], -[[2289]], -[[2290]], -[[2291]], -[[2292]], -[[2293]], -[[2294]], -[[2295]], -[[2296]], -[[2297]], -[[2298]], -[[2299]], -[[2300]], -[[2301]], -[[2302]], -[[2303]], -[[2304]], -[[2305]], -[[2306]], -[[2307]], -[[2308]], -[[2309]], -[[2310]], -[[2311]], -[[2312]], -[[2313]], -[[2314]], -[[2315]], -[[2316]], -[[2317]], -[[2318]], -[[2319]], -[[2320]], -[[2321]], -[[2322]], -[[2323]], -[[2324]], -[[2325]], -[[2326]], -[[2327]], -[[2328]], -[[2329]], -[[2330]], -[[2331]], -[[2332]], -[[2333]], -[[2334]], -[[2335]], -[[2336]], -[[2337]], -[[2338]], -[[2339]], -[[2340]], -[[2341]], -[[2342]], -[[2343]], -[[2344]], -[[2345]], -[[2346]], -[[2347]], -[[2348]], -[[2349]], -[[2350]], -[[2351]], -[[2352]], -[[2353]], -[[2354]], -[[2355]], -[[2356]], -[[2357]], -[[2358]], -[[2359]], -[[2360]], -[[2361]], -[[2362]], -[[2363]], -[[2364]], -[[2365]], -[[2366]], -[[2367]], -[[2368]], -[[2369]], -[[2370]], -[[2371]], -[[2372]], -[[2373]], -[[2374]], -[[2375]], -[[2376]], -[[2377]], -[[2378]], -[[2379]], -[[2380]], -[[2381]], -[[2382]], -[[2383]], -[[2384]], -[[2385]], -[[2386]], -[[2387]], -[[2388]], -[[2389]], -[[2390]], -[[2391]], -[[2392]], -[[2393]], -[[2394]], -[[2395]], -[[2396]], -[[2397]], -[[2398]], -[[2399]], -[[2400]], -[[2401]], -[[2402]], -[[2403]], -[[2404]], -[[2405]], -[[2406]], -[[2407]], -[[2408]], -[[2409]], -[[2410]], -[[2411]], -[[2412]], -[[2413]], -[[2414]], -[[2415]], -[[2416]], -[[2417]], -[[2418]], -[[2419]], -[[2420]], -[[2421]], -[[2422]], -[[2423]], -[[2424]], -[[2425]], -[[2426]], -[[2427]], -[[2428]], -[[2429]], -[[2430]], -[[2431]], -[[2432]], -[[2433]], -[[2434]], -[[2435]], -[[2436]], -[[2437]], -[[2438]], -[[2439]], -[[2440]], -[[2441]], -[[2442]], -[[2443]], -[[2444]], -[[2445]], -[[2446]], -[[2447]], -[[2448]], -[[2449]], -[[2450]], -[[2451]], -[[2452]], -[[2453]], -[[2454]], -[[2455]], -[[2456]], -[[2457]], -[[2458]], -[[2459]], -[[2460]], -[[2461]], -[[2462]], -[[2463]], -[[2464]], -[[2465]], -[[2466]], -[[2467]], -[[2468]], -[[2469]], -[[2470]], -[[2471]], -[[2472]], -[[2473]], -[[2474]], -[[2475]], -[[2476]], -[[2477]], -[[2478]], -[[2479]], -[[2480]], -[[2481]], -[[2482]], -[[2483]], -[[2484]], -[[2485]], -[[2486]], -[[2487]], -[[2488]], -[[2489]], -[[2490]], -[[2491]], -[[2492]], -[[2493]], -[[2494]], -[[2495]], -[[2496]], -[[2497]], -[[2498]], -[[2499]], -[[2500]], -[[2501]], -[[2502]], -[[2503]], -[[2504]], -[[2505]], -[[2506]], -[[2507]], -[[2508]], -[[2509]], -[[2510]], -[[2511]], -[[2512]], -[[2513]], -[[2514]], -[[2515]], -[[2516]], -[[2517]], -[[2518]], -[[2519]], -[[2520]], -[[2521]], -[[2522]], -[[2523]], -[[2524]], -[[2525]], -[[2526]], -[[2527]], -[[2528]], -[[2529]], -[[2530]], -[[2531]], -[[2532]], -[[2533]], -[[2534]], -[[2535]], -[[2536]], -[[2537]], -[[2538]], -[[2539]], -[[2540]], -[[2541]], -[[2542]], -[[2543]], -[[2544]], -[[2545]], -[[2546]], -[[2547]], -[[2548]], -[[2549]], -[[2550]], -[[2551]], -[[2552]], -[[2553]], -[[2554]], -[[2555]], -[[2556]], -[[2557]], -[[2558]], -[[2559]], -[[2560]], -[[2561]], -[[2562]], -[[2563]], -[[2564]], -[[2565]], -[[2566]], -[[2567]], -[[2568]], -[[2569]], -[[2570]], -[[2571]], -[[2572]], -[[2573]], -[[2574]], -[[2575]], -[[2576]], -[[2577]], -[[2578]], -[[2579]], -[[2580]], -[[2581]], -[[2582]], -[[2583]], -[[2584]], -[[2585]], -[[2586]], -[[2587]], -[[2588]], -[[2589]], -[[2590]], -[[2591]], -[[2592]], -[[2593]], -[[2594]], -[[2595]], -[[2596]], -[[2597]], -[[2598]], -[[2599]], -[[2600]], -[[2601]], -[[2602]], -[[2603]], -[[2604]], -[[2605]], -[[2606]], -[[2607]], -[[2608]], -[[2609]], -[[2610]], -[[2611]], -[[2612]], -[[2613]], -[[2614]], -[[2615]], -[[2616]], -[[2617]], -[[2618]], -[[2619]], -[[2620]], -[[2621]], -[[2622]], -[[2623]], -[[2624]], -[[2625]], -[[2626]], -[[2627]], -[[2628]], -[[2629]], -[[2630]], -[[2631]], -[[2632]], -[[2633]], -[[2634]], -[[2635]], -[[2636]], -[[2637]], -[[2638]], -[[2639]], -[[2640]], -[[2641]], -[[2642]], -[[2643]], -[[2644]], -[[2645]], -[[2646]], -[[2647]], -[[2648]], -[[2649]], -[[2650]], -[[2651]], -[[2652]], -[[2653]], -[[2654]], -[[2655]], -[[2656]], -[[2657]], -[[2658]], -[[2659]], -[[2660]], -[[2661]], -[[2662]], -[[2663]], -[[2664]], -[[2665]], -[[2666]], -[[2667]], -[[2668]], -[[2669]], -[[2670]], -[[2671]], -[[2672]], -[[2673]], -[[2674]], -[[2675]], -[[2676]], -[[2677]], -[[2678]], -[[2679]], -[[2680]], -[[2681]], -[[2682]], -[[2683]], -[[2684]], -[[2685]], -[[2686]], -[[2687]], -[[2688]], -[[2689]], -[[2690]], -[[2691]], -[[2692]], -[[2693]], -[[2694]], -[[2695]], -[[2696]], -[[2697]], -[[2698]], -[[2699]], -[[2700]], -[[2701]], -[[2702]], -[[2703]], -[[2704]], -[[2705]], -[[2706]], -[[2707]], -[[2708]], -[[2709]], -[[2710]], -[[2711]], -[[2712]], -[[2713]], -[[2714]], -[[2715]], -[[2716]], -[[2717]], -[[2718]], -[[2719]], -[[2720]], -[[2721]], -[[2722]], -[[2723]], -[[2724]], -[[2725]], -[[2726]], -[[2727]], -[[2728]], -[[2729]], -[[2730]], -[[2731]], -[[2732]], -[[2733]], -[[2734]], -[[2735]], -[[2736]], -[[2737]], -[[2738]], -[[2739]], -[[2740]], -[[2741]], -[[2742]], -[[2743]], -[[2744]], -[[2745]], -[[2746]], -[[2747]], -[[2748]], -[[2749]], -[[2750]], -[[2751]], -[[2752]], -[[2753]], -[[2754]], -[[2755]], -[[2756]], -[[2757]], -[[2758]], -[[2759]], -[[2760]], -[[2761]], -[[2762]], -[[2763]], -[[2764]], -[[2765]], -[[2766]], -[[2767]], -[[2768]], -[[2769]], -[[2770]], -[[2771]], -[[2772]], -[[2773]], -[[2774]], -[[2775]], -[[2776]], -[[2777]], -[[2778]], -[[2779]], -[[2780]], -[[2781]], -[[2782]], -[[2783]], -[[2784]], -[[2785]], -[[2786]], -[[2787]], -[[2788]], -[[2789]], -[[2790]], -[[2791]], -[[2792]], -[[2793]], -[[2794]], -[[2795]], -[[2796]], -[[2797]], -[[2798]], -[[2799]], -[[2800]], -[[2801]], -[[2802]], -[[2803]], -[[2804]], -[[2805]], -[[2806]], -[[2807]], -[[2808]], -[[2809]], -[[2810]], -[[2811]], -[[2812]], -[[2813]], -[[2814]], -[[2815]], -[[2816]], -[[2817]], -[[2818]], -[[2819]], -[[2820]], -[[2821]], -[[2822]], -[[2823]], -[[2824]], -[[2825]], -[[2826]], -[[2827]], -[[2828]], -[[2829]], -[[2830]], -[[2831]], -[[2832]], -[[2833]], -[[2834]], -[[2835]], -[[2836]], -[[2837]], -[[2838]], -[[2839]], -[[2840]], -[[2841]], -[[2842]], -[[2843]], -[[2844]], -[[2845]], -[[2846]], -[[2847]], -[[2848]], -[[2849]], -[[2850]], -[[2851]], -[[2852]], -[[2853]], -[[2854]], -[[2855]], -[[2856]], -[[2857]], -[[2858]], -[[2859]], -[[2860]], -[[2861]], -[[2862]], -[[2863]], -[[2864]], -[[2865]], -[[2866]], -[[2867]], -[[2868]], -[[2869]], -[[2870]], -[[2871]], -[[2872]], -[[2873]], -[[2874]], -[[2875]], -[[2876]], -[[2877]], -[[2878]], -[[2879]], -[[2880]], -[[2881]], -[[2882]], -[[2883]], -[[2884]], -[[2885]], -[[2886]], -[[2887]], -[[2888]], -[[2889]], -[[2890]], -[[2891]], -[[2892]], -[[2893]], -[[2894]], -[[2895]], -[[2896]], -[[2897]], -[[2898]], -[[2899]], -[[2900]], -[[2901]], -[[2902]], -[[2903]], -[[2904]], -[[2905]], -[[2906]], -[[2907]], -[[2908]], -[[2909]], -[[2910]], -[[2911]], -[[2912]], -[[2913]], -[[2914]], -[[2915]], -[[2916]], -[[2917]], -[[2918]], -[[2919]], -[[2920]], -[[2921]], -[[2922]], -[[2923]], -[[2924]], -[[2925]], -[[2926]], -[[2927]], -[[2928]], -[[2929]], -[[2930]], -[[2931]], -[[2932]], -[[2933]], -[[2934]], -[[2935]], -[[2936]], -[[2937]], -[[2938]], -[[2939]], -[[2940]], -[[2941]], -[[2942]], -[[2943]], -[[2944]], -[[2945]], -[[2946]], -[[2947]], -[[2948]], -[[2949]], -[[2950]], -[[2951]], -[[2952]], -[[2953]], -[[2954]], -[[2955]], -[[2956]], -[[2957]], -[[2958]], -[[2959]], -[[2960]], -[[2961]], -[[2962]], -[[2963]], -[[2964]], -[[2965]], -[[2966]], -[[2967]], -[[2968]], -[[2969]], -[[2970]], -[[2971]], -[[2972]], -[[2973]], -[[2974]], -[[2975]], -[[2976]], -[[2977]], -[[2978]], -[[2979]], -[[2980]], -[[2981]], -[[2982]], -[[2983]], -[[2984]], -[[2985]], -[[2986]], -[[2987]], -[[2988]], -[[2989]], -[[2990]], -[[2991]], -[[2992]], -[[2993]], -[[2994]], -[[2995]], -[[2996]], -[[2997]], -[[2998]], -[[2999]], -[[3000]], -[[3001]], -[[3002]], -[[3003]], -[[3004]], -[[3005]], -[[3006]], -[[3007]], -[[3008]], -[[3009]], -[[3010]], -[[3011]], -[[3012]], -[[3013]], -[[3014]], -[[3015]], -[[3016]], -[[3017]], -[[3018]], -[[3019]], -[[3020]], -[[3021]], -[[3022]], -[[3023]], -[[3024]], -[[3025]], -[[3026]], -[[3027]], -[[3028]], -[[3029]], -[[3030]], -[[3031]], -[[3032]], -[[3033]], -[[3034]], -[[3035]], -[[3036]], -[[3037]], -[[3038]], -[[3039]], -[[3040]], -[[3041]], -[[3042]], -[[3043]], -[[3044]], -[[3045]], -[[3046]], -[[3047]], -[[3048]], -[[3049]], -[[3050]], -[[3051]], -[[3052]], -[[3053]], -[[3054]], -[[3055]], -[[3056]], -[[3057]], -[[3058]], -[[3059]], -[[3060]], -[[3061]], -[[3062]], -[[3063]], -[[3064]], -[[3065]], -[[3066]], -[[3067]], -[[3068]], -[[3069]], -[[3070]], -[[3071]], -[[3072]], -[[3073]], -[[3074]], -[[3075]], -[[3076]], -[[3077]], -[[3078]], -[[3079]], -[[3080]], -[[3081]], -[[3082]], -[[3083]], -[[3084]], -[[3085]], -[[3086]], -[[3087]], -[[3088]], -[[3089]], -[[3090]], -[[3091]], -[[3092]], -[[3093]], -[[3094]], -[[3095]], -[[3096]], -[[3097]], -[[3098]], -[[3099]], -[[3100]], -[[3101]], -[[3102]], -[[3103]], -[[3104]], -[[3105]], -[[3106]], -[[3107]], -[[3108]], -[[3109]], -[[3110]], -[[3111]], -[[3112]], -[[3113]], -[[3114]], -[[3115]], -[[3116]], -[[3117]], -[[3118]], -[[3119]], -[[3120]], -[[3121]], -[[3122]], -[[3123]], -[[3124]], -[[3125]], -[[3126]], -[[3127]], -[[3128]], -[[3129]], -[[3130]], -[[3131]], -[[3132]], -[[3133]], -[[3134]], -[[3135]], -[[3136]], -[[3137]], -[[3138]], -[[3139]], -[[3140]], -[[3141]], -[[3142]], -[[3143]], -[[3144]], -[[3145]], -[[3146]], -[[3147]], -[[3148]], -[[3149]], -[[3150]], -[[3151]], -[[3152]], -[[3153]], -[[3154]], -[[3155]], -[[3156]], -[[3157]], -[[3158]], -[[3159]], -[[3160]], -[[3161]], -[[3162]], -[[3163]], -[[3164]], -[[3165]], -[[3166]], -[[3167]], -[[3168]], -[[3169]], -[[3170]], -[[3171]], -[[3172]], -[[3173]], -[[3174]], -[[3175]], -[[3176]], -[[3177]], -[[3178]], -[[3179]], -[[3180]], -[[3181]], -[[3182]], -[[3183]], -[[3184]], -[[3185]], -[[3186]], -[[3187]], -[[3188]], -[[3189]], -[[3190]], -[[3191]], -[[3192]], -[[3193]], -[[3194]], -[[3195]], -[[3196]], -[[3197]], -[[3198]], -[[3199]], -[[3200]], -[[3201]], -[[3202]], -[[3203]], -[[3204]], -[[3205]], -[[3206]], -[[3207]], -[[3208]], -[[3209]], -[[3210]], -[[3211]], -[[3212]], -[[3213]], -[[3214]], -[[3215]], -[[3216]], -[[3217]], -[[3218]], -[[3219]], -[[3220]], -[[3221]], -[[3222]], -[[3223]], -[[3224]], -[[3225]], -[[3226]], -[[3227]], -[[3228]], -[[3229]], -[[3230]], -[[3231]], -[[3232]], -[[3233]], -[[3234]], -[[3235]], -[[3236]], -[[3237]], -[[3238]], -[[3239]], -[[3240]], -[[3241]], -[[3242]], -[[3243]], -[[3244]], -[[3245]], -[[3246]], -[[3247]], -[[3248]], -[[3249]], -[[3250]], -[[3251]], -[[3252]], -[[3253]], -[[3254]], -[[3255]], -[[3256]], -[[3257]], -[[3258]], -[[3259]], -[[3260]], -[[3261]], -[[3262]], -[[3263]], -[[3264]], -[[3265]], -[[3266]], -[[3267]], -[[3268]], -[[3269]], -[[3270]], -[[3271]], -[[3272]], -[[3273]], -[[3274]], -[[3275]], -[[3276]], -[[3277]], -[[3278]], -[[3279]], -[[3280]], -[[3281]], -[[3282]], -[[3283]], -[[3284]], -[[3285]], -[[3286]], -[[3287]], -[[3288]], -[[3289]], -[[3290]], -[[3291]], -[[3292]], -[[3293]], -[[3294]], -[[3295]], -[[3296]], -[[3297]], -[[3298]], -[[3299]], -[[3300]], -[[3301]], -[[3302]], -[[3303]], -[[3304]], -[[3305]], -[[3306]], -[[3307]], -[[3308]], -[[3309]], -[[3310]], -[[3311]], -[[3312]], -[[3313]], -[[3314]], -[[3315]], -[[3316]], -[[3317]], -[[3318]], -[[3319]], -[[3320]], -[[3321]], -[[3322]], -[[3323]], -[[3324]], -[[3325]], -[[3326]], -[[3327]], -[[3328]], -[[3329]], -[[3330]], -[[3331]], -[[3332]], -[[3333]], -[[3334]], -[[3335]], -[[3336]], -[[3337]], -[[3338]], -[[3339]], -[[3340]], -[[3341]], -[[3342]], -[[3343]], -[[3344]], -[[3345]], -[[3346]], -[[3347]], -[[3348]], -[[3349]], -[[3350]], -[[3351]], -[[3352]], -[[3353]], -[[3354]], -[[3355]], -[[3356]], -[[3357]], -[[3358]], -[[3359]], -[[3360]], -[[3361]], -[[3362]], -[[3363]], -[[3364]], -[[3365]], -[[3366]], -[[3367]], -[[3368]], -[[3369]], -[[3370]], -[[3371]], -[[3372]], -[[3373]], -[[3374]], -[[3375]], -[[3376]], -[[3377]], -[[3378]], -[[3379]], -[[3380]], -[[3381]], -[[3382]], -[[3383]], -[[3384]], -[[3385]], -[[3386]], -[[3387]], -[[3388]], -[[3389]], -[[3390]], -[[3391]], -[[3392]], -[[3393]], -[[3394]], -[[3395]], -[[3396]], -[[3397]], -[[3398]], -[[3399]], -[[3400]], -[[3401]], -[[3402]], -[[3403]], -[[3404]], -[[3405]], -[[3406]], -[[3407]], -[[3408]], -[[3409]], -[[3410]], -[[3411]], -[[3412]], -[[3413]], -[[3414]], -[[3415]], -[[3416]], -[[3417]], -[[3418]], -[[3419]], -[[3420]], -[[3421]], -[[3422]], -[[3423]], -[[3424]], -[[3425]], -[[3426]], -[[3427]], -[[3428]], -[[3429]], -[[3430]], -[[3431]], -[[3432]], -[[3433]], -[[3434]], -[[3435]], -[[3436]], -[[3437]], -[[3438]], -[[3439]], -[[3440]], -[[3441]], -[[3442]], -[[3443]], -[[3444]], -[[3445]], -[[3446]], -[[3447]], -[[3448]], -[[3449]], -[[3450]], -[[3451]], -[[3452]], -[[3453]], -[[3454]], -[[3455]], -[[3456]], -[[3457]], -[[3458]], -[[3459]], -[[3460]], -[[3461]], -[[3462]], -[[3463]], -[[3464]], -[[3465]], -[[3466]], -[[3467]], -[[3468]], -[[3469]], -[[3470]], -[[3471]], -[[3472]], -[[3473]], -[[3474]], -[[3475]], -[[3476]], -[[3477]], -[[3478]], -[[3479]], -[[3480]], -[[3481]], -[[3482]], -[[3483]], -[[3484]], -[[3485]], -[[3486]], -[[3487]], -[[3488]], -[[3489]], -[[3490]], -[[3491]], -[[3492]], -[[3493]], -[[3494]], -[[3495]], -[[3496]], -[[3497]], -[[3498]], -[[3499]], -[[3500]], -[[3501]], -[[3502]], -[[3503]], -[[3504]], -[[3505]], -[[3506]], -[[3507]], -[[3508]], -[[3509]], -[[3510]], -[[3511]], -[[3512]], -[[3513]], -[[3514]], -[[3515]], -[[3516]], -[[3517]], -[[3518]], -[[3519]], -[[3520]], -[[3521]], -[[3522]], -[[3523]], -[[3524]], -[[3525]], -[[3526]], -[[3527]], -[[3528]], -[[3529]], -[[3530]], -[[3531]], -[[3532]], -[[3533]], -[[3534]], -[[3535]], -[[3536]], -[[3537]], -[[3538]], -[[3539]], -[[3540]], -[[3541]], -[[3542]], -[[3543]], -[[3544]], -[[3545]], -[[3546]], -[[3547]], -[[3548]], -[[3549]], -[[3550]], -[[3551]], -[[3552]], -[[3553]], -[[3554]], -[[3555]], -[[3556]], -[[3557]], -[[3558]], -[[3559]], -[[3560]], -[[3561]], -[[3562]], -[[3563]], -[[3564]], -[[3565]], -[[3566]], -[[3567]], -[[3568]], -[[3569]], -[[3570]], -[[3571]], -[[3572]], -[[3573]], -[[3574]], -[[3575]], -[[3576]], -[[3577]], -[[3578]], -[[3579]], -[[3580]], -[[3581]], -[[3582]], -[[3583]], -[[3584]], -[[3585]], -[[3586]], -[[3587]], -[[3588]], -[[3589]], -[[3590]], -[[3591]], -[[3592]], -[[3593]], -[[3594]], -[[3595]], -[[3596]], -[[3597]], -[[3598]], -[[3599]], -[[3600]], -[[3601]], -[[3602]], -[[3603]], -[[3604]], -[[3605]], -[[3606]], -[[3607]], -[[3608]], -[[3609]], -[[3610]], -[[3611]], -[[3612]], -[[3613]], -[[3614]], -[[3615]], -[[3616]], -[[3617]], -[[3618]], -[[3619]], -[[3620]], -[[3621]], -[[3622]], -[[3623]], -[[3624]], -[[3625]], -[[3626]], -[[3627]], -[[3628]], -[[3629]], -[[3630]], -[[3631]], -[[3632]], -[[3633]], -[[3634]], -[[3635]], -[[3636]], -[[3637]], -[[3638]], -[[3639]], -[[3640]], -[[3641]], -[[3642]], -[[3643]], -[[3644]], -[[3645]], -[[3646]], -[[3647]], -[[3648]], -[[3649]], -[[3650]], -[[3651]], -[[3652]], -[[3653]], -[[3654]], -[[3655]], -[[3656]], -[[3657]], -[[3658]], -[[3659]], -[[3660]], -[[3661]], -[[3662]], -[[3663]], -[[3664]], -[[3665]], -[[3666]], -[[3667]], -[[3668]], -[[3669]], -[[3670]], -[[3671]], -[[3672]], -[[3673]], -[[3674]], -[[3675]], -[[3676]], -[[3677]], -[[3678]], -[[3679]], -[[3680]], -[[3681]], -[[3682]], -[[3683]], -[[3684]], -[[3685]], -[[3686]], -[[3687]], -[[3688]], -[[3689]], -[[3690]], -[[3691]], -[[3692]], -[[3693]], -[[3694]], -[[3695]], -[[3696]], -[[3697]], -[[3698]], -[[3699]], -[[3700]], -[[3701]], -[[3702]], -[[3703]], -[[3704]], -[[3705]], -[[3706]], -[[3707]], -[[3708]], -[[3709]], -[[3710]], -[[3711]], -[[3712]], -[[3713]], -[[3714]], -[[3715]], -[[3716]], -[[3717]], -[[3718]], -[[3719]], -[[3720]], -[[3721]], -[[3722]], -[[3723]], -[[3724]], -[[3725]], -[[3726]], -[[3727]], -[[3728]], -[[3729]], -[[3730]], -[[3731]], -[[3732]], -[[3733]], -[[3734]], -[[3735]], -[[3736]], -[[3737]], -[[3738]], -[[3739]], -[[3740]], -[[3741]], -[[3742]], -[[3743]], -[[3744]], -[[3745]], -[[3746]], -[[3747]], -[[3748]], -[[3749]], -[[3750]], -[[3751]], -[[3752]], -[[3753]], -[[3754]], -[[3755]], -[[3756]], -[[3757]], -[[3758]], -[[3759]], -[[3760]], -[[3761]], -[[3762]], -[[3763]], -[[3764]], -[[3765]], -[[3766]], -[[3767]], -[[3768]], -[[3769]], -[[3770]], -[[3771]], -[[3772]], -[[3773]], -[[3774]], -[[3775]], -[[3776]], -[[3777]], -[[3778]], -[[3779]], -[[3780]], -[[3781]], -[[3782]], -[[3783]], -[[3784]], -[[3785]], -[[3786]], -[[3787]], -[[3788]], -[[3789]], -[[3790]], -[[3791]], -[[3792]], -[[3793]], -[[3794]], -[[3795]], -[[3796]], -[[3797]], -[[3798]], -[[3799]], -[[3800]], -[[3801]], -[[3802]], -[[3803]], -[[3804]], -[[3805]], -[[3806]], -[[3807]], -[[3808]], -[[3809]], -[[3810]], -[[3811]], -[[3812]], -[[3813]], -[[3814]], -[[3815]], -[[3816]], -[[3817]], -[[3818]], -[[3819]], -[[3820]], -[[3821]], -[[3822]], -[[3823]], -[[3824]], -[[3825]], -[[3826]], -[[3827]], -[[3828]], -[[3829]], -[[3830]], -[[3831]], -[[3832]], -[[3833]], -[[3834]], -[[3835]], -[[3836]], -[[3837]], -[[3838]], -[[3839]], -[[3840]], -[[3841]], -[[3842]], -[[3843]], -[[3844]], -[[3845]], -[[3846]], -[[3847]], -[[3848]], -[[3849]], -[[3850]], -[[3851]], -[[3852]], -[[3853]], -[[3854]], -[[3855]], -[[3856]], -[[3857]], -[[3858]], -[[3859]], -[[3860]], -[[3861]], -[[3862]], -[[3863]], -[[3864]], -[[3865]], -[[3866]], -[[3867]], -[[3868]], -[[3869]], -[[3870]], -[[3871]], -[[3872]], -[[3873]], -[[3874]], -[[3875]], -[[3876]], -[[3877]], -[[3878]], -[[3879]], -[[3880]], -[[3881]], -[[3882]], -[[3883]], -[[3884]], -[[3885]], -[[3886]], -[[3887]], -[[3888]], -[[3889]], -[[3890]], -[[3891]], -[[3892]], -[[3893]], -[[3894]], -[[3895]], -[[3896]], -[[3897]], -[[3898]], -[[3899]], -[[3900]], -[[3901]], -[[3902]], -[[3903]], -[[3904]], -[[3905]], -[[3906]], -[[3907]], -[[3908]], -[[3909]], -[[3910]], -[[3911]], -[[3912]], -[[3913]], -[[3914]], -[[3915]], -[[3916]], -[[3917]], -[[3918]], -[[3919]], -[[3920]], -[[3921]], -[[3922]], -[[3923]], -[[3924]], -[[3925]], -[[3926]], -[[3927]], -[[3928]], -[[3929]], -[[3930]], -[[3931]], -[[3932]], -[[3933]], -[[3934]], -[[3935]], -[[3936]], -[[3937]], -[[3938]], -[[3939]], -[[3940]], -[[3941]], -[[3942]], -[[3943]], -[[3944]], -[[3945]], -[[3946]], -[[3947]], -[[3948]], -[[3949]], -[[3950]], -[[3951]], -[[3952]], -[[3953]], -[[3954]], -[[3955]], -[[3956]], -[[3957]], -[[3958]], -[[3959]], -[[3960]], -[[3961]], -[[3962]], -[[3963]], -[[3964]], -[[3965]], -[[3966]], -[[3967]], -[[3968]], -[[3969]], -[[3970]], -[[3971]], -[[3972]], -[[3973]], -[[3974]], -[[3975]], -[[3976]], -[[3977]], -[[3978]], -[[3979]], -[[3980]], -[[3981]], -[[3982]], -[[3983]], -[[3984]], -[[3985]], -[[3986]], -[[3987]], -[[3988]], -[[3989]], -[[3990]], -[[3991]], -[[3992]], -[[3993]], -[[3994]], -[[3995]], -[[3996]], -[[3997]], -[[3998]], -[[3999]], -[[4000]], -[[4001]], -[[4002]], -[[4003]], -[[4004]], -[[4005]], -[[4006]], -[[4007]], -[[4008]], -[[4009]], -[[4010]], -[[4011]], -[[4012]], -[[4013]], -[[4014]], -[[4015]], -[[4016]], -[[4017]], -[[4018]], -[[4019]], -[[4020]], -[[4021]], -[[4022]], -[[4023]], -[[4024]], -[[4025]], -[[4026]], -[[4027]], -[[4028]], -[[4029]], -[[4030]], -[[4031]], -[[4032]], -[[4033]], -[[4034]], -[[4035]], -[[4036]], -[[4037]], -[[4038]], -[[4039]], -[[4040]], -[[4041]], -[[4042]], -[[4043]], -[[4044]], -[[4045]], -[[4046]], -[[4047]], -[[4048]], -[[4049]], -[[4050]], -[[4051]], -[[4052]], -[[4053]], -[[4054]], -[[4055]], -[[4056]], -[[4057]], -[[4058]], -[[4059]], -[[4060]], -[[4061]], -[[4062]], -[[4063]], -[[4064]], -[[4065]], -[[4066]], -[[4067]], -[[4068]], -[[4069]], -[[4070]], -[[4071]], -[[4072]], -[[4073]], -[[4074]], -[[4075]], -[[4076]], -[[4077]], -[[4078]], -[[4079]], -[[4080]], -[[4081]], -[[4082]], -[[4083]], -[[4084]], -[[4085]], -[[4086]], -[[4087]], -[[4088]], -[[4089]], -[[4090]], -[[4091]], -[[4092]], -[[4093]], -[[4094]], -[[4095]], -[[4096]], -[[4097]], -[[4098]], -[[4099]], -[[4100]], -[[4101]], -[[4102]], -[[4103]], -[[4104]], -[[4105]], -[[4106]], -[[4107]], -[[4108]], -[[4109]], -[[4110]], -[[4111]], -[[4112]], -[[4113]], -[[4114]], -[[4115]], -[[4116]], -[[4117]], -[[4118]], -[[4119]], -[[4120]], -[[4121]], -[[4122]], -[[4123]], -[[4124]], -[[4125]], -[[4126]], -[[4127]], -[[4128]], -[[4129]], -[[4130]], -[[4131]], -[[4132]], -[[4133]], -[[4134]], -[[4135]], -[[4136]], -[[4137]], -[[4138]], -[[4139]], -[[4140]], -[[4141]], -[[4142]], -[[4143]], -[[4144]], -[[4145]], -[[4146]], -[[4147]], -[[4148]], -[[4149]], -[[4150]], -[[4151]], -[[4152]], -[[4153]], -[[4154]], -[[4155]], -[[4156]], -[[4157]], -[[4158]], -[[4159]], -[[4160]], -[[4161]], -[[4162]], -[[4163]], -[[4164]], -[[4165]], -[[4166]], -[[4167]], -[[4168]], -[[4169]], -[[4170]], -[[4171]], -[[4172]], -[[4173]], -[[4174]], -[[4175]], -[[4176]], -[[4177]], -[[4178]], -[[4179]], -[[4180]], -[[4181]], -[[4182]], -[[4183]], -[[4184]], -[[4185]], -[[4186]], -[[4187]], -[[4188]], -[[4189]], -[[4190]], -[[4191]], -[[4192]], -[[4193]], -[[4194]], -[[4195]], -[[4196]], -[[4197]], -[[4198]], -[[4199]], -[[4200]], -[[4201]], -[[4202]], -[[4203]], -[[4204]], -[[4205]], -[[4206]], -[[4207]], -[[4208]], -[[4209]], -[[4210]], -[[4211]], -[[4212]], -[[4213]], -[[4214]], -[[4215]], -[[4216]], -[[4217]], -[[4218]], -[[4219]], -[[4220]], -[[4221]], -[[4222]], -[[4223]], -[[4224]], -[[4225]], -[[4226]], -[[4227]], -[[4228]], -[[4229]], -[[4230]], -[[4231]], -[[4232]], -[[4233]], -[[4234]], -[[4235]], -[[4236]], -[[4237]], -[[4238]], -[[4239]], -[[4240]], -[[4241]], -[[4242]], -[[4243]], -[[4244]], -[[4245]], -[[4246]], -[[4247]], -[[4248]], -[[4249]], -[[4250]], -[[4251]], -[[4252]], -[[4253]], -[[4254]], -[[4255]], -[[4256]], -[[4257]], -[[4258]], -[[4259]], -[[4260]], -[[4261]], -[[4262]], -[[4263]], -[[4264]], -[[4265]], -[[4266]], -[[4267]], -[[4268]], -[[4269]], -[[4270]], -[[4271]], -[[4272]], -[[4273]], -[[4274]], -[[4275]], -[[4276]], -[[4277]], -[[4278]], -[[4279]], -[[4280]], -[[4281]], -[[4282]], -[[4283]], -[[4284]], -[[4285]], -[[4286]], -[[4287]], -[[4288]], -[[4289]], -[[4290]], -[[4291]], -[[4292]], -[[4293]], -[[4294]], -[[4295]], -[[4296]], -[[4297]], -[[4298]], -[[4299]], -[[4300]], -[[4301]], -[[4302]], -[[4303]], -[[4304]], -[[4305]], -[[4306]], -[[4307]], -[[4308]], -[[4309]], -[[4310]], -[[4311]], -[[4312]], -[[4313]], -[[4314]], -[[4315]], -[[4316]], -[[4317]], -[[4318]], -[[4319]], -[[4320]], -[[4321]], -[[4322]], -[[4323]], -[[4324]], -[[4325]], -[[4326]], -[[4327]], -[[4328]], -[[4329]], -[[4330]], -[[4331]], -[[4332]], -[[4333]], -[[4334]], -[[4335]], -[[4336]], -[[4337]], -[[4338]], -[[4339]], -[[4340]], -[[4341]], -[[4342]], -[[4343]], -[[4344]], -[[4345]], -[[4346]], -[[4347]], -[[4348]], -[[4349]], -[[4350]], -[[4351]], -[[4352]], -[[4353]], -[[4354]], -[[4355]], -[[4356]], -[[4357]], -[[4358]], -[[4359]], -[[4360]], -[[4361]], -[[4362]], -[[4363]], -[[4364]], -[[4365]], -[[4366]], -[[4367]], -[[4368]], -[[4369]], -[[4370]], -[[4371]], -[[4372]], -[[4373]], -[[4374]], -[[4375]], -[[4376]], -[[4377]], -[[4378]], -[[4379]], -[[4380]], -[[4381]], -[[4382]], -[[4383]], -[[4384]], -[[4385]], -[[4386]], -[[4387]], -[[4388]], -[[4389]], -[[4390]], -[[4391]], -[[4392]], -[[4393]], -[[4394]], -[[4395]], -[[4396]], -[[4397]], -[[4398]], -[[4399]], -[[4400]], -[[4401]], -[[4402]], -[[4403]], -[[4404]], -[[4405]], -[[4406]], -[[4407]], -[[4408]], -[[4409]], -[[4410]], -[[4411]], -[[4412]], -[[4413]], -[[4414]], -[[4415]], -[[4416]], -[[4417]], -[[4418]], -[[4419]], -[[4420]], -[[4421]], -[[4422]], -[[4423]], -[[4424]], -[[4425]], -[[4426]], -[[4427]], -[[4428]], -[[4429]], -[[4430]], -[[4431]], -[[4432]], -[[4433]], -[[4434]], -[[4435]], -[[4436]], -[[4437]], -[[4438]], -[[4439]], -[[4440]], -[[4441]], -[[4442]], -[[4443]], -[[4444]], -[[4445]], -[[4446]], -[[4447]], -[[4448]], -[[4449]], -[[4450]], -[[4451]], -[[4452]], -[[4453]], -[[4454]], -[[4455]], -[[4456]], -[[4457]], -[[4458]], -[[4459]], -[[4460]], -[[4461]], -[[4462]], -[[4463]], -[[4464]], -[[4465]], -[[4466]], -[[4467]], -[[4468]], -[[4469]], -[[4470]], -[[4471]], -[[4472]], -[[4473]], -[[4474]], -[[4475]], -[[4476]], -[[4477]], -[[4478]], -[[4479]], -[[4480]], -[[4481]], -[[4482]], -[[4483]], -[[4484]], -[[4485]], -[[4486]], -[[4487]], -[[4488]], -[[4489]], -[[4490]], -[[4491]], -[[4492]], -[[4493]], -[[4494]], -[[4495]], -[[4496]], -[[4497]], -[[4498]], -[[4499]], -[[4500]], -[[4501]], -[[4502]], -[[4503]], -[[4504]], -[[4505]], -[[4506]], -[[4507]], -[[4508]], -[[4509]], -[[4510]], -[[4511]], -[[4512]], -[[4513]], -[[4514]], -[[4515]], -[[4516]], -[[4517]], -[[4518]], -[[4519]], -[[4520]], -[[4521]], -[[4522]], -[[4523]], -[[4524]], -[[4525]], -[[4526]], -[[4527]], -[[4528]], -[[4529]], -[[4530]], -[[4531]], -[[4532]], -[[4533]], -[[4534]], -[[4535]], -[[4536]], -[[4537]], -[[4538]], -[[4539]], -[[4540]], -[[4541]], -[[4542]], -[[4543]], -[[4544]], -[[4545]], -[[4546]], -[[4547]], -[[4548]], -[[4549]], -[[4550]], -[[4551]], -[[4552]], -[[4553]], -[[4554]], -[[4555]], -[[4556]], -[[4557]], -[[4558]], -[[4559]], -[[4560]], -[[4561]], -[[4562]], -[[4563]], -[[4564]], -[[4565]], -[[4566]], -[[4567]], -[[4568]], -[[4569]], -[[4570]], -[[4571]], -[[4572]], -[[4573]], -[[4574]], -[[4575]], -[[4576]], -[[4577]], -[[4578]], -[[4579]], -[[4580]], -[[4581]], -[[4582]], -[[4583]], -[[4584]], -[[4585]], -[[4586]], -[[4587]], -[[4588]], -[[4589]], -[[4590]], -[[4591]], -[[4592]], -[[4593]], -[[4594]], -[[4595]], -[[4596]], -[[4597]], -[[4598]], -[[4599]], -[[4600]], -[[4601]], -[[4602]], -[[4603]], -[[4604]], -[[4605]], -[[4606]], -[[4607]], -[[4608]], -[[4609]], -[[4610]], -[[4611]], -[[4612]], -[[4613]], -[[4614]], -[[4615]], -[[4616]], -[[4617]], -[[4618]], -[[4619]], -[[4620]], -[[4621]], -[[4622]], -[[4623]], -[[4624]], -[[4625]], -[[4626]], -[[4627]], -[[4628]], -[[4629]], -[[4630]], -[[4631]], -[[4632]], -[[4633]], -[[4634]], -[[4635]], -[[4636]], -[[4637]], -[[4638]], -[[4639]], -[[4640]], -[[4641]], -[[4642]], -[[4643]], -[[4644]], -[[4645]], -[[4646]], -[[4647]], -[[4648]], -[[4649]], -[[4650]], -[[4651]], -[[4652]], -[[4653]], -[[4654]], -[[4655]], -[[4656]], -[[4657]], -[[4658]], -[[4659]], -[[4660]], -[[4661]], -[[4662]], -[[4663]], -[[4664]], -[[4665]], -[[4666]], -[[4667]], -[[4668]], -[[4669]], -[[4670]], -[[4671]], -[[4672]], -[[4673]], -[[4674]], -[[4675]], -[[4676]], -[[4677]], -[[4678]], -[[4679]], -[[4680]], -[[4681]], -[[4682]], -[[4683]], -[[4684]], -[[4685]], -[[4686]], -[[4687]], -[[4688]], -[[4689]], -[[4690]], -[[4691]], -[[4692]], -[[4693]], -[[4694]], -[[4695]], -[[4696]], -[[4697]], -[[4698]], -[[4699]], -[[4700]], -[[4701]], -[[4702]], -[[4703]], -[[4704]], -[[4705]], -[[4706]], -[[4707]], -[[4708]], -[[4709]], -[[4710]], -[[4711]], -[[4712]], -[[4713]], -[[4714]], -[[4715]], -[[4716]], -[[4717]], -[[4718]], -[[4719]], -[[4720]], -[[4721]], -[[4722]], -[[4723]], -[[4724]], -[[4725]], -[[4726]], -[[4727]], -[[4728]], -[[4729]], -[[4730]], -[[4731]], -[[4732]], -[[4733]], -[[4734]], -[[4735]], -[[4736]], -[[4737]], -[[4738]], -[[4739]], -[[4740]], -[[4741]], -[[4742]], -[[4743]], -[[4744]], -[[4745]], -[[4746]], -[[4747]], -[[4748]], -[[4749]], -[[4750]], -[[4751]], -[[4752]], -[[4753]], -[[4754]], -[[4755]], -[[4756]], -[[4757]], -[[4758]], -[[4759]], -[[4760]], -[[4761]], -[[4762]], -[[4763]], -[[4764]], -[[4765]], -[[4766]], -[[4767]], -[[4768]], -[[4769]], -[[4770]], -[[4771]], -[[4772]], -[[4773]], -[[4774]], -[[4775]], -[[4776]], -[[4777]], -[[4778]], -[[4779]], -[[4780]], -[[4781]], -[[4782]], -[[4783]], -[[4784]], -[[4785]], -[[4786]], -[[4787]], -[[4788]], -[[4789]], -[[4790]], -[[4791]], -[[4792]], -[[4793]], -[[4794]], -[[4795]], -[[4796]], -[[4797]], -[[4798]], -[[4799]], -[[4800]], -[[4801]], -[[4802]], -[[4803]], -[[4804]], -[[4805]], -[[4806]], -[[4807]], -[[4808]], -[[4809]], -[[4810]], -[[4811]], -[[4812]], -[[4813]], -[[4814]], -[[4815]], -[[4816]], -[[4817]], -[[4818]], -[[4819]], -[[4820]], -[[4821]], -[[4822]], -[[4823]], -[[4824]], -[[4825]], -[[4826]], -[[4827]], -[[4828]], -[[4829]], -[[4830]], -[[4831]], -[[4832]], -[[4833]], -[[4834]], -[[4835]], -[[4836]], -[[4837]], -[[4838]], -[[4839]], -[[4840]], -[[4841]], -[[4842]], -[[4843]], -[[4844]], -[[4845]], -[[4846]], -[[4847]], -[[4848]], -[[4849]], -[[4850]], -[[4851]], -[[4852]], -[[4853]], -[[4854]], -[[4855]], -[[4856]], -[[4857]], -[[4858]], -[[4859]], -[[4860]], -[[4861]], -[[4862]], -[[4863]], -[[4864]], -[[4865]], -[[4866]], -[[4867]], -[[4868]], -[[4869]], -[[4870]], -[[4871]], -[[4872]], -[[4873]], -[[4874]], -[[4875]], -[[4876]], -[[4877]], -[[4878]], -[[4879]], -[[4880]], -[[4881]], -[[4882]], -[[4883]], -[[4884]], -[[4885]], -[[4886]], -[[4887]], -[[4888]], -[[4889]], -[[4890]], -[[4891]], -[[4892]], -[[4893]], -[[4894]], -[[4895]], -[[4896]], -[[4897]], -[[4898]], -[[4899]], -[[4900]], -[[4901]], -[[4902]], -[[4903]], -[[4904]], -[[4905]], -[[4906]], -[[4907]], -[[4908]], -[[4909]], -[[4910]], -[[4911]], -[[4912]], -[[4913]], -[[4914]], -[[4915]], -[[4916]], -[[4917]], -[[4918]], -[[4919]], -[[4920]], -[[4921]], -[[4922]], -[[4923]], -[[4924]], -[[4925]], -[[4926]], -[[4927]], -[[4928]], -[[4929]], -[[4930]], -[[4931]], -[[4932]], -[[4933]], -[[4934]], -[[4935]], -[[4936]], -[[4937]], -[[4938]], -[[4939]], -[[4940]], -[[4941]], -[[4942]], -[[4943]], -[[4944]], -[[4945]], -[[4946]], -[[4947]], -[[4948]], -[[4949]], -[[4950]], -[[4951]], -[[4952]], -[[4953]], -[[4954]], -[[4955]], -[[4956]], -[[4957]], -[[4958]], -[[4959]], -[[4960]], -[[4961]], -[[4962]], -[[4963]], -[[4964]], -[[4965]], -[[4966]], -[[4967]], -[[4968]], -[[4969]], -[[4970]], -[[4971]], -[[4972]], -[[4973]], -[[4974]], -[[4975]], -[[4976]], -[[4977]], -[[4978]], -[[4979]], -[[4980]], -[[4981]], -[[4982]], -[[4983]], -[[4984]], -[[4985]], -[[4986]], -[[4987]], -[[4988]], -[[4989]], -[[4990]], -[[4991]], -[[4992]], -[[4993]], -[[4994]], -[[4995]], -[[4996]], -[[4997]], -[[4998]], -[[4999]], -[[5000]], -[[5001]], -[[5002]], -[[5003]], -[[5004]], -[[5005]], -[[5006]], -[[5007]], -[[5008]], -[[5009]], -[[5010]], -[[5011]], -[[5012]], -[[5013]], -[[5014]], -[[5015]], -[[5016]], -[[5017]], -[[5018]], -[[5019]], -[[5020]], -[[5021]], -[[5022]], -[[5023]], -[[5024]], -[[5025]], -[[5026]], -[[5027]], -[[5028]], -[[5029]], -[[5030]], -[[5031]], -[[5032]], -[[5033]], -[[5034]], -[[5035]], -[[5036]], -[[5037]], -[[5038]], -[[5039]], -[[5040]], -[[5041]], -[[5042]], -[[5043]], -[[5044]], -[[5045]], -[[5046]], -[[5047]], -[[5048]], -[[5049]], -[[5050]], -[[5051]], -[[5052]], -[[5053]], -[[5054]], -[[5055]], -[[5056]], -[[5057]], -[[5058]], -[[5059]], -[[5060]], -[[5061]], -[[5062]], -[[5063]], -[[5064]], -[[5065]], -[[5066]], -[[5067]], -[[5068]], -[[5069]], -[[5070]], -[[5071]], -[[5072]], -[[5073]], -[[5074]], -[[5075]], -[[5076]], -[[5077]], -[[5078]], -[[5079]], -[[5080]], -[[5081]], -[[5082]], -[[5083]], -[[5084]], -[[5085]], -[[5086]], -[[5087]], -[[5088]], -[[5089]], -[[5090]], -[[5091]], -[[5092]], -[[5093]], -[[5094]], -[[5095]], -[[5096]], -[[5097]], -[[5098]], -[[5099]], -[[5100]], -[[5101]], -[[5102]], -[[5103]], -[[5104]], -[[5105]], -[[5106]], -[[5107]], -[[5108]], -[[5109]], -[[5110]], -[[5111]], -[[5112]], -[[5113]], -[[5114]], -[[5115]], -[[5116]], -[[5117]], -[[5118]], -[[5119]], -[[5120]], -[[5121]], -[[5122]], -[[5123]], -[[5124]], -[[5125]], -[[5126]], -[[5127]], -[[5128]], -[[5129]], -[[5130]], -[[5131]], -[[5132]], -[[5133]], -[[5134]], -[[5135]], -[[5136]], -[[5137]], -[[5138]], -[[5139]], -[[5140]], -[[5141]], -[[5142]], -[[5143]], -[[5144]], -[[5145]], -[[5146]], -[[5147]], -[[5148]], -[[5149]], -[[5150]], -[[5151]], -[[5152]], -[[5153]], -[[5154]], -[[5155]], -[[5156]], -[[5157]], -[[5158]], -[[5159]], -[[5160]], -[[5161]], -[[5162]], -[[5163]], -[[5164]], -[[5165]], -[[5166]], -[[5167]], -[[5168]], -[[5169]], -[[5170]], -[[5171]], -[[5172]], -[[5173]], -[[5174]], -[[5175]], -[[5176]], -[[5177]], -[[5178]], -[[5179]], -[[5180]], -[[5181]], -[[5182]], -[[5183]], -[[5184]], -[[5185]], -[[5186]], -[[5187]], -[[5188]], -[[5189]], -[[5190]], -[[5191]], -[[5192]], -[[5193]], -[[5194]], -[[5195]], -[[5196]], -[[5197]], -[[5198]], -[[5199]], -[[5200]], -[[5201]], -[[5202]], -[[5203]], -[[5204]], -[[5205]], -[[5206]], -[[5207]], -[[5208]], -[[5209]], -[[5210]], -[[5211]], -[[5212]], -[[5213]], -[[5214]], -[[5215]], -[[5216]], -[[5217]], -[[5218]], -[[5219]], -[[5220]], -[[5221]], -[[5222]], -[[5223]], -[[5224]], -[[5225]], -[[5226]], -[[5227]], -[[5228]], -[[5229]], -[[5230]], -[[5231]], -[[5232]], -[[5233]], -[[5234]], -[[5235]], -[[5236]], -[[5237]], -[[5238]], -[[5239]], -[[5240]], -[[5241]], -[[5242]], -[[5243]], -[[5244]], -[[5245]], -[[5246]], -[[5247]], -[[5248]], -[[5249]], -[[5250]], -[[5251]], -[[5252]], -[[5253]], -[[5254]], -[[5255]], -[[5256]], -[[5257]], -[[5258]], -[[5259]], -[[5260]], -[[5261]], -[[5262]], -[[5263]], -[[5264]], -[[5265]], -[[5266]], -[[5267]], -[[5268]], -[[5269]], -[[5270]], -[[5271]], -[[5272]], -[[5273]], -[[5274]], -[[5275]], -[[5276]], -[[5277]], -[[5278]], -[[5279]], -[[5280]], -[[5281]], -[[5282]], -[[5283]], -[[5284]], -[[5285]], -[[5286]], -[[5287]], -[[5288]], -[[5289]], -[[5290]], -[[5291]], -[[5292]], -[[5293]], -[[5294]], -[[5295]], -[[5296]], -[[5297]], -[[5298]], -[[5299]], -[[5300]], -[[5301]], -[[5302]], -[[5303]], -[[5304]], -[[5305]], -[[5306]], -[[5307]], -[[5308]], -[[5309]], -[[5310]], -[[5311]], -[[5312]], -[[5313]], -[[5314]], -[[5315]], -[[5316]], -[[5317]], -[[5318]], -[[5319]], -[[5320]], -[[5321]], -[[5322]], -[[5323]], -[[5324]], -[[5325]], -[[5326]], -[[5327]], -[[5328]], -[[5329]], -[[5330]], -[[5331]], -[[5332]], -[[5333]], -[[5334]], -[[5335]], -[[5336]], -[[5337]], -[[5338]], -[[5339]], -[[5340]], -[[5341]], -[[5342]], -[[5343]], -[[5344]], -[[5345]], -[[5346]], -[[5347]], -[[5348]], -[[5349]], -[[5350]], -[[5351]], -[[5352]], -[[5353]], -[[5354]], -[[5355]], -[[5356]], -[[5357]], -[[5358]], -[[5359]], -[[5360]], -[[5361]], -[[5362]], -[[5363]], -[[5364]], -[[5365]], -[[5366]], -[[5367]], -[[5368]], -[[5369]], -[[5370]], -[[5371]], -[[5372]], -[[5373]], -[[5374]], -[[5375]], -[[5376]], -[[5377]], -[[5378]], -[[5379]], -[[5380]], -[[5381]], -[[5382]], -[[5383]], -[[5384]], -[[5385]], -[[5386]], -[[5387]], -[[5388]], -[[5389]], -[[5390]], -[[5391]], -[[5392]], -[[5393]], -[[5394]], -[[5395]], -[[5396]], -[[5397]], -[[5398]], -[[5399]], -[[5400]], -[[5401]], -[[5402]], -[[5403]], -[[5404]], -[[5405]], -[[5406]], -[[5407]], -[[5408]], -[[5409]], -[[5410]], -[[5411]], -[[5412]], -[[5413]], -[[5414]], -[[5415]], -[[5416]], -[[5417]], -[[5418]], -[[5419]], -[[5420]], -[[5421]], -[[5422]], -[[5423]], -[[5424]], -[[5425]], -[[5426]], -[[5427]], -[[5428]], -[[5429]], -[[5430]], -[[5431]], -[[5432]], -[[5433]], -[[5434]], -[[5435]], -[[5436]], -[[5437]], -[[5438]], -[[5439]], -[[5440]], -[[5441]], -[[5442]], -[[5443]], -[[5444]], -[[5445]], -[[5446]], -[[5447]], -[[5448]], -[[5449]], -[[5450]], -[[5451]], -[[5452]], -[[5453]], -[[5454]], -[[5455]], -[[5456]], -[[5457]], -[[5458]], -[[5459]], -[[5460]], -[[5461]], -[[5462]], -[[5463]], -[[5464]], -[[5465]], -[[5466]], -[[5467]], -[[5468]], -[[5469]], -[[5470]], -[[5471]], -[[5472]], -[[5473]], -[[5474]], -[[5475]], -[[5476]], -[[5477]], -[[5478]], -[[5479]], -[[5480]], -[[5481]], -[[5482]], -[[5483]], -[[5484]], -[[5485]], -[[5486]], -[[5487]], -[[5488]], -[[5489]], -[[5490]], -[[5491]], -[[5492]], -[[5493]], -[[5494]], -[[5495]], -[[5496]], -[[5497]], -[[5498]], -[[5499]], -[[5500]], -[[5501]], -[[5502]], -[[5503]], -[[5504]], -[[5505]], -[[5506]], -[[5507]], -[[5508]], -[[5509]], -[[5510]], -[[5511]], -[[5512]], -[[5513]], -[[5514]], -[[5515]], -[[5516]], -[[5517]], -[[5518]], -[[5519]], -[[5520]], -[[5521]], -[[5522]], -[[5523]], -[[5524]], -[[5525]], -[[5526]], -[[5527]], -[[5528]], -[[5529]], -[[5530]], -[[5531]], -[[5532]], -[[5533]], -[[5534]], -[[5535]], -[[5536]], -[[5537]], -[[5538]], -[[5539]], -[[5540]], -[[5541]], -[[5542]], -[[5543]], -[[5544]], -[[5545]], -[[5546]], -[[5547]], -[[5548]], -[[5549]], -[[5550]], -[[5551]], -[[5552]], -[[5553]], -[[5554]], -[[5555]], -[[5556]], -[[5557]], -[[5558]], -[[5559]], -[[5560]], -[[5561]], -[[5562]], -[[5563]], -[[5564]], -[[5565]], -[[5566]], -[[5567]], -[[5568]], -[[5569]], -[[5570]], -[[5571]], -[[5572]], -[[5573]], -[[5574]], -[[5575]], -[[5576]], -[[5577]], -[[5578]], -[[5579]], -[[5580]], -[[5581]], -[[5582]], -[[5583]], -[[5584]], -[[5585]], -[[5586]], -[[5587]], -[[5588]], -[[5589]], -[[5590]], -[[5591]], -[[5592]], -[[5593]], -[[5594]], -[[5595]], -[[5596]], -[[5597]], -[[5598]], -[[5599]], -[[5600]], -[[5601]], -[[5602]], -[[5603]], -[[5604]], -[[5605]], -[[5606]], -[[5607]], -[[5608]], -[[5609]], -[[5610]], -[[5611]], -[[5612]], -[[5613]], -[[5614]], -[[5615]], -[[5616]], -[[5617]], -[[5618]], -[[5619]], -[[5620]], -[[5621]], -[[5622]], -[[5623]], -[[5624]], -[[5625]], -[[5626]], -[[5627]], -[[5628]], -[[5629]], -[[5630]], -[[5631]], -[[5632]], -[[5633]], -[[5634]], -[[5635]], -[[5636]], -[[5637]], -[[5638]], -[[5639]], -[[5640]], -[[5641]], -[[5642]], -[[5643]], -[[5644]], -[[5645]], -[[5646]], -[[5647]], -[[5648]], -[[5649]], -[[5650]], -[[5651]], -[[5652]], -[[5653]], -[[5654]], -[[5655]], -[[5656]], -[[5657]], -[[5658]], -[[5659]], -[[5660]], -[[5661]], -[[5662]], -[[5663]], -[[5664]], -[[5665]], -[[5666]], -[[5667]], -[[5668]], -[[5669]], -[[5670]], -[[5671]], -[[5672]], -[[5673]], -[[5674]], -[[5675]], -[[5676]], -[[5677]], -[[5678]], -[[5679]], -[[5680]], -[[5681]], -[[5682]], -[[5683]], -[[5684]], -[[5685]], -[[5686]], -[[5687]], -[[5688]], -[[5689]], -[[5690]], -[[5691]], -[[5692]], -[[5693]], -[[5694]], -[[5695]], -[[5696]], -[[5697]], -[[5698]], -[[5699]], -[[5700]], -[[5701]], -[[5702]], -[[5703]], -[[5704]], -[[5705]], -[[5706]], -[[5707]], -[[5708]], -[[5709]], -[[5710]], -[[5711]], -[[5712]], -[[5713]], -[[5714]], -[[5715]], -[[5716]], -[[5717]], -[[5718]], -[[5719]], -[[5720]], -[[5721]], -[[5722]], -[[5723]], -[[5724]], -[[5725]], -[[5726]], -[[5727]], -[[5728]], -[[5729]], -[[5730]], -[[5731]], -[[5732]], -[[5733]], -[[5734]], -[[5735]], -[[5736]], -[[5737]], -[[5738]], -[[5739]], -[[5740]], -[[5741]], -[[5742]], -[[5743]], -[[5744]], -[[5745]], -[[5746]], -[[5747]], -[[5748]], -[[5749]], -[[5750]], -[[5751]], -[[5752]], -[[5753]], -[[5754]], -[[5755]], -[[5756]], -[[5757]], -[[5758]], -[[5759]], -[[5760]], -[[5761]], -[[5762]], -[[5763]], -[[5764]], -[[5765]], -[[5766]], -[[5767]], -[[5768]], -[[5769]], -[[5770]], -[[5771]], -[[5772]], -[[5773]], -[[5774]], -[[5775]], -[[5776]], -[[5777]], -[[5778]], -[[5779]], -[[5780]], -[[5781]], -[[5782]], -[[5783]], -[[5784]], -[[5785]], -[[5786]], -[[5787]], -[[5788]], -[[5789]], -[[5790]], -[[5791]], -[[5792]], -[[5793]], -[[5794]], -[[5795]], -[[5796]], -[[5797]], -[[5798]], -[[5799]], -[[5800]], -[[5801]], -[[5802]], -[[5803]], -[[5804]], -[[5805]], -[[5806]], -[[5807]], -[[5808]], -[[5809]], -[[5810]], -[[5811]], -[[5812]], -[[5813]], -[[5814]], -[[5815]], -[[5816]], -[[5817]], -[[5818]], -[[5819]], -[[5820]], -[[5821]], -[[5822]], -[[5823]], -[[5824]], -[[5825]], -[[5826]], -[[5827]], -[[5828]], -[[5829]], -[[5830]], -[[5831]], -[[5832]], -[[5833]], -[[5834]], -[[5835]], -[[5836]], -[[5837]], -[[5838]], -[[5839]], -[[5840]], -[[5841]], -[[5842]], -[[5843]], -[[5844]], -[[5845]], -[[5846]], -[[5847]], -[[5848]], -[[5849]], -[[5850]], -[[5851]], -[[5852]], -[[5853]], -[[5854]], -[[5855]], -[[5856]], -[[5857]], -[[5858]], -[[5859]], -[[5860]], -[[5861]], -[[5862]], -[[5863]], -[[5864]], -[[5865]], -[[5866]], -[[5867]], -[[5868]], -[[5869]], -[[5870]], -[[5871]], -[[5872]], -[[5873]], -[[5874]], -[[5875]], -[[5876]], -[[5877]], -[[5878]], -[[5879]], -[[5880]], -[[5881]], -[[5882]], -[[5883]], -[[5884]], -[[5885]], -[[5886]], -[[5887]], -[[5888]], -[[5889]], -[[5890]], -[[5891]], -[[5892]], -[[5893]], -[[5894]], -[[5895]], -[[5896]], -[[5897]], -[[5898]], -[[5899]], -[[5900]], -[[5901]], -[[5902]], -[[5903]], -[[5904]], -[[5905]], -[[5906]], -[[5907]], -[[5908]], -[[5909]], -[[5910]], -[[5911]], -[[5912]], -[[5913]], -[[5914]], -[[5915]], -[[5916]], -[[5917]], -[[5918]], -[[5919]], -[[5920]], -[[5921]], -[[5922]], -[[5923]], -[[5924]], -[[5925]], -[[5926]], -[[5927]], -[[5928]], -[[5929]], -[[5930]], -[[5931]], -[[5932]], -[[5933]], -[[5934]], -[[5935]], -[[5936]], -[[5937]], -[[5938]], -[[5939]], -[[5940]], -[[5941]], -[[5942]], -[[5943]], -[[5944]], -[[5945]], -[[5946]], -[[5947]], -[[5948]], -[[5949]], -[[5950]], -[[5951]], -[[5952]], -[[5953]], -[[5954]], -[[5955]], -[[5956]], -[[5957]], -[[5958]], -[[5959]], -[[5960]], -[[5961]], -[[5962]], -[[5963]], -[[5964]], -[[5965]], -[[5966]], -[[5967]], -[[5968]], -[[5969]], -[[5970]], -[[5971]], -[[5972]], -[[5973]], -[[5974]], -[[5975]], -[[5976]], -[[5977]], -[[5978]], -[[5979]], -[[5980]], -[[5981]], -[[5982]], -[[5983]], -[[5984]], -[[5985]], -[[5986]], -[[5987]], -[[5988]], -[[5989]], -[[5990]], -[[5991]], -[[5992]], -[[5993]], -[[5994]], -[[5995]], -[[5996]], -[[5997]], -[[5998]], -[[5999]], -[[6000]], -[[6001]], -[[6002]], -[[6003]], -[[6004]], -[[6005]], -[[6006]], -[[6007]], -[[6008]], -[[6009]], -[[6010]], -[[6011]], -[[6012]], -[[6013]], -[[6014]], -[[6015]], -[[6016]], -[[6017]], -[[6018]], -[[6019]], -[[6020]], -[[6021]], -[[6022]], -[[6023]], -[[6024]], -[[6025]], -[[6026]], -[[6027]], -[[6028]], -[[6029]], -[[6030]], -[[6031]], -[[6032]], -[[6033]], -[[6034]], -[[6035]], -[[6036]], -[[6037]], -[[6038]], -[[6039]], -[[6040]], -[[6041]], -[[6042]], -[[6043]], -[[6044]], -[[6045]], -[[6046]], -[[6047]], -[[6048]], -[[6049]], -[[6050]], -[[6051]], -[[6052]], -[[6053]], -[[6054]], -[[6055]], -[[6056]], -[[6057]], -[[6058]], -[[6059]], -[[6060]], -[[6061]], -[[6062]], -[[6063]], -[[6064]], -[[6065]], -[[6066]], -[[6067]], -[[6068]], -[[6069]], -[[6070]], -[[6071]], -[[6072]], -[[6073]], -[[6074]], -[[6075]], -[[6076]], -[[6077]], -[[6078]], -[[6079]], -[[6080]], -[[6081]], -[[6082]], -[[6083]], -[[6084]], -[[6085]], -[[6086]], -[[6087]], -[[6088]], -[[6089]], -[[6090]], -[[6091]], -[[6092]], -[[6093]], -[[6094]], -[[6095]], -[[6096]], -[[6097]], -[[6098]], -[[6099]], -[[6100]], -[[6101]], -[[6102]], -[[6103]], -[[6104]], -[[6105]], -[[6106]], -[[6107]], -[[6108]], -[[6109]], -[[6110]], -[[6111]], -[[6112]], -[[6113]], -[[6114]], -[[6115]], -[[6116]], -[[6117]], -[[6118]], -[[6119]], -[[6120]], -[[6121]], -[[6122]], -[[6123]], -[[6124]], -[[6125]], -[[6126]], -[[6127]], -[[6128]], -[[6129]], -[[6130]], -[[6131]], -[[6132]], -[[6133]], -[[6134]], -[[6135]], -[[6136]], -[[6137]], -[[6138]], -[[6139]], -[[6140]], -[[6141]], -[[6142]], -[[6143]], -[[6144]], -[[6145]], -[[6146]], -[[6147]], -[[6148]], -[[6149]], -[[6150]], -[[6151]], -[[6152]], -[[6153]], -[[6154]], -[[6155]], -[[6156]], -[[6157]], -[[6158]], -[[6159]], -[[6160]], -[[6161]], -[[6162]], -[[6163]], -[[6164]], -[[6165]], -[[6166]], -[[6167]], -[[6168]], -[[6169]], -[[6170]], -[[6171]], -[[6172]], -[[6173]], -[[6174]], -[[6175]], -[[6176]], -[[6177]], -[[6178]], -[[6179]], -[[6180]], -[[6181]], -[[6182]], -[[6183]], -[[6184]], -[[6185]], -[[6186]], -[[6187]], -[[6188]], -[[6189]], -[[6190]], -[[6191]], -[[6192]], -[[6193]], -[[6194]], -[[6195]], -[[6196]], -[[6197]], -[[6198]], -[[6199]], -[[6200]], -[[6201]], -[[6202]], -[[6203]], -[[6204]], -[[6205]], -[[6206]], -[[6207]], -[[6208]], -[[6209]], -[[6210]], -[[6211]], -[[6212]], -[[6213]], -[[6214]], -[[6215]], -[[6216]], -[[6217]], -[[6218]], -[[6219]], -[[6220]], -[[6221]], -[[6222]], -[[6223]], -[[6224]], -[[6225]], -[[6226]], -[[6227]], -[[6228]], -[[6229]], -[[6230]], -[[6231]], -[[6232]], -[[6233]], -[[6234]], -[[6235]], -[[6236]], -[[6237]], -[[6238]], -[[6239]], -[[6240]], -[[6241]], -[[6242]], -[[6243]], -[[6244]], -[[6245]], -[[6246]], -[[6247]], -[[6248]], -[[6249]], -[[6250]], -[[6251]], -[[6252]], -[[6253]], -[[6254]], -[[6255]], -[[6256]], -[[6257]], -[[6258]], -[[6259]], -[[6260]], -[[6261]], -[[6262]], -[[6263]], -[[6264]], -[[6265]], -[[6266]], -[[6267]], -[[6268]], -[[6269]], -[[6270]], -[[6271]], -[[6272]], -[[6273]], -[[6274]], -[[6275]], -[[6276]], -[[6277]], -[[6278]], -[[6279]], -[[6280]], -[[6281]], -[[6282]], -[[6283]], -[[6284]], -[[6285]], -[[6286]], -[[6287]], -[[6288]], -[[6289]], -[[6290]], -[[6291]], -[[6292]], -[[6293]], -[[6294]], -[[6295]], -[[6296]], -[[6297]], -[[6298]], -[[6299]], -[[6300]], -[[6301]], -[[6302]], -[[6303]], -[[6304]], -[[6305]], -[[6306]], -[[6307]], -[[6308]], -[[6309]], -[[6310]], -[[6311]], -[[6312]], -[[6313]], -[[6314]], -[[6315]], -[[6316]], -[[6317]], -[[6318]], -[[6319]], -[[6320]], -[[6321]], -[[6322]], -[[6323]], -[[6324]], -[[6325]], -[[6326]], -[[6327]], -[[6328]], -[[6329]], -[[6330]], -[[6331]], -[[6332]], -[[6333]], -[[6334]], -[[6335]], -[[6336]], -[[6337]], -[[6338]], -[[6339]], -[[6340]], -[[6341]], -[[6342]], -[[6343]], -[[6344]], -[[6345]], -[[6346]], -[[6347]], -[[6348]], -[[6349]], -[[6350]], -[[6351]], -[[6352]], -[[6353]], -[[6354]], -[[6355]], -[[6356]], -[[6357]], -[[6358]], -[[6359]], -[[6360]], -[[6361]], -[[6362]], -[[6363]], -[[6364]], -[[6365]], -[[6366]], -[[6367]], -[[6368]], -[[6369]], -[[6370]], -[[6371]], -[[6372]], -[[6373]], -[[6374]], -[[6375]], -[[6376]], -[[6377]], -[[6378]], -[[6379]], -[[6380]], -[[6381]], -[[6382]], -[[6383]], -[[6384]], -[[6385]], -[[6386]], -[[6387]], -[[6388]], -[[6389]], -[[6390]], -[[6391]], -[[6392]], -[[6393]], -[[6394]], -[[6395]], -[[6396]], -[[6397]], -[[6398]], -[[6399]], -[[6400]], -[[6401]], -[[6402]], -[[6403]], -[[6404]], -[[6405]], -[[6406]], -[[6407]], -[[6408]], -[[6409]], -[[6410]], -[[6411]], -[[6412]], -[[6413]], -[[6414]], -[[6415]], -[[6416]], -[[6417]], -[[6418]], -[[6419]], -[[6420]], -[[6421]], -[[6422]], -[[6423]], -[[6424]], -[[6425]], -[[6426]], -[[6427]], -[[6428]], -[[6429]], -[[6430]], -[[6431]], -[[6432]], -[[6433]], -[[6434]], -[[6435]], -[[6436]], -[[6437]], -[[6438]], -[[6439]], -[[6440]], -[[6441]], -[[6442]], -[[6443]], -[[6444]], -[[6445]], -[[6446]], -[[6447]], -[[6448]], -[[6449]], -[[6450]], -[[6451]], -[[6452]], -[[6453]], -[[6454]], -[[6455]], -[[6456]], -[[6457]], -[[6458]], -[[6459]], -[[6460]], -[[6461]], -[[6462]], -[[6463]], -[[6464]], -[[6465]], -[[6466]], -[[6467]], -[[6468]], -[[6469]], -[[6470]], -[[6471]], -[[6472]], -[[6473]], -[[6474]], -[[6475]], -[[6476]], -[[6477]], -[[6478]], -[[6479]], -[[6480]], -[[6481]], -[[6482]], -[[6483]], -[[6484]], -[[6485]], -[[6486]], -[[6487]], -[[6488]], -[[6489]], -[[6490]], -[[6491]], -[[6492]], -[[6493]], -[[6494]], -[[6495]], -[[6496]], -[[6497]], -[[6498]], -[[6499]], -[[6500]], -[[6501]], -[[6502]], -[[6503]], -[[6504]], -[[6505]], -[[6506]], -[[6507]], -[[6508]], -[[6509]], -[[6510]], -[[6511]], -[[6512]], -[[6513]], -[[6514]], -[[6515]], -[[6516]], -[[6517]], -[[6518]], -[[6519]], -[[6520]], -[[6521]], -[[6522]], -[[6523]], -[[6524]], -[[6525]], -[[6526]], -[[6527]], -[[6528]], -[[6529]], -[[6530]], -[[6531]], -[[6532]], -[[6533]], -[[6534]], -[[6535]], -[[6536]], -[[6537]], -[[6538]], -[[6539]], -[[6540]], -[[6541]], -[[6542]], -[[6543]], -[[6544]], -[[6545]], -[[6546]], -[[6547]], -[[6548]], -[[6549]], -[[6550]], -[[6551]], -[[6552]], -[[6553]], -[[6554]], -[[6555]], -[[6556]], -[[6557]], -[[6558]], -[[6559]], -[[6560]], -[[6561]], -[[6562]], -[[6563]], -[[6564]], -[[6565]], -[[6566]], -[[6567]], -[[6568]], -[[6569]], -[[6570]], -[[6571]], -[[6572]], -[[6573]], -[[6574]], -[[6575]], -[[6576]], -[[6577]], -[[6578]], -[[6579]], -[[6580]], -[[6581]], -[[6582]], -[[6583]], -[[6584]], -[[6585]], -[[6586]], -[[6587]], -[[6588]], -[[6589]], -[[6590]], -[[6591]], -[[6592]], -[[6593]], -[[6594]], -[[6595]], -[[6596]], -[[6597]], -[[6598]], -[[6599]], -[[6600]], -[[6601]], -[[6602]], -[[6603]], -[[6604]], -[[6605]], -[[6606]], -[[6607]], -[[6608]], -[[6609]], -[[6610]], -[[6611]], -[[6612]], -[[6613]], -[[6614]], -[[6615]], -[[6616]], -[[6617]], -[[6618]], -[[6619]], -[[6620]], -[[6621]], -[[6622]], -[[6623]], -[[6624]], -[[6625]], -[[6626]], -[[6627]], -[[6628]], -[[6629]], -[[6630]], -[[6631]], -[[6632]], -[[6633]], -[[6634]], -[[6635]], -[[6636]], -[[6637]], -[[6638]], -[[6639]], -[[6640]], -[[6641]], -[[6642]], -[[6643]], -[[6644]], -[[6645]], -[[6646]], -[[6647]], -[[6648]], -[[6649]], -[[6650]], -[[6651]], -[[6652]], -[[6653]], -[[6654]], -[[6655]], -[[6656]], -[[6657]], -[[6658]], -[[6659]], -[[6660]], -[[6661]], -[[6662]], -[[6663]], -[[6664]], -[[6665]], -[[6666]], -[[6667]], -[[6668]], -[[6669]], -[[6670]], -[[6671]], -[[6672]], -[[6673]], -[[6674]], -[[6675]], -[[6676]], -[[6677]], -[[6678]], -[[6679]], -[[6680]], -[[6681]], -[[6682]], -[[6683]], -[[6684]], -[[6685]], -[[6686]], -[[6687]], -[[6688]], -[[6689]], -[[6690]], -[[6691]], -[[6692]], -[[6693]], -[[6694]], -[[6695]], -[[6696]], -[[6697]], -[[6698]], -[[6699]], -[[6700]], -[[6701]], -[[6702]], -[[6703]], -[[6704]], -[[6705]], -[[6706]], -[[6707]], -[[6708]], -[[6709]], -[[6710]], -[[6711]], -[[6712]], -[[6713]], -[[6714]], -[[6715]], -[[6716]], -[[6717]], -[[6718]], -[[6719]], -[[6720]], -[[6721]], -[[6722]], -[[6723]], -[[6724]], -[[6725]], -[[6726]], -[[6727]], -[[6728]], -[[6729]], -[[6730]], -[[6731]], -[[6732]], -[[6733]], -[[6734]], -[[6735]], -[[6736]], -[[6737]], -[[6738]], -[[6739]], -[[6740]], -[[6741]], -[[6742]], -[[6743]], -[[6744]], -[[6745]], -[[6746]], -[[6747]], -[[6748]], -[[6749]], -[[6750]], -[[6751]], -[[6752]], -[[6753]], -[[6754]], -[[6755]], -[[6756]], -[[6757]], -[[6758]], -[[6759]], -[[6760]], -[[6761]], -[[6762]], -[[6763]], -[[6764]], -[[6765]], -[[6766]], -[[6767]], -[[6768]], -[[6769]], -[[6770]], -[[6771]], -[[6772]], -[[6773]], -[[6774]], -[[6775]], -[[6776]], -[[6777]], -[[6778]], -[[6779]], -[[6780]], -[[6781]], -[[6782]], -[[6783]], -[[6784]], -[[6785]], -[[6786]], -[[6787]], -[[6788]], -[[6789]], -[[6790]], -[[6791]], -[[6792]], -[[6793]], -[[6794]], -[[6795]], -[[6796]], -[[6797]], -[[6798]], -[[6799]], -[[6800]], -[[6801]], -[[6802]], -[[6803]], -[[6804]], -[[6805]], -[[6806]], -[[6807]], -[[6808]], -[[6809]], -[[6810]], -[[6811]], -[[6812]], -[[6813]], -[[6814]], -[[6815]], -[[6816]], -[[6817]], -[[6818]], -[[6819]], -[[6820]], -[[6821]], -[[6822]], -[[6823]], -[[6824]], -[[6825]], -[[6826]], -[[6827]], -[[6828]], -[[6829]], -[[6830]], -[[6831]], -[[6832]], -[[6833]], -[[6834]], -[[6835]], -[[6836]], -[[6837]], -[[6838]], -[[6839]], -[[6840]], -[[6841]], -[[6842]], -[[6843]], -[[6844]], -[[6845]], -[[6846]], -[[6847]], -[[6848]], -[[6849]], -[[6850]], -[[6851]], -[[6852]], -[[6853]], -[[6854]], -[[6855]], -[[6856]], -[[6857]], -[[6858]], -[[6859]], -[[6860]], -[[6861]], -[[6862]], -[[6863]], -[[6864]], -[[6865]], -[[6866]], -[[6867]], -[[6868]], -[[6869]], -[[6870]], -[[6871]], -[[6872]], -[[6873]], -[[6874]], -[[6875]], -[[6876]], -[[6877]], -[[6878]], -[[6879]], -[[6880]], -[[6881]], -[[6882]], -[[6883]], -[[6884]], -[[6885]], -[[6886]], -[[6887]], -[[6888]], -[[6889]], -[[6890]], -[[6891]], -[[6892]], -[[6893]], -[[6894]], -[[6895]], -[[6896]], -[[6897]], -[[6898]], -[[6899]], -[[6900]], -[[6901]], -[[6902]], -[[6903]], -[[6904]], -[[6905]], -[[6906]], -[[6907]], -[[6908]], -[[6909]], -[[6910]], -[[6911]], -[[6912]], -[[6913]], -[[6914]], -[[6915]], -[[6916]], -[[6917]], -[[6918]], -[[6919]], -[[6920]], -[[6921]], -[[6922]], -[[6923]], -[[6924]], -[[6925]], -[[6926]], -[[6927]], -[[6928]], -[[6929]], -[[6930]], -[[6931]], -[[6932]], -[[6933]], -[[6934]], -[[6935]], -[[6936]], -[[6937]], -[[6938]], -[[6939]], -[[6940]], -[[6941]], -[[6942]], -[[6943]], -[[6944]], -[[6945]], -[[6946]], -[[6947]], -[[6948]], -[[6949]], -[[6950]], -[[6951]], -[[6952]], -[[6953]], -[[6954]], -[[6955]], -[[6956]], -[[6957]], -[[6958]], -[[6959]], -[[6960]], -[[6961]], -[[6962]], -[[6963]], -[[6964]], -[[6965]], -[[6966]], -[[6967]], -[[6968]], -[[6969]], -[[6970]], -[[6971]], -[[6972]], -[[6973]], -[[6974]], -[[6975]], -[[6976]], -[[6977]], -[[6978]], -[[6979]], -[[6980]], -[[6981]], -[[6982]], -[[6983]], -[[6984]], -[[6985]], -[[6986]], -[[6987]], -[[6988]], -[[6989]], -[[6990]], -[[6991]], -[[6992]], -[[6993]], -[[6994]], -[[6995]], -[[6996]], -[[6997]], -[[6998]], -[[6999]], -[[7000]], -[[7001]], -[[7002]], -[[7003]], -[[7004]], -[[7005]], -[[7006]], -[[7007]], -[[7008]], -[[7009]], -[[7010]], -[[7011]], -[[7012]], -[[7013]], -[[7014]], -[[7015]], -[[7016]], -[[7017]], -[[7018]], -[[7019]], -[[7020]], -[[7021]], -[[7022]], -[[7023]], -[[7024]], -[[7025]], -[[7026]], -[[7027]], -[[7028]], -[[7029]], -[[7030]], -[[7031]], -[[7032]], -[[7033]], -[[7034]], -[[7035]], -[[7036]], -[[7037]], -[[7038]], -[[7039]], -[[7040]], -[[7041]], -[[7042]], -[[7043]], -[[7044]], -[[7045]], -[[7046]], -[[7047]], -[[7048]], -[[7049]], -[[7050]], -[[7051]], -[[7052]], -[[7053]], -[[7054]], -[[7055]], -[[7056]], -[[7057]], -[[7058]], -[[7059]], -[[7060]], -[[7061]], -[[7062]], -[[7063]], -[[7064]], -[[7065]], -[[7066]], -[[7067]], -[[7068]], -[[7069]], -[[7070]], -[[7071]], -[[7072]], -[[7073]], -[[7074]], -[[7075]], -[[7076]], -[[7077]], -[[7078]], -[[7079]], -[[7080]], -[[7081]], -[[7082]], -[[7083]], -[[7084]], -[[7085]], -[[7086]], -[[7087]], -[[7088]], -[[7089]], -[[7090]], -[[7091]], -[[7092]], -[[7093]], -[[7094]], -[[7095]], -[[7096]], -[[7097]], -[[7098]], -[[7099]], -[[7100]], -[[7101]], -[[7102]], -[[7103]], -[[7104]], -[[7105]], -[[7106]], -[[7107]], -[[7108]], -[[7109]], -[[7110]], -[[7111]], -[[7112]], -[[7113]], -[[7114]], -[[7115]], -[[7116]], -[[7117]], -[[7118]], -[[7119]], -[[7120]], -[[7121]], -[[7122]], -[[7123]], -[[7124]], -[[7125]], -[[7126]], -[[7127]], -[[7128]], -[[7129]], -[[7130]], -[[7131]], -[[7132]], -[[7133]], -[[7134]], -[[7135]], -[[7136]], -[[7137]], -[[7138]], -[[7139]], -[[7140]], -[[7141]], -[[7142]], -[[7143]], -[[7144]], -[[7145]], -[[7146]], -[[7147]], -[[7148]], -[[7149]], -[[7150]], -[[7151]], -[[7152]], -[[7153]], -[[7154]], -[[7155]], -[[7156]], -[[7157]], -[[7158]], -[[7159]], -[[7160]], -[[7161]], -[[7162]], -[[7163]], -[[7164]], -[[7165]], -[[7166]], -[[7167]], -[[7168]], -[[7169]], -[[7170]], -[[7171]], -[[7172]], -[[7173]], -[[7174]], -[[7175]], -[[7176]], -[[7177]], -[[7178]], -[[7179]], -[[7180]], -[[7181]], -[[7182]], -[[7183]], -[[7184]], -[[7185]], -[[7186]], -[[7187]], -[[7188]], -[[7189]], -[[7190]], -[[7191]], -[[7192]], -[[7193]], -[[7194]], -[[7195]], -[[7196]], -[[7197]], -[[7198]], -[[7199]], -[[7200]], -[[7201]], -[[7202]], -[[7203]], -[[7204]], -[[7205]], -[[7206]], -[[7207]], -[[7208]], -[[7209]], -[[7210]], -[[7211]], -[[7212]], -[[7213]], -[[7214]], -[[7215]], -[[7216]], -[[7217]], -[[7218]], -[[7219]], -[[7220]], -[[7221]], -[[7222]], -[[7223]], -[[7224]], -[[7225]], -[[7226]], -[[7227]], -[[7228]], -[[7229]], -[[7230]], -[[7231]], -[[7232]], -[[7233]], -[[7234]], -[[7235]], -[[7236]], -[[7237]], -[[7238]], -[[7239]], -[[7240]], -[[7241]], -[[7242]], -[[7243]], -[[7244]], -[[7245]], -[[7246]], -[[7247]], -[[7248]], -[[7249]], -[[7250]], -[[7251]], -[[7252]], -[[7253]], -[[7254]], -[[7255]], -[[7256]], -[[7257]], -[[7258]], -[[7259]], -[[7260]], -[[7261]], -[[7262]], -[[7263]], -[[7264]], -[[7265]], -[[7266]], -[[7267]], -[[7268]], -[[7269]], -[[7270]], -[[7271]], -[[7272]], -[[7273]], -[[7274]], -[[7275]], -[[7276]], -[[7277]], -[[7278]], -[[7279]], -[[7280]], -[[7281]], -[[7282]], -[[7283]], -[[7284]], -[[7285]], -[[7286]], -[[7287]], -[[7288]], -[[7289]], -[[7290]], -[[7291]], -[[7292]], -[[7293]], -[[7294]], -[[7295]], -[[7296]], -[[7297]], -[[7298]], -[[7299]], -[[7300]], -[[7301]], -[[7302]], -[[7303]], -[[7304]], -[[7305]], -[[7306]], -[[7307]], -[[7308]], -[[7309]], -[[7310]], -[[7311]], -[[7312]], -[[7313]], -[[7314]], -[[7315]], -[[7316]], -[[7317]], -[[7318]], -[[7319]], -[[7320]], -[[7321]], -[[7322]], -[[7323]], -[[7324]], -[[7325]], -[[7326]], -[[7327]], -[[7328]], -[[7329]], -[[7330]], -[[7331]], -[[7332]], -[[7333]], -[[7334]], -[[7335]], -[[7336]], -[[7337]], -[[7338]], -[[7339]], -[[7340]], -[[7341]], -[[7342]], -[[7343]], -[[7344]], -[[7345]], -[[7346]], -[[7347]], -[[7348]], -[[7349]], -[[7350]], -[[7351]], -[[7352]], -[[7353]], -[[7354]], -[[7355]], -[[7356]], -[[7357]], -[[7358]], -[[7359]], -[[7360]], -[[7361]], -[[7362]], -[[7363]], -[[7364]], -[[7365]], -[[7366]], -[[7367]], -[[7368]], -[[7369]], -[[7370]], -[[7371]], -[[7372]], -[[7373]], -[[7374]], -[[7375]], -[[7376]], -[[7377]], -[[7378]], -[[7379]], -[[7380]], -[[7381]], -[[7382]], -[[7383]], -[[7384]], -[[7385]], -[[7386]], -[[7387]], -[[7388]], -[[7389]], -[[7390]], -[[7391]], -[[7392]], -[[7393]], -[[7394]], -[[7395]], -[[7396]], -[[7397]], -[[7398]], -[[7399]], -[[7400]], -[[7401]], -[[7402]], -[[7403]], -[[7404]], -[[7405]], -[[7406]], -[[7407]], -[[7408]], -[[7409]], -[[7410]], -[[7411]], -[[7412]], -[[7413]], -[[7414]], -[[7415]], -[[7416]], -[[7417]], -[[7418]], -[[7419]], -[[7420]], -[[7421]], -[[7422]], -[[7423]], -[[7424]], -[[7425]], -[[7426]], -[[7427]], -[[7428]], -[[7429]], -[[7430]], -[[7431]], -[[7432]], -[[7433]], -[[7434]], -[[7435]], -[[7436]], -[[7437]], -[[7438]], -[[7439]], -[[7440]], -[[7441]], -[[7442]], -[[7443]], -[[7444]], -[[7445]], -[[7446]], -[[7447]], -[[7448]], -[[7449]], -[[7450]], -[[7451]], -[[7452]], -[[7453]], -[[7454]], -[[7455]], -[[7456]], -[[7457]], -[[7458]], -[[7459]], -[[7460]], -[[7461]], -[[7462]], -[[7463]], -[[7464]], -[[7465]], -[[7466]], -[[7467]], -[[7468]], -[[7469]], -[[7470]], -[[7471]], -[[7472]], -[[7473]], -[[7474]], -[[7475]], -[[7476]], -[[7477]], -[[7478]], -[[7479]], -[[7480]], -[[7481]], -[[7482]], -[[7483]], -[[7484]], -[[7485]], -[[7486]], -[[7487]], -[[7488]], -[[7489]], -[[7490]], -[[7491]], -[[7492]], -[[7493]], -[[7494]], -[[7495]], -[[7496]], -[[7497]], -[[7498]], -[[7499]], -[[7500]], -[[7501]], -[[7502]], -[[7503]], -[[7504]], -[[7505]], -[[7506]], -[[7507]], -[[7508]], -[[7509]], -[[7510]], -[[7511]], -[[7512]], -[[7513]], -[[7514]], -[[7515]], -[[7516]], -[[7517]], -[[7518]], -[[7519]], -[[7520]], -[[7521]], -[[7522]], -[[7523]], -[[7524]], -[[7525]], -[[7526]], -[[7527]], -[[7528]], -[[7529]], -[[7530]], -[[7531]], -[[7532]], -[[7533]], -[[7534]], -[[7535]], -[[7536]], -[[7537]], -[[7538]], -[[7539]], -[[7540]], -[[7541]], -[[7542]], -[[7543]], -[[7544]], -[[7545]], -[[7546]], -[[7547]], -[[7548]], -[[7549]], -[[7550]], -[[7551]], -[[7552]], -[[7553]], -[[7554]], -[[7555]], -[[7556]], -[[7557]], -[[7558]], -[[7559]], -[[7560]], -[[7561]], -[[7562]], -[[7563]], -[[7564]], -[[7565]], -[[7566]], -[[7567]], -[[7568]], -[[7569]], -[[7570]], -[[7571]], -[[7572]], -[[7573]], -[[7574]], -[[7575]], -[[7576]], -[[7577]], -[[7578]], -[[7579]], -[[7580]], -[[7581]], -[[7582]], -[[7583]], -[[7584]], -[[7585]], -[[7586]], -[[7587]], -[[7588]], -[[7589]], -[[7590]], -[[7591]], -[[7592]], -[[7593]], -[[7594]], -[[7595]], -[[7596]], -[[7597]], -[[7598]], -[[7599]], -[[7600]], -[[7601]], -[[7602]], -[[7603]], -[[7604]], -[[7605]], -[[7606]], -[[7607]], -[[7608]], -[[7609]], -[[7610]], -[[7611]], -[[7612]], -[[7613]], -[[7614]], -[[7615]], -[[7616]], -[[7617]], -[[7618]], -[[7619]], -[[7620]], -[[7621]], -[[7622]], -[[7623]], -[[7624]], -[[7625]], -[[7626]], -[[7627]], -[[7628]], -[[7629]], -[[7630]], -[[7631]], -[[7632]], -[[7633]], -[[7634]], -[[7635]], -[[7636]], -[[7637]], -[[7638]], -[[7639]], -[[7640]], -[[7641]], -[[7642]], -[[7643]], -[[7644]], -[[7645]], -[[7646]], -[[7647]], -[[7648]], -[[7649]], -[[7650]], -[[7651]], -[[7652]], -[[7653]], -[[7654]], -[[7655]], -[[7656]], -[[7657]], -[[7658]], -[[7659]], -[[7660]], -[[7661]], -[[7662]], -[[7663]], -[[7664]], -[[7665]], -[[7666]], -[[7667]], -[[7668]], -[[7669]], -[[7670]], -[[7671]], -[[7672]], -[[7673]], -[[7674]], -[[7675]], -[[7676]], -[[7677]], -[[7678]], -[[7679]], -[[7680]], -[[7681]], -[[7682]], -[[7683]], -[[7684]], -[[7685]], -[[7686]], -[[7687]], -[[7688]], -[[7689]], -[[7690]], -[[7691]], -[[7692]], -[[7693]], -[[7694]], -[[7695]], -[[7696]], -[[7697]], -[[7698]], -[[7699]], -[[7700]], -[[7701]], -[[7702]], -[[7703]], -[[7704]], -[[7705]], -[[7706]], -[[7707]], -[[7708]], -[[7709]], -[[7710]], -[[7711]], -[[7712]], -[[7713]], -[[7714]], -[[7715]], -[[7716]], -[[7717]], -[[7718]], -[[7719]], -[[7720]], -[[7721]], -[[7722]], -[[7723]], -[[7724]], -[[7725]], -[[7726]], -[[7727]], -[[7728]], -[[7729]], -[[7730]], -[[7731]], -[[7732]], -[[7733]], -[[7734]], -[[7735]], -[[7736]], -[[7737]], -[[7738]], -[[7739]], -[[7740]], -[[7741]], -[[7742]], -[[7743]], -[[7744]], -[[7745]], -[[7746]], -[[7747]], -[[7748]], -[[7749]], -[[7750]], -[[7751]], -[[7752]], -[[7753]], -[[7754]], -[[7755]], -[[7756]], -[[7757]], -[[7758]], -[[7759]], -[[7760]], -[[7761]], -[[7762]], -[[7763]], -[[7764]], -[[7765]], -[[7766]], -[[7767]], -[[7768]], -[[7769]], -[[7770]], -[[7771]], -[[7772]], -[[7773]], -[[7774]], -[[7775]], -[[7776]], -[[7777]], -[[7778]], -[[7779]], -[[7780]], -[[7781]], -[[7782]], -[[7783]], -[[7784]], -[[7785]], -[[7786]], -[[7787]], -[[7788]], -[[7789]], -[[7790]], -[[7791]], -[[7792]], -[[7793]], -[[7794]], -[[7795]], -[[7796]], -[[7797]], -[[7798]], -[[7799]], -[[7800]], -[[7801]], -[[7802]], -[[7803]], -[[7804]], -[[7805]], -[[7806]], -[[7807]], -[[7808]], -[[7809]], -[[7810]], -[[7811]], -[[7812]], -[[7813]], -[[7814]], -[[7815]], -[[7816]], -[[7817]], -[[7818]], -[[7819]], -[[7820]], -[[7821]], -[[7822]], -[[7823]], -[[7824]], -[[7825]], -[[7826]], -[[7827]], -[[7828]], -[[7829]], -[[7830]], -[[7831]], -[[7832]], -[[7833]], -[[7834]], -[[7835]], -[[7836]], -[[7837]], -[[7838]], -[[7839]], -[[7840]], -[[7841]], -[[7842]], -[[7843]], -[[7844]], -[[7845]], -[[7846]], -[[7847]], -[[7848]], -[[7849]], -[[7850]], -[[7851]], -[[7852]], -[[7853]], -[[7854]], -[[7855]], -[[7856]], -[[7857]], -[[7858]], -[[7859]], -[[7860]], -[[7861]], -[[7862]], -[[7863]], -[[7864]], -[[7865]], -[[7866]], -[[7867]], -[[7868]], -[[7869]], -[[7870]], -[[7871]], -[[7872]], -[[7873]], -[[7874]], -[[7875]], -[[7876]], -[[7877]], -[[7878]], -[[7879]], -[[7880]], -[[7881]], -[[7882]], -[[7883]], -[[7884]], -[[7885]], -[[7886]], -[[7887]], -[[7888]], -[[7889]], -[[7890]], -[[7891]], -[[7892]], -[[7893]], -[[7894]], -[[7895]], -[[7896]], -[[7897]], -[[7898]], -[[7899]], -[[7900]], -[[7901]], -[[7902]], -[[7903]], -[[7904]], -[[7905]], -[[7906]], -[[7907]], -[[7908]], -[[7909]], -[[7910]], -[[7911]], -[[7912]], -[[7913]], -[[7914]], -[[7915]], -[[7916]], -[[7917]], -[[7918]], -[[7919]], -[[7920]], -[[7921]], -[[7922]], -[[7923]], -[[7924]], -[[7925]], -[[7926]], -[[7927]], -[[7928]], -[[7929]], -[[7930]], -[[7931]], -[[7932]], -[[7933]], -[[7934]], -[[7935]], -[[7936]], -[[7937]], -[[7938]], -[[7939]], -[[7940]], -[[7941]], -[[7942]], -[[7943]], -[[7944]], -[[7945]], -[[7946]], -[[7947]], -[[7948]], -[[7949]], -[[7950]], -[[7951]], -[[7952]], -[[7953]], -[[7954]], -[[7955]], -[[7956]], -[[7957]], -[[7958]], -[[7959]], -[[7960]], -[[7961]], -[[7962]], -[[7963]], -[[7964]], -[[7965]], -[[7966]], -[[7967]], -[[7968]], -[[7969]], -[[7970]], -[[7971]], -[[7972]], -[[7973]], -[[7974]], -[[7975]], -[[7976]], -[[7977]], -[[7978]], -[[7979]], -[[7980]], -[[7981]], -[[7982]], -[[7983]], -[[7984]], -[[7985]], -[[7986]], -[[7987]], -[[7988]], -[[7989]], -[[7990]], -[[7991]], -[[7992]], -[[7993]], -[[7994]], -[[7995]], -[[7996]], -[[7997]], -[[7998]], -[[7999]], -[[8000]], -[[8001]], -[[8002]], -[[8003]], -[[8004]], -[[8005]], -[[8006]], -[[8007]], -[[8008]], -[[8009]], -[[8010]], -[[8011]], -[[8012]], -[[8013]], -[[8014]], -[[8015]], -[[8016]], -[[8017]], -[[8018]], -[[8019]], -[[8020]], -[[8021]], -[[8022]], -[[8023]], -[[8024]], -[[8025]], -[[8026]], -[[8027]], -[[8028]], -[[8029]], -[[8030]], -[[8031]], -[[8032]], -[[8033]], -[[8034]], -[[8035]], -[[8036]], -[[8037]], -[[8038]], -[[8039]], -[[8040]], -[[8041]], -[[8042]], -[[8043]], -[[8044]], -[[8045]], -[[8046]], -[[8047]], -[[8048]], -[[8049]], -[[8050]], -[[8051]], -[[8052]], -[[8053]], -[[8054]], -[[8055]], -[[8056]], -[[8057]], -[[8058]], -[[8059]], -[[8060]], -[[8061]], -[[8062]], -[[8063]], -[[8064]], -[[8065]], -[[8066]], -[[8067]], -[[8068]], -[[8069]], -[[8070]], -[[8071]], -[[8072]], -[[8073]], -[[8074]], -[[8075]], -[[8076]], -[[8077]], -[[8078]], -[[8079]], -[[8080]], -[[8081]], -[[8082]], -[[8083]], -[[8084]], -[[8085]], -[[8086]], -[[8087]], -[[8088]], -[[8089]], -[[8090]], -[[8091]], -[[8092]], -[[8093]], -[[8094]], -[[8095]], -[[8096]], -[[8097]], -[[8098]], -[[8099]], -[[8100]], -[[8101]], -[[8102]], -[[8103]], -[[8104]], -[[8105]], -[[8106]], -[[8107]], -[[8108]], -[[8109]], -[[8110]], -[[8111]], -[[8112]], -[[8113]], -[[8114]], -[[8115]], -[[8116]], -[[8117]], -[[8118]], -[[8119]], -[[8120]], -[[8121]], -[[8122]], -[[8123]], -[[8124]], -[[8125]], -[[8126]], -[[8127]], -[[8128]], -[[8129]], -[[8130]], -[[8131]], -[[8132]], -[[8133]], -[[8134]], -[[8135]], -[[8136]], -[[8137]], -[[8138]], -[[8139]], -[[8140]], -[[8141]], -[[8142]], -[[8143]], -[[8144]], -[[8145]], -[[8146]], -[[8147]], -[[8148]], -[[8149]], -[[8150]], -[[8151]], -[[8152]], -[[8153]], -[[8154]], -[[8155]], -[[8156]], -[[8157]], -[[8158]], -[[8159]], -[[8160]], -[[8161]], -[[8162]], -[[8163]], -[[8164]], -[[8165]], -[[8166]], -[[8167]], -[[8168]], -[[8169]], -[[8170]], -[[8171]], -[[8172]], -[[8173]], -[[8174]], -[[8175]], -[[8176]], -[[8177]], -[[8178]], -[[8179]], -[[8180]], -[[8181]], -[[8182]], -[[8183]], -[[8184]], -[[8185]], -[[8186]], -[[8187]], -[[8188]], -[[8189]], -[[8190]], -[[8191]], -[[8192]], -[[8193]], -[[8194]], -[[8195]], -[[8196]], -[[8197]], -[[8198]], -[[8199]], -[[8200]], -[[8201]], -[[8202]], -[[8203]], -[[8204]], -[[8205]], -[[8206]], -[[8207]], -[[8208]], -[[8209]], -[[8210]], -[[8211]], -[[8212]], -[[8213]], -[[8214]], -[[8215]], -[[8216]], -[[8217]], -[[8218]], -[[8219]], -[[8220]], -[[8221]], -[[8222]], -[[8223]], -[[8224]], -[[8225]], -[[8226]], -[[8227]], -[[8228]], -[[8229]], -[[8230]], -[[8231]], -[[8232]], -[[8233]], -[[8234]], -[[8235]], -[[8236]], -[[8237]], -[[8238]], -[[8239]], -[[8240]], -[[8241]], -[[8242]], -[[8243]], -[[8244]], -[[8245]], -[[8246]], -[[8247]], -[[8248]], -[[8249]], -[[8250]], -[[8251]], -[[8252]], -[[8253]], -[[8254]], -[[8255]], -[[8256]], -[[8257]], -[[8258]], -[[8259]], -[[8260]], -[[8261]], -[[8262]], -[[8263]], -[[8264]], -[[8265]], -[[8266]], -[[8267]], -[[8268]], -[[8269]], -[[8270]], -[[8271]], -[[8272]], -[[8273]], -[[8274]], -[[8275]], -[[8276]], -[[8277]], -[[8278]], -[[8279]], -[[8280]], -[[8281]], -[[8282]], -[[8283]], -[[8284]], -[[8285]], -[[8286]], -[[8287]], -[[8288]], -[[8289]], -[[8290]], -[[8291]], -[[8292]], -[[8293]], -[[8294]], -[[8295]], -[[8296]], -[[8297]], -[[8298]], -[[8299]], -[[8300]], -[[8301]], -[[8302]], -[[8303]], -[[8304]], -[[8305]], -[[8306]], -[[8307]], -[[8308]], -[[8309]], -[[8310]], -[[8311]], -[[8312]], -[[8313]], -[[8314]], -[[8315]], -[[8316]], -[[8317]], -[[8318]], -[[8319]], -[[8320]], -[[8321]], -[[8322]], -[[8323]], -[[8324]], -[[8325]], -[[8326]], -[[8327]], -[[8328]], -[[8329]], -[[8330]], -[[8331]], -[[8332]], -[[8333]], -[[8334]], -[[8335]], -[[8336]], -[[8337]], -[[8338]], -[[8339]], -[[8340]], -[[8341]], -[[8342]], -[[8343]], -[[8344]], -[[8345]], -[[8346]], -[[8347]], -[[8348]], -[[8349]], -[[8350]], -[[8351]], -[[8352]], -[[8353]], -[[8354]], -[[8355]], -[[8356]], -[[8357]], -[[8358]], -[[8359]], -[[8360]], -[[8361]], -[[8362]], -[[8363]], -[[8364]], -[[8365]], -[[8366]], -[[8367]], -[[8368]], -[[8369]], -[[8370]], -[[8371]], -[[8372]], -[[8373]], -[[8374]], -[[8375]], -[[8376]], -[[8377]], -[[8378]], -[[8379]], -[[8380]], -[[8381]], -[[8382]], -[[8383]], -[[8384]], -[[8385]], -[[8386]], -[[8387]], -[[8388]], -[[8389]], -[[8390]], -[[8391]], -[[8392]], -[[8393]], -[[8394]], -[[8395]], -[[8396]], -[[8397]], -[[8398]], -[[8399]], -[[8400]], -[[8401]], -[[8402]], -[[8403]], -[[8404]], -[[8405]], -[[8406]], -[[8407]], -[[8408]], -[[8409]], -[[8410]], -[[8411]], -[[8412]], -[[8413]], -[[8414]], -[[8415]], -[[8416]], -[[8417]], -[[8418]], -[[8419]], -[[8420]], -[[8421]], -[[8422]], -[[8423]], -[[8424]], -[[8425]], -[[8426]], -[[8427]], -[[8428]], -[[8429]], -[[8430]], -[[8431]], -[[8432]], -[[8433]], -[[8434]], -[[8435]], -[[8436]], -[[8437]], -[[8438]], -[[8439]], -[[8440]], -[[8441]], -[[8442]], -[[8443]], -[[8444]], -[[8445]], -[[8446]], -[[8447]], -[[8448]], -[[8449]], -[[8450]], -[[8451]], -[[8452]], -[[8453]], -[[8454]], -[[8455]], -[[8456]], -[[8457]], -[[8458]], -[[8459]], -[[8460]], -[[8461]], -[[8462]], -[[8463]], -[[8464]], -[[8465]], -[[8466]], -[[8467]], -[[8468]], -[[8469]], -[[8470]], -[[8471]], -[[8472]], -[[8473]], -[[8474]], -[[8475]], -[[8476]], -[[8477]], -[[8478]], -[[8479]], -[[8480]], -[[8481]], -[[8482]], -[[8483]], -[[8484]], -[[8485]], -[[8486]], -[[8487]], -[[8488]], -[[8489]], -[[8490]], -[[8491]], -[[8492]], -[[8493]], -[[8494]], -[[8495]], -[[8496]], -[[8497]], -[[8498]], -[[8499]], -[[8500]], -[[8501]], -[[8502]], -[[8503]], -[[8504]], -[[8505]], -[[8506]], -[[8507]], -[[8508]], -[[8509]], -[[8510]], -[[8511]], -[[8512]], -[[8513]], -[[8514]], -[[8515]], -[[8516]], -[[8517]], -[[8518]], -[[8519]], -[[8520]], -[[8521]], -[[8522]], -[[8523]], -[[8524]], -[[8525]], -[[8526]], -[[8527]], -[[8528]], -[[8529]], -[[8530]], -[[8531]], -[[8532]], -[[8533]], -[[8534]], -[[8535]], -[[8536]], -[[8537]], -[[8538]], -[[8539]], -[[8540]], -[[8541]], -[[8542]], -[[8543]], -[[8544]], -[[8545]], -[[8546]], -[[8547]], -[[8548]], -[[8549]], -[[8550]], -[[8551]], -[[8552]], -[[8553]], -[[8554]], -[[8555]], -[[8556]], -[[8557]], -[[8558]], -[[8559]], -[[8560]], -[[8561]], -[[8562]], -[[8563]], -[[8564]], -[[8565]], -[[8566]], -[[8567]], -[[8568]], -[[8569]], -[[8570]], -[[8571]], -[[8572]], -[[8573]], -[[8574]], -[[8575]], -[[8576]], -[[8577]], -[[8578]], -[[8579]], -[[8580]], -[[8581]], -[[8582]], -[[8583]], -[[8584]], -[[8585]], -[[8586]], -[[8587]], -[[8588]], -[[8589]], -[[8590]], -[[8591]], -[[8592]], -[[8593]], -[[8594]], -[[8595]], -[[8596]], -[[8597]], -[[8598]], -[[8599]], -[[8600]], -[[8601]], -[[8602]], -[[8603]], -[[8604]], -[[8605]], -[[8606]], -[[8607]], -[[8608]], -[[8609]], -[[8610]], -[[8611]], -[[8612]], -[[8613]], -[[8614]], -[[8615]], -[[8616]], -[[8617]], -[[8618]], -[[8619]], -[[8620]], -[[8621]], -[[8622]], -[[8623]], -[[8624]], -[[8625]], -[[8626]], -[[8627]], -[[8628]], -[[8629]], -[[8630]], -[[8631]], -[[8632]], -[[8633]], -[[8634]], -[[8635]], -[[8636]], -[[8637]], -[[8638]], -[[8639]], -[[8640]], -[[8641]], -[[8642]], -[[8643]], -[[8644]], -[[8645]], -[[8646]], -[[8647]], -[[8648]], -[[8649]], -[[8650]], -[[8651]], -[[8652]], -[[8653]], -[[8654]], -[[8655]], -[[8656]], -[[8657]], -[[8658]], -[[8659]], -[[8660]], -[[8661]], -[[8662]], -[[8663]], -[[8664]], -[[8665]], -[[8666]], -[[8667]], -[[8668]], -[[8669]], -[[8670]], -[[8671]], -[[8672]], -[[8673]], -[[8674]], -[[8675]], -[[8676]], -[[8677]], -[[8678]], -[[8679]], -[[8680]], -[[8681]], -[[8682]], -[[8683]], -[[8684]], -[[8685]], -[[8686]], -[[8687]], -[[8688]], -[[8689]], -[[8690]], -[[8691]], -[[8692]], -[[8693]], -[[8694]], -[[8695]], -[[8696]], -[[8697]], -[[8698]], -[[8699]], -[[8700]], -[[8701]], -[[8702]], -[[8703]], -[[8704]], -[[8705]], -[[8706]], -[[8707]], -[[8708]], -[[8709]], -[[8710]], -[[8711]], -[[8712]], -[[8713]], -[[8714]], -[[8715]], -[[8716]], -[[8717]], -[[8718]], -[[8719]], -[[8720]], -[[8721]], -[[8722]], -[[8723]], -[[8724]], -[[8725]], -[[8726]], -[[8727]], -[[8728]], -[[8729]], -[[8730]], -[[8731]], -[[8732]], -[[8733]], -[[8734]], -[[8735]], -[[8736]], -[[8737]], -[[8738]], -[[8739]], -[[8740]], -[[8741]], -[[8742]], -[[8743]], -[[8744]], -[[8745]], -[[8746]], -[[8747]], -[[8748]], -[[8749]], -[[8750]], -[[8751]], -[[8752]], -[[8753]], -[[8754]], -[[8755]], -[[8756]], -[[8757]], -[[8758]], -[[8759]], -[[8760]], -[[8761]], -[[8762]], -[[8763]], -[[8764]], -[[8765]], -[[8766]], -[[8767]], -[[8768]], -[[8769]], -[[8770]], -[[8771]], -[[8772]], -[[8773]], -[[8774]], -[[8775]], -[[8776]], -[[8777]], -[[8778]], -[[8779]], -[[8780]], -[[8781]], -[[8782]], -[[8783]], -[[8784]], -[[8785]], -[[8786]], -[[8787]], -[[8788]], -[[8789]], -[[8790]], -[[8791]], -[[8792]], -[[8793]], -[[8794]], -[[8795]], -[[8796]], -[[8797]], -[[8798]], -[[8799]], -[[8800]], -[[8801]], -[[8802]], -[[8803]], -[[8804]], -[[8805]], -[[8806]], -[[8807]], -[[8808]], -[[8809]], -[[8810]], -[[8811]], -[[8812]], -[[8813]], -[[8814]], -[[8815]], -[[8816]], -[[8817]], -[[8818]], -[[8819]], -[[8820]], -[[8821]], -[[8822]], -[[8823]], -[[8824]], -[[8825]], -[[8826]], -[[8827]], -[[8828]], -[[8829]], -[[8830]], -[[8831]], -[[8832]], -[[8833]], -[[8834]], -[[8835]], -[[8836]], -[[8837]], -[[8838]], -[[8839]], -[[8840]], -[[8841]], -[[8842]], -[[8843]], -[[8844]], -[[8845]], -[[8846]], -[[8847]], -[[8848]], -[[8849]], -[[8850]], -[[8851]], -[[8852]], -[[8853]], -[[8854]], -[[8855]], -[[8856]], -[[8857]], -[[8858]], -[[8859]], -[[8860]], -[[8861]], -[[8862]], -[[8863]], -[[8864]], -[[8865]], -[[8866]], -[[8867]], -[[8868]], -[[8869]], -[[8870]], -[[8871]], -[[8872]], -[[8873]], -[[8874]], -[[8875]], -[[8876]], -[[8877]], -[[8878]], -[[8879]], -[[8880]], -[[8881]], -[[8882]], -[[8883]], -[[8884]], -[[8885]], -[[8886]], -[[8887]], -[[8888]], -[[8889]], -[[8890]], -[[8891]], -[[8892]], -[[8893]], -[[8894]], -[[8895]], -[[8896]], -[[8897]], -[[8898]], -[[8899]], -[[8900]], -[[8901]], -[[8902]], -[[8903]], -[[8904]], -[[8905]], -[[8906]], -[[8907]], -[[8908]], -[[8909]], -[[8910]], -[[8911]], -[[8912]], -[[8913]], -[[8914]], -[[8915]], -[[8916]], -[[8917]], -[[8918]], -[[8919]], -[[8920]], -[[8921]], -[[8922]], -[[8923]], -[[8924]], -[[8925]], -[[8926]], -[[8927]], -[[8928]], -[[8929]], -[[8930]], -[[8931]], -[[8932]], -[[8933]], -[[8934]], -[[8935]], -[[8936]], -[[8937]], -[[8938]], -[[8939]], -[[8940]], -[[8941]], -[[8942]], -[[8943]], -[[8944]], -[[8945]], -[[8946]], -[[8947]], -[[8948]], -[[8949]], -[[8950]], -[[8951]], -[[8952]], -[[8953]], -[[8954]], -[[8955]], -[[8956]], -[[8957]], -[[8958]], -[[8959]], -[[8960]], -[[8961]], -[[8962]], -[[8963]], -[[8964]], -[[8965]], -[[8966]], -[[8967]], -[[8968]], -[[8969]], -[[8970]], -[[8971]], -[[8972]], -[[8973]], -[[8974]], -[[8975]], -[[8976]], -[[8977]], -[[8978]], -[[8979]], -[[8980]], -[[8981]], -[[8982]], -[[8983]], -[[8984]], -[[8985]], -[[8986]], -[[8987]], -[[8988]], -[[8989]], -[[8990]], -[[8991]], -[[8992]], -[[8993]], -[[8994]], -[[8995]], -[[8996]], -[[8997]], -[[8998]], -[[8999]], -[[9000]], -[[9001]], -[[9002]], -[[9003]], -[[9004]], -[[9005]], -[[9006]], -[[9007]], -[[9008]], -[[9009]], -[[9010]], -[[9011]], -[[9012]], -[[9013]], -[[9014]], -[[9015]], -[[9016]], -[[9017]], -[[9018]], -[[9019]], -[[9020]], -[[9021]], -[[9022]], -[[9023]], -[[9024]], -[[9025]], -[[9026]], -[[9027]], -[[9028]], -[[9029]], -[[9030]], -[[9031]], -[[9032]], -[[9033]], -[[9034]], -[[9035]], -[[9036]], -[[9037]], -[[9038]], -[[9039]], -[[9040]], -[[9041]], -[[9042]], -[[9043]], -[[9044]], -[[9045]], -[[9046]], -[[9047]], -[[9048]], -[[9049]], -[[9050]], -[[9051]], -[[9052]], -[[9053]], -[[9054]], -[[9055]], -[[9056]], -[[9057]], -[[9058]], -[[9059]], -[[9060]], -[[9061]], -[[9062]], -[[9063]], -[[9064]], -[[9065]], -[[9066]], -[[9067]], -[[9068]], -[[9069]], -[[9070]], -[[9071]], -[[9072]], -[[9073]], -[[9074]], -[[9075]], -[[9076]], -[[9077]], -[[9078]], -[[9079]], -[[9080]], -[[9081]], -[[9082]], -[[9083]], -[[9084]], -[[9085]], -[[9086]], -[[9087]], -[[9088]], -[[9089]], -[[9090]], -[[9091]], -[[9092]], -[[9093]], -[[9094]], -[[9095]], -[[9096]], -[[9097]], -[[9098]], -[[9099]], -[[9100]], -[[9101]], -[[9102]], -[[9103]], -[[9104]], -[[9105]], -[[9106]], -[[9107]], -[[9108]], -[[9109]], -[[9110]], -[[9111]], -[[9112]], -[[9113]], -[[9114]], -[[9115]], -[[9116]], -[[9117]], -[[9118]], -[[9119]], -[[9120]], -[[9121]], -[[9122]], -[[9123]], -[[9124]], -[[9125]], -[[9126]], -[[9127]], -[[9128]], -[[9129]], -[[9130]], -[[9131]], -[[9132]], -[[9133]], -[[9134]], -[[9135]], -[[9136]], -[[9137]], -[[9138]], -[[9139]], -[[9140]], -[[9141]], -[[9142]], -[[9143]], -[[9144]], -[[9145]], -[[9146]], -[[9147]], -[[9148]], -[[9149]], -[[9150]], -[[9151]], -[[9152]], -[[9153]], -[[9154]], -[[9155]], -[[9156]], -[[9157]], -[[9158]], -[[9159]], -[[9160]], -[[9161]], -[[9162]], -[[9163]], -[[9164]], -[[9165]], -[[9166]], -[[9167]], -[[9168]], -[[9169]], -[[9170]], -[[9171]], -[[9172]], -[[9173]], -[[9174]], -[[9175]], -[[9176]], -[[9177]], -[[9178]], -[[9179]], -[[9180]], -[[9181]], -[[9182]], -[[9183]], -[[9184]], -[[9185]], -[[9186]], -[[9187]], -[[9188]], -[[9189]], -[[9190]], -[[9191]], -[[9192]], -[[9193]], -[[9194]], -[[9195]], -[[9196]], -[[9197]], -[[9198]], -[[9199]], -[[9200]], -[[9201]], -[[9202]], -[[9203]], -[[9204]], -[[9205]], -[[9206]], -[[9207]], -[[9208]], -[[9209]], -[[9210]], -[[9211]], -[[9212]], -[[9213]], -[[9214]], -[[9215]], -[[9216]], -[[9217]], -[[9218]], -[[9219]], -[[9220]], -[[9221]], -[[9222]], -[[9223]], -[[9224]], -[[9225]], -[[9226]], -[[9227]], -[[9228]], -[[9229]], -[[9230]], -[[9231]], -[[9232]], -[[9233]], -[[9234]], -[[9235]], -[[9236]], -[[9237]], -[[9238]], -[[9239]], -[[9240]], -[[9241]], -[[9242]], -[[9243]], -[[9244]], -[[9245]], -[[9246]], -[[9247]], -[[9248]], -[[9249]], -[[9250]], -[[9251]], -[[9252]], -[[9253]], -[[9254]], -[[9255]], -[[9256]], -[[9257]], -[[9258]], -[[9259]], -[[9260]], -[[9261]], -[[9262]], -[[9263]], -[[9264]], -[[9265]], -[[9266]], -[[9267]], -[[9268]], -[[9269]], -[[9270]], -[[9271]], -[[9272]], -[[9273]], -[[9274]], -[[9275]], -[[9276]], -[[9277]], -[[9278]], -[[9279]], -[[9280]], -[[9281]], -[[9282]], -[[9283]], -[[9284]], -[[9285]], -[[9286]], -[[9287]], -[[9288]], -[[9289]], -[[9290]], -[[9291]], -[[9292]], -[[9293]], -[[9294]], -[[9295]], -[[9296]], -[[9297]], -[[9298]], -[[9299]], -[[9300]], -[[9301]], -[[9302]], -[[9303]], -[[9304]], -[[9305]], -[[9306]], -[[9307]], -[[9308]], -[[9309]], -[[9310]], -[[9311]], -[[9312]], -[[9313]], -[[9314]], -[[9315]], -[[9316]], -[[9317]], -[[9318]], -[[9319]], -[[9320]], -[[9321]], -[[9322]], -[[9323]], -[[9324]], -[[9325]], -[[9326]], -[[9327]], -[[9328]], -[[9329]], -[[9330]], -[[9331]], -[[9332]], -[[9333]], -[[9334]], -[[9335]], -[[9336]], -[[9337]], -[[9338]], -[[9339]], -[[9340]], -[[9341]], -[[9342]], -[[9343]], -[[9344]], -[[9345]], -[[9346]], -[[9347]], -[[9348]], -[[9349]], -[[9350]], -[[9351]], -[[9352]], -[[9353]], -[[9354]], -[[9355]], -[[9356]], -[[9357]], -[[9358]], -[[9359]], -[[9360]], -[[9361]], -[[9362]], -[[9363]], -[[9364]], -[[9365]], -[[9366]], -[[9367]], -[[9368]], -[[9369]], -[[9370]], -[[9371]], -[[9372]], -[[9373]], -[[9374]], -[[9375]], -[[9376]], -[[9377]], -[[9378]], -[[9379]], -[[9380]], -[[9381]], -[[9382]], -[[9383]], -[[9384]], -[[9385]], -[[9386]], -[[9387]], -[[9388]], -[[9389]], -[[9390]], -[[9391]], -[[9392]], -[[9393]], -[[9394]], -[[9395]], -[[9396]], -[[9397]], -[[9398]], -[[9399]], -[[9400]], -[[9401]], -[[9402]], -[[9403]], -[[9404]], -[[9405]], -[[9406]], -[[9407]], -[[9408]], -[[9409]], -[[9410]], -[[9411]], -[[9412]], -[[9413]], -[[9414]], -[[9415]], -[[9416]], -[[9417]], -[[9418]], -[[9419]], -[[9420]], -[[9421]], -[[9422]], -[[9423]], -[[9424]], -[[9425]], -[[9426]], -[[9427]], -[[9428]], -[[9429]], -[[9430]], -[[9431]], -[[9432]], -[[9433]], -[[9434]], -[[9435]], -[[9436]], -[[9437]], -[[9438]], -[[9439]], -[[9440]], -[[9441]], -[[9442]], -[[9443]], -[[9444]], -[[9445]], -[[9446]], -[[9447]], -[[9448]], -[[9449]], -[[9450]], -[[9451]], -[[9452]], -[[9453]], -[[9454]], -[[9455]], -[[9456]], -[[9457]], -[[9458]], -[[9459]], -[[9460]], -[[9461]], -[[9462]], -[[9463]], -[[9464]], -[[9465]], -[[9466]], -[[9467]], -[[9468]], -[[9469]], -[[9470]], -[[9471]], -[[9472]], -[[9473]], -[[9474]], -[[9475]], -[[9476]], -[[9477]], -[[9478]], -[[9479]], -[[9480]], -[[9481]], -[[9482]], -[[9483]], -[[9484]], -[[9485]], -[[9486]], -[[9487]], -[[9488]], -[[9489]], -[[9490]], -[[9491]], -[[9492]], -[[9493]], -[[9494]], -[[9495]], -[[9496]], -[[9497]], -[[9498]], -[[9499]], -[[9500]], -[[9501]], -[[9502]], -[[9503]], -[[9504]], -[[9505]], -[[9506]], -[[9507]], -[[9508]], -[[9509]], -[[9510]], -[[9511]], -[[9512]], -[[9513]], -[[9514]], -[[9515]], -[[9516]], -[[9517]], -[[9518]], -[[9519]], -[[9520]], -[[9521]], -[[9522]], -[[9523]], -[[9524]], -[[9525]], -[[9526]], -[[9527]], -[[9528]], -[[9529]], -[[9530]], -[[9531]], -[[9532]], -[[9533]], -[[9534]], -[[9535]], -[[9536]], -[[9537]], -[[9538]], -[[9539]], -[[9540]], -[[9541]], -[[9542]], -[[9543]], -[[9544]], -[[9545]], -[[9546]], -[[9547]], -[[9548]], -[[9549]], -[[9550]], -[[9551]], -[[9552]], -[[9553]], -[[9554]], -[[9555]], -[[9556]], -[[9557]], -[[9558]], -[[9559]], -[[9560]], -[[9561]], -[[9562]], -[[9563]], -[[9564]], -[[9565]], -[[9566]], -[[9567]], -[[9568]], -[[9569]], -[[9570]], -[[9571]], -[[9572]], -[[9573]], -[[9574]], -[[9575]], -[[9576]], -[[9577]], -[[9578]], -[[9579]], -[[9580]], -[[9581]], -[[9582]], -[[9583]], -[[9584]], -[[9585]], -[[9586]], -[[9587]], -[[9588]], -[[9589]], -[[9590]], -[[9591]], -[[9592]], -[[9593]], -[[9594]], -[[9595]], -[[9596]], -[[9597]], -[[9598]], -[[9599]], -[[9600]], -[[9601]], -[[9602]], -[[9603]], -[[9604]], -[[9605]], -[[9606]], -[[9607]], -[[9608]], -[[9609]], -[[9610]], -[[9611]], -[[9612]], -[[9613]], -[[9614]], -[[9615]], -[[9616]], -[[9617]], -[[9618]], -[[9619]], -[[9620]], -[[9621]], -[[9622]], -[[9623]], -[[9624]], -[[9625]], -[[9626]], -[[9627]], -[[9628]], -[[9629]], -[[9630]], -[[9631]], -[[9632]], -[[9633]], -[[9634]], -[[9635]], -[[9636]], -[[9637]], -[[9638]], -[[9639]], -[[9640]], -[[9641]], -[[9642]], -[[9643]], -[[9644]], -[[9645]], -[[9646]], -[[9647]], -[[9648]], -[[9649]], -[[9650]], -[[9651]], -[[9652]], -[[9653]], -[[9654]], -[[9655]], -[[9656]], -[[9657]], -[[9658]], -[[9659]], -[[9660]], -[[9661]], -[[9662]], -[[9663]], -[[9664]], -[[9665]], -[[9666]], -[[9667]], -[[9668]], -[[9669]], -[[9670]], -[[9671]], -[[9672]], -[[9673]], -[[9674]], -[[9675]], -[[9676]], -[[9677]], -[[9678]], -[[9679]], -[[9680]], -[[9681]], -[[9682]], -[[9683]], -[[9684]], -[[9685]], -[[9686]], -[[9687]], -[[9688]], -[[9689]], -[[9690]], -[[9691]], -[[9692]], -[[9693]], -[[9694]], -[[9695]], -[[9696]], -[[9697]], -[[9698]], -[[9699]], -[[9700]], -[[9701]], -[[9702]], -[[9703]], -[[9704]], -[[9705]], -[[9706]], -[[9707]], -[[9708]], -[[9709]], -[[9710]], -[[9711]], -[[9712]], -[[9713]], -[[9714]], -[[9715]], -[[9716]], -[[9717]], -[[9718]], -[[9719]], -[[9720]], -[[9721]], -[[9722]], -[[9723]], -[[9724]], -[[9725]], -[[9726]], -[[9727]], -[[9728]], -[[9729]], -[[9730]], -[[9731]], -[[9732]], -[[9733]], -[[9734]], -[[9735]], -[[9736]], -[[9737]], -[[9738]], -[[9739]], -[[9740]], -[[9741]], -[[9742]], -[[9743]], -[[9744]], -[[9745]], -[[9746]], -[[9747]], -[[9748]], -[[9749]], -[[9750]], -[[9751]], -[[9752]], -[[9753]], -[[9754]], -[[9755]], -[[9756]], -[[9757]], -[[9758]], -[[9759]], -[[9760]], -[[9761]], -[[9762]], -[[9763]], -[[9764]], -[[9765]], -[[9766]], -[[9767]], -[[9768]], -[[9769]], -[[9770]], -[[9771]], -[[9772]], -[[9773]], -[[9774]], -[[9775]], -[[9776]], -[[9777]], -[[9778]], -[[9779]], -[[9780]], -[[9781]], -[[9782]], -[[9783]], -[[9784]], -[[9785]], -[[9786]], -[[9787]], -[[9788]], -[[9789]], -[[9790]], -[[9791]], -[[9792]], -[[9793]], -[[9794]], -[[9795]], -[[9796]], -[[9797]], -[[9798]], -[[9799]], -[[9800]], -[[9801]], -[[9802]], -[[9803]], -[[9804]], -[[9805]], -[[9806]], -[[9807]], -[[9808]], -[[9809]], -[[9810]], -[[9811]], -[[9812]], -[[9813]], -[[9814]], -[[9815]], -[[9816]], -[[9817]], -[[9818]], -[[9819]], -[[9820]], -[[9821]], -[[9822]], -[[9823]], -[[9824]], -[[9825]], -[[9826]], -[[9827]], -[[9828]], -[[9829]], -[[9830]], -[[9831]], -[[9832]], -[[9833]], -[[9834]], -[[9835]], -[[9836]], -[[9837]], -[[9838]], -[[9839]], -[[9840]], -[[9841]], -[[9842]], -[[9843]], -[[9844]], -[[9845]], -[[9846]], -[[9847]], -[[9848]], -[[9849]], -[[9850]], -[[9851]], -[[9852]], -[[9853]], -[[9854]], -[[9855]], -[[9856]], -[[9857]], -[[9858]], -[[9859]], -[[9860]], -[[9861]], -[[9862]], -[[9863]], -[[9864]], -[[9865]], -[[9866]], -[[9867]], -[[9868]], -[[9869]], -[[9870]], -[[9871]], -[[9872]], -[[9873]], -[[9874]], -[[9875]], -[[9876]], -[[9877]], -[[9878]], -[[9879]], -[[9880]], -[[9881]], -[[9882]], -[[9883]], -[[9884]], -[[9885]], -[[9886]], -[[9887]], -[[9888]], -[[9889]], -[[9890]], -[[9891]], -[[9892]], -[[9893]], -[[9894]], -[[9895]], -[[9896]], -[[9897]], -[[9898]], -[[9899]], -[[9900]], -[[9901]], -[[9902]], -[[9903]], -[[9904]], -[[9905]], -[[9906]], -[[9907]], -[[9908]], -[[9909]], -[[9910]], -[[9911]], -[[9912]], -[[9913]], -[[9914]], -[[9915]], -[[9916]], -[[9917]], -[[9918]], -[[9919]], -[[9920]], -[[9921]], -[[9922]], -[[9923]], -[[9924]], -[[9925]], -[[9926]], -[[9927]], -[[9928]], -[[9929]], -[[9930]], -[[9931]], -[[9932]], -[[9933]], -[[9934]], -[[9935]], -[[9936]], -[[9937]], -[[9938]], -[[9939]], -[[9940]], -[[9941]], -[[9942]], -[[9943]], -[[9944]], -[[9945]], -[[9946]], -[[9947]], -[[9948]], -[[9949]], -[[9950]], -[[9951]], -[[9952]], -[[9953]], -[[9954]], -[[9955]], -[[9956]], -[[9957]], -[[9958]], -[[9959]], -[[9960]], -[[9961]], -[[9962]], -[[9963]], -[[9964]], -[[9965]], -[[9966]], -[[9967]], -[[9968]], -[[9969]], -[[9970]], -[[9971]], -[[9972]], -[[9973]], -[[9974]], -[[9975]], -[[9976]], -[[9977]], -[[9978]], -[[9979]], -[[9980]], -[[9981]], -[[9982]], -[[9983]], -[[9984]], -[[9985]], -[[9986]], -[[9987]], -[[9988]], -[[9989]], -[[9990]], -[[9991]], -[[9992]], -[[9993]], -[[9994]], -[[9995]], -[[9996]], -[[9997]], -[[9998]], -[[9999]], -]; - -// 10,000 elements. -const list2 = [ -[[0]], -[[1]], -[[2]], -[[3]], -[[4]], -[[5]], -[[6]], -[[7]], -[[8]], -[[9]], -[[10]], -[[11]], -[[12]], -[[13]], -[[14]], -[[15]], -[[16]], -[[17]], -[[18]], -[[19]], -[[20]], -[[21]], -[[22]], -[[23]], -[[24]], -[[25]], -[[26]], -[[27]], -[[28]], -[[29]], -[[30]], -[[31]], -[[32]], -[[33]], -[[34]], -[[35]], -[[36]], -[[37]], -[[38]], -[[39]], -[[40]], -[[41]], -[[42]], -[[43]], -[[44]], -[[45]], -[[46]], -[[47]], -[[48]], -[[49]], -[[50]], -[[51]], -[[52]], -[[53]], -[[54]], -[[55]], -[[56]], -[[57]], -[[58]], -[[59]], -[[60]], -[[61]], -[[62]], -[[63]], -[[64]], -[[65]], -[[66]], -[[67]], -[[68]], -[[69]], -[[70]], -[[71]], -[[72]], -[[73]], -[[74]], -[[75]], -[[76]], -[[77]], -[[78]], -[[79]], -[[80]], -[[81]], -[[82]], -[[83]], -[[84]], -[[85]], -[[86]], -[[87]], -[[88]], -[[89]], -[[90]], -[[91]], -[[92]], -[[93]], -[[94]], -[[95]], -[[96]], -[[97]], -[[98]], -[[99]], -[[100]], -[[101]], -[[102]], -[[103]], -[[104]], -[[105]], -[[106]], -[[107]], -[[108]], -[[109]], -[[110]], -[[111]], -[[112]], -[[113]], -[[114]], -[[115]], -[[116]], -[[117]], -[[118]], -[[119]], -[[120]], -[[121]], -[[122]], -[[123]], -[[124]], -[[125]], -[[126]], -[[127]], -[[128]], -[[129]], -[[130]], -[[131]], -[[132]], -[[133]], -[[134]], -[[135]], -[[136]], -[[137]], -[[138]], -[[139]], -[[140]], -[[141]], -[[142]], -[[143]], -[[144]], -[[145]], -[[146]], -[[147]], -[[148]], -[[149]], -[[150]], -[[151]], -[[152]], -[[153]], -[[154]], -[[155]], -[[156]], -[[157]], -[[158]], -[[159]], -[[160]], -[[161]], -[[162]], -[[163]], -[[164]], -[[165]], -[[166]], -[[167]], -[[168]], -[[169]], -[[170]], -[[171]], -[[172]], -[[173]], -[[174]], -[[175]], -[[176]], -[[177]], -[[178]], -[[179]], -[[180]], -[[181]], -[[182]], -[[183]], -[[184]], -[[185]], -[[186]], -[[187]], -[[188]], -[[189]], -[[190]], -[[191]], -[[192]], -[[193]], -[[194]], -[[195]], -[[196]], -[[197]], -[[198]], -[[199]], -[[200]], -[[201]], -[[202]], -[[203]], -[[204]], -[[205]], -[[206]], -[[207]], -[[208]], -[[209]], -[[210]], -[[211]], -[[212]], -[[213]], -[[214]], -[[215]], -[[216]], -[[217]], -[[218]], -[[219]], -[[220]], -[[221]], -[[222]], -[[223]], -[[224]], -[[225]], -[[226]], -[[227]], -[[228]], -[[229]], -[[230]], -[[231]], -[[232]], -[[233]], -[[234]], -[[235]], -[[236]], -[[237]], -[[238]], -[[239]], -[[240]], -[[241]], -[[242]], -[[243]], -[[244]], -[[245]], -[[246]], -[[247]], -[[248]], -[[249]], -[[250]], -[[251]], -[[252]], -[[253]], -[[254]], -[[255]], -[[256]], -[[257]], -[[258]], -[[259]], -[[260]], -[[261]], -[[262]], -[[263]], -[[264]], -[[265]], -[[266]], -[[267]], -[[268]], -[[269]], -[[270]], -[[271]], -[[272]], -[[273]], -[[274]], -[[275]], -[[276]], -[[277]], -[[278]], -[[279]], -[[280]], -[[281]], -[[282]], -[[283]], -[[284]], -[[285]], -[[286]], -[[287]], -[[288]], -[[289]], -[[290]], -[[291]], -[[292]], -[[293]], -[[294]], -[[295]], -[[296]], -[[297]], -[[298]], -[[299]], -[[300]], -[[301]], -[[302]], -[[303]], -[[304]], -[[305]], -[[306]], -[[307]], -[[308]], -[[309]], -[[310]], -[[311]], -[[312]], -[[313]], -[[314]], -[[315]], -[[316]], -[[317]], -[[318]], -[[319]], -[[320]], -[[321]], -[[322]], -[[323]], -[[324]], -[[325]], -[[326]], -[[327]], -[[328]], -[[329]], -[[330]], -[[331]], -[[332]], -[[333]], -[[334]], -[[335]], -[[336]], -[[337]], -[[338]], -[[339]], -[[340]], -[[341]], -[[342]], -[[343]], -[[344]], -[[345]], -[[346]], -[[347]], -[[348]], -[[349]], -[[350]], -[[351]], -[[352]], -[[353]], -[[354]], -[[355]], -[[356]], -[[357]], -[[358]], -[[359]], -[[360]], -[[361]], -[[362]], -[[363]], -[[364]], -[[365]], -[[366]], -[[367]], -[[368]], -[[369]], -[[370]], -[[371]], -[[372]], -[[373]], -[[374]], -[[375]], -[[376]], -[[377]], -[[378]], -[[379]], -[[380]], -[[381]], -[[382]], -[[383]], -[[384]], -[[385]], -[[386]], -[[387]], -[[388]], -[[389]], -[[390]], -[[391]], -[[392]], -[[393]], -[[394]], -[[395]], -[[396]], -[[397]], -[[398]], -[[399]], -[[400]], -[[401]], -[[402]], -[[403]], -[[404]], -[[405]], -[[406]], -[[407]], -[[408]], -[[409]], -[[410]], -[[411]], -[[412]], -[[413]], -[[414]], -[[415]], -[[416]], -[[417]], -[[418]], -[[419]], -[[420]], -[[421]], -[[422]], -[[423]], -[[424]], -[[425]], -[[426]], -[[427]], -[[428]], -[[429]], -[[430]], -[[431]], -[[432]], -[[433]], -[[434]], -[[435]], -[[436]], -[[437]], -[[438]], -[[439]], -[[440]], -[[441]], -[[442]], -[[443]], -[[444]], -[[445]], -[[446]], -[[447]], -[[448]], -[[449]], -[[450]], -[[451]], -[[452]], -[[453]], -[[454]], -[[455]], -[[456]], -[[457]], -[[458]], -[[459]], -[[460]], -[[461]], -[[462]], -[[463]], -[[464]], -[[465]], -[[466]], -[[467]], -[[468]], -[[469]], -[[470]], -[[471]], -[[472]], -[[473]], -[[474]], -[[475]], -[[476]], -[[477]], -[[478]], -[[479]], -[[480]], -[[481]], -[[482]], -[[483]], -[[484]], -[[485]], -[[486]], -[[487]], -[[488]], -[[489]], -[[490]], -[[491]], -[[492]], -[[493]], -[[494]], -[[495]], -[[496]], -[[497]], -[[498]], -[[499]], -[[500]], -[[501]], -[[502]], -[[503]], -[[504]], -[[505]], -[[506]], -[[507]], -[[508]], -[[509]], -[[510]], -[[511]], -[[512]], -[[513]], -[[514]], -[[515]], -[[516]], -[[517]], -[[518]], -[[519]], -[[520]], -[[521]], -[[522]], -[[523]], -[[524]], -[[525]], -[[526]], -[[527]], -[[528]], -[[529]], -[[530]], -[[531]], -[[532]], -[[533]], -[[534]], -[[535]], -[[536]], -[[537]], -[[538]], -[[539]], -[[540]], -[[541]], -[[542]], -[[543]], -[[544]], -[[545]], -[[546]], -[[547]], -[[548]], -[[549]], -[[550]], -[[551]], -[[552]], -[[553]], -[[554]], -[[555]], -[[556]], -[[557]], -[[558]], -[[559]], -[[560]], -[[561]], -[[562]], -[[563]], -[[564]], -[[565]], -[[566]], -[[567]], -[[568]], -[[569]], -[[570]], -[[571]], -[[572]], -[[573]], -[[574]], -[[575]], -[[576]], -[[577]], -[[578]], -[[579]], -[[580]], -[[581]], -[[582]], -[[583]], -[[584]], -[[585]], -[[586]], -[[587]], -[[588]], -[[589]], -[[590]], -[[591]], -[[592]], -[[593]], -[[594]], -[[595]], -[[596]], -[[597]], -[[598]], -[[599]], -[[600]], -[[601]], -[[602]], -[[603]], -[[604]], -[[605]], -[[606]], -[[607]], -[[608]], -[[609]], -[[610]], -[[611]], -[[612]], -[[613]], -[[614]], -[[615]], -[[616]], -[[617]], -[[618]], -[[619]], -[[620]], -[[621]], -[[622]], -[[623]], -[[624]], -[[625]], -[[626]], -[[627]], -[[628]], -[[629]], -[[630]], -[[631]], -[[632]], -[[633]], -[[634]], -[[635]], -[[636]], -[[637]], -[[638]], -[[639]], -[[640]], -[[641]], -[[642]], -[[643]], -[[644]], -[[645]], -[[646]], -[[647]], -[[648]], -[[649]], -[[650]], -[[651]], -[[652]], -[[653]], -[[654]], -[[655]], -[[656]], -[[657]], -[[658]], -[[659]], -[[660]], -[[661]], -[[662]], -[[663]], -[[664]], -[[665]], -[[666]], -[[667]], -[[668]], -[[669]], -[[670]], -[[671]], -[[672]], -[[673]], -[[674]], -[[675]], -[[676]], -[[677]], -[[678]], -[[679]], -[[680]], -[[681]], -[[682]], -[[683]], -[[684]], -[[685]], -[[686]], -[[687]], -[[688]], -[[689]], -[[690]], -[[691]], -[[692]], -[[693]], -[[694]], -[[695]], -[[696]], -[[697]], -[[698]], -[[699]], -[[700]], -[[701]], -[[702]], -[[703]], -[[704]], -[[705]], -[[706]], -[[707]], -[[708]], -[[709]], -[[710]], -[[711]], -[[712]], -[[713]], -[[714]], -[[715]], -[[716]], -[[717]], -[[718]], -[[719]], -[[720]], -[[721]], -[[722]], -[[723]], -[[724]], -[[725]], -[[726]], -[[727]], -[[728]], -[[729]], -[[730]], -[[731]], -[[732]], -[[733]], -[[734]], -[[735]], -[[736]], -[[737]], -[[738]], -[[739]], -[[740]], -[[741]], -[[742]], -[[743]], -[[744]], -[[745]], -[[746]], -[[747]], -[[748]], -[[749]], -[[750]], -[[751]], -[[752]], -[[753]], -[[754]], -[[755]], -[[756]], -[[757]], -[[758]], -[[759]], -[[760]], -[[761]], -[[762]], -[[763]], -[[764]], -[[765]], -[[766]], -[[767]], -[[768]], -[[769]], -[[770]], -[[771]], -[[772]], -[[773]], -[[774]], -[[775]], -[[776]], -[[777]], -[[778]], -[[779]], -[[780]], -[[781]], -[[782]], -[[783]], -[[784]], -[[785]], -[[786]], -[[787]], -[[788]], -[[789]], -[[790]], -[[791]], -[[792]], -[[793]], -[[794]], -[[795]], -[[796]], -[[797]], -[[798]], -[[799]], -[[800]], -[[801]], -[[802]], -[[803]], -[[804]], -[[805]], -[[806]], -[[807]], -[[808]], -[[809]], -[[810]], -[[811]], -[[812]], -[[813]], -[[814]], -[[815]], -[[816]], -[[817]], -[[818]], -[[819]], -[[820]], -[[821]], -[[822]], -[[823]], -[[824]], -[[825]], -[[826]], -[[827]], -[[828]], -[[829]], -[[830]], -[[831]], -[[832]], -[[833]], -[[834]], -[[835]], -[[836]], -[[837]], -[[838]], -[[839]], -[[840]], -[[841]], -[[842]], -[[843]], -[[844]], -[[845]], -[[846]], -[[847]], -[[848]], -[[849]], -[[850]], -[[851]], -[[852]], -[[853]], -[[854]], -[[855]], -[[856]], -[[857]], -[[858]], -[[859]], -[[860]], -[[861]], -[[862]], -[[863]], -[[864]], -[[865]], -[[866]], -[[867]], -[[868]], -[[869]], -[[870]], -[[871]], -[[872]], -[[873]], -[[874]], -[[875]], -[[876]], -[[877]], -[[878]], -[[879]], -[[880]], -[[881]], -[[882]], -[[883]], -[[884]], -[[885]], -[[886]], -[[887]], -[[888]], -[[889]], -[[890]], -[[891]], -[[892]], -[[893]], -[[894]], -[[895]], -[[896]], -[[897]], -[[898]], -[[899]], -[[900]], -[[901]], -[[902]], -[[903]], -[[904]], -[[905]], -[[906]], -[[907]], -[[908]], -[[909]], -[[910]], -[[911]], -[[912]], -[[913]], -[[914]], -[[915]], -[[916]], -[[917]], -[[918]], -[[919]], -[[920]], -[[921]], -[[922]], -[[923]], -[[924]], -[[925]], -[[926]], -[[927]], -[[928]], -[[929]], -[[930]], -[[931]], -[[932]], -[[933]], -[[934]], -[[935]], -[[936]], -[[937]], -[[938]], -[[939]], -[[940]], -[[941]], -[[942]], -[[943]], -[[944]], -[[945]], -[[946]], -[[947]], -[[948]], -[[949]], -[[950]], -[[951]], -[[952]], -[[953]], -[[954]], -[[955]], -[[956]], -[[957]], -[[958]], -[[959]], -[[960]], -[[961]], -[[962]], -[[963]], -[[964]], -[[965]], -[[966]], -[[967]], -[[968]], -[[969]], -[[970]], -[[971]], -[[972]], -[[973]], -[[974]], -[[975]], -[[976]], -[[977]], -[[978]], -[[979]], -[[980]], -[[981]], -[[982]], -[[983]], -[[984]], -[[985]], -[[986]], -[[987]], -[[988]], -[[989]], -[[990]], -[[991]], -[[992]], -[[993]], -[[994]], -[[995]], -[[996]], -[[997]], -[[998]], -[[999]], -[[1000]], -[[1001]], -[[1002]], -[[1003]], -[[1004]], -[[1005]], -[[1006]], -[[1007]], -[[1008]], -[[1009]], -[[1010]], -[[1011]], -[[1012]], -[[1013]], -[[1014]], -[[1015]], -[[1016]], -[[1017]], -[[1018]], -[[1019]], -[[1020]], -[[1021]], -[[1022]], -[[1023]], -[[1024]], -[[1025]], -[[1026]], -[[1027]], -[[1028]], -[[1029]], -[[1030]], -[[1031]], -[[1032]], -[[1033]], -[[1034]], -[[1035]], -[[1036]], -[[1037]], -[[1038]], -[[1039]], -[[1040]], -[[1041]], -[[1042]], -[[1043]], -[[1044]], -[[1045]], -[[1046]], -[[1047]], -[[1048]], -[[1049]], -[[1050]], -[[1051]], -[[1052]], -[[1053]], -[[1054]], -[[1055]], -[[1056]], -[[1057]], -[[1058]], -[[1059]], -[[1060]], -[[1061]], -[[1062]], -[[1063]], -[[1064]], -[[1065]], -[[1066]], -[[1067]], -[[1068]], -[[1069]], -[[1070]], -[[1071]], -[[1072]], -[[1073]], -[[1074]], -[[1075]], -[[1076]], -[[1077]], -[[1078]], -[[1079]], -[[1080]], -[[1081]], -[[1082]], -[[1083]], -[[1084]], -[[1085]], -[[1086]], -[[1087]], -[[1088]], -[[1089]], -[[1090]], -[[1091]], -[[1092]], -[[1093]], -[[1094]], -[[1095]], -[[1096]], -[[1097]], -[[1098]], -[[1099]], -[[1100]], -[[1101]], -[[1102]], -[[1103]], -[[1104]], -[[1105]], -[[1106]], -[[1107]], -[[1108]], -[[1109]], -[[1110]], -[[1111]], -[[1112]], -[[1113]], -[[1114]], -[[1115]], -[[1116]], -[[1117]], -[[1118]], -[[1119]], -[[1120]], -[[1121]], -[[1122]], -[[1123]], -[[1124]], -[[1125]], -[[1126]], -[[1127]], -[[1128]], -[[1129]], -[[1130]], -[[1131]], -[[1132]], -[[1133]], -[[1134]], -[[1135]], -[[1136]], -[[1137]], -[[1138]], -[[1139]], -[[1140]], -[[1141]], -[[1142]], -[[1143]], -[[1144]], -[[1145]], -[[1146]], -[[1147]], -[[1148]], -[[1149]], -[[1150]], -[[1151]], -[[1152]], -[[1153]], -[[1154]], -[[1155]], -[[1156]], -[[1157]], -[[1158]], -[[1159]], -[[1160]], -[[1161]], -[[1162]], -[[1163]], -[[1164]], -[[1165]], -[[1166]], -[[1167]], -[[1168]], -[[1169]], -[[1170]], -[[1171]], -[[1172]], -[[1173]], -[[1174]], -[[1175]], -[[1176]], -[[1177]], -[[1178]], -[[1179]], -[[1180]], -[[1181]], -[[1182]], -[[1183]], -[[1184]], -[[1185]], -[[1186]], -[[1187]], -[[1188]], -[[1189]], -[[1190]], -[[1191]], -[[1192]], -[[1193]], -[[1194]], -[[1195]], -[[1196]], -[[1197]], -[[1198]], -[[1199]], -[[1200]], -[[1201]], -[[1202]], -[[1203]], -[[1204]], -[[1205]], -[[1206]], -[[1207]], -[[1208]], -[[1209]], -[[1210]], -[[1211]], -[[1212]], -[[1213]], -[[1214]], -[[1215]], -[[1216]], -[[1217]], -[[1218]], -[[1219]], -[[1220]], -[[1221]], -[[1222]], -[[1223]], -[[1224]], -[[1225]], -[[1226]], -[[1227]], -[[1228]], -[[1229]], -[[1230]], -[[1231]], -[[1232]], -[[1233]], -[[1234]], -[[1235]], -[[1236]], -[[1237]], -[[1238]], -[[1239]], -[[1240]], -[[1241]], -[[1242]], -[[1243]], -[[1244]], -[[1245]], -[[1246]], -[[1247]], -[[1248]], -[[1249]], -[[1250]], -[[1251]], -[[1252]], -[[1253]], -[[1254]], -[[1255]], -[[1256]], -[[1257]], -[[1258]], -[[1259]], -[[1260]], -[[1261]], -[[1262]], -[[1263]], -[[1264]], -[[1265]], -[[1266]], -[[1267]], -[[1268]], -[[1269]], -[[1270]], -[[1271]], -[[1272]], -[[1273]], -[[1274]], -[[1275]], -[[1276]], -[[1277]], -[[1278]], -[[1279]], -[[1280]], -[[1281]], -[[1282]], -[[1283]], -[[1284]], -[[1285]], -[[1286]], -[[1287]], -[[1288]], -[[1289]], -[[1290]], -[[1291]], -[[1292]], -[[1293]], -[[1294]], -[[1295]], -[[1296]], -[[1297]], -[[1298]], -[[1299]], -[[1300]], -[[1301]], -[[1302]], -[[1303]], -[[1304]], -[[1305]], -[[1306]], -[[1307]], -[[1308]], -[[1309]], -[[1310]], -[[1311]], -[[1312]], -[[1313]], -[[1314]], -[[1315]], -[[1316]], -[[1317]], -[[1318]], -[[1319]], -[[1320]], -[[1321]], -[[1322]], -[[1323]], -[[1324]], -[[1325]], -[[1326]], -[[1327]], -[[1328]], -[[1329]], -[[1330]], -[[1331]], -[[1332]], -[[1333]], -[[1334]], -[[1335]], -[[1336]], -[[1337]], -[[1338]], -[[1339]], -[[1340]], -[[1341]], -[[1342]], -[[1343]], -[[1344]], -[[1345]], -[[1346]], -[[1347]], -[[1348]], -[[1349]], -[[1350]], -[[1351]], -[[1352]], -[[1353]], -[[1354]], -[[1355]], -[[1356]], -[[1357]], -[[1358]], -[[1359]], -[[1360]], -[[1361]], -[[1362]], -[[1363]], -[[1364]], -[[1365]], -[[1366]], -[[1367]], -[[1368]], -[[1369]], -[[1370]], -[[1371]], -[[1372]], -[[1373]], -[[1374]], -[[1375]], -[[1376]], -[[1377]], -[[1378]], -[[1379]], -[[1380]], -[[1381]], -[[1382]], -[[1383]], -[[1384]], -[[1385]], -[[1386]], -[[1387]], -[[1388]], -[[1389]], -[[1390]], -[[1391]], -[[1392]], -[[1393]], -[[1394]], -[[1395]], -[[1396]], -[[1397]], -[[1398]], -[[1399]], -[[1400]], -[[1401]], -[[1402]], -[[1403]], -[[1404]], -[[1405]], -[[1406]], -[[1407]], -[[1408]], -[[1409]], -[[1410]], -[[1411]], -[[1412]], -[[1413]], -[[1414]], -[[1415]], -[[1416]], -[[1417]], -[[1418]], -[[1419]], -[[1420]], -[[1421]], -[[1422]], -[[1423]], -[[1424]], -[[1425]], -[[1426]], -[[1427]], -[[1428]], -[[1429]], -[[1430]], -[[1431]], -[[1432]], -[[1433]], -[[1434]], -[[1435]], -[[1436]], -[[1437]], -[[1438]], -[[1439]], -[[1440]], -[[1441]], -[[1442]], -[[1443]], -[[1444]], -[[1445]], -[[1446]], -[[1447]], -[[1448]], -[[1449]], -[[1450]], -[[1451]], -[[1452]], -[[1453]], -[[1454]], -[[1455]], -[[1456]], -[[1457]], -[[1458]], -[[1459]], -[[1460]], -[[1461]], -[[1462]], -[[1463]], -[[1464]], -[[1465]], -[[1466]], -[[1467]], -[[1468]], -[[1469]], -[[1470]], -[[1471]], -[[1472]], -[[1473]], -[[1474]], -[[1475]], -[[1476]], -[[1477]], -[[1478]], -[[1479]], -[[1480]], -[[1481]], -[[1482]], -[[1483]], -[[1484]], -[[1485]], -[[1486]], -[[1487]], -[[1488]], -[[1489]], -[[1490]], -[[1491]], -[[1492]], -[[1493]], -[[1494]], -[[1495]], -[[1496]], -[[1497]], -[[1498]], -[[1499]], -[[1500]], -[[1501]], -[[1502]], -[[1503]], -[[1504]], -[[1505]], -[[1506]], -[[1507]], -[[1508]], -[[1509]], -[[1510]], -[[1511]], -[[1512]], -[[1513]], -[[1514]], -[[1515]], -[[1516]], -[[1517]], -[[1518]], -[[1519]], -[[1520]], -[[1521]], -[[1522]], -[[1523]], -[[1524]], -[[1525]], -[[1526]], -[[1527]], -[[1528]], -[[1529]], -[[1530]], -[[1531]], -[[1532]], -[[1533]], -[[1534]], -[[1535]], -[[1536]], -[[1537]], -[[1538]], -[[1539]], -[[1540]], -[[1541]], -[[1542]], -[[1543]], -[[1544]], -[[1545]], -[[1546]], -[[1547]], -[[1548]], -[[1549]], -[[1550]], -[[1551]], -[[1552]], -[[1553]], -[[1554]], -[[1555]], -[[1556]], -[[1557]], -[[1558]], -[[1559]], -[[1560]], -[[1561]], -[[1562]], -[[1563]], -[[1564]], -[[1565]], -[[1566]], -[[1567]], -[[1568]], -[[1569]], -[[1570]], -[[1571]], -[[1572]], -[[1573]], -[[1574]], -[[1575]], -[[1576]], -[[1577]], -[[1578]], -[[1579]], -[[1580]], -[[1581]], -[[1582]], -[[1583]], -[[1584]], -[[1585]], -[[1586]], -[[1587]], -[[1588]], -[[1589]], -[[1590]], -[[1591]], -[[1592]], -[[1593]], -[[1594]], -[[1595]], -[[1596]], -[[1597]], -[[1598]], -[[1599]], -[[1600]], -[[1601]], -[[1602]], -[[1603]], -[[1604]], -[[1605]], -[[1606]], -[[1607]], -[[1608]], -[[1609]], -[[1610]], -[[1611]], -[[1612]], -[[1613]], -[[1614]], -[[1615]], -[[1616]], -[[1617]], -[[1618]], -[[1619]], -[[1620]], -[[1621]], -[[1622]], -[[1623]], -[[1624]], -[[1625]], -[[1626]], -[[1627]], -[[1628]], -[[1629]], -[[1630]], -[[1631]], -[[1632]], -[[1633]], -[[1634]], -[[1635]], -[[1636]], -[[1637]], -[[1638]], -[[1639]], -[[1640]], -[[1641]], -[[1642]], -[[1643]], -[[1644]], -[[1645]], -[[1646]], -[[1647]], -[[1648]], -[[1649]], -[[1650]], -[[1651]], -[[1652]], -[[1653]], -[[1654]], -[[1655]], -[[1656]], -[[1657]], -[[1658]], -[[1659]], -[[1660]], -[[1661]], -[[1662]], -[[1663]], -[[1664]], -[[1665]], -[[1666]], -[[1667]], -[[1668]], -[[1669]], -[[1670]], -[[1671]], -[[1672]], -[[1673]], -[[1674]], -[[1675]], -[[1676]], -[[1677]], -[[1678]], -[[1679]], -[[1680]], -[[1681]], -[[1682]], -[[1683]], -[[1684]], -[[1685]], -[[1686]], -[[1687]], -[[1688]], -[[1689]], -[[1690]], -[[1691]], -[[1692]], -[[1693]], -[[1694]], -[[1695]], -[[1696]], -[[1697]], -[[1698]], -[[1699]], -[[1700]], -[[1701]], -[[1702]], -[[1703]], -[[1704]], -[[1705]], -[[1706]], -[[1707]], -[[1708]], -[[1709]], -[[1710]], -[[1711]], -[[1712]], -[[1713]], -[[1714]], -[[1715]], -[[1716]], -[[1717]], -[[1718]], -[[1719]], -[[1720]], -[[1721]], -[[1722]], -[[1723]], -[[1724]], -[[1725]], -[[1726]], -[[1727]], -[[1728]], -[[1729]], -[[1730]], -[[1731]], -[[1732]], -[[1733]], -[[1734]], -[[1735]], -[[1736]], -[[1737]], -[[1738]], -[[1739]], -[[1740]], -[[1741]], -[[1742]], -[[1743]], -[[1744]], -[[1745]], -[[1746]], -[[1747]], -[[1748]], -[[1749]], -[[1750]], -[[1751]], -[[1752]], -[[1753]], -[[1754]], -[[1755]], -[[1756]], -[[1757]], -[[1758]], -[[1759]], -[[1760]], -[[1761]], -[[1762]], -[[1763]], -[[1764]], -[[1765]], -[[1766]], -[[1767]], -[[1768]], -[[1769]], -[[1770]], -[[1771]], -[[1772]], -[[1773]], -[[1774]], -[[1775]], -[[1776]], -[[1777]], -[[1778]], -[[1779]], -[[1780]], -[[1781]], -[[1782]], -[[1783]], -[[1784]], -[[1785]], -[[1786]], -[[1787]], -[[1788]], -[[1789]], -[[1790]], -[[1791]], -[[1792]], -[[1793]], -[[1794]], -[[1795]], -[[1796]], -[[1797]], -[[1798]], -[[1799]], -[[1800]], -[[1801]], -[[1802]], -[[1803]], -[[1804]], -[[1805]], -[[1806]], -[[1807]], -[[1808]], -[[1809]], -[[1810]], -[[1811]], -[[1812]], -[[1813]], -[[1814]], -[[1815]], -[[1816]], -[[1817]], -[[1818]], -[[1819]], -[[1820]], -[[1821]], -[[1822]], -[[1823]], -[[1824]], -[[1825]], -[[1826]], -[[1827]], -[[1828]], -[[1829]], -[[1830]], -[[1831]], -[[1832]], -[[1833]], -[[1834]], -[[1835]], -[[1836]], -[[1837]], -[[1838]], -[[1839]], -[[1840]], -[[1841]], -[[1842]], -[[1843]], -[[1844]], -[[1845]], -[[1846]], -[[1847]], -[[1848]], -[[1849]], -[[1850]], -[[1851]], -[[1852]], -[[1853]], -[[1854]], -[[1855]], -[[1856]], -[[1857]], -[[1858]], -[[1859]], -[[1860]], -[[1861]], -[[1862]], -[[1863]], -[[1864]], -[[1865]], -[[1866]], -[[1867]], -[[1868]], -[[1869]], -[[1870]], -[[1871]], -[[1872]], -[[1873]], -[[1874]], -[[1875]], -[[1876]], -[[1877]], -[[1878]], -[[1879]], -[[1880]], -[[1881]], -[[1882]], -[[1883]], -[[1884]], -[[1885]], -[[1886]], -[[1887]], -[[1888]], -[[1889]], -[[1890]], -[[1891]], -[[1892]], -[[1893]], -[[1894]], -[[1895]], -[[1896]], -[[1897]], -[[1898]], -[[1899]], -[[1900]], -[[1901]], -[[1902]], -[[1903]], -[[1904]], -[[1905]], -[[1906]], -[[1907]], -[[1908]], -[[1909]], -[[1910]], -[[1911]], -[[1912]], -[[1913]], -[[1914]], -[[1915]], -[[1916]], -[[1917]], -[[1918]], -[[1919]], -[[1920]], -[[1921]], -[[1922]], -[[1923]], -[[1924]], -[[1925]], -[[1926]], -[[1927]], -[[1928]], -[[1929]], -[[1930]], -[[1931]], -[[1932]], -[[1933]], -[[1934]], -[[1935]], -[[1936]], -[[1937]], -[[1938]], -[[1939]], -[[1940]], -[[1941]], -[[1942]], -[[1943]], -[[1944]], -[[1945]], -[[1946]], -[[1947]], -[[1948]], -[[1949]], -[[1950]], -[[1951]], -[[1952]], -[[1953]], -[[1954]], -[[1955]], -[[1956]], -[[1957]], -[[1958]], -[[1959]], -[[1960]], -[[1961]], -[[1962]], -[[1963]], -[[1964]], -[[1965]], -[[1966]], -[[1967]], -[[1968]], -[[1969]], -[[1970]], -[[1971]], -[[1972]], -[[1973]], -[[1974]], -[[1975]], -[[1976]], -[[1977]], -[[1978]], -[[1979]], -[[1980]], -[[1981]], -[[1982]], -[[1983]], -[[1984]], -[[1985]], -[[1986]], -[[1987]], -[[1988]], -[[1989]], -[[1990]], -[[1991]], -[[1992]], -[[1993]], -[[1994]], -[[1995]], -[[1996]], -[[1997]], -[[1998]], -[[1999]], -[[2000]], -[[2001]], -[[2002]], -[[2003]], -[[2004]], -[[2005]], -[[2006]], -[[2007]], -[[2008]], -[[2009]], -[[2010]], -[[2011]], -[[2012]], -[[2013]], -[[2014]], -[[2015]], -[[2016]], -[[2017]], -[[2018]], -[[2019]], -[[2020]], -[[2021]], -[[2022]], -[[2023]], -[[2024]], -[[2025]], -[[2026]], -[[2027]], -[[2028]], -[[2029]], -[[2030]], -[[2031]], -[[2032]], -[[2033]], -[[2034]], -[[2035]], -[[2036]], -[[2037]], -[[2038]], -[[2039]], -[[2040]], -[[2041]], -[[2042]], -[[2043]], -[[2044]], -[[2045]], -[[2046]], -[[2047]], -[[2048]], -[[2049]], -[[2050]], -[[2051]], -[[2052]], -[[2053]], -[[2054]], -[[2055]], -[[2056]], -[[2057]], -[[2058]], -[[2059]], -[[2060]], -[[2061]], -[[2062]], -[[2063]], -[[2064]], -[[2065]], -[[2066]], -[[2067]], -[[2068]], -[[2069]], -[[2070]], -[[2071]], -[[2072]], -[[2073]], -[[2074]], -[[2075]], -[[2076]], -[[2077]], -[[2078]], -[[2079]], -[[2080]], -[[2081]], -[[2082]], -[[2083]], -[[2084]], -[[2085]], -[[2086]], -[[2087]], -[[2088]], -[[2089]], -[[2090]], -[[2091]], -[[2092]], -[[2093]], -[[2094]], -[[2095]], -[[2096]], -[[2097]], -[[2098]], -[[2099]], -[[2100]], -[[2101]], -[[2102]], -[[2103]], -[[2104]], -[[2105]], -[[2106]], -[[2107]], -[[2108]], -[[2109]], -[[2110]], -[[2111]], -[[2112]], -[[2113]], -[[2114]], -[[2115]], -[[2116]], -[[2117]], -[[2118]], -[[2119]], -[[2120]], -[[2121]], -[[2122]], -[[2123]], -[[2124]], -[[2125]], -[[2126]], -[[2127]], -[[2128]], -[[2129]], -[[2130]], -[[2131]], -[[2132]], -[[2133]], -[[2134]], -[[2135]], -[[2136]], -[[2137]], -[[2138]], -[[2139]], -[[2140]], -[[2141]], -[[2142]], -[[2143]], -[[2144]], -[[2145]], -[[2146]], -[[2147]], -[[2148]], -[[2149]], -[[2150]], -[[2151]], -[[2152]], -[[2153]], -[[2154]], -[[2155]], -[[2156]], -[[2157]], -[[2158]], -[[2159]], -[[2160]], -[[2161]], -[[2162]], -[[2163]], -[[2164]], -[[2165]], -[[2166]], -[[2167]], -[[2168]], -[[2169]], -[[2170]], -[[2171]], -[[2172]], -[[2173]], -[[2174]], -[[2175]], -[[2176]], -[[2177]], -[[2178]], -[[2179]], -[[2180]], -[[2181]], -[[2182]], -[[2183]], -[[2184]], -[[2185]], -[[2186]], -[[2187]], -[[2188]], -[[2189]], -[[2190]], -[[2191]], -[[2192]], -[[2193]], -[[2194]], -[[2195]], -[[2196]], -[[2197]], -[[2198]], -[[2199]], -[[2200]], -[[2201]], -[[2202]], -[[2203]], -[[2204]], -[[2205]], -[[2206]], -[[2207]], -[[2208]], -[[2209]], -[[2210]], -[[2211]], -[[2212]], -[[2213]], -[[2214]], -[[2215]], -[[2216]], -[[2217]], -[[2218]], -[[2219]], -[[2220]], -[[2221]], -[[2222]], -[[2223]], -[[2224]], -[[2225]], -[[2226]], -[[2227]], -[[2228]], -[[2229]], -[[2230]], -[[2231]], -[[2232]], -[[2233]], -[[2234]], -[[2235]], -[[2236]], -[[2237]], -[[2238]], -[[2239]], -[[2240]], -[[2241]], -[[2242]], -[[2243]], -[[2244]], -[[2245]], -[[2246]], -[[2247]], -[[2248]], -[[2249]], -[[2250]], -[[2251]], -[[2252]], -[[2253]], -[[2254]], -[[2255]], -[[2256]], -[[2257]], -[[2258]], -[[2259]], -[[2260]], -[[2261]], -[[2262]], -[[2263]], -[[2264]], -[[2265]], -[[2266]], -[[2267]], -[[2268]], -[[2269]], -[[2270]], -[[2271]], -[[2272]], -[[2273]], -[[2274]], -[[2275]], -[[2276]], -[[2277]], -[[2278]], -[[2279]], -[[2280]], -[[2281]], -[[2282]], -[[2283]], -[[2284]], -[[2285]], -[[2286]], -[[2287]], -[[2288]], -[[2289]], -[[2290]], -[[2291]], -[[2292]], -[[2293]], -[[2294]], -[[2295]], -[[2296]], -[[2297]], -[[2298]], -[[2299]], -[[2300]], -[[2301]], -[[2302]], -[[2303]], -[[2304]], -[[2305]], -[[2306]], -[[2307]], -[[2308]], -[[2309]], -[[2310]], -[[2311]], -[[2312]], -[[2313]], -[[2314]], -[[2315]], -[[2316]], -[[2317]], -[[2318]], -[[2319]], -[[2320]], -[[2321]], -[[2322]], -[[2323]], -[[2324]], -[[2325]], -[[2326]], -[[2327]], -[[2328]], -[[2329]], -[[2330]], -[[2331]], -[[2332]], -[[2333]], -[[2334]], -[[2335]], -[[2336]], -[[2337]], -[[2338]], -[[2339]], -[[2340]], -[[2341]], -[[2342]], -[[2343]], -[[2344]], -[[2345]], -[[2346]], -[[2347]], -[[2348]], -[[2349]], -[[2350]], -[[2351]], -[[2352]], -[[2353]], -[[2354]], -[[2355]], -[[2356]], -[[2357]], -[[2358]], -[[2359]], -[[2360]], -[[2361]], -[[2362]], -[[2363]], -[[2364]], -[[2365]], -[[2366]], -[[2367]], -[[2368]], -[[2369]], -[[2370]], -[[2371]], -[[2372]], -[[2373]], -[[2374]], -[[2375]], -[[2376]], -[[2377]], -[[2378]], -[[2379]], -[[2380]], -[[2381]], -[[2382]], -[[2383]], -[[2384]], -[[2385]], -[[2386]], -[[2387]], -[[2388]], -[[2389]], -[[2390]], -[[2391]], -[[2392]], -[[2393]], -[[2394]], -[[2395]], -[[2396]], -[[2397]], -[[2398]], -[[2399]], -[[2400]], -[[2401]], -[[2402]], -[[2403]], -[[2404]], -[[2405]], -[[2406]], -[[2407]], -[[2408]], -[[2409]], -[[2410]], -[[2411]], -[[2412]], -[[2413]], -[[2414]], -[[2415]], -[[2416]], -[[2417]], -[[2418]], -[[2419]], -[[2420]], -[[2421]], -[[2422]], -[[2423]], -[[2424]], -[[2425]], -[[2426]], -[[2427]], -[[2428]], -[[2429]], -[[2430]], -[[2431]], -[[2432]], -[[2433]], -[[2434]], -[[2435]], -[[2436]], -[[2437]], -[[2438]], -[[2439]], -[[2440]], -[[2441]], -[[2442]], -[[2443]], -[[2444]], -[[2445]], -[[2446]], -[[2447]], -[[2448]], -[[2449]], -[[2450]], -[[2451]], -[[2452]], -[[2453]], -[[2454]], -[[2455]], -[[2456]], -[[2457]], -[[2458]], -[[2459]], -[[2460]], -[[2461]], -[[2462]], -[[2463]], -[[2464]], -[[2465]], -[[2466]], -[[2467]], -[[2468]], -[[2469]], -[[2470]], -[[2471]], -[[2472]], -[[2473]], -[[2474]], -[[2475]], -[[2476]], -[[2477]], -[[2478]], -[[2479]], -[[2480]], -[[2481]], -[[2482]], -[[2483]], -[[2484]], -[[2485]], -[[2486]], -[[2487]], -[[2488]], -[[2489]], -[[2490]], -[[2491]], -[[2492]], -[[2493]], -[[2494]], -[[2495]], -[[2496]], -[[2497]], -[[2498]], -[[2499]], -[[2500]], -[[2501]], -[[2502]], -[[2503]], -[[2504]], -[[2505]], -[[2506]], -[[2507]], -[[2508]], -[[2509]], -[[2510]], -[[2511]], -[[2512]], -[[2513]], -[[2514]], -[[2515]], -[[2516]], -[[2517]], -[[2518]], -[[2519]], -[[2520]], -[[2521]], -[[2522]], -[[2523]], -[[2524]], -[[2525]], -[[2526]], -[[2527]], -[[2528]], -[[2529]], -[[2530]], -[[2531]], -[[2532]], -[[2533]], -[[2534]], -[[2535]], -[[2536]], -[[2537]], -[[2538]], -[[2539]], -[[2540]], -[[2541]], -[[2542]], -[[2543]], -[[2544]], -[[2545]], -[[2546]], -[[2547]], -[[2548]], -[[2549]], -[[2550]], -[[2551]], -[[2552]], -[[2553]], -[[2554]], -[[2555]], -[[2556]], -[[2557]], -[[2558]], -[[2559]], -[[2560]], -[[2561]], -[[2562]], -[[2563]], -[[2564]], -[[2565]], -[[2566]], -[[2567]], -[[2568]], -[[2569]], -[[2570]], -[[2571]], -[[2572]], -[[2573]], -[[2574]], -[[2575]], -[[2576]], -[[2577]], -[[2578]], -[[2579]], -[[2580]], -[[2581]], -[[2582]], -[[2583]], -[[2584]], -[[2585]], -[[2586]], -[[2587]], -[[2588]], -[[2589]], -[[2590]], -[[2591]], -[[2592]], -[[2593]], -[[2594]], -[[2595]], -[[2596]], -[[2597]], -[[2598]], -[[2599]], -[[2600]], -[[2601]], -[[2602]], -[[2603]], -[[2604]], -[[2605]], -[[2606]], -[[2607]], -[[2608]], -[[2609]], -[[2610]], -[[2611]], -[[2612]], -[[2613]], -[[2614]], -[[2615]], -[[2616]], -[[2617]], -[[2618]], -[[2619]], -[[2620]], -[[2621]], -[[2622]], -[[2623]], -[[2624]], -[[2625]], -[[2626]], -[[2627]], -[[2628]], -[[2629]], -[[2630]], -[[2631]], -[[2632]], -[[2633]], -[[2634]], -[[2635]], -[[2636]], -[[2637]], -[[2638]], -[[2639]], -[[2640]], -[[2641]], -[[2642]], -[[2643]], -[[2644]], -[[2645]], -[[2646]], -[[2647]], -[[2648]], -[[2649]], -[[2650]], -[[2651]], -[[2652]], -[[2653]], -[[2654]], -[[2655]], -[[2656]], -[[2657]], -[[2658]], -[[2659]], -[[2660]], -[[2661]], -[[2662]], -[[2663]], -[[2664]], -[[2665]], -[[2666]], -[[2667]], -[[2668]], -[[2669]], -[[2670]], -[[2671]], -[[2672]], -[[2673]], -[[2674]], -[[2675]], -[[2676]], -[[2677]], -[[2678]], -[[2679]], -[[2680]], -[[2681]], -[[2682]], -[[2683]], -[[2684]], -[[2685]], -[[2686]], -[[2687]], -[[2688]], -[[2689]], -[[2690]], -[[2691]], -[[2692]], -[[2693]], -[[2694]], -[[2695]], -[[2696]], -[[2697]], -[[2698]], -[[2699]], -[[2700]], -[[2701]], -[[2702]], -[[2703]], -[[2704]], -[[2705]], -[[2706]], -[[2707]], -[[2708]], -[[2709]], -[[2710]], -[[2711]], -[[2712]], -[[2713]], -[[2714]], -[[2715]], -[[2716]], -[[2717]], -[[2718]], -[[2719]], -[[2720]], -[[2721]], -[[2722]], -[[2723]], -[[2724]], -[[2725]], -[[2726]], -[[2727]], -[[2728]], -[[2729]], -[[2730]], -[[2731]], -[[2732]], -[[2733]], -[[2734]], -[[2735]], -[[2736]], -[[2737]], -[[2738]], -[[2739]], -[[2740]], -[[2741]], -[[2742]], -[[2743]], -[[2744]], -[[2745]], -[[2746]], -[[2747]], -[[2748]], -[[2749]], -[[2750]], -[[2751]], -[[2752]], -[[2753]], -[[2754]], -[[2755]], -[[2756]], -[[2757]], -[[2758]], -[[2759]], -[[2760]], -[[2761]], -[[2762]], -[[2763]], -[[2764]], -[[2765]], -[[2766]], -[[2767]], -[[2768]], -[[2769]], -[[2770]], -[[2771]], -[[2772]], -[[2773]], -[[2774]], -[[2775]], -[[2776]], -[[2777]], -[[2778]], -[[2779]], -[[2780]], -[[2781]], -[[2782]], -[[2783]], -[[2784]], -[[2785]], -[[2786]], -[[2787]], -[[2788]], -[[2789]], -[[2790]], -[[2791]], -[[2792]], -[[2793]], -[[2794]], -[[2795]], -[[2796]], -[[2797]], -[[2798]], -[[2799]], -[[2800]], -[[2801]], -[[2802]], -[[2803]], -[[2804]], -[[2805]], -[[2806]], -[[2807]], -[[2808]], -[[2809]], -[[2810]], -[[2811]], -[[2812]], -[[2813]], -[[2814]], -[[2815]], -[[2816]], -[[2817]], -[[2818]], -[[2819]], -[[2820]], -[[2821]], -[[2822]], -[[2823]], -[[2824]], -[[2825]], -[[2826]], -[[2827]], -[[2828]], -[[2829]], -[[2830]], -[[2831]], -[[2832]], -[[2833]], -[[2834]], -[[2835]], -[[2836]], -[[2837]], -[[2838]], -[[2839]], -[[2840]], -[[2841]], -[[2842]], -[[2843]], -[[2844]], -[[2845]], -[[2846]], -[[2847]], -[[2848]], -[[2849]], -[[2850]], -[[2851]], -[[2852]], -[[2853]], -[[2854]], -[[2855]], -[[2856]], -[[2857]], -[[2858]], -[[2859]], -[[2860]], -[[2861]], -[[2862]], -[[2863]], -[[2864]], -[[2865]], -[[2866]], -[[2867]], -[[2868]], -[[2869]], -[[2870]], -[[2871]], -[[2872]], -[[2873]], -[[2874]], -[[2875]], -[[2876]], -[[2877]], -[[2878]], -[[2879]], -[[2880]], -[[2881]], -[[2882]], -[[2883]], -[[2884]], -[[2885]], -[[2886]], -[[2887]], -[[2888]], -[[2889]], -[[2890]], -[[2891]], -[[2892]], -[[2893]], -[[2894]], -[[2895]], -[[2896]], -[[2897]], -[[2898]], -[[2899]], -[[2900]], -[[2901]], -[[2902]], -[[2903]], -[[2904]], -[[2905]], -[[2906]], -[[2907]], -[[2908]], -[[2909]], -[[2910]], -[[2911]], -[[2912]], -[[2913]], -[[2914]], -[[2915]], -[[2916]], -[[2917]], -[[2918]], -[[2919]], -[[2920]], -[[2921]], -[[2922]], -[[2923]], -[[2924]], -[[2925]], -[[2926]], -[[2927]], -[[2928]], -[[2929]], -[[2930]], -[[2931]], -[[2932]], -[[2933]], -[[2934]], -[[2935]], -[[2936]], -[[2937]], -[[2938]], -[[2939]], -[[2940]], -[[2941]], -[[2942]], -[[2943]], -[[2944]], -[[2945]], -[[2946]], -[[2947]], -[[2948]], -[[2949]], -[[2950]], -[[2951]], -[[2952]], -[[2953]], -[[2954]], -[[2955]], -[[2956]], -[[2957]], -[[2958]], -[[2959]], -[[2960]], -[[2961]], -[[2962]], -[[2963]], -[[2964]], -[[2965]], -[[2966]], -[[2967]], -[[2968]], -[[2969]], -[[2970]], -[[2971]], -[[2972]], -[[2973]], -[[2974]], -[[2975]], -[[2976]], -[[2977]], -[[2978]], -[[2979]], -[[2980]], -[[2981]], -[[2982]], -[[2983]], -[[2984]], -[[2985]], -[[2986]], -[[2987]], -[[2988]], -[[2989]], -[[2990]], -[[2991]], -[[2992]], -[[2993]], -[[2994]], -[[2995]], -[[2996]], -[[2997]], -[[2998]], -[[2999]], -[[3000]], -[[3001]], -[[3002]], -[[3003]], -[[3004]], -[[3005]], -[[3006]], -[[3007]], -[[3008]], -[[3009]], -[[3010]], -[[3011]], -[[3012]], -[[3013]], -[[3014]], -[[3015]], -[[3016]], -[[3017]], -[[3018]], -[[3019]], -[[3020]], -[[3021]], -[[3022]], -[[3023]], -[[3024]], -[[3025]], -[[3026]], -[[3027]], -[[3028]], -[[3029]], -[[3030]], -[[3031]], -[[3032]], -[[3033]], -[[3034]], -[[3035]], -[[3036]], -[[3037]], -[[3038]], -[[3039]], -[[3040]], -[[3041]], -[[3042]], -[[3043]], -[[3044]], -[[3045]], -[[3046]], -[[3047]], -[[3048]], -[[3049]], -[[3050]], -[[3051]], -[[3052]], -[[3053]], -[[3054]], -[[3055]], -[[3056]], -[[3057]], -[[3058]], -[[3059]], -[[3060]], -[[3061]], -[[3062]], -[[3063]], -[[3064]], -[[3065]], -[[3066]], -[[3067]], -[[3068]], -[[3069]], -[[3070]], -[[3071]], -[[3072]], -[[3073]], -[[3074]], -[[3075]], -[[3076]], -[[3077]], -[[3078]], -[[3079]], -[[3080]], -[[3081]], -[[3082]], -[[3083]], -[[3084]], -[[3085]], -[[3086]], -[[3087]], -[[3088]], -[[3089]], -[[3090]], -[[3091]], -[[3092]], -[[3093]], -[[3094]], -[[3095]], -[[3096]], -[[3097]], -[[3098]], -[[3099]], -[[3100]], -[[3101]], -[[3102]], -[[3103]], -[[3104]], -[[3105]], -[[3106]], -[[3107]], -[[3108]], -[[3109]], -[[3110]], -[[3111]], -[[3112]], -[[3113]], -[[3114]], -[[3115]], -[[3116]], -[[3117]], -[[3118]], -[[3119]], -[[3120]], -[[3121]], -[[3122]], -[[3123]], -[[3124]], -[[3125]], -[[3126]], -[[3127]], -[[3128]], -[[3129]], -[[3130]], -[[3131]], -[[3132]], -[[3133]], -[[3134]], -[[3135]], -[[3136]], -[[3137]], -[[3138]], -[[3139]], -[[3140]], -[[3141]], -[[3142]], -[[3143]], -[[3144]], -[[3145]], -[[3146]], -[[3147]], -[[3148]], -[[3149]], -[[3150]], -[[3151]], -[[3152]], -[[3153]], -[[3154]], -[[3155]], -[[3156]], -[[3157]], -[[3158]], -[[3159]], -[[3160]], -[[3161]], -[[3162]], -[[3163]], -[[3164]], -[[3165]], -[[3166]], -[[3167]], -[[3168]], -[[3169]], -[[3170]], -[[3171]], -[[3172]], -[[3173]], -[[3174]], -[[3175]], -[[3176]], -[[3177]], -[[3178]], -[[3179]], -[[3180]], -[[3181]], -[[3182]], -[[3183]], -[[3184]], -[[3185]], -[[3186]], -[[3187]], -[[3188]], -[[3189]], -[[3190]], -[[3191]], -[[3192]], -[[3193]], -[[3194]], -[[3195]], -[[3196]], -[[3197]], -[[3198]], -[[3199]], -[[3200]], -[[3201]], -[[3202]], -[[3203]], -[[3204]], -[[3205]], -[[3206]], -[[3207]], -[[3208]], -[[3209]], -[[3210]], -[[3211]], -[[3212]], -[[3213]], -[[3214]], -[[3215]], -[[3216]], -[[3217]], -[[3218]], -[[3219]], -[[3220]], -[[3221]], -[[3222]], -[[3223]], -[[3224]], -[[3225]], -[[3226]], -[[3227]], -[[3228]], -[[3229]], -[[3230]], -[[3231]], -[[3232]], -[[3233]], -[[3234]], -[[3235]], -[[3236]], -[[3237]], -[[3238]], -[[3239]], -[[3240]], -[[3241]], -[[3242]], -[[3243]], -[[3244]], -[[3245]], -[[3246]], -[[3247]], -[[3248]], -[[3249]], -[[3250]], -[[3251]], -[[3252]], -[[3253]], -[[3254]], -[[3255]], -[[3256]], -[[3257]], -[[3258]], -[[3259]], -[[3260]], -[[3261]], -[[3262]], -[[3263]], -[[3264]], -[[3265]], -[[3266]], -[[3267]], -[[3268]], -[[3269]], -[[3270]], -[[3271]], -[[3272]], -[[3273]], -[[3274]], -[[3275]], -[[3276]], -[[3277]], -[[3278]], -[[3279]], -[[3280]], -[[3281]], -[[3282]], -[[3283]], -[[3284]], -[[3285]], -[[3286]], -[[3287]], -[[3288]], -[[3289]], -[[3290]], -[[3291]], -[[3292]], -[[3293]], -[[3294]], -[[3295]], -[[3296]], -[[3297]], -[[3298]], -[[3299]], -[[3300]], -[[3301]], -[[3302]], -[[3303]], -[[3304]], -[[3305]], -[[3306]], -[[3307]], -[[3308]], -[[3309]], -[[3310]], -[[3311]], -[[3312]], -[[3313]], -[[3314]], -[[3315]], -[[3316]], -[[3317]], -[[3318]], -[[3319]], -[[3320]], -[[3321]], -[[3322]], -[[3323]], -[[3324]], -[[3325]], -[[3326]], -[[3327]], -[[3328]], -[[3329]], -[[3330]], -[[3331]], -[[3332]], -[[3333]], -[[3334]], -[[3335]], -[[3336]], -[[3337]], -[[3338]], -[[3339]], -[[3340]], -[[3341]], -[[3342]], -[[3343]], -[[3344]], -[[3345]], -[[3346]], -[[3347]], -[[3348]], -[[3349]], -[[3350]], -[[3351]], -[[3352]], -[[3353]], -[[3354]], -[[3355]], -[[3356]], -[[3357]], -[[3358]], -[[3359]], -[[3360]], -[[3361]], -[[3362]], -[[3363]], -[[3364]], -[[3365]], -[[3366]], -[[3367]], -[[3368]], -[[3369]], -[[3370]], -[[3371]], -[[3372]], -[[3373]], -[[3374]], -[[3375]], -[[3376]], -[[3377]], -[[3378]], -[[3379]], -[[3380]], -[[3381]], -[[3382]], -[[3383]], -[[3384]], -[[3385]], -[[3386]], -[[3387]], -[[3388]], -[[3389]], -[[3390]], -[[3391]], -[[3392]], -[[3393]], -[[3394]], -[[3395]], -[[3396]], -[[3397]], -[[3398]], -[[3399]], -[[3400]], -[[3401]], -[[3402]], -[[3403]], -[[3404]], -[[3405]], -[[3406]], -[[3407]], -[[3408]], -[[3409]], -[[3410]], -[[3411]], -[[3412]], -[[3413]], -[[3414]], -[[3415]], -[[3416]], -[[3417]], -[[3418]], -[[3419]], -[[3420]], -[[3421]], -[[3422]], -[[3423]], -[[3424]], -[[3425]], -[[3426]], -[[3427]], -[[3428]], -[[3429]], -[[3430]], -[[3431]], -[[3432]], -[[3433]], -[[3434]], -[[3435]], -[[3436]], -[[3437]], -[[3438]], -[[3439]], -[[3440]], -[[3441]], -[[3442]], -[[3443]], -[[3444]], -[[3445]], -[[3446]], -[[3447]], -[[3448]], -[[3449]], -[[3450]], -[[3451]], -[[3452]], -[[3453]], -[[3454]], -[[3455]], -[[3456]], -[[3457]], -[[3458]], -[[3459]], -[[3460]], -[[3461]], -[[3462]], -[[3463]], -[[3464]], -[[3465]], -[[3466]], -[[3467]], -[[3468]], -[[3469]], -[[3470]], -[[3471]], -[[3472]], -[[3473]], -[[3474]], -[[3475]], -[[3476]], -[[3477]], -[[3478]], -[[3479]], -[[3480]], -[[3481]], -[[3482]], -[[3483]], -[[3484]], -[[3485]], -[[3486]], -[[3487]], -[[3488]], -[[3489]], -[[3490]], -[[3491]], -[[3492]], -[[3493]], -[[3494]], -[[3495]], -[[3496]], -[[3497]], -[[3498]], -[[3499]], -[[3500]], -[[3501]], -[[3502]], -[[3503]], -[[3504]], -[[3505]], -[[3506]], -[[3507]], -[[3508]], -[[3509]], -[[3510]], -[[3511]], -[[3512]], -[[3513]], -[[3514]], -[[3515]], -[[3516]], -[[3517]], -[[3518]], -[[3519]], -[[3520]], -[[3521]], -[[3522]], -[[3523]], -[[3524]], -[[3525]], -[[3526]], -[[3527]], -[[3528]], -[[3529]], -[[3530]], -[[3531]], -[[3532]], -[[3533]], -[[3534]], -[[3535]], -[[3536]], -[[3537]], -[[3538]], -[[3539]], -[[3540]], -[[3541]], -[[3542]], -[[3543]], -[[3544]], -[[3545]], -[[3546]], -[[3547]], -[[3548]], -[[3549]], -[[3550]], -[[3551]], -[[3552]], -[[3553]], -[[3554]], -[[3555]], -[[3556]], -[[3557]], -[[3558]], -[[3559]], -[[3560]], -[[3561]], -[[3562]], -[[3563]], -[[3564]], -[[3565]], -[[3566]], -[[3567]], -[[3568]], -[[3569]], -[[3570]], -[[3571]], -[[3572]], -[[3573]], -[[3574]], -[[3575]], -[[3576]], -[[3577]], -[[3578]], -[[3579]], -[[3580]], -[[3581]], -[[3582]], -[[3583]], -[[3584]], -[[3585]], -[[3586]], -[[3587]], -[[3588]], -[[3589]], -[[3590]], -[[3591]], -[[3592]], -[[3593]], -[[3594]], -[[3595]], -[[3596]], -[[3597]], -[[3598]], -[[3599]], -[[3600]], -[[3601]], -[[3602]], -[[3603]], -[[3604]], -[[3605]], -[[3606]], -[[3607]], -[[3608]], -[[3609]], -[[3610]], -[[3611]], -[[3612]], -[[3613]], -[[3614]], -[[3615]], -[[3616]], -[[3617]], -[[3618]], -[[3619]], -[[3620]], -[[3621]], -[[3622]], -[[3623]], -[[3624]], -[[3625]], -[[3626]], -[[3627]], -[[3628]], -[[3629]], -[[3630]], -[[3631]], -[[3632]], -[[3633]], -[[3634]], -[[3635]], -[[3636]], -[[3637]], -[[3638]], -[[3639]], -[[3640]], -[[3641]], -[[3642]], -[[3643]], -[[3644]], -[[3645]], -[[3646]], -[[3647]], -[[3648]], -[[3649]], -[[3650]], -[[3651]], -[[3652]], -[[3653]], -[[3654]], -[[3655]], -[[3656]], -[[3657]], -[[3658]], -[[3659]], -[[3660]], -[[3661]], -[[3662]], -[[3663]], -[[3664]], -[[3665]], -[[3666]], -[[3667]], -[[3668]], -[[3669]], -[[3670]], -[[3671]], -[[3672]], -[[3673]], -[[3674]], -[[3675]], -[[3676]], -[[3677]], -[[3678]], -[[3679]], -[[3680]], -[[3681]], -[[3682]], -[[3683]], -[[3684]], -[[3685]], -[[3686]], -[[3687]], -[[3688]], -[[3689]], -[[3690]], -[[3691]], -[[3692]], -[[3693]], -[[3694]], -[[3695]], -[[3696]], -[[3697]], -[[3698]], -[[3699]], -[[3700]], -[[3701]], -[[3702]], -[[3703]], -[[3704]], -[[3705]], -[[3706]], -[[3707]], -[[3708]], -[[3709]], -[[3710]], -[[3711]], -[[3712]], -[[3713]], -[[3714]], -[[3715]], -[[3716]], -[[3717]], -[[3718]], -[[3719]], -[[3720]], -[[3721]], -[[3722]], -[[3723]], -[[3724]], -[[3725]], -[[3726]], -[[3727]], -[[3728]], -[[3729]], -[[3730]], -[[3731]], -[[3732]], -[[3733]], -[[3734]], -[[3735]], -[[3736]], -[[3737]], -[[3738]], -[[3739]], -[[3740]], -[[3741]], -[[3742]], -[[3743]], -[[3744]], -[[3745]], -[[3746]], -[[3747]], -[[3748]], -[[3749]], -[[3750]], -[[3751]], -[[3752]], -[[3753]], -[[3754]], -[[3755]], -[[3756]], -[[3757]], -[[3758]], -[[3759]], -[[3760]], -[[3761]], -[[3762]], -[[3763]], -[[3764]], -[[3765]], -[[3766]], -[[3767]], -[[3768]], -[[3769]], -[[3770]], -[[3771]], -[[3772]], -[[3773]], -[[3774]], -[[3775]], -[[3776]], -[[3777]], -[[3778]], -[[3779]], -[[3780]], -[[3781]], -[[3782]], -[[3783]], -[[3784]], -[[3785]], -[[3786]], -[[3787]], -[[3788]], -[[3789]], -[[3790]], -[[3791]], -[[3792]], -[[3793]], -[[3794]], -[[3795]], -[[3796]], -[[3797]], -[[3798]], -[[3799]], -[[3800]], -[[3801]], -[[3802]], -[[3803]], -[[3804]], -[[3805]], -[[3806]], -[[3807]], -[[3808]], -[[3809]], -[[3810]], -[[3811]], -[[3812]], -[[3813]], -[[3814]], -[[3815]], -[[3816]], -[[3817]], -[[3818]], -[[3819]], -[[3820]], -[[3821]], -[[3822]], -[[3823]], -[[3824]], -[[3825]], -[[3826]], -[[3827]], -[[3828]], -[[3829]], -[[3830]], -[[3831]], -[[3832]], -[[3833]], -[[3834]], -[[3835]], -[[3836]], -[[3837]], -[[3838]], -[[3839]], -[[3840]], -[[3841]], -[[3842]], -[[3843]], -[[3844]], -[[3845]], -[[3846]], -[[3847]], -[[3848]], -[[3849]], -[[3850]], -[[3851]], -[[3852]], -[[3853]], -[[3854]], -[[3855]], -[[3856]], -[[3857]], -[[3858]], -[[3859]], -[[3860]], -[[3861]], -[[3862]], -[[3863]], -[[3864]], -[[3865]], -[[3866]], -[[3867]], -[[3868]], -[[3869]], -[[3870]], -[[3871]], -[[3872]], -[[3873]], -[[3874]], -[[3875]], -[[3876]], -[[3877]], -[[3878]], -[[3879]], -[[3880]], -[[3881]], -[[3882]], -[[3883]], -[[3884]], -[[3885]], -[[3886]], -[[3887]], -[[3888]], -[[3889]], -[[3890]], -[[3891]], -[[3892]], -[[3893]], -[[3894]], -[[3895]], -[[3896]], -[[3897]], -[[3898]], -[[3899]], -[[3900]], -[[3901]], -[[3902]], -[[3903]], -[[3904]], -[[3905]], -[[3906]], -[[3907]], -[[3908]], -[[3909]], -[[3910]], -[[3911]], -[[3912]], -[[3913]], -[[3914]], -[[3915]], -[[3916]], -[[3917]], -[[3918]], -[[3919]], -[[3920]], -[[3921]], -[[3922]], -[[3923]], -[[3924]], -[[3925]], -[[3926]], -[[3927]], -[[3928]], -[[3929]], -[[3930]], -[[3931]], -[[3932]], -[[3933]], -[[3934]], -[[3935]], -[[3936]], -[[3937]], -[[3938]], -[[3939]], -[[3940]], -[[3941]], -[[3942]], -[[3943]], -[[3944]], -[[3945]], -[[3946]], -[[3947]], -[[3948]], -[[3949]], -[[3950]], -[[3951]], -[[3952]], -[[3953]], -[[3954]], -[[3955]], -[[3956]], -[[3957]], -[[3958]], -[[3959]], -[[3960]], -[[3961]], -[[3962]], -[[3963]], -[[3964]], -[[3965]], -[[3966]], -[[3967]], -[[3968]], -[[3969]], -[[3970]], -[[3971]], -[[3972]], -[[3973]], -[[3974]], -[[3975]], -[[3976]], -[[3977]], -[[3978]], -[[3979]], -[[3980]], -[[3981]], -[[3982]], -[[3983]], -[[3984]], -[[3985]], -[[3986]], -[[3987]], -[[3988]], -[[3989]], -[[3990]], -[[3991]], -[[3992]], -[[3993]], -[[3994]], -[[3995]], -[[3996]], -[[3997]], -[[3998]], -[[3999]], -[[4000]], -[[4001]], -[[4002]], -[[4003]], -[[4004]], -[[4005]], -[[4006]], -[[4007]], -[[4008]], -[[4009]], -[[4010]], -[[4011]], -[[4012]], -[[4013]], -[[4014]], -[[4015]], -[[4016]], -[[4017]], -[[4018]], -[[4019]], -[[4020]], -[[4021]], -[[4022]], -[[4023]], -[[4024]], -[[4025]], -[[4026]], -[[4027]], -[[4028]], -[[4029]], -[[4030]], -[[4031]], -[[4032]], -[[4033]], -[[4034]], -[[4035]], -[[4036]], -[[4037]], -[[4038]], -[[4039]], -[[4040]], -[[4041]], -[[4042]], -[[4043]], -[[4044]], -[[4045]], -[[4046]], -[[4047]], -[[4048]], -[[4049]], -[[4050]], -[[4051]], -[[4052]], -[[4053]], -[[4054]], -[[4055]], -[[4056]], -[[4057]], -[[4058]], -[[4059]], -[[4060]], -[[4061]], -[[4062]], -[[4063]], -[[4064]], -[[4065]], -[[4066]], -[[4067]], -[[4068]], -[[4069]], -[[4070]], -[[4071]], -[[4072]], -[[4073]], -[[4074]], -[[4075]], -[[4076]], -[[4077]], -[[4078]], -[[4079]], -[[4080]], -[[4081]], -[[4082]], -[[4083]], -[[4084]], -[[4085]], -[[4086]], -[[4087]], -[[4088]], -[[4089]], -[[4090]], -[[4091]], -[[4092]], -[[4093]], -[[4094]], -[[4095]], -[[4096]], -[[4097]], -[[4098]], -[[4099]], -[[4100]], -[[4101]], -[[4102]], -[[4103]], -[[4104]], -[[4105]], -[[4106]], -[[4107]], -[[4108]], -[[4109]], -[[4110]], -[[4111]], -[[4112]], -[[4113]], -[[4114]], -[[4115]], -[[4116]], -[[4117]], -[[4118]], -[[4119]], -[[4120]], -[[4121]], -[[4122]], -[[4123]], -[[4124]], -[[4125]], -[[4126]], -[[4127]], -[[4128]], -[[4129]], -[[4130]], -[[4131]], -[[4132]], -[[4133]], -[[4134]], -[[4135]], -[[4136]], -[[4137]], -[[4138]], -[[4139]], -[[4140]], -[[4141]], -[[4142]], -[[4143]], -[[4144]], -[[4145]], -[[4146]], -[[4147]], -[[4148]], -[[4149]], -[[4150]], -[[4151]], -[[4152]], -[[4153]], -[[4154]], -[[4155]], -[[4156]], -[[4157]], -[[4158]], -[[4159]], -[[4160]], -[[4161]], -[[4162]], -[[4163]], -[[4164]], -[[4165]], -[[4166]], -[[4167]], -[[4168]], -[[4169]], -[[4170]], -[[4171]], -[[4172]], -[[4173]], -[[4174]], -[[4175]], -[[4176]], -[[4177]], -[[4178]], -[[4179]], -[[4180]], -[[4181]], -[[4182]], -[[4183]], -[[4184]], -[[4185]], -[[4186]], -[[4187]], -[[4188]], -[[4189]], -[[4190]], -[[4191]], -[[4192]], -[[4193]], -[[4194]], -[[4195]], -[[4196]], -[[4197]], -[[4198]], -[[4199]], -[[4200]], -[[4201]], -[[4202]], -[[4203]], -[[4204]], -[[4205]], -[[4206]], -[[4207]], -[[4208]], -[[4209]], -[[4210]], -[[4211]], -[[4212]], -[[4213]], -[[4214]], -[[4215]], -[[4216]], -[[4217]], -[[4218]], -[[4219]], -[[4220]], -[[4221]], -[[4222]], -[[4223]], -[[4224]], -[[4225]], -[[4226]], -[[4227]], -[[4228]], -[[4229]], -[[4230]], -[[4231]], -[[4232]], -[[4233]], -[[4234]], -[[4235]], -[[4236]], -[[4237]], -[[4238]], -[[4239]], -[[4240]], -[[4241]], -[[4242]], -[[4243]], -[[4244]], -[[4245]], -[[4246]], -[[4247]], -[[4248]], -[[4249]], -[[4250]], -[[4251]], -[[4252]], -[[4253]], -[[4254]], -[[4255]], -[[4256]], -[[4257]], -[[4258]], -[[4259]], -[[4260]], -[[4261]], -[[4262]], -[[4263]], -[[4264]], -[[4265]], -[[4266]], -[[4267]], -[[4268]], -[[4269]], -[[4270]], -[[4271]], -[[4272]], -[[4273]], -[[4274]], -[[4275]], -[[4276]], -[[4277]], -[[4278]], -[[4279]], -[[4280]], -[[4281]], -[[4282]], -[[4283]], -[[4284]], -[[4285]], -[[4286]], -[[4287]], -[[4288]], -[[4289]], -[[4290]], -[[4291]], -[[4292]], -[[4293]], -[[4294]], -[[4295]], -[[4296]], -[[4297]], -[[4298]], -[[4299]], -[[4300]], -[[4301]], -[[4302]], -[[4303]], -[[4304]], -[[4305]], -[[4306]], -[[4307]], -[[4308]], -[[4309]], -[[4310]], -[[4311]], -[[4312]], -[[4313]], -[[4314]], -[[4315]], -[[4316]], -[[4317]], -[[4318]], -[[4319]], -[[4320]], -[[4321]], -[[4322]], -[[4323]], -[[4324]], -[[4325]], -[[4326]], -[[4327]], -[[4328]], -[[4329]], -[[4330]], -[[4331]], -[[4332]], -[[4333]], -[[4334]], -[[4335]], -[[4336]], -[[4337]], -[[4338]], -[[4339]], -[[4340]], -[[4341]], -[[4342]], -[[4343]], -[[4344]], -[[4345]], -[[4346]], -[[4347]], -[[4348]], -[[4349]], -[[4350]], -[[4351]], -[[4352]], -[[4353]], -[[4354]], -[[4355]], -[[4356]], -[[4357]], -[[4358]], -[[4359]], -[[4360]], -[[4361]], -[[4362]], -[[4363]], -[[4364]], -[[4365]], -[[4366]], -[[4367]], -[[4368]], -[[4369]], -[[4370]], -[[4371]], -[[4372]], -[[4373]], -[[4374]], -[[4375]], -[[4376]], -[[4377]], -[[4378]], -[[4379]], -[[4380]], -[[4381]], -[[4382]], -[[4383]], -[[4384]], -[[4385]], -[[4386]], -[[4387]], -[[4388]], -[[4389]], -[[4390]], -[[4391]], -[[4392]], -[[4393]], -[[4394]], -[[4395]], -[[4396]], -[[4397]], -[[4398]], -[[4399]], -[[4400]], -[[4401]], -[[4402]], -[[4403]], -[[4404]], -[[4405]], -[[4406]], -[[4407]], -[[4408]], -[[4409]], -[[4410]], -[[4411]], -[[4412]], -[[4413]], -[[4414]], -[[4415]], -[[4416]], -[[4417]], -[[4418]], -[[4419]], -[[4420]], -[[4421]], -[[4422]], -[[4423]], -[[4424]], -[[4425]], -[[4426]], -[[4427]], -[[4428]], -[[4429]], -[[4430]], -[[4431]], -[[4432]], -[[4433]], -[[4434]], -[[4435]], -[[4436]], -[[4437]], -[[4438]], -[[4439]], -[[4440]], -[[4441]], -[[4442]], -[[4443]], -[[4444]], -[[4445]], -[[4446]], -[[4447]], -[[4448]], -[[4449]], -[[4450]], -[[4451]], -[[4452]], -[[4453]], -[[4454]], -[[4455]], -[[4456]], -[[4457]], -[[4458]], -[[4459]], -[[4460]], -[[4461]], -[[4462]], -[[4463]], -[[4464]], -[[4465]], -[[4466]], -[[4467]], -[[4468]], -[[4469]], -[[4470]], -[[4471]], -[[4472]], -[[4473]], -[[4474]], -[[4475]], -[[4476]], -[[4477]], -[[4478]], -[[4479]], -[[4480]], -[[4481]], -[[4482]], -[[4483]], -[[4484]], -[[4485]], -[[4486]], -[[4487]], -[[4488]], -[[4489]], -[[4490]], -[[4491]], -[[4492]], -[[4493]], -[[4494]], -[[4495]], -[[4496]], -[[4497]], -[[4498]], -[[4499]], -[[4500]], -[[4501]], -[[4502]], -[[4503]], -[[4504]], -[[4505]], -[[4506]], -[[4507]], -[[4508]], -[[4509]], -[[4510]], -[[4511]], -[[4512]], -[[4513]], -[[4514]], -[[4515]], -[[4516]], -[[4517]], -[[4518]], -[[4519]], -[[4520]], -[[4521]], -[[4522]], -[[4523]], -[[4524]], -[[4525]], -[[4526]], -[[4527]], -[[4528]], -[[4529]], -[[4530]], -[[4531]], -[[4532]], -[[4533]], -[[4534]], -[[4535]], -[[4536]], -[[4537]], -[[4538]], -[[4539]], -[[4540]], -[[4541]], -[[4542]], -[[4543]], -[[4544]], -[[4545]], -[[4546]], -[[4547]], -[[4548]], -[[4549]], -[[4550]], -[[4551]], -[[4552]], -[[4553]], -[[4554]], -[[4555]], -[[4556]], -[[4557]], -[[4558]], -[[4559]], -[[4560]], -[[4561]], -[[4562]], -[[4563]], -[[4564]], -[[4565]], -[[4566]], -[[4567]], -[[4568]], -[[4569]], -[[4570]], -[[4571]], -[[4572]], -[[4573]], -[[4574]], -[[4575]], -[[4576]], -[[4577]], -[[4578]], -[[4579]], -[[4580]], -[[4581]], -[[4582]], -[[4583]], -[[4584]], -[[4585]], -[[4586]], -[[4587]], -[[4588]], -[[4589]], -[[4590]], -[[4591]], -[[4592]], -[[4593]], -[[4594]], -[[4595]], -[[4596]], -[[4597]], -[[4598]], -[[4599]], -[[4600]], -[[4601]], -[[4602]], -[[4603]], -[[4604]], -[[4605]], -[[4606]], -[[4607]], -[[4608]], -[[4609]], -[[4610]], -[[4611]], -[[4612]], -[[4613]], -[[4614]], -[[4615]], -[[4616]], -[[4617]], -[[4618]], -[[4619]], -[[4620]], -[[4621]], -[[4622]], -[[4623]], -[[4624]], -[[4625]], -[[4626]], -[[4627]], -[[4628]], -[[4629]], -[[4630]], -[[4631]], -[[4632]], -[[4633]], -[[4634]], -[[4635]], -[[4636]], -[[4637]], -[[4638]], -[[4639]], -[[4640]], -[[4641]], -[[4642]], -[[4643]], -[[4644]], -[[4645]], -[[4646]], -[[4647]], -[[4648]], -[[4649]], -[[4650]], -[[4651]], -[[4652]], -[[4653]], -[[4654]], -[[4655]], -[[4656]], -[[4657]], -[[4658]], -[[4659]], -[[4660]], -[[4661]], -[[4662]], -[[4663]], -[[4664]], -[[4665]], -[[4666]], -[[4667]], -[[4668]], -[[4669]], -[[4670]], -[[4671]], -[[4672]], -[[4673]], -[[4674]], -[[4675]], -[[4676]], -[[4677]], -[[4678]], -[[4679]], -[[4680]], -[[4681]], -[[4682]], -[[4683]], -[[4684]], -[[4685]], -[[4686]], -[[4687]], -[[4688]], -[[4689]], -[[4690]], -[[4691]], -[[4692]], -[[4693]], -[[4694]], -[[4695]], -[[4696]], -[[4697]], -[[4698]], -[[4699]], -[[4700]], -[[4701]], -[[4702]], -[[4703]], -[[4704]], -[[4705]], -[[4706]], -[[4707]], -[[4708]], -[[4709]], -[[4710]], -[[4711]], -[[4712]], -[[4713]], -[[4714]], -[[4715]], -[[4716]], -[[4717]], -[[4718]], -[[4719]], -[[4720]], -[[4721]], -[[4722]], -[[4723]], -[[4724]], -[[4725]], -[[4726]], -[[4727]], -[[4728]], -[[4729]], -[[4730]], -[[4731]], -[[4732]], -[[4733]], -[[4734]], -[[4735]], -[[4736]], -[[4737]], -[[4738]], -[[4739]], -[[4740]], -[[4741]], -[[4742]], -[[4743]], -[[4744]], -[[4745]], -[[4746]], -[[4747]], -[[4748]], -[[4749]], -[[4750]], -[[4751]], -[[4752]], -[[4753]], -[[4754]], -[[4755]], -[[4756]], -[[4757]], -[[4758]], -[[4759]], -[[4760]], -[[4761]], -[[4762]], -[[4763]], -[[4764]], -[[4765]], -[[4766]], -[[4767]], -[[4768]], -[[4769]], -[[4770]], -[[4771]], -[[4772]], -[[4773]], -[[4774]], -[[4775]], -[[4776]], -[[4777]], -[[4778]], -[[4779]], -[[4780]], -[[4781]], -[[4782]], -[[4783]], -[[4784]], -[[4785]], -[[4786]], -[[4787]], -[[4788]], -[[4789]], -[[4790]], -[[4791]], -[[4792]], -[[4793]], -[[4794]], -[[4795]], -[[4796]], -[[4797]], -[[4798]], -[[4799]], -[[4800]], -[[4801]], -[[4802]], -[[4803]], -[[4804]], -[[4805]], -[[4806]], -[[4807]], -[[4808]], -[[4809]], -[[4810]], -[[4811]], -[[4812]], -[[4813]], -[[4814]], -[[4815]], -[[4816]], -[[4817]], -[[4818]], -[[4819]], -[[4820]], -[[4821]], -[[4822]], -[[4823]], -[[4824]], -[[4825]], -[[4826]], -[[4827]], -[[4828]], -[[4829]], -[[4830]], -[[4831]], -[[4832]], -[[4833]], -[[4834]], -[[4835]], -[[4836]], -[[4837]], -[[4838]], -[[4839]], -[[4840]], -[[4841]], -[[4842]], -[[4843]], -[[4844]], -[[4845]], -[[4846]], -[[4847]], -[[4848]], -[[4849]], -[[4850]], -[[4851]], -[[4852]], -[[4853]], -[[4854]], -[[4855]], -[[4856]], -[[4857]], -[[4858]], -[[4859]], -[[4860]], -[[4861]], -[[4862]], -[[4863]], -[[4864]], -[[4865]], -[[4866]], -[[4867]], -[[4868]], -[[4869]], -[[4870]], -[[4871]], -[[4872]], -[[4873]], -[[4874]], -[[4875]], -[[4876]], -[[4877]], -[[4878]], -[[4879]], -[[4880]], -[[4881]], -[[4882]], -[[4883]], -[[4884]], -[[4885]], -[[4886]], -[[4887]], -[[4888]], -[[4889]], -[[4890]], -[[4891]], -[[4892]], -[[4893]], -[[4894]], -[[4895]], -[[4896]], -[[4897]], -[[4898]], -[[4899]], -[[4900]], -[[4901]], -[[4902]], -[[4903]], -[[4904]], -[[4905]], -[[4906]], -[[4907]], -[[4908]], -[[4909]], -[[4910]], -[[4911]], -[[4912]], -[[4913]], -[[4914]], -[[4915]], -[[4916]], -[[4917]], -[[4918]], -[[4919]], -[[4920]], -[[4921]], -[[4922]], -[[4923]], -[[4924]], -[[4925]], -[[4926]], -[[4927]], -[[4928]], -[[4929]], -[[4930]], -[[4931]], -[[4932]], -[[4933]], -[[4934]], -[[4935]], -[[4936]], -[[4937]], -[[4938]], -[[4939]], -[[4940]], -[[4941]], -[[4942]], -[[4943]], -[[4944]], -[[4945]], -[[4946]], -[[4947]], -[[4948]], -[[4949]], -[[4950]], -[[4951]], -[[4952]], -[[4953]], -[[4954]], -[[4955]], -[[4956]], -[[4957]], -[[4958]], -[[4959]], -[[4960]], -[[4961]], -[[4962]], -[[4963]], -[[4964]], -[[4965]], -[[4966]], -[[4967]], -[[4968]], -[[4969]], -[[4970]], -[[4971]], -[[4972]], -[[4973]], -[[4974]], -[[4975]], -[[4976]], -[[4977]], -[[4978]], -[[4979]], -[[4980]], -[[4981]], -[[4982]], -[[4983]], -[[4984]], -[[4985]], -[[4986]], -[[4987]], -[[4988]], -[[4989]], -[[4990]], -[[4991]], -[[4992]], -[[4993]], -[[4994]], -[[4995]], -[[4996]], -[[4997]], -[[4998]], -[[4999]], -[[5000]], -[[5001]], -[[5002]], -[[5003]], -[[5004]], -[[5005]], -[[5006]], -[[5007]], -[[5008]], -[[5009]], -[[5010]], -[[5011]], -[[5012]], -[[5013]], -[[5014]], -[[5015]], -[[5016]], -[[5017]], -[[5018]], -[[5019]], -[[5020]], -[[5021]], -[[5022]], -[[5023]], -[[5024]], -[[5025]], -[[5026]], -[[5027]], -[[5028]], -[[5029]], -[[5030]], -[[5031]], -[[5032]], -[[5033]], -[[5034]], -[[5035]], -[[5036]], -[[5037]], -[[5038]], -[[5039]], -[[5040]], -[[5041]], -[[5042]], -[[5043]], -[[5044]], -[[5045]], -[[5046]], -[[5047]], -[[5048]], -[[5049]], -[[5050]], -[[5051]], -[[5052]], -[[5053]], -[[5054]], -[[5055]], -[[5056]], -[[5057]], -[[5058]], -[[5059]], -[[5060]], -[[5061]], -[[5062]], -[[5063]], -[[5064]], -[[5065]], -[[5066]], -[[5067]], -[[5068]], -[[5069]], -[[5070]], -[[5071]], -[[5072]], -[[5073]], -[[5074]], -[[5075]], -[[5076]], -[[5077]], -[[5078]], -[[5079]], -[[5080]], -[[5081]], -[[5082]], -[[5083]], -[[5084]], -[[5085]], -[[5086]], -[[5087]], -[[5088]], -[[5089]], -[[5090]], -[[5091]], -[[5092]], -[[5093]], -[[5094]], -[[5095]], -[[5096]], -[[5097]], -[[5098]], -[[5099]], -[[5100]], -[[5101]], -[[5102]], -[[5103]], -[[5104]], -[[5105]], -[[5106]], -[[5107]], -[[5108]], -[[5109]], -[[5110]], -[[5111]], -[[5112]], -[[5113]], -[[5114]], -[[5115]], -[[5116]], -[[5117]], -[[5118]], -[[5119]], -[[5120]], -[[5121]], -[[5122]], -[[5123]], -[[5124]], -[[5125]], -[[5126]], -[[5127]], -[[5128]], -[[5129]], -[[5130]], -[[5131]], -[[5132]], -[[5133]], -[[5134]], -[[5135]], -[[5136]], -[[5137]], -[[5138]], -[[5139]], -[[5140]], -[[5141]], -[[5142]], -[[5143]], -[[5144]], -[[5145]], -[[5146]], -[[5147]], -[[5148]], -[[5149]], -[[5150]], -[[5151]], -[[5152]], -[[5153]], -[[5154]], -[[5155]], -[[5156]], -[[5157]], -[[5158]], -[[5159]], -[[5160]], -[[5161]], -[[5162]], -[[5163]], -[[5164]], -[[5165]], -[[5166]], -[[5167]], -[[5168]], -[[5169]], -[[5170]], -[[5171]], -[[5172]], -[[5173]], -[[5174]], -[[5175]], -[[5176]], -[[5177]], -[[5178]], -[[5179]], -[[5180]], -[[5181]], -[[5182]], -[[5183]], -[[5184]], -[[5185]], -[[5186]], -[[5187]], -[[5188]], -[[5189]], -[[5190]], -[[5191]], -[[5192]], -[[5193]], -[[5194]], -[[5195]], -[[5196]], -[[5197]], -[[5198]], -[[5199]], -[[5200]], -[[5201]], -[[5202]], -[[5203]], -[[5204]], -[[5205]], -[[5206]], -[[5207]], -[[5208]], -[[5209]], -[[5210]], -[[5211]], -[[5212]], -[[5213]], -[[5214]], -[[5215]], -[[5216]], -[[5217]], -[[5218]], -[[5219]], -[[5220]], -[[5221]], -[[5222]], -[[5223]], -[[5224]], -[[5225]], -[[5226]], -[[5227]], -[[5228]], -[[5229]], -[[5230]], -[[5231]], -[[5232]], -[[5233]], -[[5234]], -[[5235]], -[[5236]], -[[5237]], -[[5238]], -[[5239]], -[[5240]], -[[5241]], -[[5242]], -[[5243]], -[[5244]], -[[5245]], -[[5246]], -[[5247]], -[[5248]], -[[5249]], -[[5250]], -[[5251]], -[[5252]], -[[5253]], -[[5254]], -[[5255]], -[[5256]], -[[5257]], -[[5258]], -[[5259]], -[[5260]], -[[5261]], -[[5262]], -[[5263]], -[[5264]], -[[5265]], -[[5266]], -[[5267]], -[[5268]], -[[5269]], -[[5270]], -[[5271]], -[[5272]], -[[5273]], -[[5274]], -[[5275]], -[[5276]], -[[5277]], -[[5278]], -[[5279]], -[[5280]], -[[5281]], -[[5282]], -[[5283]], -[[5284]], -[[5285]], -[[5286]], -[[5287]], -[[5288]], -[[5289]], -[[5290]], -[[5291]], -[[5292]], -[[5293]], -[[5294]], -[[5295]], -[[5296]], -[[5297]], -[[5298]], -[[5299]], -[[5300]], -[[5301]], -[[5302]], -[[5303]], -[[5304]], -[[5305]], -[[5306]], -[[5307]], -[[5308]], -[[5309]], -[[5310]], -[[5311]], -[[5312]], -[[5313]], -[[5314]], -[[5315]], -[[5316]], -[[5317]], -[[5318]], -[[5319]], -[[5320]], -[[5321]], -[[5322]], -[[5323]], -[[5324]], -[[5325]], -[[5326]], -[[5327]], -[[5328]], -[[5329]], -[[5330]], -[[5331]], -[[5332]], -[[5333]], -[[5334]], -[[5335]], -[[5336]], -[[5337]], -[[5338]], -[[5339]], -[[5340]], -[[5341]], -[[5342]], -[[5343]], -[[5344]], -[[5345]], -[[5346]], -[[5347]], -[[5348]], -[[5349]], -[[5350]], -[[5351]], -[[5352]], -[[5353]], -[[5354]], -[[5355]], -[[5356]], -[[5357]], -[[5358]], -[[5359]], -[[5360]], -[[5361]], -[[5362]], -[[5363]], -[[5364]], -[[5365]], -[[5366]], -[[5367]], -[[5368]], -[[5369]], -[[5370]], -[[5371]], -[[5372]], -[[5373]], -[[5374]], -[[5375]], -[[5376]], -[[5377]], -[[5378]], -[[5379]], -[[5380]], -[[5381]], -[[5382]], -[[5383]], -[[5384]], -[[5385]], -[[5386]], -[[5387]], -[[5388]], -[[5389]], -[[5390]], -[[5391]], -[[5392]], -[[5393]], -[[5394]], -[[5395]], -[[5396]], -[[5397]], -[[5398]], -[[5399]], -[[5400]], -[[5401]], -[[5402]], -[[5403]], -[[5404]], -[[5405]], -[[5406]], -[[5407]], -[[5408]], -[[5409]], -[[5410]], -[[5411]], -[[5412]], -[[5413]], -[[5414]], -[[5415]], -[[5416]], -[[5417]], -[[5418]], -[[5419]], -[[5420]], -[[5421]], -[[5422]], -[[5423]], -[[5424]], -[[5425]], -[[5426]], -[[5427]], -[[5428]], -[[5429]], -[[5430]], -[[5431]], -[[5432]], -[[5433]], -[[5434]], -[[5435]], -[[5436]], -[[5437]], -[[5438]], -[[5439]], -[[5440]], -[[5441]], -[[5442]], -[[5443]], -[[5444]], -[[5445]], -[[5446]], -[[5447]], -[[5448]], -[[5449]], -[[5450]], -[[5451]], -[[5452]], -[[5453]], -[[5454]], -[[5455]], -[[5456]], -[[5457]], -[[5458]], -[[5459]], -[[5460]], -[[5461]], -[[5462]], -[[5463]], -[[5464]], -[[5465]], -[[5466]], -[[5467]], -[[5468]], -[[5469]], -[[5470]], -[[5471]], -[[5472]], -[[5473]], -[[5474]], -[[5475]], -[[5476]], -[[5477]], -[[5478]], -[[5479]], -[[5480]], -[[5481]], -[[5482]], -[[5483]], -[[5484]], -[[5485]], -[[5486]], -[[5487]], -[[5488]], -[[5489]], -[[5490]], -[[5491]], -[[5492]], -[[5493]], -[[5494]], -[[5495]], -[[5496]], -[[5497]], -[[5498]], -[[5499]], -[[5500]], -[[5501]], -[[5502]], -[[5503]], -[[5504]], -[[5505]], -[[5506]], -[[5507]], -[[5508]], -[[5509]], -[[5510]], -[[5511]], -[[5512]], -[[5513]], -[[5514]], -[[5515]], -[[5516]], -[[5517]], -[[5518]], -[[5519]], -[[5520]], -[[5521]], -[[5522]], -[[5523]], -[[5524]], -[[5525]], -[[5526]], -[[5527]], -[[5528]], -[[5529]], -[[5530]], -[[5531]], -[[5532]], -[[5533]], -[[5534]], -[[5535]], -[[5536]], -[[5537]], -[[5538]], -[[5539]], -[[5540]], -[[5541]], -[[5542]], -[[5543]], -[[5544]], -[[5545]], -[[5546]], -[[5547]], -[[5548]], -[[5549]], -[[5550]], -[[5551]], -[[5552]], -[[5553]], -[[5554]], -[[5555]], -[[5556]], -[[5557]], -[[5558]], -[[5559]], -[[5560]], -[[5561]], -[[5562]], -[[5563]], -[[5564]], -[[5565]], -[[5566]], -[[5567]], -[[5568]], -[[5569]], -[[5570]], -[[5571]], -[[5572]], -[[5573]], -[[5574]], -[[5575]], -[[5576]], -[[5577]], -[[5578]], -[[5579]], -[[5580]], -[[5581]], -[[5582]], -[[5583]], -[[5584]], -[[5585]], -[[5586]], -[[5587]], -[[5588]], -[[5589]], -[[5590]], -[[5591]], -[[5592]], -[[5593]], -[[5594]], -[[5595]], -[[5596]], -[[5597]], -[[5598]], -[[5599]], -[[5600]], -[[5601]], -[[5602]], -[[5603]], -[[5604]], -[[5605]], -[[5606]], -[[5607]], -[[5608]], -[[5609]], -[[5610]], -[[5611]], -[[5612]], -[[5613]], -[[5614]], -[[5615]], -[[5616]], -[[5617]], -[[5618]], -[[5619]], -[[5620]], -[[5621]], -[[5622]], -[[5623]], -[[5624]], -[[5625]], -[[5626]], -[[5627]], -[[5628]], -[[5629]], -[[5630]], -[[5631]], -[[5632]], -[[5633]], -[[5634]], -[[5635]], -[[5636]], -[[5637]], -[[5638]], -[[5639]], -[[5640]], -[[5641]], -[[5642]], -[[5643]], -[[5644]], -[[5645]], -[[5646]], -[[5647]], -[[5648]], -[[5649]], -[[5650]], -[[5651]], -[[5652]], -[[5653]], -[[5654]], -[[5655]], -[[5656]], -[[5657]], -[[5658]], -[[5659]], -[[5660]], -[[5661]], -[[5662]], -[[5663]], -[[5664]], -[[5665]], -[[5666]], -[[5667]], -[[5668]], -[[5669]], -[[5670]], -[[5671]], -[[5672]], -[[5673]], -[[5674]], -[[5675]], -[[5676]], -[[5677]], -[[5678]], -[[5679]], -[[5680]], -[[5681]], -[[5682]], -[[5683]], -[[5684]], -[[5685]], -[[5686]], -[[5687]], -[[5688]], -[[5689]], -[[5690]], -[[5691]], -[[5692]], -[[5693]], -[[5694]], -[[5695]], -[[5696]], -[[5697]], -[[5698]], -[[5699]], -[[5700]], -[[5701]], -[[5702]], -[[5703]], -[[5704]], -[[5705]], -[[5706]], -[[5707]], -[[5708]], -[[5709]], -[[5710]], -[[5711]], -[[5712]], -[[5713]], -[[5714]], -[[5715]], -[[5716]], -[[5717]], -[[5718]], -[[5719]], -[[5720]], -[[5721]], -[[5722]], -[[5723]], -[[5724]], -[[5725]], -[[5726]], -[[5727]], -[[5728]], -[[5729]], -[[5730]], -[[5731]], -[[5732]], -[[5733]], -[[5734]], -[[5735]], -[[5736]], -[[5737]], -[[5738]], -[[5739]], -[[5740]], -[[5741]], -[[5742]], -[[5743]], -[[5744]], -[[5745]], -[[5746]], -[[5747]], -[[5748]], -[[5749]], -[[5750]], -[[5751]], -[[5752]], -[[5753]], -[[5754]], -[[5755]], -[[5756]], -[[5757]], -[[5758]], -[[5759]], -[[5760]], -[[5761]], -[[5762]], -[[5763]], -[[5764]], -[[5765]], -[[5766]], -[[5767]], -[[5768]], -[[5769]], -[[5770]], -[[5771]], -[[5772]], -[[5773]], -[[5774]], -[[5775]], -[[5776]], -[[5777]], -[[5778]], -[[5779]], -[[5780]], -[[5781]], -[[5782]], -[[5783]], -[[5784]], -[[5785]], -[[5786]], -[[5787]], -[[5788]], -[[5789]], -[[5790]], -[[5791]], -[[5792]], -[[5793]], -[[5794]], -[[5795]], -[[5796]], -[[5797]], -[[5798]], -[[5799]], -[[5800]], -[[5801]], -[[5802]], -[[5803]], -[[5804]], -[[5805]], -[[5806]], -[[5807]], -[[5808]], -[[5809]], -[[5810]], -[[5811]], -[[5812]], -[[5813]], -[[5814]], -[[5815]], -[[5816]], -[[5817]], -[[5818]], -[[5819]], -[[5820]], -[[5821]], -[[5822]], -[[5823]], -[[5824]], -[[5825]], -[[5826]], -[[5827]], -[[5828]], -[[5829]], -[[5830]], -[[5831]], -[[5832]], -[[5833]], -[[5834]], -[[5835]], -[[5836]], -[[5837]], -[[5838]], -[[5839]], -[[5840]], -[[5841]], -[[5842]], -[[5843]], -[[5844]], -[[5845]], -[[5846]], -[[5847]], -[[5848]], -[[5849]], -[[5850]], -[[5851]], -[[5852]], -[[5853]], -[[5854]], -[[5855]], -[[5856]], -[[5857]], -[[5858]], -[[5859]], -[[5860]], -[[5861]], -[[5862]], -[[5863]], -[[5864]], -[[5865]], -[[5866]], -[[5867]], -[[5868]], -[[5869]], -[[5870]], -[[5871]], -[[5872]], -[[5873]], -[[5874]], -[[5875]], -[[5876]], -[[5877]], -[[5878]], -[[5879]], -[[5880]], -[[5881]], -[[5882]], -[[5883]], -[[5884]], -[[5885]], -[[5886]], -[[5887]], -[[5888]], -[[5889]], -[[5890]], -[[5891]], -[[5892]], -[[5893]], -[[5894]], -[[5895]], -[[5896]], -[[5897]], -[[5898]], -[[5899]], -[[5900]], -[[5901]], -[[5902]], -[[5903]], -[[5904]], -[[5905]], -[[5906]], -[[5907]], -[[5908]], -[[5909]], -[[5910]], -[[5911]], -[[5912]], -[[5913]], -[[5914]], -[[5915]], -[[5916]], -[[5917]], -[[5918]], -[[5919]], -[[5920]], -[[5921]], -[[5922]], -[[5923]], -[[5924]], -[[5925]], -[[5926]], -[[5927]], -[[5928]], -[[5929]], -[[5930]], -[[5931]], -[[5932]], -[[5933]], -[[5934]], -[[5935]], -[[5936]], -[[5937]], -[[5938]], -[[5939]], -[[5940]], -[[5941]], -[[5942]], -[[5943]], -[[5944]], -[[5945]], -[[5946]], -[[5947]], -[[5948]], -[[5949]], -[[5950]], -[[5951]], -[[5952]], -[[5953]], -[[5954]], -[[5955]], -[[5956]], -[[5957]], -[[5958]], -[[5959]], -[[5960]], -[[5961]], -[[5962]], -[[5963]], -[[5964]], -[[5965]], -[[5966]], -[[5967]], -[[5968]], -[[5969]], -[[5970]], -[[5971]], -[[5972]], -[[5973]], -[[5974]], -[[5975]], -[[5976]], -[[5977]], -[[5978]], -[[5979]], -[[5980]], -[[5981]], -[[5982]], -[[5983]], -[[5984]], -[[5985]], -[[5986]], -[[5987]], -[[5988]], -[[5989]], -[[5990]], -[[5991]], -[[5992]], -[[5993]], -[[5994]], -[[5995]], -[[5996]], -[[5997]], -[[5998]], -[[5999]], -[[6000]], -[[6001]], -[[6002]], -[[6003]], -[[6004]], -[[6005]], -[[6006]], -[[6007]], -[[6008]], -[[6009]], -[[6010]], -[[6011]], -[[6012]], -[[6013]], -[[6014]], -[[6015]], -[[6016]], -[[6017]], -[[6018]], -[[6019]], -[[6020]], -[[6021]], -[[6022]], -[[6023]], -[[6024]], -[[6025]], -[[6026]], -[[6027]], -[[6028]], -[[6029]], -[[6030]], -[[6031]], -[[6032]], -[[6033]], -[[6034]], -[[6035]], -[[6036]], -[[6037]], -[[6038]], -[[6039]], -[[6040]], -[[6041]], -[[6042]], -[[6043]], -[[6044]], -[[6045]], -[[6046]], -[[6047]], -[[6048]], -[[6049]], -[[6050]], -[[6051]], -[[6052]], -[[6053]], -[[6054]], -[[6055]], -[[6056]], -[[6057]], -[[6058]], -[[6059]], -[[6060]], -[[6061]], -[[6062]], -[[6063]], -[[6064]], -[[6065]], -[[6066]], -[[6067]], -[[6068]], -[[6069]], -[[6070]], -[[6071]], -[[6072]], -[[6073]], -[[6074]], -[[6075]], -[[6076]], -[[6077]], -[[6078]], -[[6079]], -[[6080]], -[[6081]], -[[6082]], -[[6083]], -[[6084]], -[[6085]], -[[6086]], -[[6087]], -[[6088]], -[[6089]], -[[6090]], -[[6091]], -[[6092]], -[[6093]], -[[6094]], -[[6095]], -[[6096]], -[[6097]], -[[6098]], -[[6099]], -[[6100]], -[[6101]], -[[6102]], -[[6103]], -[[6104]], -[[6105]], -[[6106]], -[[6107]], -[[6108]], -[[6109]], -[[6110]], -[[6111]], -[[6112]], -[[6113]], -[[6114]], -[[6115]], -[[6116]], -[[6117]], -[[6118]], -[[6119]], -[[6120]], -[[6121]], -[[6122]], -[[6123]], -[[6124]], -[[6125]], -[[6126]], -[[6127]], -[[6128]], -[[6129]], -[[6130]], -[[6131]], -[[6132]], -[[6133]], -[[6134]], -[[6135]], -[[6136]], -[[6137]], -[[6138]], -[[6139]], -[[6140]], -[[6141]], -[[6142]], -[[6143]], -[[6144]], -[[6145]], -[[6146]], -[[6147]], -[[6148]], -[[6149]], -[[6150]], -[[6151]], -[[6152]], -[[6153]], -[[6154]], -[[6155]], -[[6156]], -[[6157]], -[[6158]], -[[6159]], -[[6160]], -[[6161]], -[[6162]], -[[6163]], -[[6164]], -[[6165]], -[[6166]], -[[6167]], -[[6168]], -[[6169]], -[[6170]], -[[6171]], -[[6172]], -[[6173]], -[[6174]], -[[6175]], -[[6176]], -[[6177]], -[[6178]], -[[6179]], -[[6180]], -[[6181]], -[[6182]], -[[6183]], -[[6184]], -[[6185]], -[[6186]], -[[6187]], -[[6188]], -[[6189]], -[[6190]], -[[6191]], -[[6192]], -[[6193]], -[[6194]], -[[6195]], -[[6196]], -[[6197]], -[[6198]], -[[6199]], -[[6200]], -[[6201]], -[[6202]], -[[6203]], -[[6204]], -[[6205]], -[[6206]], -[[6207]], -[[6208]], -[[6209]], -[[6210]], -[[6211]], -[[6212]], -[[6213]], -[[6214]], -[[6215]], -[[6216]], -[[6217]], -[[6218]], -[[6219]], -[[6220]], -[[6221]], -[[6222]], -[[6223]], -[[6224]], -[[6225]], -[[6226]], -[[6227]], -[[6228]], -[[6229]], -[[6230]], -[[6231]], -[[6232]], -[[6233]], -[[6234]], -[[6235]], -[[6236]], -[[6237]], -[[6238]], -[[6239]], -[[6240]], -[[6241]], -[[6242]], -[[6243]], -[[6244]], -[[6245]], -[[6246]], -[[6247]], -[[6248]], -[[6249]], -[[6250]], -[[6251]], -[[6252]], -[[6253]], -[[6254]], -[[6255]], -[[6256]], -[[6257]], -[[6258]], -[[6259]], -[[6260]], -[[6261]], -[[6262]], -[[6263]], -[[6264]], -[[6265]], -[[6266]], -[[6267]], -[[6268]], -[[6269]], -[[6270]], -[[6271]], -[[6272]], -[[6273]], -[[6274]], -[[6275]], -[[6276]], -[[6277]], -[[6278]], -[[6279]], -[[6280]], -[[6281]], -[[6282]], -[[6283]], -[[6284]], -[[6285]], -[[6286]], -[[6287]], -[[6288]], -[[6289]], -[[6290]], -[[6291]], -[[6292]], -[[6293]], -[[6294]], -[[6295]], -[[6296]], -[[6297]], -[[6298]], -[[6299]], -[[6300]], -[[6301]], -[[6302]], -[[6303]], -[[6304]], -[[6305]], -[[6306]], -[[6307]], -[[6308]], -[[6309]], -[[6310]], -[[6311]], -[[6312]], -[[6313]], -[[6314]], -[[6315]], -[[6316]], -[[6317]], -[[6318]], -[[6319]], -[[6320]], -[[6321]], -[[6322]], -[[6323]], -[[6324]], -[[6325]], -[[6326]], -[[6327]], -[[6328]], -[[6329]], -[[6330]], -[[6331]], -[[6332]], -[[6333]], -[[6334]], -[[6335]], -[[6336]], -[[6337]], -[[6338]], -[[6339]], -[[6340]], -[[6341]], -[[6342]], -[[6343]], -[[6344]], -[[6345]], -[[6346]], -[[6347]], -[[6348]], -[[6349]], -[[6350]], -[[6351]], -[[6352]], -[[6353]], -[[6354]], -[[6355]], -[[6356]], -[[6357]], -[[6358]], -[[6359]], -[[6360]], -[[6361]], -[[6362]], -[[6363]], -[[6364]], -[[6365]], -[[6366]], -[[6367]], -[[6368]], -[[6369]], -[[6370]], -[[6371]], -[[6372]], -[[6373]], -[[6374]], -[[6375]], -[[6376]], -[[6377]], -[[6378]], -[[6379]], -[[6380]], -[[6381]], -[[6382]], -[[6383]], -[[6384]], -[[6385]], -[[6386]], -[[6387]], -[[6388]], -[[6389]], -[[6390]], -[[6391]], -[[6392]], -[[6393]], -[[6394]], -[[6395]], -[[6396]], -[[6397]], -[[6398]], -[[6399]], -[[6400]], -[[6401]], -[[6402]], -[[6403]], -[[6404]], -[[6405]], -[[6406]], -[[6407]], -[[6408]], -[[6409]], -[[6410]], -[[6411]], -[[6412]], -[[6413]], -[[6414]], -[[6415]], -[[6416]], -[[6417]], -[[6418]], -[[6419]], -[[6420]], -[[6421]], -[[6422]], -[[6423]], -[[6424]], -[[6425]], -[[6426]], -[[6427]], -[[6428]], -[[6429]], -[[6430]], -[[6431]], -[[6432]], -[[6433]], -[[6434]], -[[6435]], -[[6436]], -[[6437]], -[[6438]], -[[6439]], -[[6440]], -[[6441]], -[[6442]], -[[6443]], -[[6444]], -[[6445]], -[[6446]], -[[6447]], -[[6448]], -[[6449]], -[[6450]], -[[6451]], -[[6452]], -[[6453]], -[[6454]], -[[6455]], -[[6456]], -[[6457]], -[[6458]], -[[6459]], -[[6460]], -[[6461]], -[[6462]], -[[6463]], -[[6464]], -[[6465]], -[[6466]], -[[6467]], -[[6468]], -[[6469]], -[[6470]], -[[6471]], -[[6472]], -[[6473]], -[[6474]], -[[6475]], -[[6476]], -[[6477]], -[[6478]], -[[6479]], -[[6480]], -[[6481]], -[[6482]], -[[6483]], -[[6484]], -[[6485]], -[[6486]], -[[6487]], -[[6488]], -[[6489]], -[[6490]], -[[6491]], -[[6492]], -[[6493]], -[[6494]], -[[6495]], -[[6496]], -[[6497]], -[[6498]], -[[6499]], -[[6500]], -[[6501]], -[[6502]], -[[6503]], -[[6504]], -[[6505]], -[[6506]], -[[6507]], -[[6508]], -[[6509]], -[[6510]], -[[6511]], -[[6512]], -[[6513]], -[[6514]], -[[6515]], -[[6516]], -[[6517]], -[[6518]], -[[6519]], -[[6520]], -[[6521]], -[[6522]], -[[6523]], -[[6524]], -[[6525]], -[[6526]], -[[6527]], -[[6528]], -[[6529]], -[[6530]], -[[6531]], -[[6532]], -[[6533]], -[[6534]], -[[6535]], -[[6536]], -[[6537]], -[[6538]], -[[6539]], -[[6540]], -[[6541]], -[[6542]], -[[6543]], -[[6544]], -[[6545]], -[[6546]], -[[6547]], -[[6548]], -[[6549]], -[[6550]], -[[6551]], -[[6552]], -[[6553]], -[[6554]], -[[6555]], -[[6556]], -[[6557]], -[[6558]], -[[6559]], -[[6560]], -[[6561]], -[[6562]], -[[6563]], -[[6564]], -[[6565]], -[[6566]], -[[6567]], -[[6568]], -[[6569]], -[[6570]], -[[6571]], -[[6572]], -[[6573]], -[[6574]], -[[6575]], -[[6576]], -[[6577]], -[[6578]], -[[6579]], -[[6580]], -[[6581]], -[[6582]], -[[6583]], -[[6584]], -[[6585]], -[[6586]], -[[6587]], -[[6588]], -[[6589]], -[[6590]], -[[6591]], -[[6592]], -[[6593]], -[[6594]], -[[6595]], -[[6596]], -[[6597]], -[[6598]], -[[6599]], -[[6600]], -[[6601]], -[[6602]], -[[6603]], -[[6604]], -[[6605]], -[[6606]], -[[6607]], -[[6608]], -[[6609]], -[[6610]], -[[6611]], -[[6612]], -[[6613]], -[[6614]], -[[6615]], -[[6616]], -[[6617]], -[[6618]], -[[6619]], -[[6620]], -[[6621]], -[[6622]], -[[6623]], -[[6624]], -[[6625]], -[[6626]], -[[6627]], -[[6628]], -[[6629]], -[[6630]], -[[6631]], -[[6632]], -[[6633]], -[[6634]], -[[6635]], -[[6636]], -[[6637]], -[[6638]], -[[6639]], -[[6640]], -[[6641]], -[[6642]], -[[6643]], -[[6644]], -[[6645]], -[[6646]], -[[6647]], -[[6648]], -[[6649]], -[[6650]], -[[6651]], -[[6652]], -[[6653]], -[[6654]], -[[6655]], -[[6656]], -[[6657]], -[[6658]], -[[6659]], -[[6660]], -[[6661]], -[[6662]], -[[6663]], -[[6664]], -[[6665]], -[[6666]], -[[6667]], -[[6668]], -[[6669]], -[[6670]], -[[6671]], -[[6672]], -[[6673]], -[[6674]], -[[6675]], -[[6676]], -[[6677]], -[[6678]], -[[6679]], -[[6680]], -[[6681]], -[[6682]], -[[6683]], -[[6684]], -[[6685]], -[[6686]], -[[6687]], -[[6688]], -[[6689]], -[[6690]], -[[6691]], -[[6692]], -[[6693]], -[[6694]], -[[6695]], -[[6696]], -[[6697]], -[[6698]], -[[6699]], -[[6700]], -[[6701]], -[[6702]], -[[6703]], -[[6704]], -[[6705]], -[[6706]], -[[6707]], -[[6708]], -[[6709]], -[[6710]], -[[6711]], -[[6712]], -[[6713]], -[[6714]], -[[6715]], -[[6716]], -[[6717]], -[[6718]], -[[6719]], -[[6720]], -[[6721]], -[[6722]], -[[6723]], -[[6724]], -[[6725]], -[[6726]], -[[6727]], -[[6728]], -[[6729]], -[[6730]], -[[6731]], -[[6732]], -[[6733]], -[[6734]], -[[6735]], -[[6736]], -[[6737]], -[[6738]], -[[6739]], -[[6740]], -[[6741]], -[[6742]], -[[6743]], -[[6744]], -[[6745]], -[[6746]], -[[6747]], -[[6748]], -[[6749]], -[[6750]], -[[6751]], -[[6752]], -[[6753]], -[[6754]], -[[6755]], -[[6756]], -[[6757]], -[[6758]], -[[6759]], -[[6760]], -[[6761]], -[[6762]], -[[6763]], -[[6764]], -[[6765]], -[[6766]], -[[6767]], -[[6768]], -[[6769]], -[[6770]], -[[6771]], -[[6772]], -[[6773]], -[[6774]], -[[6775]], -[[6776]], -[[6777]], -[[6778]], -[[6779]], -[[6780]], -[[6781]], -[[6782]], -[[6783]], -[[6784]], -[[6785]], -[[6786]], -[[6787]], -[[6788]], -[[6789]], -[[6790]], -[[6791]], -[[6792]], -[[6793]], -[[6794]], -[[6795]], -[[6796]], -[[6797]], -[[6798]], -[[6799]], -[[6800]], -[[6801]], -[[6802]], -[[6803]], -[[6804]], -[[6805]], -[[6806]], -[[6807]], -[[6808]], -[[6809]], -[[6810]], -[[6811]], -[[6812]], -[[6813]], -[[6814]], -[[6815]], -[[6816]], -[[6817]], -[[6818]], -[[6819]], -[[6820]], -[[6821]], -[[6822]], -[[6823]], -[[6824]], -[[6825]], -[[6826]], -[[6827]], -[[6828]], -[[6829]], -[[6830]], -[[6831]], -[[6832]], -[[6833]], -[[6834]], -[[6835]], -[[6836]], -[[6837]], -[[6838]], -[[6839]], -[[6840]], -[[6841]], -[[6842]], -[[6843]], -[[6844]], -[[6845]], -[[6846]], -[[6847]], -[[6848]], -[[6849]], -[[6850]], -[[6851]], -[[6852]], -[[6853]], -[[6854]], -[[6855]], -[[6856]], -[[6857]], -[[6858]], -[[6859]], -[[6860]], -[[6861]], -[[6862]], -[[6863]], -[[6864]], -[[6865]], -[[6866]], -[[6867]], -[[6868]], -[[6869]], -[[6870]], -[[6871]], -[[6872]], -[[6873]], -[[6874]], -[[6875]], -[[6876]], -[[6877]], -[[6878]], -[[6879]], -[[6880]], -[[6881]], -[[6882]], -[[6883]], -[[6884]], -[[6885]], -[[6886]], -[[6887]], -[[6888]], -[[6889]], -[[6890]], -[[6891]], -[[6892]], -[[6893]], -[[6894]], -[[6895]], -[[6896]], -[[6897]], -[[6898]], -[[6899]], -[[6900]], -[[6901]], -[[6902]], -[[6903]], -[[6904]], -[[6905]], -[[6906]], -[[6907]], -[[6908]], -[[6909]], -[[6910]], -[[6911]], -[[6912]], -[[6913]], -[[6914]], -[[6915]], -[[6916]], -[[6917]], -[[6918]], -[[6919]], -[[6920]], -[[6921]], -[[6922]], -[[6923]], -[[6924]], -[[6925]], -[[6926]], -[[6927]], -[[6928]], -[[6929]], -[[6930]], -[[6931]], -[[6932]], -[[6933]], -[[6934]], -[[6935]], -[[6936]], -[[6937]], -[[6938]], -[[6939]], -[[6940]], -[[6941]], -[[6942]], -[[6943]], -[[6944]], -[[6945]], -[[6946]], -[[6947]], -[[6948]], -[[6949]], -[[6950]], -[[6951]], -[[6952]], -[[6953]], -[[6954]], -[[6955]], -[[6956]], -[[6957]], -[[6958]], -[[6959]], -[[6960]], -[[6961]], -[[6962]], -[[6963]], -[[6964]], -[[6965]], -[[6966]], -[[6967]], -[[6968]], -[[6969]], -[[6970]], -[[6971]], -[[6972]], -[[6973]], -[[6974]], -[[6975]], -[[6976]], -[[6977]], -[[6978]], -[[6979]], -[[6980]], -[[6981]], -[[6982]], -[[6983]], -[[6984]], -[[6985]], -[[6986]], -[[6987]], -[[6988]], -[[6989]], -[[6990]], -[[6991]], -[[6992]], -[[6993]], -[[6994]], -[[6995]], -[[6996]], -[[6997]], -[[6998]], -[[6999]], -[[7000]], -[[7001]], -[[7002]], -[[7003]], -[[7004]], -[[7005]], -[[7006]], -[[7007]], -[[7008]], -[[7009]], -[[7010]], -[[7011]], -[[7012]], -[[7013]], -[[7014]], -[[7015]], -[[7016]], -[[7017]], -[[7018]], -[[7019]], -[[7020]], -[[7021]], -[[7022]], -[[7023]], -[[7024]], -[[7025]], -[[7026]], -[[7027]], -[[7028]], -[[7029]], -[[7030]], -[[7031]], -[[7032]], -[[7033]], -[[7034]], -[[7035]], -[[7036]], -[[7037]], -[[7038]], -[[7039]], -[[7040]], -[[7041]], -[[7042]], -[[7043]], -[[7044]], -[[7045]], -[[7046]], -[[7047]], -[[7048]], -[[7049]], -[[7050]], -[[7051]], -[[7052]], -[[7053]], -[[7054]], -[[7055]], -[[7056]], -[[7057]], -[[7058]], -[[7059]], -[[7060]], -[[7061]], -[[7062]], -[[7063]], -[[7064]], -[[7065]], -[[7066]], -[[7067]], -[[7068]], -[[7069]], -[[7070]], -[[7071]], -[[7072]], -[[7073]], -[[7074]], -[[7075]], -[[7076]], -[[7077]], -[[7078]], -[[7079]], -[[7080]], -[[7081]], -[[7082]], -[[7083]], -[[7084]], -[[7085]], -[[7086]], -[[7087]], -[[7088]], -[[7089]], -[[7090]], -[[7091]], -[[7092]], -[[7093]], -[[7094]], -[[7095]], -[[7096]], -[[7097]], -[[7098]], -[[7099]], -[[7100]], -[[7101]], -[[7102]], -[[7103]], -[[7104]], -[[7105]], -[[7106]], -[[7107]], -[[7108]], -[[7109]], -[[7110]], -[[7111]], -[[7112]], -[[7113]], -[[7114]], -[[7115]], -[[7116]], -[[7117]], -[[7118]], -[[7119]], -[[7120]], -[[7121]], -[[7122]], -[[7123]], -[[7124]], -[[7125]], -[[7126]], -[[7127]], -[[7128]], -[[7129]], -[[7130]], -[[7131]], -[[7132]], -[[7133]], -[[7134]], -[[7135]], -[[7136]], -[[7137]], -[[7138]], -[[7139]], -[[7140]], -[[7141]], -[[7142]], -[[7143]], -[[7144]], -[[7145]], -[[7146]], -[[7147]], -[[7148]], -[[7149]], -[[7150]], -[[7151]], -[[7152]], -[[7153]], -[[7154]], -[[7155]], -[[7156]], -[[7157]], -[[7158]], -[[7159]], -[[7160]], -[[7161]], -[[7162]], -[[7163]], -[[7164]], -[[7165]], -[[7166]], -[[7167]], -[[7168]], -[[7169]], -[[7170]], -[[7171]], -[[7172]], -[[7173]], -[[7174]], -[[7175]], -[[7176]], -[[7177]], -[[7178]], -[[7179]], -[[7180]], -[[7181]], -[[7182]], -[[7183]], -[[7184]], -[[7185]], -[[7186]], -[[7187]], -[[7188]], -[[7189]], -[[7190]], -[[7191]], -[[7192]], -[[7193]], -[[7194]], -[[7195]], -[[7196]], -[[7197]], -[[7198]], -[[7199]], -[[7200]], -[[7201]], -[[7202]], -[[7203]], -[[7204]], -[[7205]], -[[7206]], -[[7207]], -[[7208]], -[[7209]], -[[7210]], -[[7211]], -[[7212]], -[[7213]], -[[7214]], -[[7215]], -[[7216]], -[[7217]], -[[7218]], -[[7219]], -[[7220]], -[[7221]], -[[7222]], -[[7223]], -[[7224]], -[[7225]], -[[7226]], -[[7227]], -[[7228]], -[[7229]], -[[7230]], -[[7231]], -[[7232]], -[[7233]], -[[7234]], -[[7235]], -[[7236]], -[[7237]], -[[7238]], -[[7239]], -[[7240]], -[[7241]], -[[7242]], -[[7243]], -[[7244]], -[[7245]], -[[7246]], -[[7247]], -[[7248]], -[[7249]], -[[7250]], -[[7251]], -[[7252]], -[[7253]], -[[7254]], -[[7255]], -[[7256]], -[[7257]], -[[7258]], -[[7259]], -[[7260]], -[[7261]], -[[7262]], -[[7263]], -[[7264]], -[[7265]], -[[7266]], -[[7267]], -[[7268]], -[[7269]], -[[7270]], -[[7271]], -[[7272]], -[[7273]], -[[7274]], -[[7275]], -[[7276]], -[[7277]], -[[7278]], -[[7279]], -[[7280]], -[[7281]], -[[7282]], -[[7283]], -[[7284]], -[[7285]], -[[7286]], -[[7287]], -[[7288]], -[[7289]], -[[7290]], -[[7291]], -[[7292]], -[[7293]], -[[7294]], -[[7295]], -[[7296]], -[[7297]], -[[7298]], -[[7299]], -[[7300]], -[[7301]], -[[7302]], -[[7303]], -[[7304]], -[[7305]], -[[7306]], -[[7307]], -[[7308]], -[[7309]], -[[7310]], -[[7311]], -[[7312]], -[[7313]], -[[7314]], -[[7315]], -[[7316]], -[[7317]], -[[7318]], -[[7319]], -[[7320]], -[[7321]], -[[7322]], -[[7323]], -[[7324]], -[[7325]], -[[7326]], -[[7327]], -[[7328]], -[[7329]], -[[7330]], -[[7331]], -[[7332]], -[[7333]], -[[7334]], -[[7335]], -[[7336]], -[[7337]], -[[7338]], -[[7339]], -[[7340]], -[[7341]], -[[7342]], -[[7343]], -[[7344]], -[[7345]], -[[7346]], -[[7347]], -[[7348]], -[[7349]], -[[7350]], -[[7351]], -[[7352]], -[[7353]], -[[7354]], -[[7355]], -[[7356]], -[[7357]], -[[7358]], -[[7359]], -[[7360]], -[[7361]], -[[7362]], -[[7363]], -[[7364]], -[[7365]], -[[7366]], -[[7367]], -[[7368]], -[[7369]], -[[7370]], -[[7371]], -[[7372]], -[[7373]], -[[7374]], -[[7375]], -[[7376]], -[[7377]], -[[7378]], -[[7379]], -[[7380]], -[[7381]], -[[7382]], -[[7383]], -[[7384]], -[[7385]], -[[7386]], -[[7387]], -[[7388]], -[[7389]], -[[7390]], -[[7391]], -[[7392]], -[[7393]], -[[7394]], -[[7395]], -[[7396]], -[[7397]], -[[7398]], -[[7399]], -[[7400]], -[[7401]], -[[7402]], -[[7403]], -[[7404]], -[[7405]], -[[7406]], -[[7407]], -[[7408]], -[[7409]], -[[7410]], -[[7411]], -[[7412]], -[[7413]], -[[7414]], -[[7415]], -[[7416]], -[[7417]], -[[7418]], -[[7419]], -[[7420]], -[[7421]], -[[7422]], -[[7423]], -[[7424]], -[[7425]], -[[7426]], -[[7427]], -[[7428]], -[[7429]], -[[7430]], -[[7431]], -[[7432]], -[[7433]], -[[7434]], -[[7435]], -[[7436]], -[[7437]], -[[7438]], -[[7439]], -[[7440]], -[[7441]], -[[7442]], -[[7443]], -[[7444]], -[[7445]], -[[7446]], -[[7447]], -[[7448]], -[[7449]], -[[7450]], -[[7451]], -[[7452]], -[[7453]], -[[7454]], -[[7455]], -[[7456]], -[[7457]], -[[7458]], -[[7459]], -[[7460]], -[[7461]], -[[7462]], -[[7463]], -[[7464]], -[[7465]], -[[7466]], -[[7467]], -[[7468]], -[[7469]], -[[7470]], -[[7471]], -[[7472]], -[[7473]], -[[7474]], -[[7475]], -[[7476]], -[[7477]], -[[7478]], -[[7479]], -[[7480]], -[[7481]], -[[7482]], -[[7483]], -[[7484]], -[[7485]], -[[7486]], -[[7487]], -[[7488]], -[[7489]], -[[7490]], -[[7491]], -[[7492]], -[[7493]], -[[7494]], -[[7495]], -[[7496]], -[[7497]], -[[7498]], -[[7499]], -[[7500]], -[[7501]], -[[7502]], -[[7503]], -[[7504]], -[[7505]], -[[7506]], -[[7507]], -[[7508]], -[[7509]], -[[7510]], -[[7511]], -[[7512]], -[[7513]], -[[7514]], -[[7515]], -[[7516]], -[[7517]], -[[7518]], -[[7519]], -[[7520]], -[[7521]], -[[7522]], -[[7523]], -[[7524]], -[[7525]], -[[7526]], -[[7527]], -[[7528]], -[[7529]], -[[7530]], -[[7531]], -[[7532]], -[[7533]], -[[7534]], -[[7535]], -[[7536]], -[[7537]], -[[7538]], -[[7539]], -[[7540]], -[[7541]], -[[7542]], -[[7543]], -[[7544]], -[[7545]], -[[7546]], -[[7547]], -[[7548]], -[[7549]], -[[7550]], -[[7551]], -[[7552]], -[[7553]], -[[7554]], -[[7555]], -[[7556]], -[[7557]], -[[7558]], -[[7559]], -[[7560]], -[[7561]], -[[7562]], -[[7563]], -[[7564]], -[[7565]], -[[7566]], -[[7567]], -[[7568]], -[[7569]], -[[7570]], -[[7571]], -[[7572]], -[[7573]], -[[7574]], -[[7575]], -[[7576]], -[[7577]], -[[7578]], -[[7579]], -[[7580]], -[[7581]], -[[7582]], -[[7583]], -[[7584]], -[[7585]], -[[7586]], -[[7587]], -[[7588]], -[[7589]], -[[7590]], -[[7591]], -[[7592]], -[[7593]], -[[7594]], -[[7595]], -[[7596]], -[[7597]], -[[7598]], -[[7599]], -[[7600]], -[[7601]], -[[7602]], -[[7603]], -[[7604]], -[[7605]], -[[7606]], -[[7607]], -[[7608]], -[[7609]], -[[7610]], -[[7611]], -[[7612]], -[[7613]], -[[7614]], -[[7615]], -[[7616]], -[[7617]], -[[7618]], -[[7619]], -[[7620]], -[[7621]], -[[7622]], -[[7623]], -[[7624]], -[[7625]], -[[7626]], -[[7627]], -[[7628]], -[[7629]], -[[7630]], -[[7631]], -[[7632]], -[[7633]], -[[7634]], -[[7635]], -[[7636]], -[[7637]], -[[7638]], -[[7639]], -[[7640]], -[[7641]], -[[7642]], -[[7643]], -[[7644]], -[[7645]], -[[7646]], -[[7647]], -[[7648]], -[[7649]], -[[7650]], -[[7651]], -[[7652]], -[[7653]], -[[7654]], -[[7655]], -[[7656]], -[[7657]], -[[7658]], -[[7659]], -[[7660]], -[[7661]], -[[7662]], -[[7663]], -[[7664]], -[[7665]], -[[7666]], -[[7667]], -[[7668]], -[[7669]], -[[7670]], -[[7671]], -[[7672]], -[[7673]], -[[7674]], -[[7675]], -[[7676]], -[[7677]], -[[7678]], -[[7679]], -[[7680]], -[[7681]], -[[7682]], -[[7683]], -[[7684]], -[[7685]], -[[7686]], -[[7687]], -[[7688]], -[[7689]], -[[7690]], -[[7691]], -[[7692]], -[[7693]], -[[7694]], -[[7695]], -[[7696]], -[[7697]], -[[7698]], -[[7699]], -[[7700]], -[[7701]], -[[7702]], -[[7703]], -[[7704]], -[[7705]], -[[7706]], -[[7707]], -[[7708]], -[[7709]], -[[7710]], -[[7711]], -[[7712]], -[[7713]], -[[7714]], -[[7715]], -[[7716]], -[[7717]], -[[7718]], -[[7719]], -[[7720]], -[[7721]], -[[7722]], -[[7723]], -[[7724]], -[[7725]], -[[7726]], -[[7727]], -[[7728]], -[[7729]], -[[7730]], -[[7731]], -[[7732]], -[[7733]], -[[7734]], -[[7735]], -[[7736]], -[[7737]], -[[7738]], -[[7739]], -[[7740]], -[[7741]], -[[7742]], -[[7743]], -[[7744]], -[[7745]], -[[7746]], -[[7747]], -[[7748]], -[[7749]], -[[7750]], -[[7751]], -[[7752]], -[[7753]], -[[7754]], -[[7755]], -[[7756]], -[[7757]], -[[7758]], -[[7759]], -[[7760]], -[[7761]], -[[7762]], -[[7763]], -[[7764]], -[[7765]], -[[7766]], -[[7767]], -[[7768]], -[[7769]], -[[7770]], -[[7771]], -[[7772]], -[[7773]], -[[7774]], -[[7775]], -[[7776]], -[[7777]], -[[7778]], -[[7779]], -[[7780]], -[[7781]], -[[7782]], -[[7783]], -[[7784]], -[[7785]], -[[7786]], -[[7787]], -[[7788]], -[[7789]], -[[7790]], -[[7791]], -[[7792]], -[[7793]], -[[7794]], -[[7795]], -[[7796]], -[[7797]], -[[7798]], -[[7799]], -[[7800]], -[[7801]], -[[7802]], -[[7803]], -[[7804]], -[[7805]], -[[7806]], -[[7807]], -[[7808]], -[[7809]], -[[7810]], -[[7811]], -[[7812]], -[[7813]], -[[7814]], -[[7815]], -[[7816]], -[[7817]], -[[7818]], -[[7819]], -[[7820]], -[[7821]], -[[7822]], -[[7823]], -[[7824]], -[[7825]], -[[7826]], -[[7827]], -[[7828]], -[[7829]], -[[7830]], -[[7831]], -[[7832]], -[[7833]], -[[7834]], -[[7835]], -[[7836]], -[[7837]], -[[7838]], -[[7839]], -[[7840]], -[[7841]], -[[7842]], -[[7843]], -[[7844]], -[[7845]], -[[7846]], -[[7847]], -[[7848]], -[[7849]], -[[7850]], -[[7851]], -[[7852]], -[[7853]], -[[7854]], -[[7855]], -[[7856]], -[[7857]], -[[7858]], -[[7859]], -[[7860]], -[[7861]], -[[7862]], -[[7863]], -[[7864]], -[[7865]], -[[7866]], -[[7867]], -[[7868]], -[[7869]], -[[7870]], -[[7871]], -[[7872]], -[[7873]], -[[7874]], -[[7875]], -[[7876]], -[[7877]], -[[7878]], -[[7879]], -[[7880]], -[[7881]], -[[7882]], -[[7883]], -[[7884]], -[[7885]], -[[7886]], -[[7887]], -[[7888]], -[[7889]], -[[7890]], -[[7891]], -[[7892]], -[[7893]], -[[7894]], -[[7895]], -[[7896]], -[[7897]], -[[7898]], -[[7899]], -[[7900]], -[[7901]], -[[7902]], -[[7903]], -[[7904]], -[[7905]], -[[7906]], -[[7907]], -[[7908]], -[[7909]], -[[7910]], -[[7911]], -[[7912]], -[[7913]], -[[7914]], -[[7915]], -[[7916]], -[[7917]], -[[7918]], -[[7919]], -[[7920]], -[[7921]], -[[7922]], -[[7923]], -[[7924]], -[[7925]], -[[7926]], -[[7927]], -[[7928]], -[[7929]], -[[7930]], -[[7931]], -[[7932]], -[[7933]], -[[7934]], -[[7935]], -[[7936]], -[[7937]], -[[7938]], -[[7939]], -[[7940]], -[[7941]], -[[7942]], -[[7943]], -[[7944]], -[[7945]], -[[7946]], -[[7947]], -[[7948]], -[[7949]], -[[7950]], -[[7951]], -[[7952]], -[[7953]], -[[7954]], -[[7955]], -[[7956]], -[[7957]], -[[7958]], -[[7959]], -[[7960]], -[[7961]], -[[7962]], -[[7963]], -[[7964]], -[[7965]], -[[7966]], -[[7967]], -[[7968]], -[[7969]], -[[7970]], -[[7971]], -[[7972]], -[[7973]], -[[7974]], -[[7975]], -[[7976]], -[[7977]], -[[7978]], -[[7979]], -[[7980]], -[[7981]], -[[7982]], -[[7983]], -[[7984]], -[[7985]], -[[7986]], -[[7987]], -[[7988]], -[[7989]], -[[7990]], -[[7991]], -[[7992]], -[[7993]], -[[7994]], -[[7995]], -[[7996]], -[[7997]], -[[7998]], -[[7999]], -[[8000]], -[[8001]], -[[8002]], -[[8003]], -[[8004]], -[[8005]], -[[8006]], -[[8007]], -[[8008]], -[[8009]], -[[8010]], -[[8011]], -[[8012]], -[[8013]], -[[8014]], -[[8015]], -[[8016]], -[[8017]], -[[8018]], -[[8019]], -[[8020]], -[[8021]], -[[8022]], -[[8023]], -[[8024]], -[[8025]], -[[8026]], -[[8027]], -[[8028]], -[[8029]], -[[8030]], -[[8031]], -[[8032]], -[[8033]], -[[8034]], -[[8035]], -[[8036]], -[[8037]], -[[8038]], -[[8039]], -[[8040]], -[[8041]], -[[8042]], -[[8043]], -[[8044]], -[[8045]], -[[8046]], -[[8047]], -[[8048]], -[[8049]], -[[8050]], -[[8051]], -[[8052]], -[[8053]], -[[8054]], -[[8055]], -[[8056]], -[[8057]], -[[8058]], -[[8059]], -[[8060]], -[[8061]], -[[8062]], -[[8063]], -[[8064]], -[[8065]], -[[8066]], -[[8067]], -[[8068]], -[[8069]], -[[8070]], -[[8071]], -[[8072]], -[[8073]], -[[8074]], -[[8075]], -[[8076]], -[[8077]], -[[8078]], -[[8079]], -[[8080]], -[[8081]], -[[8082]], -[[8083]], -[[8084]], -[[8085]], -[[8086]], -[[8087]], -[[8088]], -[[8089]], -[[8090]], -[[8091]], -[[8092]], -[[8093]], -[[8094]], -[[8095]], -[[8096]], -[[8097]], -[[8098]], -[[8099]], -[[8100]], -[[8101]], -[[8102]], -[[8103]], -[[8104]], -[[8105]], -[[8106]], -[[8107]], -[[8108]], -[[8109]], -[[8110]], -[[8111]], -[[8112]], -[[8113]], -[[8114]], -[[8115]], -[[8116]], -[[8117]], -[[8118]], -[[8119]], -[[8120]], -[[8121]], -[[8122]], -[[8123]], -[[8124]], -[[8125]], -[[8126]], -[[8127]], -[[8128]], -[[8129]], -[[8130]], -[[8131]], -[[8132]], -[[8133]], -[[8134]], -[[8135]], -[[8136]], -[[8137]], -[[8138]], -[[8139]], -[[8140]], -[[8141]], -[[8142]], -[[8143]], -[[8144]], -[[8145]], -[[8146]], -[[8147]], -[[8148]], -[[8149]], -[[8150]], -[[8151]], -[[8152]], -[[8153]], -[[8154]], -[[8155]], -[[8156]], -[[8157]], -[[8158]], -[[8159]], -[[8160]], -[[8161]], -[[8162]], -[[8163]], -[[8164]], -[[8165]], -[[8166]], -[[8167]], -[[8168]], -[[8169]], -[[8170]], -[[8171]], -[[8172]], -[[8173]], -[[8174]], -[[8175]], -[[8176]], -[[8177]], -[[8178]], -[[8179]], -[[8180]], -[[8181]], -[[8182]], -[[8183]], -[[8184]], -[[8185]], -[[8186]], -[[8187]], -[[8188]], -[[8189]], -[[8190]], -[[8191]], -[[8192]], -[[8193]], -[[8194]], -[[8195]], -[[8196]], -[[8197]], -[[8198]], -[[8199]], -[[8200]], -[[8201]], -[[8202]], -[[8203]], -[[8204]], -[[8205]], -[[8206]], -[[8207]], -[[8208]], -[[8209]], -[[8210]], -[[8211]], -[[8212]], -[[8213]], -[[8214]], -[[8215]], -[[8216]], -[[8217]], -[[8218]], -[[8219]], -[[8220]], -[[8221]], -[[8222]], -[[8223]], -[[8224]], -[[8225]], -[[8226]], -[[8227]], -[[8228]], -[[8229]], -[[8230]], -[[8231]], -[[8232]], -[[8233]], -[[8234]], -[[8235]], -[[8236]], -[[8237]], -[[8238]], -[[8239]], -[[8240]], -[[8241]], -[[8242]], -[[8243]], -[[8244]], -[[8245]], -[[8246]], -[[8247]], -[[8248]], -[[8249]], -[[8250]], -[[8251]], -[[8252]], -[[8253]], -[[8254]], -[[8255]], -[[8256]], -[[8257]], -[[8258]], -[[8259]], -[[8260]], -[[8261]], -[[8262]], -[[8263]], -[[8264]], -[[8265]], -[[8266]], -[[8267]], -[[8268]], -[[8269]], -[[8270]], -[[8271]], -[[8272]], -[[8273]], -[[8274]], -[[8275]], -[[8276]], -[[8277]], -[[8278]], -[[8279]], -[[8280]], -[[8281]], -[[8282]], -[[8283]], -[[8284]], -[[8285]], -[[8286]], -[[8287]], -[[8288]], -[[8289]], -[[8290]], -[[8291]], -[[8292]], -[[8293]], -[[8294]], -[[8295]], -[[8296]], -[[8297]], -[[8298]], -[[8299]], -[[8300]], -[[8301]], -[[8302]], -[[8303]], -[[8304]], -[[8305]], -[[8306]], -[[8307]], -[[8308]], -[[8309]], -[[8310]], -[[8311]], -[[8312]], -[[8313]], -[[8314]], -[[8315]], -[[8316]], -[[8317]], -[[8318]], -[[8319]], -[[8320]], -[[8321]], -[[8322]], -[[8323]], -[[8324]], -[[8325]], -[[8326]], -[[8327]], -[[8328]], -[[8329]], -[[8330]], -[[8331]], -[[8332]], -[[8333]], -[[8334]], -[[8335]], -[[8336]], -[[8337]], -[[8338]], -[[8339]], -[[8340]], -[[8341]], -[[8342]], -[[8343]], -[[8344]], -[[8345]], -[[8346]], -[[8347]], -[[8348]], -[[8349]], -[[8350]], -[[8351]], -[[8352]], -[[8353]], -[[8354]], -[[8355]], -[[8356]], -[[8357]], -[[8358]], -[[8359]], -[[8360]], -[[8361]], -[[8362]], -[[8363]], -[[8364]], -[[8365]], -[[8366]], -[[8367]], -[[8368]], -[[8369]], -[[8370]], -[[8371]], -[[8372]], -[[8373]], -[[8374]], -[[8375]], -[[8376]], -[[8377]], -[[8378]], -[[8379]], -[[8380]], -[[8381]], -[[8382]], -[[8383]], -[[8384]], -[[8385]], -[[8386]], -[[8387]], -[[8388]], -[[8389]], -[[8390]], -[[8391]], -[[8392]], -[[8393]], -[[8394]], -[[8395]], -[[8396]], -[[8397]], -[[8398]], -[[8399]], -[[8400]], -[[8401]], -[[8402]], -[[8403]], -[[8404]], -[[8405]], -[[8406]], -[[8407]], -[[8408]], -[[8409]], -[[8410]], -[[8411]], -[[8412]], -[[8413]], -[[8414]], -[[8415]], -[[8416]], -[[8417]], -[[8418]], -[[8419]], -[[8420]], -[[8421]], -[[8422]], -[[8423]], -[[8424]], -[[8425]], -[[8426]], -[[8427]], -[[8428]], -[[8429]], -[[8430]], -[[8431]], -[[8432]], -[[8433]], -[[8434]], -[[8435]], -[[8436]], -[[8437]], -[[8438]], -[[8439]], -[[8440]], -[[8441]], -[[8442]], -[[8443]], -[[8444]], -[[8445]], -[[8446]], -[[8447]], -[[8448]], -[[8449]], -[[8450]], -[[8451]], -[[8452]], -[[8453]], -[[8454]], -[[8455]], -[[8456]], -[[8457]], -[[8458]], -[[8459]], -[[8460]], -[[8461]], -[[8462]], -[[8463]], -[[8464]], -[[8465]], -[[8466]], -[[8467]], -[[8468]], -[[8469]], -[[8470]], -[[8471]], -[[8472]], -[[8473]], -[[8474]], -[[8475]], -[[8476]], -[[8477]], -[[8478]], -[[8479]], -[[8480]], -[[8481]], -[[8482]], -[[8483]], -[[8484]], -[[8485]], -[[8486]], -[[8487]], -[[8488]], -[[8489]], -[[8490]], -[[8491]], -[[8492]], -[[8493]], -[[8494]], -[[8495]], -[[8496]], -[[8497]], -[[8498]], -[[8499]], -[[8500]], -[[8501]], -[[8502]], -[[8503]], -[[8504]], -[[8505]], -[[8506]], -[[8507]], -[[8508]], -[[8509]], -[[8510]], -[[8511]], -[[8512]], -[[8513]], -[[8514]], -[[8515]], -[[8516]], -[[8517]], -[[8518]], -[[8519]], -[[8520]], -[[8521]], -[[8522]], -[[8523]], -[[8524]], -[[8525]], -[[8526]], -[[8527]], -[[8528]], -[[8529]], -[[8530]], -[[8531]], -[[8532]], -[[8533]], -[[8534]], -[[8535]], -[[8536]], -[[8537]], -[[8538]], -[[8539]], -[[8540]], -[[8541]], -[[8542]], -[[8543]], -[[8544]], -[[8545]], -[[8546]], -[[8547]], -[[8548]], -[[8549]], -[[8550]], -[[8551]], -[[8552]], -[[8553]], -[[8554]], -[[8555]], -[[8556]], -[[8557]], -[[8558]], -[[8559]], -[[8560]], -[[8561]], -[[8562]], -[[8563]], -[[8564]], -[[8565]], -[[8566]], -[[8567]], -[[8568]], -[[8569]], -[[8570]], -[[8571]], -[[8572]], -[[8573]], -[[8574]], -[[8575]], -[[8576]], -[[8577]], -[[8578]], -[[8579]], -[[8580]], -[[8581]], -[[8582]], -[[8583]], -[[8584]], -[[8585]], -[[8586]], -[[8587]], -[[8588]], -[[8589]], -[[8590]], -[[8591]], -[[8592]], -[[8593]], -[[8594]], -[[8595]], -[[8596]], -[[8597]], -[[8598]], -[[8599]], -[[8600]], -[[8601]], -[[8602]], -[[8603]], -[[8604]], -[[8605]], -[[8606]], -[[8607]], -[[8608]], -[[8609]], -[[8610]], -[[8611]], -[[8612]], -[[8613]], -[[8614]], -[[8615]], -[[8616]], -[[8617]], -[[8618]], -[[8619]], -[[8620]], -[[8621]], -[[8622]], -[[8623]], -[[8624]], -[[8625]], -[[8626]], -[[8627]], -[[8628]], -[[8629]], -[[8630]], -[[8631]], -[[8632]], -[[8633]], -[[8634]], -[[8635]], -[[8636]], -[[8637]], -[[8638]], -[[8639]], -[[8640]], -[[8641]], -[[8642]], -[[8643]], -[[8644]], -[[8645]], -[[8646]], -[[8647]], -[[8648]], -[[8649]], -[[8650]], -[[8651]], -[[8652]], -[[8653]], -[[8654]], -[[8655]], -[[8656]], -[[8657]], -[[8658]], -[[8659]], -[[8660]], -[[8661]], -[[8662]], -[[8663]], -[[8664]], -[[8665]], -[[8666]], -[[8667]], -[[8668]], -[[8669]], -[[8670]], -[[8671]], -[[8672]], -[[8673]], -[[8674]], -[[8675]], -[[8676]], -[[8677]], -[[8678]], -[[8679]], -[[8680]], -[[8681]], -[[8682]], -[[8683]], -[[8684]], -[[8685]], -[[8686]], -[[8687]], -[[8688]], -[[8689]], -[[8690]], -[[8691]], -[[8692]], -[[8693]], -[[8694]], -[[8695]], -[[8696]], -[[8697]], -[[8698]], -[[8699]], -[[8700]], -[[8701]], -[[8702]], -[[8703]], -[[8704]], -[[8705]], -[[8706]], -[[8707]], -[[8708]], -[[8709]], -[[8710]], -[[8711]], -[[8712]], -[[8713]], -[[8714]], -[[8715]], -[[8716]], -[[8717]], -[[8718]], -[[8719]], -[[8720]], -[[8721]], -[[8722]], -[[8723]], -[[8724]], -[[8725]], -[[8726]], -[[8727]], -[[8728]], -[[8729]], -[[8730]], -[[8731]], -[[8732]], -[[8733]], -[[8734]], -[[8735]], -[[8736]], -[[8737]], -[[8738]], -[[8739]], -[[8740]], -[[8741]], -[[8742]], -[[8743]], -[[8744]], -[[8745]], -[[8746]], -[[8747]], -[[8748]], -[[8749]], -[[8750]], -[[8751]], -[[8752]], -[[8753]], -[[8754]], -[[8755]], -[[8756]], -[[8757]], -[[8758]], -[[8759]], -[[8760]], -[[8761]], -[[8762]], -[[8763]], -[[8764]], -[[8765]], -[[8766]], -[[8767]], -[[8768]], -[[8769]], -[[8770]], -[[8771]], -[[8772]], -[[8773]], -[[8774]], -[[8775]], -[[8776]], -[[8777]], -[[8778]], -[[8779]], -[[8780]], -[[8781]], -[[8782]], -[[8783]], -[[8784]], -[[8785]], -[[8786]], -[[8787]], -[[8788]], -[[8789]], -[[8790]], -[[8791]], -[[8792]], -[[8793]], -[[8794]], -[[8795]], -[[8796]], -[[8797]], -[[8798]], -[[8799]], -[[8800]], -[[8801]], -[[8802]], -[[8803]], -[[8804]], -[[8805]], -[[8806]], -[[8807]], -[[8808]], -[[8809]], -[[8810]], -[[8811]], -[[8812]], -[[8813]], -[[8814]], -[[8815]], -[[8816]], -[[8817]], -[[8818]], -[[8819]], -[[8820]], -[[8821]], -[[8822]], -[[8823]], -[[8824]], -[[8825]], -[[8826]], -[[8827]], -[[8828]], -[[8829]], -[[8830]], -[[8831]], -[[8832]], -[[8833]], -[[8834]], -[[8835]], -[[8836]], -[[8837]], -[[8838]], -[[8839]], -[[8840]], -[[8841]], -[[8842]], -[[8843]], -[[8844]], -[[8845]], -[[8846]], -[[8847]], -[[8848]], -[[8849]], -[[8850]], -[[8851]], -[[8852]], -[[8853]], -[[8854]], -[[8855]], -[[8856]], -[[8857]], -[[8858]], -[[8859]], -[[8860]], -[[8861]], -[[8862]], -[[8863]], -[[8864]], -[[8865]], -[[8866]], -[[8867]], -[[8868]], -[[8869]], -[[8870]], -[[8871]], -[[8872]], -[[8873]], -[[8874]], -[[8875]], -[[8876]], -[[8877]], -[[8878]], -[[8879]], -[[8880]], -[[8881]], -[[8882]], -[[8883]], -[[8884]], -[[8885]], -[[8886]], -[[8887]], -[[8888]], -[[8889]], -[[8890]], -[[8891]], -[[8892]], -[[8893]], -[[8894]], -[[8895]], -[[8896]], -[[8897]], -[[8898]], -[[8899]], -[[8900]], -[[8901]], -[[8902]], -[[8903]], -[[8904]], -[[8905]], -[[8906]], -[[8907]], -[[8908]], -[[8909]], -[[8910]], -[[8911]], -[[8912]], -[[8913]], -[[8914]], -[[8915]], -[[8916]], -[[8917]], -[[8918]], -[[8919]], -[[8920]], -[[8921]], -[[8922]], -[[8923]], -[[8924]], -[[8925]], -[[8926]], -[[8927]], -[[8928]], -[[8929]], -[[8930]], -[[8931]], -[[8932]], -[[8933]], -[[8934]], -[[8935]], -[[8936]], -[[8937]], -[[8938]], -[[8939]], -[[8940]], -[[8941]], -[[8942]], -[[8943]], -[[8944]], -[[8945]], -[[8946]], -[[8947]], -[[8948]], -[[8949]], -[[8950]], -[[8951]], -[[8952]], -[[8953]], -[[8954]], -[[8955]], -[[8956]], -[[8957]], -[[8958]], -[[8959]], -[[8960]], -[[8961]], -[[8962]], -[[8963]], -[[8964]], -[[8965]], -[[8966]], -[[8967]], -[[8968]], -[[8969]], -[[8970]], -[[8971]], -[[8972]], -[[8973]], -[[8974]], -[[8975]], -[[8976]], -[[8977]], -[[8978]], -[[8979]], -[[8980]], -[[8981]], -[[8982]], -[[8983]], -[[8984]], -[[8985]], -[[8986]], -[[8987]], -[[8988]], -[[8989]], -[[8990]], -[[8991]], -[[8992]], -[[8993]], -[[8994]], -[[8995]], -[[8996]], -[[8997]], -[[8998]], -[[8999]], -[[9000]], -[[9001]], -[[9002]], -[[9003]], -[[9004]], -[[9005]], -[[9006]], -[[9007]], -[[9008]], -[[9009]], -[[9010]], -[[9011]], -[[9012]], -[[9013]], -[[9014]], -[[9015]], -[[9016]], -[[9017]], -[[9018]], -[[9019]], -[[9020]], -[[9021]], -[[9022]], -[[9023]], -[[9024]], -[[9025]], -[[9026]], -[[9027]], -[[9028]], -[[9029]], -[[9030]], -[[9031]], -[[9032]], -[[9033]], -[[9034]], -[[9035]], -[[9036]], -[[9037]], -[[9038]], -[[9039]], -[[9040]], -[[9041]], -[[9042]], -[[9043]], -[[9044]], -[[9045]], -[[9046]], -[[9047]], -[[9048]], -[[9049]], -[[9050]], -[[9051]], -[[9052]], -[[9053]], -[[9054]], -[[9055]], -[[9056]], -[[9057]], -[[9058]], -[[9059]], -[[9060]], -[[9061]], -[[9062]], -[[9063]], -[[9064]], -[[9065]], -[[9066]], -[[9067]], -[[9068]], -[[9069]], -[[9070]], -[[9071]], -[[9072]], -[[9073]], -[[9074]], -[[9075]], -[[9076]], -[[9077]], -[[9078]], -[[9079]], -[[9080]], -[[9081]], -[[9082]], -[[9083]], -[[9084]], -[[9085]], -[[9086]], -[[9087]], -[[9088]], -[[9089]], -[[9090]], -[[9091]], -[[9092]], -[[9093]], -[[9094]], -[[9095]], -[[9096]], -[[9097]], -[[9098]], -[[9099]], -[[9100]], -[[9101]], -[[9102]], -[[9103]], -[[9104]], -[[9105]], -[[9106]], -[[9107]], -[[9108]], -[[9109]], -[[9110]], -[[9111]], -[[9112]], -[[9113]], -[[9114]], -[[9115]], -[[9116]], -[[9117]], -[[9118]], -[[9119]], -[[9120]], -[[9121]], -[[9122]], -[[9123]], -[[9124]], -[[9125]], -[[9126]], -[[9127]], -[[9128]], -[[9129]], -[[9130]], -[[9131]], -[[9132]], -[[9133]], -[[9134]], -[[9135]], -[[9136]], -[[9137]], -[[9138]], -[[9139]], -[[9140]], -[[9141]], -[[9142]], -[[9143]], -[[9144]], -[[9145]], -[[9146]], -[[9147]], -[[9148]], -[[9149]], -[[9150]], -[[9151]], -[[9152]], -[[9153]], -[[9154]], -[[9155]], -[[9156]], -[[9157]], -[[9158]], -[[9159]], -[[9160]], -[[9161]], -[[9162]], -[[9163]], -[[9164]], -[[9165]], -[[9166]], -[[9167]], -[[9168]], -[[9169]], -[[9170]], -[[9171]], -[[9172]], -[[9173]], -[[9174]], -[[9175]], -[[9176]], -[[9177]], -[[9178]], -[[9179]], -[[9180]], -[[9181]], -[[9182]], -[[9183]], -[[9184]], -[[9185]], -[[9186]], -[[9187]], -[[9188]], -[[9189]], -[[9190]], -[[9191]], -[[9192]], -[[9193]], -[[9194]], -[[9195]], -[[9196]], -[[9197]], -[[9198]], -[[9199]], -[[9200]], -[[9201]], -[[9202]], -[[9203]], -[[9204]], -[[9205]], -[[9206]], -[[9207]], -[[9208]], -[[9209]], -[[9210]], -[[9211]], -[[9212]], -[[9213]], -[[9214]], -[[9215]], -[[9216]], -[[9217]], -[[9218]], -[[9219]], -[[9220]], -[[9221]], -[[9222]], -[[9223]], -[[9224]], -[[9225]], -[[9226]], -[[9227]], -[[9228]], -[[9229]], -[[9230]], -[[9231]], -[[9232]], -[[9233]], -[[9234]], -[[9235]], -[[9236]], -[[9237]], -[[9238]], -[[9239]], -[[9240]], -[[9241]], -[[9242]], -[[9243]], -[[9244]], -[[9245]], -[[9246]], -[[9247]], -[[9248]], -[[9249]], -[[9250]], -[[9251]], -[[9252]], -[[9253]], -[[9254]], -[[9255]], -[[9256]], -[[9257]], -[[9258]], -[[9259]], -[[9260]], -[[9261]], -[[9262]], -[[9263]], -[[9264]], -[[9265]], -[[9266]], -[[9267]], -[[9268]], -[[9269]], -[[9270]], -[[9271]], -[[9272]], -[[9273]], -[[9274]], -[[9275]], -[[9276]], -[[9277]], -[[9278]], -[[9279]], -[[9280]], -[[9281]], -[[9282]], -[[9283]], -[[9284]], -[[9285]], -[[9286]], -[[9287]], -[[9288]], -[[9289]], -[[9290]], -[[9291]], -[[9292]], -[[9293]], -[[9294]], -[[9295]], -[[9296]], -[[9297]], -[[9298]], -[[9299]], -[[9300]], -[[9301]], -[[9302]], -[[9303]], -[[9304]], -[[9305]], -[[9306]], -[[9307]], -[[9308]], -[[9309]], -[[9310]], -[[9311]], -[[9312]], -[[9313]], -[[9314]], -[[9315]], -[[9316]], -[[9317]], -[[9318]], -[[9319]], -[[9320]], -[[9321]], -[[9322]], -[[9323]], -[[9324]], -[[9325]], -[[9326]], -[[9327]], -[[9328]], -[[9329]], -[[9330]], -[[9331]], -[[9332]], -[[9333]], -[[9334]], -[[9335]], -[[9336]], -[[9337]], -[[9338]], -[[9339]], -[[9340]], -[[9341]], -[[9342]], -[[9343]], -[[9344]], -[[9345]], -[[9346]], -[[9347]], -[[9348]], -[[9349]], -[[9350]], -[[9351]], -[[9352]], -[[9353]], -[[9354]], -[[9355]], -[[9356]], -[[9357]], -[[9358]], -[[9359]], -[[9360]], -[[9361]], -[[9362]], -[[9363]], -[[9364]], -[[9365]], -[[9366]], -[[9367]], -[[9368]], -[[9369]], -[[9370]], -[[9371]], -[[9372]], -[[9373]], -[[9374]], -[[9375]], -[[9376]], -[[9377]], -[[9378]], -[[9379]], -[[9380]], -[[9381]], -[[9382]], -[[9383]], -[[9384]], -[[9385]], -[[9386]], -[[9387]], -[[9388]], -[[9389]], -[[9390]], -[[9391]], -[[9392]], -[[9393]], -[[9394]], -[[9395]], -[[9396]], -[[9397]], -[[9398]], -[[9399]], -[[9400]], -[[9401]], -[[9402]], -[[9403]], -[[9404]], -[[9405]], -[[9406]], -[[9407]], -[[9408]], -[[9409]], -[[9410]], -[[9411]], -[[9412]], -[[9413]], -[[9414]], -[[9415]], -[[9416]], -[[9417]], -[[9418]], -[[9419]], -[[9420]], -[[9421]], -[[9422]], -[[9423]], -[[9424]], -[[9425]], -[[9426]], -[[9427]], -[[9428]], -[[9429]], -[[9430]], -[[9431]], -[[9432]], -[[9433]], -[[9434]], -[[9435]], -[[9436]], -[[9437]], -[[9438]], -[[9439]], -[[9440]], -[[9441]], -[[9442]], -[[9443]], -[[9444]], -[[9445]], -[[9446]], -[[9447]], -[[9448]], -[[9449]], -[[9450]], -[[9451]], -[[9452]], -[[9453]], -[[9454]], -[[9455]], -[[9456]], -[[9457]], -[[9458]], -[[9459]], -[[9460]], -[[9461]], -[[9462]], -[[9463]], -[[9464]], -[[9465]], -[[9466]], -[[9467]], -[[9468]], -[[9469]], -[[9470]], -[[9471]], -[[9472]], -[[9473]], -[[9474]], -[[9475]], -[[9476]], -[[9477]], -[[9478]], -[[9479]], -[[9480]], -[[9481]], -[[9482]], -[[9483]], -[[9484]], -[[9485]], -[[9486]], -[[9487]], -[[9488]], -[[9489]], -[[9490]], -[[9491]], -[[9492]], -[[9493]], -[[9494]], -[[9495]], -[[9496]], -[[9497]], -[[9498]], -[[9499]], -[[9500]], -[[9501]], -[[9502]], -[[9503]], -[[9504]], -[[9505]], -[[9506]], -[[9507]], -[[9508]], -[[9509]], -[[9510]], -[[9511]], -[[9512]], -[[9513]], -[[9514]], -[[9515]], -[[9516]], -[[9517]], -[[9518]], -[[9519]], -[[9520]], -[[9521]], -[[9522]], -[[9523]], -[[9524]], -[[9525]], -[[9526]], -[[9527]], -[[9528]], -[[9529]], -[[9530]], -[[9531]], -[[9532]], -[[9533]], -[[9534]], -[[9535]], -[[9536]], -[[9537]], -[[9538]], -[[9539]], -[[9540]], -[[9541]], -[[9542]], -[[9543]], -[[9544]], -[[9545]], -[[9546]], -[[9547]], -[[9548]], -[[9549]], -[[9550]], -[[9551]], -[[9552]], -[[9553]], -[[9554]], -[[9555]], -[[9556]], -[[9557]], -[[9558]], -[[9559]], -[[9560]], -[[9561]], -[[9562]], -[[9563]], -[[9564]], -[[9565]], -[[9566]], -[[9567]], -[[9568]], -[[9569]], -[[9570]], -[[9571]], -[[9572]], -[[9573]], -[[9574]], -[[9575]], -[[9576]], -[[9577]], -[[9578]], -[[9579]], -[[9580]], -[[9581]], -[[9582]], -[[9583]], -[[9584]], -[[9585]], -[[9586]], -[[9587]], -[[9588]], -[[9589]], -[[9590]], -[[9591]], -[[9592]], -[[9593]], -[[9594]], -[[9595]], -[[9596]], -[[9597]], -[[9598]], -[[9599]], -[[9600]], -[[9601]], -[[9602]], -[[9603]], -[[9604]], -[[9605]], -[[9606]], -[[9607]], -[[9608]], -[[9609]], -[[9610]], -[[9611]], -[[9612]], -[[9613]], -[[9614]], -[[9615]], -[[9616]], -[[9617]], -[[9618]], -[[9619]], -[[9620]], -[[9621]], -[[9622]], -[[9623]], -[[9624]], -[[9625]], -[[9626]], -[[9627]], -[[9628]], -[[9629]], -[[9630]], -[[9631]], -[[9632]], -[[9633]], -[[9634]], -[[9635]], -[[9636]], -[[9637]], -[[9638]], -[[9639]], -[[9640]], -[[9641]], -[[9642]], -[[9643]], -[[9644]], -[[9645]], -[[9646]], -[[9647]], -[[9648]], -[[9649]], -[[9650]], -[[9651]], -[[9652]], -[[9653]], -[[9654]], -[[9655]], -[[9656]], -[[9657]], -[[9658]], -[[9659]], -[[9660]], -[[9661]], -[[9662]], -[[9663]], -[[9664]], -[[9665]], -[[9666]], -[[9667]], -[[9668]], -[[9669]], -[[9670]], -[[9671]], -[[9672]], -[[9673]], -[[9674]], -[[9675]], -[[9676]], -[[9677]], -[[9678]], -[[9679]], -[[9680]], -[[9681]], -[[9682]], -[[9683]], -[[9684]], -[[9685]], -[[9686]], -[[9687]], -[[9688]], -[[9689]], -[[9690]], -[[9691]], -[[9692]], -[[9693]], -[[9694]], -[[9695]], -[[9696]], -[[9697]], -[[9698]], -[[9699]], -[[9700]], -[[9701]], -[[9702]], -[[9703]], -[[9704]], -[[9705]], -[[9706]], -[[9707]], -[[9708]], -[[9709]], -[[9710]], -[[9711]], -[[9712]], -[[9713]], -[[9714]], -[[9715]], -[[9716]], -[[9717]], -[[9718]], -[[9719]], -[[9720]], -[[9721]], -[[9722]], -[[9723]], -[[9724]], -[[9725]], -[[9726]], -[[9727]], -[[9728]], -[[9729]], -[[9730]], -[[9731]], -[[9732]], -[[9733]], -[[9734]], -[[9735]], -[[9736]], -[[9737]], -[[9738]], -[[9739]], -[[9740]], -[[9741]], -[[9742]], -[[9743]], -[[9744]], -[[9745]], -[[9746]], -[[9747]], -[[9748]], -[[9749]], -[[9750]], -[[9751]], -[[9752]], -[[9753]], -[[9754]], -[[9755]], -[[9756]], -[[9757]], -[[9758]], -[[9759]], -[[9760]], -[[9761]], -[[9762]], -[[9763]], -[[9764]], -[[9765]], -[[9766]], -[[9767]], -[[9768]], -[[9769]], -[[9770]], -[[9771]], -[[9772]], -[[9773]], -[[9774]], -[[9775]], -[[9776]], -[[9777]], -[[9778]], -[[9779]], -[[9780]], -[[9781]], -[[9782]], -[[9783]], -[[9784]], -[[9785]], -[[9786]], -[[9787]], -[[9788]], -[[9789]], -[[9790]], -[[9791]], -[[9792]], -[[9793]], -[[9794]], -[[9795]], -[[9796]], -[[9797]], -[[9798]], -[[9799]], -[[9800]], -[[9801]], -[[9802]], -[[9803]], -[[9804]], -[[9805]], -[[9806]], -[[9807]], -[[9808]], -[[9809]], -[[9810]], -[[9811]], -[[9812]], -[[9813]], -[[9814]], -[[9815]], -[[9816]], -[[9817]], -[[9818]], -[[9819]], -[[9820]], -[[9821]], -[[9822]], -[[9823]], -[[9824]], -[[9825]], -[[9826]], -[[9827]], -[[9828]], -[[9829]], -[[9830]], -[[9831]], -[[9832]], -[[9833]], -[[9834]], -[[9835]], -[[9836]], -[[9837]], -[[9838]], -[[9839]], -[[9840]], -[[9841]], -[[9842]], -[[9843]], -[[9844]], -[[9845]], -[[9846]], -[[9847]], -[[9848]], -[[9849]], -[[9850]], -[[9851]], -[[9852]], -[[9853]], -[[9854]], -[[9855]], -[[9856]], -[[9857]], -[[9858]], -[[9859]], -[[9860]], -[[9861]], -[[9862]], -[[9863]], -[[9864]], -[[9865]], -[[9866]], -[[9867]], -[[9868]], -[[9869]], -[[9870]], -[[9871]], -[[9872]], -[[9873]], -[[9874]], -[[9875]], -[[9876]], -[[9877]], -[[9878]], -[[9879]], -[[9880]], -[[9881]], -[[9882]], -[[9883]], -[[9884]], -[[9885]], -[[9886]], -[[9887]], -[[9888]], -[[9889]], -[[9890]], -[[9891]], -[[9892]], -[[9893]], -[[9894]], -[[9895]], -[[9896]], -[[9897]], -[[9898]], -[[9899]], -[[9900]], -[[9901]], -[[9902]], -[[9903]], -[[9904]], -[[9905]], -[[9906]], -[[9907]], -[[9908]], -[[9909]], -[[9910]], -[[9911]], -[[9912]], -[[9913]], -[[9914]], -[[9915]], -[[9916]], -[[9917]], -[[9918]], -[[9919]], -[[9920]], -[[9921]], -[[9922]], -[[9923]], -[[9924]], -[[9925]], -[[9926]], -[[9927]], -[[9928]], -[[9929]], -[[9930]], -[[9931]], -[[9932]], -[[9933]], -[[9934]], -[[9935]], -[[9936]], -[[9937]], -[[9938]], -[[9939]], -[[9940]], -[[9941]], -[[9942]], -[[9943]], -[[9944]], -[[9945]], -[[9946]], -[[9947]], -[[9948]], -[[9949]], -[[9950]], -[[9951]], -[[9952]], -[[9953]], -[[9954]], -[[9955]], -[[9956]], -[[9957]], -[[9958]], -[[9959]], -[[9960]], -[[9961]], -[[9962]], -[[9963]], -[[9964]], -[[9965]], -[[9966]], -[[9967]], -[[9968]], -[[9969]], -[[9970]], -[[9971]], -[[9972]], -[[9973]], -[[9974]], -[[9975]], -[[9976]], -[[9977]], -[[9978]], -[[9979]], -[[9980]], -[[9981]], -[[9982]], -[[9983]], -[[9984]], -[[9985]], -[[9986]], -[[9987]], -[[9988]], -[[9989]], -[[9990]], -[[9991]], -[[9992]], -[[9993]], -[[9994]], -[[9995]], -[[9996]], -[[9997]], -[[9998]], -[[9999]], -]; - -confuse(x) { - try { throw x; } catch (e) { return e; } -} - -main() { - if (!identical(confuse(list1), confuse(list2))) { - throw new Exception("list1 !== list2"); - } -} diff --git a/tests/language_2/canonicalize/hashing_shallow_collision_instance_2_test.dart b/tests/language_2/canonicalize/hashing_shallow_collision_instance_2_test.dart deleted file mode 100644 index 73f492244b1..00000000000 --- a/tests/language_2/canonicalize/hashing_shallow_collision_instance_2_test.dart +++ /dev/null @@ -1,20036 +0,0 @@ -// 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. - -// @dart = 2.9 - -// If canonicalization hashes with only a field's cid, this will exhibit -// quadratic time. - -class Box { - final Object a; - final Object b; - const Box(this.a, this.b); -} - -// 10,000 elements. -const list1 = [ - Box(0, 0), - Box(1, 1), - Box(2, 2), - Box(3, 3), - Box(4, 4), - Box(5, 5), - Box(6, 6), - Box(7, 7), - Box(8, 8), - Box(9, 9), - Box(10, 10), - Box(11, 11), - Box(12, 12), - Box(13, 13), - Box(14, 14), - Box(15, 15), - Box(16, 16), - Box(17, 17), - Box(18, 18), - Box(19, 19), - Box(20, 20), - Box(21, 21), - Box(22, 22), - Box(23, 23), - Box(24, 24), - Box(25, 25), - Box(26, 26), - Box(27, 27), - Box(28, 28), - Box(29, 29), - Box(30, 30), - Box(31, 31), - Box(32, 32), - Box(33, 33), - Box(34, 34), - Box(35, 35), - Box(36, 36), - Box(37, 37), - Box(38, 38), - Box(39, 39), - Box(40, 40), - Box(41, 41), - Box(42, 42), - Box(43, 43), - Box(44, 44), - Box(45, 45), - Box(46, 46), - Box(47, 47), - Box(48, 48), - Box(49, 49), - Box(50, 50), - Box(51, 51), - Box(52, 52), - Box(53, 53), - Box(54, 54), - Box(55, 55), - Box(56, 56), - Box(57, 57), - Box(58, 58), - Box(59, 59), - Box(60, 60), - Box(61, 61), - Box(62, 62), - Box(63, 63), - Box(64, 64), - Box(65, 65), - Box(66, 66), - Box(67, 67), - Box(68, 68), - Box(69, 69), - Box(70, 70), - Box(71, 71), - Box(72, 72), - Box(73, 73), - Box(74, 74), - Box(75, 75), - Box(76, 76), - Box(77, 77), - Box(78, 78), - Box(79, 79), - Box(80, 80), - Box(81, 81), - Box(82, 82), - Box(83, 83), - Box(84, 84), - Box(85, 85), - Box(86, 86), - Box(87, 87), - Box(88, 88), - Box(89, 89), - Box(90, 90), - Box(91, 91), - Box(92, 92), - Box(93, 93), - Box(94, 94), - Box(95, 95), - Box(96, 96), - Box(97, 97), - Box(98, 98), - Box(99, 99), - Box(100, 100), - Box(101, 101), - Box(102, 102), - Box(103, 103), - Box(104, 104), - Box(105, 105), - Box(106, 106), - Box(107, 107), - Box(108, 108), - Box(109, 109), - Box(110, 110), - Box(111, 111), - Box(112, 112), - Box(113, 113), - Box(114, 114), - Box(115, 115), - Box(116, 116), - Box(117, 117), - Box(118, 118), - Box(119, 119), - Box(120, 120), - Box(121, 121), - Box(122, 122), - Box(123, 123), - Box(124, 124), - Box(125, 125), - Box(126, 126), - Box(127, 127), - Box(128, 128), - Box(129, 129), - Box(130, 130), - Box(131, 131), - Box(132, 132), - Box(133, 133), - Box(134, 134), - Box(135, 135), - Box(136, 136), - Box(137, 137), - Box(138, 138), - Box(139, 139), - Box(140, 140), - Box(141, 141), - Box(142, 142), - Box(143, 143), - Box(144, 144), - Box(145, 145), - Box(146, 146), - Box(147, 147), - Box(148, 148), - Box(149, 149), - Box(150, 150), - Box(151, 151), - Box(152, 152), - Box(153, 153), - Box(154, 154), - Box(155, 155), - Box(156, 156), - Box(157, 157), - Box(158, 158), - Box(159, 159), - Box(160, 160), - Box(161, 161), - Box(162, 162), - Box(163, 163), - Box(164, 164), - Box(165, 165), - Box(166, 166), - Box(167, 167), - Box(168, 168), - Box(169, 169), - Box(170, 170), - Box(171, 171), - Box(172, 172), - Box(173, 173), - Box(174, 174), - Box(175, 175), - Box(176, 176), - Box(177, 177), - Box(178, 178), - Box(179, 179), - Box(180, 180), - Box(181, 181), - Box(182, 182), - Box(183, 183), - Box(184, 184), - Box(185, 185), - Box(186, 186), - Box(187, 187), - Box(188, 188), - Box(189, 189), - Box(190, 190), - Box(191, 191), - Box(192, 192), - Box(193, 193), - Box(194, 194), - Box(195, 195), - Box(196, 196), - Box(197, 197), - Box(198, 198), - Box(199, 199), - Box(200, 200), - Box(201, 201), - Box(202, 202), - Box(203, 203), - Box(204, 204), - Box(205, 205), - Box(206, 206), - Box(207, 207), - Box(208, 208), - Box(209, 209), - Box(210, 210), - Box(211, 211), - Box(212, 212), - Box(213, 213), - Box(214, 214), - Box(215, 215), - Box(216, 216), - Box(217, 217), - Box(218, 218), - Box(219, 219), - Box(220, 220), - Box(221, 221), - Box(222, 222), - Box(223, 223), - Box(224, 224), - Box(225, 225), - Box(226, 226), - Box(227, 227), - Box(228, 228), - Box(229, 229), - Box(230, 230), - Box(231, 231), - Box(232, 232), - Box(233, 233), - Box(234, 234), - Box(235, 235), - Box(236, 236), - Box(237, 237), - Box(238, 238), - Box(239, 239), - Box(240, 240), - Box(241, 241), - Box(242, 242), - Box(243, 243), - Box(244, 244), - Box(245, 245), - Box(246, 246), - Box(247, 247), - Box(248, 248), - Box(249, 249), - Box(250, 250), - Box(251, 251), - Box(252, 252), - Box(253, 253), - Box(254, 254), - Box(255, 255), - Box(256, 256), - Box(257, 257), - Box(258, 258), - Box(259, 259), - Box(260, 260), - Box(261, 261), - Box(262, 262), - Box(263, 263), - Box(264, 264), - Box(265, 265), - Box(266, 266), - Box(267, 267), - Box(268, 268), - Box(269, 269), - Box(270, 270), - Box(271, 271), - Box(272, 272), - Box(273, 273), - Box(274, 274), - Box(275, 275), - Box(276, 276), - Box(277, 277), - Box(278, 278), - Box(279, 279), - Box(280, 280), - Box(281, 281), - Box(282, 282), - Box(283, 283), - Box(284, 284), - Box(285, 285), - Box(286, 286), - Box(287, 287), - Box(288, 288), - Box(289, 289), - Box(290, 290), - Box(291, 291), - Box(292, 292), - Box(293, 293), - Box(294, 294), - Box(295, 295), - Box(296, 296), - Box(297, 297), - Box(298, 298), - Box(299, 299), - Box(300, 300), - Box(301, 301), - Box(302, 302), - Box(303, 303), - Box(304, 304), - Box(305, 305), - Box(306, 306), - Box(307, 307), - Box(308, 308), - Box(309, 309), - Box(310, 310), - Box(311, 311), - Box(312, 312), - Box(313, 313), - Box(314, 314), - Box(315, 315), - Box(316, 316), - Box(317, 317), - Box(318, 318), - Box(319, 319), - Box(320, 320), - Box(321, 321), - Box(322, 322), - Box(323, 323), - Box(324, 324), - Box(325, 325), - Box(326, 326), - Box(327, 327), - Box(328, 328), - Box(329, 329), - Box(330, 330), - Box(331, 331), - Box(332, 332), - Box(333, 333), - Box(334, 334), - Box(335, 335), - Box(336, 336), - Box(337, 337), - Box(338, 338), - Box(339, 339), - Box(340, 340), - Box(341, 341), - Box(342, 342), - Box(343, 343), - Box(344, 344), - Box(345, 345), - Box(346, 346), - Box(347, 347), - Box(348, 348), - Box(349, 349), - Box(350, 350), - Box(351, 351), - Box(352, 352), - Box(353, 353), - Box(354, 354), - Box(355, 355), - Box(356, 356), - Box(357, 357), - Box(358, 358), - Box(359, 359), - Box(360, 360), - Box(361, 361), - Box(362, 362), - Box(363, 363), - Box(364, 364), - Box(365, 365), - Box(366, 366), - Box(367, 367), - Box(368, 368), - Box(369, 369), - Box(370, 370), - Box(371, 371), - Box(372, 372), - Box(373, 373), - Box(374, 374), - Box(375, 375), - Box(376, 376), - Box(377, 377), - Box(378, 378), - Box(379, 379), - Box(380, 380), - Box(381, 381), - Box(382, 382), - Box(383, 383), - Box(384, 384), - Box(385, 385), - Box(386, 386), - Box(387, 387), - Box(388, 388), - Box(389, 389), - Box(390, 390), - Box(391, 391), - Box(392, 392), - Box(393, 393), - Box(394, 394), - Box(395, 395), - Box(396, 396), - Box(397, 397), - Box(398, 398), - Box(399, 399), - Box(400, 400), - Box(401, 401), - Box(402, 402), - Box(403, 403), - Box(404, 404), - Box(405, 405), - Box(406, 406), - Box(407, 407), - Box(408, 408), - Box(409, 409), - Box(410, 410), - Box(411, 411), - Box(412, 412), - Box(413, 413), - Box(414, 414), - Box(415, 415), - Box(416, 416), - Box(417, 417), - Box(418, 418), - Box(419, 419), - Box(420, 420), - Box(421, 421), - Box(422, 422), - Box(423, 423), - Box(424, 424), - Box(425, 425), - Box(426, 426), - Box(427, 427), - Box(428, 428), - Box(429, 429), - Box(430, 430), - Box(431, 431), - Box(432, 432), - Box(433, 433), - Box(434, 434), - Box(435, 435), - Box(436, 436), - Box(437, 437), - Box(438, 438), - Box(439, 439), - Box(440, 440), - Box(441, 441), - Box(442, 442), - Box(443, 443), - Box(444, 444), - Box(445, 445), - Box(446, 446), - Box(447, 447), - Box(448, 448), - Box(449, 449), - Box(450, 450), - Box(451, 451), - Box(452, 452), - Box(453, 453), - Box(454, 454), - Box(455, 455), - Box(456, 456), - Box(457, 457), - Box(458, 458), - Box(459, 459), - Box(460, 460), - Box(461, 461), - Box(462, 462), - Box(463, 463), - Box(464, 464), - Box(465, 465), - Box(466, 466), - Box(467, 467), - Box(468, 468), - Box(469, 469), - Box(470, 470), - Box(471, 471), - Box(472, 472), - Box(473, 473), - Box(474, 474), - Box(475, 475), - Box(476, 476), - Box(477, 477), - Box(478, 478), - Box(479, 479), - Box(480, 480), - Box(481, 481), - Box(482, 482), - Box(483, 483), - Box(484, 484), - Box(485, 485), - Box(486, 486), - Box(487, 487), - Box(488, 488), - Box(489, 489), - Box(490, 490), - Box(491, 491), - Box(492, 492), - Box(493, 493), - Box(494, 494), - Box(495, 495), - Box(496, 496), - Box(497, 497), - Box(498, 498), - Box(499, 499), - Box(500, 500), - Box(501, 501), - Box(502, 502), - Box(503, 503), - Box(504, 504), - Box(505, 505), - Box(506, 506), - Box(507, 507), - Box(508, 508), - Box(509, 509), - Box(510, 510), - Box(511, 511), - Box(512, 512), - Box(513, 513), - Box(514, 514), - Box(515, 515), - Box(516, 516), - Box(517, 517), - Box(518, 518), - Box(519, 519), - Box(520, 520), - Box(521, 521), - Box(522, 522), - Box(523, 523), - Box(524, 524), - Box(525, 525), - Box(526, 526), - Box(527, 527), - Box(528, 528), - Box(529, 529), - Box(530, 530), - Box(531, 531), - Box(532, 532), - Box(533, 533), - Box(534, 534), - Box(535, 535), - Box(536, 536), - Box(537, 537), - Box(538, 538), - Box(539, 539), - Box(540, 540), - Box(541, 541), - Box(542, 542), - Box(543, 543), - Box(544, 544), - Box(545, 545), - Box(546, 546), - Box(547, 547), - Box(548, 548), - Box(549, 549), - Box(550, 550), - Box(551, 551), - Box(552, 552), - Box(553, 553), - Box(554, 554), - Box(555, 555), - Box(556, 556), - Box(557, 557), - Box(558, 558), - Box(559, 559), - Box(560, 560), - Box(561, 561), - Box(562, 562), - Box(563, 563), - Box(564, 564), - Box(565, 565), - Box(566, 566), - Box(567, 567), - Box(568, 568), - Box(569, 569), - Box(570, 570), - Box(571, 571), - Box(572, 572), - Box(573, 573), - Box(574, 574), - Box(575, 575), - Box(576, 576), - Box(577, 577), - Box(578, 578), - Box(579, 579), - Box(580, 580), - Box(581, 581), - Box(582, 582), - Box(583, 583), - Box(584, 584), - Box(585, 585), - Box(586, 586), - Box(587, 587), - Box(588, 588), - Box(589, 589), - Box(590, 590), - Box(591, 591), - Box(592, 592), - Box(593, 593), - Box(594, 594), - Box(595, 595), - Box(596, 596), - Box(597, 597), - Box(598, 598), - Box(599, 599), - Box(600, 600), - Box(601, 601), - Box(602, 602), - Box(603, 603), - Box(604, 604), - Box(605, 605), - Box(606, 606), - Box(607, 607), - Box(608, 608), - Box(609, 609), - Box(610, 610), - Box(611, 611), - Box(612, 612), - Box(613, 613), - Box(614, 614), - Box(615, 615), - Box(616, 616), - Box(617, 617), - Box(618, 618), - Box(619, 619), - Box(620, 620), - Box(621, 621), - Box(622, 622), - Box(623, 623), - Box(624, 624), - Box(625, 625), - Box(626, 626), - Box(627, 627), - Box(628, 628), - Box(629, 629), - Box(630, 630), - Box(631, 631), - Box(632, 632), - Box(633, 633), - Box(634, 634), - Box(635, 635), - Box(636, 636), - Box(637, 637), - Box(638, 638), - Box(639, 639), - Box(640, 640), - Box(641, 641), - Box(642, 642), - Box(643, 643), - Box(644, 644), - Box(645, 645), - Box(646, 646), - Box(647, 647), - Box(648, 648), - Box(649, 649), - Box(650, 650), - Box(651, 651), - Box(652, 652), - Box(653, 653), - Box(654, 654), - Box(655, 655), - Box(656, 656), - Box(657, 657), - Box(658, 658), - Box(659, 659), - Box(660, 660), - Box(661, 661), - Box(662, 662), - Box(663, 663), - Box(664, 664), - Box(665, 665), - Box(666, 666), - Box(667, 667), - Box(668, 668), - Box(669, 669), - Box(670, 670), - Box(671, 671), - Box(672, 672), - Box(673, 673), - Box(674, 674), - Box(675, 675), - Box(676, 676), - Box(677, 677), - Box(678, 678), - Box(679, 679), - Box(680, 680), - Box(681, 681), - Box(682, 682), - Box(683, 683), - Box(684, 684), - Box(685, 685), - Box(686, 686), - Box(687, 687), - Box(688, 688), - Box(689, 689), - Box(690, 690), - Box(691, 691), - Box(692, 692), - Box(693, 693), - Box(694, 694), - Box(695, 695), - Box(696, 696), - Box(697, 697), - Box(698, 698), - Box(699, 699), - Box(700, 700), - Box(701, 701), - Box(702, 702), - Box(703, 703), - Box(704, 704), - Box(705, 705), - Box(706, 706), - Box(707, 707), - Box(708, 708), - Box(709, 709), - Box(710, 710), - Box(711, 711), - Box(712, 712), - Box(713, 713), - Box(714, 714), - Box(715, 715), - Box(716, 716), - Box(717, 717), - Box(718, 718), - Box(719, 719), - Box(720, 720), - Box(721, 721), - Box(722, 722), - Box(723, 723), - Box(724, 724), - Box(725, 725), - Box(726, 726), - Box(727, 727), - Box(728, 728), - Box(729, 729), - Box(730, 730), - Box(731, 731), - Box(732, 732), - Box(733, 733), - Box(734, 734), - Box(735, 735), - Box(736, 736), - Box(737, 737), - Box(738, 738), - Box(739, 739), - Box(740, 740), - Box(741, 741), - Box(742, 742), - Box(743, 743), - Box(744, 744), - Box(745, 745), - Box(746, 746), - Box(747, 747), - Box(748, 748), - Box(749, 749), - Box(750, 750), - Box(751, 751), - Box(752, 752), - Box(753, 753), - Box(754, 754), - Box(755, 755), - Box(756, 756), - Box(757, 757), - Box(758, 758), - Box(759, 759), - Box(760, 760), - Box(761, 761), - Box(762, 762), - Box(763, 763), - Box(764, 764), - Box(765, 765), - Box(766, 766), - Box(767, 767), - Box(768, 768), - Box(769, 769), - Box(770, 770), - Box(771, 771), - Box(772, 772), - Box(773, 773), - Box(774, 774), - Box(775, 775), - Box(776, 776), - Box(777, 777), - Box(778, 778), - Box(779, 779), - Box(780, 780), - Box(781, 781), - Box(782, 782), - Box(783, 783), - Box(784, 784), - Box(785, 785), - Box(786, 786), - Box(787, 787), - Box(788, 788), - Box(789, 789), - Box(790, 790), - Box(791, 791), - Box(792, 792), - Box(793, 793), - Box(794, 794), - Box(795, 795), - Box(796, 796), - Box(797, 797), - Box(798, 798), - Box(799, 799), - Box(800, 800), - Box(801, 801), - Box(802, 802), - Box(803, 803), - Box(804, 804), - Box(805, 805), - Box(806, 806), - Box(807, 807), - Box(808, 808), - Box(809, 809), - Box(810, 810), - Box(811, 811), - Box(812, 812), - Box(813, 813), - Box(814, 814), - Box(815, 815), - Box(816, 816), - Box(817, 817), - Box(818, 818), - Box(819, 819), - Box(820, 820), - Box(821, 821), - Box(822, 822), - Box(823, 823), - Box(824, 824), - Box(825, 825), - Box(826, 826), - Box(827, 827), - Box(828, 828), - Box(829, 829), - Box(830, 830), - Box(831, 831), - Box(832, 832), - Box(833, 833), - Box(834, 834), - Box(835, 835), - Box(836, 836), - Box(837, 837), - Box(838, 838), - Box(839, 839), - Box(840, 840), - Box(841, 841), - Box(842, 842), - Box(843, 843), - Box(844, 844), - Box(845, 845), - Box(846, 846), - Box(847, 847), - Box(848, 848), - Box(849, 849), - Box(850, 850), - Box(851, 851), - Box(852, 852), - Box(853, 853), - Box(854, 854), - Box(855, 855), - Box(856, 856), - Box(857, 857), - Box(858, 858), - Box(859, 859), - Box(860, 860), - Box(861, 861), - Box(862, 862), - Box(863, 863), - Box(864, 864), - Box(865, 865), - Box(866, 866), - Box(867, 867), - Box(868, 868), - Box(869, 869), - Box(870, 870), - Box(871, 871), - Box(872, 872), - Box(873, 873), - Box(874, 874), - Box(875, 875), - Box(876, 876), - Box(877, 877), - Box(878, 878), - Box(879, 879), - Box(880, 880), - Box(881, 881), - Box(882, 882), - Box(883, 883), - Box(884, 884), - Box(885, 885), - Box(886, 886), - Box(887, 887), - Box(888, 888), - Box(889, 889), - Box(890, 890), - Box(891, 891), - Box(892, 892), - Box(893, 893), - Box(894, 894), - Box(895, 895), - Box(896, 896), - Box(897, 897), - Box(898, 898), - Box(899, 899), - Box(900, 900), - Box(901, 901), - Box(902, 902), - Box(903, 903), - Box(904, 904), - Box(905, 905), - Box(906, 906), - Box(907, 907), - Box(908, 908), - Box(909, 909), - Box(910, 910), - Box(911, 911), - Box(912, 912), - Box(913, 913), - Box(914, 914), - Box(915, 915), - Box(916, 916), - Box(917, 917), - Box(918, 918), - Box(919, 919), - Box(920, 920), - Box(921, 921), - Box(922, 922), - Box(923, 923), - Box(924, 924), - Box(925, 925), - Box(926, 926), - Box(927, 927), - Box(928, 928), - Box(929, 929), - Box(930, 930), - Box(931, 931), - Box(932, 932), - Box(933, 933), - Box(934, 934), - Box(935, 935), - Box(936, 936), - Box(937, 937), - Box(938, 938), - Box(939, 939), - Box(940, 940), - Box(941, 941), - Box(942, 942), - Box(943, 943), - Box(944, 944), - Box(945, 945), - Box(946, 946), - Box(947, 947), - Box(948, 948), - Box(949, 949), - Box(950, 950), - Box(951, 951), - Box(952, 952), - Box(953, 953), - Box(954, 954), - Box(955, 955), - Box(956, 956), - Box(957, 957), - Box(958, 958), - Box(959, 959), - Box(960, 960), - Box(961, 961), - Box(962, 962), - Box(963, 963), - Box(964, 964), - Box(965, 965), - Box(966, 966), - Box(967, 967), - Box(968, 968), - Box(969, 969), - Box(970, 970), - Box(971, 971), - Box(972, 972), - Box(973, 973), - Box(974, 974), - Box(975, 975), - Box(976, 976), - Box(977, 977), - Box(978, 978), - Box(979, 979), - Box(980, 980), - Box(981, 981), - Box(982, 982), - Box(983, 983), - Box(984, 984), - Box(985, 985), - Box(986, 986), - Box(987, 987), - Box(988, 988), - Box(989, 989), - Box(990, 990), - Box(991, 991), - Box(992, 992), - Box(993, 993), - Box(994, 994), - Box(995, 995), - Box(996, 996), - Box(997, 997), - Box(998, 998), - Box(999, 999), - Box(1000, 1000), - Box(1001, 1001), - Box(1002, 1002), - Box(1003, 1003), - Box(1004, 1004), - Box(1005, 1005), - Box(1006, 1006), - Box(1007, 1007), - Box(1008, 1008), - Box(1009, 1009), - Box(1010, 1010), - Box(1011, 1011), - Box(1012, 1012), - Box(1013, 1013), - Box(1014, 1014), - Box(1015, 1015), - Box(1016, 1016), - Box(1017, 1017), - Box(1018, 1018), - Box(1019, 1019), - Box(1020, 1020), - Box(1021, 1021), - Box(1022, 1022), - Box(1023, 1023), - Box(1024, 1024), - Box(1025, 1025), - Box(1026, 1026), - Box(1027, 1027), - Box(1028, 1028), - Box(1029, 1029), - Box(1030, 1030), - Box(1031, 1031), - Box(1032, 1032), - Box(1033, 1033), - Box(1034, 1034), - Box(1035, 1035), - Box(1036, 1036), - Box(1037, 1037), - Box(1038, 1038), - Box(1039, 1039), - Box(1040, 1040), - Box(1041, 1041), - Box(1042, 1042), - Box(1043, 1043), - Box(1044, 1044), - Box(1045, 1045), - Box(1046, 1046), - Box(1047, 1047), - Box(1048, 1048), - Box(1049, 1049), - Box(1050, 1050), - Box(1051, 1051), - Box(1052, 1052), - Box(1053, 1053), - Box(1054, 1054), - Box(1055, 1055), - Box(1056, 1056), - Box(1057, 1057), - Box(1058, 1058), - Box(1059, 1059), - Box(1060, 1060), - Box(1061, 1061), - Box(1062, 1062), - Box(1063, 1063), - Box(1064, 1064), - Box(1065, 1065), - Box(1066, 1066), - Box(1067, 1067), - Box(1068, 1068), - Box(1069, 1069), - Box(1070, 1070), - Box(1071, 1071), - Box(1072, 1072), - Box(1073, 1073), - Box(1074, 1074), - Box(1075, 1075), - Box(1076, 1076), - Box(1077, 1077), - Box(1078, 1078), - Box(1079, 1079), - Box(1080, 1080), - Box(1081, 1081), - Box(1082, 1082), - Box(1083, 1083), - Box(1084, 1084), - Box(1085, 1085), - Box(1086, 1086), - Box(1087, 1087), - Box(1088, 1088), - Box(1089, 1089), - Box(1090, 1090), - Box(1091, 1091), - Box(1092, 1092), - Box(1093, 1093), - Box(1094, 1094), - Box(1095, 1095), - Box(1096, 1096), - Box(1097, 1097), - Box(1098, 1098), - Box(1099, 1099), - Box(1100, 1100), - Box(1101, 1101), - Box(1102, 1102), - Box(1103, 1103), - Box(1104, 1104), - Box(1105, 1105), - Box(1106, 1106), - Box(1107, 1107), - Box(1108, 1108), - Box(1109, 1109), - Box(1110, 1110), - Box(1111, 1111), - Box(1112, 1112), - Box(1113, 1113), - Box(1114, 1114), - Box(1115, 1115), - Box(1116, 1116), - Box(1117, 1117), - Box(1118, 1118), - Box(1119, 1119), - Box(1120, 1120), - Box(1121, 1121), - Box(1122, 1122), - Box(1123, 1123), - Box(1124, 1124), - Box(1125, 1125), - Box(1126, 1126), - Box(1127, 1127), - Box(1128, 1128), - Box(1129, 1129), - Box(1130, 1130), - Box(1131, 1131), - Box(1132, 1132), - Box(1133, 1133), - Box(1134, 1134), - Box(1135, 1135), - Box(1136, 1136), - Box(1137, 1137), - Box(1138, 1138), - Box(1139, 1139), - Box(1140, 1140), - Box(1141, 1141), - Box(1142, 1142), - Box(1143, 1143), - Box(1144, 1144), - Box(1145, 1145), - Box(1146, 1146), - Box(1147, 1147), - Box(1148, 1148), - Box(1149, 1149), - Box(1150, 1150), - Box(1151, 1151), - Box(1152, 1152), - Box(1153, 1153), - Box(1154, 1154), - Box(1155, 1155), - Box(1156, 1156), - Box(1157, 1157), - Box(1158, 1158), - Box(1159, 1159), - Box(1160, 1160), - Box(1161, 1161), - Box(1162, 1162), - Box(1163, 1163), - Box(1164, 1164), - Box(1165, 1165), - Box(1166, 1166), - Box(1167, 1167), - Box(1168, 1168), - Box(1169, 1169), - Box(1170, 1170), - Box(1171, 1171), - Box(1172, 1172), - Box(1173, 1173), - Box(1174, 1174), - Box(1175, 1175), - Box(1176, 1176), - Box(1177, 1177), - Box(1178, 1178), - Box(1179, 1179), - Box(1180, 1180), - Box(1181, 1181), - Box(1182, 1182), - Box(1183, 1183), - Box(1184, 1184), - Box(1185, 1185), - Box(1186, 1186), - Box(1187, 1187), - Box(1188, 1188), - Box(1189, 1189), - Box(1190, 1190), - Box(1191, 1191), - Box(1192, 1192), - Box(1193, 1193), - Box(1194, 1194), - Box(1195, 1195), - Box(1196, 1196), - Box(1197, 1197), - Box(1198, 1198), - Box(1199, 1199), - Box(1200, 1200), - Box(1201, 1201), - Box(1202, 1202), - Box(1203, 1203), - Box(1204, 1204), - Box(1205, 1205), - Box(1206, 1206), - Box(1207, 1207), - Box(1208, 1208), - Box(1209, 1209), - Box(1210, 1210), - Box(1211, 1211), - Box(1212, 1212), - Box(1213, 1213), - Box(1214, 1214), - Box(1215, 1215), - Box(1216, 1216), - Box(1217, 1217), - Box(1218, 1218), - Box(1219, 1219), - Box(1220, 1220), - Box(1221, 1221), - Box(1222, 1222), - Box(1223, 1223), - Box(1224, 1224), - Box(1225, 1225), - Box(1226, 1226), - Box(1227, 1227), - Box(1228, 1228), - Box(1229, 1229), - Box(1230, 1230), - Box(1231, 1231), - Box(1232, 1232), - Box(1233, 1233), - Box(1234, 1234), - Box(1235, 1235), - Box(1236, 1236), - Box(1237, 1237), - Box(1238, 1238), - Box(1239, 1239), - Box(1240, 1240), - Box(1241, 1241), - Box(1242, 1242), - Box(1243, 1243), - Box(1244, 1244), - Box(1245, 1245), - Box(1246, 1246), - Box(1247, 1247), - Box(1248, 1248), - Box(1249, 1249), - Box(1250, 1250), - Box(1251, 1251), - Box(1252, 1252), - Box(1253, 1253), - Box(1254, 1254), - Box(1255, 1255), - Box(1256, 1256), - Box(1257, 1257), - Box(1258, 1258), - Box(1259, 1259), - Box(1260, 1260), - Box(1261, 1261), - Box(1262, 1262), - Box(1263, 1263), - Box(1264, 1264), - Box(1265, 1265), - Box(1266, 1266), - Box(1267, 1267), - Box(1268, 1268), - Box(1269, 1269), - Box(1270, 1270), - Box(1271, 1271), - Box(1272, 1272), - Box(1273, 1273), - Box(1274, 1274), - Box(1275, 1275), - Box(1276, 1276), - Box(1277, 1277), - Box(1278, 1278), - Box(1279, 1279), - Box(1280, 1280), - Box(1281, 1281), - Box(1282, 1282), - Box(1283, 1283), - Box(1284, 1284), - Box(1285, 1285), - Box(1286, 1286), - Box(1287, 1287), - Box(1288, 1288), - Box(1289, 1289), - Box(1290, 1290), - Box(1291, 1291), - Box(1292, 1292), - Box(1293, 1293), - Box(1294, 1294), - Box(1295, 1295), - Box(1296, 1296), - Box(1297, 1297), - Box(1298, 1298), - Box(1299, 1299), - Box(1300, 1300), - Box(1301, 1301), - Box(1302, 1302), - Box(1303, 1303), - Box(1304, 1304), - Box(1305, 1305), - Box(1306, 1306), - Box(1307, 1307), - Box(1308, 1308), - Box(1309, 1309), - Box(1310, 1310), - Box(1311, 1311), - Box(1312, 1312), - Box(1313, 1313), - Box(1314, 1314), - Box(1315, 1315), - Box(1316, 1316), - Box(1317, 1317), - Box(1318, 1318), - Box(1319, 1319), - Box(1320, 1320), - Box(1321, 1321), - Box(1322, 1322), - Box(1323, 1323), - Box(1324, 1324), - Box(1325, 1325), - Box(1326, 1326), - Box(1327, 1327), - Box(1328, 1328), - Box(1329, 1329), - Box(1330, 1330), - Box(1331, 1331), - Box(1332, 1332), - Box(1333, 1333), - Box(1334, 1334), - Box(1335, 1335), - Box(1336, 1336), - Box(1337, 1337), - Box(1338, 1338), - Box(1339, 1339), - Box(1340, 1340), - Box(1341, 1341), - Box(1342, 1342), - Box(1343, 1343), - Box(1344, 1344), - Box(1345, 1345), - Box(1346, 1346), - Box(1347, 1347), - Box(1348, 1348), - Box(1349, 1349), - Box(1350, 1350), - Box(1351, 1351), - Box(1352, 1352), - Box(1353, 1353), - Box(1354, 1354), - Box(1355, 1355), - Box(1356, 1356), - Box(1357, 1357), - Box(1358, 1358), - Box(1359, 1359), - Box(1360, 1360), - Box(1361, 1361), - Box(1362, 1362), - Box(1363, 1363), - Box(1364, 1364), - Box(1365, 1365), - Box(1366, 1366), - Box(1367, 1367), - Box(1368, 1368), - Box(1369, 1369), - Box(1370, 1370), - Box(1371, 1371), - Box(1372, 1372), - Box(1373, 1373), - Box(1374, 1374), - Box(1375, 1375), - Box(1376, 1376), - Box(1377, 1377), - Box(1378, 1378), - Box(1379, 1379), - Box(1380, 1380), - Box(1381, 1381), - Box(1382, 1382), - Box(1383, 1383), - Box(1384, 1384), - Box(1385, 1385), - Box(1386, 1386), - Box(1387, 1387), - Box(1388, 1388), - Box(1389, 1389), - Box(1390, 1390), - Box(1391, 1391), - Box(1392, 1392), - Box(1393, 1393), - Box(1394, 1394), - Box(1395, 1395), - Box(1396, 1396), - Box(1397, 1397), - Box(1398, 1398), - Box(1399, 1399), - Box(1400, 1400), - Box(1401, 1401), - Box(1402, 1402), - Box(1403, 1403), - Box(1404, 1404), - Box(1405, 1405), - Box(1406, 1406), - Box(1407, 1407), - Box(1408, 1408), - Box(1409, 1409), - Box(1410, 1410), - Box(1411, 1411), - Box(1412, 1412), - Box(1413, 1413), - Box(1414, 1414), - Box(1415, 1415), - Box(1416, 1416), - Box(1417, 1417), - Box(1418, 1418), - Box(1419, 1419), - Box(1420, 1420), - Box(1421, 1421), - Box(1422, 1422), - Box(1423, 1423), - Box(1424, 1424), - Box(1425, 1425), - Box(1426, 1426), - Box(1427, 1427), - Box(1428, 1428), - Box(1429, 1429), - Box(1430, 1430), - Box(1431, 1431), - Box(1432, 1432), - Box(1433, 1433), - Box(1434, 1434), - Box(1435, 1435), - Box(1436, 1436), - Box(1437, 1437), - Box(1438, 1438), - Box(1439, 1439), - Box(1440, 1440), - Box(1441, 1441), - Box(1442, 1442), - Box(1443, 1443), - Box(1444, 1444), - Box(1445, 1445), - Box(1446, 1446), - Box(1447, 1447), - Box(1448, 1448), - Box(1449, 1449), - Box(1450, 1450), - Box(1451, 1451), - Box(1452, 1452), - Box(1453, 1453), - Box(1454, 1454), - Box(1455, 1455), - Box(1456, 1456), - Box(1457, 1457), - Box(1458, 1458), - Box(1459, 1459), - Box(1460, 1460), - Box(1461, 1461), - Box(1462, 1462), - Box(1463, 1463), - Box(1464, 1464), - Box(1465, 1465), - Box(1466, 1466), - Box(1467, 1467), - Box(1468, 1468), - Box(1469, 1469), - Box(1470, 1470), - Box(1471, 1471), - Box(1472, 1472), - Box(1473, 1473), - Box(1474, 1474), - Box(1475, 1475), - Box(1476, 1476), - Box(1477, 1477), - Box(1478, 1478), - Box(1479, 1479), - Box(1480, 1480), - Box(1481, 1481), - Box(1482, 1482), - Box(1483, 1483), - Box(1484, 1484), - Box(1485, 1485), - Box(1486, 1486), - Box(1487, 1487), - Box(1488, 1488), - Box(1489, 1489), - Box(1490, 1490), - Box(1491, 1491), - Box(1492, 1492), - Box(1493, 1493), - Box(1494, 1494), - Box(1495, 1495), - Box(1496, 1496), - Box(1497, 1497), - Box(1498, 1498), - Box(1499, 1499), - Box(1500, 1500), - Box(1501, 1501), - Box(1502, 1502), - Box(1503, 1503), - Box(1504, 1504), - Box(1505, 1505), - Box(1506, 1506), - Box(1507, 1507), - Box(1508, 1508), - Box(1509, 1509), - Box(1510, 1510), - Box(1511, 1511), - Box(1512, 1512), - Box(1513, 1513), - Box(1514, 1514), - Box(1515, 1515), - Box(1516, 1516), - Box(1517, 1517), - Box(1518, 1518), - Box(1519, 1519), - Box(1520, 1520), - Box(1521, 1521), - Box(1522, 1522), - Box(1523, 1523), - Box(1524, 1524), - Box(1525, 1525), - Box(1526, 1526), - Box(1527, 1527), - Box(1528, 1528), - Box(1529, 1529), - Box(1530, 1530), - Box(1531, 1531), - Box(1532, 1532), - Box(1533, 1533), - Box(1534, 1534), - Box(1535, 1535), - Box(1536, 1536), - Box(1537, 1537), - Box(1538, 1538), - Box(1539, 1539), - Box(1540, 1540), - Box(1541, 1541), - Box(1542, 1542), - Box(1543, 1543), - Box(1544, 1544), - Box(1545, 1545), - Box(1546, 1546), - Box(1547, 1547), - Box(1548, 1548), - Box(1549, 1549), - Box(1550, 1550), - Box(1551, 1551), - Box(1552, 1552), - Box(1553, 1553), - Box(1554, 1554), - Box(1555, 1555), - Box(1556, 1556), - Box(1557, 1557), - Box(1558, 1558), - Box(1559, 1559), - Box(1560, 1560), - Box(1561, 1561), - Box(1562, 1562), - Box(1563, 1563), - Box(1564, 1564), - Box(1565, 1565), - Box(1566, 1566), - Box(1567, 1567), - Box(1568, 1568), - Box(1569, 1569), - Box(1570, 1570), - Box(1571, 1571), - Box(1572, 1572), - Box(1573, 1573), - Box(1574, 1574), - Box(1575, 1575), - Box(1576, 1576), - Box(1577, 1577), - Box(1578, 1578), - Box(1579, 1579), - Box(1580, 1580), - Box(1581, 1581), - Box(1582, 1582), - Box(1583, 1583), - Box(1584, 1584), - Box(1585, 1585), - Box(1586, 1586), - Box(1587, 1587), - Box(1588, 1588), - Box(1589, 1589), - Box(1590, 1590), - Box(1591, 1591), - Box(1592, 1592), - Box(1593, 1593), - Box(1594, 1594), - Box(1595, 1595), - Box(1596, 1596), - Box(1597, 1597), - Box(1598, 1598), - Box(1599, 1599), - Box(1600, 1600), - Box(1601, 1601), - Box(1602, 1602), - Box(1603, 1603), - Box(1604, 1604), - Box(1605, 1605), - Box(1606, 1606), - Box(1607, 1607), - Box(1608, 1608), - Box(1609, 1609), - Box(1610, 1610), - Box(1611, 1611), - Box(1612, 1612), - Box(1613, 1613), - Box(1614, 1614), - Box(1615, 1615), - Box(1616, 1616), - Box(1617, 1617), - Box(1618, 1618), - Box(1619, 1619), - Box(1620, 1620), - Box(1621, 1621), - Box(1622, 1622), - Box(1623, 1623), - Box(1624, 1624), - Box(1625, 1625), - Box(1626, 1626), - Box(1627, 1627), - Box(1628, 1628), - Box(1629, 1629), - Box(1630, 1630), - Box(1631, 1631), - Box(1632, 1632), - Box(1633, 1633), - Box(1634, 1634), - Box(1635, 1635), - Box(1636, 1636), - Box(1637, 1637), - Box(1638, 1638), - Box(1639, 1639), - Box(1640, 1640), - Box(1641, 1641), - Box(1642, 1642), - Box(1643, 1643), - Box(1644, 1644), - Box(1645, 1645), - Box(1646, 1646), - Box(1647, 1647), - Box(1648, 1648), - Box(1649, 1649), - Box(1650, 1650), - Box(1651, 1651), - Box(1652, 1652), - Box(1653, 1653), - Box(1654, 1654), - Box(1655, 1655), - Box(1656, 1656), - Box(1657, 1657), - Box(1658, 1658), - Box(1659, 1659), - Box(1660, 1660), - Box(1661, 1661), - Box(1662, 1662), - Box(1663, 1663), - Box(1664, 1664), - Box(1665, 1665), - Box(1666, 1666), - Box(1667, 1667), - Box(1668, 1668), - Box(1669, 1669), - Box(1670, 1670), - Box(1671, 1671), - Box(1672, 1672), - Box(1673, 1673), - Box(1674, 1674), - Box(1675, 1675), - Box(1676, 1676), - Box(1677, 1677), - Box(1678, 1678), - Box(1679, 1679), - Box(1680, 1680), - Box(1681, 1681), - Box(1682, 1682), - Box(1683, 1683), - Box(1684, 1684), - Box(1685, 1685), - Box(1686, 1686), - Box(1687, 1687), - Box(1688, 1688), - Box(1689, 1689), - Box(1690, 1690), - Box(1691, 1691), - Box(1692, 1692), - Box(1693, 1693), - Box(1694, 1694), - Box(1695, 1695), - Box(1696, 1696), - Box(1697, 1697), - Box(1698, 1698), - Box(1699, 1699), - Box(1700, 1700), - Box(1701, 1701), - Box(1702, 1702), - Box(1703, 1703), - Box(1704, 1704), - Box(1705, 1705), - Box(1706, 1706), - Box(1707, 1707), - Box(1708, 1708), - Box(1709, 1709), - Box(1710, 1710), - Box(1711, 1711), - Box(1712, 1712), - Box(1713, 1713), - Box(1714, 1714), - Box(1715, 1715), - Box(1716, 1716), - Box(1717, 1717), - Box(1718, 1718), - Box(1719, 1719), - Box(1720, 1720), - Box(1721, 1721), - Box(1722, 1722), - Box(1723, 1723), - Box(1724, 1724), - Box(1725, 1725), - Box(1726, 1726), - Box(1727, 1727), - Box(1728, 1728), - Box(1729, 1729), - Box(1730, 1730), - Box(1731, 1731), - Box(1732, 1732), - Box(1733, 1733), - Box(1734, 1734), - Box(1735, 1735), - Box(1736, 1736), - Box(1737, 1737), - Box(1738, 1738), - Box(1739, 1739), - Box(1740, 1740), - Box(1741, 1741), - Box(1742, 1742), - Box(1743, 1743), - Box(1744, 1744), - Box(1745, 1745), - Box(1746, 1746), - Box(1747, 1747), - Box(1748, 1748), - Box(1749, 1749), - Box(1750, 1750), - Box(1751, 1751), - Box(1752, 1752), - Box(1753, 1753), - Box(1754, 1754), - Box(1755, 1755), - Box(1756, 1756), - Box(1757, 1757), - Box(1758, 1758), - Box(1759, 1759), - Box(1760, 1760), - Box(1761, 1761), - Box(1762, 1762), - Box(1763, 1763), - Box(1764, 1764), - Box(1765, 1765), - Box(1766, 1766), - Box(1767, 1767), - Box(1768, 1768), - Box(1769, 1769), - Box(1770, 1770), - Box(1771, 1771), - Box(1772, 1772), - Box(1773, 1773), - Box(1774, 1774), - Box(1775, 1775), - Box(1776, 1776), - Box(1777, 1777), - Box(1778, 1778), - Box(1779, 1779), - Box(1780, 1780), - Box(1781, 1781), - Box(1782, 1782), - Box(1783, 1783), - Box(1784, 1784), - Box(1785, 1785), - Box(1786, 1786), - Box(1787, 1787), - Box(1788, 1788), - Box(1789, 1789), - Box(1790, 1790), - Box(1791, 1791), - Box(1792, 1792), - Box(1793, 1793), - Box(1794, 1794), - Box(1795, 1795), - Box(1796, 1796), - Box(1797, 1797), - Box(1798, 1798), - Box(1799, 1799), - Box(1800, 1800), - Box(1801, 1801), - Box(1802, 1802), - Box(1803, 1803), - Box(1804, 1804), - Box(1805, 1805), - Box(1806, 1806), - Box(1807, 1807), - Box(1808, 1808), - Box(1809, 1809), - Box(1810, 1810), - Box(1811, 1811), - Box(1812, 1812), - Box(1813, 1813), - Box(1814, 1814), - Box(1815, 1815), - Box(1816, 1816), - Box(1817, 1817), - Box(1818, 1818), - Box(1819, 1819), - Box(1820, 1820), - Box(1821, 1821), - Box(1822, 1822), - Box(1823, 1823), - Box(1824, 1824), - Box(1825, 1825), - Box(1826, 1826), - Box(1827, 1827), - Box(1828, 1828), - Box(1829, 1829), - Box(1830, 1830), - Box(1831, 1831), - Box(1832, 1832), - Box(1833, 1833), - Box(1834, 1834), - Box(1835, 1835), - Box(1836, 1836), - Box(1837, 1837), - Box(1838, 1838), - Box(1839, 1839), - Box(1840, 1840), - Box(1841, 1841), - Box(1842, 1842), - Box(1843, 1843), - Box(1844, 1844), - Box(1845, 1845), - Box(1846, 1846), - Box(1847, 1847), - Box(1848, 1848), - Box(1849, 1849), - Box(1850, 1850), - Box(1851, 1851), - Box(1852, 1852), - Box(1853, 1853), - Box(1854, 1854), - Box(1855, 1855), - Box(1856, 1856), - Box(1857, 1857), - Box(1858, 1858), - Box(1859, 1859), - Box(1860, 1860), - Box(1861, 1861), - Box(1862, 1862), - Box(1863, 1863), - Box(1864, 1864), - Box(1865, 1865), - Box(1866, 1866), - Box(1867, 1867), - Box(1868, 1868), - Box(1869, 1869), - Box(1870, 1870), - Box(1871, 1871), - Box(1872, 1872), - Box(1873, 1873), - Box(1874, 1874), - Box(1875, 1875), - Box(1876, 1876), - Box(1877, 1877), - Box(1878, 1878), - Box(1879, 1879), - Box(1880, 1880), - Box(1881, 1881), - Box(1882, 1882), - Box(1883, 1883), - Box(1884, 1884), - Box(1885, 1885), - Box(1886, 1886), - Box(1887, 1887), - Box(1888, 1888), - Box(1889, 1889), - Box(1890, 1890), - Box(1891, 1891), - Box(1892, 1892), - Box(1893, 1893), - Box(1894, 1894), - Box(1895, 1895), - Box(1896, 1896), - Box(1897, 1897), - Box(1898, 1898), - Box(1899, 1899), - Box(1900, 1900), - Box(1901, 1901), - Box(1902, 1902), - Box(1903, 1903), - Box(1904, 1904), - Box(1905, 1905), - Box(1906, 1906), - Box(1907, 1907), - Box(1908, 1908), - Box(1909, 1909), - Box(1910, 1910), - Box(1911, 1911), - Box(1912, 1912), - Box(1913, 1913), - Box(1914, 1914), - Box(1915, 1915), - Box(1916, 1916), - Box(1917, 1917), - Box(1918, 1918), - Box(1919, 1919), - Box(1920, 1920), - Box(1921, 1921), - Box(1922, 1922), - Box(1923, 1923), - Box(1924, 1924), - Box(1925, 1925), - Box(1926, 1926), - Box(1927, 1927), - Box(1928, 1928), - Box(1929, 1929), - Box(1930, 1930), - Box(1931, 1931), - Box(1932, 1932), - Box(1933, 1933), - Box(1934, 1934), - Box(1935, 1935), - Box(1936, 1936), - Box(1937, 1937), - Box(1938, 1938), - Box(1939, 1939), - Box(1940, 1940), - Box(1941, 1941), - Box(1942, 1942), - Box(1943, 1943), - Box(1944, 1944), - Box(1945, 1945), - Box(1946, 1946), - Box(1947, 1947), - Box(1948, 1948), - Box(1949, 1949), - Box(1950, 1950), - Box(1951, 1951), - Box(1952, 1952), - Box(1953, 1953), - Box(1954, 1954), - Box(1955, 1955), - Box(1956, 1956), - Box(1957, 1957), - Box(1958, 1958), - Box(1959, 1959), - Box(1960, 1960), - Box(1961, 1961), - Box(1962, 1962), - Box(1963, 1963), - Box(1964, 1964), - Box(1965, 1965), - Box(1966, 1966), - Box(1967, 1967), - Box(1968, 1968), - Box(1969, 1969), - Box(1970, 1970), - Box(1971, 1971), - Box(1972, 1972), - Box(1973, 1973), - Box(1974, 1974), - Box(1975, 1975), - Box(1976, 1976), - Box(1977, 1977), - Box(1978, 1978), - Box(1979, 1979), - Box(1980, 1980), - Box(1981, 1981), - Box(1982, 1982), - Box(1983, 1983), - Box(1984, 1984), - Box(1985, 1985), - Box(1986, 1986), - Box(1987, 1987), - Box(1988, 1988), - Box(1989, 1989), - Box(1990, 1990), - Box(1991, 1991), - Box(1992, 1992), - Box(1993, 1993), - Box(1994, 1994), - Box(1995, 1995), - Box(1996, 1996), - Box(1997, 1997), - Box(1998, 1998), - Box(1999, 1999), - Box(2000, 2000), - Box(2001, 2001), - Box(2002, 2002), - Box(2003, 2003), - Box(2004, 2004), - Box(2005, 2005), - Box(2006, 2006), - Box(2007, 2007), - Box(2008, 2008), - Box(2009, 2009), - Box(2010, 2010), - Box(2011, 2011), - Box(2012, 2012), - Box(2013, 2013), - Box(2014, 2014), - Box(2015, 2015), - Box(2016, 2016), - Box(2017, 2017), - Box(2018, 2018), - Box(2019, 2019), - Box(2020, 2020), - Box(2021, 2021), - Box(2022, 2022), - Box(2023, 2023), - Box(2024, 2024), - Box(2025, 2025), - Box(2026, 2026), - Box(2027, 2027), - Box(2028, 2028), - Box(2029, 2029), - Box(2030, 2030), - Box(2031, 2031), - Box(2032, 2032), - Box(2033, 2033), - Box(2034, 2034), - Box(2035, 2035), - Box(2036, 2036), - Box(2037, 2037), - Box(2038, 2038), - Box(2039, 2039), - Box(2040, 2040), - Box(2041, 2041), - Box(2042, 2042), - Box(2043, 2043), - Box(2044, 2044), - Box(2045, 2045), - Box(2046, 2046), - Box(2047, 2047), - Box(2048, 2048), - Box(2049, 2049), - Box(2050, 2050), - Box(2051, 2051), - Box(2052, 2052), - Box(2053, 2053), - Box(2054, 2054), - Box(2055, 2055), - Box(2056, 2056), - Box(2057, 2057), - Box(2058, 2058), - Box(2059, 2059), - Box(2060, 2060), - Box(2061, 2061), - Box(2062, 2062), - Box(2063, 2063), - Box(2064, 2064), - Box(2065, 2065), - Box(2066, 2066), - Box(2067, 2067), - Box(2068, 2068), - Box(2069, 2069), - Box(2070, 2070), - Box(2071, 2071), - Box(2072, 2072), - Box(2073, 2073), - Box(2074, 2074), - Box(2075, 2075), - Box(2076, 2076), - Box(2077, 2077), - Box(2078, 2078), - Box(2079, 2079), - Box(2080, 2080), - Box(2081, 2081), - Box(2082, 2082), - Box(2083, 2083), - Box(2084, 2084), - Box(2085, 2085), - Box(2086, 2086), - Box(2087, 2087), - Box(2088, 2088), - Box(2089, 2089), - Box(2090, 2090), - Box(2091, 2091), - Box(2092, 2092), - Box(2093, 2093), - Box(2094, 2094), - Box(2095, 2095), - Box(2096, 2096), - Box(2097, 2097), - Box(2098, 2098), - Box(2099, 2099), - Box(2100, 2100), - Box(2101, 2101), - Box(2102, 2102), - Box(2103, 2103), - Box(2104, 2104), - Box(2105, 2105), - Box(2106, 2106), - Box(2107, 2107), - Box(2108, 2108), - Box(2109, 2109), - Box(2110, 2110), - Box(2111, 2111), - Box(2112, 2112), - Box(2113, 2113), - Box(2114, 2114), - Box(2115, 2115), - Box(2116, 2116), - Box(2117, 2117), - Box(2118, 2118), - Box(2119, 2119), - Box(2120, 2120), - Box(2121, 2121), - Box(2122, 2122), - Box(2123, 2123), - Box(2124, 2124), - Box(2125, 2125), - Box(2126, 2126), - Box(2127, 2127), - Box(2128, 2128), - Box(2129, 2129), - Box(2130, 2130), - Box(2131, 2131), - Box(2132, 2132), - Box(2133, 2133), - Box(2134, 2134), - Box(2135, 2135), - Box(2136, 2136), - Box(2137, 2137), - Box(2138, 2138), - Box(2139, 2139), - Box(2140, 2140), - Box(2141, 2141), - Box(2142, 2142), - Box(2143, 2143), - Box(2144, 2144), - Box(2145, 2145), - Box(2146, 2146), - Box(2147, 2147), - Box(2148, 2148), - Box(2149, 2149), - Box(2150, 2150), - Box(2151, 2151), - Box(2152, 2152), - Box(2153, 2153), - Box(2154, 2154), - Box(2155, 2155), - Box(2156, 2156), - Box(2157, 2157), - Box(2158, 2158), - Box(2159, 2159), - Box(2160, 2160), - Box(2161, 2161), - Box(2162, 2162), - Box(2163, 2163), - Box(2164, 2164), - Box(2165, 2165), - Box(2166, 2166), - Box(2167, 2167), - Box(2168, 2168), - Box(2169, 2169), - Box(2170, 2170), - Box(2171, 2171), - Box(2172, 2172), - Box(2173, 2173), - Box(2174, 2174), - Box(2175, 2175), - Box(2176, 2176), - Box(2177, 2177), - Box(2178, 2178), - Box(2179, 2179), - Box(2180, 2180), - Box(2181, 2181), - Box(2182, 2182), - Box(2183, 2183), - Box(2184, 2184), - Box(2185, 2185), - Box(2186, 2186), - Box(2187, 2187), - Box(2188, 2188), - Box(2189, 2189), - Box(2190, 2190), - Box(2191, 2191), - Box(2192, 2192), - Box(2193, 2193), - Box(2194, 2194), - Box(2195, 2195), - Box(2196, 2196), - Box(2197, 2197), - Box(2198, 2198), - Box(2199, 2199), - Box(2200, 2200), - Box(2201, 2201), - Box(2202, 2202), - Box(2203, 2203), - Box(2204, 2204), - Box(2205, 2205), - Box(2206, 2206), - Box(2207, 2207), - Box(2208, 2208), - Box(2209, 2209), - Box(2210, 2210), - Box(2211, 2211), - Box(2212, 2212), - Box(2213, 2213), - Box(2214, 2214), - Box(2215, 2215), - Box(2216, 2216), - Box(2217, 2217), - Box(2218, 2218), - Box(2219, 2219), - Box(2220, 2220), - Box(2221, 2221), - Box(2222, 2222), - Box(2223, 2223), - Box(2224, 2224), - Box(2225, 2225), - Box(2226, 2226), - Box(2227, 2227), - Box(2228, 2228), - Box(2229, 2229), - Box(2230, 2230), - Box(2231, 2231), - Box(2232, 2232), - Box(2233, 2233), - Box(2234, 2234), - Box(2235, 2235), - Box(2236, 2236), - Box(2237, 2237), - Box(2238, 2238), - Box(2239, 2239), - Box(2240, 2240), - Box(2241, 2241), - Box(2242, 2242), - Box(2243, 2243), - Box(2244, 2244), - Box(2245, 2245), - Box(2246, 2246), - Box(2247, 2247), - Box(2248, 2248), - Box(2249, 2249), - Box(2250, 2250), - Box(2251, 2251), - Box(2252, 2252), - Box(2253, 2253), - Box(2254, 2254), - Box(2255, 2255), - Box(2256, 2256), - Box(2257, 2257), - Box(2258, 2258), - Box(2259, 2259), - Box(2260, 2260), - Box(2261, 2261), - Box(2262, 2262), - Box(2263, 2263), - Box(2264, 2264), - Box(2265, 2265), - Box(2266, 2266), - Box(2267, 2267), - Box(2268, 2268), - Box(2269, 2269), - Box(2270, 2270), - Box(2271, 2271), - Box(2272, 2272), - Box(2273, 2273), - Box(2274, 2274), - Box(2275, 2275), - Box(2276, 2276), - Box(2277, 2277), - Box(2278, 2278), - Box(2279, 2279), - Box(2280, 2280), - Box(2281, 2281), - Box(2282, 2282), - Box(2283, 2283), - Box(2284, 2284), - Box(2285, 2285), - Box(2286, 2286), - Box(2287, 2287), - Box(2288, 2288), - Box(2289, 2289), - Box(2290, 2290), - Box(2291, 2291), - Box(2292, 2292), - Box(2293, 2293), - Box(2294, 2294), - Box(2295, 2295), - Box(2296, 2296), - Box(2297, 2297), - Box(2298, 2298), - Box(2299, 2299), - Box(2300, 2300), - Box(2301, 2301), - Box(2302, 2302), - Box(2303, 2303), - Box(2304, 2304), - Box(2305, 2305), - Box(2306, 2306), - Box(2307, 2307), - Box(2308, 2308), - Box(2309, 2309), - Box(2310, 2310), - Box(2311, 2311), - Box(2312, 2312), - Box(2313, 2313), - Box(2314, 2314), - Box(2315, 2315), - Box(2316, 2316), - Box(2317, 2317), - Box(2318, 2318), - Box(2319, 2319), - Box(2320, 2320), - Box(2321, 2321), - Box(2322, 2322), - Box(2323, 2323), - Box(2324, 2324), - Box(2325, 2325), - Box(2326, 2326), - Box(2327, 2327), - Box(2328, 2328), - Box(2329, 2329), - Box(2330, 2330), - Box(2331, 2331), - Box(2332, 2332), - Box(2333, 2333), - Box(2334, 2334), - Box(2335, 2335), - Box(2336, 2336), - Box(2337, 2337), - Box(2338, 2338), - Box(2339, 2339), - Box(2340, 2340), - Box(2341, 2341), - Box(2342, 2342), - Box(2343, 2343), - Box(2344, 2344), - Box(2345, 2345), - Box(2346, 2346), - Box(2347, 2347), - Box(2348, 2348), - Box(2349, 2349), - Box(2350, 2350), - Box(2351, 2351), - Box(2352, 2352), - Box(2353, 2353), - Box(2354, 2354), - Box(2355, 2355), - Box(2356, 2356), - Box(2357, 2357), - Box(2358, 2358), - Box(2359, 2359), - Box(2360, 2360), - Box(2361, 2361), - Box(2362, 2362), - Box(2363, 2363), - Box(2364, 2364), - Box(2365, 2365), - Box(2366, 2366), - Box(2367, 2367), - Box(2368, 2368), - Box(2369, 2369), - Box(2370, 2370), - Box(2371, 2371), - Box(2372, 2372), - Box(2373, 2373), - Box(2374, 2374), - Box(2375, 2375), - Box(2376, 2376), - Box(2377, 2377), - Box(2378, 2378), - Box(2379, 2379), - Box(2380, 2380), - Box(2381, 2381), - Box(2382, 2382), - Box(2383, 2383), - Box(2384, 2384), - Box(2385, 2385), - Box(2386, 2386), - Box(2387, 2387), - Box(2388, 2388), - Box(2389, 2389), - Box(2390, 2390), - Box(2391, 2391), - Box(2392, 2392), - Box(2393, 2393), - Box(2394, 2394), - Box(2395, 2395), - Box(2396, 2396), - Box(2397, 2397), - Box(2398, 2398), - Box(2399, 2399), - Box(2400, 2400), - Box(2401, 2401), - Box(2402, 2402), - Box(2403, 2403), - Box(2404, 2404), - Box(2405, 2405), - Box(2406, 2406), - Box(2407, 2407), - Box(2408, 2408), - Box(2409, 2409), - Box(2410, 2410), - Box(2411, 2411), - Box(2412, 2412), - Box(2413, 2413), - Box(2414, 2414), - Box(2415, 2415), - Box(2416, 2416), - Box(2417, 2417), - Box(2418, 2418), - Box(2419, 2419), - Box(2420, 2420), - Box(2421, 2421), - Box(2422, 2422), - Box(2423, 2423), - Box(2424, 2424), - Box(2425, 2425), - Box(2426, 2426), - Box(2427, 2427), - Box(2428, 2428), - Box(2429, 2429), - Box(2430, 2430), - Box(2431, 2431), - Box(2432, 2432), - Box(2433, 2433), - Box(2434, 2434), - Box(2435, 2435), - Box(2436, 2436), - Box(2437, 2437), - Box(2438, 2438), - Box(2439, 2439), - Box(2440, 2440), - Box(2441, 2441), - Box(2442, 2442), - Box(2443, 2443), - Box(2444, 2444), - Box(2445, 2445), - Box(2446, 2446), - Box(2447, 2447), - Box(2448, 2448), - Box(2449, 2449), - Box(2450, 2450), - Box(2451, 2451), - Box(2452, 2452), - Box(2453, 2453), - Box(2454, 2454), - Box(2455, 2455), - Box(2456, 2456), - Box(2457, 2457), - Box(2458, 2458), - Box(2459, 2459), - Box(2460, 2460), - Box(2461, 2461), - Box(2462, 2462), - Box(2463, 2463), - Box(2464, 2464), - Box(2465, 2465), - Box(2466, 2466), - Box(2467, 2467), - Box(2468, 2468), - Box(2469, 2469), - Box(2470, 2470), - Box(2471, 2471), - Box(2472, 2472), - Box(2473, 2473), - Box(2474, 2474), - Box(2475, 2475), - Box(2476, 2476), - Box(2477, 2477), - Box(2478, 2478), - Box(2479, 2479), - Box(2480, 2480), - Box(2481, 2481), - Box(2482, 2482), - Box(2483, 2483), - Box(2484, 2484), - Box(2485, 2485), - Box(2486, 2486), - Box(2487, 2487), - Box(2488, 2488), - Box(2489, 2489), - Box(2490, 2490), - Box(2491, 2491), - Box(2492, 2492), - Box(2493, 2493), - Box(2494, 2494), - Box(2495, 2495), - Box(2496, 2496), - Box(2497, 2497), - Box(2498, 2498), - Box(2499, 2499), - Box(2500, 2500), - Box(2501, 2501), - Box(2502, 2502), - Box(2503, 2503), - Box(2504, 2504), - Box(2505, 2505), - Box(2506, 2506), - Box(2507, 2507), - Box(2508, 2508), - Box(2509, 2509), - Box(2510, 2510), - Box(2511, 2511), - Box(2512, 2512), - Box(2513, 2513), - Box(2514, 2514), - Box(2515, 2515), - Box(2516, 2516), - Box(2517, 2517), - Box(2518, 2518), - Box(2519, 2519), - Box(2520, 2520), - Box(2521, 2521), - Box(2522, 2522), - Box(2523, 2523), - Box(2524, 2524), - Box(2525, 2525), - Box(2526, 2526), - Box(2527, 2527), - Box(2528, 2528), - Box(2529, 2529), - Box(2530, 2530), - Box(2531, 2531), - Box(2532, 2532), - Box(2533, 2533), - Box(2534, 2534), - Box(2535, 2535), - Box(2536, 2536), - Box(2537, 2537), - Box(2538, 2538), - Box(2539, 2539), - Box(2540, 2540), - Box(2541, 2541), - Box(2542, 2542), - Box(2543, 2543), - Box(2544, 2544), - Box(2545, 2545), - Box(2546, 2546), - Box(2547, 2547), - Box(2548, 2548), - Box(2549, 2549), - Box(2550, 2550), - Box(2551, 2551), - Box(2552, 2552), - Box(2553, 2553), - Box(2554, 2554), - Box(2555, 2555), - Box(2556, 2556), - Box(2557, 2557), - Box(2558, 2558), - Box(2559, 2559), - Box(2560, 2560), - Box(2561, 2561), - Box(2562, 2562), - Box(2563, 2563), - Box(2564, 2564), - Box(2565, 2565), - Box(2566, 2566), - Box(2567, 2567), - Box(2568, 2568), - Box(2569, 2569), - Box(2570, 2570), - Box(2571, 2571), - Box(2572, 2572), - Box(2573, 2573), - Box(2574, 2574), - Box(2575, 2575), - Box(2576, 2576), - Box(2577, 2577), - Box(2578, 2578), - Box(2579, 2579), - Box(2580, 2580), - Box(2581, 2581), - Box(2582, 2582), - Box(2583, 2583), - Box(2584, 2584), - Box(2585, 2585), - Box(2586, 2586), - Box(2587, 2587), - Box(2588, 2588), - Box(2589, 2589), - Box(2590, 2590), - Box(2591, 2591), - Box(2592, 2592), - Box(2593, 2593), - Box(2594, 2594), - Box(2595, 2595), - Box(2596, 2596), - Box(2597, 2597), - Box(2598, 2598), - Box(2599, 2599), - Box(2600, 2600), - Box(2601, 2601), - Box(2602, 2602), - Box(2603, 2603), - Box(2604, 2604), - Box(2605, 2605), - Box(2606, 2606), - Box(2607, 2607), - Box(2608, 2608), - Box(2609, 2609), - Box(2610, 2610), - Box(2611, 2611), - Box(2612, 2612), - Box(2613, 2613), - Box(2614, 2614), - Box(2615, 2615), - Box(2616, 2616), - Box(2617, 2617), - Box(2618, 2618), - Box(2619, 2619), - Box(2620, 2620), - Box(2621, 2621), - Box(2622, 2622), - Box(2623, 2623), - Box(2624, 2624), - Box(2625, 2625), - Box(2626, 2626), - Box(2627, 2627), - Box(2628, 2628), - Box(2629, 2629), - Box(2630, 2630), - Box(2631, 2631), - Box(2632, 2632), - Box(2633, 2633), - Box(2634, 2634), - Box(2635, 2635), - Box(2636, 2636), - Box(2637, 2637), - Box(2638, 2638), - Box(2639, 2639), - Box(2640, 2640), - Box(2641, 2641), - Box(2642, 2642), - Box(2643, 2643), - Box(2644, 2644), - Box(2645, 2645), - Box(2646, 2646), - Box(2647, 2647), - Box(2648, 2648), - Box(2649, 2649), - Box(2650, 2650), - Box(2651, 2651), - Box(2652, 2652), - Box(2653, 2653), - Box(2654, 2654), - Box(2655, 2655), - Box(2656, 2656), - Box(2657, 2657), - Box(2658, 2658), - Box(2659, 2659), - Box(2660, 2660), - Box(2661, 2661), - Box(2662, 2662), - Box(2663, 2663), - Box(2664, 2664), - Box(2665, 2665), - Box(2666, 2666), - Box(2667, 2667), - Box(2668, 2668), - Box(2669, 2669), - Box(2670, 2670), - Box(2671, 2671), - Box(2672, 2672), - Box(2673, 2673), - Box(2674, 2674), - Box(2675, 2675), - Box(2676, 2676), - Box(2677, 2677), - Box(2678, 2678), - Box(2679, 2679), - Box(2680, 2680), - Box(2681, 2681), - Box(2682, 2682), - Box(2683, 2683), - Box(2684, 2684), - Box(2685, 2685), - Box(2686, 2686), - Box(2687, 2687), - Box(2688, 2688), - Box(2689, 2689), - Box(2690, 2690), - Box(2691, 2691), - Box(2692, 2692), - Box(2693, 2693), - Box(2694, 2694), - Box(2695, 2695), - Box(2696, 2696), - Box(2697, 2697), - Box(2698, 2698), - Box(2699, 2699), - Box(2700, 2700), - Box(2701, 2701), - Box(2702, 2702), - Box(2703, 2703), - Box(2704, 2704), - Box(2705, 2705), - Box(2706, 2706), - Box(2707, 2707), - Box(2708, 2708), - Box(2709, 2709), - Box(2710, 2710), - Box(2711, 2711), - Box(2712, 2712), - Box(2713, 2713), - Box(2714, 2714), - Box(2715, 2715), - Box(2716, 2716), - Box(2717, 2717), - Box(2718, 2718), - Box(2719, 2719), - Box(2720, 2720), - Box(2721, 2721), - Box(2722, 2722), - Box(2723, 2723), - Box(2724, 2724), - Box(2725, 2725), - Box(2726, 2726), - Box(2727, 2727), - Box(2728, 2728), - Box(2729, 2729), - Box(2730, 2730), - Box(2731, 2731), - Box(2732, 2732), - Box(2733, 2733), - Box(2734, 2734), - Box(2735, 2735), - Box(2736, 2736), - Box(2737, 2737), - Box(2738, 2738), - Box(2739, 2739), - Box(2740, 2740), - Box(2741, 2741), - Box(2742, 2742), - Box(2743, 2743), - Box(2744, 2744), - Box(2745, 2745), - Box(2746, 2746), - Box(2747, 2747), - Box(2748, 2748), - Box(2749, 2749), - Box(2750, 2750), - Box(2751, 2751), - Box(2752, 2752), - Box(2753, 2753), - Box(2754, 2754), - Box(2755, 2755), - Box(2756, 2756), - Box(2757, 2757), - Box(2758, 2758), - Box(2759, 2759), - Box(2760, 2760), - Box(2761, 2761), - Box(2762, 2762), - Box(2763, 2763), - Box(2764, 2764), - Box(2765, 2765), - Box(2766, 2766), - Box(2767, 2767), - Box(2768, 2768), - Box(2769, 2769), - Box(2770, 2770), - Box(2771, 2771), - Box(2772, 2772), - Box(2773, 2773), - Box(2774, 2774), - Box(2775, 2775), - Box(2776, 2776), - Box(2777, 2777), - Box(2778, 2778), - Box(2779, 2779), - Box(2780, 2780), - Box(2781, 2781), - Box(2782, 2782), - Box(2783, 2783), - Box(2784, 2784), - Box(2785, 2785), - Box(2786, 2786), - Box(2787, 2787), - Box(2788, 2788), - Box(2789, 2789), - Box(2790, 2790), - Box(2791, 2791), - Box(2792, 2792), - Box(2793, 2793), - Box(2794, 2794), - Box(2795, 2795), - Box(2796, 2796), - Box(2797, 2797), - Box(2798, 2798), - Box(2799, 2799), - Box(2800, 2800), - Box(2801, 2801), - Box(2802, 2802), - Box(2803, 2803), - Box(2804, 2804), - Box(2805, 2805), - Box(2806, 2806), - Box(2807, 2807), - Box(2808, 2808), - Box(2809, 2809), - Box(2810, 2810), - Box(2811, 2811), - Box(2812, 2812), - Box(2813, 2813), - Box(2814, 2814), - Box(2815, 2815), - Box(2816, 2816), - Box(2817, 2817), - Box(2818, 2818), - Box(2819, 2819), - Box(2820, 2820), - Box(2821, 2821), - Box(2822, 2822), - Box(2823, 2823), - Box(2824, 2824), - Box(2825, 2825), - Box(2826, 2826), - Box(2827, 2827), - Box(2828, 2828), - Box(2829, 2829), - Box(2830, 2830), - Box(2831, 2831), - Box(2832, 2832), - Box(2833, 2833), - Box(2834, 2834), - Box(2835, 2835), - Box(2836, 2836), - Box(2837, 2837), - Box(2838, 2838), - Box(2839, 2839), - Box(2840, 2840), - Box(2841, 2841), - Box(2842, 2842), - Box(2843, 2843), - Box(2844, 2844), - Box(2845, 2845), - Box(2846, 2846), - Box(2847, 2847), - Box(2848, 2848), - Box(2849, 2849), - Box(2850, 2850), - Box(2851, 2851), - Box(2852, 2852), - Box(2853, 2853), - Box(2854, 2854), - Box(2855, 2855), - Box(2856, 2856), - Box(2857, 2857), - Box(2858, 2858), - Box(2859, 2859), - Box(2860, 2860), - Box(2861, 2861), - Box(2862, 2862), - Box(2863, 2863), - Box(2864, 2864), - Box(2865, 2865), - Box(2866, 2866), - Box(2867, 2867), - Box(2868, 2868), - Box(2869, 2869), - Box(2870, 2870), - Box(2871, 2871), - Box(2872, 2872), - Box(2873, 2873), - Box(2874, 2874), - Box(2875, 2875), - Box(2876, 2876), - Box(2877, 2877), - Box(2878, 2878), - Box(2879, 2879), - Box(2880, 2880), - Box(2881, 2881), - Box(2882, 2882), - Box(2883, 2883), - Box(2884, 2884), - Box(2885, 2885), - Box(2886, 2886), - Box(2887, 2887), - Box(2888, 2888), - Box(2889, 2889), - Box(2890, 2890), - Box(2891, 2891), - Box(2892, 2892), - Box(2893, 2893), - Box(2894, 2894), - Box(2895, 2895), - Box(2896, 2896), - Box(2897, 2897), - Box(2898, 2898), - Box(2899, 2899), - Box(2900, 2900), - Box(2901, 2901), - Box(2902, 2902), - Box(2903, 2903), - Box(2904, 2904), - Box(2905, 2905), - Box(2906, 2906), - Box(2907, 2907), - Box(2908, 2908), - Box(2909, 2909), - Box(2910, 2910), - Box(2911, 2911), - Box(2912, 2912), - Box(2913, 2913), - Box(2914, 2914), - Box(2915, 2915), - Box(2916, 2916), - Box(2917, 2917), - Box(2918, 2918), - Box(2919, 2919), - Box(2920, 2920), - Box(2921, 2921), - Box(2922, 2922), - Box(2923, 2923), - Box(2924, 2924), - Box(2925, 2925), - Box(2926, 2926), - Box(2927, 2927), - Box(2928, 2928), - Box(2929, 2929), - Box(2930, 2930), - Box(2931, 2931), - Box(2932, 2932), - Box(2933, 2933), - Box(2934, 2934), - Box(2935, 2935), - Box(2936, 2936), - Box(2937, 2937), - Box(2938, 2938), - Box(2939, 2939), - Box(2940, 2940), - Box(2941, 2941), - Box(2942, 2942), - Box(2943, 2943), - Box(2944, 2944), - Box(2945, 2945), - Box(2946, 2946), - Box(2947, 2947), - Box(2948, 2948), - Box(2949, 2949), - Box(2950, 2950), - Box(2951, 2951), - Box(2952, 2952), - Box(2953, 2953), - Box(2954, 2954), - Box(2955, 2955), - Box(2956, 2956), - Box(2957, 2957), - Box(2958, 2958), - Box(2959, 2959), - Box(2960, 2960), - Box(2961, 2961), - Box(2962, 2962), - Box(2963, 2963), - Box(2964, 2964), - Box(2965, 2965), - Box(2966, 2966), - Box(2967, 2967), - Box(2968, 2968), - Box(2969, 2969), - Box(2970, 2970), - Box(2971, 2971), - Box(2972, 2972), - Box(2973, 2973), - Box(2974, 2974), - Box(2975, 2975), - Box(2976, 2976), - Box(2977, 2977), - Box(2978, 2978), - Box(2979, 2979), - Box(2980, 2980), - Box(2981, 2981), - Box(2982, 2982), - Box(2983, 2983), - Box(2984, 2984), - Box(2985, 2985), - Box(2986, 2986), - Box(2987, 2987), - Box(2988, 2988), - Box(2989, 2989), - Box(2990, 2990), - Box(2991, 2991), - Box(2992, 2992), - Box(2993, 2993), - Box(2994, 2994), - Box(2995, 2995), - Box(2996, 2996), - Box(2997, 2997), - Box(2998, 2998), - Box(2999, 2999), - Box(3000, 3000), - Box(3001, 3001), - Box(3002, 3002), - Box(3003, 3003), - Box(3004, 3004), - Box(3005, 3005), - Box(3006, 3006), - Box(3007, 3007), - Box(3008, 3008), - Box(3009, 3009), - Box(3010, 3010), - Box(3011, 3011), - Box(3012, 3012), - Box(3013, 3013), - Box(3014, 3014), - Box(3015, 3015), - Box(3016, 3016), - Box(3017, 3017), - Box(3018, 3018), - Box(3019, 3019), - Box(3020, 3020), - Box(3021, 3021), - Box(3022, 3022), - Box(3023, 3023), - Box(3024, 3024), - Box(3025, 3025), - Box(3026, 3026), - Box(3027, 3027), - Box(3028, 3028), - Box(3029, 3029), - Box(3030, 3030), - Box(3031, 3031), - Box(3032, 3032), - Box(3033, 3033), - Box(3034, 3034), - Box(3035, 3035), - Box(3036, 3036), - Box(3037, 3037), - Box(3038, 3038), - Box(3039, 3039), - Box(3040, 3040), - Box(3041, 3041), - Box(3042, 3042), - Box(3043, 3043), - Box(3044, 3044), - Box(3045, 3045), - Box(3046, 3046), - Box(3047, 3047), - Box(3048, 3048), - Box(3049, 3049), - Box(3050, 3050), - Box(3051, 3051), - Box(3052, 3052), - Box(3053, 3053), - Box(3054, 3054), - Box(3055, 3055), - Box(3056, 3056), - Box(3057, 3057), - Box(3058, 3058), - Box(3059, 3059), - Box(3060, 3060), - Box(3061, 3061), - Box(3062, 3062), - Box(3063, 3063), - Box(3064, 3064), - Box(3065, 3065), - Box(3066, 3066), - Box(3067, 3067), - Box(3068, 3068), - Box(3069, 3069), - Box(3070, 3070), - Box(3071, 3071), - Box(3072, 3072), - Box(3073, 3073), - Box(3074, 3074), - Box(3075, 3075), - Box(3076, 3076), - Box(3077, 3077), - Box(3078, 3078), - Box(3079, 3079), - Box(3080, 3080), - Box(3081, 3081), - Box(3082, 3082), - Box(3083, 3083), - Box(3084, 3084), - Box(3085, 3085), - Box(3086, 3086), - Box(3087, 3087), - Box(3088, 3088), - Box(3089, 3089), - Box(3090, 3090), - Box(3091, 3091), - Box(3092, 3092), - Box(3093, 3093), - Box(3094, 3094), - Box(3095, 3095), - Box(3096, 3096), - Box(3097, 3097), - Box(3098, 3098), - Box(3099, 3099), - Box(3100, 3100), - Box(3101, 3101), - Box(3102, 3102), - Box(3103, 3103), - Box(3104, 3104), - Box(3105, 3105), - Box(3106, 3106), - Box(3107, 3107), - Box(3108, 3108), - Box(3109, 3109), - Box(3110, 3110), - Box(3111, 3111), - Box(3112, 3112), - Box(3113, 3113), - Box(3114, 3114), - Box(3115, 3115), - Box(3116, 3116), - Box(3117, 3117), - Box(3118, 3118), - Box(3119, 3119), - Box(3120, 3120), - Box(3121, 3121), - Box(3122, 3122), - Box(3123, 3123), - Box(3124, 3124), - Box(3125, 3125), - Box(3126, 3126), - Box(3127, 3127), - Box(3128, 3128), - Box(3129, 3129), - Box(3130, 3130), - Box(3131, 3131), - Box(3132, 3132), - Box(3133, 3133), - Box(3134, 3134), - Box(3135, 3135), - Box(3136, 3136), - Box(3137, 3137), - Box(3138, 3138), - Box(3139, 3139), - Box(3140, 3140), - Box(3141, 3141), - Box(3142, 3142), - Box(3143, 3143), - Box(3144, 3144), - Box(3145, 3145), - Box(3146, 3146), - Box(3147, 3147), - Box(3148, 3148), - Box(3149, 3149), - Box(3150, 3150), - Box(3151, 3151), - Box(3152, 3152), - Box(3153, 3153), - Box(3154, 3154), - Box(3155, 3155), - Box(3156, 3156), - Box(3157, 3157), - Box(3158, 3158), - Box(3159, 3159), - Box(3160, 3160), - Box(3161, 3161), - Box(3162, 3162), - Box(3163, 3163), - Box(3164, 3164), - Box(3165, 3165), - Box(3166, 3166), - Box(3167, 3167), - Box(3168, 3168), - Box(3169, 3169), - Box(3170, 3170), - Box(3171, 3171), - Box(3172, 3172), - Box(3173, 3173), - Box(3174, 3174), - Box(3175, 3175), - Box(3176, 3176), - Box(3177, 3177), - Box(3178, 3178), - Box(3179, 3179), - Box(3180, 3180), - Box(3181, 3181), - Box(3182, 3182), - Box(3183, 3183), - Box(3184, 3184), - Box(3185, 3185), - Box(3186, 3186), - Box(3187, 3187), - Box(3188, 3188), - Box(3189, 3189), - Box(3190, 3190), - Box(3191, 3191), - Box(3192, 3192), - Box(3193, 3193), - Box(3194, 3194), - Box(3195, 3195), - Box(3196, 3196), - Box(3197, 3197), - Box(3198, 3198), - Box(3199, 3199), - Box(3200, 3200), - Box(3201, 3201), - Box(3202, 3202), - Box(3203, 3203), - Box(3204, 3204), - Box(3205, 3205), - Box(3206, 3206), - Box(3207, 3207), - Box(3208, 3208), - Box(3209, 3209), - Box(3210, 3210), - Box(3211, 3211), - Box(3212, 3212), - Box(3213, 3213), - Box(3214, 3214), - Box(3215, 3215), - Box(3216, 3216), - Box(3217, 3217), - Box(3218, 3218), - Box(3219, 3219), - Box(3220, 3220), - Box(3221, 3221), - Box(3222, 3222), - Box(3223, 3223), - Box(3224, 3224), - Box(3225, 3225), - Box(3226, 3226), - Box(3227, 3227), - Box(3228, 3228), - Box(3229, 3229), - Box(3230, 3230), - Box(3231, 3231), - Box(3232, 3232), - Box(3233, 3233), - Box(3234, 3234), - Box(3235, 3235), - Box(3236, 3236), - Box(3237, 3237), - Box(3238, 3238), - Box(3239, 3239), - Box(3240, 3240), - Box(3241, 3241), - Box(3242, 3242), - Box(3243, 3243), - Box(3244, 3244), - Box(3245, 3245), - Box(3246, 3246), - Box(3247, 3247), - Box(3248, 3248), - Box(3249, 3249), - Box(3250, 3250), - Box(3251, 3251), - Box(3252, 3252), - Box(3253, 3253), - Box(3254, 3254), - Box(3255, 3255), - Box(3256, 3256), - Box(3257, 3257), - Box(3258, 3258), - Box(3259, 3259), - Box(3260, 3260), - Box(3261, 3261), - Box(3262, 3262), - Box(3263, 3263), - Box(3264, 3264), - Box(3265, 3265), - Box(3266, 3266), - Box(3267, 3267), - Box(3268, 3268), - Box(3269, 3269), - Box(3270, 3270), - Box(3271, 3271), - Box(3272, 3272), - Box(3273, 3273), - Box(3274, 3274), - Box(3275, 3275), - Box(3276, 3276), - Box(3277, 3277), - Box(3278, 3278), - Box(3279, 3279), - Box(3280, 3280), - Box(3281, 3281), - Box(3282, 3282), - Box(3283, 3283), - Box(3284, 3284), - Box(3285, 3285), - Box(3286, 3286), - Box(3287, 3287), - Box(3288, 3288), - Box(3289, 3289), - Box(3290, 3290), - Box(3291, 3291), - Box(3292, 3292), - Box(3293, 3293), - Box(3294, 3294), - Box(3295, 3295), - Box(3296, 3296), - Box(3297, 3297), - Box(3298, 3298), - Box(3299, 3299), - Box(3300, 3300), - Box(3301, 3301), - Box(3302, 3302), - Box(3303, 3303), - Box(3304, 3304), - Box(3305, 3305), - Box(3306, 3306), - Box(3307, 3307), - Box(3308, 3308), - Box(3309, 3309), - Box(3310, 3310), - Box(3311, 3311), - Box(3312, 3312), - Box(3313, 3313), - Box(3314, 3314), - Box(3315, 3315), - Box(3316, 3316), - Box(3317, 3317), - Box(3318, 3318), - Box(3319, 3319), - Box(3320, 3320), - Box(3321, 3321), - Box(3322, 3322), - Box(3323, 3323), - Box(3324, 3324), - Box(3325, 3325), - Box(3326, 3326), - Box(3327, 3327), - Box(3328, 3328), - Box(3329, 3329), - Box(3330, 3330), - Box(3331, 3331), - Box(3332, 3332), - Box(3333, 3333), - Box(3334, 3334), - Box(3335, 3335), - Box(3336, 3336), - Box(3337, 3337), - Box(3338, 3338), - Box(3339, 3339), - Box(3340, 3340), - Box(3341, 3341), - Box(3342, 3342), - Box(3343, 3343), - Box(3344, 3344), - Box(3345, 3345), - Box(3346, 3346), - Box(3347, 3347), - Box(3348, 3348), - Box(3349, 3349), - Box(3350, 3350), - Box(3351, 3351), - Box(3352, 3352), - Box(3353, 3353), - Box(3354, 3354), - Box(3355, 3355), - Box(3356, 3356), - Box(3357, 3357), - Box(3358, 3358), - Box(3359, 3359), - Box(3360, 3360), - Box(3361, 3361), - Box(3362, 3362), - Box(3363, 3363), - Box(3364, 3364), - Box(3365, 3365), - Box(3366, 3366), - Box(3367, 3367), - Box(3368, 3368), - Box(3369, 3369), - Box(3370, 3370), - Box(3371, 3371), - Box(3372, 3372), - Box(3373, 3373), - Box(3374, 3374), - Box(3375, 3375), - Box(3376, 3376), - Box(3377, 3377), - Box(3378, 3378), - Box(3379, 3379), - Box(3380, 3380), - Box(3381, 3381), - Box(3382, 3382), - Box(3383, 3383), - Box(3384, 3384), - Box(3385, 3385), - Box(3386, 3386), - Box(3387, 3387), - Box(3388, 3388), - Box(3389, 3389), - Box(3390, 3390), - Box(3391, 3391), - Box(3392, 3392), - Box(3393, 3393), - Box(3394, 3394), - Box(3395, 3395), - Box(3396, 3396), - Box(3397, 3397), - Box(3398, 3398), - Box(3399, 3399), - Box(3400, 3400), - Box(3401, 3401), - Box(3402, 3402), - Box(3403, 3403), - Box(3404, 3404), - Box(3405, 3405), - Box(3406, 3406), - Box(3407, 3407), - Box(3408, 3408), - Box(3409, 3409), - Box(3410, 3410), - Box(3411, 3411), - Box(3412, 3412), - Box(3413, 3413), - Box(3414, 3414), - Box(3415, 3415), - Box(3416, 3416), - Box(3417, 3417), - Box(3418, 3418), - Box(3419, 3419), - Box(3420, 3420), - Box(3421, 3421), - Box(3422, 3422), - Box(3423, 3423), - Box(3424, 3424), - Box(3425, 3425), - Box(3426, 3426), - Box(3427, 3427), - Box(3428, 3428), - Box(3429, 3429), - Box(3430, 3430), - Box(3431, 3431), - Box(3432, 3432), - Box(3433, 3433), - Box(3434, 3434), - Box(3435, 3435), - Box(3436, 3436), - Box(3437, 3437), - Box(3438, 3438), - Box(3439, 3439), - Box(3440, 3440), - Box(3441, 3441), - Box(3442, 3442), - Box(3443, 3443), - Box(3444, 3444), - Box(3445, 3445), - Box(3446, 3446), - Box(3447, 3447), - Box(3448, 3448), - Box(3449, 3449), - Box(3450, 3450), - Box(3451, 3451), - Box(3452, 3452), - Box(3453, 3453), - Box(3454, 3454), - Box(3455, 3455), - Box(3456, 3456), - Box(3457, 3457), - Box(3458, 3458), - Box(3459, 3459), - Box(3460, 3460), - Box(3461, 3461), - Box(3462, 3462), - Box(3463, 3463), - Box(3464, 3464), - Box(3465, 3465), - Box(3466, 3466), - Box(3467, 3467), - Box(3468, 3468), - Box(3469, 3469), - Box(3470, 3470), - Box(3471, 3471), - Box(3472, 3472), - Box(3473, 3473), - Box(3474, 3474), - Box(3475, 3475), - Box(3476, 3476), - Box(3477, 3477), - Box(3478, 3478), - Box(3479, 3479), - Box(3480, 3480), - Box(3481, 3481), - Box(3482, 3482), - Box(3483, 3483), - Box(3484, 3484), - Box(3485, 3485), - Box(3486, 3486), - Box(3487, 3487), - Box(3488, 3488), - Box(3489, 3489), - Box(3490, 3490), - Box(3491, 3491), - Box(3492, 3492), - Box(3493, 3493), - Box(3494, 3494), - Box(3495, 3495), - Box(3496, 3496), - Box(3497, 3497), - Box(3498, 3498), - Box(3499, 3499), - Box(3500, 3500), - Box(3501, 3501), - Box(3502, 3502), - Box(3503, 3503), - Box(3504, 3504), - Box(3505, 3505), - Box(3506, 3506), - Box(3507, 3507), - Box(3508, 3508), - Box(3509, 3509), - Box(3510, 3510), - Box(3511, 3511), - Box(3512, 3512), - Box(3513, 3513), - Box(3514, 3514), - Box(3515, 3515), - Box(3516, 3516), - Box(3517, 3517), - Box(3518, 3518), - Box(3519, 3519), - Box(3520, 3520), - Box(3521, 3521), - Box(3522, 3522), - Box(3523, 3523), - Box(3524, 3524), - Box(3525, 3525), - Box(3526, 3526), - Box(3527, 3527), - Box(3528, 3528), - Box(3529, 3529), - Box(3530, 3530), - Box(3531, 3531), - Box(3532, 3532), - Box(3533, 3533), - Box(3534, 3534), - Box(3535, 3535), - Box(3536, 3536), - Box(3537, 3537), - Box(3538, 3538), - Box(3539, 3539), - Box(3540, 3540), - Box(3541, 3541), - Box(3542, 3542), - Box(3543, 3543), - Box(3544, 3544), - Box(3545, 3545), - Box(3546, 3546), - Box(3547, 3547), - Box(3548, 3548), - Box(3549, 3549), - Box(3550, 3550), - Box(3551, 3551), - Box(3552, 3552), - Box(3553, 3553), - Box(3554, 3554), - Box(3555, 3555), - Box(3556, 3556), - Box(3557, 3557), - Box(3558, 3558), - Box(3559, 3559), - Box(3560, 3560), - Box(3561, 3561), - Box(3562, 3562), - Box(3563, 3563), - Box(3564, 3564), - Box(3565, 3565), - Box(3566, 3566), - Box(3567, 3567), - Box(3568, 3568), - Box(3569, 3569), - Box(3570, 3570), - Box(3571, 3571), - Box(3572, 3572), - Box(3573, 3573), - Box(3574, 3574), - Box(3575, 3575), - Box(3576, 3576), - Box(3577, 3577), - Box(3578, 3578), - Box(3579, 3579), - Box(3580, 3580), - Box(3581, 3581), - Box(3582, 3582), - Box(3583, 3583), - Box(3584, 3584), - Box(3585, 3585), - Box(3586, 3586), - Box(3587, 3587), - Box(3588, 3588), - Box(3589, 3589), - Box(3590, 3590), - Box(3591, 3591), - Box(3592, 3592), - Box(3593, 3593), - Box(3594, 3594), - Box(3595, 3595), - Box(3596, 3596), - Box(3597, 3597), - Box(3598, 3598), - Box(3599, 3599), - Box(3600, 3600), - Box(3601, 3601), - Box(3602, 3602), - Box(3603, 3603), - Box(3604, 3604), - Box(3605, 3605), - Box(3606, 3606), - Box(3607, 3607), - Box(3608, 3608), - Box(3609, 3609), - Box(3610, 3610), - Box(3611, 3611), - Box(3612, 3612), - Box(3613, 3613), - Box(3614, 3614), - Box(3615, 3615), - Box(3616, 3616), - Box(3617, 3617), - Box(3618, 3618), - Box(3619, 3619), - Box(3620, 3620), - Box(3621, 3621), - Box(3622, 3622), - Box(3623, 3623), - Box(3624, 3624), - Box(3625, 3625), - Box(3626, 3626), - Box(3627, 3627), - Box(3628, 3628), - Box(3629, 3629), - Box(3630, 3630), - Box(3631, 3631), - Box(3632, 3632), - Box(3633, 3633), - Box(3634, 3634), - Box(3635, 3635), - Box(3636, 3636), - Box(3637, 3637), - Box(3638, 3638), - Box(3639, 3639), - Box(3640, 3640), - Box(3641, 3641), - Box(3642, 3642), - Box(3643, 3643), - Box(3644, 3644), - Box(3645, 3645), - Box(3646, 3646), - Box(3647, 3647), - Box(3648, 3648), - Box(3649, 3649), - Box(3650, 3650), - Box(3651, 3651), - Box(3652, 3652), - Box(3653, 3653), - Box(3654, 3654), - Box(3655, 3655), - Box(3656, 3656), - Box(3657, 3657), - Box(3658, 3658), - Box(3659, 3659), - Box(3660, 3660), - Box(3661, 3661), - Box(3662, 3662), - Box(3663, 3663), - Box(3664, 3664), - Box(3665, 3665), - Box(3666, 3666), - Box(3667, 3667), - Box(3668, 3668), - Box(3669, 3669), - Box(3670, 3670), - Box(3671, 3671), - Box(3672, 3672), - Box(3673, 3673), - Box(3674, 3674), - Box(3675, 3675), - Box(3676, 3676), - Box(3677, 3677), - Box(3678, 3678), - Box(3679, 3679), - Box(3680, 3680), - Box(3681, 3681), - Box(3682, 3682), - Box(3683, 3683), - Box(3684, 3684), - Box(3685, 3685), - Box(3686, 3686), - Box(3687, 3687), - Box(3688, 3688), - Box(3689, 3689), - Box(3690, 3690), - Box(3691, 3691), - Box(3692, 3692), - Box(3693, 3693), - Box(3694, 3694), - Box(3695, 3695), - Box(3696, 3696), - Box(3697, 3697), - Box(3698, 3698), - Box(3699, 3699), - Box(3700, 3700), - Box(3701, 3701), - Box(3702, 3702), - Box(3703, 3703), - Box(3704, 3704), - Box(3705, 3705), - Box(3706, 3706), - Box(3707, 3707), - Box(3708, 3708), - Box(3709, 3709), - Box(3710, 3710), - Box(3711, 3711), - Box(3712, 3712), - Box(3713, 3713), - Box(3714, 3714), - Box(3715, 3715), - Box(3716, 3716), - Box(3717, 3717), - Box(3718, 3718), - Box(3719, 3719), - Box(3720, 3720), - Box(3721, 3721), - Box(3722, 3722), - Box(3723, 3723), - Box(3724, 3724), - Box(3725, 3725), - Box(3726, 3726), - Box(3727, 3727), - Box(3728, 3728), - Box(3729, 3729), - Box(3730, 3730), - Box(3731, 3731), - Box(3732, 3732), - Box(3733, 3733), - Box(3734, 3734), - Box(3735, 3735), - Box(3736, 3736), - Box(3737, 3737), - Box(3738, 3738), - Box(3739, 3739), - Box(3740, 3740), - Box(3741, 3741), - Box(3742, 3742), - Box(3743, 3743), - Box(3744, 3744), - Box(3745, 3745), - Box(3746, 3746), - Box(3747, 3747), - Box(3748, 3748), - Box(3749, 3749), - Box(3750, 3750), - Box(3751, 3751), - Box(3752, 3752), - Box(3753, 3753), - Box(3754, 3754), - Box(3755, 3755), - Box(3756, 3756), - Box(3757, 3757), - Box(3758, 3758), - Box(3759, 3759), - Box(3760, 3760), - Box(3761, 3761), - Box(3762, 3762), - Box(3763, 3763), - Box(3764, 3764), - Box(3765, 3765), - Box(3766, 3766), - Box(3767, 3767), - Box(3768, 3768), - Box(3769, 3769), - Box(3770, 3770), - Box(3771, 3771), - Box(3772, 3772), - Box(3773, 3773), - Box(3774, 3774), - Box(3775, 3775), - Box(3776, 3776), - Box(3777, 3777), - Box(3778, 3778), - Box(3779, 3779), - Box(3780, 3780), - Box(3781, 3781), - Box(3782, 3782), - Box(3783, 3783), - Box(3784, 3784), - Box(3785, 3785), - Box(3786, 3786), - Box(3787, 3787), - Box(3788, 3788), - Box(3789, 3789), - Box(3790, 3790), - Box(3791, 3791), - Box(3792, 3792), - Box(3793, 3793), - Box(3794, 3794), - Box(3795, 3795), - Box(3796, 3796), - Box(3797, 3797), - Box(3798, 3798), - Box(3799, 3799), - Box(3800, 3800), - Box(3801, 3801), - Box(3802, 3802), - Box(3803, 3803), - Box(3804, 3804), - Box(3805, 3805), - Box(3806, 3806), - Box(3807, 3807), - Box(3808, 3808), - Box(3809, 3809), - Box(3810, 3810), - Box(3811, 3811), - Box(3812, 3812), - Box(3813, 3813), - Box(3814, 3814), - Box(3815, 3815), - Box(3816, 3816), - Box(3817, 3817), - Box(3818, 3818), - Box(3819, 3819), - Box(3820, 3820), - Box(3821, 3821), - Box(3822, 3822), - Box(3823, 3823), - Box(3824, 3824), - Box(3825, 3825), - Box(3826, 3826), - Box(3827, 3827), - Box(3828, 3828), - Box(3829, 3829), - Box(3830, 3830), - Box(3831, 3831), - Box(3832, 3832), - Box(3833, 3833), - Box(3834, 3834), - Box(3835, 3835), - Box(3836, 3836), - Box(3837, 3837), - Box(3838, 3838), - Box(3839, 3839), - Box(3840, 3840), - Box(3841, 3841), - Box(3842, 3842), - Box(3843, 3843), - Box(3844, 3844), - Box(3845, 3845), - Box(3846, 3846), - Box(3847, 3847), - Box(3848, 3848), - Box(3849, 3849), - Box(3850, 3850), - Box(3851, 3851), - Box(3852, 3852), - Box(3853, 3853), - Box(3854, 3854), - Box(3855, 3855), - Box(3856, 3856), - Box(3857, 3857), - Box(3858, 3858), - Box(3859, 3859), - Box(3860, 3860), - Box(3861, 3861), - Box(3862, 3862), - Box(3863, 3863), - Box(3864, 3864), - Box(3865, 3865), - Box(3866, 3866), - Box(3867, 3867), - Box(3868, 3868), - Box(3869, 3869), - Box(3870, 3870), - Box(3871, 3871), - Box(3872, 3872), - Box(3873, 3873), - Box(3874, 3874), - Box(3875, 3875), - Box(3876, 3876), - Box(3877, 3877), - Box(3878, 3878), - Box(3879, 3879), - Box(3880, 3880), - Box(3881, 3881), - Box(3882, 3882), - Box(3883, 3883), - Box(3884, 3884), - Box(3885, 3885), - Box(3886, 3886), - Box(3887, 3887), - Box(3888, 3888), - Box(3889, 3889), - Box(3890, 3890), - Box(3891, 3891), - Box(3892, 3892), - Box(3893, 3893), - Box(3894, 3894), - Box(3895, 3895), - Box(3896, 3896), - Box(3897, 3897), - Box(3898, 3898), - Box(3899, 3899), - Box(3900, 3900), - Box(3901, 3901), - Box(3902, 3902), - Box(3903, 3903), - Box(3904, 3904), - Box(3905, 3905), - Box(3906, 3906), - Box(3907, 3907), - Box(3908, 3908), - Box(3909, 3909), - Box(3910, 3910), - Box(3911, 3911), - Box(3912, 3912), - Box(3913, 3913), - Box(3914, 3914), - Box(3915, 3915), - Box(3916, 3916), - Box(3917, 3917), - Box(3918, 3918), - Box(3919, 3919), - Box(3920, 3920), - Box(3921, 3921), - Box(3922, 3922), - Box(3923, 3923), - Box(3924, 3924), - Box(3925, 3925), - Box(3926, 3926), - Box(3927, 3927), - Box(3928, 3928), - Box(3929, 3929), - Box(3930, 3930), - Box(3931, 3931), - Box(3932, 3932), - Box(3933, 3933), - Box(3934, 3934), - Box(3935, 3935), - Box(3936, 3936), - Box(3937, 3937), - Box(3938, 3938), - Box(3939, 3939), - Box(3940, 3940), - Box(3941, 3941), - Box(3942, 3942), - Box(3943, 3943), - Box(3944, 3944), - Box(3945, 3945), - Box(3946, 3946), - Box(3947, 3947), - Box(3948, 3948), - Box(3949, 3949), - Box(3950, 3950), - Box(3951, 3951), - Box(3952, 3952), - Box(3953, 3953), - Box(3954, 3954), - Box(3955, 3955), - Box(3956, 3956), - Box(3957, 3957), - Box(3958, 3958), - Box(3959, 3959), - Box(3960, 3960), - Box(3961, 3961), - Box(3962, 3962), - Box(3963, 3963), - Box(3964, 3964), - Box(3965, 3965), - Box(3966, 3966), - Box(3967, 3967), - Box(3968, 3968), - Box(3969, 3969), - Box(3970, 3970), - Box(3971, 3971), - Box(3972, 3972), - Box(3973, 3973), - Box(3974, 3974), - Box(3975, 3975), - Box(3976, 3976), - Box(3977, 3977), - Box(3978, 3978), - Box(3979, 3979), - Box(3980, 3980), - Box(3981, 3981), - Box(3982, 3982), - Box(3983, 3983), - Box(3984, 3984), - Box(3985, 3985), - Box(3986, 3986), - Box(3987, 3987), - Box(3988, 3988), - Box(3989, 3989), - Box(3990, 3990), - Box(3991, 3991), - Box(3992, 3992), - Box(3993, 3993), - Box(3994, 3994), - Box(3995, 3995), - Box(3996, 3996), - Box(3997, 3997), - Box(3998, 3998), - Box(3999, 3999), - Box(4000, 4000), - Box(4001, 4001), - Box(4002, 4002), - Box(4003, 4003), - Box(4004, 4004), - Box(4005, 4005), - Box(4006, 4006), - Box(4007, 4007), - Box(4008, 4008), - Box(4009, 4009), - Box(4010, 4010), - Box(4011, 4011), - Box(4012, 4012), - Box(4013, 4013), - Box(4014, 4014), - Box(4015, 4015), - Box(4016, 4016), - Box(4017, 4017), - Box(4018, 4018), - Box(4019, 4019), - Box(4020, 4020), - Box(4021, 4021), - Box(4022, 4022), - Box(4023, 4023), - Box(4024, 4024), - Box(4025, 4025), - Box(4026, 4026), - Box(4027, 4027), - Box(4028, 4028), - Box(4029, 4029), - Box(4030, 4030), - Box(4031, 4031), - Box(4032, 4032), - Box(4033, 4033), - Box(4034, 4034), - Box(4035, 4035), - Box(4036, 4036), - Box(4037, 4037), - Box(4038, 4038), - Box(4039, 4039), - Box(4040, 4040), - Box(4041, 4041), - Box(4042, 4042), - Box(4043, 4043), - Box(4044, 4044), - Box(4045, 4045), - Box(4046, 4046), - Box(4047, 4047), - Box(4048, 4048), - Box(4049, 4049), - Box(4050, 4050), - Box(4051, 4051), - Box(4052, 4052), - Box(4053, 4053), - Box(4054, 4054), - Box(4055, 4055), - Box(4056, 4056), - Box(4057, 4057), - Box(4058, 4058), - Box(4059, 4059), - Box(4060, 4060), - Box(4061, 4061), - Box(4062, 4062), - Box(4063, 4063), - Box(4064, 4064), - Box(4065, 4065), - Box(4066, 4066), - Box(4067, 4067), - Box(4068, 4068), - Box(4069, 4069), - Box(4070, 4070), - Box(4071, 4071), - Box(4072, 4072), - Box(4073, 4073), - Box(4074, 4074), - Box(4075, 4075), - Box(4076, 4076), - Box(4077, 4077), - Box(4078, 4078), - Box(4079, 4079), - Box(4080, 4080), - Box(4081, 4081), - Box(4082, 4082), - Box(4083, 4083), - Box(4084, 4084), - Box(4085, 4085), - Box(4086, 4086), - Box(4087, 4087), - Box(4088, 4088), - Box(4089, 4089), - Box(4090, 4090), - Box(4091, 4091), - Box(4092, 4092), - Box(4093, 4093), - Box(4094, 4094), - Box(4095, 4095), - Box(4096, 4096), - Box(4097, 4097), - Box(4098, 4098), - Box(4099, 4099), - Box(4100, 4100), - Box(4101, 4101), - Box(4102, 4102), - Box(4103, 4103), - Box(4104, 4104), - Box(4105, 4105), - Box(4106, 4106), - Box(4107, 4107), - Box(4108, 4108), - Box(4109, 4109), - Box(4110, 4110), - Box(4111, 4111), - Box(4112, 4112), - Box(4113, 4113), - Box(4114, 4114), - Box(4115, 4115), - Box(4116, 4116), - Box(4117, 4117), - Box(4118, 4118), - Box(4119, 4119), - Box(4120, 4120), - Box(4121, 4121), - Box(4122, 4122), - Box(4123, 4123), - Box(4124, 4124), - Box(4125, 4125), - Box(4126, 4126), - Box(4127, 4127), - Box(4128, 4128), - Box(4129, 4129), - Box(4130, 4130), - Box(4131, 4131), - Box(4132, 4132), - Box(4133, 4133), - Box(4134, 4134), - Box(4135, 4135), - Box(4136, 4136), - Box(4137, 4137), - Box(4138, 4138), - Box(4139, 4139), - Box(4140, 4140), - Box(4141, 4141), - Box(4142, 4142), - Box(4143, 4143), - Box(4144, 4144), - Box(4145, 4145), - Box(4146, 4146), - Box(4147, 4147), - Box(4148, 4148), - Box(4149, 4149), - Box(4150, 4150), - Box(4151, 4151), - Box(4152, 4152), - Box(4153, 4153), - Box(4154, 4154), - Box(4155, 4155), - Box(4156, 4156), - Box(4157, 4157), - Box(4158, 4158), - Box(4159, 4159), - Box(4160, 4160), - Box(4161, 4161), - Box(4162, 4162), - Box(4163, 4163), - Box(4164, 4164), - Box(4165, 4165), - Box(4166, 4166), - Box(4167, 4167), - Box(4168, 4168), - Box(4169, 4169), - Box(4170, 4170), - Box(4171, 4171), - Box(4172, 4172), - Box(4173, 4173), - Box(4174, 4174), - Box(4175, 4175), - Box(4176, 4176), - Box(4177, 4177), - Box(4178, 4178), - Box(4179, 4179), - Box(4180, 4180), - Box(4181, 4181), - Box(4182, 4182), - Box(4183, 4183), - Box(4184, 4184), - Box(4185, 4185), - Box(4186, 4186), - Box(4187, 4187), - Box(4188, 4188), - Box(4189, 4189), - Box(4190, 4190), - Box(4191, 4191), - Box(4192, 4192), - Box(4193, 4193), - Box(4194, 4194), - Box(4195, 4195), - Box(4196, 4196), - Box(4197, 4197), - Box(4198, 4198), - Box(4199, 4199), - Box(4200, 4200), - Box(4201, 4201), - Box(4202, 4202), - Box(4203, 4203), - Box(4204, 4204), - Box(4205, 4205), - Box(4206, 4206), - Box(4207, 4207), - Box(4208, 4208), - Box(4209, 4209), - Box(4210, 4210), - Box(4211, 4211), - Box(4212, 4212), - Box(4213, 4213), - Box(4214, 4214), - Box(4215, 4215), - Box(4216, 4216), - Box(4217, 4217), - Box(4218, 4218), - Box(4219, 4219), - Box(4220, 4220), - Box(4221, 4221), - Box(4222, 4222), - Box(4223, 4223), - Box(4224, 4224), - Box(4225, 4225), - Box(4226, 4226), - Box(4227, 4227), - Box(4228, 4228), - Box(4229, 4229), - Box(4230, 4230), - Box(4231, 4231), - Box(4232, 4232), - Box(4233, 4233), - Box(4234, 4234), - Box(4235, 4235), - Box(4236, 4236), - Box(4237, 4237), - Box(4238, 4238), - Box(4239, 4239), - Box(4240, 4240), - Box(4241, 4241), - Box(4242, 4242), - Box(4243, 4243), - Box(4244, 4244), - Box(4245, 4245), - Box(4246, 4246), - Box(4247, 4247), - Box(4248, 4248), - Box(4249, 4249), - Box(4250, 4250), - Box(4251, 4251), - Box(4252, 4252), - Box(4253, 4253), - Box(4254, 4254), - Box(4255, 4255), - Box(4256, 4256), - Box(4257, 4257), - Box(4258, 4258), - Box(4259, 4259), - Box(4260, 4260), - Box(4261, 4261), - Box(4262, 4262), - Box(4263, 4263), - Box(4264, 4264), - Box(4265, 4265), - Box(4266, 4266), - Box(4267, 4267), - Box(4268, 4268), - Box(4269, 4269), - Box(4270, 4270), - Box(4271, 4271), - Box(4272, 4272), - Box(4273, 4273), - Box(4274, 4274), - Box(4275, 4275), - Box(4276, 4276), - Box(4277, 4277), - Box(4278, 4278), - Box(4279, 4279), - Box(4280, 4280), - Box(4281, 4281), - Box(4282, 4282), - Box(4283, 4283), - Box(4284, 4284), - Box(4285, 4285), - Box(4286, 4286), - Box(4287, 4287), - Box(4288, 4288), - Box(4289, 4289), - Box(4290, 4290), - Box(4291, 4291), - Box(4292, 4292), - Box(4293, 4293), - Box(4294, 4294), - Box(4295, 4295), - Box(4296, 4296), - Box(4297, 4297), - Box(4298, 4298), - Box(4299, 4299), - Box(4300, 4300), - Box(4301, 4301), - Box(4302, 4302), - Box(4303, 4303), - Box(4304, 4304), - Box(4305, 4305), - Box(4306, 4306), - Box(4307, 4307), - Box(4308, 4308), - Box(4309, 4309), - Box(4310, 4310), - Box(4311, 4311), - Box(4312, 4312), - Box(4313, 4313), - Box(4314, 4314), - Box(4315, 4315), - Box(4316, 4316), - Box(4317, 4317), - Box(4318, 4318), - Box(4319, 4319), - Box(4320, 4320), - Box(4321, 4321), - Box(4322, 4322), - Box(4323, 4323), - Box(4324, 4324), - Box(4325, 4325), - Box(4326, 4326), - Box(4327, 4327), - Box(4328, 4328), - Box(4329, 4329), - Box(4330, 4330), - Box(4331, 4331), - Box(4332, 4332), - Box(4333, 4333), - Box(4334, 4334), - Box(4335, 4335), - Box(4336, 4336), - Box(4337, 4337), - Box(4338, 4338), - Box(4339, 4339), - Box(4340, 4340), - Box(4341, 4341), - Box(4342, 4342), - Box(4343, 4343), - Box(4344, 4344), - Box(4345, 4345), - Box(4346, 4346), - Box(4347, 4347), - Box(4348, 4348), - Box(4349, 4349), - Box(4350, 4350), - Box(4351, 4351), - Box(4352, 4352), - Box(4353, 4353), - Box(4354, 4354), - Box(4355, 4355), - Box(4356, 4356), - Box(4357, 4357), - Box(4358, 4358), - Box(4359, 4359), - Box(4360, 4360), - Box(4361, 4361), - Box(4362, 4362), - Box(4363, 4363), - Box(4364, 4364), - Box(4365, 4365), - Box(4366, 4366), - Box(4367, 4367), - Box(4368, 4368), - Box(4369, 4369), - Box(4370, 4370), - Box(4371, 4371), - Box(4372, 4372), - Box(4373, 4373), - Box(4374, 4374), - Box(4375, 4375), - Box(4376, 4376), - Box(4377, 4377), - Box(4378, 4378), - Box(4379, 4379), - Box(4380, 4380), - Box(4381, 4381), - Box(4382, 4382), - Box(4383, 4383), - Box(4384, 4384), - Box(4385, 4385), - Box(4386, 4386), - Box(4387, 4387), - Box(4388, 4388), - Box(4389, 4389), - Box(4390, 4390), - Box(4391, 4391), - Box(4392, 4392), - Box(4393, 4393), - Box(4394, 4394), - Box(4395, 4395), - Box(4396, 4396), - Box(4397, 4397), - Box(4398, 4398), - Box(4399, 4399), - Box(4400, 4400), - Box(4401, 4401), - Box(4402, 4402), - Box(4403, 4403), - Box(4404, 4404), - Box(4405, 4405), - Box(4406, 4406), - Box(4407, 4407), - Box(4408, 4408), - Box(4409, 4409), - Box(4410, 4410), - Box(4411, 4411), - Box(4412, 4412), - Box(4413, 4413), - Box(4414, 4414), - Box(4415, 4415), - Box(4416, 4416), - Box(4417, 4417), - Box(4418, 4418), - Box(4419, 4419), - Box(4420, 4420), - Box(4421, 4421), - Box(4422, 4422), - Box(4423, 4423), - Box(4424, 4424), - Box(4425, 4425), - Box(4426, 4426), - Box(4427, 4427), - Box(4428, 4428), - Box(4429, 4429), - Box(4430, 4430), - Box(4431, 4431), - Box(4432, 4432), - Box(4433, 4433), - Box(4434, 4434), - Box(4435, 4435), - Box(4436, 4436), - Box(4437, 4437), - Box(4438, 4438), - Box(4439, 4439), - Box(4440, 4440), - Box(4441, 4441), - Box(4442, 4442), - Box(4443, 4443), - Box(4444, 4444), - Box(4445, 4445), - Box(4446, 4446), - Box(4447, 4447), - Box(4448, 4448), - Box(4449, 4449), - Box(4450, 4450), - Box(4451, 4451), - Box(4452, 4452), - Box(4453, 4453), - Box(4454, 4454), - Box(4455, 4455), - Box(4456, 4456), - Box(4457, 4457), - Box(4458, 4458), - Box(4459, 4459), - Box(4460, 4460), - Box(4461, 4461), - Box(4462, 4462), - Box(4463, 4463), - Box(4464, 4464), - Box(4465, 4465), - Box(4466, 4466), - Box(4467, 4467), - Box(4468, 4468), - Box(4469, 4469), - Box(4470, 4470), - Box(4471, 4471), - Box(4472, 4472), - Box(4473, 4473), - Box(4474, 4474), - Box(4475, 4475), - Box(4476, 4476), - Box(4477, 4477), - Box(4478, 4478), - Box(4479, 4479), - Box(4480, 4480), - Box(4481, 4481), - Box(4482, 4482), - Box(4483, 4483), - Box(4484, 4484), - Box(4485, 4485), - Box(4486, 4486), - Box(4487, 4487), - Box(4488, 4488), - Box(4489, 4489), - Box(4490, 4490), - Box(4491, 4491), - Box(4492, 4492), - Box(4493, 4493), - Box(4494, 4494), - Box(4495, 4495), - Box(4496, 4496), - Box(4497, 4497), - Box(4498, 4498), - Box(4499, 4499), - Box(4500, 4500), - Box(4501, 4501), - Box(4502, 4502), - Box(4503, 4503), - Box(4504, 4504), - Box(4505, 4505), - Box(4506, 4506), - Box(4507, 4507), - Box(4508, 4508), - Box(4509, 4509), - Box(4510, 4510), - Box(4511, 4511), - Box(4512, 4512), - Box(4513, 4513), - Box(4514, 4514), - Box(4515, 4515), - Box(4516, 4516), - Box(4517, 4517), - Box(4518, 4518), - Box(4519, 4519), - Box(4520, 4520), - Box(4521, 4521), - Box(4522, 4522), - Box(4523, 4523), - Box(4524, 4524), - Box(4525, 4525), - Box(4526, 4526), - Box(4527, 4527), - Box(4528, 4528), - Box(4529, 4529), - Box(4530, 4530), - Box(4531, 4531), - Box(4532, 4532), - Box(4533, 4533), - Box(4534, 4534), - Box(4535, 4535), - Box(4536, 4536), - Box(4537, 4537), - Box(4538, 4538), - Box(4539, 4539), - Box(4540, 4540), - Box(4541, 4541), - Box(4542, 4542), - Box(4543, 4543), - Box(4544, 4544), - Box(4545, 4545), - Box(4546, 4546), - Box(4547, 4547), - Box(4548, 4548), - Box(4549, 4549), - Box(4550, 4550), - Box(4551, 4551), - Box(4552, 4552), - Box(4553, 4553), - Box(4554, 4554), - Box(4555, 4555), - Box(4556, 4556), - Box(4557, 4557), - Box(4558, 4558), - Box(4559, 4559), - Box(4560, 4560), - Box(4561, 4561), - Box(4562, 4562), - Box(4563, 4563), - Box(4564, 4564), - Box(4565, 4565), - Box(4566, 4566), - Box(4567, 4567), - Box(4568, 4568), - Box(4569, 4569), - Box(4570, 4570), - Box(4571, 4571), - Box(4572, 4572), - Box(4573, 4573), - Box(4574, 4574), - Box(4575, 4575), - Box(4576, 4576), - Box(4577, 4577), - Box(4578, 4578), - Box(4579, 4579), - Box(4580, 4580), - Box(4581, 4581), - Box(4582, 4582), - Box(4583, 4583), - Box(4584, 4584), - Box(4585, 4585), - Box(4586, 4586), - Box(4587, 4587), - Box(4588, 4588), - Box(4589, 4589), - Box(4590, 4590), - Box(4591, 4591), - Box(4592, 4592), - Box(4593, 4593), - Box(4594, 4594), - Box(4595, 4595), - Box(4596, 4596), - Box(4597, 4597), - Box(4598, 4598), - Box(4599, 4599), - Box(4600, 4600), - Box(4601, 4601), - Box(4602, 4602), - Box(4603, 4603), - Box(4604, 4604), - Box(4605, 4605), - Box(4606, 4606), - Box(4607, 4607), - Box(4608, 4608), - Box(4609, 4609), - Box(4610, 4610), - Box(4611, 4611), - Box(4612, 4612), - Box(4613, 4613), - Box(4614, 4614), - Box(4615, 4615), - Box(4616, 4616), - Box(4617, 4617), - Box(4618, 4618), - Box(4619, 4619), - Box(4620, 4620), - Box(4621, 4621), - Box(4622, 4622), - Box(4623, 4623), - Box(4624, 4624), - Box(4625, 4625), - Box(4626, 4626), - Box(4627, 4627), - Box(4628, 4628), - Box(4629, 4629), - Box(4630, 4630), - Box(4631, 4631), - Box(4632, 4632), - Box(4633, 4633), - Box(4634, 4634), - Box(4635, 4635), - Box(4636, 4636), - Box(4637, 4637), - Box(4638, 4638), - Box(4639, 4639), - Box(4640, 4640), - Box(4641, 4641), - Box(4642, 4642), - Box(4643, 4643), - Box(4644, 4644), - Box(4645, 4645), - Box(4646, 4646), - Box(4647, 4647), - Box(4648, 4648), - Box(4649, 4649), - Box(4650, 4650), - Box(4651, 4651), - Box(4652, 4652), - Box(4653, 4653), - Box(4654, 4654), - Box(4655, 4655), - Box(4656, 4656), - Box(4657, 4657), - Box(4658, 4658), - Box(4659, 4659), - Box(4660, 4660), - Box(4661, 4661), - Box(4662, 4662), - Box(4663, 4663), - Box(4664, 4664), - Box(4665, 4665), - Box(4666, 4666), - Box(4667, 4667), - Box(4668, 4668), - Box(4669, 4669), - Box(4670, 4670), - Box(4671, 4671), - Box(4672, 4672), - Box(4673, 4673), - Box(4674, 4674), - Box(4675, 4675), - Box(4676, 4676), - Box(4677, 4677), - Box(4678, 4678), - Box(4679, 4679), - Box(4680, 4680), - Box(4681, 4681), - Box(4682, 4682), - Box(4683, 4683), - Box(4684, 4684), - Box(4685, 4685), - Box(4686, 4686), - Box(4687, 4687), - Box(4688, 4688), - Box(4689, 4689), - Box(4690, 4690), - Box(4691, 4691), - Box(4692, 4692), - Box(4693, 4693), - Box(4694, 4694), - Box(4695, 4695), - Box(4696, 4696), - Box(4697, 4697), - Box(4698, 4698), - Box(4699, 4699), - Box(4700, 4700), - Box(4701, 4701), - Box(4702, 4702), - Box(4703, 4703), - Box(4704, 4704), - Box(4705, 4705), - Box(4706, 4706), - Box(4707, 4707), - Box(4708, 4708), - Box(4709, 4709), - Box(4710, 4710), - Box(4711, 4711), - Box(4712, 4712), - Box(4713, 4713), - Box(4714, 4714), - Box(4715, 4715), - Box(4716, 4716), - Box(4717, 4717), - Box(4718, 4718), - Box(4719, 4719), - Box(4720, 4720), - Box(4721, 4721), - Box(4722, 4722), - Box(4723, 4723), - Box(4724, 4724), - Box(4725, 4725), - Box(4726, 4726), - Box(4727, 4727), - Box(4728, 4728), - Box(4729, 4729), - Box(4730, 4730), - Box(4731, 4731), - Box(4732, 4732), - Box(4733, 4733), - Box(4734, 4734), - Box(4735, 4735), - Box(4736, 4736), - Box(4737, 4737), - Box(4738, 4738), - Box(4739, 4739), - Box(4740, 4740), - Box(4741, 4741), - Box(4742, 4742), - Box(4743, 4743), - Box(4744, 4744), - Box(4745, 4745), - Box(4746, 4746), - Box(4747, 4747), - Box(4748, 4748), - Box(4749, 4749), - Box(4750, 4750), - Box(4751, 4751), - Box(4752, 4752), - Box(4753, 4753), - Box(4754, 4754), - Box(4755, 4755), - Box(4756, 4756), - Box(4757, 4757), - Box(4758, 4758), - Box(4759, 4759), - Box(4760, 4760), - Box(4761, 4761), - Box(4762, 4762), - Box(4763, 4763), - Box(4764, 4764), - Box(4765, 4765), - Box(4766, 4766), - Box(4767, 4767), - Box(4768, 4768), - Box(4769, 4769), - Box(4770, 4770), - Box(4771, 4771), - Box(4772, 4772), - Box(4773, 4773), - Box(4774, 4774), - Box(4775, 4775), - Box(4776, 4776), - Box(4777, 4777), - Box(4778, 4778), - Box(4779, 4779), - Box(4780, 4780), - Box(4781, 4781), - Box(4782, 4782), - Box(4783, 4783), - Box(4784, 4784), - Box(4785, 4785), - Box(4786, 4786), - Box(4787, 4787), - Box(4788, 4788), - Box(4789, 4789), - Box(4790, 4790), - Box(4791, 4791), - Box(4792, 4792), - Box(4793, 4793), - Box(4794, 4794), - Box(4795, 4795), - Box(4796, 4796), - Box(4797, 4797), - Box(4798, 4798), - Box(4799, 4799), - Box(4800, 4800), - Box(4801, 4801), - Box(4802, 4802), - Box(4803, 4803), - Box(4804, 4804), - Box(4805, 4805), - Box(4806, 4806), - Box(4807, 4807), - Box(4808, 4808), - Box(4809, 4809), - Box(4810, 4810), - Box(4811, 4811), - Box(4812, 4812), - Box(4813, 4813), - Box(4814, 4814), - Box(4815, 4815), - Box(4816, 4816), - Box(4817, 4817), - Box(4818, 4818), - Box(4819, 4819), - Box(4820, 4820), - Box(4821, 4821), - Box(4822, 4822), - Box(4823, 4823), - Box(4824, 4824), - Box(4825, 4825), - Box(4826, 4826), - Box(4827, 4827), - Box(4828, 4828), - Box(4829, 4829), - Box(4830, 4830), - Box(4831, 4831), - Box(4832, 4832), - Box(4833, 4833), - Box(4834, 4834), - Box(4835, 4835), - Box(4836, 4836), - Box(4837, 4837), - Box(4838, 4838), - Box(4839, 4839), - Box(4840, 4840), - Box(4841, 4841), - Box(4842, 4842), - Box(4843, 4843), - Box(4844, 4844), - Box(4845, 4845), - Box(4846, 4846), - Box(4847, 4847), - Box(4848, 4848), - Box(4849, 4849), - Box(4850, 4850), - Box(4851, 4851), - Box(4852, 4852), - Box(4853, 4853), - Box(4854, 4854), - Box(4855, 4855), - Box(4856, 4856), - Box(4857, 4857), - Box(4858, 4858), - Box(4859, 4859), - Box(4860, 4860), - Box(4861, 4861), - Box(4862, 4862), - Box(4863, 4863), - Box(4864, 4864), - Box(4865, 4865), - Box(4866, 4866), - Box(4867, 4867), - Box(4868, 4868), - Box(4869, 4869), - Box(4870, 4870), - Box(4871, 4871), - Box(4872, 4872), - Box(4873, 4873), - Box(4874, 4874), - Box(4875, 4875), - Box(4876, 4876), - Box(4877, 4877), - Box(4878, 4878), - Box(4879, 4879), - Box(4880, 4880), - Box(4881, 4881), - Box(4882, 4882), - Box(4883, 4883), - Box(4884, 4884), - Box(4885, 4885), - Box(4886, 4886), - Box(4887, 4887), - Box(4888, 4888), - Box(4889, 4889), - Box(4890, 4890), - Box(4891, 4891), - Box(4892, 4892), - Box(4893, 4893), - Box(4894, 4894), - Box(4895, 4895), - Box(4896, 4896), - Box(4897, 4897), - Box(4898, 4898), - Box(4899, 4899), - Box(4900, 4900), - Box(4901, 4901), - Box(4902, 4902), - Box(4903, 4903), - Box(4904, 4904), - Box(4905, 4905), - Box(4906, 4906), - Box(4907, 4907), - Box(4908, 4908), - Box(4909, 4909), - Box(4910, 4910), - Box(4911, 4911), - Box(4912, 4912), - Box(4913, 4913), - Box(4914, 4914), - Box(4915, 4915), - Box(4916, 4916), - Box(4917, 4917), - Box(4918, 4918), - Box(4919, 4919), - Box(4920, 4920), - Box(4921, 4921), - Box(4922, 4922), - Box(4923, 4923), - Box(4924, 4924), - Box(4925, 4925), - Box(4926, 4926), - Box(4927, 4927), - Box(4928, 4928), - Box(4929, 4929), - Box(4930, 4930), - Box(4931, 4931), - Box(4932, 4932), - Box(4933, 4933), - Box(4934, 4934), - Box(4935, 4935), - Box(4936, 4936), - Box(4937, 4937), - Box(4938, 4938), - Box(4939, 4939), - Box(4940, 4940), - Box(4941, 4941), - Box(4942, 4942), - Box(4943, 4943), - Box(4944, 4944), - Box(4945, 4945), - Box(4946, 4946), - Box(4947, 4947), - Box(4948, 4948), - Box(4949, 4949), - Box(4950, 4950), - Box(4951, 4951), - Box(4952, 4952), - Box(4953, 4953), - Box(4954, 4954), - Box(4955, 4955), - Box(4956, 4956), - Box(4957, 4957), - Box(4958, 4958), - Box(4959, 4959), - Box(4960, 4960), - Box(4961, 4961), - Box(4962, 4962), - Box(4963, 4963), - Box(4964, 4964), - Box(4965, 4965), - Box(4966, 4966), - Box(4967, 4967), - Box(4968, 4968), - Box(4969, 4969), - Box(4970, 4970), - Box(4971, 4971), - Box(4972, 4972), - Box(4973, 4973), - Box(4974, 4974), - Box(4975, 4975), - Box(4976, 4976), - Box(4977, 4977), - Box(4978, 4978), - Box(4979, 4979), - Box(4980, 4980), - Box(4981, 4981), - Box(4982, 4982), - Box(4983, 4983), - Box(4984, 4984), - Box(4985, 4985), - Box(4986, 4986), - Box(4987, 4987), - Box(4988, 4988), - Box(4989, 4989), - Box(4990, 4990), - Box(4991, 4991), - Box(4992, 4992), - Box(4993, 4993), - Box(4994, 4994), - Box(4995, 4995), - Box(4996, 4996), - Box(4997, 4997), - Box(4998, 4998), - Box(4999, 4999), - Box(5000, 5000), - Box(5001, 5001), - Box(5002, 5002), - Box(5003, 5003), - Box(5004, 5004), - Box(5005, 5005), - Box(5006, 5006), - Box(5007, 5007), - Box(5008, 5008), - Box(5009, 5009), - Box(5010, 5010), - Box(5011, 5011), - Box(5012, 5012), - Box(5013, 5013), - Box(5014, 5014), - Box(5015, 5015), - Box(5016, 5016), - Box(5017, 5017), - Box(5018, 5018), - Box(5019, 5019), - Box(5020, 5020), - Box(5021, 5021), - Box(5022, 5022), - Box(5023, 5023), - Box(5024, 5024), - Box(5025, 5025), - Box(5026, 5026), - Box(5027, 5027), - Box(5028, 5028), - Box(5029, 5029), - Box(5030, 5030), - Box(5031, 5031), - Box(5032, 5032), - Box(5033, 5033), - Box(5034, 5034), - Box(5035, 5035), - Box(5036, 5036), - Box(5037, 5037), - Box(5038, 5038), - Box(5039, 5039), - Box(5040, 5040), - Box(5041, 5041), - Box(5042, 5042), - Box(5043, 5043), - Box(5044, 5044), - Box(5045, 5045), - Box(5046, 5046), - Box(5047, 5047), - Box(5048, 5048), - Box(5049, 5049), - Box(5050, 5050), - Box(5051, 5051), - Box(5052, 5052), - Box(5053, 5053), - Box(5054, 5054), - Box(5055, 5055), - Box(5056, 5056), - Box(5057, 5057), - Box(5058, 5058), - Box(5059, 5059), - Box(5060, 5060), - Box(5061, 5061), - Box(5062, 5062), - Box(5063, 5063), - Box(5064, 5064), - Box(5065, 5065), - Box(5066, 5066), - Box(5067, 5067), - Box(5068, 5068), - Box(5069, 5069), - Box(5070, 5070), - Box(5071, 5071), - Box(5072, 5072), - Box(5073, 5073), - Box(5074, 5074), - Box(5075, 5075), - Box(5076, 5076), - Box(5077, 5077), - Box(5078, 5078), - Box(5079, 5079), - Box(5080, 5080), - Box(5081, 5081), - Box(5082, 5082), - Box(5083, 5083), - Box(5084, 5084), - Box(5085, 5085), - Box(5086, 5086), - Box(5087, 5087), - Box(5088, 5088), - Box(5089, 5089), - Box(5090, 5090), - Box(5091, 5091), - Box(5092, 5092), - Box(5093, 5093), - Box(5094, 5094), - Box(5095, 5095), - Box(5096, 5096), - Box(5097, 5097), - Box(5098, 5098), - Box(5099, 5099), - Box(5100, 5100), - Box(5101, 5101), - Box(5102, 5102), - Box(5103, 5103), - Box(5104, 5104), - Box(5105, 5105), - Box(5106, 5106), - Box(5107, 5107), - Box(5108, 5108), - Box(5109, 5109), - Box(5110, 5110), - Box(5111, 5111), - Box(5112, 5112), - Box(5113, 5113), - Box(5114, 5114), - Box(5115, 5115), - Box(5116, 5116), - Box(5117, 5117), - Box(5118, 5118), - Box(5119, 5119), - Box(5120, 5120), - Box(5121, 5121), - Box(5122, 5122), - Box(5123, 5123), - Box(5124, 5124), - Box(5125, 5125), - Box(5126, 5126), - Box(5127, 5127), - Box(5128, 5128), - Box(5129, 5129), - Box(5130, 5130), - Box(5131, 5131), - Box(5132, 5132), - Box(5133, 5133), - Box(5134, 5134), - Box(5135, 5135), - Box(5136, 5136), - Box(5137, 5137), - Box(5138, 5138), - Box(5139, 5139), - Box(5140, 5140), - Box(5141, 5141), - Box(5142, 5142), - Box(5143, 5143), - Box(5144, 5144), - Box(5145, 5145), - Box(5146, 5146), - Box(5147, 5147), - Box(5148, 5148), - Box(5149, 5149), - Box(5150, 5150), - Box(5151, 5151), - Box(5152, 5152), - Box(5153, 5153), - Box(5154, 5154), - Box(5155, 5155), - Box(5156, 5156), - Box(5157, 5157), - Box(5158, 5158), - Box(5159, 5159), - Box(5160, 5160), - Box(5161, 5161), - Box(5162, 5162), - Box(5163, 5163), - Box(5164, 5164), - Box(5165, 5165), - Box(5166, 5166), - Box(5167, 5167), - Box(5168, 5168), - Box(5169, 5169), - Box(5170, 5170), - Box(5171, 5171), - Box(5172, 5172), - Box(5173, 5173), - Box(5174, 5174), - Box(5175, 5175), - Box(5176, 5176), - Box(5177, 5177), - Box(5178, 5178), - Box(5179, 5179), - Box(5180, 5180), - Box(5181, 5181), - Box(5182, 5182), - Box(5183, 5183), - Box(5184, 5184), - Box(5185, 5185), - Box(5186, 5186), - Box(5187, 5187), - Box(5188, 5188), - Box(5189, 5189), - Box(5190, 5190), - Box(5191, 5191), - Box(5192, 5192), - Box(5193, 5193), - Box(5194, 5194), - Box(5195, 5195), - Box(5196, 5196), - Box(5197, 5197), - Box(5198, 5198), - Box(5199, 5199), - Box(5200, 5200), - Box(5201, 5201), - Box(5202, 5202), - Box(5203, 5203), - Box(5204, 5204), - Box(5205, 5205), - Box(5206, 5206), - Box(5207, 5207), - Box(5208, 5208), - Box(5209, 5209), - Box(5210, 5210), - Box(5211, 5211), - Box(5212, 5212), - Box(5213, 5213), - Box(5214, 5214), - Box(5215, 5215), - Box(5216, 5216), - Box(5217, 5217), - Box(5218, 5218), - Box(5219, 5219), - Box(5220, 5220), - Box(5221, 5221), - Box(5222, 5222), - Box(5223, 5223), - Box(5224, 5224), - Box(5225, 5225), - Box(5226, 5226), - Box(5227, 5227), - Box(5228, 5228), - Box(5229, 5229), - Box(5230, 5230), - Box(5231, 5231), - Box(5232, 5232), - Box(5233, 5233), - Box(5234, 5234), - Box(5235, 5235), - Box(5236, 5236), - Box(5237, 5237), - Box(5238, 5238), - Box(5239, 5239), - Box(5240, 5240), - Box(5241, 5241), - Box(5242, 5242), - Box(5243, 5243), - Box(5244, 5244), - Box(5245, 5245), - Box(5246, 5246), - Box(5247, 5247), - Box(5248, 5248), - Box(5249, 5249), - Box(5250, 5250), - Box(5251, 5251), - Box(5252, 5252), - Box(5253, 5253), - Box(5254, 5254), - Box(5255, 5255), - Box(5256, 5256), - Box(5257, 5257), - Box(5258, 5258), - Box(5259, 5259), - Box(5260, 5260), - Box(5261, 5261), - Box(5262, 5262), - Box(5263, 5263), - Box(5264, 5264), - Box(5265, 5265), - Box(5266, 5266), - Box(5267, 5267), - Box(5268, 5268), - Box(5269, 5269), - Box(5270, 5270), - Box(5271, 5271), - Box(5272, 5272), - Box(5273, 5273), - Box(5274, 5274), - Box(5275, 5275), - Box(5276, 5276), - Box(5277, 5277), - Box(5278, 5278), - Box(5279, 5279), - Box(5280, 5280), - Box(5281, 5281), - Box(5282, 5282), - Box(5283, 5283), - Box(5284, 5284), - Box(5285, 5285), - Box(5286, 5286), - Box(5287, 5287), - Box(5288, 5288), - Box(5289, 5289), - Box(5290, 5290), - Box(5291, 5291), - Box(5292, 5292), - Box(5293, 5293), - Box(5294, 5294), - Box(5295, 5295), - Box(5296, 5296), - Box(5297, 5297), - Box(5298, 5298), - Box(5299, 5299), - Box(5300, 5300), - Box(5301, 5301), - Box(5302, 5302), - Box(5303, 5303), - Box(5304, 5304), - Box(5305, 5305), - Box(5306, 5306), - Box(5307, 5307), - Box(5308, 5308), - Box(5309, 5309), - Box(5310, 5310), - Box(5311, 5311), - Box(5312, 5312), - Box(5313, 5313), - Box(5314, 5314), - Box(5315, 5315), - Box(5316, 5316), - Box(5317, 5317), - Box(5318, 5318), - Box(5319, 5319), - Box(5320, 5320), - Box(5321, 5321), - Box(5322, 5322), - Box(5323, 5323), - Box(5324, 5324), - Box(5325, 5325), - Box(5326, 5326), - Box(5327, 5327), - Box(5328, 5328), - Box(5329, 5329), - Box(5330, 5330), - Box(5331, 5331), - Box(5332, 5332), - Box(5333, 5333), - Box(5334, 5334), - Box(5335, 5335), - Box(5336, 5336), - Box(5337, 5337), - Box(5338, 5338), - Box(5339, 5339), - Box(5340, 5340), - Box(5341, 5341), - Box(5342, 5342), - Box(5343, 5343), - Box(5344, 5344), - Box(5345, 5345), - Box(5346, 5346), - Box(5347, 5347), - Box(5348, 5348), - Box(5349, 5349), - Box(5350, 5350), - Box(5351, 5351), - Box(5352, 5352), - Box(5353, 5353), - Box(5354, 5354), - Box(5355, 5355), - Box(5356, 5356), - Box(5357, 5357), - Box(5358, 5358), - Box(5359, 5359), - Box(5360, 5360), - Box(5361, 5361), - Box(5362, 5362), - Box(5363, 5363), - Box(5364, 5364), - Box(5365, 5365), - Box(5366, 5366), - Box(5367, 5367), - Box(5368, 5368), - Box(5369, 5369), - Box(5370, 5370), - Box(5371, 5371), - Box(5372, 5372), - Box(5373, 5373), - Box(5374, 5374), - Box(5375, 5375), - Box(5376, 5376), - Box(5377, 5377), - Box(5378, 5378), - Box(5379, 5379), - Box(5380, 5380), - Box(5381, 5381), - Box(5382, 5382), - Box(5383, 5383), - Box(5384, 5384), - Box(5385, 5385), - Box(5386, 5386), - Box(5387, 5387), - Box(5388, 5388), - Box(5389, 5389), - Box(5390, 5390), - Box(5391, 5391), - Box(5392, 5392), - Box(5393, 5393), - Box(5394, 5394), - Box(5395, 5395), - Box(5396, 5396), - Box(5397, 5397), - Box(5398, 5398), - Box(5399, 5399), - Box(5400, 5400), - Box(5401, 5401), - Box(5402, 5402), - Box(5403, 5403), - Box(5404, 5404), - Box(5405, 5405), - Box(5406, 5406), - Box(5407, 5407), - Box(5408, 5408), - Box(5409, 5409), - Box(5410, 5410), - Box(5411, 5411), - Box(5412, 5412), - Box(5413, 5413), - Box(5414, 5414), - Box(5415, 5415), - Box(5416, 5416), - Box(5417, 5417), - Box(5418, 5418), - Box(5419, 5419), - Box(5420, 5420), - Box(5421, 5421), - Box(5422, 5422), - Box(5423, 5423), - Box(5424, 5424), - Box(5425, 5425), - Box(5426, 5426), - Box(5427, 5427), - Box(5428, 5428), - Box(5429, 5429), - Box(5430, 5430), - Box(5431, 5431), - Box(5432, 5432), - Box(5433, 5433), - Box(5434, 5434), - Box(5435, 5435), - Box(5436, 5436), - Box(5437, 5437), - Box(5438, 5438), - Box(5439, 5439), - Box(5440, 5440), - Box(5441, 5441), - Box(5442, 5442), - Box(5443, 5443), - Box(5444, 5444), - Box(5445, 5445), - Box(5446, 5446), - Box(5447, 5447), - Box(5448, 5448), - Box(5449, 5449), - Box(5450, 5450), - Box(5451, 5451), - Box(5452, 5452), - Box(5453, 5453), - Box(5454, 5454), - Box(5455, 5455), - Box(5456, 5456), - Box(5457, 5457), - Box(5458, 5458), - Box(5459, 5459), - Box(5460, 5460), - Box(5461, 5461), - Box(5462, 5462), - Box(5463, 5463), - Box(5464, 5464), - Box(5465, 5465), - Box(5466, 5466), - Box(5467, 5467), - Box(5468, 5468), - Box(5469, 5469), - Box(5470, 5470), - Box(5471, 5471), - Box(5472, 5472), - Box(5473, 5473), - Box(5474, 5474), - Box(5475, 5475), - Box(5476, 5476), - Box(5477, 5477), - Box(5478, 5478), - Box(5479, 5479), - Box(5480, 5480), - Box(5481, 5481), - Box(5482, 5482), - Box(5483, 5483), - Box(5484, 5484), - Box(5485, 5485), - Box(5486, 5486), - Box(5487, 5487), - Box(5488, 5488), - Box(5489, 5489), - Box(5490, 5490), - Box(5491, 5491), - Box(5492, 5492), - Box(5493, 5493), - Box(5494, 5494), - Box(5495, 5495), - Box(5496, 5496), - Box(5497, 5497), - Box(5498, 5498), - Box(5499, 5499), - Box(5500, 5500), - Box(5501, 5501), - Box(5502, 5502), - Box(5503, 5503), - Box(5504, 5504), - Box(5505, 5505), - Box(5506, 5506), - Box(5507, 5507), - Box(5508, 5508), - Box(5509, 5509), - Box(5510, 5510), - Box(5511, 5511), - Box(5512, 5512), - Box(5513, 5513), - Box(5514, 5514), - Box(5515, 5515), - Box(5516, 5516), - Box(5517, 5517), - Box(5518, 5518), - Box(5519, 5519), - Box(5520, 5520), - Box(5521, 5521), - Box(5522, 5522), - Box(5523, 5523), - Box(5524, 5524), - Box(5525, 5525), - Box(5526, 5526), - Box(5527, 5527), - Box(5528, 5528), - Box(5529, 5529), - Box(5530, 5530), - Box(5531, 5531), - Box(5532, 5532), - Box(5533, 5533), - Box(5534, 5534), - Box(5535, 5535), - Box(5536, 5536), - Box(5537, 5537), - Box(5538, 5538), - Box(5539, 5539), - Box(5540, 5540), - Box(5541, 5541), - Box(5542, 5542), - Box(5543, 5543), - Box(5544, 5544), - Box(5545, 5545), - Box(5546, 5546), - Box(5547, 5547), - Box(5548, 5548), - Box(5549, 5549), - Box(5550, 5550), - Box(5551, 5551), - Box(5552, 5552), - Box(5553, 5553), - Box(5554, 5554), - Box(5555, 5555), - Box(5556, 5556), - Box(5557, 5557), - Box(5558, 5558), - Box(5559, 5559), - Box(5560, 5560), - Box(5561, 5561), - Box(5562, 5562), - Box(5563, 5563), - Box(5564, 5564), - Box(5565, 5565), - Box(5566, 5566), - Box(5567, 5567), - Box(5568, 5568), - Box(5569, 5569), - Box(5570, 5570), - Box(5571, 5571), - Box(5572, 5572), - Box(5573, 5573), - Box(5574, 5574), - Box(5575, 5575), - Box(5576, 5576), - Box(5577, 5577), - Box(5578, 5578), - Box(5579, 5579), - Box(5580, 5580), - Box(5581, 5581), - Box(5582, 5582), - Box(5583, 5583), - Box(5584, 5584), - Box(5585, 5585), - Box(5586, 5586), - Box(5587, 5587), - Box(5588, 5588), - Box(5589, 5589), - Box(5590, 5590), - Box(5591, 5591), - Box(5592, 5592), - Box(5593, 5593), - Box(5594, 5594), - Box(5595, 5595), - Box(5596, 5596), - Box(5597, 5597), - Box(5598, 5598), - Box(5599, 5599), - Box(5600, 5600), - Box(5601, 5601), - Box(5602, 5602), - Box(5603, 5603), - Box(5604, 5604), - Box(5605, 5605), - Box(5606, 5606), - Box(5607, 5607), - Box(5608, 5608), - Box(5609, 5609), - Box(5610, 5610), - Box(5611, 5611), - Box(5612, 5612), - Box(5613, 5613), - Box(5614, 5614), - Box(5615, 5615), - Box(5616, 5616), - Box(5617, 5617), - Box(5618, 5618), - Box(5619, 5619), - Box(5620, 5620), - Box(5621, 5621), - Box(5622, 5622), - Box(5623, 5623), - Box(5624, 5624), - Box(5625, 5625), - Box(5626, 5626), - Box(5627, 5627), - Box(5628, 5628), - Box(5629, 5629), - Box(5630, 5630), - Box(5631, 5631), - Box(5632, 5632), - Box(5633, 5633), - Box(5634, 5634), - Box(5635, 5635), - Box(5636, 5636), - Box(5637, 5637), - Box(5638, 5638), - Box(5639, 5639), - Box(5640, 5640), - Box(5641, 5641), - Box(5642, 5642), - Box(5643, 5643), - Box(5644, 5644), - Box(5645, 5645), - Box(5646, 5646), - Box(5647, 5647), - Box(5648, 5648), - Box(5649, 5649), - Box(5650, 5650), - Box(5651, 5651), - Box(5652, 5652), - Box(5653, 5653), - Box(5654, 5654), - Box(5655, 5655), - Box(5656, 5656), - Box(5657, 5657), - Box(5658, 5658), - Box(5659, 5659), - Box(5660, 5660), - Box(5661, 5661), - Box(5662, 5662), - Box(5663, 5663), - Box(5664, 5664), - Box(5665, 5665), - Box(5666, 5666), - Box(5667, 5667), - Box(5668, 5668), - Box(5669, 5669), - Box(5670, 5670), - Box(5671, 5671), - Box(5672, 5672), - Box(5673, 5673), - Box(5674, 5674), - Box(5675, 5675), - Box(5676, 5676), - Box(5677, 5677), - Box(5678, 5678), - Box(5679, 5679), - Box(5680, 5680), - Box(5681, 5681), - Box(5682, 5682), - Box(5683, 5683), - Box(5684, 5684), - Box(5685, 5685), - Box(5686, 5686), - Box(5687, 5687), - Box(5688, 5688), - Box(5689, 5689), - Box(5690, 5690), - Box(5691, 5691), - Box(5692, 5692), - Box(5693, 5693), - Box(5694, 5694), - Box(5695, 5695), - Box(5696, 5696), - Box(5697, 5697), - Box(5698, 5698), - Box(5699, 5699), - Box(5700, 5700), - Box(5701, 5701), - Box(5702, 5702), - Box(5703, 5703), - Box(5704, 5704), - Box(5705, 5705), - Box(5706, 5706), - Box(5707, 5707), - Box(5708, 5708), - Box(5709, 5709), - Box(5710, 5710), - Box(5711, 5711), - Box(5712, 5712), - Box(5713, 5713), - Box(5714, 5714), - Box(5715, 5715), - Box(5716, 5716), - Box(5717, 5717), - Box(5718, 5718), - Box(5719, 5719), - Box(5720, 5720), - Box(5721, 5721), - Box(5722, 5722), - Box(5723, 5723), - Box(5724, 5724), - Box(5725, 5725), - Box(5726, 5726), - Box(5727, 5727), - Box(5728, 5728), - Box(5729, 5729), - Box(5730, 5730), - Box(5731, 5731), - Box(5732, 5732), - Box(5733, 5733), - Box(5734, 5734), - Box(5735, 5735), - Box(5736, 5736), - Box(5737, 5737), - Box(5738, 5738), - Box(5739, 5739), - Box(5740, 5740), - Box(5741, 5741), - Box(5742, 5742), - Box(5743, 5743), - Box(5744, 5744), - Box(5745, 5745), - Box(5746, 5746), - Box(5747, 5747), - Box(5748, 5748), - Box(5749, 5749), - Box(5750, 5750), - Box(5751, 5751), - Box(5752, 5752), - Box(5753, 5753), - Box(5754, 5754), - Box(5755, 5755), - Box(5756, 5756), - Box(5757, 5757), - Box(5758, 5758), - Box(5759, 5759), - Box(5760, 5760), - Box(5761, 5761), - Box(5762, 5762), - Box(5763, 5763), - Box(5764, 5764), - Box(5765, 5765), - Box(5766, 5766), - Box(5767, 5767), - Box(5768, 5768), - Box(5769, 5769), - Box(5770, 5770), - Box(5771, 5771), - Box(5772, 5772), - Box(5773, 5773), - Box(5774, 5774), - Box(5775, 5775), - Box(5776, 5776), - Box(5777, 5777), - Box(5778, 5778), - Box(5779, 5779), - Box(5780, 5780), - Box(5781, 5781), - Box(5782, 5782), - Box(5783, 5783), - Box(5784, 5784), - Box(5785, 5785), - Box(5786, 5786), - Box(5787, 5787), - Box(5788, 5788), - Box(5789, 5789), - Box(5790, 5790), - Box(5791, 5791), - Box(5792, 5792), - Box(5793, 5793), - Box(5794, 5794), - Box(5795, 5795), - Box(5796, 5796), - Box(5797, 5797), - Box(5798, 5798), - Box(5799, 5799), - Box(5800, 5800), - Box(5801, 5801), - Box(5802, 5802), - Box(5803, 5803), - Box(5804, 5804), - Box(5805, 5805), - Box(5806, 5806), - Box(5807, 5807), - Box(5808, 5808), - Box(5809, 5809), - Box(5810, 5810), - Box(5811, 5811), - Box(5812, 5812), - Box(5813, 5813), - Box(5814, 5814), - Box(5815, 5815), - Box(5816, 5816), - Box(5817, 5817), - Box(5818, 5818), - Box(5819, 5819), - Box(5820, 5820), - Box(5821, 5821), - Box(5822, 5822), - Box(5823, 5823), - Box(5824, 5824), - Box(5825, 5825), - Box(5826, 5826), - Box(5827, 5827), - Box(5828, 5828), - Box(5829, 5829), - Box(5830, 5830), - Box(5831, 5831), - Box(5832, 5832), - Box(5833, 5833), - Box(5834, 5834), - Box(5835, 5835), - Box(5836, 5836), - Box(5837, 5837), - Box(5838, 5838), - Box(5839, 5839), - Box(5840, 5840), - Box(5841, 5841), - Box(5842, 5842), - Box(5843, 5843), - Box(5844, 5844), - Box(5845, 5845), - Box(5846, 5846), - Box(5847, 5847), - Box(5848, 5848), - Box(5849, 5849), - Box(5850, 5850), - Box(5851, 5851), - Box(5852, 5852), - Box(5853, 5853), - Box(5854, 5854), - Box(5855, 5855), - Box(5856, 5856), - Box(5857, 5857), - Box(5858, 5858), - Box(5859, 5859), - Box(5860, 5860), - Box(5861, 5861), - Box(5862, 5862), - Box(5863, 5863), - Box(5864, 5864), - Box(5865, 5865), - Box(5866, 5866), - Box(5867, 5867), - Box(5868, 5868), - Box(5869, 5869), - Box(5870, 5870), - Box(5871, 5871), - Box(5872, 5872), - Box(5873, 5873), - Box(5874, 5874), - Box(5875, 5875), - Box(5876, 5876), - Box(5877, 5877), - Box(5878, 5878), - Box(5879, 5879), - Box(5880, 5880), - Box(5881, 5881), - Box(5882, 5882), - Box(5883, 5883), - Box(5884, 5884), - Box(5885, 5885), - Box(5886, 5886), - Box(5887, 5887), - Box(5888, 5888), - Box(5889, 5889), - Box(5890, 5890), - Box(5891, 5891), - Box(5892, 5892), - Box(5893, 5893), - Box(5894, 5894), - Box(5895, 5895), - Box(5896, 5896), - Box(5897, 5897), - Box(5898, 5898), - Box(5899, 5899), - Box(5900, 5900), - Box(5901, 5901), - Box(5902, 5902), - Box(5903, 5903), - Box(5904, 5904), - Box(5905, 5905), - Box(5906, 5906), - Box(5907, 5907), - Box(5908, 5908), - Box(5909, 5909), - Box(5910, 5910), - Box(5911, 5911), - Box(5912, 5912), - Box(5913, 5913), - Box(5914, 5914), - Box(5915, 5915), - Box(5916, 5916), - Box(5917, 5917), - Box(5918, 5918), - Box(5919, 5919), - Box(5920, 5920), - Box(5921, 5921), - Box(5922, 5922), - Box(5923, 5923), - Box(5924, 5924), - Box(5925, 5925), - Box(5926, 5926), - Box(5927, 5927), - Box(5928, 5928), - Box(5929, 5929), - Box(5930, 5930), - Box(5931, 5931), - Box(5932, 5932), - Box(5933, 5933), - Box(5934, 5934), - Box(5935, 5935), - Box(5936, 5936), - Box(5937, 5937), - Box(5938, 5938), - Box(5939, 5939), - Box(5940, 5940), - Box(5941, 5941), - Box(5942, 5942), - Box(5943, 5943), - Box(5944, 5944), - Box(5945, 5945), - Box(5946, 5946), - Box(5947, 5947), - Box(5948, 5948), - Box(5949, 5949), - Box(5950, 5950), - Box(5951, 5951), - Box(5952, 5952), - Box(5953, 5953), - Box(5954, 5954), - Box(5955, 5955), - Box(5956, 5956), - Box(5957, 5957), - Box(5958, 5958), - Box(5959, 5959), - Box(5960, 5960), - Box(5961, 5961), - Box(5962, 5962), - Box(5963, 5963), - Box(5964, 5964), - Box(5965, 5965), - Box(5966, 5966), - Box(5967, 5967), - Box(5968, 5968), - Box(5969, 5969), - Box(5970, 5970), - Box(5971, 5971), - Box(5972, 5972), - Box(5973, 5973), - Box(5974, 5974), - Box(5975, 5975), - Box(5976, 5976), - Box(5977, 5977), - Box(5978, 5978), - Box(5979, 5979), - Box(5980, 5980), - Box(5981, 5981), - Box(5982, 5982), - Box(5983, 5983), - Box(5984, 5984), - Box(5985, 5985), - Box(5986, 5986), - Box(5987, 5987), - Box(5988, 5988), - Box(5989, 5989), - Box(5990, 5990), - Box(5991, 5991), - Box(5992, 5992), - Box(5993, 5993), - Box(5994, 5994), - Box(5995, 5995), - Box(5996, 5996), - Box(5997, 5997), - Box(5998, 5998), - Box(5999, 5999), - Box(6000, 6000), - Box(6001, 6001), - Box(6002, 6002), - Box(6003, 6003), - Box(6004, 6004), - Box(6005, 6005), - Box(6006, 6006), - Box(6007, 6007), - Box(6008, 6008), - Box(6009, 6009), - Box(6010, 6010), - Box(6011, 6011), - Box(6012, 6012), - Box(6013, 6013), - Box(6014, 6014), - Box(6015, 6015), - Box(6016, 6016), - Box(6017, 6017), - Box(6018, 6018), - Box(6019, 6019), - Box(6020, 6020), - Box(6021, 6021), - Box(6022, 6022), - Box(6023, 6023), - Box(6024, 6024), - Box(6025, 6025), - Box(6026, 6026), - Box(6027, 6027), - Box(6028, 6028), - Box(6029, 6029), - Box(6030, 6030), - Box(6031, 6031), - Box(6032, 6032), - Box(6033, 6033), - Box(6034, 6034), - Box(6035, 6035), - Box(6036, 6036), - Box(6037, 6037), - Box(6038, 6038), - Box(6039, 6039), - Box(6040, 6040), - Box(6041, 6041), - Box(6042, 6042), - Box(6043, 6043), - Box(6044, 6044), - Box(6045, 6045), - Box(6046, 6046), - Box(6047, 6047), - Box(6048, 6048), - Box(6049, 6049), - Box(6050, 6050), - Box(6051, 6051), - Box(6052, 6052), - Box(6053, 6053), - Box(6054, 6054), - Box(6055, 6055), - Box(6056, 6056), - Box(6057, 6057), - Box(6058, 6058), - Box(6059, 6059), - Box(6060, 6060), - Box(6061, 6061), - Box(6062, 6062), - Box(6063, 6063), - Box(6064, 6064), - Box(6065, 6065), - Box(6066, 6066), - Box(6067, 6067), - Box(6068, 6068), - Box(6069, 6069), - Box(6070, 6070), - Box(6071, 6071), - Box(6072, 6072), - Box(6073, 6073), - Box(6074, 6074), - Box(6075, 6075), - Box(6076, 6076), - Box(6077, 6077), - Box(6078, 6078), - Box(6079, 6079), - Box(6080, 6080), - Box(6081, 6081), - Box(6082, 6082), - Box(6083, 6083), - Box(6084, 6084), - Box(6085, 6085), - Box(6086, 6086), - Box(6087, 6087), - Box(6088, 6088), - Box(6089, 6089), - Box(6090, 6090), - Box(6091, 6091), - Box(6092, 6092), - Box(6093, 6093), - Box(6094, 6094), - Box(6095, 6095), - Box(6096, 6096), - Box(6097, 6097), - Box(6098, 6098), - Box(6099, 6099), - Box(6100, 6100), - Box(6101, 6101), - Box(6102, 6102), - Box(6103, 6103), - Box(6104, 6104), - Box(6105, 6105), - Box(6106, 6106), - Box(6107, 6107), - Box(6108, 6108), - Box(6109, 6109), - Box(6110, 6110), - Box(6111, 6111), - Box(6112, 6112), - Box(6113, 6113), - Box(6114, 6114), - Box(6115, 6115), - Box(6116, 6116), - Box(6117, 6117), - Box(6118, 6118), - Box(6119, 6119), - Box(6120, 6120), - Box(6121, 6121), - Box(6122, 6122), - Box(6123, 6123), - Box(6124, 6124), - Box(6125, 6125), - Box(6126, 6126), - Box(6127, 6127), - Box(6128, 6128), - Box(6129, 6129), - Box(6130, 6130), - Box(6131, 6131), - Box(6132, 6132), - Box(6133, 6133), - Box(6134, 6134), - Box(6135, 6135), - Box(6136, 6136), - Box(6137, 6137), - Box(6138, 6138), - Box(6139, 6139), - Box(6140, 6140), - Box(6141, 6141), - Box(6142, 6142), - Box(6143, 6143), - Box(6144, 6144), - Box(6145, 6145), - Box(6146, 6146), - Box(6147, 6147), - Box(6148, 6148), - Box(6149, 6149), - Box(6150, 6150), - Box(6151, 6151), - Box(6152, 6152), - Box(6153, 6153), - Box(6154, 6154), - Box(6155, 6155), - Box(6156, 6156), - Box(6157, 6157), - Box(6158, 6158), - Box(6159, 6159), - Box(6160, 6160), - Box(6161, 6161), - Box(6162, 6162), - Box(6163, 6163), - Box(6164, 6164), - Box(6165, 6165), - Box(6166, 6166), - Box(6167, 6167), - Box(6168, 6168), - Box(6169, 6169), - Box(6170, 6170), - Box(6171, 6171), - Box(6172, 6172), - Box(6173, 6173), - Box(6174, 6174), - Box(6175, 6175), - Box(6176, 6176), - Box(6177, 6177), - Box(6178, 6178), - Box(6179, 6179), - Box(6180, 6180), - Box(6181, 6181), - Box(6182, 6182), - Box(6183, 6183), - Box(6184, 6184), - Box(6185, 6185), - Box(6186, 6186), - Box(6187, 6187), - Box(6188, 6188), - Box(6189, 6189), - Box(6190, 6190), - Box(6191, 6191), - Box(6192, 6192), - Box(6193, 6193), - Box(6194, 6194), - Box(6195, 6195), - Box(6196, 6196), - Box(6197, 6197), - Box(6198, 6198), - Box(6199, 6199), - Box(6200, 6200), - Box(6201, 6201), - Box(6202, 6202), - Box(6203, 6203), - Box(6204, 6204), - Box(6205, 6205), - Box(6206, 6206), - Box(6207, 6207), - Box(6208, 6208), - Box(6209, 6209), - Box(6210, 6210), - Box(6211, 6211), - Box(6212, 6212), - Box(6213, 6213), - Box(6214, 6214), - Box(6215, 6215), - Box(6216, 6216), - Box(6217, 6217), - Box(6218, 6218), - Box(6219, 6219), - Box(6220, 6220), - Box(6221, 6221), - Box(6222, 6222), - Box(6223, 6223), - Box(6224, 6224), - Box(6225, 6225), - Box(6226, 6226), - Box(6227, 6227), - Box(6228, 6228), - Box(6229, 6229), - Box(6230, 6230), - Box(6231, 6231), - Box(6232, 6232), - Box(6233, 6233), - Box(6234, 6234), - Box(6235, 6235), - Box(6236, 6236), - Box(6237, 6237), - Box(6238, 6238), - Box(6239, 6239), - Box(6240, 6240), - Box(6241, 6241), - Box(6242, 6242), - Box(6243, 6243), - Box(6244, 6244), - Box(6245, 6245), - Box(6246, 6246), - Box(6247, 6247), - Box(6248, 6248), - Box(6249, 6249), - Box(6250, 6250), - Box(6251, 6251), - Box(6252, 6252), - Box(6253, 6253), - Box(6254, 6254), - Box(6255, 6255), - Box(6256, 6256), - Box(6257, 6257), - Box(6258, 6258), - Box(6259, 6259), - Box(6260, 6260), - Box(6261, 6261), - Box(6262, 6262), - Box(6263, 6263), - Box(6264, 6264), - Box(6265, 6265), - Box(6266, 6266), - Box(6267, 6267), - Box(6268, 6268), - Box(6269, 6269), - Box(6270, 6270), - Box(6271, 6271), - Box(6272, 6272), - Box(6273, 6273), - Box(6274, 6274), - Box(6275, 6275), - Box(6276, 6276), - Box(6277, 6277), - Box(6278, 6278), - Box(6279, 6279), - Box(6280, 6280), - Box(6281, 6281), - Box(6282, 6282), - Box(6283, 6283), - Box(6284, 6284), - Box(6285, 6285), - Box(6286, 6286), - Box(6287, 6287), - Box(6288, 6288), - Box(6289, 6289), - Box(6290, 6290), - Box(6291, 6291), - Box(6292, 6292), - Box(6293, 6293), - Box(6294, 6294), - Box(6295, 6295), - Box(6296, 6296), - Box(6297, 6297), - Box(6298, 6298), - Box(6299, 6299), - Box(6300, 6300), - Box(6301, 6301), - Box(6302, 6302), - Box(6303, 6303), - Box(6304, 6304), - Box(6305, 6305), - Box(6306, 6306), - Box(6307, 6307), - Box(6308, 6308), - Box(6309, 6309), - Box(6310, 6310), - Box(6311, 6311), - Box(6312, 6312), - Box(6313, 6313), - Box(6314, 6314), - Box(6315, 6315), - Box(6316, 6316), - Box(6317, 6317), - Box(6318, 6318), - Box(6319, 6319), - Box(6320, 6320), - Box(6321, 6321), - Box(6322, 6322), - Box(6323, 6323), - Box(6324, 6324), - Box(6325, 6325), - Box(6326, 6326), - Box(6327, 6327), - Box(6328, 6328), - Box(6329, 6329), - Box(6330, 6330), - Box(6331, 6331), - Box(6332, 6332), - Box(6333, 6333), - Box(6334, 6334), - Box(6335, 6335), - Box(6336, 6336), - Box(6337, 6337), - Box(6338, 6338), - Box(6339, 6339), - Box(6340, 6340), - Box(6341, 6341), - Box(6342, 6342), - Box(6343, 6343), - Box(6344, 6344), - Box(6345, 6345), - Box(6346, 6346), - Box(6347, 6347), - Box(6348, 6348), - Box(6349, 6349), - Box(6350, 6350), - Box(6351, 6351), - Box(6352, 6352), - Box(6353, 6353), - Box(6354, 6354), - Box(6355, 6355), - Box(6356, 6356), - Box(6357, 6357), - Box(6358, 6358), - Box(6359, 6359), - Box(6360, 6360), - Box(6361, 6361), - Box(6362, 6362), - Box(6363, 6363), - Box(6364, 6364), - Box(6365, 6365), - Box(6366, 6366), - Box(6367, 6367), - Box(6368, 6368), - Box(6369, 6369), - Box(6370, 6370), - Box(6371, 6371), - Box(6372, 6372), - Box(6373, 6373), - Box(6374, 6374), - Box(6375, 6375), - Box(6376, 6376), - Box(6377, 6377), - Box(6378, 6378), - Box(6379, 6379), - Box(6380, 6380), - Box(6381, 6381), - Box(6382, 6382), - Box(6383, 6383), - Box(6384, 6384), - Box(6385, 6385), - Box(6386, 6386), - Box(6387, 6387), - Box(6388, 6388), - Box(6389, 6389), - Box(6390, 6390), - Box(6391, 6391), - Box(6392, 6392), - Box(6393, 6393), - Box(6394, 6394), - Box(6395, 6395), - Box(6396, 6396), - Box(6397, 6397), - Box(6398, 6398), - Box(6399, 6399), - Box(6400, 6400), - Box(6401, 6401), - Box(6402, 6402), - Box(6403, 6403), - Box(6404, 6404), - Box(6405, 6405), - Box(6406, 6406), - Box(6407, 6407), - Box(6408, 6408), - Box(6409, 6409), - Box(6410, 6410), - Box(6411, 6411), - Box(6412, 6412), - Box(6413, 6413), - Box(6414, 6414), - Box(6415, 6415), - Box(6416, 6416), - Box(6417, 6417), - Box(6418, 6418), - Box(6419, 6419), - Box(6420, 6420), - Box(6421, 6421), - Box(6422, 6422), - Box(6423, 6423), - Box(6424, 6424), - Box(6425, 6425), - Box(6426, 6426), - Box(6427, 6427), - Box(6428, 6428), - Box(6429, 6429), - Box(6430, 6430), - Box(6431, 6431), - Box(6432, 6432), - Box(6433, 6433), - Box(6434, 6434), - Box(6435, 6435), - Box(6436, 6436), - Box(6437, 6437), - Box(6438, 6438), - Box(6439, 6439), - Box(6440, 6440), - Box(6441, 6441), - Box(6442, 6442), - Box(6443, 6443), - Box(6444, 6444), - Box(6445, 6445), - Box(6446, 6446), - Box(6447, 6447), - Box(6448, 6448), - Box(6449, 6449), - Box(6450, 6450), - Box(6451, 6451), - Box(6452, 6452), - Box(6453, 6453), - Box(6454, 6454), - Box(6455, 6455), - Box(6456, 6456), - Box(6457, 6457), - Box(6458, 6458), - Box(6459, 6459), - Box(6460, 6460), - Box(6461, 6461), - Box(6462, 6462), - Box(6463, 6463), - Box(6464, 6464), - Box(6465, 6465), - Box(6466, 6466), - Box(6467, 6467), - Box(6468, 6468), - Box(6469, 6469), - Box(6470, 6470), - Box(6471, 6471), - Box(6472, 6472), - Box(6473, 6473), - Box(6474, 6474), - Box(6475, 6475), - Box(6476, 6476), - Box(6477, 6477), - Box(6478, 6478), - Box(6479, 6479), - Box(6480, 6480), - Box(6481, 6481), - Box(6482, 6482), - Box(6483, 6483), - Box(6484, 6484), - Box(6485, 6485), - Box(6486, 6486), - Box(6487, 6487), - Box(6488, 6488), - Box(6489, 6489), - Box(6490, 6490), - Box(6491, 6491), - Box(6492, 6492), - Box(6493, 6493), - Box(6494, 6494), - Box(6495, 6495), - Box(6496, 6496), - Box(6497, 6497), - Box(6498, 6498), - Box(6499, 6499), - Box(6500, 6500), - Box(6501, 6501), - Box(6502, 6502), - Box(6503, 6503), - Box(6504, 6504), - Box(6505, 6505), - Box(6506, 6506), - Box(6507, 6507), - Box(6508, 6508), - Box(6509, 6509), - Box(6510, 6510), - Box(6511, 6511), - Box(6512, 6512), - Box(6513, 6513), - Box(6514, 6514), - Box(6515, 6515), - Box(6516, 6516), - Box(6517, 6517), - Box(6518, 6518), - Box(6519, 6519), - Box(6520, 6520), - Box(6521, 6521), - Box(6522, 6522), - Box(6523, 6523), - Box(6524, 6524), - Box(6525, 6525), - Box(6526, 6526), - Box(6527, 6527), - Box(6528, 6528), - Box(6529, 6529), - Box(6530, 6530), - Box(6531, 6531), - Box(6532, 6532), - Box(6533, 6533), - Box(6534, 6534), - Box(6535, 6535), - Box(6536, 6536), - Box(6537, 6537), - Box(6538, 6538), - Box(6539, 6539), - Box(6540, 6540), - Box(6541, 6541), - Box(6542, 6542), - Box(6543, 6543), - Box(6544, 6544), - Box(6545, 6545), - Box(6546, 6546), - Box(6547, 6547), - Box(6548, 6548), - Box(6549, 6549), - Box(6550, 6550), - Box(6551, 6551), - Box(6552, 6552), - Box(6553, 6553), - Box(6554, 6554), - Box(6555, 6555), - Box(6556, 6556), - Box(6557, 6557), - Box(6558, 6558), - Box(6559, 6559), - Box(6560, 6560), - Box(6561, 6561), - Box(6562, 6562), - Box(6563, 6563), - Box(6564, 6564), - Box(6565, 6565), - Box(6566, 6566), - Box(6567, 6567), - Box(6568, 6568), - Box(6569, 6569), - Box(6570, 6570), - Box(6571, 6571), - Box(6572, 6572), - Box(6573, 6573), - Box(6574, 6574), - Box(6575, 6575), - Box(6576, 6576), - Box(6577, 6577), - Box(6578, 6578), - Box(6579, 6579), - Box(6580, 6580), - Box(6581, 6581), - Box(6582, 6582), - Box(6583, 6583), - Box(6584, 6584), - Box(6585, 6585), - Box(6586, 6586), - Box(6587, 6587), - Box(6588, 6588), - Box(6589, 6589), - Box(6590, 6590), - Box(6591, 6591), - Box(6592, 6592), - Box(6593, 6593), - Box(6594, 6594), - Box(6595, 6595), - Box(6596, 6596), - Box(6597, 6597), - Box(6598, 6598), - Box(6599, 6599), - Box(6600, 6600), - Box(6601, 6601), - Box(6602, 6602), - Box(6603, 6603), - Box(6604, 6604), - Box(6605, 6605), - Box(6606, 6606), - Box(6607, 6607), - Box(6608, 6608), - Box(6609, 6609), - Box(6610, 6610), - Box(6611, 6611), - Box(6612, 6612), - Box(6613, 6613), - Box(6614, 6614), - Box(6615, 6615), - Box(6616, 6616), - Box(6617, 6617), - Box(6618, 6618), - Box(6619, 6619), - Box(6620, 6620), - Box(6621, 6621), - Box(6622, 6622), - Box(6623, 6623), - Box(6624, 6624), - Box(6625, 6625), - Box(6626, 6626), - Box(6627, 6627), - Box(6628, 6628), - Box(6629, 6629), - Box(6630, 6630), - Box(6631, 6631), - Box(6632, 6632), - Box(6633, 6633), - Box(6634, 6634), - Box(6635, 6635), - Box(6636, 6636), - Box(6637, 6637), - Box(6638, 6638), - Box(6639, 6639), - Box(6640, 6640), - Box(6641, 6641), - Box(6642, 6642), - Box(6643, 6643), - Box(6644, 6644), - Box(6645, 6645), - Box(6646, 6646), - Box(6647, 6647), - Box(6648, 6648), - Box(6649, 6649), - Box(6650, 6650), - Box(6651, 6651), - Box(6652, 6652), - Box(6653, 6653), - Box(6654, 6654), - Box(6655, 6655), - Box(6656, 6656), - Box(6657, 6657), - Box(6658, 6658), - Box(6659, 6659), - Box(6660, 6660), - Box(6661, 6661), - Box(6662, 6662), - Box(6663, 6663), - Box(6664, 6664), - Box(6665, 6665), - Box(6666, 6666), - Box(6667, 6667), - Box(6668, 6668), - Box(6669, 6669), - Box(6670, 6670), - Box(6671, 6671), - Box(6672, 6672), - Box(6673, 6673), - Box(6674, 6674), - Box(6675, 6675), - Box(6676, 6676), - Box(6677, 6677), - Box(6678, 6678), - Box(6679, 6679), - Box(6680, 6680), - Box(6681, 6681), - Box(6682, 6682), - Box(6683, 6683), - Box(6684, 6684), - Box(6685, 6685), - Box(6686, 6686), - Box(6687, 6687), - Box(6688, 6688), - Box(6689, 6689), - Box(6690, 6690), - Box(6691, 6691), - Box(6692, 6692), - Box(6693, 6693), - Box(6694, 6694), - Box(6695, 6695), - Box(6696, 6696), - Box(6697, 6697), - Box(6698, 6698), - Box(6699, 6699), - Box(6700, 6700), - Box(6701, 6701), - Box(6702, 6702), - Box(6703, 6703), - Box(6704, 6704), - Box(6705, 6705), - Box(6706, 6706), - Box(6707, 6707), - Box(6708, 6708), - Box(6709, 6709), - Box(6710, 6710), - Box(6711, 6711), - Box(6712, 6712), - Box(6713, 6713), - Box(6714, 6714), - Box(6715, 6715), - Box(6716, 6716), - Box(6717, 6717), - Box(6718, 6718), - Box(6719, 6719), - Box(6720, 6720), - Box(6721, 6721), - Box(6722, 6722), - Box(6723, 6723), - Box(6724, 6724), - Box(6725, 6725), - Box(6726, 6726), - Box(6727, 6727), - Box(6728, 6728), - Box(6729, 6729), - Box(6730, 6730), - Box(6731, 6731), - Box(6732, 6732), - Box(6733, 6733), - Box(6734, 6734), - Box(6735, 6735), - Box(6736, 6736), - Box(6737, 6737), - Box(6738, 6738), - Box(6739, 6739), - Box(6740, 6740), - Box(6741, 6741), - Box(6742, 6742), - Box(6743, 6743), - Box(6744, 6744), - Box(6745, 6745), - Box(6746, 6746), - Box(6747, 6747), - Box(6748, 6748), - Box(6749, 6749), - Box(6750, 6750), - Box(6751, 6751), - Box(6752, 6752), - Box(6753, 6753), - Box(6754, 6754), - Box(6755, 6755), - Box(6756, 6756), - Box(6757, 6757), - Box(6758, 6758), - Box(6759, 6759), - Box(6760, 6760), - Box(6761, 6761), - Box(6762, 6762), - Box(6763, 6763), - Box(6764, 6764), - Box(6765, 6765), - Box(6766, 6766), - Box(6767, 6767), - Box(6768, 6768), - Box(6769, 6769), - Box(6770, 6770), - Box(6771, 6771), - Box(6772, 6772), - Box(6773, 6773), - Box(6774, 6774), - Box(6775, 6775), - Box(6776, 6776), - Box(6777, 6777), - Box(6778, 6778), - Box(6779, 6779), - Box(6780, 6780), - Box(6781, 6781), - Box(6782, 6782), - Box(6783, 6783), - Box(6784, 6784), - Box(6785, 6785), - Box(6786, 6786), - Box(6787, 6787), - Box(6788, 6788), - Box(6789, 6789), - Box(6790, 6790), - Box(6791, 6791), - Box(6792, 6792), - Box(6793, 6793), - Box(6794, 6794), - Box(6795, 6795), - Box(6796, 6796), - Box(6797, 6797), - Box(6798, 6798), - Box(6799, 6799), - Box(6800, 6800), - Box(6801, 6801), - Box(6802, 6802), - Box(6803, 6803), - Box(6804, 6804), - Box(6805, 6805), - Box(6806, 6806), - Box(6807, 6807), - Box(6808, 6808), - Box(6809, 6809), - Box(6810, 6810), - Box(6811, 6811), - Box(6812, 6812), - Box(6813, 6813), - Box(6814, 6814), - Box(6815, 6815), - Box(6816, 6816), - Box(6817, 6817), - Box(6818, 6818), - Box(6819, 6819), - Box(6820, 6820), - Box(6821, 6821), - Box(6822, 6822), - Box(6823, 6823), - Box(6824, 6824), - Box(6825, 6825), - Box(6826, 6826), - Box(6827, 6827), - Box(6828, 6828), - Box(6829, 6829), - Box(6830, 6830), - Box(6831, 6831), - Box(6832, 6832), - Box(6833, 6833), - Box(6834, 6834), - Box(6835, 6835), - Box(6836, 6836), - Box(6837, 6837), - Box(6838, 6838), - Box(6839, 6839), - Box(6840, 6840), - Box(6841, 6841), - Box(6842, 6842), - Box(6843, 6843), - Box(6844, 6844), - Box(6845, 6845), - Box(6846, 6846), - Box(6847, 6847), - Box(6848, 6848), - Box(6849, 6849), - Box(6850, 6850), - Box(6851, 6851), - Box(6852, 6852), - Box(6853, 6853), - Box(6854, 6854), - Box(6855, 6855), - Box(6856, 6856), - Box(6857, 6857), - Box(6858, 6858), - Box(6859, 6859), - Box(6860, 6860), - Box(6861, 6861), - Box(6862, 6862), - Box(6863, 6863), - Box(6864, 6864), - Box(6865, 6865), - Box(6866, 6866), - Box(6867, 6867), - Box(6868, 6868), - Box(6869, 6869), - Box(6870, 6870), - Box(6871, 6871), - Box(6872, 6872), - Box(6873, 6873), - Box(6874, 6874), - Box(6875, 6875), - Box(6876, 6876), - Box(6877, 6877), - Box(6878, 6878), - Box(6879, 6879), - Box(6880, 6880), - Box(6881, 6881), - Box(6882, 6882), - Box(6883, 6883), - Box(6884, 6884), - Box(6885, 6885), - Box(6886, 6886), - Box(6887, 6887), - Box(6888, 6888), - Box(6889, 6889), - Box(6890, 6890), - Box(6891, 6891), - Box(6892, 6892), - Box(6893, 6893), - Box(6894, 6894), - Box(6895, 6895), - Box(6896, 6896), - Box(6897, 6897), - Box(6898, 6898), - Box(6899, 6899), - Box(6900, 6900), - Box(6901, 6901), - Box(6902, 6902), - Box(6903, 6903), - Box(6904, 6904), - Box(6905, 6905), - Box(6906, 6906), - Box(6907, 6907), - Box(6908, 6908), - Box(6909, 6909), - Box(6910, 6910), - Box(6911, 6911), - Box(6912, 6912), - Box(6913, 6913), - Box(6914, 6914), - Box(6915, 6915), - Box(6916, 6916), - Box(6917, 6917), - Box(6918, 6918), - Box(6919, 6919), - Box(6920, 6920), - Box(6921, 6921), - Box(6922, 6922), - Box(6923, 6923), - Box(6924, 6924), - Box(6925, 6925), - Box(6926, 6926), - Box(6927, 6927), - Box(6928, 6928), - Box(6929, 6929), - Box(6930, 6930), - Box(6931, 6931), - Box(6932, 6932), - Box(6933, 6933), - Box(6934, 6934), - Box(6935, 6935), - Box(6936, 6936), - Box(6937, 6937), - Box(6938, 6938), - Box(6939, 6939), - Box(6940, 6940), - Box(6941, 6941), - Box(6942, 6942), - Box(6943, 6943), - Box(6944, 6944), - Box(6945, 6945), - Box(6946, 6946), - Box(6947, 6947), - Box(6948, 6948), - Box(6949, 6949), - Box(6950, 6950), - Box(6951, 6951), - Box(6952, 6952), - Box(6953, 6953), - Box(6954, 6954), - Box(6955, 6955), - Box(6956, 6956), - Box(6957, 6957), - Box(6958, 6958), - Box(6959, 6959), - Box(6960, 6960), - Box(6961, 6961), - Box(6962, 6962), - Box(6963, 6963), - Box(6964, 6964), - Box(6965, 6965), - Box(6966, 6966), - Box(6967, 6967), - Box(6968, 6968), - Box(6969, 6969), - Box(6970, 6970), - Box(6971, 6971), - Box(6972, 6972), - Box(6973, 6973), - Box(6974, 6974), - Box(6975, 6975), - Box(6976, 6976), - Box(6977, 6977), - Box(6978, 6978), - Box(6979, 6979), - Box(6980, 6980), - Box(6981, 6981), - Box(6982, 6982), - Box(6983, 6983), - Box(6984, 6984), - Box(6985, 6985), - Box(6986, 6986), - Box(6987, 6987), - Box(6988, 6988), - Box(6989, 6989), - Box(6990, 6990), - Box(6991, 6991), - Box(6992, 6992), - Box(6993, 6993), - Box(6994, 6994), - Box(6995, 6995), - Box(6996, 6996), - Box(6997, 6997), - Box(6998, 6998), - Box(6999, 6999), - Box(7000, 7000), - Box(7001, 7001), - Box(7002, 7002), - Box(7003, 7003), - Box(7004, 7004), - Box(7005, 7005), - Box(7006, 7006), - Box(7007, 7007), - Box(7008, 7008), - Box(7009, 7009), - Box(7010, 7010), - Box(7011, 7011), - Box(7012, 7012), - Box(7013, 7013), - Box(7014, 7014), - Box(7015, 7015), - Box(7016, 7016), - Box(7017, 7017), - Box(7018, 7018), - Box(7019, 7019), - Box(7020, 7020), - Box(7021, 7021), - Box(7022, 7022), - Box(7023, 7023), - Box(7024, 7024), - Box(7025, 7025), - Box(7026, 7026), - Box(7027, 7027), - Box(7028, 7028), - Box(7029, 7029), - Box(7030, 7030), - Box(7031, 7031), - Box(7032, 7032), - Box(7033, 7033), - Box(7034, 7034), - Box(7035, 7035), - Box(7036, 7036), - Box(7037, 7037), - Box(7038, 7038), - Box(7039, 7039), - Box(7040, 7040), - Box(7041, 7041), - Box(7042, 7042), - Box(7043, 7043), - Box(7044, 7044), - Box(7045, 7045), - Box(7046, 7046), - Box(7047, 7047), - Box(7048, 7048), - Box(7049, 7049), - Box(7050, 7050), - Box(7051, 7051), - Box(7052, 7052), - Box(7053, 7053), - Box(7054, 7054), - Box(7055, 7055), - Box(7056, 7056), - Box(7057, 7057), - Box(7058, 7058), - Box(7059, 7059), - Box(7060, 7060), - Box(7061, 7061), - Box(7062, 7062), - Box(7063, 7063), - Box(7064, 7064), - Box(7065, 7065), - Box(7066, 7066), - Box(7067, 7067), - Box(7068, 7068), - Box(7069, 7069), - Box(7070, 7070), - Box(7071, 7071), - Box(7072, 7072), - Box(7073, 7073), - Box(7074, 7074), - Box(7075, 7075), - Box(7076, 7076), - Box(7077, 7077), - Box(7078, 7078), - Box(7079, 7079), - Box(7080, 7080), - Box(7081, 7081), - Box(7082, 7082), - Box(7083, 7083), - Box(7084, 7084), - Box(7085, 7085), - Box(7086, 7086), - Box(7087, 7087), - Box(7088, 7088), - Box(7089, 7089), - Box(7090, 7090), - Box(7091, 7091), - Box(7092, 7092), - Box(7093, 7093), - Box(7094, 7094), - Box(7095, 7095), - Box(7096, 7096), - Box(7097, 7097), - Box(7098, 7098), - Box(7099, 7099), - Box(7100, 7100), - Box(7101, 7101), - Box(7102, 7102), - Box(7103, 7103), - Box(7104, 7104), - Box(7105, 7105), - Box(7106, 7106), - Box(7107, 7107), - Box(7108, 7108), - Box(7109, 7109), - Box(7110, 7110), - Box(7111, 7111), - Box(7112, 7112), - Box(7113, 7113), - Box(7114, 7114), - Box(7115, 7115), - Box(7116, 7116), - Box(7117, 7117), - Box(7118, 7118), - Box(7119, 7119), - Box(7120, 7120), - Box(7121, 7121), - Box(7122, 7122), - Box(7123, 7123), - Box(7124, 7124), - Box(7125, 7125), - Box(7126, 7126), - Box(7127, 7127), - Box(7128, 7128), - Box(7129, 7129), - Box(7130, 7130), - Box(7131, 7131), - Box(7132, 7132), - Box(7133, 7133), - Box(7134, 7134), - Box(7135, 7135), - Box(7136, 7136), - Box(7137, 7137), - Box(7138, 7138), - Box(7139, 7139), - Box(7140, 7140), - Box(7141, 7141), - Box(7142, 7142), - Box(7143, 7143), - Box(7144, 7144), - Box(7145, 7145), - Box(7146, 7146), - Box(7147, 7147), - Box(7148, 7148), - Box(7149, 7149), - Box(7150, 7150), - Box(7151, 7151), - Box(7152, 7152), - Box(7153, 7153), - Box(7154, 7154), - Box(7155, 7155), - Box(7156, 7156), - Box(7157, 7157), - Box(7158, 7158), - Box(7159, 7159), - Box(7160, 7160), - Box(7161, 7161), - Box(7162, 7162), - Box(7163, 7163), - Box(7164, 7164), - Box(7165, 7165), - Box(7166, 7166), - Box(7167, 7167), - Box(7168, 7168), - Box(7169, 7169), - Box(7170, 7170), - Box(7171, 7171), - Box(7172, 7172), - Box(7173, 7173), - Box(7174, 7174), - Box(7175, 7175), - Box(7176, 7176), - Box(7177, 7177), - Box(7178, 7178), - Box(7179, 7179), - Box(7180, 7180), - Box(7181, 7181), - Box(7182, 7182), - Box(7183, 7183), - Box(7184, 7184), - Box(7185, 7185), - Box(7186, 7186), - Box(7187, 7187), - Box(7188, 7188), - Box(7189, 7189), - Box(7190, 7190), - Box(7191, 7191), - Box(7192, 7192), - Box(7193, 7193), - Box(7194, 7194), - Box(7195, 7195), - Box(7196, 7196), - Box(7197, 7197), - Box(7198, 7198), - Box(7199, 7199), - Box(7200, 7200), - Box(7201, 7201), - Box(7202, 7202), - Box(7203, 7203), - Box(7204, 7204), - Box(7205, 7205), - Box(7206, 7206), - Box(7207, 7207), - Box(7208, 7208), - Box(7209, 7209), - Box(7210, 7210), - Box(7211, 7211), - Box(7212, 7212), - Box(7213, 7213), - Box(7214, 7214), - Box(7215, 7215), - Box(7216, 7216), - Box(7217, 7217), - Box(7218, 7218), - Box(7219, 7219), - Box(7220, 7220), - Box(7221, 7221), - Box(7222, 7222), - Box(7223, 7223), - Box(7224, 7224), - Box(7225, 7225), - Box(7226, 7226), - Box(7227, 7227), - Box(7228, 7228), - Box(7229, 7229), - Box(7230, 7230), - Box(7231, 7231), - Box(7232, 7232), - Box(7233, 7233), - Box(7234, 7234), - Box(7235, 7235), - Box(7236, 7236), - Box(7237, 7237), - Box(7238, 7238), - Box(7239, 7239), - Box(7240, 7240), - Box(7241, 7241), - Box(7242, 7242), - Box(7243, 7243), - Box(7244, 7244), - Box(7245, 7245), - Box(7246, 7246), - Box(7247, 7247), - Box(7248, 7248), - Box(7249, 7249), - Box(7250, 7250), - Box(7251, 7251), - Box(7252, 7252), - Box(7253, 7253), - Box(7254, 7254), - Box(7255, 7255), - Box(7256, 7256), - Box(7257, 7257), - Box(7258, 7258), - Box(7259, 7259), - Box(7260, 7260), - Box(7261, 7261), - Box(7262, 7262), - Box(7263, 7263), - Box(7264, 7264), - Box(7265, 7265), - Box(7266, 7266), - Box(7267, 7267), - Box(7268, 7268), - Box(7269, 7269), - Box(7270, 7270), - Box(7271, 7271), - Box(7272, 7272), - Box(7273, 7273), - Box(7274, 7274), - Box(7275, 7275), - Box(7276, 7276), - Box(7277, 7277), - Box(7278, 7278), - Box(7279, 7279), - Box(7280, 7280), - Box(7281, 7281), - Box(7282, 7282), - Box(7283, 7283), - Box(7284, 7284), - Box(7285, 7285), - Box(7286, 7286), - Box(7287, 7287), - Box(7288, 7288), - Box(7289, 7289), - Box(7290, 7290), - Box(7291, 7291), - Box(7292, 7292), - Box(7293, 7293), - Box(7294, 7294), - Box(7295, 7295), - Box(7296, 7296), - Box(7297, 7297), - Box(7298, 7298), - Box(7299, 7299), - Box(7300, 7300), - Box(7301, 7301), - Box(7302, 7302), - Box(7303, 7303), - Box(7304, 7304), - Box(7305, 7305), - Box(7306, 7306), - Box(7307, 7307), - Box(7308, 7308), - Box(7309, 7309), - Box(7310, 7310), - Box(7311, 7311), - Box(7312, 7312), - Box(7313, 7313), - Box(7314, 7314), - Box(7315, 7315), - Box(7316, 7316), - Box(7317, 7317), - Box(7318, 7318), - Box(7319, 7319), - Box(7320, 7320), - Box(7321, 7321), - Box(7322, 7322), - Box(7323, 7323), - Box(7324, 7324), - Box(7325, 7325), - Box(7326, 7326), - Box(7327, 7327), - Box(7328, 7328), - Box(7329, 7329), - Box(7330, 7330), - Box(7331, 7331), - Box(7332, 7332), - Box(7333, 7333), - Box(7334, 7334), - Box(7335, 7335), - Box(7336, 7336), - Box(7337, 7337), - Box(7338, 7338), - Box(7339, 7339), - Box(7340, 7340), - Box(7341, 7341), - Box(7342, 7342), - Box(7343, 7343), - Box(7344, 7344), - Box(7345, 7345), - Box(7346, 7346), - Box(7347, 7347), - Box(7348, 7348), - Box(7349, 7349), - Box(7350, 7350), - Box(7351, 7351), - Box(7352, 7352), - Box(7353, 7353), - Box(7354, 7354), - Box(7355, 7355), - Box(7356, 7356), - Box(7357, 7357), - Box(7358, 7358), - Box(7359, 7359), - Box(7360, 7360), - Box(7361, 7361), - Box(7362, 7362), - Box(7363, 7363), - Box(7364, 7364), - Box(7365, 7365), - Box(7366, 7366), - Box(7367, 7367), - Box(7368, 7368), - Box(7369, 7369), - Box(7370, 7370), - Box(7371, 7371), - Box(7372, 7372), - Box(7373, 7373), - Box(7374, 7374), - Box(7375, 7375), - Box(7376, 7376), - Box(7377, 7377), - Box(7378, 7378), - Box(7379, 7379), - Box(7380, 7380), - Box(7381, 7381), - Box(7382, 7382), - Box(7383, 7383), - Box(7384, 7384), - Box(7385, 7385), - Box(7386, 7386), - Box(7387, 7387), - Box(7388, 7388), - Box(7389, 7389), - Box(7390, 7390), - Box(7391, 7391), - Box(7392, 7392), - Box(7393, 7393), - Box(7394, 7394), - Box(7395, 7395), - Box(7396, 7396), - Box(7397, 7397), - Box(7398, 7398), - Box(7399, 7399), - Box(7400, 7400), - Box(7401, 7401), - Box(7402, 7402), - Box(7403, 7403), - Box(7404, 7404), - Box(7405, 7405), - Box(7406, 7406), - Box(7407, 7407), - Box(7408, 7408), - Box(7409, 7409), - Box(7410, 7410), - Box(7411, 7411), - Box(7412, 7412), - Box(7413, 7413), - Box(7414, 7414), - Box(7415, 7415), - Box(7416, 7416), - Box(7417, 7417), - Box(7418, 7418), - Box(7419, 7419), - Box(7420, 7420), - Box(7421, 7421), - Box(7422, 7422), - Box(7423, 7423), - Box(7424, 7424), - Box(7425, 7425), - Box(7426, 7426), - Box(7427, 7427), - Box(7428, 7428), - Box(7429, 7429), - Box(7430, 7430), - Box(7431, 7431), - Box(7432, 7432), - Box(7433, 7433), - Box(7434, 7434), - Box(7435, 7435), - Box(7436, 7436), - Box(7437, 7437), - Box(7438, 7438), - Box(7439, 7439), - Box(7440, 7440), - Box(7441, 7441), - Box(7442, 7442), - Box(7443, 7443), - Box(7444, 7444), - Box(7445, 7445), - Box(7446, 7446), - Box(7447, 7447), - Box(7448, 7448), - Box(7449, 7449), - Box(7450, 7450), - Box(7451, 7451), - Box(7452, 7452), - Box(7453, 7453), - Box(7454, 7454), - Box(7455, 7455), - Box(7456, 7456), - Box(7457, 7457), - Box(7458, 7458), - Box(7459, 7459), - Box(7460, 7460), - Box(7461, 7461), - Box(7462, 7462), - Box(7463, 7463), - Box(7464, 7464), - Box(7465, 7465), - Box(7466, 7466), - Box(7467, 7467), - Box(7468, 7468), - Box(7469, 7469), - Box(7470, 7470), - Box(7471, 7471), - Box(7472, 7472), - Box(7473, 7473), - Box(7474, 7474), - Box(7475, 7475), - Box(7476, 7476), - Box(7477, 7477), - Box(7478, 7478), - Box(7479, 7479), - Box(7480, 7480), - Box(7481, 7481), - Box(7482, 7482), - Box(7483, 7483), - Box(7484, 7484), - Box(7485, 7485), - Box(7486, 7486), - Box(7487, 7487), - Box(7488, 7488), - Box(7489, 7489), - Box(7490, 7490), - Box(7491, 7491), - Box(7492, 7492), - Box(7493, 7493), - Box(7494, 7494), - Box(7495, 7495), - Box(7496, 7496), - Box(7497, 7497), - Box(7498, 7498), - Box(7499, 7499), - Box(7500, 7500), - Box(7501, 7501), - Box(7502, 7502), - Box(7503, 7503), - Box(7504, 7504), - Box(7505, 7505), - Box(7506, 7506), - Box(7507, 7507), - Box(7508, 7508), - Box(7509, 7509), - Box(7510, 7510), - Box(7511, 7511), - Box(7512, 7512), - Box(7513, 7513), - Box(7514, 7514), - Box(7515, 7515), - Box(7516, 7516), - Box(7517, 7517), - Box(7518, 7518), - Box(7519, 7519), - Box(7520, 7520), - Box(7521, 7521), - Box(7522, 7522), - Box(7523, 7523), - Box(7524, 7524), - Box(7525, 7525), - Box(7526, 7526), - Box(7527, 7527), - Box(7528, 7528), - Box(7529, 7529), - Box(7530, 7530), - Box(7531, 7531), - Box(7532, 7532), - Box(7533, 7533), - Box(7534, 7534), - Box(7535, 7535), - Box(7536, 7536), - Box(7537, 7537), - Box(7538, 7538), - Box(7539, 7539), - Box(7540, 7540), - Box(7541, 7541), - Box(7542, 7542), - Box(7543, 7543), - Box(7544, 7544), - Box(7545, 7545), - Box(7546, 7546), - Box(7547, 7547), - Box(7548, 7548), - Box(7549, 7549), - Box(7550, 7550), - Box(7551, 7551), - Box(7552, 7552), - Box(7553, 7553), - Box(7554, 7554), - Box(7555, 7555), - Box(7556, 7556), - Box(7557, 7557), - Box(7558, 7558), - Box(7559, 7559), - Box(7560, 7560), - Box(7561, 7561), - Box(7562, 7562), - Box(7563, 7563), - Box(7564, 7564), - Box(7565, 7565), - Box(7566, 7566), - Box(7567, 7567), - Box(7568, 7568), - Box(7569, 7569), - Box(7570, 7570), - Box(7571, 7571), - Box(7572, 7572), - Box(7573, 7573), - Box(7574, 7574), - Box(7575, 7575), - Box(7576, 7576), - Box(7577, 7577), - Box(7578, 7578), - Box(7579, 7579), - Box(7580, 7580), - Box(7581, 7581), - Box(7582, 7582), - Box(7583, 7583), - Box(7584, 7584), - Box(7585, 7585), - Box(7586, 7586), - Box(7587, 7587), - Box(7588, 7588), - Box(7589, 7589), - Box(7590, 7590), - Box(7591, 7591), - Box(7592, 7592), - Box(7593, 7593), - Box(7594, 7594), - Box(7595, 7595), - Box(7596, 7596), - Box(7597, 7597), - Box(7598, 7598), - Box(7599, 7599), - Box(7600, 7600), - Box(7601, 7601), - Box(7602, 7602), - Box(7603, 7603), - Box(7604, 7604), - Box(7605, 7605), - Box(7606, 7606), - Box(7607, 7607), - Box(7608, 7608), - Box(7609, 7609), - Box(7610, 7610), - Box(7611, 7611), - Box(7612, 7612), - Box(7613, 7613), - Box(7614, 7614), - Box(7615, 7615), - Box(7616, 7616), - Box(7617, 7617), - Box(7618, 7618), - Box(7619, 7619), - Box(7620, 7620), - Box(7621, 7621), - Box(7622, 7622), - Box(7623, 7623), - Box(7624, 7624), - Box(7625, 7625), - Box(7626, 7626), - Box(7627, 7627), - Box(7628, 7628), - Box(7629, 7629), - Box(7630, 7630), - Box(7631, 7631), - Box(7632, 7632), - Box(7633, 7633), - Box(7634, 7634), - Box(7635, 7635), - Box(7636, 7636), - Box(7637, 7637), - Box(7638, 7638), - Box(7639, 7639), - Box(7640, 7640), - Box(7641, 7641), - Box(7642, 7642), - Box(7643, 7643), - Box(7644, 7644), - Box(7645, 7645), - Box(7646, 7646), - Box(7647, 7647), - Box(7648, 7648), - Box(7649, 7649), - Box(7650, 7650), - Box(7651, 7651), - Box(7652, 7652), - Box(7653, 7653), - Box(7654, 7654), - Box(7655, 7655), - Box(7656, 7656), - Box(7657, 7657), - Box(7658, 7658), - Box(7659, 7659), - Box(7660, 7660), - Box(7661, 7661), - Box(7662, 7662), - Box(7663, 7663), - Box(7664, 7664), - Box(7665, 7665), - Box(7666, 7666), - Box(7667, 7667), - Box(7668, 7668), - Box(7669, 7669), - Box(7670, 7670), - Box(7671, 7671), - Box(7672, 7672), - Box(7673, 7673), - Box(7674, 7674), - Box(7675, 7675), - Box(7676, 7676), - Box(7677, 7677), - Box(7678, 7678), - Box(7679, 7679), - Box(7680, 7680), - Box(7681, 7681), - Box(7682, 7682), - Box(7683, 7683), - Box(7684, 7684), - Box(7685, 7685), - Box(7686, 7686), - Box(7687, 7687), - Box(7688, 7688), - Box(7689, 7689), - Box(7690, 7690), - Box(7691, 7691), - Box(7692, 7692), - Box(7693, 7693), - Box(7694, 7694), - Box(7695, 7695), - Box(7696, 7696), - Box(7697, 7697), - Box(7698, 7698), - Box(7699, 7699), - Box(7700, 7700), - Box(7701, 7701), - Box(7702, 7702), - Box(7703, 7703), - Box(7704, 7704), - Box(7705, 7705), - Box(7706, 7706), - Box(7707, 7707), - Box(7708, 7708), - Box(7709, 7709), - Box(7710, 7710), - Box(7711, 7711), - Box(7712, 7712), - Box(7713, 7713), - Box(7714, 7714), - Box(7715, 7715), - Box(7716, 7716), - Box(7717, 7717), - Box(7718, 7718), - Box(7719, 7719), - Box(7720, 7720), - Box(7721, 7721), - Box(7722, 7722), - Box(7723, 7723), - Box(7724, 7724), - Box(7725, 7725), - Box(7726, 7726), - Box(7727, 7727), - Box(7728, 7728), - Box(7729, 7729), - Box(7730, 7730), - Box(7731, 7731), - Box(7732, 7732), - Box(7733, 7733), - Box(7734, 7734), - Box(7735, 7735), - Box(7736, 7736), - Box(7737, 7737), - Box(7738, 7738), - Box(7739, 7739), - Box(7740, 7740), - Box(7741, 7741), - Box(7742, 7742), - Box(7743, 7743), - Box(7744, 7744), - Box(7745, 7745), - Box(7746, 7746), - Box(7747, 7747), - Box(7748, 7748), - Box(7749, 7749), - Box(7750, 7750), - Box(7751, 7751), - Box(7752, 7752), - Box(7753, 7753), - Box(7754, 7754), - Box(7755, 7755), - Box(7756, 7756), - Box(7757, 7757), - Box(7758, 7758), - Box(7759, 7759), - Box(7760, 7760), - Box(7761, 7761), - Box(7762, 7762), - Box(7763, 7763), - Box(7764, 7764), - Box(7765, 7765), - Box(7766, 7766), - Box(7767, 7767), - Box(7768, 7768), - Box(7769, 7769), - Box(7770, 7770), - Box(7771, 7771), - Box(7772, 7772), - Box(7773, 7773), - Box(7774, 7774), - Box(7775, 7775), - Box(7776, 7776), - Box(7777, 7777), - Box(7778, 7778), - Box(7779, 7779), - Box(7780, 7780), - Box(7781, 7781), - Box(7782, 7782), - Box(7783, 7783), - Box(7784, 7784), - Box(7785, 7785), - Box(7786, 7786), - Box(7787, 7787), - Box(7788, 7788), - Box(7789, 7789), - Box(7790, 7790), - Box(7791, 7791), - Box(7792, 7792), - Box(7793, 7793), - Box(7794, 7794), - Box(7795, 7795), - Box(7796, 7796), - Box(7797, 7797), - Box(7798, 7798), - Box(7799, 7799), - Box(7800, 7800), - Box(7801, 7801), - Box(7802, 7802), - Box(7803, 7803), - Box(7804, 7804), - Box(7805, 7805), - Box(7806, 7806), - Box(7807, 7807), - Box(7808, 7808), - Box(7809, 7809), - Box(7810, 7810), - Box(7811, 7811), - Box(7812, 7812), - Box(7813, 7813), - Box(7814, 7814), - Box(7815, 7815), - Box(7816, 7816), - Box(7817, 7817), - Box(7818, 7818), - Box(7819, 7819), - Box(7820, 7820), - Box(7821, 7821), - Box(7822, 7822), - Box(7823, 7823), - Box(7824, 7824), - Box(7825, 7825), - Box(7826, 7826), - Box(7827, 7827), - Box(7828, 7828), - Box(7829, 7829), - Box(7830, 7830), - Box(7831, 7831), - Box(7832, 7832), - Box(7833, 7833), - Box(7834, 7834), - Box(7835, 7835), - Box(7836, 7836), - Box(7837, 7837), - Box(7838, 7838), - Box(7839, 7839), - Box(7840, 7840), - Box(7841, 7841), - Box(7842, 7842), - Box(7843, 7843), - Box(7844, 7844), - Box(7845, 7845), - Box(7846, 7846), - Box(7847, 7847), - Box(7848, 7848), - Box(7849, 7849), - Box(7850, 7850), - Box(7851, 7851), - Box(7852, 7852), - Box(7853, 7853), - Box(7854, 7854), - Box(7855, 7855), - Box(7856, 7856), - Box(7857, 7857), - Box(7858, 7858), - Box(7859, 7859), - Box(7860, 7860), - Box(7861, 7861), - Box(7862, 7862), - Box(7863, 7863), - Box(7864, 7864), - Box(7865, 7865), - Box(7866, 7866), - Box(7867, 7867), - Box(7868, 7868), - Box(7869, 7869), - Box(7870, 7870), - Box(7871, 7871), - Box(7872, 7872), - Box(7873, 7873), - Box(7874, 7874), - Box(7875, 7875), - Box(7876, 7876), - Box(7877, 7877), - Box(7878, 7878), - Box(7879, 7879), - Box(7880, 7880), - Box(7881, 7881), - Box(7882, 7882), - Box(7883, 7883), - Box(7884, 7884), - Box(7885, 7885), - Box(7886, 7886), - Box(7887, 7887), - Box(7888, 7888), - Box(7889, 7889), - Box(7890, 7890), - Box(7891, 7891), - Box(7892, 7892), - Box(7893, 7893), - Box(7894, 7894), - Box(7895, 7895), - Box(7896, 7896), - Box(7897, 7897), - Box(7898, 7898), - Box(7899, 7899), - Box(7900, 7900), - Box(7901, 7901), - Box(7902, 7902), - Box(7903, 7903), - Box(7904, 7904), - Box(7905, 7905), - Box(7906, 7906), - Box(7907, 7907), - Box(7908, 7908), - Box(7909, 7909), - Box(7910, 7910), - Box(7911, 7911), - Box(7912, 7912), - Box(7913, 7913), - Box(7914, 7914), - Box(7915, 7915), - Box(7916, 7916), - Box(7917, 7917), - Box(7918, 7918), - Box(7919, 7919), - Box(7920, 7920), - Box(7921, 7921), - Box(7922, 7922), - Box(7923, 7923), - Box(7924, 7924), - Box(7925, 7925), - Box(7926, 7926), - Box(7927, 7927), - Box(7928, 7928), - Box(7929, 7929), - Box(7930, 7930), - Box(7931, 7931), - Box(7932, 7932), - Box(7933, 7933), - Box(7934, 7934), - Box(7935, 7935), - Box(7936, 7936), - Box(7937, 7937), - Box(7938, 7938), - Box(7939, 7939), - Box(7940, 7940), - Box(7941, 7941), - Box(7942, 7942), - Box(7943, 7943), - Box(7944, 7944), - Box(7945, 7945), - Box(7946, 7946), - Box(7947, 7947), - Box(7948, 7948), - Box(7949, 7949), - Box(7950, 7950), - Box(7951, 7951), - Box(7952, 7952), - Box(7953, 7953), - Box(7954, 7954), - Box(7955, 7955), - Box(7956, 7956), - Box(7957, 7957), - Box(7958, 7958), - Box(7959, 7959), - Box(7960, 7960), - Box(7961, 7961), - Box(7962, 7962), - Box(7963, 7963), - Box(7964, 7964), - Box(7965, 7965), - Box(7966, 7966), - Box(7967, 7967), - Box(7968, 7968), - Box(7969, 7969), - Box(7970, 7970), - Box(7971, 7971), - Box(7972, 7972), - Box(7973, 7973), - Box(7974, 7974), - Box(7975, 7975), - Box(7976, 7976), - Box(7977, 7977), - Box(7978, 7978), - Box(7979, 7979), - Box(7980, 7980), - Box(7981, 7981), - Box(7982, 7982), - Box(7983, 7983), - Box(7984, 7984), - Box(7985, 7985), - Box(7986, 7986), - Box(7987, 7987), - Box(7988, 7988), - Box(7989, 7989), - Box(7990, 7990), - Box(7991, 7991), - Box(7992, 7992), - Box(7993, 7993), - Box(7994, 7994), - Box(7995, 7995), - Box(7996, 7996), - Box(7997, 7997), - Box(7998, 7998), - Box(7999, 7999), - Box(8000, 8000), - Box(8001, 8001), - Box(8002, 8002), - Box(8003, 8003), - Box(8004, 8004), - Box(8005, 8005), - Box(8006, 8006), - Box(8007, 8007), - Box(8008, 8008), - Box(8009, 8009), - Box(8010, 8010), - Box(8011, 8011), - Box(8012, 8012), - Box(8013, 8013), - Box(8014, 8014), - Box(8015, 8015), - Box(8016, 8016), - Box(8017, 8017), - Box(8018, 8018), - Box(8019, 8019), - Box(8020, 8020), - Box(8021, 8021), - Box(8022, 8022), - Box(8023, 8023), - Box(8024, 8024), - Box(8025, 8025), - Box(8026, 8026), - Box(8027, 8027), - Box(8028, 8028), - Box(8029, 8029), - Box(8030, 8030), - Box(8031, 8031), - Box(8032, 8032), - Box(8033, 8033), - Box(8034, 8034), - Box(8035, 8035), - Box(8036, 8036), - Box(8037, 8037), - Box(8038, 8038), - Box(8039, 8039), - Box(8040, 8040), - Box(8041, 8041), - Box(8042, 8042), - Box(8043, 8043), - Box(8044, 8044), - Box(8045, 8045), - Box(8046, 8046), - Box(8047, 8047), - Box(8048, 8048), - Box(8049, 8049), - Box(8050, 8050), - Box(8051, 8051), - Box(8052, 8052), - Box(8053, 8053), - Box(8054, 8054), - Box(8055, 8055), - Box(8056, 8056), - Box(8057, 8057), - Box(8058, 8058), - Box(8059, 8059), - Box(8060, 8060), - Box(8061, 8061), - Box(8062, 8062), - Box(8063, 8063), - Box(8064, 8064), - Box(8065, 8065), - Box(8066, 8066), - Box(8067, 8067), - Box(8068, 8068), - Box(8069, 8069), - Box(8070, 8070), - Box(8071, 8071), - Box(8072, 8072), - Box(8073, 8073), - Box(8074, 8074), - Box(8075, 8075), - Box(8076, 8076), - Box(8077, 8077), - Box(8078, 8078), - Box(8079, 8079), - Box(8080, 8080), - Box(8081, 8081), - Box(8082, 8082), - Box(8083, 8083), - Box(8084, 8084), - Box(8085, 8085), - Box(8086, 8086), - Box(8087, 8087), - Box(8088, 8088), - Box(8089, 8089), - Box(8090, 8090), - Box(8091, 8091), - Box(8092, 8092), - Box(8093, 8093), - Box(8094, 8094), - Box(8095, 8095), - Box(8096, 8096), - Box(8097, 8097), - Box(8098, 8098), - Box(8099, 8099), - Box(8100, 8100), - Box(8101, 8101), - Box(8102, 8102), - Box(8103, 8103), - Box(8104, 8104), - Box(8105, 8105), - Box(8106, 8106), - Box(8107, 8107), - Box(8108, 8108), - Box(8109, 8109), - Box(8110, 8110), - Box(8111, 8111), - Box(8112, 8112), - Box(8113, 8113), - Box(8114, 8114), - Box(8115, 8115), - Box(8116, 8116), - Box(8117, 8117), - Box(8118, 8118), - Box(8119, 8119), - Box(8120, 8120), - Box(8121, 8121), - Box(8122, 8122), - Box(8123, 8123), - Box(8124, 8124), - Box(8125, 8125), - Box(8126, 8126), - Box(8127, 8127), - Box(8128, 8128), - Box(8129, 8129), - Box(8130, 8130), - Box(8131, 8131), - Box(8132, 8132), - Box(8133, 8133), - Box(8134, 8134), - Box(8135, 8135), - Box(8136, 8136), - Box(8137, 8137), - Box(8138, 8138), - Box(8139, 8139), - Box(8140, 8140), - Box(8141, 8141), - Box(8142, 8142), - Box(8143, 8143), - Box(8144, 8144), - Box(8145, 8145), - Box(8146, 8146), - Box(8147, 8147), - Box(8148, 8148), - Box(8149, 8149), - Box(8150, 8150), - Box(8151, 8151), - Box(8152, 8152), - Box(8153, 8153), - Box(8154, 8154), - Box(8155, 8155), - Box(8156, 8156), - Box(8157, 8157), - Box(8158, 8158), - Box(8159, 8159), - Box(8160, 8160), - Box(8161, 8161), - Box(8162, 8162), - Box(8163, 8163), - Box(8164, 8164), - Box(8165, 8165), - Box(8166, 8166), - Box(8167, 8167), - Box(8168, 8168), - Box(8169, 8169), - Box(8170, 8170), - Box(8171, 8171), - Box(8172, 8172), - Box(8173, 8173), - Box(8174, 8174), - Box(8175, 8175), - Box(8176, 8176), - Box(8177, 8177), - Box(8178, 8178), - Box(8179, 8179), - Box(8180, 8180), - Box(8181, 8181), - Box(8182, 8182), - Box(8183, 8183), - Box(8184, 8184), - Box(8185, 8185), - Box(8186, 8186), - Box(8187, 8187), - Box(8188, 8188), - Box(8189, 8189), - Box(8190, 8190), - Box(8191, 8191), - Box(8192, 8192), - Box(8193, 8193), - Box(8194, 8194), - Box(8195, 8195), - Box(8196, 8196), - Box(8197, 8197), - Box(8198, 8198), - Box(8199, 8199), - Box(8200, 8200), - Box(8201, 8201), - Box(8202, 8202), - Box(8203, 8203), - Box(8204, 8204), - Box(8205, 8205), - Box(8206, 8206), - Box(8207, 8207), - Box(8208, 8208), - Box(8209, 8209), - Box(8210, 8210), - Box(8211, 8211), - Box(8212, 8212), - Box(8213, 8213), - Box(8214, 8214), - Box(8215, 8215), - Box(8216, 8216), - Box(8217, 8217), - Box(8218, 8218), - Box(8219, 8219), - Box(8220, 8220), - Box(8221, 8221), - Box(8222, 8222), - Box(8223, 8223), - Box(8224, 8224), - Box(8225, 8225), - Box(8226, 8226), - Box(8227, 8227), - Box(8228, 8228), - Box(8229, 8229), - Box(8230, 8230), - Box(8231, 8231), - Box(8232, 8232), - Box(8233, 8233), - Box(8234, 8234), - Box(8235, 8235), - Box(8236, 8236), - Box(8237, 8237), - Box(8238, 8238), - Box(8239, 8239), - Box(8240, 8240), - Box(8241, 8241), - Box(8242, 8242), - Box(8243, 8243), - Box(8244, 8244), - Box(8245, 8245), - Box(8246, 8246), - Box(8247, 8247), - Box(8248, 8248), - Box(8249, 8249), - Box(8250, 8250), - Box(8251, 8251), - Box(8252, 8252), - Box(8253, 8253), - Box(8254, 8254), - Box(8255, 8255), - Box(8256, 8256), - Box(8257, 8257), - Box(8258, 8258), - Box(8259, 8259), - Box(8260, 8260), - Box(8261, 8261), - Box(8262, 8262), - Box(8263, 8263), - Box(8264, 8264), - Box(8265, 8265), - Box(8266, 8266), - Box(8267, 8267), - Box(8268, 8268), - Box(8269, 8269), - Box(8270, 8270), - Box(8271, 8271), - Box(8272, 8272), - Box(8273, 8273), - Box(8274, 8274), - Box(8275, 8275), - Box(8276, 8276), - Box(8277, 8277), - Box(8278, 8278), - Box(8279, 8279), - Box(8280, 8280), - Box(8281, 8281), - Box(8282, 8282), - Box(8283, 8283), - Box(8284, 8284), - Box(8285, 8285), - Box(8286, 8286), - Box(8287, 8287), - Box(8288, 8288), - Box(8289, 8289), - Box(8290, 8290), - Box(8291, 8291), - Box(8292, 8292), - Box(8293, 8293), - Box(8294, 8294), - Box(8295, 8295), - Box(8296, 8296), - Box(8297, 8297), - Box(8298, 8298), - Box(8299, 8299), - Box(8300, 8300), - Box(8301, 8301), - Box(8302, 8302), - Box(8303, 8303), - Box(8304, 8304), - Box(8305, 8305), - Box(8306, 8306), - Box(8307, 8307), - Box(8308, 8308), - Box(8309, 8309), - Box(8310, 8310), - Box(8311, 8311), - Box(8312, 8312), - Box(8313, 8313), - Box(8314, 8314), - Box(8315, 8315), - Box(8316, 8316), - Box(8317, 8317), - Box(8318, 8318), - Box(8319, 8319), - Box(8320, 8320), - Box(8321, 8321), - Box(8322, 8322), - Box(8323, 8323), - Box(8324, 8324), - Box(8325, 8325), - Box(8326, 8326), - Box(8327, 8327), - Box(8328, 8328), - Box(8329, 8329), - Box(8330, 8330), - Box(8331, 8331), - Box(8332, 8332), - Box(8333, 8333), - Box(8334, 8334), - Box(8335, 8335), - Box(8336, 8336), - Box(8337, 8337), - Box(8338, 8338), - Box(8339, 8339), - Box(8340, 8340), - Box(8341, 8341), - Box(8342, 8342), - Box(8343, 8343), - Box(8344, 8344), - Box(8345, 8345), - Box(8346, 8346), - Box(8347, 8347), - Box(8348, 8348), - Box(8349, 8349), - Box(8350, 8350), - Box(8351, 8351), - Box(8352, 8352), - Box(8353, 8353), - Box(8354, 8354), - Box(8355, 8355), - Box(8356, 8356), - Box(8357, 8357), - Box(8358, 8358), - Box(8359, 8359), - Box(8360, 8360), - Box(8361, 8361), - Box(8362, 8362), - Box(8363, 8363), - Box(8364, 8364), - Box(8365, 8365), - Box(8366, 8366), - Box(8367, 8367), - Box(8368, 8368), - Box(8369, 8369), - Box(8370, 8370), - Box(8371, 8371), - Box(8372, 8372), - Box(8373, 8373), - Box(8374, 8374), - Box(8375, 8375), - Box(8376, 8376), - Box(8377, 8377), - Box(8378, 8378), - Box(8379, 8379), - Box(8380, 8380), - Box(8381, 8381), - Box(8382, 8382), - Box(8383, 8383), - Box(8384, 8384), - Box(8385, 8385), - Box(8386, 8386), - Box(8387, 8387), - Box(8388, 8388), - Box(8389, 8389), - Box(8390, 8390), - Box(8391, 8391), - Box(8392, 8392), - Box(8393, 8393), - Box(8394, 8394), - Box(8395, 8395), - Box(8396, 8396), - Box(8397, 8397), - Box(8398, 8398), - Box(8399, 8399), - Box(8400, 8400), - Box(8401, 8401), - Box(8402, 8402), - Box(8403, 8403), - Box(8404, 8404), - Box(8405, 8405), - Box(8406, 8406), - Box(8407, 8407), - Box(8408, 8408), - Box(8409, 8409), - Box(8410, 8410), - Box(8411, 8411), - Box(8412, 8412), - Box(8413, 8413), - Box(8414, 8414), - Box(8415, 8415), - Box(8416, 8416), - Box(8417, 8417), - Box(8418, 8418), - Box(8419, 8419), - Box(8420, 8420), - Box(8421, 8421), - Box(8422, 8422), - Box(8423, 8423), - Box(8424, 8424), - Box(8425, 8425), - Box(8426, 8426), - Box(8427, 8427), - Box(8428, 8428), - Box(8429, 8429), - Box(8430, 8430), - Box(8431, 8431), - Box(8432, 8432), - Box(8433, 8433), - Box(8434, 8434), - Box(8435, 8435), - Box(8436, 8436), - Box(8437, 8437), - Box(8438, 8438), - Box(8439, 8439), - Box(8440, 8440), - Box(8441, 8441), - Box(8442, 8442), - Box(8443, 8443), - Box(8444, 8444), - Box(8445, 8445), - Box(8446, 8446), - Box(8447, 8447), - Box(8448, 8448), - Box(8449, 8449), - Box(8450, 8450), - Box(8451, 8451), - Box(8452, 8452), - Box(8453, 8453), - Box(8454, 8454), - Box(8455, 8455), - Box(8456, 8456), - Box(8457, 8457), - Box(8458, 8458), - Box(8459, 8459), - Box(8460, 8460), - Box(8461, 8461), - Box(8462, 8462), - Box(8463, 8463), - Box(8464, 8464), - Box(8465, 8465), - Box(8466, 8466), - Box(8467, 8467), - Box(8468, 8468), - Box(8469, 8469), - Box(8470, 8470), - Box(8471, 8471), - Box(8472, 8472), - Box(8473, 8473), - Box(8474, 8474), - Box(8475, 8475), - Box(8476, 8476), - Box(8477, 8477), - Box(8478, 8478), - Box(8479, 8479), - Box(8480, 8480), - Box(8481, 8481), - Box(8482, 8482), - Box(8483, 8483), - Box(8484, 8484), - Box(8485, 8485), - Box(8486, 8486), - Box(8487, 8487), - Box(8488, 8488), - Box(8489, 8489), - Box(8490, 8490), - Box(8491, 8491), - Box(8492, 8492), - Box(8493, 8493), - Box(8494, 8494), - Box(8495, 8495), - Box(8496, 8496), - Box(8497, 8497), - Box(8498, 8498), - Box(8499, 8499), - Box(8500, 8500), - Box(8501, 8501), - Box(8502, 8502), - Box(8503, 8503), - Box(8504, 8504), - Box(8505, 8505), - Box(8506, 8506), - Box(8507, 8507), - Box(8508, 8508), - Box(8509, 8509), - Box(8510, 8510), - Box(8511, 8511), - Box(8512, 8512), - Box(8513, 8513), - Box(8514, 8514), - Box(8515, 8515), - Box(8516, 8516), - Box(8517, 8517), - Box(8518, 8518), - Box(8519, 8519), - Box(8520, 8520), - Box(8521, 8521), - Box(8522, 8522), - Box(8523, 8523), - Box(8524, 8524), - Box(8525, 8525), - Box(8526, 8526), - Box(8527, 8527), - Box(8528, 8528), - Box(8529, 8529), - Box(8530, 8530), - Box(8531, 8531), - Box(8532, 8532), - Box(8533, 8533), - Box(8534, 8534), - Box(8535, 8535), - Box(8536, 8536), - Box(8537, 8537), - Box(8538, 8538), - Box(8539, 8539), - Box(8540, 8540), - Box(8541, 8541), - Box(8542, 8542), - Box(8543, 8543), - Box(8544, 8544), - Box(8545, 8545), - Box(8546, 8546), - Box(8547, 8547), - Box(8548, 8548), - Box(8549, 8549), - Box(8550, 8550), - Box(8551, 8551), - Box(8552, 8552), - Box(8553, 8553), - Box(8554, 8554), - Box(8555, 8555), - Box(8556, 8556), - Box(8557, 8557), - Box(8558, 8558), - Box(8559, 8559), - Box(8560, 8560), - Box(8561, 8561), - Box(8562, 8562), - Box(8563, 8563), - Box(8564, 8564), - Box(8565, 8565), - Box(8566, 8566), - Box(8567, 8567), - Box(8568, 8568), - Box(8569, 8569), - Box(8570, 8570), - Box(8571, 8571), - Box(8572, 8572), - Box(8573, 8573), - Box(8574, 8574), - Box(8575, 8575), - Box(8576, 8576), - Box(8577, 8577), - Box(8578, 8578), - Box(8579, 8579), - Box(8580, 8580), - Box(8581, 8581), - Box(8582, 8582), - Box(8583, 8583), - Box(8584, 8584), - Box(8585, 8585), - Box(8586, 8586), - Box(8587, 8587), - Box(8588, 8588), - Box(8589, 8589), - Box(8590, 8590), - Box(8591, 8591), - Box(8592, 8592), - Box(8593, 8593), - Box(8594, 8594), - Box(8595, 8595), - Box(8596, 8596), - Box(8597, 8597), - Box(8598, 8598), - Box(8599, 8599), - Box(8600, 8600), - Box(8601, 8601), - Box(8602, 8602), - Box(8603, 8603), - Box(8604, 8604), - Box(8605, 8605), - Box(8606, 8606), - Box(8607, 8607), - Box(8608, 8608), - Box(8609, 8609), - Box(8610, 8610), - Box(8611, 8611), - Box(8612, 8612), - Box(8613, 8613), - Box(8614, 8614), - Box(8615, 8615), - Box(8616, 8616), - Box(8617, 8617), - Box(8618, 8618), - Box(8619, 8619), - Box(8620, 8620), - Box(8621, 8621), - Box(8622, 8622), - Box(8623, 8623), - Box(8624, 8624), - Box(8625, 8625), - Box(8626, 8626), - Box(8627, 8627), - Box(8628, 8628), - Box(8629, 8629), - Box(8630, 8630), - Box(8631, 8631), - Box(8632, 8632), - Box(8633, 8633), - Box(8634, 8634), - Box(8635, 8635), - Box(8636, 8636), - Box(8637, 8637), - Box(8638, 8638), - Box(8639, 8639), - Box(8640, 8640), - Box(8641, 8641), - Box(8642, 8642), - Box(8643, 8643), - Box(8644, 8644), - Box(8645, 8645), - Box(8646, 8646), - Box(8647, 8647), - Box(8648, 8648), - Box(8649, 8649), - Box(8650, 8650), - Box(8651, 8651), - Box(8652, 8652), - Box(8653, 8653), - Box(8654, 8654), - Box(8655, 8655), - Box(8656, 8656), - Box(8657, 8657), - Box(8658, 8658), - Box(8659, 8659), - Box(8660, 8660), - Box(8661, 8661), - Box(8662, 8662), - Box(8663, 8663), - Box(8664, 8664), - Box(8665, 8665), - Box(8666, 8666), - Box(8667, 8667), - Box(8668, 8668), - Box(8669, 8669), - Box(8670, 8670), - Box(8671, 8671), - Box(8672, 8672), - Box(8673, 8673), - Box(8674, 8674), - Box(8675, 8675), - Box(8676, 8676), - Box(8677, 8677), - Box(8678, 8678), - Box(8679, 8679), - Box(8680, 8680), - Box(8681, 8681), - Box(8682, 8682), - Box(8683, 8683), - Box(8684, 8684), - Box(8685, 8685), - Box(8686, 8686), - Box(8687, 8687), - Box(8688, 8688), - Box(8689, 8689), - Box(8690, 8690), - Box(8691, 8691), - Box(8692, 8692), - Box(8693, 8693), - Box(8694, 8694), - Box(8695, 8695), - Box(8696, 8696), - Box(8697, 8697), - Box(8698, 8698), - Box(8699, 8699), - Box(8700, 8700), - Box(8701, 8701), - Box(8702, 8702), - Box(8703, 8703), - Box(8704, 8704), - Box(8705, 8705), - Box(8706, 8706), - Box(8707, 8707), - Box(8708, 8708), - Box(8709, 8709), - Box(8710, 8710), - Box(8711, 8711), - Box(8712, 8712), - Box(8713, 8713), - Box(8714, 8714), - Box(8715, 8715), - Box(8716, 8716), - Box(8717, 8717), - Box(8718, 8718), - Box(8719, 8719), - Box(8720, 8720), - Box(8721, 8721), - Box(8722, 8722), - Box(8723, 8723), - Box(8724, 8724), - Box(8725, 8725), - Box(8726, 8726), - Box(8727, 8727), - Box(8728, 8728), - Box(8729, 8729), - Box(8730, 8730), - Box(8731, 8731), - Box(8732, 8732), - Box(8733, 8733), - Box(8734, 8734), - Box(8735, 8735), - Box(8736, 8736), - Box(8737, 8737), - Box(8738, 8738), - Box(8739, 8739), - Box(8740, 8740), - Box(8741, 8741), - Box(8742, 8742), - Box(8743, 8743), - Box(8744, 8744), - Box(8745, 8745), - Box(8746, 8746), - Box(8747, 8747), - Box(8748, 8748), - Box(8749, 8749), - Box(8750, 8750), - Box(8751, 8751), - Box(8752, 8752), - Box(8753, 8753), - Box(8754, 8754), - Box(8755, 8755), - Box(8756, 8756), - Box(8757, 8757), - Box(8758, 8758), - Box(8759, 8759), - Box(8760, 8760), - Box(8761, 8761), - Box(8762, 8762), - Box(8763, 8763), - Box(8764, 8764), - Box(8765, 8765), - Box(8766, 8766), - Box(8767, 8767), - Box(8768, 8768), - Box(8769, 8769), - Box(8770, 8770), - Box(8771, 8771), - Box(8772, 8772), - Box(8773, 8773), - Box(8774, 8774), - Box(8775, 8775), - Box(8776, 8776), - Box(8777, 8777), - Box(8778, 8778), - Box(8779, 8779), - Box(8780, 8780), - Box(8781, 8781), - Box(8782, 8782), - Box(8783, 8783), - Box(8784, 8784), - Box(8785, 8785), - Box(8786, 8786), - Box(8787, 8787), - Box(8788, 8788), - Box(8789, 8789), - Box(8790, 8790), - Box(8791, 8791), - Box(8792, 8792), - Box(8793, 8793), - Box(8794, 8794), - Box(8795, 8795), - Box(8796, 8796), - Box(8797, 8797), - Box(8798, 8798), - Box(8799, 8799), - Box(8800, 8800), - Box(8801, 8801), - Box(8802, 8802), - Box(8803, 8803), - Box(8804, 8804), - Box(8805, 8805), - Box(8806, 8806), - Box(8807, 8807), - Box(8808, 8808), - Box(8809, 8809), - Box(8810, 8810), - Box(8811, 8811), - Box(8812, 8812), - Box(8813, 8813), - Box(8814, 8814), - Box(8815, 8815), - Box(8816, 8816), - Box(8817, 8817), - Box(8818, 8818), - Box(8819, 8819), - Box(8820, 8820), - Box(8821, 8821), - Box(8822, 8822), - Box(8823, 8823), - Box(8824, 8824), - Box(8825, 8825), - Box(8826, 8826), - Box(8827, 8827), - Box(8828, 8828), - Box(8829, 8829), - Box(8830, 8830), - Box(8831, 8831), - Box(8832, 8832), - Box(8833, 8833), - Box(8834, 8834), - Box(8835, 8835), - Box(8836, 8836), - Box(8837, 8837), - Box(8838, 8838), - Box(8839, 8839), - Box(8840, 8840), - Box(8841, 8841), - Box(8842, 8842), - Box(8843, 8843), - Box(8844, 8844), - Box(8845, 8845), - Box(8846, 8846), - Box(8847, 8847), - Box(8848, 8848), - Box(8849, 8849), - Box(8850, 8850), - Box(8851, 8851), - Box(8852, 8852), - Box(8853, 8853), - Box(8854, 8854), - Box(8855, 8855), - Box(8856, 8856), - Box(8857, 8857), - Box(8858, 8858), - Box(8859, 8859), - Box(8860, 8860), - Box(8861, 8861), - Box(8862, 8862), - Box(8863, 8863), - Box(8864, 8864), - Box(8865, 8865), - Box(8866, 8866), - Box(8867, 8867), - Box(8868, 8868), - Box(8869, 8869), - Box(8870, 8870), - Box(8871, 8871), - Box(8872, 8872), - Box(8873, 8873), - Box(8874, 8874), - Box(8875, 8875), - Box(8876, 8876), - Box(8877, 8877), - Box(8878, 8878), - Box(8879, 8879), - Box(8880, 8880), - Box(8881, 8881), - Box(8882, 8882), - Box(8883, 8883), - Box(8884, 8884), - Box(8885, 8885), - Box(8886, 8886), - Box(8887, 8887), - Box(8888, 8888), - Box(8889, 8889), - Box(8890, 8890), - Box(8891, 8891), - Box(8892, 8892), - Box(8893, 8893), - Box(8894, 8894), - Box(8895, 8895), - Box(8896, 8896), - Box(8897, 8897), - Box(8898, 8898), - Box(8899, 8899), - Box(8900, 8900), - Box(8901, 8901), - Box(8902, 8902), - Box(8903, 8903), - Box(8904, 8904), - Box(8905, 8905), - Box(8906, 8906), - Box(8907, 8907), - Box(8908, 8908), - Box(8909, 8909), - Box(8910, 8910), - Box(8911, 8911), - Box(8912, 8912), - Box(8913, 8913), - Box(8914, 8914), - Box(8915, 8915), - Box(8916, 8916), - Box(8917, 8917), - Box(8918, 8918), - Box(8919, 8919), - Box(8920, 8920), - Box(8921, 8921), - Box(8922, 8922), - Box(8923, 8923), - Box(8924, 8924), - Box(8925, 8925), - Box(8926, 8926), - Box(8927, 8927), - Box(8928, 8928), - Box(8929, 8929), - Box(8930, 8930), - Box(8931, 8931), - Box(8932, 8932), - Box(8933, 8933), - Box(8934, 8934), - Box(8935, 8935), - Box(8936, 8936), - Box(8937, 8937), - Box(8938, 8938), - Box(8939, 8939), - Box(8940, 8940), - Box(8941, 8941), - Box(8942, 8942), - Box(8943, 8943), - Box(8944, 8944), - Box(8945, 8945), - Box(8946, 8946), - Box(8947, 8947), - Box(8948, 8948), - Box(8949, 8949), - Box(8950, 8950), - Box(8951, 8951), - Box(8952, 8952), - Box(8953, 8953), - Box(8954, 8954), - Box(8955, 8955), - Box(8956, 8956), - Box(8957, 8957), - Box(8958, 8958), - Box(8959, 8959), - Box(8960, 8960), - Box(8961, 8961), - Box(8962, 8962), - Box(8963, 8963), - Box(8964, 8964), - Box(8965, 8965), - Box(8966, 8966), - Box(8967, 8967), - Box(8968, 8968), - Box(8969, 8969), - Box(8970, 8970), - Box(8971, 8971), - Box(8972, 8972), - Box(8973, 8973), - Box(8974, 8974), - Box(8975, 8975), - Box(8976, 8976), - Box(8977, 8977), - Box(8978, 8978), - Box(8979, 8979), - Box(8980, 8980), - Box(8981, 8981), - Box(8982, 8982), - Box(8983, 8983), - Box(8984, 8984), - Box(8985, 8985), - Box(8986, 8986), - Box(8987, 8987), - Box(8988, 8988), - Box(8989, 8989), - Box(8990, 8990), - Box(8991, 8991), - Box(8992, 8992), - Box(8993, 8993), - Box(8994, 8994), - Box(8995, 8995), - Box(8996, 8996), - Box(8997, 8997), - Box(8998, 8998), - Box(8999, 8999), - Box(9000, 9000), - Box(9001, 9001), - Box(9002, 9002), - Box(9003, 9003), - Box(9004, 9004), - Box(9005, 9005), - Box(9006, 9006), - Box(9007, 9007), - Box(9008, 9008), - Box(9009, 9009), - Box(9010, 9010), - Box(9011, 9011), - Box(9012, 9012), - Box(9013, 9013), - Box(9014, 9014), - Box(9015, 9015), - Box(9016, 9016), - Box(9017, 9017), - Box(9018, 9018), - Box(9019, 9019), - Box(9020, 9020), - Box(9021, 9021), - Box(9022, 9022), - Box(9023, 9023), - Box(9024, 9024), - Box(9025, 9025), - Box(9026, 9026), - Box(9027, 9027), - Box(9028, 9028), - Box(9029, 9029), - Box(9030, 9030), - Box(9031, 9031), - Box(9032, 9032), - Box(9033, 9033), - Box(9034, 9034), - Box(9035, 9035), - Box(9036, 9036), - Box(9037, 9037), - Box(9038, 9038), - Box(9039, 9039), - Box(9040, 9040), - Box(9041, 9041), - Box(9042, 9042), - Box(9043, 9043), - Box(9044, 9044), - Box(9045, 9045), - Box(9046, 9046), - Box(9047, 9047), - Box(9048, 9048), - Box(9049, 9049), - Box(9050, 9050), - Box(9051, 9051), - Box(9052, 9052), - Box(9053, 9053), - Box(9054, 9054), - Box(9055, 9055), - Box(9056, 9056), - Box(9057, 9057), - Box(9058, 9058), - Box(9059, 9059), - Box(9060, 9060), - Box(9061, 9061), - Box(9062, 9062), - Box(9063, 9063), - Box(9064, 9064), - Box(9065, 9065), - Box(9066, 9066), - Box(9067, 9067), - Box(9068, 9068), - Box(9069, 9069), - Box(9070, 9070), - Box(9071, 9071), - Box(9072, 9072), - Box(9073, 9073), - Box(9074, 9074), - Box(9075, 9075), - Box(9076, 9076), - Box(9077, 9077), - Box(9078, 9078), - Box(9079, 9079), - Box(9080, 9080), - Box(9081, 9081), - Box(9082, 9082), - Box(9083, 9083), - Box(9084, 9084), - Box(9085, 9085), - Box(9086, 9086), - Box(9087, 9087), - Box(9088, 9088), - Box(9089, 9089), - Box(9090, 9090), - Box(9091, 9091), - Box(9092, 9092), - Box(9093, 9093), - Box(9094, 9094), - Box(9095, 9095), - Box(9096, 9096), - Box(9097, 9097), - Box(9098, 9098), - Box(9099, 9099), - Box(9100, 9100), - Box(9101, 9101), - Box(9102, 9102), - Box(9103, 9103), - Box(9104, 9104), - Box(9105, 9105), - Box(9106, 9106), - Box(9107, 9107), - Box(9108, 9108), - Box(9109, 9109), - Box(9110, 9110), - Box(9111, 9111), - Box(9112, 9112), - Box(9113, 9113), - Box(9114, 9114), - Box(9115, 9115), - Box(9116, 9116), - Box(9117, 9117), - Box(9118, 9118), - Box(9119, 9119), - Box(9120, 9120), - Box(9121, 9121), - Box(9122, 9122), - Box(9123, 9123), - Box(9124, 9124), - Box(9125, 9125), - Box(9126, 9126), - Box(9127, 9127), - Box(9128, 9128), - Box(9129, 9129), - Box(9130, 9130), - Box(9131, 9131), - Box(9132, 9132), - Box(9133, 9133), - Box(9134, 9134), - Box(9135, 9135), - Box(9136, 9136), - Box(9137, 9137), - Box(9138, 9138), - Box(9139, 9139), - Box(9140, 9140), - Box(9141, 9141), - Box(9142, 9142), - Box(9143, 9143), - Box(9144, 9144), - Box(9145, 9145), - Box(9146, 9146), - Box(9147, 9147), - Box(9148, 9148), - Box(9149, 9149), - Box(9150, 9150), - Box(9151, 9151), - Box(9152, 9152), - Box(9153, 9153), - Box(9154, 9154), - Box(9155, 9155), - Box(9156, 9156), - Box(9157, 9157), - Box(9158, 9158), - Box(9159, 9159), - Box(9160, 9160), - Box(9161, 9161), - Box(9162, 9162), - Box(9163, 9163), - Box(9164, 9164), - Box(9165, 9165), - Box(9166, 9166), - Box(9167, 9167), - Box(9168, 9168), - Box(9169, 9169), - Box(9170, 9170), - Box(9171, 9171), - Box(9172, 9172), - Box(9173, 9173), - Box(9174, 9174), - Box(9175, 9175), - Box(9176, 9176), - Box(9177, 9177), - Box(9178, 9178), - Box(9179, 9179), - Box(9180, 9180), - Box(9181, 9181), - Box(9182, 9182), - Box(9183, 9183), - Box(9184, 9184), - Box(9185, 9185), - Box(9186, 9186), - Box(9187, 9187), - Box(9188, 9188), - Box(9189, 9189), - Box(9190, 9190), - Box(9191, 9191), - Box(9192, 9192), - Box(9193, 9193), - Box(9194, 9194), - Box(9195, 9195), - Box(9196, 9196), - Box(9197, 9197), - Box(9198, 9198), - Box(9199, 9199), - Box(9200, 9200), - Box(9201, 9201), - Box(9202, 9202), - Box(9203, 9203), - Box(9204, 9204), - Box(9205, 9205), - Box(9206, 9206), - Box(9207, 9207), - Box(9208, 9208), - Box(9209, 9209), - Box(9210, 9210), - Box(9211, 9211), - Box(9212, 9212), - Box(9213, 9213), - Box(9214, 9214), - Box(9215, 9215), - Box(9216, 9216), - Box(9217, 9217), - Box(9218, 9218), - Box(9219, 9219), - Box(9220, 9220), - Box(9221, 9221), - Box(9222, 9222), - Box(9223, 9223), - Box(9224, 9224), - Box(9225, 9225), - Box(9226, 9226), - Box(9227, 9227), - Box(9228, 9228), - Box(9229, 9229), - Box(9230, 9230), - Box(9231, 9231), - Box(9232, 9232), - Box(9233, 9233), - Box(9234, 9234), - Box(9235, 9235), - Box(9236, 9236), - Box(9237, 9237), - Box(9238, 9238), - Box(9239, 9239), - Box(9240, 9240), - Box(9241, 9241), - Box(9242, 9242), - Box(9243, 9243), - Box(9244, 9244), - Box(9245, 9245), - Box(9246, 9246), - Box(9247, 9247), - Box(9248, 9248), - Box(9249, 9249), - Box(9250, 9250), - Box(9251, 9251), - Box(9252, 9252), - Box(9253, 9253), - Box(9254, 9254), - Box(9255, 9255), - Box(9256, 9256), - Box(9257, 9257), - Box(9258, 9258), - Box(9259, 9259), - Box(9260, 9260), - Box(9261, 9261), - Box(9262, 9262), - Box(9263, 9263), - Box(9264, 9264), - Box(9265, 9265), - Box(9266, 9266), - Box(9267, 9267), - Box(9268, 9268), - Box(9269, 9269), - Box(9270, 9270), - Box(9271, 9271), - Box(9272, 9272), - Box(9273, 9273), - Box(9274, 9274), - Box(9275, 9275), - Box(9276, 9276), - Box(9277, 9277), - Box(9278, 9278), - Box(9279, 9279), - Box(9280, 9280), - Box(9281, 9281), - Box(9282, 9282), - Box(9283, 9283), - Box(9284, 9284), - Box(9285, 9285), - Box(9286, 9286), - Box(9287, 9287), - Box(9288, 9288), - Box(9289, 9289), - Box(9290, 9290), - Box(9291, 9291), - Box(9292, 9292), - Box(9293, 9293), - Box(9294, 9294), - Box(9295, 9295), - Box(9296, 9296), - Box(9297, 9297), - Box(9298, 9298), - Box(9299, 9299), - Box(9300, 9300), - Box(9301, 9301), - Box(9302, 9302), - Box(9303, 9303), - Box(9304, 9304), - Box(9305, 9305), - Box(9306, 9306), - Box(9307, 9307), - Box(9308, 9308), - Box(9309, 9309), - Box(9310, 9310), - Box(9311, 9311), - Box(9312, 9312), - Box(9313, 9313), - Box(9314, 9314), - Box(9315, 9315), - Box(9316, 9316), - Box(9317, 9317), - Box(9318, 9318), - Box(9319, 9319), - Box(9320, 9320), - Box(9321, 9321), - Box(9322, 9322), - Box(9323, 9323), - Box(9324, 9324), - Box(9325, 9325), - Box(9326, 9326), - Box(9327, 9327), - Box(9328, 9328), - Box(9329, 9329), - Box(9330, 9330), - Box(9331, 9331), - Box(9332, 9332), - Box(9333, 9333), - Box(9334, 9334), - Box(9335, 9335), - Box(9336, 9336), - Box(9337, 9337), - Box(9338, 9338), - Box(9339, 9339), - Box(9340, 9340), - Box(9341, 9341), - Box(9342, 9342), - Box(9343, 9343), - Box(9344, 9344), - Box(9345, 9345), - Box(9346, 9346), - Box(9347, 9347), - Box(9348, 9348), - Box(9349, 9349), - Box(9350, 9350), - Box(9351, 9351), - Box(9352, 9352), - Box(9353, 9353), - Box(9354, 9354), - Box(9355, 9355), - Box(9356, 9356), - Box(9357, 9357), - Box(9358, 9358), - Box(9359, 9359), - Box(9360, 9360), - Box(9361, 9361), - Box(9362, 9362), - Box(9363, 9363), - Box(9364, 9364), - Box(9365, 9365), - Box(9366, 9366), - Box(9367, 9367), - Box(9368, 9368), - Box(9369, 9369), - Box(9370, 9370), - Box(9371, 9371), - Box(9372, 9372), - Box(9373, 9373), - Box(9374, 9374), - Box(9375, 9375), - Box(9376, 9376), - Box(9377, 9377), - Box(9378, 9378), - Box(9379, 9379), - Box(9380, 9380), - Box(9381, 9381), - Box(9382, 9382), - Box(9383, 9383), - Box(9384, 9384), - Box(9385, 9385), - Box(9386, 9386), - Box(9387, 9387), - Box(9388, 9388), - Box(9389, 9389), - Box(9390, 9390), - Box(9391, 9391), - Box(9392, 9392), - Box(9393, 9393), - Box(9394, 9394), - Box(9395, 9395), - Box(9396, 9396), - Box(9397, 9397), - Box(9398, 9398), - Box(9399, 9399), - Box(9400, 9400), - Box(9401, 9401), - Box(9402, 9402), - Box(9403, 9403), - Box(9404, 9404), - Box(9405, 9405), - Box(9406, 9406), - Box(9407, 9407), - Box(9408, 9408), - Box(9409, 9409), - Box(9410, 9410), - Box(9411, 9411), - Box(9412, 9412), - Box(9413, 9413), - Box(9414, 9414), - Box(9415, 9415), - Box(9416, 9416), - Box(9417, 9417), - Box(9418, 9418), - Box(9419, 9419), - Box(9420, 9420), - Box(9421, 9421), - Box(9422, 9422), - Box(9423, 9423), - Box(9424, 9424), - Box(9425, 9425), - Box(9426, 9426), - Box(9427, 9427), - Box(9428, 9428), - Box(9429, 9429), - Box(9430, 9430), - Box(9431, 9431), - Box(9432, 9432), - Box(9433, 9433), - Box(9434, 9434), - Box(9435, 9435), - Box(9436, 9436), - Box(9437, 9437), - Box(9438, 9438), - Box(9439, 9439), - Box(9440, 9440), - Box(9441, 9441), - Box(9442, 9442), - Box(9443, 9443), - Box(9444, 9444), - Box(9445, 9445), - Box(9446, 9446), - Box(9447, 9447), - Box(9448, 9448), - Box(9449, 9449), - Box(9450, 9450), - Box(9451, 9451), - Box(9452, 9452), - Box(9453, 9453), - Box(9454, 9454), - Box(9455, 9455), - Box(9456, 9456), - Box(9457, 9457), - Box(9458, 9458), - Box(9459, 9459), - Box(9460, 9460), - Box(9461, 9461), - Box(9462, 9462), - Box(9463, 9463), - Box(9464, 9464), - Box(9465, 9465), - Box(9466, 9466), - Box(9467, 9467), - Box(9468, 9468), - Box(9469, 9469), - Box(9470, 9470), - Box(9471, 9471), - Box(9472, 9472), - Box(9473, 9473), - Box(9474, 9474), - Box(9475, 9475), - Box(9476, 9476), - Box(9477, 9477), - Box(9478, 9478), - Box(9479, 9479), - Box(9480, 9480), - Box(9481, 9481), - Box(9482, 9482), - Box(9483, 9483), - Box(9484, 9484), - Box(9485, 9485), - Box(9486, 9486), - Box(9487, 9487), - Box(9488, 9488), - Box(9489, 9489), - Box(9490, 9490), - Box(9491, 9491), - Box(9492, 9492), - Box(9493, 9493), - Box(9494, 9494), - Box(9495, 9495), - Box(9496, 9496), - Box(9497, 9497), - Box(9498, 9498), - Box(9499, 9499), - Box(9500, 9500), - Box(9501, 9501), - Box(9502, 9502), - Box(9503, 9503), - Box(9504, 9504), - Box(9505, 9505), - Box(9506, 9506), - Box(9507, 9507), - Box(9508, 9508), - Box(9509, 9509), - Box(9510, 9510), - Box(9511, 9511), - Box(9512, 9512), - Box(9513, 9513), - Box(9514, 9514), - Box(9515, 9515), - Box(9516, 9516), - Box(9517, 9517), - Box(9518, 9518), - Box(9519, 9519), - Box(9520, 9520), - Box(9521, 9521), - Box(9522, 9522), - Box(9523, 9523), - Box(9524, 9524), - Box(9525, 9525), - Box(9526, 9526), - Box(9527, 9527), - Box(9528, 9528), - Box(9529, 9529), - Box(9530, 9530), - Box(9531, 9531), - Box(9532, 9532), - Box(9533, 9533), - Box(9534, 9534), - Box(9535, 9535), - Box(9536, 9536), - Box(9537, 9537), - Box(9538, 9538), - Box(9539, 9539), - Box(9540, 9540), - Box(9541, 9541), - Box(9542, 9542), - Box(9543, 9543), - Box(9544, 9544), - Box(9545, 9545), - Box(9546, 9546), - Box(9547, 9547), - Box(9548, 9548), - Box(9549, 9549), - Box(9550, 9550), - Box(9551, 9551), - Box(9552, 9552), - Box(9553, 9553), - Box(9554, 9554), - Box(9555, 9555), - Box(9556, 9556), - Box(9557, 9557), - Box(9558, 9558), - Box(9559, 9559), - Box(9560, 9560), - Box(9561, 9561), - Box(9562, 9562), - Box(9563, 9563), - Box(9564, 9564), - Box(9565, 9565), - Box(9566, 9566), - Box(9567, 9567), - Box(9568, 9568), - Box(9569, 9569), - Box(9570, 9570), - Box(9571, 9571), - Box(9572, 9572), - Box(9573, 9573), - Box(9574, 9574), - Box(9575, 9575), - Box(9576, 9576), - Box(9577, 9577), - Box(9578, 9578), - Box(9579, 9579), - Box(9580, 9580), - Box(9581, 9581), - Box(9582, 9582), - Box(9583, 9583), - Box(9584, 9584), - Box(9585, 9585), - Box(9586, 9586), - Box(9587, 9587), - Box(9588, 9588), - Box(9589, 9589), - Box(9590, 9590), - Box(9591, 9591), - Box(9592, 9592), - Box(9593, 9593), - Box(9594, 9594), - Box(9595, 9595), - Box(9596, 9596), - Box(9597, 9597), - Box(9598, 9598), - Box(9599, 9599), - Box(9600, 9600), - Box(9601, 9601), - Box(9602, 9602), - Box(9603, 9603), - Box(9604, 9604), - Box(9605, 9605), - Box(9606, 9606), - Box(9607, 9607), - Box(9608, 9608), - Box(9609, 9609), - Box(9610, 9610), - Box(9611, 9611), - Box(9612, 9612), - Box(9613, 9613), - Box(9614, 9614), - Box(9615, 9615), - Box(9616, 9616), - Box(9617, 9617), - Box(9618, 9618), - Box(9619, 9619), - Box(9620, 9620), - Box(9621, 9621), - Box(9622, 9622), - Box(9623, 9623), - Box(9624, 9624), - Box(9625, 9625), - Box(9626, 9626), - Box(9627, 9627), - Box(9628, 9628), - Box(9629, 9629), - Box(9630, 9630), - Box(9631, 9631), - Box(9632, 9632), - Box(9633, 9633), - Box(9634, 9634), - Box(9635, 9635), - Box(9636, 9636), - Box(9637, 9637), - Box(9638, 9638), - Box(9639, 9639), - Box(9640, 9640), - Box(9641, 9641), - Box(9642, 9642), - Box(9643, 9643), - Box(9644, 9644), - Box(9645, 9645), - Box(9646, 9646), - Box(9647, 9647), - Box(9648, 9648), - Box(9649, 9649), - Box(9650, 9650), - Box(9651, 9651), - Box(9652, 9652), - Box(9653, 9653), - Box(9654, 9654), - Box(9655, 9655), - Box(9656, 9656), - Box(9657, 9657), - Box(9658, 9658), - Box(9659, 9659), - Box(9660, 9660), - Box(9661, 9661), - Box(9662, 9662), - Box(9663, 9663), - Box(9664, 9664), - Box(9665, 9665), - Box(9666, 9666), - Box(9667, 9667), - Box(9668, 9668), - Box(9669, 9669), - Box(9670, 9670), - Box(9671, 9671), - Box(9672, 9672), - Box(9673, 9673), - Box(9674, 9674), - Box(9675, 9675), - Box(9676, 9676), - Box(9677, 9677), - Box(9678, 9678), - Box(9679, 9679), - Box(9680, 9680), - Box(9681, 9681), - Box(9682, 9682), - Box(9683, 9683), - Box(9684, 9684), - Box(9685, 9685), - Box(9686, 9686), - Box(9687, 9687), - Box(9688, 9688), - Box(9689, 9689), - Box(9690, 9690), - Box(9691, 9691), - Box(9692, 9692), - Box(9693, 9693), - Box(9694, 9694), - Box(9695, 9695), - Box(9696, 9696), - Box(9697, 9697), - Box(9698, 9698), - Box(9699, 9699), - Box(9700, 9700), - Box(9701, 9701), - Box(9702, 9702), - Box(9703, 9703), - Box(9704, 9704), - Box(9705, 9705), - Box(9706, 9706), - Box(9707, 9707), - Box(9708, 9708), - Box(9709, 9709), - Box(9710, 9710), - Box(9711, 9711), - Box(9712, 9712), - Box(9713, 9713), - Box(9714, 9714), - Box(9715, 9715), - Box(9716, 9716), - Box(9717, 9717), - Box(9718, 9718), - Box(9719, 9719), - Box(9720, 9720), - Box(9721, 9721), - Box(9722, 9722), - Box(9723, 9723), - Box(9724, 9724), - Box(9725, 9725), - Box(9726, 9726), - Box(9727, 9727), - Box(9728, 9728), - Box(9729, 9729), - Box(9730, 9730), - Box(9731, 9731), - Box(9732, 9732), - Box(9733, 9733), - Box(9734, 9734), - Box(9735, 9735), - Box(9736, 9736), - Box(9737, 9737), - Box(9738, 9738), - Box(9739, 9739), - Box(9740, 9740), - Box(9741, 9741), - Box(9742, 9742), - Box(9743, 9743), - Box(9744, 9744), - Box(9745, 9745), - Box(9746, 9746), - Box(9747, 9747), - Box(9748, 9748), - Box(9749, 9749), - Box(9750, 9750), - Box(9751, 9751), - Box(9752, 9752), - Box(9753, 9753), - Box(9754, 9754), - Box(9755, 9755), - Box(9756, 9756), - Box(9757, 9757), - Box(9758, 9758), - Box(9759, 9759), - Box(9760, 9760), - Box(9761, 9761), - Box(9762, 9762), - Box(9763, 9763), - Box(9764, 9764), - Box(9765, 9765), - Box(9766, 9766), - Box(9767, 9767), - Box(9768, 9768), - Box(9769, 9769), - Box(9770, 9770), - Box(9771, 9771), - Box(9772, 9772), - Box(9773, 9773), - Box(9774, 9774), - Box(9775, 9775), - Box(9776, 9776), - Box(9777, 9777), - Box(9778, 9778), - Box(9779, 9779), - Box(9780, 9780), - Box(9781, 9781), - Box(9782, 9782), - Box(9783, 9783), - Box(9784, 9784), - Box(9785, 9785), - Box(9786, 9786), - Box(9787, 9787), - Box(9788, 9788), - Box(9789, 9789), - Box(9790, 9790), - Box(9791, 9791), - Box(9792, 9792), - Box(9793, 9793), - Box(9794, 9794), - Box(9795, 9795), - Box(9796, 9796), - Box(9797, 9797), - Box(9798, 9798), - Box(9799, 9799), - Box(9800, 9800), - Box(9801, 9801), - Box(9802, 9802), - Box(9803, 9803), - Box(9804, 9804), - Box(9805, 9805), - Box(9806, 9806), - Box(9807, 9807), - Box(9808, 9808), - Box(9809, 9809), - Box(9810, 9810), - Box(9811, 9811), - Box(9812, 9812), - Box(9813, 9813), - Box(9814, 9814), - Box(9815, 9815), - Box(9816, 9816), - Box(9817, 9817), - Box(9818, 9818), - Box(9819, 9819), - Box(9820, 9820), - Box(9821, 9821), - Box(9822, 9822), - Box(9823, 9823), - Box(9824, 9824), - Box(9825, 9825), - Box(9826, 9826), - Box(9827, 9827), - Box(9828, 9828), - Box(9829, 9829), - Box(9830, 9830), - Box(9831, 9831), - Box(9832, 9832), - Box(9833, 9833), - Box(9834, 9834), - Box(9835, 9835), - Box(9836, 9836), - Box(9837, 9837), - Box(9838, 9838), - Box(9839, 9839), - Box(9840, 9840), - Box(9841, 9841), - Box(9842, 9842), - Box(9843, 9843), - Box(9844, 9844), - Box(9845, 9845), - Box(9846, 9846), - Box(9847, 9847), - Box(9848, 9848), - Box(9849, 9849), - Box(9850, 9850), - Box(9851, 9851), - Box(9852, 9852), - Box(9853, 9853), - Box(9854, 9854), - Box(9855, 9855), - Box(9856, 9856), - Box(9857, 9857), - Box(9858, 9858), - Box(9859, 9859), - Box(9860, 9860), - Box(9861, 9861), - Box(9862, 9862), - Box(9863, 9863), - Box(9864, 9864), - Box(9865, 9865), - Box(9866, 9866), - Box(9867, 9867), - Box(9868, 9868), - Box(9869, 9869), - Box(9870, 9870), - Box(9871, 9871), - Box(9872, 9872), - Box(9873, 9873), - Box(9874, 9874), - Box(9875, 9875), - Box(9876, 9876), - Box(9877, 9877), - Box(9878, 9878), - Box(9879, 9879), - Box(9880, 9880), - Box(9881, 9881), - Box(9882, 9882), - Box(9883, 9883), - Box(9884, 9884), - Box(9885, 9885), - Box(9886, 9886), - Box(9887, 9887), - Box(9888, 9888), - Box(9889, 9889), - Box(9890, 9890), - Box(9891, 9891), - Box(9892, 9892), - Box(9893, 9893), - Box(9894, 9894), - Box(9895, 9895), - Box(9896, 9896), - Box(9897, 9897), - Box(9898, 9898), - Box(9899, 9899), - Box(9900, 9900), - Box(9901, 9901), - Box(9902, 9902), - Box(9903, 9903), - Box(9904, 9904), - Box(9905, 9905), - Box(9906, 9906), - Box(9907, 9907), - Box(9908, 9908), - Box(9909, 9909), - Box(9910, 9910), - Box(9911, 9911), - Box(9912, 9912), - Box(9913, 9913), - Box(9914, 9914), - Box(9915, 9915), - Box(9916, 9916), - Box(9917, 9917), - Box(9918, 9918), - Box(9919, 9919), - Box(9920, 9920), - Box(9921, 9921), - Box(9922, 9922), - Box(9923, 9923), - Box(9924, 9924), - Box(9925, 9925), - Box(9926, 9926), - Box(9927, 9927), - Box(9928, 9928), - Box(9929, 9929), - Box(9930, 9930), - Box(9931, 9931), - Box(9932, 9932), - Box(9933, 9933), - Box(9934, 9934), - Box(9935, 9935), - Box(9936, 9936), - Box(9937, 9937), - Box(9938, 9938), - Box(9939, 9939), - Box(9940, 9940), - Box(9941, 9941), - Box(9942, 9942), - Box(9943, 9943), - Box(9944, 9944), - Box(9945, 9945), - Box(9946, 9946), - Box(9947, 9947), - Box(9948, 9948), - Box(9949, 9949), - Box(9950, 9950), - Box(9951, 9951), - Box(9952, 9952), - Box(9953, 9953), - Box(9954, 9954), - Box(9955, 9955), - Box(9956, 9956), - Box(9957, 9957), - Box(9958, 9958), - Box(9959, 9959), - Box(9960, 9960), - Box(9961, 9961), - Box(9962, 9962), - Box(9963, 9963), - Box(9964, 9964), - Box(9965, 9965), - Box(9966, 9966), - Box(9967, 9967), - Box(9968, 9968), - Box(9969, 9969), - Box(9970, 9970), - Box(9971, 9971), - Box(9972, 9972), - Box(9973, 9973), - Box(9974, 9974), - Box(9975, 9975), - Box(9976, 9976), - Box(9977, 9977), - Box(9978, 9978), - Box(9979, 9979), - Box(9980, 9980), - Box(9981, 9981), - Box(9982, 9982), - Box(9983, 9983), - Box(9984, 9984), - Box(9985, 9985), - Box(9986, 9986), - Box(9987, 9987), - Box(9988, 9988), - Box(9989, 9989), - Box(9990, 9990), - Box(9991, 9991), - Box(9992, 9992), - Box(9993, 9993), - Box(9994, 9994), - Box(9995, 9995), - Box(9996, 9996), - Box(9997, 9997), - Box(9998, 9998), - Box(9999, 9999), -]; - -// 10,000 elements. -const list2 = [ - Box(0, 0), - Box(1, 1), - Box(2, 2), - Box(3, 3), - Box(4, 4), - Box(5, 5), - Box(6, 6), - Box(7, 7), - Box(8, 8), - Box(9, 9), - Box(10, 10), - Box(11, 11), - Box(12, 12), - Box(13, 13), - Box(14, 14), - Box(15, 15), - Box(16, 16), - Box(17, 17), - Box(18, 18), - Box(19, 19), - Box(20, 20), - Box(21, 21), - Box(22, 22), - Box(23, 23), - Box(24, 24), - Box(25, 25), - Box(26, 26), - Box(27, 27), - Box(28, 28), - Box(29, 29), - Box(30, 30), - Box(31, 31), - Box(32, 32), - Box(33, 33), - Box(34, 34), - Box(35, 35), - Box(36, 36), - Box(37, 37), - Box(38, 38), - Box(39, 39), - Box(40, 40), - Box(41, 41), - Box(42, 42), - Box(43, 43), - Box(44, 44), - Box(45, 45), - Box(46, 46), - Box(47, 47), - Box(48, 48), - Box(49, 49), - Box(50, 50), - Box(51, 51), - Box(52, 52), - Box(53, 53), - Box(54, 54), - Box(55, 55), - Box(56, 56), - Box(57, 57), - Box(58, 58), - Box(59, 59), - Box(60, 60), - Box(61, 61), - Box(62, 62), - Box(63, 63), - Box(64, 64), - Box(65, 65), - Box(66, 66), - Box(67, 67), - Box(68, 68), - Box(69, 69), - Box(70, 70), - Box(71, 71), - Box(72, 72), - Box(73, 73), - Box(74, 74), - Box(75, 75), - Box(76, 76), - Box(77, 77), - Box(78, 78), - Box(79, 79), - Box(80, 80), - Box(81, 81), - Box(82, 82), - Box(83, 83), - Box(84, 84), - Box(85, 85), - Box(86, 86), - Box(87, 87), - Box(88, 88), - Box(89, 89), - Box(90, 90), - Box(91, 91), - Box(92, 92), - Box(93, 93), - Box(94, 94), - Box(95, 95), - Box(96, 96), - Box(97, 97), - Box(98, 98), - Box(99, 99), - Box(100, 100), - Box(101, 101), - Box(102, 102), - Box(103, 103), - Box(104, 104), - Box(105, 105), - Box(106, 106), - Box(107, 107), - Box(108, 108), - Box(109, 109), - Box(110, 110), - Box(111, 111), - Box(112, 112), - Box(113, 113), - Box(114, 114), - Box(115, 115), - Box(116, 116), - Box(117, 117), - Box(118, 118), - Box(119, 119), - Box(120, 120), - Box(121, 121), - Box(122, 122), - Box(123, 123), - Box(124, 124), - Box(125, 125), - Box(126, 126), - Box(127, 127), - Box(128, 128), - Box(129, 129), - Box(130, 130), - Box(131, 131), - Box(132, 132), - Box(133, 133), - Box(134, 134), - Box(135, 135), - Box(136, 136), - Box(137, 137), - Box(138, 138), - Box(139, 139), - Box(140, 140), - Box(141, 141), - Box(142, 142), - Box(143, 143), - Box(144, 144), - Box(145, 145), - Box(146, 146), - Box(147, 147), - Box(148, 148), - Box(149, 149), - Box(150, 150), - Box(151, 151), - Box(152, 152), - Box(153, 153), - Box(154, 154), - Box(155, 155), - Box(156, 156), - Box(157, 157), - Box(158, 158), - Box(159, 159), - Box(160, 160), - Box(161, 161), - Box(162, 162), - Box(163, 163), - Box(164, 164), - Box(165, 165), - Box(166, 166), - Box(167, 167), - Box(168, 168), - Box(169, 169), - Box(170, 170), - Box(171, 171), - Box(172, 172), - Box(173, 173), - Box(174, 174), - Box(175, 175), - Box(176, 176), - Box(177, 177), - Box(178, 178), - Box(179, 179), - Box(180, 180), - Box(181, 181), - Box(182, 182), - Box(183, 183), - Box(184, 184), - Box(185, 185), - Box(186, 186), - Box(187, 187), - Box(188, 188), - Box(189, 189), - Box(190, 190), - Box(191, 191), - Box(192, 192), - Box(193, 193), - Box(194, 194), - Box(195, 195), - Box(196, 196), - Box(197, 197), - Box(198, 198), - Box(199, 199), - Box(200, 200), - Box(201, 201), - Box(202, 202), - Box(203, 203), - Box(204, 204), - Box(205, 205), - Box(206, 206), - Box(207, 207), - Box(208, 208), - Box(209, 209), - Box(210, 210), - Box(211, 211), - Box(212, 212), - Box(213, 213), - Box(214, 214), - Box(215, 215), - Box(216, 216), - Box(217, 217), - Box(218, 218), - Box(219, 219), - Box(220, 220), - Box(221, 221), - Box(222, 222), - Box(223, 223), - Box(224, 224), - Box(225, 225), - Box(226, 226), - Box(227, 227), - Box(228, 228), - Box(229, 229), - Box(230, 230), - Box(231, 231), - Box(232, 232), - Box(233, 233), - Box(234, 234), - Box(235, 235), - Box(236, 236), - Box(237, 237), - Box(238, 238), - Box(239, 239), - Box(240, 240), - Box(241, 241), - Box(242, 242), - Box(243, 243), - Box(244, 244), - Box(245, 245), - Box(246, 246), - Box(247, 247), - Box(248, 248), - Box(249, 249), - Box(250, 250), - Box(251, 251), - Box(252, 252), - Box(253, 253), - Box(254, 254), - Box(255, 255), - Box(256, 256), - Box(257, 257), - Box(258, 258), - Box(259, 259), - Box(260, 260), - Box(261, 261), - Box(262, 262), - Box(263, 263), - Box(264, 264), - Box(265, 265), - Box(266, 266), - Box(267, 267), - Box(268, 268), - Box(269, 269), - Box(270, 270), - Box(271, 271), - Box(272, 272), - Box(273, 273), - Box(274, 274), - Box(275, 275), - Box(276, 276), - Box(277, 277), - Box(278, 278), - Box(279, 279), - Box(280, 280), - Box(281, 281), - Box(282, 282), - Box(283, 283), - Box(284, 284), - Box(285, 285), - Box(286, 286), - Box(287, 287), - Box(288, 288), - Box(289, 289), - Box(290, 290), - Box(291, 291), - Box(292, 292), - Box(293, 293), - Box(294, 294), - Box(295, 295), - Box(296, 296), - Box(297, 297), - Box(298, 298), - Box(299, 299), - Box(300, 300), - Box(301, 301), - Box(302, 302), - Box(303, 303), - Box(304, 304), - Box(305, 305), - Box(306, 306), - Box(307, 307), - Box(308, 308), - Box(309, 309), - Box(310, 310), - Box(311, 311), - Box(312, 312), - Box(313, 313), - Box(314, 314), - Box(315, 315), - Box(316, 316), - Box(317, 317), - Box(318, 318), - Box(319, 319), - Box(320, 320), - Box(321, 321), - Box(322, 322), - Box(323, 323), - Box(324, 324), - Box(325, 325), - Box(326, 326), - Box(327, 327), - Box(328, 328), - Box(329, 329), - Box(330, 330), - Box(331, 331), - Box(332, 332), - Box(333, 333), - Box(334, 334), - Box(335, 335), - Box(336, 336), - Box(337, 337), - Box(338, 338), - Box(339, 339), - Box(340, 340), - Box(341, 341), - Box(342, 342), - Box(343, 343), - Box(344, 344), - Box(345, 345), - Box(346, 346), - Box(347, 347), - Box(348, 348), - Box(349, 349), - Box(350, 350), - Box(351, 351), - Box(352, 352), - Box(353, 353), - Box(354, 354), - Box(355, 355), - Box(356, 356), - Box(357, 357), - Box(358, 358), - Box(359, 359), - Box(360, 360), - Box(361, 361), - Box(362, 362), - Box(363, 363), - Box(364, 364), - Box(365, 365), - Box(366, 366), - Box(367, 367), - Box(368, 368), - Box(369, 369), - Box(370, 370), - Box(371, 371), - Box(372, 372), - Box(373, 373), - Box(374, 374), - Box(375, 375), - Box(376, 376), - Box(377, 377), - Box(378, 378), - Box(379, 379), - Box(380, 380), - Box(381, 381), - Box(382, 382), - Box(383, 383), - Box(384, 384), - Box(385, 385), - Box(386, 386), - Box(387, 387), - Box(388, 388), - Box(389, 389), - Box(390, 390), - Box(391, 391), - Box(392, 392), - Box(393, 393), - Box(394, 394), - Box(395, 395), - Box(396, 396), - Box(397, 397), - Box(398, 398), - Box(399, 399), - Box(400, 400), - Box(401, 401), - Box(402, 402), - Box(403, 403), - Box(404, 404), - Box(405, 405), - Box(406, 406), - Box(407, 407), - Box(408, 408), - Box(409, 409), - Box(410, 410), - Box(411, 411), - Box(412, 412), - Box(413, 413), - Box(414, 414), - Box(415, 415), - Box(416, 416), - Box(417, 417), - Box(418, 418), - Box(419, 419), - Box(420, 420), - Box(421, 421), - Box(422, 422), - Box(423, 423), - Box(424, 424), - Box(425, 425), - Box(426, 426), - Box(427, 427), - Box(428, 428), - Box(429, 429), - Box(430, 430), - Box(431, 431), - Box(432, 432), - Box(433, 433), - Box(434, 434), - Box(435, 435), - Box(436, 436), - Box(437, 437), - Box(438, 438), - Box(439, 439), - Box(440, 440), - Box(441, 441), - Box(442, 442), - Box(443, 443), - Box(444, 444), - Box(445, 445), - Box(446, 446), - Box(447, 447), - Box(448, 448), - Box(449, 449), - Box(450, 450), - Box(451, 451), - Box(452, 452), - Box(453, 453), - Box(454, 454), - Box(455, 455), - Box(456, 456), - Box(457, 457), - Box(458, 458), - Box(459, 459), - Box(460, 460), - Box(461, 461), - Box(462, 462), - Box(463, 463), - Box(464, 464), - Box(465, 465), - Box(466, 466), - Box(467, 467), - Box(468, 468), - Box(469, 469), - Box(470, 470), - Box(471, 471), - Box(472, 472), - Box(473, 473), - Box(474, 474), - Box(475, 475), - Box(476, 476), - Box(477, 477), - Box(478, 478), - Box(479, 479), - Box(480, 480), - Box(481, 481), - Box(482, 482), - Box(483, 483), - Box(484, 484), - Box(485, 485), - Box(486, 486), - Box(487, 487), - Box(488, 488), - Box(489, 489), - Box(490, 490), - Box(491, 491), - Box(492, 492), - Box(493, 493), - Box(494, 494), - Box(495, 495), - Box(496, 496), - Box(497, 497), - Box(498, 498), - Box(499, 499), - Box(500, 500), - Box(501, 501), - Box(502, 502), - Box(503, 503), - Box(504, 504), - Box(505, 505), - Box(506, 506), - Box(507, 507), - Box(508, 508), - Box(509, 509), - Box(510, 510), - Box(511, 511), - Box(512, 512), - Box(513, 513), - Box(514, 514), - Box(515, 515), - Box(516, 516), - Box(517, 517), - Box(518, 518), - Box(519, 519), - Box(520, 520), - Box(521, 521), - Box(522, 522), - Box(523, 523), - Box(524, 524), - Box(525, 525), - Box(526, 526), - Box(527, 527), - Box(528, 528), - Box(529, 529), - Box(530, 530), - Box(531, 531), - Box(532, 532), - Box(533, 533), - Box(534, 534), - Box(535, 535), - Box(536, 536), - Box(537, 537), - Box(538, 538), - Box(539, 539), - Box(540, 540), - Box(541, 541), - Box(542, 542), - Box(543, 543), - Box(544, 544), - Box(545, 545), - Box(546, 546), - Box(547, 547), - Box(548, 548), - Box(549, 549), - Box(550, 550), - Box(551, 551), - Box(552, 552), - Box(553, 553), - Box(554, 554), - Box(555, 555), - Box(556, 556), - Box(557, 557), - Box(558, 558), - Box(559, 559), - Box(560, 560), - Box(561, 561), - Box(562, 562), - Box(563, 563), - Box(564, 564), - Box(565, 565), - Box(566, 566), - Box(567, 567), - Box(568, 568), - Box(569, 569), - Box(570, 570), - Box(571, 571), - Box(572, 572), - Box(573, 573), - Box(574, 574), - Box(575, 575), - Box(576, 576), - Box(577, 577), - Box(578, 578), - Box(579, 579), - Box(580, 580), - Box(581, 581), - Box(582, 582), - Box(583, 583), - Box(584, 584), - Box(585, 585), - Box(586, 586), - Box(587, 587), - Box(588, 588), - Box(589, 589), - Box(590, 590), - Box(591, 591), - Box(592, 592), - Box(593, 593), - Box(594, 594), - Box(595, 595), - Box(596, 596), - Box(597, 597), - Box(598, 598), - Box(599, 599), - Box(600, 600), - Box(601, 601), - Box(602, 602), - Box(603, 603), - Box(604, 604), - Box(605, 605), - Box(606, 606), - Box(607, 607), - Box(608, 608), - Box(609, 609), - Box(610, 610), - Box(611, 611), - Box(612, 612), - Box(613, 613), - Box(614, 614), - Box(615, 615), - Box(616, 616), - Box(617, 617), - Box(618, 618), - Box(619, 619), - Box(620, 620), - Box(621, 621), - Box(622, 622), - Box(623, 623), - Box(624, 624), - Box(625, 625), - Box(626, 626), - Box(627, 627), - Box(628, 628), - Box(629, 629), - Box(630, 630), - Box(631, 631), - Box(632, 632), - Box(633, 633), - Box(634, 634), - Box(635, 635), - Box(636, 636), - Box(637, 637), - Box(638, 638), - Box(639, 639), - Box(640, 640), - Box(641, 641), - Box(642, 642), - Box(643, 643), - Box(644, 644), - Box(645, 645), - Box(646, 646), - Box(647, 647), - Box(648, 648), - Box(649, 649), - Box(650, 650), - Box(651, 651), - Box(652, 652), - Box(653, 653), - Box(654, 654), - Box(655, 655), - Box(656, 656), - Box(657, 657), - Box(658, 658), - Box(659, 659), - Box(660, 660), - Box(661, 661), - Box(662, 662), - Box(663, 663), - Box(664, 664), - Box(665, 665), - Box(666, 666), - Box(667, 667), - Box(668, 668), - Box(669, 669), - Box(670, 670), - Box(671, 671), - Box(672, 672), - Box(673, 673), - Box(674, 674), - Box(675, 675), - Box(676, 676), - Box(677, 677), - Box(678, 678), - Box(679, 679), - Box(680, 680), - Box(681, 681), - Box(682, 682), - Box(683, 683), - Box(684, 684), - Box(685, 685), - Box(686, 686), - Box(687, 687), - Box(688, 688), - Box(689, 689), - Box(690, 690), - Box(691, 691), - Box(692, 692), - Box(693, 693), - Box(694, 694), - Box(695, 695), - Box(696, 696), - Box(697, 697), - Box(698, 698), - Box(699, 699), - Box(700, 700), - Box(701, 701), - Box(702, 702), - Box(703, 703), - Box(704, 704), - Box(705, 705), - Box(706, 706), - Box(707, 707), - Box(708, 708), - Box(709, 709), - Box(710, 710), - Box(711, 711), - Box(712, 712), - Box(713, 713), - Box(714, 714), - Box(715, 715), - Box(716, 716), - Box(717, 717), - Box(718, 718), - Box(719, 719), - Box(720, 720), - Box(721, 721), - Box(722, 722), - Box(723, 723), - Box(724, 724), - Box(725, 725), - Box(726, 726), - Box(727, 727), - Box(728, 728), - Box(729, 729), - Box(730, 730), - Box(731, 731), - Box(732, 732), - Box(733, 733), - Box(734, 734), - Box(735, 735), - Box(736, 736), - Box(737, 737), - Box(738, 738), - Box(739, 739), - Box(740, 740), - Box(741, 741), - Box(742, 742), - Box(743, 743), - Box(744, 744), - Box(745, 745), - Box(746, 746), - Box(747, 747), - Box(748, 748), - Box(749, 749), - Box(750, 750), - Box(751, 751), - Box(752, 752), - Box(753, 753), - Box(754, 754), - Box(755, 755), - Box(756, 756), - Box(757, 757), - Box(758, 758), - Box(759, 759), - Box(760, 760), - Box(761, 761), - Box(762, 762), - Box(763, 763), - Box(764, 764), - Box(765, 765), - Box(766, 766), - Box(767, 767), - Box(768, 768), - Box(769, 769), - Box(770, 770), - Box(771, 771), - Box(772, 772), - Box(773, 773), - Box(774, 774), - Box(775, 775), - Box(776, 776), - Box(777, 777), - Box(778, 778), - Box(779, 779), - Box(780, 780), - Box(781, 781), - Box(782, 782), - Box(783, 783), - Box(784, 784), - Box(785, 785), - Box(786, 786), - Box(787, 787), - Box(788, 788), - Box(789, 789), - Box(790, 790), - Box(791, 791), - Box(792, 792), - Box(793, 793), - Box(794, 794), - Box(795, 795), - Box(796, 796), - Box(797, 797), - Box(798, 798), - Box(799, 799), - Box(800, 800), - Box(801, 801), - Box(802, 802), - Box(803, 803), - Box(804, 804), - Box(805, 805), - Box(806, 806), - Box(807, 807), - Box(808, 808), - Box(809, 809), - Box(810, 810), - Box(811, 811), - Box(812, 812), - Box(813, 813), - Box(814, 814), - Box(815, 815), - Box(816, 816), - Box(817, 817), - Box(818, 818), - Box(819, 819), - Box(820, 820), - Box(821, 821), - Box(822, 822), - Box(823, 823), - Box(824, 824), - Box(825, 825), - Box(826, 826), - Box(827, 827), - Box(828, 828), - Box(829, 829), - Box(830, 830), - Box(831, 831), - Box(832, 832), - Box(833, 833), - Box(834, 834), - Box(835, 835), - Box(836, 836), - Box(837, 837), - Box(838, 838), - Box(839, 839), - Box(840, 840), - Box(841, 841), - Box(842, 842), - Box(843, 843), - Box(844, 844), - Box(845, 845), - Box(846, 846), - Box(847, 847), - Box(848, 848), - Box(849, 849), - Box(850, 850), - Box(851, 851), - Box(852, 852), - Box(853, 853), - Box(854, 854), - Box(855, 855), - Box(856, 856), - Box(857, 857), - Box(858, 858), - Box(859, 859), - Box(860, 860), - Box(861, 861), - Box(862, 862), - Box(863, 863), - Box(864, 864), - Box(865, 865), - Box(866, 866), - Box(867, 867), - Box(868, 868), - Box(869, 869), - Box(870, 870), - Box(871, 871), - Box(872, 872), - Box(873, 873), - Box(874, 874), - Box(875, 875), - Box(876, 876), - Box(877, 877), - Box(878, 878), - Box(879, 879), - Box(880, 880), - Box(881, 881), - Box(882, 882), - Box(883, 883), - Box(884, 884), - Box(885, 885), - Box(886, 886), - Box(887, 887), - Box(888, 888), - Box(889, 889), - Box(890, 890), - Box(891, 891), - Box(892, 892), - Box(893, 893), - Box(894, 894), - Box(895, 895), - Box(896, 896), - Box(897, 897), - Box(898, 898), - Box(899, 899), - Box(900, 900), - Box(901, 901), - Box(902, 902), - Box(903, 903), - Box(904, 904), - Box(905, 905), - Box(906, 906), - Box(907, 907), - Box(908, 908), - Box(909, 909), - Box(910, 910), - Box(911, 911), - Box(912, 912), - Box(913, 913), - Box(914, 914), - Box(915, 915), - Box(916, 916), - Box(917, 917), - Box(918, 918), - Box(919, 919), - Box(920, 920), - Box(921, 921), - Box(922, 922), - Box(923, 923), - Box(924, 924), - Box(925, 925), - Box(926, 926), - Box(927, 927), - Box(928, 928), - Box(929, 929), - Box(930, 930), - Box(931, 931), - Box(932, 932), - Box(933, 933), - Box(934, 934), - Box(935, 935), - Box(936, 936), - Box(937, 937), - Box(938, 938), - Box(939, 939), - Box(940, 940), - Box(941, 941), - Box(942, 942), - Box(943, 943), - Box(944, 944), - Box(945, 945), - Box(946, 946), - Box(947, 947), - Box(948, 948), - Box(949, 949), - Box(950, 950), - Box(951, 951), - Box(952, 952), - Box(953, 953), - Box(954, 954), - Box(955, 955), - Box(956, 956), - Box(957, 957), - Box(958, 958), - Box(959, 959), - Box(960, 960), - Box(961, 961), - Box(962, 962), - Box(963, 963), - Box(964, 964), - Box(965, 965), - Box(966, 966), - Box(967, 967), - Box(968, 968), - Box(969, 969), - Box(970, 970), - Box(971, 971), - Box(972, 972), - Box(973, 973), - Box(974, 974), - Box(975, 975), - Box(976, 976), - Box(977, 977), - Box(978, 978), - Box(979, 979), - Box(980, 980), - Box(981, 981), - Box(982, 982), - Box(983, 983), - Box(984, 984), - Box(985, 985), - Box(986, 986), - Box(987, 987), - Box(988, 988), - Box(989, 989), - Box(990, 990), - Box(991, 991), - Box(992, 992), - Box(993, 993), - Box(994, 994), - Box(995, 995), - Box(996, 996), - Box(997, 997), - Box(998, 998), - Box(999, 999), - Box(1000, 1000), - Box(1001, 1001), - Box(1002, 1002), - Box(1003, 1003), - Box(1004, 1004), - Box(1005, 1005), - Box(1006, 1006), - Box(1007, 1007), - Box(1008, 1008), - Box(1009, 1009), - Box(1010, 1010), - Box(1011, 1011), - Box(1012, 1012), - Box(1013, 1013), - Box(1014, 1014), - Box(1015, 1015), - Box(1016, 1016), - Box(1017, 1017), - Box(1018, 1018), - Box(1019, 1019), - Box(1020, 1020), - Box(1021, 1021), - Box(1022, 1022), - Box(1023, 1023), - Box(1024, 1024), - Box(1025, 1025), - Box(1026, 1026), - Box(1027, 1027), - Box(1028, 1028), - Box(1029, 1029), - Box(1030, 1030), - Box(1031, 1031), - Box(1032, 1032), - Box(1033, 1033), - Box(1034, 1034), - Box(1035, 1035), - Box(1036, 1036), - Box(1037, 1037), - Box(1038, 1038), - Box(1039, 1039), - Box(1040, 1040), - Box(1041, 1041), - Box(1042, 1042), - Box(1043, 1043), - Box(1044, 1044), - Box(1045, 1045), - Box(1046, 1046), - Box(1047, 1047), - Box(1048, 1048), - Box(1049, 1049), - Box(1050, 1050), - Box(1051, 1051), - Box(1052, 1052), - Box(1053, 1053), - Box(1054, 1054), - Box(1055, 1055), - Box(1056, 1056), - Box(1057, 1057), - Box(1058, 1058), - Box(1059, 1059), - Box(1060, 1060), - Box(1061, 1061), - Box(1062, 1062), - Box(1063, 1063), - Box(1064, 1064), - Box(1065, 1065), - Box(1066, 1066), - Box(1067, 1067), - Box(1068, 1068), - Box(1069, 1069), - Box(1070, 1070), - Box(1071, 1071), - Box(1072, 1072), - Box(1073, 1073), - Box(1074, 1074), - Box(1075, 1075), - Box(1076, 1076), - Box(1077, 1077), - Box(1078, 1078), - Box(1079, 1079), - Box(1080, 1080), - Box(1081, 1081), - Box(1082, 1082), - Box(1083, 1083), - Box(1084, 1084), - Box(1085, 1085), - Box(1086, 1086), - Box(1087, 1087), - Box(1088, 1088), - Box(1089, 1089), - Box(1090, 1090), - Box(1091, 1091), - Box(1092, 1092), - Box(1093, 1093), - Box(1094, 1094), - Box(1095, 1095), - Box(1096, 1096), - Box(1097, 1097), - Box(1098, 1098), - Box(1099, 1099), - Box(1100, 1100), - Box(1101, 1101), - Box(1102, 1102), - Box(1103, 1103), - Box(1104, 1104), - Box(1105, 1105), - Box(1106, 1106), - Box(1107, 1107), - Box(1108, 1108), - Box(1109, 1109), - Box(1110, 1110), - Box(1111, 1111), - Box(1112, 1112), - Box(1113, 1113), - Box(1114, 1114), - Box(1115, 1115), - Box(1116, 1116), - Box(1117, 1117), - Box(1118, 1118), - Box(1119, 1119), - Box(1120, 1120), - Box(1121, 1121), - Box(1122, 1122), - Box(1123, 1123), - Box(1124, 1124), - Box(1125, 1125), - Box(1126, 1126), - Box(1127, 1127), - Box(1128, 1128), - Box(1129, 1129), - Box(1130, 1130), - Box(1131, 1131), - Box(1132, 1132), - Box(1133, 1133), - Box(1134, 1134), - Box(1135, 1135), - Box(1136, 1136), - Box(1137, 1137), - Box(1138, 1138), - Box(1139, 1139), - Box(1140, 1140), - Box(1141, 1141), - Box(1142, 1142), - Box(1143, 1143), - Box(1144, 1144), - Box(1145, 1145), - Box(1146, 1146), - Box(1147, 1147), - Box(1148, 1148), - Box(1149, 1149), - Box(1150, 1150), - Box(1151, 1151), - Box(1152, 1152), - Box(1153, 1153), - Box(1154, 1154), - Box(1155, 1155), - Box(1156, 1156), - Box(1157, 1157), - Box(1158, 1158), - Box(1159, 1159), - Box(1160, 1160), - Box(1161, 1161), - Box(1162, 1162), - Box(1163, 1163), - Box(1164, 1164), - Box(1165, 1165), - Box(1166, 1166), - Box(1167, 1167), - Box(1168, 1168), - Box(1169, 1169), - Box(1170, 1170), - Box(1171, 1171), - Box(1172, 1172), - Box(1173, 1173), - Box(1174, 1174), - Box(1175, 1175), - Box(1176, 1176), - Box(1177, 1177), - Box(1178, 1178), - Box(1179, 1179), - Box(1180, 1180), - Box(1181, 1181), - Box(1182, 1182), - Box(1183, 1183), - Box(1184, 1184), - Box(1185, 1185), - Box(1186, 1186), - Box(1187, 1187), - Box(1188, 1188), - Box(1189, 1189), - Box(1190, 1190), - Box(1191, 1191), - Box(1192, 1192), - Box(1193, 1193), - Box(1194, 1194), - Box(1195, 1195), - Box(1196, 1196), - Box(1197, 1197), - Box(1198, 1198), - Box(1199, 1199), - Box(1200, 1200), - Box(1201, 1201), - Box(1202, 1202), - Box(1203, 1203), - Box(1204, 1204), - Box(1205, 1205), - Box(1206, 1206), - Box(1207, 1207), - Box(1208, 1208), - Box(1209, 1209), - Box(1210, 1210), - Box(1211, 1211), - Box(1212, 1212), - Box(1213, 1213), - Box(1214, 1214), - Box(1215, 1215), - Box(1216, 1216), - Box(1217, 1217), - Box(1218, 1218), - Box(1219, 1219), - Box(1220, 1220), - Box(1221, 1221), - Box(1222, 1222), - Box(1223, 1223), - Box(1224, 1224), - Box(1225, 1225), - Box(1226, 1226), - Box(1227, 1227), - Box(1228, 1228), - Box(1229, 1229), - Box(1230, 1230), - Box(1231, 1231), - Box(1232, 1232), - Box(1233, 1233), - Box(1234, 1234), - Box(1235, 1235), - Box(1236, 1236), - Box(1237, 1237), - Box(1238, 1238), - Box(1239, 1239), - Box(1240, 1240), - Box(1241, 1241), - Box(1242, 1242), - Box(1243, 1243), - Box(1244, 1244), - Box(1245, 1245), - Box(1246, 1246), - Box(1247, 1247), - Box(1248, 1248), - Box(1249, 1249), - Box(1250, 1250), - Box(1251, 1251), - Box(1252, 1252), - Box(1253, 1253), - Box(1254, 1254), - Box(1255, 1255), - Box(1256, 1256), - Box(1257, 1257), - Box(1258, 1258), - Box(1259, 1259), - Box(1260, 1260), - Box(1261, 1261), - Box(1262, 1262), - Box(1263, 1263), - Box(1264, 1264), - Box(1265, 1265), - Box(1266, 1266), - Box(1267, 1267), - Box(1268, 1268), - Box(1269, 1269), - Box(1270, 1270), - Box(1271, 1271), - Box(1272, 1272), - Box(1273, 1273), - Box(1274, 1274), - Box(1275, 1275), - Box(1276, 1276), - Box(1277, 1277), - Box(1278, 1278), - Box(1279, 1279), - Box(1280, 1280), - Box(1281, 1281), - Box(1282, 1282), - Box(1283, 1283), - Box(1284, 1284), - Box(1285, 1285), - Box(1286, 1286), - Box(1287, 1287), - Box(1288, 1288), - Box(1289, 1289), - Box(1290, 1290), - Box(1291, 1291), - Box(1292, 1292), - Box(1293, 1293), - Box(1294, 1294), - Box(1295, 1295), - Box(1296, 1296), - Box(1297, 1297), - Box(1298, 1298), - Box(1299, 1299), - Box(1300, 1300), - Box(1301, 1301), - Box(1302, 1302), - Box(1303, 1303), - Box(1304, 1304), - Box(1305, 1305), - Box(1306, 1306), - Box(1307, 1307), - Box(1308, 1308), - Box(1309, 1309), - Box(1310, 1310), - Box(1311, 1311), - Box(1312, 1312), - Box(1313, 1313), - Box(1314, 1314), - Box(1315, 1315), - Box(1316, 1316), - Box(1317, 1317), - Box(1318, 1318), - Box(1319, 1319), - Box(1320, 1320), - Box(1321, 1321), - Box(1322, 1322), - Box(1323, 1323), - Box(1324, 1324), - Box(1325, 1325), - Box(1326, 1326), - Box(1327, 1327), - Box(1328, 1328), - Box(1329, 1329), - Box(1330, 1330), - Box(1331, 1331), - Box(1332, 1332), - Box(1333, 1333), - Box(1334, 1334), - Box(1335, 1335), - Box(1336, 1336), - Box(1337, 1337), - Box(1338, 1338), - Box(1339, 1339), - Box(1340, 1340), - Box(1341, 1341), - Box(1342, 1342), - Box(1343, 1343), - Box(1344, 1344), - Box(1345, 1345), - Box(1346, 1346), - Box(1347, 1347), - Box(1348, 1348), - Box(1349, 1349), - Box(1350, 1350), - Box(1351, 1351), - Box(1352, 1352), - Box(1353, 1353), - Box(1354, 1354), - Box(1355, 1355), - Box(1356, 1356), - Box(1357, 1357), - Box(1358, 1358), - Box(1359, 1359), - Box(1360, 1360), - Box(1361, 1361), - Box(1362, 1362), - Box(1363, 1363), - Box(1364, 1364), - Box(1365, 1365), - Box(1366, 1366), - Box(1367, 1367), - Box(1368, 1368), - Box(1369, 1369), - Box(1370, 1370), - Box(1371, 1371), - Box(1372, 1372), - Box(1373, 1373), - Box(1374, 1374), - Box(1375, 1375), - Box(1376, 1376), - Box(1377, 1377), - Box(1378, 1378), - Box(1379, 1379), - Box(1380, 1380), - Box(1381, 1381), - Box(1382, 1382), - Box(1383, 1383), - Box(1384, 1384), - Box(1385, 1385), - Box(1386, 1386), - Box(1387, 1387), - Box(1388, 1388), - Box(1389, 1389), - Box(1390, 1390), - Box(1391, 1391), - Box(1392, 1392), - Box(1393, 1393), - Box(1394, 1394), - Box(1395, 1395), - Box(1396, 1396), - Box(1397, 1397), - Box(1398, 1398), - Box(1399, 1399), - Box(1400, 1400), - Box(1401, 1401), - Box(1402, 1402), - Box(1403, 1403), - Box(1404, 1404), - Box(1405, 1405), - Box(1406, 1406), - Box(1407, 1407), - Box(1408, 1408), - Box(1409, 1409), - Box(1410, 1410), - Box(1411, 1411), - Box(1412, 1412), - Box(1413, 1413), - Box(1414, 1414), - Box(1415, 1415), - Box(1416, 1416), - Box(1417, 1417), - Box(1418, 1418), - Box(1419, 1419), - Box(1420, 1420), - Box(1421, 1421), - Box(1422, 1422), - Box(1423, 1423), - Box(1424, 1424), - Box(1425, 1425), - Box(1426, 1426), - Box(1427, 1427), - Box(1428, 1428), - Box(1429, 1429), - Box(1430, 1430), - Box(1431, 1431), - Box(1432, 1432), - Box(1433, 1433), - Box(1434, 1434), - Box(1435, 1435), - Box(1436, 1436), - Box(1437, 1437), - Box(1438, 1438), - Box(1439, 1439), - Box(1440, 1440), - Box(1441, 1441), - Box(1442, 1442), - Box(1443, 1443), - Box(1444, 1444), - Box(1445, 1445), - Box(1446, 1446), - Box(1447, 1447), - Box(1448, 1448), - Box(1449, 1449), - Box(1450, 1450), - Box(1451, 1451), - Box(1452, 1452), - Box(1453, 1453), - Box(1454, 1454), - Box(1455, 1455), - Box(1456, 1456), - Box(1457, 1457), - Box(1458, 1458), - Box(1459, 1459), - Box(1460, 1460), - Box(1461, 1461), - Box(1462, 1462), - Box(1463, 1463), - Box(1464, 1464), - Box(1465, 1465), - Box(1466, 1466), - Box(1467, 1467), - Box(1468, 1468), - Box(1469, 1469), - Box(1470, 1470), - Box(1471, 1471), - Box(1472, 1472), - Box(1473, 1473), - Box(1474, 1474), - Box(1475, 1475), - Box(1476, 1476), - Box(1477, 1477), - Box(1478, 1478), - Box(1479, 1479), - Box(1480, 1480), - Box(1481, 1481), - Box(1482, 1482), - Box(1483, 1483), - Box(1484, 1484), - Box(1485, 1485), - Box(1486, 1486), - Box(1487, 1487), - Box(1488, 1488), - Box(1489, 1489), - Box(1490, 1490), - Box(1491, 1491), - Box(1492, 1492), - Box(1493, 1493), - Box(1494, 1494), - Box(1495, 1495), - Box(1496, 1496), - Box(1497, 1497), - Box(1498, 1498), - Box(1499, 1499), - Box(1500, 1500), - Box(1501, 1501), - Box(1502, 1502), - Box(1503, 1503), - Box(1504, 1504), - Box(1505, 1505), - Box(1506, 1506), - Box(1507, 1507), - Box(1508, 1508), - Box(1509, 1509), - Box(1510, 1510), - Box(1511, 1511), - Box(1512, 1512), - Box(1513, 1513), - Box(1514, 1514), - Box(1515, 1515), - Box(1516, 1516), - Box(1517, 1517), - Box(1518, 1518), - Box(1519, 1519), - Box(1520, 1520), - Box(1521, 1521), - Box(1522, 1522), - Box(1523, 1523), - Box(1524, 1524), - Box(1525, 1525), - Box(1526, 1526), - Box(1527, 1527), - Box(1528, 1528), - Box(1529, 1529), - Box(1530, 1530), - Box(1531, 1531), - Box(1532, 1532), - Box(1533, 1533), - Box(1534, 1534), - Box(1535, 1535), - Box(1536, 1536), - Box(1537, 1537), - Box(1538, 1538), - Box(1539, 1539), - Box(1540, 1540), - Box(1541, 1541), - Box(1542, 1542), - Box(1543, 1543), - Box(1544, 1544), - Box(1545, 1545), - Box(1546, 1546), - Box(1547, 1547), - Box(1548, 1548), - Box(1549, 1549), - Box(1550, 1550), - Box(1551, 1551), - Box(1552, 1552), - Box(1553, 1553), - Box(1554, 1554), - Box(1555, 1555), - Box(1556, 1556), - Box(1557, 1557), - Box(1558, 1558), - Box(1559, 1559), - Box(1560, 1560), - Box(1561, 1561), - Box(1562, 1562), - Box(1563, 1563), - Box(1564, 1564), - Box(1565, 1565), - Box(1566, 1566), - Box(1567, 1567), - Box(1568, 1568), - Box(1569, 1569), - Box(1570, 1570), - Box(1571, 1571), - Box(1572, 1572), - Box(1573, 1573), - Box(1574, 1574), - Box(1575, 1575), - Box(1576, 1576), - Box(1577, 1577), - Box(1578, 1578), - Box(1579, 1579), - Box(1580, 1580), - Box(1581, 1581), - Box(1582, 1582), - Box(1583, 1583), - Box(1584, 1584), - Box(1585, 1585), - Box(1586, 1586), - Box(1587, 1587), - Box(1588, 1588), - Box(1589, 1589), - Box(1590, 1590), - Box(1591, 1591), - Box(1592, 1592), - Box(1593, 1593), - Box(1594, 1594), - Box(1595, 1595), - Box(1596, 1596), - Box(1597, 1597), - Box(1598, 1598), - Box(1599, 1599), - Box(1600, 1600), - Box(1601, 1601), - Box(1602, 1602), - Box(1603, 1603), - Box(1604, 1604), - Box(1605, 1605), - Box(1606, 1606), - Box(1607, 1607), - Box(1608, 1608), - Box(1609, 1609), - Box(1610, 1610), - Box(1611, 1611), - Box(1612, 1612), - Box(1613, 1613), - Box(1614, 1614), - Box(1615, 1615), - Box(1616, 1616), - Box(1617, 1617), - Box(1618, 1618), - Box(1619, 1619), - Box(1620, 1620), - Box(1621, 1621), - Box(1622, 1622), - Box(1623, 1623), - Box(1624, 1624), - Box(1625, 1625), - Box(1626, 1626), - Box(1627, 1627), - Box(1628, 1628), - Box(1629, 1629), - Box(1630, 1630), - Box(1631, 1631), - Box(1632, 1632), - Box(1633, 1633), - Box(1634, 1634), - Box(1635, 1635), - Box(1636, 1636), - Box(1637, 1637), - Box(1638, 1638), - Box(1639, 1639), - Box(1640, 1640), - Box(1641, 1641), - Box(1642, 1642), - Box(1643, 1643), - Box(1644, 1644), - Box(1645, 1645), - Box(1646, 1646), - Box(1647, 1647), - Box(1648, 1648), - Box(1649, 1649), - Box(1650, 1650), - Box(1651, 1651), - Box(1652, 1652), - Box(1653, 1653), - Box(1654, 1654), - Box(1655, 1655), - Box(1656, 1656), - Box(1657, 1657), - Box(1658, 1658), - Box(1659, 1659), - Box(1660, 1660), - Box(1661, 1661), - Box(1662, 1662), - Box(1663, 1663), - Box(1664, 1664), - Box(1665, 1665), - Box(1666, 1666), - Box(1667, 1667), - Box(1668, 1668), - Box(1669, 1669), - Box(1670, 1670), - Box(1671, 1671), - Box(1672, 1672), - Box(1673, 1673), - Box(1674, 1674), - Box(1675, 1675), - Box(1676, 1676), - Box(1677, 1677), - Box(1678, 1678), - Box(1679, 1679), - Box(1680, 1680), - Box(1681, 1681), - Box(1682, 1682), - Box(1683, 1683), - Box(1684, 1684), - Box(1685, 1685), - Box(1686, 1686), - Box(1687, 1687), - Box(1688, 1688), - Box(1689, 1689), - Box(1690, 1690), - Box(1691, 1691), - Box(1692, 1692), - Box(1693, 1693), - Box(1694, 1694), - Box(1695, 1695), - Box(1696, 1696), - Box(1697, 1697), - Box(1698, 1698), - Box(1699, 1699), - Box(1700, 1700), - Box(1701, 1701), - Box(1702, 1702), - Box(1703, 1703), - Box(1704, 1704), - Box(1705, 1705), - Box(1706, 1706), - Box(1707, 1707), - Box(1708, 1708), - Box(1709, 1709), - Box(1710, 1710), - Box(1711, 1711), - Box(1712, 1712), - Box(1713, 1713), - Box(1714, 1714), - Box(1715, 1715), - Box(1716, 1716), - Box(1717, 1717), - Box(1718, 1718), - Box(1719, 1719), - Box(1720, 1720), - Box(1721, 1721), - Box(1722, 1722), - Box(1723, 1723), - Box(1724, 1724), - Box(1725, 1725), - Box(1726, 1726), - Box(1727, 1727), - Box(1728, 1728), - Box(1729, 1729), - Box(1730, 1730), - Box(1731, 1731), - Box(1732, 1732), - Box(1733, 1733), - Box(1734, 1734), - Box(1735, 1735), - Box(1736, 1736), - Box(1737, 1737), - Box(1738, 1738), - Box(1739, 1739), - Box(1740, 1740), - Box(1741, 1741), - Box(1742, 1742), - Box(1743, 1743), - Box(1744, 1744), - Box(1745, 1745), - Box(1746, 1746), - Box(1747, 1747), - Box(1748, 1748), - Box(1749, 1749), - Box(1750, 1750), - Box(1751, 1751), - Box(1752, 1752), - Box(1753, 1753), - Box(1754, 1754), - Box(1755, 1755), - Box(1756, 1756), - Box(1757, 1757), - Box(1758, 1758), - Box(1759, 1759), - Box(1760, 1760), - Box(1761, 1761), - Box(1762, 1762), - Box(1763, 1763), - Box(1764, 1764), - Box(1765, 1765), - Box(1766, 1766), - Box(1767, 1767), - Box(1768, 1768), - Box(1769, 1769), - Box(1770, 1770), - Box(1771, 1771), - Box(1772, 1772), - Box(1773, 1773), - Box(1774, 1774), - Box(1775, 1775), - Box(1776, 1776), - Box(1777, 1777), - Box(1778, 1778), - Box(1779, 1779), - Box(1780, 1780), - Box(1781, 1781), - Box(1782, 1782), - Box(1783, 1783), - Box(1784, 1784), - Box(1785, 1785), - Box(1786, 1786), - Box(1787, 1787), - Box(1788, 1788), - Box(1789, 1789), - Box(1790, 1790), - Box(1791, 1791), - Box(1792, 1792), - Box(1793, 1793), - Box(1794, 1794), - Box(1795, 1795), - Box(1796, 1796), - Box(1797, 1797), - Box(1798, 1798), - Box(1799, 1799), - Box(1800, 1800), - Box(1801, 1801), - Box(1802, 1802), - Box(1803, 1803), - Box(1804, 1804), - Box(1805, 1805), - Box(1806, 1806), - Box(1807, 1807), - Box(1808, 1808), - Box(1809, 1809), - Box(1810, 1810), - Box(1811, 1811), - Box(1812, 1812), - Box(1813, 1813), - Box(1814, 1814), - Box(1815, 1815), - Box(1816, 1816), - Box(1817, 1817), - Box(1818, 1818), - Box(1819, 1819), - Box(1820, 1820), - Box(1821, 1821), - Box(1822, 1822), - Box(1823, 1823), - Box(1824, 1824), - Box(1825, 1825), - Box(1826, 1826), - Box(1827, 1827), - Box(1828, 1828), - Box(1829, 1829), - Box(1830, 1830), - Box(1831, 1831), - Box(1832, 1832), - Box(1833, 1833), - Box(1834, 1834), - Box(1835, 1835), - Box(1836, 1836), - Box(1837, 1837), - Box(1838, 1838), - Box(1839, 1839), - Box(1840, 1840), - Box(1841, 1841), - Box(1842, 1842), - Box(1843, 1843), - Box(1844, 1844), - Box(1845, 1845), - Box(1846, 1846), - Box(1847, 1847), - Box(1848, 1848), - Box(1849, 1849), - Box(1850, 1850), - Box(1851, 1851), - Box(1852, 1852), - Box(1853, 1853), - Box(1854, 1854), - Box(1855, 1855), - Box(1856, 1856), - Box(1857, 1857), - Box(1858, 1858), - Box(1859, 1859), - Box(1860, 1860), - Box(1861, 1861), - Box(1862, 1862), - Box(1863, 1863), - Box(1864, 1864), - Box(1865, 1865), - Box(1866, 1866), - Box(1867, 1867), - Box(1868, 1868), - Box(1869, 1869), - Box(1870, 1870), - Box(1871, 1871), - Box(1872, 1872), - Box(1873, 1873), - Box(1874, 1874), - Box(1875, 1875), - Box(1876, 1876), - Box(1877, 1877), - Box(1878, 1878), - Box(1879, 1879), - Box(1880, 1880), - Box(1881, 1881), - Box(1882, 1882), - Box(1883, 1883), - Box(1884, 1884), - Box(1885, 1885), - Box(1886, 1886), - Box(1887, 1887), - Box(1888, 1888), - Box(1889, 1889), - Box(1890, 1890), - Box(1891, 1891), - Box(1892, 1892), - Box(1893, 1893), - Box(1894, 1894), - Box(1895, 1895), - Box(1896, 1896), - Box(1897, 1897), - Box(1898, 1898), - Box(1899, 1899), - Box(1900, 1900), - Box(1901, 1901), - Box(1902, 1902), - Box(1903, 1903), - Box(1904, 1904), - Box(1905, 1905), - Box(1906, 1906), - Box(1907, 1907), - Box(1908, 1908), - Box(1909, 1909), - Box(1910, 1910), - Box(1911, 1911), - Box(1912, 1912), - Box(1913, 1913), - Box(1914, 1914), - Box(1915, 1915), - Box(1916, 1916), - Box(1917, 1917), - Box(1918, 1918), - Box(1919, 1919), - Box(1920, 1920), - Box(1921, 1921), - Box(1922, 1922), - Box(1923, 1923), - Box(1924, 1924), - Box(1925, 1925), - Box(1926, 1926), - Box(1927, 1927), - Box(1928, 1928), - Box(1929, 1929), - Box(1930, 1930), - Box(1931, 1931), - Box(1932, 1932), - Box(1933, 1933), - Box(1934, 1934), - Box(1935, 1935), - Box(1936, 1936), - Box(1937, 1937), - Box(1938, 1938), - Box(1939, 1939), - Box(1940, 1940), - Box(1941, 1941), - Box(1942, 1942), - Box(1943, 1943), - Box(1944, 1944), - Box(1945, 1945), - Box(1946, 1946), - Box(1947, 1947), - Box(1948, 1948), - Box(1949, 1949), - Box(1950, 1950), - Box(1951, 1951), - Box(1952, 1952), - Box(1953, 1953), - Box(1954, 1954), - Box(1955, 1955), - Box(1956, 1956), - Box(1957, 1957), - Box(1958, 1958), - Box(1959, 1959), - Box(1960, 1960), - Box(1961, 1961), - Box(1962, 1962), - Box(1963, 1963), - Box(1964, 1964), - Box(1965, 1965), - Box(1966, 1966), - Box(1967, 1967), - Box(1968, 1968), - Box(1969, 1969), - Box(1970, 1970), - Box(1971, 1971), - Box(1972, 1972), - Box(1973, 1973), - Box(1974, 1974), - Box(1975, 1975), - Box(1976, 1976), - Box(1977, 1977), - Box(1978, 1978), - Box(1979, 1979), - Box(1980, 1980), - Box(1981, 1981), - Box(1982, 1982), - Box(1983, 1983), - Box(1984, 1984), - Box(1985, 1985), - Box(1986, 1986), - Box(1987, 1987), - Box(1988, 1988), - Box(1989, 1989), - Box(1990, 1990), - Box(1991, 1991), - Box(1992, 1992), - Box(1993, 1993), - Box(1994, 1994), - Box(1995, 1995), - Box(1996, 1996), - Box(1997, 1997), - Box(1998, 1998), - Box(1999, 1999), - Box(2000, 2000), - Box(2001, 2001), - Box(2002, 2002), - Box(2003, 2003), - Box(2004, 2004), - Box(2005, 2005), - Box(2006, 2006), - Box(2007, 2007), - Box(2008, 2008), - Box(2009, 2009), - Box(2010, 2010), - Box(2011, 2011), - Box(2012, 2012), - Box(2013, 2013), - Box(2014, 2014), - Box(2015, 2015), - Box(2016, 2016), - Box(2017, 2017), - Box(2018, 2018), - Box(2019, 2019), - Box(2020, 2020), - Box(2021, 2021), - Box(2022, 2022), - Box(2023, 2023), - Box(2024, 2024), - Box(2025, 2025), - Box(2026, 2026), - Box(2027, 2027), - Box(2028, 2028), - Box(2029, 2029), - Box(2030, 2030), - Box(2031, 2031), - Box(2032, 2032), - Box(2033, 2033), - Box(2034, 2034), - Box(2035, 2035), - Box(2036, 2036), - Box(2037, 2037), - Box(2038, 2038), - Box(2039, 2039), - Box(2040, 2040), - Box(2041, 2041), - Box(2042, 2042), - Box(2043, 2043), - Box(2044, 2044), - Box(2045, 2045), - Box(2046, 2046), - Box(2047, 2047), - Box(2048, 2048), - Box(2049, 2049), - Box(2050, 2050), - Box(2051, 2051), - Box(2052, 2052), - Box(2053, 2053), - Box(2054, 2054), - Box(2055, 2055), - Box(2056, 2056), - Box(2057, 2057), - Box(2058, 2058), - Box(2059, 2059), - Box(2060, 2060), - Box(2061, 2061), - Box(2062, 2062), - Box(2063, 2063), - Box(2064, 2064), - Box(2065, 2065), - Box(2066, 2066), - Box(2067, 2067), - Box(2068, 2068), - Box(2069, 2069), - Box(2070, 2070), - Box(2071, 2071), - Box(2072, 2072), - Box(2073, 2073), - Box(2074, 2074), - Box(2075, 2075), - Box(2076, 2076), - Box(2077, 2077), - Box(2078, 2078), - Box(2079, 2079), - Box(2080, 2080), - Box(2081, 2081), - Box(2082, 2082), - Box(2083, 2083), - Box(2084, 2084), - Box(2085, 2085), - Box(2086, 2086), - Box(2087, 2087), - Box(2088, 2088), - Box(2089, 2089), - Box(2090, 2090), - Box(2091, 2091), - Box(2092, 2092), - Box(2093, 2093), - Box(2094, 2094), - Box(2095, 2095), - Box(2096, 2096), - Box(2097, 2097), - Box(2098, 2098), - Box(2099, 2099), - Box(2100, 2100), - Box(2101, 2101), - Box(2102, 2102), - Box(2103, 2103), - Box(2104, 2104), - Box(2105, 2105), - Box(2106, 2106), - Box(2107, 2107), - Box(2108, 2108), - Box(2109, 2109), - Box(2110, 2110), - Box(2111, 2111), - Box(2112, 2112), - Box(2113, 2113), - Box(2114, 2114), - Box(2115, 2115), - Box(2116, 2116), - Box(2117, 2117), - Box(2118, 2118), - Box(2119, 2119), - Box(2120, 2120), - Box(2121, 2121), - Box(2122, 2122), - Box(2123, 2123), - Box(2124, 2124), - Box(2125, 2125), - Box(2126, 2126), - Box(2127, 2127), - Box(2128, 2128), - Box(2129, 2129), - Box(2130, 2130), - Box(2131, 2131), - Box(2132, 2132), - Box(2133, 2133), - Box(2134, 2134), - Box(2135, 2135), - Box(2136, 2136), - Box(2137, 2137), - Box(2138, 2138), - Box(2139, 2139), - Box(2140, 2140), - Box(2141, 2141), - Box(2142, 2142), - Box(2143, 2143), - Box(2144, 2144), - Box(2145, 2145), - Box(2146, 2146), - Box(2147, 2147), - Box(2148, 2148), - Box(2149, 2149), - Box(2150, 2150), - Box(2151, 2151), - Box(2152, 2152), - Box(2153, 2153), - Box(2154, 2154), - Box(2155, 2155), - Box(2156, 2156), - Box(2157, 2157), - Box(2158, 2158), - Box(2159, 2159), - Box(2160, 2160), - Box(2161, 2161), - Box(2162, 2162), - Box(2163, 2163), - Box(2164, 2164), - Box(2165, 2165), - Box(2166, 2166), - Box(2167, 2167), - Box(2168, 2168), - Box(2169, 2169), - Box(2170, 2170), - Box(2171, 2171), - Box(2172, 2172), - Box(2173, 2173), - Box(2174, 2174), - Box(2175, 2175), - Box(2176, 2176), - Box(2177, 2177), - Box(2178, 2178), - Box(2179, 2179), - Box(2180, 2180), - Box(2181, 2181), - Box(2182, 2182), - Box(2183, 2183), - Box(2184, 2184), - Box(2185, 2185), - Box(2186, 2186), - Box(2187, 2187), - Box(2188, 2188), - Box(2189, 2189), - Box(2190, 2190), - Box(2191, 2191), - Box(2192, 2192), - Box(2193, 2193), - Box(2194, 2194), - Box(2195, 2195), - Box(2196, 2196), - Box(2197, 2197), - Box(2198, 2198), - Box(2199, 2199), - Box(2200, 2200), - Box(2201, 2201), - Box(2202, 2202), - Box(2203, 2203), - Box(2204, 2204), - Box(2205, 2205), - Box(2206, 2206), - Box(2207, 2207), - Box(2208, 2208), - Box(2209, 2209), - Box(2210, 2210), - Box(2211, 2211), - Box(2212, 2212), - Box(2213, 2213), - Box(2214, 2214), - Box(2215, 2215), - Box(2216, 2216), - Box(2217, 2217), - Box(2218, 2218), - Box(2219, 2219), - Box(2220, 2220), - Box(2221, 2221), - Box(2222, 2222), - Box(2223, 2223), - Box(2224, 2224), - Box(2225, 2225), - Box(2226, 2226), - Box(2227, 2227), - Box(2228, 2228), - Box(2229, 2229), - Box(2230, 2230), - Box(2231, 2231), - Box(2232, 2232), - Box(2233, 2233), - Box(2234, 2234), - Box(2235, 2235), - Box(2236, 2236), - Box(2237, 2237), - Box(2238, 2238), - Box(2239, 2239), - Box(2240, 2240), - Box(2241, 2241), - Box(2242, 2242), - Box(2243, 2243), - Box(2244, 2244), - Box(2245, 2245), - Box(2246, 2246), - Box(2247, 2247), - Box(2248, 2248), - Box(2249, 2249), - Box(2250, 2250), - Box(2251, 2251), - Box(2252, 2252), - Box(2253, 2253), - Box(2254, 2254), - Box(2255, 2255), - Box(2256, 2256), - Box(2257, 2257), - Box(2258, 2258), - Box(2259, 2259), - Box(2260, 2260), - Box(2261, 2261), - Box(2262, 2262), - Box(2263, 2263), - Box(2264, 2264), - Box(2265, 2265), - Box(2266, 2266), - Box(2267, 2267), - Box(2268, 2268), - Box(2269, 2269), - Box(2270, 2270), - Box(2271, 2271), - Box(2272, 2272), - Box(2273, 2273), - Box(2274, 2274), - Box(2275, 2275), - Box(2276, 2276), - Box(2277, 2277), - Box(2278, 2278), - Box(2279, 2279), - Box(2280, 2280), - Box(2281, 2281), - Box(2282, 2282), - Box(2283, 2283), - Box(2284, 2284), - Box(2285, 2285), - Box(2286, 2286), - Box(2287, 2287), - Box(2288, 2288), - Box(2289, 2289), - Box(2290, 2290), - Box(2291, 2291), - Box(2292, 2292), - Box(2293, 2293), - Box(2294, 2294), - Box(2295, 2295), - Box(2296, 2296), - Box(2297, 2297), - Box(2298, 2298), - Box(2299, 2299), - Box(2300, 2300), - Box(2301, 2301), - Box(2302, 2302), - Box(2303, 2303), - Box(2304, 2304), - Box(2305, 2305), - Box(2306, 2306), - Box(2307, 2307), - Box(2308, 2308), - Box(2309, 2309), - Box(2310, 2310), - Box(2311, 2311), - Box(2312, 2312), - Box(2313, 2313), - Box(2314, 2314), - Box(2315, 2315), - Box(2316, 2316), - Box(2317, 2317), - Box(2318, 2318), - Box(2319, 2319), - Box(2320, 2320), - Box(2321, 2321), - Box(2322, 2322), - Box(2323, 2323), - Box(2324, 2324), - Box(2325, 2325), - Box(2326, 2326), - Box(2327, 2327), - Box(2328, 2328), - Box(2329, 2329), - Box(2330, 2330), - Box(2331, 2331), - Box(2332, 2332), - Box(2333, 2333), - Box(2334, 2334), - Box(2335, 2335), - Box(2336, 2336), - Box(2337, 2337), - Box(2338, 2338), - Box(2339, 2339), - Box(2340, 2340), - Box(2341, 2341), - Box(2342, 2342), - Box(2343, 2343), - Box(2344, 2344), - Box(2345, 2345), - Box(2346, 2346), - Box(2347, 2347), - Box(2348, 2348), - Box(2349, 2349), - Box(2350, 2350), - Box(2351, 2351), - Box(2352, 2352), - Box(2353, 2353), - Box(2354, 2354), - Box(2355, 2355), - Box(2356, 2356), - Box(2357, 2357), - Box(2358, 2358), - Box(2359, 2359), - Box(2360, 2360), - Box(2361, 2361), - Box(2362, 2362), - Box(2363, 2363), - Box(2364, 2364), - Box(2365, 2365), - Box(2366, 2366), - Box(2367, 2367), - Box(2368, 2368), - Box(2369, 2369), - Box(2370, 2370), - Box(2371, 2371), - Box(2372, 2372), - Box(2373, 2373), - Box(2374, 2374), - Box(2375, 2375), - Box(2376, 2376), - Box(2377, 2377), - Box(2378, 2378), - Box(2379, 2379), - Box(2380, 2380), - Box(2381, 2381), - Box(2382, 2382), - Box(2383, 2383), - Box(2384, 2384), - Box(2385, 2385), - Box(2386, 2386), - Box(2387, 2387), - Box(2388, 2388), - Box(2389, 2389), - Box(2390, 2390), - Box(2391, 2391), - Box(2392, 2392), - Box(2393, 2393), - Box(2394, 2394), - Box(2395, 2395), - Box(2396, 2396), - Box(2397, 2397), - Box(2398, 2398), - Box(2399, 2399), - Box(2400, 2400), - Box(2401, 2401), - Box(2402, 2402), - Box(2403, 2403), - Box(2404, 2404), - Box(2405, 2405), - Box(2406, 2406), - Box(2407, 2407), - Box(2408, 2408), - Box(2409, 2409), - Box(2410, 2410), - Box(2411, 2411), - Box(2412, 2412), - Box(2413, 2413), - Box(2414, 2414), - Box(2415, 2415), - Box(2416, 2416), - Box(2417, 2417), - Box(2418, 2418), - Box(2419, 2419), - Box(2420, 2420), - Box(2421, 2421), - Box(2422, 2422), - Box(2423, 2423), - Box(2424, 2424), - Box(2425, 2425), - Box(2426, 2426), - Box(2427, 2427), - Box(2428, 2428), - Box(2429, 2429), - Box(2430, 2430), - Box(2431, 2431), - Box(2432, 2432), - Box(2433, 2433), - Box(2434, 2434), - Box(2435, 2435), - Box(2436, 2436), - Box(2437, 2437), - Box(2438, 2438), - Box(2439, 2439), - Box(2440, 2440), - Box(2441, 2441), - Box(2442, 2442), - Box(2443, 2443), - Box(2444, 2444), - Box(2445, 2445), - Box(2446, 2446), - Box(2447, 2447), - Box(2448, 2448), - Box(2449, 2449), - Box(2450, 2450), - Box(2451, 2451), - Box(2452, 2452), - Box(2453, 2453), - Box(2454, 2454), - Box(2455, 2455), - Box(2456, 2456), - Box(2457, 2457), - Box(2458, 2458), - Box(2459, 2459), - Box(2460, 2460), - Box(2461, 2461), - Box(2462, 2462), - Box(2463, 2463), - Box(2464, 2464), - Box(2465, 2465), - Box(2466, 2466), - Box(2467, 2467), - Box(2468, 2468), - Box(2469, 2469), - Box(2470, 2470), - Box(2471, 2471), - Box(2472, 2472), - Box(2473, 2473), - Box(2474, 2474), - Box(2475, 2475), - Box(2476, 2476), - Box(2477, 2477), - Box(2478, 2478), - Box(2479, 2479), - Box(2480, 2480), - Box(2481, 2481), - Box(2482, 2482), - Box(2483, 2483), - Box(2484, 2484), - Box(2485, 2485), - Box(2486, 2486), - Box(2487, 2487), - Box(2488, 2488), - Box(2489, 2489), - Box(2490, 2490), - Box(2491, 2491), - Box(2492, 2492), - Box(2493, 2493), - Box(2494, 2494), - Box(2495, 2495), - Box(2496, 2496), - Box(2497, 2497), - Box(2498, 2498), - Box(2499, 2499), - Box(2500, 2500), - Box(2501, 2501), - Box(2502, 2502), - Box(2503, 2503), - Box(2504, 2504), - Box(2505, 2505), - Box(2506, 2506), - Box(2507, 2507), - Box(2508, 2508), - Box(2509, 2509), - Box(2510, 2510), - Box(2511, 2511), - Box(2512, 2512), - Box(2513, 2513), - Box(2514, 2514), - Box(2515, 2515), - Box(2516, 2516), - Box(2517, 2517), - Box(2518, 2518), - Box(2519, 2519), - Box(2520, 2520), - Box(2521, 2521), - Box(2522, 2522), - Box(2523, 2523), - Box(2524, 2524), - Box(2525, 2525), - Box(2526, 2526), - Box(2527, 2527), - Box(2528, 2528), - Box(2529, 2529), - Box(2530, 2530), - Box(2531, 2531), - Box(2532, 2532), - Box(2533, 2533), - Box(2534, 2534), - Box(2535, 2535), - Box(2536, 2536), - Box(2537, 2537), - Box(2538, 2538), - Box(2539, 2539), - Box(2540, 2540), - Box(2541, 2541), - Box(2542, 2542), - Box(2543, 2543), - Box(2544, 2544), - Box(2545, 2545), - Box(2546, 2546), - Box(2547, 2547), - Box(2548, 2548), - Box(2549, 2549), - Box(2550, 2550), - Box(2551, 2551), - Box(2552, 2552), - Box(2553, 2553), - Box(2554, 2554), - Box(2555, 2555), - Box(2556, 2556), - Box(2557, 2557), - Box(2558, 2558), - Box(2559, 2559), - Box(2560, 2560), - Box(2561, 2561), - Box(2562, 2562), - Box(2563, 2563), - Box(2564, 2564), - Box(2565, 2565), - Box(2566, 2566), - Box(2567, 2567), - Box(2568, 2568), - Box(2569, 2569), - Box(2570, 2570), - Box(2571, 2571), - Box(2572, 2572), - Box(2573, 2573), - Box(2574, 2574), - Box(2575, 2575), - Box(2576, 2576), - Box(2577, 2577), - Box(2578, 2578), - Box(2579, 2579), - Box(2580, 2580), - Box(2581, 2581), - Box(2582, 2582), - Box(2583, 2583), - Box(2584, 2584), - Box(2585, 2585), - Box(2586, 2586), - Box(2587, 2587), - Box(2588, 2588), - Box(2589, 2589), - Box(2590, 2590), - Box(2591, 2591), - Box(2592, 2592), - Box(2593, 2593), - Box(2594, 2594), - Box(2595, 2595), - Box(2596, 2596), - Box(2597, 2597), - Box(2598, 2598), - Box(2599, 2599), - Box(2600, 2600), - Box(2601, 2601), - Box(2602, 2602), - Box(2603, 2603), - Box(2604, 2604), - Box(2605, 2605), - Box(2606, 2606), - Box(2607, 2607), - Box(2608, 2608), - Box(2609, 2609), - Box(2610, 2610), - Box(2611, 2611), - Box(2612, 2612), - Box(2613, 2613), - Box(2614, 2614), - Box(2615, 2615), - Box(2616, 2616), - Box(2617, 2617), - Box(2618, 2618), - Box(2619, 2619), - Box(2620, 2620), - Box(2621, 2621), - Box(2622, 2622), - Box(2623, 2623), - Box(2624, 2624), - Box(2625, 2625), - Box(2626, 2626), - Box(2627, 2627), - Box(2628, 2628), - Box(2629, 2629), - Box(2630, 2630), - Box(2631, 2631), - Box(2632, 2632), - Box(2633, 2633), - Box(2634, 2634), - Box(2635, 2635), - Box(2636, 2636), - Box(2637, 2637), - Box(2638, 2638), - Box(2639, 2639), - Box(2640, 2640), - Box(2641, 2641), - Box(2642, 2642), - Box(2643, 2643), - Box(2644, 2644), - Box(2645, 2645), - Box(2646, 2646), - Box(2647, 2647), - Box(2648, 2648), - Box(2649, 2649), - Box(2650, 2650), - Box(2651, 2651), - Box(2652, 2652), - Box(2653, 2653), - Box(2654, 2654), - Box(2655, 2655), - Box(2656, 2656), - Box(2657, 2657), - Box(2658, 2658), - Box(2659, 2659), - Box(2660, 2660), - Box(2661, 2661), - Box(2662, 2662), - Box(2663, 2663), - Box(2664, 2664), - Box(2665, 2665), - Box(2666, 2666), - Box(2667, 2667), - Box(2668, 2668), - Box(2669, 2669), - Box(2670, 2670), - Box(2671, 2671), - Box(2672, 2672), - Box(2673, 2673), - Box(2674, 2674), - Box(2675, 2675), - Box(2676, 2676), - Box(2677, 2677), - Box(2678, 2678), - Box(2679, 2679), - Box(2680, 2680), - Box(2681, 2681), - Box(2682, 2682), - Box(2683, 2683), - Box(2684, 2684), - Box(2685, 2685), - Box(2686, 2686), - Box(2687, 2687), - Box(2688, 2688), - Box(2689, 2689), - Box(2690, 2690), - Box(2691, 2691), - Box(2692, 2692), - Box(2693, 2693), - Box(2694, 2694), - Box(2695, 2695), - Box(2696, 2696), - Box(2697, 2697), - Box(2698, 2698), - Box(2699, 2699), - Box(2700, 2700), - Box(2701, 2701), - Box(2702, 2702), - Box(2703, 2703), - Box(2704, 2704), - Box(2705, 2705), - Box(2706, 2706), - Box(2707, 2707), - Box(2708, 2708), - Box(2709, 2709), - Box(2710, 2710), - Box(2711, 2711), - Box(2712, 2712), - Box(2713, 2713), - Box(2714, 2714), - Box(2715, 2715), - Box(2716, 2716), - Box(2717, 2717), - Box(2718, 2718), - Box(2719, 2719), - Box(2720, 2720), - Box(2721, 2721), - Box(2722, 2722), - Box(2723, 2723), - Box(2724, 2724), - Box(2725, 2725), - Box(2726, 2726), - Box(2727, 2727), - Box(2728, 2728), - Box(2729, 2729), - Box(2730, 2730), - Box(2731, 2731), - Box(2732, 2732), - Box(2733, 2733), - Box(2734, 2734), - Box(2735, 2735), - Box(2736, 2736), - Box(2737, 2737), - Box(2738, 2738), - Box(2739, 2739), - Box(2740, 2740), - Box(2741, 2741), - Box(2742, 2742), - Box(2743, 2743), - Box(2744, 2744), - Box(2745, 2745), - Box(2746, 2746), - Box(2747, 2747), - Box(2748, 2748), - Box(2749, 2749), - Box(2750, 2750), - Box(2751, 2751), - Box(2752, 2752), - Box(2753, 2753), - Box(2754, 2754), - Box(2755, 2755), - Box(2756, 2756), - Box(2757, 2757), - Box(2758, 2758), - Box(2759, 2759), - Box(2760, 2760), - Box(2761, 2761), - Box(2762, 2762), - Box(2763, 2763), - Box(2764, 2764), - Box(2765, 2765), - Box(2766, 2766), - Box(2767, 2767), - Box(2768, 2768), - Box(2769, 2769), - Box(2770, 2770), - Box(2771, 2771), - Box(2772, 2772), - Box(2773, 2773), - Box(2774, 2774), - Box(2775, 2775), - Box(2776, 2776), - Box(2777, 2777), - Box(2778, 2778), - Box(2779, 2779), - Box(2780, 2780), - Box(2781, 2781), - Box(2782, 2782), - Box(2783, 2783), - Box(2784, 2784), - Box(2785, 2785), - Box(2786, 2786), - Box(2787, 2787), - Box(2788, 2788), - Box(2789, 2789), - Box(2790, 2790), - Box(2791, 2791), - Box(2792, 2792), - Box(2793, 2793), - Box(2794, 2794), - Box(2795, 2795), - Box(2796, 2796), - Box(2797, 2797), - Box(2798, 2798), - Box(2799, 2799), - Box(2800, 2800), - Box(2801, 2801), - Box(2802, 2802), - Box(2803, 2803), - Box(2804, 2804), - Box(2805, 2805), - Box(2806, 2806), - Box(2807, 2807), - Box(2808, 2808), - Box(2809, 2809), - Box(2810, 2810), - Box(2811, 2811), - Box(2812, 2812), - Box(2813, 2813), - Box(2814, 2814), - Box(2815, 2815), - Box(2816, 2816), - Box(2817, 2817), - Box(2818, 2818), - Box(2819, 2819), - Box(2820, 2820), - Box(2821, 2821), - Box(2822, 2822), - Box(2823, 2823), - Box(2824, 2824), - Box(2825, 2825), - Box(2826, 2826), - Box(2827, 2827), - Box(2828, 2828), - Box(2829, 2829), - Box(2830, 2830), - Box(2831, 2831), - Box(2832, 2832), - Box(2833, 2833), - Box(2834, 2834), - Box(2835, 2835), - Box(2836, 2836), - Box(2837, 2837), - Box(2838, 2838), - Box(2839, 2839), - Box(2840, 2840), - Box(2841, 2841), - Box(2842, 2842), - Box(2843, 2843), - Box(2844, 2844), - Box(2845, 2845), - Box(2846, 2846), - Box(2847, 2847), - Box(2848, 2848), - Box(2849, 2849), - Box(2850, 2850), - Box(2851, 2851), - Box(2852, 2852), - Box(2853, 2853), - Box(2854, 2854), - Box(2855, 2855), - Box(2856, 2856), - Box(2857, 2857), - Box(2858, 2858), - Box(2859, 2859), - Box(2860, 2860), - Box(2861, 2861), - Box(2862, 2862), - Box(2863, 2863), - Box(2864, 2864), - Box(2865, 2865), - Box(2866, 2866), - Box(2867, 2867), - Box(2868, 2868), - Box(2869, 2869), - Box(2870, 2870), - Box(2871, 2871), - Box(2872, 2872), - Box(2873, 2873), - Box(2874, 2874), - Box(2875, 2875), - Box(2876, 2876), - Box(2877, 2877), - Box(2878, 2878), - Box(2879, 2879), - Box(2880, 2880), - Box(2881, 2881), - Box(2882, 2882), - Box(2883, 2883), - Box(2884, 2884), - Box(2885, 2885), - Box(2886, 2886), - Box(2887, 2887), - Box(2888, 2888), - Box(2889, 2889), - Box(2890, 2890), - Box(2891, 2891), - Box(2892, 2892), - Box(2893, 2893), - Box(2894, 2894), - Box(2895, 2895), - Box(2896, 2896), - Box(2897, 2897), - Box(2898, 2898), - Box(2899, 2899), - Box(2900, 2900), - Box(2901, 2901), - Box(2902, 2902), - Box(2903, 2903), - Box(2904, 2904), - Box(2905, 2905), - Box(2906, 2906), - Box(2907, 2907), - Box(2908, 2908), - Box(2909, 2909), - Box(2910, 2910), - Box(2911, 2911), - Box(2912, 2912), - Box(2913, 2913), - Box(2914, 2914), - Box(2915, 2915), - Box(2916, 2916), - Box(2917, 2917), - Box(2918, 2918), - Box(2919, 2919), - Box(2920, 2920), - Box(2921, 2921), - Box(2922, 2922), - Box(2923, 2923), - Box(2924, 2924), - Box(2925, 2925), - Box(2926, 2926), - Box(2927, 2927), - Box(2928, 2928), - Box(2929, 2929), - Box(2930, 2930), - Box(2931, 2931), - Box(2932, 2932), - Box(2933, 2933), - Box(2934, 2934), - Box(2935, 2935), - Box(2936, 2936), - Box(2937, 2937), - Box(2938, 2938), - Box(2939, 2939), - Box(2940, 2940), - Box(2941, 2941), - Box(2942, 2942), - Box(2943, 2943), - Box(2944, 2944), - Box(2945, 2945), - Box(2946, 2946), - Box(2947, 2947), - Box(2948, 2948), - Box(2949, 2949), - Box(2950, 2950), - Box(2951, 2951), - Box(2952, 2952), - Box(2953, 2953), - Box(2954, 2954), - Box(2955, 2955), - Box(2956, 2956), - Box(2957, 2957), - Box(2958, 2958), - Box(2959, 2959), - Box(2960, 2960), - Box(2961, 2961), - Box(2962, 2962), - Box(2963, 2963), - Box(2964, 2964), - Box(2965, 2965), - Box(2966, 2966), - Box(2967, 2967), - Box(2968, 2968), - Box(2969, 2969), - Box(2970, 2970), - Box(2971, 2971), - Box(2972, 2972), - Box(2973, 2973), - Box(2974, 2974), - Box(2975, 2975), - Box(2976, 2976), - Box(2977, 2977), - Box(2978, 2978), - Box(2979, 2979), - Box(2980, 2980), - Box(2981, 2981), - Box(2982, 2982), - Box(2983, 2983), - Box(2984, 2984), - Box(2985, 2985), - Box(2986, 2986), - Box(2987, 2987), - Box(2988, 2988), - Box(2989, 2989), - Box(2990, 2990), - Box(2991, 2991), - Box(2992, 2992), - Box(2993, 2993), - Box(2994, 2994), - Box(2995, 2995), - Box(2996, 2996), - Box(2997, 2997), - Box(2998, 2998), - Box(2999, 2999), - Box(3000, 3000), - Box(3001, 3001), - Box(3002, 3002), - Box(3003, 3003), - Box(3004, 3004), - Box(3005, 3005), - Box(3006, 3006), - Box(3007, 3007), - Box(3008, 3008), - Box(3009, 3009), - Box(3010, 3010), - Box(3011, 3011), - Box(3012, 3012), - Box(3013, 3013), - Box(3014, 3014), - Box(3015, 3015), - Box(3016, 3016), - Box(3017, 3017), - Box(3018, 3018), - Box(3019, 3019), - Box(3020, 3020), - Box(3021, 3021), - Box(3022, 3022), - Box(3023, 3023), - Box(3024, 3024), - Box(3025, 3025), - Box(3026, 3026), - Box(3027, 3027), - Box(3028, 3028), - Box(3029, 3029), - Box(3030, 3030), - Box(3031, 3031), - Box(3032, 3032), - Box(3033, 3033), - Box(3034, 3034), - Box(3035, 3035), - Box(3036, 3036), - Box(3037, 3037), - Box(3038, 3038), - Box(3039, 3039), - Box(3040, 3040), - Box(3041, 3041), - Box(3042, 3042), - Box(3043, 3043), - Box(3044, 3044), - Box(3045, 3045), - Box(3046, 3046), - Box(3047, 3047), - Box(3048, 3048), - Box(3049, 3049), - Box(3050, 3050), - Box(3051, 3051), - Box(3052, 3052), - Box(3053, 3053), - Box(3054, 3054), - Box(3055, 3055), - Box(3056, 3056), - Box(3057, 3057), - Box(3058, 3058), - Box(3059, 3059), - Box(3060, 3060), - Box(3061, 3061), - Box(3062, 3062), - Box(3063, 3063), - Box(3064, 3064), - Box(3065, 3065), - Box(3066, 3066), - Box(3067, 3067), - Box(3068, 3068), - Box(3069, 3069), - Box(3070, 3070), - Box(3071, 3071), - Box(3072, 3072), - Box(3073, 3073), - Box(3074, 3074), - Box(3075, 3075), - Box(3076, 3076), - Box(3077, 3077), - Box(3078, 3078), - Box(3079, 3079), - Box(3080, 3080), - Box(3081, 3081), - Box(3082, 3082), - Box(3083, 3083), - Box(3084, 3084), - Box(3085, 3085), - Box(3086, 3086), - Box(3087, 3087), - Box(3088, 3088), - Box(3089, 3089), - Box(3090, 3090), - Box(3091, 3091), - Box(3092, 3092), - Box(3093, 3093), - Box(3094, 3094), - Box(3095, 3095), - Box(3096, 3096), - Box(3097, 3097), - Box(3098, 3098), - Box(3099, 3099), - Box(3100, 3100), - Box(3101, 3101), - Box(3102, 3102), - Box(3103, 3103), - Box(3104, 3104), - Box(3105, 3105), - Box(3106, 3106), - Box(3107, 3107), - Box(3108, 3108), - Box(3109, 3109), - Box(3110, 3110), - Box(3111, 3111), - Box(3112, 3112), - Box(3113, 3113), - Box(3114, 3114), - Box(3115, 3115), - Box(3116, 3116), - Box(3117, 3117), - Box(3118, 3118), - Box(3119, 3119), - Box(3120, 3120), - Box(3121, 3121), - Box(3122, 3122), - Box(3123, 3123), - Box(3124, 3124), - Box(3125, 3125), - Box(3126, 3126), - Box(3127, 3127), - Box(3128, 3128), - Box(3129, 3129), - Box(3130, 3130), - Box(3131, 3131), - Box(3132, 3132), - Box(3133, 3133), - Box(3134, 3134), - Box(3135, 3135), - Box(3136, 3136), - Box(3137, 3137), - Box(3138, 3138), - Box(3139, 3139), - Box(3140, 3140), - Box(3141, 3141), - Box(3142, 3142), - Box(3143, 3143), - Box(3144, 3144), - Box(3145, 3145), - Box(3146, 3146), - Box(3147, 3147), - Box(3148, 3148), - Box(3149, 3149), - Box(3150, 3150), - Box(3151, 3151), - Box(3152, 3152), - Box(3153, 3153), - Box(3154, 3154), - Box(3155, 3155), - Box(3156, 3156), - Box(3157, 3157), - Box(3158, 3158), - Box(3159, 3159), - Box(3160, 3160), - Box(3161, 3161), - Box(3162, 3162), - Box(3163, 3163), - Box(3164, 3164), - Box(3165, 3165), - Box(3166, 3166), - Box(3167, 3167), - Box(3168, 3168), - Box(3169, 3169), - Box(3170, 3170), - Box(3171, 3171), - Box(3172, 3172), - Box(3173, 3173), - Box(3174, 3174), - Box(3175, 3175), - Box(3176, 3176), - Box(3177, 3177), - Box(3178, 3178), - Box(3179, 3179), - Box(3180, 3180), - Box(3181, 3181), - Box(3182, 3182), - Box(3183, 3183), - Box(3184, 3184), - Box(3185, 3185), - Box(3186, 3186), - Box(3187, 3187), - Box(3188, 3188), - Box(3189, 3189), - Box(3190, 3190), - Box(3191, 3191), - Box(3192, 3192), - Box(3193, 3193), - Box(3194, 3194), - Box(3195, 3195), - Box(3196, 3196), - Box(3197, 3197), - Box(3198, 3198), - Box(3199, 3199), - Box(3200, 3200), - Box(3201, 3201), - Box(3202, 3202), - Box(3203, 3203), - Box(3204, 3204), - Box(3205, 3205), - Box(3206, 3206), - Box(3207, 3207), - Box(3208, 3208), - Box(3209, 3209), - Box(3210, 3210), - Box(3211, 3211), - Box(3212, 3212), - Box(3213, 3213), - Box(3214, 3214), - Box(3215, 3215), - Box(3216, 3216), - Box(3217, 3217), - Box(3218, 3218), - Box(3219, 3219), - Box(3220, 3220), - Box(3221, 3221), - Box(3222, 3222), - Box(3223, 3223), - Box(3224, 3224), - Box(3225, 3225), - Box(3226, 3226), - Box(3227, 3227), - Box(3228, 3228), - Box(3229, 3229), - Box(3230, 3230), - Box(3231, 3231), - Box(3232, 3232), - Box(3233, 3233), - Box(3234, 3234), - Box(3235, 3235), - Box(3236, 3236), - Box(3237, 3237), - Box(3238, 3238), - Box(3239, 3239), - Box(3240, 3240), - Box(3241, 3241), - Box(3242, 3242), - Box(3243, 3243), - Box(3244, 3244), - Box(3245, 3245), - Box(3246, 3246), - Box(3247, 3247), - Box(3248, 3248), - Box(3249, 3249), - Box(3250, 3250), - Box(3251, 3251), - Box(3252, 3252), - Box(3253, 3253), - Box(3254, 3254), - Box(3255, 3255), - Box(3256, 3256), - Box(3257, 3257), - Box(3258, 3258), - Box(3259, 3259), - Box(3260, 3260), - Box(3261, 3261), - Box(3262, 3262), - Box(3263, 3263), - Box(3264, 3264), - Box(3265, 3265), - Box(3266, 3266), - Box(3267, 3267), - Box(3268, 3268), - Box(3269, 3269), - Box(3270, 3270), - Box(3271, 3271), - Box(3272, 3272), - Box(3273, 3273), - Box(3274, 3274), - Box(3275, 3275), - Box(3276, 3276), - Box(3277, 3277), - Box(3278, 3278), - Box(3279, 3279), - Box(3280, 3280), - Box(3281, 3281), - Box(3282, 3282), - Box(3283, 3283), - Box(3284, 3284), - Box(3285, 3285), - Box(3286, 3286), - Box(3287, 3287), - Box(3288, 3288), - Box(3289, 3289), - Box(3290, 3290), - Box(3291, 3291), - Box(3292, 3292), - Box(3293, 3293), - Box(3294, 3294), - Box(3295, 3295), - Box(3296, 3296), - Box(3297, 3297), - Box(3298, 3298), - Box(3299, 3299), - Box(3300, 3300), - Box(3301, 3301), - Box(3302, 3302), - Box(3303, 3303), - Box(3304, 3304), - Box(3305, 3305), - Box(3306, 3306), - Box(3307, 3307), - Box(3308, 3308), - Box(3309, 3309), - Box(3310, 3310), - Box(3311, 3311), - Box(3312, 3312), - Box(3313, 3313), - Box(3314, 3314), - Box(3315, 3315), - Box(3316, 3316), - Box(3317, 3317), - Box(3318, 3318), - Box(3319, 3319), - Box(3320, 3320), - Box(3321, 3321), - Box(3322, 3322), - Box(3323, 3323), - Box(3324, 3324), - Box(3325, 3325), - Box(3326, 3326), - Box(3327, 3327), - Box(3328, 3328), - Box(3329, 3329), - Box(3330, 3330), - Box(3331, 3331), - Box(3332, 3332), - Box(3333, 3333), - Box(3334, 3334), - Box(3335, 3335), - Box(3336, 3336), - Box(3337, 3337), - Box(3338, 3338), - Box(3339, 3339), - Box(3340, 3340), - Box(3341, 3341), - Box(3342, 3342), - Box(3343, 3343), - Box(3344, 3344), - Box(3345, 3345), - Box(3346, 3346), - Box(3347, 3347), - Box(3348, 3348), - Box(3349, 3349), - Box(3350, 3350), - Box(3351, 3351), - Box(3352, 3352), - Box(3353, 3353), - Box(3354, 3354), - Box(3355, 3355), - Box(3356, 3356), - Box(3357, 3357), - Box(3358, 3358), - Box(3359, 3359), - Box(3360, 3360), - Box(3361, 3361), - Box(3362, 3362), - Box(3363, 3363), - Box(3364, 3364), - Box(3365, 3365), - Box(3366, 3366), - Box(3367, 3367), - Box(3368, 3368), - Box(3369, 3369), - Box(3370, 3370), - Box(3371, 3371), - Box(3372, 3372), - Box(3373, 3373), - Box(3374, 3374), - Box(3375, 3375), - Box(3376, 3376), - Box(3377, 3377), - Box(3378, 3378), - Box(3379, 3379), - Box(3380, 3380), - Box(3381, 3381), - Box(3382, 3382), - Box(3383, 3383), - Box(3384, 3384), - Box(3385, 3385), - Box(3386, 3386), - Box(3387, 3387), - Box(3388, 3388), - Box(3389, 3389), - Box(3390, 3390), - Box(3391, 3391), - Box(3392, 3392), - Box(3393, 3393), - Box(3394, 3394), - Box(3395, 3395), - Box(3396, 3396), - Box(3397, 3397), - Box(3398, 3398), - Box(3399, 3399), - Box(3400, 3400), - Box(3401, 3401), - Box(3402, 3402), - Box(3403, 3403), - Box(3404, 3404), - Box(3405, 3405), - Box(3406, 3406), - Box(3407, 3407), - Box(3408, 3408), - Box(3409, 3409), - Box(3410, 3410), - Box(3411, 3411), - Box(3412, 3412), - Box(3413, 3413), - Box(3414, 3414), - Box(3415, 3415), - Box(3416, 3416), - Box(3417, 3417), - Box(3418, 3418), - Box(3419, 3419), - Box(3420, 3420), - Box(3421, 3421), - Box(3422, 3422), - Box(3423, 3423), - Box(3424, 3424), - Box(3425, 3425), - Box(3426, 3426), - Box(3427, 3427), - Box(3428, 3428), - Box(3429, 3429), - Box(3430, 3430), - Box(3431, 3431), - Box(3432, 3432), - Box(3433, 3433), - Box(3434, 3434), - Box(3435, 3435), - Box(3436, 3436), - Box(3437, 3437), - Box(3438, 3438), - Box(3439, 3439), - Box(3440, 3440), - Box(3441, 3441), - Box(3442, 3442), - Box(3443, 3443), - Box(3444, 3444), - Box(3445, 3445), - Box(3446, 3446), - Box(3447, 3447), - Box(3448, 3448), - Box(3449, 3449), - Box(3450, 3450), - Box(3451, 3451), - Box(3452, 3452), - Box(3453, 3453), - Box(3454, 3454), - Box(3455, 3455), - Box(3456, 3456), - Box(3457, 3457), - Box(3458, 3458), - Box(3459, 3459), - Box(3460, 3460), - Box(3461, 3461), - Box(3462, 3462), - Box(3463, 3463), - Box(3464, 3464), - Box(3465, 3465), - Box(3466, 3466), - Box(3467, 3467), - Box(3468, 3468), - Box(3469, 3469), - Box(3470, 3470), - Box(3471, 3471), - Box(3472, 3472), - Box(3473, 3473), - Box(3474, 3474), - Box(3475, 3475), - Box(3476, 3476), - Box(3477, 3477), - Box(3478, 3478), - Box(3479, 3479), - Box(3480, 3480), - Box(3481, 3481), - Box(3482, 3482), - Box(3483, 3483), - Box(3484, 3484), - Box(3485, 3485), - Box(3486, 3486), - Box(3487, 3487), - Box(3488, 3488), - Box(3489, 3489), - Box(3490, 3490), - Box(3491, 3491), - Box(3492, 3492), - Box(3493, 3493), - Box(3494, 3494), - Box(3495, 3495), - Box(3496, 3496), - Box(3497, 3497), - Box(3498, 3498), - Box(3499, 3499), - Box(3500, 3500), - Box(3501, 3501), - Box(3502, 3502), - Box(3503, 3503), - Box(3504, 3504), - Box(3505, 3505), - Box(3506, 3506), - Box(3507, 3507), - Box(3508, 3508), - Box(3509, 3509), - Box(3510, 3510), - Box(3511, 3511), - Box(3512, 3512), - Box(3513, 3513), - Box(3514, 3514), - Box(3515, 3515), - Box(3516, 3516), - Box(3517, 3517), - Box(3518, 3518), - Box(3519, 3519), - Box(3520, 3520), - Box(3521, 3521), - Box(3522, 3522), - Box(3523, 3523), - Box(3524, 3524), - Box(3525, 3525), - Box(3526, 3526), - Box(3527, 3527), - Box(3528, 3528), - Box(3529, 3529), - Box(3530, 3530), - Box(3531, 3531), - Box(3532, 3532), - Box(3533, 3533), - Box(3534, 3534), - Box(3535, 3535), - Box(3536, 3536), - Box(3537, 3537), - Box(3538, 3538), - Box(3539, 3539), - Box(3540, 3540), - Box(3541, 3541), - Box(3542, 3542), - Box(3543, 3543), - Box(3544, 3544), - Box(3545, 3545), - Box(3546, 3546), - Box(3547, 3547), - Box(3548, 3548), - Box(3549, 3549), - Box(3550, 3550), - Box(3551, 3551), - Box(3552, 3552), - Box(3553, 3553), - Box(3554, 3554), - Box(3555, 3555), - Box(3556, 3556), - Box(3557, 3557), - Box(3558, 3558), - Box(3559, 3559), - Box(3560, 3560), - Box(3561, 3561), - Box(3562, 3562), - Box(3563, 3563), - Box(3564, 3564), - Box(3565, 3565), - Box(3566, 3566), - Box(3567, 3567), - Box(3568, 3568), - Box(3569, 3569), - Box(3570, 3570), - Box(3571, 3571), - Box(3572, 3572), - Box(3573, 3573), - Box(3574, 3574), - Box(3575, 3575), - Box(3576, 3576), - Box(3577, 3577), - Box(3578, 3578), - Box(3579, 3579), - Box(3580, 3580), - Box(3581, 3581), - Box(3582, 3582), - Box(3583, 3583), - Box(3584, 3584), - Box(3585, 3585), - Box(3586, 3586), - Box(3587, 3587), - Box(3588, 3588), - Box(3589, 3589), - Box(3590, 3590), - Box(3591, 3591), - Box(3592, 3592), - Box(3593, 3593), - Box(3594, 3594), - Box(3595, 3595), - Box(3596, 3596), - Box(3597, 3597), - Box(3598, 3598), - Box(3599, 3599), - Box(3600, 3600), - Box(3601, 3601), - Box(3602, 3602), - Box(3603, 3603), - Box(3604, 3604), - Box(3605, 3605), - Box(3606, 3606), - Box(3607, 3607), - Box(3608, 3608), - Box(3609, 3609), - Box(3610, 3610), - Box(3611, 3611), - Box(3612, 3612), - Box(3613, 3613), - Box(3614, 3614), - Box(3615, 3615), - Box(3616, 3616), - Box(3617, 3617), - Box(3618, 3618), - Box(3619, 3619), - Box(3620, 3620), - Box(3621, 3621), - Box(3622, 3622), - Box(3623, 3623), - Box(3624, 3624), - Box(3625, 3625), - Box(3626, 3626), - Box(3627, 3627), - Box(3628, 3628), - Box(3629, 3629), - Box(3630, 3630), - Box(3631, 3631), - Box(3632, 3632), - Box(3633, 3633), - Box(3634, 3634), - Box(3635, 3635), - Box(3636, 3636), - Box(3637, 3637), - Box(3638, 3638), - Box(3639, 3639), - Box(3640, 3640), - Box(3641, 3641), - Box(3642, 3642), - Box(3643, 3643), - Box(3644, 3644), - Box(3645, 3645), - Box(3646, 3646), - Box(3647, 3647), - Box(3648, 3648), - Box(3649, 3649), - Box(3650, 3650), - Box(3651, 3651), - Box(3652, 3652), - Box(3653, 3653), - Box(3654, 3654), - Box(3655, 3655), - Box(3656, 3656), - Box(3657, 3657), - Box(3658, 3658), - Box(3659, 3659), - Box(3660, 3660), - Box(3661, 3661), - Box(3662, 3662), - Box(3663, 3663), - Box(3664, 3664), - Box(3665, 3665), - Box(3666, 3666), - Box(3667, 3667), - Box(3668, 3668), - Box(3669, 3669), - Box(3670, 3670), - Box(3671, 3671), - Box(3672, 3672), - Box(3673, 3673), - Box(3674, 3674), - Box(3675, 3675), - Box(3676, 3676), - Box(3677, 3677), - Box(3678, 3678), - Box(3679, 3679), - Box(3680, 3680), - Box(3681, 3681), - Box(3682, 3682), - Box(3683, 3683), - Box(3684, 3684), - Box(3685, 3685), - Box(3686, 3686), - Box(3687, 3687), - Box(3688, 3688), - Box(3689, 3689), - Box(3690, 3690), - Box(3691, 3691), - Box(3692, 3692), - Box(3693, 3693), - Box(3694, 3694), - Box(3695, 3695), - Box(3696, 3696), - Box(3697, 3697), - Box(3698, 3698), - Box(3699, 3699), - Box(3700, 3700), - Box(3701, 3701), - Box(3702, 3702), - Box(3703, 3703), - Box(3704, 3704), - Box(3705, 3705), - Box(3706, 3706), - Box(3707, 3707), - Box(3708, 3708), - Box(3709, 3709), - Box(3710, 3710), - Box(3711, 3711), - Box(3712, 3712), - Box(3713, 3713), - Box(3714, 3714), - Box(3715, 3715), - Box(3716, 3716), - Box(3717, 3717), - Box(3718, 3718), - Box(3719, 3719), - Box(3720, 3720), - Box(3721, 3721), - Box(3722, 3722), - Box(3723, 3723), - Box(3724, 3724), - Box(3725, 3725), - Box(3726, 3726), - Box(3727, 3727), - Box(3728, 3728), - Box(3729, 3729), - Box(3730, 3730), - Box(3731, 3731), - Box(3732, 3732), - Box(3733, 3733), - Box(3734, 3734), - Box(3735, 3735), - Box(3736, 3736), - Box(3737, 3737), - Box(3738, 3738), - Box(3739, 3739), - Box(3740, 3740), - Box(3741, 3741), - Box(3742, 3742), - Box(3743, 3743), - Box(3744, 3744), - Box(3745, 3745), - Box(3746, 3746), - Box(3747, 3747), - Box(3748, 3748), - Box(3749, 3749), - Box(3750, 3750), - Box(3751, 3751), - Box(3752, 3752), - Box(3753, 3753), - Box(3754, 3754), - Box(3755, 3755), - Box(3756, 3756), - Box(3757, 3757), - Box(3758, 3758), - Box(3759, 3759), - Box(3760, 3760), - Box(3761, 3761), - Box(3762, 3762), - Box(3763, 3763), - Box(3764, 3764), - Box(3765, 3765), - Box(3766, 3766), - Box(3767, 3767), - Box(3768, 3768), - Box(3769, 3769), - Box(3770, 3770), - Box(3771, 3771), - Box(3772, 3772), - Box(3773, 3773), - Box(3774, 3774), - Box(3775, 3775), - Box(3776, 3776), - Box(3777, 3777), - Box(3778, 3778), - Box(3779, 3779), - Box(3780, 3780), - Box(3781, 3781), - Box(3782, 3782), - Box(3783, 3783), - Box(3784, 3784), - Box(3785, 3785), - Box(3786, 3786), - Box(3787, 3787), - Box(3788, 3788), - Box(3789, 3789), - Box(3790, 3790), - Box(3791, 3791), - Box(3792, 3792), - Box(3793, 3793), - Box(3794, 3794), - Box(3795, 3795), - Box(3796, 3796), - Box(3797, 3797), - Box(3798, 3798), - Box(3799, 3799), - Box(3800, 3800), - Box(3801, 3801), - Box(3802, 3802), - Box(3803, 3803), - Box(3804, 3804), - Box(3805, 3805), - Box(3806, 3806), - Box(3807, 3807), - Box(3808, 3808), - Box(3809, 3809), - Box(3810, 3810), - Box(3811, 3811), - Box(3812, 3812), - Box(3813, 3813), - Box(3814, 3814), - Box(3815, 3815), - Box(3816, 3816), - Box(3817, 3817), - Box(3818, 3818), - Box(3819, 3819), - Box(3820, 3820), - Box(3821, 3821), - Box(3822, 3822), - Box(3823, 3823), - Box(3824, 3824), - Box(3825, 3825), - Box(3826, 3826), - Box(3827, 3827), - Box(3828, 3828), - Box(3829, 3829), - Box(3830, 3830), - Box(3831, 3831), - Box(3832, 3832), - Box(3833, 3833), - Box(3834, 3834), - Box(3835, 3835), - Box(3836, 3836), - Box(3837, 3837), - Box(3838, 3838), - Box(3839, 3839), - Box(3840, 3840), - Box(3841, 3841), - Box(3842, 3842), - Box(3843, 3843), - Box(3844, 3844), - Box(3845, 3845), - Box(3846, 3846), - Box(3847, 3847), - Box(3848, 3848), - Box(3849, 3849), - Box(3850, 3850), - Box(3851, 3851), - Box(3852, 3852), - Box(3853, 3853), - Box(3854, 3854), - Box(3855, 3855), - Box(3856, 3856), - Box(3857, 3857), - Box(3858, 3858), - Box(3859, 3859), - Box(3860, 3860), - Box(3861, 3861), - Box(3862, 3862), - Box(3863, 3863), - Box(3864, 3864), - Box(3865, 3865), - Box(3866, 3866), - Box(3867, 3867), - Box(3868, 3868), - Box(3869, 3869), - Box(3870, 3870), - Box(3871, 3871), - Box(3872, 3872), - Box(3873, 3873), - Box(3874, 3874), - Box(3875, 3875), - Box(3876, 3876), - Box(3877, 3877), - Box(3878, 3878), - Box(3879, 3879), - Box(3880, 3880), - Box(3881, 3881), - Box(3882, 3882), - Box(3883, 3883), - Box(3884, 3884), - Box(3885, 3885), - Box(3886, 3886), - Box(3887, 3887), - Box(3888, 3888), - Box(3889, 3889), - Box(3890, 3890), - Box(3891, 3891), - Box(3892, 3892), - Box(3893, 3893), - Box(3894, 3894), - Box(3895, 3895), - Box(3896, 3896), - Box(3897, 3897), - Box(3898, 3898), - Box(3899, 3899), - Box(3900, 3900), - Box(3901, 3901), - Box(3902, 3902), - Box(3903, 3903), - Box(3904, 3904), - Box(3905, 3905), - Box(3906, 3906), - Box(3907, 3907), - Box(3908, 3908), - Box(3909, 3909), - Box(3910, 3910), - Box(3911, 3911), - Box(3912, 3912), - Box(3913, 3913), - Box(3914, 3914), - Box(3915, 3915), - Box(3916, 3916), - Box(3917, 3917), - Box(3918, 3918), - Box(3919, 3919), - Box(3920, 3920), - Box(3921, 3921), - Box(3922, 3922), - Box(3923, 3923), - Box(3924, 3924), - Box(3925, 3925), - Box(3926, 3926), - Box(3927, 3927), - Box(3928, 3928), - Box(3929, 3929), - Box(3930, 3930), - Box(3931, 3931), - Box(3932, 3932), - Box(3933, 3933), - Box(3934, 3934), - Box(3935, 3935), - Box(3936, 3936), - Box(3937, 3937), - Box(3938, 3938), - Box(3939, 3939), - Box(3940, 3940), - Box(3941, 3941), - Box(3942, 3942), - Box(3943, 3943), - Box(3944, 3944), - Box(3945, 3945), - Box(3946, 3946), - Box(3947, 3947), - Box(3948, 3948), - Box(3949, 3949), - Box(3950, 3950), - Box(3951, 3951), - Box(3952, 3952), - Box(3953, 3953), - Box(3954, 3954), - Box(3955, 3955), - Box(3956, 3956), - Box(3957, 3957), - Box(3958, 3958), - Box(3959, 3959), - Box(3960, 3960), - Box(3961, 3961), - Box(3962, 3962), - Box(3963, 3963), - Box(3964, 3964), - Box(3965, 3965), - Box(3966, 3966), - Box(3967, 3967), - Box(3968, 3968), - Box(3969, 3969), - Box(3970, 3970), - Box(3971, 3971), - Box(3972, 3972), - Box(3973, 3973), - Box(3974, 3974), - Box(3975, 3975), - Box(3976, 3976), - Box(3977, 3977), - Box(3978, 3978), - Box(3979, 3979), - Box(3980, 3980), - Box(3981, 3981), - Box(3982, 3982), - Box(3983, 3983), - Box(3984, 3984), - Box(3985, 3985), - Box(3986, 3986), - Box(3987, 3987), - Box(3988, 3988), - Box(3989, 3989), - Box(3990, 3990), - Box(3991, 3991), - Box(3992, 3992), - Box(3993, 3993), - Box(3994, 3994), - Box(3995, 3995), - Box(3996, 3996), - Box(3997, 3997), - Box(3998, 3998), - Box(3999, 3999), - Box(4000, 4000), - Box(4001, 4001), - Box(4002, 4002), - Box(4003, 4003), - Box(4004, 4004), - Box(4005, 4005), - Box(4006, 4006), - Box(4007, 4007), - Box(4008, 4008), - Box(4009, 4009), - Box(4010, 4010), - Box(4011, 4011), - Box(4012, 4012), - Box(4013, 4013), - Box(4014, 4014), - Box(4015, 4015), - Box(4016, 4016), - Box(4017, 4017), - Box(4018, 4018), - Box(4019, 4019), - Box(4020, 4020), - Box(4021, 4021), - Box(4022, 4022), - Box(4023, 4023), - Box(4024, 4024), - Box(4025, 4025), - Box(4026, 4026), - Box(4027, 4027), - Box(4028, 4028), - Box(4029, 4029), - Box(4030, 4030), - Box(4031, 4031), - Box(4032, 4032), - Box(4033, 4033), - Box(4034, 4034), - Box(4035, 4035), - Box(4036, 4036), - Box(4037, 4037), - Box(4038, 4038), - Box(4039, 4039), - Box(4040, 4040), - Box(4041, 4041), - Box(4042, 4042), - Box(4043, 4043), - Box(4044, 4044), - Box(4045, 4045), - Box(4046, 4046), - Box(4047, 4047), - Box(4048, 4048), - Box(4049, 4049), - Box(4050, 4050), - Box(4051, 4051), - Box(4052, 4052), - Box(4053, 4053), - Box(4054, 4054), - Box(4055, 4055), - Box(4056, 4056), - Box(4057, 4057), - Box(4058, 4058), - Box(4059, 4059), - Box(4060, 4060), - Box(4061, 4061), - Box(4062, 4062), - Box(4063, 4063), - Box(4064, 4064), - Box(4065, 4065), - Box(4066, 4066), - Box(4067, 4067), - Box(4068, 4068), - Box(4069, 4069), - Box(4070, 4070), - Box(4071, 4071), - Box(4072, 4072), - Box(4073, 4073), - Box(4074, 4074), - Box(4075, 4075), - Box(4076, 4076), - Box(4077, 4077), - Box(4078, 4078), - Box(4079, 4079), - Box(4080, 4080), - Box(4081, 4081), - Box(4082, 4082), - Box(4083, 4083), - Box(4084, 4084), - Box(4085, 4085), - Box(4086, 4086), - Box(4087, 4087), - Box(4088, 4088), - Box(4089, 4089), - Box(4090, 4090), - Box(4091, 4091), - Box(4092, 4092), - Box(4093, 4093), - Box(4094, 4094), - Box(4095, 4095), - Box(4096, 4096), - Box(4097, 4097), - Box(4098, 4098), - Box(4099, 4099), - Box(4100, 4100), - Box(4101, 4101), - Box(4102, 4102), - Box(4103, 4103), - Box(4104, 4104), - Box(4105, 4105), - Box(4106, 4106), - Box(4107, 4107), - Box(4108, 4108), - Box(4109, 4109), - Box(4110, 4110), - Box(4111, 4111), - Box(4112, 4112), - Box(4113, 4113), - Box(4114, 4114), - Box(4115, 4115), - Box(4116, 4116), - Box(4117, 4117), - Box(4118, 4118), - Box(4119, 4119), - Box(4120, 4120), - Box(4121, 4121), - Box(4122, 4122), - Box(4123, 4123), - Box(4124, 4124), - Box(4125, 4125), - Box(4126, 4126), - Box(4127, 4127), - Box(4128, 4128), - Box(4129, 4129), - Box(4130, 4130), - Box(4131, 4131), - Box(4132, 4132), - Box(4133, 4133), - Box(4134, 4134), - Box(4135, 4135), - Box(4136, 4136), - Box(4137, 4137), - Box(4138, 4138), - Box(4139, 4139), - Box(4140, 4140), - Box(4141, 4141), - Box(4142, 4142), - Box(4143, 4143), - Box(4144, 4144), - Box(4145, 4145), - Box(4146, 4146), - Box(4147, 4147), - Box(4148, 4148), - Box(4149, 4149), - Box(4150, 4150), - Box(4151, 4151), - Box(4152, 4152), - Box(4153, 4153), - Box(4154, 4154), - Box(4155, 4155), - Box(4156, 4156), - Box(4157, 4157), - Box(4158, 4158), - Box(4159, 4159), - Box(4160, 4160), - Box(4161, 4161), - Box(4162, 4162), - Box(4163, 4163), - Box(4164, 4164), - Box(4165, 4165), - Box(4166, 4166), - Box(4167, 4167), - Box(4168, 4168), - Box(4169, 4169), - Box(4170, 4170), - Box(4171, 4171), - Box(4172, 4172), - Box(4173, 4173), - Box(4174, 4174), - Box(4175, 4175), - Box(4176, 4176), - Box(4177, 4177), - Box(4178, 4178), - Box(4179, 4179), - Box(4180, 4180), - Box(4181, 4181), - Box(4182, 4182), - Box(4183, 4183), - Box(4184, 4184), - Box(4185, 4185), - Box(4186, 4186), - Box(4187, 4187), - Box(4188, 4188), - Box(4189, 4189), - Box(4190, 4190), - Box(4191, 4191), - Box(4192, 4192), - Box(4193, 4193), - Box(4194, 4194), - Box(4195, 4195), - Box(4196, 4196), - Box(4197, 4197), - Box(4198, 4198), - Box(4199, 4199), - Box(4200, 4200), - Box(4201, 4201), - Box(4202, 4202), - Box(4203, 4203), - Box(4204, 4204), - Box(4205, 4205), - Box(4206, 4206), - Box(4207, 4207), - Box(4208, 4208), - Box(4209, 4209), - Box(4210, 4210), - Box(4211, 4211), - Box(4212, 4212), - Box(4213, 4213), - Box(4214, 4214), - Box(4215, 4215), - Box(4216, 4216), - Box(4217, 4217), - Box(4218, 4218), - Box(4219, 4219), - Box(4220, 4220), - Box(4221, 4221), - Box(4222, 4222), - Box(4223, 4223), - Box(4224, 4224), - Box(4225, 4225), - Box(4226, 4226), - Box(4227, 4227), - Box(4228, 4228), - Box(4229, 4229), - Box(4230, 4230), - Box(4231, 4231), - Box(4232, 4232), - Box(4233, 4233), - Box(4234, 4234), - Box(4235, 4235), - Box(4236, 4236), - Box(4237, 4237), - Box(4238, 4238), - Box(4239, 4239), - Box(4240, 4240), - Box(4241, 4241), - Box(4242, 4242), - Box(4243, 4243), - Box(4244, 4244), - Box(4245, 4245), - Box(4246, 4246), - Box(4247, 4247), - Box(4248, 4248), - Box(4249, 4249), - Box(4250, 4250), - Box(4251, 4251), - Box(4252, 4252), - Box(4253, 4253), - Box(4254, 4254), - Box(4255, 4255), - Box(4256, 4256), - Box(4257, 4257), - Box(4258, 4258), - Box(4259, 4259), - Box(4260, 4260), - Box(4261, 4261), - Box(4262, 4262), - Box(4263, 4263), - Box(4264, 4264), - Box(4265, 4265), - Box(4266, 4266), - Box(4267, 4267), - Box(4268, 4268), - Box(4269, 4269), - Box(4270, 4270), - Box(4271, 4271), - Box(4272, 4272), - Box(4273, 4273), - Box(4274, 4274), - Box(4275, 4275), - Box(4276, 4276), - Box(4277, 4277), - Box(4278, 4278), - Box(4279, 4279), - Box(4280, 4280), - Box(4281, 4281), - Box(4282, 4282), - Box(4283, 4283), - Box(4284, 4284), - Box(4285, 4285), - Box(4286, 4286), - Box(4287, 4287), - Box(4288, 4288), - Box(4289, 4289), - Box(4290, 4290), - Box(4291, 4291), - Box(4292, 4292), - Box(4293, 4293), - Box(4294, 4294), - Box(4295, 4295), - Box(4296, 4296), - Box(4297, 4297), - Box(4298, 4298), - Box(4299, 4299), - Box(4300, 4300), - Box(4301, 4301), - Box(4302, 4302), - Box(4303, 4303), - Box(4304, 4304), - Box(4305, 4305), - Box(4306, 4306), - Box(4307, 4307), - Box(4308, 4308), - Box(4309, 4309), - Box(4310, 4310), - Box(4311, 4311), - Box(4312, 4312), - Box(4313, 4313), - Box(4314, 4314), - Box(4315, 4315), - Box(4316, 4316), - Box(4317, 4317), - Box(4318, 4318), - Box(4319, 4319), - Box(4320, 4320), - Box(4321, 4321), - Box(4322, 4322), - Box(4323, 4323), - Box(4324, 4324), - Box(4325, 4325), - Box(4326, 4326), - Box(4327, 4327), - Box(4328, 4328), - Box(4329, 4329), - Box(4330, 4330), - Box(4331, 4331), - Box(4332, 4332), - Box(4333, 4333), - Box(4334, 4334), - Box(4335, 4335), - Box(4336, 4336), - Box(4337, 4337), - Box(4338, 4338), - Box(4339, 4339), - Box(4340, 4340), - Box(4341, 4341), - Box(4342, 4342), - Box(4343, 4343), - Box(4344, 4344), - Box(4345, 4345), - Box(4346, 4346), - Box(4347, 4347), - Box(4348, 4348), - Box(4349, 4349), - Box(4350, 4350), - Box(4351, 4351), - Box(4352, 4352), - Box(4353, 4353), - Box(4354, 4354), - Box(4355, 4355), - Box(4356, 4356), - Box(4357, 4357), - Box(4358, 4358), - Box(4359, 4359), - Box(4360, 4360), - Box(4361, 4361), - Box(4362, 4362), - Box(4363, 4363), - Box(4364, 4364), - Box(4365, 4365), - Box(4366, 4366), - Box(4367, 4367), - Box(4368, 4368), - Box(4369, 4369), - Box(4370, 4370), - Box(4371, 4371), - Box(4372, 4372), - Box(4373, 4373), - Box(4374, 4374), - Box(4375, 4375), - Box(4376, 4376), - Box(4377, 4377), - Box(4378, 4378), - Box(4379, 4379), - Box(4380, 4380), - Box(4381, 4381), - Box(4382, 4382), - Box(4383, 4383), - Box(4384, 4384), - Box(4385, 4385), - Box(4386, 4386), - Box(4387, 4387), - Box(4388, 4388), - Box(4389, 4389), - Box(4390, 4390), - Box(4391, 4391), - Box(4392, 4392), - Box(4393, 4393), - Box(4394, 4394), - Box(4395, 4395), - Box(4396, 4396), - Box(4397, 4397), - Box(4398, 4398), - Box(4399, 4399), - Box(4400, 4400), - Box(4401, 4401), - Box(4402, 4402), - Box(4403, 4403), - Box(4404, 4404), - Box(4405, 4405), - Box(4406, 4406), - Box(4407, 4407), - Box(4408, 4408), - Box(4409, 4409), - Box(4410, 4410), - Box(4411, 4411), - Box(4412, 4412), - Box(4413, 4413), - Box(4414, 4414), - Box(4415, 4415), - Box(4416, 4416), - Box(4417, 4417), - Box(4418, 4418), - Box(4419, 4419), - Box(4420, 4420), - Box(4421, 4421), - Box(4422, 4422), - Box(4423, 4423), - Box(4424, 4424), - Box(4425, 4425), - Box(4426, 4426), - Box(4427, 4427), - Box(4428, 4428), - Box(4429, 4429), - Box(4430, 4430), - Box(4431, 4431), - Box(4432, 4432), - Box(4433, 4433), - Box(4434, 4434), - Box(4435, 4435), - Box(4436, 4436), - Box(4437, 4437), - Box(4438, 4438), - Box(4439, 4439), - Box(4440, 4440), - Box(4441, 4441), - Box(4442, 4442), - Box(4443, 4443), - Box(4444, 4444), - Box(4445, 4445), - Box(4446, 4446), - Box(4447, 4447), - Box(4448, 4448), - Box(4449, 4449), - Box(4450, 4450), - Box(4451, 4451), - Box(4452, 4452), - Box(4453, 4453), - Box(4454, 4454), - Box(4455, 4455), - Box(4456, 4456), - Box(4457, 4457), - Box(4458, 4458), - Box(4459, 4459), - Box(4460, 4460), - Box(4461, 4461), - Box(4462, 4462), - Box(4463, 4463), - Box(4464, 4464), - Box(4465, 4465), - Box(4466, 4466), - Box(4467, 4467), - Box(4468, 4468), - Box(4469, 4469), - Box(4470, 4470), - Box(4471, 4471), - Box(4472, 4472), - Box(4473, 4473), - Box(4474, 4474), - Box(4475, 4475), - Box(4476, 4476), - Box(4477, 4477), - Box(4478, 4478), - Box(4479, 4479), - Box(4480, 4480), - Box(4481, 4481), - Box(4482, 4482), - Box(4483, 4483), - Box(4484, 4484), - Box(4485, 4485), - Box(4486, 4486), - Box(4487, 4487), - Box(4488, 4488), - Box(4489, 4489), - Box(4490, 4490), - Box(4491, 4491), - Box(4492, 4492), - Box(4493, 4493), - Box(4494, 4494), - Box(4495, 4495), - Box(4496, 4496), - Box(4497, 4497), - Box(4498, 4498), - Box(4499, 4499), - Box(4500, 4500), - Box(4501, 4501), - Box(4502, 4502), - Box(4503, 4503), - Box(4504, 4504), - Box(4505, 4505), - Box(4506, 4506), - Box(4507, 4507), - Box(4508, 4508), - Box(4509, 4509), - Box(4510, 4510), - Box(4511, 4511), - Box(4512, 4512), - Box(4513, 4513), - Box(4514, 4514), - Box(4515, 4515), - Box(4516, 4516), - Box(4517, 4517), - Box(4518, 4518), - Box(4519, 4519), - Box(4520, 4520), - Box(4521, 4521), - Box(4522, 4522), - Box(4523, 4523), - Box(4524, 4524), - Box(4525, 4525), - Box(4526, 4526), - Box(4527, 4527), - Box(4528, 4528), - Box(4529, 4529), - Box(4530, 4530), - Box(4531, 4531), - Box(4532, 4532), - Box(4533, 4533), - Box(4534, 4534), - Box(4535, 4535), - Box(4536, 4536), - Box(4537, 4537), - Box(4538, 4538), - Box(4539, 4539), - Box(4540, 4540), - Box(4541, 4541), - Box(4542, 4542), - Box(4543, 4543), - Box(4544, 4544), - Box(4545, 4545), - Box(4546, 4546), - Box(4547, 4547), - Box(4548, 4548), - Box(4549, 4549), - Box(4550, 4550), - Box(4551, 4551), - Box(4552, 4552), - Box(4553, 4553), - Box(4554, 4554), - Box(4555, 4555), - Box(4556, 4556), - Box(4557, 4557), - Box(4558, 4558), - Box(4559, 4559), - Box(4560, 4560), - Box(4561, 4561), - Box(4562, 4562), - Box(4563, 4563), - Box(4564, 4564), - Box(4565, 4565), - Box(4566, 4566), - Box(4567, 4567), - Box(4568, 4568), - Box(4569, 4569), - Box(4570, 4570), - Box(4571, 4571), - Box(4572, 4572), - Box(4573, 4573), - Box(4574, 4574), - Box(4575, 4575), - Box(4576, 4576), - Box(4577, 4577), - Box(4578, 4578), - Box(4579, 4579), - Box(4580, 4580), - Box(4581, 4581), - Box(4582, 4582), - Box(4583, 4583), - Box(4584, 4584), - Box(4585, 4585), - Box(4586, 4586), - Box(4587, 4587), - Box(4588, 4588), - Box(4589, 4589), - Box(4590, 4590), - Box(4591, 4591), - Box(4592, 4592), - Box(4593, 4593), - Box(4594, 4594), - Box(4595, 4595), - Box(4596, 4596), - Box(4597, 4597), - Box(4598, 4598), - Box(4599, 4599), - Box(4600, 4600), - Box(4601, 4601), - Box(4602, 4602), - Box(4603, 4603), - Box(4604, 4604), - Box(4605, 4605), - Box(4606, 4606), - Box(4607, 4607), - Box(4608, 4608), - Box(4609, 4609), - Box(4610, 4610), - Box(4611, 4611), - Box(4612, 4612), - Box(4613, 4613), - Box(4614, 4614), - Box(4615, 4615), - Box(4616, 4616), - Box(4617, 4617), - Box(4618, 4618), - Box(4619, 4619), - Box(4620, 4620), - Box(4621, 4621), - Box(4622, 4622), - Box(4623, 4623), - Box(4624, 4624), - Box(4625, 4625), - Box(4626, 4626), - Box(4627, 4627), - Box(4628, 4628), - Box(4629, 4629), - Box(4630, 4630), - Box(4631, 4631), - Box(4632, 4632), - Box(4633, 4633), - Box(4634, 4634), - Box(4635, 4635), - Box(4636, 4636), - Box(4637, 4637), - Box(4638, 4638), - Box(4639, 4639), - Box(4640, 4640), - Box(4641, 4641), - Box(4642, 4642), - Box(4643, 4643), - Box(4644, 4644), - Box(4645, 4645), - Box(4646, 4646), - Box(4647, 4647), - Box(4648, 4648), - Box(4649, 4649), - Box(4650, 4650), - Box(4651, 4651), - Box(4652, 4652), - Box(4653, 4653), - Box(4654, 4654), - Box(4655, 4655), - Box(4656, 4656), - Box(4657, 4657), - Box(4658, 4658), - Box(4659, 4659), - Box(4660, 4660), - Box(4661, 4661), - Box(4662, 4662), - Box(4663, 4663), - Box(4664, 4664), - Box(4665, 4665), - Box(4666, 4666), - Box(4667, 4667), - Box(4668, 4668), - Box(4669, 4669), - Box(4670, 4670), - Box(4671, 4671), - Box(4672, 4672), - Box(4673, 4673), - Box(4674, 4674), - Box(4675, 4675), - Box(4676, 4676), - Box(4677, 4677), - Box(4678, 4678), - Box(4679, 4679), - Box(4680, 4680), - Box(4681, 4681), - Box(4682, 4682), - Box(4683, 4683), - Box(4684, 4684), - Box(4685, 4685), - Box(4686, 4686), - Box(4687, 4687), - Box(4688, 4688), - Box(4689, 4689), - Box(4690, 4690), - Box(4691, 4691), - Box(4692, 4692), - Box(4693, 4693), - Box(4694, 4694), - Box(4695, 4695), - Box(4696, 4696), - Box(4697, 4697), - Box(4698, 4698), - Box(4699, 4699), - Box(4700, 4700), - Box(4701, 4701), - Box(4702, 4702), - Box(4703, 4703), - Box(4704, 4704), - Box(4705, 4705), - Box(4706, 4706), - Box(4707, 4707), - Box(4708, 4708), - Box(4709, 4709), - Box(4710, 4710), - Box(4711, 4711), - Box(4712, 4712), - Box(4713, 4713), - Box(4714, 4714), - Box(4715, 4715), - Box(4716, 4716), - Box(4717, 4717), - Box(4718, 4718), - Box(4719, 4719), - Box(4720, 4720), - Box(4721, 4721), - Box(4722, 4722), - Box(4723, 4723), - Box(4724, 4724), - Box(4725, 4725), - Box(4726, 4726), - Box(4727, 4727), - Box(4728, 4728), - Box(4729, 4729), - Box(4730, 4730), - Box(4731, 4731), - Box(4732, 4732), - Box(4733, 4733), - Box(4734, 4734), - Box(4735, 4735), - Box(4736, 4736), - Box(4737, 4737), - Box(4738, 4738), - Box(4739, 4739), - Box(4740, 4740), - Box(4741, 4741), - Box(4742, 4742), - Box(4743, 4743), - Box(4744, 4744), - Box(4745, 4745), - Box(4746, 4746), - Box(4747, 4747), - Box(4748, 4748), - Box(4749, 4749), - Box(4750, 4750), - Box(4751, 4751), - Box(4752, 4752), - Box(4753, 4753), - Box(4754, 4754), - Box(4755, 4755), - Box(4756, 4756), - Box(4757, 4757), - Box(4758, 4758), - Box(4759, 4759), - Box(4760, 4760), - Box(4761, 4761), - Box(4762, 4762), - Box(4763, 4763), - Box(4764, 4764), - Box(4765, 4765), - Box(4766, 4766), - Box(4767, 4767), - Box(4768, 4768), - Box(4769, 4769), - Box(4770, 4770), - Box(4771, 4771), - Box(4772, 4772), - Box(4773, 4773), - Box(4774, 4774), - Box(4775, 4775), - Box(4776, 4776), - Box(4777, 4777), - Box(4778, 4778), - Box(4779, 4779), - Box(4780, 4780), - Box(4781, 4781), - Box(4782, 4782), - Box(4783, 4783), - Box(4784, 4784), - Box(4785, 4785), - Box(4786, 4786), - Box(4787, 4787), - Box(4788, 4788), - Box(4789, 4789), - Box(4790, 4790), - Box(4791, 4791), - Box(4792, 4792), - Box(4793, 4793), - Box(4794, 4794), - Box(4795, 4795), - Box(4796, 4796), - Box(4797, 4797), - Box(4798, 4798), - Box(4799, 4799), - Box(4800, 4800), - Box(4801, 4801), - Box(4802, 4802), - Box(4803, 4803), - Box(4804, 4804), - Box(4805, 4805), - Box(4806, 4806), - Box(4807, 4807), - Box(4808, 4808), - Box(4809, 4809), - Box(4810, 4810), - Box(4811, 4811), - Box(4812, 4812), - Box(4813, 4813), - Box(4814, 4814), - Box(4815, 4815), - Box(4816, 4816), - Box(4817, 4817), - Box(4818, 4818), - Box(4819, 4819), - Box(4820, 4820), - Box(4821, 4821), - Box(4822, 4822), - Box(4823, 4823), - Box(4824, 4824), - Box(4825, 4825), - Box(4826, 4826), - Box(4827, 4827), - Box(4828, 4828), - Box(4829, 4829), - Box(4830, 4830), - Box(4831, 4831), - Box(4832, 4832), - Box(4833, 4833), - Box(4834, 4834), - Box(4835, 4835), - Box(4836, 4836), - Box(4837, 4837), - Box(4838, 4838), - Box(4839, 4839), - Box(4840, 4840), - Box(4841, 4841), - Box(4842, 4842), - Box(4843, 4843), - Box(4844, 4844), - Box(4845, 4845), - Box(4846, 4846), - Box(4847, 4847), - Box(4848, 4848), - Box(4849, 4849), - Box(4850, 4850), - Box(4851, 4851), - Box(4852, 4852), - Box(4853, 4853), - Box(4854, 4854), - Box(4855, 4855), - Box(4856, 4856), - Box(4857, 4857), - Box(4858, 4858), - Box(4859, 4859), - Box(4860, 4860), - Box(4861, 4861), - Box(4862, 4862), - Box(4863, 4863), - Box(4864, 4864), - Box(4865, 4865), - Box(4866, 4866), - Box(4867, 4867), - Box(4868, 4868), - Box(4869, 4869), - Box(4870, 4870), - Box(4871, 4871), - Box(4872, 4872), - Box(4873, 4873), - Box(4874, 4874), - Box(4875, 4875), - Box(4876, 4876), - Box(4877, 4877), - Box(4878, 4878), - Box(4879, 4879), - Box(4880, 4880), - Box(4881, 4881), - Box(4882, 4882), - Box(4883, 4883), - Box(4884, 4884), - Box(4885, 4885), - Box(4886, 4886), - Box(4887, 4887), - Box(4888, 4888), - Box(4889, 4889), - Box(4890, 4890), - Box(4891, 4891), - Box(4892, 4892), - Box(4893, 4893), - Box(4894, 4894), - Box(4895, 4895), - Box(4896, 4896), - Box(4897, 4897), - Box(4898, 4898), - Box(4899, 4899), - Box(4900, 4900), - Box(4901, 4901), - Box(4902, 4902), - Box(4903, 4903), - Box(4904, 4904), - Box(4905, 4905), - Box(4906, 4906), - Box(4907, 4907), - Box(4908, 4908), - Box(4909, 4909), - Box(4910, 4910), - Box(4911, 4911), - Box(4912, 4912), - Box(4913, 4913), - Box(4914, 4914), - Box(4915, 4915), - Box(4916, 4916), - Box(4917, 4917), - Box(4918, 4918), - Box(4919, 4919), - Box(4920, 4920), - Box(4921, 4921), - Box(4922, 4922), - Box(4923, 4923), - Box(4924, 4924), - Box(4925, 4925), - Box(4926, 4926), - Box(4927, 4927), - Box(4928, 4928), - Box(4929, 4929), - Box(4930, 4930), - Box(4931, 4931), - Box(4932, 4932), - Box(4933, 4933), - Box(4934, 4934), - Box(4935, 4935), - Box(4936, 4936), - Box(4937, 4937), - Box(4938, 4938), - Box(4939, 4939), - Box(4940, 4940), - Box(4941, 4941), - Box(4942, 4942), - Box(4943, 4943), - Box(4944, 4944), - Box(4945, 4945), - Box(4946, 4946), - Box(4947, 4947), - Box(4948, 4948), - Box(4949, 4949), - Box(4950, 4950), - Box(4951, 4951), - Box(4952, 4952), - Box(4953, 4953), - Box(4954, 4954), - Box(4955, 4955), - Box(4956, 4956), - Box(4957, 4957), - Box(4958, 4958), - Box(4959, 4959), - Box(4960, 4960), - Box(4961, 4961), - Box(4962, 4962), - Box(4963, 4963), - Box(4964, 4964), - Box(4965, 4965), - Box(4966, 4966), - Box(4967, 4967), - Box(4968, 4968), - Box(4969, 4969), - Box(4970, 4970), - Box(4971, 4971), - Box(4972, 4972), - Box(4973, 4973), - Box(4974, 4974), - Box(4975, 4975), - Box(4976, 4976), - Box(4977, 4977), - Box(4978, 4978), - Box(4979, 4979), - Box(4980, 4980), - Box(4981, 4981), - Box(4982, 4982), - Box(4983, 4983), - Box(4984, 4984), - Box(4985, 4985), - Box(4986, 4986), - Box(4987, 4987), - Box(4988, 4988), - Box(4989, 4989), - Box(4990, 4990), - Box(4991, 4991), - Box(4992, 4992), - Box(4993, 4993), - Box(4994, 4994), - Box(4995, 4995), - Box(4996, 4996), - Box(4997, 4997), - Box(4998, 4998), - Box(4999, 4999), - Box(5000, 5000), - Box(5001, 5001), - Box(5002, 5002), - Box(5003, 5003), - Box(5004, 5004), - Box(5005, 5005), - Box(5006, 5006), - Box(5007, 5007), - Box(5008, 5008), - Box(5009, 5009), - Box(5010, 5010), - Box(5011, 5011), - Box(5012, 5012), - Box(5013, 5013), - Box(5014, 5014), - Box(5015, 5015), - Box(5016, 5016), - Box(5017, 5017), - Box(5018, 5018), - Box(5019, 5019), - Box(5020, 5020), - Box(5021, 5021), - Box(5022, 5022), - Box(5023, 5023), - Box(5024, 5024), - Box(5025, 5025), - Box(5026, 5026), - Box(5027, 5027), - Box(5028, 5028), - Box(5029, 5029), - Box(5030, 5030), - Box(5031, 5031), - Box(5032, 5032), - Box(5033, 5033), - Box(5034, 5034), - Box(5035, 5035), - Box(5036, 5036), - Box(5037, 5037), - Box(5038, 5038), - Box(5039, 5039), - Box(5040, 5040), - Box(5041, 5041), - Box(5042, 5042), - Box(5043, 5043), - Box(5044, 5044), - Box(5045, 5045), - Box(5046, 5046), - Box(5047, 5047), - Box(5048, 5048), - Box(5049, 5049), - Box(5050, 5050), - Box(5051, 5051), - Box(5052, 5052), - Box(5053, 5053), - Box(5054, 5054), - Box(5055, 5055), - Box(5056, 5056), - Box(5057, 5057), - Box(5058, 5058), - Box(5059, 5059), - Box(5060, 5060), - Box(5061, 5061), - Box(5062, 5062), - Box(5063, 5063), - Box(5064, 5064), - Box(5065, 5065), - Box(5066, 5066), - Box(5067, 5067), - Box(5068, 5068), - Box(5069, 5069), - Box(5070, 5070), - Box(5071, 5071), - Box(5072, 5072), - Box(5073, 5073), - Box(5074, 5074), - Box(5075, 5075), - Box(5076, 5076), - Box(5077, 5077), - Box(5078, 5078), - Box(5079, 5079), - Box(5080, 5080), - Box(5081, 5081), - Box(5082, 5082), - Box(5083, 5083), - Box(5084, 5084), - Box(5085, 5085), - Box(5086, 5086), - Box(5087, 5087), - Box(5088, 5088), - Box(5089, 5089), - Box(5090, 5090), - Box(5091, 5091), - Box(5092, 5092), - Box(5093, 5093), - Box(5094, 5094), - Box(5095, 5095), - Box(5096, 5096), - Box(5097, 5097), - Box(5098, 5098), - Box(5099, 5099), - Box(5100, 5100), - Box(5101, 5101), - Box(5102, 5102), - Box(5103, 5103), - Box(5104, 5104), - Box(5105, 5105), - Box(5106, 5106), - Box(5107, 5107), - Box(5108, 5108), - Box(5109, 5109), - Box(5110, 5110), - Box(5111, 5111), - Box(5112, 5112), - Box(5113, 5113), - Box(5114, 5114), - Box(5115, 5115), - Box(5116, 5116), - Box(5117, 5117), - Box(5118, 5118), - Box(5119, 5119), - Box(5120, 5120), - Box(5121, 5121), - Box(5122, 5122), - Box(5123, 5123), - Box(5124, 5124), - Box(5125, 5125), - Box(5126, 5126), - Box(5127, 5127), - Box(5128, 5128), - Box(5129, 5129), - Box(5130, 5130), - Box(5131, 5131), - Box(5132, 5132), - Box(5133, 5133), - Box(5134, 5134), - Box(5135, 5135), - Box(5136, 5136), - Box(5137, 5137), - Box(5138, 5138), - Box(5139, 5139), - Box(5140, 5140), - Box(5141, 5141), - Box(5142, 5142), - Box(5143, 5143), - Box(5144, 5144), - Box(5145, 5145), - Box(5146, 5146), - Box(5147, 5147), - Box(5148, 5148), - Box(5149, 5149), - Box(5150, 5150), - Box(5151, 5151), - Box(5152, 5152), - Box(5153, 5153), - Box(5154, 5154), - Box(5155, 5155), - Box(5156, 5156), - Box(5157, 5157), - Box(5158, 5158), - Box(5159, 5159), - Box(5160, 5160), - Box(5161, 5161), - Box(5162, 5162), - Box(5163, 5163), - Box(5164, 5164), - Box(5165, 5165), - Box(5166, 5166), - Box(5167, 5167), - Box(5168, 5168), - Box(5169, 5169), - Box(5170, 5170), - Box(5171, 5171), - Box(5172, 5172), - Box(5173, 5173), - Box(5174, 5174), - Box(5175, 5175), - Box(5176, 5176), - Box(5177, 5177), - Box(5178, 5178), - Box(5179, 5179), - Box(5180, 5180), - Box(5181, 5181), - Box(5182, 5182), - Box(5183, 5183), - Box(5184, 5184), - Box(5185, 5185), - Box(5186, 5186), - Box(5187, 5187), - Box(5188, 5188), - Box(5189, 5189), - Box(5190, 5190), - Box(5191, 5191), - Box(5192, 5192), - Box(5193, 5193), - Box(5194, 5194), - Box(5195, 5195), - Box(5196, 5196), - Box(5197, 5197), - Box(5198, 5198), - Box(5199, 5199), - Box(5200, 5200), - Box(5201, 5201), - Box(5202, 5202), - Box(5203, 5203), - Box(5204, 5204), - Box(5205, 5205), - Box(5206, 5206), - Box(5207, 5207), - Box(5208, 5208), - Box(5209, 5209), - Box(5210, 5210), - Box(5211, 5211), - Box(5212, 5212), - Box(5213, 5213), - Box(5214, 5214), - Box(5215, 5215), - Box(5216, 5216), - Box(5217, 5217), - Box(5218, 5218), - Box(5219, 5219), - Box(5220, 5220), - Box(5221, 5221), - Box(5222, 5222), - Box(5223, 5223), - Box(5224, 5224), - Box(5225, 5225), - Box(5226, 5226), - Box(5227, 5227), - Box(5228, 5228), - Box(5229, 5229), - Box(5230, 5230), - Box(5231, 5231), - Box(5232, 5232), - Box(5233, 5233), - Box(5234, 5234), - Box(5235, 5235), - Box(5236, 5236), - Box(5237, 5237), - Box(5238, 5238), - Box(5239, 5239), - Box(5240, 5240), - Box(5241, 5241), - Box(5242, 5242), - Box(5243, 5243), - Box(5244, 5244), - Box(5245, 5245), - Box(5246, 5246), - Box(5247, 5247), - Box(5248, 5248), - Box(5249, 5249), - Box(5250, 5250), - Box(5251, 5251), - Box(5252, 5252), - Box(5253, 5253), - Box(5254, 5254), - Box(5255, 5255), - Box(5256, 5256), - Box(5257, 5257), - Box(5258, 5258), - Box(5259, 5259), - Box(5260, 5260), - Box(5261, 5261), - Box(5262, 5262), - Box(5263, 5263), - Box(5264, 5264), - Box(5265, 5265), - Box(5266, 5266), - Box(5267, 5267), - Box(5268, 5268), - Box(5269, 5269), - Box(5270, 5270), - Box(5271, 5271), - Box(5272, 5272), - Box(5273, 5273), - Box(5274, 5274), - Box(5275, 5275), - Box(5276, 5276), - Box(5277, 5277), - Box(5278, 5278), - Box(5279, 5279), - Box(5280, 5280), - Box(5281, 5281), - Box(5282, 5282), - Box(5283, 5283), - Box(5284, 5284), - Box(5285, 5285), - Box(5286, 5286), - Box(5287, 5287), - Box(5288, 5288), - Box(5289, 5289), - Box(5290, 5290), - Box(5291, 5291), - Box(5292, 5292), - Box(5293, 5293), - Box(5294, 5294), - Box(5295, 5295), - Box(5296, 5296), - Box(5297, 5297), - Box(5298, 5298), - Box(5299, 5299), - Box(5300, 5300), - Box(5301, 5301), - Box(5302, 5302), - Box(5303, 5303), - Box(5304, 5304), - Box(5305, 5305), - Box(5306, 5306), - Box(5307, 5307), - Box(5308, 5308), - Box(5309, 5309), - Box(5310, 5310), - Box(5311, 5311), - Box(5312, 5312), - Box(5313, 5313), - Box(5314, 5314), - Box(5315, 5315), - Box(5316, 5316), - Box(5317, 5317), - Box(5318, 5318), - Box(5319, 5319), - Box(5320, 5320), - Box(5321, 5321), - Box(5322, 5322), - Box(5323, 5323), - Box(5324, 5324), - Box(5325, 5325), - Box(5326, 5326), - Box(5327, 5327), - Box(5328, 5328), - Box(5329, 5329), - Box(5330, 5330), - Box(5331, 5331), - Box(5332, 5332), - Box(5333, 5333), - Box(5334, 5334), - Box(5335, 5335), - Box(5336, 5336), - Box(5337, 5337), - Box(5338, 5338), - Box(5339, 5339), - Box(5340, 5340), - Box(5341, 5341), - Box(5342, 5342), - Box(5343, 5343), - Box(5344, 5344), - Box(5345, 5345), - Box(5346, 5346), - Box(5347, 5347), - Box(5348, 5348), - Box(5349, 5349), - Box(5350, 5350), - Box(5351, 5351), - Box(5352, 5352), - Box(5353, 5353), - Box(5354, 5354), - Box(5355, 5355), - Box(5356, 5356), - Box(5357, 5357), - Box(5358, 5358), - Box(5359, 5359), - Box(5360, 5360), - Box(5361, 5361), - Box(5362, 5362), - Box(5363, 5363), - Box(5364, 5364), - Box(5365, 5365), - Box(5366, 5366), - Box(5367, 5367), - Box(5368, 5368), - Box(5369, 5369), - Box(5370, 5370), - Box(5371, 5371), - Box(5372, 5372), - Box(5373, 5373), - Box(5374, 5374), - Box(5375, 5375), - Box(5376, 5376), - Box(5377, 5377), - Box(5378, 5378), - Box(5379, 5379), - Box(5380, 5380), - Box(5381, 5381), - Box(5382, 5382), - Box(5383, 5383), - Box(5384, 5384), - Box(5385, 5385), - Box(5386, 5386), - Box(5387, 5387), - Box(5388, 5388), - Box(5389, 5389), - Box(5390, 5390), - Box(5391, 5391), - Box(5392, 5392), - Box(5393, 5393), - Box(5394, 5394), - Box(5395, 5395), - Box(5396, 5396), - Box(5397, 5397), - Box(5398, 5398), - Box(5399, 5399), - Box(5400, 5400), - Box(5401, 5401), - Box(5402, 5402), - Box(5403, 5403), - Box(5404, 5404), - Box(5405, 5405), - Box(5406, 5406), - Box(5407, 5407), - Box(5408, 5408), - Box(5409, 5409), - Box(5410, 5410), - Box(5411, 5411), - Box(5412, 5412), - Box(5413, 5413), - Box(5414, 5414), - Box(5415, 5415), - Box(5416, 5416), - Box(5417, 5417), - Box(5418, 5418), - Box(5419, 5419), - Box(5420, 5420), - Box(5421, 5421), - Box(5422, 5422), - Box(5423, 5423), - Box(5424, 5424), - Box(5425, 5425), - Box(5426, 5426), - Box(5427, 5427), - Box(5428, 5428), - Box(5429, 5429), - Box(5430, 5430), - Box(5431, 5431), - Box(5432, 5432), - Box(5433, 5433), - Box(5434, 5434), - Box(5435, 5435), - Box(5436, 5436), - Box(5437, 5437), - Box(5438, 5438), - Box(5439, 5439), - Box(5440, 5440), - Box(5441, 5441), - Box(5442, 5442), - Box(5443, 5443), - Box(5444, 5444), - Box(5445, 5445), - Box(5446, 5446), - Box(5447, 5447), - Box(5448, 5448), - Box(5449, 5449), - Box(5450, 5450), - Box(5451, 5451), - Box(5452, 5452), - Box(5453, 5453), - Box(5454, 5454), - Box(5455, 5455), - Box(5456, 5456), - Box(5457, 5457), - Box(5458, 5458), - Box(5459, 5459), - Box(5460, 5460), - Box(5461, 5461), - Box(5462, 5462), - Box(5463, 5463), - Box(5464, 5464), - Box(5465, 5465), - Box(5466, 5466), - Box(5467, 5467), - Box(5468, 5468), - Box(5469, 5469), - Box(5470, 5470), - Box(5471, 5471), - Box(5472, 5472), - Box(5473, 5473), - Box(5474, 5474), - Box(5475, 5475), - Box(5476, 5476), - Box(5477, 5477), - Box(5478, 5478), - Box(5479, 5479), - Box(5480, 5480), - Box(5481, 5481), - Box(5482, 5482), - Box(5483, 5483), - Box(5484, 5484), - Box(5485, 5485), - Box(5486, 5486), - Box(5487, 5487), - Box(5488, 5488), - Box(5489, 5489), - Box(5490, 5490), - Box(5491, 5491), - Box(5492, 5492), - Box(5493, 5493), - Box(5494, 5494), - Box(5495, 5495), - Box(5496, 5496), - Box(5497, 5497), - Box(5498, 5498), - Box(5499, 5499), - Box(5500, 5500), - Box(5501, 5501), - Box(5502, 5502), - Box(5503, 5503), - Box(5504, 5504), - Box(5505, 5505), - Box(5506, 5506), - Box(5507, 5507), - Box(5508, 5508), - Box(5509, 5509), - Box(5510, 5510), - Box(5511, 5511), - Box(5512, 5512), - Box(5513, 5513), - Box(5514, 5514), - Box(5515, 5515), - Box(5516, 5516), - Box(5517, 5517), - Box(5518, 5518), - Box(5519, 5519), - Box(5520, 5520), - Box(5521, 5521), - Box(5522, 5522), - Box(5523, 5523), - Box(5524, 5524), - Box(5525, 5525), - Box(5526, 5526), - Box(5527, 5527), - Box(5528, 5528), - Box(5529, 5529), - Box(5530, 5530), - Box(5531, 5531), - Box(5532, 5532), - Box(5533, 5533), - Box(5534, 5534), - Box(5535, 5535), - Box(5536, 5536), - Box(5537, 5537), - Box(5538, 5538), - Box(5539, 5539), - Box(5540, 5540), - Box(5541, 5541), - Box(5542, 5542), - Box(5543, 5543), - Box(5544, 5544), - Box(5545, 5545), - Box(5546, 5546), - Box(5547, 5547), - Box(5548, 5548), - Box(5549, 5549), - Box(5550, 5550), - Box(5551, 5551), - Box(5552, 5552), - Box(5553, 5553), - Box(5554, 5554), - Box(5555, 5555), - Box(5556, 5556), - Box(5557, 5557), - Box(5558, 5558), - Box(5559, 5559), - Box(5560, 5560), - Box(5561, 5561), - Box(5562, 5562), - Box(5563, 5563), - Box(5564, 5564), - Box(5565, 5565), - Box(5566, 5566), - Box(5567, 5567), - Box(5568, 5568), - Box(5569, 5569), - Box(5570, 5570), - Box(5571, 5571), - Box(5572, 5572), - Box(5573, 5573), - Box(5574, 5574), - Box(5575, 5575), - Box(5576, 5576), - Box(5577, 5577), - Box(5578, 5578), - Box(5579, 5579), - Box(5580, 5580), - Box(5581, 5581), - Box(5582, 5582), - Box(5583, 5583), - Box(5584, 5584), - Box(5585, 5585), - Box(5586, 5586), - Box(5587, 5587), - Box(5588, 5588), - Box(5589, 5589), - Box(5590, 5590), - Box(5591, 5591), - Box(5592, 5592), - Box(5593, 5593), - Box(5594, 5594), - Box(5595, 5595), - Box(5596, 5596), - Box(5597, 5597), - Box(5598, 5598), - Box(5599, 5599), - Box(5600, 5600), - Box(5601, 5601), - Box(5602, 5602), - Box(5603, 5603), - Box(5604, 5604), - Box(5605, 5605), - Box(5606, 5606), - Box(5607, 5607), - Box(5608, 5608), - Box(5609, 5609), - Box(5610, 5610), - Box(5611, 5611), - Box(5612, 5612), - Box(5613, 5613), - Box(5614, 5614), - Box(5615, 5615), - Box(5616, 5616), - Box(5617, 5617), - Box(5618, 5618), - Box(5619, 5619), - Box(5620, 5620), - Box(5621, 5621), - Box(5622, 5622), - Box(5623, 5623), - Box(5624, 5624), - Box(5625, 5625), - Box(5626, 5626), - Box(5627, 5627), - Box(5628, 5628), - Box(5629, 5629), - Box(5630, 5630), - Box(5631, 5631), - Box(5632, 5632), - Box(5633, 5633), - Box(5634, 5634), - Box(5635, 5635), - Box(5636, 5636), - Box(5637, 5637), - Box(5638, 5638), - Box(5639, 5639), - Box(5640, 5640), - Box(5641, 5641), - Box(5642, 5642), - Box(5643, 5643), - Box(5644, 5644), - Box(5645, 5645), - Box(5646, 5646), - Box(5647, 5647), - Box(5648, 5648), - Box(5649, 5649), - Box(5650, 5650), - Box(5651, 5651), - Box(5652, 5652), - Box(5653, 5653), - Box(5654, 5654), - Box(5655, 5655), - Box(5656, 5656), - Box(5657, 5657), - Box(5658, 5658), - Box(5659, 5659), - Box(5660, 5660), - Box(5661, 5661), - Box(5662, 5662), - Box(5663, 5663), - Box(5664, 5664), - Box(5665, 5665), - Box(5666, 5666), - Box(5667, 5667), - Box(5668, 5668), - Box(5669, 5669), - Box(5670, 5670), - Box(5671, 5671), - Box(5672, 5672), - Box(5673, 5673), - Box(5674, 5674), - Box(5675, 5675), - Box(5676, 5676), - Box(5677, 5677), - Box(5678, 5678), - Box(5679, 5679), - Box(5680, 5680), - Box(5681, 5681), - Box(5682, 5682), - Box(5683, 5683), - Box(5684, 5684), - Box(5685, 5685), - Box(5686, 5686), - Box(5687, 5687), - Box(5688, 5688), - Box(5689, 5689), - Box(5690, 5690), - Box(5691, 5691), - Box(5692, 5692), - Box(5693, 5693), - Box(5694, 5694), - Box(5695, 5695), - Box(5696, 5696), - Box(5697, 5697), - Box(5698, 5698), - Box(5699, 5699), - Box(5700, 5700), - Box(5701, 5701), - Box(5702, 5702), - Box(5703, 5703), - Box(5704, 5704), - Box(5705, 5705), - Box(5706, 5706), - Box(5707, 5707), - Box(5708, 5708), - Box(5709, 5709), - Box(5710, 5710), - Box(5711, 5711), - Box(5712, 5712), - Box(5713, 5713), - Box(5714, 5714), - Box(5715, 5715), - Box(5716, 5716), - Box(5717, 5717), - Box(5718, 5718), - Box(5719, 5719), - Box(5720, 5720), - Box(5721, 5721), - Box(5722, 5722), - Box(5723, 5723), - Box(5724, 5724), - Box(5725, 5725), - Box(5726, 5726), - Box(5727, 5727), - Box(5728, 5728), - Box(5729, 5729), - Box(5730, 5730), - Box(5731, 5731), - Box(5732, 5732), - Box(5733, 5733), - Box(5734, 5734), - Box(5735, 5735), - Box(5736, 5736), - Box(5737, 5737), - Box(5738, 5738), - Box(5739, 5739), - Box(5740, 5740), - Box(5741, 5741), - Box(5742, 5742), - Box(5743, 5743), - Box(5744, 5744), - Box(5745, 5745), - Box(5746, 5746), - Box(5747, 5747), - Box(5748, 5748), - Box(5749, 5749), - Box(5750, 5750), - Box(5751, 5751), - Box(5752, 5752), - Box(5753, 5753), - Box(5754, 5754), - Box(5755, 5755), - Box(5756, 5756), - Box(5757, 5757), - Box(5758, 5758), - Box(5759, 5759), - Box(5760, 5760), - Box(5761, 5761), - Box(5762, 5762), - Box(5763, 5763), - Box(5764, 5764), - Box(5765, 5765), - Box(5766, 5766), - Box(5767, 5767), - Box(5768, 5768), - Box(5769, 5769), - Box(5770, 5770), - Box(5771, 5771), - Box(5772, 5772), - Box(5773, 5773), - Box(5774, 5774), - Box(5775, 5775), - Box(5776, 5776), - Box(5777, 5777), - Box(5778, 5778), - Box(5779, 5779), - Box(5780, 5780), - Box(5781, 5781), - Box(5782, 5782), - Box(5783, 5783), - Box(5784, 5784), - Box(5785, 5785), - Box(5786, 5786), - Box(5787, 5787), - Box(5788, 5788), - Box(5789, 5789), - Box(5790, 5790), - Box(5791, 5791), - Box(5792, 5792), - Box(5793, 5793), - Box(5794, 5794), - Box(5795, 5795), - Box(5796, 5796), - Box(5797, 5797), - Box(5798, 5798), - Box(5799, 5799), - Box(5800, 5800), - Box(5801, 5801), - Box(5802, 5802), - Box(5803, 5803), - Box(5804, 5804), - Box(5805, 5805), - Box(5806, 5806), - Box(5807, 5807), - Box(5808, 5808), - Box(5809, 5809), - Box(5810, 5810), - Box(5811, 5811), - Box(5812, 5812), - Box(5813, 5813), - Box(5814, 5814), - Box(5815, 5815), - Box(5816, 5816), - Box(5817, 5817), - Box(5818, 5818), - Box(5819, 5819), - Box(5820, 5820), - Box(5821, 5821), - Box(5822, 5822), - Box(5823, 5823), - Box(5824, 5824), - Box(5825, 5825), - Box(5826, 5826), - Box(5827, 5827), - Box(5828, 5828), - Box(5829, 5829), - Box(5830, 5830), - Box(5831, 5831), - Box(5832, 5832), - Box(5833, 5833), - Box(5834, 5834), - Box(5835, 5835), - Box(5836, 5836), - Box(5837, 5837), - Box(5838, 5838), - Box(5839, 5839), - Box(5840, 5840), - Box(5841, 5841), - Box(5842, 5842), - Box(5843, 5843), - Box(5844, 5844), - Box(5845, 5845), - Box(5846, 5846), - Box(5847, 5847), - Box(5848, 5848), - Box(5849, 5849), - Box(5850, 5850), - Box(5851, 5851), - Box(5852, 5852), - Box(5853, 5853), - Box(5854, 5854), - Box(5855, 5855), - Box(5856, 5856), - Box(5857, 5857), - Box(5858, 5858), - Box(5859, 5859), - Box(5860, 5860), - Box(5861, 5861), - Box(5862, 5862), - Box(5863, 5863), - Box(5864, 5864), - Box(5865, 5865), - Box(5866, 5866), - Box(5867, 5867), - Box(5868, 5868), - Box(5869, 5869), - Box(5870, 5870), - Box(5871, 5871), - Box(5872, 5872), - Box(5873, 5873), - Box(5874, 5874), - Box(5875, 5875), - Box(5876, 5876), - Box(5877, 5877), - Box(5878, 5878), - Box(5879, 5879), - Box(5880, 5880), - Box(5881, 5881), - Box(5882, 5882), - Box(5883, 5883), - Box(5884, 5884), - Box(5885, 5885), - Box(5886, 5886), - Box(5887, 5887), - Box(5888, 5888), - Box(5889, 5889), - Box(5890, 5890), - Box(5891, 5891), - Box(5892, 5892), - Box(5893, 5893), - Box(5894, 5894), - Box(5895, 5895), - Box(5896, 5896), - Box(5897, 5897), - Box(5898, 5898), - Box(5899, 5899), - Box(5900, 5900), - Box(5901, 5901), - Box(5902, 5902), - Box(5903, 5903), - Box(5904, 5904), - Box(5905, 5905), - Box(5906, 5906), - Box(5907, 5907), - Box(5908, 5908), - Box(5909, 5909), - Box(5910, 5910), - Box(5911, 5911), - Box(5912, 5912), - Box(5913, 5913), - Box(5914, 5914), - Box(5915, 5915), - Box(5916, 5916), - Box(5917, 5917), - Box(5918, 5918), - Box(5919, 5919), - Box(5920, 5920), - Box(5921, 5921), - Box(5922, 5922), - Box(5923, 5923), - Box(5924, 5924), - Box(5925, 5925), - Box(5926, 5926), - Box(5927, 5927), - Box(5928, 5928), - Box(5929, 5929), - Box(5930, 5930), - Box(5931, 5931), - Box(5932, 5932), - Box(5933, 5933), - Box(5934, 5934), - Box(5935, 5935), - Box(5936, 5936), - Box(5937, 5937), - Box(5938, 5938), - Box(5939, 5939), - Box(5940, 5940), - Box(5941, 5941), - Box(5942, 5942), - Box(5943, 5943), - Box(5944, 5944), - Box(5945, 5945), - Box(5946, 5946), - Box(5947, 5947), - Box(5948, 5948), - Box(5949, 5949), - Box(5950, 5950), - Box(5951, 5951), - Box(5952, 5952), - Box(5953, 5953), - Box(5954, 5954), - Box(5955, 5955), - Box(5956, 5956), - Box(5957, 5957), - Box(5958, 5958), - Box(5959, 5959), - Box(5960, 5960), - Box(5961, 5961), - Box(5962, 5962), - Box(5963, 5963), - Box(5964, 5964), - Box(5965, 5965), - Box(5966, 5966), - Box(5967, 5967), - Box(5968, 5968), - Box(5969, 5969), - Box(5970, 5970), - Box(5971, 5971), - Box(5972, 5972), - Box(5973, 5973), - Box(5974, 5974), - Box(5975, 5975), - Box(5976, 5976), - Box(5977, 5977), - Box(5978, 5978), - Box(5979, 5979), - Box(5980, 5980), - Box(5981, 5981), - Box(5982, 5982), - Box(5983, 5983), - Box(5984, 5984), - Box(5985, 5985), - Box(5986, 5986), - Box(5987, 5987), - Box(5988, 5988), - Box(5989, 5989), - Box(5990, 5990), - Box(5991, 5991), - Box(5992, 5992), - Box(5993, 5993), - Box(5994, 5994), - Box(5995, 5995), - Box(5996, 5996), - Box(5997, 5997), - Box(5998, 5998), - Box(5999, 5999), - Box(6000, 6000), - Box(6001, 6001), - Box(6002, 6002), - Box(6003, 6003), - Box(6004, 6004), - Box(6005, 6005), - Box(6006, 6006), - Box(6007, 6007), - Box(6008, 6008), - Box(6009, 6009), - Box(6010, 6010), - Box(6011, 6011), - Box(6012, 6012), - Box(6013, 6013), - Box(6014, 6014), - Box(6015, 6015), - Box(6016, 6016), - Box(6017, 6017), - Box(6018, 6018), - Box(6019, 6019), - Box(6020, 6020), - Box(6021, 6021), - Box(6022, 6022), - Box(6023, 6023), - Box(6024, 6024), - Box(6025, 6025), - Box(6026, 6026), - Box(6027, 6027), - Box(6028, 6028), - Box(6029, 6029), - Box(6030, 6030), - Box(6031, 6031), - Box(6032, 6032), - Box(6033, 6033), - Box(6034, 6034), - Box(6035, 6035), - Box(6036, 6036), - Box(6037, 6037), - Box(6038, 6038), - Box(6039, 6039), - Box(6040, 6040), - Box(6041, 6041), - Box(6042, 6042), - Box(6043, 6043), - Box(6044, 6044), - Box(6045, 6045), - Box(6046, 6046), - Box(6047, 6047), - Box(6048, 6048), - Box(6049, 6049), - Box(6050, 6050), - Box(6051, 6051), - Box(6052, 6052), - Box(6053, 6053), - Box(6054, 6054), - Box(6055, 6055), - Box(6056, 6056), - Box(6057, 6057), - Box(6058, 6058), - Box(6059, 6059), - Box(6060, 6060), - Box(6061, 6061), - Box(6062, 6062), - Box(6063, 6063), - Box(6064, 6064), - Box(6065, 6065), - Box(6066, 6066), - Box(6067, 6067), - Box(6068, 6068), - Box(6069, 6069), - Box(6070, 6070), - Box(6071, 6071), - Box(6072, 6072), - Box(6073, 6073), - Box(6074, 6074), - Box(6075, 6075), - Box(6076, 6076), - Box(6077, 6077), - Box(6078, 6078), - Box(6079, 6079), - Box(6080, 6080), - Box(6081, 6081), - Box(6082, 6082), - Box(6083, 6083), - Box(6084, 6084), - Box(6085, 6085), - Box(6086, 6086), - Box(6087, 6087), - Box(6088, 6088), - Box(6089, 6089), - Box(6090, 6090), - Box(6091, 6091), - Box(6092, 6092), - Box(6093, 6093), - Box(6094, 6094), - Box(6095, 6095), - Box(6096, 6096), - Box(6097, 6097), - Box(6098, 6098), - Box(6099, 6099), - Box(6100, 6100), - Box(6101, 6101), - Box(6102, 6102), - Box(6103, 6103), - Box(6104, 6104), - Box(6105, 6105), - Box(6106, 6106), - Box(6107, 6107), - Box(6108, 6108), - Box(6109, 6109), - Box(6110, 6110), - Box(6111, 6111), - Box(6112, 6112), - Box(6113, 6113), - Box(6114, 6114), - Box(6115, 6115), - Box(6116, 6116), - Box(6117, 6117), - Box(6118, 6118), - Box(6119, 6119), - Box(6120, 6120), - Box(6121, 6121), - Box(6122, 6122), - Box(6123, 6123), - Box(6124, 6124), - Box(6125, 6125), - Box(6126, 6126), - Box(6127, 6127), - Box(6128, 6128), - Box(6129, 6129), - Box(6130, 6130), - Box(6131, 6131), - Box(6132, 6132), - Box(6133, 6133), - Box(6134, 6134), - Box(6135, 6135), - Box(6136, 6136), - Box(6137, 6137), - Box(6138, 6138), - Box(6139, 6139), - Box(6140, 6140), - Box(6141, 6141), - Box(6142, 6142), - Box(6143, 6143), - Box(6144, 6144), - Box(6145, 6145), - Box(6146, 6146), - Box(6147, 6147), - Box(6148, 6148), - Box(6149, 6149), - Box(6150, 6150), - Box(6151, 6151), - Box(6152, 6152), - Box(6153, 6153), - Box(6154, 6154), - Box(6155, 6155), - Box(6156, 6156), - Box(6157, 6157), - Box(6158, 6158), - Box(6159, 6159), - Box(6160, 6160), - Box(6161, 6161), - Box(6162, 6162), - Box(6163, 6163), - Box(6164, 6164), - Box(6165, 6165), - Box(6166, 6166), - Box(6167, 6167), - Box(6168, 6168), - Box(6169, 6169), - Box(6170, 6170), - Box(6171, 6171), - Box(6172, 6172), - Box(6173, 6173), - Box(6174, 6174), - Box(6175, 6175), - Box(6176, 6176), - Box(6177, 6177), - Box(6178, 6178), - Box(6179, 6179), - Box(6180, 6180), - Box(6181, 6181), - Box(6182, 6182), - Box(6183, 6183), - Box(6184, 6184), - Box(6185, 6185), - Box(6186, 6186), - Box(6187, 6187), - Box(6188, 6188), - Box(6189, 6189), - Box(6190, 6190), - Box(6191, 6191), - Box(6192, 6192), - Box(6193, 6193), - Box(6194, 6194), - Box(6195, 6195), - Box(6196, 6196), - Box(6197, 6197), - Box(6198, 6198), - Box(6199, 6199), - Box(6200, 6200), - Box(6201, 6201), - Box(6202, 6202), - Box(6203, 6203), - Box(6204, 6204), - Box(6205, 6205), - Box(6206, 6206), - Box(6207, 6207), - Box(6208, 6208), - Box(6209, 6209), - Box(6210, 6210), - Box(6211, 6211), - Box(6212, 6212), - Box(6213, 6213), - Box(6214, 6214), - Box(6215, 6215), - Box(6216, 6216), - Box(6217, 6217), - Box(6218, 6218), - Box(6219, 6219), - Box(6220, 6220), - Box(6221, 6221), - Box(6222, 6222), - Box(6223, 6223), - Box(6224, 6224), - Box(6225, 6225), - Box(6226, 6226), - Box(6227, 6227), - Box(6228, 6228), - Box(6229, 6229), - Box(6230, 6230), - Box(6231, 6231), - Box(6232, 6232), - Box(6233, 6233), - Box(6234, 6234), - Box(6235, 6235), - Box(6236, 6236), - Box(6237, 6237), - Box(6238, 6238), - Box(6239, 6239), - Box(6240, 6240), - Box(6241, 6241), - Box(6242, 6242), - Box(6243, 6243), - Box(6244, 6244), - Box(6245, 6245), - Box(6246, 6246), - Box(6247, 6247), - Box(6248, 6248), - Box(6249, 6249), - Box(6250, 6250), - Box(6251, 6251), - Box(6252, 6252), - Box(6253, 6253), - Box(6254, 6254), - Box(6255, 6255), - Box(6256, 6256), - Box(6257, 6257), - Box(6258, 6258), - Box(6259, 6259), - Box(6260, 6260), - Box(6261, 6261), - Box(6262, 6262), - Box(6263, 6263), - Box(6264, 6264), - Box(6265, 6265), - Box(6266, 6266), - Box(6267, 6267), - Box(6268, 6268), - Box(6269, 6269), - Box(6270, 6270), - Box(6271, 6271), - Box(6272, 6272), - Box(6273, 6273), - Box(6274, 6274), - Box(6275, 6275), - Box(6276, 6276), - Box(6277, 6277), - Box(6278, 6278), - Box(6279, 6279), - Box(6280, 6280), - Box(6281, 6281), - Box(6282, 6282), - Box(6283, 6283), - Box(6284, 6284), - Box(6285, 6285), - Box(6286, 6286), - Box(6287, 6287), - Box(6288, 6288), - Box(6289, 6289), - Box(6290, 6290), - Box(6291, 6291), - Box(6292, 6292), - Box(6293, 6293), - Box(6294, 6294), - Box(6295, 6295), - Box(6296, 6296), - Box(6297, 6297), - Box(6298, 6298), - Box(6299, 6299), - Box(6300, 6300), - Box(6301, 6301), - Box(6302, 6302), - Box(6303, 6303), - Box(6304, 6304), - Box(6305, 6305), - Box(6306, 6306), - Box(6307, 6307), - Box(6308, 6308), - Box(6309, 6309), - Box(6310, 6310), - Box(6311, 6311), - Box(6312, 6312), - Box(6313, 6313), - Box(6314, 6314), - Box(6315, 6315), - Box(6316, 6316), - Box(6317, 6317), - Box(6318, 6318), - Box(6319, 6319), - Box(6320, 6320), - Box(6321, 6321), - Box(6322, 6322), - Box(6323, 6323), - Box(6324, 6324), - Box(6325, 6325), - Box(6326, 6326), - Box(6327, 6327), - Box(6328, 6328), - Box(6329, 6329), - Box(6330, 6330), - Box(6331, 6331), - Box(6332, 6332), - Box(6333, 6333), - Box(6334, 6334), - Box(6335, 6335), - Box(6336, 6336), - Box(6337, 6337), - Box(6338, 6338), - Box(6339, 6339), - Box(6340, 6340), - Box(6341, 6341), - Box(6342, 6342), - Box(6343, 6343), - Box(6344, 6344), - Box(6345, 6345), - Box(6346, 6346), - Box(6347, 6347), - Box(6348, 6348), - Box(6349, 6349), - Box(6350, 6350), - Box(6351, 6351), - Box(6352, 6352), - Box(6353, 6353), - Box(6354, 6354), - Box(6355, 6355), - Box(6356, 6356), - Box(6357, 6357), - Box(6358, 6358), - Box(6359, 6359), - Box(6360, 6360), - Box(6361, 6361), - Box(6362, 6362), - Box(6363, 6363), - Box(6364, 6364), - Box(6365, 6365), - Box(6366, 6366), - Box(6367, 6367), - Box(6368, 6368), - Box(6369, 6369), - Box(6370, 6370), - Box(6371, 6371), - Box(6372, 6372), - Box(6373, 6373), - Box(6374, 6374), - Box(6375, 6375), - Box(6376, 6376), - Box(6377, 6377), - Box(6378, 6378), - Box(6379, 6379), - Box(6380, 6380), - Box(6381, 6381), - Box(6382, 6382), - Box(6383, 6383), - Box(6384, 6384), - Box(6385, 6385), - Box(6386, 6386), - Box(6387, 6387), - Box(6388, 6388), - Box(6389, 6389), - Box(6390, 6390), - Box(6391, 6391), - Box(6392, 6392), - Box(6393, 6393), - Box(6394, 6394), - Box(6395, 6395), - Box(6396, 6396), - Box(6397, 6397), - Box(6398, 6398), - Box(6399, 6399), - Box(6400, 6400), - Box(6401, 6401), - Box(6402, 6402), - Box(6403, 6403), - Box(6404, 6404), - Box(6405, 6405), - Box(6406, 6406), - Box(6407, 6407), - Box(6408, 6408), - Box(6409, 6409), - Box(6410, 6410), - Box(6411, 6411), - Box(6412, 6412), - Box(6413, 6413), - Box(6414, 6414), - Box(6415, 6415), - Box(6416, 6416), - Box(6417, 6417), - Box(6418, 6418), - Box(6419, 6419), - Box(6420, 6420), - Box(6421, 6421), - Box(6422, 6422), - Box(6423, 6423), - Box(6424, 6424), - Box(6425, 6425), - Box(6426, 6426), - Box(6427, 6427), - Box(6428, 6428), - Box(6429, 6429), - Box(6430, 6430), - Box(6431, 6431), - Box(6432, 6432), - Box(6433, 6433), - Box(6434, 6434), - Box(6435, 6435), - Box(6436, 6436), - Box(6437, 6437), - Box(6438, 6438), - Box(6439, 6439), - Box(6440, 6440), - Box(6441, 6441), - Box(6442, 6442), - Box(6443, 6443), - Box(6444, 6444), - Box(6445, 6445), - Box(6446, 6446), - Box(6447, 6447), - Box(6448, 6448), - Box(6449, 6449), - Box(6450, 6450), - Box(6451, 6451), - Box(6452, 6452), - Box(6453, 6453), - Box(6454, 6454), - Box(6455, 6455), - Box(6456, 6456), - Box(6457, 6457), - Box(6458, 6458), - Box(6459, 6459), - Box(6460, 6460), - Box(6461, 6461), - Box(6462, 6462), - Box(6463, 6463), - Box(6464, 6464), - Box(6465, 6465), - Box(6466, 6466), - Box(6467, 6467), - Box(6468, 6468), - Box(6469, 6469), - Box(6470, 6470), - Box(6471, 6471), - Box(6472, 6472), - Box(6473, 6473), - Box(6474, 6474), - Box(6475, 6475), - Box(6476, 6476), - Box(6477, 6477), - Box(6478, 6478), - Box(6479, 6479), - Box(6480, 6480), - Box(6481, 6481), - Box(6482, 6482), - Box(6483, 6483), - Box(6484, 6484), - Box(6485, 6485), - Box(6486, 6486), - Box(6487, 6487), - Box(6488, 6488), - Box(6489, 6489), - Box(6490, 6490), - Box(6491, 6491), - Box(6492, 6492), - Box(6493, 6493), - Box(6494, 6494), - Box(6495, 6495), - Box(6496, 6496), - Box(6497, 6497), - Box(6498, 6498), - Box(6499, 6499), - Box(6500, 6500), - Box(6501, 6501), - Box(6502, 6502), - Box(6503, 6503), - Box(6504, 6504), - Box(6505, 6505), - Box(6506, 6506), - Box(6507, 6507), - Box(6508, 6508), - Box(6509, 6509), - Box(6510, 6510), - Box(6511, 6511), - Box(6512, 6512), - Box(6513, 6513), - Box(6514, 6514), - Box(6515, 6515), - Box(6516, 6516), - Box(6517, 6517), - Box(6518, 6518), - Box(6519, 6519), - Box(6520, 6520), - Box(6521, 6521), - Box(6522, 6522), - Box(6523, 6523), - Box(6524, 6524), - Box(6525, 6525), - Box(6526, 6526), - Box(6527, 6527), - Box(6528, 6528), - Box(6529, 6529), - Box(6530, 6530), - Box(6531, 6531), - Box(6532, 6532), - Box(6533, 6533), - Box(6534, 6534), - Box(6535, 6535), - Box(6536, 6536), - Box(6537, 6537), - Box(6538, 6538), - Box(6539, 6539), - Box(6540, 6540), - Box(6541, 6541), - Box(6542, 6542), - Box(6543, 6543), - Box(6544, 6544), - Box(6545, 6545), - Box(6546, 6546), - Box(6547, 6547), - Box(6548, 6548), - Box(6549, 6549), - Box(6550, 6550), - Box(6551, 6551), - Box(6552, 6552), - Box(6553, 6553), - Box(6554, 6554), - Box(6555, 6555), - Box(6556, 6556), - Box(6557, 6557), - Box(6558, 6558), - Box(6559, 6559), - Box(6560, 6560), - Box(6561, 6561), - Box(6562, 6562), - Box(6563, 6563), - Box(6564, 6564), - Box(6565, 6565), - Box(6566, 6566), - Box(6567, 6567), - Box(6568, 6568), - Box(6569, 6569), - Box(6570, 6570), - Box(6571, 6571), - Box(6572, 6572), - Box(6573, 6573), - Box(6574, 6574), - Box(6575, 6575), - Box(6576, 6576), - Box(6577, 6577), - Box(6578, 6578), - Box(6579, 6579), - Box(6580, 6580), - Box(6581, 6581), - Box(6582, 6582), - Box(6583, 6583), - Box(6584, 6584), - Box(6585, 6585), - Box(6586, 6586), - Box(6587, 6587), - Box(6588, 6588), - Box(6589, 6589), - Box(6590, 6590), - Box(6591, 6591), - Box(6592, 6592), - Box(6593, 6593), - Box(6594, 6594), - Box(6595, 6595), - Box(6596, 6596), - Box(6597, 6597), - Box(6598, 6598), - Box(6599, 6599), - Box(6600, 6600), - Box(6601, 6601), - Box(6602, 6602), - Box(6603, 6603), - Box(6604, 6604), - Box(6605, 6605), - Box(6606, 6606), - Box(6607, 6607), - Box(6608, 6608), - Box(6609, 6609), - Box(6610, 6610), - Box(6611, 6611), - Box(6612, 6612), - Box(6613, 6613), - Box(6614, 6614), - Box(6615, 6615), - Box(6616, 6616), - Box(6617, 6617), - Box(6618, 6618), - Box(6619, 6619), - Box(6620, 6620), - Box(6621, 6621), - Box(6622, 6622), - Box(6623, 6623), - Box(6624, 6624), - Box(6625, 6625), - Box(6626, 6626), - Box(6627, 6627), - Box(6628, 6628), - Box(6629, 6629), - Box(6630, 6630), - Box(6631, 6631), - Box(6632, 6632), - Box(6633, 6633), - Box(6634, 6634), - Box(6635, 6635), - Box(6636, 6636), - Box(6637, 6637), - Box(6638, 6638), - Box(6639, 6639), - Box(6640, 6640), - Box(6641, 6641), - Box(6642, 6642), - Box(6643, 6643), - Box(6644, 6644), - Box(6645, 6645), - Box(6646, 6646), - Box(6647, 6647), - Box(6648, 6648), - Box(6649, 6649), - Box(6650, 6650), - Box(6651, 6651), - Box(6652, 6652), - Box(6653, 6653), - Box(6654, 6654), - Box(6655, 6655), - Box(6656, 6656), - Box(6657, 6657), - Box(6658, 6658), - Box(6659, 6659), - Box(6660, 6660), - Box(6661, 6661), - Box(6662, 6662), - Box(6663, 6663), - Box(6664, 6664), - Box(6665, 6665), - Box(6666, 6666), - Box(6667, 6667), - Box(6668, 6668), - Box(6669, 6669), - Box(6670, 6670), - Box(6671, 6671), - Box(6672, 6672), - Box(6673, 6673), - Box(6674, 6674), - Box(6675, 6675), - Box(6676, 6676), - Box(6677, 6677), - Box(6678, 6678), - Box(6679, 6679), - Box(6680, 6680), - Box(6681, 6681), - Box(6682, 6682), - Box(6683, 6683), - Box(6684, 6684), - Box(6685, 6685), - Box(6686, 6686), - Box(6687, 6687), - Box(6688, 6688), - Box(6689, 6689), - Box(6690, 6690), - Box(6691, 6691), - Box(6692, 6692), - Box(6693, 6693), - Box(6694, 6694), - Box(6695, 6695), - Box(6696, 6696), - Box(6697, 6697), - Box(6698, 6698), - Box(6699, 6699), - Box(6700, 6700), - Box(6701, 6701), - Box(6702, 6702), - Box(6703, 6703), - Box(6704, 6704), - Box(6705, 6705), - Box(6706, 6706), - Box(6707, 6707), - Box(6708, 6708), - Box(6709, 6709), - Box(6710, 6710), - Box(6711, 6711), - Box(6712, 6712), - Box(6713, 6713), - Box(6714, 6714), - Box(6715, 6715), - Box(6716, 6716), - Box(6717, 6717), - Box(6718, 6718), - Box(6719, 6719), - Box(6720, 6720), - Box(6721, 6721), - Box(6722, 6722), - Box(6723, 6723), - Box(6724, 6724), - Box(6725, 6725), - Box(6726, 6726), - Box(6727, 6727), - Box(6728, 6728), - Box(6729, 6729), - Box(6730, 6730), - Box(6731, 6731), - Box(6732, 6732), - Box(6733, 6733), - Box(6734, 6734), - Box(6735, 6735), - Box(6736, 6736), - Box(6737, 6737), - Box(6738, 6738), - Box(6739, 6739), - Box(6740, 6740), - Box(6741, 6741), - Box(6742, 6742), - Box(6743, 6743), - Box(6744, 6744), - Box(6745, 6745), - Box(6746, 6746), - Box(6747, 6747), - Box(6748, 6748), - Box(6749, 6749), - Box(6750, 6750), - Box(6751, 6751), - Box(6752, 6752), - Box(6753, 6753), - Box(6754, 6754), - Box(6755, 6755), - Box(6756, 6756), - Box(6757, 6757), - Box(6758, 6758), - Box(6759, 6759), - Box(6760, 6760), - Box(6761, 6761), - Box(6762, 6762), - Box(6763, 6763), - Box(6764, 6764), - Box(6765, 6765), - Box(6766, 6766), - Box(6767, 6767), - Box(6768, 6768), - Box(6769, 6769), - Box(6770, 6770), - Box(6771, 6771), - Box(6772, 6772), - Box(6773, 6773), - Box(6774, 6774), - Box(6775, 6775), - Box(6776, 6776), - Box(6777, 6777), - Box(6778, 6778), - Box(6779, 6779), - Box(6780, 6780), - Box(6781, 6781), - Box(6782, 6782), - Box(6783, 6783), - Box(6784, 6784), - Box(6785, 6785), - Box(6786, 6786), - Box(6787, 6787), - Box(6788, 6788), - Box(6789, 6789), - Box(6790, 6790), - Box(6791, 6791), - Box(6792, 6792), - Box(6793, 6793), - Box(6794, 6794), - Box(6795, 6795), - Box(6796, 6796), - Box(6797, 6797), - Box(6798, 6798), - Box(6799, 6799), - Box(6800, 6800), - Box(6801, 6801), - Box(6802, 6802), - Box(6803, 6803), - Box(6804, 6804), - Box(6805, 6805), - Box(6806, 6806), - Box(6807, 6807), - Box(6808, 6808), - Box(6809, 6809), - Box(6810, 6810), - Box(6811, 6811), - Box(6812, 6812), - Box(6813, 6813), - Box(6814, 6814), - Box(6815, 6815), - Box(6816, 6816), - Box(6817, 6817), - Box(6818, 6818), - Box(6819, 6819), - Box(6820, 6820), - Box(6821, 6821), - Box(6822, 6822), - Box(6823, 6823), - Box(6824, 6824), - Box(6825, 6825), - Box(6826, 6826), - Box(6827, 6827), - Box(6828, 6828), - Box(6829, 6829), - Box(6830, 6830), - Box(6831, 6831), - Box(6832, 6832), - Box(6833, 6833), - Box(6834, 6834), - Box(6835, 6835), - Box(6836, 6836), - Box(6837, 6837), - Box(6838, 6838), - Box(6839, 6839), - Box(6840, 6840), - Box(6841, 6841), - Box(6842, 6842), - Box(6843, 6843), - Box(6844, 6844), - Box(6845, 6845), - Box(6846, 6846), - Box(6847, 6847), - Box(6848, 6848), - Box(6849, 6849), - Box(6850, 6850), - Box(6851, 6851), - Box(6852, 6852), - Box(6853, 6853), - Box(6854, 6854), - Box(6855, 6855), - Box(6856, 6856), - Box(6857, 6857), - Box(6858, 6858), - Box(6859, 6859), - Box(6860, 6860), - Box(6861, 6861), - Box(6862, 6862), - Box(6863, 6863), - Box(6864, 6864), - Box(6865, 6865), - Box(6866, 6866), - Box(6867, 6867), - Box(6868, 6868), - Box(6869, 6869), - Box(6870, 6870), - Box(6871, 6871), - Box(6872, 6872), - Box(6873, 6873), - Box(6874, 6874), - Box(6875, 6875), - Box(6876, 6876), - Box(6877, 6877), - Box(6878, 6878), - Box(6879, 6879), - Box(6880, 6880), - Box(6881, 6881), - Box(6882, 6882), - Box(6883, 6883), - Box(6884, 6884), - Box(6885, 6885), - Box(6886, 6886), - Box(6887, 6887), - Box(6888, 6888), - Box(6889, 6889), - Box(6890, 6890), - Box(6891, 6891), - Box(6892, 6892), - Box(6893, 6893), - Box(6894, 6894), - Box(6895, 6895), - Box(6896, 6896), - Box(6897, 6897), - Box(6898, 6898), - Box(6899, 6899), - Box(6900, 6900), - Box(6901, 6901), - Box(6902, 6902), - Box(6903, 6903), - Box(6904, 6904), - Box(6905, 6905), - Box(6906, 6906), - Box(6907, 6907), - Box(6908, 6908), - Box(6909, 6909), - Box(6910, 6910), - Box(6911, 6911), - Box(6912, 6912), - Box(6913, 6913), - Box(6914, 6914), - Box(6915, 6915), - Box(6916, 6916), - Box(6917, 6917), - Box(6918, 6918), - Box(6919, 6919), - Box(6920, 6920), - Box(6921, 6921), - Box(6922, 6922), - Box(6923, 6923), - Box(6924, 6924), - Box(6925, 6925), - Box(6926, 6926), - Box(6927, 6927), - Box(6928, 6928), - Box(6929, 6929), - Box(6930, 6930), - Box(6931, 6931), - Box(6932, 6932), - Box(6933, 6933), - Box(6934, 6934), - Box(6935, 6935), - Box(6936, 6936), - Box(6937, 6937), - Box(6938, 6938), - Box(6939, 6939), - Box(6940, 6940), - Box(6941, 6941), - Box(6942, 6942), - Box(6943, 6943), - Box(6944, 6944), - Box(6945, 6945), - Box(6946, 6946), - Box(6947, 6947), - Box(6948, 6948), - Box(6949, 6949), - Box(6950, 6950), - Box(6951, 6951), - Box(6952, 6952), - Box(6953, 6953), - Box(6954, 6954), - Box(6955, 6955), - Box(6956, 6956), - Box(6957, 6957), - Box(6958, 6958), - Box(6959, 6959), - Box(6960, 6960), - Box(6961, 6961), - Box(6962, 6962), - Box(6963, 6963), - Box(6964, 6964), - Box(6965, 6965), - Box(6966, 6966), - Box(6967, 6967), - Box(6968, 6968), - Box(6969, 6969), - Box(6970, 6970), - Box(6971, 6971), - Box(6972, 6972), - Box(6973, 6973), - Box(6974, 6974), - Box(6975, 6975), - Box(6976, 6976), - Box(6977, 6977), - Box(6978, 6978), - Box(6979, 6979), - Box(6980, 6980), - Box(6981, 6981), - Box(6982, 6982), - Box(6983, 6983), - Box(6984, 6984), - Box(6985, 6985), - Box(6986, 6986), - Box(6987, 6987), - Box(6988, 6988), - Box(6989, 6989), - Box(6990, 6990), - Box(6991, 6991), - Box(6992, 6992), - Box(6993, 6993), - Box(6994, 6994), - Box(6995, 6995), - Box(6996, 6996), - Box(6997, 6997), - Box(6998, 6998), - Box(6999, 6999), - Box(7000, 7000), - Box(7001, 7001), - Box(7002, 7002), - Box(7003, 7003), - Box(7004, 7004), - Box(7005, 7005), - Box(7006, 7006), - Box(7007, 7007), - Box(7008, 7008), - Box(7009, 7009), - Box(7010, 7010), - Box(7011, 7011), - Box(7012, 7012), - Box(7013, 7013), - Box(7014, 7014), - Box(7015, 7015), - Box(7016, 7016), - Box(7017, 7017), - Box(7018, 7018), - Box(7019, 7019), - Box(7020, 7020), - Box(7021, 7021), - Box(7022, 7022), - Box(7023, 7023), - Box(7024, 7024), - Box(7025, 7025), - Box(7026, 7026), - Box(7027, 7027), - Box(7028, 7028), - Box(7029, 7029), - Box(7030, 7030), - Box(7031, 7031), - Box(7032, 7032), - Box(7033, 7033), - Box(7034, 7034), - Box(7035, 7035), - Box(7036, 7036), - Box(7037, 7037), - Box(7038, 7038), - Box(7039, 7039), - Box(7040, 7040), - Box(7041, 7041), - Box(7042, 7042), - Box(7043, 7043), - Box(7044, 7044), - Box(7045, 7045), - Box(7046, 7046), - Box(7047, 7047), - Box(7048, 7048), - Box(7049, 7049), - Box(7050, 7050), - Box(7051, 7051), - Box(7052, 7052), - Box(7053, 7053), - Box(7054, 7054), - Box(7055, 7055), - Box(7056, 7056), - Box(7057, 7057), - Box(7058, 7058), - Box(7059, 7059), - Box(7060, 7060), - Box(7061, 7061), - Box(7062, 7062), - Box(7063, 7063), - Box(7064, 7064), - Box(7065, 7065), - Box(7066, 7066), - Box(7067, 7067), - Box(7068, 7068), - Box(7069, 7069), - Box(7070, 7070), - Box(7071, 7071), - Box(7072, 7072), - Box(7073, 7073), - Box(7074, 7074), - Box(7075, 7075), - Box(7076, 7076), - Box(7077, 7077), - Box(7078, 7078), - Box(7079, 7079), - Box(7080, 7080), - Box(7081, 7081), - Box(7082, 7082), - Box(7083, 7083), - Box(7084, 7084), - Box(7085, 7085), - Box(7086, 7086), - Box(7087, 7087), - Box(7088, 7088), - Box(7089, 7089), - Box(7090, 7090), - Box(7091, 7091), - Box(7092, 7092), - Box(7093, 7093), - Box(7094, 7094), - Box(7095, 7095), - Box(7096, 7096), - Box(7097, 7097), - Box(7098, 7098), - Box(7099, 7099), - Box(7100, 7100), - Box(7101, 7101), - Box(7102, 7102), - Box(7103, 7103), - Box(7104, 7104), - Box(7105, 7105), - Box(7106, 7106), - Box(7107, 7107), - Box(7108, 7108), - Box(7109, 7109), - Box(7110, 7110), - Box(7111, 7111), - Box(7112, 7112), - Box(7113, 7113), - Box(7114, 7114), - Box(7115, 7115), - Box(7116, 7116), - Box(7117, 7117), - Box(7118, 7118), - Box(7119, 7119), - Box(7120, 7120), - Box(7121, 7121), - Box(7122, 7122), - Box(7123, 7123), - Box(7124, 7124), - Box(7125, 7125), - Box(7126, 7126), - Box(7127, 7127), - Box(7128, 7128), - Box(7129, 7129), - Box(7130, 7130), - Box(7131, 7131), - Box(7132, 7132), - Box(7133, 7133), - Box(7134, 7134), - Box(7135, 7135), - Box(7136, 7136), - Box(7137, 7137), - Box(7138, 7138), - Box(7139, 7139), - Box(7140, 7140), - Box(7141, 7141), - Box(7142, 7142), - Box(7143, 7143), - Box(7144, 7144), - Box(7145, 7145), - Box(7146, 7146), - Box(7147, 7147), - Box(7148, 7148), - Box(7149, 7149), - Box(7150, 7150), - Box(7151, 7151), - Box(7152, 7152), - Box(7153, 7153), - Box(7154, 7154), - Box(7155, 7155), - Box(7156, 7156), - Box(7157, 7157), - Box(7158, 7158), - Box(7159, 7159), - Box(7160, 7160), - Box(7161, 7161), - Box(7162, 7162), - Box(7163, 7163), - Box(7164, 7164), - Box(7165, 7165), - Box(7166, 7166), - Box(7167, 7167), - Box(7168, 7168), - Box(7169, 7169), - Box(7170, 7170), - Box(7171, 7171), - Box(7172, 7172), - Box(7173, 7173), - Box(7174, 7174), - Box(7175, 7175), - Box(7176, 7176), - Box(7177, 7177), - Box(7178, 7178), - Box(7179, 7179), - Box(7180, 7180), - Box(7181, 7181), - Box(7182, 7182), - Box(7183, 7183), - Box(7184, 7184), - Box(7185, 7185), - Box(7186, 7186), - Box(7187, 7187), - Box(7188, 7188), - Box(7189, 7189), - Box(7190, 7190), - Box(7191, 7191), - Box(7192, 7192), - Box(7193, 7193), - Box(7194, 7194), - Box(7195, 7195), - Box(7196, 7196), - Box(7197, 7197), - Box(7198, 7198), - Box(7199, 7199), - Box(7200, 7200), - Box(7201, 7201), - Box(7202, 7202), - Box(7203, 7203), - Box(7204, 7204), - Box(7205, 7205), - Box(7206, 7206), - Box(7207, 7207), - Box(7208, 7208), - Box(7209, 7209), - Box(7210, 7210), - Box(7211, 7211), - Box(7212, 7212), - Box(7213, 7213), - Box(7214, 7214), - Box(7215, 7215), - Box(7216, 7216), - Box(7217, 7217), - Box(7218, 7218), - Box(7219, 7219), - Box(7220, 7220), - Box(7221, 7221), - Box(7222, 7222), - Box(7223, 7223), - Box(7224, 7224), - Box(7225, 7225), - Box(7226, 7226), - Box(7227, 7227), - Box(7228, 7228), - Box(7229, 7229), - Box(7230, 7230), - Box(7231, 7231), - Box(7232, 7232), - Box(7233, 7233), - Box(7234, 7234), - Box(7235, 7235), - Box(7236, 7236), - Box(7237, 7237), - Box(7238, 7238), - Box(7239, 7239), - Box(7240, 7240), - Box(7241, 7241), - Box(7242, 7242), - Box(7243, 7243), - Box(7244, 7244), - Box(7245, 7245), - Box(7246, 7246), - Box(7247, 7247), - Box(7248, 7248), - Box(7249, 7249), - Box(7250, 7250), - Box(7251, 7251), - Box(7252, 7252), - Box(7253, 7253), - Box(7254, 7254), - Box(7255, 7255), - Box(7256, 7256), - Box(7257, 7257), - Box(7258, 7258), - Box(7259, 7259), - Box(7260, 7260), - Box(7261, 7261), - Box(7262, 7262), - Box(7263, 7263), - Box(7264, 7264), - Box(7265, 7265), - Box(7266, 7266), - Box(7267, 7267), - Box(7268, 7268), - Box(7269, 7269), - Box(7270, 7270), - Box(7271, 7271), - Box(7272, 7272), - Box(7273, 7273), - Box(7274, 7274), - Box(7275, 7275), - Box(7276, 7276), - Box(7277, 7277), - Box(7278, 7278), - Box(7279, 7279), - Box(7280, 7280), - Box(7281, 7281), - Box(7282, 7282), - Box(7283, 7283), - Box(7284, 7284), - Box(7285, 7285), - Box(7286, 7286), - Box(7287, 7287), - Box(7288, 7288), - Box(7289, 7289), - Box(7290, 7290), - Box(7291, 7291), - Box(7292, 7292), - Box(7293, 7293), - Box(7294, 7294), - Box(7295, 7295), - Box(7296, 7296), - Box(7297, 7297), - Box(7298, 7298), - Box(7299, 7299), - Box(7300, 7300), - Box(7301, 7301), - Box(7302, 7302), - Box(7303, 7303), - Box(7304, 7304), - Box(7305, 7305), - Box(7306, 7306), - Box(7307, 7307), - Box(7308, 7308), - Box(7309, 7309), - Box(7310, 7310), - Box(7311, 7311), - Box(7312, 7312), - Box(7313, 7313), - Box(7314, 7314), - Box(7315, 7315), - Box(7316, 7316), - Box(7317, 7317), - Box(7318, 7318), - Box(7319, 7319), - Box(7320, 7320), - Box(7321, 7321), - Box(7322, 7322), - Box(7323, 7323), - Box(7324, 7324), - Box(7325, 7325), - Box(7326, 7326), - Box(7327, 7327), - Box(7328, 7328), - Box(7329, 7329), - Box(7330, 7330), - Box(7331, 7331), - Box(7332, 7332), - Box(7333, 7333), - Box(7334, 7334), - Box(7335, 7335), - Box(7336, 7336), - Box(7337, 7337), - Box(7338, 7338), - Box(7339, 7339), - Box(7340, 7340), - Box(7341, 7341), - Box(7342, 7342), - Box(7343, 7343), - Box(7344, 7344), - Box(7345, 7345), - Box(7346, 7346), - Box(7347, 7347), - Box(7348, 7348), - Box(7349, 7349), - Box(7350, 7350), - Box(7351, 7351), - Box(7352, 7352), - Box(7353, 7353), - Box(7354, 7354), - Box(7355, 7355), - Box(7356, 7356), - Box(7357, 7357), - Box(7358, 7358), - Box(7359, 7359), - Box(7360, 7360), - Box(7361, 7361), - Box(7362, 7362), - Box(7363, 7363), - Box(7364, 7364), - Box(7365, 7365), - Box(7366, 7366), - Box(7367, 7367), - Box(7368, 7368), - Box(7369, 7369), - Box(7370, 7370), - Box(7371, 7371), - Box(7372, 7372), - Box(7373, 7373), - Box(7374, 7374), - Box(7375, 7375), - Box(7376, 7376), - Box(7377, 7377), - Box(7378, 7378), - Box(7379, 7379), - Box(7380, 7380), - Box(7381, 7381), - Box(7382, 7382), - Box(7383, 7383), - Box(7384, 7384), - Box(7385, 7385), - Box(7386, 7386), - Box(7387, 7387), - Box(7388, 7388), - Box(7389, 7389), - Box(7390, 7390), - Box(7391, 7391), - Box(7392, 7392), - Box(7393, 7393), - Box(7394, 7394), - Box(7395, 7395), - Box(7396, 7396), - Box(7397, 7397), - Box(7398, 7398), - Box(7399, 7399), - Box(7400, 7400), - Box(7401, 7401), - Box(7402, 7402), - Box(7403, 7403), - Box(7404, 7404), - Box(7405, 7405), - Box(7406, 7406), - Box(7407, 7407), - Box(7408, 7408), - Box(7409, 7409), - Box(7410, 7410), - Box(7411, 7411), - Box(7412, 7412), - Box(7413, 7413), - Box(7414, 7414), - Box(7415, 7415), - Box(7416, 7416), - Box(7417, 7417), - Box(7418, 7418), - Box(7419, 7419), - Box(7420, 7420), - Box(7421, 7421), - Box(7422, 7422), - Box(7423, 7423), - Box(7424, 7424), - Box(7425, 7425), - Box(7426, 7426), - Box(7427, 7427), - Box(7428, 7428), - Box(7429, 7429), - Box(7430, 7430), - Box(7431, 7431), - Box(7432, 7432), - Box(7433, 7433), - Box(7434, 7434), - Box(7435, 7435), - Box(7436, 7436), - Box(7437, 7437), - Box(7438, 7438), - Box(7439, 7439), - Box(7440, 7440), - Box(7441, 7441), - Box(7442, 7442), - Box(7443, 7443), - Box(7444, 7444), - Box(7445, 7445), - Box(7446, 7446), - Box(7447, 7447), - Box(7448, 7448), - Box(7449, 7449), - Box(7450, 7450), - Box(7451, 7451), - Box(7452, 7452), - Box(7453, 7453), - Box(7454, 7454), - Box(7455, 7455), - Box(7456, 7456), - Box(7457, 7457), - Box(7458, 7458), - Box(7459, 7459), - Box(7460, 7460), - Box(7461, 7461), - Box(7462, 7462), - Box(7463, 7463), - Box(7464, 7464), - Box(7465, 7465), - Box(7466, 7466), - Box(7467, 7467), - Box(7468, 7468), - Box(7469, 7469), - Box(7470, 7470), - Box(7471, 7471), - Box(7472, 7472), - Box(7473, 7473), - Box(7474, 7474), - Box(7475, 7475), - Box(7476, 7476), - Box(7477, 7477), - Box(7478, 7478), - Box(7479, 7479), - Box(7480, 7480), - Box(7481, 7481), - Box(7482, 7482), - Box(7483, 7483), - Box(7484, 7484), - Box(7485, 7485), - Box(7486, 7486), - Box(7487, 7487), - Box(7488, 7488), - Box(7489, 7489), - Box(7490, 7490), - Box(7491, 7491), - Box(7492, 7492), - Box(7493, 7493), - Box(7494, 7494), - Box(7495, 7495), - Box(7496, 7496), - Box(7497, 7497), - Box(7498, 7498), - Box(7499, 7499), - Box(7500, 7500), - Box(7501, 7501), - Box(7502, 7502), - Box(7503, 7503), - Box(7504, 7504), - Box(7505, 7505), - Box(7506, 7506), - Box(7507, 7507), - Box(7508, 7508), - Box(7509, 7509), - Box(7510, 7510), - Box(7511, 7511), - Box(7512, 7512), - Box(7513, 7513), - Box(7514, 7514), - Box(7515, 7515), - Box(7516, 7516), - Box(7517, 7517), - Box(7518, 7518), - Box(7519, 7519), - Box(7520, 7520), - Box(7521, 7521), - Box(7522, 7522), - Box(7523, 7523), - Box(7524, 7524), - Box(7525, 7525), - Box(7526, 7526), - Box(7527, 7527), - Box(7528, 7528), - Box(7529, 7529), - Box(7530, 7530), - Box(7531, 7531), - Box(7532, 7532), - Box(7533, 7533), - Box(7534, 7534), - Box(7535, 7535), - Box(7536, 7536), - Box(7537, 7537), - Box(7538, 7538), - Box(7539, 7539), - Box(7540, 7540), - Box(7541, 7541), - Box(7542, 7542), - Box(7543, 7543), - Box(7544, 7544), - Box(7545, 7545), - Box(7546, 7546), - Box(7547, 7547), - Box(7548, 7548), - Box(7549, 7549), - Box(7550, 7550), - Box(7551, 7551), - Box(7552, 7552), - Box(7553, 7553), - Box(7554, 7554), - Box(7555, 7555), - Box(7556, 7556), - Box(7557, 7557), - Box(7558, 7558), - Box(7559, 7559), - Box(7560, 7560), - Box(7561, 7561), - Box(7562, 7562), - Box(7563, 7563), - Box(7564, 7564), - Box(7565, 7565), - Box(7566, 7566), - Box(7567, 7567), - Box(7568, 7568), - Box(7569, 7569), - Box(7570, 7570), - Box(7571, 7571), - Box(7572, 7572), - Box(7573, 7573), - Box(7574, 7574), - Box(7575, 7575), - Box(7576, 7576), - Box(7577, 7577), - Box(7578, 7578), - Box(7579, 7579), - Box(7580, 7580), - Box(7581, 7581), - Box(7582, 7582), - Box(7583, 7583), - Box(7584, 7584), - Box(7585, 7585), - Box(7586, 7586), - Box(7587, 7587), - Box(7588, 7588), - Box(7589, 7589), - Box(7590, 7590), - Box(7591, 7591), - Box(7592, 7592), - Box(7593, 7593), - Box(7594, 7594), - Box(7595, 7595), - Box(7596, 7596), - Box(7597, 7597), - Box(7598, 7598), - Box(7599, 7599), - Box(7600, 7600), - Box(7601, 7601), - Box(7602, 7602), - Box(7603, 7603), - Box(7604, 7604), - Box(7605, 7605), - Box(7606, 7606), - Box(7607, 7607), - Box(7608, 7608), - Box(7609, 7609), - Box(7610, 7610), - Box(7611, 7611), - Box(7612, 7612), - Box(7613, 7613), - Box(7614, 7614), - Box(7615, 7615), - Box(7616, 7616), - Box(7617, 7617), - Box(7618, 7618), - Box(7619, 7619), - Box(7620, 7620), - Box(7621, 7621), - Box(7622, 7622), - Box(7623, 7623), - Box(7624, 7624), - Box(7625, 7625), - Box(7626, 7626), - Box(7627, 7627), - Box(7628, 7628), - Box(7629, 7629), - Box(7630, 7630), - Box(7631, 7631), - Box(7632, 7632), - Box(7633, 7633), - Box(7634, 7634), - Box(7635, 7635), - Box(7636, 7636), - Box(7637, 7637), - Box(7638, 7638), - Box(7639, 7639), - Box(7640, 7640), - Box(7641, 7641), - Box(7642, 7642), - Box(7643, 7643), - Box(7644, 7644), - Box(7645, 7645), - Box(7646, 7646), - Box(7647, 7647), - Box(7648, 7648), - Box(7649, 7649), - Box(7650, 7650), - Box(7651, 7651), - Box(7652, 7652), - Box(7653, 7653), - Box(7654, 7654), - Box(7655, 7655), - Box(7656, 7656), - Box(7657, 7657), - Box(7658, 7658), - Box(7659, 7659), - Box(7660, 7660), - Box(7661, 7661), - Box(7662, 7662), - Box(7663, 7663), - Box(7664, 7664), - Box(7665, 7665), - Box(7666, 7666), - Box(7667, 7667), - Box(7668, 7668), - Box(7669, 7669), - Box(7670, 7670), - Box(7671, 7671), - Box(7672, 7672), - Box(7673, 7673), - Box(7674, 7674), - Box(7675, 7675), - Box(7676, 7676), - Box(7677, 7677), - Box(7678, 7678), - Box(7679, 7679), - Box(7680, 7680), - Box(7681, 7681), - Box(7682, 7682), - Box(7683, 7683), - Box(7684, 7684), - Box(7685, 7685), - Box(7686, 7686), - Box(7687, 7687), - Box(7688, 7688), - Box(7689, 7689), - Box(7690, 7690), - Box(7691, 7691), - Box(7692, 7692), - Box(7693, 7693), - Box(7694, 7694), - Box(7695, 7695), - Box(7696, 7696), - Box(7697, 7697), - Box(7698, 7698), - Box(7699, 7699), - Box(7700, 7700), - Box(7701, 7701), - Box(7702, 7702), - Box(7703, 7703), - Box(7704, 7704), - Box(7705, 7705), - Box(7706, 7706), - Box(7707, 7707), - Box(7708, 7708), - Box(7709, 7709), - Box(7710, 7710), - Box(7711, 7711), - Box(7712, 7712), - Box(7713, 7713), - Box(7714, 7714), - Box(7715, 7715), - Box(7716, 7716), - Box(7717, 7717), - Box(7718, 7718), - Box(7719, 7719), - Box(7720, 7720), - Box(7721, 7721), - Box(7722, 7722), - Box(7723, 7723), - Box(7724, 7724), - Box(7725, 7725), - Box(7726, 7726), - Box(7727, 7727), - Box(7728, 7728), - Box(7729, 7729), - Box(7730, 7730), - Box(7731, 7731), - Box(7732, 7732), - Box(7733, 7733), - Box(7734, 7734), - Box(7735, 7735), - Box(7736, 7736), - Box(7737, 7737), - Box(7738, 7738), - Box(7739, 7739), - Box(7740, 7740), - Box(7741, 7741), - Box(7742, 7742), - Box(7743, 7743), - Box(7744, 7744), - Box(7745, 7745), - Box(7746, 7746), - Box(7747, 7747), - Box(7748, 7748), - Box(7749, 7749), - Box(7750, 7750), - Box(7751, 7751), - Box(7752, 7752), - Box(7753, 7753), - Box(7754, 7754), - Box(7755, 7755), - Box(7756, 7756), - Box(7757, 7757), - Box(7758, 7758), - Box(7759, 7759), - Box(7760, 7760), - Box(7761, 7761), - Box(7762, 7762), - Box(7763, 7763), - Box(7764, 7764), - Box(7765, 7765), - Box(7766, 7766), - Box(7767, 7767), - Box(7768, 7768), - Box(7769, 7769), - Box(7770, 7770), - Box(7771, 7771), - Box(7772, 7772), - Box(7773, 7773), - Box(7774, 7774), - Box(7775, 7775), - Box(7776, 7776), - Box(7777, 7777), - Box(7778, 7778), - Box(7779, 7779), - Box(7780, 7780), - Box(7781, 7781), - Box(7782, 7782), - Box(7783, 7783), - Box(7784, 7784), - Box(7785, 7785), - Box(7786, 7786), - Box(7787, 7787), - Box(7788, 7788), - Box(7789, 7789), - Box(7790, 7790), - Box(7791, 7791), - Box(7792, 7792), - Box(7793, 7793), - Box(7794, 7794), - Box(7795, 7795), - Box(7796, 7796), - Box(7797, 7797), - Box(7798, 7798), - Box(7799, 7799), - Box(7800, 7800), - Box(7801, 7801), - Box(7802, 7802), - Box(7803, 7803), - Box(7804, 7804), - Box(7805, 7805), - Box(7806, 7806), - Box(7807, 7807), - Box(7808, 7808), - Box(7809, 7809), - Box(7810, 7810), - Box(7811, 7811), - Box(7812, 7812), - Box(7813, 7813), - Box(7814, 7814), - Box(7815, 7815), - Box(7816, 7816), - Box(7817, 7817), - Box(7818, 7818), - Box(7819, 7819), - Box(7820, 7820), - Box(7821, 7821), - Box(7822, 7822), - Box(7823, 7823), - Box(7824, 7824), - Box(7825, 7825), - Box(7826, 7826), - Box(7827, 7827), - Box(7828, 7828), - Box(7829, 7829), - Box(7830, 7830), - Box(7831, 7831), - Box(7832, 7832), - Box(7833, 7833), - Box(7834, 7834), - Box(7835, 7835), - Box(7836, 7836), - Box(7837, 7837), - Box(7838, 7838), - Box(7839, 7839), - Box(7840, 7840), - Box(7841, 7841), - Box(7842, 7842), - Box(7843, 7843), - Box(7844, 7844), - Box(7845, 7845), - Box(7846, 7846), - Box(7847, 7847), - Box(7848, 7848), - Box(7849, 7849), - Box(7850, 7850), - Box(7851, 7851), - Box(7852, 7852), - Box(7853, 7853), - Box(7854, 7854), - Box(7855, 7855), - Box(7856, 7856), - Box(7857, 7857), - Box(7858, 7858), - Box(7859, 7859), - Box(7860, 7860), - Box(7861, 7861), - Box(7862, 7862), - Box(7863, 7863), - Box(7864, 7864), - Box(7865, 7865), - Box(7866, 7866), - Box(7867, 7867), - Box(7868, 7868), - Box(7869, 7869), - Box(7870, 7870), - Box(7871, 7871), - Box(7872, 7872), - Box(7873, 7873), - Box(7874, 7874), - Box(7875, 7875), - Box(7876, 7876), - Box(7877, 7877), - Box(7878, 7878), - Box(7879, 7879), - Box(7880, 7880), - Box(7881, 7881), - Box(7882, 7882), - Box(7883, 7883), - Box(7884, 7884), - Box(7885, 7885), - Box(7886, 7886), - Box(7887, 7887), - Box(7888, 7888), - Box(7889, 7889), - Box(7890, 7890), - Box(7891, 7891), - Box(7892, 7892), - Box(7893, 7893), - Box(7894, 7894), - Box(7895, 7895), - Box(7896, 7896), - Box(7897, 7897), - Box(7898, 7898), - Box(7899, 7899), - Box(7900, 7900), - Box(7901, 7901), - Box(7902, 7902), - Box(7903, 7903), - Box(7904, 7904), - Box(7905, 7905), - Box(7906, 7906), - Box(7907, 7907), - Box(7908, 7908), - Box(7909, 7909), - Box(7910, 7910), - Box(7911, 7911), - Box(7912, 7912), - Box(7913, 7913), - Box(7914, 7914), - Box(7915, 7915), - Box(7916, 7916), - Box(7917, 7917), - Box(7918, 7918), - Box(7919, 7919), - Box(7920, 7920), - Box(7921, 7921), - Box(7922, 7922), - Box(7923, 7923), - Box(7924, 7924), - Box(7925, 7925), - Box(7926, 7926), - Box(7927, 7927), - Box(7928, 7928), - Box(7929, 7929), - Box(7930, 7930), - Box(7931, 7931), - Box(7932, 7932), - Box(7933, 7933), - Box(7934, 7934), - Box(7935, 7935), - Box(7936, 7936), - Box(7937, 7937), - Box(7938, 7938), - Box(7939, 7939), - Box(7940, 7940), - Box(7941, 7941), - Box(7942, 7942), - Box(7943, 7943), - Box(7944, 7944), - Box(7945, 7945), - Box(7946, 7946), - Box(7947, 7947), - Box(7948, 7948), - Box(7949, 7949), - Box(7950, 7950), - Box(7951, 7951), - Box(7952, 7952), - Box(7953, 7953), - Box(7954, 7954), - Box(7955, 7955), - Box(7956, 7956), - Box(7957, 7957), - Box(7958, 7958), - Box(7959, 7959), - Box(7960, 7960), - Box(7961, 7961), - Box(7962, 7962), - Box(7963, 7963), - Box(7964, 7964), - Box(7965, 7965), - Box(7966, 7966), - Box(7967, 7967), - Box(7968, 7968), - Box(7969, 7969), - Box(7970, 7970), - Box(7971, 7971), - Box(7972, 7972), - Box(7973, 7973), - Box(7974, 7974), - Box(7975, 7975), - Box(7976, 7976), - Box(7977, 7977), - Box(7978, 7978), - Box(7979, 7979), - Box(7980, 7980), - Box(7981, 7981), - Box(7982, 7982), - Box(7983, 7983), - Box(7984, 7984), - Box(7985, 7985), - Box(7986, 7986), - Box(7987, 7987), - Box(7988, 7988), - Box(7989, 7989), - Box(7990, 7990), - Box(7991, 7991), - Box(7992, 7992), - Box(7993, 7993), - Box(7994, 7994), - Box(7995, 7995), - Box(7996, 7996), - Box(7997, 7997), - Box(7998, 7998), - Box(7999, 7999), - Box(8000, 8000), - Box(8001, 8001), - Box(8002, 8002), - Box(8003, 8003), - Box(8004, 8004), - Box(8005, 8005), - Box(8006, 8006), - Box(8007, 8007), - Box(8008, 8008), - Box(8009, 8009), - Box(8010, 8010), - Box(8011, 8011), - Box(8012, 8012), - Box(8013, 8013), - Box(8014, 8014), - Box(8015, 8015), - Box(8016, 8016), - Box(8017, 8017), - Box(8018, 8018), - Box(8019, 8019), - Box(8020, 8020), - Box(8021, 8021), - Box(8022, 8022), - Box(8023, 8023), - Box(8024, 8024), - Box(8025, 8025), - Box(8026, 8026), - Box(8027, 8027), - Box(8028, 8028), - Box(8029, 8029), - Box(8030, 8030), - Box(8031, 8031), - Box(8032, 8032), - Box(8033, 8033), - Box(8034, 8034), - Box(8035, 8035), - Box(8036, 8036), - Box(8037, 8037), - Box(8038, 8038), - Box(8039, 8039), - Box(8040, 8040), - Box(8041, 8041), - Box(8042, 8042), - Box(8043, 8043), - Box(8044, 8044), - Box(8045, 8045), - Box(8046, 8046), - Box(8047, 8047), - Box(8048, 8048), - Box(8049, 8049), - Box(8050, 8050), - Box(8051, 8051), - Box(8052, 8052), - Box(8053, 8053), - Box(8054, 8054), - Box(8055, 8055), - Box(8056, 8056), - Box(8057, 8057), - Box(8058, 8058), - Box(8059, 8059), - Box(8060, 8060), - Box(8061, 8061), - Box(8062, 8062), - Box(8063, 8063), - Box(8064, 8064), - Box(8065, 8065), - Box(8066, 8066), - Box(8067, 8067), - Box(8068, 8068), - Box(8069, 8069), - Box(8070, 8070), - Box(8071, 8071), - Box(8072, 8072), - Box(8073, 8073), - Box(8074, 8074), - Box(8075, 8075), - Box(8076, 8076), - Box(8077, 8077), - Box(8078, 8078), - Box(8079, 8079), - Box(8080, 8080), - Box(8081, 8081), - Box(8082, 8082), - Box(8083, 8083), - Box(8084, 8084), - Box(8085, 8085), - Box(8086, 8086), - Box(8087, 8087), - Box(8088, 8088), - Box(8089, 8089), - Box(8090, 8090), - Box(8091, 8091), - Box(8092, 8092), - Box(8093, 8093), - Box(8094, 8094), - Box(8095, 8095), - Box(8096, 8096), - Box(8097, 8097), - Box(8098, 8098), - Box(8099, 8099), - Box(8100, 8100), - Box(8101, 8101), - Box(8102, 8102), - Box(8103, 8103), - Box(8104, 8104), - Box(8105, 8105), - Box(8106, 8106), - Box(8107, 8107), - Box(8108, 8108), - Box(8109, 8109), - Box(8110, 8110), - Box(8111, 8111), - Box(8112, 8112), - Box(8113, 8113), - Box(8114, 8114), - Box(8115, 8115), - Box(8116, 8116), - Box(8117, 8117), - Box(8118, 8118), - Box(8119, 8119), - Box(8120, 8120), - Box(8121, 8121), - Box(8122, 8122), - Box(8123, 8123), - Box(8124, 8124), - Box(8125, 8125), - Box(8126, 8126), - Box(8127, 8127), - Box(8128, 8128), - Box(8129, 8129), - Box(8130, 8130), - Box(8131, 8131), - Box(8132, 8132), - Box(8133, 8133), - Box(8134, 8134), - Box(8135, 8135), - Box(8136, 8136), - Box(8137, 8137), - Box(8138, 8138), - Box(8139, 8139), - Box(8140, 8140), - Box(8141, 8141), - Box(8142, 8142), - Box(8143, 8143), - Box(8144, 8144), - Box(8145, 8145), - Box(8146, 8146), - Box(8147, 8147), - Box(8148, 8148), - Box(8149, 8149), - Box(8150, 8150), - Box(8151, 8151), - Box(8152, 8152), - Box(8153, 8153), - Box(8154, 8154), - Box(8155, 8155), - Box(8156, 8156), - Box(8157, 8157), - Box(8158, 8158), - Box(8159, 8159), - Box(8160, 8160), - Box(8161, 8161), - Box(8162, 8162), - Box(8163, 8163), - Box(8164, 8164), - Box(8165, 8165), - Box(8166, 8166), - Box(8167, 8167), - Box(8168, 8168), - Box(8169, 8169), - Box(8170, 8170), - Box(8171, 8171), - Box(8172, 8172), - Box(8173, 8173), - Box(8174, 8174), - Box(8175, 8175), - Box(8176, 8176), - Box(8177, 8177), - Box(8178, 8178), - Box(8179, 8179), - Box(8180, 8180), - Box(8181, 8181), - Box(8182, 8182), - Box(8183, 8183), - Box(8184, 8184), - Box(8185, 8185), - Box(8186, 8186), - Box(8187, 8187), - Box(8188, 8188), - Box(8189, 8189), - Box(8190, 8190), - Box(8191, 8191), - Box(8192, 8192), - Box(8193, 8193), - Box(8194, 8194), - Box(8195, 8195), - Box(8196, 8196), - Box(8197, 8197), - Box(8198, 8198), - Box(8199, 8199), - Box(8200, 8200), - Box(8201, 8201), - Box(8202, 8202), - Box(8203, 8203), - Box(8204, 8204), - Box(8205, 8205), - Box(8206, 8206), - Box(8207, 8207), - Box(8208, 8208), - Box(8209, 8209), - Box(8210, 8210), - Box(8211, 8211), - Box(8212, 8212), - Box(8213, 8213), - Box(8214, 8214), - Box(8215, 8215), - Box(8216, 8216), - Box(8217, 8217), - Box(8218, 8218), - Box(8219, 8219), - Box(8220, 8220), - Box(8221, 8221), - Box(8222, 8222), - Box(8223, 8223), - Box(8224, 8224), - Box(8225, 8225), - Box(8226, 8226), - Box(8227, 8227), - Box(8228, 8228), - Box(8229, 8229), - Box(8230, 8230), - Box(8231, 8231), - Box(8232, 8232), - Box(8233, 8233), - Box(8234, 8234), - Box(8235, 8235), - Box(8236, 8236), - Box(8237, 8237), - Box(8238, 8238), - Box(8239, 8239), - Box(8240, 8240), - Box(8241, 8241), - Box(8242, 8242), - Box(8243, 8243), - Box(8244, 8244), - Box(8245, 8245), - Box(8246, 8246), - Box(8247, 8247), - Box(8248, 8248), - Box(8249, 8249), - Box(8250, 8250), - Box(8251, 8251), - Box(8252, 8252), - Box(8253, 8253), - Box(8254, 8254), - Box(8255, 8255), - Box(8256, 8256), - Box(8257, 8257), - Box(8258, 8258), - Box(8259, 8259), - Box(8260, 8260), - Box(8261, 8261), - Box(8262, 8262), - Box(8263, 8263), - Box(8264, 8264), - Box(8265, 8265), - Box(8266, 8266), - Box(8267, 8267), - Box(8268, 8268), - Box(8269, 8269), - Box(8270, 8270), - Box(8271, 8271), - Box(8272, 8272), - Box(8273, 8273), - Box(8274, 8274), - Box(8275, 8275), - Box(8276, 8276), - Box(8277, 8277), - Box(8278, 8278), - Box(8279, 8279), - Box(8280, 8280), - Box(8281, 8281), - Box(8282, 8282), - Box(8283, 8283), - Box(8284, 8284), - Box(8285, 8285), - Box(8286, 8286), - Box(8287, 8287), - Box(8288, 8288), - Box(8289, 8289), - Box(8290, 8290), - Box(8291, 8291), - Box(8292, 8292), - Box(8293, 8293), - Box(8294, 8294), - Box(8295, 8295), - Box(8296, 8296), - Box(8297, 8297), - Box(8298, 8298), - Box(8299, 8299), - Box(8300, 8300), - Box(8301, 8301), - Box(8302, 8302), - Box(8303, 8303), - Box(8304, 8304), - Box(8305, 8305), - Box(8306, 8306), - Box(8307, 8307), - Box(8308, 8308), - Box(8309, 8309), - Box(8310, 8310), - Box(8311, 8311), - Box(8312, 8312), - Box(8313, 8313), - Box(8314, 8314), - Box(8315, 8315), - Box(8316, 8316), - Box(8317, 8317), - Box(8318, 8318), - Box(8319, 8319), - Box(8320, 8320), - Box(8321, 8321), - Box(8322, 8322), - Box(8323, 8323), - Box(8324, 8324), - Box(8325, 8325), - Box(8326, 8326), - Box(8327, 8327), - Box(8328, 8328), - Box(8329, 8329), - Box(8330, 8330), - Box(8331, 8331), - Box(8332, 8332), - Box(8333, 8333), - Box(8334, 8334), - Box(8335, 8335), - Box(8336, 8336), - Box(8337, 8337), - Box(8338, 8338), - Box(8339, 8339), - Box(8340, 8340), - Box(8341, 8341), - Box(8342, 8342), - Box(8343, 8343), - Box(8344, 8344), - Box(8345, 8345), - Box(8346, 8346), - Box(8347, 8347), - Box(8348, 8348), - Box(8349, 8349), - Box(8350, 8350), - Box(8351, 8351), - Box(8352, 8352), - Box(8353, 8353), - Box(8354, 8354), - Box(8355, 8355), - Box(8356, 8356), - Box(8357, 8357), - Box(8358, 8358), - Box(8359, 8359), - Box(8360, 8360), - Box(8361, 8361), - Box(8362, 8362), - Box(8363, 8363), - Box(8364, 8364), - Box(8365, 8365), - Box(8366, 8366), - Box(8367, 8367), - Box(8368, 8368), - Box(8369, 8369), - Box(8370, 8370), - Box(8371, 8371), - Box(8372, 8372), - Box(8373, 8373), - Box(8374, 8374), - Box(8375, 8375), - Box(8376, 8376), - Box(8377, 8377), - Box(8378, 8378), - Box(8379, 8379), - Box(8380, 8380), - Box(8381, 8381), - Box(8382, 8382), - Box(8383, 8383), - Box(8384, 8384), - Box(8385, 8385), - Box(8386, 8386), - Box(8387, 8387), - Box(8388, 8388), - Box(8389, 8389), - Box(8390, 8390), - Box(8391, 8391), - Box(8392, 8392), - Box(8393, 8393), - Box(8394, 8394), - Box(8395, 8395), - Box(8396, 8396), - Box(8397, 8397), - Box(8398, 8398), - Box(8399, 8399), - Box(8400, 8400), - Box(8401, 8401), - Box(8402, 8402), - Box(8403, 8403), - Box(8404, 8404), - Box(8405, 8405), - Box(8406, 8406), - Box(8407, 8407), - Box(8408, 8408), - Box(8409, 8409), - Box(8410, 8410), - Box(8411, 8411), - Box(8412, 8412), - Box(8413, 8413), - Box(8414, 8414), - Box(8415, 8415), - Box(8416, 8416), - Box(8417, 8417), - Box(8418, 8418), - Box(8419, 8419), - Box(8420, 8420), - Box(8421, 8421), - Box(8422, 8422), - Box(8423, 8423), - Box(8424, 8424), - Box(8425, 8425), - Box(8426, 8426), - Box(8427, 8427), - Box(8428, 8428), - Box(8429, 8429), - Box(8430, 8430), - Box(8431, 8431), - Box(8432, 8432), - Box(8433, 8433), - Box(8434, 8434), - Box(8435, 8435), - Box(8436, 8436), - Box(8437, 8437), - Box(8438, 8438), - Box(8439, 8439), - Box(8440, 8440), - Box(8441, 8441), - Box(8442, 8442), - Box(8443, 8443), - Box(8444, 8444), - Box(8445, 8445), - Box(8446, 8446), - Box(8447, 8447), - Box(8448, 8448), - Box(8449, 8449), - Box(8450, 8450), - Box(8451, 8451), - Box(8452, 8452), - Box(8453, 8453), - Box(8454, 8454), - Box(8455, 8455), - Box(8456, 8456), - Box(8457, 8457), - Box(8458, 8458), - Box(8459, 8459), - Box(8460, 8460), - Box(8461, 8461), - Box(8462, 8462), - Box(8463, 8463), - Box(8464, 8464), - Box(8465, 8465), - Box(8466, 8466), - Box(8467, 8467), - Box(8468, 8468), - Box(8469, 8469), - Box(8470, 8470), - Box(8471, 8471), - Box(8472, 8472), - Box(8473, 8473), - Box(8474, 8474), - Box(8475, 8475), - Box(8476, 8476), - Box(8477, 8477), - Box(8478, 8478), - Box(8479, 8479), - Box(8480, 8480), - Box(8481, 8481), - Box(8482, 8482), - Box(8483, 8483), - Box(8484, 8484), - Box(8485, 8485), - Box(8486, 8486), - Box(8487, 8487), - Box(8488, 8488), - Box(8489, 8489), - Box(8490, 8490), - Box(8491, 8491), - Box(8492, 8492), - Box(8493, 8493), - Box(8494, 8494), - Box(8495, 8495), - Box(8496, 8496), - Box(8497, 8497), - Box(8498, 8498), - Box(8499, 8499), - Box(8500, 8500), - Box(8501, 8501), - Box(8502, 8502), - Box(8503, 8503), - Box(8504, 8504), - Box(8505, 8505), - Box(8506, 8506), - Box(8507, 8507), - Box(8508, 8508), - Box(8509, 8509), - Box(8510, 8510), - Box(8511, 8511), - Box(8512, 8512), - Box(8513, 8513), - Box(8514, 8514), - Box(8515, 8515), - Box(8516, 8516), - Box(8517, 8517), - Box(8518, 8518), - Box(8519, 8519), - Box(8520, 8520), - Box(8521, 8521), - Box(8522, 8522), - Box(8523, 8523), - Box(8524, 8524), - Box(8525, 8525), - Box(8526, 8526), - Box(8527, 8527), - Box(8528, 8528), - Box(8529, 8529), - Box(8530, 8530), - Box(8531, 8531), - Box(8532, 8532), - Box(8533, 8533), - Box(8534, 8534), - Box(8535, 8535), - Box(8536, 8536), - Box(8537, 8537), - Box(8538, 8538), - Box(8539, 8539), - Box(8540, 8540), - Box(8541, 8541), - Box(8542, 8542), - Box(8543, 8543), - Box(8544, 8544), - Box(8545, 8545), - Box(8546, 8546), - Box(8547, 8547), - Box(8548, 8548), - Box(8549, 8549), - Box(8550, 8550), - Box(8551, 8551), - Box(8552, 8552), - Box(8553, 8553), - Box(8554, 8554), - Box(8555, 8555), - Box(8556, 8556), - Box(8557, 8557), - Box(8558, 8558), - Box(8559, 8559), - Box(8560, 8560), - Box(8561, 8561), - Box(8562, 8562), - Box(8563, 8563), - Box(8564, 8564), - Box(8565, 8565), - Box(8566, 8566), - Box(8567, 8567), - Box(8568, 8568), - Box(8569, 8569), - Box(8570, 8570), - Box(8571, 8571), - Box(8572, 8572), - Box(8573, 8573), - Box(8574, 8574), - Box(8575, 8575), - Box(8576, 8576), - Box(8577, 8577), - Box(8578, 8578), - Box(8579, 8579), - Box(8580, 8580), - Box(8581, 8581), - Box(8582, 8582), - Box(8583, 8583), - Box(8584, 8584), - Box(8585, 8585), - Box(8586, 8586), - Box(8587, 8587), - Box(8588, 8588), - Box(8589, 8589), - Box(8590, 8590), - Box(8591, 8591), - Box(8592, 8592), - Box(8593, 8593), - Box(8594, 8594), - Box(8595, 8595), - Box(8596, 8596), - Box(8597, 8597), - Box(8598, 8598), - Box(8599, 8599), - Box(8600, 8600), - Box(8601, 8601), - Box(8602, 8602), - Box(8603, 8603), - Box(8604, 8604), - Box(8605, 8605), - Box(8606, 8606), - Box(8607, 8607), - Box(8608, 8608), - Box(8609, 8609), - Box(8610, 8610), - Box(8611, 8611), - Box(8612, 8612), - Box(8613, 8613), - Box(8614, 8614), - Box(8615, 8615), - Box(8616, 8616), - Box(8617, 8617), - Box(8618, 8618), - Box(8619, 8619), - Box(8620, 8620), - Box(8621, 8621), - Box(8622, 8622), - Box(8623, 8623), - Box(8624, 8624), - Box(8625, 8625), - Box(8626, 8626), - Box(8627, 8627), - Box(8628, 8628), - Box(8629, 8629), - Box(8630, 8630), - Box(8631, 8631), - Box(8632, 8632), - Box(8633, 8633), - Box(8634, 8634), - Box(8635, 8635), - Box(8636, 8636), - Box(8637, 8637), - Box(8638, 8638), - Box(8639, 8639), - Box(8640, 8640), - Box(8641, 8641), - Box(8642, 8642), - Box(8643, 8643), - Box(8644, 8644), - Box(8645, 8645), - Box(8646, 8646), - Box(8647, 8647), - Box(8648, 8648), - Box(8649, 8649), - Box(8650, 8650), - Box(8651, 8651), - Box(8652, 8652), - Box(8653, 8653), - Box(8654, 8654), - Box(8655, 8655), - Box(8656, 8656), - Box(8657, 8657), - Box(8658, 8658), - Box(8659, 8659), - Box(8660, 8660), - Box(8661, 8661), - Box(8662, 8662), - Box(8663, 8663), - Box(8664, 8664), - Box(8665, 8665), - Box(8666, 8666), - Box(8667, 8667), - Box(8668, 8668), - Box(8669, 8669), - Box(8670, 8670), - Box(8671, 8671), - Box(8672, 8672), - Box(8673, 8673), - Box(8674, 8674), - Box(8675, 8675), - Box(8676, 8676), - Box(8677, 8677), - Box(8678, 8678), - Box(8679, 8679), - Box(8680, 8680), - Box(8681, 8681), - Box(8682, 8682), - Box(8683, 8683), - Box(8684, 8684), - Box(8685, 8685), - Box(8686, 8686), - Box(8687, 8687), - Box(8688, 8688), - Box(8689, 8689), - Box(8690, 8690), - Box(8691, 8691), - Box(8692, 8692), - Box(8693, 8693), - Box(8694, 8694), - Box(8695, 8695), - Box(8696, 8696), - Box(8697, 8697), - Box(8698, 8698), - Box(8699, 8699), - Box(8700, 8700), - Box(8701, 8701), - Box(8702, 8702), - Box(8703, 8703), - Box(8704, 8704), - Box(8705, 8705), - Box(8706, 8706), - Box(8707, 8707), - Box(8708, 8708), - Box(8709, 8709), - Box(8710, 8710), - Box(8711, 8711), - Box(8712, 8712), - Box(8713, 8713), - Box(8714, 8714), - Box(8715, 8715), - Box(8716, 8716), - Box(8717, 8717), - Box(8718, 8718), - Box(8719, 8719), - Box(8720, 8720), - Box(8721, 8721), - Box(8722, 8722), - Box(8723, 8723), - Box(8724, 8724), - Box(8725, 8725), - Box(8726, 8726), - Box(8727, 8727), - Box(8728, 8728), - Box(8729, 8729), - Box(8730, 8730), - Box(8731, 8731), - Box(8732, 8732), - Box(8733, 8733), - Box(8734, 8734), - Box(8735, 8735), - Box(8736, 8736), - Box(8737, 8737), - Box(8738, 8738), - Box(8739, 8739), - Box(8740, 8740), - Box(8741, 8741), - Box(8742, 8742), - Box(8743, 8743), - Box(8744, 8744), - Box(8745, 8745), - Box(8746, 8746), - Box(8747, 8747), - Box(8748, 8748), - Box(8749, 8749), - Box(8750, 8750), - Box(8751, 8751), - Box(8752, 8752), - Box(8753, 8753), - Box(8754, 8754), - Box(8755, 8755), - Box(8756, 8756), - Box(8757, 8757), - Box(8758, 8758), - Box(8759, 8759), - Box(8760, 8760), - Box(8761, 8761), - Box(8762, 8762), - Box(8763, 8763), - Box(8764, 8764), - Box(8765, 8765), - Box(8766, 8766), - Box(8767, 8767), - Box(8768, 8768), - Box(8769, 8769), - Box(8770, 8770), - Box(8771, 8771), - Box(8772, 8772), - Box(8773, 8773), - Box(8774, 8774), - Box(8775, 8775), - Box(8776, 8776), - Box(8777, 8777), - Box(8778, 8778), - Box(8779, 8779), - Box(8780, 8780), - Box(8781, 8781), - Box(8782, 8782), - Box(8783, 8783), - Box(8784, 8784), - Box(8785, 8785), - Box(8786, 8786), - Box(8787, 8787), - Box(8788, 8788), - Box(8789, 8789), - Box(8790, 8790), - Box(8791, 8791), - Box(8792, 8792), - Box(8793, 8793), - Box(8794, 8794), - Box(8795, 8795), - Box(8796, 8796), - Box(8797, 8797), - Box(8798, 8798), - Box(8799, 8799), - Box(8800, 8800), - Box(8801, 8801), - Box(8802, 8802), - Box(8803, 8803), - Box(8804, 8804), - Box(8805, 8805), - Box(8806, 8806), - Box(8807, 8807), - Box(8808, 8808), - Box(8809, 8809), - Box(8810, 8810), - Box(8811, 8811), - Box(8812, 8812), - Box(8813, 8813), - Box(8814, 8814), - Box(8815, 8815), - Box(8816, 8816), - Box(8817, 8817), - Box(8818, 8818), - Box(8819, 8819), - Box(8820, 8820), - Box(8821, 8821), - Box(8822, 8822), - Box(8823, 8823), - Box(8824, 8824), - Box(8825, 8825), - Box(8826, 8826), - Box(8827, 8827), - Box(8828, 8828), - Box(8829, 8829), - Box(8830, 8830), - Box(8831, 8831), - Box(8832, 8832), - Box(8833, 8833), - Box(8834, 8834), - Box(8835, 8835), - Box(8836, 8836), - Box(8837, 8837), - Box(8838, 8838), - Box(8839, 8839), - Box(8840, 8840), - Box(8841, 8841), - Box(8842, 8842), - Box(8843, 8843), - Box(8844, 8844), - Box(8845, 8845), - Box(8846, 8846), - Box(8847, 8847), - Box(8848, 8848), - Box(8849, 8849), - Box(8850, 8850), - Box(8851, 8851), - Box(8852, 8852), - Box(8853, 8853), - Box(8854, 8854), - Box(8855, 8855), - Box(8856, 8856), - Box(8857, 8857), - Box(8858, 8858), - Box(8859, 8859), - Box(8860, 8860), - Box(8861, 8861), - Box(8862, 8862), - Box(8863, 8863), - Box(8864, 8864), - Box(8865, 8865), - Box(8866, 8866), - Box(8867, 8867), - Box(8868, 8868), - Box(8869, 8869), - Box(8870, 8870), - Box(8871, 8871), - Box(8872, 8872), - Box(8873, 8873), - Box(8874, 8874), - Box(8875, 8875), - Box(8876, 8876), - Box(8877, 8877), - Box(8878, 8878), - Box(8879, 8879), - Box(8880, 8880), - Box(8881, 8881), - Box(8882, 8882), - Box(8883, 8883), - Box(8884, 8884), - Box(8885, 8885), - Box(8886, 8886), - Box(8887, 8887), - Box(8888, 8888), - Box(8889, 8889), - Box(8890, 8890), - Box(8891, 8891), - Box(8892, 8892), - Box(8893, 8893), - Box(8894, 8894), - Box(8895, 8895), - Box(8896, 8896), - Box(8897, 8897), - Box(8898, 8898), - Box(8899, 8899), - Box(8900, 8900), - Box(8901, 8901), - Box(8902, 8902), - Box(8903, 8903), - Box(8904, 8904), - Box(8905, 8905), - Box(8906, 8906), - Box(8907, 8907), - Box(8908, 8908), - Box(8909, 8909), - Box(8910, 8910), - Box(8911, 8911), - Box(8912, 8912), - Box(8913, 8913), - Box(8914, 8914), - Box(8915, 8915), - Box(8916, 8916), - Box(8917, 8917), - Box(8918, 8918), - Box(8919, 8919), - Box(8920, 8920), - Box(8921, 8921), - Box(8922, 8922), - Box(8923, 8923), - Box(8924, 8924), - Box(8925, 8925), - Box(8926, 8926), - Box(8927, 8927), - Box(8928, 8928), - Box(8929, 8929), - Box(8930, 8930), - Box(8931, 8931), - Box(8932, 8932), - Box(8933, 8933), - Box(8934, 8934), - Box(8935, 8935), - Box(8936, 8936), - Box(8937, 8937), - Box(8938, 8938), - Box(8939, 8939), - Box(8940, 8940), - Box(8941, 8941), - Box(8942, 8942), - Box(8943, 8943), - Box(8944, 8944), - Box(8945, 8945), - Box(8946, 8946), - Box(8947, 8947), - Box(8948, 8948), - Box(8949, 8949), - Box(8950, 8950), - Box(8951, 8951), - Box(8952, 8952), - Box(8953, 8953), - Box(8954, 8954), - Box(8955, 8955), - Box(8956, 8956), - Box(8957, 8957), - Box(8958, 8958), - Box(8959, 8959), - Box(8960, 8960), - Box(8961, 8961), - Box(8962, 8962), - Box(8963, 8963), - Box(8964, 8964), - Box(8965, 8965), - Box(8966, 8966), - Box(8967, 8967), - Box(8968, 8968), - Box(8969, 8969), - Box(8970, 8970), - Box(8971, 8971), - Box(8972, 8972), - Box(8973, 8973), - Box(8974, 8974), - Box(8975, 8975), - Box(8976, 8976), - Box(8977, 8977), - Box(8978, 8978), - Box(8979, 8979), - Box(8980, 8980), - Box(8981, 8981), - Box(8982, 8982), - Box(8983, 8983), - Box(8984, 8984), - Box(8985, 8985), - Box(8986, 8986), - Box(8987, 8987), - Box(8988, 8988), - Box(8989, 8989), - Box(8990, 8990), - Box(8991, 8991), - Box(8992, 8992), - Box(8993, 8993), - Box(8994, 8994), - Box(8995, 8995), - Box(8996, 8996), - Box(8997, 8997), - Box(8998, 8998), - Box(8999, 8999), - Box(9000, 9000), - Box(9001, 9001), - Box(9002, 9002), - Box(9003, 9003), - Box(9004, 9004), - Box(9005, 9005), - Box(9006, 9006), - Box(9007, 9007), - Box(9008, 9008), - Box(9009, 9009), - Box(9010, 9010), - Box(9011, 9011), - Box(9012, 9012), - Box(9013, 9013), - Box(9014, 9014), - Box(9015, 9015), - Box(9016, 9016), - Box(9017, 9017), - Box(9018, 9018), - Box(9019, 9019), - Box(9020, 9020), - Box(9021, 9021), - Box(9022, 9022), - Box(9023, 9023), - Box(9024, 9024), - Box(9025, 9025), - Box(9026, 9026), - Box(9027, 9027), - Box(9028, 9028), - Box(9029, 9029), - Box(9030, 9030), - Box(9031, 9031), - Box(9032, 9032), - Box(9033, 9033), - Box(9034, 9034), - Box(9035, 9035), - Box(9036, 9036), - Box(9037, 9037), - Box(9038, 9038), - Box(9039, 9039), - Box(9040, 9040), - Box(9041, 9041), - Box(9042, 9042), - Box(9043, 9043), - Box(9044, 9044), - Box(9045, 9045), - Box(9046, 9046), - Box(9047, 9047), - Box(9048, 9048), - Box(9049, 9049), - Box(9050, 9050), - Box(9051, 9051), - Box(9052, 9052), - Box(9053, 9053), - Box(9054, 9054), - Box(9055, 9055), - Box(9056, 9056), - Box(9057, 9057), - Box(9058, 9058), - Box(9059, 9059), - Box(9060, 9060), - Box(9061, 9061), - Box(9062, 9062), - Box(9063, 9063), - Box(9064, 9064), - Box(9065, 9065), - Box(9066, 9066), - Box(9067, 9067), - Box(9068, 9068), - Box(9069, 9069), - Box(9070, 9070), - Box(9071, 9071), - Box(9072, 9072), - Box(9073, 9073), - Box(9074, 9074), - Box(9075, 9075), - Box(9076, 9076), - Box(9077, 9077), - Box(9078, 9078), - Box(9079, 9079), - Box(9080, 9080), - Box(9081, 9081), - Box(9082, 9082), - Box(9083, 9083), - Box(9084, 9084), - Box(9085, 9085), - Box(9086, 9086), - Box(9087, 9087), - Box(9088, 9088), - Box(9089, 9089), - Box(9090, 9090), - Box(9091, 9091), - Box(9092, 9092), - Box(9093, 9093), - Box(9094, 9094), - Box(9095, 9095), - Box(9096, 9096), - Box(9097, 9097), - Box(9098, 9098), - Box(9099, 9099), - Box(9100, 9100), - Box(9101, 9101), - Box(9102, 9102), - Box(9103, 9103), - Box(9104, 9104), - Box(9105, 9105), - Box(9106, 9106), - Box(9107, 9107), - Box(9108, 9108), - Box(9109, 9109), - Box(9110, 9110), - Box(9111, 9111), - Box(9112, 9112), - Box(9113, 9113), - Box(9114, 9114), - Box(9115, 9115), - Box(9116, 9116), - Box(9117, 9117), - Box(9118, 9118), - Box(9119, 9119), - Box(9120, 9120), - Box(9121, 9121), - Box(9122, 9122), - Box(9123, 9123), - Box(9124, 9124), - Box(9125, 9125), - Box(9126, 9126), - Box(9127, 9127), - Box(9128, 9128), - Box(9129, 9129), - Box(9130, 9130), - Box(9131, 9131), - Box(9132, 9132), - Box(9133, 9133), - Box(9134, 9134), - Box(9135, 9135), - Box(9136, 9136), - Box(9137, 9137), - Box(9138, 9138), - Box(9139, 9139), - Box(9140, 9140), - Box(9141, 9141), - Box(9142, 9142), - Box(9143, 9143), - Box(9144, 9144), - Box(9145, 9145), - Box(9146, 9146), - Box(9147, 9147), - Box(9148, 9148), - Box(9149, 9149), - Box(9150, 9150), - Box(9151, 9151), - Box(9152, 9152), - Box(9153, 9153), - Box(9154, 9154), - Box(9155, 9155), - Box(9156, 9156), - Box(9157, 9157), - Box(9158, 9158), - Box(9159, 9159), - Box(9160, 9160), - Box(9161, 9161), - Box(9162, 9162), - Box(9163, 9163), - Box(9164, 9164), - Box(9165, 9165), - Box(9166, 9166), - Box(9167, 9167), - Box(9168, 9168), - Box(9169, 9169), - Box(9170, 9170), - Box(9171, 9171), - Box(9172, 9172), - Box(9173, 9173), - Box(9174, 9174), - Box(9175, 9175), - Box(9176, 9176), - Box(9177, 9177), - Box(9178, 9178), - Box(9179, 9179), - Box(9180, 9180), - Box(9181, 9181), - Box(9182, 9182), - Box(9183, 9183), - Box(9184, 9184), - Box(9185, 9185), - Box(9186, 9186), - Box(9187, 9187), - Box(9188, 9188), - Box(9189, 9189), - Box(9190, 9190), - Box(9191, 9191), - Box(9192, 9192), - Box(9193, 9193), - Box(9194, 9194), - Box(9195, 9195), - Box(9196, 9196), - Box(9197, 9197), - Box(9198, 9198), - Box(9199, 9199), - Box(9200, 9200), - Box(9201, 9201), - Box(9202, 9202), - Box(9203, 9203), - Box(9204, 9204), - Box(9205, 9205), - Box(9206, 9206), - Box(9207, 9207), - Box(9208, 9208), - Box(9209, 9209), - Box(9210, 9210), - Box(9211, 9211), - Box(9212, 9212), - Box(9213, 9213), - Box(9214, 9214), - Box(9215, 9215), - Box(9216, 9216), - Box(9217, 9217), - Box(9218, 9218), - Box(9219, 9219), - Box(9220, 9220), - Box(9221, 9221), - Box(9222, 9222), - Box(9223, 9223), - Box(9224, 9224), - Box(9225, 9225), - Box(9226, 9226), - Box(9227, 9227), - Box(9228, 9228), - Box(9229, 9229), - Box(9230, 9230), - Box(9231, 9231), - Box(9232, 9232), - Box(9233, 9233), - Box(9234, 9234), - Box(9235, 9235), - Box(9236, 9236), - Box(9237, 9237), - Box(9238, 9238), - Box(9239, 9239), - Box(9240, 9240), - Box(9241, 9241), - Box(9242, 9242), - Box(9243, 9243), - Box(9244, 9244), - Box(9245, 9245), - Box(9246, 9246), - Box(9247, 9247), - Box(9248, 9248), - Box(9249, 9249), - Box(9250, 9250), - Box(9251, 9251), - Box(9252, 9252), - Box(9253, 9253), - Box(9254, 9254), - Box(9255, 9255), - Box(9256, 9256), - Box(9257, 9257), - Box(9258, 9258), - Box(9259, 9259), - Box(9260, 9260), - Box(9261, 9261), - Box(9262, 9262), - Box(9263, 9263), - Box(9264, 9264), - Box(9265, 9265), - Box(9266, 9266), - Box(9267, 9267), - Box(9268, 9268), - Box(9269, 9269), - Box(9270, 9270), - Box(9271, 9271), - Box(9272, 9272), - Box(9273, 9273), - Box(9274, 9274), - Box(9275, 9275), - Box(9276, 9276), - Box(9277, 9277), - Box(9278, 9278), - Box(9279, 9279), - Box(9280, 9280), - Box(9281, 9281), - Box(9282, 9282), - Box(9283, 9283), - Box(9284, 9284), - Box(9285, 9285), - Box(9286, 9286), - Box(9287, 9287), - Box(9288, 9288), - Box(9289, 9289), - Box(9290, 9290), - Box(9291, 9291), - Box(9292, 9292), - Box(9293, 9293), - Box(9294, 9294), - Box(9295, 9295), - Box(9296, 9296), - Box(9297, 9297), - Box(9298, 9298), - Box(9299, 9299), - Box(9300, 9300), - Box(9301, 9301), - Box(9302, 9302), - Box(9303, 9303), - Box(9304, 9304), - Box(9305, 9305), - Box(9306, 9306), - Box(9307, 9307), - Box(9308, 9308), - Box(9309, 9309), - Box(9310, 9310), - Box(9311, 9311), - Box(9312, 9312), - Box(9313, 9313), - Box(9314, 9314), - Box(9315, 9315), - Box(9316, 9316), - Box(9317, 9317), - Box(9318, 9318), - Box(9319, 9319), - Box(9320, 9320), - Box(9321, 9321), - Box(9322, 9322), - Box(9323, 9323), - Box(9324, 9324), - Box(9325, 9325), - Box(9326, 9326), - Box(9327, 9327), - Box(9328, 9328), - Box(9329, 9329), - Box(9330, 9330), - Box(9331, 9331), - Box(9332, 9332), - Box(9333, 9333), - Box(9334, 9334), - Box(9335, 9335), - Box(9336, 9336), - Box(9337, 9337), - Box(9338, 9338), - Box(9339, 9339), - Box(9340, 9340), - Box(9341, 9341), - Box(9342, 9342), - Box(9343, 9343), - Box(9344, 9344), - Box(9345, 9345), - Box(9346, 9346), - Box(9347, 9347), - Box(9348, 9348), - Box(9349, 9349), - Box(9350, 9350), - Box(9351, 9351), - Box(9352, 9352), - Box(9353, 9353), - Box(9354, 9354), - Box(9355, 9355), - Box(9356, 9356), - Box(9357, 9357), - Box(9358, 9358), - Box(9359, 9359), - Box(9360, 9360), - Box(9361, 9361), - Box(9362, 9362), - Box(9363, 9363), - Box(9364, 9364), - Box(9365, 9365), - Box(9366, 9366), - Box(9367, 9367), - Box(9368, 9368), - Box(9369, 9369), - Box(9370, 9370), - Box(9371, 9371), - Box(9372, 9372), - Box(9373, 9373), - Box(9374, 9374), - Box(9375, 9375), - Box(9376, 9376), - Box(9377, 9377), - Box(9378, 9378), - Box(9379, 9379), - Box(9380, 9380), - Box(9381, 9381), - Box(9382, 9382), - Box(9383, 9383), - Box(9384, 9384), - Box(9385, 9385), - Box(9386, 9386), - Box(9387, 9387), - Box(9388, 9388), - Box(9389, 9389), - Box(9390, 9390), - Box(9391, 9391), - Box(9392, 9392), - Box(9393, 9393), - Box(9394, 9394), - Box(9395, 9395), - Box(9396, 9396), - Box(9397, 9397), - Box(9398, 9398), - Box(9399, 9399), - Box(9400, 9400), - Box(9401, 9401), - Box(9402, 9402), - Box(9403, 9403), - Box(9404, 9404), - Box(9405, 9405), - Box(9406, 9406), - Box(9407, 9407), - Box(9408, 9408), - Box(9409, 9409), - Box(9410, 9410), - Box(9411, 9411), - Box(9412, 9412), - Box(9413, 9413), - Box(9414, 9414), - Box(9415, 9415), - Box(9416, 9416), - Box(9417, 9417), - Box(9418, 9418), - Box(9419, 9419), - Box(9420, 9420), - Box(9421, 9421), - Box(9422, 9422), - Box(9423, 9423), - Box(9424, 9424), - Box(9425, 9425), - Box(9426, 9426), - Box(9427, 9427), - Box(9428, 9428), - Box(9429, 9429), - Box(9430, 9430), - Box(9431, 9431), - Box(9432, 9432), - Box(9433, 9433), - Box(9434, 9434), - Box(9435, 9435), - Box(9436, 9436), - Box(9437, 9437), - Box(9438, 9438), - Box(9439, 9439), - Box(9440, 9440), - Box(9441, 9441), - Box(9442, 9442), - Box(9443, 9443), - Box(9444, 9444), - Box(9445, 9445), - Box(9446, 9446), - Box(9447, 9447), - Box(9448, 9448), - Box(9449, 9449), - Box(9450, 9450), - Box(9451, 9451), - Box(9452, 9452), - Box(9453, 9453), - Box(9454, 9454), - Box(9455, 9455), - Box(9456, 9456), - Box(9457, 9457), - Box(9458, 9458), - Box(9459, 9459), - Box(9460, 9460), - Box(9461, 9461), - Box(9462, 9462), - Box(9463, 9463), - Box(9464, 9464), - Box(9465, 9465), - Box(9466, 9466), - Box(9467, 9467), - Box(9468, 9468), - Box(9469, 9469), - Box(9470, 9470), - Box(9471, 9471), - Box(9472, 9472), - Box(9473, 9473), - Box(9474, 9474), - Box(9475, 9475), - Box(9476, 9476), - Box(9477, 9477), - Box(9478, 9478), - Box(9479, 9479), - Box(9480, 9480), - Box(9481, 9481), - Box(9482, 9482), - Box(9483, 9483), - Box(9484, 9484), - Box(9485, 9485), - Box(9486, 9486), - Box(9487, 9487), - Box(9488, 9488), - Box(9489, 9489), - Box(9490, 9490), - Box(9491, 9491), - Box(9492, 9492), - Box(9493, 9493), - Box(9494, 9494), - Box(9495, 9495), - Box(9496, 9496), - Box(9497, 9497), - Box(9498, 9498), - Box(9499, 9499), - Box(9500, 9500), - Box(9501, 9501), - Box(9502, 9502), - Box(9503, 9503), - Box(9504, 9504), - Box(9505, 9505), - Box(9506, 9506), - Box(9507, 9507), - Box(9508, 9508), - Box(9509, 9509), - Box(9510, 9510), - Box(9511, 9511), - Box(9512, 9512), - Box(9513, 9513), - Box(9514, 9514), - Box(9515, 9515), - Box(9516, 9516), - Box(9517, 9517), - Box(9518, 9518), - Box(9519, 9519), - Box(9520, 9520), - Box(9521, 9521), - Box(9522, 9522), - Box(9523, 9523), - Box(9524, 9524), - Box(9525, 9525), - Box(9526, 9526), - Box(9527, 9527), - Box(9528, 9528), - Box(9529, 9529), - Box(9530, 9530), - Box(9531, 9531), - Box(9532, 9532), - Box(9533, 9533), - Box(9534, 9534), - Box(9535, 9535), - Box(9536, 9536), - Box(9537, 9537), - Box(9538, 9538), - Box(9539, 9539), - Box(9540, 9540), - Box(9541, 9541), - Box(9542, 9542), - Box(9543, 9543), - Box(9544, 9544), - Box(9545, 9545), - Box(9546, 9546), - Box(9547, 9547), - Box(9548, 9548), - Box(9549, 9549), - Box(9550, 9550), - Box(9551, 9551), - Box(9552, 9552), - Box(9553, 9553), - Box(9554, 9554), - Box(9555, 9555), - Box(9556, 9556), - Box(9557, 9557), - Box(9558, 9558), - Box(9559, 9559), - Box(9560, 9560), - Box(9561, 9561), - Box(9562, 9562), - Box(9563, 9563), - Box(9564, 9564), - Box(9565, 9565), - Box(9566, 9566), - Box(9567, 9567), - Box(9568, 9568), - Box(9569, 9569), - Box(9570, 9570), - Box(9571, 9571), - Box(9572, 9572), - Box(9573, 9573), - Box(9574, 9574), - Box(9575, 9575), - Box(9576, 9576), - Box(9577, 9577), - Box(9578, 9578), - Box(9579, 9579), - Box(9580, 9580), - Box(9581, 9581), - Box(9582, 9582), - Box(9583, 9583), - Box(9584, 9584), - Box(9585, 9585), - Box(9586, 9586), - Box(9587, 9587), - Box(9588, 9588), - Box(9589, 9589), - Box(9590, 9590), - Box(9591, 9591), - Box(9592, 9592), - Box(9593, 9593), - Box(9594, 9594), - Box(9595, 9595), - Box(9596, 9596), - Box(9597, 9597), - Box(9598, 9598), - Box(9599, 9599), - Box(9600, 9600), - Box(9601, 9601), - Box(9602, 9602), - Box(9603, 9603), - Box(9604, 9604), - Box(9605, 9605), - Box(9606, 9606), - Box(9607, 9607), - Box(9608, 9608), - Box(9609, 9609), - Box(9610, 9610), - Box(9611, 9611), - Box(9612, 9612), - Box(9613, 9613), - Box(9614, 9614), - Box(9615, 9615), - Box(9616, 9616), - Box(9617, 9617), - Box(9618, 9618), - Box(9619, 9619), - Box(9620, 9620), - Box(9621, 9621), - Box(9622, 9622), - Box(9623, 9623), - Box(9624, 9624), - Box(9625, 9625), - Box(9626, 9626), - Box(9627, 9627), - Box(9628, 9628), - Box(9629, 9629), - Box(9630, 9630), - Box(9631, 9631), - Box(9632, 9632), - Box(9633, 9633), - Box(9634, 9634), - Box(9635, 9635), - Box(9636, 9636), - Box(9637, 9637), - Box(9638, 9638), - Box(9639, 9639), - Box(9640, 9640), - Box(9641, 9641), - Box(9642, 9642), - Box(9643, 9643), - Box(9644, 9644), - Box(9645, 9645), - Box(9646, 9646), - Box(9647, 9647), - Box(9648, 9648), - Box(9649, 9649), - Box(9650, 9650), - Box(9651, 9651), - Box(9652, 9652), - Box(9653, 9653), - Box(9654, 9654), - Box(9655, 9655), - Box(9656, 9656), - Box(9657, 9657), - Box(9658, 9658), - Box(9659, 9659), - Box(9660, 9660), - Box(9661, 9661), - Box(9662, 9662), - Box(9663, 9663), - Box(9664, 9664), - Box(9665, 9665), - Box(9666, 9666), - Box(9667, 9667), - Box(9668, 9668), - Box(9669, 9669), - Box(9670, 9670), - Box(9671, 9671), - Box(9672, 9672), - Box(9673, 9673), - Box(9674, 9674), - Box(9675, 9675), - Box(9676, 9676), - Box(9677, 9677), - Box(9678, 9678), - Box(9679, 9679), - Box(9680, 9680), - Box(9681, 9681), - Box(9682, 9682), - Box(9683, 9683), - Box(9684, 9684), - Box(9685, 9685), - Box(9686, 9686), - Box(9687, 9687), - Box(9688, 9688), - Box(9689, 9689), - Box(9690, 9690), - Box(9691, 9691), - Box(9692, 9692), - Box(9693, 9693), - Box(9694, 9694), - Box(9695, 9695), - Box(9696, 9696), - Box(9697, 9697), - Box(9698, 9698), - Box(9699, 9699), - Box(9700, 9700), - Box(9701, 9701), - Box(9702, 9702), - Box(9703, 9703), - Box(9704, 9704), - Box(9705, 9705), - Box(9706, 9706), - Box(9707, 9707), - Box(9708, 9708), - Box(9709, 9709), - Box(9710, 9710), - Box(9711, 9711), - Box(9712, 9712), - Box(9713, 9713), - Box(9714, 9714), - Box(9715, 9715), - Box(9716, 9716), - Box(9717, 9717), - Box(9718, 9718), - Box(9719, 9719), - Box(9720, 9720), - Box(9721, 9721), - Box(9722, 9722), - Box(9723, 9723), - Box(9724, 9724), - Box(9725, 9725), - Box(9726, 9726), - Box(9727, 9727), - Box(9728, 9728), - Box(9729, 9729), - Box(9730, 9730), - Box(9731, 9731), - Box(9732, 9732), - Box(9733, 9733), - Box(9734, 9734), - Box(9735, 9735), - Box(9736, 9736), - Box(9737, 9737), - Box(9738, 9738), - Box(9739, 9739), - Box(9740, 9740), - Box(9741, 9741), - Box(9742, 9742), - Box(9743, 9743), - Box(9744, 9744), - Box(9745, 9745), - Box(9746, 9746), - Box(9747, 9747), - Box(9748, 9748), - Box(9749, 9749), - Box(9750, 9750), - Box(9751, 9751), - Box(9752, 9752), - Box(9753, 9753), - Box(9754, 9754), - Box(9755, 9755), - Box(9756, 9756), - Box(9757, 9757), - Box(9758, 9758), - Box(9759, 9759), - Box(9760, 9760), - Box(9761, 9761), - Box(9762, 9762), - Box(9763, 9763), - Box(9764, 9764), - Box(9765, 9765), - Box(9766, 9766), - Box(9767, 9767), - Box(9768, 9768), - Box(9769, 9769), - Box(9770, 9770), - Box(9771, 9771), - Box(9772, 9772), - Box(9773, 9773), - Box(9774, 9774), - Box(9775, 9775), - Box(9776, 9776), - Box(9777, 9777), - Box(9778, 9778), - Box(9779, 9779), - Box(9780, 9780), - Box(9781, 9781), - Box(9782, 9782), - Box(9783, 9783), - Box(9784, 9784), - Box(9785, 9785), - Box(9786, 9786), - Box(9787, 9787), - Box(9788, 9788), - Box(9789, 9789), - Box(9790, 9790), - Box(9791, 9791), - Box(9792, 9792), - Box(9793, 9793), - Box(9794, 9794), - Box(9795, 9795), - Box(9796, 9796), - Box(9797, 9797), - Box(9798, 9798), - Box(9799, 9799), - Box(9800, 9800), - Box(9801, 9801), - Box(9802, 9802), - Box(9803, 9803), - Box(9804, 9804), - Box(9805, 9805), - Box(9806, 9806), - Box(9807, 9807), - Box(9808, 9808), - Box(9809, 9809), - Box(9810, 9810), - Box(9811, 9811), - Box(9812, 9812), - Box(9813, 9813), - Box(9814, 9814), - Box(9815, 9815), - Box(9816, 9816), - Box(9817, 9817), - Box(9818, 9818), - Box(9819, 9819), - Box(9820, 9820), - Box(9821, 9821), - Box(9822, 9822), - Box(9823, 9823), - Box(9824, 9824), - Box(9825, 9825), - Box(9826, 9826), - Box(9827, 9827), - Box(9828, 9828), - Box(9829, 9829), - Box(9830, 9830), - Box(9831, 9831), - Box(9832, 9832), - Box(9833, 9833), - Box(9834, 9834), - Box(9835, 9835), - Box(9836, 9836), - Box(9837, 9837), - Box(9838, 9838), - Box(9839, 9839), - Box(9840, 9840), - Box(9841, 9841), - Box(9842, 9842), - Box(9843, 9843), - Box(9844, 9844), - Box(9845, 9845), - Box(9846, 9846), - Box(9847, 9847), - Box(9848, 9848), - Box(9849, 9849), - Box(9850, 9850), - Box(9851, 9851), - Box(9852, 9852), - Box(9853, 9853), - Box(9854, 9854), - Box(9855, 9855), - Box(9856, 9856), - Box(9857, 9857), - Box(9858, 9858), - Box(9859, 9859), - Box(9860, 9860), - Box(9861, 9861), - Box(9862, 9862), - Box(9863, 9863), - Box(9864, 9864), - Box(9865, 9865), - Box(9866, 9866), - Box(9867, 9867), - Box(9868, 9868), - Box(9869, 9869), - Box(9870, 9870), - Box(9871, 9871), - Box(9872, 9872), - Box(9873, 9873), - Box(9874, 9874), - Box(9875, 9875), - Box(9876, 9876), - Box(9877, 9877), - Box(9878, 9878), - Box(9879, 9879), - Box(9880, 9880), - Box(9881, 9881), - Box(9882, 9882), - Box(9883, 9883), - Box(9884, 9884), - Box(9885, 9885), - Box(9886, 9886), - Box(9887, 9887), - Box(9888, 9888), - Box(9889, 9889), - Box(9890, 9890), - Box(9891, 9891), - Box(9892, 9892), - Box(9893, 9893), - Box(9894, 9894), - Box(9895, 9895), - Box(9896, 9896), - Box(9897, 9897), - Box(9898, 9898), - Box(9899, 9899), - Box(9900, 9900), - Box(9901, 9901), - Box(9902, 9902), - Box(9903, 9903), - Box(9904, 9904), - Box(9905, 9905), - Box(9906, 9906), - Box(9907, 9907), - Box(9908, 9908), - Box(9909, 9909), - Box(9910, 9910), - Box(9911, 9911), - Box(9912, 9912), - Box(9913, 9913), - Box(9914, 9914), - Box(9915, 9915), - Box(9916, 9916), - Box(9917, 9917), - Box(9918, 9918), - Box(9919, 9919), - Box(9920, 9920), - Box(9921, 9921), - Box(9922, 9922), - Box(9923, 9923), - Box(9924, 9924), - Box(9925, 9925), - Box(9926, 9926), - Box(9927, 9927), - Box(9928, 9928), - Box(9929, 9929), - Box(9930, 9930), - Box(9931, 9931), - Box(9932, 9932), - Box(9933, 9933), - Box(9934, 9934), - Box(9935, 9935), - Box(9936, 9936), - Box(9937, 9937), - Box(9938, 9938), - Box(9939, 9939), - Box(9940, 9940), - Box(9941, 9941), - Box(9942, 9942), - Box(9943, 9943), - Box(9944, 9944), - Box(9945, 9945), - Box(9946, 9946), - Box(9947, 9947), - Box(9948, 9948), - Box(9949, 9949), - Box(9950, 9950), - Box(9951, 9951), - Box(9952, 9952), - Box(9953, 9953), - Box(9954, 9954), - Box(9955, 9955), - Box(9956, 9956), - Box(9957, 9957), - Box(9958, 9958), - Box(9959, 9959), - Box(9960, 9960), - Box(9961, 9961), - Box(9962, 9962), - Box(9963, 9963), - Box(9964, 9964), - Box(9965, 9965), - Box(9966, 9966), - Box(9967, 9967), - Box(9968, 9968), - Box(9969, 9969), - Box(9970, 9970), - Box(9971, 9971), - Box(9972, 9972), - Box(9973, 9973), - Box(9974, 9974), - Box(9975, 9975), - Box(9976, 9976), - Box(9977, 9977), - Box(9978, 9978), - Box(9979, 9979), - Box(9980, 9980), - Box(9981, 9981), - Box(9982, 9982), - Box(9983, 9983), - Box(9984, 9984), - Box(9985, 9985), - Box(9986, 9986), - Box(9987, 9987), - Box(9988, 9988), - Box(9989, 9989), - Box(9990, 9990), - Box(9991, 9991), - Box(9992, 9992), - Box(9993, 9993), - Box(9994, 9994), - Box(9995, 9995), - Box(9996, 9996), - Box(9997, 9997), - Box(9998, 9998), - Box(9999, 9999), -]; - -confuse(x) { - try { - throw x; - } catch (e) { - return e; - } -} - -main() { - if (!identical(confuse(list1), confuse(list2))) { - throw new Exception("list1 !== list2"); - } -} diff --git a/tests/language_2/canonicalize/hashing_shallow_collision_instance_3_test.dart b/tests/language_2/canonicalize/hashing_shallow_collision_instance_3_test.dart deleted file mode 100644 index 7835b476846..00000000000 --- a/tests/language_2/canonicalize/hashing_shallow_collision_instance_3_test.dart +++ /dev/null @@ -1,20036 +0,0 @@ -// 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. - -// @dart = 2.9 - -// If canonicalization hashes with only a field's cid, this will exhibit -// quadratic time. - -class Box { - final Object a; - final Object b; - const Box(this.a, this.b); -} - -// 10,000 elements. -const list1 = [ - Box(Box(0, 0), Box(0, 0)), - Box(Box(1, 1), Box(1, 1)), - Box(Box(2, 2), Box(2, 2)), - Box(Box(3, 3), Box(3, 3)), - Box(Box(4, 4), Box(4, 4)), - Box(Box(5, 5), Box(5, 5)), - Box(Box(6, 6), Box(6, 6)), - Box(Box(7, 7), Box(7, 7)), - Box(Box(8, 8), Box(8, 8)), - Box(Box(9, 9), Box(9, 9)), - Box(Box(10, 10), Box(10, 10)), - Box(Box(11, 11), Box(11, 11)), - Box(Box(12, 12), Box(12, 12)), - Box(Box(13, 13), Box(13, 13)), - Box(Box(14, 14), Box(14, 14)), - Box(Box(15, 15), Box(15, 15)), - Box(Box(16, 16), Box(16, 16)), - Box(Box(17, 17), Box(17, 17)), - Box(Box(18, 18), Box(18, 18)), - Box(Box(19, 19), Box(19, 19)), - Box(Box(20, 20), Box(20, 20)), - Box(Box(21, 21), Box(21, 21)), - Box(Box(22, 22), Box(22, 22)), - Box(Box(23, 23), Box(23, 23)), - Box(Box(24, 24), Box(24, 24)), - Box(Box(25, 25), Box(25, 25)), - Box(Box(26, 26), Box(26, 26)), - Box(Box(27, 27), Box(27, 27)), - Box(Box(28, 28), Box(28, 28)), - Box(Box(29, 29), Box(29, 29)), - Box(Box(30, 30), Box(30, 30)), - Box(Box(31, 31), Box(31, 31)), - Box(Box(32, 32), Box(32, 32)), - Box(Box(33, 33), Box(33, 33)), - Box(Box(34, 34), Box(34, 34)), - Box(Box(35, 35), Box(35, 35)), - Box(Box(36, 36), Box(36, 36)), - Box(Box(37, 37), Box(37, 37)), - Box(Box(38, 38), Box(38, 38)), - Box(Box(39, 39), Box(39, 39)), - Box(Box(40, 40), Box(40, 40)), - Box(Box(41, 41), Box(41, 41)), - Box(Box(42, 42), Box(42, 42)), - Box(Box(43, 43), Box(43, 43)), - Box(Box(44, 44), Box(44, 44)), - Box(Box(45, 45), Box(45, 45)), - Box(Box(46, 46), Box(46, 46)), - Box(Box(47, 47), Box(47, 47)), - Box(Box(48, 48), Box(48, 48)), - Box(Box(49, 49), Box(49, 49)), - Box(Box(50, 50), Box(50, 50)), - Box(Box(51, 51), Box(51, 51)), - Box(Box(52, 52), Box(52, 52)), - Box(Box(53, 53), Box(53, 53)), - Box(Box(54, 54), Box(54, 54)), - Box(Box(55, 55), Box(55, 55)), - Box(Box(56, 56), Box(56, 56)), - Box(Box(57, 57), Box(57, 57)), - Box(Box(58, 58), Box(58, 58)), - Box(Box(59, 59), Box(59, 59)), - Box(Box(60, 60), Box(60, 60)), - Box(Box(61, 61), Box(61, 61)), - Box(Box(62, 62), Box(62, 62)), - Box(Box(63, 63), Box(63, 63)), - Box(Box(64, 64), Box(64, 64)), - Box(Box(65, 65), Box(65, 65)), - Box(Box(66, 66), Box(66, 66)), - Box(Box(67, 67), Box(67, 67)), - Box(Box(68, 68), Box(68, 68)), - Box(Box(69, 69), Box(69, 69)), - Box(Box(70, 70), Box(70, 70)), - Box(Box(71, 71), Box(71, 71)), - Box(Box(72, 72), Box(72, 72)), - Box(Box(73, 73), Box(73, 73)), - Box(Box(74, 74), Box(74, 74)), - Box(Box(75, 75), Box(75, 75)), - Box(Box(76, 76), Box(76, 76)), - Box(Box(77, 77), Box(77, 77)), - Box(Box(78, 78), Box(78, 78)), - Box(Box(79, 79), Box(79, 79)), - Box(Box(80, 80), Box(80, 80)), - Box(Box(81, 81), Box(81, 81)), - Box(Box(82, 82), Box(82, 82)), - Box(Box(83, 83), Box(83, 83)), - Box(Box(84, 84), Box(84, 84)), - Box(Box(85, 85), Box(85, 85)), - Box(Box(86, 86), Box(86, 86)), - Box(Box(87, 87), Box(87, 87)), - Box(Box(88, 88), Box(88, 88)), - Box(Box(89, 89), Box(89, 89)), - Box(Box(90, 90), Box(90, 90)), - Box(Box(91, 91), Box(91, 91)), - Box(Box(92, 92), Box(92, 92)), - Box(Box(93, 93), Box(93, 93)), - Box(Box(94, 94), Box(94, 94)), - Box(Box(95, 95), Box(95, 95)), - Box(Box(96, 96), Box(96, 96)), - Box(Box(97, 97), Box(97, 97)), - Box(Box(98, 98), Box(98, 98)), - Box(Box(99, 99), Box(99, 99)), - Box(Box(100, 100), Box(100, 100)), - Box(Box(101, 101), Box(101, 101)), - Box(Box(102, 102), Box(102, 102)), - Box(Box(103, 103), Box(103, 103)), - Box(Box(104, 104), Box(104, 104)), - Box(Box(105, 105), Box(105, 105)), - Box(Box(106, 106), Box(106, 106)), - Box(Box(107, 107), Box(107, 107)), - Box(Box(108, 108), Box(108, 108)), - Box(Box(109, 109), Box(109, 109)), - Box(Box(110, 110), Box(110, 110)), - Box(Box(111, 111), Box(111, 111)), - Box(Box(112, 112), Box(112, 112)), - Box(Box(113, 113), Box(113, 113)), - Box(Box(114, 114), Box(114, 114)), - Box(Box(115, 115), Box(115, 115)), - Box(Box(116, 116), Box(116, 116)), - Box(Box(117, 117), Box(117, 117)), - Box(Box(118, 118), Box(118, 118)), - Box(Box(119, 119), Box(119, 119)), - Box(Box(120, 120), Box(120, 120)), - Box(Box(121, 121), Box(121, 121)), - Box(Box(122, 122), Box(122, 122)), - Box(Box(123, 123), Box(123, 123)), - Box(Box(124, 124), Box(124, 124)), - Box(Box(125, 125), Box(125, 125)), - Box(Box(126, 126), Box(126, 126)), - Box(Box(127, 127), Box(127, 127)), - Box(Box(128, 128), Box(128, 128)), - Box(Box(129, 129), Box(129, 129)), - Box(Box(130, 130), Box(130, 130)), - Box(Box(131, 131), Box(131, 131)), - Box(Box(132, 132), Box(132, 132)), - Box(Box(133, 133), Box(133, 133)), - Box(Box(134, 134), Box(134, 134)), - Box(Box(135, 135), Box(135, 135)), - Box(Box(136, 136), Box(136, 136)), - Box(Box(137, 137), Box(137, 137)), - Box(Box(138, 138), Box(138, 138)), - Box(Box(139, 139), Box(139, 139)), - Box(Box(140, 140), Box(140, 140)), - Box(Box(141, 141), Box(141, 141)), - Box(Box(142, 142), Box(142, 142)), - Box(Box(143, 143), Box(143, 143)), - Box(Box(144, 144), Box(144, 144)), - Box(Box(145, 145), Box(145, 145)), - Box(Box(146, 146), Box(146, 146)), - Box(Box(147, 147), Box(147, 147)), - Box(Box(148, 148), Box(148, 148)), - Box(Box(149, 149), Box(149, 149)), - Box(Box(150, 150), Box(150, 150)), - Box(Box(151, 151), Box(151, 151)), - Box(Box(152, 152), Box(152, 152)), - Box(Box(153, 153), Box(153, 153)), - Box(Box(154, 154), Box(154, 154)), - Box(Box(155, 155), Box(155, 155)), - Box(Box(156, 156), Box(156, 156)), - Box(Box(157, 157), Box(157, 157)), - Box(Box(158, 158), Box(158, 158)), - Box(Box(159, 159), Box(159, 159)), - Box(Box(160, 160), Box(160, 160)), - Box(Box(161, 161), Box(161, 161)), - Box(Box(162, 162), Box(162, 162)), - Box(Box(163, 163), Box(163, 163)), - Box(Box(164, 164), Box(164, 164)), - Box(Box(165, 165), Box(165, 165)), - Box(Box(166, 166), Box(166, 166)), - Box(Box(167, 167), Box(167, 167)), - Box(Box(168, 168), Box(168, 168)), - Box(Box(169, 169), Box(169, 169)), - Box(Box(170, 170), Box(170, 170)), - Box(Box(171, 171), Box(171, 171)), - Box(Box(172, 172), Box(172, 172)), - Box(Box(173, 173), Box(173, 173)), - Box(Box(174, 174), Box(174, 174)), - Box(Box(175, 175), Box(175, 175)), - Box(Box(176, 176), Box(176, 176)), - Box(Box(177, 177), Box(177, 177)), - Box(Box(178, 178), Box(178, 178)), - Box(Box(179, 179), Box(179, 179)), - Box(Box(180, 180), Box(180, 180)), - Box(Box(181, 181), Box(181, 181)), - Box(Box(182, 182), Box(182, 182)), - Box(Box(183, 183), Box(183, 183)), - Box(Box(184, 184), Box(184, 184)), - Box(Box(185, 185), Box(185, 185)), - Box(Box(186, 186), Box(186, 186)), - Box(Box(187, 187), Box(187, 187)), - Box(Box(188, 188), Box(188, 188)), - Box(Box(189, 189), Box(189, 189)), - Box(Box(190, 190), Box(190, 190)), - Box(Box(191, 191), Box(191, 191)), - Box(Box(192, 192), Box(192, 192)), - Box(Box(193, 193), Box(193, 193)), - Box(Box(194, 194), Box(194, 194)), - Box(Box(195, 195), Box(195, 195)), - Box(Box(196, 196), Box(196, 196)), - Box(Box(197, 197), Box(197, 197)), - Box(Box(198, 198), Box(198, 198)), - Box(Box(199, 199), Box(199, 199)), - Box(Box(200, 200), Box(200, 200)), - Box(Box(201, 201), Box(201, 201)), - Box(Box(202, 202), Box(202, 202)), - Box(Box(203, 203), Box(203, 203)), - Box(Box(204, 204), Box(204, 204)), - Box(Box(205, 205), Box(205, 205)), - Box(Box(206, 206), Box(206, 206)), - Box(Box(207, 207), Box(207, 207)), - Box(Box(208, 208), Box(208, 208)), - Box(Box(209, 209), Box(209, 209)), - Box(Box(210, 210), Box(210, 210)), - Box(Box(211, 211), Box(211, 211)), - Box(Box(212, 212), Box(212, 212)), - Box(Box(213, 213), Box(213, 213)), - Box(Box(214, 214), Box(214, 214)), - Box(Box(215, 215), Box(215, 215)), - Box(Box(216, 216), Box(216, 216)), - Box(Box(217, 217), Box(217, 217)), - Box(Box(218, 218), Box(218, 218)), - Box(Box(219, 219), Box(219, 219)), - Box(Box(220, 220), Box(220, 220)), - Box(Box(221, 221), Box(221, 221)), - Box(Box(222, 222), Box(222, 222)), - Box(Box(223, 223), Box(223, 223)), - Box(Box(224, 224), Box(224, 224)), - Box(Box(225, 225), Box(225, 225)), - Box(Box(226, 226), Box(226, 226)), - Box(Box(227, 227), Box(227, 227)), - Box(Box(228, 228), Box(228, 228)), - Box(Box(229, 229), Box(229, 229)), - Box(Box(230, 230), Box(230, 230)), - Box(Box(231, 231), Box(231, 231)), - Box(Box(232, 232), Box(232, 232)), - Box(Box(233, 233), Box(233, 233)), - Box(Box(234, 234), Box(234, 234)), - Box(Box(235, 235), Box(235, 235)), - Box(Box(236, 236), Box(236, 236)), - Box(Box(237, 237), Box(237, 237)), - Box(Box(238, 238), Box(238, 238)), - Box(Box(239, 239), Box(239, 239)), - Box(Box(240, 240), Box(240, 240)), - Box(Box(241, 241), Box(241, 241)), - Box(Box(242, 242), Box(242, 242)), - Box(Box(243, 243), Box(243, 243)), - Box(Box(244, 244), Box(244, 244)), - Box(Box(245, 245), Box(245, 245)), - Box(Box(246, 246), Box(246, 246)), - Box(Box(247, 247), Box(247, 247)), - Box(Box(248, 248), Box(248, 248)), - Box(Box(249, 249), Box(249, 249)), - Box(Box(250, 250), Box(250, 250)), - Box(Box(251, 251), Box(251, 251)), - Box(Box(252, 252), Box(252, 252)), - Box(Box(253, 253), Box(253, 253)), - Box(Box(254, 254), Box(254, 254)), - Box(Box(255, 255), Box(255, 255)), - Box(Box(256, 256), Box(256, 256)), - Box(Box(257, 257), Box(257, 257)), - Box(Box(258, 258), Box(258, 258)), - Box(Box(259, 259), Box(259, 259)), - Box(Box(260, 260), Box(260, 260)), - Box(Box(261, 261), Box(261, 261)), - Box(Box(262, 262), Box(262, 262)), - Box(Box(263, 263), Box(263, 263)), - Box(Box(264, 264), Box(264, 264)), - Box(Box(265, 265), Box(265, 265)), - Box(Box(266, 266), Box(266, 266)), - Box(Box(267, 267), Box(267, 267)), - Box(Box(268, 268), Box(268, 268)), - Box(Box(269, 269), Box(269, 269)), - Box(Box(270, 270), Box(270, 270)), - Box(Box(271, 271), Box(271, 271)), - Box(Box(272, 272), Box(272, 272)), - Box(Box(273, 273), Box(273, 273)), - Box(Box(274, 274), Box(274, 274)), - Box(Box(275, 275), Box(275, 275)), - Box(Box(276, 276), Box(276, 276)), - Box(Box(277, 277), Box(277, 277)), - Box(Box(278, 278), Box(278, 278)), - Box(Box(279, 279), Box(279, 279)), - Box(Box(280, 280), Box(280, 280)), - Box(Box(281, 281), Box(281, 281)), - Box(Box(282, 282), Box(282, 282)), - Box(Box(283, 283), Box(283, 283)), - Box(Box(284, 284), Box(284, 284)), - Box(Box(285, 285), Box(285, 285)), - Box(Box(286, 286), Box(286, 286)), - Box(Box(287, 287), Box(287, 287)), - Box(Box(288, 288), Box(288, 288)), - Box(Box(289, 289), Box(289, 289)), - Box(Box(290, 290), Box(290, 290)), - Box(Box(291, 291), Box(291, 291)), - Box(Box(292, 292), Box(292, 292)), - Box(Box(293, 293), Box(293, 293)), - Box(Box(294, 294), Box(294, 294)), - Box(Box(295, 295), Box(295, 295)), - Box(Box(296, 296), Box(296, 296)), - Box(Box(297, 297), Box(297, 297)), - Box(Box(298, 298), Box(298, 298)), - Box(Box(299, 299), Box(299, 299)), - Box(Box(300, 300), Box(300, 300)), - Box(Box(301, 301), Box(301, 301)), - Box(Box(302, 302), Box(302, 302)), - Box(Box(303, 303), Box(303, 303)), - Box(Box(304, 304), Box(304, 304)), - Box(Box(305, 305), Box(305, 305)), - Box(Box(306, 306), Box(306, 306)), - Box(Box(307, 307), Box(307, 307)), - Box(Box(308, 308), Box(308, 308)), - Box(Box(309, 309), Box(309, 309)), - Box(Box(310, 310), Box(310, 310)), - Box(Box(311, 311), Box(311, 311)), - Box(Box(312, 312), Box(312, 312)), - Box(Box(313, 313), Box(313, 313)), - Box(Box(314, 314), Box(314, 314)), - Box(Box(315, 315), Box(315, 315)), - Box(Box(316, 316), Box(316, 316)), - Box(Box(317, 317), Box(317, 317)), - Box(Box(318, 318), Box(318, 318)), - Box(Box(319, 319), Box(319, 319)), - Box(Box(320, 320), Box(320, 320)), - Box(Box(321, 321), Box(321, 321)), - Box(Box(322, 322), Box(322, 322)), - Box(Box(323, 323), Box(323, 323)), - Box(Box(324, 324), Box(324, 324)), - Box(Box(325, 325), Box(325, 325)), - Box(Box(326, 326), Box(326, 326)), - Box(Box(327, 327), Box(327, 327)), - Box(Box(328, 328), Box(328, 328)), - Box(Box(329, 329), Box(329, 329)), - Box(Box(330, 330), Box(330, 330)), - Box(Box(331, 331), Box(331, 331)), - Box(Box(332, 332), Box(332, 332)), - Box(Box(333, 333), Box(333, 333)), - Box(Box(334, 334), Box(334, 334)), - Box(Box(335, 335), Box(335, 335)), - Box(Box(336, 336), Box(336, 336)), - Box(Box(337, 337), Box(337, 337)), - Box(Box(338, 338), Box(338, 338)), - Box(Box(339, 339), Box(339, 339)), - Box(Box(340, 340), Box(340, 340)), - Box(Box(341, 341), Box(341, 341)), - Box(Box(342, 342), Box(342, 342)), - Box(Box(343, 343), Box(343, 343)), - Box(Box(344, 344), Box(344, 344)), - Box(Box(345, 345), Box(345, 345)), - Box(Box(346, 346), Box(346, 346)), - Box(Box(347, 347), Box(347, 347)), - Box(Box(348, 348), Box(348, 348)), - Box(Box(349, 349), Box(349, 349)), - Box(Box(350, 350), Box(350, 350)), - Box(Box(351, 351), Box(351, 351)), - Box(Box(352, 352), Box(352, 352)), - Box(Box(353, 353), Box(353, 353)), - Box(Box(354, 354), Box(354, 354)), - Box(Box(355, 355), Box(355, 355)), - Box(Box(356, 356), Box(356, 356)), - Box(Box(357, 357), Box(357, 357)), - Box(Box(358, 358), Box(358, 358)), - Box(Box(359, 359), Box(359, 359)), - Box(Box(360, 360), Box(360, 360)), - Box(Box(361, 361), Box(361, 361)), - Box(Box(362, 362), Box(362, 362)), - Box(Box(363, 363), Box(363, 363)), - Box(Box(364, 364), Box(364, 364)), - Box(Box(365, 365), Box(365, 365)), - Box(Box(366, 366), Box(366, 366)), - Box(Box(367, 367), Box(367, 367)), - Box(Box(368, 368), Box(368, 368)), - Box(Box(369, 369), Box(369, 369)), - Box(Box(370, 370), Box(370, 370)), - Box(Box(371, 371), Box(371, 371)), - Box(Box(372, 372), Box(372, 372)), - Box(Box(373, 373), Box(373, 373)), - Box(Box(374, 374), Box(374, 374)), - Box(Box(375, 375), Box(375, 375)), - Box(Box(376, 376), Box(376, 376)), - Box(Box(377, 377), Box(377, 377)), - Box(Box(378, 378), Box(378, 378)), - Box(Box(379, 379), Box(379, 379)), - Box(Box(380, 380), Box(380, 380)), - Box(Box(381, 381), Box(381, 381)), - Box(Box(382, 382), Box(382, 382)), - Box(Box(383, 383), Box(383, 383)), - Box(Box(384, 384), Box(384, 384)), - Box(Box(385, 385), Box(385, 385)), - Box(Box(386, 386), Box(386, 386)), - Box(Box(387, 387), Box(387, 387)), - Box(Box(388, 388), Box(388, 388)), - Box(Box(389, 389), Box(389, 389)), - Box(Box(390, 390), Box(390, 390)), - Box(Box(391, 391), Box(391, 391)), - Box(Box(392, 392), Box(392, 392)), - Box(Box(393, 393), Box(393, 393)), - Box(Box(394, 394), Box(394, 394)), - Box(Box(395, 395), Box(395, 395)), - Box(Box(396, 396), Box(396, 396)), - Box(Box(397, 397), Box(397, 397)), - Box(Box(398, 398), Box(398, 398)), - Box(Box(399, 399), Box(399, 399)), - Box(Box(400, 400), Box(400, 400)), - Box(Box(401, 401), Box(401, 401)), - Box(Box(402, 402), Box(402, 402)), - Box(Box(403, 403), Box(403, 403)), - Box(Box(404, 404), Box(404, 404)), - Box(Box(405, 405), Box(405, 405)), - Box(Box(406, 406), Box(406, 406)), - Box(Box(407, 407), Box(407, 407)), - Box(Box(408, 408), Box(408, 408)), - Box(Box(409, 409), Box(409, 409)), - Box(Box(410, 410), Box(410, 410)), - Box(Box(411, 411), Box(411, 411)), - Box(Box(412, 412), Box(412, 412)), - Box(Box(413, 413), Box(413, 413)), - Box(Box(414, 414), Box(414, 414)), - Box(Box(415, 415), Box(415, 415)), - Box(Box(416, 416), Box(416, 416)), - Box(Box(417, 417), Box(417, 417)), - Box(Box(418, 418), Box(418, 418)), - Box(Box(419, 419), Box(419, 419)), - Box(Box(420, 420), Box(420, 420)), - Box(Box(421, 421), Box(421, 421)), - Box(Box(422, 422), Box(422, 422)), - Box(Box(423, 423), Box(423, 423)), - Box(Box(424, 424), Box(424, 424)), - Box(Box(425, 425), Box(425, 425)), - Box(Box(426, 426), Box(426, 426)), - Box(Box(427, 427), Box(427, 427)), - Box(Box(428, 428), Box(428, 428)), - Box(Box(429, 429), Box(429, 429)), - Box(Box(430, 430), Box(430, 430)), - Box(Box(431, 431), Box(431, 431)), - Box(Box(432, 432), Box(432, 432)), - Box(Box(433, 433), Box(433, 433)), - Box(Box(434, 434), Box(434, 434)), - Box(Box(435, 435), Box(435, 435)), - Box(Box(436, 436), Box(436, 436)), - Box(Box(437, 437), Box(437, 437)), - Box(Box(438, 438), Box(438, 438)), - Box(Box(439, 439), Box(439, 439)), - Box(Box(440, 440), Box(440, 440)), - Box(Box(441, 441), Box(441, 441)), - Box(Box(442, 442), Box(442, 442)), - Box(Box(443, 443), Box(443, 443)), - Box(Box(444, 444), Box(444, 444)), - Box(Box(445, 445), Box(445, 445)), - Box(Box(446, 446), Box(446, 446)), - Box(Box(447, 447), Box(447, 447)), - Box(Box(448, 448), Box(448, 448)), - Box(Box(449, 449), Box(449, 449)), - Box(Box(450, 450), Box(450, 450)), - Box(Box(451, 451), Box(451, 451)), - Box(Box(452, 452), Box(452, 452)), - Box(Box(453, 453), Box(453, 453)), - Box(Box(454, 454), Box(454, 454)), - Box(Box(455, 455), Box(455, 455)), - Box(Box(456, 456), Box(456, 456)), - Box(Box(457, 457), Box(457, 457)), - Box(Box(458, 458), Box(458, 458)), - Box(Box(459, 459), Box(459, 459)), - Box(Box(460, 460), Box(460, 460)), - Box(Box(461, 461), Box(461, 461)), - Box(Box(462, 462), Box(462, 462)), - Box(Box(463, 463), Box(463, 463)), - Box(Box(464, 464), Box(464, 464)), - Box(Box(465, 465), Box(465, 465)), - Box(Box(466, 466), Box(466, 466)), - Box(Box(467, 467), Box(467, 467)), - Box(Box(468, 468), Box(468, 468)), - Box(Box(469, 469), Box(469, 469)), - Box(Box(470, 470), Box(470, 470)), - Box(Box(471, 471), Box(471, 471)), - Box(Box(472, 472), Box(472, 472)), - Box(Box(473, 473), Box(473, 473)), - Box(Box(474, 474), Box(474, 474)), - Box(Box(475, 475), Box(475, 475)), - Box(Box(476, 476), Box(476, 476)), - Box(Box(477, 477), Box(477, 477)), - Box(Box(478, 478), Box(478, 478)), - Box(Box(479, 479), Box(479, 479)), - Box(Box(480, 480), Box(480, 480)), - Box(Box(481, 481), Box(481, 481)), - Box(Box(482, 482), Box(482, 482)), - Box(Box(483, 483), Box(483, 483)), - Box(Box(484, 484), Box(484, 484)), - Box(Box(485, 485), Box(485, 485)), - Box(Box(486, 486), Box(486, 486)), - Box(Box(487, 487), Box(487, 487)), - Box(Box(488, 488), Box(488, 488)), - Box(Box(489, 489), Box(489, 489)), - Box(Box(490, 490), Box(490, 490)), - Box(Box(491, 491), Box(491, 491)), - Box(Box(492, 492), Box(492, 492)), - Box(Box(493, 493), Box(493, 493)), - Box(Box(494, 494), Box(494, 494)), - Box(Box(495, 495), Box(495, 495)), - Box(Box(496, 496), Box(496, 496)), - Box(Box(497, 497), Box(497, 497)), - Box(Box(498, 498), Box(498, 498)), - Box(Box(499, 499), Box(499, 499)), - Box(Box(500, 500), Box(500, 500)), - Box(Box(501, 501), Box(501, 501)), - Box(Box(502, 502), Box(502, 502)), - Box(Box(503, 503), Box(503, 503)), - Box(Box(504, 504), Box(504, 504)), - Box(Box(505, 505), Box(505, 505)), - Box(Box(506, 506), Box(506, 506)), - Box(Box(507, 507), Box(507, 507)), - Box(Box(508, 508), Box(508, 508)), - Box(Box(509, 509), Box(509, 509)), - Box(Box(510, 510), Box(510, 510)), - Box(Box(511, 511), Box(511, 511)), - Box(Box(512, 512), Box(512, 512)), - Box(Box(513, 513), Box(513, 513)), - Box(Box(514, 514), Box(514, 514)), - Box(Box(515, 515), Box(515, 515)), - Box(Box(516, 516), Box(516, 516)), - Box(Box(517, 517), Box(517, 517)), - Box(Box(518, 518), Box(518, 518)), - Box(Box(519, 519), Box(519, 519)), - Box(Box(520, 520), Box(520, 520)), - Box(Box(521, 521), Box(521, 521)), - Box(Box(522, 522), Box(522, 522)), - Box(Box(523, 523), Box(523, 523)), - Box(Box(524, 524), Box(524, 524)), - Box(Box(525, 525), Box(525, 525)), - Box(Box(526, 526), Box(526, 526)), - Box(Box(527, 527), Box(527, 527)), - Box(Box(528, 528), Box(528, 528)), - Box(Box(529, 529), Box(529, 529)), - Box(Box(530, 530), Box(530, 530)), - Box(Box(531, 531), Box(531, 531)), - Box(Box(532, 532), Box(532, 532)), - Box(Box(533, 533), Box(533, 533)), - Box(Box(534, 534), Box(534, 534)), - Box(Box(535, 535), Box(535, 535)), - Box(Box(536, 536), Box(536, 536)), - Box(Box(537, 537), Box(537, 537)), - Box(Box(538, 538), Box(538, 538)), - Box(Box(539, 539), Box(539, 539)), - Box(Box(540, 540), Box(540, 540)), - Box(Box(541, 541), Box(541, 541)), - Box(Box(542, 542), Box(542, 542)), - Box(Box(543, 543), Box(543, 543)), - Box(Box(544, 544), Box(544, 544)), - Box(Box(545, 545), Box(545, 545)), - Box(Box(546, 546), Box(546, 546)), - Box(Box(547, 547), Box(547, 547)), - Box(Box(548, 548), Box(548, 548)), - Box(Box(549, 549), Box(549, 549)), - Box(Box(550, 550), Box(550, 550)), - Box(Box(551, 551), Box(551, 551)), - Box(Box(552, 552), Box(552, 552)), - Box(Box(553, 553), Box(553, 553)), - Box(Box(554, 554), Box(554, 554)), - Box(Box(555, 555), Box(555, 555)), - Box(Box(556, 556), Box(556, 556)), - Box(Box(557, 557), Box(557, 557)), - Box(Box(558, 558), Box(558, 558)), - Box(Box(559, 559), Box(559, 559)), - Box(Box(560, 560), Box(560, 560)), - Box(Box(561, 561), Box(561, 561)), - Box(Box(562, 562), Box(562, 562)), - Box(Box(563, 563), Box(563, 563)), - Box(Box(564, 564), Box(564, 564)), - Box(Box(565, 565), Box(565, 565)), - Box(Box(566, 566), Box(566, 566)), - Box(Box(567, 567), Box(567, 567)), - Box(Box(568, 568), Box(568, 568)), - Box(Box(569, 569), Box(569, 569)), - Box(Box(570, 570), Box(570, 570)), - Box(Box(571, 571), Box(571, 571)), - Box(Box(572, 572), Box(572, 572)), - Box(Box(573, 573), Box(573, 573)), - Box(Box(574, 574), Box(574, 574)), - Box(Box(575, 575), Box(575, 575)), - Box(Box(576, 576), Box(576, 576)), - Box(Box(577, 577), Box(577, 577)), - Box(Box(578, 578), Box(578, 578)), - Box(Box(579, 579), Box(579, 579)), - Box(Box(580, 580), Box(580, 580)), - Box(Box(581, 581), Box(581, 581)), - Box(Box(582, 582), Box(582, 582)), - Box(Box(583, 583), Box(583, 583)), - Box(Box(584, 584), Box(584, 584)), - Box(Box(585, 585), Box(585, 585)), - Box(Box(586, 586), Box(586, 586)), - Box(Box(587, 587), Box(587, 587)), - Box(Box(588, 588), Box(588, 588)), - Box(Box(589, 589), Box(589, 589)), - Box(Box(590, 590), Box(590, 590)), - Box(Box(591, 591), Box(591, 591)), - Box(Box(592, 592), Box(592, 592)), - Box(Box(593, 593), Box(593, 593)), - Box(Box(594, 594), Box(594, 594)), - Box(Box(595, 595), Box(595, 595)), - Box(Box(596, 596), Box(596, 596)), - Box(Box(597, 597), Box(597, 597)), - Box(Box(598, 598), Box(598, 598)), - Box(Box(599, 599), Box(599, 599)), - Box(Box(600, 600), Box(600, 600)), - Box(Box(601, 601), Box(601, 601)), - Box(Box(602, 602), Box(602, 602)), - Box(Box(603, 603), Box(603, 603)), - Box(Box(604, 604), Box(604, 604)), - Box(Box(605, 605), Box(605, 605)), - Box(Box(606, 606), Box(606, 606)), - Box(Box(607, 607), Box(607, 607)), - Box(Box(608, 608), Box(608, 608)), - Box(Box(609, 609), Box(609, 609)), - Box(Box(610, 610), Box(610, 610)), - Box(Box(611, 611), Box(611, 611)), - Box(Box(612, 612), Box(612, 612)), - Box(Box(613, 613), Box(613, 613)), - Box(Box(614, 614), Box(614, 614)), - Box(Box(615, 615), Box(615, 615)), - Box(Box(616, 616), Box(616, 616)), - Box(Box(617, 617), Box(617, 617)), - Box(Box(618, 618), Box(618, 618)), - Box(Box(619, 619), Box(619, 619)), - Box(Box(620, 620), Box(620, 620)), - Box(Box(621, 621), Box(621, 621)), - Box(Box(622, 622), Box(622, 622)), - Box(Box(623, 623), Box(623, 623)), - Box(Box(624, 624), Box(624, 624)), - Box(Box(625, 625), Box(625, 625)), - Box(Box(626, 626), Box(626, 626)), - Box(Box(627, 627), Box(627, 627)), - Box(Box(628, 628), Box(628, 628)), - Box(Box(629, 629), Box(629, 629)), - Box(Box(630, 630), Box(630, 630)), - Box(Box(631, 631), Box(631, 631)), - Box(Box(632, 632), Box(632, 632)), - Box(Box(633, 633), Box(633, 633)), - Box(Box(634, 634), Box(634, 634)), - Box(Box(635, 635), Box(635, 635)), - Box(Box(636, 636), Box(636, 636)), - Box(Box(637, 637), Box(637, 637)), - Box(Box(638, 638), Box(638, 638)), - Box(Box(639, 639), Box(639, 639)), - Box(Box(640, 640), Box(640, 640)), - Box(Box(641, 641), Box(641, 641)), - Box(Box(642, 642), Box(642, 642)), - Box(Box(643, 643), Box(643, 643)), - Box(Box(644, 644), Box(644, 644)), - Box(Box(645, 645), Box(645, 645)), - Box(Box(646, 646), Box(646, 646)), - Box(Box(647, 647), Box(647, 647)), - Box(Box(648, 648), Box(648, 648)), - Box(Box(649, 649), Box(649, 649)), - Box(Box(650, 650), Box(650, 650)), - Box(Box(651, 651), Box(651, 651)), - Box(Box(652, 652), Box(652, 652)), - Box(Box(653, 653), Box(653, 653)), - Box(Box(654, 654), Box(654, 654)), - Box(Box(655, 655), Box(655, 655)), - Box(Box(656, 656), Box(656, 656)), - Box(Box(657, 657), Box(657, 657)), - Box(Box(658, 658), Box(658, 658)), - Box(Box(659, 659), Box(659, 659)), - Box(Box(660, 660), Box(660, 660)), - Box(Box(661, 661), Box(661, 661)), - Box(Box(662, 662), Box(662, 662)), - Box(Box(663, 663), Box(663, 663)), - Box(Box(664, 664), Box(664, 664)), - Box(Box(665, 665), Box(665, 665)), - Box(Box(666, 666), Box(666, 666)), - Box(Box(667, 667), Box(667, 667)), - Box(Box(668, 668), Box(668, 668)), - Box(Box(669, 669), Box(669, 669)), - Box(Box(670, 670), Box(670, 670)), - Box(Box(671, 671), Box(671, 671)), - Box(Box(672, 672), Box(672, 672)), - Box(Box(673, 673), Box(673, 673)), - Box(Box(674, 674), Box(674, 674)), - Box(Box(675, 675), Box(675, 675)), - Box(Box(676, 676), Box(676, 676)), - Box(Box(677, 677), Box(677, 677)), - Box(Box(678, 678), Box(678, 678)), - Box(Box(679, 679), Box(679, 679)), - Box(Box(680, 680), Box(680, 680)), - Box(Box(681, 681), Box(681, 681)), - Box(Box(682, 682), Box(682, 682)), - Box(Box(683, 683), Box(683, 683)), - Box(Box(684, 684), Box(684, 684)), - Box(Box(685, 685), Box(685, 685)), - Box(Box(686, 686), Box(686, 686)), - Box(Box(687, 687), Box(687, 687)), - Box(Box(688, 688), Box(688, 688)), - Box(Box(689, 689), Box(689, 689)), - Box(Box(690, 690), Box(690, 690)), - Box(Box(691, 691), Box(691, 691)), - Box(Box(692, 692), Box(692, 692)), - Box(Box(693, 693), Box(693, 693)), - Box(Box(694, 694), Box(694, 694)), - Box(Box(695, 695), Box(695, 695)), - Box(Box(696, 696), Box(696, 696)), - Box(Box(697, 697), Box(697, 697)), - Box(Box(698, 698), Box(698, 698)), - Box(Box(699, 699), Box(699, 699)), - Box(Box(700, 700), Box(700, 700)), - Box(Box(701, 701), Box(701, 701)), - Box(Box(702, 702), Box(702, 702)), - Box(Box(703, 703), Box(703, 703)), - Box(Box(704, 704), Box(704, 704)), - Box(Box(705, 705), Box(705, 705)), - Box(Box(706, 706), Box(706, 706)), - Box(Box(707, 707), Box(707, 707)), - Box(Box(708, 708), Box(708, 708)), - Box(Box(709, 709), Box(709, 709)), - Box(Box(710, 710), Box(710, 710)), - Box(Box(711, 711), Box(711, 711)), - Box(Box(712, 712), Box(712, 712)), - Box(Box(713, 713), Box(713, 713)), - Box(Box(714, 714), Box(714, 714)), - Box(Box(715, 715), Box(715, 715)), - Box(Box(716, 716), Box(716, 716)), - Box(Box(717, 717), Box(717, 717)), - Box(Box(718, 718), Box(718, 718)), - Box(Box(719, 719), Box(719, 719)), - Box(Box(720, 720), Box(720, 720)), - Box(Box(721, 721), Box(721, 721)), - Box(Box(722, 722), Box(722, 722)), - Box(Box(723, 723), Box(723, 723)), - Box(Box(724, 724), Box(724, 724)), - Box(Box(725, 725), Box(725, 725)), - Box(Box(726, 726), Box(726, 726)), - Box(Box(727, 727), Box(727, 727)), - Box(Box(728, 728), Box(728, 728)), - Box(Box(729, 729), Box(729, 729)), - Box(Box(730, 730), Box(730, 730)), - Box(Box(731, 731), Box(731, 731)), - Box(Box(732, 732), Box(732, 732)), - Box(Box(733, 733), Box(733, 733)), - Box(Box(734, 734), Box(734, 734)), - Box(Box(735, 735), Box(735, 735)), - Box(Box(736, 736), Box(736, 736)), - Box(Box(737, 737), Box(737, 737)), - Box(Box(738, 738), Box(738, 738)), - Box(Box(739, 739), Box(739, 739)), - Box(Box(740, 740), Box(740, 740)), - Box(Box(741, 741), Box(741, 741)), - Box(Box(742, 742), Box(742, 742)), - Box(Box(743, 743), Box(743, 743)), - Box(Box(744, 744), Box(744, 744)), - Box(Box(745, 745), Box(745, 745)), - Box(Box(746, 746), Box(746, 746)), - Box(Box(747, 747), Box(747, 747)), - Box(Box(748, 748), Box(748, 748)), - Box(Box(749, 749), Box(749, 749)), - Box(Box(750, 750), Box(750, 750)), - Box(Box(751, 751), Box(751, 751)), - Box(Box(752, 752), Box(752, 752)), - Box(Box(753, 753), Box(753, 753)), - Box(Box(754, 754), Box(754, 754)), - Box(Box(755, 755), Box(755, 755)), - Box(Box(756, 756), Box(756, 756)), - Box(Box(757, 757), Box(757, 757)), - Box(Box(758, 758), Box(758, 758)), - Box(Box(759, 759), Box(759, 759)), - Box(Box(760, 760), Box(760, 760)), - Box(Box(761, 761), Box(761, 761)), - Box(Box(762, 762), Box(762, 762)), - Box(Box(763, 763), Box(763, 763)), - Box(Box(764, 764), Box(764, 764)), - Box(Box(765, 765), Box(765, 765)), - Box(Box(766, 766), Box(766, 766)), - Box(Box(767, 767), Box(767, 767)), - Box(Box(768, 768), Box(768, 768)), - Box(Box(769, 769), Box(769, 769)), - Box(Box(770, 770), Box(770, 770)), - Box(Box(771, 771), Box(771, 771)), - Box(Box(772, 772), Box(772, 772)), - Box(Box(773, 773), Box(773, 773)), - Box(Box(774, 774), Box(774, 774)), - Box(Box(775, 775), Box(775, 775)), - Box(Box(776, 776), Box(776, 776)), - Box(Box(777, 777), Box(777, 777)), - Box(Box(778, 778), Box(778, 778)), - Box(Box(779, 779), Box(779, 779)), - Box(Box(780, 780), Box(780, 780)), - Box(Box(781, 781), Box(781, 781)), - Box(Box(782, 782), Box(782, 782)), - Box(Box(783, 783), Box(783, 783)), - Box(Box(784, 784), Box(784, 784)), - Box(Box(785, 785), Box(785, 785)), - Box(Box(786, 786), Box(786, 786)), - Box(Box(787, 787), Box(787, 787)), - Box(Box(788, 788), Box(788, 788)), - Box(Box(789, 789), Box(789, 789)), - Box(Box(790, 790), Box(790, 790)), - Box(Box(791, 791), Box(791, 791)), - Box(Box(792, 792), Box(792, 792)), - Box(Box(793, 793), Box(793, 793)), - Box(Box(794, 794), Box(794, 794)), - Box(Box(795, 795), Box(795, 795)), - Box(Box(796, 796), Box(796, 796)), - Box(Box(797, 797), Box(797, 797)), - Box(Box(798, 798), Box(798, 798)), - Box(Box(799, 799), Box(799, 799)), - Box(Box(800, 800), Box(800, 800)), - Box(Box(801, 801), Box(801, 801)), - Box(Box(802, 802), Box(802, 802)), - Box(Box(803, 803), Box(803, 803)), - Box(Box(804, 804), Box(804, 804)), - Box(Box(805, 805), Box(805, 805)), - Box(Box(806, 806), Box(806, 806)), - Box(Box(807, 807), Box(807, 807)), - Box(Box(808, 808), Box(808, 808)), - Box(Box(809, 809), Box(809, 809)), - Box(Box(810, 810), Box(810, 810)), - Box(Box(811, 811), Box(811, 811)), - Box(Box(812, 812), Box(812, 812)), - Box(Box(813, 813), Box(813, 813)), - Box(Box(814, 814), Box(814, 814)), - Box(Box(815, 815), Box(815, 815)), - Box(Box(816, 816), Box(816, 816)), - Box(Box(817, 817), Box(817, 817)), - Box(Box(818, 818), Box(818, 818)), - Box(Box(819, 819), Box(819, 819)), - Box(Box(820, 820), Box(820, 820)), - Box(Box(821, 821), Box(821, 821)), - Box(Box(822, 822), Box(822, 822)), - Box(Box(823, 823), Box(823, 823)), - Box(Box(824, 824), Box(824, 824)), - Box(Box(825, 825), Box(825, 825)), - Box(Box(826, 826), Box(826, 826)), - Box(Box(827, 827), Box(827, 827)), - Box(Box(828, 828), Box(828, 828)), - Box(Box(829, 829), Box(829, 829)), - Box(Box(830, 830), Box(830, 830)), - Box(Box(831, 831), Box(831, 831)), - Box(Box(832, 832), Box(832, 832)), - Box(Box(833, 833), Box(833, 833)), - Box(Box(834, 834), Box(834, 834)), - Box(Box(835, 835), Box(835, 835)), - Box(Box(836, 836), Box(836, 836)), - Box(Box(837, 837), Box(837, 837)), - Box(Box(838, 838), Box(838, 838)), - Box(Box(839, 839), Box(839, 839)), - Box(Box(840, 840), Box(840, 840)), - Box(Box(841, 841), Box(841, 841)), - Box(Box(842, 842), Box(842, 842)), - Box(Box(843, 843), Box(843, 843)), - Box(Box(844, 844), Box(844, 844)), - Box(Box(845, 845), Box(845, 845)), - Box(Box(846, 846), Box(846, 846)), - Box(Box(847, 847), Box(847, 847)), - Box(Box(848, 848), Box(848, 848)), - Box(Box(849, 849), Box(849, 849)), - Box(Box(850, 850), Box(850, 850)), - Box(Box(851, 851), Box(851, 851)), - Box(Box(852, 852), Box(852, 852)), - Box(Box(853, 853), Box(853, 853)), - Box(Box(854, 854), Box(854, 854)), - Box(Box(855, 855), Box(855, 855)), - Box(Box(856, 856), Box(856, 856)), - Box(Box(857, 857), Box(857, 857)), - Box(Box(858, 858), Box(858, 858)), - Box(Box(859, 859), Box(859, 859)), - Box(Box(860, 860), Box(860, 860)), - Box(Box(861, 861), Box(861, 861)), - Box(Box(862, 862), Box(862, 862)), - Box(Box(863, 863), Box(863, 863)), - Box(Box(864, 864), Box(864, 864)), - Box(Box(865, 865), Box(865, 865)), - Box(Box(866, 866), Box(866, 866)), - Box(Box(867, 867), Box(867, 867)), - Box(Box(868, 868), Box(868, 868)), - Box(Box(869, 869), Box(869, 869)), - Box(Box(870, 870), Box(870, 870)), - Box(Box(871, 871), Box(871, 871)), - Box(Box(872, 872), Box(872, 872)), - Box(Box(873, 873), Box(873, 873)), - Box(Box(874, 874), Box(874, 874)), - Box(Box(875, 875), Box(875, 875)), - Box(Box(876, 876), Box(876, 876)), - Box(Box(877, 877), Box(877, 877)), - Box(Box(878, 878), Box(878, 878)), - Box(Box(879, 879), Box(879, 879)), - Box(Box(880, 880), Box(880, 880)), - Box(Box(881, 881), Box(881, 881)), - Box(Box(882, 882), Box(882, 882)), - Box(Box(883, 883), Box(883, 883)), - Box(Box(884, 884), Box(884, 884)), - Box(Box(885, 885), Box(885, 885)), - Box(Box(886, 886), Box(886, 886)), - Box(Box(887, 887), Box(887, 887)), - Box(Box(888, 888), Box(888, 888)), - Box(Box(889, 889), Box(889, 889)), - Box(Box(890, 890), Box(890, 890)), - Box(Box(891, 891), Box(891, 891)), - Box(Box(892, 892), Box(892, 892)), - Box(Box(893, 893), Box(893, 893)), - Box(Box(894, 894), Box(894, 894)), - Box(Box(895, 895), Box(895, 895)), - Box(Box(896, 896), Box(896, 896)), - Box(Box(897, 897), Box(897, 897)), - Box(Box(898, 898), Box(898, 898)), - Box(Box(899, 899), Box(899, 899)), - Box(Box(900, 900), Box(900, 900)), - Box(Box(901, 901), Box(901, 901)), - Box(Box(902, 902), Box(902, 902)), - Box(Box(903, 903), Box(903, 903)), - Box(Box(904, 904), Box(904, 904)), - Box(Box(905, 905), Box(905, 905)), - Box(Box(906, 906), Box(906, 906)), - Box(Box(907, 907), Box(907, 907)), - Box(Box(908, 908), Box(908, 908)), - Box(Box(909, 909), Box(909, 909)), - Box(Box(910, 910), Box(910, 910)), - Box(Box(911, 911), Box(911, 911)), - Box(Box(912, 912), Box(912, 912)), - Box(Box(913, 913), Box(913, 913)), - Box(Box(914, 914), Box(914, 914)), - Box(Box(915, 915), Box(915, 915)), - Box(Box(916, 916), Box(916, 916)), - Box(Box(917, 917), Box(917, 917)), - Box(Box(918, 918), Box(918, 918)), - Box(Box(919, 919), Box(919, 919)), - Box(Box(920, 920), Box(920, 920)), - Box(Box(921, 921), Box(921, 921)), - Box(Box(922, 922), Box(922, 922)), - Box(Box(923, 923), Box(923, 923)), - Box(Box(924, 924), Box(924, 924)), - Box(Box(925, 925), Box(925, 925)), - Box(Box(926, 926), Box(926, 926)), - Box(Box(927, 927), Box(927, 927)), - Box(Box(928, 928), Box(928, 928)), - Box(Box(929, 929), Box(929, 929)), - Box(Box(930, 930), Box(930, 930)), - Box(Box(931, 931), Box(931, 931)), - Box(Box(932, 932), Box(932, 932)), - Box(Box(933, 933), Box(933, 933)), - Box(Box(934, 934), Box(934, 934)), - Box(Box(935, 935), Box(935, 935)), - Box(Box(936, 936), Box(936, 936)), - Box(Box(937, 937), Box(937, 937)), - Box(Box(938, 938), Box(938, 938)), - Box(Box(939, 939), Box(939, 939)), - Box(Box(940, 940), Box(940, 940)), - Box(Box(941, 941), Box(941, 941)), - Box(Box(942, 942), Box(942, 942)), - Box(Box(943, 943), Box(943, 943)), - Box(Box(944, 944), Box(944, 944)), - Box(Box(945, 945), Box(945, 945)), - Box(Box(946, 946), Box(946, 946)), - Box(Box(947, 947), Box(947, 947)), - Box(Box(948, 948), Box(948, 948)), - Box(Box(949, 949), Box(949, 949)), - Box(Box(950, 950), Box(950, 950)), - Box(Box(951, 951), Box(951, 951)), - Box(Box(952, 952), Box(952, 952)), - Box(Box(953, 953), Box(953, 953)), - Box(Box(954, 954), Box(954, 954)), - Box(Box(955, 955), Box(955, 955)), - Box(Box(956, 956), Box(956, 956)), - Box(Box(957, 957), Box(957, 957)), - Box(Box(958, 958), Box(958, 958)), - Box(Box(959, 959), Box(959, 959)), - Box(Box(960, 960), Box(960, 960)), - Box(Box(961, 961), Box(961, 961)), - Box(Box(962, 962), Box(962, 962)), - Box(Box(963, 963), Box(963, 963)), - Box(Box(964, 964), Box(964, 964)), - Box(Box(965, 965), Box(965, 965)), - Box(Box(966, 966), Box(966, 966)), - Box(Box(967, 967), Box(967, 967)), - Box(Box(968, 968), Box(968, 968)), - Box(Box(969, 969), Box(969, 969)), - Box(Box(970, 970), Box(970, 970)), - Box(Box(971, 971), Box(971, 971)), - Box(Box(972, 972), Box(972, 972)), - Box(Box(973, 973), Box(973, 973)), - Box(Box(974, 974), Box(974, 974)), - Box(Box(975, 975), Box(975, 975)), - Box(Box(976, 976), Box(976, 976)), - Box(Box(977, 977), Box(977, 977)), - Box(Box(978, 978), Box(978, 978)), - Box(Box(979, 979), Box(979, 979)), - Box(Box(980, 980), Box(980, 980)), - Box(Box(981, 981), Box(981, 981)), - Box(Box(982, 982), Box(982, 982)), - Box(Box(983, 983), Box(983, 983)), - Box(Box(984, 984), Box(984, 984)), - Box(Box(985, 985), Box(985, 985)), - Box(Box(986, 986), Box(986, 986)), - Box(Box(987, 987), Box(987, 987)), - Box(Box(988, 988), Box(988, 988)), - Box(Box(989, 989), Box(989, 989)), - Box(Box(990, 990), Box(990, 990)), - Box(Box(991, 991), Box(991, 991)), - Box(Box(992, 992), Box(992, 992)), - Box(Box(993, 993), Box(993, 993)), - Box(Box(994, 994), Box(994, 994)), - Box(Box(995, 995), Box(995, 995)), - Box(Box(996, 996), Box(996, 996)), - Box(Box(997, 997), Box(997, 997)), - Box(Box(998, 998), Box(998, 998)), - Box(Box(999, 999), Box(999, 999)), - Box(Box(1000, 1000), Box(1000, 1000)), - Box(Box(1001, 1001), Box(1001, 1001)), - Box(Box(1002, 1002), Box(1002, 1002)), - Box(Box(1003, 1003), Box(1003, 1003)), - Box(Box(1004, 1004), Box(1004, 1004)), - Box(Box(1005, 1005), Box(1005, 1005)), - Box(Box(1006, 1006), Box(1006, 1006)), - Box(Box(1007, 1007), Box(1007, 1007)), - Box(Box(1008, 1008), Box(1008, 1008)), - Box(Box(1009, 1009), Box(1009, 1009)), - Box(Box(1010, 1010), Box(1010, 1010)), - Box(Box(1011, 1011), Box(1011, 1011)), - Box(Box(1012, 1012), Box(1012, 1012)), - Box(Box(1013, 1013), Box(1013, 1013)), - Box(Box(1014, 1014), Box(1014, 1014)), - Box(Box(1015, 1015), Box(1015, 1015)), - Box(Box(1016, 1016), Box(1016, 1016)), - Box(Box(1017, 1017), Box(1017, 1017)), - Box(Box(1018, 1018), Box(1018, 1018)), - Box(Box(1019, 1019), Box(1019, 1019)), - Box(Box(1020, 1020), Box(1020, 1020)), - Box(Box(1021, 1021), Box(1021, 1021)), - Box(Box(1022, 1022), Box(1022, 1022)), - Box(Box(1023, 1023), Box(1023, 1023)), - Box(Box(1024, 1024), Box(1024, 1024)), - Box(Box(1025, 1025), Box(1025, 1025)), - Box(Box(1026, 1026), Box(1026, 1026)), - Box(Box(1027, 1027), Box(1027, 1027)), - Box(Box(1028, 1028), Box(1028, 1028)), - Box(Box(1029, 1029), Box(1029, 1029)), - Box(Box(1030, 1030), Box(1030, 1030)), - Box(Box(1031, 1031), Box(1031, 1031)), - Box(Box(1032, 1032), Box(1032, 1032)), - Box(Box(1033, 1033), Box(1033, 1033)), - Box(Box(1034, 1034), Box(1034, 1034)), - Box(Box(1035, 1035), Box(1035, 1035)), - Box(Box(1036, 1036), Box(1036, 1036)), - Box(Box(1037, 1037), Box(1037, 1037)), - Box(Box(1038, 1038), Box(1038, 1038)), - Box(Box(1039, 1039), Box(1039, 1039)), - Box(Box(1040, 1040), Box(1040, 1040)), - Box(Box(1041, 1041), Box(1041, 1041)), - Box(Box(1042, 1042), Box(1042, 1042)), - Box(Box(1043, 1043), Box(1043, 1043)), - Box(Box(1044, 1044), Box(1044, 1044)), - Box(Box(1045, 1045), Box(1045, 1045)), - Box(Box(1046, 1046), Box(1046, 1046)), - Box(Box(1047, 1047), Box(1047, 1047)), - Box(Box(1048, 1048), Box(1048, 1048)), - Box(Box(1049, 1049), Box(1049, 1049)), - Box(Box(1050, 1050), Box(1050, 1050)), - Box(Box(1051, 1051), Box(1051, 1051)), - Box(Box(1052, 1052), Box(1052, 1052)), - Box(Box(1053, 1053), Box(1053, 1053)), - Box(Box(1054, 1054), Box(1054, 1054)), - Box(Box(1055, 1055), Box(1055, 1055)), - Box(Box(1056, 1056), Box(1056, 1056)), - Box(Box(1057, 1057), Box(1057, 1057)), - Box(Box(1058, 1058), Box(1058, 1058)), - Box(Box(1059, 1059), Box(1059, 1059)), - Box(Box(1060, 1060), Box(1060, 1060)), - Box(Box(1061, 1061), Box(1061, 1061)), - Box(Box(1062, 1062), Box(1062, 1062)), - Box(Box(1063, 1063), Box(1063, 1063)), - Box(Box(1064, 1064), Box(1064, 1064)), - Box(Box(1065, 1065), Box(1065, 1065)), - Box(Box(1066, 1066), Box(1066, 1066)), - Box(Box(1067, 1067), Box(1067, 1067)), - Box(Box(1068, 1068), Box(1068, 1068)), - Box(Box(1069, 1069), Box(1069, 1069)), - Box(Box(1070, 1070), Box(1070, 1070)), - Box(Box(1071, 1071), Box(1071, 1071)), - Box(Box(1072, 1072), Box(1072, 1072)), - Box(Box(1073, 1073), Box(1073, 1073)), - Box(Box(1074, 1074), Box(1074, 1074)), - Box(Box(1075, 1075), Box(1075, 1075)), - Box(Box(1076, 1076), Box(1076, 1076)), - Box(Box(1077, 1077), Box(1077, 1077)), - Box(Box(1078, 1078), Box(1078, 1078)), - Box(Box(1079, 1079), Box(1079, 1079)), - Box(Box(1080, 1080), Box(1080, 1080)), - Box(Box(1081, 1081), Box(1081, 1081)), - Box(Box(1082, 1082), Box(1082, 1082)), - Box(Box(1083, 1083), Box(1083, 1083)), - Box(Box(1084, 1084), Box(1084, 1084)), - Box(Box(1085, 1085), Box(1085, 1085)), - Box(Box(1086, 1086), Box(1086, 1086)), - Box(Box(1087, 1087), Box(1087, 1087)), - Box(Box(1088, 1088), Box(1088, 1088)), - Box(Box(1089, 1089), Box(1089, 1089)), - Box(Box(1090, 1090), Box(1090, 1090)), - Box(Box(1091, 1091), Box(1091, 1091)), - Box(Box(1092, 1092), Box(1092, 1092)), - Box(Box(1093, 1093), Box(1093, 1093)), - Box(Box(1094, 1094), Box(1094, 1094)), - Box(Box(1095, 1095), Box(1095, 1095)), - Box(Box(1096, 1096), Box(1096, 1096)), - Box(Box(1097, 1097), Box(1097, 1097)), - Box(Box(1098, 1098), Box(1098, 1098)), - Box(Box(1099, 1099), Box(1099, 1099)), - Box(Box(1100, 1100), Box(1100, 1100)), - Box(Box(1101, 1101), Box(1101, 1101)), - Box(Box(1102, 1102), Box(1102, 1102)), - Box(Box(1103, 1103), Box(1103, 1103)), - Box(Box(1104, 1104), Box(1104, 1104)), - Box(Box(1105, 1105), Box(1105, 1105)), - Box(Box(1106, 1106), Box(1106, 1106)), - Box(Box(1107, 1107), Box(1107, 1107)), - Box(Box(1108, 1108), Box(1108, 1108)), - Box(Box(1109, 1109), Box(1109, 1109)), - Box(Box(1110, 1110), Box(1110, 1110)), - Box(Box(1111, 1111), Box(1111, 1111)), - Box(Box(1112, 1112), Box(1112, 1112)), - Box(Box(1113, 1113), Box(1113, 1113)), - Box(Box(1114, 1114), Box(1114, 1114)), - Box(Box(1115, 1115), Box(1115, 1115)), - Box(Box(1116, 1116), Box(1116, 1116)), - Box(Box(1117, 1117), Box(1117, 1117)), - Box(Box(1118, 1118), Box(1118, 1118)), - Box(Box(1119, 1119), Box(1119, 1119)), - Box(Box(1120, 1120), Box(1120, 1120)), - Box(Box(1121, 1121), Box(1121, 1121)), - Box(Box(1122, 1122), Box(1122, 1122)), - Box(Box(1123, 1123), Box(1123, 1123)), - Box(Box(1124, 1124), Box(1124, 1124)), - Box(Box(1125, 1125), Box(1125, 1125)), - Box(Box(1126, 1126), Box(1126, 1126)), - Box(Box(1127, 1127), Box(1127, 1127)), - Box(Box(1128, 1128), Box(1128, 1128)), - Box(Box(1129, 1129), Box(1129, 1129)), - Box(Box(1130, 1130), Box(1130, 1130)), - Box(Box(1131, 1131), Box(1131, 1131)), - Box(Box(1132, 1132), Box(1132, 1132)), - Box(Box(1133, 1133), Box(1133, 1133)), - Box(Box(1134, 1134), Box(1134, 1134)), - Box(Box(1135, 1135), Box(1135, 1135)), - Box(Box(1136, 1136), Box(1136, 1136)), - Box(Box(1137, 1137), Box(1137, 1137)), - Box(Box(1138, 1138), Box(1138, 1138)), - Box(Box(1139, 1139), Box(1139, 1139)), - Box(Box(1140, 1140), Box(1140, 1140)), - Box(Box(1141, 1141), Box(1141, 1141)), - Box(Box(1142, 1142), Box(1142, 1142)), - Box(Box(1143, 1143), Box(1143, 1143)), - Box(Box(1144, 1144), Box(1144, 1144)), - Box(Box(1145, 1145), Box(1145, 1145)), - Box(Box(1146, 1146), Box(1146, 1146)), - Box(Box(1147, 1147), Box(1147, 1147)), - Box(Box(1148, 1148), Box(1148, 1148)), - Box(Box(1149, 1149), Box(1149, 1149)), - Box(Box(1150, 1150), Box(1150, 1150)), - Box(Box(1151, 1151), Box(1151, 1151)), - Box(Box(1152, 1152), Box(1152, 1152)), - Box(Box(1153, 1153), Box(1153, 1153)), - Box(Box(1154, 1154), Box(1154, 1154)), - Box(Box(1155, 1155), Box(1155, 1155)), - Box(Box(1156, 1156), Box(1156, 1156)), - Box(Box(1157, 1157), Box(1157, 1157)), - Box(Box(1158, 1158), Box(1158, 1158)), - Box(Box(1159, 1159), Box(1159, 1159)), - Box(Box(1160, 1160), Box(1160, 1160)), - Box(Box(1161, 1161), Box(1161, 1161)), - Box(Box(1162, 1162), Box(1162, 1162)), - Box(Box(1163, 1163), Box(1163, 1163)), - Box(Box(1164, 1164), Box(1164, 1164)), - Box(Box(1165, 1165), Box(1165, 1165)), - Box(Box(1166, 1166), Box(1166, 1166)), - Box(Box(1167, 1167), Box(1167, 1167)), - Box(Box(1168, 1168), Box(1168, 1168)), - Box(Box(1169, 1169), Box(1169, 1169)), - Box(Box(1170, 1170), Box(1170, 1170)), - Box(Box(1171, 1171), Box(1171, 1171)), - Box(Box(1172, 1172), Box(1172, 1172)), - Box(Box(1173, 1173), Box(1173, 1173)), - Box(Box(1174, 1174), Box(1174, 1174)), - Box(Box(1175, 1175), Box(1175, 1175)), - Box(Box(1176, 1176), Box(1176, 1176)), - Box(Box(1177, 1177), Box(1177, 1177)), - Box(Box(1178, 1178), Box(1178, 1178)), - Box(Box(1179, 1179), Box(1179, 1179)), - Box(Box(1180, 1180), Box(1180, 1180)), - Box(Box(1181, 1181), Box(1181, 1181)), - Box(Box(1182, 1182), Box(1182, 1182)), - Box(Box(1183, 1183), Box(1183, 1183)), - Box(Box(1184, 1184), Box(1184, 1184)), - Box(Box(1185, 1185), Box(1185, 1185)), - Box(Box(1186, 1186), Box(1186, 1186)), - Box(Box(1187, 1187), Box(1187, 1187)), - Box(Box(1188, 1188), Box(1188, 1188)), - Box(Box(1189, 1189), Box(1189, 1189)), - Box(Box(1190, 1190), Box(1190, 1190)), - Box(Box(1191, 1191), Box(1191, 1191)), - Box(Box(1192, 1192), Box(1192, 1192)), - Box(Box(1193, 1193), Box(1193, 1193)), - Box(Box(1194, 1194), Box(1194, 1194)), - Box(Box(1195, 1195), Box(1195, 1195)), - Box(Box(1196, 1196), Box(1196, 1196)), - Box(Box(1197, 1197), Box(1197, 1197)), - Box(Box(1198, 1198), Box(1198, 1198)), - Box(Box(1199, 1199), Box(1199, 1199)), - Box(Box(1200, 1200), Box(1200, 1200)), - Box(Box(1201, 1201), Box(1201, 1201)), - Box(Box(1202, 1202), Box(1202, 1202)), - Box(Box(1203, 1203), Box(1203, 1203)), - Box(Box(1204, 1204), Box(1204, 1204)), - Box(Box(1205, 1205), Box(1205, 1205)), - Box(Box(1206, 1206), Box(1206, 1206)), - Box(Box(1207, 1207), Box(1207, 1207)), - Box(Box(1208, 1208), Box(1208, 1208)), - Box(Box(1209, 1209), Box(1209, 1209)), - Box(Box(1210, 1210), Box(1210, 1210)), - Box(Box(1211, 1211), Box(1211, 1211)), - Box(Box(1212, 1212), Box(1212, 1212)), - Box(Box(1213, 1213), Box(1213, 1213)), - Box(Box(1214, 1214), Box(1214, 1214)), - Box(Box(1215, 1215), Box(1215, 1215)), - Box(Box(1216, 1216), Box(1216, 1216)), - Box(Box(1217, 1217), Box(1217, 1217)), - Box(Box(1218, 1218), Box(1218, 1218)), - Box(Box(1219, 1219), Box(1219, 1219)), - Box(Box(1220, 1220), Box(1220, 1220)), - Box(Box(1221, 1221), Box(1221, 1221)), - Box(Box(1222, 1222), Box(1222, 1222)), - Box(Box(1223, 1223), Box(1223, 1223)), - Box(Box(1224, 1224), Box(1224, 1224)), - Box(Box(1225, 1225), Box(1225, 1225)), - Box(Box(1226, 1226), Box(1226, 1226)), - Box(Box(1227, 1227), Box(1227, 1227)), - Box(Box(1228, 1228), Box(1228, 1228)), - Box(Box(1229, 1229), Box(1229, 1229)), - Box(Box(1230, 1230), Box(1230, 1230)), - Box(Box(1231, 1231), Box(1231, 1231)), - Box(Box(1232, 1232), Box(1232, 1232)), - Box(Box(1233, 1233), Box(1233, 1233)), - Box(Box(1234, 1234), Box(1234, 1234)), - Box(Box(1235, 1235), Box(1235, 1235)), - Box(Box(1236, 1236), Box(1236, 1236)), - Box(Box(1237, 1237), Box(1237, 1237)), - Box(Box(1238, 1238), Box(1238, 1238)), - Box(Box(1239, 1239), Box(1239, 1239)), - Box(Box(1240, 1240), Box(1240, 1240)), - Box(Box(1241, 1241), Box(1241, 1241)), - Box(Box(1242, 1242), Box(1242, 1242)), - Box(Box(1243, 1243), Box(1243, 1243)), - Box(Box(1244, 1244), Box(1244, 1244)), - Box(Box(1245, 1245), Box(1245, 1245)), - Box(Box(1246, 1246), Box(1246, 1246)), - Box(Box(1247, 1247), Box(1247, 1247)), - Box(Box(1248, 1248), Box(1248, 1248)), - Box(Box(1249, 1249), Box(1249, 1249)), - Box(Box(1250, 1250), Box(1250, 1250)), - Box(Box(1251, 1251), Box(1251, 1251)), - Box(Box(1252, 1252), Box(1252, 1252)), - Box(Box(1253, 1253), Box(1253, 1253)), - Box(Box(1254, 1254), Box(1254, 1254)), - Box(Box(1255, 1255), Box(1255, 1255)), - Box(Box(1256, 1256), Box(1256, 1256)), - Box(Box(1257, 1257), Box(1257, 1257)), - Box(Box(1258, 1258), Box(1258, 1258)), - Box(Box(1259, 1259), Box(1259, 1259)), - Box(Box(1260, 1260), Box(1260, 1260)), - Box(Box(1261, 1261), Box(1261, 1261)), - Box(Box(1262, 1262), Box(1262, 1262)), - Box(Box(1263, 1263), Box(1263, 1263)), - Box(Box(1264, 1264), Box(1264, 1264)), - Box(Box(1265, 1265), Box(1265, 1265)), - Box(Box(1266, 1266), Box(1266, 1266)), - Box(Box(1267, 1267), Box(1267, 1267)), - Box(Box(1268, 1268), Box(1268, 1268)), - Box(Box(1269, 1269), Box(1269, 1269)), - Box(Box(1270, 1270), Box(1270, 1270)), - Box(Box(1271, 1271), Box(1271, 1271)), - Box(Box(1272, 1272), Box(1272, 1272)), - Box(Box(1273, 1273), Box(1273, 1273)), - Box(Box(1274, 1274), Box(1274, 1274)), - Box(Box(1275, 1275), Box(1275, 1275)), - Box(Box(1276, 1276), Box(1276, 1276)), - Box(Box(1277, 1277), Box(1277, 1277)), - Box(Box(1278, 1278), Box(1278, 1278)), - Box(Box(1279, 1279), Box(1279, 1279)), - Box(Box(1280, 1280), Box(1280, 1280)), - Box(Box(1281, 1281), Box(1281, 1281)), - Box(Box(1282, 1282), Box(1282, 1282)), - Box(Box(1283, 1283), Box(1283, 1283)), - Box(Box(1284, 1284), Box(1284, 1284)), - Box(Box(1285, 1285), Box(1285, 1285)), - Box(Box(1286, 1286), Box(1286, 1286)), - Box(Box(1287, 1287), Box(1287, 1287)), - Box(Box(1288, 1288), Box(1288, 1288)), - Box(Box(1289, 1289), Box(1289, 1289)), - Box(Box(1290, 1290), Box(1290, 1290)), - Box(Box(1291, 1291), Box(1291, 1291)), - Box(Box(1292, 1292), Box(1292, 1292)), - Box(Box(1293, 1293), Box(1293, 1293)), - Box(Box(1294, 1294), Box(1294, 1294)), - Box(Box(1295, 1295), Box(1295, 1295)), - Box(Box(1296, 1296), Box(1296, 1296)), - Box(Box(1297, 1297), Box(1297, 1297)), - Box(Box(1298, 1298), Box(1298, 1298)), - Box(Box(1299, 1299), Box(1299, 1299)), - Box(Box(1300, 1300), Box(1300, 1300)), - Box(Box(1301, 1301), Box(1301, 1301)), - Box(Box(1302, 1302), Box(1302, 1302)), - Box(Box(1303, 1303), Box(1303, 1303)), - Box(Box(1304, 1304), Box(1304, 1304)), - Box(Box(1305, 1305), Box(1305, 1305)), - Box(Box(1306, 1306), Box(1306, 1306)), - Box(Box(1307, 1307), Box(1307, 1307)), - Box(Box(1308, 1308), Box(1308, 1308)), - Box(Box(1309, 1309), Box(1309, 1309)), - Box(Box(1310, 1310), Box(1310, 1310)), - Box(Box(1311, 1311), Box(1311, 1311)), - Box(Box(1312, 1312), Box(1312, 1312)), - Box(Box(1313, 1313), Box(1313, 1313)), - Box(Box(1314, 1314), Box(1314, 1314)), - Box(Box(1315, 1315), Box(1315, 1315)), - Box(Box(1316, 1316), Box(1316, 1316)), - Box(Box(1317, 1317), Box(1317, 1317)), - Box(Box(1318, 1318), Box(1318, 1318)), - Box(Box(1319, 1319), Box(1319, 1319)), - Box(Box(1320, 1320), Box(1320, 1320)), - Box(Box(1321, 1321), Box(1321, 1321)), - Box(Box(1322, 1322), Box(1322, 1322)), - Box(Box(1323, 1323), Box(1323, 1323)), - Box(Box(1324, 1324), Box(1324, 1324)), - Box(Box(1325, 1325), Box(1325, 1325)), - Box(Box(1326, 1326), Box(1326, 1326)), - Box(Box(1327, 1327), Box(1327, 1327)), - Box(Box(1328, 1328), Box(1328, 1328)), - Box(Box(1329, 1329), Box(1329, 1329)), - Box(Box(1330, 1330), Box(1330, 1330)), - Box(Box(1331, 1331), Box(1331, 1331)), - Box(Box(1332, 1332), Box(1332, 1332)), - Box(Box(1333, 1333), Box(1333, 1333)), - Box(Box(1334, 1334), Box(1334, 1334)), - Box(Box(1335, 1335), Box(1335, 1335)), - Box(Box(1336, 1336), Box(1336, 1336)), - Box(Box(1337, 1337), Box(1337, 1337)), - Box(Box(1338, 1338), Box(1338, 1338)), - Box(Box(1339, 1339), Box(1339, 1339)), - Box(Box(1340, 1340), Box(1340, 1340)), - Box(Box(1341, 1341), Box(1341, 1341)), - Box(Box(1342, 1342), Box(1342, 1342)), - Box(Box(1343, 1343), Box(1343, 1343)), - Box(Box(1344, 1344), Box(1344, 1344)), - Box(Box(1345, 1345), Box(1345, 1345)), - Box(Box(1346, 1346), Box(1346, 1346)), - Box(Box(1347, 1347), Box(1347, 1347)), - Box(Box(1348, 1348), Box(1348, 1348)), - Box(Box(1349, 1349), Box(1349, 1349)), - Box(Box(1350, 1350), Box(1350, 1350)), - Box(Box(1351, 1351), Box(1351, 1351)), - Box(Box(1352, 1352), Box(1352, 1352)), - Box(Box(1353, 1353), Box(1353, 1353)), - Box(Box(1354, 1354), Box(1354, 1354)), - Box(Box(1355, 1355), Box(1355, 1355)), - Box(Box(1356, 1356), Box(1356, 1356)), - Box(Box(1357, 1357), Box(1357, 1357)), - Box(Box(1358, 1358), Box(1358, 1358)), - Box(Box(1359, 1359), Box(1359, 1359)), - Box(Box(1360, 1360), Box(1360, 1360)), - Box(Box(1361, 1361), Box(1361, 1361)), - Box(Box(1362, 1362), Box(1362, 1362)), - Box(Box(1363, 1363), Box(1363, 1363)), - Box(Box(1364, 1364), Box(1364, 1364)), - Box(Box(1365, 1365), Box(1365, 1365)), - Box(Box(1366, 1366), Box(1366, 1366)), - Box(Box(1367, 1367), Box(1367, 1367)), - Box(Box(1368, 1368), Box(1368, 1368)), - Box(Box(1369, 1369), Box(1369, 1369)), - Box(Box(1370, 1370), Box(1370, 1370)), - Box(Box(1371, 1371), Box(1371, 1371)), - Box(Box(1372, 1372), Box(1372, 1372)), - Box(Box(1373, 1373), Box(1373, 1373)), - Box(Box(1374, 1374), Box(1374, 1374)), - Box(Box(1375, 1375), Box(1375, 1375)), - Box(Box(1376, 1376), Box(1376, 1376)), - Box(Box(1377, 1377), Box(1377, 1377)), - Box(Box(1378, 1378), Box(1378, 1378)), - Box(Box(1379, 1379), Box(1379, 1379)), - Box(Box(1380, 1380), Box(1380, 1380)), - Box(Box(1381, 1381), Box(1381, 1381)), - Box(Box(1382, 1382), Box(1382, 1382)), - Box(Box(1383, 1383), Box(1383, 1383)), - Box(Box(1384, 1384), Box(1384, 1384)), - Box(Box(1385, 1385), Box(1385, 1385)), - Box(Box(1386, 1386), Box(1386, 1386)), - Box(Box(1387, 1387), Box(1387, 1387)), - Box(Box(1388, 1388), Box(1388, 1388)), - Box(Box(1389, 1389), Box(1389, 1389)), - Box(Box(1390, 1390), Box(1390, 1390)), - Box(Box(1391, 1391), Box(1391, 1391)), - Box(Box(1392, 1392), Box(1392, 1392)), - Box(Box(1393, 1393), Box(1393, 1393)), - Box(Box(1394, 1394), Box(1394, 1394)), - Box(Box(1395, 1395), Box(1395, 1395)), - Box(Box(1396, 1396), Box(1396, 1396)), - Box(Box(1397, 1397), Box(1397, 1397)), - Box(Box(1398, 1398), Box(1398, 1398)), - Box(Box(1399, 1399), Box(1399, 1399)), - Box(Box(1400, 1400), Box(1400, 1400)), - Box(Box(1401, 1401), Box(1401, 1401)), - Box(Box(1402, 1402), Box(1402, 1402)), - Box(Box(1403, 1403), Box(1403, 1403)), - Box(Box(1404, 1404), Box(1404, 1404)), - Box(Box(1405, 1405), Box(1405, 1405)), - Box(Box(1406, 1406), Box(1406, 1406)), - Box(Box(1407, 1407), Box(1407, 1407)), - Box(Box(1408, 1408), Box(1408, 1408)), - Box(Box(1409, 1409), Box(1409, 1409)), - Box(Box(1410, 1410), Box(1410, 1410)), - Box(Box(1411, 1411), Box(1411, 1411)), - Box(Box(1412, 1412), Box(1412, 1412)), - Box(Box(1413, 1413), Box(1413, 1413)), - Box(Box(1414, 1414), Box(1414, 1414)), - Box(Box(1415, 1415), Box(1415, 1415)), - Box(Box(1416, 1416), Box(1416, 1416)), - Box(Box(1417, 1417), Box(1417, 1417)), - Box(Box(1418, 1418), Box(1418, 1418)), - Box(Box(1419, 1419), Box(1419, 1419)), - Box(Box(1420, 1420), Box(1420, 1420)), - Box(Box(1421, 1421), Box(1421, 1421)), - Box(Box(1422, 1422), Box(1422, 1422)), - Box(Box(1423, 1423), Box(1423, 1423)), - Box(Box(1424, 1424), Box(1424, 1424)), - Box(Box(1425, 1425), Box(1425, 1425)), - Box(Box(1426, 1426), Box(1426, 1426)), - Box(Box(1427, 1427), Box(1427, 1427)), - Box(Box(1428, 1428), Box(1428, 1428)), - Box(Box(1429, 1429), Box(1429, 1429)), - Box(Box(1430, 1430), Box(1430, 1430)), - Box(Box(1431, 1431), Box(1431, 1431)), - Box(Box(1432, 1432), Box(1432, 1432)), - Box(Box(1433, 1433), Box(1433, 1433)), - Box(Box(1434, 1434), Box(1434, 1434)), - Box(Box(1435, 1435), Box(1435, 1435)), - Box(Box(1436, 1436), Box(1436, 1436)), - Box(Box(1437, 1437), Box(1437, 1437)), - Box(Box(1438, 1438), Box(1438, 1438)), - Box(Box(1439, 1439), Box(1439, 1439)), - Box(Box(1440, 1440), Box(1440, 1440)), - Box(Box(1441, 1441), Box(1441, 1441)), - Box(Box(1442, 1442), Box(1442, 1442)), - Box(Box(1443, 1443), Box(1443, 1443)), - Box(Box(1444, 1444), Box(1444, 1444)), - Box(Box(1445, 1445), Box(1445, 1445)), - Box(Box(1446, 1446), Box(1446, 1446)), - Box(Box(1447, 1447), Box(1447, 1447)), - Box(Box(1448, 1448), Box(1448, 1448)), - Box(Box(1449, 1449), Box(1449, 1449)), - Box(Box(1450, 1450), Box(1450, 1450)), - Box(Box(1451, 1451), Box(1451, 1451)), - Box(Box(1452, 1452), Box(1452, 1452)), - Box(Box(1453, 1453), Box(1453, 1453)), - Box(Box(1454, 1454), Box(1454, 1454)), - Box(Box(1455, 1455), Box(1455, 1455)), - Box(Box(1456, 1456), Box(1456, 1456)), - Box(Box(1457, 1457), Box(1457, 1457)), - Box(Box(1458, 1458), Box(1458, 1458)), - Box(Box(1459, 1459), Box(1459, 1459)), - Box(Box(1460, 1460), Box(1460, 1460)), - Box(Box(1461, 1461), Box(1461, 1461)), - Box(Box(1462, 1462), Box(1462, 1462)), - Box(Box(1463, 1463), Box(1463, 1463)), - Box(Box(1464, 1464), Box(1464, 1464)), - Box(Box(1465, 1465), Box(1465, 1465)), - Box(Box(1466, 1466), Box(1466, 1466)), - Box(Box(1467, 1467), Box(1467, 1467)), - Box(Box(1468, 1468), Box(1468, 1468)), - Box(Box(1469, 1469), Box(1469, 1469)), - Box(Box(1470, 1470), Box(1470, 1470)), - Box(Box(1471, 1471), Box(1471, 1471)), - Box(Box(1472, 1472), Box(1472, 1472)), - Box(Box(1473, 1473), Box(1473, 1473)), - Box(Box(1474, 1474), Box(1474, 1474)), - Box(Box(1475, 1475), Box(1475, 1475)), - Box(Box(1476, 1476), Box(1476, 1476)), - Box(Box(1477, 1477), Box(1477, 1477)), - Box(Box(1478, 1478), Box(1478, 1478)), - Box(Box(1479, 1479), Box(1479, 1479)), - Box(Box(1480, 1480), Box(1480, 1480)), - Box(Box(1481, 1481), Box(1481, 1481)), - Box(Box(1482, 1482), Box(1482, 1482)), - Box(Box(1483, 1483), Box(1483, 1483)), - Box(Box(1484, 1484), Box(1484, 1484)), - Box(Box(1485, 1485), Box(1485, 1485)), - Box(Box(1486, 1486), Box(1486, 1486)), - Box(Box(1487, 1487), Box(1487, 1487)), - Box(Box(1488, 1488), Box(1488, 1488)), - Box(Box(1489, 1489), Box(1489, 1489)), - Box(Box(1490, 1490), Box(1490, 1490)), - Box(Box(1491, 1491), Box(1491, 1491)), - Box(Box(1492, 1492), Box(1492, 1492)), - Box(Box(1493, 1493), Box(1493, 1493)), - Box(Box(1494, 1494), Box(1494, 1494)), - Box(Box(1495, 1495), Box(1495, 1495)), - Box(Box(1496, 1496), Box(1496, 1496)), - Box(Box(1497, 1497), Box(1497, 1497)), - Box(Box(1498, 1498), Box(1498, 1498)), - Box(Box(1499, 1499), Box(1499, 1499)), - Box(Box(1500, 1500), Box(1500, 1500)), - Box(Box(1501, 1501), Box(1501, 1501)), - Box(Box(1502, 1502), Box(1502, 1502)), - Box(Box(1503, 1503), Box(1503, 1503)), - Box(Box(1504, 1504), Box(1504, 1504)), - Box(Box(1505, 1505), Box(1505, 1505)), - Box(Box(1506, 1506), Box(1506, 1506)), - Box(Box(1507, 1507), Box(1507, 1507)), - Box(Box(1508, 1508), Box(1508, 1508)), - Box(Box(1509, 1509), Box(1509, 1509)), - Box(Box(1510, 1510), Box(1510, 1510)), - Box(Box(1511, 1511), Box(1511, 1511)), - Box(Box(1512, 1512), Box(1512, 1512)), - Box(Box(1513, 1513), Box(1513, 1513)), - Box(Box(1514, 1514), Box(1514, 1514)), - Box(Box(1515, 1515), Box(1515, 1515)), - Box(Box(1516, 1516), Box(1516, 1516)), - Box(Box(1517, 1517), Box(1517, 1517)), - Box(Box(1518, 1518), Box(1518, 1518)), - Box(Box(1519, 1519), Box(1519, 1519)), - Box(Box(1520, 1520), Box(1520, 1520)), - Box(Box(1521, 1521), Box(1521, 1521)), - Box(Box(1522, 1522), Box(1522, 1522)), - Box(Box(1523, 1523), Box(1523, 1523)), - Box(Box(1524, 1524), Box(1524, 1524)), - Box(Box(1525, 1525), Box(1525, 1525)), - Box(Box(1526, 1526), Box(1526, 1526)), - Box(Box(1527, 1527), Box(1527, 1527)), - Box(Box(1528, 1528), Box(1528, 1528)), - Box(Box(1529, 1529), Box(1529, 1529)), - Box(Box(1530, 1530), Box(1530, 1530)), - Box(Box(1531, 1531), Box(1531, 1531)), - Box(Box(1532, 1532), Box(1532, 1532)), - Box(Box(1533, 1533), Box(1533, 1533)), - Box(Box(1534, 1534), Box(1534, 1534)), - Box(Box(1535, 1535), Box(1535, 1535)), - Box(Box(1536, 1536), Box(1536, 1536)), - Box(Box(1537, 1537), Box(1537, 1537)), - Box(Box(1538, 1538), Box(1538, 1538)), - Box(Box(1539, 1539), Box(1539, 1539)), - Box(Box(1540, 1540), Box(1540, 1540)), - Box(Box(1541, 1541), Box(1541, 1541)), - Box(Box(1542, 1542), Box(1542, 1542)), - Box(Box(1543, 1543), Box(1543, 1543)), - Box(Box(1544, 1544), Box(1544, 1544)), - Box(Box(1545, 1545), Box(1545, 1545)), - Box(Box(1546, 1546), Box(1546, 1546)), - Box(Box(1547, 1547), Box(1547, 1547)), - Box(Box(1548, 1548), Box(1548, 1548)), - Box(Box(1549, 1549), Box(1549, 1549)), - Box(Box(1550, 1550), Box(1550, 1550)), - Box(Box(1551, 1551), Box(1551, 1551)), - Box(Box(1552, 1552), Box(1552, 1552)), - Box(Box(1553, 1553), Box(1553, 1553)), - Box(Box(1554, 1554), Box(1554, 1554)), - Box(Box(1555, 1555), Box(1555, 1555)), - Box(Box(1556, 1556), Box(1556, 1556)), - Box(Box(1557, 1557), Box(1557, 1557)), - Box(Box(1558, 1558), Box(1558, 1558)), - Box(Box(1559, 1559), Box(1559, 1559)), - Box(Box(1560, 1560), Box(1560, 1560)), - Box(Box(1561, 1561), Box(1561, 1561)), - Box(Box(1562, 1562), Box(1562, 1562)), - Box(Box(1563, 1563), Box(1563, 1563)), - Box(Box(1564, 1564), Box(1564, 1564)), - Box(Box(1565, 1565), Box(1565, 1565)), - Box(Box(1566, 1566), Box(1566, 1566)), - Box(Box(1567, 1567), Box(1567, 1567)), - Box(Box(1568, 1568), Box(1568, 1568)), - Box(Box(1569, 1569), Box(1569, 1569)), - Box(Box(1570, 1570), Box(1570, 1570)), - Box(Box(1571, 1571), Box(1571, 1571)), - Box(Box(1572, 1572), Box(1572, 1572)), - Box(Box(1573, 1573), Box(1573, 1573)), - Box(Box(1574, 1574), Box(1574, 1574)), - Box(Box(1575, 1575), Box(1575, 1575)), - Box(Box(1576, 1576), Box(1576, 1576)), - Box(Box(1577, 1577), Box(1577, 1577)), - Box(Box(1578, 1578), Box(1578, 1578)), - Box(Box(1579, 1579), Box(1579, 1579)), - Box(Box(1580, 1580), Box(1580, 1580)), - Box(Box(1581, 1581), Box(1581, 1581)), - Box(Box(1582, 1582), Box(1582, 1582)), - Box(Box(1583, 1583), Box(1583, 1583)), - Box(Box(1584, 1584), Box(1584, 1584)), - Box(Box(1585, 1585), Box(1585, 1585)), - Box(Box(1586, 1586), Box(1586, 1586)), - Box(Box(1587, 1587), Box(1587, 1587)), - Box(Box(1588, 1588), Box(1588, 1588)), - Box(Box(1589, 1589), Box(1589, 1589)), - Box(Box(1590, 1590), Box(1590, 1590)), - Box(Box(1591, 1591), Box(1591, 1591)), - Box(Box(1592, 1592), Box(1592, 1592)), - Box(Box(1593, 1593), Box(1593, 1593)), - Box(Box(1594, 1594), Box(1594, 1594)), - Box(Box(1595, 1595), Box(1595, 1595)), - Box(Box(1596, 1596), Box(1596, 1596)), - Box(Box(1597, 1597), Box(1597, 1597)), - Box(Box(1598, 1598), Box(1598, 1598)), - Box(Box(1599, 1599), Box(1599, 1599)), - Box(Box(1600, 1600), Box(1600, 1600)), - Box(Box(1601, 1601), Box(1601, 1601)), - Box(Box(1602, 1602), Box(1602, 1602)), - Box(Box(1603, 1603), Box(1603, 1603)), - Box(Box(1604, 1604), Box(1604, 1604)), - Box(Box(1605, 1605), Box(1605, 1605)), - Box(Box(1606, 1606), Box(1606, 1606)), - Box(Box(1607, 1607), Box(1607, 1607)), - Box(Box(1608, 1608), Box(1608, 1608)), - Box(Box(1609, 1609), Box(1609, 1609)), - Box(Box(1610, 1610), Box(1610, 1610)), - Box(Box(1611, 1611), Box(1611, 1611)), - Box(Box(1612, 1612), Box(1612, 1612)), - Box(Box(1613, 1613), Box(1613, 1613)), - Box(Box(1614, 1614), Box(1614, 1614)), - Box(Box(1615, 1615), Box(1615, 1615)), - Box(Box(1616, 1616), Box(1616, 1616)), - Box(Box(1617, 1617), Box(1617, 1617)), - Box(Box(1618, 1618), Box(1618, 1618)), - Box(Box(1619, 1619), Box(1619, 1619)), - Box(Box(1620, 1620), Box(1620, 1620)), - Box(Box(1621, 1621), Box(1621, 1621)), - Box(Box(1622, 1622), Box(1622, 1622)), - Box(Box(1623, 1623), Box(1623, 1623)), - Box(Box(1624, 1624), Box(1624, 1624)), - Box(Box(1625, 1625), Box(1625, 1625)), - Box(Box(1626, 1626), Box(1626, 1626)), - Box(Box(1627, 1627), Box(1627, 1627)), - Box(Box(1628, 1628), Box(1628, 1628)), - Box(Box(1629, 1629), Box(1629, 1629)), - Box(Box(1630, 1630), Box(1630, 1630)), - Box(Box(1631, 1631), Box(1631, 1631)), - Box(Box(1632, 1632), Box(1632, 1632)), - Box(Box(1633, 1633), Box(1633, 1633)), - Box(Box(1634, 1634), Box(1634, 1634)), - Box(Box(1635, 1635), Box(1635, 1635)), - Box(Box(1636, 1636), Box(1636, 1636)), - Box(Box(1637, 1637), Box(1637, 1637)), - Box(Box(1638, 1638), Box(1638, 1638)), - Box(Box(1639, 1639), Box(1639, 1639)), - Box(Box(1640, 1640), Box(1640, 1640)), - Box(Box(1641, 1641), Box(1641, 1641)), - Box(Box(1642, 1642), Box(1642, 1642)), - Box(Box(1643, 1643), Box(1643, 1643)), - Box(Box(1644, 1644), Box(1644, 1644)), - Box(Box(1645, 1645), Box(1645, 1645)), - Box(Box(1646, 1646), Box(1646, 1646)), - Box(Box(1647, 1647), Box(1647, 1647)), - Box(Box(1648, 1648), Box(1648, 1648)), - Box(Box(1649, 1649), Box(1649, 1649)), - Box(Box(1650, 1650), Box(1650, 1650)), - Box(Box(1651, 1651), Box(1651, 1651)), - Box(Box(1652, 1652), Box(1652, 1652)), - Box(Box(1653, 1653), Box(1653, 1653)), - Box(Box(1654, 1654), Box(1654, 1654)), - Box(Box(1655, 1655), Box(1655, 1655)), - Box(Box(1656, 1656), Box(1656, 1656)), - Box(Box(1657, 1657), Box(1657, 1657)), - Box(Box(1658, 1658), Box(1658, 1658)), - Box(Box(1659, 1659), Box(1659, 1659)), - Box(Box(1660, 1660), Box(1660, 1660)), - Box(Box(1661, 1661), Box(1661, 1661)), - Box(Box(1662, 1662), Box(1662, 1662)), - Box(Box(1663, 1663), Box(1663, 1663)), - Box(Box(1664, 1664), Box(1664, 1664)), - Box(Box(1665, 1665), Box(1665, 1665)), - Box(Box(1666, 1666), Box(1666, 1666)), - Box(Box(1667, 1667), Box(1667, 1667)), - Box(Box(1668, 1668), Box(1668, 1668)), - Box(Box(1669, 1669), Box(1669, 1669)), - Box(Box(1670, 1670), Box(1670, 1670)), - Box(Box(1671, 1671), Box(1671, 1671)), - Box(Box(1672, 1672), Box(1672, 1672)), - Box(Box(1673, 1673), Box(1673, 1673)), - Box(Box(1674, 1674), Box(1674, 1674)), - Box(Box(1675, 1675), Box(1675, 1675)), - Box(Box(1676, 1676), Box(1676, 1676)), - Box(Box(1677, 1677), Box(1677, 1677)), - Box(Box(1678, 1678), Box(1678, 1678)), - Box(Box(1679, 1679), Box(1679, 1679)), - Box(Box(1680, 1680), Box(1680, 1680)), - Box(Box(1681, 1681), Box(1681, 1681)), - Box(Box(1682, 1682), Box(1682, 1682)), - Box(Box(1683, 1683), Box(1683, 1683)), - Box(Box(1684, 1684), Box(1684, 1684)), - Box(Box(1685, 1685), Box(1685, 1685)), - Box(Box(1686, 1686), Box(1686, 1686)), - Box(Box(1687, 1687), Box(1687, 1687)), - Box(Box(1688, 1688), Box(1688, 1688)), - Box(Box(1689, 1689), Box(1689, 1689)), - Box(Box(1690, 1690), Box(1690, 1690)), - Box(Box(1691, 1691), Box(1691, 1691)), - Box(Box(1692, 1692), Box(1692, 1692)), - Box(Box(1693, 1693), Box(1693, 1693)), - Box(Box(1694, 1694), Box(1694, 1694)), - Box(Box(1695, 1695), Box(1695, 1695)), - Box(Box(1696, 1696), Box(1696, 1696)), - Box(Box(1697, 1697), Box(1697, 1697)), - Box(Box(1698, 1698), Box(1698, 1698)), - Box(Box(1699, 1699), Box(1699, 1699)), - Box(Box(1700, 1700), Box(1700, 1700)), - Box(Box(1701, 1701), Box(1701, 1701)), - Box(Box(1702, 1702), Box(1702, 1702)), - Box(Box(1703, 1703), Box(1703, 1703)), - Box(Box(1704, 1704), Box(1704, 1704)), - Box(Box(1705, 1705), Box(1705, 1705)), - Box(Box(1706, 1706), Box(1706, 1706)), - Box(Box(1707, 1707), Box(1707, 1707)), - Box(Box(1708, 1708), Box(1708, 1708)), - Box(Box(1709, 1709), Box(1709, 1709)), - Box(Box(1710, 1710), Box(1710, 1710)), - Box(Box(1711, 1711), Box(1711, 1711)), - Box(Box(1712, 1712), Box(1712, 1712)), - Box(Box(1713, 1713), Box(1713, 1713)), - Box(Box(1714, 1714), Box(1714, 1714)), - Box(Box(1715, 1715), Box(1715, 1715)), - Box(Box(1716, 1716), Box(1716, 1716)), - Box(Box(1717, 1717), Box(1717, 1717)), - Box(Box(1718, 1718), Box(1718, 1718)), - Box(Box(1719, 1719), Box(1719, 1719)), - Box(Box(1720, 1720), Box(1720, 1720)), - Box(Box(1721, 1721), Box(1721, 1721)), - Box(Box(1722, 1722), Box(1722, 1722)), - Box(Box(1723, 1723), Box(1723, 1723)), - Box(Box(1724, 1724), Box(1724, 1724)), - Box(Box(1725, 1725), Box(1725, 1725)), - Box(Box(1726, 1726), Box(1726, 1726)), - Box(Box(1727, 1727), Box(1727, 1727)), - Box(Box(1728, 1728), Box(1728, 1728)), - Box(Box(1729, 1729), Box(1729, 1729)), - Box(Box(1730, 1730), Box(1730, 1730)), - Box(Box(1731, 1731), Box(1731, 1731)), - Box(Box(1732, 1732), Box(1732, 1732)), - Box(Box(1733, 1733), Box(1733, 1733)), - Box(Box(1734, 1734), Box(1734, 1734)), - Box(Box(1735, 1735), Box(1735, 1735)), - Box(Box(1736, 1736), Box(1736, 1736)), - Box(Box(1737, 1737), Box(1737, 1737)), - Box(Box(1738, 1738), Box(1738, 1738)), - Box(Box(1739, 1739), Box(1739, 1739)), - Box(Box(1740, 1740), Box(1740, 1740)), - Box(Box(1741, 1741), Box(1741, 1741)), - Box(Box(1742, 1742), Box(1742, 1742)), - Box(Box(1743, 1743), Box(1743, 1743)), - Box(Box(1744, 1744), Box(1744, 1744)), - Box(Box(1745, 1745), Box(1745, 1745)), - Box(Box(1746, 1746), Box(1746, 1746)), - Box(Box(1747, 1747), Box(1747, 1747)), - Box(Box(1748, 1748), Box(1748, 1748)), - Box(Box(1749, 1749), Box(1749, 1749)), - Box(Box(1750, 1750), Box(1750, 1750)), - Box(Box(1751, 1751), Box(1751, 1751)), - Box(Box(1752, 1752), Box(1752, 1752)), - Box(Box(1753, 1753), Box(1753, 1753)), - Box(Box(1754, 1754), Box(1754, 1754)), - Box(Box(1755, 1755), Box(1755, 1755)), - Box(Box(1756, 1756), Box(1756, 1756)), - Box(Box(1757, 1757), Box(1757, 1757)), - Box(Box(1758, 1758), Box(1758, 1758)), - Box(Box(1759, 1759), Box(1759, 1759)), - Box(Box(1760, 1760), Box(1760, 1760)), - Box(Box(1761, 1761), Box(1761, 1761)), - Box(Box(1762, 1762), Box(1762, 1762)), - Box(Box(1763, 1763), Box(1763, 1763)), - Box(Box(1764, 1764), Box(1764, 1764)), - Box(Box(1765, 1765), Box(1765, 1765)), - Box(Box(1766, 1766), Box(1766, 1766)), - Box(Box(1767, 1767), Box(1767, 1767)), - Box(Box(1768, 1768), Box(1768, 1768)), - Box(Box(1769, 1769), Box(1769, 1769)), - Box(Box(1770, 1770), Box(1770, 1770)), - Box(Box(1771, 1771), Box(1771, 1771)), - Box(Box(1772, 1772), Box(1772, 1772)), - Box(Box(1773, 1773), Box(1773, 1773)), - Box(Box(1774, 1774), Box(1774, 1774)), - Box(Box(1775, 1775), Box(1775, 1775)), - Box(Box(1776, 1776), Box(1776, 1776)), - Box(Box(1777, 1777), Box(1777, 1777)), - Box(Box(1778, 1778), Box(1778, 1778)), - Box(Box(1779, 1779), Box(1779, 1779)), - Box(Box(1780, 1780), Box(1780, 1780)), - Box(Box(1781, 1781), Box(1781, 1781)), - Box(Box(1782, 1782), Box(1782, 1782)), - Box(Box(1783, 1783), Box(1783, 1783)), - Box(Box(1784, 1784), Box(1784, 1784)), - Box(Box(1785, 1785), Box(1785, 1785)), - Box(Box(1786, 1786), Box(1786, 1786)), - Box(Box(1787, 1787), Box(1787, 1787)), - Box(Box(1788, 1788), Box(1788, 1788)), - Box(Box(1789, 1789), Box(1789, 1789)), - Box(Box(1790, 1790), Box(1790, 1790)), - Box(Box(1791, 1791), Box(1791, 1791)), - Box(Box(1792, 1792), Box(1792, 1792)), - Box(Box(1793, 1793), Box(1793, 1793)), - Box(Box(1794, 1794), Box(1794, 1794)), - Box(Box(1795, 1795), Box(1795, 1795)), - Box(Box(1796, 1796), Box(1796, 1796)), - Box(Box(1797, 1797), Box(1797, 1797)), - Box(Box(1798, 1798), Box(1798, 1798)), - Box(Box(1799, 1799), Box(1799, 1799)), - Box(Box(1800, 1800), Box(1800, 1800)), - Box(Box(1801, 1801), Box(1801, 1801)), - Box(Box(1802, 1802), Box(1802, 1802)), - Box(Box(1803, 1803), Box(1803, 1803)), - Box(Box(1804, 1804), Box(1804, 1804)), - Box(Box(1805, 1805), Box(1805, 1805)), - Box(Box(1806, 1806), Box(1806, 1806)), - Box(Box(1807, 1807), Box(1807, 1807)), - Box(Box(1808, 1808), Box(1808, 1808)), - Box(Box(1809, 1809), Box(1809, 1809)), - Box(Box(1810, 1810), Box(1810, 1810)), - Box(Box(1811, 1811), Box(1811, 1811)), - Box(Box(1812, 1812), Box(1812, 1812)), - Box(Box(1813, 1813), Box(1813, 1813)), - Box(Box(1814, 1814), Box(1814, 1814)), - Box(Box(1815, 1815), Box(1815, 1815)), - Box(Box(1816, 1816), Box(1816, 1816)), - Box(Box(1817, 1817), Box(1817, 1817)), - Box(Box(1818, 1818), Box(1818, 1818)), - Box(Box(1819, 1819), Box(1819, 1819)), - Box(Box(1820, 1820), Box(1820, 1820)), - Box(Box(1821, 1821), Box(1821, 1821)), - Box(Box(1822, 1822), Box(1822, 1822)), - Box(Box(1823, 1823), Box(1823, 1823)), - Box(Box(1824, 1824), Box(1824, 1824)), - Box(Box(1825, 1825), Box(1825, 1825)), - Box(Box(1826, 1826), Box(1826, 1826)), - Box(Box(1827, 1827), Box(1827, 1827)), - Box(Box(1828, 1828), Box(1828, 1828)), - Box(Box(1829, 1829), Box(1829, 1829)), - Box(Box(1830, 1830), Box(1830, 1830)), - Box(Box(1831, 1831), Box(1831, 1831)), - Box(Box(1832, 1832), Box(1832, 1832)), - Box(Box(1833, 1833), Box(1833, 1833)), - Box(Box(1834, 1834), Box(1834, 1834)), - Box(Box(1835, 1835), Box(1835, 1835)), - Box(Box(1836, 1836), Box(1836, 1836)), - Box(Box(1837, 1837), Box(1837, 1837)), - Box(Box(1838, 1838), Box(1838, 1838)), - Box(Box(1839, 1839), Box(1839, 1839)), - Box(Box(1840, 1840), Box(1840, 1840)), - Box(Box(1841, 1841), Box(1841, 1841)), - Box(Box(1842, 1842), Box(1842, 1842)), - Box(Box(1843, 1843), Box(1843, 1843)), - Box(Box(1844, 1844), Box(1844, 1844)), - Box(Box(1845, 1845), Box(1845, 1845)), - Box(Box(1846, 1846), Box(1846, 1846)), - Box(Box(1847, 1847), Box(1847, 1847)), - Box(Box(1848, 1848), Box(1848, 1848)), - Box(Box(1849, 1849), Box(1849, 1849)), - Box(Box(1850, 1850), Box(1850, 1850)), - Box(Box(1851, 1851), Box(1851, 1851)), - Box(Box(1852, 1852), Box(1852, 1852)), - Box(Box(1853, 1853), Box(1853, 1853)), - Box(Box(1854, 1854), Box(1854, 1854)), - Box(Box(1855, 1855), Box(1855, 1855)), - Box(Box(1856, 1856), Box(1856, 1856)), - Box(Box(1857, 1857), Box(1857, 1857)), - Box(Box(1858, 1858), Box(1858, 1858)), - Box(Box(1859, 1859), Box(1859, 1859)), - Box(Box(1860, 1860), Box(1860, 1860)), - Box(Box(1861, 1861), Box(1861, 1861)), - Box(Box(1862, 1862), Box(1862, 1862)), - Box(Box(1863, 1863), Box(1863, 1863)), - Box(Box(1864, 1864), Box(1864, 1864)), - Box(Box(1865, 1865), Box(1865, 1865)), - Box(Box(1866, 1866), Box(1866, 1866)), - Box(Box(1867, 1867), Box(1867, 1867)), - Box(Box(1868, 1868), Box(1868, 1868)), - Box(Box(1869, 1869), Box(1869, 1869)), - Box(Box(1870, 1870), Box(1870, 1870)), - Box(Box(1871, 1871), Box(1871, 1871)), - Box(Box(1872, 1872), Box(1872, 1872)), - Box(Box(1873, 1873), Box(1873, 1873)), - Box(Box(1874, 1874), Box(1874, 1874)), - Box(Box(1875, 1875), Box(1875, 1875)), - Box(Box(1876, 1876), Box(1876, 1876)), - Box(Box(1877, 1877), Box(1877, 1877)), - Box(Box(1878, 1878), Box(1878, 1878)), - Box(Box(1879, 1879), Box(1879, 1879)), - Box(Box(1880, 1880), Box(1880, 1880)), - Box(Box(1881, 1881), Box(1881, 1881)), - Box(Box(1882, 1882), Box(1882, 1882)), - Box(Box(1883, 1883), Box(1883, 1883)), - Box(Box(1884, 1884), Box(1884, 1884)), - Box(Box(1885, 1885), Box(1885, 1885)), - Box(Box(1886, 1886), Box(1886, 1886)), - Box(Box(1887, 1887), Box(1887, 1887)), - Box(Box(1888, 1888), Box(1888, 1888)), - Box(Box(1889, 1889), Box(1889, 1889)), - Box(Box(1890, 1890), Box(1890, 1890)), - Box(Box(1891, 1891), Box(1891, 1891)), - Box(Box(1892, 1892), Box(1892, 1892)), - Box(Box(1893, 1893), Box(1893, 1893)), - Box(Box(1894, 1894), Box(1894, 1894)), - Box(Box(1895, 1895), Box(1895, 1895)), - Box(Box(1896, 1896), Box(1896, 1896)), - Box(Box(1897, 1897), Box(1897, 1897)), - Box(Box(1898, 1898), Box(1898, 1898)), - Box(Box(1899, 1899), Box(1899, 1899)), - Box(Box(1900, 1900), Box(1900, 1900)), - Box(Box(1901, 1901), Box(1901, 1901)), - Box(Box(1902, 1902), Box(1902, 1902)), - Box(Box(1903, 1903), Box(1903, 1903)), - Box(Box(1904, 1904), Box(1904, 1904)), - Box(Box(1905, 1905), Box(1905, 1905)), - Box(Box(1906, 1906), Box(1906, 1906)), - Box(Box(1907, 1907), Box(1907, 1907)), - Box(Box(1908, 1908), Box(1908, 1908)), - Box(Box(1909, 1909), Box(1909, 1909)), - Box(Box(1910, 1910), Box(1910, 1910)), - Box(Box(1911, 1911), Box(1911, 1911)), - Box(Box(1912, 1912), Box(1912, 1912)), - Box(Box(1913, 1913), Box(1913, 1913)), - Box(Box(1914, 1914), Box(1914, 1914)), - Box(Box(1915, 1915), Box(1915, 1915)), - Box(Box(1916, 1916), Box(1916, 1916)), - Box(Box(1917, 1917), Box(1917, 1917)), - Box(Box(1918, 1918), Box(1918, 1918)), - Box(Box(1919, 1919), Box(1919, 1919)), - Box(Box(1920, 1920), Box(1920, 1920)), - Box(Box(1921, 1921), Box(1921, 1921)), - Box(Box(1922, 1922), Box(1922, 1922)), - Box(Box(1923, 1923), Box(1923, 1923)), - Box(Box(1924, 1924), Box(1924, 1924)), - Box(Box(1925, 1925), Box(1925, 1925)), - Box(Box(1926, 1926), Box(1926, 1926)), - Box(Box(1927, 1927), Box(1927, 1927)), - Box(Box(1928, 1928), Box(1928, 1928)), - Box(Box(1929, 1929), Box(1929, 1929)), - Box(Box(1930, 1930), Box(1930, 1930)), - Box(Box(1931, 1931), Box(1931, 1931)), - Box(Box(1932, 1932), Box(1932, 1932)), - Box(Box(1933, 1933), Box(1933, 1933)), - Box(Box(1934, 1934), Box(1934, 1934)), - Box(Box(1935, 1935), Box(1935, 1935)), - Box(Box(1936, 1936), Box(1936, 1936)), - Box(Box(1937, 1937), Box(1937, 1937)), - Box(Box(1938, 1938), Box(1938, 1938)), - Box(Box(1939, 1939), Box(1939, 1939)), - Box(Box(1940, 1940), Box(1940, 1940)), - Box(Box(1941, 1941), Box(1941, 1941)), - Box(Box(1942, 1942), Box(1942, 1942)), - Box(Box(1943, 1943), Box(1943, 1943)), - Box(Box(1944, 1944), Box(1944, 1944)), - Box(Box(1945, 1945), Box(1945, 1945)), - Box(Box(1946, 1946), Box(1946, 1946)), - Box(Box(1947, 1947), Box(1947, 1947)), - Box(Box(1948, 1948), Box(1948, 1948)), - Box(Box(1949, 1949), Box(1949, 1949)), - Box(Box(1950, 1950), Box(1950, 1950)), - Box(Box(1951, 1951), Box(1951, 1951)), - Box(Box(1952, 1952), Box(1952, 1952)), - Box(Box(1953, 1953), Box(1953, 1953)), - Box(Box(1954, 1954), Box(1954, 1954)), - Box(Box(1955, 1955), Box(1955, 1955)), - Box(Box(1956, 1956), Box(1956, 1956)), - Box(Box(1957, 1957), Box(1957, 1957)), - Box(Box(1958, 1958), Box(1958, 1958)), - Box(Box(1959, 1959), Box(1959, 1959)), - Box(Box(1960, 1960), Box(1960, 1960)), - Box(Box(1961, 1961), Box(1961, 1961)), - Box(Box(1962, 1962), Box(1962, 1962)), - Box(Box(1963, 1963), Box(1963, 1963)), - Box(Box(1964, 1964), Box(1964, 1964)), - Box(Box(1965, 1965), Box(1965, 1965)), - Box(Box(1966, 1966), Box(1966, 1966)), - Box(Box(1967, 1967), Box(1967, 1967)), - Box(Box(1968, 1968), Box(1968, 1968)), - Box(Box(1969, 1969), Box(1969, 1969)), - Box(Box(1970, 1970), Box(1970, 1970)), - Box(Box(1971, 1971), Box(1971, 1971)), - Box(Box(1972, 1972), Box(1972, 1972)), - Box(Box(1973, 1973), Box(1973, 1973)), - Box(Box(1974, 1974), Box(1974, 1974)), - Box(Box(1975, 1975), Box(1975, 1975)), - Box(Box(1976, 1976), Box(1976, 1976)), - Box(Box(1977, 1977), Box(1977, 1977)), - Box(Box(1978, 1978), Box(1978, 1978)), - Box(Box(1979, 1979), Box(1979, 1979)), - Box(Box(1980, 1980), Box(1980, 1980)), - Box(Box(1981, 1981), Box(1981, 1981)), - Box(Box(1982, 1982), Box(1982, 1982)), - Box(Box(1983, 1983), Box(1983, 1983)), - Box(Box(1984, 1984), Box(1984, 1984)), - Box(Box(1985, 1985), Box(1985, 1985)), - Box(Box(1986, 1986), Box(1986, 1986)), - Box(Box(1987, 1987), Box(1987, 1987)), - Box(Box(1988, 1988), Box(1988, 1988)), - Box(Box(1989, 1989), Box(1989, 1989)), - Box(Box(1990, 1990), Box(1990, 1990)), - Box(Box(1991, 1991), Box(1991, 1991)), - Box(Box(1992, 1992), Box(1992, 1992)), - Box(Box(1993, 1993), Box(1993, 1993)), - Box(Box(1994, 1994), Box(1994, 1994)), - Box(Box(1995, 1995), Box(1995, 1995)), - Box(Box(1996, 1996), Box(1996, 1996)), - Box(Box(1997, 1997), Box(1997, 1997)), - Box(Box(1998, 1998), Box(1998, 1998)), - Box(Box(1999, 1999), Box(1999, 1999)), - Box(Box(2000, 2000), Box(2000, 2000)), - Box(Box(2001, 2001), Box(2001, 2001)), - Box(Box(2002, 2002), Box(2002, 2002)), - Box(Box(2003, 2003), Box(2003, 2003)), - Box(Box(2004, 2004), Box(2004, 2004)), - Box(Box(2005, 2005), Box(2005, 2005)), - Box(Box(2006, 2006), Box(2006, 2006)), - Box(Box(2007, 2007), Box(2007, 2007)), - Box(Box(2008, 2008), Box(2008, 2008)), - Box(Box(2009, 2009), Box(2009, 2009)), - Box(Box(2010, 2010), Box(2010, 2010)), - Box(Box(2011, 2011), Box(2011, 2011)), - Box(Box(2012, 2012), Box(2012, 2012)), - Box(Box(2013, 2013), Box(2013, 2013)), - Box(Box(2014, 2014), Box(2014, 2014)), - Box(Box(2015, 2015), Box(2015, 2015)), - Box(Box(2016, 2016), Box(2016, 2016)), - Box(Box(2017, 2017), Box(2017, 2017)), - Box(Box(2018, 2018), Box(2018, 2018)), - Box(Box(2019, 2019), Box(2019, 2019)), - Box(Box(2020, 2020), Box(2020, 2020)), - Box(Box(2021, 2021), Box(2021, 2021)), - Box(Box(2022, 2022), Box(2022, 2022)), - Box(Box(2023, 2023), Box(2023, 2023)), - Box(Box(2024, 2024), Box(2024, 2024)), - Box(Box(2025, 2025), Box(2025, 2025)), - Box(Box(2026, 2026), Box(2026, 2026)), - Box(Box(2027, 2027), Box(2027, 2027)), - Box(Box(2028, 2028), Box(2028, 2028)), - Box(Box(2029, 2029), Box(2029, 2029)), - Box(Box(2030, 2030), Box(2030, 2030)), - Box(Box(2031, 2031), Box(2031, 2031)), - Box(Box(2032, 2032), Box(2032, 2032)), - Box(Box(2033, 2033), Box(2033, 2033)), - Box(Box(2034, 2034), Box(2034, 2034)), - Box(Box(2035, 2035), Box(2035, 2035)), - Box(Box(2036, 2036), Box(2036, 2036)), - Box(Box(2037, 2037), Box(2037, 2037)), - Box(Box(2038, 2038), Box(2038, 2038)), - Box(Box(2039, 2039), Box(2039, 2039)), - Box(Box(2040, 2040), Box(2040, 2040)), - Box(Box(2041, 2041), Box(2041, 2041)), - Box(Box(2042, 2042), Box(2042, 2042)), - Box(Box(2043, 2043), Box(2043, 2043)), - Box(Box(2044, 2044), Box(2044, 2044)), - Box(Box(2045, 2045), Box(2045, 2045)), - Box(Box(2046, 2046), Box(2046, 2046)), - Box(Box(2047, 2047), Box(2047, 2047)), - Box(Box(2048, 2048), Box(2048, 2048)), - Box(Box(2049, 2049), Box(2049, 2049)), - Box(Box(2050, 2050), Box(2050, 2050)), - Box(Box(2051, 2051), Box(2051, 2051)), - Box(Box(2052, 2052), Box(2052, 2052)), - Box(Box(2053, 2053), Box(2053, 2053)), - Box(Box(2054, 2054), Box(2054, 2054)), - Box(Box(2055, 2055), Box(2055, 2055)), - Box(Box(2056, 2056), Box(2056, 2056)), - Box(Box(2057, 2057), Box(2057, 2057)), - Box(Box(2058, 2058), Box(2058, 2058)), - Box(Box(2059, 2059), Box(2059, 2059)), - Box(Box(2060, 2060), Box(2060, 2060)), - Box(Box(2061, 2061), Box(2061, 2061)), - Box(Box(2062, 2062), Box(2062, 2062)), - Box(Box(2063, 2063), Box(2063, 2063)), - Box(Box(2064, 2064), Box(2064, 2064)), - Box(Box(2065, 2065), Box(2065, 2065)), - Box(Box(2066, 2066), Box(2066, 2066)), - Box(Box(2067, 2067), Box(2067, 2067)), - Box(Box(2068, 2068), Box(2068, 2068)), - Box(Box(2069, 2069), Box(2069, 2069)), - Box(Box(2070, 2070), Box(2070, 2070)), - Box(Box(2071, 2071), Box(2071, 2071)), - Box(Box(2072, 2072), Box(2072, 2072)), - Box(Box(2073, 2073), Box(2073, 2073)), - Box(Box(2074, 2074), Box(2074, 2074)), - Box(Box(2075, 2075), Box(2075, 2075)), - Box(Box(2076, 2076), Box(2076, 2076)), - Box(Box(2077, 2077), Box(2077, 2077)), - Box(Box(2078, 2078), Box(2078, 2078)), - Box(Box(2079, 2079), Box(2079, 2079)), - Box(Box(2080, 2080), Box(2080, 2080)), - Box(Box(2081, 2081), Box(2081, 2081)), - Box(Box(2082, 2082), Box(2082, 2082)), - Box(Box(2083, 2083), Box(2083, 2083)), - Box(Box(2084, 2084), Box(2084, 2084)), - Box(Box(2085, 2085), Box(2085, 2085)), - Box(Box(2086, 2086), Box(2086, 2086)), - Box(Box(2087, 2087), Box(2087, 2087)), - Box(Box(2088, 2088), Box(2088, 2088)), - Box(Box(2089, 2089), Box(2089, 2089)), - Box(Box(2090, 2090), Box(2090, 2090)), - Box(Box(2091, 2091), Box(2091, 2091)), - Box(Box(2092, 2092), Box(2092, 2092)), - Box(Box(2093, 2093), Box(2093, 2093)), - Box(Box(2094, 2094), Box(2094, 2094)), - Box(Box(2095, 2095), Box(2095, 2095)), - Box(Box(2096, 2096), Box(2096, 2096)), - Box(Box(2097, 2097), Box(2097, 2097)), - Box(Box(2098, 2098), Box(2098, 2098)), - Box(Box(2099, 2099), Box(2099, 2099)), - Box(Box(2100, 2100), Box(2100, 2100)), - Box(Box(2101, 2101), Box(2101, 2101)), - Box(Box(2102, 2102), Box(2102, 2102)), - Box(Box(2103, 2103), Box(2103, 2103)), - Box(Box(2104, 2104), Box(2104, 2104)), - Box(Box(2105, 2105), Box(2105, 2105)), - Box(Box(2106, 2106), Box(2106, 2106)), - Box(Box(2107, 2107), Box(2107, 2107)), - Box(Box(2108, 2108), Box(2108, 2108)), - Box(Box(2109, 2109), Box(2109, 2109)), - Box(Box(2110, 2110), Box(2110, 2110)), - Box(Box(2111, 2111), Box(2111, 2111)), - Box(Box(2112, 2112), Box(2112, 2112)), - Box(Box(2113, 2113), Box(2113, 2113)), - Box(Box(2114, 2114), Box(2114, 2114)), - Box(Box(2115, 2115), Box(2115, 2115)), - Box(Box(2116, 2116), Box(2116, 2116)), - Box(Box(2117, 2117), Box(2117, 2117)), - Box(Box(2118, 2118), Box(2118, 2118)), - Box(Box(2119, 2119), Box(2119, 2119)), - Box(Box(2120, 2120), Box(2120, 2120)), - Box(Box(2121, 2121), Box(2121, 2121)), - Box(Box(2122, 2122), Box(2122, 2122)), - Box(Box(2123, 2123), Box(2123, 2123)), - Box(Box(2124, 2124), Box(2124, 2124)), - Box(Box(2125, 2125), Box(2125, 2125)), - Box(Box(2126, 2126), Box(2126, 2126)), - Box(Box(2127, 2127), Box(2127, 2127)), - Box(Box(2128, 2128), Box(2128, 2128)), - Box(Box(2129, 2129), Box(2129, 2129)), - Box(Box(2130, 2130), Box(2130, 2130)), - Box(Box(2131, 2131), Box(2131, 2131)), - Box(Box(2132, 2132), Box(2132, 2132)), - Box(Box(2133, 2133), Box(2133, 2133)), - Box(Box(2134, 2134), Box(2134, 2134)), - Box(Box(2135, 2135), Box(2135, 2135)), - Box(Box(2136, 2136), Box(2136, 2136)), - Box(Box(2137, 2137), Box(2137, 2137)), - Box(Box(2138, 2138), Box(2138, 2138)), - Box(Box(2139, 2139), Box(2139, 2139)), - Box(Box(2140, 2140), Box(2140, 2140)), - Box(Box(2141, 2141), Box(2141, 2141)), - Box(Box(2142, 2142), Box(2142, 2142)), - Box(Box(2143, 2143), Box(2143, 2143)), - Box(Box(2144, 2144), Box(2144, 2144)), - Box(Box(2145, 2145), Box(2145, 2145)), - Box(Box(2146, 2146), Box(2146, 2146)), - Box(Box(2147, 2147), Box(2147, 2147)), - Box(Box(2148, 2148), Box(2148, 2148)), - Box(Box(2149, 2149), Box(2149, 2149)), - Box(Box(2150, 2150), Box(2150, 2150)), - Box(Box(2151, 2151), Box(2151, 2151)), - Box(Box(2152, 2152), Box(2152, 2152)), - Box(Box(2153, 2153), Box(2153, 2153)), - Box(Box(2154, 2154), Box(2154, 2154)), - Box(Box(2155, 2155), Box(2155, 2155)), - Box(Box(2156, 2156), Box(2156, 2156)), - Box(Box(2157, 2157), Box(2157, 2157)), - Box(Box(2158, 2158), Box(2158, 2158)), - Box(Box(2159, 2159), Box(2159, 2159)), - Box(Box(2160, 2160), Box(2160, 2160)), - Box(Box(2161, 2161), Box(2161, 2161)), - Box(Box(2162, 2162), Box(2162, 2162)), - Box(Box(2163, 2163), Box(2163, 2163)), - Box(Box(2164, 2164), Box(2164, 2164)), - Box(Box(2165, 2165), Box(2165, 2165)), - Box(Box(2166, 2166), Box(2166, 2166)), - Box(Box(2167, 2167), Box(2167, 2167)), - Box(Box(2168, 2168), Box(2168, 2168)), - Box(Box(2169, 2169), Box(2169, 2169)), - Box(Box(2170, 2170), Box(2170, 2170)), - Box(Box(2171, 2171), Box(2171, 2171)), - Box(Box(2172, 2172), Box(2172, 2172)), - Box(Box(2173, 2173), Box(2173, 2173)), - Box(Box(2174, 2174), Box(2174, 2174)), - Box(Box(2175, 2175), Box(2175, 2175)), - Box(Box(2176, 2176), Box(2176, 2176)), - Box(Box(2177, 2177), Box(2177, 2177)), - Box(Box(2178, 2178), Box(2178, 2178)), - Box(Box(2179, 2179), Box(2179, 2179)), - Box(Box(2180, 2180), Box(2180, 2180)), - Box(Box(2181, 2181), Box(2181, 2181)), - Box(Box(2182, 2182), Box(2182, 2182)), - Box(Box(2183, 2183), Box(2183, 2183)), - Box(Box(2184, 2184), Box(2184, 2184)), - Box(Box(2185, 2185), Box(2185, 2185)), - Box(Box(2186, 2186), Box(2186, 2186)), - Box(Box(2187, 2187), Box(2187, 2187)), - Box(Box(2188, 2188), Box(2188, 2188)), - Box(Box(2189, 2189), Box(2189, 2189)), - Box(Box(2190, 2190), Box(2190, 2190)), - Box(Box(2191, 2191), Box(2191, 2191)), - Box(Box(2192, 2192), Box(2192, 2192)), - Box(Box(2193, 2193), Box(2193, 2193)), - Box(Box(2194, 2194), Box(2194, 2194)), - Box(Box(2195, 2195), Box(2195, 2195)), - Box(Box(2196, 2196), Box(2196, 2196)), - Box(Box(2197, 2197), Box(2197, 2197)), - Box(Box(2198, 2198), Box(2198, 2198)), - Box(Box(2199, 2199), Box(2199, 2199)), - Box(Box(2200, 2200), Box(2200, 2200)), - Box(Box(2201, 2201), Box(2201, 2201)), - Box(Box(2202, 2202), Box(2202, 2202)), - Box(Box(2203, 2203), Box(2203, 2203)), - Box(Box(2204, 2204), Box(2204, 2204)), - Box(Box(2205, 2205), Box(2205, 2205)), - Box(Box(2206, 2206), Box(2206, 2206)), - Box(Box(2207, 2207), Box(2207, 2207)), - Box(Box(2208, 2208), Box(2208, 2208)), - Box(Box(2209, 2209), Box(2209, 2209)), - Box(Box(2210, 2210), Box(2210, 2210)), - Box(Box(2211, 2211), Box(2211, 2211)), - Box(Box(2212, 2212), Box(2212, 2212)), - Box(Box(2213, 2213), Box(2213, 2213)), - Box(Box(2214, 2214), Box(2214, 2214)), - Box(Box(2215, 2215), Box(2215, 2215)), - Box(Box(2216, 2216), Box(2216, 2216)), - Box(Box(2217, 2217), Box(2217, 2217)), - Box(Box(2218, 2218), Box(2218, 2218)), - Box(Box(2219, 2219), Box(2219, 2219)), - Box(Box(2220, 2220), Box(2220, 2220)), - Box(Box(2221, 2221), Box(2221, 2221)), - Box(Box(2222, 2222), Box(2222, 2222)), - Box(Box(2223, 2223), Box(2223, 2223)), - Box(Box(2224, 2224), Box(2224, 2224)), - Box(Box(2225, 2225), Box(2225, 2225)), - Box(Box(2226, 2226), Box(2226, 2226)), - Box(Box(2227, 2227), Box(2227, 2227)), - Box(Box(2228, 2228), Box(2228, 2228)), - Box(Box(2229, 2229), Box(2229, 2229)), - Box(Box(2230, 2230), Box(2230, 2230)), - Box(Box(2231, 2231), Box(2231, 2231)), - Box(Box(2232, 2232), Box(2232, 2232)), - Box(Box(2233, 2233), Box(2233, 2233)), - Box(Box(2234, 2234), Box(2234, 2234)), - Box(Box(2235, 2235), Box(2235, 2235)), - Box(Box(2236, 2236), Box(2236, 2236)), - Box(Box(2237, 2237), Box(2237, 2237)), - Box(Box(2238, 2238), Box(2238, 2238)), - Box(Box(2239, 2239), Box(2239, 2239)), - Box(Box(2240, 2240), Box(2240, 2240)), - Box(Box(2241, 2241), Box(2241, 2241)), - Box(Box(2242, 2242), Box(2242, 2242)), - Box(Box(2243, 2243), Box(2243, 2243)), - Box(Box(2244, 2244), Box(2244, 2244)), - Box(Box(2245, 2245), Box(2245, 2245)), - Box(Box(2246, 2246), Box(2246, 2246)), - Box(Box(2247, 2247), Box(2247, 2247)), - Box(Box(2248, 2248), Box(2248, 2248)), - Box(Box(2249, 2249), Box(2249, 2249)), - Box(Box(2250, 2250), Box(2250, 2250)), - Box(Box(2251, 2251), Box(2251, 2251)), - Box(Box(2252, 2252), Box(2252, 2252)), - Box(Box(2253, 2253), Box(2253, 2253)), - Box(Box(2254, 2254), Box(2254, 2254)), - Box(Box(2255, 2255), Box(2255, 2255)), - Box(Box(2256, 2256), Box(2256, 2256)), - Box(Box(2257, 2257), Box(2257, 2257)), - Box(Box(2258, 2258), Box(2258, 2258)), - Box(Box(2259, 2259), Box(2259, 2259)), - Box(Box(2260, 2260), Box(2260, 2260)), - Box(Box(2261, 2261), Box(2261, 2261)), - Box(Box(2262, 2262), Box(2262, 2262)), - Box(Box(2263, 2263), Box(2263, 2263)), - Box(Box(2264, 2264), Box(2264, 2264)), - Box(Box(2265, 2265), Box(2265, 2265)), - Box(Box(2266, 2266), Box(2266, 2266)), - Box(Box(2267, 2267), Box(2267, 2267)), - Box(Box(2268, 2268), Box(2268, 2268)), - Box(Box(2269, 2269), Box(2269, 2269)), - Box(Box(2270, 2270), Box(2270, 2270)), - Box(Box(2271, 2271), Box(2271, 2271)), - Box(Box(2272, 2272), Box(2272, 2272)), - Box(Box(2273, 2273), Box(2273, 2273)), - Box(Box(2274, 2274), Box(2274, 2274)), - Box(Box(2275, 2275), Box(2275, 2275)), - Box(Box(2276, 2276), Box(2276, 2276)), - Box(Box(2277, 2277), Box(2277, 2277)), - Box(Box(2278, 2278), Box(2278, 2278)), - Box(Box(2279, 2279), Box(2279, 2279)), - Box(Box(2280, 2280), Box(2280, 2280)), - Box(Box(2281, 2281), Box(2281, 2281)), - Box(Box(2282, 2282), Box(2282, 2282)), - Box(Box(2283, 2283), Box(2283, 2283)), - Box(Box(2284, 2284), Box(2284, 2284)), - Box(Box(2285, 2285), Box(2285, 2285)), - Box(Box(2286, 2286), Box(2286, 2286)), - Box(Box(2287, 2287), Box(2287, 2287)), - Box(Box(2288, 2288), Box(2288, 2288)), - Box(Box(2289, 2289), Box(2289, 2289)), - Box(Box(2290, 2290), Box(2290, 2290)), - Box(Box(2291, 2291), Box(2291, 2291)), - Box(Box(2292, 2292), Box(2292, 2292)), - Box(Box(2293, 2293), Box(2293, 2293)), - Box(Box(2294, 2294), Box(2294, 2294)), - Box(Box(2295, 2295), Box(2295, 2295)), - Box(Box(2296, 2296), Box(2296, 2296)), - Box(Box(2297, 2297), Box(2297, 2297)), - Box(Box(2298, 2298), Box(2298, 2298)), - Box(Box(2299, 2299), Box(2299, 2299)), - Box(Box(2300, 2300), Box(2300, 2300)), - Box(Box(2301, 2301), Box(2301, 2301)), - Box(Box(2302, 2302), Box(2302, 2302)), - Box(Box(2303, 2303), Box(2303, 2303)), - Box(Box(2304, 2304), Box(2304, 2304)), - Box(Box(2305, 2305), Box(2305, 2305)), - Box(Box(2306, 2306), Box(2306, 2306)), - Box(Box(2307, 2307), Box(2307, 2307)), - Box(Box(2308, 2308), Box(2308, 2308)), - Box(Box(2309, 2309), Box(2309, 2309)), - Box(Box(2310, 2310), Box(2310, 2310)), - Box(Box(2311, 2311), Box(2311, 2311)), - Box(Box(2312, 2312), Box(2312, 2312)), - Box(Box(2313, 2313), Box(2313, 2313)), - Box(Box(2314, 2314), Box(2314, 2314)), - Box(Box(2315, 2315), Box(2315, 2315)), - Box(Box(2316, 2316), Box(2316, 2316)), - Box(Box(2317, 2317), Box(2317, 2317)), - Box(Box(2318, 2318), Box(2318, 2318)), - Box(Box(2319, 2319), Box(2319, 2319)), - Box(Box(2320, 2320), Box(2320, 2320)), - Box(Box(2321, 2321), Box(2321, 2321)), - Box(Box(2322, 2322), Box(2322, 2322)), - Box(Box(2323, 2323), Box(2323, 2323)), - Box(Box(2324, 2324), Box(2324, 2324)), - Box(Box(2325, 2325), Box(2325, 2325)), - Box(Box(2326, 2326), Box(2326, 2326)), - Box(Box(2327, 2327), Box(2327, 2327)), - Box(Box(2328, 2328), Box(2328, 2328)), - Box(Box(2329, 2329), Box(2329, 2329)), - Box(Box(2330, 2330), Box(2330, 2330)), - Box(Box(2331, 2331), Box(2331, 2331)), - Box(Box(2332, 2332), Box(2332, 2332)), - Box(Box(2333, 2333), Box(2333, 2333)), - Box(Box(2334, 2334), Box(2334, 2334)), - Box(Box(2335, 2335), Box(2335, 2335)), - Box(Box(2336, 2336), Box(2336, 2336)), - Box(Box(2337, 2337), Box(2337, 2337)), - Box(Box(2338, 2338), Box(2338, 2338)), - Box(Box(2339, 2339), Box(2339, 2339)), - Box(Box(2340, 2340), Box(2340, 2340)), - Box(Box(2341, 2341), Box(2341, 2341)), - Box(Box(2342, 2342), Box(2342, 2342)), - Box(Box(2343, 2343), Box(2343, 2343)), - Box(Box(2344, 2344), Box(2344, 2344)), - Box(Box(2345, 2345), Box(2345, 2345)), - Box(Box(2346, 2346), Box(2346, 2346)), - Box(Box(2347, 2347), Box(2347, 2347)), - Box(Box(2348, 2348), Box(2348, 2348)), - Box(Box(2349, 2349), Box(2349, 2349)), - Box(Box(2350, 2350), Box(2350, 2350)), - Box(Box(2351, 2351), Box(2351, 2351)), - Box(Box(2352, 2352), Box(2352, 2352)), - Box(Box(2353, 2353), Box(2353, 2353)), - Box(Box(2354, 2354), Box(2354, 2354)), - Box(Box(2355, 2355), Box(2355, 2355)), - Box(Box(2356, 2356), Box(2356, 2356)), - Box(Box(2357, 2357), Box(2357, 2357)), - Box(Box(2358, 2358), Box(2358, 2358)), - Box(Box(2359, 2359), Box(2359, 2359)), - Box(Box(2360, 2360), Box(2360, 2360)), - Box(Box(2361, 2361), Box(2361, 2361)), - Box(Box(2362, 2362), Box(2362, 2362)), - Box(Box(2363, 2363), Box(2363, 2363)), - Box(Box(2364, 2364), Box(2364, 2364)), - Box(Box(2365, 2365), Box(2365, 2365)), - Box(Box(2366, 2366), Box(2366, 2366)), - Box(Box(2367, 2367), Box(2367, 2367)), - Box(Box(2368, 2368), Box(2368, 2368)), - Box(Box(2369, 2369), Box(2369, 2369)), - Box(Box(2370, 2370), Box(2370, 2370)), - Box(Box(2371, 2371), Box(2371, 2371)), - Box(Box(2372, 2372), Box(2372, 2372)), - Box(Box(2373, 2373), Box(2373, 2373)), - Box(Box(2374, 2374), Box(2374, 2374)), - Box(Box(2375, 2375), Box(2375, 2375)), - Box(Box(2376, 2376), Box(2376, 2376)), - Box(Box(2377, 2377), Box(2377, 2377)), - Box(Box(2378, 2378), Box(2378, 2378)), - Box(Box(2379, 2379), Box(2379, 2379)), - Box(Box(2380, 2380), Box(2380, 2380)), - Box(Box(2381, 2381), Box(2381, 2381)), - Box(Box(2382, 2382), Box(2382, 2382)), - Box(Box(2383, 2383), Box(2383, 2383)), - Box(Box(2384, 2384), Box(2384, 2384)), - Box(Box(2385, 2385), Box(2385, 2385)), - Box(Box(2386, 2386), Box(2386, 2386)), - Box(Box(2387, 2387), Box(2387, 2387)), - Box(Box(2388, 2388), Box(2388, 2388)), - Box(Box(2389, 2389), Box(2389, 2389)), - Box(Box(2390, 2390), Box(2390, 2390)), - Box(Box(2391, 2391), Box(2391, 2391)), - Box(Box(2392, 2392), Box(2392, 2392)), - Box(Box(2393, 2393), Box(2393, 2393)), - Box(Box(2394, 2394), Box(2394, 2394)), - Box(Box(2395, 2395), Box(2395, 2395)), - Box(Box(2396, 2396), Box(2396, 2396)), - Box(Box(2397, 2397), Box(2397, 2397)), - Box(Box(2398, 2398), Box(2398, 2398)), - Box(Box(2399, 2399), Box(2399, 2399)), - Box(Box(2400, 2400), Box(2400, 2400)), - Box(Box(2401, 2401), Box(2401, 2401)), - Box(Box(2402, 2402), Box(2402, 2402)), - Box(Box(2403, 2403), Box(2403, 2403)), - Box(Box(2404, 2404), Box(2404, 2404)), - Box(Box(2405, 2405), Box(2405, 2405)), - Box(Box(2406, 2406), Box(2406, 2406)), - Box(Box(2407, 2407), Box(2407, 2407)), - Box(Box(2408, 2408), Box(2408, 2408)), - Box(Box(2409, 2409), Box(2409, 2409)), - Box(Box(2410, 2410), Box(2410, 2410)), - Box(Box(2411, 2411), Box(2411, 2411)), - Box(Box(2412, 2412), Box(2412, 2412)), - Box(Box(2413, 2413), Box(2413, 2413)), - Box(Box(2414, 2414), Box(2414, 2414)), - Box(Box(2415, 2415), Box(2415, 2415)), - Box(Box(2416, 2416), Box(2416, 2416)), - Box(Box(2417, 2417), Box(2417, 2417)), - Box(Box(2418, 2418), Box(2418, 2418)), - Box(Box(2419, 2419), Box(2419, 2419)), - Box(Box(2420, 2420), Box(2420, 2420)), - Box(Box(2421, 2421), Box(2421, 2421)), - Box(Box(2422, 2422), Box(2422, 2422)), - Box(Box(2423, 2423), Box(2423, 2423)), - Box(Box(2424, 2424), Box(2424, 2424)), - Box(Box(2425, 2425), Box(2425, 2425)), - Box(Box(2426, 2426), Box(2426, 2426)), - Box(Box(2427, 2427), Box(2427, 2427)), - Box(Box(2428, 2428), Box(2428, 2428)), - Box(Box(2429, 2429), Box(2429, 2429)), - Box(Box(2430, 2430), Box(2430, 2430)), - Box(Box(2431, 2431), Box(2431, 2431)), - Box(Box(2432, 2432), Box(2432, 2432)), - Box(Box(2433, 2433), Box(2433, 2433)), - Box(Box(2434, 2434), Box(2434, 2434)), - Box(Box(2435, 2435), Box(2435, 2435)), - Box(Box(2436, 2436), Box(2436, 2436)), - Box(Box(2437, 2437), Box(2437, 2437)), - Box(Box(2438, 2438), Box(2438, 2438)), - Box(Box(2439, 2439), Box(2439, 2439)), - Box(Box(2440, 2440), Box(2440, 2440)), - Box(Box(2441, 2441), Box(2441, 2441)), - Box(Box(2442, 2442), Box(2442, 2442)), - Box(Box(2443, 2443), Box(2443, 2443)), - Box(Box(2444, 2444), Box(2444, 2444)), - Box(Box(2445, 2445), Box(2445, 2445)), - Box(Box(2446, 2446), Box(2446, 2446)), - Box(Box(2447, 2447), Box(2447, 2447)), - Box(Box(2448, 2448), Box(2448, 2448)), - Box(Box(2449, 2449), Box(2449, 2449)), - Box(Box(2450, 2450), Box(2450, 2450)), - Box(Box(2451, 2451), Box(2451, 2451)), - Box(Box(2452, 2452), Box(2452, 2452)), - Box(Box(2453, 2453), Box(2453, 2453)), - Box(Box(2454, 2454), Box(2454, 2454)), - Box(Box(2455, 2455), Box(2455, 2455)), - Box(Box(2456, 2456), Box(2456, 2456)), - Box(Box(2457, 2457), Box(2457, 2457)), - Box(Box(2458, 2458), Box(2458, 2458)), - Box(Box(2459, 2459), Box(2459, 2459)), - Box(Box(2460, 2460), Box(2460, 2460)), - Box(Box(2461, 2461), Box(2461, 2461)), - Box(Box(2462, 2462), Box(2462, 2462)), - Box(Box(2463, 2463), Box(2463, 2463)), - Box(Box(2464, 2464), Box(2464, 2464)), - Box(Box(2465, 2465), Box(2465, 2465)), - Box(Box(2466, 2466), Box(2466, 2466)), - Box(Box(2467, 2467), Box(2467, 2467)), - Box(Box(2468, 2468), Box(2468, 2468)), - Box(Box(2469, 2469), Box(2469, 2469)), - Box(Box(2470, 2470), Box(2470, 2470)), - Box(Box(2471, 2471), Box(2471, 2471)), - Box(Box(2472, 2472), Box(2472, 2472)), - Box(Box(2473, 2473), Box(2473, 2473)), - Box(Box(2474, 2474), Box(2474, 2474)), - Box(Box(2475, 2475), Box(2475, 2475)), - Box(Box(2476, 2476), Box(2476, 2476)), - Box(Box(2477, 2477), Box(2477, 2477)), - Box(Box(2478, 2478), Box(2478, 2478)), - Box(Box(2479, 2479), Box(2479, 2479)), - Box(Box(2480, 2480), Box(2480, 2480)), - Box(Box(2481, 2481), Box(2481, 2481)), - Box(Box(2482, 2482), Box(2482, 2482)), - Box(Box(2483, 2483), Box(2483, 2483)), - Box(Box(2484, 2484), Box(2484, 2484)), - Box(Box(2485, 2485), Box(2485, 2485)), - Box(Box(2486, 2486), Box(2486, 2486)), - Box(Box(2487, 2487), Box(2487, 2487)), - Box(Box(2488, 2488), Box(2488, 2488)), - Box(Box(2489, 2489), Box(2489, 2489)), - Box(Box(2490, 2490), Box(2490, 2490)), - Box(Box(2491, 2491), Box(2491, 2491)), - Box(Box(2492, 2492), Box(2492, 2492)), - Box(Box(2493, 2493), Box(2493, 2493)), - Box(Box(2494, 2494), Box(2494, 2494)), - Box(Box(2495, 2495), Box(2495, 2495)), - Box(Box(2496, 2496), Box(2496, 2496)), - Box(Box(2497, 2497), Box(2497, 2497)), - Box(Box(2498, 2498), Box(2498, 2498)), - Box(Box(2499, 2499), Box(2499, 2499)), - Box(Box(2500, 2500), Box(2500, 2500)), - Box(Box(2501, 2501), Box(2501, 2501)), - Box(Box(2502, 2502), Box(2502, 2502)), - Box(Box(2503, 2503), Box(2503, 2503)), - Box(Box(2504, 2504), Box(2504, 2504)), - Box(Box(2505, 2505), Box(2505, 2505)), - Box(Box(2506, 2506), Box(2506, 2506)), - Box(Box(2507, 2507), Box(2507, 2507)), - Box(Box(2508, 2508), Box(2508, 2508)), - Box(Box(2509, 2509), Box(2509, 2509)), - Box(Box(2510, 2510), Box(2510, 2510)), - Box(Box(2511, 2511), Box(2511, 2511)), - Box(Box(2512, 2512), Box(2512, 2512)), - Box(Box(2513, 2513), Box(2513, 2513)), - Box(Box(2514, 2514), Box(2514, 2514)), - Box(Box(2515, 2515), Box(2515, 2515)), - Box(Box(2516, 2516), Box(2516, 2516)), - Box(Box(2517, 2517), Box(2517, 2517)), - Box(Box(2518, 2518), Box(2518, 2518)), - Box(Box(2519, 2519), Box(2519, 2519)), - Box(Box(2520, 2520), Box(2520, 2520)), - Box(Box(2521, 2521), Box(2521, 2521)), - Box(Box(2522, 2522), Box(2522, 2522)), - Box(Box(2523, 2523), Box(2523, 2523)), - Box(Box(2524, 2524), Box(2524, 2524)), - Box(Box(2525, 2525), Box(2525, 2525)), - Box(Box(2526, 2526), Box(2526, 2526)), - Box(Box(2527, 2527), Box(2527, 2527)), - Box(Box(2528, 2528), Box(2528, 2528)), - Box(Box(2529, 2529), Box(2529, 2529)), - Box(Box(2530, 2530), Box(2530, 2530)), - Box(Box(2531, 2531), Box(2531, 2531)), - Box(Box(2532, 2532), Box(2532, 2532)), - Box(Box(2533, 2533), Box(2533, 2533)), - Box(Box(2534, 2534), Box(2534, 2534)), - Box(Box(2535, 2535), Box(2535, 2535)), - Box(Box(2536, 2536), Box(2536, 2536)), - Box(Box(2537, 2537), Box(2537, 2537)), - Box(Box(2538, 2538), Box(2538, 2538)), - Box(Box(2539, 2539), Box(2539, 2539)), - Box(Box(2540, 2540), Box(2540, 2540)), - Box(Box(2541, 2541), Box(2541, 2541)), - Box(Box(2542, 2542), Box(2542, 2542)), - Box(Box(2543, 2543), Box(2543, 2543)), - Box(Box(2544, 2544), Box(2544, 2544)), - Box(Box(2545, 2545), Box(2545, 2545)), - Box(Box(2546, 2546), Box(2546, 2546)), - Box(Box(2547, 2547), Box(2547, 2547)), - Box(Box(2548, 2548), Box(2548, 2548)), - Box(Box(2549, 2549), Box(2549, 2549)), - Box(Box(2550, 2550), Box(2550, 2550)), - Box(Box(2551, 2551), Box(2551, 2551)), - Box(Box(2552, 2552), Box(2552, 2552)), - Box(Box(2553, 2553), Box(2553, 2553)), - Box(Box(2554, 2554), Box(2554, 2554)), - Box(Box(2555, 2555), Box(2555, 2555)), - Box(Box(2556, 2556), Box(2556, 2556)), - Box(Box(2557, 2557), Box(2557, 2557)), - Box(Box(2558, 2558), Box(2558, 2558)), - Box(Box(2559, 2559), Box(2559, 2559)), - Box(Box(2560, 2560), Box(2560, 2560)), - Box(Box(2561, 2561), Box(2561, 2561)), - Box(Box(2562, 2562), Box(2562, 2562)), - Box(Box(2563, 2563), Box(2563, 2563)), - Box(Box(2564, 2564), Box(2564, 2564)), - Box(Box(2565, 2565), Box(2565, 2565)), - Box(Box(2566, 2566), Box(2566, 2566)), - Box(Box(2567, 2567), Box(2567, 2567)), - Box(Box(2568, 2568), Box(2568, 2568)), - Box(Box(2569, 2569), Box(2569, 2569)), - Box(Box(2570, 2570), Box(2570, 2570)), - Box(Box(2571, 2571), Box(2571, 2571)), - Box(Box(2572, 2572), Box(2572, 2572)), - Box(Box(2573, 2573), Box(2573, 2573)), - Box(Box(2574, 2574), Box(2574, 2574)), - Box(Box(2575, 2575), Box(2575, 2575)), - Box(Box(2576, 2576), Box(2576, 2576)), - Box(Box(2577, 2577), Box(2577, 2577)), - Box(Box(2578, 2578), Box(2578, 2578)), - Box(Box(2579, 2579), Box(2579, 2579)), - Box(Box(2580, 2580), Box(2580, 2580)), - Box(Box(2581, 2581), Box(2581, 2581)), - Box(Box(2582, 2582), Box(2582, 2582)), - Box(Box(2583, 2583), Box(2583, 2583)), - Box(Box(2584, 2584), Box(2584, 2584)), - Box(Box(2585, 2585), Box(2585, 2585)), - Box(Box(2586, 2586), Box(2586, 2586)), - Box(Box(2587, 2587), Box(2587, 2587)), - Box(Box(2588, 2588), Box(2588, 2588)), - Box(Box(2589, 2589), Box(2589, 2589)), - Box(Box(2590, 2590), Box(2590, 2590)), - Box(Box(2591, 2591), Box(2591, 2591)), - Box(Box(2592, 2592), Box(2592, 2592)), - Box(Box(2593, 2593), Box(2593, 2593)), - Box(Box(2594, 2594), Box(2594, 2594)), - Box(Box(2595, 2595), Box(2595, 2595)), - Box(Box(2596, 2596), Box(2596, 2596)), - Box(Box(2597, 2597), Box(2597, 2597)), - Box(Box(2598, 2598), Box(2598, 2598)), - Box(Box(2599, 2599), Box(2599, 2599)), - Box(Box(2600, 2600), Box(2600, 2600)), - Box(Box(2601, 2601), Box(2601, 2601)), - Box(Box(2602, 2602), Box(2602, 2602)), - Box(Box(2603, 2603), Box(2603, 2603)), - Box(Box(2604, 2604), Box(2604, 2604)), - Box(Box(2605, 2605), Box(2605, 2605)), - Box(Box(2606, 2606), Box(2606, 2606)), - Box(Box(2607, 2607), Box(2607, 2607)), - Box(Box(2608, 2608), Box(2608, 2608)), - Box(Box(2609, 2609), Box(2609, 2609)), - Box(Box(2610, 2610), Box(2610, 2610)), - Box(Box(2611, 2611), Box(2611, 2611)), - Box(Box(2612, 2612), Box(2612, 2612)), - Box(Box(2613, 2613), Box(2613, 2613)), - Box(Box(2614, 2614), Box(2614, 2614)), - Box(Box(2615, 2615), Box(2615, 2615)), - Box(Box(2616, 2616), Box(2616, 2616)), - Box(Box(2617, 2617), Box(2617, 2617)), - Box(Box(2618, 2618), Box(2618, 2618)), - Box(Box(2619, 2619), Box(2619, 2619)), - Box(Box(2620, 2620), Box(2620, 2620)), - Box(Box(2621, 2621), Box(2621, 2621)), - Box(Box(2622, 2622), Box(2622, 2622)), - Box(Box(2623, 2623), Box(2623, 2623)), - Box(Box(2624, 2624), Box(2624, 2624)), - Box(Box(2625, 2625), Box(2625, 2625)), - Box(Box(2626, 2626), Box(2626, 2626)), - Box(Box(2627, 2627), Box(2627, 2627)), - Box(Box(2628, 2628), Box(2628, 2628)), - Box(Box(2629, 2629), Box(2629, 2629)), - Box(Box(2630, 2630), Box(2630, 2630)), - Box(Box(2631, 2631), Box(2631, 2631)), - Box(Box(2632, 2632), Box(2632, 2632)), - Box(Box(2633, 2633), Box(2633, 2633)), - Box(Box(2634, 2634), Box(2634, 2634)), - Box(Box(2635, 2635), Box(2635, 2635)), - Box(Box(2636, 2636), Box(2636, 2636)), - Box(Box(2637, 2637), Box(2637, 2637)), - Box(Box(2638, 2638), Box(2638, 2638)), - Box(Box(2639, 2639), Box(2639, 2639)), - Box(Box(2640, 2640), Box(2640, 2640)), - Box(Box(2641, 2641), Box(2641, 2641)), - Box(Box(2642, 2642), Box(2642, 2642)), - Box(Box(2643, 2643), Box(2643, 2643)), - Box(Box(2644, 2644), Box(2644, 2644)), - Box(Box(2645, 2645), Box(2645, 2645)), - Box(Box(2646, 2646), Box(2646, 2646)), - Box(Box(2647, 2647), Box(2647, 2647)), - Box(Box(2648, 2648), Box(2648, 2648)), - Box(Box(2649, 2649), Box(2649, 2649)), - Box(Box(2650, 2650), Box(2650, 2650)), - Box(Box(2651, 2651), Box(2651, 2651)), - Box(Box(2652, 2652), Box(2652, 2652)), - Box(Box(2653, 2653), Box(2653, 2653)), - Box(Box(2654, 2654), Box(2654, 2654)), - Box(Box(2655, 2655), Box(2655, 2655)), - Box(Box(2656, 2656), Box(2656, 2656)), - Box(Box(2657, 2657), Box(2657, 2657)), - Box(Box(2658, 2658), Box(2658, 2658)), - Box(Box(2659, 2659), Box(2659, 2659)), - Box(Box(2660, 2660), Box(2660, 2660)), - Box(Box(2661, 2661), Box(2661, 2661)), - Box(Box(2662, 2662), Box(2662, 2662)), - Box(Box(2663, 2663), Box(2663, 2663)), - Box(Box(2664, 2664), Box(2664, 2664)), - Box(Box(2665, 2665), Box(2665, 2665)), - Box(Box(2666, 2666), Box(2666, 2666)), - Box(Box(2667, 2667), Box(2667, 2667)), - Box(Box(2668, 2668), Box(2668, 2668)), - Box(Box(2669, 2669), Box(2669, 2669)), - Box(Box(2670, 2670), Box(2670, 2670)), - Box(Box(2671, 2671), Box(2671, 2671)), - Box(Box(2672, 2672), Box(2672, 2672)), - Box(Box(2673, 2673), Box(2673, 2673)), - Box(Box(2674, 2674), Box(2674, 2674)), - Box(Box(2675, 2675), Box(2675, 2675)), - Box(Box(2676, 2676), Box(2676, 2676)), - Box(Box(2677, 2677), Box(2677, 2677)), - Box(Box(2678, 2678), Box(2678, 2678)), - Box(Box(2679, 2679), Box(2679, 2679)), - Box(Box(2680, 2680), Box(2680, 2680)), - Box(Box(2681, 2681), Box(2681, 2681)), - Box(Box(2682, 2682), Box(2682, 2682)), - Box(Box(2683, 2683), Box(2683, 2683)), - Box(Box(2684, 2684), Box(2684, 2684)), - Box(Box(2685, 2685), Box(2685, 2685)), - Box(Box(2686, 2686), Box(2686, 2686)), - Box(Box(2687, 2687), Box(2687, 2687)), - Box(Box(2688, 2688), Box(2688, 2688)), - Box(Box(2689, 2689), Box(2689, 2689)), - Box(Box(2690, 2690), Box(2690, 2690)), - Box(Box(2691, 2691), Box(2691, 2691)), - Box(Box(2692, 2692), Box(2692, 2692)), - Box(Box(2693, 2693), Box(2693, 2693)), - Box(Box(2694, 2694), Box(2694, 2694)), - Box(Box(2695, 2695), Box(2695, 2695)), - Box(Box(2696, 2696), Box(2696, 2696)), - Box(Box(2697, 2697), Box(2697, 2697)), - Box(Box(2698, 2698), Box(2698, 2698)), - Box(Box(2699, 2699), Box(2699, 2699)), - Box(Box(2700, 2700), Box(2700, 2700)), - Box(Box(2701, 2701), Box(2701, 2701)), - Box(Box(2702, 2702), Box(2702, 2702)), - Box(Box(2703, 2703), Box(2703, 2703)), - Box(Box(2704, 2704), Box(2704, 2704)), - Box(Box(2705, 2705), Box(2705, 2705)), - Box(Box(2706, 2706), Box(2706, 2706)), - Box(Box(2707, 2707), Box(2707, 2707)), - Box(Box(2708, 2708), Box(2708, 2708)), - Box(Box(2709, 2709), Box(2709, 2709)), - Box(Box(2710, 2710), Box(2710, 2710)), - Box(Box(2711, 2711), Box(2711, 2711)), - Box(Box(2712, 2712), Box(2712, 2712)), - Box(Box(2713, 2713), Box(2713, 2713)), - Box(Box(2714, 2714), Box(2714, 2714)), - Box(Box(2715, 2715), Box(2715, 2715)), - Box(Box(2716, 2716), Box(2716, 2716)), - Box(Box(2717, 2717), Box(2717, 2717)), - Box(Box(2718, 2718), Box(2718, 2718)), - Box(Box(2719, 2719), Box(2719, 2719)), - Box(Box(2720, 2720), Box(2720, 2720)), - Box(Box(2721, 2721), Box(2721, 2721)), - Box(Box(2722, 2722), Box(2722, 2722)), - Box(Box(2723, 2723), Box(2723, 2723)), - Box(Box(2724, 2724), Box(2724, 2724)), - Box(Box(2725, 2725), Box(2725, 2725)), - Box(Box(2726, 2726), Box(2726, 2726)), - Box(Box(2727, 2727), Box(2727, 2727)), - Box(Box(2728, 2728), Box(2728, 2728)), - Box(Box(2729, 2729), Box(2729, 2729)), - Box(Box(2730, 2730), Box(2730, 2730)), - Box(Box(2731, 2731), Box(2731, 2731)), - Box(Box(2732, 2732), Box(2732, 2732)), - Box(Box(2733, 2733), Box(2733, 2733)), - Box(Box(2734, 2734), Box(2734, 2734)), - Box(Box(2735, 2735), Box(2735, 2735)), - Box(Box(2736, 2736), Box(2736, 2736)), - Box(Box(2737, 2737), Box(2737, 2737)), - Box(Box(2738, 2738), Box(2738, 2738)), - Box(Box(2739, 2739), Box(2739, 2739)), - Box(Box(2740, 2740), Box(2740, 2740)), - Box(Box(2741, 2741), Box(2741, 2741)), - Box(Box(2742, 2742), Box(2742, 2742)), - Box(Box(2743, 2743), Box(2743, 2743)), - Box(Box(2744, 2744), Box(2744, 2744)), - Box(Box(2745, 2745), Box(2745, 2745)), - Box(Box(2746, 2746), Box(2746, 2746)), - Box(Box(2747, 2747), Box(2747, 2747)), - Box(Box(2748, 2748), Box(2748, 2748)), - Box(Box(2749, 2749), Box(2749, 2749)), - Box(Box(2750, 2750), Box(2750, 2750)), - Box(Box(2751, 2751), Box(2751, 2751)), - Box(Box(2752, 2752), Box(2752, 2752)), - Box(Box(2753, 2753), Box(2753, 2753)), - Box(Box(2754, 2754), Box(2754, 2754)), - Box(Box(2755, 2755), Box(2755, 2755)), - Box(Box(2756, 2756), Box(2756, 2756)), - Box(Box(2757, 2757), Box(2757, 2757)), - Box(Box(2758, 2758), Box(2758, 2758)), - Box(Box(2759, 2759), Box(2759, 2759)), - Box(Box(2760, 2760), Box(2760, 2760)), - Box(Box(2761, 2761), Box(2761, 2761)), - Box(Box(2762, 2762), Box(2762, 2762)), - Box(Box(2763, 2763), Box(2763, 2763)), - Box(Box(2764, 2764), Box(2764, 2764)), - Box(Box(2765, 2765), Box(2765, 2765)), - Box(Box(2766, 2766), Box(2766, 2766)), - Box(Box(2767, 2767), Box(2767, 2767)), - Box(Box(2768, 2768), Box(2768, 2768)), - Box(Box(2769, 2769), Box(2769, 2769)), - Box(Box(2770, 2770), Box(2770, 2770)), - Box(Box(2771, 2771), Box(2771, 2771)), - Box(Box(2772, 2772), Box(2772, 2772)), - Box(Box(2773, 2773), Box(2773, 2773)), - Box(Box(2774, 2774), Box(2774, 2774)), - Box(Box(2775, 2775), Box(2775, 2775)), - Box(Box(2776, 2776), Box(2776, 2776)), - Box(Box(2777, 2777), Box(2777, 2777)), - Box(Box(2778, 2778), Box(2778, 2778)), - Box(Box(2779, 2779), Box(2779, 2779)), - Box(Box(2780, 2780), Box(2780, 2780)), - Box(Box(2781, 2781), Box(2781, 2781)), - Box(Box(2782, 2782), Box(2782, 2782)), - Box(Box(2783, 2783), Box(2783, 2783)), - Box(Box(2784, 2784), Box(2784, 2784)), - Box(Box(2785, 2785), Box(2785, 2785)), - Box(Box(2786, 2786), Box(2786, 2786)), - Box(Box(2787, 2787), Box(2787, 2787)), - Box(Box(2788, 2788), Box(2788, 2788)), - Box(Box(2789, 2789), Box(2789, 2789)), - Box(Box(2790, 2790), Box(2790, 2790)), - Box(Box(2791, 2791), Box(2791, 2791)), - Box(Box(2792, 2792), Box(2792, 2792)), - Box(Box(2793, 2793), Box(2793, 2793)), - Box(Box(2794, 2794), Box(2794, 2794)), - Box(Box(2795, 2795), Box(2795, 2795)), - Box(Box(2796, 2796), Box(2796, 2796)), - Box(Box(2797, 2797), Box(2797, 2797)), - Box(Box(2798, 2798), Box(2798, 2798)), - Box(Box(2799, 2799), Box(2799, 2799)), - Box(Box(2800, 2800), Box(2800, 2800)), - Box(Box(2801, 2801), Box(2801, 2801)), - Box(Box(2802, 2802), Box(2802, 2802)), - Box(Box(2803, 2803), Box(2803, 2803)), - Box(Box(2804, 2804), Box(2804, 2804)), - Box(Box(2805, 2805), Box(2805, 2805)), - Box(Box(2806, 2806), Box(2806, 2806)), - Box(Box(2807, 2807), Box(2807, 2807)), - Box(Box(2808, 2808), Box(2808, 2808)), - Box(Box(2809, 2809), Box(2809, 2809)), - Box(Box(2810, 2810), Box(2810, 2810)), - Box(Box(2811, 2811), Box(2811, 2811)), - Box(Box(2812, 2812), Box(2812, 2812)), - Box(Box(2813, 2813), Box(2813, 2813)), - Box(Box(2814, 2814), Box(2814, 2814)), - Box(Box(2815, 2815), Box(2815, 2815)), - Box(Box(2816, 2816), Box(2816, 2816)), - Box(Box(2817, 2817), Box(2817, 2817)), - Box(Box(2818, 2818), Box(2818, 2818)), - Box(Box(2819, 2819), Box(2819, 2819)), - Box(Box(2820, 2820), Box(2820, 2820)), - Box(Box(2821, 2821), Box(2821, 2821)), - Box(Box(2822, 2822), Box(2822, 2822)), - Box(Box(2823, 2823), Box(2823, 2823)), - Box(Box(2824, 2824), Box(2824, 2824)), - Box(Box(2825, 2825), Box(2825, 2825)), - Box(Box(2826, 2826), Box(2826, 2826)), - Box(Box(2827, 2827), Box(2827, 2827)), - Box(Box(2828, 2828), Box(2828, 2828)), - Box(Box(2829, 2829), Box(2829, 2829)), - Box(Box(2830, 2830), Box(2830, 2830)), - Box(Box(2831, 2831), Box(2831, 2831)), - Box(Box(2832, 2832), Box(2832, 2832)), - Box(Box(2833, 2833), Box(2833, 2833)), - Box(Box(2834, 2834), Box(2834, 2834)), - Box(Box(2835, 2835), Box(2835, 2835)), - Box(Box(2836, 2836), Box(2836, 2836)), - Box(Box(2837, 2837), Box(2837, 2837)), - Box(Box(2838, 2838), Box(2838, 2838)), - Box(Box(2839, 2839), Box(2839, 2839)), - Box(Box(2840, 2840), Box(2840, 2840)), - Box(Box(2841, 2841), Box(2841, 2841)), - Box(Box(2842, 2842), Box(2842, 2842)), - Box(Box(2843, 2843), Box(2843, 2843)), - Box(Box(2844, 2844), Box(2844, 2844)), - Box(Box(2845, 2845), Box(2845, 2845)), - Box(Box(2846, 2846), Box(2846, 2846)), - Box(Box(2847, 2847), Box(2847, 2847)), - Box(Box(2848, 2848), Box(2848, 2848)), - Box(Box(2849, 2849), Box(2849, 2849)), - Box(Box(2850, 2850), Box(2850, 2850)), - Box(Box(2851, 2851), Box(2851, 2851)), - Box(Box(2852, 2852), Box(2852, 2852)), - Box(Box(2853, 2853), Box(2853, 2853)), - Box(Box(2854, 2854), Box(2854, 2854)), - Box(Box(2855, 2855), Box(2855, 2855)), - Box(Box(2856, 2856), Box(2856, 2856)), - Box(Box(2857, 2857), Box(2857, 2857)), - Box(Box(2858, 2858), Box(2858, 2858)), - Box(Box(2859, 2859), Box(2859, 2859)), - Box(Box(2860, 2860), Box(2860, 2860)), - Box(Box(2861, 2861), Box(2861, 2861)), - Box(Box(2862, 2862), Box(2862, 2862)), - Box(Box(2863, 2863), Box(2863, 2863)), - Box(Box(2864, 2864), Box(2864, 2864)), - Box(Box(2865, 2865), Box(2865, 2865)), - Box(Box(2866, 2866), Box(2866, 2866)), - Box(Box(2867, 2867), Box(2867, 2867)), - Box(Box(2868, 2868), Box(2868, 2868)), - Box(Box(2869, 2869), Box(2869, 2869)), - Box(Box(2870, 2870), Box(2870, 2870)), - Box(Box(2871, 2871), Box(2871, 2871)), - Box(Box(2872, 2872), Box(2872, 2872)), - Box(Box(2873, 2873), Box(2873, 2873)), - Box(Box(2874, 2874), Box(2874, 2874)), - Box(Box(2875, 2875), Box(2875, 2875)), - Box(Box(2876, 2876), Box(2876, 2876)), - Box(Box(2877, 2877), Box(2877, 2877)), - Box(Box(2878, 2878), Box(2878, 2878)), - Box(Box(2879, 2879), Box(2879, 2879)), - Box(Box(2880, 2880), Box(2880, 2880)), - Box(Box(2881, 2881), Box(2881, 2881)), - Box(Box(2882, 2882), Box(2882, 2882)), - Box(Box(2883, 2883), Box(2883, 2883)), - Box(Box(2884, 2884), Box(2884, 2884)), - Box(Box(2885, 2885), Box(2885, 2885)), - Box(Box(2886, 2886), Box(2886, 2886)), - Box(Box(2887, 2887), Box(2887, 2887)), - Box(Box(2888, 2888), Box(2888, 2888)), - Box(Box(2889, 2889), Box(2889, 2889)), - Box(Box(2890, 2890), Box(2890, 2890)), - Box(Box(2891, 2891), Box(2891, 2891)), - Box(Box(2892, 2892), Box(2892, 2892)), - Box(Box(2893, 2893), Box(2893, 2893)), - Box(Box(2894, 2894), Box(2894, 2894)), - Box(Box(2895, 2895), Box(2895, 2895)), - Box(Box(2896, 2896), Box(2896, 2896)), - Box(Box(2897, 2897), Box(2897, 2897)), - Box(Box(2898, 2898), Box(2898, 2898)), - Box(Box(2899, 2899), Box(2899, 2899)), - Box(Box(2900, 2900), Box(2900, 2900)), - Box(Box(2901, 2901), Box(2901, 2901)), - Box(Box(2902, 2902), Box(2902, 2902)), - Box(Box(2903, 2903), Box(2903, 2903)), - Box(Box(2904, 2904), Box(2904, 2904)), - Box(Box(2905, 2905), Box(2905, 2905)), - Box(Box(2906, 2906), Box(2906, 2906)), - Box(Box(2907, 2907), Box(2907, 2907)), - Box(Box(2908, 2908), Box(2908, 2908)), - Box(Box(2909, 2909), Box(2909, 2909)), - Box(Box(2910, 2910), Box(2910, 2910)), - Box(Box(2911, 2911), Box(2911, 2911)), - Box(Box(2912, 2912), Box(2912, 2912)), - Box(Box(2913, 2913), Box(2913, 2913)), - Box(Box(2914, 2914), Box(2914, 2914)), - Box(Box(2915, 2915), Box(2915, 2915)), - Box(Box(2916, 2916), Box(2916, 2916)), - Box(Box(2917, 2917), Box(2917, 2917)), - Box(Box(2918, 2918), Box(2918, 2918)), - Box(Box(2919, 2919), Box(2919, 2919)), - Box(Box(2920, 2920), Box(2920, 2920)), - Box(Box(2921, 2921), Box(2921, 2921)), - Box(Box(2922, 2922), Box(2922, 2922)), - Box(Box(2923, 2923), Box(2923, 2923)), - Box(Box(2924, 2924), Box(2924, 2924)), - Box(Box(2925, 2925), Box(2925, 2925)), - Box(Box(2926, 2926), Box(2926, 2926)), - Box(Box(2927, 2927), Box(2927, 2927)), - Box(Box(2928, 2928), Box(2928, 2928)), - Box(Box(2929, 2929), Box(2929, 2929)), - Box(Box(2930, 2930), Box(2930, 2930)), - Box(Box(2931, 2931), Box(2931, 2931)), - Box(Box(2932, 2932), Box(2932, 2932)), - Box(Box(2933, 2933), Box(2933, 2933)), - Box(Box(2934, 2934), Box(2934, 2934)), - Box(Box(2935, 2935), Box(2935, 2935)), - Box(Box(2936, 2936), Box(2936, 2936)), - Box(Box(2937, 2937), Box(2937, 2937)), - Box(Box(2938, 2938), Box(2938, 2938)), - Box(Box(2939, 2939), Box(2939, 2939)), - Box(Box(2940, 2940), Box(2940, 2940)), - Box(Box(2941, 2941), Box(2941, 2941)), - Box(Box(2942, 2942), Box(2942, 2942)), - Box(Box(2943, 2943), Box(2943, 2943)), - Box(Box(2944, 2944), Box(2944, 2944)), - Box(Box(2945, 2945), Box(2945, 2945)), - Box(Box(2946, 2946), Box(2946, 2946)), - Box(Box(2947, 2947), Box(2947, 2947)), - Box(Box(2948, 2948), Box(2948, 2948)), - Box(Box(2949, 2949), Box(2949, 2949)), - Box(Box(2950, 2950), Box(2950, 2950)), - Box(Box(2951, 2951), Box(2951, 2951)), - Box(Box(2952, 2952), Box(2952, 2952)), - Box(Box(2953, 2953), Box(2953, 2953)), - Box(Box(2954, 2954), Box(2954, 2954)), - Box(Box(2955, 2955), Box(2955, 2955)), - Box(Box(2956, 2956), Box(2956, 2956)), - Box(Box(2957, 2957), Box(2957, 2957)), - Box(Box(2958, 2958), Box(2958, 2958)), - Box(Box(2959, 2959), Box(2959, 2959)), - Box(Box(2960, 2960), Box(2960, 2960)), - Box(Box(2961, 2961), Box(2961, 2961)), - Box(Box(2962, 2962), Box(2962, 2962)), - Box(Box(2963, 2963), Box(2963, 2963)), - Box(Box(2964, 2964), Box(2964, 2964)), - Box(Box(2965, 2965), Box(2965, 2965)), - Box(Box(2966, 2966), Box(2966, 2966)), - Box(Box(2967, 2967), Box(2967, 2967)), - Box(Box(2968, 2968), Box(2968, 2968)), - Box(Box(2969, 2969), Box(2969, 2969)), - Box(Box(2970, 2970), Box(2970, 2970)), - Box(Box(2971, 2971), Box(2971, 2971)), - Box(Box(2972, 2972), Box(2972, 2972)), - Box(Box(2973, 2973), Box(2973, 2973)), - Box(Box(2974, 2974), Box(2974, 2974)), - Box(Box(2975, 2975), Box(2975, 2975)), - Box(Box(2976, 2976), Box(2976, 2976)), - Box(Box(2977, 2977), Box(2977, 2977)), - Box(Box(2978, 2978), Box(2978, 2978)), - Box(Box(2979, 2979), Box(2979, 2979)), - Box(Box(2980, 2980), Box(2980, 2980)), - Box(Box(2981, 2981), Box(2981, 2981)), - Box(Box(2982, 2982), Box(2982, 2982)), - Box(Box(2983, 2983), Box(2983, 2983)), - Box(Box(2984, 2984), Box(2984, 2984)), - Box(Box(2985, 2985), Box(2985, 2985)), - Box(Box(2986, 2986), Box(2986, 2986)), - Box(Box(2987, 2987), Box(2987, 2987)), - Box(Box(2988, 2988), Box(2988, 2988)), - Box(Box(2989, 2989), Box(2989, 2989)), - Box(Box(2990, 2990), Box(2990, 2990)), - Box(Box(2991, 2991), Box(2991, 2991)), - Box(Box(2992, 2992), Box(2992, 2992)), - Box(Box(2993, 2993), Box(2993, 2993)), - Box(Box(2994, 2994), Box(2994, 2994)), - Box(Box(2995, 2995), Box(2995, 2995)), - Box(Box(2996, 2996), Box(2996, 2996)), - Box(Box(2997, 2997), Box(2997, 2997)), - Box(Box(2998, 2998), Box(2998, 2998)), - Box(Box(2999, 2999), Box(2999, 2999)), - Box(Box(3000, 3000), Box(3000, 3000)), - Box(Box(3001, 3001), Box(3001, 3001)), - Box(Box(3002, 3002), Box(3002, 3002)), - Box(Box(3003, 3003), Box(3003, 3003)), - Box(Box(3004, 3004), Box(3004, 3004)), - Box(Box(3005, 3005), Box(3005, 3005)), - Box(Box(3006, 3006), Box(3006, 3006)), - Box(Box(3007, 3007), Box(3007, 3007)), - Box(Box(3008, 3008), Box(3008, 3008)), - Box(Box(3009, 3009), Box(3009, 3009)), - Box(Box(3010, 3010), Box(3010, 3010)), - Box(Box(3011, 3011), Box(3011, 3011)), - Box(Box(3012, 3012), Box(3012, 3012)), - Box(Box(3013, 3013), Box(3013, 3013)), - Box(Box(3014, 3014), Box(3014, 3014)), - Box(Box(3015, 3015), Box(3015, 3015)), - Box(Box(3016, 3016), Box(3016, 3016)), - Box(Box(3017, 3017), Box(3017, 3017)), - Box(Box(3018, 3018), Box(3018, 3018)), - Box(Box(3019, 3019), Box(3019, 3019)), - Box(Box(3020, 3020), Box(3020, 3020)), - Box(Box(3021, 3021), Box(3021, 3021)), - Box(Box(3022, 3022), Box(3022, 3022)), - Box(Box(3023, 3023), Box(3023, 3023)), - Box(Box(3024, 3024), Box(3024, 3024)), - Box(Box(3025, 3025), Box(3025, 3025)), - Box(Box(3026, 3026), Box(3026, 3026)), - Box(Box(3027, 3027), Box(3027, 3027)), - Box(Box(3028, 3028), Box(3028, 3028)), - Box(Box(3029, 3029), Box(3029, 3029)), - Box(Box(3030, 3030), Box(3030, 3030)), - Box(Box(3031, 3031), Box(3031, 3031)), - Box(Box(3032, 3032), Box(3032, 3032)), - Box(Box(3033, 3033), Box(3033, 3033)), - Box(Box(3034, 3034), Box(3034, 3034)), - Box(Box(3035, 3035), Box(3035, 3035)), - Box(Box(3036, 3036), Box(3036, 3036)), - Box(Box(3037, 3037), Box(3037, 3037)), - Box(Box(3038, 3038), Box(3038, 3038)), - Box(Box(3039, 3039), Box(3039, 3039)), - Box(Box(3040, 3040), Box(3040, 3040)), - Box(Box(3041, 3041), Box(3041, 3041)), - Box(Box(3042, 3042), Box(3042, 3042)), - Box(Box(3043, 3043), Box(3043, 3043)), - Box(Box(3044, 3044), Box(3044, 3044)), - Box(Box(3045, 3045), Box(3045, 3045)), - Box(Box(3046, 3046), Box(3046, 3046)), - Box(Box(3047, 3047), Box(3047, 3047)), - Box(Box(3048, 3048), Box(3048, 3048)), - Box(Box(3049, 3049), Box(3049, 3049)), - Box(Box(3050, 3050), Box(3050, 3050)), - Box(Box(3051, 3051), Box(3051, 3051)), - Box(Box(3052, 3052), Box(3052, 3052)), - Box(Box(3053, 3053), Box(3053, 3053)), - Box(Box(3054, 3054), Box(3054, 3054)), - Box(Box(3055, 3055), Box(3055, 3055)), - Box(Box(3056, 3056), Box(3056, 3056)), - Box(Box(3057, 3057), Box(3057, 3057)), - Box(Box(3058, 3058), Box(3058, 3058)), - Box(Box(3059, 3059), Box(3059, 3059)), - Box(Box(3060, 3060), Box(3060, 3060)), - Box(Box(3061, 3061), Box(3061, 3061)), - Box(Box(3062, 3062), Box(3062, 3062)), - Box(Box(3063, 3063), Box(3063, 3063)), - Box(Box(3064, 3064), Box(3064, 3064)), - Box(Box(3065, 3065), Box(3065, 3065)), - Box(Box(3066, 3066), Box(3066, 3066)), - Box(Box(3067, 3067), Box(3067, 3067)), - Box(Box(3068, 3068), Box(3068, 3068)), - Box(Box(3069, 3069), Box(3069, 3069)), - Box(Box(3070, 3070), Box(3070, 3070)), - Box(Box(3071, 3071), Box(3071, 3071)), - Box(Box(3072, 3072), Box(3072, 3072)), - Box(Box(3073, 3073), Box(3073, 3073)), - Box(Box(3074, 3074), Box(3074, 3074)), - Box(Box(3075, 3075), Box(3075, 3075)), - Box(Box(3076, 3076), Box(3076, 3076)), - Box(Box(3077, 3077), Box(3077, 3077)), - Box(Box(3078, 3078), Box(3078, 3078)), - Box(Box(3079, 3079), Box(3079, 3079)), - Box(Box(3080, 3080), Box(3080, 3080)), - Box(Box(3081, 3081), Box(3081, 3081)), - Box(Box(3082, 3082), Box(3082, 3082)), - Box(Box(3083, 3083), Box(3083, 3083)), - Box(Box(3084, 3084), Box(3084, 3084)), - Box(Box(3085, 3085), Box(3085, 3085)), - Box(Box(3086, 3086), Box(3086, 3086)), - Box(Box(3087, 3087), Box(3087, 3087)), - Box(Box(3088, 3088), Box(3088, 3088)), - Box(Box(3089, 3089), Box(3089, 3089)), - Box(Box(3090, 3090), Box(3090, 3090)), - Box(Box(3091, 3091), Box(3091, 3091)), - Box(Box(3092, 3092), Box(3092, 3092)), - Box(Box(3093, 3093), Box(3093, 3093)), - Box(Box(3094, 3094), Box(3094, 3094)), - Box(Box(3095, 3095), Box(3095, 3095)), - Box(Box(3096, 3096), Box(3096, 3096)), - Box(Box(3097, 3097), Box(3097, 3097)), - Box(Box(3098, 3098), Box(3098, 3098)), - Box(Box(3099, 3099), Box(3099, 3099)), - Box(Box(3100, 3100), Box(3100, 3100)), - Box(Box(3101, 3101), Box(3101, 3101)), - Box(Box(3102, 3102), Box(3102, 3102)), - Box(Box(3103, 3103), Box(3103, 3103)), - Box(Box(3104, 3104), Box(3104, 3104)), - Box(Box(3105, 3105), Box(3105, 3105)), - Box(Box(3106, 3106), Box(3106, 3106)), - Box(Box(3107, 3107), Box(3107, 3107)), - Box(Box(3108, 3108), Box(3108, 3108)), - Box(Box(3109, 3109), Box(3109, 3109)), - Box(Box(3110, 3110), Box(3110, 3110)), - Box(Box(3111, 3111), Box(3111, 3111)), - Box(Box(3112, 3112), Box(3112, 3112)), - Box(Box(3113, 3113), Box(3113, 3113)), - Box(Box(3114, 3114), Box(3114, 3114)), - Box(Box(3115, 3115), Box(3115, 3115)), - Box(Box(3116, 3116), Box(3116, 3116)), - Box(Box(3117, 3117), Box(3117, 3117)), - Box(Box(3118, 3118), Box(3118, 3118)), - Box(Box(3119, 3119), Box(3119, 3119)), - Box(Box(3120, 3120), Box(3120, 3120)), - Box(Box(3121, 3121), Box(3121, 3121)), - Box(Box(3122, 3122), Box(3122, 3122)), - Box(Box(3123, 3123), Box(3123, 3123)), - Box(Box(3124, 3124), Box(3124, 3124)), - Box(Box(3125, 3125), Box(3125, 3125)), - Box(Box(3126, 3126), Box(3126, 3126)), - Box(Box(3127, 3127), Box(3127, 3127)), - Box(Box(3128, 3128), Box(3128, 3128)), - Box(Box(3129, 3129), Box(3129, 3129)), - Box(Box(3130, 3130), Box(3130, 3130)), - Box(Box(3131, 3131), Box(3131, 3131)), - Box(Box(3132, 3132), Box(3132, 3132)), - Box(Box(3133, 3133), Box(3133, 3133)), - Box(Box(3134, 3134), Box(3134, 3134)), - Box(Box(3135, 3135), Box(3135, 3135)), - Box(Box(3136, 3136), Box(3136, 3136)), - Box(Box(3137, 3137), Box(3137, 3137)), - Box(Box(3138, 3138), Box(3138, 3138)), - Box(Box(3139, 3139), Box(3139, 3139)), - Box(Box(3140, 3140), Box(3140, 3140)), - Box(Box(3141, 3141), Box(3141, 3141)), - Box(Box(3142, 3142), Box(3142, 3142)), - Box(Box(3143, 3143), Box(3143, 3143)), - Box(Box(3144, 3144), Box(3144, 3144)), - Box(Box(3145, 3145), Box(3145, 3145)), - Box(Box(3146, 3146), Box(3146, 3146)), - Box(Box(3147, 3147), Box(3147, 3147)), - Box(Box(3148, 3148), Box(3148, 3148)), - Box(Box(3149, 3149), Box(3149, 3149)), - Box(Box(3150, 3150), Box(3150, 3150)), - Box(Box(3151, 3151), Box(3151, 3151)), - Box(Box(3152, 3152), Box(3152, 3152)), - Box(Box(3153, 3153), Box(3153, 3153)), - Box(Box(3154, 3154), Box(3154, 3154)), - Box(Box(3155, 3155), Box(3155, 3155)), - Box(Box(3156, 3156), Box(3156, 3156)), - Box(Box(3157, 3157), Box(3157, 3157)), - Box(Box(3158, 3158), Box(3158, 3158)), - Box(Box(3159, 3159), Box(3159, 3159)), - Box(Box(3160, 3160), Box(3160, 3160)), - Box(Box(3161, 3161), Box(3161, 3161)), - Box(Box(3162, 3162), Box(3162, 3162)), - Box(Box(3163, 3163), Box(3163, 3163)), - Box(Box(3164, 3164), Box(3164, 3164)), - Box(Box(3165, 3165), Box(3165, 3165)), - Box(Box(3166, 3166), Box(3166, 3166)), - Box(Box(3167, 3167), Box(3167, 3167)), - Box(Box(3168, 3168), Box(3168, 3168)), - Box(Box(3169, 3169), Box(3169, 3169)), - Box(Box(3170, 3170), Box(3170, 3170)), - Box(Box(3171, 3171), Box(3171, 3171)), - Box(Box(3172, 3172), Box(3172, 3172)), - Box(Box(3173, 3173), Box(3173, 3173)), - Box(Box(3174, 3174), Box(3174, 3174)), - Box(Box(3175, 3175), Box(3175, 3175)), - Box(Box(3176, 3176), Box(3176, 3176)), - Box(Box(3177, 3177), Box(3177, 3177)), - Box(Box(3178, 3178), Box(3178, 3178)), - Box(Box(3179, 3179), Box(3179, 3179)), - Box(Box(3180, 3180), Box(3180, 3180)), - Box(Box(3181, 3181), Box(3181, 3181)), - Box(Box(3182, 3182), Box(3182, 3182)), - Box(Box(3183, 3183), Box(3183, 3183)), - Box(Box(3184, 3184), Box(3184, 3184)), - Box(Box(3185, 3185), Box(3185, 3185)), - Box(Box(3186, 3186), Box(3186, 3186)), - Box(Box(3187, 3187), Box(3187, 3187)), - Box(Box(3188, 3188), Box(3188, 3188)), - Box(Box(3189, 3189), Box(3189, 3189)), - Box(Box(3190, 3190), Box(3190, 3190)), - Box(Box(3191, 3191), Box(3191, 3191)), - Box(Box(3192, 3192), Box(3192, 3192)), - Box(Box(3193, 3193), Box(3193, 3193)), - Box(Box(3194, 3194), Box(3194, 3194)), - Box(Box(3195, 3195), Box(3195, 3195)), - Box(Box(3196, 3196), Box(3196, 3196)), - Box(Box(3197, 3197), Box(3197, 3197)), - Box(Box(3198, 3198), Box(3198, 3198)), - Box(Box(3199, 3199), Box(3199, 3199)), - Box(Box(3200, 3200), Box(3200, 3200)), - Box(Box(3201, 3201), Box(3201, 3201)), - Box(Box(3202, 3202), Box(3202, 3202)), - Box(Box(3203, 3203), Box(3203, 3203)), - Box(Box(3204, 3204), Box(3204, 3204)), - Box(Box(3205, 3205), Box(3205, 3205)), - Box(Box(3206, 3206), Box(3206, 3206)), - Box(Box(3207, 3207), Box(3207, 3207)), - Box(Box(3208, 3208), Box(3208, 3208)), - Box(Box(3209, 3209), Box(3209, 3209)), - Box(Box(3210, 3210), Box(3210, 3210)), - Box(Box(3211, 3211), Box(3211, 3211)), - Box(Box(3212, 3212), Box(3212, 3212)), - Box(Box(3213, 3213), Box(3213, 3213)), - Box(Box(3214, 3214), Box(3214, 3214)), - Box(Box(3215, 3215), Box(3215, 3215)), - Box(Box(3216, 3216), Box(3216, 3216)), - Box(Box(3217, 3217), Box(3217, 3217)), - Box(Box(3218, 3218), Box(3218, 3218)), - Box(Box(3219, 3219), Box(3219, 3219)), - Box(Box(3220, 3220), Box(3220, 3220)), - Box(Box(3221, 3221), Box(3221, 3221)), - Box(Box(3222, 3222), Box(3222, 3222)), - Box(Box(3223, 3223), Box(3223, 3223)), - Box(Box(3224, 3224), Box(3224, 3224)), - Box(Box(3225, 3225), Box(3225, 3225)), - Box(Box(3226, 3226), Box(3226, 3226)), - Box(Box(3227, 3227), Box(3227, 3227)), - Box(Box(3228, 3228), Box(3228, 3228)), - Box(Box(3229, 3229), Box(3229, 3229)), - Box(Box(3230, 3230), Box(3230, 3230)), - Box(Box(3231, 3231), Box(3231, 3231)), - Box(Box(3232, 3232), Box(3232, 3232)), - Box(Box(3233, 3233), Box(3233, 3233)), - Box(Box(3234, 3234), Box(3234, 3234)), - Box(Box(3235, 3235), Box(3235, 3235)), - Box(Box(3236, 3236), Box(3236, 3236)), - Box(Box(3237, 3237), Box(3237, 3237)), - Box(Box(3238, 3238), Box(3238, 3238)), - Box(Box(3239, 3239), Box(3239, 3239)), - Box(Box(3240, 3240), Box(3240, 3240)), - Box(Box(3241, 3241), Box(3241, 3241)), - Box(Box(3242, 3242), Box(3242, 3242)), - Box(Box(3243, 3243), Box(3243, 3243)), - Box(Box(3244, 3244), Box(3244, 3244)), - Box(Box(3245, 3245), Box(3245, 3245)), - Box(Box(3246, 3246), Box(3246, 3246)), - Box(Box(3247, 3247), Box(3247, 3247)), - Box(Box(3248, 3248), Box(3248, 3248)), - Box(Box(3249, 3249), Box(3249, 3249)), - Box(Box(3250, 3250), Box(3250, 3250)), - Box(Box(3251, 3251), Box(3251, 3251)), - Box(Box(3252, 3252), Box(3252, 3252)), - Box(Box(3253, 3253), Box(3253, 3253)), - Box(Box(3254, 3254), Box(3254, 3254)), - Box(Box(3255, 3255), Box(3255, 3255)), - Box(Box(3256, 3256), Box(3256, 3256)), - Box(Box(3257, 3257), Box(3257, 3257)), - Box(Box(3258, 3258), Box(3258, 3258)), - Box(Box(3259, 3259), Box(3259, 3259)), - Box(Box(3260, 3260), Box(3260, 3260)), - Box(Box(3261, 3261), Box(3261, 3261)), - Box(Box(3262, 3262), Box(3262, 3262)), - Box(Box(3263, 3263), Box(3263, 3263)), - Box(Box(3264, 3264), Box(3264, 3264)), - Box(Box(3265, 3265), Box(3265, 3265)), - Box(Box(3266, 3266), Box(3266, 3266)), - Box(Box(3267, 3267), Box(3267, 3267)), - Box(Box(3268, 3268), Box(3268, 3268)), - Box(Box(3269, 3269), Box(3269, 3269)), - Box(Box(3270, 3270), Box(3270, 3270)), - Box(Box(3271, 3271), Box(3271, 3271)), - Box(Box(3272, 3272), Box(3272, 3272)), - Box(Box(3273, 3273), Box(3273, 3273)), - Box(Box(3274, 3274), Box(3274, 3274)), - Box(Box(3275, 3275), Box(3275, 3275)), - Box(Box(3276, 3276), Box(3276, 3276)), - Box(Box(3277, 3277), Box(3277, 3277)), - Box(Box(3278, 3278), Box(3278, 3278)), - Box(Box(3279, 3279), Box(3279, 3279)), - Box(Box(3280, 3280), Box(3280, 3280)), - Box(Box(3281, 3281), Box(3281, 3281)), - Box(Box(3282, 3282), Box(3282, 3282)), - Box(Box(3283, 3283), Box(3283, 3283)), - Box(Box(3284, 3284), Box(3284, 3284)), - Box(Box(3285, 3285), Box(3285, 3285)), - Box(Box(3286, 3286), Box(3286, 3286)), - Box(Box(3287, 3287), Box(3287, 3287)), - Box(Box(3288, 3288), Box(3288, 3288)), - Box(Box(3289, 3289), Box(3289, 3289)), - Box(Box(3290, 3290), Box(3290, 3290)), - Box(Box(3291, 3291), Box(3291, 3291)), - Box(Box(3292, 3292), Box(3292, 3292)), - Box(Box(3293, 3293), Box(3293, 3293)), - Box(Box(3294, 3294), Box(3294, 3294)), - Box(Box(3295, 3295), Box(3295, 3295)), - Box(Box(3296, 3296), Box(3296, 3296)), - Box(Box(3297, 3297), Box(3297, 3297)), - Box(Box(3298, 3298), Box(3298, 3298)), - Box(Box(3299, 3299), Box(3299, 3299)), - Box(Box(3300, 3300), Box(3300, 3300)), - Box(Box(3301, 3301), Box(3301, 3301)), - Box(Box(3302, 3302), Box(3302, 3302)), - Box(Box(3303, 3303), Box(3303, 3303)), - Box(Box(3304, 3304), Box(3304, 3304)), - Box(Box(3305, 3305), Box(3305, 3305)), - Box(Box(3306, 3306), Box(3306, 3306)), - Box(Box(3307, 3307), Box(3307, 3307)), - Box(Box(3308, 3308), Box(3308, 3308)), - Box(Box(3309, 3309), Box(3309, 3309)), - Box(Box(3310, 3310), Box(3310, 3310)), - Box(Box(3311, 3311), Box(3311, 3311)), - Box(Box(3312, 3312), Box(3312, 3312)), - Box(Box(3313, 3313), Box(3313, 3313)), - Box(Box(3314, 3314), Box(3314, 3314)), - Box(Box(3315, 3315), Box(3315, 3315)), - Box(Box(3316, 3316), Box(3316, 3316)), - Box(Box(3317, 3317), Box(3317, 3317)), - Box(Box(3318, 3318), Box(3318, 3318)), - Box(Box(3319, 3319), Box(3319, 3319)), - Box(Box(3320, 3320), Box(3320, 3320)), - Box(Box(3321, 3321), Box(3321, 3321)), - Box(Box(3322, 3322), Box(3322, 3322)), - Box(Box(3323, 3323), Box(3323, 3323)), - Box(Box(3324, 3324), Box(3324, 3324)), - Box(Box(3325, 3325), Box(3325, 3325)), - Box(Box(3326, 3326), Box(3326, 3326)), - Box(Box(3327, 3327), Box(3327, 3327)), - Box(Box(3328, 3328), Box(3328, 3328)), - Box(Box(3329, 3329), Box(3329, 3329)), - Box(Box(3330, 3330), Box(3330, 3330)), - Box(Box(3331, 3331), Box(3331, 3331)), - Box(Box(3332, 3332), Box(3332, 3332)), - Box(Box(3333, 3333), Box(3333, 3333)), - Box(Box(3334, 3334), Box(3334, 3334)), - Box(Box(3335, 3335), Box(3335, 3335)), - Box(Box(3336, 3336), Box(3336, 3336)), - Box(Box(3337, 3337), Box(3337, 3337)), - Box(Box(3338, 3338), Box(3338, 3338)), - Box(Box(3339, 3339), Box(3339, 3339)), - Box(Box(3340, 3340), Box(3340, 3340)), - Box(Box(3341, 3341), Box(3341, 3341)), - Box(Box(3342, 3342), Box(3342, 3342)), - Box(Box(3343, 3343), Box(3343, 3343)), - Box(Box(3344, 3344), Box(3344, 3344)), - Box(Box(3345, 3345), Box(3345, 3345)), - Box(Box(3346, 3346), Box(3346, 3346)), - Box(Box(3347, 3347), Box(3347, 3347)), - Box(Box(3348, 3348), Box(3348, 3348)), - Box(Box(3349, 3349), Box(3349, 3349)), - Box(Box(3350, 3350), Box(3350, 3350)), - Box(Box(3351, 3351), Box(3351, 3351)), - Box(Box(3352, 3352), Box(3352, 3352)), - Box(Box(3353, 3353), Box(3353, 3353)), - Box(Box(3354, 3354), Box(3354, 3354)), - Box(Box(3355, 3355), Box(3355, 3355)), - Box(Box(3356, 3356), Box(3356, 3356)), - Box(Box(3357, 3357), Box(3357, 3357)), - Box(Box(3358, 3358), Box(3358, 3358)), - Box(Box(3359, 3359), Box(3359, 3359)), - Box(Box(3360, 3360), Box(3360, 3360)), - Box(Box(3361, 3361), Box(3361, 3361)), - Box(Box(3362, 3362), Box(3362, 3362)), - Box(Box(3363, 3363), Box(3363, 3363)), - Box(Box(3364, 3364), Box(3364, 3364)), - Box(Box(3365, 3365), Box(3365, 3365)), - Box(Box(3366, 3366), Box(3366, 3366)), - Box(Box(3367, 3367), Box(3367, 3367)), - Box(Box(3368, 3368), Box(3368, 3368)), - Box(Box(3369, 3369), Box(3369, 3369)), - Box(Box(3370, 3370), Box(3370, 3370)), - Box(Box(3371, 3371), Box(3371, 3371)), - Box(Box(3372, 3372), Box(3372, 3372)), - Box(Box(3373, 3373), Box(3373, 3373)), - Box(Box(3374, 3374), Box(3374, 3374)), - Box(Box(3375, 3375), Box(3375, 3375)), - Box(Box(3376, 3376), Box(3376, 3376)), - Box(Box(3377, 3377), Box(3377, 3377)), - Box(Box(3378, 3378), Box(3378, 3378)), - Box(Box(3379, 3379), Box(3379, 3379)), - Box(Box(3380, 3380), Box(3380, 3380)), - Box(Box(3381, 3381), Box(3381, 3381)), - Box(Box(3382, 3382), Box(3382, 3382)), - Box(Box(3383, 3383), Box(3383, 3383)), - Box(Box(3384, 3384), Box(3384, 3384)), - Box(Box(3385, 3385), Box(3385, 3385)), - Box(Box(3386, 3386), Box(3386, 3386)), - Box(Box(3387, 3387), Box(3387, 3387)), - Box(Box(3388, 3388), Box(3388, 3388)), - Box(Box(3389, 3389), Box(3389, 3389)), - Box(Box(3390, 3390), Box(3390, 3390)), - Box(Box(3391, 3391), Box(3391, 3391)), - Box(Box(3392, 3392), Box(3392, 3392)), - Box(Box(3393, 3393), Box(3393, 3393)), - Box(Box(3394, 3394), Box(3394, 3394)), - Box(Box(3395, 3395), Box(3395, 3395)), - Box(Box(3396, 3396), Box(3396, 3396)), - Box(Box(3397, 3397), Box(3397, 3397)), - Box(Box(3398, 3398), Box(3398, 3398)), - Box(Box(3399, 3399), Box(3399, 3399)), - Box(Box(3400, 3400), Box(3400, 3400)), - Box(Box(3401, 3401), Box(3401, 3401)), - Box(Box(3402, 3402), Box(3402, 3402)), - Box(Box(3403, 3403), Box(3403, 3403)), - Box(Box(3404, 3404), Box(3404, 3404)), - Box(Box(3405, 3405), Box(3405, 3405)), - Box(Box(3406, 3406), Box(3406, 3406)), - Box(Box(3407, 3407), Box(3407, 3407)), - Box(Box(3408, 3408), Box(3408, 3408)), - Box(Box(3409, 3409), Box(3409, 3409)), - Box(Box(3410, 3410), Box(3410, 3410)), - Box(Box(3411, 3411), Box(3411, 3411)), - Box(Box(3412, 3412), Box(3412, 3412)), - Box(Box(3413, 3413), Box(3413, 3413)), - Box(Box(3414, 3414), Box(3414, 3414)), - Box(Box(3415, 3415), Box(3415, 3415)), - Box(Box(3416, 3416), Box(3416, 3416)), - Box(Box(3417, 3417), Box(3417, 3417)), - Box(Box(3418, 3418), Box(3418, 3418)), - Box(Box(3419, 3419), Box(3419, 3419)), - Box(Box(3420, 3420), Box(3420, 3420)), - Box(Box(3421, 3421), Box(3421, 3421)), - Box(Box(3422, 3422), Box(3422, 3422)), - Box(Box(3423, 3423), Box(3423, 3423)), - Box(Box(3424, 3424), Box(3424, 3424)), - Box(Box(3425, 3425), Box(3425, 3425)), - Box(Box(3426, 3426), Box(3426, 3426)), - Box(Box(3427, 3427), Box(3427, 3427)), - Box(Box(3428, 3428), Box(3428, 3428)), - Box(Box(3429, 3429), Box(3429, 3429)), - Box(Box(3430, 3430), Box(3430, 3430)), - Box(Box(3431, 3431), Box(3431, 3431)), - Box(Box(3432, 3432), Box(3432, 3432)), - Box(Box(3433, 3433), Box(3433, 3433)), - Box(Box(3434, 3434), Box(3434, 3434)), - Box(Box(3435, 3435), Box(3435, 3435)), - Box(Box(3436, 3436), Box(3436, 3436)), - Box(Box(3437, 3437), Box(3437, 3437)), - Box(Box(3438, 3438), Box(3438, 3438)), - Box(Box(3439, 3439), Box(3439, 3439)), - Box(Box(3440, 3440), Box(3440, 3440)), - Box(Box(3441, 3441), Box(3441, 3441)), - Box(Box(3442, 3442), Box(3442, 3442)), - Box(Box(3443, 3443), Box(3443, 3443)), - Box(Box(3444, 3444), Box(3444, 3444)), - Box(Box(3445, 3445), Box(3445, 3445)), - Box(Box(3446, 3446), Box(3446, 3446)), - Box(Box(3447, 3447), Box(3447, 3447)), - Box(Box(3448, 3448), Box(3448, 3448)), - Box(Box(3449, 3449), Box(3449, 3449)), - Box(Box(3450, 3450), Box(3450, 3450)), - Box(Box(3451, 3451), Box(3451, 3451)), - Box(Box(3452, 3452), Box(3452, 3452)), - Box(Box(3453, 3453), Box(3453, 3453)), - Box(Box(3454, 3454), Box(3454, 3454)), - Box(Box(3455, 3455), Box(3455, 3455)), - Box(Box(3456, 3456), Box(3456, 3456)), - Box(Box(3457, 3457), Box(3457, 3457)), - Box(Box(3458, 3458), Box(3458, 3458)), - Box(Box(3459, 3459), Box(3459, 3459)), - Box(Box(3460, 3460), Box(3460, 3460)), - Box(Box(3461, 3461), Box(3461, 3461)), - Box(Box(3462, 3462), Box(3462, 3462)), - Box(Box(3463, 3463), Box(3463, 3463)), - Box(Box(3464, 3464), Box(3464, 3464)), - Box(Box(3465, 3465), Box(3465, 3465)), - Box(Box(3466, 3466), Box(3466, 3466)), - Box(Box(3467, 3467), Box(3467, 3467)), - Box(Box(3468, 3468), Box(3468, 3468)), - Box(Box(3469, 3469), Box(3469, 3469)), - Box(Box(3470, 3470), Box(3470, 3470)), - Box(Box(3471, 3471), Box(3471, 3471)), - Box(Box(3472, 3472), Box(3472, 3472)), - Box(Box(3473, 3473), Box(3473, 3473)), - Box(Box(3474, 3474), Box(3474, 3474)), - Box(Box(3475, 3475), Box(3475, 3475)), - Box(Box(3476, 3476), Box(3476, 3476)), - Box(Box(3477, 3477), Box(3477, 3477)), - Box(Box(3478, 3478), Box(3478, 3478)), - Box(Box(3479, 3479), Box(3479, 3479)), - Box(Box(3480, 3480), Box(3480, 3480)), - Box(Box(3481, 3481), Box(3481, 3481)), - Box(Box(3482, 3482), Box(3482, 3482)), - Box(Box(3483, 3483), Box(3483, 3483)), - Box(Box(3484, 3484), Box(3484, 3484)), - Box(Box(3485, 3485), Box(3485, 3485)), - Box(Box(3486, 3486), Box(3486, 3486)), - Box(Box(3487, 3487), Box(3487, 3487)), - Box(Box(3488, 3488), Box(3488, 3488)), - Box(Box(3489, 3489), Box(3489, 3489)), - Box(Box(3490, 3490), Box(3490, 3490)), - Box(Box(3491, 3491), Box(3491, 3491)), - Box(Box(3492, 3492), Box(3492, 3492)), - Box(Box(3493, 3493), Box(3493, 3493)), - Box(Box(3494, 3494), Box(3494, 3494)), - Box(Box(3495, 3495), Box(3495, 3495)), - Box(Box(3496, 3496), Box(3496, 3496)), - Box(Box(3497, 3497), Box(3497, 3497)), - Box(Box(3498, 3498), Box(3498, 3498)), - Box(Box(3499, 3499), Box(3499, 3499)), - Box(Box(3500, 3500), Box(3500, 3500)), - Box(Box(3501, 3501), Box(3501, 3501)), - Box(Box(3502, 3502), Box(3502, 3502)), - Box(Box(3503, 3503), Box(3503, 3503)), - Box(Box(3504, 3504), Box(3504, 3504)), - Box(Box(3505, 3505), Box(3505, 3505)), - Box(Box(3506, 3506), Box(3506, 3506)), - Box(Box(3507, 3507), Box(3507, 3507)), - Box(Box(3508, 3508), Box(3508, 3508)), - Box(Box(3509, 3509), Box(3509, 3509)), - Box(Box(3510, 3510), Box(3510, 3510)), - Box(Box(3511, 3511), Box(3511, 3511)), - Box(Box(3512, 3512), Box(3512, 3512)), - Box(Box(3513, 3513), Box(3513, 3513)), - Box(Box(3514, 3514), Box(3514, 3514)), - Box(Box(3515, 3515), Box(3515, 3515)), - Box(Box(3516, 3516), Box(3516, 3516)), - Box(Box(3517, 3517), Box(3517, 3517)), - Box(Box(3518, 3518), Box(3518, 3518)), - Box(Box(3519, 3519), Box(3519, 3519)), - Box(Box(3520, 3520), Box(3520, 3520)), - Box(Box(3521, 3521), Box(3521, 3521)), - Box(Box(3522, 3522), Box(3522, 3522)), - Box(Box(3523, 3523), Box(3523, 3523)), - Box(Box(3524, 3524), Box(3524, 3524)), - Box(Box(3525, 3525), Box(3525, 3525)), - Box(Box(3526, 3526), Box(3526, 3526)), - Box(Box(3527, 3527), Box(3527, 3527)), - Box(Box(3528, 3528), Box(3528, 3528)), - Box(Box(3529, 3529), Box(3529, 3529)), - Box(Box(3530, 3530), Box(3530, 3530)), - Box(Box(3531, 3531), Box(3531, 3531)), - Box(Box(3532, 3532), Box(3532, 3532)), - Box(Box(3533, 3533), Box(3533, 3533)), - Box(Box(3534, 3534), Box(3534, 3534)), - Box(Box(3535, 3535), Box(3535, 3535)), - Box(Box(3536, 3536), Box(3536, 3536)), - Box(Box(3537, 3537), Box(3537, 3537)), - Box(Box(3538, 3538), Box(3538, 3538)), - Box(Box(3539, 3539), Box(3539, 3539)), - Box(Box(3540, 3540), Box(3540, 3540)), - Box(Box(3541, 3541), Box(3541, 3541)), - Box(Box(3542, 3542), Box(3542, 3542)), - Box(Box(3543, 3543), Box(3543, 3543)), - Box(Box(3544, 3544), Box(3544, 3544)), - Box(Box(3545, 3545), Box(3545, 3545)), - Box(Box(3546, 3546), Box(3546, 3546)), - Box(Box(3547, 3547), Box(3547, 3547)), - Box(Box(3548, 3548), Box(3548, 3548)), - Box(Box(3549, 3549), Box(3549, 3549)), - Box(Box(3550, 3550), Box(3550, 3550)), - Box(Box(3551, 3551), Box(3551, 3551)), - Box(Box(3552, 3552), Box(3552, 3552)), - Box(Box(3553, 3553), Box(3553, 3553)), - Box(Box(3554, 3554), Box(3554, 3554)), - Box(Box(3555, 3555), Box(3555, 3555)), - Box(Box(3556, 3556), Box(3556, 3556)), - Box(Box(3557, 3557), Box(3557, 3557)), - Box(Box(3558, 3558), Box(3558, 3558)), - Box(Box(3559, 3559), Box(3559, 3559)), - Box(Box(3560, 3560), Box(3560, 3560)), - Box(Box(3561, 3561), Box(3561, 3561)), - Box(Box(3562, 3562), Box(3562, 3562)), - Box(Box(3563, 3563), Box(3563, 3563)), - Box(Box(3564, 3564), Box(3564, 3564)), - Box(Box(3565, 3565), Box(3565, 3565)), - Box(Box(3566, 3566), Box(3566, 3566)), - Box(Box(3567, 3567), Box(3567, 3567)), - Box(Box(3568, 3568), Box(3568, 3568)), - Box(Box(3569, 3569), Box(3569, 3569)), - Box(Box(3570, 3570), Box(3570, 3570)), - Box(Box(3571, 3571), Box(3571, 3571)), - Box(Box(3572, 3572), Box(3572, 3572)), - Box(Box(3573, 3573), Box(3573, 3573)), - Box(Box(3574, 3574), Box(3574, 3574)), - Box(Box(3575, 3575), Box(3575, 3575)), - Box(Box(3576, 3576), Box(3576, 3576)), - Box(Box(3577, 3577), Box(3577, 3577)), - Box(Box(3578, 3578), Box(3578, 3578)), - Box(Box(3579, 3579), Box(3579, 3579)), - Box(Box(3580, 3580), Box(3580, 3580)), - Box(Box(3581, 3581), Box(3581, 3581)), - Box(Box(3582, 3582), Box(3582, 3582)), - Box(Box(3583, 3583), Box(3583, 3583)), - Box(Box(3584, 3584), Box(3584, 3584)), - Box(Box(3585, 3585), Box(3585, 3585)), - Box(Box(3586, 3586), Box(3586, 3586)), - Box(Box(3587, 3587), Box(3587, 3587)), - Box(Box(3588, 3588), Box(3588, 3588)), - Box(Box(3589, 3589), Box(3589, 3589)), - Box(Box(3590, 3590), Box(3590, 3590)), - Box(Box(3591, 3591), Box(3591, 3591)), - Box(Box(3592, 3592), Box(3592, 3592)), - Box(Box(3593, 3593), Box(3593, 3593)), - Box(Box(3594, 3594), Box(3594, 3594)), - Box(Box(3595, 3595), Box(3595, 3595)), - Box(Box(3596, 3596), Box(3596, 3596)), - Box(Box(3597, 3597), Box(3597, 3597)), - Box(Box(3598, 3598), Box(3598, 3598)), - Box(Box(3599, 3599), Box(3599, 3599)), - Box(Box(3600, 3600), Box(3600, 3600)), - Box(Box(3601, 3601), Box(3601, 3601)), - Box(Box(3602, 3602), Box(3602, 3602)), - Box(Box(3603, 3603), Box(3603, 3603)), - Box(Box(3604, 3604), Box(3604, 3604)), - Box(Box(3605, 3605), Box(3605, 3605)), - Box(Box(3606, 3606), Box(3606, 3606)), - Box(Box(3607, 3607), Box(3607, 3607)), - Box(Box(3608, 3608), Box(3608, 3608)), - Box(Box(3609, 3609), Box(3609, 3609)), - Box(Box(3610, 3610), Box(3610, 3610)), - Box(Box(3611, 3611), Box(3611, 3611)), - Box(Box(3612, 3612), Box(3612, 3612)), - Box(Box(3613, 3613), Box(3613, 3613)), - Box(Box(3614, 3614), Box(3614, 3614)), - Box(Box(3615, 3615), Box(3615, 3615)), - Box(Box(3616, 3616), Box(3616, 3616)), - Box(Box(3617, 3617), Box(3617, 3617)), - Box(Box(3618, 3618), Box(3618, 3618)), - Box(Box(3619, 3619), Box(3619, 3619)), - Box(Box(3620, 3620), Box(3620, 3620)), - Box(Box(3621, 3621), Box(3621, 3621)), - Box(Box(3622, 3622), Box(3622, 3622)), - Box(Box(3623, 3623), Box(3623, 3623)), - Box(Box(3624, 3624), Box(3624, 3624)), - Box(Box(3625, 3625), Box(3625, 3625)), - Box(Box(3626, 3626), Box(3626, 3626)), - Box(Box(3627, 3627), Box(3627, 3627)), - Box(Box(3628, 3628), Box(3628, 3628)), - Box(Box(3629, 3629), Box(3629, 3629)), - Box(Box(3630, 3630), Box(3630, 3630)), - Box(Box(3631, 3631), Box(3631, 3631)), - Box(Box(3632, 3632), Box(3632, 3632)), - Box(Box(3633, 3633), Box(3633, 3633)), - Box(Box(3634, 3634), Box(3634, 3634)), - Box(Box(3635, 3635), Box(3635, 3635)), - Box(Box(3636, 3636), Box(3636, 3636)), - Box(Box(3637, 3637), Box(3637, 3637)), - Box(Box(3638, 3638), Box(3638, 3638)), - Box(Box(3639, 3639), Box(3639, 3639)), - Box(Box(3640, 3640), Box(3640, 3640)), - Box(Box(3641, 3641), Box(3641, 3641)), - Box(Box(3642, 3642), Box(3642, 3642)), - Box(Box(3643, 3643), Box(3643, 3643)), - Box(Box(3644, 3644), Box(3644, 3644)), - Box(Box(3645, 3645), Box(3645, 3645)), - Box(Box(3646, 3646), Box(3646, 3646)), - Box(Box(3647, 3647), Box(3647, 3647)), - Box(Box(3648, 3648), Box(3648, 3648)), - Box(Box(3649, 3649), Box(3649, 3649)), - Box(Box(3650, 3650), Box(3650, 3650)), - Box(Box(3651, 3651), Box(3651, 3651)), - Box(Box(3652, 3652), Box(3652, 3652)), - Box(Box(3653, 3653), Box(3653, 3653)), - Box(Box(3654, 3654), Box(3654, 3654)), - Box(Box(3655, 3655), Box(3655, 3655)), - Box(Box(3656, 3656), Box(3656, 3656)), - Box(Box(3657, 3657), Box(3657, 3657)), - Box(Box(3658, 3658), Box(3658, 3658)), - Box(Box(3659, 3659), Box(3659, 3659)), - Box(Box(3660, 3660), Box(3660, 3660)), - Box(Box(3661, 3661), Box(3661, 3661)), - Box(Box(3662, 3662), Box(3662, 3662)), - Box(Box(3663, 3663), Box(3663, 3663)), - Box(Box(3664, 3664), Box(3664, 3664)), - Box(Box(3665, 3665), Box(3665, 3665)), - Box(Box(3666, 3666), Box(3666, 3666)), - Box(Box(3667, 3667), Box(3667, 3667)), - Box(Box(3668, 3668), Box(3668, 3668)), - Box(Box(3669, 3669), Box(3669, 3669)), - Box(Box(3670, 3670), Box(3670, 3670)), - Box(Box(3671, 3671), Box(3671, 3671)), - Box(Box(3672, 3672), Box(3672, 3672)), - Box(Box(3673, 3673), Box(3673, 3673)), - Box(Box(3674, 3674), Box(3674, 3674)), - Box(Box(3675, 3675), Box(3675, 3675)), - Box(Box(3676, 3676), Box(3676, 3676)), - Box(Box(3677, 3677), Box(3677, 3677)), - Box(Box(3678, 3678), Box(3678, 3678)), - Box(Box(3679, 3679), Box(3679, 3679)), - Box(Box(3680, 3680), Box(3680, 3680)), - Box(Box(3681, 3681), Box(3681, 3681)), - Box(Box(3682, 3682), Box(3682, 3682)), - Box(Box(3683, 3683), Box(3683, 3683)), - Box(Box(3684, 3684), Box(3684, 3684)), - Box(Box(3685, 3685), Box(3685, 3685)), - Box(Box(3686, 3686), Box(3686, 3686)), - Box(Box(3687, 3687), Box(3687, 3687)), - Box(Box(3688, 3688), Box(3688, 3688)), - Box(Box(3689, 3689), Box(3689, 3689)), - Box(Box(3690, 3690), Box(3690, 3690)), - Box(Box(3691, 3691), Box(3691, 3691)), - Box(Box(3692, 3692), Box(3692, 3692)), - Box(Box(3693, 3693), Box(3693, 3693)), - Box(Box(3694, 3694), Box(3694, 3694)), - Box(Box(3695, 3695), Box(3695, 3695)), - Box(Box(3696, 3696), Box(3696, 3696)), - Box(Box(3697, 3697), Box(3697, 3697)), - Box(Box(3698, 3698), Box(3698, 3698)), - Box(Box(3699, 3699), Box(3699, 3699)), - Box(Box(3700, 3700), Box(3700, 3700)), - Box(Box(3701, 3701), Box(3701, 3701)), - Box(Box(3702, 3702), Box(3702, 3702)), - Box(Box(3703, 3703), Box(3703, 3703)), - Box(Box(3704, 3704), Box(3704, 3704)), - Box(Box(3705, 3705), Box(3705, 3705)), - Box(Box(3706, 3706), Box(3706, 3706)), - Box(Box(3707, 3707), Box(3707, 3707)), - Box(Box(3708, 3708), Box(3708, 3708)), - Box(Box(3709, 3709), Box(3709, 3709)), - Box(Box(3710, 3710), Box(3710, 3710)), - Box(Box(3711, 3711), Box(3711, 3711)), - Box(Box(3712, 3712), Box(3712, 3712)), - Box(Box(3713, 3713), Box(3713, 3713)), - Box(Box(3714, 3714), Box(3714, 3714)), - Box(Box(3715, 3715), Box(3715, 3715)), - Box(Box(3716, 3716), Box(3716, 3716)), - Box(Box(3717, 3717), Box(3717, 3717)), - Box(Box(3718, 3718), Box(3718, 3718)), - Box(Box(3719, 3719), Box(3719, 3719)), - Box(Box(3720, 3720), Box(3720, 3720)), - Box(Box(3721, 3721), Box(3721, 3721)), - Box(Box(3722, 3722), Box(3722, 3722)), - Box(Box(3723, 3723), Box(3723, 3723)), - Box(Box(3724, 3724), Box(3724, 3724)), - Box(Box(3725, 3725), Box(3725, 3725)), - Box(Box(3726, 3726), Box(3726, 3726)), - Box(Box(3727, 3727), Box(3727, 3727)), - Box(Box(3728, 3728), Box(3728, 3728)), - Box(Box(3729, 3729), Box(3729, 3729)), - Box(Box(3730, 3730), Box(3730, 3730)), - Box(Box(3731, 3731), Box(3731, 3731)), - Box(Box(3732, 3732), Box(3732, 3732)), - Box(Box(3733, 3733), Box(3733, 3733)), - Box(Box(3734, 3734), Box(3734, 3734)), - Box(Box(3735, 3735), Box(3735, 3735)), - Box(Box(3736, 3736), Box(3736, 3736)), - Box(Box(3737, 3737), Box(3737, 3737)), - Box(Box(3738, 3738), Box(3738, 3738)), - Box(Box(3739, 3739), Box(3739, 3739)), - Box(Box(3740, 3740), Box(3740, 3740)), - Box(Box(3741, 3741), Box(3741, 3741)), - Box(Box(3742, 3742), Box(3742, 3742)), - Box(Box(3743, 3743), Box(3743, 3743)), - Box(Box(3744, 3744), Box(3744, 3744)), - Box(Box(3745, 3745), Box(3745, 3745)), - Box(Box(3746, 3746), Box(3746, 3746)), - Box(Box(3747, 3747), Box(3747, 3747)), - Box(Box(3748, 3748), Box(3748, 3748)), - Box(Box(3749, 3749), Box(3749, 3749)), - Box(Box(3750, 3750), Box(3750, 3750)), - Box(Box(3751, 3751), Box(3751, 3751)), - Box(Box(3752, 3752), Box(3752, 3752)), - Box(Box(3753, 3753), Box(3753, 3753)), - Box(Box(3754, 3754), Box(3754, 3754)), - Box(Box(3755, 3755), Box(3755, 3755)), - Box(Box(3756, 3756), Box(3756, 3756)), - Box(Box(3757, 3757), Box(3757, 3757)), - Box(Box(3758, 3758), Box(3758, 3758)), - Box(Box(3759, 3759), Box(3759, 3759)), - Box(Box(3760, 3760), Box(3760, 3760)), - Box(Box(3761, 3761), Box(3761, 3761)), - Box(Box(3762, 3762), Box(3762, 3762)), - Box(Box(3763, 3763), Box(3763, 3763)), - Box(Box(3764, 3764), Box(3764, 3764)), - Box(Box(3765, 3765), Box(3765, 3765)), - Box(Box(3766, 3766), Box(3766, 3766)), - Box(Box(3767, 3767), Box(3767, 3767)), - Box(Box(3768, 3768), Box(3768, 3768)), - Box(Box(3769, 3769), Box(3769, 3769)), - Box(Box(3770, 3770), Box(3770, 3770)), - Box(Box(3771, 3771), Box(3771, 3771)), - Box(Box(3772, 3772), Box(3772, 3772)), - Box(Box(3773, 3773), Box(3773, 3773)), - Box(Box(3774, 3774), Box(3774, 3774)), - Box(Box(3775, 3775), Box(3775, 3775)), - Box(Box(3776, 3776), Box(3776, 3776)), - Box(Box(3777, 3777), Box(3777, 3777)), - Box(Box(3778, 3778), Box(3778, 3778)), - Box(Box(3779, 3779), Box(3779, 3779)), - Box(Box(3780, 3780), Box(3780, 3780)), - Box(Box(3781, 3781), Box(3781, 3781)), - Box(Box(3782, 3782), Box(3782, 3782)), - Box(Box(3783, 3783), Box(3783, 3783)), - Box(Box(3784, 3784), Box(3784, 3784)), - Box(Box(3785, 3785), Box(3785, 3785)), - Box(Box(3786, 3786), Box(3786, 3786)), - Box(Box(3787, 3787), Box(3787, 3787)), - Box(Box(3788, 3788), Box(3788, 3788)), - Box(Box(3789, 3789), Box(3789, 3789)), - Box(Box(3790, 3790), Box(3790, 3790)), - Box(Box(3791, 3791), Box(3791, 3791)), - Box(Box(3792, 3792), Box(3792, 3792)), - Box(Box(3793, 3793), Box(3793, 3793)), - Box(Box(3794, 3794), Box(3794, 3794)), - Box(Box(3795, 3795), Box(3795, 3795)), - Box(Box(3796, 3796), Box(3796, 3796)), - Box(Box(3797, 3797), Box(3797, 3797)), - Box(Box(3798, 3798), Box(3798, 3798)), - Box(Box(3799, 3799), Box(3799, 3799)), - Box(Box(3800, 3800), Box(3800, 3800)), - Box(Box(3801, 3801), Box(3801, 3801)), - Box(Box(3802, 3802), Box(3802, 3802)), - Box(Box(3803, 3803), Box(3803, 3803)), - Box(Box(3804, 3804), Box(3804, 3804)), - Box(Box(3805, 3805), Box(3805, 3805)), - Box(Box(3806, 3806), Box(3806, 3806)), - Box(Box(3807, 3807), Box(3807, 3807)), - Box(Box(3808, 3808), Box(3808, 3808)), - Box(Box(3809, 3809), Box(3809, 3809)), - Box(Box(3810, 3810), Box(3810, 3810)), - Box(Box(3811, 3811), Box(3811, 3811)), - Box(Box(3812, 3812), Box(3812, 3812)), - Box(Box(3813, 3813), Box(3813, 3813)), - Box(Box(3814, 3814), Box(3814, 3814)), - Box(Box(3815, 3815), Box(3815, 3815)), - Box(Box(3816, 3816), Box(3816, 3816)), - Box(Box(3817, 3817), Box(3817, 3817)), - Box(Box(3818, 3818), Box(3818, 3818)), - Box(Box(3819, 3819), Box(3819, 3819)), - Box(Box(3820, 3820), Box(3820, 3820)), - Box(Box(3821, 3821), Box(3821, 3821)), - Box(Box(3822, 3822), Box(3822, 3822)), - Box(Box(3823, 3823), Box(3823, 3823)), - Box(Box(3824, 3824), Box(3824, 3824)), - Box(Box(3825, 3825), Box(3825, 3825)), - Box(Box(3826, 3826), Box(3826, 3826)), - Box(Box(3827, 3827), Box(3827, 3827)), - Box(Box(3828, 3828), Box(3828, 3828)), - Box(Box(3829, 3829), Box(3829, 3829)), - Box(Box(3830, 3830), Box(3830, 3830)), - Box(Box(3831, 3831), Box(3831, 3831)), - Box(Box(3832, 3832), Box(3832, 3832)), - Box(Box(3833, 3833), Box(3833, 3833)), - Box(Box(3834, 3834), Box(3834, 3834)), - Box(Box(3835, 3835), Box(3835, 3835)), - Box(Box(3836, 3836), Box(3836, 3836)), - Box(Box(3837, 3837), Box(3837, 3837)), - Box(Box(3838, 3838), Box(3838, 3838)), - Box(Box(3839, 3839), Box(3839, 3839)), - Box(Box(3840, 3840), Box(3840, 3840)), - Box(Box(3841, 3841), Box(3841, 3841)), - Box(Box(3842, 3842), Box(3842, 3842)), - Box(Box(3843, 3843), Box(3843, 3843)), - Box(Box(3844, 3844), Box(3844, 3844)), - Box(Box(3845, 3845), Box(3845, 3845)), - Box(Box(3846, 3846), Box(3846, 3846)), - Box(Box(3847, 3847), Box(3847, 3847)), - Box(Box(3848, 3848), Box(3848, 3848)), - Box(Box(3849, 3849), Box(3849, 3849)), - Box(Box(3850, 3850), Box(3850, 3850)), - Box(Box(3851, 3851), Box(3851, 3851)), - Box(Box(3852, 3852), Box(3852, 3852)), - Box(Box(3853, 3853), Box(3853, 3853)), - Box(Box(3854, 3854), Box(3854, 3854)), - Box(Box(3855, 3855), Box(3855, 3855)), - Box(Box(3856, 3856), Box(3856, 3856)), - Box(Box(3857, 3857), Box(3857, 3857)), - Box(Box(3858, 3858), Box(3858, 3858)), - Box(Box(3859, 3859), Box(3859, 3859)), - Box(Box(3860, 3860), Box(3860, 3860)), - Box(Box(3861, 3861), Box(3861, 3861)), - Box(Box(3862, 3862), Box(3862, 3862)), - Box(Box(3863, 3863), Box(3863, 3863)), - Box(Box(3864, 3864), Box(3864, 3864)), - Box(Box(3865, 3865), Box(3865, 3865)), - Box(Box(3866, 3866), Box(3866, 3866)), - Box(Box(3867, 3867), Box(3867, 3867)), - Box(Box(3868, 3868), Box(3868, 3868)), - Box(Box(3869, 3869), Box(3869, 3869)), - Box(Box(3870, 3870), Box(3870, 3870)), - Box(Box(3871, 3871), Box(3871, 3871)), - Box(Box(3872, 3872), Box(3872, 3872)), - Box(Box(3873, 3873), Box(3873, 3873)), - Box(Box(3874, 3874), Box(3874, 3874)), - Box(Box(3875, 3875), Box(3875, 3875)), - Box(Box(3876, 3876), Box(3876, 3876)), - Box(Box(3877, 3877), Box(3877, 3877)), - Box(Box(3878, 3878), Box(3878, 3878)), - Box(Box(3879, 3879), Box(3879, 3879)), - Box(Box(3880, 3880), Box(3880, 3880)), - Box(Box(3881, 3881), Box(3881, 3881)), - Box(Box(3882, 3882), Box(3882, 3882)), - Box(Box(3883, 3883), Box(3883, 3883)), - Box(Box(3884, 3884), Box(3884, 3884)), - Box(Box(3885, 3885), Box(3885, 3885)), - Box(Box(3886, 3886), Box(3886, 3886)), - Box(Box(3887, 3887), Box(3887, 3887)), - Box(Box(3888, 3888), Box(3888, 3888)), - Box(Box(3889, 3889), Box(3889, 3889)), - Box(Box(3890, 3890), Box(3890, 3890)), - Box(Box(3891, 3891), Box(3891, 3891)), - Box(Box(3892, 3892), Box(3892, 3892)), - Box(Box(3893, 3893), Box(3893, 3893)), - Box(Box(3894, 3894), Box(3894, 3894)), - Box(Box(3895, 3895), Box(3895, 3895)), - Box(Box(3896, 3896), Box(3896, 3896)), - Box(Box(3897, 3897), Box(3897, 3897)), - Box(Box(3898, 3898), Box(3898, 3898)), - Box(Box(3899, 3899), Box(3899, 3899)), - Box(Box(3900, 3900), Box(3900, 3900)), - Box(Box(3901, 3901), Box(3901, 3901)), - Box(Box(3902, 3902), Box(3902, 3902)), - Box(Box(3903, 3903), Box(3903, 3903)), - Box(Box(3904, 3904), Box(3904, 3904)), - Box(Box(3905, 3905), Box(3905, 3905)), - Box(Box(3906, 3906), Box(3906, 3906)), - Box(Box(3907, 3907), Box(3907, 3907)), - Box(Box(3908, 3908), Box(3908, 3908)), - Box(Box(3909, 3909), Box(3909, 3909)), - Box(Box(3910, 3910), Box(3910, 3910)), - Box(Box(3911, 3911), Box(3911, 3911)), - Box(Box(3912, 3912), Box(3912, 3912)), - Box(Box(3913, 3913), Box(3913, 3913)), - Box(Box(3914, 3914), Box(3914, 3914)), - Box(Box(3915, 3915), Box(3915, 3915)), - Box(Box(3916, 3916), Box(3916, 3916)), - Box(Box(3917, 3917), Box(3917, 3917)), - Box(Box(3918, 3918), Box(3918, 3918)), - Box(Box(3919, 3919), Box(3919, 3919)), - Box(Box(3920, 3920), Box(3920, 3920)), - Box(Box(3921, 3921), Box(3921, 3921)), - Box(Box(3922, 3922), Box(3922, 3922)), - Box(Box(3923, 3923), Box(3923, 3923)), - Box(Box(3924, 3924), Box(3924, 3924)), - Box(Box(3925, 3925), Box(3925, 3925)), - Box(Box(3926, 3926), Box(3926, 3926)), - Box(Box(3927, 3927), Box(3927, 3927)), - Box(Box(3928, 3928), Box(3928, 3928)), - Box(Box(3929, 3929), Box(3929, 3929)), - Box(Box(3930, 3930), Box(3930, 3930)), - Box(Box(3931, 3931), Box(3931, 3931)), - Box(Box(3932, 3932), Box(3932, 3932)), - Box(Box(3933, 3933), Box(3933, 3933)), - Box(Box(3934, 3934), Box(3934, 3934)), - Box(Box(3935, 3935), Box(3935, 3935)), - Box(Box(3936, 3936), Box(3936, 3936)), - Box(Box(3937, 3937), Box(3937, 3937)), - Box(Box(3938, 3938), Box(3938, 3938)), - Box(Box(3939, 3939), Box(3939, 3939)), - Box(Box(3940, 3940), Box(3940, 3940)), - Box(Box(3941, 3941), Box(3941, 3941)), - Box(Box(3942, 3942), Box(3942, 3942)), - Box(Box(3943, 3943), Box(3943, 3943)), - Box(Box(3944, 3944), Box(3944, 3944)), - Box(Box(3945, 3945), Box(3945, 3945)), - Box(Box(3946, 3946), Box(3946, 3946)), - Box(Box(3947, 3947), Box(3947, 3947)), - Box(Box(3948, 3948), Box(3948, 3948)), - Box(Box(3949, 3949), Box(3949, 3949)), - Box(Box(3950, 3950), Box(3950, 3950)), - Box(Box(3951, 3951), Box(3951, 3951)), - Box(Box(3952, 3952), Box(3952, 3952)), - Box(Box(3953, 3953), Box(3953, 3953)), - Box(Box(3954, 3954), Box(3954, 3954)), - Box(Box(3955, 3955), Box(3955, 3955)), - Box(Box(3956, 3956), Box(3956, 3956)), - Box(Box(3957, 3957), Box(3957, 3957)), - Box(Box(3958, 3958), Box(3958, 3958)), - Box(Box(3959, 3959), Box(3959, 3959)), - Box(Box(3960, 3960), Box(3960, 3960)), - Box(Box(3961, 3961), Box(3961, 3961)), - Box(Box(3962, 3962), Box(3962, 3962)), - Box(Box(3963, 3963), Box(3963, 3963)), - Box(Box(3964, 3964), Box(3964, 3964)), - Box(Box(3965, 3965), Box(3965, 3965)), - Box(Box(3966, 3966), Box(3966, 3966)), - Box(Box(3967, 3967), Box(3967, 3967)), - Box(Box(3968, 3968), Box(3968, 3968)), - Box(Box(3969, 3969), Box(3969, 3969)), - Box(Box(3970, 3970), Box(3970, 3970)), - Box(Box(3971, 3971), Box(3971, 3971)), - Box(Box(3972, 3972), Box(3972, 3972)), - Box(Box(3973, 3973), Box(3973, 3973)), - Box(Box(3974, 3974), Box(3974, 3974)), - Box(Box(3975, 3975), Box(3975, 3975)), - Box(Box(3976, 3976), Box(3976, 3976)), - Box(Box(3977, 3977), Box(3977, 3977)), - Box(Box(3978, 3978), Box(3978, 3978)), - Box(Box(3979, 3979), Box(3979, 3979)), - Box(Box(3980, 3980), Box(3980, 3980)), - Box(Box(3981, 3981), Box(3981, 3981)), - Box(Box(3982, 3982), Box(3982, 3982)), - Box(Box(3983, 3983), Box(3983, 3983)), - Box(Box(3984, 3984), Box(3984, 3984)), - Box(Box(3985, 3985), Box(3985, 3985)), - Box(Box(3986, 3986), Box(3986, 3986)), - Box(Box(3987, 3987), Box(3987, 3987)), - Box(Box(3988, 3988), Box(3988, 3988)), - Box(Box(3989, 3989), Box(3989, 3989)), - Box(Box(3990, 3990), Box(3990, 3990)), - Box(Box(3991, 3991), Box(3991, 3991)), - Box(Box(3992, 3992), Box(3992, 3992)), - Box(Box(3993, 3993), Box(3993, 3993)), - Box(Box(3994, 3994), Box(3994, 3994)), - Box(Box(3995, 3995), Box(3995, 3995)), - Box(Box(3996, 3996), Box(3996, 3996)), - Box(Box(3997, 3997), Box(3997, 3997)), - Box(Box(3998, 3998), Box(3998, 3998)), - Box(Box(3999, 3999), Box(3999, 3999)), - Box(Box(4000, 4000), Box(4000, 4000)), - Box(Box(4001, 4001), Box(4001, 4001)), - Box(Box(4002, 4002), Box(4002, 4002)), - Box(Box(4003, 4003), Box(4003, 4003)), - Box(Box(4004, 4004), Box(4004, 4004)), - Box(Box(4005, 4005), Box(4005, 4005)), - Box(Box(4006, 4006), Box(4006, 4006)), - Box(Box(4007, 4007), Box(4007, 4007)), - Box(Box(4008, 4008), Box(4008, 4008)), - Box(Box(4009, 4009), Box(4009, 4009)), - Box(Box(4010, 4010), Box(4010, 4010)), - Box(Box(4011, 4011), Box(4011, 4011)), - Box(Box(4012, 4012), Box(4012, 4012)), - Box(Box(4013, 4013), Box(4013, 4013)), - Box(Box(4014, 4014), Box(4014, 4014)), - Box(Box(4015, 4015), Box(4015, 4015)), - Box(Box(4016, 4016), Box(4016, 4016)), - Box(Box(4017, 4017), Box(4017, 4017)), - Box(Box(4018, 4018), Box(4018, 4018)), - Box(Box(4019, 4019), Box(4019, 4019)), - Box(Box(4020, 4020), Box(4020, 4020)), - Box(Box(4021, 4021), Box(4021, 4021)), - Box(Box(4022, 4022), Box(4022, 4022)), - Box(Box(4023, 4023), Box(4023, 4023)), - Box(Box(4024, 4024), Box(4024, 4024)), - Box(Box(4025, 4025), Box(4025, 4025)), - Box(Box(4026, 4026), Box(4026, 4026)), - Box(Box(4027, 4027), Box(4027, 4027)), - Box(Box(4028, 4028), Box(4028, 4028)), - Box(Box(4029, 4029), Box(4029, 4029)), - Box(Box(4030, 4030), Box(4030, 4030)), - Box(Box(4031, 4031), Box(4031, 4031)), - Box(Box(4032, 4032), Box(4032, 4032)), - Box(Box(4033, 4033), Box(4033, 4033)), - Box(Box(4034, 4034), Box(4034, 4034)), - Box(Box(4035, 4035), Box(4035, 4035)), - Box(Box(4036, 4036), Box(4036, 4036)), - Box(Box(4037, 4037), Box(4037, 4037)), - Box(Box(4038, 4038), Box(4038, 4038)), - Box(Box(4039, 4039), Box(4039, 4039)), - Box(Box(4040, 4040), Box(4040, 4040)), - Box(Box(4041, 4041), Box(4041, 4041)), - Box(Box(4042, 4042), Box(4042, 4042)), - Box(Box(4043, 4043), Box(4043, 4043)), - Box(Box(4044, 4044), Box(4044, 4044)), - Box(Box(4045, 4045), Box(4045, 4045)), - Box(Box(4046, 4046), Box(4046, 4046)), - Box(Box(4047, 4047), Box(4047, 4047)), - Box(Box(4048, 4048), Box(4048, 4048)), - Box(Box(4049, 4049), Box(4049, 4049)), - Box(Box(4050, 4050), Box(4050, 4050)), - Box(Box(4051, 4051), Box(4051, 4051)), - Box(Box(4052, 4052), Box(4052, 4052)), - Box(Box(4053, 4053), Box(4053, 4053)), - Box(Box(4054, 4054), Box(4054, 4054)), - Box(Box(4055, 4055), Box(4055, 4055)), - Box(Box(4056, 4056), Box(4056, 4056)), - Box(Box(4057, 4057), Box(4057, 4057)), - Box(Box(4058, 4058), Box(4058, 4058)), - Box(Box(4059, 4059), Box(4059, 4059)), - Box(Box(4060, 4060), Box(4060, 4060)), - Box(Box(4061, 4061), Box(4061, 4061)), - Box(Box(4062, 4062), Box(4062, 4062)), - Box(Box(4063, 4063), Box(4063, 4063)), - Box(Box(4064, 4064), Box(4064, 4064)), - Box(Box(4065, 4065), Box(4065, 4065)), - Box(Box(4066, 4066), Box(4066, 4066)), - Box(Box(4067, 4067), Box(4067, 4067)), - Box(Box(4068, 4068), Box(4068, 4068)), - Box(Box(4069, 4069), Box(4069, 4069)), - Box(Box(4070, 4070), Box(4070, 4070)), - Box(Box(4071, 4071), Box(4071, 4071)), - Box(Box(4072, 4072), Box(4072, 4072)), - Box(Box(4073, 4073), Box(4073, 4073)), - Box(Box(4074, 4074), Box(4074, 4074)), - Box(Box(4075, 4075), Box(4075, 4075)), - Box(Box(4076, 4076), Box(4076, 4076)), - Box(Box(4077, 4077), Box(4077, 4077)), - Box(Box(4078, 4078), Box(4078, 4078)), - Box(Box(4079, 4079), Box(4079, 4079)), - Box(Box(4080, 4080), Box(4080, 4080)), - Box(Box(4081, 4081), Box(4081, 4081)), - Box(Box(4082, 4082), Box(4082, 4082)), - Box(Box(4083, 4083), Box(4083, 4083)), - Box(Box(4084, 4084), Box(4084, 4084)), - Box(Box(4085, 4085), Box(4085, 4085)), - Box(Box(4086, 4086), Box(4086, 4086)), - Box(Box(4087, 4087), Box(4087, 4087)), - Box(Box(4088, 4088), Box(4088, 4088)), - Box(Box(4089, 4089), Box(4089, 4089)), - Box(Box(4090, 4090), Box(4090, 4090)), - Box(Box(4091, 4091), Box(4091, 4091)), - Box(Box(4092, 4092), Box(4092, 4092)), - Box(Box(4093, 4093), Box(4093, 4093)), - Box(Box(4094, 4094), Box(4094, 4094)), - Box(Box(4095, 4095), Box(4095, 4095)), - Box(Box(4096, 4096), Box(4096, 4096)), - Box(Box(4097, 4097), Box(4097, 4097)), - Box(Box(4098, 4098), Box(4098, 4098)), - Box(Box(4099, 4099), Box(4099, 4099)), - Box(Box(4100, 4100), Box(4100, 4100)), - Box(Box(4101, 4101), Box(4101, 4101)), - Box(Box(4102, 4102), Box(4102, 4102)), - Box(Box(4103, 4103), Box(4103, 4103)), - Box(Box(4104, 4104), Box(4104, 4104)), - Box(Box(4105, 4105), Box(4105, 4105)), - Box(Box(4106, 4106), Box(4106, 4106)), - Box(Box(4107, 4107), Box(4107, 4107)), - Box(Box(4108, 4108), Box(4108, 4108)), - Box(Box(4109, 4109), Box(4109, 4109)), - Box(Box(4110, 4110), Box(4110, 4110)), - Box(Box(4111, 4111), Box(4111, 4111)), - Box(Box(4112, 4112), Box(4112, 4112)), - Box(Box(4113, 4113), Box(4113, 4113)), - Box(Box(4114, 4114), Box(4114, 4114)), - Box(Box(4115, 4115), Box(4115, 4115)), - Box(Box(4116, 4116), Box(4116, 4116)), - Box(Box(4117, 4117), Box(4117, 4117)), - Box(Box(4118, 4118), Box(4118, 4118)), - Box(Box(4119, 4119), Box(4119, 4119)), - Box(Box(4120, 4120), Box(4120, 4120)), - Box(Box(4121, 4121), Box(4121, 4121)), - Box(Box(4122, 4122), Box(4122, 4122)), - Box(Box(4123, 4123), Box(4123, 4123)), - Box(Box(4124, 4124), Box(4124, 4124)), - Box(Box(4125, 4125), Box(4125, 4125)), - Box(Box(4126, 4126), Box(4126, 4126)), - Box(Box(4127, 4127), Box(4127, 4127)), - Box(Box(4128, 4128), Box(4128, 4128)), - Box(Box(4129, 4129), Box(4129, 4129)), - Box(Box(4130, 4130), Box(4130, 4130)), - Box(Box(4131, 4131), Box(4131, 4131)), - Box(Box(4132, 4132), Box(4132, 4132)), - Box(Box(4133, 4133), Box(4133, 4133)), - Box(Box(4134, 4134), Box(4134, 4134)), - Box(Box(4135, 4135), Box(4135, 4135)), - Box(Box(4136, 4136), Box(4136, 4136)), - Box(Box(4137, 4137), Box(4137, 4137)), - Box(Box(4138, 4138), Box(4138, 4138)), - Box(Box(4139, 4139), Box(4139, 4139)), - Box(Box(4140, 4140), Box(4140, 4140)), - Box(Box(4141, 4141), Box(4141, 4141)), - Box(Box(4142, 4142), Box(4142, 4142)), - Box(Box(4143, 4143), Box(4143, 4143)), - Box(Box(4144, 4144), Box(4144, 4144)), - Box(Box(4145, 4145), Box(4145, 4145)), - Box(Box(4146, 4146), Box(4146, 4146)), - Box(Box(4147, 4147), Box(4147, 4147)), - Box(Box(4148, 4148), Box(4148, 4148)), - Box(Box(4149, 4149), Box(4149, 4149)), - Box(Box(4150, 4150), Box(4150, 4150)), - Box(Box(4151, 4151), Box(4151, 4151)), - Box(Box(4152, 4152), Box(4152, 4152)), - Box(Box(4153, 4153), Box(4153, 4153)), - Box(Box(4154, 4154), Box(4154, 4154)), - Box(Box(4155, 4155), Box(4155, 4155)), - Box(Box(4156, 4156), Box(4156, 4156)), - Box(Box(4157, 4157), Box(4157, 4157)), - Box(Box(4158, 4158), Box(4158, 4158)), - Box(Box(4159, 4159), Box(4159, 4159)), - Box(Box(4160, 4160), Box(4160, 4160)), - Box(Box(4161, 4161), Box(4161, 4161)), - Box(Box(4162, 4162), Box(4162, 4162)), - Box(Box(4163, 4163), Box(4163, 4163)), - Box(Box(4164, 4164), Box(4164, 4164)), - Box(Box(4165, 4165), Box(4165, 4165)), - Box(Box(4166, 4166), Box(4166, 4166)), - Box(Box(4167, 4167), Box(4167, 4167)), - Box(Box(4168, 4168), Box(4168, 4168)), - Box(Box(4169, 4169), Box(4169, 4169)), - Box(Box(4170, 4170), Box(4170, 4170)), - Box(Box(4171, 4171), Box(4171, 4171)), - Box(Box(4172, 4172), Box(4172, 4172)), - Box(Box(4173, 4173), Box(4173, 4173)), - Box(Box(4174, 4174), Box(4174, 4174)), - Box(Box(4175, 4175), Box(4175, 4175)), - Box(Box(4176, 4176), Box(4176, 4176)), - Box(Box(4177, 4177), Box(4177, 4177)), - Box(Box(4178, 4178), Box(4178, 4178)), - Box(Box(4179, 4179), Box(4179, 4179)), - Box(Box(4180, 4180), Box(4180, 4180)), - Box(Box(4181, 4181), Box(4181, 4181)), - Box(Box(4182, 4182), Box(4182, 4182)), - Box(Box(4183, 4183), Box(4183, 4183)), - Box(Box(4184, 4184), Box(4184, 4184)), - Box(Box(4185, 4185), Box(4185, 4185)), - Box(Box(4186, 4186), Box(4186, 4186)), - Box(Box(4187, 4187), Box(4187, 4187)), - Box(Box(4188, 4188), Box(4188, 4188)), - Box(Box(4189, 4189), Box(4189, 4189)), - Box(Box(4190, 4190), Box(4190, 4190)), - Box(Box(4191, 4191), Box(4191, 4191)), - Box(Box(4192, 4192), Box(4192, 4192)), - Box(Box(4193, 4193), Box(4193, 4193)), - Box(Box(4194, 4194), Box(4194, 4194)), - Box(Box(4195, 4195), Box(4195, 4195)), - Box(Box(4196, 4196), Box(4196, 4196)), - Box(Box(4197, 4197), Box(4197, 4197)), - Box(Box(4198, 4198), Box(4198, 4198)), - Box(Box(4199, 4199), Box(4199, 4199)), - Box(Box(4200, 4200), Box(4200, 4200)), - Box(Box(4201, 4201), Box(4201, 4201)), - Box(Box(4202, 4202), Box(4202, 4202)), - Box(Box(4203, 4203), Box(4203, 4203)), - Box(Box(4204, 4204), Box(4204, 4204)), - Box(Box(4205, 4205), Box(4205, 4205)), - Box(Box(4206, 4206), Box(4206, 4206)), - Box(Box(4207, 4207), Box(4207, 4207)), - Box(Box(4208, 4208), Box(4208, 4208)), - Box(Box(4209, 4209), Box(4209, 4209)), - Box(Box(4210, 4210), Box(4210, 4210)), - Box(Box(4211, 4211), Box(4211, 4211)), - Box(Box(4212, 4212), Box(4212, 4212)), - Box(Box(4213, 4213), Box(4213, 4213)), - Box(Box(4214, 4214), Box(4214, 4214)), - Box(Box(4215, 4215), Box(4215, 4215)), - Box(Box(4216, 4216), Box(4216, 4216)), - Box(Box(4217, 4217), Box(4217, 4217)), - Box(Box(4218, 4218), Box(4218, 4218)), - Box(Box(4219, 4219), Box(4219, 4219)), - Box(Box(4220, 4220), Box(4220, 4220)), - Box(Box(4221, 4221), Box(4221, 4221)), - Box(Box(4222, 4222), Box(4222, 4222)), - Box(Box(4223, 4223), Box(4223, 4223)), - Box(Box(4224, 4224), Box(4224, 4224)), - Box(Box(4225, 4225), Box(4225, 4225)), - Box(Box(4226, 4226), Box(4226, 4226)), - Box(Box(4227, 4227), Box(4227, 4227)), - Box(Box(4228, 4228), Box(4228, 4228)), - Box(Box(4229, 4229), Box(4229, 4229)), - Box(Box(4230, 4230), Box(4230, 4230)), - Box(Box(4231, 4231), Box(4231, 4231)), - Box(Box(4232, 4232), Box(4232, 4232)), - Box(Box(4233, 4233), Box(4233, 4233)), - Box(Box(4234, 4234), Box(4234, 4234)), - Box(Box(4235, 4235), Box(4235, 4235)), - Box(Box(4236, 4236), Box(4236, 4236)), - Box(Box(4237, 4237), Box(4237, 4237)), - Box(Box(4238, 4238), Box(4238, 4238)), - Box(Box(4239, 4239), Box(4239, 4239)), - Box(Box(4240, 4240), Box(4240, 4240)), - Box(Box(4241, 4241), Box(4241, 4241)), - Box(Box(4242, 4242), Box(4242, 4242)), - Box(Box(4243, 4243), Box(4243, 4243)), - Box(Box(4244, 4244), Box(4244, 4244)), - Box(Box(4245, 4245), Box(4245, 4245)), - Box(Box(4246, 4246), Box(4246, 4246)), - Box(Box(4247, 4247), Box(4247, 4247)), - Box(Box(4248, 4248), Box(4248, 4248)), - Box(Box(4249, 4249), Box(4249, 4249)), - Box(Box(4250, 4250), Box(4250, 4250)), - Box(Box(4251, 4251), Box(4251, 4251)), - Box(Box(4252, 4252), Box(4252, 4252)), - Box(Box(4253, 4253), Box(4253, 4253)), - Box(Box(4254, 4254), Box(4254, 4254)), - Box(Box(4255, 4255), Box(4255, 4255)), - Box(Box(4256, 4256), Box(4256, 4256)), - Box(Box(4257, 4257), Box(4257, 4257)), - Box(Box(4258, 4258), Box(4258, 4258)), - Box(Box(4259, 4259), Box(4259, 4259)), - Box(Box(4260, 4260), Box(4260, 4260)), - Box(Box(4261, 4261), Box(4261, 4261)), - Box(Box(4262, 4262), Box(4262, 4262)), - Box(Box(4263, 4263), Box(4263, 4263)), - Box(Box(4264, 4264), Box(4264, 4264)), - Box(Box(4265, 4265), Box(4265, 4265)), - Box(Box(4266, 4266), Box(4266, 4266)), - Box(Box(4267, 4267), Box(4267, 4267)), - Box(Box(4268, 4268), Box(4268, 4268)), - Box(Box(4269, 4269), Box(4269, 4269)), - Box(Box(4270, 4270), Box(4270, 4270)), - Box(Box(4271, 4271), Box(4271, 4271)), - Box(Box(4272, 4272), Box(4272, 4272)), - Box(Box(4273, 4273), Box(4273, 4273)), - Box(Box(4274, 4274), Box(4274, 4274)), - Box(Box(4275, 4275), Box(4275, 4275)), - Box(Box(4276, 4276), Box(4276, 4276)), - Box(Box(4277, 4277), Box(4277, 4277)), - Box(Box(4278, 4278), Box(4278, 4278)), - Box(Box(4279, 4279), Box(4279, 4279)), - Box(Box(4280, 4280), Box(4280, 4280)), - Box(Box(4281, 4281), Box(4281, 4281)), - Box(Box(4282, 4282), Box(4282, 4282)), - Box(Box(4283, 4283), Box(4283, 4283)), - Box(Box(4284, 4284), Box(4284, 4284)), - Box(Box(4285, 4285), Box(4285, 4285)), - Box(Box(4286, 4286), Box(4286, 4286)), - Box(Box(4287, 4287), Box(4287, 4287)), - Box(Box(4288, 4288), Box(4288, 4288)), - Box(Box(4289, 4289), Box(4289, 4289)), - Box(Box(4290, 4290), Box(4290, 4290)), - Box(Box(4291, 4291), Box(4291, 4291)), - Box(Box(4292, 4292), Box(4292, 4292)), - Box(Box(4293, 4293), Box(4293, 4293)), - Box(Box(4294, 4294), Box(4294, 4294)), - Box(Box(4295, 4295), Box(4295, 4295)), - Box(Box(4296, 4296), Box(4296, 4296)), - Box(Box(4297, 4297), Box(4297, 4297)), - Box(Box(4298, 4298), Box(4298, 4298)), - Box(Box(4299, 4299), Box(4299, 4299)), - Box(Box(4300, 4300), Box(4300, 4300)), - Box(Box(4301, 4301), Box(4301, 4301)), - Box(Box(4302, 4302), Box(4302, 4302)), - Box(Box(4303, 4303), Box(4303, 4303)), - Box(Box(4304, 4304), Box(4304, 4304)), - Box(Box(4305, 4305), Box(4305, 4305)), - Box(Box(4306, 4306), Box(4306, 4306)), - Box(Box(4307, 4307), Box(4307, 4307)), - Box(Box(4308, 4308), Box(4308, 4308)), - Box(Box(4309, 4309), Box(4309, 4309)), - Box(Box(4310, 4310), Box(4310, 4310)), - Box(Box(4311, 4311), Box(4311, 4311)), - Box(Box(4312, 4312), Box(4312, 4312)), - Box(Box(4313, 4313), Box(4313, 4313)), - Box(Box(4314, 4314), Box(4314, 4314)), - Box(Box(4315, 4315), Box(4315, 4315)), - Box(Box(4316, 4316), Box(4316, 4316)), - Box(Box(4317, 4317), Box(4317, 4317)), - Box(Box(4318, 4318), Box(4318, 4318)), - Box(Box(4319, 4319), Box(4319, 4319)), - Box(Box(4320, 4320), Box(4320, 4320)), - Box(Box(4321, 4321), Box(4321, 4321)), - Box(Box(4322, 4322), Box(4322, 4322)), - Box(Box(4323, 4323), Box(4323, 4323)), - Box(Box(4324, 4324), Box(4324, 4324)), - Box(Box(4325, 4325), Box(4325, 4325)), - Box(Box(4326, 4326), Box(4326, 4326)), - Box(Box(4327, 4327), Box(4327, 4327)), - Box(Box(4328, 4328), Box(4328, 4328)), - Box(Box(4329, 4329), Box(4329, 4329)), - Box(Box(4330, 4330), Box(4330, 4330)), - Box(Box(4331, 4331), Box(4331, 4331)), - Box(Box(4332, 4332), Box(4332, 4332)), - Box(Box(4333, 4333), Box(4333, 4333)), - Box(Box(4334, 4334), Box(4334, 4334)), - Box(Box(4335, 4335), Box(4335, 4335)), - Box(Box(4336, 4336), Box(4336, 4336)), - Box(Box(4337, 4337), Box(4337, 4337)), - Box(Box(4338, 4338), Box(4338, 4338)), - Box(Box(4339, 4339), Box(4339, 4339)), - Box(Box(4340, 4340), Box(4340, 4340)), - Box(Box(4341, 4341), Box(4341, 4341)), - Box(Box(4342, 4342), Box(4342, 4342)), - Box(Box(4343, 4343), Box(4343, 4343)), - Box(Box(4344, 4344), Box(4344, 4344)), - Box(Box(4345, 4345), Box(4345, 4345)), - Box(Box(4346, 4346), Box(4346, 4346)), - Box(Box(4347, 4347), Box(4347, 4347)), - Box(Box(4348, 4348), Box(4348, 4348)), - Box(Box(4349, 4349), Box(4349, 4349)), - Box(Box(4350, 4350), Box(4350, 4350)), - Box(Box(4351, 4351), Box(4351, 4351)), - Box(Box(4352, 4352), Box(4352, 4352)), - Box(Box(4353, 4353), Box(4353, 4353)), - Box(Box(4354, 4354), Box(4354, 4354)), - Box(Box(4355, 4355), Box(4355, 4355)), - Box(Box(4356, 4356), Box(4356, 4356)), - Box(Box(4357, 4357), Box(4357, 4357)), - Box(Box(4358, 4358), Box(4358, 4358)), - Box(Box(4359, 4359), Box(4359, 4359)), - Box(Box(4360, 4360), Box(4360, 4360)), - Box(Box(4361, 4361), Box(4361, 4361)), - Box(Box(4362, 4362), Box(4362, 4362)), - Box(Box(4363, 4363), Box(4363, 4363)), - Box(Box(4364, 4364), Box(4364, 4364)), - Box(Box(4365, 4365), Box(4365, 4365)), - Box(Box(4366, 4366), Box(4366, 4366)), - Box(Box(4367, 4367), Box(4367, 4367)), - Box(Box(4368, 4368), Box(4368, 4368)), - Box(Box(4369, 4369), Box(4369, 4369)), - Box(Box(4370, 4370), Box(4370, 4370)), - Box(Box(4371, 4371), Box(4371, 4371)), - Box(Box(4372, 4372), Box(4372, 4372)), - Box(Box(4373, 4373), Box(4373, 4373)), - Box(Box(4374, 4374), Box(4374, 4374)), - Box(Box(4375, 4375), Box(4375, 4375)), - Box(Box(4376, 4376), Box(4376, 4376)), - Box(Box(4377, 4377), Box(4377, 4377)), - Box(Box(4378, 4378), Box(4378, 4378)), - Box(Box(4379, 4379), Box(4379, 4379)), - Box(Box(4380, 4380), Box(4380, 4380)), - Box(Box(4381, 4381), Box(4381, 4381)), - Box(Box(4382, 4382), Box(4382, 4382)), - Box(Box(4383, 4383), Box(4383, 4383)), - Box(Box(4384, 4384), Box(4384, 4384)), - Box(Box(4385, 4385), Box(4385, 4385)), - Box(Box(4386, 4386), Box(4386, 4386)), - Box(Box(4387, 4387), Box(4387, 4387)), - Box(Box(4388, 4388), Box(4388, 4388)), - Box(Box(4389, 4389), Box(4389, 4389)), - Box(Box(4390, 4390), Box(4390, 4390)), - Box(Box(4391, 4391), Box(4391, 4391)), - Box(Box(4392, 4392), Box(4392, 4392)), - Box(Box(4393, 4393), Box(4393, 4393)), - Box(Box(4394, 4394), Box(4394, 4394)), - Box(Box(4395, 4395), Box(4395, 4395)), - Box(Box(4396, 4396), Box(4396, 4396)), - Box(Box(4397, 4397), Box(4397, 4397)), - Box(Box(4398, 4398), Box(4398, 4398)), - Box(Box(4399, 4399), Box(4399, 4399)), - Box(Box(4400, 4400), Box(4400, 4400)), - Box(Box(4401, 4401), Box(4401, 4401)), - Box(Box(4402, 4402), Box(4402, 4402)), - Box(Box(4403, 4403), Box(4403, 4403)), - Box(Box(4404, 4404), Box(4404, 4404)), - Box(Box(4405, 4405), Box(4405, 4405)), - Box(Box(4406, 4406), Box(4406, 4406)), - Box(Box(4407, 4407), Box(4407, 4407)), - Box(Box(4408, 4408), Box(4408, 4408)), - Box(Box(4409, 4409), Box(4409, 4409)), - Box(Box(4410, 4410), Box(4410, 4410)), - Box(Box(4411, 4411), Box(4411, 4411)), - Box(Box(4412, 4412), Box(4412, 4412)), - Box(Box(4413, 4413), Box(4413, 4413)), - Box(Box(4414, 4414), Box(4414, 4414)), - Box(Box(4415, 4415), Box(4415, 4415)), - Box(Box(4416, 4416), Box(4416, 4416)), - Box(Box(4417, 4417), Box(4417, 4417)), - Box(Box(4418, 4418), Box(4418, 4418)), - Box(Box(4419, 4419), Box(4419, 4419)), - Box(Box(4420, 4420), Box(4420, 4420)), - Box(Box(4421, 4421), Box(4421, 4421)), - Box(Box(4422, 4422), Box(4422, 4422)), - Box(Box(4423, 4423), Box(4423, 4423)), - Box(Box(4424, 4424), Box(4424, 4424)), - Box(Box(4425, 4425), Box(4425, 4425)), - Box(Box(4426, 4426), Box(4426, 4426)), - Box(Box(4427, 4427), Box(4427, 4427)), - Box(Box(4428, 4428), Box(4428, 4428)), - Box(Box(4429, 4429), Box(4429, 4429)), - Box(Box(4430, 4430), Box(4430, 4430)), - Box(Box(4431, 4431), Box(4431, 4431)), - Box(Box(4432, 4432), Box(4432, 4432)), - Box(Box(4433, 4433), Box(4433, 4433)), - Box(Box(4434, 4434), Box(4434, 4434)), - Box(Box(4435, 4435), Box(4435, 4435)), - Box(Box(4436, 4436), Box(4436, 4436)), - Box(Box(4437, 4437), Box(4437, 4437)), - Box(Box(4438, 4438), Box(4438, 4438)), - Box(Box(4439, 4439), Box(4439, 4439)), - Box(Box(4440, 4440), Box(4440, 4440)), - Box(Box(4441, 4441), Box(4441, 4441)), - Box(Box(4442, 4442), Box(4442, 4442)), - Box(Box(4443, 4443), Box(4443, 4443)), - Box(Box(4444, 4444), Box(4444, 4444)), - Box(Box(4445, 4445), Box(4445, 4445)), - Box(Box(4446, 4446), Box(4446, 4446)), - Box(Box(4447, 4447), Box(4447, 4447)), - Box(Box(4448, 4448), Box(4448, 4448)), - Box(Box(4449, 4449), Box(4449, 4449)), - Box(Box(4450, 4450), Box(4450, 4450)), - Box(Box(4451, 4451), Box(4451, 4451)), - Box(Box(4452, 4452), Box(4452, 4452)), - Box(Box(4453, 4453), Box(4453, 4453)), - Box(Box(4454, 4454), Box(4454, 4454)), - Box(Box(4455, 4455), Box(4455, 4455)), - Box(Box(4456, 4456), Box(4456, 4456)), - Box(Box(4457, 4457), Box(4457, 4457)), - Box(Box(4458, 4458), Box(4458, 4458)), - Box(Box(4459, 4459), Box(4459, 4459)), - Box(Box(4460, 4460), Box(4460, 4460)), - Box(Box(4461, 4461), Box(4461, 4461)), - Box(Box(4462, 4462), Box(4462, 4462)), - Box(Box(4463, 4463), Box(4463, 4463)), - Box(Box(4464, 4464), Box(4464, 4464)), - Box(Box(4465, 4465), Box(4465, 4465)), - Box(Box(4466, 4466), Box(4466, 4466)), - Box(Box(4467, 4467), Box(4467, 4467)), - Box(Box(4468, 4468), Box(4468, 4468)), - Box(Box(4469, 4469), Box(4469, 4469)), - Box(Box(4470, 4470), Box(4470, 4470)), - Box(Box(4471, 4471), Box(4471, 4471)), - Box(Box(4472, 4472), Box(4472, 4472)), - Box(Box(4473, 4473), Box(4473, 4473)), - Box(Box(4474, 4474), Box(4474, 4474)), - Box(Box(4475, 4475), Box(4475, 4475)), - Box(Box(4476, 4476), Box(4476, 4476)), - Box(Box(4477, 4477), Box(4477, 4477)), - Box(Box(4478, 4478), Box(4478, 4478)), - Box(Box(4479, 4479), Box(4479, 4479)), - Box(Box(4480, 4480), Box(4480, 4480)), - Box(Box(4481, 4481), Box(4481, 4481)), - Box(Box(4482, 4482), Box(4482, 4482)), - Box(Box(4483, 4483), Box(4483, 4483)), - Box(Box(4484, 4484), Box(4484, 4484)), - Box(Box(4485, 4485), Box(4485, 4485)), - Box(Box(4486, 4486), Box(4486, 4486)), - Box(Box(4487, 4487), Box(4487, 4487)), - Box(Box(4488, 4488), Box(4488, 4488)), - Box(Box(4489, 4489), Box(4489, 4489)), - Box(Box(4490, 4490), Box(4490, 4490)), - Box(Box(4491, 4491), Box(4491, 4491)), - Box(Box(4492, 4492), Box(4492, 4492)), - Box(Box(4493, 4493), Box(4493, 4493)), - Box(Box(4494, 4494), Box(4494, 4494)), - Box(Box(4495, 4495), Box(4495, 4495)), - Box(Box(4496, 4496), Box(4496, 4496)), - Box(Box(4497, 4497), Box(4497, 4497)), - Box(Box(4498, 4498), Box(4498, 4498)), - Box(Box(4499, 4499), Box(4499, 4499)), - Box(Box(4500, 4500), Box(4500, 4500)), - Box(Box(4501, 4501), Box(4501, 4501)), - Box(Box(4502, 4502), Box(4502, 4502)), - Box(Box(4503, 4503), Box(4503, 4503)), - Box(Box(4504, 4504), Box(4504, 4504)), - Box(Box(4505, 4505), Box(4505, 4505)), - Box(Box(4506, 4506), Box(4506, 4506)), - Box(Box(4507, 4507), Box(4507, 4507)), - Box(Box(4508, 4508), Box(4508, 4508)), - Box(Box(4509, 4509), Box(4509, 4509)), - Box(Box(4510, 4510), Box(4510, 4510)), - Box(Box(4511, 4511), Box(4511, 4511)), - Box(Box(4512, 4512), Box(4512, 4512)), - Box(Box(4513, 4513), Box(4513, 4513)), - Box(Box(4514, 4514), Box(4514, 4514)), - Box(Box(4515, 4515), Box(4515, 4515)), - Box(Box(4516, 4516), Box(4516, 4516)), - Box(Box(4517, 4517), Box(4517, 4517)), - Box(Box(4518, 4518), Box(4518, 4518)), - Box(Box(4519, 4519), Box(4519, 4519)), - Box(Box(4520, 4520), Box(4520, 4520)), - Box(Box(4521, 4521), Box(4521, 4521)), - Box(Box(4522, 4522), Box(4522, 4522)), - Box(Box(4523, 4523), Box(4523, 4523)), - Box(Box(4524, 4524), Box(4524, 4524)), - Box(Box(4525, 4525), Box(4525, 4525)), - Box(Box(4526, 4526), Box(4526, 4526)), - Box(Box(4527, 4527), Box(4527, 4527)), - Box(Box(4528, 4528), Box(4528, 4528)), - Box(Box(4529, 4529), Box(4529, 4529)), - Box(Box(4530, 4530), Box(4530, 4530)), - Box(Box(4531, 4531), Box(4531, 4531)), - Box(Box(4532, 4532), Box(4532, 4532)), - Box(Box(4533, 4533), Box(4533, 4533)), - Box(Box(4534, 4534), Box(4534, 4534)), - Box(Box(4535, 4535), Box(4535, 4535)), - Box(Box(4536, 4536), Box(4536, 4536)), - Box(Box(4537, 4537), Box(4537, 4537)), - Box(Box(4538, 4538), Box(4538, 4538)), - Box(Box(4539, 4539), Box(4539, 4539)), - Box(Box(4540, 4540), Box(4540, 4540)), - Box(Box(4541, 4541), Box(4541, 4541)), - Box(Box(4542, 4542), Box(4542, 4542)), - Box(Box(4543, 4543), Box(4543, 4543)), - Box(Box(4544, 4544), Box(4544, 4544)), - Box(Box(4545, 4545), Box(4545, 4545)), - Box(Box(4546, 4546), Box(4546, 4546)), - Box(Box(4547, 4547), Box(4547, 4547)), - Box(Box(4548, 4548), Box(4548, 4548)), - Box(Box(4549, 4549), Box(4549, 4549)), - Box(Box(4550, 4550), Box(4550, 4550)), - Box(Box(4551, 4551), Box(4551, 4551)), - Box(Box(4552, 4552), Box(4552, 4552)), - Box(Box(4553, 4553), Box(4553, 4553)), - Box(Box(4554, 4554), Box(4554, 4554)), - Box(Box(4555, 4555), Box(4555, 4555)), - Box(Box(4556, 4556), Box(4556, 4556)), - Box(Box(4557, 4557), Box(4557, 4557)), - Box(Box(4558, 4558), Box(4558, 4558)), - Box(Box(4559, 4559), Box(4559, 4559)), - Box(Box(4560, 4560), Box(4560, 4560)), - Box(Box(4561, 4561), Box(4561, 4561)), - Box(Box(4562, 4562), Box(4562, 4562)), - Box(Box(4563, 4563), Box(4563, 4563)), - Box(Box(4564, 4564), Box(4564, 4564)), - Box(Box(4565, 4565), Box(4565, 4565)), - Box(Box(4566, 4566), Box(4566, 4566)), - Box(Box(4567, 4567), Box(4567, 4567)), - Box(Box(4568, 4568), Box(4568, 4568)), - Box(Box(4569, 4569), Box(4569, 4569)), - Box(Box(4570, 4570), Box(4570, 4570)), - Box(Box(4571, 4571), Box(4571, 4571)), - Box(Box(4572, 4572), Box(4572, 4572)), - Box(Box(4573, 4573), Box(4573, 4573)), - Box(Box(4574, 4574), Box(4574, 4574)), - Box(Box(4575, 4575), Box(4575, 4575)), - Box(Box(4576, 4576), Box(4576, 4576)), - Box(Box(4577, 4577), Box(4577, 4577)), - Box(Box(4578, 4578), Box(4578, 4578)), - Box(Box(4579, 4579), Box(4579, 4579)), - Box(Box(4580, 4580), Box(4580, 4580)), - Box(Box(4581, 4581), Box(4581, 4581)), - Box(Box(4582, 4582), Box(4582, 4582)), - Box(Box(4583, 4583), Box(4583, 4583)), - Box(Box(4584, 4584), Box(4584, 4584)), - Box(Box(4585, 4585), Box(4585, 4585)), - Box(Box(4586, 4586), Box(4586, 4586)), - Box(Box(4587, 4587), Box(4587, 4587)), - Box(Box(4588, 4588), Box(4588, 4588)), - Box(Box(4589, 4589), Box(4589, 4589)), - Box(Box(4590, 4590), Box(4590, 4590)), - Box(Box(4591, 4591), Box(4591, 4591)), - Box(Box(4592, 4592), Box(4592, 4592)), - Box(Box(4593, 4593), Box(4593, 4593)), - Box(Box(4594, 4594), Box(4594, 4594)), - Box(Box(4595, 4595), Box(4595, 4595)), - Box(Box(4596, 4596), Box(4596, 4596)), - Box(Box(4597, 4597), Box(4597, 4597)), - Box(Box(4598, 4598), Box(4598, 4598)), - Box(Box(4599, 4599), Box(4599, 4599)), - Box(Box(4600, 4600), Box(4600, 4600)), - Box(Box(4601, 4601), Box(4601, 4601)), - Box(Box(4602, 4602), Box(4602, 4602)), - Box(Box(4603, 4603), Box(4603, 4603)), - Box(Box(4604, 4604), Box(4604, 4604)), - Box(Box(4605, 4605), Box(4605, 4605)), - Box(Box(4606, 4606), Box(4606, 4606)), - Box(Box(4607, 4607), Box(4607, 4607)), - Box(Box(4608, 4608), Box(4608, 4608)), - Box(Box(4609, 4609), Box(4609, 4609)), - Box(Box(4610, 4610), Box(4610, 4610)), - Box(Box(4611, 4611), Box(4611, 4611)), - Box(Box(4612, 4612), Box(4612, 4612)), - Box(Box(4613, 4613), Box(4613, 4613)), - Box(Box(4614, 4614), Box(4614, 4614)), - Box(Box(4615, 4615), Box(4615, 4615)), - Box(Box(4616, 4616), Box(4616, 4616)), - Box(Box(4617, 4617), Box(4617, 4617)), - Box(Box(4618, 4618), Box(4618, 4618)), - Box(Box(4619, 4619), Box(4619, 4619)), - Box(Box(4620, 4620), Box(4620, 4620)), - Box(Box(4621, 4621), Box(4621, 4621)), - Box(Box(4622, 4622), Box(4622, 4622)), - Box(Box(4623, 4623), Box(4623, 4623)), - Box(Box(4624, 4624), Box(4624, 4624)), - Box(Box(4625, 4625), Box(4625, 4625)), - Box(Box(4626, 4626), Box(4626, 4626)), - Box(Box(4627, 4627), Box(4627, 4627)), - Box(Box(4628, 4628), Box(4628, 4628)), - Box(Box(4629, 4629), Box(4629, 4629)), - Box(Box(4630, 4630), Box(4630, 4630)), - Box(Box(4631, 4631), Box(4631, 4631)), - Box(Box(4632, 4632), Box(4632, 4632)), - Box(Box(4633, 4633), Box(4633, 4633)), - Box(Box(4634, 4634), Box(4634, 4634)), - Box(Box(4635, 4635), Box(4635, 4635)), - Box(Box(4636, 4636), Box(4636, 4636)), - Box(Box(4637, 4637), Box(4637, 4637)), - Box(Box(4638, 4638), Box(4638, 4638)), - Box(Box(4639, 4639), Box(4639, 4639)), - Box(Box(4640, 4640), Box(4640, 4640)), - Box(Box(4641, 4641), Box(4641, 4641)), - Box(Box(4642, 4642), Box(4642, 4642)), - Box(Box(4643, 4643), Box(4643, 4643)), - Box(Box(4644, 4644), Box(4644, 4644)), - Box(Box(4645, 4645), Box(4645, 4645)), - Box(Box(4646, 4646), Box(4646, 4646)), - Box(Box(4647, 4647), Box(4647, 4647)), - Box(Box(4648, 4648), Box(4648, 4648)), - Box(Box(4649, 4649), Box(4649, 4649)), - Box(Box(4650, 4650), Box(4650, 4650)), - Box(Box(4651, 4651), Box(4651, 4651)), - Box(Box(4652, 4652), Box(4652, 4652)), - Box(Box(4653, 4653), Box(4653, 4653)), - Box(Box(4654, 4654), Box(4654, 4654)), - Box(Box(4655, 4655), Box(4655, 4655)), - Box(Box(4656, 4656), Box(4656, 4656)), - Box(Box(4657, 4657), Box(4657, 4657)), - Box(Box(4658, 4658), Box(4658, 4658)), - Box(Box(4659, 4659), Box(4659, 4659)), - Box(Box(4660, 4660), Box(4660, 4660)), - Box(Box(4661, 4661), Box(4661, 4661)), - Box(Box(4662, 4662), Box(4662, 4662)), - Box(Box(4663, 4663), Box(4663, 4663)), - Box(Box(4664, 4664), Box(4664, 4664)), - Box(Box(4665, 4665), Box(4665, 4665)), - Box(Box(4666, 4666), Box(4666, 4666)), - Box(Box(4667, 4667), Box(4667, 4667)), - Box(Box(4668, 4668), Box(4668, 4668)), - Box(Box(4669, 4669), Box(4669, 4669)), - Box(Box(4670, 4670), Box(4670, 4670)), - Box(Box(4671, 4671), Box(4671, 4671)), - Box(Box(4672, 4672), Box(4672, 4672)), - Box(Box(4673, 4673), Box(4673, 4673)), - Box(Box(4674, 4674), Box(4674, 4674)), - Box(Box(4675, 4675), Box(4675, 4675)), - Box(Box(4676, 4676), Box(4676, 4676)), - Box(Box(4677, 4677), Box(4677, 4677)), - Box(Box(4678, 4678), Box(4678, 4678)), - Box(Box(4679, 4679), Box(4679, 4679)), - Box(Box(4680, 4680), Box(4680, 4680)), - Box(Box(4681, 4681), Box(4681, 4681)), - Box(Box(4682, 4682), Box(4682, 4682)), - Box(Box(4683, 4683), Box(4683, 4683)), - Box(Box(4684, 4684), Box(4684, 4684)), - Box(Box(4685, 4685), Box(4685, 4685)), - Box(Box(4686, 4686), Box(4686, 4686)), - Box(Box(4687, 4687), Box(4687, 4687)), - Box(Box(4688, 4688), Box(4688, 4688)), - Box(Box(4689, 4689), Box(4689, 4689)), - Box(Box(4690, 4690), Box(4690, 4690)), - Box(Box(4691, 4691), Box(4691, 4691)), - Box(Box(4692, 4692), Box(4692, 4692)), - Box(Box(4693, 4693), Box(4693, 4693)), - Box(Box(4694, 4694), Box(4694, 4694)), - Box(Box(4695, 4695), Box(4695, 4695)), - Box(Box(4696, 4696), Box(4696, 4696)), - Box(Box(4697, 4697), Box(4697, 4697)), - Box(Box(4698, 4698), Box(4698, 4698)), - Box(Box(4699, 4699), Box(4699, 4699)), - Box(Box(4700, 4700), Box(4700, 4700)), - Box(Box(4701, 4701), Box(4701, 4701)), - Box(Box(4702, 4702), Box(4702, 4702)), - Box(Box(4703, 4703), Box(4703, 4703)), - Box(Box(4704, 4704), Box(4704, 4704)), - Box(Box(4705, 4705), Box(4705, 4705)), - Box(Box(4706, 4706), Box(4706, 4706)), - Box(Box(4707, 4707), Box(4707, 4707)), - Box(Box(4708, 4708), Box(4708, 4708)), - Box(Box(4709, 4709), Box(4709, 4709)), - Box(Box(4710, 4710), Box(4710, 4710)), - Box(Box(4711, 4711), Box(4711, 4711)), - Box(Box(4712, 4712), Box(4712, 4712)), - Box(Box(4713, 4713), Box(4713, 4713)), - Box(Box(4714, 4714), Box(4714, 4714)), - Box(Box(4715, 4715), Box(4715, 4715)), - Box(Box(4716, 4716), Box(4716, 4716)), - Box(Box(4717, 4717), Box(4717, 4717)), - Box(Box(4718, 4718), Box(4718, 4718)), - Box(Box(4719, 4719), Box(4719, 4719)), - Box(Box(4720, 4720), Box(4720, 4720)), - Box(Box(4721, 4721), Box(4721, 4721)), - Box(Box(4722, 4722), Box(4722, 4722)), - Box(Box(4723, 4723), Box(4723, 4723)), - Box(Box(4724, 4724), Box(4724, 4724)), - Box(Box(4725, 4725), Box(4725, 4725)), - Box(Box(4726, 4726), Box(4726, 4726)), - Box(Box(4727, 4727), Box(4727, 4727)), - Box(Box(4728, 4728), Box(4728, 4728)), - Box(Box(4729, 4729), Box(4729, 4729)), - Box(Box(4730, 4730), Box(4730, 4730)), - Box(Box(4731, 4731), Box(4731, 4731)), - Box(Box(4732, 4732), Box(4732, 4732)), - Box(Box(4733, 4733), Box(4733, 4733)), - Box(Box(4734, 4734), Box(4734, 4734)), - Box(Box(4735, 4735), Box(4735, 4735)), - Box(Box(4736, 4736), Box(4736, 4736)), - Box(Box(4737, 4737), Box(4737, 4737)), - Box(Box(4738, 4738), Box(4738, 4738)), - Box(Box(4739, 4739), Box(4739, 4739)), - Box(Box(4740, 4740), Box(4740, 4740)), - Box(Box(4741, 4741), Box(4741, 4741)), - Box(Box(4742, 4742), Box(4742, 4742)), - Box(Box(4743, 4743), Box(4743, 4743)), - Box(Box(4744, 4744), Box(4744, 4744)), - Box(Box(4745, 4745), Box(4745, 4745)), - Box(Box(4746, 4746), Box(4746, 4746)), - Box(Box(4747, 4747), Box(4747, 4747)), - Box(Box(4748, 4748), Box(4748, 4748)), - Box(Box(4749, 4749), Box(4749, 4749)), - Box(Box(4750, 4750), Box(4750, 4750)), - Box(Box(4751, 4751), Box(4751, 4751)), - Box(Box(4752, 4752), Box(4752, 4752)), - Box(Box(4753, 4753), Box(4753, 4753)), - Box(Box(4754, 4754), Box(4754, 4754)), - Box(Box(4755, 4755), Box(4755, 4755)), - Box(Box(4756, 4756), Box(4756, 4756)), - Box(Box(4757, 4757), Box(4757, 4757)), - Box(Box(4758, 4758), Box(4758, 4758)), - Box(Box(4759, 4759), Box(4759, 4759)), - Box(Box(4760, 4760), Box(4760, 4760)), - Box(Box(4761, 4761), Box(4761, 4761)), - Box(Box(4762, 4762), Box(4762, 4762)), - Box(Box(4763, 4763), Box(4763, 4763)), - Box(Box(4764, 4764), Box(4764, 4764)), - Box(Box(4765, 4765), Box(4765, 4765)), - Box(Box(4766, 4766), Box(4766, 4766)), - Box(Box(4767, 4767), Box(4767, 4767)), - Box(Box(4768, 4768), Box(4768, 4768)), - Box(Box(4769, 4769), Box(4769, 4769)), - Box(Box(4770, 4770), Box(4770, 4770)), - Box(Box(4771, 4771), Box(4771, 4771)), - Box(Box(4772, 4772), Box(4772, 4772)), - Box(Box(4773, 4773), Box(4773, 4773)), - Box(Box(4774, 4774), Box(4774, 4774)), - Box(Box(4775, 4775), Box(4775, 4775)), - Box(Box(4776, 4776), Box(4776, 4776)), - Box(Box(4777, 4777), Box(4777, 4777)), - Box(Box(4778, 4778), Box(4778, 4778)), - Box(Box(4779, 4779), Box(4779, 4779)), - Box(Box(4780, 4780), Box(4780, 4780)), - Box(Box(4781, 4781), Box(4781, 4781)), - Box(Box(4782, 4782), Box(4782, 4782)), - Box(Box(4783, 4783), Box(4783, 4783)), - Box(Box(4784, 4784), Box(4784, 4784)), - Box(Box(4785, 4785), Box(4785, 4785)), - Box(Box(4786, 4786), Box(4786, 4786)), - Box(Box(4787, 4787), Box(4787, 4787)), - Box(Box(4788, 4788), Box(4788, 4788)), - Box(Box(4789, 4789), Box(4789, 4789)), - Box(Box(4790, 4790), Box(4790, 4790)), - Box(Box(4791, 4791), Box(4791, 4791)), - Box(Box(4792, 4792), Box(4792, 4792)), - Box(Box(4793, 4793), Box(4793, 4793)), - Box(Box(4794, 4794), Box(4794, 4794)), - Box(Box(4795, 4795), Box(4795, 4795)), - Box(Box(4796, 4796), Box(4796, 4796)), - Box(Box(4797, 4797), Box(4797, 4797)), - Box(Box(4798, 4798), Box(4798, 4798)), - Box(Box(4799, 4799), Box(4799, 4799)), - Box(Box(4800, 4800), Box(4800, 4800)), - Box(Box(4801, 4801), Box(4801, 4801)), - Box(Box(4802, 4802), Box(4802, 4802)), - Box(Box(4803, 4803), Box(4803, 4803)), - Box(Box(4804, 4804), Box(4804, 4804)), - Box(Box(4805, 4805), Box(4805, 4805)), - Box(Box(4806, 4806), Box(4806, 4806)), - Box(Box(4807, 4807), Box(4807, 4807)), - Box(Box(4808, 4808), Box(4808, 4808)), - Box(Box(4809, 4809), Box(4809, 4809)), - Box(Box(4810, 4810), Box(4810, 4810)), - Box(Box(4811, 4811), Box(4811, 4811)), - Box(Box(4812, 4812), Box(4812, 4812)), - Box(Box(4813, 4813), Box(4813, 4813)), - Box(Box(4814, 4814), Box(4814, 4814)), - Box(Box(4815, 4815), Box(4815, 4815)), - Box(Box(4816, 4816), Box(4816, 4816)), - Box(Box(4817, 4817), Box(4817, 4817)), - Box(Box(4818, 4818), Box(4818, 4818)), - Box(Box(4819, 4819), Box(4819, 4819)), - Box(Box(4820, 4820), Box(4820, 4820)), - Box(Box(4821, 4821), Box(4821, 4821)), - Box(Box(4822, 4822), Box(4822, 4822)), - Box(Box(4823, 4823), Box(4823, 4823)), - Box(Box(4824, 4824), Box(4824, 4824)), - Box(Box(4825, 4825), Box(4825, 4825)), - Box(Box(4826, 4826), Box(4826, 4826)), - Box(Box(4827, 4827), Box(4827, 4827)), - Box(Box(4828, 4828), Box(4828, 4828)), - Box(Box(4829, 4829), Box(4829, 4829)), - Box(Box(4830, 4830), Box(4830, 4830)), - Box(Box(4831, 4831), Box(4831, 4831)), - Box(Box(4832, 4832), Box(4832, 4832)), - Box(Box(4833, 4833), Box(4833, 4833)), - Box(Box(4834, 4834), Box(4834, 4834)), - Box(Box(4835, 4835), Box(4835, 4835)), - Box(Box(4836, 4836), Box(4836, 4836)), - Box(Box(4837, 4837), Box(4837, 4837)), - Box(Box(4838, 4838), Box(4838, 4838)), - Box(Box(4839, 4839), Box(4839, 4839)), - Box(Box(4840, 4840), Box(4840, 4840)), - Box(Box(4841, 4841), Box(4841, 4841)), - Box(Box(4842, 4842), Box(4842, 4842)), - Box(Box(4843, 4843), Box(4843, 4843)), - Box(Box(4844, 4844), Box(4844, 4844)), - Box(Box(4845, 4845), Box(4845, 4845)), - Box(Box(4846, 4846), Box(4846, 4846)), - Box(Box(4847, 4847), Box(4847, 4847)), - Box(Box(4848, 4848), Box(4848, 4848)), - Box(Box(4849, 4849), Box(4849, 4849)), - Box(Box(4850, 4850), Box(4850, 4850)), - Box(Box(4851, 4851), Box(4851, 4851)), - Box(Box(4852, 4852), Box(4852, 4852)), - Box(Box(4853, 4853), Box(4853, 4853)), - Box(Box(4854, 4854), Box(4854, 4854)), - Box(Box(4855, 4855), Box(4855, 4855)), - Box(Box(4856, 4856), Box(4856, 4856)), - Box(Box(4857, 4857), Box(4857, 4857)), - Box(Box(4858, 4858), Box(4858, 4858)), - Box(Box(4859, 4859), Box(4859, 4859)), - Box(Box(4860, 4860), Box(4860, 4860)), - Box(Box(4861, 4861), Box(4861, 4861)), - Box(Box(4862, 4862), Box(4862, 4862)), - Box(Box(4863, 4863), Box(4863, 4863)), - Box(Box(4864, 4864), Box(4864, 4864)), - Box(Box(4865, 4865), Box(4865, 4865)), - Box(Box(4866, 4866), Box(4866, 4866)), - Box(Box(4867, 4867), Box(4867, 4867)), - Box(Box(4868, 4868), Box(4868, 4868)), - Box(Box(4869, 4869), Box(4869, 4869)), - Box(Box(4870, 4870), Box(4870, 4870)), - Box(Box(4871, 4871), Box(4871, 4871)), - Box(Box(4872, 4872), Box(4872, 4872)), - Box(Box(4873, 4873), Box(4873, 4873)), - Box(Box(4874, 4874), Box(4874, 4874)), - Box(Box(4875, 4875), Box(4875, 4875)), - Box(Box(4876, 4876), Box(4876, 4876)), - Box(Box(4877, 4877), Box(4877, 4877)), - Box(Box(4878, 4878), Box(4878, 4878)), - Box(Box(4879, 4879), Box(4879, 4879)), - Box(Box(4880, 4880), Box(4880, 4880)), - Box(Box(4881, 4881), Box(4881, 4881)), - Box(Box(4882, 4882), Box(4882, 4882)), - Box(Box(4883, 4883), Box(4883, 4883)), - Box(Box(4884, 4884), Box(4884, 4884)), - Box(Box(4885, 4885), Box(4885, 4885)), - Box(Box(4886, 4886), Box(4886, 4886)), - Box(Box(4887, 4887), Box(4887, 4887)), - Box(Box(4888, 4888), Box(4888, 4888)), - Box(Box(4889, 4889), Box(4889, 4889)), - Box(Box(4890, 4890), Box(4890, 4890)), - Box(Box(4891, 4891), Box(4891, 4891)), - Box(Box(4892, 4892), Box(4892, 4892)), - Box(Box(4893, 4893), Box(4893, 4893)), - Box(Box(4894, 4894), Box(4894, 4894)), - Box(Box(4895, 4895), Box(4895, 4895)), - Box(Box(4896, 4896), Box(4896, 4896)), - Box(Box(4897, 4897), Box(4897, 4897)), - Box(Box(4898, 4898), Box(4898, 4898)), - Box(Box(4899, 4899), Box(4899, 4899)), - Box(Box(4900, 4900), Box(4900, 4900)), - Box(Box(4901, 4901), Box(4901, 4901)), - Box(Box(4902, 4902), Box(4902, 4902)), - Box(Box(4903, 4903), Box(4903, 4903)), - Box(Box(4904, 4904), Box(4904, 4904)), - Box(Box(4905, 4905), Box(4905, 4905)), - Box(Box(4906, 4906), Box(4906, 4906)), - Box(Box(4907, 4907), Box(4907, 4907)), - Box(Box(4908, 4908), Box(4908, 4908)), - Box(Box(4909, 4909), Box(4909, 4909)), - Box(Box(4910, 4910), Box(4910, 4910)), - Box(Box(4911, 4911), Box(4911, 4911)), - Box(Box(4912, 4912), Box(4912, 4912)), - Box(Box(4913, 4913), Box(4913, 4913)), - Box(Box(4914, 4914), Box(4914, 4914)), - Box(Box(4915, 4915), Box(4915, 4915)), - Box(Box(4916, 4916), Box(4916, 4916)), - Box(Box(4917, 4917), Box(4917, 4917)), - Box(Box(4918, 4918), Box(4918, 4918)), - Box(Box(4919, 4919), Box(4919, 4919)), - Box(Box(4920, 4920), Box(4920, 4920)), - Box(Box(4921, 4921), Box(4921, 4921)), - Box(Box(4922, 4922), Box(4922, 4922)), - Box(Box(4923, 4923), Box(4923, 4923)), - Box(Box(4924, 4924), Box(4924, 4924)), - Box(Box(4925, 4925), Box(4925, 4925)), - Box(Box(4926, 4926), Box(4926, 4926)), - Box(Box(4927, 4927), Box(4927, 4927)), - Box(Box(4928, 4928), Box(4928, 4928)), - Box(Box(4929, 4929), Box(4929, 4929)), - Box(Box(4930, 4930), Box(4930, 4930)), - Box(Box(4931, 4931), Box(4931, 4931)), - Box(Box(4932, 4932), Box(4932, 4932)), - Box(Box(4933, 4933), Box(4933, 4933)), - Box(Box(4934, 4934), Box(4934, 4934)), - Box(Box(4935, 4935), Box(4935, 4935)), - Box(Box(4936, 4936), Box(4936, 4936)), - Box(Box(4937, 4937), Box(4937, 4937)), - Box(Box(4938, 4938), Box(4938, 4938)), - Box(Box(4939, 4939), Box(4939, 4939)), - Box(Box(4940, 4940), Box(4940, 4940)), - Box(Box(4941, 4941), Box(4941, 4941)), - Box(Box(4942, 4942), Box(4942, 4942)), - Box(Box(4943, 4943), Box(4943, 4943)), - Box(Box(4944, 4944), Box(4944, 4944)), - Box(Box(4945, 4945), Box(4945, 4945)), - Box(Box(4946, 4946), Box(4946, 4946)), - Box(Box(4947, 4947), Box(4947, 4947)), - Box(Box(4948, 4948), Box(4948, 4948)), - Box(Box(4949, 4949), Box(4949, 4949)), - Box(Box(4950, 4950), Box(4950, 4950)), - Box(Box(4951, 4951), Box(4951, 4951)), - Box(Box(4952, 4952), Box(4952, 4952)), - Box(Box(4953, 4953), Box(4953, 4953)), - Box(Box(4954, 4954), Box(4954, 4954)), - Box(Box(4955, 4955), Box(4955, 4955)), - Box(Box(4956, 4956), Box(4956, 4956)), - Box(Box(4957, 4957), Box(4957, 4957)), - Box(Box(4958, 4958), Box(4958, 4958)), - Box(Box(4959, 4959), Box(4959, 4959)), - Box(Box(4960, 4960), Box(4960, 4960)), - Box(Box(4961, 4961), Box(4961, 4961)), - Box(Box(4962, 4962), Box(4962, 4962)), - Box(Box(4963, 4963), Box(4963, 4963)), - Box(Box(4964, 4964), Box(4964, 4964)), - Box(Box(4965, 4965), Box(4965, 4965)), - Box(Box(4966, 4966), Box(4966, 4966)), - Box(Box(4967, 4967), Box(4967, 4967)), - Box(Box(4968, 4968), Box(4968, 4968)), - Box(Box(4969, 4969), Box(4969, 4969)), - Box(Box(4970, 4970), Box(4970, 4970)), - Box(Box(4971, 4971), Box(4971, 4971)), - Box(Box(4972, 4972), Box(4972, 4972)), - Box(Box(4973, 4973), Box(4973, 4973)), - Box(Box(4974, 4974), Box(4974, 4974)), - Box(Box(4975, 4975), Box(4975, 4975)), - Box(Box(4976, 4976), Box(4976, 4976)), - Box(Box(4977, 4977), Box(4977, 4977)), - Box(Box(4978, 4978), Box(4978, 4978)), - Box(Box(4979, 4979), Box(4979, 4979)), - Box(Box(4980, 4980), Box(4980, 4980)), - Box(Box(4981, 4981), Box(4981, 4981)), - Box(Box(4982, 4982), Box(4982, 4982)), - Box(Box(4983, 4983), Box(4983, 4983)), - Box(Box(4984, 4984), Box(4984, 4984)), - Box(Box(4985, 4985), Box(4985, 4985)), - Box(Box(4986, 4986), Box(4986, 4986)), - Box(Box(4987, 4987), Box(4987, 4987)), - Box(Box(4988, 4988), Box(4988, 4988)), - Box(Box(4989, 4989), Box(4989, 4989)), - Box(Box(4990, 4990), Box(4990, 4990)), - Box(Box(4991, 4991), Box(4991, 4991)), - Box(Box(4992, 4992), Box(4992, 4992)), - Box(Box(4993, 4993), Box(4993, 4993)), - Box(Box(4994, 4994), Box(4994, 4994)), - Box(Box(4995, 4995), Box(4995, 4995)), - Box(Box(4996, 4996), Box(4996, 4996)), - Box(Box(4997, 4997), Box(4997, 4997)), - Box(Box(4998, 4998), Box(4998, 4998)), - Box(Box(4999, 4999), Box(4999, 4999)), - Box(Box(5000, 5000), Box(5000, 5000)), - Box(Box(5001, 5001), Box(5001, 5001)), - Box(Box(5002, 5002), Box(5002, 5002)), - Box(Box(5003, 5003), Box(5003, 5003)), - Box(Box(5004, 5004), Box(5004, 5004)), - Box(Box(5005, 5005), Box(5005, 5005)), - Box(Box(5006, 5006), Box(5006, 5006)), - Box(Box(5007, 5007), Box(5007, 5007)), - Box(Box(5008, 5008), Box(5008, 5008)), - Box(Box(5009, 5009), Box(5009, 5009)), - Box(Box(5010, 5010), Box(5010, 5010)), - Box(Box(5011, 5011), Box(5011, 5011)), - Box(Box(5012, 5012), Box(5012, 5012)), - Box(Box(5013, 5013), Box(5013, 5013)), - Box(Box(5014, 5014), Box(5014, 5014)), - Box(Box(5015, 5015), Box(5015, 5015)), - Box(Box(5016, 5016), Box(5016, 5016)), - Box(Box(5017, 5017), Box(5017, 5017)), - Box(Box(5018, 5018), Box(5018, 5018)), - Box(Box(5019, 5019), Box(5019, 5019)), - Box(Box(5020, 5020), Box(5020, 5020)), - Box(Box(5021, 5021), Box(5021, 5021)), - Box(Box(5022, 5022), Box(5022, 5022)), - Box(Box(5023, 5023), Box(5023, 5023)), - Box(Box(5024, 5024), Box(5024, 5024)), - Box(Box(5025, 5025), Box(5025, 5025)), - Box(Box(5026, 5026), Box(5026, 5026)), - Box(Box(5027, 5027), Box(5027, 5027)), - Box(Box(5028, 5028), Box(5028, 5028)), - Box(Box(5029, 5029), Box(5029, 5029)), - Box(Box(5030, 5030), Box(5030, 5030)), - Box(Box(5031, 5031), Box(5031, 5031)), - Box(Box(5032, 5032), Box(5032, 5032)), - Box(Box(5033, 5033), Box(5033, 5033)), - Box(Box(5034, 5034), Box(5034, 5034)), - Box(Box(5035, 5035), Box(5035, 5035)), - Box(Box(5036, 5036), Box(5036, 5036)), - Box(Box(5037, 5037), Box(5037, 5037)), - Box(Box(5038, 5038), Box(5038, 5038)), - Box(Box(5039, 5039), Box(5039, 5039)), - Box(Box(5040, 5040), Box(5040, 5040)), - Box(Box(5041, 5041), Box(5041, 5041)), - Box(Box(5042, 5042), Box(5042, 5042)), - Box(Box(5043, 5043), Box(5043, 5043)), - Box(Box(5044, 5044), Box(5044, 5044)), - Box(Box(5045, 5045), Box(5045, 5045)), - Box(Box(5046, 5046), Box(5046, 5046)), - Box(Box(5047, 5047), Box(5047, 5047)), - Box(Box(5048, 5048), Box(5048, 5048)), - Box(Box(5049, 5049), Box(5049, 5049)), - Box(Box(5050, 5050), Box(5050, 5050)), - Box(Box(5051, 5051), Box(5051, 5051)), - Box(Box(5052, 5052), Box(5052, 5052)), - Box(Box(5053, 5053), Box(5053, 5053)), - Box(Box(5054, 5054), Box(5054, 5054)), - Box(Box(5055, 5055), Box(5055, 5055)), - Box(Box(5056, 5056), Box(5056, 5056)), - Box(Box(5057, 5057), Box(5057, 5057)), - Box(Box(5058, 5058), Box(5058, 5058)), - Box(Box(5059, 5059), Box(5059, 5059)), - Box(Box(5060, 5060), Box(5060, 5060)), - Box(Box(5061, 5061), Box(5061, 5061)), - Box(Box(5062, 5062), Box(5062, 5062)), - Box(Box(5063, 5063), Box(5063, 5063)), - Box(Box(5064, 5064), Box(5064, 5064)), - Box(Box(5065, 5065), Box(5065, 5065)), - Box(Box(5066, 5066), Box(5066, 5066)), - Box(Box(5067, 5067), Box(5067, 5067)), - Box(Box(5068, 5068), Box(5068, 5068)), - Box(Box(5069, 5069), Box(5069, 5069)), - Box(Box(5070, 5070), Box(5070, 5070)), - Box(Box(5071, 5071), Box(5071, 5071)), - Box(Box(5072, 5072), Box(5072, 5072)), - Box(Box(5073, 5073), Box(5073, 5073)), - Box(Box(5074, 5074), Box(5074, 5074)), - Box(Box(5075, 5075), Box(5075, 5075)), - Box(Box(5076, 5076), Box(5076, 5076)), - Box(Box(5077, 5077), Box(5077, 5077)), - Box(Box(5078, 5078), Box(5078, 5078)), - Box(Box(5079, 5079), Box(5079, 5079)), - Box(Box(5080, 5080), Box(5080, 5080)), - Box(Box(5081, 5081), Box(5081, 5081)), - Box(Box(5082, 5082), Box(5082, 5082)), - Box(Box(5083, 5083), Box(5083, 5083)), - Box(Box(5084, 5084), Box(5084, 5084)), - Box(Box(5085, 5085), Box(5085, 5085)), - Box(Box(5086, 5086), Box(5086, 5086)), - Box(Box(5087, 5087), Box(5087, 5087)), - Box(Box(5088, 5088), Box(5088, 5088)), - Box(Box(5089, 5089), Box(5089, 5089)), - Box(Box(5090, 5090), Box(5090, 5090)), - Box(Box(5091, 5091), Box(5091, 5091)), - Box(Box(5092, 5092), Box(5092, 5092)), - Box(Box(5093, 5093), Box(5093, 5093)), - Box(Box(5094, 5094), Box(5094, 5094)), - Box(Box(5095, 5095), Box(5095, 5095)), - Box(Box(5096, 5096), Box(5096, 5096)), - Box(Box(5097, 5097), Box(5097, 5097)), - Box(Box(5098, 5098), Box(5098, 5098)), - Box(Box(5099, 5099), Box(5099, 5099)), - Box(Box(5100, 5100), Box(5100, 5100)), - Box(Box(5101, 5101), Box(5101, 5101)), - Box(Box(5102, 5102), Box(5102, 5102)), - Box(Box(5103, 5103), Box(5103, 5103)), - Box(Box(5104, 5104), Box(5104, 5104)), - Box(Box(5105, 5105), Box(5105, 5105)), - Box(Box(5106, 5106), Box(5106, 5106)), - Box(Box(5107, 5107), Box(5107, 5107)), - Box(Box(5108, 5108), Box(5108, 5108)), - Box(Box(5109, 5109), Box(5109, 5109)), - Box(Box(5110, 5110), Box(5110, 5110)), - Box(Box(5111, 5111), Box(5111, 5111)), - Box(Box(5112, 5112), Box(5112, 5112)), - Box(Box(5113, 5113), Box(5113, 5113)), - Box(Box(5114, 5114), Box(5114, 5114)), - Box(Box(5115, 5115), Box(5115, 5115)), - Box(Box(5116, 5116), Box(5116, 5116)), - Box(Box(5117, 5117), Box(5117, 5117)), - Box(Box(5118, 5118), Box(5118, 5118)), - Box(Box(5119, 5119), Box(5119, 5119)), - Box(Box(5120, 5120), Box(5120, 5120)), - Box(Box(5121, 5121), Box(5121, 5121)), - Box(Box(5122, 5122), Box(5122, 5122)), - Box(Box(5123, 5123), Box(5123, 5123)), - Box(Box(5124, 5124), Box(5124, 5124)), - Box(Box(5125, 5125), Box(5125, 5125)), - Box(Box(5126, 5126), Box(5126, 5126)), - Box(Box(5127, 5127), Box(5127, 5127)), - Box(Box(5128, 5128), Box(5128, 5128)), - Box(Box(5129, 5129), Box(5129, 5129)), - Box(Box(5130, 5130), Box(5130, 5130)), - Box(Box(5131, 5131), Box(5131, 5131)), - Box(Box(5132, 5132), Box(5132, 5132)), - Box(Box(5133, 5133), Box(5133, 5133)), - Box(Box(5134, 5134), Box(5134, 5134)), - Box(Box(5135, 5135), Box(5135, 5135)), - Box(Box(5136, 5136), Box(5136, 5136)), - Box(Box(5137, 5137), Box(5137, 5137)), - Box(Box(5138, 5138), Box(5138, 5138)), - Box(Box(5139, 5139), Box(5139, 5139)), - Box(Box(5140, 5140), Box(5140, 5140)), - Box(Box(5141, 5141), Box(5141, 5141)), - Box(Box(5142, 5142), Box(5142, 5142)), - Box(Box(5143, 5143), Box(5143, 5143)), - Box(Box(5144, 5144), Box(5144, 5144)), - Box(Box(5145, 5145), Box(5145, 5145)), - Box(Box(5146, 5146), Box(5146, 5146)), - Box(Box(5147, 5147), Box(5147, 5147)), - Box(Box(5148, 5148), Box(5148, 5148)), - Box(Box(5149, 5149), Box(5149, 5149)), - Box(Box(5150, 5150), Box(5150, 5150)), - Box(Box(5151, 5151), Box(5151, 5151)), - Box(Box(5152, 5152), Box(5152, 5152)), - Box(Box(5153, 5153), Box(5153, 5153)), - Box(Box(5154, 5154), Box(5154, 5154)), - Box(Box(5155, 5155), Box(5155, 5155)), - Box(Box(5156, 5156), Box(5156, 5156)), - Box(Box(5157, 5157), Box(5157, 5157)), - Box(Box(5158, 5158), Box(5158, 5158)), - Box(Box(5159, 5159), Box(5159, 5159)), - Box(Box(5160, 5160), Box(5160, 5160)), - Box(Box(5161, 5161), Box(5161, 5161)), - Box(Box(5162, 5162), Box(5162, 5162)), - Box(Box(5163, 5163), Box(5163, 5163)), - Box(Box(5164, 5164), Box(5164, 5164)), - Box(Box(5165, 5165), Box(5165, 5165)), - Box(Box(5166, 5166), Box(5166, 5166)), - Box(Box(5167, 5167), Box(5167, 5167)), - Box(Box(5168, 5168), Box(5168, 5168)), - Box(Box(5169, 5169), Box(5169, 5169)), - Box(Box(5170, 5170), Box(5170, 5170)), - Box(Box(5171, 5171), Box(5171, 5171)), - Box(Box(5172, 5172), Box(5172, 5172)), - Box(Box(5173, 5173), Box(5173, 5173)), - Box(Box(5174, 5174), Box(5174, 5174)), - Box(Box(5175, 5175), Box(5175, 5175)), - Box(Box(5176, 5176), Box(5176, 5176)), - Box(Box(5177, 5177), Box(5177, 5177)), - Box(Box(5178, 5178), Box(5178, 5178)), - Box(Box(5179, 5179), Box(5179, 5179)), - Box(Box(5180, 5180), Box(5180, 5180)), - Box(Box(5181, 5181), Box(5181, 5181)), - Box(Box(5182, 5182), Box(5182, 5182)), - Box(Box(5183, 5183), Box(5183, 5183)), - Box(Box(5184, 5184), Box(5184, 5184)), - Box(Box(5185, 5185), Box(5185, 5185)), - Box(Box(5186, 5186), Box(5186, 5186)), - Box(Box(5187, 5187), Box(5187, 5187)), - Box(Box(5188, 5188), Box(5188, 5188)), - Box(Box(5189, 5189), Box(5189, 5189)), - Box(Box(5190, 5190), Box(5190, 5190)), - Box(Box(5191, 5191), Box(5191, 5191)), - Box(Box(5192, 5192), Box(5192, 5192)), - Box(Box(5193, 5193), Box(5193, 5193)), - Box(Box(5194, 5194), Box(5194, 5194)), - Box(Box(5195, 5195), Box(5195, 5195)), - Box(Box(5196, 5196), Box(5196, 5196)), - Box(Box(5197, 5197), Box(5197, 5197)), - Box(Box(5198, 5198), Box(5198, 5198)), - Box(Box(5199, 5199), Box(5199, 5199)), - Box(Box(5200, 5200), Box(5200, 5200)), - Box(Box(5201, 5201), Box(5201, 5201)), - Box(Box(5202, 5202), Box(5202, 5202)), - Box(Box(5203, 5203), Box(5203, 5203)), - Box(Box(5204, 5204), Box(5204, 5204)), - Box(Box(5205, 5205), Box(5205, 5205)), - Box(Box(5206, 5206), Box(5206, 5206)), - Box(Box(5207, 5207), Box(5207, 5207)), - Box(Box(5208, 5208), Box(5208, 5208)), - Box(Box(5209, 5209), Box(5209, 5209)), - Box(Box(5210, 5210), Box(5210, 5210)), - Box(Box(5211, 5211), Box(5211, 5211)), - Box(Box(5212, 5212), Box(5212, 5212)), - Box(Box(5213, 5213), Box(5213, 5213)), - Box(Box(5214, 5214), Box(5214, 5214)), - Box(Box(5215, 5215), Box(5215, 5215)), - Box(Box(5216, 5216), Box(5216, 5216)), - Box(Box(5217, 5217), Box(5217, 5217)), - Box(Box(5218, 5218), Box(5218, 5218)), - Box(Box(5219, 5219), Box(5219, 5219)), - Box(Box(5220, 5220), Box(5220, 5220)), - Box(Box(5221, 5221), Box(5221, 5221)), - Box(Box(5222, 5222), Box(5222, 5222)), - Box(Box(5223, 5223), Box(5223, 5223)), - Box(Box(5224, 5224), Box(5224, 5224)), - Box(Box(5225, 5225), Box(5225, 5225)), - Box(Box(5226, 5226), Box(5226, 5226)), - Box(Box(5227, 5227), Box(5227, 5227)), - Box(Box(5228, 5228), Box(5228, 5228)), - Box(Box(5229, 5229), Box(5229, 5229)), - Box(Box(5230, 5230), Box(5230, 5230)), - Box(Box(5231, 5231), Box(5231, 5231)), - Box(Box(5232, 5232), Box(5232, 5232)), - Box(Box(5233, 5233), Box(5233, 5233)), - Box(Box(5234, 5234), Box(5234, 5234)), - Box(Box(5235, 5235), Box(5235, 5235)), - Box(Box(5236, 5236), Box(5236, 5236)), - Box(Box(5237, 5237), Box(5237, 5237)), - Box(Box(5238, 5238), Box(5238, 5238)), - Box(Box(5239, 5239), Box(5239, 5239)), - Box(Box(5240, 5240), Box(5240, 5240)), - Box(Box(5241, 5241), Box(5241, 5241)), - Box(Box(5242, 5242), Box(5242, 5242)), - Box(Box(5243, 5243), Box(5243, 5243)), - Box(Box(5244, 5244), Box(5244, 5244)), - Box(Box(5245, 5245), Box(5245, 5245)), - Box(Box(5246, 5246), Box(5246, 5246)), - Box(Box(5247, 5247), Box(5247, 5247)), - Box(Box(5248, 5248), Box(5248, 5248)), - Box(Box(5249, 5249), Box(5249, 5249)), - Box(Box(5250, 5250), Box(5250, 5250)), - Box(Box(5251, 5251), Box(5251, 5251)), - Box(Box(5252, 5252), Box(5252, 5252)), - Box(Box(5253, 5253), Box(5253, 5253)), - Box(Box(5254, 5254), Box(5254, 5254)), - Box(Box(5255, 5255), Box(5255, 5255)), - Box(Box(5256, 5256), Box(5256, 5256)), - Box(Box(5257, 5257), Box(5257, 5257)), - Box(Box(5258, 5258), Box(5258, 5258)), - Box(Box(5259, 5259), Box(5259, 5259)), - Box(Box(5260, 5260), Box(5260, 5260)), - Box(Box(5261, 5261), Box(5261, 5261)), - Box(Box(5262, 5262), Box(5262, 5262)), - Box(Box(5263, 5263), Box(5263, 5263)), - Box(Box(5264, 5264), Box(5264, 5264)), - Box(Box(5265, 5265), Box(5265, 5265)), - Box(Box(5266, 5266), Box(5266, 5266)), - Box(Box(5267, 5267), Box(5267, 5267)), - Box(Box(5268, 5268), Box(5268, 5268)), - Box(Box(5269, 5269), Box(5269, 5269)), - Box(Box(5270, 5270), Box(5270, 5270)), - Box(Box(5271, 5271), Box(5271, 5271)), - Box(Box(5272, 5272), Box(5272, 5272)), - Box(Box(5273, 5273), Box(5273, 5273)), - Box(Box(5274, 5274), Box(5274, 5274)), - Box(Box(5275, 5275), Box(5275, 5275)), - Box(Box(5276, 5276), Box(5276, 5276)), - Box(Box(5277, 5277), Box(5277, 5277)), - Box(Box(5278, 5278), Box(5278, 5278)), - Box(Box(5279, 5279), Box(5279, 5279)), - Box(Box(5280, 5280), Box(5280, 5280)), - Box(Box(5281, 5281), Box(5281, 5281)), - Box(Box(5282, 5282), Box(5282, 5282)), - Box(Box(5283, 5283), Box(5283, 5283)), - Box(Box(5284, 5284), Box(5284, 5284)), - Box(Box(5285, 5285), Box(5285, 5285)), - Box(Box(5286, 5286), Box(5286, 5286)), - Box(Box(5287, 5287), Box(5287, 5287)), - Box(Box(5288, 5288), Box(5288, 5288)), - Box(Box(5289, 5289), Box(5289, 5289)), - Box(Box(5290, 5290), Box(5290, 5290)), - Box(Box(5291, 5291), Box(5291, 5291)), - Box(Box(5292, 5292), Box(5292, 5292)), - Box(Box(5293, 5293), Box(5293, 5293)), - Box(Box(5294, 5294), Box(5294, 5294)), - Box(Box(5295, 5295), Box(5295, 5295)), - Box(Box(5296, 5296), Box(5296, 5296)), - Box(Box(5297, 5297), Box(5297, 5297)), - Box(Box(5298, 5298), Box(5298, 5298)), - Box(Box(5299, 5299), Box(5299, 5299)), - Box(Box(5300, 5300), Box(5300, 5300)), - Box(Box(5301, 5301), Box(5301, 5301)), - Box(Box(5302, 5302), Box(5302, 5302)), - Box(Box(5303, 5303), Box(5303, 5303)), - Box(Box(5304, 5304), Box(5304, 5304)), - Box(Box(5305, 5305), Box(5305, 5305)), - Box(Box(5306, 5306), Box(5306, 5306)), - Box(Box(5307, 5307), Box(5307, 5307)), - Box(Box(5308, 5308), Box(5308, 5308)), - Box(Box(5309, 5309), Box(5309, 5309)), - Box(Box(5310, 5310), Box(5310, 5310)), - Box(Box(5311, 5311), Box(5311, 5311)), - Box(Box(5312, 5312), Box(5312, 5312)), - Box(Box(5313, 5313), Box(5313, 5313)), - Box(Box(5314, 5314), Box(5314, 5314)), - Box(Box(5315, 5315), Box(5315, 5315)), - Box(Box(5316, 5316), Box(5316, 5316)), - Box(Box(5317, 5317), Box(5317, 5317)), - Box(Box(5318, 5318), Box(5318, 5318)), - Box(Box(5319, 5319), Box(5319, 5319)), - Box(Box(5320, 5320), Box(5320, 5320)), - Box(Box(5321, 5321), Box(5321, 5321)), - Box(Box(5322, 5322), Box(5322, 5322)), - Box(Box(5323, 5323), Box(5323, 5323)), - Box(Box(5324, 5324), Box(5324, 5324)), - Box(Box(5325, 5325), Box(5325, 5325)), - Box(Box(5326, 5326), Box(5326, 5326)), - Box(Box(5327, 5327), Box(5327, 5327)), - Box(Box(5328, 5328), Box(5328, 5328)), - Box(Box(5329, 5329), Box(5329, 5329)), - Box(Box(5330, 5330), Box(5330, 5330)), - Box(Box(5331, 5331), Box(5331, 5331)), - Box(Box(5332, 5332), Box(5332, 5332)), - Box(Box(5333, 5333), Box(5333, 5333)), - Box(Box(5334, 5334), Box(5334, 5334)), - Box(Box(5335, 5335), Box(5335, 5335)), - Box(Box(5336, 5336), Box(5336, 5336)), - Box(Box(5337, 5337), Box(5337, 5337)), - Box(Box(5338, 5338), Box(5338, 5338)), - Box(Box(5339, 5339), Box(5339, 5339)), - Box(Box(5340, 5340), Box(5340, 5340)), - Box(Box(5341, 5341), Box(5341, 5341)), - Box(Box(5342, 5342), Box(5342, 5342)), - Box(Box(5343, 5343), Box(5343, 5343)), - Box(Box(5344, 5344), Box(5344, 5344)), - Box(Box(5345, 5345), Box(5345, 5345)), - Box(Box(5346, 5346), Box(5346, 5346)), - Box(Box(5347, 5347), Box(5347, 5347)), - Box(Box(5348, 5348), Box(5348, 5348)), - Box(Box(5349, 5349), Box(5349, 5349)), - Box(Box(5350, 5350), Box(5350, 5350)), - Box(Box(5351, 5351), Box(5351, 5351)), - Box(Box(5352, 5352), Box(5352, 5352)), - Box(Box(5353, 5353), Box(5353, 5353)), - Box(Box(5354, 5354), Box(5354, 5354)), - Box(Box(5355, 5355), Box(5355, 5355)), - Box(Box(5356, 5356), Box(5356, 5356)), - Box(Box(5357, 5357), Box(5357, 5357)), - Box(Box(5358, 5358), Box(5358, 5358)), - Box(Box(5359, 5359), Box(5359, 5359)), - Box(Box(5360, 5360), Box(5360, 5360)), - Box(Box(5361, 5361), Box(5361, 5361)), - Box(Box(5362, 5362), Box(5362, 5362)), - Box(Box(5363, 5363), Box(5363, 5363)), - Box(Box(5364, 5364), Box(5364, 5364)), - Box(Box(5365, 5365), Box(5365, 5365)), - Box(Box(5366, 5366), Box(5366, 5366)), - Box(Box(5367, 5367), Box(5367, 5367)), - Box(Box(5368, 5368), Box(5368, 5368)), - Box(Box(5369, 5369), Box(5369, 5369)), - Box(Box(5370, 5370), Box(5370, 5370)), - Box(Box(5371, 5371), Box(5371, 5371)), - Box(Box(5372, 5372), Box(5372, 5372)), - Box(Box(5373, 5373), Box(5373, 5373)), - Box(Box(5374, 5374), Box(5374, 5374)), - Box(Box(5375, 5375), Box(5375, 5375)), - Box(Box(5376, 5376), Box(5376, 5376)), - Box(Box(5377, 5377), Box(5377, 5377)), - Box(Box(5378, 5378), Box(5378, 5378)), - Box(Box(5379, 5379), Box(5379, 5379)), - Box(Box(5380, 5380), Box(5380, 5380)), - Box(Box(5381, 5381), Box(5381, 5381)), - Box(Box(5382, 5382), Box(5382, 5382)), - Box(Box(5383, 5383), Box(5383, 5383)), - Box(Box(5384, 5384), Box(5384, 5384)), - Box(Box(5385, 5385), Box(5385, 5385)), - Box(Box(5386, 5386), Box(5386, 5386)), - Box(Box(5387, 5387), Box(5387, 5387)), - Box(Box(5388, 5388), Box(5388, 5388)), - Box(Box(5389, 5389), Box(5389, 5389)), - Box(Box(5390, 5390), Box(5390, 5390)), - Box(Box(5391, 5391), Box(5391, 5391)), - Box(Box(5392, 5392), Box(5392, 5392)), - Box(Box(5393, 5393), Box(5393, 5393)), - Box(Box(5394, 5394), Box(5394, 5394)), - Box(Box(5395, 5395), Box(5395, 5395)), - Box(Box(5396, 5396), Box(5396, 5396)), - Box(Box(5397, 5397), Box(5397, 5397)), - Box(Box(5398, 5398), Box(5398, 5398)), - Box(Box(5399, 5399), Box(5399, 5399)), - Box(Box(5400, 5400), Box(5400, 5400)), - Box(Box(5401, 5401), Box(5401, 5401)), - Box(Box(5402, 5402), Box(5402, 5402)), - Box(Box(5403, 5403), Box(5403, 5403)), - Box(Box(5404, 5404), Box(5404, 5404)), - Box(Box(5405, 5405), Box(5405, 5405)), - Box(Box(5406, 5406), Box(5406, 5406)), - Box(Box(5407, 5407), Box(5407, 5407)), - Box(Box(5408, 5408), Box(5408, 5408)), - Box(Box(5409, 5409), Box(5409, 5409)), - Box(Box(5410, 5410), Box(5410, 5410)), - Box(Box(5411, 5411), Box(5411, 5411)), - Box(Box(5412, 5412), Box(5412, 5412)), - Box(Box(5413, 5413), Box(5413, 5413)), - Box(Box(5414, 5414), Box(5414, 5414)), - Box(Box(5415, 5415), Box(5415, 5415)), - Box(Box(5416, 5416), Box(5416, 5416)), - Box(Box(5417, 5417), Box(5417, 5417)), - Box(Box(5418, 5418), Box(5418, 5418)), - Box(Box(5419, 5419), Box(5419, 5419)), - Box(Box(5420, 5420), Box(5420, 5420)), - Box(Box(5421, 5421), Box(5421, 5421)), - Box(Box(5422, 5422), Box(5422, 5422)), - Box(Box(5423, 5423), Box(5423, 5423)), - Box(Box(5424, 5424), Box(5424, 5424)), - Box(Box(5425, 5425), Box(5425, 5425)), - Box(Box(5426, 5426), Box(5426, 5426)), - Box(Box(5427, 5427), Box(5427, 5427)), - Box(Box(5428, 5428), Box(5428, 5428)), - Box(Box(5429, 5429), Box(5429, 5429)), - Box(Box(5430, 5430), Box(5430, 5430)), - Box(Box(5431, 5431), Box(5431, 5431)), - Box(Box(5432, 5432), Box(5432, 5432)), - Box(Box(5433, 5433), Box(5433, 5433)), - Box(Box(5434, 5434), Box(5434, 5434)), - Box(Box(5435, 5435), Box(5435, 5435)), - Box(Box(5436, 5436), Box(5436, 5436)), - Box(Box(5437, 5437), Box(5437, 5437)), - Box(Box(5438, 5438), Box(5438, 5438)), - Box(Box(5439, 5439), Box(5439, 5439)), - Box(Box(5440, 5440), Box(5440, 5440)), - Box(Box(5441, 5441), Box(5441, 5441)), - Box(Box(5442, 5442), Box(5442, 5442)), - Box(Box(5443, 5443), Box(5443, 5443)), - Box(Box(5444, 5444), Box(5444, 5444)), - Box(Box(5445, 5445), Box(5445, 5445)), - Box(Box(5446, 5446), Box(5446, 5446)), - Box(Box(5447, 5447), Box(5447, 5447)), - Box(Box(5448, 5448), Box(5448, 5448)), - Box(Box(5449, 5449), Box(5449, 5449)), - Box(Box(5450, 5450), Box(5450, 5450)), - Box(Box(5451, 5451), Box(5451, 5451)), - Box(Box(5452, 5452), Box(5452, 5452)), - Box(Box(5453, 5453), Box(5453, 5453)), - Box(Box(5454, 5454), Box(5454, 5454)), - Box(Box(5455, 5455), Box(5455, 5455)), - Box(Box(5456, 5456), Box(5456, 5456)), - Box(Box(5457, 5457), Box(5457, 5457)), - Box(Box(5458, 5458), Box(5458, 5458)), - Box(Box(5459, 5459), Box(5459, 5459)), - Box(Box(5460, 5460), Box(5460, 5460)), - Box(Box(5461, 5461), Box(5461, 5461)), - Box(Box(5462, 5462), Box(5462, 5462)), - Box(Box(5463, 5463), Box(5463, 5463)), - Box(Box(5464, 5464), Box(5464, 5464)), - Box(Box(5465, 5465), Box(5465, 5465)), - Box(Box(5466, 5466), Box(5466, 5466)), - Box(Box(5467, 5467), Box(5467, 5467)), - Box(Box(5468, 5468), Box(5468, 5468)), - Box(Box(5469, 5469), Box(5469, 5469)), - Box(Box(5470, 5470), Box(5470, 5470)), - Box(Box(5471, 5471), Box(5471, 5471)), - Box(Box(5472, 5472), Box(5472, 5472)), - Box(Box(5473, 5473), Box(5473, 5473)), - Box(Box(5474, 5474), Box(5474, 5474)), - Box(Box(5475, 5475), Box(5475, 5475)), - Box(Box(5476, 5476), Box(5476, 5476)), - Box(Box(5477, 5477), Box(5477, 5477)), - Box(Box(5478, 5478), Box(5478, 5478)), - Box(Box(5479, 5479), Box(5479, 5479)), - Box(Box(5480, 5480), Box(5480, 5480)), - Box(Box(5481, 5481), Box(5481, 5481)), - Box(Box(5482, 5482), Box(5482, 5482)), - Box(Box(5483, 5483), Box(5483, 5483)), - Box(Box(5484, 5484), Box(5484, 5484)), - Box(Box(5485, 5485), Box(5485, 5485)), - Box(Box(5486, 5486), Box(5486, 5486)), - Box(Box(5487, 5487), Box(5487, 5487)), - Box(Box(5488, 5488), Box(5488, 5488)), - Box(Box(5489, 5489), Box(5489, 5489)), - Box(Box(5490, 5490), Box(5490, 5490)), - Box(Box(5491, 5491), Box(5491, 5491)), - Box(Box(5492, 5492), Box(5492, 5492)), - Box(Box(5493, 5493), Box(5493, 5493)), - Box(Box(5494, 5494), Box(5494, 5494)), - Box(Box(5495, 5495), Box(5495, 5495)), - Box(Box(5496, 5496), Box(5496, 5496)), - Box(Box(5497, 5497), Box(5497, 5497)), - Box(Box(5498, 5498), Box(5498, 5498)), - Box(Box(5499, 5499), Box(5499, 5499)), - Box(Box(5500, 5500), Box(5500, 5500)), - Box(Box(5501, 5501), Box(5501, 5501)), - Box(Box(5502, 5502), Box(5502, 5502)), - Box(Box(5503, 5503), Box(5503, 5503)), - Box(Box(5504, 5504), Box(5504, 5504)), - Box(Box(5505, 5505), Box(5505, 5505)), - Box(Box(5506, 5506), Box(5506, 5506)), - Box(Box(5507, 5507), Box(5507, 5507)), - Box(Box(5508, 5508), Box(5508, 5508)), - Box(Box(5509, 5509), Box(5509, 5509)), - Box(Box(5510, 5510), Box(5510, 5510)), - Box(Box(5511, 5511), Box(5511, 5511)), - Box(Box(5512, 5512), Box(5512, 5512)), - Box(Box(5513, 5513), Box(5513, 5513)), - Box(Box(5514, 5514), Box(5514, 5514)), - Box(Box(5515, 5515), Box(5515, 5515)), - Box(Box(5516, 5516), Box(5516, 5516)), - Box(Box(5517, 5517), Box(5517, 5517)), - Box(Box(5518, 5518), Box(5518, 5518)), - Box(Box(5519, 5519), Box(5519, 5519)), - Box(Box(5520, 5520), Box(5520, 5520)), - Box(Box(5521, 5521), Box(5521, 5521)), - Box(Box(5522, 5522), Box(5522, 5522)), - Box(Box(5523, 5523), Box(5523, 5523)), - Box(Box(5524, 5524), Box(5524, 5524)), - Box(Box(5525, 5525), Box(5525, 5525)), - Box(Box(5526, 5526), Box(5526, 5526)), - Box(Box(5527, 5527), Box(5527, 5527)), - Box(Box(5528, 5528), Box(5528, 5528)), - Box(Box(5529, 5529), Box(5529, 5529)), - Box(Box(5530, 5530), Box(5530, 5530)), - Box(Box(5531, 5531), Box(5531, 5531)), - Box(Box(5532, 5532), Box(5532, 5532)), - Box(Box(5533, 5533), Box(5533, 5533)), - Box(Box(5534, 5534), Box(5534, 5534)), - Box(Box(5535, 5535), Box(5535, 5535)), - Box(Box(5536, 5536), Box(5536, 5536)), - Box(Box(5537, 5537), Box(5537, 5537)), - Box(Box(5538, 5538), Box(5538, 5538)), - Box(Box(5539, 5539), Box(5539, 5539)), - Box(Box(5540, 5540), Box(5540, 5540)), - Box(Box(5541, 5541), Box(5541, 5541)), - Box(Box(5542, 5542), Box(5542, 5542)), - Box(Box(5543, 5543), Box(5543, 5543)), - Box(Box(5544, 5544), Box(5544, 5544)), - Box(Box(5545, 5545), Box(5545, 5545)), - Box(Box(5546, 5546), Box(5546, 5546)), - Box(Box(5547, 5547), Box(5547, 5547)), - Box(Box(5548, 5548), Box(5548, 5548)), - Box(Box(5549, 5549), Box(5549, 5549)), - Box(Box(5550, 5550), Box(5550, 5550)), - Box(Box(5551, 5551), Box(5551, 5551)), - Box(Box(5552, 5552), Box(5552, 5552)), - Box(Box(5553, 5553), Box(5553, 5553)), - Box(Box(5554, 5554), Box(5554, 5554)), - Box(Box(5555, 5555), Box(5555, 5555)), - Box(Box(5556, 5556), Box(5556, 5556)), - Box(Box(5557, 5557), Box(5557, 5557)), - Box(Box(5558, 5558), Box(5558, 5558)), - Box(Box(5559, 5559), Box(5559, 5559)), - Box(Box(5560, 5560), Box(5560, 5560)), - Box(Box(5561, 5561), Box(5561, 5561)), - Box(Box(5562, 5562), Box(5562, 5562)), - Box(Box(5563, 5563), Box(5563, 5563)), - Box(Box(5564, 5564), Box(5564, 5564)), - Box(Box(5565, 5565), Box(5565, 5565)), - Box(Box(5566, 5566), Box(5566, 5566)), - Box(Box(5567, 5567), Box(5567, 5567)), - Box(Box(5568, 5568), Box(5568, 5568)), - Box(Box(5569, 5569), Box(5569, 5569)), - Box(Box(5570, 5570), Box(5570, 5570)), - Box(Box(5571, 5571), Box(5571, 5571)), - Box(Box(5572, 5572), Box(5572, 5572)), - Box(Box(5573, 5573), Box(5573, 5573)), - Box(Box(5574, 5574), Box(5574, 5574)), - Box(Box(5575, 5575), Box(5575, 5575)), - Box(Box(5576, 5576), Box(5576, 5576)), - Box(Box(5577, 5577), Box(5577, 5577)), - Box(Box(5578, 5578), Box(5578, 5578)), - Box(Box(5579, 5579), Box(5579, 5579)), - Box(Box(5580, 5580), Box(5580, 5580)), - Box(Box(5581, 5581), Box(5581, 5581)), - Box(Box(5582, 5582), Box(5582, 5582)), - Box(Box(5583, 5583), Box(5583, 5583)), - Box(Box(5584, 5584), Box(5584, 5584)), - Box(Box(5585, 5585), Box(5585, 5585)), - Box(Box(5586, 5586), Box(5586, 5586)), - Box(Box(5587, 5587), Box(5587, 5587)), - Box(Box(5588, 5588), Box(5588, 5588)), - Box(Box(5589, 5589), Box(5589, 5589)), - Box(Box(5590, 5590), Box(5590, 5590)), - Box(Box(5591, 5591), Box(5591, 5591)), - Box(Box(5592, 5592), Box(5592, 5592)), - Box(Box(5593, 5593), Box(5593, 5593)), - Box(Box(5594, 5594), Box(5594, 5594)), - Box(Box(5595, 5595), Box(5595, 5595)), - Box(Box(5596, 5596), Box(5596, 5596)), - Box(Box(5597, 5597), Box(5597, 5597)), - Box(Box(5598, 5598), Box(5598, 5598)), - Box(Box(5599, 5599), Box(5599, 5599)), - Box(Box(5600, 5600), Box(5600, 5600)), - Box(Box(5601, 5601), Box(5601, 5601)), - Box(Box(5602, 5602), Box(5602, 5602)), - Box(Box(5603, 5603), Box(5603, 5603)), - Box(Box(5604, 5604), Box(5604, 5604)), - Box(Box(5605, 5605), Box(5605, 5605)), - Box(Box(5606, 5606), Box(5606, 5606)), - Box(Box(5607, 5607), Box(5607, 5607)), - Box(Box(5608, 5608), Box(5608, 5608)), - Box(Box(5609, 5609), Box(5609, 5609)), - Box(Box(5610, 5610), Box(5610, 5610)), - Box(Box(5611, 5611), Box(5611, 5611)), - Box(Box(5612, 5612), Box(5612, 5612)), - Box(Box(5613, 5613), Box(5613, 5613)), - Box(Box(5614, 5614), Box(5614, 5614)), - Box(Box(5615, 5615), Box(5615, 5615)), - Box(Box(5616, 5616), Box(5616, 5616)), - Box(Box(5617, 5617), Box(5617, 5617)), - Box(Box(5618, 5618), Box(5618, 5618)), - Box(Box(5619, 5619), Box(5619, 5619)), - Box(Box(5620, 5620), Box(5620, 5620)), - Box(Box(5621, 5621), Box(5621, 5621)), - Box(Box(5622, 5622), Box(5622, 5622)), - Box(Box(5623, 5623), Box(5623, 5623)), - Box(Box(5624, 5624), Box(5624, 5624)), - Box(Box(5625, 5625), Box(5625, 5625)), - Box(Box(5626, 5626), Box(5626, 5626)), - Box(Box(5627, 5627), Box(5627, 5627)), - Box(Box(5628, 5628), Box(5628, 5628)), - Box(Box(5629, 5629), Box(5629, 5629)), - Box(Box(5630, 5630), Box(5630, 5630)), - Box(Box(5631, 5631), Box(5631, 5631)), - Box(Box(5632, 5632), Box(5632, 5632)), - Box(Box(5633, 5633), Box(5633, 5633)), - Box(Box(5634, 5634), Box(5634, 5634)), - Box(Box(5635, 5635), Box(5635, 5635)), - Box(Box(5636, 5636), Box(5636, 5636)), - Box(Box(5637, 5637), Box(5637, 5637)), - Box(Box(5638, 5638), Box(5638, 5638)), - Box(Box(5639, 5639), Box(5639, 5639)), - Box(Box(5640, 5640), Box(5640, 5640)), - Box(Box(5641, 5641), Box(5641, 5641)), - Box(Box(5642, 5642), Box(5642, 5642)), - Box(Box(5643, 5643), Box(5643, 5643)), - Box(Box(5644, 5644), Box(5644, 5644)), - Box(Box(5645, 5645), Box(5645, 5645)), - Box(Box(5646, 5646), Box(5646, 5646)), - Box(Box(5647, 5647), Box(5647, 5647)), - Box(Box(5648, 5648), Box(5648, 5648)), - Box(Box(5649, 5649), Box(5649, 5649)), - Box(Box(5650, 5650), Box(5650, 5650)), - Box(Box(5651, 5651), Box(5651, 5651)), - Box(Box(5652, 5652), Box(5652, 5652)), - Box(Box(5653, 5653), Box(5653, 5653)), - Box(Box(5654, 5654), Box(5654, 5654)), - Box(Box(5655, 5655), Box(5655, 5655)), - Box(Box(5656, 5656), Box(5656, 5656)), - Box(Box(5657, 5657), Box(5657, 5657)), - Box(Box(5658, 5658), Box(5658, 5658)), - Box(Box(5659, 5659), Box(5659, 5659)), - Box(Box(5660, 5660), Box(5660, 5660)), - Box(Box(5661, 5661), Box(5661, 5661)), - Box(Box(5662, 5662), Box(5662, 5662)), - Box(Box(5663, 5663), Box(5663, 5663)), - Box(Box(5664, 5664), Box(5664, 5664)), - Box(Box(5665, 5665), Box(5665, 5665)), - Box(Box(5666, 5666), Box(5666, 5666)), - Box(Box(5667, 5667), Box(5667, 5667)), - Box(Box(5668, 5668), Box(5668, 5668)), - Box(Box(5669, 5669), Box(5669, 5669)), - Box(Box(5670, 5670), Box(5670, 5670)), - Box(Box(5671, 5671), Box(5671, 5671)), - Box(Box(5672, 5672), Box(5672, 5672)), - Box(Box(5673, 5673), Box(5673, 5673)), - Box(Box(5674, 5674), Box(5674, 5674)), - Box(Box(5675, 5675), Box(5675, 5675)), - Box(Box(5676, 5676), Box(5676, 5676)), - Box(Box(5677, 5677), Box(5677, 5677)), - Box(Box(5678, 5678), Box(5678, 5678)), - Box(Box(5679, 5679), Box(5679, 5679)), - Box(Box(5680, 5680), Box(5680, 5680)), - Box(Box(5681, 5681), Box(5681, 5681)), - Box(Box(5682, 5682), Box(5682, 5682)), - Box(Box(5683, 5683), Box(5683, 5683)), - Box(Box(5684, 5684), Box(5684, 5684)), - Box(Box(5685, 5685), Box(5685, 5685)), - Box(Box(5686, 5686), Box(5686, 5686)), - Box(Box(5687, 5687), Box(5687, 5687)), - Box(Box(5688, 5688), Box(5688, 5688)), - Box(Box(5689, 5689), Box(5689, 5689)), - Box(Box(5690, 5690), Box(5690, 5690)), - Box(Box(5691, 5691), Box(5691, 5691)), - Box(Box(5692, 5692), Box(5692, 5692)), - Box(Box(5693, 5693), Box(5693, 5693)), - Box(Box(5694, 5694), Box(5694, 5694)), - Box(Box(5695, 5695), Box(5695, 5695)), - Box(Box(5696, 5696), Box(5696, 5696)), - Box(Box(5697, 5697), Box(5697, 5697)), - Box(Box(5698, 5698), Box(5698, 5698)), - Box(Box(5699, 5699), Box(5699, 5699)), - Box(Box(5700, 5700), Box(5700, 5700)), - Box(Box(5701, 5701), Box(5701, 5701)), - Box(Box(5702, 5702), Box(5702, 5702)), - Box(Box(5703, 5703), Box(5703, 5703)), - Box(Box(5704, 5704), Box(5704, 5704)), - Box(Box(5705, 5705), Box(5705, 5705)), - Box(Box(5706, 5706), Box(5706, 5706)), - Box(Box(5707, 5707), Box(5707, 5707)), - Box(Box(5708, 5708), Box(5708, 5708)), - Box(Box(5709, 5709), Box(5709, 5709)), - Box(Box(5710, 5710), Box(5710, 5710)), - Box(Box(5711, 5711), Box(5711, 5711)), - Box(Box(5712, 5712), Box(5712, 5712)), - Box(Box(5713, 5713), Box(5713, 5713)), - Box(Box(5714, 5714), Box(5714, 5714)), - Box(Box(5715, 5715), Box(5715, 5715)), - Box(Box(5716, 5716), Box(5716, 5716)), - Box(Box(5717, 5717), Box(5717, 5717)), - Box(Box(5718, 5718), Box(5718, 5718)), - Box(Box(5719, 5719), Box(5719, 5719)), - Box(Box(5720, 5720), Box(5720, 5720)), - Box(Box(5721, 5721), Box(5721, 5721)), - Box(Box(5722, 5722), Box(5722, 5722)), - Box(Box(5723, 5723), Box(5723, 5723)), - Box(Box(5724, 5724), Box(5724, 5724)), - Box(Box(5725, 5725), Box(5725, 5725)), - Box(Box(5726, 5726), Box(5726, 5726)), - Box(Box(5727, 5727), Box(5727, 5727)), - Box(Box(5728, 5728), Box(5728, 5728)), - Box(Box(5729, 5729), Box(5729, 5729)), - Box(Box(5730, 5730), Box(5730, 5730)), - Box(Box(5731, 5731), Box(5731, 5731)), - Box(Box(5732, 5732), Box(5732, 5732)), - Box(Box(5733, 5733), Box(5733, 5733)), - Box(Box(5734, 5734), Box(5734, 5734)), - Box(Box(5735, 5735), Box(5735, 5735)), - Box(Box(5736, 5736), Box(5736, 5736)), - Box(Box(5737, 5737), Box(5737, 5737)), - Box(Box(5738, 5738), Box(5738, 5738)), - Box(Box(5739, 5739), Box(5739, 5739)), - Box(Box(5740, 5740), Box(5740, 5740)), - Box(Box(5741, 5741), Box(5741, 5741)), - Box(Box(5742, 5742), Box(5742, 5742)), - Box(Box(5743, 5743), Box(5743, 5743)), - Box(Box(5744, 5744), Box(5744, 5744)), - Box(Box(5745, 5745), Box(5745, 5745)), - Box(Box(5746, 5746), Box(5746, 5746)), - Box(Box(5747, 5747), Box(5747, 5747)), - Box(Box(5748, 5748), Box(5748, 5748)), - Box(Box(5749, 5749), Box(5749, 5749)), - Box(Box(5750, 5750), Box(5750, 5750)), - Box(Box(5751, 5751), Box(5751, 5751)), - Box(Box(5752, 5752), Box(5752, 5752)), - Box(Box(5753, 5753), Box(5753, 5753)), - Box(Box(5754, 5754), Box(5754, 5754)), - Box(Box(5755, 5755), Box(5755, 5755)), - Box(Box(5756, 5756), Box(5756, 5756)), - Box(Box(5757, 5757), Box(5757, 5757)), - Box(Box(5758, 5758), Box(5758, 5758)), - Box(Box(5759, 5759), Box(5759, 5759)), - Box(Box(5760, 5760), Box(5760, 5760)), - Box(Box(5761, 5761), Box(5761, 5761)), - Box(Box(5762, 5762), Box(5762, 5762)), - Box(Box(5763, 5763), Box(5763, 5763)), - Box(Box(5764, 5764), Box(5764, 5764)), - Box(Box(5765, 5765), Box(5765, 5765)), - Box(Box(5766, 5766), Box(5766, 5766)), - Box(Box(5767, 5767), Box(5767, 5767)), - Box(Box(5768, 5768), Box(5768, 5768)), - Box(Box(5769, 5769), Box(5769, 5769)), - Box(Box(5770, 5770), Box(5770, 5770)), - Box(Box(5771, 5771), Box(5771, 5771)), - Box(Box(5772, 5772), Box(5772, 5772)), - Box(Box(5773, 5773), Box(5773, 5773)), - Box(Box(5774, 5774), Box(5774, 5774)), - Box(Box(5775, 5775), Box(5775, 5775)), - Box(Box(5776, 5776), Box(5776, 5776)), - Box(Box(5777, 5777), Box(5777, 5777)), - Box(Box(5778, 5778), Box(5778, 5778)), - Box(Box(5779, 5779), Box(5779, 5779)), - Box(Box(5780, 5780), Box(5780, 5780)), - Box(Box(5781, 5781), Box(5781, 5781)), - Box(Box(5782, 5782), Box(5782, 5782)), - Box(Box(5783, 5783), Box(5783, 5783)), - Box(Box(5784, 5784), Box(5784, 5784)), - Box(Box(5785, 5785), Box(5785, 5785)), - Box(Box(5786, 5786), Box(5786, 5786)), - Box(Box(5787, 5787), Box(5787, 5787)), - Box(Box(5788, 5788), Box(5788, 5788)), - Box(Box(5789, 5789), Box(5789, 5789)), - Box(Box(5790, 5790), Box(5790, 5790)), - Box(Box(5791, 5791), Box(5791, 5791)), - Box(Box(5792, 5792), Box(5792, 5792)), - Box(Box(5793, 5793), Box(5793, 5793)), - Box(Box(5794, 5794), Box(5794, 5794)), - Box(Box(5795, 5795), Box(5795, 5795)), - Box(Box(5796, 5796), Box(5796, 5796)), - Box(Box(5797, 5797), Box(5797, 5797)), - Box(Box(5798, 5798), Box(5798, 5798)), - Box(Box(5799, 5799), Box(5799, 5799)), - Box(Box(5800, 5800), Box(5800, 5800)), - Box(Box(5801, 5801), Box(5801, 5801)), - Box(Box(5802, 5802), Box(5802, 5802)), - Box(Box(5803, 5803), Box(5803, 5803)), - Box(Box(5804, 5804), Box(5804, 5804)), - Box(Box(5805, 5805), Box(5805, 5805)), - Box(Box(5806, 5806), Box(5806, 5806)), - Box(Box(5807, 5807), Box(5807, 5807)), - Box(Box(5808, 5808), Box(5808, 5808)), - Box(Box(5809, 5809), Box(5809, 5809)), - Box(Box(5810, 5810), Box(5810, 5810)), - Box(Box(5811, 5811), Box(5811, 5811)), - Box(Box(5812, 5812), Box(5812, 5812)), - Box(Box(5813, 5813), Box(5813, 5813)), - Box(Box(5814, 5814), Box(5814, 5814)), - Box(Box(5815, 5815), Box(5815, 5815)), - Box(Box(5816, 5816), Box(5816, 5816)), - Box(Box(5817, 5817), Box(5817, 5817)), - Box(Box(5818, 5818), Box(5818, 5818)), - Box(Box(5819, 5819), Box(5819, 5819)), - Box(Box(5820, 5820), Box(5820, 5820)), - Box(Box(5821, 5821), Box(5821, 5821)), - Box(Box(5822, 5822), Box(5822, 5822)), - Box(Box(5823, 5823), Box(5823, 5823)), - Box(Box(5824, 5824), Box(5824, 5824)), - Box(Box(5825, 5825), Box(5825, 5825)), - Box(Box(5826, 5826), Box(5826, 5826)), - Box(Box(5827, 5827), Box(5827, 5827)), - Box(Box(5828, 5828), Box(5828, 5828)), - Box(Box(5829, 5829), Box(5829, 5829)), - Box(Box(5830, 5830), Box(5830, 5830)), - Box(Box(5831, 5831), Box(5831, 5831)), - Box(Box(5832, 5832), Box(5832, 5832)), - Box(Box(5833, 5833), Box(5833, 5833)), - Box(Box(5834, 5834), Box(5834, 5834)), - Box(Box(5835, 5835), Box(5835, 5835)), - Box(Box(5836, 5836), Box(5836, 5836)), - Box(Box(5837, 5837), Box(5837, 5837)), - Box(Box(5838, 5838), Box(5838, 5838)), - Box(Box(5839, 5839), Box(5839, 5839)), - Box(Box(5840, 5840), Box(5840, 5840)), - Box(Box(5841, 5841), Box(5841, 5841)), - Box(Box(5842, 5842), Box(5842, 5842)), - Box(Box(5843, 5843), Box(5843, 5843)), - Box(Box(5844, 5844), Box(5844, 5844)), - Box(Box(5845, 5845), Box(5845, 5845)), - Box(Box(5846, 5846), Box(5846, 5846)), - Box(Box(5847, 5847), Box(5847, 5847)), - Box(Box(5848, 5848), Box(5848, 5848)), - Box(Box(5849, 5849), Box(5849, 5849)), - Box(Box(5850, 5850), Box(5850, 5850)), - Box(Box(5851, 5851), Box(5851, 5851)), - Box(Box(5852, 5852), Box(5852, 5852)), - Box(Box(5853, 5853), Box(5853, 5853)), - Box(Box(5854, 5854), Box(5854, 5854)), - Box(Box(5855, 5855), Box(5855, 5855)), - Box(Box(5856, 5856), Box(5856, 5856)), - Box(Box(5857, 5857), Box(5857, 5857)), - Box(Box(5858, 5858), Box(5858, 5858)), - Box(Box(5859, 5859), Box(5859, 5859)), - Box(Box(5860, 5860), Box(5860, 5860)), - Box(Box(5861, 5861), Box(5861, 5861)), - Box(Box(5862, 5862), Box(5862, 5862)), - Box(Box(5863, 5863), Box(5863, 5863)), - Box(Box(5864, 5864), Box(5864, 5864)), - Box(Box(5865, 5865), Box(5865, 5865)), - Box(Box(5866, 5866), Box(5866, 5866)), - Box(Box(5867, 5867), Box(5867, 5867)), - Box(Box(5868, 5868), Box(5868, 5868)), - Box(Box(5869, 5869), Box(5869, 5869)), - Box(Box(5870, 5870), Box(5870, 5870)), - Box(Box(5871, 5871), Box(5871, 5871)), - Box(Box(5872, 5872), Box(5872, 5872)), - Box(Box(5873, 5873), Box(5873, 5873)), - Box(Box(5874, 5874), Box(5874, 5874)), - Box(Box(5875, 5875), Box(5875, 5875)), - Box(Box(5876, 5876), Box(5876, 5876)), - Box(Box(5877, 5877), Box(5877, 5877)), - Box(Box(5878, 5878), Box(5878, 5878)), - Box(Box(5879, 5879), Box(5879, 5879)), - Box(Box(5880, 5880), Box(5880, 5880)), - Box(Box(5881, 5881), Box(5881, 5881)), - Box(Box(5882, 5882), Box(5882, 5882)), - Box(Box(5883, 5883), Box(5883, 5883)), - Box(Box(5884, 5884), Box(5884, 5884)), - Box(Box(5885, 5885), Box(5885, 5885)), - Box(Box(5886, 5886), Box(5886, 5886)), - Box(Box(5887, 5887), Box(5887, 5887)), - Box(Box(5888, 5888), Box(5888, 5888)), - Box(Box(5889, 5889), Box(5889, 5889)), - Box(Box(5890, 5890), Box(5890, 5890)), - Box(Box(5891, 5891), Box(5891, 5891)), - Box(Box(5892, 5892), Box(5892, 5892)), - Box(Box(5893, 5893), Box(5893, 5893)), - Box(Box(5894, 5894), Box(5894, 5894)), - Box(Box(5895, 5895), Box(5895, 5895)), - Box(Box(5896, 5896), Box(5896, 5896)), - Box(Box(5897, 5897), Box(5897, 5897)), - Box(Box(5898, 5898), Box(5898, 5898)), - Box(Box(5899, 5899), Box(5899, 5899)), - Box(Box(5900, 5900), Box(5900, 5900)), - Box(Box(5901, 5901), Box(5901, 5901)), - Box(Box(5902, 5902), Box(5902, 5902)), - Box(Box(5903, 5903), Box(5903, 5903)), - Box(Box(5904, 5904), Box(5904, 5904)), - Box(Box(5905, 5905), Box(5905, 5905)), - Box(Box(5906, 5906), Box(5906, 5906)), - Box(Box(5907, 5907), Box(5907, 5907)), - Box(Box(5908, 5908), Box(5908, 5908)), - Box(Box(5909, 5909), Box(5909, 5909)), - Box(Box(5910, 5910), Box(5910, 5910)), - Box(Box(5911, 5911), Box(5911, 5911)), - Box(Box(5912, 5912), Box(5912, 5912)), - Box(Box(5913, 5913), Box(5913, 5913)), - Box(Box(5914, 5914), Box(5914, 5914)), - Box(Box(5915, 5915), Box(5915, 5915)), - Box(Box(5916, 5916), Box(5916, 5916)), - Box(Box(5917, 5917), Box(5917, 5917)), - Box(Box(5918, 5918), Box(5918, 5918)), - Box(Box(5919, 5919), Box(5919, 5919)), - Box(Box(5920, 5920), Box(5920, 5920)), - Box(Box(5921, 5921), Box(5921, 5921)), - Box(Box(5922, 5922), Box(5922, 5922)), - Box(Box(5923, 5923), Box(5923, 5923)), - Box(Box(5924, 5924), Box(5924, 5924)), - Box(Box(5925, 5925), Box(5925, 5925)), - Box(Box(5926, 5926), Box(5926, 5926)), - Box(Box(5927, 5927), Box(5927, 5927)), - Box(Box(5928, 5928), Box(5928, 5928)), - Box(Box(5929, 5929), Box(5929, 5929)), - Box(Box(5930, 5930), Box(5930, 5930)), - Box(Box(5931, 5931), Box(5931, 5931)), - Box(Box(5932, 5932), Box(5932, 5932)), - Box(Box(5933, 5933), Box(5933, 5933)), - Box(Box(5934, 5934), Box(5934, 5934)), - Box(Box(5935, 5935), Box(5935, 5935)), - Box(Box(5936, 5936), Box(5936, 5936)), - Box(Box(5937, 5937), Box(5937, 5937)), - Box(Box(5938, 5938), Box(5938, 5938)), - Box(Box(5939, 5939), Box(5939, 5939)), - Box(Box(5940, 5940), Box(5940, 5940)), - Box(Box(5941, 5941), Box(5941, 5941)), - Box(Box(5942, 5942), Box(5942, 5942)), - Box(Box(5943, 5943), Box(5943, 5943)), - Box(Box(5944, 5944), Box(5944, 5944)), - Box(Box(5945, 5945), Box(5945, 5945)), - Box(Box(5946, 5946), Box(5946, 5946)), - Box(Box(5947, 5947), Box(5947, 5947)), - Box(Box(5948, 5948), Box(5948, 5948)), - Box(Box(5949, 5949), Box(5949, 5949)), - Box(Box(5950, 5950), Box(5950, 5950)), - Box(Box(5951, 5951), Box(5951, 5951)), - Box(Box(5952, 5952), Box(5952, 5952)), - Box(Box(5953, 5953), Box(5953, 5953)), - Box(Box(5954, 5954), Box(5954, 5954)), - Box(Box(5955, 5955), Box(5955, 5955)), - Box(Box(5956, 5956), Box(5956, 5956)), - Box(Box(5957, 5957), Box(5957, 5957)), - Box(Box(5958, 5958), Box(5958, 5958)), - Box(Box(5959, 5959), Box(5959, 5959)), - Box(Box(5960, 5960), Box(5960, 5960)), - Box(Box(5961, 5961), Box(5961, 5961)), - Box(Box(5962, 5962), Box(5962, 5962)), - Box(Box(5963, 5963), Box(5963, 5963)), - Box(Box(5964, 5964), Box(5964, 5964)), - Box(Box(5965, 5965), Box(5965, 5965)), - Box(Box(5966, 5966), Box(5966, 5966)), - Box(Box(5967, 5967), Box(5967, 5967)), - Box(Box(5968, 5968), Box(5968, 5968)), - Box(Box(5969, 5969), Box(5969, 5969)), - Box(Box(5970, 5970), Box(5970, 5970)), - Box(Box(5971, 5971), Box(5971, 5971)), - Box(Box(5972, 5972), Box(5972, 5972)), - Box(Box(5973, 5973), Box(5973, 5973)), - Box(Box(5974, 5974), Box(5974, 5974)), - Box(Box(5975, 5975), Box(5975, 5975)), - Box(Box(5976, 5976), Box(5976, 5976)), - Box(Box(5977, 5977), Box(5977, 5977)), - Box(Box(5978, 5978), Box(5978, 5978)), - Box(Box(5979, 5979), Box(5979, 5979)), - Box(Box(5980, 5980), Box(5980, 5980)), - Box(Box(5981, 5981), Box(5981, 5981)), - Box(Box(5982, 5982), Box(5982, 5982)), - Box(Box(5983, 5983), Box(5983, 5983)), - Box(Box(5984, 5984), Box(5984, 5984)), - Box(Box(5985, 5985), Box(5985, 5985)), - Box(Box(5986, 5986), Box(5986, 5986)), - Box(Box(5987, 5987), Box(5987, 5987)), - Box(Box(5988, 5988), Box(5988, 5988)), - Box(Box(5989, 5989), Box(5989, 5989)), - Box(Box(5990, 5990), Box(5990, 5990)), - Box(Box(5991, 5991), Box(5991, 5991)), - Box(Box(5992, 5992), Box(5992, 5992)), - Box(Box(5993, 5993), Box(5993, 5993)), - Box(Box(5994, 5994), Box(5994, 5994)), - Box(Box(5995, 5995), Box(5995, 5995)), - Box(Box(5996, 5996), Box(5996, 5996)), - Box(Box(5997, 5997), Box(5997, 5997)), - Box(Box(5998, 5998), Box(5998, 5998)), - Box(Box(5999, 5999), Box(5999, 5999)), - Box(Box(6000, 6000), Box(6000, 6000)), - Box(Box(6001, 6001), Box(6001, 6001)), - Box(Box(6002, 6002), Box(6002, 6002)), - Box(Box(6003, 6003), Box(6003, 6003)), - Box(Box(6004, 6004), Box(6004, 6004)), - Box(Box(6005, 6005), Box(6005, 6005)), - Box(Box(6006, 6006), Box(6006, 6006)), - Box(Box(6007, 6007), Box(6007, 6007)), - Box(Box(6008, 6008), Box(6008, 6008)), - Box(Box(6009, 6009), Box(6009, 6009)), - Box(Box(6010, 6010), Box(6010, 6010)), - Box(Box(6011, 6011), Box(6011, 6011)), - Box(Box(6012, 6012), Box(6012, 6012)), - Box(Box(6013, 6013), Box(6013, 6013)), - Box(Box(6014, 6014), Box(6014, 6014)), - Box(Box(6015, 6015), Box(6015, 6015)), - Box(Box(6016, 6016), Box(6016, 6016)), - Box(Box(6017, 6017), Box(6017, 6017)), - Box(Box(6018, 6018), Box(6018, 6018)), - Box(Box(6019, 6019), Box(6019, 6019)), - Box(Box(6020, 6020), Box(6020, 6020)), - Box(Box(6021, 6021), Box(6021, 6021)), - Box(Box(6022, 6022), Box(6022, 6022)), - Box(Box(6023, 6023), Box(6023, 6023)), - Box(Box(6024, 6024), Box(6024, 6024)), - Box(Box(6025, 6025), Box(6025, 6025)), - Box(Box(6026, 6026), Box(6026, 6026)), - Box(Box(6027, 6027), Box(6027, 6027)), - Box(Box(6028, 6028), Box(6028, 6028)), - Box(Box(6029, 6029), Box(6029, 6029)), - Box(Box(6030, 6030), Box(6030, 6030)), - Box(Box(6031, 6031), Box(6031, 6031)), - Box(Box(6032, 6032), Box(6032, 6032)), - Box(Box(6033, 6033), Box(6033, 6033)), - Box(Box(6034, 6034), Box(6034, 6034)), - Box(Box(6035, 6035), Box(6035, 6035)), - Box(Box(6036, 6036), Box(6036, 6036)), - Box(Box(6037, 6037), Box(6037, 6037)), - Box(Box(6038, 6038), Box(6038, 6038)), - Box(Box(6039, 6039), Box(6039, 6039)), - Box(Box(6040, 6040), Box(6040, 6040)), - Box(Box(6041, 6041), Box(6041, 6041)), - Box(Box(6042, 6042), Box(6042, 6042)), - Box(Box(6043, 6043), Box(6043, 6043)), - Box(Box(6044, 6044), Box(6044, 6044)), - Box(Box(6045, 6045), Box(6045, 6045)), - Box(Box(6046, 6046), Box(6046, 6046)), - Box(Box(6047, 6047), Box(6047, 6047)), - Box(Box(6048, 6048), Box(6048, 6048)), - Box(Box(6049, 6049), Box(6049, 6049)), - Box(Box(6050, 6050), Box(6050, 6050)), - Box(Box(6051, 6051), Box(6051, 6051)), - Box(Box(6052, 6052), Box(6052, 6052)), - Box(Box(6053, 6053), Box(6053, 6053)), - Box(Box(6054, 6054), Box(6054, 6054)), - Box(Box(6055, 6055), Box(6055, 6055)), - Box(Box(6056, 6056), Box(6056, 6056)), - Box(Box(6057, 6057), Box(6057, 6057)), - Box(Box(6058, 6058), Box(6058, 6058)), - Box(Box(6059, 6059), Box(6059, 6059)), - Box(Box(6060, 6060), Box(6060, 6060)), - Box(Box(6061, 6061), Box(6061, 6061)), - Box(Box(6062, 6062), Box(6062, 6062)), - Box(Box(6063, 6063), Box(6063, 6063)), - Box(Box(6064, 6064), Box(6064, 6064)), - Box(Box(6065, 6065), Box(6065, 6065)), - Box(Box(6066, 6066), Box(6066, 6066)), - Box(Box(6067, 6067), Box(6067, 6067)), - Box(Box(6068, 6068), Box(6068, 6068)), - Box(Box(6069, 6069), Box(6069, 6069)), - Box(Box(6070, 6070), Box(6070, 6070)), - Box(Box(6071, 6071), Box(6071, 6071)), - Box(Box(6072, 6072), Box(6072, 6072)), - Box(Box(6073, 6073), Box(6073, 6073)), - Box(Box(6074, 6074), Box(6074, 6074)), - Box(Box(6075, 6075), Box(6075, 6075)), - Box(Box(6076, 6076), Box(6076, 6076)), - Box(Box(6077, 6077), Box(6077, 6077)), - Box(Box(6078, 6078), Box(6078, 6078)), - Box(Box(6079, 6079), Box(6079, 6079)), - Box(Box(6080, 6080), Box(6080, 6080)), - Box(Box(6081, 6081), Box(6081, 6081)), - Box(Box(6082, 6082), Box(6082, 6082)), - Box(Box(6083, 6083), Box(6083, 6083)), - Box(Box(6084, 6084), Box(6084, 6084)), - Box(Box(6085, 6085), Box(6085, 6085)), - Box(Box(6086, 6086), Box(6086, 6086)), - Box(Box(6087, 6087), Box(6087, 6087)), - Box(Box(6088, 6088), Box(6088, 6088)), - Box(Box(6089, 6089), Box(6089, 6089)), - Box(Box(6090, 6090), Box(6090, 6090)), - Box(Box(6091, 6091), Box(6091, 6091)), - Box(Box(6092, 6092), Box(6092, 6092)), - Box(Box(6093, 6093), Box(6093, 6093)), - Box(Box(6094, 6094), Box(6094, 6094)), - Box(Box(6095, 6095), Box(6095, 6095)), - Box(Box(6096, 6096), Box(6096, 6096)), - Box(Box(6097, 6097), Box(6097, 6097)), - Box(Box(6098, 6098), Box(6098, 6098)), - Box(Box(6099, 6099), Box(6099, 6099)), - Box(Box(6100, 6100), Box(6100, 6100)), - Box(Box(6101, 6101), Box(6101, 6101)), - Box(Box(6102, 6102), Box(6102, 6102)), - Box(Box(6103, 6103), Box(6103, 6103)), - Box(Box(6104, 6104), Box(6104, 6104)), - Box(Box(6105, 6105), Box(6105, 6105)), - Box(Box(6106, 6106), Box(6106, 6106)), - Box(Box(6107, 6107), Box(6107, 6107)), - Box(Box(6108, 6108), Box(6108, 6108)), - Box(Box(6109, 6109), Box(6109, 6109)), - Box(Box(6110, 6110), Box(6110, 6110)), - Box(Box(6111, 6111), Box(6111, 6111)), - Box(Box(6112, 6112), Box(6112, 6112)), - Box(Box(6113, 6113), Box(6113, 6113)), - Box(Box(6114, 6114), Box(6114, 6114)), - Box(Box(6115, 6115), Box(6115, 6115)), - Box(Box(6116, 6116), Box(6116, 6116)), - Box(Box(6117, 6117), Box(6117, 6117)), - Box(Box(6118, 6118), Box(6118, 6118)), - Box(Box(6119, 6119), Box(6119, 6119)), - Box(Box(6120, 6120), Box(6120, 6120)), - Box(Box(6121, 6121), Box(6121, 6121)), - Box(Box(6122, 6122), Box(6122, 6122)), - Box(Box(6123, 6123), Box(6123, 6123)), - Box(Box(6124, 6124), Box(6124, 6124)), - Box(Box(6125, 6125), Box(6125, 6125)), - Box(Box(6126, 6126), Box(6126, 6126)), - Box(Box(6127, 6127), Box(6127, 6127)), - Box(Box(6128, 6128), Box(6128, 6128)), - Box(Box(6129, 6129), Box(6129, 6129)), - Box(Box(6130, 6130), Box(6130, 6130)), - Box(Box(6131, 6131), Box(6131, 6131)), - Box(Box(6132, 6132), Box(6132, 6132)), - Box(Box(6133, 6133), Box(6133, 6133)), - Box(Box(6134, 6134), Box(6134, 6134)), - Box(Box(6135, 6135), Box(6135, 6135)), - Box(Box(6136, 6136), Box(6136, 6136)), - Box(Box(6137, 6137), Box(6137, 6137)), - Box(Box(6138, 6138), Box(6138, 6138)), - Box(Box(6139, 6139), Box(6139, 6139)), - Box(Box(6140, 6140), Box(6140, 6140)), - Box(Box(6141, 6141), Box(6141, 6141)), - Box(Box(6142, 6142), Box(6142, 6142)), - Box(Box(6143, 6143), Box(6143, 6143)), - Box(Box(6144, 6144), Box(6144, 6144)), - Box(Box(6145, 6145), Box(6145, 6145)), - Box(Box(6146, 6146), Box(6146, 6146)), - Box(Box(6147, 6147), Box(6147, 6147)), - Box(Box(6148, 6148), Box(6148, 6148)), - Box(Box(6149, 6149), Box(6149, 6149)), - Box(Box(6150, 6150), Box(6150, 6150)), - Box(Box(6151, 6151), Box(6151, 6151)), - Box(Box(6152, 6152), Box(6152, 6152)), - Box(Box(6153, 6153), Box(6153, 6153)), - Box(Box(6154, 6154), Box(6154, 6154)), - Box(Box(6155, 6155), Box(6155, 6155)), - Box(Box(6156, 6156), Box(6156, 6156)), - Box(Box(6157, 6157), Box(6157, 6157)), - Box(Box(6158, 6158), Box(6158, 6158)), - Box(Box(6159, 6159), Box(6159, 6159)), - Box(Box(6160, 6160), Box(6160, 6160)), - Box(Box(6161, 6161), Box(6161, 6161)), - Box(Box(6162, 6162), Box(6162, 6162)), - Box(Box(6163, 6163), Box(6163, 6163)), - Box(Box(6164, 6164), Box(6164, 6164)), - Box(Box(6165, 6165), Box(6165, 6165)), - Box(Box(6166, 6166), Box(6166, 6166)), - Box(Box(6167, 6167), Box(6167, 6167)), - Box(Box(6168, 6168), Box(6168, 6168)), - Box(Box(6169, 6169), Box(6169, 6169)), - Box(Box(6170, 6170), Box(6170, 6170)), - Box(Box(6171, 6171), Box(6171, 6171)), - Box(Box(6172, 6172), Box(6172, 6172)), - Box(Box(6173, 6173), Box(6173, 6173)), - Box(Box(6174, 6174), Box(6174, 6174)), - Box(Box(6175, 6175), Box(6175, 6175)), - Box(Box(6176, 6176), Box(6176, 6176)), - Box(Box(6177, 6177), Box(6177, 6177)), - Box(Box(6178, 6178), Box(6178, 6178)), - Box(Box(6179, 6179), Box(6179, 6179)), - Box(Box(6180, 6180), Box(6180, 6180)), - Box(Box(6181, 6181), Box(6181, 6181)), - Box(Box(6182, 6182), Box(6182, 6182)), - Box(Box(6183, 6183), Box(6183, 6183)), - Box(Box(6184, 6184), Box(6184, 6184)), - Box(Box(6185, 6185), Box(6185, 6185)), - Box(Box(6186, 6186), Box(6186, 6186)), - Box(Box(6187, 6187), Box(6187, 6187)), - Box(Box(6188, 6188), Box(6188, 6188)), - Box(Box(6189, 6189), Box(6189, 6189)), - Box(Box(6190, 6190), Box(6190, 6190)), - Box(Box(6191, 6191), Box(6191, 6191)), - Box(Box(6192, 6192), Box(6192, 6192)), - Box(Box(6193, 6193), Box(6193, 6193)), - Box(Box(6194, 6194), Box(6194, 6194)), - Box(Box(6195, 6195), Box(6195, 6195)), - Box(Box(6196, 6196), Box(6196, 6196)), - Box(Box(6197, 6197), Box(6197, 6197)), - Box(Box(6198, 6198), Box(6198, 6198)), - Box(Box(6199, 6199), Box(6199, 6199)), - Box(Box(6200, 6200), Box(6200, 6200)), - Box(Box(6201, 6201), Box(6201, 6201)), - Box(Box(6202, 6202), Box(6202, 6202)), - Box(Box(6203, 6203), Box(6203, 6203)), - Box(Box(6204, 6204), Box(6204, 6204)), - Box(Box(6205, 6205), Box(6205, 6205)), - Box(Box(6206, 6206), Box(6206, 6206)), - Box(Box(6207, 6207), Box(6207, 6207)), - Box(Box(6208, 6208), Box(6208, 6208)), - Box(Box(6209, 6209), Box(6209, 6209)), - Box(Box(6210, 6210), Box(6210, 6210)), - Box(Box(6211, 6211), Box(6211, 6211)), - Box(Box(6212, 6212), Box(6212, 6212)), - Box(Box(6213, 6213), Box(6213, 6213)), - Box(Box(6214, 6214), Box(6214, 6214)), - Box(Box(6215, 6215), Box(6215, 6215)), - Box(Box(6216, 6216), Box(6216, 6216)), - Box(Box(6217, 6217), Box(6217, 6217)), - Box(Box(6218, 6218), Box(6218, 6218)), - Box(Box(6219, 6219), Box(6219, 6219)), - Box(Box(6220, 6220), Box(6220, 6220)), - Box(Box(6221, 6221), Box(6221, 6221)), - Box(Box(6222, 6222), Box(6222, 6222)), - Box(Box(6223, 6223), Box(6223, 6223)), - Box(Box(6224, 6224), Box(6224, 6224)), - Box(Box(6225, 6225), Box(6225, 6225)), - Box(Box(6226, 6226), Box(6226, 6226)), - Box(Box(6227, 6227), Box(6227, 6227)), - Box(Box(6228, 6228), Box(6228, 6228)), - Box(Box(6229, 6229), Box(6229, 6229)), - Box(Box(6230, 6230), Box(6230, 6230)), - Box(Box(6231, 6231), Box(6231, 6231)), - Box(Box(6232, 6232), Box(6232, 6232)), - Box(Box(6233, 6233), Box(6233, 6233)), - Box(Box(6234, 6234), Box(6234, 6234)), - Box(Box(6235, 6235), Box(6235, 6235)), - Box(Box(6236, 6236), Box(6236, 6236)), - Box(Box(6237, 6237), Box(6237, 6237)), - Box(Box(6238, 6238), Box(6238, 6238)), - Box(Box(6239, 6239), Box(6239, 6239)), - Box(Box(6240, 6240), Box(6240, 6240)), - Box(Box(6241, 6241), Box(6241, 6241)), - Box(Box(6242, 6242), Box(6242, 6242)), - Box(Box(6243, 6243), Box(6243, 6243)), - Box(Box(6244, 6244), Box(6244, 6244)), - Box(Box(6245, 6245), Box(6245, 6245)), - Box(Box(6246, 6246), Box(6246, 6246)), - Box(Box(6247, 6247), Box(6247, 6247)), - Box(Box(6248, 6248), Box(6248, 6248)), - Box(Box(6249, 6249), Box(6249, 6249)), - Box(Box(6250, 6250), Box(6250, 6250)), - Box(Box(6251, 6251), Box(6251, 6251)), - Box(Box(6252, 6252), Box(6252, 6252)), - Box(Box(6253, 6253), Box(6253, 6253)), - Box(Box(6254, 6254), Box(6254, 6254)), - Box(Box(6255, 6255), Box(6255, 6255)), - Box(Box(6256, 6256), Box(6256, 6256)), - Box(Box(6257, 6257), Box(6257, 6257)), - Box(Box(6258, 6258), Box(6258, 6258)), - Box(Box(6259, 6259), Box(6259, 6259)), - Box(Box(6260, 6260), Box(6260, 6260)), - Box(Box(6261, 6261), Box(6261, 6261)), - Box(Box(6262, 6262), Box(6262, 6262)), - Box(Box(6263, 6263), Box(6263, 6263)), - Box(Box(6264, 6264), Box(6264, 6264)), - Box(Box(6265, 6265), Box(6265, 6265)), - Box(Box(6266, 6266), Box(6266, 6266)), - Box(Box(6267, 6267), Box(6267, 6267)), - Box(Box(6268, 6268), Box(6268, 6268)), - Box(Box(6269, 6269), Box(6269, 6269)), - Box(Box(6270, 6270), Box(6270, 6270)), - Box(Box(6271, 6271), Box(6271, 6271)), - Box(Box(6272, 6272), Box(6272, 6272)), - Box(Box(6273, 6273), Box(6273, 6273)), - Box(Box(6274, 6274), Box(6274, 6274)), - Box(Box(6275, 6275), Box(6275, 6275)), - Box(Box(6276, 6276), Box(6276, 6276)), - Box(Box(6277, 6277), Box(6277, 6277)), - Box(Box(6278, 6278), Box(6278, 6278)), - Box(Box(6279, 6279), Box(6279, 6279)), - Box(Box(6280, 6280), Box(6280, 6280)), - Box(Box(6281, 6281), Box(6281, 6281)), - Box(Box(6282, 6282), Box(6282, 6282)), - Box(Box(6283, 6283), Box(6283, 6283)), - Box(Box(6284, 6284), Box(6284, 6284)), - Box(Box(6285, 6285), Box(6285, 6285)), - Box(Box(6286, 6286), Box(6286, 6286)), - Box(Box(6287, 6287), Box(6287, 6287)), - Box(Box(6288, 6288), Box(6288, 6288)), - Box(Box(6289, 6289), Box(6289, 6289)), - Box(Box(6290, 6290), Box(6290, 6290)), - Box(Box(6291, 6291), Box(6291, 6291)), - Box(Box(6292, 6292), Box(6292, 6292)), - Box(Box(6293, 6293), Box(6293, 6293)), - Box(Box(6294, 6294), Box(6294, 6294)), - Box(Box(6295, 6295), Box(6295, 6295)), - Box(Box(6296, 6296), Box(6296, 6296)), - Box(Box(6297, 6297), Box(6297, 6297)), - Box(Box(6298, 6298), Box(6298, 6298)), - Box(Box(6299, 6299), Box(6299, 6299)), - Box(Box(6300, 6300), Box(6300, 6300)), - Box(Box(6301, 6301), Box(6301, 6301)), - Box(Box(6302, 6302), Box(6302, 6302)), - Box(Box(6303, 6303), Box(6303, 6303)), - Box(Box(6304, 6304), Box(6304, 6304)), - Box(Box(6305, 6305), Box(6305, 6305)), - Box(Box(6306, 6306), Box(6306, 6306)), - Box(Box(6307, 6307), Box(6307, 6307)), - Box(Box(6308, 6308), Box(6308, 6308)), - Box(Box(6309, 6309), Box(6309, 6309)), - Box(Box(6310, 6310), Box(6310, 6310)), - Box(Box(6311, 6311), Box(6311, 6311)), - Box(Box(6312, 6312), Box(6312, 6312)), - Box(Box(6313, 6313), Box(6313, 6313)), - Box(Box(6314, 6314), Box(6314, 6314)), - Box(Box(6315, 6315), Box(6315, 6315)), - Box(Box(6316, 6316), Box(6316, 6316)), - Box(Box(6317, 6317), Box(6317, 6317)), - Box(Box(6318, 6318), Box(6318, 6318)), - Box(Box(6319, 6319), Box(6319, 6319)), - Box(Box(6320, 6320), Box(6320, 6320)), - Box(Box(6321, 6321), Box(6321, 6321)), - Box(Box(6322, 6322), Box(6322, 6322)), - Box(Box(6323, 6323), Box(6323, 6323)), - Box(Box(6324, 6324), Box(6324, 6324)), - Box(Box(6325, 6325), Box(6325, 6325)), - Box(Box(6326, 6326), Box(6326, 6326)), - Box(Box(6327, 6327), Box(6327, 6327)), - Box(Box(6328, 6328), Box(6328, 6328)), - Box(Box(6329, 6329), Box(6329, 6329)), - Box(Box(6330, 6330), Box(6330, 6330)), - Box(Box(6331, 6331), Box(6331, 6331)), - Box(Box(6332, 6332), Box(6332, 6332)), - Box(Box(6333, 6333), Box(6333, 6333)), - Box(Box(6334, 6334), Box(6334, 6334)), - Box(Box(6335, 6335), Box(6335, 6335)), - Box(Box(6336, 6336), Box(6336, 6336)), - Box(Box(6337, 6337), Box(6337, 6337)), - Box(Box(6338, 6338), Box(6338, 6338)), - Box(Box(6339, 6339), Box(6339, 6339)), - Box(Box(6340, 6340), Box(6340, 6340)), - Box(Box(6341, 6341), Box(6341, 6341)), - Box(Box(6342, 6342), Box(6342, 6342)), - Box(Box(6343, 6343), Box(6343, 6343)), - Box(Box(6344, 6344), Box(6344, 6344)), - Box(Box(6345, 6345), Box(6345, 6345)), - Box(Box(6346, 6346), Box(6346, 6346)), - Box(Box(6347, 6347), Box(6347, 6347)), - Box(Box(6348, 6348), Box(6348, 6348)), - Box(Box(6349, 6349), Box(6349, 6349)), - Box(Box(6350, 6350), Box(6350, 6350)), - Box(Box(6351, 6351), Box(6351, 6351)), - Box(Box(6352, 6352), Box(6352, 6352)), - Box(Box(6353, 6353), Box(6353, 6353)), - Box(Box(6354, 6354), Box(6354, 6354)), - Box(Box(6355, 6355), Box(6355, 6355)), - Box(Box(6356, 6356), Box(6356, 6356)), - Box(Box(6357, 6357), Box(6357, 6357)), - Box(Box(6358, 6358), Box(6358, 6358)), - Box(Box(6359, 6359), Box(6359, 6359)), - Box(Box(6360, 6360), Box(6360, 6360)), - Box(Box(6361, 6361), Box(6361, 6361)), - Box(Box(6362, 6362), Box(6362, 6362)), - Box(Box(6363, 6363), Box(6363, 6363)), - Box(Box(6364, 6364), Box(6364, 6364)), - Box(Box(6365, 6365), Box(6365, 6365)), - Box(Box(6366, 6366), Box(6366, 6366)), - Box(Box(6367, 6367), Box(6367, 6367)), - Box(Box(6368, 6368), Box(6368, 6368)), - Box(Box(6369, 6369), Box(6369, 6369)), - Box(Box(6370, 6370), Box(6370, 6370)), - Box(Box(6371, 6371), Box(6371, 6371)), - Box(Box(6372, 6372), Box(6372, 6372)), - Box(Box(6373, 6373), Box(6373, 6373)), - Box(Box(6374, 6374), Box(6374, 6374)), - Box(Box(6375, 6375), Box(6375, 6375)), - Box(Box(6376, 6376), Box(6376, 6376)), - Box(Box(6377, 6377), Box(6377, 6377)), - Box(Box(6378, 6378), Box(6378, 6378)), - Box(Box(6379, 6379), Box(6379, 6379)), - Box(Box(6380, 6380), Box(6380, 6380)), - Box(Box(6381, 6381), Box(6381, 6381)), - Box(Box(6382, 6382), Box(6382, 6382)), - Box(Box(6383, 6383), Box(6383, 6383)), - Box(Box(6384, 6384), Box(6384, 6384)), - Box(Box(6385, 6385), Box(6385, 6385)), - Box(Box(6386, 6386), Box(6386, 6386)), - Box(Box(6387, 6387), Box(6387, 6387)), - Box(Box(6388, 6388), Box(6388, 6388)), - Box(Box(6389, 6389), Box(6389, 6389)), - Box(Box(6390, 6390), Box(6390, 6390)), - Box(Box(6391, 6391), Box(6391, 6391)), - Box(Box(6392, 6392), Box(6392, 6392)), - Box(Box(6393, 6393), Box(6393, 6393)), - Box(Box(6394, 6394), Box(6394, 6394)), - Box(Box(6395, 6395), Box(6395, 6395)), - Box(Box(6396, 6396), Box(6396, 6396)), - Box(Box(6397, 6397), Box(6397, 6397)), - Box(Box(6398, 6398), Box(6398, 6398)), - Box(Box(6399, 6399), Box(6399, 6399)), - Box(Box(6400, 6400), Box(6400, 6400)), - Box(Box(6401, 6401), Box(6401, 6401)), - Box(Box(6402, 6402), Box(6402, 6402)), - Box(Box(6403, 6403), Box(6403, 6403)), - Box(Box(6404, 6404), Box(6404, 6404)), - Box(Box(6405, 6405), Box(6405, 6405)), - Box(Box(6406, 6406), Box(6406, 6406)), - Box(Box(6407, 6407), Box(6407, 6407)), - Box(Box(6408, 6408), Box(6408, 6408)), - Box(Box(6409, 6409), Box(6409, 6409)), - Box(Box(6410, 6410), Box(6410, 6410)), - Box(Box(6411, 6411), Box(6411, 6411)), - Box(Box(6412, 6412), Box(6412, 6412)), - Box(Box(6413, 6413), Box(6413, 6413)), - Box(Box(6414, 6414), Box(6414, 6414)), - Box(Box(6415, 6415), Box(6415, 6415)), - Box(Box(6416, 6416), Box(6416, 6416)), - Box(Box(6417, 6417), Box(6417, 6417)), - Box(Box(6418, 6418), Box(6418, 6418)), - Box(Box(6419, 6419), Box(6419, 6419)), - Box(Box(6420, 6420), Box(6420, 6420)), - Box(Box(6421, 6421), Box(6421, 6421)), - Box(Box(6422, 6422), Box(6422, 6422)), - Box(Box(6423, 6423), Box(6423, 6423)), - Box(Box(6424, 6424), Box(6424, 6424)), - Box(Box(6425, 6425), Box(6425, 6425)), - Box(Box(6426, 6426), Box(6426, 6426)), - Box(Box(6427, 6427), Box(6427, 6427)), - Box(Box(6428, 6428), Box(6428, 6428)), - Box(Box(6429, 6429), Box(6429, 6429)), - Box(Box(6430, 6430), Box(6430, 6430)), - Box(Box(6431, 6431), Box(6431, 6431)), - Box(Box(6432, 6432), Box(6432, 6432)), - Box(Box(6433, 6433), Box(6433, 6433)), - Box(Box(6434, 6434), Box(6434, 6434)), - Box(Box(6435, 6435), Box(6435, 6435)), - Box(Box(6436, 6436), Box(6436, 6436)), - Box(Box(6437, 6437), Box(6437, 6437)), - Box(Box(6438, 6438), Box(6438, 6438)), - Box(Box(6439, 6439), Box(6439, 6439)), - Box(Box(6440, 6440), Box(6440, 6440)), - Box(Box(6441, 6441), Box(6441, 6441)), - Box(Box(6442, 6442), Box(6442, 6442)), - Box(Box(6443, 6443), Box(6443, 6443)), - Box(Box(6444, 6444), Box(6444, 6444)), - Box(Box(6445, 6445), Box(6445, 6445)), - Box(Box(6446, 6446), Box(6446, 6446)), - Box(Box(6447, 6447), Box(6447, 6447)), - Box(Box(6448, 6448), Box(6448, 6448)), - Box(Box(6449, 6449), Box(6449, 6449)), - Box(Box(6450, 6450), Box(6450, 6450)), - Box(Box(6451, 6451), Box(6451, 6451)), - Box(Box(6452, 6452), Box(6452, 6452)), - Box(Box(6453, 6453), Box(6453, 6453)), - Box(Box(6454, 6454), Box(6454, 6454)), - Box(Box(6455, 6455), Box(6455, 6455)), - Box(Box(6456, 6456), Box(6456, 6456)), - Box(Box(6457, 6457), Box(6457, 6457)), - Box(Box(6458, 6458), Box(6458, 6458)), - Box(Box(6459, 6459), Box(6459, 6459)), - Box(Box(6460, 6460), Box(6460, 6460)), - Box(Box(6461, 6461), Box(6461, 6461)), - Box(Box(6462, 6462), Box(6462, 6462)), - Box(Box(6463, 6463), Box(6463, 6463)), - Box(Box(6464, 6464), Box(6464, 6464)), - Box(Box(6465, 6465), Box(6465, 6465)), - Box(Box(6466, 6466), Box(6466, 6466)), - Box(Box(6467, 6467), Box(6467, 6467)), - Box(Box(6468, 6468), Box(6468, 6468)), - Box(Box(6469, 6469), Box(6469, 6469)), - Box(Box(6470, 6470), Box(6470, 6470)), - Box(Box(6471, 6471), Box(6471, 6471)), - Box(Box(6472, 6472), Box(6472, 6472)), - Box(Box(6473, 6473), Box(6473, 6473)), - Box(Box(6474, 6474), Box(6474, 6474)), - Box(Box(6475, 6475), Box(6475, 6475)), - Box(Box(6476, 6476), Box(6476, 6476)), - Box(Box(6477, 6477), Box(6477, 6477)), - Box(Box(6478, 6478), Box(6478, 6478)), - Box(Box(6479, 6479), Box(6479, 6479)), - Box(Box(6480, 6480), Box(6480, 6480)), - Box(Box(6481, 6481), Box(6481, 6481)), - Box(Box(6482, 6482), Box(6482, 6482)), - Box(Box(6483, 6483), Box(6483, 6483)), - Box(Box(6484, 6484), Box(6484, 6484)), - Box(Box(6485, 6485), Box(6485, 6485)), - Box(Box(6486, 6486), Box(6486, 6486)), - Box(Box(6487, 6487), Box(6487, 6487)), - Box(Box(6488, 6488), Box(6488, 6488)), - Box(Box(6489, 6489), Box(6489, 6489)), - Box(Box(6490, 6490), Box(6490, 6490)), - Box(Box(6491, 6491), Box(6491, 6491)), - Box(Box(6492, 6492), Box(6492, 6492)), - Box(Box(6493, 6493), Box(6493, 6493)), - Box(Box(6494, 6494), Box(6494, 6494)), - Box(Box(6495, 6495), Box(6495, 6495)), - Box(Box(6496, 6496), Box(6496, 6496)), - Box(Box(6497, 6497), Box(6497, 6497)), - Box(Box(6498, 6498), Box(6498, 6498)), - Box(Box(6499, 6499), Box(6499, 6499)), - Box(Box(6500, 6500), Box(6500, 6500)), - Box(Box(6501, 6501), Box(6501, 6501)), - Box(Box(6502, 6502), Box(6502, 6502)), - Box(Box(6503, 6503), Box(6503, 6503)), - Box(Box(6504, 6504), Box(6504, 6504)), - Box(Box(6505, 6505), Box(6505, 6505)), - Box(Box(6506, 6506), Box(6506, 6506)), - Box(Box(6507, 6507), Box(6507, 6507)), - Box(Box(6508, 6508), Box(6508, 6508)), - Box(Box(6509, 6509), Box(6509, 6509)), - Box(Box(6510, 6510), Box(6510, 6510)), - Box(Box(6511, 6511), Box(6511, 6511)), - Box(Box(6512, 6512), Box(6512, 6512)), - Box(Box(6513, 6513), Box(6513, 6513)), - Box(Box(6514, 6514), Box(6514, 6514)), - Box(Box(6515, 6515), Box(6515, 6515)), - Box(Box(6516, 6516), Box(6516, 6516)), - Box(Box(6517, 6517), Box(6517, 6517)), - Box(Box(6518, 6518), Box(6518, 6518)), - Box(Box(6519, 6519), Box(6519, 6519)), - Box(Box(6520, 6520), Box(6520, 6520)), - Box(Box(6521, 6521), Box(6521, 6521)), - Box(Box(6522, 6522), Box(6522, 6522)), - Box(Box(6523, 6523), Box(6523, 6523)), - Box(Box(6524, 6524), Box(6524, 6524)), - Box(Box(6525, 6525), Box(6525, 6525)), - Box(Box(6526, 6526), Box(6526, 6526)), - Box(Box(6527, 6527), Box(6527, 6527)), - Box(Box(6528, 6528), Box(6528, 6528)), - Box(Box(6529, 6529), Box(6529, 6529)), - Box(Box(6530, 6530), Box(6530, 6530)), - Box(Box(6531, 6531), Box(6531, 6531)), - Box(Box(6532, 6532), Box(6532, 6532)), - Box(Box(6533, 6533), Box(6533, 6533)), - Box(Box(6534, 6534), Box(6534, 6534)), - Box(Box(6535, 6535), Box(6535, 6535)), - Box(Box(6536, 6536), Box(6536, 6536)), - Box(Box(6537, 6537), Box(6537, 6537)), - Box(Box(6538, 6538), Box(6538, 6538)), - Box(Box(6539, 6539), Box(6539, 6539)), - Box(Box(6540, 6540), Box(6540, 6540)), - Box(Box(6541, 6541), Box(6541, 6541)), - Box(Box(6542, 6542), Box(6542, 6542)), - Box(Box(6543, 6543), Box(6543, 6543)), - Box(Box(6544, 6544), Box(6544, 6544)), - Box(Box(6545, 6545), Box(6545, 6545)), - Box(Box(6546, 6546), Box(6546, 6546)), - Box(Box(6547, 6547), Box(6547, 6547)), - Box(Box(6548, 6548), Box(6548, 6548)), - Box(Box(6549, 6549), Box(6549, 6549)), - Box(Box(6550, 6550), Box(6550, 6550)), - Box(Box(6551, 6551), Box(6551, 6551)), - Box(Box(6552, 6552), Box(6552, 6552)), - Box(Box(6553, 6553), Box(6553, 6553)), - Box(Box(6554, 6554), Box(6554, 6554)), - Box(Box(6555, 6555), Box(6555, 6555)), - Box(Box(6556, 6556), Box(6556, 6556)), - Box(Box(6557, 6557), Box(6557, 6557)), - Box(Box(6558, 6558), Box(6558, 6558)), - Box(Box(6559, 6559), Box(6559, 6559)), - Box(Box(6560, 6560), Box(6560, 6560)), - Box(Box(6561, 6561), Box(6561, 6561)), - Box(Box(6562, 6562), Box(6562, 6562)), - Box(Box(6563, 6563), Box(6563, 6563)), - Box(Box(6564, 6564), Box(6564, 6564)), - Box(Box(6565, 6565), Box(6565, 6565)), - Box(Box(6566, 6566), Box(6566, 6566)), - Box(Box(6567, 6567), Box(6567, 6567)), - Box(Box(6568, 6568), Box(6568, 6568)), - Box(Box(6569, 6569), Box(6569, 6569)), - Box(Box(6570, 6570), Box(6570, 6570)), - Box(Box(6571, 6571), Box(6571, 6571)), - Box(Box(6572, 6572), Box(6572, 6572)), - Box(Box(6573, 6573), Box(6573, 6573)), - Box(Box(6574, 6574), Box(6574, 6574)), - Box(Box(6575, 6575), Box(6575, 6575)), - Box(Box(6576, 6576), Box(6576, 6576)), - Box(Box(6577, 6577), Box(6577, 6577)), - Box(Box(6578, 6578), Box(6578, 6578)), - Box(Box(6579, 6579), Box(6579, 6579)), - Box(Box(6580, 6580), Box(6580, 6580)), - Box(Box(6581, 6581), Box(6581, 6581)), - Box(Box(6582, 6582), Box(6582, 6582)), - Box(Box(6583, 6583), Box(6583, 6583)), - Box(Box(6584, 6584), Box(6584, 6584)), - Box(Box(6585, 6585), Box(6585, 6585)), - Box(Box(6586, 6586), Box(6586, 6586)), - Box(Box(6587, 6587), Box(6587, 6587)), - Box(Box(6588, 6588), Box(6588, 6588)), - Box(Box(6589, 6589), Box(6589, 6589)), - Box(Box(6590, 6590), Box(6590, 6590)), - Box(Box(6591, 6591), Box(6591, 6591)), - Box(Box(6592, 6592), Box(6592, 6592)), - Box(Box(6593, 6593), Box(6593, 6593)), - Box(Box(6594, 6594), Box(6594, 6594)), - Box(Box(6595, 6595), Box(6595, 6595)), - Box(Box(6596, 6596), Box(6596, 6596)), - Box(Box(6597, 6597), Box(6597, 6597)), - Box(Box(6598, 6598), Box(6598, 6598)), - Box(Box(6599, 6599), Box(6599, 6599)), - Box(Box(6600, 6600), Box(6600, 6600)), - Box(Box(6601, 6601), Box(6601, 6601)), - Box(Box(6602, 6602), Box(6602, 6602)), - Box(Box(6603, 6603), Box(6603, 6603)), - Box(Box(6604, 6604), Box(6604, 6604)), - Box(Box(6605, 6605), Box(6605, 6605)), - Box(Box(6606, 6606), Box(6606, 6606)), - Box(Box(6607, 6607), Box(6607, 6607)), - Box(Box(6608, 6608), Box(6608, 6608)), - Box(Box(6609, 6609), Box(6609, 6609)), - Box(Box(6610, 6610), Box(6610, 6610)), - Box(Box(6611, 6611), Box(6611, 6611)), - Box(Box(6612, 6612), Box(6612, 6612)), - Box(Box(6613, 6613), Box(6613, 6613)), - Box(Box(6614, 6614), Box(6614, 6614)), - Box(Box(6615, 6615), Box(6615, 6615)), - Box(Box(6616, 6616), Box(6616, 6616)), - Box(Box(6617, 6617), Box(6617, 6617)), - Box(Box(6618, 6618), Box(6618, 6618)), - Box(Box(6619, 6619), Box(6619, 6619)), - Box(Box(6620, 6620), Box(6620, 6620)), - Box(Box(6621, 6621), Box(6621, 6621)), - Box(Box(6622, 6622), Box(6622, 6622)), - Box(Box(6623, 6623), Box(6623, 6623)), - Box(Box(6624, 6624), Box(6624, 6624)), - Box(Box(6625, 6625), Box(6625, 6625)), - Box(Box(6626, 6626), Box(6626, 6626)), - Box(Box(6627, 6627), Box(6627, 6627)), - Box(Box(6628, 6628), Box(6628, 6628)), - Box(Box(6629, 6629), Box(6629, 6629)), - Box(Box(6630, 6630), Box(6630, 6630)), - Box(Box(6631, 6631), Box(6631, 6631)), - Box(Box(6632, 6632), Box(6632, 6632)), - Box(Box(6633, 6633), Box(6633, 6633)), - Box(Box(6634, 6634), Box(6634, 6634)), - Box(Box(6635, 6635), Box(6635, 6635)), - Box(Box(6636, 6636), Box(6636, 6636)), - Box(Box(6637, 6637), Box(6637, 6637)), - Box(Box(6638, 6638), Box(6638, 6638)), - Box(Box(6639, 6639), Box(6639, 6639)), - Box(Box(6640, 6640), Box(6640, 6640)), - Box(Box(6641, 6641), Box(6641, 6641)), - Box(Box(6642, 6642), Box(6642, 6642)), - Box(Box(6643, 6643), Box(6643, 6643)), - Box(Box(6644, 6644), Box(6644, 6644)), - Box(Box(6645, 6645), Box(6645, 6645)), - Box(Box(6646, 6646), Box(6646, 6646)), - Box(Box(6647, 6647), Box(6647, 6647)), - Box(Box(6648, 6648), Box(6648, 6648)), - Box(Box(6649, 6649), Box(6649, 6649)), - Box(Box(6650, 6650), Box(6650, 6650)), - Box(Box(6651, 6651), Box(6651, 6651)), - Box(Box(6652, 6652), Box(6652, 6652)), - Box(Box(6653, 6653), Box(6653, 6653)), - Box(Box(6654, 6654), Box(6654, 6654)), - Box(Box(6655, 6655), Box(6655, 6655)), - Box(Box(6656, 6656), Box(6656, 6656)), - Box(Box(6657, 6657), Box(6657, 6657)), - Box(Box(6658, 6658), Box(6658, 6658)), - Box(Box(6659, 6659), Box(6659, 6659)), - Box(Box(6660, 6660), Box(6660, 6660)), - Box(Box(6661, 6661), Box(6661, 6661)), - Box(Box(6662, 6662), Box(6662, 6662)), - Box(Box(6663, 6663), Box(6663, 6663)), - Box(Box(6664, 6664), Box(6664, 6664)), - Box(Box(6665, 6665), Box(6665, 6665)), - Box(Box(6666, 6666), Box(6666, 6666)), - Box(Box(6667, 6667), Box(6667, 6667)), - Box(Box(6668, 6668), Box(6668, 6668)), - Box(Box(6669, 6669), Box(6669, 6669)), - Box(Box(6670, 6670), Box(6670, 6670)), - Box(Box(6671, 6671), Box(6671, 6671)), - Box(Box(6672, 6672), Box(6672, 6672)), - Box(Box(6673, 6673), Box(6673, 6673)), - Box(Box(6674, 6674), Box(6674, 6674)), - Box(Box(6675, 6675), Box(6675, 6675)), - Box(Box(6676, 6676), Box(6676, 6676)), - Box(Box(6677, 6677), Box(6677, 6677)), - Box(Box(6678, 6678), Box(6678, 6678)), - Box(Box(6679, 6679), Box(6679, 6679)), - Box(Box(6680, 6680), Box(6680, 6680)), - Box(Box(6681, 6681), Box(6681, 6681)), - Box(Box(6682, 6682), Box(6682, 6682)), - Box(Box(6683, 6683), Box(6683, 6683)), - Box(Box(6684, 6684), Box(6684, 6684)), - Box(Box(6685, 6685), Box(6685, 6685)), - Box(Box(6686, 6686), Box(6686, 6686)), - Box(Box(6687, 6687), Box(6687, 6687)), - Box(Box(6688, 6688), Box(6688, 6688)), - Box(Box(6689, 6689), Box(6689, 6689)), - Box(Box(6690, 6690), Box(6690, 6690)), - Box(Box(6691, 6691), Box(6691, 6691)), - Box(Box(6692, 6692), Box(6692, 6692)), - Box(Box(6693, 6693), Box(6693, 6693)), - Box(Box(6694, 6694), Box(6694, 6694)), - Box(Box(6695, 6695), Box(6695, 6695)), - Box(Box(6696, 6696), Box(6696, 6696)), - Box(Box(6697, 6697), Box(6697, 6697)), - Box(Box(6698, 6698), Box(6698, 6698)), - Box(Box(6699, 6699), Box(6699, 6699)), - Box(Box(6700, 6700), Box(6700, 6700)), - Box(Box(6701, 6701), Box(6701, 6701)), - Box(Box(6702, 6702), Box(6702, 6702)), - Box(Box(6703, 6703), Box(6703, 6703)), - Box(Box(6704, 6704), Box(6704, 6704)), - Box(Box(6705, 6705), Box(6705, 6705)), - Box(Box(6706, 6706), Box(6706, 6706)), - Box(Box(6707, 6707), Box(6707, 6707)), - Box(Box(6708, 6708), Box(6708, 6708)), - Box(Box(6709, 6709), Box(6709, 6709)), - Box(Box(6710, 6710), Box(6710, 6710)), - Box(Box(6711, 6711), Box(6711, 6711)), - Box(Box(6712, 6712), Box(6712, 6712)), - Box(Box(6713, 6713), Box(6713, 6713)), - Box(Box(6714, 6714), Box(6714, 6714)), - Box(Box(6715, 6715), Box(6715, 6715)), - Box(Box(6716, 6716), Box(6716, 6716)), - Box(Box(6717, 6717), Box(6717, 6717)), - Box(Box(6718, 6718), Box(6718, 6718)), - Box(Box(6719, 6719), Box(6719, 6719)), - Box(Box(6720, 6720), Box(6720, 6720)), - Box(Box(6721, 6721), Box(6721, 6721)), - Box(Box(6722, 6722), Box(6722, 6722)), - Box(Box(6723, 6723), Box(6723, 6723)), - Box(Box(6724, 6724), Box(6724, 6724)), - Box(Box(6725, 6725), Box(6725, 6725)), - Box(Box(6726, 6726), Box(6726, 6726)), - Box(Box(6727, 6727), Box(6727, 6727)), - Box(Box(6728, 6728), Box(6728, 6728)), - Box(Box(6729, 6729), Box(6729, 6729)), - Box(Box(6730, 6730), Box(6730, 6730)), - Box(Box(6731, 6731), Box(6731, 6731)), - Box(Box(6732, 6732), Box(6732, 6732)), - Box(Box(6733, 6733), Box(6733, 6733)), - Box(Box(6734, 6734), Box(6734, 6734)), - Box(Box(6735, 6735), Box(6735, 6735)), - Box(Box(6736, 6736), Box(6736, 6736)), - Box(Box(6737, 6737), Box(6737, 6737)), - Box(Box(6738, 6738), Box(6738, 6738)), - Box(Box(6739, 6739), Box(6739, 6739)), - Box(Box(6740, 6740), Box(6740, 6740)), - Box(Box(6741, 6741), Box(6741, 6741)), - Box(Box(6742, 6742), Box(6742, 6742)), - Box(Box(6743, 6743), Box(6743, 6743)), - Box(Box(6744, 6744), Box(6744, 6744)), - Box(Box(6745, 6745), Box(6745, 6745)), - Box(Box(6746, 6746), Box(6746, 6746)), - Box(Box(6747, 6747), Box(6747, 6747)), - Box(Box(6748, 6748), Box(6748, 6748)), - Box(Box(6749, 6749), Box(6749, 6749)), - Box(Box(6750, 6750), Box(6750, 6750)), - Box(Box(6751, 6751), Box(6751, 6751)), - Box(Box(6752, 6752), Box(6752, 6752)), - Box(Box(6753, 6753), Box(6753, 6753)), - Box(Box(6754, 6754), Box(6754, 6754)), - Box(Box(6755, 6755), Box(6755, 6755)), - Box(Box(6756, 6756), Box(6756, 6756)), - Box(Box(6757, 6757), Box(6757, 6757)), - Box(Box(6758, 6758), Box(6758, 6758)), - Box(Box(6759, 6759), Box(6759, 6759)), - Box(Box(6760, 6760), Box(6760, 6760)), - Box(Box(6761, 6761), Box(6761, 6761)), - Box(Box(6762, 6762), Box(6762, 6762)), - Box(Box(6763, 6763), Box(6763, 6763)), - Box(Box(6764, 6764), Box(6764, 6764)), - Box(Box(6765, 6765), Box(6765, 6765)), - Box(Box(6766, 6766), Box(6766, 6766)), - Box(Box(6767, 6767), Box(6767, 6767)), - Box(Box(6768, 6768), Box(6768, 6768)), - Box(Box(6769, 6769), Box(6769, 6769)), - Box(Box(6770, 6770), Box(6770, 6770)), - Box(Box(6771, 6771), Box(6771, 6771)), - Box(Box(6772, 6772), Box(6772, 6772)), - Box(Box(6773, 6773), Box(6773, 6773)), - Box(Box(6774, 6774), Box(6774, 6774)), - Box(Box(6775, 6775), Box(6775, 6775)), - Box(Box(6776, 6776), Box(6776, 6776)), - Box(Box(6777, 6777), Box(6777, 6777)), - Box(Box(6778, 6778), Box(6778, 6778)), - Box(Box(6779, 6779), Box(6779, 6779)), - Box(Box(6780, 6780), Box(6780, 6780)), - Box(Box(6781, 6781), Box(6781, 6781)), - Box(Box(6782, 6782), Box(6782, 6782)), - Box(Box(6783, 6783), Box(6783, 6783)), - Box(Box(6784, 6784), Box(6784, 6784)), - Box(Box(6785, 6785), Box(6785, 6785)), - Box(Box(6786, 6786), Box(6786, 6786)), - Box(Box(6787, 6787), Box(6787, 6787)), - Box(Box(6788, 6788), Box(6788, 6788)), - Box(Box(6789, 6789), Box(6789, 6789)), - Box(Box(6790, 6790), Box(6790, 6790)), - Box(Box(6791, 6791), Box(6791, 6791)), - Box(Box(6792, 6792), Box(6792, 6792)), - Box(Box(6793, 6793), Box(6793, 6793)), - Box(Box(6794, 6794), Box(6794, 6794)), - Box(Box(6795, 6795), Box(6795, 6795)), - Box(Box(6796, 6796), Box(6796, 6796)), - Box(Box(6797, 6797), Box(6797, 6797)), - Box(Box(6798, 6798), Box(6798, 6798)), - Box(Box(6799, 6799), Box(6799, 6799)), - Box(Box(6800, 6800), Box(6800, 6800)), - Box(Box(6801, 6801), Box(6801, 6801)), - Box(Box(6802, 6802), Box(6802, 6802)), - Box(Box(6803, 6803), Box(6803, 6803)), - Box(Box(6804, 6804), Box(6804, 6804)), - Box(Box(6805, 6805), Box(6805, 6805)), - Box(Box(6806, 6806), Box(6806, 6806)), - Box(Box(6807, 6807), Box(6807, 6807)), - Box(Box(6808, 6808), Box(6808, 6808)), - Box(Box(6809, 6809), Box(6809, 6809)), - Box(Box(6810, 6810), Box(6810, 6810)), - Box(Box(6811, 6811), Box(6811, 6811)), - Box(Box(6812, 6812), Box(6812, 6812)), - Box(Box(6813, 6813), Box(6813, 6813)), - Box(Box(6814, 6814), Box(6814, 6814)), - Box(Box(6815, 6815), Box(6815, 6815)), - Box(Box(6816, 6816), Box(6816, 6816)), - Box(Box(6817, 6817), Box(6817, 6817)), - Box(Box(6818, 6818), Box(6818, 6818)), - Box(Box(6819, 6819), Box(6819, 6819)), - Box(Box(6820, 6820), Box(6820, 6820)), - Box(Box(6821, 6821), Box(6821, 6821)), - Box(Box(6822, 6822), Box(6822, 6822)), - Box(Box(6823, 6823), Box(6823, 6823)), - Box(Box(6824, 6824), Box(6824, 6824)), - Box(Box(6825, 6825), Box(6825, 6825)), - Box(Box(6826, 6826), Box(6826, 6826)), - Box(Box(6827, 6827), Box(6827, 6827)), - Box(Box(6828, 6828), Box(6828, 6828)), - Box(Box(6829, 6829), Box(6829, 6829)), - Box(Box(6830, 6830), Box(6830, 6830)), - Box(Box(6831, 6831), Box(6831, 6831)), - Box(Box(6832, 6832), Box(6832, 6832)), - Box(Box(6833, 6833), Box(6833, 6833)), - Box(Box(6834, 6834), Box(6834, 6834)), - Box(Box(6835, 6835), Box(6835, 6835)), - Box(Box(6836, 6836), Box(6836, 6836)), - Box(Box(6837, 6837), Box(6837, 6837)), - Box(Box(6838, 6838), Box(6838, 6838)), - Box(Box(6839, 6839), Box(6839, 6839)), - Box(Box(6840, 6840), Box(6840, 6840)), - Box(Box(6841, 6841), Box(6841, 6841)), - Box(Box(6842, 6842), Box(6842, 6842)), - Box(Box(6843, 6843), Box(6843, 6843)), - Box(Box(6844, 6844), Box(6844, 6844)), - Box(Box(6845, 6845), Box(6845, 6845)), - Box(Box(6846, 6846), Box(6846, 6846)), - Box(Box(6847, 6847), Box(6847, 6847)), - Box(Box(6848, 6848), Box(6848, 6848)), - Box(Box(6849, 6849), Box(6849, 6849)), - Box(Box(6850, 6850), Box(6850, 6850)), - Box(Box(6851, 6851), Box(6851, 6851)), - Box(Box(6852, 6852), Box(6852, 6852)), - Box(Box(6853, 6853), Box(6853, 6853)), - Box(Box(6854, 6854), Box(6854, 6854)), - Box(Box(6855, 6855), Box(6855, 6855)), - Box(Box(6856, 6856), Box(6856, 6856)), - Box(Box(6857, 6857), Box(6857, 6857)), - Box(Box(6858, 6858), Box(6858, 6858)), - Box(Box(6859, 6859), Box(6859, 6859)), - Box(Box(6860, 6860), Box(6860, 6860)), - Box(Box(6861, 6861), Box(6861, 6861)), - Box(Box(6862, 6862), Box(6862, 6862)), - Box(Box(6863, 6863), Box(6863, 6863)), - Box(Box(6864, 6864), Box(6864, 6864)), - Box(Box(6865, 6865), Box(6865, 6865)), - Box(Box(6866, 6866), Box(6866, 6866)), - Box(Box(6867, 6867), Box(6867, 6867)), - Box(Box(6868, 6868), Box(6868, 6868)), - Box(Box(6869, 6869), Box(6869, 6869)), - Box(Box(6870, 6870), Box(6870, 6870)), - Box(Box(6871, 6871), Box(6871, 6871)), - Box(Box(6872, 6872), Box(6872, 6872)), - Box(Box(6873, 6873), Box(6873, 6873)), - Box(Box(6874, 6874), Box(6874, 6874)), - Box(Box(6875, 6875), Box(6875, 6875)), - Box(Box(6876, 6876), Box(6876, 6876)), - Box(Box(6877, 6877), Box(6877, 6877)), - Box(Box(6878, 6878), Box(6878, 6878)), - Box(Box(6879, 6879), Box(6879, 6879)), - Box(Box(6880, 6880), Box(6880, 6880)), - Box(Box(6881, 6881), Box(6881, 6881)), - Box(Box(6882, 6882), Box(6882, 6882)), - Box(Box(6883, 6883), Box(6883, 6883)), - Box(Box(6884, 6884), Box(6884, 6884)), - Box(Box(6885, 6885), Box(6885, 6885)), - Box(Box(6886, 6886), Box(6886, 6886)), - Box(Box(6887, 6887), Box(6887, 6887)), - Box(Box(6888, 6888), Box(6888, 6888)), - Box(Box(6889, 6889), Box(6889, 6889)), - Box(Box(6890, 6890), Box(6890, 6890)), - Box(Box(6891, 6891), Box(6891, 6891)), - Box(Box(6892, 6892), Box(6892, 6892)), - Box(Box(6893, 6893), Box(6893, 6893)), - Box(Box(6894, 6894), Box(6894, 6894)), - Box(Box(6895, 6895), Box(6895, 6895)), - Box(Box(6896, 6896), Box(6896, 6896)), - Box(Box(6897, 6897), Box(6897, 6897)), - Box(Box(6898, 6898), Box(6898, 6898)), - Box(Box(6899, 6899), Box(6899, 6899)), - Box(Box(6900, 6900), Box(6900, 6900)), - Box(Box(6901, 6901), Box(6901, 6901)), - Box(Box(6902, 6902), Box(6902, 6902)), - Box(Box(6903, 6903), Box(6903, 6903)), - Box(Box(6904, 6904), Box(6904, 6904)), - Box(Box(6905, 6905), Box(6905, 6905)), - Box(Box(6906, 6906), Box(6906, 6906)), - Box(Box(6907, 6907), Box(6907, 6907)), - Box(Box(6908, 6908), Box(6908, 6908)), - Box(Box(6909, 6909), Box(6909, 6909)), - Box(Box(6910, 6910), Box(6910, 6910)), - Box(Box(6911, 6911), Box(6911, 6911)), - Box(Box(6912, 6912), Box(6912, 6912)), - Box(Box(6913, 6913), Box(6913, 6913)), - Box(Box(6914, 6914), Box(6914, 6914)), - Box(Box(6915, 6915), Box(6915, 6915)), - Box(Box(6916, 6916), Box(6916, 6916)), - Box(Box(6917, 6917), Box(6917, 6917)), - Box(Box(6918, 6918), Box(6918, 6918)), - Box(Box(6919, 6919), Box(6919, 6919)), - Box(Box(6920, 6920), Box(6920, 6920)), - Box(Box(6921, 6921), Box(6921, 6921)), - Box(Box(6922, 6922), Box(6922, 6922)), - Box(Box(6923, 6923), Box(6923, 6923)), - Box(Box(6924, 6924), Box(6924, 6924)), - Box(Box(6925, 6925), Box(6925, 6925)), - Box(Box(6926, 6926), Box(6926, 6926)), - Box(Box(6927, 6927), Box(6927, 6927)), - Box(Box(6928, 6928), Box(6928, 6928)), - Box(Box(6929, 6929), Box(6929, 6929)), - Box(Box(6930, 6930), Box(6930, 6930)), - Box(Box(6931, 6931), Box(6931, 6931)), - Box(Box(6932, 6932), Box(6932, 6932)), - Box(Box(6933, 6933), Box(6933, 6933)), - Box(Box(6934, 6934), Box(6934, 6934)), - Box(Box(6935, 6935), Box(6935, 6935)), - Box(Box(6936, 6936), Box(6936, 6936)), - Box(Box(6937, 6937), Box(6937, 6937)), - Box(Box(6938, 6938), Box(6938, 6938)), - Box(Box(6939, 6939), Box(6939, 6939)), - Box(Box(6940, 6940), Box(6940, 6940)), - Box(Box(6941, 6941), Box(6941, 6941)), - Box(Box(6942, 6942), Box(6942, 6942)), - Box(Box(6943, 6943), Box(6943, 6943)), - Box(Box(6944, 6944), Box(6944, 6944)), - Box(Box(6945, 6945), Box(6945, 6945)), - Box(Box(6946, 6946), Box(6946, 6946)), - Box(Box(6947, 6947), Box(6947, 6947)), - Box(Box(6948, 6948), Box(6948, 6948)), - Box(Box(6949, 6949), Box(6949, 6949)), - Box(Box(6950, 6950), Box(6950, 6950)), - Box(Box(6951, 6951), Box(6951, 6951)), - Box(Box(6952, 6952), Box(6952, 6952)), - Box(Box(6953, 6953), Box(6953, 6953)), - Box(Box(6954, 6954), Box(6954, 6954)), - Box(Box(6955, 6955), Box(6955, 6955)), - Box(Box(6956, 6956), Box(6956, 6956)), - Box(Box(6957, 6957), Box(6957, 6957)), - Box(Box(6958, 6958), Box(6958, 6958)), - Box(Box(6959, 6959), Box(6959, 6959)), - Box(Box(6960, 6960), Box(6960, 6960)), - Box(Box(6961, 6961), Box(6961, 6961)), - Box(Box(6962, 6962), Box(6962, 6962)), - Box(Box(6963, 6963), Box(6963, 6963)), - Box(Box(6964, 6964), Box(6964, 6964)), - Box(Box(6965, 6965), Box(6965, 6965)), - Box(Box(6966, 6966), Box(6966, 6966)), - Box(Box(6967, 6967), Box(6967, 6967)), - Box(Box(6968, 6968), Box(6968, 6968)), - Box(Box(6969, 6969), Box(6969, 6969)), - Box(Box(6970, 6970), Box(6970, 6970)), - Box(Box(6971, 6971), Box(6971, 6971)), - Box(Box(6972, 6972), Box(6972, 6972)), - Box(Box(6973, 6973), Box(6973, 6973)), - Box(Box(6974, 6974), Box(6974, 6974)), - Box(Box(6975, 6975), Box(6975, 6975)), - Box(Box(6976, 6976), Box(6976, 6976)), - Box(Box(6977, 6977), Box(6977, 6977)), - Box(Box(6978, 6978), Box(6978, 6978)), - Box(Box(6979, 6979), Box(6979, 6979)), - Box(Box(6980, 6980), Box(6980, 6980)), - Box(Box(6981, 6981), Box(6981, 6981)), - Box(Box(6982, 6982), Box(6982, 6982)), - Box(Box(6983, 6983), Box(6983, 6983)), - Box(Box(6984, 6984), Box(6984, 6984)), - Box(Box(6985, 6985), Box(6985, 6985)), - Box(Box(6986, 6986), Box(6986, 6986)), - Box(Box(6987, 6987), Box(6987, 6987)), - Box(Box(6988, 6988), Box(6988, 6988)), - Box(Box(6989, 6989), Box(6989, 6989)), - Box(Box(6990, 6990), Box(6990, 6990)), - Box(Box(6991, 6991), Box(6991, 6991)), - Box(Box(6992, 6992), Box(6992, 6992)), - Box(Box(6993, 6993), Box(6993, 6993)), - Box(Box(6994, 6994), Box(6994, 6994)), - Box(Box(6995, 6995), Box(6995, 6995)), - Box(Box(6996, 6996), Box(6996, 6996)), - Box(Box(6997, 6997), Box(6997, 6997)), - Box(Box(6998, 6998), Box(6998, 6998)), - Box(Box(6999, 6999), Box(6999, 6999)), - Box(Box(7000, 7000), Box(7000, 7000)), - Box(Box(7001, 7001), Box(7001, 7001)), - Box(Box(7002, 7002), Box(7002, 7002)), - Box(Box(7003, 7003), Box(7003, 7003)), - Box(Box(7004, 7004), Box(7004, 7004)), - Box(Box(7005, 7005), Box(7005, 7005)), - Box(Box(7006, 7006), Box(7006, 7006)), - Box(Box(7007, 7007), Box(7007, 7007)), - Box(Box(7008, 7008), Box(7008, 7008)), - Box(Box(7009, 7009), Box(7009, 7009)), - Box(Box(7010, 7010), Box(7010, 7010)), - Box(Box(7011, 7011), Box(7011, 7011)), - Box(Box(7012, 7012), Box(7012, 7012)), - Box(Box(7013, 7013), Box(7013, 7013)), - Box(Box(7014, 7014), Box(7014, 7014)), - Box(Box(7015, 7015), Box(7015, 7015)), - Box(Box(7016, 7016), Box(7016, 7016)), - Box(Box(7017, 7017), Box(7017, 7017)), - Box(Box(7018, 7018), Box(7018, 7018)), - Box(Box(7019, 7019), Box(7019, 7019)), - Box(Box(7020, 7020), Box(7020, 7020)), - Box(Box(7021, 7021), Box(7021, 7021)), - Box(Box(7022, 7022), Box(7022, 7022)), - Box(Box(7023, 7023), Box(7023, 7023)), - Box(Box(7024, 7024), Box(7024, 7024)), - Box(Box(7025, 7025), Box(7025, 7025)), - Box(Box(7026, 7026), Box(7026, 7026)), - Box(Box(7027, 7027), Box(7027, 7027)), - Box(Box(7028, 7028), Box(7028, 7028)), - Box(Box(7029, 7029), Box(7029, 7029)), - Box(Box(7030, 7030), Box(7030, 7030)), - Box(Box(7031, 7031), Box(7031, 7031)), - Box(Box(7032, 7032), Box(7032, 7032)), - Box(Box(7033, 7033), Box(7033, 7033)), - Box(Box(7034, 7034), Box(7034, 7034)), - Box(Box(7035, 7035), Box(7035, 7035)), - Box(Box(7036, 7036), Box(7036, 7036)), - Box(Box(7037, 7037), Box(7037, 7037)), - Box(Box(7038, 7038), Box(7038, 7038)), - Box(Box(7039, 7039), Box(7039, 7039)), - Box(Box(7040, 7040), Box(7040, 7040)), - Box(Box(7041, 7041), Box(7041, 7041)), - Box(Box(7042, 7042), Box(7042, 7042)), - Box(Box(7043, 7043), Box(7043, 7043)), - Box(Box(7044, 7044), Box(7044, 7044)), - Box(Box(7045, 7045), Box(7045, 7045)), - Box(Box(7046, 7046), Box(7046, 7046)), - Box(Box(7047, 7047), Box(7047, 7047)), - Box(Box(7048, 7048), Box(7048, 7048)), - Box(Box(7049, 7049), Box(7049, 7049)), - Box(Box(7050, 7050), Box(7050, 7050)), - Box(Box(7051, 7051), Box(7051, 7051)), - Box(Box(7052, 7052), Box(7052, 7052)), - Box(Box(7053, 7053), Box(7053, 7053)), - Box(Box(7054, 7054), Box(7054, 7054)), - Box(Box(7055, 7055), Box(7055, 7055)), - Box(Box(7056, 7056), Box(7056, 7056)), - Box(Box(7057, 7057), Box(7057, 7057)), - Box(Box(7058, 7058), Box(7058, 7058)), - Box(Box(7059, 7059), Box(7059, 7059)), - Box(Box(7060, 7060), Box(7060, 7060)), - Box(Box(7061, 7061), Box(7061, 7061)), - Box(Box(7062, 7062), Box(7062, 7062)), - Box(Box(7063, 7063), Box(7063, 7063)), - Box(Box(7064, 7064), Box(7064, 7064)), - Box(Box(7065, 7065), Box(7065, 7065)), - Box(Box(7066, 7066), Box(7066, 7066)), - Box(Box(7067, 7067), Box(7067, 7067)), - Box(Box(7068, 7068), Box(7068, 7068)), - Box(Box(7069, 7069), Box(7069, 7069)), - Box(Box(7070, 7070), Box(7070, 7070)), - Box(Box(7071, 7071), Box(7071, 7071)), - Box(Box(7072, 7072), Box(7072, 7072)), - Box(Box(7073, 7073), Box(7073, 7073)), - Box(Box(7074, 7074), Box(7074, 7074)), - Box(Box(7075, 7075), Box(7075, 7075)), - Box(Box(7076, 7076), Box(7076, 7076)), - Box(Box(7077, 7077), Box(7077, 7077)), - Box(Box(7078, 7078), Box(7078, 7078)), - Box(Box(7079, 7079), Box(7079, 7079)), - Box(Box(7080, 7080), Box(7080, 7080)), - Box(Box(7081, 7081), Box(7081, 7081)), - Box(Box(7082, 7082), Box(7082, 7082)), - Box(Box(7083, 7083), Box(7083, 7083)), - Box(Box(7084, 7084), Box(7084, 7084)), - Box(Box(7085, 7085), Box(7085, 7085)), - Box(Box(7086, 7086), Box(7086, 7086)), - Box(Box(7087, 7087), Box(7087, 7087)), - Box(Box(7088, 7088), Box(7088, 7088)), - Box(Box(7089, 7089), Box(7089, 7089)), - Box(Box(7090, 7090), Box(7090, 7090)), - Box(Box(7091, 7091), Box(7091, 7091)), - Box(Box(7092, 7092), Box(7092, 7092)), - Box(Box(7093, 7093), Box(7093, 7093)), - Box(Box(7094, 7094), Box(7094, 7094)), - Box(Box(7095, 7095), Box(7095, 7095)), - Box(Box(7096, 7096), Box(7096, 7096)), - Box(Box(7097, 7097), Box(7097, 7097)), - Box(Box(7098, 7098), Box(7098, 7098)), - Box(Box(7099, 7099), Box(7099, 7099)), - Box(Box(7100, 7100), Box(7100, 7100)), - Box(Box(7101, 7101), Box(7101, 7101)), - Box(Box(7102, 7102), Box(7102, 7102)), - Box(Box(7103, 7103), Box(7103, 7103)), - Box(Box(7104, 7104), Box(7104, 7104)), - Box(Box(7105, 7105), Box(7105, 7105)), - Box(Box(7106, 7106), Box(7106, 7106)), - Box(Box(7107, 7107), Box(7107, 7107)), - Box(Box(7108, 7108), Box(7108, 7108)), - Box(Box(7109, 7109), Box(7109, 7109)), - Box(Box(7110, 7110), Box(7110, 7110)), - Box(Box(7111, 7111), Box(7111, 7111)), - Box(Box(7112, 7112), Box(7112, 7112)), - Box(Box(7113, 7113), Box(7113, 7113)), - Box(Box(7114, 7114), Box(7114, 7114)), - Box(Box(7115, 7115), Box(7115, 7115)), - Box(Box(7116, 7116), Box(7116, 7116)), - Box(Box(7117, 7117), Box(7117, 7117)), - Box(Box(7118, 7118), Box(7118, 7118)), - Box(Box(7119, 7119), Box(7119, 7119)), - Box(Box(7120, 7120), Box(7120, 7120)), - Box(Box(7121, 7121), Box(7121, 7121)), - Box(Box(7122, 7122), Box(7122, 7122)), - Box(Box(7123, 7123), Box(7123, 7123)), - Box(Box(7124, 7124), Box(7124, 7124)), - Box(Box(7125, 7125), Box(7125, 7125)), - Box(Box(7126, 7126), Box(7126, 7126)), - Box(Box(7127, 7127), Box(7127, 7127)), - Box(Box(7128, 7128), Box(7128, 7128)), - Box(Box(7129, 7129), Box(7129, 7129)), - Box(Box(7130, 7130), Box(7130, 7130)), - Box(Box(7131, 7131), Box(7131, 7131)), - Box(Box(7132, 7132), Box(7132, 7132)), - Box(Box(7133, 7133), Box(7133, 7133)), - Box(Box(7134, 7134), Box(7134, 7134)), - Box(Box(7135, 7135), Box(7135, 7135)), - Box(Box(7136, 7136), Box(7136, 7136)), - Box(Box(7137, 7137), Box(7137, 7137)), - Box(Box(7138, 7138), Box(7138, 7138)), - Box(Box(7139, 7139), Box(7139, 7139)), - Box(Box(7140, 7140), Box(7140, 7140)), - Box(Box(7141, 7141), Box(7141, 7141)), - Box(Box(7142, 7142), Box(7142, 7142)), - Box(Box(7143, 7143), Box(7143, 7143)), - Box(Box(7144, 7144), Box(7144, 7144)), - Box(Box(7145, 7145), Box(7145, 7145)), - Box(Box(7146, 7146), Box(7146, 7146)), - Box(Box(7147, 7147), Box(7147, 7147)), - Box(Box(7148, 7148), Box(7148, 7148)), - Box(Box(7149, 7149), Box(7149, 7149)), - Box(Box(7150, 7150), Box(7150, 7150)), - Box(Box(7151, 7151), Box(7151, 7151)), - Box(Box(7152, 7152), Box(7152, 7152)), - Box(Box(7153, 7153), Box(7153, 7153)), - Box(Box(7154, 7154), Box(7154, 7154)), - Box(Box(7155, 7155), Box(7155, 7155)), - Box(Box(7156, 7156), Box(7156, 7156)), - Box(Box(7157, 7157), Box(7157, 7157)), - Box(Box(7158, 7158), Box(7158, 7158)), - Box(Box(7159, 7159), Box(7159, 7159)), - Box(Box(7160, 7160), Box(7160, 7160)), - Box(Box(7161, 7161), Box(7161, 7161)), - Box(Box(7162, 7162), Box(7162, 7162)), - Box(Box(7163, 7163), Box(7163, 7163)), - Box(Box(7164, 7164), Box(7164, 7164)), - Box(Box(7165, 7165), Box(7165, 7165)), - Box(Box(7166, 7166), Box(7166, 7166)), - Box(Box(7167, 7167), Box(7167, 7167)), - Box(Box(7168, 7168), Box(7168, 7168)), - Box(Box(7169, 7169), Box(7169, 7169)), - Box(Box(7170, 7170), Box(7170, 7170)), - Box(Box(7171, 7171), Box(7171, 7171)), - Box(Box(7172, 7172), Box(7172, 7172)), - Box(Box(7173, 7173), Box(7173, 7173)), - Box(Box(7174, 7174), Box(7174, 7174)), - Box(Box(7175, 7175), Box(7175, 7175)), - Box(Box(7176, 7176), Box(7176, 7176)), - Box(Box(7177, 7177), Box(7177, 7177)), - Box(Box(7178, 7178), Box(7178, 7178)), - Box(Box(7179, 7179), Box(7179, 7179)), - Box(Box(7180, 7180), Box(7180, 7180)), - Box(Box(7181, 7181), Box(7181, 7181)), - Box(Box(7182, 7182), Box(7182, 7182)), - Box(Box(7183, 7183), Box(7183, 7183)), - Box(Box(7184, 7184), Box(7184, 7184)), - Box(Box(7185, 7185), Box(7185, 7185)), - Box(Box(7186, 7186), Box(7186, 7186)), - Box(Box(7187, 7187), Box(7187, 7187)), - Box(Box(7188, 7188), Box(7188, 7188)), - Box(Box(7189, 7189), Box(7189, 7189)), - Box(Box(7190, 7190), Box(7190, 7190)), - Box(Box(7191, 7191), Box(7191, 7191)), - Box(Box(7192, 7192), Box(7192, 7192)), - Box(Box(7193, 7193), Box(7193, 7193)), - Box(Box(7194, 7194), Box(7194, 7194)), - Box(Box(7195, 7195), Box(7195, 7195)), - Box(Box(7196, 7196), Box(7196, 7196)), - Box(Box(7197, 7197), Box(7197, 7197)), - Box(Box(7198, 7198), Box(7198, 7198)), - Box(Box(7199, 7199), Box(7199, 7199)), - Box(Box(7200, 7200), Box(7200, 7200)), - Box(Box(7201, 7201), Box(7201, 7201)), - Box(Box(7202, 7202), Box(7202, 7202)), - Box(Box(7203, 7203), Box(7203, 7203)), - Box(Box(7204, 7204), Box(7204, 7204)), - Box(Box(7205, 7205), Box(7205, 7205)), - Box(Box(7206, 7206), Box(7206, 7206)), - Box(Box(7207, 7207), Box(7207, 7207)), - Box(Box(7208, 7208), Box(7208, 7208)), - Box(Box(7209, 7209), Box(7209, 7209)), - Box(Box(7210, 7210), Box(7210, 7210)), - Box(Box(7211, 7211), Box(7211, 7211)), - Box(Box(7212, 7212), Box(7212, 7212)), - Box(Box(7213, 7213), Box(7213, 7213)), - Box(Box(7214, 7214), Box(7214, 7214)), - Box(Box(7215, 7215), Box(7215, 7215)), - Box(Box(7216, 7216), Box(7216, 7216)), - Box(Box(7217, 7217), Box(7217, 7217)), - Box(Box(7218, 7218), Box(7218, 7218)), - Box(Box(7219, 7219), Box(7219, 7219)), - Box(Box(7220, 7220), Box(7220, 7220)), - Box(Box(7221, 7221), Box(7221, 7221)), - Box(Box(7222, 7222), Box(7222, 7222)), - Box(Box(7223, 7223), Box(7223, 7223)), - Box(Box(7224, 7224), Box(7224, 7224)), - Box(Box(7225, 7225), Box(7225, 7225)), - Box(Box(7226, 7226), Box(7226, 7226)), - Box(Box(7227, 7227), Box(7227, 7227)), - Box(Box(7228, 7228), Box(7228, 7228)), - Box(Box(7229, 7229), Box(7229, 7229)), - Box(Box(7230, 7230), Box(7230, 7230)), - Box(Box(7231, 7231), Box(7231, 7231)), - Box(Box(7232, 7232), Box(7232, 7232)), - Box(Box(7233, 7233), Box(7233, 7233)), - Box(Box(7234, 7234), Box(7234, 7234)), - Box(Box(7235, 7235), Box(7235, 7235)), - Box(Box(7236, 7236), Box(7236, 7236)), - Box(Box(7237, 7237), Box(7237, 7237)), - Box(Box(7238, 7238), Box(7238, 7238)), - Box(Box(7239, 7239), Box(7239, 7239)), - Box(Box(7240, 7240), Box(7240, 7240)), - Box(Box(7241, 7241), Box(7241, 7241)), - Box(Box(7242, 7242), Box(7242, 7242)), - Box(Box(7243, 7243), Box(7243, 7243)), - Box(Box(7244, 7244), Box(7244, 7244)), - Box(Box(7245, 7245), Box(7245, 7245)), - Box(Box(7246, 7246), Box(7246, 7246)), - Box(Box(7247, 7247), Box(7247, 7247)), - Box(Box(7248, 7248), Box(7248, 7248)), - Box(Box(7249, 7249), Box(7249, 7249)), - Box(Box(7250, 7250), Box(7250, 7250)), - Box(Box(7251, 7251), Box(7251, 7251)), - Box(Box(7252, 7252), Box(7252, 7252)), - Box(Box(7253, 7253), Box(7253, 7253)), - Box(Box(7254, 7254), Box(7254, 7254)), - Box(Box(7255, 7255), Box(7255, 7255)), - Box(Box(7256, 7256), Box(7256, 7256)), - Box(Box(7257, 7257), Box(7257, 7257)), - Box(Box(7258, 7258), Box(7258, 7258)), - Box(Box(7259, 7259), Box(7259, 7259)), - Box(Box(7260, 7260), Box(7260, 7260)), - Box(Box(7261, 7261), Box(7261, 7261)), - Box(Box(7262, 7262), Box(7262, 7262)), - Box(Box(7263, 7263), Box(7263, 7263)), - Box(Box(7264, 7264), Box(7264, 7264)), - Box(Box(7265, 7265), Box(7265, 7265)), - Box(Box(7266, 7266), Box(7266, 7266)), - Box(Box(7267, 7267), Box(7267, 7267)), - Box(Box(7268, 7268), Box(7268, 7268)), - Box(Box(7269, 7269), Box(7269, 7269)), - Box(Box(7270, 7270), Box(7270, 7270)), - Box(Box(7271, 7271), Box(7271, 7271)), - Box(Box(7272, 7272), Box(7272, 7272)), - Box(Box(7273, 7273), Box(7273, 7273)), - Box(Box(7274, 7274), Box(7274, 7274)), - Box(Box(7275, 7275), Box(7275, 7275)), - Box(Box(7276, 7276), Box(7276, 7276)), - Box(Box(7277, 7277), Box(7277, 7277)), - Box(Box(7278, 7278), Box(7278, 7278)), - Box(Box(7279, 7279), Box(7279, 7279)), - Box(Box(7280, 7280), Box(7280, 7280)), - Box(Box(7281, 7281), Box(7281, 7281)), - Box(Box(7282, 7282), Box(7282, 7282)), - Box(Box(7283, 7283), Box(7283, 7283)), - Box(Box(7284, 7284), Box(7284, 7284)), - Box(Box(7285, 7285), Box(7285, 7285)), - Box(Box(7286, 7286), Box(7286, 7286)), - Box(Box(7287, 7287), Box(7287, 7287)), - Box(Box(7288, 7288), Box(7288, 7288)), - Box(Box(7289, 7289), Box(7289, 7289)), - Box(Box(7290, 7290), Box(7290, 7290)), - Box(Box(7291, 7291), Box(7291, 7291)), - Box(Box(7292, 7292), Box(7292, 7292)), - Box(Box(7293, 7293), Box(7293, 7293)), - Box(Box(7294, 7294), Box(7294, 7294)), - Box(Box(7295, 7295), Box(7295, 7295)), - Box(Box(7296, 7296), Box(7296, 7296)), - Box(Box(7297, 7297), Box(7297, 7297)), - Box(Box(7298, 7298), Box(7298, 7298)), - Box(Box(7299, 7299), Box(7299, 7299)), - Box(Box(7300, 7300), Box(7300, 7300)), - Box(Box(7301, 7301), Box(7301, 7301)), - Box(Box(7302, 7302), Box(7302, 7302)), - Box(Box(7303, 7303), Box(7303, 7303)), - Box(Box(7304, 7304), Box(7304, 7304)), - Box(Box(7305, 7305), Box(7305, 7305)), - Box(Box(7306, 7306), Box(7306, 7306)), - Box(Box(7307, 7307), Box(7307, 7307)), - Box(Box(7308, 7308), Box(7308, 7308)), - Box(Box(7309, 7309), Box(7309, 7309)), - Box(Box(7310, 7310), Box(7310, 7310)), - Box(Box(7311, 7311), Box(7311, 7311)), - Box(Box(7312, 7312), Box(7312, 7312)), - Box(Box(7313, 7313), Box(7313, 7313)), - Box(Box(7314, 7314), Box(7314, 7314)), - Box(Box(7315, 7315), Box(7315, 7315)), - Box(Box(7316, 7316), Box(7316, 7316)), - Box(Box(7317, 7317), Box(7317, 7317)), - Box(Box(7318, 7318), Box(7318, 7318)), - Box(Box(7319, 7319), Box(7319, 7319)), - Box(Box(7320, 7320), Box(7320, 7320)), - Box(Box(7321, 7321), Box(7321, 7321)), - Box(Box(7322, 7322), Box(7322, 7322)), - Box(Box(7323, 7323), Box(7323, 7323)), - Box(Box(7324, 7324), Box(7324, 7324)), - Box(Box(7325, 7325), Box(7325, 7325)), - Box(Box(7326, 7326), Box(7326, 7326)), - Box(Box(7327, 7327), Box(7327, 7327)), - Box(Box(7328, 7328), Box(7328, 7328)), - Box(Box(7329, 7329), Box(7329, 7329)), - Box(Box(7330, 7330), Box(7330, 7330)), - Box(Box(7331, 7331), Box(7331, 7331)), - Box(Box(7332, 7332), Box(7332, 7332)), - Box(Box(7333, 7333), Box(7333, 7333)), - Box(Box(7334, 7334), Box(7334, 7334)), - Box(Box(7335, 7335), Box(7335, 7335)), - Box(Box(7336, 7336), Box(7336, 7336)), - Box(Box(7337, 7337), Box(7337, 7337)), - Box(Box(7338, 7338), Box(7338, 7338)), - Box(Box(7339, 7339), Box(7339, 7339)), - Box(Box(7340, 7340), Box(7340, 7340)), - Box(Box(7341, 7341), Box(7341, 7341)), - Box(Box(7342, 7342), Box(7342, 7342)), - Box(Box(7343, 7343), Box(7343, 7343)), - Box(Box(7344, 7344), Box(7344, 7344)), - Box(Box(7345, 7345), Box(7345, 7345)), - Box(Box(7346, 7346), Box(7346, 7346)), - Box(Box(7347, 7347), Box(7347, 7347)), - Box(Box(7348, 7348), Box(7348, 7348)), - Box(Box(7349, 7349), Box(7349, 7349)), - Box(Box(7350, 7350), Box(7350, 7350)), - Box(Box(7351, 7351), Box(7351, 7351)), - Box(Box(7352, 7352), Box(7352, 7352)), - Box(Box(7353, 7353), Box(7353, 7353)), - Box(Box(7354, 7354), Box(7354, 7354)), - Box(Box(7355, 7355), Box(7355, 7355)), - Box(Box(7356, 7356), Box(7356, 7356)), - Box(Box(7357, 7357), Box(7357, 7357)), - Box(Box(7358, 7358), Box(7358, 7358)), - Box(Box(7359, 7359), Box(7359, 7359)), - Box(Box(7360, 7360), Box(7360, 7360)), - Box(Box(7361, 7361), Box(7361, 7361)), - Box(Box(7362, 7362), Box(7362, 7362)), - Box(Box(7363, 7363), Box(7363, 7363)), - Box(Box(7364, 7364), Box(7364, 7364)), - Box(Box(7365, 7365), Box(7365, 7365)), - Box(Box(7366, 7366), Box(7366, 7366)), - Box(Box(7367, 7367), Box(7367, 7367)), - Box(Box(7368, 7368), Box(7368, 7368)), - Box(Box(7369, 7369), Box(7369, 7369)), - Box(Box(7370, 7370), Box(7370, 7370)), - Box(Box(7371, 7371), Box(7371, 7371)), - Box(Box(7372, 7372), Box(7372, 7372)), - Box(Box(7373, 7373), Box(7373, 7373)), - Box(Box(7374, 7374), Box(7374, 7374)), - Box(Box(7375, 7375), Box(7375, 7375)), - Box(Box(7376, 7376), Box(7376, 7376)), - Box(Box(7377, 7377), Box(7377, 7377)), - Box(Box(7378, 7378), Box(7378, 7378)), - Box(Box(7379, 7379), Box(7379, 7379)), - Box(Box(7380, 7380), Box(7380, 7380)), - Box(Box(7381, 7381), Box(7381, 7381)), - Box(Box(7382, 7382), Box(7382, 7382)), - Box(Box(7383, 7383), Box(7383, 7383)), - Box(Box(7384, 7384), Box(7384, 7384)), - Box(Box(7385, 7385), Box(7385, 7385)), - Box(Box(7386, 7386), Box(7386, 7386)), - Box(Box(7387, 7387), Box(7387, 7387)), - Box(Box(7388, 7388), Box(7388, 7388)), - Box(Box(7389, 7389), Box(7389, 7389)), - Box(Box(7390, 7390), Box(7390, 7390)), - Box(Box(7391, 7391), Box(7391, 7391)), - Box(Box(7392, 7392), Box(7392, 7392)), - Box(Box(7393, 7393), Box(7393, 7393)), - Box(Box(7394, 7394), Box(7394, 7394)), - Box(Box(7395, 7395), Box(7395, 7395)), - Box(Box(7396, 7396), Box(7396, 7396)), - Box(Box(7397, 7397), Box(7397, 7397)), - Box(Box(7398, 7398), Box(7398, 7398)), - Box(Box(7399, 7399), Box(7399, 7399)), - Box(Box(7400, 7400), Box(7400, 7400)), - Box(Box(7401, 7401), Box(7401, 7401)), - Box(Box(7402, 7402), Box(7402, 7402)), - Box(Box(7403, 7403), Box(7403, 7403)), - Box(Box(7404, 7404), Box(7404, 7404)), - Box(Box(7405, 7405), Box(7405, 7405)), - Box(Box(7406, 7406), Box(7406, 7406)), - Box(Box(7407, 7407), Box(7407, 7407)), - Box(Box(7408, 7408), Box(7408, 7408)), - Box(Box(7409, 7409), Box(7409, 7409)), - Box(Box(7410, 7410), Box(7410, 7410)), - Box(Box(7411, 7411), Box(7411, 7411)), - Box(Box(7412, 7412), Box(7412, 7412)), - Box(Box(7413, 7413), Box(7413, 7413)), - Box(Box(7414, 7414), Box(7414, 7414)), - Box(Box(7415, 7415), Box(7415, 7415)), - Box(Box(7416, 7416), Box(7416, 7416)), - Box(Box(7417, 7417), Box(7417, 7417)), - Box(Box(7418, 7418), Box(7418, 7418)), - Box(Box(7419, 7419), Box(7419, 7419)), - Box(Box(7420, 7420), Box(7420, 7420)), - Box(Box(7421, 7421), Box(7421, 7421)), - Box(Box(7422, 7422), Box(7422, 7422)), - Box(Box(7423, 7423), Box(7423, 7423)), - Box(Box(7424, 7424), Box(7424, 7424)), - Box(Box(7425, 7425), Box(7425, 7425)), - Box(Box(7426, 7426), Box(7426, 7426)), - Box(Box(7427, 7427), Box(7427, 7427)), - Box(Box(7428, 7428), Box(7428, 7428)), - Box(Box(7429, 7429), Box(7429, 7429)), - Box(Box(7430, 7430), Box(7430, 7430)), - Box(Box(7431, 7431), Box(7431, 7431)), - Box(Box(7432, 7432), Box(7432, 7432)), - Box(Box(7433, 7433), Box(7433, 7433)), - Box(Box(7434, 7434), Box(7434, 7434)), - Box(Box(7435, 7435), Box(7435, 7435)), - Box(Box(7436, 7436), Box(7436, 7436)), - Box(Box(7437, 7437), Box(7437, 7437)), - Box(Box(7438, 7438), Box(7438, 7438)), - Box(Box(7439, 7439), Box(7439, 7439)), - Box(Box(7440, 7440), Box(7440, 7440)), - Box(Box(7441, 7441), Box(7441, 7441)), - Box(Box(7442, 7442), Box(7442, 7442)), - Box(Box(7443, 7443), Box(7443, 7443)), - Box(Box(7444, 7444), Box(7444, 7444)), - Box(Box(7445, 7445), Box(7445, 7445)), - Box(Box(7446, 7446), Box(7446, 7446)), - Box(Box(7447, 7447), Box(7447, 7447)), - Box(Box(7448, 7448), Box(7448, 7448)), - Box(Box(7449, 7449), Box(7449, 7449)), - Box(Box(7450, 7450), Box(7450, 7450)), - Box(Box(7451, 7451), Box(7451, 7451)), - Box(Box(7452, 7452), Box(7452, 7452)), - Box(Box(7453, 7453), Box(7453, 7453)), - Box(Box(7454, 7454), Box(7454, 7454)), - Box(Box(7455, 7455), Box(7455, 7455)), - Box(Box(7456, 7456), Box(7456, 7456)), - Box(Box(7457, 7457), Box(7457, 7457)), - Box(Box(7458, 7458), Box(7458, 7458)), - Box(Box(7459, 7459), Box(7459, 7459)), - Box(Box(7460, 7460), Box(7460, 7460)), - Box(Box(7461, 7461), Box(7461, 7461)), - Box(Box(7462, 7462), Box(7462, 7462)), - Box(Box(7463, 7463), Box(7463, 7463)), - Box(Box(7464, 7464), Box(7464, 7464)), - Box(Box(7465, 7465), Box(7465, 7465)), - Box(Box(7466, 7466), Box(7466, 7466)), - Box(Box(7467, 7467), Box(7467, 7467)), - Box(Box(7468, 7468), Box(7468, 7468)), - Box(Box(7469, 7469), Box(7469, 7469)), - Box(Box(7470, 7470), Box(7470, 7470)), - Box(Box(7471, 7471), Box(7471, 7471)), - Box(Box(7472, 7472), Box(7472, 7472)), - Box(Box(7473, 7473), Box(7473, 7473)), - Box(Box(7474, 7474), Box(7474, 7474)), - Box(Box(7475, 7475), Box(7475, 7475)), - Box(Box(7476, 7476), Box(7476, 7476)), - Box(Box(7477, 7477), Box(7477, 7477)), - Box(Box(7478, 7478), Box(7478, 7478)), - Box(Box(7479, 7479), Box(7479, 7479)), - Box(Box(7480, 7480), Box(7480, 7480)), - Box(Box(7481, 7481), Box(7481, 7481)), - Box(Box(7482, 7482), Box(7482, 7482)), - Box(Box(7483, 7483), Box(7483, 7483)), - Box(Box(7484, 7484), Box(7484, 7484)), - Box(Box(7485, 7485), Box(7485, 7485)), - Box(Box(7486, 7486), Box(7486, 7486)), - Box(Box(7487, 7487), Box(7487, 7487)), - Box(Box(7488, 7488), Box(7488, 7488)), - Box(Box(7489, 7489), Box(7489, 7489)), - Box(Box(7490, 7490), Box(7490, 7490)), - Box(Box(7491, 7491), Box(7491, 7491)), - Box(Box(7492, 7492), Box(7492, 7492)), - Box(Box(7493, 7493), Box(7493, 7493)), - Box(Box(7494, 7494), Box(7494, 7494)), - Box(Box(7495, 7495), Box(7495, 7495)), - Box(Box(7496, 7496), Box(7496, 7496)), - Box(Box(7497, 7497), Box(7497, 7497)), - Box(Box(7498, 7498), Box(7498, 7498)), - Box(Box(7499, 7499), Box(7499, 7499)), - Box(Box(7500, 7500), Box(7500, 7500)), - Box(Box(7501, 7501), Box(7501, 7501)), - Box(Box(7502, 7502), Box(7502, 7502)), - Box(Box(7503, 7503), Box(7503, 7503)), - Box(Box(7504, 7504), Box(7504, 7504)), - Box(Box(7505, 7505), Box(7505, 7505)), - Box(Box(7506, 7506), Box(7506, 7506)), - Box(Box(7507, 7507), Box(7507, 7507)), - Box(Box(7508, 7508), Box(7508, 7508)), - Box(Box(7509, 7509), Box(7509, 7509)), - Box(Box(7510, 7510), Box(7510, 7510)), - Box(Box(7511, 7511), Box(7511, 7511)), - Box(Box(7512, 7512), Box(7512, 7512)), - Box(Box(7513, 7513), Box(7513, 7513)), - Box(Box(7514, 7514), Box(7514, 7514)), - Box(Box(7515, 7515), Box(7515, 7515)), - Box(Box(7516, 7516), Box(7516, 7516)), - Box(Box(7517, 7517), Box(7517, 7517)), - Box(Box(7518, 7518), Box(7518, 7518)), - Box(Box(7519, 7519), Box(7519, 7519)), - Box(Box(7520, 7520), Box(7520, 7520)), - Box(Box(7521, 7521), Box(7521, 7521)), - Box(Box(7522, 7522), Box(7522, 7522)), - Box(Box(7523, 7523), Box(7523, 7523)), - Box(Box(7524, 7524), Box(7524, 7524)), - Box(Box(7525, 7525), Box(7525, 7525)), - Box(Box(7526, 7526), Box(7526, 7526)), - Box(Box(7527, 7527), Box(7527, 7527)), - Box(Box(7528, 7528), Box(7528, 7528)), - Box(Box(7529, 7529), Box(7529, 7529)), - Box(Box(7530, 7530), Box(7530, 7530)), - Box(Box(7531, 7531), Box(7531, 7531)), - Box(Box(7532, 7532), Box(7532, 7532)), - Box(Box(7533, 7533), Box(7533, 7533)), - Box(Box(7534, 7534), Box(7534, 7534)), - Box(Box(7535, 7535), Box(7535, 7535)), - Box(Box(7536, 7536), Box(7536, 7536)), - Box(Box(7537, 7537), Box(7537, 7537)), - Box(Box(7538, 7538), Box(7538, 7538)), - Box(Box(7539, 7539), Box(7539, 7539)), - Box(Box(7540, 7540), Box(7540, 7540)), - Box(Box(7541, 7541), Box(7541, 7541)), - Box(Box(7542, 7542), Box(7542, 7542)), - Box(Box(7543, 7543), Box(7543, 7543)), - Box(Box(7544, 7544), Box(7544, 7544)), - Box(Box(7545, 7545), Box(7545, 7545)), - Box(Box(7546, 7546), Box(7546, 7546)), - Box(Box(7547, 7547), Box(7547, 7547)), - Box(Box(7548, 7548), Box(7548, 7548)), - Box(Box(7549, 7549), Box(7549, 7549)), - Box(Box(7550, 7550), Box(7550, 7550)), - Box(Box(7551, 7551), Box(7551, 7551)), - Box(Box(7552, 7552), Box(7552, 7552)), - Box(Box(7553, 7553), Box(7553, 7553)), - Box(Box(7554, 7554), Box(7554, 7554)), - Box(Box(7555, 7555), Box(7555, 7555)), - Box(Box(7556, 7556), Box(7556, 7556)), - Box(Box(7557, 7557), Box(7557, 7557)), - Box(Box(7558, 7558), Box(7558, 7558)), - Box(Box(7559, 7559), Box(7559, 7559)), - Box(Box(7560, 7560), Box(7560, 7560)), - Box(Box(7561, 7561), Box(7561, 7561)), - Box(Box(7562, 7562), Box(7562, 7562)), - Box(Box(7563, 7563), Box(7563, 7563)), - Box(Box(7564, 7564), Box(7564, 7564)), - Box(Box(7565, 7565), Box(7565, 7565)), - Box(Box(7566, 7566), Box(7566, 7566)), - Box(Box(7567, 7567), Box(7567, 7567)), - Box(Box(7568, 7568), Box(7568, 7568)), - Box(Box(7569, 7569), Box(7569, 7569)), - Box(Box(7570, 7570), Box(7570, 7570)), - Box(Box(7571, 7571), Box(7571, 7571)), - Box(Box(7572, 7572), Box(7572, 7572)), - Box(Box(7573, 7573), Box(7573, 7573)), - Box(Box(7574, 7574), Box(7574, 7574)), - Box(Box(7575, 7575), Box(7575, 7575)), - Box(Box(7576, 7576), Box(7576, 7576)), - Box(Box(7577, 7577), Box(7577, 7577)), - Box(Box(7578, 7578), Box(7578, 7578)), - Box(Box(7579, 7579), Box(7579, 7579)), - Box(Box(7580, 7580), Box(7580, 7580)), - Box(Box(7581, 7581), Box(7581, 7581)), - Box(Box(7582, 7582), Box(7582, 7582)), - Box(Box(7583, 7583), Box(7583, 7583)), - Box(Box(7584, 7584), Box(7584, 7584)), - Box(Box(7585, 7585), Box(7585, 7585)), - Box(Box(7586, 7586), Box(7586, 7586)), - Box(Box(7587, 7587), Box(7587, 7587)), - Box(Box(7588, 7588), Box(7588, 7588)), - Box(Box(7589, 7589), Box(7589, 7589)), - Box(Box(7590, 7590), Box(7590, 7590)), - Box(Box(7591, 7591), Box(7591, 7591)), - Box(Box(7592, 7592), Box(7592, 7592)), - Box(Box(7593, 7593), Box(7593, 7593)), - Box(Box(7594, 7594), Box(7594, 7594)), - Box(Box(7595, 7595), Box(7595, 7595)), - Box(Box(7596, 7596), Box(7596, 7596)), - Box(Box(7597, 7597), Box(7597, 7597)), - Box(Box(7598, 7598), Box(7598, 7598)), - Box(Box(7599, 7599), Box(7599, 7599)), - Box(Box(7600, 7600), Box(7600, 7600)), - Box(Box(7601, 7601), Box(7601, 7601)), - Box(Box(7602, 7602), Box(7602, 7602)), - Box(Box(7603, 7603), Box(7603, 7603)), - Box(Box(7604, 7604), Box(7604, 7604)), - Box(Box(7605, 7605), Box(7605, 7605)), - Box(Box(7606, 7606), Box(7606, 7606)), - Box(Box(7607, 7607), Box(7607, 7607)), - Box(Box(7608, 7608), Box(7608, 7608)), - Box(Box(7609, 7609), Box(7609, 7609)), - Box(Box(7610, 7610), Box(7610, 7610)), - Box(Box(7611, 7611), Box(7611, 7611)), - Box(Box(7612, 7612), Box(7612, 7612)), - Box(Box(7613, 7613), Box(7613, 7613)), - Box(Box(7614, 7614), Box(7614, 7614)), - Box(Box(7615, 7615), Box(7615, 7615)), - Box(Box(7616, 7616), Box(7616, 7616)), - Box(Box(7617, 7617), Box(7617, 7617)), - Box(Box(7618, 7618), Box(7618, 7618)), - Box(Box(7619, 7619), Box(7619, 7619)), - Box(Box(7620, 7620), Box(7620, 7620)), - Box(Box(7621, 7621), Box(7621, 7621)), - Box(Box(7622, 7622), Box(7622, 7622)), - Box(Box(7623, 7623), Box(7623, 7623)), - Box(Box(7624, 7624), Box(7624, 7624)), - Box(Box(7625, 7625), Box(7625, 7625)), - Box(Box(7626, 7626), Box(7626, 7626)), - Box(Box(7627, 7627), Box(7627, 7627)), - Box(Box(7628, 7628), Box(7628, 7628)), - Box(Box(7629, 7629), Box(7629, 7629)), - Box(Box(7630, 7630), Box(7630, 7630)), - Box(Box(7631, 7631), Box(7631, 7631)), - Box(Box(7632, 7632), Box(7632, 7632)), - Box(Box(7633, 7633), Box(7633, 7633)), - Box(Box(7634, 7634), Box(7634, 7634)), - Box(Box(7635, 7635), Box(7635, 7635)), - Box(Box(7636, 7636), Box(7636, 7636)), - Box(Box(7637, 7637), Box(7637, 7637)), - Box(Box(7638, 7638), Box(7638, 7638)), - Box(Box(7639, 7639), Box(7639, 7639)), - Box(Box(7640, 7640), Box(7640, 7640)), - Box(Box(7641, 7641), Box(7641, 7641)), - Box(Box(7642, 7642), Box(7642, 7642)), - Box(Box(7643, 7643), Box(7643, 7643)), - Box(Box(7644, 7644), Box(7644, 7644)), - Box(Box(7645, 7645), Box(7645, 7645)), - Box(Box(7646, 7646), Box(7646, 7646)), - Box(Box(7647, 7647), Box(7647, 7647)), - Box(Box(7648, 7648), Box(7648, 7648)), - Box(Box(7649, 7649), Box(7649, 7649)), - Box(Box(7650, 7650), Box(7650, 7650)), - Box(Box(7651, 7651), Box(7651, 7651)), - Box(Box(7652, 7652), Box(7652, 7652)), - Box(Box(7653, 7653), Box(7653, 7653)), - Box(Box(7654, 7654), Box(7654, 7654)), - Box(Box(7655, 7655), Box(7655, 7655)), - Box(Box(7656, 7656), Box(7656, 7656)), - Box(Box(7657, 7657), Box(7657, 7657)), - Box(Box(7658, 7658), Box(7658, 7658)), - Box(Box(7659, 7659), Box(7659, 7659)), - Box(Box(7660, 7660), Box(7660, 7660)), - Box(Box(7661, 7661), Box(7661, 7661)), - Box(Box(7662, 7662), Box(7662, 7662)), - Box(Box(7663, 7663), Box(7663, 7663)), - Box(Box(7664, 7664), Box(7664, 7664)), - Box(Box(7665, 7665), Box(7665, 7665)), - Box(Box(7666, 7666), Box(7666, 7666)), - Box(Box(7667, 7667), Box(7667, 7667)), - Box(Box(7668, 7668), Box(7668, 7668)), - Box(Box(7669, 7669), Box(7669, 7669)), - Box(Box(7670, 7670), Box(7670, 7670)), - Box(Box(7671, 7671), Box(7671, 7671)), - Box(Box(7672, 7672), Box(7672, 7672)), - Box(Box(7673, 7673), Box(7673, 7673)), - Box(Box(7674, 7674), Box(7674, 7674)), - Box(Box(7675, 7675), Box(7675, 7675)), - Box(Box(7676, 7676), Box(7676, 7676)), - Box(Box(7677, 7677), Box(7677, 7677)), - Box(Box(7678, 7678), Box(7678, 7678)), - Box(Box(7679, 7679), Box(7679, 7679)), - Box(Box(7680, 7680), Box(7680, 7680)), - Box(Box(7681, 7681), Box(7681, 7681)), - Box(Box(7682, 7682), Box(7682, 7682)), - Box(Box(7683, 7683), Box(7683, 7683)), - Box(Box(7684, 7684), Box(7684, 7684)), - Box(Box(7685, 7685), Box(7685, 7685)), - Box(Box(7686, 7686), Box(7686, 7686)), - Box(Box(7687, 7687), Box(7687, 7687)), - Box(Box(7688, 7688), Box(7688, 7688)), - Box(Box(7689, 7689), Box(7689, 7689)), - Box(Box(7690, 7690), Box(7690, 7690)), - Box(Box(7691, 7691), Box(7691, 7691)), - Box(Box(7692, 7692), Box(7692, 7692)), - Box(Box(7693, 7693), Box(7693, 7693)), - Box(Box(7694, 7694), Box(7694, 7694)), - Box(Box(7695, 7695), Box(7695, 7695)), - Box(Box(7696, 7696), Box(7696, 7696)), - Box(Box(7697, 7697), Box(7697, 7697)), - Box(Box(7698, 7698), Box(7698, 7698)), - Box(Box(7699, 7699), Box(7699, 7699)), - Box(Box(7700, 7700), Box(7700, 7700)), - Box(Box(7701, 7701), Box(7701, 7701)), - Box(Box(7702, 7702), Box(7702, 7702)), - Box(Box(7703, 7703), Box(7703, 7703)), - Box(Box(7704, 7704), Box(7704, 7704)), - Box(Box(7705, 7705), Box(7705, 7705)), - Box(Box(7706, 7706), Box(7706, 7706)), - Box(Box(7707, 7707), Box(7707, 7707)), - Box(Box(7708, 7708), Box(7708, 7708)), - Box(Box(7709, 7709), Box(7709, 7709)), - Box(Box(7710, 7710), Box(7710, 7710)), - Box(Box(7711, 7711), Box(7711, 7711)), - Box(Box(7712, 7712), Box(7712, 7712)), - Box(Box(7713, 7713), Box(7713, 7713)), - Box(Box(7714, 7714), Box(7714, 7714)), - Box(Box(7715, 7715), Box(7715, 7715)), - Box(Box(7716, 7716), Box(7716, 7716)), - Box(Box(7717, 7717), Box(7717, 7717)), - Box(Box(7718, 7718), Box(7718, 7718)), - Box(Box(7719, 7719), Box(7719, 7719)), - Box(Box(7720, 7720), Box(7720, 7720)), - Box(Box(7721, 7721), Box(7721, 7721)), - Box(Box(7722, 7722), Box(7722, 7722)), - Box(Box(7723, 7723), Box(7723, 7723)), - Box(Box(7724, 7724), Box(7724, 7724)), - Box(Box(7725, 7725), Box(7725, 7725)), - Box(Box(7726, 7726), Box(7726, 7726)), - Box(Box(7727, 7727), Box(7727, 7727)), - Box(Box(7728, 7728), Box(7728, 7728)), - Box(Box(7729, 7729), Box(7729, 7729)), - Box(Box(7730, 7730), Box(7730, 7730)), - Box(Box(7731, 7731), Box(7731, 7731)), - Box(Box(7732, 7732), Box(7732, 7732)), - Box(Box(7733, 7733), Box(7733, 7733)), - Box(Box(7734, 7734), Box(7734, 7734)), - Box(Box(7735, 7735), Box(7735, 7735)), - Box(Box(7736, 7736), Box(7736, 7736)), - Box(Box(7737, 7737), Box(7737, 7737)), - Box(Box(7738, 7738), Box(7738, 7738)), - Box(Box(7739, 7739), Box(7739, 7739)), - Box(Box(7740, 7740), Box(7740, 7740)), - Box(Box(7741, 7741), Box(7741, 7741)), - Box(Box(7742, 7742), Box(7742, 7742)), - Box(Box(7743, 7743), Box(7743, 7743)), - Box(Box(7744, 7744), Box(7744, 7744)), - Box(Box(7745, 7745), Box(7745, 7745)), - Box(Box(7746, 7746), Box(7746, 7746)), - Box(Box(7747, 7747), Box(7747, 7747)), - Box(Box(7748, 7748), Box(7748, 7748)), - Box(Box(7749, 7749), Box(7749, 7749)), - Box(Box(7750, 7750), Box(7750, 7750)), - Box(Box(7751, 7751), Box(7751, 7751)), - Box(Box(7752, 7752), Box(7752, 7752)), - Box(Box(7753, 7753), Box(7753, 7753)), - Box(Box(7754, 7754), Box(7754, 7754)), - Box(Box(7755, 7755), Box(7755, 7755)), - Box(Box(7756, 7756), Box(7756, 7756)), - Box(Box(7757, 7757), Box(7757, 7757)), - Box(Box(7758, 7758), Box(7758, 7758)), - Box(Box(7759, 7759), Box(7759, 7759)), - Box(Box(7760, 7760), Box(7760, 7760)), - Box(Box(7761, 7761), Box(7761, 7761)), - Box(Box(7762, 7762), Box(7762, 7762)), - Box(Box(7763, 7763), Box(7763, 7763)), - Box(Box(7764, 7764), Box(7764, 7764)), - Box(Box(7765, 7765), Box(7765, 7765)), - Box(Box(7766, 7766), Box(7766, 7766)), - Box(Box(7767, 7767), Box(7767, 7767)), - Box(Box(7768, 7768), Box(7768, 7768)), - Box(Box(7769, 7769), Box(7769, 7769)), - Box(Box(7770, 7770), Box(7770, 7770)), - Box(Box(7771, 7771), Box(7771, 7771)), - Box(Box(7772, 7772), Box(7772, 7772)), - Box(Box(7773, 7773), Box(7773, 7773)), - Box(Box(7774, 7774), Box(7774, 7774)), - Box(Box(7775, 7775), Box(7775, 7775)), - Box(Box(7776, 7776), Box(7776, 7776)), - Box(Box(7777, 7777), Box(7777, 7777)), - Box(Box(7778, 7778), Box(7778, 7778)), - Box(Box(7779, 7779), Box(7779, 7779)), - Box(Box(7780, 7780), Box(7780, 7780)), - Box(Box(7781, 7781), Box(7781, 7781)), - Box(Box(7782, 7782), Box(7782, 7782)), - Box(Box(7783, 7783), Box(7783, 7783)), - Box(Box(7784, 7784), Box(7784, 7784)), - Box(Box(7785, 7785), Box(7785, 7785)), - Box(Box(7786, 7786), Box(7786, 7786)), - Box(Box(7787, 7787), Box(7787, 7787)), - Box(Box(7788, 7788), Box(7788, 7788)), - Box(Box(7789, 7789), Box(7789, 7789)), - Box(Box(7790, 7790), Box(7790, 7790)), - Box(Box(7791, 7791), Box(7791, 7791)), - Box(Box(7792, 7792), Box(7792, 7792)), - Box(Box(7793, 7793), Box(7793, 7793)), - Box(Box(7794, 7794), Box(7794, 7794)), - Box(Box(7795, 7795), Box(7795, 7795)), - Box(Box(7796, 7796), Box(7796, 7796)), - Box(Box(7797, 7797), Box(7797, 7797)), - Box(Box(7798, 7798), Box(7798, 7798)), - Box(Box(7799, 7799), Box(7799, 7799)), - Box(Box(7800, 7800), Box(7800, 7800)), - Box(Box(7801, 7801), Box(7801, 7801)), - Box(Box(7802, 7802), Box(7802, 7802)), - Box(Box(7803, 7803), Box(7803, 7803)), - Box(Box(7804, 7804), Box(7804, 7804)), - Box(Box(7805, 7805), Box(7805, 7805)), - Box(Box(7806, 7806), Box(7806, 7806)), - Box(Box(7807, 7807), Box(7807, 7807)), - Box(Box(7808, 7808), Box(7808, 7808)), - Box(Box(7809, 7809), Box(7809, 7809)), - Box(Box(7810, 7810), Box(7810, 7810)), - Box(Box(7811, 7811), Box(7811, 7811)), - Box(Box(7812, 7812), Box(7812, 7812)), - Box(Box(7813, 7813), Box(7813, 7813)), - Box(Box(7814, 7814), Box(7814, 7814)), - Box(Box(7815, 7815), Box(7815, 7815)), - Box(Box(7816, 7816), Box(7816, 7816)), - Box(Box(7817, 7817), Box(7817, 7817)), - Box(Box(7818, 7818), Box(7818, 7818)), - Box(Box(7819, 7819), Box(7819, 7819)), - Box(Box(7820, 7820), Box(7820, 7820)), - Box(Box(7821, 7821), Box(7821, 7821)), - Box(Box(7822, 7822), Box(7822, 7822)), - Box(Box(7823, 7823), Box(7823, 7823)), - Box(Box(7824, 7824), Box(7824, 7824)), - Box(Box(7825, 7825), Box(7825, 7825)), - Box(Box(7826, 7826), Box(7826, 7826)), - Box(Box(7827, 7827), Box(7827, 7827)), - Box(Box(7828, 7828), Box(7828, 7828)), - Box(Box(7829, 7829), Box(7829, 7829)), - Box(Box(7830, 7830), Box(7830, 7830)), - Box(Box(7831, 7831), Box(7831, 7831)), - Box(Box(7832, 7832), Box(7832, 7832)), - Box(Box(7833, 7833), Box(7833, 7833)), - Box(Box(7834, 7834), Box(7834, 7834)), - Box(Box(7835, 7835), Box(7835, 7835)), - Box(Box(7836, 7836), Box(7836, 7836)), - Box(Box(7837, 7837), Box(7837, 7837)), - Box(Box(7838, 7838), Box(7838, 7838)), - Box(Box(7839, 7839), Box(7839, 7839)), - Box(Box(7840, 7840), Box(7840, 7840)), - Box(Box(7841, 7841), Box(7841, 7841)), - Box(Box(7842, 7842), Box(7842, 7842)), - Box(Box(7843, 7843), Box(7843, 7843)), - Box(Box(7844, 7844), Box(7844, 7844)), - Box(Box(7845, 7845), Box(7845, 7845)), - Box(Box(7846, 7846), Box(7846, 7846)), - Box(Box(7847, 7847), Box(7847, 7847)), - Box(Box(7848, 7848), Box(7848, 7848)), - Box(Box(7849, 7849), Box(7849, 7849)), - Box(Box(7850, 7850), Box(7850, 7850)), - Box(Box(7851, 7851), Box(7851, 7851)), - Box(Box(7852, 7852), Box(7852, 7852)), - Box(Box(7853, 7853), Box(7853, 7853)), - Box(Box(7854, 7854), Box(7854, 7854)), - Box(Box(7855, 7855), Box(7855, 7855)), - Box(Box(7856, 7856), Box(7856, 7856)), - Box(Box(7857, 7857), Box(7857, 7857)), - Box(Box(7858, 7858), Box(7858, 7858)), - Box(Box(7859, 7859), Box(7859, 7859)), - Box(Box(7860, 7860), Box(7860, 7860)), - Box(Box(7861, 7861), Box(7861, 7861)), - Box(Box(7862, 7862), Box(7862, 7862)), - Box(Box(7863, 7863), Box(7863, 7863)), - Box(Box(7864, 7864), Box(7864, 7864)), - Box(Box(7865, 7865), Box(7865, 7865)), - Box(Box(7866, 7866), Box(7866, 7866)), - Box(Box(7867, 7867), Box(7867, 7867)), - Box(Box(7868, 7868), Box(7868, 7868)), - Box(Box(7869, 7869), Box(7869, 7869)), - Box(Box(7870, 7870), Box(7870, 7870)), - Box(Box(7871, 7871), Box(7871, 7871)), - Box(Box(7872, 7872), Box(7872, 7872)), - Box(Box(7873, 7873), Box(7873, 7873)), - Box(Box(7874, 7874), Box(7874, 7874)), - Box(Box(7875, 7875), Box(7875, 7875)), - Box(Box(7876, 7876), Box(7876, 7876)), - Box(Box(7877, 7877), Box(7877, 7877)), - Box(Box(7878, 7878), Box(7878, 7878)), - Box(Box(7879, 7879), Box(7879, 7879)), - Box(Box(7880, 7880), Box(7880, 7880)), - Box(Box(7881, 7881), Box(7881, 7881)), - Box(Box(7882, 7882), Box(7882, 7882)), - Box(Box(7883, 7883), Box(7883, 7883)), - Box(Box(7884, 7884), Box(7884, 7884)), - Box(Box(7885, 7885), Box(7885, 7885)), - Box(Box(7886, 7886), Box(7886, 7886)), - Box(Box(7887, 7887), Box(7887, 7887)), - Box(Box(7888, 7888), Box(7888, 7888)), - Box(Box(7889, 7889), Box(7889, 7889)), - Box(Box(7890, 7890), Box(7890, 7890)), - Box(Box(7891, 7891), Box(7891, 7891)), - Box(Box(7892, 7892), Box(7892, 7892)), - Box(Box(7893, 7893), Box(7893, 7893)), - Box(Box(7894, 7894), Box(7894, 7894)), - Box(Box(7895, 7895), Box(7895, 7895)), - Box(Box(7896, 7896), Box(7896, 7896)), - Box(Box(7897, 7897), Box(7897, 7897)), - Box(Box(7898, 7898), Box(7898, 7898)), - Box(Box(7899, 7899), Box(7899, 7899)), - Box(Box(7900, 7900), Box(7900, 7900)), - Box(Box(7901, 7901), Box(7901, 7901)), - Box(Box(7902, 7902), Box(7902, 7902)), - Box(Box(7903, 7903), Box(7903, 7903)), - Box(Box(7904, 7904), Box(7904, 7904)), - Box(Box(7905, 7905), Box(7905, 7905)), - Box(Box(7906, 7906), Box(7906, 7906)), - Box(Box(7907, 7907), Box(7907, 7907)), - Box(Box(7908, 7908), Box(7908, 7908)), - Box(Box(7909, 7909), Box(7909, 7909)), - Box(Box(7910, 7910), Box(7910, 7910)), - Box(Box(7911, 7911), Box(7911, 7911)), - Box(Box(7912, 7912), Box(7912, 7912)), - Box(Box(7913, 7913), Box(7913, 7913)), - Box(Box(7914, 7914), Box(7914, 7914)), - Box(Box(7915, 7915), Box(7915, 7915)), - Box(Box(7916, 7916), Box(7916, 7916)), - Box(Box(7917, 7917), Box(7917, 7917)), - Box(Box(7918, 7918), Box(7918, 7918)), - Box(Box(7919, 7919), Box(7919, 7919)), - Box(Box(7920, 7920), Box(7920, 7920)), - Box(Box(7921, 7921), Box(7921, 7921)), - Box(Box(7922, 7922), Box(7922, 7922)), - Box(Box(7923, 7923), Box(7923, 7923)), - Box(Box(7924, 7924), Box(7924, 7924)), - Box(Box(7925, 7925), Box(7925, 7925)), - Box(Box(7926, 7926), Box(7926, 7926)), - Box(Box(7927, 7927), Box(7927, 7927)), - Box(Box(7928, 7928), Box(7928, 7928)), - Box(Box(7929, 7929), Box(7929, 7929)), - Box(Box(7930, 7930), Box(7930, 7930)), - Box(Box(7931, 7931), Box(7931, 7931)), - Box(Box(7932, 7932), Box(7932, 7932)), - Box(Box(7933, 7933), Box(7933, 7933)), - Box(Box(7934, 7934), Box(7934, 7934)), - Box(Box(7935, 7935), Box(7935, 7935)), - Box(Box(7936, 7936), Box(7936, 7936)), - Box(Box(7937, 7937), Box(7937, 7937)), - Box(Box(7938, 7938), Box(7938, 7938)), - Box(Box(7939, 7939), Box(7939, 7939)), - Box(Box(7940, 7940), Box(7940, 7940)), - Box(Box(7941, 7941), Box(7941, 7941)), - Box(Box(7942, 7942), Box(7942, 7942)), - Box(Box(7943, 7943), Box(7943, 7943)), - Box(Box(7944, 7944), Box(7944, 7944)), - Box(Box(7945, 7945), Box(7945, 7945)), - Box(Box(7946, 7946), Box(7946, 7946)), - Box(Box(7947, 7947), Box(7947, 7947)), - Box(Box(7948, 7948), Box(7948, 7948)), - Box(Box(7949, 7949), Box(7949, 7949)), - Box(Box(7950, 7950), Box(7950, 7950)), - Box(Box(7951, 7951), Box(7951, 7951)), - Box(Box(7952, 7952), Box(7952, 7952)), - Box(Box(7953, 7953), Box(7953, 7953)), - Box(Box(7954, 7954), Box(7954, 7954)), - Box(Box(7955, 7955), Box(7955, 7955)), - Box(Box(7956, 7956), Box(7956, 7956)), - Box(Box(7957, 7957), Box(7957, 7957)), - Box(Box(7958, 7958), Box(7958, 7958)), - Box(Box(7959, 7959), Box(7959, 7959)), - Box(Box(7960, 7960), Box(7960, 7960)), - Box(Box(7961, 7961), Box(7961, 7961)), - Box(Box(7962, 7962), Box(7962, 7962)), - Box(Box(7963, 7963), Box(7963, 7963)), - Box(Box(7964, 7964), Box(7964, 7964)), - Box(Box(7965, 7965), Box(7965, 7965)), - Box(Box(7966, 7966), Box(7966, 7966)), - Box(Box(7967, 7967), Box(7967, 7967)), - Box(Box(7968, 7968), Box(7968, 7968)), - Box(Box(7969, 7969), Box(7969, 7969)), - Box(Box(7970, 7970), Box(7970, 7970)), - Box(Box(7971, 7971), Box(7971, 7971)), - Box(Box(7972, 7972), Box(7972, 7972)), - Box(Box(7973, 7973), Box(7973, 7973)), - Box(Box(7974, 7974), Box(7974, 7974)), - Box(Box(7975, 7975), Box(7975, 7975)), - Box(Box(7976, 7976), Box(7976, 7976)), - Box(Box(7977, 7977), Box(7977, 7977)), - Box(Box(7978, 7978), Box(7978, 7978)), - Box(Box(7979, 7979), Box(7979, 7979)), - Box(Box(7980, 7980), Box(7980, 7980)), - Box(Box(7981, 7981), Box(7981, 7981)), - Box(Box(7982, 7982), Box(7982, 7982)), - Box(Box(7983, 7983), Box(7983, 7983)), - Box(Box(7984, 7984), Box(7984, 7984)), - Box(Box(7985, 7985), Box(7985, 7985)), - Box(Box(7986, 7986), Box(7986, 7986)), - Box(Box(7987, 7987), Box(7987, 7987)), - Box(Box(7988, 7988), Box(7988, 7988)), - Box(Box(7989, 7989), Box(7989, 7989)), - Box(Box(7990, 7990), Box(7990, 7990)), - Box(Box(7991, 7991), Box(7991, 7991)), - Box(Box(7992, 7992), Box(7992, 7992)), - Box(Box(7993, 7993), Box(7993, 7993)), - Box(Box(7994, 7994), Box(7994, 7994)), - Box(Box(7995, 7995), Box(7995, 7995)), - Box(Box(7996, 7996), Box(7996, 7996)), - Box(Box(7997, 7997), Box(7997, 7997)), - Box(Box(7998, 7998), Box(7998, 7998)), - Box(Box(7999, 7999), Box(7999, 7999)), - Box(Box(8000, 8000), Box(8000, 8000)), - Box(Box(8001, 8001), Box(8001, 8001)), - Box(Box(8002, 8002), Box(8002, 8002)), - Box(Box(8003, 8003), Box(8003, 8003)), - Box(Box(8004, 8004), Box(8004, 8004)), - Box(Box(8005, 8005), Box(8005, 8005)), - Box(Box(8006, 8006), Box(8006, 8006)), - Box(Box(8007, 8007), Box(8007, 8007)), - Box(Box(8008, 8008), Box(8008, 8008)), - Box(Box(8009, 8009), Box(8009, 8009)), - Box(Box(8010, 8010), Box(8010, 8010)), - Box(Box(8011, 8011), Box(8011, 8011)), - Box(Box(8012, 8012), Box(8012, 8012)), - Box(Box(8013, 8013), Box(8013, 8013)), - Box(Box(8014, 8014), Box(8014, 8014)), - Box(Box(8015, 8015), Box(8015, 8015)), - Box(Box(8016, 8016), Box(8016, 8016)), - Box(Box(8017, 8017), Box(8017, 8017)), - Box(Box(8018, 8018), Box(8018, 8018)), - Box(Box(8019, 8019), Box(8019, 8019)), - Box(Box(8020, 8020), Box(8020, 8020)), - Box(Box(8021, 8021), Box(8021, 8021)), - Box(Box(8022, 8022), Box(8022, 8022)), - Box(Box(8023, 8023), Box(8023, 8023)), - Box(Box(8024, 8024), Box(8024, 8024)), - Box(Box(8025, 8025), Box(8025, 8025)), - Box(Box(8026, 8026), Box(8026, 8026)), - Box(Box(8027, 8027), Box(8027, 8027)), - Box(Box(8028, 8028), Box(8028, 8028)), - Box(Box(8029, 8029), Box(8029, 8029)), - Box(Box(8030, 8030), Box(8030, 8030)), - Box(Box(8031, 8031), Box(8031, 8031)), - Box(Box(8032, 8032), Box(8032, 8032)), - Box(Box(8033, 8033), Box(8033, 8033)), - Box(Box(8034, 8034), Box(8034, 8034)), - Box(Box(8035, 8035), Box(8035, 8035)), - Box(Box(8036, 8036), Box(8036, 8036)), - Box(Box(8037, 8037), Box(8037, 8037)), - Box(Box(8038, 8038), Box(8038, 8038)), - Box(Box(8039, 8039), Box(8039, 8039)), - Box(Box(8040, 8040), Box(8040, 8040)), - Box(Box(8041, 8041), Box(8041, 8041)), - Box(Box(8042, 8042), Box(8042, 8042)), - Box(Box(8043, 8043), Box(8043, 8043)), - Box(Box(8044, 8044), Box(8044, 8044)), - Box(Box(8045, 8045), Box(8045, 8045)), - Box(Box(8046, 8046), Box(8046, 8046)), - Box(Box(8047, 8047), Box(8047, 8047)), - Box(Box(8048, 8048), Box(8048, 8048)), - Box(Box(8049, 8049), Box(8049, 8049)), - Box(Box(8050, 8050), Box(8050, 8050)), - Box(Box(8051, 8051), Box(8051, 8051)), - Box(Box(8052, 8052), Box(8052, 8052)), - Box(Box(8053, 8053), Box(8053, 8053)), - Box(Box(8054, 8054), Box(8054, 8054)), - Box(Box(8055, 8055), Box(8055, 8055)), - Box(Box(8056, 8056), Box(8056, 8056)), - Box(Box(8057, 8057), Box(8057, 8057)), - Box(Box(8058, 8058), Box(8058, 8058)), - Box(Box(8059, 8059), Box(8059, 8059)), - Box(Box(8060, 8060), Box(8060, 8060)), - Box(Box(8061, 8061), Box(8061, 8061)), - Box(Box(8062, 8062), Box(8062, 8062)), - Box(Box(8063, 8063), Box(8063, 8063)), - Box(Box(8064, 8064), Box(8064, 8064)), - Box(Box(8065, 8065), Box(8065, 8065)), - Box(Box(8066, 8066), Box(8066, 8066)), - Box(Box(8067, 8067), Box(8067, 8067)), - Box(Box(8068, 8068), Box(8068, 8068)), - Box(Box(8069, 8069), Box(8069, 8069)), - Box(Box(8070, 8070), Box(8070, 8070)), - Box(Box(8071, 8071), Box(8071, 8071)), - Box(Box(8072, 8072), Box(8072, 8072)), - Box(Box(8073, 8073), Box(8073, 8073)), - Box(Box(8074, 8074), Box(8074, 8074)), - Box(Box(8075, 8075), Box(8075, 8075)), - Box(Box(8076, 8076), Box(8076, 8076)), - Box(Box(8077, 8077), Box(8077, 8077)), - Box(Box(8078, 8078), Box(8078, 8078)), - Box(Box(8079, 8079), Box(8079, 8079)), - Box(Box(8080, 8080), Box(8080, 8080)), - Box(Box(8081, 8081), Box(8081, 8081)), - Box(Box(8082, 8082), Box(8082, 8082)), - Box(Box(8083, 8083), Box(8083, 8083)), - Box(Box(8084, 8084), Box(8084, 8084)), - Box(Box(8085, 8085), Box(8085, 8085)), - Box(Box(8086, 8086), Box(8086, 8086)), - Box(Box(8087, 8087), Box(8087, 8087)), - Box(Box(8088, 8088), Box(8088, 8088)), - Box(Box(8089, 8089), Box(8089, 8089)), - Box(Box(8090, 8090), Box(8090, 8090)), - Box(Box(8091, 8091), Box(8091, 8091)), - Box(Box(8092, 8092), Box(8092, 8092)), - Box(Box(8093, 8093), Box(8093, 8093)), - Box(Box(8094, 8094), Box(8094, 8094)), - Box(Box(8095, 8095), Box(8095, 8095)), - Box(Box(8096, 8096), Box(8096, 8096)), - Box(Box(8097, 8097), Box(8097, 8097)), - Box(Box(8098, 8098), Box(8098, 8098)), - Box(Box(8099, 8099), Box(8099, 8099)), - Box(Box(8100, 8100), Box(8100, 8100)), - Box(Box(8101, 8101), Box(8101, 8101)), - Box(Box(8102, 8102), Box(8102, 8102)), - Box(Box(8103, 8103), Box(8103, 8103)), - Box(Box(8104, 8104), Box(8104, 8104)), - Box(Box(8105, 8105), Box(8105, 8105)), - Box(Box(8106, 8106), Box(8106, 8106)), - Box(Box(8107, 8107), Box(8107, 8107)), - Box(Box(8108, 8108), Box(8108, 8108)), - Box(Box(8109, 8109), Box(8109, 8109)), - Box(Box(8110, 8110), Box(8110, 8110)), - Box(Box(8111, 8111), Box(8111, 8111)), - Box(Box(8112, 8112), Box(8112, 8112)), - Box(Box(8113, 8113), Box(8113, 8113)), - Box(Box(8114, 8114), Box(8114, 8114)), - Box(Box(8115, 8115), Box(8115, 8115)), - Box(Box(8116, 8116), Box(8116, 8116)), - Box(Box(8117, 8117), Box(8117, 8117)), - Box(Box(8118, 8118), Box(8118, 8118)), - Box(Box(8119, 8119), Box(8119, 8119)), - Box(Box(8120, 8120), Box(8120, 8120)), - Box(Box(8121, 8121), Box(8121, 8121)), - Box(Box(8122, 8122), Box(8122, 8122)), - Box(Box(8123, 8123), Box(8123, 8123)), - Box(Box(8124, 8124), Box(8124, 8124)), - Box(Box(8125, 8125), Box(8125, 8125)), - Box(Box(8126, 8126), Box(8126, 8126)), - Box(Box(8127, 8127), Box(8127, 8127)), - Box(Box(8128, 8128), Box(8128, 8128)), - Box(Box(8129, 8129), Box(8129, 8129)), - Box(Box(8130, 8130), Box(8130, 8130)), - Box(Box(8131, 8131), Box(8131, 8131)), - Box(Box(8132, 8132), Box(8132, 8132)), - Box(Box(8133, 8133), Box(8133, 8133)), - Box(Box(8134, 8134), Box(8134, 8134)), - Box(Box(8135, 8135), Box(8135, 8135)), - Box(Box(8136, 8136), Box(8136, 8136)), - Box(Box(8137, 8137), Box(8137, 8137)), - Box(Box(8138, 8138), Box(8138, 8138)), - Box(Box(8139, 8139), Box(8139, 8139)), - Box(Box(8140, 8140), Box(8140, 8140)), - Box(Box(8141, 8141), Box(8141, 8141)), - Box(Box(8142, 8142), Box(8142, 8142)), - Box(Box(8143, 8143), Box(8143, 8143)), - Box(Box(8144, 8144), Box(8144, 8144)), - Box(Box(8145, 8145), Box(8145, 8145)), - Box(Box(8146, 8146), Box(8146, 8146)), - Box(Box(8147, 8147), Box(8147, 8147)), - Box(Box(8148, 8148), Box(8148, 8148)), - Box(Box(8149, 8149), Box(8149, 8149)), - Box(Box(8150, 8150), Box(8150, 8150)), - Box(Box(8151, 8151), Box(8151, 8151)), - Box(Box(8152, 8152), Box(8152, 8152)), - Box(Box(8153, 8153), Box(8153, 8153)), - Box(Box(8154, 8154), Box(8154, 8154)), - Box(Box(8155, 8155), Box(8155, 8155)), - Box(Box(8156, 8156), Box(8156, 8156)), - Box(Box(8157, 8157), Box(8157, 8157)), - Box(Box(8158, 8158), Box(8158, 8158)), - Box(Box(8159, 8159), Box(8159, 8159)), - Box(Box(8160, 8160), Box(8160, 8160)), - Box(Box(8161, 8161), Box(8161, 8161)), - Box(Box(8162, 8162), Box(8162, 8162)), - Box(Box(8163, 8163), Box(8163, 8163)), - Box(Box(8164, 8164), Box(8164, 8164)), - Box(Box(8165, 8165), Box(8165, 8165)), - Box(Box(8166, 8166), Box(8166, 8166)), - Box(Box(8167, 8167), Box(8167, 8167)), - Box(Box(8168, 8168), Box(8168, 8168)), - Box(Box(8169, 8169), Box(8169, 8169)), - Box(Box(8170, 8170), Box(8170, 8170)), - Box(Box(8171, 8171), Box(8171, 8171)), - Box(Box(8172, 8172), Box(8172, 8172)), - Box(Box(8173, 8173), Box(8173, 8173)), - Box(Box(8174, 8174), Box(8174, 8174)), - Box(Box(8175, 8175), Box(8175, 8175)), - Box(Box(8176, 8176), Box(8176, 8176)), - Box(Box(8177, 8177), Box(8177, 8177)), - Box(Box(8178, 8178), Box(8178, 8178)), - Box(Box(8179, 8179), Box(8179, 8179)), - Box(Box(8180, 8180), Box(8180, 8180)), - Box(Box(8181, 8181), Box(8181, 8181)), - Box(Box(8182, 8182), Box(8182, 8182)), - Box(Box(8183, 8183), Box(8183, 8183)), - Box(Box(8184, 8184), Box(8184, 8184)), - Box(Box(8185, 8185), Box(8185, 8185)), - Box(Box(8186, 8186), Box(8186, 8186)), - Box(Box(8187, 8187), Box(8187, 8187)), - Box(Box(8188, 8188), Box(8188, 8188)), - Box(Box(8189, 8189), Box(8189, 8189)), - Box(Box(8190, 8190), Box(8190, 8190)), - Box(Box(8191, 8191), Box(8191, 8191)), - Box(Box(8192, 8192), Box(8192, 8192)), - Box(Box(8193, 8193), Box(8193, 8193)), - Box(Box(8194, 8194), Box(8194, 8194)), - Box(Box(8195, 8195), Box(8195, 8195)), - Box(Box(8196, 8196), Box(8196, 8196)), - Box(Box(8197, 8197), Box(8197, 8197)), - Box(Box(8198, 8198), Box(8198, 8198)), - Box(Box(8199, 8199), Box(8199, 8199)), - Box(Box(8200, 8200), Box(8200, 8200)), - Box(Box(8201, 8201), Box(8201, 8201)), - Box(Box(8202, 8202), Box(8202, 8202)), - Box(Box(8203, 8203), Box(8203, 8203)), - Box(Box(8204, 8204), Box(8204, 8204)), - Box(Box(8205, 8205), Box(8205, 8205)), - Box(Box(8206, 8206), Box(8206, 8206)), - Box(Box(8207, 8207), Box(8207, 8207)), - Box(Box(8208, 8208), Box(8208, 8208)), - Box(Box(8209, 8209), Box(8209, 8209)), - Box(Box(8210, 8210), Box(8210, 8210)), - Box(Box(8211, 8211), Box(8211, 8211)), - Box(Box(8212, 8212), Box(8212, 8212)), - Box(Box(8213, 8213), Box(8213, 8213)), - Box(Box(8214, 8214), Box(8214, 8214)), - Box(Box(8215, 8215), Box(8215, 8215)), - Box(Box(8216, 8216), Box(8216, 8216)), - Box(Box(8217, 8217), Box(8217, 8217)), - Box(Box(8218, 8218), Box(8218, 8218)), - Box(Box(8219, 8219), Box(8219, 8219)), - Box(Box(8220, 8220), Box(8220, 8220)), - Box(Box(8221, 8221), Box(8221, 8221)), - Box(Box(8222, 8222), Box(8222, 8222)), - Box(Box(8223, 8223), Box(8223, 8223)), - Box(Box(8224, 8224), Box(8224, 8224)), - Box(Box(8225, 8225), Box(8225, 8225)), - Box(Box(8226, 8226), Box(8226, 8226)), - Box(Box(8227, 8227), Box(8227, 8227)), - Box(Box(8228, 8228), Box(8228, 8228)), - Box(Box(8229, 8229), Box(8229, 8229)), - Box(Box(8230, 8230), Box(8230, 8230)), - Box(Box(8231, 8231), Box(8231, 8231)), - Box(Box(8232, 8232), Box(8232, 8232)), - Box(Box(8233, 8233), Box(8233, 8233)), - Box(Box(8234, 8234), Box(8234, 8234)), - Box(Box(8235, 8235), Box(8235, 8235)), - Box(Box(8236, 8236), Box(8236, 8236)), - Box(Box(8237, 8237), Box(8237, 8237)), - Box(Box(8238, 8238), Box(8238, 8238)), - Box(Box(8239, 8239), Box(8239, 8239)), - Box(Box(8240, 8240), Box(8240, 8240)), - Box(Box(8241, 8241), Box(8241, 8241)), - Box(Box(8242, 8242), Box(8242, 8242)), - Box(Box(8243, 8243), Box(8243, 8243)), - Box(Box(8244, 8244), Box(8244, 8244)), - Box(Box(8245, 8245), Box(8245, 8245)), - Box(Box(8246, 8246), Box(8246, 8246)), - Box(Box(8247, 8247), Box(8247, 8247)), - Box(Box(8248, 8248), Box(8248, 8248)), - Box(Box(8249, 8249), Box(8249, 8249)), - Box(Box(8250, 8250), Box(8250, 8250)), - Box(Box(8251, 8251), Box(8251, 8251)), - Box(Box(8252, 8252), Box(8252, 8252)), - Box(Box(8253, 8253), Box(8253, 8253)), - Box(Box(8254, 8254), Box(8254, 8254)), - Box(Box(8255, 8255), Box(8255, 8255)), - Box(Box(8256, 8256), Box(8256, 8256)), - Box(Box(8257, 8257), Box(8257, 8257)), - Box(Box(8258, 8258), Box(8258, 8258)), - Box(Box(8259, 8259), Box(8259, 8259)), - Box(Box(8260, 8260), Box(8260, 8260)), - Box(Box(8261, 8261), Box(8261, 8261)), - Box(Box(8262, 8262), Box(8262, 8262)), - Box(Box(8263, 8263), Box(8263, 8263)), - Box(Box(8264, 8264), Box(8264, 8264)), - Box(Box(8265, 8265), Box(8265, 8265)), - Box(Box(8266, 8266), Box(8266, 8266)), - Box(Box(8267, 8267), Box(8267, 8267)), - Box(Box(8268, 8268), Box(8268, 8268)), - Box(Box(8269, 8269), Box(8269, 8269)), - Box(Box(8270, 8270), Box(8270, 8270)), - Box(Box(8271, 8271), Box(8271, 8271)), - Box(Box(8272, 8272), Box(8272, 8272)), - Box(Box(8273, 8273), Box(8273, 8273)), - Box(Box(8274, 8274), Box(8274, 8274)), - Box(Box(8275, 8275), Box(8275, 8275)), - Box(Box(8276, 8276), Box(8276, 8276)), - Box(Box(8277, 8277), Box(8277, 8277)), - Box(Box(8278, 8278), Box(8278, 8278)), - Box(Box(8279, 8279), Box(8279, 8279)), - Box(Box(8280, 8280), Box(8280, 8280)), - Box(Box(8281, 8281), Box(8281, 8281)), - Box(Box(8282, 8282), Box(8282, 8282)), - Box(Box(8283, 8283), Box(8283, 8283)), - Box(Box(8284, 8284), Box(8284, 8284)), - Box(Box(8285, 8285), Box(8285, 8285)), - Box(Box(8286, 8286), Box(8286, 8286)), - Box(Box(8287, 8287), Box(8287, 8287)), - Box(Box(8288, 8288), Box(8288, 8288)), - Box(Box(8289, 8289), Box(8289, 8289)), - Box(Box(8290, 8290), Box(8290, 8290)), - Box(Box(8291, 8291), Box(8291, 8291)), - Box(Box(8292, 8292), Box(8292, 8292)), - Box(Box(8293, 8293), Box(8293, 8293)), - Box(Box(8294, 8294), Box(8294, 8294)), - Box(Box(8295, 8295), Box(8295, 8295)), - Box(Box(8296, 8296), Box(8296, 8296)), - Box(Box(8297, 8297), Box(8297, 8297)), - Box(Box(8298, 8298), Box(8298, 8298)), - Box(Box(8299, 8299), Box(8299, 8299)), - Box(Box(8300, 8300), Box(8300, 8300)), - Box(Box(8301, 8301), Box(8301, 8301)), - Box(Box(8302, 8302), Box(8302, 8302)), - Box(Box(8303, 8303), Box(8303, 8303)), - Box(Box(8304, 8304), Box(8304, 8304)), - Box(Box(8305, 8305), Box(8305, 8305)), - Box(Box(8306, 8306), Box(8306, 8306)), - Box(Box(8307, 8307), Box(8307, 8307)), - Box(Box(8308, 8308), Box(8308, 8308)), - Box(Box(8309, 8309), Box(8309, 8309)), - Box(Box(8310, 8310), Box(8310, 8310)), - Box(Box(8311, 8311), Box(8311, 8311)), - Box(Box(8312, 8312), Box(8312, 8312)), - Box(Box(8313, 8313), Box(8313, 8313)), - Box(Box(8314, 8314), Box(8314, 8314)), - Box(Box(8315, 8315), Box(8315, 8315)), - Box(Box(8316, 8316), Box(8316, 8316)), - Box(Box(8317, 8317), Box(8317, 8317)), - Box(Box(8318, 8318), Box(8318, 8318)), - Box(Box(8319, 8319), Box(8319, 8319)), - Box(Box(8320, 8320), Box(8320, 8320)), - Box(Box(8321, 8321), Box(8321, 8321)), - Box(Box(8322, 8322), Box(8322, 8322)), - Box(Box(8323, 8323), Box(8323, 8323)), - Box(Box(8324, 8324), Box(8324, 8324)), - Box(Box(8325, 8325), Box(8325, 8325)), - Box(Box(8326, 8326), Box(8326, 8326)), - Box(Box(8327, 8327), Box(8327, 8327)), - Box(Box(8328, 8328), Box(8328, 8328)), - Box(Box(8329, 8329), Box(8329, 8329)), - Box(Box(8330, 8330), Box(8330, 8330)), - Box(Box(8331, 8331), Box(8331, 8331)), - Box(Box(8332, 8332), Box(8332, 8332)), - Box(Box(8333, 8333), Box(8333, 8333)), - Box(Box(8334, 8334), Box(8334, 8334)), - Box(Box(8335, 8335), Box(8335, 8335)), - Box(Box(8336, 8336), Box(8336, 8336)), - Box(Box(8337, 8337), Box(8337, 8337)), - Box(Box(8338, 8338), Box(8338, 8338)), - Box(Box(8339, 8339), Box(8339, 8339)), - Box(Box(8340, 8340), Box(8340, 8340)), - Box(Box(8341, 8341), Box(8341, 8341)), - Box(Box(8342, 8342), Box(8342, 8342)), - Box(Box(8343, 8343), Box(8343, 8343)), - Box(Box(8344, 8344), Box(8344, 8344)), - Box(Box(8345, 8345), Box(8345, 8345)), - Box(Box(8346, 8346), Box(8346, 8346)), - Box(Box(8347, 8347), Box(8347, 8347)), - Box(Box(8348, 8348), Box(8348, 8348)), - Box(Box(8349, 8349), Box(8349, 8349)), - Box(Box(8350, 8350), Box(8350, 8350)), - Box(Box(8351, 8351), Box(8351, 8351)), - Box(Box(8352, 8352), Box(8352, 8352)), - Box(Box(8353, 8353), Box(8353, 8353)), - Box(Box(8354, 8354), Box(8354, 8354)), - Box(Box(8355, 8355), Box(8355, 8355)), - Box(Box(8356, 8356), Box(8356, 8356)), - Box(Box(8357, 8357), Box(8357, 8357)), - Box(Box(8358, 8358), Box(8358, 8358)), - Box(Box(8359, 8359), Box(8359, 8359)), - Box(Box(8360, 8360), Box(8360, 8360)), - Box(Box(8361, 8361), Box(8361, 8361)), - Box(Box(8362, 8362), Box(8362, 8362)), - Box(Box(8363, 8363), Box(8363, 8363)), - Box(Box(8364, 8364), Box(8364, 8364)), - Box(Box(8365, 8365), Box(8365, 8365)), - Box(Box(8366, 8366), Box(8366, 8366)), - Box(Box(8367, 8367), Box(8367, 8367)), - Box(Box(8368, 8368), Box(8368, 8368)), - Box(Box(8369, 8369), Box(8369, 8369)), - Box(Box(8370, 8370), Box(8370, 8370)), - Box(Box(8371, 8371), Box(8371, 8371)), - Box(Box(8372, 8372), Box(8372, 8372)), - Box(Box(8373, 8373), Box(8373, 8373)), - Box(Box(8374, 8374), Box(8374, 8374)), - Box(Box(8375, 8375), Box(8375, 8375)), - Box(Box(8376, 8376), Box(8376, 8376)), - Box(Box(8377, 8377), Box(8377, 8377)), - Box(Box(8378, 8378), Box(8378, 8378)), - Box(Box(8379, 8379), Box(8379, 8379)), - Box(Box(8380, 8380), Box(8380, 8380)), - Box(Box(8381, 8381), Box(8381, 8381)), - Box(Box(8382, 8382), Box(8382, 8382)), - Box(Box(8383, 8383), Box(8383, 8383)), - Box(Box(8384, 8384), Box(8384, 8384)), - Box(Box(8385, 8385), Box(8385, 8385)), - Box(Box(8386, 8386), Box(8386, 8386)), - Box(Box(8387, 8387), Box(8387, 8387)), - Box(Box(8388, 8388), Box(8388, 8388)), - Box(Box(8389, 8389), Box(8389, 8389)), - Box(Box(8390, 8390), Box(8390, 8390)), - Box(Box(8391, 8391), Box(8391, 8391)), - Box(Box(8392, 8392), Box(8392, 8392)), - Box(Box(8393, 8393), Box(8393, 8393)), - Box(Box(8394, 8394), Box(8394, 8394)), - Box(Box(8395, 8395), Box(8395, 8395)), - Box(Box(8396, 8396), Box(8396, 8396)), - Box(Box(8397, 8397), Box(8397, 8397)), - Box(Box(8398, 8398), Box(8398, 8398)), - Box(Box(8399, 8399), Box(8399, 8399)), - Box(Box(8400, 8400), Box(8400, 8400)), - Box(Box(8401, 8401), Box(8401, 8401)), - Box(Box(8402, 8402), Box(8402, 8402)), - Box(Box(8403, 8403), Box(8403, 8403)), - Box(Box(8404, 8404), Box(8404, 8404)), - Box(Box(8405, 8405), Box(8405, 8405)), - Box(Box(8406, 8406), Box(8406, 8406)), - Box(Box(8407, 8407), Box(8407, 8407)), - Box(Box(8408, 8408), Box(8408, 8408)), - Box(Box(8409, 8409), Box(8409, 8409)), - Box(Box(8410, 8410), Box(8410, 8410)), - Box(Box(8411, 8411), Box(8411, 8411)), - Box(Box(8412, 8412), Box(8412, 8412)), - Box(Box(8413, 8413), Box(8413, 8413)), - Box(Box(8414, 8414), Box(8414, 8414)), - Box(Box(8415, 8415), Box(8415, 8415)), - Box(Box(8416, 8416), Box(8416, 8416)), - Box(Box(8417, 8417), Box(8417, 8417)), - Box(Box(8418, 8418), Box(8418, 8418)), - Box(Box(8419, 8419), Box(8419, 8419)), - Box(Box(8420, 8420), Box(8420, 8420)), - Box(Box(8421, 8421), Box(8421, 8421)), - Box(Box(8422, 8422), Box(8422, 8422)), - Box(Box(8423, 8423), Box(8423, 8423)), - Box(Box(8424, 8424), Box(8424, 8424)), - Box(Box(8425, 8425), Box(8425, 8425)), - Box(Box(8426, 8426), Box(8426, 8426)), - Box(Box(8427, 8427), Box(8427, 8427)), - Box(Box(8428, 8428), Box(8428, 8428)), - Box(Box(8429, 8429), Box(8429, 8429)), - Box(Box(8430, 8430), Box(8430, 8430)), - Box(Box(8431, 8431), Box(8431, 8431)), - Box(Box(8432, 8432), Box(8432, 8432)), - Box(Box(8433, 8433), Box(8433, 8433)), - Box(Box(8434, 8434), Box(8434, 8434)), - Box(Box(8435, 8435), Box(8435, 8435)), - Box(Box(8436, 8436), Box(8436, 8436)), - Box(Box(8437, 8437), Box(8437, 8437)), - Box(Box(8438, 8438), Box(8438, 8438)), - Box(Box(8439, 8439), Box(8439, 8439)), - Box(Box(8440, 8440), Box(8440, 8440)), - Box(Box(8441, 8441), Box(8441, 8441)), - Box(Box(8442, 8442), Box(8442, 8442)), - Box(Box(8443, 8443), Box(8443, 8443)), - Box(Box(8444, 8444), Box(8444, 8444)), - Box(Box(8445, 8445), Box(8445, 8445)), - Box(Box(8446, 8446), Box(8446, 8446)), - Box(Box(8447, 8447), Box(8447, 8447)), - Box(Box(8448, 8448), Box(8448, 8448)), - Box(Box(8449, 8449), Box(8449, 8449)), - Box(Box(8450, 8450), Box(8450, 8450)), - Box(Box(8451, 8451), Box(8451, 8451)), - Box(Box(8452, 8452), Box(8452, 8452)), - Box(Box(8453, 8453), Box(8453, 8453)), - Box(Box(8454, 8454), Box(8454, 8454)), - Box(Box(8455, 8455), Box(8455, 8455)), - Box(Box(8456, 8456), Box(8456, 8456)), - Box(Box(8457, 8457), Box(8457, 8457)), - Box(Box(8458, 8458), Box(8458, 8458)), - Box(Box(8459, 8459), Box(8459, 8459)), - Box(Box(8460, 8460), Box(8460, 8460)), - Box(Box(8461, 8461), Box(8461, 8461)), - Box(Box(8462, 8462), Box(8462, 8462)), - Box(Box(8463, 8463), Box(8463, 8463)), - Box(Box(8464, 8464), Box(8464, 8464)), - Box(Box(8465, 8465), Box(8465, 8465)), - Box(Box(8466, 8466), Box(8466, 8466)), - Box(Box(8467, 8467), Box(8467, 8467)), - Box(Box(8468, 8468), Box(8468, 8468)), - Box(Box(8469, 8469), Box(8469, 8469)), - Box(Box(8470, 8470), Box(8470, 8470)), - Box(Box(8471, 8471), Box(8471, 8471)), - Box(Box(8472, 8472), Box(8472, 8472)), - Box(Box(8473, 8473), Box(8473, 8473)), - Box(Box(8474, 8474), Box(8474, 8474)), - Box(Box(8475, 8475), Box(8475, 8475)), - Box(Box(8476, 8476), Box(8476, 8476)), - Box(Box(8477, 8477), Box(8477, 8477)), - Box(Box(8478, 8478), Box(8478, 8478)), - Box(Box(8479, 8479), Box(8479, 8479)), - Box(Box(8480, 8480), Box(8480, 8480)), - Box(Box(8481, 8481), Box(8481, 8481)), - Box(Box(8482, 8482), Box(8482, 8482)), - Box(Box(8483, 8483), Box(8483, 8483)), - Box(Box(8484, 8484), Box(8484, 8484)), - Box(Box(8485, 8485), Box(8485, 8485)), - Box(Box(8486, 8486), Box(8486, 8486)), - Box(Box(8487, 8487), Box(8487, 8487)), - Box(Box(8488, 8488), Box(8488, 8488)), - Box(Box(8489, 8489), Box(8489, 8489)), - Box(Box(8490, 8490), Box(8490, 8490)), - Box(Box(8491, 8491), Box(8491, 8491)), - Box(Box(8492, 8492), Box(8492, 8492)), - Box(Box(8493, 8493), Box(8493, 8493)), - Box(Box(8494, 8494), Box(8494, 8494)), - Box(Box(8495, 8495), Box(8495, 8495)), - Box(Box(8496, 8496), Box(8496, 8496)), - Box(Box(8497, 8497), Box(8497, 8497)), - Box(Box(8498, 8498), Box(8498, 8498)), - Box(Box(8499, 8499), Box(8499, 8499)), - Box(Box(8500, 8500), Box(8500, 8500)), - Box(Box(8501, 8501), Box(8501, 8501)), - Box(Box(8502, 8502), Box(8502, 8502)), - Box(Box(8503, 8503), Box(8503, 8503)), - Box(Box(8504, 8504), Box(8504, 8504)), - Box(Box(8505, 8505), Box(8505, 8505)), - Box(Box(8506, 8506), Box(8506, 8506)), - Box(Box(8507, 8507), Box(8507, 8507)), - Box(Box(8508, 8508), Box(8508, 8508)), - Box(Box(8509, 8509), Box(8509, 8509)), - Box(Box(8510, 8510), Box(8510, 8510)), - Box(Box(8511, 8511), Box(8511, 8511)), - Box(Box(8512, 8512), Box(8512, 8512)), - Box(Box(8513, 8513), Box(8513, 8513)), - Box(Box(8514, 8514), Box(8514, 8514)), - Box(Box(8515, 8515), Box(8515, 8515)), - Box(Box(8516, 8516), Box(8516, 8516)), - Box(Box(8517, 8517), Box(8517, 8517)), - Box(Box(8518, 8518), Box(8518, 8518)), - Box(Box(8519, 8519), Box(8519, 8519)), - Box(Box(8520, 8520), Box(8520, 8520)), - Box(Box(8521, 8521), Box(8521, 8521)), - Box(Box(8522, 8522), Box(8522, 8522)), - Box(Box(8523, 8523), Box(8523, 8523)), - Box(Box(8524, 8524), Box(8524, 8524)), - Box(Box(8525, 8525), Box(8525, 8525)), - Box(Box(8526, 8526), Box(8526, 8526)), - Box(Box(8527, 8527), Box(8527, 8527)), - Box(Box(8528, 8528), Box(8528, 8528)), - Box(Box(8529, 8529), Box(8529, 8529)), - Box(Box(8530, 8530), Box(8530, 8530)), - Box(Box(8531, 8531), Box(8531, 8531)), - Box(Box(8532, 8532), Box(8532, 8532)), - Box(Box(8533, 8533), Box(8533, 8533)), - Box(Box(8534, 8534), Box(8534, 8534)), - Box(Box(8535, 8535), Box(8535, 8535)), - Box(Box(8536, 8536), Box(8536, 8536)), - Box(Box(8537, 8537), Box(8537, 8537)), - Box(Box(8538, 8538), Box(8538, 8538)), - Box(Box(8539, 8539), Box(8539, 8539)), - Box(Box(8540, 8540), Box(8540, 8540)), - Box(Box(8541, 8541), Box(8541, 8541)), - Box(Box(8542, 8542), Box(8542, 8542)), - Box(Box(8543, 8543), Box(8543, 8543)), - Box(Box(8544, 8544), Box(8544, 8544)), - Box(Box(8545, 8545), Box(8545, 8545)), - Box(Box(8546, 8546), Box(8546, 8546)), - Box(Box(8547, 8547), Box(8547, 8547)), - Box(Box(8548, 8548), Box(8548, 8548)), - Box(Box(8549, 8549), Box(8549, 8549)), - Box(Box(8550, 8550), Box(8550, 8550)), - Box(Box(8551, 8551), Box(8551, 8551)), - Box(Box(8552, 8552), Box(8552, 8552)), - Box(Box(8553, 8553), Box(8553, 8553)), - Box(Box(8554, 8554), Box(8554, 8554)), - Box(Box(8555, 8555), Box(8555, 8555)), - Box(Box(8556, 8556), Box(8556, 8556)), - Box(Box(8557, 8557), Box(8557, 8557)), - Box(Box(8558, 8558), Box(8558, 8558)), - Box(Box(8559, 8559), Box(8559, 8559)), - Box(Box(8560, 8560), Box(8560, 8560)), - Box(Box(8561, 8561), Box(8561, 8561)), - Box(Box(8562, 8562), Box(8562, 8562)), - Box(Box(8563, 8563), Box(8563, 8563)), - Box(Box(8564, 8564), Box(8564, 8564)), - Box(Box(8565, 8565), Box(8565, 8565)), - Box(Box(8566, 8566), Box(8566, 8566)), - Box(Box(8567, 8567), Box(8567, 8567)), - Box(Box(8568, 8568), Box(8568, 8568)), - Box(Box(8569, 8569), Box(8569, 8569)), - Box(Box(8570, 8570), Box(8570, 8570)), - Box(Box(8571, 8571), Box(8571, 8571)), - Box(Box(8572, 8572), Box(8572, 8572)), - Box(Box(8573, 8573), Box(8573, 8573)), - Box(Box(8574, 8574), Box(8574, 8574)), - Box(Box(8575, 8575), Box(8575, 8575)), - Box(Box(8576, 8576), Box(8576, 8576)), - Box(Box(8577, 8577), Box(8577, 8577)), - Box(Box(8578, 8578), Box(8578, 8578)), - Box(Box(8579, 8579), Box(8579, 8579)), - Box(Box(8580, 8580), Box(8580, 8580)), - Box(Box(8581, 8581), Box(8581, 8581)), - Box(Box(8582, 8582), Box(8582, 8582)), - Box(Box(8583, 8583), Box(8583, 8583)), - Box(Box(8584, 8584), Box(8584, 8584)), - Box(Box(8585, 8585), Box(8585, 8585)), - Box(Box(8586, 8586), Box(8586, 8586)), - Box(Box(8587, 8587), Box(8587, 8587)), - Box(Box(8588, 8588), Box(8588, 8588)), - Box(Box(8589, 8589), Box(8589, 8589)), - Box(Box(8590, 8590), Box(8590, 8590)), - Box(Box(8591, 8591), Box(8591, 8591)), - Box(Box(8592, 8592), Box(8592, 8592)), - Box(Box(8593, 8593), Box(8593, 8593)), - Box(Box(8594, 8594), Box(8594, 8594)), - Box(Box(8595, 8595), Box(8595, 8595)), - Box(Box(8596, 8596), Box(8596, 8596)), - Box(Box(8597, 8597), Box(8597, 8597)), - Box(Box(8598, 8598), Box(8598, 8598)), - Box(Box(8599, 8599), Box(8599, 8599)), - Box(Box(8600, 8600), Box(8600, 8600)), - Box(Box(8601, 8601), Box(8601, 8601)), - Box(Box(8602, 8602), Box(8602, 8602)), - Box(Box(8603, 8603), Box(8603, 8603)), - Box(Box(8604, 8604), Box(8604, 8604)), - Box(Box(8605, 8605), Box(8605, 8605)), - Box(Box(8606, 8606), Box(8606, 8606)), - Box(Box(8607, 8607), Box(8607, 8607)), - Box(Box(8608, 8608), Box(8608, 8608)), - Box(Box(8609, 8609), Box(8609, 8609)), - Box(Box(8610, 8610), Box(8610, 8610)), - Box(Box(8611, 8611), Box(8611, 8611)), - Box(Box(8612, 8612), Box(8612, 8612)), - Box(Box(8613, 8613), Box(8613, 8613)), - Box(Box(8614, 8614), Box(8614, 8614)), - Box(Box(8615, 8615), Box(8615, 8615)), - Box(Box(8616, 8616), Box(8616, 8616)), - Box(Box(8617, 8617), Box(8617, 8617)), - Box(Box(8618, 8618), Box(8618, 8618)), - Box(Box(8619, 8619), Box(8619, 8619)), - Box(Box(8620, 8620), Box(8620, 8620)), - Box(Box(8621, 8621), Box(8621, 8621)), - Box(Box(8622, 8622), Box(8622, 8622)), - Box(Box(8623, 8623), Box(8623, 8623)), - Box(Box(8624, 8624), Box(8624, 8624)), - Box(Box(8625, 8625), Box(8625, 8625)), - Box(Box(8626, 8626), Box(8626, 8626)), - Box(Box(8627, 8627), Box(8627, 8627)), - Box(Box(8628, 8628), Box(8628, 8628)), - Box(Box(8629, 8629), Box(8629, 8629)), - Box(Box(8630, 8630), Box(8630, 8630)), - Box(Box(8631, 8631), Box(8631, 8631)), - Box(Box(8632, 8632), Box(8632, 8632)), - Box(Box(8633, 8633), Box(8633, 8633)), - Box(Box(8634, 8634), Box(8634, 8634)), - Box(Box(8635, 8635), Box(8635, 8635)), - Box(Box(8636, 8636), Box(8636, 8636)), - Box(Box(8637, 8637), Box(8637, 8637)), - Box(Box(8638, 8638), Box(8638, 8638)), - Box(Box(8639, 8639), Box(8639, 8639)), - Box(Box(8640, 8640), Box(8640, 8640)), - Box(Box(8641, 8641), Box(8641, 8641)), - Box(Box(8642, 8642), Box(8642, 8642)), - Box(Box(8643, 8643), Box(8643, 8643)), - Box(Box(8644, 8644), Box(8644, 8644)), - Box(Box(8645, 8645), Box(8645, 8645)), - Box(Box(8646, 8646), Box(8646, 8646)), - Box(Box(8647, 8647), Box(8647, 8647)), - Box(Box(8648, 8648), Box(8648, 8648)), - Box(Box(8649, 8649), Box(8649, 8649)), - Box(Box(8650, 8650), Box(8650, 8650)), - Box(Box(8651, 8651), Box(8651, 8651)), - Box(Box(8652, 8652), Box(8652, 8652)), - Box(Box(8653, 8653), Box(8653, 8653)), - Box(Box(8654, 8654), Box(8654, 8654)), - Box(Box(8655, 8655), Box(8655, 8655)), - Box(Box(8656, 8656), Box(8656, 8656)), - Box(Box(8657, 8657), Box(8657, 8657)), - Box(Box(8658, 8658), Box(8658, 8658)), - Box(Box(8659, 8659), Box(8659, 8659)), - Box(Box(8660, 8660), Box(8660, 8660)), - Box(Box(8661, 8661), Box(8661, 8661)), - Box(Box(8662, 8662), Box(8662, 8662)), - Box(Box(8663, 8663), Box(8663, 8663)), - Box(Box(8664, 8664), Box(8664, 8664)), - Box(Box(8665, 8665), Box(8665, 8665)), - Box(Box(8666, 8666), Box(8666, 8666)), - Box(Box(8667, 8667), Box(8667, 8667)), - Box(Box(8668, 8668), Box(8668, 8668)), - Box(Box(8669, 8669), Box(8669, 8669)), - Box(Box(8670, 8670), Box(8670, 8670)), - Box(Box(8671, 8671), Box(8671, 8671)), - Box(Box(8672, 8672), Box(8672, 8672)), - Box(Box(8673, 8673), Box(8673, 8673)), - Box(Box(8674, 8674), Box(8674, 8674)), - Box(Box(8675, 8675), Box(8675, 8675)), - Box(Box(8676, 8676), Box(8676, 8676)), - Box(Box(8677, 8677), Box(8677, 8677)), - Box(Box(8678, 8678), Box(8678, 8678)), - Box(Box(8679, 8679), Box(8679, 8679)), - Box(Box(8680, 8680), Box(8680, 8680)), - Box(Box(8681, 8681), Box(8681, 8681)), - Box(Box(8682, 8682), Box(8682, 8682)), - Box(Box(8683, 8683), Box(8683, 8683)), - Box(Box(8684, 8684), Box(8684, 8684)), - Box(Box(8685, 8685), Box(8685, 8685)), - Box(Box(8686, 8686), Box(8686, 8686)), - Box(Box(8687, 8687), Box(8687, 8687)), - Box(Box(8688, 8688), Box(8688, 8688)), - Box(Box(8689, 8689), Box(8689, 8689)), - Box(Box(8690, 8690), Box(8690, 8690)), - Box(Box(8691, 8691), Box(8691, 8691)), - Box(Box(8692, 8692), Box(8692, 8692)), - Box(Box(8693, 8693), Box(8693, 8693)), - Box(Box(8694, 8694), Box(8694, 8694)), - Box(Box(8695, 8695), Box(8695, 8695)), - Box(Box(8696, 8696), Box(8696, 8696)), - Box(Box(8697, 8697), Box(8697, 8697)), - Box(Box(8698, 8698), Box(8698, 8698)), - Box(Box(8699, 8699), Box(8699, 8699)), - Box(Box(8700, 8700), Box(8700, 8700)), - Box(Box(8701, 8701), Box(8701, 8701)), - Box(Box(8702, 8702), Box(8702, 8702)), - Box(Box(8703, 8703), Box(8703, 8703)), - Box(Box(8704, 8704), Box(8704, 8704)), - Box(Box(8705, 8705), Box(8705, 8705)), - Box(Box(8706, 8706), Box(8706, 8706)), - Box(Box(8707, 8707), Box(8707, 8707)), - Box(Box(8708, 8708), Box(8708, 8708)), - Box(Box(8709, 8709), Box(8709, 8709)), - Box(Box(8710, 8710), Box(8710, 8710)), - Box(Box(8711, 8711), Box(8711, 8711)), - Box(Box(8712, 8712), Box(8712, 8712)), - Box(Box(8713, 8713), Box(8713, 8713)), - Box(Box(8714, 8714), Box(8714, 8714)), - Box(Box(8715, 8715), Box(8715, 8715)), - Box(Box(8716, 8716), Box(8716, 8716)), - Box(Box(8717, 8717), Box(8717, 8717)), - Box(Box(8718, 8718), Box(8718, 8718)), - Box(Box(8719, 8719), Box(8719, 8719)), - Box(Box(8720, 8720), Box(8720, 8720)), - Box(Box(8721, 8721), Box(8721, 8721)), - Box(Box(8722, 8722), Box(8722, 8722)), - Box(Box(8723, 8723), Box(8723, 8723)), - Box(Box(8724, 8724), Box(8724, 8724)), - Box(Box(8725, 8725), Box(8725, 8725)), - Box(Box(8726, 8726), Box(8726, 8726)), - Box(Box(8727, 8727), Box(8727, 8727)), - Box(Box(8728, 8728), Box(8728, 8728)), - Box(Box(8729, 8729), Box(8729, 8729)), - Box(Box(8730, 8730), Box(8730, 8730)), - Box(Box(8731, 8731), Box(8731, 8731)), - Box(Box(8732, 8732), Box(8732, 8732)), - Box(Box(8733, 8733), Box(8733, 8733)), - Box(Box(8734, 8734), Box(8734, 8734)), - Box(Box(8735, 8735), Box(8735, 8735)), - Box(Box(8736, 8736), Box(8736, 8736)), - Box(Box(8737, 8737), Box(8737, 8737)), - Box(Box(8738, 8738), Box(8738, 8738)), - Box(Box(8739, 8739), Box(8739, 8739)), - Box(Box(8740, 8740), Box(8740, 8740)), - Box(Box(8741, 8741), Box(8741, 8741)), - Box(Box(8742, 8742), Box(8742, 8742)), - Box(Box(8743, 8743), Box(8743, 8743)), - Box(Box(8744, 8744), Box(8744, 8744)), - Box(Box(8745, 8745), Box(8745, 8745)), - Box(Box(8746, 8746), Box(8746, 8746)), - Box(Box(8747, 8747), Box(8747, 8747)), - Box(Box(8748, 8748), Box(8748, 8748)), - Box(Box(8749, 8749), Box(8749, 8749)), - Box(Box(8750, 8750), Box(8750, 8750)), - Box(Box(8751, 8751), Box(8751, 8751)), - Box(Box(8752, 8752), Box(8752, 8752)), - Box(Box(8753, 8753), Box(8753, 8753)), - Box(Box(8754, 8754), Box(8754, 8754)), - Box(Box(8755, 8755), Box(8755, 8755)), - Box(Box(8756, 8756), Box(8756, 8756)), - Box(Box(8757, 8757), Box(8757, 8757)), - Box(Box(8758, 8758), Box(8758, 8758)), - Box(Box(8759, 8759), Box(8759, 8759)), - Box(Box(8760, 8760), Box(8760, 8760)), - Box(Box(8761, 8761), Box(8761, 8761)), - Box(Box(8762, 8762), Box(8762, 8762)), - Box(Box(8763, 8763), Box(8763, 8763)), - Box(Box(8764, 8764), Box(8764, 8764)), - Box(Box(8765, 8765), Box(8765, 8765)), - Box(Box(8766, 8766), Box(8766, 8766)), - Box(Box(8767, 8767), Box(8767, 8767)), - Box(Box(8768, 8768), Box(8768, 8768)), - Box(Box(8769, 8769), Box(8769, 8769)), - Box(Box(8770, 8770), Box(8770, 8770)), - Box(Box(8771, 8771), Box(8771, 8771)), - Box(Box(8772, 8772), Box(8772, 8772)), - Box(Box(8773, 8773), Box(8773, 8773)), - Box(Box(8774, 8774), Box(8774, 8774)), - Box(Box(8775, 8775), Box(8775, 8775)), - Box(Box(8776, 8776), Box(8776, 8776)), - Box(Box(8777, 8777), Box(8777, 8777)), - Box(Box(8778, 8778), Box(8778, 8778)), - Box(Box(8779, 8779), Box(8779, 8779)), - Box(Box(8780, 8780), Box(8780, 8780)), - Box(Box(8781, 8781), Box(8781, 8781)), - Box(Box(8782, 8782), Box(8782, 8782)), - Box(Box(8783, 8783), Box(8783, 8783)), - Box(Box(8784, 8784), Box(8784, 8784)), - Box(Box(8785, 8785), Box(8785, 8785)), - Box(Box(8786, 8786), Box(8786, 8786)), - Box(Box(8787, 8787), Box(8787, 8787)), - Box(Box(8788, 8788), Box(8788, 8788)), - Box(Box(8789, 8789), Box(8789, 8789)), - Box(Box(8790, 8790), Box(8790, 8790)), - Box(Box(8791, 8791), Box(8791, 8791)), - Box(Box(8792, 8792), Box(8792, 8792)), - Box(Box(8793, 8793), Box(8793, 8793)), - Box(Box(8794, 8794), Box(8794, 8794)), - Box(Box(8795, 8795), Box(8795, 8795)), - Box(Box(8796, 8796), Box(8796, 8796)), - Box(Box(8797, 8797), Box(8797, 8797)), - Box(Box(8798, 8798), Box(8798, 8798)), - Box(Box(8799, 8799), Box(8799, 8799)), - Box(Box(8800, 8800), Box(8800, 8800)), - Box(Box(8801, 8801), Box(8801, 8801)), - Box(Box(8802, 8802), Box(8802, 8802)), - Box(Box(8803, 8803), Box(8803, 8803)), - Box(Box(8804, 8804), Box(8804, 8804)), - Box(Box(8805, 8805), Box(8805, 8805)), - Box(Box(8806, 8806), Box(8806, 8806)), - Box(Box(8807, 8807), Box(8807, 8807)), - Box(Box(8808, 8808), Box(8808, 8808)), - Box(Box(8809, 8809), Box(8809, 8809)), - Box(Box(8810, 8810), Box(8810, 8810)), - Box(Box(8811, 8811), Box(8811, 8811)), - Box(Box(8812, 8812), Box(8812, 8812)), - Box(Box(8813, 8813), Box(8813, 8813)), - Box(Box(8814, 8814), Box(8814, 8814)), - Box(Box(8815, 8815), Box(8815, 8815)), - Box(Box(8816, 8816), Box(8816, 8816)), - Box(Box(8817, 8817), Box(8817, 8817)), - Box(Box(8818, 8818), Box(8818, 8818)), - Box(Box(8819, 8819), Box(8819, 8819)), - Box(Box(8820, 8820), Box(8820, 8820)), - Box(Box(8821, 8821), Box(8821, 8821)), - Box(Box(8822, 8822), Box(8822, 8822)), - Box(Box(8823, 8823), Box(8823, 8823)), - Box(Box(8824, 8824), Box(8824, 8824)), - Box(Box(8825, 8825), Box(8825, 8825)), - Box(Box(8826, 8826), Box(8826, 8826)), - Box(Box(8827, 8827), Box(8827, 8827)), - Box(Box(8828, 8828), Box(8828, 8828)), - Box(Box(8829, 8829), Box(8829, 8829)), - Box(Box(8830, 8830), Box(8830, 8830)), - Box(Box(8831, 8831), Box(8831, 8831)), - Box(Box(8832, 8832), Box(8832, 8832)), - Box(Box(8833, 8833), Box(8833, 8833)), - Box(Box(8834, 8834), Box(8834, 8834)), - Box(Box(8835, 8835), Box(8835, 8835)), - Box(Box(8836, 8836), Box(8836, 8836)), - Box(Box(8837, 8837), Box(8837, 8837)), - Box(Box(8838, 8838), Box(8838, 8838)), - Box(Box(8839, 8839), Box(8839, 8839)), - Box(Box(8840, 8840), Box(8840, 8840)), - Box(Box(8841, 8841), Box(8841, 8841)), - Box(Box(8842, 8842), Box(8842, 8842)), - Box(Box(8843, 8843), Box(8843, 8843)), - Box(Box(8844, 8844), Box(8844, 8844)), - Box(Box(8845, 8845), Box(8845, 8845)), - Box(Box(8846, 8846), Box(8846, 8846)), - Box(Box(8847, 8847), Box(8847, 8847)), - Box(Box(8848, 8848), Box(8848, 8848)), - Box(Box(8849, 8849), Box(8849, 8849)), - Box(Box(8850, 8850), Box(8850, 8850)), - Box(Box(8851, 8851), Box(8851, 8851)), - Box(Box(8852, 8852), Box(8852, 8852)), - Box(Box(8853, 8853), Box(8853, 8853)), - Box(Box(8854, 8854), Box(8854, 8854)), - Box(Box(8855, 8855), Box(8855, 8855)), - Box(Box(8856, 8856), Box(8856, 8856)), - Box(Box(8857, 8857), Box(8857, 8857)), - Box(Box(8858, 8858), Box(8858, 8858)), - Box(Box(8859, 8859), Box(8859, 8859)), - Box(Box(8860, 8860), Box(8860, 8860)), - Box(Box(8861, 8861), Box(8861, 8861)), - Box(Box(8862, 8862), Box(8862, 8862)), - Box(Box(8863, 8863), Box(8863, 8863)), - Box(Box(8864, 8864), Box(8864, 8864)), - Box(Box(8865, 8865), Box(8865, 8865)), - Box(Box(8866, 8866), Box(8866, 8866)), - Box(Box(8867, 8867), Box(8867, 8867)), - Box(Box(8868, 8868), Box(8868, 8868)), - Box(Box(8869, 8869), Box(8869, 8869)), - Box(Box(8870, 8870), Box(8870, 8870)), - Box(Box(8871, 8871), Box(8871, 8871)), - Box(Box(8872, 8872), Box(8872, 8872)), - Box(Box(8873, 8873), Box(8873, 8873)), - Box(Box(8874, 8874), Box(8874, 8874)), - Box(Box(8875, 8875), Box(8875, 8875)), - Box(Box(8876, 8876), Box(8876, 8876)), - Box(Box(8877, 8877), Box(8877, 8877)), - Box(Box(8878, 8878), Box(8878, 8878)), - Box(Box(8879, 8879), Box(8879, 8879)), - Box(Box(8880, 8880), Box(8880, 8880)), - Box(Box(8881, 8881), Box(8881, 8881)), - Box(Box(8882, 8882), Box(8882, 8882)), - Box(Box(8883, 8883), Box(8883, 8883)), - Box(Box(8884, 8884), Box(8884, 8884)), - Box(Box(8885, 8885), Box(8885, 8885)), - Box(Box(8886, 8886), Box(8886, 8886)), - Box(Box(8887, 8887), Box(8887, 8887)), - Box(Box(8888, 8888), Box(8888, 8888)), - Box(Box(8889, 8889), Box(8889, 8889)), - Box(Box(8890, 8890), Box(8890, 8890)), - Box(Box(8891, 8891), Box(8891, 8891)), - Box(Box(8892, 8892), Box(8892, 8892)), - Box(Box(8893, 8893), Box(8893, 8893)), - Box(Box(8894, 8894), Box(8894, 8894)), - Box(Box(8895, 8895), Box(8895, 8895)), - Box(Box(8896, 8896), Box(8896, 8896)), - Box(Box(8897, 8897), Box(8897, 8897)), - Box(Box(8898, 8898), Box(8898, 8898)), - Box(Box(8899, 8899), Box(8899, 8899)), - Box(Box(8900, 8900), Box(8900, 8900)), - Box(Box(8901, 8901), Box(8901, 8901)), - Box(Box(8902, 8902), Box(8902, 8902)), - Box(Box(8903, 8903), Box(8903, 8903)), - Box(Box(8904, 8904), Box(8904, 8904)), - Box(Box(8905, 8905), Box(8905, 8905)), - Box(Box(8906, 8906), Box(8906, 8906)), - Box(Box(8907, 8907), Box(8907, 8907)), - Box(Box(8908, 8908), Box(8908, 8908)), - Box(Box(8909, 8909), Box(8909, 8909)), - Box(Box(8910, 8910), Box(8910, 8910)), - Box(Box(8911, 8911), Box(8911, 8911)), - Box(Box(8912, 8912), Box(8912, 8912)), - Box(Box(8913, 8913), Box(8913, 8913)), - Box(Box(8914, 8914), Box(8914, 8914)), - Box(Box(8915, 8915), Box(8915, 8915)), - Box(Box(8916, 8916), Box(8916, 8916)), - Box(Box(8917, 8917), Box(8917, 8917)), - Box(Box(8918, 8918), Box(8918, 8918)), - Box(Box(8919, 8919), Box(8919, 8919)), - Box(Box(8920, 8920), Box(8920, 8920)), - Box(Box(8921, 8921), Box(8921, 8921)), - Box(Box(8922, 8922), Box(8922, 8922)), - Box(Box(8923, 8923), Box(8923, 8923)), - Box(Box(8924, 8924), Box(8924, 8924)), - Box(Box(8925, 8925), Box(8925, 8925)), - Box(Box(8926, 8926), Box(8926, 8926)), - Box(Box(8927, 8927), Box(8927, 8927)), - Box(Box(8928, 8928), Box(8928, 8928)), - Box(Box(8929, 8929), Box(8929, 8929)), - Box(Box(8930, 8930), Box(8930, 8930)), - Box(Box(8931, 8931), Box(8931, 8931)), - Box(Box(8932, 8932), Box(8932, 8932)), - Box(Box(8933, 8933), Box(8933, 8933)), - Box(Box(8934, 8934), Box(8934, 8934)), - Box(Box(8935, 8935), Box(8935, 8935)), - Box(Box(8936, 8936), Box(8936, 8936)), - Box(Box(8937, 8937), Box(8937, 8937)), - Box(Box(8938, 8938), Box(8938, 8938)), - Box(Box(8939, 8939), Box(8939, 8939)), - Box(Box(8940, 8940), Box(8940, 8940)), - Box(Box(8941, 8941), Box(8941, 8941)), - Box(Box(8942, 8942), Box(8942, 8942)), - Box(Box(8943, 8943), Box(8943, 8943)), - Box(Box(8944, 8944), Box(8944, 8944)), - Box(Box(8945, 8945), Box(8945, 8945)), - Box(Box(8946, 8946), Box(8946, 8946)), - Box(Box(8947, 8947), Box(8947, 8947)), - Box(Box(8948, 8948), Box(8948, 8948)), - Box(Box(8949, 8949), Box(8949, 8949)), - Box(Box(8950, 8950), Box(8950, 8950)), - Box(Box(8951, 8951), Box(8951, 8951)), - Box(Box(8952, 8952), Box(8952, 8952)), - Box(Box(8953, 8953), Box(8953, 8953)), - Box(Box(8954, 8954), Box(8954, 8954)), - Box(Box(8955, 8955), Box(8955, 8955)), - Box(Box(8956, 8956), Box(8956, 8956)), - Box(Box(8957, 8957), Box(8957, 8957)), - Box(Box(8958, 8958), Box(8958, 8958)), - Box(Box(8959, 8959), Box(8959, 8959)), - Box(Box(8960, 8960), Box(8960, 8960)), - Box(Box(8961, 8961), Box(8961, 8961)), - Box(Box(8962, 8962), Box(8962, 8962)), - Box(Box(8963, 8963), Box(8963, 8963)), - Box(Box(8964, 8964), Box(8964, 8964)), - Box(Box(8965, 8965), Box(8965, 8965)), - Box(Box(8966, 8966), Box(8966, 8966)), - Box(Box(8967, 8967), Box(8967, 8967)), - Box(Box(8968, 8968), Box(8968, 8968)), - Box(Box(8969, 8969), Box(8969, 8969)), - Box(Box(8970, 8970), Box(8970, 8970)), - Box(Box(8971, 8971), Box(8971, 8971)), - Box(Box(8972, 8972), Box(8972, 8972)), - Box(Box(8973, 8973), Box(8973, 8973)), - Box(Box(8974, 8974), Box(8974, 8974)), - Box(Box(8975, 8975), Box(8975, 8975)), - Box(Box(8976, 8976), Box(8976, 8976)), - Box(Box(8977, 8977), Box(8977, 8977)), - Box(Box(8978, 8978), Box(8978, 8978)), - Box(Box(8979, 8979), Box(8979, 8979)), - Box(Box(8980, 8980), Box(8980, 8980)), - Box(Box(8981, 8981), Box(8981, 8981)), - Box(Box(8982, 8982), Box(8982, 8982)), - Box(Box(8983, 8983), Box(8983, 8983)), - Box(Box(8984, 8984), Box(8984, 8984)), - Box(Box(8985, 8985), Box(8985, 8985)), - Box(Box(8986, 8986), Box(8986, 8986)), - Box(Box(8987, 8987), Box(8987, 8987)), - Box(Box(8988, 8988), Box(8988, 8988)), - Box(Box(8989, 8989), Box(8989, 8989)), - Box(Box(8990, 8990), Box(8990, 8990)), - Box(Box(8991, 8991), Box(8991, 8991)), - Box(Box(8992, 8992), Box(8992, 8992)), - Box(Box(8993, 8993), Box(8993, 8993)), - Box(Box(8994, 8994), Box(8994, 8994)), - Box(Box(8995, 8995), Box(8995, 8995)), - Box(Box(8996, 8996), Box(8996, 8996)), - Box(Box(8997, 8997), Box(8997, 8997)), - Box(Box(8998, 8998), Box(8998, 8998)), - Box(Box(8999, 8999), Box(8999, 8999)), - Box(Box(9000, 9000), Box(9000, 9000)), - Box(Box(9001, 9001), Box(9001, 9001)), - Box(Box(9002, 9002), Box(9002, 9002)), - Box(Box(9003, 9003), Box(9003, 9003)), - Box(Box(9004, 9004), Box(9004, 9004)), - Box(Box(9005, 9005), Box(9005, 9005)), - Box(Box(9006, 9006), Box(9006, 9006)), - Box(Box(9007, 9007), Box(9007, 9007)), - Box(Box(9008, 9008), Box(9008, 9008)), - Box(Box(9009, 9009), Box(9009, 9009)), - Box(Box(9010, 9010), Box(9010, 9010)), - Box(Box(9011, 9011), Box(9011, 9011)), - Box(Box(9012, 9012), Box(9012, 9012)), - Box(Box(9013, 9013), Box(9013, 9013)), - Box(Box(9014, 9014), Box(9014, 9014)), - Box(Box(9015, 9015), Box(9015, 9015)), - Box(Box(9016, 9016), Box(9016, 9016)), - Box(Box(9017, 9017), Box(9017, 9017)), - Box(Box(9018, 9018), Box(9018, 9018)), - Box(Box(9019, 9019), Box(9019, 9019)), - Box(Box(9020, 9020), Box(9020, 9020)), - Box(Box(9021, 9021), Box(9021, 9021)), - Box(Box(9022, 9022), Box(9022, 9022)), - Box(Box(9023, 9023), Box(9023, 9023)), - Box(Box(9024, 9024), Box(9024, 9024)), - Box(Box(9025, 9025), Box(9025, 9025)), - Box(Box(9026, 9026), Box(9026, 9026)), - Box(Box(9027, 9027), Box(9027, 9027)), - Box(Box(9028, 9028), Box(9028, 9028)), - Box(Box(9029, 9029), Box(9029, 9029)), - Box(Box(9030, 9030), Box(9030, 9030)), - Box(Box(9031, 9031), Box(9031, 9031)), - Box(Box(9032, 9032), Box(9032, 9032)), - Box(Box(9033, 9033), Box(9033, 9033)), - Box(Box(9034, 9034), Box(9034, 9034)), - Box(Box(9035, 9035), Box(9035, 9035)), - Box(Box(9036, 9036), Box(9036, 9036)), - Box(Box(9037, 9037), Box(9037, 9037)), - Box(Box(9038, 9038), Box(9038, 9038)), - Box(Box(9039, 9039), Box(9039, 9039)), - Box(Box(9040, 9040), Box(9040, 9040)), - Box(Box(9041, 9041), Box(9041, 9041)), - Box(Box(9042, 9042), Box(9042, 9042)), - Box(Box(9043, 9043), Box(9043, 9043)), - Box(Box(9044, 9044), Box(9044, 9044)), - Box(Box(9045, 9045), Box(9045, 9045)), - Box(Box(9046, 9046), Box(9046, 9046)), - Box(Box(9047, 9047), Box(9047, 9047)), - Box(Box(9048, 9048), Box(9048, 9048)), - Box(Box(9049, 9049), Box(9049, 9049)), - Box(Box(9050, 9050), Box(9050, 9050)), - Box(Box(9051, 9051), Box(9051, 9051)), - Box(Box(9052, 9052), Box(9052, 9052)), - Box(Box(9053, 9053), Box(9053, 9053)), - Box(Box(9054, 9054), Box(9054, 9054)), - Box(Box(9055, 9055), Box(9055, 9055)), - Box(Box(9056, 9056), Box(9056, 9056)), - Box(Box(9057, 9057), Box(9057, 9057)), - Box(Box(9058, 9058), Box(9058, 9058)), - Box(Box(9059, 9059), Box(9059, 9059)), - Box(Box(9060, 9060), Box(9060, 9060)), - Box(Box(9061, 9061), Box(9061, 9061)), - Box(Box(9062, 9062), Box(9062, 9062)), - Box(Box(9063, 9063), Box(9063, 9063)), - Box(Box(9064, 9064), Box(9064, 9064)), - Box(Box(9065, 9065), Box(9065, 9065)), - Box(Box(9066, 9066), Box(9066, 9066)), - Box(Box(9067, 9067), Box(9067, 9067)), - Box(Box(9068, 9068), Box(9068, 9068)), - Box(Box(9069, 9069), Box(9069, 9069)), - Box(Box(9070, 9070), Box(9070, 9070)), - Box(Box(9071, 9071), Box(9071, 9071)), - Box(Box(9072, 9072), Box(9072, 9072)), - Box(Box(9073, 9073), Box(9073, 9073)), - Box(Box(9074, 9074), Box(9074, 9074)), - Box(Box(9075, 9075), Box(9075, 9075)), - Box(Box(9076, 9076), Box(9076, 9076)), - Box(Box(9077, 9077), Box(9077, 9077)), - Box(Box(9078, 9078), Box(9078, 9078)), - Box(Box(9079, 9079), Box(9079, 9079)), - Box(Box(9080, 9080), Box(9080, 9080)), - Box(Box(9081, 9081), Box(9081, 9081)), - Box(Box(9082, 9082), Box(9082, 9082)), - Box(Box(9083, 9083), Box(9083, 9083)), - Box(Box(9084, 9084), Box(9084, 9084)), - Box(Box(9085, 9085), Box(9085, 9085)), - Box(Box(9086, 9086), Box(9086, 9086)), - Box(Box(9087, 9087), Box(9087, 9087)), - Box(Box(9088, 9088), Box(9088, 9088)), - Box(Box(9089, 9089), Box(9089, 9089)), - Box(Box(9090, 9090), Box(9090, 9090)), - Box(Box(9091, 9091), Box(9091, 9091)), - Box(Box(9092, 9092), Box(9092, 9092)), - Box(Box(9093, 9093), Box(9093, 9093)), - Box(Box(9094, 9094), Box(9094, 9094)), - Box(Box(9095, 9095), Box(9095, 9095)), - Box(Box(9096, 9096), Box(9096, 9096)), - Box(Box(9097, 9097), Box(9097, 9097)), - Box(Box(9098, 9098), Box(9098, 9098)), - Box(Box(9099, 9099), Box(9099, 9099)), - Box(Box(9100, 9100), Box(9100, 9100)), - Box(Box(9101, 9101), Box(9101, 9101)), - Box(Box(9102, 9102), Box(9102, 9102)), - Box(Box(9103, 9103), Box(9103, 9103)), - Box(Box(9104, 9104), Box(9104, 9104)), - Box(Box(9105, 9105), Box(9105, 9105)), - Box(Box(9106, 9106), Box(9106, 9106)), - Box(Box(9107, 9107), Box(9107, 9107)), - Box(Box(9108, 9108), Box(9108, 9108)), - Box(Box(9109, 9109), Box(9109, 9109)), - Box(Box(9110, 9110), Box(9110, 9110)), - Box(Box(9111, 9111), Box(9111, 9111)), - Box(Box(9112, 9112), Box(9112, 9112)), - Box(Box(9113, 9113), Box(9113, 9113)), - Box(Box(9114, 9114), Box(9114, 9114)), - Box(Box(9115, 9115), Box(9115, 9115)), - Box(Box(9116, 9116), Box(9116, 9116)), - Box(Box(9117, 9117), Box(9117, 9117)), - Box(Box(9118, 9118), Box(9118, 9118)), - Box(Box(9119, 9119), Box(9119, 9119)), - Box(Box(9120, 9120), Box(9120, 9120)), - Box(Box(9121, 9121), Box(9121, 9121)), - Box(Box(9122, 9122), Box(9122, 9122)), - Box(Box(9123, 9123), Box(9123, 9123)), - Box(Box(9124, 9124), Box(9124, 9124)), - Box(Box(9125, 9125), Box(9125, 9125)), - Box(Box(9126, 9126), Box(9126, 9126)), - Box(Box(9127, 9127), Box(9127, 9127)), - Box(Box(9128, 9128), Box(9128, 9128)), - Box(Box(9129, 9129), Box(9129, 9129)), - Box(Box(9130, 9130), Box(9130, 9130)), - Box(Box(9131, 9131), Box(9131, 9131)), - Box(Box(9132, 9132), Box(9132, 9132)), - Box(Box(9133, 9133), Box(9133, 9133)), - Box(Box(9134, 9134), Box(9134, 9134)), - Box(Box(9135, 9135), Box(9135, 9135)), - Box(Box(9136, 9136), Box(9136, 9136)), - Box(Box(9137, 9137), Box(9137, 9137)), - Box(Box(9138, 9138), Box(9138, 9138)), - Box(Box(9139, 9139), Box(9139, 9139)), - Box(Box(9140, 9140), Box(9140, 9140)), - Box(Box(9141, 9141), Box(9141, 9141)), - Box(Box(9142, 9142), Box(9142, 9142)), - Box(Box(9143, 9143), Box(9143, 9143)), - Box(Box(9144, 9144), Box(9144, 9144)), - Box(Box(9145, 9145), Box(9145, 9145)), - Box(Box(9146, 9146), Box(9146, 9146)), - Box(Box(9147, 9147), Box(9147, 9147)), - Box(Box(9148, 9148), Box(9148, 9148)), - Box(Box(9149, 9149), Box(9149, 9149)), - Box(Box(9150, 9150), Box(9150, 9150)), - Box(Box(9151, 9151), Box(9151, 9151)), - Box(Box(9152, 9152), Box(9152, 9152)), - Box(Box(9153, 9153), Box(9153, 9153)), - Box(Box(9154, 9154), Box(9154, 9154)), - Box(Box(9155, 9155), Box(9155, 9155)), - Box(Box(9156, 9156), Box(9156, 9156)), - Box(Box(9157, 9157), Box(9157, 9157)), - Box(Box(9158, 9158), Box(9158, 9158)), - Box(Box(9159, 9159), Box(9159, 9159)), - Box(Box(9160, 9160), Box(9160, 9160)), - Box(Box(9161, 9161), Box(9161, 9161)), - Box(Box(9162, 9162), Box(9162, 9162)), - Box(Box(9163, 9163), Box(9163, 9163)), - Box(Box(9164, 9164), Box(9164, 9164)), - Box(Box(9165, 9165), Box(9165, 9165)), - Box(Box(9166, 9166), Box(9166, 9166)), - Box(Box(9167, 9167), Box(9167, 9167)), - Box(Box(9168, 9168), Box(9168, 9168)), - Box(Box(9169, 9169), Box(9169, 9169)), - Box(Box(9170, 9170), Box(9170, 9170)), - Box(Box(9171, 9171), Box(9171, 9171)), - Box(Box(9172, 9172), Box(9172, 9172)), - Box(Box(9173, 9173), Box(9173, 9173)), - Box(Box(9174, 9174), Box(9174, 9174)), - Box(Box(9175, 9175), Box(9175, 9175)), - Box(Box(9176, 9176), Box(9176, 9176)), - Box(Box(9177, 9177), Box(9177, 9177)), - Box(Box(9178, 9178), Box(9178, 9178)), - Box(Box(9179, 9179), Box(9179, 9179)), - Box(Box(9180, 9180), Box(9180, 9180)), - Box(Box(9181, 9181), Box(9181, 9181)), - Box(Box(9182, 9182), Box(9182, 9182)), - Box(Box(9183, 9183), Box(9183, 9183)), - Box(Box(9184, 9184), Box(9184, 9184)), - Box(Box(9185, 9185), Box(9185, 9185)), - Box(Box(9186, 9186), Box(9186, 9186)), - Box(Box(9187, 9187), Box(9187, 9187)), - Box(Box(9188, 9188), Box(9188, 9188)), - Box(Box(9189, 9189), Box(9189, 9189)), - Box(Box(9190, 9190), Box(9190, 9190)), - Box(Box(9191, 9191), Box(9191, 9191)), - Box(Box(9192, 9192), Box(9192, 9192)), - Box(Box(9193, 9193), Box(9193, 9193)), - Box(Box(9194, 9194), Box(9194, 9194)), - Box(Box(9195, 9195), Box(9195, 9195)), - Box(Box(9196, 9196), Box(9196, 9196)), - Box(Box(9197, 9197), Box(9197, 9197)), - Box(Box(9198, 9198), Box(9198, 9198)), - Box(Box(9199, 9199), Box(9199, 9199)), - Box(Box(9200, 9200), Box(9200, 9200)), - Box(Box(9201, 9201), Box(9201, 9201)), - Box(Box(9202, 9202), Box(9202, 9202)), - Box(Box(9203, 9203), Box(9203, 9203)), - Box(Box(9204, 9204), Box(9204, 9204)), - Box(Box(9205, 9205), Box(9205, 9205)), - Box(Box(9206, 9206), Box(9206, 9206)), - Box(Box(9207, 9207), Box(9207, 9207)), - Box(Box(9208, 9208), Box(9208, 9208)), - Box(Box(9209, 9209), Box(9209, 9209)), - Box(Box(9210, 9210), Box(9210, 9210)), - Box(Box(9211, 9211), Box(9211, 9211)), - Box(Box(9212, 9212), Box(9212, 9212)), - Box(Box(9213, 9213), Box(9213, 9213)), - Box(Box(9214, 9214), Box(9214, 9214)), - Box(Box(9215, 9215), Box(9215, 9215)), - Box(Box(9216, 9216), Box(9216, 9216)), - Box(Box(9217, 9217), Box(9217, 9217)), - Box(Box(9218, 9218), Box(9218, 9218)), - Box(Box(9219, 9219), Box(9219, 9219)), - Box(Box(9220, 9220), Box(9220, 9220)), - Box(Box(9221, 9221), Box(9221, 9221)), - Box(Box(9222, 9222), Box(9222, 9222)), - Box(Box(9223, 9223), Box(9223, 9223)), - Box(Box(9224, 9224), Box(9224, 9224)), - Box(Box(9225, 9225), Box(9225, 9225)), - Box(Box(9226, 9226), Box(9226, 9226)), - Box(Box(9227, 9227), Box(9227, 9227)), - Box(Box(9228, 9228), Box(9228, 9228)), - Box(Box(9229, 9229), Box(9229, 9229)), - Box(Box(9230, 9230), Box(9230, 9230)), - Box(Box(9231, 9231), Box(9231, 9231)), - Box(Box(9232, 9232), Box(9232, 9232)), - Box(Box(9233, 9233), Box(9233, 9233)), - Box(Box(9234, 9234), Box(9234, 9234)), - Box(Box(9235, 9235), Box(9235, 9235)), - Box(Box(9236, 9236), Box(9236, 9236)), - Box(Box(9237, 9237), Box(9237, 9237)), - Box(Box(9238, 9238), Box(9238, 9238)), - Box(Box(9239, 9239), Box(9239, 9239)), - Box(Box(9240, 9240), Box(9240, 9240)), - Box(Box(9241, 9241), Box(9241, 9241)), - Box(Box(9242, 9242), Box(9242, 9242)), - Box(Box(9243, 9243), Box(9243, 9243)), - Box(Box(9244, 9244), Box(9244, 9244)), - Box(Box(9245, 9245), Box(9245, 9245)), - Box(Box(9246, 9246), Box(9246, 9246)), - Box(Box(9247, 9247), Box(9247, 9247)), - Box(Box(9248, 9248), Box(9248, 9248)), - Box(Box(9249, 9249), Box(9249, 9249)), - Box(Box(9250, 9250), Box(9250, 9250)), - Box(Box(9251, 9251), Box(9251, 9251)), - Box(Box(9252, 9252), Box(9252, 9252)), - Box(Box(9253, 9253), Box(9253, 9253)), - Box(Box(9254, 9254), Box(9254, 9254)), - Box(Box(9255, 9255), Box(9255, 9255)), - Box(Box(9256, 9256), Box(9256, 9256)), - Box(Box(9257, 9257), Box(9257, 9257)), - Box(Box(9258, 9258), Box(9258, 9258)), - Box(Box(9259, 9259), Box(9259, 9259)), - Box(Box(9260, 9260), Box(9260, 9260)), - Box(Box(9261, 9261), Box(9261, 9261)), - Box(Box(9262, 9262), Box(9262, 9262)), - Box(Box(9263, 9263), Box(9263, 9263)), - Box(Box(9264, 9264), Box(9264, 9264)), - Box(Box(9265, 9265), Box(9265, 9265)), - Box(Box(9266, 9266), Box(9266, 9266)), - Box(Box(9267, 9267), Box(9267, 9267)), - Box(Box(9268, 9268), Box(9268, 9268)), - Box(Box(9269, 9269), Box(9269, 9269)), - Box(Box(9270, 9270), Box(9270, 9270)), - Box(Box(9271, 9271), Box(9271, 9271)), - Box(Box(9272, 9272), Box(9272, 9272)), - Box(Box(9273, 9273), Box(9273, 9273)), - Box(Box(9274, 9274), Box(9274, 9274)), - Box(Box(9275, 9275), Box(9275, 9275)), - Box(Box(9276, 9276), Box(9276, 9276)), - Box(Box(9277, 9277), Box(9277, 9277)), - Box(Box(9278, 9278), Box(9278, 9278)), - Box(Box(9279, 9279), Box(9279, 9279)), - Box(Box(9280, 9280), Box(9280, 9280)), - Box(Box(9281, 9281), Box(9281, 9281)), - Box(Box(9282, 9282), Box(9282, 9282)), - Box(Box(9283, 9283), Box(9283, 9283)), - Box(Box(9284, 9284), Box(9284, 9284)), - Box(Box(9285, 9285), Box(9285, 9285)), - Box(Box(9286, 9286), Box(9286, 9286)), - Box(Box(9287, 9287), Box(9287, 9287)), - Box(Box(9288, 9288), Box(9288, 9288)), - Box(Box(9289, 9289), Box(9289, 9289)), - Box(Box(9290, 9290), Box(9290, 9290)), - Box(Box(9291, 9291), Box(9291, 9291)), - Box(Box(9292, 9292), Box(9292, 9292)), - Box(Box(9293, 9293), Box(9293, 9293)), - Box(Box(9294, 9294), Box(9294, 9294)), - Box(Box(9295, 9295), Box(9295, 9295)), - Box(Box(9296, 9296), Box(9296, 9296)), - Box(Box(9297, 9297), Box(9297, 9297)), - Box(Box(9298, 9298), Box(9298, 9298)), - Box(Box(9299, 9299), Box(9299, 9299)), - Box(Box(9300, 9300), Box(9300, 9300)), - Box(Box(9301, 9301), Box(9301, 9301)), - Box(Box(9302, 9302), Box(9302, 9302)), - Box(Box(9303, 9303), Box(9303, 9303)), - Box(Box(9304, 9304), Box(9304, 9304)), - Box(Box(9305, 9305), Box(9305, 9305)), - Box(Box(9306, 9306), Box(9306, 9306)), - Box(Box(9307, 9307), Box(9307, 9307)), - Box(Box(9308, 9308), Box(9308, 9308)), - Box(Box(9309, 9309), Box(9309, 9309)), - Box(Box(9310, 9310), Box(9310, 9310)), - Box(Box(9311, 9311), Box(9311, 9311)), - Box(Box(9312, 9312), Box(9312, 9312)), - Box(Box(9313, 9313), Box(9313, 9313)), - Box(Box(9314, 9314), Box(9314, 9314)), - Box(Box(9315, 9315), Box(9315, 9315)), - Box(Box(9316, 9316), Box(9316, 9316)), - Box(Box(9317, 9317), Box(9317, 9317)), - Box(Box(9318, 9318), Box(9318, 9318)), - Box(Box(9319, 9319), Box(9319, 9319)), - Box(Box(9320, 9320), Box(9320, 9320)), - Box(Box(9321, 9321), Box(9321, 9321)), - Box(Box(9322, 9322), Box(9322, 9322)), - Box(Box(9323, 9323), Box(9323, 9323)), - Box(Box(9324, 9324), Box(9324, 9324)), - Box(Box(9325, 9325), Box(9325, 9325)), - Box(Box(9326, 9326), Box(9326, 9326)), - Box(Box(9327, 9327), Box(9327, 9327)), - Box(Box(9328, 9328), Box(9328, 9328)), - Box(Box(9329, 9329), Box(9329, 9329)), - Box(Box(9330, 9330), Box(9330, 9330)), - Box(Box(9331, 9331), Box(9331, 9331)), - Box(Box(9332, 9332), Box(9332, 9332)), - Box(Box(9333, 9333), Box(9333, 9333)), - Box(Box(9334, 9334), Box(9334, 9334)), - Box(Box(9335, 9335), Box(9335, 9335)), - Box(Box(9336, 9336), Box(9336, 9336)), - Box(Box(9337, 9337), Box(9337, 9337)), - Box(Box(9338, 9338), Box(9338, 9338)), - Box(Box(9339, 9339), Box(9339, 9339)), - Box(Box(9340, 9340), Box(9340, 9340)), - Box(Box(9341, 9341), Box(9341, 9341)), - Box(Box(9342, 9342), Box(9342, 9342)), - Box(Box(9343, 9343), Box(9343, 9343)), - Box(Box(9344, 9344), Box(9344, 9344)), - Box(Box(9345, 9345), Box(9345, 9345)), - Box(Box(9346, 9346), Box(9346, 9346)), - Box(Box(9347, 9347), Box(9347, 9347)), - Box(Box(9348, 9348), Box(9348, 9348)), - Box(Box(9349, 9349), Box(9349, 9349)), - Box(Box(9350, 9350), Box(9350, 9350)), - Box(Box(9351, 9351), Box(9351, 9351)), - Box(Box(9352, 9352), Box(9352, 9352)), - Box(Box(9353, 9353), Box(9353, 9353)), - Box(Box(9354, 9354), Box(9354, 9354)), - Box(Box(9355, 9355), Box(9355, 9355)), - Box(Box(9356, 9356), Box(9356, 9356)), - Box(Box(9357, 9357), Box(9357, 9357)), - Box(Box(9358, 9358), Box(9358, 9358)), - Box(Box(9359, 9359), Box(9359, 9359)), - Box(Box(9360, 9360), Box(9360, 9360)), - Box(Box(9361, 9361), Box(9361, 9361)), - Box(Box(9362, 9362), Box(9362, 9362)), - Box(Box(9363, 9363), Box(9363, 9363)), - Box(Box(9364, 9364), Box(9364, 9364)), - Box(Box(9365, 9365), Box(9365, 9365)), - Box(Box(9366, 9366), Box(9366, 9366)), - Box(Box(9367, 9367), Box(9367, 9367)), - Box(Box(9368, 9368), Box(9368, 9368)), - Box(Box(9369, 9369), Box(9369, 9369)), - Box(Box(9370, 9370), Box(9370, 9370)), - Box(Box(9371, 9371), Box(9371, 9371)), - Box(Box(9372, 9372), Box(9372, 9372)), - Box(Box(9373, 9373), Box(9373, 9373)), - Box(Box(9374, 9374), Box(9374, 9374)), - Box(Box(9375, 9375), Box(9375, 9375)), - Box(Box(9376, 9376), Box(9376, 9376)), - Box(Box(9377, 9377), Box(9377, 9377)), - Box(Box(9378, 9378), Box(9378, 9378)), - Box(Box(9379, 9379), Box(9379, 9379)), - Box(Box(9380, 9380), Box(9380, 9380)), - Box(Box(9381, 9381), Box(9381, 9381)), - Box(Box(9382, 9382), Box(9382, 9382)), - Box(Box(9383, 9383), Box(9383, 9383)), - Box(Box(9384, 9384), Box(9384, 9384)), - Box(Box(9385, 9385), Box(9385, 9385)), - Box(Box(9386, 9386), Box(9386, 9386)), - Box(Box(9387, 9387), Box(9387, 9387)), - Box(Box(9388, 9388), Box(9388, 9388)), - Box(Box(9389, 9389), Box(9389, 9389)), - Box(Box(9390, 9390), Box(9390, 9390)), - Box(Box(9391, 9391), Box(9391, 9391)), - Box(Box(9392, 9392), Box(9392, 9392)), - Box(Box(9393, 9393), Box(9393, 9393)), - Box(Box(9394, 9394), Box(9394, 9394)), - Box(Box(9395, 9395), Box(9395, 9395)), - Box(Box(9396, 9396), Box(9396, 9396)), - Box(Box(9397, 9397), Box(9397, 9397)), - Box(Box(9398, 9398), Box(9398, 9398)), - Box(Box(9399, 9399), Box(9399, 9399)), - Box(Box(9400, 9400), Box(9400, 9400)), - Box(Box(9401, 9401), Box(9401, 9401)), - Box(Box(9402, 9402), Box(9402, 9402)), - Box(Box(9403, 9403), Box(9403, 9403)), - Box(Box(9404, 9404), Box(9404, 9404)), - Box(Box(9405, 9405), Box(9405, 9405)), - Box(Box(9406, 9406), Box(9406, 9406)), - Box(Box(9407, 9407), Box(9407, 9407)), - Box(Box(9408, 9408), Box(9408, 9408)), - Box(Box(9409, 9409), Box(9409, 9409)), - Box(Box(9410, 9410), Box(9410, 9410)), - Box(Box(9411, 9411), Box(9411, 9411)), - Box(Box(9412, 9412), Box(9412, 9412)), - Box(Box(9413, 9413), Box(9413, 9413)), - Box(Box(9414, 9414), Box(9414, 9414)), - Box(Box(9415, 9415), Box(9415, 9415)), - Box(Box(9416, 9416), Box(9416, 9416)), - Box(Box(9417, 9417), Box(9417, 9417)), - Box(Box(9418, 9418), Box(9418, 9418)), - Box(Box(9419, 9419), Box(9419, 9419)), - Box(Box(9420, 9420), Box(9420, 9420)), - Box(Box(9421, 9421), Box(9421, 9421)), - Box(Box(9422, 9422), Box(9422, 9422)), - Box(Box(9423, 9423), Box(9423, 9423)), - Box(Box(9424, 9424), Box(9424, 9424)), - Box(Box(9425, 9425), Box(9425, 9425)), - Box(Box(9426, 9426), Box(9426, 9426)), - Box(Box(9427, 9427), Box(9427, 9427)), - Box(Box(9428, 9428), Box(9428, 9428)), - Box(Box(9429, 9429), Box(9429, 9429)), - Box(Box(9430, 9430), Box(9430, 9430)), - Box(Box(9431, 9431), Box(9431, 9431)), - Box(Box(9432, 9432), Box(9432, 9432)), - Box(Box(9433, 9433), Box(9433, 9433)), - Box(Box(9434, 9434), Box(9434, 9434)), - Box(Box(9435, 9435), Box(9435, 9435)), - Box(Box(9436, 9436), Box(9436, 9436)), - Box(Box(9437, 9437), Box(9437, 9437)), - Box(Box(9438, 9438), Box(9438, 9438)), - Box(Box(9439, 9439), Box(9439, 9439)), - Box(Box(9440, 9440), Box(9440, 9440)), - Box(Box(9441, 9441), Box(9441, 9441)), - Box(Box(9442, 9442), Box(9442, 9442)), - Box(Box(9443, 9443), Box(9443, 9443)), - Box(Box(9444, 9444), Box(9444, 9444)), - Box(Box(9445, 9445), Box(9445, 9445)), - Box(Box(9446, 9446), Box(9446, 9446)), - Box(Box(9447, 9447), Box(9447, 9447)), - Box(Box(9448, 9448), Box(9448, 9448)), - Box(Box(9449, 9449), Box(9449, 9449)), - Box(Box(9450, 9450), Box(9450, 9450)), - Box(Box(9451, 9451), Box(9451, 9451)), - Box(Box(9452, 9452), Box(9452, 9452)), - Box(Box(9453, 9453), Box(9453, 9453)), - Box(Box(9454, 9454), Box(9454, 9454)), - Box(Box(9455, 9455), Box(9455, 9455)), - Box(Box(9456, 9456), Box(9456, 9456)), - Box(Box(9457, 9457), Box(9457, 9457)), - Box(Box(9458, 9458), Box(9458, 9458)), - Box(Box(9459, 9459), Box(9459, 9459)), - Box(Box(9460, 9460), Box(9460, 9460)), - Box(Box(9461, 9461), Box(9461, 9461)), - Box(Box(9462, 9462), Box(9462, 9462)), - Box(Box(9463, 9463), Box(9463, 9463)), - Box(Box(9464, 9464), Box(9464, 9464)), - Box(Box(9465, 9465), Box(9465, 9465)), - Box(Box(9466, 9466), Box(9466, 9466)), - Box(Box(9467, 9467), Box(9467, 9467)), - Box(Box(9468, 9468), Box(9468, 9468)), - Box(Box(9469, 9469), Box(9469, 9469)), - Box(Box(9470, 9470), Box(9470, 9470)), - Box(Box(9471, 9471), Box(9471, 9471)), - Box(Box(9472, 9472), Box(9472, 9472)), - Box(Box(9473, 9473), Box(9473, 9473)), - Box(Box(9474, 9474), Box(9474, 9474)), - Box(Box(9475, 9475), Box(9475, 9475)), - Box(Box(9476, 9476), Box(9476, 9476)), - Box(Box(9477, 9477), Box(9477, 9477)), - Box(Box(9478, 9478), Box(9478, 9478)), - Box(Box(9479, 9479), Box(9479, 9479)), - Box(Box(9480, 9480), Box(9480, 9480)), - Box(Box(9481, 9481), Box(9481, 9481)), - Box(Box(9482, 9482), Box(9482, 9482)), - Box(Box(9483, 9483), Box(9483, 9483)), - Box(Box(9484, 9484), Box(9484, 9484)), - Box(Box(9485, 9485), Box(9485, 9485)), - Box(Box(9486, 9486), Box(9486, 9486)), - Box(Box(9487, 9487), Box(9487, 9487)), - Box(Box(9488, 9488), Box(9488, 9488)), - Box(Box(9489, 9489), Box(9489, 9489)), - Box(Box(9490, 9490), Box(9490, 9490)), - Box(Box(9491, 9491), Box(9491, 9491)), - Box(Box(9492, 9492), Box(9492, 9492)), - Box(Box(9493, 9493), Box(9493, 9493)), - Box(Box(9494, 9494), Box(9494, 9494)), - Box(Box(9495, 9495), Box(9495, 9495)), - Box(Box(9496, 9496), Box(9496, 9496)), - Box(Box(9497, 9497), Box(9497, 9497)), - Box(Box(9498, 9498), Box(9498, 9498)), - Box(Box(9499, 9499), Box(9499, 9499)), - Box(Box(9500, 9500), Box(9500, 9500)), - Box(Box(9501, 9501), Box(9501, 9501)), - Box(Box(9502, 9502), Box(9502, 9502)), - Box(Box(9503, 9503), Box(9503, 9503)), - Box(Box(9504, 9504), Box(9504, 9504)), - Box(Box(9505, 9505), Box(9505, 9505)), - Box(Box(9506, 9506), Box(9506, 9506)), - Box(Box(9507, 9507), Box(9507, 9507)), - Box(Box(9508, 9508), Box(9508, 9508)), - Box(Box(9509, 9509), Box(9509, 9509)), - Box(Box(9510, 9510), Box(9510, 9510)), - Box(Box(9511, 9511), Box(9511, 9511)), - Box(Box(9512, 9512), Box(9512, 9512)), - Box(Box(9513, 9513), Box(9513, 9513)), - Box(Box(9514, 9514), Box(9514, 9514)), - Box(Box(9515, 9515), Box(9515, 9515)), - Box(Box(9516, 9516), Box(9516, 9516)), - Box(Box(9517, 9517), Box(9517, 9517)), - Box(Box(9518, 9518), Box(9518, 9518)), - Box(Box(9519, 9519), Box(9519, 9519)), - Box(Box(9520, 9520), Box(9520, 9520)), - Box(Box(9521, 9521), Box(9521, 9521)), - Box(Box(9522, 9522), Box(9522, 9522)), - Box(Box(9523, 9523), Box(9523, 9523)), - Box(Box(9524, 9524), Box(9524, 9524)), - Box(Box(9525, 9525), Box(9525, 9525)), - Box(Box(9526, 9526), Box(9526, 9526)), - Box(Box(9527, 9527), Box(9527, 9527)), - Box(Box(9528, 9528), Box(9528, 9528)), - Box(Box(9529, 9529), Box(9529, 9529)), - Box(Box(9530, 9530), Box(9530, 9530)), - Box(Box(9531, 9531), Box(9531, 9531)), - Box(Box(9532, 9532), Box(9532, 9532)), - Box(Box(9533, 9533), Box(9533, 9533)), - Box(Box(9534, 9534), Box(9534, 9534)), - Box(Box(9535, 9535), Box(9535, 9535)), - Box(Box(9536, 9536), Box(9536, 9536)), - Box(Box(9537, 9537), Box(9537, 9537)), - Box(Box(9538, 9538), Box(9538, 9538)), - Box(Box(9539, 9539), Box(9539, 9539)), - Box(Box(9540, 9540), Box(9540, 9540)), - Box(Box(9541, 9541), Box(9541, 9541)), - Box(Box(9542, 9542), Box(9542, 9542)), - Box(Box(9543, 9543), Box(9543, 9543)), - Box(Box(9544, 9544), Box(9544, 9544)), - Box(Box(9545, 9545), Box(9545, 9545)), - Box(Box(9546, 9546), Box(9546, 9546)), - Box(Box(9547, 9547), Box(9547, 9547)), - Box(Box(9548, 9548), Box(9548, 9548)), - Box(Box(9549, 9549), Box(9549, 9549)), - Box(Box(9550, 9550), Box(9550, 9550)), - Box(Box(9551, 9551), Box(9551, 9551)), - Box(Box(9552, 9552), Box(9552, 9552)), - Box(Box(9553, 9553), Box(9553, 9553)), - Box(Box(9554, 9554), Box(9554, 9554)), - Box(Box(9555, 9555), Box(9555, 9555)), - Box(Box(9556, 9556), Box(9556, 9556)), - Box(Box(9557, 9557), Box(9557, 9557)), - Box(Box(9558, 9558), Box(9558, 9558)), - Box(Box(9559, 9559), Box(9559, 9559)), - Box(Box(9560, 9560), Box(9560, 9560)), - Box(Box(9561, 9561), Box(9561, 9561)), - Box(Box(9562, 9562), Box(9562, 9562)), - Box(Box(9563, 9563), Box(9563, 9563)), - Box(Box(9564, 9564), Box(9564, 9564)), - Box(Box(9565, 9565), Box(9565, 9565)), - Box(Box(9566, 9566), Box(9566, 9566)), - Box(Box(9567, 9567), Box(9567, 9567)), - Box(Box(9568, 9568), Box(9568, 9568)), - Box(Box(9569, 9569), Box(9569, 9569)), - Box(Box(9570, 9570), Box(9570, 9570)), - Box(Box(9571, 9571), Box(9571, 9571)), - Box(Box(9572, 9572), Box(9572, 9572)), - Box(Box(9573, 9573), Box(9573, 9573)), - Box(Box(9574, 9574), Box(9574, 9574)), - Box(Box(9575, 9575), Box(9575, 9575)), - Box(Box(9576, 9576), Box(9576, 9576)), - Box(Box(9577, 9577), Box(9577, 9577)), - Box(Box(9578, 9578), Box(9578, 9578)), - Box(Box(9579, 9579), Box(9579, 9579)), - Box(Box(9580, 9580), Box(9580, 9580)), - Box(Box(9581, 9581), Box(9581, 9581)), - Box(Box(9582, 9582), Box(9582, 9582)), - Box(Box(9583, 9583), Box(9583, 9583)), - Box(Box(9584, 9584), Box(9584, 9584)), - Box(Box(9585, 9585), Box(9585, 9585)), - Box(Box(9586, 9586), Box(9586, 9586)), - Box(Box(9587, 9587), Box(9587, 9587)), - Box(Box(9588, 9588), Box(9588, 9588)), - Box(Box(9589, 9589), Box(9589, 9589)), - Box(Box(9590, 9590), Box(9590, 9590)), - Box(Box(9591, 9591), Box(9591, 9591)), - Box(Box(9592, 9592), Box(9592, 9592)), - Box(Box(9593, 9593), Box(9593, 9593)), - Box(Box(9594, 9594), Box(9594, 9594)), - Box(Box(9595, 9595), Box(9595, 9595)), - Box(Box(9596, 9596), Box(9596, 9596)), - Box(Box(9597, 9597), Box(9597, 9597)), - Box(Box(9598, 9598), Box(9598, 9598)), - Box(Box(9599, 9599), Box(9599, 9599)), - Box(Box(9600, 9600), Box(9600, 9600)), - Box(Box(9601, 9601), Box(9601, 9601)), - Box(Box(9602, 9602), Box(9602, 9602)), - Box(Box(9603, 9603), Box(9603, 9603)), - Box(Box(9604, 9604), Box(9604, 9604)), - Box(Box(9605, 9605), Box(9605, 9605)), - Box(Box(9606, 9606), Box(9606, 9606)), - Box(Box(9607, 9607), Box(9607, 9607)), - Box(Box(9608, 9608), Box(9608, 9608)), - Box(Box(9609, 9609), Box(9609, 9609)), - Box(Box(9610, 9610), Box(9610, 9610)), - Box(Box(9611, 9611), Box(9611, 9611)), - Box(Box(9612, 9612), Box(9612, 9612)), - Box(Box(9613, 9613), Box(9613, 9613)), - Box(Box(9614, 9614), Box(9614, 9614)), - Box(Box(9615, 9615), Box(9615, 9615)), - Box(Box(9616, 9616), Box(9616, 9616)), - Box(Box(9617, 9617), Box(9617, 9617)), - Box(Box(9618, 9618), Box(9618, 9618)), - Box(Box(9619, 9619), Box(9619, 9619)), - Box(Box(9620, 9620), Box(9620, 9620)), - Box(Box(9621, 9621), Box(9621, 9621)), - Box(Box(9622, 9622), Box(9622, 9622)), - Box(Box(9623, 9623), Box(9623, 9623)), - Box(Box(9624, 9624), Box(9624, 9624)), - Box(Box(9625, 9625), Box(9625, 9625)), - Box(Box(9626, 9626), Box(9626, 9626)), - Box(Box(9627, 9627), Box(9627, 9627)), - Box(Box(9628, 9628), Box(9628, 9628)), - Box(Box(9629, 9629), Box(9629, 9629)), - Box(Box(9630, 9630), Box(9630, 9630)), - Box(Box(9631, 9631), Box(9631, 9631)), - Box(Box(9632, 9632), Box(9632, 9632)), - Box(Box(9633, 9633), Box(9633, 9633)), - Box(Box(9634, 9634), Box(9634, 9634)), - Box(Box(9635, 9635), Box(9635, 9635)), - Box(Box(9636, 9636), Box(9636, 9636)), - Box(Box(9637, 9637), Box(9637, 9637)), - Box(Box(9638, 9638), Box(9638, 9638)), - Box(Box(9639, 9639), Box(9639, 9639)), - Box(Box(9640, 9640), Box(9640, 9640)), - Box(Box(9641, 9641), Box(9641, 9641)), - Box(Box(9642, 9642), Box(9642, 9642)), - Box(Box(9643, 9643), Box(9643, 9643)), - Box(Box(9644, 9644), Box(9644, 9644)), - Box(Box(9645, 9645), Box(9645, 9645)), - Box(Box(9646, 9646), Box(9646, 9646)), - Box(Box(9647, 9647), Box(9647, 9647)), - Box(Box(9648, 9648), Box(9648, 9648)), - Box(Box(9649, 9649), Box(9649, 9649)), - Box(Box(9650, 9650), Box(9650, 9650)), - Box(Box(9651, 9651), Box(9651, 9651)), - Box(Box(9652, 9652), Box(9652, 9652)), - Box(Box(9653, 9653), Box(9653, 9653)), - Box(Box(9654, 9654), Box(9654, 9654)), - Box(Box(9655, 9655), Box(9655, 9655)), - Box(Box(9656, 9656), Box(9656, 9656)), - Box(Box(9657, 9657), Box(9657, 9657)), - Box(Box(9658, 9658), Box(9658, 9658)), - Box(Box(9659, 9659), Box(9659, 9659)), - Box(Box(9660, 9660), Box(9660, 9660)), - Box(Box(9661, 9661), Box(9661, 9661)), - Box(Box(9662, 9662), Box(9662, 9662)), - Box(Box(9663, 9663), Box(9663, 9663)), - Box(Box(9664, 9664), Box(9664, 9664)), - Box(Box(9665, 9665), Box(9665, 9665)), - Box(Box(9666, 9666), Box(9666, 9666)), - Box(Box(9667, 9667), Box(9667, 9667)), - Box(Box(9668, 9668), Box(9668, 9668)), - Box(Box(9669, 9669), Box(9669, 9669)), - Box(Box(9670, 9670), Box(9670, 9670)), - Box(Box(9671, 9671), Box(9671, 9671)), - Box(Box(9672, 9672), Box(9672, 9672)), - Box(Box(9673, 9673), Box(9673, 9673)), - Box(Box(9674, 9674), Box(9674, 9674)), - Box(Box(9675, 9675), Box(9675, 9675)), - Box(Box(9676, 9676), Box(9676, 9676)), - Box(Box(9677, 9677), Box(9677, 9677)), - Box(Box(9678, 9678), Box(9678, 9678)), - Box(Box(9679, 9679), Box(9679, 9679)), - Box(Box(9680, 9680), Box(9680, 9680)), - Box(Box(9681, 9681), Box(9681, 9681)), - Box(Box(9682, 9682), Box(9682, 9682)), - Box(Box(9683, 9683), Box(9683, 9683)), - Box(Box(9684, 9684), Box(9684, 9684)), - Box(Box(9685, 9685), Box(9685, 9685)), - Box(Box(9686, 9686), Box(9686, 9686)), - Box(Box(9687, 9687), Box(9687, 9687)), - Box(Box(9688, 9688), Box(9688, 9688)), - Box(Box(9689, 9689), Box(9689, 9689)), - Box(Box(9690, 9690), Box(9690, 9690)), - Box(Box(9691, 9691), Box(9691, 9691)), - Box(Box(9692, 9692), Box(9692, 9692)), - Box(Box(9693, 9693), Box(9693, 9693)), - Box(Box(9694, 9694), Box(9694, 9694)), - Box(Box(9695, 9695), Box(9695, 9695)), - Box(Box(9696, 9696), Box(9696, 9696)), - Box(Box(9697, 9697), Box(9697, 9697)), - Box(Box(9698, 9698), Box(9698, 9698)), - Box(Box(9699, 9699), Box(9699, 9699)), - Box(Box(9700, 9700), Box(9700, 9700)), - Box(Box(9701, 9701), Box(9701, 9701)), - Box(Box(9702, 9702), Box(9702, 9702)), - Box(Box(9703, 9703), Box(9703, 9703)), - Box(Box(9704, 9704), Box(9704, 9704)), - Box(Box(9705, 9705), Box(9705, 9705)), - Box(Box(9706, 9706), Box(9706, 9706)), - Box(Box(9707, 9707), Box(9707, 9707)), - Box(Box(9708, 9708), Box(9708, 9708)), - Box(Box(9709, 9709), Box(9709, 9709)), - Box(Box(9710, 9710), Box(9710, 9710)), - Box(Box(9711, 9711), Box(9711, 9711)), - Box(Box(9712, 9712), Box(9712, 9712)), - Box(Box(9713, 9713), Box(9713, 9713)), - Box(Box(9714, 9714), Box(9714, 9714)), - Box(Box(9715, 9715), Box(9715, 9715)), - Box(Box(9716, 9716), Box(9716, 9716)), - Box(Box(9717, 9717), Box(9717, 9717)), - Box(Box(9718, 9718), Box(9718, 9718)), - Box(Box(9719, 9719), Box(9719, 9719)), - Box(Box(9720, 9720), Box(9720, 9720)), - Box(Box(9721, 9721), Box(9721, 9721)), - Box(Box(9722, 9722), Box(9722, 9722)), - Box(Box(9723, 9723), Box(9723, 9723)), - Box(Box(9724, 9724), Box(9724, 9724)), - Box(Box(9725, 9725), Box(9725, 9725)), - Box(Box(9726, 9726), Box(9726, 9726)), - Box(Box(9727, 9727), Box(9727, 9727)), - Box(Box(9728, 9728), Box(9728, 9728)), - Box(Box(9729, 9729), Box(9729, 9729)), - Box(Box(9730, 9730), Box(9730, 9730)), - Box(Box(9731, 9731), Box(9731, 9731)), - Box(Box(9732, 9732), Box(9732, 9732)), - Box(Box(9733, 9733), Box(9733, 9733)), - Box(Box(9734, 9734), Box(9734, 9734)), - Box(Box(9735, 9735), Box(9735, 9735)), - Box(Box(9736, 9736), Box(9736, 9736)), - Box(Box(9737, 9737), Box(9737, 9737)), - Box(Box(9738, 9738), Box(9738, 9738)), - Box(Box(9739, 9739), Box(9739, 9739)), - Box(Box(9740, 9740), Box(9740, 9740)), - Box(Box(9741, 9741), Box(9741, 9741)), - Box(Box(9742, 9742), Box(9742, 9742)), - Box(Box(9743, 9743), Box(9743, 9743)), - Box(Box(9744, 9744), Box(9744, 9744)), - Box(Box(9745, 9745), Box(9745, 9745)), - Box(Box(9746, 9746), Box(9746, 9746)), - Box(Box(9747, 9747), Box(9747, 9747)), - Box(Box(9748, 9748), Box(9748, 9748)), - Box(Box(9749, 9749), Box(9749, 9749)), - Box(Box(9750, 9750), Box(9750, 9750)), - Box(Box(9751, 9751), Box(9751, 9751)), - Box(Box(9752, 9752), Box(9752, 9752)), - Box(Box(9753, 9753), Box(9753, 9753)), - Box(Box(9754, 9754), Box(9754, 9754)), - Box(Box(9755, 9755), Box(9755, 9755)), - Box(Box(9756, 9756), Box(9756, 9756)), - Box(Box(9757, 9757), Box(9757, 9757)), - Box(Box(9758, 9758), Box(9758, 9758)), - Box(Box(9759, 9759), Box(9759, 9759)), - Box(Box(9760, 9760), Box(9760, 9760)), - Box(Box(9761, 9761), Box(9761, 9761)), - Box(Box(9762, 9762), Box(9762, 9762)), - Box(Box(9763, 9763), Box(9763, 9763)), - Box(Box(9764, 9764), Box(9764, 9764)), - Box(Box(9765, 9765), Box(9765, 9765)), - Box(Box(9766, 9766), Box(9766, 9766)), - Box(Box(9767, 9767), Box(9767, 9767)), - Box(Box(9768, 9768), Box(9768, 9768)), - Box(Box(9769, 9769), Box(9769, 9769)), - Box(Box(9770, 9770), Box(9770, 9770)), - Box(Box(9771, 9771), Box(9771, 9771)), - Box(Box(9772, 9772), Box(9772, 9772)), - Box(Box(9773, 9773), Box(9773, 9773)), - Box(Box(9774, 9774), Box(9774, 9774)), - Box(Box(9775, 9775), Box(9775, 9775)), - Box(Box(9776, 9776), Box(9776, 9776)), - Box(Box(9777, 9777), Box(9777, 9777)), - Box(Box(9778, 9778), Box(9778, 9778)), - Box(Box(9779, 9779), Box(9779, 9779)), - Box(Box(9780, 9780), Box(9780, 9780)), - Box(Box(9781, 9781), Box(9781, 9781)), - Box(Box(9782, 9782), Box(9782, 9782)), - Box(Box(9783, 9783), Box(9783, 9783)), - Box(Box(9784, 9784), Box(9784, 9784)), - Box(Box(9785, 9785), Box(9785, 9785)), - Box(Box(9786, 9786), Box(9786, 9786)), - Box(Box(9787, 9787), Box(9787, 9787)), - Box(Box(9788, 9788), Box(9788, 9788)), - Box(Box(9789, 9789), Box(9789, 9789)), - Box(Box(9790, 9790), Box(9790, 9790)), - Box(Box(9791, 9791), Box(9791, 9791)), - Box(Box(9792, 9792), Box(9792, 9792)), - Box(Box(9793, 9793), Box(9793, 9793)), - Box(Box(9794, 9794), Box(9794, 9794)), - Box(Box(9795, 9795), Box(9795, 9795)), - Box(Box(9796, 9796), Box(9796, 9796)), - Box(Box(9797, 9797), Box(9797, 9797)), - Box(Box(9798, 9798), Box(9798, 9798)), - Box(Box(9799, 9799), Box(9799, 9799)), - Box(Box(9800, 9800), Box(9800, 9800)), - Box(Box(9801, 9801), Box(9801, 9801)), - Box(Box(9802, 9802), Box(9802, 9802)), - Box(Box(9803, 9803), Box(9803, 9803)), - Box(Box(9804, 9804), Box(9804, 9804)), - Box(Box(9805, 9805), Box(9805, 9805)), - Box(Box(9806, 9806), Box(9806, 9806)), - Box(Box(9807, 9807), Box(9807, 9807)), - Box(Box(9808, 9808), Box(9808, 9808)), - Box(Box(9809, 9809), Box(9809, 9809)), - Box(Box(9810, 9810), Box(9810, 9810)), - Box(Box(9811, 9811), Box(9811, 9811)), - Box(Box(9812, 9812), Box(9812, 9812)), - Box(Box(9813, 9813), Box(9813, 9813)), - Box(Box(9814, 9814), Box(9814, 9814)), - Box(Box(9815, 9815), Box(9815, 9815)), - Box(Box(9816, 9816), Box(9816, 9816)), - Box(Box(9817, 9817), Box(9817, 9817)), - Box(Box(9818, 9818), Box(9818, 9818)), - Box(Box(9819, 9819), Box(9819, 9819)), - Box(Box(9820, 9820), Box(9820, 9820)), - Box(Box(9821, 9821), Box(9821, 9821)), - Box(Box(9822, 9822), Box(9822, 9822)), - Box(Box(9823, 9823), Box(9823, 9823)), - Box(Box(9824, 9824), Box(9824, 9824)), - Box(Box(9825, 9825), Box(9825, 9825)), - Box(Box(9826, 9826), Box(9826, 9826)), - Box(Box(9827, 9827), Box(9827, 9827)), - Box(Box(9828, 9828), Box(9828, 9828)), - Box(Box(9829, 9829), Box(9829, 9829)), - Box(Box(9830, 9830), Box(9830, 9830)), - Box(Box(9831, 9831), Box(9831, 9831)), - Box(Box(9832, 9832), Box(9832, 9832)), - Box(Box(9833, 9833), Box(9833, 9833)), - Box(Box(9834, 9834), Box(9834, 9834)), - Box(Box(9835, 9835), Box(9835, 9835)), - Box(Box(9836, 9836), Box(9836, 9836)), - Box(Box(9837, 9837), Box(9837, 9837)), - Box(Box(9838, 9838), Box(9838, 9838)), - Box(Box(9839, 9839), Box(9839, 9839)), - Box(Box(9840, 9840), Box(9840, 9840)), - Box(Box(9841, 9841), Box(9841, 9841)), - Box(Box(9842, 9842), Box(9842, 9842)), - Box(Box(9843, 9843), Box(9843, 9843)), - Box(Box(9844, 9844), Box(9844, 9844)), - Box(Box(9845, 9845), Box(9845, 9845)), - Box(Box(9846, 9846), Box(9846, 9846)), - Box(Box(9847, 9847), Box(9847, 9847)), - Box(Box(9848, 9848), Box(9848, 9848)), - Box(Box(9849, 9849), Box(9849, 9849)), - Box(Box(9850, 9850), Box(9850, 9850)), - Box(Box(9851, 9851), Box(9851, 9851)), - Box(Box(9852, 9852), Box(9852, 9852)), - Box(Box(9853, 9853), Box(9853, 9853)), - Box(Box(9854, 9854), Box(9854, 9854)), - Box(Box(9855, 9855), Box(9855, 9855)), - Box(Box(9856, 9856), Box(9856, 9856)), - Box(Box(9857, 9857), Box(9857, 9857)), - Box(Box(9858, 9858), Box(9858, 9858)), - Box(Box(9859, 9859), Box(9859, 9859)), - Box(Box(9860, 9860), Box(9860, 9860)), - Box(Box(9861, 9861), Box(9861, 9861)), - Box(Box(9862, 9862), Box(9862, 9862)), - Box(Box(9863, 9863), Box(9863, 9863)), - Box(Box(9864, 9864), Box(9864, 9864)), - Box(Box(9865, 9865), Box(9865, 9865)), - Box(Box(9866, 9866), Box(9866, 9866)), - Box(Box(9867, 9867), Box(9867, 9867)), - Box(Box(9868, 9868), Box(9868, 9868)), - Box(Box(9869, 9869), Box(9869, 9869)), - Box(Box(9870, 9870), Box(9870, 9870)), - Box(Box(9871, 9871), Box(9871, 9871)), - Box(Box(9872, 9872), Box(9872, 9872)), - Box(Box(9873, 9873), Box(9873, 9873)), - Box(Box(9874, 9874), Box(9874, 9874)), - Box(Box(9875, 9875), Box(9875, 9875)), - Box(Box(9876, 9876), Box(9876, 9876)), - Box(Box(9877, 9877), Box(9877, 9877)), - Box(Box(9878, 9878), Box(9878, 9878)), - Box(Box(9879, 9879), Box(9879, 9879)), - Box(Box(9880, 9880), Box(9880, 9880)), - Box(Box(9881, 9881), Box(9881, 9881)), - Box(Box(9882, 9882), Box(9882, 9882)), - Box(Box(9883, 9883), Box(9883, 9883)), - Box(Box(9884, 9884), Box(9884, 9884)), - Box(Box(9885, 9885), Box(9885, 9885)), - Box(Box(9886, 9886), Box(9886, 9886)), - Box(Box(9887, 9887), Box(9887, 9887)), - Box(Box(9888, 9888), Box(9888, 9888)), - Box(Box(9889, 9889), Box(9889, 9889)), - Box(Box(9890, 9890), Box(9890, 9890)), - Box(Box(9891, 9891), Box(9891, 9891)), - Box(Box(9892, 9892), Box(9892, 9892)), - Box(Box(9893, 9893), Box(9893, 9893)), - Box(Box(9894, 9894), Box(9894, 9894)), - Box(Box(9895, 9895), Box(9895, 9895)), - Box(Box(9896, 9896), Box(9896, 9896)), - Box(Box(9897, 9897), Box(9897, 9897)), - Box(Box(9898, 9898), Box(9898, 9898)), - Box(Box(9899, 9899), Box(9899, 9899)), - Box(Box(9900, 9900), Box(9900, 9900)), - Box(Box(9901, 9901), Box(9901, 9901)), - Box(Box(9902, 9902), Box(9902, 9902)), - Box(Box(9903, 9903), Box(9903, 9903)), - Box(Box(9904, 9904), Box(9904, 9904)), - Box(Box(9905, 9905), Box(9905, 9905)), - Box(Box(9906, 9906), Box(9906, 9906)), - Box(Box(9907, 9907), Box(9907, 9907)), - Box(Box(9908, 9908), Box(9908, 9908)), - Box(Box(9909, 9909), Box(9909, 9909)), - Box(Box(9910, 9910), Box(9910, 9910)), - Box(Box(9911, 9911), Box(9911, 9911)), - Box(Box(9912, 9912), Box(9912, 9912)), - Box(Box(9913, 9913), Box(9913, 9913)), - Box(Box(9914, 9914), Box(9914, 9914)), - Box(Box(9915, 9915), Box(9915, 9915)), - Box(Box(9916, 9916), Box(9916, 9916)), - Box(Box(9917, 9917), Box(9917, 9917)), - Box(Box(9918, 9918), Box(9918, 9918)), - Box(Box(9919, 9919), Box(9919, 9919)), - Box(Box(9920, 9920), Box(9920, 9920)), - Box(Box(9921, 9921), Box(9921, 9921)), - Box(Box(9922, 9922), Box(9922, 9922)), - Box(Box(9923, 9923), Box(9923, 9923)), - Box(Box(9924, 9924), Box(9924, 9924)), - Box(Box(9925, 9925), Box(9925, 9925)), - Box(Box(9926, 9926), Box(9926, 9926)), - Box(Box(9927, 9927), Box(9927, 9927)), - Box(Box(9928, 9928), Box(9928, 9928)), - Box(Box(9929, 9929), Box(9929, 9929)), - Box(Box(9930, 9930), Box(9930, 9930)), - Box(Box(9931, 9931), Box(9931, 9931)), - Box(Box(9932, 9932), Box(9932, 9932)), - Box(Box(9933, 9933), Box(9933, 9933)), - Box(Box(9934, 9934), Box(9934, 9934)), - Box(Box(9935, 9935), Box(9935, 9935)), - Box(Box(9936, 9936), Box(9936, 9936)), - Box(Box(9937, 9937), Box(9937, 9937)), - Box(Box(9938, 9938), Box(9938, 9938)), - Box(Box(9939, 9939), Box(9939, 9939)), - Box(Box(9940, 9940), Box(9940, 9940)), - Box(Box(9941, 9941), Box(9941, 9941)), - Box(Box(9942, 9942), Box(9942, 9942)), - Box(Box(9943, 9943), Box(9943, 9943)), - Box(Box(9944, 9944), Box(9944, 9944)), - Box(Box(9945, 9945), Box(9945, 9945)), - Box(Box(9946, 9946), Box(9946, 9946)), - Box(Box(9947, 9947), Box(9947, 9947)), - Box(Box(9948, 9948), Box(9948, 9948)), - Box(Box(9949, 9949), Box(9949, 9949)), - Box(Box(9950, 9950), Box(9950, 9950)), - Box(Box(9951, 9951), Box(9951, 9951)), - Box(Box(9952, 9952), Box(9952, 9952)), - Box(Box(9953, 9953), Box(9953, 9953)), - Box(Box(9954, 9954), Box(9954, 9954)), - Box(Box(9955, 9955), Box(9955, 9955)), - Box(Box(9956, 9956), Box(9956, 9956)), - Box(Box(9957, 9957), Box(9957, 9957)), - Box(Box(9958, 9958), Box(9958, 9958)), - Box(Box(9959, 9959), Box(9959, 9959)), - Box(Box(9960, 9960), Box(9960, 9960)), - Box(Box(9961, 9961), Box(9961, 9961)), - Box(Box(9962, 9962), Box(9962, 9962)), - Box(Box(9963, 9963), Box(9963, 9963)), - Box(Box(9964, 9964), Box(9964, 9964)), - Box(Box(9965, 9965), Box(9965, 9965)), - Box(Box(9966, 9966), Box(9966, 9966)), - Box(Box(9967, 9967), Box(9967, 9967)), - Box(Box(9968, 9968), Box(9968, 9968)), - Box(Box(9969, 9969), Box(9969, 9969)), - Box(Box(9970, 9970), Box(9970, 9970)), - Box(Box(9971, 9971), Box(9971, 9971)), - Box(Box(9972, 9972), Box(9972, 9972)), - Box(Box(9973, 9973), Box(9973, 9973)), - Box(Box(9974, 9974), Box(9974, 9974)), - Box(Box(9975, 9975), Box(9975, 9975)), - Box(Box(9976, 9976), Box(9976, 9976)), - Box(Box(9977, 9977), Box(9977, 9977)), - Box(Box(9978, 9978), Box(9978, 9978)), - Box(Box(9979, 9979), Box(9979, 9979)), - Box(Box(9980, 9980), Box(9980, 9980)), - Box(Box(9981, 9981), Box(9981, 9981)), - Box(Box(9982, 9982), Box(9982, 9982)), - Box(Box(9983, 9983), Box(9983, 9983)), - Box(Box(9984, 9984), Box(9984, 9984)), - Box(Box(9985, 9985), Box(9985, 9985)), - Box(Box(9986, 9986), Box(9986, 9986)), - Box(Box(9987, 9987), Box(9987, 9987)), - Box(Box(9988, 9988), Box(9988, 9988)), - Box(Box(9989, 9989), Box(9989, 9989)), - Box(Box(9990, 9990), Box(9990, 9990)), - Box(Box(9991, 9991), Box(9991, 9991)), - Box(Box(9992, 9992), Box(9992, 9992)), - Box(Box(9993, 9993), Box(9993, 9993)), - Box(Box(9994, 9994), Box(9994, 9994)), - Box(Box(9995, 9995), Box(9995, 9995)), - Box(Box(9996, 9996), Box(9996, 9996)), - Box(Box(9997, 9997), Box(9997, 9997)), - Box(Box(9998, 9998), Box(9998, 9998)), - Box(Box(9999, 9999), Box(9999, 9999)), -]; - -// 10,000 elements. -const list2 = [ - Box(Box(0, 0), Box(0, 0)), - Box(Box(1, 1), Box(1, 1)), - Box(Box(2, 2), Box(2, 2)), - Box(Box(3, 3), Box(3, 3)), - Box(Box(4, 4), Box(4, 4)), - Box(Box(5, 5), Box(5, 5)), - Box(Box(6, 6), Box(6, 6)), - Box(Box(7, 7), Box(7, 7)), - Box(Box(8, 8), Box(8, 8)), - Box(Box(9, 9), Box(9, 9)), - Box(Box(10, 10), Box(10, 10)), - Box(Box(11, 11), Box(11, 11)), - Box(Box(12, 12), Box(12, 12)), - Box(Box(13, 13), Box(13, 13)), - Box(Box(14, 14), Box(14, 14)), - Box(Box(15, 15), Box(15, 15)), - Box(Box(16, 16), Box(16, 16)), - Box(Box(17, 17), Box(17, 17)), - Box(Box(18, 18), Box(18, 18)), - Box(Box(19, 19), Box(19, 19)), - Box(Box(20, 20), Box(20, 20)), - Box(Box(21, 21), Box(21, 21)), - Box(Box(22, 22), Box(22, 22)), - Box(Box(23, 23), Box(23, 23)), - Box(Box(24, 24), Box(24, 24)), - Box(Box(25, 25), Box(25, 25)), - Box(Box(26, 26), Box(26, 26)), - Box(Box(27, 27), Box(27, 27)), - Box(Box(28, 28), Box(28, 28)), - Box(Box(29, 29), Box(29, 29)), - Box(Box(30, 30), Box(30, 30)), - Box(Box(31, 31), Box(31, 31)), - Box(Box(32, 32), Box(32, 32)), - Box(Box(33, 33), Box(33, 33)), - Box(Box(34, 34), Box(34, 34)), - Box(Box(35, 35), Box(35, 35)), - Box(Box(36, 36), Box(36, 36)), - Box(Box(37, 37), Box(37, 37)), - Box(Box(38, 38), Box(38, 38)), - Box(Box(39, 39), Box(39, 39)), - Box(Box(40, 40), Box(40, 40)), - Box(Box(41, 41), Box(41, 41)), - Box(Box(42, 42), Box(42, 42)), - Box(Box(43, 43), Box(43, 43)), - Box(Box(44, 44), Box(44, 44)), - Box(Box(45, 45), Box(45, 45)), - Box(Box(46, 46), Box(46, 46)), - Box(Box(47, 47), Box(47, 47)), - Box(Box(48, 48), Box(48, 48)), - Box(Box(49, 49), Box(49, 49)), - Box(Box(50, 50), Box(50, 50)), - Box(Box(51, 51), Box(51, 51)), - Box(Box(52, 52), Box(52, 52)), - Box(Box(53, 53), Box(53, 53)), - Box(Box(54, 54), Box(54, 54)), - Box(Box(55, 55), Box(55, 55)), - Box(Box(56, 56), Box(56, 56)), - Box(Box(57, 57), Box(57, 57)), - Box(Box(58, 58), Box(58, 58)), - Box(Box(59, 59), Box(59, 59)), - Box(Box(60, 60), Box(60, 60)), - Box(Box(61, 61), Box(61, 61)), - Box(Box(62, 62), Box(62, 62)), - Box(Box(63, 63), Box(63, 63)), - Box(Box(64, 64), Box(64, 64)), - Box(Box(65, 65), Box(65, 65)), - Box(Box(66, 66), Box(66, 66)), - Box(Box(67, 67), Box(67, 67)), - Box(Box(68, 68), Box(68, 68)), - Box(Box(69, 69), Box(69, 69)), - Box(Box(70, 70), Box(70, 70)), - Box(Box(71, 71), Box(71, 71)), - Box(Box(72, 72), Box(72, 72)), - Box(Box(73, 73), Box(73, 73)), - Box(Box(74, 74), Box(74, 74)), - Box(Box(75, 75), Box(75, 75)), - Box(Box(76, 76), Box(76, 76)), - Box(Box(77, 77), Box(77, 77)), - Box(Box(78, 78), Box(78, 78)), - Box(Box(79, 79), Box(79, 79)), - Box(Box(80, 80), Box(80, 80)), - Box(Box(81, 81), Box(81, 81)), - Box(Box(82, 82), Box(82, 82)), - Box(Box(83, 83), Box(83, 83)), - Box(Box(84, 84), Box(84, 84)), - Box(Box(85, 85), Box(85, 85)), - Box(Box(86, 86), Box(86, 86)), - Box(Box(87, 87), Box(87, 87)), - Box(Box(88, 88), Box(88, 88)), - Box(Box(89, 89), Box(89, 89)), - Box(Box(90, 90), Box(90, 90)), - Box(Box(91, 91), Box(91, 91)), - Box(Box(92, 92), Box(92, 92)), - Box(Box(93, 93), Box(93, 93)), - Box(Box(94, 94), Box(94, 94)), - Box(Box(95, 95), Box(95, 95)), - Box(Box(96, 96), Box(96, 96)), - Box(Box(97, 97), Box(97, 97)), - Box(Box(98, 98), Box(98, 98)), - Box(Box(99, 99), Box(99, 99)), - Box(Box(100, 100), Box(100, 100)), - Box(Box(101, 101), Box(101, 101)), - Box(Box(102, 102), Box(102, 102)), - Box(Box(103, 103), Box(103, 103)), - Box(Box(104, 104), Box(104, 104)), - Box(Box(105, 105), Box(105, 105)), - Box(Box(106, 106), Box(106, 106)), - Box(Box(107, 107), Box(107, 107)), - Box(Box(108, 108), Box(108, 108)), - Box(Box(109, 109), Box(109, 109)), - Box(Box(110, 110), Box(110, 110)), - Box(Box(111, 111), Box(111, 111)), - Box(Box(112, 112), Box(112, 112)), - Box(Box(113, 113), Box(113, 113)), - Box(Box(114, 114), Box(114, 114)), - Box(Box(115, 115), Box(115, 115)), - Box(Box(116, 116), Box(116, 116)), - Box(Box(117, 117), Box(117, 117)), - Box(Box(118, 118), Box(118, 118)), - Box(Box(119, 119), Box(119, 119)), - Box(Box(120, 120), Box(120, 120)), - Box(Box(121, 121), Box(121, 121)), - Box(Box(122, 122), Box(122, 122)), - Box(Box(123, 123), Box(123, 123)), - Box(Box(124, 124), Box(124, 124)), - Box(Box(125, 125), Box(125, 125)), - Box(Box(126, 126), Box(126, 126)), - Box(Box(127, 127), Box(127, 127)), - Box(Box(128, 128), Box(128, 128)), - Box(Box(129, 129), Box(129, 129)), - Box(Box(130, 130), Box(130, 130)), - Box(Box(131, 131), Box(131, 131)), - Box(Box(132, 132), Box(132, 132)), - Box(Box(133, 133), Box(133, 133)), - Box(Box(134, 134), Box(134, 134)), - Box(Box(135, 135), Box(135, 135)), - Box(Box(136, 136), Box(136, 136)), - Box(Box(137, 137), Box(137, 137)), - Box(Box(138, 138), Box(138, 138)), - Box(Box(139, 139), Box(139, 139)), - Box(Box(140, 140), Box(140, 140)), - Box(Box(141, 141), Box(141, 141)), - Box(Box(142, 142), Box(142, 142)), - Box(Box(143, 143), Box(143, 143)), - Box(Box(144, 144), Box(144, 144)), - Box(Box(145, 145), Box(145, 145)), - Box(Box(146, 146), Box(146, 146)), - Box(Box(147, 147), Box(147, 147)), - Box(Box(148, 148), Box(148, 148)), - Box(Box(149, 149), Box(149, 149)), - Box(Box(150, 150), Box(150, 150)), - Box(Box(151, 151), Box(151, 151)), - Box(Box(152, 152), Box(152, 152)), - Box(Box(153, 153), Box(153, 153)), - Box(Box(154, 154), Box(154, 154)), - Box(Box(155, 155), Box(155, 155)), - Box(Box(156, 156), Box(156, 156)), - Box(Box(157, 157), Box(157, 157)), - Box(Box(158, 158), Box(158, 158)), - Box(Box(159, 159), Box(159, 159)), - Box(Box(160, 160), Box(160, 160)), - Box(Box(161, 161), Box(161, 161)), - Box(Box(162, 162), Box(162, 162)), - Box(Box(163, 163), Box(163, 163)), - Box(Box(164, 164), Box(164, 164)), - Box(Box(165, 165), Box(165, 165)), - Box(Box(166, 166), Box(166, 166)), - Box(Box(167, 167), Box(167, 167)), - Box(Box(168, 168), Box(168, 168)), - Box(Box(169, 169), Box(169, 169)), - Box(Box(170, 170), Box(170, 170)), - Box(Box(171, 171), Box(171, 171)), - Box(Box(172, 172), Box(172, 172)), - Box(Box(173, 173), Box(173, 173)), - Box(Box(174, 174), Box(174, 174)), - Box(Box(175, 175), Box(175, 175)), - Box(Box(176, 176), Box(176, 176)), - Box(Box(177, 177), Box(177, 177)), - Box(Box(178, 178), Box(178, 178)), - Box(Box(179, 179), Box(179, 179)), - Box(Box(180, 180), Box(180, 180)), - Box(Box(181, 181), Box(181, 181)), - Box(Box(182, 182), Box(182, 182)), - Box(Box(183, 183), Box(183, 183)), - Box(Box(184, 184), Box(184, 184)), - Box(Box(185, 185), Box(185, 185)), - Box(Box(186, 186), Box(186, 186)), - Box(Box(187, 187), Box(187, 187)), - Box(Box(188, 188), Box(188, 188)), - Box(Box(189, 189), Box(189, 189)), - Box(Box(190, 190), Box(190, 190)), - Box(Box(191, 191), Box(191, 191)), - Box(Box(192, 192), Box(192, 192)), - Box(Box(193, 193), Box(193, 193)), - Box(Box(194, 194), Box(194, 194)), - Box(Box(195, 195), Box(195, 195)), - Box(Box(196, 196), Box(196, 196)), - Box(Box(197, 197), Box(197, 197)), - Box(Box(198, 198), Box(198, 198)), - Box(Box(199, 199), Box(199, 199)), - Box(Box(200, 200), Box(200, 200)), - Box(Box(201, 201), Box(201, 201)), - Box(Box(202, 202), Box(202, 202)), - Box(Box(203, 203), Box(203, 203)), - Box(Box(204, 204), Box(204, 204)), - Box(Box(205, 205), Box(205, 205)), - Box(Box(206, 206), Box(206, 206)), - Box(Box(207, 207), Box(207, 207)), - Box(Box(208, 208), Box(208, 208)), - Box(Box(209, 209), Box(209, 209)), - Box(Box(210, 210), Box(210, 210)), - Box(Box(211, 211), Box(211, 211)), - Box(Box(212, 212), Box(212, 212)), - Box(Box(213, 213), Box(213, 213)), - Box(Box(214, 214), Box(214, 214)), - Box(Box(215, 215), Box(215, 215)), - Box(Box(216, 216), Box(216, 216)), - Box(Box(217, 217), Box(217, 217)), - Box(Box(218, 218), Box(218, 218)), - Box(Box(219, 219), Box(219, 219)), - Box(Box(220, 220), Box(220, 220)), - Box(Box(221, 221), Box(221, 221)), - Box(Box(222, 222), Box(222, 222)), - Box(Box(223, 223), Box(223, 223)), - Box(Box(224, 224), Box(224, 224)), - Box(Box(225, 225), Box(225, 225)), - Box(Box(226, 226), Box(226, 226)), - Box(Box(227, 227), Box(227, 227)), - Box(Box(228, 228), Box(228, 228)), - Box(Box(229, 229), Box(229, 229)), - Box(Box(230, 230), Box(230, 230)), - Box(Box(231, 231), Box(231, 231)), - Box(Box(232, 232), Box(232, 232)), - Box(Box(233, 233), Box(233, 233)), - Box(Box(234, 234), Box(234, 234)), - Box(Box(235, 235), Box(235, 235)), - Box(Box(236, 236), Box(236, 236)), - Box(Box(237, 237), Box(237, 237)), - Box(Box(238, 238), Box(238, 238)), - Box(Box(239, 239), Box(239, 239)), - Box(Box(240, 240), Box(240, 240)), - Box(Box(241, 241), Box(241, 241)), - Box(Box(242, 242), Box(242, 242)), - Box(Box(243, 243), Box(243, 243)), - Box(Box(244, 244), Box(244, 244)), - Box(Box(245, 245), Box(245, 245)), - Box(Box(246, 246), Box(246, 246)), - Box(Box(247, 247), Box(247, 247)), - Box(Box(248, 248), Box(248, 248)), - Box(Box(249, 249), Box(249, 249)), - Box(Box(250, 250), Box(250, 250)), - Box(Box(251, 251), Box(251, 251)), - Box(Box(252, 252), Box(252, 252)), - Box(Box(253, 253), Box(253, 253)), - Box(Box(254, 254), Box(254, 254)), - Box(Box(255, 255), Box(255, 255)), - Box(Box(256, 256), Box(256, 256)), - Box(Box(257, 257), Box(257, 257)), - Box(Box(258, 258), Box(258, 258)), - Box(Box(259, 259), Box(259, 259)), - Box(Box(260, 260), Box(260, 260)), - Box(Box(261, 261), Box(261, 261)), - Box(Box(262, 262), Box(262, 262)), - Box(Box(263, 263), Box(263, 263)), - Box(Box(264, 264), Box(264, 264)), - Box(Box(265, 265), Box(265, 265)), - Box(Box(266, 266), Box(266, 266)), - Box(Box(267, 267), Box(267, 267)), - Box(Box(268, 268), Box(268, 268)), - Box(Box(269, 269), Box(269, 269)), - Box(Box(270, 270), Box(270, 270)), - Box(Box(271, 271), Box(271, 271)), - Box(Box(272, 272), Box(272, 272)), - Box(Box(273, 273), Box(273, 273)), - Box(Box(274, 274), Box(274, 274)), - Box(Box(275, 275), Box(275, 275)), - Box(Box(276, 276), Box(276, 276)), - Box(Box(277, 277), Box(277, 277)), - Box(Box(278, 278), Box(278, 278)), - Box(Box(279, 279), Box(279, 279)), - Box(Box(280, 280), Box(280, 280)), - Box(Box(281, 281), Box(281, 281)), - Box(Box(282, 282), Box(282, 282)), - Box(Box(283, 283), Box(283, 283)), - Box(Box(284, 284), Box(284, 284)), - Box(Box(285, 285), Box(285, 285)), - Box(Box(286, 286), Box(286, 286)), - Box(Box(287, 287), Box(287, 287)), - Box(Box(288, 288), Box(288, 288)), - Box(Box(289, 289), Box(289, 289)), - Box(Box(290, 290), Box(290, 290)), - Box(Box(291, 291), Box(291, 291)), - Box(Box(292, 292), Box(292, 292)), - Box(Box(293, 293), Box(293, 293)), - Box(Box(294, 294), Box(294, 294)), - Box(Box(295, 295), Box(295, 295)), - Box(Box(296, 296), Box(296, 296)), - Box(Box(297, 297), Box(297, 297)), - Box(Box(298, 298), Box(298, 298)), - Box(Box(299, 299), Box(299, 299)), - Box(Box(300, 300), Box(300, 300)), - Box(Box(301, 301), Box(301, 301)), - Box(Box(302, 302), Box(302, 302)), - Box(Box(303, 303), Box(303, 303)), - Box(Box(304, 304), Box(304, 304)), - Box(Box(305, 305), Box(305, 305)), - Box(Box(306, 306), Box(306, 306)), - Box(Box(307, 307), Box(307, 307)), - Box(Box(308, 308), Box(308, 308)), - Box(Box(309, 309), Box(309, 309)), - Box(Box(310, 310), Box(310, 310)), - Box(Box(311, 311), Box(311, 311)), - Box(Box(312, 312), Box(312, 312)), - Box(Box(313, 313), Box(313, 313)), - Box(Box(314, 314), Box(314, 314)), - Box(Box(315, 315), Box(315, 315)), - Box(Box(316, 316), Box(316, 316)), - Box(Box(317, 317), Box(317, 317)), - Box(Box(318, 318), Box(318, 318)), - Box(Box(319, 319), Box(319, 319)), - Box(Box(320, 320), Box(320, 320)), - Box(Box(321, 321), Box(321, 321)), - Box(Box(322, 322), Box(322, 322)), - Box(Box(323, 323), Box(323, 323)), - Box(Box(324, 324), Box(324, 324)), - Box(Box(325, 325), Box(325, 325)), - Box(Box(326, 326), Box(326, 326)), - Box(Box(327, 327), Box(327, 327)), - Box(Box(328, 328), Box(328, 328)), - Box(Box(329, 329), Box(329, 329)), - Box(Box(330, 330), Box(330, 330)), - Box(Box(331, 331), Box(331, 331)), - Box(Box(332, 332), Box(332, 332)), - Box(Box(333, 333), Box(333, 333)), - Box(Box(334, 334), Box(334, 334)), - Box(Box(335, 335), Box(335, 335)), - Box(Box(336, 336), Box(336, 336)), - Box(Box(337, 337), Box(337, 337)), - Box(Box(338, 338), Box(338, 338)), - Box(Box(339, 339), Box(339, 339)), - Box(Box(340, 340), Box(340, 340)), - Box(Box(341, 341), Box(341, 341)), - Box(Box(342, 342), Box(342, 342)), - Box(Box(343, 343), Box(343, 343)), - Box(Box(344, 344), Box(344, 344)), - Box(Box(345, 345), Box(345, 345)), - Box(Box(346, 346), Box(346, 346)), - Box(Box(347, 347), Box(347, 347)), - Box(Box(348, 348), Box(348, 348)), - Box(Box(349, 349), Box(349, 349)), - Box(Box(350, 350), Box(350, 350)), - Box(Box(351, 351), Box(351, 351)), - Box(Box(352, 352), Box(352, 352)), - Box(Box(353, 353), Box(353, 353)), - Box(Box(354, 354), Box(354, 354)), - Box(Box(355, 355), Box(355, 355)), - Box(Box(356, 356), Box(356, 356)), - Box(Box(357, 357), Box(357, 357)), - Box(Box(358, 358), Box(358, 358)), - Box(Box(359, 359), Box(359, 359)), - Box(Box(360, 360), Box(360, 360)), - Box(Box(361, 361), Box(361, 361)), - Box(Box(362, 362), Box(362, 362)), - Box(Box(363, 363), Box(363, 363)), - Box(Box(364, 364), Box(364, 364)), - Box(Box(365, 365), Box(365, 365)), - Box(Box(366, 366), Box(366, 366)), - Box(Box(367, 367), Box(367, 367)), - Box(Box(368, 368), Box(368, 368)), - Box(Box(369, 369), Box(369, 369)), - Box(Box(370, 370), Box(370, 370)), - Box(Box(371, 371), Box(371, 371)), - Box(Box(372, 372), Box(372, 372)), - Box(Box(373, 373), Box(373, 373)), - Box(Box(374, 374), Box(374, 374)), - Box(Box(375, 375), Box(375, 375)), - Box(Box(376, 376), Box(376, 376)), - Box(Box(377, 377), Box(377, 377)), - Box(Box(378, 378), Box(378, 378)), - Box(Box(379, 379), Box(379, 379)), - Box(Box(380, 380), Box(380, 380)), - Box(Box(381, 381), Box(381, 381)), - Box(Box(382, 382), Box(382, 382)), - Box(Box(383, 383), Box(383, 383)), - Box(Box(384, 384), Box(384, 384)), - Box(Box(385, 385), Box(385, 385)), - Box(Box(386, 386), Box(386, 386)), - Box(Box(387, 387), Box(387, 387)), - Box(Box(388, 388), Box(388, 388)), - Box(Box(389, 389), Box(389, 389)), - Box(Box(390, 390), Box(390, 390)), - Box(Box(391, 391), Box(391, 391)), - Box(Box(392, 392), Box(392, 392)), - Box(Box(393, 393), Box(393, 393)), - Box(Box(394, 394), Box(394, 394)), - Box(Box(395, 395), Box(395, 395)), - Box(Box(396, 396), Box(396, 396)), - Box(Box(397, 397), Box(397, 397)), - Box(Box(398, 398), Box(398, 398)), - Box(Box(399, 399), Box(399, 399)), - Box(Box(400, 400), Box(400, 400)), - Box(Box(401, 401), Box(401, 401)), - Box(Box(402, 402), Box(402, 402)), - Box(Box(403, 403), Box(403, 403)), - Box(Box(404, 404), Box(404, 404)), - Box(Box(405, 405), Box(405, 405)), - Box(Box(406, 406), Box(406, 406)), - Box(Box(407, 407), Box(407, 407)), - Box(Box(408, 408), Box(408, 408)), - Box(Box(409, 409), Box(409, 409)), - Box(Box(410, 410), Box(410, 410)), - Box(Box(411, 411), Box(411, 411)), - Box(Box(412, 412), Box(412, 412)), - Box(Box(413, 413), Box(413, 413)), - Box(Box(414, 414), Box(414, 414)), - Box(Box(415, 415), Box(415, 415)), - Box(Box(416, 416), Box(416, 416)), - Box(Box(417, 417), Box(417, 417)), - Box(Box(418, 418), Box(418, 418)), - Box(Box(419, 419), Box(419, 419)), - Box(Box(420, 420), Box(420, 420)), - Box(Box(421, 421), Box(421, 421)), - Box(Box(422, 422), Box(422, 422)), - Box(Box(423, 423), Box(423, 423)), - Box(Box(424, 424), Box(424, 424)), - Box(Box(425, 425), Box(425, 425)), - Box(Box(426, 426), Box(426, 426)), - Box(Box(427, 427), Box(427, 427)), - Box(Box(428, 428), Box(428, 428)), - Box(Box(429, 429), Box(429, 429)), - Box(Box(430, 430), Box(430, 430)), - Box(Box(431, 431), Box(431, 431)), - Box(Box(432, 432), Box(432, 432)), - Box(Box(433, 433), Box(433, 433)), - Box(Box(434, 434), Box(434, 434)), - Box(Box(435, 435), Box(435, 435)), - Box(Box(436, 436), Box(436, 436)), - Box(Box(437, 437), Box(437, 437)), - Box(Box(438, 438), Box(438, 438)), - Box(Box(439, 439), Box(439, 439)), - Box(Box(440, 440), Box(440, 440)), - Box(Box(441, 441), Box(441, 441)), - Box(Box(442, 442), Box(442, 442)), - Box(Box(443, 443), Box(443, 443)), - Box(Box(444, 444), Box(444, 444)), - Box(Box(445, 445), Box(445, 445)), - Box(Box(446, 446), Box(446, 446)), - Box(Box(447, 447), Box(447, 447)), - Box(Box(448, 448), Box(448, 448)), - Box(Box(449, 449), Box(449, 449)), - Box(Box(450, 450), Box(450, 450)), - Box(Box(451, 451), Box(451, 451)), - Box(Box(452, 452), Box(452, 452)), - Box(Box(453, 453), Box(453, 453)), - Box(Box(454, 454), Box(454, 454)), - Box(Box(455, 455), Box(455, 455)), - Box(Box(456, 456), Box(456, 456)), - Box(Box(457, 457), Box(457, 457)), - Box(Box(458, 458), Box(458, 458)), - Box(Box(459, 459), Box(459, 459)), - Box(Box(460, 460), Box(460, 460)), - Box(Box(461, 461), Box(461, 461)), - Box(Box(462, 462), Box(462, 462)), - Box(Box(463, 463), Box(463, 463)), - Box(Box(464, 464), Box(464, 464)), - Box(Box(465, 465), Box(465, 465)), - Box(Box(466, 466), Box(466, 466)), - Box(Box(467, 467), Box(467, 467)), - Box(Box(468, 468), Box(468, 468)), - Box(Box(469, 469), Box(469, 469)), - Box(Box(470, 470), Box(470, 470)), - Box(Box(471, 471), Box(471, 471)), - Box(Box(472, 472), Box(472, 472)), - Box(Box(473, 473), Box(473, 473)), - Box(Box(474, 474), Box(474, 474)), - Box(Box(475, 475), Box(475, 475)), - Box(Box(476, 476), Box(476, 476)), - Box(Box(477, 477), Box(477, 477)), - Box(Box(478, 478), Box(478, 478)), - Box(Box(479, 479), Box(479, 479)), - Box(Box(480, 480), Box(480, 480)), - Box(Box(481, 481), Box(481, 481)), - Box(Box(482, 482), Box(482, 482)), - Box(Box(483, 483), Box(483, 483)), - Box(Box(484, 484), Box(484, 484)), - Box(Box(485, 485), Box(485, 485)), - Box(Box(486, 486), Box(486, 486)), - Box(Box(487, 487), Box(487, 487)), - Box(Box(488, 488), Box(488, 488)), - Box(Box(489, 489), Box(489, 489)), - Box(Box(490, 490), Box(490, 490)), - Box(Box(491, 491), Box(491, 491)), - Box(Box(492, 492), Box(492, 492)), - Box(Box(493, 493), Box(493, 493)), - Box(Box(494, 494), Box(494, 494)), - Box(Box(495, 495), Box(495, 495)), - Box(Box(496, 496), Box(496, 496)), - Box(Box(497, 497), Box(497, 497)), - Box(Box(498, 498), Box(498, 498)), - Box(Box(499, 499), Box(499, 499)), - Box(Box(500, 500), Box(500, 500)), - Box(Box(501, 501), Box(501, 501)), - Box(Box(502, 502), Box(502, 502)), - Box(Box(503, 503), Box(503, 503)), - Box(Box(504, 504), Box(504, 504)), - Box(Box(505, 505), Box(505, 505)), - Box(Box(506, 506), Box(506, 506)), - Box(Box(507, 507), Box(507, 507)), - Box(Box(508, 508), Box(508, 508)), - Box(Box(509, 509), Box(509, 509)), - Box(Box(510, 510), Box(510, 510)), - Box(Box(511, 511), Box(511, 511)), - Box(Box(512, 512), Box(512, 512)), - Box(Box(513, 513), Box(513, 513)), - Box(Box(514, 514), Box(514, 514)), - Box(Box(515, 515), Box(515, 515)), - Box(Box(516, 516), Box(516, 516)), - Box(Box(517, 517), Box(517, 517)), - Box(Box(518, 518), Box(518, 518)), - Box(Box(519, 519), Box(519, 519)), - Box(Box(520, 520), Box(520, 520)), - Box(Box(521, 521), Box(521, 521)), - Box(Box(522, 522), Box(522, 522)), - Box(Box(523, 523), Box(523, 523)), - Box(Box(524, 524), Box(524, 524)), - Box(Box(525, 525), Box(525, 525)), - Box(Box(526, 526), Box(526, 526)), - Box(Box(527, 527), Box(527, 527)), - Box(Box(528, 528), Box(528, 528)), - Box(Box(529, 529), Box(529, 529)), - Box(Box(530, 530), Box(530, 530)), - Box(Box(531, 531), Box(531, 531)), - Box(Box(532, 532), Box(532, 532)), - Box(Box(533, 533), Box(533, 533)), - Box(Box(534, 534), Box(534, 534)), - Box(Box(535, 535), Box(535, 535)), - Box(Box(536, 536), Box(536, 536)), - Box(Box(537, 537), Box(537, 537)), - Box(Box(538, 538), Box(538, 538)), - Box(Box(539, 539), Box(539, 539)), - Box(Box(540, 540), Box(540, 540)), - Box(Box(541, 541), Box(541, 541)), - Box(Box(542, 542), Box(542, 542)), - Box(Box(543, 543), Box(543, 543)), - Box(Box(544, 544), Box(544, 544)), - Box(Box(545, 545), Box(545, 545)), - Box(Box(546, 546), Box(546, 546)), - Box(Box(547, 547), Box(547, 547)), - Box(Box(548, 548), Box(548, 548)), - Box(Box(549, 549), Box(549, 549)), - Box(Box(550, 550), Box(550, 550)), - Box(Box(551, 551), Box(551, 551)), - Box(Box(552, 552), Box(552, 552)), - Box(Box(553, 553), Box(553, 553)), - Box(Box(554, 554), Box(554, 554)), - Box(Box(555, 555), Box(555, 555)), - Box(Box(556, 556), Box(556, 556)), - Box(Box(557, 557), Box(557, 557)), - Box(Box(558, 558), Box(558, 558)), - Box(Box(559, 559), Box(559, 559)), - Box(Box(560, 560), Box(560, 560)), - Box(Box(561, 561), Box(561, 561)), - Box(Box(562, 562), Box(562, 562)), - Box(Box(563, 563), Box(563, 563)), - Box(Box(564, 564), Box(564, 564)), - Box(Box(565, 565), Box(565, 565)), - Box(Box(566, 566), Box(566, 566)), - Box(Box(567, 567), Box(567, 567)), - Box(Box(568, 568), Box(568, 568)), - Box(Box(569, 569), Box(569, 569)), - Box(Box(570, 570), Box(570, 570)), - Box(Box(571, 571), Box(571, 571)), - Box(Box(572, 572), Box(572, 572)), - Box(Box(573, 573), Box(573, 573)), - Box(Box(574, 574), Box(574, 574)), - Box(Box(575, 575), Box(575, 575)), - Box(Box(576, 576), Box(576, 576)), - Box(Box(577, 577), Box(577, 577)), - Box(Box(578, 578), Box(578, 578)), - Box(Box(579, 579), Box(579, 579)), - Box(Box(580, 580), Box(580, 580)), - Box(Box(581, 581), Box(581, 581)), - Box(Box(582, 582), Box(582, 582)), - Box(Box(583, 583), Box(583, 583)), - Box(Box(584, 584), Box(584, 584)), - Box(Box(585, 585), Box(585, 585)), - Box(Box(586, 586), Box(586, 586)), - Box(Box(587, 587), Box(587, 587)), - Box(Box(588, 588), Box(588, 588)), - Box(Box(589, 589), Box(589, 589)), - Box(Box(590, 590), Box(590, 590)), - Box(Box(591, 591), Box(591, 591)), - Box(Box(592, 592), Box(592, 592)), - Box(Box(593, 593), Box(593, 593)), - Box(Box(594, 594), Box(594, 594)), - Box(Box(595, 595), Box(595, 595)), - Box(Box(596, 596), Box(596, 596)), - Box(Box(597, 597), Box(597, 597)), - Box(Box(598, 598), Box(598, 598)), - Box(Box(599, 599), Box(599, 599)), - Box(Box(600, 600), Box(600, 600)), - Box(Box(601, 601), Box(601, 601)), - Box(Box(602, 602), Box(602, 602)), - Box(Box(603, 603), Box(603, 603)), - Box(Box(604, 604), Box(604, 604)), - Box(Box(605, 605), Box(605, 605)), - Box(Box(606, 606), Box(606, 606)), - Box(Box(607, 607), Box(607, 607)), - Box(Box(608, 608), Box(608, 608)), - Box(Box(609, 609), Box(609, 609)), - Box(Box(610, 610), Box(610, 610)), - Box(Box(611, 611), Box(611, 611)), - Box(Box(612, 612), Box(612, 612)), - Box(Box(613, 613), Box(613, 613)), - Box(Box(614, 614), Box(614, 614)), - Box(Box(615, 615), Box(615, 615)), - Box(Box(616, 616), Box(616, 616)), - Box(Box(617, 617), Box(617, 617)), - Box(Box(618, 618), Box(618, 618)), - Box(Box(619, 619), Box(619, 619)), - Box(Box(620, 620), Box(620, 620)), - Box(Box(621, 621), Box(621, 621)), - Box(Box(622, 622), Box(622, 622)), - Box(Box(623, 623), Box(623, 623)), - Box(Box(624, 624), Box(624, 624)), - Box(Box(625, 625), Box(625, 625)), - Box(Box(626, 626), Box(626, 626)), - Box(Box(627, 627), Box(627, 627)), - Box(Box(628, 628), Box(628, 628)), - Box(Box(629, 629), Box(629, 629)), - Box(Box(630, 630), Box(630, 630)), - Box(Box(631, 631), Box(631, 631)), - Box(Box(632, 632), Box(632, 632)), - Box(Box(633, 633), Box(633, 633)), - Box(Box(634, 634), Box(634, 634)), - Box(Box(635, 635), Box(635, 635)), - Box(Box(636, 636), Box(636, 636)), - Box(Box(637, 637), Box(637, 637)), - Box(Box(638, 638), Box(638, 638)), - Box(Box(639, 639), Box(639, 639)), - Box(Box(640, 640), Box(640, 640)), - Box(Box(641, 641), Box(641, 641)), - Box(Box(642, 642), Box(642, 642)), - Box(Box(643, 643), Box(643, 643)), - Box(Box(644, 644), Box(644, 644)), - Box(Box(645, 645), Box(645, 645)), - Box(Box(646, 646), Box(646, 646)), - Box(Box(647, 647), Box(647, 647)), - Box(Box(648, 648), Box(648, 648)), - Box(Box(649, 649), Box(649, 649)), - Box(Box(650, 650), Box(650, 650)), - Box(Box(651, 651), Box(651, 651)), - Box(Box(652, 652), Box(652, 652)), - Box(Box(653, 653), Box(653, 653)), - Box(Box(654, 654), Box(654, 654)), - Box(Box(655, 655), Box(655, 655)), - Box(Box(656, 656), Box(656, 656)), - Box(Box(657, 657), Box(657, 657)), - Box(Box(658, 658), Box(658, 658)), - Box(Box(659, 659), Box(659, 659)), - Box(Box(660, 660), Box(660, 660)), - Box(Box(661, 661), Box(661, 661)), - Box(Box(662, 662), Box(662, 662)), - Box(Box(663, 663), Box(663, 663)), - Box(Box(664, 664), Box(664, 664)), - Box(Box(665, 665), Box(665, 665)), - Box(Box(666, 666), Box(666, 666)), - Box(Box(667, 667), Box(667, 667)), - Box(Box(668, 668), Box(668, 668)), - Box(Box(669, 669), Box(669, 669)), - Box(Box(670, 670), Box(670, 670)), - Box(Box(671, 671), Box(671, 671)), - Box(Box(672, 672), Box(672, 672)), - Box(Box(673, 673), Box(673, 673)), - Box(Box(674, 674), Box(674, 674)), - Box(Box(675, 675), Box(675, 675)), - Box(Box(676, 676), Box(676, 676)), - Box(Box(677, 677), Box(677, 677)), - Box(Box(678, 678), Box(678, 678)), - Box(Box(679, 679), Box(679, 679)), - Box(Box(680, 680), Box(680, 680)), - Box(Box(681, 681), Box(681, 681)), - Box(Box(682, 682), Box(682, 682)), - Box(Box(683, 683), Box(683, 683)), - Box(Box(684, 684), Box(684, 684)), - Box(Box(685, 685), Box(685, 685)), - Box(Box(686, 686), Box(686, 686)), - Box(Box(687, 687), Box(687, 687)), - Box(Box(688, 688), Box(688, 688)), - Box(Box(689, 689), Box(689, 689)), - Box(Box(690, 690), Box(690, 690)), - Box(Box(691, 691), Box(691, 691)), - Box(Box(692, 692), Box(692, 692)), - Box(Box(693, 693), Box(693, 693)), - Box(Box(694, 694), Box(694, 694)), - Box(Box(695, 695), Box(695, 695)), - Box(Box(696, 696), Box(696, 696)), - Box(Box(697, 697), Box(697, 697)), - Box(Box(698, 698), Box(698, 698)), - Box(Box(699, 699), Box(699, 699)), - Box(Box(700, 700), Box(700, 700)), - Box(Box(701, 701), Box(701, 701)), - Box(Box(702, 702), Box(702, 702)), - Box(Box(703, 703), Box(703, 703)), - Box(Box(704, 704), Box(704, 704)), - Box(Box(705, 705), Box(705, 705)), - Box(Box(706, 706), Box(706, 706)), - Box(Box(707, 707), Box(707, 707)), - Box(Box(708, 708), Box(708, 708)), - Box(Box(709, 709), Box(709, 709)), - Box(Box(710, 710), Box(710, 710)), - Box(Box(711, 711), Box(711, 711)), - Box(Box(712, 712), Box(712, 712)), - Box(Box(713, 713), Box(713, 713)), - Box(Box(714, 714), Box(714, 714)), - Box(Box(715, 715), Box(715, 715)), - Box(Box(716, 716), Box(716, 716)), - Box(Box(717, 717), Box(717, 717)), - Box(Box(718, 718), Box(718, 718)), - Box(Box(719, 719), Box(719, 719)), - Box(Box(720, 720), Box(720, 720)), - Box(Box(721, 721), Box(721, 721)), - Box(Box(722, 722), Box(722, 722)), - Box(Box(723, 723), Box(723, 723)), - Box(Box(724, 724), Box(724, 724)), - Box(Box(725, 725), Box(725, 725)), - Box(Box(726, 726), Box(726, 726)), - Box(Box(727, 727), Box(727, 727)), - Box(Box(728, 728), Box(728, 728)), - Box(Box(729, 729), Box(729, 729)), - Box(Box(730, 730), Box(730, 730)), - Box(Box(731, 731), Box(731, 731)), - Box(Box(732, 732), Box(732, 732)), - Box(Box(733, 733), Box(733, 733)), - Box(Box(734, 734), Box(734, 734)), - Box(Box(735, 735), Box(735, 735)), - Box(Box(736, 736), Box(736, 736)), - Box(Box(737, 737), Box(737, 737)), - Box(Box(738, 738), Box(738, 738)), - Box(Box(739, 739), Box(739, 739)), - Box(Box(740, 740), Box(740, 740)), - Box(Box(741, 741), Box(741, 741)), - Box(Box(742, 742), Box(742, 742)), - Box(Box(743, 743), Box(743, 743)), - Box(Box(744, 744), Box(744, 744)), - Box(Box(745, 745), Box(745, 745)), - Box(Box(746, 746), Box(746, 746)), - Box(Box(747, 747), Box(747, 747)), - Box(Box(748, 748), Box(748, 748)), - Box(Box(749, 749), Box(749, 749)), - Box(Box(750, 750), Box(750, 750)), - Box(Box(751, 751), Box(751, 751)), - Box(Box(752, 752), Box(752, 752)), - Box(Box(753, 753), Box(753, 753)), - Box(Box(754, 754), Box(754, 754)), - Box(Box(755, 755), Box(755, 755)), - Box(Box(756, 756), Box(756, 756)), - Box(Box(757, 757), Box(757, 757)), - Box(Box(758, 758), Box(758, 758)), - Box(Box(759, 759), Box(759, 759)), - Box(Box(760, 760), Box(760, 760)), - Box(Box(761, 761), Box(761, 761)), - Box(Box(762, 762), Box(762, 762)), - Box(Box(763, 763), Box(763, 763)), - Box(Box(764, 764), Box(764, 764)), - Box(Box(765, 765), Box(765, 765)), - Box(Box(766, 766), Box(766, 766)), - Box(Box(767, 767), Box(767, 767)), - Box(Box(768, 768), Box(768, 768)), - Box(Box(769, 769), Box(769, 769)), - Box(Box(770, 770), Box(770, 770)), - Box(Box(771, 771), Box(771, 771)), - Box(Box(772, 772), Box(772, 772)), - Box(Box(773, 773), Box(773, 773)), - Box(Box(774, 774), Box(774, 774)), - Box(Box(775, 775), Box(775, 775)), - Box(Box(776, 776), Box(776, 776)), - Box(Box(777, 777), Box(777, 777)), - Box(Box(778, 778), Box(778, 778)), - Box(Box(779, 779), Box(779, 779)), - Box(Box(780, 780), Box(780, 780)), - Box(Box(781, 781), Box(781, 781)), - Box(Box(782, 782), Box(782, 782)), - Box(Box(783, 783), Box(783, 783)), - Box(Box(784, 784), Box(784, 784)), - Box(Box(785, 785), Box(785, 785)), - Box(Box(786, 786), Box(786, 786)), - Box(Box(787, 787), Box(787, 787)), - Box(Box(788, 788), Box(788, 788)), - Box(Box(789, 789), Box(789, 789)), - Box(Box(790, 790), Box(790, 790)), - Box(Box(791, 791), Box(791, 791)), - Box(Box(792, 792), Box(792, 792)), - Box(Box(793, 793), Box(793, 793)), - Box(Box(794, 794), Box(794, 794)), - Box(Box(795, 795), Box(795, 795)), - Box(Box(796, 796), Box(796, 796)), - Box(Box(797, 797), Box(797, 797)), - Box(Box(798, 798), Box(798, 798)), - Box(Box(799, 799), Box(799, 799)), - Box(Box(800, 800), Box(800, 800)), - Box(Box(801, 801), Box(801, 801)), - Box(Box(802, 802), Box(802, 802)), - Box(Box(803, 803), Box(803, 803)), - Box(Box(804, 804), Box(804, 804)), - Box(Box(805, 805), Box(805, 805)), - Box(Box(806, 806), Box(806, 806)), - Box(Box(807, 807), Box(807, 807)), - Box(Box(808, 808), Box(808, 808)), - Box(Box(809, 809), Box(809, 809)), - Box(Box(810, 810), Box(810, 810)), - Box(Box(811, 811), Box(811, 811)), - Box(Box(812, 812), Box(812, 812)), - Box(Box(813, 813), Box(813, 813)), - Box(Box(814, 814), Box(814, 814)), - Box(Box(815, 815), Box(815, 815)), - Box(Box(816, 816), Box(816, 816)), - Box(Box(817, 817), Box(817, 817)), - Box(Box(818, 818), Box(818, 818)), - Box(Box(819, 819), Box(819, 819)), - Box(Box(820, 820), Box(820, 820)), - Box(Box(821, 821), Box(821, 821)), - Box(Box(822, 822), Box(822, 822)), - Box(Box(823, 823), Box(823, 823)), - Box(Box(824, 824), Box(824, 824)), - Box(Box(825, 825), Box(825, 825)), - Box(Box(826, 826), Box(826, 826)), - Box(Box(827, 827), Box(827, 827)), - Box(Box(828, 828), Box(828, 828)), - Box(Box(829, 829), Box(829, 829)), - Box(Box(830, 830), Box(830, 830)), - Box(Box(831, 831), Box(831, 831)), - Box(Box(832, 832), Box(832, 832)), - Box(Box(833, 833), Box(833, 833)), - Box(Box(834, 834), Box(834, 834)), - Box(Box(835, 835), Box(835, 835)), - Box(Box(836, 836), Box(836, 836)), - Box(Box(837, 837), Box(837, 837)), - Box(Box(838, 838), Box(838, 838)), - Box(Box(839, 839), Box(839, 839)), - Box(Box(840, 840), Box(840, 840)), - Box(Box(841, 841), Box(841, 841)), - Box(Box(842, 842), Box(842, 842)), - Box(Box(843, 843), Box(843, 843)), - Box(Box(844, 844), Box(844, 844)), - Box(Box(845, 845), Box(845, 845)), - Box(Box(846, 846), Box(846, 846)), - Box(Box(847, 847), Box(847, 847)), - Box(Box(848, 848), Box(848, 848)), - Box(Box(849, 849), Box(849, 849)), - Box(Box(850, 850), Box(850, 850)), - Box(Box(851, 851), Box(851, 851)), - Box(Box(852, 852), Box(852, 852)), - Box(Box(853, 853), Box(853, 853)), - Box(Box(854, 854), Box(854, 854)), - Box(Box(855, 855), Box(855, 855)), - Box(Box(856, 856), Box(856, 856)), - Box(Box(857, 857), Box(857, 857)), - Box(Box(858, 858), Box(858, 858)), - Box(Box(859, 859), Box(859, 859)), - Box(Box(860, 860), Box(860, 860)), - Box(Box(861, 861), Box(861, 861)), - Box(Box(862, 862), Box(862, 862)), - Box(Box(863, 863), Box(863, 863)), - Box(Box(864, 864), Box(864, 864)), - Box(Box(865, 865), Box(865, 865)), - Box(Box(866, 866), Box(866, 866)), - Box(Box(867, 867), Box(867, 867)), - Box(Box(868, 868), Box(868, 868)), - Box(Box(869, 869), Box(869, 869)), - Box(Box(870, 870), Box(870, 870)), - Box(Box(871, 871), Box(871, 871)), - Box(Box(872, 872), Box(872, 872)), - Box(Box(873, 873), Box(873, 873)), - Box(Box(874, 874), Box(874, 874)), - Box(Box(875, 875), Box(875, 875)), - Box(Box(876, 876), Box(876, 876)), - Box(Box(877, 877), Box(877, 877)), - Box(Box(878, 878), Box(878, 878)), - Box(Box(879, 879), Box(879, 879)), - Box(Box(880, 880), Box(880, 880)), - Box(Box(881, 881), Box(881, 881)), - Box(Box(882, 882), Box(882, 882)), - Box(Box(883, 883), Box(883, 883)), - Box(Box(884, 884), Box(884, 884)), - Box(Box(885, 885), Box(885, 885)), - Box(Box(886, 886), Box(886, 886)), - Box(Box(887, 887), Box(887, 887)), - Box(Box(888, 888), Box(888, 888)), - Box(Box(889, 889), Box(889, 889)), - Box(Box(890, 890), Box(890, 890)), - Box(Box(891, 891), Box(891, 891)), - Box(Box(892, 892), Box(892, 892)), - Box(Box(893, 893), Box(893, 893)), - Box(Box(894, 894), Box(894, 894)), - Box(Box(895, 895), Box(895, 895)), - Box(Box(896, 896), Box(896, 896)), - Box(Box(897, 897), Box(897, 897)), - Box(Box(898, 898), Box(898, 898)), - Box(Box(899, 899), Box(899, 899)), - Box(Box(900, 900), Box(900, 900)), - Box(Box(901, 901), Box(901, 901)), - Box(Box(902, 902), Box(902, 902)), - Box(Box(903, 903), Box(903, 903)), - Box(Box(904, 904), Box(904, 904)), - Box(Box(905, 905), Box(905, 905)), - Box(Box(906, 906), Box(906, 906)), - Box(Box(907, 907), Box(907, 907)), - Box(Box(908, 908), Box(908, 908)), - Box(Box(909, 909), Box(909, 909)), - Box(Box(910, 910), Box(910, 910)), - Box(Box(911, 911), Box(911, 911)), - Box(Box(912, 912), Box(912, 912)), - Box(Box(913, 913), Box(913, 913)), - Box(Box(914, 914), Box(914, 914)), - Box(Box(915, 915), Box(915, 915)), - Box(Box(916, 916), Box(916, 916)), - Box(Box(917, 917), Box(917, 917)), - Box(Box(918, 918), Box(918, 918)), - Box(Box(919, 919), Box(919, 919)), - Box(Box(920, 920), Box(920, 920)), - Box(Box(921, 921), Box(921, 921)), - Box(Box(922, 922), Box(922, 922)), - Box(Box(923, 923), Box(923, 923)), - Box(Box(924, 924), Box(924, 924)), - Box(Box(925, 925), Box(925, 925)), - Box(Box(926, 926), Box(926, 926)), - Box(Box(927, 927), Box(927, 927)), - Box(Box(928, 928), Box(928, 928)), - Box(Box(929, 929), Box(929, 929)), - Box(Box(930, 930), Box(930, 930)), - Box(Box(931, 931), Box(931, 931)), - Box(Box(932, 932), Box(932, 932)), - Box(Box(933, 933), Box(933, 933)), - Box(Box(934, 934), Box(934, 934)), - Box(Box(935, 935), Box(935, 935)), - Box(Box(936, 936), Box(936, 936)), - Box(Box(937, 937), Box(937, 937)), - Box(Box(938, 938), Box(938, 938)), - Box(Box(939, 939), Box(939, 939)), - Box(Box(940, 940), Box(940, 940)), - Box(Box(941, 941), Box(941, 941)), - Box(Box(942, 942), Box(942, 942)), - Box(Box(943, 943), Box(943, 943)), - Box(Box(944, 944), Box(944, 944)), - Box(Box(945, 945), Box(945, 945)), - Box(Box(946, 946), Box(946, 946)), - Box(Box(947, 947), Box(947, 947)), - Box(Box(948, 948), Box(948, 948)), - Box(Box(949, 949), Box(949, 949)), - Box(Box(950, 950), Box(950, 950)), - Box(Box(951, 951), Box(951, 951)), - Box(Box(952, 952), Box(952, 952)), - Box(Box(953, 953), Box(953, 953)), - Box(Box(954, 954), Box(954, 954)), - Box(Box(955, 955), Box(955, 955)), - Box(Box(956, 956), Box(956, 956)), - Box(Box(957, 957), Box(957, 957)), - Box(Box(958, 958), Box(958, 958)), - Box(Box(959, 959), Box(959, 959)), - Box(Box(960, 960), Box(960, 960)), - Box(Box(961, 961), Box(961, 961)), - Box(Box(962, 962), Box(962, 962)), - Box(Box(963, 963), Box(963, 963)), - Box(Box(964, 964), Box(964, 964)), - Box(Box(965, 965), Box(965, 965)), - Box(Box(966, 966), Box(966, 966)), - Box(Box(967, 967), Box(967, 967)), - Box(Box(968, 968), Box(968, 968)), - Box(Box(969, 969), Box(969, 969)), - Box(Box(970, 970), Box(970, 970)), - Box(Box(971, 971), Box(971, 971)), - Box(Box(972, 972), Box(972, 972)), - Box(Box(973, 973), Box(973, 973)), - Box(Box(974, 974), Box(974, 974)), - Box(Box(975, 975), Box(975, 975)), - Box(Box(976, 976), Box(976, 976)), - Box(Box(977, 977), Box(977, 977)), - Box(Box(978, 978), Box(978, 978)), - Box(Box(979, 979), Box(979, 979)), - Box(Box(980, 980), Box(980, 980)), - Box(Box(981, 981), Box(981, 981)), - Box(Box(982, 982), Box(982, 982)), - Box(Box(983, 983), Box(983, 983)), - Box(Box(984, 984), Box(984, 984)), - Box(Box(985, 985), Box(985, 985)), - Box(Box(986, 986), Box(986, 986)), - Box(Box(987, 987), Box(987, 987)), - Box(Box(988, 988), Box(988, 988)), - Box(Box(989, 989), Box(989, 989)), - Box(Box(990, 990), Box(990, 990)), - Box(Box(991, 991), Box(991, 991)), - Box(Box(992, 992), Box(992, 992)), - Box(Box(993, 993), Box(993, 993)), - Box(Box(994, 994), Box(994, 994)), - Box(Box(995, 995), Box(995, 995)), - Box(Box(996, 996), Box(996, 996)), - Box(Box(997, 997), Box(997, 997)), - Box(Box(998, 998), Box(998, 998)), - Box(Box(999, 999), Box(999, 999)), - Box(Box(1000, 1000), Box(1000, 1000)), - Box(Box(1001, 1001), Box(1001, 1001)), - Box(Box(1002, 1002), Box(1002, 1002)), - Box(Box(1003, 1003), Box(1003, 1003)), - Box(Box(1004, 1004), Box(1004, 1004)), - Box(Box(1005, 1005), Box(1005, 1005)), - Box(Box(1006, 1006), Box(1006, 1006)), - Box(Box(1007, 1007), Box(1007, 1007)), - Box(Box(1008, 1008), Box(1008, 1008)), - Box(Box(1009, 1009), Box(1009, 1009)), - Box(Box(1010, 1010), Box(1010, 1010)), - Box(Box(1011, 1011), Box(1011, 1011)), - Box(Box(1012, 1012), Box(1012, 1012)), - Box(Box(1013, 1013), Box(1013, 1013)), - Box(Box(1014, 1014), Box(1014, 1014)), - Box(Box(1015, 1015), Box(1015, 1015)), - Box(Box(1016, 1016), Box(1016, 1016)), - Box(Box(1017, 1017), Box(1017, 1017)), - Box(Box(1018, 1018), Box(1018, 1018)), - Box(Box(1019, 1019), Box(1019, 1019)), - Box(Box(1020, 1020), Box(1020, 1020)), - Box(Box(1021, 1021), Box(1021, 1021)), - Box(Box(1022, 1022), Box(1022, 1022)), - Box(Box(1023, 1023), Box(1023, 1023)), - Box(Box(1024, 1024), Box(1024, 1024)), - Box(Box(1025, 1025), Box(1025, 1025)), - Box(Box(1026, 1026), Box(1026, 1026)), - Box(Box(1027, 1027), Box(1027, 1027)), - Box(Box(1028, 1028), Box(1028, 1028)), - Box(Box(1029, 1029), Box(1029, 1029)), - Box(Box(1030, 1030), Box(1030, 1030)), - Box(Box(1031, 1031), Box(1031, 1031)), - Box(Box(1032, 1032), Box(1032, 1032)), - Box(Box(1033, 1033), Box(1033, 1033)), - Box(Box(1034, 1034), Box(1034, 1034)), - Box(Box(1035, 1035), Box(1035, 1035)), - Box(Box(1036, 1036), Box(1036, 1036)), - Box(Box(1037, 1037), Box(1037, 1037)), - Box(Box(1038, 1038), Box(1038, 1038)), - Box(Box(1039, 1039), Box(1039, 1039)), - Box(Box(1040, 1040), Box(1040, 1040)), - Box(Box(1041, 1041), Box(1041, 1041)), - Box(Box(1042, 1042), Box(1042, 1042)), - Box(Box(1043, 1043), Box(1043, 1043)), - Box(Box(1044, 1044), Box(1044, 1044)), - Box(Box(1045, 1045), Box(1045, 1045)), - Box(Box(1046, 1046), Box(1046, 1046)), - Box(Box(1047, 1047), Box(1047, 1047)), - Box(Box(1048, 1048), Box(1048, 1048)), - Box(Box(1049, 1049), Box(1049, 1049)), - Box(Box(1050, 1050), Box(1050, 1050)), - Box(Box(1051, 1051), Box(1051, 1051)), - Box(Box(1052, 1052), Box(1052, 1052)), - Box(Box(1053, 1053), Box(1053, 1053)), - Box(Box(1054, 1054), Box(1054, 1054)), - Box(Box(1055, 1055), Box(1055, 1055)), - Box(Box(1056, 1056), Box(1056, 1056)), - Box(Box(1057, 1057), Box(1057, 1057)), - Box(Box(1058, 1058), Box(1058, 1058)), - Box(Box(1059, 1059), Box(1059, 1059)), - Box(Box(1060, 1060), Box(1060, 1060)), - Box(Box(1061, 1061), Box(1061, 1061)), - Box(Box(1062, 1062), Box(1062, 1062)), - Box(Box(1063, 1063), Box(1063, 1063)), - Box(Box(1064, 1064), Box(1064, 1064)), - Box(Box(1065, 1065), Box(1065, 1065)), - Box(Box(1066, 1066), Box(1066, 1066)), - Box(Box(1067, 1067), Box(1067, 1067)), - Box(Box(1068, 1068), Box(1068, 1068)), - Box(Box(1069, 1069), Box(1069, 1069)), - Box(Box(1070, 1070), Box(1070, 1070)), - Box(Box(1071, 1071), Box(1071, 1071)), - Box(Box(1072, 1072), Box(1072, 1072)), - Box(Box(1073, 1073), Box(1073, 1073)), - Box(Box(1074, 1074), Box(1074, 1074)), - Box(Box(1075, 1075), Box(1075, 1075)), - Box(Box(1076, 1076), Box(1076, 1076)), - Box(Box(1077, 1077), Box(1077, 1077)), - Box(Box(1078, 1078), Box(1078, 1078)), - Box(Box(1079, 1079), Box(1079, 1079)), - Box(Box(1080, 1080), Box(1080, 1080)), - Box(Box(1081, 1081), Box(1081, 1081)), - Box(Box(1082, 1082), Box(1082, 1082)), - Box(Box(1083, 1083), Box(1083, 1083)), - Box(Box(1084, 1084), Box(1084, 1084)), - Box(Box(1085, 1085), Box(1085, 1085)), - Box(Box(1086, 1086), Box(1086, 1086)), - Box(Box(1087, 1087), Box(1087, 1087)), - Box(Box(1088, 1088), Box(1088, 1088)), - Box(Box(1089, 1089), Box(1089, 1089)), - Box(Box(1090, 1090), Box(1090, 1090)), - Box(Box(1091, 1091), Box(1091, 1091)), - Box(Box(1092, 1092), Box(1092, 1092)), - Box(Box(1093, 1093), Box(1093, 1093)), - Box(Box(1094, 1094), Box(1094, 1094)), - Box(Box(1095, 1095), Box(1095, 1095)), - Box(Box(1096, 1096), Box(1096, 1096)), - Box(Box(1097, 1097), Box(1097, 1097)), - Box(Box(1098, 1098), Box(1098, 1098)), - Box(Box(1099, 1099), Box(1099, 1099)), - Box(Box(1100, 1100), Box(1100, 1100)), - Box(Box(1101, 1101), Box(1101, 1101)), - Box(Box(1102, 1102), Box(1102, 1102)), - Box(Box(1103, 1103), Box(1103, 1103)), - Box(Box(1104, 1104), Box(1104, 1104)), - Box(Box(1105, 1105), Box(1105, 1105)), - Box(Box(1106, 1106), Box(1106, 1106)), - Box(Box(1107, 1107), Box(1107, 1107)), - Box(Box(1108, 1108), Box(1108, 1108)), - Box(Box(1109, 1109), Box(1109, 1109)), - Box(Box(1110, 1110), Box(1110, 1110)), - Box(Box(1111, 1111), Box(1111, 1111)), - Box(Box(1112, 1112), Box(1112, 1112)), - Box(Box(1113, 1113), Box(1113, 1113)), - Box(Box(1114, 1114), Box(1114, 1114)), - Box(Box(1115, 1115), Box(1115, 1115)), - Box(Box(1116, 1116), Box(1116, 1116)), - Box(Box(1117, 1117), Box(1117, 1117)), - Box(Box(1118, 1118), Box(1118, 1118)), - Box(Box(1119, 1119), Box(1119, 1119)), - Box(Box(1120, 1120), Box(1120, 1120)), - Box(Box(1121, 1121), Box(1121, 1121)), - Box(Box(1122, 1122), Box(1122, 1122)), - Box(Box(1123, 1123), Box(1123, 1123)), - Box(Box(1124, 1124), Box(1124, 1124)), - Box(Box(1125, 1125), Box(1125, 1125)), - Box(Box(1126, 1126), Box(1126, 1126)), - Box(Box(1127, 1127), Box(1127, 1127)), - Box(Box(1128, 1128), Box(1128, 1128)), - Box(Box(1129, 1129), Box(1129, 1129)), - Box(Box(1130, 1130), Box(1130, 1130)), - Box(Box(1131, 1131), Box(1131, 1131)), - Box(Box(1132, 1132), Box(1132, 1132)), - Box(Box(1133, 1133), Box(1133, 1133)), - Box(Box(1134, 1134), Box(1134, 1134)), - Box(Box(1135, 1135), Box(1135, 1135)), - Box(Box(1136, 1136), Box(1136, 1136)), - Box(Box(1137, 1137), Box(1137, 1137)), - Box(Box(1138, 1138), Box(1138, 1138)), - Box(Box(1139, 1139), Box(1139, 1139)), - Box(Box(1140, 1140), Box(1140, 1140)), - Box(Box(1141, 1141), Box(1141, 1141)), - Box(Box(1142, 1142), Box(1142, 1142)), - Box(Box(1143, 1143), Box(1143, 1143)), - Box(Box(1144, 1144), Box(1144, 1144)), - Box(Box(1145, 1145), Box(1145, 1145)), - Box(Box(1146, 1146), Box(1146, 1146)), - Box(Box(1147, 1147), Box(1147, 1147)), - Box(Box(1148, 1148), Box(1148, 1148)), - Box(Box(1149, 1149), Box(1149, 1149)), - Box(Box(1150, 1150), Box(1150, 1150)), - Box(Box(1151, 1151), Box(1151, 1151)), - Box(Box(1152, 1152), Box(1152, 1152)), - Box(Box(1153, 1153), Box(1153, 1153)), - Box(Box(1154, 1154), Box(1154, 1154)), - Box(Box(1155, 1155), Box(1155, 1155)), - Box(Box(1156, 1156), Box(1156, 1156)), - Box(Box(1157, 1157), Box(1157, 1157)), - Box(Box(1158, 1158), Box(1158, 1158)), - Box(Box(1159, 1159), Box(1159, 1159)), - Box(Box(1160, 1160), Box(1160, 1160)), - Box(Box(1161, 1161), Box(1161, 1161)), - Box(Box(1162, 1162), Box(1162, 1162)), - Box(Box(1163, 1163), Box(1163, 1163)), - Box(Box(1164, 1164), Box(1164, 1164)), - Box(Box(1165, 1165), Box(1165, 1165)), - Box(Box(1166, 1166), Box(1166, 1166)), - Box(Box(1167, 1167), Box(1167, 1167)), - Box(Box(1168, 1168), Box(1168, 1168)), - Box(Box(1169, 1169), Box(1169, 1169)), - Box(Box(1170, 1170), Box(1170, 1170)), - Box(Box(1171, 1171), Box(1171, 1171)), - Box(Box(1172, 1172), Box(1172, 1172)), - Box(Box(1173, 1173), Box(1173, 1173)), - Box(Box(1174, 1174), Box(1174, 1174)), - Box(Box(1175, 1175), Box(1175, 1175)), - Box(Box(1176, 1176), Box(1176, 1176)), - Box(Box(1177, 1177), Box(1177, 1177)), - Box(Box(1178, 1178), Box(1178, 1178)), - Box(Box(1179, 1179), Box(1179, 1179)), - Box(Box(1180, 1180), Box(1180, 1180)), - Box(Box(1181, 1181), Box(1181, 1181)), - Box(Box(1182, 1182), Box(1182, 1182)), - Box(Box(1183, 1183), Box(1183, 1183)), - Box(Box(1184, 1184), Box(1184, 1184)), - Box(Box(1185, 1185), Box(1185, 1185)), - Box(Box(1186, 1186), Box(1186, 1186)), - Box(Box(1187, 1187), Box(1187, 1187)), - Box(Box(1188, 1188), Box(1188, 1188)), - Box(Box(1189, 1189), Box(1189, 1189)), - Box(Box(1190, 1190), Box(1190, 1190)), - Box(Box(1191, 1191), Box(1191, 1191)), - Box(Box(1192, 1192), Box(1192, 1192)), - Box(Box(1193, 1193), Box(1193, 1193)), - Box(Box(1194, 1194), Box(1194, 1194)), - Box(Box(1195, 1195), Box(1195, 1195)), - Box(Box(1196, 1196), Box(1196, 1196)), - Box(Box(1197, 1197), Box(1197, 1197)), - Box(Box(1198, 1198), Box(1198, 1198)), - Box(Box(1199, 1199), Box(1199, 1199)), - Box(Box(1200, 1200), Box(1200, 1200)), - Box(Box(1201, 1201), Box(1201, 1201)), - Box(Box(1202, 1202), Box(1202, 1202)), - Box(Box(1203, 1203), Box(1203, 1203)), - Box(Box(1204, 1204), Box(1204, 1204)), - Box(Box(1205, 1205), Box(1205, 1205)), - Box(Box(1206, 1206), Box(1206, 1206)), - Box(Box(1207, 1207), Box(1207, 1207)), - Box(Box(1208, 1208), Box(1208, 1208)), - Box(Box(1209, 1209), Box(1209, 1209)), - Box(Box(1210, 1210), Box(1210, 1210)), - Box(Box(1211, 1211), Box(1211, 1211)), - Box(Box(1212, 1212), Box(1212, 1212)), - Box(Box(1213, 1213), Box(1213, 1213)), - Box(Box(1214, 1214), Box(1214, 1214)), - Box(Box(1215, 1215), Box(1215, 1215)), - Box(Box(1216, 1216), Box(1216, 1216)), - Box(Box(1217, 1217), Box(1217, 1217)), - Box(Box(1218, 1218), Box(1218, 1218)), - Box(Box(1219, 1219), Box(1219, 1219)), - Box(Box(1220, 1220), Box(1220, 1220)), - Box(Box(1221, 1221), Box(1221, 1221)), - Box(Box(1222, 1222), Box(1222, 1222)), - Box(Box(1223, 1223), Box(1223, 1223)), - Box(Box(1224, 1224), Box(1224, 1224)), - Box(Box(1225, 1225), Box(1225, 1225)), - Box(Box(1226, 1226), Box(1226, 1226)), - Box(Box(1227, 1227), Box(1227, 1227)), - Box(Box(1228, 1228), Box(1228, 1228)), - Box(Box(1229, 1229), Box(1229, 1229)), - Box(Box(1230, 1230), Box(1230, 1230)), - Box(Box(1231, 1231), Box(1231, 1231)), - Box(Box(1232, 1232), Box(1232, 1232)), - Box(Box(1233, 1233), Box(1233, 1233)), - Box(Box(1234, 1234), Box(1234, 1234)), - Box(Box(1235, 1235), Box(1235, 1235)), - Box(Box(1236, 1236), Box(1236, 1236)), - Box(Box(1237, 1237), Box(1237, 1237)), - Box(Box(1238, 1238), Box(1238, 1238)), - Box(Box(1239, 1239), Box(1239, 1239)), - Box(Box(1240, 1240), Box(1240, 1240)), - Box(Box(1241, 1241), Box(1241, 1241)), - Box(Box(1242, 1242), Box(1242, 1242)), - Box(Box(1243, 1243), Box(1243, 1243)), - Box(Box(1244, 1244), Box(1244, 1244)), - Box(Box(1245, 1245), Box(1245, 1245)), - Box(Box(1246, 1246), Box(1246, 1246)), - Box(Box(1247, 1247), Box(1247, 1247)), - Box(Box(1248, 1248), Box(1248, 1248)), - Box(Box(1249, 1249), Box(1249, 1249)), - Box(Box(1250, 1250), Box(1250, 1250)), - Box(Box(1251, 1251), Box(1251, 1251)), - Box(Box(1252, 1252), Box(1252, 1252)), - Box(Box(1253, 1253), Box(1253, 1253)), - Box(Box(1254, 1254), Box(1254, 1254)), - Box(Box(1255, 1255), Box(1255, 1255)), - Box(Box(1256, 1256), Box(1256, 1256)), - Box(Box(1257, 1257), Box(1257, 1257)), - Box(Box(1258, 1258), Box(1258, 1258)), - Box(Box(1259, 1259), Box(1259, 1259)), - Box(Box(1260, 1260), Box(1260, 1260)), - Box(Box(1261, 1261), Box(1261, 1261)), - Box(Box(1262, 1262), Box(1262, 1262)), - Box(Box(1263, 1263), Box(1263, 1263)), - Box(Box(1264, 1264), Box(1264, 1264)), - Box(Box(1265, 1265), Box(1265, 1265)), - Box(Box(1266, 1266), Box(1266, 1266)), - Box(Box(1267, 1267), Box(1267, 1267)), - Box(Box(1268, 1268), Box(1268, 1268)), - Box(Box(1269, 1269), Box(1269, 1269)), - Box(Box(1270, 1270), Box(1270, 1270)), - Box(Box(1271, 1271), Box(1271, 1271)), - Box(Box(1272, 1272), Box(1272, 1272)), - Box(Box(1273, 1273), Box(1273, 1273)), - Box(Box(1274, 1274), Box(1274, 1274)), - Box(Box(1275, 1275), Box(1275, 1275)), - Box(Box(1276, 1276), Box(1276, 1276)), - Box(Box(1277, 1277), Box(1277, 1277)), - Box(Box(1278, 1278), Box(1278, 1278)), - Box(Box(1279, 1279), Box(1279, 1279)), - Box(Box(1280, 1280), Box(1280, 1280)), - Box(Box(1281, 1281), Box(1281, 1281)), - Box(Box(1282, 1282), Box(1282, 1282)), - Box(Box(1283, 1283), Box(1283, 1283)), - Box(Box(1284, 1284), Box(1284, 1284)), - Box(Box(1285, 1285), Box(1285, 1285)), - Box(Box(1286, 1286), Box(1286, 1286)), - Box(Box(1287, 1287), Box(1287, 1287)), - Box(Box(1288, 1288), Box(1288, 1288)), - Box(Box(1289, 1289), Box(1289, 1289)), - Box(Box(1290, 1290), Box(1290, 1290)), - Box(Box(1291, 1291), Box(1291, 1291)), - Box(Box(1292, 1292), Box(1292, 1292)), - Box(Box(1293, 1293), Box(1293, 1293)), - Box(Box(1294, 1294), Box(1294, 1294)), - Box(Box(1295, 1295), Box(1295, 1295)), - Box(Box(1296, 1296), Box(1296, 1296)), - Box(Box(1297, 1297), Box(1297, 1297)), - Box(Box(1298, 1298), Box(1298, 1298)), - Box(Box(1299, 1299), Box(1299, 1299)), - Box(Box(1300, 1300), Box(1300, 1300)), - Box(Box(1301, 1301), Box(1301, 1301)), - Box(Box(1302, 1302), Box(1302, 1302)), - Box(Box(1303, 1303), Box(1303, 1303)), - Box(Box(1304, 1304), Box(1304, 1304)), - Box(Box(1305, 1305), Box(1305, 1305)), - Box(Box(1306, 1306), Box(1306, 1306)), - Box(Box(1307, 1307), Box(1307, 1307)), - Box(Box(1308, 1308), Box(1308, 1308)), - Box(Box(1309, 1309), Box(1309, 1309)), - Box(Box(1310, 1310), Box(1310, 1310)), - Box(Box(1311, 1311), Box(1311, 1311)), - Box(Box(1312, 1312), Box(1312, 1312)), - Box(Box(1313, 1313), Box(1313, 1313)), - Box(Box(1314, 1314), Box(1314, 1314)), - Box(Box(1315, 1315), Box(1315, 1315)), - Box(Box(1316, 1316), Box(1316, 1316)), - Box(Box(1317, 1317), Box(1317, 1317)), - Box(Box(1318, 1318), Box(1318, 1318)), - Box(Box(1319, 1319), Box(1319, 1319)), - Box(Box(1320, 1320), Box(1320, 1320)), - Box(Box(1321, 1321), Box(1321, 1321)), - Box(Box(1322, 1322), Box(1322, 1322)), - Box(Box(1323, 1323), Box(1323, 1323)), - Box(Box(1324, 1324), Box(1324, 1324)), - Box(Box(1325, 1325), Box(1325, 1325)), - Box(Box(1326, 1326), Box(1326, 1326)), - Box(Box(1327, 1327), Box(1327, 1327)), - Box(Box(1328, 1328), Box(1328, 1328)), - Box(Box(1329, 1329), Box(1329, 1329)), - Box(Box(1330, 1330), Box(1330, 1330)), - Box(Box(1331, 1331), Box(1331, 1331)), - Box(Box(1332, 1332), Box(1332, 1332)), - Box(Box(1333, 1333), Box(1333, 1333)), - Box(Box(1334, 1334), Box(1334, 1334)), - Box(Box(1335, 1335), Box(1335, 1335)), - Box(Box(1336, 1336), Box(1336, 1336)), - Box(Box(1337, 1337), Box(1337, 1337)), - Box(Box(1338, 1338), Box(1338, 1338)), - Box(Box(1339, 1339), Box(1339, 1339)), - Box(Box(1340, 1340), Box(1340, 1340)), - Box(Box(1341, 1341), Box(1341, 1341)), - Box(Box(1342, 1342), Box(1342, 1342)), - Box(Box(1343, 1343), Box(1343, 1343)), - Box(Box(1344, 1344), Box(1344, 1344)), - Box(Box(1345, 1345), Box(1345, 1345)), - Box(Box(1346, 1346), Box(1346, 1346)), - Box(Box(1347, 1347), Box(1347, 1347)), - Box(Box(1348, 1348), Box(1348, 1348)), - Box(Box(1349, 1349), Box(1349, 1349)), - Box(Box(1350, 1350), Box(1350, 1350)), - Box(Box(1351, 1351), Box(1351, 1351)), - Box(Box(1352, 1352), Box(1352, 1352)), - Box(Box(1353, 1353), Box(1353, 1353)), - Box(Box(1354, 1354), Box(1354, 1354)), - Box(Box(1355, 1355), Box(1355, 1355)), - Box(Box(1356, 1356), Box(1356, 1356)), - Box(Box(1357, 1357), Box(1357, 1357)), - Box(Box(1358, 1358), Box(1358, 1358)), - Box(Box(1359, 1359), Box(1359, 1359)), - Box(Box(1360, 1360), Box(1360, 1360)), - Box(Box(1361, 1361), Box(1361, 1361)), - Box(Box(1362, 1362), Box(1362, 1362)), - Box(Box(1363, 1363), Box(1363, 1363)), - Box(Box(1364, 1364), Box(1364, 1364)), - Box(Box(1365, 1365), Box(1365, 1365)), - Box(Box(1366, 1366), Box(1366, 1366)), - Box(Box(1367, 1367), Box(1367, 1367)), - Box(Box(1368, 1368), Box(1368, 1368)), - Box(Box(1369, 1369), Box(1369, 1369)), - Box(Box(1370, 1370), Box(1370, 1370)), - Box(Box(1371, 1371), Box(1371, 1371)), - Box(Box(1372, 1372), Box(1372, 1372)), - Box(Box(1373, 1373), Box(1373, 1373)), - Box(Box(1374, 1374), Box(1374, 1374)), - Box(Box(1375, 1375), Box(1375, 1375)), - Box(Box(1376, 1376), Box(1376, 1376)), - Box(Box(1377, 1377), Box(1377, 1377)), - Box(Box(1378, 1378), Box(1378, 1378)), - Box(Box(1379, 1379), Box(1379, 1379)), - Box(Box(1380, 1380), Box(1380, 1380)), - Box(Box(1381, 1381), Box(1381, 1381)), - Box(Box(1382, 1382), Box(1382, 1382)), - Box(Box(1383, 1383), Box(1383, 1383)), - Box(Box(1384, 1384), Box(1384, 1384)), - Box(Box(1385, 1385), Box(1385, 1385)), - Box(Box(1386, 1386), Box(1386, 1386)), - Box(Box(1387, 1387), Box(1387, 1387)), - Box(Box(1388, 1388), Box(1388, 1388)), - Box(Box(1389, 1389), Box(1389, 1389)), - Box(Box(1390, 1390), Box(1390, 1390)), - Box(Box(1391, 1391), Box(1391, 1391)), - Box(Box(1392, 1392), Box(1392, 1392)), - Box(Box(1393, 1393), Box(1393, 1393)), - Box(Box(1394, 1394), Box(1394, 1394)), - Box(Box(1395, 1395), Box(1395, 1395)), - Box(Box(1396, 1396), Box(1396, 1396)), - Box(Box(1397, 1397), Box(1397, 1397)), - Box(Box(1398, 1398), Box(1398, 1398)), - Box(Box(1399, 1399), Box(1399, 1399)), - Box(Box(1400, 1400), Box(1400, 1400)), - Box(Box(1401, 1401), Box(1401, 1401)), - Box(Box(1402, 1402), Box(1402, 1402)), - Box(Box(1403, 1403), Box(1403, 1403)), - Box(Box(1404, 1404), Box(1404, 1404)), - Box(Box(1405, 1405), Box(1405, 1405)), - Box(Box(1406, 1406), Box(1406, 1406)), - Box(Box(1407, 1407), Box(1407, 1407)), - Box(Box(1408, 1408), Box(1408, 1408)), - Box(Box(1409, 1409), Box(1409, 1409)), - Box(Box(1410, 1410), Box(1410, 1410)), - Box(Box(1411, 1411), Box(1411, 1411)), - Box(Box(1412, 1412), Box(1412, 1412)), - Box(Box(1413, 1413), Box(1413, 1413)), - Box(Box(1414, 1414), Box(1414, 1414)), - Box(Box(1415, 1415), Box(1415, 1415)), - Box(Box(1416, 1416), Box(1416, 1416)), - Box(Box(1417, 1417), Box(1417, 1417)), - Box(Box(1418, 1418), Box(1418, 1418)), - Box(Box(1419, 1419), Box(1419, 1419)), - Box(Box(1420, 1420), Box(1420, 1420)), - Box(Box(1421, 1421), Box(1421, 1421)), - Box(Box(1422, 1422), Box(1422, 1422)), - Box(Box(1423, 1423), Box(1423, 1423)), - Box(Box(1424, 1424), Box(1424, 1424)), - Box(Box(1425, 1425), Box(1425, 1425)), - Box(Box(1426, 1426), Box(1426, 1426)), - Box(Box(1427, 1427), Box(1427, 1427)), - Box(Box(1428, 1428), Box(1428, 1428)), - Box(Box(1429, 1429), Box(1429, 1429)), - Box(Box(1430, 1430), Box(1430, 1430)), - Box(Box(1431, 1431), Box(1431, 1431)), - Box(Box(1432, 1432), Box(1432, 1432)), - Box(Box(1433, 1433), Box(1433, 1433)), - Box(Box(1434, 1434), Box(1434, 1434)), - Box(Box(1435, 1435), Box(1435, 1435)), - Box(Box(1436, 1436), Box(1436, 1436)), - Box(Box(1437, 1437), Box(1437, 1437)), - Box(Box(1438, 1438), Box(1438, 1438)), - Box(Box(1439, 1439), Box(1439, 1439)), - Box(Box(1440, 1440), Box(1440, 1440)), - Box(Box(1441, 1441), Box(1441, 1441)), - Box(Box(1442, 1442), Box(1442, 1442)), - Box(Box(1443, 1443), Box(1443, 1443)), - Box(Box(1444, 1444), Box(1444, 1444)), - Box(Box(1445, 1445), Box(1445, 1445)), - Box(Box(1446, 1446), Box(1446, 1446)), - Box(Box(1447, 1447), Box(1447, 1447)), - Box(Box(1448, 1448), Box(1448, 1448)), - Box(Box(1449, 1449), Box(1449, 1449)), - Box(Box(1450, 1450), Box(1450, 1450)), - Box(Box(1451, 1451), Box(1451, 1451)), - Box(Box(1452, 1452), Box(1452, 1452)), - Box(Box(1453, 1453), Box(1453, 1453)), - Box(Box(1454, 1454), Box(1454, 1454)), - Box(Box(1455, 1455), Box(1455, 1455)), - Box(Box(1456, 1456), Box(1456, 1456)), - Box(Box(1457, 1457), Box(1457, 1457)), - Box(Box(1458, 1458), Box(1458, 1458)), - Box(Box(1459, 1459), Box(1459, 1459)), - Box(Box(1460, 1460), Box(1460, 1460)), - Box(Box(1461, 1461), Box(1461, 1461)), - Box(Box(1462, 1462), Box(1462, 1462)), - Box(Box(1463, 1463), Box(1463, 1463)), - Box(Box(1464, 1464), Box(1464, 1464)), - Box(Box(1465, 1465), Box(1465, 1465)), - Box(Box(1466, 1466), Box(1466, 1466)), - Box(Box(1467, 1467), Box(1467, 1467)), - Box(Box(1468, 1468), Box(1468, 1468)), - Box(Box(1469, 1469), Box(1469, 1469)), - Box(Box(1470, 1470), Box(1470, 1470)), - Box(Box(1471, 1471), Box(1471, 1471)), - Box(Box(1472, 1472), Box(1472, 1472)), - Box(Box(1473, 1473), Box(1473, 1473)), - Box(Box(1474, 1474), Box(1474, 1474)), - Box(Box(1475, 1475), Box(1475, 1475)), - Box(Box(1476, 1476), Box(1476, 1476)), - Box(Box(1477, 1477), Box(1477, 1477)), - Box(Box(1478, 1478), Box(1478, 1478)), - Box(Box(1479, 1479), Box(1479, 1479)), - Box(Box(1480, 1480), Box(1480, 1480)), - Box(Box(1481, 1481), Box(1481, 1481)), - Box(Box(1482, 1482), Box(1482, 1482)), - Box(Box(1483, 1483), Box(1483, 1483)), - Box(Box(1484, 1484), Box(1484, 1484)), - Box(Box(1485, 1485), Box(1485, 1485)), - Box(Box(1486, 1486), Box(1486, 1486)), - Box(Box(1487, 1487), Box(1487, 1487)), - Box(Box(1488, 1488), Box(1488, 1488)), - Box(Box(1489, 1489), Box(1489, 1489)), - Box(Box(1490, 1490), Box(1490, 1490)), - Box(Box(1491, 1491), Box(1491, 1491)), - Box(Box(1492, 1492), Box(1492, 1492)), - Box(Box(1493, 1493), Box(1493, 1493)), - Box(Box(1494, 1494), Box(1494, 1494)), - Box(Box(1495, 1495), Box(1495, 1495)), - Box(Box(1496, 1496), Box(1496, 1496)), - Box(Box(1497, 1497), Box(1497, 1497)), - Box(Box(1498, 1498), Box(1498, 1498)), - Box(Box(1499, 1499), Box(1499, 1499)), - Box(Box(1500, 1500), Box(1500, 1500)), - Box(Box(1501, 1501), Box(1501, 1501)), - Box(Box(1502, 1502), Box(1502, 1502)), - Box(Box(1503, 1503), Box(1503, 1503)), - Box(Box(1504, 1504), Box(1504, 1504)), - Box(Box(1505, 1505), Box(1505, 1505)), - Box(Box(1506, 1506), Box(1506, 1506)), - Box(Box(1507, 1507), Box(1507, 1507)), - Box(Box(1508, 1508), Box(1508, 1508)), - Box(Box(1509, 1509), Box(1509, 1509)), - Box(Box(1510, 1510), Box(1510, 1510)), - Box(Box(1511, 1511), Box(1511, 1511)), - Box(Box(1512, 1512), Box(1512, 1512)), - Box(Box(1513, 1513), Box(1513, 1513)), - Box(Box(1514, 1514), Box(1514, 1514)), - Box(Box(1515, 1515), Box(1515, 1515)), - Box(Box(1516, 1516), Box(1516, 1516)), - Box(Box(1517, 1517), Box(1517, 1517)), - Box(Box(1518, 1518), Box(1518, 1518)), - Box(Box(1519, 1519), Box(1519, 1519)), - Box(Box(1520, 1520), Box(1520, 1520)), - Box(Box(1521, 1521), Box(1521, 1521)), - Box(Box(1522, 1522), Box(1522, 1522)), - Box(Box(1523, 1523), Box(1523, 1523)), - Box(Box(1524, 1524), Box(1524, 1524)), - Box(Box(1525, 1525), Box(1525, 1525)), - Box(Box(1526, 1526), Box(1526, 1526)), - Box(Box(1527, 1527), Box(1527, 1527)), - Box(Box(1528, 1528), Box(1528, 1528)), - Box(Box(1529, 1529), Box(1529, 1529)), - Box(Box(1530, 1530), Box(1530, 1530)), - Box(Box(1531, 1531), Box(1531, 1531)), - Box(Box(1532, 1532), Box(1532, 1532)), - Box(Box(1533, 1533), Box(1533, 1533)), - Box(Box(1534, 1534), Box(1534, 1534)), - Box(Box(1535, 1535), Box(1535, 1535)), - Box(Box(1536, 1536), Box(1536, 1536)), - Box(Box(1537, 1537), Box(1537, 1537)), - Box(Box(1538, 1538), Box(1538, 1538)), - Box(Box(1539, 1539), Box(1539, 1539)), - Box(Box(1540, 1540), Box(1540, 1540)), - Box(Box(1541, 1541), Box(1541, 1541)), - Box(Box(1542, 1542), Box(1542, 1542)), - Box(Box(1543, 1543), Box(1543, 1543)), - Box(Box(1544, 1544), Box(1544, 1544)), - Box(Box(1545, 1545), Box(1545, 1545)), - Box(Box(1546, 1546), Box(1546, 1546)), - Box(Box(1547, 1547), Box(1547, 1547)), - Box(Box(1548, 1548), Box(1548, 1548)), - Box(Box(1549, 1549), Box(1549, 1549)), - Box(Box(1550, 1550), Box(1550, 1550)), - Box(Box(1551, 1551), Box(1551, 1551)), - Box(Box(1552, 1552), Box(1552, 1552)), - Box(Box(1553, 1553), Box(1553, 1553)), - Box(Box(1554, 1554), Box(1554, 1554)), - Box(Box(1555, 1555), Box(1555, 1555)), - Box(Box(1556, 1556), Box(1556, 1556)), - Box(Box(1557, 1557), Box(1557, 1557)), - Box(Box(1558, 1558), Box(1558, 1558)), - Box(Box(1559, 1559), Box(1559, 1559)), - Box(Box(1560, 1560), Box(1560, 1560)), - Box(Box(1561, 1561), Box(1561, 1561)), - Box(Box(1562, 1562), Box(1562, 1562)), - Box(Box(1563, 1563), Box(1563, 1563)), - Box(Box(1564, 1564), Box(1564, 1564)), - Box(Box(1565, 1565), Box(1565, 1565)), - Box(Box(1566, 1566), Box(1566, 1566)), - Box(Box(1567, 1567), Box(1567, 1567)), - Box(Box(1568, 1568), Box(1568, 1568)), - Box(Box(1569, 1569), Box(1569, 1569)), - Box(Box(1570, 1570), Box(1570, 1570)), - Box(Box(1571, 1571), Box(1571, 1571)), - Box(Box(1572, 1572), Box(1572, 1572)), - Box(Box(1573, 1573), Box(1573, 1573)), - Box(Box(1574, 1574), Box(1574, 1574)), - Box(Box(1575, 1575), Box(1575, 1575)), - Box(Box(1576, 1576), Box(1576, 1576)), - Box(Box(1577, 1577), Box(1577, 1577)), - Box(Box(1578, 1578), Box(1578, 1578)), - Box(Box(1579, 1579), Box(1579, 1579)), - Box(Box(1580, 1580), Box(1580, 1580)), - Box(Box(1581, 1581), Box(1581, 1581)), - Box(Box(1582, 1582), Box(1582, 1582)), - Box(Box(1583, 1583), Box(1583, 1583)), - Box(Box(1584, 1584), Box(1584, 1584)), - Box(Box(1585, 1585), Box(1585, 1585)), - Box(Box(1586, 1586), Box(1586, 1586)), - Box(Box(1587, 1587), Box(1587, 1587)), - Box(Box(1588, 1588), Box(1588, 1588)), - Box(Box(1589, 1589), Box(1589, 1589)), - Box(Box(1590, 1590), Box(1590, 1590)), - Box(Box(1591, 1591), Box(1591, 1591)), - Box(Box(1592, 1592), Box(1592, 1592)), - Box(Box(1593, 1593), Box(1593, 1593)), - Box(Box(1594, 1594), Box(1594, 1594)), - Box(Box(1595, 1595), Box(1595, 1595)), - Box(Box(1596, 1596), Box(1596, 1596)), - Box(Box(1597, 1597), Box(1597, 1597)), - Box(Box(1598, 1598), Box(1598, 1598)), - Box(Box(1599, 1599), Box(1599, 1599)), - Box(Box(1600, 1600), Box(1600, 1600)), - Box(Box(1601, 1601), Box(1601, 1601)), - Box(Box(1602, 1602), Box(1602, 1602)), - Box(Box(1603, 1603), Box(1603, 1603)), - Box(Box(1604, 1604), Box(1604, 1604)), - Box(Box(1605, 1605), Box(1605, 1605)), - Box(Box(1606, 1606), Box(1606, 1606)), - Box(Box(1607, 1607), Box(1607, 1607)), - Box(Box(1608, 1608), Box(1608, 1608)), - Box(Box(1609, 1609), Box(1609, 1609)), - Box(Box(1610, 1610), Box(1610, 1610)), - Box(Box(1611, 1611), Box(1611, 1611)), - Box(Box(1612, 1612), Box(1612, 1612)), - Box(Box(1613, 1613), Box(1613, 1613)), - Box(Box(1614, 1614), Box(1614, 1614)), - Box(Box(1615, 1615), Box(1615, 1615)), - Box(Box(1616, 1616), Box(1616, 1616)), - Box(Box(1617, 1617), Box(1617, 1617)), - Box(Box(1618, 1618), Box(1618, 1618)), - Box(Box(1619, 1619), Box(1619, 1619)), - Box(Box(1620, 1620), Box(1620, 1620)), - Box(Box(1621, 1621), Box(1621, 1621)), - Box(Box(1622, 1622), Box(1622, 1622)), - Box(Box(1623, 1623), Box(1623, 1623)), - Box(Box(1624, 1624), Box(1624, 1624)), - Box(Box(1625, 1625), Box(1625, 1625)), - Box(Box(1626, 1626), Box(1626, 1626)), - Box(Box(1627, 1627), Box(1627, 1627)), - Box(Box(1628, 1628), Box(1628, 1628)), - Box(Box(1629, 1629), Box(1629, 1629)), - Box(Box(1630, 1630), Box(1630, 1630)), - Box(Box(1631, 1631), Box(1631, 1631)), - Box(Box(1632, 1632), Box(1632, 1632)), - Box(Box(1633, 1633), Box(1633, 1633)), - Box(Box(1634, 1634), Box(1634, 1634)), - Box(Box(1635, 1635), Box(1635, 1635)), - Box(Box(1636, 1636), Box(1636, 1636)), - Box(Box(1637, 1637), Box(1637, 1637)), - Box(Box(1638, 1638), Box(1638, 1638)), - Box(Box(1639, 1639), Box(1639, 1639)), - Box(Box(1640, 1640), Box(1640, 1640)), - Box(Box(1641, 1641), Box(1641, 1641)), - Box(Box(1642, 1642), Box(1642, 1642)), - Box(Box(1643, 1643), Box(1643, 1643)), - Box(Box(1644, 1644), Box(1644, 1644)), - Box(Box(1645, 1645), Box(1645, 1645)), - Box(Box(1646, 1646), Box(1646, 1646)), - Box(Box(1647, 1647), Box(1647, 1647)), - Box(Box(1648, 1648), Box(1648, 1648)), - Box(Box(1649, 1649), Box(1649, 1649)), - Box(Box(1650, 1650), Box(1650, 1650)), - Box(Box(1651, 1651), Box(1651, 1651)), - Box(Box(1652, 1652), Box(1652, 1652)), - Box(Box(1653, 1653), Box(1653, 1653)), - Box(Box(1654, 1654), Box(1654, 1654)), - Box(Box(1655, 1655), Box(1655, 1655)), - Box(Box(1656, 1656), Box(1656, 1656)), - Box(Box(1657, 1657), Box(1657, 1657)), - Box(Box(1658, 1658), Box(1658, 1658)), - Box(Box(1659, 1659), Box(1659, 1659)), - Box(Box(1660, 1660), Box(1660, 1660)), - Box(Box(1661, 1661), Box(1661, 1661)), - Box(Box(1662, 1662), Box(1662, 1662)), - Box(Box(1663, 1663), Box(1663, 1663)), - Box(Box(1664, 1664), Box(1664, 1664)), - Box(Box(1665, 1665), Box(1665, 1665)), - Box(Box(1666, 1666), Box(1666, 1666)), - Box(Box(1667, 1667), Box(1667, 1667)), - Box(Box(1668, 1668), Box(1668, 1668)), - Box(Box(1669, 1669), Box(1669, 1669)), - Box(Box(1670, 1670), Box(1670, 1670)), - Box(Box(1671, 1671), Box(1671, 1671)), - Box(Box(1672, 1672), Box(1672, 1672)), - Box(Box(1673, 1673), Box(1673, 1673)), - Box(Box(1674, 1674), Box(1674, 1674)), - Box(Box(1675, 1675), Box(1675, 1675)), - Box(Box(1676, 1676), Box(1676, 1676)), - Box(Box(1677, 1677), Box(1677, 1677)), - Box(Box(1678, 1678), Box(1678, 1678)), - Box(Box(1679, 1679), Box(1679, 1679)), - Box(Box(1680, 1680), Box(1680, 1680)), - Box(Box(1681, 1681), Box(1681, 1681)), - Box(Box(1682, 1682), Box(1682, 1682)), - Box(Box(1683, 1683), Box(1683, 1683)), - Box(Box(1684, 1684), Box(1684, 1684)), - Box(Box(1685, 1685), Box(1685, 1685)), - Box(Box(1686, 1686), Box(1686, 1686)), - Box(Box(1687, 1687), Box(1687, 1687)), - Box(Box(1688, 1688), Box(1688, 1688)), - Box(Box(1689, 1689), Box(1689, 1689)), - Box(Box(1690, 1690), Box(1690, 1690)), - Box(Box(1691, 1691), Box(1691, 1691)), - Box(Box(1692, 1692), Box(1692, 1692)), - Box(Box(1693, 1693), Box(1693, 1693)), - Box(Box(1694, 1694), Box(1694, 1694)), - Box(Box(1695, 1695), Box(1695, 1695)), - Box(Box(1696, 1696), Box(1696, 1696)), - Box(Box(1697, 1697), Box(1697, 1697)), - Box(Box(1698, 1698), Box(1698, 1698)), - Box(Box(1699, 1699), Box(1699, 1699)), - Box(Box(1700, 1700), Box(1700, 1700)), - Box(Box(1701, 1701), Box(1701, 1701)), - Box(Box(1702, 1702), Box(1702, 1702)), - Box(Box(1703, 1703), Box(1703, 1703)), - Box(Box(1704, 1704), Box(1704, 1704)), - Box(Box(1705, 1705), Box(1705, 1705)), - Box(Box(1706, 1706), Box(1706, 1706)), - Box(Box(1707, 1707), Box(1707, 1707)), - Box(Box(1708, 1708), Box(1708, 1708)), - Box(Box(1709, 1709), Box(1709, 1709)), - Box(Box(1710, 1710), Box(1710, 1710)), - Box(Box(1711, 1711), Box(1711, 1711)), - Box(Box(1712, 1712), Box(1712, 1712)), - Box(Box(1713, 1713), Box(1713, 1713)), - Box(Box(1714, 1714), Box(1714, 1714)), - Box(Box(1715, 1715), Box(1715, 1715)), - Box(Box(1716, 1716), Box(1716, 1716)), - Box(Box(1717, 1717), Box(1717, 1717)), - Box(Box(1718, 1718), Box(1718, 1718)), - Box(Box(1719, 1719), Box(1719, 1719)), - Box(Box(1720, 1720), Box(1720, 1720)), - Box(Box(1721, 1721), Box(1721, 1721)), - Box(Box(1722, 1722), Box(1722, 1722)), - Box(Box(1723, 1723), Box(1723, 1723)), - Box(Box(1724, 1724), Box(1724, 1724)), - Box(Box(1725, 1725), Box(1725, 1725)), - Box(Box(1726, 1726), Box(1726, 1726)), - Box(Box(1727, 1727), Box(1727, 1727)), - Box(Box(1728, 1728), Box(1728, 1728)), - Box(Box(1729, 1729), Box(1729, 1729)), - Box(Box(1730, 1730), Box(1730, 1730)), - Box(Box(1731, 1731), Box(1731, 1731)), - Box(Box(1732, 1732), Box(1732, 1732)), - Box(Box(1733, 1733), Box(1733, 1733)), - Box(Box(1734, 1734), Box(1734, 1734)), - Box(Box(1735, 1735), Box(1735, 1735)), - Box(Box(1736, 1736), Box(1736, 1736)), - Box(Box(1737, 1737), Box(1737, 1737)), - Box(Box(1738, 1738), Box(1738, 1738)), - Box(Box(1739, 1739), Box(1739, 1739)), - Box(Box(1740, 1740), Box(1740, 1740)), - Box(Box(1741, 1741), Box(1741, 1741)), - Box(Box(1742, 1742), Box(1742, 1742)), - Box(Box(1743, 1743), Box(1743, 1743)), - Box(Box(1744, 1744), Box(1744, 1744)), - Box(Box(1745, 1745), Box(1745, 1745)), - Box(Box(1746, 1746), Box(1746, 1746)), - Box(Box(1747, 1747), Box(1747, 1747)), - Box(Box(1748, 1748), Box(1748, 1748)), - Box(Box(1749, 1749), Box(1749, 1749)), - Box(Box(1750, 1750), Box(1750, 1750)), - Box(Box(1751, 1751), Box(1751, 1751)), - Box(Box(1752, 1752), Box(1752, 1752)), - Box(Box(1753, 1753), Box(1753, 1753)), - Box(Box(1754, 1754), Box(1754, 1754)), - Box(Box(1755, 1755), Box(1755, 1755)), - Box(Box(1756, 1756), Box(1756, 1756)), - Box(Box(1757, 1757), Box(1757, 1757)), - Box(Box(1758, 1758), Box(1758, 1758)), - Box(Box(1759, 1759), Box(1759, 1759)), - Box(Box(1760, 1760), Box(1760, 1760)), - Box(Box(1761, 1761), Box(1761, 1761)), - Box(Box(1762, 1762), Box(1762, 1762)), - Box(Box(1763, 1763), Box(1763, 1763)), - Box(Box(1764, 1764), Box(1764, 1764)), - Box(Box(1765, 1765), Box(1765, 1765)), - Box(Box(1766, 1766), Box(1766, 1766)), - Box(Box(1767, 1767), Box(1767, 1767)), - Box(Box(1768, 1768), Box(1768, 1768)), - Box(Box(1769, 1769), Box(1769, 1769)), - Box(Box(1770, 1770), Box(1770, 1770)), - Box(Box(1771, 1771), Box(1771, 1771)), - Box(Box(1772, 1772), Box(1772, 1772)), - Box(Box(1773, 1773), Box(1773, 1773)), - Box(Box(1774, 1774), Box(1774, 1774)), - Box(Box(1775, 1775), Box(1775, 1775)), - Box(Box(1776, 1776), Box(1776, 1776)), - Box(Box(1777, 1777), Box(1777, 1777)), - Box(Box(1778, 1778), Box(1778, 1778)), - Box(Box(1779, 1779), Box(1779, 1779)), - Box(Box(1780, 1780), Box(1780, 1780)), - Box(Box(1781, 1781), Box(1781, 1781)), - Box(Box(1782, 1782), Box(1782, 1782)), - Box(Box(1783, 1783), Box(1783, 1783)), - Box(Box(1784, 1784), Box(1784, 1784)), - Box(Box(1785, 1785), Box(1785, 1785)), - Box(Box(1786, 1786), Box(1786, 1786)), - Box(Box(1787, 1787), Box(1787, 1787)), - Box(Box(1788, 1788), Box(1788, 1788)), - Box(Box(1789, 1789), Box(1789, 1789)), - Box(Box(1790, 1790), Box(1790, 1790)), - Box(Box(1791, 1791), Box(1791, 1791)), - Box(Box(1792, 1792), Box(1792, 1792)), - Box(Box(1793, 1793), Box(1793, 1793)), - Box(Box(1794, 1794), Box(1794, 1794)), - Box(Box(1795, 1795), Box(1795, 1795)), - Box(Box(1796, 1796), Box(1796, 1796)), - Box(Box(1797, 1797), Box(1797, 1797)), - Box(Box(1798, 1798), Box(1798, 1798)), - Box(Box(1799, 1799), Box(1799, 1799)), - Box(Box(1800, 1800), Box(1800, 1800)), - Box(Box(1801, 1801), Box(1801, 1801)), - Box(Box(1802, 1802), Box(1802, 1802)), - Box(Box(1803, 1803), Box(1803, 1803)), - Box(Box(1804, 1804), Box(1804, 1804)), - Box(Box(1805, 1805), Box(1805, 1805)), - Box(Box(1806, 1806), Box(1806, 1806)), - Box(Box(1807, 1807), Box(1807, 1807)), - Box(Box(1808, 1808), Box(1808, 1808)), - Box(Box(1809, 1809), Box(1809, 1809)), - Box(Box(1810, 1810), Box(1810, 1810)), - Box(Box(1811, 1811), Box(1811, 1811)), - Box(Box(1812, 1812), Box(1812, 1812)), - Box(Box(1813, 1813), Box(1813, 1813)), - Box(Box(1814, 1814), Box(1814, 1814)), - Box(Box(1815, 1815), Box(1815, 1815)), - Box(Box(1816, 1816), Box(1816, 1816)), - Box(Box(1817, 1817), Box(1817, 1817)), - Box(Box(1818, 1818), Box(1818, 1818)), - Box(Box(1819, 1819), Box(1819, 1819)), - Box(Box(1820, 1820), Box(1820, 1820)), - Box(Box(1821, 1821), Box(1821, 1821)), - Box(Box(1822, 1822), Box(1822, 1822)), - Box(Box(1823, 1823), Box(1823, 1823)), - Box(Box(1824, 1824), Box(1824, 1824)), - Box(Box(1825, 1825), Box(1825, 1825)), - Box(Box(1826, 1826), Box(1826, 1826)), - Box(Box(1827, 1827), Box(1827, 1827)), - Box(Box(1828, 1828), Box(1828, 1828)), - Box(Box(1829, 1829), Box(1829, 1829)), - Box(Box(1830, 1830), Box(1830, 1830)), - Box(Box(1831, 1831), Box(1831, 1831)), - Box(Box(1832, 1832), Box(1832, 1832)), - Box(Box(1833, 1833), Box(1833, 1833)), - Box(Box(1834, 1834), Box(1834, 1834)), - Box(Box(1835, 1835), Box(1835, 1835)), - Box(Box(1836, 1836), Box(1836, 1836)), - Box(Box(1837, 1837), Box(1837, 1837)), - Box(Box(1838, 1838), Box(1838, 1838)), - Box(Box(1839, 1839), Box(1839, 1839)), - Box(Box(1840, 1840), Box(1840, 1840)), - Box(Box(1841, 1841), Box(1841, 1841)), - Box(Box(1842, 1842), Box(1842, 1842)), - Box(Box(1843, 1843), Box(1843, 1843)), - Box(Box(1844, 1844), Box(1844, 1844)), - Box(Box(1845, 1845), Box(1845, 1845)), - Box(Box(1846, 1846), Box(1846, 1846)), - Box(Box(1847, 1847), Box(1847, 1847)), - Box(Box(1848, 1848), Box(1848, 1848)), - Box(Box(1849, 1849), Box(1849, 1849)), - Box(Box(1850, 1850), Box(1850, 1850)), - Box(Box(1851, 1851), Box(1851, 1851)), - Box(Box(1852, 1852), Box(1852, 1852)), - Box(Box(1853, 1853), Box(1853, 1853)), - Box(Box(1854, 1854), Box(1854, 1854)), - Box(Box(1855, 1855), Box(1855, 1855)), - Box(Box(1856, 1856), Box(1856, 1856)), - Box(Box(1857, 1857), Box(1857, 1857)), - Box(Box(1858, 1858), Box(1858, 1858)), - Box(Box(1859, 1859), Box(1859, 1859)), - Box(Box(1860, 1860), Box(1860, 1860)), - Box(Box(1861, 1861), Box(1861, 1861)), - Box(Box(1862, 1862), Box(1862, 1862)), - Box(Box(1863, 1863), Box(1863, 1863)), - Box(Box(1864, 1864), Box(1864, 1864)), - Box(Box(1865, 1865), Box(1865, 1865)), - Box(Box(1866, 1866), Box(1866, 1866)), - Box(Box(1867, 1867), Box(1867, 1867)), - Box(Box(1868, 1868), Box(1868, 1868)), - Box(Box(1869, 1869), Box(1869, 1869)), - Box(Box(1870, 1870), Box(1870, 1870)), - Box(Box(1871, 1871), Box(1871, 1871)), - Box(Box(1872, 1872), Box(1872, 1872)), - Box(Box(1873, 1873), Box(1873, 1873)), - Box(Box(1874, 1874), Box(1874, 1874)), - Box(Box(1875, 1875), Box(1875, 1875)), - Box(Box(1876, 1876), Box(1876, 1876)), - Box(Box(1877, 1877), Box(1877, 1877)), - Box(Box(1878, 1878), Box(1878, 1878)), - Box(Box(1879, 1879), Box(1879, 1879)), - Box(Box(1880, 1880), Box(1880, 1880)), - Box(Box(1881, 1881), Box(1881, 1881)), - Box(Box(1882, 1882), Box(1882, 1882)), - Box(Box(1883, 1883), Box(1883, 1883)), - Box(Box(1884, 1884), Box(1884, 1884)), - Box(Box(1885, 1885), Box(1885, 1885)), - Box(Box(1886, 1886), Box(1886, 1886)), - Box(Box(1887, 1887), Box(1887, 1887)), - Box(Box(1888, 1888), Box(1888, 1888)), - Box(Box(1889, 1889), Box(1889, 1889)), - Box(Box(1890, 1890), Box(1890, 1890)), - Box(Box(1891, 1891), Box(1891, 1891)), - Box(Box(1892, 1892), Box(1892, 1892)), - Box(Box(1893, 1893), Box(1893, 1893)), - Box(Box(1894, 1894), Box(1894, 1894)), - Box(Box(1895, 1895), Box(1895, 1895)), - Box(Box(1896, 1896), Box(1896, 1896)), - Box(Box(1897, 1897), Box(1897, 1897)), - Box(Box(1898, 1898), Box(1898, 1898)), - Box(Box(1899, 1899), Box(1899, 1899)), - Box(Box(1900, 1900), Box(1900, 1900)), - Box(Box(1901, 1901), Box(1901, 1901)), - Box(Box(1902, 1902), Box(1902, 1902)), - Box(Box(1903, 1903), Box(1903, 1903)), - Box(Box(1904, 1904), Box(1904, 1904)), - Box(Box(1905, 1905), Box(1905, 1905)), - Box(Box(1906, 1906), Box(1906, 1906)), - Box(Box(1907, 1907), Box(1907, 1907)), - Box(Box(1908, 1908), Box(1908, 1908)), - Box(Box(1909, 1909), Box(1909, 1909)), - Box(Box(1910, 1910), Box(1910, 1910)), - Box(Box(1911, 1911), Box(1911, 1911)), - Box(Box(1912, 1912), Box(1912, 1912)), - Box(Box(1913, 1913), Box(1913, 1913)), - Box(Box(1914, 1914), Box(1914, 1914)), - Box(Box(1915, 1915), Box(1915, 1915)), - Box(Box(1916, 1916), Box(1916, 1916)), - Box(Box(1917, 1917), Box(1917, 1917)), - Box(Box(1918, 1918), Box(1918, 1918)), - Box(Box(1919, 1919), Box(1919, 1919)), - Box(Box(1920, 1920), Box(1920, 1920)), - Box(Box(1921, 1921), Box(1921, 1921)), - Box(Box(1922, 1922), Box(1922, 1922)), - Box(Box(1923, 1923), Box(1923, 1923)), - Box(Box(1924, 1924), Box(1924, 1924)), - Box(Box(1925, 1925), Box(1925, 1925)), - Box(Box(1926, 1926), Box(1926, 1926)), - Box(Box(1927, 1927), Box(1927, 1927)), - Box(Box(1928, 1928), Box(1928, 1928)), - Box(Box(1929, 1929), Box(1929, 1929)), - Box(Box(1930, 1930), Box(1930, 1930)), - Box(Box(1931, 1931), Box(1931, 1931)), - Box(Box(1932, 1932), Box(1932, 1932)), - Box(Box(1933, 1933), Box(1933, 1933)), - Box(Box(1934, 1934), Box(1934, 1934)), - Box(Box(1935, 1935), Box(1935, 1935)), - Box(Box(1936, 1936), Box(1936, 1936)), - Box(Box(1937, 1937), Box(1937, 1937)), - Box(Box(1938, 1938), Box(1938, 1938)), - Box(Box(1939, 1939), Box(1939, 1939)), - Box(Box(1940, 1940), Box(1940, 1940)), - Box(Box(1941, 1941), Box(1941, 1941)), - Box(Box(1942, 1942), Box(1942, 1942)), - Box(Box(1943, 1943), Box(1943, 1943)), - Box(Box(1944, 1944), Box(1944, 1944)), - Box(Box(1945, 1945), Box(1945, 1945)), - Box(Box(1946, 1946), Box(1946, 1946)), - Box(Box(1947, 1947), Box(1947, 1947)), - Box(Box(1948, 1948), Box(1948, 1948)), - Box(Box(1949, 1949), Box(1949, 1949)), - Box(Box(1950, 1950), Box(1950, 1950)), - Box(Box(1951, 1951), Box(1951, 1951)), - Box(Box(1952, 1952), Box(1952, 1952)), - Box(Box(1953, 1953), Box(1953, 1953)), - Box(Box(1954, 1954), Box(1954, 1954)), - Box(Box(1955, 1955), Box(1955, 1955)), - Box(Box(1956, 1956), Box(1956, 1956)), - Box(Box(1957, 1957), Box(1957, 1957)), - Box(Box(1958, 1958), Box(1958, 1958)), - Box(Box(1959, 1959), Box(1959, 1959)), - Box(Box(1960, 1960), Box(1960, 1960)), - Box(Box(1961, 1961), Box(1961, 1961)), - Box(Box(1962, 1962), Box(1962, 1962)), - Box(Box(1963, 1963), Box(1963, 1963)), - Box(Box(1964, 1964), Box(1964, 1964)), - Box(Box(1965, 1965), Box(1965, 1965)), - Box(Box(1966, 1966), Box(1966, 1966)), - Box(Box(1967, 1967), Box(1967, 1967)), - Box(Box(1968, 1968), Box(1968, 1968)), - Box(Box(1969, 1969), Box(1969, 1969)), - Box(Box(1970, 1970), Box(1970, 1970)), - Box(Box(1971, 1971), Box(1971, 1971)), - Box(Box(1972, 1972), Box(1972, 1972)), - Box(Box(1973, 1973), Box(1973, 1973)), - Box(Box(1974, 1974), Box(1974, 1974)), - Box(Box(1975, 1975), Box(1975, 1975)), - Box(Box(1976, 1976), Box(1976, 1976)), - Box(Box(1977, 1977), Box(1977, 1977)), - Box(Box(1978, 1978), Box(1978, 1978)), - Box(Box(1979, 1979), Box(1979, 1979)), - Box(Box(1980, 1980), Box(1980, 1980)), - Box(Box(1981, 1981), Box(1981, 1981)), - Box(Box(1982, 1982), Box(1982, 1982)), - Box(Box(1983, 1983), Box(1983, 1983)), - Box(Box(1984, 1984), Box(1984, 1984)), - Box(Box(1985, 1985), Box(1985, 1985)), - Box(Box(1986, 1986), Box(1986, 1986)), - Box(Box(1987, 1987), Box(1987, 1987)), - Box(Box(1988, 1988), Box(1988, 1988)), - Box(Box(1989, 1989), Box(1989, 1989)), - Box(Box(1990, 1990), Box(1990, 1990)), - Box(Box(1991, 1991), Box(1991, 1991)), - Box(Box(1992, 1992), Box(1992, 1992)), - Box(Box(1993, 1993), Box(1993, 1993)), - Box(Box(1994, 1994), Box(1994, 1994)), - Box(Box(1995, 1995), Box(1995, 1995)), - Box(Box(1996, 1996), Box(1996, 1996)), - Box(Box(1997, 1997), Box(1997, 1997)), - Box(Box(1998, 1998), Box(1998, 1998)), - Box(Box(1999, 1999), Box(1999, 1999)), - Box(Box(2000, 2000), Box(2000, 2000)), - Box(Box(2001, 2001), Box(2001, 2001)), - Box(Box(2002, 2002), Box(2002, 2002)), - Box(Box(2003, 2003), Box(2003, 2003)), - Box(Box(2004, 2004), Box(2004, 2004)), - Box(Box(2005, 2005), Box(2005, 2005)), - Box(Box(2006, 2006), Box(2006, 2006)), - Box(Box(2007, 2007), Box(2007, 2007)), - Box(Box(2008, 2008), Box(2008, 2008)), - Box(Box(2009, 2009), Box(2009, 2009)), - Box(Box(2010, 2010), Box(2010, 2010)), - Box(Box(2011, 2011), Box(2011, 2011)), - Box(Box(2012, 2012), Box(2012, 2012)), - Box(Box(2013, 2013), Box(2013, 2013)), - Box(Box(2014, 2014), Box(2014, 2014)), - Box(Box(2015, 2015), Box(2015, 2015)), - Box(Box(2016, 2016), Box(2016, 2016)), - Box(Box(2017, 2017), Box(2017, 2017)), - Box(Box(2018, 2018), Box(2018, 2018)), - Box(Box(2019, 2019), Box(2019, 2019)), - Box(Box(2020, 2020), Box(2020, 2020)), - Box(Box(2021, 2021), Box(2021, 2021)), - Box(Box(2022, 2022), Box(2022, 2022)), - Box(Box(2023, 2023), Box(2023, 2023)), - Box(Box(2024, 2024), Box(2024, 2024)), - Box(Box(2025, 2025), Box(2025, 2025)), - Box(Box(2026, 2026), Box(2026, 2026)), - Box(Box(2027, 2027), Box(2027, 2027)), - Box(Box(2028, 2028), Box(2028, 2028)), - Box(Box(2029, 2029), Box(2029, 2029)), - Box(Box(2030, 2030), Box(2030, 2030)), - Box(Box(2031, 2031), Box(2031, 2031)), - Box(Box(2032, 2032), Box(2032, 2032)), - Box(Box(2033, 2033), Box(2033, 2033)), - Box(Box(2034, 2034), Box(2034, 2034)), - Box(Box(2035, 2035), Box(2035, 2035)), - Box(Box(2036, 2036), Box(2036, 2036)), - Box(Box(2037, 2037), Box(2037, 2037)), - Box(Box(2038, 2038), Box(2038, 2038)), - Box(Box(2039, 2039), Box(2039, 2039)), - Box(Box(2040, 2040), Box(2040, 2040)), - Box(Box(2041, 2041), Box(2041, 2041)), - Box(Box(2042, 2042), Box(2042, 2042)), - Box(Box(2043, 2043), Box(2043, 2043)), - Box(Box(2044, 2044), Box(2044, 2044)), - Box(Box(2045, 2045), Box(2045, 2045)), - Box(Box(2046, 2046), Box(2046, 2046)), - Box(Box(2047, 2047), Box(2047, 2047)), - Box(Box(2048, 2048), Box(2048, 2048)), - Box(Box(2049, 2049), Box(2049, 2049)), - Box(Box(2050, 2050), Box(2050, 2050)), - Box(Box(2051, 2051), Box(2051, 2051)), - Box(Box(2052, 2052), Box(2052, 2052)), - Box(Box(2053, 2053), Box(2053, 2053)), - Box(Box(2054, 2054), Box(2054, 2054)), - Box(Box(2055, 2055), Box(2055, 2055)), - Box(Box(2056, 2056), Box(2056, 2056)), - Box(Box(2057, 2057), Box(2057, 2057)), - Box(Box(2058, 2058), Box(2058, 2058)), - Box(Box(2059, 2059), Box(2059, 2059)), - Box(Box(2060, 2060), Box(2060, 2060)), - Box(Box(2061, 2061), Box(2061, 2061)), - Box(Box(2062, 2062), Box(2062, 2062)), - Box(Box(2063, 2063), Box(2063, 2063)), - Box(Box(2064, 2064), Box(2064, 2064)), - Box(Box(2065, 2065), Box(2065, 2065)), - Box(Box(2066, 2066), Box(2066, 2066)), - Box(Box(2067, 2067), Box(2067, 2067)), - Box(Box(2068, 2068), Box(2068, 2068)), - Box(Box(2069, 2069), Box(2069, 2069)), - Box(Box(2070, 2070), Box(2070, 2070)), - Box(Box(2071, 2071), Box(2071, 2071)), - Box(Box(2072, 2072), Box(2072, 2072)), - Box(Box(2073, 2073), Box(2073, 2073)), - Box(Box(2074, 2074), Box(2074, 2074)), - Box(Box(2075, 2075), Box(2075, 2075)), - Box(Box(2076, 2076), Box(2076, 2076)), - Box(Box(2077, 2077), Box(2077, 2077)), - Box(Box(2078, 2078), Box(2078, 2078)), - Box(Box(2079, 2079), Box(2079, 2079)), - Box(Box(2080, 2080), Box(2080, 2080)), - Box(Box(2081, 2081), Box(2081, 2081)), - Box(Box(2082, 2082), Box(2082, 2082)), - Box(Box(2083, 2083), Box(2083, 2083)), - Box(Box(2084, 2084), Box(2084, 2084)), - Box(Box(2085, 2085), Box(2085, 2085)), - Box(Box(2086, 2086), Box(2086, 2086)), - Box(Box(2087, 2087), Box(2087, 2087)), - Box(Box(2088, 2088), Box(2088, 2088)), - Box(Box(2089, 2089), Box(2089, 2089)), - Box(Box(2090, 2090), Box(2090, 2090)), - Box(Box(2091, 2091), Box(2091, 2091)), - Box(Box(2092, 2092), Box(2092, 2092)), - Box(Box(2093, 2093), Box(2093, 2093)), - Box(Box(2094, 2094), Box(2094, 2094)), - Box(Box(2095, 2095), Box(2095, 2095)), - Box(Box(2096, 2096), Box(2096, 2096)), - Box(Box(2097, 2097), Box(2097, 2097)), - Box(Box(2098, 2098), Box(2098, 2098)), - Box(Box(2099, 2099), Box(2099, 2099)), - Box(Box(2100, 2100), Box(2100, 2100)), - Box(Box(2101, 2101), Box(2101, 2101)), - Box(Box(2102, 2102), Box(2102, 2102)), - Box(Box(2103, 2103), Box(2103, 2103)), - Box(Box(2104, 2104), Box(2104, 2104)), - Box(Box(2105, 2105), Box(2105, 2105)), - Box(Box(2106, 2106), Box(2106, 2106)), - Box(Box(2107, 2107), Box(2107, 2107)), - Box(Box(2108, 2108), Box(2108, 2108)), - Box(Box(2109, 2109), Box(2109, 2109)), - Box(Box(2110, 2110), Box(2110, 2110)), - Box(Box(2111, 2111), Box(2111, 2111)), - Box(Box(2112, 2112), Box(2112, 2112)), - Box(Box(2113, 2113), Box(2113, 2113)), - Box(Box(2114, 2114), Box(2114, 2114)), - Box(Box(2115, 2115), Box(2115, 2115)), - Box(Box(2116, 2116), Box(2116, 2116)), - Box(Box(2117, 2117), Box(2117, 2117)), - Box(Box(2118, 2118), Box(2118, 2118)), - Box(Box(2119, 2119), Box(2119, 2119)), - Box(Box(2120, 2120), Box(2120, 2120)), - Box(Box(2121, 2121), Box(2121, 2121)), - Box(Box(2122, 2122), Box(2122, 2122)), - Box(Box(2123, 2123), Box(2123, 2123)), - Box(Box(2124, 2124), Box(2124, 2124)), - Box(Box(2125, 2125), Box(2125, 2125)), - Box(Box(2126, 2126), Box(2126, 2126)), - Box(Box(2127, 2127), Box(2127, 2127)), - Box(Box(2128, 2128), Box(2128, 2128)), - Box(Box(2129, 2129), Box(2129, 2129)), - Box(Box(2130, 2130), Box(2130, 2130)), - Box(Box(2131, 2131), Box(2131, 2131)), - Box(Box(2132, 2132), Box(2132, 2132)), - Box(Box(2133, 2133), Box(2133, 2133)), - Box(Box(2134, 2134), Box(2134, 2134)), - Box(Box(2135, 2135), Box(2135, 2135)), - Box(Box(2136, 2136), Box(2136, 2136)), - Box(Box(2137, 2137), Box(2137, 2137)), - Box(Box(2138, 2138), Box(2138, 2138)), - Box(Box(2139, 2139), Box(2139, 2139)), - Box(Box(2140, 2140), Box(2140, 2140)), - Box(Box(2141, 2141), Box(2141, 2141)), - Box(Box(2142, 2142), Box(2142, 2142)), - Box(Box(2143, 2143), Box(2143, 2143)), - Box(Box(2144, 2144), Box(2144, 2144)), - Box(Box(2145, 2145), Box(2145, 2145)), - Box(Box(2146, 2146), Box(2146, 2146)), - Box(Box(2147, 2147), Box(2147, 2147)), - Box(Box(2148, 2148), Box(2148, 2148)), - Box(Box(2149, 2149), Box(2149, 2149)), - Box(Box(2150, 2150), Box(2150, 2150)), - Box(Box(2151, 2151), Box(2151, 2151)), - Box(Box(2152, 2152), Box(2152, 2152)), - Box(Box(2153, 2153), Box(2153, 2153)), - Box(Box(2154, 2154), Box(2154, 2154)), - Box(Box(2155, 2155), Box(2155, 2155)), - Box(Box(2156, 2156), Box(2156, 2156)), - Box(Box(2157, 2157), Box(2157, 2157)), - Box(Box(2158, 2158), Box(2158, 2158)), - Box(Box(2159, 2159), Box(2159, 2159)), - Box(Box(2160, 2160), Box(2160, 2160)), - Box(Box(2161, 2161), Box(2161, 2161)), - Box(Box(2162, 2162), Box(2162, 2162)), - Box(Box(2163, 2163), Box(2163, 2163)), - Box(Box(2164, 2164), Box(2164, 2164)), - Box(Box(2165, 2165), Box(2165, 2165)), - Box(Box(2166, 2166), Box(2166, 2166)), - Box(Box(2167, 2167), Box(2167, 2167)), - Box(Box(2168, 2168), Box(2168, 2168)), - Box(Box(2169, 2169), Box(2169, 2169)), - Box(Box(2170, 2170), Box(2170, 2170)), - Box(Box(2171, 2171), Box(2171, 2171)), - Box(Box(2172, 2172), Box(2172, 2172)), - Box(Box(2173, 2173), Box(2173, 2173)), - Box(Box(2174, 2174), Box(2174, 2174)), - Box(Box(2175, 2175), Box(2175, 2175)), - Box(Box(2176, 2176), Box(2176, 2176)), - Box(Box(2177, 2177), Box(2177, 2177)), - Box(Box(2178, 2178), Box(2178, 2178)), - Box(Box(2179, 2179), Box(2179, 2179)), - Box(Box(2180, 2180), Box(2180, 2180)), - Box(Box(2181, 2181), Box(2181, 2181)), - Box(Box(2182, 2182), Box(2182, 2182)), - Box(Box(2183, 2183), Box(2183, 2183)), - Box(Box(2184, 2184), Box(2184, 2184)), - Box(Box(2185, 2185), Box(2185, 2185)), - Box(Box(2186, 2186), Box(2186, 2186)), - Box(Box(2187, 2187), Box(2187, 2187)), - Box(Box(2188, 2188), Box(2188, 2188)), - Box(Box(2189, 2189), Box(2189, 2189)), - Box(Box(2190, 2190), Box(2190, 2190)), - Box(Box(2191, 2191), Box(2191, 2191)), - Box(Box(2192, 2192), Box(2192, 2192)), - Box(Box(2193, 2193), Box(2193, 2193)), - Box(Box(2194, 2194), Box(2194, 2194)), - Box(Box(2195, 2195), Box(2195, 2195)), - Box(Box(2196, 2196), Box(2196, 2196)), - Box(Box(2197, 2197), Box(2197, 2197)), - Box(Box(2198, 2198), Box(2198, 2198)), - Box(Box(2199, 2199), Box(2199, 2199)), - Box(Box(2200, 2200), Box(2200, 2200)), - Box(Box(2201, 2201), Box(2201, 2201)), - Box(Box(2202, 2202), Box(2202, 2202)), - Box(Box(2203, 2203), Box(2203, 2203)), - Box(Box(2204, 2204), Box(2204, 2204)), - Box(Box(2205, 2205), Box(2205, 2205)), - Box(Box(2206, 2206), Box(2206, 2206)), - Box(Box(2207, 2207), Box(2207, 2207)), - Box(Box(2208, 2208), Box(2208, 2208)), - Box(Box(2209, 2209), Box(2209, 2209)), - Box(Box(2210, 2210), Box(2210, 2210)), - Box(Box(2211, 2211), Box(2211, 2211)), - Box(Box(2212, 2212), Box(2212, 2212)), - Box(Box(2213, 2213), Box(2213, 2213)), - Box(Box(2214, 2214), Box(2214, 2214)), - Box(Box(2215, 2215), Box(2215, 2215)), - Box(Box(2216, 2216), Box(2216, 2216)), - Box(Box(2217, 2217), Box(2217, 2217)), - Box(Box(2218, 2218), Box(2218, 2218)), - Box(Box(2219, 2219), Box(2219, 2219)), - Box(Box(2220, 2220), Box(2220, 2220)), - Box(Box(2221, 2221), Box(2221, 2221)), - Box(Box(2222, 2222), Box(2222, 2222)), - Box(Box(2223, 2223), Box(2223, 2223)), - Box(Box(2224, 2224), Box(2224, 2224)), - Box(Box(2225, 2225), Box(2225, 2225)), - Box(Box(2226, 2226), Box(2226, 2226)), - Box(Box(2227, 2227), Box(2227, 2227)), - Box(Box(2228, 2228), Box(2228, 2228)), - Box(Box(2229, 2229), Box(2229, 2229)), - Box(Box(2230, 2230), Box(2230, 2230)), - Box(Box(2231, 2231), Box(2231, 2231)), - Box(Box(2232, 2232), Box(2232, 2232)), - Box(Box(2233, 2233), Box(2233, 2233)), - Box(Box(2234, 2234), Box(2234, 2234)), - Box(Box(2235, 2235), Box(2235, 2235)), - Box(Box(2236, 2236), Box(2236, 2236)), - Box(Box(2237, 2237), Box(2237, 2237)), - Box(Box(2238, 2238), Box(2238, 2238)), - Box(Box(2239, 2239), Box(2239, 2239)), - Box(Box(2240, 2240), Box(2240, 2240)), - Box(Box(2241, 2241), Box(2241, 2241)), - Box(Box(2242, 2242), Box(2242, 2242)), - Box(Box(2243, 2243), Box(2243, 2243)), - Box(Box(2244, 2244), Box(2244, 2244)), - Box(Box(2245, 2245), Box(2245, 2245)), - Box(Box(2246, 2246), Box(2246, 2246)), - Box(Box(2247, 2247), Box(2247, 2247)), - Box(Box(2248, 2248), Box(2248, 2248)), - Box(Box(2249, 2249), Box(2249, 2249)), - Box(Box(2250, 2250), Box(2250, 2250)), - Box(Box(2251, 2251), Box(2251, 2251)), - Box(Box(2252, 2252), Box(2252, 2252)), - Box(Box(2253, 2253), Box(2253, 2253)), - Box(Box(2254, 2254), Box(2254, 2254)), - Box(Box(2255, 2255), Box(2255, 2255)), - Box(Box(2256, 2256), Box(2256, 2256)), - Box(Box(2257, 2257), Box(2257, 2257)), - Box(Box(2258, 2258), Box(2258, 2258)), - Box(Box(2259, 2259), Box(2259, 2259)), - Box(Box(2260, 2260), Box(2260, 2260)), - Box(Box(2261, 2261), Box(2261, 2261)), - Box(Box(2262, 2262), Box(2262, 2262)), - Box(Box(2263, 2263), Box(2263, 2263)), - Box(Box(2264, 2264), Box(2264, 2264)), - Box(Box(2265, 2265), Box(2265, 2265)), - Box(Box(2266, 2266), Box(2266, 2266)), - Box(Box(2267, 2267), Box(2267, 2267)), - Box(Box(2268, 2268), Box(2268, 2268)), - Box(Box(2269, 2269), Box(2269, 2269)), - Box(Box(2270, 2270), Box(2270, 2270)), - Box(Box(2271, 2271), Box(2271, 2271)), - Box(Box(2272, 2272), Box(2272, 2272)), - Box(Box(2273, 2273), Box(2273, 2273)), - Box(Box(2274, 2274), Box(2274, 2274)), - Box(Box(2275, 2275), Box(2275, 2275)), - Box(Box(2276, 2276), Box(2276, 2276)), - Box(Box(2277, 2277), Box(2277, 2277)), - Box(Box(2278, 2278), Box(2278, 2278)), - Box(Box(2279, 2279), Box(2279, 2279)), - Box(Box(2280, 2280), Box(2280, 2280)), - Box(Box(2281, 2281), Box(2281, 2281)), - Box(Box(2282, 2282), Box(2282, 2282)), - Box(Box(2283, 2283), Box(2283, 2283)), - Box(Box(2284, 2284), Box(2284, 2284)), - Box(Box(2285, 2285), Box(2285, 2285)), - Box(Box(2286, 2286), Box(2286, 2286)), - Box(Box(2287, 2287), Box(2287, 2287)), - Box(Box(2288, 2288), Box(2288, 2288)), - Box(Box(2289, 2289), Box(2289, 2289)), - Box(Box(2290, 2290), Box(2290, 2290)), - Box(Box(2291, 2291), Box(2291, 2291)), - Box(Box(2292, 2292), Box(2292, 2292)), - Box(Box(2293, 2293), Box(2293, 2293)), - Box(Box(2294, 2294), Box(2294, 2294)), - Box(Box(2295, 2295), Box(2295, 2295)), - Box(Box(2296, 2296), Box(2296, 2296)), - Box(Box(2297, 2297), Box(2297, 2297)), - Box(Box(2298, 2298), Box(2298, 2298)), - Box(Box(2299, 2299), Box(2299, 2299)), - Box(Box(2300, 2300), Box(2300, 2300)), - Box(Box(2301, 2301), Box(2301, 2301)), - Box(Box(2302, 2302), Box(2302, 2302)), - Box(Box(2303, 2303), Box(2303, 2303)), - Box(Box(2304, 2304), Box(2304, 2304)), - Box(Box(2305, 2305), Box(2305, 2305)), - Box(Box(2306, 2306), Box(2306, 2306)), - Box(Box(2307, 2307), Box(2307, 2307)), - Box(Box(2308, 2308), Box(2308, 2308)), - Box(Box(2309, 2309), Box(2309, 2309)), - Box(Box(2310, 2310), Box(2310, 2310)), - Box(Box(2311, 2311), Box(2311, 2311)), - Box(Box(2312, 2312), Box(2312, 2312)), - Box(Box(2313, 2313), Box(2313, 2313)), - Box(Box(2314, 2314), Box(2314, 2314)), - Box(Box(2315, 2315), Box(2315, 2315)), - Box(Box(2316, 2316), Box(2316, 2316)), - Box(Box(2317, 2317), Box(2317, 2317)), - Box(Box(2318, 2318), Box(2318, 2318)), - Box(Box(2319, 2319), Box(2319, 2319)), - Box(Box(2320, 2320), Box(2320, 2320)), - Box(Box(2321, 2321), Box(2321, 2321)), - Box(Box(2322, 2322), Box(2322, 2322)), - Box(Box(2323, 2323), Box(2323, 2323)), - Box(Box(2324, 2324), Box(2324, 2324)), - Box(Box(2325, 2325), Box(2325, 2325)), - Box(Box(2326, 2326), Box(2326, 2326)), - Box(Box(2327, 2327), Box(2327, 2327)), - Box(Box(2328, 2328), Box(2328, 2328)), - Box(Box(2329, 2329), Box(2329, 2329)), - Box(Box(2330, 2330), Box(2330, 2330)), - Box(Box(2331, 2331), Box(2331, 2331)), - Box(Box(2332, 2332), Box(2332, 2332)), - Box(Box(2333, 2333), Box(2333, 2333)), - Box(Box(2334, 2334), Box(2334, 2334)), - Box(Box(2335, 2335), Box(2335, 2335)), - Box(Box(2336, 2336), Box(2336, 2336)), - Box(Box(2337, 2337), Box(2337, 2337)), - Box(Box(2338, 2338), Box(2338, 2338)), - Box(Box(2339, 2339), Box(2339, 2339)), - Box(Box(2340, 2340), Box(2340, 2340)), - Box(Box(2341, 2341), Box(2341, 2341)), - Box(Box(2342, 2342), Box(2342, 2342)), - Box(Box(2343, 2343), Box(2343, 2343)), - Box(Box(2344, 2344), Box(2344, 2344)), - Box(Box(2345, 2345), Box(2345, 2345)), - Box(Box(2346, 2346), Box(2346, 2346)), - Box(Box(2347, 2347), Box(2347, 2347)), - Box(Box(2348, 2348), Box(2348, 2348)), - Box(Box(2349, 2349), Box(2349, 2349)), - Box(Box(2350, 2350), Box(2350, 2350)), - Box(Box(2351, 2351), Box(2351, 2351)), - Box(Box(2352, 2352), Box(2352, 2352)), - Box(Box(2353, 2353), Box(2353, 2353)), - Box(Box(2354, 2354), Box(2354, 2354)), - Box(Box(2355, 2355), Box(2355, 2355)), - Box(Box(2356, 2356), Box(2356, 2356)), - Box(Box(2357, 2357), Box(2357, 2357)), - Box(Box(2358, 2358), Box(2358, 2358)), - Box(Box(2359, 2359), Box(2359, 2359)), - Box(Box(2360, 2360), Box(2360, 2360)), - Box(Box(2361, 2361), Box(2361, 2361)), - Box(Box(2362, 2362), Box(2362, 2362)), - Box(Box(2363, 2363), Box(2363, 2363)), - Box(Box(2364, 2364), Box(2364, 2364)), - Box(Box(2365, 2365), Box(2365, 2365)), - Box(Box(2366, 2366), Box(2366, 2366)), - Box(Box(2367, 2367), Box(2367, 2367)), - Box(Box(2368, 2368), Box(2368, 2368)), - Box(Box(2369, 2369), Box(2369, 2369)), - Box(Box(2370, 2370), Box(2370, 2370)), - Box(Box(2371, 2371), Box(2371, 2371)), - Box(Box(2372, 2372), Box(2372, 2372)), - Box(Box(2373, 2373), Box(2373, 2373)), - Box(Box(2374, 2374), Box(2374, 2374)), - Box(Box(2375, 2375), Box(2375, 2375)), - Box(Box(2376, 2376), Box(2376, 2376)), - Box(Box(2377, 2377), Box(2377, 2377)), - Box(Box(2378, 2378), Box(2378, 2378)), - Box(Box(2379, 2379), Box(2379, 2379)), - Box(Box(2380, 2380), Box(2380, 2380)), - Box(Box(2381, 2381), Box(2381, 2381)), - Box(Box(2382, 2382), Box(2382, 2382)), - Box(Box(2383, 2383), Box(2383, 2383)), - Box(Box(2384, 2384), Box(2384, 2384)), - Box(Box(2385, 2385), Box(2385, 2385)), - Box(Box(2386, 2386), Box(2386, 2386)), - Box(Box(2387, 2387), Box(2387, 2387)), - Box(Box(2388, 2388), Box(2388, 2388)), - Box(Box(2389, 2389), Box(2389, 2389)), - Box(Box(2390, 2390), Box(2390, 2390)), - Box(Box(2391, 2391), Box(2391, 2391)), - Box(Box(2392, 2392), Box(2392, 2392)), - Box(Box(2393, 2393), Box(2393, 2393)), - Box(Box(2394, 2394), Box(2394, 2394)), - Box(Box(2395, 2395), Box(2395, 2395)), - Box(Box(2396, 2396), Box(2396, 2396)), - Box(Box(2397, 2397), Box(2397, 2397)), - Box(Box(2398, 2398), Box(2398, 2398)), - Box(Box(2399, 2399), Box(2399, 2399)), - Box(Box(2400, 2400), Box(2400, 2400)), - Box(Box(2401, 2401), Box(2401, 2401)), - Box(Box(2402, 2402), Box(2402, 2402)), - Box(Box(2403, 2403), Box(2403, 2403)), - Box(Box(2404, 2404), Box(2404, 2404)), - Box(Box(2405, 2405), Box(2405, 2405)), - Box(Box(2406, 2406), Box(2406, 2406)), - Box(Box(2407, 2407), Box(2407, 2407)), - Box(Box(2408, 2408), Box(2408, 2408)), - Box(Box(2409, 2409), Box(2409, 2409)), - Box(Box(2410, 2410), Box(2410, 2410)), - Box(Box(2411, 2411), Box(2411, 2411)), - Box(Box(2412, 2412), Box(2412, 2412)), - Box(Box(2413, 2413), Box(2413, 2413)), - Box(Box(2414, 2414), Box(2414, 2414)), - Box(Box(2415, 2415), Box(2415, 2415)), - Box(Box(2416, 2416), Box(2416, 2416)), - Box(Box(2417, 2417), Box(2417, 2417)), - Box(Box(2418, 2418), Box(2418, 2418)), - Box(Box(2419, 2419), Box(2419, 2419)), - Box(Box(2420, 2420), Box(2420, 2420)), - Box(Box(2421, 2421), Box(2421, 2421)), - Box(Box(2422, 2422), Box(2422, 2422)), - Box(Box(2423, 2423), Box(2423, 2423)), - Box(Box(2424, 2424), Box(2424, 2424)), - Box(Box(2425, 2425), Box(2425, 2425)), - Box(Box(2426, 2426), Box(2426, 2426)), - Box(Box(2427, 2427), Box(2427, 2427)), - Box(Box(2428, 2428), Box(2428, 2428)), - Box(Box(2429, 2429), Box(2429, 2429)), - Box(Box(2430, 2430), Box(2430, 2430)), - Box(Box(2431, 2431), Box(2431, 2431)), - Box(Box(2432, 2432), Box(2432, 2432)), - Box(Box(2433, 2433), Box(2433, 2433)), - Box(Box(2434, 2434), Box(2434, 2434)), - Box(Box(2435, 2435), Box(2435, 2435)), - Box(Box(2436, 2436), Box(2436, 2436)), - Box(Box(2437, 2437), Box(2437, 2437)), - Box(Box(2438, 2438), Box(2438, 2438)), - Box(Box(2439, 2439), Box(2439, 2439)), - Box(Box(2440, 2440), Box(2440, 2440)), - Box(Box(2441, 2441), Box(2441, 2441)), - Box(Box(2442, 2442), Box(2442, 2442)), - Box(Box(2443, 2443), Box(2443, 2443)), - Box(Box(2444, 2444), Box(2444, 2444)), - Box(Box(2445, 2445), Box(2445, 2445)), - Box(Box(2446, 2446), Box(2446, 2446)), - Box(Box(2447, 2447), Box(2447, 2447)), - Box(Box(2448, 2448), Box(2448, 2448)), - Box(Box(2449, 2449), Box(2449, 2449)), - Box(Box(2450, 2450), Box(2450, 2450)), - Box(Box(2451, 2451), Box(2451, 2451)), - Box(Box(2452, 2452), Box(2452, 2452)), - Box(Box(2453, 2453), Box(2453, 2453)), - Box(Box(2454, 2454), Box(2454, 2454)), - Box(Box(2455, 2455), Box(2455, 2455)), - Box(Box(2456, 2456), Box(2456, 2456)), - Box(Box(2457, 2457), Box(2457, 2457)), - Box(Box(2458, 2458), Box(2458, 2458)), - Box(Box(2459, 2459), Box(2459, 2459)), - Box(Box(2460, 2460), Box(2460, 2460)), - Box(Box(2461, 2461), Box(2461, 2461)), - Box(Box(2462, 2462), Box(2462, 2462)), - Box(Box(2463, 2463), Box(2463, 2463)), - Box(Box(2464, 2464), Box(2464, 2464)), - Box(Box(2465, 2465), Box(2465, 2465)), - Box(Box(2466, 2466), Box(2466, 2466)), - Box(Box(2467, 2467), Box(2467, 2467)), - Box(Box(2468, 2468), Box(2468, 2468)), - Box(Box(2469, 2469), Box(2469, 2469)), - Box(Box(2470, 2470), Box(2470, 2470)), - Box(Box(2471, 2471), Box(2471, 2471)), - Box(Box(2472, 2472), Box(2472, 2472)), - Box(Box(2473, 2473), Box(2473, 2473)), - Box(Box(2474, 2474), Box(2474, 2474)), - Box(Box(2475, 2475), Box(2475, 2475)), - Box(Box(2476, 2476), Box(2476, 2476)), - Box(Box(2477, 2477), Box(2477, 2477)), - Box(Box(2478, 2478), Box(2478, 2478)), - Box(Box(2479, 2479), Box(2479, 2479)), - Box(Box(2480, 2480), Box(2480, 2480)), - Box(Box(2481, 2481), Box(2481, 2481)), - Box(Box(2482, 2482), Box(2482, 2482)), - Box(Box(2483, 2483), Box(2483, 2483)), - Box(Box(2484, 2484), Box(2484, 2484)), - Box(Box(2485, 2485), Box(2485, 2485)), - Box(Box(2486, 2486), Box(2486, 2486)), - Box(Box(2487, 2487), Box(2487, 2487)), - Box(Box(2488, 2488), Box(2488, 2488)), - Box(Box(2489, 2489), Box(2489, 2489)), - Box(Box(2490, 2490), Box(2490, 2490)), - Box(Box(2491, 2491), Box(2491, 2491)), - Box(Box(2492, 2492), Box(2492, 2492)), - Box(Box(2493, 2493), Box(2493, 2493)), - Box(Box(2494, 2494), Box(2494, 2494)), - Box(Box(2495, 2495), Box(2495, 2495)), - Box(Box(2496, 2496), Box(2496, 2496)), - Box(Box(2497, 2497), Box(2497, 2497)), - Box(Box(2498, 2498), Box(2498, 2498)), - Box(Box(2499, 2499), Box(2499, 2499)), - Box(Box(2500, 2500), Box(2500, 2500)), - Box(Box(2501, 2501), Box(2501, 2501)), - Box(Box(2502, 2502), Box(2502, 2502)), - Box(Box(2503, 2503), Box(2503, 2503)), - Box(Box(2504, 2504), Box(2504, 2504)), - Box(Box(2505, 2505), Box(2505, 2505)), - Box(Box(2506, 2506), Box(2506, 2506)), - Box(Box(2507, 2507), Box(2507, 2507)), - Box(Box(2508, 2508), Box(2508, 2508)), - Box(Box(2509, 2509), Box(2509, 2509)), - Box(Box(2510, 2510), Box(2510, 2510)), - Box(Box(2511, 2511), Box(2511, 2511)), - Box(Box(2512, 2512), Box(2512, 2512)), - Box(Box(2513, 2513), Box(2513, 2513)), - Box(Box(2514, 2514), Box(2514, 2514)), - Box(Box(2515, 2515), Box(2515, 2515)), - Box(Box(2516, 2516), Box(2516, 2516)), - Box(Box(2517, 2517), Box(2517, 2517)), - Box(Box(2518, 2518), Box(2518, 2518)), - Box(Box(2519, 2519), Box(2519, 2519)), - Box(Box(2520, 2520), Box(2520, 2520)), - Box(Box(2521, 2521), Box(2521, 2521)), - Box(Box(2522, 2522), Box(2522, 2522)), - Box(Box(2523, 2523), Box(2523, 2523)), - Box(Box(2524, 2524), Box(2524, 2524)), - Box(Box(2525, 2525), Box(2525, 2525)), - Box(Box(2526, 2526), Box(2526, 2526)), - Box(Box(2527, 2527), Box(2527, 2527)), - Box(Box(2528, 2528), Box(2528, 2528)), - Box(Box(2529, 2529), Box(2529, 2529)), - Box(Box(2530, 2530), Box(2530, 2530)), - Box(Box(2531, 2531), Box(2531, 2531)), - Box(Box(2532, 2532), Box(2532, 2532)), - Box(Box(2533, 2533), Box(2533, 2533)), - Box(Box(2534, 2534), Box(2534, 2534)), - Box(Box(2535, 2535), Box(2535, 2535)), - Box(Box(2536, 2536), Box(2536, 2536)), - Box(Box(2537, 2537), Box(2537, 2537)), - Box(Box(2538, 2538), Box(2538, 2538)), - Box(Box(2539, 2539), Box(2539, 2539)), - Box(Box(2540, 2540), Box(2540, 2540)), - Box(Box(2541, 2541), Box(2541, 2541)), - Box(Box(2542, 2542), Box(2542, 2542)), - Box(Box(2543, 2543), Box(2543, 2543)), - Box(Box(2544, 2544), Box(2544, 2544)), - Box(Box(2545, 2545), Box(2545, 2545)), - Box(Box(2546, 2546), Box(2546, 2546)), - Box(Box(2547, 2547), Box(2547, 2547)), - Box(Box(2548, 2548), Box(2548, 2548)), - Box(Box(2549, 2549), Box(2549, 2549)), - Box(Box(2550, 2550), Box(2550, 2550)), - Box(Box(2551, 2551), Box(2551, 2551)), - Box(Box(2552, 2552), Box(2552, 2552)), - Box(Box(2553, 2553), Box(2553, 2553)), - Box(Box(2554, 2554), Box(2554, 2554)), - Box(Box(2555, 2555), Box(2555, 2555)), - Box(Box(2556, 2556), Box(2556, 2556)), - Box(Box(2557, 2557), Box(2557, 2557)), - Box(Box(2558, 2558), Box(2558, 2558)), - Box(Box(2559, 2559), Box(2559, 2559)), - Box(Box(2560, 2560), Box(2560, 2560)), - Box(Box(2561, 2561), Box(2561, 2561)), - Box(Box(2562, 2562), Box(2562, 2562)), - Box(Box(2563, 2563), Box(2563, 2563)), - Box(Box(2564, 2564), Box(2564, 2564)), - Box(Box(2565, 2565), Box(2565, 2565)), - Box(Box(2566, 2566), Box(2566, 2566)), - Box(Box(2567, 2567), Box(2567, 2567)), - Box(Box(2568, 2568), Box(2568, 2568)), - Box(Box(2569, 2569), Box(2569, 2569)), - Box(Box(2570, 2570), Box(2570, 2570)), - Box(Box(2571, 2571), Box(2571, 2571)), - Box(Box(2572, 2572), Box(2572, 2572)), - Box(Box(2573, 2573), Box(2573, 2573)), - Box(Box(2574, 2574), Box(2574, 2574)), - Box(Box(2575, 2575), Box(2575, 2575)), - Box(Box(2576, 2576), Box(2576, 2576)), - Box(Box(2577, 2577), Box(2577, 2577)), - Box(Box(2578, 2578), Box(2578, 2578)), - Box(Box(2579, 2579), Box(2579, 2579)), - Box(Box(2580, 2580), Box(2580, 2580)), - Box(Box(2581, 2581), Box(2581, 2581)), - Box(Box(2582, 2582), Box(2582, 2582)), - Box(Box(2583, 2583), Box(2583, 2583)), - Box(Box(2584, 2584), Box(2584, 2584)), - Box(Box(2585, 2585), Box(2585, 2585)), - Box(Box(2586, 2586), Box(2586, 2586)), - Box(Box(2587, 2587), Box(2587, 2587)), - Box(Box(2588, 2588), Box(2588, 2588)), - Box(Box(2589, 2589), Box(2589, 2589)), - Box(Box(2590, 2590), Box(2590, 2590)), - Box(Box(2591, 2591), Box(2591, 2591)), - Box(Box(2592, 2592), Box(2592, 2592)), - Box(Box(2593, 2593), Box(2593, 2593)), - Box(Box(2594, 2594), Box(2594, 2594)), - Box(Box(2595, 2595), Box(2595, 2595)), - Box(Box(2596, 2596), Box(2596, 2596)), - Box(Box(2597, 2597), Box(2597, 2597)), - Box(Box(2598, 2598), Box(2598, 2598)), - Box(Box(2599, 2599), Box(2599, 2599)), - Box(Box(2600, 2600), Box(2600, 2600)), - Box(Box(2601, 2601), Box(2601, 2601)), - Box(Box(2602, 2602), Box(2602, 2602)), - Box(Box(2603, 2603), Box(2603, 2603)), - Box(Box(2604, 2604), Box(2604, 2604)), - Box(Box(2605, 2605), Box(2605, 2605)), - Box(Box(2606, 2606), Box(2606, 2606)), - Box(Box(2607, 2607), Box(2607, 2607)), - Box(Box(2608, 2608), Box(2608, 2608)), - Box(Box(2609, 2609), Box(2609, 2609)), - Box(Box(2610, 2610), Box(2610, 2610)), - Box(Box(2611, 2611), Box(2611, 2611)), - Box(Box(2612, 2612), Box(2612, 2612)), - Box(Box(2613, 2613), Box(2613, 2613)), - Box(Box(2614, 2614), Box(2614, 2614)), - Box(Box(2615, 2615), Box(2615, 2615)), - Box(Box(2616, 2616), Box(2616, 2616)), - Box(Box(2617, 2617), Box(2617, 2617)), - Box(Box(2618, 2618), Box(2618, 2618)), - Box(Box(2619, 2619), Box(2619, 2619)), - Box(Box(2620, 2620), Box(2620, 2620)), - Box(Box(2621, 2621), Box(2621, 2621)), - Box(Box(2622, 2622), Box(2622, 2622)), - Box(Box(2623, 2623), Box(2623, 2623)), - Box(Box(2624, 2624), Box(2624, 2624)), - Box(Box(2625, 2625), Box(2625, 2625)), - Box(Box(2626, 2626), Box(2626, 2626)), - Box(Box(2627, 2627), Box(2627, 2627)), - Box(Box(2628, 2628), Box(2628, 2628)), - Box(Box(2629, 2629), Box(2629, 2629)), - Box(Box(2630, 2630), Box(2630, 2630)), - Box(Box(2631, 2631), Box(2631, 2631)), - Box(Box(2632, 2632), Box(2632, 2632)), - Box(Box(2633, 2633), Box(2633, 2633)), - Box(Box(2634, 2634), Box(2634, 2634)), - Box(Box(2635, 2635), Box(2635, 2635)), - Box(Box(2636, 2636), Box(2636, 2636)), - Box(Box(2637, 2637), Box(2637, 2637)), - Box(Box(2638, 2638), Box(2638, 2638)), - Box(Box(2639, 2639), Box(2639, 2639)), - Box(Box(2640, 2640), Box(2640, 2640)), - Box(Box(2641, 2641), Box(2641, 2641)), - Box(Box(2642, 2642), Box(2642, 2642)), - Box(Box(2643, 2643), Box(2643, 2643)), - Box(Box(2644, 2644), Box(2644, 2644)), - Box(Box(2645, 2645), Box(2645, 2645)), - Box(Box(2646, 2646), Box(2646, 2646)), - Box(Box(2647, 2647), Box(2647, 2647)), - Box(Box(2648, 2648), Box(2648, 2648)), - Box(Box(2649, 2649), Box(2649, 2649)), - Box(Box(2650, 2650), Box(2650, 2650)), - Box(Box(2651, 2651), Box(2651, 2651)), - Box(Box(2652, 2652), Box(2652, 2652)), - Box(Box(2653, 2653), Box(2653, 2653)), - Box(Box(2654, 2654), Box(2654, 2654)), - Box(Box(2655, 2655), Box(2655, 2655)), - Box(Box(2656, 2656), Box(2656, 2656)), - Box(Box(2657, 2657), Box(2657, 2657)), - Box(Box(2658, 2658), Box(2658, 2658)), - Box(Box(2659, 2659), Box(2659, 2659)), - Box(Box(2660, 2660), Box(2660, 2660)), - Box(Box(2661, 2661), Box(2661, 2661)), - Box(Box(2662, 2662), Box(2662, 2662)), - Box(Box(2663, 2663), Box(2663, 2663)), - Box(Box(2664, 2664), Box(2664, 2664)), - Box(Box(2665, 2665), Box(2665, 2665)), - Box(Box(2666, 2666), Box(2666, 2666)), - Box(Box(2667, 2667), Box(2667, 2667)), - Box(Box(2668, 2668), Box(2668, 2668)), - Box(Box(2669, 2669), Box(2669, 2669)), - Box(Box(2670, 2670), Box(2670, 2670)), - Box(Box(2671, 2671), Box(2671, 2671)), - Box(Box(2672, 2672), Box(2672, 2672)), - Box(Box(2673, 2673), Box(2673, 2673)), - Box(Box(2674, 2674), Box(2674, 2674)), - Box(Box(2675, 2675), Box(2675, 2675)), - Box(Box(2676, 2676), Box(2676, 2676)), - Box(Box(2677, 2677), Box(2677, 2677)), - Box(Box(2678, 2678), Box(2678, 2678)), - Box(Box(2679, 2679), Box(2679, 2679)), - Box(Box(2680, 2680), Box(2680, 2680)), - Box(Box(2681, 2681), Box(2681, 2681)), - Box(Box(2682, 2682), Box(2682, 2682)), - Box(Box(2683, 2683), Box(2683, 2683)), - Box(Box(2684, 2684), Box(2684, 2684)), - Box(Box(2685, 2685), Box(2685, 2685)), - Box(Box(2686, 2686), Box(2686, 2686)), - Box(Box(2687, 2687), Box(2687, 2687)), - Box(Box(2688, 2688), Box(2688, 2688)), - Box(Box(2689, 2689), Box(2689, 2689)), - Box(Box(2690, 2690), Box(2690, 2690)), - Box(Box(2691, 2691), Box(2691, 2691)), - Box(Box(2692, 2692), Box(2692, 2692)), - Box(Box(2693, 2693), Box(2693, 2693)), - Box(Box(2694, 2694), Box(2694, 2694)), - Box(Box(2695, 2695), Box(2695, 2695)), - Box(Box(2696, 2696), Box(2696, 2696)), - Box(Box(2697, 2697), Box(2697, 2697)), - Box(Box(2698, 2698), Box(2698, 2698)), - Box(Box(2699, 2699), Box(2699, 2699)), - Box(Box(2700, 2700), Box(2700, 2700)), - Box(Box(2701, 2701), Box(2701, 2701)), - Box(Box(2702, 2702), Box(2702, 2702)), - Box(Box(2703, 2703), Box(2703, 2703)), - Box(Box(2704, 2704), Box(2704, 2704)), - Box(Box(2705, 2705), Box(2705, 2705)), - Box(Box(2706, 2706), Box(2706, 2706)), - Box(Box(2707, 2707), Box(2707, 2707)), - Box(Box(2708, 2708), Box(2708, 2708)), - Box(Box(2709, 2709), Box(2709, 2709)), - Box(Box(2710, 2710), Box(2710, 2710)), - Box(Box(2711, 2711), Box(2711, 2711)), - Box(Box(2712, 2712), Box(2712, 2712)), - Box(Box(2713, 2713), Box(2713, 2713)), - Box(Box(2714, 2714), Box(2714, 2714)), - Box(Box(2715, 2715), Box(2715, 2715)), - Box(Box(2716, 2716), Box(2716, 2716)), - Box(Box(2717, 2717), Box(2717, 2717)), - Box(Box(2718, 2718), Box(2718, 2718)), - Box(Box(2719, 2719), Box(2719, 2719)), - Box(Box(2720, 2720), Box(2720, 2720)), - Box(Box(2721, 2721), Box(2721, 2721)), - Box(Box(2722, 2722), Box(2722, 2722)), - Box(Box(2723, 2723), Box(2723, 2723)), - Box(Box(2724, 2724), Box(2724, 2724)), - Box(Box(2725, 2725), Box(2725, 2725)), - Box(Box(2726, 2726), Box(2726, 2726)), - Box(Box(2727, 2727), Box(2727, 2727)), - Box(Box(2728, 2728), Box(2728, 2728)), - Box(Box(2729, 2729), Box(2729, 2729)), - Box(Box(2730, 2730), Box(2730, 2730)), - Box(Box(2731, 2731), Box(2731, 2731)), - Box(Box(2732, 2732), Box(2732, 2732)), - Box(Box(2733, 2733), Box(2733, 2733)), - Box(Box(2734, 2734), Box(2734, 2734)), - Box(Box(2735, 2735), Box(2735, 2735)), - Box(Box(2736, 2736), Box(2736, 2736)), - Box(Box(2737, 2737), Box(2737, 2737)), - Box(Box(2738, 2738), Box(2738, 2738)), - Box(Box(2739, 2739), Box(2739, 2739)), - Box(Box(2740, 2740), Box(2740, 2740)), - Box(Box(2741, 2741), Box(2741, 2741)), - Box(Box(2742, 2742), Box(2742, 2742)), - Box(Box(2743, 2743), Box(2743, 2743)), - Box(Box(2744, 2744), Box(2744, 2744)), - Box(Box(2745, 2745), Box(2745, 2745)), - Box(Box(2746, 2746), Box(2746, 2746)), - Box(Box(2747, 2747), Box(2747, 2747)), - Box(Box(2748, 2748), Box(2748, 2748)), - Box(Box(2749, 2749), Box(2749, 2749)), - Box(Box(2750, 2750), Box(2750, 2750)), - Box(Box(2751, 2751), Box(2751, 2751)), - Box(Box(2752, 2752), Box(2752, 2752)), - Box(Box(2753, 2753), Box(2753, 2753)), - Box(Box(2754, 2754), Box(2754, 2754)), - Box(Box(2755, 2755), Box(2755, 2755)), - Box(Box(2756, 2756), Box(2756, 2756)), - Box(Box(2757, 2757), Box(2757, 2757)), - Box(Box(2758, 2758), Box(2758, 2758)), - Box(Box(2759, 2759), Box(2759, 2759)), - Box(Box(2760, 2760), Box(2760, 2760)), - Box(Box(2761, 2761), Box(2761, 2761)), - Box(Box(2762, 2762), Box(2762, 2762)), - Box(Box(2763, 2763), Box(2763, 2763)), - Box(Box(2764, 2764), Box(2764, 2764)), - Box(Box(2765, 2765), Box(2765, 2765)), - Box(Box(2766, 2766), Box(2766, 2766)), - Box(Box(2767, 2767), Box(2767, 2767)), - Box(Box(2768, 2768), Box(2768, 2768)), - Box(Box(2769, 2769), Box(2769, 2769)), - Box(Box(2770, 2770), Box(2770, 2770)), - Box(Box(2771, 2771), Box(2771, 2771)), - Box(Box(2772, 2772), Box(2772, 2772)), - Box(Box(2773, 2773), Box(2773, 2773)), - Box(Box(2774, 2774), Box(2774, 2774)), - Box(Box(2775, 2775), Box(2775, 2775)), - Box(Box(2776, 2776), Box(2776, 2776)), - Box(Box(2777, 2777), Box(2777, 2777)), - Box(Box(2778, 2778), Box(2778, 2778)), - Box(Box(2779, 2779), Box(2779, 2779)), - Box(Box(2780, 2780), Box(2780, 2780)), - Box(Box(2781, 2781), Box(2781, 2781)), - Box(Box(2782, 2782), Box(2782, 2782)), - Box(Box(2783, 2783), Box(2783, 2783)), - Box(Box(2784, 2784), Box(2784, 2784)), - Box(Box(2785, 2785), Box(2785, 2785)), - Box(Box(2786, 2786), Box(2786, 2786)), - Box(Box(2787, 2787), Box(2787, 2787)), - Box(Box(2788, 2788), Box(2788, 2788)), - Box(Box(2789, 2789), Box(2789, 2789)), - Box(Box(2790, 2790), Box(2790, 2790)), - Box(Box(2791, 2791), Box(2791, 2791)), - Box(Box(2792, 2792), Box(2792, 2792)), - Box(Box(2793, 2793), Box(2793, 2793)), - Box(Box(2794, 2794), Box(2794, 2794)), - Box(Box(2795, 2795), Box(2795, 2795)), - Box(Box(2796, 2796), Box(2796, 2796)), - Box(Box(2797, 2797), Box(2797, 2797)), - Box(Box(2798, 2798), Box(2798, 2798)), - Box(Box(2799, 2799), Box(2799, 2799)), - Box(Box(2800, 2800), Box(2800, 2800)), - Box(Box(2801, 2801), Box(2801, 2801)), - Box(Box(2802, 2802), Box(2802, 2802)), - Box(Box(2803, 2803), Box(2803, 2803)), - Box(Box(2804, 2804), Box(2804, 2804)), - Box(Box(2805, 2805), Box(2805, 2805)), - Box(Box(2806, 2806), Box(2806, 2806)), - Box(Box(2807, 2807), Box(2807, 2807)), - Box(Box(2808, 2808), Box(2808, 2808)), - Box(Box(2809, 2809), Box(2809, 2809)), - Box(Box(2810, 2810), Box(2810, 2810)), - Box(Box(2811, 2811), Box(2811, 2811)), - Box(Box(2812, 2812), Box(2812, 2812)), - Box(Box(2813, 2813), Box(2813, 2813)), - Box(Box(2814, 2814), Box(2814, 2814)), - Box(Box(2815, 2815), Box(2815, 2815)), - Box(Box(2816, 2816), Box(2816, 2816)), - Box(Box(2817, 2817), Box(2817, 2817)), - Box(Box(2818, 2818), Box(2818, 2818)), - Box(Box(2819, 2819), Box(2819, 2819)), - Box(Box(2820, 2820), Box(2820, 2820)), - Box(Box(2821, 2821), Box(2821, 2821)), - Box(Box(2822, 2822), Box(2822, 2822)), - Box(Box(2823, 2823), Box(2823, 2823)), - Box(Box(2824, 2824), Box(2824, 2824)), - Box(Box(2825, 2825), Box(2825, 2825)), - Box(Box(2826, 2826), Box(2826, 2826)), - Box(Box(2827, 2827), Box(2827, 2827)), - Box(Box(2828, 2828), Box(2828, 2828)), - Box(Box(2829, 2829), Box(2829, 2829)), - Box(Box(2830, 2830), Box(2830, 2830)), - Box(Box(2831, 2831), Box(2831, 2831)), - Box(Box(2832, 2832), Box(2832, 2832)), - Box(Box(2833, 2833), Box(2833, 2833)), - Box(Box(2834, 2834), Box(2834, 2834)), - Box(Box(2835, 2835), Box(2835, 2835)), - Box(Box(2836, 2836), Box(2836, 2836)), - Box(Box(2837, 2837), Box(2837, 2837)), - Box(Box(2838, 2838), Box(2838, 2838)), - Box(Box(2839, 2839), Box(2839, 2839)), - Box(Box(2840, 2840), Box(2840, 2840)), - Box(Box(2841, 2841), Box(2841, 2841)), - Box(Box(2842, 2842), Box(2842, 2842)), - Box(Box(2843, 2843), Box(2843, 2843)), - Box(Box(2844, 2844), Box(2844, 2844)), - Box(Box(2845, 2845), Box(2845, 2845)), - Box(Box(2846, 2846), Box(2846, 2846)), - Box(Box(2847, 2847), Box(2847, 2847)), - Box(Box(2848, 2848), Box(2848, 2848)), - Box(Box(2849, 2849), Box(2849, 2849)), - Box(Box(2850, 2850), Box(2850, 2850)), - Box(Box(2851, 2851), Box(2851, 2851)), - Box(Box(2852, 2852), Box(2852, 2852)), - Box(Box(2853, 2853), Box(2853, 2853)), - Box(Box(2854, 2854), Box(2854, 2854)), - Box(Box(2855, 2855), Box(2855, 2855)), - Box(Box(2856, 2856), Box(2856, 2856)), - Box(Box(2857, 2857), Box(2857, 2857)), - Box(Box(2858, 2858), Box(2858, 2858)), - Box(Box(2859, 2859), Box(2859, 2859)), - Box(Box(2860, 2860), Box(2860, 2860)), - Box(Box(2861, 2861), Box(2861, 2861)), - Box(Box(2862, 2862), Box(2862, 2862)), - Box(Box(2863, 2863), Box(2863, 2863)), - Box(Box(2864, 2864), Box(2864, 2864)), - Box(Box(2865, 2865), Box(2865, 2865)), - Box(Box(2866, 2866), Box(2866, 2866)), - Box(Box(2867, 2867), Box(2867, 2867)), - Box(Box(2868, 2868), Box(2868, 2868)), - Box(Box(2869, 2869), Box(2869, 2869)), - Box(Box(2870, 2870), Box(2870, 2870)), - Box(Box(2871, 2871), Box(2871, 2871)), - Box(Box(2872, 2872), Box(2872, 2872)), - Box(Box(2873, 2873), Box(2873, 2873)), - Box(Box(2874, 2874), Box(2874, 2874)), - Box(Box(2875, 2875), Box(2875, 2875)), - Box(Box(2876, 2876), Box(2876, 2876)), - Box(Box(2877, 2877), Box(2877, 2877)), - Box(Box(2878, 2878), Box(2878, 2878)), - Box(Box(2879, 2879), Box(2879, 2879)), - Box(Box(2880, 2880), Box(2880, 2880)), - Box(Box(2881, 2881), Box(2881, 2881)), - Box(Box(2882, 2882), Box(2882, 2882)), - Box(Box(2883, 2883), Box(2883, 2883)), - Box(Box(2884, 2884), Box(2884, 2884)), - Box(Box(2885, 2885), Box(2885, 2885)), - Box(Box(2886, 2886), Box(2886, 2886)), - Box(Box(2887, 2887), Box(2887, 2887)), - Box(Box(2888, 2888), Box(2888, 2888)), - Box(Box(2889, 2889), Box(2889, 2889)), - Box(Box(2890, 2890), Box(2890, 2890)), - Box(Box(2891, 2891), Box(2891, 2891)), - Box(Box(2892, 2892), Box(2892, 2892)), - Box(Box(2893, 2893), Box(2893, 2893)), - Box(Box(2894, 2894), Box(2894, 2894)), - Box(Box(2895, 2895), Box(2895, 2895)), - Box(Box(2896, 2896), Box(2896, 2896)), - Box(Box(2897, 2897), Box(2897, 2897)), - Box(Box(2898, 2898), Box(2898, 2898)), - Box(Box(2899, 2899), Box(2899, 2899)), - Box(Box(2900, 2900), Box(2900, 2900)), - Box(Box(2901, 2901), Box(2901, 2901)), - Box(Box(2902, 2902), Box(2902, 2902)), - Box(Box(2903, 2903), Box(2903, 2903)), - Box(Box(2904, 2904), Box(2904, 2904)), - Box(Box(2905, 2905), Box(2905, 2905)), - Box(Box(2906, 2906), Box(2906, 2906)), - Box(Box(2907, 2907), Box(2907, 2907)), - Box(Box(2908, 2908), Box(2908, 2908)), - Box(Box(2909, 2909), Box(2909, 2909)), - Box(Box(2910, 2910), Box(2910, 2910)), - Box(Box(2911, 2911), Box(2911, 2911)), - Box(Box(2912, 2912), Box(2912, 2912)), - Box(Box(2913, 2913), Box(2913, 2913)), - Box(Box(2914, 2914), Box(2914, 2914)), - Box(Box(2915, 2915), Box(2915, 2915)), - Box(Box(2916, 2916), Box(2916, 2916)), - Box(Box(2917, 2917), Box(2917, 2917)), - Box(Box(2918, 2918), Box(2918, 2918)), - Box(Box(2919, 2919), Box(2919, 2919)), - Box(Box(2920, 2920), Box(2920, 2920)), - Box(Box(2921, 2921), Box(2921, 2921)), - Box(Box(2922, 2922), Box(2922, 2922)), - Box(Box(2923, 2923), Box(2923, 2923)), - Box(Box(2924, 2924), Box(2924, 2924)), - Box(Box(2925, 2925), Box(2925, 2925)), - Box(Box(2926, 2926), Box(2926, 2926)), - Box(Box(2927, 2927), Box(2927, 2927)), - Box(Box(2928, 2928), Box(2928, 2928)), - Box(Box(2929, 2929), Box(2929, 2929)), - Box(Box(2930, 2930), Box(2930, 2930)), - Box(Box(2931, 2931), Box(2931, 2931)), - Box(Box(2932, 2932), Box(2932, 2932)), - Box(Box(2933, 2933), Box(2933, 2933)), - Box(Box(2934, 2934), Box(2934, 2934)), - Box(Box(2935, 2935), Box(2935, 2935)), - Box(Box(2936, 2936), Box(2936, 2936)), - Box(Box(2937, 2937), Box(2937, 2937)), - Box(Box(2938, 2938), Box(2938, 2938)), - Box(Box(2939, 2939), Box(2939, 2939)), - Box(Box(2940, 2940), Box(2940, 2940)), - Box(Box(2941, 2941), Box(2941, 2941)), - Box(Box(2942, 2942), Box(2942, 2942)), - Box(Box(2943, 2943), Box(2943, 2943)), - Box(Box(2944, 2944), Box(2944, 2944)), - Box(Box(2945, 2945), Box(2945, 2945)), - Box(Box(2946, 2946), Box(2946, 2946)), - Box(Box(2947, 2947), Box(2947, 2947)), - Box(Box(2948, 2948), Box(2948, 2948)), - Box(Box(2949, 2949), Box(2949, 2949)), - Box(Box(2950, 2950), Box(2950, 2950)), - Box(Box(2951, 2951), Box(2951, 2951)), - Box(Box(2952, 2952), Box(2952, 2952)), - Box(Box(2953, 2953), Box(2953, 2953)), - Box(Box(2954, 2954), Box(2954, 2954)), - Box(Box(2955, 2955), Box(2955, 2955)), - Box(Box(2956, 2956), Box(2956, 2956)), - Box(Box(2957, 2957), Box(2957, 2957)), - Box(Box(2958, 2958), Box(2958, 2958)), - Box(Box(2959, 2959), Box(2959, 2959)), - Box(Box(2960, 2960), Box(2960, 2960)), - Box(Box(2961, 2961), Box(2961, 2961)), - Box(Box(2962, 2962), Box(2962, 2962)), - Box(Box(2963, 2963), Box(2963, 2963)), - Box(Box(2964, 2964), Box(2964, 2964)), - Box(Box(2965, 2965), Box(2965, 2965)), - Box(Box(2966, 2966), Box(2966, 2966)), - Box(Box(2967, 2967), Box(2967, 2967)), - Box(Box(2968, 2968), Box(2968, 2968)), - Box(Box(2969, 2969), Box(2969, 2969)), - Box(Box(2970, 2970), Box(2970, 2970)), - Box(Box(2971, 2971), Box(2971, 2971)), - Box(Box(2972, 2972), Box(2972, 2972)), - Box(Box(2973, 2973), Box(2973, 2973)), - Box(Box(2974, 2974), Box(2974, 2974)), - Box(Box(2975, 2975), Box(2975, 2975)), - Box(Box(2976, 2976), Box(2976, 2976)), - Box(Box(2977, 2977), Box(2977, 2977)), - Box(Box(2978, 2978), Box(2978, 2978)), - Box(Box(2979, 2979), Box(2979, 2979)), - Box(Box(2980, 2980), Box(2980, 2980)), - Box(Box(2981, 2981), Box(2981, 2981)), - Box(Box(2982, 2982), Box(2982, 2982)), - Box(Box(2983, 2983), Box(2983, 2983)), - Box(Box(2984, 2984), Box(2984, 2984)), - Box(Box(2985, 2985), Box(2985, 2985)), - Box(Box(2986, 2986), Box(2986, 2986)), - Box(Box(2987, 2987), Box(2987, 2987)), - Box(Box(2988, 2988), Box(2988, 2988)), - Box(Box(2989, 2989), Box(2989, 2989)), - Box(Box(2990, 2990), Box(2990, 2990)), - Box(Box(2991, 2991), Box(2991, 2991)), - Box(Box(2992, 2992), Box(2992, 2992)), - Box(Box(2993, 2993), Box(2993, 2993)), - Box(Box(2994, 2994), Box(2994, 2994)), - Box(Box(2995, 2995), Box(2995, 2995)), - Box(Box(2996, 2996), Box(2996, 2996)), - Box(Box(2997, 2997), Box(2997, 2997)), - Box(Box(2998, 2998), Box(2998, 2998)), - Box(Box(2999, 2999), Box(2999, 2999)), - Box(Box(3000, 3000), Box(3000, 3000)), - Box(Box(3001, 3001), Box(3001, 3001)), - Box(Box(3002, 3002), Box(3002, 3002)), - Box(Box(3003, 3003), Box(3003, 3003)), - Box(Box(3004, 3004), Box(3004, 3004)), - Box(Box(3005, 3005), Box(3005, 3005)), - Box(Box(3006, 3006), Box(3006, 3006)), - Box(Box(3007, 3007), Box(3007, 3007)), - Box(Box(3008, 3008), Box(3008, 3008)), - Box(Box(3009, 3009), Box(3009, 3009)), - Box(Box(3010, 3010), Box(3010, 3010)), - Box(Box(3011, 3011), Box(3011, 3011)), - Box(Box(3012, 3012), Box(3012, 3012)), - Box(Box(3013, 3013), Box(3013, 3013)), - Box(Box(3014, 3014), Box(3014, 3014)), - Box(Box(3015, 3015), Box(3015, 3015)), - Box(Box(3016, 3016), Box(3016, 3016)), - Box(Box(3017, 3017), Box(3017, 3017)), - Box(Box(3018, 3018), Box(3018, 3018)), - Box(Box(3019, 3019), Box(3019, 3019)), - Box(Box(3020, 3020), Box(3020, 3020)), - Box(Box(3021, 3021), Box(3021, 3021)), - Box(Box(3022, 3022), Box(3022, 3022)), - Box(Box(3023, 3023), Box(3023, 3023)), - Box(Box(3024, 3024), Box(3024, 3024)), - Box(Box(3025, 3025), Box(3025, 3025)), - Box(Box(3026, 3026), Box(3026, 3026)), - Box(Box(3027, 3027), Box(3027, 3027)), - Box(Box(3028, 3028), Box(3028, 3028)), - Box(Box(3029, 3029), Box(3029, 3029)), - Box(Box(3030, 3030), Box(3030, 3030)), - Box(Box(3031, 3031), Box(3031, 3031)), - Box(Box(3032, 3032), Box(3032, 3032)), - Box(Box(3033, 3033), Box(3033, 3033)), - Box(Box(3034, 3034), Box(3034, 3034)), - Box(Box(3035, 3035), Box(3035, 3035)), - Box(Box(3036, 3036), Box(3036, 3036)), - Box(Box(3037, 3037), Box(3037, 3037)), - Box(Box(3038, 3038), Box(3038, 3038)), - Box(Box(3039, 3039), Box(3039, 3039)), - Box(Box(3040, 3040), Box(3040, 3040)), - Box(Box(3041, 3041), Box(3041, 3041)), - Box(Box(3042, 3042), Box(3042, 3042)), - Box(Box(3043, 3043), Box(3043, 3043)), - Box(Box(3044, 3044), Box(3044, 3044)), - Box(Box(3045, 3045), Box(3045, 3045)), - Box(Box(3046, 3046), Box(3046, 3046)), - Box(Box(3047, 3047), Box(3047, 3047)), - Box(Box(3048, 3048), Box(3048, 3048)), - Box(Box(3049, 3049), Box(3049, 3049)), - Box(Box(3050, 3050), Box(3050, 3050)), - Box(Box(3051, 3051), Box(3051, 3051)), - Box(Box(3052, 3052), Box(3052, 3052)), - Box(Box(3053, 3053), Box(3053, 3053)), - Box(Box(3054, 3054), Box(3054, 3054)), - Box(Box(3055, 3055), Box(3055, 3055)), - Box(Box(3056, 3056), Box(3056, 3056)), - Box(Box(3057, 3057), Box(3057, 3057)), - Box(Box(3058, 3058), Box(3058, 3058)), - Box(Box(3059, 3059), Box(3059, 3059)), - Box(Box(3060, 3060), Box(3060, 3060)), - Box(Box(3061, 3061), Box(3061, 3061)), - Box(Box(3062, 3062), Box(3062, 3062)), - Box(Box(3063, 3063), Box(3063, 3063)), - Box(Box(3064, 3064), Box(3064, 3064)), - Box(Box(3065, 3065), Box(3065, 3065)), - Box(Box(3066, 3066), Box(3066, 3066)), - Box(Box(3067, 3067), Box(3067, 3067)), - Box(Box(3068, 3068), Box(3068, 3068)), - Box(Box(3069, 3069), Box(3069, 3069)), - Box(Box(3070, 3070), Box(3070, 3070)), - Box(Box(3071, 3071), Box(3071, 3071)), - Box(Box(3072, 3072), Box(3072, 3072)), - Box(Box(3073, 3073), Box(3073, 3073)), - Box(Box(3074, 3074), Box(3074, 3074)), - Box(Box(3075, 3075), Box(3075, 3075)), - Box(Box(3076, 3076), Box(3076, 3076)), - Box(Box(3077, 3077), Box(3077, 3077)), - Box(Box(3078, 3078), Box(3078, 3078)), - Box(Box(3079, 3079), Box(3079, 3079)), - Box(Box(3080, 3080), Box(3080, 3080)), - Box(Box(3081, 3081), Box(3081, 3081)), - Box(Box(3082, 3082), Box(3082, 3082)), - Box(Box(3083, 3083), Box(3083, 3083)), - Box(Box(3084, 3084), Box(3084, 3084)), - Box(Box(3085, 3085), Box(3085, 3085)), - Box(Box(3086, 3086), Box(3086, 3086)), - Box(Box(3087, 3087), Box(3087, 3087)), - Box(Box(3088, 3088), Box(3088, 3088)), - Box(Box(3089, 3089), Box(3089, 3089)), - Box(Box(3090, 3090), Box(3090, 3090)), - Box(Box(3091, 3091), Box(3091, 3091)), - Box(Box(3092, 3092), Box(3092, 3092)), - Box(Box(3093, 3093), Box(3093, 3093)), - Box(Box(3094, 3094), Box(3094, 3094)), - Box(Box(3095, 3095), Box(3095, 3095)), - Box(Box(3096, 3096), Box(3096, 3096)), - Box(Box(3097, 3097), Box(3097, 3097)), - Box(Box(3098, 3098), Box(3098, 3098)), - Box(Box(3099, 3099), Box(3099, 3099)), - Box(Box(3100, 3100), Box(3100, 3100)), - Box(Box(3101, 3101), Box(3101, 3101)), - Box(Box(3102, 3102), Box(3102, 3102)), - Box(Box(3103, 3103), Box(3103, 3103)), - Box(Box(3104, 3104), Box(3104, 3104)), - Box(Box(3105, 3105), Box(3105, 3105)), - Box(Box(3106, 3106), Box(3106, 3106)), - Box(Box(3107, 3107), Box(3107, 3107)), - Box(Box(3108, 3108), Box(3108, 3108)), - Box(Box(3109, 3109), Box(3109, 3109)), - Box(Box(3110, 3110), Box(3110, 3110)), - Box(Box(3111, 3111), Box(3111, 3111)), - Box(Box(3112, 3112), Box(3112, 3112)), - Box(Box(3113, 3113), Box(3113, 3113)), - Box(Box(3114, 3114), Box(3114, 3114)), - Box(Box(3115, 3115), Box(3115, 3115)), - Box(Box(3116, 3116), Box(3116, 3116)), - Box(Box(3117, 3117), Box(3117, 3117)), - Box(Box(3118, 3118), Box(3118, 3118)), - Box(Box(3119, 3119), Box(3119, 3119)), - Box(Box(3120, 3120), Box(3120, 3120)), - Box(Box(3121, 3121), Box(3121, 3121)), - Box(Box(3122, 3122), Box(3122, 3122)), - Box(Box(3123, 3123), Box(3123, 3123)), - Box(Box(3124, 3124), Box(3124, 3124)), - Box(Box(3125, 3125), Box(3125, 3125)), - Box(Box(3126, 3126), Box(3126, 3126)), - Box(Box(3127, 3127), Box(3127, 3127)), - Box(Box(3128, 3128), Box(3128, 3128)), - Box(Box(3129, 3129), Box(3129, 3129)), - Box(Box(3130, 3130), Box(3130, 3130)), - Box(Box(3131, 3131), Box(3131, 3131)), - Box(Box(3132, 3132), Box(3132, 3132)), - Box(Box(3133, 3133), Box(3133, 3133)), - Box(Box(3134, 3134), Box(3134, 3134)), - Box(Box(3135, 3135), Box(3135, 3135)), - Box(Box(3136, 3136), Box(3136, 3136)), - Box(Box(3137, 3137), Box(3137, 3137)), - Box(Box(3138, 3138), Box(3138, 3138)), - Box(Box(3139, 3139), Box(3139, 3139)), - Box(Box(3140, 3140), Box(3140, 3140)), - Box(Box(3141, 3141), Box(3141, 3141)), - Box(Box(3142, 3142), Box(3142, 3142)), - Box(Box(3143, 3143), Box(3143, 3143)), - Box(Box(3144, 3144), Box(3144, 3144)), - Box(Box(3145, 3145), Box(3145, 3145)), - Box(Box(3146, 3146), Box(3146, 3146)), - Box(Box(3147, 3147), Box(3147, 3147)), - Box(Box(3148, 3148), Box(3148, 3148)), - Box(Box(3149, 3149), Box(3149, 3149)), - Box(Box(3150, 3150), Box(3150, 3150)), - Box(Box(3151, 3151), Box(3151, 3151)), - Box(Box(3152, 3152), Box(3152, 3152)), - Box(Box(3153, 3153), Box(3153, 3153)), - Box(Box(3154, 3154), Box(3154, 3154)), - Box(Box(3155, 3155), Box(3155, 3155)), - Box(Box(3156, 3156), Box(3156, 3156)), - Box(Box(3157, 3157), Box(3157, 3157)), - Box(Box(3158, 3158), Box(3158, 3158)), - Box(Box(3159, 3159), Box(3159, 3159)), - Box(Box(3160, 3160), Box(3160, 3160)), - Box(Box(3161, 3161), Box(3161, 3161)), - Box(Box(3162, 3162), Box(3162, 3162)), - Box(Box(3163, 3163), Box(3163, 3163)), - Box(Box(3164, 3164), Box(3164, 3164)), - Box(Box(3165, 3165), Box(3165, 3165)), - Box(Box(3166, 3166), Box(3166, 3166)), - Box(Box(3167, 3167), Box(3167, 3167)), - Box(Box(3168, 3168), Box(3168, 3168)), - Box(Box(3169, 3169), Box(3169, 3169)), - Box(Box(3170, 3170), Box(3170, 3170)), - Box(Box(3171, 3171), Box(3171, 3171)), - Box(Box(3172, 3172), Box(3172, 3172)), - Box(Box(3173, 3173), Box(3173, 3173)), - Box(Box(3174, 3174), Box(3174, 3174)), - Box(Box(3175, 3175), Box(3175, 3175)), - Box(Box(3176, 3176), Box(3176, 3176)), - Box(Box(3177, 3177), Box(3177, 3177)), - Box(Box(3178, 3178), Box(3178, 3178)), - Box(Box(3179, 3179), Box(3179, 3179)), - Box(Box(3180, 3180), Box(3180, 3180)), - Box(Box(3181, 3181), Box(3181, 3181)), - Box(Box(3182, 3182), Box(3182, 3182)), - Box(Box(3183, 3183), Box(3183, 3183)), - Box(Box(3184, 3184), Box(3184, 3184)), - Box(Box(3185, 3185), Box(3185, 3185)), - Box(Box(3186, 3186), Box(3186, 3186)), - Box(Box(3187, 3187), Box(3187, 3187)), - Box(Box(3188, 3188), Box(3188, 3188)), - Box(Box(3189, 3189), Box(3189, 3189)), - Box(Box(3190, 3190), Box(3190, 3190)), - Box(Box(3191, 3191), Box(3191, 3191)), - Box(Box(3192, 3192), Box(3192, 3192)), - Box(Box(3193, 3193), Box(3193, 3193)), - Box(Box(3194, 3194), Box(3194, 3194)), - Box(Box(3195, 3195), Box(3195, 3195)), - Box(Box(3196, 3196), Box(3196, 3196)), - Box(Box(3197, 3197), Box(3197, 3197)), - Box(Box(3198, 3198), Box(3198, 3198)), - Box(Box(3199, 3199), Box(3199, 3199)), - Box(Box(3200, 3200), Box(3200, 3200)), - Box(Box(3201, 3201), Box(3201, 3201)), - Box(Box(3202, 3202), Box(3202, 3202)), - Box(Box(3203, 3203), Box(3203, 3203)), - Box(Box(3204, 3204), Box(3204, 3204)), - Box(Box(3205, 3205), Box(3205, 3205)), - Box(Box(3206, 3206), Box(3206, 3206)), - Box(Box(3207, 3207), Box(3207, 3207)), - Box(Box(3208, 3208), Box(3208, 3208)), - Box(Box(3209, 3209), Box(3209, 3209)), - Box(Box(3210, 3210), Box(3210, 3210)), - Box(Box(3211, 3211), Box(3211, 3211)), - Box(Box(3212, 3212), Box(3212, 3212)), - Box(Box(3213, 3213), Box(3213, 3213)), - Box(Box(3214, 3214), Box(3214, 3214)), - Box(Box(3215, 3215), Box(3215, 3215)), - Box(Box(3216, 3216), Box(3216, 3216)), - Box(Box(3217, 3217), Box(3217, 3217)), - Box(Box(3218, 3218), Box(3218, 3218)), - Box(Box(3219, 3219), Box(3219, 3219)), - Box(Box(3220, 3220), Box(3220, 3220)), - Box(Box(3221, 3221), Box(3221, 3221)), - Box(Box(3222, 3222), Box(3222, 3222)), - Box(Box(3223, 3223), Box(3223, 3223)), - Box(Box(3224, 3224), Box(3224, 3224)), - Box(Box(3225, 3225), Box(3225, 3225)), - Box(Box(3226, 3226), Box(3226, 3226)), - Box(Box(3227, 3227), Box(3227, 3227)), - Box(Box(3228, 3228), Box(3228, 3228)), - Box(Box(3229, 3229), Box(3229, 3229)), - Box(Box(3230, 3230), Box(3230, 3230)), - Box(Box(3231, 3231), Box(3231, 3231)), - Box(Box(3232, 3232), Box(3232, 3232)), - Box(Box(3233, 3233), Box(3233, 3233)), - Box(Box(3234, 3234), Box(3234, 3234)), - Box(Box(3235, 3235), Box(3235, 3235)), - Box(Box(3236, 3236), Box(3236, 3236)), - Box(Box(3237, 3237), Box(3237, 3237)), - Box(Box(3238, 3238), Box(3238, 3238)), - Box(Box(3239, 3239), Box(3239, 3239)), - Box(Box(3240, 3240), Box(3240, 3240)), - Box(Box(3241, 3241), Box(3241, 3241)), - Box(Box(3242, 3242), Box(3242, 3242)), - Box(Box(3243, 3243), Box(3243, 3243)), - Box(Box(3244, 3244), Box(3244, 3244)), - Box(Box(3245, 3245), Box(3245, 3245)), - Box(Box(3246, 3246), Box(3246, 3246)), - Box(Box(3247, 3247), Box(3247, 3247)), - Box(Box(3248, 3248), Box(3248, 3248)), - Box(Box(3249, 3249), Box(3249, 3249)), - Box(Box(3250, 3250), Box(3250, 3250)), - Box(Box(3251, 3251), Box(3251, 3251)), - Box(Box(3252, 3252), Box(3252, 3252)), - Box(Box(3253, 3253), Box(3253, 3253)), - Box(Box(3254, 3254), Box(3254, 3254)), - Box(Box(3255, 3255), Box(3255, 3255)), - Box(Box(3256, 3256), Box(3256, 3256)), - Box(Box(3257, 3257), Box(3257, 3257)), - Box(Box(3258, 3258), Box(3258, 3258)), - Box(Box(3259, 3259), Box(3259, 3259)), - Box(Box(3260, 3260), Box(3260, 3260)), - Box(Box(3261, 3261), Box(3261, 3261)), - Box(Box(3262, 3262), Box(3262, 3262)), - Box(Box(3263, 3263), Box(3263, 3263)), - Box(Box(3264, 3264), Box(3264, 3264)), - Box(Box(3265, 3265), Box(3265, 3265)), - Box(Box(3266, 3266), Box(3266, 3266)), - Box(Box(3267, 3267), Box(3267, 3267)), - Box(Box(3268, 3268), Box(3268, 3268)), - Box(Box(3269, 3269), Box(3269, 3269)), - Box(Box(3270, 3270), Box(3270, 3270)), - Box(Box(3271, 3271), Box(3271, 3271)), - Box(Box(3272, 3272), Box(3272, 3272)), - Box(Box(3273, 3273), Box(3273, 3273)), - Box(Box(3274, 3274), Box(3274, 3274)), - Box(Box(3275, 3275), Box(3275, 3275)), - Box(Box(3276, 3276), Box(3276, 3276)), - Box(Box(3277, 3277), Box(3277, 3277)), - Box(Box(3278, 3278), Box(3278, 3278)), - Box(Box(3279, 3279), Box(3279, 3279)), - Box(Box(3280, 3280), Box(3280, 3280)), - Box(Box(3281, 3281), Box(3281, 3281)), - Box(Box(3282, 3282), Box(3282, 3282)), - Box(Box(3283, 3283), Box(3283, 3283)), - Box(Box(3284, 3284), Box(3284, 3284)), - Box(Box(3285, 3285), Box(3285, 3285)), - Box(Box(3286, 3286), Box(3286, 3286)), - Box(Box(3287, 3287), Box(3287, 3287)), - Box(Box(3288, 3288), Box(3288, 3288)), - Box(Box(3289, 3289), Box(3289, 3289)), - Box(Box(3290, 3290), Box(3290, 3290)), - Box(Box(3291, 3291), Box(3291, 3291)), - Box(Box(3292, 3292), Box(3292, 3292)), - Box(Box(3293, 3293), Box(3293, 3293)), - Box(Box(3294, 3294), Box(3294, 3294)), - Box(Box(3295, 3295), Box(3295, 3295)), - Box(Box(3296, 3296), Box(3296, 3296)), - Box(Box(3297, 3297), Box(3297, 3297)), - Box(Box(3298, 3298), Box(3298, 3298)), - Box(Box(3299, 3299), Box(3299, 3299)), - Box(Box(3300, 3300), Box(3300, 3300)), - Box(Box(3301, 3301), Box(3301, 3301)), - Box(Box(3302, 3302), Box(3302, 3302)), - Box(Box(3303, 3303), Box(3303, 3303)), - Box(Box(3304, 3304), Box(3304, 3304)), - Box(Box(3305, 3305), Box(3305, 3305)), - Box(Box(3306, 3306), Box(3306, 3306)), - Box(Box(3307, 3307), Box(3307, 3307)), - Box(Box(3308, 3308), Box(3308, 3308)), - Box(Box(3309, 3309), Box(3309, 3309)), - Box(Box(3310, 3310), Box(3310, 3310)), - Box(Box(3311, 3311), Box(3311, 3311)), - Box(Box(3312, 3312), Box(3312, 3312)), - Box(Box(3313, 3313), Box(3313, 3313)), - Box(Box(3314, 3314), Box(3314, 3314)), - Box(Box(3315, 3315), Box(3315, 3315)), - Box(Box(3316, 3316), Box(3316, 3316)), - Box(Box(3317, 3317), Box(3317, 3317)), - Box(Box(3318, 3318), Box(3318, 3318)), - Box(Box(3319, 3319), Box(3319, 3319)), - Box(Box(3320, 3320), Box(3320, 3320)), - Box(Box(3321, 3321), Box(3321, 3321)), - Box(Box(3322, 3322), Box(3322, 3322)), - Box(Box(3323, 3323), Box(3323, 3323)), - Box(Box(3324, 3324), Box(3324, 3324)), - Box(Box(3325, 3325), Box(3325, 3325)), - Box(Box(3326, 3326), Box(3326, 3326)), - Box(Box(3327, 3327), Box(3327, 3327)), - Box(Box(3328, 3328), Box(3328, 3328)), - Box(Box(3329, 3329), Box(3329, 3329)), - Box(Box(3330, 3330), Box(3330, 3330)), - Box(Box(3331, 3331), Box(3331, 3331)), - Box(Box(3332, 3332), Box(3332, 3332)), - Box(Box(3333, 3333), Box(3333, 3333)), - Box(Box(3334, 3334), Box(3334, 3334)), - Box(Box(3335, 3335), Box(3335, 3335)), - Box(Box(3336, 3336), Box(3336, 3336)), - Box(Box(3337, 3337), Box(3337, 3337)), - Box(Box(3338, 3338), Box(3338, 3338)), - Box(Box(3339, 3339), Box(3339, 3339)), - Box(Box(3340, 3340), Box(3340, 3340)), - Box(Box(3341, 3341), Box(3341, 3341)), - Box(Box(3342, 3342), Box(3342, 3342)), - Box(Box(3343, 3343), Box(3343, 3343)), - Box(Box(3344, 3344), Box(3344, 3344)), - Box(Box(3345, 3345), Box(3345, 3345)), - Box(Box(3346, 3346), Box(3346, 3346)), - Box(Box(3347, 3347), Box(3347, 3347)), - Box(Box(3348, 3348), Box(3348, 3348)), - Box(Box(3349, 3349), Box(3349, 3349)), - Box(Box(3350, 3350), Box(3350, 3350)), - Box(Box(3351, 3351), Box(3351, 3351)), - Box(Box(3352, 3352), Box(3352, 3352)), - Box(Box(3353, 3353), Box(3353, 3353)), - Box(Box(3354, 3354), Box(3354, 3354)), - Box(Box(3355, 3355), Box(3355, 3355)), - Box(Box(3356, 3356), Box(3356, 3356)), - Box(Box(3357, 3357), Box(3357, 3357)), - Box(Box(3358, 3358), Box(3358, 3358)), - Box(Box(3359, 3359), Box(3359, 3359)), - Box(Box(3360, 3360), Box(3360, 3360)), - Box(Box(3361, 3361), Box(3361, 3361)), - Box(Box(3362, 3362), Box(3362, 3362)), - Box(Box(3363, 3363), Box(3363, 3363)), - Box(Box(3364, 3364), Box(3364, 3364)), - Box(Box(3365, 3365), Box(3365, 3365)), - Box(Box(3366, 3366), Box(3366, 3366)), - Box(Box(3367, 3367), Box(3367, 3367)), - Box(Box(3368, 3368), Box(3368, 3368)), - Box(Box(3369, 3369), Box(3369, 3369)), - Box(Box(3370, 3370), Box(3370, 3370)), - Box(Box(3371, 3371), Box(3371, 3371)), - Box(Box(3372, 3372), Box(3372, 3372)), - Box(Box(3373, 3373), Box(3373, 3373)), - Box(Box(3374, 3374), Box(3374, 3374)), - Box(Box(3375, 3375), Box(3375, 3375)), - Box(Box(3376, 3376), Box(3376, 3376)), - Box(Box(3377, 3377), Box(3377, 3377)), - Box(Box(3378, 3378), Box(3378, 3378)), - Box(Box(3379, 3379), Box(3379, 3379)), - Box(Box(3380, 3380), Box(3380, 3380)), - Box(Box(3381, 3381), Box(3381, 3381)), - Box(Box(3382, 3382), Box(3382, 3382)), - Box(Box(3383, 3383), Box(3383, 3383)), - Box(Box(3384, 3384), Box(3384, 3384)), - Box(Box(3385, 3385), Box(3385, 3385)), - Box(Box(3386, 3386), Box(3386, 3386)), - Box(Box(3387, 3387), Box(3387, 3387)), - Box(Box(3388, 3388), Box(3388, 3388)), - Box(Box(3389, 3389), Box(3389, 3389)), - Box(Box(3390, 3390), Box(3390, 3390)), - Box(Box(3391, 3391), Box(3391, 3391)), - Box(Box(3392, 3392), Box(3392, 3392)), - Box(Box(3393, 3393), Box(3393, 3393)), - Box(Box(3394, 3394), Box(3394, 3394)), - Box(Box(3395, 3395), Box(3395, 3395)), - Box(Box(3396, 3396), Box(3396, 3396)), - Box(Box(3397, 3397), Box(3397, 3397)), - Box(Box(3398, 3398), Box(3398, 3398)), - Box(Box(3399, 3399), Box(3399, 3399)), - Box(Box(3400, 3400), Box(3400, 3400)), - Box(Box(3401, 3401), Box(3401, 3401)), - Box(Box(3402, 3402), Box(3402, 3402)), - Box(Box(3403, 3403), Box(3403, 3403)), - Box(Box(3404, 3404), Box(3404, 3404)), - Box(Box(3405, 3405), Box(3405, 3405)), - Box(Box(3406, 3406), Box(3406, 3406)), - Box(Box(3407, 3407), Box(3407, 3407)), - Box(Box(3408, 3408), Box(3408, 3408)), - Box(Box(3409, 3409), Box(3409, 3409)), - Box(Box(3410, 3410), Box(3410, 3410)), - Box(Box(3411, 3411), Box(3411, 3411)), - Box(Box(3412, 3412), Box(3412, 3412)), - Box(Box(3413, 3413), Box(3413, 3413)), - Box(Box(3414, 3414), Box(3414, 3414)), - Box(Box(3415, 3415), Box(3415, 3415)), - Box(Box(3416, 3416), Box(3416, 3416)), - Box(Box(3417, 3417), Box(3417, 3417)), - Box(Box(3418, 3418), Box(3418, 3418)), - Box(Box(3419, 3419), Box(3419, 3419)), - Box(Box(3420, 3420), Box(3420, 3420)), - Box(Box(3421, 3421), Box(3421, 3421)), - Box(Box(3422, 3422), Box(3422, 3422)), - Box(Box(3423, 3423), Box(3423, 3423)), - Box(Box(3424, 3424), Box(3424, 3424)), - Box(Box(3425, 3425), Box(3425, 3425)), - Box(Box(3426, 3426), Box(3426, 3426)), - Box(Box(3427, 3427), Box(3427, 3427)), - Box(Box(3428, 3428), Box(3428, 3428)), - Box(Box(3429, 3429), Box(3429, 3429)), - Box(Box(3430, 3430), Box(3430, 3430)), - Box(Box(3431, 3431), Box(3431, 3431)), - Box(Box(3432, 3432), Box(3432, 3432)), - Box(Box(3433, 3433), Box(3433, 3433)), - Box(Box(3434, 3434), Box(3434, 3434)), - Box(Box(3435, 3435), Box(3435, 3435)), - Box(Box(3436, 3436), Box(3436, 3436)), - Box(Box(3437, 3437), Box(3437, 3437)), - Box(Box(3438, 3438), Box(3438, 3438)), - Box(Box(3439, 3439), Box(3439, 3439)), - Box(Box(3440, 3440), Box(3440, 3440)), - Box(Box(3441, 3441), Box(3441, 3441)), - Box(Box(3442, 3442), Box(3442, 3442)), - Box(Box(3443, 3443), Box(3443, 3443)), - Box(Box(3444, 3444), Box(3444, 3444)), - Box(Box(3445, 3445), Box(3445, 3445)), - Box(Box(3446, 3446), Box(3446, 3446)), - Box(Box(3447, 3447), Box(3447, 3447)), - Box(Box(3448, 3448), Box(3448, 3448)), - Box(Box(3449, 3449), Box(3449, 3449)), - Box(Box(3450, 3450), Box(3450, 3450)), - Box(Box(3451, 3451), Box(3451, 3451)), - Box(Box(3452, 3452), Box(3452, 3452)), - Box(Box(3453, 3453), Box(3453, 3453)), - Box(Box(3454, 3454), Box(3454, 3454)), - Box(Box(3455, 3455), Box(3455, 3455)), - Box(Box(3456, 3456), Box(3456, 3456)), - Box(Box(3457, 3457), Box(3457, 3457)), - Box(Box(3458, 3458), Box(3458, 3458)), - Box(Box(3459, 3459), Box(3459, 3459)), - Box(Box(3460, 3460), Box(3460, 3460)), - Box(Box(3461, 3461), Box(3461, 3461)), - Box(Box(3462, 3462), Box(3462, 3462)), - Box(Box(3463, 3463), Box(3463, 3463)), - Box(Box(3464, 3464), Box(3464, 3464)), - Box(Box(3465, 3465), Box(3465, 3465)), - Box(Box(3466, 3466), Box(3466, 3466)), - Box(Box(3467, 3467), Box(3467, 3467)), - Box(Box(3468, 3468), Box(3468, 3468)), - Box(Box(3469, 3469), Box(3469, 3469)), - Box(Box(3470, 3470), Box(3470, 3470)), - Box(Box(3471, 3471), Box(3471, 3471)), - Box(Box(3472, 3472), Box(3472, 3472)), - Box(Box(3473, 3473), Box(3473, 3473)), - Box(Box(3474, 3474), Box(3474, 3474)), - Box(Box(3475, 3475), Box(3475, 3475)), - Box(Box(3476, 3476), Box(3476, 3476)), - Box(Box(3477, 3477), Box(3477, 3477)), - Box(Box(3478, 3478), Box(3478, 3478)), - Box(Box(3479, 3479), Box(3479, 3479)), - Box(Box(3480, 3480), Box(3480, 3480)), - Box(Box(3481, 3481), Box(3481, 3481)), - Box(Box(3482, 3482), Box(3482, 3482)), - Box(Box(3483, 3483), Box(3483, 3483)), - Box(Box(3484, 3484), Box(3484, 3484)), - Box(Box(3485, 3485), Box(3485, 3485)), - Box(Box(3486, 3486), Box(3486, 3486)), - Box(Box(3487, 3487), Box(3487, 3487)), - Box(Box(3488, 3488), Box(3488, 3488)), - Box(Box(3489, 3489), Box(3489, 3489)), - Box(Box(3490, 3490), Box(3490, 3490)), - Box(Box(3491, 3491), Box(3491, 3491)), - Box(Box(3492, 3492), Box(3492, 3492)), - Box(Box(3493, 3493), Box(3493, 3493)), - Box(Box(3494, 3494), Box(3494, 3494)), - Box(Box(3495, 3495), Box(3495, 3495)), - Box(Box(3496, 3496), Box(3496, 3496)), - Box(Box(3497, 3497), Box(3497, 3497)), - Box(Box(3498, 3498), Box(3498, 3498)), - Box(Box(3499, 3499), Box(3499, 3499)), - Box(Box(3500, 3500), Box(3500, 3500)), - Box(Box(3501, 3501), Box(3501, 3501)), - Box(Box(3502, 3502), Box(3502, 3502)), - Box(Box(3503, 3503), Box(3503, 3503)), - Box(Box(3504, 3504), Box(3504, 3504)), - Box(Box(3505, 3505), Box(3505, 3505)), - Box(Box(3506, 3506), Box(3506, 3506)), - Box(Box(3507, 3507), Box(3507, 3507)), - Box(Box(3508, 3508), Box(3508, 3508)), - Box(Box(3509, 3509), Box(3509, 3509)), - Box(Box(3510, 3510), Box(3510, 3510)), - Box(Box(3511, 3511), Box(3511, 3511)), - Box(Box(3512, 3512), Box(3512, 3512)), - Box(Box(3513, 3513), Box(3513, 3513)), - Box(Box(3514, 3514), Box(3514, 3514)), - Box(Box(3515, 3515), Box(3515, 3515)), - Box(Box(3516, 3516), Box(3516, 3516)), - Box(Box(3517, 3517), Box(3517, 3517)), - Box(Box(3518, 3518), Box(3518, 3518)), - Box(Box(3519, 3519), Box(3519, 3519)), - Box(Box(3520, 3520), Box(3520, 3520)), - Box(Box(3521, 3521), Box(3521, 3521)), - Box(Box(3522, 3522), Box(3522, 3522)), - Box(Box(3523, 3523), Box(3523, 3523)), - Box(Box(3524, 3524), Box(3524, 3524)), - Box(Box(3525, 3525), Box(3525, 3525)), - Box(Box(3526, 3526), Box(3526, 3526)), - Box(Box(3527, 3527), Box(3527, 3527)), - Box(Box(3528, 3528), Box(3528, 3528)), - Box(Box(3529, 3529), Box(3529, 3529)), - Box(Box(3530, 3530), Box(3530, 3530)), - Box(Box(3531, 3531), Box(3531, 3531)), - Box(Box(3532, 3532), Box(3532, 3532)), - Box(Box(3533, 3533), Box(3533, 3533)), - Box(Box(3534, 3534), Box(3534, 3534)), - Box(Box(3535, 3535), Box(3535, 3535)), - Box(Box(3536, 3536), Box(3536, 3536)), - Box(Box(3537, 3537), Box(3537, 3537)), - Box(Box(3538, 3538), Box(3538, 3538)), - Box(Box(3539, 3539), Box(3539, 3539)), - Box(Box(3540, 3540), Box(3540, 3540)), - Box(Box(3541, 3541), Box(3541, 3541)), - Box(Box(3542, 3542), Box(3542, 3542)), - Box(Box(3543, 3543), Box(3543, 3543)), - Box(Box(3544, 3544), Box(3544, 3544)), - Box(Box(3545, 3545), Box(3545, 3545)), - Box(Box(3546, 3546), Box(3546, 3546)), - Box(Box(3547, 3547), Box(3547, 3547)), - Box(Box(3548, 3548), Box(3548, 3548)), - Box(Box(3549, 3549), Box(3549, 3549)), - Box(Box(3550, 3550), Box(3550, 3550)), - Box(Box(3551, 3551), Box(3551, 3551)), - Box(Box(3552, 3552), Box(3552, 3552)), - Box(Box(3553, 3553), Box(3553, 3553)), - Box(Box(3554, 3554), Box(3554, 3554)), - Box(Box(3555, 3555), Box(3555, 3555)), - Box(Box(3556, 3556), Box(3556, 3556)), - Box(Box(3557, 3557), Box(3557, 3557)), - Box(Box(3558, 3558), Box(3558, 3558)), - Box(Box(3559, 3559), Box(3559, 3559)), - Box(Box(3560, 3560), Box(3560, 3560)), - Box(Box(3561, 3561), Box(3561, 3561)), - Box(Box(3562, 3562), Box(3562, 3562)), - Box(Box(3563, 3563), Box(3563, 3563)), - Box(Box(3564, 3564), Box(3564, 3564)), - Box(Box(3565, 3565), Box(3565, 3565)), - Box(Box(3566, 3566), Box(3566, 3566)), - Box(Box(3567, 3567), Box(3567, 3567)), - Box(Box(3568, 3568), Box(3568, 3568)), - Box(Box(3569, 3569), Box(3569, 3569)), - Box(Box(3570, 3570), Box(3570, 3570)), - Box(Box(3571, 3571), Box(3571, 3571)), - Box(Box(3572, 3572), Box(3572, 3572)), - Box(Box(3573, 3573), Box(3573, 3573)), - Box(Box(3574, 3574), Box(3574, 3574)), - Box(Box(3575, 3575), Box(3575, 3575)), - Box(Box(3576, 3576), Box(3576, 3576)), - Box(Box(3577, 3577), Box(3577, 3577)), - Box(Box(3578, 3578), Box(3578, 3578)), - Box(Box(3579, 3579), Box(3579, 3579)), - Box(Box(3580, 3580), Box(3580, 3580)), - Box(Box(3581, 3581), Box(3581, 3581)), - Box(Box(3582, 3582), Box(3582, 3582)), - Box(Box(3583, 3583), Box(3583, 3583)), - Box(Box(3584, 3584), Box(3584, 3584)), - Box(Box(3585, 3585), Box(3585, 3585)), - Box(Box(3586, 3586), Box(3586, 3586)), - Box(Box(3587, 3587), Box(3587, 3587)), - Box(Box(3588, 3588), Box(3588, 3588)), - Box(Box(3589, 3589), Box(3589, 3589)), - Box(Box(3590, 3590), Box(3590, 3590)), - Box(Box(3591, 3591), Box(3591, 3591)), - Box(Box(3592, 3592), Box(3592, 3592)), - Box(Box(3593, 3593), Box(3593, 3593)), - Box(Box(3594, 3594), Box(3594, 3594)), - Box(Box(3595, 3595), Box(3595, 3595)), - Box(Box(3596, 3596), Box(3596, 3596)), - Box(Box(3597, 3597), Box(3597, 3597)), - Box(Box(3598, 3598), Box(3598, 3598)), - Box(Box(3599, 3599), Box(3599, 3599)), - Box(Box(3600, 3600), Box(3600, 3600)), - Box(Box(3601, 3601), Box(3601, 3601)), - Box(Box(3602, 3602), Box(3602, 3602)), - Box(Box(3603, 3603), Box(3603, 3603)), - Box(Box(3604, 3604), Box(3604, 3604)), - Box(Box(3605, 3605), Box(3605, 3605)), - Box(Box(3606, 3606), Box(3606, 3606)), - Box(Box(3607, 3607), Box(3607, 3607)), - Box(Box(3608, 3608), Box(3608, 3608)), - Box(Box(3609, 3609), Box(3609, 3609)), - Box(Box(3610, 3610), Box(3610, 3610)), - Box(Box(3611, 3611), Box(3611, 3611)), - Box(Box(3612, 3612), Box(3612, 3612)), - Box(Box(3613, 3613), Box(3613, 3613)), - Box(Box(3614, 3614), Box(3614, 3614)), - Box(Box(3615, 3615), Box(3615, 3615)), - Box(Box(3616, 3616), Box(3616, 3616)), - Box(Box(3617, 3617), Box(3617, 3617)), - Box(Box(3618, 3618), Box(3618, 3618)), - Box(Box(3619, 3619), Box(3619, 3619)), - Box(Box(3620, 3620), Box(3620, 3620)), - Box(Box(3621, 3621), Box(3621, 3621)), - Box(Box(3622, 3622), Box(3622, 3622)), - Box(Box(3623, 3623), Box(3623, 3623)), - Box(Box(3624, 3624), Box(3624, 3624)), - Box(Box(3625, 3625), Box(3625, 3625)), - Box(Box(3626, 3626), Box(3626, 3626)), - Box(Box(3627, 3627), Box(3627, 3627)), - Box(Box(3628, 3628), Box(3628, 3628)), - Box(Box(3629, 3629), Box(3629, 3629)), - Box(Box(3630, 3630), Box(3630, 3630)), - Box(Box(3631, 3631), Box(3631, 3631)), - Box(Box(3632, 3632), Box(3632, 3632)), - Box(Box(3633, 3633), Box(3633, 3633)), - Box(Box(3634, 3634), Box(3634, 3634)), - Box(Box(3635, 3635), Box(3635, 3635)), - Box(Box(3636, 3636), Box(3636, 3636)), - Box(Box(3637, 3637), Box(3637, 3637)), - Box(Box(3638, 3638), Box(3638, 3638)), - Box(Box(3639, 3639), Box(3639, 3639)), - Box(Box(3640, 3640), Box(3640, 3640)), - Box(Box(3641, 3641), Box(3641, 3641)), - Box(Box(3642, 3642), Box(3642, 3642)), - Box(Box(3643, 3643), Box(3643, 3643)), - Box(Box(3644, 3644), Box(3644, 3644)), - Box(Box(3645, 3645), Box(3645, 3645)), - Box(Box(3646, 3646), Box(3646, 3646)), - Box(Box(3647, 3647), Box(3647, 3647)), - Box(Box(3648, 3648), Box(3648, 3648)), - Box(Box(3649, 3649), Box(3649, 3649)), - Box(Box(3650, 3650), Box(3650, 3650)), - Box(Box(3651, 3651), Box(3651, 3651)), - Box(Box(3652, 3652), Box(3652, 3652)), - Box(Box(3653, 3653), Box(3653, 3653)), - Box(Box(3654, 3654), Box(3654, 3654)), - Box(Box(3655, 3655), Box(3655, 3655)), - Box(Box(3656, 3656), Box(3656, 3656)), - Box(Box(3657, 3657), Box(3657, 3657)), - Box(Box(3658, 3658), Box(3658, 3658)), - Box(Box(3659, 3659), Box(3659, 3659)), - Box(Box(3660, 3660), Box(3660, 3660)), - Box(Box(3661, 3661), Box(3661, 3661)), - Box(Box(3662, 3662), Box(3662, 3662)), - Box(Box(3663, 3663), Box(3663, 3663)), - Box(Box(3664, 3664), Box(3664, 3664)), - Box(Box(3665, 3665), Box(3665, 3665)), - Box(Box(3666, 3666), Box(3666, 3666)), - Box(Box(3667, 3667), Box(3667, 3667)), - Box(Box(3668, 3668), Box(3668, 3668)), - Box(Box(3669, 3669), Box(3669, 3669)), - Box(Box(3670, 3670), Box(3670, 3670)), - Box(Box(3671, 3671), Box(3671, 3671)), - Box(Box(3672, 3672), Box(3672, 3672)), - Box(Box(3673, 3673), Box(3673, 3673)), - Box(Box(3674, 3674), Box(3674, 3674)), - Box(Box(3675, 3675), Box(3675, 3675)), - Box(Box(3676, 3676), Box(3676, 3676)), - Box(Box(3677, 3677), Box(3677, 3677)), - Box(Box(3678, 3678), Box(3678, 3678)), - Box(Box(3679, 3679), Box(3679, 3679)), - Box(Box(3680, 3680), Box(3680, 3680)), - Box(Box(3681, 3681), Box(3681, 3681)), - Box(Box(3682, 3682), Box(3682, 3682)), - Box(Box(3683, 3683), Box(3683, 3683)), - Box(Box(3684, 3684), Box(3684, 3684)), - Box(Box(3685, 3685), Box(3685, 3685)), - Box(Box(3686, 3686), Box(3686, 3686)), - Box(Box(3687, 3687), Box(3687, 3687)), - Box(Box(3688, 3688), Box(3688, 3688)), - Box(Box(3689, 3689), Box(3689, 3689)), - Box(Box(3690, 3690), Box(3690, 3690)), - Box(Box(3691, 3691), Box(3691, 3691)), - Box(Box(3692, 3692), Box(3692, 3692)), - Box(Box(3693, 3693), Box(3693, 3693)), - Box(Box(3694, 3694), Box(3694, 3694)), - Box(Box(3695, 3695), Box(3695, 3695)), - Box(Box(3696, 3696), Box(3696, 3696)), - Box(Box(3697, 3697), Box(3697, 3697)), - Box(Box(3698, 3698), Box(3698, 3698)), - Box(Box(3699, 3699), Box(3699, 3699)), - Box(Box(3700, 3700), Box(3700, 3700)), - Box(Box(3701, 3701), Box(3701, 3701)), - Box(Box(3702, 3702), Box(3702, 3702)), - Box(Box(3703, 3703), Box(3703, 3703)), - Box(Box(3704, 3704), Box(3704, 3704)), - Box(Box(3705, 3705), Box(3705, 3705)), - Box(Box(3706, 3706), Box(3706, 3706)), - Box(Box(3707, 3707), Box(3707, 3707)), - Box(Box(3708, 3708), Box(3708, 3708)), - Box(Box(3709, 3709), Box(3709, 3709)), - Box(Box(3710, 3710), Box(3710, 3710)), - Box(Box(3711, 3711), Box(3711, 3711)), - Box(Box(3712, 3712), Box(3712, 3712)), - Box(Box(3713, 3713), Box(3713, 3713)), - Box(Box(3714, 3714), Box(3714, 3714)), - Box(Box(3715, 3715), Box(3715, 3715)), - Box(Box(3716, 3716), Box(3716, 3716)), - Box(Box(3717, 3717), Box(3717, 3717)), - Box(Box(3718, 3718), Box(3718, 3718)), - Box(Box(3719, 3719), Box(3719, 3719)), - Box(Box(3720, 3720), Box(3720, 3720)), - Box(Box(3721, 3721), Box(3721, 3721)), - Box(Box(3722, 3722), Box(3722, 3722)), - Box(Box(3723, 3723), Box(3723, 3723)), - Box(Box(3724, 3724), Box(3724, 3724)), - Box(Box(3725, 3725), Box(3725, 3725)), - Box(Box(3726, 3726), Box(3726, 3726)), - Box(Box(3727, 3727), Box(3727, 3727)), - Box(Box(3728, 3728), Box(3728, 3728)), - Box(Box(3729, 3729), Box(3729, 3729)), - Box(Box(3730, 3730), Box(3730, 3730)), - Box(Box(3731, 3731), Box(3731, 3731)), - Box(Box(3732, 3732), Box(3732, 3732)), - Box(Box(3733, 3733), Box(3733, 3733)), - Box(Box(3734, 3734), Box(3734, 3734)), - Box(Box(3735, 3735), Box(3735, 3735)), - Box(Box(3736, 3736), Box(3736, 3736)), - Box(Box(3737, 3737), Box(3737, 3737)), - Box(Box(3738, 3738), Box(3738, 3738)), - Box(Box(3739, 3739), Box(3739, 3739)), - Box(Box(3740, 3740), Box(3740, 3740)), - Box(Box(3741, 3741), Box(3741, 3741)), - Box(Box(3742, 3742), Box(3742, 3742)), - Box(Box(3743, 3743), Box(3743, 3743)), - Box(Box(3744, 3744), Box(3744, 3744)), - Box(Box(3745, 3745), Box(3745, 3745)), - Box(Box(3746, 3746), Box(3746, 3746)), - Box(Box(3747, 3747), Box(3747, 3747)), - Box(Box(3748, 3748), Box(3748, 3748)), - Box(Box(3749, 3749), Box(3749, 3749)), - Box(Box(3750, 3750), Box(3750, 3750)), - Box(Box(3751, 3751), Box(3751, 3751)), - Box(Box(3752, 3752), Box(3752, 3752)), - Box(Box(3753, 3753), Box(3753, 3753)), - Box(Box(3754, 3754), Box(3754, 3754)), - Box(Box(3755, 3755), Box(3755, 3755)), - Box(Box(3756, 3756), Box(3756, 3756)), - Box(Box(3757, 3757), Box(3757, 3757)), - Box(Box(3758, 3758), Box(3758, 3758)), - Box(Box(3759, 3759), Box(3759, 3759)), - Box(Box(3760, 3760), Box(3760, 3760)), - Box(Box(3761, 3761), Box(3761, 3761)), - Box(Box(3762, 3762), Box(3762, 3762)), - Box(Box(3763, 3763), Box(3763, 3763)), - Box(Box(3764, 3764), Box(3764, 3764)), - Box(Box(3765, 3765), Box(3765, 3765)), - Box(Box(3766, 3766), Box(3766, 3766)), - Box(Box(3767, 3767), Box(3767, 3767)), - Box(Box(3768, 3768), Box(3768, 3768)), - Box(Box(3769, 3769), Box(3769, 3769)), - Box(Box(3770, 3770), Box(3770, 3770)), - Box(Box(3771, 3771), Box(3771, 3771)), - Box(Box(3772, 3772), Box(3772, 3772)), - Box(Box(3773, 3773), Box(3773, 3773)), - Box(Box(3774, 3774), Box(3774, 3774)), - Box(Box(3775, 3775), Box(3775, 3775)), - Box(Box(3776, 3776), Box(3776, 3776)), - Box(Box(3777, 3777), Box(3777, 3777)), - Box(Box(3778, 3778), Box(3778, 3778)), - Box(Box(3779, 3779), Box(3779, 3779)), - Box(Box(3780, 3780), Box(3780, 3780)), - Box(Box(3781, 3781), Box(3781, 3781)), - Box(Box(3782, 3782), Box(3782, 3782)), - Box(Box(3783, 3783), Box(3783, 3783)), - Box(Box(3784, 3784), Box(3784, 3784)), - Box(Box(3785, 3785), Box(3785, 3785)), - Box(Box(3786, 3786), Box(3786, 3786)), - Box(Box(3787, 3787), Box(3787, 3787)), - Box(Box(3788, 3788), Box(3788, 3788)), - Box(Box(3789, 3789), Box(3789, 3789)), - Box(Box(3790, 3790), Box(3790, 3790)), - Box(Box(3791, 3791), Box(3791, 3791)), - Box(Box(3792, 3792), Box(3792, 3792)), - Box(Box(3793, 3793), Box(3793, 3793)), - Box(Box(3794, 3794), Box(3794, 3794)), - Box(Box(3795, 3795), Box(3795, 3795)), - Box(Box(3796, 3796), Box(3796, 3796)), - Box(Box(3797, 3797), Box(3797, 3797)), - Box(Box(3798, 3798), Box(3798, 3798)), - Box(Box(3799, 3799), Box(3799, 3799)), - Box(Box(3800, 3800), Box(3800, 3800)), - Box(Box(3801, 3801), Box(3801, 3801)), - Box(Box(3802, 3802), Box(3802, 3802)), - Box(Box(3803, 3803), Box(3803, 3803)), - Box(Box(3804, 3804), Box(3804, 3804)), - Box(Box(3805, 3805), Box(3805, 3805)), - Box(Box(3806, 3806), Box(3806, 3806)), - Box(Box(3807, 3807), Box(3807, 3807)), - Box(Box(3808, 3808), Box(3808, 3808)), - Box(Box(3809, 3809), Box(3809, 3809)), - Box(Box(3810, 3810), Box(3810, 3810)), - Box(Box(3811, 3811), Box(3811, 3811)), - Box(Box(3812, 3812), Box(3812, 3812)), - Box(Box(3813, 3813), Box(3813, 3813)), - Box(Box(3814, 3814), Box(3814, 3814)), - Box(Box(3815, 3815), Box(3815, 3815)), - Box(Box(3816, 3816), Box(3816, 3816)), - Box(Box(3817, 3817), Box(3817, 3817)), - Box(Box(3818, 3818), Box(3818, 3818)), - Box(Box(3819, 3819), Box(3819, 3819)), - Box(Box(3820, 3820), Box(3820, 3820)), - Box(Box(3821, 3821), Box(3821, 3821)), - Box(Box(3822, 3822), Box(3822, 3822)), - Box(Box(3823, 3823), Box(3823, 3823)), - Box(Box(3824, 3824), Box(3824, 3824)), - Box(Box(3825, 3825), Box(3825, 3825)), - Box(Box(3826, 3826), Box(3826, 3826)), - Box(Box(3827, 3827), Box(3827, 3827)), - Box(Box(3828, 3828), Box(3828, 3828)), - Box(Box(3829, 3829), Box(3829, 3829)), - Box(Box(3830, 3830), Box(3830, 3830)), - Box(Box(3831, 3831), Box(3831, 3831)), - Box(Box(3832, 3832), Box(3832, 3832)), - Box(Box(3833, 3833), Box(3833, 3833)), - Box(Box(3834, 3834), Box(3834, 3834)), - Box(Box(3835, 3835), Box(3835, 3835)), - Box(Box(3836, 3836), Box(3836, 3836)), - Box(Box(3837, 3837), Box(3837, 3837)), - Box(Box(3838, 3838), Box(3838, 3838)), - Box(Box(3839, 3839), Box(3839, 3839)), - Box(Box(3840, 3840), Box(3840, 3840)), - Box(Box(3841, 3841), Box(3841, 3841)), - Box(Box(3842, 3842), Box(3842, 3842)), - Box(Box(3843, 3843), Box(3843, 3843)), - Box(Box(3844, 3844), Box(3844, 3844)), - Box(Box(3845, 3845), Box(3845, 3845)), - Box(Box(3846, 3846), Box(3846, 3846)), - Box(Box(3847, 3847), Box(3847, 3847)), - Box(Box(3848, 3848), Box(3848, 3848)), - Box(Box(3849, 3849), Box(3849, 3849)), - Box(Box(3850, 3850), Box(3850, 3850)), - Box(Box(3851, 3851), Box(3851, 3851)), - Box(Box(3852, 3852), Box(3852, 3852)), - Box(Box(3853, 3853), Box(3853, 3853)), - Box(Box(3854, 3854), Box(3854, 3854)), - Box(Box(3855, 3855), Box(3855, 3855)), - Box(Box(3856, 3856), Box(3856, 3856)), - Box(Box(3857, 3857), Box(3857, 3857)), - Box(Box(3858, 3858), Box(3858, 3858)), - Box(Box(3859, 3859), Box(3859, 3859)), - Box(Box(3860, 3860), Box(3860, 3860)), - Box(Box(3861, 3861), Box(3861, 3861)), - Box(Box(3862, 3862), Box(3862, 3862)), - Box(Box(3863, 3863), Box(3863, 3863)), - Box(Box(3864, 3864), Box(3864, 3864)), - Box(Box(3865, 3865), Box(3865, 3865)), - Box(Box(3866, 3866), Box(3866, 3866)), - Box(Box(3867, 3867), Box(3867, 3867)), - Box(Box(3868, 3868), Box(3868, 3868)), - Box(Box(3869, 3869), Box(3869, 3869)), - Box(Box(3870, 3870), Box(3870, 3870)), - Box(Box(3871, 3871), Box(3871, 3871)), - Box(Box(3872, 3872), Box(3872, 3872)), - Box(Box(3873, 3873), Box(3873, 3873)), - Box(Box(3874, 3874), Box(3874, 3874)), - Box(Box(3875, 3875), Box(3875, 3875)), - Box(Box(3876, 3876), Box(3876, 3876)), - Box(Box(3877, 3877), Box(3877, 3877)), - Box(Box(3878, 3878), Box(3878, 3878)), - Box(Box(3879, 3879), Box(3879, 3879)), - Box(Box(3880, 3880), Box(3880, 3880)), - Box(Box(3881, 3881), Box(3881, 3881)), - Box(Box(3882, 3882), Box(3882, 3882)), - Box(Box(3883, 3883), Box(3883, 3883)), - Box(Box(3884, 3884), Box(3884, 3884)), - Box(Box(3885, 3885), Box(3885, 3885)), - Box(Box(3886, 3886), Box(3886, 3886)), - Box(Box(3887, 3887), Box(3887, 3887)), - Box(Box(3888, 3888), Box(3888, 3888)), - Box(Box(3889, 3889), Box(3889, 3889)), - Box(Box(3890, 3890), Box(3890, 3890)), - Box(Box(3891, 3891), Box(3891, 3891)), - Box(Box(3892, 3892), Box(3892, 3892)), - Box(Box(3893, 3893), Box(3893, 3893)), - Box(Box(3894, 3894), Box(3894, 3894)), - Box(Box(3895, 3895), Box(3895, 3895)), - Box(Box(3896, 3896), Box(3896, 3896)), - Box(Box(3897, 3897), Box(3897, 3897)), - Box(Box(3898, 3898), Box(3898, 3898)), - Box(Box(3899, 3899), Box(3899, 3899)), - Box(Box(3900, 3900), Box(3900, 3900)), - Box(Box(3901, 3901), Box(3901, 3901)), - Box(Box(3902, 3902), Box(3902, 3902)), - Box(Box(3903, 3903), Box(3903, 3903)), - Box(Box(3904, 3904), Box(3904, 3904)), - Box(Box(3905, 3905), Box(3905, 3905)), - Box(Box(3906, 3906), Box(3906, 3906)), - Box(Box(3907, 3907), Box(3907, 3907)), - Box(Box(3908, 3908), Box(3908, 3908)), - Box(Box(3909, 3909), Box(3909, 3909)), - Box(Box(3910, 3910), Box(3910, 3910)), - Box(Box(3911, 3911), Box(3911, 3911)), - Box(Box(3912, 3912), Box(3912, 3912)), - Box(Box(3913, 3913), Box(3913, 3913)), - Box(Box(3914, 3914), Box(3914, 3914)), - Box(Box(3915, 3915), Box(3915, 3915)), - Box(Box(3916, 3916), Box(3916, 3916)), - Box(Box(3917, 3917), Box(3917, 3917)), - Box(Box(3918, 3918), Box(3918, 3918)), - Box(Box(3919, 3919), Box(3919, 3919)), - Box(Box(3920, 3920), Box(3920, 3920)), - Box(Box(3921, 3921), Box(3921, 3921)), - Box(Box(3922, 3922), Box(3922, 3922)), - Box(Box(3923, 3923), Box(3923, 3923)), - Box(Box(3924, 3924), Box(3924, 3924)), - Box(Box(3925, 3925), Box(3925, 3925)), - Box(Box(3926, 3926), Box(3926, 3926)), - Box(Box(3927, 3927), Box(3927, 3927)), - Box(Box(3928, 3928), Box(3928, 3928)), - Box(Box(3929, 3929), Box(3929, 3929)), - Box(Box(3930, 3930), Box(3930, 3930)), - Box(Box(3931, 3931), Box(3931, 3931)), - Box(Box(3932, 3932), Box(3932, 3932)), - Box(Box(3933, 3933), Box(3933, 3933)), - Box(Box(3934, 3934), Box(3934, 3934)), - Box(Box(3935, 3935), Box(3935, 3935)), - Box(Box(3936, 3936), Box(3936, 3936)), - Box(Box(3937, 3937), Box(3937, 3937)), - Box(Box(3938, 3938), Box(3938, 3938)), - Box(Box(3939, 3939), Box(3939, 3939)), - Box(Box(3940, 3940), Box(3940, 3940)), - Box(Box(3941, 3941), Box(3941, 3941)), - Box(Box(3942, 3942), Box(3942, 3942)), - Box(Box(3943, 3943), Box(3943, 3943)), - Box(Box(3944, 3944), Box(3944, 3944)), - Box(Box(3945, 3945), Box(3945, 3945)), - Box(Box(3946, 3946), Box(3946, 3946)), - Box(Box(3947, 3947), Box(3947, 3947)), - Box(Box(3948, 3948), Box(3948, 3948)), - Box(Box(3949, 3949), Box(3949, 3949)), - Box(Box(3950, 3950), Box(3950, 3950)), - Box(Box(3951, 3951), Box(3951, 3951)), - Box(Box(3952, 3952), Box(3952, 3952)), - Box(Box(3953, 3953), Box(3953, 3953)), - Box(Box(3954, 3954), Box(3954, 3954)), - Box(Box(3955, 3955), Box(3955, 3955)), - Box(Box(3956, 3956), Box(3956, 3956)), - Box(Box(3957, 3957), Box(3957, 3957)), - Box(Box(3958, 3958), Box(3958, 3958)), - Box(Box(3959, 3959), Box(3959, 3959)), - Box(Box(3960, 3960), Box(3960, 3960)), - Box(Box(3961, 3961), Box(3961, 3961)), - Box(Box(3962, 3962), Box(3962, 3962)), - Box(Box(3963, 3963), Box(3963, 3963)), - Box(Box(3964, 3964), Box(3964, 3964)), - Box(Box(3965, 3965), Box(3965, 3965)), - Box(Box(3966, 3966), Box(3966, 3966)), - Box(Box(3967, 3967), Box(3967, 3967)), - Box(Box(3968, 3968), Box(3968, 3968)), - Box(Box(3969, 3969), Box(3969, 3969)), - Box(Box(3970, 3970), Box(3970, 3970)), - Box(Box(3971, 3971), Box(3971, 3971)), - Box(Box(3972, 3972), Box(3972, 3972)), - Box(Box(3973, 3973), Box(3973, 3973)), - Box(Box(3974, 3974), Box(3974, 3974)), - Box(Box(3975, 3975), Box(3975, 3975)), - Box(Box(3976, 3976), Box(3976, 3976)), - Box(Box(3977, 3977), Box(3977, 3977)), - Box(Box(3978, 3978), Box(3978, 3978)), - Box(Box(3979, 3979), Box(3979, 3979)), - Box(Box(3980, 3980), Box(3980, 3980)), - Box(Box(3981, 3981), Box(3981, 3981)), - Box(Box(3982, 3982), Box(3982, 3982)), - Box(Box(3983, 3983), Box(3983, 3983)), - Box(Box(3984, 3984), Box(3984, 3984)), - Box(Box(3985, 3985), Box(3985, 3985)), - Box(Box(3986, 3986), Box(3986, 3986)), - Box(Box(3987, 3987), Box(3987, 3987)), - Box(Box(3988, 3988), Box(3988, 3988)), - Box(Box(3989, 3989), Box(3989, 3989)), - Box(Box(3990, 3990), Box(3990, 3990)), - Box(Box(3991, 3991), Box(3991, 3991)), - Box(Box(3992, 3992), Box(3992, 3992)), - Box(Box(3993, 3993), Box(3993, 3993)), - Box(Box(3994, 3994), Box(3994, 3994)), - Box(Box(3995, 3995), Box(3995, 3995)), - Box(Box(3996, 3996), Box(3996, 3996)), - Box(Box(3997, 3997), Box(3997, 3997)), - Box(Box(3998, 3998), Box(3998, 3998)), - Box(Box(3999, 3999), Box(3999, 3999)), - Box(Box(4000, 4000), Box(4000, 4000)), - Box(Box(4001, 4001), Box(4001, 4001)), - Box(Box(4002, 4002), Box(4002, 4002)), - Box(Box(4003, 4003), Box(4003, 4003)), - Box(Box(4004, 4004), Box(4004, 4004)), - Box(Box(4005, 4005), Box(4005, 4005)), - Box(Box(4006, 4006), Box(4006, 4006)), - Box(Box(4007, 4007), Box(4007, 4007)), - Box(Box(4008, 4008), Box(4008, 4008)), - Box(Box(4009, 4009), Box(4009, 4009)), - Box(Box(4010, 4010), Box(4010, 4010)), - Box(Box(4011, 4011), Box(4011, 4011)), - Box(Box(4012, 4012), Box(4012, 4012)), - Box(Box(4013, 4013), Box(4013, 4013)), - Box(Box(4014, 4014), Box(4014, 4014)), - Box(Box(4015, 4015), Box(4015, 4015)), - Box(Box(4016, 4016), Box(4016, 4016)), - Box(Box(4017, 4017), Box(4017, 4017)), - Box(Box(4018, 4018), Box(4018, 4018)), - Box(Box(4019, 4019), Box(4019, 4019)), - Box(Box(4020, 4020), Box(4020, 4020)), - Box(Box(4021, 4021), Box(4021, 4021)), - Box(Box(4022, 4022), Box(4022, 4022)), - Box(Box(4023, 4023), Box(4023, 4023)), - Box(Box(4024, 4024), Box(4024, 4024)), - Box(Box(4025, 4025), Box(4025, 4025)), - Box(Box(4026, 4026), Box(4026, 4026)), - Box(Box(4027, 4027), Box(4027, 4027)), - Box(Box(4028, 4028), Box(4028, 4028)), - Box(Box(4029, 4029), Box(4029, 4029)), - Box(Box(4030, 4030), Box(4030, 4030)), - Box(Box(4031, 4031), Box(4031, 4031)), - Box(Box(4032, 4032), Box(4032, 4032)), - Box(Box(4033, 4033), Box(4033, 4033)), - Box(Box(4034, 4034), Box(4034, 4034)), - Box(Box(4035, 4035), Box(4035, 4035)), - Box(Box(4036, 4036), Box(4036, 4036)), - Box(Box(4037, 4037), Box(4037, 4037)), - Box(Box(4038, 4038), Box(4038, 4038)), - Box(Box(4039, 4039), Box(4039, 4039)), - Box(Box(4040, 4040), Box(4040, 4040)), - Box(Box(4041, 4041), Box(4041, 4041)), - Box(Box(4042, 4042), Box(4042, 4042)), - Box(Box(4043, 4043), Box(4043, 4043)), - Box(Box(4044, 4044), Box(4044, 4044)), - Box(Box(4045, 4045), Box(4045, 4045)), - Box(Box(4046, 4046), Box(4046, 4046)), - Box(Box(4047, 4047), Box(4047, 4047)), - Box(Box(4048, 4048), Box(4048, 4048)), - Box(Box(4049, 4049), Box(4049, 4049)), - Box(Box(4050, 4050), Box(4050, 4050)), - Box(Box(4051, 4051), Box(4051, 4051)), - Box(Box(4052, 4052), Box(4052, 4052)), - Box(Box(4053, 4053), Box(4053, 4053)), - Box(Box(4054, 4054), Box(4054, 4054)), - Box(Box(4055, 4055), Box(4055, 4055)), - Box(Box(4056, 4056), Box(4056, 4056)), - Box(Box(4057, 4057), Box(4057, 4057)), - Box(Box(4058, 4058), Box(4058, 4058)), - Box(Box(4059, 4059), Box(4059, 4059)), - Box(Box(4060, 4060), Box(4060, 4060)), - Box(Box(4061, 4061), Box(4061, 4061)), - Box(Box(4062, 4062), Box(4062, 4062)), - Box(Box(4063, 4063), Box(4063, 4063)), - Box(Box(4064, 4064), Box(4064, 4064)), - Box(Box(4065, 4065), Box(4065, 4065)), - Box(Box(4066, 4066), Box(4066, 4066)), - Box(Box(4067, 4067), Box(4067, 4067)), - Box(Box(4068, 4068), Box(4068, 4068)), - Box(Box(4069, 4069), Box(4069, 4069)), - Box(Box(4070, 4070), Box(4070, 4070)), - Box(Box(4071, 4071), Box(4071, 4071)), - Box(Box(4072, 4072), Box(4072, 4072)), - Box(Box(4073, 4073), Box(4073, 4073)), - Box(Box(4074, 4074), Box(4074, 4074)), - Box(Box(4075, 4075), Box(4075, 4075)), - Box(Box(4076, 4076), Box(4076, 4076)), - Box(Box(4077, 4077), Box(4077, 4077)), - Box(Box(4078, 4078), Box(4078, 4078)), - Box(Box(4079, 4079), Box(4079, 4079)), - Box(Box(4080, 4080), Box(4080, 4080)), - Box(Box(4081, 4081), Box(4081, 4081)), - Box(Box(4082, 4082), Box(4082, 4082)), - Box(Box(4083, 4083), Box(4083, 4083)), - Box(Box(4084, 4084), Box(4084, 4084)), - Box(Box(4085, 4085), Box(4085, 4085)), - Box(Box(4086, 4086), Box(4086, 4086)), - Box(Box(4087, 4087), Box(4087, 4087)), - Box(Box(4088, 4088), Box(4088, 4088)), - Box(Box(4089, 4089), Box(4089, 4089)), - Box(Box(4090, 4090), Box(4090, 4090)), - Box(Box(4091, 4091), Box(4091, 4091)), - Box(Box(4092, 4092), Box(4092, 4092)), - Box(Box(4093, 4093), Box(4093, 4093)), - Box(Box(4094, 4094), Box(4094, 4094)), - Box(Box(4095, 4095), Box(4095, 4095)), - Box(Box(4096, 4096), Box(4096, 4096)), - Box(Box(4097, 4097), Box(4097, 4097)), - Box(Box(4098, 4098), Box(4098, 4098)), - Box(Box(4099, 4099), Box(4099, 4099)), - Box(Box(4100, 4100), Box(4100, 4100)), - Box(Box(4101, 4101), Box(4101, 4101)), - Box(Box(4102, 4102), Box(4102, 4102)), - Box(Box(4103, 4103), Box(4103, 4103)), - Box(Box(4104, 4104), Box(4104, 4104)), - Box(Box(4105, 4105), Box(4105, 4105)), - Box(Box(4106, 4106), Box(4106, 4106)), - Box(Box(4107, 4107), Box(4107, 4107)), - Box(Box(4108, 4108), Box(4108, 4108)), - Box(Box(4109, 4109), Box(4109, 4109)), - Box(Box(4110, 4110), Box(4110, 4110)), - Box(Box(4111, 4111), Box(4111, 4111)), - Box(Box(4112, 4112), Box(4112, 4112)), - Box(Box(4113, 4113), Box(4113, 4113)), - Box(Box(4114, 4114), Box(4114, 4114)), - Box(Box(4115, 4115), Box(4115, 4115)), - Box(Box(4116, 4116), Box(4116, 4116)), - Box(Box(4117, 4117), Box(4117, 4117)), - Box(Box(4118, 4118), Box(4118, 4118)), - Box(Box(4119, 4119), Box(4119, 4119)), - Box(Box(4120, 4120), Box(4120, 4120)), - Box(Box(4121, 4121), Box(4121, 4121)), - Box(Box(4122, 4122), Box(4122, 4122)), - Box(Box(4123, 4123), Box(4123, 4123)), - Box(Box(4124, 4124), Box(4124, 4124)), - Box(Box(4125, 4125), Box(4125, 4125)), - Box(Box(4126, 4126), Box(4126, 4126)), - Box(Box(4127, 4127), Box(4127, 4127)), - Box(Box(4128, 4128), Box(4128, 4128)), - Box(Box(4129, 4129), Box(4129, 4129)), - Box(Box(4130, 4130), Box(4130, 4130)), - Box(Box(4131, 4131), Box(4131, 4131)), - Box(Box(4132, 4132), Box(4132, 4132)), - Box(Box(4133, 4133), Box(4133, 4133)), - Box(Box(4134, 4134), Box(4134, 4134)), - Box(Box(4135, 4135), Box(4135, 4135)), - Box(Box(4136, 4136), Box(4136, 4136)), - Box(Box(4137, 4137), Box(4137, 4137)), - Box(Box(4138, 4138), Box(4138, 4138)), - Box(Box(4139, 4139), Box(4139, 4139)), - Box(Box(4140, 4140), Box(4140, 4140)), - Box(Box(4141, 4141), Box(4141, 4141)), - Box(Box(4142, 4142), Box(4142, 4142)), - Box(Box(4143, 4143), Box(4143, 4143)), - Box(Box(4144, 4144), Box(4144, 4144)), - Box(Box(4145, 4145), Box(4145, 4145)), - Box(Box(4146, 4146), Box(4146, 4146)), - Box(Box(4147, 4147), Box(4147, 4147)), - Box(Box(4148, 4148), Box(4148, 4148)), - Box(Box(4149, 4149), Box(4149, 4149)), - Box(Box(4150, 4150), Box(4150, 4150)), - Box(Box(4151, 4151), Box(4151, 4151)), - Box(Box(4152, 4152), Box(4152, 4152)), - Box(Box(4153, 4153), Box(4153, 4153)), - Box(Box(4154, 4154), Box(4154, 4154)), - Box(Box(4155, 4155), Box(4155, 4155)), - Box(Box(4156, 4156), Box(4156, 4156)), - Box(Box(4157, 4157), Box(4157, 4157)), - Box(Box(4158, 4158), Box(4158, 4158)), - Box(Box(4159, 4159), Box(4159, 4159)), - Box(Box(4160, 4160), Box(4160, 4160)), - Box(Box(4161, 4161), Box(4161, 4161)), - Box(Box(4162, 4162), Box(4162, 4162)), - Box(Box(4163, 4163), Box(4163, 4163)), - Box(Box(4164, 4164), Box(4164, 4164)), - Box(Box(4165, 4165), Box(4165, 4165)), - Box(Box(4166, 4166), Box(4166, 4166)), - Box(Box(4167, 4167), Box(4167, 4167)), - Box(Box(4168, 4168), Box(4168, 4168)), - Box(Box(4169, 4169), Box(4169, 4169)), - Box(Box(4170, 4170), Box(4170, 4170)), - Box(Box(4171, 4171), Box(4171, 4171)), - Box(Box(4172, 4172), Box(4172, 4172)), - Box(Box(4173, 4173), Box(4173, 4173)), - Box(Box(4174, 4174), Box(4174, 4174)), - Box(Box(4175, 4175), Box(4175, 4175)), - Box(Box(4176, 4176), Box(4176, 4176)), - Box(Box(4177, 4177), Box(4177, 4177)), - Box(Box(4178, 4178), Box(4178, 4178)), - Box(Box(4179, 4179), Box(4179, 4179)), - Box(Box(4180, 4180), Box(4180, 4180)), - Box(Box(4181, 4181), Box(4181, 4181)), - Box(Box(4182, 4182), Box(4182, 4182)), - Box(Box(4183, 4183), Box(4183, 4183)), - Box(Box(4184, 4184), Box(4184, 4184)), - Box(Box(4185, 4185), Box(4185, 4185)), - Box(Box(4186, 4186), Box(4186, 4186)), - Box(Box(4187, 4187), Box(4187, 4187)), - Box(Box(4188, 4188), Box(4188, 4188)), - Box(Box(4189, 4189), Box(4189, 4189)), - Box(Box(4190, 4190), Box(4190, 4190)), - Box(Box(4191, 4191), Box(4191, 4191)), - Box(Box(4192, 4192), Box(4192, 4192)), - Box(Box(4193, 4193), Box(4193, 4193)), - Box(Box(4194, 4194), Box(4194, 4194)), - Box(Box(4195, 4195), Box(4195, 4195)), - Box(Box(4196, 4196), Box(4196, 4196)), - Box(Box(4197, 4197), Box(4197, 4197)), - Box(Box(4198, 4198), Box(4198, 4198)), - Box(Box(4199, 4199), Box(4199, 4199)), - Box(Box(4200, 4200), Box(4200, 4200)), - Box(Box(4201, 4201), Box(4201, 4201)), - Box(Box(4202, 4202), Box(4202, 4202)), - Box(Box(4203, 4203), Box(4203, 4203)), - Box(Box(4204, 4204), Box(4204, 4204)), - Box(Box(4205, 4205), Box(4205, 4205)), - Box(Box(4206, 4206), Box(4206, 4206)), - Box(Box(4207, 4207), Box(4207, 4207)), - Box(Box(4208, 4208), Box(4208, 4208)), - Box(Box(4209, 4209), Box(4209, 4209)), - Box(Box(4210, 4210), Box(4210, 4210)), - Box(Box(4211, 4211), Box(4211, 4211)), - Box(Box(4212, 4212), Box(4212, 4212)), - Box(Box(4213, 4213), Box(4213, 4213)), - Box(Box(4214, 4214), Box(4214, 4214)), - Box(Box(4215, 4215), Box(4215, 4215)), - Box(Box(4216, 4216), Box(4216, 4216)), - Box(Box(4217, 4217), Box(4217, 4217)), - Box(Box(4218, 4218), Box(4218, 4218)), - Box(Box(4219, 4219), Box(4219, 4219)), - Box(Box(4220, 4220), Box(4220, 4220)), - Box(Box(4221, 4221), Box(4221, 4221)), - Box(Box(4222, 4222), Box(4222, 4222)), - Box(Box(4223, 4223), Box(4223, 4223)), - Box(Box(4224, 4224), Box(4224, 4224)), - Box(Box(4225, 4225), Box(4225, 4225)), - Box(Box(4226, 4226), Box(4226, 4226)), - Box(Box(4227, 4227), Box(4227, 4227)), - Box(Box(4228, 4228), Box(4228, 4228)), - Box(Box(4229, 4229), Box(4229, 4229)), - Box(Box(4230, 4230), Box(4230, 4230)), - Box(Box(4231, 4231), Box(4231, 4231)), - Box(Box(4232, 4232), Box(4232, 4232)), - Box(Box(4233, 4233), Box(4233, 4233)), - Box(Box(4234, 4234), Box(4234, 4234)), - Box(Box(4235, 4235), Box(4235, 4235)), - Box(Box(4236, 4236), Box(4236, 4236)), - Box(Box(4237, 4237), Box(4237, 4237)), - Box(Box(4238, 4238), Box(4238, 4238)), - Box(Box(4239, 4239), Box(4239, 4239)), - Box(Box(4240, 4240), Box(4240, 4240)), - Box(Box(4241, 4241), Box(4241, 4241)), - Box(Box(4242, 4242), Box(4242, 4242)), - Box(Box(4243, 4243), Box(4243, 4243)), - Box(Box(4244, 4244), Box(4244, 4244)), - Box(Box(4245, 4245), Box(4245, 4245)), - Box(Box(4246, 4246), Box(4246, 4246)), - Box(Box(4247, 4247), Box(4247, 4247)), - Box(Box(4248, 4248), Box(4248, 4248)), - Box(Box(4249, 4249), Box(4249, 4249)), - Box(Box(4250, 4250), Box(4250, 4250)), - Box(Box(4251, 4251), Box(4251, 4251)), - Box(Box(4252, 4252), Box(4252, 4252)), - Box(Box(4253, 4253), Box(4253, 4253)), - Box(Box(4254, 4254), Box(4254, 4254)), - Box(Box(4255, 4255), Box(4255, 4255)), - Box(Box(4256, 4256), Box(4256, 4256)), - Box(Box(4257, 4257), Box(4257, 4257)), - Box(Box(4258, 4258), Box(4258, 4258)), - Box(Box(4259, 4259), Box(4259, 4259)), - Box(Box(4260, 4260), Box(4260, 4260)), - Box(Box(4261, 4261), Box(4261, 4261)), - Box(Box(4262, 4262), Box(4262, 4262)), - Box(Box(4263, 4263), Box(4263, 4263)), - Box(Box(4264, 4264), Box(4264, 4264)), - Box(Box(4265, 4265), Box(4265, 4265)), - Box(Box(4266, 4266), Box(4266, 4266)), - Box(Box(4267, 4267), Box(4267, 4267)), - Box(Box(4268, 4268), Box(4268, 4268)), - Box(Box(4269, 4269), Box(4269, 4269)), - Box(Box(4270, 4270), Box(4270, 4270)), - Box(Box(4271, 4271), Box(4271, 4271)), - Box(Box(4272, 4272), Box(4272, 4272)), - Box(Box(4273, 4273), Box(4273, 4273)), - Box(Box(4274, 4274), Box(4274, 4274)), - Box(Box(4275, 4275), Box(4275, 4275)), - Box(Box(4276, 4276), Box(4276, 4276)), - Box(Box(4277, 4277), Box(4277, 4277)), - Box(Box(4278, 4278), Box(4278, 4278)), - Box(Box(4279, 4279), Box(4279, 4279)), - Box(Box(4280, 4280), Box(4280, 4280)), - Box(Box(4281, 4281), Box(4281, 4281)), - Box(Box(4282, 4282), Box(4282, 4282)), - Box(Box(4283, 4283), Box(4283, 4283)), - Box(Box(4284, 4284), Box(4284, 4284)), - Box(Box(4285, 4285), Box(4285, 4285)), - Box(Box(4286, 4286), Box(4286, 4286)), - Box(Box(4287, 4287), Box(4287, 4287)), - Box(Box(4288, 4288), Box(4288, 4288)), - Box(Box(4289, 4289), Box(4289, 4289)), - Box(Box(4290, 4290), Box(4290, 4290)), - Box(Box(4291, 4291), Box(4291, 4291)), - Box(Box(4292, 4292), Box(4292, 4292)), - Box(Box(4293, 4293), Box(4293, 4293)), - Box(Box(4294, 4294), Box(4294, 4294)), - Box(Box(4295, 4295), Box(4295, 4295)), - Box(Box(4296, 4296), Box(4296, 4296)), - Box(Box(4297, 4297), Box(4297, 4297)), - Box(Box(4298, 4298), Box(4298, 4298)), - Box(Box(4299, 4299), Box(4299, 4299)), - Box(Box(4300, 4300), Box(4300, 4300)), - Box(Box(4301, 4301), Box(4301, 4301)), - Box(Box(4302, 4302), Box(4302, 4302)), - Box(Box(4303, 4303), Box(4303, 4303)), - Box(Box(4304, 4304), Box(4304, 4304)), - Box(Box(4305, 4305), Box(4305, 4305)), - Box(Box(4306, 4306), Box(4306, 4306)), - Box(Box(4307, 4307), Box(4307, 4307)), - Box(Box(4308, 4308), Box(4308, 4308)), - Box(Box(4309, 4309), Box(4309, 4309)), - Box(Box(4310, 4310), Box(4310, 4310)), - Box(Box(4311, 4311), Box(4311, 4311)), - Box(Box(4312, 4312), Box(4312, 4312)), - Box(Box(4313, 4313), Box(4313, 4313)), - Box(Box(4314, 4314), Box(4314, 4314)), - Box(Box(4315, 4315), Box(4315, 4315)), - Box(Box(4316, 4316), Box(4316, 4316)), - Box(Box(4317, 4317), Box(4317, 4317)), - Box(Box(4318, 4318), Box(4318, 4318)), - Box(Box(4319, 4319), Box(4319, 4319)), - Box(Box(4320, 4320), Box(4320, 4320)), - Box(Box(4321, 4321), Box(4321, 4321)), - Box(Box(4322, 4322), Box(4322, 4322)), - Box(Box(4323, 4323), Box(4323, 4323)), - Box(Box(4324, 4324), Box(4324, 4324)), - Box(Box(4325, 4325), Box(4325, 4325)), - Box(Box(4326, 4326), Box(4326, 4326)), - Box(Box(4327, 4327), Box(4327, 4327)), - Box(Box(4328, 4328), Box(4328, 4328)), - Box(Box(4329, 4329), Box(4329, 4329)), - Box(Box(4330, 4330), Box(4330, 4330)), - Box(Box(4331, 4331), Box(4331, 4331)), - Box(Box(4332, 4332), Box(4332, 4332)), - Box(Box(4333, 4333), Box(4333, 4333)), - Box(Box(4334, 4334), Box(4334, 4334)), - Box(Box(4335, 4335), Box(4335, 4335)), - Box(Box(4336, 4336), Box(4336, 4336)), - Box(Box(4337, 4337), Box(4337, 4337)), - Box(Box(4338, 4338), Box(4338, 4338)), - Box(Box(4339, 4339), Box(4339, 4339)), - Box(Box(4340, 4340), Box(4340, 4340)), - Box(Box(4341, 4341), Box(4341, 4341)), - Box(Box(4342, 4342), Box(4342, 4342)), - Box(Box(4343, 4343), Box(4343, 4343)), - Box(Box(4344, 4344), Box(4344, 4344)), - Box(Box(4345, 4345), Box(4345, 4345)), - Box(Box(4346, 4346), Box(4346, 4346)), - Box(Box(4347, 4347), Box(4347, 4347)), - Box(Box(4348, 4348), Box(4348, 4348)), - Box(Box(4349, 4349), Box(4349, 4349)), - Box(Box(4350, 4350), Box(4350, 4350)), - Box(Box(4351, 4351), Box(4351, 4351)), - Box(Box(4352, 4352), Box(4352, 4352)), - Box(Box(4353, 4353), Box(4353, 4353)), - Box(Box(4354, 4354), Box(4354, 4354)), - Box(Box(4355, 4355), Box(4355, 4355)), - Box(Box(4356, 4356), Box(4356, 4356)), - Box(Box(4357, 4357), Box(4357, 4357)), - Box(Box(4358, 4358), Box(4358, 4358)), - Box(Box(4359, 4359), Box(4359, 4359)), - Box(Box(4360, 4360), Box(4360, 4360)), - Box(Box(4361, 4361), Box(4361, 4361)), - Box(Box(4362, 4362), Box(4362, 4362)), - Box(Box(4363, 4363), Box(4363, 4363)), - Box(Box(4364, 4364), Box(4364, 4364)), - Box(Box(4365, 4365), Box(4365, 4365)), - Box(Box(4366, 4366), Box(4366, 4366)), - Box(Box(4367, 4367), Box(4367, 4367)), - Box(Box(4368, 4368), Box(4368, 4368)), - Box(Box(4369, 4369), Box(4369, 4369)), - Box(Box(4370, 4370), Box(4370, 4370)), - Box(Box(4371, 4371), Box(4371, 4371)), - Box(Box(4372, 4372), Box(4372, 4372)), - Box(Box(4373, 4373), Box(4373, 4373)), - Box(Box(4374, 4374), Box(4374, 4374)), - Box(Box(4375, 4375), Box(4375, 4375)), - Box(Box(4376, 4376), Box(4376, 4376)), - Box(Box(4377, 4377), Box(4377, 4377)), - Box(Box(4378, 4378), Box(4378, 4378)), - Box(Box(4379, 4379), Box(4379, 4379)), - Box(Box(4380, 4380), Box(4380, 4380)), - Box(Box(4381, 4381), Box(4381, 4381)), - Box(Box(4382, 4382), Box(4382, 4382)), - Box(Box(4383, 4383), Box(4383, 4383)), - Box(Box(4384, 4384), Box(4384, 4384)), - Box(Box(4385, 4385), Box(4385, 4385)), - Box(Box(4386, 4386), Box(4386, 4386)), - Box(Box(4387, 4387), Box(4387, 4387)), - Box(Box(4388, 4388), Box(4388, 4388)), - Box(Box(4389, 4389), Box(4389, 4389)), - Box(Box(4390, 4390), Box(4390, 4390)), - Box(Box(4391, 4391), Box(4391, 4391)), - Box(Box(4392, 4392), Box(4392, 4392)), - Box(Box(4393, 4393), Box(4393, 4393)), - Box(Box(4394, 4394), Box(4394, 4394)), - Box(Box(4395, 4395), Box(4395, 4395)), - Box(Box(4396, 4396), Box(4396, 4396)), - Box(Box(4397, 4397), Box(4397, 4397)), - Box(Box(4398, 4398), Box(4398, 4398)), - Box(Box(4399, 4399), Box(4399, 4399)), - Box(Box(4400, 4400), Box(4400, 4400)), - Box(Box(4401, 4401), Box(4401, 4401)), - Box(Box(4402, 4402), Box(4402, 4402)), - Box(Box(4403, 4403), Box(4403, 4403)), - Box(Box(4404, 4404), Box(4404, 4404)), - Box(Box(4405, 4405), Box(4405, 4405)), - Box(Box(4406, 4406), Box(4406, 4406)), - Box(Box(4407, 4407), Box(4407, 4407)), - Box(Box(4408, 4408), Box(4408, 4408)), - Box(Box(4409, 4409), Box(4409, 4409)), - Box(Box(4410, 4410), Box(4410, 4410)), - Box(Box(4411, 4411), Box(4411, 4411)), - Box(Box(4412, 4412), Box(4412, 4412)), - Box(Box(4413, 4413), Box(4413, 4413)), - Box(Box(4414, 4414), Box(4414, 4414)), - Box(Box(4415, 4415), Box(4415, 4415)), - Box(Box(4416, 4416), Box(4416, 4416)), - Box(Box(4417, 4417), Box(4417, 4417)), - Box(Box(4418, 4418), Box(4418, 4418)), - Box(Box(4419, 4419), Box(4419, 4419)), - Box(Box(4420, 4420), Box(4420, 4420)), - Box(Box(4421, 4421), Box(4421, 4421)), - Box(Box(4422, 4422), Box(4422, 4422)), - Box(Box(4423, 4423), Box(4423, 4423)), - Box(Box(4424, 4424), Box(4424, 4424)), - Box(Box(4425, 4425), Box(4425, 4425)), - Box(Box(4426, 4426), Box(4426, 4426)), - Box(Box(4427, 4427), Box(4427, 4427)), - Box(Box(4428, 4428), Box(4428, 4428)), - Box(Box(4429, 4429), Box(4429, 4429)), - Box(Box(4430, 4430), Box(4430, 4430)), - Box(Box(4431, 4431), Box(4431, 4431)), - Box(Box(4432, 4432), Box(4432, 4432)), - Box(Box(4433, 4433), Box(4433, 4433)), - Box(Box(4434, 4434), Box(4434, 4434)), - Box(Box(4435, 4435), Box(4435, 4435)), - Box(Box(4436, 4436), Box(4436, 4436)), - Box(Box(4437, 4437), Box(4437, 4437)), - Box(Box(4438, 4438), Box(4438, 4438)), - Box(Box(4439, 4439), Box(4439, 4439)), - Box(Box(4440, 4440), Box(4440, 4440)), - Box(Box(4441, 4441), Box(4441, 4441)), - Box(Box(4442, 4442), Box(4442, 4442)), - Box(Box(4443, 4443), Box(4443, 4443)), - Box(Box(4444, 4444), Box(4444, 4444)), - Box(Box(4445, 4445), Box(4445, 4445)), - Box(Box(4446, 4446), Box(4446, 4446)), - Box(Box(4447, 4447), Box(4447, 4447)), - Box(Box(4448, 4448), Box(4448, 4448)), - Box(Box(4449, 4449), Box(4449, 4449)), - Box(Box(4450, 4450), Box(4450, 4450)), - Box(Box(4451, 4451), Box(4451, 4451)), - Box(Box(4452, 4452), Box(4452, 4452)), - Box(Box(4453, 4453), Box(4453, 4453)), - Box(Box(4454, 4454), Box(4454, 4454)), - Box(Box(4455, 4455), Box(4455, 4455)), - Box(Box(4456, 4456), Box(4456, 4456)), - Box(Box(4457, 4457), Box(4457, 4457)), - Box(Box(4458, 4458), Box(4458, 4458)), - Box(Box(4459, 4459), Box(4459, 4459)), - Box(Box(4460, 4460), Box(4460, 4460)), - Box(Box(4461, 4461), Box(4461, 4461)), - Box(Box(4462, 4462), Box(4462, 4462)), - Box(Box(4463, 4463), Box(4463, 4463)), - Box(Box(4464, 4464), Box(4464, 4464)), - Box(Box(4465, 4465), Box(4465, 4465)), - Box(Box(4466, 4466), Box(4466, 4466)), - Box(Box(4467, 4467), Box(4467, 4467)), - Box(Box(4468, 4468), Box(4468, 4468)), - Box(Box(4469, 4469), Box(4469, 4469)), - Box(Box(4470, 4470), Box(4470, 4470)), - Box(Box(4471, 4471), Box(4471, 4471)), - Box(Box(4472, 4472), Box(4472, 4472)), - Box(Box(4473, 4473), Box(4473, 4473)), - Box(Box(4474, 4474), Box(4474, 4474)), - Box(Box(4475, 4475), Box(4475, 4475)), - Box(Box(4476, 4476), Box(4476, 4476)), - Box(Box(4477, 4477), Box(4477, 4477)), - Box(Box(4478, 4478), Box(4478, 4478)), - Box(Box(4479, 4479), Box(4479, 4479)), - Box(Box(4480, 4480), Box(4480, 4480)), - Box(Box(4481, 4481), Box(4481, 4481)), - Box(Box(4482, 4482), Box(4482, 4482)), - Box(Box(4483, 4483), Box(4483, 4483)), - Box(Box(4484, 4484), Box(4484, 4484)), - Box(Box(4485, 4485), Box(4485, 4485)), - Box(Box(4486, 4486), Box(4486, 4486)), - Box(Box(4487, 4487), Box(4487, 4487)), - Box(Box(4488, 4488), Box(4488, 4488)), - Box(Box(4489, 4489), Box(4489, 4489)), - Box(Box(4490, 4490), Box(4490, 4490)), - Box(Box(4491, 4491), Box(4491, 4491)), - Box(Box(4492, 4492), Box(4492, 4492)), - Box(Box(4493, 4493), Box(4493, 4493)), - Box(Box(4494, 4494), Box(4494, 4494)), - Box(Box(4495, 4495), Box(4495, 4495)), - Box(Box(4496, 4496), Box(4496, 4496)), - Box(Box(4497, 4497), Box(4497, 4497)), - Box(Box(4498, 4498), Box(4498, 4498)), - Box(Box(4499, 4499), Box(4499, 4499)), - Box(Box(4500, 4500), Box(4500, 4500)), - Box(Box(4501, 4501), Box(4501, 4501)), - Box(Box(4502, 4502), Box(4502, 4502)), - Box(Box(4503, 4503), Box(4503, 4503)), - Box(Box(4504, 4504), Box(4504, 4504)), - Box(Box(4505, 4505), Box(4505, 4505)), - Box(Box(4506, 4506), Box(4506, 4506)), - Box(Box(4507, 4507), Box(4507, 4507)), - Box(Box(4508, 4508), Box(4508, 4508)), - Box(Box(4509, 4509), Box(4509, 4509)), - Box(Box(4510, 4510), Box(4510, 4510)), - Box(Box(4511, 4511), Box(4511, 4511)), - Box(Box(4512, 4512), Box(4512, 4512)), - Box(Box(4513, 4513), Box(4513, 4513)), - Box(Box(4514, 4514), Box(4514, 4514)), - Box(Box(4515, 4515), Box(4515, 4515)), - Box(Box(4516, 4516), Box(4516, 4516)), - Box(Box(4517, 4517), Box(4517, 4517)), - Box(Box(4518, 4518), Box(4518, 4518)), - Box(Box(4519, 4519), Box(4519, 4519)), - Box(Box(4520, 4520), Box(4520, 4520)), - Box(Box(4521, 4521), Box(4521, 4521)), - Box(Box(4522, 4522), Box(4522, 4522)), - Box(Box(4523, 4523), Box(4523, 4523)), - Box(Box(4524, 4524), Box(4524, 4524)), - Box(Box(4525, 4525), Box(4525, 4525)), - Box(Box(4526, 4526), Box(4526, 4526)), - Box(Box(4527, 4527), Box(4527, 4527)), - Box(Box(4528, 4528), Box(4528, 4528)), - Box(Box(4529, 4529), Box(4529, 4529)), - Box(Box(4530, 4530), Box(4530, 4530)), - Box(Box(4531, 4531), Box(4531, 4531)), - Box(Box(4532, 4532), Box(4532, 4532)), - Box(Box(4533, 4533), Box(4533, 4533)), - Box(Box(4534, 4534), Box(4534, 4534)), - Box(Box(4535, 4535), Box(4535, 4535)), - Box(Box(4536, 4536), Box(4536, 4536)), - Box(Box(4537, 4537), Box(4537, 4537)), - Box(Box(4538, 4538), Box(4538, 4538)), - Box(Box(4539, 4539), Box(4539, 4539)), - Box(Box(4540, 4540), Box(4540, 4540)), - Box(Box(4541, 4541), Box(4541, 4541)), - Box(Box(4542, 4542), Box(4542, 4542)), - Box(Box(4543, 4543), Box(4543, 4543)), - Box(Box(4544, 4544), Box(4544, 4544)), - Box(Box(4545, 4545), Box(4545, 4545)), - Box(Box(4546, 4546), Box(4546, 4546)), - Box(Box(4547, 4547), Box(4547, 4547)), - Box(Box(4548, 4548), Box(4548, 4548)), - Box(Box(4549, 4549), Box(4549, 4549)), - Box(Box(4550, 4550), Box(4550, 4550)), - Box(Box(4551, 4551), Box(4551, 4551)), - Box(Box(4552, 4552), Box(4552, 4552)), - Box(Box(4553, 4553), Box(4553, 4553)), - Box(Box(4554, 4554), Box(4554, 4554)), - Box(Box(4555, 4555), Box(4555, 4555)), - Box(Box(4556, 4556), Box(4556, 4556)), - Box(Box(4557, 4557), Box(4557, 4557)), - Box(Box(4558, 4558), Box(4558, 4558)), - Box(Box(4559, 4559), Box(4559, 4559)), - Box(Box(4560, 4560), Box(4560, 4560)), - Box(Box(4561, 4561), Box(4561, 4561)), - Box(Box(4562, 4562), Box(4562, 4562)), - Box(Box(4563, 4563), Box(4563, 4563)), - Box(Box(4564, 4564), Box(4564, 4564)), - Box(Box(4565, 4565), Box(4565, 4565)), - Box(Box(4566, 4566), Box(4566, 4566)), - Box(Box(4567, 4567), Box(4567, 4567)), - Box(Box(4568, 4568), Box(4568, 4568)), - Box(Box(4569, 4569), Box(4569, 4569)), - Box(Box(4570, 4570), Box(4570, 4570)), - Box(Box(4571, 4571), Box(4571, 4571)), - Box(Box(4572, 4572), Box(4572, 4572)), - Box(Box(4573, 4573), Box(4573, 4573)), - Box(Box(4574, 4574), Box(4574, 4574)), - Box(Box(4575, 4575), Box(4575, 4575)), - Box(Box(4576, 4576), Box(4576, 4576)), - Box(Box(4577, 4577), Box(4577, 4577)), - Box(Box(4578, 4578), Box(4578, 4578)), - Box(Box(4579, 4579), Box(4579, 4579)), - Box(Box(4580, 4580), Box(4580, 4580)), - Box(Box(4581, 4581), Box(4581, 4581)), - Box(Box(4582, 4582), Box(4582, 4582)), - Box(Box(4583, 4583), Box(4583, 4583)), - Box(Box(4584, 4584), Box(4584, 4584)), - Box(Box(4585, 4585), Box(4585, 4585)), - Box(Box(4586, 4586), Box(4586, 4586)), - Box(Box(4587, 4587), Box(4587, 4587)), - Box(Box(4588, 4588), Box(4588, 4588)), - Box(Box(4589, 4589), Box(4589, 4589)), - Box(Box(4590, 4590), Box(4590, 4590)), - Box(Box(4591, 4591), Box(4591, 4591)), - Box(Box(4592, 4592), Box(4592, 4592)), - Box(Box(4593, 4593), Box(4593, 4593)), - Box(Box(4594, 4594), Box(4594, 4594)), - Box(Box(4595, 4595), Box(4595, 4595)), - Box(Box(4596, 4596), Box(4596, 4596)), - Box(Box(4597, 4597), Box(4597, 4597)), - Box(Box(4598, 4598), Box(4598, 4598)), - Box(Box(4599, 4599), Box(4599, 4599)), - Box(Box(4600, 4600), Box(4600, 4600)), - Box(Box(4601, 4601), Box(4601, 4601)), - Box(Box(4602, 4602), Box(4602, 4602)), - Box(Box(4603, 4603), Box(4603, 4603)), - Box(Box(4604, 4604), Box(4604, 4604)), - Box(Box(4605, 4605), Box(4605, 4605)), - Box(Box(4606, 4606), Box(4606, 4606)), - Box(Box(4607, 4607), Box(4607, 4607)), - Box(Box(4608, 4608), Box(4608, 4608)), - Box(Box(4609, 4609), Box(4609, 4609)), - Box(Box(4610, 4610), Box(4610, 4610)), - Box(Box(4611, 4611), Box(4611, 4611)), - Box(Box(4612, 4612), Box(4612, 4612)), - Box(Box(4613, 4613), Box(4613, 4613)), - Box(Box(4614, 4614), Box(4614, 4614)), - Box(Box(4615, 4615), Box(4615, 4615)), - Box(Box(4616, 4616), Box(4616, 4616)), - Box(Box(4617, 4617), Box(4617, 4617)), - Box(Box(4618, 4618), Box(4618, 4618)), - Box(Box(4619, 4619), Box(4619, 4619)), - Box(Box(4620, 4620), Box(4620, 4620)), - Box(Box(4621, 4621), Box(4621, 4621)), - Box(Box(4622, 4622), Box(4622, 4622)), - Box(Box(4623, 4623), Box(4623, 4623)), - Box(Box(4624, 4624), Box(4624, 4624)), - Box(Box(4625, 4625), Box(4625, 4625)), - Box(Box(4626, 4626), Box(4626, 4626)), - Box(Box(4627, 4627), Box(4627, 4627)), - Box(Box(4628, 4628), Box(4628, 4628)), - Box(Box(4629, 4629), Box(4629, 4629)), - Box(Box(4630, 4630), Box(4630, 4630)), - Box(Box(4631, 4631), Box(4631, 4631)), - Box(Box(4632, 4632), Box(4632, 4632)), - Box(Box(4633, 4633), Box(4633, 4633)), - Box(Box(4634, 4634), Box(4634, 4634)), - Box(Box(4635, 4635), Box(4635, 4635)), - Box(Box(4636, 4636), Box(4636, 4636)), - Box(Box(4637, 4637), Box(4637, 4637)), - Box(Box(4638, 4638), Box(4638, 4638)), - Box(Box(4639, 4639), Box(4639, 4639)), - Box(Box(4640, 4640), Box(4640, 4640)), - Box(Box(4641, 4641), Box(4641, 4641)), - Box(Box(4642, 4642), Box(4642, 4642)), - Box(Box(4643, 4643), Box(4643, 4643)), - Box(Box(4644, 4644), Box(4644, 4644)), - Box(Box(4645, 4645), Box(4645, 4645)), - Box(Box(4646, 4646), Box(4646, 4646)), - Box(Box(4647, 4647), Box(4647, 4647)), - Box(Box(4648, 4648), Box(4648, 4648)), - Box(Box(4649, 4649), Box(4649, 4649)), - Box(Box(4650, 4650), Box(4650, 4650)), - Box(Box(4651, 4651), Box(4651, 4651)), - Box(Box(4652, 4652), Box(4652, 4652)), - Box(Box(4653, 4653), Box(4653, 4653)), - Box(Box(4654, 4654), Box(4654, 4654)), - Box(Box(4655, 4655), Box(4655, 4655)), - Box(Box(4656, 4656), Box(4656, 4656)), - Box(Box(4657, 4657), Box(4657, 4657)), - Box(Box(4658, 4658), Box(4658, 4658)), - Box(Box(4659, 4659), Box(4659, 4659)), - Box(Box(4660, 4660), Box(4660, 4660)), - Box(Box(4661, 4661), Box(4661, 4661)), - Box(Box(4662, 4662), Box(4662, 4662)), - Box(Box(4663, 4663), Box(4663, 4663)), - Box(Box(4664, 4664), Box(4664, 4664)), - Box(Box(4665, 4665), Box(4665, 4665)), - Box(Box(4666, 4666), Box(4666, 4666)), - Box(Box(4667, 4667), Box(4667, 4667)), - Box(Box(4668, 4668), Box(4668, 4668)), - Box(Box(4669, 4669), Box(4669, 4669)), - Box(Box(4670, 4670), Box(4670, 4670)), - Box(Box(4671, 4671), Box(4671, 4671)), - Box(Box(4672, 4672), Box(4672, 4672)), - Box(Box(4673, 4673), Box(4673, 4673)), - Box(Box(4674, 4674), Box(4674, 4674)), - Box(Box(4675, 4675), Box(4675, 4675)), - Box(Box(4676, 4676), Box(4676, 4676)), - Box(Box(4677, 4677), Box(4677, 4677)), - Box(Box(4678, 4678), Box(4678, 4678)), - Box(Box(4679, 4679), Box(4679, 4679)), - Box(Box(4680, 4680), Box(4680, 4680)), - Box(Box(4681, 4681), Box(4681, 4681)), - Box(Box(4682, 4682), Box(4682, 4682)), - Box(Box(4683, 4683), Box(4683, 4683)), - Box(Box(4684, 4684), Box(4684, 4684)), - Box(Box(4685, 4685), Box(4685, 4685)), - Box(Box(4686, 4686), Box(4686, 4686)), - Box(Box(4687, 4687), Box(4687, 4687)), - Box(Box(4688, 4688), Box(4688, 4688)), - Box(Box(4689, 4689), Box(4689, 4689)), - Box(Box(4690, 4690), Box(4690, 4690)), - Box(Box(4691, 4691), Box(4691, 4691)), - Box(Box(4692, 4692), Box(4692, 4692)), - Box(Box(4693, 4693), Box(4693, 4693)), - Box(Box(4694, 4694), Box(4694, 4694)), - Box(Box(4695, 4695), Box(4695, 4695)), - Box(Box(4696, 4696), Box(4696, 4696)), - Box(Box(4697, 4697), Box(4697, 4697)), - Box(Box(4698, 4698), Box(4698, 4698)), - Box(Box(4699, 4699), Box(4699, 4699)), - Box(Box(4700, 4700), Box(4700, 4700)), - Box(Box(4701, 4701), Box(4701, 4701)), - Box(Box(4702, 4702), Box(4702, 4702)), - Box(Box(4703, 4703), Box(4703, 4703)), - Box(Box(4704, 4704), Box(4704, 4704)), - Box(Box(4705, 4705), Box(4705, 4705)), - Box(Box(4706, 4706), Box(4706, 4706)), - Box(Box(4707, 4707), Box(4707, 4707)), - Box(Box(4708, 4708), Box(4708, 4708)), - Box(Box(4709, 4709), Box(4709, 4709)), - Box(Box(4710, 4710), Box(4710, 4710)), - Box(Box(4711, 4711), Box(4711, 4711)), - Box(Box(4712, 4712), Box(4712, 4712)), - Box(Box(4713, 4713), Box(4713, 4713)), - Box(Box(4714, 4714), Box(4714, 4714)), - Box(Box(4715, 4715), Box(4715, 4715)), - Box(Box(4716, 4716), Box(4716, 4716)), - Box(Box(4717, 4717), Box(4717, 4717)), - Box(Box(4718, 4718), Box(4718, 4718)), - Box(Box(4719, 4719), Box(4719, 4719)), - Box(Box(4720, 4720), Box(4720, 4720)), - Box(Box(4721, 4721), Box(4721, 4721)), - Box(Box(4722, 4722), Box(4722, 4722)), - Box(Box(4723, 4723), Box(4723, 4723)), - Box(Box(4724, 4724), Box(4724, 4724)), - Box(Box(4725, 4725), Box(4725, 4725)), - Box(Box(4726, 4726), Box(4726, 4726)), - Box(Box(4727, 4727), Box(4727, 4727)), - Box(Box(4728, 4728), Box(4728, 4728)), - Box(Box(4729, 4729), Box(4729, 4729)), - Box(Box(4730, 4730), Box(4730, 4730)), - Box(Box(4731, 4731), Box(4731, 4731)), - Box(Box(4732, 4732), Box(4732, 4732)), - Box(Box(4733, 4733), Box(4733, 4733)), - Box(Box(4734, 4734), Box(4734, 4734)), - Box(Box(4735, 4735), Box(4735, 4735)), - Box(Box(4736, 4736), Box(4736, 4736)), - Box(Box(4737, 4737), Box(4737, 4737)), - Box(Box(4738, 4738), Box(4738, 4738)), - Box(Box(4739, 4739), Box(4739, 4739)), - Box(Box(4740, 4740), Box(4740, 4740)), - Box(Box(4741, 4741), Box(4741, 4741)), - Box(Box(4742, 4742), Box(4742, 4742)), - Box(Box(4743, 4743), Box(4743, 4743)), - Box(Box(4744, 4744), Box(4744, 4744)), - Box(Box(4745, 4745), Box(4745, 4745)), - Box(Box(4746, 4746), Box(4746, 4746)), - Box(Box(4747, 4747), Box(4747, 4747)), - Box(Box(4748, 4748), Box(4748, 4748)), - Box(Box(4749, 4749), Box(4749, 4749)), - Box(Box(4750, 4750), Box(4750, 4750)), - Box(Box(4751, 4751), Box(4751, 4751)), - Box(Box(4752, 4752), Box(4752, 4752)), - Box(Box(4753, 4753), Box(4753, 4753)), - Box(Box(4754, 4754), Box(4754, 4754)), - Box(Box(4755, 4755), Box(4755, 4755)), - Box(Box(4756, 4756), Box(4756, 4756)), - Box(Box(4757, 4757), Box(4757, 4757)), - Box(Box(4758, 4758), Box(4758, 4758)), - Box(Box(4759, 4759), Box(4759, 4759)), - Box(Box(4760, 4760), Box(4760, 4760)), - Box(Box(4761, 4761), Box(4761, 4761)), - Box(Box(4762, 4762), Box(4762, 4762)), - Box(Box(4763, 4763), Box(4763, 4763)), - Box(Box(4764, 4764), Box(4764, 4764)), - Box(Box(4765, 4765), Box(4765, 4765)), - Box(Box(4766, 4766), Box(4766, 4766)), - Box(Box(4767, 4767), Box(4767, 4767)), - Box(Box(4768, 4768), Box(4768, 4768)), - Box(Box(4769, 4769), Box(4769, 4769)), - Box(Box(4770, 4770), Box(4770, 4770)), - Box(Box(4771, 4771), Box(4771, 4771)), - Box(Box(4772, 4772), Box(4772, 4772)), - Box(Box(4773, 4773), Box(4773, 4773)), - Box(Box(4774, 4774), Box(4774, 4774)), - Box(Box(4775, 4775), Box(4775, 4775)), - Box(Box(4776, 4776), Box(4776, 4776)), - Box(Box(4777, 4777), Box(4777, 4777)), - Box(Box(4778, 4778), Box(4778, 4778)), - Box(Box(4779, 4779), Box(4779, 4779)), - Box(Box(4780, 4780), Box(4780, 4780)), - Box(Box(4781, 4781), Box(4781, 4781)), - Box(Box(4782, 4782), Box(4782, 4782)), - Box(Box(4783, 4783), Box(4783, 4783)), - Box(Box(4784, 4784), Box(4784, 4784)), - Box(Box(4785, 4785), Box(4785, 4785)), - Box(Box(4786, 4786), Box(4786, 4786)), - Box(Box(4787, 4787), Box(4787, 4787)), - Box(Box(4788, 4788), Box(4788, 4788)), - Box(Box(4789, 4789), Box(4789, 4789)), - Box(Box(4790, 4790), Box(4790, 4790)), - Box(Box(4791, 4791), Box(4791, 4791)), - Box(Box(4792, 4792), Box(4792, 4792)), - Box(Box(4793, 4793), Box(4793, 4793)), - Box(Box(4794, 4794), Box(4794, 4794)), - Box(Box(4795, 4795), Box(4795, 4795)), - Box(Box(4796, 4796), Box(4796, 4796)), - Box(Box(4797, 4797), Box(4797, 4797)), - Box(Box(4798, 4798), Box(4798, 4798)), - Box(Box(4799, 4799), Box(4799, 4799)), - Box(Box(4800, 4800), Box(4800, 4800)), - Box(Box(4801, 4801), Box(4801, 4801)), - Box(Box(4802, 4802), Box(4802, 4802)), - Box(Box(4803, 4803), Box(4803, 4803)), - Box(Box(4804, 4804), Box(4804, 4804)), - Box(Box(4805, 4805), Box(4805, 4805)), - Box(Box(4806, 4806), Box(4806, 4806)), - Box(Box(4807, 4807), Box(4807, 4807)), - Box(Box(4808, 4808), Box(4808, 4808)), - Box(Box(4809, 4809), Box(4809, 4809)), - Box(Box(4810, 4810), Box(4810, 4810)), - Box(Box(4811, 4811), Box(4811, 4811)), - Box(Box(4812, 4812), Box(4812, 4812)), - Box(Box(4813, 4813), Box(4813, 4813)), - Box(Box(4814, 4814), Box(4814, 4814)), - Box(Box(4815, 4815), Box(4815, 4815)), - Box(Box(4816, 4816), Box(4816, 4816)), - Box(Box(4817, 4817), Box(4817, 4817)), - Box(Box(4818, 4818), Box(4818, 4818)), - Box(Box(4819, 4819), Box(4819, 4819)), - Box(Box(4820, 4820), Box(4820, 4820)), - Box(Box(4821, 4821), Box(4821, 4821)), - Box(Box(4822, 4822), Box(4822, 4822)), - Box(Box(4823, 4823), Box(4823, 4823)), - Box(Box(4824, 4824), Box(4824, 4824)), - Box(Box(4825, 4825), Box(4825, 4825)), - Box(Box(4826, 4826), Box(4826, 4826)), - Box(Box(4827, 4827), Box(4827, 4827)), - Box(Box(4828, 4828), Box(4828, 4828)), - Box(Box(4829, 4829), Box(4829, 4829)), - Box(Box(4830, 4830), Box(4830, 4830)), - Box(Box(4831, 4831), Box(4831, 4831)), - Box(Box(4832, 4832), Box(4832, 4832)), - Box(Box(4833, 4833), Box(4833, 4833)), - Box(Box(4834, 4834), Box(4834, 4834)), - Box(Box(4835, 4835), Box(4835, 4835)), - Box(Box(4836, 4836), Box(4836, 4836)), - Box(Box(4837, 4837), Box(4837, 4837)), - Box(Box(4838, 4838), Box(4838, 4838)), - Box(Box(4839, 4839), Box(4839, 4839)), - Box(Box(4840, 4840), Box(4840, 4840)), - Box(Box(4841, 4841), Box(4841, 4841)), - Box(Box(4842, 4842), Box(4842, 4842)), - Box(Box(4843, 4843), Box(4843, 4843)), - Box(Box(4844, 4844), Box(4844, 4844)), - Box(Box(4845, 4845), Box(4845, 4845)), - Box(Box(4846, 4846), Box(4846, 4846)), - Box(Box(4847, 4847), Box(4847, 4847)), - Box(Box(4848, 4848), Box(4848, 4848)), - Box(Box(4849, 4849), Box(4849, 4849)), - Box(Box(4850, 4850), Box(4850, 4850)), - Box(Box(4851, 4851), Box(4851, 4851)), - Box(Box(4852, 4852), Box(4852, 4852)), - Box(Box(4853, 4853), Box(4853, 4853)), - Box(Box(4854, 4854), Box(4854, 4854)), - Box(Box(4855, 4855), Box(4855, 4855)), - Box(Box(4856, 4856), Box(4856, 4856)), - Box(Box(4857, 4857), Box(4857, 4857)), - Box(Box(4858, 4858), Box(4858, 4858)), - Box(Box(4859, 4859), Box(4859, 4859)), - Box(Box(4860, 4860), Box(4860, 4860)), - Box(Box(4861, 4861), Box(4861, 4861)), - Box(Box(4862, 4862), Box(4862, 4862)), - Box(Box(4863, 4863), Box(4863, 4863)), - Box(Box(4864, 4864), Box(4864, 4864)), - Box(Box(4865, 4865), Box(4865, 4865)), - Box(Box(4866, 4866), Box(4866, 4866)), - Box(Box(4867, 4867), Box(4867, 4867)), - Box(Box(4868, 4868), Box(4868, 4868)), - Box(Box(4869, 4869), Box(4869, 4869)), - Box(Box(4870, 4870), Box(4870, 4870)), - Box(Box(4871, 4871), Box(4871, 4871)), - Box(Box(4872, 4872), Box(4872, 4872)), - Box(Box(4873, 4873), Box(4873, 4873)), - Box(Box(4874, 4874), Box(4874, 4874)), - Box(Box(4875, 4875), Box(4875, 4875)), - Box(Box(4876, 4876), Box(4876, 4876)), - Box(Box(4877, 4877), Box(4877, 4877)), - Box(Box(4878, 4878), Box(4878, 4878)), - Box(Box(4879, 4879), Box(4879, 4879)), - Box(Box(4880, 4880), Box(4880, 4880)), - Box(Box(4881, 4881), Box(4881, 4881)), - Box(Box(4882, 4882), Box(4882, 4882)), - Box(Box(4883, 4883), Box(4883, 4883)), - Box(Box(4884, 4884), Box(4884, 4884)), - Box(Box(4885, 4885), Box(4885, 4885)), - Box(Box(4886, 4886), Box(4886, 4886)), - Box(Box(4887, 4887), Box(4887, 4887)), - Box(Box(4888, 4888), Box(4888, 4888)), - Box(Box(4889, 4889), Box(4889, 4889)), - Box(Box(4890, 4890), Box(4890, 4890)), - Box(Box(4891, 4891), Box(4891, 4891)), - Box(Box(4892, 4892), Box(4892, 4892)), - Box(Box(4893, 4893), Box(4893, 4893)), - Box(Box(4894, 4894), Box(4894, 4894)), - Box(Box(4895, 4895), Box(4895, 4895)), - Box(Box(4896, 4896), Box(4896, 4896)), - Box(Box(4897, 4897), Box(4897, 4897)), - Box(Box(4898, 4898), Box(4898, 4898)), - Box(Box(4899, 4899), Box(4899, 4899)), - Box(Box(4900, 4900), Box(4900, 4900)), - Box(Box(4901, 4901), Box(4901, 4901)), - Box(Box(4902, 4902), Box(4902, 4902)), - Box(Box(4903, 4903), Box(4903, 4903)), - Box(Box(4904, 4904), Box(4904, 4904)), - Box(Box(4905, 4905), Box(4905, 4905)), - Box(Box(4906, 4906), Box(4906, 4906)), - Box(Box(4907, 4907), Box(4907, 4907)), - Box(Box(4908, 4908), Box(4908, 4908)), - Box(Box(4909, 4909), Box(4909, 4909)), - Box(Box(4910, 4910), Box(4910, 4910)), - Box(Box(4911, 4911), Box(4911, 4911)), - Box(Box(4912, 4912), Box(4912, 4912)), - Box(Box(4913, 4913), Box(4913, 4913)), - Box(Box(4914, 4914), Box(4914, 4914)), - Box(Box(4915, 4915), Box(4915, 4915)), - Box(Box(4916, 4916), Box(4916, 4916)), - Box(Box(4917, 4917), Box(4917, 4917)), - Box(Box(4918, 4918), Box(4918, 4918)), - Box(Box(4919, 4919), Box(4919, 4919)), - Box(Box(4920, 4920), Box(4920, 4920)), - Box(Box(4921, 4921), Box(4921, 4921)), - Box(Box(4922, 4922), Box(4922, 4922)), - Box(Box(4923, 4923), Box(4923, 4923)), - Box(Box(4924, 4924), Box(4924, 4924)), - Box(Box(4925, 4925), Box(4925, 4925)), - Box(Box(4926, 4926), Box(4926, 4926)), - Box(Box(4927, 4927), Box(4927, 4927)), - Box(Box(4928, 4928), Box(4928, 4928)), - Box(Box(4929, 4929), Box(4929, 4929)), - Box(Box(4930, 4930), Box(4930, 4930)), - Box(Box(4931, 4931), Box(4931, 4931)), - Box(Box(4932, 4932), Box(4932, 4932)), - Box(Box(4933, 4933), Box(4933, 4933)), - Box(Box(4934, 4934), Box(4934, 4934)), - Box(Box(4935, 4935), Box(4935, 4935)), - Box(Box(4936, 4936), Box(4936, 4936)), - Box(Box(4937, 4937), Box(4937, 4937)), - Box(Box(4938, 4938), Box(4938, 4938)), - Box(Box(4939, 4939), Box(4939, 4939)), - Box(Box(4940, 4940), Box(4940, 4940)), - Box(Box(4941, 4941), Box(4941, 4941)), - Box(Box(4942, 4942), Box(4942, 4942)), - Box(Box(4943, 4943), Box(4943, 4943)), - Box(Box(4944, 4944), Box(4944, 4944)), - Box(Box(4945, 4945), Box(4945, 4945)), - Box(Box(4946, 4946), Box(4946, 4946)), - Box(Box(4947, 4947), Box(4947, 4947)), - Box(Box(4948, 4948), Box(4948, 4948)), - Box(Box(4949, 4949), Box(4949, 4949)), - Box(Box(4950, 4950), Box(4950, 4950)), - Box(Box(4951, 4951), Box(4951, 4951)), - Box(Box(4952, 4952), Box(4952, 4952)), - Box(Box(4953, 4953), Box(4953, 4953)), - Box(Box(4954, 4954), Box(4954, 4954)), - Box(Box(4955, 4955), Box(4955, 4955)), - Box(Box(4956, 4956), Box(4956, 4956)), - Box(Box(4957, 4957), Box(4957, 4957)), - Box(Box(4958, 4958), Box(4958, 4958)), - Box(Box(4959, 4959), Box(4959, 4959)), - Box(Box(4960, 4960), Box(4960, 4960)), - Box(Box(4961, 4961), Box(4961, 4961)), - Box(Box(4962, 4962), Box(4962, 4962)), - Box(Box(4963, 4963), Box(4963, 4963)), - Box(Box(4964, 4964), Box(4964, 4964)), - Box(Box(4965, 4965), Box(4965, 4965)), - Box(Box(4966, 4966), Box(4966, 4966)), - Box(Box(4967, 4967), Box(4967, 4967)), - Box(Box(4968, 4968), Box(4968, 4968)), - Box(Box(4969, 4969), Box(4969, 4969)), - Box(Box(4970, 4970), Box(4970, 4970)), - Box(Box(4971, 4971), Box(4971, 4971)), - Box(Box(4972, 4972), Box(4972, 4972)), - Box(Box(4973, 4973), Box(4973, 4973)), - Box(Box(4974, 4974), Box(4974, 4974)), - Box(Box(4975, 4975), Box(4975, 4975)), - Box(Box(4976, 4976), Box(4976, 4976)), - Box(Box(4977, 4977), Box(4977, 4977)), - Box(Box(4978, 4978), Box(4978, 4978)), - Box(Box(4979, 4979), Box(4979, 4979)), - Box(Box(4980, 4980), Box(4980, 4980)), - Box(Box(4981, 4981), Box(4981, 4981)), - Box(Box(4982, 4982), Box(4982, 4982)), - Box(Box(4983, 4983), Box(4983, 4983)), - Box(Box(4984, 4984), Box(4984, 4984)), - Box(Box(4985, 4985), Box(4985, 4985)), - Box(Box(4986, 4986), Box(4986, 4986)), - Box(Box(4987, 4987), Box(4987, 4987)), - Box(Box(4988, 4988), Box(4988, 4988)), - Box(Box(4989, 4989), Box(4989, 4989)), - Box(Box(4990, 4990), Box(4990, 4990)), - Box(Box(4991, 4991), Box(4991, 4991)), - Box(Box(4992, 4992), Box(4992, 4992)), - Box(Box(4993, 4993), Box(4993, 4993)), - Box(Box(4994, 4994), Box(4994, 4994)), - Box(Box(4995, 4995), Box(4995, 4995)), - Box(Box(4996, 4996), Box(4996, 4996)), - Box(Box(4997, 4997), Box(4997, 4997)), - Box(Box(4998, 4998), Box(4998, 4998)), - Box(Box(4999, 4999), Box(4999, 4999)), - Box(Box(5000, 5000), Box(5000, 5000)), - Box(Box(5001, 5001), Box(5001, 5001)), - Box(Box(5002, 5002), Box(5002, 5002)), - Box(Box(5003, 5003), Box(5003, 5003)), - Box(Box(5004, 5004), Box(5004, 5004)), - Box(Box(5005, 5005), Box(5005, 5005)), - Box(Box(5006, 5006), Box(5006, 5006)), - Box(Box(5007, 5007), Box(5007, 5007)), - Box(Box(5008, 5008), Box(5008, 5008)), - Box(Box(5009, 5009), Box(5009, 5009)), - Box(Box(5010, 5010), Box(5010, 5010)), - Box(Box(5011, 5011), Box(5011, 5011)), - Box(Box(5012, 5012), Box(5012, 5012)), - Box(Box(5013, 5013), Box(5013, 5013)), - Box(Box(5014, 5014), Box(5014, 5014)), - Box(Box(5015, 5015), Box(5015, 5015)), - Box(Box(5016, 5016), Box(5016, 5016)), - Box(Box(5017, 5017), Box(5017, 5017)), - Box(Box(5018, 5018), Box(5018, 5018)), - Box(Box(5019, 5019), Box(5019, 5019)), - Box(Box(5020, 5020), Box(5020, 5020)), - Box(Box(5021, 5021), Box(5021, 5021)), - Box(Box(5022, 5022), Box(5022, 5022)), - Box(Box(5023, 5023), Box(5023, 5023)), - Box(Box(5024, 5024), Box(5024, 5024)), - Box(Box(5025, 5025), Box(5025, 5025)), - Box(Box(5026, 5026), Box(5026, 5026)), - Box(Box(5027, 5027), Box(5027, 5027)), - Box(Box(5028, 5028), Box(5028, 5028)), - Box(Box(5029, 5029), Box(5029, 5029)), - Box(Box(5030, 5030), Box(5030, 5030)), - Box(Box(5031, 5031), Box(5031, 5031)), - Box(Box(5032, 5032), Box(5032, 5032)), - Box(Box(5033, 5033), Box(5033, 5033)), - Box(Box(5034, 5034), Box(5034, 5034)), - Box(Box(5035, 5035), Box(5035, 5035)), - Box(Box(5036, 5036), Box(5036, 5036)), - Box(Box(5037, 5037), Box(5037, 5037)), - Box(Box(5038, 5038), Box(5038, 5038)), - Box(Box(5039, 5039), Box(5039, 5039)), - Box(Box(5040, 5040), Box(5040, 5040)), - Box(Box(5041, 5041), Box(5041, 5041)), - Box(Box(5042, 5042), Box(5042, 5042)), - Box(Box(5043, 5043), Box(5043, 5043)), - Box(Box(5044, 5044), Box(5044, 5044)), - Box(Box(5045, 5045), Box(5045, 5045)), - Box(Box(5046, 5046), Box(5046, 5046)), - Box(Box(5047, 5047), Box(5047, 5047)), - Box(Box(5048, 5048), Box(5048, 5048)), - Box(Box(5049, 5049), Box(5049, 5049)), - Box(Box(5050, 5050), Box(5050, 5050)), - Box(Box(5051, 5051), Box(5051, 5051)), - Box(Box(5052, 5052), Box(5052, 5052)), - Box(Box(5053, 5053), Box(5053, 5053)), - Box(Box(5054, 5054), Box(5054, 5054)), - Box(Box(5055, 5055), Box(5055, 5055)), - Box(Box(5056, 5056), Box(5056, 5056)), - Box(Box(5057, 5057), Box(5057, 5057)), - Box(Box(5058, 5058), Box(5058, 5058)), - Box(Box(5059, 5059), Box(5059, 5059)), - Box(Box(5060, 5060), Box(5060, 5060)), - Box(Box(5061, 5061), Box(5061, 5061)), - Box(Box(5062, 5062), Box(5062, 5062)), - Box(Box(5063, 5063), Box(5063, 5063)), - Box(Box(5064, 5064), Box(5064, 5064)), - Box(Box(5065, 5065), Box(5065, 5065)), - Box(Box(5066, 5066), Box(5066, 5066)), - Box(Box(5067, 5067), Box(5067, 5067)), - Box(Box(5068, 5068), Box(5068, 5068)), - Box(Box(5069, 5069), Box(5069, 5069)), - Box(Box(5070, 5070), Box(5070, 5070)), - Box(Box(5071, 5071), Box(5071, 5071)), - Box(Box(5072, 5072), Box(5072, 5072)), - Box(Box(5073, 5073), Box(5073, 5073)), - Box(Box(5074, 5074), Box(5074, 5074)), - Box(Box(5075, 5075), Box(5075, 5075)), - Box(Box(5076, 5076), Box(5076, 5076)), - Box(Box(5077, 5077), Box(5077, 5077)), - Box(Box(5078, 5078), Box(5078, 5078)), - Box(Box(5079, 5079), Box(5079, 5079)), - Box(Box(5080, 5080), Box(5080, 5080)), - Box(Box(5081, 5081), Box(5081, 5081)), - Box(Box(5082, 5082), Box(5082, 5082)), - Box(Box(5083, 5083), Box(5083, 5083)), - Box(Box(5084, 5084), Box(5084, 5084)), - Box(Box(5085, 5085), Box(5085, 5085)), - Box(Box(5086, 5086), Box(5086, 5086)), - Box(Box(5087, 5087), Box(5087, 5087)), - Box(Box(5088, 5088), Box(5088, 5088)), - Box(Box(5089, 5089), Box(5089, 5089)), - Box(Box(5090, 5090), Box(5090, 5090)), - Box(Box(5091, 5091), Box(5091, 5091)), - Box(Box(5092, 5092), Box(5092, 5092)), - Box(Box(5093, 5093), Box(5093, 5093)), - Box(Box(5094, 5094), Box(5094, 5094)), - Box(Box(5095, 5095), Box(5095, 5095)), - Box(Box(5096, 5096), Box(5096, 5096)), - Box(Box(5097, 5097), Box(5097, 5097)), - Box(Box(5098, 5098), Box(5098, 5098)), - Box(Box(5099, 5099), Box(5099, 5099)), - Box(Box(5100, 5100), Box(5100, 5100)), - Box(Box(5101, 5101), Box(5101, 5101)), - Box(Box(5102, 5102), Box(5102, 5102)), - Box(Box(5103, 5103), Box(5103, 5103)), - Box(Box(5104, 5104), Box(5104, 5104)), - Box(Box(5105, 5105), Box(5105, 5105)), - Box(Box(5106, 5106), Box(5106, 5106)), - Box(Box(5107, 5107), Box(5107, 5107)), - Box(Box(5108, 5108), Box(5108, 5108)), - Box(Box(5109, 5109), Box(5109, 5109)), - Box(Box(5110, 5110), Box(5110, 5110)), - Box(Box(5111, 5111), Box(5111, 5111)), - Box(Box(5112, 5112), Box(5112, 5112)), - Box(Box(5113, 5113), Box(5113, 5113)), - Box(Box(5114, 5114), Box(5114, 5114)), - Box(Box(5115, 5115), Box(5115, 5115)), - Box(Box(5116, 5116), Box(5116, 5116)), - Box(Box(5117, 5117), Box(5117, 5117)), - Box(Box(5118, 5118), Box(5118, 5118)), - Box(Box(5119, 5119), Box(5119, 5119)), - Box(Box(5120, 5120), Box(5120, 5120)), - Box(Box(5121, 5121), Box(5121, 5121)), - Box(Box(5122, 5122), Box(5122, 5122)), - Box(Box(5123, 5123), Box(5123, 5123)), - Box(Box(5124, 5124), Box(5124, 5124)), - Box(Box(5125, 5125), Box(5125, 5125)), - Box(Box(5126, 5126), Box(5126, 5126)), - Box(Box(5127, 5127), Box(5127, 5127)), - Box(Box(5128, 5128), Box(5128, 5128)), - Box(Box(5129, 5129), Box(5129, 5129)), - Box(Box(5130, 5130), Box(5130, 5130)), - Box(Box(5131, 5131), Box(5131, 5131)), - Box(Box(5132, 5132), Box(5132, 5132)), - Box(Box(5133, 5133), Box(5133, 5133)), - Box(Box(5134, 5134), Box(5134, 5134)), - Box(Box(5135, 5135), Box(5135, 5135)), - Box(Box(5136, 5136), Box(5136, 5136)), - Box(Box(5137, 5137), Box(5137, 5137)), - Box(Box(5138, 5138), Box(5138, 5138)), - Box(Box(5139, 5139), Box(5139, 5139)), - Box(Box(5140, 5140), Box(5140, 5140)), - Box(Box(5141, 5141), Box(5141, 5141)), - Box(Box(5142, 5142), Box(5142, 5142)), - Box(Box(5143, 5143), Box(5143, 5143)), - Box(Box(5144, 5144), Box(5144, 5144)), - Box(Box(5145, 5145), Box(5145, 5145)), - Box(Box(5146, 5146), Box(5146, 5146)), - Box(Box(5147, 5147), Box(5147, 5147)), - Box(Box(5148, 5148), Box(5148, 5148)), - Box(Box(5149, 5149), Box(5149, 5149)), - Box(Box(5150, 5150), Box(5150, 5150)), - Box(Box(5151, 5151), Box(5151, 5151)), - Box(Box(5152, 5152), Box(5152, 5152)), - Box(Box(5153, 5153), Box(5153, 5153)), - Box(Box(5154, 5154), Box(5154, 5154)), - Box(Box(5155, 5155), Box(5155, 5155)), - Box(Box(5156, 5156), Box(5156, 5156)), - Box(Box(5157, 5157), Box(5157, 5157)), - Box(Box(5158, 5158), Box(5158, 5158)), - Box(Box(5159, 5159), Box(5159, 5159)), - Box(Box(5160, 5160), Box(5160, 5160)), - Box(Box(5161, 5161), Box(5161, 5161)), - Box(Box(5162, 5162), Box(5162, 5162)), - Box(Box(5163, 5163), Box(5163, 5163)), - Box(Box(5164, 5164), Box(5164, 5164)), - Box(Box(5165, 5165), Box(5165, 5165)), - Box(Box(5166, 5166), Box(5166, 5166)), - Box(Box(5167, 5167), Box(5167, 5167)), - Box(Box(5168, 5168), Box(5168, 5168)), - Box(Box(5169, 5169), Box(5169, 5169)), - Box(Box(5170, 5170), Box(5170, 5170)), - Box(Box(5171, 5171), Box(5171, 5171)), - Box(Box(5172, 5172), Box(5172, 5172)), - Box(Box(5173, 5173), Box(5173, 5173)), - Box(Box(5174, 5174), Box(5174, 5174)), - Box(Box(5175, 5175), Box(5175, 5175)), - Box(Box(5176, 5176), Box(5176, 5176)), - Box(Box(5177, 5177), Box(5177, 5177)), - Box(Box(5178, 5178), Box(5178, 5178)), - Box(Box(5179, 5179), Box(5179, 5179)), - Box(Box(5180, 5180), Box(5180, 5180)), - Box(Box(5181, 5181), Box(5181, 5181)), - Box(Box(5182, 5182), Box(5182, 5182)), - Box(Box(5183, 5183), Box(5183, 5183)), - Box(Box(5184, 5184), Box(5184, 5184)), - Box(Box(5185, 5185), Box(5185, 5185)), - Box(Box(5186, 5186), Box(5186, 5186)), - Box(Box(5187, 5187), Box(5187, 5187)), - Box(Box(5188, 5188), Box(5188, 5188)), - Box(Box(5189, 5189), Box(5189, 5189)), - Box(Box(5190, 5190), Box(5190, 5190)), - Box(Box(5191, 5191), Box(5191, 5191)), - Box(Box(5192, 5192), Box(5192, 5192)), - Box(Box(5193, 5193), Box(5193, 5193)), - Box(Box(5194, 5194), Box(5194, 5194)), - Box(Box(5195, 5195), Box(5195, 5195)), - Box(Box(5196, 5196), Box(5196, 5196)), - Box(Box(5197, 5197), Box(5197, 5197)), - Box(Box(5198, 5198), Box(5198, 5198)), - Box(Box(5199, 5199), Box(5199, 5199)), - Box(Box(5200, 5200), Box(5200, 5200)), - Box(Box(5201, 5201), Box(5201, 5201)), - Box(Box(5202, 5202), Box(5202, 5202)), - Box(Box(5203, 5203), Box(5203, 5203)), - Box(Box(5204, 5204), Box(5204, 5204)), - Box(Box(5205, 5205), Box(5205, 5205)), - Box(Box(5206, 5206), Box(5206, 5206)), - Box(Box(5207, 5207), Box(5207, 5207)), - Box(Box(5208, 5208), Box(5208, 5208)), - Box(Box(5209, 5209), Box(5209, 5209)), - Box(Box(5210, 5210), Box(5210, 5210)), - Box(Box(5211, 5211), Box(5211, 5211)), - Box(Box(5212, 5212), Box(5212, 5212)), - Box(Box(5213, 5213), Box(5213, 5213)), - Box(Box(5214, 5214), Box(5214, 5214)), - Box(Box(5215, 5215), Box(5215, 5215)), - Box(Box(5216, 5216), Box(5216, 5216)), - Box(Box(5217, 5217), Box(5217, 5217)), - Box(Box(5218, 5218), Box(5218, 5218)), - Box(Box(5219, 5219), Box(5219, 5219)), - Box(Box(5220, 5220), Box(5220, 5220)), - Box(Box(5221, 5221), Box(5221, 5221)), - Box(Box(5222, 5222), Box(5222, 5222)), - Box(Box(5223, 5223), Box(5223, 5223)), - Box(Box(5224, 5224), Box(5224, 5224)), - Box(Box(5225, 5225), Box(5225, 5225)), - Box(Box(5226, 5226), Box(5226, 5226)), - Box(Box(5227, 5227), Box(5227, 5227)), - Box(Box(5228, 5228), Box(5228, 5228)), - Box(Box(5229, 5229), Box(5229, 5229)), - Box(Box(5230, 5230), Box(5230, 5230)), - Box(Box(5231, 5231), Box(5231, 5231)), - Box(Box(5232, 5232), Box(5232, 5232)), - Box(Box(5233, 5233), Box(5233, 5233)), - Box(Box(5234, 5234), Box(5234, 5234)), - Box(Box(5235, 5235), Box(5235, 5235)), - Box(Box(5236, 5236), Box(5236, 5236)), - Box(Box(5237, 5237), Box(5237, 5237)), - Box(Box(5238, 5238), Box(5238, 5238)), - Box(Box(5239, 5239), Box(5239, 5239)), - Box(Box(5240, 5240), Box(5240, 5240)), - Box(Box(5241, 5241), Box(5241, 5241)), - Box(Box(5242, 5242), Box(5242, 5242)), - Box(Box(5243, 5243), Box(5243, 5243)), - Box(Box(5244, 5244), Box(5244, 5244)), - Box(Box(5245, 5245), Box(5245, 5245)), - Box(Box(5246, 5246), Box(5246, 5246)), - Box(Box(5247, 5247), Box(5247, 5247)), - Box(Box(5248, 5248), Box(5248, 5248)), - Box(Box(5249, 5249), Box(5249, 5249)), - Box(Box(5250, 5250), Box(5250, 5250)), - Box(Box(5251, 5251), Box(5251, 5251)), - Box(Box(5252, 5252), Box(5252, 5252)), - Box(Box(5253, 5253), Box(5253, 5253)), - Box(Box(5254, 5254), Box(5254, 5254)), - Box(Box(5255, 5255), Box(5255, 5255)), - Box(Box(5256, 5256), Box(5256, 5256)), - Box(Box(5257, 5257), Box(5257, 5257)), - Box(Box(5258, 5258), Box(5258, 5258)), - Box(Box(5259, 5259), Box(5259, 5259)), - Box(Box(5260, 5260), Box(5260, 5260)), - Box(Box(5261, 5261), Box(5261, 5261)), - Box(Box(5262, 5262), Box(5262, 5262)), - Box(Box(5263, 5263), Box(5263, 5263)), - Box(Box(5264, 5264), Box(5264, 5264)), - Box(Box(5265, 5265), Box(5265, 5265)), - Box(Box(5266, 5266), Box(5266, 5266)), - Box(Box(5267, 5267), Box(5267, 5267)), - Box(Box(5268, 5268), Box(5268, 5268)), - Box(Box(5269, 5269), Box(5269, 5269)), - Box(Box(5270, 5270), Box(5270, 5270)), - Box(Box(5271, 5271), Box(5271, 5271)), - Box(Box(5272, 5272), Box(5272, 5272)), - Box(Box(5273, 5273), Box(5273, 5273)), - Box(Box(5274, 5274), Box(5274, 5274)), - Box(Box(5275, 5275), Box(5275, 5275)), - Box(Box(5276, 5276), Box(5276, 5276)), - Box(Box(5277, 5277), Box(5277, 5277)), - Box(Box(5278, 5278), Box(5278, 5278)), - Box(Box(5279, 5279), Box(5279, 5279)), - Box(Box(5280, 5280), Box(5280, 5280)), - Box(Box(5281, 5281), Box(5281, 5281)), - Box(Box(5282, 5282), Box(5282, 5282)), - Box(Box(5283, 5283), Box(5283, 5283)), - Box(Box(5284, 5284), Box(5284, 5284)), - Box(Box(5285, 5285), Box(5285, 5285)), - Box(Box(5286, 5286), Box(5286, 5286)), - Box(Box(5287, 5287), Box(5287, 5287)), - Box(Box(5288, 5288), Box(5288, 5288)), - Box(Box(5289, 5289), Box(5289, 5289)), - Box(Box(5290, 5290), Box(5290, 5290)), - Box(Box(5291, 5291), Box(5291, 5291)), - Box(Box(5292, 5292), Box(5292, 5292)), - Box(Box(5293, 5293), Box(5293, 5293)), - Box(Box(5294, 5294), Box(5294, 5294)), - Box(Box(5295, 5295), Box(5295, 5295)), - Box(Box(5296, 5296), Box(5296, 5296)), - Box(Box(5297, 5297), Box(5297, 5297)), - Box(Box(5298, 5298), Box(5298, 5298)), - Box(Box(5299, 5299), Box(5299, 5299)), - Box(Box(5300, 5300), Box(5300, 5300)), - Box(Box(5301, 5301), Box(5301, 5301)), - Box(Box(5302, 5302), Box(5302, 5302)), - Box(Box(5303, 5303), Box(5303, 5303)), - Box(Box(5304, 5304), Box(5304, 5304)), - Box(Box(5305, 5305), Box(5305, 5305)), - Box(Box(5306, 5306), Box(5306, 5306)), - Box(Box(5307, 5307), Box(5307, 5307)), - Box(Box(5308, 5308), Box(5308, 5308)), - Box(Box(5309, 5309), Box(5309, 5309)), - Box(Box(5310, 5310), Box(5310, 5310)), - Box(Box(5311, 5311), Box(5311, 5311)), - Box(Box(5312, 5312), Box(5312, 5312)), - Box(Box(5313, 5313), Box(5313, 5313)), - Box(Box(5314, 5314), Box(5314, 5314)), - Box(Box(5315, 5315), Box(5315, 5315)), - Box(Box(5316, 5316), Box(5316, 5316)), - Box(Box(5317, 5317), Box(5317, 5317)), - Box(Box(5318, 5318), Box(5318, 5318)), - Box(Box(5319, 5319), Box(5319, 5319)), - Box(Box(5320, 5320), Box(5320, 5320)), - Box(Box(5321, 5321), Box(5321, 5321)), - Box(Box(5322, 5322), Box(5322, 5322)), - Box(Box(5323, 5323), Box(5323, 5323)), - Box(Box(5324, 5324), Box(5324, 5324)), - Box(Box(5325, 5325), Box(5325, 5325)), - Box(Box(5326, 5326), Box(5326, 5326)), - Box(Box(5327, 5327), Box(5327, 5327)), - Box(Box(5328, 5328), Box(5328, 5328)), - Box(Box(5329, 5329), Box(5329, 5329)), - Box(Box(5330, 5330), Box(5330, 5330)), - Box(Box(5331, 5331), Box(5331, 5331)), - Box(Box(5332, 5332), Box(5332, 5332)), - Box(Box(5333, 5333), Box(5333, 5333)), - Box(Box(5334, 5334), Box(5334, 5334)), - Box(Box(5335, 5335), Box(5335, 5335)), - Box(Box(5336, 5336), Box(5336, 5336)), - Box(Box(5337, 5337), Box(5337, 5337)), - Box(Box(5338, 5338), Box(5338, 5338)), - Box(Box(5339, 5339), Box(5339, 5339)), - Box(Box(5340, 5340), Box(5340, 5340)), - Box(Box(5341, 5341), Box(5341, 5341)), - Box(Box(5342, 5342), Box(5342, 5342)), - Box(Box(5343, 5343), Box(5343, 5343)), - Box(Box(5344, 5344), Box(5344, 5344)), - Box(Box(5345, 5345), Box(5345, 5345)), - Box(Box(5346, 5346), Box(5346, 5346)), - Box(Box(5347, 5347), Box(5347, 5347)), - Box(Box(5348, 5348), Box(5348, 5348)), - Box(Box(5349, 5349), Box(5349, 5349)), - Box(Box(5350, 5350), Box(5350, 5350)), - Box(Box(5351, 5351), Box(5351, 5351)), - Box(Box(5352, 5352), Box(5352, 5352)), - Box(Box(5353, 5353), Box(5353, 5353)), - Box(Box(5354, 5354), Box(5354, 5354)), - Box(Box(5355, 5355), Box(5355, 5355)), - Box(Box(5356, 5356), Box(5356, 5356)), - Box(Box(5357, 5357), Box(5357, 5357)), - Box(Box(5358, 5358), Box(5358, 5358)), - Box(Box(5359, 5359), Box(5359, 5359)), - Box(Box(5360, 5360), Box(5360, 5360)), - Box(Box(5361, 5361), Box(5361, 5361)), - Box(Box(5362, 5362), Box(5362, 5362)), - Box(Box(5363, 5363), Box(5363, 5363)), - Box(Box(5364, 5364), Box(5364, 5364)), - Box(Box(5365, 5365), Box(5365, 5365)), - Box(Box(5366, 5366), Box(5366, 5366)), - Box(Box(5367, 5367), Box(5367, 5367)), - Box(Box(5368, 5368), Box(5368, 5368)), - Box(Box(5369, 5369), Box(5369, 5369)), - Box(Box(5370, 5370), Box(5370, 5370)), - Box(Box(5371, 5371), Box(5371, 5371)), - Box(Box(5372, 5372), Box(5372, 5372)), - Box(Box(5373, 5373), Box(5373, 5373)), - Box(Box(5374, 5374), Box(5374, 5374)), - Box(Box(5375, 5375), Box(5375, 5375)), - Box(Box(5376, 5376), Box(5376, 5376)), - Box(Box(5377, 5377), Box(5377, 5377)), - Box(Box(5378, 5378), Box(5378, 5378)), - Box(Box(5379, 5379), Box(5379, 5379)), - Box(Box(5380, 5380), Box(5380, 5380)), - Box(Box(5381, 5381), Box(5381, 5381)), - Box(Box(5382, 5382), Box(5382, 5382)), - Box(Box(5383, 5383), Box(5383, 5383)), - Box(Box(5384, 5384), Box(5384, 5384)), - Box(Box(5385, 5385), Box(5385, 5385)), - Box(Box(5386, 5386), Box(5386, 5386)), - Box(Box(5387, 5387), Box(5387, 5387)), - Box(Box(5388, 5388), Box(5388, 5388)), - Box(Box(5389, 5389), Box(5389, 5389)), - Box(Box(5390, 5390), Box(5390, 5390)), - Box(Box(5391, 5391), Box(5391, 5391)), - Box(Box(5392, 5392), Box(5392, 5392)), - Box(Box(5393, 5393), Box(5393, 5393)), - Box(Box(5394, 5394), Box(5394, 5394)), - Box(Box(5395, 5395), Box(5395, 5395)), - Box(Box(5396, 5396), Box(5396, 5396)), - Box(Box(5397, 5397), Box(5397, 5397)), - Box(Box(5398, 5398), Box(5398, 5398)), - Box(Box(5399, 5399), Box(5399, 5399)), - Box(Box(5400, 5400), Box(5400, 5400)), - Box(Box(5401, 5401), Box(5401, 5401)), - Box(Box(5402, 5402), Box(5402, 5402)), - Box(Box(5403, 5403), Box(5403, 5403)), - Box(Box(5404, 5404), Box(5404, 5404)), - Box(Box(5405, 5405), Box(5405, 5405)), - Box(Box(5406, 5406), Box(5406, 5406)), - Box(Box(5407, 5407), Box(5407, 5407)), - Box(Box(5408, 5408), Box(5408, 5408)), - Box(Box(5409, 5409), Box(5409, 5409)), - Box(Box(5410, 5410), Box(5410, 5410)), - Box(Box(5411, 5411), Box(5411, 5411)), - Box(Box(5412, 5412), Box(5412, 5412)), - Box(Box(5413, 5413), Box(5413, 5413)), - Box(Box(5414, 5414), Box(5414, 5414)), - Box(Box(5415, 5415), Box(5415, 5415)), - Box(Box(5416, 5416), Box(5416, 5416)), - Box(Box(5417, 5417), Box(5417, 5417)), - Box(Box(5418, 5418), Box(5418, 5418)), - Box(Box(5419, 5419), Box(5419, 5419)), - Box(Box(5420, 5420), Box(5420, 5420)), - Box(Box(5421, 5421), Box(5421, 5421)), - Box(Box(5422, 5422), Box(5422, 5422)), - Box(Box(5423, 5423), Box(5423, 5423)), - Box(Box(5424, 5424), Box(5424, 5424)), - Box(Box(5425, 5425), Box(5425, 5425)), - Box(Box(5426, 5426), Box(5426, 5426)), - Box(Box(5427, 5427), Box(5427, 5427)), - Box(Box(5428, 5428), Box(5428, 5428)), - Box(Box(5429, 5429), Box(5429, 5429)), - Box(Box(5430, 5430), Box(5430, 5430)), - Box(Box(5431, 5431), Box(5431, 5431)), - Box(Box(5432, 5432), Box(5432, 5432)), - Box(Box(5433, 5433), Box(5433, 5433)), - Box(Box(5434, 5434), Box(5434, 5434)), - Box(Box(5435, 5435), Box(5435, 5435)), - Box(Box(5436, 5436), Box(5436, 5436)), - Box(Box(5437, 5437), Box(5437, 5437)), - Box(Box(5438, 5438), Box(5438, 5438)), - Box(Box(5439, 5439), Box(5439, 5439)), - Box(Box(5440, 5440), Box(5440, 5440)), - Box(Box(5441, 5441), Box(5441, 5441)), - Box(Box(5442, 5442), Box(5442, 5442)), - Box(Box(5443, 5443), Box(5443, 5443)), - Box(Box(5444, 5444), Box(5444, 5444)), - Box(Box(5445, 5445), Box(5445, 5445)), - Box(Box(5446, 5446), Box(5446, 5446)), - Box(Box(5447, 5447), Box(5447, 5447)), - Box(Box(5448, 5448), Box(5448, 5448)), - Box(Box(5449, 5449), Box(5449, 5449)), - Box(Box(5450, 5450), Box(5450, 5450)), - Box(Box(5451, 5451), Box(5451, 5451)), - Box(Box(5452, 5452), Box(5452, 5452)), - Box(Box(5453, 5453), Box(5453, 5453)), - Box(Box(5454, 5454), Box(5454, 5454)), - Box(Box(5455, 5455), Box(5455, 5455)), - Box(Box(5456, 5456), Box(5456, 5456)), - Box(Box(5457, 5457), Box(5457, 5457)), - Box(Box(5458, 5458), Box(5458, 5458)), - Box(Box(5459, 5459), Box(5459, 5459)), - Box(Box(5460, 5460), Box(5460, 5460)), - Box(Box(5461, 5461), Box(5461, 5461)), - Box(Box(5462, 5462), Box(5462, 5462)), - Box(Box(5463, 5463), Box(5463, 5463)), - Box(Box(5464, 5464), Box(5464, 5464)), - Box(Box(5465, 5465), Box(5465, 5465)), - Box(Box(5466, 5466), Box(5466, 5466)), - Box(Box(5467, 5467), Box(5467, 5467)), - Box(Box(5468, 5468), Box(5468, 5468)), - Box(Box(5469, 5469), Box(5469, 5469)), - Box(Box(5470, 5470), Box(5470, 5470)), - Box(Box(5471, 5471), Box(5471, 5471)), - Box(Box(5472, 5472), Box(5472, 5472)), - Box(Box(5473, 5473), Box(5473, 5473)), - Box(Box(5474, 5474), Box(5474, 5474)), - Box(Box(5475, 5475), Box(5475, 5475)), - Box(Box(5476, 5476), Box(5476, 5476)), - Box(Box(5477, 5477), Box(5477, 5477)), - Box(Box(5478, 5478), Box(5478, 5478)), - Box(Box(5479, 5479), Box(5479, 5479)), - Box(Box(5480, 5480), Box(5480, 5480)), - Box(Box(5481, 5481), Box(5481, 5481)), - Box(Box(5482, 5482), Box(5482, 5482)), - Box(Box(5483, 5483), Box(5483, 5483)), - Box(Box(5484, 5484), Box(5484, 5484)), - Box(Box(5485, 5485), Box(5485, 5485)), - Box(Box(5486, 5486), Box(5486, 5486)), - Box(Box(5487, 5487), Box(5487, 5487)), - Box(Box(5488, 5488), Box(5488, 5488)), - Box(Box(5489, 5489), Box(5489, 5489)), - Box(Box(5490, 5490), Box(5490, 5490)), - Box(Box(5491, 5491), Box(5491, 5491)), - Box(Box(5492, 5492), Box(5492, 5492)), - Box(Box(5493, 5493), Box(5493, 5493)), - Box(Box(5494, 5494), Box(5494, 5494)), - Box(Box(5495, 5495), Box(5495, 5495)), - Box(Box(5496, 5496), Box(5496, 5496)), - Box(Box(5497, 5497), Box(5497, 5497)), - Box(Box(5498, 5498), Box(5498, 5498)), - Box(Box(5499, 5499), Box(5499, 5499)), - Box(Box(5500, 5500), Box(5500, 5500)), - Box(Box(5501, 5501), Box(5501, 5501)), - Box(Box(5502, 5502), Box(5502, 5502)), - Box(Box(5503, 5503), Box(5503, 5503)), - Box(Box(5504, 5504), Box(5504, 5504)), - Box(Box(5505, 5505), Box(5505, 5505)), - Box(Box(5506, 5506), Box(5506, 5506)), - Box(Box(5507, 5507), Box(5507, 5507)), - Box(Box(5508, 5508), Box(5508, 5508)), - Box(Box(5509, 5509), Box(5509, 5509)), - Box(Box(5510, 5510), Box(5510, 5510)), - Box(Box(5511, 5511), Box(5511, 5511)), - Box(Box(5512, 5512), Box(5512, 5512)), - Box(Box(5513, 5513), Box(5513, 5513)), - Box(Box(5514, 5514), Box(5514, 5514)), - Box(Box(5515, 5515), Box(5515, 5515)), - Box(Box(5516, 5516), Box(5516, 5516)), - Box(Box(5517, 5517), Box(5517, 5517)), - Box(Box(5518, 5518), Box(5518, 5518)), - Box(Box(5519, 5519), Box(5519, 5519)), - Box(Box(5520, 5520), Box(5520, 5520)), - Box(Box(5521, 5521), Box(5521, 5521)), - Box(Box(5522, 5522), Box(5522, 5522)), - Box(Box(5523, 5523), Box(5523, 5523)), - Box(Box(5524, 5524), Box(5524, 5524)), - Box(Box(5525, 5525), Box(5525, 5525)), - Box(Box(5526, 5526), Box(5526, 5526)), - Box(Box(5527, 5527), Box(5527, 5527)), - Box(Box(5528, 5528), Box(5528, 5528)), - Box(Box(5529, 5529), Box(5529, 5529)), - Box(Box(5530, 5530), Box(5530, 5530)), - Box(Box(5531, 5531), Box(5531, 5531)), - Box(Box(5532, 5532), Box(5532, 5532)), - Box(Box(5533, 5533), Box(5533, 5533)), - Box(Box(5534, 5534), Box(5534, 5534)), - Box(Box(5535, 5535), Box(5535, 5535)), - Box(Box(5536, 5536), Box(5536, 5536)), - Box(Box(5537, 5537), Box(5537, 5537)), - Box(Box(5538, 5538), Box(5538, 5538)), - Box(Box(5539, 5539), Box(5539, 5539)), - Box(Box(5540, 5540), Box(5540, 5540)), - Box(Box(5541, 5541), Box(5541, 5541)), - Box(Box(5542, 5542), Box(5542, 5542)), - Box(Box(5543, 5543), Box(5543, 5543)), - Box(Box(5544, 5544), Box(5544, 5544)), - Box(Box(5545, 5545), Box(5545, 5545)), - Box(Box(5546, 5546), Box(5546, 5546)), - Box(Box(5547, 5547), Box(5547, 5547)), - Box(Box(5548, 5548), Box(5548, 5548)), - Box(Box(5549, 5549), Box(5549, 5549)), - Box(Box(5550, 5550), Box(5550, 5550)), - Box(Box(5551, 5551), Box(5551, 5551)), - Box(Box(5552, 5552), Box(5552, 5552)), - Box(Box(5553, 5553), Box(5553, 5553)), - Box(Box(5554, 5554), Box(5554, 5554)), - Box(Box(5555, 5555), Box(5555, 5555)), - Box(Box(5556, 5556), Box(5556, 5556)), - Box(Box(5557, 5557), Box(5557, 5557)), - Box(Box(5558, 5558), Box(5558, 5558)), - Box(Box(5559, 5559), Box(5559, 5559)), - Box(Box(5560, 5560), Box(5560, 5560)), - Box(Box(5561, 5561), Box(5561, 5561)), - Box(Box(5562, 5562), Box(5562, 5562)), - Box(Box(5563, 5563), Box(5563, 5563)), - Box(Box(5564, 5564), Box(5564, 5564)), - Box(Box(5565, 5565), Box(5565, 5565)), - Box(Box(5566, 5566), Box(5566, 5566)), - Box(Box(5567, 5567), Box(5567, 5567)), - Box(Box(5568, 5568), Box(5568, 5568)), - Box(Box(5569, 5569), Box(5569, 5569)), - Box(Box(5570, 5570), Box(5570, 5570)), - Box(Box(5571, 5571), Box(5571, 5571)), - Box(Box(5572, 5572), Box(5572, 5572)), - Box(Box(5573, 5573), Box(5573, 5573)), - Box(Box(5574, 5574), Box(5574, 5574)), - Box(Box(5575, 5575), Box(5575, 5575)), - Box(Box(5576, 5576), Box(5576, 5576)), - Box(Box(5577, 5577), Box(5577, 5577)), - Box(Box(5578, 5578), Box(5578, 5578)), - Box(Box(5579, 5579), Box(5579, 5579)), - Box(Box(5580, 5580), Box(5580, 5580)), - Box(Box(5581, 5581), Box(5581, 5581)), - Box(Box(5582, 5582), Box(5582, 5582)), - Box(Box(5583, 5583), Box(5583, 5583)), - Box(Box(5584, 5584), Box(5584, 5584)), - Box(Box(5585, 5585), Box(5585, 5585)), - Box(Box(5586, 5586), Box(5586, 5586)), - Box(Box(5587, 5587), Box(5587, 5587)), - Box(Box(5588, 5588), Box(5588, 5588)), - Box(Box(5589, 5589), Box(5589, 5589)), - Box(Box(5590, 5590), Box(5590, 5590)), - Box(Box(5591, 5591), Box(5591, 5591)), - Box(Box(5592, 5592), Box(5592, 5592)), - Box(Box(5593, 5593), Box(5593, 5593)), - Box(Box(5594, 5594), Box(5594, 5594)), - Box(Box(5595, 5595), Box(5595, 5595)), - Box(Box(5596, 5596), Box(5596, 5596)), - Box(Box(5597, 5597), Box(5597, 5597)), - Box(Box(5598, 5598), Box(5598, 5598)), - Box(Box(5599, 5599), Box(5599, 5599)), - Box(Box(5600, 5600), Box(5600, 5600)), - Box(Box(5601, 5601), Box(5601, 5601)), - Box(Box(5602, 5602), Box(5602, 5602)), - Box(Box(5603, 5603), Box(5603, 5603)), - Box(Box(5604, 5604), Box(5604, 5604)), - Box(Box(5605, 5605), Box(5605, 5605)), - Box(Box(5606, 5606), Box(5606, 5606)), - Box(Box(5607, 5607), Box(5607, 5607)), - Box(Box(5608, 5608), Box(5608, 5608)), - Box(Box(5609, 5609), Box(5609, 5609)), - Box(Box(5610, 5610), Box(5610, 5610)), - Box(Box(5611, 5611), Box(5611, 5611)), - Box(Box(5612, 5612), Box(5612, 5612)), - Box(Box(5613, 5613), Box(5613, 5613)), - Box(Box(5614, 5614), Box(5614, 5614)), - Box(Box(5615, 5615), Box(5615, 5615)), - Box(Box(5616, 5616), Box(5616, 5616)), - Box(Box(5617, 5617), Box(5617, 5617)), - Box(Box(5618, 5618), Box(5618, 5618)), - Box(Box(5619, 5619), Box(5619, 5619)), - Box(Box(5620, 5620), Box(5620, 5620)), - Box(Box(5621, 5621), Box(5621, 5621)), - Box(Box(5622, 5622), Box(5622, 5622)), - Box(Box(5623, 5623), Box(5623, 5623)), - Box(Box(5624, 5624), Box(5624, 5624)), - Box(Box(5625, 5625), Box(5625, 5625)), - Box(Box(5626, 5626), Box(5626, 5626)), - Box(Box(5627, 5627), Box(5627, 5627)), - Box(Box(5628, 5628), Box(5628, 5628)), - Box(Box(5629, 5629), Box(5629, 5629)), - Box(Box(5630, 5630), Box(5630, 5630)), - Box(Box(5631, 5631), Box(5631, 5631)), - Box(Box(5632, 5632), Box(5632, 5632)), - Box(Box(5633, 5633), Box(5633, 5633)), - Box(Box(5634, 5634), Box(5634, 5634)), - Box(Box(5635, 5635), Box(5635, 5635)), - Box(Box(5636, 5636), Box(5636, 5636)), - Box(Box(5637, 5637), Box(5637, 5637)), - Box(Box(5638, 5638), Box(5638, 5638)), - Box(Box(5639, 5639), Box(5639, 5639)), - Box(Box(5640, 5640), Box(5640, 5640)), - Box(Box(5641, 5641), Box(5641, 5641)), - Box(Box(5642, 5642), Box(5642, 5642)), - Box(Box(5643, 5643), Box(5643, 5643)), - Box(Box(5644, 5644), Box(5644, 5644)), - Box(Box(5645, 5645), Box(5645, 5645)), - Box(Box(5646, 5646), Box(5646, 5646)), - Box(Box(5647, 5647), Box(5647, 5647)), - Box(Box(5648, 5648), Box(5648, 5648)), - Box(Box(5649, 5649), Box(5649, 5649)), - Box(Box(5650, 5650), Box(5650, 5650)), - Box(Box(5651, 5651), Box(5651, 5651)), - Box(Box(5652, 5652), Box(5652, 5652)), - Box(Box(5653, 5653), Box(5653, 5653)), - Box(Box(5654, 5654), Box(5654, 5654)), - Box(Box(5655, 5655), Box(5655, 5655)), - Box(Box(5656, 5656), Box(5656, 5656)), - Box(Box(5657, 5657), Box(5657, 5657)), - Box(Box(5658, 5658), Box(5658, 5658)), - Box(Box(5659, 5659), Box(5659, 5659)), - Box(Box(5660, 5660), Box(5660, 5660)), - Box(Box(5661, 5661), Box(5661, 5661)), - Box(Box(5662, 5662), Box(5662, 5662)), - Box(Box(5663, 5663), Box(5663, 5663)), - Box(Box(5664, 5664), Box(5664, 5664)), - Box(Box(5665, 5665), Box(5665, 5665)), - Box(Box(5666, 5666), Box(5666, 5666)), - Box(Box(5667, 5667), Box(5667, 5667)), - Box(Box(5668, 5668), Box(5668, 5668)), - Box(Box(5669, 5669), Box(5669, 5669)), - Box(Box(5670, 5670), Box(5670, 5670)), - Box(Box(5671, 5671), Box(5671, 5671)), - Box(Box(5672, 5672), Box(5672, 5672)), - Box(Box(5673, 5673), Box(5673, 5673)), - Box(Box(5674, 5674), Box(5674, 5674)), - Box(Box(5675, 5675), Box(5675, 5675)), - Box(Box(5676, 5676), Box(5676, 5676)), - Box(Box(5677, 5677), Box(5677, 5677)), - Box(Box(5678, 5678), Box(5678, 5678)), - Box(Box(5679, 5679), Box(5679, 5679)), - Box(Box(5680, 5680), Box(5680, 5680)), - Box(Box(5681, 5681), Box(5681, 5681)), - Box(Box(5682, 5682), Box(5682, 5682)), - Box(Box(5683, 5683), Box(5683, 5683)), - Box(Box(5684, 5684), Box(5684, 5684)), - Box(Box(5685, 5685), Box(5685, 5685)), - Box(Box(5686, 5686), Box(5686, 5686)), - Box(Box(5687, 5687), Box(5687, 5687)), - Box(Box(5688, 5688), Box(5688, 5688)), - Box(Box(5689, 5689), Box(5689, 5689)), - Box(Box(5690, 5690), Box(5690, 5690)), - Box(Box(5691, 5691), Box(5691, 5691)), - Box(Box(5692, 5692), Box(5692, 5692)), - Box(Box(5693, 5693), Box(5693, 5693)), - Box(Box(5694, 5694), Box(5694, 5694)), - Box(Box(5695, 5695), Box(5695, 5695)), - Box(Box(5696, 5696), Box(5696, 5696)), - Box(Box(5697, 5697), Box(5697, 5697)), - Box(Box(5698, 5698), Box(5698, 5698)), - Box(Box(5699, 5699), Box(5699, 5699)), - Box(Box(5700, 5700), Box(5700, 5700)), - Box(Box(5701, 5701), Box(5701, 5701)), - Box(Box(5702, 5702), Box(5702, 5702)), - Box(Box(5703, 5703), Box(5703, 5703)), - Box(Box(5704, 5704), Box(5704, 5704)), - Box(Box(5705, 5705), Box(5705, 5705)), - Box(Box(5706, 5706), Box(5706, 5706)), - Box(Box(5707, 5707), Box(5707, 5707)), - Box(Box(5708, 5708), Box(5708, 5708)), - Box(Box(5709, 5709), Box(5709, 5709)), - Box(Box(5710, 5710), Box(5710, 5710)), - Box(Box(5711, 5711), Box(5711, 5711)), - Box(Box(5712, 5712), Box(5712, 5712)), - Box(Box(5713, 5713), Box(5713, 5713)), - Box(Box(5714, 5714), Box(5714, 5714)), - Box(Box(5715, 5715), Box(5715, 5715)), - Box(Box(5716, 5716), Box(5716, 5716)), - Box(Box(5717, 5717), Box(5717, 5717)), - Box(Box(5718, 5718), Box(5718, 5718)), - Box(Box(5719, 5719), Box(5719, 5719)), - Box(Box(5720, 5720), Box(5720, 5720)), - Box(Box(5721, 5721), Box(5721, 5721)), - Box(Box(5722, 5722), Box(5722, 5722)), - Box(Box(5723, 5723), Box(5723, 5723)), - Box(Box(5724, 5724), Box(5724, 5724)), - Box(Box(5725, 5725), Box(5725, 5725)), - Box(Box(5726, 5726), Box(5726, 5726)), - Box(Box(5727, 5727), Box(5727, 5727)), - Box(Box(5728, 5728), Box(5728, 5728)), - Box(Box(5729, 5729), Box(5729, 5729)), - Box(Box(5730, 5730), Box(5730, 5730)), - Box(Box(5731, 5731), Box(5731, 5731)), - Box(Box(5732, 5732), Box(5732, 5732)), - Box(Box(5733, 5733), Box(5733, 5733)), - Box(Box(5734, 5734), Box(5734, 5734)), - Box(Box(5735, 5735), Box(5735, 5735)), - Box(Box(5736, 5736), Box(5736, 5736)), - Box(Box(5737, 5737), Box(5737, 5737)), - Box(Box(5738, 5738), Box(5738, 5738)), - Box(Box(5739, 5739), Box(5739, 5739)), - Box(Box(5740, 5740), Box(5740, 5740)), - Box(Box(5741, 5741), Box(5741, 5741)), - Box(Box(5742, 5742), Box(5742, 5742)), - Box(Box(5743, 5743), Box(5743, 5743)), - Box(Box(5744, 5744), Box(5744, 5744)), - Box(Box(5745, 5745), Box(5745, 5745)), - Box(Box(5746, 5746), Box(5746, 5746)), - Box(Box(5747, 5747), Box(5747, 5747)), - Box(Box(5748, 5748), Box(5748, 5748)), - Box(Box(5749, 5749), Box(5749, 5749)), - Box(Box(5750, 5750), Box(5750, 5750)), - Box(Box(5751, 5751), Box(5751, 5751)), - Box(Box(5752, 5752), Box(5752, 5752)), - Box(Box(5753, 5753), Box(5753, 5753)), - Box(Box(5754, 5754), Box(5754, 5754)), - Box(Box(5755, 5755), Box(5755, 5755)), - Box(Box(5756, 5756), Box(5756, 5756)), - Box(Box(5757, 5757), Box(5757, 5757)), - Box(Box(5758, 5758), Box(5758, 5758)), - Box(Box(5759, 5759), Box(5759, 5759)), - Box(Box(5760, 5760), Box(5760, 5760)), - Box(Box(5761, 5761), Box(5761, 5761)), - Box(Box(5762, 5762), Box(5762, 5762)), - Box(Box(5763, 5763), Box(5763, 5763)), - Box(Box(5764, 5764), Box(5764, 5764)), - Box(Box(5765, 5765), Box(5765, 5765)), - Box(Box(5766, 5766), Box(5766, 5766)), - Box(Box(5767, 5767), Box(5767, 5767)), - Box(Box(5768, 5768), Box(5768, 5768)), - Box(Box(5769, 5769), Box(5769, 5769)), - Box(Box(5770, 5770), Box(5770, 5770)), - Box(Box(5771, 5771), Box(5771, 5771)), - Box(Box(5772, 5772), Box(5772, 5772)), - Box(Box(5773, 5773), Box(5773, 5773)), - Box(Box(5774, 5774), Box(5774, 5774)), - Box(Box(5775, 5775), Box(5775, 5775)), - Box(Box(5776, 5776), Box(5776, 5776)), - Box(Box(5777, 5777), Box(5777, 5777)), - Box(Box(5778, 5778), Box(5778, 5778)), - Box(Box(5779, 5779), Box(5779, 5779)), - Box(Box(5780, 5780), Box(5780, 5780)), - Box(Box(5781, 5781), Box(5781, 5781)), - Box(Box(5782, 5782), Box(5782, 5782)), - Box(Box(5783, 5783), Box(5783, 5783)), - Box(Box(5784, 5784), Box(5784, 5784)), - Box(Box(5785, 5785), Box(5785, 5785)), - Box(Box(5786, 5786), Box(5786, 5786)), - Box(Box(5787, 5787), Box(5787, 5787)), - Box(Box(5788, 5788), Box(5788, 5788)), - Box(Box(5789, 5789), Box(5789, 5789)), - Box(Box(5790, 5790), Box(5790, 5790)), - Box(Box(5791, 5791), Box(5791, 5791)), - Box(Box(5792, 5792), Box(5792, 5792)), - Box(Box(5793, 5793), Box(5793, 5793)), - Box(Box(5794, 5794), Box(5794, 5794)), - Box(Box(5795, 5795), Box(5795, 5795)), - Box(Box(5796, 5796), Box(5796, 5796)), - Box(Box(5797, 5797), Box(5797, 5797)), - Box(Box(5798, 5798), Box(5798, 5798)), - Box(Box(5799, 5799), Box(5799, 5799)), - Box(Box(5800, 5800), Box(5800, 5800)), - Box(Box(5801, 5801), Box(5801, 5801)), - Box(Box(5802, 5802), Box(5802, 5802)), - Box(Box(5803, 5803), Box(5803, 5803)), - Box(Box(5804, 5804), Box(5804, 5804)), - Box(Box(5805, 5805), Box(5805, 5805)), - Box(Box(5806, 5806), Box(5806, 5806)), - Box(Box(5807, 5807), Box(5807, 5807)), - Box(Box(5808, 5808), Box(5808, 5808)), - Box(Box(5809, 5809), Box(5809, 5809)), - Box(Box(5810, 5810), Box(5810, 5810)), - Box(Box(5811, 5811), Box(5811, 5811)), - Box(Box(5812, 5812), Box(5812, 5812)), - Box(Box(5813, 5813), Box(5813, 5813)), - Box(Box(5814, 5814), Box(5814, 5814)), - Box(Box(5815, 5815), Box(5815, 5815)), - Box(Box(5816, 5816), Box(5816, 5816)), - Box(Box(5817, 5817), Box(5817, 5817)), - Box(Box(5818, 5818), Box(5818, 5818)), - Box(Box(5819, 5819), Box(5819, 5819)), - Box(Box(5820, 5820), Box(5820, 5820)), - Box(Box(5821, 5821), Box(5821, 5821)), - Box(Box(5822, 5822), Box(5822, 5822)), - Box(Box(5823, 5823), Box(5823, 5823)), - Box(Box(5824, 5824), Box(5824, 5824)), - Box(Box(5825, 5825), Box(5825, 5825)), - Box(Box(5826, 5826), Box(5826, 5826)), - Box(Box(5827, 5827), Box(5827, 5827)), - Box(Box(5828, 5828), Box(5828, 5828)), - Box(Box(5829, 5829), Box(5829, 5829)), - Box(Box(5830, 5830), Box(5830, 5830)), - Box(Box(5831, 5831), Box(5831, 5831)), - Box(Box(5832, 5832), Box(5832, 5832)), - Box(Box(5833, 5833), Box(5833, 5833)), - Box(Box(5834, 5834), Box(5834, 5834)), - Box(Box(5835, 5835), Box(5835, 5835)), - Box(Box(5836, 5836), Box(5836, 5836)), - Box(Box(5837, 5837), Box(5837, 5837)), - Box(Box(5838, 5838), Box(5838, 5838)), - Box(Box(5839, 5839), Box(5839, 5839)), - Box(Box(5840, 5840), Box(5840, 5840)), - Box(Box(5841, 5841), Box(5841, 5841)), - Box(Box(5842, 5842), Box(5842, 5842)), - Box(Box(5843, 5843), Box(5843, 5843)), - Box(Box(5844, 5844), Box(5844, 5844)), - Box(Box(5845, 5845), Box(5845, 5845)), - Box(Box(5846, 5846), Box(5846, 5846)), - Box(Box(5847, 5847), Box(5847, 5847)), - Box(Box(5848, 5848), Box(5848, 5848)), - Box(Box(5849, 5849), Box(5849, 5849)), - Box(Box(5850, 5850), Box(5850, 5850)), - Box(Box(5851, 5851), Box(5851, 5851)), - Box(Box(5852, 5852), Box(5852, 5852)), - Box(Box(5853, 5853), Box(5853, 5853)), - Box(Box(5854, 5854), Box(5854, 5854)), - Box(Box(5855, 5855), Box(5855, 5855)), - Box(Box(5856, 5856), Box(5856, 5856)), - Box(Box(5857, 5857), Box(5857, 5857)), - Box(Box(5858, 5858), Box(5858, 5858)), - Box(Box(5859, 5859), Box(5859, 5859)), - Box(Box(5860, 5860), Box(5860, 5860)), - Box(Box(5861, 5861), Box(5861, 5861)), - Box(Box(5862, 5862), Box(5862, 5862)), - Box(Box(5863, 5863), Box(5863, 5863)), - Box(Box(5864, 5864), Box(5864, 5864)), - Box(Box(5865, 5865), Box(5865, 5865)), - Box(Box(5866, 5866), Box(5866, 5866)), - Box(Box(5867, 5867), Box(5867, 5867)), - Box(Box(5868, 5868), Box(5868, 5868)), - Box(Box(5869, 5869), Box(5869, 5869)), - Box(Box(5870, 5870), Box(5870, 5870)), - Box(Box(5871, 5871), Box(5871, 5871)), - Box(Box(5872, 5872), Box(5872, 5872)), - Box(Box(5873, 5873), Box(5873, 5873)), - Box(Box(5874, 5874), Box(5874, 5874)), - Box(Box(5875, 5875), Box(5875, 5875)), - Box(Box(5876, 5876), Box(5876, 5876)), - Box(Box(5877, 5877), Box(5877, 5877)), - Box(Box(5878, 5878), Box(5878, 5878)), - Box(Box(5879, 5879), Box(5879, 5879)), - Box(Box(5880, 5880), Box(5880, 5880)), - Box(Box(5881, 5881), Box(5881, 5881)), - Box(Box(5882, 5882), Box(5882, 5882)), - Box(Box(5883, 5883), Box(5883, 5883)), - Box(Box(5884, 5884), Box(5884, 5884)), - Box(Box(5885, 5885), Box(5885, 5885)), - Box(Box(5886, 5886), Box(5886, 5886)), - Box(Box(5887, 5887), Box(5887, 5887)), - Box(Box(5888, 5888), Box(5888, 5888)), - Box(Box(5889, 5889), Box(5889, 5889)), - Box(Box(5890, 5890), Box(5890, 5890)), - Box(Box(5891, 5891), Box(5891, 5891)), - Box(Box(5892, 5892), Box(5892, 5892)), - Box(Box(5893, 5893), Box(5893, 5893)), - Box(Box(5894, 5894), Box(5894, 5894)), - Box(Box(5895, 5895), Box(5895, 5895)), - Box(Box(5896, 5896), Box(5896, 5896)), - Box(Box(5897, 5897), Box(5897, 5897)), - Box(Box(5898, 5898), Box(5898, 5898)), - Box(Box(5899, 5899), Box(5899, 5899)), - Box(Box(5900, 5900), Box(5900, 5900)), - Box(Box(5901, 5901), Box(5901, 5901)), - Box(Box(5902, 5902), Box(5902, 5902)), - Box(Box(5903, 5903), Box(5903, 5903)), - Box(Box(5904, 5904), Box(5904, 5904)), - Box(Box(5905, 5905), Box(5905, 5905)), - Box(Box(5906, 5906), Box(5906, 5906)), - Box(Box(5907, 5907), Box(5907, 5907)), - Box(Box(5908, 5908), Box(5908, 5908)), - Box(Box(5909, 5909), Box(5909, 5909)), - Box(Box(5910, 5910), Box(5910, 5910)), - Box(Box(5911, 5911), Box(5911, 5911)), - Box(Box(5912, 5912), Box(5912, 5912)), - Box(Box(5913, 5913), Box(5913, 5913)), - Box(Box(5914, 5914), Box(5914, 5914)), - Box(Box(5915, 5915), Box(5915, 5915)), - Box(Box(5916, 5916), Box(5916, 5916)), - Box(Box(5917, 5917), Box(5917, 5917)), - Box(Box(5918, 5918), Box(5918, 5918)), - Box(Box(5919, 5919), Box(5919, 5919)), - Box(Box(5920, 5920), Box(5920, 5920)), - Box(Box(5921, 5921), Box(5921, 5921)), - Box(Box(5922, 5922), Box(5922, 5922)), - Box(Box(5923, 5923), Box(5923, 5923)), - Box(Box(5924, 5924), Box(5924, 5924)), - Box(Box(5925, 5925), Box(5925, 5925)), - Box(Box(5926, 5926), Box(5926, 5926)), - Box(Box(5927, 5927), Box(5927, 5927)), - Box(Box(5928, 5928), Box(5928, 5928)), - Box(Box(5929, 5929), Box(5929, 5929)), - Box(Box(5930, 5930), Box(5930, 5930)), - Box(Box(5931, 5931), Box(5931, 5931)), - Box(Box(5932, 5932), Box(5932, 5932)), - Box(Box(5933, 5933), Box(5933, 5933)), - Box(Box(5934, 5934), Box(5934, 5934)), - Box(Box(5935, 5935), Box(5935, 5935)), - Box(Box(5936, 5936), Box(5936, 5936)), - Box(Box(5937, 5937), Box(5937, 5937)), - Box(Box(5938, 5938), Box(5938, 5938)), - Box(Box(5939, 5939), Box(5939, 5939)), - Box(Box(5940, 5940), Box(5940, 5940)), - Box(Box(5941, 5941), Box(5941, 5941)), - Box(Box(5942, 5942), Box(5942, 5942)), - Box(Box(5943, 5943), Box(5943, 5943)), - Box(Box(5944, 5944), Box(5944, 5944)), - Box(Box(5945, 5945), Box(5945, 5945)), - Box(Box(5946, 5946), Box(5946, 5946)), - Box(Box(5947, 5947), Box(5947, 5947)), - Box(Box(5948, 5948), Box(5948, 5948)), - Box(Box(5949, 5949), Box(5949, 5949)), - Box(Box(5950, 5950), Box(5950, 5950)), - Box(Box(5951, 5951), Box(5951, 5951)), - Box(Box(5952, 5952), Box(5952, 5952)), - Box(Box(5953, 5953), Box(5953, 5953)), - Box(Box(5954, 5954), Box(5954, 5954)), - Box(Box(5955, 5955), Box(5955, 5955)), - Box(Box(5956, 5956), Box(5956, 5956)), - Box(Box(5957, 5957), Box(5957, 5957)), - Box(Box(5958, 5958), Box(5958, 5958)), - Box(Box(5959, 5959), Box(5959, 5959)), - Box(Box(5960, 5960), Box(5960, 5960)), - Box(Box(5961, 5961), Box(5961, 5961)), - Box(Box(5962, 5962), Box(5962, 5962)), - Box(Box(5963, 5963), Box(5963, 5963)), - Box(Box(5964, 5964), Box(5964, 5964)), - Box(Box(5965, 5965), Box(5965, 5965)), - Box(Box(5966, 5966), Box(5966, 5966)), - Box(Box(5967, 5967), Box(5967, 5967)), - Box(Box(5968, 5968), Box(5968, 5968)), - Box(Box(5969, 5969), Box(5969, 5969)), - Box(Box(5970, 5970), Box(5970, 5970)), - Box(Box(5971, 5971), Box(5971, 5971)), - Box(Box(5972, 5972), Box(5972, 5972)), - Box(Box(5973, 5973), Box(5973, 5973)), - Box(Box(5974, 5974), Box(5974, 5974)), - Box(Box(5975, 5975), Box(5975, 5975)), - Box(Box(5976, 5976), Box(5976, 5976)), - Box(Box(5977, 5977), Box(5977, 5977)), - Box(Box(5978, 5978), Box(5978, 5978)), - Box(Box(5979, 5979), Box(5979, 5979)), - Box(Box(5980, 5980), Box(5980, 5980)), - Box(Box(5981, 5981), Box(5981, 5981)), - Box(Box(5982, 5982), Box(5982, 5982)), - Box(Box(5983, 5983), Box(5983, 5983)), - Box(Box(5984, 5984), Box(5984, 5984)), - Box(Box(5985, 5985), Box(5985, 5985)), - Box(Box(5986, 5986), Box(5986, 5986)), - Box(Box(5987, 5987), Box(5987, 5987)), - Box(Box(5988, 5988), Box(5988, 5988)), - Box(Box(5989, 5989), Box(5989, 5989)), - Box(Box(5990, 5990), Box(5990, 5990)), - Box(Box(5991, 5991), Box(5991, 5991)), - Box(Box(5992, 5992), Box(5992, 5992)), - Box(Box(5993, 5993), Box(5993, 5993)), - Box(Box(5994, 5994), Box(5994, 5994)), - Box(Box(5995, 5995), Box(5995, 5995)), - Box(Box(5996, 5996), Box(5996, 5996)), - Box(Box(5997, 5997), Box(5997, 5997)), - Box(Box(5998, 5998), Box(5998, 5998)), - Box(Box(5999, 5999), Box(5999, 5999)), - Box(Box(6000, 6000), Box(6000, 6000)), - Box(Box(6001, 6001), Box(6001, 6001)), - Box(Box(6002, 6002), Box(6002, 6002)), - Box(Box(6003, 6003), Box(6003, 6003)), - Box(Box(6004, 6004), Box(6004, 6004)), - Box(Box(6005, 6005), Box(6005, 6005)), - Box(Box(6006, 6006), Box(6006, 6006)), - Box(Box(6007, 6007), Box(6007, 6007)), - Box(Box(6008, 6008), Box(6008, 6008)), - Box(Box(6009, 6009), Box(6009, 6009)), - Box(Box(6010, 6010), Box(6010, 6010)), - Box(Box(6011, 6011), Box(6011, 6011)), - Box(Box(6012, 6012), Box(6012, 6012)), - Box(Box(6013, 6013), Box(6013, 6013)), - Box(Box(6014, 6014), Box(6014, 6014)), - Box(Box(6015, 6015), Box(6015, 6015)), - Box(Box(6016, 6016), Box(6016, 6016)), - Box(Box(6017, 6017), Box(6017, 6017)), - Box(Box(6018, 6018), Box(6018, 6018)), - Box(Box(6019, 6019), Box(6019, 6019)), - Box(Box(6020, 6020), Box(6020, 6020)), - Box(Box(6021, 6021), Box(6021, 6021)), - Box(Box(6022, 6022), Box(6022, 6022)), - Box(Box(6023, 6023), Box(6023, 6023)), - Box(Box(6024, 6024), Box(6024, 6024)), - Box(Box(6025, 6025), Box(6025, 6025)), - Box(Box(6026, 6026), Box(6026, 6026)), - Box(Box(6027, 6027), Box(6027, 6027)), - Box(Box(6028, 6028), Box(6028, 6028)), - Box(Box(6029, 6029), Box(6029, 6029)), - Box(Box(6030, 6030), Box(6030, 6030)), - Box(Box(6031, 6031), Box(6031, 6031)), - Box(Box(6032, 6032), Box(6032, 6032)), - Box(Box(6033, 6033), Box(6033, 6033)), - Box(Box(6034, 6034), Box(6034, 6034)), - Box(Box(6035, 6035), Box(6035, 6035)), - Box(Box(6036, 6036), Box(6036, 6036)), - Box(Box(6037, 6037), Box(6037, 6037)), - Box(Box(6038, 6038), Box(6038, 6038)), - Box(Box(6039, 6039), Box(6039, 6039)), - Box(Box(6040, 6040), Box(6040, 6040)), - Box(Box(6041, 6041), Box(6041, 6041)), - Box(Box(6042, 6042), Box(6042, 6042)), - Box(Box(6043, 6043), Box(6043, 6043)), - Box(Box(6044, 6044), Box(6044, 6044)), - Box(Box(6045, 6045), Box(6045, 6045)), - Box(Box(6046, 6046), Box(6046, 6046)), - Box(Box(6047, 6047), Box(6047, 6047)), - Box(Box(6048, 6048), Box(6048, 6048)), - Box(Box(6049, 6049), Box(6049, 6049)), - Box(Box(6050, 6050), Box(6050, 6050)), - Box(Box(6051, 6051), Box(6051, 6051)), - Box(Box(6052, 6052), Box(6052, 6052)), - Box(Box(6053, 6053), Box(6053, 6053)), - Box(Box(6054, 6054), Box(6054, 6054)), - Box(Box(6055, 6055), Box(6055, 6055)), - Box(Box(6056, 6056), Box(6056, 6056)), - Box(Box(6057, 6057), Box(6057, 6057)), - Box(Box(6058, 6058), Box(6058, 6058)), - Box(Box(6059, 6059), Box(6059, 6059)), - Box(Box(6060, 6060), Box(6060, 6060)), - Box(Box(6061, 6061), Box(6061, 6061)), - Box(Box(6062, 6062), Box(6062, 6062)), - Box(Box(6063, 6063), Box(6063, 6063)), - Box(Box(6064, 6064), Box(6064, 6064)), - Box(Box(6065, 6065), Box(6065, 6065)), - Box(Box(6066, 6066), Box(6066, 6066)), - Box(Box(6067, 6067), Box(6067, 6067)), - Box(Box(6068, 6068), Box(6068, 6068)), - Box(Box(6069, 6069), Box(6069, 6069)), - Box(Box(6070, 6070), Box(6070, 6070)), - Box(Box(6071, 6071), Box(6071, 6071)), - Box(Box(6072, 6072), Box(6072, 6072)), - Box(Box(6073, 6073), Box(6073, 6073)), - Box(Box(6074, 6074), Box(6074, 6074)), - Box(Box(6075, 6075), Box(6075, 6075)), - Box(Box(6076, 6076), Box(6076, 6076)), - Box(Box(6077, 6077), Box(6077, 6077)), - Box(Box(6078, 6078), Box(6078, 6078)), - Box(Box(6079, 6079), Box(6079, 6079)), - Box(Box(6080, 6080), Box(6080, 6080)), - Box(Box(6081, 6081), Box(6081, 6081)), - Box(Box(6082, 6082), Box(6082, 6082)), - Box(Box(6083, 6083), Box(6083, 6083)), - Box(Box(6084, 6084), Box(6084, 6084)), - Box(Box(6085, 6085), Box(6085, 6085)), - Box(Box(6086, 6086), Box(6086, 6086)), - Box(Box(6087, 6087), Box(6087, 6087)), - Box(Box(6088, 6088), Box(6088, 6088)), - Box(Box(6089, 6089), Box(6089, 6089)), - Box(Box(6090, 6090), Box(6090, 6090)), - Box(Box(6091, 6091), Box(6091, 6091)), - Box(Box(6092, 6092), Box(6092, 6092)), - Box(Box(6093, 6093), Box(6093, 6093)), - Box(Box(6094, 6094), Box(6094, 6094)), - Box(Box(6095, 6095), Box(6095, 6095)), - Box(Box(6096, 6096), Box(6096, 6096)), - Box(Box(6097, 6097), Box(6097, 6097)), - Box(Box(6098, 6098), Box(6098, 6098)), - Box(Box(6099, 6099), Box(6099, 6099)), - Box(Box(6100, 6100), Box(6100, 6100)), - Box(Box(6101, 6101), Box(6101, 6101)), - Box(Box(6102, 6102), Box(6102, 6102)), - Box(Box(6103, 6103), Box(6103, 6103)), - Box(Box(6104, 6104), Box(6104, 6104)), - Box(Box(6105, 6105), Box(6105, 6105)), - Box(Box(6106, 6106), Box(6106, 6106)), - Box(Box(6107, 6107), Box(6107, 6107)), - Box(Box(6108, 6108), Box(6108, 6108)), - Box(Box(6109, 6109), Box(6109, 6109)), - Box(Box(6110, 6110), Box(6110, 6110)), - Box(Box(6111, 6111), Box(6111, 6111)), - Box(Box(6112, 6112), Box(6112, 6112)), - Box(Box(6113, 6113), Box(6113, 6113)), - Box(Box(6114, 6114), Box(6114, 6114)), - Box(Box(6115, 6115), Box(6115, 6115)), - Box(Box(6116, 6116), Box(6116, 6116)), - Box(Box(6117, 6117), Box(6117, 6117)), - Box(Box(6118, 6118), Box(6118, 6118)), - Box(Box(6119, 6119), Box(6119, 6119)), - Box(Box(6120, 6120), Box(6120, 6120)), - Box(Box(6121, 6121), Box(6121, 6121)), - Box(Box(6122, 6122), Box(6122, 6122)), - Box(Box(6123, 6123), Box(6123, 6123)), - Box(Box(6124, 6124), Box(6124, 6124)), - Box(Box(6125, 6125), Box(6125, 6125)), - Box(Box(6126, 6126), Box(6126, 6126)), - Box(Box(6127, 6127), Box(6127, 6127)), - Box(Box(6128, 6128), Box(6128, 6128)), - Box(Box(6129, 6129), Box(6129, 6129)), - Box(Box(6130, 6130), Box(6130, 6130)), - Box(Box(6131, 6131), Box(6131, 6131)), - Box(Box(6132, 6132), Box(6132, 6132)), - Box(Box(6133, 6133), Box(6133, 6133)), - Box(Box(6134, 6134), Box(6134, 6134)), - Box(Box(6135, 6135), Box(6135, 6135)), - Box(Box(6136, 6136), Box(6136, 6136)), - Box(Box(6137, 6137), Box(6137, 6137)), - Box(Box(6138, 6138), Box(6138, 6138)), - Box(Box(6139, 6139), Box(6139, 6139)), - Box(Box(6140, 6140), Box(6140, 6140)), - Box(Box(6141, 6141), Box(6141, 6141)), - Box(Box(6142, 6142), Box(6142, 6142)), - Box(Box(6143, 6143), Box(6143, 6143)), - Box(Box(6144, 6144), Box(6144, 6144)), - Box(Box(6145, 6145), Box(6145, 6145)), - Box(Box(6146, 6146), Box(6146, 6146)), - Box(Box(6147, 6147), Box(6147, 6147)), - Box(Box(6148, 6148), Box(6148, 6148)), - Box(Box(6149, 6149), Box(6149, 6149)), - Box(Box(6150, 6150), Box(6150, 6150)), - Box(Box(6151, 6151), Box(6151, 6151)), - Box(Box(6152, 6152), Box(6152, 6152)), - Box(Box(6153, 6153), Box(6153, 6153)), - Box(Box(6154, 6154), Box(6154, 6154)), - Box(Box(6155, 6155), Box(6155, 6155)), - Box(Box(6156, 6156), Box(6156, 6156)), - Box(Box(6157, 6157), Box(6157, 6157)), - Box(Box(6158, 6158), Box(6158, 6158)), - Box(Box(6159, 6159), Box(6159, 6159)), - Box(Box(6160, 6160), Box(6160, 6160)), - Box(Box(6161, 6161), Box(6161, 6161)), - Box(Box(6162, 6162), Box(6162, 6162)), - Box(Box(6163, 6163), Box(6163, 6163)), - Box(Box(6164, 6164), Box(6164, 6164)), - Box(Box(6165, 6165), Box(6165, 6165)), - Box(Box(6166, 6166), Box(6166, 6166)), - Box(Box(6167, 6167), Box(6167, 6167)), - Box(Box(6168, 6168), Box(6168, 6168)), - Box(Box(6169, 6169), Box(6169, 6169)), - Box(Box(6170, 6170), Box(6170, 6170)), - Box(Box(6171, 6171), Box(6171, 6171)), - Box(Box(6172, 6172), Box(6172, 6172)), - Box(Box(6173, 6173), Box(6173, 6173)), - Box(Box(6174, 6174), Box(6174, 6174)), - Box(Box(6175, 6175), Box(6175, 6175)), - Box(Box(6176, 6176), Box(6176, 6176)), - Box(Box(6177, 6177), Box(6177, 6177)), - Box(Box(6178, 6178), Box(6178, 6178)), - Box(Box(6179, 6179), Box(6179, 6179)), - Box(Box(6180, 6180), Box(6180, 6180)), - Box(Box(6181, 6181), Box(6181, 6181)), - Box(Box(6182, 6182), Box(6182, 6182)), - Box(Box(6183, 6183), Box(6183, 6183)), - Box(Box(6184, 6184), Box(6184, 6184)), - Box(Box(6185, 6185), Box(6185, 6185)), - Box(Box(6186, 6186), Box(6186, 6186)), - Box(Box(6187, 6187), Box(6187, 6187)), - Box(Box(6188, 6188), Box(6188, 6188)), - Box(Box(6189, 6189), Box(6189, 6189)), - Box(Box(6190, 6190), Box(6190, 6190)), - Box(Box(6191, 6191), Box(6191, 6191)), - Box(Box(6192, 6192), Box(6192, 6192)), - Box(Box(6193, 6193), Box(6193, 6193)), - Box(Box(6194, 6194), Box(6194, 6194)), - Box(Box(6195, 6195), Box(6195, 6195)), - Box(Box(6196, 6196), Box(6196, 6196)), - Box(Box(6197, 6197), Box(6197, 6197)), - Box(Box(6198, 6198), Box(6198, 6198)), - Box(Box(6199, 6199), Box(6199, 6199)), - Box(Box(6200, 6200), Box(6200, 6200)), - Box(Box(6201, 6201), Box(6201, 6201)), - Box(Box(6202, 6202), Box(6202, 6202)), - Box(Box(6203, 6203), Box(6203, 6203)), - Box(Box(6204, 6204), Box(6204, 6204)), - Box(Box(6205, 6205), Box(6205, 6205)), - Box(Box(6206, 6206), Box(6206, 6206)), - Box(Box(6207, 6207), Box(6207, 6207)), - Box(Box(6208, 6208), Box(6208, 6208)), - Box(Box(6209, 6209), Box(6209, 6209)), - Box(Box(6210, 6210), Box(6210, 6210)), - Box(Box(6211, 6211), Box(6211, 6211)), - Box(Box(6212, 6212), Box(6212, 6212)), - Box(Box(6213, 6213), Box(6213, 6213)), - Box(Box(6214, 6214), Box(6214, 6214)), - Box(Box(6215, 6215), Box(6215, 6215)), - Box(Box(6216, 6216), Box(6216, 6216)), - Box(Box(6217, 6217), Box(6217, 6217)), - Box(Box(6218, 6218), Box(6218, 6218)), - Box(Box(6219, 6219), Box(6219, 6219)), - Box(Box(6220, 6220), Box(6220, 6220)), - Box(Box(6221, 6221), Box(6221, 6221)), - Box(Box(6222, 6222), Box(6222, 6222)), - Box(Box(6223, 6223), Box(6223, 6223)), - Box(Box(6224, 6224), Box(6224, 6224)), - Box(Box(6225, 6225), Box(6225, 6225)), - Box(Box(6226, 6226), Box(6226, 6226)), - Box(Box(6227, 6227), Box(6227, 6227)), - Box(Box(6228, 6228), Box(6228, 6228)), - Box(Box(6229, 6229), Box(6229, 6229)), - Box(Box(6230, 6230), Box(6230, 6230)), - Box(Box(6231, 6231), Box(6231, 6231)), - Box(Box(6232, 6232), Box(6232, 6232)), - Box(Box(6233, 6233), Box(6233, 6233)), - Box(Box(6234, 6234), Box(6234, 6234)), - Box(Box(6235, 6235), Box(6235, 6235)), - Box(Box(6236, 6236), Box(6236, 6236)), - Box(Box(6237, 6237), Box(6237, 6237)), - Box(Box(6238, 6238), Box(6238, 6238)), - Box(Box(6239, 6239), Box(6239, 6239)), - Box(Box(6240, 6240), Box(6240, 6240)), - Box(Box(6241, 6241), Box(6241, 6241)), - Box(Box(6242, 6242), Box(6242, 6242)), - Box(Box(6243, 6243), Box(6243, 6243)), - Box(Box(6244, 6244), Box(6244, 6244)), - Box(Box(6245, 6245), Box(6245, 6245)), - Box(Box(6246, 6246), Box(6246, 6246)), - Box(Box(6247, 6247), Box(6247, 6247)), - Box(Box(6248, 6248), Box(6248, 6248)), - Box(Box(6249, 6249), Box(6249, 6249)), - Box(Box(6250, 6250), Box(6250, 6250)), - Box(Box(6251, 6251), Box(6251, 6251)), - Box(Box(6252, 6252), Box(6252, 6252)), - Box(Box(6253, 6253), Box(6253, 6253)), - Box(Box(6254, 6254), Box(6254, 6254)), - Box(Box(6255, 6255), Box(6255, 6255)), - Box(Box(6256, 6256), Box(6256, 6256)), - Box(Box(6257, 6257), Box(6257, 6257)), - Box(Box(6258, 6258), Box(6258, 6258)), - Box(Box(6259, 6259), Box(6259, 6259)), - Box(Box(6260, 6260), Box(6260, 6260)), - Box(Box(6261, 6261), Box(6261, 6261)), - Box(Box(6262, 6262), Box(6262, 6262)), - Box(Box(6263, 6263), Box(6263, 6263)), - Box(Box(6264, 6264), Box(6264, 6264)), - Box(Box(6265, 6265), Box(6265, 6265)), - Box(Box(6266, 6266), Box(6266, 6266)), - Box(Box(6267, 6267), Box(6267, 6267)), - Box(Box(6268, 6268), Box(6268, 6268)), - Box(Box(6269, 6269), Box(6269, 6269)), - Box(Box(6270, 6270), Box(6270, 6270)), - Box(Box(6271, 6271), Box(6271, 6271)), - Box(Box(6272, 6272), Box(6272, 6272)), - Box(Box(6273, 6273), Box(6273, 6273)), - Box(Box(6274, 6274), Box(6274, 6274)), - Box(Box(6275, 6275), Box(6275, 6275)), - Box(Box(6276, 6276), Box(6276, 6276)), - Box(Box(6277, 6277), Box(6277, 6277)), - Box(Box(6278, 6278), Box(6278, 6278)), - Box(Box(6279, 6279), Box(6279, 6279)), - Box(Box(6280, 6280), Box(6280, 6280)), - Box(Box(6281, 6281), Box(6281, 6281)), - Box(Box(6282, 6282), Box(6282, 6282)), - Box(Box(6283, 6283), Box(6283, 6283)), - Box(Box(6284, 6284), Box(6284, 6284)), - Box(Box(6285, 6285), Box(6285, 6285)), - Box(Box(6286, 6286), Box(6286, 6286)), - Box(Box(6287, 6287), Box(6287, 6287)), - Box(Box(6288, 6288), Box(6288, 6288)), - Box(Box(6289, 6289), Box(6289, 6289)), - Box(Box(6290, 6290), Box(6290, 6290)), - Box(Box(6291, 6291), Box(6291, 6291)), - Box(Box(6292, 6292), Box(6292, 6292)), - Box(Box(6293, 6293), Box(6293, 6293)), - Box(Box(6294, 6294), Box(6294, 6294)), - Box(Box(6295, 6295), Box(6295, 6295)), - Box(Box(6296, 6296), Box(6296, 6296)), - Box(Box(6297, 6297), Box(6297, 6297)), - Box(Box(6298, 6298), Box(6298, 6298)), - Box(Box(6299, 6299), Box(6299, 6299)), - Box(Box(6300, 6300), Box(6300, 6300)), - Box(Box(6301, 6301), Box(6301, 6301)), - Box(Box(6302, 6302), Box(6302, 6302)), - Box(Box(6303, 6303), Box(6303, 6303)), - Box(Box(6304, 6304), Box(6304, 6304)), - Box(Box(6305, 6305), Box(6305, 6305)), - Box(Box(6306, 6306), Box(6306, 6306)), - Box(Box(6307, 6307), Box(6307, 6307)), - Box(Box(6308, 6308), Box(6308, 6308)), - Box(Box(6309, 6309), Box(6309, 6309)), - Box(Box(6310, 6310), Box(6310, 6310)), - Box(Box(6311, 6311), Box(6311, 6311)), - Box(Box(6312, 6312), Box(6312, 6312)), - Box(Box(6313, 6313), Box(6313, 6313)), - Box(Box(6314, 6314), Box(6314, 6314)), - Box(Box(6315, 6315), Box(6315, 6315)), - Box(Box(6316, 6316), Box(6316, 6316)), - Box(Box(6317, 6317), Box(6317, 6317)), - Box(Box(6318, 6318), Box(6318, 6318)), - Box(Box(6319, 6319), Box(6319, 6319)), - Box(Box(6320, 6320), Box(6320, 6320)), - Box(Box(6321, 6321), Box(6321, 6321)), - Box(Box(6322, 6322), Box(6322, 6322)), - Box(Box(6323, 6323), Box(6323, 6323)), - Box(Box(6324, 6324), Box(6324, 6324)), - Box(Box(6325, 6325), Box(6325, 6325)), - Box(Box(6326, 6326), Box(6326, 6326)), - Box(Box(6327, 6327), Box(6327, 6327)), - Box(Box(6328, 6328), Box(6328, 6328)), - Box(Box(6329, 6329), Box(6329, 6329)), - Box(Box(6330, 6330), Box(6330, 6330)), - Box(Box(6331, 6331), Box(6331, 6331)), - Box(Box(6332, 6332), Box(6332, 6332)), - Box(Box(6333, 6333), Box(6333, 6333)), - Box(Box(6334, 6334), Box(6334, 6334)), - Box(Box(6335, 6335), Box(6335, 6335)), - Box(Box(6336, 6336), Box(6336, 6336)), - Box(Box(6337, 6337), Box(6337, 6337)), - Box(Box(6338, 6338), Box(6338, 6338)), - Box(Box(6339, 6339), Box(6339, 6339)), - Box(Box(6340, 6340), Box(6340, 6340)), - Box(Box(6341, 6341), Box(6341, 6341)), - Box(Box(6342, 6342), Box(6342, 6342)), - Box(Box(6343, 6343), Box(6343, 6343)), - Box(Box(6344, 6344), Box(6344, 6344)), - Box(Box(6345, 6345), Box(6345, 6345)), - Box(Box(6346, 6346), Box(6346, 6346)), - Box(Box(6347, 6347), Box(6347, 6347)), - Box(Box(6348, 6348), Box(6348, 6348)), - Box(Box(6349, 6349), Box(6349, 6349)), - Box(Box(6350, 6350), Box(6350, 6350)), - Box(Box(6351, 6351), Box(6351, 6351)), - Box(Box(6352, 6352), Box(6352, 6352)), - Box(Box(6353, 6353), Box(6353, 6353)), - Box(Box(6354, 6354), Box(6354, 6354)), - Box(Box(6355, 6355), Box(6355, 6355)), - Box(Box(6356, 6356), Box(6356, 6356)), - Box(Box(6357, 6357), Box(6357, 6357)), - Box(Box(6358, 6358), Box(6358, 6358)), - Box(Box(6359, 6359), Box(6359, 6359)), - Box(Box(6360, 6360), Box(6360, 6360)), - Box(Box(6361, 6361), Box(6361, 6361)), - Box(Box(6362, 6362), Box(6362, 6362)), - Box(Box(6363, 6363), Box(6363, 6363)), - Box(Box(6364, 6364), Box(6364, 6364)), - Box(Box(6365, 6365), Box(6365, 6365)), - Box(Box(6366, 6366), Box(6366, 6366)), - Box(Box(6367, 6367), Box(6367, 6367)), - Box(Box(6368, 6368), Box(6368, 6368)), - Box(Box(6369, 6369), Box(6369, 6369)), - Box(Box(6370, 6370), Box(6370, 6370)), - Box(Box(6371, 6371), Box(6371, 6371)), - Box(Box(6372, 6372), Box(6372, 6372)), - Box(Box(6373, 6373), Box(6373, 6373)), - Box(Box(6374, 6374), Box(6374, 6374)), - Box(Box(6375, 6375), Box(6375, 6375)), - Box(Box(6376, 6376), Box(6376, 6376)), - Box(Box(6377, 6377), Box(6377, 6377)), - Box(Box(6378, 6378), Box(6378, 6378)), - Box(Box(6379, 6379), Box(6379, 6379)), - Box(Box(6380, 6380), Box(6380, 6380)), - Box(Box(6381, 6381), Box(6381, 6381)), - Box(Box(6382, 6382), Box(6382, 6382)), - Box(Box(6383, 6383), Box(6383, 6383)), - Box(Box(6384, 6384), Box(6384, 6384)), - Box(Box(6385, 6385), Box(6385, 6385)), - Box(Box(6386, 6386), Box(6386, 6386)), - Box(Box(6387, 6387), Box(6387, 6387)), - Box(Box(6388, 6388), Box(6388, 6388)), - Box(Box(6389, 6389), Box(6389, 6389)), - Box(Box(6390, 6390), Box(6390, 6390)), - Box(Box(6391, 6391), Box(6391, 6391)), - Box(Box(6392, 6392), Box(6392, 6392)), - Box(Box(6393, 6393), Box(6393, 6393)), - Box(Box(6394, 6394), Box(6394, 6394)), - Box(Box(6395, 6395), Box(6395, 6395)), - Box(Box(6396, 6396), Box(6396, 6396)), - Box(Box(6397, 6397), Box(6397, 6397)), - Box(Box(6398, 6398), Box(6398, 6398)), - Box(Box(6399, 6399), Box(6399, 6399)), - Box(Box(6400, 6400), Box(6400, 6400)), - Box(Box(6401, 6401), Box(6401, 6401)), - Box(Box(6402, 6402), Box(6402, 6402)), - Box(Box(6403, 6403), Box(6403, 6403)), - Box(Box(6404, 6404), Box(6404, 6404)), - Box(Box(6405, 6405), Box(6405, 6405)), - Box(Box(6406, 6406), Box(6406, 6406)), - Box(Box(6407, 6407), Box(6407, 6407)), - Box(Box(6408, 6408), Box(6408, 6408)), - Box(Box(6409, 6409), Box(6409, 6409)), - Box(Box(6410, 6410), Box(6410, 6410)), - Box(Box(6411, 6411), Box(6411, 6411)), - Box(Box(6412, 6412), Box(6412, 6412)), - Box(Box(6413, 6413), Box(6413, 6413)), - Box(Box(6414, 6414), Box(6414, 6414)), - Box(Box(6415, 6415), Box(6415, 6415)), - Box(Box(6416, 6416), Box(6416, 6416)), - Box(Box(6417, 6417), Box(6417, 6417)), - Box(Box(6418, 6418), Box(6418, 6418)), - Box(Box(6419, 6419), Box(6419, 6419)), - Box(Box(6420, 6420), Box(6420, 6420)), - Box(Box(6421, 6421), Box(6421, 6421)), - Box(Box(6422, 6422), Box(6422, 6422)), - Box(Box(6423, 6423), Box(6423, 6423)), - Box(Box(6424, 6424), Box(6424, 6424)), - Box(Box(6425, 6425), Box(6425, 6425)), - Box(Box(6426, 6426), Box(6426, 6426)), - Box(Box(6427, 6427), Box(6427, 6427)), - Box(Box(6428, 6428), Box(6428, 6428)), - Box(Box(6429, 6429), Box(6429, 6429)), - Box(Box(6430, 6430), Box(6430, 6430)), - Box(Box(6431, 6431), Box(6431, 6431)), - Box(Box(6432, 6432), Box(6432, 6432)), - Box(Box(6433, 6433), Box(6433, 6433)), - Box(Box(6434, 6434), Box(6434, 6434)), - Box(Box(6435, 6435), Box(6435, 6435)), - Box(Box(6436, 6436), Box(6436, 6436)), - Box(Box(6437, 6437), Box(6437, 6437)), - Box(Box(6438, 6438), Box(6438, 6438)), - Box(Box(6439, 6439), Box(6439, 6439)), - Box(Box(6440, 6440), Box(6440, 6440)), - Box(Box(6441, 6441), Box(6441, 6441)), - Box(Box(6442, 6442), Box(6442, 6442)), - Box(Box(6443, 6443), Box(6443, 6443)), - Box(Box(6444, 6444), Box(6444, 6444)), - Box(Box(6445, 6445), Box(6445, 6445)), - Box(Box(6446, 6446), Box(6446, 6446)), - Box(Box(6447, 6447), Box(6447, 6447)), - Box(Box(6448, 6448), Box(6448, 6448)), - Box(Box(6449, 6449), Box(6449, 6449)), - Box(Box(6450, 6450), Box(6450, 6450)), - Box(Box(6451, 6451), Box(6451, 6451)), - Box(Box(6452, 6452), Box(6452, 6452)), - Box(Box(6453, 6453), Box(6453, 6453)), - Box(Box(6454, 6454), Box(6454, 6454)), - Box(Box(6455, 6455), Box(6455, 6455)), - Box(Box(6456, 6456), Box(6456, 6456)), - Box(Box(6457, 6457), Box(6457, 6457)), - Box(Box(6458, 6458), Box(6458, 6458)), - Box(Box(6459, 6459), Box(6459, 6459)), - Box(Box(6460, 6460), Box(6460, 6460)), - Box(Box(6461, 6461), Box(6461, 6461)), - Box(Box(6462, 6462), Box(6462, 6462)), - Box(Box(6463, 6463), Box(6463, 6463)), - Box(Box(6464, 6464), Box(6464, 6464)), - Box(Box(6465, 6465), Box(6465, 6465)), - Box(Box(6466, 6466), Box(6466, 6466)), - Box(Box(6467, 6467), Box(6467, 6467)), - Box(Box(6468, 6468), Box(6468, 6468)), - Box(Box(6469, 6469), Box(6469, 6469)), - Box(Box(6470, 6470), Box(6470, 6470)), - Box(Box(6471, 6471), Box(6471, 6471)), - Box(Box(6472, 6472), Box(6472, 6472)), - Box(Box(6473, 6473), Box(6473, 6473)), - Box(Box(6474, 6474), Box(6474, 6474)), - Box(Box(6475, 6475), Box(6475, 6475)), - Box(Box(6476, 6476), Box(6476, 6476)), - Box(Box(6477, 6477), Box(6477, 6477)), - Box(Box(6478, 6478), Box(6478, 6478)), - Box(Box(6479, 6479), Box(6479, 6479)), - Box(Box(6480, 6480), Box(6480, 6480)), - Box(Box(6481, 6481), Box(6481, 6481)), - Box(Box(6482, 6482), Box(6482, 6482)), - Box(Box(6483, 6483), Box(6483, 6483)), - Box(Box(6484, 6484), Box(6484, 6484)), - Box(Box(6485, 6485), Box(6485, 6485)), - Box(Box(6486, 6486), Box(6486, 6486)), - Box(Box(6487, 6487), Box(6487, 6487)), - Box(Box(6488, 6488), Box(6488, 6488)), - Box(Box(6489, 6489), Box(6489, 6489)), - Box(Box(6490, 6490), Box(6490, 6490)), - Box(Box(6491, 6491), Box(6491, 6491)), - Box(Box(6492, 6492), Box(6492, 6492)), - Box(Box(6493, 6493), Box(6493, 6493)), - Box(Box(6494, 6494), Box(6494, 6494)), - Box(Box(6495, 6495), Box(6495, 6495)), - Box(Box(6496, 6496), Box(6496, 6496)), - Box(Box(6497, 6497), Box(6497, 6497)), - Box(Box(6498, 6498), Box(6498, 6498)), - Box(Box(6499, 6499), Box(6499, 6499)), - Box(Box(6500, 6500), Box(6500, 6500)), - Box(Box(6501, 6501), Box(6501, 6501)), - Box(Box(6502, 6502), Box(6502, 6502)), - Box(Box(6503, 6503), Box(6503, 6503)), - Box(Box(6504, 6504), Box(6504, 6504)), - Box(Box(6505, 6505), Box(6505, 6505)), - Box(Box(6506, 6506), Box(6506, 6506)), - Box(Box(6507, 6507), Box(6507, 6507)), - Box(Box(6508, 6508), Box(6508, 6508)), - Box(Box(6509, 6509), Box(6509, 6509)), - Box(Box(6510, 6510), Box(6510, 6510)), - Box(Box(6511, 6511), Box(6511, 6511)), - Box(Box(6512, 6512), Box(6512, 6512)), - Box(Box(6513, 6513), Box(6513, 6513)), - Box(Box(6514, 6514), Box(6514, 6514)), - Box(Box(6515, 6515), Box(6515, 6515)), - Box(Box(6516, 6516), Box(6516, 6516)), - Box(Box(6517, 6517), Box(6517, 6517)), - Box(Box(6518, 6518), Box(6518, 6518)), - Box(Box(6519, 6519), Box(6519, 6519)), - Box(Box(6520, 6520), Box(6520, 6520)), - Box(Box(6521, 6521), Box(6521, 6521)), - Box(Box(6522, 6522), Box(6522, 6522)), - Box(Box(6523, 6523), Box(6523, 6523)), - Box(Box(6524, 6524), Box(6524, 6524)), - Box(Box(6525, 6525), Box(6525, 6525)), - Box(Box(6526, 6526), Box(6526, 6526)), - Box(Box(6527, 6527), Box(6527, 6527)), - Box(Box(6528, 6528), Box(6528, 6528)), - Box(Box(6529, 6529), Box(6529, 6529)), - Box(Box(6530, 6530), Box(6530, 6530)), - Box(Box(6531, 6531), Box(6531, 6531)), - Box(Box(6532, 6532), Box(6532, 6532)), - Box(Box(6533, 6533), Box(6533, 6533)), - Box(Box(6534, 6534), Box(6534, 6534)), - Box(Box(6535, 6535), Box(6535, 6535)), - Box(Box(6536, 6536), Box(6536, 6536)), - Box(Box(6537, 6537), Box(6537, 6537)), - Box(Box(6538, 6538), Box(6538, 6538)), - Box(Box(6539, 6539), Box(6539, 6539)), - Box(Box(6540, 6540), Box(6540, 6540)), - Box(Box(6541, 6541), Box(6541, 6541)), - Box(Box(6542, 6542), Box(6542, 6542)), - Box(Box(6543, 6543), Box(6543, 6543)), - Box(Box(6544, 6544), Box(6544, 6544)), - Box(Box(6545, 6545), Box(6545, 6545)), - Box(Box(6546, 6546), Box(6546, 6546)), - Box(Box(6547, 6547), Box(6547, 6547)), - Box(Box(6548, 6548), Box(6548, 6548)), - Box(Box(6549, 6549), Box(6549, 6549)), - Box(Box(6550, 6550), Box(6550, 6550)), - Box(Box(6551, 6551), Box(6551, 6551)), - Box(Box(6552, 6552), Box(6552, 6552)), - Box(Box(6553, 6553), Box(6553, 6553)), - Box(Box(6554, 6554), Box(6554, 6554)), - Box(Box(6555, 6555), Box(6555, 6555)), - Box(Box(6556, 6556), Box(6556, 6556)), - Box(Box(6557, 6557), Box(6557, 6557)), - Box(Box(6558, 6558), Box(6558, 6558)), - Box(Box(6559, 6559), Box(6559, 6559)), - Box(Box(6560, 6560), Box(6560, 6560)), - Box(Box(6561, 6561), Box(6561, 6561)), - Box(Box(6562, 6562), Box(6562, 6562)), - Box(Box(6563, 6563), Box(6563, 6563)), - Box(Box(6564, 6564), Box(6564, 6564)), - Box(Box(6565, 6565), Box(6565, 6565)), - Box(Box(6566, 6566), Box(6566, 6566)), - Box(Box(6567, 6567), Box(6567, 6567)), - Box(Box(6568, 6568), Box(6568, 6568)), - Box(Box(6569, 6569), Box(6569, 6569)), - Box(Box(6570, 6570), Box(6570, 6570)), - Box(Box(6571, 6571), Box(6571, 6571)), - Box(Box(6572, 6572), Box(6572, 6572)), - Box(Box(6573, 6573), Box(6573, 6573)), - Box(Box(6574, 6574), Box(6574, 6574)), - Box(Box(6575, 6575), Box(6575, 6575)), - Box(Box(6576, 6576), Box(6576, 6576)), - Box(Box(6577, 6577), Box(6577, 6577)), - Box(Box(6578, 6578), Box(6578, 6578)), - Box(Box(6579, 6579), Box(6579, 6579)), - Box(Box(6580, 6580), Box(6580, 6580)), - Box(Box(6581, 6581), Box(6581, 6581)), - Box(Box(6582, 6582), Box(6582, 6582)), - Box(Box(6583, 6583), Box(6583, 6583)), - Box(Box(6584, 6584), Box(6584, 6584)), - Box(Box(6585, 6585), Box(6585, 6585)), - Box(Box(6586, 6586), Box(6586, 6586)), - Box(Box(6587, 6587), Box(6587, 6587)), - Box(Box(6588, 6588), Box(6588, 6588)), - Box(Box(6589, 6589), Box(6589, 6589)), - Box(Box(6590, 6590), Box(6590, 6590)), - Box(Box(6591, 6591), Box(6591, 6591)), - Box(Box(6592, 6592), Box(6592, 6592)), - Box(Box(6593, 6593), Box(6593, 6593)), - Box(Box(6594, 6594), Box(6594, 6594)), - Box(Box(6595, 6595), Box(6595, 6595)), - Box(Box(6596, 6596), Box(6596, 6596)), - Box(Box(6597, 6597), Box(6597, 6597)), - Box(Box(6598, 6598), Box(6598, 6598)), - Box(Box(6599, 6599), Box(6599, 6599)), - Box(Box(6600, 6600), Box(6600, 6600)), - Box(Box(6601, 6601), Box(6601, 6601)), - Box(Box(6602, 6602), Box(6602, 6602)), - Box(Box(6603, 6603), Box(6603, 6603)), - Box(Box(6604, 6604), Box(6604, 6604)), - Box(Box(6605, 6605), Box(6605, 6605)), - Box(Box(6606, 6606), Box(6606, 6606)), - Box(Box(6607, 6607), Box(6607, 6607)), - Box(Box(6608, 6608), Box(6608, 6608)), - Box(Box(6609, 6609), Box(6609, 6609)), - Box(Box(6610, 6610), Box(6610, 6610)), - Box(Box(6611, 6611), Box(6611, 6611)), - Box(Box(6612, 6612), Box(6612, 6612)), - Box(Box(6613, 6613), Box(6613, 6613)), - Box(Box(6614, 6614), Box(6614, 6614)), - Box(Box(6615, 6615), Box(6615, 6615)), - Box(Box(6616, 6616), Box(6616, 6616)), - Box(Box(6617, 6617), Box(6617, 6617)), - Box(Box(6618, 6618), Box(6618, 6618)), - Box(Box(6619, 6619), Box(6619, 6619)), - Box(Box(6620, 6620), Box(6620, 6620)), - Box(Box(6621, 6621), Box(6621, 6621)), - Box(Box(6622, 6622), Box(6622, 6622)), - Box(Box(6623, 6623), Box(6623, 6623)), - Box(Box(6624, 6624), Box(6624, 6624)), - Box(Box(6625, 6625), Box(6625, 6625)), - Box(Box(6626, 6626), Box(6626, 6626)), - Box(Box(6627, 6627), Box(6627, 6627)), - Box(Box(6628, 6628), Box(6628, 6628)), - Box(Box(6629, 6629), Box(6629, 6629)), - Box(Box(6630, 6630), Box(6630, 6630)), - Box(Box(6631, 6631), Box(6631, 6631)), - Box(Box(6632, 6632), Box(6632, 6632)), - Box(Box(6633, 6633), Box(6633, 6633)), - Box(Box(6634, 6634), Box(6634, 6634)), - Box(Box(6635, 6635), Box(6635, 6635)), - Box(Box(6636, 6636), Box(6636, 6636)), - Box(Box(6637, 6637), Box(6637, 6637)), - Box(Box(6638, 6638), Box(6638, 6638)), - Box(Box(6639, 6639), Box(6639, 6639)), - Box(Box(6640, 6640), Box(6640, 6640)), - Box(Box(6641, 6641), Box(6641, 6641)), - Box(Box(6642, 6642), Box(6642, 6642)), - Box(Box(6643, 6643), Box(6643, 6643)), - Box(Box(6644, 6644), Box(6644, 6644)), - Box(Box(6645, 6645), Box(6645, 6645)), - Box(Box(6646, 6646), Box(6646, 6646)), - Box(Box(6647, 6647), Box(6647, 6647)), - Box(Box(6648, 6648), Box(6648, 6648)), - Box(Box(6649, 6649), Box(6649, 6649)), - Box(Box(6650, 6650), Box(6650, 6650)), - Box(Box(6651, 6651), Box(6651, 6651)), - Box(Box(6652, 6652), Box(6652, 6652)), - Box(Box(6653, 6653), Box(6653, 6653)), - Box(Box(6654, 6654), Box(6654, 6654)), - Box(Box(6655, 6655), Box(6655, 6655)), - Box(Box(6656, 6656), Box(6656, 6656)), - Box(Box(6657, 6657), Box(6657, 6657)), - Box(Box(6658, 6658), Box(6658, 6658)), - Box(Box(6659, 6659), Box(6659, 6659)), - Box(Box(6660, 6660), Box(6660, 6660)), - Box(Box(6661, 6661), Box(6661, 6661)), - Box(Box(6662, 6662), Box(6662, 6662)), - Box(Box(6663, 6663), Box(6663, 6663)), - Box(Box(6664, 6664), Box(6664, 6664)), - Box(Box(6665, 6665), Box(6665, 6665)), - Box(Box(6666, 6666), Box(6666, 6666)), - Box(Box(6667, 6667), Box(6667, 6667)), - Box(Box(6668, 6668), Box(6668, 6668)), - Box(Box(6669, 6669), Box(6669, 6669)), - Box(Box(6670, 6670), Box(6670, 6670)), - Box(Box(6671, 6671), Box(6671, 6671)), - Box(Box(6672, 6672), Box(6672, 6672)), - Box(Box(6673, 6673), Box(6673, 6673)), - Box(Box(6674, 6674), Box(6674, 6674)), - Box(Box(6675, 6675), Box(6675, 6675)), - Box(Box(6676, 6676), Box(6676, 6676)), - Box(Box(6677, 6677), Box(6677, 6677)), - Box(Box(6678, 6678), Box(6678, 6678)), - Box(Box(6679, 6679), Box(6679, 6679)), - Box(Box(6680, 6680), Box(6680, 6680)), - Box(Box(6681, 6681), Box(6681, 6681)), - Box(Box(6682, 6682), Box(6682, 6682)), - Box(Box(6683, 6683), Box(6683, 6683)), - Box(Box(6684, 6684), Box(6684, 6684)), - Box(Box(6685, 6685), Box(6685, 6685)), - Box(Box(6686, 6686), Box(6686, 6686)), - Box(Box(6687, 6687), Box(6687, 6687)), - Box(Box(6688, 6688), Box(6688, 6688)), - Box(Box(6689, 6689), Box(6689, 6689)), - Box(Box(6690, 6690), Box(6690, 6690)), - Box(Box(6691, 6691), Box(6691, 6691)), - Box(Box(6692, 6692), Box(6692, 6692)), - Box(Box(6693, 6693), Box(6693, 6693)), - Box(Box(6694, 6694), Box(6694, 6694)), - Box(Box(6695, 6695), Box(6695, 6695)), - Box(Box(6696, 6696), Box(6696, 6696)), - Box(Box(6697, 6697), Box(6697, 6697)), - Box(Box(6698, 6698), Box(6698, 6698)), - Box(Box(6699, 6699), Box(6699, 6699)), - Box(Box(6700, 6700), Box(6700, 6700)), - Box(Box(6701, 6701), Box(6701, 6701)), - Box(Box(6702, 6702), Box(6702, 6702)), - Box(Box(6703, 6703), Box(6703, 6703)), - Box(Box(6704, 6704), Box(6704, 6704)), - Box(Box(6705, 6705), Box(6705, 6705)), - Box(Box(6706, 6706), Box(6706, 6706)), - Box(Box(6707, 6707), Box(6707, 6707)), - Box(Box(6708, 6708), Box(6708, 6708)), - Box(Box(6709, 6709), Box(6709, 6709)), - Box(Box(6710, 6710), Box(6710, 6710)), - Box(Box(6711, 6711), Box(6711, 6711)), - Box(Box(6712, 6712), Box(6712, 6712)), - Box(Box(6713, 6713), Box(6713, 6713)), - Box(Box(6714, 6714), Box(6714, 6714)), - Box(Box(6715, 6715), Box(6715, 6715)), - Box(Box(6716, 6716), Box(6716, 6716)), - Box(Box(6717, 6717), Box(6717, 6717)), - Box(Box(6718, 6718), Box(6718, 6718)), - Box(Box(6719, 6719), Box(6719, 6719)), - Box(Box(6720, 6720), Box(6720, 6720)), - Box(Box(6721, 6721), Box(6721, 6721)), - Box(Box(6722, 6722), Box(6722, 6722)), - Box(Box(6723, 6723), Box(6723, 6723)), - Box(Box(6724, 6724), Box(6724, 6724)), - Box(Box(6725, 6725), Box(6725, 6725)), - Box(Box(6726, 6726), Box(6726, 6726)), - Box(Box(6727, 6727), Box(6727, 6727)), - Box(Box(6728, 6728), Box(6728, 6728)), - Box(Box(6729, 6729), Box(6729, 6729)), - Box(Box(6730, 6730), Box(6730, 6730)), - Box(Box(6731, 6731), Box(6731, 6731)), - Box(Box(6732, 6732), Box(6732, 6732)), - Box(Box(6733, 6733), Box(6733, 6733)), - Box(Box(6734, 6734), Box(6734, 6734)), - Box(Box(6735, 6735), Box(6735, 6735)), - Box(Box(6736, 6736), Box(6736, 6736)), - Box(Box(6737, 6737), Box(6737, 6737)), - Box(Box(6738, 6738), Box(6738, 6738)), - Box(Box(6739, 6739), Box(6739, 6739)), - Box(Box(6740, 6740), Box(6740, 6740)), - Box(Box(6741, 6741), Box(6741, 6741)), - Box(Box(6742, 6742), Box(6742, 6742)), - Box(Box(6743, 6743), Box(6743, 6743)), - Box(Box(6744, 6744), Box(6744, 6744)), - Box(Box(6745, 6745), Box(6745, 6745)), - Box(Box(6746, 6746), Box(6746, 6746)), - Box(Box(6747, 6747), Box(6747, 6747)), - Box(Box(6748, 6748), Box(6748, 6748)), - Box(Box(6749, 6749), Box(6749, 6749)), - Box(Box(6750, 6750), Box(6750, 6750)), - Box(Box(6751, 6751), Box(6751, 6751)), - Box(Box(6752, 6752), Box(6752, 6752)), - Box(Box(6753, 6753), Box(6753, 6753)), - Box(Box(6754, 6754), Box(6754, 6754)), - Box(Box(6755, 6755), Box(6755, 6755)), - Box(Box(6756, 6756), Box(6756, 6756)), - Box(Box(6757, 6757), Box(6757, 6757)), - Box(Box(6758, 6758), Box(6758, 6758)), - Box(Box(6759, 6759), Box(6759, 6759)), - Box(Box(6760, 6760), Box(6760, 6760)), - Box(Box(6761, 6761), Box(6761, 6761)), - Box(Box(6762, 6762), Box(6762, 6762)), - Box(Box(6763, 6763), Box(6763, 6763)), - Box(Box(6764, 6764), Box(6764, 6764)), - Box(Box(6765, 6765), Box(6765, 6765)), - Box(Box(6766, 6766), Box(6766, 6766)), - Box(Box(6767, 6767), Box(6767, 6767)), - Box(Box(6768, 6768), Box(6768, 6768)), - Box(Box(6769, 6769), Box(6769, 6769)), - Box(Box(6770, 6770), Box(6770, 6770)), - Box(Box(6771, 6771), Box(6771, 6771)), - Box(Box(6772, 6772), Box(6772, 6772)), - Box(Box(6773, 6773), Box(6773, 6773)), - Box(Box(6774, 6774), Box(6774, 6774)), - Box(Box(6775, 6775), Box(6775, 6775)), - Box(Box(6776, 6776), Box(6776, 6776)), - Box(Box(6777, 6777), Box(6777, 6777)), - Box(Box(6778, 6778), Box(6778, 6778)), - Box(Box(6779, 6779), Box(6779, 6779)), - Box(Box(6780, 6780), Box(6780, 6780)), - Box(Box(6781, 6781), Box(6781, 6781)), - Box(Box(6782, 6782), Box(6782, 6782)), - Box(Box(6783, 6783), Box(6783, 6783)), - Box(Box(6784, 6784), Box(6784, 6784)), - Box(Box(6785, 6785), Box(6785, 6785)), - Box(Box(6786, 6786), Box(6786, 6786)), - Box(Box(6787, 6787), Box(6787, 6787)), - Box(Box(6788, 6788), Box(6788, 6788)), - Box(Box(6789, 6789), Box(6789, 6789)), - Box(Box(6790, 6790), Box(6790, 6790)), - Box(Box(6791, 6791), Box(6791, 6791)), - Box(Box(6792, 6792), Box(6792, 6792)), - Box(Box(6793, 6793), Box(6793, 6793)), - Box(Box(6794, 6794), Box(6794, 6794)), - Box(Box(6795, 6795), Box(6795, 6795)), - Box(Box(6796, 6796), Box(6796, 6796)), - Box(Box(6797, 6797), Box(6797, 6797)), - Box(Box(6798, 6798), Box(6798, 6798)), - Box(Box(6799, 6799), Box(6799, 6799)), - Box(Box(6800, 6800), Box(6800, 6800)), - Box(Box(6801, 6801), Box(6801, 6801)), - Box(Box(6802, 6802), Box(6802, 6802)), - Box(Box(6803, 6803), Box(6803, 6803)), - Box(Box(6804, 6804), Box(6804, 6804)), - Box(Box(6805, 6805), Box(6805, 6805)), - Box(Box(6806, 6806), Box(6806, 6806)), - Box(Box(6807, 6807), Box(6807, 6807)), - Box(Box(6808, 6808), Box(6808, 6808)), - Box(Box(6809, 6809), Box(6809, 6809)), - Box(Box(6810, 6810), Box(6810, 6810)), - Box(Box(6811, 6811), Box(6811, 6811)), - Box(Box(6812, 6812), Box(6812, 6812)), - Box(Box(6813, 6813), Box(6813, 6813)), - Box(Box(6814, 6814), Box(6814, 6814)), - Box(Box(6815, 6815), Box(6815, 6815)), - Box(Box(6816, 6816), Box(6816, 6816)), - Box(Box(6817, 6817), Box(6817, 6817)), - Box(Box(6818, 6818), Box(6818, 6818)), - Box(Box(6819, 6819), Box(6819, 6819)), - Box(Box(6820, 6820), Box(6820, 6820)), - Box(Box(6821, 6821), Box(6821, 6821)), - Box(Box(6822, 6822), Box(6822, 6822)), - Box(Box(6823, 6823), Box(6823, 6823)), - Box(Box(6824, 6824), Box(6824, 6824)), - Box(Box(6825, 6825), Box(6825, 6825)), - Box(Box(6826, 6826), Box(6826, 6826)), - Box(Box(6827, 6827), Box(6827, 6827)), - Box(Box(6828, 6828), Box(6828, 6828)), - Box(Box(6829, 6829), Box(6829, 6829)), - Box(Box(6830, 6830), Box(6830, 6830)), - Box(Box(6831, 6831), Box(6831, 6831)), - Box(Box(6832, 6832), Box(6832, 6832)), - Box(Box(6833, 6833), Box(6833, 6833)), - Box(Box(6834, 6834), Box(6834, 6834)), - Box(Box(6835, 6835), Box(6835, 6835)), - Box(Box(6836, 6836), Box(6836, 6836)), - Box(Box(6837, 6837), Box(6837, 6837)), - Box(Box(6838, 6838), Box(6838, 6838)), - Box(Box(6839, 6839), Box(6839, 6839)), - Box(Box(6840, 6840), Box(6840, 6840)), - Box(Box(6841, 6841), Box(6841, 6841)), - Box(Box(6842, 6842), Box(6842, 6842)), - Box(Box(6843, 6843), Box(6843, 6843)), - Box(Box(6844, 6844), Box(6844, 6844)), - Box(Box(6845, 6845), Box(6845, 6845)), - Box(Box(6846, 6846), Box(6846, 6846)), - Box(Box(6847, 6847), Box(6847, 6847)), - Box(Box(6848, 6848), Box(6848, 6848)), - Box(Box(6849, 6849), Box(6849, 6849)), - Box(Box(6850, 6850), Box(6850, 6850)), - Box(Box(6851, 6851), Box(6851, 6851)), - Box(Box(6852, 6852), Box(6852, 6852)), - Box(Box(6853, 6853), Box(6853, 6853)), - Box(Box(6854, 6854), Box(6854, 6854)), - Box(Box(6855, 6855), Box(6855, 6855)), - Box(Box(6856, 6856), Box(6856, 6856)), - Box(Box(6857, 6857), Box(6857, 6857)), - Box(Box(6858, 6858), Box(6858, 6858)), - Box(Box(6859, 6859), Box(6859, 6859)), - Box(Box(6860, 6860), Box(6860, 6860)), - Box(Box(6861, 6861), Box(6861, 6861)), - Box(Box(6862, 6862), Box(6862, 6862)), - Box(Box(6863, 6863), Box(6863, 6863)), - Box(Box(6864, 6864), Box(6864, 6864)), - Box(Box(6865, 6865), Box(6865, 6865)), - Box(Box(6866, 6866), Box(6866, 6866)), - Box(Box(6867, 6867), Box(6867, 6867)), - Box(Box(6868, 6868), Box(6868, 6868)), - Box(Box(6869, 6869), Box(6869, 6869)), - Box(Box(6870, 6870), Box(6870, 6870)), - Box(Box(6871, 6871), Box(6871, 6871)), - Box(Box(6872, 6872), Box(6872, 6872)), - Box(Box(6873, 6873), Box(6873, 6873)), - Box(Box(6874, 6874), Box(6874, 6874)), - Box(Box(6875, 6875), Box(6875, 6875)), - Box(Box(6876, 6876), Box(6876, 6876)), - Box(Box(6877, 6877), Box(6877, 6877)), - Box(Box(6878, 6878), Box(6878, 6878)), - Box(Box(6879, 6879), Box(6879, 6879)), - Box(Box(6880, 6880), Box(6880, 6880)), - Box(Box(6881, 6881), Box(6881, 6881)), - Box(Box(6882, 6882), Box(6882, 6882)), - Box(Box(6883, 6883), Box(6883, 6883)), - Box(Box(6884, 6884), Box(6884, 6884)), - Box(Box(6885, 6885), Box(6885, 6885)), - Box(Box(6886, 6886), Box(6886, 6886)), - Box(Box(6887, 6887), Box(6887, 6887)), - Box(Box(6888, 6888), Box(6888, 6888)), - Box(Box(6889, 6889), Box(6889, 6889)), - Box(Box(6890, 6890), Box(6890, 6890)), - Box(Box(6891, 6891), Box(6891, 6891)), - Box(Box(6892, 6892), Box(6892, 6892)), - Box(Box(6893, 6893), Box(6893, 6893)), - Box(Box(6894, 6894), Box(6894, 6894)), - Box(Box(6895, 6895), Box(6895, 6895)), - Box(Box(6896, 6896), Box(6896, 6896)), - Box(Box(6897, 6897), Box(6897, 6897)), - Box(Box(6898, 6898), Box(6898, 6898)), - Box(Box(6899, 6899), Box(6899, 6899)), - Box(Box(6900, 6900), Box(6900, 6900)), - Box(Box(6901, 6901), Box(6901, 6901)), - Box(Box(6902, 6902), Box(6902, 6902)), - Box(Box(6903, 6903), Box(6903, 6903)), - Box(Box(6904, 6904), Box(6904, 6904)), - Box(Box(6905, 6905), Box(6905, 6905)), - Box(Box(6906, 6906), Box(6906, 6906)), - Box(Box(6907, 6907), Box(6907, 6907)), - Box(Box(6908, 6908), Box(6908, 6908)), - Box(Box(6909, 6909), Box(6909, 6909)), - Box(Box(6910, 6910), Box(6910, 6910)), - Box(Box(6911, 6911), Box(6911, 6911)), - Box(Box(6912, 6912), Box(6912, 6912)), - Box(Box(6913, 6913), Box(6913, 6913)), - Box(Box(6914, 6914), Box(6914, 6914)), - Box(Box(6915, 6915), Box(6915, 6915)), - Box(Box(6916, 6916), Box(6916, 6916)), - Box(Box(6917, 6917), Box(6917, 6917)), - Box(Box(6918, 6918), Box(6918, 6918)), - Box(Box(6919, 6919), Box(6919, 6919)), - Box(Box(6920, 6920), Box(6920, 6920)), - Box(Box(6921, 6921), Box(6921, 6921)), - Box(Box(6922, 6922), Box(6922, 6922)), - Box(Box(6923, 6923), Box(6923, 6923)), - Box(Box(6924, 6924), Box(6924, 6924)), - Box(Box(6925, 6925), Box(6925, 6925)), - Box(Box(6926, 6926), Box(6926, 6926)), - Box(Box(6927, 6927), Box(6927, 6927)), - Box(Box(6928, 6928), Box(6928, 6928)), - Box(Box(6929, 6929), Box(6929, 6929)), - Box(Box(6930, 6930), Box(6930, 6930)), - Box(Box(6931, 6931), Box(6931, 6931)), - Box(Box(6932, 6932), Box(6932, 6932)), - Box(Box(6933, 6933), Box(6933, 6933)), - Box(Box(6934, 6934), Box(6934, 6934)), - Box(Box(6935, 6935), Box(6935, 6935)), - Box(Box(6936, 6936), Box(6936, 6936)), - Box(Box(6937, 6937), Box(6937, 6937)), - Box(Box(6938, 6938), Box(6938, 6938)), - Box(Box(6939, 6939), Box(6939, 6939)), - Box(Box(6940, 6940), Box(6940, 6940)), - Box(Box(6941, 6941), Box(6941, 6941)), - Box(Box(6942, 6942), Box(6942, 6942)), - Box(Box(6943, 6943), Box(6943, 6943)), - Box(Box(6944, 6944), Box(6944, 6944)), - Box(Box(6945, 6945), Box(6945, 6945)), - Box(Box(6946, 6946), Box(6946, 6946)), - Box(Box(6947, 6947), Box(6947, 6947)), - Box(Box(6948, 6948), Box(6948, 6948)), - Box(Box(6949, 6949), Box(6949, 6949)), - Box(Box(6950, 6950), Box(6950, 6950)), - Box(Box(6951, 6951), Box(6951, 6951)), - Box(Box(6952, 6952), Box(6952, 6952)), - Box(Box(6953, 6953), Box(6953, 6953)), - Box(Box(6954, 6954), Box(6954, 6954)), - Box(Box(6955, 6955), Box(6955, 6955)), - Box(Box(6956, 6956), Box(6956, 6956)), - Box(Box(6957, 6957), Box(6957, 6957)), - Box(Box(6958, 6958), Box(6958, 6958)), - Box(Box(6959, 6959), Box(6959, 6959)), - Box(Box(6960, 6960), Box(6960, 6960)), - Box(Box(6961, 6961), Box(6961, 6961)), - Box(Box(6962, 6962), Box(6962, 6962)), - Box(Box(6963, 6963), Box(6963, 6963)), - Box(Box(6964, 6964), Box(6964, 6964)), - Box(Box(6965, 6965), Box(6965, 6965)), - Box(Box(6966, 6966), Box(6966, 6966)), - Box(Box(6967, 6967), Box(6967, 6967)), - Box(Box(6968, 6968), Box(6968, 6968)), - Box(Box(6969, 6969), Box(6969, 6969)), - Box(Box(6970, 6970), Box(6970, 6970)), - Box(Box(6971, 6971), Box(6971, 6971)), - Box(Box(6972, 6972), Box(6972, 6972)), - Box(Box(6973, 6973), Box(6973, 6973)), - Box(Box(6974, 6974), Box(6974, 6974)), - Box(Box(6975, 6975), Box(6975, 6975)), - Box(Box(6976, 6976), Box(6976, 6976)), - Box(Box(6977, 6977), Box(6977, 6977)), - Box(Box(6978, 6978), Box(6978, 6978)), - Box(Box(6979, 6979), Box(6979, 6979)), - Box(Box(6980, 6980), Box(6980, 6980)), - Box(Box(6981, 6981), Box(6981, 6981)), - Box(Box(6982, 6982), Box(6982, 6982)), - Box(Box(6983, 6983), Box(6983, 6983)), - Box(Box(6984, 6984), Box(6984, 6984)), - Box(Box(6985, 6985), Box(6985, 6985)), - Box(Box(6986, 6986), Box(6986, 6986)), - Box(Box(6987, 6987), Box(6987, 6987)), - Box(Box(6988, 6988), Box(6988, 6988)), - Box(Box(6989, 6989), Box(6989, 6989)), - Box(Box(6990, 6990), Box(6990, 6990)), - Box(Box(6991, 6991), Box(6991, 6991)), - Box(Box(6992, 6992), Box(6992, 6992)), - Box(Box(6993, 6993), Box(6993, 6993)), - Box(Box(6994, 6994), Box(6994, 6994)), - Box(Box(6995, 6995), Box(6995, 6995)), - Box(Box(6996, 6996), Box(6996, 6996)), - Box(Box(6997, 6997), Box(6997, 6997)), - Box(Box(6998, 6998), Box(6998, 6998)), - Box(Box(6999, 6999), Box(6999, 6999)), - Box(Box(7000, 7000), Box(7000, 7000)), - Box(Box(7001, 7001), Box(7001, 7001)), - Box(Box(7002, 7002), Box(7002, 7002)), - Box(Box(7003, 7003), Box(7003, 7003)), - Box(Box(7004, 7004), Box(7004, 7004)), - Box(Box(7005, 7005), Box(7005, 7005)), - Box(Box(7006, 7006), Box(7006, 7006)), - Box(Box(7007, 7007), Box(7007, 7007)), - Box(Box(7008, 7008), Box(7008, 7008)), - Box(Box(7009, 7009), Box(7009, 7009)), - Box(Box(7010, 7010), Box(7010, 7010)), - Box(Box(7011, 7011), Box(7011, 7011)), - Box(Box(7012, 7012), Box(7012, 7012)), - Box(Box(7013, 7013), Box(7013, 7013)), - Box(Box(7014, 7014), Box(7014, 7014)), - Box(Box(7015, 7015), Box(7015, 7015)), - Box(Box(7016, 7016), Box(7016, 7016)), - Box(Box(7017, 7017), Box(7017, 7017)), - Box(Box(7018, 7018), Box(7018, 7018)), - Box(Box(7019, 7019), Box(7019, 7019)), - Box(Box(7020, 7020), Box(7020, 7020)), - Box(Box(7021, 7021), Box(7021, 7021)), - Box(Box(7022, 7022), Box(7022, 7022)), - Box(Box(7023, 7023), Box(7023, 7023)), - Box(Box(7024, 7024), Box(7024, 7024)), - Box(Box(7025, 7025), Box(7025, 7025)), - Box(Box(7026, 7026), Box(7026, 7026)), - Box(Box(7027, 7027), Box(7027, 7027)), - Box(Box(7028, 7028), Box(7028, 7028)), - Box(Box(7029, 7029), Box(7029, 7029)), - Box(Box(7030, 7030), Box(7030, 7030)), - Box(Box(7031, 7031), Box(7031, 7031)), - Box(Box(7032, 7032), Box(7032, 7032)), - Box(Box(7033, 7033), Box(7033, 7033)), - Box(Box(7034, 7034), Box(7034, 7034)), - Box(Box(7035, 7035), Box(7035, 7035)), - Box(Box(7036, 7036), Box(7036, 7036)), - Box(Box(7037, 7037), Box(7037, 7037)), - Box(Box(7038, 7038), Box(7038, 7038)), - Box(Box(7039, 7039), Box(7039, 7039)), - Box(Box(7040, 7040), Box(7040, 7040)), - Box(Box(7041, 7041), Box(7041, 7041)), - Box(Box(7042, 7042), Box(7042, 7042)), - Box(Box(7043, 7043), Box(7043, 7043)), - Box(Box(7044, 7044), Box(7044, 7044)), - Box(Box(7045, 7045), Box(7045, 7045)), - Box(Box(7046, 7046), Box(7046, 7046)), - Box(Box(7047, 7047), Box(7047, 7047)), - Box(Box(7048, 7048), Box(7048, 7048)), - Box(Box(7049, 7049), Box(7049, 7049)), - Box(Box(7050, 7050), Box(7050, 7050)), - Box(Box(7051, 7051), Box(7051, 7051)), - Box(Box(7052, 7052), Box(7052, 7052)), - Box(Box(7053, 7053), Box(7053, 7053)), - Box(Box(7054, 7054), Box(7054, 7054)), - Box(Box(7055, 7055), Box(7055, 7055)), - Box(Box(7056, 7056), Box(7056, 7056)), - Box(Box(7057, 7057), Box(7057, 7057)), - Box(Box(7058, 7058), Box(7058, 7058)), - Box(Box(7059, 7059), Box(7059, 7059)), - Box(Box(7060, 7060), Box(7060, 7060)), - Box(Box(7061, 7061), Box(7061, 7061)), - Box(Box(7062, 7062), Box(7062, 7062)), - Box(Box(7063, 7063), Box(7063, 7063)), - Box(Box(7064, 7064), Box(7064, 7064)), - Box(Box(7065, 7065), Box(7065, 7065)), - Box(Box(7066, 7066), Box(7066, 7066)), - Box(Box(7067, 7067), Box(7067, 7067)), - Box(Box(7068, 7068), Box(7068, 7068)), - Box(Box(7069, 7069), Box(7069, 7069)), - Box(Box(7070, 7070), Box(7070, 7070)), - Box(Box(7071, 7071), Box(7071, 7071)), - Box(Box(7072, 7072), Box(7072, 7072)), - Box(Box(7073, 7073), Box(7073, 7073)), - Box(Box(7074, 7074), Box(7074, 7074)), - Box(Box(7075, 7075), Box(7075, 7075)), - Box(Box(7076, 7076), Box(7076, 7076)), - Box(Box(7077, 7077), Box(7077, 7077)), - Box(Box(7078, 7078), Box(7078, 7078)), - Box(Box(7079, 7079), Box(7079, 7079)), - Box(Box(7080, 7080), Box(7080, 7080)), - Box(Box(7081, 7081), Box(7081, 7081)), - Box(Box(7082, 7082), Box(7082, 7082)), - Box(Box(7083, 7083), Box(7083, 7083)), - Box(Box(7084, 7084), Box(7084, 7084)), - Box(Box(7085, 7085), Box(7085, 7085)), - Box(Box(7086, 7086), Box(7086, 7086)), - Box(Box(7087, 7087), Box(7087, 7087)), - Box(Box(7088, 7088), Box(7088, 7088)), - Box(Box(7089, 7089), Box(7089, 7089)), - Box(Box(7090, 7090), Box(7090, 7090)), - Box(Box(7091, 7091), Box(7091, 7091)), - Box(Box(7092, 7092), Box(7092, 7092)), - Box(Box(7093, 7093), Box(7093, 7093)), - Box(Box(7094, 7094), Box(7094, 7094)), - Box(Box(7095, 7095), Box(7095, 7095)), - Box(Box(7096, 7096), Box(7096, 7096)), - Box(Box(7097, 7097), Box(7097, 7097)), - Box(Box(7098, 7098), Box(7098, 7098)), - Box(Box(7099, 7099), Box(7099, 7099)), - Box(Box(7100, 7100), Box(7100, 7100)), - Box(Box(7101, 7101), Box(7101, 7101)), - Box(Box(7102, 7102), Box(7102, 7102)), - Box(Box(7103, 7103), Box(7103, 7103)), - Box(Box(7104, 7104), Box(7104, 7104)), - Box(Box(7105, 7105), Box(7105, 7105)), - Box(Box(7106, 7106), Box(7106, 7106)), - Box(Box(7107, 7107), Box(7107, 7107)), - Box(Box(7108, 7108), Box(7108, 7108)), - Box(Box(7109, 7109), Box(7109, 7109)), - Box(Box(7110, 7110), Box(7110, 7110)), - Box(Box(7111, 7111), Box(7111, 7111)), - Box(Box(7112, 7112), Box(7112, 7112)), - Box(Box(7113, 7113), Box(7113, 7113)), - Box(Box(7114, 7114), Box(7114, 7114)), - Box(Box(7115, 7115), Box(7115, 7115)), - Box(Box(7116, 7116), Box(7116, 7116)), - Box(Box(7117, 7117), Box(7117, 7117)), - Box(Box(7118, 7118), Box(7118, 7118)), - Box(Box(7119, 7119), Box(7119, 7119)), - Box(Box(7120, 7120), Box(7120, 7120)), - Box(Box(7121, 7121), Box(7121, 7121)), - Box(Box(7122, 7122), Box(7122, 7122)), - Box(Box(7123, 7123), Box(7123, 7123)), - Box(Box(7124, 7124), Box(7124, 7124)), - Box(Box(7125, 7125), Box(7125, 7125)), - Box(Box(7126, 7126), Box(7126, 7126)), - Box(Box(7127, 7127), Box(7127, 7127)), - Box(Box(7128, 7128), Box(7128, 7128)), - Box(Box(7129, 7129), Box(7129, 7129)), - Box(Box(7130, 7130), Box(7130, 7130)), - Box(Box(7131, 7131), Box(7131, 7131)), - Box(Box(7132, 7132), Box(7132, 7132)), - Box(Box(7133, 7133), Box(7133, 7133)), - Box(Box(7134, 7134), Box(7134, 7134)), - Box(Box(7135, 7135), Box(7135, 7135)), - Box(Box(7136, 7136), Box(7136, 7136)), - Box(Box(7137, 7137), Box(7137, 7137)), - Box(Box(7138, 7138), Box(7138, 7138)), - Box(Box(7139, 7139), Box(7139, 7139)), - Box(Box(7140, 7140), Box(7140, 7140)), - Box(Box(7141, 7141), Box(7141, 7141)), - Box(Box(7142, 7142), Box(7142, 7142)), - Box(Box(7143, 7143), Box(7143, 7143)), - Box(Box(7144, 7144), Box(7144, 7144)), - Box(Box(7145, 7145), Box(7145, 7145)), - Box(Box(7146, 7146), Box(7146, 7146)), - Box(Box(7147, 7147), Box(7147, 7147)), - Box(Box(7148, 7148), Box(7148, 7148)), - Box(Box(7149, 7149), Box(7149, 7149)), - Box(Box(7150, 7150), Box(7150, 7150)), - Box(Box(7151, 7151), Box(7151, 7151)), - Box(Box(7152, 7152), Box(7152, 7152)), - Box(Box(7153, 7153), Box(7153, 7153)), - Box(Box(7154, 7154), Box(7154, 7154)), - Box(Box(7155, 7155), Box(7155, 7155)), - Box(Box(7156, 7156), Box(7156, 7156)), - Box(Box(7157, 7157), Box(7157, 7157)), - Box(Box(7158, 7158), Box(7158, 7158)), - Box(Box(7159, 7159), Box(7159, 7159)), - Box(Box(7160, 7160), Box(7160, 7160)), - Box(Box(7161, 7161), Box(7161, 7161)), - Box(Box(7162, 7162), Box(7162, 7162)), - Box(Box(7163, 7163), Box(7163, 7163)), - Box(Box(7164, 7164), Box(7164, 7164)), - Box(Box(7165, 7165), Box(7165, 7165)), - Box(Box(7166, 7166), Box(7166, 7166)), - Box(Box(7167, 7167), Box(7167, 7167)), - Box(Box(7168, 7168), Box(7168, 7168)), - Box(Box(7169, 7169), Box(7169, 7169)), - Box(Box(7170, 7170), Box(7170, 7170)), - Box(Box(7171, 7171), Box(7171, 7171)), - Box(Box(7172, 7172), Box(7172, 7172)), - Box(Box(7173, 7173), Box(7173, 7173)), - Box(Box(7174, 7174), Box(7174, 7174)), - Box(Box(7175, 7175), Box(7175, 7175)), - Box(Box(7176, 7176), Box(7176, 7176)), - Box(Box(7177, 7177), Box(7177, 7177)), - Box(Box(7178, 7178), Box(7178, 7178)), - Box(Box(7179, 7179), Box(7179, 7179)), - Box(Box(7180, 7180), Box(7180, 7180)), - Box(Box(7181, 7181), Box(7181, 7181)), - Box(Box(7182, 7182), Box(7182, 7182)), - Box(Box(7183, 7183), Box(7183, 7183)), - Box(Box(7184, 7184), Box(7184, 7184)), - Box(Box(7185, 7185), Box(7185, 7185)), - Box(Box(7186, 7186), Box(7186, 7186)), - Box(Box(7187, 7187), Box(7187, 7187)), - Box(Box(7188, 7188), Box(7188, 7188)), - Box(Box(7189, 7189), Box(7189, 7189)), - Box(Box(7190, 7190), Box(7190, 7190)), - Box(Box(7191, 7191), Box(7191, 7191)), - Box(Box(7192, 7192), Box(7192, 7192)), - Box(Box(7193, 7193), Box(7193, 7193)), - Box(Box(7194, 7194), Box(7194, 7194)), - Box(Box(7195, 7195), Box(7195, 7195)), - Box(Box(7196, 7196), Box(7196, 7196)), - Box(Box(7197, 7197), Box(7197, 7197)), - Box(Box(7198, 7198), Box(7198, 7198)), - Box(Box(7199, 7199), Box(7199, 7199)), - Box(Box(7200, 7200), Box(7200, 7200)), - Box(Box(7201, 7201), Box(7201, 7201)), - Box(Box(7202, 7202), Box(7202, 7202)), - Box(Box(7203, 7203), Box(7203, 7203)), - Box(Box(7204, 7204), Box(7204, 7204)), - Box(Box(7205, 7205), Box(7205, 7205)), - Box(Box(7206, 7206), Box(7206, 7206)), - Box(Box(7207, 7207), Box(7207, 7207)), - Box(Box(7208, 7208), Box(7208, 7208)), - Box(Box(7209, 7209), Box(7209, 7209)), - Box(Box(7210, 7210), Box(7210, 7210)), - Box(Box(7211, 7211), Box(7211, 7211)), - Box(Box(7212, 7212), Box(7212, 7212)), - Box(Box(7213, 7213), Box(7213, 7213)), - Box(Box(7214, 7214), Box(7214, 7214)), - Box(Box(7215, 7215), Box(7215, 7215)), - Box(Box(7216, 7216), Box(7216, 7216)), - Box(Box(7217, 7217), Box(7217, 7217)), - Box(Box(7218, 7218), Box(7218, 7218)), - Box(Box(7219, 7219), Box(7219, 7219)), - Box(Box(7220, 7220), Box(7220, 7220)), - Box(Box(7221, 7221), Box(7221, 7221)), - Box(Box(7222, 7222), Box(7222, 7222)), - Box(Box(7223, 7223), Box(7223, 7223)), - Box(Box(7224, 7224), Box(7224, 7224)), - Box(Box(7225, 7225), Box(7225, 7225)), - Box(Box(7226, 7226), Box(7226, 7226)), - Box(Box(7227, 7227), Box(7227, 7227)), - Box(Box(7228, 7228), Box(7228, 7228)), - Box(Box(7229, 7229), Box(7229, 7229)), - Box(Box(7230, 7230), Box(7230, 7230)), - Box(Box(7231, 7231), Box(7231, 7231)), - Box(Box(7232, 7232), Box(7232, 7232)), - Box(Box(7233, 7233), Box(7233, 7233)), - Box(Box(7234, 7234), Box(7234, 7234)), - Box(Box(7235, 7235), Box(7235, 7235)), - Box(Box(7236, 7236), Box(7236, 7236)), - Box(Box(7237, 7237), Box(7237, 7237)), - Box(Box(7238, 7238), Box(7238, 7238)), - Box(Box(7239, 7239), Box(7239, 7239)), - Box(Box(7240, 7240), Box(7240, 7240)), - Box(Box(7241, 7241), Box(7241, 7241)), - Box(Box(7242, 7242), Box(7242, 7242)), - Box(Box(7243, 7243), Box(7243, 7243)), - Box(Box(7244, 7244), Box(7244, 7244)), - Box(Box(7245, 7245), Box(7245, 7245)), - Box(Box(7246, 7246), Box(7246, 7246)), - Box(Box(7247, 7247), Box(7247, 7247)), - Box(Box(7248, 7248), Box(7248, 7248)), - Box(Box(7249, 7249), Box(7249, 7249)), - Box(Box(7250, 7250), Box(7250, 7250)), - Box(Box(7251, 7251), Box(7251, 7251)), - Box(Box(7252, 7252), Box(7252, 7252)), - Box(Box(7253, 7253), Box(7253, 7253)), - Box(Box(7254, 7254), Box(7254, 7254)), - Box(Box(7255, 7255), Box(7255, 7255)), - Box(Box(7256, 7256), Box(7256, 7256)), - Box(Box(7257, 7257), Box(7257, 7257)), - Box(Box(7258, 7258), Box(7258, 7258)), - Box(Box(7259, 7259), Box(7259, 7259)), - Box(Box(7260, 7260), Box(7260, 7260)), - Box(Box(7261, 7261), Box(7261, 7261)), - Box(Box(7262, 7262), Box(7262, 7262)), - Box(Box(7263, 7263), Box(7263, 7263)), - Box(Box(7264, 7264), Box(7264, 7264)), - Box(Box(7265, 7265), Box(7265, 7265)), - Box(Box(7266, 7266), Box(7266, 7266)), - Box(Box(7267, 7267), Box(7267, 7267)), - Box(Box(7268, 7268), Box(7268, 7268)), - Box(Box(7269, 7269), Box(7269, 7269)), - Box(Box(7270, 7270), Box(7270, 7270)), - Box(Box(7271, 7271), Box(7271, 7271)), - Box(Box(7272, 7272), Box(7272, 7272)), - Box(Box(7273, 7273), Box(7273, 7273)), - Box(Box(7274, 7274), Box(7274, 7274)), - Box(Box(7275, 7275), Box(7275, 7275)), - Box(Box(7276, 7276), Box(7276, 7276)), - Box(Box(7277, 7277), Box(7277, 7277)), - Box(Box(7278, 7278), Box(7278, 7278)), - Box(Box(7279, 7279), Box(7279, 7279)), - Box(Box(7280, 7280), Box(7280, 7280)), - Box(Box(7281, 7281), Box(7281, 7281)), - Box(Box(7282, 7282), Box(7282, 7282)), - Box(Box(7283, 7283), Box(7283, 7283)), - Box(Box(7284, 7284), Box(7284, 7284)), - Box(Box(7285, 7285), Box(7285, 7285)), - Box(Box(7286, 7286), Box(7286, 7286)), - Box(Box(7287, 7287), Box(7287, 7287)), - Box(Box(7288, 7288), Box(7288, 7288)), - Box(Box(7289, 7289), Box(7289, 7289)), - Box(Box(7290, 7290), Box(7290, 7290)), - Box(Box(7291, 7291), Box(7291, 7291)), - Box(Box(7292, 7292), Box(7292, 7292)), - Box(Box(7293, 7293), Box(7293, 7293)), - Box(Box(7294, 7294), Box(7294, 7294)), - Box(Box(7295, 7295), Box(7295, 7295)), - Box(Box(7296, 7296), Box(7296, 7296)), - Box(Box(7297, 7297), Box(7297, 7297)), - Box(Box(7298, 7298), Box(7298, 7298)), - Box(Box(7299, 7299), Box(7299, 7299)), - Box(Box(7300, 7300), Box(7300, 7300)), - Box(Box(7301, 7301), Box(7301, 7301)), - Box(Box(7302, 7302), Box(7302, 7302)), - Box(Box(7303, 7303), Box(7303, 7303)), - Box(Box(7304, 7304), Box(7304, 7304)), - Box(Box(7305, 7305), Box(7305, 7305)), - Box(Box(7306, 7306), Box(7306, 7306)), - Box(Box(7307, 7307), Box(7307, 7307)), - Box(Box(7308, 7308), Box(7308, 7308)), - Box(Box(7309, 7309), Box(7309, 7309)), - Box(Box(7310, 7310), Box(7310, 7310)), - Box(Box(7311, 7311), Box(7311, 7311)), - Box(Box(7312, 7312), Box(7312, 7312)), - Box(Box(7313, 7313), Box(7313, 7313)), - Box(Box(7314, 7314), Box(7314, 7314)), - Box(Box(7315, 7315), Box(7315, 7315)), - Box(Box(7316, 7316), Box(7316, 7316)), - Box(Box(7317, 7317), Box(7317, 7317)), - Box(Box(7318, 7318), Box(7318, 7318)), - Box(Box(7319, 7319), Box(7319, 7319)), - Box(Box(7320, 7320), Box(7320, 7320)), - Box(Box(7321, 7321), Box(7321, 7321)), - Box(Box(7322, 7322), Box(7322, 7322)), - Box(Box(7323, 7323), Box(7323, 7323)), - Box(Box(7324, 7324), Box(7324, 7324)), - Box(Box(7325, 7325), Box(7325, 7325)), - Box(Box(7326, 7326), Box(7326, 7326)), - Box(Box(7327, 7327), Box(7327, 7327)), - Box(Box(7328, 7328), Box(7328, 7328)), - Box(Box(7329, 7329), Box(7329, 7329)), - Box(Box(7330, 7330), Box(7330, 7330)), - Box(Box(7331, 7331), Box(7331, 7331)), - Box(Box(7332, 7332), Box(7332, 7332)), - Box(Box(7333, 7333), Box(7333, 7333)), - Box(Box(7334, 7334), Box(7334, 7334)), - Box(Box(7335, 7335), Box(7335, 7335)), - Box(Box(7336, 7336), Box(7336, 7336)), - Box(Box(7337, 7337), Box(7337, 7337)), - Box(Box(7338, 7338), Box(7338, 7338)), - Box(Box(7339, 7339), Box(7339, 7339)), - Box(Box(7340, 7340), Box(7340, 7340)), - Box(Box(7341, 7341), Box(7341, 7341)), - Box(Box(7342, 7342), Box(7342, 7342)), - Box(Box(7343, 7343), Box(7343, 7343)), - Box(Box(7344, 7344), Box(7344, 7344)), - Box(Box(7345, 7345), Box(7345, 7345)), - Box(Box(7346, 7346), Box(7346, 7346)), - Box(Box(7347, 7347), Box(7347, 7347)), - Box(Box(7348, 7348), Box(7348, 7348)), - Box(Box(7349, 7349), Box(7349, 7349)), - Box(Box(7350, 7350), Box(7350, 7350)), - Box(Box(7351, 7351), Box(7351, 7351)), - Box(Box(7352, 7352), Box(7352, 7352)), - Box(Box(7353, 7353), Box(7353, 7353)), - Box(Box(7354, 7354), Box(7354, 7354)), - Box(Box(7355, 7355), Box(7355, 7355)), - Box(Box(7356, 7356), Box(7356, 7356)), - Box(Box(7357, 7357), Box(7357, 7357)), - Box(Box(7358, 7358), Box(7358, 7358)), - Box(Box(7359, 7359), Box(7359, 7359)), - Box(Box(7360, 7360), Box(7360, 7360)), - Box(Box(7361, 7361), Box(7361, 7361)), - Box(Box(7362, 7362), Box(7362, 7362)), - Box(Box(7363, 7363), Box(7363, 7363)), - Box(Box(7364, 7364), Box(7364, 7364)), - Box(Box(7365, 7365), Box(7365, 7365)), - Box(Box(7366, 7366), Box(7366, 7366)), - Box(Box(7367, 7367), Box(7367, 7367)), - Box(Box(7368, 7368), Box(7368, 7368)), - Box(Box(7369, 7369), Box(7369, 7369)), - Box(Box(7370, 7370), Box(7370, 7370)), - Box(Box(7371, 7371), Box(7371, 7371)), - Box(Box(7372, 7372), Box(7372, 7372)), - Box(Box(7373, 7373), Box(7373, 7373)), - Box(Box(7374, 7374), Box(7374, 7374)), - Box(Box(7375, 7375), Box(7375, 7375)), - Box(Box(7376, 7376), Box(7376, 7376)), - Box(Box(7377, 7377), Box(7377, 7377)), - Box(Box(7378, 7378), Box(7378, 7378)), - Box(Box(7379, 7379), Box(7379, 7379)), - Box(Box(7380, 7380), Box(7380, 7380)), - Box(Box(7381, 7381), Box(7381, 7381)), - Box(Box(7382, 7382), Box(7382, 7382)), - Box(Box(7383, 7383), Box(7383, 7383)), - Box(Box(7384, 7384), Box(7384, 7384)), - Box(Box(7385, 7385), Box(7385, 7385)), - Box(Box(7386, 7386), Box(7386, 7386)), - Box(Box(7387, 7387), Box(7387, 7387)), - Box(Box(7388, 7388), Box(7388, 7388)), - Box(Box(7389, 7389), Box(7389, 7389)), - Box(Box(7390, 7390), Box(7390, 7390)), - Box(Box(7391, 7391), Box(7391, 7391)), - Box(Box(7392, 7392), Box(7392, 7392)), - Box(Box(7393, 7393), Box(7393, 7393)), - Box(Box(7394, 7394), Box(7394, 7394)), - Box(Box(7395, 7395), Box(7395, 7395)), - Box(Box(7396, 7396), Box(7396, 7396)), - Box(Box(7397, 7397), Box(7397, 7397)), - Box(Box(7398, 7398), Box(7398, 7398)), - Box(Box(7399, 7399), Box(7399, 7399)), - Box(Box(7400, 7400), Box(7400, 7400)), - Box(Box(7401, 7401), Box(7401, 7401)), - Box(Box(7402, 7402), Box(7402, 7402)), - Box(Box(7403, 7403), Box(7403, 7403)), - Box(Box(7404, 7404), Box(7404, 7404)), - Box(Box(7405, 7405), Box(7405, 7405)), - Box(Box(7406, 7406), Box(7406, 7406)), - Box(Box(7407, 7407), Box(7407, 7407)), - Box(Box(7408, 7408), Box(7408, 7408)), - Box(Box(7409, 7409), Box(7409, 7409)), - Box(Box(7410, 7410), Box(7410, 7410)), - Box(Box(7411, 7411), Box(7411, 7411)), - Box(Box(7412, 7412), Box(7412, 7412)), - Box(Box(7413, 7413), Box(7413, 7413)), - Box(Box(7414, 7414), Box(7414, 7414)), - Box(Box(7415, 7415), Box(7415, 7415)), - Box(Box(7416, 7416), Box(7416, 7416)), - Box(Box(7417, 7417), Box(7417, 7417)), - Box(Box(7418, 7418), Box(7418, 7418)), - Box(Box(7419, 7419), Box(7419, 7419)), - Box(Box(7420, 7420), Box(7420, 7420)), - Box(Box(7421, 7421), Box(7421, 7421)), - Box(Box(7422, 7422), Box(7422, 7422)), - Box(Box(7423, 7423), Box(7423, 7423)), - Box(Box(7424, 7424), Box(7424, 7424)), - Box(Box(7425, 7425), Box(7425, 7425)), - Box(Box(7426, 7426), Box(7426, 7426)), - Box(Box(7427, 7427), Box(7427, 7427)), - Box(Box(7428, 7428), Box(7428, 7428)), - Box(Box(7429, 7429), Box(7429, 7429)), - Box(Box(7430, 7430), Box(7430, 7430)), - Box(Box(7431, 7431), Box(7431, 7431)), - Box(Box(7432, 7432), Box(7432, 7432)), - Box(Box(7433, 7433), Box(7433, 7433)), - Box(Box(7434, 7434), Box(7434, 7434)), - Box(Box(7435, 7435), Box(7435, 7435)), - Box(Box(7436, 7436), Box(7436, 7436)), - Box(Box(7437, 7437), Box(7437, 7437)), - Box(Box(7438, 7438), Box(7438, 7438)), - Box(Box(7439, 7439), Box(7439, 7439)), - Box(Box(7440, 7440), Box(7440, 7440)), - Box(Box(7441, 7441), Box(7441, 7441)), - Box(Box(7442, 7442), Box(7442, 7442)), - Box(Box(7443, 7443), Box(7443, 7443)), - Box(Box(7444, 7444), Box(7444, 7444)), - Box(Box(7445, 7445), Box(7445, 7445)), - Box(Box(7446, 7446), Box(7446, 7446)), - Box(Box(7447, 7447), Box(7447, 7447)), - Box(Box(7448, 7448), Box(7448, 7448)), - Box(Box(7449, 7449), Box(7449, 7449)), - Box(Box(7450, 7450), Box(7450, 7450)), - Box(Box(7451, 7451), Box(7451, 7451)), - Box(Box(7452, 7452), Box(7452, 7452)), - Box(Box(7453, 7453), Box(7453, 7453)), - Box(Box(7454, 7454), Box(7454, 7454)), - Box(Box(7455, 7455), Box(7455, 7455)), - Box(Box(7456, 7456), Box(7456, 7456)), - Box(Box(7457, 7457), Box(7457, 7457)), - Box(Box(7458, 7458), Box(7458, 7458)), - Box(Box(7459, 7459), Box(7459, 7459)), - Box(Box(7460, 7460), Box(7460, 7460)), - Box(Box(7461, 7461), Box(7461, 7461)), - Box(Box(7462, 7462), Box(7462, 7462)), - Box(Box(7463, 7463), Box(7463, 7463)), - Box(Box(7464, 7464), Box(7464, 7464)), - Box(Box(7465, 7465), Box(7465, 7465)), - Box(Box(7466, 7466), Box(7466, 7466)), - Box(Box(7467, 7467), Box(7467, 7467)), - Box(Box(7468, 7468), Box(7468, 7468)), - Box(Box(7469, 7469), Box(7469, 7469)), - Box(Box(7470, 7470), Box(7470, 7470)), - Box(Box(7471, 7471), Box(7471, 7471)), - Box(Box(7472, 7472), Box(7472, 7472)), - Box(Box(7473, 7473), Box(7473, 7473)), - Box(Box(7474, 7474), Box(7474, 7474)), - Box(Box(7475, 7475), Box(7475, 7475)), - Box(Box(7476, 7476), Box(7476, 7476)), - Box(Box(7477, 7477), Box(7477, 7477)), - Box(Box(7478, 7478), Box(7478, 7478)), - Box(Box(7479, 7479), Box(7479, 7479)), - Box(Box(7480, 7480), Box(7480, 7480)), - Box(Box(7481, 7481), Box(7481, 7481)), - Box(Box(7482, 7482), Box(7482, 7482)), - Box(Box(7483, 7483), Box(7483, 7483)), - Box(Box(7484, 7484), Box(7484, 7484)), - Box(Box(7485, 7485), Box(7485, 7485)), - Box(Box(7486, 7486), Box(7486, 7486)), - Box(Box(7487, 7487), Box(7487, 7487)), - Box(Box(7488, 7488), Box(7488, 7488)), - Box(Box(7489, 7489), Box(7489, 7489)), - Box(Box(7490, 7490), Box(7490, 7490)), - Box(Box(7491, 7491), Box(7491, 7491)), - Box(Box(7492, 7492), Box(7492, 7492)), - Box(Box(7493, 7493), Box(7493, 7493)), - Box(Box(7494, 7494), Box(7494, 7494)), - Box(Box(7495, 7495), Box(7495, 7495)), - Box(Box(7496, 7496), Box(7496, 7496)), - Box(Box(7497, 7497), Box(7497, 7497)), - Box(Box(7498, 7498), Box(7498, 7498)), - Box(Box(7499, 7499), Box(7499, 7499)), - Box(Box(7500, 7500), Box(7500, 7500)), - Box(Box(7501, 7501), Box(7501, 7501)), - Box(Box(7502, 7502), Box(7502, 7502)), - Box(Box(7503, 7503), Box(7503, 7503)), - Box(Box(7504, 7504), Box(7504, 7504)), - Box(Box(7505, 7505), Box(7505, 7505)), - Box(Box(7506, 7506), Box(7506, 7506)), - Box(Box(7507, 7507), Box(7507, 7507)), - Box(Box(7508, 7508), Box(7508, 7508)), - Box(Box(7509, 7509), Box(7509, 7509)), - Box(Box(7510, 7510), Box(7510, 7510)), - Box(Box(7511, 7511), Box(7511, 7511)), - Box(Box(7512, 7512), Box(7512, 7512)), - Box(Box(7513, 7513), Box(7513, 7513)), - Box(Box(7514, 7514), Box(7514, 7514)), - Box(Box(7515, 7515), Box(7515, 7515)), - Box(Box(7516, 7516), Box(7516, 7516)), - Box(Box(7517, 7517), Box(7517, 7517)), - Box(Box(7518, 7518), Box(7518, 7518)), - Box(Box(7519, 7519), Box(7519, 7519)), - Box(Box(7520, 7520), Box(7520, 7520)), - Box(Box(7521, 7521), Box(7521, 7521)), - Box(Box(7522, 7522), Box(7522, 7522)), - Box(Box(7523, 7523), Box(7523, 7523)), - Box(Box(7524, 7524), Box(7524, 7524)), - Box(Box(7525, 7525), Box(7525, 7525)), - Box(Box(7526, 7526), Box(7526, 7526)), - Box(Box(7527, 7527), Box(7527, 7527)), - Box(Box(7528, 7528), Box(7528, 7528)), - Box(Box(7529, 7529), Box(7529, 7529)), - Box(Box(7530, 7530), Box(7530, 7530)), - Box(Box(7531, 7531), Box(7531, 7531)), - Box(Box(7532, 7532), Box(7532, 7532)), - Box(Box(7533, 7533), Box(7533, 7533)), - Box(Box(7534, 7534), Box(7534, 7534)), - Box(Box(7535, 7535), Box(7535, 7535)), - Box(Box(7536, 7536), Box(7536, 7536)), - Box(Box(7537, 7537), Box(7537, 7537)), - Box(Box(7538, 7538), Box(7538, 7538)), - Box(Box(7539, 7539), Box(7539, 7539)), - Box(Box(7540, 7540), Box(7540, 7540)), - Box(Box(7541, 7541), Box(7541, 7541)), - Box(Box(7542, 7542), Box(7542, 7542)), - Box(Box(7543, 7543), Box(7543, 7543)), - Box(Box(7544, 7544), Box(7544, 7544)), - Box(Box(7545, 7545), Box(7545, 7545)), - Box(Box(7546, 7546), Box(7546, 7546)), - Box(Box(7547, 7547), Box(7547, 7547)), - Box(Box(7548, 7548), Box(7548, 7548)), - Box(Box(7549, 7549), Box(7549, 7549)), - Box(Box(7550, 7550), Box(7550, 7550)), - Box(Box(7551, 7551), Box(7551, 7551)), - Box(Box(7552, 7552), Box(7552, 7552)), - Box(Box(7553, 7553), Box(7553, 7553)), - Box(Box(7554, 7554), Box(7554, 7554)), - Box(Box(7555, 7555), Box(7555, 7555)), - Box(Box(7556, 7556), Box(7556, 7556)), - Box(Box(7557, 7557), Box(7557, 7557)), - Box(Box(7558, 7558), Box(7558, 7558)), - Box(Box(7559, 7559), Box(7559, 7559)), - Box(Box(7560, 7560), Box(7560, 7560)), - Box(Box(7561, 7561), Box(7561, 7561)), - Box(Box(7562, 7562), Box(7562, 7562)), - Box(Box(7563, 7563), Box(7563, 7563)), - Box(Box(7564, 7564), Box(7564, 7564)), - Box(Box(7565, 7565), Box(7565, 7565)), - Box(Box(7566, 7566), Box(7566, 7566)), - Box(Box(7567, 7567), Box(7567, 7567)), - Box(Box(7568, 7568), Box(7568, 7568)), - Box(Box(7569, 7569), Box(7569, 7569)), - Box(Box(7570, 7570), Box(7570, 7570)), - Box(Box(7571, 7571), Box(7571, 7571)), - Box(Box(7572, 7572), Box(7572, 7572)), - Box(Box(7573, 7573), Box(7573, 7573)), - Box(Box(7574, 7574), Box(7574, 7574)), - Box(Box(7575, 7575), Box(7575, 7575)), - Box(Box(7576, 7576), Box(7576, 7576)), - Box(Box(7577, 7577), Box(7577, 7577)), - Box(Box(7578, 7578), Box(7578, 7578)), - Box(Box(7579, 7579), Box(7579, 7579)), - Box(Box(7580, 7580), Box(7580, 7580)), - Box(Box(7581, 7581), Box(7581, 7581)), - Box(Box(7582, 7582), Box(7582, 7582)), - Box(Box(7583, 7583), Box(7583, 7583)), - Box(Box(7584, 7584), Box(7584, 7584)), - Box(Box(7585, 7585), Box(7585, 7585)), - Box(Box(7586, 7586), Box(7586, 7586)), - Box(Box(7587, 7587), Box(7587, 7587)), - Box(Box(7588, 7588), Box(7588, 7588)), - Box(Box(7589, 7589), Box(7589, 7589)), - Box(Box(7590, 7590), Box(7590, 7590)), - Box(Box(7591, 7591), Box(7591, 7591)), - Box(Box(7592, 7592), Box(7592, 7592)), - Box(Box(7593, 7593), Box(7593, 7593)), - Box(Box(7594, 7594), Box(7594, 7594)), - Box(Box(7595, 7595), Box(7595, 7595)), - Box(Box(7596, 7596), Box(7596, 7596)), - Box(Box(7597, 7597), Box(7597, 7597)), - Box(Box(7598, 7598), Box(7598, 7598)), - Box(Box(7599, 7599), Box(7599, 7599)), - Box(Box(7600, 7600), Box(7600, 7600)), - Box(Box(7601, 7601), Box(7601, 7601)), - Box(Box(7602, 7602), Box(7602, 7602)), - Box(Box(7603, 7603), Box(7603, 7603)), - Box(Box(7604, 7604), Box(7604, 7604)), - Box(Box(7605, 7605), Box(7605, 7605)), - Box(Box(7606, 7606), Box(7606, 7606)), - Box(Box(7607, 7607), Box(7607, 7607)), - Box(Box(7608, 7608), Box(7608, 7608)), - Box(Box(7609, 7609), Box(7609, 7609)), - Box(Box(7610, 7610), Box(7610, 7610)), - Box(Box(7611, 7611), Box(7611, 7611)), - Box(Box(7612, 7612), Box(7612, 7612)), - Box(Box(7613, 7613), Box(7613, 7613)), - Box(Box(7614, 7614), Box(7614, 7614)), - Box(Box(7615, 7615), Box(7615, 7615)), - Box(Box(7616, 7616), Box(7616, 7616)), - Box(Box(7617, 7617), Box(7617, 7617)), - Box(Box(7618, 7618), Box(7618, 7618)), - Box(Box(7619, 7619), Box(7619, 7619)), - Box(Box(7620, 7620), Box(7620, 7620)), - Box(Box(7621, 7621), Box(7621, 7621)), - Box(Box(7622, 7622), Box(7622, 7622)), - Box(Box(7623, 7623), Box(7623, 7623)), - Box(Box(7624, 7624), Box(7624, 7624)), - Box(Box(7625, 7625), Box(7625, 7625)), - Box(Box(7626, 7626), Box(7626, 7626)), - Box(Box(7627, 7627), Box(7627, 7627)), - Box(Box(7628, 7628), Box(7628, 7628)), - Box(Box(7629, 7629), Box(7629, 7629)), - Box(Box(7630, 7630), Box(7630, 7630)), - Box(Box(7631, 7631), Box(7631, 7631)), - Box(Box(7632, 7632), Box(7632, 7632)), - Box(Box(7633, 7633), Box(7633, 7633)), - Box(Box(7634, 7634), Box(7634, 7634)), - Box(Box(7635, 7635), Box(7635, 7635)), - Box(Box(7636, 7636), Box(7636, 7636)), - Box(Box(7637, 7637), Box(7637, 7637)), - Box(Box(7638, 7638), Box(7638, 7638)), - Box(Box(7639, 7639), Box(7639, 7639)), - Box(Box(7640, 7640), Box(7640, 7640)), - Box(Box(7641, 7641), Box(7641, 7641)), - Box(Box(7642, 7642), Box(7642, 7642)), - Box(Box(7643, 7643), Box(7643, 7643)), - Box(Box(7644, 7644), Box(7644, 7644)), - Box(Box(7645, 7645), Box(7645, 7645)), - Box(Box(7646, 7646), Box(7646, 7646)), - Box(Box(7647, 7647), Box(7647, 7647)), - Box(Box(7648, 7648), Box(7648, 7648)), - Box(Box(7649, 7649), Box(7649, 7649)), - Box(Box(7650, 7650), Box(7650, 7650)), - Box(Box(7651, 7651), Box(7651, 7651)), - Box(Box(7652, 7652), Box(7652, 7652)), - Box(Box(7653, 7653), Box(7653, 7653)), - Box(Box(7654, 7654), Box(7654, 7654)), - Box(Box(7655, 7655), Box(7655, 7655)), - Box(Box(7656, 7656), Box(7656, 7656)), - Box(Box(7657, 7657), Box(7657, 7657)), - Box(Box(7658, 7658), Box(7658, 7658)), - Box(Box(7659, 7659), Box(7659, 7659)), - Box(Box(7660, 7660), Box(7660, 7660)), - Box(Box(7661, 7661), Box(7661, 7661)), - Box(Box(7662, 7662), Box(7662, 7662)), - Box(Box(7663, 7663), Box(7663, 7663)), - Box(Box(7664, 7664), Box(7664, 7664)), - Box(Box(7665, 7665), Box(7665, 7665)), - Box(Box(7666, 7666), Box(7666, 7666)), - Box(Box(7667, 7667), Box(7667, 7667)), - Box(Box(7668, 7668), Box(7668, 7668)), - Box(Box(7669, 7669), Box(7669, 7669)), - Box(Box(7670, 7670), Box(7670, 7670)), - Box(Box(7671, 7671), Box(7671, 7671)), - Box(Box(7672, 7672), Box(7672, 7672)), - Box(Box(7673, 7673), Box(7673, 7673)), - Box(Box(7674, 7674), Box(7674, 7674)), - Box(Box(7675, 7675), Box(7675, 7675)), - Box(Box(7676, 7676), Box(7676, 7676)), - Box(Box(7677, 7677), Box(7677, 7677)), - Box(Box(7678, 7678), Box(7678, 7678)), - Box(Box(7679, 7679), Box(7679, 7679)), - Box(Box(7680, 7680), Box(7680, 7680)), - Box(Box(7681, 7681), Box(7681, 7681)), - Box(Box(7682, 7682), Box(7682, 7682)), - Box(Box(7683, 7683), Box(7683, 7683)), - Box(Box(7684, 7684), Box(7684, 7684)), - Box(Box(7685, 7685), Box(7685, 7685)), - Box(Box(7686, 7686), Box(7686, 7686)), - Box(Box(7687, 7687), Box(7687, 7687)), - Box(Box(7688, 7688), Box(7688, 7688)), - Box(Box(7689, 7689), Box(7689, 7689)), - Box(Box(7690, 7690), Box(7690, 7690)), - Box(Box(7691, 7691), Box(7691, 7691)), - Box(Box(7692, 7692), Box(7692, 7692)), - Box(Box(7693, 7693), Box(7693, 7693)), - Box(Box(7694, 7694), Box(7694, 7694)), - Box(Box(7695, 7695), Box(7695, 7695)), - Box(Box(7696, 7696), Box(7696, 7696)), - Box(Box(7697, 7697), Box(7697, 7697)), - Box(Box(7698, 7698), Box(7698, 7698)), - Box(Box(7699, 7699), Box(7699, 7699)), - Box(Box(7700, 7700), Box(7700, 7700)), - Box(Box(7701, 7701), Box(7701, 7701)), - Box(Box(7702, 7702), Box(7702, 7702)), - Box(Box(7703, 7703), Box(7703, 7703)), - Box(Box(7704, 7704), Box(7704, 7704)), - Box(Box(7705, 7705), Box(7705, 7705)), - Box(Box(7706, 7706), Box(7706, 7706)), - Box(Box(7707, 7707), Box(7707, 7707)), - Box(Box(7708, 7708), Box(7708, 7708)), - Box(Box(7709, 7709), Box(7709, 7709)), - Box(Box(7710, 7710), Box(7710, 7710)), - Box(Box(7711, 7711), Box(7711, 7711)), - Box(Box(7712, 7712), Box(7712, 7712)), - Box(Box(7713, 7713), Box(7713, 7713)), - Box(Box(7714, 7714), Box(7714, 7714)), - Box(Box(7715, 7715), Box(7715, 7715)), - Box(Box(7716, 7716), Box(7716, 7716)), - Box(Box(7717, 7717), Box(7717, 7717)), - Box(Box(7718, 7718), Box(7718, 7718)), - Box(Box(7719, 7719), Box(7719, 7719)), - Box(Box(7720, 7720), Box(7720, 7720)), - Box(Box(7721, 7721), Box(7721, 7721)), - Box(Box(7722, 7722), Box(7722, 7722)), - Box(Box(7723, 7723), Box(7723, 7723)), - Box(Box(7724, 7724), Box(7724, 7724)), - Box(Box(7725, 7725), Box(7725, 7725)), - Box(Box(7726, 7726), Box(7726, 7726)), - Box(Box(7727, 7727), Box(7727, 7727)), - Box(Box(7728, 7728), Box(7728, 7728)), - Box(Box(7729, 7729), Box(7729, 7729)), - Box(Box(7730, 7730), Box(7730, 7730)), - Box(Box(7731, 7731), Box(7731, 7731)), - Box(Box(7732, 7732), Box(7732, 7732)), - Box(Box(7733, 7733), Box(7733, 7733)), - Box(Box(7734, 7734), Box(7734, 7734)), - Box(Box(7735, 7735), Box(7735, 7735)), - Box(Box(7736, 7736), Box(7736, 7736)), - Box(Box(7737, 7737), Box(7737, 7737)), - Box(Box(7738, 7738), Box(7738, 7738)), - Box(Box(7739, 7739), Box(7739, 7739)), - Box(Box(7740, 7740), Box(7740, 7740)), - Box(Box(7741, 7741), Box(7741, 7741)), - Box(Box(7742, 7742), Box(7742, 7742)), - Box(Box(7743, 7743), Box(7743, 7743)), - Box(Box(7744, 7744), Box(7744, 7744)), - Box(Box(7745, 7745), Box(7745, 7745)), - Box(Box(7746, 7746), Box(7746, 7746)), - Box(Box(7747, 7747), Box(7747, 7747)), - Box(Box(7748, 7748), Box(7748, 7748)), - Box(Box(7749, 7749), Box(7749, 7749)), - Box(Box(7750, 7750), Box(7750, 7750)), - Box(Box(7751, 7751), Box(7751, 7751)), - Box(Box(7752, 7752), Box(7752, 7752)), - Box(Box(7753, 7753), Box(7753, 7753)), - Box(Box(7754, 7754), Box(7754, 7754)), - Box(Box(7755, 7755), Box(7755, 7755)), - Box(Box(7756, 7756), Box(7756, 7756)), - Box(Box(7757, 7757), Box(7757, 7757)), - Box(Box(7758, 7758), Box(7758, 7758)), - Box(Box(7759, 7759), Box(7759, 7759)), - Box(Box(7760, 7760), Box(7760, 7760)), - Box(Box(7761, 7761), Box(7761, 7761)), - Box(Box(7762, 7762), Box(7762, 7762)), - Box(Box(7763, 7763), Box(7763, 7763)), - Box(Box(7764, 7764), Box(7764, 7764)), - Box(Box(7765, 7765), Box(7765, 7765)), - Box(Box(7766, 7766), Box(7766, 7766)), - Box(Box(7767, 7767), Box(7767, 7767)), - Box(Box(7768, 7768), Box(7768, 7768)), - Box(Box(7769, 7769), Box(7769, 7769)), - Box(Box(7770, 7770), Box(7770, 7770)), - Box(Box(7771, 7771), Box(7771, 7771)), - Box(Box(7772, 7772), Box(7772, 7772)), - Box(Box(7773, 7773), Box(7773, 7773)), - Box(Box(7774, 7774), Box(7774, 7774)), - Box(Box(7775, 7775), Box(7775, 7775)), - Box(Box(7776, 7776), Box(7776, 7776)), - Box(Box(7777, 7777), Box(7777, 7777)), - Box(Box(7778, 7778), Box(7778, 7778)), - Box(Box(7779, 7779), Box(7779, 7779)), - Box(Box(7780, 7780), Box(7780, 7780)), - Box(Box(7781, 7781), Box(7781, 7781)), - Box(Box(7782, 7782), Box(7782, 7782)), - Box(Box(7783, 7783), Box(7783, 7783)), - Box(Box(7784, 7784), Box(7784, 7784)), - Box(Box(7785, 7785), Box(7785, 7785)), - Box(Box(7786, 7786), Box(7786, 7786)), - Box(Box(7787, 7787), Box(7787, 7787)), - Box(Box(7788, 7788), Box(7788, 7788)), - Box(Box(7789, 7789), Box(7789, 7789)), - Box(Box(7790, 7790), Box(7790, 7790)), - Box(Box(7791, 7791), Box(7791, 7791)), - Box(Box(7792, 7792), Box(7792, 7792)), - Box(Box(7793, 7793), Box(7793, 7793)), - Box(Box(7794, 7794), Box(7794, 7794)), - Box(Box(7795, 7795), Box(7795, 7795)), - Box(Box(7796, 7796), Box(7796, 7796)), - Box(Box(7797, 7797), Box(7797, 7797)), - Box(Box(7798, 7798), Box(7798, 7798)), - Box(Box(7799, 7799), Box(7799, 7799)), - Box(Box(7800, 7800), Box(7800, 7800)), - Box(Box(7801, 7801), Box(7801, 7801)), - Box(Box(7802, 7802), Box(7802, 7802)), - Box(Box(7803, 7803), Box(7803, 7803)), - Box(Box(7804, 7804), Box(7804, 7804)), - Box(Box(7805, 7805), Box(7805, 7805)), - Box(Box(7806, 7806), Box(7806, 7806)), - Box(Box(7807, 7807), Box(7807, 7807)), - Box(Box(7808, 7808), Box(7808, 7808)), - Box(Box(7809, 7809), Box(7809, 7809)), - Box(Box(7810, 7810), Box(7810, 7810)), - Box(Box(7811, 7811), Box(7811, 7811)), - Box(Box(7812, 7812), Box(7812, 7812)), - Box(Box(7813, 7813), Box(7813, 7813)), - Box(Box(7814, 7814), Box(7814, 7814)), - Box(Box(7815, 7815), Box(7815, 7815)), - Box(Box(7816, 7816), Box(7816, 7816)), - Box(Box(7817, 7817), Box(7817, 7817)), - Box(Box(7818, 7818), Box(7818, 7818)), - Box(Box(7819, 7819), Box(7819, 7819)), - Box(Box(7820, 7820), Box(7820, 7820)), - Box(Box(7821, 7821), Box(7821, 7821)), - Box(Box(7822, 7822), Box(7822, 7822)), - Box(Box(7823, 7823), Box(7823, 7823)), - Box(Box(7824, 7824), Box(7824, 7824)), - Box(Box(7825, 7825), Box(7825, 7825)), - Box(Box(7826, 7826), Box(7826, 7826)), - Box(Box(7827, 7827), Box(7827, 7827)), - Box(Box(7828, 7828), Box(7828, 7828)), - Box(Box(7829, 7829), Box(7829, 7829)), - Box(Box(7830, 7830), Box(7830, 7830)), - Box(Box(7831, 7831), Box(7831, 7831)), - Box(Box(7832, 7832), Box(7832, 7832)), - Box(Box(7833, 7833), Box(7833, 7833)), - Box(Box(7834, 7834), Box(7834, 7834)), - Box(Box(7835, 7835), Box(7835, 7835)), - Box(Box(7836, 7836), Box(7836, 7836)), - Box(Box(7837, 7837), Box(7837, 7837)), - Box(Box(7838, 7838), Box(7838, 7838)), - Box(Box(7839, 7839), Box(7839, 7839)), - Box(Box(7840, 7840), Box(7840, 7840)), - Box(Box(7841, 7841), Box(7841, 7841)), - Box(Box(7842, 7842), Box(7842, 7842)), - Box(Box(7843, 7843), Box(7843, 7843)), - Box(Box(7844, 7844), Box(7844, 7844)), - Box(Box(7845, 7845), Box(7845, 7845)), - Box(Box(7846, 7846), Box(7846, 7846)), - Box(Box(7847, 7847), Box(7847, 7847)), - Box(Box(7848, 7848), Box(7848, 7848)), - Box(Box(7849, 7849), Box(7849, 7849)), - Box(Box(7850, 7850), Box(7850, 7850)), - Box(Box(7851, 7851), Box(7851, 7851)), - Box(Box(7852, 7852), Box(7852, 7852)), - Box(Box(7853, 7853), Box(7853, 7853)), - Box(Box(7854, 7854), Box(7854, 7854)), - Box(Box(7855, 7855), Box(7855, 7855)), - Box(Box(7856, 7856), Box(7856, 7856)), - Box(Box(7857, 7857), Box(7857, 7857)), - Box(Box(7858, 7858), Box(7858, 7858)), - Box(Box(7859, 7859), Box(7859, 7859)), - Box(Box(7860, 7860), Box(7860, 7860)), - Box(Box(7861, 7861), Box(7861, 7861)), - Box(Box(7862, 7862), Box(7862, 7862)), - Box(Box(7863, 7863), Box(7863, 7863)), - Box(Box(7864, 7864), Box(7864, 7864)), - Box(Box(7865, 7865), Box(7865, 7865)), - Box(Box(7866, 7866), Box(7866, 7866)), - Box(Box(7867, 7867), Box(7867, 7867)), - Box(Box(7868, 7868), Box(7868, 7868)), - Box(Box(7869, 7869), Box(7869, 7869)), - Box(Box(7870, 7870), Box(7870, 7870)), - Box(Box(7871, 7871), Box(7871, 7871)), - Box(Box(7872, 7872), Box(7872, 7872)), - Box(Box(7873, 7873), Box(7873, 7873)), - Box(Box(7874, 7874), Box(7874, 7874)), - Box(Box(7875, 7875), Box(7875, 7875)), - Box(Box(7876, 7876), Box(7876, 7876)), - Box(Box(7877, 7877), Box(7877, 7877)), - Box(Box(7878, 7878), Box(7878, 7878)), - Box(Box(7879, 7879), Box(7879, 7879)), - Box(Box(7880, 7880), Box(7880, 7880)), - Box(Box(7881, 7881), Box(7881, 7881)), - Box(Box(7882, 7882), Box(7882, 7882)), - Box(Box(7883, 7883), Box(7883, 7883)), - Box(Box(7884, 7884), Box(7884, 7884)), - Box(Box(7885, 7885), Box(7885, 7885)), - Box(Box(7886, 7886), Box(7886, 7886)), - Box(Box(7887, 7887), Box(7887, 7887)), - Box(Box(7888, 7888), Box(7888, 7888)), - Box(Box(7889, 7889), Box(7889, 7889)), - Box(Box(7890, 7890), Box(7890, 7890)), - Box(Box(7891, 7891), Box(7891, 7891)), - Box(Box(7892, 7892), Box(7892, 7892)), - Box(Box(7893, 7893), Box(7893, 7893)), - Box(Box(7894, 7894), Box(7894, 7894)), - Box(Box(7895, 7895), Box(7895, 7895)), - Box(Box(7896, 7896), Box(7896, 7896)), - Box(Box(7897, 7897), Box(7897, 7897)), - Box(Box(7898, 7898), Box(7898, 7898)), - Box(Box(7899, 7899), Box(7899, 7899)), - Box(Box(7900, 7900), Box(7900, 7900)), - Box(Box(7901, 7901), Box(7901, 7901)), - Box(Box(7902, 7902), Box(7902, 7902)), - Box(Box(7903, 7903), Box(7903, 7903)), - Box(Box(7904, 7904), Box(7904, 7904)), - Box(Box(7905, 7905), Box(7905, 7905)), - Box(Box(7906, 7906), Box(7906, 7906)), - Box(Box(7907, 7907), Box(7907, 7907)), - Box(Box(7908, 7908), Box(7908, 7908)), - Box(Box(7909, 7909), Box(7909, 7909)), - Box(Box(7910, 7910), Box(7910, 7910)), - Box(Box(7911, 7911), Box(7911, 7911)), - Box(Box(7912, 7912), Box(7912, 7912)), - Box(Box(7913, 7913), Box(7913, 7913)), - Box(Box(7914, 7914), Box(7914, 7914)), - Box(Box(7915, 7915), Box(7915, 7915)), - Box(Box(7916, 7916), Box(7916, 7916)), - Box(Box(7917, 7917), Box(7917, 7917)), - Box(Box(7918, 7918), Box(7918, 7918)), - Box(Box(7919, 7919), Box(7919, 7919)), - Box(Box(7920, 7920), Box(7920, 7920)), - Box(Box(7921, 7921), Box(7921, 7921)), - Box(Box(7922, 7922), Box(7922, 7922)), - Box(Box(7923, 7923), Box(7923, 7923)), - Box(Box(7924, 7924), Box(7924, 7924)), - Box(Box(7925, 7925), Box(7925, 7925)), - Box(Box(7926, 7926), Box(7926, 7926)), - Box(Box(7927, 7927), Box(7927, 7927)), - Box(Box(7928, 7928), Box(7928, 7928)), - Box(Box(7929, 7929), Box(7929, 7929)), - Box(Box(7930, 7930), Box(7930, 7930)), - Box(Box(7931, 7931), Box(7931, 7931)), - Box(Box(7932, 7932), Box(7932, 7932)), - Box(Box(7933, 7933), Box(7933, 7933)), - Box(Box(7934, 7934), Box(7934, 7934)), - Box(Box(7935, 7935), Box(7935, 7935)), - Box(Box(7936, 7936), Box(7936, 7936)), - Box(Box(7937, 7937), Box(7937, 7937)), - Box(Box(7938, 7938), Box(7938, 7938)), - Box(Box(7939, 7939), Box(7939, 7939)), - Box(Box(7940, 7940), Box(7940, 7940)), - Box(Box(7941, 7941), Box(7941, 7941)), - Box(Box(7942, 7942), Box(7942, 7942)), - Box(Box(7943, 7943), Box(7943, 7943)), - Box(Box(7944, 7944), Box(7944, 7944)), - Box(Box(7945, 7945), Box(7945, 7945)), - Box(Box(7946, 7946), Box(7946, 7946)), - Box(Box(7947, 7947), Box(7947, 7947)), - Box(Box(7948, 7948), Box(7948, 7948)), - Box(Box(7949, 7949), Box(7949, 7949)), - Box(Box(7950, 7950), Box(7950, 7950)), - Box(Box(7951, 7951), Box(7951, 7951)), - Box(Box(7952, 7952), Box(7952, 7952)), - Box(Box(7953, 7953), Box(7953, 7953)), - Box(Box(7954, 7954), Box(7954, 7954)), - Box(Box(7955, 7955), Box(7955, 7955)), - Box(Box(7956, 7956), Box(7956, 7956)), - Box(Box(7957, 7957), Box(7957, 7957)), - Box(Box(7958, 7958), Box(7958, 7958)), - Box(Box(7959, 7959), Box(7959, 7959)), - Box(Box(7960, 7960), Box(7960, 7960)), - Box(Box(7961, 7961), Box(7961, 7961)), - Box(Box(7962, 7962), Box(7962, 7962)), - Box(Box(7963, 7963), Box(7963, 7963)), - Box(Box(7964, 7964), Box(7964, 7964)), - Box(Box(7965, 7965), Box(7965, 7965)), - Box(Box(7966, 7966), Box(7966, 7966)), - Box(Box(7967, 7967), Box(7967, 7967)), - Box(Box(7968, 7968), Box(7968, 7968)), - Box(Box(7969, 7969), Box(7969, 7969)), - Box(Box(7970, 7970), Box(7970, 7970)), - Box(Box(7971, 7971), Box(7971, 7971)), - Box(Box(7972, 7972), Box(7972, 7972)), - Box(Box(7973, 7973), Box(7973, 7973)), - Box(Box(7974, 7974), Box(7974, 7974)), - Box(Box(7975, 7975), Box(7975, 7975)), - Box(Box(7976, 7976), Box(7976, 7976)), - Box(Box(7977, 7977), Box(7977, 7977)), - Box(Box(7978, 7978), Box(7978, 7978)), - Box(Box(7979, 7979), Box(7979, 7979)), - Box(Box(7980, 7980), Box(7980, 7980)), - Box(Box(7981, 7981), Box(7981, 7981)), - Box(Box(7982, 7982), Box(7982, 7982)), - Box(Box(7983, 7983), Box(7983, 7983)), - Box(Box(7984, 7984), Box(7984, 7984)), - Box(Box(7985, 7985), Box(7985, 7985)), - Box(Box(7986, 7986), Box(7986, 7986)), - Box(Box(7987, 7987), Box(7987, 7987)), - Box(Box(7988, 7988), Box(7988, 7988)), - Box(Box(7989, 7989), Box(7989, 7989)), - Box(Box(7990, 7990), Box(7990, 7990)), - Box(Box(7991, 7991), Box(7991, 7991)), - Box(Box(7992, 7992), Box(7992, 7992)), - Box(Box(7993, 7993), Box(7993, 7993)), - Box(Box(7994, 7994), Box(7994, 7994)), - Box(Box(7995, 7995), Box(7995, 7995)), - Box(Box(7996, 7996), Box(7996, 7996)), - Box(Box(7997, 7997), Box(7997, 7997)), - Box(Box(7998, 7998), Box(7998, 7998)), - Box(Box(7999, 7999), Box(7999, 7999)), - Box(Box(8000, 8000), Box(8000, 8000)), - Box(Box(8001, 8001), Box(8001, 8001)), - Box(Box(8002, 8002), Box(8002, 8002)), - Box(Box(8003, 8003), Box(8003, 8003)), - Box(Box(8004, 8004), Box(8004, 8004)), - Box(Box(8005, 8005), Box(8005, 8005)), - Box(Box(8006, 8006), Box(8006, 8006)), - Box(Box(8007, 8007), Box(8007, 8007)), - Box(Box(8008, 8008), Box(8008, 8008)), - Box(Box(8009, 8009), Box(8009, 8009)), - Box(Box(8010, 8010), Box(8010, 8010)), - Box(Box(8011, 8011), Box(8011, 8011)), - Box(Box(8012, 8012), Box(8012, 8012)), - Box(Box(8013, 8013), Box(8013, 8013)), - Box(Box(8014, 8014), Box(8014, 8014)), - Box(Box(8015, 8015), Box(8015, 8015)), - Box(Box(8016, 8016), Box(8016, 8016)), - Box(Box(8017, 8017), Box(8017, 8017)), - Box(Box(8018, 8018), Box(8018, 8018)), - Box(Box(8019, 8019), Box(8019, 8019)), - Box(Box(8020, 8020), Box(8020, 8020)), - Box(Box(8021, 8021), Box(8021, 8021)), - Box(Box(8022, 8022), Box(8022, 8022)), - Box(Box(8023, 8023), Box(8023, 8023)), - Box(Box(8024, 8024), Box(8024, 8024)), - Box(Box(8025, 8025), Box(8025, 8025)), - Box(Box(8026, 8026), Box(8026, 8026)), - Box(Box(8027, 8027), Box(8027, 8027)), - Box(Box(8028, 8028), Box(8028, 8028)), - Box(Box(8029, 8029), Box(8029, 8029)), - Box(Box(8030, 8030), Box(8030, 8030)), - Box(Box(8031, 8031), Box(8031, 8031)), - Box(Box(8032, 8032), Box(8032, 8032)), - Box(Box(8033, 8033), Box(8033, 8033)), - Box(Box(8034, 8034), Box(8034, 8034)), - Box(Box(8035, 8035), Box(8035, 8035)), - Box(Box(8036, 8036), Box(8036, 8036)), - Box(Box(8037, 8037), Box(8037, 8037)), - Box(Box(8038, 8038), Box(8038, 8038)), - Box(Box(8039, 8039), Box(8039, 8039)), - Box(Box(8040, 8040), Box(8040, 8040)), - Box(Box(8041, 8041), Box(8041, 8041)), - Box(Box(8042, 8042), Box(8042, 8042)), - Box(Box(8043, 8043), Box(8043, 8043)), - Box(Box(8044, 8044), Box(8044, 8044)), - Box(Box(8045, 8045), Box(8045, 8045)), - Box(Box(8046, 8046), Box(8046, 8046)), - Box(Box(8047, 8047), Box(8047, 8047)), - Box(Box(8048, 8048), Box(8048, 8048)), - Box(Box(8049, 8049), Box(8049, 8049)), - Box(Box(8050, 8050), Box(8050, 8050)), - Box(Box(8051, 8051), Box(8051, 8051)), - Box(Box(8052, 8052), Box(8052, 8052)), - Box(Box(8053, 8053), Box(8053, 8053)), - Box(Box(8054, 8054), Box(8054, 8054)), - Box(Box(8055, 8055), Box(8055, 8055)), - Box(Box(8056, 8056), Box(8056, 8056)), - Box(Box(8057, 8057), Box(8057, 8057)), - Box(Box(8058, 8058), Box(8058, 8058)), - Box(Box(8059, 8059), Box(8059, 8059)), - Box(Box(8060, 8060), Box(8060, 8060)), - Box(Box(8061, 8061), Box(8061, 8061)), - Box(Box(8062, 8062), Box(8062, 8062)), - Box(Box(8063, 8063), Box(8063, 8063)), - Box(Box(8064, 8064), Box(8064, 8064)), - Box(Box(8065, 8065), Box(8065, 8065)), - Box(Box(8066, 8066), Box(8066, 8066)), - Box(Box(8067, 8067), Box(8067, 8067)), - Box(Box(8068, 8068), Box(8068, 8068)), - Box(Box(8069, 8069), Box(8069, 8069)), - Box(Box(8070, 8070), Box(8070, 8070)), - Box(Box(8071, 8071), Box(8071, 8071)), - Box(Box(8072, 8072), Box(8072, 8072)), - Box(Box(8073, 8073), Box(8073, 8073)), - Box(Box(8074, 8074), Box(8074, 8074)), - Box(Box(8075, 8075), Box(8075, 8075)), - Box(Box(8076, 8076), Box(8076, 8076)), - Box(Box(8077, 8077), Box(8077, 8077)), - Box(Box(8078, 8078), Box(8078, 8078)), - Box(Box(8079, 8079), Box(8079, 8079)), - Box(Box(8080, 8080), Box(8080, 8080)), - Box(Box(8081, 8081), Box(8081, 8081)), - Box(Box(8082, 8082), Box(8082, 8082)), - Box(Box(8083, 8083), Box(8083, 8083)), - Box(Box(8084, 8084), Box(8084, 8084)), - Box(Box(8085, 8085), Box(8085, 8085)), - Box(Box(8086, 8086), Box(8086, 8086)), - Box(Box(8087, 8087), Box(8087, 8087)), - Box(Box(8088, 8088), Box(8088, 8088)), - Box(Box(8089, 8089), Box(8089, 8089)), - Box(Box(8090, 8090), Box(8090, 8090)), - Box(Box(8091, 8091), Box(8091, 8091)), - Box(Box(8092, 8092), Box(8092, 8092)), - Box(Box(8093, 8093), Box(8093, 8093)), - Box(Box(8094, 8094), Box(8094, 8094)), - Box(Box(8095, 8095), Box(8095, 8095)), - Box(Box(8096, 8096), Box(8096, 8096)), - Box(Box(8097, 8097), Box(8097, 8097)), - Box(Box(8098, 8098), Box(8098, 8098)), - Box(Box(8099, 8099), Box(8099, 8099)), - Box(Box(8100, 8100), Box(8100, 8100)), - Box(Box(8101, 8101), Box(8101, 8101)), - Box(Box(8102, 8102), Box(8102, 8102)), - Box(Box(8103, 8103), Box(8103, 8103)), - Box(Box(8104, 8104), Box(8104, 8104)), - Box(Box(8105, 8105), Box(8105, 8105)), - Box(Box(8106, 8106), Box(8106, 8106)), - Box(Box(8107, 8107), Box(8107, 8107)), - Box(Box(8108, 8108), Box(8108, 8108)), - Box(Box(8109, 8109), Box(8109, 8109)), - Box(Box(8110, 8110), Box(8110, 8110)), - Box(Box(8111, 8111), Box(8111, 8111)), - Box(Box(8112, 8112), Box(8112, 8112)), - Box(Box(8113, 8113), Box(8113, 8113)), - Box(Box(8114, 8114), Box(8114, 8114)), - Box(Box(8115, 8115), Box(8115, 8115)), - Box(Box(8116, 8116), Box(8116, 8116)), - Box(Box(8117, 8117), Box(8117, 8117)), - Box(Box(8118, 8118), Box(8118, 8118)), - Box(Box(8119, 8119), Box(8119, 8119)), - Box(Box(8120, 8120), Box(8120, 8120)), - Box(Box(8121, 8121), Box(8121, 8121)), - Box(Box(8122, 8122), Box(8122, 8122)), - Box(Box(8123, 8123), Box(8123, 8123)), - Box(Box(8124, 8124), Box(8124, 8124)), - Box(Box(8125, 8125), Box(8125, 8125)), - Box(Box(8126, 8126), Box(8126, 8126)), - Box(Box(8127, 8127), Box(8127, 8127)), - Box(Box(8128, 8128), Box(8128, 8128)), - Box(Box(8129, 8129), Box(8129, 8129)), - Box(Box(8130, 8130), Box(8130, 8130)), - Box(Box(8131, 8131), Box(8131, 8131)), - Box(Box(8132, 8132), Box(8132, 8132)), - Box(Box(8133, 8133), Box(8133, 8133)), - Box(Box(8134, 8134), Box(8134, 8134)), - Box(Box(8135, 8135), Box(8135, 8135)), - Box(Box(8136, 8136), Box(8136, 8136)), - Box(Box(8137, 8137), Box(8137, 8137)), - Box(Box(8138, 8138), Box(8138, 8138)), - Box(Box(8139, 8139), Box(8139, 8139)), - Box(Box(8140, 8140), Box(8140, 8140)), - Box(Box(8141, 8141), Box(8141, 8141)), - Box(Box(8142, 8142), Box(8142, 8142)), - Box(Box(8143, 8143), Box(8143, 8143)), - Box(Box(8144, 8144), Box(8144, 8144)), - Box(Box(8145, 8145), Box(8145, 8145)), - Box(Box(8146, 8146), Box(8146, 8146)), - Box(Box(8147, 8147), Box(8147, 8147)), - Box(Box(8148, 8148), Box(8148, 8148)), - Box(Box(8149, 8149), Box(8149, 8149)), - Box(Box(8150, 8150), Box(8150, 8150)), - Box(Box(8151, 8151), Box(8151, 8151)), - Box(Box(8152, 8152), Box(8152, 8152)), - Box(Box(8153, 8153), Box(8153, 8153)), - Box(Box(8154, 8154), Box(8154, 8154)), - Box(Box(8155, 8155), Box(8155, 8155)), - Box(Box(8156, 8156), Box(8156, 8156)), - Box(Box(8157, 8157), Box(8157, 8157)), - Box(Box(8158, 8158), Box(8158, 8158)), - Box(Box(8159, 8159), Box(8159, 8159)), - Box(Box(8160, 8160), Box(8160, 8160)), - Box(Box(8161, 8161), Box(8161, 8161)), - Box(Box(8162, 8162), Box(8162, 8162)), - Box(Box(8163, 8163), Box(8163, 8163)), - Box(Box(8164, 8164), Box(8164, 8164)), - Box(Box(8165, 8165), Box(8165, 8165)), - Box(Box(8166, 8166), Box(8166, 8166)), - Box(Box(8167, 8167), Box(8167, 8167)), - Box(Box(8168, 8168), Box(8168, 8168)), - Box(Box(8169, 8169), Box(8169, 8169)), - Box(Box(8170, 8170), Box(8170, 8170)), - Box(Box(8171, 8171), Box(8171, 8171)), - Box(Box(8172, 8172), Box(8172, 8172)), - Box(Box(8173, 8173), Box(8173, 8173)), - Box(Box(8174, 8174), Box(8174, 8174)), - Box(Box(8175, 8175), Box(8175, 8175)), - Box(Box(8176, 8176), Box(8176, 8176)), - Box(Box(8177, 8177), Box(8177, 8177)), - Box(Box(8178, 8178), Box(8178, 8178)), - Box(Box(8179, 8179), Box(8179, 8179)), - Box(Box(8180, 8180), Box(8180, 8180)), - Box(Box(8181, 8181), Box(8181, 8181)), - Box(Box(8182, 8182), Box(8182, 8182)), - Box(Box(8183, 8183), Box(8183, 8183)), - Box(Box(8184, 8184), Box(8184, 8184)), - Box(Box(8185, 8185), Box(8185, 8185)), - Box(Box(8186, 8186), Box(8186, 8186)), - Box(Box(8187, 8187), Box(8187, 8187)), - Box(Box(8188, 8188), Box(8188, 8188)), - Box(Box(8189, 8189), Box(8189, 8189)), - Box(Box(8190, 8190), Box(8190, 8190)), - Box(Box(8191, 8191), Box(8191, 8191)), - Box(Box(8192, 8192), Box(8192, 8192)), - Box(Box(8193, 8193), Box(8193, 8193)), - Box(Box(8194, 8194), Box(8194, 8194)), - Box(Box(8195, 8195), Box(8195, 8195)), - Box(Box(8196, 8196), Box(8196, 8196)), - Box(Box(8197, 8197), Box(8197, 8197)), - Box(Box(8198, 8198), Box(8198, 8198)), - Box(Box(8199, 8199), Box(8199, 8199)), - Box(Box(8200, 8200), Box(8200, 8200)), - Box(Box(8201, 8201), Box(8201, 8201)), - Box(Box(8202, 8202), Box(8202, 8202)), - Box(Box(8203, 8203), Box(8203, 8203)), - Box(Box(8204, 8204), Box(8204, 8204)), - Box(Box(8205, 8205), Box(8205, 8205)), - Box(Box(8206, 8206), Box(8206, 8206)), - Box(Box(8207, 8207), Box(8207, 8207)), - Box(Box(8208, 8208), Box(8208, 8208)), - Box(Box(8209, 8209), Box(8209, 8209)), - Box(Box(8210, 8210), Box(8210, 8210)), - Box(Box(8211, 8211), Box(8211, 8211)), - Box(Box(8212, 8212), Box(8212, 8212)), - Box(Box(8213, 8213), Box(8213, 8213)), - Box(Box(8214, 8214), Box(8214, 8214)), - Box(Box(8215, 8215), Box(8215, 8215)), - Box(Box(8216, 8216), Box(8216, 8216)), - Box(Box(8217, 8217), Box(8217, 8217)), - Box(Box(8218, 8218), Box(8218, 8218)), - Box(Box(8219, 8219), Box(8219, 8219)), - Box(Box(8220, 8220), Box(8220, 8220)), - Box(Box(8221, 8221), Box(8221, 8221)), - Box(Box(8222, 8222), Box(8222, 8222)), - Box(Box(8223, 8223), Box(8223, 8223)), - Box(Box(8224, 8224), Box(8224, 8224)), - Box(Box(8225, 8225), Box(8225, 8225)), - Box(Box(8226, 8226), Box(8226, 8226)), - Box(Box(8227, 8227), Box(8227, 8227)), - Box(Box(8228, 8228), Box(8228, 8228)), - Box(Box(8229, 8229), Box(8229, 8229)), - Box(Box(8230, 8230), Box(8230, 8230)), - Box(Box(8231, 8231), Box(8231, 8231)), - Box(Box(8232, 8232), Box(8232, 8232)), - Box(Box(8233, 8233), Box(8233, 8233)), - Box(Box(8234, 8234), Box(8234, 8234)), - Box(Box(8235, 8235), Box(8235, 8235)), - Box(Box(8236, 8236), Box(8236, 8236)), - Box(Box(8237, 8237), Box(8237, 8237)), - Box(Box(8238, 8238), Box(8238, 8238)), - Box(Box(8239, 8239), Box(8239, 8239)), - Box(Box(8240, 8240), Box(8240, 8240)), - Box(Box(8241, 8241), Box(8241, 8241)), - Box(Box(8242, 8242), Box(8242, 8242)), - Box(Box(8243, 8243), Box(8243, 8243)), - Box(Box(8244, 8244), Box(8244, 8244)), - Box(Box(8245, 8245), Box(8245, 8245)), - Box(Box(8246, 8246), Box(8246, 8246)), - Box(Box(8247, 8247), Box(8247, 8247)), - Box(Box(8248, 8248), Box(8248, 8248)), - Box(Box(8249, 8249), Box(8249, 8249)), - Box(Box(8250, 8250), Box(8250, 8250)), - Box(Box(8251, 8251), Box(8251, 8251)), - Box(Box(8252, 8252), Box(8252, 8252)), - Box(Box(8253, 8253), Box(8253, 8253)), - Box(Box(8254, 8254), Box(8254, 8254)), - Box(Box(8255, 8255), Box(8255, 8255)), - Box(Box(8256, 8256), Box(8256, 8256)), - Box(Box(8257, 8257), Box(8257, 8257)), - Box(Box(8258, 8258), Box(8258, 8258)), - Box(Box(8259, 8259), Box(8259, 8259)), - Box(Box(8260, 8260), Box(8260, 8260)), - Box(Box(8261, 8261), Box(8261, 8261)), - Box(Box(8262, 8262), Box(8262, 8262)), - Box(Box(8263, 8263), Box(8263, 8263)), - Box(Box(8264, 8264), Box(8264, 8264)), - Box(Box(8265, 8265), Box(8265, 8265)), - Box(Box(8266, 8266), Box(8266, 8266)), - Box(Box(8267, 8267), Box(8267, 8267)), - Box(Box(8268, 8268), Box(8268, 8268)), - Box(Box(8269, 8269), Box(8269, 8269)), - Box(Box(8270, 8270), Box(8270, 8270)), - Box(Box(8271, 8271), Box(8271, 8271)), - Box(Box(8272, 8272), Box(8272, 8272)), - Box(Box(8273, 8273), Box(8273, 8273)), - Box(Box(8274, 8274), Box(8274, 8274)), - Box(Box(8275, 8275), Box(8275, 8275)), - Box(Box(8276, 8276), Box(8276, 8276)), - Box(Box(8277, 8277), Box(8277, 8277)), - Box(Box(8278, 8278), Box(8278, 8278)), - Box(Box(8279, 8279), Box(8279, 8279)), - Box(Box(8280, 8280), Box(8280, 8280)), - Box(Box(8281, 8281), Box(8281, 8281)), - Box(Box(8282, 8282), Box(8282, 8282)), - Box(Box(8283, 8283), Box(8283, 8283)), - Box(Box(8284, 8284), Box(8284, 8284)), - Box(Box(8285, 8285), Box(8285, 8285)), - Box(Box(8286, 8286), Box(8286, 8286)), - Box(Box(8287, 8287), Box(8287, 8287)), - Box(Box(8288, 8288), Box(8288, 8288)), - Box(Box(8289, 8289), Box(8289, 8289)), - Box(Box(8290, 8290), Box(8290, 8290)), - Box(Box(8291, 8291), Box(8291, 8291)), - Box(Box(8292, 8292), Box(8292, 8292)), - Box(Box(8293, 8293), Box(8293, 8293)), - Box(Box(8294, 8294), Box(8294, 8294)), - Box(Box(8295, 8295), Box(8295, 8295)), - Box(Box(8296, 8296), Box(8296, 8296)), - Box(Box(8297, 8297), Box(8297, 8297)), - Box(Box(8298, 8298), Box(8298, 8298)), - Box(Box(8299, 8299), Box(8299, 8299)), - Box(Box(8300, 8300), Box(8300, 8300)), - Box(Box(8301, 8301), Box(8301, 8301)), - Box(Box(8302, 8302), Box(8302, 8302)), - Box(Box(8303, 8303), Box(8303, 8303)), - Box(Box(8304, 8304), Box(8304, 8304)), - Box(Box(8305, 8305), Box(8305, 8305)), - Box(Box(8306, 8306), Box(8306, 8306)), - Box(Box(8307, 8307), Box(8307, 8307)), - Box(Box(8308, 8308), Box(8308, 8308)), - Box(Box(8309, 8309), Box(8309, 8309)), - Box(Box(8310, 8310), Box(8310, 8310)), - Box(Box(8311, 8311), Box(8311, 8311)), - Box(Box(8312, 8312), Box(8312, 8312)), - Box(Box(8313, 8313), Box(8313, 8313)), - Box(Box(8314, 8314), Box(8314, 8314)), - Box(Box(8315, 8315), Box(8315, 8315)), - Box(Box(8316, 8316), Box(8316, 8316)), - Box(Box(8317, 8317), Box(8317, 8317)), - Box(Box(8318, 8318), Box(8318, 8318)), - Box(Box(8319, 8319), Box(8319, 8319)), - Box(Box(8320, 8320), Box(8320, 8320)), - Box(Box(8321, 8321), Box(8321, 8321)), - Box(Box(8322, 8322), Box(8322, 8322)), - Box(Box(8323, 8323), Box(8323, 8323)), - Box(Box(8324, 8324), Box(8324, 8324)), - Box(Box(8325, 8325), Box(8325, 8325)), - Box(Box(8326, 8326), Box(8326, 8326)), - Box(Box(8327, 8327), Box(8327, 8327)), - Box(Box(8328, 8328), Box(8328, 8328)), - Box(Box(8329, 8329), Box(8329, 8329)), - Box(Box(8330, 8330), Box(8330, 8330)), - Box(Box(8331, 8331), Box(8331, 8331)), - Box(Box(8332, 8332), Box(8332, 8332)), - Box(Box(8333, 8333), Box(8333, 8333)), - Box(Box(8334, 8334), Box(8334, 8334)), - Box(Box(8335, 8335), Box(8335, 8335)), - Box(Box(8336, 8336), Box(8336, 8336)), - Box(Box(8337, 8337), Box(8337, 8337)), - Box(Box(8338, 8338), Box(8338, 8338)), - Box(Box(8339, 8339), Box(8339, 8339)), - Box(Box(8340, 8340), Box(8340, 8340)), - Box(Box(8341, 8341), Box(8341, 8341)), - Box(Box(8342, 8342), Box(8342, 8342)), - Box(Box(8343, 8343), Box(8343, 8343)), - Box(Box(8344, 8344), Box(8344, 8344)), - Box(Box(8345, 8345), Box(8345, 8345)), - Box(Box(8346, 8346), Box(8346, 8346)), - Box(Box(8347, 8347), Box(8347, 8347)), - Box(Box(8348, 8348), Box(8348, 8348)), - Box(Box(8349, 8349), Box(8349, 8349)), - Box(Box(8350, 8350), Box(8350, 8350)), - Box(Box(8351, 8351), Box(8351, 8351)), - Box(Box(8352, 8352), Box(8352, 8352)), - Box(Box(8353, 8353), Box(8353, 8353)), - Box(Box(8354, 8354), Box(8354, 8354)), - Box(Box(8355, 8355), Box(8355, 8355)), - Box(Box(8356, 8356), Box(8356, 8356)), - Box(Box(8357, 8357), Box(8357, 8357)), - Box(Box(8358, 8358), Box(8358, 8358)), - Box(Box(8359, 8359), Box(8359, 8359)), - Box(Box(8360, 8360), Box(8360, 8360)), - Box(Box(8361, 8361), Box(8361, 8361)), - Box(Box(8362, 8362), Box(8362, 8362)), - Box(Box(8363, 8363), Box(8363, 8363)), - Box(Box(8364, 8364), Box(8364, 8364)), - Box(Box(8365, 8365), Box(8365, 8365)), - Box(Box(8366, 8366), Box(8366, 8366)), - Box(Box(8367, 8367), Box(8367, 8367)), - Box(Box(8368, 8368), Box(8368, 8368)), - Box(Box(8369, 8369), Box(8369, 8369)), - Box(Box(8370, 8370), Box(8370, 8370)), - Box(Box(8371, 8371), Box(8371, 8371)), - Box(Box(8372, 8372), Box(8372, 8372)), - Box(Box(8373, 8373), Box(8373, 8373)), - Box(Box(8374, 8374), Box(8374, 8374)), - Box(Box(8375, 8375), Box(8375, 8375)), - Box(Box(8376, 8376), Box(8376, 8376)), - Box(Box(8377, 8377), Box(8377, 8377)), - Box(Box(8378, 8378), Box(8378, 8378)), - Box(Box(8379, 8379), Box(8379, 8379)), - Box(Box(8380, 8380), Box(8380, 8380)), - Box(Box(8381, 8381), Box(8381, 8381)), - Box(Box(8382, 8382), Box(8382, 8382)), - Box(Box(8383, 8383), Box(8383, 8383)), - Box(Box(8384, 8384), Box(8384, 8384)), - Box(Box(8385, 8385), Box(8385, 8385)), - Box(Box(8386, 8386), Box(8386, 8386)), - Box(Box(8387, 8387), Box(8387, 8387)), - Box(Box(8388, 8388), Box(8388, 8388)), - Box(Box(8389, 8389), Box(8389, 8389)), - Box(Box(8390, 8390), Box(8390, 8390)), - Box(Box(8391, 8391), Box(8391, 8391)), - Box(Box(8392, 8392), Box(8392, 8392)), - Box(Box(8393, 8393), Box(8393, 8393)), - Box(Box(8394, 8394), Box(8394, 8394)), - Box(Box(8395, 8395), Box(8395, 8395)), - Box(Box(8396, 8396), Box(8396, 8396)), - Box(Box(8397, 8397), Box(8397, 8397)), - Box(Box(8398, 8398), Box(8398, 8398)), - Box(Box(8399, 8399), Box(8399, 8399)), - Box(Box(8400, 8400), Box(8400, 8400)), - Box(Box(8401, 8401), Box(8401, 8401)), - Box(Box(8402, 8402), Box(8402, 8402)), - Box(Box(8403, 8403), Box(8403, 8403)), - Box(Box(8404, 8404), Box(8404, 8404)), - Box(Box(8405, 8405), Box(8405, 8405)), - Box(Box(8406, 8406), Box(8406, 8406)), - Box(Box(8407, 8407), Box(8407, 8407)), - Box(Box(8408, 8408), Box(8408, 8408)), - Box(Box(8409, 8409), Box(8409, 8409)), - Box(Box(8410, 8410), Box(8410, 8410)), - Box(Box(8411, 8411), Box(8411, 8411)), - Box(Box(8412, 8412), Box(8412, 8412)), - Box(Box(8413, 8413), Box(8413, 8413)), - Box(Box(8414, 8414), Box(8414, 8414)), - Box(Box(8415, 8415), Box(8415, 8415)), - Box(Box(8416, 8416), Box(8416, 8416)), - Box(Box(8417, 8417), Box(8417, 8417)), - Box(Box(8418, 8418), Box(8418, 8418)), - Box(Box(8419, 8419), Box(8419, 8419)), - Box(Box(8420, 8420), Box(8420, 8420)), - Box(Box(8421, 8421), Box(8421, 8421)), - Box(Box(8422, 8422), Box(8422, 8422)), - Box(Box(8423, 8423), Box(8423, 8423)), - Box(Box(8424, 8424), Box(8424, 8424)), - Box(Box(8425, 8425), Box(8425, 8425)), - Box(Box(8426, 8426), Box(8426, 8426)), - Box(Box(8427, 8427), Box(8427, 8427)), - Box(Box(8428, 8428), Box(8428, 8428)), - Box(Box(8429, 8429), Box(8429, 8429)), - Box(Box(8430, 8430), Box(8430, 8430)), - Box(Box(8431, 8431), Box(8431, 8431)), - Box(Box(8432, 8432), Box(8432, 8432)), - Box(Box(8433, 8433), Box(8433, 8433)), - Box(Box(8434, 8434), Box(8434, 8434)), - Box(Box(8435, 8435), Box(8435, 8435)), - Box(Box(8436, 8436), Box(8436, 8436)), - Box(Box(8437, 8437), Box(8437, 8437)), - Box(Box(8438, 8438), Box(8438, 8438)), - Box(Box(8439, 8439), Box(8439, 8439)), - Box(Box(8440, 8440), Box(8440, 8440)), - Box(Box(8441, 8441), Box(8441, 8441)), - Box(Box(8442, 8442), Box(8442, 8442)), - Box(Box(8443, 8443), Box(8443, 8443)), - Box(Box(8444, 8444), Box(8444, 8444)), - Box(Box(8445, 8445), Box(8445, 8445)), - Box(Box(8446, 8446), Box(8446, 8446)), - Box(Box(8447, 8447), Box(8447, 8447)), - Box(Box(8448, 8448), Box(8448, 8448)), - Box(Box(8449, 8449), Box(8449, 8449)), - Box(Box(8450, 8450), Box(8450, 8450)), - Box(Box(8451, 8451), Box(8451, 8451)), - Box(Box(8452, 8452), Box(8452, 8452)), - Box(Box(8453, 8453), Box(8453, 8453)), - Box(Box(8454, 8454), Box(8454, 8454)), - Box(Box(8455, 8455), Box(8455, 8455)), - Box(Box(8456, 8456), Box(8456, 8456)), - Box(Box(8457, 8457), Box(8457, 8457)), - Box(Box(8458, 8458), Box(8458, 8458)), - Box(Box(8459, 8459), Box(8459, 8459)), - Box(Box(8460, 8460), Box(8460, 8460)), - Box(Box(8461, 8461), Box(8461, 8461)), - Box(Box(8462, 8462), Box(8462, 8462)), - Box(Box(8463, 8463), Box(8463, 8463)), - Box(Box(8464, 8464), Box(8464, 8464)), - Box(Box(8465, 8465), Box(8465, 8465)), - Box(Box(8466, 8466), Box(8466, 8466)), - Box(Box(8467, 8467), Box(8467, 8467)), - Box(Box(8468, 8468), Box(8468, 8468)), - Box(Box(8469, 8469), Box(8469, 8469)), - Box(Box(8470, 8470), Box(8470, 8470)), - Box(Box(8471, 8471), Box(8471, 8471)), - Box(Box(8472, 8472), Box(8472, 8472)), - Box(Box(8473, 8473), Box(8473, 8473)), - Box(Box(8474, 8474), Box(8474, 8474)), - Box(Box(8475, 8475), Box(8475, 8475)), - Box(Box(8476, 8476), Box(8476, 8476)), - Box(Box(8477, 8477), Box(8477, 8477)), - Box(Box(8478, 8478), Box(8478, 8478)), - Box(Box(8479, 8479), Box(8479, 8479)), - Box(Box(8480, 8480), Box(8480, 8480)), - Box(Box(8481, 8481), Box(8481, 8481)), - Box(Box(8482, 8482), Box(8482, 8482)), - Box(Box(8483, 8483), Box(8483, 8483)), - Box(Box(8484, 8484), Box(8484, 8484)), - Box(Box(8485, 8485), Box(8485, 8485)), - Box(Box(8486, 8486), Box(8486, 8486)), - Box(Box(8487, 8487), Box(8487, 8487)), - Box(Box(8488, 8488), Box(8488, 8488)), - Box(Box(8489, 8489), Box(8489, 8489)), - Box(Box(8490, 8490), Box(8490, 8490)), - Box(Box(8491, 8491), Box(8491, 8491)), - Box(Box(8492, 8492), Box(8492, 8492)), - Box(Box(8493, 8493), Box(8493, 8493)), - Box(Box(8494, 8494), Box(8494, 8494)), - Box(Box(8495, 8495), Box(8495, 8495)), - Box(Box(8496, 8496), Box(8496, 8496)), - Box(Box(8497, 8497), Box(8497, 8497)), - Box(Box(8498, 8498), Box(8498, 8498)), - Box(Box(8499, 8499), Box(8499, 8499)), - Box(Box(8500, 8500), Box(8500, 8500)), - Box(Box(8501, 8501), Box(8501, 8501)), - Box(Box(8502, 8502), Box(8502, 8502)), - Box(Box(8503, 8503), Box(8503, 8503)), - Box(Box(8504, 8504), Box(8504, 8504)), - Box(Box(8505, 8505), Box(8505, 8505)), - Box(Box(8506, 8506), Box(8506, 8506)), - Box(Box(8507, 8507), Box(8507, 8507)), - Box(Box(8508, 8508), Box(8508, 8508)), - Box(Box(8509, 8509), Box(8509, 8509)), - Box(Box(8510, 8510), Box(8510, 8510)), - Box(Box(8511, 8511), Box(8511, 8511)), - Box(Box(8512, 8512), Box(8512, 8512)), - Box(Box(8513, 8513), Box(8513, 8513)), - Box(Box(8514, 8514), Box(8514, 8514)), - Box(Box(8515, 8515), Box(8515, 8515)), - Box(Box(8516, 8516), Box(8516, 8516)), - Box(Box(8517, 8517), Box(8517, 8517)), - Box(Box(8518, 8518), Box(8518, 8518)), - Box(Box(8519, 8519), Box(8519, 8519)), - Box(Box(8520, 8520), Box(8520, 8520)), - Box(Box(8521, 8521), Box(8521, 8521)), - Box(Box(8522, 8522), Box(8522, 8522)), - Box(Box(8523, 8523), Box(8523, 8523)), - Box(Box(8524, 8524), Box(8524, 8524)), - Box(Box(8525, 8525), Box(8525, 8525)), - Box(Box(8526, 8526), Box(8526, 8526)), - Box(Box(8527, 8527), Box(8527, 8527)), - Box(Box(8528, 8528), Box(8528, 8528)), - Box(Box(8529, 8529), Box(8529, 8529)), - Box(Box(8530, 8530), Box(8530, 8530)), - Box(Box(8531, 8531), Box(8531, 8531)), - Box(Box(8532, 8532), Box(8532, 8532)), - Box(Box(8533, 8533), Box(8533, 8533)), - Box(Box(8534, 8534), Box(8534, 8534)), - Box(Box(8535, 8535), Box(8535, 8535)), - Box(Box(8536, 8536), Box(8536, 8536)), - Box(Box(8537, 8537), Box(8537, 8537)), - Box(Box(8538, 8538), Box(8538, 8538)), - Box(Box(8539, 8539), Box(8539, 8539)), - Box(Box(8540, 8540), Box(8540, 8540)), - Box(Box(8541, 8541), Box(8541, 8541)), - Box(Box(8542, 8542), Box(8542, 8542)), - Box(Box(8543, 8543), Box(8543, 8543)), - Box(Box(8544, 8544), Box(8544, 8544)), - Box(Box(8545, 8545), Box(8545, 8545)), - Box(Box(8546, 8546), Box(8546, 8546)), - Box(Box(8547, 8547), Box(8547, 8547)), - Box(Box(8548, 8548), Box(8548, 8548)), - Box(Box(8549, 8549), Box(8549, 8549)), - Box(Box(8550, 8550), Box(8550, 8550)), - Box(Box(8551, 8551), Box(8551, 8551)), - Box(Box(8552, 8552), Box(8552, 8552)), - Box(Box(8553, 8553), Box(8553, 8553)), - Box(Box(8554, 8554), Box(8554, 8554)), - Box(Box(8555, 8555), Box(8555, 8555)), - Box(Box(8556, 8556), Box(8556, 8556)), - Box(Box(8557, 8557), Box(8557, 8557)), - Box(Box(8558, 8558), Box(8558, 8558)), - Box(Box(8559, 8559), Box(8559, 8559)), - Box(Box(8560, 8560), Box(8560, 8560)), - Box(Box(8561, 8561), Box(8561, 8561)), - Box(Box(8562, 8562), Box(8562, 8562)), - Box(Box(8563, 8563), Box(8563, 8563)), - Box(Box(8564, 8564), Box(8564, 8564)), - Box(Box(8565, 8565), Box(8565, 8565)), - Box(Box(8566, 8566), Box(8566, 8566)), - Box(Box(8567, 8567), Box(8567, 8567)), - Box(Box(8568, 8568), Box(8568, 8568)), - Box(Box(8569, 8569), Box(8569, 8569)), - Box(Box(8570, 8570), Box(8570, 8570)), - Box(Box(8571, 8571), Box(8571, 8571)), - Box(Box(8572, 8572), Box(8572, 8572)), - Box(Box(8573, 8573), Box(8573, 8573)), - Box(Box(8574, 8574), Box(8574, 8574)), - Box(Box(8575, 8575), Box(8575, 8575)), - Box(Box(8576, 8576), Box(8576, 8576)), - Box(Box(8577, 8577), Box(8577, 8577)), - Box(Box(8578, 8578), Box(8578, 8578)), - Box(Box(8579, 8579), Box(8579, 8579)), - Box(Box(8580, 8580), Box(8580, 8580)), - Box(Box(8581, 8581), Box(8581, 8581)), - Box(Box(8582, 8582), Box(8582, 8582)), - Box(Box(8583, 8583), Box(8583, 8583)), - Box(Box(8584, 8584), Box(8584, 8584)), - Box(Box(8585, 8585), Box(8585, 8585)), - Box(Box(8586, 8586), Box(8586, 8586)), - Box(Box(8587, 8587), Box(8587, 8587)), - Box(Box(8588, 8588), Box(8588, 8588)), - Box(Box(8589, 8589), Box(8589, 8589)), - Box(Box(8590, 8590), Box(8590, 8590)), - Box(Box(8591, 8591), Box(8591, 8591)), - Box(Box(8592, 8592), Box(8592, 8592)), - Box(Box(8593, 8593), Box(8593, 8593)), - Box(Box(8594, 8594), Box(8594, 8594)), - Box(Box(8595, 8595), Box(8595, 8595)), - Box(Box(8596, 8596), Box(8596, 8596)), - Box(Box(8597, 8597), Box(8597, 8597)), - Box(Box(8598, 8598), Box(8598, 8598)), - Box(Box(8599, 8599), Box(8599, 8599)), - Box(Box(8600, 8600), Box(8600, 8600)), - Box(Box(8601, 8601), Box(8601, 8601)), - Box(Box(8602, 8602), Box(8602, 8602)), - Box(Box(8603, 8603), Box(8603, 8603)), - Box(Box(8604, 8604), Box(8604, 8604)), - Box(Box(8605, 8605), Box(8605, 8605)), - Box(Box(8606, 8606), Box(8606, 8606)), - Box(Box(8607, 8607), Box(8607, 8607)), - Box(Box(8608, 8608), Box(8608, 8608)), - Box(Box(8609, 8609), Box(8609, 8609)), - Box(Box(8610, 8610), Box(8610, 8610)), - Box(Box(8611, 8611), Box(8611, 8611)), - Box(Box(8612, 8612), Box(8612, 8612)), - Box(Box(8613, 8613), Box(8613, 8613)), - Box(Box(8614, 8614), Box(8614, 8614)), - Box(Box(8615, 8615), Box(8615, 8615)), - Box(Box(8616, 8616), Box(8616, 8616)), - Box(Box(8617, 8617), Box(8617, 8617)), - Box(Box(8618, 8618), Box(8618, 8618)), - Box(Box(8619, 8619), Box(8619, 8619)), - Box(Box(8620, 8620), Box(8620, 8620)), - Box(Box(8621, 8621), Box(8621, 8621)), - Box(Box(8622, 8622), Box(8622, 8622)), - Box(Box(8623, 8623), Box(8623, 8623)), - Box(Box(8624, 8624), Box(8624, 8624)), - Box(Box(8625, 8625), Box(8625, 8625)), - Box(Box(8626, 8626), Box(8626, 8626)), - Box(Box(8627, 8627), Box(8627, 8627)), - Box(Box(8628, 8628), Box(8628, 8628)), - Box(Box(8629, 8629), Box(8629, 8629)), - Box(Box(8630, 8630), Box(8630, 8630)), - Box(Box(8631, 8631), Box(8631, 8631)), - Box(Box(8632, 8632), Box(8632, 8632)), - Box(Box(8633, 8633), Box(8633, 8633)), - Box(Box(8634, 8634), Box(8634, 8634)), - Box(Box(8635, 8635), Box(8635, 8635)), - Box(Box(8636, 8636), Box(8636, 8636)), - Box(Box(8637, 8637), Box(8637, 8637)), - Box(Box(8638, 8638), Box(8638, 8638)), - Box(Box(8639, 8639), Box(8639, 8639)), - Box(Box(8640, 8640), Box(8640, 8640)), - Box(Box(8641, 8641), Box(8641, 8641)), - Box(Box(8642, 8642), Box(8642, 8642)), - Box(Box(8643, 8643), Box(8643, 8643)), - Box(Box(8644, 8644), Box(8644, 8644)), - Box(Box(8645, 8645), Box(8645, 8645)), - Box(Box(8646, 8646), Box(8646, 8646)), - Box(Box(8647, 8647), Box(8647, 8647)), - Box(Box(8648, 8648), Box(8648, 8648)), - Box(Box(8649, 8649), Box(8649, 8649)), - Box(Box(8650, 8650), Box(8650, 8650)), - Box(Box(8651, 8651), Box(8651, 8651)), - Box(Box(8652, 8652), Box(8652, 8652)), - Box(Box(8653, 8653), Box(8653, 8653)), - Box(Box(8654, 8654), Box(8654, 8654)), - Box(Box(8655, 8655), Box(8655, 8655)), - Box(Box(8656, 8656), Box(8656, 8656)), - Box(Box(8657, 8657), Box(8657, 8657)), - Box(Box(8658, 8658), Box(8658, 8658)), - Box(Box(8659, 8659), Box(8659, 8659)), - Box(Box(8660, 8660), Box(8660, 8660)), - Box(Box(8661, 8661), Box(8661, 8661)), - Box(Box(8662, 8662), Box(8662, 8662)), - Box(Box(8663, 8663), Box(8663, 8663)), - Box(Box(8664, 8664), Box(8664, 8664)), - Box(Box(8665, 8665), Box(8665, 8665)), - Box(Box(8666, 8666), Box(8666, 8666)), - Box(Box(8667, 8667), Box(8667, 8667)), - Box(Box(8668, 8668), Box(8668, 8668)), - Box(Box(8669, 8669), Box(8669, 8669)), - Box(Box(8670, 8670), Box(8670, 8670)), - Box(Box(8671, 8671), Box(8671, 8671)), - Box(Box(8672, 8672), Box(8672, 8672)), - Box(Box(8673, 8673), Box(8673, 8673)), - Box(Box(8674, 8674), Box(8674, 8674)), - Box(Box(8675, 8675), Box(8675, 8675)), - Box(Box(8676, 8676), Box(8676, 8676)), - Box(Box(8677, 8677), Box(8677, 8677)), - Box(Box(8678, 8678), Box(8678, 8678)), - Box(Box(8679, 8679), Box(8679, 8679)), - Box(Box(8680, 8680), Box(8680, 8680)), - Box(Box(8681, 8681), Box(8681, 8681)), - Box(Box(8682, 8682), Box(8682, 8682)), - Box(Box(8683, 8683), Box(8683, 8683)), - Box(Box(8684, 8684), Box(8684, 8684)), - Box(Box(8685, 8685), Box(8685, 8685)), - Box(Box(8686, 8686), Box(8686, 8686)), - Box(Box(8687, 8687), Box(8687, 8687)), - Box(Box(8688, 8688), Box(8688, 8688)), - Box(Box(8689, 8689), Box(8689, 8689)), - Box(Box(8690, 8690), Box(8690, 8690)), - Box(Box(8691, 8691), Box(8691, 8691)), - Box(Box(8692, 8692), Box(8692, 8692)), - Box(Box(8693, 8693), Box(8693, 8693)), - Box(Box(8694, 8694), Box(8694, 8694)), - Box(Box(8695, 8695), Box(8695, 8695)), - Box(Box(8696, 8696), Box(8696, 8696)), - Box(Box(8697, 8697), Box(8697, 8697)), - Box(Box(8698, 8698), Box(8698, 8698)), - Box(Box(8699, 8699), Box(8699, 8699)), - Box(Box(8700, 8700), Box(8700, 8700)), - Box(Box(8701, 8701), Box(8701, 8701)), - Box(Box(8702, 8702), Box(8702, 8702)), - Box(Box(8703, 8703), Box(8703, 8703)), - Box(Box(8704, 8704), Box(8704, 8704)), - Box(Box(8705, 8705), Box(8705, 8705)), - Box(Box(8706, 8706), Box(8706, 8706)), - Box(Box(8707, 8707), Box(8707, 8707)), - Box(Box(8708, 8708), Box(8708, 8708)), - Box(Box(8709, 8709), Box(8709, 8709)), - Box(Box(8710, 8710), Box(8710, 8710)), - Box(Box(8711, 8711), Box(8711, 8711)), - Box(Box(8712, 8712), Box(8712, 8712)), - Box(Box(8713, 8713), Box(8713, 8713)), - Box(Box(8714, 8714), Box(8714, 8714)), - Box(Box(8715, 8715), Box(8715, 8715)), - Box(Box(8716, 8716), Box(8716, 8716)), - Box(Box(8717, 8717), Box(8717, 8717)), - Box(Box(8718, 8718), Box(8718, 8718)), - Box(Box(8719, 8719), Box(8719, 8719)), - Box(Box(8720, 8720), Box(8720, 8720)), - Box(Box(8721, 8721), Box(8721, 8721)), - Box(Box(8722, 8722), Box(8722, 8722)), - Box(Box(8723, 8723), Box(8723, 8723)), - Box(Box(8724, 8724), Box(8724, 8724)), - Box(Box(8725, 8725), Box(8725, 8725)), - Box(Box(8726, 8726), Box(8726, 8726)), - Box(Box(8727, 8727), Box(8727, 8727)), - Box(Box(8728, 8728), Box(8728, 8728)), - Box(Box(8729, 8729), Box(8729, 8729)), - Box(Box(8730, 8730), Box(8730, 8730)), - Box(Box(8731, 8731), Box(8731, 8731)), - Box(Box(8732, 8732), Box(8732, 8732)), - Box(Box(8733, 8733), Box(8733, 8733)), - Box(Box(8734, 8734), Box(8734, 8734)), - Box(Box(8735, 8735), Box(8735, 8735)), - Box(Box(8736, 8736), Box(8736, 8736)), - Box(Box(8737, 8737), Box(8737, 8737)), - Box(Box(8738, 8738), Box(8738, 8738)), - Box(Box(8739, 8739), Box(8739, 8739)), - Box(Box(8740, 8740), Box(8740, 8740)), - Box(Box(8741, 8741), Box(8741, 8741)), - Box(Box(8742, 8742), Box(8742, 8742)), - Box(Box(8743, 8743), Box(8743, 8743)), - Box(Box(8744, 8744), Box(8744, 8744)), - Box(Box(8745, 8745), Box(8745, 8745)), - Box(Box(8746, 8746), Box(8746, 8746)), - Box(Box(8747, 8747), Box(8747, 8747)), - Box(Box(8748, 8748), Box(8748, 8748)), - Box(Box(8749, 8749), Box(8749, 8749)), - Box(Box(8750, 8750), Box(8750, 8750)), - Box(Box(8751, 8751), Box(8751, 8751)), - Box(Box(8752, 8752), Box(8752, 8752)), - Box(Box(8753, 8753), Box(8753, 8753)), - Box(Box(8754, 8754), Box(8754, 8754)), - Box(Box(8755, 8755), Box(8755, 8755)), - Box(Box(8756, 8756), Box(8756, 8756)), - Box(Box(8757, 8757), Box(8757, 8757)), - Box(Box(8758, 8758), Box(8758, 8758)), - Box(Box(8759, 8759), Box(8759, 8759)), - Box(Box(8760, 8760), Box(8760, 8760)), - Box(Box(8761, 8761), Box(8761, 8761)), - Box(Box(8762, 8762), Box(8762, 8762)), - Box(Box(8763, 8763), Box(8763, 8763)), - Box(Box(8764, 8764), Box(8764, 8764)), - Box(Box(8765, 8765), Box(8765, 8765)), - Box(Box(8766, 8766), Box(8766, 8766)), - Box(Box(8767, 8767), Box(8767, 8767)), - Box(Box(8768, 8768), Box(8768, 8768)), - Box(Box(8769, 8769), Box(8769, 8769)), - Box(Box(8770, 8770), Box(8770, 8770)), - Box(Box(8771, 8771), Box(8771, 8771)), - Box(Box(8772, 8772), Box(8772, 8772)), - Box(Box(8773, 8773), Box(8773, 8773)), - Box(Box(8774, 8774), Box(8774, 8774)), - Box(Box(8775, 8775), Box(8775, 8775)), - Box(Box(8776, 8776), Box(8776, 8776)), - Box(Box(8777, 8777), Box(8777, 8777)), - Box(Box(8778, 8778), Box(8778, 8778)), - Box(Box(8779, 8779), Box(8779, 8779)), - Box(Box(8780, 8780), Box(8780, 8780)), - Box(Box(8781, 8781), Box(8781, 8781)), - Box(Box(8782, 8782), Box(8782, 8782)), - Box(Box(8783, 8783), Box(8783, 8783)), - Box(Box(8784, 8784), Box(8784, 8784)), - Box(Box(8785, 8785), Box(8785, 8785)), - Box(Box(8786, 8786), Box(8786, 8786)), - Box(Box(8787, 8787), Box(8787, 8787)), - Box(Box(8788, 8788), Box(8788, 8788)), - Box(Box(8789, 8789), Box(8789, 8789)), - Box(Box(8790, 8790), Box(8790, 8790)), - Box(Box(8791, 8791), Box(8791, 8791)), - Box(Box(8792, 8792), Box(8792, 8792)), - Box(Box(8793, 8793), Box(8793, 8793)), - Box(Box(8794, 8794), Box(8794, 8794)), - Box(Box(8795, 8795), Box(8795, 8795)), - Box(Box(8796, 8796), Box(8796, 8796)), - Box(Box(8797, 8797), Box(8797, 8797)), - Box(Box(8798, 8798), Box(8798, 8798)), - Box(Box(8799, 8799), Box(8799, 8799)), - Box(Box(8800, 8800), Box(8800, 8800)), - Box(Box(8801, 8801), Box(8801, 8801)), - Box(Box(8802, 8802), Box(8802, 8802)), - Box(Box(8803, 8803), Box(8803, 8803)), - Box(Box(8804, 8804), Box(8804, 8804)), - Box(Box(8805, 8805), Box(8805, 8805)), - Box(Box(8806, 8806), Box(8806, 8806)), - Box(Box(8807, 8807), Box(8807, 8807)), - Box(Box(8808, 8808), Box(8808, 8808)), - Box(Box(8809, 8809), Box(8809, 8809)), - Box(Box(8810, 8810), Box(8810, 8810)), - Box(Box(8811, 8811), Box(8811, 8811)), - Box(Box(8812, 8812), Box(8812, 8812)), - Box(Box(8813, 8813), Box(8813, 8813)), - Box(Box(8814, 8814), Box(8814, 8814)), - Box(Box(8815, 8815), Box(8815, 8815)), - Box(Box(8816, 8816), Box(8816, 8816)), - Box(Box(8817, 8817), Box(8817, 8817)), - Box(Box(8818, 8818), Box(8818, 8818)), - Box(Box(8819, 8819), Box(8819, 8819)), - Box(Box(8820, 8820), Box(8820, 8820)), - Box(Box(8821, 8821), Box(8821, 8821)), - Box(Box(8822, 8822), Box(8822, 8822)), - Box(Box(8823, 8823), Box(8823, 8823)), - Box(Box(8824, 8824), Box(8824, 8824)), - Box(Box(8825, 8825), Box(8825, 8825)), - Box(Box(8826, 8826), Box(8826, 8826)), - Box(Box(8827, 8827), Box(8827, 8827)), - Box(Box(8828, 8828), Box(8828, 8828)), - Box(Box(8829, 8829), Box(8829, 8829)), - Box(Box(8830, 8830), Box(8830, 8830)), - Box(Box(8831, 8831), Box(8831, 8831)), - Box(Box(8832, 8832), Box(8832, 8832)), - Box(Box(8833, 8833), Box(8833, 8833)), - Box(Box(8834, 8834), Box(8834, 8834)), - Box(Box(8835, 8835), Box(8835, 8835)), - Box(Box(8836, 8836), Box(8836, 8836)), - Box(Box(8837, 8837), Box(8837, 8837)), - Box(Box(8838, 8838), Box(8838, 8838)), - Box(Box(8839, 8839), Box(8839, 8839)), - Box(Box(8840, 8840), Box(8840, 8840)), - Box(Box(8841, 8841), Box(8841, 8841)), - Box(Box(8842, 8842), Box(8842, 8842)), - Box(Box(8843, 8843), Box(8843, 8843)), - Box(Box(8844, 8844), Box(8844, 8844)), - Box(Box(8845, 8845), Box(8845, 8845)), - Box(Box(8846, 8846), Box(8846, 8846)), - Box(Box(8847, 8847), Box(8847, 8847)), - Box(Box(8848, 8848), Box(8848, 8848)), - Box(Box(8849, 8849), Box(8849, 8849)), - Box(Box(8850, 8850), Box(8850, 8850)), - Box(Box(8851, 8851), Box(8851, 8851)), - Box(Box(8852, 8852), Box(8852, 8852)), - Box(Box(8853, 8853), Box(8853, 8853)), - Box(Box(8854, 8854), Box(8854, 8854)), - Box(Box(8855, 8855), Box(8855, 8855)), - Box(Box(8856, 8856), Box(8856, 8856)), - Box(Box(8857, 8857), Box(8857, 8857)), - Box(Box(8858, 8858), Box(8858, 8858)), - Box(Box(8859, 8859), Box(8859, 8859)), - Box(Box(8860, 8860), Box(8860, 8860)), - Box(Box(8861, 8861), Box(8861, 8861)), - Box(Box(8862, 8862), Box(8862, 8862)), - Box(Box(8863, 8863), Box(8863, 8863)), - Box(Box(8864, 8864), Box(8864, 8864)), - Box(Box(8865, 8865), Box(8865, 8865)), - Box(Box(8866, 8866), Box(8866, 8866)), - Box(Box(8867, 8867), Box(8867, 8867)), - Box(Box(8868, 8868), Box(8868, 8868)), - Box(Box(8869, 8869), Box(8869, 8869)), - Box(Box(8870, 8870), Box(8870, 8870)), - Box(Box(8871, 8871), Box(8871, 8871)), - Box(Box(8872, 8872), Box(8872, 8872)), - Box(Box(8873, 8873), Box(8873, 8873)), - Box(Box(8874, 8874), Box(8874, 8874)), - Box(Box(8875, 8875), Box(8875, 8875)), - Box(Box(8876, 8876), Box(8876, 8876)), - Box(Box(8877, 8877), Box(8877, 8877)), - Box(Box(8878, 8878), Box(8878, 8878)), - Box(Box(8879, 8879), Box(8879, 8879)), - Box(Box(8880, 8880), Box(8880, 8880)), - Box(Box(8881, 8881), Box(8881, 8881)), - Box(Box(8882, 8882), Box(8882, 8882)), - Box(Box(8883, 8883), Box(8883, 8883)), - Box(Box(8884, 8884), Box(8884, 8884)), - Box(Box(8885, 8885), Box(8885, 8885)), - Box(Box(8886, 8886), Box(8886, 8886)), - Box(Box(8887, 8887), Box(8887, 8887)), - Box(Box(8888, 8888), Box(8888, 8888)), - Box(Box(8889, 8889), Box(8889, 8889)), - Box(Box(8890, 8890), Box(8890, 8890)), - Box(Box(8891, 8891), Box(8891, 8891)), - Box(Box(8892, 8892), Box(8892, 8892)), - Box(Box(8893, 8893), Box(8893, 8893)), - Box(Box(8894, 8894), Box(8894, 8894)), - Box(Box(8895, 8895), Box(8895, 8895)), - Box(Box(8896, 8896), Box(8896, 8896)), - Box(Box(8897, 8897), Box(8897, 8897)), - Box(Box(8898, 8898), Box(8898, 8898)), - Box(Box(8899, 8899), Box(8899, 8899)), - Box(Box(8900, 8900), Box(8900, 8900)), - Box(Box(8901, 8901), Box(8901, 8901)), - Box(Box(8902, 8902), Box(8902, 8902)), - Box(Box(8903, 8903), Box(8903, 8903)), - Box(Box(8904, 8904), Box(8904, 8904)), - Box(Box(8905, 8905), Box(8905, 8905)), - Box(Box(8906, 8906), Box(8906, 8906)), - Box(Box(8907, 8907), Box(8907, 8907)), - Box(Box(8908, 8908), Box(8908, 8908)), - Box(Box(8909, 8909), Box(8909, 8909)), - Box(Box(8910, 8910), Box(8910, 8910)), - Box(Box(8911, 8911), Box(8911, 8911)), - Box(Box(8912, 8912), Box(8912, 8912)), - Box(Box(8913, 8913), Box(8913, 8913)), - Box(Box(8914, 8914), Box(8914, 8914)), - Box(Box(8915, 8915), Box(8915, 8915)), - Box(Box(8916, 8916), Box(8916, 8916)), - Box(Box(8917, 8917), Box(8917, 8917)), - Box(Box(8918, 8918), Box(8918, 8918)), - Box(Box(8919, 8919), Box(8919, 8919)), - Box(Box(8920, 8920), Box(8920, 8920)), - Box(Box(8921, 8921), Box(8921, 8921)), - Box(Box(8922, 8922), Box(8922, 8922)), - Box(Box(8923, 8923), Box(8923, 8923)), - Box(Box(8924, 8924), Box(8924, 8924)), - Box(Box(8925, 8925), Box(8925, 8925)), - Box(Box(8926, 8926), Box(8926, 8926)), - Box(Box(8927, 8927), Box(8927, 8927)), - Box(Box(8928, 8928), Box(8928, 8928)), - Box(Box(8929, 8929), Box(8929, 8929)), - Box(Box(8930, 8930), Box(8930, 8930)), - Box(Box(8931, 8931), Box(8931, 8931)), - Box(Box(8932, 8932), Box(8932, 8932)), - Box(Box(8933, 8933), Box(8933, 8933)), - Box(Box(8934, 8934), Box(8934, 8934)), - Box(Box(8935, 8935), Box(8935, 8935)), - Box(Box(8936, 8936), Box(8936, 8936)), - Box(Box(8937, 8937), Box(8937, 8937)), - Box(Box(8938, 8938), Box(8938, 8938)), - Box(Box(8939, 8939), Box(8939, 8939)), - Box(Box(8940, 8940), Box(8940, 8940)), - Box(Box(8941, 8941), Box(8941, 8941)), - Box(Box(8942, 8942), Box(8942, 8942)), - Box(Box(8943, 8943), Box(8943, 8943)), - Box(Box(8944, 8944), Box(8944, 8944)), - Box(Box(8945, 8945), Box(8945, 8945)), - Box(Box(8946, 8946), Box(8946, 8946)), - Box(Box(8947, 8947), Box(8947, 8947)), - Box(Box(8948, 8948), Box(8948, 8948)), - Box(Box(8949, 8949), Box(8949, 8949)), - Box(Box(8950, 8950), Box(8950, 8950)), - Box(Box(8951, 8951), Box(8951, 8951)), - Box(Box(8952, 8952), Box(8952, 8952)), - Box(Box(8953, 8953), Box(8953, 8953)), - Box(Box(8954, 8954), Box(8954, 8954)), - Box(Box(8955, 8955), Box(8955, 8955)), - Box(Box(8956, 8956), Box(8956, 8956)), - Box(Box(8957, 8957), Box(8957, 8957)), - Box(Box(8958, 8958), Box(8958, 8958)), - Box(Box(8959, 8959), Box(8959, 8959)), - Box(Box(8960, 8960), Box(8960, 8960)), - Box(Box(8961, 8961), Box(8961, 8961)), - Box(Box(8962, 8962), Box(8962, 8962)), - Box(Box(8963, 8963), Box(8963, 8963)), - Box(Box(8964, 8964), Box(8964, 8964)), - Box(Box(8965, 8965), Box(8965, 8965)), - Box(Box(8966, 8966), Box(8966, 8966)), - Box(Box(8967, 8967), Box(8967, 8967)), - Box(Box(8968, 8968), Box(8968, 8968)), - Box(Box(8969, 8969), Box(8969, 8969)), - Box(Box(8970, 8970), Box(8970, 8970)), - Box(Box(8971, 8971), Box(8971, 8971)), - Box(Box(8972, 8972), Box(8972, 8972)), - Box(Box(8973, 8973), Box(8973, 8973)), - Box(Box(8974, 8974), Box(8974, 8974)), - Box(Box(8975, 8975), Box(8975, 8975)), - Box(Box(8976, 8976), Box(8976, 8976)), - Box(Box(8977, 8977), Box(8977, 8977)), - Box(Box(8978, 8978), Box(8978, 8978)), - Box(Box(8979, 8979), Box(8979, 8979)), - Box(Box(8980, 8980), Box(8980, 8980)), - Box(Box(8981, 8981), Box(8981, 8981)), - Box(Box(8982, 8982), Box(8982, 8982)), - Box(Box(8983, 8983), Box(8983, 8983)), - Box(Box(8984, 8984), Box(8984, 8984)), - Box(Box(8985, 8985), Box(8985, 8985)), - Box(Box(8986, 8986), Box(8986, 8986)), - Box(Box(8987, 8987), Box(8987, 8987)), - Box(Box(8988, 8988), Box(8988, 8988)), - Box(Box(8989, 8989), Box(8989, 8989)), - Box(Box(8990, 8990), Box(8990, 8990)), - Box(Box(8991, 8991), Box(8991, 8991)), - Box(Box(8992, 8992), Box(8992, 8992)), - Box(Box(8993, 8993), Box(8993, 8993)), - Box(Box(8994, 8994), Box(8994, 8994)), - Box(Box(8995, 8995), Box(8995, 8995)), - Box(Box(8996, 8996), Box(8996, 8996)), - Box(Box(8997, 8997), Box(8997, 8997)), - Box(Box(8998, 8998), Box(8998, 8998)), - Box(Box(8999, 8999), Box(8999, 8999)), - Box(Box(9000, 9000), Box(9000, 9000)), - Box(Box(9001, 9001), Box(9001, 9001)), - Box(Box(9002, 9002), Box(9002, 9002)), - Box(Box(9003, 9003), Box(9003, 9003)), - Box(Box(9004, 9004), Box(9004, 9004)), - Box(Box(9005, 9005), Box(9005, 9005)), - Box(Box(9006, 9006), Box(9006, 9006)), - Box(Box(9007, 9007), Box(9007, 9007)), - Box(Box(9008, 9008), Box(9008, 9008)), - Box(Box(9009, 9009), Box(9009, 9009)), - Box(Box(9010, 9010), Box(9010, 9010)), - Box(Box(9011, 9011), Box(9011, 9011)), - Box(Box(9012, 9012), Box(9012, 9012)), - Box(Box(9013, 9013), Box(9013, 9013)), - Box(Box(9014, 9014), Box(9014, 9014)), - Box(Box(9015, 9015), Box(9015, 9015)), - Box(Box(9016, 9016), Box(9016, 9016)), - Box(Box(9017, 9017), Box(9017, 9017)), - Box(Box(9018, 9018), Box(9018, 9018)), - Box(Box(9019, 9019), Box(9019, 9019)), - Box(Box(9020, 9020), Box(9020, 9020)), - Box(Box(9021, 9021), Box(9021, 9021)), - Box(Box(9022, 9022), Box(9022, 9022)), - Box(Box(9023, 9023), Box(9023, 9023)), - Box(Box(9024, 9024), Box(9024, 9024)), - Box(Box(9025, 9025), Box(9025, 9025)), - Box(Box(9026, 9026), Box(9026, 9026)), - Box(Box(9027, 9027), Box(9027, 9027)), - Box(Box(9028, 9028), Box(9028, 9028)), - Box(Box(9029, 9029), Box(9029, 9029)), - Box(Box(9030, 9030), Box(9030, 9030)), - Box(Box(9031, 9031), Box(9031, 9031)), - Box(Box(9032, 9032), Box(9032, 9032)), - Box(Box(9033, 9033), Box(9033, 9033)), - Box(Box(9034, 9034), Box(9034, 9034)), - Box(Box(9035, 9035), Box(9035, 9035)), - Box(Box(9036, 9036), Box(9036, 9036)), - Box(Box(9037, 9037), Box(9037, 9037)), - Box(Box(9038, 9038), Box(9038, 9038)), - Box(Box(9039, 9039), Box(9039, 9039)), - Box(Box(9040, 9040), Box(9040, 9040)), - Box(Box(9041, 9041), Box(9041, 9041)), - Box(Box(9042, 9042), Box(9042, 9042)), - Box(Box(9043, 9043), Box(9043, 9043)), - Box(Box(9044, 9044), Box(9044, 9044)), - Box(Box(9045, 9045), Box(9045, 9045)), - Box(Box(9046, 9046), Box(9046, 9046)), - Box(Box(9047, 9047), Box(9047, 9047)), - Box(Box(9048, 9048), Box(9048, 9048)), - Box(Box(9049, 9049), Box(9049, 9049)), - Box(Box(9050, 9050), Box(9050, 9050)), - Box(Box(9051, 9051), Box(9051, 9051)), - Box(Box(9052, 9052), Box(9052, 9052)), - Box(Box(9053, 9053), Box(9053, 9053)), - Box(Box(9054, 9054), Box(9054, 9054)), - Box(Box(9055, 9055), Box(9055, 9055)), - Box(Box(9056, 9056), Box(9056, 9056)), - Box(Box(9057, 9057), Box(9057, 9057)), - Box(Box(9058, 9058), Box(9058, 9058)), - Box(Box(9059, 9059), Box(9059, 9059)), - Box(Box(9060, 9060), Box(9060, 9060)), - Box(Box(9061, 9061), Box(9061, 9061)), - Box(Box(9062, 9062), Box(9062, 9062)), - Box(Box(9063, 9063), Box(9063, 9063)), - Box(Box(9064, 9064), Box(9064, 9064)), - Box(Box(9065, 9065), Box(9065, 9065)), - Box(Box(9066, 9066), Box(9066, 9066)), - Box(Box(9067, 9067), Box(9067, 9067)), - Box(Box(9068, 9068), Box(9068, 9068)), - Box(Box(9069, 9069), Box(9069, 9069)), - Box(Box(9070, 9070), Box(9070, 9070)), - Box(Box(9071, 9071), Box(9071, 9071)), - Box(Box(9072, 9072), Box(9072, 9072)), - Box(Box(9073, 9073), Box(9073, 9073)), - Box(Box(9074, 9074), Box(9074, 9074)), - Box(Box(9075, 9075), Box(9075, 9075)), - Box(Box(9076, 9076), Box(9076, 9076)), - Box(Box(9077, 9077), Box(9077, 9077)), - Box(Box(9078, 9078), Box(9078, 9078)), - Box(Box(9079, 9079), Box(9079, 9079)), - Box(Box(9080, 9080), Box(9080, 9080)), - Box(Box(9081, 9081), Box(9081, 9081)), - Box(Box(9082, 9082), Box(9082, 9082)), - Box(Box(9083, 9083), Box(9083, 9083)), - Box(Box(9084, 9084), Box(9084, 9084)), - Box(Box(9085, 9085), Box(9085, 9085)), - Box(Box(9086, 9086), Box(9086, 9086)), - Box(Box(9087, 9087), Box(9087, 9087)), - Box(Box(9088, 9088), Box(9088, 9088)), - Box(Box(9089, 9089), Box(9089, 9089)), - Box(Box(9090, 9090), Box(9090, 9090)), - Box(Box(9091, 9091), Box(9091, 9091)), - Box(Box(9092, 9092), Box(9092, 9092)), - Box(Box(9093, 9093), Box(9093, 9093)), - Box(Box(9094, 9094), Box(9094, 9094)), - Box(Box(9095, 9095), Box(9095, 9095)), - Box(Box(9096, 9096), Box(9096, 9096)), - Box(Box(9097, 9097), Box(9097, 9097)), - Box(Box(9098, 9098), Box(9098, 9098)), - Box(Box(9099, 9099), Box(9099, 9099)), - Box(Box(9100, 9100), Box(9100, 9100)), - Box(Box(9101, 9101), Box(9101, 9101)), - Box(Box(9102, 9102), Box(9102, 9102)), - Box(Box(9103, 9103), Box(9103, 9103)), - Box(Box(9104, 9104), Box(9104, 9104)), - Box(Box(9105, 9105), Box(9105, 9105)), - Box(Box(9106, 9106), Box(9106, 9106)), - Box(Box(9107, 9107), Box(9107, 9107)), - Box(Box(9108, 9108), Box(9108, 9108)), - Box(Box(9109, 9109), Box(9109, 9109)), - Box(Box(9110, 9110), Box(9110, 9110)), - Box(Box(9111, 9111), Box(9111, 9111)), - Box(Box(9112, 9112), Box(9112, 9112)), - Box(Box(9113, 9113), Box(9113, 9113)), - Box(Box(9114, 9114), Box(9114, 9114)), - Box(Box(9115, 9115), Box(9115, 9115)), - Box(Box(9116, 9116), Box(9116, 9116)), - Box(Box(9117, 9117), Box(9117, 9117)), - Box(Box(9118, 9118), Box(9118, 9118)), - Box(Box(9119, 9119), Box(9119, 9119)), - Box(Box(9120, 9120), Box(9120, 9120)), - Box(Box(9121, 9121), Box(9121, 9121)), - Box(Box(9122, 9122), Box(9122, 9122)), - Box(Box(9123, 9123), Box(9123, 9123)), - Box(Box(9124, 9124), Box(9124, 9124)), - Box(Box(9125, 9125), Box(9125, 9125)), - Box(Box(9126, 9126), Box(9126, 9126)), - Box(Box(9127, 9127), Box(9127, 9127)), - Box(Box(9128, 9128), Box(9128, 9128)), - Box(Box(9129, 9129), Box(9129, 9129)), - Box(Box(9130, 9130), Box(9130, 9130)), - Box(Box(9131, 9131), Box(9131, 9131)), - Box(Box(9132, 9132), Box(9132, 9132)), - Box(Box(9133, 9133), Box(9133, 9133)), - Box(Box(9134, 9134), Box(9134, 9134)), - Box(Box(9135, 9135), Box(9135, 9135)), - Box(Box(9136, 9136), Box(9136, 9136)), - Box(Box(9137, 9137), Box(9137, 9137)), - Box(Box(9138, 9138), Box(9138, 9138)), - Box(Box(9139, 9139), Box(9139, 9139)), - Box(Box(9140, 9140), Box(9140, 9140)), - Box(Box(9141, 9141), Box(9141, 9141)), - Box(Box(9142, 9142), Box(9142, 9142)), - Box(Box(9143, 9143), Box(9143, 9143)), - Box(Box(9144, 9144), Box(9144, 9144)), - Box(Box(9145, 9145), Box(9145, 9145)), - Box(Box(9146, 9146), Box(9146, 9146)), - Box(Box(9147, 9147), Box(9147, 9147)), - Box(Box(9148, 9148), Box(9148, 9148)), - Box(Box(9149, 9149), Box(9149, 9149)), - Box(Box(9150, 9150), Box(9150, 9150)), - Box(Box(9151, 9151), Box(9151, 9151)), - Box(Box(9152, 9152), Box(9152, 9152)), - Box(Box(9153, 9153), Box(9153, 9153)), - Box(Box(9154, 9154), Box(9154, 9154)), - Box(Box(9155, 9155), Box(9155, 9155)), - Box(Box(9156, 9156), Box(9156, 9156)), - Box(Box(9157, 9157), Box(9157, 9157)), - Box(Box(9158, 9158), Box(9158, 9158)), - Box(Box(9159, 9159), Box(9159, 9159)), - Box(Box(9160, 9160), Box(9160, 9160)), - Box(Box(9161, 9161), Box(9161, 9161)), - Box(Box(9162, 9162), Box(9162, 9162)), - Box(Box(9163, 9163), Box(9163, 9163)), - Box(Box(9164, 9164), Box(9164, 9164)), - Box(Box(9165, 9165), Box(9165, 9165)), - Box(Box(9166, 9166), Box(9166, 9166)), - Box(Box(9167, 9167), Box(9167, 9167)), - Box(Box(9168, 9168), Box(9168, 9168)), - Box(Box(9169, 9169), Box(9169, 9169)), - Box(Box(9170, 9170), Box(9170, 9170)), - Box(Box(9171, 9171), Box(9171, 9171)), - Box(Box(9172, 9172), Box(9172, 9172)), - Box(Box(9173, 9173), Box(9173, 9173)), - Box(Box(9174, 9174), Box(9174, 9174)), - Box(Box(9175, 9175), Box(9175, 9175)), - Box(Box(9176, 9176), Box(9176, 9176)), - Box(Box(9177, 9177), Box(9177, 9177)), - Box(Box(9178, 9178), Box(9178, 9178)), - Box(Box(9179, 9179), Box(9179, 9179)), - Box(Box(9180, 9180), Box(9180, 9180)), - Box(Box(9181, 9181), Box(9181, 9181)), - Box(Box(9182, 9182), Box(9182, 9182)), - Box(Box(9183, 9183), Box(9183, 9183)), - Box(Box(9184, 9184), Box(9184, 9184)), - Box(Box(9185, 9185), Box(9185, 9185)), - Box(Box(9186, 9186), Box(9186, 9186)), - Box(Box(9187, 9187), Box(9187, 9187)), - Box(Box(9188, 9188), Box(9188, 9188)), - Box(Box(9189, 9189), Box(9189, 9189)), - Box(Box(9190, 9190), Box(9190, 9190)), - Box(Box(9191, 9191), Box(9191, 9191)), - Box(Box(9192, 9192), Box(9192, 9192)), - Box(Box(9193, 9193), Box(9193, 9193)), - Box(Box(9194, 9194), Box(9194, 9194)), - Box(Box(9195, 9195), Box(9195, 9195)), - Box(Box(9196, 9196), Box(9196, 9196)), - Box(Box(9197, 9197), Box(9197, 9197)), - Box(Box(9198, 9198), Box(9198, 9198)), - Box(Box(9199, 9199), Box(9199, 9199)), - Box(Box(9200, 9200), Box(9200, 9200)), - Box(Box(9201, 9201), Box(9201, 9201)), - Box(Box(9202, 9202), Box(9202, 9202)), - Box(Box(9203, 9203), Box(9203, 9203)), - Box(Box(9204, 9204), Box(9204, 9204)), - Box(Box(9205, 9205), Box(9205, 9205)), - Box(Box(9206, 9206), Box(9206, 9206)), - Box(Box(9207, 9207), Box(9207, 9207)), - Box(Box(9208, 9208), Box(9208, 9208)), - Box(Box(9209, 9209), Box(9209, 9209)), - Box(Box(9210, 9210), Box(9210, 9210)), - Box(Box(9211, 9211), Box(9211, 9211)), - Box(Box(9212, 9212), Box(9212, 9212)), - Box(Box(9213, 9213), Box(9213, 9213)), - Box(Box(9214, 9214), Box(9214, 9214)), - Box(Box(9215, 9215), Box(9215, 9215)), - Box(Box(9216, 9216), Box(9216, 9216)), - Box(Box(9217, 9217), Box(9217, 9217)), - Box(Box(9218, 9218), Box(9218, 9218)), - Box(Box(9219, 9219), Box(9219, 9219)), - Box(Box(9220, 9220), Box(9220, 9220)), - Box(Box(9221, 9221), Box(9221, 9221)), - Box(Box(9222, 9222), Box(9222, 9222)), - Box(Box(9223, 9223), Box(9223, 9223)), - Box(Box(9224, 9224), Box(9224, 9224)), - Box(Box(9225, 9225), Box(9225, 9225)), - Box(Box(9226, 9226), Box(9226, 9226)), - Box(Box(9227, 9227), Box(9227, 9227)), - Box(Box(9228, 9228), Box(9228, 9228)), - Box(Box(9229, 9229), Box(9229, 9229)), - Box(Box(9230, 9230), Box(9230, 9230)), - Box(Box(9231, 9231), Box(9231, 9231)), - Box(Box(9232, 9232), Box(9232, 9232)), - Box(Box(9233, 9233), Box(9233, 9233)), - Box(Box(9234, 9234), Box(9234, 9234)), - Box(Box(9235, 9235), Box(9235, 9235)), - Box(Box(9236, 9236), Box(9236, 9236)), - Box(Box(9237, 9237), Box(9237, 9237)), - Box(Box(9238, 9238), Box(9238, 9238)), - Box(Box(9239, 9239), Box(9239, 9239)), - Box(Box(9240, 9240), Box(9240, 9240)), - Box(Box(9241, 9241), Box(9241, 9241)), - Box(Box(9242, 9242), Box(9242, 9242)), - Box(Box(9243, 9243), Box(9243, 9243)), - Box(Box(9244, 9244), Box(9244, 9244)), - Box(Box(9245, 9245), Box(9245, 9245)), - Box(Box(9246, 9246), Box(9246, 9246)), - Box(Box(9247, 9247), Box(9247, 9247)), - Box(Box(9248, 9248), Box(9248, 9248)), - Box(Box(9249, 9249), Box(9249, 9249)), - Box(Box(9250, 9250), Box(9250, 9250)), - Box(Box(9251, 9251), Box(9251, 9251)), - Box(Box(9252, 9252), Box(9252, 9252)), - Box(Box(9253, 9253), Box(9253, 9253)), - Box(Box(9254, 9254), Box(9254, 9254)), - Box(Box(9255, 9255), Box(9255, 9255)), - Box(Box(9256, 9256), Box(9256, 9256)), - Box(Box(9257, 9257), Box(9257, 9257)), - Box(Box(9258, 9258), Box(9258, 9258)), - Box(Box(9259, 9259), Box(9259, 9259)), - Box(Box(9260, 9260), Box(9260, 9260)), - Box(Box(9261, 9261), Box(9261, 9261)), - Box(Box(9262, 9262), Box(9262, 9262)), - Box(Box(9263, 9263), Box(9263, 9263)), - Box(Box(9264, 9264), Box(9264, 9264)), - Box(Box(9265, 9265), Box(9265, 9265)), - Box(Box(9266, 9266), Box(9266, 9266)), - Box(Box(9267, 9267), Box(9267, 9267)), - Box(Box(9268, 9268), Box(9268, 9268)), - Box(Box(9269, 9269), Box(9269, 9269)), - Box(Box(9270, 9270), Box(9270, 9270)), - Box(Box(9271, 9271), Box(9271, 9271)), - Box(Box(9272, 9272), Box(9272, 9272)), - Box(Box(9273, 9273), Box(9273, 9273)), - Box(Box(9274, 9274), Box(9274, 9274)), - Box(Box(9275, 9275), Box(9275, 9275)), - Box(Box(9276, 9276), Box(9276, 9276)), - Box(Box(9277, 9277), Box(9277, 9277)), - Box(Box(9278, 9278), Box(9278, 9278)), - Box(Box(9279, 9279), Box(9279, 9279)), - Box(Box(9280, 9280), Box(9280, 9280)), - Box(Box(9281, 9281), Box(9281, 9281)), - Box(Box(9282, 9282), Box(9282, 9282)), - Box(Box(9283, 9283), Box(9283, 9283)), - Box(Box(9284, 9284), Box(9284, 9284)), - Box(Box(9285, 9285), Box(9285, 9285)), - Box(Box(9286, 9286), Box(9286, 9286)), - Box(Box(9287, 9287), Box(9287, 9287)), - Box(Box(9288, 9288), Box(9288, 9288)), - Box(Box(9289, 9289), Box(9289, 9289)), - Box(Box(9290, 9290), Box(9290, 9290)), - Box(Box(9291, 9291), Box(9291, 9291)), - Box(Box(9292, 9292), Box(9292, 9292)), - Box(Box(9293, 9293), Box(9293, 9293)), - Box(Box(9294, 9294), Box(9294, 9294)), - Box(Box(9295, 9295), Box(9295, 9295)), - Box(Box(9296, 9296), Box(9296, 9296)), - Box(Box(9297, 9297), Box(9297, 9297)), - Box(Box(9298, 9298), Box(9298, 9298)), - Box(Box(9299, 9299), Box(9299, 9299)), - Box(Box(9300, 9300), Box(9300, 9300)), - Box(Box(9301, 9301), Box(9301, 9301)), - Box(Box(9302, 9302), Box(9302, 9302)), - Box(Box(9303, 9303), Box(9303, 9303)), - Box(Box(9304, 9304), Box(9304, 9304)), - Box(Box(9305, 9305), Box(9305, 9305)), - Box(Box(9306, 9306), Box(9306, 9306)), - Box(Box(9307, 9307), Box(9307, 9307)), - Box(Box(9308, 9308), Box(9308, 9308)), - Box(Box(9309, 9309), Box(9309, 9309)), - Box(Box(9310, 9310), Box(9310, 9310)), - Box(Box(9311, 9311), Box(9311, 9311)), - Box(Box(9312, 9312), Box(9312, 9312)), - Box(Box(9313, 9313), Box(9313, 9313)), - Box(Box(9314, 9314), Box(9314, 9314)), - Box(Box(9315, 9315), Box(9315, 9315)), - Box(Box(9316, 9316), Box(9316, 9316)), - Box(Box(9317, 9317), Box(9317, 9317)), - Box(Box(9318, 9318), Box(9318, 9318)), - Box(Box(9319, 9319), Box(9319, 9319)), - Box(Box(9320, 9320), Box(9320, 9320)), - Box(Box(9321, 9321), Box(9321, 9321)), - Box(Box(9322, 9322), Box(9322, 9322)), - Box(Box(9323, 9323), Box(9323, 9323)), - Box(Box(9324, 9324), Box(9324, 9324)), - Box(Box(9325, 9325), Box(9325, 9325)), - Box(Box(9326, 9326), Box(9326, 9326)), - Box(Box(9327, 9327), Box(9327, 9327)), - Box(Box(9328, 9328), Box(9328, 9328)), - Box(Box(9329, 9329), Box(9329, 9329)), - Box(Box(9330, 9330), Box(9330, 9330)), - Box(Box(9331, 9331), Box(9331, 9331)), - Box(Box(9332, 9332), Box(9332, 9332)), - Box(Box(9333, 9333), Box(9333, 9333)), - Box(Box(9334, 9334), Box(9334, 9334)), - Box(Box(9335, 9335), Box(9335, 9335)), - Box(Box(9336, 9336), Box(9336, 9336)), - Box(Box(9337, 9337), Box(9337, 9337)), - Box(Box(9338, 9338), Box(9338, 9338)), - Box(Box(9339, 9339), Box(9339, 9339)), - Box(Box(9340, 9340), Box(9340, 9340)), - Box(Box(9341, 9341), Box(9341, 9341)), - Box(Box(9342, 9342), Box(9342, 9342)), - Box(Box(9343, 9343), Box(9343, 9343)), - Box(Box(9344, 9344), Box(9344, 9344)), - Box(Box(9345, 9345), Box(9345, 9345)), - Box(Box(9346, 9346), Box(9346, 9346)), - Box(Box(9347, 9347), Box(9347, 9347)), - Box(Box(9348, 9348), Box(9348, 9348)), - Box(Box(9349, 9349), Box(9349, 9349)), - Box(Box(9350, 9350), Box(9350, 9350)), - Box(Box(9351, 9351), Box(9351, 9351)), - Box(Box(9352, 9352), Box(9352, 9352)), - Box(Box(9353, 9353), Box(9353, 9353)), - Box(Box(9354, 9354), Box(9354, 9354)), - Box(Box(9355, 9355), Box(9355, 9355)), - Box(Box(9356, 9356), Box(9356, 9356)), - Box(Box(9357, 9357), Box(9357, 9357)), - Box(Box(9358, 9358), Box(9358, 9358)), - Box(Box(9359, 9359), Box(9359, 9359)), - Box(Box(9360, 9360), Box(9360, 9360)), - Box(Box(9361, 9361), Box(9361, 9361)), - Box(Box(9362, 9362), Box(9362, 9362)), - Box(Box(9363, 9363), Box(9363, 9363)), - Box(Box(9364, 9364), Box(9364, 9364)), - Box(Box(9365, 9365), Box(9365, 9365)), - Box(Box(9366, 9366), Box(9366, 9366)), - Box(Box(9367, 9367), Box(9367, 9367)), - Box(Box(9368, 9368), Box(9368, 9368)), - Box(Box(9369, 9369), Box(9369, 9369)), - Box(Box(9370, 9370), Box(9370, 9370)), - Box(Box(9371, 9371), Box(9371, 9371)), - Box(Box(9372, 9372), Box(9372, 9372)), - Box(Box(9373, 9373), Box(9373, 9373)), - Box(Box(9374, 9374), Box(9374, 9374)), - Box(Box(9375, 9375), Box(9375, 9375)), - Box(Box(9376, 9376), Box(9376, 9376)), - Box(Box(9377, 9377), Box(9377, 9377)), - Box(Box(9378, 9378), Box(9378, 9378)), - Box(Box(9379, 9379), Box(9379, 9379)), - Box(Box(9380, 9380), Box(9380, 9380)), - Box(Box(9381, 9381), Box(9381, 9381)), - Box(Box(9382, 9382), Box(9382, 9382)), - Box(Box(9383, 9383), Box(9383, 9383)), - Box(Box(9384, 9384), Box(9384, 9384)), - Box(Box(9385, 9385), Box(9385, 9385)), - Box(Box(9386, 9386), Box(9386, 9386)), - Box(Box(9387, 9387), Box(9387, 9387)), - Box(Box(9388, 9388), Box(9388, 9388)), - Box(Box(9389, 9389), Box(9389, 9389)), - Box(Box(9390, 9390), Box(9390, 9390)), - Box(Box(9391, 9391), Box(9391, 9391)), - Box(Box(9392, 9392), Box(9392, 9392)), - Box(Box(9393, 9393), Box(9393, 9393)), - Box(Box(9394, 9394), Box(9394, 9394)), - Box(Box(9395, 9395), Box(9395, 9395)), - Box(Box(9396, 9396), Box(9396, 9396)), - Box(Box(9397, 9397), Box(9397, 9397)), - Box(Box(9398, 9398), Box(9398, 9398)), - Box(Box(9399, 9399), Box(9399, 9399)), - Box(Box(9400, 9400), Box(9400, 9400)), - Box(Box(9401, 9401), Box(9401, 9401)), - Box(Box(9402, 9402), Box(9402, 9402)), - Box(Box(9403, 9403), Box(9403, 9403)), - Box(Box(9404, 9404), Box(9404, 9404)), - Box(Box(9405, 9405), Box(9405, 9405)), - Box(Box(9406, 9406), Box(9406, 9406)), - Box(Box(9407, 9407), Box(9407, 9407)), - Box(Box(9408, 9408), Box(9408, 9408)), - Box(Box(9409, 9409), Box(9409, 9409)), - Box(Box(9410, 9410), Box(9410, 9410)), - Box(Box(9411, 9411), Box(9411, 9411)), - Box(Box(9412, 9412), Box(9412, 9412)), - Box(Box(9413, 9413), Box(9413, 9413)), - Box(Box(9414, 9414), Box(9414, 9414)), - Box(Box(9415, 9415), Box(9415, 9415)), - Box(Box(9416, 9416), Box(9416, 9416)), - Box(Box(9417, 9417), Box(9417, 9417)), - Box(Box(9418, 9418), Box(9418, 9418)), - Box(Box(9419, 9419), Box(9419, 9419)), - Box(Box(9420, 9420), Box(9420, 9420)), - Box(Box(9421, 9421), Box(9421, 9421)), - Box(Box(9422, 9422), Box(9422, 9422)), - Box(Box(9423, 9423), Box(9423, 9423)), - Box(Box(9424, 9424), Box(9424, 9424)), - Box(Box(9425, 9425), Box(9425, 9425)), - Box(Box(9426, 9426), Box(9426, 9426)), - Box(Box(9427, 9427), Box(9427, 9427)), - Box(Box(9428, 9428), Box(9428, 9428)), - Box(Box(9429, 9429), Box(9429, 9429)), - Box(Box(9430, 9430), Box(9430, 9430)), - Box(Box(9431, 9431), Box(9431, 9431)), - Box(Box(9432, 9432), Box(9432, 9432)), - Box(Box(9433, 9433), Box(9433, 9433)), - Box(Box(9434, 9434), Box(9434, 9434)), - Box(Box(9435, 9435), Box(9435, 9435)), - Box(Box(9436, 9436), Box(9436, 9436)), - Box(Box(9437, 9437), Box(9437, 9437)), - Box(Box(9438, 9438), Box(9438, 9438)), - Box(Box(9439, 9439), Box(9439, 9439)), - Box(Box(9440, 9440), Box(9440, 9440)), - Box(Box(9441, 9441), Box(9441, 9441)), - Box(Box(9442, 9442), Box(9442, 9442)), - Box(Box(9443, 9443), Box(9443, 9443)), - Box(Box(9444, 9444), Box(9444, 9444)), - Box(Box(9445, 9445), Box(9445, 9445)), - Box(Box(9446, 9446), Box(9446, 9446)), - Box(Box(9447, 9447), Box(9447, 9447)), - Box(Box(9448, 9448), Box(9448, 9448)), - Box(Box(9449, 9449), Box(9449, 9449)), - Box(Box(9450, 9450), Box(9450, 9450)), - Box(Box(9451, 9451), Box(9451, 9451)), - Box(Box(9452, 9452), Box(9452, 9452)), - Box(Box(9453, 9453), Box(9453, 9453)), - Box(Box(9454, 9454), Box(9454, 9454)), - Box(Box(9455, 9455), Box(9455, 9455)), - Box(Box(9456, 9456), Box(9456, 9456)), - Box(Box(9457, 9457), Box(9457, 9457)), - Box(Box(9458, 9458), Box(9458, 9458)), - Box(Box(9459, 9459), Box(9459, 9459)), - Box(Box(9460, 9460), Box(9460, 9460)), - Box(Box(9461, 9461), Box(9461, 9461)), - Box(Box(9462, 9462), Box(9462, 9462)), - Box(Box(9463, 9463), Box(9463, 9463)), - Box(Box(9464, 9464), Box(9464, 9464)), - Box(Box(9465, 9465), Box(9465, 9465)), - Box(Box(9466, 9466), Box(9466, 9466)), - Box(Box(9467, 9467), Box(9467, 9467)), - Box(Box(9468, 9468), Box(9468, 9468)), - Box(Box(9469, 9469), Box(9469, 9469)), - Box(Box(9470, 9470), Box(9470, 9470)), - Box(Box(9471, 9471), Box(9471, 9471)), - Box(Box(9472, 9472), Box(9472, 9472)), - Box(Box(9473, 9473), Box(9473, 9473)), - Box(Box(9474, 9474), Box(9474, 9474)), - Box(Box(9475, 9475), Box(9475, 9475)), - Box(Box(9476, 9476), Box(9476, 9476)), - Box(Box(9477, 9477), Box(9477, 9477)), - Box(Box(9478, 9478), Box(9478, 9478)), - Box(Box(9479, 9479), Box(9479, 9479)), - Box(Box(9480, 9480), Box(9480, 9480)), - Box(Box(9481, 9481), Box(9481, 9481)), - Box(Box(9482, 9482), Box(9482, 9482)), - Box(Box(9483, 9483), Box(9483, 9483)), - Box(Box(9484, 9484), Box(9484, 9484)), - Box(Box(9485, 9485), Box(9485, 9485)), - Box(Box(9486, 9486), Box(9486, 9486)), - Box(Box(9487, 9487), Box(9487, 9487)), - Box(Box(9488, 9488), Box(9488, 9488)), - Box(Box(9489, 9489), Box(9489, 9489)), - Box(Box(9490, 9490), Box(9490, 9490)), - Box(Box(9491, 9491), Box(9491, 9491)), - Box(Box(9492, 9492), Box(9492, 9492)), - Box(Box(9493, 9493), Box(9493, 9493)), - Box(Box(9494, 9494), Box(9494, 9494)), - Box(Box(9495, 9495), Box(9495, 9495)), - Box(Box(9496, 9496), Box(9496, 9496)), - Box(Box(9497, 9497), Box(9497, 9497)), - Box(Box(9498, 9498), Box(9498, 9498)), - Box(Box(9499, 9499), Box(9499, 9499)), - Box(Box(9500, 9500), Box(9500, 9500)), - Box(Box(9501, 9501), Box(9501, 9501)), - Box(Box(9502, 9502), Box(9502, 9502)), - Box(Box(9503, 9503), Box(9503, 9503)), - Box(Box(9504, 9504), Box(9504, 9504)), - Box(Box(9505, 9505), Box(9505, 9505)), - Box(Box(9506, 9506), Box(9506, 9506)), - Box(Box(9507, 9507), Box(9507, 9507)), - Box(Box(9508, 9508), Box(9508, 9508)), - Box(Box(9509, 9509), Box(9509, 9509)), - Box(Box(9510, 9510), Box(9510, 9510)), - Box(Box(9511, 9511), Box(9511, 9511)), - Box(Box(9512, 9512), Box(9512, 9512)), - Box(Box(9513, 9513), Box(9513, 9513)), - Box(Box(9514, 9514), Box(9514, 9514)), - Box(Box(9515, 9515), Box(9515, 9515)), - Box(Box(9516, 9516), Box(9516, 9516)), - Box(Box(9517, 9517), Box(9517, 9517)), - Box(Box(9518, 9518), Box(9518, 9518)), - Box(Box(9519, 9519), Box(9519, 9519)), - Box(Box(9520, 9520), Box(9520, 9520)), - Box(Box(9521, 9521), Box(9521, 9521)), - Box(Box(9522, 9522), Box(9522, 9522)), - Box(Box(9523, 9523), Box(9523, 9523)), - Box(Box(9524, 9524), Box(9524, 9524)), - Box(Box(9525, 9525), Box(9525, 9525)), - Box(Box(9526, 9526), Box(9526, 9526)), - Box(Box(9527, 9527), Box(9527, 9527)), - Box(Box(9528, 9528), Box(9528, 9528)), - Box(Box(9529, 9529), Box(9529, 9529)), - Box(Box(9530, 9530), Box(9530, 9530)), - Box(Box(9531, 9531), Box(9531, 9531)), - Box(Box(9532, 9532), Box(9532, 9532)), - Box(Box(9533, 9533), Box(9533, 9533)), - Box(Box(9534, 9534), Box(9534, 9534)), - Box(Box(9535, 9535), Box(9535, 9535)), - Box(Box(9536, 9536), Box(9536, 9536)), - Box(Box(9537, 9537), Box(9537, 9537)), - Box(Box(9538, 9538), Box(9538, 9538)), - Box(Box(9539, 9539), Box(9539, 9539)), - Box(Box(9540, 9540), Box(9540, 9540)), - Box(Box(9541, 9541), Box(9541, 9541)), - Box(Box(9542, 9542), Box(9542, 9542)), - Box(Box(9543, 9543), Box(9543, 9543)), - Box(Box(9544, 9544), Box(9544, 9544)), - Box(Box(9545, 9545), Box(9545, 9545)), - Box(Box(9546, 9546), Box(9546, 9546)), - Box(Box(9547, 9547), Box(9547, 9547)), - Box(Box(9548, 9548), Box(9548, 9548)), - Box(Box(9549, 9549), Box(9549, 9549)), - Box(Box(9550, 9550), Box(9550, 9550)), - Box(Box(9551, 9551), Box(9551, 9551)), - Box(Box(9552, 9552), Box(9552, 9552)), - Box(Box(9553, 9553), Box(9553, 9553)), - Box(Box(9554, 9554), Box(9554, 9554)), - Box(Box(9555, 9555), Box(9555, 9555)), - Box(Box(9556, 9556), Box(9556, 9556)), - Box(Box(9557, 9557), Box(9557, 9557)), - Box(Box(9558, 9558), Box(9558, 9558)), - Box(Box(9559, 9559), Box(9559, 9559)), - Box(Box(9560, 9560), Box(9560, 9560)), - Box(Box(9561, 9561), Box(9561, 9561)), - Box(Box(9562, 9562), Box(9562, 9562)), - Box(Box(9563, 9563), Box(9563, 9563)), - Box(Box(9564, 9564), Box(9564, 9564)), - Box(Box(9565, 9565), Box(9565, 9565)), - Box(Box(9566, 9566), Box(9566, 9566)), - Box(Box(9567, 9567), Box(9567, 9567)), - Box(Box(9568, 9568), Box(9568, 9568)), - Box(Box(9569, 9569), Box(9569, 9569)), - Box(Box(9570, 9570), Box(9570, 9570)), - Box(Box(9571, 9571), Box(9571, 9571)), - Box(Box(9572, 9572), Box(9572, 9572)), - Box(Box(9573, 9573), Box(9573, 9573)), - Box(Box(9574, 9574), Box(9574, 9574)), - Box(Box(9575, 9575), Box(9575, 9575)), - Box(Box(9576, 9576), Box(9576, 9576)), - Box(Box(9577, 9577), Box(9577, 9577)), - Box(Box(9578, 9578), Box(9578, 9578)), - Box(Box(9579, 9579), Box(9579, 9579)), - Box(Box(9580, 9580), Box(9580, 9580)), - Box(Box(9581, 9581), Box(9581, 9581)), - Box(Box(9582, 9582), Box(9582, 9582)), - Box(Box(9583, 9583), Box(9583, 9583)), - Box(Box(9584, 9584), Box(9584, 9584)), - Box(Box(9585, 9585), Box(9585, 9585)), - Box(Box(9586, 9586), Box(9586, 9586)), - Box(Box(9587, 9587), Box(9587, 9587)), - Box(Box(9588, 9588), Box(9588, 9588)), - Box(Box(9589, 9589), Box(9589, 9589)), - Box(Box(9590, 9590), Box(9590, 9590)), - Box(Box(9591, 9591), Box(9591, 9591)), - Box(Box(9592, 9592), Box(9592, 9592)), - Box(Box(9593, 9593), Box(9593, 9593)), - Box(Box(9594, 9594), Box(9594, 9594)), - Box(Box(9595, 9595), Box(9595, 9595)), - Box(Box(9596, 9596), Box(9596, 9596)), - Box(Box(9597, 9597), Box(9597, 9597)), - Box(Box(9598, 9598), Box(9598, 9598)), - Box(Box(9599, 9599), Box(9599, 9599)), - Box(Box(9600, 9600), Box(9600, 9600)), - Box(Box(9601, 9601), Box(9601, 9601)), - Box(Box(9602, 9602), Box(9602, 9602)), - Box(Box(9603, 9603), Box(9603, 9603)), - Box(Box(9604, 9604), Box(9604, 9604)), - Box(Box(9605, 9605), Box(9605, 9605)), - Box(Box(9606, 9606), Box(9606, 9606)), - Box(Box(9607, 9607), Box(9607, 9607)), - Box(Box(9608, 9608), Box(9608, 9608)), - Box(Box(9609, 9609), Box(9609, 9609)), - Box(Box(9610, 9610), Box(9610, 9610)), - Box(Box(9611, 9611), Box(9611, 9611)), - Box(Box(9612, 9612), Box(9612, 9612)), - Box(Box(9613, 9613), Box(9613, 9613)), - Box(Box(9614, 9614), Box(9614, 9614)), - Box(Box(9615, 9615), Box(9615, 9615)), - Box(Box(9616, 9616), Box(9616, 9616)), - Box(Box(9617, 9617), Box(9617, 9617)), - Box(Box(9618, 9618), Box(9618, 9618)), - Box(Box(9619, 9619), Box(9619, 9619)), - Box(Box(9620, 9620), Box(9620, 9620)), - Box(Box(9621, 9621), Box(9621, 9621)), - Box(Box(9622, 9622), Box(9622, 9622)), - Box(Box(9623, 9623), Box(9623, 9623)), - Box(Box(9624, 9624), Box(9624, 9624)), - Box(Box(9625, 9625), Box(9625, 9625)), - Box(Box(9626, 9626), Box(9626, 9626)), - Box(Box(9627, 9627), Box(9627, 9627)), - Box(Box(9628, 9628), Box(9628, 9628)), - Box(Box(9629, 9629), Box(9629, 9629)), - Box(Box(9630, 9630), Box(9630, 9630)), - Box(Box(9631, 9631), Box(9631, 9631)), - Box(Box(9632, 9632), Box(9632, 9632)), - Box(Box(9633, 9633), Box(9633, 9633)), - Box(Box(9634, 9634), Box(9634, 9634)), - Box(Box(9635, 9635), Box(9635, 9635)), - Box(Box(9636, 9636), Box(9636, 9636)), - Box(Box(9637, 9637), Box(9637, 9637)), - Box(Box(9638, 9638), Box(9638, 9638)), - Box(Box(9639, 9639), Box(9639, 9639)), - Box(Box(9640, 9640), Box(9640, 9640)), - Box(Box(9641, 9641), Box(9641, 9641)), - Box(Box(9642, 9642), Box(9642, 9642)), - Box(Box(9643, 9643), Box(9643, 9643)), - Box(Box(9644, 9644), Box(9644, 9644)), - Box(Box(9645, 9645), Box(9645, 9645)), - Box(Box(9646, 9646), Box(9646, 9646)), - Box(Box(9647, 9647), Box(9647, 9647)), - Box(Box(9648, 9648), Box(9648, 9648)), - Box(Box(9649, 9649), Box(9649, 9649)), - Box(Box(9650, 9650), Box(9650, 9650)), - Box(Box(9651, 9651), Box(9651, 9651)), - Box(Box(9652, 9652), Box(9652, 9652)), - Box(Box(9653, 9653), Box(9653, 9653)), - Box(Box(9654, 9654), Box(9654, 9654)), - Box(Box(9655, 9655), Box(9655, 9655)), - Box(Box(9656, 9656), Box(9656, 9656)), - Box(Box(9657, 9657), Box(9657, 9657)), - Box(Box(9658, 9658), Box(9658, 9658)), - Box(Box(9659, 9659), Box(9659, 9659)), - Box(Box(9660, 9660), Box(9660, 9660)), - Box(Box(9661, 9661), Box(9661, 9661)), - Box(Box(9662, 9662), Box(9662, 9662)), - Box(Box(9663, 9663), Box(9663, 9663)), - Box(Box(9664, 9664), Box(9664, 9664)), - Box(Box(9665, 9665), Box(9665, 9665)), - Box(Box(9666, 9666), Box(9666, 9666)), - Box(Box(9667, 9667), Box(9667, 9667)), - Box(Box(9668, 9668), Box(9668, 9668)), - Box(Box(9669, 9669), Box(9669, 9669)), - Box(Box(9670, 9670), Box(9670, 9670)), - Box(Box(9671, 9671), Box(9671, 9671)), - Box(Box(9672, 9672), Box(9672, 9672)), - Box(Box(9673, 9673), Box(9673, 9673)), - Box(Box(9674, 9674), Box(9674, 9674)), - Box(Box(9675, 9675), Box(9675, 9675)), - Box(Box(9676, 9676), Box(9676, 9676)), - Box(Box(9677, 9677), Box(9677, 9677)), - Box(Box(9678, 9678), Box(9678, 9678)), - Box(Box(9679, 9679), Box(9679, 9679)), - Box(Box(9680, 9680), Box(9680, 9680)), - Box(Box(9681, 9681), Box(9681, 9681)), - Box(Box(9682, 9682), Box(9682, 9682)), - Box(Box(9683, 9683), Box(9683, 9683)), - Box(Box(9684, 9684), Box(9684, 9684)), - Box(Box(9685, 9685), Box(9685, 9685)), - Box(Box(9686, 9686), Box(9686, 9686)), - Box(Box(9687, 9687), Box(9687, 9687)), - Box(Box(9688, 9688), Box(9688, 9688)), - Box(Box(9689, 9689), Box(9689, 9689)), - Box(Box(9690, 9690), Box(9690, 9690)), - Box(Box(9691, 9691), Box(9691, 9691)), - Box(Box(9692, 9692), Box(9692, 9692)), - Box(Box(9693, 9693), Box(9693, 9693)), - Box(Box(9694, 9694), Box(9694, 9694)), - Box(Box(9695, 9695), Box(9695, 9695)), - Box(Box(9696, 9696), Box(9696, 9696)), - Box(Box(9697, 9697), Box(9697, 9697)), - Box(Box(9698, 9698), Box(9698, 9698)), - Box(Box(9699, 9699), Box(9699, 9699)), - Box(Box(9700, 9700), Box(9700, 9700)), - Box(Box(9701, 9701), Box(9701, 9701)), - Box(Box(9702, 9702), Box(9702, 9702)), - Box(Box(9703, 9703), Box(9703, 9703)), - Box(Box(9704, 9704), Box(9704, 9704)), - Box(Box(9705, 9705), Box(9705, 9705)), - Box(Box(9706, 9706), Box(9706, 9706)), - Box(Box(9707, 9707), Box(9707, 9707)), - Box(Box(9708, 9708), Box(9708, 9708)), - Box(Box(9709, 9709), Box(9709, 9709)), - Box(Box(9710, 9710), Box(9710, 9710)), - Box(Box(9711, 9711), Box(9711, 9711)), - Box(Box(9712, 9712), Box(9712, 9712)), - Box(Box(9713, 9713), Box(9713, 9713)), - Box(Box(9714, 9714), Box(9714, 9714)), - Box(Box(9715, 9715), Box(9715, 9715)), - Box(Box(9716, 9716), Box(9716, 9716)), - Box(Box(9717, 9717), Box(9717, 9717)), - Box(Box(9718, 9718), Box(9718, 9718)), - Box(Box(9719, 9719), Box(9719, 9719)), - Box(Box(9720, 9720), Box(9720, 9720)), - Box(Box(9721, 9721), Box(9721, 9721)), - Box(Box(9722, 9722), Box(9722, 9722)), - Box(Box(9723, 9723), Box(9723, 9723)), - Box(Box(9724, 9724), Box(9724, 9724)), - Box(Box(9725, 9725), Box(9725, 9725)), - Box(Box(9726, 9726), Box(9726, 9726)), - Box(Box(9727, 9727), Box(9727, 9727)), - Box(Box(9728, 9728), Box(9728, 9728)), - Box(Box(9729, 9729), Box(9729, 9729)), - Box(Box(9730, 9730), Box(9730, 9730)), - Box(Box(9731, 9731), Box(9731, 9731)), - Box(Box(9732, 9732), Box(9732, 9732)), - Box(Box(9733, 9733), Box(9733, 9733)), - Box(Box(9734, 9734), Box(9734, 9734)), - Box(Box(9735, 9735), Box(9735, 9735)), - Box(Box(9736, 9736), Box(9736, 9736)), - Box(Box(9737, 9737), Box(9737, 9737)), - Box(Box(9738, 9738), Box(9738, 9738)), - Box(Box(9739, 9739), Box(9739, 9739)), - Box(Box(9740, 9740), Box(9740, 9740)), - Box(Box(9741, 9741), Box(9741, 9741)), - Box(Box(9742, 9742), Box(9742, 9742)), - Box(Box(9743, 9743), Box(9743, 9743)), - Box(Box(9744, 9744), Box(9744, 9744)), - Box(Box(9745, 9745), Box(9745, 9745)), - Box(Box(9746, 9746), Box(9746, 9746)), - Box(Box(9747, 9747), Box(9747, 9747)), - Box(Box(9748, 9748), Box(9748, 9748)), - Box(Box(9749, 9749), Box(9749, 9749)), - Box(Box(9750, 9750), Box(9750, 9750)), - Box(Box(9751, 9751), Box(9751, 9751)), - Box(Box(9752, 9752), Box(9752, 9752)), - Box(Box(9753, 9753), Box(9753, 9753)), - Box(Box(9754, 9754), Box(9754, 9754)), - Box(Box(9755, 9755), Box(9755, 9755)), - Box(Box(9756, 9756), Box(9756, 9756)), - Box(Box(9757, 9757), Box(9757, 9757)), - Box(Box(9758, 9758), Box(9758, 9758)), - Box(Box(9759, 9759), Box(9759, 9759)), - Box(Box(9760, 9760), Box(9760, 9760)), - Box(Box(9761, 9761), Box(9761, 9761)), - Box(Box(9762, 9762), Box(9762, 9762)), - Box(Box(9763, 9763), Box(9763, 9763)), - Box(Box(9764, 9764), Box(9764, 9764)), - Box(Box(9765, 9765), Box(9765, 9765)), - Box(Box(9766, 9766), Box(9766, 9766)), - Box(Box(9767, 9767), Box(9767, 9767)), - Box(Box(9768, 9768), Box(9768, 9768)), - Box(Box(9769, 9769), Box(9769, 9769)), - Box(Box(9770, 9770), Box(9770, 9770)), - Box(Box(9771, 9771), Box(9771, 9771)), - Box(Box(9772, 9772), Box(9772, 9772)), - Box(Box(9773, 9773), Box(9773, 9773)), - Box(Box(9774, 9774), Box(9774, 9774)), - Box(Box(9775, 9775), Box(9775, 9775)), - Box(Box(9776, 9776), Box(9776, 9776)), - Box(Box(9777, 9777), Box(9777, 9777)), - Box(Box(9778, 9778), Box(9778, 9778)), - Box(Box(9779, 9779), Box(9779, 9779)), - Box(Box(9780, 9780), Box(9780, 9780)), - Box(Box(9781, 9781), Box(9781, 9781)), - Box(Box(9782, 9782), Box(9782, 9782)), - Box(Box(9783, 9783), Box(9783, 9783)), - Box(Box(9784, 9784), Box(9784, 9784)), - Box(Box(9785, 9785), Box(9785, 9785)), - Box(Box(9786, 9786), Box(9786, 9786)), - Box(Box(9787, 9787), Box(9787, 9787)), - Box(Box(9788, 9788), Box(9788, 9788)), - Box(Box(9789, 9789), Box(9789, 9789)), - Box(Box(9790, 9790), Box(9790, 9790)), - Box(Box(9791, 9791), Box(9791, 9791)), - Box(Box(9792, 9792), Box(9792, 9792)), - Box(Box(9793, 9793), Box(9793, 9793)), - Box(Box(9794, 9794), Box(9794, 9794)), - Box(Box(9795, 9795), Box(9795, 9795)), - Box(Box(9796, 9796), Box(9796, 9796)), - Box(Box(9797, 9797), Box(9797, 9797)), - Box(Box(9798, 9798), Box(9798, 9798)), - Box(Box(9799, 9799), Box(9799, 9799)), - Box(Box(9800, 9800), Box(9800, 9800)), - Box(Box(9801, 9801), Box(9801, 9801)), - Box(Box(9802, 9802), Box(9802, 9802)), - Box(Box(9803, 9803), Box(9803, 9803)), - Box(Box(9804, 9804), Box(9804, 9804)), - Box(Box(9805, 9805), Box(9805, 9805)), - Box(Box(9806, 9806), Box(9806, 9806)), - Box(Box(9807, 9807), Box(9807, 9807)), - Box(Box(9808, 9808), Box(9808, 9808)), - Box(Box(9809, 9809), Box(9809, 9809)), - Box(Box(9810, 9810), Box(9810, 9810)), - Box(Box(9811, 9811), Box(9811, 9811)), - Box(Box(9812, 9812), Box(9812, 9812)), - Box(Box(9813, 9813), Box(9813, 9813)), - Box(Box(9814, 9814), Box(9814, 9814)), - Box(Box(9815, 9815), Box(9815, 9815)), - Box(Box(9816, 9816), Box(9816, 9816)), - Box(Box(9817, 9817), Box(9817, 9817)), - Box(Box(9818, 9818), Box(9818, 9818)), - Box(Box(9819, 9819), Box(9819, 9819)), - Box(Box(9820, 9820), Box(9820, 9820)), - Box(Box(9821, 9821), Box(9821, 9821)), - Box(Box(9822, 9822), Box(9822, 9822)), - Box(Box(9823, 9823), Box(9823, 9823)), - Box(Box(9824, 9824), Box(9824, 9824)), - Box(Box(9825, 9825), Box(9825, 9825)), - Box(Box(9826, 9826), Box(9826, 9826)), - Box(Box(9827, 9827), Box(9827, 9827)), - Box(Box(9828, 9828), Box(9828, 9828)), - Box(Box(9829, 9829), Box(9829, 9829)), - Box(Box(9830, 9830), Box(9830, 9830)), - Box(Box(9831, 9831), Box(9831, 9831)), - Box(Box(9832, 9832), Box(9832, 9832)), - Box(Box(9833, 9833), Box(9833, 9833)), - Box(Box(9834, 9834), Box(9834, 9834)), - Box(Box(9835, 9835), Box(9835, 9835)), - Box(Box(9836, 9836), Box(9836, 9836)), - Box(Box(9837, 9837), Box(9837, 9837)), - Box(Box(9838, 9838), Box(9838, 9838)), - Box(Box(9839, 9839), Box(9839, 9839)), - Box(Box(9840, 9840), Box(9840, 9840)), - Box(Box(9841, 9841), Box(9841, 9841)), - Box(Box(9842, 9842), Box(9842, 9842)), - Box(Box(9843, 9843), Box(9843, 9843)), - Box(Box(9844, 9844), Box(9844, 9844)), - Box(Box(9845, 9845), Box(9845, 9845)), - Box(Box(9846, 9846), Box(9846, 9846)), - Box(Box(9847, 9847), Box(9847, 9847)), - Box(Box(9848, 9848), Box(9848, 9848)), - Box(Box(9849, 9849), Box(9849, 9849)), - Box(Box(9850, 9850), Box(9850, 9850)), - Box(Box(9851, 9851), Box(9851, 9851)), - Box(Box(9852, 9852), Box(9852, 9852)), - Box(Box(9853, 9853), Box(9853, 9853)), - Box(Box(9854, 9854), Box(9854, 9854)), - Box(Box(9855, 9855), Box(9855, 9855)), - Box(Box(9856, 9856), Box(9856, 9856)), - Box(Box(9857, 9857), Box(9857, 9857)), - Box(Box(9858, 9858), Box(9858, 9858)), - Box(Box(9859, 9859), Box(9859, 9859)), - Box(Box(9860, 9860), Box(9860, 9860)), - Box(Box(9861, 9861), Box(9861, 9861)), - Box(Box(9862, 9862), Box(9862, 9862)), - Box(Box(9863, 9863), Box(9863, 9863)), - Box(Box(9864, 9864), Box(9864, 9864)), - Box(Box(9865, 9865), Box(9865, 9865)), - Box(Box(9866, 9866), Box(9866, 9866)), - Box(Box(9867, 9867), Box(9867, 9867)), - Box(Box(9868, 9868), Box(9868, 9868)), - Box(Box(9869, 9869), Box(9869, 9869)), - Box(Box(9870, 9870), Box(9870, 9870)), - Box(Box(9871, 9871), Box(9871, 9871)), - Box(Box(9872, 9872), Box(9872, 9872)), - Box(Box(9873, 9873), Box(9873, 9873)), - Box(Box(9874, 9874), Box(9874, 9874)), - Box(Box(9875, 9875), Box(9875, 9875)), - Box(Box(9876, 9876), Box(9876, 9876)), - Box(Box(9877, 9877), Box(9877, 9877)), - Box(Box(9878, 9878), Box(9878, 9878)), - Box(Box(9879, 9879), Box(9879, 9879)), - Box(Box(9880, 9880), Box(9880, 9880)), - Box(Box(9881, 9881), Box(9881, 9881)), - Box(Box(9882, 9882), Box(9882, 9882)), - Box(Box(9883, 9883), Box(9883, 9883)), - Box(Box(9884, 9884), Box(9884, 9884)), - Box(Box(9885, 9885), Box(9885, 9885)), - Box(Box(9886, 9886), Box(9886, 9886)), - Box(Box(9887, 9887), Box(9887, 9887)), - Box(Box(9888, 9888), Box(9888, 9888)), - Box(Box(9889, 9889), Box(9889, 9889)), - Box(Box(9890, 9890), Box(9890, 9890)), - Box(Box(9891, 9891), Box(9891, 9891)), - Box(Box(9892, 9892), Box(9892, 9892)), - Box(Box(9893, 9893), Box(9893, 9893)), - Box(Box(9894, 9894), Box(9894, 9894)), - Box(Box(9895, 9895), Box(9895, 9895)), - Box(Box(9896, 9896), Box(9896, 9896)), - Box(Box(9897, 9897), Box(9897, 9897)), - Box(Box(9898, 9898), Box(9898, 9898)), - Box(Box(9899, 9899), Box(9899, 9899)), - Box(Box(9900, 9900), Box(9900, 9900)), - Box(Box(9901, 9901), Box(9901, 9901)), - Box(Box(9902, 9902), Box(9902, 9902)), - Box(Box(9903, 9903), Box(9903, 9903)), - Box(Box(9904, 9904), Box(9904, 9904)), - Box(Box(9905, 9905), Box(9905, 9905)), - Box(Box(9906, 9906), Box(9906, 9906)), - Box(Box(9907, 9907), Box(9907, 9907)), - Box(Box(9908, 9908), Box(9908, 9908)), - Box(Box(9909, 9909), Box(9909, 9909)), - Box(Box(9910, 9910), Box(9910, 9910)), - Box(Box(9911, 9911), Box(9911, 9911)), - Box(Box(9912, 9912), Box(9912, 9912)), - Box(Box(9913, 9913), Box(9913, 9913)), - Box(Box(9914, 9914), Box(9914, 9914)), - Box(Box(9915, 9915), Box(9915, 9915)), - Box(Box(9916, 9916), Box(9916, 9916)), - Box(Box(9917, 9917), Box(9917, 9917)), - Box(Box(9918, 9918), Box(9918, 9918)), - Box(Box(9919, 9919), Box(9919, 9919)), - Box(Box(9920, 9920), Box(9920, 9920)), - Box(Box(9921, 9921), Box(9921, 9921)), - Box(Box(9922, 9922), Box(9922, 9922)), - Box(Box(9923, 9923), Box(9923, 9923)), - Box(Box(9924, 9924), Box(9924, 9924)), - Box(Box(9925, 9925), Box(9925, 9925)), - Box(Box(9926, 9926), Box(9926, 9926)), - Box(Box(9927, 9927), Box(9927, 9927)), - Box(Box(9928, 9928), Box(9928, 9928)), - Box(Box(9929, 9929), Box(9929, 9929)), - Box(Box(9930, 9930), Box(9930, 9930)), - Box(Box(9931, 9931), Box(9931, 9931)), - Box(Box(9932, 9932), Box(9932, 9932)), - Box(Box(9933, 9933), Box(9933, 9933)), - Box(Box(9934, 9934), Box(9934, 9934)), - Box(Box(9935, 9935), Box(9935, 9935)), - Box(Box(9936, 9936), Box(9936, 9936)), - Box(Box(9937, 9937), Box(9937, 9937)), - Box(Box(9938, 9938), Box(9938, 9938)), - Box(Box(9939, 9939), Box(9939, 9939)), - Box(Box(9940, 9940), Box(9940, 9940)), - Box(Box(9941, 9941), Box(9941, 9941)), - Box(Box(9942, 9942), Box(9942, 9942)), - Box(Box(9943, 9943), Box(9943, 9943)), - Box(Box(9944, 9944), Box(9944, 9944)), - Box(Box(9945, 9945), Box(9945, 9945)), - Box(Box(9946, 9946), Box(9946, 9946)), - Box(Box(9947, 9947), Box(9947, 9947)), - Box(Box(9948, 9948), Box(9948, 9948)), - Box(Box(9949, 9949), Box(9949, 9949)), - Box(Box(9950, 9950), Box(9950, 9950)), - Box(Box(9951, 9951), Box(9951, 9951)), - Box(Box(9952, 9952), Box(9952, 9952)), - Box(Box(9953, 9953), Box(9953, 9953)), - Box(Box(9954, 9954), Box(9954, 9954)), - Box(Box(9955, 9955), Box(9955, 9955)), - Box(Box(9956, 9956), Box(9956, 9956)), - Box(Box(9957, 9957), Box(9957, 9957)), - Box(Box(9958, 9958), Box(9958, 9958)), - Box(Box(9959, 9959), Box(9959, 9959)), - Box(Box(9960, 9960), Box(9960, 9960)), - Box(Box(9961, 9961), Box(9961, 9961)), - Box(Box(9962, 9962), Box(9962, 9962)), - Box(Box(9963, 9963), Box(9963, 9963)), - Box(Box(9964, 9964), Box(9964, 9964)), - Box(Box(9965, 9965), Box(9965, 9965)), - Box(Box(9966, 9966), Box(9966, 9966)), - Box(Box(9967, 9967), Box(9967, 9967)), - Box(Box(9968, 9968), Box(9968, 9968)), - Box(Box(9969, 9969), Box(9969, 9969)), - Box(Box(9970, 9970), Box(9970, 9970)), - Box(Box(9971, 9971), Box(9971, 9971)), - Box(Box(9972, 9972), Box(9972, 9972)), - Box(Box(9973, 9973), Box(9973, 9973)), - Box(Box(9974, 9974), Box(9974, 9974)), - Box(Box(9975, 9975), Box(9975, 9975)), - Box(Box(9976, 9976), Box(9976, 9976)), - Box(Box(9977, 9977), Box(9977, 9977)), - Box(Box(9978, 9978), Box(9978, 9978)), - Box(Box(9979, 9979), Box(9979, 9979)), - Box(Box(9980, 9980), Box(9980, 9980)), - Box(Box(9981, 9981), Box(9981, 9981)), - Box(Box(9982, 9982), Box(9982, 9982)), - Box(Box(9983, 9983), Box(9983, 9983)), - Box(Box(9984, 9984), Box(9984, 9984)), - Box(Box(9985, 9985), Box(9985, 9985)), - Box(Box(9986, 9986), Box(9986, 9986)), - Box(Box(9987, 9987), Box(9987, 9987)), - Box(Box(9988, 9988), Box(9988, 9988)), - Box(Box(9989, 9989), Box(9989, 9989)), - Box(Box(9990, 9990), Box(9990, 9990)), - Box(Box(9991, 9991), Box(9991, 9991)), - Box(Box(9992, 9992), Box(9992, 9992)), - Box(Box(9993, 9993), Box(9993, 9993)), - Box(Box(9994, 9994), Box(9994, 9994)), - Box(Box(9995, 9995), Box(9995, 9995)), - Box(Box(9996, 9996), Box(9996, 9996)), - Box(Box(9997, 9997), Box(9997, 9997)), - Box(Box(9998, 9998), Box(9998, 9998)), - Box(Box(9999, 9999), Box(9999, 9999)), -]; - -confuse(x) { - try { - throw x; - } catch (e) { - return e; - } -} - -main() { - if (!identical(confuse(list1), confuse(list2))) { - throw new Exception("list1 !== list2"); - } -} diff --git a/tests/language_2/canonicalize/hashing_shallow_collision_instance_test.dart b/tests/language_2/canonicalize/hashing_shallow_collision_instance_test.dart deleted file mode 100644 index c2af8e086fd..00000000000 --- a/tests/language_2/canonicalize/hashing_shallow_collision_instance_test.dart +++ /dev/null @@ -1,20031 +0,0 @@ -// 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. - -// @dart = 2.9 - -// If canonicalization hashes with only a field's cid, this will exhibit -// quadratic time. - -class Box { - final Object content; - const Box(this.content); -} - -// 10,000 elements. -const list1 = [ -Box(Box(0)), -Box(Box(1)), -Box(Box(2)), -Box(Box(3)), -Box(Box(4)), -Box(Box(5)), -Box(Box(6)), -Box(Box(7)), -Box(Box(8)), -Box(Box(9)), -Box(Box(10)), -Box(Box(11)), -Box(Box(12)), -Box(Box(13)), -Box(Box(14)), -Box(Box(15)), -Box(Box(16)), -Box(Box(17)), -Box(Box(18)), -Box(Box(19)), -Box(Box(20)), -Box(Box(21)), -Box(Box(22)), -Box(Box(23)), -Box(Box(24)), -Box(Box(25)), -Box(Box(26)), -Box(Box(27)), -Box(Box(28)), -Box(Box(29)), -Box(Box(30)), -Box(Box(31)), -Box(Box(32)), -Box(Box(33)), -Box(Box(34)), -Box(Box(35)), -Box(Box(36)), -Box(Box(37)), -Box(Box(38)), -Box(Box(39)), -Box(Box(40)), -Box(Box(41)), -Box(Box(42)), -Box(Box(43)), -Box(Box(44)), -Box(Box(45)), -Box(Box(46)), -Box(Box(47)), -Box(Box(48)), -Box(Box(49)), -Box(Box(50)), -Box(Box(51)), -Box(Box(52)), -Box(Box(53)), -Box(Box(54)), -Box(Box(55)), -Box(Box(56)), -Box(Box(57)), -Box(Box(58)), -Box(Box(59)), -Box(Box(60)), -Box(Box(61)), -Box(Box(62)), -Box(Box(63)), -Box(Box(64)), -Box(Box(65)), -Box(Box(66)), -Box(Box(67)), -Box(Box(68)), -Box(Box(69)), -Box(Box(70)), -Box(Box(71)), -Box(Box(72)), -Box(Box(73)), -Box(Box(74)), -Box(Box(75)), -Box(Box(76)), -Box(Box(77)), -Box(Box(78)), -Box(Box(79)), -Box(Box(80)), -Box(Box(81)), -Box(Box(82)), -Box(Box(83)), -Box(Box(84)), -Box(Box(85)), -Box(Box(86)), -Box(Box(87)), -Box(Box(88)), -Box(Box(89)), -Box(Box(90)), -Box(Box(91)), -Box(Box(92)), -Box(Box(93)), -Box(Box(94)), -Box(Box(95)), -Box(Box(96)), -Box(Box(97)), -Box(Box(98)), -Box(Box(99)), -Box(Box(100)), -Box(Box(101)), -Box(Box(102)), -Box(Box(103)), -Box(Box(104)), -Box(Box(105)), -Box(Box(106)), -Box(Box(107)), -Box(Box(108)), -Box(Box(109)), -Box(Box(110)), -Box(Box(111)), -Box(Box(112)), -Box(Box(113)), -Box(Box(114)), -Box(Box(115)), -Box(Box(116)), -Box(Box(117)), -Box(Box(118)), -Box(Box(119)), -Box(Box(120)), -Box(Box(121)), -Box(Box(122)), -Box(Box(123)), -Box(Box(124)), -Box(Box(125)), -Box(Box(126)), -Box(Box(127)), -Box(Box(128)), -Box(Box(129)), -Box(Box(130)), -Box(Box(131)), -Box(Box(132)), -Box(Box(133)), -Box(Box(134)), -Box(Box(135)), -Box(Box(136)), -Box(Box(137)), -Box(Box(138)), -Box(Box(139)), -Box(Box(140)), -Box(Box(141)), -Box(Box(142)), -Box(Box(143)), -Box(Box(144)), -Box(Box(145)), -Box(Box(146)), -Box(Box(147)), -Box(Box(148)), -Box(Box(149)), -Box(Box(150)), -Box(Box(151)), -Box(Box(152)), -Box(Box(153)), -Box(Box(154)), -Box(Box(155)), -Box(Box(156)), -Box(Box(157)), -Box(Box(158)), -Box(Box(159)), -Box(Box(160)), -Box(Box(161)), -Box(Box(162)), -Box(Box(163)), -Box(Box(164)), -Box(Box(165)), -Box(Box(166)), -Box(Box(167)), -Box(Box(168)), -Box(Box(169)), -Box(Box(170)), -Box(Box(171)), -Box(Box(172)), -Box(Box(173)), -Box(Box(174)), -Box(Box(175)), -Box(Box(176)), -Box(Box(177)), -Box(Box(178)), -Box(Box(179)), -Box(Box(180)), -Box(Box(181)), -Box(Box(182)), -Box(Box(183)), -Box(Box(184)), -Box(Box(185)), -Box(Box(186)), -Box(Box(187)), -Box(Box(188)), -Box(Box(189)), -Box(Box(190)), -Box(Box(191)), -Box(Box(192)), -Box(Box(193)), -Box(Box(194)), -Box(Box(195)), -Box(Box(196)), -Box(Box(197)), -Box(Box(198)), -Box(Box(199)), -Box(Box(200)), -Box(Box(201)), -Box(Box(202)), -Box(Box(203)), -Box(Box(204)), -Box(Box(205)), -Box(Box(206)), -Box(Box(207)), -Box(Box(208)), -Box(Box(209)), -Box(Box(210)), -Box(Box(211)), -Box(Box(212)), -Box(Box(213)), -Box(Box(214)), -Box(Box(215)), -Box(Box(216)), -Box(Box(217)), -Box(Box(218)), -Box(Box(219)), -Box(Box(220)), -Box(Box(221)), -Box(Box(222)), -Box(Box(223)), -Box(Box(224)), -Box(Box(225)), -Box(Box(226)), -Box(Box(227)), -Box(Box(228)), -Box(Box(229)), -Box(Box(230)), -Box(Box(231)), -Box(Box(232)), -Box(Box(233)), -Box(Box(234)), -Box(Box(235)), -Box(Box(236)), -Box(Box(237)), -Box(Box(238)), -Box(Box(239)), -Box(Box(240)), -Box(Box(241)), -Box(Box(242)), -Box(Box(243)), -Box(Box(244)), -Box(Box(245)), -Box(Box(246)), -Box(Box(247)), -Box(Box(248)), -Box(Box(249)), -Box(Box(250)), -Box(Box(251)), -Box(Box(252)), -Box(Box(253)), -Box(Box(254)), -Box(Box(255)), -Box(Box(256)), -Box(Box(257)), -Box(Box(258)), -Box(Box(259)), -Box(Box(260)), -Box(Box(261)), -Box(Box(262)), -Box(Box(263)), -Box(Box(264)), -Box(Box(265)), -Box(Box(266)), -Box(Box(267)), -Box(Box(268)), -Box(Box(269)), -Box(Box(270)), -Box(Box(271)), -Box(Box(272)), -Box(Box(273)), -Box(Box(274)), -Box(Box(275)), -Box(Box(276)), -Box(Box(277)), -Box(Box(278)), -Box(Box(279)), -Box(Box(280)), -Box(Box(281)), -Box(Box(282)), -Box(Box(283)), -Box(Box(284)), -Box(Box(285)), -Box(Box(286)), -Box(Box(287)), -Box(Box(288)), -Box(Box(289)), -Box(Box(290)), -Box(Box(291)), -Box(Box(292)), -Box(Box(293)), -Box(Box(294)), -Box(Box(295)), -Box(Box(296)), -Box(Box(297)), -Box(Box(298)), -Box(Box(299)), -Box(Box(300)), -Box(Box(301)), -Box(Box(302)), -Box(Box(303)), -Box(Box(304)), -Box(Box(305)), -Box(Box(306)), -Box(Box(307)), -Box(Box(308)), -Box(Box(309)), -Box(Box(310)), -Box(Box(311)), -Box(Box(312)), -Box(Box(313)), -Box(Box(314)), -Box(Box(315)), -Box(Box(316)), -Box(Box(317)), -Box(Box(318)), -Box(Box(319)), -Box(Box(320)), -Box(Box(321)), -Box(Box(322)), -Box(Box(323)), -Box(Box(324)), -Box(Box(325)), -Box(Box(326)), -Box(Box(327)), -Box(Box(328)), -Box(Box(329)), -Box(Box(330)), -Box(Box(331)), -Box(Box(332)), -Box(Box(333)), -Box(Box(334)), -Box(Box(335)), -Box(Box(336)), -Box(Box(337)), -Box(Box(338)), -Box(Box(339)), -Box(Box(340)), -Box(Box(341)), -Box(Box(342)), -Box(Box(343)), -Box(Box(344)), -Box(Box(345)), -Box(Box(346)), -Box(Box(347)), -Box(Box(348)), -Box(Box(349)), -Box(Box(350)), -Box(Box(351)), -Box(Box(352)), -Box(Box(353)), -Box(Box(354)), -Box(Box(355)), -Box(Box(356)), -Box(Box(357)), -Box(Box(358)), -Box(Box(359)), -Box(Box(360)), -Box(Box(361)), -Box(Box(362)), -Box(Box(363)), -Box(Box(364)), -Box(Box(365)), -Box(Box(366)), -Box(Box(367)), -Box(Box(368)), -Box(Box(369)), -Box(Box(370)), -Box(Box(371)), -Box(Box(372)), -Box(Box(373)), -Box(Box(374)), -Box(Box(375)), -Box(Box(376)), -Box(Box(377)), -Box(Box(378)), -Box(Box(379)), -Box(Box(380)), -Box(Box(381)), -Box(Box(382)), -Box(Box(383)), -Box(Box(384)), -Box(Box(385)), -Box(Box(386)), -Box(Box(387)), -Box(Box(388)), -Box(Box(389)), -Box(Box(390)), -Box(Box(391)), -Box(Box(392)), -Box(Box(393)), -Box(Box(394)), -Box(Box(395)), -Box(Box(396)), -Box(Box(397)), -Box(Box(398)), -Box(Box(399)), -Box(Box(400)), -Box(Box(401)), -Box(Box(402)), -Box(Box(403)), -Box(Box(404)), -Box(Box(405)), -Box(Box(406)), -Box(Box(407)), -Box(Box(408)), -Box(Box(409)), -Box(Box(410)), -Box(Box(411)), -Box(Box(412)), -Box(Box(413)), -Box(Box(414)), -Box(Box(415)), -Box(Box(416)), -Box(Box(417)), -Box(Box(418)), -Box(Box(419)), -Box(Box(420)), -Box(Box(421)), -Box(Box(422)), -Box(Box(423)), -Box(Box(424)), -Box(Box(425)), -Box(Box(426)), -Box(Box(427)), -Box(Box(428)), -Box(Box(429)), -Box(Box(430)), -Box(Box(431)), -Box(Box(432)), -Box(Box(433)), -Box(Box(434)), -Box(Box(435)), -Box(Box(436)), -Box(Box(437)), -Box(Box(438)), -Box(Box(439)), -Box(Box(440)), -Box(Box(441)), -Box(Box(442)), -Box(Box(443)), -Box(Box(444)), -Box(Box(445)), -Box(Box(446)), -Box(Box(447)), -Box(Box(448)), -Box(Box(449)), -Box(Box(450)), -Box(Box(451)), -Box(Box(452)), -Box(Box(453)), -Box(Box(454)), -Box(Box(455)), -Box(Box(456)), -Box(Box(457)), -Box(Box(458)), -Box(Box(459)), -Box(Box(460)), -Box(Box(461)), -Box(Box(462)), -Box(Box(463)), -Box(Box(464)), -Box(Box(465)), -Box(Box(466)), -Box(Box(467)), -Box(Box(468)), -Box(Box(469)), -Box(Box(470)), -Box(Box(471)), -Box(Box(472)), -Box(Box(473)), -Box(Box(474)), -Box(Box(475)), -Box(Box(476)), -Box(Box(477)), -Box(Box(478)), -Box(Box(479)), -Box(Box(480)), -Box(Box(481)), -Box(Box(482)), -Box(Box(483)), -Box(Box(484)), -Box(Box(485)), -Box(Box(486)), -Box(Box(487)), -Box(Box(488)), -Box(Box(489)), -Box(Box(490)), -Box(Box(491)), -Box(Box(492)), -Box(Box(493)), -Box(Box(494)), -Box(Box(495)), -Box(Box(496)), -Box(Box(497)), -Box(Box(498)), -Box(Box(499)), -Box(Box(500)), -Box(Box(501)), -Box(Box(502)), -Box(Box(503)), -Box(Box(504)), -Box(Box(505)), -Box(Box(506)), -Box(Box(507)), -Box(Box(508)), -Box(Box(509)), -Box(Box(510)), -Box(Box(511)), -Box(Box(512)), -Box(Box(513)), -Box(Box(514)), -Box(Box(515)), -Box(Box(516)), -Box(Box(517)), -Box(Box(518)), -Box(Box(519)), -Box(Box(520)), -Box(Box(521)), -Box(Box(522)), -Box(Box(523)), -Box(Box(524)), -Box(Box(525)), -Box(Box(526)), -Box(Box(527)), -Box(Box(528)), -Box(Box(529)), -Box(Box(530)), -Box(Box(531)), -Box(Box(532)), -Box(Box(533)), -Box(Box(534)), -Box(Box(535)), -Box(Box(536)), -Box(Box(537)), -Box(Box(538)), -Box(Box(539)), -Box(Box(540)), -Box(Box(541)), -Box(Box(542)), -Box(Box(543)), -Box(Box(544)), -Box(Box(545)), -Box(Box(546)), -Box(Box(547)), -Box(Box(548)), -Box(Box(549)), -Box(Box(550)), -Box(Box(551)), -Box(Box(552)), -Box(Box(553)), -Box(Box(554)), -Box(Box(555)), -Box(Box(556)), -Box(Box(557)), -Box(Box(558)), -Box(Box(559)), -Box(Box(560)), -Box(Box(561)), -Box(Box(562)), -Box(Box(563)), -Box(Box(564)), -Box(Box(565)), -Box(Box(566)), -Box(Box(567)), -Box(Box(568)), -Box(Box(569)), -Box(Box(570)), -Box(Box(571)), -Box(Box(572)), -Box(Box(573)), -Box(Box(574)), -Box(Box(575)), -Box(Box(576)), -Box(Box(577)), -Box(Box(578)), -Box(Box(579)), -Box(Box(580)), -Box(Box(581)), -Box(Box(582)), -Box(Box(583)), -Box(Box(584)), -Box(Box(585)), -Box(Box(586)), -Box(Box(587)), -Box(Box(588)), -Box(Box(589)), -Box(Box(590)), -Box(Box(591)), -Box(Box(592)), -Box(Box(593)), -Box(Box(594)), -Box(Box(595)), -Box(Box(596)), -Box(Box(597)), -Box(Box(598)), -Box(Box(599)), -Box(Box(600)), -Box(Box(601)), -Box(Box(602)), -Box(Box(603)), -Box(Box(604)), -Box(Box(605)), -Box(Box(606)), -Box(Box(607)), -Box(Box(608)), -Box(Box(609)), -Box(Box(610)), -Box(Box(611)), -Box(Box(612)), -Box(Box(613)), -Box(Box(614)), -Box(Box(615)), -Box(Box(616)), -Box(Box(617)), -Box(Box(618)), -Box(Box(619)), -Box(Box(620)), -Box(Box(621)), -Box(Box(622)), -Box(Box(623)), -Box(Box(624)), -Box(Box(625)), -Box(Box(626)), -Box(Box(627)), -Box(Box(628)), -Box(Box(629)), -Box(Box(630)), -Box(Box(631)), -Box(Box(632)), -Box(Box(633)), -Box(Box(634)), -Box(Box(635)), -Box(Box(636)), -Box(Box(637)), -Box(Box(638)), -Box(Box(639)), -Box(Box(640)), -Box(Box(641)), -Box(Box(642)), -Box(Box(643)), -Box(Box(644)), -Box(Box(645)), -Box(Box(646)), -Box(Box(647)), -Box(Box(648)), -Box(Box(649)), -Box(Box(650)), -Box(Box(651)), -Box(Box(652)), -Box(Box(653)), -Box(Box(654)), -Box(Box(655)), -Box(Box(656)), -Box(Box(657)), -Box(Box(658)), -Box(Box(659)), -Box(Box(660)), -Box(Box(661)), -Box(Box(662)), -Box(Box(663)), -Box(Box(664)), -Box(Box(665)), -Box(Box(666)), -Box(Box(667)), -Box(Box(668)), -Box(Box(669)), -Box(Box(670)), -Box(Box(671)), -Box(Box(672)), -Box(Box(673)), -Box(Box(674)), -Box(Box(675)), -Box(Box(676)), -Box(Box(677)), -Box(Box(678)), -Box(Box(679)), -Box(Box(680)), -Box(Box(681)), -Box(Box(682)), -Box(Box(683)), -Box(Box(684)), -Box(Box(685)), -Box(Box(686)), -Box(Box(687)), -Box(Box(688)), -Box(Box(689)), -Box(Box(690)), -Box(Box(691)), -Box(Box(692)), -Box(Box(693)), -Box(Box(694)), -Box(Box(695)), -Box(Box(696)), -Box(Box(697)), -Box(Box(698)), -Box(Box(699)), -Box(Box(700)), -Box(Box(701)), -Box(Box(702)), -Box(Box(703)), -Box(Box(704)), -Box(Box(705)), -Box(Box(706)), -Box(Box(707)), -Box(Box(708)), -Box(Box(709)), -Box(Box(710)), -Box(Box(711)), -Box(Box(712)), -Box(Box(713)), -Box(Box(714)), -Box(Box(715)), -Box(Box(716)), -Box(Box(717)), -Box(Box(718)), -Box(Box(719)), -Box(Box(720)), -Box(Box(721)), -Box(Box(722)), -Box(Box(723)), -Box(Box(724)), -Box(Box(725)), -Box(Box(726)), -Box(Box(727)), -Box(Box(728)), -Box(Box(729)), -Box(Box(730)), -Box(Box(731)), -Box(Box(732)), -Box(Box(733)), -Box(Box(734)), -Box(Box(735)), -Box(Box(736)), -Box(Box(737)), -Box(Box(738)), -Box(Box(739)), -Box(Box(740)), -Box(Box(741)), -Box(Box(742)), -Box(Box(743)), -Box(Box(744)), -Box(Box(745)), -Box(Box(746)), -Box(Box(747)), -Box(Box(748)), -Box(Box(749)), -Box(Box(750)), -Box(Box(751)), -Box(Box(752)), -Box(Box(753)), -Box(Box(754)), -Box(Box(755)), -Box(Box(756)), -Box(Box(757)), -Box(Box(758)), -Box(Box(759)), -Box(Box(760)), -Box(Box(761)), -Box(Box(762)), -Box(Box(763)), -Box(Box(764)), -Box(Box(765)), -Box(Box(766)), -Box(Box(767)), -Box(Box(768)), -Box(Box(769)), -Box(Box(770)), -Box(Box(771)), -Box(Box(772)), -Box(Box(773)), -Box(Box(774)), -Box(Box(775)), -Box(Box(776)), -Box(Box(777)), -Box(Box(778)), -Box(Box(779)), -Box(Box(780)), -Box(Box(781)), -Box(Box(782)), -Box(Box(783)), -Box(Box(784)), -Box(Box(785)), -Box(Box(786)), -Box(Box(787)), -Box(Box(788)), -Box(Box(789)), -Box(Box(790)), -Box(Box(791)), -Box(Box(792)), -Box(Box(793)), -Box(Box(794)), -Box(Box(795)), -Box(Box(796)), -Box(Box(797)), -Box(Box(798)), -Box(Box(799)), -Box(Box(800)), -Box(Box(801)), -Box(Box(802)), -Box(Box(803)), -Box(Box(804)), -Box(Box(805)), -Box(Box(806)), -Box(Box(807)), -Box(Box(808)), -Box(Box(809)), -Box(Box(810)), -Box(Box(811)), -Box(Box(812)), -Box(Box(813)), -Box(Box(814)), -Box(Box(815)), -Box(Box(816)), -Box(Box(817)), -Box(Box(818)), -Box(Box(819)), -Box(Box(820)), -Box(Box(821)), -Box(Box(822)), -Box(Box(823)), -Box(Box(824)), -Box(Box(825)), -Box(Box(826)), -Box(Box(827)), -Box(Box(828)), -Box(Box(829)), -Box(Box(830)), -Box(Box(831)), -Box(Box(832)), -Box(Box(833)), -Box(Box(834)), -Box(Box(835)), -Box(Box(836)), -Box(Box(837)), -Box(Box(838)), -Box(Box(839)), -Box(Box(840)), -Box(Box(841)), -Box(Box(842)), -Box(Box(843)), -Box(Box(844)), -Box(Box(845)), -Box(Box(846)), -Box(Box(847)), -Box(Box(848)), -Box(Box(849)), -Box(Box(850)), -Box(Box(851)), -Box(Box(852)), -Box(Box(853)), -Box(Box(854)), -Box(Box(855)), -Box(Box(856)), -Box(Box(857)), -Box(Box(858)), -Box(Box(859)), -Box(Box(860)), -Box(Box(861)), -Box(Box(862)), -Box(Box(863)), -Box(Box(864)), -Box(Box(865)), -Box(Box(866)), -Box(Box(867)), -Box(Box(868)), -Box(Box(869)), -Box(Box(870)), -Box(Box(871)), -Box(Box(872)), -Box(Box(873)), -Box(Box(874)), -Box(Box(875)), -Box(Box(876)), -Box(Box(877)), -Box(Box(878)), -Box(Box(879)), -Box(Box(880)), -Box(Box(881)), -Box(Box(882)), -Box(Box(883)), -Box(Box(884)), -Box(Box(885)), -Box(Box(886)), -Box(Box(887)), -Box(Box(888)), -Box(Box(889)), -Box(Box(890)), -Box(Box(891)), -Box(Box(892)), -Box(Box(893)), -Box(Box(894)), -Box(Box(895)), -Box(Box(896)), -Box(Box(897)), -Box(Box(898)), -Box(Box(899)), -Box(Box(900)), -Box(Box(901)), -Box(Box(902)), -Box(Box(903)), -Box(Box(904)), -Box(Box(905)), -Box(Box(906)), -Box(Box(907)), -Box(Box(908)), -Box(Box(909)), -Box(Box(910)), -Box(Box(911)), -Box(Box(912)), -Box(Box(913)), -Box(Box(914)), -Box(Box(915)), -Box(Box(916)), -Box(Box(917)), -Box(Box(918)), -Box(Box(919)), -Box(Box(920)), -Box(Box(921)), -Box(Box(922)), -Box(Box(923)), -Box(Box(924)), -Box(Box(925)), -Box(Box(926)), -Box(Box(927)), -Box(Box(928)), -Box(Box(929)), -Box(Box(930)), -Box(Box(931)), -Box(Box(932)), -Box(Box(933)), -Box(Box(934)), -Box(Box(935)), -Box(Box(936)), -Box(Box(937)), -Box(Box(938)), -Box(Box(939)), -Box(Box(940)), -Box(Box(941)), -Box(Box(942)), -Box(Box(943)), -Box(Box(944)), -Box(Box(945)), -Box(Box(946)), -Box(Box(947)), -Box(Box(948)), -Box(Box(949)), -Box(Box(950)), -Box(Box(951)), -Box(Box(952)), -Box(Box(953)), -Box(Box(954)), -Box(Box(955)), -Box(Box(956)), -Box(Box(957)), -Box(Box(958)), -Box(Box(959)), -Box(Box(960)), -Box(Box(961)), -Box(Box(962)), -Box(Box(963)), -Box(Box(964)), -Box(Box(965)), -Box(Box(966)), -Box(Box(967)), -Box(Box(968)), -Box(Box(969)), -Box(Box(970)), -Box(Box(971)), -Box(Box(972)), -Box(Box(973)), -Box(Box(974)), -Box(Box(975)), -Box(Box(976)), -Box(Box(977)), -Box(Box(978)), -Box(Box(979)), -Box(Box(980)), -Box(Box(981)), -Box(Box(982)), -Box(Box(983)), -Box(Box(984)), -Box(Box(985)), -Box(Box(986)), -Box(Box(987)), -Box(Box(988)), -Box(Box(989)), -Box(Box(990)), -Box(Box(991)), -Box(Box(992)), -Box(Box(993)), -Box(Box(994)), -Box(Box(995)), -Box(Box(996)), -Box(Box(997)), -Box(Box(998)), -Box(Box(999)), -Box(Box(1000)), -Box(Box(1001)), -Box(Box(1002)), -Box(Box(1003)), -Box(Box(1004)), -Box(Box(1005)), -Box(Box(1006)), -Box(Box(1007)), -Box(Box(1008)), -Box(Box(1009)), -Box(Box(1010)), -Box(Box(1011)), -Box(Box(1012)), -Box(Box(1013)), -Box(Box(1014)), -Box(Box(1015)), -Box(Box(1016)), -Box(Box(1017)), -Box(Box(1018)), -Box(Box(1019)), -Box(Box(1020)), -Box(Box(1021)), -Box(Box(1022)), -Box(Box(1023)), -Box(Box(1024)), -Box(Box(1025)), -Box(Box(1026)), -Box(Box(1027)), -Box(Box(1028)), -Box(Box(1029)), -Box(Box(1030)), -Box(Box(1031)), -Box(Box(1032)), -Box(Box(1033)), -Box(Box(1034)), -Box(Box(1035)), -Box(Box(1036)), -Box(Box(1037)), -Box(Box(1038)), -Box(Box(1039)), -Box(Box(1040)), -Box(Box(1041)), -Box(Box(1042)), -Box(Box(1043)), -Box(Box(1044)), -Box(Box(1045)), -Box(Box(1046)), -Box(Box(1047)), -Box(Box(1048)), -Box(Box(1049)), -Box(Box(1050)), -Box(Box(1051)), -Box(Box(1052)), -Box(Box(1053)), -Box(Box(1054)), -Box(Box(1055)), -Box(Box(1056)), -Box(Box(1057)), -Box(Box(1058)), -Box(Box(1059)), -Box(Box(1060)), -Box(Box(1061)), -Box(Box(1062)), -Box(Box(1063)), -Box(Box(1064)), -Box(Box(1065)), -Box(Box(1066)), -Box(Box(1067)), -Box(Box(1068)), -Box(Box(1069)), -Box(Box(1070)), -Box(Box(1071)), -Box(Box(1072)), -Box(Box(1073)), -Box(Box(1074)), -Box(Box(1075)), -Box(Box(1076)), -Box(Box(1077)), -Box(Box(1078)), -Box(Box(1079)), -Box(Box(1080)), -Box(Box(1081)), -Box(Box(1082)), -Box(Box(1083)), -Box(Box(1084)), -Box(Box(1085)), -Box(Box(1086)), -Box(Box(1087)), -Box(Box(1088)), -Box(Box(1089)), -Box(Box(1090)), -Box(Box(1091)), -Box(Box(1092)), -Box(Box(1093)), -Box(Box(1094)), -Box(Box(1095)), -Box(Box(1096)), -Box(Box(1097)), -Box(Box(1098)), -Box(Box(1099)), -Box(Box(1100)), -Box(Box(1101)), -Box(Box(1102)), -Box(Box(1103)), -Box(Box(1104)), -Box(Box(1105)), -Box(Box(1106)), -Box(Box(1107)), -Box(Box(1108)), -Box(Box(1109)), -Box(Box(1110)), -Box(Box(1111)), -Box(Box(1112)), -Box(Box(1113)), -Box(Box(1114)), -Box(Box(1115)), -Box(Box(1116)), -Box(Box(1117)), -Box(Box(1118)), -Box(Box(1119)), -Box(Box(1120)), -Box(Box(1121)), -Box(Box(1122)), -Box(Box(1123)), -Box(Box(1124)), -Box(Box(1125)), -Box(Box(1126)), -Box(Box(1127)), -Box(Box(1128)), -Box(Box(1129)), -Box(Box(1130)), -Box(Box(1131)), -Box(Box(1132)), -Box(Box(1133)), -Box(Box(1134)), -Box(Box(1135)), -Box(Box(1136)), -Box(Box(1137)), -Box(Box(1138)), -Box(Box(1139)), -Box(Box(1140)), -Box(Box(1141)), -Box(Box(1142)), -Box(Box(1143)), -Box(Box(1144)), -Box(Box(1145)), -Box(Box(1146)), -Box(Box(1147)), -Box(Box(1148)), -Box(Box(1149)), -Box(Box(1150)), -Box(Box(1151)), -Box(Box(1152)), -Box(Box(1153)), -Box(Box(1154)), -Box(Box(1155)), -Box(Box(1156)), -Box(Box(1157)), -Box(Box(1158)), -Box(Box(1159)), -Box(Box(1160)), -Box(Box(1161)), -Box(Box(1162)), -Box(Box(1163)), -Box(Box(1164)), -Box(Box(1165)), -Box(Box(1166)), -Box(Box(1167)), -Box(Box(1168)), -Box(Box(1169)), -Box(Box(1170)), -Box(Box(1171)), -Box(Box(1172)), -Box(Box(1173)), -Box(Box(1174)), -Box(Box(1175)), -Box(Box(1176)), -Box(Box(1177)), -Box(Box(1178)), -Box(Box(1179)), -Box(Box(1180)), -Box(Box(1181)), -Box(Box(1182)), -Box(Box(1183)), -Box(Box(1184)), -Box(Box(1185)), -Box(Box(1186)), -Box(Box(1187)), -Box(Box(1188)), -Box(Box(1189)), -Box(Box(1190)), -Box(Box(1191)), -Box(Box(1192)), -Box(Box(1193)), -Box(Box(1194)), -Box(Box(1195)), -Box(Box(1196)), -Box(Box(1197)), -Box(Box(1198)), -Box(Box(1199)), -Box(Box(1200)), -Box(Box(1201)), -Box(Box(1202)), -Box(Box(1203)), -Box(Box(1204)), -Box(Box(1205)), -Box(Box(1206)), -Box(Box(1207)), -Box(Box(1208)), -Box(Box(1209)), -Box(Box(1210)), -Box(Box(1211)), -Box(Box(1212)), -Box(Box(1213)), -Box(Box(1214)), -Box(Box(1215)), -Box(Box(1216)), -Box(Box(1217)), -Box(Box(1218)), -Box(Box(1219)), -Box(Box(1220)), -Box(Box(1221)), -Box(Box(1222)), -Box(Box(1223)), -Box(Box(1224)), -Box(Box(1225)), -Box(Box(1226)), -Box(Box(1227)), -Box(Box(1228)), -Box(Box(1229)), -Box(Box(1230)), -Box(Box(1231)), -Box(Box(1232)), -Box(Box(1233)), -Box(Box(1234)), -Box(Box(1235)), -Box(Box(1236)), -Box(Box(1237)), -Box(Box(1238)), -Box(Box(1239)), -Box(Box(1240)), -Box(Box(1241)), -Box(Box(1242)), -Box(Box(1243)), -Box(Box(1244)), -Box(Box(1245)), -Box(Box(1246)), -Box(Box(1247)), -Box(Box(1248)), -Box(Box(1249)), -Box(Box(1250)), -Box(Box(1251)), -Box(Box(1252)), -Box(Box(1253)), -Box(Box(1254)), -Box(Box(1255)), -Box(Box(1256)), -Box(Box(1257)), -Box(Box(1258)), -Box(Box(1259)), -Box(Box(1260)), -Box(Box(1261)), -Box(Box(1262)), -Box(Box(1263)), -Box(Box(1264)), -Box(Box(1265)), -Box(Box(1266)), -Box(Box(1267)), -Box(Box(1268)), -Box(Box(1269)), -Box(Box(1270)), -Box(Box(1271)), -Box(Box(1272)), -Box(Box(1273)), -Box(Box(1274)), -Box(Box(1275)), -Box(Box(1276)), -Box(Box(1277)), -Box(Box(1278)), -Box(Box(1279)), -Box(Box(1280)), -Box(Box(1281)), -Box(Box(1282)), -Box(Box(1283)), -Box(Box(1284)), -Box(Box(1285)), -Box(Box(1286)), -Box(Box(1287)), -Box(Box(1288)), -Box(Box(1289)), -Box(Box(1290)), -Box(Box(1291)), -Box(Box(1292)), -Box(Box(1293)), -Box(Box(1294)), -Box(Box(1295)), -Box(Box(1296)), -Box(Box(1297)), -Box(Box(1298)), -Box(Box(1299)), -Box(Box(1300)), -Box(Box(1301)), -Box(Box(1302)), -Box(Box(1303)), -Box(Box(1304)), -Box(Box(1305)), -Box(Box(1306)), -Box(Box(1307)), -Box(Box(1308)), -Box(Box(1309)), -Box(Box(1310)), -Box(Box(1311)), -Box(Box(1312)), -Box(Box(1313)), -Box(Box(1314)), -Box(Box(1315)), -Box(Box(1316)), -Box(Box(1317)), -Box(Box(1318)), -Box(Box(1319)), -Box(Box(1320)), -Box(Box(1321)), -Box(Box(1322)), -Box(Box(1323)), -Box(Box(1324)), -Box(Box(1325)), -Box(Box(1326)), -Box(Box(1327)), -Box(Box(1328)), -Box(Box(1329)), -Box(Box(1330)), -Box(Box(1331)), -Box(Box(1332)), -Box(Box(1333)), -Box(Box(1334)), -Box(Box(1335)), -Box(Box(1336)), -Box(Box(1337)), -Box(Box(1338)), -Box(Box(1339)), -Box(Box(1340)), -Box(Box(1341)), -Box(Box(1342)), -Box(Box(1343)), -Box(Box(1344)), -Box(Box(1345)), -Box(Box(1346)), -Box(Box(1347)), -Box(Box(1348)), -Box(Box(1349)), -Box(Box(1350)), -Box(Box(1351)), -Box(Box(1352)), -Box(Box(1353)), -Box(Box(1354)), -Box(Box(1355)), -Box(Box(1356)), -Box(Box(1357)), -Box(Box(1358)), -Box(Box(1359)), -Box(Box(1360)), -Box(Box(1361)), -Box(Box(1362)), -Box(Box(1363)), -Box(Box(1364)), -Box(Box(1365)), -Box(Box(1366)), -Box(Box(1367)), -Box(Box(1368)), -Box(Box(1369)), -Box(Box(1370)), -Box(Box(1371)), -Box(Box(1372)), -Box(Box(1373)), -Box(Box(1374)), -Box(Box(1375)), -Box(Box(1376)), -Box(Box(1377)), -Box(Box(1378)), -Box(Box(1379)), -Box(Box(1380)), -Box(Box(1381)), -Box(Box(1382)), -Box(Box(1383)), -Box(Box(1384)), -Box(Box(1385)), -Box(Box(1386)), -Box(Box(1387)), -Box(Box(1388)), -Box(Box(1389)), -Box(Box(1390)), -Box(Box(1391)), -Box(Box(1392)), -Box(Box(1393)), -Box(Box(1394)), -Box(Box(1395)), -Box(Box(1396)), -Box(Box(1397)), -Box(Box(1398)), -Box(Box(1399)), -Box(Box(1400)), -Box(Box(1401)), -Box(Box(1402)), -Box(Box(1403)), -Box(Box(1404)), -Box(Box(1405)), -Box(Box(1406)), -Box(Box(1407)), -Box(Box(1408)), -Box(Box(1409)), -Box(Box(1410)), -Box(Box(1411)), -Box(Box(1412)), -Box(Box(1413)), -Box(Box(1414)), -Box(Box(1415)), -Box(Box(1416)), -Box(Box(1417)), -Box(Box(1418)), -Box(Box(1419)), -Box(Box(1420)), -Box(Box(1421)), -Box(Box(1422)), -Box(Box(1423)), -Box(Box(1424)), -Box(Box(1425)), -Box(Box(1426)), -Box(Box(1427)), -Box(Box(1428)), -Box(Box(1429)), -Box(Box(1430)), -Box(Box(1431)), -Box(Box(1432)), -Box(Box(1433)), -Box(Box(1434)), -Box(Box(1435)), -Box(Box(1436)), -Box(Box(1437)), -Box(Box(1438)), -Box(Box(1439)), -Box(Box(1440)), -Box(Box(1441)), -Box(Box(1442)), -Box(Box(1443)), -Box(Box(1444)), -Box(Box(1445)), -Box(Box(1446)), -Box(Box(1447)), -Box(Box(1448)), -Box(Box(1449)), -Box(Box(1450)), -Box(Box(1451)), -Box(Box(1452)), -Box(Box(1453)), -Box(Box(1454)), -Box(Box(1455)), -Box(Box(1456)), -Box(Box(1457)), -Box(Box(1458)), -Box(Box(1459)), -Box(Box(1460)), -Box(Box(1461)), -Box(Box(1462)), -Box(Box(1463)), -Box(Box(1464)), -Box(Box(1465)), -Box(Box(1466)), -Box(Box(1467)), -Box(Box(1468)), -Box(Box(1469)), -Box(Box(1470)), -Box(Box(1471)), -Box(Box(1472)), -Box(Box(1473)), -Box(Box(1474)), -Box(Box(1475)), -Box(Box(1476)), -Box(Box(1477)), -Box(Box(1478)), -Box(Box(1479)), -Box(Box(1480)), -Box(Box(1481)), -Box(Box(1482)), -Box(Box(1483)), -Box(Box(1484)), -Box(Box(1485)), -Box(Box(1486)), -Box(Box(1487)), -Box(Box(1488)), -Box(Box(1489)), -Box(Box(1490)), -Box(Box(1491)), -Box(Box(1492)), -Box(Box(1493)), -Box(Box(1494)), -Box(Box(1495)), -Box(Box(1496)), -Box(Box(1497)), -Box(Box(1498)), -Box(Box(1499)), -Box(Box(1500)), -Box(Box(1501)), -Box(Box(1502)), -Box(Box(1503)), -Box(Box(1504)), -Box(Box(1505)), -Box(Box(1506)), -Box(Box(1507)), -Box(Box(1508)), -Box(Box(1509)), -Box(Box(1510)), -Box(Box(1511)), -Box(Box(1512)), -Box(Box(1513)), -Box(Box(1514)), -Box(Box(1515)), -Box(Box(1516)), -Box(Box(1517)), -Box(Box(1518)), -Box(Box(1519)), -Box(Box(1520)), -Box(Box(1521)), -Box(Box(1522)), -Box(Box(1523)), -Box(Box(1524)), -Box(Box(1525)), -Box(Box(1526)), -Box(Box(1527)), -Box(Box(1528)), -Box(Box(1529)), -Box(Box(1530)), -Box(Box(1531)), -Box(Box(1532)), -Box(Box(1533)), -Box(Box(1534)), -Box(Box(1535)), -Box(Box(1536)), -Box(Box(1537)), -Box(Box(1538)), -Box(Box(1539)), -Box(Box(1540)), -Box(Box(1541)), -Box(Box(1542)), -Box(Box(1543)), -Box(Box(1544)), -Box(Box(1545)), -Box(Box(1546)), -Box(Box(1547)), -Box(Box(1548)), -Box(Box(1549)), -Box(Box(1550)), -Box(Box(1551)), -Box(Box(1552)), -Box(Box(1553)), -Box(Box(1554)), -Box(Box(1555)), -Box(Box(1556)), -Box(Box(1557)), -Box(Box(1558)), -Box(Box(1559)), -Box(Box(1560)), -Box(Box(1561)), -Box(Box(1562)), -Box(Box(1563)), -Box(Box(1564)), -Box(Box(1565)), -Box(Box(1566)), -Box(Box(1567)), -Box(Box(1568)), -Box(Box(1569)), -Box(Box(1570)), -Box(Box(1571)), -Box(Box(1572)), -Box(Box(1573)), -Box(Box(1574)), -Box(Box(1575)), -Box(Box(1576)), -Box(Box(1577)), -Box(Box(1578)), -Box(Box(1579)), -Box(Box(1580)), -Box(Box(1581)), -Box(Box(1582)), -Box(Box(1583)), -Box(Box(1584)), -Box(Box(1585)), -Box(Box(1586)), -Box(Box(1587)), -Box(Box(1588)), -Box(Box(1589)), -Box(Box(1590)), -Box(Box(1591)), -Box(Box(1592)), -Box(Box(1593)), -Box(Box(1594)), -Box(Box(1595)), -Box(Box(1596)), -Box(Box(1597)), -Box(Box(1598)), -Box(Box(1599)), -Box(Box(1600)), -Box(Box(1601)), -Box(Box(1602)), -Box(Box(1603)), -Box(Box(1604)), -Box(Box(1605)), -Box(Box(1606)), -Box(Box(1607)), -Box(Box(1608)), -Box(Box(1609)), -Box(Box(1610)), -Box(Box(1611)), -Box(Box(1612)), -Box(Box(1613)), -Box(Box(1614)), -Box(Box(1615)), -Box(Box(1616)), -Box(Box(1617)), -Box(Box(1618)), -Box(Box(1619)), -Box(Box(1620)), -Box(Box(1621)), -Box(Box(1622)), -Box(Box(1623)), -Box(Box(1624)), -Box(Box(1625)), -Box(Box(1626)), -Box(Box(1627)), -Box(Box(1628)), -Box(Box(1629)), -Box(Box(1630)), -Box(Box(1631)), -Box(Box(1632)), -Box(Box(1633)), -Box(Box(1634)), -Box(Box(1635)), -Box(Box(1636)), -Box(Box(1637)), -Box(Box(1638)), -Box(Box(1639)), -Box(Box(1640)), -Box(Box(1641)), -Box(Box(1642)), -Box(Box(1643)), -Box(Box(1644)), -Box(Box(1645)), -Box(Box(1646)), -Box(Box(1647)), -Box(Box(1648)), -Box(Box(1649)), -Box(Box(1650)), -Box(Box(1651)), -Box(Box(1652)), -Box(Box(1653)), -Box(Box(1654)), -Box(Box(1655)), -Box(Box(1656)), -Box(Box(1657)), -Box(Box(1658)), -Box(Box(1659)), -Box(Box(1660)), -Box(Box(1661)), -Box(Box(1662)), -Box(Box(1663)), -Box(Box(1664)), -Box(Box(1665)), -Box(Box(1666)), -Box(Box(1667)), -Box(Box(1668)), -Box(Box(1669)), -Box(Box(1670)), -Box(Box(1671)), -Box(Box(1672)), -Box(Box(1673)), -Box(Box(1674)), -Box(Box(1675)), -Box(Box(1676)), -Box(Box(1677)), -Box(Box(1678)), -Box(Box(1679)), -Box(Box(1680)), -Box(Box(1681)), -Box(Box(1682)), -Box(Box(1683)), -Box(Box(1684)), -Box(Box(1685)), -Box(Box(1686)), -Box(Box(1687)), -Box(Box(1688)), -Box(Box(1689)), -Box(Box(1690)), -Box(Box(1691)), -Box(Box(1692)), -Box(Box(1693)), -Box(Box(1694)), -Box(Box(1695)), -Box(Box(1696)), -Box(Box(1697)), -Box(Box(1698)), -Box(Box(1699)), -Box(Box(1700)), -Box(Box(1701)), -Box(Box(1702)), -Box(Box(1703)), -Box(Box(1704)), -Box(Box(1705)), -Box(Box(1706)), -Box(Box(1707)), -Box(Box(1708)), -Box(Box(1709)), -Box(Box(1710)), -Box(Box(1711)), -Box(Box(1712)), -Box(Box(1713)), -Box(Box(1714)), -Box(Box(1715)), -Box(Box(1716)), -Box(Box(1717)), -Box(Box(1718)), -Box(Box(1719)), -Box(Box(1720)), -Box(Box(1721)), -Box(Box(1722)), -Box(Box(1723)), -Box(Box(1724)), -Box(Box(1725)), -Box(Box(1726)), -Box(Box(1727)), -Box(Box(1728)), -Box(Box(1729)), -Box(Box(1730)), -Box(Box(1731)), -Box(Box(1732)), -Box(Box(1733)), -Box(Box(1734)), -Box(Box(1735)), -Box(Box(1736)), -Box(Box(1737)), -Box(Box(1738)), -Box(Box(1739)), -Box(Box(1740)), -Box(Box(1741)), -Box(Box(1742)), -Box(Box(1743)), -Box(Box(1744)), -Box(Box(1745)), -Box(Box(1746)), -Box(Box(1747)), -Box(Box(1748)), -Box(Box(1749)), -Box(Box(1750)), -Box(Box(1751)), -Box(Box(1752)), -Box(Box(1753)), -Box(Box(1754)), -Box(Box(1755)), -Box(Box(1756)), -Box(Box(1757)), -Box(Box(1758)), -Box(Box(1759)), -Box(Box(1760)), -Box(Box(1761)), -Box(Box(1762)), -Box(Box(1763)), -Box(Box(1764)), -Box(Box(1765)), -Box(Box(1766)), -Box(Box(1767)), -Box(Box(1768)), -Box(Box(1769)), -Box(Box(1770)), -Box(Box(1771)), -Box(Box(1772)), -Box(Box(1773)), -Box(Box(1774)), -Box(Box(1775)), -Box(Box(1776)), -Box(Box(1777)), -Box(Box(1778)), -Box(Box(1779)), -Box(Box(1780)), -Box(Box(1781)), -Box(Box(1782)), -Box(Box(1783)), -Box(Box(1784)), -Box(Box(1785)), -Box(Box(1786)), -Box(Box(1787)), -Box(Box(1788)), -Box(Box(1789)), -Box(Box(1790)), -Box(Box(1791)), -Box(Box(1792)), -Box(Box(1793)), -Box(Box(1794)), -Box(Box(1795)), -Box(Box(1796)), -Box(Box(1797)), -Box(Box(1798)), -Box(Box(1799)), -Box(Box(1800)), -Box(Box(1801)), -Box(Box(1802)), -Box(Box(1803)), -Box(Box(1804)), -Box(Box(1805)), -Box(Box(1806)), -Box(Box(1807)), -Box(Box(1808)), -Box(Box(1809)), -Box(Box(1810)), -Box(Box(1811)), -Box(Box(1812)), -Box(Box(1813)), -Box(Box(1814)), -Box(Box(1815)), -Box(Box(1816)), -Box(Box(1817)), -Box(Box(1818)), -Box(Box(1819)), -Box(Box(1820)), -Box(Box(1821)), -Box(Box(1822)), -Box(Box(1823)), -Box(Box(1824)), -Box(Box(1825)), -Box(Box(1826)), -Box(Box(1827)), -Box(Box(1828)), -Box(Box(1829)), -Box(Box(1830)), -Box(Box(1831)), -Box(Box(1832)), -Box(Box(1833)), -Box(Box(1834)), -Box(Box(1835)), -Box(Box(1836)), -Box(Box(1837)), -Box(Box(1838)), -Box(Box(1839)), -Box(Box(1840)), -Box(Box(1841)), -Box(Box(1842)), -Box(Box(1843)), -Box(Box(1844)), -Box(Box(1845)), -Box(Box(1846)), -Box(Box(1847)), -Box(Box(1848)), -Box(Box(1849)), -Box(Box(1850)), -Box(Box(1851)), -Box(Box(1852)), -Box(Box(1853)), -Box(Box(1854)), -Box(Box(1855)), -Box(Box(1856)), -Box(Box(1857)), -Box(Box(1858)), -Box(Box(1859)), -Box(Box(1860)), -Box(Box(1861)), -Box(Box(1862)), -Box(Box(1863)), -Box(Box(1864)), -Box(Box(1865)), -Box(Box(1866)), -Box(Box(1867)), -Box(Box(1868)), -Box(Box(1869)), -Box(Box(1870)), -Box(Box(1871)), -Box(Box(1872)), -Box(Box(1873)), -Box(Box(1874)), -Box(Box(1875)), -Box(Box(1876)), -Box(Box(1877)), -Box(Box(1878)), -Box(Box(1879)), -Box(Box(1880)), -Box(Box(1881)), -Box(Box(1882)), -Box(Box(1883)), -Box(Box(1884)), -Box(Box(1885)), -Box(Box(1886)), -Box(Box(1887)), -Box(Box(1888)), -Box(Box(1889)), -Box(Box(1890)), -Box(Box(1891)), -Box(Box(1892)), -Box(Box(1893)), -Box(Box(1894)), -Box(Box(1895)), -Box(Box(1896)), -Box(Box(1897)), -Box(Box(1898)), -Box(Box(1899)), -Box(Box(1900)), -Box(Box(1901)), -Box(Box(1902)), -Box(Box(1903)), -Box(Box(1904)), -Box(Box(1905)), -Box(Box(1906)), -Box(Box(1907)), -Box(Box(1908)), -Box(Box(1909)), -Box(Box(1910)), -Box(Box(1911)), -Box(Box(1912)), -Box(Box(1913)), -Box(Box(1914)), -Box(Box(1915)), -Box(Box(1916)), -Box(Box(1917)), -Box(Box(1918)), -Box(Box(1919)), -Box(Box(1920)), -Box(Box(1921)), -Box(Box(1922)), -Box(Box(1923)), -Box(Box(1924)), -Box(Box(1925)), -Box(Box(1926)), -Box(Box(1927)), -Box(Box(1928)), -Box(Box(1929)), -Box(Box(1930)), -Box(Box(1931)), -Box(Box(1932)), -Box(Box(1933)), -Box(Box(1934)), -Box(Box(1935)), -Box(Box(1936)), -Box(Box(1937)), -Box(Box(1938)), -Box(Box(1939)), -Box(Box(1940)), -Box(Box(1941)), -Box(Box(1942)), -Box(Box(1943)), -Box(Box(1944)), -Box(Box(1945)), -Box(Box(1946)), -Box(Box(1947)), -Box(Box(1948)), -Box(Box(1949)), -Box(Box(1950)), -Box(Box(1951)), -Box(Box(1952)), -Box(Box(1953)), -Box(Box(1954)), -Box(Box(1955)), -Box(Box(1956)), -Box(Box(1957)), -Box(Box(1958)), -Box(Box(1959)), -Box(Box(1960)), -Box(Box(1961)), -Box(Box(1962)), -Box(Box(1963)), -Box(Box(1964)), -Box(Box(1965)), -Box(Box(1966)), -Box(Box(1967)), -Box(Box(1968)), -Box(Box(1969)), -Box(Box(1970)), -Box(Box(1971)), -Box(Box(1972)), -Box(Box(1973)), -Box(Box(1974)), -Box(Box(1975)), -Box(Box(1976)), -Box(Box(1977)), -Box(Box(1978)), -Box(Box(1979)), -Box(Box(1980)), -Box(Box(1981)), -Box(Box(1982)), -Box(Box(1983)), -Box(Box(1984)), -Box(Box(1985)), -Box(Box(1986)), -Box(Box(1987)), -Box(Box(1988)), -Box(Box(1989)), -Box(Box(1990)), -Box(Box(1991)), -Box(Box(1992)), -Box(Box(1993)), -Box(Box(1994)), -Box(Box(1995)), -Box(Box(1996)), -Box(Box(1997)), -Box(Box(1998)), -Box(Box(1999)), -Box(Box(2000)), -Box(Box(2001)), -Box(Box(2002)), -Box(Box(2003)), -Box(Box(2004)), -Box(Box(2005)), -Box(Box(2006)), -Box(Box(2007)), -Box(Box(2008)), -Box(Box(2009)), -Box(Box(2010)), -Box(Box(2011)), -Box(Box(2012)), -Box(Box(2013)), -Box(Box(2014)), -Box(Box(2015)), -Box(Box(2016)), -Box(Box(2017)), -Box(Box(2018)), -Box(Box(2019)), -Box(Box(2020)), -Box(Box(2021)), -Box(Box(2022)), -Box(Box(2023)), -Box(Box(2024)), -Box(Box(2025)), -Box(Box(2026)), -Box(Box(2027)), -Box(Box(2028)), -Box(Box(2029)), -Box(Box(2030)), -Box(Box(2031)), -Box(Box(2032)), -Box(Box(2033)), -Box(Box(2034)), -Box(Box(2035)), -Box(Box(2036)), -Box(Box(2037)), -Box(Box(2038)), -Box(Box(2039)), -Box(Box(2040)), -Box(Box(2041)), -Box(Box(2042)), -Box(Box(2043)), -Box(Box(2044)), -Box(Box(2045)), -Box(Box(2046)), -Box(Box(2047)), -Box(Box(2048)), -Box(Box(2049)), -Box(Box(2050)), -Box(Box(2051)), -Box(Box(2052)), -Box(Box(2053)), -Box(Box(2054)), -Box(Box(2055)), -Box(Box(2056)), -Box(Box(2057)), -Box(Box(2058)), -Box(Box(2059)), -Box(Box(2060)), -Box(Box(2061)), -Box(Box(2062)), -Box(Box(2063)), -Box(Box(2064)), -Box(Box(2065)), -Box(Box(2066)), -Box(Box(2067)), -Box(Box(2068)), -Box(Box(2069)), -Box(Box(2070)), -Box(Box(2071)), -Box(Box(2072)), -Box(Box(2073)), -Box(Box(2074)), -Box(Box(2075)), -Box(Box(2076)), -Box(Box(2077)), -Box(Box(2078)), -Box(Box(2079)), -Box(Box(2080)), -Box(Box(2081)), -Box(Box(2082)), -Box(Box(2083)), -Box(Box(2084)), -Box(Box(2085)), -Box(Box(2086)), -Box(Box(2087)), -Box(Box(2088)), -Box(Box(2089)), -Box(Box(2090)), -Box(Box(2091)), -Box(Box(2092)), -Box(Box(2093)), -Box(Box(2094)), -Box(Box(2095)), -Box(Box(2096)), -Box(Box(2097)), -Box(Box(2098)), -Box(Box(2099)), -Box(Box(2100)), -Box(Box(2101)), -Box(Box(2102)), -Box(Box(2103)), -Box(Box(2104)), -Box(Box(2105)), -Box(Box(2106)), -Box(Box(2107)), -Box(Box(2108)), -Box(Box(2109)), -Box(Box(2110)), -Box(Box(2111)), -Box(Box(2112)), -Box(Box(2113)), -Box(Box(2114)), -Box(Box(2115)), -Box(Box(2116)), -Box(Box(2117)), -Box(Box(2118)), -Box(Box(2119)), -Box(Box(2120)), -Box(Box(2121)), -Box(Box(2122)), -Box(Box(2123)), -Box(Box(2124)), -Box(Box(2125)), -Box(Box(2126)), -Box(Box(2127)), -Box(Box(2128)), -Box(Box(2129)), -Box(Box(2130)), -Box(Box(2131)), -Box(Box(2132)), -Box(Box(2133)), -Box(Box(2134)), -Box(Box(2135)), -Box(Box(2136)), -Box(Box(2137)), -Box(Box(2138)), -Box(Box(2139)), -Box(Box(2140)), -Box(Box(2141)), -Box(Box(2142)), -Box(Box(2143)), -Box(Box(2144)), -Box(Box(2145)), -Box(Box(2146)), -Box(Box(2147)), -Box(Box(2148)), -Box(Box(2149)), -Box(Box(2150)), -Box(Box(2151)), -Box(Box(2152)), -Box(Box(2153)), -Box(Box(2154)), -Box(Box(2155)), -Box(Box(2156)), -Box(Box(2157)), -Box(Box(2158)), -Box(Box(2159)), -Box(Box(2160)), -Box(Box(2161)), -Box(Box(2162)), -Box(Box(2163)), -Box(Box(2164)), -Box(Box(2165)), -Box(Box(2166)), -Box(Box(2167)), -Box(Box(2168)), -Box(Box(2169)), -Box(Box(2170)), -Box(Box(2171)), -Box(Box(2172)), -Box(Box(2173)), -Box(Box(2174)), -Box(Box(2175)), -Box(Box(2176)), -Box(Box(2177)), -Box(Box(2178)), -Box(Box(2179)), -Box(Box(2180)), -Box(Box(2181)), -Box(Box(2182)), -Box(Box(2183)), -Box(Box(2184)), -Box(Box(2185)), -Box(Box(2186)), -Box(Box(2187)), -Box(Box(2188)), -Box(Box(2189)), -Box(Box(2190)), -Box(Box(2191)), -Box(Box(2192)), -Box(Box(2193)), -Box(Box(2194)), -Box(Box(2195)), -Box(Box(2196)), -Box(Box(2197)), -Box(Box(2198)), -Box(Box(2199)), -Box(Box(2200)), -Box(Box(2201)), -Box(Box(2202)), -Box(Box(2203)), -Box(Box(2204)), -Box(Box(2205)), -Box(Box(2206)), -Box(Box(2207)), -Box(Box(2208)), -Box(Box(2209)), -Box(Box(2210)), -Box(Box(2211)), -Box(Box(2212)), -Box(Box(2213)), -Box(Box(2214)), -Box(Box(2215)), -Box(Box(2216)), -Box(Box(2217)), -Box(Box(2218)), -Box(Box(2219)), -Box(Box(2220)), -Box(Box(2221)), -Box(Box(2222)), -Box(Box(2223)), -Box(Box(2224)), -Box(Box(2225)), -Box(Box(2226)), -Box(Box(2227)), -Box(Box(2228)), -Box(Box(2229)), -Box(Box(2230)), -Box(Box(2231)), -Box(Box(2232)), -Box(Box(2233)), -Box(Box(2234)), -Box(Box(2235)), -Box(Box(2236)), -Box(Box(2237)), -Box(Box(2238)), -Box(Box(2239)), -Box(Box(2240)), -Box(Box(2241)), -Box(Box(2242)), -Box(Box(2243)), -Box(Box(2244)), -Box(Box(2245)), -Box(Box(2246)), -Box(Box(2247)), -Box(Box(2248)), -Box(Box(2249)), -Box(Box(2250)), -Box(Box(2251)), -Box(Box(2252)), -Box(Box(2253)), -Box(Box(2254)), -Box(Box(2255)), -Box(Box(2256)), -Box(Box(2257)), -Box(Box(2258)), -Box(Box(2259)), -Box(Box(2260)), -Box(Box(2261)), -Box(Box(2262)), -Box(Box(2263)), -Box(Box(2264)), -Box(Box(2265)), -Box(Box(2266)), -Box(Box(2267)), -Box(Box(2268)), -Box(Box(2269)), -Box(Box(2270)), -Box(Box(2271)), -Box(Box(2272)), -Box(Box(2273)), -Box(Box(2274)), -Box(Box(2275)), -Box(Box(2276)), -Box(Box(2277)), -Box(Box(2278)), -Box(Box(2279)), -Box(Box(2280)), -Box(Box(2281)), -Box(Box(2282)), -Box(Box(2283)), -Box(Box(2284)), -Box(Box(2285)), -Box(Box(2286)), -Box(Box(2287)), -Box(Box(2288)), -Box(Box(2289)), -Box(Box(2290)), -Box(Box(2291)), -Box(Box(2292)), -Box(Box(2293)), -Box(Box(2294)), -Box(Box(2295)), -Box(Box(2296)), -Box(Box(2297)), -Box(Box(2298)), -Box(Box(2299)), -Box(Box(2300)), -Box(Box(2301)), -Box(Box(2302)), -Box(Box(2303)), -Box(Box(2304)), -Box(Box(2305)), -Box(Box(2306)), -Box(Box(2307)), -Box(Box(2308)), -Box(Box(2309)), -Box(Box(2310)), -Box(Box(2311)), -Box(Box(2312)), -Box(Box(2313)), -Box(Box(2314)), -Box(Box(2315)), -Box(Box(2316)), -Box(Box(2317)), -Box(Box(2318)), -Box(Box(2319)), -Box(Box(2320)), -Box(Box(2321)), -Box(Box(2322)), -Box(Box(2323)), -Box(Box(2324)), -Box(Box(2325)), -Box(Box(2326)), -Box(Box(2327)), -Box(Box(2328)), -Box(Box(2329)), -Box(Box(2330)), -Box(Box(2331)), -Box(Box(2332)), -Box(Box(2333)), -Box(Box(2334)), -Box(Box(2335)), -Box(Box(2336)), -Box(Box(2337)), -Box(Box(2338)), -Box(Box(2339)), -Box(Box(2340)), -Box(Box(2341)), -Box(Box(2342)), -Box(Box(2343)), -Box(Box(2344)), -Box(Box(2345)), -Box(Box(2346)), -Box(Box(2347)), -Box(Box(2348)), -Box(Box(2349)), -Box(Box(2350)), -Box(Box(2351)), -Box(Box(2352)), -Box(Box(2353)), -Box(Box(2354)), -Box(Box(2355)), -Box(Box(2356)), -Box(Box(2357)), -Box(Box(2358)), -Box(Box(2359)), -Box(Box(2360)), -Box(Box(2361)), -Box(Box(2362)), -Box(Box(2363)), -Box(Box(2364)), -Box(Box(2365)), -Box(Box(2366)), -Box(Box(2367)), -Box(Box(2368)), -Box(Box(2369)), -Box(Box(2370)), -Box(Box(2371)), -Box(Box(2372)), -Box(Box(2373)), -Box(Box(2374)), -Box(Box(2375)), -Box(Box(2376)), -Box(Box(2377)), -Box(Box(2378)), -Box(Box(2379)), -Box(Box(2380)), -Box(Box(2381)), -Box(Box(2382)), -Box(Box(2383)), -Box(Box(2384)), -Box(Box(2385)), -Box(Box(2386)), -Box(Box(2387)), -Box(Box(2388)), -Box(Box(2389)), -Box(Box(2390)), -Box(Box(2391)), -Box(Box(2392)), -Box(Box(2393)), -Box(Box(2394)), -Box(Box(2395)), -Box(Box(2396)), -Box(Box(2397)), -Box(Box(2398)), -Box(Box(2399)), -Box(Box(2400)), -Box(Box(2401)), -Box(Box(2402)), -Box(Box(2403)), -Box(Box(2404)), -Box(Box(2405)), -Box(Box(2406)), -Box(Box(2407)), -Box(Box(2408)), -Box(Box(2409)), -Box(Box(2410)), -Box(Box(2411)), -Box(Box(2412)), -Box(Box(2413)), -Box(Box(2414)), -Box(Box(2415)), -Box(Box(2416)), -Box(Box(2417)), -Box(Box(2418)), -Box(Box(2419)), -Box(Box(2420)), -Box(Box(2421)), -Box(Box(2422)), -Box(Box(2423)), -Box(Box(2424)), -Box(Box(2425)), -Box(Box(2426)), -Box(Box(2427)), -Box(Box(2428)), -Box(Box(2429)), -Box(Box(2430)), -Box(Box(2431)), -Box(Box(2432)), -Box(Box(2433)), -Box(Box(2434)), -Box(Box(2435)), -Box(Box(2436)), -Box(Box(2437)), -Box(Box(2438)), -Box(Box(2439)), -Box(Box(2440)), -Box(Box(2441)), -Box(Box(2442)), -Box(Box(2443)), -Box(Box(2444)), -Box(Box(2445)), -Box(Box(2446)), -Box(Box(2447)), -Box(Box(2448)), -Box(Box(2449)), -Box(Box(2450)), -Box(Box(2451)), -Box(Box(2452)), -Box(Box(2453)), -Box(Box(2454)), -Box(Box(2455)), -Box(Box(2456)), -Box(Box(2457)), -Box(Box(2458)), -Box(Box(2459)), -Box(Box(2460)), -Box(Box(2461)), -Box(Box(2462)), -Box(Box(2463)), -Box(Box(2464)), -Box(Box(2465)), -Box(Box(2466)), -Box(Box(2467)), -Box(Box(2468)), -Box(Box(2469)), -Box(Box(2470)), -Box(Box(2471)), -Box(Box(2472)), -Box(Box(2473)), -Box(Box(2474)), -Box(Box(2475)), -Box(Box(2476)), -Box(Box(2477)), -Box(Box(2478)), -Box(Box(2479)), -Box(Box(2480)), -Box(Box(2481)), -Box(Box(2482)), -Box(Box(2483)), -Box(Box(2484)), -Box(Box(2485)), -Box(Box(2486)), -Box(Box(2487)), -Box(Box(2488)), -Box(Box(2489)), -Box(Box(2490)), -Box(Box(2491)), -Box(Box(2492)), -Box(Box(2493)), -Box(Box(2494)), -Box(Box(2495)), -Box(Box(2496)), -Box(Box(2497)), -Box(Box(2498)), -Box(Box(2499)), -Box(Box(2500)), -Box(Box(2501)), -Box(Box(2502)), -Box(Box(2503)), -Box(Box(2504)), -Box(Box(2505)), -Box(Box(2506)), -Box(Box(2507)), -Box(Box(2508)), -Box(Box(2509)), -Box(Box(2510)), -Box(Box(2511)), -Box(Box(2512)), -Box(Box(2513)), -Box(Box(2514)), -Box(Box(2515)), -Box(Box(2516)), -Box(Box(2517)), -Box(Box(2518)), -Box(Box(2519)), -Box(Box(2520)), -Box(Box(2521)), -Box(Box(2522)), -Box(Box(2523)), -Box(Box(2524)), -Box(Box(2525)), -Box(Box(2526)), -Box(Box(2527)), -Box(Box(2528)), -Box(Box(2529)), -Box(Box(2530)), -Box(Box(2531)), -Box(Box(2532)), -Box(Box(2533)), -Box(Box(2534)), -Box(Box(2535)), -Box(Box(2536)), -Box(Box(2537)), -Box(Box(2538)), -Box(Box(2539)), -Box(Box(2540)), -Box(Box(2541)), -Box(Box(2542)), -Box(Box(2543)), -Box(Box(2544)), -Box(Box(2545)), -Box(Box(2546)), -Box(Box(2547)), -Box(Box(2548)), -Box(Box(2549)), -Box(Box(2550)), -Box(Box(2551)), -Box(Box(2552)), -Box(Box(2553)), -Box(Box(2554)), -Box(Box(2555)), -Box(Box(2556)), -Box(Box(2557)), -Box(Box(2558)), -Box(Box(2559)), -Box(Box(2560)), -Box(Box(2561)), -Box(Box(2562)), -Box(Box(2563)), -Box(Box(2564)), -Box(Box(2565)), -Box(Box(2566)), -Box(Box(2567)), -Box(Box(2568)), -Box(Box(2569)), -Box(Box(2570)), -Box(Box(2571)), -Box(Box(2572)), -Box(Box(2573)), -Box(Box(2574)), -Box(Box(2575)), -Box(Box(2576)), -Box(Box(2577)), -Box(Box(2578)), -Box(Box(2579)), -Box(Box(2580)), -Box(Box(2581)), -Box(Box(2582)), -Box(Box(2583)), -Box(Box(2584)), -Box(Box(2585)), -Box(Box(2586)), -Box(Box(2587)), -Box(Box(2588)), -Box(Box(2589)), -Box(Box(2590)), -Box(Box(2591)), -Box(Box(2592)), -Box(Box(2593)), -Box(Box(2594)), -Box(Box(2595)), -Box(Box(2596)), -Box(Box(2597)), -Box(Box(2598)), -Box(Box(2599)), -Box(Box(2600)), -Box(Box(2601)), -Box(Box(2602)), -Box(Box(2603)), -Box(Box(2604)), -Box(Box(2605)), -Box(Box(2606)), -Box(Box(2607)), -Box(Box(2608)), -Box(Box(2609)), -Box(Box(2610)), -Box(Box(2611)), -Box(Box(2612)), -Box(Box(2613)), -Box(Box(2614)), -Box(Box(2615)), -Box(Box(2616)), -Box(Box(2617)), -Box(Box(2618)), -Box(Box(2619)), -Box(Box(2620)), -Box(Box(2621)), -Box(Box(2622)), -Box(Box(2623)), -Box(Box(2624)), -Box(Box(2625)), -Box(Box(2626)), -Box(Box(2627)), -Box(Box(2628)), -Box(Box(2629)), -Box(Box(2630)), -Box(Box(2631)), -Box(Box(2632)), -Box(Box(2633)), -Box(Box(2634)), -Box(Box(2635)), -Box(Box(2636)), -Box(Box(2637)), -Box(Box(2638)), -Box(Box(2639)), -Box(Box(2640)), -Box(Box(2641)), -Box(Box(2642)), -Box(Box(2643)), -Box(Box(2644)), -Box(Box(2645)), -Box(Box(2646)), -Box(Box(2647)), -Box(Box(2648)), -Box(Box(2649)), -Box(Box(2650)), -Box(Box(2651)), -Box(Box(2652)), -Box(Box(2653)), -Box(Box(2654)), -Box(Box(2655)), -Box(Box(2656)), -Box(Box(2657)), -Box(Box(2658)), -Box(Box(2659)), -Box(Box(2660)), -Box(Box(2661)), -Box(Box(2662)), -Box(Box(2663)), -Box(Box(2664)), -Box(Box(2665)), -Box(Box(2666)), -Box(Box(2667)), -Box(Box(2668)), -Box(Box(2669)), -Box(Box(2670)), -Box(Box(2671)), -Box(Box(2672)), -Box(Box(2673)), -Box(Box(2674)), -Box(Box(2675)), -Box(Box(2676)), -Box(Box(2677)), -Box(Box(2678)), -Box(Box(2679)), -Box(Box(2680)), -Box(Box(2681)), -Box(Box(2682)), -Box(Box(2683)), -Box(Box(2684)), -Box(Box(2685)), -Box(Box(2686)), -Box(Box(2687)), -Box(Box(2688)), -Box(Box(2689)), -Box(Box(2690)), -Box(Box(2691)), -Box(Box(2692)), -Box(Box(2693)), -Box(Box(2694)), -Box(Box(2695)), -Box(Box(2696)), -Box(Box(2697)), -Box(Box(2698)), -Box(Box(2699)), -Box(Box(2700)), -Box(Box(2701)), -Box(Box(2702)), -Box(Box(2703)), -Box(Box(2704)), -Box(Box(2705)), -Box(Box(2706)), -Box(Box(2707)), -Box(Box(2708)), -Box(Box(2709)), -Box(Box(2710)), -Box(Box(2711)), -Box(Box(2712)), -Box(Box(2713)), -Box(Box(2714)), -Box(Box(2715)), -Box(Box(2716)), -Box(Box(2717)), -Box(Box(2718)), -Box(Box(2719)), -Box(Box(2720)), -Box(Box(2721)), -Box(Box(2722)), -Box(Box(2723)), -Box(Box(2724)), -Box(Box(2725)), -Box(Box(2726)), -Box(Box(2727)), -Box(Box(2728)), -Box(Box(2729)), -Box(Box(2730)), -Box(Box(2731)), -Box(Box(2732)), -Box(Box(2733)), -Box(Box(2734)), -Box(Box(2735)), -Box(Box(2736)), -Box(Box(2737)), -Box(Box(2738)), -Box(Box(2739)), -Box(Box(2740)), -Box(Box(2741)), -Box(Box(2742)), -Box(Box(2743)), -Box(Box(2744)), -Box(Box(2745)), -Box(Box(2746)), -Box(Box(2747)), -Box(Box(2748)), -Box(Box(2749)), -Box(Box(2750)), -Box(Box(2751)), -Box(Box(2752)), -Box(Box(2753)), -Box(Box(2754)), -Box(Box(2755)), -Box(Box(2756)), -Box(Box(2757)), -Box(Box(2758)), -Box(Box(2759)), -Box(Box(2760)), -Box(Box(2761)), -Box(Box(2762)), -Box(Box(2763)), -Box(Box(2764)), -Box(Box(2765)), -Box(Box(2766)), -Box(Box(2767)), -Box(Box(2768)), -Box(Box(2769)), -Box(Box(2770)), -Box(Box(2771)), -Box(Box(2772)), -Box(Box(2773)), -Box(Box(2774)), -Box(Box(2775)), -Box(Box(2776)), -Box(Box(2777)), -Box(Box(2778)), -Box(Box(2779)), -Box(Box(2780)), -Box(Box(2781)), -Box(Box(2782)), -Box(Box(2783)), -Box(Box(2784)), -Box(Box(2785)), -Box(Box(2786)), -Box(Box(2787)), -Box(Box(2788)), -Box(Box(2789)), -Box(Box(2790)), -Box(Box(2791)), -Box(Box(2792)), -Box(Box(2793)), -Box(Box(2794)), -Box(Box(2795)), -Box(Box(2796)), -Box(Box(2797)), -Box(Box(2798)), -Box(Box(2799)), -Box(Box(2800)), -Box(Box(2801)), -Box(Box(2802)), -Box(Box(2803)), -Box(Box(2804)), -Box(Box(2805)), -Box(Box(2806)), -Box(Box(2807)), -Box(Box(2808)), -Box(Box(2809)), -Box(Box(2810)), -Box(Box(2811)), -Box(Box(2812)), -Box(Box(2813)), -Box(Box(2814)), -Box(Box(2815)), -Box(Box(2816)), -Box(Box(2817)), -Box(Box(2818)), -Box(Box(2819)), -Box(Box(2820)), -Box(Box(2821)), -Box(Box(2822)), -Box(Box(2823)), -Box(Box(2824)), -Box(Box(2825)), -Box(Box(2826)), -Box(Box(2827)), -Box(Box(2828)), -Box(Box(2829)), -Box(Box(2830)), -Box(Box(2831)), -Box(Box(2832)), -Box(Box(2833)), -Box(Box(2834)), -Box(Box(2835)), -Box(Box(2836)), -Box(Box(2837)), -Box(Box(2838)), -Box(Box(2839)), -Box(Box(2840)), -Box(Box(2841)), -Box(Box(2842)), -Box(Box(2843)), -Box(Box(2844)), -Box(Box(2845)), -Box(Box(2846)), -Box(Box(2847)), -Box(Box(2848)), -Box(Box(2849)), -Box(Box(2850)), -Box(Box(2851)), -Box(Box(2852)), -Box(Box(2853)), -Box(Box(2854)), -Box(Box(2855)), -Box(Box(2856)), -Box(Box(2857)), -Box(Box(2858)), -Box(Box(2859)), -Box(Box(2860)), -Box(Box(2861)), -Box(Box(2862)), -Box(Box(2863)), -Box(Box(2864)), -Box(Box(2865)), -Box(Box(2866)), -Box(Box(2867)), -Box(Box(2868)), -Box(Box(2869)), -Box(Box(2870)), -Box(Box(2871)), -Box(Box(2872)), -Box(Box(2873)), -Box(Box(2874)), -Box(Box(2875)), -Box(Box(2876)), -Box(Box(2877)), -Box(Box(2878)), -Box(Box(2879)), -Box(Box(2880)), -Box(Box(2881)), -Box(Box(2882)), -Box(Box(2883)), -Box(Box(2884)), -Box(Box(2885)), -Box(Box(2886)), -Box(Box(2887)), -Box(Box(2888)), -Box(Box(2889)), -Box(Box(2890)), -Box(Box(2891)), -Box(Box(2892)), -Box(Box(2893)), -Box(Box(2894)), -Box(Box(2895)), -Box(Box(2896)), -Box(Box(2897)), -Box(Box(2898)), -Box(Box(2899)), -Box(Box(2900)), -Box(Box(2901)), -Box(Box(2902)), -Box(Box(2903)), -Box(Box(2904)), -Box(Box(2905)), -Box(Box(2906)), -Box(Box(2907)), -Box(Box(2908)), -Box(Box(2909)), -Box(Box(2910)), -Box(Box(2911)), -Box(Box(2912)), -Box(Box(2913)), -Box(Box(2914)), -Box(Box(2915)), -Box(Box(2916)), -Box(Box(2917)), -Box(Box(2918)), -Box(Box(2919)), -Box(Box(2920)), -Box(Box(2921)), -Box(Box(2922)), -Box(Box(2923)), -Box(Box(2924)), -Box(Box(2925)), -Box(Box(2926)), -Box(Box(2927)), -Box(Box(2928)), -Box(Box(2929)), -Box(Box(2930)), -Box(Box(2931)), -Box(Box(2932)), -Box(Box(2933)), -Box(Box(2934)), -Box(Box(2935)), -Box(Box(2936)), -Box(Box(2937)), -Box(Box(2938)), -Box(Box(2939)), -Box(Box(2940)), -Box(Box(2941)), -Box(Box(2942)), -Box(Box(2943)), -Box(Box(2944)), -Box(Box(2945)), -Box(Box(2946)), -Box(Box(2947)), -Box(Box(2948)), -Box(Box(2949)), -Box(Box(2950)), -Box(Box(2951)), -Box(Box(2952)), -Box(Box(2953)), -Box(Box(2954)), -Box(Box(2955)), -Box(Box(2956)), -Box(Box(2957)), -Box(Box(2958)), -Box(Box(2959)), -Box(Box(2960)), -Box(Box(2961)), -Box(Box(2962)), -Box(Box(2963)), -Box(Box(2964)), -Box(Box(2965)), -Box(Box(2966)), -Box(Box(2967)), -Box(Box(2968)), -Box(Box(2969)), -Box(Box(2970)), -Box(Box(2971)), -Box(Box(2972)), -Box(Box(2973)), -Box(Box(2974)), -Box(Box(2975)), -Box(Box(2976)), -Box(Box(2977)), -Box(Box(2978)), -Box(Box(2979)), -Box(Box(2980)), -Box(Box(2981)), -Box(Box(2982)), -Box(Box(2983)), -Box(Box(2984)), -Box(Box(2985)), -Box(Box(2986)), -Box(Box(2987)), -Box(Box(2988)), -Box(Box(2989)), -Box(Box(2990)), -Box(Box(2991)), -Box(Box(2992)), -Box(Box(2993)), -Box(Box(2994)), -Box(Box(2995)), -Box(Box(2996)), -Box(Box(2997)), -Box(Box(2998)), -Box(Box(2999)), -Box(Box(3000)), -Box(Box(3001)), -Box(Box(3002)), -Box(Box(3003)), -Box(Box(3004)), -Box(Box(3005)), -Box(Box(3006)), -Box(Box(3007)), -Box(Box(3008)), -Box(Box(3009)), -Box(Box(3010)), -Box(Box(3011)), -Box(Box(3012)), -Box(Box(3013)), -Box(Box(3014)), -Box(Box(3015)), -Box(Box(3016)), -Box(Box(3017)), -Box(Box(3018)), -Box(Box(3019)), -Box(Box(3020)), -Box(Box(3021)), -Box(Box(3022)), -Box(Box(3023)), -Box(Box(3024)), -Box(Box(3025)), -Box(Box(3026)), -Box(Box(3027)), -Box(Box(3028)), -Box(Box(3029)), -Box(Box(3030)), -Box(Box(3031)), -Box(Box(3032)), -Box(Box(3033)), -Box(Box(3034)), -Box(Box(3035)), -Box(Box(3036)), -Box(Box(3037)), -Box(Box(3038)), -Box(Box(3039)), -Box(Box(3040)), -Box(Box(3041)), -Box(Box(3042)), -Box(Box(3043)), -Box(Box(3044)), -Box(Box(3045)), -Box(Box(3046)), -Box(Box(3047)), -Box(Box(3048)), -Box(Box(3049)), -Box(Box(3050)), -Box(Box(3051)), -Box(Box(3052)), -Box(Box(3053)), -Box(Box(3054)), -Box(Box(3055)), -Box(Box(3056)), -Box(Box(3057)), -Box(Box(3058)), -Box(Box(3059)), -Box(Box(3060)), -Box(Box(3061)), -Box(Box(3062)), -Box(Box(3063)), -Box(Box(3064)), -Box(Box(3065)), -Box(Box(3066)), -Box(Box(3067)), -Box(Box(3068)), -Box(Box(3069)), -Box(Box(3070)), -Box(Box(3071)), -Box(Box(3072)), -Box(Box(3073)), -Box(Box(3074)), -Box(Box(3075)), -Box(Box(3076)), -Box(Box(3077)), -Box(Box(3078)), -Box(Box(3079)), -Box(Box(3080)), -Box(Box(3081)), -Box(Box(3082)), -Box(Box(3083)), -Box(Box(3084)), -Box(Box(3085)), -Box(Box(3086)), -Box(Box(3087)), -Box(Box(3088)), -Box(Box(3089)), -Box(Box(3090)), -Box(Box(3091)), -Box(Box(3092)), -Box(Box(3093)), -Box(Box(3094)), -Box(Box(3095)), -Box(Box(3096)), -Box(Box(3097)), -Box(Box(3098)), -Box(Box(3099)), -Box(Box(3100)), -Box(Box(3101)), -Box(Box(3102)), -Box(Box(3103)), -Box(Box(3104)), -Box(Box(3105)), -Box(Box(3106)), -Box(Box(3107)), -Box(Box(3108)), -Box(Box(3109)), -Box(Box(3110)), -Box(Box(3111)), -Box(Box(3112)), -Box(Box(3113)), -Box(Box(3114)), -Box(Box(3115)), -Box(Box(3116)), -Box(Box(3117)), -Box(Box(3118)), -Box(Box(3119)), -Box(Box(3120)), -Box(Box(3121)), -Box(Box(3122)), -Box(Box(3123)), -Box(Box(3124)), -Box(Box(3125)), -Box(Box(3126)), -Box(Box(3127)), -Box(Box(3128)), -Box(Box(3129)), -Box(Box(3130)), -Box(Box(3131)), -Box(Box(3132)), -Box(Box(3133)), -Box(Box(3134)), -Box(Box(3135)), -Box(Box(3136)), -Box(Box(3137)), -Box(Box(3138)), -Box(Box(3139)), -Box(Box(3140)), -Box(Box(3141)), -Box(Box(3142)), -Box(Box(3143)), -Box(Box(3144)), -Box(Box(3145)), -Box(Box(3146)), -Box(Box(3147)), -Box(Box(3148)), -Box(Box(3149)), -Box(Box(3150)), -Box(Box(3151)), -Box(Box(3152)), -Box(Box(3153)), -Box(Box(3154)), -Box(Box(3155)), -Box(Box(3156)), -Box(Box(3157)), -Box(Box(3158)), -Box(Box(3159)), -Box(Box(3160)), -Box(Box(3161)), -Box(Box(3162)), -Box(Box(3163)), -Box(Box(3164)), -Box(Box(3165)), -Box(Box(3166)), -Box(Box(3167)), -Box(Box(3168)), -Box(Box(3169)), -Box(Box(3170)), -Box(Box(3171)), -Box(Box(3172)), -Box(Box(3173)), -Box(Box(3174)), -Box(Box(3175)), -Box(Box(3176)), -Box(Box(3177)), -Box(Box(3178)), -Box(Box(3179)), -Box(Box(3180)), -Box(Box(3181)), -Box(Box(3182)), -Box(Box(3183)), -Box(Box(3184)), -Box(Box(3185)), -Box(Box(3186)), -Box(Box(3187)), -Box(Box(3188)), -Box(Box(3189)), -Box(Box(3190)), -Box(Box(3191)), -Box(Box(3192)), -Box(Box(3193)), -Box(Box(3194)), -Box(Box(3195)), -Box(Box(3196)), -Box(Box(3197)), -Box(Box(3198)), -Box(Box(3199)), -Box(Box(3200)), -Box(Box(3201)), -Box(Box(3202)), -Box(Box(3203)), -Box(Box(3204)), -Box(Box(3205)), -Box(Box(3206)), -Box(Box(3207)), -Box(Box(3208)), -Box(Box(3209)), -Box(Box(3210)), -Box(Box(3211)), -Box(Box(3212)), -Box(Box(3213)), -Box(Box(3214)), -Box(Box(3215)), -Box(Box(3216)), -Box(Box(3217)), -Box(Box(3218)), -Box(Box(3219)), -Box(Box(3220)), -Box(Box(3221)), -Box(Box(3222)), -Box(Box(3223)), -Box(Box(3224)), -Box(Box(3225)), -Box(Box(3226)), -Box(Box(3227)), -Box(Box(3228)), -Box(Box(3229)), -Box(Box(3230)), -Box(Box(3231)), -Box(Box(3232)), -Box(Box(3233)), -Box(Box(3234)), -Box(Box(3235)), -Box(Box(3236)), -Box(Box(3237)), -Box(Box(3238)), -Box(Box(3239)), -Box(Box(3240)), -Box(Box(3241)), -Box(Box(3242)), -Box(Box(3243)), -Box(Box(3244)), -Box(Box(3245)), -Box(Box(3246)), -Box(Box(3247)), -Box(Box(3248)), -Box(Box(3249)), -Box(Box(3250)), -Box(Box(3251)), -Box(Box(3252)), -Box(Box(3253)), -Box(Box(3254)), -Box(Box(3255)), -Box(Box(3256)), -Box(Box(3257)), -Box(Box(3258)), -Box(Box(3259)), -Box(Box(3260)), -Box(Box(3261)), -Box(Box(3262)), -Box(Box(3263)), -Box(Box(3264)), -Box(Box(3265)), -Box(Box(3266)), -Box(Box(3267)), -Box(Box(3268)), -Box(Box(3269)), -Box(Box(3270)), -Box(Box(3271)), -Box(Box(3272)), -Box(Box(3273)), -Box(Box(3274)), -Box(Box(3275)), -Box(Box(3276)), -Box(Box(3277)), -Box(Box(3278)), -Box(Box(3279)), -Box(Box(3280)), -Box(Box(3281)), -Box(Box(3282)), -Box(Box(3283)), -Box(Box(3284)), -Box(Box(3285)), -Box(Box(3286)), -Box(Box(3287)), -Box(Box(3288)), -Box(Box(3289)), -Box(Box(3290)), -Box(Box(3291)), -Box(Box(3292)), -Box(Box(3293)), -Box(Box(3294)), -Box(Box(3295)), -Box(Box(3296)), -Box(Box(3297)), -Box(Box(3298)), -Box(Box(3299)), -Box(Box(3300)), -Box(Box(3301)), -Box(Box(3302)), -Box(Box(3303)), -Box(Box(3304)), -Box(Box(3305)), -Box(Box(3306)), -Box(Box(3307)), -Box(Box(3308)), -Box(Box(3309)), -Box(Box(3310)), -Box(Box(3311)), -Box(Box(3312)), -Box(Box(3313)), -Box(Box(3314)), -Box(Box(3315)), -Box(Box(3316)), -Box(Box(3317)), -Box(Box(3318)), -Box(Box(3319)), -Box(Box(3320)), -Box(Box(3321)), -Box(Box(3322)), -Box(Box(3323)), -Box(Box(3324)), -Box(Box(3325)), -Box(Box(3326)), -Box(Box(3327)), -Box(Box(3328)), -Box(Box(3329)), -Box(Box(3330)), -Box(Box(3331)), -Box(Box(3332)), -Box(Box(3333)), -Box(Box(3334)), -Box(Box(3335)), -Box(Box(3336)), -Box(Box(3337)), -Box(Box(3338)), -Box(Box(3339)), -Box(Box(3340)), -Box(Box(3341)), -Box(Box(3342)), -Box(Box(3343)), -Box(Box(3344)), -Box(Box(3345)), -Box(Box(3346)), -Box(Box(3347)), -Box(Box(3348)), -Box(Box(3349)), -Box(Box(3350)), -Box(Box(3351)), -Box(Box(3352)), -Box(Box(3353)), -Box(Box(3354)), -Box(Box(3355)), -Box(Box(3356)), -Box(Box(3357)), -Box(Box(3358)), -Box(Box(3359)), -Box(Box(3360)), -Box(Box(3361)), -Box(Box(3362)), -Box(Box(3363)), -Box(Box(3364)), -Box(Box(3365)), -Box(Box(3366)), -Box(Box(3367)), -Box(Box(3368)), -Box(Box(3369)), -Box(Box(3370)), -Box(Box(3371)), -Box(Box(3372)), -Box(Box(3373)), -Box(Box(3374)), -Box(Box(3375)), -Box(Box(3376)), -Box(Box(3377)), -Box(Box(3378)), -Box(Box(3379)), -Box(Box(3380)), -Box(Box(3381)), -Box(Box(3382)), -Box(Box(3383)), -Box(Box(3384)), -Box(Box(3385)), -Box(Box(3386)), -Box(Box(3387)), -Box(Box(3388)), -Box(Box(3389)), -Box(Box(3390)), -Box(Box(3391)), -Box(Box(3392)), -Box(Box(3393)), -Box(Box(3394)), -Box(Box(3395)), -Box(Box(3396)), -Box(Box(3397)), -Box(Box(3398)), -Box(Box(3399)), -Box(Box(3400)), -Box(Box(3401)), -Box(Box(3402)), -Box(Box(3403)), -Box(Box(3404)), -Box(Box(3405)), -Box(Box(3406)), -Box(Box(3407)), -Box(Box(3408)), -Box(Box(3409)), -Box(Box(3410)), -Box(Box(3411)), -Box(Box(3412)), -Box(Box(3413)), -Box(Box(3414)), -Box(Box(3415)), -Box(Box(3416)), -Box(Box(3417)), -Box(Box(3418)), -Box(Box(3419)), -Box(Box(3420)), -Box(Box(3421)), -Box(Box(3422)), -Box(Box(3423)), -Box(Box(3424)), -Box(Box(3425)), -Box(Box(3426)), -Box(Box(3427)), -Box(Box(3428)), -Box(Box(3429)), -Box(Box(3430)), -Box(Box(3431)), -Box(Box(3432)), -Box(Box(3433)), -Box(Box(3434)), -Box(Box(3435)), -Box(Box(3436)), -Box(Box(3437)), -Box(Box(3438)), -Box(Box(3439)), -Box(Box(3440)), -Box(Box(3441)), -Box(Box(3442)), -Box(Box(3443)), -Box(Box(3444)), -Box(Box(3445)), -Box(Box(3446)), -Box(Box(3447)), -Box(Box(3448)), -Box(Box(3449)), -Box(Box(3450)), -Box(Box(3451)), -Box(Box(3452)), -Box(Box(3453)), -Box(Box(3454)), -Box(Box(3455)), -Box(Box(3456)), -Box(Box(3457)), -Box(Box(3458)), -Box(Box(3459)), -Box(Box(3460)), -Box(Box(3461)), -Box(Box(3462)), -Box(Box(3463)), -Box(Box(3464)), -Box(Box(3465)), -Box(Box(3466)), -Box(Box(3467)), -Box(Box(3468)), -Box(Box(3469)), -Box(Box(3470)), -Box(Box(3471)), -Box(Box(3472)), -Box(Box(3473)), -Box(Box(3474)), -Box(Box(3475)), -Box(Box(3476)), -Box(Box(3477)), -Box(Box(3478)), -Box(Box(3479)), -Box(Box(3480)), -Box(Box(3481)), -Box(Box(3482)), -Box(Box(3483)), -Box(Box(3484)), -Box(Box(3485)), -Box(Box(3486)), -Box(Box(3487)), -Box(Box(3488)), -Box(Box(3489)), -Box(Box(3490)), -Box(Box(3491)), -Box(Box(3492)), -Box(Box(3493)), -Box(Box(3494)), -Box(Box(3495)), -Box(Box(3496)), -Box(Box(3497)), -Box(Box(3498)), -Box(Box(3499)), -Box(Box(3500)), -Box(Box(3501)), -Box(Box(3502)), -Box(Box(3503)), -Box(Box(3504)), -Box(Box(3505)), -Box(Box(3506)), -Box(Box(3507)), -Box(Box(3508)), -Box(Box(3509)), -Box(Box(3510)), -Box(Box(3511)), -Box(Box(3512)), -Box(Box(3513)), -Box(Box(3514)), -Box(Box(3515)), -Box(Box(3516)), -Box(Box(3517)), -Box(Box(3518)), -Box(Box(3519)), -Box(Box(3520)), -Box(Box(3521)), -Box(Box(3522)), -Box(Box(3523)), -Box(Box(3524)), -Box(Box(3525)), -Box(Box(3526)), -Box(Box(3527)), -Box(Box(3528)), -Box(Box(3529)), -Box(Box(3530)), -Box(Box(3531)), -Box(Box(3532)), -Box(Box(3533)), -Box(Box(3534)), -Box(Box(3535)), -Box(Box(3536)), -Box(Box(3537)), -Box(Box(3538)), -Box(Box(3539)), -Box(Box(3540)), -Box(Box(3541)), -Box(Box(3542)), -Box(Box(3543)), -Box(Box(3544)), -Box(Box(3545)), -Box(Box(3546)), -Box(Box(3547)), -Box(Box(3548)), -Box(Box(3549)), -Box(Box(3550)), -Box(Box(3551)), -Box(Box(3552)), -Box(Box(3553)), -Box(Box(3554)), -Box(Box(3555)), -Box(Box(3556)), -Box(Box(3557)), -Box(Box(3558)), -Box(Box(3559)), -Box(Box(3560)), -Box(Box(3561)), -Box(Box(3562)), -Box(Box(3563)), -Box(Box(3564)), -Box(Box(3565)), -Box(Box(3566)), -Box(Box(3567)), -Box(Box(3568)), -Box(Box(3569)), -Box(Box(3570)), -Box(Box(3571)), -Box(Box(3572)), -Box(Box(3573)), -Box(Box(3574)), -Box(Box(3575)), -Box(Box(3576)), -Box(Box(3577)), -Box(Box(3578)), -Box(Box(3579)), -Box(Box(3580)), -Box(Box(3581)), -Box(Box(3582)), -Box(Box(3583)), -Box(Box(3584)), -Box(Box(3585)), -Box(Box(3586)), -Box(Box(3587)), -Box(Box(3588)), -Box(Box(3589)), -Box(Box(3590)), -Box(Box(3591)), -Box(Box(3592)), -Box(Box(3593)), -Box(Box(3594)), -Box(Box(3595)), -Box(Box(3596)), -Box(Box(3597)), -Box(Box(3598)), -Box(Box(3599)), -Box(Box(3600)), -Box(Box(3601)), -Box(Box(3602)), -Box(Box(3603)), -Box(Box(3604)), -Box(Box(3605)), -Box(Box(3606)), -Box(Box(3607)), -Box(Box(3608)), -Box(Box(3609)), -Box(Box(3610)), -Box(Box(3611)), -Box(Box(3612)), -Box(Box(3613)), -Box(Box(3614)), -Box(Box(3615)), -Box(Box(3616)), -Box(Box(3617)), -Box(Box(3618)), -Box(Box(3619)), -Box(Box(3620)), -Box(Box(3621)), -Box(Box(3622)), -Box(Box(3623)), -Box(Box(3624)), -Box(Box(3625)), -Box(Box(3626)), -Box(Box(3627)), -Box(Box(3628)), -Box(Box(3629)), -Box(Box(3630)), -Box(Box(3631)), -Box(Box(3632)), -Box(Box(3633)), -Box(Box(3634)), -Box(Box(3635)), -Box(Box(3636)), -Box(Box(3637)), -Box(Box(3638)), -Box(Box(3639)), -Box(Box(3640)), -Box(Box(3641)), -Box(Box(3642)), -Box(Box(3643)), -Box(Box(3644)), -Box(Box(3645)), -Box(Box(3646)), -Box(Box(3647)), -Box(Box(3648)), -Box(Box(3649)), -Box(Box(3650)), -Box(Box(3651)), -Box(Box(3652)), -Box(Box(3653)), -Box(Box(3654)), -Box(Box(3655)), -Box(Box(3656)), -Box(Box(3657)), -Box(Box(3658)), -Box(Box(3659)), -Box(Box(3660)), -Box(Box(3661)), -Box(Box(3662)), -Box(Box(3663)), -Box(Box(3664)), -Box(Box(3665)), -Box(Box(3666)), -Box(Box(3667)), -Box(Box(3668)), -Box(Box(3669)), -Box(Box(3670)), -Box(Box(3671)), -Box(Box(3672)), -Box(Box(3673)), -Box(Box(3674)), -Box(Box(3675)), -Box(Box(3676)), -Box(Box(3677)), -Box(Box(3678)), -Box(Box(3679)), -Box(Box(3680)), -Box(Box(3681)), -Box(Box(3682)), -Box(Box(3683)), -Box(Box(3684)), -Box(Box(3685)), -Box(Box(3686)), -Box(Box(3687)), -Box(Box(3688)), -Box(Box(3689)), -Box(Box(3690)), -Box(Box(3691)), -Box(Box(3692)), -Box(Box(3693)), -Box(Box(3694)), -Box(Box(3695)), -Box(Box(3696)), -Box(Box(3697)), -Box(Box(3698)), -Box(Box(3699)), -Box(Box(3700)), -Box(Box(3701)), -Box(Box(3702)), -Box(Box(3703)), -Box(Box(3704)), -Box(Box(3705)), -Box(Box(3706)), -Box(Box(3707)), -Box(Box(3708)), -Box(Box(3709)), -Box(Box(3710)), -Box(Box(3711)), -Box(Box(3712)), -Box(Box(3713)), -Box(Box(3714)), -Box(Box(3715)), -Box(Box(3716)), -Box(Box(3717)), -Box(Box(3718)), -Box(Box(3719)), -Box(Box(3720)), -Box(Box(3721)), -Box(Box(3722)), -Box(Box(3723)), -Box(Box(3724)), -Box(Box(3725)), -Box(Box(3726)), -Box(Box(3727)), -Box(Box(3728)), -Box(Box(3729)), -Box(Box(3730)), -Box(Box(3731)), -Box(Box(3732)), -Box(Box(3733)), -Box(Box(3734)), -Box(Box(3735)), -Box(Box(3736)), -Box(Box(3737)), -Box(Box(3738)), -Box(Box(3739)), -Box(Box(3740)), -Box(Box(3741)), -Box(Box(3742)), -Box(Box(3743)), -Box(Box(3744)), -Box(Box(3745)), -Box(Box(3746)), -Box(Box(3747)), -Box(Box(3748)), -Box(Box(3749)), -Box(Box(3750)), -Box(Box(3751)), -Box(Box(3752)), -Box(Box(3753)), -Box(Box(3754)), -Box(Box(3755)), -Box(Box(3756)), -Box(Box(3757)), -Box(Box(3758)), -Box(Box(3759)), -Box(Box(3760)), -Box(Box(3761)), -Box(Box(3762)), -Box(Box(3763)), -Box(Box(3764)), -Box(Box(3765)), -Box(Box(3766)), -Box(Box(3767)), -Box(Box(3768)), -Box(Box(3769)), -Box(Box(3770)), -Box(Box(3771)), -Box(Box(3772)), -Box(Box(3773)), -Box(Box(3774)), -Box(Box(3775)), -Box(Box(3776)), -Box(Box(3777)), -Box(Box(3778)), -Box(Box(3779)), -Box(Box(3780)), -Box(Box(3781)), -Box(Box(3782)), -Box(Box(3783)), -Box(Box(3784)), -Box(Box(3785)), -Box(Box(3786)), -Box(Box(3787)), -Box(Box(3788)), -Box(Box(3789)), -Box(Box(3790)), -Box(Box(3791)), -Box(Box(3792)), -Box(Box(3793)), -Box(Box(3794)), -Box(Box(3795)), -Box(Box(3796)), -Box(Box(3797)), -Box(Box(3798)), -Box(Box(3799)), -Box(Box(3800)), -Box(Box(3801)), -Box(Box(3802)), -Box(Box(3803)), -Box(Box(3804)), -Box(Box(3805)), -Box(Box(3806)), -Box(Box(3807)), -Box(Box(3808)), -Box(Box(3809)), -Box(Box(3810)), -Box(Box(3811)), -Box(Box(3812)), -Box(Box(3813)), -Box(Box(3814)), -Box(Box(3815)), -Box(Box(3816)), -Box(Box(3817)), -Box(Box(3818)), -Box(Box(3819)), -Box(Box(3820)), -Box(Box(3821)), -Box(Box(3822)), -Box(Box(3823)), -Box(Box(3824)), -Box(Box(3825)), -Box(Box(3826)), -Box(Box(3827)), -Box(Box(3828)), -Box(Box(3829)), -Box(Box(3830)), -Box(Box(3831)), -Box(Box(3832)), -Box(Box(3833)), -Box(Box(3834)), -Box(Box(3835)), -Box(Box(3836)), -Box(Box(3837)), -Box(Box(3838)), -Box(Box(3839)), -Box(Box(3840)), -Box(Box(3841)), -Box(Box(3842)), -Box(Box(3843)), -Box(Box(3844)), -Box(Box(3845)), -Box(Box(3846)), -Box(Box(3847)), -Box(Box(3848)), -Box(Box(3849)), -Box(Box(3850)), -Box(Box(3851)), -Box(Box(3852)), -Box(Box(3853)), -Box(Box(3854)), -Box(Box(3855)), -Box(Box(3856)), -Box(Box(3857)), -Box(Box(3858)), -Box(Box(3859)), -Box(Box(3860)), -Box(Box(3861)), -Box(Box(3862)), -Box(Box(3863)), -Box(Box(3864)), -Box(Box(3865)), -Box(Box(3866)), -Box(Box(3867)), -Box(Box(3868)), -Box(Box(3869)), -Box(Box(3870)), -Box(Box(3871)), -Box(Box(3872)), -Box(Box(3873)), -Box(Box(3874)), -Box(Box(3875)), -Box(Box(3876)), -Box(Box(3877)), -Box(Box(3878)), -Box(Box(3879)), -Box(Box(3880)), -Box(Box(3881)), -Box(Box(3882)), -Box(Box(3883)), -Box(Box(3884)), -Box(Box(3885)), -Box(Box(3886)), -Box(Box(3887)), -Box(Box(3888)), -Box(Box(3889)), -Box(Box(3890)), -Box(Box(3891)), -Box(Box(3892)), -Box(Box(3893)), -Box(Box(3894)), -Box(Box(3895)), -Box(Box(3896)), -Box(Box(3897)), -Box(Box(3898)), -Box(Box(3899)), -Box(Box(3900)), -Box(Box(3901)), -Box(Box(3902)), -Box(Box(3903)), -Box(Box(3904)), -Box(Box(3905)), -Box(Box(3906)), -Box(Box(3907)), -Box(Box(3908)), -Box(Box(3909)), -Box(Box(3910)), -Box(Box(3911)), -Box(Box(3912)), -Box(Box(3913)), -Box(Box(3914)), -Box(Box(3915)), -Box(Box(3916)), -Box(Box(3917)), -Box(Box(3918)), -Box(Box(3919)), -Box(Box(3920)), -Box(Box(3921)), -Box(Box(3922)), -Box(Box(3923)), -Box(Box(3924)), -Box(Box(3925)), -Box(Box(3926)), -Box(Box(3927)), -Box(Box(3928)), -Box(Box(3929)), -Box(Box(3930)), -Box(Box(3931)), -Box(Box(3932)), -Box(Box(3933)), -Box(Box(3934)), -Box(Box(3935)), -Box(Box(3936)), -Box(Box(3937)), -Box(Box(3938)), -Box(Box(3939)), -Box(Box(3940)), -Box(Box(3941)), -Box(Box(3942)), -Box(Box(3943)), -Box(Box(3944)), -Box(Box(3945)), -Box(Box(3946)), -Box(Box(3947)), -Box(Box(3948)), -Box(Box(3949)), -Box(Box(3950)), -Box(Box(3951)), -Box(Box(3952)), -Box(Box(3953)), -Box(Box(3954)), -Box(Box(3955)), -Box(Box(3956)), -Box(Box(3957)), -Box(Box(3958)), -Box(Box(3959)), -Box(Box(3960)), -Box(Box(3961)), -Box(Box(3962)), -Box(Box(3963)), -Box(Box(3964)), -Box(Box(3965)), -Box(Box(3966)), -Box(Box(3967)), -Box(Box(3968)), -Box(Box(3969)), -Box(Box(3970)), -Box(Box(3971)), -Box(Box(3972)), -Box(Box(3973)), -Box(Box(3974)), -Box(Box(3975)), -Box(Box(3976)), -Box(Box(3977)), -Box(Box(3978)), -Box(Box(3979)), -Box(Box(3980)), -Box(Box(3981)), -Box(Box(3982)), -Box(Box(3983)), -Box(Box(3984)), -Box(Box(3985)), -Box(Box(3986)), -Box(Box(3987)), -Box(Box(3988)), -Box(Box(3989)), -Box(Box(3990)), -Box(Box(3991)), -Box(Box(3992)), -Box(Box(3993)), -Box(Box(3994)), -Box(Box(3995)), -Box(Box(3996)), -Box(Box(3997)), -Box(Box(3998)), -Box(Box(3999)), -Box(Box(4000)), -Box(Box(4001)), -Box(Box(4002)), -Box(Box(4003)), -Box(Box(4004)), -Box(Box(4005)), -Box(Box(4006)), -Box(Box(4007)), -Box(Box(4008)), -Box(Box(4009)), -Box(Box(4010)), -Box(Box(4011)), -Box(Box(4012)), -Box(Box(4013)), -Box(Box(4014)), -Box(Box(4015)), -Box(Box(4016)), -Box(Box(4017)), -Box(Box(4018)), -Box(Box(4019)), -Box(Box(4020)), -Box(Box(4021)), -Box(Box(4022)), -Box(Box(4023)), -Box(Box(4024)), -Box(Box(4025)), -Box(Box(4026)), -Box(Box(4027)), -Box(Box(4028)), -Box(Box(4029)), -Box(Box(4030)), -Box(Box(4031)), -Box(Box(4032)), -Box(Box(4033)), -Box(Box(4034)), -Box(Box(4035)), -Box(Box(4036)), -Box(Box(4037)), -Box(Box(4038)), -Box(Box(4039)), -Box(Box(4040)), -Box(Box(4041)), -Box(Box(4042)), -Box(Box(4043)), -Box(Box(4044)), -Box(Box(4045)), -Box(Box(4046)), -Box(Box(4047)), -Box(Box(4048)), -Box(Box(4049)), -Box(Box(4050)), -Box(Box(4051)), -Box(Box(4052)), -Box(Box(4053)), -Box(Box(4054)), -Box(Box(4055)), -Box(Box(4056)), -Box(Box(4057)), -Box(Box(4058)), -Box(Box(4059)), -Box(Box(4060)), -Box(Box(4061)), -Box(Box(4062)), -Box(Box(4063)), -Box(Box(4064)), -Box(Box(4065)), -Box(Box(4066)), -Box(Box(4067)), -Box(Box(4068)), -Box(Box(4069)), -Box(Box(4070)), -Box(Box(4071)), -Box(Box(4072)), -Box(Box(4073)), -Box(Box(4074)), -Box(Box(4075)), -Box(Box(4076)), -Box(Box(4077)), -Box(Box(4078)), -Box(Box(4079)), -Box(Box(4080)), -Box(Box(4081)), -Box(Box(4082)), -Box(Box(4083)), -Box(Box(4084)), -Box(Box(4085)), -Box(Box(4086)), -Box(Box(4087)), -Box(Box(4088)), -Box(Box(4089)), -Box(Box(4090)), -Box(Box(4091)), -Box(Box(4092)), -Box(Box(4093)), -Box(Box(4094)), -Box(Box(4095)), -Box(Box(4096)), -Box(Box(4097)), -Box(Box(4098)), -Box(Box(4099)), -Box(Box(4100)), -Box(Box(4101)), -Box(Box(4102)), -Box(Box(4103)), -Box(Box(4104)), -Box(Box(4105)), -Box(Box(4106)), -Box(Box(4107)), -Box(Box(4108)), -Box(Box(4109)), -Box(Box(4110)), -Box(Box(4111)), -Box(Box(4112)), -Box(Box(4113)), -Box(Box(4114)), -Box(Box(4115)), -Box(Box(4116)), -Box(Box(4117)), -Box(Box(4118)), -Box(Box(4119)), -Box(Box(4120)), -Box(Box(4121)), -Box(Box(4122)), -Box(Box(4123)), -Box(Box(4124)), -Box(Box(4125)), -Box(Box(4126)), -Box(Box(4127)), -Box(Box(4128)), -Box(Box(4129)), -Box(Box(4130)), -Box(Box(4131)), -Box(Box(4132)), -Box(Box(4133)), -Box(Box(4134)), -Box(Box(4135)), -Box(Box(4136)), -Box(Box(4137)), -Box(Box(4138)), -Box(Box(4139)), -Box(Box(4140)), -Box(Box(4141)), -Box(Box(4142)), -Box(Box(4143)), -Box(Box(4144)), -Box(Box(4145)), -Box(Box(4146)), -Box(Box(4147)), -Box(Box(4148)), -Box(Box(4149)), -Box(Box(4150)), -Box(Box(4151)), -Box(Box(4152)), -Box(Box(4153)), -Box(Box(4154)), -Box(Box(4155)), -Box(Box(4156)), -Box(Box(4157)), -Box(Box(4158)), -Box(Box(4159)), -Box(Box(4160)), -Box(Box(4161)), -Box(Box(4162)), -Box(Box(4163)), -Box(Box(4164)), -Box(Box(4165)), -Box(Box(4166)), -Box(Box(4167)), -Box(Box(4168)), -Box(Box(4169)), -Box(Box(4170)), -Box(Box(4171)), -Box(Box(4172)), -Box(Box(4173)), -Box(Box(4174)), -Box(Box(4175)), -Box(Box(4176)), -Box(Box(4177)), -Box(Box(4178)), -Box(Box(4179)), -Box(Box(4180)), -Box(Box(4181)), -Box(Box(4182)), -Box(Box(4183)), -Box(Box(4184)), -Box(Box(4185)), -Box(Box(4186)), -Box(Box(4187)), -Box(Box(4188)), -Box(Box(4189)), -Box(Box(4190)), -Box(Box(4191)), -Box(Box(4192)), -Box(Box(4193)), -Box(Box(4194)), -Box(Box(4195)), -Box(Box(4196)), -Box(Box(4197)), -Box(Box(4198)), -Box(Box(4199)), -Box(Box(4200)), -Box(Box(4201)), -Box(Box(4202)), -Box(Box(4203)), -Box(Box(4204)), -Box(Box(4205)), -Box(Box(4206)), -Box(Box(4207)), -Box(Box(4208)), -Box(Box(4209)), -Box(Box(4210)), -Box(Box(4211)), -Box(Box(4212)), -Box(Box(4213)), -Box(Box(4214)), -Box(Box(4215)), -Box(Box(4216)), -Box(Box(4217)), -Box(Box(4218)), -Box(Box(4219)), -Box(Box(4220)), -Box(Box(4221)), -Box(Box(4222)), -Box(Box(4223)), -Box(Box(4224)), -Box(Box(4225)), -Box(Box(4226)), -Box(Box(4227)), -Box(Box(4228)), -Box(Box(4229)), -Box(Box(4230)), -Box(Box(4231)), -Box(Box(4232)), -Box(Box(4233)), -Box(Box(4234)), -Box(Box(4235)), -Box(Box(4236)), -Box(Box(4237)), -Box(Box(4238)), -Box(Box(4239)), -Box(Box(4240)), -Box(Box(4241)), -Box(Box(4242)), -Box(Box(4243)), -Box(Box(4244)), -Box(Box(4245)), -Box(Box(4246)), -Box(Box(4247)), -Box(Box(4248)), -Box(Box(4249)), -Box(Box(4250)), -Box(Box(4251)), -Box(Box(4252)), -Box(Box(4253)), -Box(Box(4254)), -Box(Box(4255)), -Box(Box(4256)), -Box(Box(4257)), -Box(Box(4258)), -Box(Box(4259)), -Box(Box(4260)), -Box(Box(4261)), -Box(Box(4262)), -Box(Box(4263)), -Box(Box(4264)), -Box(Box(4265)), -Box(Box(4266)), -Box(Box(4267)), -Box(Box(4268)), -Box(Box(4269)), -Box(Box(4270)), -Box(Box(4271)), -Box(Box(4272)), -Box(Box(4273)), -Box(Box(4274)), -Box(Box(4275)), -Box(Box(4276)), -Box(Box(4277)), -Box(Box(4278)), -Box(Box(4279)), -Box(Box(4280)), -Box(Box(4281)), -Box(Box(4282)), -Box(Box(4283)), -Box(Box(4284)), -Box(Box(4285)), -Box(Box(4286)), -Box(Box(4287)), -Box(Box(4288)), -Box(Box(4289)), -Box(Box(4290)), -Box(Box(4291)), -Box(Box(4292)), -Box(Box(4293)), -Box(Box(4294)), -Box(Box(4295)), -Box(Box(4296)), -Box(Box(4297)), -Box(Box(4298)), -Box(Box(4299)), -Box(Box(4300)), -Box(Box(4301)), -Box(Box(4302)), -Box(Box(4303)), -Box(Box(4304)), -Box(Box(4305)), -Box(Box(4306)), -Box(Box(4307)), -Box(Box(4308)), -Box(Box(4309)), -Box(Box(4310)), -Box(Box(4311)), -Box(Box(4312)), -Box(Box(4313)), -Box(Box(4314)), -Box(Box(4315)), -Box(Box(4316)), -Box(Box(4317)), -Box(Box(4318)), -Box(Box(4319)), -Box(Box(4320)), -Box(Box(4321)), -Box(Box(4322)), -Box(Box(4323)), -Box(Box(4324)), -Box(Box(4325)), -Box(Box(4326)), -Box(Box(4327)), -Box(Box(4328)), -Box(Box(4329)), -Box(Box(4330)), -Box(Box(4331)), -Box(Box(4332)), -Box(Box(4333)), -Box(Box(4334)), -Box(Box(4335)), -Box(Box(4336)), -Box(Box(4337)), -Box(Box(4338)), -Box(Box(4339)), -Box(Box(4340)), -Box(Box(4341)), -Box(Box(4342)), -Box(Box(4343)), -Box(Box(4344)), -Box(Box(4345)), -Box(Box(4346)), -Box(Box(4347)), -Box(Box(4348)), -Box(Box(4349)), -Box(Box(4350)), -Box(Box(4351)), -Box(Box(4352)), -Box(Box(4353)), -Box(Box(4354)), -Box(Box(4355)), -Box(Box(4356)), -Box(Box(4357)), -Box(Box(4358)), -Box(Box(4359)), -Box(Box(4360)), -Box(Box(4361)), -Box(Box(4362)), -Box(Box(4363)), -Box(Box(4364)), -Box(Box(4365)), -Box(Box(4366)), -Box(Box(4367)), -Box(Box(4368)), -Box(Box(4369)), -Box(Box(4370)), -Box(Box(4371)), -Box(Box(4372)), -Box(Box(4373)), -Box(Box(4374)), -Box(Box(4375)), -Box(Box(4376)), -Box(Box(4377)), -Box(Box(4378)), -Box(Box(4379)), -Box(Box(4380)), -Box(Box(4381)), -Box(Box(4382)), -Box(Box(4383)), -Box(Box(4384)), -Box(Box(4385)), -Box(Box(4386)), -Box(Box(4387)), -Box(Box(4388)), -Box(Box(4389)), -Box(Box(4390)), -Box(Box(4391)), -Box(Box(4392)), -Box(Box(4393)), -Box(Box(4394)), -Box(Box(4395)), -Box(Box(4396)), -Box(Box(4397)), -Box(Box(4398)), -Box(Box(4399)), -Box(Box(4400)), -Box(Box(4401)), -Box(Box(4402)), -Box(Box(4403)), -Box(Box(4404)), -Box(Box(4405)), -Box(Box(4406)), -Box(Box(4407)), -Box(Box(4408)), -Box(Box(4409)), -Box(Box(4410)), -Box(Box(4411)), -Box(Box(4412)), -Box(Box(4413)), -Box(Box(4414)), -Box(Box(4415)), -Box(Box(4416)), -Box(Box(4417)), -Box(Box(4418)), -Box(Box(4419)), -Box(Box(4420)), -Box(Box(4421)), -Box(Box(4422)), -Box(Box(4423)), -Box(Box(4424)), -Box(Box(4425)), -Box(Box(4426)), -Box(Box(4427)), -Box(Box(4428)), -Box(Box(4429)), -Box(Box(4430)), -Box(Box(4431)), -Box(Box(4432)), -Box(Box(4433)), -Box(Box(4434)), -Box(Box(4435)), -Box(Box(4436)), -Box(Box(4437)), -Box(Box(4438)), -Box(Box(4439)), -Box(Box(4440)), -Box(Box(4441)), -Box(Box(4442)), -Box(Box(4443)), -Box(Box(4444)), -Box(Box(4445)), -Box(Box(4446)), -Box(Box(4447)), -Box(Box(4448)), -Box(Box(4449)), -Box(Box(4450)), -Box(Box(4451)), -Box(Box(4452)), -Box(Box(4453)), -Box(Box(4454)), -Box(Box(4455)), -Box(Box(4456)), -Box(Box(4457)), -Box(Box(4458)), -Box(Box(4459)), -Box(Box(4460)), -Box(Box(4461)), -Box(Box(4462)), -Box(Box(4463)), -Box(Box(4464)), -Box(Box(4465)), -Box(Box(4466)), -Box(Box(4467)), -Box(Box(4468)), -Box(Box(4469)), -Box(Box(4470)), -Box(Box(4471)), -Box(Box(4472)), -Box(Box(4473)), -Box(Box(4474)), -Box(Box(4475)), -Box(Box(4476)), -Box(Box(4477)), -Box(Box(4478)), -Box(Box(4479)), -Box(Box(4480)), -Box(Box(4481)), -Box(Box(4482)), -Box(Box(4483)), -Box(Box(4484)), -Box(Box(4485)), -Box(Box(4486)), -Box(Box(4487)), -Box(Box(4488)), -Box(Box(4489)), -Box(Box(4490)), -Box(Box(4491)), -Box(Box(4492)), -Box(Box(4493)), -Box(Box(4494)), -Box(Box(4495)), -Box(Box(4496)), -Box(Box(4497)), -Box(Box(4498)), -Box(Box(4499)), -Box(Box(4500)), -Box(Box(4501)), -Box(Box(4502)), -Box(Box(4503)), -Box(Box(4504)), -Box(Box(4505)), -Box(Box(4506)), -Box(Box(4507)), -Box(Box(4508)), -Box(Box(4509)), -Box(Box(4510)), -Box(Box(4511)), -Box(Box(4512)), -Box(Box(4513)), -Box(Box(4514)), -Box(Box(4515)), -Box(Box(4516)), -Box(Box(4517)), -Box(Box(4518)), -Box(Box(4519)), -Box(Box(4520)), -Box(Box(4521)), -Box(Box(4522)), -Box(Box(4523)), -Box(Box(4524)), -Box(Box(4525)), -Box(Box(4526)), -Box(Box(4527)), -Box(Box(4528)), -Box(Box(4529)), -Box(Box(4530)), -Box(Box(4531)), -Box(Box(4532)), -Box(Box(4533)), -Box(Box(4534)), -Box(Box(4535)), -Box(Box(4536)), -Box(Box(4537)), -Box(Box(4538)), -Box(Box(4539)), -Box(Box(4540)), -Box(Box(4541)), -Box(Box(4542)), -Box(Box(4543)), -Box(Box(4544)), -Box(Box(4545)), -Box(Box(4546)), -Box(Box(4547)), -Box(Box(4548)), -Box(Box(4549)), -Box(Box(4550)), -Box(Box(4551)), -Box(Box(4552)), -Box(Box(4553)), -Box(Box(4554)), -Box(Box(4555)), -Box(Box(4556)), -Box(Box(4557)), -Box(Box(4558)), -Box(Box(4559)), -Box(Box(4560)), -Box(Box(4561)), -Box(Box(4562)), -Box(Box(4563)), -Box(Box(4564)), -Box(Box(4565)), -Box(Box(4566)), -Box(Box(4567)), -Box(Box(4568)), -Box(Box(4569)), -Box(Box(4570)), -Box(Box(4571)), -Box(Box(4572)), -Box(Box(4573)), -Box(Box(4574)), -Box(Box(4575)), -Box(Box(4576)), -Box(Box(4577)), -Box(Box(4578)), -Box(Box(4579)), -Box(Box(4580)), -Box(Box(4581)), -Box(Box(4582)), -Box(Box(4583)), -Box(Box(4584)), -Box(Box(4585)), -Box(Box(4586)), -Box(Box(4587)), -Box(Box(4588)), -Box(Box(4589)), -Box(Box(4590)), -Box(Box(4591)), -Box(Box(4592)), -Box(Box(4593)), -Box(Box(4594)), -Box(Box(4595)), -Box(Box(4596)), -Box(Box(4597)), -Box(Box(4598)), -Box(Box(4599)), -Box(Box(4600)), -Box(Box(4601)), -Box(Box(4602)), -Box(Box(4603)), -Box(Box(4604)), -Box(Box(4605)), -Box(Box(4606)), -Box(Box(4607)), -Box(Box(4608)), -Box(Box(4609)), -Box(Box(4610)), -Box(Box(4611)), -Box(Box(4612)), -Box(Box(4613)), -Box(Box(4614)), -Box(Box(4615)), -Box(Box(4616)), -Box(Box(4617)), -Box(Box(4618)), -Box(Box(4619)), -Box(Box(4620)), -Box(Box(4621)), -Box(Box(4622)), -Box(Box(4623)), -Box(Box(4624)), -Box(Box(4625)), -Box(Box(4626)), -Box(Box(4627)), -Box(Box(4628)), -Box(Box(4629)), -Box(Box(4630)), -Box(Box(4631)), -Box(Box(4632)), -Box(Box(4633)), -Box(Box(4634)), -Box(Box(4635)), -Box(Box(4636)), -Box(Box(4637)), -Box(Box(4638)), -Box(Box(4639)), -Box(Box(4640)), -Box(Box(4641)), -Box(Box(4642)), -Box(Box(4643)), -Box(Box(4644)), -Box(Box(4645)), -Box(Box(4646)), -Box(Box(4647)), -Box(Box(4648)), -Box(Box(4649)), -Box(Box(4650)), -Box(Box(4651)), -Box(Box(4652)), -Box(Box(4653)), -Box(Box(4654)), -Box(Box(4655)), -Box(Box(4656)), -Box(Box(4657)), -Box(Box(4658)), -Box(Box(4659)), -Box(Box(4660)), -Box(Box(4661)), -Box(Box(4662)), -Box(Box(4663)), -Box(Box(4664)), -Box(Box(4665)), -Box(Box(4666)), -Box(Box(4667)), -Box(Box(4668)), -Box(Box(4669)), -Box(Box(4670)), -Box(Box(4671)), -Box(Box(4672)), -Box(Box(4673)), -Box(Box(4674)), -Box(Box(4675)), -Box(Box(4676)), -Box(Box(4677)), -Box(Box(4678)), -Box(Box(4679)), -Box(Box(4680)), -Box(Box(4681)), -Box(Box(4682)), -Box(Box(4683)), -Box(Box(4684)), -Box(Box(4685)), -Box(Box(4686)), -Box(Box(4687)), -Box(Box(4688)), -Box(Box(4689)), -Box(Box(4690)), -Box(Box(4691)), -Box(Box(4692)), -Box(Box(4693)), -Box(Box(4694)), -Box(Box(4695)), -Box(Box(4696)), -Box(Box(4697)), -Box(Box(4698)), -Box(Box(4699)), -Box(Box(4700)), -Box(Box(4701)), -Box(Box(4702)), -Box(Box(4703)), -Box(Box(4704)), -Box(Box(4705)), -Box(Box(4706)), -Box(Box(4707)), -Box(Box(4708)), -Box(Box(4709)), -Box(Box(4710)), -Box(Box(4711)), -Box(Box(4712)), -Box(Box(4713)), -Box(Box(4714)), -Box(Box(4715)), -Box(Box(4716)), -Box(Box(4717)), -Box(Box(4718)), -Box(Box(4719)), -Box(Box(4720)), -Box(Box(4721)), -Box(Box(4722)), -Box(Box(4723)), -Box(Box(4724)), -Box(Box(4725)), -Box(Box(4726)), -Box(Box(4727)), -Box(Box(4728)), -Box(Box(4729)), -Box(Box(4730)), -Box(Box(4731)), -Box(Box(4732)), -Box(Box(4733)), -Box(Box(4734)), -Box(Box(4735)), -Box(Box(4736)), -Box(Box(4737)), -Box(Box(4738)), -Box(Box(4739)), -Box(Box(4740)), -Box(Box(4741)), -Box(Box(4742)), -Box(Box(4743)), -Box(Box(4744)), -Box(Box(4745)), -Box(Box(4746)), -Box(Box(4747)), -Box(Box(4748)), -Box(Box(4749)), -Box(Box(4750)), -Box(Box(4751)), -Box(Box(4752)), -Box(Box(4753)), -Box(Box(4754)), -Box(Box(4755)), -Box(Box(4756)), -Box(Box(4757)), -Box(Box(4758)), -Box(Box(4759)), -Box(Box(4760)), -Box(Box(4761)), -Box(Box(4762)), -Box(Box(4763)), -Box(Box(4764)), -Box(Box(4765)), -Box(Box(4766)), -Box(Box(4767)), -Box(Box(4768)), -Box(Box(4769)), -Box(Box(4770)), -Box(Box(4771)), -Box(Box(4772)), -Box(Box(4773)), -Box(Box(4774)), -Box(Box(4775)), -Box(Box(4776)), -Box(Box(4777)), -Box(Box(4778)), -Box(Box(4779)), -Box(Box(4780)), -Box(Box(4781)), -Box(Box(4782)), -Box(Box(4783)), -Box(Box(4784)), -Box(Box(4785)), -Box(Box(4786)), -Box(Box(4787)), -Box(Box(4788)), -Box(Box(4789)), -Box(Box(4790)), -Box(Box(4791)), -Box(Box(4792)), -Box(Box(4793)), -Box(Box(4794)), -Box(Box(4795)), -Box(Box(4796)), -Box(Box(4797)), -Box(Box(4798)), -Box(Box(4799)), -Box(Box(4800)), -Box(Box(4801)), -Box(Box(4802)), -Box(Box(4803)), -Box(Box(4804)), -Box(Box(4805)), -Box(Box(4806)), -Box(Box(4807)), -Box(Box(4808)), -Box(Box(4809)), -Box(Box(4810)), -Box(Box(4811)), -Box(Box(4812)), -Box(Box(4813)), -Box(Box(4814)), -Box(Box(4815)), -Box(Box(4816)), -Box(Box(4817)), -Box(Box(4818)), -Box(Box(4819)), -Box(Box(4820)), -Box(Box(4821)), -Box(Box(4822)), -Box(Box(4823)), -Box(Box(4824)), -Box(Box(4825)), -Box(Box(4826)), -Box(Box(4827)), -Box(Box(4828)), -Box(Box(4829)), -Box(Box(4830)), -Box(Box(4831)), -Box(Box(4832)), -Box(Box(4833)), -Box(Box(4834)), -Box(Box(4835)), -Box(Box(4836)), -Box(Box(4837)), -Box(Box(4838)), -Box(Box(4839)), -Box(Box(4840)), -Box(Box(4841)), -Box(Box(4842)), -Box(Box(4843)), -Box(Box(4844)), -Box(Box(4845)), -Box(Box(4846)), -Box(Box(4847)), -Box(Box(4848)), -Box(Box(4849)), -Box(Box(4850)), -Box(Box(4851)), -Box(Box(4852)), -Box(Box(4853)), -Box(Box(4854)), -Box(Box(4855)), -Box(Box(4856)), -Box(Box(4857)), -Box(Box(4858)), -Box(Box(4859)), -Box(Box(4860)), -Box(Box(4861)), -Box(Box(4862)), -Box(Box(4863)), -Box(Box(4864)), -Box(Box(4865)), -Box(Box(4866)), -Box(Box(4867)), -Box(Box(4868)), -Box(Box(4869)), -Box(Box(4870)), -Box(Box(4871)), -Box(Box(4872)), -Box(Box(4873)), -Box(Box(4874)), -Box(Box(4875)), -Box(Box(4876)), -Box(Box(4877)), -Box(Box(4878)), -Box(Box(4879)), -Box(Box(4880)), -Box(Box(4881)), -Box(Box(4882)), -Box(Box(4883)), -Box(Box(4884)), -Box(Box(4885)), -Box(Box(4886)), -Box(Box(4887)), -Box(Box(4888)), -Box(Box(4889)), -Box(Box(4890)), -Box(Box(4891)), -Box(Box(4892)), -Box(Box(4893)), -Box(Box(4894)), -Box(Box(4895)), -Box(Box(4896)), -Box(Box(4897)), -Box(Box(4898)), -Box(Box(4899)), -Box(Box(4900)), -Box(Box(4901)), -Box(Box(4902)), -Box(Box(4903)), -Box(Box(4904)), -Box(Box(4905)), -Box(Box(4906)), -Box(Box(4907)), -Box(Box(4908)), -Box(Box(4909)), -Box(Box(4910)), -Box(Box(4911)), -Box(Box(4912)), -Box(Box(4913)), -Box(Box(4914)), -Box(Box(4915)), -Box(Box(4916)), -Box(Box(4917)), -Box(Box(4918)), -Box(Box(4919)), -Box(Box(4920)), -Box(Box(4921)), -Box(Box(4922)), -Box(Box(4923)), -Box(Box(4924)), -Box(Box(4925)), -Box(Box(4926)), -Box(Box(4927)), -Box(Box(4928)), -Box(Box(4929)), -Box(Box(4930)), -Box(Box(4931)), -Box(Box(4932)), -Box(Box(4933)), -Box(Box(4934)), -Box(Box(4935)), -Box(Box(4936)), -Box(Box(4937)), -Box(Box(4938)), -Box(Box(4939)), -Box(Box(4940)), -Box(Box(4941)), -Box(Box(4942)), -Box(Box(4943)), -Box(Box(4944)), -Box(Box(4945)), -Box(Box(4946)), -Box(Box(4947)), -Box(Box(4948)), -Box(Box(4949)), -Box(Box(4950)), -Box(Box(4951)), -Box(Box(4952)), -Box(Box(4953)), -Box(Box(4954)), -Box(Box(4955)), -Box(Box(4956)), -Box(Box(4957)), -Box(Box(4958)), -Box(Box(4959)), -Box(Box(4960)), -Box(Box(4961)), -Box(Box(4962)), -Box(Box(4963)), -Box(Box(4964)), -Box(Box(4965)), -Box(Box(4966)), -Box(Box(4967)), -Box(Box(4968)), -Box(Box(4969)), -Box(Box(4970)), -Box(Box(4971)), -Box(Box(4972)), -Box(Box(4973)), -Box(Box(4974)), -Box(Box(4975)), -Box(Box(4976)), -Box(Box(4977)), -Box(Box(4978)), -Box(Box(4979)), -Box(Box(4980)), -Box(Box(4981)), -Box(Box(4982)), -Box(Box(4983)), -Box(Box(4984)), -Box(Box(4985)), -Box(Box(4986)), -Box(Box(4987)), -Box(Box(4988)), -Box(Box(4989)), -Box(Box(4990)), -Box(Box(4991)), -Box(Box(4992)), -Box(Box(4993)), -Box(Box(4994)), -Box(Box(4995)), -Box(Box(4996)), -Box(Box(4997)), -Box(Box(4998)), -Box(Box(4999)), -Box(Box(5000)), -Box(Box(5001)), -Box(Box(5002)), -Box(Box(5003)), -Box(Box(5004)), -Box(Box(5005)), -Box(Box(5006)), -Box(Box(5007)), -Box(Box(5008)), -Box(Box(5009)), -Box(Box(5010)), -Box(Box(5011)), -Box(Box(5012)), -Box(Box(5013)), -Box(Box(5014)), -Box(Box(5015)), -Box(Box(5016)), -Box(Box(5017)), -Box(Box(5018)), -Box(Box(5019)), -Box(Box(5020)), -Box(Box(5021)), -Box(Box(5022)), -Box(Box(5023)), -Box(Box(5024)), -Box(Box(5025)), -Box(Box(5026)), -Box(Box(5027)), -Box(Box(5028)), -Box(Box(5029)), -Box(Box(5030)), -Box(Box(5031)), -Box(Box(5032)), -Box(Box(5033)), -Box(Box(5034)), -Box(Box(5035)), -Box(Box(5036)), -Box(Box(5037)), -Box(Box(5038)), -Box(Box(5039)), -Box(Box(5040)), -Box(Box(5041)), -Box(Box(5042)), -Box(Box(5043)), -Box(Box(5044)), -Box(Box(5045)), -Box(Box(5046)), -Box(Box(5047)), -Box(Box(5048)), -Box(Box(5049)), -Box(Box(5050)), -Box(Box(5051)), -Box(Box(5052)), -Box(Box(5053)), -Box(Box(5054)), -Box(Box(5055)), -Box(Box(5056)), -Box(Box(5057)), -Box(Box(5058)), -Box(Box(5059)), -Box(Box(5060)), -Box(Box(5061)), -Box(Box(5062)), -Box(Box(5063)), -Box(Box(5064)), -Box(Box(5065)), -Box(Box(5066)), -Box(Box(5067)), -Box(Box(5068)), -Box(Box(5069)), -Box(Box(5070)), -Box(Box(5071)), -Box(Box(5072)), -Box(Box(5073)), -Box(Box(5074)), -Box(Box(5075)), -Box(Box(5076)), -Box(Box(5077)), -Box(Box(5078)), -Box(Box(5079)), -Box(Box(5080)), -Box(Box(5081)), -Box(Box(5082)), -Box(Box(5083)), -Box(Box(5084)), -Box(Box(5085)), -Box(Box(5086)), -Box(Box(5087)), -Box(Box(5088)), -Box(Box(5089)), -Box(Box(5090)), -Box(Box(5091)), -Box(Box(5092)), -Box(Box(5093)), -Box(Box(5094)), -Box(Box(5095)), -Box(Box(5096)), -Box(Box(5097)), -Box(Box(5098)), -Box(Box(5099)), -Box(Box(5100)), -Box(Box(5101)), -Box(Box(5102)), -Box(Box(5103)), -Box(Box(5104)), -Box(Box(5105)), -Box(Box(5106)), -Box(Box(5107)), -Box(Box(5108)), -Box(Box(5109)), -Box(Box(5110)), -Box(Box(5111)), -Box(Box(5112)), -Box(Box(5113)), -Box(Box(5114)), -Box(Box(5115)), -Box(Box(5116)), -Box(Box(5117)), -Box(Box(5118)), -Box(Box(5119)), -Box(Box(5120)), -Box(Box(5121)), -Box(Box(5122)), -Box(Box(5123)), -Box(Box(5124)), -Box(Box(5125)), -Box(Box(5126)), -Box(Box(5127)), -Box(Box(5128)), -Box(Box(5129)), -Box(Box(5130)), -Box(Box(5131)), -Box(Box(5132)), -Box(Box(5133)), -Box(Box(5134)), -Box(Box(5135)), -Box(Box(5136)), -Box(Box(5137)), -Box(Box(5138)), -Box(Box(5139)), -Box(Box(5140)), -Box(Box(5141)), -Box(Box(5142)), -Box(Box(5143)), -Box(Box(5144)), -Box(Box(5145)), -Box(Box(5146)), -Box(Box(5147)), -Box(Box(5148)), -Box(Box(5149)), -Box(Box(5150)), -Box(Box(5151)), -Box(Box(5152)), -Box(Box(5153)), -Box(Box(5154)), -Box(Box(5155)), -Box(Box(5156)), -Box(Box(5157)), -Box(Box(5158)), -Box(Box(5159)), -Box(Box(5160)), -Box(Box(5161)), -Box(Box(5162)), -Box(Box(5163)), -Box(Box(5164)), -Box(Box(5165)), -Box(Box(5166)), -Box(Box(5167)), -Box(Box(5168)), -Box(Box(5169)), -Box(Box(5170)), -Box(Box(5171)), -Box(Box(5172)), -Box(Box(5173)), -Box(Box(5174)), -Box(Box(5175)), -Box(Box(5176)), -Box(Box(5177)), -Box(Box(5178)), -Box(Box(5179)), -Box(Box(5180)), -Box(Box(5181)), -Box(Box(5182)), -Box(Box(5183)), -Box(Box(5184)), -Box(Box(5185)), -Box(Box(5186)), -Box(Box(5187)), -Box(Box(5188)), -Box(Box(5189)), -Box(Box(5190)), -Box(Box(5191)), -Box(Box(5192)), -Box(Box(5193)), -Box(Box(5194)), -Box(Box(5195)), -Box(Box(5196)), -Box(Box(5197)), -Box(Box(5198)), -Box(Box(5199)), -Box(Box(5200)), -Box(Box(5201)), -Box(Box(5202)), -Box(Box(5203)), -Box(Box(5204)), -Box(Box(5205)), -Box(Box(5206)), -Box(Box(5207)), -Box(Box(5208)), -Box(Box(5209)), -Box(Box(5210)), -Box(Box(5211)), -Box(Box(5212)), -Box(Box(5213)), -Box(Box(5214)), -Box(Box(5215)), -Box(Box(5216)), -Box(Box(5217)), -Box(Box(5218)), -Box(Box(5219)), -Box(Box(5220)), -Box(Box(5221)), -Box(Box(5222)), -Box(Box(5223)), -Box(Box(5224)), -Box(Box(5225)), -Box(Box(5226)), -Box(Box(5227)), -Box(Box(5228)), -Box(Box(5229)), -Box(Box(5230)), -Box(Box(5231)), -Box(Box(5232)), -Box(Box(5233)), -Box(Box(5234)), -Box(Box(5235)), -Box(Box(5236)), -Box(Box(5237)), -Box(Box(5238)), -Box(Box(5239)), -Box(Box(5240)), -Box(Box(5241)), -Box(Box(5242)), -Box(Box(5243)), -Box(Box(5244)), -Box(Box(5245)), -Box(Box(5246)), -Box(Box(5247)), -Box(Box(5248)), -Box(Box(5249)), -Box(Box(5250)), -Box(Box(5251)), -Box(Box(5252)), -Box(Box(5253)), -Box(Box(5254)), -Box(Box(5255)), -Box(Box(5256)), -Box(Box(5257)), -Box(Box(5258)), -Box(Box(5259)), -Box(Box(5260)), -Box(Box(5261)), -Box(Box(5262)), -Box(Box(5263)), -Box(Box(5264)), -Box(Box(5265)), -Box(Box(5266)), -Box(Box(5267)), -Box(Box(5268)), -Box(Box(5269)), -Box(Box(5270)), -Box(Box(5271)), -Box(Box(5272)), -Box(Box(5273)), -Box(Box(5274)), -Box(Box(5275)), -Box(Box(5276)), -Box(Box(5277)), -Box(Box(5278)), -Box(Box(5279)), -Box(Box(5280)), -Box(Box(5281)), -Box(Box(5282)), -Box(Box(5283)), -Box(Box(5284)), -Box(Box(5285)), -Box(Box(5286)), -Box(Box(5287)), -Box(Box(5288)), -Box(Box(5289)), -Box(Box(5290)), -Box(Box(5291)), -Box(Box(5292)), -Box(Box(5293)), -Box(Box(5294)), -Box(Box(5295)), -Box(Box(5296)), -Box(Box(5297)), -Box(Box(5298)), -Box(Box(5299)), -Box(Box(5300)), -Box(Box(5301)), -Box(Box(5302)), -Box(Box(5303)), -Box(Box(5304)), -Box(Box(5305)), -Box(Box(5306)), -Box(Box(5307)), -Box(Box(5308)), -Box(Box(5309)), -Box(Box(5310)), -Box(Box(5311)), -Box(Box(5312)), -Box(Box(5313)), -Box(Box(5314)), -Box(Box(5315)), -Box(Box(5316)), -Box(Box(5317)), -Box(Box(5318)), -Box(Box(5319)), -Box(Box(5320)), -Box(Box(5321)), -Box(Box(5322)), -Box(Box(5323)), -Box(Box(5324)), -Box(Box(5325)), -Box(Box(5326)), -Box(Box(5327)), -Box(Box(5328)), -Box(Box(5329)), -Box(Box(5330)), -Box(Box(5331)), -Box(Box(5332)), -Box(Box(5333)), -Box(Box(5334)), -Box(Box(5335)), -Box(Box(5336)), -Box(Box(5337)), -Box(Box(5338)), -Box(Box(5339)), -Box(Box(5340)), -Box(Box(5341)), -Box(Box(5342)), -Box(Box(5343)), -Box(Box(5344)), -Box(Box(5345)), -Box(Box(5346)), -Box(Box(5347)), -Box(Box(5348)), -Box(Box(5349)), -Box(Box(5350)), -Box(Box(5351)), -Box(Box(5352)), -Box(Box(5353)), -Box(Box(5354)), -Box(Box(5355)), -Box(Box(5356)), -Box(Box(5357)), -Box(Box(5358)), -Box(Box(5359)), -Box(Box(5360)), -Box(Box(5361)), -Box(Box(5362)), -Box(Box(5363)), -Box(Box(5364)), -Box(Box(5365)), -Box(Box(5366)), -Box(Box(5367)), -Box(Box(5368)), -Box(Box(5369)), -Box(Box(5370)), -Box(Box(5371)), -Box(Box(5372)), -Box(Box(5373)), -Box(Box(5374)), -Box(Box(5375)), -Box(Box(5376)), -Box(Box(5377)), -Box(Box(5378)), -Box(Box(5379)), -Box(Box(5380)), -Box(Box(5381)), -Box(Box(5382)), -Box(Box(5383)), -Box(Box(5384)), -Box(Box(5385)), -Box(Box(5386)), -Box(Box(5387)), -Box(Box(5388)), -Box(Box(5389)), -Box(Box(5390)), -Box(Box(5391)), -Box(Box(5392)), -Box(Box(5393)), -Box(Box(5394)), -Box(Box(5395)), -Box(Box(5396)), -Box(Box(5397)), -Box(Box(5398)), -Box(Box(5399)), -Box(Box(5400)), -Box(Box(5401)), -Box(Box(5402)), -Box(Box(5403)), -Box(Box(5404)), -Box(Box(5405)), -Box(Box(5406)), -Box(Box(5407)), -Box(Box(5408)), -Box(Box(5409)), -Box(Box(5410)), -Box(Box(5411)), -Box(Box(5412)), -Box(Box(5413)), -Box(Box(5414)), -Box(Box(5415)), -Box(Box(5416)), -Box(Box(5417)), -Box(Box(5418)), -Box(Box(5419)), -Box(Box(5420)), -Box(Box(5421)), -Box(Box(5422)), -Box(Box(5423)), -Box(Box(5424)), -Box(Box(5425)), -Box(Box(5426)), -Box(Box(5427)), -Box(Box(5428)), -Box(Box(5429)), -Box(Box(5430)), -Box(Box(5431)), -Box(Box(5432)), -Box(Box(5433)), -Box(Box(5434)), -Box(Box(5435)), -Box(Box(5436)), -Box(Box(5437)), -Box(Box(5438)), -Box(Box(5439)), -Box(Box(5440)), -Box(Box(5441)), -Box(Box(5442)), -Box(Box(5443)), -Box(Box(5444)), -Box(Box(5445)), -Box(Box(5446)), -Box(Box(5447)), -Box(Box(5448)), -Box(Box(5449)), -Box(Box(5450)), -Box(Box(5451)), -Box(Box(5452)), -Box(Box(5453)), -Box(Box(5454)), -Box(Box(5455)), -Box(Box(5456)), -Box(Box(5457)), -Box(Box(5458)), -Box(Box(5459)), -Box(Box(5460)), -Box(Box(5461)), -Box(Box(5462)), -Box(Box(5463)), -Box(Box(5464)), -Box(Box(5465)), -Box(Box(5466)), -Box(Box(5467)), -Box(Box(5468)), -Box(Box(5469)), -Box(Box(5470)), -Box(Box(5471)), -Box(Box(5472)), -Box(Box(5473)), -Box(Box(5474)), -Box(Box(5475)), -Box(Box(5476)), -Box(Box(5477)), -Box(Box(5478)), -Box(Box(5479)), -Box(Box(5480)), -Box(Box(5481)), -Box(Box(5482)), -Box(Box(5483)), -Box(Box(5484)), -Box(Box(5485)), -Box(Box(5486)), -Box(Box(5487)), -Box(Box(5488)), -Box(Box(5489)), -Box(Box(5490)), -Box(Box(5491)), -Box(Box(5492)), -Box(Box(5493)), -Box(Box(5494)), -Box(Box(5495)), -Box(Box(5496)), -Box(Box(5497)), -Box(Box(5498)), -Box(Box(5499)), -Box(Box(5500)), -Box(Box(5501)), -Box(Box(5502)), -Box(Box(5503)), -Box(Box(5504)), -Box(Box(5505)), -Box(Box(5506)), -Box(Box(5507)), -Box(Box(5508)), -Box(Box(5509)), -Box(Box(5510)), -Box(Box(5511)), -Box(Box(5512)), -Box(Box(5513)), -Box(Box(5514)), -Box(Box(5515)), -Box(Box(5516)), -Box(Box(5517)), -Box(Box(5518)), -Box(Box(5519)), -Box(Box(5520)), -Box(Box(5521)), -Box(Box(5522)), -Box(Box(5523)), -Box(Box(5524)), -Box(Box(5525)), -Box(Box(5526)), -Box(Box(5527)), -Box(Box(5528)), -Box(Box(5529)), -Box(Box(5530)), -Box(Box(5531)), -Box(Box(5532)), -Box(Box(5533)), -Box(Box(5534)), -Box(Box(5535)), -Box(Box(5536)), -Box(Box(5537)), -Box(Box(5538)), -Box(Box(5539)), -Box(Box(5540)), -Box(Box(5541)), -Box(Box(5542)), -Box(Box(5543)), -Box(Box(5544)), -Box(Box(5545)), -Box(Box(5546)), -Box(Box(5547)), -Box(Box(5548)), -Box(Box(5549)), -Box(Box(5550)), -Box(Box(5551)), -Box(Box(5552)), -Box(Box(5553)), -Box(Box(5554)), -Box(Box(5555)), -Box(Box(5556)), -Box(Box(5557)), -Box(Box(5558)), -Box(Box(5559)), -Box(Box(5560)), -Box(Box(5561)), -Box(Box(5562)), -Box(Box(5563)), -Box(Box(5564)), -Box(Box(5565)), -Box(Box(5566)), -Box(Box(5567)), -Box(Box(5568)), -Box(Box(5569)), -Box(Box(5570)), -Box(Box(5571)), -Box(Box(5572)), -Box(Box(5573)), -Box(Box(5574)), -Box(Box(5575)), -Box(Box(5576)), -Box(Box(5577)), -Box(Box(5578)), -Box(Box(5579)), -Box(Box(5580)), -Box(Box(5581)), -Box(Box(5582)), -Box(Box(5583)), -Box(Box(5584)), -Box(Box(5585)), -Box(Box(5586)), -Box(Box(5587)), -Box(Box(5588)), -Box(Box(5589)), -Box(Box(5590)), -Box(Box(5591)), -Box(Box(5592)), -Box(Box(5593)), -Box(Box(5594)), -Box(Box(5595)), -Box(Box(5596)), -Box(Box(5597)), -Box(Box(5598)), -Box(Box(5599)), -Box(Box(5600)), -Box(Box(5601)), -Box(Box(5602)), -Box(Box(5603)), -Box(Box(5604)), -Box(Box(5605)), -Box(Box(5606)), -Box(Box(5607)), -Box(Box(5608)), -Box(Box(5609)), -Box(Box(5610)), -Box(Box(5611)), -Box(Box(5612)), -Box(Box(5613)), -Box(Box(5614)), -Box(Box(5615)), -Box(Box(5616)), -Box(Box(5617)), -Box(Box(5618)), -Box(Box(5619)), -Box(Box(5620)), -Box(Box(5621)), -Box(Box(5622)), -Box(Box(5623)), -Box(Box(5624)), -Box(Box(5625)), -Box(Box(5626)), -Box(Box(5627)), -Box(Box(5628)), -Box(Box(5629)), -Box(Box(5630)), -Box(Box(5631)), -Box(Box(5632)), -Box(Box(5633)), -Box(Box(5634)), -Box(Box(5635)), -Box(Box(5636)), -Box(Box(5637)), -Box(Box(5638)), -Box(Box(5639)), -Box(Box(5640)), -Box(Box(5641)), -Box(Box(5642)), -Box(Box(5643)), -Box(Box(5644)), -Box(Box(5645)), -Box(Box(5646)), -Box(Box(5647)), -Box(Box(5648)), -Box(Box(5649)), -Box(Box(5650)), -Box(Box(5651)), -Box(Box(5652)), -Box(Box(5653)), -Box(Box(5654)), -Box(Box(5655)), -Box(Box(5656)), -Box(Box(5657)), -Box(Box(5658)), -Box(Box(5659)), -Box(Box(5660)), -Box(Box(5661)), -Box(Box(5662)), -Box(Box(5663)), -Box(Box(5664)), -Box(Box(5665)), -Box(Box(5666)), -Box(Box(5667)), -Box(Box(5668)), -Box(Box(5669)), -Box(Box(5670)), -Box(Box(5671)), -Box(Box(5672)), -Box(Box(5673)), -Box(Box(5674)), -Box(Box(5675)), -Box(Box(5676)), -Box(Box(5677)), -Box(Box(5678)), -Box(Box(5679)), -Box(Box(5680)), -Box(Box(5681)), -Box(Box(5682)), -Box(Box(5683)), -Box(Box(5684)), -Box(Box(5685)), -Box(Box(5686)), -Box(Box(5687)), -Box(Box(5688)), -Box(Box(5689)), -Box(Box(5690)), -Box(Box(5691)), -Box(Box(5692)), -Box(Box(5693)), -Box(Box(5694)), -Box(Box(5695)), -Box(Box(5696)), -Box(Box(5697)), -Box(Box(5698)), -Box(Box(5699)), -Box(Box(5700)), -Box(Box(5701)), -Box(Box(5702)), -Box(Box(5703)), -Box(Box(5704)), -Box(Box(5705)), -Box(Box(5706)), -Box(Box(5707)), -Box(Box(5708)), -Box(Box(5709)), -Box(Box(5710)), -Box(Box(5711)), -Box(Box(5712)), -Box(Box(5713)), -Box(Box(5714)), -Box(Box(5715)), -Box(Box(5716)), -Box(Box(5717)), -Box(Box(5718)), -Box(Box(5719)), -Box(Box(5720)), -Box(Box(5721)), -Box(Box(5722)), -Box(Box(5723)), -Box(Box(5724)), -Box(Box(5725)), -Box(Box(5726)), -Box(Box(5727)), -Box(Box(5728)), -Box(Box(5729)), -Box(Box(5730)), -Box(Box(5731)), -Box(Box(5732)), -Box(Box(5733)), -Box(Box(5734)), -Box(Box(5735)), -Box(Box(5736)), -Box(Box(5737)), -Box(Box(5738)), -Box(Box(5739)), -Box(Box(5740)), -Box(Box(5741)), -Box(Box(5742)), -Box(Box(5743)), -Box(Box(5744)), -Box(Box(5745)), -Box(Box(5746)), -Box(Box(5747)), -Box(Box(5748)), -Box(Box(5749)), -Box(Box(5750)), -Box(Box(5751)), -Box(Box(5752)), -Box(Box(5753)), -Box(Box(5754)), -Box(Box(5755)), -Box(Box(5756)), -Box(Box(5757)), -Box(Box(5758)), -Box(Box(5759)), -Box(Box(5760)), -Box(Box(5761)), -Box(Box(5762)), -Box(Box(5763)), -Box(Box(5764)), -Box(Box(5765)), -Box(Box(5766)), -Box(Box(5767)), -Box(Box(5768)), -Box(Box(5769)), -Box(Box(5770)), -Box(Box(5771)), -Box(Box(5772)), -Box(Box(5773)), -Box(Box(5774)), -Box(Box(5775)), -Box(Box(5776)), -Box(Box(5777)), -Box(Box(5778)), -Box(Box(5779)), -Box(Box(5780)), -Box(Box(5781)), -Box(Box(5782)), -Box(Box(5783)), -Box(Box(5784)), -Box(Box(5785)), -Box(Box(5786)), -Box(Box(5787)), -Box(Box(5788)), -Box(Box(5789)), -Box(Box(5790)), -Box(Box(5791)), -Box(Box(5792)), -Box(Box(5793)), -Box(Box(5794)), -Box(Box(5795)), -Box(Box(5796)), -Box(Box(5797)), -Box(Box(5798)), -Box(Box(5799)), -Box(Box(5800)), -Box(Box(5801)), -Box(Box(5802)), -Box(Box(5803)), -Box(Box(5804)), -Box(Box(5805)), -Box(Box(5806)), -Box(Box(5807)), -Box(Box(5808)), -Box(Box(5809)), -Box(Box(5810)), -Box(Box(5811)), -Box(Box(5812)), -Box(Box(5813)), -Box(Box(5814)), -Box(Box(5815)), -Box(Box(5816)), -Box(Box(5817)), -Box(Box(5818)), -Box(Box(5819)), -Box(Box(5820)), -Box(Box(5821)), -Box(Box(5822)), -Box(Box(5823)), -Box(Box(5824)), -Box(Box(5825)), -Box(Box(5826)), -Box(Box(5827)), -Box(Box(5828)), -Box(Box(5829)), -Box(Box(5830)), -Box(Box(5831)), -Box(Box(5832)), -Box(Box(5833)), -Box(Box(5834)), -Box(Box(5835)), -Box(Box(5836)), -Box(Box(5837)), -Box(Box(5838)), -Box(Box(5839)), -Box(Box(5840)), -Box(Box(5841)), -Box(Box(5842)), -Box(Box(5843)), -Box(Box(5844)), -Box(Box(5845)), -Box(Box(5846)), -Box(Box(5847)), -Box(Box(5848)), -Box(Box(5849)), -Box(Box(5850)), -Box(Box(5851)), -Box(Box(5852)), -Box(Box(5853)), -Box(Box(5854)), -Box(Box(5855)), -Box(Box(5856)), -Box(Box(5857)), -Box(Box(5858)), -Box(Box(5859)), -Box(Box(5860)), -Box(Box(5861)), -Box(Box(5862)), -Box(Box(5863)), -Box(Box(5864)), -Box(Box(5865)), -Box(Box(5866)), -Box(Box(5867)), -Box(Box(5868)), -Box(Box(5869)), -Box(Box(5870)), -Box(Box(5871)), -Box(Box(5872)), -Box(Box(5873)), -Box(Box(5874)), -Box(Box(5875)), -Box(Box(5876)), -Box(Box(5877)), -Box(Box(5878)), -Box(Box(5879)), -Box(Box(5880)), -Box(Box(5881)), -Box(Box(5882)), -Box(Box(5883)), -Box(Box(5884)), -Box(Box(5885)), -Box(Box(5886)), -Box(Box(5887)), -Box(Box(5888)), -Box(Box(5889)), -Box(Box(5890)), -Box(Box(5891)), -Box(Box(5892)), -Box(Box(5893)), -Box(Box(5894)), -Box(Box(5895)), -Box(Box(5896)), -Box(Box(5897)), -Box(Box(5898)), -Box(Box(5899)), -Box(Box(5900)), -Box(Box(5901)), -Box(Box(5902)), -Box(Box(5903)), -Box(Box(5904)), -Box(Box(5905)), -Box(Box(5906)), -Box(Box(5907)), -Box(Box(5908)), -Box(Box(5909)), -Box(Box(5910)), -Box(Box(5911)), -Box(Box(5912)), -Box(Box(5913)), -Box(Box(5914)), -Box(Box(5915)), -Box(Box(5916)), -Box(Box(5917)), -Box(Box(5918)), -Box(Box(5919)), -Box(Box(5920)), -Box(Box(5921)), -Box(Box(5922)), -Box(Box(5923)), -Box(Box(5924)), -Box(Box(5925)), -Box(Box(5926)), -Box(Box(5927)), -Box(Box(5928)), -Box(Box(5929)), -Box(Box(5930)), -Box(Box(5931)), -Box(Box(5932)), -Box(Box(5933)), -Box(Box(5934)), -Box(Box(5935)), -Box(Box(5936)), -Box(Box(5937)), -Box(Box(5938)), -Box(Box(5939)), -Box(Box(5940)), -Box(Box(5941)), -Box(Box(5942)), -Box(Box(5943)), -Box(Box(5944)), -Box(Box(5945)), -Box(Box(5946)), -Box(Box(5947)), -Box(Box(5948)), -Box(Box(5949)), -Box(Box(5950)), -Box(Box(5951)), -Box(Box(5952)), -Box(Box(5953)), -Box(Box(5954)), -Box(Box(5955)), -Box(Box(5956)), -Box(Box(5957)), -Box(Box(5958)), -Box(Box(5959)), -Box(Box(5960)), -Box(Box(5961)), -Box(Box(5962)), -Box(Box(5963)), -Box(Box(5964)), -Box(Box(5965)), -Box(Box(5966)), -Box(Box(5967)), -Box(Box(5968)), -Box(Box(5969)), -Box(Box(5970)), -Box(Box(5971)), -Box(Box(5972)), -Box(Box(5973)), -Box(Box(5974)), -Box(Box(5975)), -Box(Box(5976)), -Box(Box(5977)), -Box(Box(5978)), -Box(Box(5979)), -Box(Box(5980)), -Box(Box(5981)), -Box(Box(5982)), -Box(Box(5983)), -Box(Box(5984)), -Box(Box(5985)), -Box(Box(5986)), -Box(Box(5987)), -Box(Box(5988)), -Box(Box(5989)), -Box(Box(5990)), -Box(Box(5991)), -Box(Box(5992)), -Box(Box(5993)), -Box(Box(5994)), -Box(Box(5995)), -Box(Box(5996)), -Box(Box(5997)), -Box(Box(5998)), -Box(Box(5999)), -Box(Box(6000)), -Box(Box(6001)), -Box(Box(6002)), -Box(Box(6003)), -Box(Box(6004)), -Box(Box(6005)), -Box(Box(6006)), -Box(Box(6007)), -Box(Box(6008)), -Box(Box(6009)), -Box(Box(6010)), -Box(Box(6011)), -Box(Box(6012)), -Box(Box(6013)), -Box(Box(6014)), -Box(Box(6015)), -Box(Box(6016)), -Box(Box(6017)), -Box(Box(6018)), -Box(Box(6019)), -Box(Box(6020)), -Box(Box(6021)), -Box(Box(6022)), -Box(Box(6023)), -Box(Box(6024)), -Box(Box(6025)), -Box(Box(6026)), -Box(Box(6027)), -Box(Box(6028)), -Box(Box(6029)), -Box(Box(6030)), -Box(Box(6031)), -Box(Box(6032)), -Box(Box(6033)), -Box(Box(6034)), -Box(Box(6035)), -Box(Box(6036)), -Box(Box(6037)), -Box(Box(6038)), -Box(Box(6039)), -Box(Box(6040)), -Box(Box(6041)), -Box(Box(6042)), -Box(Box(6043)), -Box(Box(6044)), -Box(Box(6045)), -Box(Box(6046)), -Box(Box(6047)), -Box(Box(6048)), -Box(Box(6049)), -Box(Box(6050)), -Box(Box(6051)), -Box(Box(6052)), -Box(Box(6053)), -Box(Box(6054)), -Box(Box(6055)), -Box(Box(6056)), -Box(Box(6057)), -Box(Box(6058)), -Box(Box(6059)), -Box(Box(6060)), -Box(Box(6061)), -Box(Box(6062)), -Box(Box(6063)), -Box(Box(6064)), -Box(Box(6065)), -Box(Box(6066)), -Box(Box(6067)), -Box(Box(6068)), -Box(Box(6069)), -Box(Box(6070)), -Box(Box(6071)), -Box(Box(6072)), -Box(Box(6073)), -Box(Box(6074)), -Box(Box(6075)), -Box(Box(6076)), -Box(Box(6077)), -Box(Box(6078)), -Box(Box(6079)), -Box(Box(6080)), -Box(Box(6081)), -Box(Box(6082)), -Box(Box(6083)), -Box(Box(6084)), -Box(Box(6085)), -Box(Box(6086)), -Box(Box(6087)), -Box(Box(6088)), -Box(Box(6089)), -Box(Box(6090)), -Box(Box(6091)), -Box(Box(6092)), -Box(Box(6093)), -Box(Box(6094)), -Box(Box(6095)), -Box(Box(6096)), -Box(Box(6097)), -Box(Box(6098)), -Box(Box(6099)), -Box(Box(6100)), -Box(Box(6101)), -Box(Box(6102)), -Box(Box(6103)), -Box(Box(6104)), -Box(Box(6105)), -Box(Box(6106)), -Box(Box(6107)), -Box(Box(6108)), -Box(Box(6109)), -Box(Box(6110)), -Box(Box(6111)), -Box(Box(6112)), -Box(Box(6113)), -Box(Box(6114)), -Box(Box(6115)), -Box(Box(6116)), -Box(Box(6117)), -Box(Box(6118)), -Box(Box(6119)), -Box(Box(6120)), -Box(Box(6121)), -Box(Box(6122)), -Box(Box(6123)), -Box(Box(6124)), -Box(Box(6125)), -Box(Box(6126)), -Box(Box(6127)), -Box(Box(6128)), -Box(Box(6129)), -Box(Box(6130)), -Box(Box(6131)), -Box(Box(6132)), -Box(Box(6133)), -Box(Box(6134)), -Box(Box(6135)), -Box(Box(6136)), -Box(Box(6137)), -Box(Box(6138)), -Box(Box(6139)), -Box(Box(6140)), -Box(Box(6141)), -Box(Box(6142)), -Box(Box(6143)), -Box(Box(6144)), -Box(Box(6145)), -Box(Box(6146)), -Box(Box(6147)), -Box(Box(6148)), -Box(Box(6149)), -Box(Box(6150)), -Box(Box(6151)), -Box(Box(6152)), -Box(Box(6153)), -Box(Box(6154)), -Box(Box(6155)), -Box(Box(6156)), -Box(Box(6157)), -Box(Box(6158)), -Box(Box(6159)), -Box(Box(6160)), -Box(Box(6161)), -Box(Box(6162)), -Box(Box(6163)), -Box(Box(6164)), -Box(Box(6165)), -Box(Box(6166)), -Box(Box(6167)), -Box(Box(6168)), -Box(Box(6169)), -Box(Box(6170)), -Box(Box(6171)), -Box(Box(6172)), -Box(Box(6173)), -Box(Box(6174)), -Box(Box(6175)), -Box(Box(6176)), -Box(Box(6177)), -Box(Box(6178)), -Box(Box(6179)), -Box(Box(6180)), -Box(Box(6181)), -Box(Box(6182)), -Box(Box(6183)), -Box(Box(6184)), -Box(Box(6185)), -Box(Box(6186)), -Box(Box(6187)), -Box(Box(6188)), -Box(Box(6189)), -Box(Box(6190)), -Box(Box(6191)), -Box(Box(6192)), -Box(Box(6193)), -Box(Box(6194)), -Box(Box(6195)), -Box(Box(6196)), -Box(Box(6197)), -Box(Box(6198)), -Box(Box(6199)), -Box(Box(6200)), -Box(Box(6201)), -Box(Box(6202)), -Box(Box(6203)), -Box(Box(6204)), -Box(Box(6205)), -Box(Box(6206)), -Box(Box(6207)), -Box(Box(6208)), -Box(Box(6209)), -Box(Box(6210)), -Box(Box(6211)), -Box(Box(6212)), -Box(Box(6213)), -Box(Box(6214)), -Box(Box(6215)), -Box(Box(6216)), -Box(Box(6217)), -Box(Box(6218)), -Box(Box(6219)), -Box(Box(6220)), -Box(Box(6221)), -Box(Box(6222)), -Box(Box(6223)), -Box(Box(6224)), -Box(Box(6225)), -Box(Box(6226)), -Box(Box(6227)), -Box(Box(6228)), -Box(Box(6229)), -Box(Box(6230)), -Box(Box(6231)), -Box(Box(6232)), -Box(Box(6233)), -Box(Box(6234)), -Box(Box(6235)), -Box(Box(6236)), -Box(Box(6237)), -Box(Box(6238)), -Box(Box(6239)), -Box(Box(6240)), -Box(Box(6241)), -Box(Box(6242)), -Box(Box(6243)), -Box(Box(6244)), -Box(Box(6245)), -Box(Box(6246)), -Box(Box(6247)), -Box(Box(6248)), -Box(Box(6249)), -Box(Box(6250)), -Box(Box(6251)), -Box(Box(6252)), -Box(Box(6253)), -Box(Box(6254)), -Box(Box(6255)), -Box(Box(6256)), -Box(Box(6257)), -Box(Box(6258)), -Box(Box(6259)), -Box(Box(6260)), -Box(Box(6261)), -Box(Box(6262)), -Box(Box(6263)), -Box(Box(6264)), -Box(Box(6265)), -Box(Box(6266)), -Box(Box(6267)), -Box(Box(6268)), -Box(Box(6269)), -Box(Box(6270)), -Box(Box(6271)), -Box(Box(6272)), -Box(Box(6273)), -Box(Box(6274)), -Box(Box(6275)), -Box(Box(6276)), -Box(Box(6277)), -Box(Box(6278)), -Box(Box(6279)), -Box(Box(6280)), -Box(Box(6281)), -Box(Box(6282)), -Box(Box(6283)), -Box(Box(6284)), -Box(Box(6285)), -Box(Box(6286)), -Box(Box(6287)), -Box(Box(6288)), -Box(Box(6289)), -Box(Box(6290)), -Box(Box(6291)), -Box(Box(6292)), -Box(Box(6293)), -Box(Box(6294)), -Box(Box(6295)), -Box(Box(6296)), -Box(Box(6297)), -Box(Box(6298)), -Box(Box(6299)), -Box(Box(6300)), -Box(Box(6301)), -Box(Box(6302)), -Box(Box(6303)), -Box(Box(6304)), -Box(Box(6305)), -Box(Box(6306)), -Box(Box(6307)), -Box(Box(6308)), -Box(Box(6309)), -Box(Box(6310)), -Box(Box(6311)), -Box(Box(6312)), -Box(Box(6313)), -Box(Box(6314)), -Box(Box(6315)), -Box(Box(6316)), -Box(Box(6317)), -Box(Box(6318)), -Box(Box(6319)), -Box(Box(6320)), -Box(Box(6321)), -Box(Box(6322)), -Box(Box(6323)), -Box(Box(6324)), -Box(Box(6325)), -Box(Box(6326)), -Box(Box(6327)), -Box(Box(6328)), -Box(Box(6329)), -Box(Box(6330)), -Box(Box(6331)), -Box(Box(6332)), -Box(Box(6333)), -Box(Box(6334)), -Box(Box(6335)), -Box(Box(6336)), -Box(Box(6337)), -Box(Box(6338)), -Box(Box(6339)), -Box(Box(6340)), -Box(Box(6341)), -Box(Box(6342)), -Box(Box(6343)), -Box(Box(6344)), -Box(Box(6345)), -Box(Box(6346)), -Box(Box(6347)), -Box(Box(6348)), -Box(Box(6349)), -Box(Box(6350)), -Box(Box(6351)), -Box(Box(6352)), -Box(Box(6353)), -Box(Box(6354)), -Box(Box(6355)), -Box(Box(6356)), -Box(Box(6357)), -Box(Box(6358)), -Box(Box(6359)), -Box(Box(6360)), -Box(Box(6361)), -Box(Box(6362)), -Box(Box(6363)), -Box(Box(6364)), -Box(Box(6365)), -Box(Box(6366)), -Box(Box(6367)), -Box(Box(6368)), -Box(Box(6369)), -Box(Box(6370)), -Box(Box(6371)), -Box(Box(6372)), -Box(Box(6373)), -Box(Box(6374)), -Box(Box(6375)), -Box(Box(6376)), -Box(Box(6377)), -Box(Box(6378)), -Box(Box(6379)), -Box(Box(6380)), -Box(Box(6381)), -Box(Box(6382)), -Box(Box(6383)), -Box(Box(6384)), -Box(Box(6385)), -Box(Box(6386)), -Box(Box(6387)), -Box(Box(6388)), -Box(Box(6389)), -Box(Box(6390)), -Box(Box(6391)), -Box(Box(6392)), -Box(Box(6393)), -Box(Box(6394)), -Box(Box(6395)), -Box(Box(6396)), -Box(Box(6397)), -Box(Box(6398)), -Box(Box(6399)), -Box(Box(6400)), -Box(Box(6401)), -Box(Box(6402)), -Box(Box(6403)), -Box(Box(6404)), -Box(Box(6405)), -Box(Box(6406)), -Box(Box(6407)), -Box(Box(6408)), -Box(Box(6409)), -Box(Box(6410)), -Box(Box(6411)), -Box(Box(6412)), -Box(Box(6413)), -Box(Box(6414)), -Box(Box(6415)), -Box(Box(6416)), -Box(Box(6417)), -Box(Box(6418)), -Box(Box(6419)), -Box(Box(6420)), -Box(Box(6421)), -Box(Box(6422)), -Box(Box(6423)), -Box(Box(6424)), -Box(Box(6425)), -Box(Box(6426)), -Box(Box(6427)), -Box(Box(6428)), -Box(Box(6429)), -Box(Box(6430)), -Box(Box(6431)), -Box(Box(6432)), -Box(Box(6433)), -Box(Box(6434)), -Box(Box(6435)), -Box(Box(6436)), -Box(Box(6437)), -Box(Box(6438)), -Box(Box(6439)), -Box(Box(6440)), -Box(Box(6441)), -Box(Box(6442)), -Box(Box(6443)), -Box(Box(6444)), -Box(Box(6445)), -Box(Box(6446)), -Box(Box(6447)), -Box(Box(6448)), -Box(Box(6449)), -Box(Box(6450)), -Box(Box(6451)), -Box(Box(6452)), -Box(Box(6453)), -Box(Box(6454)), -Box(Box(6455)), -Box(Box(6456)), -Box(Box(6457)), -Box(Box(6458)), -Box(Box(6459)), -Box(Box(6460)), -Box(Box(6461)), -Box(Box(6462)), -Box(Box(6463)), -Box(Box(6464)), -Box(Box(6465)), -Box(Box(6466)), -Box(Box(6467)), -Box(Box(6468)), -Box(Box(6469)), -Box(Box(6470)), -Box(Box(6471)), -Box(Box(6472)), -Box(Box(6473)), -Box(Box(6474)), -Box(Box(6475)), -Box(Box(6476)), -Box(Box(6477)), -Box(Box(6478)), -Box(Box(6479)), -Box(Box(6480)), -Box(Box(6481)), -Box(Box(6482)), -Box(Box(6483)), -Box(Box(6484)), -Box(Box(6485)), -Box(Box(6486)), -Box(Box(6487)), -Box(Box(6488)), -Box(Box(6489)), -Box(Box(6490)), -Box(Box(6491)), -Box(Box(6492)), -Box(Box(6493)), -Box(Box(6494)), -Box(Box(6495)), -Box(Box(6496)), -Box(Box(6497)), -Box(Box(6498)), -Box(Box(6499)), -Box(Box(6500)), -Box(Box(6501)), -Box(Box(6502)), -Box(Box(6503)), -Box(Box(6504)), -Box(Box(6505)), -Box(Box(6506)), -Box(Box(6507)), -Box(Box(6508)), -Box(Box(6509)), -Box(Box(6510)), -Box(Box(6511)), -Box(Box(6512)), -Box(Box(6513)), -Box(Box(6514)), -Box(Box(6515)), -Box(Box(6516)), -Box(Box(6517)), -Box(Box(6518)), -Box(Box(6519)), -Box(Box(6520)), -Box(Box(6521)), -Box(Box(6522)), -Box(Box(6523)), -Box(Box(6524)), -Box(Box(6525)), -Box(Box(6526)), -Box(Box(6527)), -Box(Box(6528)), -Box(Box(6529)), -Box(Box(6530)), -Box(Box(6531)), -Box(Box(6532)), -Box(Box(6533)), -Box(Box(6534)), -Box(Box(6535)), -Box(Box(6536)), -Box(Box(6537)), -Box(Box(6538)), -Box(Box(6539)), -Box(Box(6540)), -Box(Box(6541)), -Box(Box(6542)), -Box(Box(6543)), -Box(Box(6544)), -Box(Box(6545)), -Box(Box(6546)), -Box(Box(6547)), -Box(Box(6548)), -Box(Box(6549)), -Box(Box(6550)), -Box(Box(6551)), -Box(Box(6552)), -Box(Box(6553)), -Box(Box(6554)), -Box(Box(6555)), -Box(Box(6556)), -Box(Box(6557)), -Box(Box(6558)), -Box(Box(6559)), -Box(Box(6560)), -Box(Box(6561)), -Box(Box(6562)), -Box(Box(6563)), -Box(Box(6564)), -Box(Box(6565)), -Box(Box(6566)), -Box(Box(6567)), -Box(Box(6568)), -Box(Box(6569)), -Box(Box(6570)), -Box(Box(6571)), -Box(Box(6572)), -Box(Box(6573)), -Box(Box(6574)), -Box(Box(6575)), -Box(Box(6576)), -Box(Box(6577)), -Box(Box(6578)), -Box(Box(6579)), -Box(Box(6580)), -Box(Box(6581)), -Box(Box(6582)), -Box(Box(6583)), -Box(Box(6584)), -Box(Box(6585)), -Box(Box(6586)), -Box(Box(6587)), -Box(Box(6588)), -Box(Box(6589)), -Box(Box(6590)), -Box(Box(6591)), -Box(Box(6592)), -Box(Box(6593)), -Box(Box(6594)), -Box(Box(6595)), -Box(Box(6596)), -Box(Box(6597)), -Box(Box(6598)), -Box(Box(6599)), -Box(Box(6600)), -Box(Box(6601)), -Box(Box(6602)), -Box(Box(6603)), -Box(Box(6604)), -Box(Box(6605)), -Box(Box(6606)), -Box(Box(6607)), -Box(Box(6608)), -Box(Box(6609)), -Box(Box(6610)), -Box(Box(6611)), -Box(Box(6612)), -Box(Box(6613)), -Box(Box(6614)), -Box(Box(6615)), -Box(Box(6616)), -Box(Box(6617)), -Box(Box(6618)), -Box(Box(6619)), -Box(Box(6620)), -Box(Box(6621)), -Box(Box(6622)), -Box(Box(6623)), -Box(Box(6624)), -Box(Box(6625)), -Box(Box(6626)), -Box(Box(6627)), -Box(Box(6628)), -Box(Box(6629)), -Box(Box(6630)), -Box(Box(6631)), -Box(Box(6632)), -Box(Box(6633)), -Box(Box(6634)), -Box(Box(6635)), -Box(Box(6636)), -Box(Box(6637)), -Box(Box(6638)), -Box(Box(6639)), -Box(Box(6640)), -Box(Box(6641)), -Box(Box(6642)), -Box(Box(6643)), -Box(Box(6644)), -Box(Box(6645)), -Box(Box(6646)), -Box(Box(6647)), -Box(Box(6648)), -Box(Box(6649)), -Box(Box(6650)), -Box(Box(6651)), -Box(Box(6652)), -Box(Box(6653)), -Box(Box(6654)), -Box(Box(6655)), -Box(Box(6656)), -Box(Box(6657)), -Box(Box(6658)), -Box(Box(6659)), -Box(Box(6660)), -Box(Box(6661)), -Box(Box(6662)), -Box(Box(6663)), -Box(Box(6664)), -Box(Box(6665)), -Box(Box(6666)), -Box(Box(6667)), -Box(Box(6668)), -Box(Box(6669)), -Box(Box(6670)), -Box(Box(6671)), -Box(Box(6672)), -Box(Box(6673)), -Box(Box(6674)), -Box(Box(6675)), -Box(Box(6676)), -Box(Box(6677)), -Box(Box(6678)), -Box(Box(6679)), -Box(Box(6680)), -Box(Box(6681)), -Box(Box(6682)), -Box(Box(6683)), -Box(Box(6684)), -Box(Box(6685)), -Box(Box(6686)), -Box(Box(6687)), -Box(Box(6688)), -Box(Box(6689)), -Box(Box(6690)), -Box(Box(6691)), -Box(Box(6692)), -Box(Box(6693)), -Box(Box(6694)), -Box(Box(6695)), -Box(Box(6696)), -Box(Box(6697)), -Box(Box(6698)), -Box(Box(6699)), -Box(Box(6700)), -Box(Box(6701)), -Box(Box(6702)), -Box(Box(6703)), -Box(Box(6704)), -Box(Box(6705)), -Box(Box(6706)), -Box(Box(6707)), -Box(Box(6708)), -Box(Box(6709)), -Box(Box(6710)), -Box(Box(6711)), -Box(Box(6712)), -Box(Box(6713)), -Box(Box(6714)), -Box(Box(6715)), -Box(Box(6716)), -Box(Box(6717)), -Box(Box(6718)), -Box(Box(6719)), -Box(Box(6720)), -Box(Box(6721)), -Box(Box(6722)), -Box(Box(6723)), -Box(Box(6724)), -Box(Box(6725)), -Box(Box(6726)), -Box(Box(6727)), -Box(Box(6728)), -Box(Box(6729)), -Box(Box(6730)), -Box(Box(6731)), -Box(Box(6732)), -Box(Box(6733)), -Box(Box(6734)), -Box(Box(6735)), -Box(Box(6736)), -Box(Box(6737)), -Box(Box(6738)), -Box(Box(6739)), -Box(Box(6740)), -Box(Box(6741)), -Box(Box(6742)), -Box(Box(6743)), -Box(Box(6744)), -Box(Box(6745)), -Box(Box(6746)), -Box(Box(6747)), -Box(Box(6748)), -Box(Box(6749)), -Box(Box(6750)), -Box(Box(6751)), -Box(Box(6752)), -Box(Box(6753)), -Box(Box(6754)), -Box(Box(6755)), -Box(Box(6756)), -Box(Box(6757)), -Box(Box(6758)), -Box(Box(6759)), -Box(Box(6760)), -Box(Box(6761)), -Box(Box(6762)), -Box(Box(6763)), -Box(Box(6764)), -Box(Box(6765)), -Box(Box(6766)), -Box(Box(6767)), -Box(Box(6768)), -Box(Box(6769)), -Box(Box(6770)), -Box(Box(6771)), -Box(Box(6772)), -Box(Box(6773)), -Box(Box(6774)), -Box(Box(6775)), -Box(Box(6776)), -Box(Box(6777)), -Box(Box(6778)), -Box(Box(6779)), -Box(Box(6780)), -Box(Box(6781)), -Box(Box(6782)), -Box(Box(6783)), -Box(Box(6784)), -Box(Box(6785)), -Box(Box(6786)), -Box(Box(6787)), -Box(Box(6788)), -Box(Box(6789)), -Box(Box(6790)), -Box(Box(6791)), -Box(Box(6792)), -Box(Box(6793)), -Box(Box(6794)), -Box(Box(6795)), -Box(Box(6796)), -Box(Box(6797)), -Box(Box(6798)), -Box(Box(6799)), -Box(Box(6800)), -Box(Box(6801)), -Box(Box(6802)), -Box(Box(6803)), -Box(Box(6804)), -Box(Box(6805)), -Box(Box(6806)), -Box(Box(6807)), -Box(Box(6808)), -Box(Box(6809)), -Box(Box(6810)), -Box(Box(6811)), -Box(Box(6812)), -Box(Box(6813)), -Box(Box(6814)), -Box(Box(6815)), -Box(Box(6816)), -Box(Box(6817)), -Box(Box(6818)), -Box(Box(6819)), -Box(Box(6820)), -Box(Box(6821)), -Box(Box(6822)), -Box(Box(6823)), -Box(Box(6824)), -Box(Box(6825)), -Box(Box(6826)), -Box(Box(6827)), -Box(Box(6828)), -Box(Box(6829)), -Box(Box(6830)), -Box(Box(6831)), -Box(Box(6832)), -Box(Box(6833)), -Box(Box(6834)), -Box(Box(6835)), -Box(Box(6836)), -Box(Box(6837)), -Box(Box(6838)), -Box(Box(6839)), -Box(Box(6840)), -Box(Box(6841)), -Box(Box(6842)), -Box(Box(6843)), -Box(Box(6844)), -Box(Box(6845)), -Box(Box(6846)), -Box(Box(6847)), -Box(Box(6848)), -Box(Box(6849)), -Box(Box(6850)), -Box(Box(6851)), -Box(Box(6852)), -Box(Box(6853)), -Box(Box(6854)), -Box(Box(6855)), -Box(Box(6856)), -Box(Box(6857)), -Box(Box(6858)), -Box(Box(6859)), -Box(Box(6860)), -Box(Box(6861)), -Box(Box(6862)), -Box(Box(6863)), -Box(Box(6864)), -Box(Box(6865)), -Box(Box(6866)), -Box(Box(6867)), -Box(Box(6868)), -Box(Box(6869)), -Box(Box(6870)), -Box(Box(6871)), -Box(Box(6872)), -Box(Box(6873)), -Box(Box(6874)), -Box(Box(6875)), -Box(Box(6876)), -Box(Box(6877)), -Box(Box(6878)), -Box(Box(6879)), -Box(Box(6880)), -Box(Box(6881)), -Box(Box(6882)), -Box(Box(6883)), -Box(Box(6884)), -Box(Box(6885)), -Box(Box(6886)), -Box(Box(6887)), -Box(Box(6888)), -Box(Box(6889)), -Box(Box(6890)), -Box(Box(6891)), -Box(Box(6892)), -Box(Box(6893)), -Box(Box(6894)), -Box(Box(6895)), -Box(Box(6896)), -Box(Box(6897)), -Box(Box(6898)), -Box(Box(6899)), -Box(Box(6900)), -Box(Box(6901)), -Box(Box(6902)), -Box(Box(6903)), -Box(Box(6904)), -Box(Box(6905)), -Box(Box(6906)), -Box(Box(6907)), -Box(Box(6908)), -Box(Box(6909)), -Box(Box(6910)), -Box(Box(6911)), -Box(Box(6912)), -Box(Box(6913)), -Box(Box(6914)), -Box(Box(6915)), -Box(Box(6916)), -Box(Box(6917)), -Box(Box(6918)), -Box(Box(6919)), -Box(Box(6920)), -Box(Box(6921)), -Box(Box(6922)), -Box(Box(6923)), -Box(Box(6924)), -Box(Box(6925)), -Box(Box(6926)), -Box(Box(6927)), -Box(Box(6928)), -Box(Box(6929)), -Box(Box(6930)), -Box(Box(6931)), -Box(Box(6932)), -Box(Box(6933)), -Box(Box(6934)), -Box(Box(6935)), -Box(Box(6936)), -Box(Box(6937)), -Box(Box(6938)), -Box(Box(6939)), -Box(Box(6940)), -Box(Box(6941)), -Box(Box(6942)), -Box(Box(6943)), -Box(Box(6944)), -Box(Box(6945)), -Box(Box(6946)), -Box(Box(6947)), -Box(Box(6948)), -Box(Box(6949)), -Box(Box(6950)), -Box(Box(6951)), -Box(Box(6952)), -Box(Box(6953)), -Box(Box(6954)), -Box(Box(6955)), -Box(Box(6956)), -Box(Box(6957)), -Box(Box(6958)), -Box(Box(6959)), -Box(Box(6960)), -Box(Box(6961)), -Box(Box(6962)), -Box(Box(6963)), -Box(Box(6964)), -Box(Box(6965)), -Box(Box(6966)), -Box(Box(6967)), -Box(Box(6968)), -Box(Box(6969)), -Box(Box(6970)), -Box(Box(6971)), -Box(Box(6972)), -Box(Box(6973)), -Box(Box(6974)), -Box(Box(6975)), -Box(Box(6976)), -Box(Box(6977)), -Box(Box(6978)), -Box(Box(6979)), -Box(Box(6980)), -Box(Box(6981)), -Box(Box(6982)), -Box(Box(6983)), -Box(Box(6984)), -Box(Box(6985)), -Box(Box(6986)), -Box(Box(6987)), -Box(Box(6988)), -Box(Box(6989)), -Box(Box(6990)), -Box(Box(6991)), -Box(Box(6992)), -Box(Box(6993)), -Box(Box(6994)), -Box(Box(6995)), -Box(Box(6996)), -Box(Box(6997)), -Box(Box(6998)), -Box(Box(6999)), -Box(Box(7000)), -Box(Box(7001)), -Box(Box(7002)), -Box(Box(7003)), -Box(Box(7004)), -Box(Box(7005)), -Box(Box(7006)), -Box(Box(7007)), -Box(Box(7008)), -Box(Box(7009)), -Box(Box(7010)), -Box(Box(7011)), -Box(Box(7012)), -Box(Box(7013)), -Box(Box(7014)), -Box(Box(7015)), -Box(Box(7016)), -Box(Box(7017)), -Box(Box(7018)), -Box(Box(7019)), -Box(Box(7020)), -Box(Box(7021)), -Box(Box(7022)), -Box(Box(7023)), -Box(Box(7024)), -Box(Box(7025)), -Box(Box(7026)), -Box(Box(7027)), -Box(Box(7028)), -Box(Box(7029)), -Box(Box(7030)), -Box(Box(7031)), -Box(Box(7032)), -Box(Box(7033)), -Box(Box(7034)), -Box(Box(7035)), -Box(Box(7036)), -Box(Box(7037)), -Box(Box(7038)), -Box(Box(7039)), -Box(Box(7040)), -Box(Box(7041)), -Box(Box(7042)), -Box(Box(7043)), -Box(Box(7044)), -Box(Box(7045)), -Box(Box(7046)), -Box(Box(7047)), -Box(Box(7048)), -Box(Box(7049)), -Box(Box(7050)), -Box(Box(7051)), -Box(Box(7052)), -Box(Box(7053)), -Box(Box(7054)), -Box(Box(7055)), -Box(Box(7056)), -Box(Box(7057)), -Box(Box(7058)), -Box(Box(7059)), -Box(Box(7060)), -Box(Box(7061)), -Box(Box(7062)), -Box(Box(7063)), -Box(Box(7064)), -Box(Box(7065)), -Box(Box(7066)), -Box(Box(7067)), -Box(Box(7068)), -Box(Box(7069)), -Box(Box(7070)), -Box(Box(7071)), -Box(Box(7072)), -Box(Box(7073)), -Box(Box(7074)), -Box(Box(7075)), -Box(Box(7076)), -Box(Box(7077)), -Box(Box(7078)), -Box(Box(7079)), -Box(Box(7080)), -Box(Box(7081)), -Box(Box(7082)), -Box(Box(7083)), -Box(Box(7084)), -Box(Box(7085)), -Box(Box(7086)), -Box(Box(7087)), -Box(Box(7088)), -Box(Box(7089)), -Box(Box(7090)), -Box(Box(7091)), -Box(Box(7092)), -Box(Box(7093)), -Box(Box(7094)), -Box(Box(7095)), -Box(Box(7096)), -Box(Box(7097)), -Box(Box(7098)), -Box(Box(7099)), -Box(Box(7100)), -Box(Box(7101)), -Box(Box(7102)), -Box(Box(7103)), -Box(Box(7104)), -Box(Box(7105)), -Box(Box(7106)), -Box(Box(7107)), -Box(Box(7108)), -Box(Box(7109)), -Box(Box(7110)), -Box(Box(7111)), -Box(Box(7112)), -Box(Box(7113)), -Box(Box(7114)), -Box(Box(7115)), -Box(Box(7116)), -Box(Box(7117)), -Box(Box(7118)), -Box(Box(7119)), -Box(Box(7120)), -Box(Box(7121)), -Box(Box(7122)), -Box(Box(7123)), -Box(Box(7124)), -Box(Box(7125)), -Box(Box(7126)), -Box(Box(7127)), -Box(Box(7128)), -Box(Box(7129)), -Box(Box(7130)), -Box(Box(7131)), -Box(Box(7132)), -Box(Box(7133)), -Box(Box(7134)), -Box(Box(7135)), -Box(Box(7136)), -Box(Box(7137)), -Box(Box(7138)), -Box(Box(7139)), -Box(Box(7140)), -Box(Box(7141)), -Box(Box(7142)), -Box(Box(7143)), -Box(Box(7144)), -Box(Box(7145)), -Box(Box(7146)), -Box(Box(7147)), -Box(Box(7148)), -Box(Box(7149)), -Box(Box(7150)), -Box(Box(7151)), -Box(Box(7152)), -Box(Box(7153)), -Box(Box(7154)), -Box(Box(7155)), -Box(Box(7156)), -Box(Box(7157)), -Box(Box(7158)), -Box(Box(7159)), -Box(Box(7160)), -Box(Box(7161)), -Box(Box(7162)), -Box(Box(7163)), -Box(Box(7164)), -Box(Box(7165)), -Box(Box(7166)), -Box(Box(7167)), -Box(Box(7168)), -Box(Box(7169)), -Box(Box(7170)), -Box(Box(7171)), -Box(Box(7172)), -Box(Box(7173)), -Box(Box(7174)), -Box(Box(7175)), -Box(Box(7176)), -Box(Box(7177)), -Box(Box(7178)), -Box(Box(7179)), -Box(Box(7180)), -Box(Box(7181)), -Box(Box(7182)), -Box(Box(7183)), -Box(Box(7184)), -Box(Box(7185)), -Box(Box(7186)), -Box(Box(7187)), -Box(Box(7188)), -Box(Box(7189)), -Box(Box(7190)), -Box(Box(7191)), -Box(Box(7192)), -Box(Box(7193)), -Box(Box(7194)), -Box(Box(7195)), -Box(Box(7196)), -Box(Box(7197)), -Box(Box(7198)), -Box(Box(7199)), -Box(Box(7200)), -Box(Box(7201)), -Box(Box(7202)), -Box(Box(7203)), -Box(Box(7204)), -Box(Box(7205)), -Box(Box(7206)), -Box(Box(7207)), -Box(Box(7208)), -Box(Box(7209)), -Box(Box(7210)), -Box(Box(7211)), -Box(Box(7212)), -Box(Box(7213)), -Box(Box(7214)), -Box(Box(7215)), -Box(Box(7216)), -Box(Box(7217)), -Box(Box(7218)), -Box(Box(7219)), -Box(Box(7220)), -Box(Box(7221)), -Box(Box(7222)), -Box(Box(7223)), -Box(Box(7224)), -Box(Box(7225)), -Box(Box(7226)), -Box(Box(7227)), -Box(Box(7228)), -Box(Box(7229)), -Box(Box(7230)), -Box(Box(7231)), -Box(Box(7232)), -Box(Box(7233)), -Box(Box(7234)), -Box(Box(7235)), -Box(Box(7236)), -Box(Box(7237)), -Box(Box(7238)), -Box(Box(7239)), -Box(Box(7240)), -Box(Box(7241)), -Box(Box(7242)), -Box(Box(7243)), -Box(Box(7244)), -Box(Box(7245)), -Box(Box(7246)), -Box(Box(7247)), -Box(Box(7248)), -Box(Box(7249)), -Box(Box(7250)), -Box(Box(7251)), -Box(Box(7252)), -Box(Box(7253)), -Box(Box(7254)), -Box(Box(7255)), -Box(Box(7256)), -Box(Box(7257)), -Box(Box(7258)), -Box(Box(7259)), -Box(Box(7260)), -Box(Box(7261)), -Box(Box(7262)), -Box(Box(7263)), -Box(Box(7264)), -Box(Box(7265)), -Box(Box(7266)), -Box(Box(7267)), -Box(Box(7268)), -Box(Box(7269)), -Box(Box(7270)), -Box(Box(7271)), -Box(Box(7272)), -Box(Box(7273)), -Box(Box(7274)), -Box(Box(7275)), -Box(Box(7276)), -Box(Box(7277)), -Box(Box(7278)), -Box(Box(7279)), -Box(Box(7280)), -Box(Box(7281)), -Box(Box(7282)), -Box(Box(7283)), -Box(Box(7284)), -Box(Box(7285)), -Box(Box(7286)), -Box(Box(7287)), -Box(Box(7288)), -Box(Box(7289)), -Box(Box(7290)), -Box(Box(7291)), -Box(Box(7292)), -Box(Box(7293)), -Box(Box(7294)), -Box(Box(7295)), -Box(Box(7296)), -Box(Box(7297)), -Box(Box(7298)), -Box(Box(7299)), -Box(Box(7300)), -Box(Box(7301)), -Box(Box(7302)), -Box(Box(7303)), -Box(Box(7304)), -Box(Box(7305)), -Box(Box(7306)), -Box(Box(7307)), -Box(Box(7308)), -Box(Box(7309)), -Box(Box(7310)), -Box(Box(7311)), -Box(Box(7312)), -Box(Box(7313)), -Box(Box(7314)), -Box(Box(7315)), -Box(Box(7316)), -Box(Box(7317)), -Box(Box(7318)), -Box(Box(7319)), -Box(Box(7320)), -Box(Box(7321)), -Box(Box(7322)), -Box(Box(7323)), -Box(Box(7324)), -Box(Box(7325)), -Box(Box(7326)), -Box(Box(7327)), -Box(Box(7328)), -Box(Box(7329)), -Box(Box(7330)), -Box(Box(7331)), -Box(Box(7332)), -Box(Box(7333)), -Box(Box(7334)), -Box(Box(7335)), -Box(Box(7336)), -Box(Box(7337)), -Box(Box(7338)), -Box(Box(7339)), -Box(Box(7340)), -Box(Box(7341)), -Box(Box(7342)), -Box(Box(7343)), -Box(Box(7344)), -Box(Box(7345)), -Box(Box(7346)), -Box(Box(7347)), -Box(Box(7348)), -Box(Box(7349)), -Box(Box(7350)), -Box(Box(7351)), -Box(Box(7352)), -Box(Box(7353)), -Box(Box(7354)), -Box(Box(7355)), -Box(Box(7356)), -Box(Box(7357)), -Box(Box(7358)), -Box(Box(7359)), -Box(Box(7360)), -Box(Box(7361)), -Box(Box(7362)), -Box(Box(7363)), -Box(Box(7364)), -Box(Box(7365)), -Box(Box(7366)), -Box(Box(7367)), -Box(Box(7368)), -Box(Box(7369)), -Box(Box(7370)), -Box(Box(7371)), -Box(Box(7372)), -Box(Box(7373)), -Box(Box(7374)), -Box(Box(7375)), -Box(Box(7376)), -Box(Box(7377)), -Box(Box(7378)), -Box(Box(7379)), -Box(Box(7380)), -Box(Box(7381)), -Box(Box(7382)), -Box(Box(7383)), -Box(Box(7384)), -Box(Box(7385)), -Box(Box(7386)), -Box(Box(7387)), -Box(Box(7388)), -Box(Box(7389)), -Box(Box(7390)), -Box(Box(7391)), -Box(Box(7392)), -Box(Box(7393)), -Box(Box(7394)), -Box(Box(7395)), -Box(Box(7396)), -Box(Box(7397)), -Box(Box(7398)), -Box(Box(7399)), -Box(Box(7400)), -Box(Box(7401)), -Box(Box(7402)), -Box(Box(7403)), -Box(Box(7404)), -Box(Box(7405)), -Box(Box(7406)), -Box(Box(7407)), -Box(Box(7408)), -Box(Box(7409)), -Box(Box(7410)), -Box(Box(7411)), -Box(Box(7412)), -Box(Box(7413)), -Box(Box(7414)), -Box(Box(7415)), -Box(Box(7416)), -Box(Box(7417)), -Box(Box(7418)), -Box(Box(7419)), -Box(Box(7420)), -Box(Box(7421)), -Box(Box(7422)), -Box(Box(7423)), -Box(Box(7424)), -Box(Box(7425)), -Box(Box(7426)), -Box(Box(7427)), -Box(Box(7428)), -Box(Box(7429)), -Box(Box(7430)), -Box(Box(7431)), -Box(Box(7432)), -Box(Box(7433)), -Box(Box(7434)), -Box(Box(7435)), -Box(Box(7436)), -Box(Box(7437)), -Box(Box(7438)), -Box(Box(7439)), -Box(Box(7440)), -Box(Box(7441)), -Box(Box(7442)), -Box(Box(7443)), -Box(Box(7444)), -Box(Box(7445)), -Box(Box(7446)), -Box(Box(7447)), -Box(Box(7448)), -Box(Box(7449)), -Box(Box(7450)), -Box(Box(7451)), -Box(Box(7452)), -Box(Box(7453)), -Box(Box(7454)), -Box(Box(7455)), -Box(Box(7456)), -Box(Box(7457)), -Box(Box(7458)), -Box(Box(7459)), -Box(Box(7460)), -Box(Box(7461)), -Box(Box(7462)), -Box(Box(7463)), -Box(Box(7464)), -Box(Box(7465)), -Box(Box(7466)), -Box(Box(7467)), -Box(Box(7468)), -Box(Box(7469)), -Box(Box(7470)), -Box(Box(7471)), -Box(Box(7472)), -Box(Box(7473)), -Box(Box(7474)), -Box(Box(7475)), -Box(Box(7476)), -Box(Box(7477)), -Box(Box(7478)), -Box(Box(7479)), -Box(Box(7480)), -Box(Box(7481)), -Box(Box(7482)), -Box(Box(7483)), -Box(Box(7484)), -Box(Box(7485)), -Box(Box(7486)), -Box(Box(7487)), -Box(Box(7488)), -Box(Box(7489)), -Box(Box(7490)), -Box(Box(7491)), -Box(Box(7492)), -Box(Box(7493)), -Box(Box(7494)), -Box(Box(7495)), -Box(Box(7496)), -Box(Box(7497)), -Box(Box(7498)), -Box(Box(7499)), -Box(Box(7500)), -Box(Box(7501)), -Box(Box(7502)), -Box(Box(7503)), -Box(Box(7504)), -Box(Box(7505)), -Box(Box(7506)), -Box(Box(7507)), -Box(Box(7508)), -Box(Box(7509)), -Box(Box(7510)), -Box(Box(7511)), -Box(Box(7512)), -Box(Box(7513)), -Box(Box(7514)), -Box(Box(7515)), -Box(Box(7516)), -Box(Box(7517)), -Box(Box(7518)), -Box(Box(7519)), -Box(Box(7520)), -Box(Box(7521)), -Box(Box(7522)), -Box(Box(7523)), -Box(Box(7524)), -Box(Box(7525)), -Box(Box(7526)), -Box(Box(7527)), -Box(Box(7528)), -Box(Box(7529)), -Box(Box(7530)), -Box(Box(7531)), -Box(Box(7532)), -Box(Box(7533)), -Box(Box(7534)), -Box(Box(7535)), -Box(Box(7536)), -Box(Box(7537)), -Box(Box(7538)), -Box(Box(7539)), -Box(Box(7540)), -Box(Box(7541)), -Box(Box(7542)), -Box(Box(7543)), -Box(Box(7544)), -Box(Box(7545)), -Box(Box(7546)), -Box(Box(7547)), -Box(Box(7548)), -Box(Box(7549)), -Box(Box(7550)), -Box(Box(7551)), -Box(Box(7552)), -Box(Box(7553)), -Box(Box(7554)), -Box(Box(7555)), -Box(Box(7556)), -Box(Box(7557)), -Box(Box(7558)), -Box(Box(7559)), -Box(Box(7560)), -Box(Box(7561)), -Box(Box(7562)), -Box(Box(7563)), -Box(Box(7564)), -Box(Box(7565)), -Box(Box(7566)), -Box(Box(7567)), -Box(Box(7568)), -Box(Box(7569)), -Box(Box(7570)), -Box(Box(7571)), -Box(Box(7572)), -Box(Box(7573)), -Box(Box(7574)), -Box(Box(7575)), -Box(Box(7576)), -Box(Box(7577)), -Box(Box(7578)), -Box(Box(7579)), -Box(Box(7580)), -Box(Box(7581)), -Box(Box(7582)), -Box(Box(7583)), -Box(Box(7584)), -Box(Box(7585)), -Box(Box(7586)), -Box(Box(7587)), -Box(Box(7588)), -Box(Box(7589)), -Box(Box(7590)), -Box(Box(7591)), -Box(Box(7592)), -Box(Box(7593)), -Box(Box(7594)), -Box(Box(7595)), -Box(Box(7596)), -Box(Box(7597)), -Box(Box(7598)), -Box(Box(7599)), -Box(Box(7600)), -Box(Box(7601)), -Box(Box(7602)), -Box(Box(7603)), -Box(Box(7604)), -Box(Box(7605)), -Box(Box(7606)), -Box(Box(7607)), -Box(Box(7608)), -Box(Box(7609)), -Box(Box(7610)), -Box(Box(7611)), -Box(Box(7612)), -Box(Box(7613)), -Box(Box(7614)), -Box(Box(7615)), -Box(Box(7616)), -Box(Box(7617)), -Box(Box(7618)), -Box(Box(7619)), -Box(Box(7620)), -Box(Box(7621)), -Box(Box(7622)), -Box(Box(7623)), -Box(Box(7624)), -Box(Box(7625)), -Box(Box(7626)), -Box(Box(7627)), -Box(Box(7628)), -Box(Box(7629)), -Box(Box(7630)), -Box(Box(7631)), -Box(Box(7632)), -Box(Box(7633)), -Box(Box(7634)), -Box(Box(7635)), -Box(Box(7636)), -Box(Box(7637)), -Box(Box(7638)), -Box(Box(7639)), -Box(Box(7640)), -Box(Box(7641)), -Box(Box(7642)), -Box(Box(7643)), -Box(Box(7644)), -Box(Box(7645)), -Box(Box(7646)), -Box(Box(7647)), -Box(Box(7648)), -Box(Box(7649)), -Box(Box(7650)), -Box(Box(7651)), -Box(Box(7652)), -Box(Box(7653)), -Box(Box(7654)), -Box(Box(7655)), -Box(Box(7656)), -Box(Box(7657)), -Box(Box(7658)), -Box(Box(7659)), -Box(Box(7660)), -Box(Box(7661)), -Box(Box(7662)), -Box(Box(7663)), -Box(Box(7664)), -Box(Box(7665)), -Box(Box(7666)), -Box(Box(7667)), -Box(Box(7668)), -Box(Box(7669)), -Box(Box(7670)), -Box(Box(7671)), -Box(Box(7672)), -Box(Box(7673)), -Box(Box(7674)), -Box(Box(7675)), -Box(Box(7676)), -Box(Box(7677)), -Box(Box(7678)), -Box(Box(7679)), -Box(Box(7680)), -Box(Box(7681)), -Box(Box(7682)), -Box(Box(7683)), -Box(Box(7684)), -Box(Box(7685)), -Box(Box(7686)), -Box(Box(7687)), -Box(Box(7688)), -Box(Box(7689)), -Box(Box(7690)), -Box(Box(7691)), -Box(Box(7692)), -Box(Box(7693)), -Box(Box(7694)), -Box(Box(7695)), -Box(Box(7696)), -Box(Box(7697)), -Box(Box(7698)), -Box(Box(7699)), -Box(Box(7700)), -Box(Box(7701)), -Box(Box(7702)), -Box(Box(7703)), -Box(Box(7704)), -Box(Box(7705)), -Box(Box(7706)), -Box(Box(7707)), -Box(Box(7708)), -Box(Box(7709)), -Box(Box(7710)), -Box(Box(7711)), -Box(Box(7712)), -Box(Box(7713)), -Box(Box(7714)), -Box(Box(7715)), -Box(Box(7716)), -Box(Box(7717)), -Box(Box(7718)), -Box(Box(7719)), -Box(Box(7720)), -Box(Box(7721)), -Box(Box(7722)), -Box(Box(7723)), -Box(Box(7724)), -Box(Box(7725)), -Box(Box(7726)), -Box(Box(7727)), -Box(Box(7728)), -Box(Box(7729)), -Box(Box(7730)), -Box(Box(7731)), -Box(Box(7732)), -Box(Box(7733)), -Box(Box(7734)), -Box(Box(7735)), -Box(Box(7736)), -Box(Box(7737)), -Box(Box(7738)), -Box(Box(7739)), -Box(Box(7740)), -Box(Box(7741)), -Box(Box(7742)), -Box(Box(7743)), -Box(Box(7744)), -Box(Box(7745)), -Box(Box(7746)), -Box(Box(7747)), -Box(Box(7748)), -Box(Box(7749)), -Box(Box(7750)), -Box(Box(7751)), -Box(Box(7752)), -Box(Box(7753)), -Box(Box(7754)), -Box(Box(7755)), -Box(Box(7756)), -Box(Box(7757)), -Box(Box(7758)), -Box(Box(7759)), -Box(Box(7760)), -Box(Box(7761)), -Box(Box(7762)), -Box(Box(7763)), -Box(Box(7764)), -Box(Box(7765)), -Box(Box(7766)), -Box(Box(7767)), -Box(Box(7768)), -Box(Box(7769)), -Box(Box(7770)), -Box(Box(7771)), -Box(Box(7772)), -Box(Box(7773)), -Box(Box(7774)), -Box(Box(7775)), -Box(Box(7776)), -Box(Box(7777)), -Box(Box(7778)), -Box(Box(7779)), -Box(Box(7780)), -Box(Box(7781)), -Box(Box(7782)), -Box(Box(7783)), -Box(Box(7784)), -Box(Box(7785)), -Box(Box(7786)), -Box(Box(7787)), -Box(Box(7788)), -Box(Box(7789)), -Box(Box(7790)), -Box(Box(7791)), -Box(Box(7792)), -Box(Box(7793)), -Box(Box(7794)), -Box(Box(7795)), -Box(Box(7796)), -Box(Box(7797)), -Box(Box(7798)), -Box(Box(7799)), -Box(Box(7800)), -Box(Box(7801)), -Box(Box(7802)), -Box(Box(7803)), -Box(Box(7804)), -Box(Box(7805)), -Box(Box(7806)), -Box(Box(7807)), -Box(Box(7808)), -Box(Box(7809)), -Box(Box(7810)), -Box(Box(7811)), -Box(Box(7812)), -Box(Box(7813)), -Box(Box(7814)), -Box(Box(7815)), -Box(Box(7816)), -Box(Box(7817)), -Box(Box(7818)), -Box(Box(7819)), -Box(Box(7820)), -Box(Box(7821)), -Box(Box(7822)), -Box(Box(7823)), -Box(Box(7824)), -Box(Box(7825)), -Box(Box(7826)), -Box(Box(7827)), -Box(Box(7828)), -Box(Box(7829)), -Box(Box(7830)), -Box(Box(7831)), -Box(Box(7832)), -Box(Box(7833)), -Box(Box(7834)), -Box(Box(7835)), -Box(Box(7836)), -Box(Box(7837)), -Box(Box(7838)), -Box(Box(7839)), -Box(Box(7840)), -Box(Box(7841)), -Box(Box(7842)), -Box(Box(7843)), -Box(Box(7844)), -Box(Box(7845)), -Box(Box(7846)), -Box(Box(7847)), -Box(Box(7848)), -Box(Box(7849)), -Box(Box(7850)), -Box(Box(7851)), -Box(Box(7852)), -Box(Box(7853)), -Box(Box(7854)), -Box(Box(7855)), -Box(Box(7856)), -Box(Box(7857)), -Box(Box(7858)), -Box(Box(7859)), -Box(Box(7860)), -Box(Box(7861)), -Box(Box(7862)), -Box(Box(7863)), -Box(Box(7864)), -Box(Box(7865)), -Box(Box(7866)), -Box(Box(7867)), -Box(Box(7868)), -Box(Box(7869)), -Box(Box(7870)), -Box(Box(7871)), -Box(Box(7872)), -Box(Box(7873)), -Box(Box(7874)), -Box(Box(7875)), -Box(Box(7876)), -Box(Box(7877)), -Box(Box(7878)), -Box(Box(7879)), -Box(Box(7880)), -Box(Box(7881)), -Box(Box(7882)), -Box(Box(7883)), -Box(Box(7884)), -Box(Box(7885)), -Box(Box(7886)), -Box(Box(7887)), -Box(Box(7888)), -Box(Box(7889)), -Box(Box(7890)), -Box(Box(7891)), -Box(Box(7892)), -Box(Box(7893)), -Box(Box(7894)), -Box(Box(7895)), -Box(Box(7896)), -Box(Box(7897)), -Box(Box(7898)), -Box(Box(7899)), -Box(Box(7900)), -Box(Box(7901)), -Box(Box(7902)), -Box(Box(7903)), -Box(Box(7904)), -Box(Box(7905)), -Box(Box(7906)), -Box(Box(7907)), -Box(Box(7908)), -Box(Box(7909)), -Box(Box(7910)), -Box(Box(7911)), -Box(Box(7912)), -Box(Box(7913)), -Box(Box(7914)), -Box(Box(7915)), -Box(Box(7916)), -Box(Box(7917)), -Box(Box(7918)), -Box(Box(7919)), -Box(Box(7920)), -Box(Box(7921)), -Box(Box(7922)), -Box(Box(7923)), -Box(Box(7924)), -Box(Box(7925)), -Box(Box(7926)), -Box(Box(7927)), -Box(Box(7928)), -Box(Box(7929)), -Box(Box(7930)), -Box(Box(7931)), -Box(Box(7932)), -Box(Box(7933)), -Box(Box(7934)), -Box(Box(7935)), -Box(Box(7936)), -Box(Box(7937)), -Box(Box(7938)), -Box(Box(7939)), -Box(Box(7940)), -Box(Box(7941)), -Box(Box(7942)), -Box(Box(7943)), -Box(Box(7944)), -Box(Box(7945)), -Box(Box(7946)), -Box(Box(7947)), -Box(Box(7948)), -Box(Box(7949)), -Box(Box(7950)), -Box(Box(7951)), -Box(Box(7952)), -Box(Box(7953)), -Box(Box(7954)), -Box(Box(7955)), -Box(Box(7956)), -Box(Box(7957)), -Box(Box(7958)), -Box(Box(7959)), -Box(Box(7960)), -Box(Box(7961)), -Box(Box(7962)), -Box(Box(7963)), -Box(Box(7964)), -Box(Box(7965)), -Box(Box(7966)), -Box(Box(7967)), -Box(Box(7968)), -Box(Box(7969)), -Box(Box(7970)), -Box(Box(7971)), -Box(Box(7972)), -Box(Box(7973)), -Box(Box(7974)), -Box(Box(7975)), -Box(Box(7976)), -Box(Box(7977)), -Box(Box(7978)), -Box(Box(7979)), -Box(Box(7980)), -Box(Box(7981)), -Box(Box(7982)), -Box(Box(7983)), -Box(Box(7984)), -Box(Box(7985)), -Box(Box(7986)), -Box(Box(7987)), -Box(Box(7988)), -Box(Box(7989)), -Box(Box(7990)), -Box(Box(7991)), -Box(Box(7992)), -Box(Box(7993)), -Box(Box(7994)), -Box(Box(7995)), -Box(Box(7996)), -Box(Box(7997)), -Box(Box(7998)), -Box(Box(7999)), -Box(Box(8000)), -Box(Box(8001)), -Box(Box(8002)), -Box(Box(8003)), -Box(Box(8004)), -Box(Box(8005)), -Box(Box(8006)), -Box(Box(8007)), -Box(Box(8008)), -Box(Box(8009)), -Box(Box(8010)), -Box(Box(8011)), -Box(Box(8012)), -Box(Box(8013)), -Box(Box(8014)), -Box(Box(8015)), -Box(Box(8016)), -Box(Box(8017)), -Box(Box(8018)), -Box(Box(8019)), -Box(Box(8020)), -Box(Box(8021)), -Box(Box(8022)), -Box(Box(8023)), -Box(Box(8024)), -Box(Box(8025)), -Box(Box(8026)), -Box(Box(8027)), -Box(Box(8028)), -Box(Box(8029)), -Box(Box(8030)), -Box(Box(8031)), -Box(Box(8032)), -Box(Box(8033)), -Box(Box(8034)), -Box(Box(8035)), -Box(Box(8036)), -Box(Box(8037)), -Box(Box(8038)), -Box(Box(8039)), -Box(Box(8040)), -Box(Box(8041)), -Box(Box(8042)), -Box(Box(8043)), -Box(Box(8044)), -Box(Box(8045)), -Box(Box(8046)), -Box(Box(8047)), -Box(Box(8048)), -Box(Box(8049)), -Box(Box(8050)), -Box(Box(8051)), -Box(Box(8052)), -Box(Box(8053)), -Box(Box(8054)), -Box(Box(8055)), -Box(Box(8056)), -Box(Box(8057)), -Box(Box(8058)), -Box(Box(8059)), -Box(Box(8060)), -Box(Box(8061)), -Box(Box(8062)), -Box(Box(8063)), -Box(Box(8064)), -Box(Box(8065)), -Box(Box(8066)), -Box(Box(8067)), -Box(Box(8068)), -Box(Box(8069)), -Box(Box(8070)), -Box(Box(8071)), -Box(Box(8072)), -Box(Box(8073)), -Box(Box(8074)), -Box(Box(8075)), -Box(Box(8076)), -Box(Box(8077)), -Box(Box(8078)), -Box(Box(8079)), -Box(Box(8080)), -Box(Box(8081)), -Box(Box(8082)), -Box(Box(8083)), -Box(Box(8084)), -Box(Box(8085)), -Box(Box(8086)), -Box(Box(8087)), -Box(Box(8088)), -Box(Box(8089)), -Box(Box(8090)), -Box(Box(8091)), -Box(Box(8092)), -Box(Box(8093)), -Box(Box(8094)), -Box(Box(8095)), -Box(Box(8096)), -Box(Box(8097)), -Box(Box(8098)), -Box(Box(8099)), -Box(Box(8100)), -Box(Box(8101)), -Box(Box(8102)), -Box(Box(8103)), -Box(Box(8104)), -Box(Box(8105)), -Box(Box(8106)), -Box(Box(8107)), -Box(Box(8108)), -Box(Box(8109)), -Box(Box(8110)), -Box(Box(8111)), -Box(Box(8112)), -Box(Box(8113)), -Box(Box(8114)), -Box(Box(8115)), -Box(Box(8116)), -Box(Box(8117)), -Box(Box(8118)), -Box(Box(8119)), -Box(Box(8120)), -Box(Box(8121)), -Box(Box(8122)), -Box(Box(8123)), -Box(Box(8124)), -Box(Box(8125)), -Box(Box(8126)), -Box(Box(8127)), -Box(Box(8128)), -Box(Box(8129)), -Box(Box(8130)), -Box(Box(8131)), -Box(Box(8132)), -Box(Box(8133)), -Box(Box(8134)), -Box(Box(8135)), -Box(Box(8136)), -Box(Box(8137)), -Box(Box(8138)), -Box(Box(8139)), -Box(Box(8140)), -Box(Box(8141)), -Box(Box(8142)), -Box(Box(8143)), -Box(Box(8144)), -Box(Box(8145)), -Box(Box(8146)), -Box(Box(8147)), -Box(Box(8148)), -Box(Box(8149)), -Box(Box(8150)), -Box(Box(8151)), -Box(Box(8152)), -Box(Box(8153)), -Box(Box(8154)), -Box(Box(8155)), -Box(Box(8156)), -Box(Box(8157)), -Box(Box(8158)), -Box(Box(8159)), -Box(Box(8160)), -Box(Box(8161)), -Box(Box(8162)), -Box(Box(8163)), -Box(Box(8164)), -Box(Box(8165)), -Box(Box(8166)), -Box(Box(8167)), -Box(Box(8168)), -Box(Box(8169)), -Box(Box(8170)), -Box(Box(8171)), -Box(Box(8172)), -Box(Box(8173)), -Box(Box(8174)), -Box(Box(8175)), -Box(Box(8176)), -Box(Box(8177)), -Box(Box(8178)), -Box(Box(8179)), -Box(Box(8180)), -Box(Box(8181)), -Box(Box(8182)), -Box(Box(8183)), -Box(Box(8184)), -Box(Box(8185)), -Box(Box(8186)), -Box(Box(8187)), -Box(Box(8188)), -Box(Box(8189)), -Box(Box(8190)), -Box(Box(8191)), -Box(Box(8192)), -Box(Box(8193)), -Box(Box(8194)), -Box(Box(8195)), -Box(Box(8196)), -Box(Box(8197)), -Box(Box(8198)), -Box(Box(8199)), -Box(Box(8200)), -Box(Box(8201)), -Box(Box(8202)), -Box(Box(8203)), -Box(Box(8204)), -Box(Box(8205)), -Box(Box(8206)), -Box(Box(8207)), -Box(Box(8208)), -Box(Box(8209)), -Box(Box(8210)), -Box(Box(8211)), -Box(Box(8212)), -Box(Box(8213)), -Box(Box(8214)), -Box(Box(8215)), -Box(Box(8216)), -Box(Box(8217)), -Box(Box(8218)), -Box(Box(8219)), -Box(Box(8220)), -Box(Box(8221)), -Box(Box(8222)), -Box(Box(8223)), -Box(Box(8224)), -Box(Box(8225)), -Box(Box(8226)), -Box(Box(8227)), -Box(Box(8228)), -Box(Box(8229)), -Box(Box(8230)), -Box(Box(8231)), -Box(Box(8232)), -Box(Box(8233)), -Box(Box(8234)), -Box(Box(8235)), -Box(Box(8236)), -Box(Box(8237)), -Box(Box(8238)), -Box(Box(8239)), -Box(Box(8240)), -Box(Box(8241)), -Box(Box(8242)), -Box(Box(8243)), -Box(Box(8244)), -Box(Box(8245)), -Box(Box(8246)), -Box(Box(8247)), -Box(Box(8248)), -Box(Box(8249)), -Box(Box(8250)), -Box(Box(8251)), -Box(Box(8252)), -Box(Box(8253)), -Box(Box(8254)), -Box(Box(8255)), -Box(Box(8256)), -Box(Box(8257)), -Box(Box(8258)), -Box(Box(8259)), -Box(Box(8260)), -Box(Box(8261)), -Box(Box(8262)), -Box(Box(8263)), -Box(Box(8264)), -Box(Box(8265)), -Box(Box(8266)), -Box(Box(8267)), -Box(Box(8268)), -Box(Box(8269)), -Box(Box(8270)), -Box(Box(8271)), -Box(Box(8272)), -Box(Box(8273)), -Box(Box(8274)), -Box(Box(8275)), -Box(Box(8276)), -Box(Box(8277)), -Box(Box(8278)), -Box(Box(8279)), -Box(Box(8280)), -Box(Box(8281)), -Box(Box(8282)), -Box(Box(8283)), -Box(Box(8284)), -Box(Box(8285)), -Box(Box(8286)), -Box(Box(8287)), -Box(Box(8288)), -Box(Box(8289)), -Box(Box(8290)), -Box(Box(8291)), -Box(Box(8292)), -Box(Box(8293)), -Box(Box(8294)), -Box(Box(8295)), -Box(Box(8296)), -Box(Box(8297)), -Box(Box(8298)), -Box(Box(8299)), -Box(Box(8300)), -Box(Box(8301)), -Box(Box(8302)), -Box(Box(8303)), -Box(Box(8304)), -Box(Box(8305)), -Box(Box(8306)), -Box(Box(8307)), -Box(Box(8308)), -Box(Box(8309)), -Box(Box(8310)), -Box(Box(8311)), -Box(Box(8312)), -Box(Box(8313)), -Box(Box(8314)), -Box(Box(8315)), -Box(Box(8316)), -Box(Box(8317)), -Box(Box(8318)), -Box(Box(8319)), -Box(Box(8320)), -Box(Box(8321)), -Box(Box(8322)), -Box(Box(8323)), -Box(Box(8324)), -Box(Box(8325)), -Box(Box(8326)), -Box(Box(8327)), -Box(Box(8328)), -Box(Box(8329)), -Box(Box(8330)), -Box(Box(8331)), -Box(Box(8332)), -Box(Box(8333)), -Box(Box(8334)), -Box(Box(8335)), -Box(Box(8336)), -Box(Box(8337)), -Box(Box(8338)), -Box(Box(8339)), -Box(Box(8340)), -Box(Box(8341)), -Box(Box(8342)), -Box(Box(8343)), -Box(Box(8344)), -Box(Box(8345)), -Box(Box(8346)), -Box(Box(8347)), -Box(Box(8348)), -Box(Box(8349)), -Box(Box(8350)), -Box(Box(8351)), -Box(Box(8352)), -Box(Box(8353)), -Box(Box(8354)), -Box(Box(8355)), -Box(Box(8356)), -Box(Box(8357)), -Box(Box(8358)), -Box(Box(8359)), -Box(Box(8360)), -Box(Box(8361)), -Box(Box(8362)), -Box(Box(8363)), -Box(Box(8364)), -Box(Box(8365)), -Box(Box(8366)), -Box(Box(8367)), -Box(Box(8368)), -Box(Box(8369)), -Box(Box(8370)), -Box(Box(8371)), -Box(Box(8372)), -Box(Box(8373)), -Box(Box(8374)), -Box(Box(8375)), -Box(Box(8376)), -Box(Box(8377)), -Box(Box(8378)), -Box(Box(8379)), -Box(Box(8380)), -Box(Box(8381)), -Box(Box(8382)), -Box(Box(8383)), -Box(Box(8384)), -Box(Box(8385)), -Box(Box(8386)), -Box(Box(8387)), -Box(Box(8388)), -Box(Box(8389)), -Box(Box(8390)), -Box(Box(8391)), -Box(Box(8392)), -Box(Box(8393)), -Box(Box(8394)), -Box(Box(8395)), -Box(Box(8396)), -Box(Box(8397)), -Box(Box(8398)), -Box(Box(8399)), -Box(Box(8400)), -Box(Box(8401)), -Box(Box(8402)), -Box(Box(8403)), -Box(Box(8404)), -Box(Box(8405)), -Box(Box(8406)), -Box(Box(8407)), -Box(Box(8408)), -Box(Box(8409)), -Box(Box(8410)), -Box(Box(8411)), -Box(Box(8412)), -Box(Box(8413)), -Box(Box(8414)), -Box(Box(8415)), -Box(Box(8416)), -Box(Box(8417)), -Box(Box(8418)), -Box(Box(8419)), -Box(Box(8420)), -Box(Box(8421)), -Box(Box(8422)), -Box(Box(8423)), -Box(Box(8424)), -Box(Box(8425)), -Box(Box(8426)), -Box(Box(8427)), -Box(Box(8428)), -Box(Box(8429)), -Box(Box(8430)), -Box(Box(8431)), -Box(Box(8432)), -Box(Box(8433)), -Box(Box(8434)), -Box(Box(8435)), -Box(Box(8436)), -Box(Box(8437)), -Box(Box(8438)), -Box(Box(8439)), -Box(Box(8440)), -Box(Box(8441)), -Box(Box(8442)), -Box(Box(8443)), -Box(Box(8444)), -Box(Box(8445)), -Box(Box(8446)), -Box(Box(8447)), -Box(Box(8448)), -Box(Box(8449)), -Box(Box(8450)), -Box(Box(8451)), -Box(Box(8452)), -Box(Box(8453)), -Box(Box(8454)), -Box(Box(8455)), -Box(Box(8456)), -Box(Box(8457)), -Box(Box(8458)), -Box(Box(8459)), -Box(Box(8460)), -Box(Box(8461)), -Box(Box(8462)), -Box(Box(8463)), -Box(Box(8464)), -Box(Box(8465)), -Box(Box(8466)), -Box(Box(8467)), -Box(Box(8468)), -Box(Box(8469)), -Box(Box(8470)), -Box(Box(8471)), -Box(Box(8472)), -Box(Box(8473)), -Box(Box(8474)), -Box(Box(8475)), -Box(Box(8476)), -Box(Box(8477)), -Box(Box(8478)), -Box(Box(8479)), -Box(Box(8480)), -Box(Box(8481)), -Box(Box(8482)), -Box(Box(8483)), -Box(Box(8484)), -Box(Box(8485)), -Box(Box(8486)), -Box(Box(8487)), -Box(Box(8488)), -Box(Box(8489)), -Box(Box(8490)), -Box(Box(8491)), -Box(Box(8492)), -Box(Box(8493)), -Box(Box(8494)), -Box(Box(8495)), -Box(Box(8496)), -Box(Box(8497)), -Box(Box(8498)), -Box(Box(8499)), -Box(Box(8500)), -Box(Box(8501)), -Box(Box(8502)), -Box(Box(8503)), -Box(Box(8504)), -Box(Box(8505)), -Box(Box(8506)), -Box(Box(8507)), -Box(Box(8508)), -Box(Box(8509)), -Box(Box(8510)), -Box(Box(8511)), -Box(Box(8512)), -Box(Box(8513)), -Box(Box(8514)), -Box(Box(8515)), -Box(Box(8516)), -Box(Box(8517)), -Box(Box(8518)), -Box(Box(8519)), -Box(Box(8520)), -Box(Box(8521)), -Box(Box(8522)), -Box(Box(8523)), -Box(Box(8524)), -Box(Box(8525)), -Box(Box(8526)), -Box(Box(8527)), -Box(Box(8528)), -Box(Box(8529)), -Box(Box(8530)), -Box(Box(8531)), -Box(Box(8532)), -Box(Box(8533)), -Box(Box(8534)), -Box(Box(8535)), -Box(Box(8536)), -Box(Box(8537)), -Box(Box(8538)), -Box(Box(8539)), -Box(Box(8540)), -Box(Box(8541)), -Box(Box(8542)), -Box(Box(8543)), -Box(Box(8544)), -Box(Box(8545)), -Box(Box(8546)), -Box(Box(8547)), -Box(Box(8548)), -Box(Box(8549)), -Box(Box(8550)), -Box(Box(8551)), -Box(Box(8552)), -Box(Box(8553)), -Box(Box(8554)), -Box(Box(8555)), -Box(Box(8556)), -Box(Box(8557)), -Box(Box(8558)), -Box(Box(8559)), -Box(Box(8560)), -Box(Box(8561)), -Box(Box(8562)), -Box(Box(8563)), -Box(Box(8564)), -Box(Box(8565)), -Box(Box(8566)), -Box(Box(8567)), -Box(Box(8568)), -Box(Box(8569)), -Box(Box(8570)), -Box(Box(8571)), -Box(Box(8572)), -Box(Box(8573)), -Box(Box(8574)), -Box(Box(8575)), -Box(Box(8576)), -Box(Box(8577)), -Box(Box(8578)), -Box(Box(8579)), -Box(Box(8580)), -Box(Box(8581)), -Box(Box(8582)), -Box(Box(8583)), -Box(Box(8584)), -Box(Box(8585)), -Box(Box(8586)), -Box(Box(8587)), -Box(Box(8588)), -Box(Box(8589)), -Box(Box(8590)), -Box(Box(8591)), -Box(Box(8592)), -Box(Box(8593)), -Box(Box(8594)), -Box(Box(8595)), -Box(Box(8596)), -Box(Box(8597)), -Box(Box(8598)), -Box(Box(8599)), -Box(Box(8600)), -Box(Box(8601)), -Box(Box(8602)), -Box(Box(8603)), -Box(Box(8604)), -Box(Box(8605)), -Box(Box(8606)), -Box(Box(8607)), -Box(Box(8608)), -Box(Box(8609)), -Box(Box(8610)), -Box(Box(8611)), -Box(Box(8612)), -Box(Box(8613)), -Box(Box(8614)), -Box(Box(8615)), -Box(Box(8616)), -Box(Box(8617)), -Box(Box(8618)), -Box(Box(8619)), -Box(Box(8620)), -Box(Box(8621)), -Box(Box(8622)), -Box(Box(8623)), -Box(Box(8624)), -Box(Box(8625)), -Box(Box(8626)), -Box(Box(8627)), -Box(Box(8628)), -Box(Box(8629)), -Box(Box(8630)), -Box(Box(8631)), -Box(Box(8632)), -Box(Box(8633)), -Box(Box(8634)), -Box(Box(8635)), -Box(Box(8636)), -Box(Box(8637)), -Box(Box(8638)), -Box(Box(8639)), -Box(Box(8640)), -Box(Box(8641)), -Box(Box(8642)), -Box(Box(8643)), -Box(Box(8644)), -Box(Box(8645)), -Box(Box(8646)), -Box(Box(8647)), -Box(Box(8648)), -Box(Box(8649)), -Box(Box(8650)), -Box(Box(8651)), -Box(Box(8652)), -Box(Box(8653)), -Box(Box(8654)), -Box(Box(8655)), -Box(Box(8656)), -Box(Box(8657)), -Box(Box(8658)), -Box(Box(8659)), -Box(Box(8660)), -Box(Box(8661)), -Box(Box(8662)), -Box(Box(8663)), -Box(Box(8664)), -Box(Box(8665)), -Box(Box(8666)), -Box(Box(8667)), -Box(Box(8668)), -Box(Box(8669)), -Box(Box(8670)), -Box(Box(8671)), -Box(Box(8672)), -Box(Box(8673)), -Box(Box(8674)), -Box(Box(8675)), -Box(Box(8676)), -Box(Box(8677)), -Box(Box(8678)), -Box(Box(8679)), -Box(Box(8680)), -Box(Box(8681)), -Box(Box(8682)), -Box(Box(8683)), -Box(Box(8684)), -Box(Box(8685)), -Box(Box(8686)), -Box(Box(8687)), -Box(Box(8688)), -Box(Box(8689)), -Box(Box(8690)), -Box(Box(8691)), -Box(Box(8692)), -Box(Box(8693)), -Box(Box(8694)), -Box(Box(8695)), -Box(Box(8696)), -Box(Box(8697)), -Box(Box(8698)), -Box(Box(8699)), -Box(Box(8700)), -Box(Box(8701)), -Box(Box(8702)), -Box(Box(8703)), -Box(Box(8704)), -Box(Box(8705)), -Box(Box(8706)), -Box(Box(8707)), -Box(Box(8708)), -Box(Box(8709)), -Box(Box(8710)), -Box(Box(8711)), -Box(Box(8712)), -Box(Box(8713)), -Box(Box(8714)), -Box(Box(8715)), -Box(Box(8716)), -Box(Box(8717)), -Box(Box(8718)), -Box(Box(8719)), -Box(Box(8720)), -Box(Box(8721)), -Box(Box(8722)), -Box(Box(8723)), -Box(Box(8724)), -Box(Box(8725)), -Box(Box(8726)), -Box(Box(8727)), -Box(Box(8728)), -Box(Box(8729)), -Box(Box(8730)), -Box(Box(8731)), -Box(Box(8732)), -Box(Box(8733)), -Box(Box(8734)), -Box(Box(8735)), -Box(Box(8736)), -Box(Box(8737)), -Box(Box(8738)), -Box(Box(8739)), -Box(Box(8740)), -Box(Box(8741)), -Box(Box(8742)), -Box(Box(8743)), -Box(Box(8744)), -Box(Box(8745)), -Box(Box(8746)), -Box(Box(8747)), -Box(Box(8748)), -Box(Box(8749)), -Box(Box(8750)), -Box(Box(8751)), -Box(Box(8752)), -Box(Box(8753)), -Box(Box(8754)), -Box(Box(8755)), -Box(Box(8756)), -Box(Box(8757)), -Box(Box(8758)), -Box(Box(8759)), -Box(Box(8760)), -Box(Box(8761)), -Box(Box(8762)), -Box(Box(8763)), -Box(Box(8764)), -Box(Box(8765)), -Box(Box(8766)), -Box(Box(8767)), -Box(Box(8768)), -Box(Box(8769)), -Box(Box(8770)), -Box(Box(8771)), -Box(Box(8772)), -Box(Box(8773)), -Box(Box(8774)), -Box(Box(8775)), -Box(Box(8776)), -Box(Box(8777)), -Box(Box(8778)), -Box(Box(8779)), -Box(Box(8780)), -Box(Box(8781)), -Box(Box(8782)), -Box(Box(8783)), -Box(Box(8784)), -Box(Box(8785)), -Box(Box(8786)), -Box(Box(8787)), -Box(Box(8788)), -Box(Box(8789)), -Box(Box(8790)), -Box(Box(8791)), -Box(Box(8792)), -Box(Box(8793)), -Box(Box(8794)), -Box(Box(8795)), -Box(Box(8796)), -Box(Box(8797)), -Box(Box(8798)), -Box(Box(8799)), -Box(Box(8800)), -Box(Box(8801)), -Box(Box(8802)), -Box(Box(8803)), -Box(Box(8804)), -Box(Box(8805)), -Box(Box(8806)), -Box(Box(8807)), -Box(Box(8808)), -Box(Box(8809)), -Box(Box(8810)), -Box(Box(8811)), -Box(Box(8812)), -Box(Box(8813)), -Box(Box(8814)), -Box(Box(8815)), -Box(Box(8816)), -Box(Box(8817)), -Box(Box(8818)), -Box(Box(8819)), -Box(Box(8820)), -Box(Box(8821)), -Box(Box(8822)), -Box(Box(8823)), -Box(Box(8824)), -Box(Box(8825)), -Box(Box(8826)), -Box(Box(8827)), -Box(Box(8828)), -Box(Box(8829)), -Box(Box(8830)), -Box(Box(8831)), -Box(Box(8832)), -Box(Box(8833)), -Box(Box(8834)), -Box(Box(8835)), -Box(Box(8836)), -Box(Box(8837)), -Box(Box(8838)), -Box(Box(8839)), -Box(Box(8840)), -Box(Box(8841)), -Box(Box(8842)), -Box(Box(8843)), -Box(Box(8844)), -Box(Box(8845)), -Box(Box(8846)), -Box(Box(8847)), -Box(Box(8848)), -Box(Box(8849)), -Box(Box(8850)), -Box(Box(8851)), -Box(Box(8852)), -Box(Box(8853)), -Box(Box(8854)), -Box(Box(8855)), -Box(Box(8856)), -Box(Box(8857)), -Box(Box(8858)), -Box(Box(8859)), -Box(Box(8860)), -Box(Box(8861)), -Box(Box(8862)), -Box(Box(8863)), -Box(Box(8864)), -Box(Box(8865)), -Box(Box(8866)), -Box(Box(8867)), -Box(Box(8868)), -Box(Box(8869)), -Box(Box(8870)), -Box(Box(8871)), -Box(Box(8872)), -Box(Box(8873)), -Box(Box(8874)), -Box(Box(8875)), -Box(Box(8876)), -Box(Box(8877)), -Box(Box(8878)), -Box(Box(8879)), -Box(Box(8880)), -Box(Box(8881)), -Box(Box(8882)), -Box(Box(8883)), -Box(Box(8884)), -Box(Box(8885)), -Box(Box(8886)), -Box(Box(8887)), -Box(Box(8888)), -Box(Box(8889)), -Box(Box(8890)), -Box(Box(8891)), -Box(Box(8892)), -Box(Box(8893)), -Box(Box(8894)), -Box(Box(8895)), -Box(Box(8896)), -Box(Box(8897)), -Box(Box(8898)), -Box(Box(8899)), -Box(Box(8900)), -Box(Box(8901)), -Box(Box(8902)), -Box(Box(8903)), -Box(Box(8904)), -Box(Box(8905)), -Box(Box(8906)), -Box(Box(8907)), -Box(Box(8908)), -Box(Box(8909)), -Box(Box(8910)), -Box(Box(8911)), -Box(Box(8912)), -Box(Box(8913)), -Box(Box(8914)), -Box(Box(8915)), -Box(Box(8916)), -Box(Box(8917)), -Box(Box(8918)), -Box(Box(8919)), -Box(Box(8920)), -Box(Box(8921)), -Box(Box(8922)), -Box(Box(8923)), -Box(Box(8924)), -Box(Box(8925)), -Box(Box(8926)), -Box(Box(8927)), -Box(Box(8928)), -Box(Box(8929)), -Box(Box(8930)), -Box(Box(8931)), -Box(Box(8932)), -Box(Box(8933)), -Box(Box(8934)), -Box(Box(8935)), -Box(Box(8936)), -Box(Box(8937)), -Box(Box(8938)), -Box(Box(8939)), -Box(Box(8940)), -Box(Box(8941)), -Box(Box(8942)), -Box(Box(8943)), -Box(Box(8944)), -Box(Box(8945)), -Box(Box(8946)), -Box(Box(8947)), -Box(Box(8948)), -Box(Box(8949)), -Box(Box(8950)), -Box(Box(8951)), -Box(Box(8952)), -Box(Box(8953)), -Box(Box(8954)), -Box(Box(8955)), -Box(Box(8956)), -Box(Box(8957)), -Box(Box(8958)), -Box(Box(8959)), -Box(Box(8960)), -Box(Box(8961)), -Box(Box(8962)), -Box(Box(8963)), -Box(Box(8964)), -Box(Box(8965)), -Box(Box(8966)), -Box(Box(8967)), -Box(Box(8968)), -Box(Box(8969)), -Box(Box(8970)), -Box(Box(8971)), -Box(Box(8972)), -Box(Box(8973)), -Box(Box(8974)), -Box(Box(8975)), -Box(Box(8976)), -Box(Box(8977)), -Box(Box(8978)), -Box(Box(8979)), -Box(Box(8980)), -Box(Box(8981)), -Box(Box(8982)), -Box(Box(8983)), -Box(Box(8984)), -Box(Box(8985)), -Box(Box(8986)), -Box(Box(8987)), -Box(Box(8988)), -Box(Box(8989)), -Box(Box(8990)), -Box(Box(8991)), -Box(Box(8992)), -Box(Box(8993)), -Box(Box(8994)), -Box(Box(8995)), -Box(Box(8996)), -Box(Box(8997)), -Box(Box(8998)), -Box(Box(8999)), -Box(Box(9000)), -Box(Box(9001)), -Box(Box(9002)), -Box(Box(9003)), -Box(Box(9004)), -Box(Box(9005)), -Box(Box(9006)), -Box(Box(9007)), -Box(Box(9008)), -Box(Box(9009)), -Box(Box(9010)), -Box(Box(9011)), -Box(Box(9012)), -Box(Box(9013)), -Box(Box(9014)), -Box(Box(9015)), -Box(Box(9016)), -Box(Box(9017)), -Box(Box(9018)), -Box(Box(9019)), -Box(Box(9020)), -Box(Box(9021)), -Box(Box(9022)), -Box(Box(9023)), -Box(Box(9024)), -Box(Box(9025)), -Box(Box(9026)), -Box(Box(9027)), -Box(Box(9028)), -Box(Box(9029)), -Box(Box(9030)), -Box(Box(9031)), -Box(Box(9032)), -Box(Box(9033)), -Box(Box(9034)), -Box(Box(9035)), -Box(Box(9036)), -Box(Box(9037)), -Box(Box(9038)), -Box(Box(9039)), -Box(Box(9040)), -Box(Box(9041)), -Box(Box(9042)), -Box(Box(9043)), -Box(Box(9044)), -Box(Box(9045)), -Box(Box(9046)), -Box(Box(9047)), -Box(Box(9048)), -Box(Box(9049)), -Box(Box(9050)), -Box(Box(9051)), -Box(Box(9052)), -Box(Box(9053)), -Box(Box(9054)), -Box(Box(9055)), -Box(Box(9056)), -Box(Box(9057)), -Box(Box(9058)), -Box(Box(9059)), -Box(Box(9060)), -Box(Box(9061)), -Box(Box(9062)), -Box(Box(9063)), -Box(Box(9064)), -Box(Box(9065)), -Box(Box(9066)), -Box(Box(9067)), -Box(Box(9068)), -Box(Box(9069)), -Box(Box(9070)), -Box(Box(9071)), -Box(Box(9072)), -Box(Box(9073)), -Box(Box(9074)), -Box(Box(9075)), -Box(Box(9076)), -Box(Box(9077)), -Box(Box(9078)), -Box(Box(9079)), -Box(Box(9080)), -Box(Box(9081)), -Box(Box(9082)), -Box(Box(9083)), -Box(Box(9084)), -Box(Box(9085)), -Box(Box(9086)), -Box(Box(9087)), -Box(Box(9088)), -Box(Box(9089)), -Box(Box(9090)), -Box(Box(9091)), -Box(Box(9092)), -Box(Box(9093)), -Box(Box(9094)), -Box(Box(9095)), -Box(Box(9096)), -Box(Box(9097)), -Box(Box(9098)), -Box(Box(9099)), -Box(Box(9100)), -Box(Box(9101)), -Box(Box(9102)), -Box(Box(9103)), -Box(Box(9104)), -Box(Box(9105)), -Box(Box(9106)), -Box(Box(9107)), -Box(Box(9108)), -Box(Box(9109)), -Box(Box(9110)), -Box(Box(9111)), -Box(Box(9112)), -Box(Box(9113)), -Box(Box(9114)), -Box(Box(9115)), -Box(Box(9116)), -Box(Box(9117)), -Box(Box(9118)), -Box(Box(9119)), -Box(Box(9120)), -Box(Box(9121)), -Box(Box(9122)), -Box(Box(9123)), -Box(Box(9124)), -Box(Box(9125)), -Box(Box(9126)), -Box(Box(9127)), -Box(Box(9128)), -Box(Box(9129)), -Box(Box(9130)), -Box(Box(9131)), -Box(Box(9132)), -Box(Box(9133)), -Box(Box(9134)), -Box(Box(9135)), -Box(Box(9136)), -Box(Box(9137)), -Box(Box(9138)), -Box(Box(9139)), -Box(Box(9140)), -Box(Box(9141)), -Box(Box(9142)), -Box(Box(9143)), -Box(Box(9144)), -Box(Box(9145)), -Box(Box(9146)), -Box(Box(9147)), -Box(Box(9148)), -Box(Box(9149)), -Box(Box(9150)), -Box(Box(9151)), -Box(Box(9152)), -Box(Box(9153)), -Box(Box(9154)), -Box(Box(9155)), -Box(Box(9156)), -Box(Box(9157)), -Box(Box(9158)), -Box(Box(9159)), -Box(Box(9160)), -Box(Box(9161)), -Box(Box(9162)), -Box(Box(9163)), -Box(Box(9164)), -Box(Box(9165)), -Box(Box(9166)), -Box(Box(9167)), -Box(Box(9168)), -Box(Box(9169)), -Box(Box(9170)), -Box(Box(9171)), -Box(Box(9172)), -Box(Box(9173)), -Box(Box(9174)), -Box(Box(9175)), -Box(Box(9176)), -Box(Box(9177)), -Box(Box(9178)), -Box(Box(9179)), -Box(Box(9180)), -Box(Box(9181)), -Box(Box(9182)), -Box(Box(9183)), -Box(Box(9184)), -Box(Box(9185)), -Box(Box(9186)), -Box(Box(9187)), -Box(Box(9188)), -Box(Box(9189)), -Box(Box(9190)), -Box(Box(9191)), -Box(Box(9192)), -Box(Box(9193)), -Box(Box(9194)), -Box(Box(9195)), -Box(Box(9196)), -Box(Box(9197)), -Box(Box(9198)), -Box(Box(9199)), -Box(Box(9200)), -Box(Box(9201)), -Box(Box(9202)), -Box(Box(9203)), -Box(Box(9204)), -Box(Box(9205)), -Box(Box(9206)), -Box(Box(9207)), -Box(Box(9208)), -Box(Box(9209)), -Box(Box(9210)), -Box(Box(9211)), -Box(Box(9212)), -Box(Box(9213)), -Box(Box(9214)), -Box(Box(9215)), -Box(Box(9216)), -Box(Box(9217)), -Box(Box(9218)), -Box(Box(9219)), -Box(Box(9220)), -Box(Box(9221)), -Box(Box(9222)), -Box(Box(9223)), -Box(Box(9224)), -Box(Box(9225)), -Box(Box(9226)), -Box(Box(9227)), -Box(Box(9228)), -Box(Box(9229)), -Box(Box(9230)), -Box(Box(9231)), -Box(Box(9232)), -Box(Box(9233)), -Box(Box(9234)), -Box(Box(9235)), -Box(Box(9236)), -Box(Box(9237)), -Box(Box(9238)), -Box(Box(9239)), -Box(Box(9240)), -Box(Box(9241)), -Box(Box(9242)), -Box(Box(9243)), -Box(Box(9244)), -Box(Box(9245)), -Box(Box(9246)), -Box(Box(9247)), -Box(Box(9248)), -Box(Box(9249)), -Box(Box(9250)), -Box(Box(9251)), -Box(Box(9252)), -Box(Box(9253)), -Box(Box(9254)), -Box(Box(9255)), -Box(Box(9256)), -Box(Box(9257)), -Box(Box(9258)), -Box(Box(9259)), -Box(Box(9260)), -Box(Box(9261)), -Box(Box(9262)), -Box(Box(9263)), -Box(Box(9264)), -Box(Box(9265)), -Box(Box(9266)), -Box(Box(9267)), -Box(Box(9268)), -Box(Box(9269)), -Box(Box(9270)), -Box(Box(9271)), -Box(Box(9272)), -Box(Box(9273)), -Box(Box(9274)), -Box(Box(9275)), -Box(Box(9276)), -Box(Box(9277)), -Box(Box(9278)), -Box(Box(9279)), -Box(Box(9280)), -Box(Box(9281)), -Box(Box(9282)), -Box(Box(9283)), -Box(Box(9284)), -Box(Box(9285)), -Box(Box(9286)), -Box(Box(9287)), -Box(Box(9288)), -Box(Box(9289)), -Box(Box(9290)), -Box(Box(9291)), -Box(Box(9292)), -Box(Box(9293)), -Box(Box(9294)), -Box(Box(9295)), -Box(Box(9296)), -Box(Box(9297)), -Box(Box(9298)), -Box(Box(9299)), -Box(Box(9300)), -Box(Box(9301)), -Box(Box(9302)), -Box(Box(9303)), -Box(Box(9304)), -Box(Box(9305)), -Box(Box(9306)), -Box(Box(9307)), -Box(Box(9308)), -Box(Box(9309)), -Box(Box(9310)), -Box(Box(9311)), -Box(Box(9312)), -Box(Box(9313)), -Box(Box(9314)), -Box(Box(9315)), -Box(Box(9316)), -Box(Box(9317)), -Box(Box(9318)), -Box(Box(9319)), -Box(Box(9320)), -Box(Box(9321)), -Box(Box(9322)), -Box(Box(9323)), -Box(Box(9324)), -Box(Box(9325)), -Box(Box(9326)), -Box(Box(9327)), -Box(Box(9328)), -Box(Box(9329)), -Box(Box(9330)), -Box(Box(9331)), -Box(Box(9332)), -Box(Box(9333)), -Box(Box(9334)), -Box(Box(9335)), -Box(Box(9336)), -Box(Box(9337)), -Box(Box(9338)), -Box(Box(9339)), -Box(Box(9340)), -Box(Box(9341)), -Box(Box(9342)), -Box(Box(9343)), -Box(Box(9344)), -Box(Box(9345)), -Box(Box(9346)), -Box(Box(9347)), -Box(Box(9348)), -Box(Box(9349)), -Box(Box(9350)), -Box(Box(9351)), -Box(Box(9352)), -Box(Box(9353)), -Box(Box(9354)), -Box(Box(9355)), -Box(Box(9356)), -Box(Box(9357)), -Box(Box(9358)), -Box(Box(9359)), -Box(Box(9360)), -Box(Box(9361)), -Box(Box(9362)), -Box(Box(9363)), -Box(Box(9364)), -Box(Box(9365)), -Box(Box(9366)), -Box(Box(9367)), -Box(Box(9368)), -Box(Box(9369)), -Box(Box(9370)), -Box(Box(9371)), -Box(Box(9372)), -Box(Box(9373)), -Box(Box(9374)), -Box(Box(9375)), -Box(Box(9376)), -Box(Box(9377)), -Box(Box(9378)), -Box(Box(9379)), -Box(Box(9380)), -Box(Box(9381)), -Box(Box(9382)), -Box(Box(9383)), -Box(Box(9384)), -Box(Box(9385)), -Box(Box(9386)), -Box(Box(9387)), -Box(Box(9388)), -Box(Box(9389)), -Box(Box(9390)), -Box(Box(9391)), -Box(Box(9392)), -Box(Box(9393)), -Box(Box(9394)), -Box(Box(9395)), -Box(Box(9396)), -Box(Box(9397)), -Box(Box(9398)), -Box(Box(9399)), -Box(Box(9400)), -Box(Box(9401)), -Box(Box(9402)), -Box(Box(9403)), -Box(Box(9404)), -Box(Box(9405)), -Box(Box(9406)), -Box(Box(9407)), -Box(Box(9408)), -Box(Box(9409)), -Box(Box(9410)), -Box(Box(9411)), -Box(Box(9412)), -Box(Box(9413)), -Box(Box(9414)), -Box(Box(9415)), -Box(Box(9416)), -Box(Box(9417)), -Box(Box(9418)), -Box(Box(9419)), -Box(Box(9420)), -Box(Box(9421)), -Box(Box(9422)), -Box(Box(9423)), -Box(Box(9424)), -Box(Box(9425)), -Box(Box(9426)), -Box(Box(9427)), -Box(Box(9428)), -Box(Box(9429)), -Box(Box(9430)), -Box(Box(9431)), -Box(Box(9432)), -Box(Box(9433)), -Box(Box(9434)), -Box(Box(9435)), -Box(Box(9436)), -Box(Box(9437)), -Box(Box(9438)), -Box(Box(9439)), -Box(Box(9440)), -Box(Box(9441)), -Box(Box(9442)), -Box(Box(9443)), -Box(Box(9444)), -Box(Box(9445)), -Box(Box(9446)), -Box(Box(9447)), -Box(Box(9448)), -Box(Box(9449)), -Box(Box(9450)), -Box(Box(9451)), -Box(Box(9452)), -Box(Box(9453)), -Box(Box(9454)), -Box(Box(9455)), -Box(Box(9456)), -Box(Box(9457)), -Box(Box(9458)), -Box(Box(9459)), -Box(Box(9460)), -Box(Box(9461)), -Box(Box(9462)), -Box(Box(9463)), -Box(Box(9464)), -Box(Box(9465)), -Box(Box(9466)), -Box(Box(9467)), -Box(Box(9468)), -Box(Box(9469)), -Box(Box(9470)), -Box(Box(9471)), -Box(Box(9472)), -Box(Box(9473)), -Box(Box(9474)), -Box(Box(9475)), -Box(Box(9476)), -Box(Box(9477)), -Box(Box(9478)), -Box(Box(9479)), -Box(Box(9480)), -Box(Box(9481)), -Box(Box(9482)), -Box(Box(9483)), -Box(Box(9484)), -Box(Box(9485)), -Box(Box(9486)), -Box(Box(9487)), -Box(Box(9488)), -Box(Box(9489)), -Box(Box(9490)), -Box(Box(9491)), -Box(Box(9492)), -Box(Box(9493)), -Box(Box(9494)), -Box(Box(9495)), -Box(Box(9496)), -Box(Box(9497)), -Box(Box(9498)), -Box(Box(9499)), -Box(Box(9500)), -Box(Box(9501)), -Box(Box(9502)), -Box(Box(9503)), -Box(Box(9504)), -Box(Box(9505)), -Box(Box(9506)), -Box(Box(9507)), -Box(Box(9508)), -Box(Box(9509)), -Box(Box(9510)), -Box(Box(9511)), -Box(Box(9512)), -Box(Box(9513)), -Box(Box(9514)), -Box(Box(9515)), -Box(Box(9516)), -Box(Box(9517)), -Box(Box(9518)), -Box(Box(9519)), -Box(Box(9520)), -Box(Box(9521)), -Box(Box(9522)), -Box(Box(9523)), -Box(Box(9524)), -Box(Box(9525)), -Box(Box(9526)), -Box(Box(9527)), -Box(Box(9528)), -Box(Box(9529)), -Box(Box(9530)), -Box(Box(9531)), -Box(Box(9532)), -Box(Box(9533)), -Box(Box(9534)), -Box(Box(9535)), -Box(Box(9536)), -Box(Box(9537)), -Box(Box(9538)), -Box(Box(9539)), -Box(Box(9540)), -Box(Box(9541)), -Box(Box(9542)), -Box(Box(9543)), -Box(Box(9544)), -Box(Box(9545)), -Box(Box(9546)), -Box(Box(9547)), -Box(Box(9548)), -Box(Box(9549)), -Box(Box(9550)), -Box(Box(9551)), -Box(Box(9552)), -Box(Box(9553)), -Box(Box(9554)), -Box(Box(9555)), -Box(Box(9556)), -Box(Box(9557)), -Box(Box(9558)), -Box(Box(9559)), -Box(Box(9560)), -Box(Box(9561)), -Box(Box(9562)), -Box(Box(9563)), -Box(Box(9564)), -Box(Box(9565)), -Box(Box(9566)), -Box(Box(9567)), -Box(Box(9568)), -Box(Box(9569)), -Box(Box(9570)), -Box(Box(9571)), -Box(Box(9572)), -Box(Box(9573)), -Box(Box(9574)), -Box(Box(9575)), -Box(Box(9576)), -Box(Box(9577)), -Box(Box(9578)), -Box(Box(9579)), -Box(Box(9580)), -Box(Box(9581)), -Box(Box(9582)), -Box(Box(9583)), -Box(Box(9584)), -Box(Box(9585)), -Box(Box(9586)), -Box(Box(9587)), -Box(Box(9588)), -Box(Box(9589)), -Box(Box(9590)), -Box(Box(9591)), -Box(Box(9592)), -Box(Box(9593)), -Box(Box(9594)), -Box(Box(9595)), -Box(Box(9596)), -Box(Box(9597)), -Box(Box(9598)), -Box(Box(9599)), -Box(Box(9600)), -Box(Box(9601)), -Box(Box(9602)), -Box(Box(9603)), -Box(Box(9604)), -Box(Box(9605)), -Box(Box(9606)), -Box(Box(9607)), -Box(Box(9608)), -Box(Box(9609)), -Box(Box(9610)), -Box(Box(9611)), -Box(Box(9612)), -Box(Box(9613)), -Box(Box(9614)), -Box(Box(9615)), -Box(Box(9616)), -Box(Box(9617)), -Box(Box(9618)), -Box(Box(9619)), -Box(Box(9620)), -Box(Box(9621)), -Box(Box(9622)), -Box(Box(9623)), -Box(Box(9624)), -Box(Box(9625)), -Box(Box(9626)), -Box(Box(9627)), -Box(Box(9628)), -Box(Box(9629)), -Box(Box(9630)), -Box(Box(9631)), -Box(Box(9632)), -Box(Box(9633)), -Box(Box(9634)), -Box(Box(9635)), -Box(Box(9636)), -Box(Box(9637)), -Box(Box(9638)), -Box(Box(9639)), -Box(Box(9640)), -Box(Box(9641)), -Box(Box(9642)), -Box(Box(9643)), -Box(Box(9644)), -Box(Box(9645)), -Box(Box(9646)), -Box(Box(9647)), -Box(Box(9648)), -Box(Box(9649)), -Box(Box(9650)), -Box(Box(9651)), -Box(Box(9652)), -Box(Box(9653)), -Box(Box(9654)), -Box(Box(9655)), -Box(Box(9656)), -Box(Box(9657)), -Box(Box(9658)), -Box(Box(9659)), -Box(Box(9660)), -Box(Box(9661)), -Box(Box(9662)), -Box(Box(9663)), -Box(Box(9664)), -Box(Box(9665)), -Box(Box(9666)), -Box(Box(9667)), -Box(Box(9668)), -Box(Box(9669)), -Box(Box(9670)), -Box(Box(9671)), -Box(Box(9672)), -Box(Box(9673)), -Box(Box(9674)), -Box(Box(9675)), -Box(Box(9676)), -Box(Box(9677)), -Box(Box(9678)), -Box(Box(9679)), -Box(Box(9680)), -Box(Box(9681)), -Box(Box(9682)), -Box(Box(9683)), -Box(Box(9684)), -Box(Box(9685)), -Box(Box(9686)), -Box(Box(9687)), -Box(Box(9688)), -Box(Box(9689)), -Box(Box(9690)), -Box(Box(9691)), -Box(Box(9692)), -Box(Box(9693)), -Box(Box(9694)), -Box(Box(9695)), -Box(Box(9696)), -Box(Box(9697)), -Box(Box(9698)), -Box(Box(9699)), -Box(Box(9700)), -Box(Box(9701)), -Box(Box(9702)), -Box(Box(9703)), -Box(Box(9704)), -Box(Box(9705)), -Box(Box(9706)), -Box(Box(9707)), -Box(Box(9708)), -Box(Box(9709)), -Box(Box(9710)), -Box(Box(9711)), -Box(Box(9712)), -Box(Box(9713)), -Box(Box(9714)), -Box(Box(9715)), -Box(Box(9716)), -Box(Box(9717)), -Box(Box(9718)), -Box(Box(9719)), -Box(Box(9720)), -Box(Box(9721)), -Box(Box(9722)), -Box(Box(9723)), -Box(Box(9724)), -Box(Box(9725)), -Box(Box(9726)), -Box(Box(9727)), -Box(Box(9728)), -Box(Box(9729)), -Box(Box(9730)), -Box(Box(9731)), -Box(Box(9732)), -Box(Box(9733)), -Box(Box(9734)), -Box(Box(9735)), -Box(Box(9736)), -Box(Box(9737)), -Box(Box(9738)), -Box(Box(9739)), -Box(Box(9740)), -Box(Box(9741)), -Box(Box(9742)), -Box(Box(9743)), -Box(Box(9744)), -Box(Box(9745)), -Box(Box(9746)), -Box(Box(9747)), -Box(Box(9748)), -Box(Box(9749)), -Box(Box(9750)), -Box(Box(9751)), -Box(Box(9752)), -Box(Box(9753)), -Box(Box(9754)), -Box(Box(9755)), -Box(Box(9756)), -Box(Box(9757)), -Box(Box(9758)), -Box(Box(9759)), -Box(Box(9760)), -Box(Box(9761)), -Box(Box(9762)), -Box(Box(9763)), -Box(Box(9764)), -Box(Box(9765)), -Box(Box(9766)), -Box(Box(9767)), -Box(Box(9768)), -Box(Box(9769)), -Box(Box(9770)), -Box(Box(9771)), -Box(Box(9772)), -Box(Box(9773)), -Box(Box(9774)), -Box(Box(9775)), -Box(Box(9776)), -Box(Box(9777)), -Box(Box(9778)), -Box(Box(9779)), -Box(Box(9780)), -Box(Box(9781)), -Box(Box(9782)), -Box(Box(9783)), -Box(Box(9784)), -Box(Box(9785)), -Box(Box(9786)), -Box(Box(9787)), -Box(Box(9788)), -Box(Box(9789)), -Box(Box(9790)), -Box(Box(9791)), -Box(Box(9792)), -Box(Box(9793)), -Box(Box(9794)), -Box(Box(9795)), -Box(Box(9796)), -Box(Box(9797)), -Box(Box(9798)), -Box(Box(9799)), -Box(Box(9800)), -Box(Box(9801)), -Box(Box(9802)), -Box(Box(9803)), -Box(Box(9804)), -Box(Box(9805)), -Box(Box(9806)), -Box(Box(9807)), -Box(Box(9808)), -Box(Box(9809)), -Box(Box(9810)), -Box(Box(9811)), -Box(Box(9812)), -Box(Box(9813)), -Box(Box(9814)), -Box(Box(9815)), -Box(Box(9816)), -Box(Box(9817)), -Box(Box(9818)), -Box(Box(9819)), -Box(Box(9820)), -Box(Box(9821)), -Box(Box(9822)), -Box(Box(9823)), -Box(Box(9824)), -Box(Box(9825)), -Box(Box(9826)), -Box(Box(9827)), -Box(Box(9828)), -Box(Box(9829)), -Box(Box(9830)), -Box(Box(9831)), -Box(Box(9832)), -Box(Box(9833)), -Box(Box(9834)), -Box(Box(9835)), -Box(Box(9836)), -Box(Box(9837)), -Box(Box(9838)), -Box(Box(9839)), -Box(Box(9840)), -Box(Box(9841)), -Box(Box(9842)), -Box(Box(9843)), -Box(Box(9844)), -Box(Box(9845)), -Box(Box(9846)), -Box(Box(9847)), -Box(Box(9848)), -Box(Box(9849)), -Box(Box(9850)), -Box(Box(9851)), -Box(Box(9852)), -Box(Box(9853)), -Box(Box(9854)), -Box(Box(9855)), -Box(Box(9856)), -Box(Box(9857)), -Box(Box(9858)), -Box(Box(9859)), -Box(Box(9860)), -Box(Box(9861)), -Box(Box(9862)), -Box(Box(9863)), -Box(Box(9864)), -Box(Box(9865)), -Box(Box(9866)), -Box(Box(9867)), -Box(Box(9868)), -Box(Box(9869)), -Box(Box(9870)), -Box(Box(9871)), -Box(Box(9872)), -Box(Box(9873)), -Box(Box(9874)), -Box(Box(9875)), -Box(Box(9876)), -Box(Box(9877)), -Box(Box(9878)), -Box(Box(9879)), -Box(Box(9880)), -Box(Box(9881)), -Box(Box(9882)), -Box(Box(9883)), -Box(Box(9884)), -Box(Box(9885)), -Box(Box(9886)), -Box(Box(9887)), -Box(Box(9888)), -Box(Box(9889)), -Box(Box(9890)), -Box(Box(9891)), -Box(Box(9892)), -Box(Box(9893)), -Box(Box(9894)), -Box(Box(9895)), -Box(Box(9896)), -Box(Box(9897)), -Box(Box(9898)), -Box(Box(9899)), -Box(Box(9900)), -Box(Box(9901)), -Box(Box(9902)), -Box(Box(9903)), -Box(Box(9904)), -Box(Box(9905)), -Box(Box(9906)), -Box(Box(9907)), -Box(Box(9908)), -Box(Box(9909)), -Box(Box(9910)), -Box(Box(9911)), -Box(Box(9912)), -Box(Box(9913)), -Box(Box(9914)), -Box(Box(9915)), -Box(Box(9916)), -Box(Box(9917)), -Box(Box(9918)), -Box(Box(9919)), -Box(Box(9920)), -Box(Box(9921)), -Box(Box(9922)), -Box(Box(9923)), -Box(Box(9924)), -Box(Box(9925)), -Box(Box(9926)), -Box(Box(9927)), -Box(Box(9928)), -Box(Box(9929)), -Box(Box(9930)), -Box(Box(9931)), -Box(Box(9932)), -Box(Box(9933)), -Box(Box(9934)), -Box(Box(9935)), -Box(Box(9936)), -Box(Box(9937)), -Box(Box(9938)), -Box(Box(9939)), -Box(Box(9940)), -Box(Box(9941)), -Box(Box(9942)), -Box(Box(9943)), -Box(Box(9944)), -Box(Box(9945)), -Box(Box(9946)), -Box(Box(9947)), -Box(Box(9948)), -Box(Box(9949)), -Box(Box(9950)), -Box(Box(9951)), -Box(Box(9952)), -Box(Box(9953)), -Box(Box(9954)), -Box(Box(9955)), -Box(Box(9956)), -Box(Box(9957)), -Box(Box(9958)), -Box(Box(9959)), -Box(Box(9960)), -Box(Box(9961)), -Box(Box(9962)), -Box(Box(9963)), -Box(Box(9964)), -Box(Box(9965)), -Box(Box(9966)), -Box(Box(9967)), -Box(Box(9968)), -Box(Box(9969)), -Box(Box(9970)), -Box(Box(9971)), -Box(Box(9972)), -Box(Box(9973)), -Box(Box(9974)), -Box(Box(9975)), -Box(Box(9976)), -Box(Box(9977)), -Box(Box(9978)), -Box(Box(9979)), -Box(Box(9980)), -Box(Box(9981)), -Box(Box(9982)), -Box(Box(9983)), -Box(Box(9984)), -Box(Box(9985)), -Box(Box(9986)), -Box(Box(9987)), -Box(Box(9988)), -Box(Box(9989)), -Box(Box(9990)), -Box(Box(9991)), -Box(Box(9992)), -Box(Box(9993)), -Box(Box(9994)), -Box(Box(9995)), -Box(Box(9996)), -Box(Box(9997)), -Box(Box(9998)), -Box(Box(9999)), -]; - -// 10,000 elements. -const list2 = [ -Box(Box(0)), -Box(Box(1)), -Box(Box(2)), -Box(Box(3)), -Box(Box(4)), -Box(Box(5)), -Box(Box(6)), -Box(Box(7)), -Box(Box(8)), -Box(Box(9)), -Box(Box(10)), -Box(Box(11)), -Box(Box(12)), -Box(Box(13)), -Box(Box(14)), -Box(Box(15)), -Box(Box(16)), -Box(Box(17)), -Box(Box(18)), -Box(Box(19)), -Box(Box(20)), -Box(Box(21)), -Box(Box(22)), -Box(Box(23)), -Box(Box(24)), -Box(Box(25)), -Box(Box(26)), -Box(Box(27)), -Box(Box(28)), -Box(Box(29)), -Box(Box(30)), -Box(Box(31)), -Box(Box(32)), -Box(Box(33)), -Box(Box(34)), -Box(Box(35)), -Box(Box(36)), -Box(Box(37)), -Box(Box(38)), -Box(Box(39)), -Box(Box(40)), -Box(Box(41)), -Box(Box(42)), -Box(Box(43)), -Box(Box(44)), -Box(Box(45)), -Box(Box(46)), -Box(Box(47)), -Box(Box(48)), -Box(Box(49)), -Box(Box(50)), -Box(Box(51)), -Box(Box(52)), -Box(Box(53)), -Box(Box(54)), -Box(Box(55)), -Box(Box(56)), -Box(Box(57)), -Box(Box(58)), -Box(Box(59)), -Box(Box(60)), -Box(Box(61)), -Box(Box(62)), -Box(Box(63)), -Box(Box(64)), -Box(Box(65)), -Box(Box(66)), -Box(Box(67)), -Box(Box(68)), -Box(Box(69)), -Box(Box(70)), -Box(Box(71)), -Box(Box(72)), -Box(Box(73)), -Box(Box(74)), -Box(Box(75)), -Box(Box(76)), -Box(Box(77)), -Box(Box(78)), -Box(Box(79)), -Box(Box(80)), -Box(Box(81)), -Box(Box(82)), -Box(Box(83)), -Box(Box(84)), -Box(Box(85)), -Box(Box(86)), -Box(Box(87)), -Box(Box(88)), -Box(Box(89)), -Box(Box(90)), -Box(Box(91)), -Box(Box(92)), -Box(Box(93)), -Box(Box(94)), -Box(Box(95)), -Box(Box(96)), -Box(Box(97)), -Box(Box(98)), -Box(Box(99)), -Box(Box(100)), -Box(Box(101)), -Box(Box(102)), -Box(Box(103)), -Box(Box(104)), -Box(Box(105)), -Box(Box(106)), -Box(Box(107)), -Box(Box(108)), -Box(Box(109)), -Box(Box(110)), -Box(Box(111)), -Box(Box(112)), -Box(Box(113)), -Box(Box(114)), -Box(Box(115)), -Box(Box(116)), -Box(Box(117)), -Box(Box(118)), -Box(Box(119)), -Box(Box(120)), -Box(Box(121)), -Box(Box(122)), -Box(Box(123)), -Box(Box(124)), -Box(Box(125)), -Box(Box(126)), -Box(Box(127)), -Box(Box(128)), -Box(Box(129)), -Box(Box(130)), -Box(Box(131)), -Box(Box(132)), -Box(Box(133)), -Box(Box(134)), -Box(Box(135)), -Box(Box(136)), -Box(Box(137)), -Box(Box(138)), -Box(Box(139)), -Box(Box(140)), -Box(Box(141)), -Box(Box(142)), -Box(Box(143)), -Box(Box(144)), -Box(Box(145)), -Box(Box(146)), -Box(Box(147)), -Box(Box(148)), -Box(Box(149)), -Box(Box(150)), -Box(Box(151)), -Box(Box(152)), -Box(Box(153)), -Box(Box(154)), -Box(Box(155)), -Box(Box(156)), -Box(Box(157)), -Box(Box(158)), -Box(Box(159)), -Box(Box(160)), -Box(Box(161)), -Box(Box(162)), -Box(Box(163)), -Box(Box(164)), -Box(Box(165)), -Box(Box(166)), -Box(Box(167)), -Box(Box(168)), -Box(Box(169)), -Box(Box(170)), -Box(Box(171)), -Box(Box(172)), -Box(Box(173)), -Box(Box(174)), -Box(Box(175)), -Box(Box(176)), -Box(Box(177)), -Box(Box(178)), -Box(Box(179)), -Box(Box(180)), -Box(Box(181)), -Box(Box(182)), -Box(Box(183)), -Box(Box(184)), -Box(Box(185)), -Box(Box(186)), -Box(Box(187)), -Box(Box(188)), -Box(Box(189)), -Box(Box(190)), -Box(Box(191)), -Box(Box(192)), -Box(Box(193)), -Box(Box(194)), -Box(Box(195)), -Box(Box(196)), -Box(Box(197)), -Box(Box(198)), -Box(Box(199)), -Box(Box(200)), -Box(Box(201)), -Box(Box(202)), -Box(Box(203)), -Box(Box(204)), -Box(Box(205)), -Box(Box(206)), -Box(Box(207)), -Box(Box(208)), -Box(Box(209)), -Box(Box(210)), -Box(Box(211)), -Box(Box(212)), -Box(Box(213)), -Box(Box(214)), -Box(Box(215)), -Box(Box(216)), -Box(Box(217)), -Box(Box(218)), -Box(Box(219)), -Box(Box(220)), -Box(Box(221)), -Box(Box(222)), -Box(Box(223)), -Box(Box(224)), -Box(Box(225)), -Box(Box(226)), -Box(Box(227)), -Box(Box(228)), -Box(Box(229)), -Box(Box(230)), -Box(Box(231)), -Box(Box(232)), -Box(Box(233)), -Box(Box(234)), -Box(Box(235)), -Box(Box(236)), -Box(Box(237)), -Box(Box(238)), -Box(Box(239)), -Box(Box(240)), -Box(Box(241)), -Box(Box(242)), -Box(Box(243)), -Box(Box(244)), -Box(Box(245)), -Box(Box(246)), -Box(Box(247)), -Box(Box(248)), -Box(Box(249)), -Box(Box(250)), -Box(Box(251)), -Box(Box(252)), -Box(Box(253)), -Box(Box(254)), -Box(Box(255)), -Box(Box(256)), -Box(Box(257)), -Box(Box(258)), -Box(Box(259)), -Box(Box(260)), -Box(Box(261)), -Box(Box(262)), -Box(Box(263)), -Box(Box(264)), -Box(Box(265)), -Box(Box(266)), -Box(Box(267)), -Box(Box(268)), -Box(Box(269)), -Box(Box(270)), -Box(Box(271)), -Box(Box(272)), -Box(Box(273)), -Box(Box(274)), -Box(Box(275)), -Box(Box(276)), -Box(Box(277)), -Box(Box(278)), -Box(Box(279)), -Box(Box(280)), -Box(Box(281)), -Box(Box(282)), -Box(Box(283)), -Box(Box(284)), -Box(Box(285)), -Box(Box(286)), -Box(Box(287)), -Box(Box(288)), -Box(Box(289)), -Box(Box(290)), -Box(Box(291)), -Box(Box(292)), -Box(Box(293)), -Box(Box(294)), -Box(Box(295)), -Box(Box(296)), -Box(Box(297)), -Box(Box(298)), -Box(Box(299)), -Box(Box(300)), -Box(Box(301)), -Box(Box(302)), -Box(Box(303)), -Box(Box(304)), -Box(Box(305)), -Box(Box(306)), -Box(Box(307)), -Box(Box(308)), -Box(Box(309)), -Box(Box(310)), -Box(Box(311)), -Box(Box(312)), -Box(Box(313)), -Box(Box(314)), -Box(Box(315)), -Box(Box(316)), -Box(Box(317)), -Box(Box(318)), -Box(Box(319)), -Box(Box(320)), -Box(Box(321)), -Box(Box(322)), -Box(Box(323)), -Box(Box(324)), -Box(Box(325)), -Box(Box(326)), -Box(Box(327)), -Box(Box(328)), -Box(Box(329)), -Box(Box(330)), -Box(Box(331)), -Box(Box(332)), -Box(Box(333)), -Box(Box(334)), -Box(Box(335)), -Box(Box(336)), -Box(Box(337)), -Box(Box(338)), -Box(Box(339)), -Box(Box(340)), -Box(Box(341)), -Box(Box(342)), -Box(Box(343)), -Box(Box(344)), -Box(Box(345)), -Box(Box(346)), -Box(Box(347)), -Box(Box(348)), -Box(Box(349)), -Box(Box(350)), -Box(Box(351)), -Box(Box(352)), -Box(Box(353)), -Box(Box(354)), -Box(Box(355)), -Box(Box(356)), -Box(Box(357)), -Box(Box(358)), -Box(Box(359)), -Box(Box(360)), -Box(Box(361)), -Box(Box(362)), -Box(Box(363)), -Box(Box(364)), -Box(Box(365)), -Box(Box(366)), -Box(Box(367)), -Box(Box(368)), -Box(Box(369)), -Box(Box(370)), -Box(Box(371)), -Box(Box(372)), -Box(Box(373)), -Box(Box(374)), -Box(Box(375)), -Box(Box(376)), -Box(Box(377)), -Box(Box(378)), -Box(Box(379)), -Box(Box(380)), -Box(Box(381)), -Box(Box(382)), -Box(Box(383)), -Box(Box(384)), -Box(Box(385)), -Box(Box(386)), -Box(Box(387)), -Box(Box(388)), -Box(Box(389)), -Box(Box(390)), -Box(Box(391)), -Box(Box(392)), -Box(Box(393)), -Box(Box(394)), -Box(Box(395)), -Box(Box(396)), -Box(Box(397)), -Box(Box(398)), -Box(Box(399)), -Box(Box(400)), -Box(Box(401)), -Box(Box(402)), -Box(Box(403)), -Box(Box(404)), -Box(Box(405)), -Box(Box(406)), -Box(Box(407)), -Box(Box(408)), -Box(Box(409)), -Box(Box(410)), -Box(Box(411)), -Box(Box(412)), -Box(Box(413)), -Box(Box(414)), -Box(Box(415)), -Box(Box(416)), -Box(Box(417)), -Box(Box(418)), -Box(Box(419)), -Box(Box(420)), -Box(Box(421)), -Box(Box(422)), -Box(Box(423)), -Box(Box(424)), -Box(Box(425)), -Box(Box(426)), -Box(Box(427)), -Box(Box(428)), -Box(Box(429)), -Box(Box(430)), -Box(Box(431)), -Box(Box(432)), -Box(Box(433)), -Box(Box(434)), -Box(Box(435)), -Box(Box(436)), -Box(Box(437)), -Box(Box(438)), -Box(Box(439)), -Box(Box(440)), -Box(Box(441)), -Box(Box(442)), -Box(Box(443)), -Box(Box(444)), -Box(Box(445)), -Box(Box(446)), -Box(Box(447)), -Box(Box(448)), -Box(Box(449)), -Box(Box(450)), -Box(Box(451)), -Box(Box(452)), -Box(Box(453)), -Box(Box(454)), -Box(Box(455)), -Box(Box(456)), -Box(Box(457)), -Box(Box(458)), -Box(Box(459)), -Box(Box(460)), -Box(Box(461)), -Box(Box(462)), -Box(Box(463)), -Box(Box(464)), -Box(Box(465)), -Box(Box(466)), -Box(Box(467)), -Box(Box(468)), -Box(Box(469)), -Box(Box(470)), -Box(Box(471)), -Box(Box(472)), -Box(Box(473)), -Box(Box(474)), -Box(Box(475)), -Box(Box(476)), -Box(Box(477)), -Box(Box(478)), -Box(Box(479)), -Box(Box(480)), -Box(Box(481)), -Box(Box(482)), -Box(Box(483)), -Box(Box(484)), -Box(Box(485)), -Box(Box(486)), -Box(Box(487)), -Box(Box(488)), -Box(Box(489)), -Box(Box(490)), -Box(Box(491)), -Box(Box(492)), -Box(Box(493)), -Box(Box(494)), -Box(Box(495)), -Box(Box(496)), -Box(Box(497)), -Box(Box(498)), -Box(Box(499)), -Box(Box(500)), -Box(Box(501)), -Box(Box(502)), -Box(Box(503)), -Box(Box(504)), -Box(Box(505)), -Box(Box(506)), -Box(Box(507)), -Box(Box(508)), -Box(Box(509)), -Box(Box(510)), -Box(Box(511)), -Box(Box(512)), -Box(Box(513)), -Box(Box(514)), -Box(Box(515)), -Box(Box(516)), -Box(Box(517)), -Box(Box(518)), -Box(Box(519)), -Box(Box(520)), -Box(Box(521)), -Box(Box(522)), -Box(Box(523)), -Box(Box(524)), -Box(Box(525)), -Box(Box(526)), -Box(Box(527)), -Box(Box(528)), -Box(Box(529)), -Box(Box(530)), -Box(Box(531)), -Box(Box(532)), -Box(Box(533)), -Box(Box(534)), -Box(Box(535)), -Box(Box(536)), -Box(Box(537)), -Box(Box(538)), -Box(Box(539)), -Box(Box(540)), -Box(Box(541)), -Box(Box(542)), -Box(Box(543)), -Box(Box(544)), -Box(Box(545)), -Box(Box(546)), -Box(Box(547)), -Box(Box(548)), -Box(Box(549)), -Box(Box(550)), -Box(Box(551)), -Box(Box(552)), -Box(Box(553)), -Box(Box(554)), -Box(Box(555)), -Box(Box(556)), -Box(Box(557)), -Box(Box(558)), -Box(Box(559)), -Box(Box(560)), -Box(Box(561)), -Box(Box(562)), -Box(Box(563)), -Box(Box(564)), -Box(Box(565)), -Box(Box(566)), -Box(Box(567)), -Box(Box(568)), -Box(Box(569)), -Box(Box(570)), -Box(Box(571)), -Box(Box(572)), -Box(Box(573)), -Box(Box(574)), -Box(Box(575)), -Box(Box(576)), -Box(Box(577)), -Box(Box(578)), -Box(Box(579)), -Box(Box(580)), -Box(Box(581)), -Box(Box(582)), -Box(Box(583)), -Box(Box(584)), -Box(Box(585)), -Box(Box(586)), -Box(Box(587)), -Box(Box(588)), -Box(Box(589)), -Box(Box(590)), -Box(Box(591)), -Box(Box(592)), -Box(Box(593)), -Box(Box(594)), -Box(Box(595)), -Box(Box(596)), -Box(Box(597)), -Box(Box(598)), -Box(Box(599)), -Box(Box(600)), -Box(Box(601)), -Box(Box(602)), -Box(Box(603)), -Box(Box(604)), -Box(Box(605)), -Box(Box(606)), -Box(Box(607)), -Box(Box(608)), -Box(Box(609)), -Box(Box(610)), -Box(Box(611)), -Box(Box(612)), -Box(Box(613)), -Box(Box(614)), -Box(Box(615)), -Box(Box(616)), -Box(Box(617)), -Box(Box(618)), -Box(Box(619)), -Box(Box(620)), -Box(Box(621)), -Box(Box(622)), -Box(Box(623)), -Box(Box(624)), -Box(Box(625)), -Box(Box(626)), -Box(Box(627)), -Box(Box(628)), -Box(Box(629)), -Box(Box(630)), -Box(Box(631)), -Box(Box(632)), -Box(Box(633)), -Box(Box(634)), -Box(Box(635)), -Box(Box(636)), -Box(Box(637)), -Box(Box(638)), -Box(Box(639)), -Box(Box(640)), -Box(Box(641)), -Box(Box(642)), -Box(Box(643)), -Box(Box(644)), -Box(Box(645)), -Box(Box(646)), -Box(Box(647)), -Box(Box(648)), -Box(Box(649)), -Box(Box(650)), -Box(Box(651)), -Box(Box(652)), -Box(Box(653)), -Box(Box(654)), -Box(Box(655)), -Box(Box(656)), -Box(Box(657)), -Box(Box(658)), -Box(Box(659)), -Box(Box(660)), -Box(Box(661)), -Box(Box(662)), -Box(Box(663)), -Box(Box(664)), -Box(Box(665)), -Box(Box(666)), -Box(Box(667)), -Box(Box(668)), -Box(Box(669)), -Box(Box(670)), -Box(Box(671)), -Box(Box(672)), -Box(Box(673)), -Box(Box(674)), -Box(Box(675)), -Box(Box(676)), -Box(Box(677)), -Box(Box(678)), -Box(Box(679)), -Box(Box(680)), -Box(Box(681)), -Box(Box(682)), -Box(Box(683)), -Box(Box(684)), -Box(Box(685)), -Box(Box(686)), -Box(Box(687)), -Box(Box(688)), -Box(Box(689)), -Box(Box(690)), -Box(Box(691)), -Box(Box(692)), -Box(Box(693)), -Box(Box(694)), -Box(Box(695)), -Box(Box(696)), -Box(Box(697)), -Box(Box(698)), -Box(Box(699)), -Box(Box(700)), -Box(Box(701)), -Box(Box(702)), -Box(Box(703)), -Box(Box(704)), -Box(Box(705)), -Box(Box(706)), -Box(Box(707)), -Box(Box(708)), -Box(Box(709)), -Box(Box(710)), -Box(Box(711)), -Box(Box(712)), -Box(Box(713)), -Box(Box(714)), -Box(Box(715)), -Box(Box(716)), -Box(Box(717)), -Box(Box(718)), -Box(Box(719)), -Box(Box(720)), -Box(Box(721)), -Box(Box(722)), -Box(Box(723)), -Box(Box(724)), -Box(Box(725)), -Box(Box(726)), -Box(Box(727)), -Box(Box(728)), -Box(Box(729)), -Box(Box(730)), -Box(Box(731)), -Box(Box(732)), -Box(Box(733)), -Box(Box(734)), -Box(Box(735)), -Box(Box(736)), -Box(Box(737)), -Box(Box(738)), -Box(Box(739)), -Box(Box(740)), -Box(Box(741)), -Box(Box(742)), -Box(Box(743)), -Box(Box(744)), -Box(Box(745)), -Box(Box(746)), -Box(Box(747)), -Box(Box(748)), -Box(Box(749)), -Box(Box(750)), -Box(Box(751)), -Box(Box(752)), -Box(Box(753)), -Box(Box(754)), -Box(Box(755)), -Box(Box(756)), -Box(Box(757)), -Box(Box(758)), -Box(Box(759)), -Box(Box(760)), -Box(Box(761)), -Box(Box(762)), -Box(Box(763)), -Box(Box(764)), -Box(Box(765)), -Box(Box(766)), -Box(Box(767)), -Box(Box(768)), -Box(Box(769)), -Box(Box(770)), -Box(Box(771)), -Box(Box(772)), -Box(Box(773)), -Box(Box(774)), -Box(Box(775)), -Box(Box(776)), -Box(Box(777)), -Box(Box(778)), -Box(Box(779)), -Box(Box(780)), -Box(Box(781)), -Box(Box(782)), -Box(Box(783)), -Box(Box(784)), -Box(Box(785)), -Box(Box(786)), -Box(Box(787)), -Box(Box(788)), -Box(Box(789)), -Box(Box(790)), -Box(Box(791)), -Box(Box(792)), -Box(Box(793)), -Box(Box(794)), -Box(Box(795)), -Box(Box(796)), -Box(Box(797)), -Box(Box(798)), -Box(Box(799)), -Box(Box(800)), -Box(Box(801)), -Box(Box(802)), -Box(Box(803)), -Box(Box(804)), -Box(Box(805)), -Box(Box(806)), -Box(Box(807)), -Box(Box(808)), -Box(Box(809)), -Box(Box(810)), -Box(Box(811)), -Box(Box(812)), -Box(Box(813)), -Box(Box(814)), -Box(Box(815)), -Box(Box(816)), -Box(Box(817)), -Box(Box(818)), -Box(Box(819)), -Box(Box(820)), -Box(Box(821)), -Box(Box(822)), -Box(Box(823)), -Box(Box(824)), -Box(Box(825)), -Box(Box(826)), -Box(Box(827)), -Box(Box(828)), -Box(Box(829)), -Box(Box(830)), -Box(Box(831)), -Box(Box(832)), -Box(Box(833)), -Box(Box(834)), -Box(Box(835)), -Box(Box(836)), -Box(Box(837)), -Box(Box(838)), -Box(Box(839)), -Box(Box(840)), -Box(Box(841)), -Box(Box(842)), -Box(Box(843)), -Box(Box(844)), -Box(Box(845)), -Box(Box(846)), -Box(Box(847)), -Box(Box(848)), -Box(Box(849)), -Box(Box(850)), -Box(Box(851)), -Box(Box(852)), -Box(Box(853)), -Box(Box(854)), -Box(Box(855)), -Box(Box(856)), -Box(Box(857)), -Box(Box(858)), -Box(Box(859)), -Box(Box(860)), -Box(Box(861)), -Box(Box(862)), -Box(Box(863)), -Box(Box(864)), -Box(Box(865)), -Box(Box(866)), -Box(Box(867)), -Box(Box(868)), -Box(Box(869)), -Box(Box(870)), -Box(Box(871)), -Box(Box(872)), -Box(Box(873)), -Box(Box(874)), -Box(Box(875)), -Box(Box(876)), -Box(Box(877)), -Box(Box(878)), -Box(Box(879)), -Box(Box(880)), -Box(Box(881)), -Box(Box(882)), -Box(Box(883)), -Box(Box(884)), -Box(Box(885)), -Box(Box(886)), -Box(Box(887)), -Box(Box(888)), -Box(Box(889)), -Box(Box(890)), -Box(Box(891)), -Box(Box(892)), -Box(Box(893)), -Box(Box(894)), -Box(Box(895)), -Box(Box(896)), -Box(Box(897)), -Box(Box(898)), -Box(Box(899)), -Box(Box(900)), -Box(Box(901)), -Box(Box(902)), -Box(Box(903)), -Box(Box(904)), -Box(Box(905)), -Box(Box(906)), -Box(Box(907)), -Box(Box(908)), -Box(Box(909)), -Box(Box(910)), -Box(Box(911)), -Box(Box(912)), -Box(Box(913)), -Box(Box(914)), -Box(Box(915)), -Box(Box(916)), -Box(Box(917)), -Box(Box(918)), -Box(Box(919)), -Box(Box(920)), -Box(Box(921)), -Box(Box(922)), -Box(Box(923)), -Box(Box(924)), -Box(Box(925)), -Box(Box(926)), -Box(Box(927)), -Box(Box(928)), -Box(Box(929)), -Box(Box(930)), -Box(Box(931)), -Box(Box(932)), -Box(Box(933)), -Box(Box(934)), -Box(Box(935)), -Box(Box(936)), -Box(Box(937)), -Box(Box(938)), -Box(Box(939)), -Box(Box(940)), -Box(Box(941)), -Box(Box(942)), -Box(Box(943)), -Box(Box(944)), -Box(Box(945)), -Box(Box(946)), -Box(Box(947)), -Box(Box(948)), -Box(Box(949)), -Box(Box(950)), -Box(Box(951)), -Box(Box(952)), -Box(Box(953)), -Box(Box(954)), -Box(Box(955)), -Box(Box(956)), -Box(Box(957)), -Box(Box(958)), -Box(Box(959)), -Box(Box(960)), -Box(Box(961)), -Box(Box(962)), -Box(Box(963)), -Box(Box(964)), -Box(Box(965)), -Box(Box(966)), -Box(Box(967)), -Box(Box(968)), -Box(Box(969)), -Box(Box(970)), -Box(Box(971)), -Box(Box(972)), -Box(Box(973)), -Box(Box(974)), -Box(Box(975)), -Box(Box(976)), -Box(Box(977)), -Box(Box(978)), -Box(Box(979)), -Box(Box(980)), -Box(Box(981)), -Box(Box(982)), -Box(Box(983)), -Box(Box(984)), -Box(Box(985)), -Box(Box(986)), -Box(Box(987)), -Box(Box(988)), -Box(Box(989)), -Box(Box(990)), -Box(Box(991)), -Box(Box(992)), -Box(Box(993)), -Box(Box(994)), -Box(Box(995)), -Box(Box(996)), -Box(Box(997)), -Box(Box(998)), -Box(Box(999)), -Box(Box(1000)), -Box(Box(1001)), -Box(Box(1002)), -Box(Box(1003)), -Box(Box(1004)), -Box(Box(1005)), -Box(Box(1006)), -Box(Box(1007)), -Box(Box(1008)), -Box(Box(1009)), -Box(Box(1010)), -Box(Box(1011)), -Box(Box(1012)), -Box(Box(1013)), -Box(Box(1014)), -Box(Box(1015)), -Box(Box(1016)), -Box(Box(1017)), -Box(Box(1018)), -Box(Box(1019)), -Box(Box(1020)), -Box(Box(1021)), -Box(Box(1022)), -Box(Box(1023)), -Box(Box(1024)), -Box(Box(1025)), -Box(Box(1026)), -Box(Box(1027)), -Box(Box(1028)), -Box(Box(1029)), -Box(Box(1030)), -Box(Box(1031)), -Box(Box(1032)), -Box(Box(1033)), -Box(Box(1034)), -Box(Box(1035)), -Box(Box(1036)), -Box(Box(1037)), -Box(Box(1038)), -Box(Box(1039)), -Box(Box(1040)), -Box(Box(1041)), -Box(Box(1042)), -Box(Box(1043)), -Box(Box(1044)), -Box(Box(1045)), -Box(Box(1046)), -Box(Box(1047)), -Box(Box(1048)), -Box(Box(1049)), -Box(Box(1050)), -Box(Box(1051)), -Box(Box(1052)), -Box(Box(1053)), -Box(Box(1054)), -Box(Box(1055)), -Box(Box(1056)), -Box(Box(1057)), -Box(Box(1058)), -Box(Box(1059)), -Box(Box(1060)), -Box(Box(1061)), -Box(Box(1062)), -Box(Box(1063)), -Box(Box(1064)), -Box(Box(1065)), -Box(Box(1066)), -Box(Box(1067)), -Box(Box(1068)), -Box(Box(1069)), -Box(Box(1070)), -Box(Box(1071)), -Box(Box(1072)), -Box(Box(1073)), -Box(Box(1074)), -Box(Box(1075)), -Box(Box(1076)), -Box(Box(1077)), -Box(Box(1078)), -Box(Box(1079)), -Box(Box(1080)), -Box(Box(1081)), -Box(Box(1082)), -Box(Box(1083)), -Box(Box(1084)), -Box(Box(1085)), -Box(Box(1086)), -Box(Box(1087)), -Box(Box(1088)), -Box(Box(1089)), -Box(Box(1090)), -Box(Box(1091)), -Box(Box(1092)), -Box(Box(1093)), -Box(Box(1094)), -Box(Box(1095)), -Box(Box(1096)), -Box(Box(1097)), -Box(Box(1098)), -Box(Box(1099)), -Box(Box(1100)), -Box(Box(1101)), -Box(Box(1102)), -Box(Box(1103)), -Box(Box(1104)), -Box(Box(1105)), -Box(Box(1106)), -Box(Box(1107)), -Box(Box(1108)), -Box(Box(1109)), -Box(Box(1110)), -Box(Box(1111)), -Box(Box(1112)), -Box(Box(1113)), -Box(Box(1114)), -Box(Box(1115)), -Box(Box(1116)), -Box(Box(1117)), -Box(Box(1118)), -Box(Box(1119)), -Box(Box(1120)), -Box(Box(1121)), -Box(Box(1122)), -Box(Box(1123)), -Box(Box(1124)), -Box(Box(1125)), -Box(Box(1126)), -Box(Box(1127)), -Box(Box(1128)), -Box(Box(1129)), -Box(Box(1130)), -Box(Box(1131)), -Box(Box(1132)), -Box(Box(1133)), -Box(Box(1134)), -Box(Box(1135)), -Box(Box(1136)), -Box(Box(1137)), -Box(Box(1138)), -Box(Box(1139)), -Box(Box(1140)), -Box(Box(1141)), -Box(Box(1142)), -Box(Box(1143)), -Box(Box(1144)), -Box(Box(1145)), -Box(Box(1146)), -Box(Box(1147)), -Box(Box(1148)), -Box(Box(1149)), -Box(Box(1150)), -Box(Box(1151)), -Box(Box(1152)), -Box(Box(1153)), -Box(Box(1154)), -Box(Box(1155)), -Box(Box(1156)), -Box(Box(1157)), -Box(Box(1158)), -Box(Box(1159)), -Box(Box(1160)), -Box(Box(1161)), -Box(Box(1162)), -Box(Box(1163)), -Box(Box(1164)), -Box(Box(1165)), -Box(Box(1166)), -Box(Box(1167)), -Box(Box(1168)), -Box(Box(1169)), -Box(Box(1170)), -Box(Box(1171)), -Box(Box(1172)), -Box(Box(1173)), -Box(Box(1174)), -Box(Box(1175)), -Box(Box(1176)), -Box(Box(1177)), -Box(Box(1178)), -Box(Box(1179)), -Box(Box(1180)), -Box(Box(1181)), -Box(Box(1182)), -Box(Box(1183)), -Box(Box(1184)), -Box(Box(1185)), -Box(Box(1186)), -Box(Box(1187)), -Box(Box(1188)), -Box(Box(1189)), -Box(Box(1190)), -Box(Box(1191)), -Box(Box(1192)), -Box(Box(1193)), -Box(Box(1194)), -Box(Box(1195)), -Box(Box(1196)), -Box(Box(1197)), -Box(Box(1198)), -Box(Box(1199)), -Box(Box(1200)), -Box(Box(1201)), -Box(Box(1202)), -Box(Box(1203)), -Box(Box(1204)), -Box(Box(1205)), -Box(Box(1206)), -Box(Box(1207)), -Box(Box(1208)), -Box(Box(1209)), -Box(Box(1210)), -Box(Box(1211)), -Box(Box(1212)), -Box(Box(1213)), -Box(Box(1214)), -Box(Box(1215)), -Box(Box(1216)), -Box(Box(1217)), -Box(Box(1218)), -Box(Box(1219)), -Box(Box(1220)), -Box(Box(1221)), -Box(Box(1222)), -Box(Box(1223)), -Box(Box(1224)), -Box(Box(1225)), -Box(Box(1226)), -Box(Box(1227)), -Box(Box(1228)), -Box(Box(1229)), -Box(Box(1230)), -Box(Box(1231)), -Box(Box(1232)), -Box(Box(1233)), -Box(Box(1234)), -Box(Box(1235)), -Box(Box(1236)), -Box(Box(1237)), -Box(Box(1238)), -Box(Box(1239)), -Box(Box(1240)), -Box(Box(1241)), -Box(Box(1242)), -Box(Box(1243)), -Box(Box(1244)), -Box(Box(1245)), -Box(Box(1246)), -Box(Box(1247)), -Box(Box(1248)), -Box(Box(1249)), -Box(Box(1250)), -Box(Box(1251)), -Box(Box(1252)), -Box(Box(1253)), -Box(Box(1254)), -Box(Box(1255)), -Box(Box(1256)), -Box(Box(1257)), -Box(Box(1258)), -Box(Box(1259)), -Box(Box(1260)), -Box(Box(1261)), -Box(Box(1262)), -Box(Box(1263)), -Box(Box(1264)), -Box(Box(1265)), -Box(Box(1266)), -Box(Box(1267)), -Box(Box(1268)), -Box(Box(1269)), -Box(Box(1270)), -Box(Box(1271)), -Box(Box(1272)), -Box(Box(1273)), -Box(Box(1274)), -Box(Box(1275)), -Box(Box(1276)), -Box(Box(1277)), -Box(Box(1278)), -Box(Box(1279)), -Box(Box(1280)), -Box(Box(1281)), -Box(Box(1282)), -Box(Box(1283)), -Box(Box(1284)), -Box(Box(1285)), -Box(Box(1286)), -Box(Box(1287)), -Box(Box(1288)), -Box(Box(1289)), -Box(Box(1290)), -Box(Box(1291)), -Box(Box(1292)), -Box(Box(1293)), -Box(Box(1294)), -Box(Box(1295)), -Box(Box(1296)), -Box(Box(1297)), -Box(Box(1298)), -Box(Box(1299)), -Box(Box(1300)), -Box(Box(1301)), -Box(Box(1302)), -Box(Box(1303)), -Box(Box(1304)), -Box(Box(1305)), -Box(Box(1306)), -Box(Box(1307)), -Box(Box(1308)), -Box(Box(1309)), -Box(Box(1310)), -Box(Box(1311)), -Box(Box(1312)), -Box(Box(1313)), -Box(Box(1314)), -Box(Box(1315)), -Box(Box(1316)), -Box(Box(1317)), -Box(Box(1318)), -Box(Box(1319)), -Box(Box(1320)), -Box(Box(1321)), -Box(Box(1322)), -Box(Box(1323)), -Box(Box(1324)), -Box(Box(1325)), -Box(Box(1326)), -Box(Box(1327)), -Box(Box(1328)), -Box(Box(1329)), -Box(Box(1330)), -Box(Box(1331)), -Box(Box(1332)), -Box(Box(1333)), -Box(Box(1334)), -Box(Box(1335)), -Box(Box(1336)), -Box(Box(1337)), -Box(Box(1338)), -Box(Box(1339)), -Box(Box(1340)), -Box(Box(1341)), -Box(Box(1342)), -Box(Box(1343)), -Box(Box(1344)), -Box(Box(1345)), -Box(Box(1346)), -Box(Box(1347)), -Box(Box(1348)), -Box(Box(1349)), -Box(Box(1350)), -Box(Box(1351)), -Box(Box(1352)), -Box(Box(1353)), -Box(Box(1354)), -Box(Box(1355)), -Box(Box(1356)), -Box(Box(1357)), -Box(Box(1358)), -Box(Box(1359)), -Box(Box(1360)), -Box(Box(1361)), -Box(Box(1362)), -Box(Box(1363)), -Box(Box(1364)), -Box(Box(1365)), -Box(Box(1366)), -Box(Box(1367)), -Box(Box(1368)), -Box(Box(1369)), -Box(Box(1370)), -Box(Box(1371)), -Box(Box(1372)), -Box(Box(1373)), -Box(Box(1374)), -Box(Box(1375)), -Box(Box(1376)), -Box(Box(1377)), -Box(Box(1378)), -Box(Box(1379)), -Box(Box(1380)), -Box(Box(1381)), -Box(Box(1382)), -Box(Box(1383)), -Box(Box(1384)), -Box(Box(1385)), -Box(Box(1386)), -Box(Box(1387)), -Box(Box(1388)), -Box(Box(1389)), -Box(Box(1390)), -Box(Box(1391)), -Box(Box(1392)), -Box(Box(1393)), -Box(Box(1394)), -Box(Box(1395)), -Box(Box(1396)), -Box(Box(1397)), -Box(Box(1398)), -Box(Box(1399)), -Box(Box(1400)), -Box(Box(1401)), -Box(Box(1402)), -Box(Box(1403)), -Box(Box(1404)), -Box(Box(1405)), -Box(Box(1406)), -Box(Box(1407)), -Box(Box(1408)), -Box(Box(1409)), -Box(Box(1410)), -Box(Box(1411)), -Box(Box(1412)), -Box(Box(1413)), -Box(Box(1414)), -Box(Box(1415)), -Box(Box(1416)), -Box(Box(1417)), -Box(Box(1418)), -Box(Box(1419)), -Box(Box(1420)), -Box(Box(1421)), -Box(Box(1422)), -Box(Box(1423)), -Box(Box(1424)), -Box(Box(1425)), -Box(Box(1426)), -Box(Box(1427)), -Box(Box(1428)), -Box(Box(1429)), -Box(Box(1430)), -Box(Box(1431)), -Box(Box(1432)), -Box(Box(1433)), -Box(Box(1434)), -Box(Box(1435)), -Box(Box(1436)), -Box(Box(1437)), -Box(Box(1438)), -Box(Box(1439)), -Box(Box(1440)), -Box(Box(1441)), -Box(Box(1442)), -Box(Box(1443)), -Box(Box(1444)), -Box(Box(1445)), -Box(Box(1446)), -Box(Box(1447)), -Box(Box(1448)), -Box(Box(1449)), -Box(Box(1450)), -Box(Box(1451)), -Box(Box(1452)), -Box(Box(1453)), -Box(Box(1454)), -Box(Box(1455)), -Box(Box(1456)), -Box(Box(1457)), -Box(Box(1458)), -Box(Box(1459)), -Box(Box(1460)), -Box(Box(1461)), -Box(Box(1462)), -Box(Box(1463)), -Box(Box(1464)), -Box(Box(1465)), -Box(Box(1466)), -Box(Box(1467)), -Box(Box(1468)), -Box(Box(1469)), -Box(Box(1470)), -Box(Box(1471)), -Box(Box(1472)), -Box(Box(1473)), -Box(Box(1474)), -Box(Box(1475)), -Box(Box(1476)), -Box(Box(1477)), -Box(Box(1478)), -Box(Box(1479)), -Box(Box(1480)), -Box(Box(1481)), -Box(Box(1482)), -Box(Box(1483)), -Box(Box(1484)), -Box(Box(1485)), -Box(Box(1486)), -Box(Box(1487)), -Box(Box(1488)), -Box(Box(1489)), -Box(Box(1490)), -Box(Box(1491)), -Box(Box(1492)), -Box(Box(1493)), -Box(Box(1494)), -Box(Box(1495)), -Box(Box(1496)), -Box(Box(1497)), -Box(Box(1498)), -Box(Box(1499)), -Box(Box(1500)), -Box(Box(1501)), -Box(Box(1502)), -Box(Box(1503)), -Box(Box(1504)), -Box(Box(1505)), -Box(Box(1506)), -Box(Box(1507)), -Box(Box(1508)), -Box(Box(1509)), -Box(Box(1510)), -Box(Box(1511)), -Box(Box(1512)), -Box(Box(1513)), -Box(Box(1514)), -Box(Box(1515)), -Box(Box(1516)), -Box(Box(1517)), -Box(Box(1518)), -Box(Box(1519)), -Box(Box(1520)), -Box(Box(1521)), -Box(Box(1522)), -Box(Box(1523)), -Box(Box(1524)), -Box(Box(1525)), -Box(Box(1526)), -Box(Box(1527)), -Box(Box(1528)), -Box(Box(1529)), -Box(Box(1530)), -Box(Box(1531)), -Box(Box(1532)), -Box(Box(1533)), -Box(Box(1534)), -Box(Box(1535)), -Box(Box(1536)), -Box(Box(1537)), -Box(Box(1538)), -Box(Box(1539)), -Box(Box(1540)), -Box(Box(1541)), -Box(Box(1542)), -Box(Box(1543)), -Box(Box(1544)), -Box(Box(1545)), -Box(Box(1546)), -Box(Box(1547)), -Box(Box(1548)), -Box(Box(1549)), -Box(Box(1550)), -Box(Box(1551)), -Box(Box(1552)), -Box(Box(1553)), -Box(Box(1554)), -Box(Box(1555)), -Box(Box(1556)), -Box(Box(1557)), -Box(Box(1558)), -Box(Box(1559)), -Box(Box(1560)), -Box(Box(1561)), -Box(Box(1562)), -Box(Box(1563)), -Box(Box(1564)), -Box(Box(1565)), -Box(Box(1566)), -Box(Box(1567)), -Box(Box(1568)), -Box(Box(1569)), -Box(Box(1570)), -Box(Box(1571)), -Box(Box(1572)), -Box(Box(1573)), -Box(Box(1574)), -Box(Box(1575)), -Box(Box(1576)), -Box(Box(1577)), -Box(Box(1578)), -Box(Box(1579)), -Box(Box(1580)), -Box(Box(1581)), -Box(Box(1582)), -Box(Box(1583)), -Box(Box(1584)), -Box(Box(1585)), -Box(Box(1586)), -Box(Box(1587)), -Box(Box(1588)), -Box(Box(1589)), -Box(Box(1590)), -Box(Box(1591)), -Box(Box(1592)), -Box(Box(1593)), -Box(Box(1594)), -Box(Box(1595)), -Box(Box(1596)), -Box(Box(1597)), -Box(Box(1598)), -Box(Box(1599)), -Box(Box(1600)), -Box(Box(1601)), -Box(Box(1602)), -Box(Box(1603)), -Box(Box(1604)), -Box(Box(1605)), -Box(Box(1606)), -Box(Box(1607)), -Box(Box(1608)), -Box(Box(1609)), -Box(Box(1610)), -Box(Box(1611)), -Box(Box(1612)), -Box(Box(1613)), -Box(Box(1614)), -Box(Box(1615)), -Box(Box(1616)), -Box(Box(1617)), -Box(Box(1618)), -Box(Box(1619)), -Box(Box(1620)), -Box(Box(1621)), -Box(Box(1622)), -Box(Box(1623)), -Box(Box(1624)), -Box(Box(1625)), -Box(Box(1626)), -Box(Box(1627)), -Box(Box(1628)), -Box(Box(1629)), -Box(Box(1630)), -Box(Box(1631)), -Box(Box(1632)), -Box(Box(1633)), -Box(Box(1634)), -Box(Box(1635)), -Box(Box(1636)), -Box(Box(1637)), -Box(Box(1638)), -Box(Box(1639)), -Box(Box(1640)), -Box(Box(1641)), -Box(Box(1642)), -Box(Box(1643)), -Box(Box(1644)), -Box(Box(1645)), -Box(Box(1646)), -Box(Box(1647)), -Box(Box(1648)), -Box(Box(1649)), -Box(Box(1650)), -Box(Box(1651)), -Box(Box(1652)), -Box(Box(1653)), -Box(Box(1654)), -Box(Box(1655)), -Box(Box(1656)), -Box(Box(1657)), -Box(Box(1658)), -Box(Box(1659)), -Box(Box(1660)), -Box(Box(1661)), -Box(Box(1662)), -Box(Box(1663)), -Box(Box(1664)), -Box(Box(1665)), -Box(Box(1666)), -Box(Box(1667)), -Box(Box(1668)), -Box(Box(1669)), -Box(Box(1670)), -Box(Box(1671)), -Box(Box(1672)), -Box(Box(1673)), -Box(Box(1674)), -Box(Box(1675)), -Box(Box(1676)), -Box(Box(1677)), -Box(Box(1678)), -Box(Box(1679)), -Box(Box(1680)), -Box(Box(1681)), -Box(Box(1682)), -Box(Box(1683)), -Box(Box(1684)), -Box(Box(1685)), -Box(Box(1686)), -Box(Box(1687)), -Box(Box(1688)), -Box(Box(1689)), -Box(Box(1690)), -Box(Box(1691)), -Box(Box(1692)), -Box(Box(1693)), -Box(Box(1694)), -Box(Box(1695)), -Box(Box(1696)), -Box(Box(1697)), -Box(Box(1698)), -Box(Box(1699)), -Box(Box(1700)), -Box(Box(1701)), -Box(Box(1702)), -Box(Box(1703)), -Box(Box(1704)), -Box(Box(1705)), -Box(Box(1706)), -Box(Box(1707)), -Box(Box(1708)), -Box(Box(1709)), -Box(Box(1710)), -Box(Box(1711)), -Box(Box(1712)), -Box(Box(1713)), -Box(Box(1714)), -Box(Box(1715)), -Box(Box(1716)), -Box(Box(1717)), -Box(Box(1718)), -Box(Box(1719)), -Box(Box(1720)), -Box(Box(1721)), -Box(Box(1722)), -Box(Box(1723)), -Box(Box(1724)), -Box(Box(1725)), -Box(Box(1726)), -Box(Box(1727)), -Box(Box(1728)), -Box(Box(1729)), -Box(Box(1730)), -Box(Box(1731)), -Box(Box(1732)), -Box(Box(1733)), -Box(Box(1734)), -Box(Box(1735)), -Box(Box(1736)), -Box(Box(1737)), -Box(Box(1738)), -Box(Box(1739)), -Box(Box(1740)), -Box(Box(1741)), -Box(Box(1742)), -Box(Box(1743)), -Box(Box(1744)), -Box(Box(1745)), -Box(Box(1746)), -Box(Box(1747)), -Box(Box(1748)), -Box(Box(1749)), -Box(Box(1750)), -Box(Box(1751)), -Box(Box(1752)), -Box(Box(1753)), -Box(Box(1754)), -Box(Box(1755)), -Box(Box(1756)), -Box(Box(1757)), -Box(Box(1758)), -Box(Box(1759)), -Box(Box(1760)), -Box(Box(1761)), -Box(Box(1762)), -Box(Box(1763)), -Box(Box(1764)), -Box(Box(1765)), -Box(Box(1766)), -Box(Box(1767)), -Box(Box(1768)), -Box(Box(1769)), -Box(Box(1770)), -Box(Box(1771)), -Box(Box(1772)), -Box(Box(1773)), -Box(Box(1774)), -Box(Box(1775)), -Box(Box(1776)), -Box(Box(1777)), -Box(Box(1778)), -Box(Box(1779)), -Box(Box(1780)), -Box(Box(1781)), -Box(Box(1782)), -Box(Box(1783)), -Box(Box(1784)), -Box(Box(1785)), -Box(Box(1786)), -Box(Box(1787)), -Box(Box(1788)), -Box(Box(1789)), -Box(Box(1790)), -Box(Box(1791)), -Box(Box(1792)), -Box(Box(1793)), -Box(Box(1794)), -Box(Box(1795)), -Box(Box(1796)), -Box(Box(1797)), -Box(Box(1798)), -Box(Box(1799)), -Box(Box(1800)), -Box(Box(1801)), -Box(Box(1802)), -Box(Box(1803)), -Box(Box(1804)), -Box(Box(1805)), -Box(Box(1806)), -Box(Box(1807)), -Box(Box(1808)), -Box(Box(1809)), -Box(Box(1810)), -Box(Box(1811)), -Box(Box(1812)), -Box(Box(1813)), -Box(Box(1814)), -Box(Box(1815)), -Box(Box(1816)), -Box(Box(1817)), -Box(Box(1818)), -Box(Box(1819)), -Box(Box(1820)), -Box(Box(1821)), -Box(Box(1822)), -Box(Box(1823)), -Box(Box(1824)), -Box(Box(1825)), -Box(Box(1826)), -Box(Box(1827)), -Box(Box(1828)), -Box(Box(1829)), -Box(Box(1830)), -Box(Box(1831)), -Box(Box(1832)), -Box(Box(1833)), -Box(Box(1834)), -Box(Box(1835)), -Box(Box(1836)), -Box(Box(1837)), -Box(Box(1838)), -Box(Box(1839)), -Box(Box(1840)), -Box(Box(1841)), -Box(Box(1842)), -Box(Box(1843)), -Box(Box(1844)), -Box(Box(1845)), -Box(Box(1846)), -Box(Box(1847)), -Box(Box(1848)), -Box(Box(1849)), -Box(Box(1850)), -Box(Box(1851)), -Box(Box(1852)), -Box(Box(1853)), -Box(Box(1854)), -Box(Box(1855)), -Box(Box(1856)), -Box(Box(1857)), -Box(Box(1858)), -Box(Box(1859)), -Box(Box(1860)), -Box(Box(1861)), -Box(Box(1862)), -Box(Box(1863)), -Box(Box(1864)), -Box(Box(1865)), -Box(Box(1866)), -Box(Box(1867)), -Box(Box(1868)), -Box(Box(1869)), -Box(Box(1870)), -Box(Box(1871)), -Box(Box(1872)), -Box(Box(1873)), -Box(Box(1874)), -Box(Box(1875)), -Box(Box(1876)), -Box(Box(1877)), -Box(Box(1878)), -Box(Box(1879)), -Box(Box(1880)), -Box(Box(1881)), -Box(Box(1882)), -Box(Box(1883)), -Box(Box(1884)), -Box(Box(1885)), -Box(Box(1886)), -Box(Box(1887)), -Box(Box(1888)), -Box(Box(1889)), -Box(Box(1890)), -Box(Box(1891)), -Box(Box(1892)), -Box(Box(1893)), -Box(Box(1894)), -Box(Box(1895)), -Box(Box(1896)), -Box(Box(1897)), -Box(Box(1898)), -Box(Box(1899)), -Box(Box(1900)), -Box(Box(1901)), -Box(Box(1902)), -Box(Box(1903)), -Box(Box(1904)), -Box(Box(1905)), -Box(Box(1906)), -Box(Box(1907)), -Box(Box(1908)), -Box(Box(1909)), -Box(Box(1910)), -Box(Box(1911)), -Box(Box(1912)), -Box(Box(1913)), -Box(Box(1914)), -Box(Box(1915)), -Box(Box(1916)), -Box(Box(1917)), -Box(Box(1918)), -Box(Box(1919)), -Box(Box(1920)), -Box(Box(1921)), -Box(Box(1922)), -Box(Box(1923)), -Box(Box(1924)), -Box(Box(1925)), -Box(Box(1926)), -Box(Box(1927)), -Box(Box(1928)), -Box(Box(1929)), -Box(Box(1930)), -Box(Box(1931)), -Box(Box(1932)), -Box(Box(1933)), -Box(Box(1934)), -Box(Box(1935)), -Box(Box(1936)), -Box(Box(1937)), -Box(Box(1938)), -Box(Box(1939)), -Box(Box(1940)), -Box(Box(1941)), -Box(Box(1942)), -Box(Box(1943)), -Box(Box(1944)), -Box(Box(1945)), -Box(Box(1946)), -Box(Box(1947)), -Box(Box(1948)), -Box(Box(1949)), -Box(Box(1950)), -Box(Box(1951)), -Box(Box(1952)), -Box(Box(1953)), -Box(Box(1954)), -Box(Box(1955)), -Box(Box(1956)), -Box(Box(1957)), -Box(Box(1958)), -Box(Box(1959)), -Box(Box(1960)), -Box(Box(1961)), -Box(Box(1962)), -Box(Box(1963)), -Box(Box(1964)), -Box(Box(1965)), -Box(Box(1966)), -Box(Box(1967)), -Box(Box(1968)), -Box(Box(1969)), -Box(Box(1970)), -Box(Box(1971)), -Box(Box(1972)), -Box(Box(1973)), -Box(Box(1974)), -Box(Box(1975)), -Box(Box(1976)), -Box(Box(1977)), -Box(Box(1978)), -Box(Box(1979)), -Box(Box(1980)), -Box(Box(1981)), -Box(Box(1982)), -Box(Box(1983)), -Box(Box(1984)), -Box(Box(1985)), -Box(Box(1986)), -Box(Box(1987)), -Box(Box(1988)), -Box(Box(1989)), -Box(Box(1990)), -Box(Box(1991)), -Box(Box(1992)), -Box(Box(1993)), -Box(Box(1994)), -Box(Box(1995)), -Box(Box(1996)), -Box(Box(1997)), -Box(Box(1998)), -Box(Box(1999)), -Box(Box(2000)), -Box(Box(2001)), -Box(Box(2002)), -Box(Box(2003)), -Box(Box(2004)), -Box(Box(2005)), -Box(Box(2006)), -Box(Box(2007)), -Box(Box(2008)), -Box(Box(2009)), -Box(Box(2010)), -Box(Box(2011)), -Box(Box(2012)), -Box(Box(2013)), -Box(Box(2014)), -Box(Box(2015)), -Box(Box(2016)), -Box(Box(2017)), -Box(Box(2018)), -Box(Box(2019)), -Box(Box(2020)), -Box(Box(2021)), -Box(Box(2022)), -Box(Box(2023)), -Box(Box(2024)), -Box(Box(2025)), -Box(Box(2026)), -Box(Box(2027)), -Box(Box(2028)), -Box(Box(2029)), -Box(Box(2030)), -Box(Box(2031)), -Box(Box(2032)), -Box(Box(2033)), -Box(Box(2034)), -Box(Box(2035)), -Box(Box(2036)), -Box(Box(2037)), -Box(Box(2038)), -Box(Box(2039)), -Box(Box(2040)), -Box(Box(2041)), -Box(Box(2042)), -Box(Box(2043)), -Box(Box(2044)), -Box(Box(2045)), -Box(Box(2046)), -Box(Box(2047)), -Box(Box(2048)), -Box(Box(2049)), -Box(Box(2050)), -Box(Box(2051)), -Box(Box(2052)), -Box(Box(2053)), -Box(Box(2054)), -Box(Box(2055)), -Box(Box(2056)), -Box(Box(2057)), -Box(Box(2058)), -Box(Box(2059)), -Box(Box(2060)), -Box(Box(2061)), -Box(Box(2062)), -Box(Box(2063)), -Box(Box(2064)), -Box(Box(2065)), -Box(Box(2066)), -Box(Box(2067)), -Box(Box(2068)), -Box(Box(2069)), -Box(Box(2070)), -Box(Box(2071)), -Box(Box(2072)), -Box(Box(2073)), -Box(Box(2074)), -Box(Box(2075)), -Box(Box(2076)), -Box(Box(2077)), -Box(Box(2078)), -Box(Box(2079)), -Box(Box(2080)), -Box(Box(2081)), -Box(Box(2082)), -Box(Box(2083)), -Box(Box(2084)), -Box(Box(2085)), -Box(Box(2086)), -Box(Box(2087)), -Box(Box(2088)), -Box(Box(2089)), -Box(Box(2090)), -Box(Box(2091)), -Box(Box(2092)), -Box(Box(2093)), -Box(Box(2094)), -Box(Box(2095)), -Box(Box(2096)), -Box(Box(2097)), -Box(Box(2098)), -Box(Box(2099)), -Box(Box(2100)), -Box(Box(2101)), -Box(Box(2102)), -Box(Box(2103)), -Box(Box(2104)), -Box(Box(2105)), -Box(Box(2106)), -Box(Box(2107)), -Box(Box(2108)), -Box(Box(2109)), -Box(Box(2110)), -Box(Box(2111)), -Box(Box(2112)), -Box(Box(2113)), -Box(Box(2114)), -Box(Box(2115)), -Box(Box(2116)), -Box(Box(2117)), -Box(Box(2118)), -Box(Box(2119)), -Box(Box(2120)), -Box(Box(2121)), -Box(Box(2122)), -Box(Box(2123)), -Box(Box(2124)), -Box(Box(2125)), -Box(Box(2126)), -Box(Box(2127)), -Box(Box(2128)), -Box(Box(2129)), -Box(Box(2130)), -Box(Box(2131)), -Box(Box(2132)), -Box(Box(2133)), -Box(Box(2134)), -Box(Box(2135)), -Box(Box(2136)), -Box(Box(2137)), -Box(Box(2138)), -Box(Box(2139)), -Box(Box(2140)), -Box(Box(2141)), -Box(Box(2142)), -Box(Box(2143)), -Box(Box(2144)), -Box(Box(2145)), -Box(Box(2146)), -Box(Box(2147)), -Box(Box(2148)), -Box(Box(2149)), -Box(Box(2150)), -Box(Box(2151)), -Box(Box(2152)), -Box(Box(2153)), -Box(Box(2154)), -Box(Box(2155)), -Box(Box(2156)), -Box(Box(2157)), -Box(Box(2158)), -Box(Box(2159)), -Box(Box(2160)), -Box(Box(2161)), -Box(Box(2162)), -Box(Box(2163)), -Box(Box(2164)), -Box(Box(2165)), -Box(Box(2166)), -Box(Box(2167)), -Box(Box(2168)), -Box(Box(2169)), -Box(Box(2170)), -Box(Box(2171)), -Box(Box(2172)), -Box(Box(2173)), -Box(Box(2174)), -Box(Box(2175)), -Box(Box(2176)), -Box(Box(2177)), -Box(Box(2178)), -Box(Box(2179)), -Box(Box(2180)), -Box(Box(2181)), -Box(Box(2182)), -Box(Box(2183)), -Box(Box(2184)), -Box(Box(2185)), -Box(Box(2186)), -Box(Box(2187)), -Box(Box(2188)), -Box(Box(2189)), -Box(Box(2190)), -Box(Box(2191)), -Box(Box(2192)), -Box(Box(2193)), -Box(Box(2194)), -Box(Box(2195)), -Box(Box(2196)), -Box(Box(2197)), -Box(Box(2198)), -Box(Box(2199)), -Box(Box(2200)), -Box(Box(2201)), -Box(Box(2202)), -Box(Box(2203)), -Box(Box(2204)), -Box(Box(2205)), -Box(Box(2206)), -Box(Box(2207)), -Box(Box(2208)), -Box(Box(2209)), -Box(Box(2210)), -Box(Box(2211)), -Box(Box(2212)), -Box(Box(2213)), -Box(Box(2214)), -Box(Box(2215)), -Box(Box(2216)), -Box(Box(2217)), -Box(Box(2218)), -Box(Box(2219)), -Box(Box(2220)), -Box(Box(2221)), -Box(Box(2222)), -Box(Box(2223)), -Box(Box(2224)), -Box(Box(2225)), -Box(Box(2226)), -Box(Box(2227)), -Box(Box(2228)), -Box(Box(2229)), -Box(Box(2230)), -Box(Box(2231)), -Box(Box(2232)), -Box(Box(2233)), -Box(Box(2234)), -Box(Box(2235)), -Box(Box(2236)), -Box(Box(2237)), -Box(Box(2238)), -Box(Box(2239)), -Box(Box(2240)), -Box(Box(2241)), -Box(Box(2242)), -Box(Box(2243)), -Box(Box(2244)), -Box(Box(2245)), -Box(Box(2246)), -Box(Box(2247)), -Box(Box(2248)), -Box(Box(2249)), -Box(Box(2250)), -Box(Box(2251)), -Box(Box(2252)), -Box(Box(2253)), -Box(Box(2254)), -Box(Box(2255)), -Box(Box(2256)), -Box(Box(2257)), -Box(Box(2258)), -Box(Box(2259)), -Box(Box(2260)), -Box(Box(2261)), -Box(Box(2262)), -Box(Box(2263)), -Box(Box(2264)), -Box(Box(2265)), -Box(Box(2266)), -Box(Box(2267)), -Box(Box(2268)), -Box(Box(2269)), -Box(Box(2270)), -Box(Box(2271)), -Box(Box(2272)), -Box(Box(2273)), -Box(Box(2274)), -Box(Box(2275)), -Box(Box(2276)), -Box(Box(2277)), -Box(Box(2278)), -Box(Box(2279)), -Box(Box(2280)), -Box(Box(2281)), -Box(Box(2282)), -Box(Box(2283)), -Box(Box(2284)), -Box(Box(2285)), -Box(Box(2286)), -Box(Box(2287)), -Box(Box(2288)), -Box(Box(2289)), -Box(Box(2290)), -Box(Box(2291)), -Box(Box(2292)), -Box(Box(2293)), -Box(Box(2294)), -Box(Box(2295)), -Box(Box(2296)), -Box(Box(2297)), -Box(Box(2298)), -Box(Box(2299)), -Box(Box(2300)), -Box(Box(2301)), -Box(Box(2302)), -Box(Box(2303)), -Box(Box(2304)), -Box(Box(2305)), -Box(Box(2306)), -Box(Box(2307)), -Box(Box(2308)), -Box(Box(2309)), -Box(Box(2310)), -Box(Box(2311)), -Box(Box(2312)), -Box(Box(2313)), -Box(Box(2314)), -Box(Box(2315)), -Box(Box(2316)), -Box(Box(2317)), -Box(Box(2318)), -Box(Box(2319)), -Box(Box(2320)), -Box(Box(2321)), -Box(Box(2322)), -Box(Box(2323)), -Box(Box(2324)), -Box(Box(2325)), -Box(Box(2326)), -Box(Box(2327)), -Box(Box(2328)), -Box(Box(2329)), -Box(Box(2330)), -Box(Box(2331)), -Box(Box(2332)), -Box(Box(2333)), -Box(Box(2334)), -Box(Box(2335)), -Box(Box(2336)), -Box(Box(2337)), -Box(Box(2338)), -Box(Box(2339)), -Box(Box(2340)), -Box(Box(2341)), -Box(Box(2342)), -Box(Box(2343)), -Box(Box(2344)), -Box(Box(2345)), -Box(Box(2346)), -Box(Box(2347)), -Box(Box(2348)), -Box(Box(2349)), -Box(Box(2350)), -Box(Box(2351)), -Box(Box(2352)), -Box(Box(2353)), -Box(Box(2354)), -Box(Box(2355)), -Box(Box(2356)), -Box(Box(2357)), -Box(Box(2358)), -Box(Box(2359)), -Box(Box(2360)), -Box(Box(2361)), -Box(Box(2362)), -Box(Box(2363)), -Box(Box(2364)), -Box(Box(2365)), -Box(Box(2366)), -Box(Box(2367)), -Box(Box(2368)), -Box(Box(2369)), -Box(Box(2370)), -Box(Box(2371)), -Box(Box(2372)), -Box(Box(2373)), -Box(Box(2374)), -Box(Box(2375)), -Box(Box(2376)), -Box(Box(2377)), -Box(Box(2378)), -Box(Box(2379)), -Box(Box(2380)), -Box(Box(2381)), -Box(Box(2382)), -Box(Box(2383)), -Box(Box(2384)), -Box(Box(2385)), -Box(Box(2386)), -Box(Box(2387)), -Box(Box(2388)), -Box(Box(2389)), -Box(Box(2390)), -Box(Box(2391)), -Box(Box(2392)), -Box(Box(2393)), -Box(Box(2394)), -Box(Box(2395)), -Box(Box(2396)), -Box(Box(2397)), -Box(Box(2398)), -Box(Box(2399)), -Box(Box(2400)), -Box(Box(2401)), -Box(Box(2402)), -Box(Box(2403)), -Box(Box(2404)), -Box(Box(2405)), -Box(Box(2406)), -Box(Box(2407)), -Box(Box(2408)), -Box(Box(2409)), -Box(Box(2410)), -Box(Box(2411)), -Box(Box(2412)), -Box(Box(2413)), -Box(Box(2414)), -Box(Box(2415)), -Box(Box(2416)), -Box(Box(2417)), -Box(Box(2418)), -Box(Box(2419)), -Box(Box(2420)), -Box(Box(2421)), -Box(Box(2422)), -Box(Box(2423)), -Box(Box(2424)), -Box(Box(2425)), -Box(Box(2426)), -Box(Box(2427)), -Box(Box(2428)), -Box(Box(2429)), -Box(Box(2430)), -Box(Box(2431)), -Box(Box(2432)), -Box(Box(2433)), -Box(Box(2434)), -Box(Box(2435)), -Box(Box(2436)), -Box(Box(2437)), -Box(Box(2438)), -Box(Box(2439)), -Box(Box(2440)), -Box(Box(2441)), -Box(Box(2442)), -Box(Box(2443)), -Box(Box(2444)), -Box(Box(2445)), -Box(Box(2446)), -Box(Box(2447)), -Box(Box(2448)), -Box(Box(2449)), -Box(Box(2450)), -Box(Box(2451)), -Box(Box(2452)), -Box(Box(2453)), -Box(Box(2454)), -Box(Box(2455)), -Box(Box(2456)), -Box(Box(2457)), -Box(Box(2458)), -Box(Box(2459)), -Box(Box(2460)), -Box(Box(2461)), -Box(Box(2462)), -Box(Box(2463)), -Box(Box(2464)), -Box(Box(2465)), -Box(Box(2466)), -Box(Box(2467)), -Box(Box(2468)), -Box(Box(2469)), -Box(Box(2470)), -Box(Box(2471)), -Box(Box(2472)), -Box(Box(2473)), -Box(Box(2474)), -Box(Box(2475)), -Box(Box(2476)), -Box(Box(2477)), -Box(Box(2478)), -Box(Box(2479)), -Box(Box(2480)), -Box(Box(2481)), -Box(Box(2482)), -Box(Box(2483)), -Box(Box(2484)), -Box(Box(2485)), -Box(Box(2486)), -Box(Box(2487)), -Box(Box(2488)), -Box(Box(2489)), -Box(Box(2490)), -Box(Box(2491)), -Box(Box(2492)), -Box(Box(2493)), -Box(Box(2494)), -Box(Box(2495)), -Box(Box(2496)), -Box(Box(2497)), -Box(Box(2498)), -Box(Box(2499)), -Box(Box(2500)), -Box(Box(2501)), -Box(Box(2502)), -Box(Box(2503)), -Box(Box(2504)), -Box(Box(2505)), -Box(Box(2506)), -Box(Box(2507)), -Box(Box(2508)), -Box(Box(2509)), -Box(Box(2510)), -Box(Box(2511)), -Box(Box(2512)), -Box(Box(2513)), -Box(Box(2514)), -Box(Box(2515)), -Box(Box(2516)), -Box(Box(2517)), -Box(Box(2518)), -Box(Box(2519)), -Box(Box(2520)), -Box(Box(2521)), -Box(Box(2522)), -Box(Box(2523)), -Box(Box(2524)), -Box(Box(2525)), -Box(Box(2526)), -Box(Box(2527)), -Box(Box(2528)), -Box(Box(2529)), -Box(Box(2530)), -Box(Box(2531)), -Box(Box(2532)), -Box(Box(2533)), -Box(Box(2534)), -Box(Box(2535)), -Box(Box(2536)), -Box(Box(2537)), -Box(Box(2538)), -Box(Box(2539)), -Box(Box(2540)), -Box(Box(2541)), -Box(Box(2542)), -Box(Box(2543)), -Box(Box(2544)), -Box(Box(2545)), -Box(Box(2546)), -Box(Box(2547)), -Box(Box(2548)), -Box(Box(2549)), -Box(Box(2550)), -Box(Box(2551)), -Box(Box(2552)), -Box(Box(2553)), -Box(Box(2554)), -Box(Box(2555)), -Box(Box(2556)), -Box(Box(2557)), -Box(Box(2558)), -Box(Box(2559)), -Box(Box(2560)), -Box(Box(2561)), -Box(Box(2562)), -Box(Box(2563)), -Box(Box(2564)), -Box(Box(2565)), -Box(Box(2566)), -Box(Box(2567)), -Box(Box(2568)), -Box(Box(2569)), -Box(Box(2570)), -Box(Box(2571)), -Box(Box(2572)), -Box(Box(2573)), -Box(Box(2574)), -Box(Box(2575)), -Box(Box(2576)), -Box(Box(2577)), -Box(Box(2578)), -Box(Box(2579)), -Box(Box(2580)), -Box(Box(2581)), -Box(Box(2582)), -Box(Box(2583)), -Box(Box(2584)), -Box(Box(2585)), -Box(Box(2586)), -Box(Box(2587)), -Box(Box(2588)), -Box(Box(2589)), -Box(Box(2590)), -Box(Box(2591)), -Box(Box(2592)), -Box(Box(2593)), -Box(Box(2594)), -Box(Box(2595)), -Box(Box(2596)), -Box(Box(2597)), -Box(Box(2598)), -Box(Box(2599)), -Box(Box(2600)), -Box(Box(2601)), -Box(Box(2602)), -Box(Box(2603)), -Box(Box(2604)), -Box(Box(2605)), -Box(Box(2606)), -Box(Box(2607)), -Box(Box(2608)), -Box(Box(2609)), -Box(Box(2610)), -Box(Box(2611)), -Box(Box(2612)), -Box(Box(2613)), -Box(Box(2614)), -Box(Box(2615)), -Box(Box(2616)), -Box(Box(2617)), -Box(Box(2618)), -Box(Box(2619)), -Box(Box(2620)), -Box(Box(2621)), -Box(Box(2622)), -Box(Box(2623)), -Box(Box(2624)), -Box(Box(2625)), -Box(Box(2626)), -Box(Box(2627)), -Box(Box(2628)), -Box(Box(2629)), -Box(Box(2630)), -Box(Box(2631)), -Box(Box(2632)), -Box(Box(2633)), -Box(Box(2634)), -Box(Box(2635)), -Box(Box(2636)), -Box(Box(2637)), -Box(Box(2638)), -Box(Box(2639)), -Box(Box(2640)), -Box(Box(2641)), -Box(Box(2642)), -Box(Box(2643)), -Box(Box(2644)), -Box(Box(2645)), -Box(Box(2646)), -Box(Box(2647)), -Box(Box(2648)), -Box(Box(2649)), -Box(Box(2650)), -Box(Box(2651)), -Box(Box(2652)), -Box(Box(2653)), -Box(Box(2654)), -Box(Box(2655)), -Box(Box(2656)), -Box(Box(2657)), -Box(Box(2658)), -Box(Box(2659)), -Box(Box(2660)), -Box(Box(2661)), -Box(Box(2662)), -Box(Box(2663)), -Box(Box(2664)), -Box(Box(2665)), -Box(Box(2666)), -Box(Box(2667)), -Box(Box(2668)), -Box(Box(2669)), -Box(Box(2670)), -Box(Box(2671)), -Box(Box(2672)), -Box(Box(2673)), -Box(Box(2674)), -Box(Box(2675)), -Box(Box(2676)), -Box(Box(2677)), -Box(Box(2678)), -Box(Box(2679)), -Box(Box(2680)), -Box(Box(2681)), -Box(Box(2682)), -Box(Box(2683)), -Box(Box(2684)), -Box(Box(2685)), -Box(Box(2686)), -Box(Box(2687)), -Box(Box(2688)), -Box(Box(2689)), -Box(Box(2690)), -Box(Box(2691)), -Box(Box(2692)), -Box(Box(2693)), -Box(Box(2694)), -Box(Box(2695)), -Box(Box(2696)), -Box(Box(2697)), -Box(Box(2698)), -Box(Box(2699)), -Box(Box(2700)), -Box(Box(2701)), -Box(Box(2702)), -Box(Box(2703)), -Box(Box(2704)), -Box(Box(2705)), -Box(Box(2706)), -Box(Box(2707)), -Box(Box(2708)), -Box(Box(2709)), -Box(Box(2710)), -Box(Box(2711)), -Box(Box(2712)), -Box(Box(2713)), -Box(Box(2714)), -Box(Box(2715)), -Box(Box(2716)), -Box(Box(2717)), -Box(Box(2718)), -Box(Box(2719)), -Box(Box(2720)), -Box(Box(2721)), -Box(Box(2722)), -Box(Box(2723)), -Box(Box(2724)), -Box(Box(2725)), -Box(Box(2726)), -Box(Box(2727)), -Box(Box(2728)), -Box(Box(2729)), -Box(Box(2730)), -Box(Box(2731)), -Box(Box(2732)), -Box(Box(2733)), -Box(Box(2734)), -Box(Box(2735)), -Box(Box(2736)), -Box(Box(2737)), -Box(Box(2738)), -Box(Box(2739)), -Box(Box(2740)), -Box(Box(2741)), -Box(Box(2742)), -Box(Box(2743)), -Box(Box(2744)), -Box(Box(2745)), -Box(Box(2746)), -Box(Box(2747)), -Box(Box(2748)), -Box(Box(2749)), -Box(Box(2750)), -Box(Box(2751)), -Box(Box(2752)), -Box(Box(2753)), -Box(Box(2754)), -Box(Box(2755)), -Box(Box(2756)), -Box(Box(2757)), -Box(Box(2758)), -Box(Box(2759)), -Box(Box(2760)), -Box(Box(2761)), -Box(Box(2762)), -Box(Box(2763)), -Box(Box(2764)), -Box(Box(2765)), -Box(Box(2766)), -Box(Box(2767)), -Box(Box(2768)), -Box(Box(2769)), -Box(Box(2770)), -Box(Box(2771)), -Box(Box(2772)), -Box(Box(2773)), -Box(Box(2774)), -Box(Box(2775)), -Box(Box(2776)), -Box(Box(2777)), -Box(Box(2778)), -Box(Box(2779)), -Box(Box(2780)), -Box(Box(2781)), -Box(Box(2782)), -Box(Box(2783)), -Box(Box(2784)), -Box(Box(2785)), -Box(Box(2786)), -Box(Box(2787)), -Box(Box(2788)), -Box(Box(2789)), -Box(Box(2790)), -Box(Box(2791)), -Box(Box(2792)), -Box(Box(2793)), -Box(Box(2794)), -Box(Box(2795)), -Box(Box(2796)), -Box(Box(2797)), -Box(Box(2798)), -Box(Box(2799)), -Box(Box(2800)), -Box(Box(2801)), -Box(Box(2802)), -Box(Box(2803)), -Box(Box(2804)), -Box(Box(2805)), -Box(Box(2806)), -Box(Box(2807)), -Box(Box(2808)), -Box(Box(2809)), -Box(Box(2810)), -Box(Box(2811)), -Box(Box(2812)), -Box(Box(2813)), -Box(Box(2814)), -Box(Box(2815)), -Box(Box(2816)), -Box(Box(2817)), -Box(Box(2818)), -Box(Box(2819)), -Box(Box(2820)), -Box(Box(2821)), -Box(Box(2822)), -Box(Box(2823)), -Box(Box(2824)), -Box(Box(2825)), -Box(Box(2826)), -Box(Box(2827)), -Box(Box(2828)), -Box(Box(2829)), -Box(Box(2830)), -Box(Box(2831)), -Box(Box(2832)), -Box(Box(2833)), -Box(Box(2834)), -Box(Box(2835)), -Box(Box(2836)), -Box(Box(2837)), -Box(Box(2838)), -Box(Box(2839)), -Box(Box(2840)), -Box(Box(2841)), -Box(Box(2842)), -Box(Box(2843)), -Box(Box(2844)), -Box(Box(2845)), -Box(Box(2846)), -Box(Box(2847)), -Box(Box(2848)), -Box(Box(2849)), -Box(Box(2850)), -Box(Box(2851)), -Box(Box(2852)), -Box(Box(2853)), -Box(Box(2854)), -Box(Box(2855)), -Box(Box(2856)), -Box(Box(2857)), -Box(Box(2858)), -Box(Box(2859)), -Box(Box(2860)), -Box(Box(2861)), -Box(Box(2862)), -Box(Box(2863)), -Box(Box(2864)), -Box(Box(2865)), -Box(Box(2866)), -Box(Box(2867)), -Box(Box(2868)), -Box(Box(2869)), -Box(Box(2870)), -Box(Box(2871)), -Box(Box(2872)), -Box(Box(2873)), -Box(Box(2874)), -Box(Box(2875)), -Box(Box(2876)), -Box(Box(2877)), -Box(Box(2878)), -Box(Box(2879)), -Box(Box(2880)), -Box(Box(2881)), -Box(Box(2882)), -Box(Box(2883)), -Box(Box(2884)), -Box(Box(2885)), -Box(Box(2886)), -Box(Box(2887)), -Box(Box(2888)), -Box(Box(2889)), -Box(Box(2890)), -Box(Box(2891)), -Box(Box(2892)), -Box(Box(2893)), -Box(Box(2894)), -Box(Box(2895)), -Box(Box(2896)), -Box(Box(2897)), -Box(Box(2898)), -Box(Box(2899)), -Box(Box(2900)), -Box(Box(2901)), -Box(Box(2902)), -Box(Box(2903)), -Box(Box(2904)), -Box(Box(2905)), -Box(Box(2906)), -Box(Box(2907)), -Box(Box(2908)), -Box(Box(2909)), -Box(Box(2910)), -Box(Box(2911)), -Box(Box(2912)), -Box(Box(2913)), -Box(Box(2914)), -Box(Box(2915)), -Box(Box(2916)), -Box(Box(2917)), -Box(Box(2918)), -Box(Box(2919)), -Box(Box(2920)), -Box(Box(2921)), -Box(Box(2922)), -Box(Box(2923)), -Box(Box(2924)), -Box(Box(2925)), -Box(Box(2926)), -Box(Box(2927)), -Box(Box(2928)), -Box(Box(2929)), -Box(Box(2930)), -Box(Box(2931)), -Box(Box(2932)), -Box(Box(2933)), -Box(Box(2934)), -Box(Box(2935)), -Box(Box(2936)), -Box(Box(2937)), -Box(Box(2938)), -Box(Box(2939)), -Box(Box(2940)), -Box(Box(2941)), -Box(Box(2942)), -Box(Box(2943)), -Box(Box(2944)), -Box(Box(2945)), -Box(Box(2946)), -Box(Box(2947)), -Box(Box(2948)), -Box(Box(2949)), -Box(Box(2950)), -Box(Box(2951)), -Box(Box(2952)), -Box(Box(2953)), -Box(Box(2954)), -Box(Box(2955)), -Box(Box(2956)), -Box(Box(2957)), -Box(Box(2958)), -Box(Box(2959)), -Box(Box(2960)), -Box(Box(2961)), -Box(Box(2962)), -Box(Box(2963)), -Box(Box(2964)), -Box(Box(2965)), -Box(Box(2966)), -Box(Box(2967)), -Box(Box(2968)), -Box(Box(2969)), -Box(Box(2970)), -Box(Box(2971)), -Box(Box(2972)), -Box(Box(2973)), -Box(Box(2974)), -Box(Box(2975)), -Box(Box(2976)), -Box(Box(2977)), -Box(Box(2978)), -Box(Box(2979)), -Box(Box(2980)), -Box(Box(2981)), -Box(Box(2982)), -Box(Box(2983)), -Box(Box(2984)), -Box(Box(2985)), -Box(Box(2986)), -Box(Box(2987)), -Box(Box(2988)), -Box(Box(2989)), -Box(Box(2990)), -Box(Box(2991)), -Box(Box(2992)), -Box(Box(2993)), -Box(Box(2994)), -Box(Box(2995)), -Box(Box(2996)), -Box(Box(2997)), -Box(Box(2998)), -Box(Box(2999)), -Box(Box(3000)), -Box(Box(3001)), -Box(Box(3002)), -Box(Box(3003)), -Box(Box(3004)), -Box(Box(3005)), -Box(Box(3006)), -Box(Box(3007)), -Box(Box(3008)), -Box(Box(3009)), -Box(Box(3010)), -Box(Box(3011)), -Box(Box(3012)), -Box(Box(3013)), -Box(Box(3014)), -Box(Box(3015)), -Box(Box(3016)), -Box(Box(3017)), -Box(Box(3018)), -Box(Box(3019)), -Box(Box(3020)), -Box(Box(3021)), -Box(Box(3022)), -Box(Box(3023)), -Box(Box(3024)), -Box(Box(3025)), -Box(Box(3026)), -Box(Box(3027)), -Box(Box(3028)), -Box(Box(3029)), -Box(Box(3030)), -Box(Box(3031)), -Box(Box(3032)), -Box(Box(3033)), -Box(Box(3034)), -Box(Box(3035)), -Box(Box(3036)), -Box(Box(3037)), -Box(Box(3038)), -Box(Box(3039)), -Box(Box(3040)), -Box(Box(3041)), -Box(Box(3042)), -Box(Box(3043)), -Box(Box(3044)), -Box(Box(3045)), -Box(Box(3046)), -Box(Box(3047)), -Box(Box(3048)), -Box(Box(3049)), -Box(Box(3050)), -Box(Box(3051)), -Box(Box(3052)), -Box(Box(3053)), -Box(Box(3054)), -Box(Box(3055)), -Box(Box(3056)), -Box(Box(3057)), -Box(Box(3058)), -Box(Box(3059)), -Box(Box(3060)), -Box(Box(3061)), -Box(Box(3062)), -Box(Box(3063)), -Box(Box(3064)), -Box(Box(3065)), -Box(Box(3066)), -Box(Box(3067)), -Box(Box(3068)), -Box(Box(3069)), -Box(Box(3070)), -Box(Box(3071)), -Box(Box(3072)), -Box(Box(3073)), -Box(Box(3074)), -Box(Box(3075)), -Box(Box(3076)), -Box(Box(3077)), -Box(Box(3078)), -Box(Box(3079)), -Box(Box(3080)), -Box(Box(3081)), -Box(Box(3082)), -Box(Box(3083)), -Box(Box(3084)), -Box(Box(3085)), -Box(Box(3086)), -Box(Box(3087)), -Box(Box(3088)), -Box(Box(3089)), -Box(Box(3090)), -Box(Box(3091)), -Box(Box(3092)), -Box(Box(3093)), -Box(Box(3094)), -Box(Box(3095)), -Box(Box(3096)), -Box(Box(3097)), -Box(Box(3098)), -Box(Box(3099)), -Box(Box(3100)), -Box(Box(3101)), -Box(Box(3102)), -Box(Box(3103)), -Box(Box(3104)), -Box(Box(3105)), -Box(Box(3106)), -Box(Box(3107)), -Box(Box(3108)), -Box(Box(3109)), -Box(Box(3110)), -Box(Box(3111)), -Box(Box(3112)), -Box(Box(3113)), -Box(Box(3114)), -Box(Box(3115)), -Box(Box(3116)), -Box(Box(3117)), -Box(Box(3118)), -Box(Box(3119)), -Box(Box(3120)), -Box(Box(3121)), -Box(Box(3122)), -Box(Box(3123)), -Box(Box(3124)), -Box(Box(3125)), -Box(Box(3126)), -Box(Box(3127)), -Box(Box(3128)), -Box(Box(3129)), -Box(Box(3130)), -Box(Box(3131)), -Box(Box(3132)), -Box(Box(3133)), -Box(Box(3134)), -Box(Box(3135)), -Box(Box(3136)), -Box(Box(3137)), -Box(Box(3138)), -Box(Box(3139)), -Box(Box(3140)), -Box(Box(3141)), -Box(Box(3142)), -Box(Box(3143)), -Box(Box(3144)), -Box(Box(3145)), -Box(Box(3146)), -Box(Box(3147)), -Box(Box(3148)), -Box(Box(3149)), -Box(Box(3150)), -Box(Box(3151)), -Box(Box(3152)), -Box(Box(3153)), -Box(Box(3154)), -Box(Box(3155)), -Box(Box(3156)), -Box(Box(3157)), -Box(Box(3158)), -Box(Box(3159)), -Box(Box(3160)), -Box(Box(3161)), -Box(Box(3162)), -Box(Box(3163)), -Box(Box(3164)), -Box(Box(3165)), -Box(Box(3166)), -Box(Box(3167)), -Box(Box(3168)), -Box(Box(3169)), -Box(Box(3170)), -Box(Box(3171)), -Box(Box(3172)), -Box(Box(3173)), -Box(Box(3174)), -Box(Box(3175)), -Box(Box(3176)), -Box(Box(3177)), -Box(Box(3178)), -Box(Box(3179)), -Box(Box(3180)), -Box(Box(3181)), -Box(Box(3182)), -Box(Box(3183)), -Box(Box(3184)), -Box(Box(3185)), -Box(Box(3186)), -Box(Box(3187)), -Box(Box(3188)), -Box(Box(3189)), -Box(Box(3190)), -Box(Box(3191)), -Box(Box(3192)), -Box(Box(3193)), -Box(Box(3194)), -Box(Box(3195)), -Box(Box(3196)), -Box(Box(3197)), -Box(Box(3198)), -Box(Box(3199)), -Box(Box(3200)), -Box(Box(3201)), -Box(Box(3202)), -Box(Box(3203)), -Box(Box(3204)), -Box(Box(3205)), -Box(Box(3206)), -Box(Box(3207)), -Box(Box(3208)), -Box(Box(3209)), -Box(Box(3210)), -Box(Box(3211)), -Box(Box(3212)), -Box(Box(3213)), -Box(Box(3214)), -Box(Box(3215)), -Box(Box(3216)), -Box(Box(3217)), -Box(Box(3218)), -Box(Box(3219)), -Box(Box(3220)), -Box(Box(3221)), -Box(Box(3222)), -Box(Box(3223)), -Box(Box(3224)), -Box(Box(3225)), -Box(Box(3226)), -Box(Box(3227)), -Box(Box(3228)), -Box(Box(3229)), -Box(Box(3230)), -Box(Box(3231)), -Box(Box(3232)), -Box(Box(3233)), -Box(Box(3234)), -Box(Box(3235)), -Box(Box(3236)), -Box(Box(3237)), -Box(Box(3238)), -Box(Box(3239)), -Box(Box(3240)), -Box(Box(3241)), -Box(Box(3242)), -Box(Box(3243)), -Box(Box(3244)), -Box(Box(3245)), -Box(Box(3246)), -Box(Box(3247)), -Box(Box(3248)), -Box(Box(3249)), -Box(Box(3250)), -Box(Box(3251)), -Box(Box(3252)), -Box(Box(3253)), -Box(Box(3254)), -Box(Box(3255)), -Box(Box(3256)), -Box(Box(3257)), -Box(Box(3258)), -Box(Box(3259)), -Box(Box(3260)), -Box(Box(3261)), -Box(Box(3262)), -Box(Box(3263)), -Box(Box(3264)), -Box(Box(3265)), -Box(Box(3266)), -Box(Box(3267)), -Box(Box(3268)), -Box(Box(3269)), -Box(Box(3270)), -Box(Box(3271)), -Box(Box(3272)), -Box(Box(3273)), -Box(Box(3274)), -Box(Box(3275)), -Box(Box(3276)), -Box(Box(3277)), -Box(Box(3278)), -Box(Box(3279)), -Box(Box(3280)), -Box(Box(3281)), -Box(Box(3282)), -Box(Box(3283)), -Box(Box(3284)), -Box(Box(3285)), -Box(Box(3286)), -Box(Box(3287)), -Box(Box(3288)), -Box(Box(3289)), -Box(Box(3290)), -Box(Box(3291)), -Box(Box(3292)), -Box(Box(3293)), -Box(Box(3294)), -Box(Box(3295)), -Box(Box(3296)), -Box(Box(3297)), -Box(Box(3298)), -Box(Box(3299)), -Box(Box(3300)), -Box(Box(3301)), -Box(Box(3302)), -Box(Box(3303)), -Box(Box(3304)), -Box(Box(3305)), -Box(Box(3306)), -Box(Box(3307)), -Box(Box(3308)), -Box(Box(3309)), -Box(Box(3310)), -Box(Box(3311)), -Box(Box(3312)), -Box(Box(3313)), -Box(Box(3314)), -Box(Box(3315)), -Box(Box(3316)), -Box(Box(3317)), -Box(Box(3318)), -Box(Box(3319)), -Box(Box(3320)), -Box(Box(3321)), -Box(Box(3322)), -Box(Box(3323)), -Box(Box(3324)), -Box(Box(3325)), -Box(Box(3326)), -Box(Box(3327)), -Box(Box(3328)), -Box(Box(3329)), -Box(Box(3330)), -Box(Box(3331)), -Box(Box(3332)), -Box(Box(3333)), -Box(Box(3334)), -Box(Box(3335)), -Box(Box(3336)), -Box(Box(3337)), -Box(Box(3338)), -Box(Box(3339)), -Box(Box(3340)), -Box(Box(3341)), -Box(Box(3342)), -Box(Box(3343)), -Box(Box(3344)), -Box(Box(3345)), -Box(Box(3346)), -Box(Box(3347)), -Box(Box(3348)), -Box(Box(3349)), -Box(Box(3350)), -Box(Box(3351)), -Box(Box(3352)), -Box(Box(3353)), -Box(Box(3354)), -Box(Box(3355)), -Box(Box(3356)), -Box(Box(3357)), -Box(Box(3358)), -Box(Box(3359)), -Box(Box(3360)), -Box(Box(3361)), -Box(Box(3362)), -Box(Box(3363)), -Box(Box(3364)), -Box(Box(3365)), -Box(Box(3366)), -Box(Box(3367)), -Box(Box(3368)), -Box(Box(3369)), -Box(Box(3370)), -Box(Box(3371)), -Box(Box(3372)), -Box(Box(3373)), -Box(Box(3374)), -Box(Box(3375)), -Box(Box(3376)), -Box(Box(3377)), -Box(Box(3378)), -Box(Box(3379)), -Box(Box(3380)), -Box(Box(3381)), -Box(Box(3382)), -Box(Box(3383)), -Box(Box(3384)), -Box(Box(3385)), -Box(Box(3386)), -Box(Box(3387)), -Box(Box(3388)), -Box(Box(3389)), -Box(Box(3390)), -Box(Box(3391)), -Box(Box(3392)), -Box(Box(3393)), -Box(Box(3394)), -Box(Box(3395)), -Box(Box(3396)), -Box(Box(3397)), -Box(Box(3398)), -Box(Box(3399)), -Box(Box(3400)), -Box(Box(3401)), -Box(Box(3402)), -Box(Box(3403)), -Box(Box(3404)), -Box(Box(3405)), -Box(Box(3406)), -Box(Box(3407)), -Box(Box(3408)), -Box(Box(3409)), -Box(Box(3410)), -Box(Box(3411)), -Box(Box(3412)), -Box(Box(3413)), -Box(Box(3414)), -Box(Box(3415)), -Box(Box(3416)), -Box(Box(3417)), -Box(Box(3418)), -Box(Box(3419)), -Box(Box(3420)), -Box(Box(3421)), -Box(Box(3422)), -Box(Box(3423)), -Box(Box(3424)), -Box(Box(3425)), -Box(Box(3426)), -Box(Box(3427)), -Box(Box(3428)), -Box(Box(3429)), -Box(Box(3430)), -Box(Box(3431)), -Box(Box(3432)), -Box(Box(3433)), -Box(Box(3434)), -Box(Box(3435)), -Box(Box(3436)), -Box(Box(3437)), -Box(Box(3438)), -Box(Box(3439)), -Box(Box(3440)), -Box(Box(3441)), -Box(Box(3442)), -Box(Box(3443)), -Box(Box(3444)), -Box(Box(3445)), -Box(Box(3446)), -Box(Box(3447)), -Box(Box(3448)), -Box(Box(3449)), -Box(Box(3450)), -Box(Box(3451)), -Box(Box(3452)), -Box(Box(3453)), -Box(Box(3454)), -Box(Box(3455)), -Box(Box(3456)), -Box(Box(3457)), -Box(Box(3458)), -Box(Box(3459)), -Box(Box(3460)), -Box(Box(3461)), -Box(Box(3462)), -Box(Box(3463)), -Box(Box(3464)), -Box(Box(3465)), -Box(Box(3466)), -Box(Box(3467)), -Box(Box(3468)), -Box(Box(3469)), -Box(Box(3470)), -Box(Box(3471)), -Box(Box(3472)), -Box(Box(3473)), -Box(Box(3474)), -Box(Box(3475)), -Box(Box(3476)), -Box(Box(3477)), -Box(Box(3478)), -Box(Box(3479)), -Box(Box(3480)), -Box(Box(3481)), -Box(Box(3482)), -Box(Box(3483)), -Box(Box(3484)), -Box(Box(3485)), -Box(Box(3486)), -Box(Box(3487)), -Box(Box(3488)), -Box(Box(3489)), -Box(Box(3490)), -Box(Box(3491)), -Box(Box(3492)), -Box(Box(3493)), -Box(Box(3494)), -Box(Box(3495)), -Box(Box(3496)), -Box(Box(3497)), -Box(Box(3498)), -Box(Box(3499)), -Box(Box(3500)), -Box(Box(3501)), -Box(Box(3502)), -Box(Box(3503)), -Box(Box(3504)), -Box(Box(3505)), -Box(Box(3506)), -Box(Box(3507)), -Box(Box(3508)), -Box(Box(3509)), -Box(Box(3510)), -Box(Box(3511)), -Box(Box(3512)), -Box(Box(3513)), -Box(Box(3514)), -Box(Box(3515)), -Box(Box(3516)), -Box(Box(3517)), -Box(Box(3518)), -Box(Box(3519)), -Box(Box(3520)), -Box(Box(3521)), -Box(Box(3522)), -Box(Box(3523)), -Box(Box(3524)), -Box(Box(3525)), -Box(Box(3526)), -Box(Box(3527)), -Box(Box(3528)), -Box(Box(3529)), -Box(Box(3530)), -Box(Box(3531)), -Box(Box(3532)), -Box(Box(3533)), -Box(Box(3534)), -Box(Box(3535)), -Box(Box(3536)), -Box(Box(3537)), -Box(Box(3538)), -Box(Box(3539)), -Box(Box(3540)), -Box(Box(3541)), -Box(Box(3542)), -Box(Box(3543)), -Box(Box(3544)), -Box(Box(3545)), -Box(Box(3546)), -Box(Box(3547)), -Box(Box(3548)), -Box(Box(3549)), -Box(Box(3550)), -Box(Box(3551)), -Box(Box(3552)), -Box(Box(3553)), -Box(Box(3554)), -Box(Box(3555)), -Box(Box(3556)), -Box(Box(3557)), -Box(Box(3558)), -Box(Box(3559)), -Box(Box(3560)), -Box(Box(3561)), -Box(Box(3562)), -Box(Box(3563)), -Box(Box(3564)), -Box(Box(3565)), -Box(Box(3566)), -Box(Box(3567)), -Box(Box(3568)), -Box(Box(3569)), -Box(Box(3570)), -Box(Box(3571)), -Box(Box(3572)), -Box(Box(3573)), -Box(Box(3574)), -Box(Box(3575)), -Box(Box(3576)), -Box(Box(3577)), -Box(Box(3578)), -Box(Box(3579)), -Box(Box(3580)), -Box(Box(3581)), -Box(Box(3582)), -Box(Box(3583)), -Box(Box(3584)), -Box(Box(3585)), -Box(Box(3586)), -Box(Box(3587)), -Box(Box(3588)), -Box(Box(3589)), -Box(Box(3590)), -Box(Box(3591)), -Box(Box(3592)), -Box(Box(3593)), -Box(Box(3594)), -Box(Box(3595)), -Box(Box(3596)), -Box(Box(3597)), -Box(Box(3598)), -Box(Box(3599)), -Box(Box(3600)), -Box(Box(3601)), -Box(Box(3602)), -Box(Box(3603)), -Box(Box(3604)), -Box(Box(3605)), -Box(Box(3606)), -Box(Box(3607)), -Box(Box(3608)), -Box(Box(3609)), -Box(Box(3610)), -Box(Box(3611)), -Box(Box(3612)), -Box(Box(3613)), -Box(Box(3614)), -Box(Box(3615)), -Box(Box(3616)), -Box(Box(3617)), -Box(Box(3618)), -Box(Box(3619)), -Box(Box(3620)), -Box(Box(3621)), -Box(Box(3622)), -Box(Box(3623)), -Box(Box(3624)), -Box(Box(3625)), -Box(Box(3626)), -Box(Box(3627)), -Box(Box(3628)), -Box(Box(3629)), -Box(Box(3630)), -Box(Box(3631)), -Box(Box(3632)), -Box(Box(3633)), -Box(Box(3634)), -Box(Box(3635)), -Box(Box(3636)), -Box(Box(3637)), -Box(Box(3638)), -Box(Box(3639)), -Box(Box(3640)), -Box(Box(3641)), -Box(Box(3642)), -Box(Box(3643)), -Box(Box(3644)), -Box(Box(3645)), -Box(Box(3646)), -Box(Box(3647)), -Box(Box(3648)), -Box(Box(3649)), -Box(Box(3650)), -Box(Box(3651)), -Box(Box(3652)), -Box(Box(3653)), -Box(Box(3654)), -Box(Box(3655)), -Box(Box(3656)), -Box(Box(3657)), -Box(Box(3658)), -Box(Box(3659)), -Box(Box(3660)), -Box(Box(3661)), -Box(Box(3662)), -Box(Box(3663)), -Box(Box(3664)), -Box(Box(3665)), -Box(Box(3666)), -Box(Box(3667)), -Box(Box(3668)), -Box(Box(3669)), -Box(Box(3670)), -Box(Box(3671)), -Box(Box(3672)), -Box(Box(3673)), -Box(Box(3674)), -Box(Box(3675)), -Box(Box(3676)), -Box(Box(3677)), -Box(Box(3678)), -Box(Box(3679)), -Box(Box(3680)), -Box(Box(3681)), -Box(Box(3682)), -Box(Box(3683)), -Box(Box(3684)), -Box(Box(3685)), -Box(Box(3686)), -Box(Box(3687)), -Box(Box(3688)), -Box(Box(3689)), -Box(Box(3690)), -Box(Box(3691)), -Box(Box(3692)), -Box(Box(3693)), -Box(Box(3694)), -Box(Box(3695)), -Box(Box(3696)), -Box(Box(3697)), -Box(Box(3698)), -Box(Box(3699)), -Box(Box(3700)), -Box(Box(3701)), -Box(Box(3702)), -Box(Box(3703)), -Box(Box(3704)), -Box(Box(3705)), -Box(Box(3706)), -Box(Box(3707)), -Box(Box(3708)), -Box(Box(3709)), -Box(Box(3710)), -Box(Box(3711)), -Box(Box(3712)), -Box(Box(3713)), -Box(Box(3714)), -Box(Box(3715)), -Box(Box(3716)), -Box(Box(3717)), -Box(Box(3718)), -Box(Box(3719)), -Box(Box(3720)), -Box(Box(3721)), -Box(Box(3722)), -Box(Box(3723)), -Box(Box(3724)), -Box(Box(3725)), -Box(Box(3726)), -Box(Box(3727)), -Box(Box(3728)), -Box(Box(3729)), -Box(Box(3730)), -Box(Box(3731)), -Box(Box(3732)), -Box(Box(3733)), -Box(Box(3734)), -Box(Box(3735)), -Box(Box(3736)), -Box(Box(3737)), -Box(Box(3738)), -Box(Box(3739)), -Box(Box(3740)), -Box(Box(3741)), -Box(Box(3742)), -Box(Box(3743)), -Box(Box(3744)), -Box(Box(3745)), -Box(Box(3746)), -Box(Box(3747)), -Box(Box(3748)), -Box(Box(3749)), -Box(Box(3750)), -Box(Box(3751)), -Box(Box(3752)), -Box(Box(3753)), -Box(Box(3754)), -Box(Box(3755)), -Box(Box(3756)), -Box(Box(3757)), -Box(Box(3758)), -Box(Box(3759)), -Box(Box(3760)), -Box(Box(3761)), -Box(Box(3762)), -Box(Box(3763)), -Box(Box(3764)), -Box(Box(3765)), -Box(Box(3766)), -Box(Box(3767)), -Box(Box(3768)), -Box(Box(3769)), -Box(Box(3770)), -Box(Box(3771)), -Box(Box(3772)), -Box(Box(3773)), -Box(Box(3774)), -Box(Box(3775)), -Box(Box(3776)), -Box(Box(3777)), -Box(Box(3778)), -Box(Box(3779)), -Box(Box(3780)), -Box(Box(3781)), -Box(Box(3782)), -Box(Box(3783)), -Box(Box(3784)), -Box(Box(3785)), -Box(Box(3786)), -Box(Box(3787)), -Box(Box(3788)), -Box(Box(3789)), -Box(Box(3790)), -Box(Box(3791)), -Box(Box(3792)), -Box(Box(3793)), -Box(Box(3794)), -Box(Box(3795)), -Box(Box(3796)), -Box(Box(3797)), -Box(Box(3798)), -Box(Box(3799)), -Box(Box(3800)), -Box(Box(3801)), -Box(Box(3802)), -Box(Box(3803)), -Box(Box(3804)), -Box(Box(3805)), -Box(Box(3806)), -Box(Box(3807)), -Box(Box(3808)), -Box(Box(3809)), -Box(Box(3810)), -Box(Box(3811)), -Box(Box(3812)), -Box(Box(3813)), -Box(Box(3814)), -Box(Box(3815)), -Box(Box(3816)), -Box(Box(3817)), -Box(Box(3818)), -Box(Box(3819)), -Box(Box(3820)), -Box(Box(3821)), -Box(Box(3822)), -Box(Box(3823)), -Box(Box(3824)), -Box(Box(3825)), -Box(Box(3826)), -Box(Box(3827)), -Box(Box(3828)), -Box(Box(3829)), -Box(Box(3830)), -Box(Box(3831)), -Box(Box(3832)), -Box(Box(3833)), -Box(Box(3834)), -Box(Box(3835)), -Box(Box(3836)), -Box(Box(3837)), -Box(Box(3838)), -Box(Box(3839)), -Box(Box(3840)), -Box(Box(3841)), -Box(Box(3842)), -Box(Box(3843)), -Box(Box(3844)), -Box(Box(3845)), -Box(Box(3846)), -Box(Box(3847)), -Box(Box(3848)), -Box(Box(3849)), -Box(Box(3850)), -Box(Box(3851)), -Box(Box(3852)), -Box(Box(3853)), -Box(Box(3854)), -Box(Box(3855)), -Box(Box(3856)), -Box(Box(3857)), -Box(Box(3858)), -Box(Box(3859)), -Box(Box(3860)), -Box(Box(3861)), -Box(Box(3862)), -Box(Box(3863)), -Box(Box(3864)), -Box(Box(3865)), -Box(Box(3866)), -Box(Box(3867)), -Box(Box(3868)), -Box(Box(3869)), -Box(Box(3870)), -Box(Box(3871)), -Box(Box(3872)), -Box(Box(3873)), -Box(Box(3874)), -Box(Box(3875)), -Box(Box(3876)), -Box(Box(3877)), -Box(Box(3878)), -Box(Box(3879)), -Box(Box(3880)), -Box(Box(3881)), -Box(Box(3882)), -Box(Box(3883)), -Box(Box(3884)), -Box(Box(3885)), -Box(Box(3886)), -Box(Box(3887)), -Box(Box(3888)), -Box(Box(3889)), -Box(Box(3890)), -Box(Box(3891)), -Box(Box(3892)), -Box(Box(3893)), -Box(Box(3894)), -Box(Box(3895)), -Box(Box(3896)), -Box(Box(3897)), -Box(Box(3898)), -Box(Box(3899)), -Box(Box(3900)), -Box(Box(3901)), -Box(Box(3902)), -Box(Box(3903)), -Box(Box(3904)), -Box(Box(3905)), -Box(Box(3906)), -Box(Box(3907)), -Box(Box(3908)), -Box(Box(3909)), -Box(Box(3910)), -Box(Box(3911)), -Box(Box(3912)), -Box(Box(3913)), -Box(Box(3914)), -Box(Box(3915)), -Box(Box(3916)), -Box(Box(3917)), -Box(Box(3918)), -Box(Box(3919)), -Box(Box(3920)), -Box(Box(3921)), -Box(Box(3922)), -Box(Box(3923)), -Box(Box(3924)), -Box(Box(3925)), -Box(Box(3926)), -Box(Box(3927)), -Box(Box(3928)), -Box(Box(3929)), -Box(Box(3930)), -Box(Box(3931)), -Box(Box(3932)), -Box(Box(3933)), -Box(Box(3934)), -Box(Box(3935)), -Box(Box(3936)), -Box(Box(3937)), -Box(Box(3938)), -Box(Box(3939)), -Box(Box(3940)), -Box(Box(3941)), -Box(Box(3942)), -Box(Box(3943)), -Box(Box(3944)), -Box(Box(3945)), -Box(Box(3946)), -Box(Box(3947)), -Box(Box(3948)), -Box(Box(3949)), -Box(Box(3950)), -Box(Box(3951)), -Box(Box(3952)), -Box(Box(3953)), -Box(Box(3954)), -Box(Box(3955)), -Box(Box(3956)), -Box(Box(3957)), -Box(Box(3958)), -Box(Box(3959)), -Box(Box(3960)), -Box(Box(3961)), -Box(Box(3962)), -Box(Box(3963)), -Box(Box(3964)), -Box(Box(3965)), -Box(Box(3966)), -Box(Box(3967)), -Box(Box(3968)), -Box(Box(3969)), -Box(Box(3970)), -Box(Box(3971)), -Box(Box(3972)), -Box(Box(3973)), -Box(Box(3974)), -Box(Box(3975)), -Box(Box(3976)), -Box(Box(3977)), -Box(Box(3978)), -Box(Box(3979)), -Box(Box(3980)), -Box(Box(3981)), -Box(Box(3982)), -Box(Box(3983)), -Box(Box(3984)), -Box(Box(3985)), -Box(Box(3986)), -Box(Box(3987)), -Box(Box(3988)), -Box(Box(3989)), -Box(Box(3990)), -Box(Box(3991)), -Box(Box(3992)), -Box(Box(3993)), -Box(Box(3994)), -Box(Box(3995)), -Box(Box(3996)), -Box(Box(3997)), -Box(Box(3998)), -Box(Box(3999)), -Box(Box(4000)), -Box(Box(4001)), -Box(Box(4002)), -Box(Box(4003)), -Box(Box(4004)), -Box(Box(4005)), -Box(Box(4006)), -Box(Box(4007)), -Box(Box(4008)), -Box(Box(4009)), -Box(Box(4010)), -Box(Box(4011)), -Box(Box(4012)), -Box(Box(4013)), -Box(Box(4014)), -Box(Box(4015)), -Box(Box(4016)), -Box(Box(4017)), -Box(Box(4018)), -Box(Box(4019)), -Box(Box(4020)), -Box(Box(4021)), -Box(Box(4022)), -Box(Box(4023)), -Box(Box(4024)), -Box(Box(4025)), -Box(Box(4026)), -Box(Box(4027)), -Box(Box(4028)), -Box(Box(4029)), -Box(Box(4030)), -Box(Box(4031)), -Box(Box(4032)), -Box(Box(4033)), -Box(Box(4034)), -Box(Box(4035)), -Box(Box(4036)), -Box(Box(4037)), -Box(Box(4038)), -Box(Box(4039)), -Box(Box(4040)), -Box(Box(4041)), -Box(Box(4042)), -Box(Box(4043)), -Box(Box(4044)), -Box(Box(4045)), -Box(Box(4046)), -Box(Box(4047)), -Box(Box(4048)), -Box(Box(4049)), -Box(Box(4050)), -Box(Box(4051)), -Box(Box(4052)), -Box(Box(4053)), -Box(Box(4054)), -Box(Box(4055)), -Box(Box(4056)), -Box(Box(4057)), -Box(Box(4058)), -Box(Box(4059)), -Box(Box(4060)), -Box(Box(4061)), -Box(Box(4062)), -Box(Box(4063)), -Box(Box(4064)), -Box(Box(4065)), -Box(Box(4066)), -Box(Box(4067)), -Box(Box(4068)), -Box(Box(4069)), -Box(Box(4070)), -Box(Box(4071)), -Box(Box(4072)), -Box(Box(4073)), -Box(Box(4074)), -Box(Box(4075)), -Box(Box(4076)), -Box(Box(4077)), -Box(Box(4078)), -Box(Box(4079)), -Box(Box(4080)), -Box(Box(4081)), -Box(Box(4082)), -Box(Box(4083)), -Box(Box(4084)), -Box(Box(4085)), -Box(Box(4086)), -Box(Box(4087)), -Box(Box(4088)), -Box(Box(4089)), -Box(Box(4090)), -Box(Box(4091)), -Box(Box(4092)), -Box(Box(4093)), -Box(Box(4094)), -Box(Box(4095)), -Box(Box(4096)), -Box(Box(4097)), -Box(Box(4098)), -Box(Box(4099)), -Box(Box(4100)), -Box(Box(4101)), -Box(Box(4102)), -Box(Box(4103)), -Box(Box(4104)), -Box(Box(4105)), -Box(Box(4106)), -Box(Box(4107)), -Box(Box(4108)), -Box(Box(4109)), -Box(Box(4110)), -Box(Box(4111)), -Box(Box(4112)), -Box(Box(4113)), -Box(Box(4114)), -Box(Box(4115)), -Box(Box(4116)), -Box(Box(4117)), -Box(Box(4118)), -Box(Box(4119)), -Box(Box(4120)), -Box(Box(4121)), -Box(Box(4122)), -Box(Box(4123)), -Box(Box(4124)), -Box(Box(4125)), -Box(Box(4126)), -Box(Box(4127)), -Box(Box(4128)), -Box(Box(4129)), -Box(Box(4130)), -Box(Box(4131)), -Box(Box(4132)), -Box(Box(4133)), -Box(Box(4134)), -Box(Box(4135)), -Box(Box(4136)), -Box(Box(4137)), -Box(Box(4138)), -Box(Box(4139)), -Box(Box(4140)), -Box(Box(4141)), -Box(Box(4142)), -Box(Box(4143)), -Box(Box(4144)), -Box(Box(4145)), -Box(Box(4146)), -Box(Box(4147)), -Box(Box(4148)), -Box(Box(4149)), -Box(Box(4150)), -Box(Box(4151)), -Box(Box(4152)), -Box(Box(4153)), -Box(Box(4154)), -Box(Box(4155)), -Box(Box(4156)), -Box(Box(4157)), -Box(Box(4158)), -Box(Box(4159)), -Box(Box(4160)), -Box(Box(4161)), -Box(Box(4162)), -Box(Box(4163)), -Box(Box(4164)), -Box(Box(4165)), -Box(Box(4166)), -Box(Box(4167)), -Box(Box(4168)), -Box(Box(4169)), -Box(Box(4170)), -Box(Box(4171)), -Box(Box(4172)), -Box(Box(4173)), -Box(Box(4174)), -Box(Box(4175)), -Box(Box(4176)), -Box(Box(4177)), -Box(Box(4178)), -Box(Box(4179)), -Box(Box(4180)), -Box(Box(4181)), -Box(Box(4182)), -Box(Box(4183)), -Box(Box(4184)), -Box(Box(4185)), -Box(Box(4186)), -Box(Box(4187)), -Box(Box(4188)), -Box(Box(4189)), -Box(Box(4190)), -Box(Box(4191)), -Box(Box(4192)), -Box(Box(4193)), -Box(Box(4194)), -Box(Box(4195)), -Box(Box(4196)), -Box(Box(4197)), -Box(Box(4198)), -Box(Box(4199)), -Box(Box(4200)), -Box(Box(4201)), -Box(Box(4202)), -Box(Box(4203)), -Box(Box(4204)), -Box(Box(4205)), -Box(Box(4206)), -Box(Box(4207)), -Box(Box(4208)), -Box(Box(4209)), -Box(Box(4210)), -Box(Box(4211)), -Box(Box(4212)), -Box(Box(4213)), -Box(Box(4214)), -Box(Box(4215)), -Box(Box(4216)), -Box(Box(4217)), -Box(Box(4218)), -Box(Box(4219)), -Box(Box(4220)), -Box(Box(4221)), -Box(Box(4222)), -Box(Box(4223)), -Box(Box(4224)), -Box(Box(4225)), -Box(Box(4226)), -Box(Box(4227)), -Box(Box(4228)), -Box(Box(4229)), -Box(Box(4230)), -Box(Box(4231)), -Box(Box(4232)), -Box(Box(4233)), -Box(Box(4234)), -Box(Box(4235)), -Box(Box(4236)), -Box(Box(4237)), -Box(Box(4238)), -Box(Box(4239)), -Box(Box(4240)), -Box(Box(4241)), -Box(Box(4242)), -Box(Box(4243)), -Box(Box(4244)), -Box(Box(4245)), -Box(Box(4246)), -Box(Box(4247)), -Box(Box(4248)), -Box(Box(4249)), -Box(Box(4250)), -Box(Box(4251)), -Box(Box(4252)), -Box(Box(4253)), -Box(Box(4254)), -Box(Box(4255)), -Box(Box(4256)), -Box(Box(4257)), -Box(Box(4258)), -Box(Box(4259)), -Box(Box(4260)), -Box(Box(4261)), -Box(Box(4262)), -Box(Box(4263)), -Box(Box(4264)), -Box(Box(4265)), -Box(Box(4266)), -Box(Box(4267)), -Box(Box(4268)), -Box(Box(4269)), -Box(Box(4270)), -Box(Box(4271)), -Box(Box(4272)), -Box(Box(4273)), -Box(Box(4274)), -Box(Box(4275)), -Box(Box(4276)), -Box(Box(4277)), -Box(Box(4278)), -Box(Box(4279)), -Box(Box(4280)), -Box(Box(4281)), -Box(Box(4282)), -Box(Box(4283)), -Box(Box(4284)), -Box(Box(4285)), -Box(Box(4286)), -Box(Box(4287)), -Box(Box(4288)), -Box(Box(4289)), -Box(Box(4290)), -Box(Box(4291)), -Box(Box(4292)), -Box(Box(4293)), -Box(Box(4294)), -Box(Box(4295)), -Box(Box(4296)), -Box(Box(4297)), -Box(Box(4298)), -Box(Box(4299)), -Box(Box(4300)), -Box(Box(4301)), -Box(Box(4302)), -Box(Box(4303)), -Box(Box(4304)), -Box(Box(4305)), -Box(Box(4306)), -Box(Box(4307)), -Box(Box(4308)), -Box(Box(4309)), -Box(Box(4310)), -Box(Box(4311)), -Box(Box(4312)), -Box(Box(4313)), -Box(Box(4314)), -Box(Box(4315)), -Box(Box(4316)), -Box(Box(4317)), -Box(Box(4318)), -Box(Box(4319)), -Box(Box(4320)), -Box(Box(4321)), -Box(Box(4322)), -Box(Box(4323)), -Box(Box(4324)), -Box(Box(4325)), -Box(Box(4326)), -Box(Box(4327)), -Box(Box(4328)), -Box(Box(4329)), -Box(Box(4330)), -Box(Box(4331)), -Box(Box(4332)), -Box(Box(4333)), -Box(Box(4334)), -Box(Box(4335)), -Box(Box(4336)), -Box(Box(4337)), -Box(Box(4338)), -Box(Box(4339)), -Box(Box(4340)), -Box(Box(4341)), -Box(Box(4342)), -Box(Box(4343)), -Box(Box(4344)), -Box(Box(4345)), -Box(Box(4346)), -Box(Box(4347)), -Box(Box(4348)), -Box(Box(4349)), -Box(Box(4350)), -Box(Box(4351)), -Box(Box(4352)), -Box(Box(4353)), -Box(Box(4354)), -Box(Box(4355)), -Box(Box(4356)), -Box(Box(4357)), -Box(Box(4358)), -Box(Box(4359)), -Box(Box(4360)), -Box(Box(4361)), -Box(Box(4362)), -Box(Box(4363)), -Box(Box(4364)), -Box(Box(4365)), -Box(Box(4366)), -Box(Box(4367)), -Box(Box(4368)), -Box(Box(4369)), -Box(Box(4370)), -Box(Box(4371)), -Box(Box(4372)), -Box(Box(4373)), -Box(Box(4374)), -Box(Box(4375)), -Box(Box(4376)), -Box(Box(4377)), -Box(Box(4378)), -Box(Box(4379)), -Box(Box(4380)), -Box(Box(4381)), -Box(Box(4382)), -Box(Box(4383)), -Box(Box(4384)), -Box(Box(4385)), -Box(Box(4386)), -Box(Box(4387)), -Box(Box(4388)), -Box(Box(4389)), -Box(Box(4390)), -Box(Box(4391)), -Box(Box(4392)), -Box(Box(4393)), -Box(Box(4394)), -Box(Box(4395)), -Box(Box(4396)), -Box(Box(4397)), -Box(Box(4398)), -Box(Box(4399)), -Box(Box(4400)), -Box(Box(4401)), -Box(Box(4402)), -Box(Box(4403)), -Box(Box(4404)), -Box(Box(4405)), -Box(Box(4406)), -Box(Box(4407)), -Box(Box(4408)), -Box(Box(4409)), -Box(Box(4410)), -Box(Box(4411)), -Box(Box(4412)), -Box(Box(4413)), -Box(Box(4414)), -Box(Box(4415)), -Box(Box(4416)), -Box(Box(4417)), -Box(Box(4418)), -Box(Box(4419)), -Box(Box(4420)), -Box(Box(4421)), -Box(Box(4422)), -Box(Box(4423)), -Box(Box(4424)), -Box(Box(4425)), -Box(Box(4426)), -Box(Box(4427)), -Box(Box(4428)), -Box(Box(4429)), -Box(Box(4430)), -Box(Box(4431)), -Box(Box(4432)), -Box(Box(4433)), -Box(Box(4434)), -Box(Box(4435)), -Box(Box(4436)), -Box(Box(4437)), -Box(Box(4438)), -Box(Box(4439)), -Box(Box(4440)), -Box(Box(4441)), -Box(Box(4442)), -Box(Box(4443)), -Box(Box(4444)), -Box(Box(4445)), -Box(Box(4446)), -Box(Box(4447)), -Box(Box(4448)), -Box(Box(4449)), -Box(Box(4450)), -Box(Box(4451)), -Box(Box(4452)), -Box(Box(4453)), -Box(Box(4454)), -Box(Box(4455)), -Box(Box(4456)), -Box(Box(4457)), -Box(Box(4458)), -Box(Box(4459)), -Box(Box(4460)), -Box(Box(4461)), -Box(Box(4462)), -Box(Box(4463)), -Box(Box(4464)), -Box(Box(4465)), -Box(Box(4466)), -Box(Box(4467)), -Box(Box(4468)), -Box(Box(4469)), -Box(Box(4470)), -Box(Box(4471)), -Box(Box(4472)), -Box(Box(4473)), -Box(Box(4474)), -Box(Box(4475)), -Box(Box(4476)), -Box(Box(4477)), -Box(Box(4478)), -Box(Box(4479)), -Box(Box(4480)), -Box(Box(4481)), -Box(Box(4482)), -Box(Box(4483)), -Box(Box(4484)), -Box(Box(4485)), -Box(Box(4486)), -Box(Box(4487)), -Box(Box(4488)), -Box(Box(4489)), -Box(Box(4490)), -Box(Box(4491)), -Box(Box(4492)), -Box(Box(4493)), -Box(Box(4494)), -Box(Box(4495)), -Box(Box(4496)), -Box(Box(4497)), -Box(Box(4498)), -Box(Box(4499)), -Box(Box(4500)), -Box(Box(4501)), -Box(Box(4502)), -Box(Box(4503)), -Box(Box(4504)), -Box(Box(4505)), -Box(Box(4506)), -Box(Box(4507)), -Box(Box(4508)), -Box(Box(4509)), -Box(Box(4510)), -Box(Box(4511)), -Box(Box(4512)), -Box(Box(4513)), -Box(Box(4514)), -Box(Box(4515)), -Box(Box(4516)), -Box(Box(4517)), -Box(Box(4518)), -Box(Box(4519)), -Box(Box(4520)), -Box(Box(4521)), -Box(Box(4522)), -Box(Box(4523)), -Box(Box(4524)), -Box(Box(4525)), -Box(Box(4526)), -Box(Box(4527)), -Box(Box(4528)), -Box(Box(4529)), -Box(Box(4530)), -Box(Box(4531)), -Box(Box(4532)), -Box(Box(4533)), -Box(Box(4534)), -Box(Box(4535)), -Box(Box(4536)), -Box(Box(4537)), -Box(Box(4538)), -Box(Box(4539)), -Box(Box(4540)), -Box(Box(4541)), -Box(Box(4542)), -Box(Box(4543)), -Box(Box(4544)), -Box(Box(4545)), -Box(Box(4546)), -Box(Box(4547)), -Box(Box(4548)), -Box(Box(4549)), -Box(Box(4550)), -Box(Box(4551)), -Box(Box(4552)), -Box(Box(4553)), -Box(Box(4554)), -Box(Box(4555)), -Box(Box(4556)), -Box(Box(4557)), -Box(Box(4558)), -Box(Box(4559)), -Box(Box(4560)), -Box(Box(4561)), -Box(Box(4562)), -Box(Box(4563)), -Box(Box(4564)), -Box(Box(4565)), -Box(Box(4566)), -Box(Box(4567)), -Box(Box(4568)), -Box(Box(4569)), -Box(Box(4570)), -Box(Box(4571)), -Box(Box(4572)), -Box(Box(4573)), -Box(Box(4574)), -Box(Box(4575)), -Box(Box(4576)), -Box(Box(4577)), -Box(Box(4578)), -Box(Box(4579)), -Box(Box(4580)), -Box(Box(4581)), -Box(Box(4582)), -Box(Box(4583)), -Box(Box(4584)), -Box(Box(4585)), -Box(Box(4586)), -Box(Box(4587)), -Box(Box(4588)), -Box(Box(4589)), -Box(Box(4590)), -Box(Box(4591)), -Box(Box(4592)), -Box(Box(4593)), -Box(Box(4594)), -Box(Box(4595)), -Box(Box(4596)), -Box(Box(4597)), -Box(Box(4598)), -Box(Box(4599)), -Box(Box(4600)), -Box(Box(4601)), -Box(Box(4602)), -Box(Box(4603)), -Box(Box(4604)), -Box(Box(4605)), -Box(Box(4606)), -Box(Box(4607)), -Box(Box(4608)), -Box(Box(4609)), -Box(Box(4610)), -Box(Box(4611)), -Box(Box(4612)), -Box(Box(4613)), -Box(Box(4614)), -Box(Box(4615)), -Box(Box(4616)), -Box(Box(4617)), -Box(Box(4618)), -Box(Box(4619)), -Box(Box(4620)), -Box(Box(4621)), -Box(Box(4622)), -Box(Box(4623)), -Box(Box(4624)), -Box(Box(4625)), -Box(Box(4626)), -Box(Box(4627)), -Box(Box(4628)), -Box(Box(4629)), -Box(Box(4630)), -Box(Box(4631)), -Box(Box(4632)), -Box(Box(4633)), -Box(Box(4634)), -Box(Box(4635)), -Box(Box(4636)), -Box(Box(4637)), -Box(Box(4638)), -Box(Box(4639)), -Box(Box(4640)), -Box(Box(4641)), -Box(Box(4642)), -Box(Box(4643)), -Box(Box(4644)), -Box(Box(4645)), -Box(Box(4646)), -Box(Box(4647)), -Box(Box(4648)), -Box(Box(4649)), -Box(Box(4650)), -Box(Box(4651)), -Box(Box(4652)), -Box(Box(4653)), -Box(Box(4654)), -Box(Box(4655)), -Box(Box(4656)), -Box(Box(4657)), -Box(Box(4658)), -Box(Box(4659)), -Box(Box(4660)), -Box(Box(4661)), -Box(Box(4662)), -Box(Box(4663)), -Box(Box(4664)), -Box(Box(4665)), -Box(Box(4666)), -Box(Box(4667)), -Box(Box(4668)), -Box(Box(4669)), -Box(Box(4670)), -Box(Box(4671)), -Box(Box(4672)), -Box(Box(4673)), -Box(Box(4674)), -Box(Box(4675)), -Box(Box(4676)), -Box(Box(4677)), -Box(Box(4678)), -Box(Box(4679)), -Box(Box(4680)), -Box(Box(4681)), -Box(Box(4682)), -Box(Box(4683)), -Box(Box(4684)), -Box(Box(4685)), -Box(Box(4686)), -Box(Box(4687)), -Box(Box(4688)), -Box(Box(4689)), -Box(Box(4690)), -Box(Box(4691)), -Box(Box(4692)), -Box(Box(4693)), -Box(Box(4694)), -Box(Box(4695)), -Box(Box(4696)), -Box(Box(4697)), -Box(Box(4698)), -Box(Box(4699)), -Box(Box(4700)), -Box(Box(4701)), -Box(Box(4702)), -Box(Box(4703)), -Box(Box(4704)), -Box(Box(4705)), -Box(Box(4706)), -Box(Box(4707)), -Box(Box(4708)), -Box(Box(4709)), -Box(Box(4710)), -Box(Box(4711)), -Box(Box(4712)), -Box(Box(4713)), -Box(Box(4714)), -Box(Box(4715)), -Box(Box(4716)), -Box(Box(4717)), -Box(Box(4718)), -Box(Box(4719)), -Box(Box(4720)), -Box(Box(4721)), -Box(Box(4722)), -Box(Box(4723)), -Box(Box(4724)), -Box(Box(4725)), -Box(Box(4726)), -Box(Box(4727)), -Box(Box(4728)), -Box(Box(4729)), -Box(Box(4730)), -Box(Box(4731)), -Box(Box(4732)), -Box(Box(4733)), -Box(Box(4734)), -Box(Box(4735)), -Box(Box(4736)), -Box(Box(4737)), -Box(Box(4738)), -Box(Box(4739)), -Box(Box(4740)), -Box(Box(4741)), -Box(Box(4742)), -Box(Box(4743)), -Box(Box(4744)), -Box(Box(4745)), -Box(Box(4746)), -Box(Box(4747)), -Box(Box(4748)), -Box(Box(4749)), -Box(Box(4750)), -Box(Box(4751)), -Box(Box(4752)), -Box(Box(4753)), -Box(Box(4754)), -Box(Box(4755)), -Box(Box(4756)), -Box(Box(4757)), -Box(Box(4758)), -Box(Box(4759)), -Box(Box(4760)), -Box(Box(4761)), -Box(Box(4762)), -Box(Box(4763)), -Box(Box(4764)), -Box(Box(4765)), -Box(Box(4766)), -Box(Box(4767)), -Box(Box(4768)), -Box(Box(4769)), -Box(Box(4770)), -Box(Box(4771)), -Box(Box(4772)), -Box(Box(4773)), -Box(Box(4774)), -Box(Box(4775)), -Box(Box(4776)), -Box(Box(4777)), -Box(Box(4778)), -Box(Box(4779)), -Box(Box(4780)), -Box(Box(4781)), -Box(Box(4782)), -Box(Box(4783)), -Box(Box(4784)), -Box(Box(4785)), -Box(Box(4786)), -Box(Box(4787)), -Box(Box(4788)), -Box(Box(4789)), -Box(Box(4790)), -Box(Box(4791)), -Box(Box(4792)), -Box(Box(4793)), -Box(Box(4794)), -Box(Box(4795)), -Box(Box(4796)), -Box(Box(4797)), -Box(Box(4798)), -Box(Box(4799)), -Box(Box(4800)), -Box(Box(4801)), -Box(Box(4802)), -Box(Box(4803)), -Box(Box(4804)), -Box(Box(4805)), -Box(Box(4806)), -Box(Box(4807)), -Box(Box(4808)), -Box(Box(4809)), -Box(Box(4810)), -Box(Box(4811)), -Box(Box(4812)), -Box(Box(4813)), -Box(Box(4814)), -Box(Box(4815)), -Box(Box(4816)), -Box(Box(4817)), -Box(Box(4818)), -Box(Box(4819)), -Box(Box(4820)), -Box(Box(4821)), -Box(Box(4822)), -Box(Box(4823)), -Box(Box(4824)), -Box(Box(4825)), -Box(Box(4826)), -Box(Box(4827)), -Box(Box(4828)), -Box(Box(4829)), -Box(Box(4830)), -Box(Box(4831)), -Box(Box(4832)), -Box(Box(4833)), -Box(Box(4834)), -Box(Box(4835)), -Box(Box(4836)), -Box(Box(4837)), -Box(Box(4838)), -Box(Box(4839)), -Box(Box(4840)), -Box(Box(4841)), -Box(Box(4842)), -Box(Box(4843)), -Box(Box(4844)), -Box(Box(4845)), -Box(Box(4846)), -Box(Box(4847)), -Box(Box(4848)), -Box(Box(4849)), -Box(Box(4850)), -Box(Box(4851)), -Box(Box(4852)), -Box(Box(4853)), -Box(Box(4854)), -Box(Box(4855)), -Box(Box(4856)), -Box(Box(4857)), -Box(Box(4858)), -Box(Box(4859)), -Box(Box(4860)), -Box(Box(4861)), -Box(Box(4862)), -Box(Box(4863)), -Box(Box(4864)), -Box(Box(4865)), -Box(Box(4866)), -Box(Box(4867)), -Box(Box(4868)), -Box(Box(4869)), -Box(Box(4870)), -Box(Box(4871)), -Box(Box(4872)), -Box(Box(4873)), -Box(Box(4874)), -Box(Box(4875)), -Box(Box(4876)), -Box(Box(4877)), -Box(Box(4878)), -Box(Box(4879)), -Box(Box(4880)), -Box(Box(4881)), -Box(Box(4882)), -Box(Box(4883)), -Box(Box(4884)), -Box(Box(4885)), -Box(Box(4886)), -Box(Box(4887)), -Box(Box(4888)), -Box(Box(4889)), -Box(Box(4890)), -Box(Box(4891)), -Box(Box(4892)), -Box(Box(4893)), -Box(Box(4894)), -Box(Box(4895)), -Box(Box(4896)), -Box(Box(4897)), -Box(Box(4898)), -Box(Box(4899)), -Box(Box(4900)), -Box(Box(4901)), -Box(Box(4902)), -Box(Box(4903)), -Box(Box(4904)), -Box(Box(4905)), -Box(Box(4906)), -Box(Box(4907)), -Box(Box(4908)), -Box(Box(4909)), -Box(Box(4910)), -Box(Box(4911)), -Box(Box(4912)), -Box(Box(4913)), -Box(Box(4914)), -Box(Box(4915)), -Box(Box(4916)), -Box(Box(4917)), -Box(Box(4918)), -Box(Box(4919)), -Box(Box(4920)), -Box(Box(4921)), -Box(Box(4922)), -Box(Box(4923)), -Box(Box(4924)), -Box(Box(4925)), -Box(Box(4926)), -Box(Box(4927)), -Box(Box(4928)), -Box(Box(4929)), -Box(Box(4930)), -Box(Box(4931)), -Box(Box(4932)), -Box(Box(4933)), -Box(Box(4934)), -Box(Box(4935)), -Box(Box(4936)), -Box(Box(4937)), -Box(Box(4938)), -Box(Box(4939)), -Box(Box(4940)), -Box(Box(4941)), -Box(Box(4942)), -Box(Box(4943)), -Box(Box(4944)), -Box(Box(4945)), -Box(Box(4946)), -Box(Box(4947)), -Box(Box(4948)), -Box(Box(4949)), -Box(Box(4950)), -Box(Box(4951)), -Box(Box(4952)), -Box(Box(4953)), -Box(Box(4954)), -Box(Box(4955)), -Box(Box(4956)), -Box(Box(4957)), -Box(Box(4958)), -Box(Box(4959)), -Box(Box(4960)), -Box(Box(4961)), -Box(Box(4962)), -Box(Box(4963)), -Box(Box(4964)), -Box(Box(4965)), -Box(Box(4966)), -Box(Box(4967)), -Box(Box(4968)), -Box(Box(4969)), -Box(Box(4970)), -Box(Box(4971)), -Box(Box(4972)), -Box(Box(4973)), -Box(Box(4974)), -Box(Box(4975)), -Box(Box(4976)), -Box(Box(4977)), -Box(Box(4978)), -Box(Box(4979)), -Box(Box(4980)), -Box(Box(4981)), -Box(Box(4982)), -Box(Box(4983)), -Box(Box(4984)), -Box(Box(4985)), -Box(Box(4986)), -Box(Box(4987)), -Box(Box(4988)), -Box(Box(4989)), -Box(Box(4990)), -Box(Box(4991)), -Box(Box(4992)), -Box(Box(4993)), -Box(Box(4994)), -Box(Box(4995)), -Box(Box(4996)), -Box(Box(4997)), -Box(Box(4998)), -Box(Box(4999)), -Box(Box(5000)), -Box(Box(5001)), -Box(Box(5002)), -Box(Box(5003)), -Box(Box(5004)), -Box(Box(5005)), -Box(Box(5006)), -Box(Box(5007)), -Box(Box(5008)), -Box(Box(5009)), -Box(Box(5010)), -Box(Box(5011)), -Box(Box(5012)), -Box(Box(5013)), -Box(Box(5014)), -Box(Box(5015)), -Box(Box(5016)), -Box(Box(5017)), -Box(Box(5018)), -Box(Box(5019)), -Box(Box(5020)), -Box(Box(5021)), -Box(Box(5022)), -Box(Box(5023)), -Box(Box(5024)), -Box(Box(5025)), -Box(Box(5026)), -Box(Box(5027)), -Box(Box(5028)), -Box(Box(5029)), -Box(Box(5030)), -Box(Box(5031)), -Box(Box(5032)), -Box(Box(5033)), -Box(Box(5034)), -Box(Box(5035)), -Box(Box(5036)), -Box(Box(5037)), -Box(Box(5038)), -Box(Box(5039)), -Box(Box(5040)), -Box(Box(5041)), -Box(Box(5042)), -Box(Box(5043)), -Box(Box(5044)), -Box(Box(5045)), -Box(Box(5046)), -Box(Box(5047)), -Box(Box(5048)), -Box(Box(5049)), -Box(Box(5050)), -Box(Box(5051)), -Box(Box(5052)), -Box(Box(5053)), -Box(Box(5054)), -Box(Box(5055)), -Box(Box(5056)), -Box(Box(5057)), -Box(Box(5058)), -Box(Box(5059)), -Box(Box(5060)), -Box(Box(5061)), -Box(Box(5062)), -Box(Box(5063)), -Box(Box(5064)), -Box(Box(5065)), -Box(Box(5066)), -Box(Box(5067)), -Box(Box(5068)), -Box(Box(5069)), -Box(Box(5070)), -Box(Box(5071)), -Box(Box(5072)), -Box(Box(5073)), -Box(Box(5074)), -Box(Box(5075)), -Box(Box(5076)), -Box(Box(5077)), -Box(Box(5078)), -Box(Box(5079)), -Box(Box(5080)), -Box(Box(5081)), -Box(Box(5082)), -Box(Box(5083)), -Box(Box(5084)), -Box(Box(5085)), -Box(Box(5086)), -Box(Box(5087)), -Box(Box(5088)), -Box(Box(5089)), -Box(Box(5090)), -Box(Box(5091)), -Box(Box(5092)), -Box(Box(5093)), -Box(Box(5094)), -Box(Box(5095)), -Box(Box(5096)), -Box(Box(5097)), -Box(Box(5098)), -Box(Box(5099)), -Box(Box(5100)), -Box(Box(5101)), -Box(Box(5102)), -Box(Box(5103)), -Box(Box(5104)), -Box(Box(5105)), -Box(Box(5106)), -Box(Box(5107)), -Box(Box(5108)), -Box(Box(5109)), -Box(Box(5110)), -Box(Box(5111)), -Box(Box(5112)), -Box(Box(5113)), -Box(Box(5114)), -Box(Box(5115)), -Box(Box(5116)), -Box(Box(5117)), -Box(Box(5118)), -Box(Box(5119)), -Box(Box(5120)), -Box(Box(5121)), -Box(Box(5122)), -Box(Box(5123)), -Box(Box(5124)), -Box(Box(5125)), -Box(Box(5126)), -Box(Box(5127)), -Box(Box(5128)), -Box(Box(5129)), -Box(Box(5130)), -Box(Box(5131)), -Box(Box(5132)), -Box(Box(5133)), -Box(Box(5134)), -Box(Box(5135)), -Box(Box(5136)), -Box(Box(5137)), -Box(Box(5138)), -Box(Box(5139)), -Box(Box(5140)), -Box(Box(5141)), -Box(Box(5142)), -Box(Box(5143)), -Box(Box(5144)), -Box(Box(5145)), -Box(Box(5146)), -Box(Box(5147)), -Box(Box(5148)), -Box(Box(5149)), -Box(Box(5150)), -Box(Box(5151)), -Box(Box(5152)), -Box(Box(5153)), -Box(Box(5154)), -Box(Box(5155)), -Box(Box(5156)), -Box(Box(5157)), -Box(Box(5158)), -Box(Box(5159)), -Box(Box(5160)), -Box(Box(5161)), -Box(Box(5162)), -Box(Box(5163)), -Box(Box(5164)), -Box(Box(5165)), -Box(Box(5166)), -Box(Box(5167)), -Box(Box(5168)), -Box(Box(5169)), -Box(Box(5170)), -Box(Box(5171)), -Box(Box(5172)), -Box(Box(5173)), -Box(Box(5174)), -Box(Box(5175)), -Box(Box(5176)), -Box(Box(5177)), -Box(Box(5178)), -Box(Box(5179)), -Box(Box(5180)), -Box(Box(5181)), -Box(Box(5182)), -Box(Box(5183)), -Box(Box(5184)), -Box(Box(5185)), -Box(Box(5186)), -Box(Box(5187)), -Box(Box(5188)), -Box(Box(5189)), -Box(Box(5190)), -Box(Box(5191)), -Box(Box(5192)), -Box(Box(5193)), -Box(Box(5194)), -Box(Box(5195)), -Box(Box(5196)), -Box(Box(5197)), -Box(Box(5198)), -Box(Box(5199)), -Box(Box(5200)), -Box(Box(5201)), -Box(Box(5202)), -Box(Box(5203)), -Box(Box(5204)), -Box(Box(5205)), -Box(Box(5206)), -Box(Box(5207)), -Box(Box(5208)), -Box(Box(5209)), -Box(Box(5210)), -Box(Box(5211)), -Box(Box(5212)), -Box(Box(5213)), -Box(Box(5214)), -Box(Box(5215)), -Box(Box(5216)), -Box(Box(5217)), -Box(Box(5218)), -Box(Box(5219)), -Box(Box(5220)), -Box(Box(5221)), -Box(Box(5222)), -Box(Box(5223)), -Box(Box(5224)), -Box(Box(5225)), -Box(Box(5226)), -Box(Box(5227)), -Box(Box(5228)), -Box(Box(5229)), -Box(Box(5230)), -Box(Box(5231)), -Box(Box(5232)), -Box(Box(5233)), -Box(Box(5234)), -Box(Box(5235)), -Box(Box(5236)), -Box(Box(5237)), -Box(Box(5238)), -Box(Box(5239)), -Box(Box(5240)), -Box(Box(5241)), -Box(Box(5242)), -Box(Box(5243)), -Box(Box(5244)), -Box(Box(5245)), -Box(Box(5246)), -Box(Box(5247)), -Box(Box(5248)), -Box(Box(5249)), -Box(Box(5250)), -Box(Box(5251)), -Box(Box(5252)), -Box(Box(5253)), -Box(Box(5254)), -Box(Box(5255)), -Box(Box(5256)), -Box(Box(5257)), -Box(Box(5258)), -Box(Box(5259)), -Box(Box(5260)), -Box(Box(5261)), -Box(Box(5262)), -Box(Box(5263)), -Box(Box(5264)), -Box(Box(5265)), -Box(Box(5266)), -Box(Box(5267)), -Box(Box(5268)), -Box(Box(5269)), -Box(Box(5270)), -Box(Box(5271)), -Box(Box(5272)), -Box(Box(5273)), -Box(Box(5274)), -Box(Box(5275)), -Box(Box(5276)), -Box(Box(5277)), -Box(Box(5278)), -Box(Box(5279)), -Box(Box(5280)), -Box(Box(5281)), -Box(Box(5282)), -Box(Box(5283)), -Box(Box(5284)), -Box(Box(5285)), -Box(Box(5286)), -Box(Box(5287)), -Box(Box(5288)), -Box(Box(5289)), -Box(Box(5290)), -Box(Box(5291)), -Box(Box(5292)), -Box(Box(5293)), -Box(Box(5294)), -Box(Box(5295)), -Box(Box(5296)), -Box(Box(5297)), -Box(Box(5298)), -Box(Box(5299)), -Box(Box(5300)), -Box(Box(5301)), -Box(Box(5302)), -Box(Box(5303)), -Box(Box(5304)), -Box(Box(5305)), -Box(Box(5306)), -Box(Box(5307)), -Box(Box(5308)), -Box(Box(5309)), -Box(Box(5310)), -Box(Box(5311)), -Box(Box(5312)), -Box(Box(5313)), -Box(Box(5314)), -Box(Box(5315)), -Box(Box(5316)), -Box(Box(5317)), -Box(Box(5318)), -Box(Box(5319)), -Box(Box(5320)), -Box(Box(5321)), -Box(Box(5322)), -Box(Box(5323)), -Box(Box(5324)), -Box(Box(5325)), -Box(Box(5326)), -Box(Box(5327)), -Box(Box(5328)), -Box(Box(5329)), -Box(Box(5330)), -Box(Box(5331)), -Box(Box(5332)), -Box(Box(5333)), -Box(Box(5334)), -Box(Box(5335)), -Box(Box(5336)), -Box(Box(5337)), -Box(Box(5338)), -Box(Box(5339)), -Box(Box(5340)), -Box(Box(5341)), -Box(Box(5342)), -Box(Box(5343)), -Box(Box(5344)), -Box(Box(5345)), -Box(Box(5346)), -Box(Box(5347)), -Box(Box(5348)), -Box(Box(5349)), -Box(Box(5350)), -Box(Box(5351)), -Box(Box(5352)), -Box(Box(5353)), -Box(Box(5354)), -Box(Box(5355)), -Box(Box(5356)), -Box(Box(5357)), -Box(Box(5358)), -Box(Box(5359)), -Box(Box(5360)), -Box(Box(5361)), -Box(Box(5362)), -Box(Box(5363)), -Box(Box(5364)), -Box(Box(5365)), -Box(Box(5366)), -Box(Box(5367)), -Box(Box(5368)), -Box(Box(5369)), -Box(Box(5370)), -Box(Box(5371)), -Box(Box(5372)), -Box(Box(5373)), -Box(Box(5374)), -Box(Box(5375)), -Box(Box(5376)), -Box(Box(5377)), -Box(Box(5378)), -Box(Box(5379)), -Box(Box(5380)), -Box(Box(5381)), -Box(Box(5382)), -Box(Box(5383)), -Box(Box(5384)), -Box(Box(5385)), -Box(Box(5386)), -Box(Box(5387)), -Box(Box(5388)), -Box(Box(5389)), -Box(Box(5390)), -Box(Box(5391)), -Box(Box(5392)), -Box(Box(5393)), -Box(Box(5394)), -Box(Box(5395)), -Box(Box(5396)), -Box(Box(5397)), -Box(Box(5398)), -Box(Box(5399)), -Box(Box(5400)), -Box(Box(5401)), -Box(Box(5402)), -Box(Box(5403)), -Box(Box(5404)), -Box(Box(5405)), -Box(Box(5406)), -Box(Box(5407)), -Box(Box(5408)), -Box(Box(5409)), -Box(Box(5410)), -Box(Box(5411)), -Box(Box(5412)), -Box(Box(5413)), -Box(Box(5414)), -Box(Box(5415)), -Box(Box(5416)), -Box(Box(5417)), -Box(Box(5418)), -Box(Box(5419)), -Box(Box(5420)), -Box(Box(5421)), -Box(Box(5422)), -Box(Box(5423)), -Box(Box(5424)), -Box(Box(5425)), -Box(Box(5426)), -Box(Box(5427)), -Box(Box(5428)), -Box(Box(5429)), -Box(Box(5430)), -Box(Box(5431)), -Box(Box(5432)), -Box(Box(5433)), -Box(Box(5434)), -Box(Box(5435)), -Box(Box(5436)), -Box(Box(5437)), -Box(Box(5438)), -Box(Box(5439)), -Box(Box(5440)), -Box(Box(5441)), -Box(Box(5442)), -Box(Box(5443)), -Box(Box(5444)), -Box(Box(5445)), -Box(Box(5446)), -Box(Box(5447)), -Box(Box(5448)), -Box(Box(5449)), -Box(Box(5450)), -Box(Box(5451)), -Box(Box(5452)), -Box(Box(5453)), -Box(Box(5454)), -Box(Box(5455)), -Box(Box(5456)), -Box(Box(5457)), -Box(Box(5458)), -Box(Box(5459)), -Box(Box(5460)), -Box(Box(5461)), -Box(Box(5462)), -Box(Box(5463)), -Box(Box(5464)), -Box(Box(5465)), -Box(Box(5466)), -Box(Box(5467)), -Box(Box(5468)), -Box(Box(5469)), -Box(Box(5470)), -Box(Box(5471)), -Box(Box(5472)), -Box(Box(5473)), -Box(Box(5474)), -Box(Box(5475)), -Box(Box(5476)), -Box(Box(5477)), -Box(Box(5478)), -Box(Box(5479)), -Box(Box(5480)), -Box(Box(5481)), -Box(Box(5482)), -Box(Box(5483)), -Box(Box(5484)), -Box(Box(5485)), -Box(Box(5486)), -Box(Box(5487)), -Box(Box(5488)), -Box(Box(5489)), -Box(Box(5490)), -Box(Box(5491)), -Box(Box(5492)), -Box(Box(5493)), -Box(Box(5494)), -Box(Box(5495)), -Box(Box(5496)), -Box(Box(5497)), -Box(Box(5498)), -Box(Box(5499)), -Box(Box(5500)), -Box(Box(5501)), -Box(Box(5502)), -Box(Box(5503)), -Box(Box(5504)), -Box(Box(5505)), -Box(Box(5506)), -Box(Box(5507)), -Box(Box(5508)), -Box(Box(5509)), -Box(Box(5510)), -Box(Box(5511)), -Box(Box(5512)), -Box(Box(5513)), -Box(Box(5514)), -Box(Box(5515)), -Box(Box(5516)), -Box(Box(5517)), -Box(Box(5518)), -Box(Box(5519)), -Box(Box(5520)), -Box(Box(5521)), -Box(Box(5522)), -Box(Box(5523)), -Box(Box(5524)), -Box(Box(5525)), -Box(Box(5526)), -Box(Box(5527)), -Box(Box(5528)), -Box(Box(5529)), -Box(Box(5530)), -Box(Box(5531)), -Box(Box(5532)), -Box(Box(5533)), -Box(Box(5534)), -Box(Box(5535)), -Box(Box(5536)), -Box(Box(5537)), -Box(Box(5538)), -Box(Box(5539)), -Box(Box(5540)), -Box(Box(5541)), -Box(Box(5542)), -Box(Box(5543)), -Box(Box(5544)), -Box(Box(5545)), -Box(Box(5546)), -Box(Box(5547)), -Box(Box(5548)), -Box(Box(5549)), -Box(Box(5550)), -Box(Box(5551)), -Box(Box(5552)), -Box(Box(5553)), -Box(Box(5554)), -Box(Box(5555)), -Box(Box(5556)), -Box(Box(5557)), -Box(Box(5558)), -Box(Box(5559)), -Box(Box(5560)), -Box(Box(5561)), -Box(Box(5562)), -Box(Box(5563)), -Box(Box(5564)), -Box(Box(5565)), -Box(Box(5566)), -Box(Box(5567)), -Box(Box(5568)), -Box(Box(5569)), -Box(Box(5570)), -Box(Box(5571)), -Box(Box(5572)), -Box(Box(5573)), -Box(Box(5574)), -Box(Box(5575)), -Box(Box(5576)), -Box(Box(5577)), -Box(Box(5578)), -Box(Box(5579)), -Box(Box(5580)), -Box(Box(5581)), -Box(Box(5582)), -Box(Box(5583)), -Box(Box(5584)), -Box(Box(5585)), -Box(Box(5586)), -Box(Box(5587)), -Box(Box(5588)), -Box(Box(5589)), -Box(Box(5590)), -Box(Box(5591)), -Box(Box(5592)), -Box(Box(5593)), -Box(Box(5594)), -Box(Box(5595)), -Box(Box(5596)), -Box(Box(5597)), -Box(Box(5598)), -Box(Box(5599)), -Box(Box(5600)), -Box(Box(5601)), -Box(Box(5602)), -Box(Box(5603)), -Box(Box(5604)), -Box(Box(5605)), -Box(Box(5606)), -Box(Box(5607)), -Box(Box(5608)), -Box(Box(5609)), -Box(Box(5610)), -Box(Box(5611)), -Box(Box(5612)), -Box(Box(5613)), -Box(Box(5614)), -Box(Box(5615)), -Box(Box(5616)), -Box(Box(5617)), -Box(Box(5618)), -Box(Box(5619)), -Box(Box(5620)), -Box(Box(5621)), -Box(Box(5622)), -Box(Box(5623)), -Box(Box(5624)), -Box(Box(5625)), -Box(Box(5626)), -Box(Box(5627)), -Box(Box(5628)), -Box(Box(5629)), -Box(Box(5630)), -Box(Box(5631)), -Box(Box(5632)), -Box(Box(5633)), -Box(Box(5634)), -Box(Box(5635)), -Box(Box(5636)), -Box(Box(5637)), -Box(Box(5638)), -Box(Box(5639)), -Box(Box(5640)), -Box(Box(5641)), -Box(Box(5642)), -Box(Box(5643)), -Box(Box(5644)), -Box(Box(5645)), -Box(Box(5646)), -Box(Box(5647)), -Box(Box(5648)), -Box(Box(5649)), -Box(Box(5650)), -Box(Box(5651)), -Box(Box(5652)), -Box(Box(5653)), -Box(Box(5654)), -Box(Box(5655)), -Box(Box(5656)), -Box(Box(5657)), -Box(Box(5658)), -Box(Box(5659)), -Box(Box(5660)), -Box(Box(5661)), -Box(Box(5662)), -Box(Box(5663)), -Box(Box(5664)), -Box(Box(5665)), -Box(Box(5666)), -Box(Box(5667)), -Box(Box(5668)), -Box(Box(5669)), -Box(Box(5670)), -Box(Box(5671)), -Box(Box(5672)), -Box(Box(5673)), -Box(Box(5674)), -Box(Box(5675)), -Box(Box(5676)), -Box(Box(5677)), -Box(Box(5678)), -Box(Box(5679)), -Box(Box(5680)), -Box(Box(5681)), -Box(Box(5682)), -Box(Box(5683)), -Box(Box(5684)), -Box(Box(5685)), -Box(Box(5686)), -Box(Box(5687)), -Box(Box(5688)), -Box(Box(5689)), -Box(Box(5690)), -Box(Box(5691)), -Box(Box(5692)), -Box(Box(5693)), -Box(Box(5694)), -Box(Box(5695)), -Box(Box(5696)), -Box(Box(5697)), -Box(Box(5698)), -Box(Box(5699)), -Box(Box(5700)), -Box(Box(5701)), -Box(Box(5702)), -Box(Box(5703)), -Box(Box(5704)), -Box(Box(5705)), -Box(Box(5706)), -Box(Box(5707)), -Box(Box(5708)), -Box(Box(5709)), -Box(Box(5710)), -Box(Box(5711)), -Box(Box(5712)), -Box(Box(5713)), -Box(Box(5714)), -Box(Box(5715)), -Box(Box(5716)), -Box(Box(5717)), -Box(Box(5718)), -Box(Box(5719)), -Box(Box(5720)), -Box(Box(5721)), -Box(Box(5722)), -Box(Box(5723)), -Box(Box(5724)), -Box(Box(5725)), -Box(Box(5726)), -Box(Box(5727)), -Box(Box(5728)), -Box(Box(5729)), -Box(Box(5730)), -Box(Box(5731)), -Box(Box(5732)), -Box(Box(5733)), -Box(Box(5734)), -Box(Box(5735)), -Box(Box(5736)), -Box(Box(5737)), -Box(Box(5738)), -Box(Box(5739)), -Box(Box(5740)), -Box(Box(5741)), -Box(Box(5742)), -Box(Box(5743)), -Box(Box(5744)), -Box(Box(5745)), -Box(Box(5746)), -Box(Box(5747)), -Box(Box(5748)), -Box(Box(5749)), -Box(Box(5750)), -Box(Box(5751)), -Box(Box(5752)), -Box(Box(5753)), -Box(Box(5754)), -Box(Box(5755)), -Box(Box(5756)), -Box(Box(5757)), -Box(Box(5758)), -Box(Box(5759)), -Box(Box(5760)), -Box(Box(5761)), -Box(Box(5762)), -Box(Box(5763)), -Box(Box(5764)), -Box(Box(5765)), -Box(Box(5766)), -Box(Box(5767)), -Box(Box(5768)), -Box(Box(5769)), -Box(Box(5770)), -Box(Box(5771)), -Box(Box(5772)), -Box(Box(5773)), -Box(Box(5774)), -Box(Box(5775)), -Box(Box(5776)), -Box(Box(5777)), -Box(Box(5778)), -Box(Box(5779)), -Box(Box(5780)), -Box(Box(5781)), -Box(Box(5782)), -Box(Box(5783)), -Box(Box(5784)), -Box(Box(5785)), -Box(Box(5786)), -Box(Box(5787)), -Box(Box(5788)), -Box(Box(5789)), -Box(Box(5790)), -Box(Box(5791)), -Box(Box(5792)), -Box(Box(5793)), -Box(Box(5794)), -Box(Box(5795)), -Box(Box(5796)), -Box(Box(5797)), -Box(Box(5798)), -Box(Box(5799)), -Box(Box(5800)), -Box(Box(5801)), -Box(Box(5802)), -Box(Box(5803)), -Box(Box(5804)), -Box(Box(5805)), -Box(Box(5806)), -Box(Box(5807)), -Box(Box(5808)), -Box(Box(5809)), -Box(Box(5810)), -Box(Box(5811)), -Box(Box(5812)), -Box(Box(5813)), -Box(Box(5814)), -Box(Box(5815)), -Box(Box(5816)), -Box(Box(5817)), -Box(Box(5818)), -Box(Box(5819)), -Box(Box(5820)), -Box(Box(5821)), -Box(Box(5822)), -Box(Box(5823)), -Box(Box(5824)), -Box(Box(5825)), -Box(Box(5826)), -Box(Box(5827)), -Box(Box(5828)), -Box(Box(5829)), -Box(Box(5830)), -Box(Box(5831)), -Box(Box(5832)), -Box(Box(5833)), -Box(Box(5834)), -Box(Box(5835)), -Box(Box(5836)), -Box(Box(5837)), -Box(Box(5838)), -Box(Box(5839)), -Box(Box(5840)), -Box(Box(5841)), -Box(Box(5842)), -Box(Box(5843)), -Box(Box(5844)), -Box(Box(5845)), -Box(Box(5846)), -Box(Box(5847)), -Box(Box(5848)), -Box(Box(5849)), -Box(Box(5850)), -Box(Box(5851)), -Box(Box(5852)), -Box(Box(5853)), -Box(Box(5854)), -Box(Box(5855)), -Box(Box(5856)), -Box(Box(5857)), -Box(Box(5858)), -Box(Box(5859)), -Box(Box(5860)), -Box(Box(5861)), -Box(Box(5862)), -Box(Box(5863)), -Box(Box(5864)), -Box(Box(5865)), -Box(Box(5866)), -Box(Box(5867)), -Box(Box(5868)), -Box(Box(5869)), -Box(Box(5870)), -Box(Box(5871)), -Box(Box(5872)), -Box(Box(5873)), -Box(Box(5874)), -Box(Box(5875)), -Box(Box(5876)), -Box(Box(5877)), -Box(Box(5878)), -Box(Box(5879)), -Box(Box(5880)), -Box(Box(5881)), -Box(Box(5882)), -Box(Box(5883)), -Box(Box(5884)), -Box(Box(5885)), -Box(Box(5886)), -Box(Box(5887)), -Box(Box(5888)), -Box(Box(5889)), -Box(Box(5890)), -Box(Box(5891)), -Box(Box(5892)), -Box(Box(5893)), -Box(Box(5894)), -Box(Box(5895)), -Box(Box(5896)), -Box(Box(5897)), -Box(Box(5898)), -Box(Box(5899)), -Box(Box(5900)), -Box(Box(5901)), -Box(Box(5902)), -Box(Box(5903)), -Box(Box(5904)), -Box(Box(5905)), -Box(Box(5906)), -Box(Box(5907)), -Box(Box(5908)), -Box(Box(5909)), -Box(Box(5910)), -Box(Box(5911)), -Box(Box(5912)), -Box(Box(5913)), -Box(Box(5914)), -Box(Box(5915)), -Box(Box(5916)), -Box(Box(5917)), -Box(Box(5918)), -Box(Box(5919)), -Box(Box(5920)), -Box(Box(5921)), -Box(Box(5922)), -Box(Box(5923)), -Box(Box(5924)), -Box(Box(5925)), -Box(Box(5926)), -Box(Box(5927)), -Box(Box(5928)), -Box(Box(5929)), -Box(Box(5930)), -Box(Box(5931)), -Box(Box(5932)), -Box(Box(5933)), -Box(Box(5934)), -Box(Box(5935)), -Box(Box(5936)), -Box(Box(5937)), -Box(Box(5938)), -Box(Box(5939)), -Box(Box(5940)), -Box(Box(5941)), -Box(Box(5942)), -Box(Box(5943)), -Box(Box(5944)), -Box(Box(5945)), -Box(Box(5946)), -Box(Box(5947)), -Box(Box(5948)), -Box(Box(5949)), -Box(Box(5950)), -Box(Box(5951)), -Box(Box(5952)), -Box(Box(5953)), -Box(Box(5954)), -Box(Box(5955)), -Box(Box(5956)), -Box(Box(5957)), -Box(Box(5958)), -Box(Box(5959)), -Box(Box(5960)), -Box(Box(5961)), -Box(Box(5962)), -Box(Box(5963)), -Box(Box(5964)), -Box(Box(5965)), -Box(Box(5966)), -Box(Box(5967)), -Box(Box(5968)), -Box(Box(5969)), -Box(Box(5970)), -Box(Box(5971)), -Box(Box(5972)), -Box(Box(5973)), -Box(Box(5974)), -Box(Box(5975)), -Box(Box(5976)), -Box(Box(5977)), -Box(Box(5978)), -Box(Box(5979)), -Box(Box(5980)), -Box(Box(5981)), -Box(Box(5982)), -Box(Box(5983)), -Box(Box(5984)), -Box(Box(5985)), -Box(Box(5986)), -Box(Box(5987)), -Box(Box(5988)), -Box(Box(5989)), -Box(Box(5990)), -Box(Box(5991)), -Box(Box(5992)), -Box(Box(5993)), -Box(Box(5994)), -Box(Box(5995)), -Box(Box(5996)), -Box(Box(5997)), -Box(Box(5998)), -Box(Box(5999)), -Box(Box(6000)), -Box(Box(6001)), -Box(Box(6002)), -Box(Box(6003)), -Box(Box(6004)), -Box(Box(6005)), -Box(Box(6006)), -Box(Box(6007)), -Box(Box(6008)), -Box(Box(6009)), -Box(Box(6010)), -Box(Box(6011)), -Box(Box(6012)), -Box(Box(6013)), -Box(Box(6014)), -Box(Box(6015)), -Box(Box(6016)), -Box(Box(6017)), -Box(Box(6018)), -Box(Box(6019)), -Box(Box(6020)), -Box(Box(6021)), -Box(Box(6022)), -Box(Box(6023)), -Box(Box(6024)), -Box(Box(6025)), -Box(Box(6026)), -Box(Box(6027)), -Box(Box(6028)), -Box(Box(6029)), -Box(Box(6030)), -Box(Box(6031)), -Box(Box(6032)), -Box(Box(6033)), -Box(Box(6034)), -Box(Box(6035)), -Box(Box(6036)), -Box(Box(6037)), -Box(Box(6038)), -Box(Box(6039)), -Box(Box(6040)), -Box(Box(6041)), -Box(Box(6042)), -Box(Box(6043)), -Box(Box(6044)), -Box(Box(6045)), -Box(Box(6046)), -Box(Box(6047)), -Box(Box(6048)), -Box(Box(6049)), -Box(Box(6050)), -Box(Box(6051)), -Box(Box(6052)), -Box(Box(6053)), -Box(Box(6054)), -Box(Box(6055)), -Box(Box(6056)), -Box(Box(6057)), -Box(Box(6058)), -Box(Box(6059)), -Box(Box(6060)), -Box(Box(6061)), -Box(Box(6062)), -Box(Box(6063)), -Box(Box(6064)), -Box(Box(6065)), -Box(Box(6066)), -Box(Box(6067)), -Box(Box(6068)), -Box(Box(6069)), -Box(Box(6070)), -Box(Box(6071)), -Box(Box(6072)), -Box(Box(6073)), -Box(Box(6074)), -Box(Box(6075)), -Box(Box(6076)), -Box(Box(6077)), -Box(Box(6078)), -Box(Box(6079)), -Box(Box(6080)), -Box(Box(6081)), -Box(Box(6082)), -Box(Box(6083)), -Box(Box(6084)), -Box(Box(6085)), -Box(Box(6086)), -Box(Box(6087)), -Box(Box(6088)), -Box(Box(6089)), -Box(Box(6090)), -Box(Box(6091)), -Box(Box(6092)), -Box(Box(6093)), -Box(Box(6094)), -Box(Box(6095)), -Box(Box(6096)), -Box(Box(6097)), -Box(Box(6098)), -Box(Box(6099)), -Box(Box(6100)), -Box(Box(6101)), -Box(Box(6102)), -Box(Box(6103)), -Box(Box(6104)), -Box(Box(6105)), -Box(Box(6106)), -Box(Box(6107)), -Box(Box(6108)), -Box(Box(6109)), -Box(Box(6110)), -Box(Box(6111)), -Box(Box(6112)), -Box(Box(6113)), -Box(Box(6114)), -Box(Box(6115)), -Box(Box(6116)), -Box(Box(6117)), -Box(Box(6118)), -Box(Box(6119)), -Box(Box(6120)), -Box(Box(6121)), -Box(Box(6122)), -Box(Box(6123)), -Box(Box(6124)), -Box(Box(6125)), -Box(Box(6126)), -Box(Box(6127)), -Box(Box(6128)), -Box(Box(6129)), -Box(Box(6130)), -Box(Box(6131)), -Box(Box(6132)), -Box(Box(6133)), -Box(Box(6134)), -Box(Box(6135)), -Box(Box(6136)), -Box(Box(6137)), -Box(Box(6138)), -Box(Box(6139)), -Box(Box(6140)), -Box(Box(6141)), -Box(Box(6142)), -Box(Box(6143)), -Box(Box(6144)), -Box(Box(6145)), -Box(Box(6146)), -Box(Box(6147)), -Box(Box(6148)), -Box(Box(6149)), -Box(Box(6150)), -Box(Box(6151)), -Box(Box(6152)), -Box(Box(6153)), -Box(Box(6154)), -Box(Box(6155)), -Box(Box(6156)), -Box(Box(6157)), -Box(Box(6158)), -Box(Box(6159)), -Box(Box(6160)), -Box(Box(6161)), -Box(Box(6162)), -Box(Box(6163)), -Box(Box(6164)), -Box(Box(6165)), -Box(Box(6166)), -Box(Box(6167)), -Box(Box(6168)), -Box(Box(6169)), -Box(Box(6170)), -Box(Box(6171)), -Box(Box(6172)), -Box(Box(6173)), -Box(Box(6174)), -Box(Box(6175)), -Box(Box(6176)), -Box(Box(6177)), -Box(Box(6178)), -Box(Box(6179)), -Box(Box(6180)), -Box(Box(6181)), -Box(Box(6182)), -Box(Box(6183)), -Box(Box(6184)), -Box(Box(6185)), -Box(Box(6186)), -Box(Box(6187)), -Box(Box(6188)), -Box(Box(6189)), -Box(Box(6190)), -Box(Box(6191)), -Box(Box(6192)), -Box(Box(6193)), -Box(Box(6194)), -Box(Box(6195)), -Box(Box(6196)), -Box(Box(6197)), -Box(Box(6198)), -Box(Box(6199)), -Box(Box(6200)), -Box(Box(6201)), -Box(Box(6202)), -Box(Box(6203)), -Box(Box(6204)), -Box(Box(6205)), -Box(Box(6206)), -Box(Box(6207)), -Box(Box(6208)), -Box(Box(6209)), -Box(Box(6210)), -Box(Box(6211)), -Box(Box(6212)), -Box(Box(6213)), -Box(Box(6214)), -Box(Box(6215)), -Box(Box(6216)), -Box(Box(6217)), -Box(Box(6218)), -Box(Box(6219)), -Box(Box(6220)), -Box(Box(6221)), -Box(Box(6222)), -Box(Box(6223)), -Box(Box(6224)), -Box(Box(6225)), -Box(Box(6226)), -Box(Box(6227)), -Box(Box(6228)), -Box(Box(6229)), -Box(Box(6230)), -Box(Box(6231)), -Box(Box(6232)), -Box(Box(6233)), -Box(Box(6234)), -Box(Box(6235)), -Box(Box(6236)), -Box(Box(6237)), -Box(Box(6238)), -Box(Box(6239)), -Box(Box(6240)), -Box(Box(6241)), -Box(Box(6242)), -Box(Box(6243)), -Box(Box(6244)), -Box(Box(6245)), -Box(Box(6246)), -Box(Box(6247)), -Box(Box(6248)), -Box(Box(6249)), -Box(Box(6250)), -Box(Box(6251)), -Box(Box(6252)), -Box(Box(6253)), -Box(Box(6254)), -Box(Box(6255)), -Box(Box(6256)), -Box(Box(6257)), -Box(Box(6258)), -Box(Box(6259)), -Box(Box(6260)), -Box(Box(6261)), -Box(Box(6262)), -Box(Box(6263)), -Box(Box(6264)), -Box(Box(6265)), -Box(Box(6266)), -Box(Box(6267)), -Box(Box(6268)), -Box(Box(6269)), -Box(Box(6270)), -Box(Box(6271)), -Box(Box(6272)), -Box(Box(6273)), -Box(Box(6274)), -Box(Box(6275)), -Box(Box(6276)), -Box(Box(6277)), -Box(Box(6278)), -Box(Box(6279)), -Box(Box(6280)), -Box(Box(6281)), -Box(Box(6282)), -Box(Box(6283)), -Box(Box(6284)), -Box(Box(6285)), -Box(Box(6286)), -Box(Box(6287)), -Box(Box(6288)), -Box(Box(6289)), -Box(Box(6290)), -Box(Box(6291)), -Box(Box(6292)), -Box(Box(6293)), -Box(Box(6294)), -Box(Box(6295)), -Box(Box(6296)), -Box(Box(6297)), -Box(Box(6298)), -Box(Box(6299)), -Box(Box(6300)), -Box(Box(6301)), -Box(Box(6302)), -Box(Box(6303)), -Box(Box(6304)), -Box(Box(6305)), -Box(Box(6306)), -Box(Box(6307)), -Box(Box(6308)), -Box(Box(6309)), -Box(Box(6310)), -Box(Box(6311)), -Box(Box(6312)), -Box(Box(6313)), -Box(Box(6314)), -Box(Box(6315)), -Box(Box(6316)), -Box(Box(6317)), -Box(Box(6318)), -Box(Box(6319)), -Box(Box(6320)), -Box(Box(6321)), -Box(Box(6322)), -Box(Box(6323)), -Box(Box(6324)), -Box(Box(6325)), -Box(Box(6326)), -Box(Box(6327)), -Box(Box(6328)), -Box(Box(6329)), -Box(Box(6330)), -Box(Box(6331)), -Box(Box(6332)), -Box(Box(6333)), -Box(Box(6334)), -Box(Box(6335)), -Box(Box(6336)), -Box(Box(6337)), -Box(Box(6338)), -Box(Box(6339)), -Box(Box(6340)), -Box(Box(6341)), -Box(Box(6342)), -Box(Box(6343)), -Box(Box(6344)), -Box(Box(6345)), -Box(Box(6346)), -Box(Box(6347)), -Box(Box(6348)), -Box(Box(6349)), -Box(Box(6350)), -Box(Box(6351)), -Box(Box(6352)), -Box(Box(6353)), -Box(Box(6354)), -Box(Box(6355)), -Box(Box(6356)), -Box(Box(6357)), -Box(Box(6358)), -Box(Box(6359)), -Box(Box(6360)), -Box(Box(6361)), -Box(Box(6362)), -Box(Box(6363)), -Box(Box(6364)), -Box(Box(6365)), -Box(Box(6366)), -Box(Box(6367)), -Box(Box(6368)), -Box(Box(6369)), -Box(Box(6370)), -Box(Box(6371)), -Box(Box(6372)), -Box(Box(6373)), -Box(Box(6374)), -Box(Box(6375)), -Box(Box(6376)), -Box(Box(6377)), -Box(Box(6378)), -Box(Box(6379)), -Box(Box(6380)), -Box(Box(6381)), -Box(Box(6382)), -Box(Box(6383)), -Box(Box(6384)), -Box(Box(6385)), -Box(Box(6386)), -Box(Box(6387)), -Box(Box(6388)), -Box(Box(6389)), -Box(Box(6390)), -Box(Box(6391)), -Box(Box(6392)), -Box(Box(6393)), -Box(Box(6394)), -Box(Box(6395)), -Box(Box(6396)), -Box(Box(6397)), -Box(Box(6398)), -Box(Box(6399)), -Box(Box(6400)), -Box(Box(6401)), -Box(Box(6402)), -Box(Box(6403)), -Box(Box(6404)), -Box(Box(6405)), -Box(Box(6406)), -Box(Box(6407)), -Box(Box(6408)), -Box(Box(6409)), -Box(Box(6410)), -Box(Box(6411)), -Box(Box(6412)), -Box(Box(6413)), -Box(Box(6414)), -Box(Box(6415)), -Box(Box(6416)), -Box(Box(6417)), -Box(Box(6418)), -Box(Box(6419)), -Box(Box(6420)), -Box(Box(6421)), -Box(Box(6422)), -Box(Box(6423)), -Box(Box(6424)), -Box(Box(6425)), -Box(Box(6426)), -Box(Box(6427)), -Box(Box(6428)), -Box(Box(6429)), -Box(Box(6430)), -Box(Box(6431)), -Box(Box(6432)), -Box(Box(6433)), -Box(Box(6434)), -Box(Box(6435)), -Box(Box(6436)), -Box(Box(6437)), -Box(Box(6438)), -Box(Box(6439)), -Box(Box(6440)), -Box(Box(6441)), -Box(Box(6442)), -Box(Box(6443)), -Box(Box(6444)), -Box(Box(6445)), -Box(Box(6446)), -Box(Box(6447)), -Box(Box(6448)), -Box(Box(6449)), -Box(Box(6450)), -Box(Box(6451)), -Box(Box(6452)), -Box(Box(6453)), -Box(Box(6454)), -Box(Box(6455)), -Box(Box(6456)), -Box(Box(6457)), -Box(Box(6458)), -Box(Box(6459)), -Box(Box(6460)), -Box(Box(6461)), -Box(Box(6462)), -Box(Box(6463)), -Box(Box(6464)), -Box(Box(6465)), -Box(Box(6466)), -Box(Box(6467)), -Box(Box(6468)), -Box(Box(6469)), -Box(Box(6470)), -Box(Box(6471)), -Box(Box(6472)), -Box(Box(6473)), -Box(Box(6474)), -Box(Box(6475)), -Box(Box(6476)), -Box(Box(6477)), -Box(Box(6478)), -Box(Box(6479)), -Box(Box(6480)), -Box(Box(6481)), -Box(Box(6482)), -Box(Box(6483)), -Box(Box(6484)), -Box(Box(6485)), -Box(Box(6486)), -Box(Box(6487)), -Box(Box(6488)), -Box(Box(6489)), -Box(Box(6490)), -Box(Box(6491)), -Box(Box(6492)), -Box(Box(6493)), -Box(Box(6494)), -Box(Box(6495)), -Box(Box(6496)), -Box(Box(6497)), -Box(Box(6498)), -Box(Box(6499)), -Box(Box(6500)), -Box(Box(6501)), -Box(Box(6502)), -Box(Box(6503)), -Box(Box(6504)), -Box(Box(6505)), -Box(Box(6506)), -Box(Box(6507)), -Box(Box(6508)), -Box(Box(6509)), -Box(Box(6510)), -Box(Box(6511)), -Box(Box(6512)), -Box(Box(6513)), -Box(Box(6514)), -Box(Box(6515)), -Box(Box(6516)), -Box(Box(6517)), -Box(Box(6518)), -Box(Box(6519)), -Box(Box(6520)), -Box(Box(6521)), -Box(Box(6522)), -Box(Box(6523)), -Box(Box(6524)), -Box(Box(6525)), -Box(Box(6526)), -Box(Box(6527)), -Box(Box(6528)), -Box(Box(6529)), -Box(Box(6530)), -Box(Box(6531)), -Box(Box(6532)), -Box(Box(6533)), -Box(Box(6534)), -Box(Box(6535)), -Box(Box(6536)), -Box(Box(6537)), -Box(Box(6538)), -Box(Box(6539)), -Box(Box(6540)), -Box(Box(6541)), -Box(Box(6542)), -Box(Box(6543)), -Box(Box(6544)), -Box(Box(6545)), -Box(Box(6546)), -Box(Box(6547)), -Box(Box(6548)), -Box(Box(6549)), -Box(Box(6550)), -Box(Box(6551)), -Box(Box(6552)), -Box(Box(6553)), -Box(Box(6554)), -Box(Box(6555)), -Box(Box(6556)), -Box(Box(6557)), -Box(Box(6558)), -Box(Box(6559)), -Box(Box(6560)), -Box(Box(6561)), -Box(Box(6562)), -Box(Box(6563)), -Box(Box(6564)), -Box(Box(6565)), -Box(Box(6566)), -Box(Box(6567)), -Box(Box(6568)), -Box(Box(6569)), -Box(Box(6570)), -Box(Box(6571)), -Box(Box(6572)), -Box(Box(6573)), -Box(Box(6574)), -Box(Box(6575)), -Box(Box(6576)), -Box(Box(6577)), -Box(Box(6578)), -Box(Box(6579)), -Box(Box(6580)), -Box(Box(6581)), -Box(Box(6582)), -Box(Box(6583)), -Box(Box(6584)), -Box(Box(6585)), -Box(Box(6586)), -Box(Box(6587)), -Box(Box(6588)), -Box(Box(6589)), -Box(Box(6590)), -Box(Box(6591)), -Box(Box(6592)), -Box(Box(6593)), -Box(Box(6594)), -Box(Box(6595)), -Box(Box(6596)), -Box(Box(6597)), -Box(Box(6598)), -Box(Box(6599)), -Box(Box(6600)), -Box(Box(6601)), -Box(Box(6602)), -Box(Box(6603)), -Box(Box(6604)), -Box(Box(6605)), -Box(Box(6606)), -Box(Box(6607)), -Box(Box(6608)), -Box(Box(6609)), -Box(Box(6610)), -Box(Box(6611)), -Box(Box(6612)), -Box(Box(6613)), -Box(Box(6614)), -Box(Box(6615)), -Box(Box(6616)), -Box(Box(6617)), -Box(Box(6618)), -Box(Box(6619)), -Box(Box(6620)), -Box(Box(6621)), -Box(Box(6622)), -Box(Box(6623)), -Box(Box(6624)), -Box(Box(6625)), -Box(Box(6626)), -Box(Box(6627)), -Box(Box(6628)), -Box(Box(6629)), -Box(Box(6630)), -Box(Box(6631)), -Box(Box(6632)), -Box(Box(6633)), -Box(Box(6634)), -Box(Box(6635)), -Box(Box(6636)), -Box(Box(6637)), -Box(Box(6638)), -Box(Box(6639)), -Box(Box(6640)), -Box(Box(6641)), -Box(Box(6642)), -Box(Box(6643)), -Box(Box(6644)), -Box(Box(6645)), -Box(Box(6646)), -Box(Box(6647)), -Box(Box(6648)), -Box(Box(6649)), -Box(Box(6650)), -Box(Box(6651)), -Box(Box(6652)), -Box(Box(6653)), -Box(Box(6654)), -Box(Box(6655)), -Box(Box(6656)), -Box(Box(6657)), -Box(Box(6658)), -Box(Box(6659)), -Box(Box(6660)), -Box(Box(6661)), -Box(Box(6662)), -Box(Box(6663)), -Box(Box(6664)), -Box(Box(6665)), -Box(Box(6666)), -Box(Box(6667)), -Box(Box(6668)), -Box(Box(6669)), -Box(Box(6670)), -Box(Box(6671)), -Box(Box(6672)), -Box(Box(6673)), -Box(Box(6674)), -Box(Box(6675)), -Box(Box(6676)), -Box(Box(6677)), -Box(Box(6678)), -Box(Box(6679)), -Box(Box(6680)), -Box(Box(6681)), -Box(Box(6682)), -Box(Box(6683)), -Box(Box(6684)), -Box(Box(6685)), -Box(Box(6686)), -Box(Box(6687)), -Box(Box(6688)), -Box(Box(6689)), -Box(Box(6690)), -Box(Box(6691)), -Box(Box(6692)), -Box(Box(6693)), -Box(Box(6694)), -Box(Box(6695)), -Box(Box(6696)), -Box(Box(6697)), -Box(Box(6698)), -Box(Box(6699)), -Box(Box(6700)), -Box(Box(6701)), -Box(Box(6702)), -Box(Box(6703)), -Box(Box(6704)), -Box(Box(6705)), -Box(Box(6706)), -Box(Box(6707)), -Box(Box(6708)), -Box(Box(6709)), -Box(Box(6710)), -Box(Box(6711)), -Box(Box(6712)), -Box(Box(6713)), -Box(Box(6714)), -Box(Box(6715)), -Box(Box(6716)), -Box(Box(6717)), -Box(Box(6718)), -Box(Box(6719)), -Box(Box(6720)), -Box(Box(6721)), -Box(Box(6722)), -Box(Box(6723)), -Box(Box(6724)), -Box(Box(6725)), -Box(Box(6726)), -Box(Box(6727)), -Box(Box(6728)), -Box(Box(6729)), -Box(Box(6730)), -Box(Box(6731)), -Box(Box(6732)), -Box(Box(6733)), -Box(Box(6734)), -Box(Box(6735)), -Box(Box(6736)), -Box(Box(6737)), -Box(Box(6738)), -Box(Box(6739)), -Box(Box(6740)), -Box(Box(6741)), -Box(Box(6742)), -Box(Box(6743)), -Box(Box(6744)), -Box(Box(6745)), -Box(Box(6746)), -Box(Box(6747)), -Box(Box(6748)), -Box(Box(6749)), -Box(Box(6750)), -Box(Box(6751)), -Box(Box(6752)), -Box(Box(6753)), -Box(Box(6754)), -Box(Box(6755)), -Box(Box(6756)), -Box(Box(6757)), -Box(Box(6758)), -Box(Box(6759)), -Box(Box(6760)), -Box(Box(6761)), -Box(Box(6762)), -Box(Box(6763)), -Box(Box(6764)), -Box(Box(6765)), -Box(Box(6766)), -Box(Box(6767)), -Box(Box(6768)), -Box(Box(6769)), -Box(Box(6770)), -Box(Box(6771)), -Box(Box(6772)), -Box(Box(6773)), -Box(Box(6774)), -Box(Box(6775)), -Box(Box(6776)), -Box(Box(6777)), -Box(Box(6778)), -Box(Box(6779)), -Box(Box(6780)), -Box(Box(6781)), -Box(Box(6782)), -Box(Box(6783)), -Box(Box(6784)), -Box(Box(6785)), -Box(Box(6786)), -Box(Box(6787)), -Box(Box(6788)), -Box(Box(6789)), -Box(Box(6790)), -Box(Box(6791)), -Box(Box(6792)), -Box(Box(6793)), -Box(Box(6794)), -Box(Box(6795)), -Box(Box(6796)), -Box(Box(6797)), -Box(Box(6798)), -Box(Box(6799)), -Box(Box(6800)), -Box(Box(6801)), -Box(Box(6802)), -Box(Box(6803)), -Box(Box(6804)), -Box(Box(6805)), -Box(Box(6806)), -Box(Box(6807)), -Box(Box(6808)), -Box(Box(6809)), -Box(Box(6810)), -Box(Box(6811)), -Box(Box(6812)), -Box(Box(6813)), -Box(Box(6814)), -Box(Box(6815)), -Box(Box(6816)), -Box(Box(6817)), -Box(Box(6818)), -Box(Box(6819)), -Box(Box(6820)), -Box(Box(6821)), -Box(Box(6822)), -Box(Box(6823)), -Box(Box(6824)), -Box(Box(6825)), -Box(Box(6826)), -Box(Box(6827)), -Box(Box(6828)), -Box(Box(6829)), -Box(Box(6830)), -Box(Box(6831)), -Box(Box(6832)), -Box(Box(6833)), -Box(Box(6834)), -Box(Box(6835)), -Box(Box(6836)), -Box(Box(6837)), -Box(Box(6838)), -Box(Box(6839)), -Box(Box(6840)), -Box(Box(6841)), -Box(Box(6842)), -Box(Box(6843)), -Box(Box(6844)), -Box(Box(6845)), -Box(Box(6846)), -Box(Box(6847)), -Box(Box(6848)), -Box(Box(6849)), -Box(Box(6850)), -Box(Box(6851)), -Box(Box(6852)), -Box(Box(6853)), -Box(Box(6854)), -Box(Box(6855)), -Box(Box(6856)), -Box(Box(6857)), -Box(Box(6858)), -Box(Box(6859)), -Box(Box(6860)), -Box(Box(6861)), -Box(Box(6862)), -Box(Box(6863)), -Box(Box(6864)), -Box(Box(6865)), -Box(Box(6866)), -Box(Box(6867)), -Box(Box(6868)), -Box(Box(6869)), -Box(Box(6870)), -Box(Box(6871)), -Box(Box(6872)), -Box(Box(6873)), -Box(Box(6874)), -Box(Box(6875)), -Box(Box(6876)), -Box(Box(6877)), -Box(Box(6878)), -Box(Box(6879)), -Box(Box(6880)), -Box(Box(6881)), -Box(Box(6882)), -Box(Box(6883)), -Box(Box(6884)), -Box(Box(6885)), -Box(Box(6886)), -Box(Box(6887)), -Box(Box(6888)), -Box(Box(6889)), -Box(Box(6890)), -Box(Box(6891)), -Box(Box(6892)), -Box(Box(6893)), -Box(Box(6894)), -Box(Box(6895)), -Box(Box(6896)), -Box(Box(6897)), -Box(Box(6898)), -Box(Box(6899)), -Box(Box(6900)), -Box(Box(6901)), -Box(Box(6902)), -Box(Box(6903)), -Box(Box(6904)), -Box(Box(6905)), -Box(Box(6906)), -Box(Box(6907)), -Box(Box(6908)), -Box(Box(6909)), -Box(Box(6910)), -Box(Box(6911)), -Box(Box(6912)), -Box(Box(6913)), -Box(Box(6914)), -Box(Box(6915)), -Box(Box(6916)), -Box(Box(6917)), -Box(Box(6918)), -Box(Box(6919)), -Box(Box(6920)), -Box(Box(6921)), -Box(Box(6922)), -Box(Box(6923)), -Box(Box(6924)), -Box(Box(6925)), -Box(Box(6926)), -Box(Box(6927)), -Box(Box(6928)), -Box(Box(6929)), -Box(Box(6930)), -Box(Box(6931)), -Box(Box(6932)), -Box(Box(6933)), -Box(Box(6934)), -Box(Box(6935)), -Box(Box(6936)), -Box(Box(6937)), -Box(Box(6938)), -Box(Box(6939)), -Box(Box(6940)), -Box(Box(6941)), -Box(Box(6942)), -Box(Box(6943)), -Box(Box(6944)), -Box(Box(6945)), -Box(Box(6946)), -Box(Box(6947)), -Box(Box(6948)), -Box(Box(6949)), -Box(Box(6950)), -Box(Box(6951)), -Box(Box(6952)), -Box(Box(6953)), -Box(Box(6954)), -Box(Box(6955)), -Box(Box(6956)), -Box(Box(6957)), -Box(Box(6958)), -Box(Box(6959)), -Box(Box(6960)), -Box(Box(6961)), -Box(Box(6962)), -Box(Box(6963)), -Box(Box(6964)), -Box(Box(6965)), -Box(Box(6966)), -Box(Box(6967)), -Box(Box(6968)), -Box(Box(6969)), -Box(Box(6970)), -Box(Box(6971)), -Box(Box(6972)), -Box(Box(6973)), -Box(Box(6974)), -Box(Box(6975)), -Box(Box(6976)), -Box(Box(6977)), -Box(Box(6978)), -Box(Box(6979)), -Box(Box(6980)), -Box(Box(6981)), -Box(Box(6982)), -Box(Box(6983)), -Box(Box(6984)), -Box(Box(6985)), -Box(Box(6986)), -Box(Box(6987)), -Box(Box(6988)), -Box(Box(6989)), -Box(Box(6990)), -Box(Box(6991)), -Box(Box(6992)), -Box(Box(6993)), -Box(Box(6994)), -Box(Box(6995)), -Box(Box(6996)), -Box(Box(6997)), -Box(Box(6998)), -Box(Box(6999)), -Box(Box(7000)), -Box(Box(7001)), -Box(Box(7002)), -Box(Box(7003)), -Box(Box(7004)), -Box(Box(7005)), -Box(Box(7006)), -Box(Box(7007)), -Box(Box(7008)), -Box(Box(7009)), -Box(Box(7010)), -Box(Box(7011)), -Box(Box(7012)), -Box(Box(7013)), -Box(Box(7014)), -Box(Box(7015)), -Box(Box(7016)), -Box(Box(7017)), -Box(Box(7018)), -Box(Box(7019)), -Box(Box(7020)), -Box(Box(7021)), -Box(Box(7022)), -Box(Box(7023)), -Box(Box(7024)), -Box(Box(7025)), -Box(Box(7026)), -Box(Box(7027)), -Box(Box(7028)), -Box(Box(7029)), -Box(Box(7030)), -Box(Box(7031)), -Box(Box(7032)), -Box(Box(7033)), -Box(Box(7034)), -Box(Box(7035)), -Box(Box(7036)), -Box(Box(7037)), -Box(Box(7038)), -Box(Box(7039)), -Box(Box(7040)), -Box(Box(7041)), -Box(Box(7042)), -Box(Box(7043)), -Box(Box(7044)), -Box(Box(7045)), -Box(Box(7046)), -Box(Box(7047)), -Box(Box(7048)), -Box(Box(7049)), -Box(Box(7050)), -Box(Box(7051)), -Box(Box(7052)), -Box(Box(7053)), -Box(Box(7054)), -Box(Box(7055)), -Box(Box(7056)), -Box(Box(7057)), -Box(Box(7058)), -Box(Box(7059)), -Box(Box(7060)), -Box(Box(7061)), -Box(Box(7062)), -Box(Box(7063)), -Box(Box(7064)), -Box(Box(7065)), -Box(Box(7066)), -Box(Box(7067)), -Box(Box(7068)), -Box(Box(7069)), -Box(Box(7070)), -Box(Box(7071)), -Box(Box(7072)), -Box(Box(7073)), -Box(Box(7074)), -Box(Box(7075)), -Box(Box(7076)), -Box(Box(7077)), -Box(Box(7078)), -Box(Box(7079)), -Box(Box(7080)), -Box(Box(7081)), -Box(Box(7082)), -Box(Box(7083)), -Box(Box(7084)), -Box(Box(7085)), -Box(Box(7086)), -Box(Box(7087)), -Box(Box(7088)), -Box(Box(7089)), -Box(Box(7090)), -Box(Box(7091)), -Box(Box(7092)), -Box(Box(7093)), -Box(Box(7094)), -Box(Box(7095)), -Box(Box(7096)), -Box(Box(7097)), -Box(Box(7098)), -Box(Box(7099)), -Box(Box(7100)), -Box(Box(7101)), -Box(Box(7102)), -Box(Box(7103)), -Box(Box(7104)), -Box(Box(7105)), -Box(Box(7106)), -Box(Box(7107)), -Box(Box(7108)), -Box(Box(7109)), -Box(Box(7110)), -Box(Box(7111)), -Box(Box(7112)), -Box(Box(7113)), -Box(Box(7114)), -Box(Box(7115)), -Box(Box(7116)), -Box(Box(7117)), -Box(Box(7118)), -Box(Box(7119)), -Box(Box(7120)), -Box(Box(7121)), -Box(Box(7122)), -Box(Box(7123)), -Box(Box(7124)), -Box(Box(7125)), -Box(Box(7126)), -Box(Box(7127)), -Box(Box(7128)), -Box(Box(7129)), -Box(Box(7130)), -Box(Box(7131)), -Box(Box(7132)), -Box(Box(7133)), -Box(Box(7134)), -Box(Box(7135)), -Box(Box(7136)), -Box(Box(7137)), -Box(Box(7138)), -Box(Box(7139)), -Box(Box(7140)), -Box(Box(7141)), -Box(Box(7142)), -Box(Box(7143)), -Box(Box(7144)), -Box(Box(7145)), -Box(Box(7146)), -Box(Box(7147)), -Box(Box(7148)), -Box(Box(7149)), -Box(Box(7150)), -Box(Box(7151)), -Box(Box(7152)), -Box(Box(7153)), -Box(Box(7154)), -Box(Box(7155)), -Box(Box(7156)), -Box(Box(7157)), -Box(Box(7158)), -Box(Box(7159)), -Box(Box(7160)), -Box(Box(7161)), -Box(Box(7162)), -Box(Box(7163)), -Box(Box(7164)), -Box(Box(7165)), -Box(Box(7166)), -Box(Box(7167)), -Box(Box(7168)), -Box(Box(7169)), -Box(Box(7170)), -Box(Box(7171)), -Box(Box(7172)), -Box(Box(7173)), -Box(Box(7174)), -Box(Box(7175)), -Box(Box(7176)), -Box(Box(7177)), -Box(Box(7178)), -Box(Box(7179)), -Box(Box(7180)), -Box(Box(7181)), -Box(Box(7182)), -Box(Box(7183)), -Box(Box(7184)), -Box(Box(7185)), -Box(Box(7186)), -Box(Box(7187)), -Box(Box(7188)), -Box(Box(7189)), -Box(Box(7190)), -Box(Box(7191)), -Box(Box(7192)), -Box(Box(7193)), -Box(Box(7194)), -Box(Box(7195)), -Box(Box(7196)), -Box(Box(7197)), -Box(Box(7198)), -Box(Box(7199)), -Box(Box(7200)), -Box(Box(7201)), -Box(Box(7202)), -Box(Box(7203)), -Box(Box(7204)), -Box(Box(7205)), -Box(Box(7206)), -Box(Box(7207)), -Box(Box(7208)), -Box(Box(7209)), -Box(Box(7210)), -Box(Box(7211)), -Box(Box(7212)), -Box(Box(7213)), -Box(Box(7214)), -Box(Box(7215)), -Box(Box(7216)), -Box(Box(7217)), -Box(Box(7218)), -Box(Box(7219)), -Box(Box(7220)), -Box(Box(7221)), -Box(Box(7222)), -Box(Box(7223)), -Box(Box(7224)), -Box(Box(7225)), -Box(Box(7226)), -Box(Box(7227)), -Box(Box(7228)), -Box(Box(7229)), -Box(Box(7230)), -Box(Box(7231)), -Box(Box(7232)), -Box(Box(7233)), -Box(Box(7234)), -Box(Box(7235)), -Box(Box(7236)), -Box(Box(7237)), -Box(Box(7238)), -Box(Box(7239)), -Box(Box(7240)), -Box(Box(7241)), -Box(Box(7242)), -Box(Box(7243)), -Box(Box(7244)), -Box(Box(7245)), -Box(Box(7246)), -Box(Box(7247)), -Box(Box(7248)), -Box(Box(7249)), -Box(Box(7250)), -Box(Box(7251)), -Box(Box(7252)), -Box(Box(7253)), -Box(Box(7254)), -Box(Box(7255)), -Box(Box(7256)), -Box(Box(7257)), -Box(Box(7258)), -Box(Box(7259)), -Box(Box(7260)), -Box(Box(7261)), -Box(Box(7262)), -Box(Box(7263)), -Box(Box(7264)), -Box(Box(7265)), -Box(Box(7266)), -Box(Box(7267)), -Box(Box(7268)), -Box(Box(7269)), -Box(Box(7270)), -Box(Box(7271)), -Box(Box(7272)), -Box(Box(7273)), -Box(Box(7274)), -Box(Box(7275)), -Box(Box(7276)), -Box(Box(7277)), -Box(Box(7278)), -Box(Box(7279)), -Box(Box(7280)), -Box(Box(7281)), -Box(Box(7282)), -Box(Box(7283)), -Box(Box(7284)), -Box(Box(7285)), -Box(Box(7286)), -Box(Box(7287)), -Box(Box(7288)), -Box(Box(7289)), -Box(Box(7290)), -Box(Box(7291)), -Box(Box(7292)), -Box(Box(7293)), -Box(Box(7294)), -Box(Box(7295)), -Box(Box(7296)), -Box(Box(7297)), -Box(Box(7298)), -Box(Box(7299)), -Box(Box(7300)), -Box(Box(7301)), -Box(Box(7302)), -Box(Box(7303)), -Box(Box(7304)), -Box(Box(7305)), -Box(Box(7306)), -Box(Box(7307)), -Box(Box(7308)), -Box(Box(7309)), -Box(Box(7310)), -Box(Box(7311)), -Box(Box(7312)), -Box(Box(7313)), -Box(Box(7314)), -Box(Box(7315)), -Box(Box(7316)), -Box(Box(7317)), -Box(Box(7318)), -Box(Box(7319)), -Box(Box(7320)), -Box(Box(7321)), -Box(Box(7322)), -Box(Box(7323)), -Box(Box(7324)), -Box(Box(7325)), -Box(Box(7326)), -Box(Box(7327)), -Box(Box(7328)), -Box(Box(7329)), -Box(Box(7330)), -Box(Box(7331)), -Box(Box(7332)), -Box(Box(7333)), -Box(Box(7334)), -Box(Box(7335)), -Box(Box(7336)), -Box(Box(7337)), -Box(Box(7338)), -Box(Box(7339)), -Box(Box(7340)), -Box(Box(7341)), -Box(Box(7342)), -Box(Box(7343)), -Box(Box(7344)), -Box(Box(7345)), -Box(Box(7346)), -Box(Box(7347)), -Box(Box(7348)), -Box(Box(7349)), -Box(Box(7350)), -Box(Box(7351)), -Box(Box(7352)), -Box(Box(7353)), -Box(Box(7354)), -Box(Box(7355)), -Box(Box(7356)), -Box(Box(7357)), -Box(Box(7358)), -Box(Box(7359)), -Box(Box(7360)), -Box(Box(7361)), -Box(Box(7362)), -Box(Box(7363)), -Box(Box(7364)), -Box(Box(7365)), -Box(Box(7366)), -Box(Box(7367)), -Box(Box(7368)), -Box(Box(7369)), -Box(Box(7370)), -Box(Box(7371)), -Box(Box(7372)), -Box(Box(7373)), -Box(Box(7374)), -Box(Box(7375)), -Box(Box(7376)), -Box(Box(7377)), -Box(Box(7378)), -Box(Box(7379)), -Box(Box(7380)), -Box(Box(7381)), -Box(Box(7382)), -Box(Box(7383)), -Box(Box(7384)), -Box(Box(7385)), -Box(Box(7386)), -Box(Box(7387)), -Box(Box(7388)), -Box(Box(7389)), -Box(Box(7390)), -Box(Box(7391)), -Box(Box(7392)), -Box(Box(7393)), -Box(Box(7394)), -Box(Box(7395)), -Box(Box(7396)), -Box(Box(7397)), -Box(Box(7398)), -Box(Box(7399)), -Box(Box(7400)), -Box(Box(7401)), -Box(Box(7402)), -Box(Box(7403)), -Box(Box(7404)), -Box(Box(7405)), -Box(Box(7406)), -Box(Box(7407)), -Box(Box(7408)), -Box(Box(7409)), -Box(Box(7410)), -Box(Box(7411)), -Box(Box(7412)), -Box(Box(7413)), -Box(Box(7414)), -Box(Box(7415)), -Box(Box(7416)), -Box(Box(7417)), -Box(Box(7418)), -Box(Box(7419)), -Box(Box(7420)), -Box(Box(7421)), -Box(Box(7422)), -Box(Box(7423)), -Box(Box(7424)), -Box(Box(7425)), -Box(Box(7426)), -Box(Box(7427)), -Box(Box(7428)), -Box(Box(7429)), -Box(Box(7430)), -Box(Box(7431)), -Box(Box(7432)), -Box(Box(7433)), -Box(Box(7434)), -Box(Box(7435)), -Box(Box(7436)), -Box(Box(7437)), -Box(Box(7438)), -Box(Box(7439)), -Box(Box(7440)), -Box(Box(7441)), -Box(Box(7442)), -Box(Box(7443)), -Box(Box(7444)), -Box(Box(7445)), -Box(Box(7446)), -Box(Box(7447)), -Box(Box(7448)), -Box(Box(7449)), -Box(Box(7450)), -Box(Box(7451)), -Box(Box(7452)), -Box(Box(7453)), -Box(Box(7454)), -Box(Box(7455)), -Box(Box(7456)), -Box(Box(7457)), -Box(Box(7458)), -Box(Box(7459)), -Box(Box(7460)), -Box(Box(7461)), -Box(Box(7462)), -Box(Box(7463)), -Box(Box(7464)), -Box(Box(7465)), -Box(Box(7466)), -Box(Box(7467)), -Box(Box(7468)), -Box(Box(7469)), -Box(Box(7470)), -Box(Box(7471)), -Box(Box(7472)), -Box(Box(7473)), -Box(Box(7474)), -Box(Box(7475)), -Box(Box(7476)), -Box(Box(7477)), -Box(Box(7478)), -Box(Box(7479)), -Box(Box(7480)), -Box(Box(7481)), -Box(Box(7482)), -Box(Box(7483)), -Box(Box(7484)), -Box(Box(7485)), -Box(Box(7486)), -Box(Box(7487)), -Box(Box(7488)), -Box(Box(7489)), -Box(Box(7490)), -Box(Box(7491)), -Box(Box(7492)), -Box(Box(7493)), -Box(Box(7494)), -Box(Box(7495)), -Box(Box(7496)), -Box(Box(7497)), -Box(Box(7498)), -Box(Box(7499)), -Box(Box(7500)), -Box(Box(7501)), -Box(Box(7502)), -Box(Box(7503)), -Box(Box(7504)), -Box(Box(7505)), -Box(Box(7506)), -Box(Box(7507)), -Box(Box(7508)), -Box(Box(7509)), -Box(Box(7510)), -Box(Box(7511)), -Box(Box(7512)), -Box(Box(7513)), -Box(Box(7514)), -Box(Box(7515)), -Box(Box(7516)), -Box(Box(7517)), -Box(Box(7518)), -Box(Box(7519)), -Box(Box(7520)), -Box(Box(7521)), -Box(Box(7522)), -Box(Box(7523)), -Box(Box(7524)), -Box(Box(7525)), -Box(Box(7526)), -Box(Box(7527)), -Box(Box(7528)), -Box(Box(7529)), -Box(Box(7530)), -Box(Box(7531)), -Box(Box(7532)), -Box(Box(7533)), -Box(Box(7534)), -Box(Box(7535)), -Box(Box(7536)), -Box(Box(7537)), -Box(Box(7538)), -Box(Box(7539)), -Box(Box(7540)), -Box(Box(7541)), -Box(Box(7542)), -Box(Box(7543)), -Box(Box(7544)), -Box(Box(7545)), -Box(Box(7546)), -Box(Box(7547)), -Box(Box(7548)), -Box(Box(7549)), -Box(Box(7550)), -Box(Box(7551)), -Box(Box(7552)), -Box(Box(7553)), -Box(Box(7554)), -Box(Box(7555)), -Box(Box(7556)), -Box(Box(7557)), -Box(Box(7558)), -Box(Box(7559)), -Box(Box(7560)), -Box(Box(7561)), -Box(Box(7562)), -Box(Box(7563)), -Box(Box(7564)), -Box(Box(7565)), -Box(Box(7566)), -Box(Box(7567)), -Box(Box(7568)), -Box(Box(7569)), -Box(Box(7570)), -Box(Box(7571)), -Box(Box(7572)), -Box(Box(7573)), -Box(Box(7574)), -Box(Box(7575)), -Box(Box(7576)), -Box(Box(7577)), -Box(Box(7578)), -Box(Box(7579)), -Box(Box(7580)), -Box(Box(7581)), -Box(Box(7582)), -Box(Box(7583)), -Box(Box(7584)), -Box(Box(7585)), -Box(Box(7586)), -Box(Box(7587)), -Box(Box(7588)), -Box(Box(7589)), -Box(Box(7590)), -Box(Box(7591)), -Box(Box(7592)), -Box(Box(7593)), -Box(Box(7594)), -Box(Box(7595)), -Box(Box(7596)), -Box(Box(7597)), -Box(Box(7598)), -Box(Box(7599)), -Box(Box(7600)), -Box(Box(7601)), -Box(Box(7602)), -Box(Box(7603)), -Box(Box(7604)), -Box(Box(7605)), -Box(Box(7606)), -Box(Box(7607)), -Box(Box(7608)), -Box(Box(7609)), -Box(Box(7610)), -Box(Box(7611)), -Box(Box(7612)), -Box(Box(7613)), -Box(Box(7614)), -Box(Box(7615)), -Box(Box(7616)), -Box(Box(7617)), -Box(Box(7618)), -Box(Box(7619)), -Box(Box(7620)), -Box(Box(7621)), -Box(Box(7622)), -Box(Box(7623)), -Box(Box(7624)), -Box(Box(7625)), -Box(Box(7626)), -Box(Box(7627)), -Box(Box(7628)), -Box(Box(7629)), -Box(Box(7630)), -Box(Box(7631)), -Box(Box(7632)), -Box(Box(7633)), -Box(Box(7634)), -Box(Box(7635)), -Box(Box(7636)), -Box(Box(7637)), -Box(Box(7638)), -Box(Box(7639)), -Box(Box(7640)), -Box(Box(7641)), -Box(Box(7642)), -Box(Box(7643)), -Box(Box(7644)), -Box(Box(7645)), -Box(Box(7646)), -Box(Box(7647)), -Box(Box(7648)), -Box(Box(7649)), -Box(Box(7650)), -Box(Box(7651)), -Box(Box(7652)), -Box(Box(7653)), -Box(Box(7654)), -Box(Box(7655)), -Box(Box(7656)), -Box(Box(7657)), -Box(Box(7658)), -Box(Box(7659)), -Box(Box(7660)), -Box(Box(7661)), -Box(Box(7662)), -Box(Box(7663)), -Box(Box(7664)), -Box(Box(7665)), -Box(Box(7666)), -Box(Box(7667)), -Box(Box(7668)), -Box(Box(7669)), -Box(Box(7670)), -Box(Box(7671)), -Box(Box(7672)), -Box(Box(7673)), -Box(Box(7674)), -Box(Box(7675)), -Box(Box(7676)), -Box(Box(7677)), -Box(Box(7678)), -Box(Box(7679)), -Box(Box(7680)), -Box(Box(7681)), -Box(Box(7682)), -Box(Box(7683)), -Box(Box(7684)), -Box(Box(7685)), -Box(Box(7686)), -Box(Box(7687)), -Box(Box(7688)), -Box(Box(7689)), -Box(Box(7690)), -Box(Box(7691)), -Box(Box(7692)), -Box(Box(7693)), -Box(Box(7694)), -Box(Box(7695)), -Box(Box(7696)), -Box(Box(7697)), -Box(Box(7698)), -Box(Box(7699)), -Box(Box(7700)), -Box(Box(7701)), -Box(Box(7702)), -Box(Box(7703)), -Box(Box(7704)), -Box(Box(7705)), -Box(Box(7706)), -Box(Box(7707)), -Box(Box(7708)), -Box(Box(7709)), -Box(Box(7710)), -Box(Box(7711)), -Box(Box(7712)), -Box(Box(7713)), -Box(Box(7714)), -Box(Box(7715)), -Box(Box(7716)), -Box(Box(7717)), -Box(Box(7718)), -Box(Box(7719)), -Box(Box(7720)), -Box(Box(7721)), -Box(Box(7722)), -Box(Box(7723)), -Box(Box(7724)), -Box(Box(7725)), -Box(Box(7726)), -Box(Box(7727)), -Box(Box(7728)), -Box(Box(7729)), -Box(Box(7730)), -Box(Box(7731)), -Box(Box(7732)), -Box(Box(7733)), -Box(Box(7734)), -Box(Box(7735)), -Box(Box(7736)), -Box(Box(7737)), -Box(Box(7738)), -Box(Box(7739)), -Box(Box(7740)), -Box(Box(7741)), -Box(Box(7742)), -Box(Box(7743)), -Box(Box(7744)), -Box(Box(7745)), -Box(Box(7746)), -Box(Box(7747)), -Box(Box(7748)), -Box(Box(7749)), -Box(Box(7750)), -Box(Box(7751)), -Box(Box(7752)), -Box(Box(7753)), -Box(Box(7754)), -Box(Box(7755)), -Box(Box(7756)), -Box(Box(7757)), -Box(Box(7758)), -Box(Box(7759)), -Box(Box(7760)), -Box(Box(7761)), -Box(Box(7762)), -Box(Box(7763)), -Box(Box(7764)), -Box(Box(7765)), -Box(Box(7766)), -Box(Box(7767)), -Box(Box(7768)), -Box(Box(7769)), -Box(Box(7770)), -Box(Box(7771)), -Box(Box(7772)), -Box(Box(7773)), -Box(Box(7774)), -Box(Box(7775)), -Box(Box(7776)), -Box(Box(7777)), -Box(Box(7778)), -Box(Box(7779)), -Box(Box(7780)), -Box(Box(7781)), -Box(Box(7782)), -Box(Box(7783)), -Box(Box(7784)), -Box(Box(7785)), -Box(Box(7786)), -Box(Box(7787)), -Box(Box(7788)), -Box(Box(7789)), -Box(Box(7790)), -Box(Box(7791)), -Box(Box(7792)), -Box(Box(7793)), -Box(Box(7794)), -Box(Box(7795)), -Box(Box(7796)), -Box(Box(7797)), -Box(Box(7798)), -Box(Box(7799)), -Box(Box(7800)), -Box(Box(7801)), -Box(Box(7802)), -Box(Box(7803)), -Box(Box(7804)), -Box(Box(7805)), -Box(Box(7806)), -Box(Box(7807)), -Box(Box(7808)), -Box(Box(7809)), -Box(Box(7810)), -Box(Box(7811)), -Box(Box(7812)), -Box(Box(7813)), -Box(Box(7814)), -Box(Box(7815)), -Box(Box(7816)), -Box(Box(7817)), -Box(Box(7818)), -Box(Box(7819)), -Box(Box(7820)), -Box(Box(7821)), -Box(Box(7822)), -Box(Box(7823)), -Box(Box(7824)), -Box(Box(7825)), -Box(Box(7826)), -Box(Box(7827)), -Box(Box(7828)), -Box(Box(7829)), -Box(Box(7830)), -Box(Box(7831)), -Box(Box(7832)), -Box(Box(7833)), -Box(Box(7834)), -Box(Box(7835)), -Box(Box(7836)), -Box(Box(7837)), -Box(Box(7838)), -Box(Box(7839)), -Box(Box(7840)), -Box(Box(7841)), -Box(Box(7842)), -Box(Box(7843)), -Box(Box(7844)), -Box(Box(7845)), -Box(Box(7846)), -Box(Box(7847)), -Box(Box(7848)), -Box(Box(7849)), -Box(Box(7850)), -Box(Box(7851)), -Box(Box(7852)), -Box(Box(7853)), -Box(Box(7854)), -Box(Box(7855)), -Box(Box(7856)), -Box(Box(7857)), -Box(Box(7858)), -Box(Box(7859)), -Box(Box(7860)), -Box(Box(7861)), -Box(Box(7862)), -Box(Box(7863)), -Box(Box(7864)), -Box(Box(7865)), -Box(Box(7866)), -Box(Box(7867)), -Box(Box(7868)), -Box(Box(7869)), -Box(Box(7870)), -Box(Box(7871)), -Box(Box(7872)), -Box(Box(7873)), -Box(Box(7874)), -Box(Box(7875)), -Box(Box(7876)), -Box(Box(7877)), -Box(Box(7878)), -Box(Box(7879)), -Box(Box(7880)), -Box(Box(7881)), -Box(Box(7882)), -Box(Box(7883)), -Box(Box(7884)), -Box(Box(7885)), -Box(Box(7886)), -Box(Box(7887)), -Box(Box(7888)), -Box(Box(7889)), -Box(Box(7890)), -Box(Box(7891)), -Box(Box(7892)), -Box(Box(7893)), -Box(Box(7894)), -Box(Box(7895)), -Box(Box(7896)), -Box(Box(7897)), -Box(Box(7898)), -Box(Box(7899)), -Box(Box(7900)), -Box(Box(7901)), -Box(Box(7902)), -Box(Box(7903)), -Box(Box(7904)), -Box(Box(7905)), -Box(Box(7906)), -Box(Box(7907)), -Box(Box(7908)), -Box(Box(7909)), -Box(Box(7910)), -Box(Box(7911)), -Box(Box(7912)), -Box(Box(7913)), -Box(Box(7914)), -Box(Box(7915)), -Box(Box(7916)), -Box(Box(7917)), -Box(Box(7918)), -Box(Box(7919)), -Box(Box(7920)), -Box(Box(7921)), -Box(Box(7922)), -Box(Box(7923)), -Box(Box(7924)), -Box(Box(7925)), -Box(Box(7926)), -Box(Box(7927)), -Box(Box(7928)), -Box(Box(7929)), -Box(Box(7930)), -Box(Box(7931)), -Box(Box(7932)), -Box(Box(7933)), -Box(Box(7934)), -Box(Box(7935)), -Box(Box(7936)), -Box(Box(7937)), -Box(Box(7938)), -Box(Box(7939)), -Box(Box(7940)), -Box(Box(7941)), -Box(Box(7942)), -Box(Box(7943)), -Box(Box(7944)), -Box(Box(7945)), -Box(Box(7946)), -Box(Box(7947)), -Box(Box(7948)), -Box(Box(7949)), -Box(Box(7950)), -Box(Box(7951)), -Box(Box(7952)), -Box(Box(7953)), -Box(Box(7954)), -Box(Box(7955)), -Box(Box(7956)), -Box(Box(7957)), -Box(Box(7958)), -Box(Box(7959)), -Box(Box(7960)), -Box(Box(7961)), -Box(Box(7962)), -Box(Box(7963)), -Box(Box(7964)), -Box(Box(7965)), -Box(Box(7966)), -Box(Box(7967)), -Box(Box(7968)), -Box(Box(7969)), -Box(Box(7970)), -Box(Box(7971)), -Box(Box(7972)), -Box(Box(7973)), -Box(Box(7974)), -Box(Box(7975)), -Box(Box(7976)), -Box(Box(7977)), -Box(Box(7978)), -Box(Box(7979)), -Box(Box(7980)), -Box(Box(7981)), -Box(Box(7982)), -Box(Box(7983)), -Box(Box(7984)), -Box(Box(7985)), -Box(Box(7986)), -Box(Box(7987)), -Box(Box(7988)), -Box(Box(7989)), -Box(Box(7990)), -Box(Box(7991)), -Box(Box(7992)), -Box(Box(7993)), -Box(Box(7994)), -Box(Box(7995)), -Box(Box(7996)), -Box(Box(7997)), -Box(Box(7998)), -Box(Box(7999)), -Box(Box(8000)), -Box(Box(8001)), -Box(Box(8002)), -Box(Box(8003)), -Box(Box(8004)), -Box(Box(8005)), -Box(Box(8006)), -Box(Box(8007)), -Box(Box(8008)), -Box(Box(8009)), -Box(Box(8010)), -Box(Box(8011)), -Box(Box(8012)), -Box(Box(8013)), -Box(Box(8014)), -Box(Box(8015)), -Box(Box(8016)), -Box(Box(8017)), -Box(Box(8018)), -Box(Box(8019)), -Box(Box(8020)), -Box(Box(8021)), -Box(Box(8022)), -Box(Box(8023)), -Box(Box(8024)), -Box(Box(8025)), -Box(Box(8026)), -Box(Box(8027)), -Box(Box(8028)), -Box(Box(8029)), -Box(Box(8030)), -Box(Box(8031)), -Box(Box(8032)), -Box(Box(8033)), -Box(Box(8034)), -Box(Box(8035)), -Box(Box(8036)), -Box(Box(8037)), -Box(Box(8038)), -Box(Box(8039)), -Box(Box(8040)), -Box(Box(8041)), -Box(Box(8042)), -Box(Box(8043)), -Box(Box(8044)), -Box(Box(8045)), -Box(Box(8046)), -Box(Box(8047)), -Box(Box(8048)), -Box(Box(8049)), -Box(Box(8050)), -Box(Box(8051)), -Box(Box(8052)), -Box(Box(8053)), -Box(Box(8054)), -Box(Box(8055)), -Box(Box(8056)), -Box(Box(8057)), -Box(Box(8058)), -Box(Box(8059)), -Box(Box(8060)), -Box(Box(8061)), -Box(Box(8062)), -Box(Box(8063)), -Box(Box(8064)), -Box(Box(8065)), -Box(Box(8066)), -Box(Box(8067)), -Box(Box(8068)), -Box(Box(8069)), -Box(Box(8070)), -Box(Box(8071)), -Box(Box(8072)), -Box(Box(8073)), -Box(Box(8074)), -Box(Box(8075)), -Box(Box(8076)), -Box(Box(8077)), -Box(Box(8078)), -Box(Box(8079)), -Box(Box(8080)), -Box(Box(8081)), -Box(Box(8082)), -Box(Box(8083)), -Box(Box(8084)), -Box(Box(8085)), -Box(Box(8086)), -Box(Box(8087)), -Box(Box(8088)), -Box(Box(8089)), -Box(Box(8090)), -Box(Box(8091)), -Box(Box(8092)), -Box(Box(8093)), -Box(Box(8094)), -Box(Box(8095)), -Box(Box(8096)), -Box(Box(8097)), -Box(Box(8098)), -Box(Box(8099)), -Box(Box(8100)), -Box(Box(8101)), -Box(Box(8102)), -Box(Box(8103)), -Box(Box(8104)), -Box(Box(8105)), -Box(Box(8106)), -Box(Box(8107)), -Box(Box(8108)), -Box(Box(8109)), -Box(Box(8110)), -Box(Box(8111)), -Box(Box(8112)), -Box(Box(8113)), -Box(Box(8114)), -Box(Box(8115)), -Box(Box(8116)), -Box(Box(8117)), -Box(Box(8118)), -Box(Box(8119)), -Box(Box(8120)), -Box(Box(8121)), -Box(Box(8122)), -Box(Box(8123)), -Box(Box(8124)), -Box(Box(8125)), -Box(Box(8126)), -Box(Box(8127)), -Box(Box(8128)), -Box(Box(8129)), -Box(Box(8130)), -Box(Box(8131)), -Box(Box(8132)), -Box(Box(8133)), -Box(Box(8134)), -Box(Box(8135)), -Box(Box(8136)), -Box(Box(8137)), -Box(Box(8138)), -Box(Box(8139)), -Box(Box(8140)), -Box(Box(8141)), -Box(Box(8142)), -Box(Box(8143)), -Box(Box(8144)), -Box(Box(8145)), -Box(Box(8146)), -Box(Box(8147)), -Box(Box(8148)), -Box(Box(8149)), -Box(Box(8150)), -Box(Box(8151)), -Box(Box(8152)), -Box(Box(8153)), -Box(Box(8154)), -Box(Box(8155)), -Box(Box(8156)), -Box(Box(8157)), -Box(Box(8158)), -Box(Box(8159)), -Box(Box(8160)), -Box(Box(8161)), -Box(Box(8162)), -Box(Box(8163)), -Box(Box(8164)), -Box(Box(8165)), -Box(Box(8166)), -Box(Box(8167)), -Box(Box(8168)), -Box(Box(8169)), -Box(Box(8170)), -Box(Box(8171)), -Box(Box(8172)), -Box(Box(8173)), -Box(Box(8174)), -Box(Box(8175)), -Box(Box(8176)), -Box(Box(8177)), -Box(Box(8178)), -Box(Box(8179)), -Box(Box(8180)), -Box(Box(8181)), -Box(Box(8182)), -Box(Box(8183)), -Box(Box(8184)), -Box(Box(8185)), -Box(Box(8186)), -Box(Box(8187)), -Box(Box(8188)), -Box(Box(8189)), -Box(Box(8190)), -Box(Box(8191)), -Box(Box(8192)), -Box(Box(8193)), -Box(Box(8194)), -Box(Box(8195)), -Box(Box(8196)), -Box(Box(8197)), -Box(Box(8198)), -Box(Box(8199)), -Box(Box(8200)), -Box(Box(8201)), -Box(Box(8202)), -Box(Box(8203)), -Box(Box(8204)), -Box(Box(8205)), -Box(Box(8206)), -Box(Box(8207)), -Box(Box(8208)), -Box(Box(8209)), -Box(Box(8210)), -Box(Box(8211)), -Box(Box(8212)), -Box(Box(8213)), -Box(Box(8214)), -Box(Box(8215)), -Box(Box(8216)), -Box(Box(8217)), -Box(Box(8218)), -Box(Box(8219)), -Box(Box(8220)), -Box(Box(8221)), -Box(Box(8222)), -Box(Box(8223)), -Box(Box(8224)), -Box(Box(8225)), -Box(Box(8226)), -Box(Box(8227)), -Box(Box(8228)), -Box(Box(8229)), -Box(Box(8230)), -Box(Box(8231)), -Box(Box(8232)), -Box(Box(8233)), -Box(Box(8234)), -Box(Box(8235)), -Box(Box(8236)), -Box(Box(8237)), -Box(Box(8238)), -Box(Box(8239)), -Box(Box(8240)), -Box(Box(8241)), -Box(Box(8242)), -Box(Box(8243)), -Box(Box(8244)), -Box(Box(8245)), -Box(Box(8246)), -Box(Box(8247)), -Box(Box(8248)), -Box(Box(8249)), -Box(Box(8250)), -Box(Box(8251)), -Box(Box(8252)), -Box(Box(8253)), -Box(Box(8254)), -Box(Box(8255)), -Box(Box(8256)), -Box(Box(8257)), -Box(Box(8258)), -Box(Box(8259)), -Box(Box(8260)), -Box(Box(8261)), -Box(Box(8262)), -Box(Box(8263)), -Box(Box(8264)), -Box(Box(8265)), -Box(Box(8266)), -Box(Box(8267)), -Box(Box(8268)), -Box(Box(8269)), -Box(Box(8270)), -Box(Box(8271)), -Box(Box(8272)), -Box(Box(8273)), -Box(Box(8274)), -Box(Box(8275)), -Box(Box(8276)), -Box(Box(8277)), -Box(Box(8278)), -Box(Box(8279)), -Box(Box(8280)), -Box(Box(8281)), -Box(Box(8282)), -Box(Box(8283)), -Box(Box(8284)), -Box(Box(8285)), -Box(Box(8286)), -Box(Box(8287)), -Box(Box(8288)), -Box(Box(8289)), -Box(Box(8290)), -Box(Box(8291)), -Box(Box(8292)), -Box(Box(8293)), -Box(Box(8294)), -Box(Box(8295)), -Box(Box(8296)), -Box(Box(8297)), -Box(Box(8298)), -Box(Box(8299)), -Box(Box(8300)), -Box(Box(8301)), -Box(Box(8302)), -Box(Box(8303)), -Box(Box(8304)), -Box(Box(8305)), -Box(Box(8306)), -Box(Box(8307)), -Box(Box(8308)), -Box(Box(8309)), -Box(Box(8310)), -Box(Box(8311)), -Box(Box(8312)), -Box(Box(8313)), -Box(Box(8314)), -Box(Box(8315)), -Box(Box(8316)), -Box(Box(8317)), -Box(Box(8318)), -Box(Box(8319)), -Box(Box(8320)), -Box(Box(8321)), -Box(Box(8322)), -Box(Box(8323)), -Box(Box(8324)), -Box(Box(8325)), -Box(Box(8326)), -Box(Box(8327)), -Box(Box(8328)), -Box(Box(8329)), -Box(Box(8330)), -Box(Box(8331)), -Box(Box(8332)), -Box(Box(8333)), -Box(Box(8334)), -Box(Box(8335)), -Box(Box(8336)), -Box(Box(8337)), -Box(Box(8338)), -Box(Box(8339)), -Box(Box(8340)), -Box(Box(8341)), -Box(Box(8342)), -Box(Box(8343)), -Box(Box(8344)), -Box(Box(8345)), -Box(Box(8346)), -Box(Box(8347)), -Box(Box(8348)), -Box(Box(8349)), -Box(Box(8350)), -Box(Box(8351)), -Box(Box(8352)), -Box(Box(8353)), -Box(Box(8354)), -Box(Box(8355)), -Box(Box(8356)), -Box(Box(8357)), -Box(Box(8358)), -Box(Box(8359)), -Box(Box(8360)), -Box(Box(8361)), -Box(Box(8362)), -Box(Box(8363)), -Box(Box(8364)), -Box(Box(8365)), -Box(Box(8366)), -Box(Box(8367)), -Box(Box(8368)), -Box(Box(8369)), -Box(Box(8370)), -Box(Box(8371)), -Box(Box(8372)), -Box(Box(8373)), -Box(Box(8374)), -Box(Box(8375)), -Box(Box(8376)), -Box(Box(8377)), -Box(Box(8378)), -Box(Box(8379)), -Box(Box(8380)), -Box(Box(8381)), -Box(Box(8382)), -Box(Box(8383)), -Box(Box(8384)), -Box(Box(8385)), -Box(Box(8386)), -Box(Box(8387)), -Box(Box(8388)), -Box(Box(8389)), -Box(Box(8390)), -Box(Box(8391)), -Box(Box(8392)), -Box(Box(8393)), -Box(Box(8394)), -Box(Box(8395)), -Box(Box(8396)), -Box(Box(8397)), -Box(Box(8398)), -Box(Box(8399)), -Box(Box(8400)), -Box(Box(8401)), -Box(Box(8402)), -Box(Box(8403)), -Box(Box(8404)), -Box(Box(8405)), -Box(Box(8406)), -Box(Box(8407)), -Box(Box(8408)), -Box(Box(8409)), -Box(Box(8410)), -Box(Box(8411)), -Box(Box(8412)), -Box(Box(8413)), -Box(Box(8414)), -Box(Box(8415)), -Box(Box(8416)), -Box(Box(8417)), -Box(Box(8418)), -Box(Box(8419)), -Box(Box(8420)), -Box(Box(8421)), -Box(Box(8422)), -Box(Box(8423)), -Box(Box(8424)), -Box(Box(8425)), -Box(Box(8426)), -Box(Box(8427)), -Box(Box(8428)), -Box(Box(8429)), -Box(Box(8430)), -Box(Box(8431)), -Box(Box(8432)), -Box(Box(8433)), -Box(Box(8434)), -Box(Box(8435)), -Box(Box(8436)), -Box(Box(8437)), -Box(Box(8438)), -Box(Box(8439)), -Box(Box(8440)), -Box(Box(8441)), -Box(Box(8442)), -Box(Box(8443)), -Box(Box(8444)), -Box(Box(8445)), -Box(Box(8446)), -Box(Box(8447)), -Box(Box(8448)), -Box(Box(8449)), -Box(Box(8450)), -Box(Box(8451)), -Box(Box(8452)), -Box(Box(8453)), -Box(Box(8454)), -Box(Box(8455)), -Box(Box(8456)), -Box(Box(8457)), -Box(Box(8458)), -Box(Box(8459)), -Box(Box(8460)), -Box(Box(8461)), -Box(Box(8462)), -Box(Box(8463)), -Box(Box(8464)), -Box(Box(8465)), -Box(Box(8466)), -Box(Box(8467)), -Box(Box(8468)), -Box(Box(8469)), -Box(Box(8470)), -Box(Box(8471)), -Box(Box(8472)), -Box(Box(8473)), -Box(Box(8474)), -Box(Box(8475)), -Box(Box(8476)), -Box(Box(8477)), -Box(Box(8478)), -Box(Box(8479)), -Box(Box(8480)), -Box(Box(8481)), -Box(Box(8482)), -Box(Box(8483)), -Box(Box(8484)), -Box(Box(8485)), -Box(Box(8486)), -Box(Box(8487)), -Box(Box(8488)), -Box(Box(8489)), -Box(Box(8490)), -Box(Box(8491)), -Box(Box(8492)), -Box(Box(8493)), -Box(Box(8494)), -Box(Box(8495)), -Box(Box(8496)), -Box(Box(8497)), -Box(Box(8498)), -Box(Box(8499)), -Box(Box(8500)), -Box(Box(8501)), -Box(Box(8502)), -Box(Box(8503)), -Box(Box(8504)), -Box(Box(8505)), -Box(Box(8506)), -Box(Box(8507)), -Box(Box(8508)), -Box(Box(8509)), -Box(Box(8510)), -Box(Box(8511)), -Box(Box(8512)), -Box(Box(8513)), -Box(Box(8514)), -Box(Box(8515)), -Box(Box(8516)), -Box(Box(8517)), -Box(Box(8518)), -Box(Box(8519)), -Box(Box(8520)), -Box(Box(8521)), -Box(Box(8522)), -Box(Box(8523)), -Box(Box(8524)), -Box(Box(8525)), -Box(Box(8526)), -Box(Box(8527)), -Box(Box(8528)), -Box(Box(8529)), -Box(Box(8530)), -Box(Box(8531)), -Box(Box(8532)), -Box(Box(8533)), -Box(Box(8534)), -Box(Box(8535)), -Box(Box(8536)), -Box(Box(8537)), -Box(Box(8538)), -Box(Box(8539)), -Box(Box(8540)), -Box(Box(8541)), -Box(Box(8542)), -Box(Box(8543)), -Box(Box(8544)), -Box(Box(8545)), -Box(Box(8546)), -Box(Box(8547)), -Box(Box(8548)), -Box(Box(8549)), -Box(Box(8550)), -Box(Box(8551)), -Box(Box(8552)), -Box(Box(8553)), -Box(Box(8554)), -Box(Box(8555)), -Box(Box(8556)), -Box(Box(8557)), -Box(Box(8558)), -Box(Box(8559)), -Box(Box(8560)), -Box(Box(8561)), -Box(Box(8562)), -Box(Box(8563)), -Box(Box(8564)), -Box(Box(8565)), -Box(Box(8566)), -Box(Box(8567)), -Box(Box(8568)), -Box(Box(8569)), -Box(Box(8570)), -Box(Box(8571)), -Box(Box(8572)), -Box(Box(8573)), -Box(Box(8574)), -Box(Box(8575)), -Box(Box(8576)), -Box(Box(8577)), -Box(Box(8578)), -Box(Box(8579)), -Box(Box(8580)), -Box(Box(8581)), -Box(Box(8582)), -Box(Box(8583)), -Box(Box(8584)), -Box(Box(8585)), -Box(Box(8586)), -Box(Box(8587)), -Box(Box(8588)), -Box(Box(8589)), -Box(Box(8590)), -Box(Box(8591)), -Box(Box(8592)), -Box(Box(8593)), -Box(Box(8594)), -Box(Box(8595)), -Box(Box(8596)), -Box(Box(8597)), -Box(Box(8598)), -Box(Box(8599)), -Box(Box(8600)), -Box(Box(8601)), -Box(Box(8602)), -Box(Box(8603)), -Box(Box(8604)), -Box(Box(8605)), -Box(Box(8606)), -Box(Box(8607)), -Box(Box(8608)), -Box(Box(8609)), -Box(Box(8610)), -Box(Box(8611)), -Box(Box(8612)), -Box(Box(8613)), -Box(Box(8614)), -Box(Box(8615)), -Box(Box(8616)), -Box(Box(8617)), -Box(Box(8618)), -Box(Box(8619)), -Box(Box(8620)), -Box(Box(8621)), -Box(Box(8622)), -Box(Box(8623)), -Box(Box(8624)), -Box(Box(8625)), -Box(Box(8626)), -Box(Box(8627)), -Box(Box(8628)), -Box(Box(8629)), -Box(Box(8630)), -Box(Box(8631)), -Box(Box(8632)), -Box(Box(8633)), -Box(Box(8634)), -Box(Box(8635)), -Box(Box(8636)), -Box(Box(8637)), -Box(Box(8638)), -Box(Box(8639)), -Box(Box(8640)), -Box(Box(8641)), -Box(Box(8642)), -Box(Box(8643)), -Box(Box(8644)), -Box(Box(8645)), -Box(Box(8646)), -Box(Box(8647)), -Box(Box(8648)), -Box(Box(8649)), -Box(Box(8650)), -Box(Box(8651)), -Box(Box(8652)), -Box(Box(8653)), -Box(Box(8654)), -Box(Box(8655)), -Box(Box(8656)), -Box(Box(8657)), -Box(Box(8658)), -Box(Box(8659)), -Box(Box(8660)), -Box(Box(8661)), -Box(Box(8662)), -Box(Box(8663)), -Box(Box(8664)), -Box(Box(8665)), -Box(Box(8666)), -Box(Box(8667)), -Box(Box(8668)), -Box(Box(8669)), -Box(Box(8670)), -Box(Box(8671)), -Box(Box(8672)), -Box(Box(8673)), -Box(Box(8674)), -Box(Box(8675)), -Box(Box(8676)), -Box(Box(8677)), -Box(Box(8678)), -Box(Box(8679)), -Box(Box(8680)), -Box(Box(8681)), -Box(Box(8682)), -Box(Box(8683)), -Box(Box(8684)), -Box(Box(8685)), -Box(Box(8686)), -Box(Box(8687)), -Box(Box(8688)), -Box(Box(8689)), -Box(Box(8690)), -Box(Box(8691)), -Box(Box(8692)), -Box(Box(8693)), -Box(Box(8694)), -Box(Box(8695)), -Box(Box(8696)), -Box(Box(8697)), -Box(Box(8698)), -Box(Box(8699)), -Box(Box(8700)), -Box(Box(8701)), -Box(Box(8702)), -Box(Box(8703)), -Box(Box(8704)), -Box(Box(8705)), -Box(Box(8706)), -Box(Box(8707)), -Box(Box(8708)), -Box(Box(8709)), -Box(Box(8710)), -Box(Box(8711)), -Box(Box(8712)), -Box(Box(8713)), -Box(Box(8714)), -Box(Box(8715)), -Box(Box(8716)), -Box(Box(8717)), -Box(Box(8718)), -Box(Box(8719)), -Box(Box(8720)), -Box(Box(8721)), -Box(Box(8722)), -Box(Box(8723)), -Box(Box(8724)), -Box(Box(8725)), -Box(Box(8726)), -Box(Box(8727)), -Box(Box(8728)), -Box(Box(8729)), -Box(Box(8730)), -Box(Box(8731)), -Box(Box(8732)), -Box(Box(8733)), -Box(Box(8734)), -Box(Box(8735)), -Box(Box(8736)), -Box(Box(8737)), -Box(Box(8738)), -Box(Box(8739)), -Box(Box(8740)), -Box(Box(8741)), -Box(Box(8742)), -Box(Box(8743)), -Box(Box(8744)), -Box(Box(8745)), -Box(Box(8746)), -Box(Box(8747)), -Box(Box(8748)), -Box(Box(8749)), -Box(Box(8750)), -Box(Box(8751)), -Box(Box(8752)), -Box(Box(8753)), -Box(Box(8754)), -Box(Box(8755)), -Box(Box(8756)), -Box(Box(8757)), -Box(Box(8758)), -Box(Box(8759)), -Box(Box(8760)), -Box(Box(8761)), -Box(Box(8762)), -Box(Box(8763)), -Box(Box(8764)), -Box(Box(8765)), -Box(Box(8766)), -Box(Box(8767)), -Box(Box(8768)), -Box(Box(8769)), -Box(Box(8770)), -Box(Box(8771)), -Box(Box(8772)), -Box(Box(8773)), -Box(Box(8774)), -Box(Box(8775)), -Box(Box(8776)), -Box(Box(8777)), -Box(Box(8778)), -Box(Box(8779)), -Box(Box(8780)), -Box(Box(8781)), -Box(Box(8782)), -Box(Box(8783)), -Box(Box(8784)), -Box(Box(8785)), -Box(Box(8786)), -Box(Box(8787)), -Box(Box(8788)), -Box(Box(8789)), -Box(Box(8790)), -Box(Box(8791)), -Box(Box(8792)), -Box(Box(8793)), -Box(Box(8794)), -Box(Box(8795)), -Box(Box(8796)), -Box(Box(8797)), -Box(Box(8798)), -Box(Box(8799)), -Box(Box(8800)), -Box(Box(8801)), -Box(Box(8802)), -Box(Box(8803)), -Box(Box(8804)), -Box(Box(8805)), -Box(Box(8806)), -Box(Box(8807)), -Box(Box(8808)), -Box(Box(8809)), -Box(Box(8810)), -Box(Box(8811)), -Box(Box(8812)), -Box(Box(8813)), -Box(Box(8814)), -Box(Box(8815)), -Box(Box(8816)), -Box(Box(8817)), -Box(Box(8818)), -Box(Box(8819)), -Box(Box(8820)), -Box(Box(8821)), -Box(Box(8822)), -Box(Box(8823)), -Box(Box(8824)), -Box(Box(8825)), -Box(Box(8826)), -Box(Box(8827)), -Box(Box(8828)), -Box(Box(8829)), -Box(Box(8830)), -Box(Box(8831)), -Box(Box(8832)), -Box(Box(8833)), -Box(Box(8834)), -Box(Box(8835)), -Box(Box(8836)), -Box(Box(8837)), -Box(Box(8838)), -Box(Box(8839)), -Box(Box(8840)), -Box(Box(8841)), -Box(Box(8842)), -Box(Box(8843)), -Box(Box(8844)), -Box(Box(8845)), -Box(Box(8846)), -Box(Box(8847)), -Box(Box(8848)), -Box(Box(8849)), -Box(Box(8850)), -Box(Box(8851)), -Box(Box(8852)), -Box(Box(8853)), -Box(Box(8854)), -Box(Box(8855)), -Box(Box(8856)), -Box(Box(8857)), -Box(Box(8858)), -Box(Box(8859)), -Box(Box(8860)), -Box(Box(8861)), -Box(Box(8862)), -Box(Box(8863)), -Box(Box(8864)), -Box(Box(8865)), -Box(Box(8866)), -Box(Box(8867)), -Box(Box(8868)), -Box(Box(8869)), -Box(Box(8870)), -Box(Box(8871)), -Box(Box(8872)), -Box(Box(8873)), -Box(Box(8874)), -Box(Box(8875)), -Box(Box(8876)), -Box(Box(8877)), -Box(Box(8878)), -Box(Box(8879)), -Box(Box(8880)), -Box(Box(8881)), -Box(Box(8882)), -Box(Box(8883)), -Box(Box(8884)), -Box(Box(8885)), -Box(Box(8886)), -Box(Box(8887)), -Box(Box(8888)), -Box(Box(8889)), -Box(Box(8890)), -Box(Box(8891)), -Box(Box(8892)), -Box(Box(8893)), -Box(Box(8894)), -Box(Box(8895)), -Box(Box(8896)), -Box(Box(8897)), -Box(Box(8898)), -Box(Box(8899)), -Box(Box(8900)), -Box(Box(8901)), -Box(Box(8902)), -Box(Box(8903)), -Box(Box(8904)), -Box(Box(8905)), -Box(Box(8906)), -Box(Box(8907)), -Box(Box(8908)), -Box(Box(8909)), -Box(Box(8910)), -Box(Box(8911)), -Box(Box(8912)), -Box(Box(8913)), -Box(Box(8914)), -Box(Box(8915)), -Box(Box(8916)), -Box(Box(8917)), -Box(Box(8918)), -Box(Box(8919)), -Box(Box(8920)), -Box(Box(8921)), -Box(Box(8922)), -Box(Box(8923)), -Box(Box(8924)), -Box(Box(8925)), -Box(Box(8926)), -Box(Box(8927)), -Box(Box(8928)), -Box(Box(8929)), -Box(Box(8930)), -Box(Box(8931)), -Box(Box(8932)), -Box(Box(8933)), -Box(Box(8934)), -Box(Box(8935)), -Box(Box(8936)), -Box(Box(8937)), -Box(Box(8938)), -Box(Box(8939)), -Box(Box(8940)), -Box(Box(8941)), -Box(Box(8942)), -Box(Box(8943)), -Box(Box(8944)), -Box(Box(8945)), -Box(Box(8946)), -Box(Box(8947)), -Box(Box(8948)), -Box(Box(8949)), -Box(Box(8950)), -Box(Box(8951)), -Box(Box(8952)), -Box(Box(8953)), -Box(Box(8954)), -Box(Box(8955)), -Box(Box(8956)), -Box(Box(8957)), -Box(Box(8958)), -Box(Box(8959)), -Box(Box(8960)), -Box(Box(8961)), -Box(Box(8962)), -Box(Box(8963)), -Box(Box(8964)), -Box(Box(8965)), -Box(Box(8966)), -Box(Box(8967)), -Box(Box(8968)), -Box(Box(8969)), -Box(Box(8970)), -Box(Box(8971)), -Box(Box(8972)), -Box(Box(8973)), -Box(Box(8974)), -Box(Box(8975)), -Box(Box(8976)), -Box(Box(8977)), -Box(Box(8978)), -Box(Box(8979)), -Box(Box(8980)), -Box(Box(8981)), -Box(Box(8982)), -Box(Box(8983)), -Box(Box(8984)), -Box(Box(8985)), -Box(Box(8986)), -Box(Box(8987)), -Box(Box(8988)), -Box(Box(8989)), -Box(Box(8990)), -Box(Box(8991)), -Box(Box(8992)), -Box(Box(8993)), -Box(Box(8994)), -Box(Box(8995)), -Box(Box(8996)), -Box(Box(8997)), -Box(Box(8998)), -Box(Box(8999)), -Box(Box(9000)), -Box(Box(9001)), -Box(Box(9002)), -Box(Box(9003)), -Box(Box(9004)), -Box(Box(9005)), -Box(Box(9006)), -Box(Box(9007)), -Box(Box(9008)), -Box(Box(9009)), -Box(Box(9010)), -Box(Box(9011)), -Box(Box(9012)), -Box(Box(9013)), -Box(Box(9014)), -Box(Box(9015)), -Box(Box(9016)), -Box(Box(9017)), -Box(Box(9018)), -Box(Box(9019)), -Box(Box(9020)), -Box(Box(9021)), -Box(Box(9022)), -Box(Box(9023)), -Box(Box(9024)), -Box(Box(9025)), -Box(Box(9026)), -Box(Box(9027)), -Box(Box(9028)), -Box(Box(9029)), -Box(Box(9030)), -Box(Box(9031)), -Box(Box(9032)), -Box(Box(9033)), -Box(Box(9034)), -Box(Box(9035)), -Box(Box(9036)), -Box(Box(9037)), -Box(Box(9038)), -Box(Box(9039)), -Box(Box(9040)), -Box(Box(9041)), -Box(Box(9042)), -Box(Box(9043)), -Box(Box(9044)), -Box(Box(9045)), -Box(Box(9046)), -Box(Box(9047)), -Box(Box(9048)), -Box(Box(9049)), -Box(Box(9050)), -Box(Box(9051)), -Box(Box(9052)), -Box(Box(9053)), -Box(Box(9054)), -Box(Box(9055)), -Box(Box(9056)), -Box(Box(9057)), -Box(Box(9058)), -Box(Box(9059)), -Box(Box(9060)), -Box(Box(9061)), -Box(Box(9062)), -Box(Box(9063)), -Box(Box(9064)), -Box(Box(9065)), -Box(Box(9066)), -Box(Box(9067)), -Box(Box(9068)), -Box(Box(9069)), -Box(Box(9070)), -Box(Box(9071)), -Box(Box(9072)), -Box(Box(9073)), -Box(Box(9074)), -Box(Box(9075)), -Box(Box(9076)), -Box(Box(9077)), -Box(Box(9078)), -Box(Box(9079)), -Box(Box(9080)), -Box(Box(9081)), -Box(Box(9082)), -Box(Box(9083)), -Box(Box(9084)), -Box(Box(9085)), -Box(Box(9086)), -Box(Box(9087)), -Box(Box(9088)), -Box(Box(9089)), -Box(Box(9090)), -Box(Box(9091)), -Box(Box(9092)), -Box(Box(9093)), -Box(Box(9094)), -Box(Box(9095)), -Box(Box(9096)), -Box(Box(9097)), -Box(Box(9098)), -Box(Box(9099)), -Box(Box(9100)), -Box(Box(9101)), -Box(Box(9102)), -Box(Box(9103)), -Box(Box(9104)), -Box(Box(9105)), -Box(Box(9106)), -Box(Box(9107)), -Box(Box(9108)), -Box(Box(9109)), -Box(Box(9110)), -Box(Box(9111)), -Box(Box(9112)), -Box(Box(9113)), -Box(Box(9114)), -Box(Box(9115)), -Box(Box(9116)), -Box(Box(9117)), -Box(Box(9118)), -Box(Box(9119)), -Box(Box(9120)), -Box(Box(9121)), -Box(Box(9122)), -Box(Box(9123)), -Box(Box(9124)), -Box(Box(9125)), -Box(Box(9126)), -Box(Box(9127)), -Box(Box(9128)), -Box(Box(9129)), -Box(Box(9130)), -Box(Box(9131)), -Box(Box(9132)), -Box(Box(9133)), -Box(Box(9134)), -Box(Box(9135)), -Box(Box(9136)), -Box(Box(9137)), -Box(Box(9138)), -Box(Box(9139)), -Box(Box(9140)), -Box(Box(9141)), -Box(Box(9142)), -Box(Box(9143)), -Box(Box(9144)), -Box(Box(9145)), -Box(Box(9146)), -Box(Box(9147)), -Box(Box(9148)), -Box(Box(9149)), -Box(Box(9150)), -Box(Box(9151)), -Box(Box(9152)), -Box(Box(9153)), -Box(Box(9154)), -Box(Box(9155)), -Box(Box(9156)), -Box(Box(9157)), -Box(Box(9158)), -Box(Box(9159)), -Box(Box(9160)), -Box(Box(9161)), -Box(Box(9162)), -Box(Box(9163)), -Box(Box(9164)), -Box(Box(9165)), -Box(Box(9166)), -Box(Box(9167)), -Box(Box(9168)), -Box(Box(9169)), -Box(Box(9170)), -Box(Box(9171)), -Box(Box(9172)), -Box(Box(9173)), -Box(Box(9174)), -Box(Box(9175)), -Box(Box(9176)), -Box(Box(9177)), -Box(Box(9178)), -Box(Box(9179)), -Box(Box(9180)), -Box(Box(9181)), -Box(Box(9182)), -Box(Box(9183)), -Box(Box(9184)), -Box(Box(9185)), -Box(Box(9186)), -Box(Box(9187)), -Box(Box(9188)), -Box(Box(9189)), -Box(Box(9190)), -Box(Box(9191)), -Box(Box(9192)), -Box(Box(9193)), -Box(Box(9194)), -Box(Box(9195)), -Box(Box(9196)), -Box(Box(9197)), -Box(Box(9198)), -Box(Box(9199)), -Box(Box(9200)), -Box(Box(9201)), -Box(Box(9202)), -Box(Box(9203)), -Box(Box(9204)), -Box(Box(9205)), -Box(Box(9206)), -Box(Box(9207)), -Box(Box(9208)), -Box(Box(9209)), -Box(Box(9210)), -Box(Box(9211)), -Box(Box(9212)), -Box(Box(9213)), -Box(Box(9214)), -Box(Box(9215)), -Box(Box(9216)), -Box(Box(9217)), -Box(Box(9218)), -Box(Box(9219)), -Box(Box(9220)), -Box(Box(9221)), -Box(Box(9222)), -Box(Box(9223)), -Box(Box(9224)), -Box(Box(9225)), -Box(Box(9226)), -Box(Box(9227)), -Box(Box(9228)), -Box(Box(9229)), -Box(Box(9230)), -Box(Box(9231)), -Box(Box(9232)), -Box(Box(9233)), -Box(Box(9234)), -Box(Box(9235)), -Box(Box(9236)), -Box(Box(9237)), -Box(Box(9238)), -Box(Box(9239)), -Box(Box(9240)), -Box(Box(9241)), -Box(Box(9242)), -Box(Box(9243)), -Box(Box(9244)), -Box(Box(9245)), -Box(Box(9246)), -Box(Box(9247)), -Box(Box(9248)), -Box(Box(9249)), -Box(Box(9250)), -Box(Box(9251)), -Box(Box(9252)), -Box(Box(9253)), -Box(Box(9254)), -Box(Box(9255)), -Box(Box(9256)), -Box(Box(9257)), -Box(Box(9258)), -Box(Box(9259)), -Box(Box(9260)), -Box(Box(9261)), -Box(Box(9262)), -Box(Box(9263)), -Box(Box(9264)), -Box(Box(9265)), -Box(Box(9266)), -Box(Box(9267)), -Box(Box(9268)), -Box(Box(9269)), -Box(Box(9270)), -Box(Box(9271)), -Box(Box(9272)), -Box(Box(9273)), -Box(Box(9274)), -Box(Box(9275)), -Box(Box(9276)), -Box(Box(9277)), -Box(Box(9278)), -Box(Box(9279)), -Box(Box(9280)), -Box(Box(9281)), -Box(Box(9282)), -Box(Box(9283)), -Box(Box(9284)), -Box(Box(9285)), -Box(Box(9286)), -Box(Box(9287)), -Box(Box(9288)), -Box(Box(9289)), -Box(Box(9290)), -Box(Box(9291)), -Box(Box(9292)), -Box(Box(9293)), -Box(Box(9294)), -Box(Box(9295)), -Box(Box(9296)), -Box(Box(9297)), -Box(Box(9298)), -Box(Box(9299)), -Box(Box(9300)), -Box(Box(9301)), -Box(Box(9302)), -Box(Box(9303)), -Box(Box(9304)), -Box(Box(9305)), -Box(Box(9306)), -Box(Box(9307)), -Box(Box(9308)), -Box(Box(9309)), -Box(Box(9310)), -Box(Box(9311)), -Box(Box(9312)), -Box(Box(9313)), -Box(Box(9314)), -Box(Box(9315)), -Box(Box(9316)), -Box(Box(9317)), -Box(Box(9318)), -Box(Box(9319)), -Box(Box(9320)), -Box(Box(9321)), -Box(Box(9322)), -Box(Box(9323)), -Box(Box(9324)), -Box(Box(9325)), -Box(Box(9326)), -Box(Box(9327)), -Box(Box(9328)), -Box(Box(9329)), -Box(Box(9330)), -Box(Box(9331)), -Box(Box(9332)), -Box(Box(9333)), -Box(Box(9334)), -Box(Box(9335)), -Box(Box(9336)), -Box(Box(9337)), -Box(Box(9338)), -Box(Box(9339)), -Box(Box(9340)), -Box(Box(9341)), -Box(Box(9342)), -Box(Box(9343)), -Box(Box(9344)), -Box(Box(9345)), -Box(Box(9346)), -Box(Box(9347)), -Box(Box(9348)), -Box(Box(9349)), -Box(Box(9350)), -Box(Box(9351)), -Box(Box(9352)), -Box(Box(9353)), -Box(Box(9354)), -Box(Box(9355)), -Box(Box(9356)), -Box(Box(9357)), -Box(Box(9358)), -Box(Box(9359)), -Box(Box(9360)), -Box(Box(9361)), -Box(Box(9362)), -Box(Box(9363)), -Box(Box(9364)), -Box(Box(9365)), -Box(Box(9366)), -Box(Box(9367)), -Box(Box(9368)), -Box(Box(9369)), -Box(Box(9370)), -Box(Box(9371)), -Box(Box(9372)), -Box(Box(9373)), -Box(Box(9374)), -Box(Box(9375)), -Box(Box(9376)), -Box(Box(9377)), -Box(Box(9378)), -Box(Box(9379)), -Box(Box(9380)), -Box(Box(9381)), -Box(Box(9382)), -Box(Box(9383)), -Box(Box(9384)), -Box(Box(9385)), -Box(Box(9386)), -Box(Box(9387)), -Box(Box(9388)), -Box(Box(9389)), -Box(Box(9390)), -Box(Box(9391)), -Box(Box(9392)), -Box(Box(9393)), -Box(Box(9394)), -Box(Box(9395)), -Box(Box(9396)), -Box(Box(9397)), -Box(Box(9398)), -Box(Box(9399)), -Box(Box(9400)), -Box(Box(9401)), -Box(Box(9402)), -Box(Box(9403)), -Box(Box(9404)), -Box(Box(9405)), -Box(Box(9406)), -Box(Box(9407)), -Box(Box(9408)), -Box(Box(9409)), -Box(Box(9410)), -Box(Box(9411)), -Box(Box(9412)), -Box(Box(9413)), -Box(Box(9414)), -Box(Box(9415)), -Box(Box(9416)), -Box(Box(9417)), -Box(Box(9418)), -Box(Box(9419)), -Box(Box(9420)), -Box(Box(9421)), -Box(Box(9422)), -Box(Box(9423)), -Box(Box(9424)), -Box(Box(9425)), -Box(Box(9426)), -Box(Box(9427)), -Box(Box(9428)), -Box(Box(9429)), -Box(Box(9430)), -Box(Box(9431)), -Box(Box(9432)), -Box(Box(9433)), -Box(Box(9434)), -Box(Box(9435)), -Box(Box(9436)), -Box(Box(9437)), -Box(Box(9438)), -Box(Box(9439)), -Box(Box(9440)), -Box(Box(9441)), -Box(Box(9442)), -Box(Box(9443)), -Box(Box(9444)), -Box(Box(9445)), -Box(Box(9446)), -Box(Box(9447)), -Box(Box(9448)), -Box(Box(9449)), -Box(Box(9450)), -Box(Box(9451)), -Box(Box(9452)), -Box(Box(9453)), -Box(Box(9454)), -Box(Box(9455)), -Box(Box(9456)), -Box(Box(9457)), -Box(Box(9458)), -Box(Box(9459)), -Box(Box(9460)), -Box(Box(9461)), -Box(Box(9462)), -Box(Box(9463)), -Box(Box(9464)), -Box(Box(9465)), -Box(Box(9466)), -Box(Box(9467)), -Box(Box(9468)), -Box(Box(9469)), -Box(Box(9470)), -Box(Box(9471)), -Box(Box(9472)), -Box(Box(9473)), -Box(Box(9474)), -Box(Box(9475)), -Box(Box(9476)), -Box(Box(9477)), -Box(Box(9478)), -Box(Box(9479)), -Box(Box(9480)), -Box(Box(9481)), -Box(Box(9482)), -Box(Box(9483)), -Box(Box(9484)), -Box(Box(9485)), -Box(Box(9486)), -Box(Box(9487)), -Box(Box(9488)), -Box(Box(9489)), -Box(Box(9490)), -Box(Box(9491)), -Box(Box(9492)), -Box(Box(9493)), -Box(Box(9494)), -Box(Box(9495)), -Box(Box(9496)), -Box(Box(9497)), -Box(Box(9498)), -Box(Box(9499)), -Box(Box(9500)), -Box(Box(9501)), -Box(Box(9502)), -Box(Box(9503)), -Box(Box(9504)), -Box(Box(9505)), -Box(Box(9506)), -Box(Box(9507)), -Box(Box(9508)), -Box(Box(9509)), -Box(Box(9510)), -Box(Box(9511)), -Box(Box(9512)), -Box(Box(9513)), -Box(Box(9514)), -Box(Box(9515)), -Box(Box(9516)), -Box(Box(9517)), -Box(Box(9518)), -Box(Box(9519)), -Box(Box(9520)), -Box(Box(9521)), -Box(Box(9522)), -Box(Box(9523)), -Box(Box(9524)), -Box(Box(9525)), -Box(Box(9526)), -Box(Box(9527)), -Box(Box(9528)), -Box(Box(9529)), -Box(Box(9530)), -Box(Box(9531)), -Box(Box(9532)), -Box(Box(9533)), -Box(Box(9534)), -Box(Box(9535)), -Box(Box(9536)), -Box(Box(9537)), -Box(Box(9538)), -Box(Box(9539)), -Box(Box(9540)), -Box(Box(9541)), -Box(Box(9542)), -Box(Box(9543)), -Box(Box(9544)), -Box(Box(9545)), -Box(Box(9546)), -Box(Box(9547)), -Box(Box(9548)), -Box(Box(9549)), -Box(Box(9550)), -Box(Box(9551)), -Box(Box(9552)), -Box(Box(9553)), -Box(Box(9554)), -Box(Box(9555)), -Box(Box(9556)), -Box(Box(9557)), -Box(Box(9558)), -Box(Box(9559)), -Box(Box(9560)), -Box(Box(9561)), -Box(Box(9562)), -Box(Box(9563)), -Box(Box(9564)), -Box(Box(9565)), -Box(Box(9566)), -Box(Box(9567)), -Box(Box(9568)), -Box(Box(9569)), -Box(Box(9570)), -Box(Box(9571)), -Box(Box(9572)), -Box(Box(9573)), -Box(Box(9574)), -Box(Box(9575)), -Box(Box(9576)), -Box(Box(9577)), -Box(Box(9578)), -Box(Box(9579)), -Box(Box(9580)), -Box(Box(9581)), -Box(Box(9582)), -Box(Box(9583)), -Box(Box(9584)), -Box(Box(9585)), -Box(Box(9586)), -Box(Box(9587)), -Box(Box(9588)), -Box(Box(9589)), -Box(Box(9590)), -Box(Box(9591)), -Box(Box(9592)), -Box(Box(9593)), -Box(Box(9594)), -Box(Box(9595)), -Box(Box(9596)), -Box(Box(9597)), -Box(Box(9598)), -Box(Box(9599)), -Box(Box(9600)), -Box(Box(9601)), -Box(Box(9602)), -Box(Box(9603)), -Box(Box(9604)), -Box(Box(9605)), -Box(Box(9606)), -Box(Box(9607)), -Box(Box(9608)), -Box(Box(9609)), -Box(Box(9610)), -Box(Box(9611)), -Box(Box(9612)), -Box(Box(9613)), -Box(Box(9614)), -Box(Box(9615)), -Box(Box(9616)), -Box(Box(9617)), -Box(Box(9618)), -Box(Box(9619)), -Box(Box(9620)), -Box(Box(9621)), -Box(Box(9622)), -Box(Box(9623)), -Box(Box(9624)), -Box(Box(9625)), -Box(Box(9626)), -Box(Box(9627)), -Box(Box(9628)), -Box(Box(9629)), -Box(Box(9630)), -Box(Box(9631)), -Box(Box(9632)), -Box(Box(9633)), -Box(Box(9634)), -Box(Box(9635)), -Box(Box(9636)), -Box(Box(9637)), -Box(Box(9638)), -Box(Box(9639)), -Box(Box(9640)), -Box(Box(9641)), -Box(Box(9642)), -Box(Box(9643)), -Box(Box(9644)), -Box(Box(9645)), -Box(Box(9646)), -Box(Box(9647)), -Box(Box(9648)), -Box(Box(9649)), -Box(Box(9650)), -Box(Box(9651)), -Box(Box(9652)), -Box(Box(9653)), -Box(Box(9654)), -Box(Box(9655)), -Box(Box(9656)), -Box(Box(9657)), -Box(Box(9658)), -Box(Box(9659)), -Box(Box(9660)), -Box(Box(9661)), -Box(Box(9662)), -Box(Box(9663)), -Box(Box(9664)), -Box(Box(9665)), -Box(Box(9666)), -Box(Box(9667)), -Box(Box(9668)), -Box(Box(9669)), -Box(Box(9670)), -Box(Box(9671)), -Box(Box(9672)), -Box(Box(9673)), -Box(Box(9674)), -Box(Box(9675)), -Box(Box(9676)), -Box(Box(9677)), -Box(Box(9678)), -Box(Box(9679)), -Box(Box(9680)), -Box(Box(9681)), -Box(Box(9682)), -Box(Box(9683)), -Box(Box(9684)), -Box(Box(9685)), -Box(Box(9686)), -Box(Box(9687)), -Box(Box(9688)), -Box(Box(9689)), -Box(Box(9690)), -Box(Box(9691)), -Box(Box(9692)), -Box(Box(9693)), -Box(Box(9694)), -Box(Box(9695)), -Box(Box(9696)), -Box(Box(9697)), -Box(Box(9698)), -Box(Box(9699)), -Box(Box(9700)), -Box(Box(9701)), -Box(Box(9702)), -Box(Box(9703)), -Box(Box(9704)), -Box(Box(9705)), -Box(Box(9706)), -Box(Box(9707)), -Box(Box(9708)), -Box(Box(9709)), -Box(Box(9710)), -Box(Box(9711)), -Box(Box(9712)), -Box(Box(9713)), -Box(Box(9714)), -Box(Box(9715)), -Box(Box(9716)), -Box(Box(9717)), -Box(Box(9718)), -Box(Box(9719)), -Box(Box(9720)), -Box(Box(9721)), -Box(Box(9722)), -Box(Box(9723)), -Box(Box(9724)), -Box(Box(9725)), -Box(Box(9726)), -Box(Box(9727)), -Box(Box(9728)), -Box(Box(9729)), -Box(Box(9730)), -Box(Box(9731)), -Box(Box(9732)), -Box(Box(9733)), -Box(Box(9734)), -Box(Box(9735)), -Box(Box(9736)), -Box(Box(9737)), -Box(Box(9738)), -Box(Box(9739)), -Box(Box(9740)), -Box(Box(9741)), -Box(Box(9742)), -Box(Box(9743)), -Box(Box(9744)), -Box(Box(9745)), -Box(Box(9746)), -Box(Box(9747)), -Box(Box(9748)), -Box(Box(9749)), -Box(Box(9750)), -Box(Box(9751)), -Box(Box(9752)), -Box(Box(9753)), -Box(Box(9754)), -Box(Box(9755)), -Box(Box(9756)), -Box(Box(9757)), -Box(Box(9758)), -Box(Box(9759)), -Box(Box(9760)), -Box(Box(9761)), -Box(Box(9762)), -Box(Box(9763)), -Box(Box(9764)), -Box(Box(9765)), -Box(Box(9766)), -Box(Box(9767)), -Box(Box(9768)), -Box(Box(9769)), -Box(Box(9770)), -Box(Box(9771)), -Box(Box(9772)), -Box(Box(9773)), -Box(Box(9774)), -Box(Box(9775)), -Box(Box(9776)), -Box(Box(9777)), -Box(Box(9778)), -Box(Box(9779)), -Box(Box(9780)), -Box(Box(9781)), -Box(Box(9782)), -Box(Box(9783)), -Box(Box(9784)), -Box(Box(9785)), -Box(Box(9786)), -Box(Box(9787)), -Box(Box(9788)), -Box(Box(9789)), -Box(Box(9790)), -Box(Box(9791)), -Box(Box(9792)), -Box(Box(9793)), -Box(Box(9794)), -Box(Box(9795)), -Box(Box(9796)), -Box(Box(9797)), -Box(Box(9798)), -Box(Box(9799)), -Box(Box(9800)), -Box(Box(9801)), -Box(Box(9802)), -Box(Box(9803)), -Box(Box(9804)), -Box(Box(9805)), -Box(Box(9806)), -Box(Box(9807)), -Box(Box(9808)), -Box(Box(9809)), -Box(Box(9810)), -Box(Box(9811)), -Box(Box(9812)), -Box(Box(9813)), -Box(Box(9814)), -Box(Box(9815)), -Box(Box(9816)), -Box(Box(9817)), -Box(Box(9818)), -Box(Box(9819)), -Box(Box(9820)), -Box(Box(9821)), -Box(Box(9822)), -Box(Box(9823)), -Box(Box(9824)), -Box(Box(9825)), -Box(Box(9826)), -Box(Box(9827)), -Box(Box(9828)), -Box(Box(9829)), -Box(Box(9830)), -Box(Box(9831)), -Box(Box(9832)), -Box(Box(9833)), -Box(Box(9834)), -Box(Box(9835)), -Box(Box(9836)), -Box(Box(9837)), -Box(Box(9838)), -Box(Box(9839)), -Box(Box(9840)), -Box(Box(9841)), -Box(Box(9842)), -Box(Box(9843)), -Box(Box(9844)), -Box(Box(9845)), -Box(Box(9846)), -Box(Box(9847)), -Box(Box(9848)), -Box(Box(9849)), -Box(Box(9850)), -Box(Box(9851)), -Box(Box(9852)), -Box(Box(9853)), -Box(Box(9854)), -Box(Box(9855)), -Box(Box(9856)), -Box(Box(9857)), -Box(Box(9858)), -Box(Box(9859)), -Box(Box(9860)), -Box(Box(9861)), -Box(Box(9862)), -Box(Box(9863)), -Box(Box(9864)), -Box(Box(9865)), -Box(Box(9866)), -Box(Box(9867)), -Box(Box(9868)), -Box(Box(9869)), -Box(Box(9870)), -Box(Box(9871)), -Box(Box(9872)), -Box(Box(9873)), -Box(Box(9874)), -Box(Box(9875)), -Box(Box(9876)), -Box(Box(9877)), -Box(Box(9878)), -Box(Box(9879)), -Box(Box(9880)), -Box(Box(9881)), -Box(Box(9882)), -Box(Box(9883)), -Box(Box(9884)), -Box(Box(9885)), -Box(Box(9886)), -Box(Box(9887)), -Box(Box(9888)), -Box(Box(9889)), -Box(Box(9890)), -Box(Box(9891)), -Box(Box(9892)), -Box(Box(9893)), -Box(Box(9894)), -Box(Box(9895)), -Box(Box(9896)), -Box(Box(9897)), -Box(Box(9898)), -Box(Box(9899)), -Box(Box(9900)), -Box(Box(9901)), -Box(Box(9902)), -Box(Box(9903)), -Box(Box(9904)), -Box(Box(9905)), -Box(Box(9906)), -Box(Box(9907)), -Box(Box(9908)), -Box(Box(9909)), -Box(Box(9910)), -Box(Box(9911)), -Box(Box(9912)), -Box(Box(9913)), -Box(Box(9914)), -Box(Box(9915)), -Box(Box(9916)), -Box(Box(9917)), -Box(Box(9918)), -Box(Box(9919)), -Box(Box(9920)), -Box(Box(9921)), -Box(Box(9922)), -Box(Box(9923)), -Box(Box(9924)), -Box(Box(9925)), -Box(Box(9926)), -Box(Box(9927)), -Box(Box(9928)), -Box(Box(9929)), -Box(Box(9930)), -Box(Box(9931)), -Box(Box(9932)), -Box(Box(9933)), -Box(Box(9934)), -Box(Box(9935)), -Box(Box(9936)), -Box(Box(9937)), -Box(Box(9938)), -Box(Box(9939)), -Box(Box(9940)), -Box(Box(9941)), -Box(Box(9942)), -Box(Box(9943)), -Box(Box(9944)), -Box(Box(9945)), -Box(Box(9946)), -Box(Box(9947)), -Box(Box(9948)), -Box(Box(9949)), -Box(Box(9950)), -Box(Box(9951)), -Box(Box(9952)), -Box(Box(9953)), -Box(Box(9954)), -Box(Box(9955)), -Box(Box(9956)), -Box(Box(9957)), -Box(Box(9958)), -Box(Box(9959)), -Box(Box(9960)), -Box(Box(9961)), -Box(Box(9962)), -Box(Box(9963)), -Box(Box(9964)), -Box(Box(9965)), -Box(Box(9966)), -Box(Box(9967)), -Box(Box(9968)), -Box(Box(9969)), -Box(Box(9970)), -Box(Box(9971)), -Box(Box(9972)), -Box(Box(9973)), -Box(Box(9974)), -Box(Box(9975)), -Box(Box(9976)), -Box(Box(9977)), -Box(Box(9978)), -Box(Box(9979)), -Box(Box(9980)), -Box(Box(9981)), -Box(Box(9982)), -Box(Box(9983)), -Box(Box(9984)), -Box(Box(9985)), -Box(Box(9986)), -Box(Box(9987)), -Box(Box(9988)), -Box(Box(9989)), -Box(Box(9990)), -Box(Box(9991)), -Box(Box(9992)), -Box(Box(9993)), -Box(Box(9994)), -Box(Box(9995)), -Box(Box(9996)), -Box(Box(9997)), -Box(Box(9998)), -Box(Box(9999)), -]; - -confuse(x) { - try { throw x; } catch (e) { return e; } -} - -main() { - if (!identical(confuse(list1), confuse(list2))) { - throw new Exception("list1 !== list2"); - } -} diff --git a/tests/language_2/cascade/cascade2_test.dart b/tests/language_2/cascade/cascade2_test.dart deleted file mode 100644 index 3bd961eff24..00000000000 --- a/tests/language_2/cascade/cascade2_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to hit an assertion in the -// container tracer visitor in the presence of cascaded calls. - -import "package:expect/expect.dart"; - -class A { - var foo; - - add(list) { - foo = list; - list.add(2.5); - return this; - } - - call(arg) => arg; -} - -main() { - var foo = [42, 0]; - var a = new A(); - var bar = a..add(foo)('WHAT'); - a..foo[0] = new Object(); - Expect.throwsNoSuchMethodError(() => foo[0] + 2); -} diff --git a/tests/language_2/cascade/cascade3_test.dart b/tests/language_2/cascade/cascade3_test.dart deleted file mode 100644 index 33278315fa6..00000000000 --- a/tests/language_2/cascade/cascade3_test.dart +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test cascades, issues 7494 (vm), 7689 (dart2js). - -main() { - var a = new Element(null); - Expect.equals(1, a.path0.length); - Expect.equals(a, a.path0[0]); - - // Issue 7693: e0 ? e1 : e2..f() parses as (e0 ? e1 : e2)..f(). - Expect.equals(2, a.path1.length); - Expect.equals(a, a.path1[0]); - Expect.equals(a, a.path1[1]); - - Expect.equals(1, a.path2.length); // NPE. - - var b = new Element(a); - Expect.equals(2, b.path0.length); - Expect.equals(a, b.path0[0]); - Expect.equals(b, b.path0[1]); - - Expect.equals(3, b.path1.length); - Expect.equals(a, b.path1[0]); - Expect.equals(a, b.path1[1]); - Expect.equals(b, b.path1[2]); - - Expect.equals(2, b.path2.length); // NPE. - - // Regression test for dartdevc comma expressions (js_ast printer did not - // generate parentheses around the comma expression). - var expectedList = [3, 2, 1]; - for (var actual in expectedList.toList()..sort()) { - Expect.equals( - expectedList.removeLast(), actual, "list items should be sorted"); - } -} - -class Element { - final Element parent; - - Element(this.parent); - - List get path0 { - if (parent == null) { - return [this]; - } else { - return parent.path0..add(this); - } - } - - List get path1 { - return (parent == null) ? [this] : parent.path1 - ..add(this); - } - - List get path2 { - return (parent == null) ? [this] : (parent.path2..add(this)); - } -} diff --git a/tests/language_2/cascade/cascade_test.dart b/tests/language_2/cascade/cascade_test.dart deleted file mode 100644 index d8aea40ec24..00000000000 --- a/tests/language_2/cascade/cascade_test.dart +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test cascades. - -class A { - int x; - int y; - - A(this.x, this.y); - - A setX(int x) { - this.x = x; - return this; - } - - void setY(int y) { - this.y = y; - } - - Function swap() { - int tmp = x; - x = y; - y = tmp; - return this.swap; - } - - void check(int x, int y) { - Expect.equals(x, this.x); - Expect.equals(y, this.y); - } - - operator [](var i) { - if (i == 0) return x; - if (i == 1) return y; - if (i == "swap") return this.swap; - return null; - } - - operator []=(int i, int value) { - if (i == 0) { - x = value; - } else if (i == 1) { - y = value; - } - } - - /** - * A pseudo-keyword. - */ - import() { - x++; - } -} - -main() { - A a = new A(1, 2); - a - ..check(1, 2) - ..swap() - ..check(2, 1) - ..x = 4 - ..y = 9 - ..check(4, 9) - ..setX(10) - ..check(10, 9) - ..y = 5 - ..check(10, 5) - ..swap()()() - ..check(5, 10) - ..[0] = 2 - ..check(2, 10) - ..setX(10).setY(3) - ..check(10, 3) - ..setX(7)["swap"]() - ..check(3, 7) - ..import() - ..check(4, 7) - ..["swap"]()()() - ..check(7, 4); - a.check(7, 4); - a..(42); - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] Expected an identifier, but got ''. - // ^ - // [cfe] Expected an identifier, but got '('. - a..37; - // ^^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] Expected an identifier, but got '37'. - a.."foo"; - // ^^^^^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] Expected an identifier, but got '"foo"'. -} diff --git a/tests/language_2/cascade/in_expression_function_test.dart b/tests/language_2/cascade/in_expression_function_test.dart deleted file mode 100644 index 3d67d5642d1..00000000000 --- a/tests/language_2/cascade/in_expression_function_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing throw statement - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -makeMap() => new Map() - ..[3] = 4 - ..[0] = 11; - -class MyClass { - foo() => this - ..bar(3) - ..baz(4); - bar(x) => x; - baz(y) => y * 2; -} - -main() { - var o = new MyClass(); - Expect.equals(o.foo(), o); - var g = makeMap(); - Expect.equals(g[3], 4); - Expect.equals(g[0], 11); -} diff --git a/tests/language_2/cascade/in_initializer_list_test.dart b/tests/language_2/cascade/in_initializer_list_test.dart deleted file mode 100644 index d9b2f53b273..00000000000 --- a/tests/language_2/cascade/in_initializer_list_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A { - foo() {} - bar() {} -} - -class B { - var x; - final y; - - B(a) - : x = a - ..foo() - ..bar(), - y = a - ..foo() - ..bar() {} -} - -main() { - var a = new A(), b = new B(a); - Expect.equals(a, b.x); - Expect.equals(a, b.y); -} diff --git a/tests/language_2/cascade/nested_test.dart b/tests/language_2/cascade/nested_test.dart deleted file mode 100644 index 60ef44abb86..00000000000 --- a/tests/language_2/cascade/nested_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -class Foo { - int x; -} - -class Bar { - Foo foo; - int y; -} - -main() { - var bar = new Bar() - ..foo = (new Foo()..x = 42) - ..y = 38; - Expect.isTrue(bar is Bar); - Expect.isTrue(bar.foo is Foo); - Expect.equals(bar.foo.x, 42); - Expect.equals(bar.y, 38); -} diff --git a/tests/language_2/cascade/on_static_field_test.dart b/tests/language_2/cascade/on_static_field_test.dart deleted file mode 100644 index 05391e8dffd..00000000000 --- a/tests/language_2/cascade/on_static_field_test.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2017, 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 - -final List list = []..add("foo")..add("bar")..add("baz"); - -main() { - print(list); -} diff --git a/tests/language_2/cascade/precedence_test.dart b/tests/language_2/cascade/precedence_test.dart deleted file mode 100644 index d6bc54d998b..00000000000 --- a/tests/language_2/cascade/precedence_test.dart +++ /dev/null @@ -1,185 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class A { - int value; - A(this.value); - void set(int value) { - this.value = value; - } - - int get() => value; - int operator [](int index) => value + index; - void operator []=(int index, int newValue) { - value += -index + newValue; - } - - void test(int expected) { - Expect.equals(expected, value); - } - - Function limp(int n) { - if (n == 0) return set; - return () => limp(n - 1); - } - - A get self => this; - A operator +(A other) { - this.value += other.value; - return this; - } -} - -class Box { - A value; - Box(this.value); - A operator [](int pos) => value; - void operator []=(int pos, A a) { - value = a; - } - - A get x => value; - void set x(A a) { - value = a; - } -} - -// Subset of grammar being tested. -// -// expression: -// assignableExpression assignmentOperator expression -// | conditionalExpression cascadeSection* -// ; -// expressionWithoutCascade: -// assignableExpression assignmentOperator expressionWithoutCascade -// | conditionalExpression -// ; -// expressionList: -// expression (',' expression)* -// ; -// assignableExpression: -// primary (arguments* assignableSelector)+ -// | super assignableSelector -// | identifier -// ; -// conditionalExpression: -// logicalOrExpression ('?' expressionWithoutCascade ':' expressionWithoutCascade)? -// ; -// primary: -// thisExpression -// | super assignableSelector -// | functionExpression -// | literal -// | identifier -// | newExpression -// | constObjectExpression -// | '(' expression ')' -// ; -// assignableSelector: -// '[' expression ']' -// | '.' identifier -// ; -// -// In words: -// An assignableExpression is either a variable or something ending in -// [expression] or .identifier. - -main() { - A a = new A(42); - A original = a; - A b = new A(87); - fa() => a; - Box box = new Box(a); - // Different expressions on the left-hand side of '..'. - // conditionalExpression >> postfixExpression > primary selector* - Expect.equals( - a, - a - ..set(37) - ..get()); - a.test(37); - Expect.equals( - a, - fa() - ..set(42) - ..get()); - a.test(42); - Expect.equals( - a, - box.x - ..set(37) - ..get()); - a.test(37); - // '..' binds to 'b + a', i.e., to the 'b' object, not to 'a'. - Expect.equals( - b, - b + a - ..test(124) - ..set(117) - ..get()); - b.test(117); - a.test(37); - - // expression :: conditionalExpression cascadeSection - // and conditionalExpression ends in expressionWithoutCascade. - // I.e., '..' binds to the entire condition expression, not to 'b'. - (a.value == 37) ? a : b - ..set(42); - a.test(42); - - // This binds .. to 'a', not 'c=a', and performs assignment after reading - // c.get(). - A c = new A(21); - c = a..set(c.get()); // FAILING. - Expect.equals(a, c); - Expect.equals(original, a); - a.test(21); // Fails as 42 if above is parsed as (c = a)..set(c.get()). - - // Should be parsed as (box..x = (c = a))..x.test(21). - c = null; - box - ..x = c = a - ..x.test(21); - c.test(21); - // Other variants - c = null; - box - ..x = c = (a..test(21)) - ..x.test(21); - c.test(21); - - c = null; - box - ..x = (c = a..test(21)) - ..x.test(21); - c.test(21); - - // Should work the same: - (a..set(42))..test(42); - a - ..set(21) - ..test(21); - - c = null; - Box originalBox = box; - // Should parse as: - // box = (box..x = (a.value == 21 ? b : c)..x.test(117)); - box = box - ..x = a.value == 21 ? b : c - ..x.test(117); - Expect.equals(originalBox, box); - Expect.equals(box.value, b); - - // New cascades are allowed inside an expressionWithoutCascade if properly - // delimited. - box - ..x = (a - ..set(42) - ..test(42)) - ..x.test(42); -} diff --git a/tests/language_2/cascade/runtime_test.dart b/tests/language_2/cascade/runtime_test.dart deleted file mode 100644 index 753d6fd68e2..00000000000 --- a/tests/language_2/cascade/runtime_test.dart +++ /dev/null @@ -1,93 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 "package:expect/expect.dart"; - -// Test cascades. - -class A { - int x; - int y; - - A(this.x, this.y); - - A setX(int x) { - this.x = x; - return this; - } - - void setY(int y) { - this.y = y; - } - - Function swap() { - int tmp = x; - x = y; - y = tmp; - return this.swap; - } - - void check(int x, int y) { - Expect.equals(x, this.x); - Expect.equals(y, this.y); - } - - operator [](var i) { - if (i == 0) return x; - if (i == 1) return y; - if (i == "swap") return this.swap; - return null; - } - - operator []=(int i, int value) { - if (i == 0) { - x = value; - } else if (i == 1) { - y = value; - } - } - - /** - * A pseudo-keyword. - */ - import() { - x++; - } -} - -main() { - A a = new A(1, 2); - a - ..check(1, 2) - ..swap() - ..check(2, 1) - ..x = 4 - ..y = 9 - ..check(4, 9) - ..setX(10) - ..check(10, 9) - ..y = 5 - ..check(10, 5) - ..swap()()() - ..check(5, 10) - ..[0] = 2 - ..check(2, 10) - ..setX(10).setY(3) - ..check(10, 3) - ..setX(7)["swap"]() - ..check(3, 7) - ..import() - ..check(4, 7) - ..["swap"]()()() - ..check(7, 4); - a.check(7, 4); - - - -} diff --git a/tests/language_2/class/additional_interface_adds_optional_args_concrete_subclass_test.dart b/tests/language_2/class/additional_interface_adds_optional_args_concrete_subclass_test.dart deleted file mode 100644 index cb3787eada2..00000000000 --- a/tests/language_2/class/additional_interface_adds_optional_args_concrete_subclass_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2017, 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 - -class A { - void foo() {} -} - -abstract class I { - void foo([x]); -} - -abstract class B extends A implements I { - // If this class were concrete, there would be a problem, since `new - // B().foo(42)` would be statically allowed, but would lead to invalid - // arguments being passed to A.foo. But since the class is abstract, there is - // no problem. -} - -class C extends B { -// ^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_IMPLEMENTATION_OVERRIDE -// [cfe] The implementation of 'foo' in the non-abstract class 'C' does not conform to its interface. - - // However, there is a problem here because this class is concrete and doesn't - // override foo. -} - -void f(B b) { - b.foo(); -} - -main() { - f(new C()); -} diff --git a/tests/language_2/class/class_test.dart b/tests/language_2/class/class_test.dart deleted file mode 100644 index 5898970d84f..00000000000 --- a/tests/language_2/class/class_test.dart +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Tests basic classes and methods. -class ClassTest { - ClassTest() {} - - static testMain() { - var test = new ClassTest(); - test.testSuperCalls(); - test.testVirtualCalls(); - test.testStaticCalls(); - test.testInheritedField(); - test.testMemberRefInClosure(); - test.testFactory(); - test.testNamedConstructors(); - test.testDefaultImplementation(); - test.testFunctionParameter((int a) { - return a; - }); - } - - testFunctionParameter(int func(int a)) { - Expect.equals(1, func(1)); - } - - testSuperCalls() { - var sub = new Sub(); - Expect.equals(43, sub.methodX()); - Expect.equals(84, sub.methodK()); - } - - testVirtualCalls() { - var sub = new Sub(); - Expect.equals(41, sub.method2()); - Expect.equals(41, sub.method3()); - } - - testStaticCalls() { - var sub = new Sub(); - Expect.equals(-42, Sub.method4()); - Expect.equals(-41, sub.method5()); - } - - testInheritedField() { - var sub = new Sub(); - Expect.equals(42, sub.method6()); - } - - testMemberRefInClosure() { - var sub = new Sub(); - Expect.equals(1, sub.closureRef()); - Expect.equals(2, sub.closureRef()); - // Make sure it is actually on the object, not the global 'this'. - sub = new Sub(); - Expect.equals(1, sub.closureRef()); - Expect.equals(2, sub.closureRef()); - } - - testFactory() { - var sup = new Sup.named(); - Expect.equals(43, sup.methodX()); - Expect.equals(84, sup.methodK()); - } - - testNamedConstructors() { - var sup = new Sup.fromInt(4); - Expect.equals(4, sup.methodX()); - Expect.equals(0, sup.methodK()); - } - - testDefaultImplementation() { - var x = new Inter(4); - Expect.equals(4, x.methodX()); - Expect.equals(8, x.methodK()); - - x = new Inter.fromInt(4); - Expect.equals(4, x.methodX()); - Expect.equals(0, x.methodK()); - - x = new Inter.named(); - Expect.equals(43, x.methodX()); - Expect.equals(84, x.methodK()); - - x = new Inter.factory(); - Expect.equals(43, x.methodX()); - Expect.equals(84, x.methodK()); - } -} - -abstract class Inter { - factory Inter.named() = Sup.named; - factory Inter.fromInt(int x) = Sup.fromInt; - factory Inter(int x) = Sup; - factory Inter.factory() = Sup.factory; - int methodX(); - int methodK(); - int x_; -} - -class Sup implements Inter { - int x_; - int k_; - - factory Sup.named() { - return new Sub(); - } - - factory Sup.factory() { - return new Sub(); - } - - Sup.fromInt(int x) { - x_ = x; - k_ = 0; - } - - int methodX() { - return x_; - } - - int methodK() { - return k_; - } - - Sup(int x) : this.x_ = x { - k_ = x * 2; - } - - int method2() { - return x_ - 1; - } -} - -class Sub extends Sup { - int y_; - - // Override - int methodX() { - return super.methodX() + 1; - } - - int method3() { - return method2(); - } - - static int method4() { - return -42; - } - - int method5() { - return method4() + 1; - } - - int method6() { - return x_ + y_; - } - - int closureRef() { - var f = () { - y_ += 1; - return y_; - }; - return f(); - } - - Sub() : super(42) { - y_ = 0; - } -} - -main() { - ClassTest.testMain(); -} diff --git a/tests/language_2/class/classes_static_method_clash_test.dart b/tests/language_2/class/classes_static_method_clash_test.dart deleted file mode 100644 index d1c91ac9c8a..00000000000 --- a/tests/language_2/class/classes_static_method_clash_test.dart +++ /dev/null @@ -1,8169 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -// This methods needs a stub method (because it is used in Function.apply, where -// we can't see all possible uses). -// The stub-method(s) must not clash with other global names (like classes). -foo({a: 499}) => a; - -bar(f) { - return f(); - return null; -} - -int confuse(x) { - if (new DateTime.now().millisecondsSinceEpoch == 42) confuse(x + 1); - return x; -} - -main() { - Expect.equals(42, Function.apply(foo, [], {#a: 42})); - Expect.equals(499, Function.apply(foo, [], null)); - print(objects[confuse(0)]); -} - -/* -The following code has been generated with the following script: - -get chars sync* { - for (int i = "a".codeUnitAt(0); i <= "z".codeUnitAt(0); i++) { - yield new String.fromCharCodes([i]); - } - for (int i = "A".codeUnitAt(0); i <= "Z".codeUnitAt(0); i++) { - yield new String.fromCharCodes([i]); - } -} - -main() { - StringBuffer classes = new StringBuffer(); - print("var objects = ["); - for (String c1 in chars) { - for (String c2 in chars) { - print(" new C$c1$c2(),"); - classes.writeln("class C$c1$c2{}"); - } - } - print("];"); - print(classes.toString()); -} -*/ - -var objects = [ - new Caa(), - new Cab(), - new Cac(), - new Cad(), - new Cae(), - new Caf(), - new Cag(), - new Cah(), - new Cai(), - new Caj(), - new Cak(), - new Cal(), - new Cam(), - new Can(), - new Cao(), - new Cap(), - new Caq(), - new Car(), - new Cas(), - new Cat(), - new Cau(), - new Cav(), - new Caw(), - new Cax(), - new Cay(), - new Caz(), - new CaA(), - new CaB(), - new CaC(), - new CaD(), - new CaE(), - new CaF(), - new CaG(), - new CaH(), - new CaI(), - new CaJ(), - new CaK(), - new CaL(), - new CaM(), - new CaN(), - new CaO(), - new CaP(), - new CaQ(), - new CaR(), - new CaS(), - new CaT(), - new CaU(), - new CaV(), - new CaW(), - new CaX(), - new CaY(), - new CaZ(), - new Cba(), - new Cbb(), - new Cbc(), - new Cbd(), - new Cbe(), - new Cbf(), - new Cbg(), - new Cbh(), - new Cbi(), - new Cbj(), - new Cbk(), - new Cbl(), - new Cbm(), - new Cbn(), - new Cbo(), - new Cbp(), - new Cbq(), - new Cbr(), - new Cbs(), - new Cbt(), - new Cbu(), - new Cbv(), - new Cbw(), - new Cbx(), - new Cby(), - new Cbz(), - new CbA(), - new CbB(), - new CbC(), - new CbD(), - new CbE(), - new CbF(), - new CbG(), - new CbH(), - new CbI(), - new CbJ(), - new CbK(), - new CbL(), - new CbM(), - new CbN(), - new CbO(), - new CbP(), - new CbQ(), - new CbR(), - new CbS(), - new CbT(), - new CbU(), - new CbV(), - new CbW(), - new CbX(), - new CbY(), - new CbZ(), - new Cca(), - new Ccb(), - new Ccc(), - new Ccd(), - new Cce(), - new Ccf(), - new Ccg(), - new Cch(), - new Cci(), - new Ccj(), - new Cck(), - new Ccl(), - new Ccm(), - new Ccn(), - new Cco(), - new Ccp(), - new Ccq(), - new Ccr(), - new Ccs(), - new Cct(), - new Ccu(), - new Ccv(), - new Ccw(), - new Ccx(), - new Ccy(), - new Ccz(), - new CcA(), - new CcB(), - new CcC(), - new CcD(), - new CcE(), - new CcF(), - new CcG(), - new CcH(), - new CcI(), - new CcJ(), - new CcK(), - new CcL(), - new CcM(), - new CcN(), - new CcO(), - new CcP(), - new CcQ(), - new CcR(), - new CcS(), - new CcT(), - new CcU(), - new CcV(), - new CcW(), - new CcX(), - new CcY(), - new CcZ(), - new Cda(), - new Cdb(), - new Cdc(), - new Cdd(), - new Cde(), - new Cdf(), - new Cdg(), - new Cdh(), - new Cdi(), - new Cdj(), - new Cdk(), - new Cdl(), - new Cdm(), - new Cdn(), - new Cdo(), - new Cdp(), - new Cdq(), - new Cdr(), - new Cds(), - new Cdt(), - new Cdu(), - new Cdv(), - new Cdw(), - new Cdx(), - new Cdy(), - new Cdz(), - new CdA(), - new CdB(), - new CdC(), - new CdD(), - new CdE(), - new CdF(), - new CdG(), - new CdH(), - new CdI(), - new CdJ(), - new CdK(), - new CdL(), - new CdM(), - new CdN(), - new CdO(), - new CdP(), - new CdQ(), - new CdR(), - new CdS(), - new CdT(), - new CdU(), - new CdV(), - new CdW(), - new CdX(), - new CdY(), - new CdZ(), - new Cea(), - new Ceb(), - new Cec(), - new Ced(), - new Cee(), - new Cef(), - new Ceg(), - new Ceh(), - new Cei(), - new Cej(), - new Cek(), - new Cel(), - new Cem(), - new Cen(), - new Ceo(), - new Cep(), - new Ceq(), - new Cer(), - new Ces(), - new Cet(), - new Ceu(), - new Cev(), - new Cew(), - new Cex(), - new Cey(), - new Cez(), - new CeA(), - new CeB(), - new CeC(), - new CeD(), - new CeE(), - new CeF(), - new CeG(), - new CeH(), - new CeI(), - new CeJ(), - new CeK(), - new CeL(), - new CeM(), - new CeN(), - new CeO(), - new CeP(), - new CeQ(), - new CeR(), - new CeS(), - new CeT(), - new CeU(), - new CeV(), - new CeW(), - new CeX(), - new CeY(), - new CeZ(), - new Cfa(), - new Cfb(), - new Cfc(), - new Cfd(), - new Cfe(), - new Cff(), - new Cfg(), - new Cfh(), - new Cfi(), - new Cfj(), - new Cfk(), - new Cfl(), - new Cfm(), - new Cfn(), - new Cfo(), - new Cfp(), - new Cfq(), - new Cfr(), - new Cfs(), - new Cft(), - new Cfu(), - new Cfv(), - new Cfw(), - new Cfx(), - new Cfy(), - new Cfz(), - new CfA(), - new CfB(), - new CfC(), - new CfD(), - new CfE(), - new CfF(), - new CfG(), - new CfH(), - new CfI(), - new CfJ(), - new CfK(), - new CfL(), - new CfM(), - new CfN(), - new CfO(), - new CfP(), - new CfQ(), - new CfR(), - new CfS(), - new CfT(), - new CfU(), - new CfV(), - new CfW(), - new CfX(), - new CfY(), - new CfZ(), - new Cga(), - new Cgb(), - new Cgc(), - new Cgd(), - new Cge(), - new Cgf(), - new Cgg(), - new Cgh(), - new Cgi(), - new Cgj(), - new Cgk(), - new Cgl(), - new Cgm(), - new Cgn(), - new Cgo(), - new Cgp(), - new Cgq(), - new Cgr(), - new Cgs(), - new Cgt(), - new Cgu(), - new Cgv(), - new Cgw(), - new Cgx(), - new Cgy(), - new Cgz(), - new CgA(), - new CgB(), - new CgC(), - new CgD(), - new CgE(), - new CgF(), - new CgG(), - new CgH(), - new CgI(), - new CgJ(), - new CgK(), - new CgL(), - new CgM(), - new CgN(), - new CgO(), - new CgP(), - new CgQ(), - new CgR(), - new CgS(), - new CgT(), - new CgU(), - new CgV(), - new CgW(), - new CgX(), - new CgY(), - new CgZ(), - new Cha(), - new Chb(), - new Chc(), - new Chd(), - new Che(), - new Chf(), - new Chg(), - new Chh(), - new Chi(), - new Chj(), - new Chk(), - new Chl(), - new Chm(), - new Chn(), - new Cho(), - new Chp(), - new Chq(), - new Chr(), - new Chs(), - new Cht(), - new Chu(), - new Chv(), - new Chw(), - new Chx(), - new Chy(), - new Chz(), - new ChA(), - new ChB(), - new ChC(), - new ChD(), - new ChE(), - new ChF(), - new ChG(), - new ChH(), - new ChI(), - new ChJ(), - new ChK(), - new ChL(), - new ChM(), - new ChN(), - new ChO(), - new ChP(), - new ChQ(), - new ChR(), - new ChS(), - new ChT(), - new ChU(), - new ChV(), - new ChW(), - new ChX(), - new ChY(), - new ChZ(), - new Cia(), - new Cib(), - new Cic(), - new Cid(), - new Cie(), - new Cif(), - new Cig(), - new Cih(), - new Cii(), - new Cij(), - new Cik(), - new Cil(), - new Cim(), - new Cin(), - new Cio(), - new Cip(), - new Ciq(), - new Cir(), - new Cis(), - new Cit(), - new Ciu(), - new Civ(), - new Ciw(), - new Cix(), - new Ciy(), - new Ciz(), - new CiA(), - new CiB(), - new CiC(), - new CiD(), - new CiE(), - new CiF(), - new CiG(), - new CiH(), - new CiI(), - new CiJ(), - new CiK(), - new CiL(), - new CiM(), - new CiN(), - new CiO(), - new CiP(), - new CiQ(), - new CiR(), - new CiS(), - new CiT(), - new CiU(), - new CiV(), - new CiW(), - new CiX(), - new CiY(), - new CiZ(), - new Cja(), - new Cjb(), - new Cjc(), - new Cjd(), - new Cje(), - new Cjf(), - new Cjg(), - new Cjh(), - new Cji(), - new Cjj(), - new Cjk(), - new Cjl(), - new Cjm(), - new Cjn(), - new Cjo(), - new Cjp(), - new Cjq(), - new Cjr(), - new Cjs(), - new Cjt(), - new Cju(), - new Cjv(), - new Cjw(), - new Cjx(), - new Cjy(), - new Cjz(), - new CjA(), - new CjB(), - new CjC(), - new CjD(), - new CjE(), - new CjF(), - new CjG(), - new CjH(), - new CjI(), - new CjJ(), - new CjK(), - new CjL(), - new CjM(), - new CjN(), - new CjO(), - new CjP(), - new CjQ(), - new CjR(), - new CjS(), - new CjT(), - new CjU(), - new CjV(), - new CjW(), - new CjX(), - new CjY(), - new CjZ(), - new Cka(), - new Ckb(), - new Ckc(), - new Ckd(), - new Cke(), - new Ckf(), - new Ckg(), - new Ckh(), - new Cki(), - new Ckj(), - new Ckk(), - new Ckl(), - new Ckm(), - new Ckn(), - new Cko(), - new Ckp(), - new Ckq(), - new Ckr(), - new Cks(), - new Ckt(), - new Cku(), - new Ckv(), - new Ckw(), - new Ckx(), - new Cky(), - new Ckz(), - new CkA(), - new CkB(), - new CkC(), - new CkD(), - new CkE(), - new CkF(), - new CkG(), - new CkH(), - new CkI(), - new CkJ(), - new CkK(), - new CkL(), - new CkM(), - new CkN(), - new CkO(), - new CkP(), - new CkQ(), - new CkR(), - new CkS(), - new CkT(), - new CkU(), - new CkV(), - new CkW(), - new CkX(), - new CkY(), - new CkZ(), - new Cla(), - new Clb(), - new Clc(), - new Cld(), - new Cle(), - new Clf(), - new Clg(), - new Clh(), - new Cli(), - new Clj(), - new Clk(), - new Cll(), - new Clm(), - new Cln(), - new Clo(), - new Clp(), - new Clq(), - new Clr(), - new Cls(), - new Clt(), - new Clu(), - new Clv(), - new Clw(), - new Clx(), - new Cly(), - new Clz(), - new ClA(), - new ClB(), - new ClC(), - new ClD(), - new ClE(), - new ClF(), - new ClG(), - new ClH(), - new ClI(), - new ClJ(), - new ClK(), - new ClL(), - new ClM(), - new ClN(), - new ClO(), - new ClP(), - new ClQ(), - new ClR(), - new ClS(), - new ClT(), - new ClU(), - new ClV(), - new ClW(), - new ClX(), - new ClY(), - new ClZ(), - new Cma(), - new Cmb(), - new Cmc(), - new Cmd(), - new Cme(), - new Cmf(), - new Cmg(), - new Cmh(), - new Cmi(), - new Cmj(), - new Cmk(), - new Cml(), - new Cmm(), - new Cmn(), - new Cmo(), - new Cmp(), - new Cmq(), - new Cmr(), - new Cms(), - new Cmt(), - new Cmu(), - new Cmv(), - new Cmw(), - new Cmx(), - new Cmy(), - new Cmz(), - new CmA(), - new CmB(), - new CmC(), - new CmD(), - new CmE(), - new CmF(), - new CmG(), - new CmH(), - new CmI(), - new CmJ(), - new CmK(), - new CmL(), - new CmM(), - new CmN(), - new CmO(), - new CmP(), - new CmQ(), - new CmR(), - new CmS(), - new CmT(), - new CmU(), - new CmV(), - new CmW(), - new CmX(), - new CmY(), - new CmZ(), - new Cna(), - new Cnb(), - new Cnc(), - new Cnd(), - new Cne(), - new Cnf(), - new Cng(), - new Cnh(), - new Cni(), - new Cnj(), - new Cnk(), - new Cnl(), - new Cnm(), - new Cnn(), - new Cno(), - new Cnp(), - new Cnq(), - new Cnr(), - new Cns(), - new Cnt(), - new Cnu(), - new Cnv(), - new Cnw(), - new Cnx(), - new Cny(), - new Cnz(), - new CnA(), - new CnB(), - new CnC(), - new CnD(), - new CnE(), - new CnF(), - new CnG(), - new CnH(), - new CnI(), - new CnJ(), - new CnK(), - new CnL(), - new CnM(), - new CnN(), - new CnO(), - new CnP(), - new CnQ(), - new CnR(), - new CnS(), - new CnT(), - new CnU(), - new CnV(), - new CnW(), - new CnX(), - new CnY(), - new CnZ(), - new Coa(), - new Cob(), - new Coc(), - new Cod(), - new Coe(), - new Cof(), - new Cog(), - new Coh(), - new Coi(), - new Coj(), - new Cok(), - new Col(), - new Com(), - new Con(), - new Coo(), - new Cop(), - new Coq(), - new Cor(), - new Cos(), - new Cot(), - new Cou(), - new Cov(), - new Cow(), - new Cox(), - new Coy(), - new Coz(), - new CoA(), - new CoB(), - new CoC(), - new CoD(), - new CoE(), - new CoF(), - new CoG(), - new CoH(), - new CoI(), - new CoJ(), - new CoK(), - new CoL(), - new CoM(), - new CoN(), - new CoO(), - new CoP(), - new CoQ(), - new CoR(), - new CoS(), - new CoT(), - new CoU(), - new CoV(), - new CoW(), - new CoX(), - new CoY(), - new CoZ(), - new Cpa(), - new Cpb(), - new Cpc(), - new Cpd(), - new Cpe(), - new Cpf(), - new Cpg(), - new Cph(), - new Cpi(), - new Cpj(), - new Cpk(), - new Cpl(), - new Cpm(), - new Cpn(), - new Cpo(), - new Cpp(), - new Cpq(), - new Cpr(), - new Cps(), - new Cpt(), - new Cpu(), - new Cpv(), - new Cpw(), - new Cpx(), - new Cpy(), - new Cpz(), - new CpA(), - new CpB(), - new CpC(), - new CpD(), - new CpE(), - new CpF(), - new CpG(), - new CpH(), - new CpI(), - new CpJ(), - new CpK(), - new CpL(), - new CpM(), - new CpN(), - new CpO(), - new CpP(), - new CpQ(), - new CpR(), - new CpS(), - new CpT(), - new CpU(), - new CpV(), - new CpW(), - new CpX(), - new CpY(), - new CpZ(), - new Cqa(), - new Cqb(), - new Cqc(), - new Cqd(), - new Cqe(), - new Cqf(), - new Cqg(), - new Cqh(), - new Cqi(), - new Cqj(), - new Cqk(), - new Cql(), - new Cqm(), - new Cqn(), - new Cqo(), - new Cqp(), - new Cqq(), - new Cqr(), - new Cqs(), - new Cqt(), - new Cqu(), - new Cqv(), - new Cqw(), - new Cqx(), - new Cqy(), - new Cqz(), - new CqA(), - new CqB(), - new CqC(), - new CqD(), - new CqE(), - new CqF(), - new CqG(), - new CqH(), - new CqI(), - new CqJ(), - new CqK(), - new CqL(), - new CqM(), - new CqN(), - new CqO(), - new CqP(), - new CqQ(), - new CqR(), - new CqS(), - new CqT(), - new CqU(), - new CqV(), - new CqW(), - new CqX(), - new CqY(), - new CqZ(), - new Cra(), - new Crb(), - new Crc(), - new Crd(), - new Cre(), - new Crf(), - new Crg(), - new Crh(), - new Cri(), - new Crj(), - new Crk(), - new Crl(), - new Crm(), - new Crn(), - new Cro(), - new Crp(), - new Crq(), - new Crr(), - new Crs(), - new Crt(), - new Cru(), - new Crv(), - new Crw(), - new Crx(), - new Cry(), - new Crz(), - new CrA(), - new CrB(), - new CrC(), - new CrD(), - new CrE(), - new CrF(), - new CrG(), - new CrH(), - new CrI(), - new CrJ(), - new CrK(), - new CrL(), - new CrM(), - new CrN(), - new CrO(), - new CrP(), - new CrQ(), - new CrR(), - new CrS(), - new CrT(), - new CrU(), - new CrV(), - new CrW(), - new CrX(), - new CrY(), - new CrZ(), - new Csa(), - new Csb(), - new Csc(), - new Csd(), - new Cse(), - new Csf(), - new Csg(), - new Csh(), - new Csi(), - new Csj(), - new Csk(), - new Csl(), - new Csm(), - new Csn(), - new Cso(), - new Csp(), - new Csq(), - new Csr(), - new Css(), - new Cst(), - new Csu(), - new Csv(), - new Csw(), - new Csx(), - new Csy(), - new Csz(), - new CsA(), - new CsB(), - new CsC(), - new CsD(), - new CsE(), - new CsF(), - new CsG(), - new CsH(), - new CsI(), - new CsJ(), - new CsK(), - new CsL(), - new CsM(), - new CsN(), - new CsO(), - new CsP(), - new CsQ(), - new CsR(), - new CsS(), - new CsT(), - new CsU(), - new CsV(), - new CsW(), - new CsX(), - new CsY(), - new CsZ(), - new Cta(), - new Ctb(), - new Ctc(), - new Ctd(), - new Cte(), - new Ctf(), - new Ctg(), - new Cth(), - new Cti(), - new Ctj(), - new Ctk(), - new Ctl(), - new Ctm(), - new Ctn(), - new Cto(), - new Ctp(), - new Ctq(), - new Ctr(), - new Cts(), - new Ctt(), - new Ctu(), - new Ctv(), - new Ctw(), - new Ctx(), - new Cty(), - new Ctz(), - new CtA(), - new CtB(), - new CtC(), - new CtD(), - new CtE(), - new CtF(), - new CtG(), - new CtH(), - new CtI(), - new CtJ(), - new CtK(), - new CtL(), - new CtM(), - new CtN(), - new CtO(), - new CtP(), - new CtQ(), - new CtR(), - new CtS(), - new CtT(), - new CtU(), - new CtV(), - new CtW(), - new CtX(), - new CtY(), - new CtZ(), - new Cua(), - new Cub(), - new Cuc(), - new Cud(), - new Cue(), - new Cuf(), - new Cug(), - new Cuh(), - new Cui(), - new Cuj(), - new Cuk(), - new Cul(), - new Cum(), - new Cun(), - new Cuo(), - new Cup(), - new Cuq(), - new Cur(), - new Cus(), - new Cut(), - new Cuu(), - new Cuv(), - new Cuw(), - new Cux(), - new Cuy(), - new Cuz(), - new CuA(), - new CuB(), - new CuC(), - new CuD(), - new CuE(), - new CuF(), - new CuG(), - new CuH(), - new CuI(), - new CuJ(), - new CuK(), - new CuL(), - new CuM(), - new CuN(), - new CuO(), - new CuP(), - new CuQ(), - new CuR(), - new CuS(), - new CuT(), - new CuU(), - new CuV(), - new CuW(), - new CuX(), - new CuY(), - new CuZ(), - new Cva(), - new Cvb(), - new Cvc(), - new Cvd(), - new Cve(), - new Cvf(), - new Cvg(), - new Cvh(), - new Cvi(), - new Cvj(), - new Cvk(), - new Cvl(), - new Cvm(), - new Cvn(), - new Cvo(), - new Cvp(), - new Cvq(), - new Cvr(), - new Cvs(), - new Cvt(), - new Cvu(), - new Cvv(), - new Cvw(), - new Cvx(), - new Cvy(), - new Cvz(), - new CvA(), - new CvB(), - new CvC(), - new CvD(), - new CvE(), - new CvF(), - new CvG(), - new CvH(), - new CvI(), - new CvJ(), - new CvK(), - new CvL(), - new CvM(), - new CvN(), - new CvO(), - new CvP(), - new CvQ(), - new CvR(), - new CvS(), - new CvT(), - new CvU(), - new CvV(), - new CvW(), - new CvX(), - new CvY(), - new CvZ(), - new Cwa(), - new Cwb(), - new Cwc(), - new Cwd(), - new Cwe(), - new Cwf(), - new Cwg(), - new Cwh(), - new Cwi(), - new Cwj(), - new Cwk(), - new Cwl(), - new Cwm(), - new Cwn(), - new Cwo(), - new Cwp(), - new Cwq(), - new Cwr(), - new Cws(), - new Cwt(), - new Cwu(), - new Cwv(), - new Cww(), - new Cwx(), - new Cwy(), - new Cwz(), - new CwA(), - new CwB(), - new CwC(), - new CwD(), - new CwE(), - new CwF(), - new CwG(), - new CwH(), - new CwI(), - new CwJ(), - new CwK(), - new CwL(), - new CwM(), - new CwN(), - new CwO(), - new CwP(), - new CwQ(), - new CwR(), - new CwS(), - new CwT(), - new CwU(), - new CwV(), - new CwW(), - new CwX(), - new CwY(), - new CwZ(), - new Cxa(), - new Cxb(), - new Cxc(), - new Cxd(), - new Cxe(), - new Cxf(), - new Cxg(), - new Cxh(), - new Cxi(), - new Cxj(), - new Cxk(), - new Cxl(), - new Cxm(), - new Cxn(), - new Cxo(), - new Cxp(), - new Cxq(), - new Cxr(), - new Cxs(), - new Cxt(), - new Cxu(), - new Cxv(), - new Cxw(), - new Cxx(), - new Cxy(), - new Cxz(), - new CxA(), - new CxB(), - new CxC(), - new CxD(), - new CxE(), - new CxF(), - new CxG(), - new CxH(), - new CxI(), - new CxJ(), - new CxK(), - new CxL(), - new CxM(), - new CxN(), - new CxO(), - new CxP(), - new CxQ(), - new CxR(), - new CxS(), - new CxT(), - new CxU(), - new CxV(), - new CxW(), - new CxX(), - new CxY(), - new CxZ(), - new Cya(), - new Cyb(), - new Cyc(), - new Cyd(), - new Cye(), - new Cyf(), - new Cyg(), - new Cyh(), - new Cyi(), - new Cyj(), - new Cyk(), - new Cyl(), - new Cym(), - new Cyn(), - new Cyo(), - new Cyp(), - new Cyq(), - new Cyr(), - new Cys(), - new Cyt(), - new Cyu(), - new Cyv(), - new Cyw(), - new Cyx(), - new Cyy(), - new Cyz(), - new CyA(), - new CyB(), - new CyC(), - new CyD(), - new CyE(), - new CyF(), - new CyG(), - new CyH(), - new CyI(), - new CyJ(), - new CyK(), - new CyL(), - new CyM(), - new CyN(), - new CyO(), - new CyP(), - new CyQ(), - new CyR(), - new CyS(), - new CyT(), - new CyU(), - new CyV(), - new CyW(), - new CyX(), - new CyY(), - new CyZ(), - new Cza(), - new Czb(), - new Czc(), - new Czd(), - new Cze(), - new Czf(), - new Czg(), - new Czh(), - new Czi(), - new Czj(), - new Czk(), - new Czl(), - new Czm(), - new Czn(), - new Czo(), - new Czp(), - new Czq(), - new Czr(), - new Czs(), - new Czt(), - new Czu(), - new Czv(), - new Czw(), - new Czx(), - new Czy(), - new Czz(), - new CzA(), - new CzB(), - new CzC(), - new CzD(), - new CzE(), - new CzF(), - new CzG(), - new CzH(), - new CzI(), - new CzJ(), - new CzK(), - new CzL(), - new CzM(), - new CzN(), - new CzO(), - new CzP(), - new CzQ(), - new CzR(), - new CzS(), - new CzT(), - new CzU(), - new CzV(), - new CzW(), - new CzX(), - new CzY(), - new CzZ(), - new CAa(), - new CAb(), - new CAc(), - new CAd(), - new CAe(), - new CAf(), - new CAg(), - new CAh(), - new CAi(), - new CAj(), - new CAk(), - new CAl(), - new CAm(), - new CAn(), - new CAo(), - new CAp(), - new CAq(), - new CAr(), - new CAs(), - new CAt(), - new CAu(), - new CAv(), - new CAw(), - new CAx(), - new CAy(), - new CAz(), - new CAA(), - new CAB(), - new CAC(), - new CAD(), - new CAE(), - new CAF(), - new CAG(), - new CAH(), - new CAI(), - new CAJ(), - new CAK(), - new CAL(), - new CAM(), - new CAN(), - new CAO(), - new CAP(), - new CAQ(), - new CAR(), - new CAS(), - new CAT(), - new CAU(), - new CAV(), - new CAW(), - new CAX(), - new CAY(), - new CAZ(), - new CBa(), - new CBb(), - new CBc(), - new CBd(), - new CBe(), - new CBf(), - new CBg(), - new CBh(), - new CBi(), - new CBj(), - new CBk(), - new CBl(), - new CBm(), - new CBn(), - new CBo(), - new CBp(), - new CBq(), - new CBr(), - new CBs(), - new CBt(), - new CBu(), - new CBv(), - new CBw(), - new CBx(), - new CBy(), - new CBz(), - new CBA(), - new CBB(), - new CBC(), - new CBD(), - new CBE(), - new CBF(), - new CBG(), - new CBH(), - new CBI(), - new CBJ(), - new CBK(), - new CBL(), - new CBM(), - new CBN(), - new CBO(), - new CBP(), - new CBQ(), - new CBR(), - new CBS(), - new CBT(), - new CBU(), - new CBV(), - new CBW(), - new CBX(), - new CBY(), - new CBZ(), - new CCa(), - new CCb(), - new CCc(), - new CCd(), - new CCe(), - new CCf(), - new CCg(), - new CCh(), - new CCi(), - new CCj(), - new CCk(), - new CCl(), - new CCm(), - new CCn(), - new CCo(), - new CCp(), - new CCq(), - new CCr(), - new CCs(), - new CCt(), - new CCu(), - new CCv(), - new CCw(), - new CCx(), - new CCy(), - new CCz(), - new CCA(), - new CCB(), - new CCC(), - new CCD(), - new CCE(), - new CCF(), - new CCG(), - new CCH(), - new CCI(), - new CCJ(), - new CCK(), - new CCL(), - new CCM(), - new CCN(), - new CCO(), - new CCP(), - new CCQ(), - new CCR(), - new CCS(), - new CCT(), - new CCU(), - new CCV(), - new CCW(), - new CCX(), - new CCY(), - new CCZ(), - new CDa(), - new CDb(), - new CDc(), - new CDd(), - new CDe(), - new CDf(), - new CDg(), - new CDh(), - new CDi(), - new CDj(), - new CDk(), - new CDl(), - new CDm(), - new CDn(), - new CDo(), - new CDp(), - new CDq(), - new CDr(), - new CDs(), - new CDt(), - new CDu(), - new CDv(), - new CDw(), - new CDx(), - new CDy(), - new CDz(), - new CDA(), - new CDB(), - new CDC(), - new CDD(), - new CDE(), - new CDF(), - new CDG(), - new CDH(), - new CDI(), - new CDJ(), - new CDK(), - new CDL(), - new CDM(), - new CDN(), - new CDO(), - new CDP(), - new CDQ(), - new CDR(), - new CDS(), - new CDT(), - new CDU(), - new CDV(), - new CDW(), - new CDX(), - new CDY(), - new CDZ(), - new CEa(), - new CEb(), - new CEc(), - new CEd(), - new CEe(), - new CEf(), - new CEg(), - new CEh(), - new CEi(), - new CEj(), - new CEk(), - new CEl(), - new CEm(), - new CEn(), - new CEo(), - new CEp(), - new CEq(), - new CEr(), - new CEs(), - new CEt(), - new CEu(), - new CEv(), - new CEw(), - new CEx(), - new CEy(), - new CEz(), - new CEA(), - new CEB(), - new CEC(), - new CED(), - new CEE(), - new CEF(), - new CEG(), - new CEH(), - new CEI(), - new CEJ(), - new CEK(), - new CEL(), - new CEM(), - new CEN(), - new CEO(), - new CEP(), - new CEQ(), - new CER(), - new CES(), - new CET(), - new CEU(), - new CEV(), - new CEW(), - new CEX(), - new CEY(), - new CEZ(), - new CFa(), - new CFb(), - new CFc(), - new CFd(), - new CFe(), - new CFf(), - new CFg(), - new CFh(), - new CFi(), - new CFj(), - new CFk(), - new CFl(), - new CFm(), - new CFn(), - new CFo(), - new CFp(), - new CFq(), - new CFr(), - new CFs(), - new CFt(), - new CFu(), - new CFv(), - new CFw(), - new CFx(), - new CFy(), - new CFz(), - new CFA(), - new CFB(), - new CFC(), - new CFD(), - new CFE(), - new CFF(), - new CFG(), - new CFH(), - new CFI(), - new CFJ(), - new CFK(), - new CFL(), - new CFM(), - new CFN(), - new CFO(), - new CFP(), - new CFQ(), - new CFR(), - new CFS(), - new CFT(), - new CFU(), - new CFV(), - new CFW(), - new CFX(), - new CFY(), - new CFZ(), - new CGa(), - new CGb(), - new CGc(), - new CGd(), - new CGe(), - new CGf(), - new CGg(), - new CGh(), - new CGi(), - new CGj(), - new CGk(), - new CGl(), - new CGm(), - new CGn(), - new CGo(), - new CGp(), - new CGq(), - new CGr(), - new CGs(), - new CGt(), - new CGu(), - new CGv(), - new CGw(), - new CGx(), - new CGy(), - new CGz(), - new CGA(), - new CGB(), - new CGC(), - new CGD(), - new CGE(), - new CGF(), - new CGG(), - new CGH(), - new CGI(), - new CGJ(), - new CGK(), - new CGL(), - new CGM(), - new CGN(), - new CGO(), - new CGP(), - new CGQ(), - new CGR(), - new CGS(), - new CGT(), - new CGU(), - new CGV(), - new CGW(), - new CGX(), - new CGY(), - new CGZ(), - new CHa(), - new CHb(), - new CHc(), - new CHd(), - new CHe(), - new CHf(), - new CHg(), - new CHh(), - new CHi(), - new CHj(), - new CHk(), - new CHl(), - new CHm(), - new CHn(), - new CHo(), - new CHp(), - new CHq(), - new CHr(), - new CHs(), - new CHt(), - new CHu(), - new CHv(), - new CHw(), - new CHx(), - new CHy(), - new CHz(), - new CHA(), - new CHB(), - new CHC(), - new CHD(), - new CHE(), - new CHF(), - new CHG(), - new CHH(), - new CHI(), - new CHJ(), - new CHK(), - new CHL(), - new CHM(), - new CHN(), - new CHO(), - new CHP(), - new CHQ(), - new CHR(), - new CHS(), - new CHT(), - new CHU(), - new CHV(), - new CHW(), - new CHX(), - new CHY(), - new CHZ(), - new CIa(), - new CIb(), - new CIc(), - new CId(), - new CIe(), - new CIf(), - new CIg(), - new CIh(), - new CIi(), - new CIj(), - new CIk(), - new CIl(), - new CIm(), - new CIn(), - new CIo(), - new CIp(), - new CIq(), - new CIr(), - new CIs(), - new CIt(), - new CIu(), - new CIv(), - new CIw(), - new CIx(), - new CIy(), - new CIz(), - new CIA(), - new CIB(), - new CIC(), - new CID(), - new CIE(), - new CIF(), - new CIG(), - new CIH(), - new CII(), - new CIJ(), - new CIK(), - new CIL(), - new CIM(), - new CIN(), - new CIO(), - new CIP(), - new CIQ(), - new CIR(), - new CIS(), - new CIT(), - new CIU(), - new CIV(), - new CIW(), - new CIX(), - new CIY(), - new CIZ(), - new CJa(), - new CJb(), - new CJc(), - new CJd(), - new CJe(), - new CJf(), - new CJg(), - new CJh(), - new CJi(), - new CJj(), - new CJk(), - new CJl(), - new CJm(), - new CJn(), - new CJo(), - new CJp(), - new CJq(), - new CJr(), - new CJs(), - new CJt(), - new CJu(), - new CJv(), - new CJw(), - new CJx(), - new CJy(), - new CJz(), - new CJA(), - new CJB(), - new CJC(), - new CJD(), - new CJE(), - new CJF(), - new CJG(), - new CJH(), - new CJI(), - new CJJ(), - new CJK(), - new CJL(), - new CJM(), - new CJN(), - new CJO(), - new CJP(), - new CJQ(), - new CJR(), - new CJS(), - new CJT(), - new CJU(), - new CJV(), - new CJW(), - new CJX(), - new CJY(), - new CJZ(), - new CKa(), - new CKb(), - new CKc(), - new CKd(), - new CKe(), - new CKf(), - new CKg(), - new CKh(), - new CKi(), - new CKj(), - new CKk(), - new CKl(), - new CKm(), - new CKn(), - new CKo(), - new CKp(), - new CKq(), - new CKr(), - new CKs(), - new CKt(), - new CKu(), - new CKv(), - new CKw(), - new CKx(), - new CKy(), - new CKz(), - new CKA(), - new CKB(), - new CKC(), - new CKD(), - new CKE(), - new CKF(), - new CKG(), - new CKH(), - new CKI(), - new CKJ(), - new CKK(), - new CKL(), - new CKM(), - new CKN(), - new CKO(), - new CKP(), - new CKQ(), - new CKR(), - new CKS(), - new CKT(), - new CKU(), - new CKV(), - new CKW(), - new CKX(), - new CKY(), - new CKZ(), - new CLa(), - new CLb(), - new CLc(), - new CLd(), - new CLe(), - new CLf(), - new CLg(), - new CLh(), - new CLi(), - new CLj(), - new CLk(), - new CLl(), - new CLm(), - new CLn(), - new CLo(), - new CLp(), - new CLq(), - new CLr(), - new CLs(), - new CLt(), - new CLu(), - new CLv(), - new CLw(), - new CLx(), - new CLy(), - new CLz(), - new CLA(), - new CLB(), - new CLC(), - new CLD(), - new CLE(), - new CLF(), - new CLG(), - new CLH(), - new CLI(), - new CLJ(), - new CLK(), - new CLL(), - new CLM(), - new CLN(), - new CLO(), - new CLP(), - new CLQ(), - new CLR(), - new CLS(), - new CLT(), - new CLU(), - new CLV(), - new CLW(), - new CLX(), - new CLY(), - new CLZ(), - new CMa(), - new CMb(), - new CMc(), - new CMd(), - new CMe(), - new CMf(), - new CMg(), - new CMh(), - new CMi(), - new CMj(), - new CMk(), - new CMl(), - new CMm(), - new CMn(), - new CMo(), - new CMp(), - new CMq(), - new CMr(), - new CMs(), - new CMt(), - new CMu(), - new CMv(), - new CMw(), - new CMx(), - new CMy(), - new CMz(), - new CMA(), - new CMB(), - new CMC(), - new CMD(), - new CME(), - new CMF(), - new CMG(), - new CMH(), - new CMI(), - new CMJ(), - new CMK(), - new CML(), - new CMM(), - new CMN(), - new CMO(), - new CMP(), - new CMQ(), - new CMR(), - new CMS(), - new CMT(), - new CMU(), - new CMV(), - new CMW(), - new CMX(), - new CMY(), - new CMZ(), - new CNa(), - new CNb(), - new CNc(), - new CNd(), - new CNe(), - new CNf(), - new CNg(), - new CNh(), - new CNi(), - new CNj(), - new CNk(), - new CNl(), - new CNm(), - new CNn(), - new CNo(), - new CNp(), - new CNq(), - new CNr(), - new CNs(), - new CNt(), - new CNu(), - new CNv(), - new CNw(), - new CNx(), - new CNy(), - new CNz(), - new CNA(), - new CNB(), - new CNC(), - new CND(), - new CNE(), - new CNF(), - new CNG(), - new CNH(), - new CNI(), - new CNJ(), - new CNK(), - new CNL(), - new CNM(), - new CNN(), - new CNO(), - new CNP(), - new CNQ(), - new CNR(), - new CNS(), - new CNT(), - new CNU(), - new CNV(), - new CNW(), - new CNX(), - new CNY(), - new CNZ(), - new COa(), - new COb(), - new COc(), - new COd(), - new COe(), - new COf(), - new COg(), - new COh(), - new COi(), - new COj(), - new COk(), - new COl(), - new COm(), - new COn(), - new COo(), - new COp(), - new COq(), - new COr(), - new COs(), - new COt(), - new COu(), - new COv(), - new COw(), - new COx(), - new COy(), - new COz(), - new COA(), - new COB(), - new COC(), - new COD(), - new COE(), - new COF(), - new COG(), - new COH(), - new COI(), - new COJ(), - new COK(), - new COL(), - new COM(), - new CON(), - new COO(), - new COP(), - new COQ(), - new COR(), - new COS(), - new COT(), - new COU(), - new COV(), - new COW(), - new COX(), - new COY(), - new COZ(), - new CPa(), - new CPb(), - new CPc(), - new CPd(), - new CPe(), - new CPf(), - new CPg(), - new CPh(), - new CPi(), - new CPj(), - new CPk(), - new CPl(), - new CPm(), - new CPn(), - new CPo(), - new CPp(), - new CPq(), - new CPr(), - new CPs(), - new CPt(), - new CPu(), - new CPv(), - new CPw(), - new CPx(), - new CPy(), - new CPz(), - new CPA(), - new CPB(), - new CPC(), - new CPD(), - new CPE(), - new CPF(), - new CPG(), - new CPH(), - new CPI(), - new CPJ(), - new CPK(), - new CPL(), - new CPM(), - new CPN(), - new CPO(), - new CPP(), - new CPQ(), - new CPR(), - new CPS(), - new CPT(), - new CPU(), - new CPV(), - new CPW(), - new CPX(), - new CPY(), - new CPZ(), - new CQa(), - new CQb(), - new CQc(), - new CQd(), - new CQe(), - new CQf(), - new CQg(), - new CQh(), - new CQi(), - new CQj(), - new CQk(), - new CQl(), - new CQm(), - new CQn(), - new CQo(), - new CQp(), - new CQq(), - new CQr(), - new CQs(), - new CQt(), - new CQu(), - new CQv(), - new CQw(), - new CQx(), - new CQy(), - new CQz(), - new CQA(), - new CQB(), - new CQC(), - new CQD(), - new CQE(), - new CQF(), - new CQG(), - new CQH(), - new CQI(), - new CQJ(), - new CQK(), - new CQL(), - new CQM(), - new CQN(), - new CQO(), - new CQP(), - new CQQ(), - new CQR(), - new CQS(), - new CQT(), - new CQU(), - new CQV(), - new CQW(), - new CQX(), - new CQY(), - new CQZ(), - new CRa(), - new CRb(), - new CRc(), - new CRd(), - new CRe(), - new CRf(), - new CRg(), - new CRh(), - new CRi(), - new CRj(), - new CRk(), - new CRl(), - new CRm(), - new CRn(), - new CRo(), - new CRp(), - new CRq(), - new CRr(), - new CRs(), - new CRt(), - new CRu(), - new CRv(), - new CRw(), - new CRx(), - new CRy(), - new CRz(), - new CRA(), - new CRB(), - new CRC(), - new CRD(), - new CRE(), - new CRF(), - new CRG(), - new CRH(), - new CRI(), - new CRJ(), - new CRK(), - new CRL(), - new CRM(), - new CRN(), - new CRO(), - new CRP(), - new CRQ(), - new CRR(), - new CRS(), - new CRT(), - new CRU(), - new CRV(), - new CRW(), - new CRX(), - new CRY(), - new CRZ(), - new CSa(), - new CSb(), - new CSc(), - new CSd(), - new CSe(), - new CSf(), - new CSg(), - new CSh(), - new CSi(), - new CSj(), - new CSk(), - new CSl(), - new CSm(), - new CSn(), - new CSo(), - new CSp(), - new CSq(), - new CSr(), - new CSs(), - new CSt(), - new CSu(), - new CSv(), - new CSw(), - new CSx(), - new CSy(), - new CSz(), - new CSA(), - new CSB(), - new CSC(), - new CSD(), - new CSE(), - new CSF(), - new CSG(), - new CSH(), - new CSI(), - new CSJ(), - new CSK(), - new CSL(), - new CSM(), - new CSN(), - new CSO(), - new CSP(), - new CSQ(), - new CSR(), - new CSS(), - new CST(), - new CSU(), - new CSV(), - new CSW(), - new CSX(), - new CSY(), - new CSZ(), - new CTa(), - new CTb(), - new CTc(), - new CTd(), - new CTe(), - new CTf(), - new CTg(), - new CTh(), - new CTi(), - new CTj(), - new CTk(), - new CTl(), - new CTm(), - new CTn(), - new CTo(), - new CTp(), - new CTq(), - new CTr(), - new CTs(), - new CTt(), - new CTu(), - new CTv(), - new CTw(), - new CTx(), - new CTy(), - new CTz(), - new CTA(), - new CTB(), - new CTC(), - new CTD(), - new CTE(), - new CTF(), - new CTG(), - new CTH(), - new CTI(), - new CTJ(), - new CTK(), - new CTL(), - new CTM(), - new CTN(), - new CTO(), - new CTP(), - new CTQ(), - new CTR(), - new CTS(), - new CTT(), - new CTU(), - new CTV(), - new CTW(), - new CTX(), - new CTY(), - new CTZ(), - new CUa(), - new CUb(), - new CUc(), - new CUd(), - new CUe(), - new CUf(), - new CUg(), - new CUh(), - new CUi(), - new CUj(), - new CUk(), - new CUl(), - new CUm(), - new CUn(), - new CUo(), - new CUp(), - new CUq(), - new CUr(), - new CUs(), - new CUt(), - new CUu(), - new CUv(), - new CUw(), - new CUx(), - new CUy(), - new CUz(), - new CUA(), - new CUB(), - new CUC(), - new CUD(), - new CUE(), - new CUF(), - new CUG(), - new CUH(), - new CUI(), - new CUJ(), - new CUK(), - new CUL(), - new CUM(), - new CUN(), - new CUO(), - new CUP(), - new CUQ(), - new CUR(), - new CUS(), - new CUT(), - new CUU(), - new CUV(), - new CUW(), - new CUX(), - new CUY(), - new CUZ(), - new CVa(), - new CVb(), - new CVc(), - new CVd(), - new CVe(), - new CVf(), - new CVg(), - new CVh(), - new CVi(), - new CVj(), - new CVk(), - new CVl(), - new CVm(), - new CVn(), - new CVo(), - new CVp(), - new CVq(), - new CVr(), - new CVs(), - new CVt(), - new CVu(), - new CVv(), - new CVw(), - new CVx(), - new CVy(), - new CVz(), - new CVA(), - new CVB(), - new CVC(), - new CVD(), - new CVE(), - new CVF(), - new CVG(), - new CVH(), - new CVI(), - new CVJ(), - new CVK(), - new CVL(), - new CVM(), - new CVN(), - new CVO(), - new CVP(), - new CVQ(), - new CVR(), - new CVS(), - new CVT(), - new CVU(), - new CVV(), - new CVW(), - new CVX(), - new CVY(), - new CVZ(), - new CWa(), - new CWb(), - new CWc(), - new CWd(), - new CWe(), - new CWf(), - new CWg(), - new CWh(), - new CWi(), - new CWj(), - new CWk(), - new CWl(), - new CWm(), - new CWn(), - new CWo(), - new CWp(), - new CWq(), - new CWr(), - new CWs(), - new CWt(), - new CWu(), - new CWv(), - new CWw(), - new CWx(), - new CWy(), - new CWz(), - new CWA(), - new CWB(), - new CWC(), - new CWD(), - new CWE(), - new CWF(), - new CWG(), - new CWH(), - new CWI(), - new CWJ(), - new CWK(), - new CWL(), - new CWM(), - new CWN(), - new CWO(), - new CWP(), - new CWQ(), - new CWR(), - new CWS(), - new CWT(), - new CWU(), - new CWV(), - new CWW(), - new CWX(), - new CWY(), - new CWZ(), - new CXa(), - new CXb(), - new CXc(), - new CXd(), - new CXe(), - new CXf(), - new CXg(), - new CXh(), - new CXi(), - new CXj(), - new CXk(), - new CXl(), - new CXm(), - new CXn(), - new CXo(), - new CXp(), - new CXq(), - new CXr(), - new CXs(), - new CXt(), - new CXu(), - new CXv(), - new CXw(), - new CXx(), - new CXy(), - new CXz(), - new CXA(), - new CXB(), - new CXC(), - new CXD(), - new CXE(), - new CXF(), - new CXG(), - new CXH(), - new CXI(), - new CXJ(), - new CXK(), - new CXL(), - new CXM(), - new CXN(), - new CXO(), - new CXP(), - new CXQ(), - new CXR(), - new CXS(), - new CXT(), - new CXU(), - new CXV(), - new CXW(), - new CXX(), - new CXY(), - new CXZ(), - new CYa(), - new CYb(), - new CYc(), - new CYd(), - new CYe(), - new CYf(), - new CYg(), - new CYh(), - new CYi(), - new CYj(), - new CYk(), - new CYl(), - new CYm(), - new CYn(), - new CYo(), - new CYp(), - new CYq(), - new CYr(), - new CYs(), - new CYt(), - new CYu(), - new CYv(), - new CYw(), - new CYx(), - new CYy(), - new CYz(), - new CYA(), - new CYB(), - new CYC(), - new CYD(), - new CYE(), - new CYF(), - new CYG(), - new CYH(), - new CYI(), - new CYJ(), - new CYK(), - new CYL(), - new CYM(), - new CYN(), - new CYO(), - new CYP(), - new CYQ(), - new CYR(), - new CYS(), - new CYT(), - new CYU(), - new CYV(), - new CYW(), - new CYX(), - new CYY(), - new CYZ(), - new CZa(), - new CZb(), - new CZc(), - new CZd(), - new CZe(), - new CZf(), - new CZg(), - new CZh(), - new CZi(), - new CZj(), - new CZk(), - new CZl(), - new CZm(), - new CZn(), - new CZo(), - new CZp(), - new CZq(), - new CZr(), - new CZs(), - new CZt(), - new CZu(), - new CZv(), - new CZw(), - new CZx(), - new CZy(), - new CZz(), - new CZA(), - new CZB(), - new CZC(), - new CZD(), - new CZE(), - new CZF(), - new CZG(), - new CZH(), - new CZI(), - new CZJ(), - new CZK(), - new CZL(), - new CZM(), - new CZN(), - new CZO(), - new CZP(), - new CZQ(), - new CZR(), - new CZS(), - new CZT(), - new CZU(), - new CZV(), - new CZW(), - new CZX(), - new CZY(), - new CZZ(), -]; - -class Caa {} - -class Cab {} - -class Cac {} - -class Cad {} - -class Cae {} - -class Caf {} - -class Cag {} - -class Cah {} - -class Cai {} - -class Caj {} - -class Cak {} - -class Cal {} - -class Cam {} - -class Can {} - -class Cao {} - -class Cap {} - -class Caq {} - -class Car {} - -class Cas {} - -class Cat {} - -class Cau {} - -class Cav {} - -class Caw {} - -class Cax {} - -class Cay {} - -class Caz {} - -class CaA {} - -class CaB {} - -class CaC {} - -class CaD {} - -class CaE {} - -class CaF {} - -class CaG {} - -class CaH {} - -class CaI {} - -class CaJ {} - -class CaK {} - -class CaL {} - -class CaM {} - -class CaN {} - -class CaO {} - -class CaP {} - -class CaQ {} - -class CaR {} - -class CaS {} - -class CaT {} - -class CaU {} - -class CaV {} - -class CaW {} - -class CaX {} - -class CaY {} - -class CaZ {} - -class Cba {} - -class Cbb {} - -class Cbc {} - -class Cbd {} - -class Cbe {} - -class Cbf {} - -class Cbg {} - -class Cbh {} - -class Cbi {} - -class Cbj {} - -class Cbk {} - -class Cbl {} - -class Cbm {} - -class Cbn {} - -class Cbo {} - -class Cbp {} - -class Cbq {} - -class Cbr {} - -class Cbs {} - -class Cbt {} - -class Cbu {} - -class Cbv {} - -class Cbw {} - -class Cbx {} - -class Cby {} - -class Cbz {} - -class CbA {} - -class CbB {} - -class CbC {} - -class CbD {} - -class CbE {} - -class CbF {} - -class CbG {} - -class CbH {} - -class CbI {} - -class CbJ {} - -class CbK {} - -class CbL {} - -class CbM {} - -class CbN {} - -class CbO {} - -class CbP {} - -class CbQ {} - -class CbR {} - -class CbS {} - -class CbT {} - -class CbU {} - -class CbV {} - -class CbW {} - -class CbX {} - -class CbY {} - -class CbZ {} - -class Cca {} - -class Ccb {} - -class Ccc {} - -class Ccd {} - -class Cce {} - -class Ccf {} - -class Ccg {} - -class Cch {} - -class Cci {} - -class Ccj {} - -class Cck {} - -class Ccl {} - -class Ccm {} - -class Ccn {} - -class Cco {} - -class Ccp {} - -class Ccq {} - -class Ccr {} - -class Ccs {} - -class Cct {} - -class Ccu {} - -class Ccv {} - -class Ccw {} - -class Ccx {} - -class Ccy {} - -class Ccz {} - -class CcA {} - -class CcB {} - -class CcC {} - -class CcD {} - -class CcE {} - -class CcF {} - -class CcG {} - -class CcH {} - -class CcI {} - -class CcJ {} - -class CcK {} - -class CcL {} - -class CcM {} - -class CcN {} - -class CcO {} - -class CcP {} - -class CcQ {} - -class CcR {} - -class CcS {} - -class CcT {} - -class CcU {} - -class CcV {} - -class CcW {} - -class CcX {} - -class CcY {} - -class CcZ {} - -class Cda {} - -class Cdb {} - -class Cdc {} - -class Cdd {} - -class Cde {} - -class Cdf {} - -class Cdg {} - -class Cdh {} - -class Cdi {} - -class Cdj {} - -class Cdk {} - -class Cdl {} - -class Cdm {} - -class Cdn {} - -class Cdo {} - -class Cdp {} - -class Cdq {} - -class Cdr {} - -class Cds {} - -class Cdt {} - -class Cdu {} - -class Cdv {} - -class Cdw {} - -class Cdx {} - -class Cdy {} - -class Cdz {} - -class CdA {} - -class CdB {} - -class CdC {} - -class CdD {} - -class CdE {} - -class CdF {} - -class CdG {} - -class CdH {} - -class CdI {} - -class CdJ {} - -class CdK {} - -class CdL {} - -class CdM {} - -class CdN {} - -class CdO {} - -class CdP {} - -class CdQ {} - -class CdR {} - -class CdS {} - -class CdT {} - -class CdU {} - -class CdV {} - -class CdW {} - -class CdX {} - -class CdY {} - -class CdZ {} - -class Cea {} - -class Ceb {} - -class Cec {} - -class Ced {} - -class Cee {} - -class Cef {} - -class Ceg {} - -class Ceh {} - -class Cei {} - -class Cej {} - -class Cek {} - -class Cel {} - -class Cem {} - -class Cen {} - -class Ceo {} - -class Cep {} - -class Ceq {} - -class Cer {} - -class Ces {} - -class Cet {} - -class Ceu {} - -class Cev {} - -class Cew {} - -class Cex {} - -class Cey {} - -class Cez {} - -class CeA {} - -class CeB {} - -class CeC {} - -class CeD {} - -class CeE {} - -class CeF {} - -class CeG {} - -class CeH {} - -class CeI {} - -class CeJ {} - -class CeK {} - -class CeL {} - -class CeM {} - -class CeN {} - -class CeO {} - -class CeP {} - -class CeQ {} - -class CeR {} - -class CeS {} - -class CeT {} - -class CeU {} - -class CeV {} - -class CeW {} - -class CeX {} - -class CeY {} - -class CeZ {} - -class Cfa {} - -class Cfb {} - -class Cfc {} - -class Cfd {} - -class Cfe {} - -class Cff {} - -class Cfg {} - -class Cfh {} - -class Cfi {} - -class Cfj {} - -class Cfk {} - -class Cfl {} - -class Cfm {} - -class Cfn {} - -class Cfo {} - -class Cfp {} - -class Cfq {} - -class Cfr {} - -class Cfs {} - -class Cft {} - -class Cfu {} - -class Cfv {} - -class Cfw {} - -class Cfx {} - -class Cfy {} - -class Cfz {} - -class CfA {} - -class CfB {} - -class CfC {} - -class CfD {} - -class CfE {} - -class CfF {} - -class CfG {} - -class CfH {} - -class CfI {} - -class CfJ {} - -class CfK {} - -class CfL {} - -class CfM {} - -class CfN {} - -class CfO {} - -class CfP {} - -class CfQ {} - -class CfR {} - -class CfS {} - -class CfT {} - -class CfU {} - -class CfV {} - -class CfW {} - -class CfX {} - -class CfY {} - -class CfZ {} - -class Cga {} - -class Cgb {} - -class Cgc {} - -class Cgd {} - -class Cge {} - -class Cgf {} - -class Cgg {} - -class Cgh {} - -class Cgi {} - -class Cgj {} - -class Cgk {} - -class Cgl {} - -class Cgm {} - -class Cgn {} - -class Cgo {} - -class Cgp {} - -class Cgq {} - -class Cgr {} - -class Cgs {} - -class Cgt {} - -class Cgu {} - -class Cgv {} - -class Cgw {} - -class Cgx {} - -class Cgy {} - -class Cgz {} - -class CgA {} - -class CgB {} - -class CgC {} - -class CgD {} - -class CgE {} - -class CgF {} - -class CgG {} - -class CgH {} - -class CgI {} - -class CgJ {} - -class CgK {} - -class CgL {} - -class CgM {} - -class CgN {} - -class CgO {} - -class CgP {} - -class CgQ {} - -class CgR {} - -class CgS {} - -class CgT {} - -class CgU {} - -class CgV {} - -class CgW {} - -class CgX {} - -class CgY {} - -class CgZ {} - -class Cha {} - -class Chb {} - -class Chc {} - -class Chd {} - -class Che {} - -class Chf {} - -class Chg {} - -class Chh {} - -class Chi {} - -class Chj {} - -class Chk {} - -class Chl {} - -class Chm {} - -class Chn {} - -class Cho {} - -class Chp {} - -class Chq {} - -class Chr {} - -class Chs {} - -class Cht {} - -class Chu {} - -class Chv {} - -class Chw {} - -class Chx {} - -class Chy {} - -class Chz {} - -class ChA {} - -class ChB {} - -class ChC {} - -class ChD {} - -class ChE {} - -class ChF {} - -class ChG {} - -class ChH {} - -class ChI {} - -class ChJ {} - -class ChK {} - -class ChL {} - -class ChM {} - -class ChN {} - -class ChO {} - -class ChP {} - -class ChQ {} - -class ChR {} - -class ChS {} - -class ChT {} - -class ChU {} - -class ChV {} - -class ChW {} - -class ChX {} - -class ChY {} - -class ChZ {} - -class Cia {} - -class Cib {} - -class Cic {} - -class Cid {} - -class Cie {} - -class Cif {} - -class Cig {} - -class Cih {} - -class Cii {} - -class Cij {} - -class Cik {} - -class Cil {} - -class Cim {} - -class Cin {} - -class Cio {} - -class Cip {} - -class Ciq {} - -class Cir {} - -class Cis {} - -class Cit {} - -class Ciu {} - -class Civ {} - -class Ciw {} - -class Cix {} - -class Ciy {} - -class Ciz {} - -class CiA {} - -class CiB {} - -class CiC {} - -class CiD {} - -class CiE {} - -class CiF {} - -class CiG {} - -class CiH {} - -class CiI {} - -class CiJ {} - -class CiK {} - -class CiL {} - -class CiM {} - -class CiN {} - -class CiO {} - -class CiP {} - -class CiQ {} - -class CiR {} - -class CiS {} - -class CiT {} - -class CiU {} - -class CiV {} - -class CiW {} - -class CiX {} - -class CiY {} - -class CiZ {} - -class Cja {} - -class Cjb {} - -class Cjc {} - -class Cjd {} - -class Cje {} - -class Cjf {} - -class Cjg {} - -class Cjh {} - -class Cji {} - -class Cjj {} - -class Cjk {} - -class Cjl {} - -class Cjm {} - -class Cjn {} - -class Cjo {} - -class Cjp {} - -class Cjq {} - -class Cjr {} - -class Cjs {} - -class Cjt {} - -class Cju {} - -class Cjv {} - -class Cjw {} - -class Cjx {} - -class Cjy {} - -class Cjz {} - -class CjA {} - -class CjB {} - -class CjC {} - -class CjD {} - -class CjE {} - -class CjF {} - -class CjG {} - -class CjH {} - -class CjI {} - -class CjJ {} - -class CjK {} - -class CjL {} - -class CjM {} - -class CjN {} - -class CjO {} - -class CjP {} - -class CjQ {} - -class CjR {} - -class CjS {} - -class CjT {} - -class CjU {} - -class CjV {} - -class CjW {} - -class CjX {} - -class CjY {} - -class CjZ {} - -class Cka {} - -class Ckb {} - -class Ckc {} - -class Ckd {} - -class Cke {} - -class Ckf {} - -class Ckg {} - -class Ckh {} - -class Cki {} - -class Ckj {} - -class Ckk {} - -class Ckl {} - -class Ckm {} - -class Ckn {} - -class Cko {} - -class Ckp {} - -class Ckq {} - -class Ckr {} - -class Cks {} - -class Ckt {} - -class Cku {} - -class Ckv {} - -class Ckw {} - -class Ckx {} - -class Cky {} - -class Ckz {} - -class CkA {} - -class CkB {} - -class CkC {} - -class CkD {} - -class CkE {} - -class CkF {} - -class CkG {} - -class CkH {} - -class CkI {} - -class CkJ {} - -class CkK {} - -class CkL {} - -class CkM {} - -class CkN {} - -class CkO {} - -class CkP {} - -class CkQ {} - -class CkR {} - -class CkS {} - -class CkT {} - -class CkU {} - -class CkV {} - -class CkW {} - -class CkX {} - -class CkY {} - -class CkZ {} - -class Cla {} - -class Clb {} - -class Clc {} - -class Cld {} - -class Cle {} - -class Clf {} - -class Clg {} - -class Clh {} - -class Cli {} - -class Clj {} - -class Clk {} - -class Cll {} - -class Clm {} - -class Cln {} - -class Clo {} - -class Clp {} - -class Clq {} - -class Clr {} - -class Cls {} - -class Clt {} - -class Clu {} - -class Clv {} - -class Clw {} - -class Clx {} - -class Cly {} - -class Clz {} - -class ClA {} - -class ClB {} - -class ClC {} - -class ClD {} - -class ClE {} - -class ClF {} - -class ClG {} - -class ClH {} - -class ClI {} - -class ClJ {} - -class ClK {} - -class ClL {} - -class ClM {} - -class ClN {} - -class ClO {} - -class ClP {} - -class ClQ {} - -class ClR {} - -class ClS {} - -class ClT {} - -class ClU {} - -class ClV {} - -class ClW {} - -class ClX {} - -class ClY {} - -class ClZ {} - -class Cma {} - -class Cmb {} - -class Cmc {} - -class Cmd {} - -class Cme {} - -class Cmf {} - -class Cmg {} - -class Cmh {} - -class Cmi {} - -class Cmj {} - -class Cmk {} - -class Cml {} - -class Cmm {} - -class Cmn {} - -class Cmo {} - -class Cmp {} - -class Cmq {} - -class Cmr {} - -class Cms {} - -class Cmt {} - -class Cmu {} - -class Cmv {} - -class Cmw {} - -class Cmx {} - -class Cmy {} - -class Cmz {} - -class CmA {} - -class CmB {} - -class CmC {} - -class CmD {} - -class CmE {} - -class CmF {} - -class CmG {} - -class CmH {} - -class CmI {} - -class CmJ {} - -class CmK {} - -class CmL {} - -class CmM {} - -class CmN {} - -class CmO {} - -class CmP {} - -class CmQ {} - -class CmR {} - -class CmS {} - -class CmT {} - -class CmU {} - -class CmV {} - -class CmW {} - -class CmX {} - -class CmY {} - -class CmZ {} - -class Cna {} - -class Cnb {} - -class Cnc {} - -class Cnd {} - -class Cne {} - -class Cnf {} - -class Cng {} - -class Cnh {} - -class Cni {} - -class Cnj {} - -class Cnk {} - -class Cnl {} - -class Cnm {} - -class Cnn {} - -class Cno {} - -class Cnp {} - -class Cnq {} - -class Cnr {} - -class Cns {} - -class Cnt {} - -class Cnu {} - -class Cnv {} - -class Cnw {} - -class Cnx {} - -class Cny {} - -class Cnz {} - -class CnA {} - -class CnB {} - -class CnC {} - -class CnD {} - -class CnE {} - -class CnF {} - -class CnG {} - -class CnH {} - -class CnI {} - -class CnJ {} - -class CnK {} - -class CnL {} - -class CnM {} - -class CnN {} - -class CnO {} - -class CnP {} - -class CnQ {} - -class CnR {} - -class CnS {} - -class CnT {} - -class CnU {} - -class CnV {} - -class CnW {} - -class CnX {} - -class CnY {} - -class CnZ {} - -class Coa {} - -class Cob {} - -class Coc {} - -class Cod {} - -class Coe {} - -class Cof {} - -class Cog {} - -class Coh {} - -class Coi {} - -class Coj {} - -class Cok {} - -class Col {} - -class Com {} - -class Con {} - -class Coo {} - -class Cop {} - -class Coq {} - -class Cor {} - -class Cos {} - -class Cot {} - -class Cou {} - -class Cov {} - -class Cow {} - -class Cox {} - -class Coy {} - -class Coz {} - -class CoA {} - -class CoB {} - -class CoC {} - -class CoD {} - -class CoE {} - -class CoF {} - -class CoG {} - -class CoH {} - -class CoI {} - -class CoJ {} - -class CoK {} - -class CoL {} - -class CoM {} - -class CoN {} - -class CoO {} - -class CoP {} - -class CoQ {} - -class CoR {} - -class CoS {} - -class CoT {} - -class CoU {} - -class CoV {} - -class CoW {} - -class CoX {} - -class CoY {} - -class CoZ {} - -class Cpa {} - -class Cpb {} - -class Cpc {} - -class Cpd {} - -class Cpe {} - -class Cpf {} - -class Cpg {} - -class Cph {} - -class Cpi {} - -class Cpj {} - -class Cpk {} - -class Cpl {} - -class Cpm {} - -class Cpn {} - -class Cpo {} - -class Cpp {} - -class Cpq {} - -class Cpr {} - -class Cps {} - -class Cpt {} - -class Cpu {} - -class Cpv {} - -class Cpw {} - -class Cpx {} - -class Cpy {} - -class Cpz {} - -class CpA {} - -class CpB {} - -class CpC {} - -class CpD {} - -class CpE {} - -class CpF {} - -class CpG {} - -class CpH {} - -class CpI {} - -class CpJ {} - -class CpK {} - -class CpL {} - -class CpM {} - -class CpN {} - -class CpO {} - -class CpP {} - -class CpQ {} - -class CpR {} - -class CpS {} - -class CpT {} - -class CpU {} - -class CpV {} - -class CpW {} - -class CpX {} - -class CpY {} - -class CpZ {} - -class Cqa {} - -class Cqb {} - -class Cqc {} - -class Cqd {} - -class Cqe {} - -class Cqf {} - -class Cqg {} - -class Cqh {} - -class Cqi {} - -class Cqj {} - -class Cqk {} - -class Cql {} - -class Cqm {} - -class Cqn {} - -class Cqo {} - -class Cqp {} - -class Cqq {} - -class Cqr {} - -class Cqs {} - -class Cqt {} - -class Cqu {} - -class Cqv {} - -class Cqw {} - -class Cqx {} - -class Cqy {} - -class Cqz {} - -class CqA {} - -class CqB {} - -class CqC {} - -class CqD {} - -class CqE {} - -class CqF {} - -class CqG {} - -class CqH {} - -class CqI {} - -class CqJ {} - -class CqK {} - -class CqL {} - -class CqM {} - -class CqN {} - -class CqO {} - -class CqP {} - -class CqQ {} - -class CqR {} - -class CqS {} - -class CqT {} - -class CqU {} - -class CqV {} - -class CqW {} - -class CqX {} - -class CqY {} - -class CqZ {} - -class Cra {} - -class Crb {} - -class Crc {} - -class Crd {} - -class Cre {} - -class Crf {} - -class Crg {} - -class Crh {} - -class Cri {} - -class Crj {} - -class Crk {} - -class Crl {} - -class Crm {} - -class Crn {} - -class Cro {} - -class Crp {} - -class Crq {} - -class Crr {} - -class Crs {} - -class Crt {} - -class Cru {} - -class Crv {} - -class Crw {} - -class Crx {} - -class Cry {} - -class Crz {} - -class CrA {} - -class CrB {} - -class CrC {} - -class CrD {} - -class CrE {} - -class CrF {} - -class CrG {} - -class CrH {} - -class CrI {} - -class CrJ {} - -class CrK {} - -class CrL {} - -class CrM {} - -class CrN {} - -class CrO {} - -class CrP {} - -class CrQ {} - -class CrR {} - -class CrS {} - -class CrT {} - -class CrU {} - -class CrV {} - -class CrW {} - -class CrX {} - -class CrY {} - -class CrZ {} - -class Csa {} - -class Csb {} - -class Csc {} - -class Csd {} - -class Cse {} - -class Csf {} - -class Csg {} - -class Csh {} - -class Csi {} - -class Csj {} - -class Csk {} - -class Csl {} - -class Csm {} - -class Csn {} - -class Cso {} - -class Csp {} - -class Csq {} - -class Csr {} - -class Css {} - -class Cst {} - -class Csu {} - -class Csv {} - -class Csw {} - -class Csx {} - -class Csy {} - -class Csz {} - -class CsA {} - -class CsB {} - -class CsC {} - -class CsD {} - -class CsE {} - -class CsF {} - -class CsG {} - -class CsH {} - -class CsI {} - -class CsJ {} - -class CsK {} - -class CsL {} - -class CsM {} - -class CsN {} - -class CsO {} - -class CsP {} - -class CsQ {} - -class CsR {} - -class CsS {} - -class CsT {} - -class CsU {} - -class CsV {} - -class CsW {} - -class CsX {} - -class CsY {} - -class CsZ {} - -class Cta {} - -class Ctb {} - -class Ctc {} - -class Ctd {} - -class Cte {} - -class Ctf {} - -class Ctg {} - -class Cth {} - -class Cti {} - -class Ctj {} - -class Ctk {} - -class Ctl {} - -class Ctm {} - -class Ctn {} - -class Cto {} - -class Ctp {} - -class Ctq {} - -class Ctr {} - -class Cts {} - -class Ctt {} - -class Ctu {} - -class Ctv {} - -class Ctw {} - -class Ctx {} - -class Cty {} - -class Ctz {} - -class CtA {} - -class CtB {} - -class CtC {} - -class CtD {} - -class CtE {} - -class CtF {} - -class CtG {} - -class CtH {} - -class CtI {} - -class CtJ {} - -class CtK {} - -class CtL {} - -class CtM {} - -class CtN {} - -class CtO {} - -class CtP {} - -class CtQ {} - -class CtR {} - -class CtS {} - -class CtT {} - -class CtU {} - -class CtV {} - -class CtW {} - -class CtX {} - -class CtY {} - -class CtZ {} - -class Cua {} - -class Cub {} - -class Cuc {} - -class Cud {} - -class Cue {} - -class Cuf {} - -class Cug {} - -class Cuh {} - -class Cui {} - -class Cuj {} - -class Cuk {} - -class Cul {} - -class Cum {} - -class Cun {} - -class Cuo {} - -class Cup {} - -class Cuq {} - -class Cur {} - -class Cus {} - -class Cut {} - -class Cuu {} - -class Cuv {} - -class Cuw {} - -class Cux {} - -class Cuy {} - -class Cuz {} - -class CuA {} - -class CuB {} - -class CuC {} - -class CuD {} - -class CuE {} - -class CuF {} - -class CuG {} - -class CuH {} - -class CuI {} - -class CuJ {} - -class CuK {} - -class CuL {} - -class CuM {} - -class CuN {} - -class CuO {} - -class CuP {} - -class CuQ {} - -class CuR {} - -class CuS {} - -class CuT {} - -class CuU {} - -class CuV {} - -class CuW {} - -class CuX {} - -class CuY {} - -class CuZ {} - -class Cva {} - -class Cvb {} - -class Cvc {} - -class Cvd {} - -class Cve {} - -class Cvf {} - -class Cvg {} - -class Cvh {} - -class Cvi {} - -class Cvj {} - -class Cvk {} - -class Cvl {} - -class Cvm {} - -class Cvn {} - -class Cvo {} - -class Cvp {} - -class Cvq {} - -class Cvr {} - -class Cvs {} - -class Cvt {} - -class Cvu {} - -class Cvv {} - -class Cvw {} - -class Cvx {} - -class Cvy {} - -class Cvz {} - -class CvA {} - -class CvB {} - -class CvC {} - -class CvD {} - -class CvE {} - -class CvF {} - -class CvG {} - -class CvH {} - -class CvI {} - -class CvJ {} - -class CvK {} - -class CvL {} - -class CvM {} - -class CvN {} - -class CvO {} - -class CvP {} - -class CvQ {} - -class CvR {} - -class CvS {} - -class CvT {} - -class CvU {} - -class CvV {} - -class CvW {} - -class CvX {} - -class CvY {} - -class CvZ {} - -class Cwa {} - -class Cwb {} - -class Cwc {} - -class Cwd {} - -class Cwe {} - -class Cwf {} - -class Cwg {} - -class Cwh {} - -class Cwi {} - -class Cwj {} - -class Cwk {} - -class Cwl {} - -class Cwm {} - -class Cwn {} - -class Cwo {} - -class Cwp {} - -class Cwq {} - -class Cwr {} - -class Cws {} - -class Cwt {} - -class Cwu {} - -class Cwv {} - -class Cww {} - -class Cwx {} - -class Cwy {} - -class Cwz {} - -class CwA {} - -class CwB {} - -class CwC {} - -class CwD {} - -class CwE {} - -class CwF {} - -class CwG {} - -class CwH {} - -class CwI {} - -class CwJ {} - -class CwK {} - -class CwL {} - -class CwM {} - -class CwN {} - -class CwO {} - -class CwP {} - -class CwQ {} - -class CwR {} - -class CwS {} - -class CwT {} - -class CwU {} - -class CwV {} - -class CwW {} - -class CwX {} - -class CwY {} - -class CwZ {} - -class Cxa {} - -class Cxb {} - -class Cxc {} - -class Cxd {} - -class Cxe {} - -class Cxf {} - -class Cxg {} - -class Cxh {} - -class Cxi {} - -class Cxj {} - -class Cxk {} - -class Cxl {} - -class Cxm {} - -class Cxn {} - -class Cxo {} - -class Cxp {} - -class Cxq {} - -class Cxr {} - -class Cxs {} - -class Cxt {} - -class Cxu {} - -class Cxv {} - -class Cxw {} - -class Cxx {} - -class Cxy {} - -class Cxz {} - -class CxA {} - -class CxB {} - -class CxC {} - -class CxD {} - -class CxE {} - -class CxF {} - -class CxG {} - -class CxH {} - -class CxI {} - -class CxJ {} - -class CxK {} - -class CxL {} - -class CxM {} - -class CxN {} - -class CxO {} - -class CxP {} - -class CxQ {} - -class CxR {} - -class CxS {} - -class CxT {} - -class CxU {} - -class CxV {} - -class CxW {} - -class CxX {} - -class CxY {} - -class CxZ {} - -class Cya {} - -class Cyb {} - -class Cyc {} - -class Cyd {} - -class Cye {} - -class Cyf {} - -class Cyg {} - -class Cyh {} - -class Cyi {} - -class Cyj {} - -class Cyk {} - -class Cyl {} - -class Cym {} - -class Cyn {} - -class Cyo {} - -class Cyp {} - -class Cyq {} - -class Cyr {} - -class Cys {} - -class Cyt {} - -class Cyu {} - -class Cyv {} - -class Cyw {} - -class Cyx {} - -class Cyy {} - -class Cyz {} - -class CyA {} - -class CyB {} - -class CyC {} - -class CyD {} - -class CyE {} - -class CyF {} - -class CyG {} - -class CyH {} - -class CyI {} - -class CyJ {} - -class CyK {} - -class CyL {} - -class CyM {} - -class CyN {} - -class CyO {} - -class CyP {} - -class CyQ {} - -class CyR {} - -class CyS {} - -class CyT {} - -class CyU {} - -class CyV {} - -class CyW {} - -class CyX {} - -class CyY {} - -class CyZ {} - -class Cza {} - -class Czb {} - -class Czc {} - -class Czd {} - -class Cze {} - -class Czf {} - -class Czg {} - -class Czh {} - -class Czi {} - -class Czj {} - -class Czk {} - -class Czl {} - -class Czm {} - -class Czn {} - -class Czo {} - -class Czp {} - -class Czq {} - -class Czr {} - -class Czs {} - -class Czt {} - -class Czu {} - -class Czv {} - -class Czw {} - -class Czx {} - -class Czy {} - -class Czz {} - -class CzA {} - -class CzB {} - -class CzC {} - -class CzD {} - -class CzE {} - -class CzF {} - -class CzG {} - -class CzH {} - -class CzI {} - -class CzJ {} - -class CzK {} - -class CzL {} - -class CzM {} - -class CzN {} - -class CzO {} - -class CzP {} - -class CzQ {} - -class CzR {} - -class CzS {} - -class CzT {} - -class CzU {} - -class CzV {} - -class CzW {} - -class CzX {} - -class CzY {} - -class CzZ {} - -class CAa {} - -class CAb {} - -class CAc {} - -class CAd {} - -class CAe {} - -class CAf {} - -class CAg {} - -class CAh {} - -class CAi {} - -class CAj {} - -class CAk {} - -class CAl {} - -class CAm {} - -class CAn {} - -class CAo {} - -class CAp {} - -class CAq {} - -class CAr {} - -class CAs {} - -class CAt {} - -class CAu {} - -class CAv {} - -class CAw {} - -class CAx {} - -class CAy {} - -class CAz {} - -class CAA {} - -class CAB {} - -class CAC {} - -class CAD {} - -class CAE {} - -class CAF {} - -class CAG {} - -class CAH {} - -class CAI {} - -class CAJ {} - -class CAK {} - -class CAL {} - -class CAM {} - -class CAN {} - -class CAO {} - -class CAP {} - -class CAQ {} - -class CAR {} - -class CAS {} - -class CAT {} - -class CAU {} - -class CAV {} - -class CAW {} - -class CAX {} - -class CAY {} - -class CAZ {} - -class CBa {} - -class CBb {} - -class CBc {} - -class CBd {} - -class CBe {} - -class CBf {} - -class CBg {} - -class CBh {} - -class CBi {} - -class CBj {} - -class CBk {} - -class CBl {} - -class CBm {} - -class CBn {} - -class CBo {} - -class CBp {} - -class CBq {} - -class CBr {} - -class CBs {} - -class CBt {} - -class CBu {} - -class CBv {} - -class CBw {} - -class CBx {} - -class CBy {} - -class CBz {} - -class CBA {} - -class CBB {} - -class CBC {} - -class CBD {} - -class CBE {} - -class CBF {} - -class CBG {} - -class CBH {} - -class CBI {} - -class CBJ {} - -class CBK {} - -class CBL {} - -class CBM {} - -class CBN {} - -class CBO {} - -class CBP {} - -class CBQ {} - -class CBR {} - -class CBS {} - -class CBT {} - -class CBU {} - -class CBV {} - -class CBW {} - -class CBX {} - -class CBY {} - -class CBZ {} - -class CCa {} - -class CCb {} - -class CCc {} - -class CCd {} - -class CCe {} - -class CCf {} - -class CCg {} - -class CCh {} - -class CCi {} - -class CCj {} - -class CCk {} - -class CCl {} - -class CCm {} - -class CCn {} - -class CCo {} - -class CCp {} - -class CCq {} - -class CCr {} - -class CCs {} - -class CCt {} - -class CCu {} - -class CCv {} - -class CCw {} - -class CCx {} - -class CCy {} - -class CCz {} - -class CCA {} - -class CCB {} - -class CCC {} - -class CCD {} - -class CCE {} - -class CCF {} - -class CCG {} - -class CCH {} - -class CCI {} - -class CCJ {} - -class CCK {} - -class CCL {} - -class CCM {} - -class CCN {} - -class CCO {} - -class CCP {} - -class CCQ {} - -class CCR {} - -class CCS {} - -class CCT {} - -class CCU {} - -class CCV {} - -class CCW {} - -class CCX {} - -class CCY {} - -class CCZ {} - -class CDa {} - -class CDb {} - -class CDc {} - -class CDd {} - -class CDe {} - -class CDf {} - -class CDg {} - -class CDh {} - -class CDi {} - -class CDj {} - -class CDk {} - -class CDl {} - -class CDm {} - -class CDn {} - -class CDo {} - -class CDp {} - -class CDq {} - -class CDr {} - -class CDs {} - -class CDt {} - -class CDu {} - -class CDv {} - -class CDw {} - -class CDx {} - -class CDy {} - -class CDz {} - -class CDA {} - -class CDB {} - -class CDC {} - -class CDD {} - -class CDE {} - -class CDF {} - -class CDG {} - -class CDH {} - -class CDI {} - -class CDJ {} - -class CDK {} - -class CDL {} - -class CDM {} - -class CDN {} - -class CDO {} - -class CDP {} - -class CDQ {} - -class CDR {} - -class CDS {} - -class CDT {} - -class CDU {} - -class CDV {} - -class CDW {} - -class CDX {} - -class CDY {} - -class CDZ {} - -class CEa {} - -class CEb {} - -class CEc {} - -class CEd {} - -class CEe {} - -class CEf {} - -class CEg {} - -class CEh {} - -class CEi {} - -class CEj {} - -class CEk {} - -class CEl {} - -class CEm {} - -class CEn {} - -class CEo {} - -class CEp {} - -class CEq {} - -class CEr {} - -class CEs {} - -class CEt {} - -class CEu {} - -class CEv {} - -class CEw {} - -class CEx {} - -class CEy {} - -class CEz {} - -class CEA {} - -class CEB {} - -class CEC {} - -class CED {} - -class CEE {} - -class CEF {} - -class CEG {} - -class CEH {} - -class CEI {} - -class CEJ {} - -class CEK {} - -class CEL {} - -class CEM {} - -class CEN {} - -class CEO {} - -class CEP {} - -class CEQ {} - -class CER {} - -class CES {} - -class CET {} - -class CEU {} - -class CEV {} - -class CEW {} - -class CEX {} - -class CEY {} - -class CEZ {} - -class CFa {} - -class CFb {} - -class CFc {} - -class CFd {} - -class CFe {} - -class CFf {} - -class CFg {} - -class CFh {} - -class CFi {} - -class CFj {} - -class CFk {} - -class CFl {} - -class CFm {} - -class CFn {} - -class CFo {} - -class CFp {} - -class CFq {} - -class CFr {} - -class CFs {} - -class CFt {} - -class CFu {} - -class CFv {} - -class CFw {} - -class CFx {} - -class CFy {} - -class CFz {} - -class CFA {} - -class CFB {} - -class CFC {} - -class CFD {} - -class CFE {} - -class CFF {} - -class CFG {} - -class CFH {} - -class CFI {} - -class CFJ {} - -class CFK {} - -class CFL {} - -class CFM {} - -class CFN {} - -class CFO {} - -class CFP {} - -class CFQ {} - -class CFR {} - -class CFS {} - -class CFT {} - -class CFU {} - -class CFV {} - -class CFW {} - -class CFX {} - -class CFY {} - -class CFZ {} - -class CGa {} - -class CGb {} - -class CGc {} - -class CGd {} - -class CGe {} - -class CGf {} - -class CGg {} - -class CGh {} - -class CGi {} - -class CGj {} - -class CGk {} - -class CGl {} - -class CGm {} - -class CGn {} - -class CGo {} - -class CGp {} - -class CGq {} - -class CGr {} - -class CGs {} - -class CGt {} - -class CGu {} - -class CGv {} - -class CGw {} - -class CGx {} - -class CGy {} - -class CGz {} - -class CGA {} - -class CGB {} - -class CGC {} - -class CGD {} - -class CGE {} - -class CGF {} - -class CGG {} - -class CGH {} - -class CGI {} - -class CGJ {} - -class CGK {} - -class CGL {} - -class CGM {} - -class CGN {} - -class CGO {} - -class CGP {} - -class CGQ {} - -class CGR {} - -class CGS {} - -class CGT {} - -class CGU {} - -class CGV {} - -class CGW {} - -class CGX {} - -class CGY {} - -class CGZ {} - -class CHa {} - -class CHb {} - -class CHc {} - -class CHd {} - -class CHe {} - -class CHf {} - -class CHg {} - -class CHh {} - -class CHi {} - -class CHj {} - -class CHk {} - -class CHl {} - -class CHm {} - -class CHn {} - -class CHo {} - -class CHp {} - -class CHq {} - -class CHr {} - -class CHs {} - -class CHt {} - -class CHu {} - -class CHv {} - -class CHw {} - -class CHx {} - -class CHy {} - -class CHz {} - -class CHA {} - -class CHB {} - -class CHC {} - -class CHD {} - -class CHE {} - -class CHF {} - -class CHG {} - -class CHH {} - -class CHI {} - -class CHJ {} - -class CHK {} - -class CHL {} - -class CHM {} - -class CHN {} - -class CHO {} - -class CHP {} - -class CHQ {} - -class CHR {} - -class CHS {} - -class CHT {} - -class CHU {} - -class CHV {} - -class CHW {} - -class CHX {} - -class CHY {} - -class CHZ {} - -class CIa {} - -class CIb {} - -class CIc {} - -class CId {} - -class CIe {} - -class CIf {} - -class CIg {} - -class CIh {} - -class CIi {} - -class CIj {} - -class CIk {} - -class CIl {} - -class CIm {} - -class CIn {} - -class CIo {} - -class CIp {} - -class CIq {} - -class CIr {} - -class CIs {} - -class CIt {} - -class CIu {} - -class CIv {} - -class CIw {} - -class CIx {} - -class CIy {} - -class CIz {} - -class CIA {} - -class CIB {} - -class CIC {} - -class CID {} - -class CIE {} - -class CIF {} - -class CIG {} - -class CIH {} - -class CII {} - -class CIJ {} - -class CIK {} - -class CIL {} - -class CIM {} - -class CIN {} - -class CIO {} - -class CIP {} - -class CIQ {} - -class CIR {} - -class CIS {} - -class CIT {} - -class CIU {} - -class CIV {} - -class CIW {} - -class CIX {} - -class CIY {} - -class CIZ {} - -class CJa {} - -class CJb {} - -class CJc {} - -class CJd {} - -class CJe {} - -class CJf {} - -class CJg {} - -class CJh {} - -class CJi {} - -class CJj {} - -class CJk {} - -class CJl {} - -class CJm {} - -class CJn {} - -class CJo {} - -class CJp {} - -class CJq {} - -class CJr {} - -class CJs {} - -class CJt {} - -class CJu {} - -class CJv {} - -class CJw {} - -class CJx {} - -class CJy {} - -class CJz {} - -class CJA {} - -class CJB {} - -class CJC {} - -class CJD {} - -class CJE {} - -class CJF {} - -class CJG {} - -class CJH {} - -class CJI {} - -class CJJ {} - -class CJK {} - -class CJL {} - -class CJM {} - -class CJN {} - -class CJO {} - -class CJP {} - -class CJQ {} - -class CJR {} - -class CJS {} - -class CJT {} - -class CJU {} - -class CJV {} - -class CJW {} - -class CJX {} - -class CJY {} - -class CJZ {} - -class CKa {} - -class CKb {} - -class CKc {} - -class CKd {} - -class CKe {} - -class CKf {} - -class CKg {} - -class CKh {} - -class CKi {} - -class CKj {} - -class CKk {} - -class CKl {} - -class CKm {} - -class CKn {} - -class CKo {} - -class CKp {} - -class CKq {} - -class CKr {} - -class CKs {} - -class CKt {} - -class CKu {} - -class CKv {} - -class CKw {} - -class CKx {} - -class CKy {} - -class CKz {} - -class CKA {} - -class CKB {} - -class CKC {} - -class CKD {} - -class CKE {} - -class CKF {} - -class CKG {} - -class CKH {} - -class CKI {} - -class CKJ {} - -class CKK {} - -class CKL {} - -class CKM {} - -class CKN {} - -class CKO {} - -class CKP {} - -class CKQ {} - -class CKR {} - -class CKS {} - -class CKT {} - -class CKU {} - -class CKV {} - -class CKW {} - -class CKX {} - -class CKY {} - -class CKZ {} - -class CLa {} - -class CLb {} - -class CLc {} - -class CLd {} - -class CLe {} - -class CLf {} - -class CLg {} - -class CLh {} - -class CLi {} - -class CLj {} - -class CLk {} - -class CLl {} - -class CLm {} - -class CLn {} - -class CLo {} - -class CLp {} - -class CLq {} - -class CLr {} - -class CLs {} - -class CLt {} - -class CLu {} - -class CLv {} - -class CLw {} - -class CLx {} - -class CLy {} - -class CLz {} - -class CLA {} - -class CLB {} - -class CLC {} - -class CLD {} - -class CLE {} - -class CLF {} - -class CLG {} - -class CLH {} - -class CLI {} - -class CLJ {} - -class CLK {} - -class CLL {} - -class CLM {} - -class CLN {} - -class CLO {} - -class CLP {} - -class CLQ {} - -class CLR {} - -class CLS {} - -class CLT {} - -class CLU {} - -class CLV {} - -class CLW {} - -class CLX {} - -class CLY {} - -class CLZ {} - -class CMa {} - -class CMb {} - -class CMc {} - -class CMd {} - -class CMe {} - -class CMf {} - -class CMg {} - -class CMh {} - -class CMi {} - -class CMj {} - -class CMk {} - -class CMl {} - -class CMm {} - -class CMn {} - -class CMo {} - -class CMp {} - -class CMq {} - -class CMr {} - -class CMs {} - -class CMt {} - -class CMu {} - -class CMv {} - -class CMw {} - -class CMx {} - -class CMy {} - -class CMz {} - -class CMA {} - -class CMB {} - -class CMC {} - -class CMD {} - -class CME {} - -class CMF {} - -class CMG {} - -class CMH {} - -class CMI {} - -class CMJ {} - -class CMK {} - -class CML {} - -class CMM {} - -class CMN {} - -class CMO {} - -class CMP {} - -class CMQ {} - -class CMR {} - -class CMS {} - -class CMT {} - -class CMU {} - -class CMV {} - -class CMW {} - -class CMX {} - -class CMY {} - -class CMZ {} - -class CNa {} - -class CNb {} - -class CNc {} - -class CNd {} - -class CNe {} - -class CNf {} - -class CNg {} - -class CNh {} - -class CNi {} - -class CNj {} - -class CNk {} - -class CNl {} - -class CNm {} - -class CNn {} - -class CNo {} - -class CNp {} - -class CNq {} - -class CNr {} - -class CNs {} - -class CNt {} - -class CNu {} - -class CNv {} - -class CNw {} - -class CNx {} - -class CNy {} - -class CNz {} - -class CNA {} - -class CNB {} - -class CNC {} - -class CND {} - -class CNE {} - -class CNF {} - -class CNG {} - -class CNH {} - -class CNI {} - -class CNJ {} - -class CNK {} - -class CNL {} - -class CNM {} - -class CNN {} - -class CNO {} - -class CNP {} - -class CNQ {} - -class CNR {} - -class CNS {} - -class CNT {} - -class CNU {} - -class CNV {} - -class CNW {} - -class CNX {} - -class CNY {} - -class CNZ {} - -class COa {} - -class COb {} - -class COc {} - -class COd {} - -class COe {} - -class COf {} - -class COg {} - -class COh {} - -class COi {} - -class COj {} - -class COk {} - -class COl {} - -class COm {} - -class COn {} - -class COo {} - -class COp {} - -class COq {} - -class COr {} - -class COs {} - -class COt {} - -class COu {} - -class COv {} - -class COw {} - -class COx {} - -class COy {} - -class COz {} - -class COA {} - -class COB {} - -class COC {} - -class COD {} - -class COE {} - -class COF {} - -class COG {} - -class COH {} - -class COI {} - -class COJ {} - -class COK {} - -class COL {} - -class COM {} - -class CON {} - -class COO {} - -class COP {} - -class COQ {} - -class COR {} - -class COS {} - -class COT {} - -class COU {} - -class COV {} - -class COW {} - -class COX {} - -class COY {} - -class COZ {} - -class CPa {} - -class CPb {} - -class CPc {} - -class CPd {} - -class CPe {} - -class CPf {} - -class CPg {} - -class CPh {} - -class CPi {} - -class CPj {} - -class CPk {} - -class CPl {} - -class CPm {} - -class CPn {} - -class CPo {} - -class CPp {} - -class CPq {} - -class CPr {} - -class CPs {} - -class CPt {} - -class CPu {} - -class CPv {} - -class CPw {} - -class CPx {} - -class CPy {} - -class CPz {} - -class CPA {} - -class CPB {} - -class CPC {} - -class CPD {} - -class CPE {} - -class CPF {} - -class CPG {} - -class CPH {} - -class CPI {} - -class CPJ {} - -class CPK {} - -class CPL {} - -class CPM {} - -class CPN {} - -class CPO {} - -class CPP {} - -class CPQ {} - -class CPR {} - -class CPS {} - -class CPT {} - -class CPU {} - -class CPV {} - -class CPW {} - -class CPX {} - -class CPY {} - -class CPZ {} - -class CQa {} - -class CQb {} - -class CQc {} - -class CQd {} - -class CQe {} - -class CQf {} - -class CQg {} - -class CQh {} - -class CQi {} - -class CQj {} - -class CQk {} - -class CQl {} - -class CQm {} - -class CQn {} - -class CQo {} - -class CQp {} - -class CQq {} - -class CQr {} - -class CQs {} - -class CQt {} - -class CQu {} - -class CQv {} - -class CQw {} - -class CQx {} - -class CQy {} - -class CQz {} - -class CQA {} - -class CQB {} - -class CQC {} - -class CQD {} - -class CQE {} - -class CQF {} - -class CQG {} - -class CQH {} - -class CQI {} - -class CQJ {} - -class CQK {} - -class CQL {} - -class CQM {} - -class CQN {} - -class CQO {} - -class CQP {} - -class CQQ {} - -class CQR {} - -class CQS {} - -class CQT {} - -class CQU {} - -class CQV {} - -class CQW {} - -class CQX {} - -class CQY {} - -class CQZ {} - -class CRa {} - -class CRb {} - -class CRc {} - -class CRd {} - -class CRe {} - -class CRf {} - -class CRg {} - -class CRh {} - -class CRi {} - -class CRj {} - -class CRk {} - -class CRl {} - -class CRm {} - -class CRn {} - -class CRo {} - -class CRp {} - -class CRq {} - -class CRr {} - -class CRs {} - -class CRt {} - -class CRu {} - -class CRv {} - -class CRw {} - -class CRx {} - -class CRy {} - -class CRz {} - -class CRA {} - -class CRB {} - -class CRC {} - -class CRD {} - -class CRE {} - -class CRF {} - -class CRG {} - -class CRH {} - -class CRI {} - -class CRJ {} - -class CRK {} - -class CRL {} - -class CRM {} - -class CRN {} - -class CRO {} - -class CRP {} - -class CRQ {} - -class CRR {} - -class CRS {} - -class CRT {} - -class CRU {} - -class CRV {} - -class CRW {} - -class CRX {} - -class CRY {} - -class CRZ {} - -class CSa {} - -class CSb {} - -class CSc {} - -class CSd {} - -class CSe {} - -class CSf {} - -class CSg {} - -class CSh {} - -class CSi {} - -class CSj {} - -class CSk {} - -class CSl {} - -class CSm {} - -class CSn {} - -class CSo {} - -class CSp {} - -class CSq {} - -class CSr {} - -class CSs {} - -class CSt {} - -class CSu {} - -class CSv {} - -class CSw {} - -class CSx {} - -class CSy {} - -class CSz {} - -class CSA {} - -class CSB {} - -class CSC {} - -class CSD {} - -class CSE {} - -class CSF {} - -class CSG {} - -class CSH {} - -class CSI {} - -class CSJ {} - -class CSK {} - -class CSL {} - -class CSM {} - -class CSN {} - -class CSO {} - -class CSP {} - -class CSQ {} - -class CSR {} - -class CSS {} - -class CST {} - -class CSU {} - -class CSV {} - -class CSW {} - -class CSX {} - -class CSY {} - -class CSZ {} - -class CTa {} - -class CTb {} - -class CTc {} - -class CTd {} - -class CTe {} - -class CTf {} - -class CTg {} - -class CTh {} - -class CTi {} - -class CTj {} - -class CTk {} - -class CTl {} - -class CTm {} - -class CTn {} - -class CTo {} - -class CTp {} - -class CTq {} - -class CTr {} - -class CTs {} - -class CTt {} - -class CTu {} - -class CTv {} - -class CTw {} - -class CTx {} - -class CTy {} - -class CTz {} - -class CTA {} - -class CTB {} - -class CTC {} - -class CTD {} - -class CTE {} - -class CTF {} - -class CTG {} - -class CTH {} - -class CTI {} - -class CTJ {} - -class CTK {} - -class CTL {} - -class CTM {} - -class CTN {} - -class CTO {} - -class CTP {} - -class CTQ {} - -class CTR {} - -class CTS {} - -class CTT {} - -class CTU {} - -class CTV {} - -class CTW {} - -class CTX {} - -class CTY {} - -class CTZ {} - -class CUa {} - -class CUb {} - -class CUc {} - -class CUd {} - -class CUe {} - -class CUf {} - -class CUg {} - -class CUh {} - -class CUi {} - -class CUj {} - -class CUk {} - -class CUl {} - -class CUm {} - -class CUn {} - -class CUo {} - -class CUp {} - -class CUq {} - -class CUr {} - -class CUs {} - -class CUt {} - -class CUu {} - -class CUv {} - -class CUw {} - -class CUx {} - -class CUy {} - -class CUz {} - -class CUA {} - -class CUB {} - -class CUC {} - -class CUD {} - -class CUE {} - -class CUF {} - -class CUG {} - -class CUH {} - -class CUI {} - -class CUJ {} - -class CUK {} - -class CUL {} - -class CUM {} - -class CUN {} - -class CUO {} - -class CUP {} - -class CUQ {} - -class CUR {} - -class CUS {} - -class CUT {} - -class CUU {} - -class CUV {} - -class CUW {} - -class CUX {} - -class CUY {} - -class CUZ {} - -class CVa {} - -class CVb {} - -class CVc {} - -class CVd {} - -class CVe {} - -class CVf {} - -class CVg {} - -class CVh {} - -class CVi {} - -class CVj {} - -class CVk {} - -class CVl {} - -class CVm {} - -class CVn {} - -class CVo {} - -class CVp {} - -class CVq {} - -class CVr {} - -class CVs {} - -class CVt {} - -class CVu {} - -class CVv {} - -class CVw {} - -class CVx {} - -class CVy {} - -class CVz {} - -class CVA {} - -class CVB {} - -class CVC {} - -class CVD {} - -class CVE {} - -class CVF {} - -class CVG {} - -class CVH {} - -class CVI {} - -class CVJ {} - -class CVK {} - -class CVL {} - -class CVM {} - -class CVN {} - -class CVO {} - -class CVP {} - -class CVQ {} - -class CVR {} - -class CVS {} - -class CVT {} - -class CVU {} - -class CVV {} - -class CVW {} - -class CVX {} - -class CVY {} - -class CVZ {} - -class CWa {} - -class CWb {} - -class CWc {} - -class CWd {} - -class CWe {} - -class CWf {} - -class CWg {} - -class CWh {} - -class CWi {} - -class CWj {} - -class CWk {} - -class CWl {} - -class CWm {} - -class CWn {} - -class CWo {} - -class CWp {} - -class CWq {} - -class CWr {} - -class CWs {} - -class CWt {} - -class CWu {} - -class CWv {} - -class CWw {} - -class CWx {} - -class CWy {} - -class CWz {} - -class CWA {} - -class CWB {} - -class CWC {} - -class CWD {} - -class CWE {} - -class CWF {} - -class CWG {} - -class CWH {} - -class CWI {} - -class CWJ {} - -class CWK {} - -class CWL {} - -class CWM {} - -class CWN {} - -class CWO {} - -class CWP {} - -class CWQ {} - -class CWR {} - -class CWS {} - -class CWT {} - -class CWU {} - -class CWV {} - -class CWW {} - -class CWX {} - -class CWY {} - -class CWZ {} - -class CXa {} - -class CXb {} - -class CXc {} - -class CXd {} - -class CXe {} - -class CXf {} - -class CXg {} - -class CXh {} - -class CXi {} - -class CXj {} - -class CXk {} - -class CXl {} - -class CXm {} - -class CXn {} - -class CXo {} - -class CXp {} - -class CXq {} - -class CXr {} - -class CXs {} - -class CXt {} - -class CXu {} - -class CXv {} - -class CXw {} - -class CXx {} - -class CXy {} - -class CXz {} - -class CXA {} - -class CXB {} - -class CXC {} - -class CXD {} - -class CXE {} - -class CXF {} - -class CXG {} - -class CXH {} - -class CXI {} - -class CXJ {} - -class CXK {} - -class CXL {} - -class CXM {} - -class CXN {} - -class CXO {} - -class CXP {} - -class CXQ {} - -class CXR {} - -class CXS {} - -class CXT {} - -class CXU {} - -class CXV {} - -class CXW {} - -class CXX {} - -class CXY {} - -class CXZ {} - -class CYa {} - -class CYb {} - -class CYc {} - -class CYd {} - -class CYe {} - -class CYf {} - -class CYg {} - -class CYh {} - -class CYi {} - -class CYj {} - -class CYk {} - -class CYl {} - -class CYm {} - -class CYn {} - -class CYo {} - -class CYp {} - -class CYq {} - -class CYr {} - -class CYs {} - -class CYt {} - -class CYu {} - -class CYv {} - -class CYw {} - -class CYx {} - -class CYy {} - -class CYz {} - -class CYA {} - -class CYB {} - -class CYC {} - -class CYD {} - -class CYE {} - -class CYF {} - -class CYG {} - -class CYH {} - -class CYI {} - -class CYJ {} - -class CYK {} - -class CYL {} - -class CYM {} - -class CYN {} - -class CYO {} - -class CYP {} - -class CYQ {} - -class CYR {} - -class CYS {} - -class CYT {} - -class CYU {} - -class CYV {} - -class CYW {} - -class CYX {} - -class CYY {} - -class CYZ {} - -class CZa {} - -class CZb {} - -class CZc {} - -class CZd {} - -class CZe {} - -class CZf {} - -class CZg {} - -class CZh {} - -class CZi {} - -class CZj {} - -class CZk {} - -class CZl {} - -class CZm {} - -class CZn {} - -class CZo {} - -class CZp {} - -class CZq {} - -class CZr {} - -class CZs {} - -class CZt {} - -class CZu {} - -class CZv {} - -class CZw {} - -class CZx {} - -class CZy {} - -class CZz {} - -class CZA {} - -class CZB {} - -class CZC {} - -class CZD {} - -class CZE {} - -class CZF {} - -class CZG {} - -class CZH {} - -class CZI {} - -class CZJ {} - -class CZK {} - -class CZL {} - -class CZM {} - -class CZN {} - -class CZO {} - -class CZP {} - -class CZQ {} - -class CZR {} - -class CZS {} - -class CZT {} - -class CZU {} - -class CZV {} - -class CZW {} - -class CZX {} - -class CZY {} - -class CZZ {} diff --git a/tests/language_2/class/codegen_test.dart b/tests/language_2/class/codegen_test.dart deleted file mode 100644 index cdf21d9d1e7..00000000000 --- a/tests/language_2/class/codegen_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - A() : x = 3; - foo() => x; - var x; -} - -class B extends A { - bar() => 499; -} - -class C extends A { - bar() => 42; -} - -main() { - // We don't instantiate A, but the codegen still needs to emit (parts of) it - // for inheritance purposes. - var b = new B(); - var c = new C(); - Expect.equals(3, b.foo()); - Expect.equals(3, c.foo()); - Expect.equals(499, b.bar()); - Expect.equals(42, c.bar()); -} diff --git a/tests/language_2/class/cycle2_test.dart b/tests/language_2/class/cycle2_test.dart deleted file mode 100644 index 6de0ee5a6ee..00000000000 --- a/tests/language_2/class/cycle2_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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. -// Check fail because of cycles in super class relationship. - -// @dart = 2.9 - -class C extends B {} - -class A extends B {} - -class B - extends A // //# 01: compile-time error - extends A // //# 02: compile-time error -{} - -main() { - new C(); // //# 01: continued - []; // //# 02: continued -} diff --git a/tests/language_2/class/cycle_test.dart b/tests/language_2/class/cycle_test.dart deleted file mode 100644 index a29c9cbca65..00000000000 --- a/tests/language_2/class/cycle_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2012, 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. -// Check fail because of cycles in super class relationship. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Foo implements Bar {} - -class C {} - -class Bar - extends Foo // //# 00: compile-time error - implements Foo // //# 01: compile-time error -{} - -class ImplementsC implements C -, C // //# 02: compile-time error -{} - -// Spec says: It is a compile-time error if the superclass -// of a class C appears in the implements clause of C. -class ExtendsC extends C -implements C // //# 03: compile-time error -{} - -main() { - Expect.isTrue(new Foo() is Foo); - Expect.isTrue(new ImplementsC() is C); - Expect.isTrue(new ExtendsC() is C); -} diff --git a/tests/language_2/class/cyclic_class_member_runtime_test.dart b/tests/language_2/class/cyclic_class_member_runtime_test.dart deleted file mode 100644 index a9cca8c9400..00000000000 --- a/tests/language_2/class/cyclic_class_member_runtime_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test that class with a cyclic hierarchy doesn't cause a loop in dart2js. - -class A - -{ - // When checking that foo isn't overriding an instance method in the - // superclass, dart2js might loop. - static foo() {} -} - -main() { - new A(); -} diff --git a/tests/language_2/class/cyclic_class_member_test.dart b/tests/language_2/class/cyclic_class_member_test.dart deleted file mode 100644 index f9f150582b8..00000000000 --- a/tests/language_2/class/cyclic_class_member_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that class with a cyclic hierarchy doesn't cause a loop in dart2js. - -class A -// ^ -// [analyzer] COMPILE_TIME_ERROR.RECURSIVE_INTERFACE_INHERITANCE -// [cfe] 'A' is a supertype of itself. - extends A -{ - // When checking that foo isn't overriding an instance method in the - // superclass, dart2js might loop. - static foo() {} -} - -main() { - new A(); -} diff --git a/tests/language_2/class/inheritance_chain_lib.dart b/tests/language_2/class/inheritance_chain_lib.dart deleted file mode 100644 index 1f79b0f6d57..00000000000 --- a/tests/language_2/class/inheritance_chain_lib.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2015, 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 - -import "inheritance_chain_test.dart"; - -class B extends C { - get id => "B"; - get length => 2; -} - -class D extends Z { - get id => "D"; - get length => 4; -} - -class W { - get id => "W"; - get length => -4; -} - -class Y extends X { - get id => "Y"; - get length => -2; -} diff --git a/tests/language_2/class/inheritance_chain_test.dart b/tests/language_2/class/inheritance_chain_test.dart deleted file mode 100644 index dd552520a26..00000000000 --- a/tests/language_2/class/inheritance_chain_test.dart +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; -import "inheritance_chain_lib.dart"; - -class A extends B { - get id => "A"; - get length => 1; -} - -class C extends D { - get id => "C"; - get length => 3; -} - -class X extends W { - get id => "X"; - get length => -3; -} - -class Z extends Y { - get id => "Z"; - get length => -1; -} - -main() { - var instances = [ - new A(), - new B(), - new C(), - new D(), - new W(), - new X(), - new Y(), - new Z(), - [], - ]; - - var o = instances[0]; - Expect.equals("A", o.id); - Expect.equals(1, o.length); - Expect.isTrue(o is A); - Expect.isTrue(o is B); - Expect.isTrue(o is C); - Expect.isTrue(o is D); - Expect.isTrue(o is W); - Expect.isTrue(o is X); - Expect.isTrue(o is Y); - Expect.isTrue(o is Z); - o = instances[1]; - Expect.equals("B", o.id); - Expect.equals(2, o.length); - Expect.isTrue(o is B); - Expect.isTrue(o is C); - Expect.isTrue(o is D); - Expect.isTrue(o is W); - Expect.isTrue(o is X); - Expect.isTrue(o is Y); - Expect.isTrue(o is Z); - o = instances[2]; - Expect.equals("C", o.id); - Expect.equals(3, o.length); - Expect.isTrue(o is C); - Expect.isTrue(o is D); - Expect.isTrue(o is W); - Expect.isTrue(o is X); - Expect.isTrue(o is Y); - Expect.isTrue(o is Z); - o = instances[3]; - Expect.equals("D", o.id); - Expect.equals(4, o.length); - Expect.isTrue(o is D); - Expect.isTrue(o is W); - Expect.isTrue(o is X); - Expect.isTrue(o is Y); - Expect.isTrue(o is Z); - o = instances[4]; - Expect.equals("W", o.id); - Expect.equals(-4, o.length); - Expect.isTrue(o is W); - o = instances[5]; - Expect.equals("X", o.id); - Expect.equals(-3, o.length); - Expect.isTrue(o is X); - Expect.isTrue(o is W); - o = instances[6]; - Expect.equals("Y", o.id); - Expect.equals(-2, o.length); - Expect.isTrue(o is Y); - Expect.isTrue(o is X); - Expect.isTrue(o is W); - o = instances[7]; - Expect.equals("Z", o.id); - Expect.equals(-1, o.length); - Expect.isTrue(o is Z); - Expect.isTrue(o is Y); - Expect.isTrue(o is X); - Expect.isTrue(o is W); - o = instances[8]; - Expect.equals(0, o.length); -} diff --git a/tests/language_2/class/keyword_runtime_test.dart b/tests/language_2/class/keyword_runtime_test.dart deleted file mode 100644 index e5719a04c8e..00000000000 --- a/tests/language_2/class/keyword_runtime_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -// Test that "class" cannot be used as identifier. - -class foo {} - -void main() { - - -} diff --git a/tests/language_2/class/keyword_test.dart b/tests/language_2/class/keyword_test.dart deleted file mode 100644 index 86768673a03..00000000000 --- a/tests/language_2/class/keyword_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// 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 - -// Test that "class" cannot be used as identifier. - -class foo {} - -void main() { - int class = 10; -//^^^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN -// [cfe] Expected ';' after this. -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER -// [analyzer] SYNTACTIC_ERROR.EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD -// [cfe] 'class' can't be used as an identifier because it's a keyword. -// [cfe] Setter not found: 'class'. - print("$class"); - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER - // [analyzer] SYNTACTIC_ERROR.EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD - // [cfe] 'class' can't be used as an identifier because it's a keyword. - // [cfe] Undefined name 'class'. -} diff --git a/tests/language_2/class/large_class_declaration_test.dart b/tests/language_2/class/large_class_declaration_test.dart deleted file mode 100644 index 111df83be83..00000000000 --- a/tests/language_2/class/large_class_declaration_test.dart +++ /dev/null @@ -1,20020 +0,0 @@ -// Copyright (c) 2014, 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 - -// Dart test program for testing compilation of classes with a large number -// of fields. - -import "package:expect/expect.dart"; - -class A { - var a0; - var a1; - var a2; - var a3; - var a4; - var a5; - var a6; - var a7; - var a8; - var a9; - var a10; - var a11; - var a12; - var a13; - var a14; - var a15; - var a16; - var a17; - var a18; - var a19; - var a20; - var a21; - var a22; - var a23; - var a24; - var a25; - var a26; - var a27; - var a28; - var a29; - var a30; - var a31; - var a32; - var a33; - var a34; - var a35; - var a36; - var a37; - var a38; - var a39; - var a40; - var a41; - var a42; - var a43; - var a44; - var a45; - var a46; - var a47; - var a48; - var a49; - var a50; - var a51; - var a52; - var a53; - var a54; - var a55; - var a56; - var a57; - var a58; - var a59; - var a60; - var a61; - var a62; - var a63; - var a64; - var a65; - var a66; - var a67; - var a68; - var a69; - var a70; - var a71; - var a72; - var a73; - var a74; - var a75; - var a76; - var a77; - var a78; - var a79; - var a80; - var a81; - var a82; - var a83; - var a84; - var a85; - var a86; - var a87; - var a88; - var a89; - var a90; - var a91; - var a92; - var a93; - var a94; - var a95; - var a96; - var a97; - var a98; - var a99; - var a100; - var a101; - var a102; - var a103; - var a104; - var a105; - var a106; - var a107; - var a108; - var a109; - var a110; - var a111; - var a112; - var a113; - var a114; - var a115; - var a116; - var a117; - var a118; - var a119; - var a120; - var a121; - var a122; - var a123; - var a124; - var a125; - var a126; - var a127; - var a128; - var a129; - var a130; - var a131; - var a132; - var a133; - var a134; - var a135; - var a136; - var a137; - var a138; - var a139; - var a140; - var a141; - var a142; - var a143; - var a144; - var a145; - var a146; - var a147; - var a148; - var a149; - var a150; - var a151; - var a152; - var a153; - var a154; - var a155; - var a156; - var a157; - var a158; - var a159; - var a160; - var a161; - var a162; - var a163; - var a164; - var a165; - var a166; - var a167; - var a168; - var a169; - var a170; - var a171; - var a172; - var a173; - var a174; - var a175; - var a176; - var a177; - var a178; - var a179; - var a180; - var a181; - var a182; - var a183; - var a184; - var a185; - var a186; - var a187; - var a188; - var a189; - var a190; - var a191; - var a192; - var a193; - var a194; - var a195; - var a196; - var a197; - var a198; - var a199; - var a200; - var a201; - var a202; - var a203; - var a204; - var a205; - var a206; - var a207; - var a208; - var a209; - var a210; - var a211; - var a212; - var a213; - var a214; - var a215; - var a216; - var a217; - var a218; - var a219; - var a220; - var a221; - var a222; - var a223; - var a224; - var a225; - var a226; - var a227; - var a228; - var a229; - var a230; - var a231; - var a232; - var a233; - var a234; - var a235; - var a236; - var a237; - var a238; - var a239; - var a240; - var a241; - var a242; - var a243; - var a244; - var a245; - var a246; - var a247; - var a248; - var a249; - var a250; - var a251; - var a252; - var a253; - var a254; - var a255; - var a256; - var a257; - var a258; - var a259; - var a260; - var a261; - var a262; - var a263; - var a264; - var a265; - var a266; - var a267; - var a268; - var a269; - var a270; - var a271; - var a272; - var a273; - var a274; - var a275; - var a276; - var a277; - var a278; - var a279; - var a280; - var a281; - var a282; - var a283; - var a284; - var a285; - var a286; - var a287; - var a288; - var a289; - var a290; - var a291; - var a292; - var a293; - var a294; - var a295; - var a296; - var a297; - var a298; - var a299; - var a300; - var a301; - var a302; - var a303; - var a304; - var a305; - var a306; - var a307; - var a308; - var a309; - var a310; - var a311; - var a312; - var a313; - var a314; - var a315; - var a316; - var a317; - var a318; - var a319; - var a320; - var a321; - var a322; - var a323; - var a324; - var a325; - var a326; - var a327; - var a328; - var a329; - var a330; - var a331; - var a332; - var a333; - var a334; - var a335; - var a336; - var a337; - var a338; - var a339; - var a340; - var a341; - var a342; - var a343; - var a344; - var a345; - var a346; - var a347; - var a348; - var a349; - var a350; - var a351; - var a352; - var a353; - var a354; - var a355; - var a356; - var a357; - var a358; - var a359; - var a360; - var a361; - var a362; - var a363; - var a364; - var a365; - var a366; - var a367; - var a368; - var a369; - var a370; - var a371; - var a372; - var a373; - var a374; - var a375; - var a376; - var a377; - var a378; - var a379; - var a380; - var a381; - var a382; - var a383; - var a384; - var a385; - var a386; - var a387; - var a388; - var a389; - var a390; - var a391; - var a392; - var a393; - var a394; - var a395; - var a396; - var a397; - var a398; - var a399; - var a400; - var a401; - var a402; - var a403; - var a404; - var a405; - var a406; - var a407; - var a408; - var a409; - var a410; - var a411; - var a412; - var a413; - var a414; - var a415; - var a416; - var a417; - var a418; - var a419; - var a420; - var a421; - var a422; - var a423; - var a424; - var a425; - var a426; - var a427; - var a428; - var a429; - var a430; - var a431; - var a432; - var a433; - var a434; - var a435; - var a436; - var a437; - var a438; - var a439; - var a440; - var a441; - var a442; - var a443; - var a444; - var a445; - var a446; - var a447; - var a448; - var a449; - var a450; - var a451; - var a452; - var a453; - var a454; - var a455; - var a456; - var a457; - var a458; - var a459; - var a460; - var a461; - var a462; - var a463; - var a464; - var a465; - var a466; - var a467; - var a468; - var a469; - var a470; - var a471; - var a472; - var a473; - var a474; - var a475; - var a476; - var a477; - var a478; - var a479; - var a480; - var a481; - var a482; - var a483; - var a484; - var a485; - var a486; - var a487; - var a488; - var a489; - var a490; - var a491; - var a492; - var a493; - var a494; - var a495; - var a496; - var a497; - var a498; - var a499; - var a500; - var a501; - var a502; - var a503; - var a504; - var a505; - var a506; - var a507; - var a508; - var a509; - var a510; - var a511; - var a512; - var a513; - var a514; - var a515; - var a516; - var a517; - var a518; - var a519; - var a520; - var a521; - var a522; - var a523; - var a524; - var a525; - var a526; - var a527; - var a528; - var a529; - var a530; - var a531; - var a532; - var a533; - var a534; - var a535; - var a536; - var a537; - var a538; - var a539; - var a540; - var a541; - var a542; - var a543; - var a544; - var a545; - var a546; - var a547; - var a548; - var a549; - var a550; - var a551; - var a552; - var a553; - var a554; - var a555; - var a556; - var a557; - var a558; - var a559; - var a560; - var a561; - var a562; - var a563; - var a564; - var a565; - var a566; - var a567; - var a568; - var a569; - var a570; - var a571; - var a572; - var a573; - var a574; - var a575; - var a576; - var a577; - var a578; - var a579; - var a580; - var a581; - var a582; - var a583; - var a584; - var a585; - var a586; - var a587; - var a588; - var a589; - var a590; - var a591; - var a592; - var a593; - var a594; - var a595; - var a596; - var a597; - var a598; - var a599; - var a600; - var a601; - var a602; - var a603; - var a604; - var a605; - var a606; - var a607; - var a608; - var a609; - var a610; - var a611; - var a612; - var a613; - var a614; - var a615; - var a616; - var a617; - var a618; - var a619; - var a620; - var a621; - var a622; - var a623; - var a624; - var a625; - var a626; - var a627; - var a628; - var a629; - var a630; - var a631; - var a632; - var a633; - var a634; - var a635; - var a636; - var a637; - var a638; - var a639; - var a640; - var a641; - var a642; - var a643; - var a644; - var a645; - var a646; - var a647; - var a648; - var a649; - var a650; - var a651; - var a652; - var a653; - var a654; - var a655; - var a656; - var a657; - var a658; - var a659; - var a660; - var a661; - var a662; - var a663; - var a664; - var a665; - var a666; - var a667; - var a668; - var a669; - var a670; - var a671; - var a672; - var a673; - var a674; - var a675; - var a676; - var a677; - var a678; - var a679; - var a680; - var a681; - var a682; - var a683; - var a684; - var a685; - var a686; - var a687; - var a688; - var a689; - var a690; - var a691; - var a692; - var a693; - var a694; - var a695; - var a696; - var a697; - var a698; - var a699; - var a700; - var a701; - var a702; - var a703; - var a704; - var a705; - var a706; - var a707; - var a708; - var a709; - var a710; - var a711; - var a712; - var a713; - var a714; - var a715; - var a716; - var a717; - var a718; - var a719; - var a720; - var a721; - var a722; - var a723; - var a724; - var a725; - var a726; - var a727; - var a728; - var a729; - var a730; - var a731; - var a732; - var a733; - var a734; - var a735; - var a736; - var a737; - var a738; - var a739; - var a740; - var a741; - var a742; - var a743; - var a744; - var a745; - var a746; - var a747; - var a748; - var a749; - var a750; - var a751; - var a752; - var a753; - var a754; - var a755; - var a756; - var a757; - var a758; - var a759; - var a760; - var a761; - var a762; - var a763; - var a764; - var a765; - var a766; - var a767; - var a768; - var a769; - var a770; - var a771; - var a772; - var a773; - var a774; - var a775; - var a776; - var a777; - var a778; - var a779; - var a780; - var a781; - var a782; - var a783; - var a784; - var a785; - var a786; - var a787; - var a788; - var a789; - var a790; - var a791; - var a792; - var a793; - var a794; - var a795; - var a796; - var a797; - var a798; - var a799; - var a800; - var a801; - var a802; - var a803; - var a804; - var a805; - var a806; - var a807; - var a808; - var a809; - var a810; - var a811; - var a812; - var a813; - var a814; - var a815; - var a816; - var a817; - var a818; - var a819; - var a820; - var a821; - var a822; - var a823; - var a824; - var a825; - var a826; - var a827; - var a828; - var a829; - var a830; - var a831; - var a832; - var a833; - var a834; - var a835; - var a836; - var a837; - var a838; - var a839; - var a840; - var a841; - var a842; - var a843; - var a844; - var a845; - var a846; - var a847; - var a848; - var a849; - var a850; - var a851; - var a852; - var a853; - var a854; - var a855; - var a856; - var a857; - var a858; - var a859; - var a860; - var a861; - var a862; - var a863; - var a864; - var a865; - var a866; - var a867; - var a868; - var a869; - var a870; - var a871; - var a872; - var a873; - var a874; - var a875; - var a876; - var a877; - var a878; - var a879; - var a880; - var a881; - var a882; - var a883; - var a884; - var a885; - var a886; - var a887; - var a888; - var a889; - var a890; - var a891; - var a892; - var a893; - var a894; - var a895; - var a896; - var a897; - var a898; - var a899; - var a900; - var a901; - var a902; - var a903; - var a904; - var a905; - var a906; - var a907; - var a908; - var a909; - var a910; - var a911; - var a912; - var a913; - var a914; - var a915; - var a916; - var a917; - var a918; - var a919; - var a920; - var a921; - var a922; - var a923; - var a924; - var a925; - var a926; - var a927; - var a928; - var a929; - var a930; - var a931; - var a932; - var a933; - var a934; - var a935; - var a936; - var a937; - var a938; - var a939; - var a940; - var a941; - var a942; - var a943; - var a944; - var a945; - var a946; - var a947; - var a948; - var a949; - var a950; - var a951; - var a952; - var a953; - var a954; - var a955; - var a956; - var a957; - var a958; - var a959; - var a960; - var a961; - var a962; - var a963; - var a964; - var a965; - var a966; - var a967; - var a968; - var a969; - var a970; - var a971; - var a972; - var a973; - var a974; - var a975; - var a976; - var a977; - var a978; - var a979; - var a980; - var a981; - var a982; - var a983; - var a984; - var a985; - var a986; - var a987; - var a988; - var a989; - var a990; - var a991; - var a992; - var a993; - var a994; - var a995; - var a996; - var a997; - var a998; - var a999; - var a1000; - var a1001; - var a1002; - var a1003; - var a1004; - var a1005; - var a1006; - var a1007; - var a1008; - var a1009; - var a1010; - var a1011; - var a1012; - var a1013; - var a1014; - var a1015; - var a1016; - var a1017; - var a1018; - var a1019; - var a1020; - var a1021; - var a1022; - var a1023; - var a1024; - var a1025; - var a1026; - var a1027; - var a1028; - var a1029; - var a1030; - var a1031; - var a1032; - var a1033; - var a1034; - var a1035; - var a1036; - var a1037; - var a1038; - var a1039; - var a1040; - var a1041; - var a1042; - var a1043; - var a1044; - var a1045; - var a1046; - var a1047; - var a1048; - var a1049; - var a1050; - var a1051; - var a1052; - var a1053; - var a1054; - var a1055; - var a1056; - var a1057; - var a1058; - var a1059; - var a1060; - var a1061; - var a1062; - var a1063; - var a1064; - var a1065; - var a1066; - var a1067; - var a1068; - var a1069; - var a1070; - var a1071; - var a1072; - var a1073; - var a1074; - var a1075; - var a1076; - var a1077; - var a1078; - var a1079; - var a1080; - var a1081; - var a1082; - var a1083; - var a1084; - var a1085; - var a1086; - var a1087; - var a1088; - var a1089; - var a1090; - var a1091; - var a1092; - var a1093; - var a1094; - var a1095; - var a1096; - var a1097; - var a1098; - var a1099; - var a1100; - var a1101; - var a1102; - var a1103; - var a1104; - var a1105; - var a1106; - var a1107; - var a1108; - var a1109; - var a1110; - var a1111; - var a1112; - var a1113; - var a1114; - var a1115; - var a1116; - var a1117; - var a1118; - var a1119; - var a1120; - var a1121; - var a1122; - var a1123; - var a1124; - var a1125; - var a1126; - var a1127; - var a1128; - var a1129; - var a1130; - var a1131; - var a1132; - var a1133; - var a1134; - var a1135; - var a1136; - var a1137; - var a1138; - var a1139; - var a1140; - var a1141; - var a1142; - var a1143; - var a1144; - var a1145; - var a1146; - var a1147; - var a1148; - var a1149; - var a1150; - var a1151; - var a1152; - var a1153; - var a1154; - var a1155; - var a1156; - var a1157; - var a1158; - var a1159; - var a1160; - var a1161; - var a1162; - var a1163; - var a1164; - var a1165; - var a1166; - var a1167; - var a1168; - var a1169; - var a1170; - var a1171; - var a1172; - var a1173; - var a1174; - var a1175; - var a1176; - var a1177; - var a1178; - var a1179; - var a1180; - var a1181; - var a1182; - var a1183; - var a1184; - var a1185; - var a1186; - var a1187; - var a1188; - var a1189; - var a1190; - var a1191; - var a1192; - var a1193; - var a1194; - var a1195; - var a1196; - var a1197; - var a1198; - var a1199; - var a1200; - var a1201; - var a1202; - var a1203; - var a1204; - var a1205; - var a1206; - var a1207; - var a1208; - var a1209; - var a1210; - var a1211; - var a1212; - var a1213; - var a1214; - var a1215; - var a1216; - var a1217; - var a1218; - var a1219; - var a1220; - var a1221; - var a1222; - var a1223; - var a1224; - var a1225; - var a1226; - var a1227; - var a1228; - var a1229; - var a1230; - var a1231; - var a1232; - var a1233; - var a1234; - var a1235; - var a1236; - var a1237; - var a1238; - var a1239; - var a1240; - var a1241; - var a1242; - var a1243; - var a1244; - var a1245; - var a1246; - var a1247; - var a1248; - var a1249; - var a1250; - var a1251; - var a1252; - var a1253; - var a1254; - var a1255; - var a1256; - var a1257; - var a1258; - var a1259; - var a1260; - var a1261; - var a1262; - var a1263; - var a1264; - var a1265; - var a1266; - var a1267; - var a1268; - var a1269; - var a1270; - var a1271; - var a1272; - var a1273; - var a1274; - var a1275; - var a1276; - var a1277; - var a1278; - var a1279; - var a1280; - var a1281; - var a1282; - var a1283; - var a1284; - var a1285; - var a1286; - var a1287; - var a1288; - var a1289; - var a1290; - var a1291; - var a1292; - var a1293; - var a1294; - var a1295; - var a1296; - var a1297; - var a1298; - var a1299; - var a1300; - var a1301; - var a1302; - var a1303; - var a1304; - var a1305; - var a1306; - var a1307; - var a1308; - var a1309; - var a1310; - var a1311; - var a1312; - var a1313; - var a1314; - var a1315; - var a1316; - var a1317; - var a1318; - var a1319; - var a1320; - var a1321; - var a1322; - var a1323; - var a1324; - var a1325; - var a1326; - var a1327; - var a1328; - var a1329; - var a1330; - var a1331; - var a1332; - var a1333; - var a1334; - var a1335; - var a1336; - var a1337; - var a1338; - var a1339; - var a1340; - var a1341; - var a1342; - var a1343; - var a1344; - var a1345; - var a1346; - var a1347; - var a1348; - var a1349; - var a1350; - var a1351; - var a1352; - var a1353; - var a1354; - var a1355; - var a1356; - var a1357; - var a1358; - var a1359; - var a1360; - var a1361; - var a1362; - var a1363; - var a1364; - var a1365; - var a1366; - var a1367; - var a1368; - var a1369; - var a1370; - var a1371; - var a1372; - var a1373; - var a1374; - var a1375; - var a1376; - var a1377; - var a1378; - var a1379; - var a1380; - var a1381; - var a1382; - var a1383; - var a1384; - var a1385; - var a1386; - var a1387; - var a1388; - var a1389; - var a1390; - var a1391; - var a1392; - var a1393; - var a1394; - var a1395; - var a1396; - var a1397; - var a1398; - var a1399; - var a1400; - var a1401; - var a1402; - var a1403; - var a1404; - var a1405; - var a1406; - var a1407; - var a1408; - var a1409; - var a1410; - var a1411; - var a1412; - var a1413; - var a1414; - var a1415; - var a1416; - var a1417; - var a1418; - var a1419; - var a1420; - var a1421; - var a1422; - var a1423; - var a1424; - var a1425; - var a1426; - var a1427; - var a1428; - var a1429; - var a1430; - var a1431; - var a1432; - var a1433; - var a1434; - var a1435; - var a1436; - var a1437; - var a1438; - var a1439; - var a1440; - var a1441; - var a1442; - var a1443; - var a1444; - var a1445; - var a1446; - var a1447; - var a1448; - var a1449; - var a1450; - var a1451; - var a1452; - var a1453; - var a1454; - var a1455; - var a1456; - var a1457; - var a1458; - var a1459; - var a1460; - var a1461; - var a1462; - var a1463; - var a1464; - var a1465; - var a1466; - var a1467; - var a1468; - var a1469; - var a1470; - var a1471; - var a1472; - var a1473; - var a1474; - var a1475; - var a1476; - var a1477; - var a1478; - var a1479; - var a1480; - var a1481; - var a1482; - var a1483; - var a1484; - var a1485; - var a1486; - var a1487; - var a1488; - var a1489; - var a1490; - var a1491; - var a1492; - var a1493; - var a1494; - var a1495; - var a1496; - var a1497; - var a1498; - var a1499; - var a1500; - var a1501; - var a1502; - var a1503; - var a1504; - var a1505; - var a1506; - var a1507; - var a1508; - var a1509; - var a1510; - var a1511; - var a1512; - var a1513; - var a1514; - var a1515; - var a1516; - var a1517; - var a1518; - var a1519; - var a1520; - var a1521; - var a1522; - var a1523; - var a1524; - var a1525; - var a1526; - var a1527; - var a1528; - var a1529; - var a1530; - var a1531; - var a1532; - var a1533; - var a1534; - var a1535; - var a1536; - var a1537; - var a1538; - var a1539; - var a1540; - var a1541; - var a1542; - var a1543; - var a1544; - var a1545; - var a1546; - var a1547; - var a1548; - var a1549; - var a1550; - var a1551; - var a1552; - var a1553; - var a1554; - var a1555; - var a1556; - var a1557; - var a1558; - var a1559; - var a1560; - var a1561; - var a1562; - var a1563; - var a1564; - var a1565; - var a1566; - var a1567; - var a1568; - var a1569; - var a1570; - var a1571; - var a1572; - var a1573; - var a1574; - var a1575; - var a1576; - var a1577; - var a1578; - var a1579; - var a1580; - var a1581; - var a1582; - var a1583; - var a1584; - var a1585; - var a1586; - var a1587; - var a1588; - var a1589; - var a1590; - var a1591; - var a1592; - var a1593; - var a1594; - var a1595; - var a1596; - var a1597; - var a1598; - var a1599; - var a1600; - var a1601; - var a1602; - var a1603; - var a1604; - var a1605; - var a1606; - var a1607; - var a1608; - var a1609; - var a1610; - var a1611; - var a1612; - var a1613; - var a1614; - var a1615; - var a1616; - var a1617; - var a1618; - var a1619; - var a1620; - var a1621; - var a1622; - var a1623; - var a1624; - var a1625; - var a1626; - var a1627; - var a1628; - var a1629; - var a1630; - var a1631; - var a1632; - var a1633; - var a1634; - var a1635; - var a1636; - var a1637; - var a1638; - var a1639; - var a1640; - var a1641; - var a1642; - var a1643; - var a1644; - var a1645; - var a1646; - var a1647; - var a1648; - var a1649; - var a1650; - var a1651; - var a1652; - var a1653; - var a1654; - var a1655; - var a1656; - var a1657; - var a1658; - var a1659; - var a1660; - var a1661; - var a1662; - var a1663; - var a1664; - var a1665; - var a1666; - var a1667; - var a1668; - var a1669; - var a1670; - var a1671; - var a1672; - var a1673; - var a1674; - var a1675; - var a1676; - var a1677; - var a1678; - var a1679; - var a1680; - var a1681; - var a1682; - var a1683; - var a1684; - var a1685; - var a1686; - var a1687; - var a1688; - var a1689; - var a1690; - var a1691; - var a1692; - var a1693; - var a1694; - var a1695; - var a1696; - var a1697; - var a1698; - var a1699; - var a1700; - var a1701; - var a1702; - var a1703; - var a1704; - var a1705; - var a1706; - var a1707; - var a1708; - var a1709; - var a1710; - var a1711; - var a1712; - var a1713; - var a1714; - var a1715; - var a1716; - var a1717; - var a1718; - var a1719; - var a1720; - var a1721; - var a1722; - var a1723; - var a1724; - var a1725; - var a1726; - var a1727; - var a1728; - var a1729; - var a1730; - var a1731; - var a1732; - var a1733; - var a1734; - var a1735; - var a1736; - var a1737; - var a1738; - var a1739; - var a1740; - var a1741; - var a1742; - var a1743; - var a1744; - var a1745; - var a1746; - var a1747; - var a1748; - var a1749; - var a1750; - var a1751; - var a1752; - var a1753; - var a1754; - var a1755; - var a1756; - var a1757; - var a1758; - var a1759; - var a1760; - var a1761; - var a1762; - var a1763; - var a1764; - var a1765; - var a1766; - var a1767; - var a1768; - var a1769; - var a1770; - var a1771; - var a1772; - var a1773; - var a1774; - var a1775; - var a1776; - var a1777; - var a1778; - var a1779; - var a1780; - var a1781; - var a1782; - var a1783; - var a1784; - var a1785; - var a1786; - var a1787; - var a1788; - var a1789; - var a1790; - var a1791; - var a1792; - var a1793; - var a1794; - var a1795; - var a1796; - var a1797; - var a1798; - var a1799; - var a1800; - var a1801; - var a1802; - var a1803; - var a1804; - var a1805; - var a1806; - var a1807; - var a1808; - var a1809; - var a1810; - var a1811; - var a1812; - var a1813; - var a1814; - var a1815; - var a1816; - var a1817; - var a1818; - var a1819; - var a1820; - var a1821; - var a1822; - var a1823; - var a1824; - var a1825; - var a1826; - var a1827; - var a1828; - var a1829; - var a1830; - var a1831; - var a1832; - var a1833; - var a1834; - var a1835; - var a1836; - var a1837; - var a1838; - var a1839; - var a1840; - var a1841; - var a1842; - var a1843; - var a1844; - var a1845; - var a1846; - var a1847; - var a1848; - var a1849; - var a1850; - var a1851; - var a1852; - var a1853; - var a1854; - var a1855; - var a1856; - var a1857; - var a1858; - var a1859; - var a1860; - var a1861; - var a1862; - var a1863; - var a1864; - var a1865; - var a1866; - var a1867; - var a1868; - var a1869; - var a1870; - var a1871; - var a1872; - var a1873; - var a1874; - var a1875; - var a1876; - var a1877; - var a1878; - var a1879; - var a1880; - var a1881; - var a1882; - var a1883; - var a1884; - var a1885; - var a1886; - var a1887; - var a1888; - var a1889; - var a1890; - var a1891; - var a1892; - var a1893; - var a1894; - var a1895; - var a1896; - var a1897; - var a1898; - var a1899; - var a1900; - var a1901; - var a1902; - var a1903; - var a1904; - var a1905; - var a1906; - var a1907; - var a1908; - var a1909; - var a1910; - var a1911; - var a1912; - var a1913; - var a1914; - var a1915; - var a1916; - var a1917; - var a1918; - var a1919; - var a1920; - var a1921; - var a1922; - var a1923; - var a1924; - var a1925; - var a1926; - var a1927; - var a1928; - var a1929; - var a1930; - var a1931; - var a1932; - var a1933; - var a1934; - var a1935; - var a1936; - var a1937; - var a1938; - var a1939; - var a1940; - var a1941; - var a1942; - var a1943; - var a1944; - var a1945; - var a1946; - var a1947; - var a1948; - var a1949; - var a1950; - var a1951; - var a1952; - var a1953; - var a1954; - var a1955; - var a1956; - var a1957; - var a1958; - var a1959; - var a1960; - var a1961; - var a1962; - var a1963; - var a1964; - var a1965; - var a1966; - var a1967; - var a1968; - var a1969; - var a1970; - var a1971; - var a1972; - var a1973; - var a1974; - var a1975; - var a1976; - var a1977; - var a1978; - var a1979; - var a1980; - var a1981; - var a1982; - var a1983; - var a1984; - var a1985; - var a1986; - var a1987; - var a1988; - var a1989; - var a1990; - var a1991; - var a1992; - var a1993; - var a1994; - var a1995; - var a1996; - var a1997; - var a1998; - var a1999; - var a2000; - var a2001; - var a2002; - var a2003; - var a2004; - var a2005; - var a2006; - var a2007; - var a2008; - var a2009; - var a2010; - var a2011; - var a2012; - var a2013; - var a2014; - var a2015; - var a2016; - var a2017; - var a2018; - var a2019; - var a2020; - var a2021; - var a2022; - var a2023; - var a2024; - var a2025; - var a2026; - var a2027; - var a2028; - var a2029; - var a2030; - var a2031; - var a2032; - var a2033; - var a2034; - var a2035; - var a2036; - var a2037; - var a2038; - var a2039; - var a2040; - var a2041; - var a2042; - var a2043; - var a2044; - var a2045; - var a2046; - var a2047; - var a2048; - var a2049; - var a2050; - var a2051; - var a2052; - var a2053; - var a2054; - var a2055; - var a2056; - var a2057; - var a2058; - var a2059; - var a2060; - var a2061; - var a2062; - var a2063; - var a2064; - var a2065; - var a2066; - var a2067; - var a2068; - var a2069; - var a2070; - var a2071; - var a2072; - var a2073; - var a2074; - var a2075; - var a2076; - var a2077; - var a2078; - var a2079; - var a2080; - var a2081; - var a2082; - var a2083; - var a2084; - var a2085; - var a2086; - var a2087; - var a2088; - var a2089; - var a2090; - var a2091; - var a2092; - var a2093; - var a2094; - var a2095; - var a2096; - var a2097; - var a2098; - var a2099; - var a2100; - var a2101; - var a2102; - var a2103; - var a2104; - var a2105; - var a2106; - var a2107; - var a2108; - var a2109; - var a2110; - var a2111; - var a2112; - var a2113; - var a2114; - var a2115; - var a2116; - var a2117; - var a2118; - var a2119; - var a2120; - var a2121; - var a2122; - var a2123; - var a2124; - var a2125; - var a2126; - var a2127; - var a2128; - var a2129; - var a2130; - var a2131; - var a2132; - var a2133; - var a2134; - var a2135; - var a2136; - var a2137; - var a2138; - var a2139; - var a2140; - var a2141; - var a2142; - var a2143; - var a2144; - var a2145; - var a2146; - var a2147; - var a2148; - var a2149; - var a2150; - var a2151; - var a2152; - var a2153; - var a2154; - var a2155; - var a2156; - var a2157; - var a2158; - var a2159; - var a2160; - var a2161; - var a2162; - var a2163; - var a2164; - var a2165; - var a2166; - var a2167; - var a2168; - var a2169; - var a2170; - var a2171; - var a2172; - var a2173; - var a2174; - var a2175; - var a2176; - var a2177; - var a2178; - var a2179; - var a2180; - var a2181; - var a2182; - var a2183; - var a2184; - var a2185; - var a2186; - var a2187; - var a2188; - var a2189; - var a2190; - var a2191; - var a2192; - var a2193; - var a2194; - var a2195; - var a2196; - var a2197; - var a2198; - var a2199; - var a2200; - var a2201; - var a2202; - var a2203; - var a2204; - var a2205; - var a2206; - var a2207; - var a2208; - var a2209; - var a2210; - var a2211; - var a2212; - var a2213; - var a2214; - var a2215; - var a2216; - var a2217; - var a2218; - var a2219; - var a2220; - var a2221; - var a2222; - var a2223; - var a2224; - var a2225; - var a2226; - var a2227; - var a2228; - var a2229; - var a2230; - var a2231; - var a2232; - var a2233; - var a2234; - var a2235; - var a2236; - var a2237; - var a2238; - var a2239; - var a2240; - var a2241; - var a2242; - var a2243; - var a2244; - var a2245; - var a2246; - var a2247; - var a2248; - var a2249; - var a2250; - var a2251; - var a2252; - var a2253; - var a2254; - var a2255; - var a2256; - var a2257; - var a2258; - var a2259; - var a2260; - var a2261; - var a2262; - var a2263; - var a2264; - var a2265; - var a2266; - var a2267; - var a2268; - var a2269; - var a2270; - var a2271; - var a2272; - var a2273; - var a2274; - var a2275; - var a2276; - var a2277; - var a2278; - var a2279; - var a2280; - var a2281; - var a2282; - var a2283; - var a2284; - var a2285; - var a2286; - var a2287; - var a2288; - var a2289; - var a2290; - var a2291; - var a2292; - var a2293; - var a2294; - var a2295; - var a2296; - var a2297; - var a2298; - var a2299; - var a2300; - var a2301; - var a2302; - var a2303; - var a2304; - var a2305; - var a2306; - var a2307; - var a2308; - var a2309; - var a2310; - var a2311; - var a2312; - var a2313; - var a2314; - var a2315; - var a2316; - var a2317; - var a2318; - var a2319; - var a2320; - var a2321; - var a2322; - var a2323; - var a2324; - var a2325; - var a2326; - var a2327; - var a2328; - var a2329; - var a2330; - var a2331; - var a2332; - var a2333; - var a2334; - var a2335; - var a2336; - var a2337; - var a2338; - var a2339; - var a2340; - var a2341; - var a2342; - var a2343; - var a2344; - var a2345; - var a2346; - var a2347; - var a2348; - var a2349; - var a2350; - var a2351; - var a2352; - var a2353; - var a2354; - var a2355; - var a2356; - var a2357; - var a2358; - var a2359; - var a2360; - var a2361; - var a2362; - var a2363; - var a2364; - var a2365; - var a2366; - var a2367; - var a2368; - var a2369; - var a2370; - var a2371; - var a2372; - var a2373; - var a2374; - var a2375; - var a2376; - var a2377; - var a2378; - var a2379; - var a2380; - var a2381; - var a2382; - var a2383; - var a2384; - var a2385; - var a2386; - var a2387; - var a2388; - var a2389; - var a2390; - var a2391; - var a2392; - var a2393; - var a2394; - var a2395; - var a2396; - var a2397; - var a2398; - var a2399; - var a2400; - var a2401; - var a2402; - var a2403; - var a2404; - var a2405; - var a2406; - var a2407; - var a2408; - var a2409; - var a2410; - var a2411; - var a2412; - var a2413; - var a2414; - var a2415; - var a2416; - var a2417; - var a2418; - var a2419; - var a2420; - var a2421; - var a2422; - var a2423; - var a2424; - var a2425; - var a2426; - var a2427; - var a2428; - var a2429; - var a2430; - var a2431; - var a2432; - var a2433; - var a2434; - var a2435; - var a2436; - var a2437; - var a2438; - var a2439; - var a2440; - var a2441; - var a2442; - var a2443; - var a2444; - var a2445; - var a2446; - var a2447; - var a2448; - var a2449; - var a2450; - var a2451; - var a2452; - var a2453; - var a2454; - var a2455; - var a2456; - var a2457; - var a2458; - var a2459; - var a2460; - var a2461; - var a2462; - var a2463; - var a2464; - var a2465; - var a2466; - var a2467; - var a2468; - var a2469; - var a2470; - var a2471; - var a2472; - var a2473; - var a2474; - var a2475; - var a2476; - var a2477; - var a2478; - var a2479; - var a2480; - var a2481; - var a2482; - var a2483; - var a2484; - var a2485; - var a2486; - var a2487; - var a2488; - var a2489; - var a2490; - var a2491; - var a2492; - var a2493; - var a2494; - var a2495; - var a2496; - var a2497; - var a2498; - var a2499; - var a2500; - var a2501; - var a2502; - var a2503; - var a2504; - var a2505; - var a2506; - var a2507; - var a2508; - var a2509; - var a2510; - var a2511; - var a2512; - var a2513; - var a2514; - var a2515; - var a2516; - var a2517; - var a2518; - var a2519; - var a2520; - var a2521; - var a2522; - var a2523; - var a2524; - var a2525; - var a2526; - var a2527; - var a2528; - var a2529; - var a2530; - var a2531; - var a2532; - var a2533; - var a2534; - var a2535; - var a2536; - var a2537; - var a2538; - var a2539; - var a2540; - var a2541; - var a2542; - var a2543; - var a2544; - var a2545; - var a2546; - var a2547; - var a2548; - var a2549; - var a2550; - var a2551; - var a2552; - var a2553; - var a2554; - var a2555; - var a2556; - var a2557; - var a2558; - var a2559; - var a2560; - var a2561; - var a2562; - var a2563; - var a2564; - var a2565; - var a2566; - var a2567; - var a2568; - var a2569; - var a2570; - var a2571; - var a2572; - var a2573; - var a2574; - var a2575; - var a2576; - var a2577; - var a2578; - var a2579; - var a2580; - var a2581; - var a2582; - var a2583; - var a2584; - var a2585; - var a2586; - var a2587; - var a2588; - var a2589; - var a2590; - var a2591; - var a2592; - var a2593; - var a2594; - var a2595; - var a2596; - var a2597; - var a2598; - var a2599; - var a2600; - var a2601; - var a2602; - var a2603; - var a2604; - var a2605; - var a2606; - var a2607; - var a2608; - var a2609; - var a2610; - var a2611; - var a2612; - var a2613; - var a2614; - var a2615; - var a2616; - var a2617; - var a2618; - var a2619; - var a2620; - var a2621; - var a2622; - var a2623; - var a2624; - var a2625; - var a2626; - var a2627; - var a2628; - var a2629; - var a2630; - var a2631; - var a2632; - var a2633; - var a2634; - var a2635; - var a2636; - var a2637; - var a2638; - var a2639; - var a2640; - var a2641; - var a2642; - var a2643; - var a2644; - var a2645; - var a2646; - var a2647; - var a2648; - var a2649; - var a2650; - var a2651; - var a2652; - var a2653; - var a2654; - var a2655; - var a2656; - var a2657; - var a2658; - var a2659; - var a2660; - var a2661; - var a2662; - var a2663; - var a2664; - var a2665; - var a2666; - var a2667; - var a2668; - var a2669; - var a2670; - var a2671; - var a2672; - var a2673; - var a2674; - var a2675; - var a2676; - var a2677; - var a2678; - var a2679; - var a2680; - var a2681; - var a2682; - var a2683; - var a2684; - var a2685; - var a2686; - var a2687; - var a2688; - var a2689; - var a2690; - var a2691; - var a2692; - var a2693; - var a2694; - var a2695; - var a2696; - var a2697; - var a2698; - var a2699; - var a2700; - var a2701; - var a2702; - var a2703; - var a2704; - var a2705; - var a2706; - var a2707; - var a2708; - var a2709; - var a2710; - var a2711; - var a2712; - var a2713; - var a2714; - var a2715; - var a2716; - var a2717; - var a2718; - var a2719; - var a2720; - var a2721; - var a2722; - var a2723; - var a2724; - var a2725; - var a2726; - var a2727; - var a2728; - var a2729; - var a2730; - var a2731; - var a2732; - var a2733; - var a2734; - var a2735; - var a2736; - var a2737; - var a2738; - var a2739; - var a2740; - var a2741; - var a2742; - var a2743; - var a2744; - var a2745; - var a2746; - var a2747; - var a2748; - var a2749; - var a2750; - var a2751; - var a2752; - var a2753; - var a2754; - var a2755; - var a2756; - var a2757; - var a2758; - var a2759; - var a2760; - var a2761; - var a2762; - var a2763; - var a2764; - var a2765; - var a2766; - var a2767; - var a2768; - var a2769; - var a2770; - var a2771; - var a2772; - var a2773; - var a2774; - var a2775; - var a2776; - var a2777; - var a2778; - var a2779; - var a2780; - var a2781; - var a2782; - var a2783; - var a2784; - var a2785; - var a2786; - var a2787; - var a2788; - var a2789; - var a2790; - var a2791; - var a2792; - var a2793; - var a2794; - var a2795; - var a2796; - var a2797; - var a2798; - var a2799; - var a2800; - var a2801; - var a2802; - var a2803; - var a2804; - var a2805; - var a2806; - var a2807; - var a2808; - var a2809; - var a2810; - var a2811; - var a2812; - var a2813; - var a2814; - var a2815; - var a2816; - var a2817; - var a2818; - var a2819; - var a2820; - var a2821; - var a2822; - var a2823; - var a2824; - var a2825; - var a2826; - var a2827; - var a2828; - var a2829; - var a2830; - var a2831; - var a2832; - var a2833; - var a2834; - var a2835; - var a2836; - var a2837; - var a2838; - var a2839; - var a2840; - var a2841; - var a2842; - var a2843; - var a2844; - var a2845; - var a2846; - var a2847; - var a2848; - var a2849; - var a2850; - var a2851; - var a2852; - var a2853; - var a2854; - var a2855; - var a2856; - var a2857; - var a2858; - var a2859; - var a2860; - var a2861; - var a2862; - var a2863; - var a2864; - var a2865; - var a2866; - var a2867; - var a2868; - var a2869; - var a2870; - var a2871; - var a2872; - var a2873; - var a2874; - var a2875; - var a2876; - var a2877; - var a2878; - var a2879; - var a2880; - var a2881; - var a2882; - var a2883; - var a2884; - var a2885; - var a2886; - var a2887; - var a2888; - var a2889; - var a2890; - var a2891; - var a2892; - var a2893; - var a2894; - var a2895; - var a2896; - var a2897; - var a2898; - var a2899; - var a2900; - var a2901; - var a2902; - var a2903; - var a2904; - var a2905; - var a2906; - var a2907; - var a2908; - var a2909; - var a2910; - var a2911; - var a2912; - var a2913; - var a2914; - var a2915; - var a2916; - var a2917; - var a2918; - var a2919; - var a2920; - var a2921; - var a2922; - var a2923; - var a2924; - var a2925; - var a2926; - var a2927; - var a2928; - var a2929; - var a2930; - var a2931; - var a2932; - var a2933; - var a2934; - var a2935; - var a2936; - var a2937; - var a2938; - var a2939; - var a2940; - var a2941; - var a2942; - var a2943; - var a2944; - var a2945; - var a2946; - var a2947; - var a2948; - var a2949; - var a2950; - var a2951; - var a2952; - var a2953; - var a2954; - var a2955; - var a2956; - var a2957; - var a2958; - var a2959; - var a2960; - var a2961; - var a2962; - var a2963; - var a2964; - var a2965; - var a2966; - var a2967; - var a2968; - var a2969; - var a2970; - var a2971; - var a2972; - var a2973; - var a2974; - var a2975; - var a2976; - var a2977; - var a2978; - var a2979; - var a2980; - var a2981; - var a2982; - var a2983; - var a2984; - var a2985; - var a2986; - var a2987; - var a2988; - var a2989; - var a2990; - var a2991; - var a2992; - var a2993; - var a2994; - var a2995; - var a2996; - var a2997; - var a2998; - var a2999; - var a3000; - var a3001; - var a3002; - var a3003; - var a3004; - var a3005; - var a3006; - var a3007; - var a3008; - var a3009; - var a3010; - var a3011; - var a3012; - var a3013; - var a3014; - var a3015; - var a3016; - var a3017; - var a3018; - var a3019; - var a3020; - var a3021; - var a3022; - var a3023; - var a3024; - var a3025; - var a3026; - var a3027; - var a3028; - var a3029; - var a3030; - var a3031; - var a3032; - var a3033; - var a3034; - var a3035; - var a3036; - var a3037; - var a3038; - var a3039; - var a3040; - var a3041; - var a3042; - var a3043; - var a3044; - var a3045; - var a3046; - var a3047; - var a3048; - var a3049; - var a3050; - var a3051; - var a3052; - var a3053; - var a3054; - var a3055; - var a3056; - var a3057; - var a3058; - var a3059; - var a3060; - var a3061; - var a3062; - var a3063; - var a3064; - var a3065; - var a3066; - var a3067; - var a3068; - var a3069; - var a3070; - var a3071; - var a3072; - var a3073; - var a3074; - var a3075; - var a3076; - var a3077; - var a3078; - var a3079; - var a3080; - var a3081; - var a3082; - var a3083; - var a3084; - var a3085; - var a3086; - var a3087; - var a3088; - var a3089; - var a3090; - var a3091; - var a3092; - var a3093; - var a3094; - var a3095; - var a3096; - var a3097; - var a3098; - var a3099; - var a3100; - var a3101; - var a3102; - var a3103; - var a3104; - var a3105; - var a3106; - var a3107; - var a3108; - var a3109; - var a3110; - var a3111; - var a3112; - var a3113; - var a3114; - var a3115; - var a3116; - var a3117; - var a3118; - var a3119; - var a3120; - var a3121; - var a3122; - var a3123; - var a3124; - var a3125; - var a3126; - var a3127; - var a3128; - var a3129; - var a3130; - var a3131; - var a3132; - var a3133; - var a3134; - var a3135; - var a3136; - var a3137; - var a3138; - var a3139; - var a3140; - var a3141; - var a3142; - var a3143; - var a3144; - var a3145; - var a3146; - var a3147; - var a3148; - var a3149; - var a3150; - var a3151; - var a3152; - var a3153; - var a3154; - var a3155; - var a3156; - var a3157; - var a3158; - var a3159; - var a3160; - var a3161; - var a3162; - var a3163; - var a3164; - var a3165; - var a3166; - var a3167; - var a3168; - var a3169; - var a3170; - var a3171; - var a3172; - var a3173; - var a3174; - var a3175; - var a3176; - var a3177; - var a3178; - var a3179; - var a3180; - var a3181; - var a3182; - var a3183; - var a3184; - var a3185; - var a3186; - var a3187; - var a3188; - var a3189; - var a3190; - var a3191; - var a3192; - var a3193; - var a3194; - var a3195; - var a3196; - var a3197; - var a3198; - var a3199; - var a3200; - var a3201; - var a3202; - var a3203; - var a3204; - var a3205; - var a3206; - var a3207; - var a3208; - var a3209; - var a3210; - var a3211; - var a3212; - var a3213; - var a3214; - var a3215; - var a3216; - var a3217; - var a3218; - var a3219; - var a3220; - var a3221; - var a3222; - var a3223; - var a3224; - var a3225; - var a3226; - var a3227; - var a3228; - var a3229; - var a3230; - var a3231; - var a3232; - var a3233; - var a3234; - var a3235; - var a3236; - var a3237; - var a3238; - var a3239; - var a3240; - var a3241; - var a3242; - var a3243; - var a3244; - var a3245; - var a3246; - var a3247; - var a3248; - var a3249; - var a3250; - var a3251; - var a3252; - var a3253; - var a3254; - var a3255; - var a3256; - var a3257; - var a3258; - var a3259; - var a3260; - var a3261; - var a3262; - var a3263; - var a3264; - var a3265; - var a3266; - var a3267; - var a3268; - var a3269; - var a3270; - var a3271; - var a3272; - var a3273; - var a3274; - var a3275; - var a3276; - var a3277; - var a3278; - var a3279; - var a3280; - var a3281; - var a3282; - var a3283; - var a3284; - var a3285; - var a3286; - var a3287; - var a3288; - var a3289; - var a3290; - var a3291; - var a3292; - var a3293; - var a3294; - var a3295; - var a3296; - var a3297; - var a3298; - var a3299; - var a3300; - var a3301; - var a3302; - var a3303; - var a3304; - var a3305; - var a3306; - var a3307; - var a3308; - var a3309; - var a3310; - var a3311; - var a3312; - var a3313; - var a3314; - var a3315; - var a3316; - var a3317; - var a3318; - var a3319; - var a3320; - var a3321; - var a3322; - var a3323; - var a3324; - var a3325; - var a3326; - var a3327; - var a3328; - var a3329; - var a3330; - var a3331; - var a3332; - var a3333; - var a3334; - var a3335; - var a3336; - var a3337; - var a3338; - var a3339; - var a3340; - var a3341; - var a3342; - var a3343; - var a3344; - var a3345; - var a3346; - var a3347; - var a3348; - var a3349; - var a3350; - var a3351; - var a3352; - var a3353; - var a3354; - var a3355; - var a3356; - var a3357; - var a3358; - var a3359; - var a3360; - var a3361; - var a3362; - var a3363; - var a3364; - var a3365; - var a3366; - var a3367; - var a3368; - var a3369; - var a3370; - var a3371; - var a3372; - var a3373; - var a3374; - var a3375; - var a3376; - var a3377; - var a3378; - var a3379; - var a3380; - var a3381; - var a3382; - var a3383; - var a3384; - var a3385; - var a3386; - var a3387; - var a3388; - var a3389; - var a3390; - var a3391; - var a3392; - var a3393; - var a3394; - var a3395; - var a3396; - var a3397; - var a3398; - var a3399; - var a3400; - var a3401; - var a3402; - var a3403; - var a3404; - var a3405; - var a3406; - var a3407; - var a3408; - var a3409; - var a3410; - var a3411; - var a3412; - var a3413; - var a3414; - var a3415; - var a3416; - var a3417; - var a3418; - var a3419; - var a3420; - var a3421; - var a3422; - var a3423; - var a3424; - var a3425; - var a3426; - var a3427; - var a3428; - var a3429; - var a3430; - var a3431; - var a3432; - var a3433; - var a3434; - var a3435; - var a3436; - var a3437; - var a3438; - var a3439; - var a3440; - var a3441; - var a3442; - var a3443; - var a3444; - var a3445; - var a3446; - var a3447; - var a3448; - var a3449; - var a3450; - var a3451; - var a3452; - var a3453; - var a3454; - var a3455; - var a3456; - var a3457; - var a3458; - var a3459; - var a3460; - var a3461; - var a3462; - var a3463; - var a3464; - var a3465; - var a3466; - var a3467; - var a3468; - var a3469; - var a3470; - var a3471; - var a3472; - var a3473; - var a3474; - var a3475; - var a3476; - var a3477; - var a3478; - var a3479; - var a3480; - var a3481; - var a3482; - var a3483; - var a3484; - var a3485; - var a3486; - var a3487; - var a3488; - var a3489; - var a3490; - var a3491; - var a3492; - var a3493; - var a3494; - var a3495; - var a3496; - var a3497; - var a3498; - var a3499; - var a3500; - var a3501; - var a3502; - var a3503; - var a3504; - var a3505; - var a3506; - var a3507; - var a3508; - var a3509; - var a3510; - var a3511; - var a3512; - var a3513; - var a3514; - var a3515; - var a3516; - var a3517; - var a3518; - var a3519; - var a3520; - var a3521; - var a3522; - var a3523; - var a3524; - var a3525; - var a3526; - var a3527; - var a3528; - var a3529; - var a3530; - var a3531; - var a3532; - var a3533; - var a3534; - var a3535; - var a3536; - var a3537; - var a3538; - var a3539; - var a3540; - var a3541; - var a3542; - var a3543; - var a3544; - var a3545; - var a3546; - var a3547; - var a3548; - var a3549; - var a3550; - var a3551; - var a3552; - var a3553; - var a3554; - var a3555; - var a3556; - var a3557; - var a3558; - var a3559; - var a3560; - var a3561; - var a3562; - var a3563; - var a3564; - var a3565; - var a3566; - var a3567; - var a3568; - var a3569; - var a3570; - var a3571; - var a3572; - var a3573; - var a3574; - var a3575; - var a3576; - var a3577; - var a3578; - var a3579; - var a3580; - var a3581; - var a3582; - var a3583; - var a3584; - var a3585; - var a3586; - var a3587; - var a3588; - var a3589; - var a3590; - var a3591; - var a3592; - var a3593; - var a3594; - var a3595; - var a3596; - var a3597; - var a3598; - var a3599; - var a3600; - var a3601; - var a3602; - var a3603; - var a3604; - var a3605; - var a3606; - var a3607; - var a3608; - var a3609; - var a3610; - var a3611; - var a3612; - var a3613; - var a3614; - var a3615; - var a3616; - var a3617; - var a3618; - var a3619; - var a3620; - var a3621; - var a3622; - var a3623; - var a3624; - var a3625; - var a3626; - var a3627; - var a3628; - var a3629; - var a3630; - var a3631; - var a3632; - var a3633; - var a3634; - var a3635; - var a3636; - var a3637; - var a3638; - var a3639; - var a3640; - var a3641; - var a3642; - var a3643; - var a3644; - var a3645; - var a3646; - var a3647; - var a3648; - var a3649; - var a3650; - var a3651; - var a3652; - var a3653; - var a3654; - var a3655; - var a3656; - var a3657; - var a3658; - var a3659; - var a3660; - var a3661; - var a3662; - var a3663; - var a3664; - var a3665; - var a3666; - var a3667; - var a3668; - var a3669; - var a3670; - var a3671; - var a3672; - var a3673; - var a3674; - var a3675; - var a3676; - var a3677; - var a3678; - var a3679; - var a3680; - var a3681; - var a3682; - var a3683; - var a3684; - var a3685; - var a3686; - var a3687; - var a3688; - var a3689; - var a3690; - var a3691; - var a3692; - var a3693; - var a3694; - var a3695; - var a3696; - var a3697; - var a3698; - var a3699; - var a3700; - var a3701; - var a3702; - var a3703; - var a3704; - var a3705; - var a3706; - var a3707; - var a3708; - var a3709; - var a3710; - var a3711; - var a3712; - var a3713; - var a3714; - var a3715; - var a3716; - var a3717; - var a3718; - var a3719; - var a3720; - var a3721; - var a3722; - var a3723; - var a3724; - var a3725; - var a3726; - var a3727; - var a3728; - var a3729; - var a3730; - var a3731; - var a3732; - var a3733; - var a3734; - var a3735; - var a3736; - var a3737; - var a3738; - var a3739; - var a3740; - var a3741; - var a3742; - var a3743; - var a3744; - var a3745; - var a3746; - var a3747; - var a3748; - var a3749; - var a3750; - var a3751; - var a3752; - var a3753; - var a3754; - var a3755; - var a3756; - var a3757; - var a3758; - var a3759; - var a3760; - var a3761; - var a3762; - var a3763; - var a3764; - var a3765; - var a3766; - var a3767; - var a3768; - var a3769; - var a3770; - var a3771; - var a3772; - var a3773; - var a3774; - var a3775; - var a3776; - var a3777; - var a3778; - var a3779; - var a3780; - var a3781; - var a3782; - var a3783; - var a3784; - var a3785; - var a3786; - var a3787; - var a3788; - var a3789; - var a3790; - var a3791; - var a3792; - var a3793; - var a3794; - var a3795; - var a3796; - var a3797; - var a3798; - var a3799; - var a3800; - var a3801; - var a3802; - var a3803; - var a3804; - var a3805; - var a3806; - var a3807; - var a3808; - var a3809; - var a3810; - var a3811; - var a3812; - var a3813; - var a3814; - var a3815; - var a3816; - var a3817; - var a3818; - var a3819; - var a3820; - var a3821; - var a3822; - var a3823; - var a3824; - var a3825; - var a3826; - var a3827; - var a3828; - var a3829; - var a3830; - var a3831; - var a3832; - var a3833; - var a3834; - var a3835; - var a3836; - var a3837; - var a3838; - var a3839; - var a3840; - var a3841; - var a3842; - var a3843; - var a3844; - var a3845; - var a3846; - var a3847; - var a3848; - var a3849; - var a3850; - var a3851; - var a3852; - var a3853; - var a3854; - var a3855; - var a3856; - var a3857; - var a3858; - var a3859; - var a3860; - var a3861; - var a3862; - var a3863; - var a3864; - var a3865; - var a3866; - var a3867; - var a3868; - var a3869; - var a3870; - var a3871; - var a3872; - var a3873; - var a3874; - var a3875; - var a3876; - var a3877; - var a3878; - var a3879; - var a3880; - var a3881; - var a3882; - var a3883; - var a3884; - var a3885; - var a3886; - var a3887; - var a3888; - var a3889; - var a3890; - var a3891; - var a3892; - var a3893; - var a3894; - var a3895; - var a3896; - var a3897; - var a3898; - var a3899; - var a3900; - var a3901; - var a3902; - var a3903; - var a3904; - var a3905; - var a3906; - var a3907; - var a3908; - var a3909; - var a3910; - var a3911; - var a3912; - var a3913; - var a3914; - var a3915; - var a3916; - var a3917; - var a3918; - var a3919; - var a3920; - var a3921; - var a3922; - var a3923; - var a3924; - var a3925; - var a3926; - var a3927; - var a3928; - var a3929; - var a3930; - var a3931; - var a3932; - var a3933; - var a3934; - var a3935; - var a3936; - var a3937; - var a3938; - var a3939; - var a3940; - var a3941; - var a3942; - var a3943; - var a3944; - var a3945; - var a3946; - var a3947; - var a3948; - var a3949; - var a3950; - var a3951; - var a3952; - var a3953; - var a3954; - var a3955; - var a3956; - var a3957; - var a3958; - var a3959; - var a3960; - var a3961; - var a3962; - var a3963; - var a3964; - var a3965; - var a3966; - var a3967; - var a3968; - var a3969; - var a3970; - var a3971; - var a3972; - var a3973; - var a3974; - var a3975; - var a3976; - var a3977; - var a3978; - var a3979; - var a3980; - var a3981; - var a3982; - var a3983; - var a3984; - var a3985; - var a3986; - var a3987; - var a3988; - var a3989; - var a3990; - var a3991; - var a3992; - var a3993; - var a3994; - var a3995; - var a3996; - var a3997; - var a3998; - var a3999; - var a4000; - var a4001; - var a4002; - var a4003; - var a4004; - var a4005; - var a4006; - var a4007; - var a4008; - var a4009; - var a4010; - var a4011; - var a4012; - var a4013; - var a4014; - var a4015; - var a4016; - var a4017; - var a4018; - var a4019; - var a4020; - var a4021; - var a4022; - var a4023; - var a4024; - var a4025; - var a4026; - var a4027; - var a4028; - var a4029; - var a4030; - var a4031; - var a4032; - var a4033; - var a4034; - var a4035; - var a4036; - var a4037; - var a4038; - var a4039; - var a4040; - var a4041; - var a4042; - var a4043; - var a4044; - var a4045; - var a4046; - var a4047; - var a4048; - var a4049; - var a4050; - var a4051; - var a4052; - var a4053; - var a4054; - var a4055; - var a4056; - var a4057; - var a4058; - var a4059; - var a4060; - var a4061; - var a4062; - var a4063; - var a4064; - var a4065; - var a4066; - var a4067; - var a4068; - var a4069; - var a4070; - var a4071; - var a4072; - var a4073; - var a4074; - var a4075; - var a4076; - var a4077; - var a4078; - var a4079; - var a4080; - var a4081; - var a4082; - var a4083; - var a4084; - var a4085; - var a4086; - var a4087; - var a4088; - var a4089; - var a4090; - var a4091; - var a4092; - var a4093; - var a4094; - var a4095; - var a4096; - var a4097; - var a4098; - var a4099; - var a4100; - var a4101; - var a4102; - var a4103; - var a4104; - var a4105; - var a4106; - var a4107; - var a4108; - var a4109; - var a4110; - var a4111; - var a4112; - var a4113; - var a4114; - var a4115; - var a4116; - var a4117; - var a4118; - var a4119; - var a4120; - var a4121; - var a4122; - var a4123; - var a4124; - var a4125; - var a4126; - var a4127; - var a4128; - var a4129; - var a4130; - var a4131; - var a4132; - var a4133; - var a4134; - var a4135; - var a4136; - var a4137; - var a4138; - var a4139; - var a4140; - var a4141; - var a4142; - var a4143; - var a4144; - var a4145; - var a4146; - var a4147; - var a4148; - var a4149; - var a4150; - var a4151; - var a4152; - var a4153; - var a4154; - var a4155; - var a4156; - var a4157; - var a4158; - var a4159; - var a4160; - var a4161; - var a4162; - var a4163; - var a4164; - var a4165; - var a4166; - var a4167; - var a4168; - var a4169; - var a4170; - var a4171; - var a4172; - var a4173; - var a4174; - var a4175; - var a4176; - var a4177; - var a4178; - var a4179; - var a4180; - var a4181; - var a4182; - var a4183; - var a4184; - var a4185; - var a4186; - var a4187; - var a4188; - var a4189; - var a4190; - var a4191; - var a4192; - var a4193; - var a4194; - var a4195; - var a4196; - var a4197; - var a4198; - var a4199; - var a4200; - var a4201; - var a4202; - var a4203; - var a4204; - var a4205; - var a4206; - var a4207; - var a4208; - var a4209; - var a4210; - var a4211; - var a4212; - var a4213; - var a4214; - var a4215; - var a4216; - var a4217; - var a4218; - var a4219; - var a4220; - var a4221; - var a4222; - var a4223; - var a4224; - var a4225; - var a4226; - var a4227; - var a4228; - var a4229; - var a4230; - var a4231; - var a4232; - var a4233; - var a4234; - var a4235; - var a4236; - var a4237; - var a4238; - var a4239; - var a4240; - var a4241; - var a4242; - var a4243; - var a4244; - var a4245; - var a4246; - var a4247; - var a4248; - var a4249; - var a4250; - var a4251; - var a4252; - var a4253; - var a4254; - var a4255; - var a4256; - var a4257; - var a4258; - var a4259; - var a4260; - var a4261; - var a4262; - var a4263; - var a4264; - var a4265; - var a4266; - var a4267; - var a4268; - var a4269; - var a4270; - var a4271; - var a4272; - var a4273; - var a4274; - var a4275; - var a4276; - var a4277; - var a4278; - var a4279; - var a4280; - var a4281; - var a4282; - var a4283; - var a4284; - var a4285; - var a4286; - var a4287; - var a4288; - var a4289; - var a4290; - var a4291; - var a4292; - var a4293; - var a4294; - var a4295; - var a4296; - var a4297; - var a4298; - var a4299; - var a4300; - var a4301; - var a4302; - var a4303; - var a4304; - var a4305; - var a4306; - var a4307; - var a4308; - var a4309; - var a4310; - var a4311; - var a4312; - var a4313; - var a4314; - var a4315; - var a4316; - var a4317; - var a4318; - var a4319; - var a4320; - var a4321; - var a4322; - var a4323; - var a4324; - var a4325; - var a4326; - var a4327; - var a4328; - var a4329; - var a4330; - var a4331; - var a4332; - var a4333; - var a4334; - var a4335; - var a4336; - var a4337; - var a4338; - var a4339; - var a4340; - var a4341; - var a4342; - var a4343; - var a4344; - var a4345; - var a4346; - var a4347; - var a4348; - var a4349; - var a4350; - var a4351; - var a4352; - var a4353; - var a4354; - var a4355; - var a4356; - var a4357; - var a4358; - var a4359; - var a4360; - var a4361; - var a4362; - var a4363; - var a4364; - var a4365; - var a4366; - var a4367; - var a4368; - var a4369; - var a4370; - var a4371; - var a4372; - var a4373; - var a4374; - var a4375; - var a4376; - var a4377; - var a4378; - var a4379; - var a4380; - var a4381; - var a4382; - var a4383; - var a4384; - var a4385; - var a4386; - var a4387; - var a4388; - var a4389; - var a4390; - var a4391; - var a4392; - var a4393; - var a4394; - var a4395; - var a4396; - var a4397; - var a4398; - var a4399; - var a4400; - var a4401; - var a4402; - var a4403; - var a4404; - var a4405; - var a4406; - var a4407; - var a4408; - var a4409; - var a4410; - var a4411; - var a4412; - var a4413; - var a4414; - var a4415; - var a4416; - var a4417; - var a4418; - var a4419; - var a4420; - var a4421; - var a4422; - var a4423; - var a4424; - var a4425; - var a4426; - var a4427; - var a4428; - var a4429; - var a4430; - var a4431; - var a4432; - var a4433; - var a4434; - var a4435; - var a4436; - var a4437; - var a4438; - var a4439; - var a4440; - var a4441; - var a4442; - var a4443; - var a4444; - var a4445; - var a4446; - var a4447; - var a4448; - var a4449; - var a4450; - var a4451; - var a4452; - var a4453; - var a4454; - var a4455; - var a4456; - var a4457; - var a4458; - var a4459; - var a4460; - var a4461; - var a4462; - var a4463; - var a4464; - var a4465; - var a4466; - var a4467; - var a4468; - var a4469; - var a4470; - var a4471; - var a4472; - var a4473; - var a4474; - var a4475; - var a4476; - var a4477; - var a4478; - var a4479; - var a4480; - var a4481; - var a4482; - var a4483; - var a4484; - var a4485; - var a4486; - var a4487; - var a4488; - var a4489; - var a4490; - var a4491; - var a4492; - var a4493; - var a4494; - var a4495; - var a4496; - var a4497; - var a4498; - var a4499; - var a4500; - var a4501; - var a4502; - var a4503; - var a4504; - var a4505; - var a4506; - var a4507; - var a4508; - var a4509; - var a4510; - var a4511; - var a4512; - var a4513; - var a4514; - var a4515; - var a4516; - var a4517; - var a4518; - var a4519; - var a4520; - var a4521; - var a4522; - var a4523; - var a4524; - var a4525; - var a4526; - var a4527; - var a4528; - var a4529; - var a4530; - var a4531; - var a4532; - var a4533; - var a4534; - var a4535; - var a4536; - var a4537; - var a4538; - var a4539; - var a4540; - var a4541; - var a4542; - var a4543; - var a4544; - var a4545; - var a4546; - var a4547; - var a4548; - var a4549; - var a4550; - var a4551; - var a4552; - var a4553; - var a4554; - var a4555; - var a4556; - var a4557; - var a4558; - var a4559; - var a4560; - var a4561; - var a4562; - var a4563; - var a4564; - var a4565; - var a4566; - var a4567; - var a4568; - var a4569; - var a4570; - var a4571; - var a4572; - var a4573; - var a4574; - var a4575; - var a4576; - var a4577; - var a4578; - var a4579; - var a4580; - var a4581; - var a4582; - var a4583; - var a4584; - var a4585; - var a4586; - var a4587; - var a4588; - var a4589; - var a4590; - var a4591; - var a4592; - var a4593; - var a4594; - var a4595; - var a4596; - var a4597; - var a4598; - var a4599; - var a4600; - var a4601; - var a4602; - var a4603; - var a4604; - var a4605; - var a4606; - var a4607; - var a4608; - var a4609; - var a4610; - var a4611; - var a4612; - var a4613; - var a4614; - var a4615; - var a4616; - var a4617; - var a4618; - var a4619; - var a4620; - var a4621; - var a4622; - var a4623; - var a4624; - var a4625; - var a4626; - var a4627; - var a4628; - var a4629; - var a4630; - var a4631; - var a4632; - var a4633; - var a4634; - var a4635; - var a4636; - var a4637; - var a4638; - var a4639; - var a4640; - var a4641; - var a4642; - var a4643; - var a4644; - var a4645; - var a4646; - var a4647; - var a4648; - var a4649; - var a4650; - var a4651; - var a4652; - var a4653; - var a4654; - var a4655; - var a4656; - var a4657; - var a4658; - var a4659; - var a4660; - var a4661; - var a4662; - var a4663; - var a4664; - var a4665; - var a4666; - var a4667; - var a4668; - var a4669; - var a4670; - var a4671; - var a4672; - var a4673; - var a4674; - var a4675; - var a4676; - var a4677; - var a4678; - var a4679; - var a4680; - var a4681; - var a4682; - var a4683; - var a4684; - var a4685; - var a4686; - var a4687; - var a4688; - var a4689; - var a4690; - var a4691; - var a4692; - var a4693; - var a4694; - var a4695; - var a4696; - var a4697; - var a4698; - var a4699; - var a4700; - var a4701; - var a4702; - var a4703; - var a4704; - var a4705; - var a4706; - var a4707; - var a4708; - var a4709; - var a4710; - var a4711; - var a4712; - var a4713; - var a4714; - var a4715; - var a4716; - var a4717; - var a4718; - var a4719; - var a4720; - var a4721; - var a4722; - var a4723; - var a4724; - var a4725; - var a4726; - var a4727; - var a4728; - var a4729; - var a4730; - var a4731; - var a4732; - var a4733; - var a4734; - var a4735; - var a4736; - var a4737; - var a4738; - var a4739; - var a4740; - var a4741; - var a4742; - var a4743; - var a4744; - var a4745; - var a4746; - var a4747; - var a4748; - var a4749; - var a4750; - var a4751; - var a4752; - var a4753; - var a4754; - var a4755; - var a4756; - var a4757; - var a4758; - var a4759; - var a4760; - var a4761; - var a4762; - var a4763; - var a4764; - var a4765; - var a4766; - var a4767; - var a4768; - var a4769; - var a4770; - var a4771; - var a4772; - var a4773; - var a4774; - var a4775; - var a4776; - var a4777; - var a4778; - var a4779; - var a4780; - var a4781; - var a4782; - var a4783; - var a4784; - var a4785; - var a4786; - var a4787; - var a4788; - var a4789; - var a4790; - var a4791; - var a4792; - var a4793; - var a4794; - var a4795; - var a4796; - var a4797; - var a4798; - var a4799; - var a4800; - var a4801; - var a4802; - var a4803; - var a4804; - var a4805; - var a4806; - var a4807; - var a4808; - var a4809; - var a4810; - var a4811; - var a4812; - var a4813; - var a4814; - var a4815; - var a4816; - var a4817; - var a4818; - var a4819; - var a4820; - var a4821; - var a4822; - var a4823; - var a4824; - var a4825; - var a4826; - var a4827; - var a4828; - var a4829; - var a4830; - var a4831; - var a4832; - var a4833; - var a4834; - var a4835; - var a4836; - var a4837; - var a4838; - var a4839; - var a4840; - var a4841; - var a4842; - var a4843; - var a4844; - var a4845; - var a4846; - var a4847; - var a4848; - var a4849; - var a4850; - var a4851; - var a4852; - var a4853; - var a4854; - var a4855; - var a4856; - var a4857; - var a4858; - var a4859; - var a4860; - var a4861; - var a4862; - var a4863; - var a4864; - var a4865; - var a4866; - var a4867; - var a4868; - var a4869; - var a4870; - var a4871; - var a4872; - var a4873; - var a4874; - var a4875; - var a4876; - var a4877; - var a4878; - var a4879; - var a4880; - var a4881; - var a4882; - var a4883; - var a4884; - var a4885; - var a4886; - var a4887; - var a4888; - var a4889; - var a4890; - var a4891; - var a4892; - var a4893; - var a4894; - var a4895; - var a4896; - var a4897; - var a4898; - var a4899; - var a4900; - var a4901; - var a4902; - var a4903; - var a4904; - var a4905; - var a4906; - var a4907; - var a4908; - var a4909; - var a4910; - var a4911; - var a4912; - var a4913; - var a4914; - var a4915; - var a4916; - var a4917; - var a4918; - var a4919; - var a4920; - var a4921; - var a4922; - var a4923; - var a4924; - var a4925; - var a4926; - var a4927; - var a4928; - var a4929; - var a4930; - var a4931; - var a4932; - var a4933; - var a4934; - var a4935; - var a4936; - var a4937; - var a4938; - var a4939; - var a4940; - var a4941; - var a4942; - var a4943; - var a4944; - var a4945; - var a4946; - var a4947; - var a4948; - var a4949; - var a4950; - var a4951; - var a4952; - var a4953; - var a4954; - var a4955; - var a4956; - var a4957; - var a4958; - var a4959; - var a4960; - var a4961; - var a4962; - var a4963; - var a4964; - var a4965; - var a4966; - var a4967; - var a4968; - var a4969; - var a4970; - var a4971; - var a4972; - var a4973; - var a4974; - var a4975; - var a4976; - var a4977; - var a4978; - var a4979; - var a4980; - var a4981; - var a4982; - var a4983; - var a4984; - var a4985; - var a4986; - var a4987; - var a4988; - var a4989; - var a4990; - var a4991; - var a4992; - var a4993; - var a4994; - var a4995; - var a4996; - var a4997; - var a4998; - var a4999; - var a5000; - var a5001; - var a5002; - var a5003; - var a5004; - var a5005; - var a5006; - var a5007; - var a5008; - var a5009; - var a5010; - var a5011; - var a5012; - var a5013; - var a5014; - var a5015; - var a5016; - var a5017; - var a5018; - var a5019; - var a5020; - var a5021; - var a5022; - var a5023; - var a5024; - var a5025; - var a5026; - var a5027; - var a5028; - var a5029; - var a5030; - var a5031; - var a5032; - var a5033; - var a5034; - var a5035; - var a5036; - var a5037; - var a5038; - var a5039; - var a5040; - var a5041; - var a5042; - var a5043; - var a5044; - var a5045; - var a5046; - var a5047; - var a5048; - var a5049; - var a5050; - var a5051; - var a5052; - var a5053; - var a5054; - var a5055; - var a5056; - var a5057; - var a5058; - var a5059; - var a5060; - var a5061; - var a5062; - var a5063; - var a5064; - var a5065; - var a5066; - var a5067; - var a5068; - var a5069; - var a5070; - var a5071; - var a5072; - var a5073; - var a5074; - var a5075; - var a5076; - var a5077; - var a5078; - var a5079; - var a5080; - var a5081; - var a5082; - var a5083; - var a5084; - var a5085; - var a5086; - var a5087; - var a5088; - var a5089; - var a5090; - var a5091; - var a5092; - var a5093; - var a5094; - var a5095; - var a5096; - var a5097; - var a5098; - var a5099; - var a5100; - var a5101; - var a5102; - var a5103; - var a5104; - var a5105; - var a5106; - var a5107; - var a5108; - var a5109; - var a5110; - var a5111; - var a5112; - var a5113; - var a5114; - var a5115; - var a5116; - var a5117; - var a5118; - var a5119; - var a5120; - var a5121; - var a5122; - var a5123; - var a5124; - var a5125; - var a5126; - var a5127; - var a5128; - var a5129; - var a5130; - var a5131; - var a5132; - var a5133; - var a5134; - var a5135; - var a5136; - var a5137; - var a5138; - var a5139; - var a5140; - var a5141; - var a5142; - var a5143; - var a5144; - var a5145; - var a5146; - var a5147; - var a5148; - var a5149; - var a5150; - var a5151; - var a5152; - var a5153; - var a5154; - var a5155; - var a5156; - var a5157; - var a5158; - var a5159; - var a5160; - var a5161; - var a5162; - var a5163; - var a5164; - var a5165; - var a5166; - var a5167; - var a5168; - var a5169; - var a5170; - var a5171; - var a5172; - var a5173; - var a5174; - var a5175; - var a5176; - var a5177; - var a5178; - var a5179; - var a5180; - var a5181; - var a5182; - var a5183; - var a5184; - var a5185; - var a5186; - var a5187; - var a5188; - var a5189; - var a5190; - var a5191; - var a5192; - var a5193; - var a5194; - var a5195; - var a5196; - var a5197; - var a5198; - var a5199; - var a5200; - var a5201; - var a5202; - var a5203; - var a5204; - var a5205; - var a5206; - var a5207; - var a5208; - var a5209; - var a5210; - var a5211; - var a5212; - var a5213; - var a5214; - var a5215; - var a5216; - var a5217; - var a5218; - var a5219; - var a5220; - var a5221; - var a5222; - var a5223; - var a5224; - var a5225; - var a5226; - var a5227; - var a5228; - var a5229; - var a5230; - var a5231; - var a5232; - var a5233; - var a5234; - var a5235; - var a5236; - var a5237; - var a5238; - var a5239; - var a5240; - var a5241; - var a5242; - var a5243; - var a5244; - var a5245; - var a5246; - var a5247; - var a5248; - var a5249; - var a5250; - var a5251; - var a5252; - var a5253; - var a5254; - var a5255; - var a5256; - var a5257; - var a5258; - var a5259; - var a5260; - var a5261; - var a5262; - var a5263; - var a5264; - var a5265; - var a5266; - var a5267; - var a5268; - var a5269; - var a5270; - var a5271; - var a5272; - var a5273; - var a5274; - var a5275; - var a5276; - var a5277; - var a5278; - var a5279; - var a5280; - var a5281; - var a5282; - var a5283; - var a5284; - var a5285; - var a5286; - var a5287; - var a5288; - var a5289; - var a5290; - var a5291; - var a5292; - var a5293; - var a5294; - var a5295; - var a5296; - var a5297; - var a5298; - var a5299; - var a5300; - var a5301; - var a5302; - var a5303; - var a5304; - var a5305; - var a5306; - var a5307; - var a5308; - var a5309; - var a5310; - var a5311; - var a5312; - var a5313; - var a5314; - var a5315; - var a5316; - var a5317; - var a5318; - var a5319; - var a5320; - var a5321; - var a5322; - var a5323; - var a5324; - var a5325; - var a5326; - var a5327; - var a5328; - var a5329; - var a5330; - var a5331; - var a5332; - var a5333; - var a5334; - var a5335; - var a5336; - var a5337; - var a5338; - var a5339; - var a5340; - var a5341; - var a5342; - var a5343; - var a5344; - var a5345; - var a5346; - var a5347; - var a5348; - var a5349; - var a5350; - var a5351; - var a5352; - var a5353; - var a5354; - var a5355; - var a5356; - var a5357; - var a5358; - var a5359; - var a5360; - var a5361; - var a5362; - var a5363; - var a5364; - var a5365; - var a5366; - var a5367; - var a5368; - var a5369; - var a5370; - var a5371; - var a5372; - var a5373; - var a5374; - var a5375; - var a5376; - var a5377; - var a5378; - var a5379; - var a5380; - var a5381; - var a5382; - var a5383; - var a5384; - var a5385; - var a5386; - var a5387; - var a5388; - var a5389; - var a5390; - var a5391; - var a5392; - var a5393; - var a5394; - var a5395; - var a5396; - var a5397; - var a5398; - var a5399; - var a5400; - var a5401; - var a5402; - var a5403; - var a5404; - var a5405; - var a5406; - var a5407; - var a5408; - var a5409; - var a5410; - var a5411; - var a5412; - var a5413; - var a5414; - var a5415; - var a5416; - var a5417; - var a5418; - var a5419; - var a5420; - var a5421; - var a5422; - var a5423; - var a5424; - var a5425; - var a5426; - var a5427; - var a5428; - var a5429; - var a5430; - var a5431; - var a5432; - var a5433; - var a5434; - var a5435; - var a5436; - var a5437; - var a5438; - var a5439; - var a5440; - var a5441; - var a5442; - var a5443; - var a5444; - var a5445; - var a5446; - var a5447; - var a5448; - var a5449; - var a5450; - var a5451; - var a5452; - var a5453; - var a5454; - var a5455; - var a5456; - var a5457; - var a5458; - var a5459; - var a5460; - var a5461; - var a5462; - var a5463; - var a5464; - var a5465; - var a5466; - var a5467; - var a5468; - var a5469; - var a5470; - var a5471; - var a5472; - var a5473; - var a5474; - var a5475; - var a5476; - var a5477; - var a5478; - var a5479; - var a5480; - var a5481; - var a5482; - var a5483; - var a5484; - var a5485; - var a5486; - var a5487; - var a5488; - var a5489; - var a5490; - var a5491; - var a5492; - var a5493; - var a5494; - var a5495; - var a5496; - var a5497; - var a5498; - var a5499; - var a5500; - var a5501; - var a5502; - var a5503; - var a5504; - var a5505; - var a5506; - var a5507; - var a5508; - var a5509; - var a5510; - var a5511; - var a5512; - var a5513; - var a5514; - var a5515; - var a5516; - var a5517; - var a5518; - var a5519; - var a5520; - var a5521; - var a5522; - var a5523; - var a5524; - var a5525; - var a5526; - var a5527; - var a5528; - var a5529; - var a5530; - var a5531; - var a5532; - var a5533; - var a5534; - var a5535; - var a5536; - var a5537; - var a5538; - var a5539; - var a5540; - var a5541; - var a5542; - var a5543; - var a5544; - var a5545; - var a5546; - var a5547; - var a5548; - var a5549; - var a5550; - var a5551; - var a5552; - var a5553; - var a5554; - var a5555; - var a5556; - var a5557; - var a5558; - var a5559; - var a5560; - var a5561; - var a5562; - var a5563; - var a5564; - var a5565; - var a5566; - var a5567; - var a5568; - var a5569; - var a5570; - var a5571; - var a5572; - var a5573; - var a5574; - var a5575; - var a5576; - var a5577; - var a5578; - var a5579; - var a5580; - var a5581; - var a5582; - var a5583; - var a5584; - var a5585; - var a5586; - var a5587; - var a5588; - var a5589; - var a5590; - var a5591; - var a5592; - var a5593; - var a5594; - var a5595; - var a5596; - var a5597; - var a5598; - var a5599; - var a5600; - var a5601; - var a5602; - var a5603; - var a5604; - var a5605; - var a5606; - var a5607; - var a5608; - var a5609; - var a5610; - var a5611; - var a5612; - var a5613; - var a5614; - var a5615; - var a5616; - var a5617; - var a5618; - var a5619; - var a5620; - var a5621; - var a5622; - var a5623; - var a5624; - var a5625; - var a5626; - var a5627; - var a5628; - var a5629; - var a5630; - var a5631; - var a5632; - var a5633; - var a5634; - var a5635; - var a5636; - var a5637; - var a5638; - var a5639; - var a5640; - var a5641; - var a5642; - var a5643; - var a5644; - var a5645; - var a5646; - var a5647; - var a5648; - var a5649; - var a5650; - var a5651; - var a5652; - var a5653; - var a5654; - var a5655; - var a5656; - var a5657; - var a5658; - var a5659; - var a5660; - var a5661; - var a5662; - var a5663; - var a5664; - var a5665; - var a5666; - var a5667; - var a5668; - var a5669; - var a5670; - var a5671; - var a5672; - var a5673; - var a5674; - var a5675; - var a5676; - var a5677; - var a5678; - var a5679; - var a5680; - var a5681; - var a5682; - var a5683; - var a5684; - var a5685; - var a5686; - var a5687; - var a5688; - var a5689; - var a5690; - var a5691; - var a5692; - var a5693; - var a5694; - var a5695; - var a5696; - var a5697; - var a5698; - var a5699; - var a5700; - var a5701; - var a5702; - var a5703; - var a5704; - var a5705; - var a5706; - var a5707; - var a5708; - var a5709; - var a5710; - var a5711; - var a5712; - var a5713; - var a5714; - var a5715; - var a5716; - var a5717; - var a5718; - var a5719; - var a5720; - var a5721; - var a5722; - var a5723; - var a5724; - var a5725; - var a5726; - var a5727; - var a5728; - var a5729; - var a5730; - var a5731; - var a5732; - var a5733; - var a5734; - var a5735; - var a5736; - var a5737; - var a5738; - var a5739; - var a5740; - var a5741; - var a5742; - var a5743; - var a5744; - var a5745; - var a5746; - var a5747; - var a5748; - var a5749; - var a5750; - var a5751; - var a5752; - var a5753; - var a5754; - var a5755; - var a5756; - var a5757; - var a5758; - var a5759; - var a5760; - var a5761; - var a5762; - var a5763; - var a5764; - var a5765; - var a5766; - var a5767; - var a5768; - var a5769; - var a5770; - var a5771; - var a5772; - var a5773; - var a5774; - var a5775; - var a5776; - var a5777; - var a5778; - var a5779; - var a5780; - var a5781; - var a5782; - var a5783; - var a5784; - var a5785; - var a5786; - var a5787; - var a5788; - var a5789; - var a5790; - var a5791; - var a5792; - var a5793; - var a5794; - var a5795; - var a5796; - var a5797; - var a5798; - var a5799; - var a5800; - var a5801; - var a5802; - var a5803; - var a5804; - var a5805; - var a5806; - var a5807; - var a5808; - var a5809; - var a5810; - var a5811; - var a5812; - var a5813; - var a5814; - var a5815; - var a5816; - var a5817; - var a5818; - var a5819; - var a5820; - var a5821; - var a5822; - var a5823; - var a5824; - var a5825; - var a5826; - var a5827; - var a5828; - var a5829; - var a5830; - var a5831; - var a5832; - var a5833; - var a5834; - var a5835; - var a5836; - var a5837; - var a5838; - var a5839; - var a5840; - var a5841; - var a5842; - var a5843; - var a5844; - var a5845; - var a5846; - var a5847; - var a5848; - var a5849; - var a5850; - var a5851; - var a5852; - var a5853; - var a5854; - var a5855; - var a5856; - var a5857; - var a5858; - var a5859; - var a5860; - var a5861; - var a5862; - var a5863; - var a5864; - var a5865; - var a5866; - var a5867; - var a5868; - var a5869; - var a5870; - var a5871; - var a5872; - var a5873; - var a5874; - var a5875; - var a5876; - var a5877; - var a5878; - var a5879; - var a5880; - var a5881; - var a5882; - var a5883; - var a5884; - var a5885; - var a5886; - var a5887; - var a5888; - var a5889; - var a5890; - var a5891; - var a5892; - var a5893; - var a5894; - var a5895; - var a5896; - var a5897; - var a5898; - var a5899; - var a5900; - var a5901; - var a5902; - var a5903; - var a5904; - var a5905; - var a5906; - var a5907; - var a5908; - var a5909; - var a5910; - var a5911; - var a5912; - var a5913; - var a5914; - var a5915; - var a5916; - var a5917; - var a5918; - var a5919; - var a5920; - var a5921; - var a5922; - var a5923; - var a5924; - var a5925; - var a5926; - var a5927; - var a5928; - var a5929; - var a5930; - var a5931; - var a5932; - var a5933; - var a5934; - var a5935; - var a5936; - var a5937; - var a5938; - var a5939; - var a5940; - var a5941; - var a5942; - var a5943; - var a5944; - var a5945; - var a5946; - var a5947; - var a5948; - var a5949; - var a5950; - var a5951; - var a5952; - var a5953; - var a5954; - var a5955; - var a5956; - var a5957; - var a5958; - var a5959; - var a5960; - var a5961; - var a5962; - var a5963; - var a5964; - var a5965; - var a5966; - var a5967; - var a5968; - var a5969; - var a5970; - var a5971; - var a5972; - var a5973; - var a5974; - var a5975; - var a5976; - var a5977; - var a5978; - var a5979; - var a5980; - var a5981; - var a5982; - var a5983; - var a5984; - var a5985; - var a5986; - var a5987; - var a5988; - var a5989; - var a5990; - var a5991; - var a5992; - var a5993; - var a5994; - var a5995; - var a5996; - var a5997; - var a5998; - var a5999; - var a6000; - var a6001; - var a6002; - var a6003; - var a6004; - var a6005; - var a6006; - var a6007; - var a6008; - var a6009; - var a6010; - var a6011; - var a6012; - var a6013; - var a6014; - var a6015; - var a6016; - var a6017; - var a6018; - var a6019; - var a6020; - var a6021; - var a6022; - var a6023; - var a6024; - var a6025; - var a6026; - var a6027; - var a6028; - var a6029; - var a6030; - var a6031; - var a6032; - var a6033; - var a6034; - var a6035; - var a6036; - var a6037; - var a6038; - var a6039; - var a6040; - var a6041; - var a6042; - var a6043; - var a6044; - var a6045; - var a6046; - var a6047; - var a6048; - var a6049; - var a6050; - var a6051; - var a6052; - var a6053; - var a6054; - var a6055; - var a6056; - var a6057; - var a6058; - var a6059; - var a6060; - var a6061; - var a6062; - var a6063; - var a6064; - var a6065; - var a6066; - var a6067; - var a6068; - var a6069; - var a6070; - var a6071; - var a6072; - var a6073; - var a6074; - var a6075; - var a6076; - var a6077; - var a6078; - var a6079; - var a6080; - var a6081; - var a6082; - var a6083; - var a6084; - var a6085; - var a6086; - var a6087; - var a6088; - var a6089; - var a6090; - var a6091; - var a6092; - var a6093; - var a6094; - var a6095; - var a6096; - var a6097; - var a6098; - var a6099; - var a6100; - var a6101; - var a6102; - var a6103; - var a6104; - var a6105; - var a6106; - var a6107; - var a6108; - var a6109; - var a6110; - var a6111; - var a6112; - var a6113; - var a6114; - var a6115; - var a6116; - var a6117; - var a6118; - var a6119; - var a6120; - var a6121; - var a6122; - var a6123; - var a6124; - var a6125; - var a6126; - var a6127; - var a6128; - var a6129; - var a6130; - var a6131; - var a6132; - var a6133; - var a6134; - var a6135; - var a6136; - var a6137; - var a6138; - var a6139; - var a6140; - var a6141; - var a6142; - var a6143; - var a6144; - var a6145; - var a6146; - var a6147; - var a6148; - var a6149; - var a6150; - var a6151; - var a6152; - var a6153; - var a6154; - var a6155; - var a6156; - var a6157; - var a6158; - var a6159; - var a6160; - var a6161; - var a6162; - var a6163; - var a6164; - var a6165; - var a6166; - var a6167; - var a6168; - var a6169; - var a6170; - var a6171; - var a6172; - var a6173; - var a6174; - var a6175; - var a6176; - var a6177; - var a6178; - var a6179; - var a6180; - var a6181; - var a6182; - var a6183; - var a6184; - var a6185; - var a6186; - var a6187; - var a6188; - var a6189; - var a6190; - var a6191; - var a6192; - var a6193; - var a6194; - var a6195; - var a6196; - var a6197; - var a6198; - var a6199; - var a6200; - var a6201; - var a6202; - var a6203; - var a6204; - var a6205; - var a6206; - var a6207; - var a6208; - var a6209; - var a6210; - var a6211; - var a6212; - var a6213; - var a6214; - var a6215; - var a6216; - var a6217; - var a6218; - var a6219; - var a6220; - var a6221; - var a6222; - var a6223; - var a6224; - var a6225; - var a6226; - var a6227; - var a6228; - var a6229; - var a6230; - var a6231; - var a6232; - var a6233; - var a6234; - var a6235; - var a6236; - var a6237; - var a6238; - var a6239; - var a6240; - var a6241; - var a6242; - var a6243; - var a6244; - var a6245; - var a6246; - var a6247; - var a6248; - var a6249; - var a6250; - var a6251; - var a6252; - var a6253; - var a6254; - var a6255; - var a6256; - var a6257; - var a6258; - var a6259; - var a6260; - var a6261; - var a6262; - var a6263; - var a6264; - var a6265; - var a6266; - var a6267; - var a6268; - var a6269; - var a6270; - var a6271; - var a6272; - var a6273; - var a6274; - var a6275; - var a6276; - var a6277; - var a6278; - var a6279; - var a6280; - var a6281; - var a6282; - var a6283; - var a6284; - var a6285; - var a6286; - var a6287; - var a6288; - var a6289; - var a6290; - var a6291; - var a6292; - var a6293; - var a6294; - var a6295; - var a6296; - var a6297; - var a6298; - var a6299; - var a6300; - var a6301; - var a6302; - var a6303; - var a6304; - var a6305; - var a6306; - var a6307; - var a6308; - var a6309; - var a6310; - var a6311; - var a6312; - var a6313; - var a6314; - var a6315; - var a6316; - var a6317; - var a6318; - var a6319; - var a6320; - var a6321; - var a6322; - var a6323; - var a6324; - var a6325; - var a6326; - var a6327; - var a6328; - var a6329; - var a6330; - var a6331; - var a6332; - var a6333; - var a6334; - var a6335; - var a6336; - var a6337; - var a6338; - var a6339; - var a6340; - var a6341; - var a6342; - var a6343; - var a6344; - var a6345; - var a6346; - var a6347; - var a6348; - var a6349; - var a6350; - var a6351; - var a6352; - var a6353; - var a6354; - var a6355; - var a6356; - var a6357; - var a6358; - var a6359; - var a6360; - var a6361; - var a6362; - var a6363; - var a6364; - var a6365; - var a6366; - var a6367; - var a6368; - var a6369; - var a6370; - var a6371; - var a6372; - var a6373; - var a6374; - var a6375; - var a6376; - var a6377; - var a6378; - var a6379; - var a6380; - var a6381; - var a6382; - var a6383; - var a6384; - var a6385; - var a6386; - var a6387; - var a6388; - var a6389; - var a6390; - var a6391; - var a6392; - var a6393; - var a6394; - var a6395; - var a6396; - var a6397; - var a6398; - var a6399; - var a6400; - var a6401; - var a6402; - var a6403; - var a6404; - var a6405; - var a6406; - var a6407; - var a6408; - var a6409; - var a6410; - var a6411; - var a6412; - var a6413; - var a6414; - var a6415; - var a6416; - var a6417; - var a6418; - var a6419; - var a6420; - var a6421; - var a6422; - var a6423; - var a6424; - var a6425; - var a6426; - var a6427; - var a6428; - var a6429; - var a6430; - var a6431; - var a6432; - var a6433; - var a6434; - var a6435; - var a6436; - var a6437; - var a6438; - var a6439; - var a6440; - var a6441; - var a6442; - var a6443; - var a6444; - var a6445; - var a6446; - var a6447; - var a6448; - var a6449; - var a6450; - var a6451; - var a6452; - var a6453; - var a6454; - var a6455; - var a6456; - var a6457; - var a6458; - var a6459; - var a6460; - var a6461; - var a6462; - var a6463; - var a6464; - var a6465; - var a6466; - var a6467; - var a6468; - var a6469; - var a6470; - var a6471; - var a6472; - var a6473; - var a6474; - var a6475; - var a6476; - var a6477; - var a6478; - var a6479; - var a6480; - var a6481; - var a6482; - var a6483; - var a6484; - var a6485; - var a6486; - var a6487; - var a6488; - var a6489; - var a6490; - var a6491; - var a6492; - var a6493; - var a6494; - var a6495; - var a6496; - var a6497; - var a6498; - var a6499; - var a6500; - var a6501; - var a6502; - var a6503; - var a6504; - var a6505; - var a6506; - var a6507; - var a6508; - var a6509; - var a6510; - var a6511; - var a6512; - var a6513; - var a6514; - var a6515; - var a6516; - var a6517; - var a6518; - var a6519; - var a6520; - var a6521; - var a6522; - var a6523; - var a6524; - var a6525; - var a6526; - var a6527; - var a6528; - var a6529; - var a6530; - var a6531; - var a6532; - var a6533; - var a6534; - var a6535; - var a6536; - var a6537; - var a6538; - var a6539; - var a6540; - var a6541; - var a6542; - var a6543; - var a6544; - var a6545; - var a6546; - var a6547; - var a6548; - var a6549; - var a6550; - var a6551; - var a6552; - var a6553; - var a6554; - var a6555; - var a6556; - var a6557; - var a6558; - var a6559; - var a6560; - var a6561; - var a6562; - var a6563; - var a6564; - var a6565; - var a6566; - var a6567; - var a6568; - var a6569; - var a6570; - var a6571; - var a6572; - var a6573; - var a6574; - var a6575; - var a6576; - var a6577; - var a6578; - var a6579; - var a6580; - var a6581; - var a6582; - var a6583; - var a6584; - var a6585; - var a6586; - var a6587; - var a6588; - var a6589; - var a6590; - var a6591; - var a6592; - var a6593; - var a6594; - var a6595; - var a6596; - var a6597; - var a6598; - var a6599; - var a6600; - var a6601; - var a6602; - var a6603; - var a6604; - var a6605; - var a6606; - var a6607; - var a6608; - var a6609; - var a6610; - var a6611; - var a6612; - var a6613; - var a6614; - var a6615; - var a6616; - var a6617; - var a6618; - var a6619; - var a6620; - var a6621; - var a6622; - var a6623; - var a6624; - var a6625; - var a6626; - var a6627; - var a6628; - var a6629; - var a6630; - var a6631; - var a6632; - var a6633; - var a6634; - var a6635; - var a6636; - var a6637; - var a6638; - var a6639; - var a6640; - var a6641; - var a6642; - var a6643; - var a6644; - var a6645; - var a6646; - var a6647; - var a6648; - var a6649; - var a6650; - var a6651; - var a6652; - var a6653; - var a6654; - var a6655; - var a6656; - var a6657; - var a6658; - var a6659; - var a6660; - var a6661; - var a6662; - var a6663; - var a6664; - var a6665; - var a6666; - var a6667; - var a6668; - var a6669; - var a6670; - var a6671; - var a6672; - var a6673; - var a6674; - var a6675; - var a6676; - var a6677; - var a6678; - var a6679; - var a6680; - var a6681; - var a6682; - var a6683; - var a6684; - var a6685; - var a6686; - var a6687; - var a6688; - var a6689; - var a6690; - var a6691; - var a6692; - var a6693; - var a6694; - var a6695; - var a6696; - var a6697; - var a6698; - var a6699; - var a6700; - var a6701; - var a6702; - var a6703; - var a6704; - var a6705; - var a6706; - var a6707; - var a6708; - var a6709; - var a6710; - var a6711; - var a6712; - var a6713; - var a6714; - var a6715; - var a6716; - var a6717; - var a6718; - var a6719; - var a6720; - var a6721; - var a6722; - var a6723; - var a6724; - var a6725; - var a6726; - var a6727; - var a6728; - var a6729; - var a6730; - var a6731; - var a6732; - var a6733; - var a6734; - var a6735; - var a6736; - var a6737; - var a6738; - var a6739; - var a6740; - var a6741; - var a6742; - var a6743; - var a6744; - var a6745; - var a6746; - var a6747; - var a6748; - var a6749; - var a6750; - var a6751; - var a6752; - var a6753; - var a6754; - var a6755; - var a6756; - var a6757; - var a6758; - var a6759; - var a6760; - var a6761; - var a6762; - var a6763; - var a6764; - var a6765; - var a6766; - var a6767; - var a6768; - var a6769; - var a6770; - var a6771; - var a6772; - var a6773; - var a6774; - var a6775; - var a6776; - var a6777; - var a6778; - var a6779; - var a6780; - var a6781; - var a6782; - var a6783; - var a6784; - var a6785; - var a6786; - var a6787; - var a6788; - var a6789; - var a6790; - var a6791; - var a6792; - var a6793; - var a6794; - var a6795; - var a6796; - var a6797; - var a6798; - var a6799; - var a6800; - var a6801; - var a6802; - var a6803; - var a6804; - var a6805; - var a6806; - var a6807; - var a6808; - var a6809; - var a6810; - var a6811; - var a6812; - var a6813; - var a6814; - var a6815; - var a6816; - var a6817; - var a6818; - var a6819; - var a6820; - var a6821; - var a6822; - var a6823; - var a6824; - var a6825; - var a6826; - var a6827; - var a6828; - var a6829; - var a6830; - var a6831; - var a6832; - var a6833; - var a6834; - var a6835; - var a6836; - var a6837; - var a6838; - var a6839; - var a6840; - var a6841; - var a6842; - var a6843; - var a6844; - var a6845; - var a6846; - var a6847; - var a6848; - var a6849; - var a6850; - var a6851; - var a6852; - var a6853; - var a6854; - var a6855; - var a6856; - var a6857; - var a6858; - var a6859; - var a6860; - var a6861; - var a6862; - var a6863; - var a6864; - var a6865; - var a6866; - var a6867; - var a6868; - var a6869; - var a6870; - var a6871; - var a6872; - var a6873; - var a6874; - var a6875; - var a6876; - var a6877; - var a6878; - var a6879; - var a6880; - var a6881; - var a6882; - var a6883; - var a6884; - var a6885; - var a6886; - var a6887; - var a6888; - var a6889; - var a6890; - var a6891; - var a6892; - var a6893; - var a6894; - var a6895; - var a6896; - var a6897; - var a6898; - var a6899; - var a6900; - var a6901; - var a6902; - var a6903; - var a6904; - var a6905; - var a6906; - var a6907; - var a6908; - var a6909; - var a6910; - var a6911; - var a6912; - var a6913; - var a6914; - var a6915; - var a6916; - var a6917; - var a6918; - var a6919; - var a6920; - var a6921; - var a6922; - var a6923; - var a6924; - var a6925; - var a6926; - var a6927; - var a6928; - var a6929; - var a6930; - var a6931; - var a6932; - var a6933; - var a6934; - var a6935; - var a6936; - var a6937; - var a6938; - var a6939; - var a6940; - var a6941; - var a6942; - var a6943; - var a6944; - var a6945; - var a6946; - var a6947; - var a6948; - var a6949; - var a6950; - var a6951; - var a6952; - var a6953; - var a6954; - var a6955; - var a6956; - var a6957; - var a6958; - var a6959; - var a6960; - var a6961; - var a6962; - var a6963; - var a6964; - var a6965; - var a6966; - var a6967; - var a6968; - var a6969; - var a6970; - var a6971; - var a6972; - var a6973; - var a6974; - var a6975; - var a6976; - var a6977; - var a6978; - var a6979; - var a6980; - var a6981; - var a6982; - var a6983; - var a6984; - var a6985; - var a6986; - var a6987; - var a6988; - var a6989; - var a6990; - var a6991; - var a6992; - var a6993; - var a6994; - var a6995; - var a6996; - var a6997; - var a6998; - var a6999; - var a7000; - var a7001; - var a7002; - var a7003; - var a7004; - var a7005; - var a7006; - var a7007; - var a7008; - var a7009; - var a7010; - var a7011; - var a7012; - var a7013; - var a7014; - var a7015; - var a7016; - var a7017; - var a7018; - var a7019; - var a7020; - var a7021; - var a7022; - var a7023; - var a7024; - var a7025; - var a7026; - var a7027; - var a7028; - var a7029; - var a7030; - var a7031; - var a7032; - var a7033; - var a7034; - var a7035; - var a7036; - var a7037; - var a7038; - var a7039; - var a7040; - var a7041; - var a7042; - var a7043; - var a7044; - var a7045; - var a7046; - var a7047; - var a7048; - var a7049; - var a7050; - var a7051; - var a7052; - var a7053; - var a7054; - var a7055; - var a7056; - var a7057; - var a7058; - var a7059; - var a7060; - var a7061; - var a7062; - var a7063; - var a7064; - var a7065; - var a7066; - var a7067; - var a7068; - var a7069; - var a7070; - var a7071; - var a7072; - var a7073; - var a7074; - var a7075; - var a7076; - var a7077; - var a7078; - var a7079; - var a7080; - var a7081; - var a7082; - var a7083; - var a7084; - var a7085; - var a7086; - var a7087; - var a7088; - var a7089; - var a7090; - var a7091; - var a7092; - var a7093; - var a7094; - var a7095; - var a7096; - var a7097; - var a7098; - var a7099; - var a7100; - var a7101; - var a7102; - var a7103; - var a7104; - var a7105; - var a7106; - var a7107; - var a7108; - var a7109; - var a7110; - var a7111; - var a7112; - var a7113; - var a7114; - var a7115; - var a7116; - var a7117; - var a7118; - var a7119; - var a7120; - var a7121; - var a7122; - var a7123; - var a7124; - var a7125; - var a7126; - var a7127; - var a7128; - var a7129; - var a7130; - var a7131; - var a7132; - var a7133; - var a7134; - var a7135; - var a7136; - var a7137; - var a7138; - var a7139; - var a7140; - var a7141; - var a7142; - var a7143; - var a7144; - var a7145; - var a7146; - var a7147; - var a7148; - var a7149; - var a7150; - var a7151; - var a7152; - var a7153; - var a7154; - var a7155; - var a7156; - var a7157; - var a7158; - var a7159; - var a7160; - var a7161; - var a7162; - var a7163; - var a7164; - var a7165; - var a7166; - var a7167; - var a7168; - var a7169; - var a7170; - var a7171; - var a7172; - var a7173; - var a7174; - var a7175; - var a7176; - var a7177; - var a7178; - var a7179; - var a7180; - var a7181; - var a7182; - var a7183; - var a7184; - var a7185; - var a7186; - var a7187; - var a7188; - var a7189; - var a7190; - var a7191; - var a7192; - var a7193; - var a7194; - var a7195; - var a7196; - var a7197; - var a7198; - var a7199; - var a7200; - var a7201; - var a7202; - var a7203; - var a7204; - var a7205; - var a7206; - var a7207; - var a7208; - var a7209; - var a7210; - var a7211; - var a7212; - var a7213; - var a7214; - var a7215; - var a7216; - var a7217; - var a7218; - var a7219; - var a7220; - var a7221; - var a7222; - var a7223; - var a7224; - var a7225; - var a7226; - var a7227; - var a7228; - var a7229; - var a7230; - var a7231; - var a7232; - var a7233; - var a7234; - var a7235; - var a7236; - var a7237; - var a7238; - var a7239; - var a7240; - var a7241; - var a7242; - var a7243; - var a7244; - var a7245; - var a7246; - var a7247; - var a7248; - var a7249; - var a7250; - var a7251; - var a7252; - var a7253; - var a7254; - var a7255; - var a7256; - var a7257; - var a7258; - var a7259; - var a7260; - var a7261; - var a7262; - var a7263; - var a7264; - var a7265; - var a7266; - var a7267; - var a7268; - var a7269; - var a7270; - var a7271; - var a7272; - var a7273; - var a7274; - var a7275; - var a7276; - var a7277; - var a7278; - var a7279; - var a7280; - var a7281; - var a7282; - var a7283; - var a7284; - var a7285; - var a7286; - var a7287; - var a7288; - var a7289; - var a7290; - var a7291; - var a7292; - var a7293; - var a7294; - var a7295; - var a7296; - var a7297; - var a7298; - var a7299; - var a7300; - var a7301; - var a7302; - var a7303; - var a7304; - var a7305; - var a7306; - var a7307; - var a7308; - var a7309; - var a7310; - var a7311; - var a7312; - var a7313; - var a7314; - var a7315; - var a7316; - var a7317; - var a7318; - var a7319; - var a7320; - var a7321; - var a7322; - var a7323; - var a7324; - var a7325; - var a7326; - var a7327; - var a7328; - var a7329; - var a7330; - var a7331; - var a7332; - var a7333; - var a7334; - var a7335; - var a7336; - var a7337; - var a7338; - var a7339; - var a7340; - var a7341; - var a7342; - var a7343; - var a7344; - var a7345; - var a7346; - var a7347; - var a7348; - var a7349; - var a7350; - var a7351; - var a7352; - var a7353; - var a7354; - var a7355; - var a7356; - var a7357; - var a7358; - var a7359; - var a7360; - var a7361; - var a7362; - var a7363; - var a7364; - var a7365; - var a7366; - var a7367; - var a7368; - var a7369; - var a7370; - var a7371; - var a7372; - var a7373; - var a7374; - var a7375; - var a7376; - var a7377; - var a7378; - var a7379; - var a7380; - var a7381; - var a7382; - var a7383; - var a7384; - var a7385; - var a7386; - var a7387; - var a7388; - var a7389; - var a7390; - var a7391; - var a7392; - var a7393; - var a7394; - var a7395; - var a7396; - var a7397; - var a7398; - var a7399; - var a7400; - var a7401; - var a7402; - var a7403; - var a7404; - var a7405; - var a7406; - var a7407; - var a7408; - var a7409; - var a7410; - var a7411; - var a7412; - var a7413; - var a7414; - var a7415; - var a7416; - var a7417; - var a7418; - var a7419; - var a7420; - var a7421; - var a7422; - var a7423; - var a7424; - var a7425; - var a7426; - var a7427; - var a7428; - var a7429; - var a7430; - var a7431; - var a7432; - var a7433; - var a7434; - var a7435; - var a7436; - var a7437; - var a7438; - var a7439; - var a7440; - var a7441; - var a7442; - var a7443; - var a7444; - var a7445; - var a7446; - var a7447; - var a7448; - var a7449; - var a7450; - var a7451; - var a7452; - var a7453; - var a7454; - var a7455; - var a7456; - var a7457; - var a7458; - var a7459; - var a7460; - var a7461; - var a7462; - var a7463; - var a7464; - var a7465; - var a7466; - var a7467; - var a7468; - var a7469; - var a7470; - var a7471; - var a7472; - var a7473; - var a7474; - var a7475; - var a7476; - var a7477; - var a7478; - var a7479; - var a7480; - var a7481; - var a7482; - var a7483; - var a7484; - var a7485; - var a7486; - var a7487; - var a7488; - var a7489; - var a7490; - var a7491; - var a7492; - var a7493; - var a7494; - var a7495; - var a7496; - var a7497; - var a7498; - var a7499; - var a7500; - var a7501; - var a7502; - var a7503; - var a7504; - var a7505; - var a7506; - var a7507; - var a7508; - var a7509; - var a7510; - var a7511; - var a7512; - var a7513; - var a7514; - var a7515; - var a7516; - var a7517; - var a7518; - var a7519; - var a7520; - var a7521; - var a7522; - var a7523; - var a7524; - var a7525; - var a7526; - var a7527; - var a7528; - var a7529; - var a7530; - var a7531; - var a7532; - var a7533; - var a7534; - var a7535; - var a7536; - var a7537; - var a7538; - var a7539; - var a7540; - var a7541; - var a7542; - var a7543; - var a7544; - var a7545; - var a7546; - var a7547; - var a7548; - var a7549; - var a7550; - var a7551; - var a7552; - var a7553; - var a7554; - var a7555; - var a7556; - var a7557; - var a7558; - var a7559; - var a7560; - var a7561; - var a7562; - var a7563; - var a7564; - var a7565; - var a7566; - var a7567; - var a7568; - var a7569; - var a7570; - var a7571; - var a7572; - var a7573; - var a7574; - var a7575; - var a7576; - var a7577; - var a7578; - var a7579; - var a7580; - var a7581; - var a7582; - var a7583; - var a7584; - var a7585; - var a7586; - var a7587; - var a7588; - var a7589; - var a7590; - var a7591; - var a7592; - var a7593; - var a7594; - var a7595; - var a7596; - var a7597; - var a7598; - var a7599; - var a7600; - var a7601; - var a7602; - var a7603; - var a7604; - var a7605; - var a7606; - var a7607; - var a7608; - var a7609; - var a7610; - var a7611; - var a7612; - var a7613; - var a7614; - var a7615; - var a7616; - var a7617; - var a7618; - var a7619; - var a7620; - var a7621; - var a7622; - var a7623; - var a7624; - var a7625; - var a7626; - var a7627; - var a7628; - var a7629; - var a7630; - var a7631; - var a7632; - var a7633; - var a7634; - var a7635; - var a7636; - var a7637; - var a7638; - var a7639; - var a7640; - var a7641; - var a7642; - var a7643; - var a7644; - var a7645; - var a7646; - var a7647; - var a7648; - var a7649; - var a7650; - var a7651; - var a7652; - var a7653; - var a7654; - var a7655; - var a7656; - var a7657; - var a7658; - var a7659; - var a7660; - var a7661; - var a7662; - var a7663; - var a7664; - var a7665; - var a7666; - var a7667; - var a7668; - var a7669; - var a7670; - var a7671; - var a7672; - var a7673; - var a7674; - var a7675; - var a7676; - var a7677; - var a7678; - var a7679; - var a7680; - var a7681; - var a7682; - var a7683; - var a7684; - var a7685; - var a7686; - var a7687; - var a7688; - var a7689; - var a7690; - var a7691; - var a7692; - var a7693; - var a7694; - var a7695; - var a7696; - var a7697; - var a7698; - var a7699; - var a7700; - var a7701; - var a7702; - var a7703; - var a7704; - var a7705; - var a7706; - var a7707; - var a7708; - var a7709; - var a7710; - var a7711; - var a7712; - var a7713; - var a7714; - var a7715; - var a7716; - var a7717; - var a7718; - var a7719; - var a7720; - var a7721; - var a7722; - var a7723; - var a7724; - var a7725; - var a7726; - var a7727; - var a7728; - var a7729; - var a7730; - var a7731; - var a7732; - var a7733; - var a7734; - var a7735; - var a7736; - var a7737; - var a7738; - var a7739; - var a7740; - var a7741; - var a7742; - var a7743; - var a7744; - var a7745; - var a7746; - var a7747; - var a7748; - var a7749; - var a7750; - var a7751; - var a7752; - var a7753; - var a7754; - var a7755; - var a7756; - var a7757; - var a7758; - var a7759; - var a7760; - var a7761; - var a7762; - var a7763; - var a7764; - var a7765; - var a7766; - var a7767; - var a7768; - var a7769; - var a7770; - var a7771; - var a7772; - var a7773; - var a7774; - var a7775; - var a7776; - var a7777; - var a7778; - var a7779; - var a7780; - var a7781; - var a7782; - var a7783; - var a7784; - var a7785; - var a7786; - var a7787; - var a7788; - var a7789; - var a7790; - var a7791; - var a7792; - var a7793; - var a7794; - var a7795; - var a7796; - var a7797; - var a7798; - var a7799; - var a7800; - var a7801; - var a7802; - var a7803; - var a7804; - var a7805; - var a7806; - var a7807; - var a7808; - var a7809; - var a7810; - var a7811; - var a7812; - var a7813; - var a7814; - var a7815; - var a7816; - var a7817; - var a7818; - var a7819; - var a7820; - var a7821; - var a7822; - var a7823; - var a7824; - var a7825; - var a7826; - var a7827; - var a7828; - var a7829; - var a7830; - var a7831; - var a7832; - var a7833; - var a7834; - var a7835; - var a7836; - var a7837; - var a7838; - var a7839; - var a7840; - var a7841; - var a7842; - var a7843; - var a7844; - var a7845; - var a7846; - var a7847; - var a7848; - var a7849; - var a7850; - var a7851; - var a7852; - var a7853; - var a7854; - var a7855; - var a7856; - var a7857; - var a7858; - var a7859; - var a7860; - var a7861; - var a7862; - var a7863; - var a7864; - var a7865; - var a7866; - var a7867; - var a7868; - var a7869; - var a7870; - var a7871; - var a7872; - var a7873; - var a7874; - var a7875; - var a7876; - var a7877; - var a7878; - var a7879; - var a7880; - var a7881; - var a7882; - var a7883; - var a7884; - var a7885; - var a7886; - var a7887; - var a7888; - var a7889; - var a7890; - var a7891; - var a7892; - var a7893; - var a7894; - var a7895; - var a7896; - var a7897; - var a7898; - var a7899; - var a7900; - var a7901; - var a7902; - var a7903; - var a7904; - var a7905; - var a7906; - var a7907; - var a7908; - var a7909; - var a7910; - var a7911; - var a7912; - var a7913; - var a7914; - var a7915; - var a7916; - var a7917; - var a7918; - var a7919; - var a7920; - var a7921; - var a7922; - var a7923; - var a7924; - var a7925; - var a7926; - var a7927; - var a7928; - var a7929; - var a7930; - var a7931; - var a7932; - var a7933; - var a7934; - var a7935; - var a7936; - var a7937; - var a7938; - var a7939; - var a7940; - var a7941; - var a7942; - var a7943; - var a7944; - var a7945; - var a7946; - var a7947; - var a7948; - var a7949; - var a7950; - var a7951; - var a7952; - var a7953; - var a7954; - var a7955; - var a7956; - var a7957; - var a7958; - var a7959; - var a7960; - var a7961; - var a7962; - var a7963; - var a7964; - var a7965; - var a7966; - var a7967; - var a7968; - var a7969; - var a7970; - var a7971; - var a7972; - var a7973; - var a7974; - var a7975; - var a7976; - var a7977; - var a7978; - var a7979; - var a7980; - var a7981; - var a7982; - var a7983; - var a7984; - var a7985; - var a7986; - var a7987; - var a7988; - var a7989; - var a7990; - var a7991; - var a7992; - var a7993; - var a7994; - var a7995; - var a7996; - var a7997; - var a7998; - var a7999; - var a8000; - var a8001; - var a8002; - var a8003; - var a8004; - var a8005; - var a8006; - var a8007; - var a8008; - var a8009; - var a8010; - var a8011; - var a8012; - var a8013; - var a8014; - var a8015; - var a8016; - var a8017; - var a8018; - var a8019; - var a8020; - var a8021; - var a8022; - var a8023; - var a8024; - var a8025; - var a8026; - var a8027; - var a8028; - var a8029; - var a8030; - var a8031; - var a8032; - var a8033; - var a8034; - var a8035; - var a8036; - var a8037; - var a8038; - var a8039; - var a8040; - var a8041; - var a8042; - var a8043; - var a8044; - var a8045; - var a8046; - var a8047; - var a8048; - var a8049; - var a8050; - var a8051; - var a8052; - var a8053; - var a8054; - var a8055; - var a8056; - var a8057; - var a8058; - var a8059; - var a8060; - var a8061; - var a8062; - var a8063; - var a8064; - var a8065; - var a8066; - var a8067; - var a8068; - var a8069; - var a8070; - var a8071; - var a8072; - var a8073; - var a8074; - var a8075; - var a8076; - var a8077; - var a8078; - var a8079; - var a8080; - var a8081; - var a8082; - var a8083; - var a8084; - var a8085; - var a8086; - var a8087; - var a8088; - var a8089; - var a8090; - var a8091; - var a8092; - var a8093; - var a8094; - var a8095; - var a8096; - var a8097; - var a8098; - var a8099; - var a8100; - var a8101; - var a8102; - var a8103; - var a8104; - var a8105; - var a8106; - var a8107; - var a8108; - var a8109; - var a8110; - var a8111; - var a8112; - var a8113; - var a8114; - var a8115; - var a8116; - var a8117; - var a8118; - var a8119; - var a8120; - var a8121; - var a8122; - var a8123; - var a8124; - var a8125; - var a8126; - var a8127; - var a8128; - var a8129; - var a8130; - var a8131; - var a8132; - var a8133; - var a8134; - var a8135; - var a8136; - var a8137; - var a8138; - var a8139; - var a8140; - var a8141; - var a8142; - var a8143; - var a8144; - var a8145; - var a8146; - var a8147; - var a8148; - var a8149; - var a8150; - var a8151; - var a8152; - var a8153; - var a8154; - var a8155; - var a8156; - var a8157; - var a8158; - var a8159; - var a8160; - var a8161; - var a8162; - var a8163; - var a8164; - var a8165; - var a8166; - var a8167; - var a8168; - var a8169; - var a8170; - var a8171; - var a8172; - var a8173; - var a8174; - var a8175; - var a8176; - var a8177; - var a8178; - var a8179; - var a8180; - var a8181; - var a8182; - var a8183; - var a8184; - var a8185; - var a8186; - var a8187; - var a8188; - var a8189; - var a8190; - var a8191; - var a8192; - var a8193; - var a8194; - var a8195; - var a8196; - var a8197; - var a8198; - var a8199; - var a8200; - var a8201; - var a8202; - var a8203; - var a8204; - var a8205; - var a8206; - var a8207; - var a8208; - var a8209; - var a8210; - var a8211; - var a8212; - var a8213; - var a8214; - var a8215; - var a8216; - var a8217; - var a8218; - var a8219; - var a8220; - var a8221; - var a8222; - var a8223; - var a8224; - var a8225; - var a8226; - var a8227; - var a8228; - var a8229; - var a8230; - var a8231; - var a8232; - var a8233; - var a8234; - var a8235; - var a8236; - var a8237; - var a8238; - var a8239; - var a8240; - var a8241; - var a8242; - var a8243; - var a8244; - var a8245; - var a8246; - var a8247; - var a8248; - var a8249; - var a8250; - var a8251; - var a8252; - var a8253; - var a8254; - var a8255; - var a8256; - var a8257; - var a8258; - var a8259; - var a8260; - var a8261; - var a8262; - var a8263; - var a8264; - var a8265; - var a8266; - var a8267; - var a8268; - var a8269; - var a8270; - var a8271; - var a8272; - var a8273; - var a8274; - var a8275; - var a8276; - var a8277; - var a8278; - var a8279; - var a8280; - var a8281; - var a8282; - var a8283; - var a8284; - var a8285; - var a8286; - var a8287; - var a8288; - var a8289; - var a8290; - var a8291; - var a8292; - var a8293; - var a8294; - var a8295; - var a8296; - var a8297; - var a8298; - var a8299; - var a8300; - var a8301; - var a8302; - var a8303; - var a8304; - var a8305; - var a8306; - var a8307; - var a8308; - var a8309; - var a8310; - var a8311; - var a8312; - var a8313; - var a8314; - var a8315; - var a8316; - var a8317; - var a8318; - var a8319; - var a8320; - var a8321; - var a8322; - var a8323; - var a8324; - var a8325; - var a8326; - var a8327; - var a8328; - var a8329; - var a8330; - var a8331; - var a8332; - var a8333; - var a8334; - var a8335; - var a8336; - var a8337; - var a8338; - var a8339; - var a8340; - var a8341; - var a8342; - var a8343; - var a8344; - var a8345; - var a8346; - var a8347; - var a8348; - var a8349; - var a8350; - var a8351; - var a8352; - var a8353; - var a8354; - var a8355; - var a8356; - var a8357; - var a8358; - var a8359; - var a8360; - var a8361; - var a8362; - var a8363; - var a8364; - var a8365; - var a8366; - var a8367; - var a8368; - var a8369; - var a8370; - var a8371; - var a8372; - var a8373; - var a8374; - var a8375; - var a8376; - var a8377; - var a8378; - var a8379; - var a8380; - var a8381; - var a8382; - var a8383; - var a8384; - var a8385; - var a8386; - var a8387; - var a8388; - var a8389; - var a8390; - var a8391; - var a8392; - var a8393; - var a8394; - var a8395; - var a8396; - var a8397; - var a8398; - var a8399; - var a8400; - var a8401; - var a8402; - var a8403; - var a8404; - var a8405; - var a8406; - var a8407; - var a8408; - var a8409; - var a8410; - var a8411; - var a8412; - var a8413; - var a8414; - var a8415; - var a8416; - var a8417; - var a8418; - var a8419; - var a8420; - var a8421; - var a8422; - var a8423; - var a8424; - var a8425; - var a8426; - var a8427; - var a8428; - var a8429; - var a8430; - var a8431; - var a8432; - var a8433; - var a8434; - var a8435; - var a8436; - var a8437; - var a8438; - var a8439; - var a8440; - var a8441; - var a8442; - var a8443; - var a8444; - var a8445; - var a8446; - var a8447; - var a8448; - var a8449; - var a8450; - var a8451; - var a8452; - var a8453; - var a8454; - var a8455; - var a8456; - var a8457; - var a8458; - var a8459; - var a8460; - var a8461; - var a8462; - var a8463; - var a8464; - var a8465; - var a8466; - var a8467; - var a8468; - var a8469; - var a8470; - var a8471; - var a8472; - var a8473; - var a8474; - var a8475; - var a8476; - var a8477; - var a8478; - var a8479; - var a8480; - var a8481; - var a8482; - var a8483; - var a8484; - var a8485; - var a8486; - var a8487; - var a8488; - var a8489; - var a8490; - var a8491; - var a8492; - var a8493; - var a8494; - var a8495; - var a8496; - var a8497; - var a8498; - var a8499; - var a8500; - var a8501; - var a8502; - var a8503; - var a8504; - var a8505; - var a8506; - var a8507; - var a8508; - var a8509; - var a8510; - var a8511; - var a8512; - var a8513; - var a8514; - var a8515; - var a8516; - var a8517; - var a8518; - var a8519; - var a8520; - var a8521; - var a8522; - var a8523; - var a8524; - var a8525; - var a8526; - var a8527; - var a8528; - var a8529; - var a8530; - var a8531; - var a8532; - var a8533; - var a8534; - var a8535; - var a8536; - var a8537; - var a8538; - var a8539; - var a8540; - var a8541; - var a8542; - var a8543; - var a8544; - var a8545; - var a8546; - var a8547; - var a8548; - var a8549; - var a8550; - var a8551; - var a8552; - var a8553; - var a8554; - var a8555; - var a8556; - var a8557; - var a8558; - var a8559; - var a8560; - var a8561; - var a8562; - var a8563; - var a8564; - var a8565; - var a8566; - var a8567; - var a8568; - var a8569; - var a8570; - var a8571; - var a8572; - var a8573; - var a8574; - var a8575; - var a8576; - var a8577; - var a8578; - var a8579; - var a8580; - var a8581; - var a8582; - var a8583; - var a8584; - var a8585; - var a8586; - var a8587; - var a8588; - var a8589; - var a8590; - var a8591; - var a8592; - var a8593; - var a8594; - var a8595; - var a8596; - var a8597; - var a8598; - var a8599; - var a8600; - var a8601; - var a8602; - var a8603; - var a8604; - var a8605; - var a8606; - var a8607; - var a8608; - var a8609; - var a8610; - var a8611; - var a8612; - var a8613; - var a8614; - var a8615; - var a8616; - var a8617; - var a8618; - var a8619; - var a8620; - var a8621; - var a8622; - var a8623; - var a8624; - var a8625; - var a8626; - var a8627; - var a8628; - var a8629; - var a8630; - var a8631; - var a8632; - var a8633; - var a8634; - var a8635; - var a8636; - var a8637; - var a8638; - var a8639; - var a8640; - var a8641; - var a8642; - var a8643; - var a8644; - var a8645; - var a8646; - var a8647; - var a8648; - var a8649; - var a8650; - var a8651; - var a8652; - var a8653; - var a8654; - var a8655; - var a8656; - var a8657; - var a8658; - var a8659; - var a8660; - var a8661; - var a8662; - var a8663; - var a8664; - var a8665; - var a8666; - var a8667; - var a8668; - var a8669; - var a8670; - var a8671; - var a8672; - var a8673; - var a8674; - var a8675; - var a8676; - var a8677; - var a8678; - var a8679; - var a8680; - var a8681; - var a8682; - var a8683; - var a8684; - var a8685; - var a8686; - var a8687; - var a8688; - var a8689; - var a8690; - var a8691; - var a8692; - var a8693; - var a8694; - var a8695; - var a8696; - var a8697; - var a8698; - var a8699; - var a8700; - var a8701; - var a8702; - var a8703; - var a8704; - var a8705; - var a8706; - var a8707; - var a8708; - var a8709; - var a8710; - var a8711; - var a8712; - var a8713; - var a8714; - var a8715; - var a8716; - var a8717; - var a8718; - var a8719; - var a8720; - var a8721; - var a8722; - var a8723; - var a8724; - var a8725; - var a8726; - var a8727; - var a8728; - var a8729; - var a8730; - var a8731; - var a8732; - var a8733; - var a8734; - var a8735; - var a8736; - var a8737; - var a8738; - var a8739; - var a8740; - var a8741; - var a8742; - var a8743; - var a8744; - var a8745; - var a8746; - var a8747; - var a8748; - var a8749; - var a8750; - var a8751; - var a8752; - var a8753; - var a8754; - var a8755; - var a8756; - var a8757; - var a8758; - var a8759; - var a8760; - var a8761; - var a8762; - var a8763; - var a8764; - var a8765; - var a8766; - var a8767; - var a8768; - var a8769; - var a8770; - var a8771; - var a8772; - var a8773; - var a8774; - var a8775; - var a8776; - var a8777; - var a8778; - var a8779; - var a8780; - var a8781; - var a8782; - var a8783; - var a8784; - var a8785; - var a8786; - var a8787; - var a8788; - var a8789; - var a8790; - var a8791; - var a8792; - var a8793; - var a8794; - var a8795; - var a8796; - var a8797; - var a8798; - var a8799; - var a8800; - var a8801; - var a8802; - var a8803; - var a8804; - var a8805; - var a8806; - var a8807; - var a8808; - var a8809; - var a8810; - var a8811; - var a8812; - var a8813; - var a8814; - var a8815; - var a8816; - var a8817; - var a8818; - var a8819; - var a8820; - var a8821; - var a8822; - var a8823; - var a8824; - var a8825; - var a8826; - var a8827; - var a8828; - var a8829; - var a8830; - var a8831; - var a8832; - var a8833; - var a8834; - var a8835; - var a8836; - var a8837; - var a8838; - var a8839; - var a8840; - var a8841; - var a8842; - var a8843; - var a8844; - var a8845; - var a8846; - var a8847; - var a8848; - var a8849; - var a8850; - var a8851; - var a8852; - var a8853; - var a8854; - var a8855; - var a8856; - var a8857; - var a8858; - var a8859; - var a8860; - var a8861; - var a8862; - var a8863; - var a8864; - var a8865; - var a8866; - var a8867; - var a8868; - var a8869; - var a8870; - var a8871; - var a8872; - var a8873; - var a8874; - var a8875; - var a8876; - var a8877; - var a8878; - var a8879; - var a8880; - var a8881; - var a8882; - var a8883; - var a8884; - var a8885; - var a8886; - var a8887; - var a8888; - var a8889; - var a8890; - var a8891; - var a8892; - var a8893; - var a8894; - var a8895; - var a8896; - var a8897; - var a8898; - var a8899; - var a8900; - var a8901; - var a8902; - var a8903; - var a8904; - var a8905; - var a8906; - var a8907; - var a8908; - var a8909; - var a8910; - var a8911; - var a8912; - var a8913; - var a8914; - var a8915; - var a8916; - var a8917; - var a8918; - var a8919; - var a8920; - var a8921; - var a8922; - var a8923; - var a8924; - var a8925; - var a8926; - var a8927; - var a8928; - var a8929; - var a8930; - var a8931; - var a8932; - var a8933; - var a8934; - var a8935; - var a8936; - var a8937; - var a8938; - var a8939; - var a8940; - var a8941; - var a8942; - var a8943; - var a8944; - var a8945; - var a8946; - var a8947; - var a8948; - var a8949; - var a8950; - var a8951; - var a8952; - var a8953; - var a8954; - var a8955; - var a8956; - var a8957; - var a8958; - var a8959; - var a8960; - var a8961; - var a8962; - var a8963; - var a8964; - var a8965; - var a8966; - var a8967; - var a8968; - var a8969; - var a8970; - var a8971; - var a8972; - var a8973; - var a8974; - var a8975; - var a8976; - var a8977; - var a8978; - var a8979; - var a8980; - var a8981; - var a8982; - var a8983; - var a8984; - var a8985; - var a8986; - var a8987; - var a8988; - var a8989; - var a8990; - var a8991; - var a8992; - var a8993; - var a8994; - var a8995; - var a8996; - var a8997; - var a8998; - var a8999; - var a9000; - var a9001; - var a9002; - var a9003; - var a9004; - var a9005; - var a9006; - var a9007; - var a9008; - var a9009; - var a9010; - var a9011; - var a9012; - var a9013; - var a9014; - var a9015; - var a9016; - var a9017; - var a9018; - var a9019; - var a9020; - var a9021; - var a9022; - var a9023; - var a9024; - var a9025; - var a9026; - var a9027; - var a9028; - var a9029; - var a9030; - var a9031; - var a9032; - var a9033; - var a9034; - var a9035; - var a9036; - var a9037; - var a9038; - var a9039; - var a9040; - var a9041; - var a9042; - var a9043; - var a9044; - var a9045; - var a9046; - var a9047; - var a9048; - var a9049; - var a9050; - var a9051; - var a9052; - var a9053; - var a9054; - var a9055; - var a9056; - var a9057; - var a9058; - var a9059; - var a9060; - var a9061; - var a9062; - var a9063; - var a9064; - var a9065; - var a9066; - var a9067; - var a9068; - var a9069; - var a9070; - var a9071; - var a9072; - var a9073; - var a9074; - var a9075; - var a9076; - var a9077; - var a9078; - var a9079; - var a9080; - var a9081; - var a9082; - var a9083; - var a9084; - var a9085; - var a9086; - var a9087; - var a9088; - var a9089; - var a9090; - var a9091; - var a9092; - var a9093; - var a9094; - var a9095; - var a9096; - var a9097; - var a9098; - var a9099; - var a9100; - var a9101; - var a9102; - var a9103; - var a9104; - var a9105; - var a9106; - var a9107; - var a9108; - var a9109; - var a9110; - var a9111; - var a9112; - var a9113; - var a9114; - var a9115; - var a9116; - var a9117; - var a9118; - var a9119; - var a9120; - var a9121; - var a9122; - var a9123; - var a9124; - var a9125; - var a9126; - var a9127; - var a9128; - var a9129; - var a9130; - var a9131; - var a9132; - var a9133; - var a9134; - var a9135; - var a9136; - var a9137; - var a9138; - var a9139; - var a9140; - var a9141; - var a9142; - var a9143; - var a9144; - var a9145; - var a9146; - var a9147; - var a9148; - var a9149; - var a9150; - var a9151; - var a9152; - var a9153; - var a9154; - var a9155; - var a9156; - var a9157; - var a9158; - var a9159; - var a9160; - var a9161; - var a9162; - var a9163; - var a9164; - var a9165; - var a9166; - var a9167; - var a9168; - var a9169; - var a9170; - var a9171; - var a9172; - var a9173; - var a9174; - var a9175; - var a9176; - var a9177; - var a9178; - var a9179; - var a9180; - var a9181; - var a9182; - var a9183; - var a9184; - var a9185; - var a9186; - var a9187; - var a9188; - var a9189; - var a9190; - var a9191; - var a9192; - var a9193; - var a9194; - var a9195; - var a9196; - var a9197; - var a9198; - var a9199; - var a9200; - var a9201; - var a9202; - var a9203; - var a9204; - var a9205; - var a9206; - var a9207; - var a9208; - var a9209; - var a9210; - var a9211; - var a9212; - var a9213; - var a9214; - var a9215; - var a9216; - var a9217; - var a9218; - var a9219; - var a9220; - var a9221; - var a9222; - var a9223; - var a9224; - var a9225; - var a9226; - var a9227; - var a9228; - var a9229; - var a9230; - var a9231; - var a9232; - var a9233; - var a9234; - var a9235; - var a9236; - var a9237; - var a9238; - var a9239; - var a9240; - var a9241; - var a9242; - var a9243; - var a9244; - var a9245; - var a9246; - var a9247; - var a9248; - var a9249; - var a9250; - var a9251; - var a9252; - var a9253; - var a9254; - var a9255; - var a9256; - var a9257; - var a9258; - var a9259; - var a9260; - var a9261; - var a9262; - var a9263; - var a9264; - var a9265; - var a9266; - var a9267; - var a9268; - var a9269; - var a9270; - var a9271; - var a9272; - var a9273; - var a9274; - var a9275; - var a9276; - var a9277; - var a9278; - var a9279; - var a9280; - var a9281; - var a9282; - var a9283; - var a9284; - var a9285; - var a9286; - var a9287; - var a9288; - var a9289; - var a9290; - var a9291; - var a9292; - var a9293; - var a9294; - var a9295; - var a9296; - var a9297; - var a9298; - var a9299; - var a9300; - var a9301; - var a9302; - var a9303; - var a9304; - var a9305; - var a9306; - var a9307; - var a9308; - var a9309; - var a9310; - var a9311; - var a9312; - var a9313; - var a9314; - var a9315; - var a9316; - var a9317; - var a9318; - var a9319; - var a9320; - var a9321; - var a9322; - var a9323; - var a9324; - var a9325; - var a9326; - var a9327; - var a9328; - var a9329; - var a9330; - var a9331; - var a9332; - var a9333; - var a9334; - var a9335; - var a9336; - var a9337; - var a9338; - var a9339; - var a9340; - var a9341; - var a9342; - var a9343; - var a9344; - var a9345; - var a9346; - var a9347; - var a9348; - var a9349; - var a9350; - var a9351; - var a9352; - var a9353; - var a9354; - var a9355; - var a9356; - var a9357; - var a9358; - var a9359; - var a9360; - var a9361; - var a9362; - var a9363; - var a9364; - var a9365; - var a9366; - var a9367; - var a9368; - var a9369; - var a9370; - var a9371; - var a9372; - var a9373; - var a9374; - var a9375; - var a9376; - var a9377; - var a9378; - var a9379; - var a9380; - var a9381; - var a9382; - var a9383; - var a9384; - var a9385; - var a9386; - var a9387; - var a9388; - var a9389; - var a9390; - var a9391; - var a9392; - var a9393; - var a9394; - var a9395; - var a9396; - var a9397; - var a9398; - var a9399; - var a9400; - var a9401; - var a9402; - var a9403; - var a9404; - var a9405; - var a9406; - var a9407; - var a9408; - var a9409; - var a9410; - var a9411; - var a9412; - var a9413; - var a9414; - var a9415; - var a9416; - var a9417; - var a9418; - var a9419; - var a9420; - var a9421; - var a9422; - var a9423; - var a9424; - var a9425; - var a9426; - var a9427; - var a9428; - var a9429; - var a9430; - var a9431; - var a9432; - var a9433; - var a9434; - var a9435; - var a9436; - var a9437; - var a9438; - var a9439; - var a9440; - var a9441; - var a9442; - var a9443; - var a9444; - var a9445; - var a9446; - var a9447; - var a9448; - var a9449; - var a9450; - var a9451; - var a9452; - var a9453; - var a9454; - var a9455; - var a9456; - var a9457; - var a9458; - var a9459; - var a9460; - var a9461; - var a9462; - var a9463; - var a9464; - var a9465; - var a9466; - var a9467; - var a9468; - var a9469; - var a9470; - var a9471; - var a9472; - var a9473; - var a9474; - var a9475; - var a9476; - var a9477; - var a9478; - var a9479; - var a9480; - var a9481; - var a9482; - var a9483; - var a9484; - var a9485; - var a9486; - var a9487; - var a9488; - var a9489; - var a9490; - var a9491; - var a9492; - var a9493; - var a9494; - var a9495; - var a9496; - var a9497; - var a9498; - var a9499; - var a9500; - var a9501; - var a9502; - var a9503; - var a9504; - var a9505; - var a9506; - var a9507; - var a9508; - var a9509; - var a9510; - var a9511; - var a9512; - var a9513; - var a9514; - var a9515; - var a9516; - var a9517; - var a9518; - var a9519; - var a9520; - var a9521; - var a9522; - var a9523; - var a9524; - var a9525; - var a9526; - var a9527; - var a9528; - var a9529; - var a9530; - var a9531; - var a9532; - var a9533; - var a9534; - var a9535; - var a9536; - var a9537; - var a9538; - var a9539; - var a9540; - var a9541; - var a9542; - var a9543; - var a9544; - var a9545; - var a9546; - var a9547; - var a9548; - var a9549; - var a9550; - var a9551; - var a9552; - var a9553; - var a9554; - var a9555; - var a9556; - var a9557; - var a9558; - var a9559; - var a9560; - var a9561; - var a9562; - var a9563; - var a9564; - var a9565; - var a9566; - var a9567; - var a9568; - var a9569; - var a9570; - var a9571; - var a9572; - var a9573; - var a9574; - var a9575; - var a9576; - var a9577; - var a9578; - var a9579; - var a9580; - var a9581; - var a9582; - var a9583; - var a9584; - var a9585; - var a9586; - var a9587; - var a9588; - var a9589; - var a9590; - var a9591; - var a9592; - var a9593; - var a9594; - var a9595; - var a9596; - var a9597; - var a9598; - var a9599; - var a9600; - var a9601; - var a9602; - var a9603; - var a9604; - var a9605; - var a9606; - var a9607; - var a9608; - var a9609; - var a9610; - var a9611; - var a9612; - var a9613; - var a9614; - var a9615; - var a9616; - var a9617; - var a9618; - var a9619; - var a9620; - var a9621; - var a9622; - var a9623; - var a9624; - var a9625; - var a9626; - var a9627; - var a9628; - var a9629; - var a9630; - var a9631; - var a9632; - var a9633; - var a9634; - var a9635; - var a9636; - var a9637; - var a9638; - var a9639; - var a9640; - var a9641; - var a9642; - var a9643; - var a9644; - var a9645; - var a9646; - var a9647; - var a9648; - var a9649; - var a9650; - var a9651; - var a9652; - var a9653; - var a9654; - var a9655; - var a9656; - var a9657; - var a9658; - var a9659; - var a9660; - var a9661; - var a9662; - var a9663; - var a9664; - var a9665; - var a9666; - var a9667; - var a9668; - var a9669; - var a9670; - var a9671; - var a9672; - var a9673; - var a9674; - var a9675; - var a9676; - var a9677; - var a9678; - var a9679; - var a9680; - var a9681; - var a9682; - var a9683; - var a9684; - var a9685; - var a9686; - var a9687; - var a9688; - var a9689; - var a9690; - var a9691; - var a9692; - var a9693; - var a9694; - var a9695; - var a9696; - var a9697; - var a9698; - var a9699; - var a9700; - var a9701; - var a9702; - var a9703; - var a9704; - var a9705; - var a9706; - var a9707; - var a9708; - var a9709; - var a9710; - var a9711; - var a9712; - var a9713; - var a9714; - var a9715; - var a9716; - var a9717; - var a9718; - var a9719; - var a9720; - var a9721; - var a9722; - var a9723; - var a9724; - var a9725; - var a9726; - var a9727; - var a9728; - var a9729; - var a9730; - var a9731; - var a9732; - var a9733; - var a9734; - var a9735; - var a9736; - var a9737; - var a9738; - var a9739; - var a9740; - var a9741; - var a9742; - var a9743; - var a9744; - var a9745; - var a9746; - var a9747; - var a9748; - var a9749; - var a9750; - var a9751; - var a9752; - var a9753; - var a9754; - var a9755; - var a9756; - var a9757; - var a9758; - var a9759; - var a9760; - var a9761; - var a9762; - var a9763; - var a9764; - var a9765; - var a9766; - var a9767; - var a9768; - var a9769; - var a9770; - var a9771; - var a9772; - var a9773; - var a9774; - var a9775; - var a9776; - var a9777; - var a9778; - var a9779; - var a9780; - var a9781; - var a9782; - var a9783; - var a9784; - var a9785; - var a9786; - var a9787; - var a9788; - var a9789; - var a9790; - var a9791; - var a9792; - var a9793; - var a9794; - var a9795; - var a9796; - var a9797; - var a9798; - var a9799; - var a9800; - var a9801; - var a9802; - var a9803; - var a9804; - var a9805; - var a9806; - var a9807; - var a9808; - var a9809; - var a9810; - var a9811; - var a9812; - var a9813; - var a9814; - var a9815; - var a9816; - var a9817; - var a9818; - var a9819; - var a9820; - var a9821; - var a9822; - var a9823; - var a9824; - var a9825; - var a9826; - var a9827; - var a9828; - var a9829; - var a9830; - var a9831; - var a9832; - var a9833; - var a9834; - var a9835; - var a9836; - var a9837; - var a9838; - var a9839; - var a9840; - var a9841; - var a9842; - var a9843; - var a9844; - var a9845; - var a9846; - var a9847; - var a9848; - var a9849; - var a9850; - var a9851; - var a9852; - var a9853; - var a9854; - var a9855; - var a9856; - var a9857; - var a9858; - var a9859; - var a9860; - var a9861; - var a9862; - var a9863; - var a9864; - var a9865; - var a9866; - var a9867; - var a9868; - var a9869; - var a9870; - var a9871; - var a9872; - var a9873; - var a9874; - var a9875; - var a9876; - var a9877; - var a9878; - var a9879; - var a9880; - var a9881; - var a9882; - var a9883; - var a9884; - var a9885; - var a9886; - var a9887; - var a9888; - var a9889; - var a9890; - var a9891; - var a9892; - var a9893; - var a9894; - var a9895; - var a9896; - var a9897; - var a9898; - var a9899; - var a9900; - var a9901; - var a9902; - var a9903; - var a9904; - var a9905; - var a9906; - var a9907; - var a9908; - var a9909; - var a9910; - var a9911; - var a9912; - var a9913; - var a9914; - var a9915; - var a9916; - var a9917; - var a9918; - var a9919; - var a9920; - var a9921; - var a9922; - var a9923; - var a9924; - var a9925; - var a9926; - var a9927; - var a9928; - var a9929; - var a9930; - var a9931; - var a9932; - var a9933; - var a9934; - var a9935; - var a9936; - var a9937; - var a9938; - var a9939; - var a9940; - var a9941; - var a9942; - var a9943; - var a9944; - var a9945; - var a9946; - var a9947; - var a9948; - var a9949; - var a9950; - var a9951; - var a9952; - var a9953; - var a9954; - var a9955; - var a9956; - var a9957; - var a9958; - var a9959; - var a9960; - var a9961; - var a9962; - var a9963; - var a9964; - var a9965; - var a9966; - var a9967; - var a9968; - var a9969; - var a9970; - var a9971; - var a9972; - var a9973; - var a9974; - var a9975; - var a9976; - var a9977; - var a9978; - var a9979; - var a9980; - var a9981; - var a9982; - var a9983; - var a9984; - var a9985; - var a9986; - var a9987; - var a9988; - var a9989; - var a9990; - var a9991; - var a9992; - var a9993; - var a9994; - var a9995; - var a9996; - var a9997; - var a9998; - var a9999; - var a10000; - var a10001; - var a10002; - var a10003; - var a10004; - var a10005; - var a10006; - var a10007; - var a10008; - var a10009; - var a10010; - var a10011; - var a10012; - var a10013; - var a10014; - var a10015; - var a10016; - var a10017; - var a10018; - var a10019; - var a10020; - var a10021; - var a10022; - var a10023; - var a10024; - var a10025; - var a10026; - var a10027; - var a10028; - var a10029; - var a10030; - var a10031; - var a10032; - var a10033; - var a10034; - var a10035; - var a10036; - var a10037; - var a10038; - var a10039; - var a10040; - var a10041; - var a10042; - var a10043; - var a10044; - var a10045; - var a10046; - var a10047; - var a10048; - var a10049; - var a10050; - var a10051; - var a10052; - var a10053; - var a10054; - var a10055; - var a10056; - var a10057; - var a10058; - var a10059; - var a10060; - var a10061; - var a10062; - var a10063; - var a10064; - var a10065; - var a10066; - var a10067; - var a10068; - var a10069; - var a10070; - var a10071; - var a10072; - var a10073; - var a10074; - var a10075; - var a10076; - var a10077; - var a10078; - var a10079; - var a10080; - var a10081; - var a10082; - var a10083; - var a10084; - var a10085; - var a10086; - var a10087; - var a10088; - var a10089; - var a10090; - var a10091; - var a10092; - var a10093; - var a10094; - var a10095; - var a10096; - var a10097; - var a10098; - var a10099; - var a10100; - var a10101; - var a10102; - var a10103; - var a10104; - var a10105; - var a10106; - var a10107; - var a10108; - var a10109; - var a10110; - var a10111; - var a10112; - var a10113; - var a10114; - var a10115; - var a10116; - var a10117; - var a10118; - var a10119; - var a10120; - var a10121; - var a10122; - var a10123; - var a10124; - var a10125; - var a10126; - var a10127; - var a10128; - var a10129; - var a10130; - var a10131; - var a10132; - var a10133; - var a10134; - var a10135; - var a10136; - var a10137; - var a10138; - var a10139; - var a10140; - var a10141; - var a10142; - var a10143; - var a10144; - var a10145; - var a10146; - var a10147; - var a10148; - var a10149; - var a10150; - var a10151; - var a10152; - var a10153; - var a10154; - var a10155; - var a10156; - var a10157; - var a10158; - var a10159; - var a10160; - var a10161; - var a10162; - var a10163; - var a10164; - var a10165; - var a10166; - var a10167; - var a10168; - var a10169; - var a10170; - var a10171; - var a10172; - var a10173; - var a10174; - var a10175; - var a10176; - var a10177; - var a10178; - var a10179; - var a10180; - var a10181; - var a10182; - var a10183; - var a10184; - var a10185; - var a10186; - var a10187; - var a10188; - var a10189; - var a10190; - var a10191; - var a10192; - var a10193; - var a10194; - var a10195; - var a10196; - var a10197; - var a10198; - var a10199; - var a10200; - var a10201; - var a10202; - var a10203; - var a10204; - var a10205; - var a10206; - var a10207; - var a10208; - var a10209; - var a10210; - var a10211; - var a10212; - var a10213; - var a10214; - var a10215; - var a10216; - var a10217; - var a10218; - var a10219; - var a10220; - var a10221; - var a10222; - var a10223; - var a10224; - var a10225; - var a10226; - var a10227; - var a10228; - var a10229; - var a10230; - var a10231; - var a10232; - var a10233; - var a10234; - var a10235; - var a10236; - var a10237; - var a10238; - var a10239; - var a10240; - var a10241; - var a10242; - var a10243; - var a10244; - var a10245; - var a10246; - var a10247; - var a10248; - var a10249; - var a10250; - var a10251; - var a10252; - var a10253; - var a10254; - var a10255; - var a10256; - var a10257; - var a10258; - var a10259; - var a10260; - var a10261; - var a10262; - var a10263; - var a10264; - var a10265; - var a10266; - var a10267; - var a10268; - var a10269; - var a10270; - var a10271; - var a10272; - var a10273; - var a10274; - var a10275; - var a10276; - var a10277; - var a10278; - var a10279; - var a10280; - var a10281; - var a10282; - var a10283; - var a10284; - var a10285; - var a10286; - var a10287; - var a10288; - var a10289; - var a10290; - var a10291; - var a10292; - var a10293; - var a10294; - var a10295; - var a10296; - var a10297; - var a10298; - var a10299; - var a10300; - var a10301; - var a10302; - var a10303; - var a10304; - var a10305; - var a10306; - var a10307; - var a10308; - var a10309; - var a10310; - var a10311; - var a10312; - var a10313; - var a10314; - var a10315; - var a10316; - var a10317; - var a10318; - var a10319; - var a10320; - var a10321; - var a10322; - var a10323; - var a10324; - var a10325; - var a10326; - var a10327; - var a10328; - var a10329; - var a10330; - var a10331; - var a10332; - var a10333; - var a10334; - var a10335; - var a10336; - var a10337; - var a10338; - var a10339; - var a10340; - var a10341; - var a10342; - var a10343; - var a10344; - var a10345; - var a10346; - var a10347; - var a10348; - var a10349; - var a10350; - var a10351; - var a10352; - var a10353; - var a10354; - var a10355; - var a10356; - var a10357; - var a10358; - var a10359; - var a10360; - var a10361; - var a10362; - var a10363; - var a10364; - var a10365; - var a10366; - var a10367; - var a10368; - var a10369; - var a10370; - var a10371; - var a10372; - var a10373; - var a10374; - var a10375; - var a10376; - var a10377; - var a10378; - var a10379; - var a10380; - var a10381; - var a10382; - var a10383; - var a10384; - var a10385; - var a10386; - var a10387; - var a10388; - var a10389; - var a10390; - var a10391; - var a10392; - var a10393; - var a10394; - var a10395; - var a10396; - var a10397; - var a10398; - var a10399; - var a10400; - var a10401; - var a10402; - var a10403; - var a10404; - var a10405; - var a10406; - var a10407; - var a10408; - var a10409; - var a10410; - var a10411; - var a10412; - var a10413; - var a10414; - var a10415; - var a10416; - var a10417; - var a10418; - var a10419; - var a10420; - var a10421; - var a10422; - var a10423; - var a10424; - var a10425; - var a10426; - var a10427; - var a10428; - var a10429; - var a10430; - var a10431; - var a10432; - var a10433; - var a10434; - var a10435; - var a10436; - var a10437; - var a10438; - var a10439; - var a10440; - var a10441; - var a10442; - var a10443; - var a10444; - var a10445; - var a10446; - var a10447; - var a10448; - var a10449; - var a10450; - var a10451; - var a10452; - var a10453; - var a10454; - var a10455; - var a10456; - var a10457; - var a10458; - var a10459; - var a10460; - var a10461; - var a10462; - var a10463; - var a10464; - var a10465; - var a10466; - var a10467; - var a10468; - var a10469; - var a10470; - var a10471; - var a10472; - var a10473; - var a10474; - var a10475; - var a10476; - var a10477; - var a10478; - var a10479; - var a10480; - var a10481; - var a10482; - var a10483; - var a10484; - var a10485; - var a10486; - var a10487; - var a10488; - var a10489; - var a10490; - var a10491; - var a10492; - var a10493; - var a10494; - var a10495; - var a10496; - var a10497; - var a10498; - var a10499; - var a10500; - var a10501; - var a10502; - var a10503; - var a10504; - var a10505; - var a10506; - var a10507; - var a10508; - var a10509; - var a10510; - var a10511; - var a10512; - var a10513; - var a10514; - var a10515; - var a10516; - var a10517; - var a10518; - var a10519; - var a10520; - var a10521; - var a10522; - var a10523; - var a10524; - var a10525; - var a10526; - var a10527; - var a10528; - var a10529; - var a10530; - var a10531; - var a10532; - var a10533; - var a10534; - var a10535; - var a10536; - var a10537; - var a10538; - var a10539; - var a10540; - var a10541; - var a10542; - var a10543; - var a10544; - var a10545; - var a10546; - var a10547; - var a10548; - var a10549; - var a10550; - var a10551; - var a10552; - var a10553; - var a10554; - var a10555; - var a10556; - var a10557; - var a10558; - var a10559; - var a10560; - var a10561; - var a10562; - var a10563; - var a10564; - var a10565; - var a10566; - var a10567; - var a10568; - var a10569; - var a10570; - var a10571; - var a10572; - var a10573; - var a10574; - var a10575; - var a10576; - var a10577; - var a10578; - var a10579; - var a10580; - var a10581; - var a10582; - var a10583; - var a10584; - var a10585; - var a10586; - var a10587; - var a10588; - var a10589; - var a10590; - var a10591; - var a10592; - var a10593; - var a10594; - var a10595; - var a10596; - var a10597; - var a10598; - var a10599; - var a10600; - var a10601; - var a10602; - var a10603; - var a10604; - var a10605; - var a10606; - var a10607; - var a10608; - var a10609; - var a10610; - var a10611; - var a10612; - var a10613; - var a10614; - var a10615; - var a10616; - var a10617; - var a10618; - var a10619; - var a10620; - var a10621; - var a10622; - var a10623; - var a10624; - var a10625; - var a10626; - var a10627; - var a10628; - var a10629; - var a10630; - var a10631; - var a10632; - var a10633; - var a10634; - var a10635; - var a10636; - var a10637; - var a10638; - var a10639; - var a10640; - var a10641; - var a10642; - var a10643; - var a10644; - var a10645; - var a10646; - var a10647; - var a10648; - var a10649; - var a10650; - var a10651; - var a10652; - var a10653; - var a10654; - var a10655; - var a10656; - var a10657; - var a10658; - var a10659; - var a10660; - var a10661; - var a10662; - var a10663; - var a10664; - var a10665; - var a10666; - var a10667; - var a10668; - var a10669; - var a10670; - var a10671; - var a10672; - var a10673; - var a10674; - var a10675; - var a10676; - var a10677; - var a10678; - var a10679; - var a10680; - var a10681; - var a10682; - var a10683; - var a10684; - var a10685; - var a10686; - var a10687; - var a10688; - var a10689; - var a10690; - var a10691; - var a10692; - var a10693; - var a10694; - var a10695; - var a10696; - var a10697; - var a10698; - var a10699; - var a10700; - var a10701; - var a10702; - var a10703; - var a10704; - var a10705; - var a10706; - var a10707; - var a10708; - var a10709; - var a10710; - var a10711; - var a10712; - var a10713; - var a10714; - var a10715; - var a10716; - var a10717; - var a10718; - var a10719; - var a10720; - var a10721; - var a10722; - var a10723; - var a10724; - var a10725; - var a10726; - var a10727; - var a10728; - var a10729; - var a10730; - var a10731; - var a10732; - var a10733; - var a10734; - var a10735; - var a10736; - var a10737; - var a10738; - var a10739; - var a10740; - var a10741; - var a10742; - var a10743; - var a10744; - var a10745; - var a10746; - var a10747; - var a10748; - var a10749; - var a10750; - var a10751; - var a10752; - var a10753; - var a10754; - var a10755; - var a10756; - var a10757; - var a10758; - var a10759; - var a10760; - var a10761; - var a10762; - var a10763; - var a10764; - var a10765; - var a10766; - var a10767; - var a10768; - var a10769; - var a10770; - var a10771; - var a10772; - var a10773; - var a10774; - var a10775; - var a10776; - var a10777; - var a10778; - var a10779; - var a10780; - var a10781; - var a10782; - var a10783; - var a10784; - var a10785; - var a10786; - var a10787; - var a10788; - var a10789; - var a10790; - var a10791; - var a10792; - var a10793; - var a10794; - var a10795; - var a10796; - var a10797; - var a10798; - var a10799; - var a10800; - var a10801; - var a10802; - var a10803; - var a10804; - var a10805; - var a10806; - var a10807; - var a10808; - var a10809; - var a10810; - var a10811; - var a10812; - var a10813; - var a10814; - var a10815; - var a10816; - var a10817; - var a10818; - var a10819; - var a10820; - var a10821; - var a10822; - var a10823; - var a10824; - var a10825; - var a10826; - var a10827; - var a10828; - var a10829; - var a10830; - var a10831; - var a10832; - var a10833; - var a10834; - var a10835; - var a10836; - var a10837; - var a10838; - var a10839; - var a10840; - var a10841; - var a10842; - var a10843; - var a10844; - var a10845; - var a10846; - var a10847; - var a10848; - var a10849; - var a10850; - var a10851; - var a10852; - var a10853; - var a10854; - var a10855; - var a10856; - var a10857; - var a10858; - var a10859; - var a10860; - var a10861; - var a10862; - var a10863; - var a10864; - var a10865; - var a10866; - var a10867; - var a10868; - var a10869; - var a10870; - var a10871; - var a10872; - var a10873; - var a10874; - var a10875; - var a10876; - var a10877; - var a10878; - var a10879; - var a10880; - var a10881; - var a10882; - var a10883; - var a10884; - var a10885; - var a10886; - var a10887; - var a10888; - var a10889; - var a10890; - var a10891; - var a10892; - var a10893; - var a10894; - var a10895; - var a10896; - var a10897; - var a10898; - var a10899; - var a10900; - var a10901; - var a10902; - var a10903; - var a10904; - var a10905; - var a10906; - var a10907; - var a10908; - var a10909; - var a10910; - var a10911; - var a10912; - var a10913; - var a10914; - var a10915; - var a10916; - var a10917; - var a10918; - var a10919; - var a10920; - var a10921; - var a10922; - var a10923; - var a10924; - var a10925; - var a10926; - var a10927; - var a10928; - var a10929; - var a10930; - var a10931; - var a10932; - var a10933; - var a10934; - var a10935; - var a10936; - var a10937; - var a10938; - var a10939; - var a10940; - var a10941; - var a10942; - var a10943; - var a10944; - var a10945; - var a10946; - var a10947; - var a10948; - var a10949; - var a10950; - var a10951; - var a10952; - var a10953; - var a10954; - var a10955; - var a10956; - var a10957; - var a10958; - var a10959; - var a10960; - var a10961; - var a10962; - var a10963; - var a10964; - var a10965; - var a10966; - var a10967; - var a10968; - var a10969; - var a10970; - var a10971; - var a10972; - var a10973; - var a10974; - var a10975; - var a10976; - var a10977; - var a10978; - var a10979; - var a10980; - var a10981; - var a10982; - var a10983; - var a10984; - var a10985; - var a10986; - var a10987; - var a10988; - var a10989; - var a10990; - var a10991; - var a10992; - var a10993; - var a10994; - var a10995; - var a10996; - var a10997; - var a10998; - var a10999; - var a11000; - var a11001; - var a11002; - var a11003; - var a11004; - var a11005; - var a11006; - var a11007; - var a11008; - var a11009; - var a11010; - var a11011; - var a11012; - var a11013; - var a11014; - var a11015; - var a11016; - var a11017; - var a11018; - var a11019; - var a11020; - var a11021; - var a11022; - var a11023; - var a11024; - var a11025; - var a11026; - var a11027; - var a11028; - var a11029; - var a11030; - var a11031; - var a11032; - var a11033; - var a11034; - var a11035; - var a11036; - var a11037; - var a11038; - var a11039; - var a11040; - var a11041; - var a11042; - var a11043; - var a11044; - var a11045; - var a11046; - var a11047; - var a11048; - var a11049; - var a11050; - var a11051; - var a11052; - var a11053; - var a11054; - var a11055; - var a11056; - var a11057; - var a11058; - var a11059; - var a11060; - var a11061; - var a11062; - var a11063; - var a11064; - var a11065; - var a11066; - var a11067; - var a11068; - var a11069; - var a11070; - var a11071; - var a11072; - var a11073; - var a11074; - var a11075; - var a11076; - var a11077; - var a11078; - var a11079; - var a11080; - var a11081; - var a11082; - var a11083; - var a11084; - var a11085; - var a11086; - var a11087; - var a11088; - var a11089; - var a11090; - var a11091; - var a11092; - var a11093; - var a11094; - var a11095; - var a11096; - var a11097; - var a11098; - var a11099; - var a11100; - var a11101; - var a11102; - var a11103; - var a11104; - var a11105; - var a11106; - var a11107; - var a11108; - var a11109; - var a11110; - var a11111; - var a11112; - var a11113; - var a11114; - var a11115; - var a11116; - var a11117; - var a11118; - var a11119; - var a11120; - var a11121; - var a11122; - var a11123; - var a11124; - var a11125; - var a11126; - var a11127; - var a11128; - var a11129; - var a11130; - var a11131; - var a11132; - var a11133; - var a11134; - var a11135; - var a11136; - var a11137; - var a11138; - var a11139; - var a11140; - var a11141; - var a11142; - var a11143; - var a11144; - var a11145; - var a11146; - var a11147; - var a11148; - var a11149; - var a11150; - var a11151; - var a11152; - var a11153; - var a11154; - var a11155; - var a11156; - var a11157; - var a11158; - var a11159; - var a11160; - var a11161; - var a11162; - var a11163; - var a11164; - var a11165; - var a11166; - var a11167; - var a11168; - var a11169; - var a11170; - var a11171; - var a11172; - var a11173; - var a11174; - var a11175; - var a11176; - var a11177; - var a11178; - var a11179; - var a11180; - var a11181; - var a11182; - var a11183; - var a11184; - var a11185; - var a11186; - var a11187; - var a11188; - var a11189; - var a11190; - var a11191; - var a11192; - var a11193; - var a11194; - var a11195; - var a11196; - var a11197; - var a11198; - var a11199; - var a11200; - var a11201; - var a11202; - var a11203; - var a11204; - var a11205; - var a11206; - var a11207; - var a11208; - var a11209; - var a11210; - var a11211; - var a11212; - var a11213; - var a11214; - var a11215; - var a11216; - var a11217; - var a11218; - var a11219; - var a11220; - var a11221; - var a11222; - var a11223; - var a11224; - var a11225; - var a11226; - var a11227; - var a11228; - var a11229; - var a11230; - var a11231; - var a11232; - var a11233; - var a11234; - var a11235; - var a11236; - var a11237; - var a11238; - var a11239; - var a11240; - var a11241; - var a11242; - var a11243; - var a11244; - var a11245; - var a11246; - var a11247; - var a11248; - var a11249; - var a11250; - var a11251; - var a11252; - var a11253; - var a11254; - var a11255; - var a11256; - var a11257; - var a11258; - var a11259; - var a11260; - var a11261; - var a11262; - var a11263; - var a11264; - var a11265; - var a11266; - var a11267; - var a11268; - var a11269; - var a11270; - var a11271; - var a11272; - var a11273; - var a11274; - var a11275; - var a11276; - var a11277; - var a11278; - var a11279; - var a11280; - var a11281; - var a11282; - var a11283; - var a11284; - var a11285; - var a11286; - var a11287; - var a11288; - var a11289; - var a11290; - var a11291; - var a11292; - var a11293; - var a11294; - var a11295; - var a11296; - var a11297; - var a11298; - var a11299; - var a11300; - var a11301; - var a11302; - var a11303; - var a11304; - var a11305; - var a11306; - var a11307; - var a11308; - var a11309; - var a11310; - var a11311; - var a11312; - var a11313; - var a11314; - var a11315; - var a11316; - var a11317; - var a11318; - var a11319; - var a11320; - var a11321; - var a11322; - var a11323; - var a11324; - var a11325; - var a11326; - var a11327; - var a11328; - var a11329; - var a11330; - var a11331; - var a11332; - var a11333; - var a11334; - var a11335; - var a11336; - var a11337; - var a11338; - var a11339; - var a11340; - var a11341; - var a11342; - var a11343; - var a11344; - var a11345; - var a11346; - var a11347; - var a11348; - var a11349; - var a11350; - var a11351; - var a11352; - var a11353; - var a11354; - var a11355; - var a11356; - var a11357; - var a11358; - var a11359; - var a11360; - var a11361; - var a11362; - var a11363; - var a11364; - var a11365; - var a11366; - var a11367; - var a11368; - var a11369; - var a11370; - var a11371; - var a11372; - var a11373; - var a11374; - var a11375; - var a11376; - var a11377; - var a11378; - var a11379; - var a11380; - var a11381; - var a11382; - var a11383; - var a11384; - var a11385; - var a11386; - var a11387; - var a11388; - var a11389; - var a11390; - var a11391; - var a11392; - var a11393; - var a11394; - var a11395; - var a11396; - var a11397; - var a11398; - var a11399; - var a11400; - var a11401; - var a11402; - var a11403; - var a11404; - var a11405; - var a11406; - var a11407; - var a11408; - var a11409; - var a11410; - var a11411; - var a11412; - var a11413; - var a11414; - var a11415; - var a11416; - var a11417; - var a11418; - var a11419; - var a11420; - var a11421; - var a11422; - var a11423; - var a11424; - var a11425; - var a11426; - var a11427; - var a11428; - var a11429; - var a11430; - var a11431; - var a11432; - var a11433; - var a11434; - var a11435; - var a11436; - var a11437; - var a11438; - var a11439; - var a11440; - var a11441; - var a11442; - var a11443; - var a11444; - var a11445; - var a11446; - var a11447; - var a11448; - var a11449; - var a11450; - var a11451; - var a11452; - var a11453; - var a11454; - var a11455; - var a11456; - var a11457; - var a11458; - var a11459; - var a11460; - var a11461; - var a11462; - var a11463; - var a11464; - var a11465; - var a11466; - var a11467; - var a11468; - var a11469; - var a11470; - var a11471; - var a11472; - var a11473; - var a11474; - var a11475; - var a11476; - var a11477; - var a11478; - var a11479; - var a11480; - var a11481; - var a11482; - var a11483; - var a11484; - var a11485; - var a11486; - var a11487; - var a11488; - var a11489; - var a11490; - var a11491; - var a11492; - var a11493; - var a11494; - var a11495; - var a11496; - var a11497; - var a11498; - var a11499; - var a11500; - var a11501; - var a11502; - var a11503; - var a11504; - var a11505; - var a11506; - var a11507; - var a11508; - var a11509; - var a11510; - var a11511; - var a11512; - var a11513; - var a11514; - var a11515; - var a11516; - var a11517; - var a11518; - var a11519; - var a11520; - var a11521; - var a11522; - var a11523; - var a11524; - var a11525; - var a11526; - var a11527; - var a11528; - var a11529; - var a11530; - var a11531; - var a11532; - var a11533; - var a11534; - var a11535; - var a11536; - var a11537; - var a11538; - var a11539; - var a11540; - var a11541; - var a11542; - var a11543; - var a11544; - var a11545; - var a11546; - var a11547; - var a11548; - var a11549; - var a11550; - var a11551; - var a11552; - var a11553; - var a11554; - var a11555; - var a11556; - var a11557; - var a11558; - var a11559; - var a11560; - var a11561; - var a11562; - var a11563; - var a11564; - var a11565; - var a11566; - var a11567; - var a11568; - var a11569; - var a11570; - var a11571; - var a11572; - var a11573; - var a11574; - var a11575; - var a11576; - var a11577; - var a11578; - var a11579; - var a11580; - var a11581; - var a11582; - var a11583; - var a11584; - var a11585; - var a11586; - var a11587; - var a11588; - var a11589; - var a11590; - var a11591; - var a11592; - var a11593; - var a11594; - var a11595; - var a11596; - var a11597; - var a11598; - var a11599; - var a11600; - var a11601; - var a11602; - var a11603; - var a11604; - var a11605; - var a11606; - var a11607; - var a11608; - var a11609; - var a11610; - var a11611; - var a11612; - var a11613; - var a11614; - var a11615; - var a11616; - var a11617; - var a11618; - var a11619; - var a11620; - var a11621; - var a11622; - var a11623; - var a11624; - var a11625; - var a11626; - var a11627; - var a11628; - var a11629; - var a11630; - var a11631; - var a11632; - var a11633; - var a11634; - var a11635; - var a11636; - var a11637; - var a11638; - var a11639; - var a11640; - var a11641; - var a11642; - var a11643; - var a11644; - var a11645; - var a11646; - var a11647; - var a11648; - var a11649; - var a11650; - var a11651; - var a11652; - var a11653; - var a11654; - var a11655; - var a11656; - var a11657; - var a11658; - var a11659; - var a11660; - var a11661; - var a11662; - var a11663; - var a11664; - var a11665; - var a11666; - var a11667; - var a11668; - var a11669; - var a11670; - var a11671; - var a11672; - var a11673; - var a11674; - var a11675; - var a11676; - var a11677; - var a11678; - var a11679; - var a11680; - var a11681; - var a11682; - var a11683; - var a11684; - var a11685; - var a11686; - var a11687; - var a11688; - var a11689; - var a11690; - var a11691; - var a11692; - var a11693; - var a11694; - var a11695; - var a11696; - var a11697; - var a11698; - var a11699; - var a11700; - var a11701; - var a11702; - var a11703; - var a11704; - var a11705; - var a11706; - var a11707; - var a11708; - var a11709; - var a11710; - var a11711; - var a11712; - var a11713; - var a11714; - var a11715; - var a11716; - var a11717; - var a11718; - var a11719; - var a11720; - var a11721; - var a11722; - var a11723; - var a11724; - var a11725; - var a11726; - var a11727; - var a11728; - var a11729; - var a11730; - var a11731; - var a11732; - var a11733; - var a11734; - var a11735; - var a11736; - var a11737; - var a11738; - var a11739; - var a11740; - var a11741; - var a11742; - var a11743; - var a11744; - var a11745; - var a11746; - var a11747; - var a11748; - var a11749; - var a11750; - var a11751; - var a11752; - var a11753; - var a11754; - var a11755; - var a11756; - var a11757; - var a11758; - var a11759; - var a11760; - var a11761; - var a11762; - var a11763; - var a11764; - var a11765; - var a11766; - var a11767; - var a11768; - var a11769; - var a11770; - var a11771; - var a11772; - var a11773; - var a11774; - var a11775; - var a11776; - var a11777; - var a11778; - var a11779; - var a11780; - var a11781; - var a11782; - var a11783; - var a11784; - var a11785; - var a11786; - var a11787; - var a11788; - var a11789; - var a11790; - var a11791; - var a11792; - var a11793; - var a11794; - var a11795; - var a11796; - var a11797; - var a11798; - var a11799; - var a11800; - var a11801; - var a11802; - var a11803; - var a11804; - var a11805; - var a11806; - var a11807; - var a11808; - var a11809; - var a11810; - var a11811; - var a11812; - var a11813; - var a11814; - var a11815; - var a11816; - var a11817; - var a11818; - var a11819; - var a11820; - var a11821; - var a11822; - var a11823; - var a11824; - var a11825; - var a11826; - var a11827; - var a11828; - var a11829; - var a11830; - var a11831; - var a11832; - var a11833; - var a11834; - var a11835; - var a11836; - var a11837; - var a11838; - var a11839; - var a11840; - var a11841; - var a11842; - var a11843; - var a11844; - var a11845; - var a11846; - var a11847; - var a11848; - var a11849; - var a11850; - var a11851; - var a11852; - var a11853; - var a11854; - var a11855; - var a11856; - var a11857; - var a11858; - var a11859; - var a11860; - var a11861; - var a11862; - var a11863; - var a11864; - var a11865; - var a11866; - var a11867; - var a11868; - var a11869; - var a11870; - var a11871; - var a11872; - var a11873; - var a11874; - var a11875; - var a11876; - var a11877; - var a11878; - var a11879; - var a11880; - var a11881; - var a11882; - var a11883; - var a11884; - var a11885; - var a11886; - var a11887; - var a11888; - var a11889; - var a11890; - var a11891; - var a11892; - var a11893; - var a11894; - var a11895; - var a11896; - var a11897; - var a11898; - var a11899; - var a11900; - var a11901; - var a11902; - var a11903; - var a11904; - var a11905; - var a11906; - var a11907; - var a11908; - var a11909; - var a11910; - var a11911; - var a11912; - var a11913; - var a11914; - var a11915; - var a11916; - var a11917; - var a11918; - var a11919; - var a11920; - var a11921; - var a11922; - var a11923; - var a11924; - var a11925; - var a11926; - var a11927; - var a11928; - var a11929; - var a11930; - var a11931; - var a11932; - var a11933; - var a11934; - var a11935; - var a11936; - var a11937; - var a11938; - var a11939; - var a11940; - var a11941; - var a11942; - var a11943; - var a11944; - var a11945; - var a11946; - var a11947; - var a11948; - var a11949; - var a11950; - var a11951; - var a11952; - var a11953; - var a11954; - var a11955; - var a11956; - var a11957; - var a11958; - var a11959; - var a11960; - var a11961; - var a11962; - var a11963; - var a11964; - var a11965; - var a11966; - var a11967; - var a11968; - var a11969; - var a11970; - var a11971; - var a11972; - var a11973; - var a11974; - var a11975; - var a11976; - var a11977; - var a11978; - var a11979; - var a11980; - var a11981; - var a11982; - var a11983; - var a11984; - var a11985; - var a11986; - var a11987; - var a11988; - var a11989; - var a11990; - var a11991; - var a11992; - var a11993; - var a11994; - var a11995; - var a11996; - var a11997; - var a11998; - var a11999; - var a12000; - var a12001; - var a12002; - var a12003; - var a12004; - var a12005; - var a12006; - var a12007; - var a12008; - var a12009; - var a12010; - var a12011; - var a12012; - var a12013; - var a12014; - var a12015; - var a12016; - var a12017; - var a12018; - var a12019; - var a12020; - var a12021; - var a12022; - var a12023; - var a12024; - var a12025; - var a12026; - var a12027; - var a12028; - var a12029; - var a12030; - var a12031; - var a12032; - var a12033; - var a12034; - var a12035; - var a12036; - var a12037; - var a12038; - var a12039; - var a12040; - var a12041; - var a12042; - var a12043; - var a12044; - var a12045; - var a12046; - var a12047; - var a12048; - var a12049; - var a12050; - var a12051; - var a12052; - var a12053; - var a12054; - var a12055; - var a12056; - var a12057; - var a12058; - var a12059; - var a12060; - var a12061; - var a12062; - var a12063; - var a12064; - var a12065; - var a12066; - var a12067; - var a12068; - var a12069; - var a12070; - var a12071; - var a12072; - var a12073; - var a12074; - var a12075; - var a12076; - var a12077; - var a12078; - var a12079; - var a12080; - var a12081; - var a12082; - var a12083; - var a12084; - var a12085; - var a12086; - var a12087; - var a12088; - var a12089; - var a12090; - var a12091; - var a12092; - var a12093; - var a12094; - var a12095; - var a12096; - var a12097; - var a12098; - var a12099; - var a12100; - var a12101; - var a12102; - var a12103; - var a12104; - var a12105; - var a12106; - var a12107; - var a12108; - var a12109; - var a12110; - var a12111; - var a12112; - var a12113; - var a12114; - var a12115; - var a12116; - var a12117; - var a12118; - var a12119; - var a12120; - var a12121; - var a12122; - var a12123; - var a12124; - var a12125; - var a12126; - var a12127; - var a12128; - var a12129; - var a12130; - var a12131; - var a12132; - var a12133; - var a12134; - var a12135; - var a12136; - var a12137; - var a12138; - var a12139; - var a12140; - var a12141; - var a12142; - var a12143; - var a12144; - var a12145; - var a12146; - var a12147; - var a12148; - var a12149; - var a12150; - var a12151; - var a12152; - var a12153; - var a12154; - var a12155; - var a12156; - var a12157; - var a12158; - var a12159; - var a12160; - var a12161; - var a12162; - var a12163; - var a12164; - var a12165; - var a12166; - var a12167; - var a12168; - var a12169; - var a12170; - var a12171; - var a12172; - var a12173; - var a12174; - var a12175; - var a12176; - var a12177; - var a12178; - var a12179; - var a12180; - var a12181; - var a12182; - var a12183; - var a12184; - var a12185; - var a12186; - var a12187; - var a12188; - var a12189; - var a12190; - var a12191; - var a12192; - var a12193; - var a12194; - var a12195; - var a12196; - var a12197; - var a12198; - var a12199; - var a12200; - var a12201; - var a12202; - var a12203; - var a12204; - var a12205; - var a12206; - var a12207; - var a12208; - var a12209; - var a12210; - var a12211; - var a12212; - var a12213; - var a12214; - var a12215; - var a12216; - var a12217; - var a12218; - var a12219; - var a12220; - var a12221; - var a12222; - var a12223; - var a12224; - var a12225; - var a12226; - var a12227; - var a12228; - var a12229; - var a12230; - var a12231; - var a12232; - var a12233; - var a12234; - var a12235; - var a12236; - var a12237; - var a12238; - var a12239; - var a12240; - var a12241; - var a12242; - var a12243; - var a12244; - var a12245; - var a12246; - var a12247; - var a12248; - var a12249; - var a12250; - var a12251; - var a12252; - var a12253; - var a12254; - var a12255; - var a12256; - var a12257; - var a12258; - var a12259; - var a12260; - var a12261; - var a12262; - var a12263; - var a12264; - var a12265; - var a12266; - var a12267; - var a12268; - var a12269; - var a12270; - var a12271; - var a12272; - var a12273; - var a12274; - var a12275; - var a12276; - var a12277; - var a12278; - var a12279; - var a12280; - var a12281; - var a12282; - var a12283; - var a12284; - var a12285; - var a12286; - var a12287; - var a12288; - var a12289; - var a12290; - var a12291; - var a12292; - var a12293; - var a12294; - var a12295; - var a12296; - var a12297; - var a12298; - var a12299; - var a12300; - var a12301; - var a12302; - var a12303; - var a12304; - var a12305; - var a12306; - var a12307; - var a12308; - var a12309; - var a12310; - var a12311; - var a12312; - var a12313; - var a12314; - var a12315; - var a12316; - var a12317; - var a12318; - var a12319; - var a12320; - var a12321; - var a12322; - var a12323; - var a12324; - var a12325; - var a12326; - var a12327; - var a12328; - var a12329; - var a12330; - var a12331; - var a12332; - var a12333; - var a12334; - var a12335; - var a12336; - var a12337; - var a12338; - var a12339; - var a12340; - var a12341; - var a12342; - var a12343; - var a12344; - var a12345; - var a12346; - var a12347; - var a12348; - var a12349; - var a12350; - var a12351; - var a12352; - var a12353; - var a12354; - var a12355; - var a12356; - var a12357; - var a12358; - var a12359; - var a12360; - var a12361; - var a12362; - var a12363; - var a12364; - var a12365; - var a12366; - var a12367; - var a12368; - var a12369; - var a12370; - var a12371; - var a12372; - var a12373; - var a12374; - var a12375; - var a12376; - var a12377; - var a12378; - var a12379; - var a12380; - var a12381; - var a12382; - var a12383; - var a12384; - var a12385; - var a12386; - var a12387; - var a12388; - var a12389; - var a12390; - var a12391; - var a12392; - var a12393; - var a12394; - var a12395; - var a12396; - var a12397; - var a12398; - var a12399; - var a12400; - var a12401; - var a12402; - var a12403; - var a12404; - var a12405; - var a12406; - var a12407; - var a12408; - var a12409; - var a12410; - var a12411; - var a12412; - var a12413; - var a12414; - var a12415; - var a12416; - var a12417; - var a12418; - var a12419; - var a12420; - var a12421; - var a12422; - var a12423; - var a12424; - var a12425; - var a12426; - var a12427; - var a12428; - var a12429; - var a12430; - var a12431; - var a12432; - var a12433; - var a12434; - var a12435; - var a12436; - var a12437; - var a12438; - var a12439; - var a12440; - var a12441; - var a12442; - var a12443; - var a12444; - var a12445; - var a12446; - var a12447; - var a12448; - var a12449; - var a12450; - var a12451; - var a12452; - var a12453; - var a12454; - var a12455; - var a12456; - var a12457; - var a12458; - var a12459; - var a12460; - var a12461; - var a12462; - var a12463; - var a12464; - var a12465; - var a12466; - var a12467; - var a12468; - var a12469; - var a12470; - var a12471; - var a12472; - var a12473; - var a12474; - var a12475; - var a12476; - var a12477; - var a12478; - var a12479; - var a12480; - var a12481; - var a12482; - var a12483; - var a12484; - var a12485; - var a12486; - var a12487; - var a12488; - var a12489; - var a12490; - var a12491; - var a12492; - var a12493; - var a12494; - var a12495; - var a12496; - var a12497; - var a12498; - var a12499; - var a12500; - var a12501; - var a12502; - var a12503; - var a12504; - var a12505; - var a12506; - var a12507; - var a12508; - var a12509; - var a12510; - var a12511; - var a12512; - var a12513; - var a12514; - var a12515; - var a12516; - var a12517; - var a12518; - var a12519; - var a12520; - var a12521; - var a12522; - var a12523; - var a12524; - var a12525; - var a12526; - var a12527; - var a12528; - var a12529; - var a12530; - var a12531; - var a12532; - var a12533; - var a12534; - var a12535; - var a12536; - var a12537; - var a12538; - var a12539; - var a12540; - var a12541; - var a12542; - var a12543; - var a12544; - var a12545; - var a12546; - var a12547; - var a12548; - var a12549; - var a12550; - var a12551; - var a12552; - var a12553; - var a12554; - var a12555; - var a12556; - var a12557; - var a12558; - var a12559; - var a12560; - var a12561; - var a12562; - var a12563; - var a12564; - var a12565; - var a12566; - var a12567; - var a12568; - var a12569; - var a12570; - var a12571; - var a12572; - var a12573; - var a12574; - var a12575; - var a12576; - var a12577; - var a12578; - var a12579; - var a12580; - var a12581; - var a12582; - var a12583; - var a12584; - var a12585; - var a12586; - var a12587; - var a12588; - var a12589; - var a12590; - var a12591; - var a12592; - var a12593; - var a12594; - var a12595; - var a12596; - var a12597; - var a12598; - var a12599; - var a12600; - var a12601; - var a12602; - var a12603; - var a12604; - var a12605; - var a12606; - var a12607; - var a12608; - var a12609; - var a12610; - var a12611; - var a12612; - var a12613; - var a12614; - var a12615; - var a12616; - var a12617; - var a12618; - var a12619; - var a12620; - var a12621; - var a12622; - var a12623; - var a12624; - var a12625; - var a12626; - var a12627; - var a12628; - var a12629; - var a12630; - var a12631; - var a12632; - var a12633; - var a12634; - var a12635; - var a12636; - var a12637; - var a12638; - var a12639; - var a12640; - var a12641; - var a12642; - var a12643; - var a12644; - var a12645; - var a12646; - var a12647; - var a12648; - var a12649; - var a12650; - var a12651; - var a12652; - var a12653; - var a12654; - var a12655; - var a12656; - var a12657; - var a12658; - var a12659; - var a12660; - var a12661; - var a12662; - var a12663; - var a12664; - var a12665; - var a12666; - var a12667; - var a12668; - var a12669; - var a12670; - var a12671; - var a12672; - var a12673; - var a12674; - var a12675; - var a12676; - var a12677; - var a12678; - var a12679; - var a12680; - var a12681; - var a12682; - var a12683; - var a12684; - var a12685; - var a12686; - var a12687; - var a12688; - var a12689; - var a12690; - var a12691; - var a12692; - var a12693; - var a12694; - var a12695; - var a12696; - var a12697; - var a12698; - var a12699; - var a12700; - var a12701; - var a12702; - var a12703; - var a12704; - var a12705; - var a12706; - var a12707; - var a12708; - var a12709; - var a12710; - var a12711; - var a12712; - var a12713; - var a12714; - var a12715; - var a12716; - var a12717; - var a12718; - var a12719; - var a12720; - var a12721; - var a12722; - var a12723; - var a12724; - var a12725; - var a12726; - var a12727; - var a12728; - var a12729; - var a12730; - var a12731; - var a12732; - var a12733; - var a12734; - var a12735; - var a12736; - var a12737; - var a12738; - var a12739; - var a12740; - var a12741; - var a12742; - var a12743; - var a12744; - var a12745; - var a12746; - var a12747; - var a12748; - var a12749; - var a12750; - var a12751; - var a12752; - var a12753; - var a12754; - var a12755; - var a12756; - var a12757; - var a12758; - var a12759; - var a12760; - var a12761; - var a12762; - var a12763; - var a12764; - var a12765; - var a12766; - var a12767; - var a12768; - var a12769; - var a12770; - var a12771; - var a12772; - var a12773; - var a12774; - var a12775; - var a12776; - var a12777; - var a12778; - var a12779; - var a12780; - var a12781; - var a12782; - var a12783; - var a12784; - var a12785; - var a12786; - var a12787; - var a12788; - var a12789; - var a12790; - var a12791; - var a12792; - var a12793; - var a12794; - var a12795; - var a12796; - var a12797; - var a12798; - var a12799; - var a12800; - var a12801; - var a12802; - var a12803; - var a12804; - var a12805; - var a12806; - var a12807; - var a12808; - var a12809; - var a12810; - var a12811; - var a12812; - var a12813; - var a12814; - var a12815; - var a12816; - var a12817; - var a12818; - var a12819; - var a12820; - var a12821; - var a12822; - var a12823; - var a12824; - var a12825; - var a12826; - var a12827; - var a12828; - var a12829; - var a12830; - var a12831; - var a12832; - var a12833; - var a12834; - var a12835; - var a12836; - var a12837; - var a12838; - var a12839; - var a12840; - var a12841; - var a12842; - var a12843; - var a12844; - var a12845; - var a12846; - var a12847; - var a12848; - var a12849; - var a12850; - var a12851; - var a12852; - var a12853; - var a12854; - var a12855; - var a12856; - var a12857; - var a12858; - var a12859; - var a12860; - var a12861; - var a12862; - var a12863; - var a12864; - var a12865; - var a12866; - var a12867; - var a12868; - var a12869; - var a12870; - var a12871; - var a12872; - var a12873; - var a12874; - var a12875; - var a12876; - var a12877; - var a12878; - var a12879; - var a12880; - var a12881; - var a12882; - var a12883; - var a12884; - var a12885; - var a12886; - var a12887; - var a12888; - var a12889; - var a12890; - var a12891; - var a12892; - var a12893; - var a12894; - var a12895; - var a12896; - var a12897; - var a12898; - var a12899; - var a12900; - var a12901; - var a12902; - var a12903; - var a12904; - var a12905; - var a12906; - var a12907; - var a12908; - var a12909; - var a12910; - var a12911; - var a12912; - var a12913; - var a12914; - var a12915; - var a12916; - var a12917; - var a12918; - var a12919; - var a12920; - var a12921; - var a12922; - var a12923; - var a12924; - var a12925; - var a12926; - var a12927; - var a12928; - var a12929; - var a12930; - var a12931; - var a12932; - var a12933; - var a12934; - var a12935; - var a12936; - var a12937; - var a12938; - var a12939; - var a12940; - var a12941; - var a12942; - var a12943; - var a12944; - var a12945; - var a12946; - var a12947; - var a12948; - var a12949; - var a12950; - var a12951; - var a12952; - var a12953; - var a12954; - var a12955; - var a12956; - var a12957; - var a12958; - var a12959; - var a12960; - var a12961; - var a12962; - var a12963; - var a12964; - var a12965; - var a12966; - var a12967; - var a12968; - var a12969; - var a12970; - var a12971; - var a12972; - var a12973; - var a12974; - var a12975; - var a12976; - var a12977; - var a12978; - var a12979; - var a12980; - var a12981; - var a12982; - var a12983; - var a12984; - var a12985; - var a12986; - var a12987; - var a12988; - var a12989; - var a12990; - var a12991; - var a12992; - var a12993; - var a12994; - var a12995; - var a12996; - var a12997; - var a12998; - var a12999; - var a13000; - var a13001; - var a13002; - var a13003; - var a13004; - var a13005; - var a13006; - var a13007; - var a13008; - var a13009; - var a13010; - var a13011; - var a13012; - var a13013; - var a13014; - var a13015; - var a13016; - var a13017; - var a13018; - var a13019; - var a13020; - var a13021; - var a13022; - var a13023; - var a13024; - var a13025; - var a13026; - var a13027; - var a13028; - var a13029; - var a13030; - var a13031; - var a13032; - var a13033; - var a13034; - var a13035; - var a13036; - var a13037; - var a13038; - var a13039; - var a13040; - var a13041; - var a13042; - var a13043; - var a13044; - var a13045; - var a13046; - var a13047; - var a13048; - var a13049; - var a13050; - var a13051; - var a13052; - var a13053; - var a13054; - var a13055; - var a13056; - var a13057; - var a13058; - var a13059; - var a13060; - var a13061; - var a13062; - var a13063; - var a13064; - var a13065; - var a13066; - var a13067; - var a13068; - var a13069; - var a13070; - var a13071; - var a13072; - var a13073; - var a13074; - var a13075; - var a13076; - var a13077; - var a13078; - var a13079; - var a13080; - var a13081; - var a13082; - var a13083; - var a13084; - var a13085; - var a13086; - var a13087; - var a13088; - var a13089; - var a13090; - var a13091; - var a13092; - var a13093; - var a13094; - var a13095; - var a13096; - var a13097; - var a13098; - var a13099; - var a13100; - var a13101; - var a13102; - var a13103; - var a13104; - var a13105; - var a13106; - var a13107; - var a13108; - var a13109; - var a13110; - var a13111; - var a13112; - var a13113; - var a13114; - var a13115; - var a13116; - var a13117; - var a13118; - var a13119; - var a13120; - var a13121; - var a13122; - var a13123; - var a13124; - var a13125; - var a13126; - var a13127; - var a13128; - var a13129; - var a13130; - var a13131; - var a13132; - var a13133; - var a13134; - var a13135; - var a13136; - var a13137; - var a13138; - var a13139; - var a13140; - var a13141; - var a13142; - var a13143; - var a13144; - var a13145; - var a13146; - var a13147; - var a13148; - var a13149; - var a13150; - var a13151; - var a13152; - var a13153; - var a13154; - var a13155; - var a13156; - var a13157; - var a13158; - var a13159; - var a13160; - var a13161; - var a13162; - var a13163; - var a13164; - var a13165; - var a13166; - var a13167; - var a13168; - var a13169; - var a13170; - var a13171; - var a13172; - var a13173; - var a13174; - var a13175; - var a13176; - var a13177; - var a13178; - var a13179; - var a13180; - var a13181; - var a13182; - var a13183; - var a13184; - var a13185; - var a13186; - var a13187; - var a13188; - var a13189; - var a13190; - var a13191; - var a13192; - var a13193; - var a13194; - var a13195; - var a13196; - var a13197; - var a13198; - var a13199; - var a13200; - var a13201; - var a13202; - var a13203; - var a13204; - var a13205; - var a13206; - var a13207; - var a13208; - var a13209; - var a13210; - var a13211; - var a13212; - var a13213; - var a13214; - var a13215; - var a13216; - var a13217; - var a13218; - var a13219; - var a13220; - var a13221; - var a13222; - var a13223; - var a13224; - var a13225; - var a13226; - var a13227; - var a13228; - var a13229; - var a13230; - var a13231; - var a13232; - var a13233; - var a13234; - var a13235; - var a13236; - var a13237; - var a13238; - var a13239; - var a13240; - var a13241; - var a13242; - var a13243; - var a13244; - var a13245; - var a13246; - var a13247; - var a13248; - var a13249; - var a13250; - var a13251; - var a13252; - var a13253; - var a13254; - var a13255; - var a13256; - var a13257; - var a13258; - var a13259; - var a13260; - var a13261; - var a13262; - var a13263; - var a13264; - var a13265; - var a13266; - var a13267; - var a13268; - var a13269; - var a13270; - var a13271; - var a13272; - var a13273; - var a13274; - var a13275; - var a13276; - var a13277; - var a13278; - var a13279; - var a13280; - var a13281; - var a13282; - var a13283; - var a13284; - var a13285; - var a13286; - var a13287; - var a13288; - var a13289; - var a13290; - var a13291; - var a13292; - var a13293; - var a13294; - var a13295; - var a13296; - var a13297; - var a13298; - var a13299; - var a13300; - var a13301; - var a13302; - var a13303; - var a13304; - var a13305; - var a13306; - var a13307; - var a13308; - var a13309; - var a13310; - var a13311; - var a13312; - var a13313; - var a13314; - var a13315; - var a13316; - var a13317; - var a13318; - var a13319; - var a13320; - var a13321; - var a13322; - var a13323; - var a13324; - var a13325; - var a13326; - var a13327; - var a13328; - var a13329; - var a13330; - var a13331; - var a13332; - var a13333; - var a13334; - var a13335; - var a13336; - var a13337; - var a13338; - var a13339; - var a13340; - var a13341; - var a13342; - var a13343; - var a13344; - var a13345; - var a13346; - var a13347; - var a13348; - var a13349; - var a13350; - var a13351; - var a13352; - var a13353; - var a13354; - var a13355; - var a13356; - var a13357; - var a13358; - var a13359; - var a13360; - var a13361; - var a13362; - var a13363; - var a13364; - var a13365; - var a13366; - var a13367; - var a13368; - var a13369; - var a13370; - var a13371; - var a13372; - var a13373; - var a13374; - var a13375; - var a13376; - var a13377; - var a13378; - var a13379; - var a13380; - var a13381; - var a13382; - var a13383; - var a13384; - var a13385; - var a13386; - var a13387; - var a13388; - var a13389; - var a13390; - var a13391; - var a13392; - var a13393; - var a13394; - var a13395; - var a13396; - var a13397; - var a13398; - var a13399; - var a13400; - var a13401; - var a13402; - var a13403; - var a13404; - var a13405; - var a13406; - var a13407; - var a13408; - var a13409; - var a13410; - var a13411; - var a13412; - var a13413; - var a13414; - var a13415; - var a13416; - var a13417; - var a13418; - var a13419; - var a13420; - var a13421; - var a13422; - var a13423; - var a13424; - var a13425; - var a13426; - var a13427; - var a13428; - var a13429; - var a13430; - var a13431; - var a13432; - var a13433; - var a13434; - var a13435; - var a13436; - var a13437; - var a13438; - var a13439; - var a13440; - var a13441; - var a13442; - var a13443; - var a13444; - var a13445; - var a13446; - var a13447; - var a13448; - var a13449; - var a13450; - var a13451; - var a13452; - var a13453; - var a13454; - var a13455; - var a13456; - var a13457; - var a13458; - var a13459; - var a13460; - var a13461; - var a13462; - var a13463; - var a13464; - var a13465; - var a13466; - var a13467; - var a13468; - var a13469; - var a13470; - var a13471; - var a13472; - var a13473; - var a13474; - var a13475; - var a13476; - var a13477; - var a13478; - var a13479; - var a13480; - var a13481; - var a13482; - var a13483; - var a13484; - var a13485; - var a13486; - var a13487; - var a13488; - var a13489; - var a13490; - var a13491; - var a13492; - var a13493; - var a13494; - var a13495; - var a13496; - var a13497; - var a13498; - var a13499; - var a13500; - var a13501; - var a13502; - var a13503; - var a13504; - var a13505; - var a13506; - var a13507; - var a13508; - var a13509; - var a13510; - var a13511; - var a13512; - var a13513; - var a13514; - var a13515; - var a13516; - var a13517; - var a13518; - var a13519; - var a13520; - var a13521; - var a13522; - var a13523; - var a13524; - var a13525; - var a13526; - var a13527; - var a13528; - var a13529; - var a13530; - var a13531; - var a13532; - var a13533; - var a13534; - var a13535; - var a13536; - var a13537; - var a13538; - var a13539; - var a13540; - var a13541; - var a13542; - var a13543; - var a13544; - var a13545; - var a13546; - var a13547; - var a13548; - var a13549; - var a13550; - var a13551; - var a13552; - var a13553; - var a13554; - var a13555; - var a13556; - var a13557; - var a13558; - var a13559; - var a13560; - var a13561; - var a13562; - var a13563; - var a13564; - var a13565; - var a13566; - var a13567; - var a13568; - var a13569; - var a13570; - var a13571; - var a13572; - var a13573; - var a13574; - var a13575; - var a13576; - var a13577; - var a13578; - var a13579; - var a13580; - var a13581; - var a13582; - var a13583; - var a13584; - var a13585; - var a13586; - var a13587; - var a13588; - var a13589; - var a13590; - var a13591; - var a13592; - var a13593; - var a13594; - var a13595; - var a13596; - var a13597; - var a13598; - var a13599; - var a13600; - var a13601; - var a13602; - var a13603; - var a13604; - var a13605; - var a13606; - var a13607; - var a13608; - var a13609; - var a13610; - var a13611; - var a13612; - var a13613; - var a13614; - var a13615; - var a13616; - var a13617; - var a13618; - var a13619; - var a13620; - var a13621; - var a13622; - var a13623; - var a13624; - var a13625; - var a13626; - var a13627; - var a13628; - var a13629; - var a13630; - var a13631; - var a13632; - var a13633; - var a13634; - var a13635; - var a13636; - var a13637; - var a13638; - var a13639; - var a13640; - var a13641; - var a13642; - var a13643; - var a13644; - var a13645; - var a13646; - var a13647; - var a13648; - var a13649; - var a13650; - var a13651; - var a13652; - var a13653; - var a13654; - var a13655; - var a13656; - var a13657; - var a13658; - var a13659; - var a13660; - var a13661; - var a13662; - var a13663; - var a13664; - var a13665; - var a13666; - var a13667; - var a13668; - var a13669; - var a13670; - var a13671; - var a13672; - var a13673; - var a13674; - var a13675; - var a13676; - var a13677; - var a13678; - var a13679; - var a13680; - var a13681; - var a13682; - var a13683; - var a13684; - var a13685; - var a13686; - var a13687; - var a13688; - var a13689; - var a13690; - var a13691; - var a13692; - var a13693; - var a13694; - var a13695; - var a13696; - var a13697; - var a13698; - var a13699; - var a13700; - var a13701; - var a13702; - var a13703; - var a13704; - var a13705; - var a13706; - var a13707; - var a13708; - var a13709; - var a13710; - var a13711; - var a13712; - var a13713; - var a13714; - var a13715; - var a13716; - var a13717; - var a13718; - var a13719; - var a13720; - var a13721; - var a13722; - var a13723; - var a13724; - var a13725; - var a13726; - var a13727; - var a13728; - var a13729; - var a13730; - var a13731; - var a13732; - var a13733; - var a13734; - var a13735; - var a13736; - var a13737; - var a13738; - var a13739; - var a13740; - var a13741; - var a13742; - var a13743; - var a13744; - var a13745; - var a13746; - var a13747; - var a13748; - var a13749; - var a13750; - var a13751; - var a13752; - var a13753; - var a13754; - var a13755; - var a13756; - var a13757; - var a13758; - var a13759; - var a13760; - var a13761; - var a13762; - var a13763; - var a13764; - var a13765; - var a13766; - var a13767; - var a13768; - var a13769; - var a13770; - var a13771; - var a13772; - var a13773; - var a13774; - var a13775; - var a13776; - var a13777; - var a13778; - var a13779; - var a13780; - var a13781; - var a13782; - var a13783; - var a13784; - var a13785; - var a13786; - var a13787; - var a13788; - var a13789; - var a13790; - var a13791; - var a13792; - var a13793; - var a13794; - var a13795; - var a13796; - var a13797; - var a13798; - var a13799; - var a13800; - var a13801; - var a13802; - var a13803; - var a13804; - var a13805; - var a13806; - var a13807; - var a13808; - var a13809; - var a13810; - var a13811; - var a13812; - var a13813; - var a13814; - var a13815; - var a13816; - var a13817; - var a13818; - var a13819; - var a13820; - var a13821; - var a13822; - var a13823; - var a13824; - var a13825; - var a13826; - var a13827; - var a13828; - var a13829; - var a13830; - var a13831; - var a13832; - var a13833; - var a13834; - var a13835; - var a13836; - var a13837; - var a13838; - var a13839; - var a13840; - var a13841; - var a13842; - var a13843; - var a13844; - var a13845; - var a13846; - var a13847; - var a13848; - var a13849; - var a13850; - var a13851; - var a13852; - var a13853; - var a13854; - var a13855; - var a13856; - var a13857; - var a13858; - var a13859; - var a13860; - var a13861; - var a13862; - var a13863; - var a13864; - var a13865; - var a13866; - var a13867; - var a13868; - var a13869; - var a13870; - var a13871; - var a13872; - var a13873; - var a13874; - var a13875; - var a13876; - var a13877; - var a13878; - var a13879; - var a13880; - var a13881; - var a13882; - var a13883; - var a13884; - var a13885; - var a13886; - var a13887; - var a13888; - var a13889; - var a13890; - var a13891; - var a13892; - var a13893; - var a13894; - var a13895; - var a13896; - var a13897; - var a13898; - var a13899; - var a13900; - var a13901; - var a13902; - var a13903; - var a13904; - var a13905; - var a13906; - var a13907; - var a13908; - var a13909; - var a13910; - var a13911; - var a13912; - var a13913; - var a13914; - var a13915; - var a13916; - var a13917; - var a13918; - var a13919; - var a13920; - var a13921; - var a13922; - var a13923; - var a13924; - var a13925; - var a13926; - var a13927; - var a13928; - var a13929; - var a13930; - var a13931; - var a13932; - var a13933; - var a13934; - var a13935; - var a13936; - var a13937; - var a13938; - var a13939; - var a13940; - var a13941; - var a13942; - var a13943; - var a13944; - var a13945; - var a13946; - var a13947; - var a13948; - var a13949; - var a13950; - var a13951; - var a13952; - var a13953; - var a13954; - var a13955; - var a13956; - var a13957; - var a13958; - var a13959; - var a13960; - var a13961; - var a13962; - var a13963; - var a13964; - var a13965; - var a13966; - var a13967; - var a13968; - var a13969; - var a13970; - var a13971; - var a13972; - var a13973; - var a13974; - var a13975; - var a13976; - var a13977; - var a13978; - var a13979; - var a13980; - var a13981; - var a13982; - var a13983; - var a13984; - var a13985; - var a13986; - var a13987; - var a13988; - var a13989; - var a13990; - var a13991; - var a13992; - var a13993; - var a13994; - var a13995; - var a13996; - var a13997; - var a13998; - var a13999; - var a14000; - var a14001; - var a14002; - var a14003; - var a14004; - var a14005; - var a14006; - var a14007; - var a14008; - var a14009; - var a14010; - var a14011; - var a14012; - var a14013; - var a14014; - var a14015; - var a14016; - var a14017; - var a14018; - var a14019; - var a14020; - var a14021; - var a14022; - var a14023; - var a14024; - var a14025; - var a14026; - var a14027; - var a14028; - var a14029; - var a14030; - var a14031; - var a14032; - var a14033; - var a14034; - var a14035; - var a14036; - var a14037; - var a14038; - var a14039; - var a14040; - var a14041; - var a14042; - var a14043; - var a14044; - var a14045; - var a14046; - var a14047; - var a14048; - var a14049; - var a14050; - var a14051; - var a14052; - var a14053; - var a14054; - var a14055; - var a14056; - var a14057; - var a14058; - var a14059; - var a14060; - var a14061; - var a14062; - var a14063; - var a14064; - var a14065; - var a14066; - var a14067; - var a14068; - var a14069; - var a14070; - var a14071; - var a14072; - var a14073; - var a14074; - var a14075; - var a14076; - var a14077; - var a14078; - var a14079; - var a14080; - var a14081; - var a14082; - var a14083; - var a14084; - var a14085; - var a14086; - var a14087; - var a14088; - var a14089; - var a14090; - var a14091; - var a14092; - var a14093; - var a14094; - var a14095; - var a14096; - var a14097; - var a14098; - var a14099; - var a14100; - var a14101; - var a14102; - var a14103; - var a14104; - var a14105; - var a14106; - var a14107; - var a14108; - var a14109; - var a14110; - var a14111; - var a14112; - var a14113; - var a14114; - var a14115; - var a14116; - var a14117; - var a14118; - var a14119; - var a14120; - var a14121; - var a14122; - var a14123; - var a14124; - var a14125; - var a14126; - var a14127; - var a14128; - var a14129; - var a14130; - var a14131; - var a14132; - var a14133; - var a14134; - var a14135; - var a14136; - var a14137; - var a14138; - var a14139; - var a14140; - var a14141; - var a14142; - var a14143; - var a14144; - var a14145; - var a14146; - var a14147; - var a14148; - var a14149; - var a14150; - var a14151; - var a14152; - var a14153; - var a14154; - var a14155; - var a14156; - var a14157; - var a14158; - var a14159; - var a14160; - var a14161; - var a14162; - var a14163; - var a14164; - var a14165; - var a14166; - var a14167; - var a14168; - var a14169; - var a14170; - var a14171; - var a14172; - var a14173; - var a14174; - var a14175; - var a14176; - var a14177; - var a14178; - var a14179; - var a14180; - var a14181; - var a14182; - var a14183; - var a14184; - var a14185; - var a14186; - var a14187; - var a14188; - var a14189; - var a14190; - var a14191; - var a14192; - var a14193; - var a14194; - var a14195; - var a14196; - var a14197; - var a14198; - var a14199; - var a14200; - var a14201; - var a14202; - var a14203; - var a14204; - var a14205; - var a14206; - var a14207; - var a14208; - var a14209; - var a14210; - var a14211; - var a14212; - var a14213; - var a14214; - var a14215; - var a14216; - var a14217; - var a14218; - var a14219; - var a14220; - var a14221; - var a14222; - var a14223; - var a14224; - var a14225; - var a14226; - var a14227; - var a14228; - var a14229; - var a14230; - var a14231; - var a14232; - var a14233; - var a14234; - var a14235; - var a14236; - var a14237; - var a14238; - var a14239; - var a14240; - var a14241; - var a14242; - var a14243; - var a14244; - var a14245; - var a14246; - var a14247; - var a14248; - var a14249; - var a14250; - var a14251; - var a14252; - var a14253; - var a14254; - var a14255; - var a14256; - var a14257; - var a14258; - var a14259; - var a14260; - var a14261; - var a14262; - var a14263; - var a14264; - var a14265; - var a14266; - var a14267; - var a14268; - var a14269; - var a14270; - var a14271; - var a14272; - var a14273; - var a14274; - var a14275; - var a14276; - var a14277; - var a14278; - var a14279; - var a14280; - var a14281; - var a14282; - var a14283; - var a14284; - var a14285; - var a14286; - var a14287; - var a14288; - var a14289; - var a14290; - var a14291; - var a14292; - var a14293; - var a14294; - var a14295; - var a14296; - var a14297; - var a14298; - var a14299; - var a14300; - var a14301; - var a14302; - var a14303; - var a14304; - var a14305; - var a14306; - var a14307; - var a14308; - var a14309; - var a14310; - var a14311; - var a14312; - var a14313; - var a14314; - var a14315; - var a14316; - var a14317; - var a14318; - var a14319; - var a14320; - var a14321; - var a14322; - var a14323; - var a14324; - var a14325; - var a14326; - var a14327; - var a14328; - var a14329; - var a14330; - var a14331; - var a14332; - var a14333; - var a14334; - var a14335; - var a14336; - var a14337; - var a14338; - var a14339; - var a14340; - var a14341; - var a14342; - var a14343; - var a14344; - var a14345; - var a14346; - var a14347; - var a14348; - var a14349; - var a14350; - var a14351; - var a14352; - var a14353; - var a14354; - var a14355; - var a14356; - var a14357; - var a14358; - var a14359; - var a14360; - var a14361; - var a14362; - var a14363; - var a14364; - var a14365; - var a14366; - var a14367; - var a14368; - var a14369; - var a14370; - var a14371; - var a14372; - var a14373; - var a14374; - var a14375; - var a14376; - var a14377; - var a14378; - var a14379; - var a14380; - var a14381; - var a14382; - var a14383; - var a14384; - var a14385; - var a14386; - var a14387; - var a14388; - var a14389; - var a14390; - var a14391; - var a14392; - var a14393; - var a14394; - var a14395; - var a14396; - var a14397; - var a14398; - var a14399; - var a14400; - var a14401; - var a14402; - var a14403; - var a14404; - var a14405; - var a14406; - var a14407; - var a14408; - var a14409; - var a14410; - var a14411; - var a14412; - var a14413; - var a14414; - var a14415; - var a14416; - var a14417; - var a14418; - var a14419; - var a14420; - var a14421; - var a14422; - var a14423; - var a14424; - var a14425; - var a14426; - var a14427; - var a14428; - var a14429; - var a14430; - var a14431; - var a14432; - var a14433; - var a14434; - var a14435; - var a14436; - var a14437; - var a14438; - var a14439; - var a14440; - var a14441; - var a14442; - var a14443; - var a14444; - var a14445; - var a14446; - var a14447; - var a14448; - var a14449; - var a14450; - var a14451; - var a14452; - var a14453; - var a14454; - var a14455; - var a14456; - var a14457; - var a14458; - var a14459; - var a14460; - var a14461; - var a14462; - var a14463; - var a14464; - var a14465; - var a14466; - var a14467; - var a14468; - var a14469; - var a14470; - var a14471; - var a14472; - var a14473; - var a14474; - var a14475; - var a14476; - var a14477; - var a14478; - var a14479; - var a14480; - var a14481; - var a14482; - var a14483; - var a14484; - var a14485; - var a14486; - var a14487; - var a14488; - var a14489; - var a14490; - var a14491; - var a14492; - var a14493; - var a14494; - var a14495; - var a14496; - var a14497; - var a14498; - var a14499; - var a14500; - var a14501; - var a14502; - var a14503; - var a14504; - var a14505; - var a14506; - var a14507; - var a14508; - var a14509; - var a14510; - var a14511; - var a14512; - var a14513; - var a14514; - var a14515; - var a14516; - var a14517; - var a14518; - var a14519; - var a14520; - var a14521; - var a14522; - var a14523; - var a14524; - var a14525; - var a14526; - var a14527; - var a14528; - var a14529; - var a14530; - var a14531; - var a14532; - var a14533; - var a14534; - var a14535; - var a14536; - var a14537; - var a14538; - var a14539; - var a14540; - var a14541; - var a14542; - var a14543; - var a14544; - var a14545; - var a14546; - var a14547; - var a14548; - var a14549; - var a14550; - var a14551; - var a14552; - var a14553; - var a14554; - var a14555; - var a14556; - var a14557; - var a14558; - var a14559; - var a14560; - var a14561; - var a14562; - var a14563; - var a14564; - var a14565; - var a14566; - var a14567; - var a14568; - var a14569; - var a14570; - var a14571; - var a14572; - var a14573; - var a14574; - var a14575; - var a14576; - var a14577; - var a14578; - var a14579; - var a14580; - var a14581; - var a14582; - var a14583; - var a14584; - var a14585; - var a14586; - var a14587; - var a14588; - var a14589; - var a14590; - var a14591; - var a14592; - var a14593; - var a14594; - var a14595; - var a14596; - var a14597; - var a14598; - var a14599; - var a14600; - var a14601; - var a14602; - var a14603; - var a14604; - var a14605; - var a14606; - var a14607; - var a14608; - var a14609; - var a14610; - var a14611; - var a14612; - var a14613; - var a14614; - var a14615; - var a14616; - var a14617; - var a14618; - var a14619; - var a14620; - var a14621; - var a14622; - var a14623; - var a14624; - var a14625; - var a14626; - var a14627; - var a14628; - var a14629; - var a14630; - var a14631; - var a14632; - var a14633; - var a14634; - var a14635; - var a14636; - var a14637; - var a14638; - var a14639; - var a14640; - var a14641; - var a14642; - var a14643; - var a14644; - var a14645; - var a14646; - var a14647; - var a14648; - var a14649; - var a14650; - var a14651; - var a14652; - var a14653; - var a14654; - var a14655; - var a14656; - var a14657; - var a14658; - var a14659; - var a14660; - var a14661; - var a14662; - var a14663; - var a14664; - var a14665; - var a14666; - var a14667; - var a14668; - var a14669; - var a14670; - var a14671; - var a14672; - var a14673; - var a14674; - var a14675; - var a14676; - var a14677; - var a14678; - var a14679; - var a14680; - var a14681; - var a14682; - var a14683; - var a14684; - var a14685; - var a14686; - var a14687; - var a14688; - var a14689; - var a14690; - var a14691; - var a14692; - var a14693; - var a14694; - var a14695; - var a14696; - var a14697; - var a14698; - var a14699; - var a14700; - var a14701; - var a14702; - var a14703; - var a14704; - var a14705; - var a14706; - var a14707; - var a14708; - var a14709; - var a14710; - var a14711; - var a14712; - var a14713; - var a14714; - var a14715; - var a14716; - var a14717; - var a14718; - var a14719; - var a14720; - var a14721; - var a14722; - var a14723; - var a14724; - var a14725; - var a14726; - var a14727; - var a14728; - var a14729; - var a14730; - var a14731; - var a14732; - var a14733; - var a14734; - var a14735; - var a14736; - var a14737; - var a14738; - var a14739; - var a14740; - var a14741; - var a14742; - var a14743; - var a14744; - var a14745; - var a14746; - var a14747; - var a14748; - var a14749; - var a14750; - var a14751; - var a14752; - var a14753; - var a14754; - var a14755; - var a14756; - var a14757; - var a14758; - var a14759; - var a14760; - var a14761; - var a14762; - var a14763; - var a14764; - var a14765; - var a14766; - var a14767; - var a14768; - var a14769; - var a14770; - var a14771; - var a14772; - var a14773; - var a14774; - var a14775; - var a14776; - var a14777; - var a14778; - var a14779; - var a14780; - var a14781; - var a14782; - var a14783; - var a14784; - var a14785; - var a14786; - var a14787; - var a14788; - var a14789; - var a14790; - var a14791; - var a14792; - var a14793; - var a14794; - var a14795; - var a14796; - var a14797; - var a14798; - var a14799; - var a14800; - var a14801; - var a14802; - var a14803; - var a14804; - var a14805; - var a14806; - var a14807; - var a14808; - var a14809; - var a14810; - var a14811; - var a14812; - var a14813; - var a14814; - var a14815; - var a14816; - var a14817; - var a14818; - var a14819; - var a14820; - var a14821; - var a14822; - var a14823; - var a14824; - var a14825; - var a14826; - var a14827; - var a14828; - var a14829; - var a14830; - var a14831; - var a14832; - var a14833; - var a14834; - var a14835; - var a14836; - var a14837; - var a14838; - var a14839; - var a14840; - var a14841; - var a14842; - var a14843; - var a14844; - var a14845; - var a14846; - var a14847; - var a14848; - var a14849; - var a14850; - var a14851; - var a14852; - var a14853; - var a14854; - var a14855; - var a14856; - var a14857; - var a14858; - var a14859; - var a14860; - var a14861; - var a14862; - var a14863; - var a14864; - var a14865; - var a14866; - var a14867; - var a14868; - var a14869; - var a14870; - var a14871; - var a14872; - var a14873; - var a14874; - var a14875; - var a14876; - var a14877; - var a14878; - var a14879; - var a14880; - var a14881; - var a14882; - var a14883; - var a14884; - var a14885; - var a14886; - var a14887; - var a14888; - var a14889; - var a14890; - var a14891; - var a14892; - var a14893; - var a14894; - var a14895; - var a14896; - var a14897; - var a14898; - var a14899; - var a14900; - var a14901; - var a14902; - var a14903; - var a14904; - var a14905; - var a14906; - var a14907; - var a14908; - var a14909; - var a14910; - var a14911; - var a14912; - var a14913; - var a14914; - var a14915; - var a14916; - var a14917; - var a14918; - var a14919; - var a14920; - var a14921; - var a14922; - var a14923; - var a14924; - var a14925; - var a14926; - var a14927; - var a14928; - var a14929; - var a14930; - var a14931; - var a14932; - var a14933; - var a14934; - var a14935; - var a14936; - var a14937; - var a14938; - var a14939; - var a14940; - var a14941; - var a14942; - var a14943; - var a14944; - var a14945; - var a14946; - var a14947; - var a14948; - var a14949; - var a14950; - var a14951; - var a14952; - var a14953; - var a14954; - var a14955; - var a14956; - var a14957; - var a14958; - var a14959; - var a14960; - var a14961; - var a14962; - var a14963; - var a14964; - var a14965; - var a14966; - var a14967; - var a14968; - var a14969; - var a14970; - var a14971; - var a14972; - var a14973; - var a14974; - var a14975; - var a14976; - var a14977; - var a14978; - var a14979; - var a14980; - var a14981; - var a14982; - var a14983; - var a14984; - var a14985; - var a14986; - var a14987; - var a14988; - var a14989; - var a14990; - var a14991; - var a14992; - var a14993; - var a14994; - var a14995; - var a14996; - var a14997; - var a14998; - var a14999; - var a15000; - var a15001; - var a15002; - var a15003; - var a15004; - var a15005; - var a15006; - var a15007; - var a15008; - var a15009; - var a15010; - var a15011; - var a15012; - var a15013; - var a15014; - var a15015; - var a15016; - var a15017; - var a15018; - var a15019; - var a15020; - var a15021; - var a15022; - var a15023; - var a15024; - var a15025; - var a15026; - var a15027; - var a15028; - var a15029; - var a15030; - var a15031; - var a15032; - var a15033; - var a15034; - var a15035; - var a15036; - var a15037; - var a15038; - var a15039; - var a15040; - var a15041; - var a15042; - var a15043; - var a15044; - var a15045; - var a15046; - var a15047; - var a15048; - var a15049; - var a15050; - var a15051; - var a15052; - var a15053; - var a15054; - var a15055; - var a15056; - var a15057; - var a15058; - var a15059; - var a15060; - var a15061; - var a15062; - var a15063; - var a15064; - var a15065; - var a15066; - var a15067; - var a15068; - var a15069; - var a15070; - var a15071; - var a15072; - var a15073; - var a15074; - var a15075; - var a15076; - var a15077; - var a15078; - var a15079; - var a15080; - var a15081; - var a15082; - var a15083; - var a15084; - var a15085; - var a15086; - var a15087; - var a15088; - var a15089; - var a15090; - var a15091; - var a15092; - var a15093; - var a15094; - var a15095; - var a15096; - var a15097; - var a15098; - var a15099; - var a15100; - var a15101; - var a15102; - var a15103; - var a15104; - var a15105; - var a15106; - var a15107; - var a15108; - var a15109; - var a15110; - var a15111; - var a15112; - var a15113; - var a15114; - var a15115; - var a15116; - var a15117; - var a15118; - var a15119; - var a15120; - var a15121; - var a15122; - var a15123; - var a15124; - var a15125; - var a15126; - var a15127; - var a15128; - var a15129; - var a15130; - var a15131; - var a15132; - var a15133; - var a15134; - var a15135; - var a15136; - var a15137; - var a15138; - var a15139; - var a15140; - var a15141; - var a15142; - var a15143; - var a15144; - var a15145; - var a15146; - var a15147; - var a15148; - var a15149; - var a15150; - var a15151; - var a15152; - var a15153; - var a15154; - var a15155; - var a15156; - var a15157; - var a15158; - var a15159; - var a15160; - var a15161; - var a15162; - var a15163; - var a15164; - var a15165; - var a15166; - var a15167; - var a15168; - var a15169; - var a15170; - var a15171; - var a15172; - var a15173; - var a15174; - var a15175; - var a15176; - var a15177; - var a15178; - var a15179; - var a15180; - var a15181; - var a15182; - var a15183; - var a15184; - var a15185; - var a15186; - var a15187; - var a15188; - var a15189; - var a15190; - var a15191; - var a15192; - var a15193; - var a15194; - var a15195; - var a15196; - var a15197; - var a15198; - var a15199; - var a15200; - var a15201; - var a15202; - var a15203; - var a15204; - var a15205; - var a15206; - var a15207; - var a15208; - var a15209; - var a15210; - var a15211; - var a15212; - var a15213; - var a15214; - var a15215; - var a15216; - var a15217; - var a15218; - var a15219; - var a15220; - var a15221; - var a15222; - var a15223; - var a15224; - var a15225; - var a15226; - var a15227; - var a15228; - var a15229; - var a15230; - var a15231; - var a15232; - var a15233; - var a15234; - var a15235; - var a15236; - var a15237; - var a15238; - var a15239; - var a15240; - var a15241; - var a15242; - var a15243; - var a15244; - var a15245; - var a15246; - var a15247; - var a15248; - var a15249; - var a15250; - var a15251; - var a15252; - var a15253; - var a15254; - var a15255; - var a15256; - var a15257; - var a15258; - var a15259; - var a15260; - var a15261; - var a15262; - var a15263; - var a15264; - var a15265; - var a15266; - var a15267; - var a15268; - var a15269; - var a15270; - var a15271; - var a15272; - var a15273; - var a15274; - var a15275; - var a15276; - var a15277; - var a15278; - var a15279; - var a15280; - var a15281; - var a15282; - var a15283; - var a15284; - var a15285; - var a15286; - var a15287; - var a15288; - var a15289; - var a15290; - var a15291; - var a15292; - var a15293; - var a15294; - var a15295; - var a15296; - var a15297; - var a15298; - var a15299; - var a15300; - var a15301; - var a15302; - var a15303; - var a15304; - var a15305; - var a15306; - var a15307; - var a15308; - var a15309; - var a15310; - var a15311; - var a15312; - var a15313; - var a15314; - var a15315; - var a15316; - var a15317; - var a15318; - var a15319; - var a15320; - var a15321; - var a15322; - var a15323; - var a15324; - var a15325; - var a15326; - var a15327; - var a15328; - var a15329; - var a15330; - var a15331; - var a15332; - var a15333; - var a15334; - var a15335; - var a15336; - var a15337; - var a15338; - var a15339; - var a15340; - var a15341; - var a15342; - var a15343; - var a15344; - var a15345; - var a15346; - var a15347; - var a15348; - var a15349; - var a15350; - var a15351; - var a15352; - var a15353; - var a15354; - var a15355; - var a15356; - var a15357; - var a15358; - var a15359; - var a15360; - var a15361; - var a15362; - var a15363; - var a15364; - var a15365; - var a15366; - var a15367; - var a15368; - var a15369; - var a15370; - var a15371; - var a15372; - var a15373; - var a15374; - var a15375; - var a15376; - var a15377; - var a15378; - var a15379; - var a15380; - var a15381; - var a15382; - var a15383; - var a15384; - var a15385; - var a15386; - var a15387; - var a15388; - var a15389; - var a15390; - var a15391; - var a15392; - var a15393; - var a15394; - var a15395; - var a15396; - var a15397; - var a15398; - var a15399; - var a15400; - var a15401; - var a15402; - var a15403; - var a15404; - var a15405; - var a15406; - var a15407; - var a15408; - var a15409; - var a15410; - var a15411; - var a15412; - var a15413; - var a15414; - var a15415; - var a15416; - var a15417; - var a15418; - var a15419; - var a15420; - var a15421; - var a15422; - var a15423; - var a15424; - var a15425; - var a15426; - var a15427; - var a15428; - var a15429; - var a15430; - var a15431; - var a15432; - var a15433; - var a15434; - var a15435; - var a15436; - var a15437; - var a15438; - var a15439; - var a15440; - var a15441; - var a15442; - var a15443; - var a15444; - var a15445; - var a15446; - var a15447; - var a15448; - var a15449; - var a15450; - var a15451; - var a15452; - var a15453; - var a15454; - var a15455; - var a15456; - var a15457; - var a15458; - var a15459; - var a15460; - var a15461; - var a15462; - var a15463; - var a15464; - var a15465; - var a15466; - var a15467; - var a15468; - var a15469; - var a15470; - var a15471; - var a15472; - var a15473; - var a15474; - var a15475; - var a15476; - var a15477; - var a15478; - var a15479; - var a15480; - var a15481; - var a15482; - var a15483; - var a15484; - var a15485; - var a15486; - var a15487; - var a15488; - var a15489; - var a15490; - var a15491; - var a15492; - var a15493; - var a15494; - var a15495; - var a15496; - var a15497; - var a15498; - var a15499; - var a15500; - var a15501; - var a15502; - var a15503; - var a15504; - var a15505; - var a15506; - var a15507; - var a15508; - var a15509; - var a15510; - var a15511; - var a15512; - var a15513; - var a15514; - var a15515; - var a15516; - var a15517; - var a15518; - var a15519; - var a15520; - var a15521; - var a15522; - var a15523; - var a15524; - var a15525; - var a15526; - var a15527; - var a15528; - var a15529; - var a15530; - var a15531; - var a15532; - var a15533; - var a15534; - var a15535; - var a15536; - var a15537; - var a15538; - var a15539; - var a15540; - var a15541; - var a15542; - var a15543; - var a15544; - var a15545; - var a15546; - var a15547; - var a15548; - var a15549; - var a15550; - var a15551; - var a15552; - var a15553; - var a15554; - var a15555; - var a15556; - var a15557; - var a15558; - var a15559; - var a15560; - var a15561; - var a15562; - var a15563; - var a15564; - var a15565; - var a15566; - var a15567; - var a15568; - var a15569; - var a15570; - var a15571; - var a15572; - var a15573; - var a15574; - var a15575; - var a15576; - var a15577; - var a15578; - var a15579; - var a15580; - var a15581; - var a15582; - var a15583; - var a15584; - var a15585; - var a15586; - var a15587; - var a15588; - var a15589; - var a15590; - var a15591; - var a15592; - var a15593; - var a15594; - var a15595; - var a15596; - var a15597; - var a15598; - var a15599; - var a15600; - var a15601; - var a15602; - var a15603; - var a15604; - var a15605; - var a15606; - var a15607; - var a15608; - var a15609; - var a15610; - var a15611; - var a15612; - var a15613; - var a15614; - var a15615; - var a15616; - var a15617; - var a15618; - var a15619; - var a15620; - var a15621; - var a15622; - var a15623; - var a15624; - var a15625; - var a15626; - var a15627; - var a15628; - var a15629; - var a15630; - var a15631; - var a15632; - var a15633; - var a15634; - var a15635; - var a15636; - var a15637; - var a15638; - var a15639; - var a15640; - var a15641; - var a15642; - var a15643; - var a15644; - var a15645; - var a15646; - var a15647; - var a15648; - var a15649; - var a15650; - var a15651; - var a15652; - var a15653; - var a15654; - var a15655; - var a15656; - var a15657; - var a15658; - var a15659; - var a15660; - var a15661; - var a15662; - var a15663; - var a15664; - var a15665; - var a15666; - var a15667; - var a15668; - var a15669; - var a15670; - var a15671; - var a15672; - var a15673; - var a15674; - var a15675; - var a15676; - var a15677; - var a15678; - var a15679; - var a15680; - var a15681; - var a15682; - var a15683; - var a15684; - var a15685; - var a15686; - var a15687; - var a15688; - var a15689; - var a15690; - var a15691; - var a15692; - var a15693; - var a15694; - var a15695; - var a15696; - var a15697; - var a15698; - var a15699; - var a15700; - var a15701; - var a15702; - var a15703; - var a15704; - var a15705; - var a15706; - var a15707; - var a15708; - var a15709; - var a15710; - var a15711; - var a15712; - var a15713; - var a15714; - var a15715; - var a15716; - var a15717; - var a15718; - var a15719; - var a15720; - var a15721; - var a15722; - var a15723; - var a15724; - var a15725; - var a15726; - var a15727; - var a15728; - var a15729; - var a15730; - var a15731; - var a15732; - var a15733; - var a15734; - var a15735; - var a15736; - var a15737; - var a15738; - var a15739; - var a15740; - var a15741; - var a15742; - var a15743; - var a15744; - var a15745; - var a15746; - var a15747; - var a15748; - var a15749; - var a15750; - var a15751; - var a15752; - var a15753; - var a15754; - var a15755; - var a15756; - var a15757; - var a15758; - var a15759; - var a15760; - var a15761; - var a15762; - var a15763; - var a15764; - var a15765; - var a15766; - var a15767; - var a15768; - var a15769; - var a15770; - var a15771; - var a15772; - var a15773; - var a15774; - var a15775; - var a15776; - var a15777; - var a15778; - var a15779; - var a15780; - var a15781; - var a15782; - var a15783; - var a15784; - var a15785; - var a15786; - var a15787; - var a15788; - var a15789; - var a15790; - var a15791; - var a15792; - var a15793; - var a15794; - var a15795; - var a15796; - var a15797; - var a15798; - var a15799; - var a15800; - var a15801; - var a15802; - var a15803; - var a15804; - var a15805; - var a15806; - var a15807; - var a15808; - var a15809; - var a15810; - var a15811; - var a15812; - var a15813; - var a15814; - var a15815; - var a15816; - var a15817; - var a15818; - var a15819; - var a15820; - var a15821; - var a15822; - var a15823; - var a15824; - var a15825; - var a15826; - var a15827; - var a15828; - var a15829; - var a15830; - var a15831; - var a15832; - var a15833; - var a15834; - var a15835; - var a15836; - var a15837; - var a15838; - var a15839; - var a15840; - var a15841; - var a15842; - var a15843; - var a15844; - var a15845; - var a15846; - var a15847; - var a15848; - var a15849; - var a15850; - var a15851; - var a15852; - var a15853; - var a15854; - var a15855; - var a15856; - var a15857; - var a15858; - var a15859; - var a15860; - var a15861; - var a15862; - var a15863; - var a15864; - var a15865; - var a15866; - var a15867; - var a15868; - var a15869; - var a15870; - var a15871; - var a15872; - var a15873; - var a15874; - var a15875; - var a15876; - var a15877; - var a15878; - var a15879; - var a15880; - var a15881; - var a15882; - var a15883; - var a15884; - var a15885; - var a15886; - var a15887; - var a15888; - var a15889; - var a15890; - var a15891; - var a15892; - var a15893; - var a15894; - var a15895; - var a15896; - var a15897; - var a15898; - var a15899; - var a15900; - var a15901; - var a15902; - var a15903; - var a15904; - var a15905; - var a15906; - var a15907; - var a15908; - var a15909; - var a15910; - var a15911; - var a15912; - var a15913; - var a15914; - var a15915; - var a15916; - var a15917; - var a15918; - var a15919; - var a15920; - var a15921; - var a15922; - var a15923; - var a15924; - var a15925; - var a15926; - var a15927; - var a15928; - var a15929; - var a15930; - var a15931; - var a15932; - var a15933; - var a15934; - var a15935; - var a15936; - var a15937; - var a15938; - var a15939; - var a15940; - var a15941; - var a15942; - var a15943; - var a15944; - var a15945; - var a15946; - var a15947; - var a15948; - var a15949; - var a15950; - var a15951; - var a15952; - var a15953; - var a15954; - var a15955; - var a15956; - var a15957; - var a15958; - var a15959; - var a15960; - var a15961; - var a15962; - var a15963; - var a15964; - var a15965; - var a15966; - var a15967; - var a15968; - var a15969; - var a15970; - var a15971; - var a15972; - var a15973; - var a15974; - var a15975; - var a15976; - var a15977; - var a15978; - var a15979; - var a15980; - var a15981; - var a15982; - var a15983; - var a15984; - var a15985; - var a15986; - var a15987; - var a15988; - var a15989; - var a15990; - var a15991; - var a15992; - var a15993; - var a15994; - var a15995; - var a15996; - var a15997; - var a15998; - var a15999; - var a16000; - var a16001; - var a16002; - var a16003; - var a16004; - var a16005; - var a16006; - var a16007; - var a16008; - var a16009; - var a16010; - var a16011; - var a16012; - var a16013; - var a16014; - var a16015; - var a16016; - var a16017; - var a16018; - var a16019; - var a16020; - var a16021; - var a16022; - var a16023; - var a16024; - var a16025; - var a16026; - var a16027; - var a16028; - var a16029; - var a16030; - var a16031; - var a16032; - var a16033; - var a16034; - var a16035; - var a16036; - var a16037; - var a16038; - var a16039; - var a16040; - var a16041; - var a16042; - var a16043; - var a16044; - var a16045; - var a16046; - var a16047; - var a16048; - var a16049; - var a16050; - var a16051; - var a16052; - var a16053; - var a16054; - var a16055; - var a16056; - var a16057; - var a16058; - var a16059; - var a16060; - var a16061; - var a16062; - var a16063; - var a16064; - var a16065; - var a16066; - var a16067; - var a16068; - var a16069; - var a16070; - var a16071; - var a16072; - var a16073; - var a16074; - var a16075; - var a16076; - var a16077; - var a16078; - var a16079; - var a16080; - var a16081; - var a16082; - var a16083; - var a16084; - var a16085; - var a16086; - var a16087; - var a16088; - var a16089; - var a16090; - var a16091; - var a16092; - var a16093; - var a16094; - var a16095; - var a16096; - var a16097; - var a16098; - var a16099; - var a16100; - var a16101; - var a16102; - var a16103; - var a16104; - var a16105; - var a16106; - var a16107; - var a16108; - var a16109; - var a16110; - var a16111; - var a16112; - var a16113; - var a16114; - var a16115; - var a16116; - var a16117; - var a16118; - var a16119; - var a16120; - var a16121; - var a16122; - var a16123; - var a16124; - var a16125; - var a16126; - var a16127; - var a16128; - var a16129; - var a16130; - var a16131; - var a16132; - var a16133; - var a16134; - var a16135; - var a16136; - var a16137; - var a16138; - var a16139; - var a16140; - var a16141; - var a16142; - var a16143; - var a16144; - var a16145; - var a16146; - var a16147; - var a16148; - var a16149; - var a16150; - var a16151; - var a16152; - var a16153; - var a16154; - var a16155; - var a16156; - var a16157; - var a16158; - var a16159; - var a16160; - var a16161; - var a16162; - var a16163; - var a16164; - var a16165; - var a16166; - var a16167; - var a16168; - var a16169; - var a16170; - var a16171; - var a16172; - var a16173; - var a16174; - var a16175; - var a16176; - var a16177; - var a16178; - var a16179; - var a16180; - var a16181; - var a16182; - var a16183; - var a16184; - var a16185; - var a16186; - var a16187; - var a16188; - var a16189; - var a16190; - var a16191; - var a16192; - var a16193; - var a16194; - var a16195; - var a16196; - var a16197; - var a16198; - var a16199; - var a16200; - var a16201; - var a16202; - var a16203; - var a16204; - var a16205; - var a16206; - var a16207; - var a16208; - var a16209; - var a16210; - var a16211; - var a16212; - var a16213; - var a16214; - var a16215; - var a16216; - var a16217; - var a16218; - var a16219; - var a16220; - var a16221; - var a16222; - var a16223; - var a16224; - var a16225; - var a16226; - var a16227; - var a16228; - var a16229; - var a16230; - var a16231; - var a16232; - var a16233; - var a16234; - var a16235; - var a16236; - var a16237; - var a16238; - var a16239; - var a16240; - var a16241; - var a16242; - var a16243; - var a16244; - var a16245; - var a16246; - var a16247; - var a16248; - var a16249; - var a16250; - var a16251; - var a16252; - var a16253; - var a16254; - var a16255; - var a16256; - var a16257; - var a16258; - var a16259; - var a16260; - var a16261; - var a16262; - var a16263; - var a16264; - var a16265; - var a16266; - var a16267; - var a16268; - var a16269; - var a16270; - var a16271; - var a16272; - var a16273; - var a16274; - var a16275; - var a16276; - var a16277; - var a16278; - var a16279; - var a16280; - var a16281; - var a16282; - var a16283; - var a16284; - var a16285; - var a16286; - var a16287; - var a16288; - var a16289; - var a16290; - var a16291; - var a16292; - var a16293; - var a16294; - var a16295; - var a16296; - var a16297; - var a16298; - var a16299; - var a16300; - var a16301; - var a16302; - var a16303; - var a16304; - var a16305; - var a16306; - var a16307; - var a16308; - var a16309; - var a16310; - var a16311; - var a16312; - var a16313; - var a16314; - var a16315; - var a16316; - var a16317; - var a16318; - var a16319; - var a16320; - var a16321; - var a16322; - var a16323; - var a16324; - var a16325; - var a16326; - var a16327; - var a16328; - var a16329; - var a16330; - var a16331; - var a16332; - var a16333; - var a16334; - var a16335; - var a16336; - var a16337; - var a16338; - var a16339; - var a16340; - var a16341; - var a16342; - var a16343; - var a16344; - var a16345; - var a16346; - var a16347; - var a16348; - var a16349; - var a16350; - var a16351; - var a16352; - var a16353; - var a16354; - var a16355; - var a16356; - var a16357; - var a16358; - var a16359; - var a16360; - var a16361; - var a16362; - var a16363; - var a16364; - var a16365; - var a16366; - var a16367; - var a16368; - var a16369; - var a16370; - var a16371; - var a16372; - var a16373; - var a16374; - var a16375; - var a16376; - var a16377; - var a16378; - var a16379; - var a16380; - var a16381; - var a16382; - var a16383; - var a16384; - var a16385; - var a16386; - var a16387; - var a16388; - var a16389; - var a16390; - var a16391; - var a16392; - var a16393; - var a16394; - var a16395; - var a16396; - var a16397; - var a16398; - var a16399; - var a16400; - var a16401; - var a16402; - var a16403; - var a16404; - var a16405; - var a16406; - var a16407; - var a16408; - var a16409; - var a16410; - var a16411; - var a16412; - var a16413; - var a16414; - var a16415; - var a16416; - var a16417; - var a16418; - var a16419; - var a16420; - var a16421; - var a16422; - var a16423; - var a16424; - var a16425; - var a16426; - var a16427; - var a16428; - var a16429; - var a16430; - var a16431; - var a16432; - var a16433; - var a16434; - var a16435; - var a16436; - var a16437; - var a16438; - var a16439; - var a16440; - var a16441; - var a16442; - var a16443; - var a16444; - var a16445; - var a16446; - var a16447; - var a16448; - var a16449; - var a16450; - var a16451; - var a16452; - var a16453; - var a16454; - var a16455; - var a16456; - var a16457; - var a16458; - var a16459; - var a16460; - var a16461; - var a16462; - var a16463; - var a16464; - var a16465; - var a16466; - var a16467; - var a16468; - var a16469; - var a16470; - var a16471; - var a16472; - var a16473; - var a16474; - var a16475; - var a16476; - var a16477; - var a16478; - var a16479; - var a16480; - var a16481; - var a16482; - var a16483; - var a16484; - var a16485; - var a16486; - var a16487; - var a16488; - var a16489; - var a16490; - var a16491; - var a16492; - var a16493; - var a16494; - var a16495; - var a16496; - var a16497; - var a16498; - var a16499; - var a16500; - var a16501; - var a16502; - var a16503; - var a16504; - var a16505; - var a16506; - var a16507; - var a16508; - var a16509; - var a16510; - var a16511; - var a16512; - var a16513; - var a16514; - var a16515; - var a16516; - var a16517; - var a16518; - var a16519; - var a16520; - var a16521; - var a16522; - var a16523; - var a16524; - var a16525; - var a16526; - var a16527; - var a16528; - var a16529; - var a16530; - var a16531; - var a16532; - var a16533; - var a16534; - var a16535; - var a16536; - var a16537; - var a16538; - var a16539; - var a16540; - var a16541; - var a16542; - var a16543; - var a16544; - var a16545; - var a16546; - var a16547; - var a16548; - var a16549; - var a16550; - var a16551; - var a16552; - var a16553; - var a16554; - var a16555; - var a16556; - var a16557; - var a16558; - var a16559; - var a16560; - var a16561; - var a16562; - var a16563; - var a16564; - var a16565; - var a16566; - var a16567; - var a16568; - var a16569; - var a16570; - var a16571; - var a16572; - var a16573; - var a16574; - var a16575; - var a16576; - var a16577; - var a16578; - var a16579; - var a16580; - var a16581; - var a16582; - var a16583; - var a16584; - var a16585; - var a16586; - var a16587; - var a16588; - var a16589; - var a16590; - var a16591; - var a16592; - var a16593; - var a16594; - var a16595; - var a16596; - var a16597; - var a16598; - var a16599; - var a16600; - var a16601; - var a16602; - var a16603; - var a16604; - var a16605; - var a16606; - var a16607; - var a16608; - var a16609; - var a16610; - var a16611; - var a16612; - var a16613; - var a16614; - var a16615; - var a16616; - var a16617; - var a16618; - var a16619; - var a16620; - var a16621; - var a16622; - var a16623; - var a16624; - var a16625; - var a16626; - var a16627; - var a16628; - var a16629; - var a16630; - var a16631; - var a16632; - var a16633; - var a16634; - var a16635; - var a16636; - var a16637; - var a16638; - var a16639; - var a16640; - var a16641; - var a16642; - var a16643; - var a16644; - var a16645; - var a16646; - var a16647; - var a16648; - var a16649; - var a16650; - var a16651; - var a16652; - var a16653; - var a16654; - var a16655; - var a16656; - var a16657; - var a16658; - var a16659; - var a16660; - var a16661; - var a16662; - var a16663; - var a16664; - var a16665; - var a16666; - var a16667; - var a16668; - var a16669; - var a16670; - var a16671; - var a16672; - var a16673; - var a16674; - var a16675; - var a16676; - var a16677; - var a16678; - var a16679; - var a16680; - var a16681; - var a16682; - var a16683; - var a16684; - var a16685; - var a16686; - var a16687; - var a16688; - var a16689; - var a16690; - var a16691; - var a16692; - var a16693; - var a16694; - var a16695; - var a16696; - var a16697; - var a16698; - var a16699; - var a16700; - var a16701; - var a16702; - var a16703; - var a16704; - var a16705; - var a16706; - var a16707; - var a16708; - var a16709; - var a16710; - var a16711; - var a16712; - var a16713; - var a16714; - var a16715; - var a16716; - var a16717; - var a16718; - var a16719; - var a16720; - var a16721; - var a16722; - var a16723; - var a16724; - var a16725; - var a16726; - var a16727; - var a16728; - var a16729; - var a16730; - var a16731; - var a16732; - var a16733; - var a16734; - var a16735; - var a16736; - var a16737; - var a16738; - var a16739; - var a16740; - var a16741; - var a16742; - var a16743; - var a16744; - var a16745; - var a16746; - var a16747; - var a16748; - var a16749; - var a16750; - var a16751; - var a16752; - var a16753; - var a16754; - var a16755; - var a16756; - var a16757; - var a16758; - var a16759; - var a16760; - var a16761; - var a16762; - var a16763; - var a16764; - var a16765; - var a16766; - var a16767; - var a16768; - var a16769; - var a16770; - var a16771; - var a16772; - var a16773; - var a16774; - var a16775; - var a16776; - var a16777; - var a16778; - var a16779; - var a16780; - var a16781; - var a16782; - var a16783; - var a16784; - var a16785; - var a16786; - var a16787; - var a16788; - var a16789; - var a16790; - var a16791; - var a16792; - var a16793; - var a16794; - var a16795; - var a16796; - var a16797; - var a16798; - var a16799; - var a16800; - var a16801; - var a16802; - var a16803; - var a16804; - var a16805; - var a16806; - var a16807; - var a16808; - var a16809; - var a16810; - var a16811; - var a16812; - var a16813; - var a16814; - var a16815; - var a16816; - var a16817; - var a16818; - var a16819; - var a16820; - var a16821; - var a16822; - var a16823; - var a16824; - var a16825; - var a16826; - var a16827; - var a16828; - var a16829; - var a16830; - var a16831; - var a16832; - var a16833; - var a16834; - var a16835; - var a16836; - var a16837; - var a16838; - var a16839; - var a16840; - var a16841; - var a16842; - var a16843; - var a16844; - var a16845; - var a16846; - var a16847; - var a16848; - var a16849; - var a16850; - var a16851; - var a16852; - var a16853; - var a16854; - var a16855; - var a16856; - var a16857; - var a16858; - var a16859; - var a16860; - var a16861; - var a16862; - var a16863; - var a16864; - var a16865; - var a16866; - var a16867; - var a16868; - var a16869; - var a16870; - var a16871; - var a16872; - var a16873; - var a16874; - var a16875; - var a16876; - var a16877; - var a16878; - var a16879; - var a16880; - var a16881; - var a16882; - var a16883; - var a16884; - var a16885; - var a16886; - var a16887; - var a16888; - var a16889; - var a16890; - var a16891; - var a16892; - var a16893; - var a16894; - var a16895; - var a16896; - var a16897; - var a16898; - var a16899; - var a16900; - var a16901; - var a16902; - var a16903; - var a16904; - var a16905; - var a16906; - var a16907; - var a16908; - var a16909; - var a16910; - var a16911; - var a16912; - var a16913; - var a16914; - var a16915; - var a16916; - var a16917; - var a16918; - var a16919; - var a16920; - var a16921; - var a16922; - var a16923; - var a16924; - var a16925; - var a16926; - var a16927; - var a16928; - var a16929; - var a16930; - var a16931; - var a16932; - var a16933; - var a16934; - var a16935; - var a16936; - var a16937; - var a16938; - var a16939; - var a16940; - var a16941; - var a16942; - var a16943; - var a16944; - var a16945; - var a16946; - var a16947; - var a16948; - var a16949; - var a16950; - var a16951; - var a16952; - var a16953; - var a16954; - var a16955; - var a16956; - var a16957; - var a16958; - var a16959; - var a16960; - var a16961; - var a16962; - var a16963; - var a16964; - var a16965; - var a16966; - var a16967; - var a16968; - var a16969; - var a16970; - var a16971; - var a16972; - var a16973; - var a16974; - var a16975; - var a16976; - var a16977; - var a16978; - var a16979; - var a16980; - var a16981; - var a16982; - var a16983; - var a16984; - var a16985; - var a16986; - var a16987; - var a16988; - var a16989; - var a16990; - var a16991; - var a16992; - var a16993; - var a16994; - var a16995; - var a16996; - var a16997; - var a16998; - var a16999; - var a17000; - var a17001; - var a17002; - var a17003; - var a17004; - var a17005; - var a17006; - var a17007; - var a17008; - var a17009; - var a17010; - var a17011; - var a17012; - var a17013; - var a17014; - var a17015; - var a17016; - var a17017; - var a17018; - var a17019; - var a17020; - var a17021; - var a17022; - var a17023; - var a17024; - var a17025; - var a17026; - var a17027; - var a17028; - var a17029; - var a17030; - var a17031; - var a17032; - var a17033; - var a17034; - var a17035; - var a17036; - var a17037; - var a17038; - var a17039; - var a17040; - var a17041; - var a17042; - var a17043; - var a17044; - var a17045; - var a17046; - var a17047; - var a17048; - var a17049; - var a17050; - var a17051; - var a17052; - var a17053; - var a17054; - var a17055; - var a17056; - var a17057; - var a17058; - var a17059; - var a17060; - var a17061; - var a17062; - var a17063; - var a17064; - var a17065; - var a17066; - var a17067; - var a17068; - var a17069; - var a17070; - var a17071; - var a17072; - var a17073; - var a17074; - var a17075; - var a17076; - var a17077; - var a17078; - var a17079; - var a17080; - var a17081; - var a17082; - var a17083; - var a17084; - var a17085; - var a17086; - var a17087; - var a17088; - var a17089; - var a17090; - var a17091; - var a17092; - var a17093; - var a17094; - var a17095; - var a17096; - var a17097; - var a17098; - var a17099; - var a17100; - var a17101; - var a17102; - var a17103; - var a17104; - var a17105; - var a17106; - var a17107; - var a17108; - var a17109; - var a17110; - var a17111; - var a17112; - var a17113; - var a17114; - var a17115; - var a17116; - var a17117; - var a17118; - var a17119; - var a17120; - var a17121; - var a17122; - var a17123; - var a17124; - var a17125; - var a17126; - var a17127; - var a17128; - var a17129; - var a17130; - var a17131; - var a17132; - var a17133; - var a17134; - var a17135; - var a17136; - var a17137; - var a17138; - var a17139; - var a17140; - var a17141; - var a17142; - var a17143; - var a17144; - var a17145; - var a17146; - var a17147; - var a17148; - var a17149; - var a17150; - var a17151; - var a17152; - var a17153; - var a17154; - var a17155; - var a17156; - var a17157; - var a17158; - var a17159; - var a17160; - var a17161; - var a17162; - var a17163; - var a17164; - var a17165; - var a17166; - var a17167; - var a17168; - var a17169; - var a17170; - var a17171; - var a17172; - var a17173; - var a17174; - var a17175; - var a17176; - var a17177; - var a17178; - var a17179; - var a17180; - var a17181; - var a17182; - var a17183; - var a17184; - var a17185; - var a17186; - var a17187; - var a17188; - var a17189; - var a17190; - var a17191; - var a17192; - var a17193; - var a17194; - var a17195; - var a17196; - var a17197; - var a17198; - var a17199; - var a17200; - var a17201; - var a17202; - var a17203; - var a17204; - var a17205; - var a17206; - var a17207; - var a17208; - var a17209; - var a17210; - var a17211; - var a17212; - var a17213; - var a17214; - var a17215; - var a17216; - var a17217; - var a17218; - var a17219; - var a17220; - var a17221; - var a17222; - var a17223; - var a17224; - var a17225; - var a17226; - var a17227; - var a17228; - var a17229; - var a17230; - var a17231; - var a17232; - var a17233; - var a17234; - var a17235; - var a17236; - var a17237; - var a17238; - var a17239; - var a17240; - var a17241; - var a17242; - var a17243; - var a17244; - var a17245; - var a17246; - var a17247; - var a17248; - var a17249; - var a17250; - var a17251; - var a17252; - var a17253; - var a17254; - var a17255; - var a17256; - var a17257; - var a17258; - var a17259; - var a17260; - var a17261; - var a17262; - var a17263; - var a17264; - var a17265; - var a17266; - var a17267; - var a17268; - var a17269; - var a17270; - var a17271; - var a17272; - var a17273; - var a17274; - var a17275; - var a17276; - var a17277; - var a17278; - var a17279; - var a17280; - var a17281; - var a17282; - var a17283; - var a17284; - var a17285; - var a17286; - var a17287; - var a17288; - var a17289; - var a17290; - var a17291; - var a17292; - var a17293; - var a17294; - var a17295; - var a17296; - var a17297; - var a17298; - var a17299; - var a17300; - var a17301; - var a17302; - var a17303; - var a17304; - var a17305; - var a17306; - var a17307; - var a17308; - var a17309; - var a17310; - var a17311; - var a17312; - var a17313; - var a17314; - var a17315; - var a17316; - var a17317; - var a17318; - var a17319; - var a17320; - var a17321; - var a17322; - var a17323; - var a17324; - var a17325; - var a17326; - var a17327; - var a17328; - var a17329; - var a17330; - var a17331; - var a17332; - var a17333; - var a17334; - var a17335; - var a17336; - var a17337; - var a17338; - var a17339; - var a17340; - var a17341; - var a17342; - var a17343; - var a17344; - var a17345; - var a17346; - var a17347; - var a17348; - var a17349; - var a17350; - var a17351; - var a17352; - var a17353; - var a17354; - var a17355; - var a17356; - var a17357; - var a17358; - var a17359; - var a17360; - var a17361; - var a17362; - var a17363; - var a17364; - var a17365; - var a17366; - var a17367; - var a17368; - var a17369; - var a17370; - var a17371; - var a17372; - var a17373; - var a17374; - var a17375; - var a17376; - var a17377; - var a17378; - var a17379; - var a17380; - var a17381; - var a17382; - var a17383; - var a17384; - var a17385; - var a17386; - var a17387; - var a17388; - var a17389; - var a17390; - var a17391; - var a17392; - var a17393; - var a17394; - var a17395; - var a17396; - var a17397; - var a17398; - var a17399; - var a17400; - var a17401; - var a17402; - var a17403; - var a17404; - var a17405; - var a17406; - var a17407; - var a17408; - var a17409; - var a17410; - var a17411; - var a17412; - var a17413; - var a17414; - var a17415; - var a17416; - var a17417; - var a17418; - var a17419; - var a17420; - var a17421; - var a17422; - var a17423; - var a17424; - var a17425; - var a17426; - var a17427; - var a17428; - var a17429; - var a17430; - var a17431; - var a17432; - var a17433; - var a17434; - var a17435; - var a17436; - var a17437; - var a17438; - var a17439; - var a17440; - var a17441; - var a17442; - var a17443; - var a17444; - var a17445; - var a17446; - var a17447; - var a17448; - var a17449; - var a17450; - var a17451; - var a17452; - var a17453; - var a17454; - var a17455; - var a17456; - var a17457; - var a17458; - var a17459; - var a17460; - var a17461; - var a17462; - var a17463; - var a17464; - var a17465; - var a17466; - var a17467; - var a17468; - var a17469; - var a17470; - var a17471; - var a17472; - var a17473; - var a17474; - var a17475; - var a17476; - var a17477; - var a17478; - var a17479; - var a17480; - var a17481; - var a17482; - var a17483; - var a17484; - var a17485; - var a17486; - var a17487; - var a17488; - var a17489; - var a17490; - var a17491; - var a17492; - var a17493; - var a17494; - var a17495; - var a17496; - var a17497; - var a17498; - var a17499; - var a17500; - var a17501; - var a17502; - var a17503; - var a17504; - var a17505; - var a17506; - var a17507; - var a17508; - var a17509; - var a17510; - var a17511; - var a17512; - var a17513; - var a17514; - var a17515; - var a17516; - var a17517; - var a17518; - var a17519; - var a17520; - var a17521; - var a17522; - var a17523; - var a17524; - var a17525; - var a17526; - var a17527; - var a17528; - var a17529; - var a17530; - var a17531; - var a17532; - var a17533; - var a17534; - var a17535; - var a17536; - var a17537; - var a17538; - var a17539; - var a17540; - var a17541; - var a17542; - var a17543; - var a17544; - var a17545; - var a17546; - var a17547; - var a17548; - var a17549; - var a17550; - var a17551; - var a17552; - var a17553; - var a17554; - var a17555; - var a17556; - var a17557; - var a17558; - var a17559; - var a17560; - var a17561; - var a17562; - var a17563; - var a17564; - var a17565; - var a17566; - var a17567; - var a17568; - var a17569; - var a17570; - var a17571; - var a17572; - var a17573; - var a17574; - var a17575; - var a17576; - var a17577; - var a17578; - var a17579; - var a17580; - var a17581; - var a17582; - var a17583; - var a17584; - var a17585; - var a17586; - var a17587; - var a17588; - var a17589; - var a17590; - var a17591; - var a17592; - var a17593; - var a17594; - var a17595; - var a17596; - var a17597; - var a17598; - var a17599; - var a17600; - var a17601; - var a17602; - var a17603; - var a17604; - var a17605; - var a17606; - var a17607; - var a17608; - var a17609; - var a17610; - var a17611; - var a17612; - var a17613; - var a17614; - var a17615; - var a17616; - var a17617; - var a17618; - var a17619; - var a17620; - var a17621; - var a17622; - var a17623; - var a17624; - var a17625; - var a17626; - var a17627; - var a17628; - var a17629; - var a17630; - var a17631; - var a17632; - var a17633; - var a17634; - var a17635; - var a17636; - var a17637; - var a17638; - var a17639; - var a17640; - var a17641; - var a17642; - var a17643; - var a17644; - var a17645; - var a17646; - var a17647; - var a17648; - var a17649; - var a17650; - var a17651; - var a17652; - var a17653; - var a17654; - var a17655; - var a17656; - var a17657; - var a17658; - var a17659; - var a17660; - var a17661; - var a17662; - var a17663; - var a17664; - var a17665; - var a17666; - var a17667; - var a17668; - var a17669; - var a17670; - var a17671; - var a17672; - var a17673; - var a17674; - var a17675; - var a17676; - var a17677; - var a17678; - var a17679; - var a17680; - var a17681; - var a17682; - var a17683; - var a17684; - var a17685; - var a17686; - var a17687; - var a17688; - var a17689; - var a17690; - var a17691; - var a17692; - var a17693; - var a17694; - var a17695; - var a17696; - var a17697; - var a17698; - var a17699; - var a17700; - var a17701; - var a17702; - var a17703; - var a17704; - var a17705; - var a17706; - var a17707; - var a17708; - var a17709; - var a17710; - var a17711; - var a17712; - var a17713; - var a17714; - var a17715; - var a17716; - var a17717; - var a17718; - var a17719; - var a17720; - var a17721; - var a17722; - var a17723; - var a17724; - var a17725; - var a17726; - var a17727; - var a17728; - var a17729; - var a17730; - var a17731; - var a17732; - var a17733; - var a17734; - var a17735; - var a17736; - var a17737; - var a17738; - var a17739; - var a17740; - var a17741; - var a17742; - var a17743; - var a17744; - var a17745; - var a17746; - var a17747; - var a17748; - var a17749; - var a17750; - var a17751; - var a17752; - var a17753; - var a17754; - var a17755; - var a17756; - var a17757; - var a17758; - var a17759; - var a17760; - var a17761; - var a17762; - var a17763; - var a17764; - var a17765; - var a17766; - var a17767; - var a17768; - var a17769; - var a17770; - var a17771; - var a17772; - var a17773; - var a17774; - var a17775; - var a17776; - var a17777; - var a17778; - var a17779; - var a17780; - var a17781; - var a17782; - var a17783; - var a17784; - var a17785; - var a17786; - var a17787; - var a17788; - var a17789; - var a17790; - var a17791; - var a17792; - var a17793; - var a17794; - var a17795; - var a17796; - var a17797; - var a17798; - var a17799; - var a17800; - var a17801; - var a17802; - var a17803; - var a17804; - var a17805; - var a17806; - var a17807; - var a17808; - var a17809; - var a17810; - var a17811; - var a17812; - var a17813; - var a17814; - var a17815; - var a17816; - var a17817; - var a17818; - var a17819; - var a17820; - var a17821; - var a17822; - var a17823; - var a17824; - var a17825; - var a17826; - var a17827; - var a17828; - var a17829; - var a17830; - var a17831; - var a17832; - var a17833; - var a17834; - var a17835; - var a17836; - var a17837; - var a17838; - var a17839; - var a17840; - var a17841; - var a17842; - var a17843; - var a17844; - var a17845; - var a17846; - var a17847; - var a17848; - var a17849; - var a17850; - var a17851; - var a17852; - var a17853; - var a17854; - var a17855; - var a17856; - var a17857; - var a17858; - var a17859; - var a17860; - var a17861; - var a17862; - var a17863; - var a17864; - var a17865; - var a17866; - var a17867; - var a17868; - var a17869; - var a17870; - var a17871; - var a17872; - var a17873; - var a17874; - var a17875; - var a17876; - var a17877; - var a17878; - var a17879; - var a17880; - var a17881; - var a17882; - var a17883; - var a17884; - var a17885; - var a17886; - var a17887; - var a17888; - var a17889; - var a17890; - var a17891; - var a17892; - var a17893; - var a17894; - var a17895; - var a17896; - var a17897; - var a17898; - var a17899; - var a17900; - var a17901; - var a17902; - var a17903; - var a17904; - var a17905; - var a17906; - var a17907; - var a17908; - var a17909; - var a17910; - var a17911; - var a17912; - var a17913; - var a17914; - var a17915; - var a17916; - var a17917; - var a17918; - var a17919; - var a17920; - var a17921; - var a17922; - var a17923; - var a17924; - var a17925; - var a17926; - var a17927; - var a17928; - var a17929; - var a17930; - var a17931; - var a17932; - var a17933; - var a17934; - var a17935; - var a17936; - var a17937; - var a17938; - var a17939; - var a17940; - var a17941; - var a17942; - var a17943; - var a17944; - var a17945; - var a17946; - var a17947; - var a17948; - var a17949; - var a17950; - var a17951; - var a17952; - var a17953; - var a17954; - var a17955; - var a17956; - var a17957; - var a17958; - var a17959; - var a17960; - var a17961; - var a17962; - var a17963; - var a17964; - var a17965; - var a17966; - var a17967; - var a17968; - var a17969; - var a17970; - var a17971; - var a17972; - var a17973; - var a17974; - var a17975; - var a17976; - var a17977; - var a17978; - var a17979; - var a17980; - var a17981; - var a17982; - var a17983; - var a17984; - var a17985; - var a17986; - var a17987; - var a17988; - var a17989; - var a17990; - var a17991; - var a17992; - var a17993; - var a17994; - var a17995; - var a17996; - var a17997; - var a17998; - var a17999; - var a18000; - var a18001; - var a18002; - var a18003; - var a18004; - var a18005; - var a18006; - var a18007; - var a18008; - var a18009; - var a18010; - var a18011; - var a18012; - var a18013; - var a18014; - var a18015; - var a18016; - var a18017; - var a18018; - var a18019; - var a18020; - var a18021; - var a18022; - var a18023; - var a18024; - var a18025; - var a18026; - var a18027; - var a18028; - var a18029; - var a18030; - var a18031; - var a18032; - var a18033; - var a18034; - var a18035; - var a18036; - var a18037; - var a18038; - var a18039; - var a18040; - var a18041; - var a18042; - var a18043; - var a18044; - var a18045; - var a18046; - var a18047; - var a18048; - var a18049; - var a18050; - var a18051; - var a18052; - var a18053; - var a18054; - var a18055; - var a18056; - var a18057; - var a18058; - var a18059; - var a18060; - var a18061; - var a18062; - var a18063; - var a18064; - var a18065; - var a18066; - var a18067; - var a18068; - var a18069; - var a18070; - var a18071; - var a18072; - var a18073; - var a18074; - var a18075; - var a18076; - var a18077; - var a18078; - var a18079; - var a18080; - var a18081; - var a18082; - var a18083; - var a18084; - var a18085; - var a18086; - var a18087; - var a18088; - var a18089; - var a18090; - var a18091; - var a18092; - var a18093; - var a18094; - var a18095; - var a18096; - var a18097; - var a18098; - var a18099; - var a18100; - var a18101; - var a18102; - var a18103; - var a18104; - var a18105; - var a18106; - var a18107; - var a18108; - var a18109; - var a18110; - var a18111; - var a18112; - var a18113; - var a18114; - var a18115; - var a18116; - var a18117; - var a18118; - var a18119; - var a18120; - var a18121; - var a18122; - var a18123; - var a18124; - var a18125; - var a18126; - var a18127; - var a18128; - var a18129; - var a18130; - var a18131; - var a18132; - var a18133; - var a18134; - var a18135; - var a18136; - var a18137; - var a18138; - var a18139; - var a18140; - var a18141; - var a18142; - var a18143; - var a18144; - var a18145; - var a18146; - var a18147; - var a18148; - var a18149; - var a18150; - var a18151; - var a18152; - var a18153; - var a18154; - var a18155; - var a18156; - var a18157; - var a18158; - var a18159; - var a18160; - var a18161; - var a18162; - var a18163; - var a18164; - var a18165; - var a18166; - var a18167; - var a18168; - var a18169; - var a18170; - var a18171; - var a18172; - var a18173; - var a18174; - var a18175; - var a18176; - var a18177; - var a18178; - var a18179; - var a18180; - var a18181; - var a18182; - var a18183; - var a18184; - var a18185; - var a18186; - var a18187; - var a18188; - var a18189; - var a18190; - var a18191; - var a18192; - var a18193; - var a18194; - var a18195; - var a18196; - var a18197; - var a18198; - var a18199; - var a18200; - var a18201; - var a18202; - var a18203; - var a18204; - var a18205; - var a18206; - var a18207; - var a18208; - var a18209; - var a18210; - var a18211; - var a18212; - var a18213; - var a18214; - var a18215; - var a18216; - var a18217; - var a18218; - var a18219; - var a18220; - var a18221; - var a18222; - var a18223; - var a18224; - var a18225; - var a18226; - var a18227; - var a18228; - var a18229; - var a18230; - var a18231; - var a18232; - var a18233; - var a18234; - var a18235; - var a18236; - var a18237; - var a18238; - var a18239; - var a18240; - var a18241; - var a18242; - var a18243; - var a18244; - var a18245; - var a18246; - var a18247; - var a18248; - var a18249; - var a18250; - var a18251; - var a18252; - var a18253; - var a18254; - var a18255; - var a18256; - var a18257; - var a18258; - var a18259; - var a18260; - var a18261; - var a18262; - var a18263; - var a18264; - var a18265; - var a18266; - var a18267; - var a18268; - var a18269; - var a18270; - var a18271; - var a18272; - var a18273; - var a18274; - var a18275; - var a18276; - var a18277; - var a18278; - var a18279; - var a18280; - var a18281; - var a18282; - var a18283; - var a18284; - var a18285; - var a18286; - var a18287; - var a18288; - var a18289; - var a18290; - var a18291; - var a18292; - var a18293; - var a18294; - var a18295; - var a18296; - var a18297; - var a18298; - var a18299; - var a18300; - var a18301; - var a18302; - var a18303; - var a18304; - var a18305; - var a18306; - var a18307; - var a18308; - var a18309; - var a18310; - var a18311; - var a18312; - var a18313; - var a18314; - var a18315; - var a18316; - var a18317; - var a18318; - var a18319; - var a18320; - var a18321; - var a18322; - var a18323; - var a18324; - var a18325; - var a18326; - var a18327; - var a18328; - var a18329; - var a18330; - var a18331; - var a18332; - var a18333; - var a18334; - var a18335; - var a18336; - var a18337; - var a18338; - var a18339; - var a18340; - var a18341; - var a18342; - var a18343; - var a18344; - var a18345; - var a18346; - var a18347; - var a18348; - var a18349; - var a18350; - var a18351; - var a18352; - var a18353; - var a18354; - var a18355; - var a18356; - var a18357; - var a18358; - var a18359; - var a18360; - var a18361; - var a18362; - var a18363; - var a18364; - var a18365; - var a18366; - var a18367; - var a18368; - var a18369; - var a18370; - var a18371; - var a18372; - var a18373; - var a18374; - var a18375; - var a18376; - var a18377; - var a18378; - var a18379; - var a18380; - var a18381; - var a18382; - var a18383; - var a18384; - var a18385; - var a18386; - var a18387; - var a18388; - var a18389; - var a18390; - var a18391; - var a18392; - var a18393; - var a18394; - var a18395; - var a18396; - var a18397; - var a18398; - var a18399; - var a18400; - var a18401; - var a18402; - var a18403; - var a18404; - var a18405; - var a18406; - var a18407; - var a18408; - var a18409; - var a18410; - var a18411; - var a18412; - var a18413; - var a18414; - var a18415; - var a18416; - var a18417; - var a18418; - var a18419; - var a18420; - var a18421; - var a18422; - var a18423; - var a18424; - var a18425; - var a18426; - var a18427; - var a18428; - var a18429; - var a18430; - var a18431; - var a18432; - var a18433; - var a18434; - var a18435; - var a18436; - var a18437; - var a18438; - var a18439; - var a18440; - var a18441; - var a18442; - var a18443; - var a18444; - var a18445; - var a18446; - var a18447; - var a18448; - var a18449; - var a18450; - var a18451; - var a18452; - var a18453; - var a18454; - var a18455; - var a18456; - var a18457; - var a18458; - var a18459; - var a18460; - var a18461; - var a18462; - var a18463; - var a18464; - var a18465; - var a18466; - var a18467; - var a18468; - var a18469; - var a18470; - var a18471; - var a18472; - var a18473; - var a18474; - var a18475; - var a18476; - var a18477; - var a18478; - var a18479; - var a18480; - var a18481; - var a18482; - var a18483; - var a18484; - var a18485; - var a18486; - var a18487; - var a18488; - var a18489; - var a18490; - var a18491; - var a18492; - var a18493; - var a18494; - var a18495; - var a18496; - var a18497; - var a18498; - var a18499; - var a18500; - var a18501; - var a18502; - var a18503; - var a18504; - var a18505; - var a18506; - var a18507; - var a18508; - var a18509; - var a18510; - var a18511; - var a18512; - var a18513; - var a18514; - var a18515; - var a18516; - var a18517; - var a18518; - var a18519; - var a18520; - var a18521; - var a18522; - var a18523; - var a18524; - var a18525; - var a18526; - var a18527; - var a18528; - var a18529; - var a18530; - var a18531; - var a18532; - var a18533; - var a18534; - var a18535; - var a18536; - var a18537; - var a18538; - var a18539; - var a18540; - var a18541; - var a18542; - var a18543; - var a18544; - var a18545; - var a18546; - var a18547; - var a18548; - var a18549; - var a18550; - var a18551; - var a18552; - var a18553; - var a18554; - var a18555; - var a18556; - var a18557; - var a18558; - var a18559; - var a18560; - var a18561; - var a18562; - var a18563; - var a18564; - var a18565; - var a18566; - var a18567; - var a18568; - var a18569; - var a18570; - var a18571; - var a18572; - var a18573; - var a18574; - var a18575; - var a18576; - var a18577; - var a18578; - var a18579; - var a18580; - var a18581; - var a18582; - var a18583; - var a18584; - var a18585; - var a18586; - var a18587; - var a18588; - var a18589; - var a18590; - var a18591; - var a18592; - var a18593; - var a18594; - var a18595; - var a18596; - var a18597; - var a18598; - var a18599; - var a18600; - var a18601; - var a18602; - var a18603; - var a18604; - var a18605; - var a18606; - var a18607; - var a18608; - var a18609; - var a18610; - var a18611; - var a18612; - var a18613; - var a18614; - var a18615; - var a18616; - var a18617; - var a18618; - var a18619; - var a18620; - var a18621; - var a18622; - var a18623; - var a18624; - var a18625; - var a18626; - var a18627; - var a18628; - var a18629; - var a18630; - var a18631; - var a18632; - var a18633; - var a18634; - var a18635; - var a18636; - var a18637; - var a18638; - var a18639; - var a18640; - var a18641; - var a18642; - var a18643; - var a18644; - var a18645; - var a18646; - var a18647; - var a18648; - var a18649; - var a18650; - var a18651; - var a18652; - var a18653; - var a18654; - var a18655; - var a18656; - var a18657; - var a18658; - var a18659; - var a18660; - var a18661; - var a18662; - var a18663; - var a18664; - var a18665; - var a18666; - var a18667; - var a18668; - var a18669; - var a18670; - var a18671; - var a18672; - var a18673; - var a18674; - var a18675; - var a18676; - var a18677; - var a18678; - var a18679; - var a18680; - var a18681; - var a18682; - var a18683; - var a18684; - var a18685; - var a18686; - var a18687; - var a18688; - var a18689; - var a18690; - var a18691; - var a18692; - var a18693; - var a18694; - var a18695; - var a18696; - var a18697; - var a18698; - var a18699; - var a18700; - var a18701; - var a18702; - var a18703; - var a18704; - var a18705; - var a18706; - var a18707; - var a18708; - var a18709; - var a18710; - var a18711; - var a18712; - var a18713; - var a18714; - var a18715; - var a18716; - var a18717; - var a18718; - var a18719; - var a18720; - var a18721; - var a18722; - var a18723; - var a18724; - var a18725; - var a18726; - var a18727; - var a18728; - var a18729; - var a18730; - var a18731; - var a18732; - var a18733; - var a18734; - var a18735; - var a18736; - var a18737; - var a18738; - var a18739; - var a18740; - var a18741; - var a18742; - var a18743; - var a18744; - var a18745; - var a18746; - var a18747; - var a18748; - var a18749; - var a18750; - var a18751; - var a18752; - var a18753; - var a18754; - var a18755; - var a18756; - var a18757; - var a18758; - var a18759; - var a18760; - var a18761; - var a18762; - var a18763; - var a18764; - var a18765; - var a18766; - var a18767; - var a18768; - var a18769; - var a18770; - var a18771; - var a18772; - var a18773; - var a18774; - var a18775; - var a18776; - var a18777; - var a18778; - var a18779; - var a18780; - var a18781; - var a18782; - var a18783; - var a18784; - var a18785; - var a18786; - var a18787; - var a18788; - var a18789; - var a18790; - var a18791; - var a18792; - var a18793; - var a18794; - var a18795; - var a18796; - var a18797; - var a18798; - var a18799; - var a18800; - var a18801; - var a18802; - var a18803; - var a18804; - var a18805; - var a18806; - var a18807; - var a18808; - var a18809; - var a18810; - var a18811; - var a18812; - var a18813; - var a18814; - var a18815; - var a18816; - var a18817; - var a18818; - var a18819; - var a18820; - var a18821; - var a18822; - var a18823; - var a18824; - var a18825; - var a18826; - var a18827; - var a18828; - var a18829; - var a18830; - var a18831; - var a18832; - var a18833; - var a18834; - var a18835; - var a18836; - var a18837; - var a18838; - var a18839; - var a18840; - var a18841; - var a18842; - var a18843; - var a18844; - var a18845; - var a18846; - var a18847; - var a18848; - var a18849; - var a18850; - var a18851; - var a18852; - var a18853; - var a18854; - var a18855; - var a18856; - var a18857; - var a18858; - var a18859; - var a18860; - var a18861; - var a18862; - var a18863; - var a18864; - var a18865; - var a18866; - var a18867; - var a18868; - var a18869; - var a18870; - var a18871; - var a18872; - var a18873; - var a18874; - var a18875; - var a18876; - var a18877; - var a18878; - var a18879; - var a18880; - var a18881; - var a18882; - var a18883; - var a18884; - var a18885; - var a18886; - var a18887; - var a18888; - var a18889; - var a18890; - var a18891; - var a18892; - var a18893; - var a18894; - var a18895; - var a18896; - var a18897; - var a18898; - var a18899; - var a18900; - var a18901; - var a18902; - var a18903; - var a18904; - var a18905; - var a18906; - var a18907; - var a18908; - var a18909; - var a18910; - var a18911; - var a18912; - var a18913; - var a18914; - var a18915; - var a18916; - var a18917; - var a18918; - var a18919; - var a18920; - var a18921; - var a18922; - var a18923; - var a18924; - var a18925; - var a18926; - var a18927; - var a18928; - var a18929; - var a18930; - var a18931; - var a18932; - var a18933; - var a18934; - var a18935; - var a18936; - var a18937; - var a18938; - var a18939; - var a18940; - var a18941; - var a18942; - var a18943; - var a18944; - var a18945; - var a18946; - var a18947; - var a18948; - var a18949; - var a18950; - var a18951; - var a18952; - var a18953; - var a18954; - var a18955; - var a18956; - var a18957; - var a18958; - var a18959; - var a18960; - var a18961; - var a18962; - var a18963; - var a18964; - var a18965; - var a18966; - var a18967; - var a18968; - var a18969; - var a18970; - var a18971; - var a18972; - var a18973; - var a18974; - var a18975; - var a18976; - var a18977; - var a18978; - var a18979; - var a18980; - var a18981; - var a18982; - var a18983; - var a18984; - var a18985; - var a18986; - var a18987; - var a18988; - var a18989; - var a18990; - var a18991; - var a18992; - var a18993; - var a18994; - var a18995; - var a18996; - var a18997; - var a18998; - var a18999; - var a19000; - var a19001; - var a19002; - var a19003; - var a19004; - var a19005; - var a19006; - var a19007; - var a19008; - var a19009; - var a19010; - var a19011; - var a19012; - var a19013; - var a19014; - var a19015; - var a19016; - var a19017; - var a19018; - var a19019; - var a19020; - var a19021; - var a19022; - var a19023; - var a19024; - var a19025; - var a19026; - var a19027; - var a19028; - var a19029; - var a19030; - var a19031; - var a19032; - var a19033; - var a19034; - var a19035; - var a19036; - var a19037; - var a19038; - var a19039; - var a19040; - var a19041; - var a19042; - var a19043; - var a19044; - var a19045; - var a19046; - var a19047; - var a19048; - var a19049; - var a19050; - var a19051; - var a19052; - var a19053; - var a19054; - var a19055; - var a19056; - var a19057; - var a19058; - var a19059; - var a19060; - var a19061; - var a19062; - var a19063; - var a19064; - var a19065; - var a19066; - var a19067; - var a19068; - var a19069; - var a19070; - var a19071; - var a19072; - var a19073; - var a19074; - var a19075; - var a19076; - var a19077; - var a19078; - var a19079; - var a19080; - var a19081; - var a19082; - var a19083; - var a19084; - var a19085; - var a19086; - var a19087; - var a19088; - var a19089; - var a19090; - var a19091; - var a19092; - var a19093; - var a19094; - var a19095; - var a19096; - var a19097; - var a19098; - var a19099; - var a19100; - var a19101; - var a19102; - var a19103; - var a19104; - var a19105; - var a19106; - var a19107; - var a19108; - var a19109; - var a19110; - var a19111; - var a19112; - var a19113; - var a19114; - var a19115; - var a19116; - var a19117; - var a19118; - var a19119; - var a19120; - var a19121; - var a19122; - var a19123; - var a19124; - var a19125; - var a19126; - var a19127; - var a19128; - var a19129; - var a19130; - var a19131; - var a19132; - var a19133; - var a19134; - var a19135; - var a19136; - var a19137; - var a19138; - var a19139; - var a19140; - var a19141; - var a19142; - var a19143; - var a19144; - var a19145; - var a19146; - var a19147; - var a19148; - var a19149; - var a19150; - var a19151; - var a19152; - var a19153; - var a19154; - var a19155; - var a19156; - var a19157; - var a19158; - var a19159; - var a19160; - var a19161; - var a19162; - var a19163; - var a19164; - var a19165; - var a19166; - var a19167; - var a19168; - var a19169; - var a19170; - var a19171; - var a19172; - var a19173; - var a19174; - var a19175; - var a19176; - var a19177; - var a19178; - var a19179; - var a19180; - var a19181; - var a19182; - var a19183; - var a19184; - var a19185; - var a19186; - var a19187; - var a19188; - var a19189; - var a19190; - var a19191; - var a19192; - var a19193; - var a19194; - var a19195; - var a19196; - var a19197; - var a19198; - var a19199; - var a19200; - var a19201; - var a19202; - var a19203; - var a19204; - var a19205; - var a19206; - var a19207; - var a19208; - var a19209; - var a19210; - var a19211; - var a19212; - var a19213; - var a19214; - var a19215; - var a19216; - var a19217; - var a19218; - var a19219; - var a19220; - var a19221; - var a19222; - var a19223; - var a19224; - var a19225; - var a19226; - var a19227; - var a19228; - var a19229; - var a19230; - var a19231; - var a19232; - var a19233; - var a19234; - var a19235; - var a19236; - var a19237; - var a19238; - var a19239; - var a19240; - var a19241; - var a19242; - var a19243; - var a19244; - var a19245; - var a19246; - var a19247; - var a19248; - var a19249; - var a19250; - var a19251; - var a19252; - var a19253; - var a19254; - var a19255; - var a19256; - var a19257; - var a19258; - var a19259; - var a19260; - var a19261; - var a19262; - var a19263; - var a19264; - var a19265; - var a19266; - var a19267; - var a19268; - var a19269; - var a19270; - var a19271; - var a19272; - var a19273; - var a19274; - var a19275; - var a19276; - var a19277; - var a19278; - var a19279; - var a19280; - var a19281; - var a19282; - var a19283; - var a19284; - var a19285; - var a19286; - var a19287; - var a19288; - var a19289; - var a19290; - var a19291; - var a19292; - var a19293; - var a19294; - var a19295; - var a19296; - var a19297; - var a19298; - var a19299; - var a19300; - var a19301; - var a19302; - var a19303; - var a19304; - var a19305; - var a19306; - var a19307; - var a19308; - var a19309; - var a19310; - var a19311; - var a19312; - var a19313; - var a19314; - var a19315; - var a19316; - var a19317; - var a19318; - var a19319; - var a19320; - var a19321; - var a19322; - var a19323; - var a19324; - var a19325; - var a19326; - var a19327; - var a19328; - var a19329; - var a19330; - var a19331; - var a19332; - var a19333; - var a19334; - var a19335; - var a19336; - var a19337; - var a19338; - var a19339; - var a19340; - var a19341; - var a19342; - var a19343; - var a19344; - var a19345; - var a19346; - var a19347; - var a19348; - var a19349; - var a19350; - var a19351; - var a19352; - var a19353; - var a19354; - var a19355; - var a19356; - var a19357; - var a19358; - var a19359; - var a19360; - var a19361; - var a19362; - var a19363; - var a19364; - var a19365; - var a19366; - var a19367; - var a19368; - var a19369; - var a19370; - var a19371; - var a19372; - var a19373; - var a19374; - var a19375; - var a19376; - var a19377; - var a19378; - var a19379; - var a19380; - var a19381; - var a19382; - var a19383; - var a19384; - var a19385; - var a19386; - var a19387; - var a19388; - var a19389; - var a19390; - var a19391; - var a19392; - var a19393; - var a19394; - var a19395; - var a19396; - var a19397; - var a19398; - var a19399; - var a19400; - var a19401; - var a19402; - var a19403; - var a19404; - var a19405; - var a19406; - var a19407; - var a19408; - var a19409; - var a19410; - var a19411; - var a19412; - var a19413; - var a19414; - var a19415; - var a19416; - var a19417; - var a19418; - var a19419; - var a19420; - var a19421; - var a19422; - var a19423; - var a19424; - var a19425; - var a19426; - var a19427; - var a19428; - var a19429; - var a19430; - var a19431; - var a19432; - var a19433; - var a19434; - var a19435; - var a19436; - var a19437; - var a19438; - var a19439; - var a19440; - var a19441; - var a19442; - var a19443; - var a19444; - var a19445; - var a19446; - var a19447; - var a19448; - var a19449; - var a19450; - var a19451; - var a19452; - var a19453; - var a19454; - var a19455; - var a19456; - var a19457; - var a19458; - var a19459; - var a19460; - var a19461; - var a19462; - var a19463; - var a19464; - var a19465; - var a19466; - var a19467; - var a19468; - var a19469; - var a19470; - var a19471; - var a19472; - var a19473; - var a19474; - var a19475; - var a19476; - var a19477; - var a19478; - var a19479; - var a19480; - var a19481; - var a19482; - var a19483; - var a19484; - var a19485; - var a19486; - var a19487; - var a19488; - var a19489; - var a19490; - var a19491; - var a19492; - var a19493; - var a19494; - var a19495; - var a19496; - var a19497; - var a19498; - var a19499; - var a19500; - var a19501; - var a19502; - var a19503; - var a19504; - var a19505; - var a19506; - var a19507; - var a19508; - var a19509; - var a19510; - var a19511; - var a19512; - var a19513; - var a19514; - var a19515; - var a19516; - var a19517; - var a19518; - var a19519; - var a19520; - var a19521; - var a19522; - var a19523; - var a19524; - var a19525; - var a19526; - var a19527; - var a19528; - var a19529; - var a19530; - var a19531; - var a19532; - var a19533; - var a19534; - var a19535; - var a19536; - var a19537; - var a19538; - var a19539; - var a19540; - var a19541; - var a19542; - var a19543; - var a19544; - var a19545; - var a19546; - var a19547; - var a19548; - var a19549; - var a19550; - var a19551; - var a19552; - var a19553; - var a19554; - var a19555; - var a19556; - var a19557; - var a19558; - var a19559; - var a19560; - var a19561; - var a19562; - var a19563; - var a19564; - var a19565; - var a19566; - var a19567; - var a19568; - var a19569; - var a19570; - var a19571; - var a19572; - var a19573; - var a19574; - var a19575; - var a19576; - var a19577; - var a19578; - var a19579; - var a19580; - var a19581; - var a19582; - var a19583; - var a19584; - var a19585; - var a19586; - var a19587; - var a19588; - var a19589; - var a19590; - var a19591; - var a19592; - var a19593; - var a19594; - var a19595; - var a19596; - var a19597; - var a19598; - var a19599; - var a19600; - var a19601; - var a19602; - var a19603; - var a19604; - var a19605; - var a19606; - var a19607; - var a19608; - var a19609; - var a19610; - var a19611; - var a19612; - var a19613; - var a19614; - var a19615; - var a19616; - var a19617; - var a19618; - var a19619; - var a19620; - var a19621; - var a19622; - var a19623; - var a19624; - var a19625; - var a19626; - var a19627; - var a19628; - var a19629; - var a19630; - var a19631; - var a19632; - var a19633; - var a19634; - var a19635; - var a19636; - var a19637; - var a19638; - var a19639; - var a19640; - var a19641; - var a19642; - var a19643; - var a19644; - var a19645; - var a19646; - var a19647; - var a19648; - var a19649; - var a19650; - var a19651; - var a19652; - var a19653; - var a19654; - var a19655; - var a19656; - var a19657; - var a19658; - var a19659; - var a19660; - var a19661; - var a19662; - var a19663; - var a19664; - var a19665; - var a19666; - var a19667; - var a19668; - var a19669; - var a19670; - var a19671; - var a19672; - var a19673; - var a19674; - var a19675; - var a19676; - var a19677; - var a19678; - var a19679; - var a19680; - var a19681; - var a19682; - var a19683; - var a19684; - var a19685; - var a19686; - var a19687; - var a19688; - var a19689; - var a19690; - var a19691; - var a19692; - var a19693; - var a19694; - var a19695; - var a19696; - var a19697; - var a19698; - var a19699; - var a19700; - var a19701; - var a19702; - var a19703; - var a19704; - var a19705; - var a19706; - var a19707; - var a19708; - var a19709; - var a19710; - var a19711; - var a19712; - var a19713; - var a19714; - var a19715; - var a19716; - var a19717; - var a19718; - var a19719; - var a19720; - var a19721; - var a19722; - var a19723; - var a19724; - var a19725; - var a19726; - var a19727; - var a19728; - var a19729; - var a19730; - var a19731; - var a19732; - var a19733; - var a19734; - var a19735; - var a19736; - var a19737; - var a19738; - var a19739; - var a19740; - var a19741; - var a19742; - var a19743; - var a19744; - var a19745; - var a19746; - var a19747; - var a19748; - var a19749; - var a19750; - var a19751; - var a19752; - var a19753; - var a19754; - var a19755; - var a19756; - var a19757; - var a19758; - var a19759; - var a19760; - var a19761; - var a19762; - var a19763; - var a19764; - var a19765; - var a19766; - var a19767; - var a19768; - var a19769; - var a19770; - var a19771; - var a19772; - var a19773; - var a19774; - var a19775; - var a19776; - var a19777; - var a19778; - var a19779; - var a19780; - var a19781; - var a19782; - var a19783; - var a19784; - var a19785; - var a19786; - var a19787; - var a19788; - var a19789; - var a19790; - var a19791; - var a19792; - var a19793; - var a19794; - var a19795; - var a19796; - var a19797; - var a19798; - var a19799; - var a19800; - var a19801; - var a19802; - var a19803; - var a19804; - var a19805; - var a19806; - var a19807; - var a19808; - var a19809; - var a19810; - var a19811; - var a19812; - var a19813; - var a19814; - var a19815; - var a19816; - var a19817; - var a19818; - var a19819; - var a19820; - var a19821; - var a19822; - var a19823; - var a19824; - var a19825; - var a19826; - var a19827; - var a19828; - var a19829; - var a19830; - var a19831; - var a19832; - var a19833; - var a19834; - var a19835; - var a19836; - var a19837; - var a19838; - var a19839; - var a19840; - var a19841; - var a19842; - var a19843; - var a19844; - var a19845; - var a19846; - var a19847; - var a19848; - var a19849; - var a19850; - var a19851; - var a19852; - var a19853; - var a19854; - var a19855; - var a19856; - var a19857; - var a19858; - var a19859; - var a19860; - var a19861; - var a19862; - var a19863; - var a19864; - var a19865; - var a19866; - var a19867; - var a19868; - var a19869; - var a19870; - var a19871; - var a19872; - var a19873; - var a19874; - var a19875; - var a19876; - var a19877; - var a19878; - var a19879; - var a19880; - var a19881; - var a19882; - var a19883; - var a19884; - var a19885; - var a19886; - var a19887; - var a19888; - var a19889; - var a19890; - var a19891; - var a19892; - var a19893; - var a19894; - var a19895; - var a19896; - var a19897; - var a19898; - var a19899; - var a19900; - var a19901; - var a19902; - var a19903; - var a19904; - var a19905; - var a19906; - var a19907; - var a19908; - var a19909; - var a19910; - var a19911; - var a19912; - var a19913; - var a19914; - var a19915; - var a19916; - var a19917; - var a19918; - var a19919; - var a19920; - var a19921; - var a19922; - var a19923; - var a19924; - var a19925; - var a19926; - var a19927; - var a19928; - var a19929; - var a19930; - var a19931; - var a19932; - var a19933; - var a19934; - var a19935; - var a19936; - var a19937; - var a19938; - var a19939; - var a19940; - var a19941; - var a19942; - var a19943; - var a19944; - var a19945; - var a19946; - var a19947; - var a19948; - var a19949; - var a19950; - var a19951; - var a19952; - var a19953; - var a19954; - var a19955; - var a19956; - var a19957; - var a19958; - var a19959; - var a19960; - var a19961; - var a19962; - var a19963; - var a19964; - var a19965; - var a19966; - var a19967; - var a19968; - var a19969; - var a19970; - var a19971; - var a19972; - var a19973; - var a19974; - var a19975; - var a19976; - var a19977; - var a19978; - var a19979; - var a19980; - var a19981; - var a19982; - var a19983; - var a19984; - var a19985; - var a19986; - var a19987; - var a19988; - var a19989; - var a19990; - var a19991; - var a19992; - var a19993; - var a19994; - var a19995; - var a19996; - var a19997; - var a19998; - var a19999; - var a20000; -} - -main() { - var a = new A(); - a.a20000 = 42; - Expect.equals(42, a.a20000); -} diff --git a/tests/language_2/class/literal_static_test.dart b/tests/language_2/class/literal_static_test.dart deleted file mode 100644 index 6366fefa217..00000000000 --- a/tests/language_2/class/literal_static_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Test class literal expressions. - -class Class { - static fisk() => 42; -} - -foo(x) {} - -main() { - // Verify that dereferencing a class literal is a compile-time error. - Class(); - Class[0]; //# 02: compile-time error - var x = Class(); - var y = Class[0]; //# 04: compile-time error - var z = Class[0].field; //# 05: compile-time error - var w = Class[0].method(); //# 06: compile-time error - foo(Class()); - foo(Class[0]); //# 08: compile-time error - foo(Class[0].field); //# 09: compile-time error - foo(Class[0].method()); //# 10: compile-time error - Class[0] = 91; //# 11: compile-time error - Class++; //# 12: compile-time error - ++Class; //# 13: compile-time error - Class[0] += 3; //# 14: compile-time error - ++Class[0]; //# 15: compile-time error - Class[0]++; //# 16: compile-time error - Class.method(); //# 17: compile-time error - Class.field; //# 18: compile-time error - var p = Class.method(); //# 19: compile-time error - var q = Class.field; //# 20: compile-time error - foo(Class.method()); //# 21: compile-time error - foo(Class.field); //# 22: compile-time error - Class / 3; //# 23: compile-time error - Class += 3; //# 24: compile-time error - Class.toString(); //# 25: compile-time error -} diff --git a/tests/language_2/class/literal_test.dart b/tests/language_2/class/literal_test.dart deleted file mode 100644 index 74b208dc6ec..00000000000 --- a/tests/language_2/class/literal_test.dart +++ /dev/null @@ -1,63 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Test class literal expressions. - -class Class { - static fisk() => 42; -} - -foo(x) {} - -main() { - Expect.equals(42, Class.fisk()); - Expect.equals(null, foo(Class.fisk())); - - // Verify references to a class literal are allowed. - Class; - dynamic x = Class; - foo(Class); - Expect.isFalse(Class == null); - - // Verify that dereferencing a class literal is a compile-time error if it - // isn't used as a constructor. - Class(); - Class[0]; //# 02: compile-time error - x = Class(); - x = Class[0]; //# 04: compile-time error - x = Class[0].field; //# 05: compile-time error - x = Class[0].method(); //# 06: compile-time error - foo(Class()); - foo(Class[0]); //# 08: compile-time error - foo(Class[0].field); //# 09: compile-time error - foo(Class[0].method()); //# 10: compile-time error - Class[0] = 91; //# 11: compile-time error - Class++; //# 12: compile-time error - ++Class; //# 13: compile-time error - Class[0] += 3; //# 14: compile-time error - ++Class[0]; //# 15: compile-time error - Class[0]++; //# 16: compile-time error - Class.method(); //# 17: compile-time error - Class.field; //# 18: compile-time error - x = Class.method(); //# 19: compile-time error - x = Class.field; //# 20: compile-time error - foo(Class.method()); //# 21: compile-time error - foo(Class.field); //# 22: compile-time error - Class / 3; //# 23: compile-time error - Class += 3; //# 24: compile-time error - - // Verify that a class literal isn't a string literal. - Expect.notEquals(Class, "Class"); - - // Verify toString() works for class literals. - Expect.isTrue((Class).toString() is String); - var y = Class; - Expect.isTrue(y.toString() is String); - - Class.toString(); //# 25: compile-time error -} diff --git a/tests/language_2/class/multiple_interface_inheritance_test.dart b/tests/language_2/class/multiple_interface_inheritance_test.dart deleted file mode 100644 index d39e7cafab4..00000000000 --- a/tests/language_2/class/multiple_interface_inheritance_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2017, 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 - -abstract class I1 { - void f(int i); -} - -abstract class I2 { - void f(Object o); -} - -abstract class C implements I1, I2 {} - -class D extends C { - void f(Object o) {} -} - -abstract class E implements I2, I1 {} - -class F extends E { - void f(Object o) {} -} - -void g1(C c) { - c.f('hi'); -} - -void g2(E e) { - e.f('hi'); -} - -main() { - g1(new D()); - g2(new F()); -} diff --git a/tests/language_2/class/override_test.dart b/tests/language_2/class/override_test.dart deleted file mode 100644 index def870225a4..00000000000 --- a/tests/language_2/class/override_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012, 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 - -// It is a static compile time error if a method m1 overrides a method m2 and has a -// different number of required parameters. - -class A { - foo() {} -} - -class B extends A { - foo(a) {} -//^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -// [cfe] The method 'B.foo' has more required arguments than those of overridden method 'A.foo'. -} - -main() { - new B().foo(42); -} diff --git a/tests/language_2/class/recursive_inheritance_test.dart b/tests/language_2/class/recursive_inheritance_test.dart deleted file mode 100644 index 7524d5981ff..00000000000 --- a/tests/language_2/class/recursive_inheritance_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -// Regression test for recursive inheritance patterns -abstract class Comparable { - int compareTo(T a); -} - -class MI> {} - -class _MI extends MI<_MI> {} - -class PMI> extends MI> {} - -class _PMI extends PMI<_PMI> implements Comparable<_PMI> { - int compareTo(_PMI other) => throw new UnimplementedError(); -} - -void main() { - MI a = new MI<_MI>(); - PMI b = new PMI<_PMI>(); - a = b; - Expect.isTrue(a is MI); - Expect.isTrue(b is PMI); - Expect.isTrue(b is MI); - Expect.isTrue(b is MI); -} diff --git a/tests/language_2/class/syntax2_test.dart b/tests/language_2/class/syntax2_test.dart deleted file mode 100644 index 5cbbdfd5f66..00000000000 --- a/tests/language_2/class/syntax2_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js bug http://dartbug.com/11570. - -import 'package:expect/expect.dart'; - -void main() { - var c = new Cool(true); - Expect.stringEquals('{}', '${c.thing}'); - - c = new Cool(false); - Expect.stringEquals('[]', '${c.thing}'); - - c = new Cool.alt(true); - Expect.stringEquals('{}', '${c.thing}'); - - c = new Cool.alt(false); - Expect.stringEquals('[]', '${c.thing}'); -} - -class Cool { - final thing; - - Cool(bool option) : thing = option ? {} : []; - Cool.alt(bool option) : thing = !option ? [] : {}; -} diff --git a/tests/language_2/class/syntax_test.dart b/tests/language_2/class/syntax_test.dart deleted file mode 100644 index eca5f1c654e..00000000000 --- a/tests/language_2/class/syntax_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2012, 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() { - new ClassSyntaxTest(); -} - -class ClassSyntaxTest { - /* //# 01: syntax error -} -*/ //# 01: continued diff --git a/tests/language_2/class/variable_shadow_class_runtime_test.dart b/tests/language_2/class/variable_shadow_class_runtime_test.dart deleted file mode 100644 index b7d6651ba7b..00000000000 --- a/tests/language_2/class/variable_shadow_class_runtime_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. -import "package:expect/expect.dart"; - -// Local variables can shadow class names. - -class Test { - final int field; - Test.named(this.field); -} - -main() { - { - - // Now this refers to the variable. - var i = new Test.named(10); - Expect.equals(10, i.field); - } - - { - // Shadowing is allowed. - var Test = 1; - Expect.equals(2, Test + 1); - } -} diff --git a/tests/language_2/class/variable_shadow_class_test.dart b/tests/language_2/class/variable_shadow_class_test.dart deleted file mode 100644 index b5b7e9422ce..00000000000 --- a/tests/language_2/class/variable_shadow_class_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// 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 -import "package:expect/expect.dart"; - -// Local variables can shadow class names. - -class Test { - final int field; - Test.named(this.field); -} - -main() { - { - var Test; - // Now this refers to the variable. - var i = new Test.named(10); - // ^^^^ - // [analyzer] COMPILE_TIME_ERROR.PREFIX_SHADOWED_BY_LOCAL_DECLARATION - // [cfe] Couldn't find constructor 'Test.named'. - Expect.equals(10, i.field); - } - - { - // Shadowing is allowed. - var Test = 1; - Expect.equals(2, Test + 1); - } -} diff --git a/tests/language_2/closure/bound_closure_equality_test.dart b/tests/language_2/closure/bound_closure_equality_test.dart deleted file mode 100644 index c0e4564366e..00000000000 --- a/tests/language_2/closure/bound_closure_equality_test.dart +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A { - const A(); - foo() => 42; -} - -class B { - foo() => 42; -} - -main() { - // Use an array to defeat type inferencing. - var array = [new A(), new A(), new B(), new B()]; - var set = new Set.from(array.map((a) => a.foo)); - Expect.equals(array.length, set.length); - set.addAll(array.map((a) => a.foo)); - Expect.equals(array.length, set.length); - - for (int i = 0; i < array.length; i += 2) { - Expect.isTrue(set.contains(array[i].foo)); - Expect.equals(array[i], array[i]); - Expect.equals(array[i].foo, array[i].foo); - Expect.equals(array[i].foo.hashCode, array[i].foo.hashCode); - for (int j = 0; j < array.length; j++) { - if (i == j) continue; - Expect.notEquals(array[i].foo, array[j].foo); - } - } - - // Try with dart2js intercepted types. - array = ['foo', 'bar', [], [], const []]; - set = new Set.from(array.map((a) => a.indexOf)); - Expect.equals(array.length, set.length); - set.addAll(array.map((a) => a.indexOf)); - Expect.equals(array.length, set.length); - - for (int i = 0; i < array.length; i += 2) { - Expect.isTrue(set.contains(array[i].indexOf)); - Expect.equals(array[i], array[i]); - Expect.equals(array[i].indexOf, array[i].indexOf); - Expect.equals(array[i].indexOf.hashCode, array[i].indexOf.hashCode); - for (int j = 0; j < array.length; j++) { - if (i == j) continue; - Expect.notEquals(array[i].indexOf, array[j].indexOf); - } - } - - array = [const A(), const A()]; - set = new Set.from(array.map((a) => a.foo)); - Expect.equals(1, set.length); - set.addAll(array.map((a) => a.foo)); - Expect.equals(1, set.length); - - Expect.isTrue(set.contains(array[0].foo)); - Expect.equals(array[0].foo, array[0].foo); - Expect.equals(array[0].foo.hashCode, array[0].foo.hashCode); - Expect.equals(array[0].foo, array[1].foo); - Expect.equals(array[0].foo.hashCode, array[1].foo.hashCode); - - array = [const [], const []]; - set = new Set.from(array.map((a) => a.indexOf)); - Expect.equals(1, set.length); - set.addAll(array.map((a) => a.indexOf)); - Expect.equals(1, set.length); - - Expect.isTrue(set.contains(array[0].indexOf)); - Expect.equals(array[0].indexOf, array[0].indexOf); - Expect.equals(array[0].indexOf.hashCode, array[0].indexOf.hashCode); - Expect.equals(array[0].indexOf, array[1].indexOf); - Expect.equals(array[0].indexOf.hashCode, array[1].indexOf.hashCode); -} diff --git a/tests/language_2/closure/bound_closure_primitives_test.dart b/tests/language_2/closure/bound_closure_primitives_test.dart deleted file mode 100644 index 7fa8e8e2774..00000000000 --- a/tests/language_2/closure/bound_closure_primitives_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test to make sure dart2js does not try to use the same -// BoundClosureClass between an intercepted method and a -// non-intercepted method. - -import "package:expect/expect.dart"; - -class A { - // Make dart2js try to share a bound closure for [foo] with a bound - // closure for [List.add], by having same number of arguments. - foo(a) => a; -} - -main() { - var array = [[], new A()]; - var method = array[0].add; - method(42); - - method = array[1].foo; - Expect.equals(42, method(42)); - - Expect.equals(1, array[0].length); - Expect.isTrue(array[0].contains(42)); -} diff --git a/tests/language_2/closure/break1_test.dart b/tests/language_2/closure/break1_test.dart deleted file mode 100644 index e99eceff734..00000000000 --- a/tests/language_2/closure/break1_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -// 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 test for closures. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class ClosureBreak1 { - ClosureBreak1(this.field); - int field; -} - -class ClosureBreak1Test { - static testMain() { - var o1 = new ClosureBreak1(3); - String newstr = "abcdefgh"; - foo() { - o1.field++; - Expect.equals(8, newstr.length); - } - - bool loop = true; - L: - while (loop) { - String newstr1 = "abcd"; - var o2 = new ClosureBreak1(3); - foo1() { - o2.field++; - Expect.equals(4, newstr1.length); - } - - Expect.equals(4, newstr1.length); - while (loop) { - int newint = 0; - var o3 = new ClosureBreak1(3); - foo2() { - o3.field++; - Expect.equals(0, newint); - } - - foo2(); - break L; - } - } - foo(); - Expect.equals(4, o1.field); - } -} - -main() { - ClosureBreak1Test.testMain(); -} diff --git a/tests/language_2/closure/break2_test.dart b/tests/language_2/closure/break2_test.dart deleted file mode 100644 index daa6349d4ee..00000000000 --- a/tests/language_2/closure/break2_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// 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 test for closures. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class ClosureBreak2 { - ClosureBreak2(this.field); - int field; -} - -class ClosureBreak2Test { - static testMain() { - var o1 = new ClosureBreak2(3); - String newstr = "abcdefgh"; - foo() { - o1.field++; - Expect.equals(8, newstr.length); - } - - bool loop = true; - L: - while (loop) { - String newstr1 = "abcd"; - Expect.equals(4, newstr1.length); - while (loop) { - int newint = 0; - Expect.equals(4, newstr1.length); - break L; - } - } - foo(); - Expect.equals(4, o1.field); - } -} - -main() { - ClosureBreak2Test.testMain(); -} diff --git a/tests/language_2/closure/break_test.dart b/tests/language_2/closure/break_test.dart deleted file mode 100644 index 91d31d86bdb..00000000000 --- a/tests/language_2/closure/break_test.dart +++ /dev/null @@ -1,58 +0,0 @@ -// 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 test for closures. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class ClosureBreak { - ClosureBreak(this.field); - int field; -} - -class ClosureBreakTest { - static testMain() { - var o1 = new ClosureBreak(3); - String newstr = "abcdefgh"; - foo() { - o1.field++; - Expect.equals(8, newstr.length); - } - - bool loop = true; - L1: - while (loop) { - String newstr1 = "abcd"; - var o2 = new ClosureBreak(3); - foo1() { - o2.field++; - Expect.equals(4, newstr1.length); - } - - Expect.equals(4, newstr1.length); - L2: - while (loop) { - int newint = 0; - var o3 = new ClosureBreak(3); - foo2() { - o3.field++; - Expect.equals(0, newint); - } - - foo2(); - break L2; - } - foo1(); - Expect.equals(4, newstr1.length); - break L1; - } - foo(); - Expect.equals(4, o1.field); - } -} - -main() { - ClosureBreakTest.testMain(); -} diff --git a/tests/language_2/closure/call_wrong_argument_count_test.dart b/tests/language_2/closure/call_wrong_argument_count_test.dart deleted file mode 100644 index a04d2341bd6..00000000000 --- a/tests/language_2/closure/call_wrong_argument_count_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2017, 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 - -// Test mismatch in argument counts. -import 'package:expect/expect.dart'; - -int melke(f) { - return f(1, 2, 3); -} - -main() { - kuh(int a, int b) { - return a + b; - } - - Expect.throws(() { - melke(kuh); - }); -} diff --git a/tests/language_2/closure/closure2_test.dart b/tests/language_2/closure/closure2_test.dart deleted file mode 100644 index d036c6f7fea..00000000000 --- a/tests/language_2/closure/closure2_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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 test for closures. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -bounce(fn) { - return fn(); -} - -demo(s) { - var i, a = bounce(() => s); - return a; -} - -main() { - Expect.equals("Bounce!", demo("Bounce!")); -} diff --git a/tests/language_2/closure/closure3_test.dart b/tests/language_2/closure/closure3_test.dart deleted file mode 100644 index 681ea98d2b5..00000000000 --- a/tests/language_2/closure/closure3_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test that a NoSuchMethodError is thrown even when an expression -// seems to be free of side-effects. - -test(x, y) { - (() { - x - y; - })(); -} - -main() { - Expect.throwsNoSuchMethodError(() => test(null, 2)); -} diff --git a/tests/language_2/closure/closure4_test.dart b/tests/language_2/closure/closure4_test.dart deleted file mode 100644 index 67160e8747e..00000000000 --- a/tests/language_2/closure/closure4_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Dart2js failed when a declared function was captured inside itself. - -foo(f) => f(499); - -main() { - fun(x) { - if (x < 3) { - return foo((x) => fun(x)); - } else { - return x; - } - } - - Expect.equals(499, fun(499)); -} diff --git a/tests/language_2/closure/closure5_test.dart b/tests/language_2/closure/closure5_test.dart deleted file mode 100644 index 9e7d3805277..00000000000 --- a/tests/language_2/closure/closure5_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Dart2js failed when a declared function was captured inside itself. - -foo(f) => f(499); - -main() { - fun(x) { - if (x < 3) { - return foo((x) => fun(x)); - } else { - return x; - } - } - - Expect.equals(499, foo((x) => fun(x))); -} diff --git a/tests/language_2/closure/closure6_test.dart b/tests/language_2/closure/closure6_test.dart deleted file mode 100644 index fa47f785e6e..00000000000 --- a/tests/language_2/closure/closure6_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test that captured final variables are correctly mangled. - -class A { - foo() { - length() => 400; - final box_0 = 28; - var x = 29; - var f = () => length() + box_0 + x + bar(); - return f(); - } - - bar() => 42; -} - -main() { - Expect.equals(499, new A().foo()); -} diff --git a/tests/language_2/closure/closure7_test.dart b/tests/language_2/closure/closure7_test.dart deleted file mode 100644 index 37e43867b7f..00000000000 --- a/tests/language_2/closure/closure7_test.dart +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test that implicitly bound closures work correctly - -class A { - foo() => 499; - fooo() => 4999; // Implicit closure class can be shared with foo. - bar(x, {y: 8, z: 10}) => "1 $x $y $z"; - gee(x, {y: 9, z: 11}) => "2 $x $y $z"; // Must not be shared with "bar". - toto(x, {y: 8, z: 10}) => "3 $x $y $z"; // Could be shared with "bar". - - fisk(x, {y: 8, zz: 10}) => "4 $x $y $zz"; - titi(x, {y: 8, zz: 77}) => "5 $x $y $zz"; // Could be shared with "fisk", - // because default-val is never used. -} - -class B { - // All implicit closures of B can be shared with their equivalent functions - // of A. - foo() => 4990; - fooo() => 49990; - bar(x, {y: 8, z: 10}) => "1B $x $y $z"; - gee(x, {y: 9, z: 11}) => "2B $x $y $z"; - toto(x, {y: 8, z: 10}) => "3B $x $y $z"; - fisk(x, {y: 8, zz: 10}) => "4B $x $y $zz"; - titi(x, {y: 8, zz: 77}) => "5B $x $y $zz"; -} - -tearOffFoo(o) => o.foo; -tearOffFooo(o) => o.fooo; -tearOffBar(o) => o.bar; -tearOffGee(o) => o.gee; -tearOffToto(o) => o.toto; -tearOffFisk(o) => o.fisk; -tearOffTiti(o) => o.titi; - -main() { - var a = new A(); - var b = new B(); - Expect.equals(499, tearOffFoo(a)()); - Expect.equals(4990, tearOffFoo(b)()); - Expect.equals(4999, tearOffFooo(a)()); - Expect.equals(49990, tearOffFooo(b)()); - - var barA = tearOffBar(a); - var barB = tearOffBar(b); - var geeA = tearOffGee(a); - var geeB = tearOffGee(b); - var totoA = tearOffToto(a); - var totoB = tearOffToto(b); - Expect.equals("1 33 8 10", barA(33)); - Expect.equals("1B 33 8 10", barB(33)); - Expect.equals("2 33 9 11", geeA(33)); - Expect.equals("2B 33 9 11", geeB(33)); - Expect.equals("3 33 8 10", totoA(33)); - Expect.equals("3B 33 8 10", totoB(33)); - - Expect.equals("1 35 8 10", barA(35)); - Expect.equals("1B 35 8 10", barB(35)); - Expect.equals("2 35 9 11", geeA(35)); - Expect.equals("2B 35 9 11", geeB(35)); - Expect.equals("3 35 8 10", totoA(35)); - Expect.equals("3B 35 8 10", totoB(35)); - - Expect.equals("1 35 8 77", barA(35, z: 77)); - Expect.equals("1B 35 8 77", barB(35, z: 77)); - Expect.equals("2 35 9 77", geeA(35, z: 77)); - Expect.equals("2B 35 9 77", geeB(35, z: 77)); - Expect.equals("3 35 8 77", totoA(35, z: 77)); - Expect.equals("3B 35 8 77", totoB(35, z: 77)); - - Expect.equals("1 35 8 77", barA(35, z: 77)); - Expect.equals("1B 35 8 77", barB(35, z: 77)); - Expect.equals("2 35 9 77", geeA(35, z: 77)); - Expect.equals("2B 35 9 77", geeB(35, z: 77)); - Expect.equals("3 35 8 77", totoA(35, z: 77)); - Expect.equals("3B 35 8 77", totoB(35, z: 77)); - - var fiskA = tearOffFisk(a); - var fiskB = tearOffFisk(b); - var titiA = tearOffTiti(a); - var titiB = tearOffTiti(b); - - Expect.equals("4 311 8 987", fiskA(311, zz: 987)); - Expect.equals("4B 311 8 987", fiskB(311, zz: 987)); - Expect.equals("5 311 8 987", titiA(311, zz: 987)); - Expect.equals("5B 311 8 987", titiB(311, zz: 987)); - - Expect.equals("4 311 765 987", fiskA(311, y: 765, zz: 987)); - Expect.equals("4B 311 765 987", fiskB(311, y: 765, zz: 987)); - Expect.equals("5 311 765 987", titiA(311, y: 765, zz: 987)); - Expect.equals("5B 311 765 987", titiB(311, y: 765, zz: 987)); -} diff --git a/tests/language_2/closure/closure8_test.dart b/tests/language_2/closure/closure8_test.dart deleted file mode 100644 index c77e3b83864..00000000000 --- a/tests/language_2/closure/closure8_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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. -// Regression test for issue 6353. - -// @dart = 2.9 - -class A {} - -class C extends A { - forEach(callback(E element)) {} -} - -class D { - lala(E element) {} -} - -main() { - var c = new C(); - c.forEach(new D().lala); -} diff --git a/tests/language_2/closure/closure_test.dart b/tests/language_2/closure/closure_test.dart deleted file mode 100644 index d90c428a86c..00000000000 --- a/tests/language_2/closure/closure_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// 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 test for closures. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - var field; - A(this.field) {} -} - -class ClosureTest { - static testMain() { - var o = new A(3); - foo() => o.field++; - Expect.equals(3, foo()); - Expect.equals(4, o.field); - } -} - -main() { - ClosureTest.testMain(); -} diff --git a/tests/language_2/closure/closures_initializer2_test.dart b/tests/language_2/closure/closures_initializer2_test.dart deleted file mode 100644 index 01a3969fdf9..00000000000 --- a/tests/language_2/closure/closures_initializer2_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 - -class A { - var t; - A() : t = (() => T); -} - -expect(result, expected) { - if (result != expected) { - throw 'Expected $expected, got $result'; - } -} - -main() { - for (var i = 0; i < int.parse("1"); i++) { - expect(new A().t() is Type, true); - } -} diff --git a/tests/language_2/closure/closures_initializer_test.dart b/tests/language_2/closure/closures_initializer_test.dart deleted file mode 100644 index 4fc9d6bc332..00000000000 --- a/tests/language_2/closure/closures_initializer_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2013, 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 - -class A { - var t; - A() : t = (() => []); -} - -class B { - var t; - B() : t = (() => T); -} - -expect(result, expected) { - if (result != expected) { - throw 'Expected $expected, got $result'; - } -} - -main() { - expect(new A().t() is List, true); - expect(new A().t() is List, false); - expect(new B().t() is Type, true); - expect(new B().t(), int); -} diff --git a/tests/language_2/closure/closures_with_complex_params_test.dart b/tests/language_2/closure/closures_with_complex_params_test.dart deleted file mode 100644 index 6ba796b7fcb..00000000000 --- a/tests/language_2/closure/closures_with_complex_params_test.dart +++ /dev/null @@ -1,62 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Tests for parsing closures with complex parameter types. - -main() { - test1(); - test2(); - test3(); -} - -class Pair { - final A fst; - final B snd; - Pair(A this.fst, B this.snd); -} - -test1() { - // Closures with nested parameterized types. - var cdar1 = (Pair> pr) => pr.snd.fst; - var cdar2 = (Pair> pr) => pr.snd.fst; - - var e = new Pair>(100, new Pair(200, 300)); - - Expect.equals(200, cdar1(e)); - Expect.equals(200, cdar2(e)); -} - -test2() { - // Closures with nested parameterized types in optional position - var cdar1 = ([Pair> pr = null]) => pr.snd.fst; - var cdar2 = ([Pair> pr = null]) => pr.snd.fst; - - var e = new Pair>(100, new Pair(200, 300)); - - Expect.equals(200, cdar1(e)); - Expect.equals(200, cdar2(e)); -} - -test3() { - // Closures with nested parameterized types. - var f1 = (Pair> pr) => pr.snd.fst + 1; - var f2 = (Pair> pr) => pr.snd.fst + 2; - - // Closures with function type with nested parameterized types. - var ap1 = (f(Pair> pr1), Pair> pr) => - f(pr) * 10; - var ap2 = (f(Pair> pr1), Pair> pr) => - f(pr) * 100; - - var e = new Pair>(100, new Pair(200, 300)); - - Expect.equals(2010, ap1(f1, e)); - Expect.equals(2020, ap1(f2, e)); - Expect.equals(20100, ap2(f1, e)); - Expect.equals(20200, ap2(f2, e)); -} diff --git a/tests/language_2/closure/cycles_test.dart b/tests/language_2/closure/cycles_test.dart deleted file mode 100644 index cf69b18f4e1..00000000000 --- a/tests/language_2/closure/cycles_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// 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. -// Based on dartbug.com/7681 -// Verify that context chains do not lead to unintended memory being held. - -// @dart = 2.9 - -library closure_cycles_test; - -import "dart:async"; - -class X { - Function onX; - X() { - Timer.run(() => onX(new Y())); - } -} - -class Y { - Function onY; - var heavyMemory; - static var count = 0; - Y() { - // Consume large amounts of memory per iteration to fail/succeed quicker. - heavyMemory = new List.filled(10 * 1024 * 1024, null); - // Terminate the test if we allocated enough memory without running out. - if (count++ > 100) return; - Timer.run(() => onY()); - } -} - -void doIt() { - var x = new X(); - x.onX = (y) { - y.onY = () { - y; // Capturing y can lead to endless context chains! - doIt(); - }; - }; -} - -void main() { - doIt(); -} diff --git a/tests/language_2/closure/dynamic_test.dart b/tests/language_2/closure/dynamic_test.dart deleted file mode 100644 index 1defa57f31b..00000000000 --- a/tests/language_2/closure/dynamic_test.dart +++ /dev/null @@ -1,64 +0,0 @@ -// 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. -// -// Test that dynamic invocation of closures works as expected, including -// appropriate type checks. -// -// VMOptions=--lazy-dispatchers -// VMOptions=--no-lazy-dispatchers - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -class A { - final int nonce_; - - A(this.nonce_); -} - -class B { - final int nonce_; - - B(this.nonce_); -} - -class C extends A { - C(int nonce) : super(nonce); -} - -void main() { - dynamic f = (String a1, int a2, A a3, {String n1, int n2, A n3}) {}; - - f("test_fixed", 1, A(1), n1: "test_named", n2: 2, n3: A(2)); - -// Test named argument permutations - f("test_fixed", 1, A(1), n1: "test_named", n3: A(2), n2: 2); - f("test_fixed", 1, A(1), n2: 2, n1: "test_named", n3: A(2)); - f("test_fixed", 1, A(1), n2: 2, n3: A(2), n1: "test_named"); - f("test_fixed", 1, A(1), n3: A(2), n1: "test_named", n2: 2); - f("test_fixed", 1, A(1), n3: A(2), n2: 2, n1: "test_named"); - -// Test subclasses match the type - f("test_fixed", 1, C(1), n1: "test_named", n2: 2, n3: A(2)); - f("test_fixed", 1, A(1), n1: "test_named", n2: 2, n3: C(2)); - -// Should fail with no such method errors - Expect.throwsNoSuchMethodError(() => f()); - Expect.throwsNoSuchMethodError(() => f("test_fixed", 1, A(1), n4: 4)); - -// Should fail with type errors - Expect.throwsTypeError( - () => f(100, 1, A(1), n1: "test_named", n2: 2, n3: A(2))); - Expect.throwsTypeError( - () => f("test_fixed", 1.1, A(1), n1: "test_named", n2: 2, n3: A(2))); - Expect.throwsTypeError( - () => f("test_fixed", 1, B(1), n1: "test_named", n2: 2, n3: A(2))); - Expect.throwsTypeError( - () => f("test_fixed", 1, A(1), n1: 100, n2: 2, n3: A(2))); - Expect.throwsTypeError( - () => f("test_fixed", 1, A(1), n1: "test_named", n2: 2.2, n3: A(2))); - Expect.throwsTypeError( - () => f("test_fixed", 1, A(1), n1: "test_named", n2: 2, n3: B(2))); -} diff --git a/tests/language_2/closure/forwarding_stub_tearoff_generic_test.dart b/tests/language_2/closure/forwarding_stub_tearoff_generic_test.dart deleted file mode 100644 index 64c8cab1df0..00000000000 --- a/tests/language_2/closure/forwarding_stub_tearoff_generic_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class C { - void f(B x) {} -} - -abstract class I { - void f(T x); -} - -// D contains a forwarding stub for f which ensures that `x` is type checked. -class D extends C implements I {} - -void checkStubTearoff(dynamic tearoff) { - // Since the stub's parameter is covariant, its type should be reified as - // Object. - Expect.isTrue(tearoff is void Function(Object)); - - // Verify that the appropriate runtime check occurs. - tearoff(new B()); // No error - Expect.throwsTypeError(() { - tearoff(new A()); - }); -} - -main() { - // The same forwarding stub should be torn off from D regardless of what - // interface is used to tear it off. - D d = new D(); - C c = d; - I i = d; - checkStubTearoff(d.f); - checkStubTearoff(c.f); - checkStubTearoff(i.f); -} diff --git a/tests/language_2/closure/forwarding_stub_tearoff_test.dart b/tests/language_2/closure/forwarding_stub_tearoff_test.dart deleted file mode 100644 index 1261adb2732..00000000000 --- a/tests/language_2/closure/forwarding_stub_tearoff_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class C { - void f(B x) {} -} - -abstract class I { - void f(covariant A x); -} - -// D contains a forwarding stub for f which ensures that `x` is type checked. -class D extends C implements I {} - -void checkStubTearoff(dynamic tearoff) { - // Since the stub's parameter is covariant, its type should be reified as - // Object. - Expect.isTrue(tearoff is void Function(Object)); - - // Verify that the appropriate runtime check occurs. - tearoff(new B()); // No error - Expect.throwsTypeError(() { - tearoff(new A()); - }); -} - -main() { - // The same forwarding stub should be torn off from D regardless of what - // interface is used to tear it off. - D d = new D(); - C c = d; - I i = d; - checkStubTearoff(d.f); - checkStubTearoff(c.f); - checkStubTearoff(i.f); -} diff --git a/tests/language_2/closure/implicit1_test.dart b/tests/language_2/closure/implicit1_test.dart deleted file mode 100644 index 245cff7c7c7..00000000000 --- a/tests/language_2/closure/implicit1_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// 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. -// VMOptions=--enable_type_checks --enable_asserts - -// @dart = 2.9 - -typedef Handler(bool e); - -class Hello { - Hello() {} - void handler2(bool e) { - print('handler2'); - } - - static void handler1(bool e) { - print('handler1'); - } - - void addEventListener(String s, Handler handler, bool status) { - handler(status); - } - - static void main() { - final h = new Hello(); - h.addEventListener('click', handler1, false); - h.addEventListener('click', h.handler2, false); - } -} - -main() { - Hello.main(); -} diff --git a/tests/language_2/closure/implicit2_test.dart b/tests/language_2/closure/implicit2_test.dart deleted file mode 100644 index f30432adae5..00000000000 --- a/tests/language_2/closure/implicit2_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class B { - foo(i) => 499 + i; -} - -class A { - var b; - A() : b = new B(); - - foo(i) { - return (() => b.foo(i))(); - } -} - -main() { - var a = new A(); - Expect.equals(510, a.foo(11)); - var f = a.foo; - Expect.equals(521, f(22)); -} diff --git a/tests/language_2/closure/implicit_closure_test.dart b/tests/language_2/closure/implicit_closure_test.dart deleted file mode 100644 index a4defba4c75..00000000000 --- a/tests/language_2/closure/implicit_closure_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// 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 test program for testing invocation of implicit closures. -// VMOptions= -// VMOptions=--use_slow_path - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class First { - First(this.i) {} - var b; - int foo() { - return i; - } - - Function foo1() { - local() { - return i; - } - - return local; - } - - int i; -} - -class ImplicitClosureTest { - static void testMain() { - First obj = new First(20); - - Function func = () => obj.i; - obj.b = func; - Expect.equals(20, obj.b()); - - var ib1 = obj.foo1(); - Expect.equals(obj.i, ib1()); - - var ib = obj.foo; - Expect.equals(obj.i, ib()); - } -} - -main() { - ImplicitClosureTest.testMain(); -} diff --git a/tests/language_2/closure/in_constructor_test.dart b/tests/language_2/closure/in_constructor_test.dart deleted file mode 100644 index 3ac22059f88..00000000000 --- a/tests/language_2/closure/in_constructor_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - var closure; - - factory A.factory() => new A(() => []); - - A([this.closure]) { - if (closure == null) { - closure = () => []; - } - } -} - -main() { - Expect.isTrue((new A.factory()).closure() is List); - Expect.isTrue((new A()).closure() is List); - Expect.isTrue((new A.factory()).closure() is List); - Expect.isTrue((new A()).closure() is List); - Expect.isFalse((new A.factory()).closure() is List); - Expect.isFalse((new A()).closure() is List); -} diff --git a/tests/language_2/closure/in_field_initializer_test.dart b/tests/language_2/closure/in_field_initializer_test.dart deleted file mode 100644 index 82894c62a32..00000000000 --- a/tests/language_2/closure/in_field_initializer_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class Foo { - var closures = {'a': (int x, int y) => x + y}; -} - -main() { - var closures = new Foo().closures; - Expect.equals(6, closures['a'](4, 2)); -} diff --git a/tests/language_2/closure/in_initializer2_test.dart b/tests/language_2/closure/in_initializer2_test.dart deleted file mode 100644 index cb0986438db..00000000000 --- a/tests/language_2/closure/in_initializer2_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2012, 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 - -// Test that a parameter used in a closure is properly boxed. - -import "package:expect/expect.dart"; - -abstract class S { - S() { - Expect.equals(2, this.f()); - } - - get f; -} - -class A extends S { - var f; - A(a) : f = (() => ++a) { - Expect.equals(a, 2); - } -} - -main() { - var a = new A(1); - Expect.equals(a.f(), 3); -} diff --git a/tests/language_2/closure/in_initializer_test.dart b/tests/language_2/closure/in_initializer_test.dart deleted file mode 100644 index 90a00d8e812..00000000000 --- a/tests/language_2/closure/in_initializer_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2012, 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 - -// Test that a parameter used in two different closures defined in a -// constructor initializer, is properly boxed. - -import "package:expect/expect.dart"; - -class A { - var f; - var g; - A(a) - : f = (() => 42 + a), - g = (() => ++a) { - a = 4; - } -} - -class B extends A { - B() : super(42); -} - -class C extends A { - var h; - C(a) - : h = (() => ++a), - super(42); -} - -main() { - dynamic a = new A(1); - Expect.equals(46, a.f()); - Expect.equals(5, a.g()); - Expect.equals(47, a.f()); - - a = new B(); - Expect.equals(46, a.f()); - Expect.equals(5, a.g()); - Expect.equals(47, a.f()); - - a = new C(0); - Expect.equals(46, a.f()); - Expect.equals(5, a.g()); - Expect.equals(47, a.f()); - Expect.equals(1, a.h()); - Expect.equals(2, a.h()); - Expect.equals(47, a.f()); - Expect.equals(6, a.g()); - Expect.equals(48, a.f()); -} diff --git a/tests/language_2/closure/internals_runtime_test.dart b/tests/language_2/closure/internals_runtime_test.dart deleted file mode 100644 index afc490db078..00000000000 --- a/tests/language_2/closure/internals_runtime_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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 "package:expect/expect.dart"; - -class C { - foo() => 123; -} - -main() { - var f = new C().foo; - - - -} diff --git a/tests/language_2/closure/internals_test.dart b/tests/language_2/closure/internals_test.dart deleted file mode 100644 index 288790e8d6e..00000000000 --- a/tests/language_2/closure/internals_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class C { - foo() => 123; -} - -main() { - var f = new C().foo; - var target = f.target; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'target' isn't defined for the class 'dynamic Function()'. - var self = f.self; - // ^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'self' isn't defined for the class 'dynamic Function()'. - var receiver = f.receiver; - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'receiver' isn't defined for the class 'dynamic Function()'. -} diff --git a/tests/language_2/closure/invoked_through_interface_target_field_test.dart b/tests/language_2/closure/invoked_through_interface_target_field_test.dart deleted file mode 100644 index fbcb516df54..00000000000 --- a/tests/language_2/closure/invoked_through_interface_target_field_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2017, 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 - -// Note: this test expects a compile error (getter overrides a method), but it -// contains more code than necessary to provoke the compile error. The reason -// for the extra code is to document the complications that would arise if we -// decided to eliminate the compile error (and allow getters to override -// methods). - -import "package:expect/expect.dart"; - -typedef void F(T t); - -class A { -// ^ -// [cfe] The non-abstract class 'A' is missing implementations for these members: - void foo(Object n); -//^^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER -} - -class C implements A { - F foo; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_FIELD_AND_METHOD - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -class D { - void m(T t) {} -} - -F bar(D d) => d.m; -void baz(A a) { - Expect.throws(() { - // This call looks like it doesn't require any runtime type checking, since - // it is a call to a regular method with no covariant parameters. However, - // if we decide to allow getters to override methods, then it's possible - // that it's actually invoking a getter that returns a closure, and that - // closure might have covariant parameters that need runtime type checks. - a.foo('hi'); - }); - // This call is ok because the types match up at runtime. - a.foo(1); -} - -main() { - baz(new C()..foo = bar(new D())); -} diff --git a/tests/language_2/closure/invoked_through_interface_target_getter_test.dart b/tests/language_2/closure/invoked_through_interface_target_getter_test.dart deleted file mode 100644 index 5d41cba49fa..00000000000 --- a/tests/language_2/closure/invoked_through_interface_target_getter_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2017, 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 - -// Note: this test expects a compile error (getter overrides a method), but it -// contains more code than necessary to provoke the compile error. The reason -// for the extra code is to document the complications that would arise if we -// decided to eliminate the compile error (and allow getters to override -// methods). - -import "package:expect/expect.dart"; - -typedef void F(T t); - -class A { -// ^ -// [cfe] The non-abstract class 'A' is missing implementations for these members: - void foo(Object n); -//^^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER -} - -class C implements A { - F get foo => bar(new D()); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_FIELD_AND_METHOD - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -class D { - void m(T t) {} -} - -F bar(D d) => d.m; -void baz(A a) { - Expect.throws(() { - // This call looks like it doesn't require any runtime type checking, since - // it is a call to a regular method with no covariant parameters. However, - // if we decide to allow getters to override methods, then it's possible - // that it's actually invoking a getter that returns a closure, and that - // closure might have covariant parameters that need runtime type checks. - a.foo('hi'); - }); - // This call is ok because the types match up at runtime. - a.foo(1); -} - -main() { - baz(new C()); -} diff --git a/tests/language_2/closure/minify_closure_variable_collision_test.dart b/tests/language_2/closure/minify_closure_variable_collision_test.dart deleted file mode 100644 index bd1ee86f955..00000000000 --- a/tests/language_2/closure/minify_closure_variable_collision_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js, that used to minify a captured -// variable's name to the same name as inherited Object methods. - -var array = [new A()]; - -class A { - operator ==(other) { - return true; - } -} - -foo() { - // Use lots of variables, to maximize the chance of collisions. - var a = 42; - var b = 42; - var c = 42; - var d = 42; - var e = 42; - var f = 42; - var g = 42; - var h = 42; - var i = 42; - var j = 42; - var k = 42; - var l = 42; - var m = 42; - var n = 42; - array[0] = () { - return a + b + c + d + e + f + g + h + i + j + k + l + m + n; - }; -} - -main() { - foo(); - if (array[0] == new A()) { - throw 'Test failed'; - } - if (array[0]() != 42 * 14) { - throw 'Test failed'; - } -} diff --git a/tests/language_2/closure/nested_generic_closure_test.dart b/tests/language_2/closure/nested_generic_closure_test.dart deleted file mode 100644 index e9fc5025c3a..00000000000 --- a/tests/language_2/closure/nested_generic_closure_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2017, 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 - -import 'package:expect/expect.dart'; - -void foo(F f(F f)) {} - -B bar(B g(F f)) => null; - -Function baz() { - B foo(B b, F f) => null; - return foo; -} - -class C { - void foo(F f(T t, F f)) => null; - B bar(B g(T t, F f)) => null; - Function baz() { - B foo(T t, F f) => null; - return foo; - } -} - -main() { - // Check the run-time type of the functions with generic parameters. - - Expect.type(X))>(foo); - - Expect.isTrue(bar is X1 Function(X1 Function(X2))); - - Expect.isTrue(baz() is int Function(int, X1)); - Expect.isTrue(baz() is Object Function(Object, X1)); - Expect.isTrue(baz() is Null Function(Null, X1)); - - void testC() { - var c = new C(); - - Expect.type(T, F))>(c.foo); - - Expect.isTrue(c.bar is X1 Function(X1 Function(T, X2))); - - Expect.isTrue(c.baz() is int Function(T, X1)); - } - - testC(); - testC(); - testC(); -} diff --git a/tests/language_2/closure/param_null_to_object_test.dart b/tests/language_2/closure/param_null_to_object_test.dart deleted file mode 100644 index 0e81feb08db..00000000000 --- a/tests/language_2/closure/param_null_to_object_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -main() { - int Function(Null) f = (x) => 1; // Runtime type is int Function(Object) - Expect.isTrue(f is int Function(Null)); - Expect.isTrue(f is int Function(String)); - Expect.isTrue(f is int Function(Object)); - int Function(String) g = (x) => 1; // Runtime type is int Function(String) - Expect.isTrue(g is int Function(Null)); - Expect.isTrue(g is int Function(String)); - Expect.isFalse(g is int Function(Object)); -} diff --git a/tests/language_2/closure/parameter_types_test.dart b/tests/language_2/closure/parameter_types_test.dart deleted file mode 100644 index a724948eb6e..00000000000 --- a/tests/language_2/closure/parameter_types_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Regression test for dart2js, where the optimizer was too aggressive -// about parameter types of closures. - -class A { - Function f; - A(this.f); - _do() => f(1); -} - -main() { - int invokeCount = 0; - closure(a) { - if (invokeCount++ == 1) { - Expect.isTrue(a is int); - } - } - - closure('s'); - new A(closure)._do(); - Expect.equals(2, invokeCount); -} diff --git a/tests/language_2/closure/parse_closures_in_initializers_test.dart b/tests/language_2/closure/parse_closures_in_initializers_test.dart deleted file mode 100644 index 94f89e757dc..00000000000 --- a/tests/language_2/closure/parse_closures_in_initializers_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'package:expect/expect.dart'; - -// Test that function literals are parsed correctly in initializers. - -class A { - final x; - static foo(f) => f(); - - A.parenthesized(y) : x = (() => y); - A.stringLiteral(y) : x = "**${() => y}--"; - A.listLiteral(y) : x = [() => y]; - A.mapLiteral(y) : x = {"fun": () => y}; - A.arg(y) : x = foo(() => y); -} - -main() { - var a, f; - a = new A.parenthesized(499); - f = a.x; - Expect.isTrue(f is Function); - Expect.equals(499, f()); - - // The toString of closures is not specified. Just make sure that there is no - // crash. - a = new A.stringLiteral(42); - Expect.isTrue(a.x.startsWith("**")); - Expect.isTrue(a.x.endsWith("--")); - - a = new A.listLiteral(99); - f = a.x[0]; - Expect.isTrue(f is Function); - Expect.equals(99, f()); - - a = new A.mapLiteral(314); - f = a.x["fun"]; - Expect.isTrue(f is Function); - Expect.equals(314, f()); - - a = new A.arg(123); - Expect.equals(123, a.x); -} diff --git a/tests/language_2/closure/partial_instantiation_eager_bounds_check_test.dart b/tests/language_2/closure/partial_instantiation_eager_bounds_check_test.dart deleted file mode 100644 index e9784df3c0a..00000000000 --- a/tests/language_2/closure/partial_instantiation_eager_bounds_check_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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. -// -// This test checks that necessary type argument bounds checks are performed -// eagerly during partial instantiation, rather than being delayed until the -// partially instantiated closure is invoked. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class C { - void foo(S x) {} -} - -void main() { - C c = C(); - void Function(String) fn; - Expect.throwsTypeError(() { - fn = c.foo; - }); -} diff --git a/tests/language_2/closure/partial_instantiation_static_bounds_check_runtime_test.dart b/tests/language_2/closure/partial_instantiation_static_bounds_check_runtime_test.dart deleted file mode 100644 index 52d48d14c9a..00000000000 --- a/tests/language_2/closure/partial_instantiation_static_bounds_check_runtime_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -topFn(T x) { - print(T); -} - -class C { - instanceFn(S x) { - print(S); - } -} - -class D extends C { - void foo() { - - } -} - -void main() { - localFn(T x) { - print(T); - } - - - -} diff --git a/tests/language_2/closure/partial_instantiation_static_bounds_check_test.dart b/tests/language_2/closure/partial_instantiation_static_bounds_check_test.dart deleted file mode 100644 index 34e6b18d57a..00000000000 --- a/tests/language_2/closure/partial_instantiation_static_bounds_check_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2018, 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 - -topFn(T x) { - print(T); -} - -class C { - instanceFn(S x) { - print(S); - } -} - -class D extends C { - void foo() { - void Function(int) k = instanceFn; - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER - // [cfe] Inferred type argument 'int' doesn't conform to the bound 'T' of the type variable 'S' on 'dynamic Function(S)'. - } -} - -void main() { - localFn(T x) { - print(T); - } - - void Function(String) k0 = localFn; - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER - // [cfe] Inferred type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Null Function(T)'. - void Function(String) k1 = topFn; - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER - // [cfe] Inferred type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'dynamic Function(T)'. -} diff --git a/tests/language_2/closure/partial_tearoff_instantiation_test.dart b/tests/language_2/closure/partial_tearoff_instantiation_test.dart deleted file mode 100644 index 67083338f4c..00000000000 --- a/tests/language_2/closure/partial_tearoff_instantiation_test.dart +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -typedef F1 = void Function(T); -typedef void F2(T v); - -dynamic defaultFLatest; - -void defaultF(T v) { - defaultFLatest = v; -} - -class X1 { - final F1 f; - const X1({this.f: defaultF}); -} - -class X2 { - final F2 f; - const X2({this.f: defaultF}); -} - -class Y1 { - F1 f; -} - -class Y2 { - F2 f; -} - -dynamic foo() { - if (defaultFLatest == -1) return -1; - return "not -1"; -} - -void main() { - { - var x = const X1(); - - // OK with implicit dynamic type argument. - x.f("hello1"); - Expect.equals("hello1", defaultFLatest); - - // OK with explicit dynamic type argument. - x.f("hello2"); - Expect.equals("hello2", defaultFLatest); - - // OK with correctly given argument type. - x.f("hello3"); - Expect.equals("hello3", defaultFLatest); - - // OK with correctly given argument type. - x.f(42); - Expect.equals(42, defaultFLatest); - - // Not OK with incorrectly given argument type. - x.f("hello"); //# 01: compile-time error - - // Not OK with incorrectly given argument type. - x.f(foo()); //# 02: runtime error - - var y = new Y1(); - y.f = defaultF; - - // OK with implicit dynamic type argument. - y.f("hello4"); - Expect.equals("hello4", defaultFLatest); - - // OK with explicit dynamic type argument. - y.f("hello5"); - Expect.equals("hello5", defaultFLatest); - - // OK with correctly given argument type. - y.f("hello6"); - Expect.equals("hello6", defaultFLatest); - - // OK with correctly given argument type. - y.f(43); - Expect.equals(43, defaultFLatest); - - // Not OK with incorrectly given argument type. - y.f("hello"); //# 03: compile-time error - - // Not OK with incorrectly given argument type. - y.f(foo()); //# 04: runtime error - } - { - var x = const X2(); - - // OK with no type arguments. - x.f("hello1"); - Expect.equals("hello1", defaultFLatest); - - // Not OK with a type argument. - x.f("hello2"); //# 05: compile-time error - - // Not OK with a type argument. - x.f("hello3"); //# 06: compile-time error - - var y = new Y2(); - y.f = defaultF; - - // OK with no type argument. - y.f("hello4"); - Expect.equals("hello4", defaultFLatest); - - // Not OK with a type argument. - y.f("hello5"); //# 07: compile-time error - - // Not OK with a type argument. - y.f("hello6"); //# 08: compile-time error - - // Correct runtime type of x.f. - void instantiatedFType(dynamic _) {} - Expect.equals(x.f.runtimeType.toString(), - instantiatedFType.runtimeType.toString()); // #09: ok - } -} diff --git a/tests/language_2/closure/regress46568_test.dart b/tests/language_2/closure/regress46568_test.dart deleted file mode 100644 index 1117775817d..00000000000 --- a/tests/language_2/closure/regress46568_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2021, 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 - -import 'package:expect/expect.dart'; - -// Regression test for https://github.com/dart-lang/sdk/issues/46568. - -var genericTopLevelFunctionCallCount = 0; -var genericStaticMethodCallCount = 0; - -T genericTopLevelFunction() { - genericTopLevelFunctionCallCount++; - return null; -} - -class A { - static T genericStaticMethod() { - genericStaticMethodCallCount++; - return null; - } -} - -const int Function() cIntTopLevelFunction1 = genericTopLevelFunction; -const int Function() cIntStaticMethod1 = A.genericStaticMethod; - -void main() { - // Two different const generic function instantiations should not be - // canonicalized to the same value. - Expect.isFalse(identical(cIntTopLevelFunction1, cIntStaticMethod1)); - Expect.notEquals(cIntTopLevelFunction1, cIntStaticMethod1); - - cIntTopLevelFunction1(); - Expect.equals(1, genericTopLevelFunctionCallCount); - Expect.equals(0, genericStaticMethodCallCount); - - cIntStaticMethod1(); - Expect.equals(1, genericTopLevelFunctionCallCount); - Expect.equals(1, genericStaticMethodCallCount); -} diff --git a/tests/language_2/closure/self_reference_test.dart b/tests/language_2/closure/self_reference_test.dart deleted file mode 100644 index 1b348133fb6..00000000000 --- a/tests/language_2/closure/self_reference_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'package:expect/expect.dart'; - -// Tests a self-reference of a closure inside a try/catch. -// Dart2js must not try to box the closure-reference. - -main() { - var counter = 0; - inner(value) { - if (value == 0) return 0; - try { - return inner(value - 1); - } finally { - counter++; - } - } - - Expect.equals(0, inner(199)); - Expect.equals(199, counter); -} diff --git a/tests/language_2/closure/shared_state_test.dart b/tests/language_2/closure/shared_state_test.dart deleted file mode 100644 index 0920aabab9d..00000000000 --- a/tests/language_2/closure/shared_state_test.dart +++ /dev/null @@ -1,78 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Tests for closures sharing mutable bindings. - -var f; -var g; - -setupPlain() { - int j = 1000; - // Two closures sharing variable 'j'; j initially is 1000. - f = (int x) { - var q = j; - j = x; - return q; - }; - g = (int x) { - var q = j; - j = x; - return q; - }; -} - -setupLoop() { - for (int i = 0; i < 2; i++) { - int j = i * 1000; // The last stored closure has j initially 1000. - // Two closures sharing variable 'j'. - f = (int x) { - var q = j; - j = x; - return q; - }; - g = (int x) { - var q = j; - j = x; - return q; - }; - } -} - -setupNestedLoop() { - for (int outer = 0; outer < 2; outer++) { - int j = outer * 1000; - for (int i = 0; i < 2; i++) { - // Two closures sharing variable 'j' in a loop at different nesting. - f = (int x) { - var q = j; - j = x; - return q; - }; - g = (int x) { - var q = j; - j = x; - return q; - }; - } - } -} - -test(setup) { - setup(); - Expect.equals(1000, f(100)); - Expect.equals(100, f(200)); - Expect.equals(200, f(300)); - Expect.equals(300, g(400)); - Expect.equals(400, g(500)); -} - -main() { - test(setupPlain); - test(setupLoop); - test(setupNestedLoop); -} diff --git a/tests/language_2/closure/side_effect_test.dart b/tests/language_2/closure/side_effect_test.dart deleted file mode 100644 index fd7cddba4b3..00000000000 --- a/tests/language_2/closure/side_effect_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -typedef void VoidToVoid(); - -var b; -VoidToVoid a = () { - b = 42; -}; - -var c = [new C()]; - -class C { - nonInlinable1() { - a(); - } - - nonInlinable2() { - var a = () { - b = 42; - }; - a(); - } -} - -testClosureInStaticField() { - var temp = c[0]; - Expect.isNull(b); - temp.nonInlinable1(); - Expect.equals(42, b); - b = null; -} - -testLocalClosure() { - var temp = c[0]; - Expect.isNull(b); - temp.nonInlinable2(); - Expect.equals(42, b); -} - -main() { - testClosureInStaticField(); - testLocalClosure(); -} diff --git a/tests/language_2/closure/tearoff_bounds_instantiation_test.dart b/tests/language_2/closure/tearoff_bounds_instantiation_test.dart deleted file mode 100644 index 935705521ba..00000000000 --- a/tests/language_2/closure/tearoff_bounds_instantiation_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2018, 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. -// -// This test checks that the type parameter bounds on tearoffs from generic -// classes are properly instantiated in the signature of the tearoff. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class C { - void foo(S x) {} -} - -void foo(S x) {} - -void main() { - dynamic c = C(); - dynamic fn = c.foo; - Expect.equals("${fn.runtimeType}", "${foo.runtimeType}"); -} diff --git a/tests/language_2/closure/tearoff_dynamic_test.dart b/tests/language_2/closure/tearoff_dynamic_test.dart deleted file mode 100644 index 1dde4844ded..00000000000 --- a/tests/language_2/closure/tearoff_dynamic_test.dart +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) 2017, 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 -import 'package:expect/expect.dart'; - -class C { - dynamic f(int x) => x + 1; - dynamic g(int x) => x + 2; -} - -class D extends C { - f(int x) => x + 41; - get superF => super.f; - get superG => super.g; -} - -tearoffEquals(f1, f2) { - Expect.equals(f1, f2); - Expect.equals(f1.hashCode, f2.hashCode); -} - -tearoffNotEquals(f1, f2) { - Expect.notEquals(f1, f2); - Expect.notEquals(f1.hashCode, f2.hashCode); -} - -testDynamic() { - C c = new C(); - - dynamic f1 = c.f; - Expect.throws(() => f1(2.5)); - Expect.equals(f1(41), 42); - - dynamic f2 = (c as dynamic).f; - Expect.throws(() => f2(2.5)); - Expect.equals(f2(41), 42); - - tearoffEquals(f1, f1); - tearoffEquals(f1, f2); - tearoffEquals(f1, c.f); - tearoffEquals(c.g, (c as dynamic).g); - - tearoffNotEquals(f1, new C().f); - tearoffNotEquals(f1, (new C() as dynamic).f); - tearoffNotEquals(f1, c.g); - tearoffNotEquals(f1, (c as dynamic).g); - tearoffNotEquals(null, f1); - tearoffNotEquals(f1, null); -} - -testSuper() { - D d = new D(); - dynamic superF1 = d.superF; - dynamic superF2 = (d as dynamic).superF; - - Expect.throws(() => superF1(2.5)); - Expect.throws(() => superF2(2.5)); - Expect.equals(superF1(41), 42); - Expect.equals(superF2(41), 42); - - tearoffEquals(superF1, superF1); - tearoffEquals(superF1, superF2); - tearoffEquals(superF1, d.superF); - tearoffEquals(d.f, (d as dynamic).f); - - tearoffNotEquals(superF1, d.f); - tearoffNotEquals(superF1, (d as dynamic).f); - tearoffNotEquals(superF1, new D().superF); - tearoffNotEquals(superF1, (new D() as dynamic).superF); - tearoffNotEquals(superF1, d.superG); - tearoffNotEquals(superF1, (d as dynamic).superG); - - tearoffEquals(d.superG, (d as dynamic).superG); - tearoffEquals(d.g, d.superG); -} - -class S { - final int id; - S(this.id); - toString() => 'S#$id'; -} - -testToString() { - testType(T c) { - dynamic d = c; - Object o = c; - tearoffEquals(c.toString, d.toString); - tearoffEquals(c.toString, o.toString); - - var expected = c.toString(); - dynamic f = d.toString; - tearoffEquals(f(), expected); - f = o.toString; - tearoffEquals(f(), expected); - var g = c.toString; - tearoffEquals(g(), expected); - } - - testType(new C()); - testType(new D()); - testType(new S(1)); - testType(new S(2)); - testType(new Object()); - testType(null); - testType(Object); // Type - testType(C); // Type - testType(42); - testType('hi'); - testType(true); - testType([1, 2, 3]); - testType({'a': 'b'}); - testType((x) => x + 1); - testType(testType as dynamic); // illegal inferred type for T otherwise -} - -class N { - noSuchMethod(i) => i; -} - -testNoSuchMethod() { - // Create an invocation. - Invocation i = (new N() as dynamic).foo(1, bar: 2); - tearoffEquals(i.memberName, #foo); - - testType(T c) { - dynamic d = c; - Object o = c; - tearoffEquals(c.noSuchMethod, d.noSuchMethod); - tearoffEquals(c.noSuchMethod, o.noSuchMethod); - - var expected; - try { - c.noSuchMethod(i); - } on NoSuchMethodError catch (error) { - var nsm = '$error'; - Expect.isTrue(nsm.startsWith("NoSuchMethodError: ")); - Expect.isTrue(nsm.contains("'foo'")); - expected = (e) => e is NoSuchMethodError && '$e' == nsm; - } - dynamic f = d.noSuchMethod; - Expect.throws(() => f(i), expected); - f = o.noSuchMethod; - Expect.throws(() => f(i), expected); - var g = c.noSuchMethod; - Expect.throws(() => g(i), expected); - } - - testType(new C()); - testType(new D()); - testType(new S(1)); - testType(new S(2)); - testType(new Object()); - testType(null); - testType(Object); // Type - testType(C); // Type - testType(42); - testType('hi'); - testType(true); - testType([1, 2, 3]); - testType({'a': 'b'}); - testType((x) => x + 1); - testType(testType as dynamic); // illegal inferred type for T otherwise -} - -main() { - testDynamic(); - testSuper(); - testToString(); - testNoSuchMethod(); -} diff --git a/tests/language_2/closure/type_arguments_test.dart b/tests/language_2/closure/type_arguments_test.dart deleted file mode 100644 index f1120088a82..00000000000 --- a/tests/language_2/closure/type_arguments_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -typedef MapFunc = void Function(Map arg); - -class A

{ - final List barTypeArguments = []; - - void foo() { - void bar(Map arg) { - barTypeArguments..add(T1)..add(T2); - } - - // Call with explicit type arguments. - bar(null); - - // No explicit type arguments - should be instantiated to bounds. - bar(null); - - // Partial tear-off instantiation. - MapFunc instantiated = bar; - instantiated(null); - } -} - -abstract class MyIterable implements Iterable {} - -main() { - final a = new A(); - a.foo(); - Expect.listEquals( - [int, List, num, Iterable, double, MyIterable], a.barTypeArguments); - - // Test instantiation to bounds in the enclosing method. - dynamic b = new A(); - b.foo(); - Expect.listEquals( - [int, dynamic, int, dynamic, int, dynamic], b.barTypeArguments); -} diff --git a/tests/language_2/closure/type_test.dart b/tests/language_2/closure/type_test.dart deleted file mode 100644 index edb9e956643..00000000000 --- a/tests/language_2/closure/type_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2012, 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 - -// Dart test for a closure result type test that cannot be eliminated at compile -// time. - -import "package:expect/expect.dart"; - -void test(A func(String value), String value) { - Expect.throwsTypeError(() { - B x = func(value); - }); -} - - -class A { -} - -class B extends A { -} - -class C { - static A a(String x) => new A(); -} - -A aclosure(String x) => C.a(x); -A bclosure() => new A(); - -main() { - test(aclosure, "foo"); - test((bar) => bclosure(), "baz"); -} diff --git a/tests/language_2/closure/type_variable_test.dart b/tests/language_2/closure/type_variable_test.dart deleted file mode 100644 index ba0112cca0d..00000000000 --- a/tests/language_2/closure/type_variable_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that the type argument is available inside a closure. - -import "package:expect/expect.dart"; - -class A { - foo() { - bar() => T; - return bar(); - } -} - -main() { - Expect.equals(new A().foo(), int); -} diff --git a/tests/language_2/closure/type_variables_test.dart b/tests/language_2/closure/type_variables_test.dart deleted file mode 100644 index 6be0ff2fccf..00000000000 --- a/tests/language_2/closure/type_variables_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:async'; - -import "package:expect/expect.dart"; - -// Test that type variables are available in closures. - -class A { - A(); - - A.bar() { - g() { - new A(); - } - - g(); - } - - foo() { - g() { - return new A(); - } - - return g(); - } -} - -class B { - makeBaz() { - return (K key) async { - return null; - }; - } -} - -typedef Future aBaz(int a); - -main() { - Expect.isTrue(new A().foo() is A); - Expect.isTrue(new A.bar().foo() is A); - Expect.isTrue(new B().makeBaz() is aBaz); -} diff --git a/tests/language_2/closure/unnamed_closure_test.dart b/tests/language_2/closure/unnamed_closure_test.dart deleted file mode 100644 index f5e487029f4..00000000000 --- a/tests/language_2/closure/unnamed_closure_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -getNonArray() => new A(); - -class A { - operator [](index) => index; -} - -main() { - Expect.equals(42, () { - var res; - do { - var a = getNonArray(); - res = a[42]; - } while (false); - return res; - }()); -} diff --git a/tests/language_2/closure/variable_shadow_test.dart b/tests/language_2/closure/variable_shadow_test.dart deleted file mode 100644 index 07a11fc51d3..00000000000 --- a/tests/language_2/closure/variable_shadow_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -// The intermediate variable 'y' must either be preserved -// or parameters must be renamed. - -foo(x) { - var y = x; - bar(x) { - return y - x; - } - - return bar; -} - -main() { - Expect.equals(-10, foo(10)(20)); -} diff --git a/tests/language_2/closure/with_super_field_test.dart b/tests/language_2/closure/with_super_field_test.dart deleted file mode 100644 index 6563f90836c..00000000000 --- a/tests/language_2/closure/with_super_field_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - int a; - A() : a = 42; -} - -class B extends A { - int get a => 54; - returnSuper() => super.a; - returnSuperInClosure() => () => super.a; -} - -main() { - B b = new B(); - Expect.equals(54, b.a); - Expect.equals(42, b.returnSuper()); - Expect.equals(42, b.returnSuperInClosure()()); -} diff --git a/tests/language_2/closure/with_super_send_test.dart b/tests/language_2/closure/with_super_send_test.dart deleted file mode 100644 index 8399b8763d0..00000000000 --- a/tests/language_2/closure/with_super_send_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test a closurized super send. - -class Super { - m() => "super"; -} - -class Sub extends Super { - m() => "sub"; - - test() { - var x; - [0].forEach((e) => x = super.m()); - return x; - } -} - -main() { - Expect.equals("super", new Sub().test()); - Expect.equals("super", new Super().m()); - Expect.equals("sub", new Sub().m()); -} diff --git a/tests/language_2/compile_time_constant/a_test.dart b/tests/language_2/compile_time_constant/a_test.dart deleted file mode 100644 index 160abf57a94..00000000000 --- a/tests/language_2/compile_time_constant/a_test.dart +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -const m1 = const {'a': 400 + 99}; -const m2 = const {'a': 499, 'b': 42}; -const m3 = const {'m1': m1, 'm2': m2}; -const m4 = const {'z': 9, 'a': 8, 'm': 7}; -const m5 = const {'': 499}; -const m6 = const {'a': 499}; -const m7 = const {}; - -main() { - Expect.equals(499, m1['a']); - Expect.equals(null, m1['b']); - Expect.listEquals(['a'], m1.keys.toList()); - Expect.listEquals([499], m1.values.toList()); - Expect.isTrue(m1.containsKey('a')); - Expect.isFalse(m1.containsKey('toString')); - Expect.isTrue(m1.containsValue(499)); - Expect.isFalse(m1.containsValue(42)); - Expect.isFalse(m1.containsValue(null)); - var seenKeys = []; - var seenValues = []; - m1.forEach((key, value) { - seenKeys.add(key); - seenValues.add(value); - }); - Expect.listEquals(['a'], seenKeys); - Expect.listEquals([499], seenValues); - Expect.isFalse(m1.isEmpty); - Expect.equals(1, m1.length); - Expect.throwsUnsupportedError(() => m1.remove('a')); - Expect.throwsUnsupportedError(() => m1.remove('b')); - Expect.throwsUnsupportedError(() => m1.clear()); - Expect.throwsUnsupportedError(() => m1['b'] = 42); - Expect.throwsUnsupportedError(() => m1['a'] = 499); - Expect.throwsUnsupportedError(() => m1.putIfAbsent('a', () => 499)); - Expect.throwsUnsupportedError(() => m1.putIfAbsent('z', () => 499)); - - Expect.equals(499, m2['a']); - Expect.equals(42, m2['b']); - Expect.equals(null, m2['c']); - Expect.listEquals(['a', 'b'], m2.keys.toList()); - Expect.listEquals([499, 42], m2.values.toList()); - Expect.isTrue(m2.containsKey('a')); - Expect.isTrue(m2.containsKey('b')); - Expect.isFalse(m2.containsKey('toString')); - Expect.isTrue(m2.containsValue(499)); - Expect.isTrue(m2.containsValue(42)); - Expect.isFalse(m2.containsValue(99)); - Expect.isFalse(m2.containsValue(null)); - seenKeys = []; - seenValues = []; - m2.forEach((key, value) { - seenKeys.add(key); - seenValues.add(value); - }); - Expect.listEquals(['a', 'b'], seenKeys); - Expect.listEquals([499, 42], seenValues); - Expect.isFalse(m2.isEmpty); - Expect.equals(2, m2.length); - Expect.throwsUnsupportedError(() => m2.remove('a')); - Expect.throwsUnsupportedError(() => m2.remove('b')); - Expect.throwsUnsupportedError(() => m2.remove('c')); - Expect.throwsUnsupportedError(() => m2.clear()); - Expect.throwsUnsupportedError(() => m2['a'] = 499); - Expect.throwsUnsupportedError(() => m2['b'] = 42); - Expect.throwsUnsupportedError(() => m2['c'] = 499); - Expect.throwsUnsupportedError(() => m2.putIfAbsent('a', () => 499)); - Expect.throwsUnsupportedError(() => m2.putIfAbsent('z', () => 499)); - Expect.throwsUnsupportedError(() => m2['a'] = 499); - - Expect.identical(m3['m1'], m1); - Expect.identical(m3['m2'], m2); - - Expect.listEquals(['z', 'a', 'm'], m4.keys.toList()); - Expect.listEquals([9, 8, 7], m4.values.toList()); - seenKeys = []; - seenValues = []; - m4.forEach((key, value) { - seenKeys.add(key); - seenValues.add(value); - }); - Expect.listEquals(['z', 'a', 'm'], seenKeys); - Expect.listEquals([9, 8, 7], seenValues); - - Expect.equals(499, m5['']); - Expect.isTrue(m5.containsKey('')); - Expect.equals(1, m5.length); - - Expect.identical(m1, m6); - - Expect.isTrue(m7.isEmpty); - Expect.equals(0, m7.length); - Expect.equals(null, m7['b']); - Expect.listEquals([], m7.keys.toList()); - Expect.listEquals([], m7.values.toList()); - Expect.isFalse(m7.containsKey('a')); - Expect.isFalse(m7.containsKey('toString')); - Expect.isFalse(m7.containsValue(499)); - Expect.isFalse(m7.containsValue(null)); - seenKeys = []; - seenValues = []; - m7.forEach((key, value) { - seenKeys.add(key); - seenValues.add(value); - }); - Expect.listEquals([], seenKeys); - Expect.listEquals([], seenValues); - Expect.throwsUnsupportedError(() => m7.remove('a')); - Expect.throwsUnsupportedError(() => m7.remove('b')); - Expect.throwsUnsupportedError(() => m7.clear()); - Expect.throwsUnsupportedError(() => m7['b'] = 42); - Expect.throwsUnsupportedError(() => m7['a'] = 499); - Expect.throwsUnsupportedError(() => m7.putIfAbsent('a', () => 499)); - Expect.throwsUnsupportedError(() => m7.putIfAbsent('z', () => 499)); -} diff --git a/tests/language_2/compile_time_constant/arguments_runtime_test.dart b/tests/language_2/compile_time_constant/arguments_runtime_test.dart deleted file mode 100644 index c3cb1d20aad..00000000000 --- a/tests/language_2/compile_time_constant/arguments_runtime_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -class A { - const A(a); - const A.named({a: 42}); - const A.optional([a]); -} - -main() { - const A(1); - - - const A.named(); - - - - const A.optional(); - const A.optional(42); - -} diff --git a/tests/language_2/compile_time_constant/arguments_test.dart b/tests/language_2/compile_time_constant/arguments_test.dart deleted file mode 100644 index fc30343e28d..00000000000 --- a/tests/language_2/compile_time_constant/arguments_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2012, 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 - -class A { - const A(a); - const A.named({a: 42}); - const A.optional([a]); -} - -main() { - const A(1); - const A(); - // ^ - // [analyzer] COMPILE_TIME_ERROR.NOT_ENOUGH_POSITIONAL_ARGUMENTS - // ^^ - // [cfe] Too few positional arguments: 1 required, 0 given. - const A(1, 2); - // ^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS - // ^^^^^^ - // [cfe] Too many positional arguments: 1 allowed, but 2 found. - const A.named(); - const A.named(b: 1); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_NAMED_PARAMETER - // [cfe] No named parameter with the name 'b'. - const A.named(a: 1, a: 2); - // ^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_NAMED_ARGUMENT - // [cfe] Duplicated named argument 'a'. - const A.named(a: 1, b: 2); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_NAMED_PARAMETER - // [cfe] No named parameter with the name 'b'. - const A.optional(); - const A.optional(42); - const A.optional(42, 54); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS - // ^^^^^^^^ - // [cfe] Too many positional arguments: 1 allowed, but 2 found. -} diff --git a/tests/language_2/compile_time_constant/b_test.dart b/tests/language_2/compile_time_constant/b_test.dart deleted file mode 100644 index 9e070c653c8..00000000000 --- a/tests/language_2/compile_time_constant/b_test.dart +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -const m1 = const {'__proto__': 400 + 99}; -const m2 = const {'a': 499, 'b': 42}; -const m3 = const {'__proto__': 499}; - -main() { - Expect.equals(499, m1['__proto__']); - Expect.equals(null, m1['b']); - Expect.listEquals(['__proto__'], m1.keys.toList()); - Expect.listEquals([499], m1.values.toList()); - Expect.isTrue(m1.containsKey('__proto__')); - Expect.isFalse(m1.containsKey('toString')); - Expect.isTrue(m1.containsValue(499)); - Expect.isFalse(m1.containsValue(null)); - var seenKeys = []; - var seenValues = []; - m1.forEach((key, value) { - seenKeys.add(key); - seenValues.add(value); - }); - Expect.listEquals(['__proto__'], seenKeys); - Expect.listEquals([499], seenValues); - Expect.isFalse(m1.isEmpty); - Expect.equals(1, m1.length); - Expect.throwsUnsupportedError(() => m1.remove('__proto__')); - Expect.throwsUnsupportedError(() => m1.remove('b')); - Expect.throwsUnsupportedError(() => m1.clear()); - Expect.throwsUnsupportedError(() => m1['b'] = 42); - Expect.throwsUnsupportedError(() => m1['__proto__'] = 499); - Expect.throwsUnsupportedError(() => m1.putIfAbsent('__proto__', () => 499)); - Expect.throwsUnsupportedError(() => m1.putIfAbsent('z', () => 499)); - - Expect.equals(499, m2['a']); - Expect.equals(42, m2['b']); - Expect.equals(null, m2['c']); - Expect.equals(null, m2['__proto__']); - Expect.listEquals(['a', 'b'], m2.keys.toList()); - Expect.listEquals([499, 42], m2.values.toList()); - Expect.isTrue(m2.containsKey('a')); - Expect.isTrue(m2.containsKey('b')); - Expect.isFalse(m2.containsKey('toString')); - Expect.isFalse(m2.containsKey('__proto__')); - Expect.isTrue(m2.containsValue(499)); - Expect.isTrue(m2.containsValue(42)); - Expect.isFalse(m2.containsValue(null)); - seenKeys = []; - seenValues = []; - m2.forEach((key, value) { - seenKeys.add(key); - seenValues.add(value); - }); - Expect.listEquals(['a', 'b'], seenKeys); - Expect.listEquals([499, 42], seenValues); - Expect.isFalse(m2.isEmpty); - Expect.equals(2, m2.length); - Expect.throwsUnsupportedError(() => m2.remove('a')); - Expect.throwsUnsupportedError(() => m2.remove('b')); - Expect.throwsUnsupportedError(() => m2.remove('__proto__')); - Expect.throwsUnsupportedError(() => m2.clear()); - Expect.throwsUnsupportedError(() => m2['a'] = 499); - Expect.throwsUnsupportedError(() => m2['b'] = 42); - Expect.throwsUnsupportedError(() => m2['__proto__'] = 499); - Expect.throwsUnsupportedError(() => m2.putIfAbsent('a', () => 499)); - Expect.throwsUnsupportedError(() => m2.putIfAbsent('__proto__', () => 499)); - Expect.throwsUnsupportedError(() => m2['a'] = 499); - - Expect.isTrue(identical(m1, m3)); -} diff --git a/tests/language_2/compile_time_constant/c_runtime_1_test.dart b/tests/language_2/compile_time_constant/c_runtime_1_test.dart deleted file mode 100644 index 0440b875268..00000000000 --- a/tests/language_2/compile_time_constant/c_runtime_1_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -const m0 = const {499: 400 + 99}; -const m1 = const { - "foo" + "bar": 42 -}; -const m2 = const { - -}; -const m3 = const { - -}; - -use(x) => x; - -main() { - use(m0); - use(m1); - use(m2); - use(m3); -} diff --git a/tests/language_2/compile_time_constant/c_runtime_test.dart b/tests/language_2/compile_time_constant/c_runtime_test.dart deleted file mode 100644 index 5b9c99424cc..00000000000 --- a/tests/language_2/compile_time_constant/c_runtime_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -const m0 = const {499: 400 + 99}; -const m1 = const { - -}; -const m2 = const { - -}; -const m3 = const { - -}; - -use(x) => x; - -main() { - use(m0); - use(m1); - use(m2); - use(m3); -} diff --git a/tests/language_2/compile_time_constant/c_test.dart b/tests/language_2/compile_time_constant/c_test.dart deleted file mode 100644 index 7626f26a704..00000000000 --- a/tests/language_2/compile_time_constant/c_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2012, 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 - -const m0 = const {499: 400 + 99}; -const m1 = const {"foo" + "bar": 42}; -const m2 = const { -// ^ -// [cfe] Constant evaluation error: - "foo" * 4: 42 -//^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_NUM -}; -const m3 = const { - "foo".codeUnitAt(0): 42 -//^^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_METHOD_INVOCATION -// ^ -// [cfe] Method invocation is not a constant expression. -}; - -use(x) => x; - -main() { - use(m0); - use(m1); - use(m2); - use(m3); -} diff --git a/tests/language_2/compile_time_constant/compile_time_constant10_test.dart b/tests/language_2/compile_time_constant/compile_time_constant10_test.dart deleted file mode 100644 index a0d6a2e7af4..00000000000 --- a/tests/language_2/compile_time_constant/compile_time_constant10_test.dart +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test that 'identical(a,b)' is a compile-time constant. - -class C { - final x; - const C(this.x); - static f3() {} - static f4() {} -} - -const i1 = 1; -const i2 = 2; -const d1 = 1.5; -const d2 = 2.5; -const b1 = true; -const b2 = false; -const s1 = "1"; -const s2 = "2"; -const l1 = const [1, 2]; -const l2 = const [2, 3]; -const m1 = const {"x": 1}; -const m2 = const {"x": 2}; -const c1 = const C(1); -const c2 = const C(2); -f1() {} -f2() {} -const id = identical; - -class CT { - final x1; - final x2; - final bool id; - const CT(var x1, var x2) - : this.x1 = x1, - this.x2 = x2, - this.id = identical(x1, x2); - void test(void expect(a, String b), name) { - expect(id, "$name: identical($x1,$x2)"); - } -} - -const trueTests = const [ - const CT(2 - 1, i1), - const CT(1 + 1, i2), - const CT(2.5 - 1.0, d1), - const CT(1.5 + 1.0, d2), - const CT(false || true, b1), - const CT(true && false, b2), - const CT('$i1', s1), - const CT('$i2', s2), - const CT(const [i1, 2], l1), - const CT(const [i2, 3], l2), - const CT(const {"x": i1}, m1), - const CT(const {"x": i2}, m2), - const CT(const C(i1), c1), - const CT(const C(i2), c2), - const CT(f1, f1), - const CT(f2, f2), - const CT(C.f3, C.f3), - const CT(C.f4, C.f4), - const CT(id, identical), -]; - -const falseTests = const [ - const CT(i1, i2), - const CT(d1, d2), - const CT(b1, b2), - const CT(s1, s2), - const CT(l1, l2), - const CT(m1, m2), - const CT(c1, c2), - const CT(f1, f2), - const CT(i1, d1), - const CT(d1, b1), - const CT(b1, s1), - const CT(s1, l1), - const CT(l1, m1), - const CT(m1, c1), - const CT(c1, f1), - const CT(f1, C.f3), - const CT(C.f3, identical), - const CT(identical, i1), -]; - -// Not a constant if it's not written 'identical'. -const idtest = id(i1, i2); // //# 01: compile-time error - -// Not a constant if aliased? (Current interpretation, waiting for -// confirmation). -class T { // //# 02: compile-time error - static const identical = id; // //# 02: continued - static const idtest2 = identical(i1, i2); // //# 02: continued -} // //# 02: continued - -main() { - for (int i = 0; i < trueTests.length; i++) { - trueTests[i].test(Expect.isTrue, "true[$i]"); - } - for (int i = 0; i < falseTests.length; i++) { - falseTests[i].test(Expect.isFalse, "false[$i]"); - } - - var x = idtest; // //# 01: continued - var x = T.idtest2; // //# 02: continued -} diff --git a/tests/language_2/compile_time_constant/compile_time_constant11_test.dart b/tests/language_2/compile_time_constant/compile_time_constant11_test.dart deleted file mode 100644 index 22f838739f3..00000000000 --- a/tests/language_2/compile_time_constant/compile_time_constant11_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012, 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 - -// Check that conditional expression can be a compile-time constant. - -import "package:expect/expect.dart"; - -const C1 = true; -const C2 = false; - -const nephew = C1 ? C2 ? "Tick" : "Trick" : "Track"; - -main() { - const a = true ? 5 : 10; - const b = C2 ? "Track" : C1 ? "Trick" : "Tick"; - - Expect.equals(5, a); - Expect.equals("Trick", nephew); - Expect.equals(nephew, b); - Expect.identical(nephew, b); - var s = const Symbol(nephew); - var msg = "Donald is $nephew's uncle."; - Expect.equals("Donald is Trick's uncle.", msg); -} diff --git a/tests/language_2/compile_time_constant/compile_time_constant12_test.dart b/tests/language_2/compile_time_constant/compile_time_constant12_test.dart deleted file mode 100644 index 3c05654b7cd..00000000000 --- a/tests/language_2/compile_time_constant/compile_time_constant12_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2012, 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 - -const String s = "foo"; -const int i = s.length; -const int l = "foo".length + 1; - -use(x) => x; - -main() { - use(s); - use(i); - use(l); -} diff --git a/tests/language_2/compile_time_constant/compile_time_constant13_test.dart b/tests/language_2/compile_time_constant/compile_time_constant13_test.dart deleted file mode 100644 index 7bf371c160c..00000000000 --- a/tests/language_2/compile_time_constant/compile_time_constant13_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2014, 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 - -class A { - final x; //# 01: ok - //# 02: compile-time error - var x; //# 03: compile-time error - get x => null; //# 04: compile-time error - set x(v) {} //# 05: compile-time error - - const A() - : x = 'foo' //# 01: continued - : x = 'foo' //# 02: continued - : x = 'foo' //# 03: continued - : x = 'foo' //# 04: continued - : x = 'foo' //# 05: continued - ; -} - -use(x) => x; - -A a = const A(); - -main() { - use(a); -} diff --git a/tests/language_2/compile_time_constant/compile_time_constant2_test.dart b/tests/language_2/compile_time_constant/compile_time_constant2_test.dart deleted file mode 100644 index 3a0325eb392..00000000000 --- a/tests/language_2/compile_time_constant/compile_time_constant2_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -const x = 19; -const y = 3; -const z = -5; -const g1 = x + y; -const g2 = x * y; -const g3 = x / y; -const g4 = x ~/ y; -const g5 = x << y; -const g6 = x >> y; -const g7 = ~z; -const g8 = -x; -const g9 = x < y; -const g10 = x <= y; -const g11 = x <= x; -const g12 = x > y; -const g13 = x >= y; -const g14 = x >= x; -const g15 = x == y; -const g16 = x == x; -const g17 = x != y; -const g18 = x != x; -const g19 = x | y; -const g20 = x & y; -const g21 = x ^ y; -const g22 = g1 + g2 + g4 + g5 + g6 + g7 + g8; -const g23 = x % y; - -main() { - Expect.equals(22, g1); - Expect.equals(57, g2); - Expect.equals(6.333333333333333333333333333, g3); - Expect.equals(6, g4); - Expect.equals(152, g5); - Expect.equals(2, g6); - Expect.equals(4, g7); - Expect.equals(-19, g8); - Expect.equals(false, g9); - Expect.equals(false, g10); - Expect.equals(true, g11); - Expect.equals(true, g12); - Expect.equals(true, g13); - Expect.equals(true, g14); - Expect.equals(false, g15); - Expect.equals(true, g16); - Expect.equals(true, g17); - Expect.equals(false, g18); - Expect.equals(19, g19); - Expect.equals(3, g20); - Expect.equals(16, g21); - Expect.equals(224, g22); - Expect.equals(1, g23); -} diff --git a/tests/language_2/compile_time_constant/compile_time_constant3_test.dart b/tests/language_2/compile_time_constant/compile_time_constant3_test.dart deleted file mode 100644 index 815b7db6559..00000000000 --- a/tests/language_2/compile_time_constant/compile_time_constant3_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -const x = 19.5; -const y = 3.3; -const g1 = x + y; -const g2 = x * y; -const g3 = x / y; -const g4 = x ~/ y; -const g5 = -x; -const g6 = x < y; -const g7 = x <= y; -const g8 = x <= x; -const g9 = x > y; -const g10 = x >= y; -const g11 = x >= x; -const g12 = x == y; -const g13 = x == x; -const g14 = x != y; -const g15 = x != x; -const g16 = g1 + g2 + g3 + g4 + g5; -const g17 = x % y; - -main() { - Expect.equals(22.8, g1); - Expect.equals(64.35, g2); - Expect.equals(5.909090909090909, g3); - Expect.equals(5.0, g4); - Expect.equals(-19.5, g5); - Expect.equals(false, g6); - Expect.equals(false, g7); - Expect.equals(true, g8); - Expect.equals(true, g9); - Expect.equals(true, g10); - Expect.equals(true, g11); - Expect.equals(false, g12); - Expect.equals(true, g13); - Expect.equals(true, g14); - Expect.equals(false, g15); - Expect.equals(78.5590909090909, g16); - Expect.equals(3.000000000000001, g17); -} diff --git a/tests/language_2/compile_time_constant/compile_time_constant5_test.dart b/tests/language_2/compile_time_constant/compile_time_constant5_test.dart deleted file mode 100644 index 6f8da388d48..00000000000 --- a/tests/language_2/compile_time_constant/compile_time_constant5_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -const x = true; -const g1 = !true; -const g2 = !g1; - -main() { - Expect.equals(false, g1); - Expect.equals(true, g2); -} diff --git a/tests/language_2/compile_time_constant/compile_time_constant6_test.dart b/tests/language_2/compile_time_constant/compile_time_constant6_test.dart deleted file mode 100644 index c3538c6ff97..00000000000 --- a/tests/language_2/compile_time_constant/compile_time_constant6_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -const g1 = true; -const g2 = 499; -const g3 = "foo"; -const g4 = 3.3; -const g5 = g1 == g2; -const g6 = g1 == g3; -const g7 = g1 == g4; -const g8 = g2 == g3; -const g9 = g2 == g4; -const g10 = g3 == g4; -const g11 = g1 == g1; -const g12 = g2 == g2; -const g13 = g3 == g3; -const g14 = g4 == g4; - -main() { - Expect.isFalse(g5); - Expect.isFalse(g6); - Expect.isFalse(g7); - Expect.isFalse(g8); - Expect.isFalse(g9); - Expect.isFalse(g10); - Expect.isTrue(g11); - Expect.isTrue(g12); - Expect.isTrue(g13); - Expect.isTrue(g14); -} diff --git a/tests/language_2/compile_time_constant/compile_time_constant7_test.dart b/tests/language_2/compile_time_constant/compile_time_constant7_test.dart deleted file mode 100644 index de9b1efbd8f..00000000000 --- a/tests/language_2/compile_time_constant/compile_time_constant7_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - const A(); - toString() => "a"; -} - -const a = const A(); - -main() { - Expect.equals("a", a.toString()); -} diff --git a/tests/language_2/compile_time_constant/compile_time_constant8_test.dart b/tests/language_2/compile_time_constant/compile_time_constant8_test.dart deleted file mode 100644 index 7fb1e3f440a..00000000000 --- a/tests/language_2/compile_time_constant/compile_time_constant8_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - const A(); - toString() => "a"; -} - -const a = const A(); -const b = const A(); - -const list1 = const [1, 2]; -// Strong mode change: explicit -const list2 = const [1, 2]; -main() { - Expect.isFalse(identical(a, b)); - Expect.isFalse(identical(list1, list2)); -} diff --git a/tests/language_2/compile_time_constant/compile_time_constant9_test.dart b/tests/language_2/compile_time_constant/compile_time_constant9_test.dart deleted file mode 100644 index 97a37315146..00000000000 --- a/tests/language_2/compile_time_constant/compile_time_constant9_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class B { - const B(); -} - -class A { - var x = const B(); - A(); -} - -main() { - Expect.isTrue(identical(new A().x, new A().x)); -} diff --git a/tests/language_2/compile_time_constant/compile_time_constant_test.dart b/tests/language_2/compile_time_constant/compile_time_constant_test.dart deleted file mode 100644 index c3d77bece43..00000000000 --- a/tests/language_2/compile_time_constant/compile_time_constant_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2012, 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 - -class Bad { - int foo; - final int bar = - foo -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER -// [cfe] Can't access 'this' in a field initializer to read 'foo'. - -1; - static const int toto = - bar -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE -// [analyzer] COMPILE_TIME_ERROR.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER -// [cfe] Can't access 'this' in a field initializer to read 'bar'. -// [cfe] Undefined name 'bar'. - -3; -} - -void use(x) {} - -main() { - use(new Bad().bar); - use(Bad.toto); -} diff --git a/tests/language_2/compile_time_constant/d_test.dart b/tests/language_2/compile_time_constant/d_test.dart deleted file mode 100644 index 10307a6941e..00000000000 --- a/tests/language_2/compile_time_constant/d_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - final x; - final y; - final z; - final t; - - const A(this.z, tt) - : y = 499, - t = tt, - x = 3; - const A.named(z, this.t) - : y = 400 + z, - this.z = z, - x = 3; - const A.named2(t, z, y, x) - : x = t, - y = z, - z = y, - t = x; - - toString() => "A $x $y $z $t"; -} - -const a1 = const A(99, 100); -const a2 = const A.named(99, 100); -const a3 = const A.named2(1, 2, 3, 4); - -main() { - Expect.equals(3, a1.x); - Expect.equals(499, a1.y); - Expect.equals(99, a1.z); - Expect.equals(100, a1.t); - Expect.equals("A 3 499 99 100", a1.toString()); - - Expect.isTrue(identical(a1, a2)); - - Expect.equals(1, a3.x); - Expect.equals(2, a3.y); - Expect.equals(3, a3.z); - Expect.equals(4, a3.t); - Expect.equals("A 1 2 3 4", a3.toString()); -} diff --git a/tests/language_2/compile_time_constant/e_test.dart b/tests/language_2/compile_time_constant/e_test.dart deleted file mode 100644 index 00e65f8439e..00000000000 --- a/tests/language_2/compile_time_constant/e_test.dart +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - final x; - final y; - final z; - final t; - - const A([this.z = 99, tt = 100]) - : y = 499, - t = tt, - x = 3; - const A.n({this.z: 99, tt: 100}) - : y = 499, - t = tt, - x = 3; - const A.named({z, this.t}) - : y = 400 + z, - this.z = z, - x = 3; - const A.named2({t, z, y, x}) - : x = t, - y = z, - z = y, - t = x; - - toString() => "A $x $y $z $t"; -} - -const a1 = const A(99, 100); -const a2 = const A.named(z: 99, t: 100); -const a3 = const A.named2(t: 1, z: 2, y: 3, x: 4); -const a4 = const A(); -const a5 = const A(99, 100); -const a5n = const A.n(tt: 100, z: 99); -const a6 = const A(1, 2); -const a6n = const A.n(z: 1, tt: 2); -const a7 = const A.named(z: 7); -const a8 = const A.named2(); -const a9 = const A.named2(x: 4, y: 3, z: 2, t: 1); -const a10 = const A.named2(x: 1, y: 2, z: 3, t: 4); - -main() { - Expect.equals(3, a1.x); - Expect.equals(499, a1.y); - Expect.equals(99, a1.z); - Expect.equals(100, a1.t); - Expect.equals("A 3 499 99 100", a1.toString()); - Expect.identical(a1, a2); - Expect.identical(a1, a4); - Expect.identical(a1, a5); - - Expect.equals(1, a3.x); - Expect.equals(2, a3.y); - Expect.equals(3, a3.z); - Expect.equals(4, a3.t); - Expect.equals("A 1 2 3 4", a3.toString()); - - Expect.equals(3, a6.x); - Expect.equals(499, a6.y); - Expect.equals(1, a6.z); - Expect.equals(2, a6.t); - Expect.equals("A 3 499 1 2", a6.toString()); - - Expect.equals(3, a7.x); - Expect.equals(407, a7.y); - Expect.equals(7, a7.z); - Expect.equals(null, a7.t); - Expect.equals("A 3 407 7 null", a7.toString()); - - Expect.equals(null, a8.x); - Expect.equals(null, a8.y); - Expect.equals(null, a8.y); - Expect.equals(null, a8.t); - Expect.equals("A null null null null", a8.toString()); - - Expect.identical(a3, a9); - - Expect.equals(4, a10.x); - Expect.equals(3, a10.y); - Expect.equals(2, a10.z); - Expect.equals(1, a10.t); - Expect.equals("A 4 3 2 1", a10.toString()); -} diff --git a/tests/language_2/compile_time_constant/f_test.dart b/tests/language_2/compile_time_constant/f_test.dart deleted file mode 100644 index 80a10cc5d1f..00000000000 --- a/tests/language_2/compile_time_constant/f_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - final x; - const A(this.x); - const A.named([this.x]); - const A.named2([this.x = 2]); -} - -const a1 = const A(0); -const a2 = const A.named(); -const a3 = const A.named(1); -const a4 = const A.named2(); -const a5 = const A.named2(3); - -main() { - Expect.equals(0, a1.x); - Expect.equals(null, a2.x); - Expect.equals(1, a3.x); - Expect.equals(2, a4.x); - Expect.equals(3, a5.x); -} diff --git a/tests/language_2/compile_time_constant/g_test.dart b/tests/language_2/compile_time_constant/g_test.dart deleted file mode 100644 index 1a6db2f3c16..00000000000 --- a/tests/language_2/compile_time_constant/g_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - final x; - const A(this.x); - const A.named([this.x]); - const A.named2([this.x = 2]); -} - -class B extends A { - const B(x) : super(x + 10); - const B.named_() : super.named(); - const B.named(x) : super.named(x + 10); - const B.named2_() : super.named2(); - const B.named2(x) : super.named2(x + 10); -} - -const b1 = const B(0); -const b2 = const B.named_(); -const b3 = const B.named(1); -const b4 = const B.named2_(); -const b5 = const B.named2(3); - -main() { - Expect.equals(10, b1.x); - Expect.equals(null, b2.x); - Expect.equals(11, b3.x); - Expect.equals(2, b4.x); - Expect.equals(13, b5.x); -} diff --git a/tests/language_2/compile_time_constant/h_test.dart b/tests/language_2/compile_time_constant/h_test.dart deleted file mode 100644 index 1def5adeb8e..00000000000 --- a/tests/language_2/compile_time_constant/h_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A implements B { - final x; - const A(this.x); -} - -abstract class B { - const factory B(x) = A; -} - -const dynamic b1 = const B(499); - -main() { - Expect.equals(499, b1.x); -} diff --git a/tests/language_2/compile_time_constant/i_test.dart b/tests/language_2/compile_time_constant/i_test.dart deleted file mode 100644 index f0bd6a3c6ec..00000000000 --- a/tests/language_2/compile_time_constant/i_test.dart +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - final x; - const A(this.x); - const A.redirect(x) : this(x + 1); - const A.optional([this.x = 5]); -} - -class B extends A { - const B(x, this.y) : super(x); - const B.redirect(x, y) : this(x + 22, y + 22); - const B.redirect2(x, y) : this.redirect3(x + 122, y + 122); - const B.redirect3(x, y) - : this.y = y, - super.redirect(x); - const B.optional(x, [this.y]) : super(x); - const B.optional2([x, this.y]) : super(x); - final y; -} - -class C extends B { - const C(x, y, this.z) : super(x, y); - const C.redirect(x, y, z) : this(x + 33, y + 33, z + 33); - const C.redirect2(x, y, z) : this.redirect3(x + 333, y + 333, z + 333); - const C.redirect3(x, y, z) - : this.z = z, - super.redirect2(x, y); - const C.optional(x, [y, this.z]) : super(x, y); - const C.optional2([x, y, z]) - : this.z = z, - super(x, y); - const C.optional3([this.z]) : super.optional2(); - final z; -} - -const a1 = const A(499); -const a2 = const A.redirect(10499); -const a3 = const A.optional(); -const a1b = const A.redirect(498); -const a3b = const A(5); - -const b1 = const B(99499, -99499); -const b2 = const B.redirect(1234, 5678); -const b3 = const B.redirect2(112233, 556677); -const b4 = const B.redirect3(332211, 776655); -const b5 = const B.optional(43526); -const b6 = const B.optional2(8642, 9753); -const b3b = const B(112233 + 122 + 1, 556677 + 122); -const b6b = const B(8642, 9753); - -const c1 = const C(121, 232, 343); -const c2 = const C.redirect(12321, 23432, 34543); -const c3 = const C.redirect2(32123, 43234, 54345); -const c4 = const C.redirect3(313, 424, 535); -const c5 = const C.optional(191, 181, 171); -const c6 = const C.optional(-191); -const c7 = const C.optional2(); -const c8 = const C.optional3(9911); -const c3b = const C(32123 + 333 + 122 + 1, 43234 + 333 + 122, 54345 + 333); - -main() { - Expect.equals(499, a1.x); - Expect.equals(10500, a2.x); - Expect.equals(5, a3.x); - Expect.identical(a1, a1b); - Expect.identical(a3, a3b); - - Expect.equals(99499, b1.x); - Expect.equals(-99499, b1.y); - Expect.equals(1256, b2.x); - Expect.equals(5700, b2.y); - Expect.equals(112233 + 122 + 1, b3.x); - Expect.equals(556677 + 122, b3.y); - Expect.equals(332211 + 1, b4.x); - Expect.equals(776655, b4.y); - Expect.equals(43526, b5.x); - Expect.equals(null, b5.y); - Expect.equals(8642, b6.x); - Expect.equals(9753, b6.y); - Expect.identical(b3, b3b); - Expect.identical(b6, b6b); - - Expect.equals(121, c1.x); - Expect.equals(232, c1.y); - Expect.equals(343, c1.z); - Expect.equals(12321 + 33, c2.x); - Expect.equals(23432 + 33, c2.y); - Expect.equals(34543 + 33, c2.z); - Expect.equals(32123 + 333 + 122 + 1, c3.x); - Expect.equals(43234 + 333 + 122, c3.y); - Expect.equals(54345 + 333, c3.z); - Expect.equals(313 + 122 + 1, c4.x); - Expect.equals(424 + 122, c4.y); - Expect.equals(535, c4.z); - Expect.equals(191, c5.x); - Expect.equals(181, c5.y); - Expect.equals(171, c5.z); - Expect.equals(-191, c6.x); - Expect.equals(null, c6.y); - Expect.equals(null, c6.z); - Expect.equals(null, c7.x); - Expect.equals(null, c7.y); - Expect.equals(null, c7.z); - Expect.equals(null, c8.x); - Expect.equals(null, c8.y); - Expect.equals(9911, c8.z); - Expect.identical(c3, c3b); -} diff --git a/tests/language_2/compile_time_constant/j_test.dart b/tests/language_2/compile_time_constant/j_test.dart deleted file mode 100644 index 384faec5d5d..00000000000 --- a/tests/language_2/compile_time_constant/j_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - final field; - const A() : field = 499; -} - -const x = (((1 + 2))); -const y = (((((x))))); -const z = (((const A()))); - -main() { - Expect.equals(3, x); - Expect.equals(3, y); - Expect.equals(499, z.field); -} diff --git a/tests/language_2/compile_time_constant/k_runtime_test.dart b/tests/language_2/compile_time_constant/k_runtime_test.dart deleted file mode 100644 index e20a8dd8c75..00000000000 --- a/tests/language_2/compile_time_constant/k_runtime_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 "package:expect/expect.dart"; - -const x = const { - - 'a': 4 -}; -const y = const { - - -}; - -const z = const { - - - - '__proto__': 499 -}; - -const x2 = const {'a': 4}; -const y2 = const {'a': 14, 'b': 13}; -const z2 = const {'__proto__': 499}; - -main() { - Expect.identical(x2, x); - - Expect.identical(z2, z); -} diff --git a/tests/language_2/compile_time_constant/k_test.dart b/tests/language_2/compile_time_constant/k_test.dart deleted file mode 100644 index 9e498127c14..00000000000 --- a/tests/language_2/compile_time_constant/k_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -const x = const { -// ^ -// [cfe] Constant evaluation error: - 'a': 3, - 'a': 4 -//^^^ -// [analyzer] COMPILE_TIME_ERROR.EQUAL_KEYS_IN_CONST_MAP -}; -const y = const { -// ^ -// [cfe] Constant evaluation error: - 'a': 10, 'b': 11, 'a': 12, - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.EQUAL_KEYS_IN_CONST_MAP - 'b': 13, 'a': 14 -//^^^ -// [analyzer] COMPILE_TIME_ERROR.EQUAL_KEYS_IN_CONST_MAP -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.EQUAL_KEYS_IN_CONST_MAP -}; - -const z = const { -// ^ -// [cfe] Constant evaluation error: - '__proto__': 496, - '__proto__': 497, -//^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.EQUAL_KEYS_IN_CONST_MAP - '__proto__': 498, -//^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.EQUAL_KEYS_IN_CONST_MAP - '__proto__': 499 -//^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.EQUAL_KEYS_IN_CONST_MAP -}; - -const x2 = const {'a': 4}; -const y2 = const {'a': 14, 'b': 13}; -const z2 = const {'__proto__': 499}; - -main() { - Expect.identical(x2, x); - Expect.identical(y2, y); - Expect.identical(z2, z); -} diff --git a/tests/language_2/compile_time_constant/l_test.dart b/tests/language_2/compile_time_constant/l_test.dart deleted file mode 100644 index a1b1be9abbd..00000000000 --- a/tests/language_2/compile_time_constant/l_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - final x; - const A([x = 499]) : this.x = x; -} - -class B extends A { - const B(); - final z = 99; -} - -class C extends B { - const C(this.y); - final y; -} - -const v = const C(42); - -main() { - Expect.equals(42, v.y); - Expect.equals(499, v.x); - Expect.equals(99, v.z); -} diff --git a/tests/language_2/compile_time_constant/m_test.dart b/tests/language_2/compile_time_constant/m_test.dart deleted file mode 100644 index 76e5a33a94f..00000000000 --- a/tests/language_2/compile_time_constant/m_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - const A(); - foo([x = const A()]) => x; -} - -const x = const A(); - -foo([x = const A()]) => x; - -main() { - Expect.identical(x, foo()); - Expect.identical(x, x.foo()); -} diff --git a/tests/language_2/compile_time_constant/n_test.dart b/tests/language_2/compile_time_constant/n_test.dart deleted file mode 100644 index 65afe53a2aa..00000000000 --- a/tests/language_2/compile_time_constant/n_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - const A(); - operator ==(x) => x == 499; -} - -var a = const A(); - -main() { - if (const A() != 499) Expect.isTrue("const equality failed"); - Expect.isTrue(a == 499); -} diff --git a/tests/language_2/compile_time_constant/o_runtime_test.dart b/tests/language_2/compile_time_constant/o_runtime_test.dart deleted file mode 100644 index 244a9c5b567..00000000000 --- a/tests/language_2/compile_time_constant/o_runtime_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. -// Test compile-time constants with string-interpolation. - -import "package:expect/expect.dart"; - -const str = "foo"; -const m1 = const {"foo": 499}; -const m2 = const {"$str": 499}; -const m3 = const { - // Causes in a duplicate key error. - - "foo": 499 -}; -const m4 = const { - // Causes in a duplicate key error. - - "$str": 499 -}; -const m5 = const {"f" "o" "o": 499}; - -const mm1 = const {"afoo#foo": 499}; -const mm2 = const {"a$str#$str": 499}; -const mm3 = const {"a" "$str" "#" "foo": 499}; -const mm4 = const {"a$str" "#$str": 499}; - -main() { - Expect.equals(1, m1.length); - Expect.equals(499, m1["foo"]); - Expect.identical(m1, m2); - Expect.identical(m1, m3); - Expect.identical(m1, m4); - Expect.identical(m1, m5); - - Expect.equals(1, mm1.length); - Expect.equals(499, mm1["afoo#foo"]); - Expect.identical(mm1, mm2); - Expect.identical(mm1, mm3); - Expect.identical(mm1, mm4); -} diff --git a/tests/language_2/compile_time_constant/o_test.dart b/tests/language_2/compile_time_constant/o_test.dart deleted file mode 100644 index 5301ab7bc24..00000000000 --- a/tests/language_2/compile_time_constant/o_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2012, 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. -// Test compile-time constants with string-interpolation. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -const str = "foo"; -const m1 = const {"foo": 499}; -const m2 = const {"$str": 499}; -const m3 = const { -// ^ -// [cfe] Constant evaluation error: - - // Causes in a duplicate key error. - "$str": 42, - "foo": 499 -//^^^^^ -// [analyzer] COMPILE_TIME_ERROR.EQUAL_KEYS_IN_CONST_MAP -}; -const m4 = const { -// ^ -// [cfe] Constant evaluation error: - - // Causes in a duplicate key error. - "foo": 42, - "$str": 499 -//^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.EQUAL_KEYS_IN_CONST_MAP -}; -const m5 = const {"f" "o" "o": 499}; - -const mm1 = const {"afoo#foo": 499}; -const mm2 = const {"a$str#$str": 499}; -const mm3 = const {"a" "$str" "#" "foo": 499}; -const mm4 = const {"a$str" "#$str": 499}; - -main() { - Expect.equals(1, m1.length); - Expect.equals(499, m1["foo"]); - Expect.identical(m1, m2); - Expect.identical(m1, m3); - Expect.identical(m1, m4); - Expect.identical(m1, m5); - - Expect.equals(1, mm1.length); - Expect.equals(499, mm1["afoo#foo"]); - Expect.identical(mm1, mm2); - Expect.identical(mm1, mm3); - Expect.identical(mm1, mm4); -} diff --git a/tests/language_2/compile_time_constant/p_runtime_test.dart b/tests/language_2/compile_time_constant/p_runtime_test.dart deleted file mode 100644 index fd3f286b5cb..00000000000 --- a/tests/language_2/compile_time_constant/p_runtime_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 "package:expect/expect.dart"; - -class A { - const A( - - ); - final x = null; -} - -class B extends A { - const B(); -} - -var b = const B(); - -main() { - Expect.equals(null, b.x); -} diff --git a/tests/language_2/compile_time_constant/p_test.dart b/tests/language_2/compile_time_constant/p_test.dart deleted file mode 100644 index ccf7f834eb3..00000000000 --- a/tests/language_2/compile_time_constant/p_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - const A( - this.x - // ^ - // [analyzer] COMPILE_TIME_ERROR.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR - // [cfe] 'x' is a final instance variable that was initialized at the declaration. - // [cfe] Cannot invoke a non-'const' constructor where a const expression is expected. - ); - final x = null; -} - -class B extends A { - const B(); - // ^ - // [analyzer] COMPILE_TIME_ERROR.NO_DEFAULT_SUPER_CONSTRUCTOR - // [cfe] The superclass, 'A', has no unnamed constructor that takes no arguments. -} - -var b = const B(); - -main() { - Expect.equals(null, b.x); -} diff --git a/tests/language_2/compile_time_constant/q_test.dart b/tests/language_2/compile_time_constant/q_test.dart deleted file mode 100644 index 25b9f7b2f5f..00000000000 --- a/tests/language_2/compile_time_constant/q_test.dart +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) 2012, 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 - -const double x = 14.0; -main() { - print(x); -} diff --git a/tests/language_2/compile_time_constant/r_runtime_test.dart b/tests/language_2/compile_time_constant/r_runtime_test.dart deleted file mode 100644 index 1a909e44ab8..00000000000 --- a/tests/language_2/compile_time_constant/r_runtime_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -const x = - - "x"; - -const y = const { - 0: - - "y" -}; - -main() { - print(x); - print(y); - const z = - - 1 + 1 + 1; - print(z); -} diff --git a/tests/language_2/compile_time_constant/r_test.dart b/tests/language_2/compile_time_constant/r_test.dart deleted file mode 100644 index 16e8b8f806b..00000000000 --- a/tests/language_2/compile_time_constant/r_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2014, 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 - -const x = - throw "x"; -// ^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE -// [cfe] Throw is not a constant expression. - -const y = const { - 0: - throw "y"; -// ^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE -// [cfe] Throw is not a constant expression. -// ^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_CONSTANT_MAP_VALUE -// ^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN -// [cfe] Expected '}' before this. -}; - -main() { - print(x); - print(y); - const z = - throw 1 + 1 + 1; -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE -// [cfe] Throw is not a constant expression. - print(z); -} diff --git a/tests/language_2/compile_time_constant/runtime_test.dart b/tests/language_2/compile_time_constant/runtime_test.dart deleted file mode 100644 index 31deb6857a9..00000000000 --- a/tests/language_2/compile_time_constant/runtime_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -class Bad { - int foo; - final int bar = - - -1; - static const int toto = - - -3; -} - -void use(x) {} - -main() { - use(new Bad().bar); - use(Bad.toto); -} diff --git a/tests/language_2/compile_time_constant/static2_runtime_test.dart b/tests/language_2/compile_time_constant/static2_runtime_test.dart deleted file mode 100644 index c0429b13bee..00000000000 --- a/tests/language_2/compile_time_constant/static2_runtime_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -class A { - final int x; - - const A.a2(this.x); - - - - const A.a6(int x) : this.x = x; -} - - - - - - - - -main() { - - - - - - -} diff --git a/tests/language_2/compile_time_constant/static2_test.dart b/tests/language_2/compile_time_constant/static2_test.dart deleted file mode 100644 index 66760fd2c23..00000000000 --- a/tests/language_2/compile_time_constant/static2_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2012, 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 - -class A { - final int x; - const A.a1() : x = 'foo'; - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_NOT_ASSIGNABLE - // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. - const A.a2(this.x); - const A.a3([this.x = 'foo']); - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. - const A.a4(String this.x); - // ^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE - // ^ - // [cfe] The type of parameter 'x', 'String' is not a subtype of the corresponding field's type, 'int'. - const A.a5(String x) : this.x = x; - // ^ - // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_NOT_ASSIGNABLE - // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. - const A.a6(int x) : this.x = x; -} - -const a1 = const A.a1(); -// ^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH -const a2 = const A.a2('foo'); -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE -// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH -// [cfe] The argument type 'String' can't be assigned to the parameter type 'int'. -const a3 = const A.a3(); -// ^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH -const a4 = const A.a4('foo'); -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH -const a5 = const A.a5('foo'); -// ^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH -const a6 = const A.a6('foo'); -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE -// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH -// [cfe] The argument type 'String' can't be assigned to the parameter type 'int'. - -main() { - print(a1); - print(a2); - print(a3); - print(a4); - print(a5); - print(a6); -} diff --git a/tests/language_2/compile_time_constant/static3_runtime_test.dart b/tests/language_2/compile_time_constant/static3_runtime_test.dart deleted file mode 100644 index c0429b13bee..00000000000 --- a/tests/language_2/compile_time_constant/static3_runtime_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -class A { - final int x; - - const A.a2(this.x); - - - - const A.a6(int x) : this.x = x; -} - - - - - - - - -main() { - - - - - - -} diff --git a/tests/language_2/compile_time_constant/static3_test.dart b/tests/language_2/compile_time_constant/static3_test.dart deleted file mode 100644 index 3cabc10c2b6..00000000000 --- a/tests/language_2/compile_time_constant/static3_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2012, 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 - -class A { - final int x; - const A.a1() : x = 'foo'; - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_NOT_ASSIGNABLE - // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. - const A.a2(this.x); - const A.a3([this.x = 'foo']); - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. - const A.a4(String this.x); - // ^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE - // ^ - // [cfe] The type of parameter 'x', 'String' is not a subtype of the corresponding field's type, 'int'. - const A.a5(String x) : this.x = x; - // ^ - // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_NOT_ASSIGNABLE - // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. - const A.a6(int x) : this.x = x; -} - -var a1 = const A.a1(); -// ^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH -var a2 = const A.a2('foo'); -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE -// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH -// [cfe] The argument type 'String' can't be assigned to the parameter type 'int'. -var a3 = const A.a3(); -// ^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH -var a4 = const A.a4('foo'); -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH -var a5 = const A.a5('foo'); -// ^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH -var a6 = const A.a6('foo'); -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE -// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH -// [cfe] The argument type 'String' can't be assigned to the parameter type 'int'. - -main() { - print(a1); - print(a2); - print(a3); - print(a4); - print(a5); - print(a6); -} diff --git a/tests/language_2/compile_time_constant/static4_test.dart b/tests/language_2/compile_time_constant/static4_test.dart deleted file mode 100644 index feaa3eef844..00000000000 --- a/tests/language_2/compile_time_constant/static4_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2014, 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 - -class A { - final _x; - const A.a1( - String //# 01: compile-time error - x) - : this.a2(x); - const A.a2( - String //# 02: compile-time error - x) - : this.a3(x); - const A.a3( - String //# 03: compile-time error - x) - : _x = x; -} - -use(x) => x; - -main() { - use(const A.a1(0)); -} diff --git a/tests/language_2/compile_time_constant/static5_test.dart b/tests/language_2/compile_time_constant/static5_test.dart deleted file mode 100644 index 878515b1806..00000000000 --- a/tests/language_2/compile_time_constant/static5_test.dart +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2014, 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 - -class A { - const A(); -} - -class B extends A { - const B(); -} - -class C extends A { - const C(); - const factory C.d() = D; -} - -class D extends B implements C { - const D(); -} - -class Test1 { - final A x = const A(); //# 01: ok - final A x = const B(); //# 02: ok - final B x = const A(); //# 03: compile-time error - final B x = const C(); //# 04: compile-time error - final B x = const C.d(); //# 05: compile-time error - const Test1(); -} - -// Will be instantiated with U=A and V=B. -class Test2 { - final U x = const A(); //# 06: compile-time error - final U x = const B(); //# 07: compile-time error - final V x = const A(); //# 08: compile-time error - final V x = const C(); //# 09: compile-time error - final V x = const C.d(); //# 10: compile-time error - const Test2(); -} - -// Will be instantiated with U=A and V=B. -class Test3 { - final U x = const A(); //# 11: compile-time error - final U x = const B(); //# 12: compile-time error - final V x = const A(); //# 13: compile-time error - final V x = const C(); //# 14: compile-time error - final V x = const C.d(); //# 15: compile-time error - const Test3(); -} - -// Will be instantiated with U=A and V=B. -class Test4 { - final U x = const A(); //# 16: compile-time error - final U x = const B(); //# 17: compile-time error - final V x = const A(); //# 18: compile-time error - final V x = const C(); //# 19: compile-time error - final V x = const C.d(); //# 20: compile-time error - const Test4(); -} - -// Will be instantiated with U=dynamic and V=dynamic. -class Test5 { - final U x = const A(); //# 21: compile-time error - final U x = const B(); //# 22: compile-time error - final V x = const A(); //# 23: compile-time error - final V x = const C(); //# 24: compile-time error - final V x = const C.d(); //# 25: compile-time error - const Test5(); -} - -use(x) => x; - -main() { - use(const Test1()); - use(const Test2()); - use(const Test3()); - use(const Test4()); - use(const Test5()); -} diff --git a/tests/language_2/compile_time_constant/static_runtime_test.dart b/tests/language_2/compile_time_constant/static_runtime_test.dart deleted file mode 100644 index b23bf988f46..00000000000 --- a/tests/language_2/compile_time_constant/static_runtime_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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() { - - - -} diff --git a/tests/language_2/compile_time_constant/static_test.dart b/tests/language_2/compile_time_constant/static_test.dart deleted file mode 100644 index 77740dd2fad..00000000000 --- a/tests/language_2/compile_time_constant/static_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012, 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 - -final int x = 'foo'; -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT -// [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. -const int y = 'foo'; -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT -// [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. -int z = 'foo'; -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT -// [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. - -main() { - print(x); - print(y); - print(z); -} diff --git a/tests/language_2/const/cast1_test.dart b/tests/language_2/const/cast1_test.dart deleted file mode 100644 index 219be00282e..00000000000 --- a/tests/language_2/const/cast1_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2018, 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 - -/// Implicit casts in constants are supported and treated as compile-time errors -/// if they are not valid. - -class A { - final int n; - const A(dynamic input) : n = input; -} - -main() { - print(const A(2)); //# 01: ok - print(const A('2')); //# 02: compile-time error -} diff --git a/tests/language_2/const/cast2_test.dart b/tests/language_2/const/cast2_test.dart deleted file mode 100644 index f4bcccf7568..00000000000 --- a/tests/language_2/const/cast2_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2018, 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 - -/// Explicit casts in constants are supported and treated as compile-time errors -/// if they are not valid. - -class A { - final int n; - const A(dynamic input) : n = input as int; -} - -main() { - print(const A(2)); //# 01: ok - print(const A('2')); //# 02: compile-time error -} diff --git a/tests/language_2/const/cast3_test.dart b/tests/language_2/const/cast3_test.dart deleted file mode 100644 index 173abb842c4..00000000000 --- a/tests/language_2/const/cast3_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2018, 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 - -/// Casts in constants correctly substitute type variables. - -class A { - const A(); -} - -class B implements A { - const B(); -} - -class M { - final T a; - const M(dynamic t) : a = t; // adds implicit cast `as T` -} - -main() { - print(const M(const B())); -} diff --git a/tests/language_2/const/cast4_test.dart b/tests/language_2/const/cast4_test.dart deleted file mode 100644 index 3b3de5eb676..00000000000 --- a/tests/language_2/const/cast4_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2018, 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 - -/// Casts in constants correctly substitute type variables. - -class A { - const A(); -} - -class B implements A { - const B(); -} - -class M { - final T a; - const M(dynamic t) : a = t; // adds implicit cast `as T` -} - -class N extends M { - const N(dynamic t) : super(t); -} - -main() { - print(const N(const B())); -} diff --git a/tests/language_2/const/conditional_runtime_test.dart b/tests/language_2/const/conditional_runtime_test.dart deleted file mode 100644 index 2567385b968..00000000000 --- a/tests/language_2/const/conditional_runtime_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test for conditionals as compile-time constants. - -import 'package:expect/expect.dart'; - -class Marker { - final field; - const Marker(this.field); -} - -var var0 = const Marker(0); -var var1 = const Marker(1); -const const0 = const Marker(0); -const const1 = const Marker(1); - -const trueConst = true; -const falseConst = false; -var nonConst = true; -const zeroConst = 0; - -const cond1 = trueConst ? const0 : const1; - - - -const cond2 = falseConst ? const0 : const1; - - - - - - - - - - - -void main() { - Expect.identical(var0, cond1); - - - - Expect.identical(var1, cond2); - - - - - - - - - - -} diff --git a/tests/language_2/const/conditional_test.dart b/tests/language_2/const/conditional_test.dart deleted file mode 100644 index 83c09ca2094..00000000000 --- a/tests/language_2/const/conditional_test.dart +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test for conditionals as compile-time constants. - -import 'package:expect/expect.dart'; - -class Marker { - final field; - const Marker(this.field); -} - -var var0 = const Marker(0); -var var1 = const Marker(1); -const const0 = const Marker(0); -const const1 = const Marker(1); - -const trueConst = true; -const falseConst = false; -var nonConst = true; -const zeroConst = 0; - -const cond1 = trueConst ? const0 : const1; -const cond1a = trueConst ? nonConst : const1; -// ^ -// [cfe] Constant evaluation error: -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE -// [cfe] Not a constant expression. -const cond1b = trueConst ? const0 : nonConst; -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE -// [cfe] Not a constant expression. - -const cond2 = falseConst ? const0 : const1; -const cond2a = falseConst ? nonConst : const1; -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE -// [cfe] Not a constant expression. -const cond2b = falseConst ? const0 : nonConst; -// ^ -// [cfe] Constant evaluation error: -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE -// [cfe] Not a constant expression. - -const cond3 = nonConst ? const0 : const1; -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE -// [cfe] Not a constant expression. -// ^ -// [cfe] Constant evaluation error: -const cond3a = nonConst ? nonConst : const1; -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE -// [cfe] Not a constant expression. -// ^ -// [cfe] Constant evaluation error: -// ^ -// [cfe] Not a constant expression. -const cond3b = nonConst ? const0 : nonConst; -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE -// [cfe] Not a constant expression. -// ^ -// [cfe] Constant evaluation error: -// ^ -// [cfe] Not a constant expression. - -const cond4 = zeroConst ? const0 : const1; -// ^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL -// [cfe] A value of type 'int' can't be assigned to a variable of type 'bool'. -// ^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION -const cond4a = zeroConst ? nonConst : const1; -// ^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL -// [cfe] A value of type 'int' can't be assigned to a variable of type 'bool'. -// ^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION -// ^ -// [cfe] Not a constant expression. -const cond4b = zeroConst ? const0 : nonConst; -// ^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL -// [cfe] A value of type 'int' can't be assigned to a variable of type 'bool'. -// ^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_CONDITION -// ^ -// [cfe] Not a constant expression. - -void main() { - Expect.identical(var0, cond1); - Expect.identical(nonConst, cond1a); - Expect.identical(var0, cond1b); - - Expect.identical(var1, cond2); - Expect.identical(var1, cond2a); - Expect.identical(nonConst, cond2b); - - Expect.identical(var0, cond3); - Expect.identical(nonConst, cond3a); - Expect.identical(var0, cond3b); - - Expect.identical(var1, cond4); - Expect.identical(var1, cond4a); - Expect.identical(nonConst, cond4b); -} diff --git a/tests/language_2/const/const2_test.dart b/tests/language_2/const/const2_test.dart deleted file mode 100644 index fca62632e49..00000000000 --- a/tests/language_2/const/const2_test.dart +++ /dev/null @@ -1,107 +0,0 @@ -// 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. -// VMOptions= -// VMOptions=--compile_all - -// @dart = 2.9 - -// Exercises language constructs that require compile time constants - -// Initialize with different literal types -const b = true; -const s = "apple"; -const i = 1; -const d = 3.3; -const h = 0xf; -const n = null; -const aList = const [1, 2, 3]; // array literal -const aMap = const {"1": "one", "2": "banana"}; // map literal - -const INT_LIT = 5; -const INT_LIT_REF = INT_LIT; -const DOUBLE_LIT = 1.5; -const BOOL_LIT = true; -const STRING_LIT = "Hello"; - -const BOP1_0 = INT_LIT + 1; -const BOP1_1 = 1 + INT_LIT; -const BOP1_2 = INT_LIT - 1; -const BOP1_3 = 1 - INT_LIT; -const BOP1_4 = INT_LIT * 1; -const BOP1_5 = 1 * INT_LIT; -const BOP1_6 = INT_LIT / 1; -const BOP1_7 = 1 / INT_LIT; -const BOP2_0 = DOUBLE_LIT + 1.5; -const BOP2_1 = 1.5 + DOUBLE_LIT; -const BOP2_2 = DOUBLE_LIT - 1.5; -const BOP2_3 = 1.5 - DOUBLE_LIT; -const BOP2_4 = DOUBLE_LIT * 1.5; -const BOP2_5 = 1.5 * DOUBLE_LIT; -const BOP2_6 = DOUBLE_LIT / 1.5; -const BOP2_7 = 1.5 / DOUBLE_LIT; -const BOP3_0 = 2 < INT_LIT; -const BOP3_1 = INT_LIT < 2; -const BOP3_2 = 2 > INT_LIT; -const BOP3_3 = INT_LIT > 2; -const BOP3_4 = 2 < DOUBLE_LIT; -const BOP3_5 = DOUBLE_LIT < 2; -const BOP3_6 = 2 > DOUBLE_LIT; -const BOP3_7 = DOUBLE_LIT > 2; -const BOP3_8 = 2 <= INT_LIT; -const BOP3_9 = INT_LIT <= 2; -const BOP3_10 = 2 >= INT_LIT; -const BOP3_11 = INT_LIT >= 2; -const BOP3_12 = 2.0 <= DOUBLE_LIT; -const BOP3_13 = DOUBLE_LIT <= 2.0; -const BOP3_14 = 2.0 >= DOUBLE_LIT; -const BOP3_15 = DOUBLE_LIT >= 2; -const BOP4_0 = 5 % INT_LIT; -const BOP4_1 = INT_LIT % 5; -const BOP4_2 = 5.0 % DOUBLE_LIT; -const BOP4_3 = DOUBLE_LIT % 5.0; -const BOP5_0 = 0x80 & 0x04; -const BOP5_1 = 0x80 | 0x04; -const BOP5_2 = 0x80 << 0x04; -const BOP5_3 = 0x80 >> 0x04; -const BOP5_4 = 0x80 ~/ 0x04; -const BOP5_5 = 0x80 ^ 0x04; -const BOP6 = BOOL_LIT && true; -const BOP7 = false || BOOL_LIT; -const BOP8 = STRING_LIT == "World!"; -const BOP9 = "Hello" != STRING_LIT; -const BOP10 = INT_LIT == INT_LIT_REF; -const BOP11 = BOOL_LIT != true; - -// Multiple binary expressions -const BOP20 = 1 * INT_LIT / 3 + INT_LIT + 9; - -// Parenthesized expressions -const BOP30 = (1 > 2); -const BOP31 = (1 * 2) + 3; -const BOP32 = 3 + (1 * 2); - -// Unary expressions -const UOP1_0 = !BOOL_LIT; -const UOP1_1 = BOOL_LIT || !true; -const UOP1_2 = !BOOL_LIT || true; -const UOP1_3 = !(BOOL_LIT && true); -const UOP2_0 = ~0xf0; -const UOP2_1 = ~INT_LIT; -const UOP2_2 = ~INT_LIT & 123; -const UOP2_3 = ~(INT_LIT | 0xff); -const UOP3_0 = -0xf0; -const UOP3_1 = -INT_LIT; -const UOP3_2 = -INT_LIT + 123; -const UOP3_3 = -(INT_LIT * 0xff); -const UOP3_4 = -0xf0; -const UOP3_5 = -DOUBLE_LIT; -const UOP3_6 = -DOUBLE_LIT + 123; -const UOP3_7 = -(DOUBLE_LIT * 0xff); - -class A { - const A(); - static const a = const A(); // Assignment from Constant constructor OK -} - -main() {} diff --git a/tests/language_2/const/const3_test.dart b/tests/language_2/const/const3_test.dart deleted file mode 100644 index bc2818a5004..00000000000 --- a/tests/language_2/const/const3_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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. -// Check that initializers of const fields can be declared out of order. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -const P = 2 * (O - N); -const N = 1; -const O = 1 + 3; - -int main() { - Expect.equals(1, N); - Expect.equals(4, O); - Expect.equals(6, P); -} diff --git a/tests/language_2/const/const4_lib.dart b/tests/language_2/const/const4_lib.dart deleted file mode 100644 index e0ca165e491..00000000000 --- a/tests/language_2/const/const4_lib.dart +++ /dev/null @@ -1,10 +0,0 @@ -// 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. -// See CTConst4Test.dart - -// @dart = 2.9 - -library CTConst4Lib; - -const B = 1; diff --git a/tests/language_2/const/const4_test.dart b/tests/language_2/const/const4_test.dart deleted file mode 100644 index d69275bf9eb..00000000000 --- a/tests/language_2/const/const4_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// 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. -// Check compile-time constant library references with prefixes - -// @dart = 2.9 - -library CTConst4Test; - -import "package:expect/expect.dart"; -import "const4_lib.dart" as mylib; - -const A = mylib.B; - -main() { - Expect.equals(1, A); -} diff --git a/tests/language_2/const/const_locals_constant_locals_test.dart b/tests/language_2/const/const_locals_constant_locals_test.dart deleted file mode 100644 index 76a85f83214..00000000000 --- a/tests/language_2/const/const_locals_constant_locals_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that constant local variables have constant initializers. - -import "package:expect/expect.dart"; - -void main() { - const c1; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_NOT_INITIALIZED - // [cfe] The const variable 'c1' must be initialized. - const c2 = 0; - const c3 = field; - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE - // [cfe] Constant evaluation error: - // [cfe] Not a constant expression. - const c4 = finalField; - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE - // [cfe] Constant evaluation error: - // [cfe] Not a constant expression. - const c5 = constField; - const c6 = method(); - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_METHOD_INVOCATION - // [cfe] Method invocation is not a constant expression. - const c7 = new Class(); - // ^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE - // [cfe] New expression is not a constant expression. - // ^ - // [cfe] New expression is not a constant expression. - const c8 = const Class(); -} - -var field = 0; - -final finalField = 0; - -const constField = 0; - -method() => 0; - -class Class { - const Class(); -} diff --git a/tests/language_2/const/const_locals_runtime_test.dart b/tests/language_2/const/const_locals_runtime_test.dart deleted file mode 100644 index ad0225d0b48..00000000000 --- a/tests/language_2/const/const_locals_runtime_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test that constant local variables have constant initializers. - -import "package:expect/expect.dart"; - -void main() { - - const c2 = 0; - - - const c5 = constField; - - - const c8 = const Class(); -} - -var field = 0; - -final finalField = 0; - -const constField = 0; - -method() => 0; - -class Class { - const Class(); -} diff --git a/tests/language_2/const/const_test.dart b/tests/language_2/const/const_test.dart deleted file mode 100644 index ab9920d3797..00000000000 --- a/tests/language_2/const/const_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2012, 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. -// Check const classes. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class AConst { - const AConst() : b_ = 3; - final int b_; -} - -class BConst { - const BConst(); - set foo(value) {} - get foo { - return 5; - } - - operator [](ix) { - return ix; - } - - operator []=(ix, value) {} -} - -testMain() { - var o = const AConst(); - Expect.equals(3, o.b_); - - var x = (const BConst()).foo++; - Expect.equals(5, x); - - var y = (const BConst())[5]++; - Expect.equals(5, y); -} - -main() { - for (int i = 0; i < 20; i++) { - testMain(); - } -} diff --git a/tests/language_2/const/constant_dag_test.dart b/tests/language_2/const/constant_dag_test.dart deleted file mode 100644 index 22481877227..00000000000 --- a/tests/language_2/const/constant_dag_test.dart +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2021, 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 - -import "package:expect/expect.dart"; - -// Test the efficient processing of constants that are DAGs. -// -// This test requires processing a constant that is a DAG of N nodes (N=40). If -// the DAG is traversed as a tree, it will require exponential node visits and -// take time O(2^N) i.e. 2^40, and the test will time out. - -main() { - Expect.equals(40, n40.lengthA); - Expect.equals(40, n40.lengthB); -} - -class Node { - final Node a; - final Node b; - const Node(this.a, this.b); - - int get lengthA => a == null ? 0 : 1 + a.lengthA; - int get lengthB => b == null ? 0 : 1 + b.lengthB; -} - -const n0 = Node(null, null); -const n1 = Node(n0, n0); -const n2 = Node(n1, n1); -const n3 = Node(n2, n2); -const n4 = Node(n3, n3); -const n5 = Node(n4, n4); -const n6 = Node(n5, n5); -const n7 = Node(n6, n6); -const n8 = Node(n7, n7); -const n9 = Node(n8, n8); -const n10 = Node(n9, n9); -const n11 = Node(n10, n10); -const n12 = Node(n11, n11); -const n13 = Node(n12, n12); -const n14 = Node(n13, n13); -const n15 = Node(n14, n14); -const n16 = Node(n15, n15); -const n17 = Node(n16, n16); -const n18 = Node(n17, n17); -const n19 = Node(n18, n18); -const n20 = Node(n19, n19); -const n21 = Node(n20, n20); -const n22 = Node(n21, n21); -const n23 = Node(n22, n22); -const n24 = Node(n23, n23); -const n25 = Node(n24, n24); -const n26 = Node(n25, n25); -const n27 = Node(n26, n26); -const n28 = Node(n27, n27); -const n29 = Node(n28, n28); -const n30 = Node(n29, n29); -const n31 = Node(n30, n30); -const n32 = Node(n31, n31); -const n33 = Node(n32, n32); -const n34 = Node(n33, n33); -const n35 = Node(n34, n34); -const n36 = Node(n35, n35); -const n37 = Node(n36, n36); -const n38 = Node(n37, n37); -const n39 = Node(n38, n38); -const n40 = Node(n39, n39); diff --git a/tests/language_2/const/constants_test.dart b/tests/language_2/const/constants_test.dart deleted file mode 100644 index b6d1838256e..00000000000 --- a/tests/language_2/const/constants_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2017, 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 - -class C { - factory C() => null; -} - -const -// [error column 1, length 5] -// [analyzer] SYNTACTIC_ERROR.EXTRANEOUS_MODIFIER -// [cfe] Can't have modifier 'const' here. -t() => null; - -const -// [error column 1, length 5] -// [analyzer] SYNTACTIC_ERROR.EXTRANEOUS_MODIFIER -// [cfe] Can't have modifier 'const' here. -get v => null; - -main() { - const - dynamic x = t(); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_METHOD_INVOCATION - // [cfe] Method invocation is not a constant expression. - const y = const C(); - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE - // [analyzer] COMPILE_TIME_ERROR.CONST_WITH_NON_CONST - // ^ - // [cfe] Cannot invoke a non-'const' factory where a const expression is expected. - const - dynamic z = v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE - // [cfe] Constant evaluation error: -} diff --git a/tests/language_2/const/constructor2_test.dart b/tests/language_2/const/constructor2_test.dart deleted file mode 100644 index 008905a3c57..00000000000 --- a/tests/language_2/const/constructor2_test.dart +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2014, 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 - -// Regression test for issue 14348. - -class A { - const A(); -} - -class B extends A { - const B(); -} - -class C { - final A a; - - const C(A this.a); - const C.optional([A this.a]); - const C.named({A this.a}); - const C.untyped(this.a); - const C.subtyped(B this.a); - const factory C.redirecting(B a) = D; -} - -class D extends C { - const D(B b) : super(b); -} - -class E { - const factory E.redirecting1(int a) = F; - const factory E.redirecting2(int a) = F.redirecting; - const factory E.redirecting3(double a) = F.redirecting; -} - -class F implements E { - final V field; - - const F(this.field); - const factory F.redirecting(V field) = G; -} - -class G implements F { - final W field; - const G(W field) : this.field = field; -} - -main() { - const A a = const B(); - - const C(a); //# 01: ok - const C.optional(a); //# 02: ok - const C.named(a: a); //# 03: ok - const C.untyped(a); //# 04: ok - - // Can't infer type argument U for C since a has type A and the argument has - // type B, not A. So tries to assign A to B which fails. - const C.subtyped(a); //# 05: compile-time error - const C.redirecting(a); //# 06: compile-time error - - const C(a); //# 07: ok - const C.optional(a); //# 08: ok - const C.named(a: a); //# 09: ok - const C.untyped(a); //# 10: ok - const C.subtyped(a); //# 11: ok - const C.redirecting(a); //# 12: ok - - const C(a); //# 13: compile-time error - const C.optional(a); //# 14: compile-time error - const C.named(a: a); //# 15: compile-time error - const C.untyped(a); //# 16: compile-time error - const C.subtyped(a); //# 17: compile-time error - const C.redirecting(a); //# 18: compile-time error - - const E.redirecting1(0); //# 19: ok - const E.redirecting1(''); //# 20: compile-time error - const E.redirecting2(0); //# 21: ok - const E.redirecting2(''); //# 22: compile-time error - const E.redirecting3(0.0); //# 23: ok - const E.redirecting3(''); //# 24: compile-time error -} diff --git a/tests/language_2/const/constructor3_runtime_1_test.dart b/tests/language_2/const/constructor3_runtime_1_test.dart deleted file mode 100644 index f918dafd15a..00000000000 --- a/tests/language_2/const/constructor3_runtime_1_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -class C { - final double d; - const C(this.d); -} - -class D extends C { - const D(var d) : super(d); -} - -const intValue = 0; -const c = const C(0.0); - - - - -main() { - print(c); - - - -} diff --git a/tests/language_2/const/constructor3_runtime_2_test.dart b/tests/language_2/const/constructor3_runtime_2_test.dart deleted file mode 100644 index 97b5054b14e..00000000000 --- a/tests/language_2/const/constructor3_runtime_2_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -class C { - final double d; - const C(this.d); -} - -class D extends C { - const D(var d) : super(d); -} - -const intValue = 0; - - -const e = const D(0.0); - - -main() { - - - print(e); - -} diff --git a/tests/language_2/const/constructor3_runtime_test.dart b/tests/language_2/const/constructor3_runtime_test.dart deleted file mode 100644 index 5269804ff4e..00000000000 --- a/tests/language_2/const/constructor3_runtime_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -class C { - final double d; - const C(this.d); -} - -class D extends C { - const D(var d) : super(d); -} - -const intValue = 0; - - - - - -main() { - - - - -} diff --git a/tests/language_2/const/constructor3_test.dart b/tests/language_2/const/constructor3_test.dart deleted file mode 100644 index a0dd22d6cc1..00000000000 --- a/tests/language_2/const/constructor3_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2014, 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 - -class C { - final double d; - const C(this.d); -} - -class D extends C { - const D(var d) : super(d); -} - -const intValue = 0; -const c = const C(0.0); -const d = const C(intValue); -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE -// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH -// [cfe] The argument type 'int' can't be assigned to the parameter type 'double'. -const e = const D(0.0); -const f = const D(intValue); -// ^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_THROWS_EXCEPTION -// ^ -// [cfe] Constant evaluation error: - -main() { - print(c); - print(d); - print(e); - print(f); -} diff --git a/tests/language_2/const/constructor_mixin2_runtime_test.dart b/tests/language_2/const/constructor_mixin2_runtime_test.dart deleted file mode 100644 index 5838d973476..00000000000 --- a/tests/language_2/const/constructor_mixin2_runtime_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -class Mixin { - var nonFinalField; -} - -class A { - const A(foo); -} - -class B extends A - -{ - const B(foo) : super(foo); -} - -main() { - var a = const B(42); - -} diff --git a/tests/language_2/const/constructor_mixin2_test.dart b/tests/language_2/const/constructor_mixin2_test.dart deleted file mode 100644 index de5733350e9..00000000000 --- a/tests/language_2/const/constructor_mixin2_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2013, 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 - -class Mixin { - var nonFinalField; -} - -class A { - const A(foo); -} - -class B extends A - with Mixin -{ - const B(foo) : super(foo); -// ^ -// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD -// ^ -// [cfe] A constant constructor can't call a non-constant super constructor. -} - -main() { - var a = const B(42); - a.nonFinalField = 54; -} diff --git a/tests/language_2/const/constructor_mixin3_test.dart b/tests/language_2/const/constructor_mixin3_test.dart deleted file mode 100644 index b4797885ef8..00000000000 --- a/tests/language_2/const/constructor_mixin3_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2013, 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 - -class Mixin {} - -class A { - const A(); -} - -class B extends A with Mixin { - const B(); -} - -main() { - var a = const B(); -} diff --git a/tests/language_2/const/constructor_mixin_test.dart b/tests/language_2/const/constructor_mixin_test.dart deleted file mode 100644 index 316f9751282..00000000000 --- a/tests/language_2/const/constructor_mixin_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2013, 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 - -class Mixin {} - -class A { - const A(foo); -} - -class B extends A with Mixin { - const B(foo) : super(foo); -} - -main() { - var a = const B(42); -} diff --git a/tests/language_2/const/constructor_nonconst_field_runtime_test.dart b/tests/language_2/const/constructor_nonconst_field_runtime_test.dart deleted file mode 100644 index a261ec05f8a..00000000000 --- a/tests/language_2/const/constructor_nonconst_field_runtime_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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 "package:expect/expect.dart"; - -class A { - - final int j = 1; - const A(); -} - -int f() { - return 3; -} - -main() { - const A().j; -} diff --git a/tests/language_2/const/constructor_nonconst_field_test.dart b/tests/language_2/const/constructor_nonconst_field_test.dart deleted file mode 100644 index ea7908f66e8..00000000000 --- a/tests/language_2/const/constructor_nonconst_field_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -class A { - final int i = f(); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_METHOD_INVOCATION - // [cfe] Method invocation is not a constant expression. - final int j = 1; - const A(); -//^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST -} - -int f() { - return 3; -} - -main() { - const A().j; -} diff --git a/tests/language_2/const/constructor_nonconst_param_runtime_test.dart b/tests/language_2/const/constructor_nonconst_param_runtime_test.dart deleted file mode 100644 index d6fc8c8cfb5..00000000000 --- a/tests/language_2/const/constructor_nonconst_param_runtime_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -class A { - const A(int a); -} - -class B { - - const B(dynamic v) // - - ; -} - -void main() { - const B(""); -} diff --git a/tests/language_2/const/constructor_nonconst_param_test.dart b/tests/language_2/const/constructor_nonconst_param_test.dart deleted file mode 100644 index 50f8fd705e2..00000000000 --- a/tests/language_2/const/constructor_nonconst_param_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2018, 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 - -class A { - const A(int a); -} - -class B { - final a; - const B(dynamic v) // - : a = A(v) - // ^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CONSTANT - // [cfe] Constant evaluation error: - // [cfe] Constant expression expected. - ; -} - -void main() { - const B(""); -//^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_CONSTANT -} diff --git a/tests/language_2/const/constructor_runtime_test.dart b/tests/language_2/const/constructor_runtime_test.dart deleted file mode 100644 index 9d19d3c0751..00000000000 --- a/tests/language_2/const/constructor_runtime_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 "package:expect/expect.dart"; - -class A { - final int x; - const A.named() : x = 42; - A() : x = null; -} - -main() { - Expect.equals(42, (const A.named()).x); - Expect.equals(42, (new A.named()).x); - -} diff --git a/tests/language_2/const/constructor_super2_test.dart b/tests/language_2/const/constructor_super2_test.dart deleted file mode 100644 index ca6cc3396fb..00000000000 --- a/tests/language_2/const/constructor_super2_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'package:expect/expect.dart'; - -class A { - final a; - - const A(this.a); -} - -class B extends A { - final b; - - const B(a, this.b) : super(a); -} - -@pragma('dart2js:noInline') -foo() => const B(1, 2); - -@pragma('dart2js:noInline') -bar() => const B(2, 2); - -void main() { - Expect.notEquals(foo(), bar()); - Expect.notEquals(foo().a, bar().a); - Expect.equals(foo().b, bar().b); -} diff --git a/tests/language_2/const/constructor_super_runtime_test.dart b/tests/language_2/const/constructor_super_runtime_test.dart deleted file mode 100644 index 840652006ae..00000000000 --- a/tests/language_2/const/constructor_super_runtime_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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 "package:expect/expect.dart"; - -class A { - final a; - A(this.a); // Not const. - const A.five() : a = 5; -} - -class B extends A { - final b; - B(x) - : b = x + 1, - super(x); - - // Const constructor cannot call non-const super constructor. - -} - -class C extends A { - C() : super(0); - // Implicit call to non-const constructor A(x). - -} - -main() { - - var b1 = new B(0); - -} diff --git a/tests/language_2/const/constructor_super_test.dart b/tests/language_2/const/constructor_super_test.dart deleted file mode 100644 index 447e91815fd..00000000000 --- a/tests/language_2/const/constructor_super_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A { - final a; - A(this.a); // Not const. - const A.five() : a = 5; -} - -class B extends A { - final b; - B(x) - : b = x + 1, - super(x); - - // Const constructor cannot call non-const super constructor. - const B.zerofive() : b = 0, super(5); - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER - // [cfe] A constant constructor can't call a non-constant super constructor. -} - -class C extends A { - C() : super(0); - // Implicit call to non-const constructor A(x). - const C.named(x); - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER - // [cfe] The superclass, 'A', has no unnamed constructor that takes no arguments. - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NO_DEFAULT_SUPER_CONSTRUCTOR -} - -main() { - var b = new B.zerofive(); - var b1 = new B(0); - var c = new C.named(""); -} diff --git a/tests/language_2/const/constructor_syntax_runtime_test.dart b/tests/language_2/const/constructor_syntax_runtime_test.dart deleted file mode 100644 index ad36a5159d4..00000000000 --- a/tests/language_2/const/constructor_syntax_runtime_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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() { - - - var c1 = const C1(); - - var c3 = const C3(); -} - -abstract class I0 { - factory I0() = C0; -} - -class C0 implements I0 { - C0(); -} - -class C1 { - const C1(); - -} - -class C2 { - C2(); -} - -class C3 { - const C3() - - ; - final field = null; -} diff --git a/tests/language_2/const/constructor_syntax_test.dart b/tests/language_2/const/constructor_syntax_test.dart deleted file mode 100644 index 61227c0026b..00000000000 --- a/tests/language_2/const/constructor_syntax_test.dart +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2012, 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() { - var c0 = const C0(); - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_WITH_NON_CONST - // ^ - // [cfe] Cannot invoke a non-'const' constructor where a const expression is expected. - var i0 = const I0(); - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_WITH_NON_CONST - // ^ - // [cfe] Cannot invoke a non-'const' factory where a const expression is expected. - var c1 = const C1(); - var c2 = const C2(); - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_WITH_NON_CONST - // ^ - // [cfe] Cannot invoke a non-'const' constructor where a const expression is expected. - var c3 = const C3(); - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CONSTANT -} - -abstract class I0 { - factory I0() = C0; -} - -class C0 implements I0 { - C0(); -} - -class C1 { - const C1(); -// ^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD -// [cfe] Constructor is marked 'const' so all fields must be final. - var modifiable; -} - -class C2 { - C2(); -} - -class C3 { - const C3() - : field = new C0() - //^^^^^ - // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION - // ^ - // [cfe] 'field' is a final instance variable that was initialized at the declaration. - // [cfe] Cannot invoke a non-'const' constructor where a const expression is expected. - // [cfe] Not a constant expression. - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CONSTANT - // [cfe] New expression is not a constant expression. - ; - final field = null; -} diff --git a/tests/language_2/const/constructor_test.dart b/tests/language_2/const/constructor_test.dart deleted file mode 100644 index 079b0eb187b..00000000000 --- a/tests/language_2/const/constructor_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - final int x; - const A.named() : x = 42; - A() : x = null; -} - -main() { - Expect.equals(42, (const A.named()).x); - Expect.equals(42, (new A.named()).x); - const A(); -//^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_WITH_NON_CONST -// ^ -// [cfe] Cannot invoke a non-'const' constructor where a const expression is expected. -} diff --git a/tests/language_2/const/counter_runtime_test.dart b/tests/language_2/const/counter_runtime_test.dart deleted file mode 100644 index e70c3ad0378..00000000000 --- a/tests/language_2/const/counter_runtime_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -// Bug: 4254106 Constant constructors must have (implicit) const parameters. - -class ConstCounter { - const ConstCounter(int i) - : nextValue_ = ( - // Incorrect assignment of a non-const function to a final field. - - i + 1); - - final nextValue_; -} - -main() { - const ConstCounter(3); -} diff --git a/tests/language_2/const/counter_test.dart b/tests/language_2/const/counter_test.dart deleted file mode 100644 index 968e4520149..00000000000 --- a/tests/language_2/const/counter_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2017, 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 - -// Bug: 4254106 Constant constructors must have (implicit) const parameters. - -class ConstCounter { - const ConstCounter(int i) - : nextValue_ = ( - // ^ - // [cfe] Can't find ')' to match '('. - - // Incorrect assignment of a non-const function to a final field. - () => i + 1; -// ^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_CONSTANT -// [cfe] Not a constant expression. -// ^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN - final nextValue_; -} - -main() { - const ConstCounter(3); -//^^^^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_CONSTANT -} diff --git a/tests/language_2/const/ct_const_test.dart b/tests/language_2/const/ct_const_test.dart deleted file mode 100644 index 49ac1ad6806..00000000000 --- a/tests/language_2/const/ct_const_test.dart +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) 2012, 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 - -// Test of apparent compile-time nature of constant evaluation. Constant Lists, -// Maps and other objects should be identical independent of formation. - -import "package:expect/expect.dart"; - -abstract class Roman { - static const I = 1; - static const II = 2; - static const III = 3; - static const IV = 4; - static const V = 5; - - static const VivaItalia = const {"green": 1, "red": 3, "white": 2}; -} - -class Point { - static const int zero = 0; - - static const origin = const Point(0, 0); - static const origin2 = const Point(zero, Roman.IV - 4); - - const Point(x, y) - : x_ = x, - y_ = y; - const Point.X(x) - : x_ = x, - y_ = Roman.V - Roman.II - 3; - - bool operator ==(final dynamic other) { - return (this.x_ == other.x_) && (this.y_ == other.y_); - } - - final int x_, y_; -} - -class Line { - const Line(Point begin, Point end) - : beg_ = begin, - end_ = end; - final Point beg_; - final Point end_; -} - -class CTConstTest { - static int getZero() { - return 0; - } - - static const naught = null; - - static testMain() { - Expect.equals(0, Point.zero); - Expect.equals(0, Point.origin.x_); - Expect.equals(true, identical(Point.origin, Point.origin2)); - var p1 = const Point(0, 0); - Expect.equals(true, identical(Point.origin, p1)); - - Expect.equals(false, Point.origin == const Point(1, 1)); - Expect.equals(false, identical(Point.origin, const Point(1, 1))); - - var p2 = new Point(0, getZero()); - Expect.equals(true, Point.origin == p2); // Point.operator== - - Expect.equals(true, identical(const Point.X(5), const Point(5, 0))); - Line l1 = const Line(Point.origin, const Point(1, 1)); - Line l2 = const Line(const Point(0, 0), const Point(1, 1)); - Line l3 = new Line(const Point(0, 0), const Point(1, 1)); - Expect.equals(true, identical(l1, l2)); - - final evenNumbers = const [2, 2 * 2, 2 * 3, 2 * 4, 2 * 5]; - Expect.equals(true, identical(evenNumbers, const [2, 4, 6, 8, 10])); - Expect.equals( - true, !identical(evenNumbers, const [2, 4, 6, 8, 10])); - - final c11dGermany1 = const {"black": 1, "red": 2, "yellow": 3}; - Expect.equals(true, - identical(c11dGermany1, const {"black": 1, "red": 2, "yellow": 3})); - - final c11dGermany2 = const {"black": 1, "red": 2, "yellow": 3}; - Expect.equals(true, identical(c11dGermany1, c11dGermany2)); - - final c11dBelgium = const {"black": 1, "yellow": 2, "red": 3}; - Expect.equals(false, c11dGermany1 == c11dBelgium); - Expect.equals(false, identical(c11dGermany1, c11dBelgium)); - - final c11dItaly = const {"green": 1, "red": 3, "white": 2}; - Expect.equals( - true, identical(c11dItaly, const {"green": 1, "red": 3, "white": 2})); - Expect.equals(true, identical(c11dItaly, Roman.VivaItalia)); - - Expect.equals(3, c11dItaly.length); - Expect.equals(3, c11dItaly.keys.length); - Expect.equals(true, c11dItaly.containsKey("white")); - Expect.equals(false, c11dItaly.containsKey("black")); - - // Make sure the map object is immutable. - bool caughtException = false; - try { - c11dItaly["green"] = 0; - } on UnsupportedError catch (e) { - caughtException = true; - } - Expect.equals(true, caughtException); - Expect.equals(1, c11dItaly["green"]); - - caughtException = false; - try { - c11dItaly.clear(); - } on UnsupportedError catch (e) { - caughtException = true; - } - Expect.equals(true, caughtException); - Expect.equals(1, c11dItaly["green"]); - - caughtException = false; - try { - c11dItaly.remove("orange"); - } on UnsupportedError catch (e) { - caughtException = true; - } - Expect.equals(true, caughtException); - Expect.equals(1, c11dItaly["green"]); - - Expect.equals(true, null == naught); - } -} - -main() { - CTConstTest.testMain(); -} diff --git a/tests/language_2/const/double_in_int_op_test.dart b/tests/language_2/const/double_in_int_op_test.dart deleted file mode 100644 index 48568633076..00000000000 --- a/tests/language_2/const/double_in_int_op_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// 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. - -// @dart = 2.9 - -main() { - const dynamic i1 = 3; - const dynamic i2 = 2; - const dynamic d1 = 3.3; - const dynamic d2 = 2.2; - - const sum = 0 + // - (i1 | i2) + //# ii1: ok - (i1 & i2) + //# ii2: ok - (i1 ^ i2) + //# ii3: ok - (i1 << i2) + //# ii4: ok - (i1 >> i2) + //# ii5: ok - (i1 | d2) + //# id1: compile-time error - (i1 & d2) + //# id2: compile-time error - (i1 ^ d2) + //# id3: compile-time error - (i1 << d2) + //# id4: compile-time error - (i1 >> d2) + //# id5: compile-time error - (d1 | i2) + //# di1: compile-time error - (d1 & i2) + //# di2: compile-time error - (d1 ^ i2) + //# di3: compile-time error - (d1 << i2) + //# di4: compile-time error - (d1 >> i2) + //# di5: compile-time error - (d1 | d2) + //# dd1: compile-time error - (d1 & d2) + //# dd2: compile-time error - (d1 ^ d2) + //# dd3: compile-time error - (d1 << d2) + //# dd4: compile-time error - (d1 >> d2) + //# dd5: compile-time error - 0; - print(sum); -} diff --git a/tests/language_2/const/dynamic_type_literal_runtime_1_test.dart b/tests/language_2/const/dynamic_type_literal_runtime_1_test.dart deleted file mode 100644 index 466e4f91112..00000000000 --- a/tests/language_2/const/dynamic_type_literal_runtime_1_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Test that 'dynamic' can be used in const expressions and has the expected -// behavior. - -import "package:expect/expect.dart"; - -const d = dynamic; -const i = int; - -void main() { - Expect.isTrue(identical(d, dynamic)); - // Duplicate key error. - - -} diff --git a/tests/language_2/const/dynamic_type_literal_runtime_2_test.dart b/tests/language_2/const/dynamic_type_literal_runtime_2_test.dart deleted file mode 100644 index 125a59ea566..00000000000 --- a/tests/language_2/const/dynamic_type_literal_runtime_2_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Test that 'dynamic' can be used in const expressions and has the expected -// behavior. - -import "package:expect/expect.dart"; - -const d = dynamic; -const i = int; - -void main() { - - // Duplicate key error. - - Expect.equals(2, const { d: 1, i: 2 }.length); -} diff --git a/tests/language_2/const/dynamic_type_literal_runtime_test.dart b/tests/language_2/const/dynamic_type_literal_runtime_test.dart deleted file mode 100644 index 2337462d454..00000000000 --- a/tests/language_2/const/dynamic_type_literal_runtime_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Test that 'dynamic' can be used in const expressions and has the expected -// behavior. - -import "package:expect/expect.dart"; - -const d = dynamic; -const i = int; - -void main() { - - // Duplicate key error. - - -} diff --git a/tests/language_2/const/dynamic_type_literal_test.dart b/tests/language_2/const/dynamic_type_literal_test.dart deleted file mode 100644 index 8f159cbcc7a..00000000000 --- a/tests/language_2/const/dynamic_type_literal_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2015, 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 - -// Test that 'dynamic' can be used in const expressions and has the expected -// behavior. - -import "package:expect/expect.dart"; - -const d = dynamic; -const i = int; - -void main() { - Expect.isTrue(identical(d, dynamic)); - // Duplicate key error. - Expect.equals(1, const { d: 1, d: 2 }.length); - // ^ - // [cfe] Constant evaluation error: - // ^ - // [analyzer] COMPILE_TIME_ERROR.EQUAL_KEYS_IN_CONST_MAP - Expect.equals(2, const { d: 1, i: 2 }.length); -} diff --git a/tests/language_2/const/error_multiply_initialized_test.dart b/tests/language_2/const/error_multiply_initialized_test.dart deleted file mode 100644 index 8b6643c5da6..00000000000 --- a/tests/language_2/const/error_multiply_initialized_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2015, 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 - -// If a constant constructor contains an initializer, or an initializing -// formal, for a final field which itself has an initializer at its -// declaration, then a compile-time error should be reported regardless of -// whether the constructor is called with "const" or "new". - -import "package:expect/expect.dart"; - -class C { - final x = 1; - const C() : x = 2; //# 01: compile-time error - const C() : x = 2; //# 02: compile-time error - const C(this.x); //# 03: compile-time error - const C(this.x); //# 04: compile-time error -} - -main() { - const C(); //# 01: continued - new C(); //# 02: continued - const C(2); //# 03: continued - new C(2); //# 04: continued -} diff --git a/tests/language_2/const/escape_frog_test.dart b/tests/language_2/const/escape_frog_test.dart deleted file mode 100644 index 0ae7e561896..00000000000 --- a/tests/language_2/const/escape_frog_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2013, 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. -// Test division by power of two. -// Test that results before and after optimization are the same. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Foo { - final Bar bar = const Bar /* comment here use to trigger bug 323 */ (); -} - -class Bar { - const Bar(); -} - -main() { - Expect.equals(new Foo().bar, const Bar()); -} diff --git a/tests/language_2/const/evaluation_test.dart b/tests/language_2/const/evaluation_test.dart deleted file mode 100644 index e9fe9072dd6..00000000000 --- a/tests/language_2/const/evaluation_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2014, 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 - -// Check that compile-time evaluation of constants is consistent with runtime -// evaluation. - -import 'package:expect/expect.dart'; - -const top_const = identical(-0.0, 0); -final top_final = identical(-0.0, 0); -var top_var = identical(-0.0, 0); - -@top_const -class C { - static const static_const = identical(-0.0, 0); - static final static_final = identical(-0.0, 0); - static var static_var = identical(-0.0, 0); - - final instance_final = identical(-0.0, 0); - var instance_var = identical(-0.0, 0); - - void test() { - const local_const = identical(-0.0, 0); - final local_final = identical(-0.0, 0); - var local_var = identical(-0.0, 0); - - Expect.equals(identical(-0.0, 0), top_const); - Expect.equals(top_const, top_final); - Expect.equals(top_final, top_var); - Expect.equals(top_var, static_const); - Expect.equals(static_const, static_final); - Expect.equals(static_final, static_var); - Expect.equals(static_var, instance_final); - Expect.equals(instance_final, instance_var); - Expect.equals(instance_var, local_const); - Expect.equals(local_const, local_final); - Expect.equals(local_final, local_var); - } -} - -void main() { - new C().test(); -} diff --git a/tests/language_2/const/factory_redirection_test.dart b/tests/language_2/const/factory_redirection_test.dart deleted file mode 100644 index 72651489afa..00000000000 --- a/tests/language_2/const/factory_redirection_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test that factory redirections work for compile-time constants, and -// that abstract classes can redirect. - -abstract class C { - const factory C(int x) = D; -} - -class D implements C { - final int i; - const D(this.i); - m() => 'called m'; -} - -main() { - const C c = const C(42); - D d = c; - Expect.equals(42, d.i); - Expect.equals('called m', d.m()); - d = new C(42); - Expect.equals(42, d.i); - Expect.equals('called m', d.m()); -} diff --git a/tests/language_2/const/factory_with_body_runtime_test.dart b/tests/language_2/const/factory_with_body_runtime_test.dart deleted file mode 100644 index 9ad1e97e82a..00000000000 --- a/tests/language_2/const/factory_with_body_runtime_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. -// -// Tests that a "const factory" with body produces a compile-time error. - -class ConstFactoryWithBody { - -} - -main() { - -} diff --git a/tests/language_2/const/factory_with_body_test.dart b/tests/language_2/const/factory_with_body_test.dart deleted file mode 100644 index 7dd5a120465..00000000000 --- a/tests/language_2/const/factory_with_body_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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. -// -// Tests that a "const factory" with body produces a compile-time error. - -// @dart = 2.9 - -class ConstFactoryWithBody { - const factory ConstFactoryWithBody.one() { } -//^^^^^ -// [analyzer] SYNTACTIC_ERROR.CONST_FACTORY -// [cfe] Only redirecting factory constructors can be declared to be 'const'. -} - -main() { - const ConstFactoryWithBody.one(); - // ^ - // [cfe] Non-redirecting const factory invocation is not a constant expression. -} diff --git a/tests/language_2/const/for_in_variable_test.dart b/tests/language_2/const/for_in_variable_test.dart deleted file mode 100644 index ebcf66e69ce..00000000000 --- a/tests/language_2/const/for_in_variable_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2015, 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() { - for ( - const //# 01: compile-time error - final //# 02: ok - int x in const [1, 2, 3]) { - break; - } -} diff --git a/tests/language_2/const/getter_runtime_test.dart b/tests/language_2/const/getter_runtime_test.dart deleted file mode 100644 index b03ed55842c..00000000000 --- a/tests/language_2/const/getter_runtime_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Check that const getters are not allowed. - -import 'package:expect/expect.dart'; - -class C { - const C(); - - - get x => 1; -} - - -get y => 2; - -main() { - const C().x; - y; -} diff --git a/tests/language_2/const/getter_test.dart b/tests/language_2/const/getter_test.dart deleted file mode 100644 index 9f1039905da..00000000000 --- a/tests/language_2/const/getter_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2015, 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 - -// Check that const getters are not allowed. - -import 'package:expect/expect.dart'; - -class C { - const C(); - - const -//^^^^^ -// [analyzer] SYNTACTIC_ERROR.EXTRANEOUS_MODIFIER -// [cfe] Can't have modifier 'const' here. - get x => 1; -} - -const -// [error line 21, column 1, length 5] -// [analyzer] SYNTACTIC_ERROR.EXTRANEOUS_MODIFIER -// [cfe] Can't have modifier 'const' here. -get y => 2; - -main() { - const C().x; - y; -} diff --git a/tests/language_2/const/global_test.dart b/tests/language_2/const/global_test.dart deleted file mode 100644 index d22fc00b6e8..00000000000 --- a/tests/language_2/const/global_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -const a = 1; - -main() { - Expect.equals(1, a); - Expect.equals(1, const A(a).a); - Expect.equals(1, const [const A(a)][0].a); -} - -class A { - final a; - const A(this.a); -} diff --git a/tests/language_2/const/inference_test.dart b/tests/language_2/const/inference_test.dart deleted file mode 100644 index 89b612c5c22..00000000000 --- a/tests/language_2/const/inference_test.dart +++ /dev/null @@ -1,142 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -R constFunction(T _) => null; - -C getC() => const C(constFunction); - -List getList() => const []; - -Set getSet() => const {}; - -Map getMap() => const {}; - -R Function(T) getFunction() { - List list = const [constFunction]; - return list[0]; -} - -C getImplicitConstC() { - List> list = const [C(constFunction)]; - return list[0]; -} - -List getImplicitConstList() { - List> list = const [[]]; - return list[0]; -} - -Set getImplicitConstSet() { - List> list = const [{}]; - return list[0]; -} - -Map getImplicitConstMap() { - List> list = const [{}]; - return list[0]; -} - -class C { - final Object fn; - const C(T Function(T) this.fn); -} - -void expectOfType(Object obj) { - // An exact type test would be better, but since `Null` is a subtype of all - // types that can be written in Dart 2.0, it should not matter in practice. - // - // (`obj.runtimeType == T` does not work for List/Map/Sets because the runtime - // type is an implementation-specific subtype of those interfaces.) - Expect.isTrue(obj is T, "`$obj` should be of type `$T`"); -} - -testClassInstance() { - expectOfType>(getC()); - expectOfType>(getC()); - expectOfType>(getC()); -} - -testImplicitConstClassInstance() { - expectOfType>(getImplicitConstC()); - expectOfType>(getImplicitConstC()); - expectOfType>(getImplicitConstC()); -} - -testDownwardsClassInference() { - expectOfType(getC().fn); - expectOfType(getC().fn); - expectOfType(getC().fn); -} - -testList() { - expectOfType>(getList()); - expectOfType>(getList()); - expectOfType>(getList()); -} - -testImplicitConstList() { - expectOfType>(getImplicitConstList()); - expectOfType>(getImplicitConstList()); - expectOfType>(getImplicitConstList()); -} - -testImplicitConstSet() { - expectOfType>(getImplicitConstSet()); - expectOfType>(getImplicitConstSet()); - expectOfType>(getImplicitConstSet()); -} - -testSet() { - expectOfType>(getSet()); - expectOfType>(getSet()); - expectOfType>(getSet()); -} - -testMap() { - expectOfType>(getMap()); - expectOfType>(getMap()); - expectOfType>(getMap()); - expectOfType>(getMap()); - expectOfType>(getMap()); - expectOfType>(getMap()); -} - -testImplicitConstMap() { - expectOfType>(getImplicitConstMap()); - expectOfType>(getImplicitConstMap()); - expectOfType>(getImplicitConstMap()); - expectOfType>(getImplicitConstMap()); - expectOfType>(getImplicitConstMap()); - expectOfType>(getImplicitConstMap()); -} - -testFunction() { - expectOfType(getFunction()); - expectOfType(getFunction()); - expectOfType(getFunction()); - expectOfType(getFunction()); - expectOfType(getFunction()); - expectOfType(getFunction()); -} - -/// Tests that use type inference for constants do not reference the type -/// parameter. Instead, free type parameters are substituted to obtain the -/// least closure (e.g. `List` becomes `List` and `R Function(T)` -/// becomes `Null Function(Object?)`). -main() { - testClassInstance(); - testImplicitConstClassInstance(); - testDownwardsClassInference(); - testList(); - testImplicitConstList(); - testSet(); - testImplicitConstSet(); - testMap(); - testImplicitConstMap(); - testFunction(); -} diff --git a/tests/language_2/const/init2_runtime_1_test.dart b/tests/language_2/const/init2_runtime_1_test.dart deleted file mode 100644 index ae6cd4a9aa8..00000000000 --- a/tests/language_2/const/init2_runtime_1_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -const intValue = 0; -const double c = 0.0; - - -main() { - print(c); - -} diff --git a/tests/language_2/const/init2_runtime_test.dart b/tests/language_2/const/init2_runtime_test.dart deleted file mode 100644 index 0ec12b9076e..00000000000 --- a/tests/language_2/const/init2_runtime_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -const intValue = 0; - - - -main() { - - -} diff --git a/tests/language_2/const/init2_test.dart b/tests/language_2/const/init2_test.dart deleted file mode 100644 index d10e38873fd..00000000000 --- a/tests/language_2/const/init2_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2014, 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 - -const intValue = 0; -const double c = 0.0; -const double d = intValue; -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT -// [cfe] A value of type 'int' can't be assigned to a variable of type 'double'. - -main() { - print(c); - print(d); -} diff --git a/tests/language_2/const/init_test.dart b/tests/language_2/const/init_test.dart deleted file mode 100644 index 211eb632960..00000000000 --- a/tests/language_2/const/init_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// 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. -// Check that initializers of static const fields are compile time constants. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Point { - final x_; - final y_; - const Point(x, y) - : x_ = x, - y_ = y; -} - -class ConstInitTest { - static const N = 1; - static const O = 1 + 3; - static const P = 2 * (O - N); - static const Q = const Point(0, 0); - - static const Q2 = const Point(0, 0); - static const P2 = 2 * (O - N); - static const O2 = 1 + 3; - static const N2 = 1; - - static testMain() { - Expect.equals(1, N); - Expect.equals(4, O); - Expect.equals(6, P); - Expect.equals(0, Q.x_); - Expect.equals(0, Q.y_); - } -} - -main() { - ConstInitTest.testMain(); -} diff --git a/tests/language_2/const/instance_field_runtime_test.dart b/tests/language_2/const/instance_field_runtime_test.dart deleted file mode 100644 index 7aeb4928242..00000000000 --- a/tests/language_2/const/instance_field_runtime_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -// Test that const instance fields are compile-time errors. - -class C { - -} - -void main() { - new C(); -} diff --git a/tests/language_2/const/instance_field_test.dart b/tests/language_2/const/instance_field_test.dart deleted file mode 100644 index 50fe87ab130..00000000000 --- a/tests/language_2/const/instance_field_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2014, 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 - -// Test that const instance fields are compile-time errors. - -class C { - const field = 0; -//^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_INSTANCE_FIELD -// [cfe] Only static fields can be declared as const. -} - -void main() { - new C(); -} diff --git a/tests/language_2/const/list_test.dart b/tests/language_2/const/list_test.dart deleted file mode 100644 index fc1a120e8f5..00000000000 --- a/tests/language_2/const/list_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class ConstListTest { - static testConstructors() { - List fixedList = new List.filled(4, null); - List fixedList2 = new List.filled(4, null); - List growableList = []; - List growableList2 = []; - for (int i = 0; i < 4; i++) { - fixedList[i] = i; - fixedList2[i] = i; - growableList.add(i); - growableList2.add(i); - } - Expect.equals(growableList, growableList); - Expect.notEquals(growableList, growableList2); - Expect.equals(fixedList, fixedList); - Expect.notEquals(fixedList, fixedList2); - Expect.notEquals(fixedList, growableList); - growableList.add(4); - Expect.notEquals(fixedList, growableList); - Expect.equals(4, growableList.removeLast()); - Expect.notEquals(fixedList, growableList); - fixedList[3] = 0; - Expect.notEquals(fixedList, growableList); - } - - static testLiterals() { - dynamic a = [1, 2, 3.1]; - dynamic b = [1, 2, 3.1]; - Expect.notEquals(a, b); - a = const [1, 2, 3.1]; - b = const [1, 2, 3.1]; - Expect.identical(a, b); - a = const [1, 2, 3.1]; - b = const [1, 2, 3.1]; - Expect.identical(a, b); - a = const [1, 2, 3.1]; - b = const [1, 2, 3.1]; - Expect.notEquals(a, b); - } -} - -main() { - ConstListTest.testConstructors(); - ConstListTest.testLiterals(); -} diff --git a/tests/language_2/const/local_test.dart b/tests/language_2/const/local_test.dart deleted file mode 100644 index 51d9744a316..00000000000 --- a/tests/language_2/const/local_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -main() { - const a = 1; - Expect.equals(1, a); - Expect.equals(1, const A(a).a); - Expect.equals(1, const [const A(a)][0].a); -} - -class A { - final a; - const A(this.a); -} diff --git a/tests/language_2/const/locals_test.dart b/tests/language_2/const/locals_test.dart deleted file mode 100644 index bd931379e25..00000000000 --- a/tests/language_2/const/locals_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test of compile time constant local variables. - -const N = 8; - -class ConstFoo { - final x; - const ConstFoo(this.x); -} - -main() { - const MIN = 2 - 1; - const MAX = N * 2; - const MASK = (1 << (MAX - MIN + 1)) - 1; // 65535. - Expect.equals(1, MIN); - Expect.equals(16, MAX); - Expect.equals(65535, MASK); - const s = 'MIN = $MIN MAX = $MAX MASK = $MASK'; - Expect.identical(s, 'MIN = $MIN MAX = $MAX MASK = $MASK'); - Expect.equals("MIN = 1 MAX = 16 MASK = 65535", s); - var cf1 = const ConstFoo(MASK); - var cf2 = const ConstFoo(s); - var cf3 = const ConstFoo('MIN = $MIN MAX = $MAX MASK = $MASK'); - Expect.identical(cf2, cf3); - Expect.isFalse(identical(cf2, cf1)); -} diff --git a/tests/language_2/const/map2_runtime_test.dart b/tests/language_2/const/map2_runtime_test.dart deleted file mode 100644 index d9a2e80657a..00000000000 --- a/tests/language_2/const/map2_runtime_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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 "package:expect/expect.dart"; - -class A { - const factory A() = B; -} - -class B implements A { - const B(); -} - -confuse(x) { - if (DateTime.now().millisecondsSinceEpoch == 42) return confuse(2); - return x; -} - -main() { - // It is a compile-time error if the key type overrides operator ==. - dynamic m = const {const A(): 42}; - Expect.equals(42, m[confuse(const B())]); - - m = const {"foo": 99, const A(): 499}; - Expect.equals(499, m[confuse(const B())]); -} diff --git a/tests/language_2/const/map2_test.dart b/tests/language_2/const/map2_test.dart deleted file mode 100644 index 399f792eb87..00000000000 --- a/tests/language_2/const/map2_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -class A { - const factory A() = B; -} - -class B implements A { - const B(); - - operator ==(o) => true; -} - -confuse(x) { - if (DateTime.now().millisecondsSinceEpoch == 42) return confuse(2); - return x; -} - -main() { - // It is a compile-time error if the key type overrides operator ==. - dynamic m = const {const A(): 42}; - // ^ - // [cfe] Constant evaluation error: - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_MAP_KEY_NOT_PRIMITIVE_EQUALITY - Expect.equals(42, m[confuse(const B())]); - - m = const {"foo": 99, const A(): 499}; - // ^ - // [cfe] Constant evaluation error: - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_MAP_KEY_NOT_PRIMITIVE_EQUALITY - Expect.equals(499, m[confuse(const B())]); -} diff --git a/tests/language_2/const/map3_runtime_test.dart b/tests/language_2/const/map3_runtime_test.dart deleted file mode 100644 index 7511732463d..00000000000 --- a/tests/language_2/const/map3_runtime_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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 "package:expect/expect.dart"; - -class A { - static const b = const B(); -} - -class B implements A { - const B(); - - -} - -main() { - // It is a compile-time error if the key type overrides operator ==. - dynamic m = const {A.b: 42}; - Expect.equals(42, m[const B()]); - - m = const {"foo": 99, A.b: 499}; - Expect.equals(499, m[const B()]); -} diff --git a/tests/language_2/const/map3_test.dart b/tests/language_2/const/map3_test.dart deleted file mode 100644 index 1fdb0cb914b..00000000000 --- a/tests/language_2/const/map3_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -class A { - static const b = const B(); -} - -class B implements A { - const B(); - - operator ==(o) => true; -} - -main() { - // It is a compile-time error if the key type overrides operator ==. - dynamic m = const {A.b: 42}; - // ^ - // [cfe] Constant evaluation error: - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_MAP_KEY_NOT_PRIMITIVE_EQUALITY - Expect.equals(42, m[const B()]); - - m = const {"foo": 99, A.b: 499}; - // ^ - // [cfe] Constant evaluation error: - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_MAP_KEY_NOT_PRIMITIVE_EQUALITY - Expect.equals(499, m[const B()]); -} diff --git a/tests/language_2/const/map4_test.dart b/tests/language_2/const/map4_test.dart deleted file mode 100644 index 88e13989101..00000000000 --- a/tests/language_2/const/map4_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -main() { - dynamic a = {1: 'a', 2: 'b', 3: 'c'}; - dynamic b = {1: 'a', 2: 'b', 3: 'c'}; - Expect.equals(false, a == b); - - a = const {1: 'a', 2: 'b', 3: 'c'}; - b = const {1: 'a', 2: 'b', 3: 'c'}; - Expect.equals(true, a == b); - - a = const {1: 'a', 2: 'b', 3: 'c'}; - b = const {1: 'a', 2: 'b', 3: 'c'}; - Expect.equals(true, a == b); - - a = const {1: 'a', 2: 'b', 3: 'c'}; - b = const {1: 'a', 2: 'b', 3: 'c'}; - Expect.equals(false, a == b); - - a = const {1: 'a', 2: 'b', 3: 'c'}; - b = const {1: 'a', 2: 'b', 3: 'c'}; - Expect.equals(false, a == b); -} diff --git a/tests/language_2/const/map5_test.dart b/tests/language_2/const/map5_test.dart deleted file mode 100644 index 4827e54b719..00000000000 --- a/tests/language_2/const/map5_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2021, 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. - -// Tests lookup of type literals of user-defined classes in const maps. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -class A {} - -class C {} - -typedef F = T Function(); - -const aType = A; -const fType = F; - -main() { - final map = const {A: 42, F: 2, 'asdf': 'fdsa'}; - Expect.equals(42, map[getValueNonOptimized(A)]); - Expect.equals(42, map[getValueNonOptimized(aType)]); - Expect.equals(2, map[getValueNonOptimized(F)]); - Expect.equals(2, map[getValueNonOptimized(fType)]); - Expect.isTrue(map.containsKey(getValueNonOptimized(A))); - Expect.isTrue(map.containsKey(getValueNonOptimized(aType))); - Expect.isTrue(map.containsKey(getValueNonOptimized(F))); - Expect.isTrue(map.containsKey(getValueNonOptimized(fType))); -} - -/// Returns its argument. -/// -/// Prevents static optimizations and inlining. -@pragma('vm:never-inline') -@pragma('dart2js:noInline') -dynamic getValueNonOptimized(dynamic x) { - // DateTime.now() cannot be predicted statically, never equal to 42. - if (DateTime.now().millisecondsSinceEpoch == 42) { - return getValueNonOptimized(2); - } - return x; -} diff --git a/tests/language_2/const/map_hashcode_override2_test.dart b/tests/language_2/const/map_hashcode_override2_test.dart deleted file mode 100644 index a5add26fbed..00000000000 --- a/tests/language_2/const/map_hashcode_override2_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2021, 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 - -import 'package:expect/expect.dart'; - -/// Returns its argument. -/// -/// Prevents static optimizations and inlining. -@pragma('vm:never-inline') -@pragma('dart2js:noInline') -dynamic getValueNonOptimized(dynamic x) { - // DateTime.now() cannot be predicted statically, never equal to 42. - if (DateTime.now().millisecondsSinceEpoch == 42) { - return getValueNonOptimized(2); - } - return x; -} - -class MyClass { - final int n; - - const MyClass(this.n); - - int get hashCode => super.hashCode + 1; -} - -main() { - const constInstance = MyClass(1); - final nonConstInstance = MyClass(1); - - const constMap = {MyClass(1): 11}; - final nonConstMap = {constInstance: 11}; - final nonConstMap2 = {nonConstInstance: 11}; - - // operator== is _not_ overridden, so instances are not equal. - Expect.notEquals(constInstance, nonConstInstance); - - Expect.isTrue(constMap.containsKey(getValueNonOptimized(constInstance))); - Expect.isFalse(constMap.containsKey(getValueNonOptimized(nonConstInstance))); - Expect.isTrue(nonConstMap.containsKey(getValueNonOptimized(constInstance))); - Expect.isFalse( - nonConstMap.containsKey(getValueNonOptimized(nonConstInstance))); - Expect.isFalse(nonConstMap2.containsKey(getValueNonOptimized(constInstance))); - Expect.isTrue( - nonConstMap2.containsKey(getValueNonOptimized(nonConstInstance))); - - Expect.equals(11, constMap[getValueNonOptimized(constInstance)]); - Expect.isNull(constMap[getValueNonOptimized(nonConstInstance)]); - Expect.equals(11, nonConstMap[getValueNonOptimized(constInstance)]); - Expect.isNull(nonConstMap[getValueNonOptimized(nonConstInstance)]); - Expect.isNull(nonConstMap2[getValueNonOptimized(constInstance)]); - Expect.equals(11, nonConstMap2[getValueNonOptimized(nonConstInstance)]); -} diff --git a/tests/language_2/const/map_hashcode_override_test.dart b/tests/language_2/const/map_hashcode_override_test.dart deleted file mode 100644 index 6558b751230..00000000000 --- a/tests/language_2/const/map_hashcode_override_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2021, 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 - -import 'package:expect/expect.dart'; - -/// Returns its argument. -/// -/// Prevents static optimizations and inlining. -@pragma('vm:never-inline') -@pragma('dart2js:noInline') -dynamic getValueNonOptimized(dynamic x) { - // DateTime.now() cannot be predicted statically, never equal to 42. - if (DateTime.now().millisecondsSinceEpoch == 42) { - return getValueNonOptimized(2); - } - return x; -} - -class Nasty { - final int n; - - const Nasty(this.n); - - int get hashCode { - throw "Evil hashCode"; - } -} - -main() { - // Test that when using an instance of a custom class as a key in a const Map, - // its hash code is computed as its identity hash, and even if the class - // overrides `hashCode`, that `hashCode` implementation is not called. - final map = const {1: 42, 'foo': 499, 2: 'bar', Nasty(1): 'baz'}; - Expect.equals(42, map[getValueNonOptimized(1.0)]); - Expect.equals( - 499, map[getValueNonOptimized(new String.fromCharCodes('foo'.runes))]); - Expect.equals('bar', map[getValueNonOptimized(2)]); - Expect.isNull(map[getValueNonOptimized(Nasty(1))]); - Expect.equals('baz', map[getValueNonOptimized(const Nasty(1))]); -} diff --git a/tests/language_2/const/map_null_lookup_test.dart b/tests/language_2/const/map_null_lookup_test.dart deleted file mode 100644 index 612f3ca3bd2..00000000000 --- a/tests/language_2/const/map_null_lookup_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2021, 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. - -// Tests lookup of null in const maps. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -main() { - final map1 = const {1: 42, null: 2, 'asdf': 'fdsa'}; - Expect.equals(2, map1[getValueNonOptimized(null)]); - Expect.isTrue(map1.containsKey(null)); - final map2 = const {1: 42, 2: 2, 'asdf': 'fdsa'}; - Expect.equals(null, map2[getValueNonOptimized(null)]); - Expect.isFalse(map2.containsKey(null)); -} - -/// Returns its argument. -/// -/// Prevents static optimizations and inlining. -@pragma('vm:never-inline') -@pragma('dart2js:noInline') -dynamic getValueNonOptimized(dynamic x) { - // DateTime.now() cannot be predicted statically, never equal to 42. - if (DateTime.now().millisecondsSinceEpoch == 42) { - return getValueNonOptimized(2); - } - return x; -} diff --git a/tests/language_2/const/map_test.dart b/tests/language_2/const/map_test.dart deleted file mode 100644 index 3ffcf7a8c26..00000000000 --- a/tests/language_2/const/map_test.dart +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'package:expect/expect.dart'; - -/// Returns its argument. -/// -/// Prevents static optimizations and inlining. -@pragma('vm:never-inline') -@pragma('dart2js:noInline') -dynamic getValueNonOptimized(dynamic x) { - // DateTime.now() cannot be predicted statically, never equal to 42. - if (DateTime.now().millisecondsSinceEpoch == 42) { - return getValueNonOptimized(2); - } - return x; -} - -main() { - // TODO(terry): Should check: - // - simple expressions are const e.g., 2 + 3, true && !false, etc. - // - const with final and/or static with same const attributes - // Additionally new class instances with a static const same identity - // - const for all types (int, num, double, String, boolean, and objects) - // - canonicalization - const created only once same identity e.g., - // - // getConstMap() => const [1, 2]; - // var a = getConstMap(); - // var b = getConstMap(); - // Expect.equals(a.hashCode, b.hashCode); - - // Make sure that const maps use the == operator and not object identity. The - // specification does not explicitly require it, otherwise ints and Strings - // wouldn't make much sense as keys. - final map = const {1: 42, 'foo': 499, 2: 'bar'}; - Expect.equals(42, map[getValueNonOptimized(1.0)]); - Expect.equals( - 499, map[getValueNonOptimized(new String.fromCharCodes('foo'.runes))]); - Expect.equals('bar', map[getValueNonOptimized(2)]); - - void testThrowsNoModification(void Function() f) { - Expect.throws(f, (e) { - return e is UnsupportedError; - }); - - Expect.equals(42, map[getValueNonOptimized(1.0)]); - Expect.equals( - 499, map[getValueNonOptimized(new String.fromCharCodes('foo'.runes))]); - Expect.equals('bar', map[getValueNonOptimized(2)]); - Expect.isNull(map[1024]); - } - - testThrowsNoModification(() { - map[1024] = 'something'; - }); - - testThrowsNoModification(() { - map.addAll({1024: 'something'}); - }); - - testThrowsNoModification(() { - map.putIfAbsent(1024, () => 'something'); - }); - - testThrowsNoModification(() { - map.putIfAbsent(1, () => 1024); - }); - - testThrowsNoModification(() { - map.clear(); - }); - - testThrowsNoModification(() { - map.remove(1024); - }); - - testThrowsNoModification(() { - map.remove(1); - }); - - testThrowsNoModification(() { - map.addEntries([MapEntry(1024, 'something')]); - }); - - testThrowsNoModification(() { - map.update(2, (Object value) => 42); - }); - - testThrowsNoModification(() { - map.updateAll((Object key, Object value) => '123'); - }); - - testThrowsNoModification(() { - map.removeWhere((Object key, Object value) => true); - }); -} diff --git a/tests/language_2/const/named_test.dart b/tests/language_2/const/named_test.dart deleted file mode 100644 index 8b2f278accf..00000000000 --- a/tests/language_2/const/named_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// 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. -// Check that const constructors work with named arguments. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - var d = const Duration(milliseconds: 499); - Expect.equals(499, d.inMilliseconds); -} diff --git a/tests/language_2/const/native_factory_test.dart b/tests/language_2/const/native_factory_test.dart deleted file mode 100644 index 8b0b180ef3a..00000000000 --- a/tests/language_2/const/native_factory_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012, 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 - -class Cake { - final name; - const Cake(this.name); - - @pragma("vm:external-name", "Cake_BakeMeACake") - @JSName("Cake_BakeMeACake") -//^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_ANNOTATION -// ^ -// [cfe] Couldn't find constructor 'JSName'. - external const factory Cake.BakeMeACake(); -} - -main() { - var c = const Cake("Sacher"); -} diff --git a/tests/language_2/const/nested_test.dart b/tests/language_2/const/nested_test.dart deleted file mode 100644 index a290f3d361e..00000000000 --- a/tests/language_2/const/nested_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test of compile time constant local variables in outer function levels. - -const N = 8; - -class ConstFoo { - final x; - const ConstFoo(this.x); -} - -getClosure() { - const MIN = 2 - 1; - const MAX = N * 2; - const MASK = (1 << (MAX - MIN + 1)) - 1; // 65535. - - void foo() { - Expect.equals(1, MIN); - Expect.equals(16, MAX); - Expect.equals(65535, MASK); - // Refer to compile time constant local variables in outer scope. - const s = 'MIN = $MIN MAX = $MAX MASK = $MASK'; - Expect.isTrue(identical(s, 'MIN = $MIN MAX = $MAX MASK = $MASK')); - Expect.equals("MIN = 1 MAX = 16 MASK = 65535", s); - var cf1 = const ConstFoo(MASK); - var cf2 = const ConstFoo(s); - var cf3 = const ConstFoo('MIN = $MIN MAX = $MAX MASK = $MASK'); - Expect.isTrue(identical(cf2, cf3)); - Expect.isFalse(identical(cf2, cf1)); - } - - return foo; -} - -main() { - var f = getClosure(); - f(); -} diff --git a/tests/language_2/const/objects_are_immutable_test.dart b/tests/language_2/const/objects_are_immutable_test.dart deleted file mode 100644 index a5e9addeaf6..00000000000 --- a/tests/language_2/const/objects_are_immutable_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// 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. -// Check that const objects (including literals) are immutable. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - const A(this.x, this.y); - final num x, y; -} - -main() { - dynamic list = const [1, 2]; - Expect.throws(() => list[0] = 3); - Expect.equals(1, list[0]); - - dynamic m = const {'foo': 499}; - Expect.throws(() => m['foo'] = 42); - Expect.equals(499, m['foo']); - - dynamic a1 = const A(1, 2); - Expect.throws(() => a1.x = 499); - Expect.equals(1, a1.x); - - dynamic a2 = const A(1, 2); - Expect.throws(() => a2.x = 499); - Expect.equals(1, a2.x); -} diff --git a/tests/language_2/const/optional_args_runtime_test.dart b/tests/language_2/const/optional_args_runtime_test.dart deleted file mode 100644 index 5dbe4bd3fd7..00000000000 --- a/tests/language_2/const/optional_args_runtime_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -// Check that const objects (including literals) are immutable. - -// Must be 'const {}' to be valid. -invalid( - [var p = - - const - - {}]) {} - -main() { - invalid(); -} diff --git a/tests/language_2/const/optional_args_test.dart b/tests/language_2/const/optional_args_test.dart deleted file mode 100644 index b16ce2f7569..00000000000 --- a/tests/language_2/const/optional_args_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2017, 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 - -// Check that const objects (including literals) are immutable. - -// Must be 'const {}' to be valid. -invalid( - [var p = - /* - const - */ - {}]) {} -// ^^ -// [analyzer] COMPILE_TIME_ERROR.NON_CONSTANT_DEFAULT_VALUE -// [cfe] Constant expression expected. -// [cfe] Non-constant map literal is not a constant expression. - -main() { - invalid(); -} diff --git a/tests/language_2/const/qq_test.dart b/tests/language_2/const/qq_test.dart deleted file mode 100644 index cdaefe7a4f3..00000000000 --- a/tests/language_2/const/qq_test.dart +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) 2015, 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 - -// Check that ?? is compile-time constant. - -import "package:expect/expect.dart"; - -const theNull = null; -const notNull = const Object(); - -// Top-level const field initializer. -const test1 = theNull ?? notNull; -const test2 = notNull ?? theNull; -const test3 = theNull ?? theNull ?? notNull; -const test4 = theNull ?? theNull ?? theNull; - -class P { - final v; - const P(this.v); -} - -// Annotation parameter (not checked by test!) -@P(theNull ?? notNull) -@P(notNull ?? theNull) -@P(theNull ?? theNull ?? notNull) -@P(theNull ?? theNull ?? theNull) -class C { - // Static const field initializer. - static const test5 = theNull ?? notNull; - static const test6 = notNull ?? theNull; - static const test7 = theNull ?? theNull ?? notNull; - static const test8 = theNull ?? theNull ?? theNull; - - // (Constructor) parameter defaults. - final test9; - final test10; - final test11; - final test12; - - // Const constructor initializer list. - final test13; - final test14; - final test15; - final test16; - final test17; - - const C(x, - [this.test9 = theNull ?? notNull, - this.test10 = notNull ?? theNull, - this.test11 = theNull ?? theNull ?? notNull, - this.test12 = theNull ?? theNull ?? theNull]) - : test13 = theNull ?? x, - test14 = notNull ?? x, - test15 = x ?? notNull, - test16 = theNull ?? theNull ?? x, - test17 = theNull ?? x ?? notNull; - - List methodLocal() { - // Method local const variable initializer. - const test18 = theNull ?? notNull; - const test19 = notNull ?? theNull; - const test20 = theNull ?? theNull ?? notNull; - const test21 = theNull ?? theNull ?? theNull; - - return const [test18, test19, test20, test21]; - } - - List expressionLocal() { - // Constant expression sub-expression. - return const [ - theNull ?? notNull, - notNull ?? theNull, - theNull ?? theNull ?? notNull, - theNull ?? theNull ?? theNull - ]; - } -} - -main() { - Expect.identical(notNull, test1, "test1"); - Expect.identical(notNull, test2, "test2"); - Expect.identical(notNull, test3, "test3"); - Expect.identical(theNull, test4, "test4"); - - Expect.identical(notNull, C.test5, "test5"); - Expect.identical(notNull, C.test6, "test6"); - Expect.identical(notNull, C.test7, "test7"); - Expect.identical(theNull, C.test8, "test8"); - - const c1 = const C(null); - Expect.identical(notNull, c1.test9, "test9"); - Expect.identical(notNull, c1.test10, "test10"); - Expect.identical(notNull, c1.test11, "test11"); - Expect.identical(theNull, c1.test12, "test12"); - - Expect.identical(theNull, c1.test13, "test13"); - Expect.identical(notNull, c1.test14, "test14"); - Expect.identical(notNull, c1.test15, "test15"); - Expect.identical(theNull, c1.test16, "test16"); - Expect.identical(notNull, c1.test17, "test17"); - - var list = c1.methodLocal(); - Expect.identical(notNull, list[0], "test18"); - Expect.identical(notNull, list[1], "test19"); - Expect.identical(notNull, list[2], "test20"); - Expect.identical(theNull, list[3], "test21"); - - list = c1.expressionLocal(); - Expect.identical(notNull, list[0], "test22"); - Expect.identical(notNull, list[1], "test23"); - Expect.identical(notNull, list[2], "test24"); - Expect.identical(theNull, list[3], "test25"); - - const c2 = const C(42); - Expect.identical(notNull, c2.test9, "test26"); - Expect.identical(notNull, c2.test10, "test27"); - Expect.identical(notNull, c2.test11, "test28"); - Expect.identical(theNull, c2.test12, "test29"); - - Expect.identical(42, c2.test13, "test30"); - Expect.identical(notNull, c2.test14, "test31"); - Expect.identical(42, c2.test15, "test32"); - Expect.identical(42, c2.test16, "test33"); - Expect.identical(42, c2.test17, "test34"); - - list = c2.methodLocal(); - Expect.identical(notNull, list[0], "test35"); - Expect.identical(notNull, list[1], "test36"); - Expect.identical(notNull, list[2], "test37"); - Expect.identical(theNull, list[3], "test38"); - - list = c2.expressionLocal(); - Expect.identical(notNull, list[0], "test39"); - Expect.identical(notNull, list[1], "test40"); - Expect.identical(notNull, list[2], "test41"); - Expect.identical(theNull, list[3], "test42"); -} diff --git a/tests/language_2/const/redirect_skips_supertype_test.dart b/tests/language_2/const/redirect_skips_supertype_test.dart deleted file mode 100644 index b1157962e54..00000000000 --- a/tests/language_2/const/redirect_skips_supertype_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2016, 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 - -// Since C redirects to C.named, it doesn't implicitly refer to B's -// unnamed constructor. Therefore there is no cycle. - -class B { - final x; - const B() : x = y; - const B.named() : x = null; -} - -class C extends B { - const C() : this.named(); - const C.named() : super.named(); -} - -const y = const C(); - -main() { - print(y); -} diff --git a/tests/language_2/const/redirecting_factory_test.dart b/tests/language_2/const/redirecting_factory_test.dart deleted file mode 100644 index 33a1420f571..00000000000 --- a/tests/language_2/const/redirecting_factory_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'package:expect/expect.dart'; - -class K implements L { - final field1; - final field2; - const K({this.field1: 42, this.field2: true}); -} - -class L { - const factory L() = K; - const factory L.named1({field1, field2}) = K; - const factory L.named2({field2, field1}) = K; -} - -const K l1 = const L(); - -const K l2a = const L.named1(); -const K l2b = const L.named1(field1: 87); -const K l2c = const L.named1(field2: false); -const K l2d = const L.named1(field1: 87, field2: false); -const K l2e = const L.named1(field2: false, field1: 87); - -const K l3a = const L.named2(); -const K l3b = const L.named2(field1: 87); -const K l3c = const L.named2(field2: false); -const K l3d = const L.named2(field1: 87, field2: false); -const K l3e = const L.named2(field2: false, field1: 87); - -main() { - Expect.equals(42, l1.field1); - Expect.equals(true, l1.field2); - - Expect.equals(42, l2a.field1); - Expect.equals(true, l2a.field2); - Expect.equals(87, l2b.field1); - Expect.equals(true, l2b.field2); - Expect.equals(42, l2c.field1); - Expect.equals(false, l2c.field2); - Expect.equals(87, l2d.field1); - Expect.equals(false, l2d.field2); - Expect.equals(87, l2e.field1); - Expect.equals(false, l2e.field2); - - Expect.equals(42, l3a.field1); - Expect.equals(true, l3a.field2); - Expect.equals(87, l3b.field1); - Expect.equals(true, l3b.field2); - Expect.equals(42, l3c.field1); - Expect.equals(false, l3c.field2); - Expect.equals(87, l3d.field1); - Expect.equals(false, l3d.field2); - Expect.equals(87, l3e.field1); - Expect.equals(false, l3e.field2); -} diff --git a/tests/language_2/const/set5_test.dart b/tests/language_2/const/set5_test.dart deleted file mode 100644 index dc0088d05b3..00000000000 --- a/tests/language_2/const/set5_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2021, 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. - -// Tests lookup of type literals of user-defined classes in const sets. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -class A {} - -class C {} - -typedef F = T Function(); - -const aType = A; -const fType = F; - -main() { - final set1 = const {A, 1, 'asdf', F}; - Expect.isTrue(set1.contains(getValueNonOptimized(A))); - Expect.isTrue(set1.contains(getValueNonOptimized(aType))); - Expect.isTrue(set1.contains(getValueNonOptimized(F))); - Expect.isTrue(set1.contains(getValueNonOptimized(fType))); - Expect.equals(A, set1.lookup(getValueNonOptimized(A))); - Expect.equals(A, set1.lookup(getValueNonOptimized(aType))); - Expect.equals(F, set1.lookup(getValueNonOptimized(F))); - Expect.equals(F, set1.lookup(getValueNonOptimized(fType))); -} - -/// Returns its argument. -/// -/// Prevents static optimizations and inlining. -@pragma('vm:never-inline') -@pragma('dart2js:noInline') -dynamic getValueNonOptimized(dynamic x) { - // DateTime.now() cannot be predicted statically, never equal to 42. - if (DateTime.now().millisecondsSinceEpoch == 42) { - return getValueNonOptimized(2); - } - return x; -} diff --git a/tests/language_2/const/set_hashcode_override2_test.dart b/tests/language_2/const/set_hashcode_override2_test.dart deleted file mode 100644 index 0be21364651..00000000000 --- a/tests/language_2/const/set_hashcode_override2_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2021, 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 - -import 'package:expect/expect.dart'; - -/// Returns its argument. -/// -/// Prevents static optimizations and inlining. -@pragma('vm:never-inline') -@pragma('dart2js:noInline') -dynamic getValueNonOptimized(dynamic x) { - // DateTime.now() cannot be predicted statically, never equal to 42. - if (DateTime.now().millisecondsSinceEpoch == 42) { - return getValueNonOptimized(2); - } - return x; -} - -class MyClass { - final int n; - - const MyClass(this.n); - - int get hashCode => super.hashCode + 1; -} - -main() { - const constInstance = MyClass(1); - final nonConstInstance = MyClass(1); - - const constSet = {MyClass(1)}; - final nonConstSet = {constInstance}; - final nonConstSet2 = {nonConstInstance}; - - // operator== is _not_ overridden, so instances are not equal. - Expect.notEquals(constInstance, nonConstInstance); - - Expect.isTrue(constSet.contains(getValueNonOptimized(constInstance))); - Expect.isFalse(constSet.contains(getValueNonOptimized(nonConstInstance))); - Expect.isTrue(nonConstSet.contains(getValueNonOptimized(constInstance))); - Expect.isFalse(nonConstSet.contains(getValueNonOptimized(nonConstInstance))); - Expect.isFalse(nonConstSet2.contains(getValueNonOptimized(constInstance))); - Expect.isTrue(nonConstSet2.contains(getValueNonOptimized(nonConstInstance))); -} diff --git a/tests/language_2/const/set_null_lookup_test.dart b/tests/language_2/const/set_null_lookup_test.dart deleted file mode 100644 index 1e7a09ab7d6..00000000000 --- a/tests/language_2/const/set_null_lookup_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2021, 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. - -// Tests lookup of null in const sets. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -main() { - final set1 = const {null, 1, 'asdf'}; - Expect.isTrue(set1.contains(getValueNonOptimized(null))); - Expect.equals(null, set1.lookup(null)); - final set2 = const {42, 1, 'asdf'}; - Expect.isFalse(set2.contains(getValueNonOptimized(null))); - Expect.equals(null, set2.lookup(null)); -} - -/// Returns its argument. -/// -/// Prevents static optimizations and inlining. -@pragma('vm:never-inline') -@pragma('dart2js:noInline') -dynamic getValueNonOptimized(dynamic x) { - // DateTime.now() cannot be predicted statically, never equal to 42. - if (DateTime.now().millisecondsSinceEpoch == 42) { - return getValueNonOptimized(2); - } - return x; -} diff --git a/tests/language_2/const/string_test.dart b/tests/language_2/const/string_test.dart deleted file mode 100644 index 5895d76d8cc..00000000000 --- a/tests/language_2/const/string_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Exercises compile-time string constants - -const yz = "y" + "z"; - -main() { - // Constant comparisons are independent of the quotes used. - Expect.isTrue(identical("abcd", 'abcd')); - Expect.isTrue(identical('abcd', "abcd")); - Expect.isTrue(identical("ab\"cd", 'ab"cd')); - Expect.isTrue(identical('ab\'cd', "ab'cd")); - - // String concatenation works even when quotes are different. - Expect.isTrue(identical("abcd", "ab" "cd")); - Expect.isTrue(identical("abcd", "ab" 'cd')); - Expect.isTrue(identical("abcd", 'ab' 'cd')); - Expect.isTrue(identical("abcd", 'ab' "cd")); - - // Or when there are more than 2 concatenations. - Expect.isTrue(identical("abcd", "a" "b" "cd")); - Expect.isTrue(identical("abcd", "a" "b" "c" "d")); - Expect.isTrue(identical('abcd', 'a' 'b' 'c' 'd')); - Expect.isTrue(identical("abcd", "a" "b" 'c' "d")); - Expect.isTrue(identical("abcd", 'a' 'b' 'c' 'd')); - Expect.isTrue(identical("abcd", 'a' "b" 'c' "d")); - - Expect.isTrue(identical("a'b'cd", "a" "'b'" 'c' "d")); - Expect.isTrue(identical("a\"b\"cd", "a" '"b"' 'c' "d")); - Expect.isTrue(identical("a\"b\"cd", "a" '"b"' 'c' "d")); - Expect.isTrue(identical("a'b'cd", 'a' "'b'" 'c' "d")); - Expect.isTrue(identical('a\'b\'cd', "a" "'b'" 'c' "d")); - Expect.isTrue(identical('a"b"cd', 'a' '"b"' 'c' "d")); - Expect.isTrue(identical("a\"b\"cd", 'a' '"b"' 'c' "d")); - - const a = identical("ab", "a" + "b"); - Expect.isTrue(a); - - const b = identical("xyz", "x" + yz); - Expect.isTrue(b); - - const c = identical("12", "1" "2"); - Expect.isTrue(c); - - const d = identical("zyz", "z$yz"); - Expect.isTrue(d); -} diff --git a/tests/language_2/const/switch2_runtime_test.dart b/tests/language_2/const/switch2_runtime_test.dart deleted file mode 100644 index f8a2d964414..00000000000 --- a/tests/language_2/const/switch2_runtime_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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 'package:expect/expect.dart'; - -int main() { - var a = [1, 2, 3][2]; - switch (a) { - - - - case 1: - print("OK"); - } -} diff --git a/tests/language_2/const/switch2_test.dart b/tests/language_2/const/switch2_test.dart deleted file mode 100644 index ce881a40080..00000000000 --- a/tests/language_2/const/switch2_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'package:expect/expect.dart'; - -int main() { - var a = [1, 2, 3][2]; - switch (a) { - // ^ - // [analyzer] COMPILE_TIME_ERROR.SWITCH_EXPRESSION_NOT_ASSIGNABLE - case 0.0: - // ^ - // [cfe] Case expression '0.0' does not have a primitive operator '=='. - // [cfe] Type 'int' of the switch expression isn't assignable to the type 'double' of this case expression. - print("illegal"); - break; - case 1: - // ^ - // [analyzer] COMPILE_TIME_ERROR.INCONSISTENT_CASE_EXPRESSION_TYPES - print("OK"); - } -} diff --git a/tests/language_2/const/switch_test.dart b/tests/language_2/const/switch_test.dart deleted file mode 100644 index 48b7d3d617c..00000000000 --- a/tests/language_2/const/switch_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'package:expect/expect.dart'; - -class C { - final field; - const C(this.field); -} - -const c1 = const C(0.0); -const c2 = const C(0); -const c3 = const C(0.5 + 0.5); -const c4 = const C(1); - -main() { - Expect.equals('0.0', test(c1)); //# 01: ok - Expect.equals('0', test(c2)); //# 02: ok - Expect.equals('1.0', test(c3)); //# 03: ok - Expect.equals('1', test(c4)); //# 04: ok -} - -String test(C c) { - switch (c) { - case const C(0.0): - return '0.0'; - case const C(0): - return '0'; - case const C(1.0): - return '1.0'; - case const C(1): - return '1'; - } - return null; -} diff --git a/tests/language_2/const/syntax_runtime_test.dart b/tests/language_2/const/syntax_runtime_test.dart deleted file mode 100644 index ebb4dd71d6f..00000000000 --- a/tests/language_2/const/syntax_runtime_test.dart +++ /dev/null @@ -1,94 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 "package:expect/expect.dart"; - -main() { - const f0 = 42; - - const int f2 = 87; - - Expect.equals(42, f0); - Expect.equals(87, f2); - - Expect.equals(42, F0); - - Expect.equals(87, F2); - - - Expect.isTrue(P0 is Point); - - - - - Expect.isTrue(A0 is int); - Expect.isTrue(A1 is int); - - - - Expect.isTrue(C0.X is C1); - - - Expect.equals("Hello 42", B2); - - - const cf1 = identical(const Point(1, 2), const Point(1, 2)); - - - - - var f5 = B5; -} - -const F0 = 42; - -const int F2 = 87; - - -class Point { - final x, y; - const Point(this.x, this.y); - operator +(int other) => x; -} - -// Check that compile time expressions can include invocations of -// user-defined const constructors. -const P0 = const Point(0, 0); - - - - -// Check that we cannot have cyclic references in compile time -// expressions. -const A0 = 42; -const A1 = A0 + 1; - - - -class C0 { - static const X = const C1(); -} - -class C1 { - const C1() - - ; - final x = null; -} - -// Check that sub-expressions of binary + are numeric. -const B0 = 42; -const B1 = "Hello"; -const B2 = "$B1 $B0"; - - -// Check identical. - - -const B5 = identical(1, const Point(1, 2)); diff --git a/tests/language_2/const/syntax_test.dart b/tests/language_2/const/syntax_test.dart deleted file mode 100644 index caa71eefa1a..00000000000 --- a/tests/language_2/const/syntax_test.dart +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - const f0 = 42; - const f1; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_NOT_INITIALIZED - // [cfe] The const variable 'f1' must be initialized. - const int f2 = 87; - const int f3; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_NOT_INITIALIZED - // [cfe] The const variable 'f3' must be initialized. - Expect.equals(42, f0); - Expect.equals(87, f2); - - Expect.equals(42, F0); - Expect.equals(null, F1); - Expect.equals(87, F2); - Expect.equals(null, F3); - - Expect.isTrue(P0 is Point); - Expect.isTrue(P1 is int); - Expect.isTrue(P2 is Point); - Expect.isTrue(P3 is int); - - Expect.isTrue(A0 is int); - Expect.isTrue(A1 is int); - Expect.isTrue(A2 is int); - Expect.isTrue(A3 is int); - - Expect.isTrue(C0.X is C1); - Expect.isTrue(C0.X.x is C1); - - Expect.equals("Hello 42", B2); - Expect.equals("42Hello", B3); - - const cf1 = identical(const Point(1, 2), const Point(1, 2)); - - const cf2 = identical(const Point(1, 2), new Point(1, 2)); - // ^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE - // [cfe] New expression is not a constant expression. - // ^ - // [cfe] New expression is not a constant expression. - - var f4 = B4; - var f5 = B5; -} - -const F0 = 42; -const F1; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_NOT_INITIALIZED -// [cfe] The const variable 'F1' must be initialized. -const int F2 = 87; -const int F3; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_NOT_INITIALIZED -// [cfe] The const variable 'F3' must be initialized. - -class Point { - final x, y; - const Point(this.x, this.y); - operator +(int other) => x; -} - -// Check that compile time expressions can include invocations of -// user-defined const constructors. -const P0 = const Point(0, 0); -const P1 = const Point(0, 0) + 1; -// ^^^^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_NUM -// ^ -// [cfe] Constant evaluation error: -const P2 = new Point(0, 0); -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE -// [cfe] New expression is not a constant expression. -// ^ -// [cfe] New expression is not a constant expression. -const P3 = new Point(0, 0) + 1; -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE -// [cfe] New expression is not a constant expression. -// ^ -// [cfe] New expression is not a constant expression. - -// Check that we cannot have cyclic references in compile time -// expressions. -const A0 = 42; -const A1 = A0 + 1; -const A2 = A3 + 1; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.RECURSIVE_COMPILE_TIME_CONSTANT -// [cfe] Can't infer the type of 'A2': circularity found during type inference. -// ^ -// [cfe] Constant evaluation error: -const A3 = A2 + 1; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.RECURSIVE_COMPILE_TIME_CONSTANT - -class C0 { - static const X = const C1(); - // ^ - // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_COMPILE_TIME_CONSTANT -} - -class C1 { - const C1() - // ^^ - // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_CONSTANT_CONSTRUCTOR - : x = C0.X - //^ - // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION - // ^ - // [cfe] 'x' is a final instance variable that was initialized at the declaration. - // [cfe] Cannot invoke a non-'const' constructor where a const expression is expected. - // [cfe] Not a constant expression. - ; - final x = null; -} - -// Check that sub-expressions of binary + are numeric. -const B0 = 42; -const B1 = "Hello"; -const B2 = "$B1 $B0"; -const B3 = B0 + B1; -// ^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_NUM -// ^^ -// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE -// [cfe] A value of type 'String' can't be assigned to a variable of type 'num'. - -// Check identical. - -const B4 = identical(1, new Point(1, 2)); -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE -// [cfe] New expression is not a constant expression. -// ^ -// [cfe] New expression is not a constant expression. -const B5 = identical(1, const Point(1, 2)); diff --git a/tests/language_2/const/tree_test.dart b/tests/language_2/const/tree_test.dart deleted file mode 100644 index 8b42e7d4587..00000000000 --- a/tests/language_2/const/tree_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2017, 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 - -class A { - final List children; - const A({this.children: const []}); -} - -const a = const A(); -const b = const A(children: const [a]); - -main() { - print(b); -} diff --git a/tests/language_2/const/types_test.dart b/tests/language_2/const/types_test.dart deleted file mode 100644 index 84f07eec49f..00000000000 --- a/tests/language_2/const/types_test.dart +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test handling of malformed types in constant expressions. - -use(x) {} - -class Class implements Supertype, GenericSupertype { - const Class(); - const Class.named(); - - void test() { - use(const []); - use(const []); - use(const >[]); - use(const >[]); //# 01: compile-time error - use(const []); //# 02: compile-time error - - use(const {}); - use(const {}); - use(const {}); - use(const >{}); - use(const >{}); //# 04: compile-time error - use(const {}); //# 05: compile-time error - - use(const Class()); - use(const Class()); - use(const Class()); //# 06: compile-time error - use(const Class()); //# 07: compile-time error - use(const Class>()); //# 08: compile-time error - - use(const Unresolved()); //# 09: compile-time error - use(const Unresolved()); //# 10: compile-time error - use(const prefix.Unresolved()); //# 11: compile-time error - use(const prefix.Unresolved()); //# 12: compile-time error - - use(const Class.named()); - use(const Class.named()); - use(const Class.named()); //# 13: compile-time error - use(const Class.named()); //# 14: compile-time error - use(const Class>.named()); //# 15: compile-time error - - use(const Class.nonamed()); //# 16: compile-time error - use(const Class.nonamed()); //# 17: compile-time error - use(const Class.nonamed()); //# 18: compile-time error - use(const Class.nonamed()); //# 19: compile-time error - use(const Class>.nonamed()); //# 20: compile-time error - - use(const Unresolved.named()); //# 21: compile-time error - use(const Unresolved.named()); //# 22: compile-time error - } -} - -class Supertype { - const factory Supertype() = Unresolved; //# 23: compile-time error - const factory Supertype() = Unresolved; //# 24: compile-time error - const factory Supertype() = Unresolved.named; //# 25: compile-time error - const factory Supertype() = Unresolved.named; //# 26: compile-time error - - const factory Supertype() = prefix.Unresolved; //# 27: compile-time error - const factory Supertype() = prefix.Unresolved; //# 28: compile-time error - const factory Supertype() = prefix.Unresolved.named; //# 29: compile-time error - const factory Supertype() = prefix.Unresolved.named; //# 30: compile-time error - - const factory Supertype() = Class; //# 31: ok - const factory Supertype() = Class; //# 32: ok - const factory Supertype() = Class; //# 35: compile-time error - - const factory Supertype() = Class.named; //# 36: ok - const factory Supertype() = Class.named; //# 37: ok - const factory Supertype() = Class.named; //# 40: compile-time error -} - -class GenericSupertype { - const factory GenericSupertype() = Class; //# 33: ok - const factory GenericSupertype() = Class>; //# 34: compile-time error - - const factory GenericSupertype() = Class.named; //# 38: ok - const factory GenericSupertype() = Class>.named; //# 39: compile-time error - - const factory GenericSupertype() = T; //# 41: compile-time error -} - -void main() { - new Class().test(); - new Supertype(); - new GenericSupertype(); -} diff --git a/tests/language_2/const/var_helper.dart b/tests/language_2/const/var_helper.dart deleted file mode 100644 index 3be3c413770..00000000000 --- a/tests/language_2/const/var_helper.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2012, 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. -// All things regarding constant variables. - -// @dart = 2.9 - -/** Helper library for 'var_test.dart' */ -library const_var_helper; - -class Foo { - const Foo(); -} diff --git a/tests/language_2/const/var_test.dart b/tests/language_2/const/var_test.dart deleted file mode 100644 index 66c02f3d7ef..00000000000 --- a/tests/language_2/const/var_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2012, 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. -// All things regarding constant variables. - -// @dart = 2.9 - -library const_var; - -import 'var_helper.dart' as foo; - -const untypedTopLevel = 1; -const int typedTopLevel = 2; -const Map genericTopLevel = const {}; - -main() { - const untypedLocal = 3; - const int typedLocal = 4; - const Map genericLocal = const {}; - const []; - const {}; - const []; - const {}; - const Foo(); - const Foo(); - const foo.Foo(); - const foo.Foo(); -} - -class Foo { - const Foo(); -} diff --git a/tests/language_2/constants_2018/const_type_test.dart b/tests/language_2/constants_2018/const_type_test.dart deleted file mode 100644 index 511450995b1..00000000000 --- a/tests/language_2/constants_2018/const_type_test.dart +++ /dev/null @@ -1,102 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests that types do matter when an expression is evaluated as constant. - -main() { - const C c = C(); - const T.test01(c); //# 01: compile-time error - const T.test02(c, c); //# 02: compile-time error - const T.test03(c, c); //# 03: compile-time error - const T.test04(c, c); //# 04: compile-time error - const T.test05(c, c); //# 05: compile-time error - const T.test06(c, c); //# 06: compile-time error - const T.test07(c, c); //# 07: compile-time error - const T.test08(c, c); //# 08: compile-time error - const T.test09(c, c); //# 09: compile-time error - const T.test10(c, c); //# 10: compile-time error - const T.test11(c, c); //# 11: compile-time error - const T.test12(c, c); //# 12: compile-time error - const T.test13(c, c); //# 13: compile-time error - const T.test14(c); //# 14: compile-time error - const T.test15(c, c); //# 15: compile-time error - const T.test16(c, c); //# 16: compile-time error - const T.test17(c, c); //# 17: compile-time error - const T.test18(c, c); //# 18: compile-time error - const T.test19(c); //# 19: compile-time error - - const v01 = false ? c : -c; //# 20: compile-time error - const v02 = false ? c : c + c; //# 21: compile-time error - const v03 = false ? c : c - c; //# 22: compile-time error - const v04 = false ? c : c * c; //# 23: compile-time error - const v05 = false ? c : c / c; //# 24: compile-time error - const v06 = false ? c : c ~/ c; //# 25: compile-time error - const v07 = false ? c : c % c; //# 26: compile-time error - const v08 = false ? c : c << c; //# 27: compile-time error - const v09 = false ? c : c >> c; //# 28: compile-time error - const v10 = false ? c : c >>> c; //# 29: compile-time error - const v11 = false ? c : c & c; //# 30: compile-time error - const v12 = false ? c : c | c; //# 31: compile-time error - const v13 = false ? c : c ^ c; //# 32: compile-time error - const v14 = false ? c : ~c; //# 33: compile-time error - const v15 = false ? c : c < c; //# 34: compile-time error - const v16 = false ? c : c > c; //# 35: compile-time error - const v17 = false ? c : c <= c; //# 36: compile-time error - const v18 = false ? c : c >= c; //# 37: compile-time error - const v19 = false ? c : c.length; //# 38: compile-time error -} - -// Each expression in the forwarding generative constructors must be -// potentially constant. They are only checked for being actually -// constant when the constructor is invoked. -class T { - const T(C o); - const T.test01(C x) : this(-x); - const T.test02(C x, C y) : this(x + y); - const T.test03(C x, C y) : this(x - y); - const T.test04(C x, C y) : this(x * y); - const T.test05(C x, C y) : this(x / y); - const T.test06(C x, C y) : this(x ~/ y); - const T.test07(C x, C y) : this(x % y); - const T.test08(C x, C y) : this(x << y); - const T.test09(C x, C y) : this(x >> y); - const T.test10(C x, C y) : this(x >>> y); //# 10: continued - const T.test11(C x, C y) : this(x & y); - const T.test12(C x, C y) : this(x | y); - const T.test13(C x, C y) : this(x ^ y); - const T.test14(C x) : this(~x); - const T.test15(C x, C y) : this(x < y); - const T.test16(C x, C y) : this(x > y); - const T.test17(C x, C y) : this(x <= y); - const T.test18(C x, C y) : this(x >= y); - const T.test19(C x) : this(x.length); -} - -class C { - const C(); - C operator -() => this; - C operator +(C other) => this; - C operator -(C other) => this; - C operator *(C other) => this; - C operator /(C other) => this; - C operator ~/(C other) => this; - C operator %(C other) => this; - C operator <<(C other) => this; - C operator >>(C other) => this; - // Remove the multi-test markers and one of the lines below, - // when `>>>` is implemented. - C operator >>>(C other) => this; //# 10: continued - C operator >>>(C other) => this; //# 29: continued - C operator &(C other) => this; - C operator |(C other) => this; - C operator ^(C other) => this; - C operator ~() => this; - C operator <(C other) => this; - C operator >(C other) => this; - C operator <=(C other) => this; - C operator >=(C other) => this; - C get length => this; -} diff --git a/tests/language_2/constants_2018/constant_type_literal_test.dart b/tests/language_2/constants_2018/constant_type_literal_test.dart deleted file mode 100644 index e7086f37d06..00000000000 --- a/tests/language_2/constants_2018/constant_type_literal_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests that non-deferred type literals are constant expressions. - -import "dart:core"; -import "dart:core" as core; -// No reloading support for deferred loading. -// See https://github.com/dart-lang/sdk/issues/33118. -import "dart:core" deferred as dcore show int; //# 01: compile-time error - -// Declares F function type alias, M mixin and C class. -import "constant_type_literal_types.dart"; -import "constant_type_literal_types.dart" as p; -// No reloading support for deferred loading. -// See https://github.com/dart-lang/sdk/issues/33118. -import "constant_type_literal_types.dart" //# 02: compile-time error - deferred as d; //# 02: continued - -main() { - const Test(int, core.int); - const Test(C, p.C); - const Test(M, p.M); - const Test(F, p.F); - const c1 = // - dcore. //# 01: continued - int; - const Test(c1, int); - const c2 = // - d. //# 02: continued - C; - const Test(c2, C); -} - -class Test { - const Test(Type t1, Type t2) : assert(identical(t1, t2)); -} diff --git a/tests/language_2/constants_2018/constant_type_literal_types.dart b/tests/language_2/constants_2018/constant_type_literal_types.dart deleted file mode 100644 index 38dff1caebc..00000000000 --- a/tests/language_2/constants_2018/constant_type_literal_types.dart +++ /dev/null @@ -1,14 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Helper file for constant_type_literal_test.dart. -// Tests that non-deferred type literals are constant expressions. - -typedef F = void Function(); - -class C {} - -mixin M {} diff --git a/tests/language_2/constants_2018/constant_types_test.dart b/tests/language_2/constants_2018/constant_types_test.dart deleted file mode 100644 index 333c6d4b444..00000000000 --- a/tests/language_2/constants_2018/constant_types_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests that only constant types are allowed in some positions, -// not type parameters. - -import "package:expect/expect.dart"; - -class T { - final Object value; - const T.test1() - : value = const // - //# 01: compile-time error - []; - const T.test2(Object o) - : value = o // - as X //# 02: compile-time error - ; - const T.test3(Object o) - : value = o // - is X //# 03: compile-time error - ; - const T.test4() - : value = null // - ?? X //# 04: compile-time error - ; -} - -class T2 { - final Object value; - const T2.test1() : value = const []; - const T2.test2(Object o) : value = o as int; - const T2.test3(Object o) : value = o is int; - const T2.test4() : value = int; -} - -main() { - // The errors in class T are errors independently of whether the - // constructor is invoked or not. - - // Constant type expressions are allowed. - Expect.equals(const [], const T2.test1().value); - Expect.equals(2, const T2.test2(2).value); - Expect.isTrue(const T2.test3(2).value); - Expect.equals(int, const T2.test4().value); -} diff --git a/tests/language_2/constants_2018/equals_test.dart b/tests/language_2/constants_2018/equals_test.dart deleted file mode 100644 index 6ddd3e1e294..00000000000 --- a/tests/language_2/constants_2018/equals_test.dart +++ /dev/null @@ -1,65 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests that equality is allowed for receivers of specific types. - -import "package:expect/expect.dart"; - -main() { - const c = C(); // Does not override operator==. - const d = D(); // Overrides operator==. - - // Allowed if receiver is int, double, String, bool or Null, ... - Expect.isTrue(const T.eq(1, 1).value); - Expect.isTrue(const T.eq(1.5, 1.5).value); - Expect.isTrue(const T.eq("", "").value); - Expect.isTrue(const T.eq(true, true).value); - Expect.isTrue(const T.eq(null, null).value); - - Expect.isFalse(const T.eq(1, c).value); - Expect.isFalse(const T.eq(1.5, c).value); - Expect.isFalse(const T.eq("", c).value); - Expect.isFalse(const T.eq(true, c).value); - Expect.isFalse(const T.eq(null, c).value); - - Expect.isFalse(const T.eq(1, d).value); - Expect.isFalse(const T.eq(1.5, d).value); - Expect.isFalse(const T.eq("", d).value); - Expect.isFalse(const T.eq(true, d).value); - Expect.isFalse(const T.eq(null, d).value); - - // ... or if second operand is Null. - Expect.isFalse(const T.eq(1, null).value); - Expect.isFalse(const T.eq(1.5, null).value); - Expect.isFalse(const T.eq("", null).value); - Expect.isFalse(const T.eq(false, null).value); - Expect.isFalse(const T.eq(c, null).value); - Expect.isFalse(const T.eq(d, null).value); - - // Otherwise not allowed. - const T.eq(c, c); //# 01: compile-time error - const T.eq(c, 1); //# 02: compile-time error - const T.eq(c, ""); //# 03: compile-time error - const T.eq(E.value1, E.value2); //# 04: compile-time error -} - -class T { - final Object value; - const T.eq(Object o1, Object o2) : value = o1 == o2; -} - -/// Class that does not override operator==. -class C { - const C(); -} - -/// Class that overrides operator==. -class D { - const D(); - bool operator ==(Object other) => identical(this, other); -} - -enum E { value1, value2 } diff --git a/tests/language_2/constants_2018/potential_const_dynamic_test.dart b/tests/language_2/constants_2018/potential_const_dynamic_test.dart deleted file mode 100644 index e8a6158fd8f..00000000000 --- a/tests/language_2/constants_2018/potential_const_dynamic_test.dart +++ /dev/null @@ -1,75 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests that a dynamic type does not affect whether an expression is -// potentially constant, the actual type of the value of an expression -// only matters if the expression is evaluated as a constant. - -main() { - Object c = C(); - T.test01(c); - T.test02(c, c); - T.test03(c, c); - T.test04(c, c); - T.test05(c, c); - T.test06(c, c); - T.test07(c, c); - T.test08(c, c); - T.test09(c, c); - T.test11(c, c); - T.test12(c, c); - T.test13(c, c); - T.test14(c); - T.test15(c, c); - T.test16(c, c); - T.test17(c, c); - T.test18(c, c); - T.test19(c); -} - -class T { - const T(Object o); - const T.test01(dynamic x) : this(-x); - const T.test02(dynamic x, dynamic y) : this(x + y); - const T.test03(dynamic x, dynamic y) : this(x - y); - const T.test04(dynamic x, dynamic y) : this(x * y); - const T.test05(dynamic x, dynamic y) : this(x / y); - const T.test06(dynamic x, dynamic y) : this(x ~/ y); - const T.test07(dynamic x, dynamic y) : this(x % y); - const T.test08(dynamic x, dynamic y) : this(x << y); - const T.test09(dynamic x, dynamic y) : this(x >> y); - const T.test11(dynamic x, dynamic y) : this(x & y); - const T.test12(dynamic x, dynamic y) : this(x | y); - const T.test13(dynamic x, dynamic y) : this(x ^ y); - const T.test14(dynamic x) : this(~x); - const T.test15(dynamic x, dynamic y) : this(x < y); - const T.test16(dynamic x, dynamic y) : this(x > y); - const T.test17(dynamic x, dynamic y) : this(x <= y); - const T.test18(dynamic x, dynamic y) : this(x >= y); - const T.test19(dynamic x) : this(x.length); -} - -class C { - const C(); - dynamic operator -() => this; - dynamic operator +(dynamic other) => this; - dynamic operator -(dynamic other) => this; - dynamic operator *(dynamic other) => this; - dynamic operator /(dynamic other) => this; - dynamic operator ~/(dynamic other) => this; - dynamic operator %(dynamic other) => this; - dynamic operator <<(dynamic other) => this; - dynamic operator >>(dynamic other) => this; - dynamic operator &(dynamic other) => this; - dynamic operator |(dynamic other) => this; - dynamic operator ^(dynamic other) => this; - dynamic operator ~() => this; - dynamic operator <(dynamic other) => this; - dynamic operator >(dynamic other) => this; - dynamic operator <=(dynamic other) => this; - dynamic operator >=(dynamic other) => this; - dynamic get length => this; -} diff --git a/tests/language_2/constants_2018/potential_const_shortcircuit_test.dart b/tests/language_2/constants_2018/potential_const_shortcircuit_test.dart deleted file mode 100644 index d91adce7236..00000000000 --- a/tests/language_2/constants_2018/potential_const_shortcircuit_test.dart +++ /dev/null @@ -1,59 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests that short-circuit operators do not care about the unevaluated part. - -import "package:expect/expect.dart"; - -main() { - const C c = C(); - // Short-circuited operations. - // Non-taken branch of ?:. - const c1 = true ? c : c + c; - const c2 = false ? c + c : c; - // Non-taken part of &&, ||, ??. - const c3 = (c != null) || c < c; - const c4 = (c == null) && c < c; - const c5 = c ?? c + c; - Expect.identical(c, c1); - Expect.identical(c, c2); - Expect.isTrue(c3); - Expect.isFalse(c4); - Expect.identical(c, c5); - // Nested short-circuiting. - const c6 = true ? c == null && c + c : c < c; - Expect.isFalse(c6); - - // Concrete use-case. - Expect.equals(1, const T.length("a").value); - Expect.equals(0, const T.length("").value); - Expect.equals(0, const T.length(null).value); - Expect.equals(1, T.length([1]).value); - Expect.equals(0, T.length([]).value); - Expect.equals(0, T.length(null).value); - - Expect.equals(1, const T.asserts("a").value); - Expect.equals(0, const T.asserts("").value); - Expect.equals(0, const T.asserts(null).value); - Expect.equals(1, T.asserts([1]).value); - Expect.equals(0, T.asserts([]).value); - Expect.equals(0, T.asserts(null).value); -} - -class T { - final Object value; - const T(this.value); - const T.length(dynamic l) : value = (l == null ? 0 : l.length); - const T.asserts(dynamic l) - : assert(l == null || l.length < 2), - value = (l ?? "").length; -} - -class C { - const C(); - dynamic operator +(dynamic other) => throw "Never"; - bool operator <(dynamic other) => throw "Never"; -} diff --git a/tests/language_2/constants_2018/potential_const_test.dart b/tests/language_2/constants_2018/potential_const_test.dart deleted file mode 100644 index be26de8a1c5..00000000000 --- a/tests/language_2/constants_2018/potential_const_test.dart +++ /dev/null @@ -1,102 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests that the correct places allows, and requires, potentially constant -// expressions. - -bool get nonConst => true; - -class C { - final v; - const C(this.v); - - // Redirecting generative constructor invocation parameters, - // must be potentially constant. - const C.r1() : this(const C(null)); - - // Only evaluates the true branch when passed `true` as argument. - const C.r2(bool b) : this(b ? null : 1 ~/ 0); - - const C.rn1() : this(nonConst); - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CONSTANT - // [cfe] Constant evaluation error: - - const C.rn2(bool b) : this(b ? null : nonConst); - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CONSTANT - // [cfe] Constant evaluation error: - - // Initializer list expressions must be potentially constant. - const C.g1() : v = const C(null); - - const C.g2(bool b) : v = b ? null : 1 ~/ 0; - - const C.gn3() : v = nonConst; - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CONSTANT - // [cfe] Constant evaluation error: - - const C.gn4(bool b) : v = b ? null : nonConst; - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CONSTANT - // [cfe] Constant evaluation error: - - // Constant constructor initializer list assert expressions - // must be potentially constant (and boolean). - const C.a1() - : assert(const C(null) != null), - v = null; - - const C.a2(bool b) - : assert(b ? const C(null) != null : ((1 ~/ 0) as bool)), - v = null; - - const C.an1() - : assert(nonConst), - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CONSTANT - // [cfe] Constant evaluation error: - v = null; - - const C.an2(bool b) - : assert(b ? true : nonConst), - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CONSTANT - // [cfe] Constant evaluation error: - v = null; -} - -main() { - var c = const C(null); - var cc = const C(C(null)); - - var r1 = const C.r1(); - var r2 = const C.r2(true); - - /// Const constructor invocation which would throw. - /**/ const C.r2(false); - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_THROWS_EXCEPTION - // ^^^^^^^^^^^ - // [cfe] Constant evaluation error: - - var g1 = const C.g1(); - var g2 = const C.g2(true); - /**/ const C.g2(false); - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_THROWS_EXCEPTION - // ^^^^^^^^^^^ - // [cfe] Constant evaluation error: - - var a1 = const C.a1(); - var a2 = const C.a2(true); - /**/ const C.a2(false); - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_THROWS_EXCEPTION - // ^^^^^^^^^^^ - // [cfe] Constant evaluation error: -} diff --git a/tests/language_2/constants_2018/potential_const_type_test.dart b/tests/language_2/constants_2018/potential_const_type_test.dart deleted file mode 100644 index fd47f3d7a39..00000000000 --- a/tests/language_2/constants_2018/potential_const_type_test.dart +++ /dev/null @@ -1,93 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests that types do not affect whether an expression is potentially -// constant, they only matter if the expression is evaluated as a constant. - -main() { - const C c = C(); - T.test01(c); - T.test02(c, c); - T.test03(c, c); - T.test04(c, c); - T.test05(c, c); - T.test06(c, c); - T.test07(c, c); - T.test08(c, c); - T.test09(c, c); - T.test11(c, c); - T.test12(c, c); - T.test13(c, c); - T.test14(c); - T.test15(c, c); - T.test16(c, c); - T.test17(c, c); - T.test18(c, c); - T.test19(c); - - const v01 = true ? c : -c; - const v02 = true ? c : c + c; - const v03 = true ? c : c - c; - const v04 = true ? c : c * c; - const v05 = true ? c : c / c; - const v06 = true ? c : c ~/ c; - const v07 = true ? c : c % c; - const v08 = true ? c : c << c; - const v09 = true ? c : c >> c; - const v11 = true ? c : c & c; - const v12 = true ? c : c | c; - const v13 = true ? c : c ^ c; - const v14 = true ? c : ~c; - const v15 = true ? c : c < c; - const v16 = true ? c : c > c; - const v17 = true ? c : c <= c; - const v18 = true ? c : c >= c; - const v19 = true ? c : c.length; -} - -class T { - const T(C o); - const T.test01(C x) : this(-x); - const T.test02(C x, C y) : this(x + y); - const T.test03(C x, C y) : this(x - y); - const T.test04(C x, C y) : this(x * y); - const T.test05(C x, C y) : this(x / y); - const T.test06(C x, C y) : this(x ~/ y); - const T.test07(C x, C y) : this(x % y); - const T.test08(C x, C y) : this(x << y); - const T.test09(C x, C y) : this(x >> y); - const T.test11(C x, C y) : this(x & y); - const T.test12(C x, C y) : this(x | y); - const T.test13(C x, C y) : this(x ^ y); - const T.test14(C x) : this(~x); - const T.test15(C x, C y) : this(x < y); - const T.test16(C x, C y) : this(x > y); - const T.test17(C x, C y) : this(x <= y); - const T.test18(C x, C y) : this(x >= y); - const T.test19(C x) : this(x.length); -} - -class C { - const C(); - C operator -() => this; - C operator +(C other) => this; - C operator -(C other) => this; - C operator *(C other) => this; - C operator /(C other) => this; - C operator ~/(C other) => this; - C operator %(C other) => this; - C operator <<(C other) => this; - C operator >>(C other) => this; - C operator &(C other) => this; - C operator |(C other) => this; - C operator ^(C other) => this; - C operator ~() => this; - C operator <(C other) => this; - C operator >(C other) => this; - C operator <=(C other) => this; - C operator >=(C other) => this; - C get length => this; -} diff --git a/tests/language_2/constants_2018/type_cast_test.dart b/tests/language_2/constants_2018/type_cast_test.dart deleted file mode 100644 index 001153051db..00000000000 --- a/tests/language_2/constants_2018/type_cast_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests that type casts (as) are allowed. - -main() { - const t1 = T.implicit(Sub()); - const t2 = T.explicit(Sub()); - const t3 = T.implicit(null); - const t4 = T.explicit(null); - - // Inline. - const Object o = ""; - const len = (o as String).length; -} - -class Super { - const Super(); -} - -class Sub extends Super { - const Sub(); -} - -class T { - final Sub value; - const T.implicit(Super s) : value = s; - const T.explicit(Super s) : value = s as Sub; -} diff --git a/tests/language_2/constants_2018/type_check_test.dart b/tests/language_2/constants_2018/type_check_test.dart deleted file mode 100644 index 9ee4eb6f801..00000000000 --- a/tests/language_2/constants_2018/type_check_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests that type checks (is) are allowed. - -import "package:expect/expect.dart"; - -main() { - const c = C(); - const l = [1]; - const s = "a"; - - Expect.equals(1, const T.length(s, 42).value); - Expect.equals(42, const T.length(l, 42).value); - Expect.equals(1, const T.length2(s, 42).value); - Expect.equals(42, const T.length2(l, 42).value); - - Expect.equals(3, const T.sum(1, 2).value); - Expect.equals(3.7, const T.sum(1.5, 2.2).value); - Expect.equals("abc", const T.sum("a", "bc").value); - Expect.equals("a", const T.sum("a", 2).value); -} - -class T { - final Object value; - const T.length(dynamic l, int defaultValue) - : value = l is String ? l.length : defaultValue; - const T.length2(dynamic l, int defaultValue) - : value = l is! String ? defaultValue : l.length; - const T.sum(dynamic o1, dynamic o2) - : value = ((o1 is num) & (o2 is num)) | ((o1 is String) & (o2 is String)) - ? o1 + o2 - : o1; -} - -class C { - const C(); - dynamic operator +(dynamic other) => throw "Never"; - bool operator <(dynamic other) => throw "Never"; -} diff --git a/tests/language_2/constructor/bad_constructor_runtime_1_test.dart b/tests/language_2/constructor/bad_constructor_runtime_1_test.dart deleted file mode 100644 index 61a4b65de1e..00000000000 --- a/tests/language_2/constructor/bad_constructor_runtime_1_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 constructor can't be static. -class A { - - A(); -} - -// A factory constructor can't be static. -class B { - - factory B() { return null; } -} - -// A named constructor can have the same name as a setter. -class E { - set setter(value) {} - E.setter(); -} - -// A constructor can't be static. -class F { - - F(){} -} - -main() { - new A(); - new B(); - new E.setter(); - new F(); -} diff --git a/tests/language_2/constructor/bad_constructor_runtime_test.dart b/tests/language_2/constructor/bad_constructor_runtime_test.dart deleted file mode 100644 index 8ae086296f1..00000000000 --- a/tests/language_2/constructor/bad_constructor_runtime_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 constructor can't be static. -class A { - - A(); -} - -// A factory constructor can't be static. -class B { - - factory B() { return null; } -} - -// A named constructor can have the same name as a setter. -class E { - - E.setter(); -} - -// A constructor can't be static. -class F { - - F(){} -} - -main() { - new A(); - new B(); - new E.setter(); - new F(); -} diff --git a/tests/language_2/constructor/bad_constructor_test.dart b/tests/language_2/constructor/bad_constructor_test.dart deleted file mode 100644 index 31c1015a430..00000000000 --- a/tests/language_2/constructor/bad_constructor_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2012, 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 constructor can't be static. -class A { - static -//^^^^^^ -// [analyzer] SYNTACTIC_ERROR.STATIC_CONSTRUCTOR -// [cfe] Constructors can't be static. - A(); - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_FUNCTION_BODY - // [cfe] Expected a function body or '=>'. -} - -// A factory constructor can't be static. -class B { - static -//^^^^^^ -// [analyzer] SYNTACTIC_ERROR.EXTRANEOUS_MODIFIER -// [cfe] Can't have modifier 'static' here. - factory B() { return null; } -} - -// A named constructor can have the same name as a setter. -class E { - set setter(value) {} - E.setter(); -} - -// A constructor can't be static. -class F { - static -//^^^^^^ -// [analyzer] SYNTACTIC_ERROR.STATIC_CONSTRUCTOR -// [cfe] Constructors can't be static. - F(){} -} - -main() { - new A(); - new B(); - new E.setter(); - new F(); -} diff --git a/tests/language_2/constructor/bad_named_constructor_runtime_test.dart b/tests/language_2/constructor/bad_named_constructor_runtime_test.dart deleted file mode 100644 index 6cf1a9859db..00000000000 --- a/tests/language_2/constructor/bad_named_constructor_runtime_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -class A { - A() {} - -} - -main() { - new A(); -} diff --git a/tests/language_2/constructor/bad_named_constructor_test.dart b/tests/language_2/constructor/bad_named_constructor_test.dart deleted file mode 100644 index e969eb7b945..00000000000 --- a/tests/language_2/constructor/bad_named_constructor_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2017, 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 - -class A { - A() {} - WrongName.foo() {} -//^^^^^^^^^ -// [analyzer] SYNTACTIC_ERROR.INVALID_CONSTRUCTOR_NAME -// [cfe] The name of a constructor must match the name of the enclosing class. -} - -main() { - new A(); -} diff --git a/tests/language_2/constructor/body_test.dart b/tests/language_2/constructor/body_test.dart deleted file mode 100644 index 8963e164c48..00000000000 --- a/tests/language_2/constructor/body_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// 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 test program for constructors without function bodies. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test a non-const constructor works without a body. -class First { - First(int this.value); - First.named(int this.value); - int value; -} - -// Test a const constructor works without a body. -class Second { - const Second(int this.value); - const Second.named(int this.value); - final int value; -} - -class ConstructorBodyTest { - static testMain() { - Expect.equals(4, new First(4).value); - Expect.equals(5, new First.named(5).value); - Expect.equals(6, new Second(6).value); - Expect.equals(7, new Second.named(7).value); - } -} - -main() { - ConstructorBodyTest.testMain(); -} diff --git a/tests/language_2/constructor/bodyless_wrong_arg_runtime_test.dart b/tests/language_2/constructor/bodyless_wrong_arg_runtime_test.dart deleted file mode 100644 index e0611cf1986..00000000000 --- a/tests/language_2/constructor/bodyless_wrong_arg_runtime_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -class Base { - final String name; - const Base(this.name); -} - -class C extends Base { - const C(String s) - : super( - // Call super constructor with wrong argument count. - - s - - ); -} - -main() { - const C("str"); -} diff --git a/tests/language_2/constructor/bodyless_wrong_arg_test.dart b/tests/language_2/constructor/bodyless_wrong_arg_test.dart deleted file mode 100644 index a286ddb1f32..00000000000 --- a/tests/language_2/constructor/bodyless_wrong_arg_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2017, 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 - -class Base { - final String name; - const Base(this.name); -} - -class C extends Base { - const C(String s) - // Call super constructor with wrong argument count. - : super(); - // ^ - // [analyzer] COMPILE_TIME_ERROR.NOT_ENOUGH_POSITIONAL_ARGUMENTS - // ^^ - // [cfe] Too few positional arguments: 1 required, 0 given. -} - -main() { - const C("str"); -} diff --git a/tests/language_2/constructor/call_as_function_test.dart b/tests/language_2/constructor/call_as_function_test.dart deleted file mode 100644 index 60fe2e1f933..00000000000 --- a/tests/language_2/constructor/call_as_function_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// 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 - -class Point { - const Point(this.x, this.y); - final int x; - final int y; -} - -main() { - Point p = Point(1, 2); -} diff --git a/tests/language_2/constructor/call_wrong_argument_count_runtime_test.dart b/tests/language_2/constructor/call_wrong_argument_count_runtime_test.dart deleted file mode 100644 index 0f7894b4f3b..00000000000 --- a/tests/language_2/constructor/call_wrong_argument_count_runtime_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -class Stockhorn { - Stockhorn(int a); -} - -main() { - new Stockhorn(1); - -} diff --git a/tests/language_2/constructor/call_wrong_argument_count_test.dart b/tests/language_2/constructor/call_wrong_argument_count_test.dart deleted file mode 100644 index 136e68cc115..00000000000 --- a/tests/language_2/constructor/call_wrong_argument_count_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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 - -class Stockhorn { - Stockhorn(int a); -} - -main() { - new Stockhorn(1); - new Stockhorn(); - // ^ - // [analyzer] COMPILE_TIME_ERROR.NOT_ENOUGH_POSITIONAL_ARGUMENTS - // ^^ - // [cfe] Too few positional arguments: 1 required, 0 given. -} diff --git a/tests/language_2/constructor/constructor10_runtime_test.dart b/tests/language_2/constructor/constructor10_runtime_test.dart deleted file mode 100644 index 9103d926deb..00000000000 --- a/tests/language_2/constructor/constructor10_runtime_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -// Check that the implicit super call for synthetic constructors are checked. - -class A { - final x; - A(this.x); -} - -class B extends A { - - B() : super(null); - -} - -// ========== - -class Y extends A { - - Y() : super(null); - -} - -class Z extends Y { - Z() : super(); -} - -// ============== - -class G extends A { - - G() : super(null); - -} - -class H extends G {} - -main() { - new B().x; - new Z().x; - new H().x; -} diff --git a/tests/language_2/constructor/constructor10_test.dart b/tests/language_2/constructor/constructor10_test.dart deleted file mode 100644 index d7bd54e5f2a..00000000000 --- a/tests/language_2/constructor/constructor10_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2014, 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 - -// Check that the implicit super call for synthetic constructors are checked. - -class A { - final x; - A(this.x); -} - -class B extends A { -// ^ -// [analyzer] COMPILE_TIME_ERROR.NO_DEFAULT_SUPER_CONSTRUCTOR -// [cfe] The superclass, 'A', has no unnamed constructor that takes no arguments. - /* - B() : super(null); - */ -} - -// ========== - -class Y extends A { -// ^ -// [analyzer] COMPILE_TIME_ERROR.NO_DEFAULT_SUPER_CONSTRUCTOR -// [cfe] The superclass, 'A', has no unnamed constructor that takes no arguments. - /* - Y() : super(null); - */ -} - -class Z extends Y { - Z() : super(); -} - -// ============== - -class G extends A { -// ^ -// [analyzer] COMPILE_TIME_ERROR.NO_DEFAULT_SUPER_CONSTRUCTOR -// [cfe] The superclass, 'A', has no unnamed constructor that takes no arguments. - /* - G() : super(null); - */ -} - -class H extends G {} - -main() { - new B().x; - new Z().x; - new H().x; -} diff --git a/tests/language_2/constructor/constructor11_test.dart b/tests/language_2/constructor/constructor11_test.dart deleted file mode 100644 index 722927cdfd0..00000000000 --- a/tests/language_2/constructor/constructor11_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2014, 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 - -// Check that the implicit super call for synthetic constructors are checked. - -import "package:expect/expect.dart"; - -class A { - final x; - A([this.x = 499]); -} - -class B extends A {} - -// ========== - -class X { - final x; - X([this.x = 42]); -} - -class Y extends X {} - -class Z extends Y { - Z() : super(); -} - -// ============== - -class F { - final x; - F([this.x = 99]); -} - -class G extends F {} - -class H extends G {} - -main() { - Expect.equals(499, new B().x); - Expect.equals(42, new Z().x); - Expect.equals(99, new H().x); -} diff --git a/tests/language_2/constructor/constructor12_test.dart b/tests/language_2/constructor/constructor12_test.dart deleted file mode 100644 index d089038fdd9..00000000000 --- a/tests/language_2/constructor/constructor12_test.dart +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -class B { - final z; - B(this.z); - - foo() => this.z; -} - -class A extends B { - var captured, captured2; - var typedList; - - // p must be inside a box (in dart2js). - A(p) - : captured = (() => p), - super(p++) { - // Make constructor body non-inlinable. - try {} catch (e) {} - - captured2 = () => p++; - - // In the current implementation of dart2js makes the generic type an - // argument to the body. - typedList = []; - } - - foo() => captured(); - bar() => captured2(); -} - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(x) => x; - -main() { - var a = confuse(new A(1)); - var a2 = confuse(new A(2)); - var b = confuse(new B(3)); - Expect.equals(2, a.foo()); - Expect.equals(3, a2.foo()); - Expect.equals(3, b.foo()); - Expect.equals(1, a.z); - Expect.equals(2, a2.z); - Expect.equals(3, b.z); - Expect.isTrue(a is A); - Expect.isFalse(a is A); - Expect.isFalse(a2 is A); - Expect.isFalse(a2 is A); - Expect.isTrue(a2 is A); - Expect.equals(2, a.bar()); - Expect.equals(3, a2.bar()); - Expect.equals(3, a.foo()); - Expect.equals(4, a2.foo()); - Expect.equals(0, a.typedList.length); - Expect.equals(0, a2.typedList.length); - a.typedList.add(499); - Expect.equals(1, a.typedList.length); - Expect.equals(0, a2.typedList.length); - Expect.isTrue(a.typedList is List); - Expect.isFalse(a2.typedList is List); - Expect.isFalse(a.typedList is List); - Expect.isFalse(a2.typedList is List); -} diff --git a/tests/language_2/constructor/constructor13_runtime_test.dart b/tests/language_2/constructor/constructor13_runtime_test.dart deleted file mode 100644 index 2cc22707e89..00000000000 --- a/tests/language_2/constructor/constructor13_runtime_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -// Check that there's no crash when constructor called with wrong -// number of args. - -class Klass { - Klass(v) {} -} - -main() { - - new Klass(1); - -} diff --git a/tests/language_2/constructor/constructor13_test.dart b/tests/language_2/constructor/constructor13_test.dart deleted file mode 100644 index 59d051a5b7c..00000000000 --- a/tests/language_2/constructor/constructor13_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2017, 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 - -// Check that there's no crash when constructor called with wrong -// number of args. - -class Klass { - Klass(v) {} -} - -main() { - new Klass(); - // ^ - // [analyzer] COMPILE_TIME_ERROR.NOT_ENOUGH_POSITIONAL_ARGUMENTS - // ^^ - // [cfe] Too few positional arguments: 1 required, 0 given. - new Klass(1); - new Klass(1, 2); - // ^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS - // ^^^^^^ - // [cfe] Too many positional arguments: 1 allowed, but 2 found. -} diff --git a/tests/language_2/constructor/constructor2_test.dart b/tests/language_2/constructor/constructor2_test.dart deleted file mode 100644 index 509882aee6e..00000000000 --- a/tests/language_2/constructor/constructor2_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// 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 test program for constructors and initializers. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Expect the initializer expressions E(i) to be evaluated -// in the order 1, 2, 3, ... -// Each expression must be evaluated exactly once. - -String trace = ""; - -int E(int i) { - trace += "$i-"; - return i; -} - -class A { - var a1; - A(x, y) : a1 = E(4) { - Expect.equals(2, x); - Expect.equals(3, y); - Expect.equals(4, a1); - E(6); - } -} - -class B extends A { - var b1, b2; - - B(x) - : b1 = E(1), - b2 = E(5), - super(E(2), E(3)) { - Expect.equals(1, b1); - Expect.equals(5, b2); - E(7); - } -} - -main() { - var b = new B(0); - Expect.equals("1-5-2-3-4-6-7-", trace); -} diff --git a/tests/language_2/constructor/constructor3_test.dart b/tests/language_2/constructor/constructor3_test.dart deleted file mode 100644 index d2908fdc9dd..00000000000 --- a/tests/language_2/constructor/constructor3_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// 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 test program for constructors and initializers. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Expect the initializer expressions E(i) to be evaluated -// in the order 1, 2, 3, ... -// Each expression must be evaluated exactly once. - -String trace = ""; - -int E(int i) { - trace += "$i-"; - return i; -} - -class A { - var a1; - A(x, y) : a1 = E(3) { - Expect.equals(1, x); - Expect.equals(2, y); - E(5); - } -} - -class B extends A { - var b1; - B(x) - : b1 = E(4), - super(E(1), E(2)) { - // Implicit super call to A's body happens here. - Expect.equals(4, b1); - E(6); - } -} - -main() { - var b = new B(0); - Expect.equals("4-1-2-3-5-6-", trace); -} diff --git a/tests/language_2/constructor/constructor4_test.dart b/tests/language_2/constructor/constructor4_test.dart deleted file mode 100644 index 6d1665d5cf0..00000000000 --- a/tests/language_2/constructor/constructor4_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// 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 test program for constructors and initializers. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Expect the initializer expressions E(i) to be evaluated -// in the order 1, 2, 3, ... -// Each expression must be evaluated exactly once. - -String trace = ""; - -int E(int i) { - trace += "$i-"; - return i; -} - -class A { - var a1; - A() : a1 = E(2) { - E(3); - } -} - -class B extends A { - var b1; - B(x) : b1 = E(1) /* Implicit super call to A's initializers happens here. */ { - // Implicit super call to A's body happens here. - E(4); - } -} - -main() { - var b = new B(0); - Expect.equals("1-2-3-4-", trace); -} diff --git a/tests/language_2/constructor/constructor5_test.dart b/tests/language_2/constructor/constructor5_test.dart deleted file mode 100644 index 501c9eae4de..00000000000 --- a/tests/language_2/constructor/constructor5_test.dart +++ /dev/null @@ -1,59 +0,0 @@ -// 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 test program for constructors and initializers. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Super initializer and super constructor body are executed in with the same -// bindings. - -String trace = ""; - -int E(int i) { - trace = "$trace$i-"; - return i; -} - -class A { - A({arg1: 100, arg2: 200}) - : a1 = E(arg1++), - a2 = E(arg2++) { - // b2 should be initialized between the above initializers and the following - // statements. - E(arg1); // 101 - E(arg2); // 51 - } - var a1; - var a2; -} - -class B extends A { - // Initializers in order: b1, super, b2. - B(x, y) - : b1 = E(x++), - b2 = E(y++), - super(arg2: 50) { - // Implicit super call to A's body happens here. - E(x); // 11 - E(y); // 21 - } - var b1; - var b2; -} - -class C extends B { - C() : super(10, 20); -} - -main() { - var c = new C(); - Expect.equals(100, c.a1); - Expect.equals(50, c.a2); - Expect.equals(10, c.b1); - Expect.equals(20, c.b2); - - Expect.equals("10-20-100-50-101-51-11-21-", trace); -} diff --git a/tests/language_2/constructor/constructor6_test.dart b/tests/language_2/constructor/constructor6_test.dart deleted file mode 100644 index 9db561005dd..00000000000 --- a/tests/language_2/constructor/constructor6_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// 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 test program for constructors and initializers. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Super initializer and super constructor body are executed in with the same -// bindings. - -String trace = ""; - -int E(int i) { - trace = "$trace$i-"; - return i; -} - -class A { - // f closes-over arg. arg needs to be preserved while b2 is initialized. - A(arg) - : a = E(arg += 1), - f = (() => E(arg += 10)) { - // b2 should be initialized between the above initializers and the following - // statements. - var r1 = f(); - E(arg += 100); // If this is the same arg as closed by f, ... - var r2 = f(); // .. the effect of +=100 will be seen here. - } - final a; - final f; -} - -class B extends A { - // Initializers in order: b1, super, b2. - B(x, y) - : b1 = E(x++), - b2 = E(y++), - super(1000) { - // Implicit super call to A's body happens here. - E(x); - E(y); - f(); - } - var b1; - var b2; -} - -class C extends B { - C() : super(10, 20); -} - -main() { - var c = new C(); - Expect.equals("10-20-1001-1011-1111-1121-11-21-1131-", trace); -} diff --git a/tests/language_2/constructor/constructor7_test.dart b/tests/language_2/constructor/constructor7_test.dart deleted file mode 100644 index 93d84bc22f9..00000000000 --- a/tests/language_2/constructor/constructor7_test.dart +++ /dev/null @@ -1,63 +0,0 @@ -// 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 test program for constructors and initializers. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Expect the initializer expressions E(i) to be evaluated -// in the order 1, 2, 3, ... -// This test has no inheritance but many fields to flush out issues with -// ordering of fields. - -String trace = ""; - -int E(int i) { - trace += "$i-"; - return i; -} - -class A { - var j; // Names are in reverse order to detect sorting by name... - var i = 0; // Initialized odd/even to detect these inits affecting order. - var h; - var g = 0; - var f; - var e = 0; - var d; - var c = 0; - var b; - var a = 0; - - A() - : a = E(1), // Initializations in different order to decls. Ascending... - b = E(2), - c = E(3), - f = E(4), // Descending to be perverse... - e = E(5), - d = E(6), - g = E(7), // Ascending again. - h = E(8), - i = E(9), - j = E(10) { - Expect.equals(1, a); - Expect.equals(2, b); - Expect.equals(3, c); - - Expect.equals(4, f); - Expect.equals(5, e); - Expect.equals(6, d); - - Expect.equals(7, g); - Expect.equals(8, h); - Expect.equals(9, i); - Expect.equals(10, j); - } -} - -main() { - var x = new A(); - Expect.equals('1-2-3-4-5-6-7-8-9-10-', trace); -} diff --git a/tests/language_2/constructor/constructor8_test.dart b/tests/language_2/constructor/constructor8_test.dart deleted file mode 100644 index 3dc790e9ef7..00000000000 --- a/tests/language_2/constructor/constructor8_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -// Regression test for dart2js that used to crash on this program. - -class A { - var b; - - // The closure in the constructor body used to confuse the SSA builder - // when it created the call to the constructor body. - A.withClosure(Map a) { - var c; - var f = () { - return c = 42; - }; - b = f(); - Expect.equals(42, b); - Expect.equals(42, c); - } -} - -main() { - new A.withClosure(null); - new A.withClosure({}); -} diff --git a/tests/language_2/constructor/constructor9_runtime_test.dart b/tests/language_2/constructor/constructor9_runtime_test.dart deleted file mode 100644 index ce11136bb1a..00000000000 --- a/tests/language_2/constructor/constructor9_runtime_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -// Check that all final instance fields of a class are initialized by -// constructors. - -class Klass { - Klass(var v) : field_ = v {} - - var field_; -} - -main() { - new Klass(5); -} diff --git a/tests/language_2/constructor/constructor9_test.dart b/tests/language_2/constructor/constructor9_test.dart deleted file mode 100644 index 8f8737f1288..00000000000 --- a/tests/language_2/constructor/constructor9_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// 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 - -// Check that all final instance fields of a class are initialized by -// constructors. - -class Klass { - Klass(var v) : field_ = v {} -//^^^^^ -// [analyzer] COMPILE_TIME_ERROR.FINAL_NOT_INITIALIZED_CONSTRUCTOR - final uninitializedFinalField_; - // ^ - // [cfe] Final field 'uninitializedFinalField_' is not initialized. - final uninitializedFinalField_; - // ^^^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'uninitializedFinalField_' is already declared in this scope. - var field_; -} - -main() { - new Klass(5); -} diff --git a/tests/language_2/constructor/constructor_test.dart b/tests/language_2/constructor/constructor_test.dart deleted file mode 100644 index 6546acec625..00000000000 --- a/tests/language_2/constructor/constructor_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// 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 test program for constructors and initializers. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A extends B { - A(x, y) - : a = x, - super(y) {} - - var a; -} - -class B { - var b; - - B(x) : b = x {} - - B.namedB(var x) : b = x {} -} - -// Test the order of initialization: first the instance variable then -// the super constructor. -abstract class Alpha { - Alpha(v) { - this.foo(v); - } - foo(v) => throw 'Alpha.foo should never be called.'; -} - -class Beta extends Alpha { - Beta(v) - : b = 1, - super(v) {} - - foo(v) { - // Check that 'b' was initialized. - Expect.equals(1, b); - b = v; - } - - var b; -} - -class ConstructorTest { - static testMain() { - var o = new A(10, 2); - Expect.equals(10, o.a); - Expect.equals(2, o.b); - - var o1 = new B.namedB(10); - Expect.equals(10, o1.b); - - Expect.equals(22, o.a + o.b + o1.b); - - var beta = new Beta(3); - Expect.equals(3, beta.b); - } -} - -main() { - ConstructorTest.testMain(); -} diff --git a/tests/language_2/constructor/cyclic_constructor_test.dart b/tests/language_2/constructor/cyclic_constructor_test.dart deleted file mode 100644 index d296ddb8a63..00000000000 --- a/tests/language_2/constructor/cyclic_constructor_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012, 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 - -class A { - A.a() : this.b(); - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_CONSTRUCTOR_REDIRECT - A.b() - : this.a() - //^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_CONSTRUCTOR_REDIRECT - // ^ - // [cfe] Redirecting constructors can't be cyclic. - ; - A.c() : this.b(); -} - -main() { - new A.a(); - new A.b(); - new A.c(); -} diff --git a/tests/language_2/constructor/cyclic_runtime_test.dart b/tests/language_2/constructor/cyclic_runtime_test.dart deleted file mode 100644 index ff243e0acff..00000000000 --- a/tests/language_2/constructor/cyclic_runtime_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -class A { - A.a() : this.b(); - A.b() - - ; - A.c() : this.b(); -} - -main() { - new A.a(); - new A.b(); - new A.c(); -} diff --git a/tests/language_2/constructor/default_class_implicit_constructor_test.dart b/tests/language_2/constructor/default_class_implicit_constructor_test.dart deleted file mode 100644 index b847164f149..00000000000 --- a/tests/language_2/constructor/default_class_implicit_constructor_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// An abstract class with a redirecting factory to a class with no declared -// constructor should use the implicit default constructor. - -abstract class A { - factory A() = B; -} - -class B implements A {} - -main() { - var val = new A(); - Expect.equals(true, val is A); - Expect.equals(true, val is B); -} diff --git a/tests/language_2/constructor/default_factory2_runtime_test.dart b/tests/language_2/constructor/default_factory2_runtime_test.dart deleted file mode 100644 index 18af36845a4..00000000000 --- a/tests/language_2/constructor/default_factory2_runtime_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -// Check type bounds when invoking a redirecting factory method - -abstract class Foo {} - -abstract class IA { - -} - -class A implements IA { - factory A() {} -} - -main() { - -} diff --git a/tests/language_2/constructor/default_factory2_test.dart b/tests/language_2/constructor/default_factory2_test.dart deleted file mode 100644 index cb3de6fc9a9..00000000000 --- a/tests/language_2/constructor/default_factory2_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012, 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 - -// Check type bounds when invoking a redirecting factory method - -abstract class Foo {} - -abstract class IA { - factory IA() = A; - // ^ - // [cfe] The type 'T' doesn't extend 'Foo'. - // ^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS -} - -class A implements IA { - factory A() {} -} - -main() { - var result = new IA(); -} diff --git a/tests/language_2/constructor/default_factory3_test.dart b/tests/language_2/constructor/default_factory3_test.dart deleted file mode 100644 index 000ec16f0ce..00000000000 --- a/tests/language_2/constructor/default_factory3_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012, 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 - -// Check possibly still unresolved upper bounds of default factory class. - -abstract class A { - factory A() = _AImpl; -} - -class Moo extends Foo {} - -class Foo extends Bar {} - -class Bar {} - -class _AImpl implements A { - factory _AImpl() {} -} - -main() { - var result = new A(); -} diff --git a/tests/language_2/constructor/default_factory_library.dart b/tests/language_2/constructor/default_factory_library.dart deleted file mode 100644 index 0b589d7f43a..00000000000 --- a/tests/language_2/constructor/default_factory_library.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2012, 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 - -// Dart test program for testing default factories defined across libraries - -library lib; - -import "default_factory_library_test.dart" as test; - -// References a factory class in another library -abstract class A { - factory A() = test.C.A; - int methodA(); -} diff --git a/tests/language_2/constructor/default_factory_library_test.dart b/tests/language_2/constructor/default_factory_library_test.dart deleted file mode 100644 index 5e84dcc4897..00000000000 --- a/tests/language_2/constructor/default_factory_library_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2012, 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 - -// Dart test program for testing factories defined across libraries - -library test; - -import "package:expect/expect.dart"; -import "default_factory_library.dart" as lib; - -class B implements lib.A, C { - int methodA() { - return 1; - } - - int methodB() { - return 2; - } -} - -abstract class C implements lib.A { - // Referenced from an abstract class in another library - factory C.A() { - return new B(); - } -} - -main() { - dynamic val = new lib.A(); - Expect.equals(true, (val is B)); - Expect.equals(1, val.methodA()); - Expect.equals(2, val.methodB()); -} diff --git a/tests/language_2/constructor/default_factory_runtime_test.dart b/tests/language_2/constructor/default_factory_runtime_test.dart deleted file mode 100644 index c90675371dc..00000000000 --- a/tests/language_2/constructor/default_factory_runtime_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 "package:expect/expect.dart"; - -// Dart test program for testing default factories. - -abstract class Vehicle { - -} - -class Bike implements Vehicle, GoogleOne { - Bike.redOne() {} -} - -abstract class SpaceShip { - factory SpaceShip() = GoogleOne; -} - -class GoogleOne implements SpaceShip { - GoogleOne.internal_() {} - factory GoogleOne() { - return new GoogleOne.internal_(); - } - factory GoogleOne.Vehicle() { - return new Bike.redOne(); - } -} - -main() { - Expect.equals(true, (new Bike.redOne()) is Bike); - Expect.equals(true, (new SpaceShip()) is GoogleOne); - -} diff --git a/tests/language_2/constructor/default_factory_test.dart b/tests/language_2/constructor/default_factory_test.dart deleted file mode 100644 index 04e563208be..00000000000 --- a/tests/language_2/constructor/default_factory_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Dart test program for testing default factories. - -abstract class Vehicle { - factory Vehicle() = GoogleOne.Vehicle; - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE - // [cfe] The constructor function type 'GoogleOne Function()' isn't a subtype of 'Vehicle Function()'. -} - -class Bike implements Vehicle, GoogleOne { - Bike.redOne() {} -} - -abstract class SpaceShip { - factory SpaceShip() = GoogleOne; -} - -class GoogleOne implements SpaceShip { - GoogleOne.internal_() {} - factory GoogleOne() { - return new GoogleOne.internal_(); - } - factory GoogleOne.Vehicle() { - return new Bike.redOne(); - } -} - -main() { - Expect.equals(true, (new Bike.redOne()) is Bike); - Expect.equals(true, (new SpaceShip()) is GoogleOne); - var ensureItsCalled = new Vehicle(); -} diff --git a/tests/language_2/constructor/default_test.dart b/tests/language_2/constructor/default_test.dart deleted file mode 100644 index 90e6b871327..00000000000 --- a/tests/language_2/constructor/default_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// 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 test program for default constructors. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - A() : a = 499; - - var a; -} - -class B extends A { - B() { - Expect.equals(499, a); - } -} - -main() { - new B(); -} diff --git a/tests/language_2/constructor/duplicate_final_test.dart b/tests/language_2/constructor/duplicate_final_test.dart deleted file mode 100644 index 11336f8c7e6..00000000000 --- a/tests/language_2/constructor/duplicate_final_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2014, 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 - -// Check that duplicate initialization of a final field is a runtime error. - -class Class { - final f = 10; - - Class(v) : f = v; //# 01: compile-time error - - Class(this.f); //# 02: compile-time error - - // If a field is initialized multiple times in the initializer - // list, it's a compile time error. - Class(this.f) : f = 0; //# 03: compile-time error -} - -main() { - new Class(5); //# 01: continued - new Class(5); //# 02: continued - new Class(5); //# 03: continued -} diff --git a/tests/language_2/constructor/duplicate_initializers_runtime_test.dart b/tests/language_2/constructor/duplicate_initializers_runtime_test.dart deleted file mode 100644 index c8776a587b4..00000000000 --- a/tests/language_2/constructor/duplicate_initializers_runtime_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. -// Check that initializers are not duplicated - - class Class { - Class(var v) : field_ = v - // Test against duplicate final field initialization in initializing list. - - ; - Class.field(this.field_) - // Test against duplicate final field initialization between initializing - // formals and initializer list. - - ; - // Test against duplicate final field initialization in initializing formals. - Class.two_fields(this.field_ - - ); - final field_; - } - - main() { - new Class(42); - new Class.field(42); - new Class.two_fields(42 - - ); - } diff --git a/tests/language_2/constructor/duplicate_initializers_test.dart b/tests/language_2/constructor/duplicate_initializers_test.dart deleted file mode 100644 index d98d23d3945..00000000000 --- a/tests/language_2/constructor/duplicate_initializers_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// 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. -// Check that initializers are not duplicated - -// @dart = 2.9 - - class Class { - Class(var v) : field_ = v - // Test against duplicate final field initialization in initializing list. - , field_ = 2 - //^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS - // ^ - // [cfe] 'field_' was already initialized by this constructor. - ; - Class.field(this.field_) - // Test against duplicate final field initialization between initializing - // formals and initializer list. - : field_ = 2 - //^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER - // ^ - // [cfe] 'field_' was already initialized by this constructor. - ; - // Test against duplicate final field initialization in initializing formals. - Class.two_fields(this.field_ - , this.field_ - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_FIELD_FORMAL_PARAMETER - // [cfe] 'field_' was already initialized by this constructor. - // ^ - // [cfe] Duplicated parameter name 'field_'. - ); - final field_; - } - - main() { - new Class(42); - new Class.field(42); - new Class.two_fields(42 - , 42 - ); - } diff --git a/tests/language_2/constructor/duplicate_runtime_test.dart b/tests/language_2/constructor/duplicate_runtime_test.dart deleted file mode 100644 index 56a762b50ba..00000000000 --- a/tests/language_2/constructor/duplicate_runtime_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -class Foo { - Foo(); - -} - -main() { - new Foo(); -} diff --git a/tests/language_2/constructor/duplicate_test.dart b/tests/language_2/constructor/duplicate_test.dart deleted file mode 100644 index c234f7213f6..00000000000 --- a/tests/language_2/constructor/duplicate_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// 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 - -class Foo { - Foo(); - Foo(); -//^^^ -// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_CONSTRUCTOR -// [cfe] 'Foo' is already declared in this scope. -} - -main() { - new Foo(); - // ^ - // [cfe] Can't use 'Foo' because it is declared more than once. -} diff --git a/tests/language_2/constructor/evaluation_redirecting_constructor_test.dart b/tests/language_2/constructor/evaluation_redirecting_constructor_test.dart deleted file mode 100644 index 89b03a697f3..00000000000 --- a/tests/language_2/constructor/evaluation_redirecting_constructor_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -int counter = 0; - -class Bar { - Bar() { - counter++; - } -} - -class A { - var _bar = new Bar(); - A() : this._(); - A._() { - () => 42; - } -} - -main() { - new A(); - Expect.equals(1, counter); -} diff --git a/tests/language_2/constructor/example_constructor_test.dart b/tests/language_2/constructor/example_constructor_test.dart deleted file mode 100644 index e069e80af8c..00000000000 --- a/tests/language_2/constructor/example_constructor_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// 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 test for testing order of constructor invocation. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -var trace = ""; - -int rec(int i) { - trace += "$i "; - return i; -} - -class A { - A(int x) : x = rec(4) { - Expect.equals(3, x); // Parameter x - Expect.equals(4, this.x); - rec(5); - } - final int x; -} - -class B extends A { - B(this.a, int y, int z) - : z = rec(1), - y = rec(2), - super(rec(3)) { - rec(6); - } - int a; - int y; - int z; -} - -main() { - var test = new B(rec(0), 0, 0); - Expect.equals(0, test.a); - Expect.equals(4, test.x); - Expect.equals(2, test.y); - Expect.equals(1, test.z); - Expect.equals("0 1 2 3 4 5 6 ", trace); -} diff --git a/tests/language_2/constructor/external_constructor_test.dart b/tests/language_2/constructor/external_constructor_test.dart deleted file mode 100644 index a4bfdba7ab7..00000000000 --- a/tests/language_2/constructor/external_constructor_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2022, 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. - -// Test for external constructors. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - final int field; - - const A(this.field); - external const A.foo(dynamic arg); -} - -class B extends A { - const B(int abc) : super(abc); - B.foo(dynamic arg) : super.foo(arg); -} - -void main() { - Expect.throws(() { - A.foo(42); - }, (e) => e is NoSuchMethodError); - Expect.throws(() { - B.foo(42); - }, (e) => e is NoSuchMethodError); -} diff --git a/tests/language_2/constructor/forwarding_factory_constructor_default_values_test.dart b/tests/language_2/constructor/forwarding_factory_constructor_default_values_test.dart deleted file mode 100644 index b0d57ca26e7..00000000000 --- a/tests/language_2/constructor/forwarding_factory_constructor_default_values_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2014, 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 - -// Regression test for dart2js bug 18257: Properly infer types for forwarding -// factory constructors with optional parameters with default values. - -main() { - A a = new A.a1(); - a.test(); -} - -class A { - final bool condition; - - A({this.condition: true}); - - factory A.a1({condition}) = _A1.boo; - - test() { - if (condition != true) { - throw "FAILED"; - } - } -} - -class _A1 extends A { - _A1.boo({condition: true}) : super(condition: condition); -} diff --git a/tests/language_2/constructor/implicit_super_constructor_call_test.dart b/tests/language_2/constructor/implicit_super_constructor_call_test.dart deleted file mode 100644 index 6247f0c3c9d..00000000000 --- a/tests/language_2/constructor/implicit_super_constructor_call_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2015, 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 - -// This is a regression test for http://dartbug.com/22723. - -import "package:expect/expect.dart"; - -class A { - final x; - - @pragma('dart2js:noInline') - A({this.x: "foo"}) { - Expect.equals("foo", x.toString()); - } -} - -class C extends A { - C(foobar) {} -} - -main() { - var c = new C(499); - Expect.equals("foo", c.x.toString()); -} diff --git a/tests/language_2/constructor/implicit_super_constructor_test.dart b/tests/language_2/constructor/implicit_super_constructor_test.dart deleted file mode 100644 index fe90552d104..00000000000 --- a/tests/language_2/constructor/implicit_super_constructor_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -abstract class A { - int _x = 42; -} - -abstract class B extends A {} - -class C extends B { - C() {} -} - -main() { - // Regression test for https://github.com/dart-lang/sdk/issues/27421 - Expect.equals(new C()._x, 42); -} diff --git a/tests/language_2/constructor/inference_super_constructor_call_test.dart b/tests/language_2/constructor/inference_super_constructor_call_test.dart deleted file mode 100644 index 0d0f73d9e35..00000000000 --- a/tests/language_2/constructor/inference_super_constructor_call_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js's inferrer that used to not propagate -// types given to generative constructors in super constructor calls. - -import "package:expect/expect.dart"; - -class A { - final field; - A.full(this.field); -} - -class B extends A { - // The following super call used to not be analyzed properly. - B.full(field) : super.full(field); -} - -main() { - // Call [A.full] with an int to have the inferrer think [field] is - // always an int. - Expect.equals(84, new A.full(42).field + 42); - Expect.throwsNoSuchMethodError(() => new B.full(null).field + 42,); -} diff --git a/tests/language_2/constructor/initializer_test.dart b/tests/language_2/constructor/initializer_test.dart deleted file mode 100644 index a473d47cc7d..00000000000 --- a/tests/language_2/constructor/initializer_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A { - var _x, _y; - A(x, [y = 10]) - : _x = x++, - _y = y++ { - // Check that value of modified constructor parameters - // is remembered in the constructor body. - Expect.equals(x, _x + 1); - Expect.equals(y, _y + 1); - } -} - -class B extends A { - var _a, _b; - // The super call in the middle of the initializer list conceptually - // forces two super call chains, one for initializer list and a second - // one for the constructor bodies. - B(a, b) - : _a = a++, - _b = b++, - super(a + b++) { - Expect.equals(a, _a + 1); - Expect.equals(b, _b + 2); - Expect.equals(a + (b - 2), _x - 1); - } -} - -main() { - dynamic o = new B(3, 5); - Expect.equals(3, o._a); - Expect.equals(5, o._b); - Expect.equals(10, o._x); - Expect.equals(10, o._y); - o = new A(3); - Expect.equals(3, o._x); - Expect.equals(10, o._y); -} diff --git a/tests/language_2/constructor/missing_const_constructor_test.dart b/tests/language_2/constructor/missing_const_constructor_test.dart deleted file mode 100644 index e5642690fa2..00000000000 --- a/tests/language_2/constructor/missing_const_constructor_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test handling of unknown constructor in const expression. - -class GoodClass { - const GoodClass(); -} - -GoodClass GOOD_CLASS - = const GoodClass() //# 01: ok - = const GoodClass.BAD_NAME() //# 02: compile-time error - = const GoodClass("bad arg") //# 03: compile-time error - ; - -const BadClass BAD_CLASS = const BadClass(); //# 04: compile-time error -BadClass BAD_CLASS = const BadClass(); //# 05: compile-time error - -void main() { - try { - print(GOOD_CLASS); - print(BAD_CLASS); //# 04: continued - print(BAD_CLASS); //# 05: continued - print(const BadClass()); //# 06: compile-time error - } catch (e) {} -} diff --git a/tests/language_2/constructor/multiple_field_assignment_constructor_test.dart b/tests/language_2/constructor/multiple_field_assignment_constructor_test.dart deleted file mode 100644 index 6e762043c46..00000000000 --- a/tests/language_2/constructor/multiple_field_assignment_constructor_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -var a = [null]; - -class A { - var foo; - var bar; - - @pragma('vm:never-inline') - @pragma('dart2js:noInline') - A() { - // Currently defeat inlining by using a closure. - bar = () => 42; - foo = 42; - foo = a[0]; - } -} - -class B { - var foo; - var bar; - - @pragma('vm:never-inline') - @pragma('dart2js:noInline') - B() { - // Currently defeat inlining by using a closure. - bar = () => 42; - foo = 42; - foo = a[0]; - if (false) foo = 42; - } -} - -main() { - // Surround the call to [bar] by allocations of [A] and [B] to - // ensure their constructors get analyzed first. - new A(); - new B(); - bar(); - new A(); - new B(); -} - -@pragma('vm:never-inline') -@pragma('dart2js:noInline') -bar() { - // Currently defeat inlining by using a closure. - Expect.throwsNoSuchMethodError(() => new A().foo + 42); - Expect.throwsNoSuchMethodError(() => new B().foo + 42); -} diff --git a/tests/language_2/constructor/name_clash_lib.dart b/tests/language_2/constructor/name_clash_lib.dart deleted file mode 100644 index f61cef4969d..00000000000 --- a/tests/language_2/constructor/name_clash_lib.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2015, 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 lib; - -var global = 0; - -class A { - A() { - global += 10; - try {} catch (e) {} // no inline - } -} diff --git a/tests/language_2/constructor/name_clash_test.dart b/tests/language_2/constructor/name_clash_test.dart deleted file mode 100644 index 539d48fa899..00000000000 --- a/tests/language_2/constructor/name_clash_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'package:expect/expect.dart'; -import 'name_clash_lib.dart' as lib; - -class A extends lib.A { - A() { - lib.global += 100; - try {} catch (e) {} // no inline - } -} - -main() { - new A(); - Expect.equals(110, lib.global); -} diff --git a/tests/language_2/constructor/name_test.dart b/tests/language_2/constructor/name_test.dart deleted file mode 100644 index 445b38d058d..00000000000 --- a/tests/language_2/constructor/name_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2013, 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 - -class Foo { - Bar.Foo(); //# 01: compile-time error - factory Bar(); //# 02: syntax error - factory Bar.Baz(); //# 03: syntax error -} - -void main() { - new Foo(); - new Foo.Foo(); //# 01: continued - new Foo.Baz(); //# 03: continued -} diff --git a/tests/language_2/constructor/named_arguments_test.dart b/tests/language_2/constructor/named_arguments_test.dart deleted file mode 100644 index 16ba667c8a4..00000000000 --- a/tests/language_2/constructor/named_arguments_test.dart +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2012, 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 test program for default constructors. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -String message; - -foo() { - message += 'foo'; - return 1; -} - -bar() { - message += 'bar'; - return 2; -} - -class X { - var i; - var j; - X({a: 'defa', b: 'defb'}) - : this.i = a, - this.j = b; - X.foo() : this(b: 1, a: 2); - X.bar() - : this( - 1, // //# 01: compile-time error, runtime error - a: 2); - X.baz() : this(a: 1, b: 2); - X.qux() : this(b: 2); - X.hest() : this(); - X.fisk() : this(b: bar(), a: foo()); - X.naebdyr() : this(a: foo(), b: bar()); -} - -test(x, a, b) { - Expect.equals(x.i, a); - Expect.equals(x.j, b); -} - -main() { - test(new X.foo(), 2, 1); - test(new X.bar(), 2, 'defb'); - test(new X.baz(), 1, 2); - test(new X.qux(), 'defa', 2); - test(new X.hest(), 'defa', 'defb'); - - message = ''; - new X.fisk(); - Expect.equals('barfoo', message); - - message = ''; - new X.naebdyr(); - Expect.equals('foobar', message); -} diff --git a/tests/language_2/constructor/named_constructor_test.dart b/tests/language_2/constructor/named_constructor_test.dart deleted file mode 100644 index daeb070a218..00000000000 --- a/tests/language_2/constructor/named_constructor_test.dart +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 2013, 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 named_constructor_test; - -import 'package:expect/expect.dart'; -import 'named_lib.dart' as prefix; - -class Class { - final int value; - Class() : value = 0; - Class.named() : value = 1; -} - -void main() { - Expect.equals(0, new Class().value); - Expect.equals(0, new Class().value); - - Expect.equals(1, new Class.named().value); - Expect.equals(1, new Class.named().value); - // 'Class.named' is not a type: - new Class.named().value; - // ^ - // [cfe] A constructor invocation can't have type arguments after the constructor name. - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR - - // 'Class.named' doesn't fit the grammar syntax T.id: - new Class.named().value; - // ^^^^^ - // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS - // [cfe] A constructor invocation can't have type arguments after the constructor name. - - new prefix.Class().value; - // 'prefix' is not a type: - new prefix.Class().value; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // ^ - // [cfe] Couldn't find constructor 'prefix.Class'. - new prefix.Class().value; - // 'prefix.Class' doesn't fit the grammar syntax T.id: - new prefix.Class().value; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // ^^^^^ - // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS - // [cfe] A constructor invocation can't have type arguments after the constructor name. - // [cfe] Couldn't find constructor 'prefix.Class'. - - new prefix.Class.named().value; - // 'prefix.Class.named' doesn't fit the grammar syntax T.id: - new prefix.Class.named().value; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // ^^^^^ - // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN - // [cfe] Couldn't find constructor 'prefix.Class'. - // [cfe] Expected '(' after this. - - - // 'prefix.Class.named' doesn't fit the grammar syntax T.id: - new prefix.Class.named().value; - // 'prefix.Class.named' doesn't fit the grammar syntax T.id: - new prefix.Class.named().value; - // ^^^^^ - // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS - // [cfe] A constructor invocation can't have type arguments after the constructor name. - - // 'prefix.Class' doesn't fit the grammar syntax T.id: - new prefix.Class.named().value; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // ^^^^^ - // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS - // [cfe] A constructor invocation can't have type arguments after the constructor name. - // [cfe] Couldn't find constructor 'prefix.Class'. - - - // 'prefix.Class.named' doesn't fit the grammar syntax T.id: - new prefix.Class.named().value; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // ^^^^^ - // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN - // [cfe] Couldn't find constructor 'prefix.Class'. - // [cfe] Expected '(' after this. - - - // 'prefix.Class.named' doesn't fit the grammar syntax T.id: - new prefix.Class.named().value; - // ^^^^^ - // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS - // [cfe] A constructor invocation can't have type arguments after the constructor name. - - // 'prefix.Class.named' doesn't fit the grammar syntax T.id: - new prefix.Class.named().value; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // ^^^^^ - // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS - // [cfe] A constructor invocation can't have type arguments after the constructor name. - // [cfe] Couldn't find constructor 'prefix.Class'. -} diff --git a/tests/language_2/constructor/named_lib.dart b/tests/language_2/constructor/named_lib.dart deleted file mode 100644 index dc7ebf440d4..00000000000 --- a/tests/language_2/constructor/named_lib.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2013, 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 named_constructor_lib; - -class Class { - final int value; - Class() : value = 2; - Class.named() : value = 3; -} diff --git a/tests/language_2/constructor/named_runtime_test.dart b/tests/language_2/constructor/named_runtime_test.dart deleted file mode 100644 index 3f47f6c184f..00000000000 --- a/tests/language_2/constructor/named_runtime_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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 named_constructor_test; - -import 'package:expect/expect.dart'; -import 'named_lib.dart' as prefix; - -class Class { - final int value; - Class() : value = 0; - Class.named() : value = 1; -} - -void main() { - Expect.equals(0, new Class().value); - Expect.equals(0, new Class().value); - - Expect.equals(1, new Class.named().value); - Expect.equals(1, new Class.named().value); - // 'Class.named' is not a type: - - // 'Class.named' doesn't fit the grammar syntax T.id: - - - new prefix.Class().value; - // 'prefix' is not a type: - - new prefix.Class().value; - // 'prefix.Class' doesn't fit the grammar syntax T.id: - - - new prefix.Class.named().value; - // 'prefix.Class.named' doesn't fit the grammar syntax T.id: - - // 'prefix.Class.named' doesn't fit the grammar syntax T.id: - new prefix.Class.named().value; - // 'prefix.Class.named' doesn't fit the grammar syntax T.id: - - // 'prefix.Class' doesn't fit the grammar syntax T.id: - - // 'prefix.Class.named' doesn't fit the grammar syntax T.id: - - // 'prefix.Class.named' doesn't fit the grammar syntax T.id: - - // 'prefix.Class.named' doesn't fit the grammar syntax T.id: - -} diff --git a/tests/language_2/constructor/no_such_constructor_runtime_test.dart b/tests/language_2/constructor/no_such_constructor_runtime_test.dart deleted file mode 100644 index 7da3c44b540..00000000000 --- a/tests/language_2/constructor/no_such_constructor_runtime_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -class A { - A(); -} - -main() { - -} diff --git a/tests/language_2/constructor/no_such_constructor_test.dart b/tests/language_2/constructor/no_such_constructor_test.dart deleted file mode 100644 index e8746bee028..00000000000 --- a/tests/language_2/constructor/no_such_constructor_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2013, 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 - -class A { - A(); -} - -main() { - new A(42); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS - // ^^^^ - // [cfe] Too many positional arguments: 0 allowed, but 1 found. -} diff --git a/tests/language_2/constructor/non_const_constructor_without_body_test.dart b/tests/language_2/constructor/non_const_constructor_without_body_test.dart deleted file mode 100644 index e9a07182828..00000000000 --- a/tests/language_2/constructor/non_const_constructor_without_body_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class NonConstConstructorWithoutBodyTest { - int x; - - NonConstConstructorWithoutBodyTest(); - NonConstConstructorWithoutBodyTest.named(); - NonConstConstructorWithoutBodyTest.initializers() : x = 1; - NonConstConstructorWithoutBodyTest.parameters(int x) : x = x + 1; - NonConstConstructorWithoutBodyTest.fieldParameter(int this.x); - NonConstConstructorWithoutBodyTest.redirection() : this.initializers(); - - static testMain() { - Expect.equals(null, new NonConstConstructorWithoutBodyTest().x); - Expect.equals(null, new NonConstConstructorWithoutBodyTest.named().x); - Expect.equals(1, new NonConstConstructorWithoutBodyTest.initializers().x); - Expect.equals(2, new NonConstConstructorWithoutBodyTest.parameters(1).x); - Expect.equals( - 2, new NonConstConstructorWithoutBodyTest.fieldParameter(2).x); - Expect.equals(1, new NonConstConstructorWithoutBodyTest.redirection().x); - } -} - -main() { - NonConstConstructorWithoutBodyTest.testMain(); -} diff --git a/tests/language_2/constructor/non_parameterized_factory2_test.dart b/tests/language_2/constructor/non_parameterized_factory2_test.dart deleted file mode 100644 index 071fde479a4..00000000000 --- a/tests/language_2/constructor/non_parameterized_factory2_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012, 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 - -abstract class Interface { - factory Interface() = Factory; - factory Interface.withArg(T value) = Factory.withArg; -} - -class Factory implements Interface { - factory Factory() { - return null; - } - - factory Factory.withArg(T value) { - return null; - } -} - -main() { - new Interface(); - new Interface.withArg(4); -} diff --git a/tests/language_2/constructor/non_parameterized_factory_test.dart b/tests/language_2/constructor/non_parameterized_factory_test.dart deleted file mode 100644 index f5f1b316c0d..00000000000 --- a/tests/language_2/constructor/non_parameterized_factory_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012, 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 - -abstract class Interface { - factory Interface() = Factory; - factory Interface.withArg(T value) = Factory.withArg; -} - -class Factory implements Interface { - factory Factory() { - return null; - } - - factory Factory.withArg(T value) { - return null; - } -} - -main() { - new Interface(); - new Interface.withArg(4); -} diff --git a/tests/language_2/constructor/redirect2_runtime_test.dart b/tests/language_2/constructor/redirect2_runtime_test.dart deleted file mode 100644 index acfb41cca36..00000000000 --- a/tests/language_2/constructor/redirect2_runtime_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. -// Redirection constructors must not have a function body. - -class A { - var x; - A(this.x) {} - - // Redirecting constructor must not have a function body. - - - // Redirecting constructor must not initialize any fields. - - - // Redirecting constructor must not have initializing formal parameters. - - - // Redirection constructors must not call super constructor. - -} - -main() { - new A(3); - - - - -} diff --git a/tests/language_2/constructor/redirect2_test.dart b/tests/language_2/constructor/redirect2_test.dart deleted file mode 100644 index 39e5632cb5d..00000000000 --- a/tests/language_2/constructor/redirect2_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2012, 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. -// Redirection constructors must not have a function body. - -// @dart = 2.9 - -class A { - var x; - A(this.x) {} - - // Redirecting constructor must not have a function body. - A.illegalBody(x) : this(3) {} - // ^ - // [analyzer] SYNTACTIC_ERROR.REDIRECTING_CONSTRUCTOR_WITH_BODY - // [cfe] Redirecting constructors can't have a body. - - // Redirecting constructor must not initialize any fields. - A.illegalInit() : this(3), x = 5; - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR - // ^ - // [cfe] A redirecting constructor can't have other initializers. - - // Redirecting constructor must not have initializing formal parameters. - A.illegalFormal(this.x) : this(3); - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR - // ^ - // [cfe] A redirecting constructor can't have other initializers. - - // Redirection constructors must not call super constructor. - A.illegalSuper() : this(3), super(3); - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.SUPER_IN_REDIRECTING_CONSTRUCTOR - // [cfe] A redirecting constructor can't have a 'super' initializer. - // ^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS -} - -main() { - new A(3); - new A.illegalBody(10); - new A.illegalInit(); - new A.illegalFormal(10); - new A.illegalSuper(); -} diff --git a/tests/language_2/constructor/redirect_cycle_runtime_test.dart b/tests/language_2/constructor/redirect_cycle_runtime_test.dart deleted file mode 100644 index 50994cd33c3..00000000000 --- a/tests/language_2/constructor/redirect_cycle_runtime_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. -// Redirection constructors must not be cyclic. - -class A { - var x; - A(x) - - ; -} - -main() { - new A(10); -} diff --git a/tests/language_2/constructor/redirect_cycle_test.dart b/tests/language_2/constructor/redirect_cycle_test.dart deleted file mode 100644 index 38b62cf0132..00000000000 --- a/tests/language_2/constructor/redirect_cycle_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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. -// Redirection constructors must not be cyclic. - -// @dart = 2.9 - -class A { - var x; - A(x) - : this(0) - //^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_CONSTRUCTOR_REDIRECT - // [cfe] Redirecting constructors can't be cyclic. - ; -} - -main() { - new A(10); -} diff --git a/tests/language_2/constructor/redirect_indirect_cycle_runtime_test.dart b/tests/language_2/constructor/redirect_indirect_cycle_runtime_test.dart deleted file mode 100644 index d84d2f0c13b..00000000000 --- a/tests/language_2/constructor/redirect_indirect_cycle_runtime_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -class A { - var x; - A(x) : this.named(x, 0); - A.named(x, int y) - // Redirecting constructors must not be cyclic. - - ; -} - -main() { - new A(10); -} diff --git a/tests/language_2/constructor/redirect_indirect_cycle_test.dart b/tests/language_2/constructor/redirect_indirect_cycle_test.dart deleted file mode 100644 index 88c64a87047..00000000000 --- a/tests/language_2/constructor/redirect_indirect_cycle_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// 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 - -class A { - var x; - A(x) : this.named(x, 0); - // ^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_CONSTRUCTOR_REDIRECT - A.named(x, int y) - // Redirecting constructors must not be cyclic. - : this(x + y) - //^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_CONSTRUCTOR_REDIRECT - // [cfe] Redirecting constructors can't be cyclic. - ; -} - -main() { - new A(10); -} diff --git a/tests/language_2/constructor/redirect_runtime_test.dart b/tests/language_2/constructor/redirect_runtime_test.dart deleted file mode 100644 index 57571f530f5..00000000000 --- a/tests/language_2/constructor/redirect_runtime_test.dart +++ /dev/null @@ -1,77 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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 test program for redirection constructors. - -import "package:expect/expect.dart"; - -class A { - var x; - A(this.x) {} - A.named(x, int y) : this(x + y); - A.named2(int x, int y, z) : this.named(staticFun(x, y), z); - - // The following is a bit tricky. It is a compile-time error to - // refer to this (implicitly or explicitly) from an initializer. - // When we remove the line with moreStaticFun, staticFun is really a - // static function and it is legal to call it. This is what will - // happen in the /none version of this test. However, in /01, - // staticFun isn't really a static function and should cause a - // compile-time error. - static - - int staticFun(int v1, int v2) { - return v1 * v2; - } -} - -class B extends A { - B(y) : super(y + 1) {} - B.named(y) : super.named(y, y + 1) {} -} - -class C { - final x; - const C(this.x); - const C.named(x, int y) : this(x + y); -} - -class D extends C { - const D(y) : super(y + 1); - const D.named(y) : super.named(y, y + 1); -} - -class ConstructorRedirectTest { - static testMain() { - var a = new A(499); - Expect.equals(499, a.x); - a = new A.named(349, 499); - Expect.equals(349 + 499, a.x); - a = new A.named2(11, 42, 99); - Expect.equals(11 * 42 + 99, a.x); - - var b = new B(498); - Expect.equals(499, b.x); - b = new B.named(249); - Expect.equals(499, b.x); - - C c = const C(499); - Expect.equals(499, c.x); - c = const C.named(249, 250); - Expect.equals(499, c.x); - - D d = const D(498); - Expect.equals(499, d.x); - d = const D.named(249); - Expect.equals(499, d.x); - } -} - -main() { - ConstructorRedirectTest.testMain(); -} diff --git a/tests/language_2/constructor/redirect_test.dart b/tests/language_2/constructor/redirect_test.dart deleted file mode 100644 index cc4a63ad029..00000000000 --- a/tests/language_2/constructor/redirect_test.dart +++ /dev/null @@ -1,77 +0,0 @@ -// 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 test program for redirection constructors. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - var x; - A(this.x) {} - A.named(x, int y) : this(x + y); - A.named2(int x, int y, z) : this.named(staticFun(x, y), z); - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER - // [cfe] Can't access 'this' in a field initializer to read 'staticFun'. - - // The following is a bit tricky. It is a compile-time error to - // refer to this (implicitly or explicitly) from an initializer. - // When we remove the line with moreStaticFun, staticFun is really a - // static function and it is legal to call it. This is what will - // happen in the /none version of this test. However, in /01, - // staticFun isn't really a static function and should cause a - // compile-time error. - static - moreStaticFun() {} - int staticFun(int v1, int v2) { - return v1 * v2; - } -} - -class B extends A { - B(y) : super(y + 1) {} - B.named(y) : super.named(y, y + 1) {} -} - -class C { - final x; - const C(this.x); - const C.named(x, int y) : this(x + y); -} - -class D extends C { - const D(y) : super(y + 1); - const D.named(y) : super.named(y, y + 1); -} - -class ConstructorRedirectTest { - static testMain() { - var a = new A(499); - Expect.equals(499, a.x); - a = new A.named(349, 499); - Expect.equals(349 + 499, a.x); - a = new A.named2(11, 42, 99); - Expect.equals(11 * 42 + 99, a.x); - - var b = new B(498); - Expect.equals(499, b.x); - b = new B.named(249); - Expect.equals(499, b.x); - - C c = const C(499); - Expect.equals(499, c.x); - c = const C.named(249, 250); - Expect.equals(499, c.x); - - D d = const D(498); - Expect.equals(499, d.x); - d = const D.named(249); - Expect.equals(499, d.x); - } -} - -main() { - ConstructorRedirectTest.testMain(); -} diff --git a/tests/language_2/constructor/reference_runtime_10_test.dart b/tests/language_2/constructor/reference_runtime_10_test.dart deleted file mode 100644 index 4003032bee3..00000000000 --- a/tests/language_2/constructor/reference_runtime_10_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -class Foo { - const Foo(); - const Foo.bar(); - const Foo.baz(); -} - -main() { - - - - - - - - - - - - - - - - - - - - - - Foo.bar(); - - - - - - - -} diff --git a/tests/language_2/constructor/reference_runtime_11_test.dart b/tests/language_2/constructor/reference_runtime_11_test.dart deleted file mode 100644 index 0f0acb0ec54..00000000000 --- a/tests/language_2/constructor/reference_runtime_11_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -class Foo { - const Foo(); - const Foo.bar(); - const Foo.baz(); -} - -main() { - - - - - - - - - - - - - - - - - - - - - - - - Foo(); - - - - - -} diff --git a/tests/language_2/constructor/reference_runtime_12_test.dart b/tests/language_2/constructor/reference_runtime_12_test.dart deleted file mode 100644 index 9e21d2f2033..00000000000 --- a/tests/language_2/constructor/reference_runtime_12_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -class Foo { - const Foo(); - const Foo.bar(); - const Foo.baz(); -} - -main() { - - - - - - - - - - - - - - - - - - - - - - - - - Foo.bar(); - - - - -} diff --git a/tests/language_2/constructor/reference_runtime_1_test.dart b/tests/language_2/constructor/reference_runtime_1_test.dart deleted file mode 100644 index 2223b1cd0f2..00000000000 --- a/tests/language_2/constructor/reference_runtime_1_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -class Foo { - const Foo(); - const Foo.bar(); - const Foo.baz(); -} - -main() { - new Foo(); - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} diff --git a/tests/language_2/constructor/reference_runtime_2_test.dart b/tests/language_2/constructor/reference_runtime_2_test.dart deleted file mode 100644 index 4738ac29825..00000000000 --- a/tests/language_2/constructor/reference_runtime_2_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -class Foo { - const Foo(); - const Foo.bar(); - const Foo.baz(); -} - -main() { - - new Foo.bar(); - - - - - - - - - - - - - - - - - - - - - - - - - - - -} diff --git a/tests/language_2/constructor/reference_runtime_3_test.dart b/tests/language_2/constructor/reference_runtime_3_test.dart deleted file mode 100644 index 09e2ef8c864..00000000000 --- a/tests/language_2/constructor/reference_runtime_3_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -class Foo { - const Foo(); - const Foo.bar(); - const Foo.baz(); -} - -main() { - - - - new Foo(); - - - - - - - - - - - - - - - - - - - - - - - - - -} diff --git a/tests/language_2/constructor/reference_runtime_4_test.dart b/tests/language_2/constructor/reference_runtime_4_test.dart deleted file mode 100644 index 9ea2ba01afc..00000000000 --- a/tests/language_2/constructor/reference_runtime_4_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -class Foo { - const Foo(); - const Foo.bar(); - const Foo.baz(); -} - -main() { - - - - - new Foo.bar(); - - - - - - - - - - - - - - - - - - - - - - - - -} diff --git a/tests/language_2/constructor/reference_runtime_5_test.dart b/tests/language_2/constructor/reference_runtime_5_test.dart deleted file mode 100644 index 0961239c149..00000000000 --- a/tests/language_2/constructor/reference_runtime_5_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -class Foo { - const Foo(); - const Foo.bar(); - const Foo.baz(); -} - -main() { - - - - - - - - - - - const Foo(); - - - - - - - - - - - - - - - - - - -} diff --git a/tests/language_2/constructor/reference_runtime_6_test.dart b/tests/language_2/constructor/reference_runtime_6_test.dart deleted file mode 100644 index 732dc9837cb..00000000000 --- a/tests/language_2/constructor/reference_runtime_6_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -class Foo { - const Foo(); - const Foo.bar(); - const Foo.baz(); -} - -main() { - - - - - - - - - - - - const Foo.bar(); - - - - - - - - - - - - - - - - - -} diff --git a/tests/language_2/constructor/reference_runtime_7_test.dart b/tests/language_2/constructor/reference_runtime_7_test.dart deleted file mode 100644 index 9cff394b83e..00000000000 --- a/tests/language_2/constructor/reference_runtime_7_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -class Foo { - const Foo(); - const Foo.bar(); - const Foo.baz(); -} - -main() { - - - - - - - - - - - - - - const Foo(); - - - - - - - - - - - - - - - -} diff --git a/tests/language_2/constructor/reference_runtime_8_test.dart b/tests/language_2/constructor/reference_runtime_8_test.dart deleted file mode 100644 index ab6a55e997f..00000000000 --- a/tests/language_2/constructor/reference_runtime_8_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -class Foo { - const Foo(); - const Foo.bar(); - const Foo.baz(); -} - -main() { - - - - - - - - - - - - - - - const Foo.bar(); - - - - - - - - - - - - - - -} diff --git a/tests/language_2/constructor/reference_runtime_9_test.dart b/tests/language_2/constructor/reference_runtime_9_test.dart deleted file mode 100644 index e9dd1cd0315..00000000000 --- a/tests/language_2/constructor/reference_runtime_9_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -class Foo { - const Foo(); - const Foo.bar(); - const Foo.baz(); -} - -main() { - - - - - - - - - - - - - - - - - - - - - Foo(); - - - - - - - - -} diff --git a/tests/language_2/constructor/reference_runtime_test.dart b/tests/language_2/constructor/reference_runtime_test.dart deleted file mode 100644 index cd35748cb9b..00000000000 --- a/tests/language_2/constructor/reference_runtime_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -class Foo { - const Foo(); - const Foo.bar(); - const Foo.baz(); -} - -main() { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -} diff --git a/tests/language_2/constructor/reference_test.dart b/tests/language_2/constructor/reference_test.dart deleted file mode 100644 index 72d1b40cb03..00000000000 --- a/tests/language_2/constructor/reference_test.dart +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) 2018, 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 - -class Foo { - const Foo(); - const Foo.bar(); - const Foo.baz(); -} - -main() { - new Foo(); - new Foo.bar(); - new Foo.bar.baz(); - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // ^ - // [cfe] Couldn't find constructor 'Foo.bar.baz'. - new Foo(); - new Foo.bar(); - new Foo.bar.baz(); - // ^^^ - // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN - // [cfe] Expected '(' after this. - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD - // [cfe] The method 'baz' isn't defined for the class 'Foo'. - new Foo.bar(); - // ^ - // [cfe] A constructor invocation can't have type arguments after the constructor name. - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR - new Foo.bar.baz(); - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // ^ - // [cfe] Couldn't find constructor 'Foo.bar.baz'. - new Foo.bar.baz(); - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // ^^^ - // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS - // [cfe] A constructor invocation can't have type arguments after the constructor name. - // [cfe] Couldn't find constructor 'Foo.bar.baz'. - - const Foo(); - const Foo.bar(); - const Foo.bar.baz(); - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // ^ - // [cfe] Couldn't find constructor 'Foo.bar.baz'. - const Foo(); - const Foo.bar(); - const Foo.bar.baz(); - // ^^^ - // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN - // [cfe] Expected '(' after this. - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD - // [cfe] The method 'baz' isn't defined for the class 'Foo'. - const Foo.bar(); - // ^ - // [cfe] A constructor invocation can't have type arguments after the constructor name. - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR - const Foo.bar.baz(); - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // ^ - // [cfe] Couldn't find constructor 'Foo.bar.baz'. - const Foo.bar.baz(); - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // ^^^ - // [analyzer] SYNTACTIC_ERROR.CONSTRUCTOR_WITH_TYPE_ARGUMENTS - // [cfe] A constructor invocation can't have type arguments after the constructor name. - // [cfe] Couldn't find constructor 'Foo.bar.baz'. - - Foo(); - Foo.bar(); - Foo.bar.baz(); -// ^ -// [cfe] Member not found: 'bar'. -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD - Foo(); - Foo.bar(); - Foo.bar.baz(); - // ^^^^^ - // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED - // [cfe] The 'constructor-tearoffs' language feature is disabled for this library. - // ^ - // [cfe] Member not found: 'bar'. - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD - Foo.bar(); - // ^ - // [cfe] A constructor invocation can't have type arguments after the constructor name. - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR - Foo.bar.baz(); -// ^ -// [cfe] Couldn't find constructor 'bar'. -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR - Foo.bar.baz(); -// ^ -// [cfe] Member not found: 'bar'. -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD -} diff --git a/tests/language_2/constructor/return_runtime_test.dart b/tests/language_2/constructor/return_runtime_test.dart deleted file mode 100644 index 6e2f7d4d480..00000000000 --- a/tests/language_2/constructor/return_runtime_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -import "package:expect/expect.dart"; - -// Dart spec 0.03, section 11.10 - generative constructors can only have return -// statements in the form 'return;'. -class A { - int x; - A(this.x) { - return; - } - A.test1(this.x) { - - } - A.test2(this.x) { - - } - int foo(int y) => x + y; -} - -class B { - -} - -class C { - int value; - -} - -class D { - int value; - -} - -main() { - Expect.equals((new A(1)).foo(10), 11); - Expect.equals((new A.test1(1)).foo(10), 11); - Expect.equals((new A.test2(1)).foo(10), 11); - new B(); - new C(); - new D(); -} diff --git a/tests/language_2/constructor/return_test.dart b/tests/language_2/constructor/return_test.dart deleted file mode 100644 index 9a57fb1cfa6..00000000000 --- a/tests/language_2/constructor/return_test.dart +++ /dev/null @@ -1,66 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Dart spec 0.03, section 11.10 - generative constructors can only have return -// statements in the form 'return;'. -class A { - int x; - A(this.x) { - return; - } - A.test1(this.x) { - return this; -// ^ -// [cfe] Constructors can't have a return type. -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.RETURN_IN_GENERATIVE_CONSTRUCTOR - } - A.test2(this.x) { - return null; -// ^ -// [cfe] Constructors can't have a return type. -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.RETURN_IN_GENERATIVE_CONSTRUCTOR - } - int foo(int y) => x + y; -} - -class B { - B() => null; - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_IN_GENERATIVE_CONSTRUCTOR - // ^ - // [cfe] Constructors can't have a return type. -} - -class C { - int value; - C() : value = 1 { return null; } - // ^ - // [cfe] Constructors can't have a return type. - // ^^^^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_IN_GENERATIVE_CONSTRUCTOR -} - -class D { - int value; - D(): value = 1 => null; - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_IN_GENERATIVE_CONSTRUCTOR - // ^ - // [cfe] Constructors can't have a return type. -} - -main() { - Expect.equals((new A(1)).foo(10), 11); - Expect.equals((new A.test1(1)).foo(10), 11); - Expect.equals((new A.test2(1)).foo(10), 11); - new B(); - new C(); - new D(); -} diff --git a/tests/language_2/constructor/setter_test.dart b/tests/language_2/constructor/setter_test.dart deleted file mode 100644 index a6f5d42d448..00000000000 --- a/tests/language_2/constructor/setter_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// 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. -// Test that setters are not invokable in the initializer list. - -// @dart = 2.9 - -class A { - A() : a = 499; - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INITIALIZER_FOR_NON_EXISTENT_FIELD - // [cfe] 'a' isn't an instance field of this class. - - set a(val) {} -} - -main() { - new A(); -} diff --git a/tests/language_2/constructor/type_parameter_runtime_test.dart b/tests/language_2/constructor/type_parameter_runtime_test.dart deleted file mode 100644 index 95328834bfe..00000000000 --- a/tests/language_2/constructor/type_parameter_runtime_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -class Foo { - -} - -main() { - new Foo(); -} diff --git a/tests/language_2/constructor/type_parameter_test.dart b/tests/language_2/constructor/type_parameter_test.dart deleted file mode 100644 index 83bc17b4d8b..00000000000 --- a/tests/language_2/constructor/type_parameter_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2018, 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 - -class Foo { - Foo() {} - // ^^^ - // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_CONSTRUCTOR - // [cfe] Constructors can't have type parameters. -} - -main() { - new Foo(); -} diff --git a/tests/language_2/constructor/unresolved_default_constructor_test.dart b/tests/language_2/constructor/unresolved_default_constructor_test.dart deleted file mode 100644 index 11a019f23b0..00000000000 --- a/tests/language_2/constructor/unresolved_default_constructor_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2014, 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 - -// Test unresolved default constructor calls cause compilation errors. - -import 'package:expect/expect.dart'; - -class A { - A.named(); - static method() {} -} - -main() { - A.method(); - Expect.throws(() => new A()); - // ^ - // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT - // [cfe] Couldn't find constructor 'A'. -} diff --git a/tests/language_2/constructor/unresolved_default_runtime_test.dart b/tests/language_2/constructor/unresolved_default_runtime_test.dart deleted file mode 100644 index bceb7eefb65..00000000000 --- a/tests/language_2/constructor/unresolved_default_runtime_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -// Test unresolved default constructor calls cause compilation errors. - -import 'package:expect/expect.dart'; - -class A { - A.named(); - static method() {} -} - -main() { - A.method(); - -} diff --git a/tests/language_2/constructor/unresolved_in_factory_test.dart b/tests/language_2/constructor/unresolved_in_factory_test.dart deleted file mode 100644 index d90c486c5e2..00000000000 --- a/tests/language_2/constructor/unresolved_in_factory_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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 - -// Test that an unresolved method call in a factory is a compile error. - -class A { - factory A() { - foo(); -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD -// [cfe] Method not found: 'foo'. - } -} - -main() { - new A(); -} diff --git a/tests/language_2/constructor/with_mixin_test.dart b/tests/language_2/constructor/with_mixin_test.dart deleted file mode 100644 index 02af9e96700..00000000000 --- a/tests/language_2/constructor/with_mixin_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2015, 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 - -// Test super constructor invocation with mixins. -// Regression test for issue dartbug.com/22604 - -import "package:expect/expect.dart"; - -var a_count = 0; -var b_count = 0; - -class A { - final int x; - A(int this.x) { - a_count++; - } -} - -class I {} - -class B extends A with I { - int y; - - B(int xx) - : y = 13, - super(xx) { - b_count++; - } -} - -void main() { - var b = new B(17); - Expect.equals(1, a_count); - Expect.equals(1, b_count); -} diff --git a/tests/language_2/constructor/with_type_parameters_test.dart b/tests/language_2/constructor/with_type_parameters_test.dart deleted file mode 100644 index 25d495de209..00000000000 --- a/tests/language_2/constructor/with_type_parameters_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2018, 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 - -class Bar { - Bar() {} //# 01: ok - Bar.boo() {} //# 02: ok - Bar() {} //# 03: compile-time error - Bar.boo() {} //# 04: syntax error - Bar.boo() {} //# 05: syntax error - Bar.boo.baz() {} //# 06: syntax error - - Bar(); //# 07: ok - Bar.boo(); //# 08: ok - Bar(); //# 09: compile-time error - Bar.boo(); //# 10: syntax error - Bar.boo(); //# 11: syntax error - Bar.boo.baz(); //# 12: syntax error - - const Bar(); //# 13: ok - const Bar.boo(); //# 14: ok - const Bar(); //# 15: syntax error - const Bar.boo(); //# 16: syntax error - const Bar.boo(); //# 17: syntax error - const Bar.boo.baz(); //# 18: syntax error -} - -main() {} diff --git a/tests/language_2/control_flow_collections/await_for_inference_test.dart b/tests/language_2/control_flow_collections/await_for_inference_test.dart deleted file mode 100644 index 56959a1a2dd..00000000000 --- a/tests/language_2/control_flow_collections/await_for_inference_test.dart +++ /dev/null @@ -1,112 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Test how await for interacts with inference. -import "package:async_helper/async_helper.dart"; -import 'package:expect/expect.dart'; - -import 'utils.dart'; - -Stream stream() => Stream.fromIterable([1]); - -void main() { - asyncTest(() async { - await testBottomUpInference(); - await testLoopVariableInference(); - await testTopDownInference(); - }); -} - -Future testBottomUpInference() async { - // Lists. - Expect.type>([await for (var i in stream()) 1]); - Expect.type>( - [await for (var i in stream()) 1, await for (var i in stream()) 2]); - Expect.type>( - [await for (var i in stream()) 1, await for (var i in stream()) 0.2]); - Expect.type>([await for (var i in stream()) 1, 2]); - Expect.type>([await for (var i in stream()) 1, 0.2]); - Expect.type>([await for (var i in stream()) ...[]]); - Expect.type>([await for (var i in stream()) ...[]]); - - // Maps. - Expect.type>({await for (var i in stream()) 1: 1}); - Expect.type>( - {await for (var i in stream()) 1: 1, await for (var i in stream()) 2: 2}); - Expect.type>({ - await for (var i in stream()) 1: 0.1, - await for (var i in stream()) 0.2: 2 - }); - Expect.type>({await for (var i in stream()) 1: 1, 2: 2}); - Expect.type>({await for (var i in stream()) 1: 0.1, 0.2: 2}); - Expect.type>({await for (var i in stream()) ...{}}); - Expect.type>({await for (var i in stream()) ...{}}); - - // Sets. - Expect.type>({await for (var i in stream()) 1}); - Expect.type>( - {await for (var i in stream()) 1, await for (var i in stream()) 2}); - Expect.type>( - {await for (var i in stream()) 1, await for (var i in stream()) 0.2}); - Expect.type>({await for (var i in stream()) 1, 2}); - Expect.type>({await for (var i in stream()) 1, 0.2}); - Expect.type>({await for (var i in stream()) ...[]}); - Expect.type>({await for (var i in stream()) ...[]}); - - // If a nested iterable's type is dynamic, the element type is dynamic. - Expect.type>( - [1, await for (var i in stream()) ...([] as dynamic)]); - Expect.type>( - {1, await for (var i in stream()) ...([] as dynamic)}); - - // If a nested maps's type is dynamic, the key and value types are dynamic. - Expect.type>( - {1: 1, await for (var i in stream()) ...({} as dynamic)}); -} - -Future testLoopVariableInference() async { - // Infers loop variable from stream. - Expect.type>([await for (var i in stream()) i]); - Expect.type>( - [await for (var i in stream()) i.toRadixString(10)]); - - // Loop variable type is pushed into stream. - Expect.listEquals([1], [await for (int i in expectIntStream([1])) i]); -} - -Future testTopDownInference() async { - // Lists. - - // The context element type is pushed into the body. - Expect.listEquals([1], - [await for (var i in stream()) expectInt(1)]); - - // Bottom up-inference from elements is not pushed back down into the body. - Expect.listEquals([1, 2], - [1, await for (var i in stream()) expectDynamic(2)]); - - // Maps. - - // The context element type is pushed into the body. - Expect.mapEquals({1: "s"}, { - await for (var i in stream()) expectInt(1): expectString("s") - }); - - // Bottom up-inference from elements is not pushed back down into the body. - Expect.mapEquals({1: "s", 2: "t"}, { - 1: "s", - await for (var i in stream()) expectDynamic(2): expectDynamic("t") - }); - - // Sets. - - // The context element type is pushed into the body. - Expect.setEquals({1}, {await for (var i in stream()) expectInt(1)}); - - // Bottom up-inference from elements is not pushed back down into the body. - Expect.setEquals({1, 2}, - {1, await for (var i in stream()) expectDynamic(2)}); -} diff --git a/tests/language_2/control_flow_collections/await_for_null_test.dart b/tests/language_2/control_flow_collections/await_for_null_test.dart deleted file mode 100644 index 482cbffb903..00000000000 --- a/tests/language_2/control_flow_collections/await_for_null_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Test that a null stream expression produces a runtime error. -import 'package:async_helper/async_helper.dart'; - -void main() { - asyncTest(() async { - // Null stream. - Stream nullStream = null; - asyncExpectThrows(() async { - [await for (var i in nullStream) 1]; - }()); - asyncExpectThrows(() async { - {await for (var i in nullStream) 1: 1}; - }()); - asyncExpectThrows(() async { - {await for (var i in nullStream) 1}; - }()); - }); -} diff --git a/tests/language_2/control_flow_collections/await_for_syntax_error_test.dart b/tests/language_2/control_flow_collections/await_for_syntax_error_test.dart deleted file mode 100644 index 6da051a9eb7..00000000000 --- a/tests/language_2/control_flow_collections/await_for_syntax_error_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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. - -// @dart = 2.9 - -void main() { - // Use await for in non-async function. - var _ = [await for (var i in Stream.empty()) i]; //# 01: compile-time error - - () async { - // Use await for variable out of scope. - var _ = [await for (var i in Stream.empty()) 1, i]; //# 02: compile-time error - - // Use await for variable in own initializer. - var _ = [await for (var i in Stream.fromIterable([i])) 1]; //# 03: compile-time error - }(); -} diff --git a/tests/language_2/control_flow_collections/await_for_test.dart b/tests/language_2/control_flow_collections/await_for_test.dart deleted file mode 100644 index d6611433c7c..00000000000 --- a/tests/language_2/control_flow_collections/await_for_test.dart +++ /dev/null @@ -1,362 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:async_helper/async_helper.dart'; -import 'package:expect/expect.dart'; - -import 'utils.dart'; - -final list = [1, 2, 3, 4]; -final map = {1: 1, 2: 2, 3: 3, 4: 4}; -final set = {1, 2, 3, 4}; - -Stream stream(List values) => Stream.fromIterable(values); -Stream numStream(List values) => Stream.fromIterable(values); - -void main() { - asyncTest(() async { - await testList(); - await testMap(); - await testSet(); - await testDuplicateKeys(); - await testKeyOrder(); - await testRuntimeErrors(); - }); -} - -Future testList() async { - // Only await for. - Expect.listEquals(list, [await for (var i in stream(list)) i]); - - // Await for at beginning. - Expect.listEquals(list, [ - await for (var i in stream([1, 2])) i, - 3, - 4 - ]); - - // Await for in middle. - Expect.listEquals(list, [ - 1, - await for (var i in stream([2, 3])) i, - 4 - ]); - - // Await for at end. - Expect.listEquals(list, [ - 1, - 2, - await for (var i in stream([3, 4])) i - ]); - - // Empty await for. - Expect.listEquals(list, [1, 2, await for (var i in stream([])) i, 3, 4]); - - // Multiple await fors. - Expect.listEquals(list, [ - await for (var i in stream([1])) i, - 2, - await for (var i in stream([3, 4])) i - ]); - - // Spread inside await for. - Expect.listEquals(list, [ - await for (var i in stream([0, 2])) ...[1 + i, 2 + i] - ]); - - // If inside await for. - Expect.listEquals(list, [ - await for (var i in stream([1, 9, 2, 3, 9, 4])) - if (i != 9) i - ]); - - // Else inside await for. - Expect.listEquals(list, [ - await for (var i in stream([1, -2, 3, -4])) - if (i < 0) -i else i - ]); - - // For inside await for. - Expect.listEquals(list, [ - await for (var i in stream([0, 2])) - for (var j = 1; j <= 2; j++) i + j - ]); - - // Does not flatten nested collection literal. - Expect.listEquals( - [1], - [ - await for (var i in stream([1])) [i] - ].first); - Expect.mapEquals( - {1: 1}, - [ - await for (var i in stream([1])) {i: i} - ].first); - Expect.setEquals( - {1}, - [ - await for (var i in stream([1])) {i} - ].first); - - // Downcast stream. - Object obj = stream([1, 2, 3, 4]); - Expect.listEquals(list, [await for (var n in obj) n]); - - // Downcast variable. - Expect.listEquals(list, [ - await for (int n in numStream([1, 2, 3, 4])) n - ]); - - // Downcast element. - Expect.listEquals(list, [ - await for (num n in numStream([1, 2, 3, 4])) n - ]); -} - -Future testMap() async { - // Only for. - Expect.mapEquals(map, {await for (var i in stream(list)) i: i}); - - // Await for at beginning. - Expect.mapEquals(map, { - await for (var i in stream([1, 2])) i: i, - 3: 3, - 4: 4 - }); - - // Await for in middle. - Expect.mapEquals(map, { - 1: 1, - await for (var i in stream([2, 3])) i: i, - 4: 4 - }); - - // Await for at end. - Expect.mapEquals(map, { - 1: 1, - 2: 2, - await for (var i in stream([3, 4])) i: i - }); - - // Empty await for. - Expect.mapEquals(map, - {1: 1, await for (var i in stream([])) i: i, 2: 2, 3: 3, 4: 4}); - - // Multiple await fors. - Expect.mapEquals(map, { - await for (var i in stream([1])) i: i, - 2: 2, - await for (var i in stream([3, 4])) i: i - }); - - // Spread inside await for. - Expect.mapEquals(map, { - await for (var i in stream([0, 2])) ...{ - 1 + i: 1 + i, - 2 + i: 2 + i - } - }); - - // If inside await for. - Expect.mapEquals(map, { - await for (var i in stream([1, 9, 2, 3, 9, 4])) - if (i != 9) i: i - }); - - // Else inside await for. - Expect.mapEquals(map, { - await for (var i in stream([1, -2, 3, -4])) - if (i < 0) -i: -i else i: i - }); - - // For inside await for. - Expect.mapEquals(map, { - await for (var i in stream([0, 2])) - for (var j = 1; j <= 2; j++) i + j: i + j - }); - - // Downcast stream. - Object obj = stream([1, 2, 3, 4]); - Expect.mapEquals(map, {await for (var n in obj) n: n}); - - // Downcast variable. - Expect.mapEquals(map, { - await for (int n in numStream([1, 2, 3, 4])) n: n - }); - - // Downcast element. - Expect.mapEquals(map, { - await for (num n in numStream([1, 2, 3, 4])) n: n - }); -} - -Future testSet() async { - // Only await for. - Expect.setEquals(set, {await for (var i in stream(list)) i}); - - // Await for at beginning. - Expect.setEquals(set, { - await for (var i in stream([1, 2])) i, - 3, - 4 - }); - - // Await for in middle. - Expect.setEquals(set, { - 1, - await for (var i in stream([2, 3])) i, - 4 - }); - - // Await for at end. - Expect.setEquals(set, { - 1, - 2, - await for (var i in stream([3, 4])) i - }); - - // Empty await for. - Expect.setEquals(set, {1, await for (var i in stream([])) i, 2, 3, 4}); - - // Multiple await fors. - Expect.setEquals(set, { - await for (var i in stream([1])) i, - 2, - await for (var i in stream([3, 4])) i - }); - - // Spread inside await for. - Expect.setEquals(set, { - await for (var i in stream([0, 2])) ...[1 + i, 2 + i] - }); - - // If inside await for. - Expect.setEquals(set, { - await for (var i in stream([1, 9, 2, 3, 9, 4])) - if (i != 9) i - }); - - // Else inside await for. - Expect.setEquals(set, { - await for (var i in stream([1, -2, 3, -4])) - if (i < 0) -i else i - }); - - // For inside await for. - Expect.setEquals(set, { - await for (var i in stream([0, 2])) - for (var j = 1; j <= 2; j++) i + j - }); - - // Does not flatten nested collection literal. - Expect.listEquals( - [1], - { - await for (var i in stream([1])) [i] - }.first); - Expect.mapEquals( - {1: 1}, - { - await for (var i in stream([1])) {i: i} - }.first); - Expect.setEquals( - {1}, - { - await for (var i in stream([1])) {i} - }.first); - - // Downcast stream. - Object obj = stream([1, 2, 3, 4]); - Expect.setEquals(set, {await for (var n in obj) n}); - - // Downcast variable. - Expect.setEquals(set, { - await for (int n in numStream([1, 2, 3, 4])) n - }); - - // Downcast element. - Expect.setEquals(set, { - await for (num n in numStream([1, 2, 3, 4])) n - }); -} - -Future testDuplicateKeys() async { - Expect.mapEquals(map, { - 1: 1, - await for (var i in stream([1, 2, 3])) i: i, - await for (var i in stream([2, 3])) i: i, - 3: 3, - 4: 4 - }); - Expect.setEquals(set, { - 1, - await for (var i in stream([1, 2, 3])) i, - await for (var i in stream([2, 3])) i, - 3, - 4 - }); -} - -Future testKeyOrder() async { - // First equal key wins. - var e1a = Equality(1, "a"); - var e1b = Equality(1, "b"); - var e2a = Equality(2, "a"); - var e2b = Equality(2, "b"); - var keys = [e1b, e2a, e2b]; - var values = [2, 3, 4]; - - var map = { - e1a: 1, - await for (var i in stream([0, 1, 2])) keys[i]: values[i] - }; - Expect.equals("1:a,2:a", map.keys.join(",")); - Expect.equals("2,4", map.values.join(",")); - - var set = { - e1a, - await for (var i in stream([0, 1, 2])) keys[i] - }; - Expect.equals("1:a,2:a", set.join(",")); -} - -Future testRuntimeErrors() async { - // Cast variable. - dynamic nonStream = 3; - asyncExpectThrows(() async { - [await for (int i in nonStream) 1]; - }()); - asyncExpectThrows(() async { - {await for (int i in nonStream) 1: 1}; - }()); - asyncExpectThrows(() async { - {await for (int i in nonStream) 1}; - }()); - - // Wrong element type. - dynamic nonInt = "string"; - asyncExpectThrows(() async { - [ - await for (var i in stream([1])) nonInt - ]; - }()); - asyncExpectThrows(() async { - { - await for (var i in stream([1])) nonInt: 1 - }; - }()); - asyncExpectThrows(() async { - { - await for (var i in stream([1])) 1: nonInt - }; - }()); - asyncExpectThrows(() async { - { - await for (var i in stream([1])) nonInt - }; - }()); -} diff --git a/tests/language_2/control_flow_collections/await_for_type_error_test.dart b/tests/language_2/control_flow_collections/await_for_type_error_test.dart deleted file mode 100644 index ef99194393d..00000000000 --- a/tests/language_2/control_flow_collections/await_for_type_error_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// 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. - -// @dart = 2.9 - -void main() { - () async { - // Non-Stream type. - int nonStream = 3; - var _ = [await for (var i in nonStream) 1]; //# 01: compile-time error - var _ = {await for (var i in nonStream) 1: 1}; //# 02: compile-time error - var _ = {await for (var i in nonStream) 1}; //# 03: compile-time error - - // Wrong element type. - Stream s = Stream.fromIterable(["s"]); - var _ = [await for (int i in s) 1]; //# 07: compile-time error - var _ = {await for (int i in s) 1: 1}; //# 08: compile-time error - var _ = {await for (int i in s) 1}; //# 09: compile-time error - - // Wrong body element type. - var _ = [await for (var i in s) "s"]; //# 10: compile-time error - var _ = {await for (var i in s) "s": 1}; //# 11: compile-time error - var _ = {await for (var i in s) 1: "s"}; //# 12: compile-time error - var _ = {await for (var i in s) "s"}; //# 13: compile-time error - }(); -} diff --git a/tests/language_2/control_flow_collections/for_await_test.dart b/tests/language_2/control_flow_collections/for_await_test.dart deleted file mode 100644 index 69fa2d40afb..00000000000 --- a/tests/language_2/control_flow_collections/for_await_test.dart +++ /dev/null @@ -1,107 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:async_helper/async_helper.dart"; -import 'package:expect/expect.dart'; - -final list = [1, 2, 3]; -final map = {1: 1, 2: 2, 3: 3}; -final set = {1, 2, 3}; - -void main() { - asyncTest(() async { - await testList(); - await testMap(); - await testSet(); - }); -} - -Future testList() async { - var future123 = Future.value([1, 2, 3]); - var future1 = Future.value(1); - - // Await in iterable. - Expect.listEquals(list, [for (var i in await future123) i]); - - // Await in for-in body. - Expect.listEquals(list, [for (var i in [1, 2, 3]) await Future.value(i)]); - - // Await in initializer. - Expect.listEquals(list, [for (var i = await future1; i < 4; i++) i]); - - // Await in condition. - Expect.listEquals(list, - [for (var i = 1; await Future.value(i < 4); i++) i]); - - // Await in increment. - Expect.listEquals(list, - [for (var i = 1; i < 4; await Future(() => i++)) i]); - - // Await in for body. - Expect.listEquals(list, - [for (var i = 1; i < 4; i++) await Future.value(i)]); -} - -Future testMap() async { - var future123 = Future.value([1, 2, 3]); - var future1 = Future.value(1); - - // Await in iterable. - Expect.mapEquals(map, {for (var i in await future123) i: i}); - - // Await in for-in body key. - Expect.mapEquals(map, - {for (var i in [1, 2, 3]) await Future.value(i): i}); - - // Await in for-in body value. - Expect.mapEquals(map, - {for (var i in [1, 2, 3]) i: await Future.value(i)}); - - // Await in initializer. - Expect.mapEquals(map, {for (var i = await future1; i < 4; i++) i: i}); - - // Await in condition. - Expect.mapEquals(map, - {for (var i = 1; await Future.value(i < 4); i++) i: i}); - - // Await in increment. - Expect.mapEquals(map, - {for (var i = 1; i < 4; await Future(() => i++)) i: i}); - - // Await in for body key. - Expect.mapEquals(map, - {for (var i = 1; i < 4; i++) await Future.value(i): i}); - - // Await in for body value. - Expect.mapEquals(map, - {for (var i = 1; i < 4; i++) i: await Future.value(i)}); -} - -Future testSet() async { - var future123 = Future.value([1, 2, 3]); - var future1 = Future.value(1); - - // Await in iterable. - Expect.setEquals(set, {for (var i in await future123) i}); - - // Await in for-in body. - Expect.setEquals(set, {for (var i in [1, 2, 3]) await Future.value(i)}); - - // Await in initializer. - Expect.setEquals(set, {for (var i = await future1; i < 4; i++) i}); - - // Await in condition. - Expect.setEquals(set, - {for (var i = 1; await Future.value(i < 4); i++) i}); - - // Await in increment. - Expect.setEquals(set, - {for (var i = 1; i < 4; await Future(() => i++)) i}); - - // Await in for body. - Expect.setEquals(set, - {for (var i = 1; i < 4; i++) await Future.value(i)}); -} diff --git a/tests/language_2/control_flow_collections/for_const_error_test.dart b/tests/language_2/control_flow_collections/for_const_error_test.dart deleted file mode 100644 index 56d191949e2..00000000000 --- a/tests/language_2/control_flow_collections/for_const_error_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -// @dart = 2.9 - -void main() { - // For cannot be used in a const collection. - const _ = [for (var i in []) 1]; //# 00: compile-time error - const _ = {for (var i in []) 1: 1}; //# 01: compile-time error - const _ = {for (var i in []) 1}; //# 02: compile-time error - - const _ = [for (; false;) 1]; //# 03: compile-time error - const _ = {for (; false;) 1: 1}; //# 04: compile-time error - const _ = {for (; false;) 1}; //# 05: compile-time error - - () async { - const _ = [await for (var i in []) 1]; //# 06: compile-time error - const _ = {await for (var i in []) 1: 1}; //# 07: compile-time error - const _ = {await for (var i in []) 1}; //# 08: compile-time error - }(); -} diff --git a/tests/language_2/control_flow_collections/for_inference_test.dart b/tests/language_2/control_flow_collections/for_inference_test.dart deleted file mode 100644 index e7612c33716..00000000000 --- a/tests/language_2/control_flow_collections/for_inference_test.dart +++ /dev/null @@ -1,101 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Test how control flow interacts with inference. -import 'package:expect/expect.dart'; - -import 'utils.dart'; - -void main() { - testBottomUpInference(); - testLoopVariableInference(); - testTopDownInference(); -} - -void testBottomUpInference() { - // Lists. - Expect.type>([for (; false;) 1]); - Expect.type>([for (; false;) 1, for (; false;) 2]); - Expect.type>([for (; false;) 1, for (; false;) 0.2]); - Expect.type>([for (; false;) 1, 2]); - Expect.type>([for (; false;) 1, 0.2]); - Expect.type>([for (; false;) ...[]]); - Expect.type>([for (; false;) ...[]]); - - // Maps. - Expect.type>({for (; false;) 1: 1}); - Expect.type>({for (; false;) 1: 1, for (; false;) 2: 2}); - Expect.type>({for (; false;) 1: 0.1, for (; false;) 0.2: 2}); - Expect.type>({for (; false;) 1: 1, 2: 2}); - Expect.type>({for (; false;) 1: 0.1, 0.2: 2}); - Expect.type>({for (; false;) ...{}}); - Expect.type>({for (; false;) ...{}}); - - // Sets. - Expect.type>({for (; false;) 1}); - Expect.type>({for (; false;) 1, for (; false;) 2}); - Expect.type>({for (; false;) 1, for (; false;) 0.2}); - Expect.type>({for (; false;) 1, 2}); - Expect.type>({for (; false;) 1, 0.2}); - Expect.type>({for (; false;) ...[]}); - Expect.type>({for (; false;) ...[]}); - - // If a nested iterable's type is dynamic, the element type is dynamic. - Expect.type>([for (; false;) ...([] as dynamic)]); - Expect.type>({1, for (; false;) ...([] as dynamic)}); - - // If a nested maps's type is dynamic, the key and value types are dynamic. - Expect.type>({1: 1, for (; false;) ...({} as dynamic)}); -} - -void testLoopVariableInference() { - // Infers loop variable from iterable. - Expect.type>([for (var i in [1]) i]); - Expect.type>([for (var i in [1]) i.toRadixString(10)]); - - // Infers loop variable from initializer. - Expect.type>([for (var i = 1; i < 2; i++) i]); - Expect.type>([for (var i = 1; i < 2; i++) i.toRadixString(10)]); - - // Loop variable type is pushed into sequence. - Expect.listEquals([1], [for (int i in expectIntIterable([1])) i]); - - // Loop variable type is pushed into initializer. - Expect.listEquals([1], [for (int i = expectInt(1); i < 2; i++) i]); -} - -void testTopDownInference() { - // Lists. - - // The context element type is pushed into the body. - Expect.listEquals([1], [for (var i = 0; i < 1; i++) expectInt(1)]); - - // Bottom up-inference from elements is not pushed back down into the body. - Expect.listEquals([1, 2], - [1, for (var i = 0; i < 1; i++) expectDynamic(2)]); - - // Maps. - - // The context element type is pushed into the body. - Expect.mapEquals({1: "s"}, { - for (var i = 0; i < 1; i++) expectInt(1): expectString("s") - }); - - // Bottom up-inference from elements is not pushed back down into the body. - Expect.mapEquals({1: "s", 2: "t"}, { - 1: "s", - for (var i = 0; i < 1; i++) expectDynamic(2): expectDynamic("t") - }); - - // Sets. - - // The context element type is pushed into the body. - Expect.setEquals({1}, {for (var i = 0; i < 1; i++) expectInt(1)}); - - // Bottom up-inference from elements is not pushed back down into the body. - Expect.setEquals({1, 2}, - {1, for (var i = 0; i < 1; i++) expectDynamic(2)}); -} diff --git a/tests/language_2/control_flow_collections/for_non_bool_condition_test.dart b/tests/language_2/control_flow_collections/for_non_bool_condition_test.dart deleted file mode 100644 index 3c9d45dc8ea..00000000000 --- a/tests/language_2/control_flow_collections/for_non_bool_condition_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -void main() { - // Non-bool condition expression. - dynamic nonBool = 3; - Expect.throwsTypeError(() => [for (; nonBool;) 1]); - Expect.throwsTypeError(() => {for (; nonBool;) 1: 1}); - Expect.throwsTypeError(() => {for (; nonBool;) 1}); -} diff --git a/tests/language_2/control_flow_collections/for_null_condition_test.dart b/tests/language_2/control_flow_collections/for_null_condition_test.dart deleted file mode 100644 index 637c064b085..00000000000 --- a/tests/language_2/control_flow_collections/for_null_condition_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -void main() { - // Null condition expression. - bool nullBool = null; - Expect.throwsAssertionError(() => [for (; nullBool;) 1]); - Expect.throwsAssertionError(() => {for (; nullBool;) 1: 1}); - Expect.throwsAssertionError(() => {for (; nullBool;) 1}); -} diff --git a/tests/language_2/control_flow_collections/for_runtime_error_test.dart b/tests/language_2/control_flow_collections/for_runtime_error_test.dart deleted file mode 100644 index 5aa442a8f7b..00000000000 --- a/tests/language_2/control_flow_collections/for_runtime_error_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -void main() { - // Cast for variable. - dynamic nonInt = "string"; - Expect.throwsTypeError(() => [for (int i = nonInt; false;) 1]); - Expect.throwsTypeError(() => {for (int i = nonInt; false;) 1: 1}); - Expect.throwsTypeError(() => {for (int i = nonInt; false;) 1}); - - // Cast for-in variable. - dynamic nonIterable = 3; - Expect.throwsTypeError(() => [for (int i in nonIterable) 1]); - Expect.throwsTypeError(() => {for (int i in nonIterable) 1: 1}); - Expect.throwsTypeError(() => {for (int i in nonIterable) 1}); - - // Wrong element type. - Expect.throwsTypeError(() => [for (var i = 0; i < 1; i++) nonInt]); - Expect.throwsTypeError( - () => {for (var i = 0; i < 1; i++) nonInt: 1}); - Expect.throwsTypeError( - () => {for (var i = 0; i < 1; i++) 1: nonInt}); - Expect.throwsTypeError(() => {for (var i = 0; i < 1; i++) nonInt}); -} diff --git a/tests/language_2/control_flow_collections/for_test.dart b/tests/language_2/control_flow_collections/for_test.dart deleted file mode 100644 index 4e3e13bede1..00000000000 --- a/tests/language_2/control_flow_collections/for_test.dart +++ /dev/null @@ -1,250 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -import 'utils.dart'; - -final list = [1, 2, 3, 4]; -final map = {1: 1, 2: 2, 3: 3, 4: 4}; -final set = {1, 2, 3, 4}; - -void main() { - testList(); - testMap(); - testSet(); - testDuplicateKeys(); - testKeyOrder(); - testRuntimeErrors(); -} - -void testList() { - // Only for. - Expect.listEquals(list, [for (var i in list) i]); - - // For at beginning. - Expect.listEquals(list, [for (var i in [1, 2]) i, 3, 4]); - - // For in middle. - Expect.listEquals(list, [1, for (var i in [2, 3]) i, 4]); - - // For at end. - Expect.listEquals(list, [1, 2, for (var i in [3, 4]) i]); - - // Empty for. - Expect.listEquals(list, - [1, for (var i in []) i, 2, 3, for (; false;) 9, 4]); - - // Multiple fors. - Expect.listEquals(list, - [for (var i in [1]) i, 2, for (var i = 3; i <= 4; i++) i]); - - // Spread inside for. - Expect.listEquals(list, - [for (var i in [0, 2]) ...[1 + i, 2 + i]]); - - // If inside for. - Expect.listEquals(list, - [for (var i in [1, 9, 2, 3, 9, 4]) if (i != 9) i]); - - // Else inside for. - Expect.listEquals(list, - [for (var i in [1, -2, 3, -4]) if (i < 0) -i else i]); - - // For inside for. - Expect.listEquals(list, - [for (var i in [0, 2]) for (var j = 1; j <= 2; j++) i + j]); - - // Does not flatten nested collection literal. - Expect.listEquals([1], [for (var i = 1; i < 2; i++) [i]].first); - Expect.mapEquals({1: 1}, [for (var i = 1; i < 2; i++) {i: i}].first); - Expect.setEquals({1}, [for (var i = 1; i < 2; i++) {i}].first); - - // Downcast iterable. - Object obj = [1, 2, 3, 4]; - Expect.listEquals(list, [for (var n in obj) n]); - - // Downcast variable. - Expect.listEquals(list, [for (int n in [1, 2, 3, 4]) n]); - - // Downcast element. - Expect.listEquals(list, [for (num n in [1, 2, 3, 4]) n]); - - // Downcast condition. - Expect.listEquals([1], [for (var i = 1; (i < 2) as dynamic; i++) i]); - Expect.listEquals([1], [for (var i = 1; (i < 2) as Object; i++) i]); -} - -void testMap() { - // Only for. - Expect.mapEquals(map, {for (var i in list) i: i}); - - // For at beginning. - Expect.mapEquals(map, - {for (var i in [1, 2]) i: i, 3: 3, 4: 4}); - - // For in middle. - Expect.mapEquals(map, - {1: 1, for (var i in [2, 3]) i: i, 4: 4}); - - // For at end. - Expect.mapEquals(map, - {1: 1, 2: 2, for (var i in [3, 4]) i: i}); - - // Empty for. - Expect.mapEquals(map, { - 1: 1, - for (var i in []) i: i, - 2: 2, - 3: 3, - for (; false;) 9: 9, - 4: 4 - }); - - // Multiple fors. - Expect.mapEquals(map, { - for (var i in [1]) i: i, - 2: 2, - for (var i = 3; i <= 4; i++) i: i - }); - - // Spread inside for. - Expect.mapEquals(map, { - for (var i in [0, 2]) ...{1 + i: 1 + i, 2 + i: 2 + i} - }); - - // If inside for. - Expect.mapEquals(map, - {for (var i in [1, 9, 2, 3, 9, 4]) if (i != 9) i: i}); - - // Else inside for. - Expect.mapEquals(map, - {for (var i in [1, -2, 3, -4]) if (i < 0) -i: -i else i: i}); - - // For inside for. - Expect.mapEquals(map, { - for (var i in [0, 2]) for (var j = 1; j <= 2; j++) i + j: i + j - }); - - // Downcast iterable. - Object obj = [1, 2, 3, 4]; - Expect.mapEquals(map, {for (var n in obj) n: n}); - - // Downcast variable. - Expect.mapEquals(map, {for (int n in [1, 2, 3, 4]) n: n}); - - // Downcast element. - Expect.mapEquals(map, {for (num n in [1, 2, 3, 4]) n: n}); - - // Downcast condition. - Expect.mapEquals({1 : 1}, - {for (var i = 1; (i < 2) as dynamic; i++) i: i}); - Expect.mapEquals({1 : 1}, - {for (var i = 1; (i < 2) as Object; i++) i: i}); -} - -void testSet() { - // Only for. - Expect.setEquals(set, {for (var i in list) i}); - - // For at beginning. - Expect.setEquals(set, {for (var i in [1, 2]) i, 3, 4}); - - // For in middle. - Expect.setEquals(set, {1, for (var i in [2, 3]) i, 4}); - - // For at end. - Expect.setEquals(set, {1, 2, for (var i in [3, 4]) i}); - - // Empty for. - Expect.setEquals(set, - {1, for (var i in []) i, 2, 3, for (; false;) 9, 4}); - - // Multiple fors. - Expect.setEquals(set, - {for (var i in [1]) i, 2, for (var i = 3; i <= 4; i++) i}); - - // Spread inside for. - Expect.setEquals(set, - {for (var i in [0, 2]) ...[1 + i, 2 + i]}); - - // If inside for. - Expect.setEquals(set, - {for (var i in [1, 9, 2, 3, 9, 4]) if (i != 9) i}); - - // Else inside for. - Expect.setEquals(set, - {for (var i in [1, -2, 3, -4]) if (i < 0) -i else i}); - - // For inside for. - Expect.setEquals(set, - {for (var i in [0, 2]) for (var j = 1; j <= 2; j++) i + j}); - - // Does not flatten nested collection literal. - Expect.listEquals([1], {for (var i = 1; i < 2; i++) [i]}.first); - Expect.mapEquals({1: 1}, {for (var i = 1; i < 2; i++) {i: i}}.first); - Expect.setEquals({1}, {for (var i = 1; i < 2; i++) {i}}.first); - - // Downcast iterable. - Object obj = [1, 2, 3, 4]; - Expect.setEquals(set, {for (var n in obj) n}); - - // Downcast variable. - Expect.setEquals(set, {for (int n in [1, 2, 3, 4]) n}); - - // Downcast element. - Expect.setEquals(set, {for (num n in [1, 2, 3, 4]) n}); - - // Downcast condition. - Expect.setEquals({1}, {for (var i = 1; (i < 2) as dynamic; i++) i}); - Expect.setEquals({1}, {for (var i = 1; (i < 2) as Object; i++) i}); -} - -void testDuplicateKeys() { - Expect.mapEquals(map, { - 1: 1, - for (var i in [1, 2, 3]) i: i, - for (var i = 2; i <= 3; i++) i: i, - 3: 3, - 4: 4 - }); - Expect.setEquals(set, { - 1, - for (var i in [1, 2, 3]) i, - for (var i = 2; i <= 3; i++) i, - 3, - 4 - }); -} - -void testKeyOrder() { - // First equal key wins. - var e1a = Equality(1, "a"); - var e1b = Equality(1, "b"); - var e2a = Equality(2, "a"); - var e2b = Equality(2, "b"); - var keys = [e1b, e2a, e2b]; - var values = [2, 3, 4]; - - var map = { - e1a: 1, - for (var i = 0; i < keys.length; i++) keys[i]: values[i] - }; - Expect.equals("1:a,2:a", map.keys.join(",")); - Expect.equals("2,4", map.values.join(",")); - - var set = {e1a, for (var i = 0; i < keys.length; i++) keys[i]}; - Expect.equals("1:a,2:a", set.join(",")); -} - -void testRuntimeErrors() { - // Null iterable. - Iterable nullIterable = null; - Expect.throwsNoSuchMethodError(() => [for (var i in nullIterable) 1]); - Expect.throwsNoSuchMethodError( - () => {for (var i in nullIterable) 1: 1}); - Expect.throwsNoSuchMethodError(() => {for (var i in nullIterable) 1}); -} diff --git a/tests/language_2/control_flow_collections/for_variable_test.dart b/tests/language_2/control_flow_collections/for_variable_test.dart deleted file mode 100644 index 13c44a0c623..00000000000 --- a/tests/language_2/control_flow_collections/for_variable_test.dart +++ /dev/null @@ -1,204 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Tests for how variables and scoping work with for elements. -import 'package:expect/expect.dart'; - -import 'utils.dart'; - -String global = "global"; - -void main() { - testClosure(); - Test().shadowing(); - Test().reuseVariable(); -} - -void testClosure() { - var closures = []; - capture(callback) { - closures.add(callback); - return callback(); - } - - reset() { - closures.clear(); - } - - // Close over for-in loop variable in element. - var list = [for (var i in [0, 1]) () => i]; - Expect.equals(0, list[0]()); - Expect.equals(1, list[1]()); - - // Close over loop variable in element. - list = [for (var i = 0; i < 2; i++) () => i]; - Expect.equals(0, list[0]()); - Expect.equals(1, list[1]()); - - // Close over variable in condition expression. - var list2 = [for (var i = 0; capture(() => i++) < 2;) i]; - Expect.equals(1, closures[0]()); - Expect.equals(2, closures[1]()); - Expect.listEquals([1, 2], list2); - reset(); - - // Close over variable in increment expression. - var list3 = [for (var i = 0; i < 2; capture(() => i++)) i]; - Expect.equals(1, closures[0]()); - Expect.equals(2, closures[1]()); - Expect.listEquals([0, 1], list3); - reset(); -} - -class TestBase { - String inherited = "inherited"; -} - -class Test extends TestBase { - static String staticField = "static field"; - - String field = "field"; - - void shadowing() { - var local = "local"; - - // C-style for. - var list = [ - for (var global = "for"; global != null; global = null) global - ]; - Expect.listEquals(["for"], list); - - list = [ - for (var staticField = "for"; staticField != null; staticField = null) - staticField - ]; - Expect.listEquals(["for"], list); - - list = [ - for (var field = "for"; field != null; field = null) field - ]; - Expect.listEquals(["for"], list); - - list = [ - for (var inherited = "for"; inherited != null; inherited = null) inherited - ]; - Expect.listEquals(["for"], list); - - list = [ - for (var local = "for"; local != null; local = null) local - ]; - Expect.listEquals(["for"], list); - - list = [ - for (var outer = "outer"; outer != null; outer = null) - for (var outer = "for"; outer != null; outer = null) - outer - ]; - Expect.listEquals(["for"], list); - - // For-in. - list = [for (var global in ["for"]) global]; - Expect.listEquals(["for"], list); - - list = [for (var staticField in ["for"]) staticField]; - Expect.listEquals(["for"], list); - - list = [for (var field in ["for"]) field]; - Expect.listEquals(["for"], list); - - list = [for (var inherited in ["for"]) inherited]; - Expect.listEquals(["for"], list); - - list = [for (var local in ["for"]) local]; - Expect.listEquals(["for"], list); - - list = [for (var outer in ["outer"]) for (var outer in ["for"]) outer]; - Expect.listEquals(["for"], list); - } - - void reuseVariable() { - var local = "local"; - - // C-style for. - var list = [ - for (global = "for"; global == "for"; global = "after") global - ]; - Expect.listEquals(["for"], list); - Expect.equals("after", global); - global = "global"; - - list = [ - for (staticField = "for"; staticField == "for"; staticField = "after") - staticField - ]; - Expect.listEquals(["for"], list); - Expect.equals("after", staticField); - staticField = "staticField"; - - list = [ - for (field = "for"; field == "for"; field = "after") field - ]; - Expect.listEquals(["for"], list); - Expect.equals("after", field); - field = "field"; - - list = [ - for (inherited = "for"; inherited == "for"; inherited = "after") inherited - ]; - Expect.listEquals(["for"], list); - Expect.equals("after", inherited); - inherited = "inherited"; - - list = [ - for (local = "for"; local == "for"; local = "after") local - ]; - Expect.listEquals(["for"], list); - Expect.equals("after", local); - local = "local"; - - list = [ - for (var outer = "outer"; outer == "outer"; outer = "outer after") ...[ - for (outer = "for"; outer == "for"; outer = "after") outer, - outer - ] - ]; - Expect.listEquals(["for", "after"], list); - - // For-in. - list = [for (global in ["for"]) global]; - Expect.listEquals(["for"], list); - Expect.equals("for", global); - global = "global"; - - list = [for (staticField in ["for"]) staticField]; - Expect.listEquals(["for"], list); - Expect.equals("for", staticField); - staticField = "staticField"; - - list = [for (field in ["for"]) field]; - Expect.listEquals(["for"], list); - Expect.equals("for", field); - field = "field"; - - list = [for (inherited in ["for"]) inherited]; - Expect.listEquals(["for"], list); - Expect.equals("for", inherited); - inherited = "inherited"; - - list = [for (local in ["for"]) local]; - Expect.listEquals(["for"], list); - Expect.equals("for", local); - local = "local"; - - list = [ - for (var outer in ["outer"]) ...[ - for (outer in ["for"]) outer, - outer - ] - ]; - Expect.listEquals(["for", "for"], list); - } -} diff --git a/tests/language_2/control_flow_collections/if_await_test.dart b/tests/language_2/control_flow_collections/if_await_test.dart deleted file mode 100644 index cb38452d8af..00000000000 --- a/tests/language_2/control_flow_collections/if_await_test.dart +++ /dev/null @@ -1,95 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:async_helper/async_helper.dart"; -import 'package:expect/expect.dart'; - -final list = [1, 2, 3]; -final map = {1: 1, 2: 2, 3: 3}; -final set = {1, 2, 3}; - -void main() { - asyncTest(() async { - await testList(); - await testMap(); - await testSet(); - }); -} - -Future testList() async { - var futureTrue = Future.value(true); - var future2 = Future.value(2); - var future9 = Future.value(9); - - // Await in condition. - Expect.listEquals(list, [1, if (await futureTrue) 2, 3]); - - // Await in then branch. - Expect.listEquals(list, [1, if (true) await future2, 3]); - - // Await in else branch. - Expect.listEquals(list, [1, if (false) 9 else await future2, 3]); - - // Await in untaken then branch. - Expect.listEquals(list, [1, 2, if (false) await future9, 3]); - - // Await in untaken else branch. - Expect.listEquals(list, [1, if (true) 2 else await future9, 3]); -} - -Future testMap() async { - var futureTrue = Future.value(true); - var future2 = Future.value(2); - var future9 = Future.value(9); - - // Await in condition. - Expect.mapEquals(map, {1: 1, if (await futureTrue) 2: 2, 3: 3}); - - // Await in then branch key. - Expect.mapEquals(map, {1: 1, if (true) await future2: 2, 3: 3}); - - // Await in then branch value. - Expect.mapEquals(map, {1: 1, if (true) 2: await future2, 3: 3}); - - // Await in else branch key. - Expect.mapEquals(map, {1: 1, if (false) 9: 9 else await future2: 2, 3: 3}); - - // Await in else branch value. - Expect.mapEquals(map, {1: 1, if (false) 9: 9 else 2: await future2, 3: 3}); - - // Await in untaken then branch key. - Expect.mapEquals(map, {1: 1, 2: 2, if (false) await future9: 9, 3: 3}); - - // Await in untaken then branch value. - Expect.mapEquals(map, {1: 1, 2: 2, if (false) 9: await future9, 3: 3}); - - // Await in untaken else branch key. - Expect.mapEquals(map, {1: 1, if (true) 2: 2 else await future9: 9, 3: 3}); - - // Await in untaken else branch value. - Expect.mapEquals(map, {1: 1, if (true) 2: 2 else 9: await future9, 3: 3}); -} - -Future testSet() async { - var futureTrue = Future.value(true); - var future2 = Future.value(2); - var future9 = Future.value(9); - - // Await in condition. - Expect.setEquals(set, {1, if (await futureTrue) 2, 3}); - - // Await in then branch. - Expect.setEquals(set, {1, if (true) await future2, 3}); - - // Await in else branch. - Expect.setEquals(set, {1, if (false) 9 else await future2, 3}); - - // Await in untaken then branch. - Expect.setEquals(set, {1, 2, if (false) await future9, 3}); - - // Await in untaken else branch. - Expect.setEquals(set, {1, if (true) 2 else await future9, 3}); -} diff --git a/tests/language_2/control_flow_collections/if_const_error_test.dart b/tests/language_2/control_flow_collections/if_const_error_test.dart deleted file mode 100644 index 429452af671..00000000000 --- a/tests/language_2/control_flow_collections/if_const_error_test.dart +++ /dev/null @@ -1,139 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:collection'; - -import 'package:expect/expect.dart'; - -import 'utils.dart'; - -final nonConstBool = true; -final nonConstInt = 3; - -const dynamic nonBool = 3; -const dynamic nonInt = "s"; - -void main() { - testList(); - testMap(); - testSet(); - testShortCircuit(); -} - -void testList() { - // Condition must be constant. - const _ = [if (nonConstBool) 1]; //# 01: compile-time error - - // Condition must be Boolean. - const _ = [if (nonBool) 1]; //# 02: compile-time error - - // Then element must be constant, whether or not branch is taken. - const _ = [if (true) nonConstInt]; //# 03: compile-time error - const _ = [if (false) nonConstInt]; //# 04: compile-time error - - // Else element must be constant, whether or not branch is taken. - const _ = [if (true) 1 else nonConstInt]; //# 05: compile-time error - const _ = [if (false) 1 else nonConstInt]; //# 06: compile-time error - - // Then element must have right type if branch is chosen. - const _ = [if (true) nonInt]; //# 07: compile-time error - - // Else element must have right type if branch is chosen. - const _ = [if (false) 9 else nonInt]; //# 08: compile-time error -} - -void testMap() { - // Condition must be constant. - const _ = {if (nonConstBool) 1: 1}; //# 09: compile-time error - - // Condition must be Boolean. - const _ = {if (nonBool) 1: 1}; //# 10: compile-time error - - // Then key element must be constant, whether or not branch is taken. - const _ = {if (true) nonConstInt: 1}; //# 11: compile-time error - const _ = {if (false) nonConstInt: 1}; //# 12: compile-time error - - // Then value element must be constant, whether or not branch is taken. - const _ = {if (true) 1: nonConstInt}; //# 13: compile-time error - const _ = {if (false) 1: nonConstInt}; //# 14: compile-time error - - // Else key element must be constant, whether or not branch is taken. - const _ = {if (true) 1 else nonConstInt: 1}; //# 15: compile-time error - const _ = {if (false) 1 else nonConstInt: 1}; //# 16: compile-time error - - // Else value element must be constant, whether or not branch is taken. - const _ = {if (true) 1 else 1: nonConstInt}; //# 17: compile-time error - const _ = {if (false) 1 else 1: nonConstInt}; //# 18: compile-time error - - // Then key element must have right type if branch is chosen. - const _ = {if (true) nonInt: 1}; //# 19: compile-time error - - // Then value element must have right type if branch is chosen. - const _ = {if (true) 1: nonInt}; //# 20: compile-time error - - // Else key element must have right type if branch is chosen. - const _ = {if (false) 9 else nonInt: 1}; //# 21: compile-time error - - // Else value element must have right type if branch is chosen. - const _ = {if (false) 9 else 1: nonInt}; //# 22: compile-time error - - // Key cannot override operator.==(). - const obj = 0.1; - const _ = {if (true) 0.1: 1}; //# 23: compile-time error - const _ = {if (true) Duration(seconds: 0): 1}; //# 24: compile-time error - const _ = {if (true) obj: 1}; //# 25: compile-time error - - // Cannot have key collision when branch is chosen. - const _ = {1: 1, if (true) 1: 1}; //# 25: compile-time error - const _ = {if (true) 1: 1, if (true) 1: 1}; //# 26: compile-time error -} - -void testSet() { - // Condition must be constant. - const _ = {if (nonConstBool) 1}; //# 27: compile-time error - - // Condition must be Boolean. - const _ = {if (nonBool) 1}; //# 28: compile-time error - - // Then element must be constant, whether or not branch is taken. - const _ = {if (true) nonConstInt}; //# 29: compile-time error - const _ = {if (false) nonConstInt}; //# 30: compile-time error - - // Else element must be constant, whether or not branch is taken. - const _ = {if (true) 1 else nonConstInt}; //# 31: compile-time error - const _ = {if (false) 1 else nonConstInt}; //# 32: compile-time error - - // Then element must have right type if branch is chosen. - const _ = {if (true) nonInt}; //# 33: compile-time error - - // Else element must have right type if branch is chosen. - const _ = {if (false) 9 else nonInt}; //# 34: compile-time error - - // Cannot override operator.==(). - const obj = 0.1; - const _ = {if (true) 0.1}; //# 35: compile-time error - const _ = {if (true) Duration(seconds: 0)}; //# 36: compile-time error - const _ = {if (true) obj}; //# 37: compile-time error - - // Cannot have collision when branch is chosen. - const _ = {1, if (true) 1}; //# 38: compile-time error - const _ = {if (true) 1, if (true) 1}; //# 39: compile-time error -} - -void testShortCircuit() { - // A const expression that throws causes a compile error if it occurs inside - // the chosen branch of an if. - - // Store null in a dynamically-typed constant to avoid the type error on "+". - const dynamic nil = null; - - // With no else. - const _ = [if (true) nil + 1]; //# 40: compile-time error - - // With else. - const _ = [if (true) nil + 1 else 1]; //# 41: compile-time error - const _ = [if (false) 1 else nil + 1]; //# 42: compile-time error -} diff --git a/tests/language_2/control_flow_collections/if_const_test.dart b/tests/language_2/control_flow_collections/if_const_test.dart deleted file mode 100644 index e6c75ce2e89..00000000000 --- a/tests/language_2/control_flow_collections/if_const_test.dart +++ /dev/null @@ -1,244 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -import 'utils.dart'; - -// Typed as dynamic to also test spreading a value of type dynamic. -const dynamic list = [1, 2, 3]; -const dynamic map = {1: 1, 2: 2, 3: 3}; -const dynamic set = {1, 2, 3}; - -const dynamic dynamicTrue = true; -const Object objectTrue = true; - -void main() { - testList(); - testMap(); - testSet(); - testShortCircuit(); - testDuplicateKeys(); - testKeyOrder(); -} - -void testList() { - // Then if true. - Expect.identical(list, const [1, if (true) 2, 3]); - - // Nothing if false and no else. - Expect.identical(list, const [1, if (false) 9, 2, 3]); - - // Else if false. - Expect.identical(list, const [1, if (false) 9 else 2, 3]); - - // Only if. - Expect.identical(const [1], const [if (true) 1]); - - // If at beginning. - Expect.identical(list, const [if (true) 1, 2, 3]); - - // If in middle. - Expect.identical(list, const [1, if (true) 2, 3]); - - // If at end. - Expect.identical(list, const [1, 2, if (true) 3]); - - // Multiple ifs. - Expect.identical(list, - const [if (true) 1, if (false) 9, 2, if (true) 3]); - - // Cast condition. - Expect.identical(const [1], const [if (dynamicTrue) 1]); - Expect.identical(const [1], const [if (objectTrue) 1]); - - // Does not flatten nested collection literal. - Expect.identical(const [1], const [if (true) [1]].first); - Expect.identical(const {1: 1}, const [if (true) {1: 1}].first); - Expect.identical(const {1}, const [if (true) {1}].first); - - // Nested spread. - Expect.identical(list, - const [if (true) ...[1, 2], if (false) 9 else ...[3]]); - - // Nested if in then. - Expect.identical(const [1], - const [if (true) if (true) 1, if (true) if (false) 9]); - - // Nested if in else. - Expect.identical(const [1], const [if (false) 9 else if (true) 1]); -} - -void testMap() { - // Then if true. - Expect.identical(map, const {1: 1, if (true) 2: 2, 3: 3}); - - // Nothing if false and no else. - Expect.identical(map, const {1: 1, if (false) 9: 9, 2: 2, 3: 3}); - - // Else if false. - Expect.identical(map, - const {1: 1, if (false) 9: 9 else 2: 2, 3: 3}); - - // Only if. - Expect.identical(const {1: 1}, const {if (true) 1: 1}); - - // If at beginning. - Expect.identical(map, const {if (true) 1: 1, 2: 2, 3: 3}); - - // If in middle. - Expect.identical(map, const {1: 1, if (true) 2: 2, 3: 3}); - - // If at end. - Expect.identical(map, const {1: 1, 2: 2, if (true) 3: 3}); - - // Multiple ifs. - Expect.identical(map, - const {if (true) 1: 1, if (false) 9: 9, 2: 2, if (true) 3: 3}); - - // Cast condition. - Expect.identical(const {1: 1}, const {if (dynamicTrue) 1: 1}); - Expect.identical(const {1: 1}, const {if (objectTrue) 1: 1}); - - // Nested spread. - Expect.identical(map, const { - if (true) ...{1: 1, 2: 2}, - if (false) 9: 9 else ...{3: 3} - }); - - // Nested if in then. - Expect.identical(const {1: 1}, - const {if (true) if (true) 1: 1, if (true) if (false) 9: 9}); - - // Nested if in else. - Expect.identical(const {1: 1}, - const {if (false) 9: 9 else if (true) 1: 1}); -} - -void testSet() { - // Then if true. - Expect.identical(set, const {1, if (true) 2, 3}); - - // Nothing if false and no else. - Expect.identical(set, const {1, if (false) 9, 2, 3}); - - // Else if false. - Expect.identical(set, const {1, if (false) 9 else 2, 3}); - - // Only if. - Expect.identical(const {1}, const {if (true) 1}); - - // If at beginning. - Expect.identical(set, const {if (true) 1, 2, 3}); - - // If in middle. - Expect.identical(set, const {1, if (true) 2, 3}); - - // If at end. - Expect.identical(set, const {1, 2, if (true) 3}); - - // Multiple ifs. - Expect.identical(set, - const {if (true) 1, if (false) 9, 2, if (true) 3}); - - // Cast condition. - Expect.identical(const {1}, const {if (dynamicTrue) 1}); - Expect.identical(const {1}, const {if (objectTrue) 1}); - - // Does not flatten nested collection literal. - Expect.identical(const [1], const >{if (true) [1]}.first); - Expect.identical( - const {1: 1}, const >{if (true) {1: 1}}.first); - Expect.identical(const {1}, const >{if (true) {1}}.first); - - // Nested spread. - Expect.identical(set, - const {if (true) ...[1, 2], if (false) 9 else ...[3]}); - - // Nested if in then. - Expect.identical(const {1}, - const {if (true) if (true) 1, if (true) if (false) 9}); - - // Nested if in else. - Expect.identical(const {1}, const {if (false) 9 else if (true) 1}); -} - -void testShortCircuit() { - // A const expression that throws does not cause a compile error if it occurs - // inside an unchosen branch of an if. - - // Store null in a dynamically-typed constant to avoid the type error on "+". - const dynamic nil = null; - - Expect.identical(const [1], - const [if (true) 1, if (false) nil + 1]); - Expect.identical(const [1, 2], - const [if (true) 1 else nil + 1, if (false) nil + 1 else 2]); - - Expect.identical(const {1: 1}, const { - if (true) 1: 1, - if (false) nil + 1: 9, - if (false) 9: nil + 1 - }); - Expect.identical(const {1: 1, 2: 2}, const { - if (true) 1: 1 else nil + 1: 9, - if (false) 9: nil + 1 else 2: 2 - }); - - Expect.identical(const {1}, - const {if (true) 1, if (false) nil + 1}); - Expect.identical(const {1, 2}, - const {if (true) 1 else nil + 1, if (false) nil + 1 else 2}); - - // A const expression whose value isn't the right type does not cause a - // compile error if it occurs inside an unchosen branch. - const dynamic nonInt = "s"; - - Expect.identical(const [1], const [if (true) 1, if (false) nonInt]); - Expect.identical(const [1, 2], - const [if (true) 1 else nonInt, if (false) nonInt else 2]); - - Expect.identical(const {1: 1}, const { - if (true) 1: 1, - if (false) nonInt: 9, - if (false) 9: nonInt - }); - Expect.identical(const {1: 1, 2: 2}, const { - if (true) 1: 1 else nonInt: 9, - if (false) 9: nonInt else 2: 2 - }); - - Expect.identical(const {1}, const {if (true) 1, if (false) nonInt}); - Expect.identical(const {1, 2}, - const {if (true) 1 else nonInt, if (false) nonInt else 2}); -} - -void testDuplicateKeys() { - // Duplicate keys from unchosen branches are not an error. - Expect.mapEquals(map, { - 1: 1, - if (false) 1: 1, - if (true) 2: 2 else 3: 3, - 3: 3 - }); - - Expect.setEquals(set, const {1, if (false) 1, if (true) 2 else 3, 3}); -} - -void testKeyOrder() { - // Canonicalization isn't affected by which elements are conditional. - Expect.identical(map, - const {1: 1, if (true) 2: 2, if (false) 9: 9, 3: 3}); - Expect.identical(map, - const {if (false) 9: 9 else 1: 1, 2: 2, if (true) 3: 3}); - - Expect.identical(set, const {1, if (true) 2, if (false) 9, 3}); - Expect.identical(set, const {if (false) 9 else 1, 2, if (true) 3}); - - // Ordering does affect canonicalization. - Expect.notIdentical(map, const {1: 1, if (true) 3: 3, 2: 2}); - Expect.notIdentical(set, const {1, if (true) 3, 2}); -} diff --git a/tests/language_2/control_flow_collections/if_inference_test.dart b/tests/language_2/control_flow_collections/if_inference_test.dart deleted file mode 100644 index 59c38ebffb6..00000000000 --- a/tests/language_2/control_flow_collections/if_inference_test.dart +++ /dev/null @@ -1,83 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Test how control flow interacts with inference. -import 'package:expect/expect.dart'; - -import 'utils.dart'; - -void main() { - testBottomUpInference(); - testTopDownInference(); -} - -void testBottomUpInference() { - // Lists. - expectListOf([if (true) 1]); - expectListOf([if (true) 1 else 2]); - expectListOf([if (true) 1 else 0.2]); - expectListOf([if (true) 1, 2]); - expectListOf([if (true) 1, 0.2]); - expectListOf([if (true) ...[]]); - expectListOf([if (true) ...[]]); - - // Maps. - expectMapOf({if (true) 1: 1}); - expectMapOf({if (true) 1: 1 else 2: 2}); - expectMapOf({if (true) 1: 0.1 else 0.2: 2}); - expectMapOf({if (true) 1: 1, 2: 2}); - expectMapOf({if (true) 1: 0.1, 0.2: 2}); - expectMapOf({if (true) ...{}}); - expectMapOf({if (true) ...{}}); - - // Sets. - expectSetOf({if (true) 1}); - expectSetOf({if (true) 1 else 2}); - expectSetOf({if (true) 1 else 0.2}); - expectSetOf({if (true) 1, 2}); - expectSetOf({if (true) 1, 0.2}); - expectSetOf({if (true) ...[]}); - expectSetOf({if (true) ...[]}); - - // If a nested iterable's type is dynamic, the element type is dynamic. - expectListOf([if (true) ...([] as dynamic)]); - expectSetOf({1, if (true) ...([] as dynamic)}); - - // If a nested maps's type is dynamic, the key and value types are dynamic. - expectMapOf({1: 1, if (true) ...({} as dynamic)}); -} - -void testTopDownInference() { - // Lists. - - // The context element type is pushed into the branches. - Expect.listEquals([1], [if (true) expectInt(1)]); - Expect.listEquals([1], [if (false) 9 else expectInt(1)]); - - // Bottom up-inference from elements is not pushed back down into branches. - Expect.listEquals([1, 2], [1, if (true) expectDynamic(2)]); - Expect.listEquals([1, 2], [1, if (false) 9 else expectDynamic(2)]); - - // Maps. - - // The context element type is pushed into the branches. - Expect.mapEquals({1: "s"}, - {if (true) expectInt(1): expectString("s")}); - - // Bottom up-inference from elements is not pushed back down into branches. - Expect.mapEquals({1: "s", 2: "t"}, - {1: "s", if (true) expectDynamic(2): expectDynamic("t")}); - - // Sets. - - // The context element type is pushed into the branches. - Expect.setEquals({1}, {if (true) expectInt(1)}); - Expect.setEquals({1}, {if (false) 9 else expectInt(1)}); - - // Bottom up-inference from elements is not pushed back down into branches. - Expect.setEquals({1, 2}, {1, if (true) expectDynamic(2)}); - Expect.setEquals({1, 2}, {1, if (false) 9 else expectDynamic(2)}); -} diff --git a/tests/language_2/control_flow_collections/if_null_condition_test.dart b/tests/language_2/control_flow_collections/if_null_condition_test.dart deleted file mode 100644 index b7de51eac67..00000000000 --- a/tests/language_2/control_flow_collections/if_null_condition_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -void main() { - bool nullBool = null; - Expect.throwsAssertionError(() => [if (nullBool) 1]); - Expect.throwsAssertionError(() => {if (nullBool) 1: 1}); - Expect.throwsAssertionError(() => {if (nullBool) 1}); -} diff --git a/tests/language_2/control_flow_collections/if_promotion_test.dart b/tests/language_2/control_flow_collections/if_promotion_test.dart deleted file mode 100644 index bdac6906544..00000000000 --- a/tests/language_2/control_flow_collections/if_promotion_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// 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. - -// @dart = 2.9 - -class A { - var a = "a"; -} - -class B extends A { - var b = "b"; -} - -class C extends B { - var c = "c"; -} - -void main() { - A a = A(); - print(a.a); - print(a.b); //# 01: compile-time error - - var list = [ - a.a, - a.b, //# 02: compile-time error - a.c, //# 03: compile-time error - - if (a is B) [ - a.a, - a.b, - a.c, //# 04: compile-time error - - if (a is C) [ - a.a, - a.b, - a.c, - ] else [ - a.a, - a.b, - a.c, //# 05: compile-time error - ], - - a.a, - a.b, - a.c, //# 06: compile-time error - ] else [ - a.a, - a.b, //# 07: compile-time error - a.c, //# 08: compile-time error - ], - - a.a, - a.b, //# 09: compile-time error - a.c, //# 10: compile-time error - ]; -} diff --git a/tests/language_2/control_flow_collections/if_runtime_error_test.dart b/tests/language_2/control_flow_collections/if_runtime_error_test.dart deleted file mode 100644 index 1d92e32285a..00000000000 --- a/tests/language_2/control_flow_collections/if_runtime_error_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -void main() { - dynamic nonBool = 3; - Expect.throwsTypeError(() => [if (nonBool) 1]); - Expect.throwsTypeError(() => {if (nonBool) 1: 1}); - Expect.throwsTypeError(() => {if (nonBool) 1}); -} diff --git a/tests/language_2/control_flow_collections/if_test.dart b/tests/language_2/control_flow_collections/if_test.dart deleted file mode 100644 index c1aedc0d2a1..00000000000 --- a/tests/language_2/control_flow_collections/if_test.dart +++ /dev/null @@ -1,230 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -import 'utils.dart'; - -final list = [1, 2, 3]; -final map = {1: 1, 2: 2, 3: 3}; -final set = {1, 2, 3}; - -void main() { - testList(); - testMap(); - testSet(); - testShortCircuit(); - testDuplicateKeys(); - testKeyOrder(); -} - -void testList() { - // Then if true. - Expect.listEquals(list, [1, if (true) 2, 3]); - - // Nothing if false and no else. - Expect.listEquals(list, [1, if (false) 9, 2, 3]); - - // Else if false. - Expect.listEquals(list, [1, if (false) 9 else 2, 3]); - - // Only if. - Expect.listEquals([1], [if (true) 1]); - - // If at beginning. - Expect.listEquals(list, [if (true) 1, 2, 3]); - - // If in middle. - Expect.listEquals(list, [1, if (true) 2, 3]); - - // If at end. - Expect.listEquals(list, [1, 2, if (true) 3]); - - // Multiple ifs. - Expect.listEquals(list, - [if (true) 1, if (false) 9, 2, if (true) 3]); - - // Cast condition. - Expect.listEquals([1], [if (true as dynamic) 1]); - Expect.listEquals([1], [if (true as Object) 1]); - - // Does not flatten nested collection literal. - Expect.listEquals([1], [if (true) [1]].first); - Expect.mapEquals({1: 1}, [if (true) {1: 1}].first); - Expect.setEquals({1}, [if (true) {1}].first); - - // Nested spread. - Expect.listEquals(list, - [if (true) ...[1, 2], if (false) 9 else ...[3]]); - - // Nested if in then. - Expect.listEquals([1], [if (true) if (true) 1, if (true) if (false) 9]); - - // Nested if in else. - Expect.listEquals([1], [if (false) 9 else if (true) 1]); - - // Nested for in then. - Expect.listEquals(list, [if (true) for (var i in list) i]); - - // Nested for in else. - Expect.listEquals(list, [if (false) 9 else for (var i in list) i]); -} - -void testMap() { - // Then if true. - Expect.mapEquals(map, {1: 1, if (true) 2: 2, 3: 3}); - - // Nothing if false and no else. - Expect.mapEquals(map, {1: 1, if (false) 9: 9, 2: 2, 3: 3}); - - // Else if false. - Expect.mapEquals(map, {1: 1, if (false) 9: 9 else 2: 2, 3: 3}); - - // Only if. - Expect.mapEquals({1: 1}, {if (true) 1: 1}); - - // If at beginning. - Expect.mapEquals(map, {if (true) 1: 1, 2: 2, 3: 3}); - - // If in middle. - Expect.mapEquals(map, {1: 1, if (true) 2: 2, 3: 3}); - - // If at end. - Expect.mapEquals(map, {1: 1, 2: 2, if (true) 3: 3}); - - // Multiple ifs. - Expect.mapEquals(map, - {if (true) 1: 1, if (false) 9: 9, 2: 2, if (true) 3: 3}); - - // Cast condition. - Expect.mapEquals({1: 1}, {if (true as dynamic) 1: 1}); - Expect.mapEquals({1: 1}, {if (true as Object) 1: 1}); - - // Nested spread. - Expect.mapEquals(map, { - if (true) ...{1: 1, 2: 2}, - if (false) 9: 9 else ...{3: 3} - }); - - // Nested if in then. - Expect.mapEquals({1: 1}, - {if (true) if (true) 1: 1, if (true) if (false) 9: 9}); - - // Nested if in else. - Expect.mapEquals({1: 1}, - {if (false) 9: 9 else if (true) 1: 1}); - - // Nested for in then. - Expect.mapEquals(map, {if (true) for (var i in list) i: i}); - - // Nested for in else. - Expect.mapEquals(map, {if (false) 9: 9 else for (var i in list) i: i}); -} - -void testSet() { - // Then if true. - Expect.setEquals(set, {1, if (true) 2, 3}); - - // Nothing if false and no else. - Expect.setEquals(set, {1, if (false) 9, 2, 3}); - - // Else if false. - Expect.setEquals(set, {1, if (false) 9 else 2, 3}); - - // Only if. - Expect.setEquals({1}, {if (true) 1}); - - // If at beginning. - Expect.setEquals(set, {if (true) 1, 2, 3}); - - // If in middle. - Expect.setEquals(set, {1, if (true) 2, 3}); - - // If at end. - Expect.setEquals(set, {1, 2, if (true) 3}); - - // Multiple ifs. - Expect.setEquals(set, - {if (true) 1, if (false) 9, 2, if (true) 3}); - - // Cast condition. - Expect.setEquals({1}, {if (true as dynamic) 1}); - Expect.setEquals({1}, {if (true as Object) 1}); - - // Does not flatten nested collection literal. - Expect.listEquals([1], {if (true) [1]}.first); - Expect.mapEquals({1: 1}, {if (true) {1: 1}}.first); - Expect.setEquals({1}, {if (true) {1}}.first); - - // Nested spread. - Expect.setEquals(set, - {if (true) ...[1, 2], if (false) 9 else ...[3]}); - - // Nested if in then. - Expect.setEquals({1}, {if (true) if (true) 1, if (true) if (false) 9}); - - // Nested if in else. - Expect.setEquals({1}, {if (false) 9 else if (true) 1}); - - // Nested for in then. - Expect.setEquals(set, {if (true) for (var i in list) i}); - - // Nested for in else. - Expect.setEquals(set, {if (false) 9 else for (var i in list) i}); -} - -void testShortCircuit() { - var transcript = []; - T log(T value) { - transcript.add(value.toString()); - return value; - } - - // With no else. - Expect.listEquals([1], [if (true) log(1), if (false) log(2)]); - Expect.equals("1", transcript.join(",")); - transcript.clear(); - - // With else. - Expect.listEquals([1, 4], - [if (true) log(1) else log(2), if (false) log(3) else log(4)]); - Expect.equals("1,4", transcript.join(",")); -} - -void testDuplicateKeys() { - Expect.mapEquals(map, { - 1: 1, - if (true) 1: 1, - if (false) 9: 9 else 2: 2, - 2: 2, - 3: 3 - }); - Expect.setEquals(set, {1, if (true) 1, if (false) 9 else 2, 2, 3}); -} - -void testKeyOrder() { - // First equal key wins. - var e1a = Equality(1, "a"); - var e1b = Equality(1, "b"); - var e2a = Equality(2, "a"); - var e2b = Equality(2, "b"); - - var map = { - e1a: 0, - if (true) e1b: 0, - if (true) e2a: 0, - if (true) e2b: 0 - }; - Expect.equals("1:a,2:a", map.keys.join(",")); - - var set = { - e1a, - if (true) e1b, - if (true) e2a, - if (true) e2b - }; - Expect.equals("1:a,2:a", set.join(",")); -} diff --git a/tests/language_2/control_flow_collections/map_set_ambiguity_error_test.dart b/tests/language_2/control_flow_collections/map_set_ambiguity_error_test.dart deleted file mode 100644 index dbf28ca3bc9..00000000000 --- a/tests/language_2/control_flow_collections/map_set_ambiguity_error_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Test cases where the syntax is ambiguous between maps and sets when control -// flow elements contain spreads. -import 'dart:collection'; - -import 'utils.dart'; - -void main() { - Map map = {}; - Set set = Set(); - dynamic dyn = map; - Iterable iterable = []; - CustomSet customSet = CustomSet(); - CustomMap customMap = CustomMap(); - - var _ = {if (true) ...dyn}; //# 00: compile-time error - var _ = {if (true) ...map else ...set}; //# 01: compile-time error - var _ = {if (true) ...map else ...iterable}; //# 02: compile-time error - var _ = {if (true) ...map else ...customSet}; //# 03: compile-time error - var _ = {if (true) ...set else ...customMap}; //# 04: compile-time error - var _ = {if (true) ...dyn else ...dyn}; //# 05: compile-time error - var _ = {if (true) ...iterable else ...customMap}; //# 06: compile-time error - var _ = {if (true) ...customSet else ...customMap}; //# 07: compile-time error - - var _ = {for (; false;) ...dyn}; //# 08: compile-time error - var _ = {for (; false;) ...map, ...set}; //# 09: compile-time error - var _ = {for (; false;) ...map, ...iterable}; //# 10: compile-time error - var _ = {for (; false;) ...map, ...customSet}; //# 11: compile-time error - var _ = {for (; false;) ...set, ...customMap}; //# 12: compile-time error - var _ = {for (; false;) ...dyn, ...dyn}; //# 13: compile-time error - var _ = {for (; false;) ...iterable, ...customMap}; //# 14: compile-time error - var _ = {for (; false;) ...customSet, ...customMap}; //# 15: compile-time error -} diff --git a/tests/language_2/control_flow_collections/map_set_ambiguity_test.dart b/tests/language_2/control_flow_collections/map_set_ambiguity_test.dart deleted file mode 100644 index 93ad3b51ae9..00000000000 --- a/tests/language_2/control_flow_collections/map_set_ambiguity_test.dart +++ /dev/null @@ -1,130 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Test cases where the syntax is ambiguous between maps and sets because of -// spreads inside control flow. -import 'dart:collection'; - -import 'utils.dart'; - -void main() { - testBottomUpInference(); - testTopDownInference(); -} - -void testBottomUpInference() { - Map map = {}; - Set set = Set(); - dynamic dynMap = map; - dynamic dynSet = set; - Iterable iterable = []; - CustomSet customSet = CustomSet(); - CustomMap customMap = CustomMap(); - - // Note: The commented out cases are the error cases. They are shown here for - // completeness and tested in map_set_ambiguity_error_test.dart. - expectMapOf({if (true) ...map}); - expectSetOf({if (true) ...set}); - // expect___Of<...>({if (true) ...dyn}); - expectSetOf({if (true) ...iterable}); - expectSetOf({if (true) ...customSet}); - expectMapOf({if (true) ...customMap}); - - expectMapOf({if (true) ...map else ...map}); - // expect___Of<...>({if (true) ...map else ...set}); - expectMapOf({if (true) ...map else ...dynMap}); - // expect___Of<...>({if (true) ...map else ...iterable}); - // expect___Of<...>({if (true) ...map else ...customSet}); - expectMapOf({if (true) ...map else ...customMap}); - - expectSetOf({if (true) ...set else ...set}); - expectSetOf({if (true) ...set else ...dynSet}); - expectSetOf({if (true) ...set else ...iterable}); - expectSetOf({if (true) ...set else ...customSet}); - // expect___Of<...>({if (true) ...set else ...customMap}); - - // expect___Of<...>({if (true) ...dyn else ...dyn}); - expectSetOf({if (true) ...dynSet else ...iterable}); - expectSetOf({if (true) ...dynSet else ...customSet}); - expectMapOf({if (true) ...dynMap else ...customMap}); - - expectSetOf({if (true) ...iterable else ...iterable}); - expectSetOf({if (true) ...iterable else ...customSet}); - // expect___Of<...>({if (true) ...iterable else ...customMap}); - - expectSetOf({if (true) ...customSet else ...customSet}); - // expect___Of<...>({if (true) ...customSet else ...customMap}); - - expectMapOf({if (true) ...customMap else ...customMap}); - - // Note: The commented out cases are the error cases. They are shown here for - // completeness and tested in map_set_ambiguity_error_test.dart. - expectMapOf({for (; false;) ...map}); - expectSetOf({for (; false;) ...set}); - // expect___Of<...>({for (; false;) ...dyn}); - expectSetOf({for (; false;) ...iterable}); - expectSetOf({for (; false;) ...customSet}); - expectMapOf({for (; false;) ...customMap}); - - expectMapOf({for (; false;) ...map, for (; false;) ...map}); - // expect___Of<...>({for (; false;) ...map, for (; false;) ...set}); - expectMapOf( - {for (; false;) ...map, for (; false;) ...dynMap}); - // expect___Of<...>({for (; false;) ...map, for (; false;) ...iterable}); - // expect___Of<...>({for (; false;) ...map, for (; false;) ...customSet}); - expectMapOf( - {for (; false;) ...map, for (; false;) ...customMap}); - - expectSetOf({for (; false;) ...set, for (; false;) ...set}); - expectSetOf({for (; false;) ...set, for (; false;) ...dynSet}); - expectSetOf({for (; false;) ...set, for (; false;) ...iterable}); - expectSetOf({for (; false;) ...set, for (; false;) ...customSet}); - // expect___Of<...>({for (; false;) ...set, for (; false;) ...customMap}); - - // expect___Of<...>({for (; false;) ...dyn, for (; false;) ...dyn}); - expectSetOf( - {for (; false;) ...dynSet, for (; false;) ...iterable}); - expectSetOf( - {for (; false;) ...dynSet, for (; false;) ...customSet}); - expectMapOf( - {for (; false;) ...dynMap, for (; false;) ...customMap}); - - expectSetOf( - {for (; false;) ...iterable, for (; false;) ...iterable}); - expectSetOf( - {for (; false;) ...iterable, for (; false;) ...customSet}); - // expect___Of<...>( - // {for (; false;) ...iterable, for (; false;) ...customMap}); - - expectSetOf( - {for (; false;) ...customSet, for (; false;) ...customSet}); - // expect___Of<...>( - // {for (; false;) ...customSet, for (; false;) ...customMap}); - - expectMapOf( - {for (; false;) ...customMap, for (; false;) ...customMap}); -} - -void testTopDownInference() { - dynamic untypedMap = {}; - dynamic untypedIterable = []; - - Map map = {if (true) ...untypedMap}; - Set set = {if (true) ...untypedIterable}; - Iterable iterable = {if (true) ...untypedIterable}; - - expectMapOf(map); - expectSetOf(set); - expectSetOf(iterable); - - map = {for (; false;) ...untypedMap}; - set = {for (; false;) ...untypedIterable}; - iterable = {for (; false;) ...untypedIterable}; - - expectMapOf(map); - expectSetOf(set); - expectSetOf(iterable); -} diff --git a/tests/language_2/control_flow_collections/syntax_error_test.dart b/tests/language_2/control_flow_collections/syntax_error_test.dart deleted file mode 100644 index 6402d212344..00000000000 --- a/tests/language_2/control_flow_collections/syntax_error_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// 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. - -// @dart = 2.9 - -void main() { - // No then element. - var _ = [if (true)]; //# 00: syntax error - - // No then element with else. - var _ = [if (true) else 0]; //# 01: syntax error - - // No else element. - var _ = [if (true) 0 else]; //# 02: syntax error - - // Spread if. - var _ = [...if (true) 0]; //# 03: syntax error - - // Spread for. - var _ = [...for (; false;) 0]; //# 04: syntax error - - // Use if in map entry. - var _ = {if (true) 1: 1: 2}; //# 05: syntax error - var _ = {1: if (true) 2: 2}; //# 06: syntax error - - // Use for in map entry. - var _ = {for (; false;) 1: 1: 2}; //# 07: syntax error - var _ = {1: for (; false;) 2: 2}; //# 08: syntax error - - // Use for variable out of scope. - var _ = [for (var i = 0; false;) 1, i]; //# 09: compile-time error - - // Use for-in variable out of scope. - var _ = [for (var i in [1]; false;) 1, i]; //# 10: syntax error - - // Use for variable in own initializer. - var _ = [for (var i = i; false;) 1]; //# 11: compile-time error - - // Use for-in variable in own initializer. - var _ = [for (var i in [i]) 1]; //# 12: compile-time error -} diff --git a/tests/language_2/control_flow_collections/syntax_test.dart b/tests/language_2/control_flow_collections/syntax_test.dart deleted file mode 100644 index 52f278e5a2a..00000000000 --- a/tests/language_2/control_flow_collections/syntax_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests syntax edge cases. -import 'package:expect/expect.dart'; - -void main() { - // Trailing comma after then. - Expect.listEquals([1], [if (true) 1,]); - Expect.mapEquals({1: 1}, {if (true) 1: 1,}); - Expect.setEquals({1}, {if (true) 1,}); - - // Trailing comma after else. - Expect.listEquals([1], [if (true) 1 else 2,]); - Expect.mapEquals({1: 1}, {if (true) 1: 1 else 2: 2,}); - Expect.setEquals({1}, {if (true) 1 else 2,}); - - // Trailing comma after for. - Expect.listEquals([1], [1, for (; false;) 2,]); - Expect.mapEquals({1: 1}, {1: 1, for (; false;) 2: 2,}); - Expect.setEquals({1}, {1, for (; false;) 2,}); - - // Dangling else. - Expect.listEquals([1], [if (true) if (false) 0 else 1]); - Expect.listEquals([1], [if (true) if (false) 0 else 1 else 2]); - Expect.listEquals([2], [if (false) if (false) 0 else 1 else 2]); - - // Precedence of then. - Expect.listEquals([1, 2, 3], [1, if (true) true ? 2 : 0, 3]); - var a = 0; - Expect.listEquals([1, 2, 3], [1, if (true) a = 2, 3]); - - // Precedence of else. - Expect.listEquals([1, 2, 3], [1, if (false) 0 else true ? 2 : 0, 3]); - a = 0; - Expect.listEquals([1, 2, 3], [1, if (false) 0 else a = 2, 3]); - - // Precedence of for. - Expect.listEquals([1, 2, 3], - [1, for (var i = 0; i < 1; i++) true ? 2 : 0, 3]); - a = 0; - Expect.listEquals([1, 2, 3], [1, for (var i = 0; i < 1; i++) a = 2, 3]); -} diff --git a/tests/language_2/control_flow_collections/type_error_test.dart b/tests/language_2/control_flow_collections/type_error_test.dart deleted file mode 100644 index 10fead51762..00000000000 --- a/tests/language_2/control_flow_collections/type_error_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// 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. - -// @dart = 2.9 - -void main() { - // Non-Boolean if condition. - var _ = [if (1) 2]; //# 00: compile-time error - var _ = {if (1) 2: 2}; //# 01: compile-time error - var _ = {if (1) 2}; //# 02: compile-time error - - // Wrong then element type. - var _ = [if (true) "s"]; //# 04: compile-time error - var _ = {if (true) "s": 1}; //# 05: compile-time error - var _ = {if (true) 1: "s"}; //# 06: compile-time error - var _ = {if (true) "s"}; //# 07: compile-time error - - // Wrong else element type. - var _ = [if (false) 1 else "s"]; //# 08: compile-time error - var _ = {if (false) 1: 1 else "s": 2}; //# 09: compile-time error - var _ = {if (false) 1: 1 else 2: "s"}; //# 10: compile-time error - var _ = {if (false) 1 else "s"}; //# 11: compile-time error - - // Non-Boolean for condition. - var _ = [for (; 1;) 2]; //# 12: compile-time error - var _ = {for (; 1;) 2: 2}; //# 13: compile-time error - var _ = {for (; 1;) 2}; //# 14: compile-time error - - // Wrong for-in element type. - List s = ["s"]; - var _ = [for (int i in s) 1]; //# 15: compile-time error - var _ = {for (int i in s) 1: 1}; //# 16: compile-time error - var _ = {for (int i in s) 1}; //# 17: compile-time error - - // Wrong for declaration element type. - var _ = [for (int i = "s"; false;) 1]; //# 18: compile-time error - var _ = {for (int i = "s"; false;) 1: 1}; //# 19: compile-time error - var _ = {for (int i = "s"; false;) 1}; //# 20: compile-time error - - // Wrong for body element type. - var _ = [for (; false;) "s"]; //# 21: compile-time error - var _ = {for (; false;) "s": 1}; //# 22: compile-time error - var _ = {for (; false;) 1: "s"}; //# 23: compile-time error - var _ = {for (; false;) "s"}; //# 24: compile-time error - - // Non-iterable sequence type. - int nonIterable = 3; - var _ = [for (int i in nonIterable) 1]; //# 25: compile-time error - var _ = {for (int i in nonIterable) 1: 1}; //# 26: compile-time error - var _ = {for (int i in nonIterable) 1}; //# 27: compile-time error -} diff --git a/tests/language_2/control_flow_collections/utils.dart b/tests/language_2/control_flow_collections/utils.dart deleted file mode 100644 index 53e173dcc85..00000000000 --- a/tests/language_2/control_flow_collections/utils.dart +++ /dev/null @@ -1,111 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:collection'; - -import 'package:expect/expect.dart'; - -class CustomMap with MapMixin { - Iterable get keys => []; - String operator [](Object key) => ""; - operator []=(int key, String value) {} - String remove(Object key) => throw UnsupportedError("unsupported"); - void clear() => throw UnsupportedError("unsupported"); -} - -class CustomSet extends SetBase { - bool add(int value) => throw UnsupportedError("unsupported"); - bool contains(Object value) => throw UnsupportedError("unsupported"); - Iterator get iterator => [].iterator; - int get length => 0; - int lookup(Object value) => throw UnsupportedError("unsupported"); - bool remove(Object value) => throw UnsupportedError("unsupported"); - Set toSet() => this; -} - -class Equality { - final int id; - final String name; - const Equality(this.id, this.name); - int get hashCode => id; - bool operator ==(Object other) => other is Equality && id == other.id; - String toString() => "$id:$name"; -} - -T expectDynamic(dynamic value) { - Expect.equals(dynamic, T); - return value; -} - -T expectInt(dynamic value) { - Expect.equals(int, T); - return value; -} - -T expectString(dynamic value) { - Expect.equals(String, T); - return value; -} - -Iterable expectIntIterable(dynamic value) { - Expect.equals(int, T); - return value; -} - -Set expectIntSet() { - Expect.equals(int, T); - return Set(); -} - -Stream expectIntStream(dynamic elements) { - Expect.equals(int, T); - return Stream.fromIterable(elements); -} - -Set expectDynamicSet() { - Expect.equals(dynamic, T); - return Set(); -} - -/// Hacky way of testing the inferred generic type arguments of [object]. -/// -/// [Expect.type()] only performs a subtype test, which means that it will -/// return `true` when asked if a `List` is a `List` or -/// `List`. For inference, we want to test the type more precisely. -/// -/// There isn't a good way to do that in tests yet so, for now, we just see if -/// the runtime type contains the given type argument string. -// TODO(rnystrom): Do something less horribly brittle. -void _expectTypeArguments(String typeArguments, Object object) { - var typeName = object.runtimeType.toString(); - - // If an implementation prints dynamic instantiations like a raw type, - // handle that. - if (!typeName.contains("<") && - (typeArguments == "dynamic" || typeArguments == "dynamic, dynamic")) { - return; - } - - if (!typeName.contains("<$typeArguments>")) { - Expect.fail("Object should have had generic type '<$typeArguments>', " - "but was '$typeName'."); - } -} - -void expectListOf(Object object) { - Expect.type(object); - _expectTypeArguments(T.toString(), object); -} - -void expectSetOf(Object object) { - Expect.type(object); - _expectTypeArguments(T.toString(), object); -} - -void expectMapOf(Object object) { - Expect.type(object); - _expectTypeArguments("$K, $V", object); -} diff --git a/tests/language_2/covariant/callable_class_field_getter_test.dart b/tests/language_2/covariant/callable_class_field_getter_test.dart deleted file mode 100644 index 287ff8053ec..00000000000 --- a/tests/language_2/covariant/callable_class_field_getter_test.dart +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) 2023, 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 - -// Tests that the appropriate runtime checks occur when a generic class has a -// field (or getter) whose type is a callable class, and that type makes -// contravariant use of the generic class's type parameter. - -import 'package:expect/expect.dart'; - -// The callable class. Contains machinery to verify that it is called only when -// expected. -class Callable { - static int _callCount = 0; - dynamic call() { - ++_callCount; - return this; - } - - static void checkCallCount(int expected) { - Expect.equals(expected, _callCount); - _callCount = 0; - } -} - -// A generic class containing fields whose type is a callable class. -class Fields { - final Callable noUse = Callable(); - final Callable covariantUse = Callable(); - final Callable contravariantUse = - Callable(); - final Callable invariantUse = Callable(); -} - -// A generic class containing getters whose type is a callable class. -class Getters { - final Fields _fields = Fields(); - - Callable get noUse => _fields.noUse; - Callable get covariantUse => _fields.covariantUse; - Callable get contravariantUse => _fields.contravariantUse; - Callable get invariantUse => _fields.invariantUse; -} - -void testFields(Fields fields, {bool expectException}) { - // Make a copy of the `fields` parameter with type `dynamic`, so that we can - // access its fields without triggering runtime covariance checks; we'll use - // this to determine the values that are expected to be returned by - // `Callable.call`. - dynamic d = fields; - - // `fields.noUse` doesn't use the type parameter `T`, so no runtime check is - // needed to preserve soundness. - Expect.identical(d.noUse, fields.noUse()); - Callable.checkCallCount(1); - - // `fields.covariantUse` uses the type parameter `T` covariantly, so no - // runtime check is needed to preserve soundness. - Expect.identical(d.covariantUse, fields.covariantUse()); - Callable.checkCallCount(1); - - // `fields.contravariantUse` uses the type parameter `T` contravariantly, so a - // runtime check is needed to preserve soundness. - if (expectException) { - Expect.throws(() => fields.contravariantUse()); - Callable.checkCallCount(0); - } else { - Expect.identical(d.contravariantUse, fields.contravariantUse()); - Callable.checkCallCount(1); - } - - // `fields.invariantUse` uses the type parameter `T` both covariantly and - // contravariantly, so a runtime check is needed to preserve soundness. - if (expectException) { - Expect.throws(() => fields.invariantUse()); - Callable.checkCallCount(0); - } else { - Expect.identical(d.invariantUse, fields.invariantUse()); - Callable.checkCallCount(1); - } -} - -void testGetters(Getters getters, {bool expectException}) { - // Make a copy of the `getters` parameter with type `dynamic`, so that we can - // access its getters without triggering runtime covariance checks; we'll use - // this to determine the values that are expected to be returned by - // `Callable.call`. - dynamic d = getters; - - // `getters.noUse` doesn't use the type parameter `T`, so no runtime check is - // needed to preserve soundness. - Expect.identical(d.noUse, getters.noUse()); - Callable.checkCallCount(1); - - // `getters.covariantUse` uses the type parameter `T` covariantly, so no - // runtime check is needed to preserve soundness. - Expect.identical(d.covariantUse, getters.covariantUse()); - Callable.checkCallCount(1); - - // `getters.contravariantUse` uses the type parameter `T` contravariantly, so - // a runtime check is needed to preserve soundness. - if (expectException) { - Expect.throws(() => getters.contravariantUse()); - Callable.checkCallCount(0); - } else { - Expect.identical(d.contravariantUse, getters.contravariantUse()); - Callable.checkCallCount(1); - } - - // `getters.invariantUse` uses the type parameter `T` both covariantly and - // contravariantly, so a runtime check is needed to preserve soundness. - if (expectException) { - Expect.throws(() => getters.invariantUse()); - Callable.checkCallCount(0); - } else { - Expect.identical(d.invariantUse, getters.invariantUse()); - Callable.checkCallCount(1); - } -} - -main() { - testFields(Fields(), expectException: false); - testFields(Fields(), expectException: true); - testGetters(Getters(), expectException: false); - testGetters(Getters(), expectException: true); -} diff --git a/tests/language_2/covariant/covariant_test.dart b/tests/language_2/covariant/covariant_test.dart deleted file mode 100644 index b5a438a9b35..00000000000 --- a/tests/language_2/covariant/covariant_test.dart +++ /dev/null @@ -1,433 +0,0 @@ -// Copyright (c) 2017, 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 - -// Test that `covariant` can be parsed (and ignored) by -// dart2js and the VM. -// This test only checks for non-strong mode behavior. -// -// Generally, `covariant` should be ignored, when it is used in the right -// places. - -import 'package:expect/expect.dart'; - -// Top level field may not have a covariant. -// Would be considered a minor (acceptable) bug, if it was accepted here too. -covariant // //# 00: syntax error -int x0; - -covariant int covariant; // //# 00b: syntax error - -int covariant; // //# 00c: ok - -// Getters may never have `covariant`. (Neither on the top-level nor as members) -covariant // //# 01: syntax error -int get x1 => 499; - -// Top level setters may not have a covariant. -// Would be considered a minor (acceptable) bug, if it was accepted here too. -void set x2( - covariant //# 02: compile-time error - int val) {} - -// Same as above, but with `covariant` in different positions. -// The `covariant` is just wrong there. - -int -covariant // //# 03: syntax error - x3; - -int -covariant // //# 04: syntax error - get x4 => 499; - -void set x5( - int - covariant //# 05: syntax error - val) {} - -// Same without types. - -// Since `covariant` is a built-in identifier, it is not allowed here. -covariant x6; // //# 06: syntax error - -covariant covariant; // //# 06b: syntax error - -// Getters may never have `covariant`. -covariant // //# 07: syntax error -get x7 => 499; - -// Top level setters may not have a covariant. -// Would be considered a minor (acceptable) bug, if it was accepted here too. -void set x8( - covariant //# 08: compile-time error - val) {} - -// If there is no type, then `covariant` is simply the parameter name: -void set x9(covariant) {} - -// Covariant won't work on return types. -covariant // //# 10: syntax error -int f10() => 499; - -// Covariant won't work as a return type. -covariant // //# 11: syntax error -f11() => 499; - -// Covariant should not work on top-level methods. -// It's a minor (acceptable) bug to not error out here. -int f12( - covariant //# 12: compile-time error - int x) => - 499; - -// `Covariant` must be in front of the types. -int f13( - int - covariant //# 13: syntax error - x) => - 499; - -// Covariant should not work on top-level methods. -// It's a minor (acceptable) bug to not error out here. -int f14( - covariant //# 14: compile-time error - final x) => - 499; - -// `Covariant` must be in front of modifiers. -int f15( - final - covariant //# 15: syntax error - x) => - 499; - -// Covariant should not work on top-level methods. -// It's a minor (acceptable) bug to not error out here. -int f16( - covariant //# 16: compile-time error - final int x) => - 499; - -// `Covariant` must be in front of modifiers. -int f17( - final - covariant //# 17: syntax error - int - x) => - 499; - -// On its own, `covariant` is just a parameter name. -int f18(covariant) => covariant; - -covariant; // //# 19: syntax error - -// All of the above as statics in a class. -class A { - // Static fields may not have a covariant. - // Would be considered a minor (acceptable) bug, if it was accepted here too. - static - covariant // //# 20: syntax error - int x20; - - static covariant int covariant; // //# 20b: syntax error - - static int covariant; // //# 20c: ok - - // Getters may never have `covariant`. - static - covariant // //# 21: syntax error - int get x21 => 499; - - // Getters may never have `covariant`. - covariant // //# 21b: syntax error - static int get x21b => 499; - - // Static setters may not have a covariant. - // Would be considered a minor (acceptable) bug, if it was accepted here too. - static void set x22( - covariant //# 22: compile-time error - int val) {} - - // Same as above, but with `covariant` in different positions. - // The `covariant` is just wrong there. - - static int - covariant // //# 23: syntax error - x23; - - static int - covariant // //# 24: syntax error - get x24 => 499; - - static void set x25( - int - covariant //# 25: syntax error - val) {} - - // Since `covariant` is a built-in identifier, it is not allowed here. - static covariant x26; //# 26: syntax error - static covariant covariant; //# 26b: syntax error - - // Getters may never have `covariant`. - static - covariant // //# 27: syntax error - get x27 => 499; - - covariant // //# 27b: syntax error - static get x27b => 499; - - // Static setters may not have a covariant. - // Would be considered a minor (acceptable) bug, if it was accepted here too. - static void set x28( - covariant //# 28: compile-time error - val) {} - - // If there is no type, then `covariant` is simply the parameter name: - static void set x29(covariant) {} - - // Covariant won't work on return types. - static - covariant // //# 30: syntax error - int f30() => 499; - - covariant // //# 30b: syntax error - static int f30b() => 499; - - // Covariant won't work as a return type. - static - covariant // //# 31: syntax error - f31() => 499; - - covariant // //# 31b: syntax error - static f31b() => 499; - - // Covariant should not work on static methods. - // It's a minor (acceptable) bug to not error out here. - static int f32( - covariant //# 32: compile-time error - int x) => - 499; - - // `Covariant` must be in front of the types. - static int f33( - int - covariant //# 33: syntax error - x) => - 499; - - // Covariant should not work on top-level methods. - // It's a minor (acceptable) bug to not error out here. - static int f34( - covariant //# 34: compile-time error - final x) => - 499; - - // `Covariant` must be in front of modifiers. - static int f35( - final - covariant //# 35: syntax error - x) => - 499; - - // Covariant should not work on top-level methods. - // It's a minor (acceptable) bug to not error out here. - static int f36( - covariant //# 36: compile-time error - final int x) => - 499; - - // `Covariant` must be in front of modifiers. - static int f37( - final - covariant //# 37: syntax error - int - x) => - 499; - - // `Covariant` on its own is just a parameter name. - static int f38(covariant) => covariant; - - static covariant; // //# 39: syntax error - -} - -// All of the above as instance members in a class. -class B { - covariant // //# 40: ok - int x40; - - covariant int covariant; // //# 40b: ok - - int covariant; // //# 40c: ok - - // Getters may never have `covariant`. - covariant // //# 41: syntax error - int get x41 => 499; - - void set x42( - covariant // //# 42: ok - int val) {} - - // `covariant` in the wrong position. - int - covariant // //# 43: syntax error - x43; - - // `covariant` in the wrong position. - int - covariant // //# 44: syntax error - get x44 => 499; - - void set x45( - int - covariant //# 45: syntax error - val) {} - - // Since `covariant` is a built-in identifier, it is not allowed here. - covariant x46; //# 46: syntax error - covariant covariant; //# 46b: syntax error - - // Getters may never have `covariant`. - covariant // //# 47: syntax error - get x47 => 499; - - void set x48( - covariant // //# 48: ok - val) {} - - // If there is no type, then `covariant` is simply the parameter name: - void set x49(covariant) {} - - // Covariant won't work on return types. - covariant // //# 50: syntax error - int f50() => 499; - - // Covariant won't work as a return type. - covariant // //# 51: syntax error - f51() => 499; - - int f52( - covariant // //# 52: ok - int x) => - 499; - - // `Covariant` must be in front of the types. - int f53( - int - covariant //# 53: syntax error - x) => - 499; - - int f54( - covariant // //# 54: ok - final x) => - 499; - - // `Covariant` must be in front of modifiers. - int f55( - final - covariant //# 55: syntax error - x) => - 499; - - int f56( - covariant // //# 56: ok - final int x) => - 499; - - // `Covariant` must be in front of modifiers. - int f57( - final - covariant //# 57: syntax error - int - x) => - 499; - - // `Covariant` on its own is just a parameter name. - int f58(covariant) => covariant; - - covariant; // //# 59: syntax error -} - -void use(x) {} - -main() { - x0 = 0; - covariant = 0; // //# 00b: continued - covariant = 0; // //# 00c: continued - use(x1); - x2 = 499; - use(x3); - use(x4); - x5 = 42; - x6 = 0; //# 06: continued - covariant = 0; //# 06b: continued - use(x7); - x8 = 11; - x9 = 12; - use(f10()); - use(f11()); - use(f12(2)); - use(f13(3)); - use(f14(3)); - use(f15(3)); - use(f16(3)); - use(f17(3)); - Expect.equals(123, f18(123)); - use(covariant); // //# 19: continued - - A.x20 = 0; - A.covariant = 0; // //# 20b: continued - A.covariant = 0; // //# 20c: continued - use(A.x21); - use(A.x21b); - A.x22 = 499; - use(A.x23); - use(A.x24); - A.x25 = 42; - A.x26 = 0; //# 26: continued - A.covariant = 0; //# 26b: continued - use(A.x27); - use(A.x27b); - A.x28 = 11; - A.x29 = 12; - use(A.f30()); - use(A.f31()); - use(A.f31b()); - use(A.f32(2)); - use(A.f33(3)); - use(A.f34(3)); - use(A.f35(3)); - use(A.f36(3)); - use(A.f37(3)); - Expect.equals(1234, A.f38(1234)); - use(A.covariant); // //# 39: continued - - var b = new B(); - b.x40 = 0; - b.covariant = 0; // //# 40b: continued - b.covariant = 0; // //# 40c: continued - use(b.x41); - b.x42 = 499; - use(b.x43); - use(b.x44); - b.x45 = 42; - b.x46 = 0; //# 46: continued - b.covariant = 0; //# 46b: continued - use(b.x47); - b.x48 = 11; - b.x49 = 12; - use(b.f50()); - use(b.f51()); - use(b.f52(2)); - use(b.f53(2)); - use(b.f54(3)); - use(b.f55(3)); - use(b.f56(3)); - use(b.f57(3)); - Expect.equals(12345, b.f58(12345)); - use(B.covariant); // //# 59: continued -} diff --git a/tests/language_2/covariant/field_test.dart b/tests/language_2/covariant/field_test.dart deleted file mode 100644 index d532d0b7cdb..00000000000 --- a/tests/language_2/covariant/field_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -abstract class B { - // x will be marked genericCovariantInterface, since x's type is covariant in - // the type parameter T. - void set s2(T x); - - // x will be marked genericCovariantInterface, since x's type is covariant in - // the type parameter T. - void set s3(T x); - - void set s4(Object x); - - void set s5(Object x) { - s4 = x; - } -} - -class C extends B { - A s1; - - // s2 will be marked genericCovariantImpl, since it might be called via - // e.g. B. - A s2; - - // s3 will be marked genericCovariantImpl, since it might be called via - // e.g. B. - covariant A s3; - - covariant A s4; -} - -main() { - // Dynamic method calls should always have their arguments type checked. - dynamic d = new C(); - Expect.throwsTypeError(() => d.s1 = new Object()); //# 01: ok - - // Interface calls should have any arguments marked "genericCovariantImpl" - // type checked provided that the corresponding argument on the interface - // target is marked "genericCovariantInterface". - B b = new C(); - Expect.throwsTypeError(() => b.s2 = new Object()); //# 02: ok - - // Interface calls should have any arguments marked "covariant" type checked, - // regardless of whether the corresponding argument on the interface target is - // marked "genericCovariantInterface". - Expect.throwsTypeError(() => b.s3 = new Object()); //# 03: ok - Expect.throwsTypeError(() => b.s4 = new Object()); //# 04: ok - - // This calls should have any arguments marked "covariant" type checked. - Expect.throwsTypeError(() => b.s5 = new Object()); //# 05: ok -} diff --git a/tests/language_2/covariant/method_test.dart b/tests/language_2/covariant/method_test.dart deleted file mode 100644 index da47e0c1859..00000000000 --- a/tests/language_2/covariant/method_test.dart +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -abstract class B { - // x will be marked genericCovariantInterface, since x's type is covariant in - // the type parameter T. - void f2(T x); - - // x will be marked genericCovariantInterface, since x's type is covariant in - // the type parameter T. - void f3(T x); - - void f4(Object x); - - void f5(Object x) { - f4(x); - } -} - -class C extends B { - void f1(A x) {} - - // x will be marked genericCovariantImpl, since it might be called via - // e.g. B. - void f2(A x) {} - - // x will be marked genericCovariantImpl, since it might be called via - // e.g. B. - void f3(covariant A x) {} - - void f4(covariant A x) {} -} - -main() { - // Dynamic method calls should always have their arguments type checked. - dynamic d = new C(); - Expect.throwsTypeError(() => d.f1(new Object())); //# 01: ok - - // Closure calls should have any arguments marked "genericCovariantImpl" type - // checked. - B b = new C(); - void Function(Object) f = b.f2; - Expect.throwsTypeError(() => f(new Object())); //# 02: ok - - // Interface calls should have any arguments marked "genericCovariantImpl" - // type checked provided that the corresponding argument on the interface - // target is marked "genericCovariantInterface". - Expect.throwsTypeError(() => b.f2(new Object())); //# 03: ok - - // Interface calls should have any arguments marked "covariant" type checked, - // regardless of whether the corresponding argument on the interface target is - // marked "genericCovariantInterface". - Expect.throwsTypeError(() => b.f3(new Object())); //# 04: ok - Expect.throwsTypeError(() => b.f4(new Object())); //# 05: ok - - // This calls should have any arguments marked "covariant" type checked. - Expect.throwsTypeError(() => b.f5(new Object())); //# 06: ok -} diff --git a/tests/language_2/covariant/override_test.dart b/tests/language_2/covariant/override_test.dart deleted file mode 100644 index c30cd2e535a..00000000000 --- a/tests/language_2/covariant/override_test.dart +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2017, 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 covariant_override_test; - -// This test contains cases where `covariant` is used as intended. - -abstract class A { - A(this.f1, this.f2, this.f3); - - // Normal usage, "by design": superclass requests covariance. - void m1(covariant Object o); - - // Normal usage, "ad hoc": subclass requests covariance. - void m2(Object o); - - // Syntactic special case: omit the type in subclass. - void m3(Object o); - - // Positional optional arguments. - void m4([covariant Object o]); - void m5([Object o]); - void m6([Object o]); - - // Named arguments. - void m7({covariant Object arg}); - void m8({Object arg}); - void m9({Object arg}); - - // Normal usage on field, "by design": superclass requests covariance. - covariant Object f1; - - // Normal usage on field, "ad hoc": subclass requests covariance. - Object f2; - - // Syntactic special case. - Object f3; -} - -abstract class B extends A { - B(num f1, num f2, num f3) : super(f1, f2, f3); - - void m1(num n); - void m2(covariant num n); - void m3(covariant n); - void m4([num n]); - void m5([covariant num n]); - void m6([covariant n]); - void m7({num arg}); - void m8({covariant num arg}); - void m9({covariant arg}); - void set f1(num n); - void set f2(covariant num n); - void set f3(covariant n); -} - -class C extends B { - C(int f1, int f2, int f3) : super(f1, f2, f3); - - void m1(int i) {} - void m2(int i) {} - void m3(int i) {} - void m4([int i]) {} - void m5([int i]) {} - void m6([int i]) {} - void m7({int arg}) {} - void m8({int arg}) {} - void m9({int arg}) {} - void set f1(covariant int i) {} - void set f2(covariant int i) {} - void set f3(int i) {} -} - -main() { - // For Dart 1.x, `covariant` has no runtime semantics; we just ensure - // that the code is not unused, such that we know it will be parsed. - A a = new C(39, 40, 41); - a.m1(42); - a.m2(42); - a.m3(42); - a.m4(42); - a.m5(42); - a.m6(42); - a.m7(arg: 42); - a.m8(arg: 42); - a.m9(arg: 42); - a.f1 = 42; - a.f2 = 42; - a.f3 = 42; -} diff --git a/tests/language_2/covariant/return_type_test.dart b/tests/language_2/covariant/return_type_test.dart deleted file mode 100644 index 599b065ac89..00000000000 --- a/tests/language_2/covariant/return_type_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -void main() { - Expect.throwsTypeError(() { - List l = [1, 2, 3].where((x) => x.isEven).map((x) => x + 1); - }, 'Iterable should fail implicit cast to List'); - - Iterable l = [1, 2, 3].where((x) => x.isEven).map((x) => x + 1); - Expect.isFalse(l is List, 'Iterable is not a subtype of List'); - - C c = C(1); - Iterable myList = c.f(); // works - - Expect.throwsTypeError(() { - C c = C(1); - List myList = c.f(); - }, "f() returns an Iterable, not a List"); - - Expect.throwsTypeError(() { - C c = C(1); - List myList = c.f(); - }, "f() returns an Iterable, not a List"); - - Expect.throwsTypeError(() { - C c = C(1); - Iterable myList = c.f(); - }, "f() returns functions accepting int, not Object"); - - { - C> c = D([1]); - Iterable)> myList = c.f(); - } - - Expect.throwsTypeError(() { - C> c = D([1]); - List)> myList = c.f(); - }, "D.f() returns an Iterable, not a List"); - - Expect.throwsTypeError(() { - C> c = D([1]); - Iterable)> myList = c.f(); - }, "D.f() returns functions accepting Iterable, not Iterable"); -} - -class C { - final T t; - C(this.t); - Iterable f() sync* { - yield (T x) => x == t; - } -} - -class D extends C> { - D(Iterable s) : super(s); -} diff --git a/tests/language_2/covariant/setter_test.dart b/tests/language_2/covariant/setter_test.dart deleted file mode 100644 index c5fe6281540..00000000000 --- a/tests/language_2/covariant/setter_test.dart +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -abstract class B { - // x will be marked genericCovariantInterface, since x's type is covariant in - // the type parameter T. - void set s2(T x); - - // x will be marked genericCovariantInterface, since x's type is covariant in - // the type parameter T. - void set s3(T x); - - void set s4(Object x); - - void set s5(Object x) { - s4 = x; - } -} - -class C extends B { - void set s1(A x) {} - - // x will be marked genericCovariantImpl, since it might be called via - // e.g. B. - void set s2(A x) {} - - // x will be marked genericCovariantImpl, since it might be called via - // e.g. B. - void set s3(covariant A x) {} - - void set s4(covariant A x) {} -} - -main() { - // Dynamic method calls should always have their arguments type checked. - dynamic d = new C(); - Expect.throwsTypeError(() => d.s1 = new Object()); //# 01: ok - - // Interface calls should have any arguments marked "genericCovariantImpl" - // type checked provided that the corresponding argument on the interface - // target is marked "genericCovariantInterface". - B b = new C(); - Expect.throwsTypeError(() => b.s2 = new Object()); //# 02: ok - - // Interface calls should have any arguments marked "covariant" type checked, - // regardless of whether the corresponding argument on the interface target is - // marked "genericCovariantInterface". - Expect.throwsTypeError(() => b.s3 = new Object()); //# 03: ok - Expect.throwsTypeError(() => b.s4 = new Object()); //# 04: ok - - // This calls should have any arguments marked "covariant" type checked. - Expect.throwsTypeError(() => b.s5 = new Object()); //# 05: ok - - testMixin(); //# 06: ok -} - -abstract class D { - void set m1(T x); -} - -class E { - void set m1(A x) {} -} - -class F = Object with E implements D; -class G = C with E implements D; - -class H extends Object with E implements D {} - -class I extends Object with F {} - -void testMixin() { - D f = new F(); - f.m1 = new A(); - Expect.throwsTypeError(() => f.m1 = new Object()); - f = new G(); - f.m1 = new A(); - Expect.throwsTypeError(() => f.m1 = new Object()); - f = new H(); - f.m1 = new A(); - Expect.throwsTypeError(() => f.m1 = new Object()); - f = new I(); - f.m1 = new A(); - Expect.throwsTypeError(() => f.m1 = new Object()); -} diff --git a/tests/language_2/covariant/subtyping_tearoff1_test.dart b/tests/language_2/covariant/subtyping_tearoff1_test.dart deleted file mode 100644 index 24d5e9f2acd..00000000000 --- a/tests/language_2/covariant/subtyping_tearoff1_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2016, 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 -import 'package:expect/expect.dart'; - -class Foo { - dynamic method(T x) {} -} - -typedef dynamic TakeNum(num x); - -main() { - Foo intFoo = new Foo(); - Foo numFoo = intFoo; - TakeNum f = numFoo.method; - Expect.throws(() => f(2.5)); - dynamic f2 = numFoo.method; - Expect.throws(() => f2(2.5)); -} diff --git a/tests/language_2/covariant/subtyping_tearoff2_test.dart b/tests/language_2/covariant/subtyping_tearoff2_test.dart deleted file mode 100644 index 3d263ba9136..00000000000 --- a/tests/language_2/covariant/subtyping_tearoff2_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2016, 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 -import 'package:expect/expect.dart'; - -class Implementation { - dynamic method(int x) {} -} - -abstract class Interface { - dynamic method(T x); -} - -class Subclass extends Implementation implements Interface {} - -typedef dynamic TakeNum(num x); - -main() { - Subclass subclass = new Subclass(); - Interface intInterface = subclass; - Interface numInterface = intInterface; - TakeNum f = numInterface.method; - Expect.throws(() => f(2.5)); - dynamic f2 = f; - Expect.throws(() => f2(2.5)); -} diff --git a/tests/language_2/covariant/subtyping_tearoff3_test.dart b/tests/language_2/covariant/subtyping_tearoff3_test.dart deleted file mode 100644 index 5194b4e4674..00000000000 --- a/tests/language_2/covariant/subtyping_tearoff3_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2016, 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 -import 'package:expect/expect.dart'; - -class Implementation { - dynamic method(int x) {} -} - -abstract class Interface1 { - dynamic method(T x); -} - -abstract class Interface2 { - dynamic method(T x); -} - -class Subclass extends Implementation - implements Interface1, Interface2 {} - -typedef dynamic TakeNum(num x); - -main() { - Subclass subclass = new Subclass(); - - Interface1 intInterface1 = subclass; - Interface1 numInterface1 = intInterface1; - TakeNum f1 = numInterface1.method; - Expect.throws(() => f1(2.5)); - dynamic f1dynamic = f1; - Expect.throws(() => f1dynamic(2.5)); - - Interface2 intInterface2 = subclass; - Interface2 numInterface2 = intInterface2; - TakeNum f2 = numInterface2.method; - Expect.throws(() => f2(2.5)); - dynamic f2dynamic = f2; - Expect.throws(() => f2dynamic(2.5)); -} diff --git a/tests/language_2/covariant/subtyping_test.dart b/tests/language_2/covariant/subtyping_test.dart deleted file mode 100644 index 768850c55ab..00000000000 --- a/tests/language_2/covariant/subtyping_test.dart +++ /dev/null @@ -1,255 +0,0 @@ -// Copyright (c) 2017, 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 -import 'package:expect/expect.dart'; - -class Fields { - T x; - T _y; - T _z; - - m() { - _y = x; - } - - n(Fields c) { - c._z = x; - } -} - -testField() { - Fields c = new Fields(); - Expect.throwsTypeError(() => c.x = 'hello'); - - Fields d = new Fields(); - Expect.throwsTypeError(() => c.x = 'hello'); -} - -testPrivateFields() { - Fields c = new Fields()..x = 42; - c.m(); - Expect.equals(c._y, 42); - - Fields c2 = new Fields()..x = 'hi'; - c2.n(c2); - Expect.equals(c2._z, 'hi'); - Expect.throwsTypeError(() => c.n(c2)); - Expect.equals(c2._z, 'hi'); -} - -class NumBounds { - bool m(T t) => t.isNegative; -} - -class MethodTakesNum extends NumBounds { - bool m(num obj) => obj.isNegative; // does not need check -} - -class MethodTakesInt extends NumBounds { - bool m(int obj) => obj.isNegative; // needs a check -} - -testClassBounds() { - NumBounds d = new MethodTakesNum(); - Expect.equals(d.m(-1.1), true); - d = new MethodTakesInt(); - Expect.throwsTypeError(() => d.m(-1.1)); -} - -typedef void F(T t); -typedef G = void Function(S s); - -class FnChecks { - F f; - G g; - T _t; - T getT() => _t; - F setterForT() { - return (T t) { - _t = t; - }; - } -} - -testReturnOfFunctionType() { - FnChecks cInt = new FnChecks(); - FnChecks cObj = cInt; - Expect.throwsTypeError(() => cObj.setterForT()); - Expect.throwsTypeError(() => (cObj.setterForT() as F)); - FnChecks cDyn = cInt; - Expect.throwsTypeError(() => cDyn.setterForT()); - Expect.throwsTypeError( - () => (cDyn as dynamic).setterForT()('hi')); // dcall throws - cInt.setterForT()(42); - Expect.equals(cObj.getT(), 42); -} - -testTearoffReturningFunctionType() { - FnChecks cInt = new FnChecks(); - FnChecks cObj = cInt; - - Expect.throwsTypeError( - () => cObj.setterForT, 'unsound tear-off throws at runtime'); - Expect.equals(cInt.setterForT, cInt.setterForT, 'sound tear-off works'); -} - -testFieldOfFunctionType() { - FnChecks c = new FnChecks()..f = (String b) {}; - Expect.throwsTypeError(() { - F f = c.f; - }); - Expect.throwsTypeError(() { - Object f = c.f; - }); - Expect.throwsTypeError(() => c.f); - Expect.throwsTypeError(() => c.f(42)); - Expect.throwsTypeError(() => c.f('hi')); - FnChecks cStr = c; - cStr.f('hi'); - FnChecks cDyn = c; - Expect.throwsTypeError(() => cDyn.f); - Expect.throwsTypeError(() => (cDyn as dynamic).f(42)); // dcall throws -} - -testFieldOfGenericFunctionType() { - FnChecks c = new FnChecks() - ..g = (S s) => s.isNegative; - - Expect.throwsTypeError(() { - G g = c.g; - }); - Expect.throwsTypeError(() { - var g = c.g; - }); - Expect.throwsTypeError(() => c.g('hi')); - Expect.throwsTypeError(() => c.g(42)); - FnChecks cNum = c; - cNum.g(42); -} - -class Base { - int _t = 0; - add(int t) { - _t += t; - } -} - -abstract class I { - add(T t); -} - -class ExtendsBase extends Base implements I {} - -class MixinBase extends Object with Base implements I {} - -class MixinBase2 = Object with Base implements I; - -testMixinApplication() { - I i = new ExtendsBase(); - I j = new MixinBase(); - I k = new MixinBase2(); - Expect.throwsTypeError(() => i.add('hi')); - Expect.throwsTypeError(() => j.add('hi')); - Expect.throwsTypeError(() => k.add('hi')); -} - -class GenericMethodBounds { - Type get t => T; - GenericMethodBounds foo() => new GenericMethodBounds(); - GenericMethodBounds bar() => - new GenericMethodBounds(); -} - -class GenericMethodBoundsDerived extends GenericMethodBounds { - GenericMethodBounds foo() => new GenericMethodBounds(); - GenericMethodBounds bar() => - new GenericMethodBounds(); -} - -GenericMethodBounds Function() genericFunctionWithBounds() { - inner() => new GenericMethodBounds(); - return inner; -} - -testGenericMethodBounds() { - test(GenericMethodBounds g) { - Expect.throwsTypeError(() => g.foo()); - Expect.throwsTypeError(() => g.foo()); - Expect.equals(g.foo().t, Null); - Expect.equals(g.foo().t, int); - Expect.isFalse(g.foo() is GenericMethodBounds); - g.bar(); - dynamic d = g; - d.bar(); - Expect.throwsTypeError(() => d.bar()); - Expect.throwsTypeError(() => d.bar()); - } - - test(new GenericMethodBounds()); - test(new GenericMethodBounds()); - test(new GenericMethodBoundsDerived()); - test(genericFunctionWithBounds()()); -} - -class ClassF { - T x; - void call(T t) { - x = t; - } -} - -testCallMethod() { - ClassF cc = new ClassF(); - ClassF ca = cc; // An upcast, per covariance. - F f = ca; - void f2(Object x) {} - Expect.equals(f.runtimeType, f2.runtimeType); - Expect.throwsTypeError(() => f(new Object())); -} - -class TearOff { - method1(T t) => null; // needs check - method2(Function(T) takesT) => null; - method3(T Function() returnsT) => null; // needs check - method4(Function(Function(T)) takesTakesT) => null; // needs check - method5(Function(T Function()) takesReturnsT) => null; - method6(Function(T) Function() returnsTakesT) => null; - method7(T Function() Function() returnsReturnsT) => null; // needs check -} - -typedef F1 = dynamic Function(Object); -typedef F2 = dynamic Function(dynamic Function(int)); -typedef F3 = dynamic Function(dynamic Function(int Function())); -typedef F4 = dynamic Function(dynamic Function(int) Function()); - -testTearOffRuntimeType() { - expectRTTI(tearoff, type) => Expect.equals(tearoff.runtimeType, type, - 'covariant params should reify with Object as their type'); - - TearOff t = new TearOff(); - expectRTTI(t.method1, F1); - - expectRTTI(t.method2, F2); - expectRTTI(t.method3, F1); - - expectRTTI(t.method4, F1); - expectRTTI(t.method5, F3); - expectRTTI(t.method6, F4); - expectRTTI(t.method7, F1); -} - -main() { - testField(); - testPrivateFields(); - testClassBounds(); - testReturnOfFunctionType(); - testTearoffReturningFunctionType(); - testFieldOfFunctionType(); - testFieldOfGenericFunctionType(); - testMixinApplication(); - testGenericMethodBounds(); - testCallMethod(); - testTearOffRuntimeType(); -} diff --git a/tests/language_2/covariant/subtyping_unsafe_call1_test.dart b/tests/language_2/covariant/subtyping_unsafe_call1_test.dart deleted file mode 100644 index cdcd2dfce43..00000000000 --- a/tests/language_2/covariant/subtyping_unsafe_call1_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2016, 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 -import 'package:expect/expect.dart'; - -class Foo { - dynamic method(T x) {} -} - -main() { - Foo intFoo = new Foo(); - Foo numFoo = intFoo; - Expect.throws(() => numFoo.method(2.5)); -} diff --git a/tests/language_2/covariant/subtyping_unsafe_call2_test.dart b/tests/language_2/covariant/subtyping_unsafe_call2_test.dart deleted file mode 100644 index 69b5dde7a4d..00000000000 --- a/tests/language_2/covariant/subtyping_unsafe_call2_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2016, 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 -import 'package:expect/expect.dart'; - -class Implementation { - dynamic method(int x) {} -} - -abstract class Interface { - dynamic method(T x); -} - -class Subclass extends Implementation implements Interface {} - -main() { - Subclass subclass = new Subclass(); - Interface intInterface = subclass; - Interface numInterface = intInterface; - Expect.throws(() => numInterface.method(2.5)); -} diff --git a/tests/language_2/covariant/subtyping_unsafe_call3_test.dart b/tests/language_2/covariant/subtyping_unsafe_call3_test.dart deleted file mode 100644 index 8291cb19077..00000000000 --- a/tests/language_2/covariant/subtyping_unsafe_call3_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2016, 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 -import 'package:expect/expect.dart'; - -class Implementation { - dynamic method(int x) {} -} - -abstract class Interface1 { - dynamic method(T x); -} - -abstract class Interface2 { - dynamic method(T x); -} - -class Subclass extends Implementation - implements Interface1, Interface2 {} - -main() { - Subclass subclass = new Subclass(); - - Interface1 intInterface1 = subclass; - Interface1 numInterface1 = intInterface1; - Expect.throws(() => numInterface1.method(2.5)); - - Interface2 intInterface2 = subclass; - Interface2 numInterface2 = intInterface2; - Expect.throws(() => numInterface2.method(2.5)); -} diff --git a/tests/language_2/covariant/subtyping_with_mixin_test.dart b/tests/language_2/covariant/subtyping_with_mixin_test.dart deleted file mode 100644 index 2682871d70e..00000000000 --- a/tests/language_2/covariant/subtyping_with_mixin_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'package:expect/expect.dart'; - -class A {} - -class B extends A {} - -class Base {} - -class Mixin { - void f(T arg) {} -} - -abstract class Interface { - void f(covariant A arg); -} - -class C extends Base with Mixin implements Interface {} - -main() { - Interface i = new C(); - i.f(new B()); - Expect.throwsTypeError(() { - i.f(new A()); - }); -} diff --git a/tests/language_2/covariant/tear_off_type_test.dart b/tests/language_2/covariant/tear_off_type_test.dart deleted file mode 100644 index c99cfb5d751..00000000000 --- a/tests/language_2/covariant/tear_off_type_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -typedef U F(T x); - -class C { - T f(List x) {} -} - -F, num> g(C c) { - return c.f; -} - -void main() { - var tearoff = g(new C()); - // Since C.f's x parameter is covariant, its type is changed to `Object?` when - // determining the type of the tearoff. So the type of the tearoff should be - // `(Object?) -> int`. (Not, for example, `(List) -> int` or - // `(List) -> Object?`) - Expect.isTrue(tearoff is F); - // Because the function accepts any object, we can pass strings to it. This - // will not work in Dart 1. - Expect.isTrue(tearoff is F); -} diff --git a/tests/language_2/covariant/type_parameter_test.dart b/tests/language_2/covariant/type_parameter_test.dart deleted file mode 100644 index 27d7c34572f..00000000000 --- a/tests/language_2/covariant/type_parameter_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -abstract class B { - // U will be marked genericCovariantInterface, since U's bound is covariant in - // the type parameter T. - void f2(); -} - -class C extends B { - void f1() {} - - // x will be marked genericCovariantImpl, since it might be called via - // e.g. B. - void f2() {} -} - -main() { - // Dynamic method calls should always have their type arguments checked. - dynamic d = new C(); - Expect.throwsTypeError(() => d.f1()); //# 01: ok - - // Closure calls should have any type arguments marked "genericCovariantImpl" - // checked. - B b = new C(); - void Function() f = b.f2; - Expect.throwsTypeError(() => f()); //# 02: ok - - // Interface calls should have any type arguments marked - // "genericCovariantImpl" checked provided that the corresponding type - // argument on the interface target is marked "genericCovariantInterface". - Expect.throwsTypeError(() => b.f2()); //# 03: ok -} diff --git a/tests/language_2/covariant_override/runtime_check_test.dart b/tests/language_2/covariant_override/runtime_check_test.dart deleted file mode 100644 index 4ffb233e46d..00000000000 --- a/tests/language_2/covariant_override/runtime_check_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -class View { - addChild(View v) {} - transform(View fn(View v)) {} -} - -class MyView extends View { - addChild(covariant MyView v) {} - transform(covariant MyView fn(Object v)) {} -} - -main() { - dynamic mv = new MyView(); - dynamic v = new View(); - - mv.addChild(mv); - Expect.throws(() => mv.addChild(v)); - - mv.transform((_) => new MyView()); - - // TODO(jmesserly): these *should* be cast failures, but DDC is currently - // ignoring function type failures w/ a warning at the console... - - // * -> * not a subtype of Object -> MyView - Expect.throws(() => mv.transform((_) => mv)); - - // View -> View not a subtype of Object -> MyView - Expect.throws(() => mv.transform((View x) => x)); -} diff --git a/tests/language_2/covariant_override/tear_off_type_test.dart b/tests/language_2/covariant_override/tear_off_type_test.dart deleted file mode 100644 index fe676cd9d19..00000000000 --- a/tests/language_2/covariant_override/tear_off_type_test.dart +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -// If a parameter is directly or indirectly a covariant override, its type in -// the method tear-off should become Object. - -typedef void TakeInts(int a, int b, int c, int d, int e); -typedef void TakeObjectsAndInts(Object a, int b, Object c, int d, int e); -typedef void TakeObjects(Object a, Object b, Object c, Object d, Object e); - -typedef void TakeOptionalInts([int a, int b, int c, int d]); -typedef void TakeOptionalObjectsAndInts([Object a, int b, Object c, int d]); - -typedef void TakeNamedInts({int a, int b, int c, int d}); -typedef void TakeNamedObjectsAndInts({Object a, int b, Object c, int d}); - -class M1 { - method(covariant int a, int b) {} -} - -class M2 { - method(int a, covariant int b) {} -} - -class C extends Object with M1, M2 {} - -class Direct { - void positional(covariant int a, int b, covariant int c, int d, int e) {} - void optional([covariant int a, int b, covariant int c, int d]) {} - void named({covariant int a, int b, covariant int c, int d}) {} -} - -class Inherited extends Direct {} - -// --- - -class Override1 { - void method(covariant int a, int b, int c, int d, int e) {} -} - -class Override2 extends Override1 { - void method(int a, int b, covariant int c, int d, int e) {} -} - -class Override3 extends Override2 { - void method(int a, int b, int c, int d, int e) {} -} - -// --- - -abstract class Implement1 { - void method(covariant int a, int b, int c, int d, int e) {} -} - -class Implement2 { - void method(int a, covariant int b, int c, int d, int e) {} -} - -class Implement3 { - void method(int a, int b, covariant int c, int d, int e) {} -} - -class Implement4 implements Implement3 { - void method(int a, int b, int c, covariant int d, int e) {} -} - -class Implement5 implements Implement1, Implement2, Implement4 { - void method(int a, int b, int c, int d, covariant int e) {} -} - -// --- - -class Interface1 { - void method(covariant int a, int b, int c, int d, int e) {} -} - -class Interface2 { - void method(int a, covariant int b, int c, int d, int e) {} -} - -class Mixin1 { - void method(int a, int b, covariant int c, int d, int e) {} -} - -class Mixin2 { - void method(int a, int b, int c, covariant int d, int e) {} -} - -class Superclass { - void method(int a, int b, int c, int d, covariant int e) {} -} - -class Mixed extends Superclass - with Mixin1, Mixin2 - implements Interface1, Interface2 {} - -void main() { - testDirect(); - testInherited(); - testOverridden(); - testImplemented(); - testMixed(); -} - -void testDirect() { - var positional = new Direct().positional; - Expect.isTrue(positional is TakeInts); - Expect.isTrue(positional is TakeObjectsAndInts); - - var optional = new Direct().optional; - Expect.isTrue(optional is TakeOptionalInts); - Expect.isTrue(optional is TakeOptionalObjectsAndInts); - - var named = new Direct().named; - Expect.isTrue(named is TakeNamedInts); - Expect.isTrue(named is TakeNamedObjectsAndInts); -} - -void testInherited() { - var positional = new Inherited().positional; - Expect.isTrue(positional is TakeInts); - Expect.isTrue(positional is TakeObjectsAndInts); - - var optional = new Inherited().optional; - Expect.isTrue(optional is TakeOptionalInts); - Expect.isTrue(optional is TakeOptionalObjectsAndInts); - - var named = new Inherited().named; - Expect.isTrue(named is TakeNamedInts); - Expect.isTrue(named is TakeNamedObjectsAndInts); -} - -void testOverridden() { - var method2 = new Override2().method; - Expect.isTrue(method2 is TakeInts); - Expect.isTrue(method2 is TakeObjectsAndInts); - - var method3 = new Override3().method; - Expect.isTrue(method3 is TakeInts); - Expect.isTrue(method3 is TakeObjectsAndInts); -} - -void testImplemented() { - var method = new Implement5().method; - Expect.isTrue(method is TakeInts); - Expect.isTrue(method is TakeObjects); -} - -void testMixed() { - // TODO(rnystrom): https://github.com/dart-lang/sdk/issues/28395 - var method = new Mixed().method; - Expect.isTrue(method is TakeInts); - Expect.isTrue(method is TakeObjects); -} diff --git a/tests/language_2/deferred/call_empty_before_load_lib.dart b/tests/language_2/deferred/call_empty_before_load_lib.dart deleted file mode 100644 index 4dd608bdeca..00000000000 --- a/tests/language_2/deferred/call_empty_before_load_lib.dart +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) 2015, 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 - -thefun() {} diff --git a/tests/language_2/deferred/call_empty_before_load_test.dart b/tests/language_2/deferred/call_empty_before_load_test.dart deleted file mode 100644 index d00894f228c..00000000000 --- a/tests/language_2/deferred/call_empty_before_load_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2015, 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 - -// Test that calling a function, even though it itself has no effect, will -// trigger an error if the corresponding deferred library has not been loaded. - -import "package:expect/expect.dart"; -import "call_empty_before_load_lib.dart" deferred as lib1; - -main() { - Expect.throws(() => lib1.thefun()); -} diff --git a/tests/language_2/deferred/closurize_load_library_lib.dart b/tests/language_2/deferred/closurize_load_library_lib.dart deleted file mode 100644 index 7b6872a8442..00000000000 --- a/tests/language_2/deferred/closurize_load_library_lib.dart +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) 2014, 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 - -var trueVar = true; diff --git a/tests/language_2/deferred/closurize_load_library_test.dart b/tests/language_2/deferred/closurize_load_library_test.dart deleted file mode 100644 index 10a4a50218d..00000000000 --- a/tests/language_2/deferred/closurize_load_library_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; - -import "closurize_load_library_lib.dart" deferred as lib; - -void main() { - var x = lib.loadLibrary; - asyncStart(); - x().then((_) { - Expect.isTrue(lib.trueVar); - asyncEnd(); - }); -} diff --git a/tests/language_2/deferred/constant_list_lib.dart b/tests/language_2/deferred/constant_list_lib.dart deleted file mode 100644 index b8751391971..00000000000 --- a/tests/language_2/deferred/constant_list_lib.dart +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2014, 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 - -final finalConstList = const [1, 2]; -var nonFinalConstList = const [3, 4]; diff --git a/tests/language_2/deferred/constant_list_test.dart b/tests/language_2/deferred/constant_list_test.dart deleted file mode 100644 index cdae11c4ce6..00000000000 --- a/tests/language_2/deferred/constant_list_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; - -import "constant_list_lib.dart" deferred as lib; - -void main() { - asyncStart(); - lib.loadLibrary().then((_) { - Expect.equals("[1, 2]", lib.finalConstList.toString()); - Expect.equals("[3, 4]", lib.nonFinalConstList.toString()); - asyncEnd(); - }); -} diff --git a/tests/language_2/deferred/constraints_lib.dart b/tests/language_2/deferred/constraints_lib.dart deleted file mode 100644 index 531843256ad..00000000000 --- a/tests/language_2/deferred/constraints_lib.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2014, 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 - -class C { - static int staticMethod() => 42; -} - -class G {} - -class Const { - const Const(); - const Const.otherConstructor(); - static const instance = const Const(); -} - -const constantInstance = const Const(); diff --git a/tests/language_2/deferred/constraints_lib2.dart b/tests/language_2/deferred/constraints_lib2.dart deleted file mode 100644 index c2e165a1bc7..00000000000 --- a/tests/language_2/deferred/constraints_lib2.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2014, 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 - -foo() => 42; - -class C {} diff --git a/tests/language_2/deferred/constraints_type_annotation_test.dart b/tests/language_2/deferred/constraints_type_annotation_test.dart deleted file mode 100644 index bb620b8f46f..00000000000 --- a/tests/language_2/deferred/constraints_type_annotation_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; - -import "constraints_lib.dart" deferred as lib; -import "constraints_lib.dart" as lib2; //# type_annotation_non_deferred: ok - -class F {} - -class G2 {} - -main() { - lib.C a = null; //# type_annotation_null: compile-time error - Expect.throws(() { //# new_before_load: compile-time error - lib.C a = new lib.C(); //# new_before_load: continued - }, (e) => e is Error); //# new_before_load: continued - - // In this case we do not defer C. - lib2.C a1 = new lib2.C(); //# type_annotation_non_deferred: continued - asyncStart(); - lib.loadLibrary().then((_) { - lib.C a2 = new lib.C(); //# type_annotation1: compile-time error - lib.G a3 = new lib.G(); //# type_annotation_generic1: compile-time error - G2 a4 = new G2(); //# type_annotation_generic2: compile-time error - G2 a5 = new G2(); //# type_annotation_generic3: compile-time error - lib.G a = new lib.G(); //# type_annotation_generic4: compile-time error - var a6 = new lib.C(); //# new: ok - var g1 = new lib.G(); //# new_generic1: ok - // new G2() does not give a dynamic type error because a malformed - // type used as type-parameter is treated as dynamic. - var g2 = new G2(); //# new_generic2: compile-time error - var g3 = new lib.G(); //# new_generic3: compile-time error - var instance = lib.constantInstance; - Expect.throwsTypeError(() { //# is_check: compile-time error - bool a7 = instance is lib.Const; //# is_check: continued - }); //# is_check: continued - Expect.throwsTypeError(() { //# as_operation: compile-time error - instance as lib.Const; //# as_operation: continued - }); //# as_operation: continued - Expect.throwsTypeError(() { //# catch_check: compile-time error - try { throw instance; } on lib.Const {} //# catch_check: continued - }); //# catch_check: continued - int i = lib.C.staticMethod(); //# static_method: ok - asyncEnd(); - }); -} - -lib.C a9 = null; //# type_annotation_top_level: compile-time error diff --git a/tests/language_2/deferred/deferred_and_immediate_import_lib.dart b/tests/language_2/deferred/deferred_and_immediate_import_lib.dart deleted file mode 100644 index 26ffbdb10a1..00000000000 --- a/tests/language_2/deferred/deferred_and_immediate_import_lib.dart +++ /dev/null @@ -1,9 +0,0 @@ -// 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. - -// @dart = 2.9 - -foo() { - print("Foo!"); -} diff --git a/tests/language_2/deferred/deferred_and_immediate_import_test.dart b/tests/language_2/deferred/deferred_and_immediate_import_test.dart deleted file mode 100644 index 5294a9716d3..00000000000 --- a/tests/language_2/deferred/deferred_and_immediate_import_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -import "deferred_and_immediate_import_lib.dart" as immediatePrefix; -import "deferred_and_immediate_import_lib.dart" deferred as deferredPrefix; - -main() async { - immediatePrefix.foo(); - - Expect.throws(() { - deferredPrefix.foo(); - }); - - await deferredPrefix.loadLibrary(); - deferredPrefix.foo(); -} diff --git a/tests/language_2/deferred/duplicate_prefix1_runtime_test.dart b/tests/language_2/deferred/duplicate_prefix1_runtime_test.dart deleted file mode 100644 index 74362d0cb84..00000000000 --- a/tests/language_2/deferred/duplicate_prefix1_runtime_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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 "prefix_constraints_lib2.dart" as lib; - - -void main() {} diff --git a/tests/language_2/deferred/duplicate_prefix1_test.dart b/tests/language_2/deferred/duplicate_prefix1_test.dart deleted file mode 100644 index fa0bfe6f5da..00000000000 --- a/tests/language_2/deferred/duplicate_prefix1_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2014, 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 - -import "prefix_constraints_lib2.dart" as lib; -import "prefix_constraints_lib.dart" deferred as lib; -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SHARED_DEFERRED_PREFIX -// ^ -// [cfe] Can't use the name 'lib' for a deferred library, as the name is used elsewhere. - -void main() {} diff --git a/tests/language_2/deferred/duplicate_prefix2_runtime_test.dart b/tests/language_2/deferred/duplicate_prefix2_runtime_test.dart deleted file mode 100644 index fc462b0a794..00000000000 --- a/tests/language_2/deferred/duplicate_prefix2_runtime_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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 "prefix_constraints_lib2.dart" as lib; - -void main() {} diff --git a/tests/language_2/deferred/duplicate_prefix2_test.dart b/tests/language_2/deferred/duplicate_prefix2_test.dart deleted file mode 100644 index 21f839d7f66..00000000000 --- a/tests/language_2/deferred/duplicate_prefix2_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2014, 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 - -import "prefix_constraints_lib.dart" deferred as lib; -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SHARED_DEFERRED_PREFIX -// ^ -// [cfe] Can't use the name 'lib' for a deferred library, as the name is used elsewhere. -import "prefix_constraints_lib2.dart" as lib; - -void main() {} diff --git a/tests/language_2/deferred/duplicate_prefix3_runtime_test.dart b/tests/language_2/deferred/duplicate_prefix3_runtime_test.dart deleted file mode 100644 index ef6478e4f42..00000000000 --- a/tests/language_2/deferred/duplicate_prefix3_runtime_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - - - - -void main() {} diff --git a/tests/language_2/deferred/duplicate_prefix3_test.dart b/tests/language_2/deferred/duplicate_prefix3_test.dart deleted file mode 100644 index 59d732ad8d3..00000000000 --- a/tests/language_2/deferred/duplicate_prefix3_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2014, 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 - -import "prefix_constraints_lib.dart" deferred as lib; -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SHARED_DEFERRED_PREFIX -import "prefix_constraints_lib2.dart" deferred as lib; -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SHARED_DEFERRED_PREFIX -// ^ -// [cfe] Can't use the name 'lib' for a deferred library, as the name is used elsewhere. - -void main() {} diff --git a/tests/language_2/deferred/exported_main_lib.dart b/tests/language_2/deferred/exported_main_lib.dart deleted file mode 100644 index 8c92d0c7d29..00000000000 --- a/tests/language_2/deferred/exported_main_lib.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2022, 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() { - print("Usurper to the role of root library!"); -} diff --git a/tests/language_2/deferred/exported_main_test.dart b/tests/language_2/deferred/exported_main_test.dart deleted file mode 100644 index b7e19fbe916..00000000000 --- a/tests/language_2/deferred/exported_main_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2022, 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 - -export "exported_main_lib.dart"; - -@pragma("vm:entry-point") -foo() { - // The frontend will not recognize that this is the root library. Though this - // library is not reachable from what the frontend considers the root library, - // the entry point pragma will still cause this function to compiled by - // gen_snaption, so it is important that this library is assigned to a - // loading unit. -} diff --git a/tests/language_2/deferred/function_type_lib.dart b/tests/language_2/deferred/function_type_lib.dart deleted file mode 100644 index 098d752152e..00000000000 --- a/tests/language_2/deferred/function_type_lib.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'package:expect/expect.dart'; - -class T { - A foo(int x) {} -} - -class A {} - -typedef A F(int x); - -use(x) => x; - -runTest() { - use(new A()); - Expect.isTrue(new T().foo is F); -} diff --git a/tests/language_2/deferred/function_type_test.dart b/tests/language_2/deferred/function_type_test.dart deleted file mode 100644 index 7a0a2c22076..00000000000 --- a/tests/language_2/deferred/function_type_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2015, 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 - -// VMOptions= -// VMOptions=--dwarf_stack_traces --no-retain_function_objects --no-retain_code_objects - -import 'function_type_lib.dart' deferred as lib; - -main() { - lib.loadLibrary().then((_) { - lib.runTest(); - }); -} diff --git a/tests/language_2/deferred/global_lib.dart b/tests/language_2/deferred/global_lib.dart deleted file mode 100644 index 3299c42a617..00000000000 --- a/tests/language_2/deferred/global_lib.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2014, 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 - -var sideEffectCounter = 0; - -final finalConstGlobal = "finalConstGlobal"; -final finalNonConstGlobal = (() { - sideEffectCounter++; - return "finalNonConstGlobal"; -}()); - -var lazyConstGlobal = "lazyConstGlobal"; -// Regression test for bug #21840. -var const1Global = const {}; -final lazyConstGlobal2 = const1Global; - -var lazyNonConstGlobal = (() { - sideEffectCounter++; - return "lazyNonConstGlobal"; -}()); - -readFinalConstGlobal() => finalConstGlobal; -readFinalNonConstGlobal() => finalNonConstGlobal; -readLazyConstGlobal() => lazyConstGlobal; -readLazyNonConstGlobal() => lazyNonConstGlobal; -writeLazyConstGlobal(x) { - lazyConstGlobal = x; -} - -writeLazyNonConstGlobal(x) { - lazyNonConstGlobal = x; -} diff --git a/tests/language_2/deferred/global_test.dart b/tests/language_2/deferred/global_test.dart deleted file mode 100644 index 591d4e52826..00000000000 --- a/tests/language_2/deferred/global_test.dart +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; - -import "global_lib.dart" deferred as lib; - -var nonDeferredGlobal = const {}; - -void main() { - nonDeferredGlobal = null; - asyncStart(); - lib.loadLibrary().then((_) { - // Ensure non-deferred globals are not reset when loading a deferred - // library. - Expect.equals(null, nonDeferredGlobal); - - Expect.equals("finalConstGlobal", lib.finalConstGlobal); - Expect.equals(0, lib.sideEffectCounter); - Expect.equals("finalNonConstGlobal", lib.finalNonConstGlobal); - Expect.equals(1, lib.sideEffectCounter); - Expect.equals("finalConstGlobal", lib.finalConstGlobal); - Expect.equals("finalNonConstGlobal", lib.finalNonConstGlobal); - Expect.equals("lazyConstGlobal", lib.lazyConstGlobal); - Expect.equals(1, lib.sideEffectCounter); - Expect.equals("lazyNonConstGlobal", lib.lazyNonConstGlobal); - Expect.equals(2, lib.sideEffectCounter); - Expect.equals("finalConstGlobal", lib.readFinalConstGlobal()); - Expect.equals("finalNonConstGlobal", lib.readFinalNonConstGlobal()); - Expect.equals("lazyConstGlobal", lib.readLazyConstGlobal()); - Expect.equals("lazyNonConstGlobal", lib.readLazyNonConstGlobal()); - - lib.lazyConstGlobal = "lazyConstGlobal_mutated"; - lib.lazyNonConstGlobal = "lazyNonConstGlobal_mutated"; - Expect.equals("lazyConstGlobal_mutated", lib.lazyConstGlobal); - Expect.equals("lazyNonConstGlobal_mutated", lib.lazyNonConstGlobal); - Expect.equals("lazyConstGlobal_mutated", lib.readLazyConstGlobal()); - Expect.equals("lazyNonConstGlobal_mutated", lib.readLazyNonConstGlobal()); - Expect.equals(2, lib.sideEffectCounter); - - lib.writeLazyConstGlobal("lazyConstGlobal_mutated2"); - lib.writeLazyNonConstGlobal("lazyNonConstGlobal_mutated2"); - Expect.equals("lazyConstGlobal_mutated2", lib.lazyConstGlobal); - Expect.equals("lazyNonConstGlobal_mutated2", lib.lazyNonConstGlobal); - Expect.equals("lazyConstGlobal_mutated2", lib.readLazyConstGlobal()); - Expect.equals("lazyNonConstGlobal_mutated2", lib.readLazyNonConstGlobal()); - - Expect.mapEquals({}, lib.lazyConstGlobal2); - lib.const1Global = const {'foo': 'bar'}; - Expect.equals(2, lib.sideEffectCounter); - Expect.equals(const {'foo': 'bar'}['foo'], lib.const1Global['foo']); - // Try loading the deferred library again, should not reset the globals. - lib.loadLibrary().then((_) { - Expect.equals(const {'foo': 'bar'}['foo'], lib.const1Global['foo']); - asyncEnd(); - }); - }); -} diff --git a/tests/language_2/deferred/import_core_test.dart b/tests/language_2/deferred/import_core_test.dart deleted file mode 100644 index 968fe90406d..00000000000 --- a/tests/language_2/deferred/import_core_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2016, 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 - -// Nothing in the language spec explicitly prohibits a deferred import of -// 'dart:core'. Make sure it doesn't lead to any strange behavior. - -import "dart:core" deferred as core show Object; - -main() { - core.loadLibrary().then((_) => null); -} diff --git a/tests/language_2/deferred/inheritance_constraints_lib.dart b/tests/language_2/deferred/inheritance_constraints_lib.dart deleted file mode 100644 index 5211f743565..00000000000 --- a/tests/language_2/deferred/inheritance_constraints_lib.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2014, 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 - -class Foo {} - -class Foo2 {} diff --git a/tests/language_2/deferred/inheritance_constraints_runtime_test.dart b/tests/language_2/deferred/inheritance_constraints_runtime_test.dart deleted file mode 100644 index 42d0b221137..00000000000 --- a/tests/language_2/deferred/inheritance_constraints_runtime_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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 "package:expect/expect.dart"; -import "inheritance_constraints_lib.dart" deferred as lib; - -class Foo {} - -class Foo2 extends D {} - -class A extends - - Foo {} - -class B - implements - - Foo {} - -class C1 {} - -class C = C1 - with - - Foo; - -class D { - D(); - factory D.factory() = - - Foo2; -} - -void main() { - new A(); - new B(); - new C(); - new D.factory(); -} diff --git a/tests/language_2/deferred/inheritance_constraints_test.dart b/tests/language_2/deferred/inheritance_constraints_test.dart deleted file mode 100644 index 065443b5c3c..00000000000 --- a/tests/language_2/deferred/inheritance_constraints_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; -import "inheritance_constraints_lib.dart" deferred as lib; - -class Foo {} - -class Foo2 extends D {} - -class A extends lib.Foo {} -// ^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DEFERRED_CLASS - -class B implements lib.Foo {} -// ^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DEFERRED_CLASS - -class C1 {} - -class C = C1 with lib.Foo; -// ^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DEFERRED_CLASS - -class D { - D(); - factory D.factory() = lib.Foo2; -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE -// [cfe] The constructor function type 'Foo2 Function()' isn't a subtype of 'D Function()'. -} - -void main() { - new A(); - new B(); - new C(); - new D.factory(); -} diff --git a/tests/language_2/deferred/inlined_test.dart b/tests/language_2/deferred/inlined_test.dart deleted file mode 100644 index 1f48d6b85b8..00000000000 --- a/tests/language_2/deferred/inlined_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2014, 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. -// VMOptions=--optimization-counter-threshold=10 - -// @dart = 2.9 - -// Declares foo that returns 42. -import "constraints_lib2.dart" deferred as lib; - -import 'package:expect/expect.dart'; - -bool libLoaded = false; - -main() { - Expect.equals(88, heyhey()); - - // Trigger optimization of 'hehey' which inlines 'barbar'. - for (int i = 0; i < 30000; i++) { - heyhey(); - } - - lib.loadLibrary().then((_) { - libLoaded = true; - Expect.equals(42, heyhey()); - }); -} - -// Inline bar in optimized code. -heyhey() => barbar(); - -barbar() { - if (libLoaded) { - // Returns 42. - return lib.foo(); - } - return 88; -} diff --git a/tests/language_2/deferred/load_constants.dart b/tests/language_2/deferred/load_constants.dart deleted file mode 100644 index 9948757c4ac..00000000000 --- a/tests/language_2/deferred/load_constants.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2015, 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 version of two-argument Ackermann-Peter function. - -// @dart = 2.9 - -library deferred_load_constants; - -// Constant declaration. -const c = const C(); - -// Class declaration (`C` is a constant expression). -class C { - const C(); - static int staticfun(int x) => x; -} - -// Function type definition. -typedef int funtype(int x); -// Top-level function. -int toplevel(int x) => x; diff --git a/tests/language_2/deferred/load_constants_runtime_test.dart b/tests/language_2/deferred/load_constants_runtime_test.dart deleted file mode 100644 index 4d35e068e68..00000000000 --- a/tests/language_2/deferred/load_constants_runtime_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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 version of two-argument Ackermann-Peter function. - -library deferred_load_constants; - -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; -import "load_constants.dart" deferred as foo; -import "load_constants.dart"; - -main() { - asyncStart(); - Expect.throws(() => foo.c); - Expect.throws(() => foo.C); - Expect.throws(() => foo.funtype); - Expect.throws(() => foo.toplevel); - foo.loadLibrary().whenComplete(() { - // Reading constant declarations through deferred prefix works. - Expect.identical(c, foo.c); - Expect.identical(C, foo.C); - Expect.identical(funtype, foo.funtype); - Expect.identical(toplevel, foo.toplevel); - Expect.identical(C.staticfun, foo.C.staticfun); - // Access through deferred prefix is not a constant expression. - - - - - - - asyncEnd(); - }); -} diff --git a/tests/language_2/deferred/load_constants_test.dart b/tests/language_2/deferred/load_constants_test.dart deleted file mode 100644 index b96e944a691..00000000000 --- a/tests/language_2/deferred/load_constants_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2015, 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 version of two-argument Ackermann-Peter function. - -// @dart = 2.9 - -library deferred_load_constants; - -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; -import "load_constants.dart" deferred as foo; -import "load_constants.dart"; - -main() { - asyncStart(); - Expect.throws(() => foo.c); - Expect.throws(() => foo.C); - Expect.throws(() => foo.funtype); - Expect.throws(() => foo.toplevel); - foo.loadLibrary().whenComplete(() { - // Reading constant declarations through deferred prefix works. - Expect.identical(c, foo.c); - Expect.identical(C, foo.C); - Expect.identical(funtype, foo.funtype); - Expect.identical(toplevel, foo.toplevel); - Expect.identical(C.staticfun, foo.C.staticfun); - // Access through deferred prefix is not a constant expression. - Expect.throws(() => const [foo.c]); - // ^ - // [cfe] Constant evaluation error: - // ^^^^^ - // [cfe] 'foo' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded. - // ^ - // [analyzer] COMPILE_TIME_ERROR.COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY - Expect.throws(() => const [foo.C]); - // ^ - // [cfe] Constant evaluation error: - // ^^^^^ - // [cfe] 'foo' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded. - // ^ - // [analyzer] COMPILE_TIME_ERROR.COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY - Expect.throws(() => const [foo.funtype]); - // ^ - // [cfe] Constant evaluation error: - // ^^^^^^^^^^^ - // [cfe] 'foo' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded. - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY - Expect.throws(() => const [foo.toplevel]); - // ^ - // [cfe] Constant evaluation error: - // ^^^^^^^^^^^^ - // [cfe] 'foo' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded. - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY - Expect.throws(() => const [foo.C.staticfun]); - // ^ - // [cfe] Constant evaluation error: - // ^^^^^^^^^^^^^^^ - // [cfe] 'foo' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded. - // ^ - // [analyzer] COMPILE_TIME_ERROR.COLLECTION_ELEMENT_FROM_DEFERRED_LIBRARY - - asyncEnd(); - }); -} diff --git a/tests/language_2/deferred/load_inval_code_lib.dart b/tests/language_2/deferred/load_inval_code_lib.dart deleted file mode 100644 index d586b249e84..00000000000 --- a/tests/language_2/deferred/load_inval_code_lib.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2014, 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 - -foo() { - return "foo from library"; -} diff --git a/tests/language_2/deferred/load_inval_code_test.dart b/tests/language_2/deferred/load_inval_code_test.dart deleted file mode 100644 index 88a2f325c65..00000000000 --- a/tests/language_2/deferred/load_inval_code_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2014, 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. -// -// VMOptions=--optimization-counter-threshold=100 - -// @dart = 2.9 - -import "load_inval_code_lib.dart" deferred as d; - -bool loaded = false; - -var x = 0; - -bla() { - if (loaded) { - // Loading the library should have invalidated the optimized - // code containing the NSME. Now expect this call to succeed. - d.foo(); - } else { - // Do some "busy work" to trigger optimization. - for (var i = 0; i < 100; i++) { - x++; - } - } -} - -warmup() { - for (int i = 1; i < 1000; i++) { - bla(); - } -} - -main() { - warmup(); - d.loadLibrary().then((_) { - loaded = true; - bla(); - }); -} diff --git a/tests/language_2/deferred/load_library_wrong_args_lib.dart b/tests/language_2/deferred/load_library_wrong_args_lib.dart deleted file mode 100644 index 4f27b7807f7..00000000000 --- a/tests/language_2/deferred/load_library_wrong_args_lib.dart +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) 2014, 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 - -foo() => 42; diff --git a/tests/language_2/deferred/load_library_wrong_args_test.dart b/tests/language_2/deferred/load_library_wrong_args_test.dart deleted file mode 100644 index 0565e5907f9..00000000000 --- a/tests/language_2/deferred/load_library_wrong_args_test.dart +++ /dev/null @@ -1,12 +0,0 @@ - -// @dart = 2.9 -import "load_library_wrong_args_lib.dart" deferred as lib; - -void main() { - // Loadlibrary should be called without arguments. - lib.loadLibrary(10); -// ^ -// [cfe] 'loadLibrary' takes no arguments. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS -} diff --git a/tests/language_2/deferred/loading_unit_root_has_only_export_lib1.dart b/tests/language_2/deferred/loading_unit_root_has_only_export_lib1.dart deleted file mode 100644 index 073fb853414..00000000000 --- a/tests/language_2/deferred/loading_unit_root_has_only_export_lib1.dart +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) 2022, 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 - -export "loading_unit_root_has_only_export_lib2.dart"; diff --git a/tests/language_2/deferred/loading_unit_root_has_only_export_lib2.dart b/tests/language_2/deferred/loading_unit_root_has_only_export_lib2.dart deleted file mode 100644 index cfd8e4e9e17..00000000000 --- a/tests/language_2/deferred/loading_unit_root_has_only_export_lib2.dart +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) 2022, 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 - -foo() => "in lib2"; diff --git a/tests/language_2/deferred/loading_unit_root_has_only_export_test.dart b/tests/language_2/deferred/loading_unit_root_has_only_export_test.dart deleted file mode 100644 index 5fff57ba357..00000000000 --- a/tests/language_2/deferred/loading_unit_root_has_only_export_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2022, 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 - -import "package:expect/expect.dart"; -import "loading_unit_root_has_only_export_lib1.dart" deferred as lib; - -main() async { - await lib.loadLibrary(); - Expect.equals(lib.foo(), "in lib2"); -} diff --git a/tests/language_2/deferred/mixin_lib1.dart b/tests/language_2/deferred/mixin_lib1.dart deleted file mode 100644 index ae316376755..00000000000 --- a/tests/language_2/deferred/mixin_lib1.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2014, 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 lib1; - -import "mixin_shared.dart"; -import "mixin_test.dart"; - -class Mixin { - foo() => "lib1.Mixin"; -} - -class A extends Object with NonDeferredMixin { - foo() { - return "A with " + super.foo(); - } -} - -class B extends Object with Mixin { - foo() { - return "B with " + super.foo(); - } -} - -class C extends Object with Mixin, NonDeferredMixin1 { - foo() { - return "C with " + super.foo(); - } -} - -class D extends Object with NonDeferredMixin2, Mixin { - foo() { - return "D with " + super.foo(); - } -} - -class E extends Object with SharedMixin { - foo() { - return "E with " + super.foo(); - } -} diff --git a/tests/language_2/deferred/mixin_lib2.dart b/tests/language_2/deferred/mixin_lib2.dart deleted file mode 100644 index 899b6fd0c85..00000000000 --- a/tests/language_2/deferred/mixin_lib2.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2014, 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 lib2; - -import "mixin_shared.dart"; - -class A extends Object with SharedMixin { - foo() { - return "lib2.A with " + super.foo(); - } -} diff --git a/tests/language_2/deferred/mixin_shared.dart b/tests/language_2/deferred/mixin_shared.dart deleted file mode 100644 index 7c97830eb61..00000000000 --- a/tests/language_2/deferred/mixin_shared.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2014, 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 shared; - -class SharedMixin { - foo() => "SharedMixin"; -} diff --git a/tests/language_2/deferred/mixin_test.dart b/tests/language_2/deferred/mixin_test.dart deleted file mode 100644 index 3fa9a8b7562..00000000000 --- a/tests/language_2/deferred/mixin_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; - -import "mixin_lib1.dart" deferred as lib1; -import "mixin_lib2.dart" deferred as lib2; - -class NonDeferredMixin { - foo() => "NonDeferredMixin"; -} - -class NonDeferredMixin1 { - foo() => "NonDeferredMixin1"; -} - -class NonDeferredMixin2 { - foo() => "NonDeferredMixin2"; -} - -main() { - Expect.equals("NonDeferredMixin", new NonDeferredMixin().foo()); - Expect.equals("NonDeferredMixin1", new NonDeferredMixin1().foo()); - Expect.equals("NonDeferredMixin2", new NonDeferredMixin2().foo()); - asyncStart(); - lib1.loadLibrary().then((_) { - Expect.equals("lib1.Mixin", new lib1.Mixin().foo()); - Expect.equals("A with NonDeferredMixin", new lib1.A().foo()); - Expect.equals("B with lib1.Mixin", new lib1.B().foo()); - Expect.equals("C with NonDeferredMixin1", new lib1.C().foo()); - Expect.equals("D with lib1.Mixin", new lib1.D().foo()); - Expect.equals("E with SharedMixin", new lib1.E().foo()); - lib2.loadLibrary().then((_) { - Expect.equals("lib2.A with SharedMixin", new lib2.A().foo()); - asyncEnd(); - }); - }); -} diff --git a/tests/language_2/deferred/no_prefix_runtime_test.dart b/tests/language_2/deferred/no_prefix_runtime_test.dart deleted file mode 100644 index 7b1d25141a7..00000000000 --- a/tests/language_2/deferred/no_prefix_runtime_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -// Loading a deferred library without prefix is not allowed. -import "constraints_lib2.dart" - - ; - -void main() {} diff --git a/tests/language_2/deferred/no_prefix_test.dart b/tests/language_2/deferred/no_prefix_test.dart deleted file mode 100644 index 5d04ee4e524..00000000000 --- a/tests/language_2/deferred/no_prefix_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2014, 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 - -// Loading a deferred library without prefix is not allowed. -import "constraints_lib2.dart" - deferred -//^^^^^^^^ -// [analyzer] SYNTACTIC_ERROR.MISSING_PREFIX_IN_DEFERRED_IMPORT -// [cfe] Deferred imports should have a prefix. - ; - -void main() {} diff --git a/tests/language_2/deferred/no_such_method_lib.dart b/tests/language_2/deferred/no_such_method_lib.dart deleted file mode 100644 index 58b2b7e4cda..00000000000 --- a/tests/language_2/deferred/no_such_method_lib.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2014, 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 - -class C { - noSuchMethod(Invocation invocation) => 42; -} diff --git a/tests/language_2/deferred/no_such_method_test.dart b/tests/language_2/deferred/no_such_method_test.dart deleted file mode 100644 index e4324997ba8..00000000000 --- a/tests/language_2/deferred/no_such_method_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; - -import "no_such_method_lib.dart" deferred as lib; - -void main() { - asyncStart(); - lib.loadLibrary().then((_) { - Expect.equals(42, (new lib.C() as dynamic).nonExisting()); - asyncEnd(); - }); -} diff --git a/tests/language_2/deferred/not_loaded_check_lib.dart b/tests/language_2/deferred/not_loaded_check_lib.dart deleted file mode 100644 index 1ca4f5f82e1..00000000000 --- a/tests/language_2/deferred/not_loaded_check_lib.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2014, 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 - -foo(int arg) {} - -class C { - C(int arg) {} - static foo(int arg) {} -} - -var a; - -int get getter => 42; - -void set setter(int arg) { - a = 10; -} - -var list = []; - -var closure = (int arg) => 3; diff --git a/tests/language_2/deferred/not_loaded_check_test.dart b/tests/language_2/deferred/not_loaded_check_test.dart deleted file mode 100644 index c08177caf51..00000000000 --- a/tests/language_2/deferred/not_loaded_check_test.dart +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; - -import "not_loaded_check_lib.dart" deferred as lib; - -// Test that we give appropriate errors when accessing an element that is not -// yet loaded. - -var c; - -expectSideEffect(test) { - c = 0; - test(); - Expect.isTrue(c == 1); -} - -expectNoSideEffect(test) { - c = 0; - test(); - Expect.isTrue(c == 0); -} - -expectThrowsNotLoaded(test) { - Expect.throws(test, (e) => e is Error); -} - -int sideEffect() { - c = 1; - return 10; -} - -void main() { - expectSideEffect(() { - expectThrowsNotLoaded(() { - lib.foo(sideEffect()); - }); - }); - expectNoSideEffect(() { - expectThrowsNotLoaded(() { - lib.C.foo(sideEffect()); - }); - }); - expectSideEffect(() { - expectThrowsNotLoaded(() { - new lib.C(sideEffect()); - }); - }); - expectThrowsNotLoaded(() { - lib.a; - }); - expectSideEffect(() { - expectThrowsNotLoaded(() { - lib.a = sideEffect(); - }); - }); - expectThrowsNotLoaded(() { - lib.getter; - }); - expectSideEffect(() { - expectThrowsNotLoaded(() { - lib.setter = sideEffect(); - }); - }); - expectNoSideEffect(() { - expectThrowsNotLoaded(() { - lib.list[sideEffect()] = sideEffect(); - }); - }); - expectSideEffect(() { - expectThrowsNotLoaded(() { - lib.closure(sideEffect()); - }); - }); -} diff --git a/tests/language_2/deferred/only_constant_lib.dart b/tests/language_2/deferred/only_constant_lib.dart deleted file mode 100644 index 4bced2af9c6..00000000000 --- a/tests/language_2/deferred/only_constant_lib.dart +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) 2014, 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 - -const constant = const ["a", "b", "c"]; diff --git a/tests/language_2/deferred/only_constant_test.dart b/tests/language_2/deferred/only_constant_test.dart deleted file mode 100644 index 06970f3a97d..00000000000 --- a/tests/language_2/deferred/only_constant_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2014, 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 - -// Testing import of only constants from a deferred library. - -import 'package:expect/expect.dart'; - -import "only_constant_lib.dart" deferred as lib; - -void main() { - lib.loadLibrary().then((_) { - Expect.equals(lib.constant, const ["a", "b", "c"]); - }); -} diff --git a/tests/language_2/deferred/optimized_test.dart b/tests/language_2/deferred/optimized_test.dart deleted file mode 100644 index 5f053b90d5e..00000000000 --- a/tests/language_2/deferred/optimized_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2014, 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. -// VMOptions=--optimization-counter-threshold=10 --compiler-passes=-Inlining - -// @dart = 2.9 - -// Declares foo that returns 42. -import "constraints_lib2.dart" deferred as lib; - -import 'package:expect/expect.dart'; - -bool libLoaded = false; - -main() { - Expect.equals(88, heyhey()); - - for (int i = 0; i < 30; i++) { - heyhey(); - } - - lib.loadLibrary().then((_) { - libLoaded = true; - Expect.equals(42, heyhey()); - }); -} - -heyhey() => barbar(); - -barbar() { - if (libLoaded) { - // Returns 42. - return lib.foo(); - } - return 88; -} diff --git a/tests/language_2/deferred/prefix_constraints_lib.dart b/tests/language_2/deferred/prefix_constraints_lib.dart deleted file mode 100644 index 116acbd8c13..00000000000 --- a/tests/language_2/deferred/prefix_constraints_lib.dart +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) 2014, 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 - -foo() => 24; diff --git a/tests/language_2/deferred/prefix_constraints_lib2.dart b/tests/language_2/deferred/prefix_constraints_lib2.dart deleted file mode 100644 index 116acbd8c13..00000000000 --- a/tests/language_2/deferred/prefix_constraints_lib2.dart +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) 2014, 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 - -foo() => 24; diff --git a/tests/language_2/deferred/prefix_importer_tree_shaken_deferred.dart b/tests/language_2/deferred/prefix_importer_tree_shaken_deferred.dart deleted file mode 100644 index 1278e037c84..00000000000 --- a/tests/language_2/deferred/prefix_importer_tree_shaken_deferred.dart +++ /dev/null @@ -1,10 +0,0 @@ -// 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. - -// @dart = 2.9 - -@pragma("vm:never-inline") -bar() { - return "bar"; -} diff --git a/tests/language_2/deferred/prefix_importer_tree_shaken_immediate.dart b/tests/language_2/deferred/prefix_importer_tree_shaken_immediate.dart deleted file mode 100644 index 966a5a3f263..00000000000 --- a/tests/language_2/deferred/prefix_importer_tree_shaken_immediate.dart +++ /dev/null @@ -1,13 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "prefix_importer_tree_shaken_deferred.dart" deferred as d; - -@pragma("vm:prefer-inline") -load() => d.loadLibrary(); - -@pragma("vm:prefer-inline") -foo() => d.bar(); diff --git a/tests/language_2/deferred/prefix_importer_tree_shaken_test.dart b/tests/language_2/deferred/prefix_importer_tree_shaken_test.dart deleted file mode 100644 index 48c2ec1468e..00000000000 --- a/tests/language_2/deferred/prefix_importer_tree_shaken_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// VMOptions=--dwarf_stack_traces=true -/// VMOptions=--dwarf_stack_traces=false - -import "prefix_importer_tree_shaken_immediate.dart" as i; - -main() async { - await i.load(); - print(await i.foo()); -} diff --git a/tests/language_2/deferred/redirecting_factory_lib1.dart b/tests/language_2/deferred/redirecting_factory_lib1.dart deleted file mode 100644 index 18f775151ad..00000000000 --- a/tests/language_2/deferred/redirecting_factory_lib1.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2015, 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 lib1; - -import "redirecting_factory_lib2.dart" deferred as lib2; -import "redirecting_factory_test.dart" as main; - -loadLib2() { - return lib2.loadLibrary(); -} - -class C extends main.C { - String get foo => "lib1"; - C(); - factory C.a() = lib2.C; -} diff --git a/tests/language_2/deferred/redirecting_factory_lib2.dart b/tests/language_2/deferred/redirecting_factory_lib2.dart deleted file mode 100644 index 94536d7631d..00000000000 --- a/tests/language_2/deferred/redirecting_factory_lib2.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2015, 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 lib2; - -import "redirecting_factory_lib1.dart" as lib1; - -class C extends lib1.C { - String get foo => "lib2"; -} diff --git a/tests/language_2/deferred/redirecting_factory_test.dart b/tests/language_2/deferred/redirecting_factory_test.dart deleted file mode 100644 index 2c8b449e0e8..00000000000 --- a/tests/language_2/deferred/redirecting_factory_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2015, 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 main; - -import "redirecting_factory_lib1.dart" deferred as lib1; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -class C { - String get foo => "main"; - C(); - factory C.a() = lib1.C; - factory C.b() = lib1.C.a; -} - -test1() async { - Expect.throws(() { - new C.a(); - }); - Expect.throws(() { - new C.b(); - }); -} - -test2() async { - await lib1.loadLibrary(); - Expect.equals("lib1", new C.a().foo); - Expect.throws(() { - new C.b(); - }); -} - -test3() async { - await lib1.loadLibrary(); - await lib1.loadLib2(); - Expect.equals("lib1", new C.a().foo); - Expect.equals("lib2", new C.b().foo); -} - -test() async { - await test1(); - await test2(); - await test3(); -} - -void main() { - asyncStart(); - test().then((_) => asyncEnd()); -} diff --git a/tests/language_2/deferred/regression_22995_lib.dart b/tests/language_2/deferred/regression_22995_lib.dart deleted file mode 100644 index c4e7e928b84..00000000000 --- a/tests/language_2/deferred/regression_22995_lib.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'regression_22995_test.dart'; - -foofoo() { - new A(); - new B(); - new C(); -} diff --git a/tests/language_2/deferred/regression_22995_test.dart b/tests/language_2/deferred/regression_22995_test.dart deleted file mode 100644 index ca831d1efa9..00000000000 --- a/tests/language_2/deferred/regression_22995_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2015, 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 - -// Test that closurizing a function implies a dependency on its type. - -import "package:expect/expect.dart"; - -import 'regression_22995_lib.dart' deferred as lib; - -class A {} - -class B {} - -class C {} - -typedef Ti(int x); -typedef TB(B x); -typedef TTi(Ti x); -typedef Tg(T x); - -class T { - fA(A a) => null; - fTB(TB a) => null; - fTgC(Tg a) => null; -} - -main() { - Expect.isFalse(new T().fA is Ti); - Expect.isFalse(new T().fTB is TTi); - Expect.isFalse(new T().fTgC is TTi); - lib.loadLibrary().then((_) { - lib.foofoo(); - }); -} diff --git a/tests/language_2/deferred/regression_28678_lib.dart b/tests/language_2/deferred/regression_28678_lib.dart deleted file mode 100644 index 7c13077cd7c..00000000000 --- a/tests/language_2/deferred/regression_28678_lib.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2017, 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 - -var v; - -class Clazz {} diff --git a/tests/language_2/deferred/regression_28678_test.dart b/tests/language_2/deferred/regression_28678_test.dart deleted file mode 100644 index 7790ccaeedb..00000000000 --- a/tests/language_2/deferred/regression_28678_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2017, 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 - -// Test that await after deferred loading works as expected. - -import 'dart:async'; -import "package:expect/expect.dart"; -import 'regression_28678_lib.dart' deferred as lib; - -class A { - m() => "here"; -} - -f(a, b) => new Future.microtask(() {}); - -class R { - Future test_deferred() async { - var a = new A(); - await lib.loadLibrary(); - await f(lib.Clazz, lib.v); - Expect.equals("here", a.m()); - } -} - -main() async { - await new R().test_deferred(); -} diff --git a/tests/language_2/deferred/shadow_load_library_lib.dart b/tests/language_2/deferred/shadow_load_library_lib.dart deleted file mode 100644 index f29d4cc8e7c..00000000000 --- a/tests/language_2/deferred/shadow_load_library_lib.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2014, 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 - -loadLibrary() => 42; - -var trueVar = true; diff --git a/tests/language_2/deferred/shadow_load_library_test.dart b/tests/language_2/deferred/shadow_load_library_test.dart deleted file mode 100644 index 3cc1dfcdc15..00000000000 --- a/tests/language_2/deferred/shadow_load_library_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2014, 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 - -import "dart:async"; -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; - -// This library contains a member loadLibrary. -// Check that we shadow this member. -import "shadow_load_library_lib.dart" deferred as lib; - -void main() { - var x = lib.loadLibrary(); - Expect.isTrue(x is Future); - asyncStart(); - x.then((_) { - Expect.isTrue(lib.trueVar); - // Check that shadowing still is in place after loading the library. - Expect.isTrue(lib.loadLibrary() is Future); - asyncEnd(); - }); -} diff --git a/tests/language_2/deferred/shared_and_unshared_classes_lib1.dart b/tests/language_2/deferred/shared_and_unshared_classes_lib1.dart deleted file mode 100644 index f62c0fc0ddf..00000000000 --- a/tests/language_2/deferred/shared_and_unshared_classes_lib1.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2015, 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 lib1; - -import "shared_and_unshared_classes_lib_shared.dart"; - -foo() { - print(new C1()); - print(new CShared()); -} diff --git a/tests/language_2/deferred/shared_and_unshared_classes_lib2.dart b/tests/language_2/deferred/shared_and_unshared_classes_lib2.dart deleted file mode 100644 index 3d99dc67bbd..00000000000 --- a/tests/language_2/deferred/shared_and_unshared_classes_lib2.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2015, 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 lib2; - -import "shared_and_unshared_classes_lib_shared.dart"; - -foo() { - print(new C2()); - print(new CShared()); -} diff --git a/tests/language_2/deferred/shared_and_unshared_classes_lib_shared.dart b/tests/language_2/deferred/shared_and_unshared_classes_lib_shared.dart deleted file mode 100644 index a8bbf913f76..00000000000 --- a/tests/language_2/deferred/shared_and_unshared_classes_lib_shared.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2015, 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 shared; - -class CShared { - toString() => "shared"; -} - -class C1 { - toString() => "C1"; -} - -class C2 { - toString() => "C2"; -} diff --git a/tests/language_2/deferred/shared_and_unshared_classes_test.dart b/tests/language_2/deferred/shared_and_unshared_classes_test.dart deleted file mode 100644 index ef2e5805a97..00000000000 --- a/tests/language_2/deferred/shared_and_unshared_classes_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2015, 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 - -// VMOptions= -// VMOptions=--dwarf_stack_traces --no-retain_function_objects --no-retain_code_objects - -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; -import "shared_and_unshared_classes_lib1.dart" deferred as lib1; -import "shared_and_unshared_classes_lib2.dart" deferred as lib2; -import "dart:async"; - -void main() { - asyncTest(() { - return Future.wait([ - lib1.loadLibrary().then((_) { - lib1.foo(); - }), - lib2.loadLibrary().then((_) { - lib2.foo(); - }) - ]); - }); -} diff --git a/tests/language_2/deferred/split_constants_canonicalization_a.dart b/tests/language_2/deferred/split_constants_canonicalization_a.dart deleted file mode 100644 index 4f732d66237..00000000000 --- a/tests/language_2/deferred/split_constants_canonicalization_a.dart +++ /dev/null @@ -1,31 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "split_constants_canonicalization_a_1.dart" deferred as a_1; -import "split_constants_canonicalization_a_2.dart" deferred as a_2; - -loadChildren() async { - await a_1.loadLibrary(); - await a_2.loadLibrary(); -} - -a_1_mint() => a_1.mint(); -a_1_string() => a_1.string(); -a_1_list() => a_1.list(); -a_1_map() => a_1.map(); -a_1_box() => a_1.box(); -a_1_enum() => a_1.enumm(); -a_1_type() => a_1.type(); -a_1_closure() => a_1.closure(); - -a_2_mint() => a_2.mint(); -a_2_string() => a_2.string(); -a_2_list() => a_2.list(); -a_2_map() => a_2.map(); -a_2_box() => a_2.box(); -a_2_enum() => a_2.enumm(); -a_2_type() => a_2.type(); -a_2_closure() => a_2.closure(); diff --git a/tests/language_2/deferred/split_constants_canonicalization_a_1.dart b/tests/language_2/deferred/split_constants_canonicalization_a_1.dart deleted file mode 100644 index 04157bbfa97..00000000000 --- a/tests/language_2/deferred/split_constants_canonicalization_a_1.dart +++ /dev/null @@ -1,31 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "split_constants_canonicalization_test.dart"; - -@pragma("vm:never-inline") -mint() => 0x7FFFFFFFFFFFF000; // Boxed 64-bit integer on VM. - -@pragma("vm:never-inline") -string() => "We all have identical strings"; - -@pragma("vm:never-inline") -list() => const ["We all have identical lists"]; - -@pragma("vm:never-inline") -map() => const {"We all have": "identical maps"}; - -@pragma("vm:never-inline") -box() => const Box("We all have identical boxes"); - -@pragma("vm:never-inline") -enumm() => Enum.GREEN; - -@pragma("vm:never-inline") -type() => Box; - -@pragma("vm:never-inline") -closure() => commonClosure; diff --git a/tests/language_2/deferred/split_constants_canonicalization_a_2.dart b/tests/language_2/deferred/split_constants_canonicalization_a_2.dart deleted file mode 100644 index 89b9d83870b..00000000000 --- a/tests/language_2/deferred/split_constants_canonicalization_a_2.dart +++ /dev/null @@ -1,31 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "split_constants_canonicalization_test.dart"; - -@pragma("vm:never-inline") -mint() => 0x7FFFFFFFFFFFF000; - -@pragma("vm:never-inline") -string() => "We all have identical strings"; - -@pragma("vm:never-inline") -list() => const ["We all have identical lists"]; - -@pragma("vm:never-inline") -map() => const {"We all have": "identical maps"}; - -@pragma("vm:never-inline") -box() => const Box("We all have identical boxes"); - -@pragma("vm:never-inline") -enumm() => Enum.GREEN; - -@pragma("vm:never-inline") -type() => Box; - -@pragma("vm:never-inline") -closure() => commonClosure; diff --git a/tests/language_2/deferred/split_constants_canonicalization_b.dart b/tests/language_2/deferred/split_constants_canonicalization_b.dart deleted file mode 100644 index 4a901301953..00000000000 --- a/tests/language_2/deferred/split_constants_canonicalization_b.dart +++ /dev/null @@ -1,31 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "split_constants_canonicalization_b_1.dart" deferred as b_1; -import "split_constants_canonicalization_b_2.dart" deferred as b_2; - -loadChildren() async { - await b_1.loadLibrary(); - await b_2.loadLibrary(); -} - -b_1_mint() => b_1.mint(); -b_1_string() => b_1.string(); -b_1_list() => b_1.list(); -b_1_map() => b_1.map(); -b_1_box() => b_1.box(); -b_1_enum() => b_1.enumm(); -b_1_type() => b_1.type(); -b_1_closure() => b_1.closure(); - -b_2_mint() => b_2.mint(); -b_2_string() => b_2.string(); -b_2_list() => b_2.list(); -b_2_map() => b_2.map(); -b_2_box() => b_2.box(); -b_2_enum() => b_2.enumm(); -b_2_type() => b_2.type(); -b_2_closure() => b_2.closure(); diff --git a/tests/language_2/deferred/split_constants_canonicalization_b_1.dart b/tests/language_2/deferred/split_constants_canonicalization_b_1.dart deleted file mode 100644 index 89b9d83870b..00000000000 --- a/tests/language_2/deferred/split_constants_canonicalization_b_1.dart +++ /dev/null @@ -1,31 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "split_constants_canonicalization_test.dart"; - -@pragma("vm:never-inline") -mint() => 0x7FFFFFFFFFFFF000; - -@pragma("vm:never-inline") -string() => "We all have identical strings"; - -@pragma("vm:never-inline") -list() => const ["We all have identical lists"]; - -@pragma("vm:never-inline") -map() => const {"We all have": "identical maps"}; - -@pragma("vm:never-inline") -box() => const Box("We all have identical boxes"); - -@pragma("vm:never-inline") -enumm() => Enum.GREEN; - -@pragma("vm:never-inline") -type() => Box; - -@pragma("vm:never-inline") -closure() => commonClosure; diff --git a/tests/language_2/deferred/split_constants_canonicalization_b_2.dart b/tests/language_2/deferred/split_constants_canonicalization_b_2.dart deleted file mode 100644 index 89b9d83870b..00000000000 --- a/tests/language_2/deferred/split_constants_canonicalization_b_2.dart +++ /dev/null @@ -1,31 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "split_constants_canonicalization_test.dart"; - -@pragma("vm:never-inline") -mint() => 0x7FFFFFFFFFFFF000; - -@pragma("vm:never-inline") -string() => "We all have identical strings"; - -@pragma("vm:never-inline") -list() => const ["We all have identical lists"]; - -@pragma("vm:never-inline") -map() => const {"We all have": "identical maps"}; - -@pragma("vm:never-inline") -box() => const Box("We all have identical boxes"); - -@pragma("vm:never-inline") -enumm() => Enum.GREEN; - -@pragma("vm:never-inline") -type() => Box; - -@pragma("vm:never-inline") -closure() => commonClosure; diff --git a/tests/language_2/deferred/split_constants_canonicalization_test.dart b/tests/language_2/deferred/split_constants_canonicalization_test.dart deleted file mode 100644 index a13d2ffdbdb..00000000000 --- a/tests/language_2/deferred/split_constants_canonicalization_test.dart +++ /dev/null @@ -1,93 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; -import "split_constants_canonicalization_a.dart" deferred as a; -import "split_constants_canonicalization_b.dart" deferred as b; - -class Box { - final contents; - const Box(this.contents); -} - -enum Enum { - RED, - GREEN, - BLUE, -} - -commonClosure() {} - -main() async { - await a.loadLibrary(); - await a.loadChildren(); - await b.loadLibrary(); - await b.loadChildren(); - - var a_1_mint = await a.a_1_mint(); - var a_2_mint = await a.a_2_mint(); - var b_1_mint = await b.b_1_mint(); - var b_2_mint = await b.b_2_mint(); - Expect.isTrue(identical(a_1_mint, a_2_mint)); - Expect.isTrue(identical(a_1_mint, b_1_mint)); - Expect.isTrue(identical(a_1_mint, b_2_mint)); - - var a_1_string = await a.a_1_string(); - var a_2_string = await a.a_2_string(); - var b_1_string = await b.b_1_string(); - var b_2_string = await b.b_2_string(); - Expect.isTrue(identical(a_1_string, a_2_string)); - Expect.isTrue(identical(a_1_string, b_1_string)); - Expect.isTrue(identical(a_1_string, b_2_string)); - - var a_1_list = await a.a_1_list(); - var a_2_list = await a.a_2_list(); - var b_1_list = await b.b_1_list(); - var b_2_list = await b.b_2_list(); - Expect.isTrue(identical(a_1_list, a_2_list)); - Expect.isTrue(identical(a_1_list, b_1_list)); - Expect.isTrue(identical(a_1_list, b_2_list)); - - var a_1_map = await a.a_1_map(); - var a_2_map = await a.a_2_map(); - var b_1_map = await b.b_1_map(); - var b_2_map = await b.b_2_map(); - Expect.isTrue(identical(a_1_map, a_2_map)); - Expect.isTrue(identical(a_1_map, b_1_map)); - Expect.isTrue(identical(a_1_map, b_2_map)); - - var a_1_box = await a.a_1_box(); - var a_2_box = await a.a_2_box(); - var b_1_box = await b.b_1_box(); - var b_2_box = await b.b_2_box(); - Expect.isTrue(identical(a_1_box, a_2_box)); - Expect.isTrue(identical(a_1_box, b_1_box)); - Expect.isTrue(identical(a_1_box, b_2_box)); - - var a_1_enum = await a.a_1_enum(); - var a_2_enum = await a.a_2_enum(); - var b_1_enum = await b.b_1_enum(); - var b_2_enum = await b.b_2_enum(); - Expect.isTrue(identical(a_1_enum, a_2_enum)); - Expect.isTrue(identical(a_1_enum, b_1_enum)); - Expect.isTrue(identical(a_1_enum, b_2_enum)); - - var a_1_type = await a.a_1_type(); - var a_2_type = await a.a_2_type(); - var b_1_type = await b.b_1_type(); - var b_2_type = await b.b_2_type(); - Expect.isTrue(identical(a_1_type, a_2_type)); - Expect.isTrue(identical(a_1_type, b_1_type)); - Expect.isTrue(identical(a_1_type, b_2_type)); - - var a_1_closure = await a.a_1_closure(); - var a_2_closure = await a.a_2_closure(); - var b_1_closure = await b.b_1_closure(); - var b_2_closure = await b.b_2_closure(); - Expect.isTrue(identical(a_1_closure, a_2_closure)); - Expect.isTrue(identical(a_1_closure, b_1_closure)); - Expect.isTrue(identical(a_1_closure, b_2_closure)); -} diff --git a/tests/language_2/deferred/static_separate_lib1.dart b/tests/language_2/deferred/static_separate_lib1.dart deleted file mode 100644 index c126d4f0b64..00000000000 --- a/tests/language_2/deferred/static_separate_lib1.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2014, 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 lib1; - -class ConstClass { - final x; - const ConstClass(this.x); -} - -var x = const ConstClass(const ConstClass(1)); - -class C { - static foo() { - () {}(); // Hack to avoid inlining. - return 1; - } - - bar() { - () {}(); // Hack to avoid inlining. - return 1; - } -} - -class C1 { - static var foo = const {}; - var bar = const {}; -} - -class C2 { - static var foo = new Map.from({1: 2}); - var bar = new Map.from({1: 2}); -} - -class C3 { - static final foo = const ConstClass(const ConstClass(1)); - final bar = const ConstClass(const ConstClass(1)); -} - -class C4 { - static final foo = new Map.from({x: x}); - final bar = new Map.from({x: x}); -} - -class C5 { - static const foo = const [ - const {1: 3} - ]; - bar() { - () {}(); // Hack to avoid inlining. - return 1; - } -} diff --git a/tests/language_2/deferred/static_separate_lib2.dart b/tests/language_2/deferred/static_separate_lib2.dart deleted file mode 100644 index c0d137706e0..00000000000 --- a/tests/language_2/deferred/static_separate_lib2.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2014, 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 lib2; - -import "package:expect/expect.dart"; -import "static_separate_lib1.dart"; - -foo() { - Expect.equals(1, C.foo()); - Expect.mapEquals({}, C1.foo); - - Expect.mapEquals({1: 2}, C2.foo); - C2.foo = {1: 2}; - Expect.mapEquals({1: 2}, C2.foo); - - Expect.equals(x, C3.foo); - Expect.mapEquals({x: x}, C4.foo); - Expect.listEquals([ - const {1: 3} - ], C5.foo); -} diff --git a/tests/language_2/deferred/static_separate_test.dart b/tests/language_2/deferred/static_separate_test.dart deleted file mode 100644 index 366c61bca1d..00000000000 --- a/tests/language_2/deferred/static_separate_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2014, 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 - -// The class lib1.C is referenced via lib1 -// The static function lib1.C.foo is referenced via lib2 -// Dart2js will put them in separate hunks. -// Similarly for C2, ..., C5. - -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; -import "static_separate_lib1.dart" deferred as lib1; -import "static_separate_lib2.dart" deferred as lib2; - -void main() { - asyncStart(); - Expect.throws(() => new lib1.C()); - lib1.loadLibrary().then((_) { - lib2.loadLibrary().then((_) { - print("HERE"); - Expect.equals(1, new lib1.C().bar()); - var x = new lib1.C2(); - Expect.mapEquals({1: 2}, x.bar); - x.bar = {2: 3}; - Expect.mapEquals({2: 3}, x.bar); - - Expect.equals(lib1.x, new lib1.C3().bar); - Expect.mapEquals({lib1.x: lib1.x}, new lib1.C4().bar); - Expect.equals(1, new lib1.C5().bar()); - - lib2.foo(); - asyncEnd(); - }); - }); -} diff --git a/tests/language_2/deferred/super_dependency_lib.dart b/tests/language_2/deferred/super_dependency_lib.dart deleted file mode 100644 index 3d1f2da69d8..00000000000 --- a/tests/language_2/deferred/super_dependency_lib.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2015, 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 - -class A {} - -class C extends A { - foo() { - super.foo = 3; - } -} diff --git a/tests/language_2/deferred/super_dependency_runtime_test.dart b/tests/language_2/deferred/super_dependency_runtime_test.dart deleted file mode 100644 index f106998cf04..00000000000 --- a/tests/language_2/deferred/super_dependency_runtime_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Regression test. -// lib.C.foo has code that references `super.foo=` that does not exist. This -// used to cause a crash. - -import "package:expect/expect.dart"; - - -main() async { - - -} diff --git a/tests/language_2/deferred/super_dependency_test.dart b/tests/language_2/deferred/super_dependency_test.dart deleted file mode 100644 index 73ebf0d53f6..00000000000 --- a/tests/language_2/deferred/super_dependency_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2015, 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 - -// Regression test. -// lib.C.foo has code that references `super.foo=` that does not exist. This -// used to cause a crash. - -import "package:expect/expect.dart"; -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SUPER_MEMBER -// [cfe] Superclass has no setter named 'foo'. -import "super_dependency_lib.dart" deferred as lib; - -main() async { - await lib.loadLibrary(); - Expect.throwsNoSuchMethodError(() => new lib.C().foo()); -} diff --git a/tests/language_2/deferred/type_dependency_lib1.dart b/tests/language_2/deferred/type_dependency_lib1.dart deleted file mode 100644 index 36a06ef2763..00000000000 --- a/tests/language_2/deferred/type_dependency_lib1.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2015, the Dart Team. 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 lib1; - -import "type_dependency_lib3.dart"; - -bool fooIs(x) { - return x is A; -} - -bool fooAs(x) { - try { - return (x as A).p; - } on TypeError { - return false; - } -} - -bool fooAnnotation(x) { - try { - A y = x; - return y is! String; - } on TypeError { - return false; - } -} diff --git a/tests/language_2/deferred/type_dependency_lib2.dart b/tests/language_2/deferred/type_dependency_lib2.dart deleted file mode 100644 index 3d4cb789781..00000000000 --- a/tests/language_2/deferred/type_dependency_lib2.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2015, the Dart Team. 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 lib2; - -import "type_dependency_lib3.dart"; - -getInstance() { - return new A(); -} diff --git a/tests/language_2/deferred/type_dependency_lib3.dart b/tests/language_2/deferred/type_dependency_lib3.dart deleted file mode 100644 index 29e229a2ea7..00000000000 --- a/tests/language_2/deferred/type_dependency_lib3.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2015, 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 lib3; - -class A { - var p = true; -} diff --git a/tests/language_2/deferred/type_dependency_test.dart b/tests/language_2/deferred/type_dependency_test.dart deleted file mode 100644 index 7b73bd040c1..00000000000 --- a/tests/language_2/deferred/type_dependency_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2015, the Dart Team. 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 - -/// Checks that lib1.fooX's dependencies on [A] via is-checks, as-expressions -/// and type-annotations(in checked-mode) is correctly tracked. - -import "type_dependency_lib1.dart" deferred as lib1; -import "type_dependency_lib2.dart" deferred as lib2; -import "package:expect/expect.dart"; - -main() async { - await lib1.loadLibrary(); - // Split the cases into a multi-test to test each feature separately. - Expect.isFalse( - lib1.fooIs //# is: ok - lib1.fooAs //# as: ok - lib1.fooAnnotation //# type_annotation: ok - ("string") - is! String //# none: ok - ); - await lib2.loadLibrary(); - Expect.isTrue( - lib1.fooIs //# is: ok - lib1.fooAs //# as: ok - lib1.fooAnnotation //# type_annotation: ok - (lib2.getInstance()) - is! String //# none: ok - ); -} diff --git a/tests/language_2/deferred/unreachable_loading_unit_deferred.dart b/tests/language_2/deferred/unreachable_loading_unit_deferred.dart deleted file mode 100644 index cec6f71a276..00000000000 --- a/tests/language_2/deferred/unreachable_loading_unit_deferred.dart +++ /dev/null @@ -1,9 +0,0 @@ -// 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. - -// @dart = 2.9 - -foo() { - print("Foo"); -} diff --git a/tests/language_2/deferred/unreachable_loading_unit_immediate.dart b/tests/language_2/deferred/unreachable_loading_unit_immediate.dart deleted file mode 100644 index 2b87a9f3e4a..00000000000 --- a/tests/language_2/deferred/unreachable_loading_unit_immediate.dart +++ /dev/null @@ -1,12 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "unreachable_loading_unit_deferred.dart" deferred as lib; - -unreachable() async { - await lib.loadLibrary(); - lib.foo(); -} diff --git a/tests/language_2/deferred/unreachable_loading_unit_test.dart b/tests/language_2/deferred/unreachable_loading_unit_test.dart deleted file mode 100644 index ebd82b36784..00000000000 --- a/tests/language_2/deferred/unreachable_loading_unit_test.dart +++ /dev/null @@ -1,11 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "unreachable_loading_unit_immediate.dart"; - -main() { - print("Okay"); -} diff --git a/tests/language_2/double/comparison_test.dart b/tests/language_2/double/comparison_test.dart deleted file mode 100644 index 13727946725..00000000000 --- a/tests/language_2/double/comparison_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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. -// Tests VM optimizing compiler negate condition for doubles (bug 5376516). - -// @dart = 2.9 - -loop() { - for (double d = 0.0; d < 1100.0; d++) {} - for (double d = 0.0; d <= 1100.0; d++) {} - for (double d = 1000.0; d > 0.0; d--) {} - for (double d = 1000.0; d >= 0.0; d--) {} -} - -main() { - loop(); - loop(); -} diff --git a/tests/language_2/double/identical_test.dart b/tests/language_2/double/identical_test.dart deleted file mode 100644 index 2a2e33aa379..00000000000 --- a/tests/language_2/double/identical_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -main() { - Expect.isTrue(identical(42.0, 42.0)); - Expect.isTrue(identical(-0.0, -0.0)); - Expect.isTrue(identical(0.0, 0.0)); - Expect.isTrue(identical(1.234E9, 1.234E9)); - Expect.isFalse(identical(0.0, -0.0)); - Expect.isTrue(identical(double.nan, double.nan)); -} diff --git a/tests/language_2/double/int_addition_test.dart b/tests/language_2/double/int_addition_test.dart deleted file mode 100644 index b0cbe34a72d..00000000000 --- a/tests/language_2/double/int_addition_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012, 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. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test that optimized code does not silently convert integers to doubles. - -main() { - // Optimize add-op - for (int i = 0; i < 20; i++) { - addOp(1.1, 2.1); - } - - Expect.isTrue(addOp(1.1, 2.1) is double); - Expect.isTrue(addOp(1, 2) is int); -} - -addOp(a, b) => a + b; diff --git a/tests/language_2/double/int_to_string_test.dart b/tests/language_2/double/int_to_string_test.dart deleted file mode 100644 index fb8ca5c02dd..00000000000 --- a/tests/language_2/double/int_to_string_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012, 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. -// Test basic integer operations. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - Expect.equals("0.0", (0.0).toString()); - Expect.equals("9.0", (9.0).toString()); - Expect.equals("90.0", (90.0).toString()); - Expect.equals( - "111111111111111110000.0", (111111111111111111111.0).toString()); - Expect.equals("-9.0", (-9.0).toString()); - Expect.equals("-90.0", (-90.0).toString()); - Expect.equals( - "-111111111111111110000.0", (-111111111111111111111.0).toString()); - Expect.equals("1000.0", (1000.0).toString()); - Expect.equals("1000000000000000100.0", (1000000000000000128.0).toString()); -} diff --git a/tests/language_2/double/invalid_runtime_test.dart b/tests/language_2/double/invalid_runtime_test.dart deleted file mode 100644 index 273a9eb183c..00000000000 --- a/tests/language_2/double/invalid_runtime_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -// Test an invalid double format - -main() { - - ; -} diff --git a/tests/language_2/double/invalid_test.dart b/tests/language_2/double/invalid_test.dart deleted file mode 100644 index bdea746a9df..00000000000 --- a/tests/language_2/double/invalid_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2017, 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 - -// Test an invalid double format - -main() { - 3457e -//^ -// [cfe] Numbers in exponential notation should always contain an exponent (an integer number with an optional sign). -// ^ -// [analyzer] SYNTACTIC_ERROR.MISSING_DIGIT - ; -} diff --git a/tests/language_2/double/modulo_test.dart b/tests/language_2/double/modulo_test.dart deleted file mode 100644 index af08942555e..00000000000 --- a/tests/language_2/double/modulo_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2013, 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 test optimization of modulo operator on Double. -// VMOptions=--optimization-counter-threshold=10 - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - double k = -0.33333; - double firstResPos = doMod(k, 1.0); - double firstResNeg = doMod(k, -1.0); - for (int i = 0; i < 20; i++) { - Expect.equals(firstResPos, doMod(k, 1.0)); - Expect.equals(firstResNeg, doMod(k, -1.0)); - } -} - -doMod(a, b) => a % b; diff --git a/tests/language_2/double/nan_comparison_test.dart b/tests/language_2/double/nan_comparison_test.dart deleted file mode 100644 index 61b9a5d73e5..00000000000 --- a/tests/language_2/double/nan_comparison_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2013, 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. -// Tests double comparisons with NaN in different contexts. -// VMOptions=--optimization-counter-threshold=10 - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -test_expr(a, b) => a != b; - -test_conditional(a, b) => a != b ? true : false; - -test_branch(a, b) { - if (a != b) { - return true; - } - return false; -} - -main() { - Expect.equals(true, test_expr(0.5, double.nan)); - for (var i = 0; i < 20; i++) test_expr(0.5, double.nan); - Expect.equals(true, test_expr(0.5, double.nan)); - - Expect.equals(true, test_conditional(0.5, double.nan)); - for (var i = 0; i < 20; i++) test_conditional(0.5, double.nan); - Expect.equals(true, test_conditional(0.5, double.nan)); - - Expect.equals(true, test_branch(0.5, double.nan)); - for (var i = 0; i < 20; i++) test_branch(0.5, double.nan); - Expect.equals(true, test_branch(0.5, double.nan)); -} diff --git a/tests/language_2/double/to_string_as_exponential2_runtime_test.dart b/tests/language_2/double/to_string_as_exponential2_runtime_test.dart deleted file mode 100644 index a9d1a1131e1..00000000000 --- a/tests/language_2/double/to_string_as_exponential2_runtime_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. -// Test basic integer operations. - -import "package:expect/expect.dart"; - -main() { - var v = 1.0; - Expect.throwsRangeError(() => v.toStringAsExponential(-1)); - Expect.throwsRangeError(() => v.toStringAsExponential(21)); - - - -} diff --git a/tests/language_2/double/to_string_as_exponential2_test.dart b/tests/language_2/double/to_string_as_exponential2_test.dart deleted file mode 100644 index 4d72d122aef..00000000000 --- a/tests/language_2/double/to_string_as_exponential2_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012, 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. -// Test basic integer operations. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - var v = 1.0; - Expect.throwsRangeError(() => v.toStringAsExponential(-1)); - Expect.throwsRangeError(() => v.toStringAsExponential(21)); - v.toStringAsExponential(1.5); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'double' can't be assigned to the parameter type 'int'. - v.toStringAsExponential("string"); - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'. - v.toStringAsExponential("3"); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'. -} diff --git a/tests/language_2/double/to_string_as_exponential3_test.dart b/tests/language_2/double/to_string_as_exponential3_test.dart deleted file mode 100644 index 97c38eea8dc..00000000000 --- a/tests/language_2/double/to_string_as_exponential3_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2012, 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. -// Test basic integer operations. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - Expect.equals("1.00000000000000000000e+0", (1.0).toStringAsExponential(20)); - Expect.equals("1.00000000000000005551e-1", (0.1).toStringAsExponential(20)); - Expect.equals(1.00000000000000005551e-1, 0.1); -} diff --git a/tests/language_2/double/to_string_as_exponential_test.dart b/tests/language_2/double/to_string_as_exponential_test.dart deleted file mode 100644 index ff24d4efe50..00000000000 --- a/tests/language_2/double/to_string_as_exponential_test.dart +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) 2012, 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. -// Test basic integer operations. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - Expect.equals("1e+0", (1.0).toStringAsExponential()); - Expect.equals("1.1e+1", (11.0).toStringAsExponential()); - Expect.equals("1.12e+2", (112.0).toStringAsExponential()); - Expect.equals("1e+0", (1.0).toStringAsExponential(null)); - Expect.equals("1.1e+1", (11.0).toStringAsExponential(null)); - Expect.equals("1.12e+2", (112.0).toStringAsExponential(null)); - Expect.equals("1e+0", (1.0).toStringAsExponential(0)); - Expect.equals("1e+1", (11.0).toStringAsExponential(0)); - Expect.equals("1e+2", (112.0).toStringAsExponential(0)); - Expect.equals("1.0e+0", (1.0).toStringAsExponential(1)); - Expect.equals("1.1e+1", (11.0).toStringAsExponential(1)); - Expect.equals("1.1e+2", (112.0).toStringAsExponential(1)); - Expect.equals("1.00e+0", (1.0).toStringAsExponential(2)); - Expect.equals("1.10e+1", (11.0).toStringAsExponential(2)); - Expect.equals("1.12e+2", (112.0).toStringAsExponential(2)); - Expect.equals("1.000e+0", (1.0).toStringAsExponential(3)); - Expect.equals("1.100e+1", (11.0).toStringAsExponential(3)); - Expect.equals("1.120e+2", (112.0).toStringAsExponential(3)); - Expect.equals("1e-1", (0.1).toStringAsExponential()); - Expect.equals("1.1e-1", (0.11).toStringAsExponential()); - Expect.equals("1.12e-1", (0.112).toStringAsExponential()); - Expect.equals("1e-1", (0.1).toStringAsExponential(null)); - Expect.equals("1.1e-1", (0.11).toStringAsExponential(null)); - Expect.equals("1.12e-1", (0.112).toStringAsExponential(null)); - Expect.equals("1e-1", (0.1).toStringAsExponential(0)); - Expect.equals("1e-1", (0.11).toStringAsExponential(0)); - Expect.equals("1e-1", (0.112).toStringAsExponential(0)); - Expect.equals("1.0e-1", (0.1).toStringAsExponential(1)); - Expect.equals("1.1e-1", (0.11).toStringAsExponential(1)); - Expect.equals("1.1e-1", (0.112).toStringAsExponential(1)); - Expect.equals("1.00e-1", (0.1).toStringAsExponential(2)); - Expect.equals("1.10e-1", (0.11).toStringAsExponential(2)); - Expect.equals("1.12e-1", (0.112).toStringAsExponential(2)); - Expect.equals("1.000e-1", (0.1).toStringAsExponential(3)); - Expect.equals("1.100e-1", (0.11).toStringAsExponential(3)); - Expect.equals("1.120e-1", (0.112).toStringAsExponential(3)); - - Expect.equals("-0e+0", (-0.0).toStringAsExponential()); - Expect.equals("-1e+0", (-1.0).toStringAsExponential()); - Expect.equals("-1.1e+1", (-11.0).toStringAsExponential()); - Expect.equals("-1.12e+2", (-112.0).toStringAsExponential()); - Expect.equals("-0e+0", (-0.0).toStringAsExponential(null)); - Expect.equals("-1e+0", (-1.0).toStringAsExponential(null)); - Expect.equals("-1.1e+1", (-11.0).toStringAsExponential(null)); - Expect.equals("-1.12e+2", (-112.0).toStringAsExponential(null)); - Expect.equals("-1e+0", (-1.0).toStringAsExponential(0)); - Expect.equals("-1e+1", (-11.0).toStringAsExponential(0)); - Expect.equals("-1e+2", (-112.0).toStringAsExponential(0)); - Expect.equals("-1.0e+0", (-1.0).toStringAsExponential(1)); - Expect.equals("-1.1e+1", (-11.0).toStringAsExponential(1)); - Expect.equals("-1.1e+2", (-112.0).toStringAsExponential(1)); - Expect.equals("-1.00e+0", (-1.0).toStringAsExponential(2)); - Expect.equals("-1.10e+1", (-11.0).toStringAsExponential(2)); - Expect.equals("-1.12e+2", (-112.0).toStringAsExponential(2)); - Expect.equals("-1.000e+0", (-1.0).toStringAsExponential(3)); - Expect.equals("-1.100e+1", (-11.0).toStringAsExponential(3)); - Expect.equals("-1.120e+2", (-112.0).toStringAsExponential(3)); - Expect.equals("-1e-1", (-0.1).toStringAsExponential()); - Expect.equals("-1.1e-1", (-0.11).toStringAsExponential()); - Expect.equals("-1.12e-1", (-0.112).toStringAsExponential()); - Expect.equals("-1e-1", (-0.1).toStringAsExponential(null)); - Expect.equals("-1.1e-1", (-0.11).toStringAsExponential(null)); - Expect.equals("-1.12e-1", (-0.112).toStringAsExponential(null)); - Expect.equals("-1e-1", (-0.1).toStringAsExponential(0)); - Expect.equals("-1e-1", (-0.11).toStringAsExponential(0)); - Expect.equals("-1e-1", (-0.112).toStringAsExponential(0)); - Expect.equals("-1.0e-1", (-0.1).toStringAsExponential(1)); - Expect.equals("-1.1e-1", (-0.11).toStringAsExponential(1)); - Expect.equals("-1.1e-1", (-0.112).toStringAsExponential(1)); - Expect.equals("-1.00e-1", (-0.1).toStringAsExponential(2)); - Expect.equals("-1.10e-1", (-0.11).toStringAsExponential(2)); - Expect.equals("-1.12e-1", (-0.112).toStringAsExponential(2)); - Expect.equals("-1.000e-1", (-0.1).toStringAsExponential(3)); - Expect.equals("-1.100e-1", (-0.11).toStringAsExponential(3)); - Expect.equals("-1.120e-1", (-0.112).toStringAsExponential(3)); - - Expect.equals("NaN", (double.nan).toStringAsExponential(2)); - Expect.equals("Infinity", (double.infinity).toStringAsExponential(2)); - Expect.equals("-Infinity", (-double.infinity).toStringAsExponential(2)); - Expect.equals("1e+0", (1.0).toStringAsExponential(0)); - Expect.equals("0e+0", (0.0).toStringAsExponential()); - Expect.equals("0e+0", (0.0).toStringAsExponential(null)); - Expect.equals("0.00e+0", (0.0).toStringAsExponential(2)); - Expect.equals("1e+1", (11.2356).toStringAsExponential(0)); - Expect.equals("1.1236e+1", (11.2356).toStringAsExponential(4)); - Expect.equals("1.1236e-4", (0.000112356).toStringAsExponential(4)); - Expect.equals("-1.1236e-4", (-0.000112356).toStringAsExponential(4)); - Expect.equals("1.12356e-4", (0.000112356).toStringAsExponential()); - Expect.equals("-1.12356e-4", (-0.000112356).toStringAsExponential()); - Expect.equals("1.12356e-4", (0.000112356).toStringAsExponential(null)); - Expect.equals("-1.12356e-4", (-0.000112356).toStringAsExponential(null)); -} diff --git a/tests/language_2/double/to_string_as_fixed2_runtime_test.dart b/tests/language_2/double/to_string_as_fixed2_runtime_test.dart deleted file mode 100644 index 08ea5b30bd4..00000000000 --- a/tests/language_2/double/to_string_as_fixed2_runtime_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. -// Test basic integer operations. - -import "package:expect/expect.dart"; - -main() { - var v = 0.0; - Expect.throwsRangeError(() => v.toStringAsFixed(-1)); - Expect.throwsRangeError(() => v.toStringAsFixed(21)); - Expect.throwsArgumentError(() => v.toStringAsFixed(null)); - - - -} diff --git a/tests/language_2/double/to_string_as_fixed2_test.dart b/tests/language_2/double/to_string_as_fixed2_test.dart deleted file mode 100644 index cd8feaeb3ac..00000000000 --- a/tests/language_2/double/to_string_as_fixed2_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2012, 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. -// Test basic integer operations. - -// @dart = 2.9 - -// [NNBD non-migrated]: This test has no language/ counterpart. The static -// errors are just redundant tests of the static type system, and the runtime -// errors are redundant with to_string_as_fixed2_runtime_test.dart. - -import "package:expect/expect.dart"; - -main() { - var v = 0.0; - Expect.throwsRangeError(() => v.toStringAsFixed(-1)); - Expect.throwsRangeError(() => v.toStringAsFixed(21)); - Expect.throwsArgumentError(() => v.toStringAsFixed(null)); - v.toStringAsFixed(1.5); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'double' can't be assigned to the parameter type 'int'. - v.toStringAsFixed("string"); - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'. - v.toStringAsFixed("3"); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'. -} diff --git a/tests/language_2/double/to_string_as_fixed_test.dart b/tests/language_2/double/to_string_as_fixed_test.dart deleted file mode 100644 index 0e57faf322c..00000000000 --- a/tests/language_2/double/to_string_as_fixed_test.dart +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2012, 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. -// Test basic integer operations. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class ToStringAsFixedTest { - static void testMain() { - Expect.equals("2.000", 2.0.toStringAsFixed(3)); - Expect.equals("2.100", 2.1.toStringAsFixed(3)); - Expect.equals("2.120", 2.12.toStringAsFixed(3)); - Expect.equals("2.123", 2.123.toStringAsFixed(3)); - Expect.equals("2.124", 2.1239.toStringAsFixed(3)); - Expect.equals("NaN", (0.0 / 0.0).toStringAsFixed(3)); - Expect.equals("Infinity", (1.0 / 0.0).toStringAsFixed(3)); - Expect.equals("-Infinity", (-1.0 / 0.0).toStringAsFixed(3)); - Expect.equals( - "1.1111111111111111e+21", 1111111111111111111111.0.toStringAsFixed(8)); - Expect.equals("0.1", 0.1.toStringAsFixed(1)); - Expect.equals("0.10", 0.1.toStringAsFixed(2)); - Expect.equals("0.100", 0.1.toStringAsFixed(3)); - Expect.equals("0.01", 0.01.toStringAsFixed(2)); - Expect.equals("0.010", 0.01.toStringAsFixed(3)); - Expect.equals("0.0100", 0.01.toStringAsFixed(4)); - Expect.equals("0.00", 0.001.toStringAsFixed(2)); - Expect.equals("0.001", 0.001.toStringAsFixed(3)); - Expect.equals("0.0010", 0.001.toStringAsFixed(4)); - Expect.equals("1.0000", 1.0.toStringAsFixed(4)); - Expect.equals("1.0", 1.0.toStringAsFixed(1)); - Expect.equals("1", 1.0.toStringAsFixed(0)); - Expect.equals("12", 12.0.toStringAsFixed(0)); - Expect.equals("1", 1.1.toStringAsFixed(0)); - Expect.equals("12", 12.1.toStringAsFixed(0)); - Expect.equals("1", 1.12.toStringAsFixed(0)); - Expect.equals("12", 12.12.toStringAsFixed(0)); - Expect.equals("0.0000006", 0.0000006.toStringAsFixed(7)); - Expect.equals("0.00000006", 0.00000006.toStringAsFixed(8)); - Expect.equals("0.000000060", 0.00000006.toStringAsFixed(9)); - Expect.equals("0.0000000600", 0.00000006.toStringAsFixed(10)); - Expect.equals("0", 0.0.toStringAsFixed(0)); - Expect.equals("0.0", 0.0.toStringAsFixed(1)); - Expect.equals("0.00", 0.0.toStringAsFixed(2)); - - Expect.equals("-0.1", (-0.1).toStringAsFixed(1)); - Expect.equals("-0.10", (-0.1).toStringAsFixed(2)); - Expect.equals("-0.100", (-0.1).toStringAsFixed(3)); - Expect.equals("-0.01", (-0.01).toStringAsFixed(2)); - Expect.equals("-0.010", (-0.01).toStringAsFixed(3)); - Expect.equals("-0.0100", (-0.01).toStringAsFixed(4)); - Expect.equals("-0.00", (-0.001).toStringAsFixed(2)); - Expect.equals("-0.001", (-0.001).toStringAsFixed(3)); - Expect.equals("-0.0010", (-0.001).toStringAsFixed(4)); - Expect.equals("-1.0000", (-1.0).toStringAsFixed(4)); - Expect.equals("-1.0", (-1.0).toStringAsFixed(1)); - Expect.equals("-1", (-1.0).toStringAsFixed(0)); - Expect.equals("-1", (-1.1).toStringAsFixed(0)); - Expect.equals("-12", (-12.1).toStringAsFixed(0)); - Expect.equals("-1", (-1.12).toStringAsFixed(0)); - Expect.equals("-12", (-12.12).toStringAsFixed(0)); - Expect.equals("-0.0000006", (-0.0000006).toStringAsFixed(7)); - Expect.equals("-0.00000006", (-0.00000006).toStringAsFixed(8)); - Expect.equals("-0.000000060", (-0.00000006).toStringAsFixed(9)); - Expect.equals("-0.0000000600", (-0.00000006).toStringAsFixed(10)); - Expect.equals("-0", (-0.0).toStringAsFixed(0)); - Expect.equals("-0.0", (-0.0).toStringAsFixed(1)); - Expect.equals("-0.00", (-0.0).toStringAsFixed(2)); - - Expect.equals("1000", 1000.0.toStringAsFixed(0)); - Expect.equals("0", 0.00001.toStringAsFixed(0)); - Expect.equals("0.00001", 0.00001.toStringAsFixed(5)); - Expect.equals( - "0.00000000000000000010", 0.0000000000000000001.toStringAsFixed(20)); - Expect.equals("0.00001000000000000", 0.00001.toStringAsFixed(17)); - Expect.equals("1.00000000000000000", 1.0.toStringAsFixed(17)); - Expect.equals( - "1000000000000000128", 1000000000000000128.0.toStringAsFixed(0)); - Expect.equals( - "100000000000000128.0", 100000000000000128.0.toStringAsFixed(1)); - Expect.equals( - "10000000000000128.00", 10000000000000128.0.toStringAsFixed(2)); - Expect.equals("10000000000000128.00000000000000000000", - 10000000000000128.0.toStringAsFixed(20)); - Expect.equals("0", 0.0.toStringAsFixed(0)); - Expect.equals("-42.000", (-42.0).toStringAsFixed(3)); - Expect.equals( - "-1000000000000000128", (-1000000000000000128.0).toStringAsFixed(0)); - Expect.equals("-0.00000000000000000010", - (-0.0000000000000000001).toStringAsFixed(20)); - Expect.equals( - "0.12312312312312299889", 0.123123123123123.toStringAsFixed(20)); - // Test that we round up even when the last digit generated is even. - // dtoa does not do this in its original form. - Expect.equals("1", 0.5.toStringAsFixed(0)); - Expect.equals("-1", (-0.5).toStringAsFixed(0)); - Expect.equals("1.3", 1.25.toStringAsFixed(1)); - Expect.equals("234.2040", 234.20405.toStringAsFixed(4)); - Expect.equals("234.2041", 234.2040506.toStringAsFixed(4)); - } -} - -main() { - ToStringAsFixedTest.testMain(); -} diff --git a/tests/language_2/double/to_string_as_precision2_runtime_test.dart b/tests/language_2/double/to_string_as_precision2_runtime_test.dart deleted file mode 100644 index a75802166b0..00000000000 --- a/tests/language_2/double/to_string_as_precision2_runtime_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. -// Test basic integer operations. - -import "package:expect/expect.dart"; - -main() { - var v = 0.0; - Expect.throwsRangeError(() => v.toStringAsPrecision(0)); - Expect.throwsRangeError(() => v.toStringAsPrecision(22)); - Expect.throwsArgumentError(() => v.toStringAsPrecision(null)); - - - -} diff --git a/tests/language_2/double/to_string_as_precision2_test.dart b/tests/language_2/double/to_string_as_precision2_test.dart deleted file mode 100644 index 2f56ce88d65..00000000000 --- a/tests/language_2/double/to_string_as_precision2_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2012, 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. -// Test basic integer operations. - -// @dart = 2.9 - -// [NNBD non-migrated]: This test has no language/ counterpart. The static -// errors are just redundant tests of the static type system, and the runtime -// errors are redundant with to_string_as_precision2_runtime_test.dart. - -import "package:expect/expect.dart"; - -main() { - var v = 0.0; - Expect.throwsRangeError(() => v.toStringAsPrecision(0)); - Expect.throwsRangeError(() => v.toStringAsPrecision(22)); - Expect.throwsArgumentError(() => v.toStringAsPrecision(null)); - v.toStringAsPrecision(1.5); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'double' can't be assigned to the parameter type 'int'. - v.toStringAsPrecision("string"); - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'. - v.toStringAsPrecision("3"); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'. -} diff --git a/tests/language_2/double/to_string_as_precision3_test.dart b/tests/language_2/double/to_string_as_precision3_test.dart deleted file mode 100644 index 69a97a1eb0a..00000000000 --- a/tests/language_2/double/to_string_as_precision3_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2012, 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. -// Test basic integer operations. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - Expect.equals( - "0.000555000000000000046248", (0.000555).toStringAsPrecision(21)); - Expect.equals(0.000555000000000000046248, 0.000555); - Expect.equals( - "5.54999999999999980179e-7", (0.000000555).toStringAsPrecision(21)); - Expect.equals(5.54999999999999980179e-7, 0.000000555); - Expect.equals( - "-5.54999999999999980179e-7", (-0.000000555).toStringAsPrecision(21)); - Expect.equals(-5.54999999999999980179e-7, -0.000000555); -} diff --git a/tests/language_2/double/to_string_as_precision_test.dart b/tests/language_2/double/to_string_as_precision_test.dart deleted file mode 100644 index d98ba66a678..00000000000 --- a/tests/language_2/double/to_string_as_precision_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2012, 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. -// Test basic integer operations. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - Expect.equals("NaN", (double.nan).toStringAsPrecision(1)); - Expect.equals("Infinity", (double.infinity).toStringAsPrecision(2)); - Expect.equals("-Infinity", (-double.infinity).toStringAsPrecision(2)); - Expect.equals("0.000555000000000000", (0.000555).toStringAsPrecision(15)); - Expect.equals("5.55000000000000e-7", (0.000000555).toStringAsPrecision(15)); - Expect.equals("-5.55000000000000e-7", (-0.000000555).toStringAsPrecision(15)); - Expect.equals("1e+8", (123456789.0).toStringAsPrecision(1)); - Expect.equals("123456789", (123456789.0).toStringAsPrecision(9)); - Expect.equals("1.2345679e+8", (123456789.0).toStringAsPrecision(8)); - Expect.equals("1.234568e+8", (123456789.0).toStringAsPrecision(7)); - Expect.equals("-1.234568e+8", (-123456789.0).toStringAsPrecision(7)); - Expect.equals("-1.2e-9", (-.0000000012345).toStringAsPrecision(2)); - Expect.equals("-1.2e-8", (-.000000012345).toStringAsPrecision(2)); - Expect.equals("-1.2e-7", (-.00000012345).toStringAsPrecision(2)); - Expect.equals("-0.0000012", (-.0000012345).toStringAsPrecision(2)); - Expect.equals("-0.000012", (-.000012345).toStringAsPrecision(2)); - Expect.equals("-0.00012", (-.00012345).toStringAsPrecision(2)); - Expect.equals("-0.0012", (-.0012345).toStringAsPrecision(2)); - Expect.equals("-0.012", (-.012345).toStringAsPrecision(2)); - Expect.equals("-0.12", (-.12345).toStringAsPrecision(2)); - Expect.equals("-1.2", (-1.2345).toStringAsPrecision(2)); - Expect.equals("-12", (-12.345).toStringAsPrecision(2)); - Expect.equals("-1.2e+2", (-123.45).toStringAsPrecision(2)); - Expect.equals("-1.2e+3", (-1234.5).toStringAsPrecision(2)); - Expect.equals("-1.2e+4", (-12345.0).toStringAsPrecision(2)); - Expect.equals("-1.235e+4", (-12345.67).toStringAsPrecision(4)); - Expect.equals("-1.234e+4", (-12344.67).toStringAsPrecision(4)); - Expect.equals("-0.0", (-0.0).toStringAsPrecision(2)); - Expect.equals("-0", (-0.0).toStringAsPrecision(1)); - // Test that we round up even when the last digit generated is even. - // dtoa does not do this in its original form. - Expect.equals("1.3", 1.25.toStringAsPrecision(2)); - Expect.equals("1.4", 1.35.toStringAsPrecision(2)); -} diff --git a/tests/language_2/double/to_string_test.dart b/tests/language_2/double/to_string_test.dart deleted file mode 100644 index 04f1af93008..00000000000 --- a/tests/language_2/double/to_string_test.dart +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2012, 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. -// Test basic integer operations. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - Expect.equals("NaN", (double.nan).toString()); - Expect.equals("Infinity", (1 / 0).toString()); - Expect.equals("-Infinity", (-1 / 0).toString()); - Expect.equals("90.12", (90.12).toString()); - Expect.equals("0.1", (0.1).toString()); - Expect.equals("0.01", (0.01).toString()); - Expect.equals("0.0123", (0.0123).toString()); - Expect.equals( - "1.1111111111111111e+21", (1111111111111111111111.0).toString()); - Expect.equals( - "1.1111111111111111e+22", (11111111111111111111111.0).toString()); - Expect.equals("0.00001", (0.00001).toString()); - Expect.equals("0.000001", (0.000001).toString()); - Expect.equals("1e-7", (0.0000001).toString()); - Expect.equals("1.2e-7", (0.00000012).toString()); - Expect.equals("1.23e-7", (0.000000123).toString()); - Expect.equals("1e-8", (0.00000001).toString()); - Expect.equals("1.2e-8", (0.000000012).toString()); - Expect.equals("1.23e-8", (0.0000000123).toString()); - - Expect.equals("-0.0", (-0.0).toString()); - Expect.equals("-90.12", (-90.12).toString()); - Expect.equals("-0.1", (-0.1).toString()); - Expect.equals("-0.01", (-0.01).toString()); - Expect.equals("-0.0123", (-0.0123).toString()); - Expect.equals( - "-1.1111111111111111e+21", (-1111111111111111111111.0).toString()); - Expect.equals( - "-1.1111111111111111e+22", (-11111111111111111111111.0).toString()); - Expect.equals("-0.00001", (-0.00001).toString()); - Expect.equals("-0.000001", (-0.000001).toString()); - Expect.equals("-1e-7", (-0.0000001).toString()); - Expect.equals("-1.2e-7", (-0.00000012).toString()); - Expect.equals("-1.23e-7", (-0.000000123).toString()); - Expect.equals("-1e-8", (-0.00000001).toString()); - Expect.equals("-1.2e-8", (-0.000000012).toString()); - Expect.equals("-1.23e-8", (-0.0000000123).toString()); - - Expect.equals("0.00001", (0.00001).toString()); - Expect.equals("1e+21", (1000000000000000012800.0).toString()); - Expect.equals("-1e+21", (-1000000000000000012800.0).toString()); - Expect.equals("1e-7", (0.0000001).toString()); - Expect.equals("-1e-7", (-0.0000001).toString()); - Expect.equals( - "1.0000000000000001e+21", (1000000000000000128000.0).toString()); - Expect.equals("0.000001", (0.000001).toString()); - Expect.equals("1e-7", (0.0000001).toString()); -} diff --git a/tests/language_2/double_literals/double_literal_coercion_error_test.dart b/tests/language_2/double_literals/double_literal_coercion_error_test.dart deleted file mode 100644 index c3051cc11cc..00000000000 --- a/tests/language_2/double_literals/double_literal_coercion_error_test.dart +++ /dev/null @@ -1,301 +0,0 @@ -// Copyright (c) 2018, 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 - -// Introduces a context with double as type. -void notDouble([double value]) { - if (value != null) throw "unreachable"; -} - -main() { - notDouble( - // Large decimal numbers which are not representable as doubles. - 9007199254740993, // 2^53+2^0 //# 001: compile-time error - 18014398509481983, // 2^54-2^0 //# 002: compile-time error - 18014398509481985, // 2^54+2^0 //# 003: compile-time error - 18014398509481986, // 2^54+2^1 //# 004: compile-time error - 4611686018427387903, // 2^62-2^0 //# 005: compile-time error - 4611686018427387902, // 2^62-2^1 //# 006: compile-time error - 4611686018427387900, // 2^62-2^2 //# 007: compile-time error - 4611686018427387896, // 2^62-2^3 //# 008: compile-time error - 4611686018427387888, // 2^62-2^4 //# 009: compile-time error - 4611686018427387872, // 2^62-2^5 //# 010: compile-time error - 4611686018427387840, // 2^62-2^6 //# 011: compile-time error - 4611686018427387776, // 2^62-2^7 //# 012: compile-time error - 4611686018427387648, // 2^62-2^8 //# 013: compile-time error - 4611686018427387905, // 2^62+2^0 //# 014: compile-time error - 4611686018427387906, // 2^62+2^1 //# 015: compile-time error - 4611686018427387908, // 2^62+2^2 //# 016: compile-time error - 4611686018427387912, // 2^62+2^3 //# 017: compile-time error - 4611686018427387920, // 2^62+2^4 //# 018: compile-time error - 4611686018427387936, // 2^62+2^5 //# 019: compile-time error - 4611686018427387968, // 2^62+2^6 //# 020: compile-time error - 4611686018427388032, // 2^62+2^7 //# 021: compile-time error - 4611686018427388160, // 2^62+2^8 //# 022: compile-time error - 4611686018427388416, // 2^62+2^9 //# 023: compile-time error - 9223372036854775807, // 2^63-2^0 //# 024: compile-time error - 9223372036854775806, // 2^63-2^1 //# 025: compile-time error - 9223372036854775804, // 2^63-2^2 //# 026: compile-time error - 9223372036854775800, // 2^63-2^3 //# 027: compile-time error - 9223372036854775792, // 2^63-2^4 //# 028: compile-time error - 9223372036854775776, // 2^63-2^5 //# 029: compile-time error - 9223372036854775744, // 2^63-2^6 //# 030: compile-time error - 9223372036854775680, // 2^63-2^7 //# 031: compile-time error - 9223372036854775552, // 2^63-2^8 //# 032: compile-time error - 9223372036854775296, // 2^63-2^9 //# 033: compile-time error - 9223372036854775809, // 2^63+2^0 //# 034: compile-time error - 9223372036854775810, // 2^63+2^1 //# 035: compile-time error - 9223372036854775812, // 2^63+2^2 //# 036: compile-time error - 9223372036854775816, // 2^63+2^3 //# 037: compile-time error - 9223372036854775824, // 2^63+2^4 //# 038: compile-time error - 9223372036854775840, // 2^63+2^5 //# 039: compile-time error - 9223372036854775872, // 2^63+2^6 //# 040: compile-time error - 9223372036854775936, // 2^63+2^7 //# 041: compile-time error - 9223372036854776064, // 2^63+2^8 //# 042: compile-time error - 9223372036854776320, // 2^63+2^9 //# 043: compile-time error - 9223372036854776832, // 2^63+2^10 //# 044: compile-time error - 18446744073709551615, // 2^64-2^0 //# 045: compile-time error - 18446744073709551614, // 2^64-2^1 //# 046: compile-time error - 18446744073709551612, // 2^64-2^2 //# 047: compile-time error - 18446744073709551608, // 2^64-2^3 //# 048: compile-time error - 18446744073709551600, // 2^64-2^4 //# 049: compile-time error - 18446744073709551584, // 2^64-2^5 //# 050: compile-time error - 18446744073709551552, // 2^64-2^6 //# 051: compile-time error - 18446744073709551488, // 2^64-2^7 //# 052: compile-time error - 18446744073709551360, // 2^64-2^8 //# 053: compile-time error - 18446744073709551104, // 2^64-2^9 //# 054: compile-time error - 18446744073709550592, // 2^64-2^10 //# 055: compile-time error - 18446744073709551617, // 2^64+2^0 //# 056: compile-time error - 18446744073709551618, // 2^64+2^1 //# 057: compile-time error - 18446744073709551620, // 2^64+2^2 //# 058: compile-time error - 18446744073709551624, // 2^64+2^3 //# 059: compile-time error - 18446744073709551632, // 2^64+2^4 //# 060: compile-time error - 18446744073709551648, // 2^64+2^5 //# 061: compile-time error - 18446744073709551680, // 2^64+2^6 //# 062: compile-time error - 18446744073709551744, // 2^64+2^7 //# 063: compile-time error - 18446744073709551872, // 2^64+2^8 //# 064: compile-time error - 18446744073709552128, // 2^64+2^9 //# 065: compile-time error - 18446744073709552640, // 2^64+2^10 //# 066: compile-time error - 18446744073709553664, // 2^64+2^11 //# 067: compile-time error - 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858367, // maxValue - 1 //# 068 : compile-time error - 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858369, // maxValue + 1 //# 069 : compile-time error - 359538626972463141629054847463408713596141135051689993197834953606314521560057077521179117265533756343080917907028764928468642653778928365536935093407075033972099821153102564152490980180778657888151737016910267884609166473806445896331617118664246696549595652408289446337476354361838599762500808052368249716734, // maxValue * 2 //# 070P : compile-time error - - // Negative numbers too. - -9007199254740993, // -(2^53+2^0) //# 071: compile-time error - -18014398509481983, // -(2^54-2^0) //# 072: compile-time error - -18014398509481985, // -(2^54+2^0) //# 073: compile-time error - -18014398509481986, // -(2^54+2^1) //# 074: compile-time error - -4611686018427387903, // -(2^62-2^0) //# 075: compile-time error - -4611686018427387902, // -(2^62-2^1) //# 076: compile-time error - -4611686018427387900, // -(2^62-2^2) //# 077: compile-time error - -4611686018427387896, // -(2^62-2^3) //# 078: compile-time error - -4611686018427387888, // -(2^62-2^4) //# 079: compile-time error - -4611686018427387872, // -(2^62-2^5) //# 080: compile-time error - -4611686018427387840, // -(2^62-2^6) //# 081: compile-time error - -4611686018427387776, // -(2^62-2^7) //# 082: compile-time error - -4611686018427387648, // -(2^62-2^8) //# 083: compile-time error - -4611686018427387905, // -(2^62+2^0) //# 084: compile-time error - -4611686018427387906, // -(2^62+2^1) //# 085: compile-time error - -4611686018427387908, // -(2^62+2^2) //# 086: compile-time error - -4611686018427387912, // -(2^62+2^3) //# 087: compile-time error - -4611686018427387920, // -(2^62+2^4) //# 088: compile-time error - -4611686018427387936, // -(2^62+2^5) //# 089: compile-time error - -4611686018427387968, // -(2^62+2^6) //# 090: compile-time error - -4611686018427388032, // -(2^62+2^7) //# 091: compile-time error - -4611686018427388160, // -(2^62+2^8) //# 092: compile-time error - -4611686018427388416, // -(2^62+2^9) //# 093: compile-time error - -9223372036854775807, // -(2^63-2^0) //# 094: compile-time error - -9223372036854775806, // -(2^63-2^1) //# 095: compile-time error - -9223372036854775804, // -(2^63-2^2) //# 096: compile-time error - -9223372036854775800, // -(2^63-2^3) //# 097: compile-time error - -9223372036854775792, // -(2^63-2^4) //# 098: compile-time error - -9223372036854775776, // -(2^63-2^5) //# 099: compile-time error - -9223372036854775744, // -(2^63-2^6) //# 100: compile-time error - -9223372036854775680, // -(2^63-2^7) //# 101: compile-time error - -9223372036854775552, // -(2^63-2^8) //# 102: compile-time error - -9223372036854775296, // -(2^63-2^9) //# 103: compile-time error - -9223372036854775809, // -(2^63+2^0) //# 104: compile-time error - -9223372036854775810, // -(2^63+2^1) //# 105: compile-time error - -9223372036854775812, // -(2^63+2^2) //# 106: compile-time error - -9223372036854775816, // -(2^63+2^3) //# 107: compile-time error - -9223372036854775824, // -(2^63+2^4) //# 108: compile-time error - -9223372036854775840, // -(2^63+2^5) //# 109: compile-time error - -9223372036854775872, // -(2^63+2^6) //# 110: compile-time error - -9223372036854775936, // -(2^63+2^7) //# 111: compile-time error - -9223372036854776064, // -(2^63+2^8) //# 112: compile-time error - -9223372036854776320, // -(2^63+2^9) //# 113: compile-time error - -9223372036854776832, // -(2^63+2^10) //# 114: compile-time error - -18446744073709551615, // -(2^64-2^0) //# 115: compile-time error - -18446744073709551614, // -(2^64-2^1) //# 116: compile-time error - -18446744073709551612, // -(2^64-2^2) //# 117: compile-time error - -18446744073709551608, // -(2^64-2^3) //# 118: compile-time error - -18446744073709551600, // -(2^64-2^4) //# 119: compile-time error - -18446744073709551584, // -(2^64-2^5) //# 120: compile-time error - -18446744073709551552, // -(2^64-2^6) //# 121: compile-time error - -18446744073709551488, // -(2^64-2^7) //# 122: compile-time error - -18446744073709551360, // -(2^64-2^8) //# 123: compile-time error - -18446744073709551104, // -(2^64-2^9) //# 124: compile-time error - -18446744073709550592, // -(2^64-2^10) //# 125: compile-time error - -18446744073709551617, // -(2^64+2^0) //# 126: compile-time error - -18446744073709551618, // -(2^64+2^1) //# 127: compile-time error - -18446744073709551620, // -(2^64+2^2) //# 128: compile-time error - -18446744073709551624, // -(2^64+2^3) //# 129: compile-time error - -18446744073709551632, // -(2^64+2^4) //# 130: compile-time error - -18446744073709551648, // -(2^64+2^5) //# 131: compile-time error - -18446744073709551680, // -(2^64+2^6) //# 132: compile-time error - -18446744073709551744, // -(2^64+2^7) //# 133: compile-time error - -18446744073709551872, // -(2^64+2^8) //# 134: compile-time error - -18446744073709552128, // -(2^64+2^9) //# 135: compile-time error - -18446744073709552640, // -(2^64+2^10) //# 136: compile-time error - -18446744073709553664, // -(2^64+2^11) //# 137: compile-time error - -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858367, // -(maxValue - 1) //# 138 : compile-time error - -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858369, // -(maxValue + 1) //# 139 : compile-time error - -359538626972463141629054847463408713596141135051689993197834953606314521560057077521179117265533756343080917907028764928468642653778928365536935093407075033972099821153102564152490980180778657888151737016910267884609166473806445896331617118664246696549595652408289446337476354361838599762500808052368249716734, // -(maxValue * 2) //# 140B : compile-time error - - // Same numbers as hexadecimal literals. - 0x20000000000001, // 2^53+2^0 //# 141: compile-time error - 0x3fffffffffffff, // 2^54-2^0 //# 142: compile-time error - 0x40000000000001, // 2^54+2^0 //# 143: compile-time error - 0x40000000000002, // 2^54+2^1 //# 144: compile-time error - 0x3fffffffffffffff, // 2^62-2^0 //# 145: compile-time error - 0x3ffffffffffffffe, // 2^62-2^1 //# 146: compile-time error - 0x3ffffffffffffffc, // 2^62-2^2 //# 147: compile-time error - 0x3ffffffffffffff8, // 2^62-2^3 //# 148: compile-time error - 0x3ffffffffffffff0, // 2^62-2^4 //# 149: compile-time error - 0x3fffffffffffffe0, // 2^62-2^5 //# 150: compile-time error - 0x3fffffffffffffc0, // 2^62-2^6 //# 151: compile-time error - 0x3fffffffffffff80, // 2^62-2^7 //# 152: compile-time error - 0x3fffffffffffff00, // 2^62-2^8 //# 153: compile-time error - 0x4000000000000001, // 2^62+2^0 //# 154: compile-time error - 0x4000000000000002, // 2^62+2^1 //# 155: compile-time error - 0x4000000000000004, // 2^62+2^2 //# 156: compile-time error - 0x4000000000000008, // 2^62+2^3 //# 157: compile-time error - 0x4000000000000010, // 2^62+2^4 //# 158: compile-time error - 0x4000000000000020, // 2^62+2^5 //# 159: compile-time error - 0x4000000000000040, // 2^62+2^6 //# 160: compile-time error - 0x4000000000000080, // 2^62+2^7 //# 161: compile-time error - 0x4000000000000100, // 2^62+2^8 //# 162: compile-time error - 0x4000000000000200, // 2^62+2^9 //# 163: compile-time error - 0x7fffffffffffffff, // 2^63-2^0 //# 164: compile-time error - 0x7ffffffffffffffe, // 2^63-2^1 //# 165: compile-time error - 0x7ffffffffffffffc, // 2^63-2^2 //# 166: compile-time error - 0x7ffffffffffffff8, // 2^63-2^3 //# 167: compile-time error - 0x7ffffffffffffff0, // 2^63-2^4 //# 168: compile-time error - 0x7fffffffffffffe0, // 2^63-2^5 //# 169: compile-time error - 0x7fffffffffffffc0, // 2^63-2^6 //# 170: compile-time error - 0x7fffffffffffff80, // 2^63-2^7 //# 171: compile-time error - 0x7fffffffffffff00, // 2^63-2^8 //# 172: compile-time error - 0x7ffffffffffffe00, // 2^63-2^9 //# 173: compile-time error - 0x8000000000000001, // 2^63+2^0 //# 174: compile-time error - 0x8000000000000002, // 2^63+2^1 //# 175: compile-time error - 0x8000000000000004, // 2^63+2^2 //# 176: compile-time error - 0x8000000000000008, // 2^63+2^3 //# 177: compile-time error - 0x8000000000000010, // 2^63+2^4 //# 178: compile-time error - 0x8000000000000020, // 2^63+2^5 //# 179: compile-time error - 0x8000000000000040, // 2^63+2^6 //# 180: compile-time error - 0x8000000000000080, // 2^63+2^7 //# 181: compile-time error - 0x8000000000000100, // 2^63+2^8 //# 182: compile-time error - 0x8000000000000200, // 2^63+2^9 //# 183: compile-time error - 0x8000000000000400, // 2^63+2^10 //# 184: compile-time error - 0xffffffffffffffff, // 2^64-2^0 //# 185: compile-time error - 0xfffffffffffffffe, // 2^64-2^1 //# 186: compile-time error - 0xfffffffffffffffc, // 2^64-2^2 //# 187: compile-time error - 0xfffffffffffffff8, // 2^64-2^3 //# 188: compile-time error - 0xfffffffffffffff0, // 2^64-2^4 //# 189: compile-time error - 0xffffffffffffffe0, // 2^64-2^5 //# 190: compile-time error - 0xffffffffffffffc0, // 2^64-2^6 //# 191: compile-time error - 0xffffffffffffff80, // 2^64-2^7 //# 192: compile-time error - 0xffffffffffffff00, // 2^64-2^8 //# 193: compile-time error - 0xfffffffffffffe00, // 2^64-2^9 //# 194: compile-time error - 0xfffffffffffffc00, // 2^64-2^10 //# 195: compile-time error - 0x10000000000000001, // 2^64+2^0 //# 196: compile-time error - 0x10000000000000002, // 2^64+2^1 //# 197: compile-time error - 0x10000000000000004, // 2^64+2^2 //# 198: compile-time error - 0x10000000000000008, // 2^64+2^3 //# 199: compile-time error - 0x10000000000000010, // 2^64+2^4 //# 200: compile-time error - 0x10000000000000020, // 2^64+2^5 //# 201: compile-time error - 0x10000000000000040, // 2^64+2^6 //# 202: compile-time error - 0x10000000000000080, // 2^64+2^7 //# 203: compile-time error - 0x10000000000000100, // 2^64+2^8 //# 204: compile-time error - 0x10000000000000200, // 2^64+2^9 //# 205: compile-time error - 0x10000000000000400, // 2^64+2^10 //# 206: compile-time error - 0x10000000000000800, // 2^64+2^11 //# 207: compile-time error - 0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, // maxValue - 1 //# 208 : compile-time error - 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, // maxValue + 1 //# 209 : compile-time error - 0x1fffffffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, // maxValue * 2 //# 210V : compile-time error - - -0x20000000000001, // -(2^53+2^0) //# 211: compile-time error - -0x3fffffffffffff, // -(2^54-2^0) //# 212: compile-time error - -0x40000000000001, // -(2^54+2^0) //# 213: compile-time error - -0x40000000000002, // -(2^54+2^1) //# 214: compile-time error - -0x3fffffffffffffff, // -(2^62-2^0) //# 215: compile-time error - -0x3ffffffffffffffe, // -(2^62-2^1) //# 216: compile-time error - -0x3ffffffffffffffc, // -(2^62-2^2) //# 217: compile-time error - -0x3ffffffffffffff8, // -(2^62-2^3) //# 218: compile-time error - -0x3ffffffffffffff0, // -(2^62-2^4) //# 219: compile-time error - -0x3fffffffffffffe0, // -(2^62-2^5) //# 220: compile-time error - -0x3fffffffffffffc0, // -(2^62-2^6) //# 221: compile-time error - -0x3fffffffffffff80, // -(2^62-2^7) //# 222: compile-time error - -0x3fffffffffffff00, // -(2^62-2^8) //# 223: compile-time error - -0x4000000000000001, // -(2^62+2^0) //# 224: compile-time error - -0x4000000000000002, // -(2^62+2^1) //# 225: compile-time error - -0x4000000000000004, // -(2^62+2^2) //# 226: compile-time error - -0x4000000000000008, // -(2^62+2^3) //# 227: compile-time error - -0x4000000000000010, // -(2^62+2^4) //# 228: compile-time error - -0x4000000000000020, // -(2^62+2^5) //# 229: compile-time error - -0x4000000000000040, // -(2^62+2^6) //# 230: compile-time error - -0x4000000000000080, // -(2^62+2^7) //# 231: compile-time error - -0x4000000000000100, // -(2^62+2^8) //# 232: compile-time error - -0x4000000000000200, // -(2^62+2^9) //# 233: compile-time error - -0x7fffffffffffffff, // -(2^63-2^0) //# 234: compile-time error - -0x7ffffffffffffffe, // -(2^63-2^1) //# 235: compile-time error - -0x7ffffffffffffffc, // -(2^63-2^2) //# 236: compile-time error - -0x7ffffffffffffff8, // -(2^63-2^3) //# 237: compile-time error - -0x7ffffffffffffff0, // -(2^63-2^4) //# 238: compile-time error - -0x7fffffffffffffe0, // -(2^63-2^5) //# 239: compile-time error - -0x7fffffffffffffc0, // -(2^63-2^6) //# 240: compile-time error - -0x7fffffffffffff80, // -(2^63-2^7) //# 241: compile-time error - -0x7fffffffffffff00, // -(2^63-2^8) //# 242: compile-time error - -0x7ffffffffffffe00, // -(2^63-2^9) //# 243: compile-time error - -0x8000000000000001, // -(2^63+2^0) //# 244: compile-time error - -0x8000000000000002, // -(2^63+2^1) //# 245: compile-time error - -0x8000000000000004, // -(2^63+2^2) //# 246: compile-time error - -0x8000000000000008, // -(2^63+2^3) //# 247: compile-time error - -0x8000000000000010, // -(2^63+2^4) //# 248: compile-time error - -0x8000000000000020, // -(2^63+2^5) //# 249: compile-time error - -0x8000000000000040, // -(2^63+2^6) //# 250: compile-time error - -0x8000000000000080, // -(2^63+2^7) //# 251: compile-time error - -0x8000000000000100, // -(2^63+2^8) //# 252: compile-time error - -0x8000000000000200, // -(2^63+2^9) //# 253: compile-time error - -0x8000000000000400, // -(2^63+2^10) //# 254: compile-time error - -0xffffffffffffffff, // -(2^64-2^0) //# 255: compile-time error - -0xfffffffffffffffe, // -(2^64-2^1) //# 256: compile-time error - -0xfffffffffffffffc, // -(2^64-2^2) //# 257: compile-time error - -0xfffffffffffffff8, // -(2^64-2^3) //# 258: compile-time error - -0xfffffffffffffff0, // -(2^64-2^4) //# 259: compile-time error - -0xffffffffffffffe0, // -(2^64-2^5) //# 260: compile-time error - -0xffffffffffffffc0, // -(2^64-2^6) //# 261: compile-time error - -0xffffffffffffff80, // -(2^64-2^7) //# 262: compile-time error - -0xffffffffffffff00, // -(2^64-2^8) //# 263: compile-time error - -0xfffffffffffffe00, // -(2^64-2^9) //# 264: compile-time error - -0xfffffffffffffc00, // -(2^64-2^10) //# 265: compile-time error - -0x10000000000000001, // -(2^64+2^0) //# 266: compile-time error - -0x10000000000000002, // -(2^64+2^1) //# 267: compile-time error - -0x10000000000000004, // -(2^64+2^2) //# 268: compile-time error - -0x10000000000000008, // -(2^64+2^3) //# 269: compile-time error - -0x10000000000000010, // -(2^64+2^4) //# 270: compile-time error - -0x10000000000000020, // -(2^64+2^5) //# 271: compile-time error - -0x10000000000000040, // -(2^64+2^6) //# 272: compile-time error - -0x10000000000000080, // -(2^64+2^7) //# 273: compile-time error - -0x10000000000000100, // -(2^64+2^8) //# 274: compile-time error - -0x10000000000000200, // -(2^64+2^9) //# 275: compile-time error - -0x10000000000000400, // -(2^64+2^10) //# 276: compile-time error - -0x10000000000000800, // -(2^64+2^11) //# 277: compile-time error - -0xfffffffffffff7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff, // -(maxValue - 1) //# 278 : compile-time error - -0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, // -(maxValue + 1) //# 279 : compile-time error - -0x1fffffffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, // -(maxValue * 2) //# 280 : compile-time error - ); -} diff --git a/tests/language_2/double_literals/double_literal_coercion_test.dart b/tests/language_2/double_literals/double_literal_coercion_test.dart deleted file mode 100644 index 1771aec9efd..00000000000 --- a/tests/language_2/double_literals/double_literal_coercion_test.dart +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// Pass expected value and then decimal literal value in a double context. -void expectDouble(double expectedValue, double actualValue) { - if (expectedValue == null) return; - Expect.identical(expectedValue, actualValue); -} - -// Some exact powers of two as double values. -double p2_8 = 256.0; -double p2_30 = 1073741824.0; -double p2_31 = 2147483648.0; -double p2_32 = 4294967296.0; -double p2_52 = 4503599627370496.0; -double p2_53 = 9007199254740992.0; -double p2_54 = 18014398509481984.0; -double p2_62 = 4611686018427387904.0; -double p2_63 = 9223372036854775808.0; -double p2_64 = 18446744073709551616.0; -double maxValue = 1.7976931348623157e+308; - -main() { - expectDouble(0.0, 0); - expectDouble(1.0, 1); - expectDouble(0.0, 00); - expectDouble(1.0, 01); - expectDouble(p2_8 - 1, 255); - expectDouble(p2_8, 256); - expectDouble(p2_8 + 1, 257); - expectDouble(p2_30 - 1, 1073741823); - expectDouble(p2_30, 1073741824); - expectDouble(p2_30 + 1, 1073741825); - expectDouble(p2_31 - 1, 2147483647); - expectDouble(p2_31, 2147483648); - expectDouble(p2_31 + 1, 2147483649); - expectDouble(p2_32 - 1, 4294967295); - expectDouble(p2_32, 4294967296); - expectDouble(p2_32 + 1, 4294967297); - expectDouble(p2_52 - 1, 4503599627370495); - expectDouble(p2_52, 4503599627370496); - expectDouble(p2_52 + 1, 4503599627370497); - expectDouble(p2_53 - 1, 9007199254740991); - expectDouble(p2_53, 9007199254740992); - expectDouble(p2_53 + 2, 9007199254740994); - expectDouble(p2_54 - 2, 18014398509481982); - expectDouble(p2_54, 18014398509481984); - expectDouble(p2_54 + 4, 18014398509481988); - expectDouble(p2_62, 4611686018427387904); - expectDouble(p2_63, 9223372036854775808); - expectDouble(p2_64, 18446744073709551616); - expectDouble(maxValue, - 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368); - - expectDouble(-0.0, -0); - expectDouble(-1.0, -1); - expectDouble(-0.0, -00); - expectDouble(-1.0, -01); - expectDouble(-(p2_8 - 1), -255); - expectDouble(-(p2_8), -256); - expectDouble(-(p2_8 + 1), -257); - expectDouble(-(p2_30 - 1), -1073741823); - expectDouble(-(p2_30), -1073741824); - expectDouble(-(p2_30 + 1), -1073741825); - expectDouble(-(p2_31 - 1), -2147483647); - expectDouble(-(p2_31), -2147483648); - expectDouble(-(p2_31 + 1), -2147483649); - expectDouble(-(p2_32 - 1), -4294967295); - expectDouble(-(p2_32), -4294967296); - expectDouble(-(p2_32 + 1), -4294967297); - expectDouble(-(p2_52 - 1), -4503599627370495); - expectDouble(-(p2_52), -4503599627370496); - expectDouble(-(p2_52 + 1), -4503599627370497); - expectDouble(-(p2_53 - 1), -9007199254740991); - expectDouble(-(p2_53), -9007199254740992); - expectDouble(-(p2_53 + 2), -9007199254740994); - expectDouble(-(p2_54 - 2), -18014398509481982); - expectDouble(-(p2_54), -18014398509481984); - expectDouble(-(p2_54 + 4), -18014398509481988); - expectDouble(-(p2_62), -4611686018427387904); - expectDouble(-(p2_63), -9223372036854775808); - expectDouble(-(p2_64), -18446744073709551616); - expectDouble(-maxValue, - -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368); - - expectDouble(0.0, 0x0); - expectDouble(1.0, 0x1); - expectDouble(0.0, 0x00); - expectDouble(1.0, 0x01); - expectDouble(p2_8 - 1, 0xff); - expectDouble(p2_8, 0x100); - expectDouble(p2_8 + 1, 0x101); - expectDouble(p2_30 - 1, 0x3fffffff); - expectDouble(p2_30, 0x40000000); - expectDouble(p2_30 + 1, 0x40000001); - expectDouble(p2_31 - 1, 0x7fffffff); - expectDouble(p2_31, 0x80000000); - expectDouble(p2_31 + 1, 0x80000001); - expectDouble(p2_32 - 1, 0xffffffff); - expectDouble(p2_32, 0x100000000); - expectDouble(p2_32 + 1, 0x100000001); - expectDouble(p2_52 - 1, 0xfffffffffffff); - expectDouble(p2_52, 0x10000000000000); - expectDouble(p2_52 + 1, 0x10000000000001); - expectDouble(p2_53 - 1, 0x1fffffffffffff); - expectDouble(p2_53, 0x20000000000000); - expectDouble(p2_53 + 2, 0x20000000000002); - expectDouble(p2_54 - 2, 0x3ffffffffffffe); - expectDouble(p2_54, 0x40000000000000); - expectDouble(p2_54 + 4, 0x40000000000004); - expectDouble(p2_62, 0x4000000000000000); - expectDouble(p2_63, 0x8000000000000000); - expectDouble(p2_64, 0x10000000000000000); - expectDouble(maxValue, - 0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000); - - expectDouble(-0.0, -0x0); - expectDouble(-1.0, -0x1); - expectDouble(-0.0, -0x00); - expectDouble(-1.0, -0x01); - expectDouble(-(p2_8 - 1), -0xff); - expectDouble(-(p2_8), -0x100); - expectDouble(-(p2_8 + 1), -0x101); - expectDouble(-(p2_30 - 1), -0x3fffffff); - expectDouble(-(p2_30), -0x40000000); - expectDouble(-(p2_30 + 1), -0x40000001); - expectDouble(-(p2_31 - 1), -0x7fffffff); - expectDouble(-(p2_31), -0x80000000); - expectDouble(-(p2_31 + 1), -0x80000001); - expectDouble(-(p2_32 - 1), -0xffffffff); - expectDouble(-(p2_32), -0x100000000); - expectDouble(-(p2_32 + 1), -0x100000001); - expectDouble(-(p2_52 - 1), -0xfffffffffffff); - expectDouble(-(p2_52), -0x10000000000000); - expectDouble(-(p2_52 + 1), -0x10000000000001); - expectDouble(-(p2_53 - 1), -0x1fffffffffffff); - expectDouble(-(p2_53), -0x20000000000000); - expectDouble(-(p2_53 + 2), -0x20000000000002); - expectDouble(-(p2_54 - 2), -0x3ffffffffffffe); - expectDouble(-(p2_54), -0x40000000000000); - expectDouble(-(p2_54 + 4), -0x40000000000004); - expectDouble(-(p2_62), -0x4000000000000000); - expectDouble(-(p2_63), -0x8000000000000000); - expectDouble(-(p2_64), -0x10000000000000000); - expectDouble(-maxValue, - -0xfffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000); -} diff --git a/tests/language_2/double_literals/implicit_double_context_test.dart b/tests/language_2/double_literals/implicit_double_context_test.dart deleted file mode 100644 index 8a2bfff20c7..00000000000 --- a/tests/language_2/double_literals/implicit_double_context_test.dart +++ /dev/null @@ -1,690 +0,0 @@ -// Copyright (c) 2018, 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 - -import "dart:async" show FutureOr; - -import "package:expect/expect.dart"; - -// Check that integer literals in a double context are allowed -// for various double context. - -main() { - // Variable initializer context. - double v1 = 0; - Expect.identical(0.0, v1); - double v2 = 1; - Expect.identical(1.0, v2); - double v3 = -0; - Expect.identical(-0.0, v3); - double v4 = -1; - Expect.identical(-1.0, v4); - double v5 = 9223372036854775808; // 2^63, not valid signed 64-bit integer. - Expect.identical(9223372036854775808.0, v5); - double v6 = 18446744073709551616; // 2^64. - Expect.identical(18446744073709551616.0, v6); - double v7 = 0x02; // Hex literal. - Expect.identical(2.0, v7); - double v8 = -0x02; // Hex literal. - Expect.identical(-2.0, v8); - - // Const variable initializer context. - const double c1 = 0; - Expect.identical(0.0, c1); - const double c2 = 1; - Expect.identical(1.0, c2); - const double c3 = -0; - Expect.identical(-0.0, c3); - const double c4 = -1; - Expect.identical(-1.0, c4); - const double c5 = 9223372036854775808; - Expect.identical(9223372036854775808.0, c5); - const double c6 = 18446744073709551616; - Expect.identical(18446744073709551616.0, c6); - const double c7 = 0x02; // Hex literal. - Expect.identical(2.0, c7); - const double c8 = -0x02; // Hex literal. - Expect.identical(-2.0, c8); - - // Assignment context, variable. - double value; - value = 0; - Expect.identical(0.0, value); - value = 1; - Expect.identical(1.0, value); - value = -0; - Expect.identical(-0.0, value); - value = -1; - Expect.identical(-1.0, value); - value = 9223372036854775808; - Expect.identical(9223372036854775808.0, value); - value = 18446744073709551616; - Expect.identical(18446744073709551616.0, value); - value = 0x02; - Expect.identical(2.0, value); - value = -0x02; - Expect.identical(-2.0, value); - - // Assignment context, setter. - setter = 0; - Expect.identical(0.0, lastSetValue); - setter = 1; - Expect.identical(1.0, lastSetValue); - setter = -0; - Expect.identical(-0.0, lastSetValue); - setter = -1; - Expect.identical(-1.0, lastSetValue); - setter = 9223372036854775808; - Expect.identical(9223372036854775808.0, lastSetValue); - setter = 18446744073709551616; - Expect.identical(18446744073709551616.0, lastSetValue); - setter = 0x02; - Expect.identical(2.0, lastSetValue); - setter = -0x02; - Expect.identical(-2.0, lastSetValue); - - // Argument context. - test(0.0, 0); - test(1.0, 1); - test(-0.0, -0); - test(-1.0, -1); - test(9223372036854775808.0, 9223372036854775808); - test(18446744073709551616.0, 18446744073709551616); - test(2.0, 0x02); - test(-2.0, -0x02); - - // Argument context, operator setter. - List box = [0.5]; - box[0] = 0; - Expect.identical(0.0, box[0]); - box[0] = 1; - Expect.identical(1.0, box[0]); - box[0] = -0; - Expect.identical(-0.0, box[0]); - box[0] = -1; - Expect.identical(-1.0, box[0]); - box[0] = 9223372036854775808; - Expect.identical(9223372036854775808.0, box[0]); - box[0] = 18446744073709551616; - Expect.identical(18446744073709551616.0, box[0]); - box[0] = 0x02; - Expect.identical(2.0, box[0]); - box[0] = -0x02; - Expect.identical(-2.0, box[0]); - - // Argument context, custom operators. - var oper = Oper(); - Expect.identical(0.0, oper + 0); - Expect.identical(1.0, oper + 1); - Expect.identical(-0.0, oper + -0); - Expect.identical(-1.0, oper + -1); - Expect.identical(9223372036854775808.0, oper + 9223372036854775808); - Expect.identical(18446744073709551616.0, oper + 18446744073709551616); - Expect.identical(2.0, oper + 0x02); - Expect.identical(-2.0, oper + -0x02); - - Expect.identical(0.0, oper >> 0); - Expect.identical(1.0, oper >> 1); - Expect.identical(-0.0, oper >> -0); - Expect.identical(-1.0, oper >> -1); - Expect.identical(9223372036854775808.0, oper >> 9223372036854775808); - Expect.identical(18446744073709551616.0, oper >> 18446744073709551616); - Expect.identical(2.0, oper >> 0x02); - Expect.identical(-2.0, oper >> -0x02); - - Expect.identical(0.0, oper[0]); - Expect.identical(1.0, oper[1]); - Expect.identical(-0.0, oper[-0]); - Expect.identical(-1.0, oper[-1]); - Expect.identical(9223372036854775808.0, oper[9223372036854775808]); - Expect.identical(18446744073709551616.0, oper[18446744073709551616]); - Expect.identical(2.0, oper[0x02]); - Expect.identical(-2.0, oper[-0x02]); - - // Explicit return context. - double fun1() => 0; - Expect.identical(0.0, fun1()); - double fun2() => 1; - Expect.identical(1.0, fun2()); - double fun3() => -0; - Expect.identical(-0.0, fun3()); - double fun4() => -1; - Expect.identical(-1.0, fun4()); - double fun5() => 9223372036854775808; - Expect.identical(9223372036854775808.0, fun5()); - double fun6() => 18446744073709551616; - Expect.identical(18446744073709551616.0, fun6()); - double fun7() => 0x02; - Expect.identical(2.0, fun7()); - double fun8() => -0x02; - Expect.identical(-2.0, fun8()); - - // Inferred return context. - testFun(0.0, () => 0); - testFun(1.0, () => 1); - testFun(-0.0, () => -0); - testFun(-1.0, () => -1); - testFun(9223372036854775808.0, () => 9223372036854775808); - testFun(18446744073709551616.0, () => 18446744073709551616); - testFun(2.0, () => 0x02); - testFun(-2.0, () => -0x02); - - // Function default value context. - Object deffun1([double v = 0]) => v; - Expect.identical(0.0, deffun1()); - Object deffun2([double v = 1]) => v; - Expect.identical(1.0, deffun2()); - Object deffun3([double v = -0]) => v; - Expect.identical(-0.0, deffun3()); - Object deffun4([double v = -1]) => v; - Expect.identical(-1.0, deffun4()); - Object deffun5([double v = 9223372036854775808]) => v; - Expect.identical(9223372036854775808.0, deffun5()); - Object deffun6([double v = 18446744073709551616]) => v; - Expect.identical(18446744073709551616.0, deffun6()); - Object deffun7([double v = 0x02]) => v; - Expect.identical(2.0, deffun7()); - Object deffun8([double v = -0x02]) => v; - Expect.identical(-2.0, deffun8()); - - // Explicit collection literal context. - box = [0]; - Expect.identical(0.0, box[0]); - box = [1]; - Expect.identical(1.0, box[0]); - box = [-0]; - Expect.identical(-0.0, box[0]); - box = [-1]; - Expect.identical(-1.0, box[0]); - box = [9223372036854775808]; - Expect.identical(9223372036854775808.0, box[0]); - box = [18446744073709551616]; - Expect.identical(18446744073709551616.0, box[0]); - box = [0x02]; - Expect.identical(2.0, box[0]); - box = [-0x02]; - Expect.identical(-2.0, box[0]); - - // Implicit collection literal context. - box = [0]; - Expect.identical(0.0, box[0]); - box = [1]; - Expect.identical(1.0, box[0]); - box = [-0]; - Expect.identical(-0.0, box[0]); - box = [-1]; - Expect.identical(-1.0, box[0]); - box = [9223372036854775808]; - Expect.identical(9223372036854775808.0, box[0]); - box = [18446744073709551616]; - Expect.identical(18446744073709551616.0, box[0]); - box = [0x02]; - Expect.identical(2.0, box[0]); - box = [-0x02]; - Expect.identical(-2.0, box[0]); - - Map map; - // Explicit map key context. - map = {0: null}; - Expect.identical(0.0, map.keys.first); - map = {1: null}; - Expect.identical(1.0, map.keys.first); - map = {-0: null}; - Expect.identical(-0.0, map.keys.first); - map = {-1: null}; - Expect.identical(-1.0, map.keys.first); - map = {9223372036854775808: null}; - Expect.identical(9223372036854775808.0, map.keys.first); - map = {18446744073709551616: null}; - Expect.identical(18446744073709551616.0, map.keys.first); - map = {0x02: null}; - Expect.identical(2.0, map.keys.first); - map = {-0x02: null}; - Expect.identical(-2.0, map.keys.first); - - // Implicit map key context. - map = {0: null}; - Expect.identical(0.0, map.keys.first); - map = {1: null}; - Expect.identical(1.0, map.keys.first); - map = {-0: null}; - Expect.identical(-0.0, map.keys.first); - map = {-1: null}; - Expect.identical(-1.0, map.keys.first); - map = {9223372036854775808: null}; - Expect.identical(9223372036854775808.0, map.keys.first); - map = {18446744073709551616: null}; - Expect.identical(18446744073709551616.0, map.keys.first); - map = {0x02: null}; - Expect.identical(2.0, map.keys.first); - map = {-0x02: null}; - Expect.identical(-2.0, map.keys.first); - - // Explicit map value context. - map = {null: 0}; - Expect.identical(0.0, map.values.first); - map = {null: 1}; - Expect.identical(1.0, map.values.first); - map = {null: -0}; - Expect.identical(-0.0, map.values.first); - map = {null: -1}; - Expect.identical(-1.0, map.values.first); - map = {null: 9223372036854775808}; - Expect.identical(9223372036854775808.0, map.values.first); - map = {null: 18446744073709551616}; - Expect.identical(18446744073709551616.0, map.values.first); - map = {null: 0x02}; - Expect.identical(2.0, map.values.first); - map = {null: -0x02}; - Expect.identical(-2.0, map.values.first); - - // Implicit map value context. - map = {null: 0}; - Expect.identical(0.0, map.values.first); - map = {null: 1}; - Expect.identical(1.0, map.values.first); - map = {null: -0}; - Expect.identical(-0.0, map.values.first); - map = {null: -1}; - Expect.identical(-1.0, map.values.first); - map = {null: 9223372036854775808}; - Expect.identical(9223372036854775808.0, map.values.first); - map = {null: 18446744073709551616}; - Expect.identical(18446744073709551616.0, map.values.first); - map = {null: 0x02}; - Expect.identical(2.0, map.values.first); - map = {null: -0x02}; - Expect.identical(-2.0, map.values.first); - - // Top-level contexts - Expect.identical(0.0, ts1); - Expect.identical(1.0, ts2); - Expect.identical(-0.0, ts3); - Expect.identical(-1.0, ts4); - Expect.identical(9223372036854775808.0, ts5); - Expect.identical(18446744073709551616.0, ts6); - Expect.identical(2.0, ts7); - Expect.identical(-2.0, ts8); - - Expect.identical(0.0, tc1); - Expect.identical(1.0, tc2); - Expect.identical(-0.0, tc3); - Expect.identical(-1.0, tc4); - Expect.identical(9223372036854775808.0, tc5); - Expect.identical(18446744073709551616.0, tc6); - Expect.identical(2.0, tc7); - Expect.identical(-2.0, tc8); - - Expect.identical(0.0, tg1); - Expect.identical(1.0, tg2); - Expect.identical(-0.0, tg3); - Expect.identical(-1.0, tg4); - Expect.identical(9223372036854775808.0, tg5); - Expect.identical(18446744073709551616.0, tg6); - Expect.identical(2.0, tg7); - Expect.identical(-2.0, tg8); - - // Class contexts - var c = new C.ci1(); - Expect.identical(0.0, c.v1); - Expect.identical(1.0, c.v2); - Expect.identical(-0.0, c.v3); - Expect.identical(-1.0, c.v4); - Expect.identical(9223372036854775808.0, c.v5); - Expect.identical(18446744073709551616.0, c.v6); - Expect.identical(2.0, c.v7); - Expect.identical(-2.0, c.v8); - - Expect.identical(0.0, C.s1); - Expect.identical(1.0, C.s2); - Expect.identical(-0.0, C.s3); - Expect.identical(-1.0, C.s4); - Expect.identical(9223372036854775808.0, C.s5); - Expect.identical(18446744073709551616.0, C.s6); - Expect.identical(2.0, C.s7); - Expect.identical(-2.0, C.s8); - - Expect.identical(0.0, C.c1); - Expect.identical(1.0, C.c2); - Expect.identical(-0.0, C.c3); - Expect.identical(-1.0, C.c4); - Expect.identical(9223372036854775808.0, C.c5); - Expect.identical(18446744073709551616.0, C.c6); - Expect.identical(2.0, C.c7); - Expect.identical(-2.0, C.c8); - - Expect.identical(0.0, new C.cc1().d); - Expect.identical(1.0, new C.cc2().d); - Expect.identical(-0.0, new C.cc3().d); - Expect.identical(-1.0, new C.cc4().d); - Expect.identical(9223372036854775808.0, new C.cc5().d); - Expect.identical(18446744073709551616.0, new C.cc6().d); - Expect.identical(2.0, new C.cc7().d); - Expect.identical(-2.0, new C.cc8().d); - - Expect.identical(0.0, const C.cc1().d); - Expect.identical(1.0, const C.cc2().d); - Expect.identical(-0.0, const C.cc3().d); - Expect.identical(-1.0, const C.cc4().d); - Expect.identical(9223372036854775808.0, const C.cc5().d); - Expect.identical(18446744073709551616.0, const C.cc6().d); - Expect.identical(2.0, const C.cc7().d); - Expect.identical(-2.0, const C.cc8().d); - - Expect.identical(0.0, new C.ci1().d); - Expect.identical(1.0, new C.ci2().d); - Expect.identical(-0.0, new C.ci3().d); - Expect.identical(-1.0, new C.ci4().d); - Expect.identical(9223372036854775808.0, new C.ci5().d); - Expect.identical(18446744073709551616.0, new C.ci6().d); - Expect.identical(2.0, new C.ci7().d); - Expect.identical(-2.0, new C.ci8().d); - - Expect.identical(0.0, const C.ci1().d); - Expect.identical(1.0, const C.ci2().d); - Expect.identical(-0.0, const C.ci3().d); - Expect.identical(-1.0, const C.ci4().d); - Expect.identical(9223372036854775808.0, const C.ci5().d); - Expect.identical(18446744073709551616.0, const C.ci6().d); - Expect.identical(2.0, const C.ci7().d); - Expect.identical(-2.0, const C.ci8().d); - - // Nested context, `?:`. - v1 = false ? 42.0 : 0; - Expect.identical(0.0, v1); - v2 = false ? 42.0 : 1; - Expect.identical(1.0, v2); - v3 = false ? 42.0 : -0; - Expect.identical(-0.0, v3); - v4 = false ? 42.0 : -1; - Expect.identical(-1.0, v4); - v5 = false ? 42.0 : 9223372036854775808; - Expect.identical(9223372036854775808.0, v5); - v6 = false ? 42.0 : 18446744073709551616; - Expect.identical(18446744073709551616.0, v6); - v7 = false ? 42.0 : 0x02; // Hex literal. - Expect.identical(2.0, v7); - v8 = false ? 42.0 : -0x02; // Hex literal. - Expect.identical(-2.0, v8); - - // Nested context, `??`. - double nl = double.tryParse("not a double"); // Returns null typed as double. - v1 = nl ?? 0; - Expect.identical(0.0, v1); - v2 = nl ?? 1; - Expect.identical(1.0, v2); - v3 = nl ?? -0; - Expect.identical(-0.0, v3); - v4 = nl ?? -1; - Expect.identical(-1.0, v4); - v5 = nl ?? 9223372036854775808; - Expect.identical(9223372036854775808.0, v5); - v6 = nl ?? 18446744073709551616; - Expect.identical(18446744073709551616.0, v6); - v7 = nl ?? 0x02; // Hex literal. - Expect.identical(2.0, v7); - v8 = nl ?? -0x02; // Hex literal. - Expect.identical(-2.0, v8); - - // Nested context, `..`. - v1 = 0..toString(); - Expect.identical(0.0, v1); - v2 = 1..toString(); - Expect.identical(1.0, v2); - v3 = -0 - ..toString(); - Expect.identical(-0.0, v3); - v4 = -1 - ..toString(); - Expect.identical(-1.0, v4); - v5 = 9223372036854775808..toString(); - Expect.identical(9223372036854775808.0, v5); - v6 = 18446744073709551616..toString(); - Expect.identical(18446744073709551616.0, v6); - v7 = 0x02..toString(); // Hex literal. - Expect.identical(2.0, v7); - v8 = -0x02 - ..toString(); // Hex literal. - Expect.identical(-2.0, v8); - - // Nexted context, double assignment. - Object object; - object = value = 0; - Expect.identical(0.0, value); - object = value = 1; - Expect.identical(1.0, value); - object = value = -0; - Expect.identical(-0.0, value); - object = value = -1; - Expect.identical(-1.0, value); - object = value = 9223372036854775808; - Expect.identical(9223372036854775808.0, value); - object = value = 18446744073709551616; - Expect.identical(18446744073709551616.0, value); - object = value = 0x02; - Expect.identical(2.0, value); - object = value = -0x02; - Expect.identical(-2.0, value); - - // Nested context, value of assignment. - Expect.identical(0.0, value = 0); - Expect.identical(1.0, value = 1); - Expect.identical(-0.0, value = -0); - Expect.identical(-1.0, value = -1); - Expect.identical(9223372036854775808.0, value = 9223372036854775808); - Expect.identical(18446744073709551616.0, value = 18446744073709551616); - Expect.identical(2.0, value = 0x02); - Expect.identical(-2.0, value = -0x02); - - // JavaScript platforms represent integers as doubles, so negating them will - // result in negative zero, unfortunately. - int zero = 0; - bool platformHasNegativeZeroInts = (-zero).isNegative; - - // Not promoted without a double context. - num x = -0; - Expect.identical(0, x); - Expect.equals(x.isNegative, platformHasNegativeZeroInts); - - var list = [3.14, 2.17, -0]; - Expect.notType>(list); - Expect.identical(0, list[2]); - Expect.equals(list[2].isNegative, platformHasNegativeZeroInts); - - // FutureOr also forces double. - // "Type that int is not assignable to, but double is." - FutureOr fo1 = 0; - Expect.identical(0.0, fo1); - FutureOr fo2 = 1; - Expect.identical(1.0, fo2); - FutureOr fo3 = -0; - Expect.identical(-0.0, fo3); - FutureOr fo4 = -1; - Expect.identical(-1.0, fo4); - FutureOr fo5 = 9223372036854775808; - Expect.identical(9223372036854775808.0, fo5); - FutureOr fo6 = 18446744073709551616; - Expect.identical(18446744073709551616.0, fo6); - FutureOr fo7 = 0x02; // Hex literal. - Expect.identical(2.0, fo7); - FutureOr fo8 = -0x02; // Hex literal. - Expect.identical(-2.0, fo8); - - // Some other FutureOr cases, without being exhaustive. - { - Object func([FutureOr x = 9223372036854775808]) => x; - Expect.identical(9223372036854775808.0, func(9223372036854775808)); - Expect.identical(9223372036854775808.0, func()); - FutureOr func2() => 9223372036854775808; - Expect.identical(9223372036854775808.0, func2()); - testGeneric>(9223372036854775808.0, 9223372036854775808); - List> l = [9223372036854775808]; - testGeneric>(9223372036854775808.0, l[0]); - l.add(9223372036854775808); - testGeneric>(9223372036854775808.0, l[1]); - l.add(0.0); - l[2] = 9223372036854775808; - testGeneric>(9223372036854775808.0, l[2]); - } - - // Type variables statically bound to double also force doubles: - testGeneric(0.0, 0); - testGeneric(1.0, 1); - testGeneric(-0.0, -0); - testGeneric(-1.0, -1); - testGeneric(9223372036854775808.0, 9223372036854775808); - testGeneric(18446744073709551616.0, 18446744073709551616); - testGeneric(2.0, 0x02); - testGeneric(-2.0, -0x02); - - // Uses static type, not run-time type. - Super sub = Sub(); - Expect.identical(0.0, sub.method(0)); - Expect.identical(1.0, sub.method(1)); - Expect.identical(-0.0, sub.method(-0)); - Expect.identical(-1.0, sub.method(-1)); - Expect.identical(9223372036854775808.0, sub.method(9223372036854775808)); - Expect.identical(18446744073709551616.0, sub.method(18446744073709551616)); - Expect.identical(2.0, sub.method(0x02)); - Expect.identical(-2.0, sub.method(-0x02)); - - { - // Check that the correct value is used as receiver for the cascade. - var collector = StringBuffer(); - double tricky = -42 - ..toString().codeUnits.forEach(collector.writeCharCode); - Expect.equals("${-42.0}", collector.toString()); - } - - bool isDigit(int charCode) => (charCode ^ 0x30) <= 9; - // Throws because double context does not affect "4", so the toString does - // not contain any non-digit (like ".", which it would if 4 was a double). - // The context type of "4.toString..." is not double, and the `-` - // is not having a literal as operand. - Expect.throws(() { - double tricky = - -4.toString().codeUnits.firstWhere((c) => !isDigit(c)).toDouble(); - }); - // The `?.` operation has the same precedence as `.`. - Expect.throws(() { - double tricky = - -4?.toString().codeUnits.firstWhere((c) => !isDigit(c)).toDouble(); - }); -} - -void test(double expect, double value) { - Expect.identical(expect, value); -} - -void testFun(double expect, double f()) { - Expect.identical(expect, f()); -} - -void testGeneric(double expect, T value) { - Expect.identical(expect, value); -} - -class Oper { - Object operator +(double value) => value; - Object operator >>(double value) => value; - Object operator [](double value) => value; -} - -class C { - // Instance variable initializer - final double v1 = 0; - final double v2 = 1; - final double v3 = -0; - final double v4 = -1; - final double v5 = 9223372036854775808; - final double v6 = 18446744073709551616; - final double v7 = 0x02; // Hex literal. - final double v8 = -0x02; // Hex literal. - - // Static class variable initializer - static double s1 = 0; - static double s2 = 1; - static double s3 = -0; - static double s4 = -1; - static double s5 = 9223372036854775808; - static double s6 = 18446744073709551616; - static double s7 = 0x02; // Hex literal. - static double s8 = -0x02; // Hex literal. - - // Const class variable initializer context. - static const double c1 = 0; - static const double c2 = 1; - static const double c3 = -0; - static const double c4 = -1; - static const double c5 = 9223372036854775808; - static const double c6 = 18446744073709551616; - static const double c7 = 0x02; // Hex literal. - static const double c8 = -0x02; // Hex literal. - - final double d; - - // Default value context for a double initializing formal. - const C.cc1([this.d = 0]); - const C.cc2([this.d = 1]); - const C.cc3([this.d = -0]); - const C.cc4([this.d = -1]); - const C.cc5([this.d = 9223372036854775808]); - const C.cc6([this.d = 18446744073709551616]); - const C.cc7([this.d = 0x02]); - const C.cc8([this.d = -0x02]); - - // Initializer list expressions context. - const C.ci1() : this.d = 0; - const C.ci2() : this.d = 1; - const C.ci3() : this.d = -0; - const C.ci4() : this.d = -1; - const C.ci5() : this.d = 9223372036854775808; - const C.ci6() : this.d = 18446744073709551616; - const C.ci7() : this.d = 0x02; - const C.ci8() : this.d = -0x02; -} - -// Top-level lazy variable initializer -double ts1 = 0; -double ts2 = 1; -double ts3 = -0; -double ts4 = -1; -double ts5 = 9223372036854775808; -double ts6 = 18446744073709551616; -double ts7 = 0x02; // Hex literal. -double ts8 = -0x02; // Hex literal. - -// Top-level const variable initializer. -const double tc1 = 0; -const double tc2 = 1; -const double tc3 = -0; -const double tc4 = -1; -const double tc5 = 9223372036854775808; // 2^63, invalid signed 64-bit integer. -const double tc6 = 18446744073709551616; -const double tc7 = 0x02; // Hex literal. -const double tc8 = -0x02; // Hex literal. - -// Top-level getter return context. -double get tg1 => 0; -double get tg2 => 1; -double get tg3 => -0; -double get tg4 => -1; -double get tg5 => 9223372036854775808; -double get tg6 => 18446744073709551616; -double get tg7 => 0x02; // Hex literal. -double get tg8 => -0x02; // Hex literal. - -Object lastSetValue = null; -void set setter(double v) { - lastSetValue = v; -} - -abstract class Super { - Object method(double v); -} - -class Sub implements Super { - Object method(Object o) => o; -} diff --git a/tests/language_2/dynamic/call_test.dart b/tests/language_2/dynamic/call_test.dart deleted file mode 100644 index 2ecd3a25f80..00000000000 --- a/tests/language_2/dynamic/call_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// 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 test program for testing dynamic calls. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Helper { - Helper() {} - int foo(int i) { - return i; - } -} - -class DynamicCallTest { - static int testMain() { - Helper obj = new Helper(); - Expect.equals(1, obj.foo(1)); - } -} - -main() { - DynamicCallTest.testMain(); -} diff --git a/tests/language_2/dynamic/dynamic2_runtime_test.dart b/tests/language_2/dynamic/dynamic2_runtime_test.dart deleted file mode 100644 index 12a4448404c..00000000000 --- a/tests/language_2/dynamic/dynamic2_runtime_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. -// -// Test the prohibited use of 'dynamic' in extending and implementing classes. - -class A - - -{} - -main() { - new A(); -} diff --git a/tests/language_2/dynamic/dynamic2_test.dart b/tests/language_2/dynamic/dynamic2_test.dart deleted file mode 100644 index e83c75cb87c..00000000000 --- a/tests/language_2/dynamic/dynamic2_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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. -// -// Test the prohibited use of 'dynamic' in extending and implementing classes. - -// @dart = 2.9 - -class A - extends dynamic - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.EXTENDS_NON_CLASS - // [cfe] The type 'dynamic' can't be used as supertype. - implements dynamic - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.IMPLEMENTS_NON_CLASS - // [cfe] The type 'dynamic' can't be used as supertype. -{} - -main() { - new A(); -} diff --git a/tests/language_2/dynamic/dynamic_test.dart b/tests/language_2/dynamic/dynamic_test.dart deleted file mode 100644 index 1e88d2a8abd..00000000000 --- a/tests/language_2/dynamic/dynamic_test.dart +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2012, 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 test program testing the use of 'dynamic' in generic types. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -abstract class Iface {} - -class M1 implements Iface {} - -class M2 implements Iface {} - -class M3 implements Iface {} - -typedef dynamic F1(dynamic x, T y); - -class HasFieldDynamic { - HasFieldDynamic() : dynamic = "dynamic" {} - var dynamic; // Field named dynamic is allowed. -} - -class HasMethodDynamic { - dynamic() => "dynamic"; // Method named dynamic is allowed. -} - -main() { - // dynamic is a top-type, equivalent to Object at runtime. - Expect.isTrue(dynamic is Type); - Expect.equals(dynamic, dynamic); - - // dynamic is not a subtype of num or String. - M1 m1 = new M1(); - Expect.isFalse(m1 is Iface); - Expect.isFalse(m1 is Iface); - Expect.isFalse(m1 is Iface); - Expect.isFalse(m1 is Iface); - - M2 m2 = new M2(); // is Iface. - Expect.isFalse(m2 is Iface); - Expect.isFalse(m2 is Iface); - Expect.isFalse(m2 is Iface); - Expect.isFalse(m2 is Iface); - - M3 m3 = new M3(); // is IFace. - Expect.isFalse(m3 is Iface); - Expect.isTrue(m3 is Iface); - Expect.isFalse(m3 is Iface); - Expect.isTrue(m3 is! Iface); - - F1 f1 = (dynamic s, int i) => s[i]; // is dynamic Function(dynamic, int). - Expect.isTrue(f1 is F1); - - // "dynamic" is not a reserved word or built-in identifier. - - HasFieldDynamic has_field = new HasFieldDynamic(); - Expect.equals("dynamic", has_field.dynamic); - - HasMethodDynamic has_method = new HasMethodDynamic(); - Expect.equals("dynamic", has_method.dynamic()); - - { - int dynamic = 0; // Local variable named dynamic is allowed. - Expect.equals(0, dynamic); - } -} diff --git a/tests/language_2/dynamic/field_runtime_test.dart b/tests/language_2/dynamic/field_runtime_test.dart deleted file mode 100644 index 9bf48ef1939..00000000000 --- a/tests/language_2/dynamic/field_runtime_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. -// -// Test that ensures that fields can be accessed dynamically. - -import "package:expect/expect.dart"; - -class A extends C { - var a; - var b; -} - -class C { - foo() { - - - } - bar() { - - - } -} - -main() { - var a = new A(); - a.a = 1; - a.b = a; - - -} diff --git a/tests/language_2/dynamic/field_test.dart b/tests/language_2/dynamic/field_test.dart deleted file mode 100644 index 5ac338ee6b7..00000000000 --- a/tests/language_2/dynamic/field_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2012, 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. -// -// Test that ensures that fields can be accessed dynamically. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A extends C { - var a; - var b; -} - -class C { - foo() { - print(a); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER - // [cfe] The getter 'a' isn't defined for the class 'C'. - return a; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER - // [cfe] The getter 'a' isn't defined for the class 'C'. - } - bar() { - print(b.a); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER - // [cfe] The getter 'b' isn't defined for the class 'C'. - return b.a; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER - // [cfe] The getter 'b' isn't defined for the class 'C'. - } -} - -main() { - var a = new A(); - a.a = 1; - a.b = a; - Expect.equals(1, a.foo()); - Expect.equals(1, a.bar()); -} diff --git a/tests/language_2/dynamic/hash_code_test.dart b/tests/language_2/dynamic/hash_code_test.dart deleted file mode 100644 index d9d9e1e9ac9..00000000000 --- a/tests/language_2/dynamic/hash_code_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -void main() { - dynamic x = 3; - Expect.equals(3.0.hashCode, x.hashCode); -} diff --git a/tests/language_2/dynamic/invoke_test.dart b/tests/language_2/dynamic/invoke_test.dart deleted file mode 100644 index c142c29175b..00000000000 --- a/tests/language_2/dynamic/invoke_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// 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 test program for testing dynamic calls. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Make this something that DDC considers side effecting. -dynamic get d => "hello"; - -regress29504() { - // These forms were being incorrectly generated as dynamic invokes, which is - // not supposed to be done for the Object members that are always present on - // all Dart types, including `null`. - // - // See https://github.com/dart-lang/sdk/issues/29504 - // - // What we're testing here is that none of these generate dynamic invokes, - // because that will throw a NoSuchMethod error if it happens. - Expect.equals(d.runtimeType, String); - Expect.equals(d?.runtimeType, String); - Expect.equals(d..runtimeType, "hello"); - - Expect.equals(d.hashCode, "hello".hashCode); - Expect.equals(d?.hashCode, "hello".hashCode); - Expect.equals(d..hashCode, "hello"); - - Expect.equals(d.toString(), "hello"); - Expect.equals(d?.toString(), "hello"); - Expect.equals(d..toString(), "hello"); -} - -main() { - regress29504(); -} diff --git a/tests/language_2/dynamic/prefix_core_test.dart b/tests/language_2/dynamic/prefix_core_test.dart deleted file mode 100644 index dcb6c9dd7fd..00000000000 --- a/tests/language_2/dynamic/prefix_core_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2012, 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. -// Test explicit import of dart:core in the source code.. - -// @dart = 2.9 - -library DynamicPrefixCoreTest.dart; - -import "package:expect/expect.dart"; -import "dart:core" as mycore; - -void main() { - // The built-in type declaration `dynamic`, which is declared in the - // library `dart:core`, denotes the `dynamic` type. So, in this library - // it must be reference with the prefix. - dynamic; //# 01: compile-time error - - Expect.isTrue(mycore.dynamic is mycore.Type); //# 02: ok -} diff --git a/tests/language_2/dynamic/set_test.dart b/tests/language_2/dynamic/set_test.dart deleted file mode 100644 index 27bba8137f7..00000000000 --- a/tests/language_2/dynamic/set_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2012, 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. -// -// Test that ensures that fields can be accessed dynamically. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class C { - final x = "hello"; - get y => ", "; - m() => "world!"; -} - -// Regression test for https://github.com/dart-lang/sdk/issues/27258 -main() { - dynamic c = new C(); - Expect.equals(c.x + c.y + c.m(), "hello, world!"); - - Expect.throws(() { - c.x = 1; - }); - Expect.throws(() { - c.x = '1'; - }); - Expect.throws(() { - c.y = '2'; - }); - Expect.throws(() { - c.m = '3'; - }); - - Expect.equals(c.x + c.y + c.m(), "hello, world!"); -} diff --git a/tests/language_2/dynamic/type_literal_test.dart b/tests/language_2/dynamic/type_literal_test.dart deleted file mode 100644 index d940916543b..00000000000 --- a/tests/language_2/dynamic/type_literal_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2014, 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 - -// Test generation of 'dynamic' type literals. - -import "package:expect/expect.dart"; - -void main() { - Expect.isTrue(dynamic is Type); - Expect.isFalse(dynamic == Type); -} diff --git a/tests/language_2/dynamic_type_helper.dart b/tests/language_2/dynamic_type_helper.dart deleted file mode 100644 index 69db3460bda..00000000000 --- a/tests/language_2/dynamic_type_helper.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2013, 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 dynamic_type_helper; - -import 'package:expect/expect.dart'; - -/// Checks that a dynamic type error is thrown when [f] is executed -/// and [expectTypeError] is `true`. -void testDynamicTypeError(bool expectTypeError, f(), [String message]) { - if (expectTypeError) { - checkDynamicTypeError(f, message); - } else { - checkNoDynamicTypeError(f, message); - } -} - -/// Checks that a dynamic type error is thrown when f is executed. -void checkDynamicTypeError(f(), [String message]) { - message = message != null ? ': $message' : ''; - try { - f(); - Expect.fail('Missing type error$message.'); - } on TypeError catch (e) {} -} - -/// Checks that no dynamic type error is thrown when [f] is executed. -void checkNoDynamicTypeError(f(), [String message]) { - message = message != null ? ': $message' : ''; - try { - f(); - } on TypeError catch (e) { - Expect.fail('Unexpected type error$message.'); - } -} diff --git a/tests/language_2/enum/duplicate_lib.dart b/tests/language_2/enum/duplicate_lib.dart deleted file mode 100644 index 9534b62d842..00000000000 --- a/tests/language_2/enum/duplicate_lib.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2015, 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 enum_duplicate_lib; - -enum Enum1 { - A, - B, -} - -class Enum2 { - static Iterable get values => ['Enum2.A', 'Enum2.B']; -} diff --git a/tests/language_2/enum/duplicate_test.dart b/tests/language_2/enum/duplicate_test.dart deleted file mode 100644 index 0ae0bdda1d0..00000000000 --- a/tests/language_2/enum/duplicate_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2015, 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 - -// Test for duplicate enums. - -library enum_duplicate_test; - -import 'package:expect/expect.dart'; - -import 'duplicate_lib.dart' as lib; //# 01: ok -import 'duplicate_lib.dart' as lib; //# 02: ok - -enum Enum1 { - A, - B, -} - -enum Enum2 { - A, - B, -} - -main() { - Expect.equals('Enum1.A,Enum1.B', Enum1.values.join(',')); - Expect.equals('Enum1.A,Enum1.B', lib.Enum1.values.join(',')); //# 01: continued - Expect.equals('Enum2.A,Enum2.B', Enum2.values.join(',')); - Expect.equals('Enum2.A,Enum2.B', lib.Enum2.values.join(',')); //# 02: continued -} diff --git a/tests/language_2/enum/enum_test.dart b/tests/language_2/enum/enum_test.dart deleted file mode 100644 index f40914876bf..00000000000 --- a/tests/language_2/enum/enum_test.dart +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'package:expect/expect.dart'; - -enum Enum1 { _ } - -enum Enum2 { A } - -enum Enum3 { B, C } - -enum Enum4 { - D, - E, -} - -enum Enum5 { F, G, H } - -enum _Enum6 { I, _J } - -enum _IsNot { IsNot } - -enum NamedName { name, address } - -// Regression test for https://github.com/dart-lang/sdk/issues/33348 -enum JSFunctionPrototype { - length, - prototype, - __proto__, - arguments, - caller, - callee, - name, - constructor, - apply, - bind, - call -} - -void expectIs(T t, bool Function(Object) test) { - Object obj = t; - Expect.isTrue(test(obj), '$obj is $T'); - Expect.isFalse(obj is _IsNot, '$obj is _IsNot'); - // test cast - t = obj as T; - Expect.throwsTypeError(() => obj as _IsNot, '$obj as _IsNot'); -} - -main() { - expectIs(Enum1._, (e) => e is Enum1); - expectIs(Enum2.A, (e) => e is Enum2); - expectIs(Enum3.B, (e) => e is Enum3); - expectIs(Enum4.E, (e) => e is Enum4); - expectIs(Enum5.G, (e) => e is Enum5); - - Expect.equals('Enum1._', Enum1._.toString()); - Expect.equals(0, Enum1._.index); - Expect.listEquals([Enum1._], Enum1.values); - Enum1.values.forEach(test1); - - Expect.equals('Enum2.A', Enum2.A.toString()); - Expect.equals(0, Enum2.A.index); - Expect.listEquals([Enum2.A], Enum2.values); - Expect.identical(const [Enum2.A], Enum2.values); - Enum2.values.forEach(test2); - - Expect.equals('Enum3.B', Enum3.B.toString()); - Expect.equals('Enum3.C', Enum3.C.toString()); - Expect.equals(0, Enum3.B.index); - Expect.equals(1, Enum3.C.index); - Expect.listEquals([Enum3.B, Enum3.C], Enum3.values); - Enum3.values.forEach(test3); - - Expect.equals('Enum4.D', Enum4.D.toString()); - Expect.equals('Enum4.E', Enum4.E.toString()); - Expect.equals(0, Enum4.D.index); - Expect.equals(1, Enum4.E.index); - Expect.listEquals([Enum4.D, Enum4.E], Enum4.values); - Enum4.values.forEach(test4); - - Expect.equals('Enum5.F', Enum5.F.toString()); - Expect.equals('Enum5.G', Enum5.G.toString()); - Expect.equals('Enum5.H', Enum5.H.toString()); - Expect.equals(0, Enum5.F.index); - Expect.equals(1, Enum5.G.index); - Expect.equals(2, Enum5.H.index); - Expect.listEquals([Enum5.F, Enum5.G, Enum5.H], Enum5.values); - Enum5.values.forEach(test5); - - Expect.equals('_Enum6.I', _Enum6.I.toString()); - Expect.equals('_Enum6._J', _Enum6._J.toString()); - - for (var value in JSFunctionPrototype.values) { - expectIs(value, (e) => e is JSFunctionPrototype); - } - Expect.equals(JSFunctionPrototype.length, JSFunctionPrototype.values[0]); - - // Enums implement Enum. - Expect.type(Enum1._); - Enum enumValue = Enum1._; - Expect.equals(0, enumValue.index); - - // Enum.compareByIndex orders enums correctly. - var enumValues = [Enum5.G, Enum5.H, Enum5.F]; - for (var i = 0; i < 10; i++) { - enumValues.sort(Enum.compareByIndex); - enumValues.fold(-1, (previousValue, element) { - Expect.isTrue(previousValue < element.index, "$enumValues"); - return element.index; - }); - enumValues.shuffle(); - } - // Can be used at the type `Enum` to compare different enums. - Expect.isTrue(Enum.compareByIndex(Enum4.D, Enum5.H) < 0); - Expect.isTrue(Enum.compareByIndex(Enum4.E, Enum5.F) > 0); - Expect.isTrue(Enum.compareByIndex(Enum4.D, Enum5.F) == 0); - - Expect.equals("A", Enum2.A.name); - Expect.equals("_", Enum1._.name); - Expect.equals("name", EnumName(NamedName.name).name); - - Expect.identical(Enum2.A, Enum2.values.byName("A")); - Expect.identical(Enum1._, Enum1.values.byName("_")); - Expect.identical(NamedName.name, NamedName.values.byName("name")); - - var map = NamedName.values.asNameMap(); - Expect.type>(map); - Expect.identical(NamedName.name, map["name"]); - Expect.identical(NamedName.address, map["address"]); -} - -test1(Enum1 e) { - int index; - switch (e) { - case Enum1._: - index = 0; - break; - } - Expect.equals(e.index, index); -} - -test2(Enum2 e) { - int index; - switch (e) { - case Enum2.A: - index = 0; - break; - } - Expect.equals(e.index, index); -} - -test3(Enum3 e) { - int index; - switch (e) { - case Enum3.C: - index = 1; - break; - case Enum3.B: - index = 0; - break; - } - Expect.equals(e.index, index); -} - -test4(Enum4 e) { - int index; - switch (e) { - case Enum4.D: - index = 0; - break; - case Enum4.E: - index = 1; - break; - } - Expect.equals(e.index, index); -} - -test5(Enum5 e) { - int index; - switch (e) { - case Enum5.H: - index = 2; - break; - case Enum5.F: - index = 0; - break; - case Enum5.G: - index = 1; - break; - } - Expect.equals(e.index, index); -} diff --git a/tests/language_2/enum/index_test.dart b/tests/language_2/enum/index_test.dart deleted file mode 100644 index fb1c5b3c243..00000000000 --- a/tests/language_2/enum/index_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2015, 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 - -// Test index access for enums. - -library enum_index_test; - -import 'package:expect/expect.dart'; - -enum Enum { - A, - B, -} - -class Class { - var index; -} - -main() { - test(null, new Class()); - test(0, Enum.A); - test(1, Enum.B); -} - -test(expected, object) { - Expect.equals(expected, object.index); -} diff --git a/tests/language_2/enum/initialization_near_stack_overflow_test.dart b/tests/language_2/enum/initialization_near_stack_overflow_test.dart deleted file mode 100644 index 7e4ece87bba..00000000000 --- a/tests/language_2/enum/initialization_near_stack_overflow_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2018, 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 - -// https://github.com/flutter/flutter/issues/25041 - -// This test may produce a compile time exception from stack overflow during -// enum initialization or succeed in enum initialization depending on exactly -// how much stack is left and used by the compiler. It should never crash nor -// produce a runtime exception. - -enum Fruit { - apple, - banana, -} - -getFruit() => Fruit.apple; - -recurse() { - try { - recurse(); - } catch (e, st) { - print("$e ${getFruit()}"); - } -} - -main() { - try { - recurse(); - } on StackOverflowError catch (e) { - // Swallow. - } -} diff --git a/tests/language_2/enum/is_keyword_runtime_test.dart b/tests/language_2/enum/is_keyword_runtime_test.dart deleted file mode 100644 index 4c8c400fa43..00000000000 --- a/tests/language_2/enum/is_keyword_runtime_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Test that `enum` is considered a keyword and therefore invalid as the name of -// declarations. - -main() {} diff --git a/tests/language_2/enum/is_keyword_test.dart b/tests/language_2/enum/is_keyword_test.dart deleted file mode 100644 index b57ee880fb7..00000000000 --- a/tests/language_2/enum/is_keyword_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2015, 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 - -// Test that `enum` is considered a keyword and therefore invalid as the name of -// declarations. - -main() { - var enum; - // ^^^^ - // [analyzer] SYNTACTIC_ERROR.EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD - // [cfe] 'enum' can't be used as an identifier because it's a keyword. -} diff --git a/tests/language_2/enum/private_lib.dart b/tests/language_2/enum/private_lib.dart deleted file mode 100644 index dfce2387ad5..00000000000 --- a/tests/language_2/enum/private_lib.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2015, 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 enum_private_lib; - -enum Enum2 { - _A, - _B, -} diff --git a/tests/language_2/enum/private_runtime_1_test.dart b/tests/language_2/enum/private_runtime_1_test.dart deleted file mode 100644 index 9234818a922..00000000000 --- a/tests/language_2/enum/private_runtime_1_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Test privacy issue for enums. - -library enum_private_test; - -import 'package:expect/expect.dart'; - -import 'private_lib.dart'; - -enum Enum1 { - _A, - _B, -} - -main() { - Expect.equals('Enum1._A,Enum1._B', Enum1.values.join(',')); - Expect.equals('Enum2._A,Enum2._B', Enum2.values.join(',')); -} diff --git a/tests/language_2/enum/private_runtime_test.dart b/tests/language_2/enum/private_runtime_test.dart deleted file mode 100644 index ea9c19af3c4..00000000000 --- a/tests/language_2/enum/private_runtime_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Test privacy issue for enums. - -library enum_private_test; - -import 'package:expect/expect.dart'; - -import 'private_lib.dart'; - -enum Enum1 { - _A, - _B, -} - -main() { - Expect.equals('Enum1._A,Enum1._B', Enum1.values.join(',')); -} diff --git a/tests/language_2/enum/private_test.dart b/tests/language_2/enum/private_test.dart deleted file mode 100644 index ef31ea686db..00000000000 --- a/tests/language_2/enum/private_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2015, 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 - -// Test privacy issue for enums. - -library enum_private_test; - -import 'package:expect/expect.dart'; - -import 'private_lib.dart'; - -enum Enum1 { - _A, - _B, -} - -main() { - Expect.equals('Enum1._A,Enum1._B', Enum1.values.join(',')); - Expect.equals('Enum2._A,Enum2._B', Enum2.values.join(',')); - Expect.throwsNoSuchMethodError(() => Enum2._A); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_ENUM_CONSTANT - // [cfe] Member not found: '_A'. -} diff --git a/tests/language_2/enum/syntax_test.dart b/tests/language_2/enum/syntax_test.dart deleted file mode 100644 index 1c6ce183573..00000000000 --- a/tests/language_2/enum/syntax_test.dart +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2014, 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 - -// Basic syntax test for enumeration types - -enum Color { red, orange, yellow, green } - -// Additional comma at end of list is ok. -enum Veggies { - carrot, - bean, - broccolo, -} - -// Need at least one enumeration identifier. -enum Nada {} // //# 01: syntax error - -// Duplicate entries are a compile-time error -enum ComeAgain { ahau, knust, zipfel, knust, gupf } // //# 02: compile-time error - -// Enum entries must not collide with implicitly defined members. -enum ComeAgain { ahau, knust, zipfel, index } //# 03: compile-time error - -enum ComeAgain { ahau, knust, zipfel, values } //# 04: compile-time error - -enum ComeAgain { ahau, knust, zipfel, toString } //# 05: compile-time error - -// Enum entry must not collide with enum type name. -enum ComeAgain { ahau, knust, zipfel, ComeAgain } //# 06: compile-time error - -// Missing comma. -enum Numbers { one, two, three four, five } // //# 07: syntax error - -// Missing enum type name. -enum { eins, zwei, drei } // //# 08: syntax error - -// Duplicate name in library scope. -topLevelFunction() => null; -enum topLevelFunction { bla, blah } // //# 09: compile-time error - -class C {} -enum C { bla, blah } // //# 10: compile-time error - -var zzTop; -enum zzTop { Billy, Dusty, Frank } // //# 11: compile-time error - -// Enum type cannot be super type or interface type. -class Rainbow extends Color {} // //# 20: compile-time error -class Rainbow implements Color {} // //# 21: compile-time error -class Rainbow extends List with Color {} // //# 22: compile-time error - -main() { - Nada x; //# 01: continued - var x = ComeAgain.zipfel; // //# 02: continued - var x = ComeAgain.zipfel; // //# 03: continued - var x = ComeAgain.zipfel; // //# 04: continued - var x = ComeAgain.zipfel; // //# 05: continued - var x = ComeAgain.zipfel; // //# 06: continued - var x = Numbers.four; // //# 07: continued - var x = topLevelFunction.bla; // //# 09: continued - var x = C.bla; // //# 10: continued - var x = zzTop.Frank; // //# 11: continued - - var x = new Rainbow(); // //# 20: continued - var x = new Rainbow(); // //# 21: continued - var x = new Rainbow(); // //# 22: continued - - // It is a compile-time error to explicitly instantiate an enum instance. - var x = new Color(); // //# 30: compile-time error -} diff --git a/tests/language_2/enum/value_name_test.dart b/tests/language_2/enum/value_name_test.dart deleted file mode 100644 index a6b46d5c012..00000000000 --- a/tests/language_2/enum/value_name_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'package:expect/expect.dart'; - -enum ErrorContext { general, name, description, targets } - -void main() { - Expect.equals(ErrorContext.name, ErrorContext.name); -} diff --git a/tests/language_2/exception/catch_liveness_test.dart b/tests/language_2/exception/catch_liveness_test.dart deleted file mode 100644 index da58334fccd..00000000000 --- a/tests/language_2/exception/catch_liveness_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -@pragma('dart2js:assumeDynamic') -@pragma('dart2js:noInline') -foo() => 1; - -@pragma('dart2js:assumeDynamic') -@pragma('dart2js:noInline') -throwException() => throw 'x'; - -main() { - var x = 10; - var e2 = null; - try { - var t = foo(); - throwException(); - print(t); - x = 3; - } catch (e) { - Expect.equals(10, x); - e2 = e; - } - Expect.equals(10, x); - Expect.equals('x', e2); -} diff --git a/tests/language_2/exception/code_after_try_is_executed_test.dart b/tests/language_2/exception/code_after_try_is_executed_test.dart deleted file mode 100644 index a1f3d6b3690..00000000000 --- a/tests/language_2/exception/code_after_try_is_executed_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2012, 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. -// Test that the runtime still runs the code after a try/catch. The -// test cannot use Expect.throws, because Expect.throws uses the same -// pattern. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - var exception; - try { - throw 'foo'; - } on String catch (ex) { - exception = ex; - } - Expect.isTrue(exception is String); - throw 'foo'; //# 01: runtime error -} diff --git a/tests/language_2/exception/exception_test.dart b/tests/language_2/exception/exception_test.dart deleted file mode 100644 index 9f60b8ae968..00000000000 --- a/tests/language_2/exception/exception_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class ExceptionTest { - static testMain() { - int i = 0; - try { - throw "Hello"; - } on String catch (s) { - print(s); - i += 10; - } - - try { - throw "bye"; - } on String catch (s) { - print(s); - i += 10; - } - Expect.equals(20, i); - - bool correctCatch = false; - try { - // This used to throw a NullThrownError but that error was removed in - // Dart 3.0. Now it throws a TypeError. - throw null; - } on String catch (s) { - correctCatch = false; - } on TypeError catch (e) { - correctCatch = true; - } catch (x) { - correctCatch = false; - } - Expect.isTrue(correctCatch); - } -} - -main() { - ExceptionTest.testMain(); -} diff --git a/tests/language_2/exception/finally10_test.dart b/tests/language_2/exception/finally10_test.dart deleted file mode 100644 index 447f196d192..00000000000 --- a/tests/language_2/exception/finally10_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to not treat the finally -// block as a successor of a catch block that throws. - -import "package:expect/expect.dart"; - -class A { - var field; - start() {} - stop() { - field = 42; - } -} - -class B { - var totalCompileTime = new A(); - var runCompiler = new Object(); - - run() { - totalCompileTime.start(); - try { - throw 'foo'; - } catch (exception) { - // Use [runCompiler] twice to ensure it will have a local - // variable. - runCompiler.toString(); - runCompiler.toString(); - rethrow; - } finally { - totalCompileTime.stop(); - } - } -} - -main() { - var b = new B(); - try { - b.run(); - throw 'Expected exception'; - } catch (exception) { - // Expected exception. - } - - Expect.equals(42, b.totalCompileTime.field); -} diff --git a/tests/language_2/exception/finally11_test.dart b/tests/language_2/exception/finally11_test.dart deleted file mode 100644 index 73b6b73486c..00000000000 --- a/tests/language_2/exception/finally11_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to not treat the finally -// block as a successor of a nested try block. - -import "package:expect/expect.dart"; - -class A { - var field; - start() {} - stop() { - field = 42; - } -} - -class B { - var totalCompileTime = new A(); - var runCompiler = new Object(); - - run() { - totalCompileTime.start(); - try { - throw 'foo'; - } catch (exception) { - try { - // Use [runCompiler] twice to ensure it will have a local - // variable. - runCompiler.toString(); - runCompiler.toString(); - } catch (exception) {} - rethrow; - } finally { - totalCompileTime.stop(); - } - } -} - -main() { - var b = new B(); - try { - b.run(); - throw 'Expected exception'; - } catch (exception) { - // Expected exception. - } - - Expect.equals(42, b.totalCompileTime.field); -} diff --git a/tests/language_2/exception/finally12_test.dart b/tests/language_2/exception/finally12_test.dart deleted file mode 100644 index 8cf31c2246e..00000000000 --- a/tests/language_2/exception/finally12_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to not treat the finally -// block as a successor of a nested try block. - -import "package:expect/expect.dart"; - -var a; - -foo() { - var b = a == 8; // This should not be GVN'ed. - while (!b) { - try { - try {} finally { - a = 8; - break; - } - } finally { - return a == 8; - } - } -} - -main() { - Expect.isTrue(foo()); -} diff --git a/tests/language_2/exception/finally1_test.dart b/tests/language_2/exception/finally1_test.dart deleted file mode 100644 index 624b58f3165..00000000000 --- a/tests/language_2/exception/finally1_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// 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 test program for testing execution of finally blocks on -// control flow breaks because of 'return', 'continue' etc. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Helper { - Helper() : i = 0 {} - - int f1() { - try { - int j; - j = func(); - i = 1; - return i; // Value of i on return is 1. - } finally { - i = i + 800; // Should get executed on return. - } - return i + 200; // Should not get executed. - } - - static int func() { - int i = 0; - while (i < 10) { - i++; - } - return i; - } - - int i; -} - -class ExecuteFinally1Test { - static testMain() { - Helper obj = new Helper(); - Expect.equals(1, obj.f1()); - Expect.equals(801, obj.i); - } -} - -main() { - ExecuteFinally1Test.testMain(); -} diff --git a/tests/language_2/exception/finally2_test.dart b/tests/language_2/exception/finally2_test.dart deleted file mode 100644 index d6684e5222e..00000000000 --- a/tests/language_2/exception/finally2_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// 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 test program for testing execution of finally blocks on -// control flow breaks because of 'return', 'continue' etc. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Helper { - Helper() : i = 0 {} - - int f1() { - try { - int j; - j = func(); - try { - i = 1; - return i; // Value of i is 1 on return. - } finally { - i = i + 400; // Should get executed when we return. - } - i = 2; // Should not get executed. - return i; - } finally { - i = i + 800; // Should get executed when we return. - } - return i + 200; // Should not get executed. - } - - static int func() { - int i = 0; - while (i < 10) { - i++; - } - return i; - } - - int i; -} - -class ExecuteFinally2Test { - static testMain() { - Helper obj = new Helper(); - Expect.equals(1, obj.f1()); - Expect.equals(1201, obj.i); - } -} - -main() { - ExecuteFinally2Test.testMain(); -} diff --git a/tests/language_2/exception/finally3_test.dart b/tests/language_2/exception/finally3_test.dart deleted file mode 100644 index 341b3628b4c..00000000000 --- a/tests/language_2/exception/finally3_test.dart +++ /dev/null @@ -1,75 +0,0 @@ -// 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 test program for testing execution of finally blocks on -// control flow breaks because of 'return', 'continue' etc. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Helper { - Helper() : i = 0 {} - - int f1() { - try { - try { - int j; - j = func(); - L1: - while (i <= 0) { - if (i == 0) { - try { - i = 1; - func(); - try { - int j; - j = func(); - while (j < 50) { - j += func(); - if (j > 30) { - continue L1; // Break out of nested try blocks. - } - } - i = 200000; // Should not get executed. - } finally { - i = i + 200; // Should get executed when we break out. - } - } finally { - i = i + 400; // Should get executed when we break out. - } - } - } - } finally { - i = i + 800; // Should get executed as normal control flow. - } - return i; // Value of i should be 1401. - } finally { - i = i + 1600; // Should get executed as part of return above. - } - i = i + 2000000; // Should not get executed. - return 1; - } - - static int func() { - int i = 0; - while (i < 10) { - i++; - } - return i; - } - - int i; -} - -class ExecuteFinally3Test { - static testMain() { - Helper obj = new Helper(); - Expect.equals(1401, obj.f1()); - Expect.equals(3001, obj.i); - } -} - -main() { - ExecuteFinally3Test.testMain(); -} diff --git a/tests/language_2/exception/finally4_test.dart b/tests/language_2/exception/finally4_test.dart deleted file mode 100644 index ba159b7a6f4..00000000000 --- a/tests/language_2/exception/finally4_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// 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 test program for testing execution of finally blocks on -// control flow breaks because of 'return', 'continue' etc. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Helper { - Helper() : i = 0 {} - - int f1() { - try { - int j; - j = func(); - i = 1; - } finally { - i = i + 10; - } - return i + 200; // Should return here with i = 211. - try { - int j; - j = func(); - } finally { - i = i + 10; // Should not get executed as part of return above. - } - } - - static int func() { - int i = 0; - while (i < 10) { - i++; - } - return i; - } - - int i; -} - -class ExecuteFinally4Test { - static testMain() { - Helper obj = new Helper(); - Expect.equals(211, obj.f1()); - Expect.equals(11, obj.i); - } -} - -main() { - ExecuteFinally4Test.testMain(); -} diff --git a/tests/language_2/exception/finally5_test.dart b/tests/language_2/exception/finally5_test.dart deleted file mode 100644 index d5a052eb2bd..00000000000 --- a/tests/language_2/exception/finally5_test.dart +++ /dev/null @@ -1,72 +0,0 @@ -// 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 test program for testing execution of finally blocks on -// control flow breaks because of 'return', 'continue' etc. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Helper { - Helper() : i = 0 {} - - int f1(int param) { - if (param == 0) { - try { - int j; - j = func(); - try { - i = 1; - return i; // Value of i is 1 on return. - } finally { - i = i + 400; // Should get executed when we return. - } - i = 2; // Should not get executed. - return i; - } finally { - i = i + 800; // Should get executed when we return. - } - return i + 200; // Should not get executed. - } - try { - int j; - j = func(); - try { - i = 4; - return i; // Value of i is 1 on return. - } finally { - i = i + 100; // Should get executed when we return. - } - i = 2; // Should not get executed. - return i; - } finally { - i = i + 200; // Should get executed when we return. - } - return i + 200; // Should not get executed. - } - - static int func() { - int i = 0; - while (i < 10) { - i++; - } - return i; - } - - int i; -} - -class ExecuteFinally5Test { - static testMain() { - Helper obj = new Helper(); - Expect.equals(1, obj.f1(0)); - Expect.equals(1201, obj.i); - Expect.equals(4, obj.f1(1)); - Expect.equals(304, obj.i); - } -} - -main() { - ExecuteFinally5Test.testMain(); -} diff --git a/tests/language_2/exception/finally6_test.dart b/tests/language_2/exception/finally6_test.dart deleted file mode 100644 index 1e8407ba143..00000000000 --- a/tests/language_2/exception/finally6_test.dart +++ /dev/null @@ -1,76 +0,0 @@ -// 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 test program for testing execution of finally blocks on -// control flow breaks because of 'return', 'continue' etc. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Helper { - Helper() : i = 0 {} - - int f1() { - try { - try { - int j; - j = func(); - L1: - while (i <= 0) { - if (i == 0) { - try { - i = 1; - func(); - try { - int j; - j = func(); - L1: - while (j < 50) { - j += func(); - if (j > 30) { - break L1; // Break out of nested try blocks. - } - } - i += 200000; // Should get executed. - } finally { - i = i + 200; // Should get executed as normal control flow. - } - } finally { - i = i + 400; // Should get executed as normal control flow. - } - } - } - } finally { - i = i + 800; // Should get executed as normal control flow. - } - return i; // Value of i should be 201401. - } finally { - i = i + 1600; // Should get executed as part of return above. - } - i = i + 2000000; // Should not get executed. - return 1; - } - - static int func() { - int i = 0; - while (i < 10) { - i++; - } - return i; - } - - int i; -} - -class ExecuteFinally6Test { - static testMain() { - Helper obj = new Helper(); - Expect.equals(201401, obj.f1()); - Expect.equals(203001, obj.i); - } -} - -main() { - ExecuteFinally6Test.testMain(); -} diff --git a/tests/language_2/exception/finally7_test.dart b/tests/language_2/exception/finally7_test.dart deleted file mode 100644 index 2fe426b44d0..00000000000 --- a/tests/language_2/exception/finally7_test.dart +++ /dev/null @@ -1,59 +0,0 @@ -// 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 test program for testing execution of finally blocks after an exception -// is thrown from inside a local function capturing a variable. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class MyException { - const MyException(String message) : message_ = message; - final String message_; -} - -class Helper { - static int f1(int k) { - var b; - try { - var a = new List.filled(10, null); - int i = 0; - while (i < 10) { - int j = i; - a[i] = () { - if (j == 5) { - throw new MyException("Test for exception being thrown"); - } - k += 10; - return j; - }; - if (i == 0) { - b = a[i]; - } - i++; - } - for (int i = 0; i < 10; i++) { - a[i](); - } - } on MyException catch (exception) { - k += 100; - print(exception.message_); - b(); - } finally { - k += 1000; - b(); - } - return k; - } -} - -class ExecuteFinally7Test { - static testMain() { - Expect.equals(1171, Helper.f1(1)); - } -} - -main() { - ExecuteFinally7Test.testMain(); -} diff --git a/tests/language_2/exception/finally8_test.dart b/tests/language_2/exception/finally8_test.dart deleted file mode 100644 index f595151ea66..00000000000 --- a/tests/language_2/exception/finally8_test.dart +++ /dev/null @@ -1,83 +0,0 @@ -// 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. -// This test ensures that the finally block executes correctly when -// there are throw, break and return statements in the finally block. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Hello { - static var sum; - - static foo() { - sum = 0; - try { - sum += 1; - return 'hi'; - } finally { - sum += 1; - throw 'ball'; - sum += 1; - } - } - - static foo1() { - bool loop = true; - sum = 0; - L: - while (loop) { - try { - sum += 1; - return 'hi'; - } finally { - sum += 1; - break L; - sum += 1; - } - } - } - - static foo2() { - bool loop = true; - sum = 0; - try { - sum += 1; - return 'hi'; - } finally { - sum += 1; - return 10; - sum += 1; - } - } - - static foo3() { - sum = 0; - try { - sum += 1; - return 'hi'; - } finally { - sum += 1; - return 10; - sum += 1; - } - } - - static void main() { - foo1(); - Expect.equals(2, sum); - foo2(); - Expect.equals(2, sum); - foo3(); - Expect.equals(2, sum); - try { - foo(); - } catch (e) {} - Expect.equals(2, sum); - } -} - -main() { - Hello.main(); -} diff --git a/tests/language_2/exception/finally9_test.dart b/tests/language_2/exception/finally9_test.dart deleted file mode 100644 index d98f7b06bcd..00000000000 --- a/tests/language_2/exception/finally9_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -// 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. -// This test ensures that the finally block executes correctly when -// there are throw, break and return statements in the finally block. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Hello { - static var sum; - - static foo() { - sum = 0; - try { - sum += 1; - return 'hi'; - } catch (e) { - sum += 1; - throw 'ball'; - sum += 1; - } finally { - sum += 1; - throw 'ball'; - sum += 1; - } - } - - static foo1() { - bool loop = true; - sum = 0; - L: - while (loop) { - try { - sum += 1; - return 'hi'; - } catch (ex) { - sum += 1; - } finally { - try { - L1: - while (loop) { - sum += 1; - break L; - sum += 1; - } - } catch (ex) { - sum += 1; - } finally { - sum += 1; - } - } - } - } - - static void main() { - foo1(); - Expect.equals(3, sum); - try { - foo(); - } catch (e) { - // Ignore. - } - Expect.equals(2, sum); - } -} - -main() { - Hello.main(); -} diff --git a/tests/language_2/exception/finally_test.dart b/tests/language_2/exception/finally_test.dart deleted file mode 100644 index bf4c324edd8..00000000000 --- a/tests/language_2/exception/finally_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test for a bug in dart2js where the update of a field in a try -// block would not be seen by the finally block. See dartbug.com/5517. - -class A { - int i; - A() : i = 42; - - foo() { - bool executedFinally = false; - if (i == 42) { - try { - i = 12; - } finally { - Expect.equals(12, i); - executedFinally = true; - } - } - Expect.isTrue(executedFinally); - } -} - -main() { - new A().foo(); -} diff --git a/tests/language_2/exception/identity_test.dart b/tests/language_2/exception/identity_test.dart deleted file mode 100644 index ec680bfce25..00000000000 --- a/tests/language_2/exception/identity_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Test that an object when thrown stays the same. - -class A { - A(); -} - -check(exception) { - try { - throw exception; - } catch (e) { - Expect.equals(exception, e); - } -} - -main() { - check("str"); - check(new A()); - check(1); - check(1.2); -} diff --git a/tests/language_2/exception/in_increment_test.dart b/tests/language_2/exception/in_increment_test.dart deleted file mode 100644 index 715bceec255..00000000000 --- a/tests/language_2/exception/in_increment_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012, 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. -// Test throws exception in the middle of the increment operation, the setter -// part of the instance field increment never completes. -// VMOptions=--optimization-counter-threshold=10 - -// @dart = 2.9 - -main() { - var a = new A(); - a.field = new A(); - for (int i = 0; i < 20; i++) { - try { - a.foo(i); - } catch (e) { - // Ignore. - } - } -} - -class A { - var field; - foo(i) { - field++; // throw exception - } -} diff --git a/tests/language_2/exception/multiple_breaks_crossing_finally_test.dart b/tests/language_2/exception/multiple_breaks_crossing_finally_test.dart deleted file mode 100644 index 522d7fcefd3..00000000000 --- a/tests/language_2/exception/multiple_breaks_crossing_finally_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2023, 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 "package:expect/expect.dart"; - -String test(int n) { - String s = "$n"; - a: - { - b: - { - try { - if (n == 1) { - break a; - } else { - break b; - } - s += "/"; - } finally { - s += "-"; - } - s += "*"; - } - return s + "b"; - } - return s + "a"; -} - -main() { - Expect.equals("1-a", test(1)); - Expect.equals("2-b", test(2)); -} diff --git a/tests/language_2/exception/on_catch_malformed_type_test.dart b/tests/language_2/exception/on_catch_malformed_type_test.dart deleted file mode 100644 index 75a2fd867ff..00000000000 --- a/tests/language_2/exception/on_catch_malformed_type_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2013, 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 - -// Check that malformed types in on-catch are handled correctly, that is, -// throws a type error in both production and checked mode. - -import 'package:expect/expect.dart'; - -catchUnresolvedBefore() { - try { - throw "foo"; - Expect.fail("This code shouldn't be executed"); - } on String catch (oks) { - // This is tested before the catch block below. - } on Unavailable catch (ex) { - // ^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_IN_CATCH_CLAUSE - // [cfe] 'Unavailable' isn't a type. - Expect.fail("This code shouldn't be executed"); - } -} - -catchUnresolvedAfter() { - Expect.throwsTypeError(() { - try { - throw "foo"; - Expect.fail("This code shouldn't be executed"); - } on Unavailable catch (ex) { - // ^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_IN_CATCH_CLAUSE - // [cfe] 'Unavailable' isn't a type. - - // This is tested before the catch block below. - // In both production and checked mode the test causes a type error. - } on String catch (oks) { - Expect.fail("This code shouldn't be executed"); - } - }); -} - -main() { - catchUnresolvedBefore(); - catchUnresolvedAfter(); -} diff --git a/tests/language_2/exception/rethrow_test.dart b/tests/language_2/exception/rethrow_test.dart deleted file mode 100644 index 2379a94bab6..00000000000 --- a/tests/language_2/exception/rethrow_test.dart +++ /dev/null @@ -1,65 +0,0 @@ -// 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 test program for testing throw statement - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class MyException { - const MyException(); -} - -class OtherException { - const OtherException(); -} - -class RethrowTest { - MyException currentException; - - void throwException() { - currentException = new MyException(); - throw currentException; - } - - void testRethrowPastUncaught() { - try { - try { - try { - throwException(); - Expect.fail("Should have thrown an exception"); - } catch (e) { - Expect.equals(true, identical(e, currentException)); - rethrow; - Expect.fail("Should have thrown an exception"); - } - } on OtherException catch (e) { - Expect.fail("Should not have caught OtherException"); - } - } catch (e) { - Expect.equals(true, identical(e, currentException)); - } - } - - void testRethrow() { - try { - try { - throwException(); - Expect.fail("Should have thrown an exception"); - } catch (e) { - Expect.equals(true, identical(e, currentException)); - rethrow; - Expect.fail("Should have thrown an exception"); - } - } catch (e) { - Expect.equals(true, identical(e, currentException)); - } - } -} - -main() { - RethrowTest t = new RethrowTest(); - t.testRethrow(); - t.testRethrowPastUncaught(); -} diff --git a/tests/language_2/exception/throw1_test.dart b/tests/language_2/exception/throw1_test.dart deleted file mode 100644 index 60492b086ca..00000000000 --- a/tests/language_2/exception/throw1_test.dart +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing throw statement - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -abstract class TestException { - String getMessage(); -} - -class MyException implements TestException { - const MyException([String message = ""]) : message_ = message; - String getMessage() { - return message_; - } - - final String message_; -} - -class MyException2 implements TestException { - const MyException2([String message = ""]) : message_ = message; - String getMessage() { - return message_; - } - - final String message_; -} - -class MyException3 implements TestException { - const MyException3([String message = ""]) : message_ = message; - String getMessage() { - return message_; - } - - final String message_; -} - -class Helper { - static int f1(int i) { - try { - int j; - j = func(); - if (j > 0) { - throw new MyException2("Test for exception being thrown"); - } - } on MyException3 catch (exception) { - i = 100; - print(exception.getMessage()); - } on TestException catch (exception) { - i = 50; - print(exception.getMessage()); - } on MyException2 catch (exception) { - i = 150; - print(exception.getMessage()); - } on MyException catch (exception) { - i = 200; - print(exception.getMessage()); - } finally { - i = i + 800; - } - return i; - } - - static int func() { - int i = 0; - while (i < 10) { - i++; - } - return i; - } -} - -class Throw1Test { - static testMain() { - Expect.equals(850, Helper.f1(1)); - } -} - -main() { - Throw1Test.testMain(); -} diff --git a/tests/language_2/exception/throw2_test.dart b/tests/language_2/exception/throw2_test.dart deleted file mode 100644 index 975ed7833e9..00000000000 --- a/tests/language_2/exception/throw2_test.dart +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing throw statement - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -abstract class TestException { - String getMessage(); -} - -class MyException implements TestException { - const MyException([String message = ""]) : message_ = message; - String getMessage() { - return message_; - } - - final String message_; -} - -class MyException2 implements TestException { - const MyException2([String message = ""]) : message_ = message; - String getMessage() { - return message_; - } - - final String message_; -} - -class MyException3 implements TestException { - const MyException3([String message = ""]) : message_ = message; - String getMessage() { - return message_; - } - - final String message_; -} - -class Helper { - static int f1(int i) { - try { - int j; - j = func(); - } on MyException3 catch (exception) { - i = 100; - print(exception.getMessage()); - } on MyException2 catch (exception) { - try { - i = func2(); - i = 200; - } on TestException catch (exception) { - i = 50; - } - print(exception.getMessage()); - } on MyException catch (exception) { - i = func2(); - print(exception.getMessage()); - } finally { - i = i + 800; - } - return i; - } - - static int func() { - int i = 0; - while (i < 10) { - i++; - } - if (i > 0) { - throw new MyException2("Test for exception being thrown"); - } - return i; - } - - static int func2() { - int i = 0; - while (i < 10) { - i++; - } - if (i > 0) { - throw new MyException2("Test for exception being thrown"); - } - return i; - } -} - -class Throw2Test { - static testMain() { - Expect.equals(850, Helper.f1(1)); - } -} - -main() { - Throw2Test.testMain(); -} diff --git a/tests/language_2/exception/throw3_test.dart b/tests/language_2/exception/throw3_test.dart deleted file mode 100644 index 54c6b5cdf9c..00000000000 --- a/tests/language_2/exception/throw3_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// 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 test program for testing throw statement - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class MyException { - const MyException([String message = ""]) : message_ = message; - final String message_; -} - -class Helper { - static int f1(int i) { - try { - int j; - i = 100; - i = func(); - i = 200; - } on MyException catch (exception) { - i = 50; - print(exception.message_); - } finally { - i = i + 800; - } - return i; - } - - static int func() { - try { - int i = 0; - while (i < 10) { - i++; - } - if (i > 0) { - throw new MyException("Test for exception being thrown"); - } - } on MyException catch (ex) { - print(ex.message_); - rethrow; // Rethrow the exception. - } - return 10; - } -} - -class Throw3Test { - static testMain() { - Expect.equals(850, Helper.f1(1)); - } -} - -main() { - Throw3Test.testMain(); -} diff --git a/tests/language_2/exception/throw4_test.dart b/tests/language_2/exception/throw4_test.dart deleted file mode 100644 index 2d1f37a2911..00000000000 --- a/tests/language_2/exception/throw4_test.dart +++ /dev/null @@ -1,82 +0,0 @@ -// 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 test program for testing throw statement - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class MyException1 { - const MyException1([String message = "1"]) : message_ = message; - final String message_; -} - -class MyException2 { - const MyException2([String message = "2"]) : message_ = message; - final String message_; -} - -class MyException3 { - const MyException3([String message = "3"]) : message_ = message; - final String message_; -} - -class Helper { - Helper() : i = 0 {} - - int f1() { - int j = 0; - try { - j = func(); - } on MyException3 catch (exception) { - i = i + 300; - print(exception.message_); - } on MyException2 catch (exception) { - i = i + 200; - print(exception.message_); - } on MyException1 catch (exception) { - i = i + 100; - print(exception.message_); - } finally { - i = i + 1000; - } - return i; - } - - // No catch in the same function for the type of exception being thrown - // in the try block here. We expect the handler if checks to fall thru, - // the finally block to run and an implicit rethrow to happen. - int func() { - i = 0; - try { - while (i < 10) { - i++; - } - if (i > 0) { - throw new MyException1("Test for MyException1 being thrown"); - } - } on MyException3 catch (exception) { - i = 300; - print(exception.message_); - } on MyException2 catch (exception) { - i = 200; - print(exception.message_); - } finally { - i = 800; - } - return i; - } - - int i; -} - -class Throw4Test { - static testMain() { - Expect.equals(1900, new Helper().f1()); - } -} - -main() { - Throw4Test.testMain(); -} diff --git a/tests/language_2/exception/throw5_test.dart b/tests/language_2/exception/throw5_test.dart deleted file mode 100644 index d77702279e5..00000000000 --- a/tests/language_2/exception/throw5_test.dart +++ /dev/null @@ -1,76 +0,0 @@ -// 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 test program for testing throw statement - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class MyException1 { - const MyException1([String message = "1"]) : message_ = message; - final String message_; -} - -class MyException2 { - const MyException2([String message = "2"]) : message_ = message; - final String message_; -} - -class MyException3 { - const MyException3([String message = "3"]) : message_ = message; - final String message_; -} - -class Helper { - static int f1(int i) { - try { - int j; - j = func(); - } on MyException3 catch (exception) { - i = 300; - print(exception.message_); - } on MyException2 catch (exception) { - i = 200; - print(exception.message_); - } on MyException1 catch (exception) { - i = 100; - print(exception.message_); - } finally { - i = i + 800; - } - return i; - } - - // No catch in the same function for the type of exception being thrown - // in the try block here. We expect the handler if checks to fall thru and - // implicit rethrow to happen. - static int func() { - int i = 0; - try { - while (i < 10) { - i++; - } - if (i > 0) { - throw new MyException1("Test for MyException1 being thrown"); - } - } on MyException3 catch (exception) { - i = 300; - print(exception.message_); - } on MyException2 catch (exception) { - i = 200; - print(exception.message_); - } - return i; - } -} - -class Throw5Test { - static testMain() { - Expect.equals(900, Helper.f1(1)); - } -} - -main() { - Throw5Test.testMain(); -} diff --git a/tests/language_2/exception/throw6_test.dart b/tests/language_2/exception/throw6_test.dart deleted file mode 100644 index 03385bad77f..00000000000 --- a/tests/language_2/exception/throw6_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// 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 test program for testing throw statement - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class MyException1 { - const MyException1([String message = "1"]) : message_ = message; - final String message_; -} - -class Helper { - Helper() : i = 0 {} - - int f1() { - int j = 0; - try { - j = func(); - } catch (exception) { - i = i + 100; - print(exception.message_); - } finally { - i = i + 1000; - } - return i; - } - - // No catch in the same function for the type of exception being thrown - // in the try block here. We expect the handler if checks to fall thru, - // the finally block to run and an implicit rethrow to happen. - int func() { - i = 0; - try { - while (i < 10) { - i++; - } - if (i > 0) { - throw new MyException1("Test for MyException1 being thrown"); - } - } finally { - i = 800; - } - return i; - } - - int i; -} - -class Throw6Test { - static testMain() { - Expect.equals(1900, new Helper().f1()); - } -} - -main() { - Throw6Test.testMain(); -} diff --git a/tests/language_2/exception/throw8_test.dart b/tests/language_2/exception/throw8_test.dart deleted file mode 100644 index 8512611248b..00000000000 --- a/tests/language_2/exception/throw8_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// 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 test program for testing throw statement - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -var finallyExecutionCount = 0; -bar() { - try { - try { - return 499; - } catch (e, st) { - rethrow; - } - } finally { - finallyExecutionCount++; - throw "quit finally with throw"; - } -} - -main() { - bool hasThrown = false; - try { - bar(); - } catch (x) { - hasThrown = true; - Expect.equals(1, finallyExecutionCount); - } - Expect.isTrue(hasThrown); -} diff --git a/tests/language_2/exception/throw_expr_test.dart b/tests/language_2/exception/throw_expr_test.dart deleted file mode 100644 index ca11b65e89c..00000000000 --- a/tests/language_2/exception/throw_expr_test.dart +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Dart test program for testing throw expressions. - -void test1() { - var x = 6; - try { - throw x = 10; - x = 0; - } catch (e) { - Expect.equals(10, e); - Expect.equals(10, x); - x = 15; - } - Expect.equals(15, x); - x = 100; - try { - throw x++; - x = 0; - } catch (e) { - Expect.equals(100, e); - Expect.equals(101, x); - x = 150; - } - Expect.equals(150, x); -} - -void test2() { - var x = 6; - try { - throw x + 4; - } catch (e) { - Expect.equals(10, e); - Expect.equals(6, x); - x = 15; - } - Expect.equals(15, x); -} - -foo(x, y) => throw "foo" "$x"; - -bar(x, y) => throw "foo" "${throw x}"; - -class Q { - var qqq; - f(x) { - qqq = x; - } - - Q get nono => throw "nono"; -} - -void test3() { - try { - throw throw throw "up"; - } catch (e) { - Expect.equals("up", e); - } - - dynamic x = 10; - try { - foo(x = 12, throw 7); - } catch (e) { - Expect.equals(7, e); - Expect.equals(12, x); - } - - x = 10; - try { - foo(x++, 10); - } catch (e) { - Expect.equals("foo10", e); - Expect.equals(11, x); - } - - x = 100; - try { - bar(++x, 10); - } catch (e) { - Expect.equals(101, e); - Expect.equals(101, x); - } - - x = null; - try { - x = new Q(); - x - ..f(11) - ..qqq = throw 77 - ..f(22); - } catch (e) { - Expect.equals(77, e); - Expect.equals(11, x.qqq); - } -} - -void test4() { - var q = new Q(); - Expect.throws(() => q.nono, (e) => e == "nono"); -} - -main() { - test1(); - test2(); - test3(); - test4(); -} diff --git a/tests/language_2/exception/throw_test.dart b/tests/language_2/exception/throw_test.dart deleted file mode 100644 index 987a10bab83..00000000000 --- a/tests/language_2/exception/throw_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// 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 test program for testing throw statement - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class MyException { - const MyException(String this.message_); - final String message_; -} - -class Helper { - static int f1(int i) { - try { - int j; - j = func(); - if (j > 0) { - throw new MyException("Test for exception being thrown"); - } - } on MyException catch (exception) { - i = 100; - print(exception.message_); - } finally { - i = i + 800; - } - return i; - } - - static int func() { - int i = 0; - while (i < 10) { - i++; - } - return i; - } -} - -class ThrowTest { - static testMain() { - Expect.equals(900, Helper.f1(1)); - } -} - -main() { - ThrowTest.testMain(); -} diff --git a/tests/language_2/exception/try_catch2_test.dart b/tests/language_2/exception/try_catch2_test.dart deleted file mode 100644 index 1482009fad1..00000000000 --- a/tests/language_2/exception/try_catch2_test.dart +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing try/catch statement without any exceptions -// being thrown. (Nested try/catch blocks). -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -abstract class TestException { - String getMessage(); -} - -class MyException implements TestException { - const MyException([String message = ""]) : message_ = message; - String getMessage() { - return message_; - } - - final String message_; -} - -class StackTrace { - StackTrace() {} -} - -class Helper { - static int f1(int i) { - try { - int j; - j = f2(); - i = i + 1; - try { - j = f2() + f3() + j; - i = i + 1; - } on TestException catch (e, trace) { - j = 50; - } - j = f3() + j; - } on MyException catch (exception) { - i = 100; - } on TestException catch (e, trace) { - i = 200; - } - return i; - } - - static int f2() { - return 2; - } - - static int f3() { - int i = 0; - while (i < 10) { - i++; - } - return i; - } -} - -class TryCatch2Test { - static testMain() { - Expect.equals(3, Helper.f1(1)); - } -} - -main() { - for (var i = 0; i < 20; i++) { - TryCatch2Test.testMain(); - } -} diff --git a/tests/language_2/exception/try_catch3_test.dart b/tests/language_2/exception/try_catch3_test.dart deleted file mode 100644 index 8cf79a7236f..00000000000 --- a/tests/language_2/exception/try_catch3_test.dart +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing try/catch statement without any exceptions -// being thrown. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -abstract class TestException { - String getMessage(); -} - -class MyException implements TestException { - const MyException([String message = ""]) : this._message = message; - String getMessage() { - return _message; - } - - final String _message; -} - -class MyParameterizedException implements TestException { - const MyParameterizedException([String message = ""]) - : this._message = message; - String getMessage() { - return _message; - } - - final String _message; -} - -class StackTrace { - StackTrace() {} - printStackTrace(TestException ex) { - print(ex); - } -} - -class Helper { - static int test1(int i) { - try { - int j; - j = f2(); - j = f3(); - try { - int k = f2(); - f3(); - } on MyException catch (ex) { - int i = 10; - print(i); - } on TestException catch (ex) { - int k = 10; - print(k); - } - try { - j = j + 24; - } catch (e) { - i = 300; - print(e.getMessage()); - } - try { - j += 20; - } catch (e) { - i = 400; - print(e.getMessage()); - } - try { - j += 40; - } catch (e) { - i = 600; - print(e.getMessage()); - } - try { - j += 60; - } catch (e, trace) { - i = 700; - print(trace.toString()); - print(e.getMessage()); - } - try { - j += 80; - } on MyException catch (e) { - i = 500; - print(e.getMessage()); - } - } on MyParameterizedException catch (e, trace) { - i = 800; - print(trace.toString()); - rethrow; - } on MyException catch (exception) { - i = 100; - print(exception.getMessage()); - } on TestException catch (e, trace) { - i = 200; - print(trace.toString()); - } finally { - i = 900; - } - return i; - } - - static int f2() { - return 2; - } - - static int f3() { - int i = 0; - while (i < 10) { - i++; - } - return i; - } -} - -class TryCatchTest { - static testMain() { - Expect.equals(900, Helper.test1(1)); - } -} - -main() { - for (var i = 0; i < 20; i++) { - TryCatchTest.testMain(); - } -} diff --git a/tests/language_2/exception/try_catch4_test.dart b/tests/language_2/exception/try_catch4_test.dart deleted file mode 100644 index b1ed8cb1d03..00000000000 --- a/tests/language_2/exception/try_catch4_test.dart +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (c) 2012, 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. -// Check that our SSA graph does have the try body a predecessor of a -// try/finally. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -var a; - -foo1() { - var b = false; - var entered = false; - while (true) { - if (entered) return b; - b = 8 == a; // This expression should not be GVN'ed. - try { - a = 8; - return false; - } finally { - b = 8 == a; - entered = true; - continue; - } - } -} - -doThrow() { - throw 2; -} - -foo2() { - var b = false; - var entered = false; - while (true) { - if (entered) return b; - b = 8 == a; // This expression should not be GVN'ed. - try { - a = 8; - doThrow(); - return false; - } catch (e) { - b = 8 == a; - entered = true; - continue; - } - } -} - -foo3() { - var b = false; - var entered = false; - while (true) { - if (entered) return b; - b = 8 == a; // This expression should not be GVN'ed. - try { - doThrow(); - } catch (e) { - a = 8; - entered = true; - return false; - } finally { - b = 8 == a; - entered = true; - continue; - } - } -} - -foo4() { - var b = false; - var entered = false; - while (true) { - if (entered) return b; - b = 8 == a; // This expression should not be GVN'ed. - try { - a = 8; - break; - } finally { - b = 8 == a; - entered = true; - continue; - } - } -} - -foo5() { - var b = false; - var entered = false; - while (true) { - if (entered) return b; - b = 8 == a; // This expression should not be GVN'ed. - try { - a = 8; - doThrow(); - break; - } catch (e) { - b = 8 == a; - entered = true; - continue; - } - } -} - -foo6() { - var b = false; - var entered = false; - while (true) { - if (entered) return b; - b = 8 == a; // This expression should not be GVN'ed. - try { - doThrow(); - } catch (e) { - a = 8; - entered = true; - break; - } finally { - b = 8 == a; - entered = true; - continue; - } - } -} - -foo7() { - var b = false; - var entered = false; - while (true) { - if (entered) return b; - b = 8 == a; // This expression should not be GVN'ed. - try { - a = 8; - continue; - } finally { - b = 8 == a; - entered = true; - continue; - } - } -} - -foo8() { - var b = false; - var entered = false; - while (true) { - if (entered) return b; - b = 8 == a; // This expression should not be GVN'ed. - try { - a = 8; - doThrow(); - continue; - } catch (e) { - b = 8 == a; - entered = true; - continue; - } - } -} - -foo9() { - var b = false; - var entered = false; - while (true) { - if (entered) return b; - b = 8 == a; // This expression should not be GVN'ed. - try { - doThrow(); - } catch (e) { - a = 8; - entered = true; - continue; - } finally { - b = 8 == a; - entered = true; - continue; - } - } -} - -main_test() { - a = 0; - Expect.isTrue(foo1()); - a = 0; - Expect.isTrue(foo2()); - a = 0; - Expect.isTrue(foo3()); - a = 0; - Expect.isTrue(foo4()); - a = 0; - Expect.isTrue(foo5()); - a = 0; - Expect.isTrue(foo6()); - a = 0; - Expect.isTrue(foo7()); - a = 0; - Expect.isTrue(foo8()); - a = 0; - Expect.isTrue(foo9()); -} - -main() { - for (var i = 0; i < 20; i++) { - main_test(); - } -} diff --git a/tests/language_2/exception/try_catch5_test.dart b/tests/language_2/exception/try_catch5_test.dart deleted file mode 100644 index 192c6072e63..00000000000 --- a/tests/language_2/exception/try_catch5_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2012, 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. -// Check that our SSA graph does have the try body a predecessor of a -// try/finally. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -var a; - -foo1() { - var b = false; - var entered = false; - while (true) { - if (entered) return b; - b = 8 == a; // This expression should not be GVN'ed. - try { - try { - a = 8; - return false; - } finally { - b = 8 == a; - entered = true; - continue; - } - } finally { - continue; - } - } -} - -main() { - for (var i = 0; i < 20; i++) { - a = 0; - Expect.isTrue(foo1()); - } -} diff --git a/tests/language_2/exception/try_catch_on_syntax_test.dart b/tests/language_2/exception/try_catch_on_syntax_test.dart deleted file mode 100644 index e58b43eb3d3..00000000000 --- a/tests/language_2/exception/try_catch_on_syntax_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class MyException {} - -class MyException1 extends MyException {} - -class MyException2 extends MyException {} - -void test1() { - var foo = 0; - try { - throw new MyException1(); - } - on on MyException2 catch (e) { } //# 02: syntax error - catch MyException2 catch (e) { } //# 03: syntax error - catch catch catch (e) { } //# 04: syntax error - on (e) { } //# 05: syntax error - catch MyException2 catch (e) { } //# 06: syntax error - on MyException2 catch (e) { - foo = 1; - } on MyException1 catch (e) { - foo = 2; - } on MyException catch (e) { - foo = 3; - } - on UndefinedClass //# 07: compile-time error - catch (e) { - foo = 4; - } - Expect.equals(2, foo); -} - -testFinal() { - try { - throw "catch this!"; - } catch (e, s) { - // Test that the error and stack trace variables are final. - e = null; // //# 10: compile-time error - s = null; // //# 11: compile-time error - } -} - -main() { - test1(); - testFinal(); -} diff --git a/tests/language_2/exception/try_catch_optimized1_test.dart b/tests/language_2/exception/try_catch_optimized1_test.dart deleted file mode 100644 index 41b56b0fc52..00000000000 --- a/tests/language_2/exception/try_catch_optimized1_test.dart +++ /dev/null @@ -1,292 +0,0 @@ -// Copyright (c) 2013, 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. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -maythrow(x) { - if (x == null) throw 42; - return 99; -} - -f1(x) { - var result = 123; - try { - result = maythrow(x); - if (result > 100) throw 42; - } catch (e) { - Expect.equals(result, 123); - Expect.equals(42, e); - result = 0; - } - return result; -} - -class A { - maythrow(x) { - if (x == null) throw 42; - return 99; - } -} - -f2(x) { - var result = 123; - var a = new A(); - try { - result++; - result = a.maythrow(x); - } catch (e) { - Expect.equals(124, result); - result = x; - } - return result; -} - -f3(x, y) { - var result = 123; - var a = new A(); - try { - result++; - result = a.maythrow(x); - } catch (e) { - result = y + 1; // Deopt on overflow - } - return result; -} - -f4(x) { - try { - maythrow(x); - } catch (e) { - check_f4(e, "abc"); - } -} - -check_f4(e, s) { - if (e != 42) throw "ERROR"; - if (s != "abc") throw "ERROR"; -} - -f5(x) { - try { - maythrow(x); - } catch (e) { - check_f5(e, "abc"); - } - - try { - maythrow(x); - } catch (e) { - check_f5(e, "abc"); - } -} - -check_f5(e, s) { - if (e != 42) throw "ERROR"; - if (s != "abc") throw "ERROR"; -} - -f6(x, y) { - var a = x; - var b = y; - var c = 123; - check_f6(42, null, 1, 123, null, 1); - try { - maythrow(x); - } catch (e) { - check_f6(e, a, b, c, x, y); - } -} - -check_f6(e, a, b, c, x, y) { - if (e != 42) throw "ERROR"; - if (a != null) throw "ERROR"; - if (b != 1) throw "ERROR"; - if (c != 123) throw "ERROR"; - if (x != null) throw "ERROR"; - if (y != 1) throw "ERROR"; -} - -bool f7(String str) { - double d = double.parse(str); - var t = d; - try { - var a = d.toInt(); - return false; - } on UnsupportedError catch (e) { - Expect.equals(true, identical(t, d)); - return true; - } -} - -f8(x, [a = 3, b = 4]) { - var c = 123; - var y = a; - try { - maythrow(x); - } catch (e, s) { - check_f8(e, s, a, b, c, x, y); - } -} - -check_f8(e, s, a, b, c, x, y) { - if (e != 42) throw "ERROR"; - if (s is! StackTrace) throw "ERROR"; - if (a != 3) { - print(a); - throw "ERROR"; - } - if (b != 4) throw "ERROR"; - if (c != 123) throw "ERROR"; - if (x != null) throw "ERROR"; - if (y != a) throw "ERROR"; -} - -f9(x, [a = 3, b = 4]) { - var c = 123; - var y = a; - try { - if (x < a) maythrow(null); - maythrow(x); - } catch (e, s) { - check_f9(e, s, a, b, c, x, y); - } -} - -check_f9(e, s, a, b, c, x, y) { - if (e != 42) throw "ERROR"; - if (s is! StackTrace) throw "ERROR"; - if (a != 3) { - print(a); - throw "ERROR"; - } - if (b != 4) throw "ERROR"; - if (c != 123) throw "ERROR"; - if (x != null) throw "ERROR"; - if (y != a) throw "ERROR"; -} - -f10(x, y) { - var result = 123; - try { - result = maythrow(x); - } catch (e) { - Expect.equals(123, result); - Expect.equals(0.5, y / 2.0); - result = 0; - } - return result; -} - -f11(x) { - var result = 123; - var tmp = x; - try { - result = maythrow(x); - if (result > 100) throw 42; - } catch (e, s) { - Expect.equals(123, result); - Expect.equals(true, identical(tmp, x)); - Expect.equals(true, s is StackTrace); - result = 0; - } - return result; -} - -f12([x = null]) { - try { - maythrow(x); - } catch (e) { - check_f12(e, x); - } -} - -check_f12(e, x) { - if (e != 42) throw "ERROR"; - if (x != null) throw "ERROR"; -} - -f13(x) { - var result = 123; - try { - try { - result = maythrow(x); - if (result > 100) throw 42; - } catch (e) { - Expect.equals(123, result); - result = 0; - } - maythrow(x); - } catch (e) { - result++; - } - return result; -} - -main() { - for (var i = 0; i < 20; i++) f1("abc"); - Expect.equals(99, f1("abc")); - Expect.equals(0, f1(null)); - - for (var i = 0; i < 20; i++) f2("abc"); - Expect.equals(99, f2("abc")); - Expect.equals(null, f2(null)); - - f3("123", 0); - for (var i = 0; i < 20; i++) f3(null, 0); - Expect.equals(99, f3("123", 0)); - Expect.equals(0x40000000, f3(null, 0x3fffffff)); - - f4(null); - for (var i = 0; i < 20; i++) f4(123); - f4(null); - - f5(null); - for (var i = 0; i < 20; i++) f5(123); - f5(null); - - f6(null, 1); - for (var i = 0; i < 20; i++) f6(123, 1); - f6(null, 1); - - f7("1.2"); - f7("Infinity"); - f7("-Infinity"); - for (var i = 0; i < 20; i++) f7("1.2"); - Expect.equals(false, f7("1.2")); - Expect.equals(true, f7("Infinity")); - Expect.equals(true, f7("-Infinity")); - Expect.equals(false, f7("123456789012345")); // Deopt. - for (var i = 0; i < 20; i++) f7("123456789012345"); - Expect.equals(true, f7("Infinity")); - Expect.equals(true, f7("-Infinity")); - - for (var i = 0; i < 20; i++) f8(null); - f8(null); - - f9(5); - f9(5.0); - for (var i = 0; i < 20; i++) f9(3); - f9(3); - - var y = 1.0; - Expect.equals(0, f10(null, y)); - for (var i = 0; i < 20; i++) f10("abc", y); - Expect.equals(99, f10("abc", y)); - Expect.equals(0, f10(null, y)); - - for (var i = 0; i < 20; i++) f11("abc"); - Expect.equals(99, f11("abc")); - Expect.equals(0, f11(null)); - - for (var i = 0; i < 20; i++) f12(null); - f12(null); - - f13(null); - for (var i = 0; i < 20; i++) f13("abc"); - Expect.equals(99, f13("abc")); - Expect.equals(1, f13(null)); -} diff --git a/tests/language_2/exception/try_catch_optimized2_test.dart b/tests/language_2/exception/try_catch_optimized2_test.dart deleted file mode 100644 index 45672e70fd5..00000000000 --- a/tests/language_2/exception/try_catch_optimized2_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2013, 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. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test allocation sinking with optimized try-catch. - -bar() { - // Should not be inlined. - try {} finally {} -} - -foo(a) { - var r = 0; - for (var i in a) { - r += i; - } - try { - bar(); - } finally {} - return r; -} - -main() { - var a = [1, 2, 3]; - for (var i = 0; i < 20; i++) foo(a); - Expect.equals(6, foo(a)); -} diff --git a/tests/language_2/exception/try_catch_optimized3_test.dart b/tests/language_2/exception/try_catch_optimized3_test.dart deleted file mode 100644 index 95f4dc94902..00000000000 --- a/tests/language_2/exception/try_catch_optimized3_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2014, 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. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test unboxed double operations inside try-catch. -foo(bool b) { - if (b) throw 123; -} - -test_double(double x, bool b) { - try { - x += 1.0; - foo(b); - } catch (e) { - var result = x - 1.0; - Expect.equals(1.0, result); - return result; - } -} - -main() { - for (var i = 0; i < 100; i++) test_double(1.0, false); - test_double(1.0, false); - Expect.equals(1.0, test_double(1.0, true)); -} diff --git a/tests/language_2/exception/try_catch_optimized4_test.dart b/tests/language_2/exception/try_catch_optimized4_test.dart deleted file mode 100644 index 0bad7eacf6e..00000000000 --- a/tests/language_2/exception/try_catch_optimized4_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2014, 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. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test correct dead phi elimination with try catch. - -List a = [1, 2, 3, 4, 5]; - -class MyError {} - -class M { - maythrow(i) { - try { - if (i <= 5) throw new MyError(); - } catch (e) { - throw e; - } - } -} - -loop_test() { - bool failed = false; - M m = new M(); - for (Object i in a) { - try { - String res = m.maythrow(i); - failed = true; - } on MyError catch (e) {} - if (!identical(failed, false)) { - Expect.fail(""); - } - } -} - -main() { - for (var i = 0; i < 20; i++) loop_test(); -} diff --git a/tests/language_2/exception/try_catch_optimized5_test.dart b/tests/language_2/exception/try_catch_optimized5_test.dart deleted file mode 100644 index 90b61debdc2..00000000000 --- a/tests/language_2/exception/try_catch_optimized5_test.dart +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2016, 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 test program for testing try/catch statement without any exceptions -// being thrown. -// VMOptions=--optimization-counter-threshold=100 --no-background-compilation - -// @dart = 2.9 - -// Test optional parameters updated inside try-catch - -import "package:expect/expect.dart"; - -@pragma('vm:never-inline') -m1(int b) { - if (b == 1) throw 123; -} - -@pragma('vm:never-inline') -m2(int b) { - if (b == 2) throw 456; -} - -@pragma('vm:never-inline') -test1(int b, [int state = 0]) { - try { - state++; - m1(b); - state++; - m2(b); - state++; - } on dynamic catch (e, s) { - if (b == 1 && state != 1) throw "fail1"; - if (b == 2 && state != 2) throw "fail2"; - if (b == 3 && state != 3) throw "fail3"; - if (s is! StackTrace) throw "fail4"; - return e; - } - return "no throw"; -} - -@pragma('vm:never-inline') -test2(int b, [int state]) { - state = 0; - try { - state++; - m1(b); - state++; - m2(b); - state++; - } on dynamic catch (e, s) { - if (b == 1 && state != 1) throw "fail1"; - if (b == 2 && state != 2) throw "fail2"; - if (b == 3 && state != 3) throw "fail3"; - if (s is! StackTrace) throw "fail4"; - return e; - } - return "no throw"; -} - -main() { - for (var i = 0; i < 300; i++) { - Expect.equals("no throw", test1(0)); - } - Expect.equals("no throw", test1(0)); - Expect.equals(123, test1(1)); - Expect.equals(456, test1(2)); - - for (var i = 0; i < 300; i++) { - Expect.equals("no throw", test2(0)); - } - Expect.equals("no throw", test2(0)); - Expect.equals(123, test2(1)); - Expect.equals(456, test2(2)); -} diff --git a/tests/language_2/exception/try_catch_osr_test.dart b/tests/language_2/exception/try_catch_osr_test.dart deleted file mode 100644 index 43eb3216f9c..00000000000 --- a/tests/language_2/exception/try_catch_osr_test.dart +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) 2013, 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. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -// Test OSR in different places of a try-catch. - -import "package:expect/expect.dart"; - -maythrow(x) { - try { - if (x == null) throw 42; - return 99; - } finally {} -} - -f1() { - var s = 0, t = "abc"; - for (var i = 0; i < 21; ++i) { - s += i; - } - try { - maythrow(null); - } catch (e) { - Expect.equals("abc", t); - Expect.equals(42, e); - s++; - } - return s; -} - -f2([x = 1]) { - var s = 0, t = "abc"; - try { - try { - for (var i = 0; i < 20; ++i) { - if (i == 18) maythrow(null); - s += x; - } - } catch (e) { - Expect.equals(1, x); - Expect.equals("abc", t); - Expect.equals(42, e); - s++; - } - } catch (e) {} - return s; -} - -f3() { - var s = 0, t = "abc"; - try { - maythrow(null); - } catch (e) { - Expect.equals("abc", t); - for (var i = 0; i < 21; ++i) { - s += i; - } - Expect.equals("abc", t); - Expect.equals(42, e); - return s; - } -} - -f4() { - var s = 0, t = "abc"; - try { - for (var i = 0; i < 21; ++i) { - if (i == 18) maythrow(null); - s += i; - } - } catch (e) { - Expect.equals("abc", t); - Expect.equals(42, e); - s++; - } - return s; -} - -f5() { - var s, t = "abc"; - try { - maythrow(null); - } catch (e) { - Expect.equals("abc", t); - Expect.equals(42, e); - s = 0; - } - for (var i = 0; i < 21; ++i) { - s += i; - } - Expect.equals("abc", t); - return s; -} - -main() { - Expect.equals(211, f1()); - Expect.equals(19, f2()); - Expect.equals(210, f3()); - Expect.equals(9 * 17 + 1, f4()); - Expect.equals(210, f5()); -} diff --git a/tests/language_2/exception/try_catch_regress_27483_test.dart b/tests/language_2/exception/try_catch_regress_27483_test.dart deleted file mode 100644 index abb0fdc94f3..00000000000 --- a/tests/language_2/exception/try_catch_regress_27483_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2016, 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 test program for testing try/catch statement without any exceptions -// being thrown. -// VMOptions=--optimization-counter-threshold=100 --no-background-compilation - -// @dart = 2.9 - -// Test local variables updated inside try-catch. - -import "package:expect/expect.dart"; - -@pragma('vm:never-inline') -m1(int b) { - if (b == 1) throw 123; -} - -@pragma('vm:never-inline') -m2(int b) { - if (b == 2) throw 456; -} - -@pragma('vm:never-inline') -test(b) { - var state = 0; - try { - state++; - m1(b); - state++; - m2(b); - state++; - } on dynamic catch (e, s) { - if (b == 1 && state != 1) throw "fail1"; - if (b == 2 && state != 2) throw "fail2"; - if (b == 3 && state != 3) throw "fail3"; - return e; - } - return "no throw"; -} - -main() { - for (var i = 0; i < 300; i++) { - Expect.equals("no throw", test(0)); - } - Expect.equals("no throw", test(0)); - Expect.equals(123, test(1)); - Expect.equals(456, test(2)); -} diff --git a/tests/language_2/exception/try_catch_runtime_test.dart b/tests/language_2/exception/try_catch_runtime_test.dart deleted file mode 100644 index 065a4aacf3d..00000000000 --- a/tests/language_2/exception/try_catch_runtime_test.dart +++ /dev/null @@ -1,201 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. -// VMOptions=--optimization-counter-threshold=10 - -import "package:expect/expect.dart"; - -class MyException {} - -class MyException1 extends MyException {} - -class MyException2 extends MyException {} - -class TryCatchTest { - static void test1() { - var foo = 0; - try { - throw new MyException1(); - } on MyException2 catch (e) { - foo = 1; - } on MyException1 catch (e) { - foo = 2; - } on MyException catch (e) { - foo = 3; - } - Expect.equals(2, foo); - } - - static void test2() { - var foo = 0; - try { - throw new MyException1(); - } on MyException2 catch (e) { - foo = 1; - } on MyException catch (e) { - foo = 2; - } on MyException1 catch (e) { - foo = 3; - } - Expect.equals(2, foo); - } - - static void test3() { - var foo = 0; - try { - throw new MyException(); - } on MyException2 catch (e) { - foo = 1; - } on MyException1 catch (e) { - foo = 2; - } on MyException catch (e) { - foo = 3; - } - Expect.equals(3, foo); - } - - static void test4() { - var foo = 0; - try { - try { - throw new MyException(); - } on MyException2 catch (e) { - foo = 1; - } on MyException1 catch (e) { - foo = 2; - } - } on MyException catch (e) { - Expect.equals(0, foo); - foo = 3; - } - Expect.equals(3, foo); - } - - static void test5() { - var foo = 0; - try { - throw new MyException1(); - } on MyException2 catch (e) { - foo = 1; - } catch (e) { - foo = 2; - } - Expect.equals(2, foo); - } - - static void test6() { - var foo = 0; - try { - throw new MyException(); - } on MyException2 catch (e) { - foo = 1; - } on MyException1 catch (e) { - foo = 2; - } catch (e) { - foo = 3; - } - Expect.equals(3, foo); - } - - static void test7() { - var foo = 0; - try { - try { - throw new MyException(); - } on MyException2 catch (e) { - foo = 1; - } on MyException1 catch (e) { - foo = 2; - } - } catch (e) { - Expect.equals(0, foo); - foo = 3; - } - Expect.equals(3, foo); - } - - static void test8() { - var e = 3; - var caught = false; - try { - throw new MyException(); - } catch (exc) { - caught = true; - } - Expect.equals(true, caught); - Expect.equals(3, e); - } - - static void test9() { - dynamic e = 6; - try { - throw "up"; - } on String { - e = "s"; - } on int { - e = "i"; - } - Expect.equals("s", e); - } - - static void test10() { - try { - throw "up"; - } on String catch (e) { - var e = 1; // ok, shadows exception variable. - Expect.equals(1, e); - } - } - - static void test11() { - var e0 = 11; - try { - throw "up"; - } on int catch (e0) { - Expect.fail("unreachable"); - } on String catch (e1) { - // e0 from the other catch clause is not in scope. - Expect.equals(11, e0); - } - } - - static void test12() { - const x = const []; - try { - throw "up"; - } catch (e) { - Expect.equals("up", e); - } on String catch (e) { - // Compile-time constants in unreachable catch blocks are still - // compiled. - - Expect.fail("unreachable"); - } - } - - static void testMain() { - test1(); - test2(); - test3(); - test4(); - test5(); - test6(); - test7(); - test8(); - test9(); - test10(); - test11(); - test12(); - } -} - -main() { - for (var i = 0; i < 20; i++) { - TryCatchTest.testMain(); - } -} diff --git a/tests/language_2/exception/try_catch_syntax_test.dart b/tests/language_2/exception/try_catch_syntax_test.dart deleted file mode 100644 index 66feac11864..00000000000 --- a/tests/language_2/exception/try_catch_syntax_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2012, 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() { - testMissingCatch(); - testMissingTry(); - testDuplicateCatchVariable(); - testIllegalFinally(); - testIllegalCatch(); - testIllegalRethrow(); -} - -testMissingCatch() { - try { } // //# 01: syntax error -} - -testMissingTry() { - on Exception catch (e) { } // //# 02: syntax error - on Exception catch (e, trace) { } // //# 03: syntax error - finally { } // //# 04: syntax error -} - -testDuplicateCatchVariable() { - try { } on Exception catch (e, e) { } //# 05: compile-time error -} - -testIllegalFinally() { - try { } finally (e) { } //# 06: syntax error -} - -testIllegalCatch() { - try { } catch () { } // //# 07: syntax error - try { } on MammaMia catch (e) { } //# 08: compile-time error - try { } catch (var e) { } // //# 09: syntax error - try { } catch (final e) { } // //# 10: syntax error - try { } catch (int e) { } // //# 11: syntax error - try { } catch (final int e) { } // //# 12: syntax error - try { } catch ([e, s]) { } // //# 13: syntax error - try { } catch (e, [s]) { } // //# 14: syntax error - try { } catch (e, [s0, s1]) { } // //# 15: syntax error -} - -testIllegalRethrow() { - try { rethrow; } catch (e) { } // //# 16: compile-time error - try { } catch (e) { } finally { rethrow; } //# 17: compile-time error -} diff --git a/tests/language_2/exception/try_catch_test.dart b/tests/language_2/exception/try_catch_test.dart deleted file mode 100644 index 8c38335a87a..00000000000 --- a/tests/language_2/exception/try_catch_test.dart +++ /dev/null @@ -1,202 +0,0 @@ -// 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. -// VMOptions=--optimization-counter-threshold=10 - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class MyException {} - -class MyException1 extends MyException {} - -class MyException2 extends MyException {} - -class TryCatchTest { - static void test1() { - var foo = 0; - try { - throw new MyException1(); - } on MyException2 catch (e) { - foo = 1; - } on MyException1 catch (e) { - foo = 2; - } on MyException catch (e) { - foo = 3; - } - Expect.equals(2, foo); - } - - static void test2() { - var foo = 0; - try { - throw new MyException1(); - } on MyException2 catch (e) { - foo = 1; - } on MyException catch (e) { - foo = 2; - } on MyException1 catch (e) { - foo = 3; - } - Expect.equals(2, foo); - } - - static void test3() { - var foo = 0; - try { - throw new MyException(); - } on MyException2 catch (e) { - foo = 1; - } on MyException1 catch (e) { - foo = 2; - } on MyException catch (e) { - foo = 3; - } - Expect.equals(3, foo); - } - - static void test4() { - var foo = 0; - try { - try { - throw new MyException(); - } on MyException2 catch (e) { - foo = 1; - } on MyException1 catch (e) { - foo = 2; - } - } on MyException catch (e) { - Expect.equals(0, foo); - foo = 3; - } - Expect.equals(3, foo); - } - - static void test5() { - var foo = 0; - try { - throw new MyException1(); - } on MyException2 catch (e) { - foo = 1; - } catch (e) { - foo = 2; - } - Expect.equals(2, foo); - } - - static void test6() { - var foo = 0; - try { - throw new MyException(); - } on MyException2 catch (e) { - foo = 1; - } on MyException1 catch (e) { - foo = 2; - } catch (e) { - foo = 3; - } - Expect.equals(3, foo); - } - - static void test7() { - var foo = 0; - try { - try { - throw new MyException(); - } on MyException2 catch (e) { - foo = 1; - } on MyException1 catch (e) { - foo = 2; - } - } catch (e) { - Expect.equals(0, foo); - foo = 3; - } - Expect.equals(3, foo); - } - - static void test8() { - var e = 3; - var caught = false; - try { - throw new MyException(); - } catch (exc) { - caught = true; - } - Expect.equals(true, caught); - Expect.equals(3, e); - } - - static void test9() { - dynamic e = 6; - try { - throw "up"; - } on String { - e = "s"; - } on int { - e = "i"; - } - Expect.equals("s", e); - } - - static void test10() { - try { - throw "up"; - } on String catch (e) { - var e = 1; // ok, shadows exception variable. - Expect.equals(1, e); - } - } - - static void test11() { - var e0 = 11; - try { - throw "up"; - } on int catch (e0) { - Expect.fail("unreachable"); - } on String catch (e1) { - // e0 from the other catch clause is not in scope. - Expect.equals(11, e0); - } - } - - static void test12() { - const x = const []; - try { - throw "up"; - } catch (e) { - Expect.equals("up", e); - } on String catch (e) { - // Compile-time constants in unreachable catch blocks are still - // compiled. - const y = x[0]; - // ^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE - // ^ - // [cfe] Constant evaluation error: - Expect.fail("unreachable"); - } - } - - static void testMain() { - test1(); - test2(); - test3(); - test4(); - test5(); - test6(); - test7(); - test8(); - test9(); - test10(); - test11(); - test12(); - } -} - -main() { - for (var i = 0; i < 20; i++) { - TryCatchTest.testMain(); - } -} diff --git a/tests/language_2/exception/try_finally_regress_25333_test.dart b/tests/language_2/exception/try_finally_regress_25333_test.dart deleted file mode 100644 index ba36836c8a6..00000000000 --- a/tests/language_2/exception/try_finally_regress_25333_test.dart +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2016, 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 - -// Test correct handling of try-catch inside try-finally. - -import "package:expect/expect.dart"; - -void main() { - print("== test1 =="); - bool caught = false; - try { - test1(); - print("Unexpected 1"); // should never go here - Expect.isTrue(false); - } catch (e) { - caught = true; - print("main catch 1: $e"); - Expect.equals(e, "Ball"); - } - Expect.isTrue(caught); - print("== test2 =="); - caught = false; - try { - test2(); - print("Unexpected 2"); // should never go here - Expect.isTrue(false); - } catch (e) { - caught = true; - print("main catch 2: $e"); - Expect.equals(e, "Ball"); - } - Expect.isTrue(caught); -} - -void test1() { - try { - throw "Ball"; - } finally { - try { - throw "Frisbee"; - } catch (e) { - print("test 1 catch: $e"); - Expect.equals(e, "Frisbee"); - } - } -} - -void test2() { - try { - throwError(); // call a method that throws an error - } finally { - try { - throw "Frisbee"; - } catch (e) { - print("test 2 catch: $e"); - Expect.equals(e, "Frisbee"); - } - } -} - -void throwError() { - throw "Ball"; -} diff --git a/tests/language_2/exception/try_finally_regress_25654_test.dart b/tests/language_2/exception/try_finally_regress_25654_test.dart deleted file mode 100644 index a5835568fc2..00000000000 --- a/tests/language_2/exception/try_finally_regress_25654_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2016, 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 - -// Test break out of try-finally. - -import "package:expect/expect.dart"; - -var count = 0; - -test() { - L: - while (true) { - try { - break L; - } finally { - count++; - } - } - throw "ex"; -} - -main() { - bool caught = false; - try { - test(); - } catch (e) { - caught = true; - Expect.equals(e, "ex"); - } - Expect.isTrue(caught); - Expect.equals(1, count); -} diff --git a/tests/language_2/export/ambiguous_main_a.dart b/tests/language_2/export/ambiguous_main_a.dart deleted file mode 100644 index 2a8a8d37eb4..00000000000 --- a/tests/language_2/export/ambiguous_main_a.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2013, 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 export_ambiguous_main_a; - -main() { - print('export_ambiguous_main_a'); -} diff --git a/tests/language_2/export/ambiguous_main_b.dart b/tests/language_2/export/ambiguous_main_b.dart deleted file mode 100644 index f344b7b6394..00000000000 --- a/tests/language_2/export/ambiguous_main_b.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2013, 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 export_ambiguous_main_b; - -main() { - print('export_ambiguous_main_b'); -} diff --git a/tests/language_2/export/ambiguous_main_test.dart b/tests/language_2/export/ambiguous_main_test.dart deleted file mode 100644 index 806e162f69f..00000000000 --- a/tests/language_2/export/ambiguous_main_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2013, 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 - -export 'ambiguous_main_a.dart'; -export 'ambiguous_main_b.dart'; -// [error column 1] -// [cfe] 'main' is exported from both 'tests/language_2/export/ambiguous_main_a.dart' and 'tests/language_2/export/ambiguous_main_b.dart'. -// ^^^^^^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXPORT diff --git a/tests/language_2/export/cyclic_helper1.dart b/tests/language_2/export/cyclic_helper1.dart deleted file mode 100644 index d53f9965e59..00000000000 --- a/tests/language_2/export/cyclic_helper1.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2012, 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 export_cyclic_helper1; - -import 'cyclic_helper2.dart'; -export 'cyclic_helper2.dart'; - -class B { - A a; - B b; - C c; - D d; -} diff --git a/tests/language_2/export/cyclic_helper2.dart b/tests/language_2/export/cyclic_helper2.dart deleted file mode 100644 index 394f5da5bca..00000000000 --- a/tests/language_2/export/cyclic_helper2.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2012, 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 export_cyclic_helper2; - -import 'cyclic_test.dart'; -import 'cyclic_helper3.dart'; -export 'cyclic_test.dart'; -export 'cyclic_helper3.dart'; - -class C { - A a; - B b; - C c; - D d; -} diff --git a/tests/language_2/export/cyclic_helper3.dart b/tests/language_2/export/cyclic_helper3.dart deleted file mode 100644 index 9458409e013..00000000000 --- a/tests/language_2/export/cyclic_helper3.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2012, 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 export_cyclic_helper3; - -class D {} diff --git a/tests/language_2/export/cyclic_test.dart b/tests/language_2/export/cyclic_test.dart deleted file mode 100644 index 4396788ab6c..00000000000 --- a/tests/language_2/export/cyclic_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2012, 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 - -// Test cyclic export and re-export. - -/** - * export_cyclic_test re-exports export_cyclic_helper1 which declares B - * export_cyclic_helper1 re-exports export_cyclic_helper2 which declares C - * export_cyclic_helper2 re-exports export_cyclic_test which declares A - * export_cyclic_helper2 re-exports export_cyclic_helper3 which declares D - */ - -library export_cyclic_test; - -import 'cyclic_helper1.dart'; -export 'cyclic_helper1.dart'; - -class A {} - -void main() { - print(new A()); - print(new B()); - print(new C()); - print(new D()); -} diff --git a/tests/language_2/export/double_same_main_test.dart b/tests/language_2/export/double_same_main_test.dart deleted file mode 100644 index b6742d1b6b7..00000000000 --- a/tests/language_2/export/double_same_main_test.dart +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2013, 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 - -export 'top_level_entry_test.dart'; -export 'main_test.dart' show main; diff --git a/tests/language_2/export/duplicate_collision_test.dart b/tests/language_2/export/duplicate_collision_test.dart deleted file mode 100644 index 1f5a1a19f2b..00000000000 --- a/tests/language_2/export/duplicate_collision_test.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'duplicate_import_libd.dart'; //# 01: compile-time error - -void main() {} diff --git a/tests/language_2/export/duplicate_export_test.dart b/tests/language_2/export/duplicate_export_test.dart deleted file mode 100644 index aac5fdca3ed..00000000000 --- a/tests/language_2/export/duplicate_export_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that it is not a compile-time error to reexport the same elements -// through different paths. - -library duplicate_export_test; - -export 'duplicate_import_liba.dart'; -export 'duplicate_liba.dart'; // reexports 'duplicate_import_liba.dart'. - -void main() {} diff --git a/tests/language_2/export/duplicate_import_liba.dart b/tests/language_2/export/duplicate_import_liba.dart deleted file mode 100644 index 7913ee42231..00000000000 --- a/tests/language_2/export/duplicate_import_liba.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2012, 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 liba; - -var field; - -void method() {} - -class Class {} - -void methodOrClass() {} diff --git a/tests/language_2/export/duplicate_import_libb.dart b/tests/language_2/export/duplicate_import_libb.dart deleted file mode 100644 index 66a23796916..00000000000 --- a/tests/language_2/export/duplicate_import_libb.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2012, 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 libb; - -var field; - -void method() {} - -class Class {} - -class methodOrClass {} diff --git a/tests/language_2/export/duplicate_import_libc.dart b/tests/language_2/export/duplicate_import_libc.dart deleted file mode 100644 index 10c17a78cc2..00000000000 --- a/tests/language_2/export/duplicate_import_libc.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2012, 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 libc; - -var field; - -void method() {} - -class Class {} diff --git a/tests/language_2/export/duplicate_import_libd.dart b/tests/language_2/export/duplicate_import_libd.dart deleted file mode 100644 index 3408bfa0c30..00000000000 --- a/tests/language_2/export/duplicate_import_libd.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2012, 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 libd; - -import 'duplicate_import_liba.dart'; -import 'duplicate_import_libb.dart'; -import 'duplicate_import_libc.dart'; - -export 'duplicate_import_liba.dart'; -export 'duplicate_import_libb.dart'; -export 'duplicate_import_libc.dart'; diff --git a/tests/language_2/export/duplicate_liba.dart b/tests/language_2/export/duplicate_liba.dart deleted file mode 100644 index a5c90d5bcc6..00000000000 --- a/tests/language_2/export/duplicate_liba.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2013, 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 export_liba; - -export 'duplicate_import_liba.dart'; diff --git a/tests/language_2/export/export_test.dart b/tests/language_2/export/export_test.dart deleted file mode 100644 index 2af96a6a546..00000000000 --- a/tests/language_2/export/export_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2012, 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 - -// Test export and re-export. - -library export_test; - -import 'helper1.dart'; -import 'helper3.dart' as lib; - -void main() { - print(new Exported()); - print(new ReExported()); - print(new lib.Exported()); - print(new lib.ReExported()); -} diff --git a/tests/language_2/export/helper1.dart b/tests/language_2/export/helper1.dart deleted file mode 100644 index a2938ef74b5..00000000000 --- a/tests/language_2/export/helper1.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2012, 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 export_helper1; - -import 'helper2.dart'; -export 'helper2.dart'; - -class Exported extends ReExported {} diff --git a/tests/language_2/export/helper2.dart b/tests/language_2/export/helper2.dart deleted file mode 100644 index 7a21abae75b..00000000000 --- a/tests/language_2/export/helper2.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2012, 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 export_helper2; - -class ReExported {} diff --git a/tests/language_2/export/helper3.dart b/tests/language_2/export/helper3.dart deleted file mode 100644 index b04cf9cdefd..00000000000 --- a/tests/language_2/export/helper3.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2012, 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 export_helper3; - -import 'helper4.dart'; -export 'helper4.dart'; - -class Exported extends ReExported {} diff --git a/tests/language_2/export/helper4.dart b/tests/language_2/export/helper4.dart deleted file mode 100644 index e5d3577f4e8..00000000000 --- a/tests/language_2/export/helper4.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2012, 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 export_helper4; - -class ReExported {} diff --git a/tests/language_2/export/local_a.dart b/tests/language_2/export/local_a.dart deleted file mode 100644 index 2af72a3c9ff..00000000000 --- a/tests/language_2/export/local_a.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2012, 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 local_export_a; - -export 'local_a_export.dart'; - -class A { - method() => 42; -} diff --git a/tests/language_2/export/local_a_export.dart b/tests/language_2/export/local_a_export.dart deleted file mode 100644 index fb2d66a36e2..00000000000 --- a/tests/language_2/export/local_a_export.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2012, 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 local_export_a_export; - -int A = 0; diff --git a/tests/language_2/export/local_export_test.dart b/tests/language_2/export/local_export_test.dart deleted file mode 100644 index fd4f507ad76..00000000000 --- a/tests/language_2/export/local_export_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2012, 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 localExportTest; - -import "package:expect/expect.dart"; -import 'local_a.dart'; - -void main() { - Expect.equals(42, new A().method()); -} diff --git a/tests/language_2/export/main_override_test.dart b/tests/language_2/export/main_override_test.dart deleted file mode 100644 index b98c94dd392..00000000000 --- a/tests/language_2/export/main_override_test.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2013, 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 - -export 'top_level_entry_test.dart'; - -main() { - print('export_main_override'); -} diff --git a/tests/language_2/export/main_test.dart b/tests/language_2/export/main_test.dart deleted file mode 100644 index 3639eff689c..00000000000 --- a/tests/language_2/export/main_test.dart +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) 2013, 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 - -export 'top_level_entry_test.dart'; diff --git a/tests/language_2/export/not_shadowed_by_prefix_helper.dart b/tests/language_2/export/not_shadowed_by_prefix_helper.dart deleted file mode 100644 index 78d0af57a1b..00000000000 --- a/tests/language_2/export/not_shadowed_by_prefix_helper.dart +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2016, 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 - -export "not_shadowed_by_prefix_helper2.dart"; -import "dart:core" as f; diff --git a/tests/language_2/export/not_shadowed_by_prefix_helper2.dart b/tests/language_2/export/not_shadowed_by_prefix_helper2.dart deleted file mode 100644 index 1af4ed2e85e..00000000000 --- a/tests/language_2/export/not_shadowed_by_prefix_helper2.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2016, 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 - -void f() { - f_called = true; -} - -bool f_called = false; diff --git a/tests/language_2/export/not_shadowed_by_prefix_test.dart b/tests/language_2/export/not_shadowed_by_prefix_test.dart deleted file mode 100644 index 134e29dc617..00000000000 --- a/tests/language_2/export/not_shadowed_by_prefix_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2016, 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 - -// Verify that import prefixes within an imported library don't shadow -// names re-exported by that library. - -import "package:expect/expect.dart"; -import "not_shadowed_by_prefix_helper.dart"; - -main() { - f(); - Expect.isTrue(f_called); -} diff --git a/tests/language_2/export/order_helper1.dart b/tests/language_2/export/order_helper1.dart deleted file mode 100644 index 22c5b742ffc..00000000000 --- a/tests/language_2/export/order_helper1.dart +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) 2016, 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 - -export 'order_test.dart'; -export 'order_helper2.dart' show z; diff --git a/tests/language_2/export/order_helper2.dart b/tests/language_2/export/order_helper2.dart deleted file mode 100644 index 8ac3c08cd18..00000000000 --- a/tests/language_2/export/order_helper2.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'order_helper1.dart'; - -class Info { - int x = y; -} - -int get z => 38; diff --git a/tests/language_2/export/order_test.dart b/tests/language_2/export/order_test.dart deleted file mode 100644 index b884508394e..00000000000 --- a/tests/language_2/export/order_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'package:expect/expect.dart'; -import 'order_helper1.dart' as bar; -import 'order_helper2.dart'; - -final y = 38; -final info = new Info(); - -void main() { - Expect.equals(38, info.x); - Expect.equals(38, bar.y); - Expect.equals(38, bar.z); -} diff --git a/tests/language_2/export/private_runtime_test.dart b/tests/language_2/export/private_runtime_test.dart deleted file mode 100644 index d08a0b51f34..00000000000 --- a/tests/language_2/export/private_runtime_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. -// Check that private dart:_ libraries cannot be imported. - - - -main() { - print("Done."); -} diff --git a/tests/language_2/export/private_test.dart b/tests/language_2/export/private_test.dart deleted file mode 100644 index c409ac7971a..00000000000 --- a/tests/language_2/export/private_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2015, 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. -// Check that private dart:_ libraries cannot be imported. - -// @dart = 2.9 - -export "dart:_internal"; -// [error line 8, column 1, length 24] -// [analyzer] COMPILE_TIME_ERROR.EXPORT_INTERNAL_LIBRARY -// [cfe] Can't access platform private library. - -main() { - print("Done."); -} diff --git a/tests/language_2/export/reexport_core_helper.dart b/tests/language_2/export/reexport_core_helper.dart deleted file mode 100644 index d1f3f680deb..00000000000 --- a/tests/language_2/export/reexport_core_helper.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2013, 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 reexport_core_helper; - -export 'dart:core'; diff --git a/tests/language_2/export/reexport_core_test.dart b/tests/language_2/export/reexport_core_test.dart deleted file mode 100644 index 0d138e83ca8..00000000000 --- a/tests/language_2/export/reexport_core_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 - -// Tests that exports are handled for libraries loaded prior to the entry point -// library. -// -// This test uses the fact that dart2js loads dart:core before the -// reexport_core_helper and reexport_core_test libraries and the exports of -// dart:core is therefore computed before the exports of reexport_core_helper. - -library reexport_core_test; - -import "package:expect/expect.dart"; -import 'reexport_core_helper.dart' as core; - -void main() { - var o = new Object(); - Expect.isTrue(o is core.Object); -} diff --git a/tests/language_2/export/top_level_entry.dart b/tests/language_2/export/top_level_entry.dart deleted file mode 100644 index 7b07bb289ee..00000000000 --- a/tests/language_2/export/top_level_entry.dart +++ /dev/null @@ -1,9 +0,0 @@ -// 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 - -part of top_level_entry_test.dart; - -main() {} diff --git a/tests/language_2/export/top_level_entry_test.dart b/tests/language_2/export/top_level_entry_test.dart deleted file mode 100644 index c585b96c415..00000000000 --- a/tests/language_2/export/top_level_entry_test.dart +++ /dev/null @@ -1,9 +0,0 @@ -// 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 top_level_entry_test.dart; - -part 'top_level_entry.dart'; diff --git a/tests/language_2/extension_methods/basic_static_extension_test.dart b/tests/language_2/extension_methods/basic_static_extension_test.dart deleted file mode 100644 index 70c0fc2e797..00000000000 --- a/tests/language_2/extension_methods/basic_static_extension_test.dart +++ /dev/null @@ -1,124 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Tests the syntax of extension methods, and that the extensions are -// invocable, and that type variables are bound correctly. - -// There are no extension *conflicts*. -// For each invocation, there is exactly one extension member in scope -// which applies. - -// Target types. -class Unnamed {} - -class Named {} - -class UnnamedGeneric {} - -class NamedGeneric {} - -String str(String name, Object object) => - "$name(${object == null ? "null" : "non-null"})"; - -// Unnamed local extension. -extension on Unnamed { - String get name => str("unnamed", this); -} - -extension NamedExt on Named { - String get name => str("named", this); -} - -extension on UnnamedGeneric { - String get name => str("unnamed generic", this); - List get list => []; -} - -extension NamedGenericExt on NamedGeneric { - String get name => str("named generic", this); - List get list => []; -} - -extension General on Object { - String get generalName => str("general", this); -} - -extension GeneralGeneric on T { - String get generalGenericName => str("general generic", this); - List get generalList => []; -} - -main() { - // Unnamed. - Unnamed unnamed = Unnamed(); - Unnamed unnamedNull = null; - - Expect.equals("unnamed(non-null)", unnamed.name); - Expect.equals("unnamed(null)", unnamedNull.name); - - Expect.equals("general(non-null)", unnamed.generalName); - Expect.equals("general(null)", unnamedNull.generalName); - - Expect.equals("general generic(non-null)", unnamed.generalGenericName); - Expect.equals("general generic(null)", unnamedNull.generalGenericName); - Expect.type>(unnamed.generalList); - Expect.type>(unnamedNull.generalList); - - // Named. - Named named = Named(); - Named namedNull = null; - - Expect.equals("named(non-null)", named.name); - Expect.equals("named(null)", namedNull.name); - - Expect.equals("general(non-null)", named.generalName); - Expect.equals("general(null)", namedNull.generalName); - - Expect.equals("general generic(non-null)", named.generalGenericName); - Expect.equals("general generic(null)", namedNull.generalGenericName); - Expect.type>(named.generalList); - Expect.type>(namedNull.generalList); - - // Unnamed Generic. - UnnamedGeneric unnamedGeneric = UnnamedGeneric(); - UnnamedGeneric unnamedGenericNull = null; - - Expect.equals("unnamed generic(non-null)", unnamedGeneric.name); - Expect.equals("unnamed generic(null)", unnamedGenericNull.name); - Expect.type>(unnamedGeneric.list); - Expect.notType>(unnamedGeneric.list); - Expect.type>(unnamedGenericNull.list); - Expect.notType>(unnamedGenericNull.list); - - Expect.equals("general(non-null)", unnamedGeneric.generalName); - Expect.equals("general(null)", unnamedGenericNull.generalName); - - Expect.equals("general generic(non-null)", unnamedGeneric.generalGenericName); - Expect.equals("general generic(null)", unnamedGenericNull.generalGenericName); - Expect.type>>(unnamedGeneric.generalList); - Expect.type>>(unnamedGenericNull.generalList); - - // Named Generic. - NamedGeneric namedGeneric = NamedGeneric(); - NamedGeneric namedGenericNull = null; - - Expect.equals("named generic(non-null)", namedGeneric.name); - Expect.equals("named generic(null)", namedGenericNull.name); - Expect.type>(namedGeneric.list); - Expect.notType>(namedGeneric.list); - Expect.type>(namedGenericNull.list); - Expect.notType>(namedGenericNull.list); - - Expect.equals("general(non-null)", namedGeneric.generalName); - Expect.equals("general(null)", namedGenericNull.generalName); - - Expect.equals("general generic(non-null)", namedGeneric.generalGenericName); - Expect.equals("general generic(null)", namedGenericNull.generalGenericName); - Expect.type>>(namedGeneric.generalList); - Expect.type>>(namedGenericNull.generalList); -} diff --git a/tests/language_2/extension_methods/extension_operation_in_const_test.dart b/tests/language_2/extension_methods/extension_operation_in_const_test.dart deleted file mode 100644 index 59edb863523..00000000000 --- a/tests/language_2/extension_methods/extension_operation_in_const_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -extension on Object { - int operator -() => 42; - int get length => 5; -} - -class Tester { - final value; - const Tester.neg(Object o) : value = -o; - const Tester.length(Object o) : value = o.length; -} - -main() { - const // - Object //# neg: compile-time error - i = 2; - const int x = -i; - print(x); - - const // - Object //# length: compile-time error - s = "fisk"; - const int y = s.length; - print(y); - - Expect.equals(42, new Tester.neg(3).value); - const tx = Tester.neg(42); //# tneg: compile-time error - print(tx); //# tneg: continued - - Expect.equals(5, new Tester.length("abc").value); - const ty = Tester.length("abc"); //# tlength: compile-time error - print(ty); //# tlength: continued -} diff --git a/tests/language_2/extension_methods/helpers/also_on_object.dart b/tests/language_2/extension_methods/helpers/also_on_object.dart deleted file mode 100644 index c6be3cd87b5..00000000000 --- a/tests/language_2/extension_methods/helpers/also_on_object.dart +++ /dev/null @@ -1,10 +0,0 @@ -// 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. - -// @dart = 2.9 - -// An extension conflicting with the one from "on_object.dart"; -extension AlsoOnObject on Object { - String get onObject => "also object"; -} diff --git a/tests/language_2/extension_methods/helpers/class_no_shadow.dart b/tests/language_2/extension_methods/helpers/class_no_shadow.dart deleted file mode 100644 index 8dd2ab2455f..00000000000 --- a/tests/language_2/extension_methods/helpers/class_no_shadow.dart +++ /dev/null @@ -1,24 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -const String instanceValue = "1"; - -void checkInstanceValue(String other) { - Expect.equals(other, instanceValue); -} - -// A class which has only its own instance methods -class A { - String fieldInInstanceScope = instanceValue; - String get getterInInstanceScope => instanceValue; - set setterInInstanceScope(String x) { - checkInstanceValue(x); - } - - String methodInInstanceScope() => instanceValue; -} diff --git a/tests/language_2/extension_methods/helpers/class_shadow.dart b/tests/language_2/extension_methods/helpers/class_shadow.dart deleted file mode 100644 index 331d649e48a..00000000000 --- a/tests/language_2/extension_methods/helpers/class_shadow.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -import "class_no_shadow.dart"; - -// A class which has its own instance methods, which also -// shadows the global scope -class AGlobal extends A { - String fieldInGlobalScope = instanceValue; - String get getterInGlobalScope => instanceValue; - set setterInGlobalScope(String x) { - checkInstanceValue(x); - } - - String methodInGlobalScope() => instanceValue; -} diff --git a/tests/language_2/extension_methods/helpers/extension_all.dart b/tests/language_2/extension_methods/helpers/extension_all.dart deleted file mode 100644 index 38652523215..00000000000 --- a/tests/language_2/extension_methods/helpers/extension_all.dart +++ /dev/null @@ -1,49 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; -import "class_no_shadow.dart"; - -const double otherExtensionValue = 1.234; - -void checkOtherExtensionValue(double other) { - Expect.equals(other, otherExtensionValue); -} - -// An extension which defines all symbols -extension ExtraExt on A { - double get fieldInGlobalScope => otherExtensionValue; - double get getterInGlobalScope => otherExtensionValue; - set setterInGlobalScope(double x) { - checkOtherExtensionValue(x); - } - - double methodInGlobalScope() => otherExtensionValue; - - double get fieldInInstanceScope => otherExtensionValue; - double get getterInInstanceScope => otherExtensionValue; - set setterInInstanceScope(double x) { - checkOtherExtensionValue(x); - } - - double methodInInstanceScope() => otherExtensionValue; - - double get fieldInExtensionScope => otherExtensionValue; - double get getterInExtensionScope => otherExtensionValue; - set setterInExtensionScope(double x) { - checkOtherExtensionValue(x); - } - - double methodInExtensionScope() => otherExtensionValue; - - double get fieldInOtherExtensionScope => otherExtensionValue; - double get getterInOtherExtensionScope => otherExtensionValue; - set setterInOtherExtensionScope(double x) { - checkOtherExtensionValue(x); - } - - double methodInOtherExtensionScope() => otherExtensionValue; -} diff --git a/tests/language_2/extension_methods/helpers/extension_global_instance.dart b/tests/language_2/extension_methods/helpers/extension_global_instance.dart deleted file mode 100644 index 3a263b011c2..00000000000 --- a/tests/language_2/extension_methods/helpers/extension_global_instance.dart +++ /dev/null @@ -1,41 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; -import "class_no_shadow.dart"; - -const double otherExtensionValue = 1.234; - -void checkOtherExtensionValue(double other) { - Expect.equals(other, otherExtensionValue); -} - -// An extension which defines only global, instance and its own symbols -extension ExtraExt on A { - double get fieldInGlobalScope => otherExtensionValue; - double get getterInGlobalScope => otherExtensionValue; - set setterInGlobalScope(double x) { - checkOtherExtensionValue(x); - } - - double methodInGlobalScope() => otherExtensionValue; - - double get fieldInInstanceScope => otherExtensionValue; - double get getterInInstanceScope => otherExtensionValue; - set setterInInstanceScope(double x) { - checkOtherExtensionValue(x); - } - - double methodInInstanceScope() => otherExtensionValue; - - double get fieldInOtherExtensionScope => otherExtensionValue; - double get getterInOtherExtensionScope => otherExtensionValue; - set setterInOtherExtensionScope(double x) { - checkOtherExtensionValue(x); - } - - double methodInOtherExtensionScope() => otherExtensionValue; -} diff --git a/tests/language_2/extension_methods/helpers/extension_only.dart b/tests/language_2/extension_methods/helpers/extension_only.dart deleted file mode 100644 index 07a1dad4b85..00000000000 --- a/tests/language_2/extension_methods/helpers/extension_only.dart +++ /dev/null @@ -1,25 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; -import "class_no_shadow.dart"; - -const double otherExtensionValue = 1.234; - -void checkOtherExtensionValue(double other) { - Expect.equals(other, otherExtensionValue); -} - -// An extension which defines only its own symbols -extension ExtraExt on A { - double get fieldInOtherExtensionScope => otherExtensionValue; - double get getterInOtherExtensionScope => otherExtensionValue; - set setterInOtherExtensionScope(double x) { - checkOtherExtensionValue(x); - } - - double methodInOtherExtensionScope() => otherExtensionValue; -} diff --git a/tests/language_2/extension_methods/helpers/global_scope.dart b/tests/language_2/extension_methods/helpers/global_scope.dart deleted file mode 100644 index 3f023b50de8..00000000000 --- a/tests/language_2/extension_methods/helpers/global_scope.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -const int globalValue = 0; - -void checkGlobalValue(int x) { - Expect.equals(x, globalValue); -} - -// Add symbols to the global scope -int fieldInGlobalScope = globalValue; -int get getterInGlobalScope => globalValue; -set setterInGlobalScope(int x) { - checkGlobalValue(x); -} - -int methodInGlobalScope() => globalValue; diff --git a/tests/language_2/extension_methods/helpers/on_int.dart b/tests/language_2/extension_methods/helpers/on_int.dart deleted file mode 100644 index 1eee2a7b856..00000000000 --- a/tests/language_2/extension_methods/helpers/on_int.dart +++ /dev/null @@ -1,10 +0,0 @@ -// 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. - -// @dart = 2.9 - -extension OnInt on int { - String get onObject => "int"; - String get onInt => "int"; -} diff --git a/tests/language_2/extension_methods/helpers/on_object.dart b/tests/language_2/extension_methods/helpers/on_object.dart deleted file mode 100644 index 135e4f35a30..00000000000 --- a/tests/language_2/extension_methods/helpers/on_object.dart +++ /dev/null @@ -1,9 +0,0 @@ -// 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. - -// @dart = 2.9 - -extension OnObject on Object { - String get onObject => "object"; -} diff --git a/tests/language_2/extension_methods/issue_45551_error_test.dart b/tests/language_2/extension_methods/issue_45551_error_test.dart deleted file mode 100644 index 758aef15f97..00000000000 --- a/tests/language_2/extension_methods/issue_45551_error_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2021, 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 - -// This test illustrates the error scenario described in -// https://github.com/dart-lang/sdk/issues/45551 - -class C {} - -extension on C { - void Function() get call => () {}; -} - -test(C c) { - c(); -//^ -// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION -// ^ -// [cfe] Cannot invoke an instance of 'C' because it declares 'call' to be something other than a method. -} - -main() {} diff --git a/tests/language_2/extension_methods/static_extension_bounds_error_test.dart b/tests/language_2/extension_methods/static_extension_bounds_error_test.dart deleted file mode 100644 index 3400ee62ec8..00000000000 --- a/tests/language_2/extension_methods/static_extension_bounds_error_test.dart +++ /dev/null @@ -1,140 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests bounds checking for extension methods - -extension E1 on T { - int get e1 => 1; -} - -extension E2 on T { - int get e2 => 2; -} - -extension E3 on T { - S f3(S x) => x; -} - -extension E4> on T { - int get e4 => 4; -} - -class Rec> {} - -class RecSolution extends Rec {} - -void main() { - String s = "s"; - int i = 0; - double d = 1.0; - - // Inferred type of String does not satisfy the bound. - s.e1; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER -// [cfe] The getter 'e1' isn't defined for the class 'String'. - E1(s).e1; -//^^ -// [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER -//^ -// [cfe] Inferred type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'E1|get#e1'. - E1(s).e1; -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS -//^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'E1|get#e1'. - - // Inferred types of int and double are ok - i.e1; - E1(i).e1; - E1(i).e1; - d.e1; - E1(d).e1; - E1(d).e1; - - // Inferred type of String does not satisfy the bound. - s.e2; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER -// [cfe] The getter 'e2' isn't defined for the class 'String'. - E2(s).e2; -//^^ -// [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER -//^ -// [cfe] Inferred type argument 'String' doesn't conform to the bound 'S' of the type variable 'T' on 'E2|get#e2'. - E2(s).e2; -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS -//^ -// [cfe] Type argument 'String' doesn't conform to the bound 'S' of the type variable 'T' on 'E2|get#e2'. - - // Inferred types of int and double are ok - i.e2; - E2(i).e2; - E2(i).e2; - d.e2; - E2(d).e2; - E2(d).e2; - - // Inferred type int for method type parameter doesn't match the inferred - // bound of String - s.f3(3); -// ^^ -// [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER -// [cfe] Inferred type argument 'int' doesn't conform to the bound 'T' of the type variable 'S' on 'E3|f3'. - E3(s).f3(3); -// ^^ -// [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER -// [cfe] Inferred type argument 'int' doesn't conform to the bound 'T' of the type variable 'S' on 'E3|f3'. - E3(s).f3(3); -// ^^ -// [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER -// [cfe] Inferred type argument 'int' doesn't conform to the bound 'T' of the type variable 'S' on 'E3|f3'. - - // Inferred type int for method type parameter is ok - i.f3(3); - E3(i).f3(3); - E3(i).f3(3); - - // Inferred type int for method type parameter doesn't match the inferred - // bound of double - d.f3(3); -// ^^ -// [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER -// [cfe] Inferred type argument 'int' doesn't conform to the bound 'T' of the type variable 'S' on 'E3|f3'. - E3(d).f3(3); -// ^^ -// [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER -// [cfe] Inferred type argument 'int' doesn't conform to the bound 'T' of the type variable 'S' on 'E3|f3'. - E3(d).f3(3); -// ^^ -// [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER -// [cfe] Inferred type argument 'int' doesn't conform to the bound 'T' of the type variable 'S' on 'E3|f3'. - - RecSolution recs = RecSolution(); - Rec superRec = RecSolution(); // Super-bounded type. - - // Inferred type of RecSolution is ok - recs.e4; - E4(recs).e4; - E4(recs).e4; - - // Inferred super-bounded type is invalid as type argument - superRec.e4; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER -// [cfe] The getter 'e4' isn't defined for the class 'Rec'. - E4(superRec).e4; -//^^ -// [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER -//^ -// [cfe] Inferred type argument 'Rec' doesn't conform to the bound 'Rec' of the type variable 'T' on 'E4|get#e4'. - E4>(superRec).e4; -// ^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS -//^ -// [cfe] Type argument 'Rec' doesn't conform to the bound 'Rec' of the type variable 'T' on 'E4|get#e4'. -} diff --git a/tests/language_2/extension_methods/static_extension_constant_error_test.dart b/tests/language_2/extension_methods/static_extension_constant_error_test.dart deleted file mode 100644 index b2eeb7a483c..00000000000 --- a/tests/language_2/extension_methods/static_extension_constant_error_test.dart +++ /dev/null @@ -1,90 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'static_extension_constant_lib.dart'; - -// Tests that it is an error to invoke an extension method during constant -// expression evaluation. The expressions should be the same as those in -// `runtimeExtensionCalls`, so that it is verified that each of them will -// invoke an extension method. - -void main() { - // The initializing expressions should be identical to the elements in - // `runtimeExtensionCalls`. - - const c01 = ~i; - // ^^ - // [analyzer] unspecified - // [cfe] unspecified - const c02 = b & b; - // ^^^^^ - // [analyzer] unspecified - // [cfe] unspecified - const c03 = b | b; - // ^^^^^ - // [analyzer] unspecified - // [cfe] unspecified - const c04 = b ^ b; - // ^^^^^ - // [analyzer] unspecified - // [cfe] unspecified - const c05 = i ~/ i; - // ^^^^^^ - // [analyzer] unspecified - // [cfe] unspecified - const c06 = i >> i; - // ^^^^^^ - // [analyzer] unspecified - // [cfe] unspecified - const c08 = i << i; - // ^^^^^^ - // [analyzer] unspecified - // [cfe] unspecified - const c09 = i + i; - // ^^^^^ - // [analyzer] unspecified - // [cfe] unspecified - const c10 = -i; - // ^^ - // [analyzer] unspecified - // [cfe] unspecified - const c11 = d - d; - // ^^^^^ - // [analyzer] unspecified - // [cfe] unspecified - const c12 = d * d; - // ^^^^^ - // [analyzer] unspecified - // [cfe] unspecified - const c13 = d / d; - // ^^^^^ - // [analyzer] unspecified - // [cfe] unspecified - const c14 = d % d; - // ^^^^^ - // [analyzer] unspecified - // [cfe] unspecified - const c15 = d < i; - // ^^^^^ - // [analyzer] unspecified - // [cfe] unspecified - const c16 = i <= d; - // ^^^^^^ - // [analyzer] unspecified - // [cfe] unspecified - const c17 = d > i; - // ^^^^^ - // [analyzer] unspecified - // [cfe] unspecified - const c18 = i >= i; - // ^^^^^^ - // [analyzer] unspecified - // [cfe] unspecified - const c19 = s.length; - // ^^^^^^^^ - // [analyzer] unspecified - // [cfe] unspecified -} diff --git a/tests/language_2/extension_methods/static_extension_constant_lib.dart b/tests/language_2/extension_methods/static_extension_constant_lib.dart deleted file mode 100644 index 96355f16741..00000000000 --- a/tests/language_2/extension_methods/static_extension_constant_lib.dart +++ /dev/null @@ -1,55 +0,0 @@ -// 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. - -// @dart = 2.9 - -extension ExtendObject on Object { - int operator ~() => 1; - bool operator &(Object other) => false; - bool operator |(Object other) => false; - bool operator ^(Object other) => true; - int operator ~/(Object other) => 0; - int operator >>(Object other) => 1; - int operator <<(Object other) => 0; - int operator +(Object other) => 0; - double operator -() => 1.0; - double operator -(Object other) => 1.0; - double operator *(Object other) => 1.0; - double operator /(Object other) => 2.0; - double operator %(Object other) => 1.0; - bool operator <(Object other) => false; - bool operator <=(Object other) => true; - bool operator >(Object other) => true; - bool operator >=(Object other) => false; - int get length => 1; -} - -const Object b = true; -const Object i = 3; -const Object d = 2.4; -const Object s = 'Hello!'; - -// These expressions should be identical to the ones in -// static_extension_constant_{,error}_test.dart, to ensure that -// they invoke an extension method, and that this is an error. -var runtimeExtensionCalls = [ - ~i, - b & b, - b | b, - b ^ b, - i ~/ i, - i >> i, - i << i, - i + i, - -i, - d - d, - d * d, - d / d, - d % d, - d < i, - i <= d, - d > i, - i >= i, - s.length, -]; diff --git a/tests/language_2/extension_methods/static_extension_constant_test.dart b/tests/language_2/extension_methods/static_extension_constant_test.dart deleted file mode 100644 index 0d28ef66731..00000000000 --- a/tests/language_2/extension_methods/static_extension_constant_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; -import 'static_extension_constant_lib.dart' hide b, i, d, s; -import 'static_extension_constant_lib.dart' as lib show b, i, d, s; - -// Ensure that all expressions in runtimeExtensionCalls invoke -// an extension method rather than an instance method, such that -// static_extension_constant_error_test gets an error for them all. - -const dynamic b = lib.b; -const dynamic i = lib.i; -const dynamic d = lib.d; -const dynamic s = lib.s; - -// These expressions should be identical to those in -// `lib.runtimeExtensionCalls`. -var dynamicInstanceCalls = [ - ~i, - b & b, - b | b, - b ^ b, - i ~/ i, - i >> i, - i << i, - i + i, - -i, - d - d, - d * d, - d / d, - d % d, - d < i, - i <= d, - d > i, - i >= i, - s.length, -]; - -void main() { - for (int i = 0; i < dynamicInstanceCalls.length; ++i) { - Expect.notEquals(dynamicInstanceCalls[i], runtimeExtensionCalls[i]); - } -} diff --git a/tests/language_2/extension_methods/static_extension_deferred_double_import_test.dart b/tests/language_2/extension_methods/static_extension_deferred_double_import_test.dart deleted file mode 100644 index 7facb877444..00000000000 --- a/tests/language_2/extension_methods/static_extension_deferred_double_import_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -import "helpers/on_object.dart"; -import "helpers/on_object.dart" deferred as p1 hide OnObject; - -// Allow explicit and implicit access to non-deferred import extensions. - -void main() async { - Object o = 1; - Expect.equals("object", OnObject(o).onObject); - Expect.equals("object", o.onObject); -} diff --git a/tests/language_2/extension_methods/static_extension_deferred_import_error_test.dart b/tests/language_2/extension_methods/static_extension_deferred_import_error_test.dart deleted file mode 100644 index 566bcd14f51..00000000000 --- a/tests/language_2/extension_methods/static_extension_deferred_import_error_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// It is an error to import a deferred library containing extensions without -// hiding them. -import "helpers/on_object.dart" deferred as p1; -// [error line 11, column 1] -// [cfe] Extension 'OnObject' cannot be imported through a deferred import. -// ^^^^^^^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.DEFERRED_IMPORT_OF_EXTENSION - -void main() async {} diff --git a/tests/language_2/extension_methods/static_extension_deferred_import_resolution_error_test.dart b/tests/language_2/extension_methods/static_extension_deferred_import_resolution_error_test.dart deleted file mode 100644 index 7d193c51fde..00000000000 --- a/tests/language_2/extension_methods/static_extension_deferred_import_resolution_error_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -import "helpers/on_object.dart" deferred as p1 hide OnObject; - -void main() { - Object o = 1; - OnObject(o).onObject; -//^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION -// [cfe] Method not found: 'OnObject'. - o.onObject; - //^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'onObject' isn't defined for the class 'Object'. -} diff --git a/tests/language_2/extension_methods/static_extension_deferred_import_test.dart b/tests/language_2/extension_methods/static_extension_deferred_import_test.dart deleted file mode 100644 index eae0d39388e..00000000000 --- a/tests/language_2/extension_methods/static_extension_deferred_import_test.dart +++ /dev/null @@ -1,11 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -import "helpers/on_object.dart" deferred as p1 hide OnObject; - -void main() {} diff --git a/tests/language_2/extension_methods/static_extension_getter_setter_conflicts_test.dart b/tests/language_2/extension_methods/static_extension_getter_setter_conflicts_test.dart deleted file mode 100644 index b3888b00a7f..00000000000 --- a/tests/language_2/extension_methods/static_extension_getter_setter_conflicts_test.dart +++ /dev/null @@ -1,251 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests interactions between getters and setters where there is a conflict. - -// Conflicting class declarations. - -class C0 { - int get m1 => 0; - void set m2(int x) {} - int operator [](int index) => 0; -} - -extension E0 on C0 { - void set m1(int x) {} - int get m2 => 0; - void operator []=(int index, int value) {} -} - -void test0() { - C0 c0 = C0(); - c0.m1; - c0.m1 = 0; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER - // [cfe] The setter 'm1' isn't defined for the class 'C0'. - E0(c0).m1 = 0; - E0(c0).m1; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_EXTENSION_GETTER - // [cfe] Getter not found: 'm1'. - - c0.m1 += 0; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER - // [cfe] The setter 'm1' isn't defined for the class 'C0'. - - c0.m1++; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER - // [cfe] The setter 'm1' isn't defined for the class 'C0'. - - c0.m2 = 0; - c0.m2; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'm2' isn't defined for the class 'C0'. - c0.m2 += 0; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'm2' isn't defined for the class 'C0'. - c0.m2++; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'm2' isn't defined for the class 'C0'. - - E0(c0).m2; - - c0[0]; - c0[0] = 0; - //^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '[]=' isn't defined for the class 'C0'. - E0(c0)[0]; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_EXTENSION_OPERATOR - // [cfe] Method not found: '[]'. - E0(c0)[0] = 0; - - c0[0] += 0; - //^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '[]=' isn't defined for the class 'C0'. - c0[0]++; - //^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '[]=' isn't defined for the class 'C0'. - - E0(c0)[0] += 0; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_EXTENSION_OPERATOR - // [cfe] The operator '[]' isn't defined for the class 'C0'. - E0(c0)[0]++; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_EXTENSION_OPERATOR - // [cfe] The operator '[]' isn't defined for the class 'C0'. -} - -// Conflicting extensions. - -class C1 {} - -extension E1A on C1 { - int get m1 => 0; - void set m2(int x) {} - int operator [](int index) => 0; -} - -extension E1B on C1 { - void set m1(int x) {} - int get m2 => 0; - void operator []=(int index, int value) {} -} - -void test1() { - C1 c1a = C1(); // E1A is more specific. - c1a.m1; - - c1a.m1 = 0; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER - // [cfe] The setter 'm1' isn't defined for the class 'C1'. - - c1a.m2; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'm2' isn't defined for the class 'C1'. - - c1a.m2 = 0; - - c1a[0] = 0; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '[]=' isn't defined for the class 'C1'. - - c1a[0] += 0; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '[]=' isn't defined for the class 'C1'. - - c1a[0]++; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '[]=' isn't defined for the class 'C1'. - - c1a[0]; - - C1 c1b = C1(); // Neither extension is more specific. - - c1b.m1; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'm1' is defined in multiple extensions for 'C1' and neither is more specific. - - c1b.m1 = 0; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'm1' is defined in multiple extensions for 'C1' and neither is more specific. - - c1b.m1 += 0; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'm1' is defined in multiple extensions for 'C1' and neither is more specific. - - c1b.m1++; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'm1' is defined in multiple extensions for 'C1' and neither is more specific. - - c1b.m2; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'm2' is defined in multiple extensions for 'C1' and neither is more specific. - - c1b[0]; -//^^^ -// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS -// ^ -// [cfe] The operator '[]' is defined in multiple extensions for 'C1' and neither is more specific. - - c1b[0] = 0; -//^^^ -// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS -// ^ -// [cfe] The operator '[]=' is defined in multiple extensions for 'C1' and neither is more specific. - - c1b[0] += 0; -//^^^ -// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS -// ^ -// [cfe] The operator '[]' is defined in multiple extensions for 'C1' and neither is more specific. -// [cfe] The operator '[]=' is defined in multiple extensions for 'C1' and neither is more specific. - - c1b[0]++; -//^^^ -// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS -// ^ -// [cfe] The operator '[]' is defined in multiple extensions for 'C1' and neither is more specific. -// [cfe] The operator '[]=' is defined in multiple extensions for 'C1' and neither is more specific. -} - -// Getter on the extension itself. -class C2 { - int get m1 => 0; - void set m2(int x) {} - int get mc => 0; - void operator []=(int index, int value) {} -} - -extension E2 on C2 { - void set m1(int x) {} - int get m2 => 0; - String get me => ""; - int operator [](int index) => 0; - - void test2() { - // Using `this.member` means using the `on` type. - - this.m1; - this.m1 = 0; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER - // [cfe] The setter 'm1' isn't defined for the class 'C2'. - - this.m2 = 0; - this.m2; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'm2' isn't defined for the class 'C2'. - - this[0] = 0; - this[0]; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '[]' isn't defined for the class 'C2'. - - this[0] += 0; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '[]' isn't defined for the class 'C2'. - - this[0]++; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '[]' isn't defined for the class 'C2'. - - // Check that `this.mc` refers to `C2.mc`. - this.mc.toRadixString(16); - // Check that `this.me` refers to `E2.me`. - this.me.substring(0); - } -} - -main() { - test0(); - test1(); - C2().test2(); -} diff --git a/tests/language_2/extension_methods/static_extension_getter_setter_test.dart b/tests/language_2/extension_methods/static_extension_getter_setter_test.dart deleted file mode 100644 index 9a0e782d8af..00000000000 --- a/tests/language_2/extension_methods/static_extension_getter_setter_test.dart +++ /dev/null @@ -1,145 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests getters and setters where one or both is defined -// by an extension. - -import "package:expect/expect.dart"; - -main() { - C c = C(); - // v1: C get, C set - expectGet("C.v1", c.v1); - expectSet("C.v1=1", c.v1 = Result("1")); - // v2: C get, E1 get/set, C wins. - expectGet("C.v2", c.v2); - expectSet("E1.v2=2", E1(c).v2 = Result("2")); - // v3: E1 get/set, C set, C wins. - expectGet("E1.v3", E1(c).v3); - expectSet("C.v3=3", c.v3 = Result("3")); - // v4: E1 get/set - expectGet("E1.v4", c.v4); - expectSet("E1.v4=4", c.v4 = Result("4")); - // v5: E1 get, E2 set, neither more specific. - expectGet("E1.v5", E1(c).v5); - expectSet("E2.v5=5", E2(c).v5 = Result("5")); - - expectSet("C.v1=C.v1+1", c.v1++); - expectSet("E1.v4=E1.v4+1", c.v4++); - - expectSet("C.v1=C.v1+a", c.v1 += "a"); - expectSet("C.v1=C.v1-b", c.v1 -= "b"); - expectSet("E1.v4=E1.v4-b", c.v4 -= "b"); - - // Explicit application used by all accesses of read/write operations - expectSet("E1.v1=E1.v1+1", E1(c).v1++); - expectSet("E1.v2=E1.v2+1", E1(c).v2++); - expectSet("E1.v3=E1.v3+1", E1(c).v3++); - // Same using `+= 1` instead of `++`. - expectSet("E1.v1=E1.v1+1", E1(c).v1 += 1); - expectSet("E1.v2=E1.v2+1", E1(c).v2 += 1); - expectSet("E1.v3=E1.v3+1", E1(c).v3 += 1); - // Same fully expanded. - expectSet("E1.v1=E1.v1+1", E1(c).v1 = E1(c).v1 + 1); - expectSet("E1.v2=E1.v2+1", E1(c).v2 = E1(c).v2 + 1); - expectSet("E1.v3=E1.v3+1", E1(c).v3 = E1(c).v3 + 1); - - // Cascades work. - expectSet( - "E1.v4=E1.v4+[C.v1=C.v1-[C.v3=a]]", - c - ..v3 = Result("a") - ..v1 -= Result("[$lastSetter]") - ..v4 += Result("[$lastSetter]")); -} - -/// Expect the value of [result] to be the [expected] string -expectGet(String expected, Result result) { - Expect.equals(expected, result.value); -} - -/// Expect the [lastSetter] value set by evaluating [assignment] to be -/// [expected]. -expectSet(String expected, void assignment) { - Expect.equals(expected, lastSetter); -} - -/// Last value passed to any of our tested setters. -String lastSetter = null; - -/// A type which supports a `+` operation accepting `int`, -/// so we can test `+=` and `++`. -class Result { - final String value; - Result(this.value); - Result operator +(Object o) => Result("$value+$o"); - Result operator -(Object o) => Result("$value-$o"); - String toString() => value; -} - -/// Target type for extensions. -/// -/// Declares [v1] getter and setter, [v2] getter and [v3] setter. -class C { - Result get v1 => Result("C.v1"); - void set v1(Result value) { - lastSetter = "C.v1=$value"; - } - - Result get v2 => Result("C.v2"); - - void set v3(Result value) { - lastSetter = "C.v3=$value"; - } -} - -/// Primary extension on [C]. -/// -/// Declares [v1], [v2] and [v3] getters and setters. -/// -/// Declares [v4] getter and setter, and [v5] getter -/// which are supplemented by a setter from the [E2] extension. -extension E1 on C { - // Same basename as C getter and setter. - Result get v1 => Result("E1.v1"); - - void set v1(Result value) { - lastSetter = "E1.v1=$value"; - } - - // Same basename as C getter. - Result get v2 => Result("E1.v2"); - - void set v2(Result value) { - lastSetter = "E1.v2=$value"; - } - - // Same basename as C setter. - Result get v3 => Result("E1.v3"); - - void set v3(Result value) { - lastSetter = "E1.v3=$value"; - } - - // No other declarations with same basename. - Result get v4 => Result("E1.v4"); - - void set v4(Result value) { - lastSetter = "E1.v4=$value"; - } - - // Same basename as E2 setter. - Result get v5 => Result("E1.v5"); -} - -/// A different extension than [E1] on [C]. -/// -/// Declares [v5] setter. -extension E2 on C { - void set v5(Result value) { - lastSetter = "E2.v5=$value"; - } -} diff --git a/tests/language_2/extension_methods/static_extension_import_hide_error_test.dart b/tests/language_2/extension_methods/static_extension_import_hide_error_test.dart deleted file mode 100644 index 04bb288ea07..00000000000 --- a/tests/language_2/extension_methods/static_extension_import_hide_error_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -import "helpers/on_object.dart"; -import "helpers/on_int.dart" hide OnInt; - -void main() { - int i = 0; - Object o = i; - i.onInt; - //^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'onInt' isn't defined for the class 'int'. - i.onObject; - o.onObject; -} diff --git a/tests/language_2/extension_methods/static_extension_import_hide_test.dart b/tests/language_2/extension_methods/static_extension_import_hide_test.dart deleted file mode 100644 index 8cde4da73b9..00000000000 --- a/tests/language_2/extension_methods/static_extension_import_hide_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -import "helpers/on_object.dart"; -import "helpers/on_int.dart" hide OnInt; - -void main() { - int i = 0; - Object o = i; - Expect.equals("object", i.onObject); - Expect.equals("object", o.onObject); -} diff --git a/tests/language_2/extension_methods/static_extension_import_prefixed_hide_error_test.dart b/tests/language_2/extension_methods/static_extension_import_prefixed_hide_error_test.dart deleted file mode 100644 index af6d53ef85d..00000000000 --- a/tests/language_2/extension_methods/static_extension_import_prefixed_hide_error_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -import "helpers/on_object.dart"; -import "helpers/on_int.dart" as p1 hide OnInt; - -void main() { - int i = 0; - Object o = i; - i.onInt; - //^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'onInt' isn't defined for the class 'int'. - i.onObject; - o.onObject; -} diff --git a/tests/language_2/extension_methods/static_extension_import_prefixed_hide_test.dart b/tests/language_2/extension_methods/static_extension_import_prefixed_hide_test.dart deleted file mode 100644 index 904c54cdccb..00000000000 --- a/tests/language_2/extension_methods/static_extension_import_prefixed_hide_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -import "helpers/on_object.dart"; -import "helpers/on_int.dart" as p1 hide OnInt; - -void main() { - int i = 0; - Object o = i; - Expect.equals("object", i.onObject); - Expect.equals("object", o.onObject); -} diff --git a/tests/language_2/extension_methods/static_extension_import_prefixed_show_test.dart b/tests/language_2/extension_methods/static_extension_import_prefixed_show_test.dart deleted file mode 100644 index 8cb537ea5f4..00000000000 --- a/tests/language_2/extension_methods/static_extension_import_prefixed_show_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -import "helpers/on_object.dart" as p1 show OnObject; -import "helpers/on_int.dart"; - -void main() { - int i = 0; - Object o = i; - Expect.equals("int", i.onInt); - Expect.equals("int", i.onObject); - Expect.equals("object", o.onObject); -} diff --git a/tests/language_2/extension_methods/static_extension_import_prefixed_test.dart b/tests/language_2/extension_methods/static_extension_import_prefixed_test.dart deleted file mode 100644 index 18b37b181d1..00000000000 --- a/tests/language_2/extension_methods/static_extension_import_prefixed_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -import "helpers/on_object.dart" as p1; -import "helpers/on_int.dart"; - -void main() { - int i = 0; - Object o = i; - Expect.equals("int", i.onInt); - Expect.equals("int", i.onObject); - Expect.equals("object", o.onObject); -} diff --git a/tests/language_2/extension_methods/static_extension_import_test.dart b/tests/language_2/extension_methods/static_extension_import_test.dart deleted file mode 100644 index 337cb87fc4c..00000000000 --- a/tests/language_2/extension_methods/static_extension_import_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -import "helpers/on_object.dart"; -import "helpers/on_int.dart"; - -void main() { - int i = 0; - Object o = i; - Expect.equals("int", i.onInt); - Expect.equals("int", i.onObject); - Expect.equals("object", o.onObject); -} diff --git a/tests/language_2/extension_methods/static_extension_import_unprefixed_show_test.dart b/tests/language_2/extension_methods/static_extension_import_unprefixed_show_test.dart deleted file mode 100644 index 7b5cda0fefb..00000000000 --- a/tests/language_2/extension_methods/static_extension_import_unprefixed_show_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -import "helpers/on_object.dart" show OnObject; -import "helpers/on_int.dart"; - -void main() { - int i = 0; - Object o = i; - Expect.equals("int", i.onInt); - Expect.equals("int", i.onObject); - Expect.equals("object", o.onObject); -} diff --git a/tests/language_2/extension_methods/static_extension_inference_test.dart b/tests/language_2/extension_methods/static_extension_inference_test.dart deleted file mode 100644 index 63426c2a1ed..00000000000 --- a/tests/language_2/extension_methods/static_extension_inference_test.dart +++ /dev/null @@ -1,184 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests extension method resolution type inference. - -import "package:expect/expect.dart"; - -void main() { - List numList = []; - // Inference of E1(numList), implicit or explicit, is the same as - // for C1(numList), which infers `num`. - var numListInstance1 = C1(numList); - - Expect.type>(numList.argList1); - sameType(numListInstance1.argDynList1, numList.argDynList1); - sameType(numListInstance1.selfList1, numList.selfList1); - - Expect.type>(E1(numList).argList1); - sameType(numListInstance1.argDynList1, E1(numList).argDynList1); - sameType(numListInstance1.selfList1, E1(numList).selfList1); - - var numListInstance2 = C2>(numList); - - Expect.type>>(numList.argList2); - sameType(numListInstance2.argDynList2, numList.argDynList2); - sameType(numListInstance2.selfList2, numList.selfList2); - - Expect.type>>(E2(numList).argList2); - sameType(numListInstance2.argDynList2, E2(numList).argDynList2); - sameType(numListInstance2.selfList2, E2(numList).selfList2); - - Pair pair = Pair(1, 2.5); - var pairInstance3 = C3(pair); - - Expect.type>(pair.argList3); - Expect.type>(pair.arg2List3); - sameType(pairInstance3.argDynList3, pair.argDynList3); - sameType(pairInstance3.arg2DynList3, pair.arg2DynList3); - sameType(pairInstance3.selfList3, pair.selfList3); - - Expect.type>(E3(pair).argList3); - Expect.type>(E3(pair).arg2List3); - sameType(pairInstance3.argDynList3, E3(pair).argDynList3); - sameType(pairInstance3.arg2DynList3, E3(pair).arg2DynList3); - sameType(pairInstance3.selfList3, E3(pair).selfList3); - - var pairInstance4 = C4(pair); - - Expect.type>(pair.argList4); - sameType(pairInstance4.argDynList4, pair.argDynList4); - sameType(pairInstance4.selfList4, pair.selfList4); - - Expect.type>(E4(pair).argList4); - sameType(pairInstance4.argDynList4, E4(pair).argDynList4); - sameType(pairInstance4.selfList4, E4(pair).selfList4); - - List intList = [1]; - var intListInstance5 = C5(intList); - - Expect.type>(intList.argList5); - sameType(intListInstance5.argDynList5, intList.argDynList5); - sameType(intListInstance5.selfList5, intList.selfList5); - - Expect.type>(E5(intList).argList5); - sameType(intListInstance5.argDynList5, E5(intList).argDynList5); - sameType(intListInstance5.selfList5, E5(intList).selfList5); -} - -void sameType(o1, o2) { - Expect.equals(o1.runtimeType, o2.runtimeType); -} - -extension E1 on List { - List get argList1 => []; - List get argDynList1 => []; - List get selfList1 { - var result = [this]; - return result; - } -} - -class C1 { - List self; - C1(this.self); - List get argList1 => []; - List get argDynList1 => []; - List get selfList1 { - var result = [self]; - return result; - } -} - -extension E2 on T { - List get argList2 => []; - List get argDynList2 => []; - List get selfList2 { - var result = [this]; - return result; - } -} - -class C2 { - T self; - C2(this.self); - List get argList2 => []; - List get argDynList2 => []; - List get selfList2 { - var result = [self]; - return result; - } -} - -extension E3 on Pair { - List get argList3 => []; - List get argDynList3 => []; - List get arg2List3 => []; - List get arg2DynList3 => []; - List get selfList3 { - var result = [this]; - return result; - } -} - -class C3 { - Pair self; - C3(this.self); - List get argList3 => []; - List get argDynList3 => []; - List get arg2List3 => []; - List get arg2DynList3 => []; - List get selfList3 { - var result = [self]; - return result; - } -} - -extension E4 on Pair { - List get argList4 => []; - List get argDynList4 => []; - List get selfList4 { - var result = [this]; - return result; - } -} - -class C4 { - Pair self; - C4(this.self); - List get argList4 => []; - List get argDynList4 => []; - List get selfList4 { - var result = [self]; - return result; - } -} - -extension E5 on List { - List get argList5 => []; - List get argDynList5 => []; - List get selfList5 { - var result = [this]; - return result; - } -} - -class C5 { - List self; - C5(this.self); - List get argList5 => []; - List get argDynList5 => []; - List get selfList5 { - var result = [self]; - return result; - } -} - -class Pair { - final A first; - final B second; - Pair(this.first, this.second); -} diff --git a/tests/language_2/extension_methods/static_extension_internal_basename_shadowing_error_test.dart b/tests/language_2/extension_methods/static_extension_internal_basename_shadowing_error_test.dart deleted file mode 100644 index 5eaaaa80c59..00000000000 --- a/tests/language_2/extension_methods/static_extension_internal_basename_shadowing_error_test.dart +++ /dev/null @@ -1,505 +0,0 @@ -// 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. - -// @dart = 2.9 - -/////////////////////////////////////////////////////////////////////// -// The following tests check that setters or getters in an extension -// correctly shadow members with the same basename in the surrounding -// scope. -/////////////////////////////////////////////////////////////////////// - -int get topLevelGetter => -1; -void set topLevelSetter(int _) {} -int topLevelField = -3; -int topLevelMethod(int x) => -4; - -// Check that an instance getter in an extension shadows top level -// members with the same basename. -extension E1 on A1 { - int get topLevelSetter => 1; - int get topLevelField => 2; - int get topLevelMethod => 3; - void test() { - // The instance getter shadows the global setter - topLevelSetter = topLevelSetter + 1; -// ^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'topLevelSetter'. - topLevelSetter++; -// ^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'topLevelSetter'. - topLevelSetter = 0; -// ^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'topLevelSetter'. - - // The instance getter shadows the global field setter - topLevelField = topLevelField + 1; -// ^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'topLevelField'. - topLevelField++; -// ^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'topLevelField'. - topLevelField = 0; -// ^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'topLevelField'. - - // The instance getter shadows the global method - topLevelMethod(4); -// ^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION -// ^ -// [cfe] The method 'call' isn't defined for the class 'int'. - } -} - -class A1 {} - -// Check that an instance setter in an extension shadows top level -// members with the same basename. -extension E2 on A2 { - void set topLevelGetter(int _) {} - void set topLevelField(int _) {} - void set topLevelMethod(int _) {} - void test() { - // The instance setter shadows the global getter - topLevelGetter = topLevelGetter + 1; -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'topLevelGetter'. - topLevelGetter++; -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'topLevelGetter'. - topLevelGetter; -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'topLevelGetter'. - topLevelGetter = 3; - - // The instance setter shadows the global field getter - topLevelField = topLevelField + 1; -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'topLevelField'. - topLevelField++; -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'topLevelField'. - topLevelField; -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'topLevelField'. - - // The instance setter shadows the global method - topLevelMethod(4); -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'topLevelMethod'. - } -} - -class A2 {} - -// Check that a static getter in an extension shadows top level -// members with the same basename. -extension E3 on A3 { - static int get topLevelSetter => 1; - static int get topLevelField => 2; - static int get topLevelMethod => 3; - void test() { - // The static getter shadows the global setter - topLevelSetter = topLevelSetter + 1; -// ^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'topLevelSetter'. - topLevelSetter++; -// ^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'topLevelSetter'. - topLevelSetter = 0; -// ^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'topLevelSetter'. - - // The static getter shadows the global field setter - topLevelField = topLevelField + 1; -// ^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'topLevelField'. - topLevelField++; -// ^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'topLevelField'. - topLevelField = 0; -// ^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'topLevelField'. - - // The static getter shadows the global method - topLevelMethod(4); -// ^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION -// ^ -// [cfe] The method 'call' isn't defined for the class 'int'. - } -} - -class A3 {} - -// Check that a static setter in an extension shadows top level -// members with the same basename. -extension E4 on A4 { - static void set topLevelGetter(int _) {} - static void set topLevelField(int _) {} - static void set topLevelMethod(int _) {} - void test() { - // The static setter shadows the global getter - topLevelGetter = topLevelGetter + 1; -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'topLevelGetter'. - topLevelGetter++; -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'topLevelGetter'. - topLevelGetter; -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'topLevelGetter'. - - // The static setter shadows the global field getter - topLevelField = topLevelField + 1; -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'topLevelField'. - topLevelField++; -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'topLevelField'. - topLevelField; -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'topLevelField'. - - // The static setter shadows the global method - topLevelMethod(4); -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'topLevelMethod'. - } -} - -class A4 {} - -// Define extensions on A6. -extension E5 on A6 { - void set extensionSetter(int _) {} - int extensionMethod(int x) => -3; -} - -// Check that an instance getter in an extension shadows extension -// members with the same basename from a different extension. -extension E6 on A6 { - int get extensionSetter => 1; - int get extensionMethod => 3; - void test() { - // The instance getter shadows the other extension's setter - extensionSetter = extensionSetter + 1; -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'extensionSetter'. - extensionSetter++; -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'extensionSetter'. - extensionSetter = 0; -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'extensionSetter'. - - // The instance getter shadows the other extensions method - extensionMethod(4); -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION -// ^ -// [cfe] The method 'call' isn't defined for the class 'int'. - } -} - -class A6 {} - -// Check that an instance getter in a class shadows extension -// members with the same basename from extension E5. -class A7 extends A6 { - int get extensionSetter => 1; - int get extensionMethod => 3; - void test() { - // The instance getter shadows the other extension's setter - extensionSetter = extensionSetter + 1; -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] The setter 'extensionSetter' isn't defined for the class 'A7'. - extensionSetter++; -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] The setter 'extensionSetter' isn't defined for the class 'A7'. - extensionSetter = 0; -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] The setter 'extensionSetter' isn't defined for the class 'A7'. - - // The instance getter shadows the other extensions method - extensionMethod(4); -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION -// ^ -// [cfe] 'extensionMethod' isn't a function or method and can't be invoked. - } -} - -// Define extensions on A8. -extension E7 on A8 { - int get extensionGetter => -1; - int extensionMethod(int x) => -3; -} - -// Check that an instance setter in an extension shadows extension -// members with the same basename from a different extension. -extension E8 on A8 { - void set extensionGetter(int _) {} - void set extensionMethod(int _) {} - void test() { - // The instance setter shadows the other extension's getter - extensionGetter = extensionGetter + 1; -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'extensionGetter'. - extensionGetter++; -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'extensionGetter'. - extensionGetter; -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'extensionGetter'. - - // The instance setter shadows the other extension's method. - extensionMethod(4); -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'extensionMethod'. - } -} - -class A8 {} - -// Check that an instance setter in a class shadows extension -// members with the same basename from extension E7. -class A9 extends A8 { - void set extensionGetter(int _) {} - void set extensionMethod(int _) {} - void test() { - // The instance setter shadows the other extension's getter - extensionGetter = extensionGetter + 1; -// ^^ -// [analyzer] unspecified -// [cfe] The getter 'extensionGetter' isn't defined for the class 'A9'. - extensionGetter++; -// ^^ -// [analyzer] unspecified -// [cfe] The getter 'extensionGetter' isn't defined for the class 'A9'. - extensionGetter; -// ^^ -// [analyzer] unspecified -// [cfe] The getter 'extensionGetter' isn't defined for the class 'A9'. - - // The instance setter shadows the other extension's method. - extensionMethod(4); -// ^^ -// [analyzer] unspecified -// [cfe] The method 'extensionMethod' isn't defined for the class 'A9'. - } -} - -// Define extensions on A10. -extension E9 on A10 { - void set extensionSetter(int _) {} - void set extensionFieldSetter(int _) {} - int extensionMethod(int x) => -3; -} - -// Check that a static getter in an extension shadows extension -// members with the same basename from a different extension. -extension E10 on A10 { - static int get extensionSetter => 1; - static final int extensionFieldSetter = 2; - static int get extensionMethod => 3; - void test() { - // The static getter shadows the other extension's setter - extensionSetter = extensionSetter + 1; -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'extensionSetter'. - extensionSetter++; -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'extensionSetter'. - extensionSetter = 0; -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'extensionSetter'. - - // The static field shadows the other extension's setter - extensionFieldSetter = extensionFieldSetter + 1; -// ^^ -// [analyzer] unspecified -// [cfe] Setter not found: 'extensionFieldSetter'. - extensionFieldSetter++; -// ^^ -// [analyzer] unspecified -// [cfe] Setter not found: 'extensionFieldSetter'. - extensionFieldSetter = 0; -// ^^ -// [analyzer] unspecified -// [cfe] Setter not found: 'extensionFieldSetter'. - - // The static getter shadows the other extensions method - extensionMethod(4); -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION -// ^ -// [cfe] The method 'call' isn't defined for the class 'int'. - } -} - -class A10 {} - -// Check that a static getter in a class shadows extension -// members with the same basename from extension E9. -class A11 extends A10 { - static int get extensionSetter => 1; - static final int extensionFieldSetter = 2; - static int get extensionMethod => 3; - void test() { - // The static getter shadows the other extension's setter - extensionSetter = extensionSetter + 1; -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'extensionSetter'. - extensionSetter++; -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'extensionSetter'. - extensionSetter = 0; -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'extensionSetter'. - - // The static field shadows the other extension's setter - extensionFieldSetter = extensionFieldSetter + 1; -// ^^ -// [analyzer] unspecified -// [cfe] Setter not found: 'extensionFieldSetter'. - extensionFieldSetter++; -// ^^ -// [analyzer] unspecified -// [cfe] Setter not found: 'extensionFieldSetter'. - extensionFieldSetter = 0; -// ^^ -// [analyzer] unspecified -// [cfe] Setter not found: 'extensionFieldSetter'. - - // The static getter shadows the other extensions method - extensionMethod(4); -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION -// ^ -// [cfe] The method 'call' isn't defined for the class 'int'. - } -} - -// Define extensions on A12. -extension E11 on A12 { - int get extensionGetter => -1; - int extensionMethod(int x) => -3; -} - -// Check that a static setter in an extension shadows extension -// members with the same basename from a different extension. -extension E12 on A12 { - static void set extensionGetter(int _) {} - static void set extensionMethod(int _) {} - void test() { - // The static setter shadows the other extension's getter - extensionGetter = extensionGetter + 1; -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'extensionGetter'. - extensionGetter++; -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'extensionGetter'. - extensionGetter; -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'extensionGetter'. - - // The static setter shadows the other extension's method. - extensionMethod(4); -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'extensionMethod'. - } -} - -class A12 {} - -// Check that a static setter in a class shadows extension -// members with the same basename from extension E11. -class A13 extends A12 { - static void set extensionGetter(int _) {} - static void set extensionMethod(int _) {} - void test() { - // The static setter shadows the other extension's getter - extensionGetter = extensionGetter + 1; -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'extensionGetter'. - extensionGetter++; -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'extensionGetter'. - extensionGetter; -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'extensionGetter'. - - // The static setter shadows the other extension's method. - extensionMethod(4); -// ^^ -// [analyzer] unspecified -// [cfe] Getter not found: 'extensionMethod'. - } -} - -void main() { - A1().test(); - A2().test(); - A3().test(); - A4().test(); - A6().test(); - A7().test(); - A8().test(); - A9().test(); - A10().test(); - A11().test(); - A12().test(); - A13().test(); -} diff --git a/tests/language_2/extension_methods/static_extension_internal_basename_shadowing_test.dart b/tests/language_2/extension_methods/static_extension_internal_basename_shadowing_test.dart deleted file mode 100644 index 4d749247545..00000000000 --- a/tests/language_2/extension_methods/static_extension_internal_basename_shadowing_test.dart +++ /dev/null @@ -1,276 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -/////////////////////////////////////////////////////////////////////// -// The following tests check that setters or getters in an extension -// correctly shadow members with the same basename in the surrounding -// scope. -/////////////////////////////////////////////////////////////////////// - -String get topLevelGetter => "-1"; -void set topLevelSetter(String _) {} -String topLevelField = "-3"; -String topLevelMethod(String x) => "-4"; - -// Location that extension setters write to. -int _storeTo = null; -// Check that the most recent setter call set the value -// of _storeTo. -void checkSetter(int x) { - int written = _storeTo; - _storeTo = null; - Expect.equals(written, x); -} - -// Check that an instance getter in an extension shadows top level -// members with the same basename. -extension E1 on A1 { - int get topLevelSetter => 1; - int get topLevelField => 2; - int get topLevelMethod => 3; - void test() { - // Reading the local getters is valid - Expect.equals(topLevelSetter + 1, 2); - Expect.equals(topLevelField + 1, 3); - Expect.equals(topLevelMethod + 1, 4); - } -} - -class A1 {} - -// Check that an instance setter in an extension shadows top level -// members with the same basename. -extension E2 on A2 { - void set topLevelGetter(int x) { - _storeTo = x; - } - - void set topLevelField(int x) { - _storeTo = x; - } - - void set topLevelMethod(int x) { - _storeTo = x; - } - - void test() { - checkSetter(topLevelGetter = 42); - checkSetter(topLevelField = 42); - checkSetter(topLevelMethod = 42); - } -} - -class A2 {} - -// Check that a static getter in an extension shadows top level -// members with the same basename. -extension E3 on A3 { - static int get topLevelSetter => 1; - static int get topLevelField => 2; - static int get topLevelMethod => 3; - void test() { - // Reading the local getters is valid - Expect.equals(topLevelSetter + 1, 2); - Expect.equals(topLevelField + 1, 3); - Expect.equals(topLevelMethod + 1, 4); - } -} - -class A3 {} - -// Check that a static setter in an extension shadows top level -// members with the same basename. -extension E4 on A4 { - static void set topLevelGetter(int x) { - _storeTo = x; - } - - static void set topLevelField(int x) { - _storeTo = x; - } - - static void set topLevelMethod(int x) { - _storeTo = x; - } - - void test() { - checkSetter(topLevelGetter = 42); - checkSetter(topLevelField = 42); - checkSetter(topLevelMethod = 42); - } -} - -class A4 {} - -// Define extensions on A6. -extension E5 on A6 { - void set extensionSetter(int x) {} - int extensionMethod(int x) => -3; -} - -// Check that an instance getter in an extension shadows extension -// members with the same basename from a different extension. -extension E6 on A6 { - int get extensionSetter => 1; - int get extensionMethod => 3; - void test() { - // Reading the local getters is valid - Expect.equals(extensionSetter + 1, 2); - Expect.equals(extensionMethod + 1, 4); - } -} - -class A6 {} - -// Check that an instance getter in a class shadows extension -// members with the same basename from extension E5. -class A7 extends A6 { - int get extensionSetter => 1; - int get extensionMethod => 3; - void test() { - // Reading the local getters is valid - Expect.equals(extensionSetter + 1, 2); - Expect.equals(extensionMethod + 1, 4); - } -} - -// Define extensions on A8. -extension E7 on A8 { - int get extensionGetter => -1; - int extensionMethod(int x) => -3; -} - -// Check that an instance setter in an extension shadows extension -// members with the same basename from a different extension. -extension E8 on A8 { - void set extensionGetter(int x) { - _storeTo = x; - } - - void set extensionMethod(int x) { - _storeTo = x; - } - - void test() { - checkSetter(extensionGetter = 42); - checkSetter(extensionMethod = 42); - } -} - -class A8 {} - -// Check that an instance setter in a class shadows extension -// members with the same basename from extension E7. -class A9 extends A8 { - void set extensionGetter(int x) { - _storeTo = x; - } - - void set extensionMethod(int x) { - _storeTo = x; - } - - void test() { - checkSetter(extensionGetter = 42); - checkSetter(extensionMethod = 42); - } -} - -// Define extensions on A10. -extension E9 on A10 { - void set extensionSetter(int x) {} - void set extensionFieldSetter(int x) {} - int extensionMethod(int x) => -3; -} - -// Check that a static getter in an extension shadows extension -// members with the same basename from a different extension. -extension E10 on A10 { - static int get extensionSetter => 1; - static final int extensionFieldSetter = 2; - static int get extensionMethod => 3; - void test() { - // Reading the local getters is valid - Expect.equals(extensionSetter + 1, 2); - Expect.equals(extensionFieldSetter + 1, 3); - Expect.equals(extensionMethod + 1, 4); - } -} - -class A10 {} - -// Check that a static getter in a class shadows extension -// members with the same basename from extension E9. -class A11 extends A10 { - static int get extensionSetter => 1; - static final int extensionFieldSetter = 2; - static int get extensionMethod => 3; - void test() { - // Reading the local getters is valid - Expect.equals(extensionSetter + 1, 2); - Expect.equals(extensionFieldSetter + 1, 3); - Expect.equals(extensionMethod + 1, 4); - } -} - -// Define extensions on A12. -extension E11 on A12 { - int get extensionGetter => -1; - int extensionMethod(int x) => -3; -} - -// Check that a static setter in an extension shadows extension -// members with the same basename from a different extension. -extension E12 on A12 { - static void set extensionGetter(int x) { - _storeTo = x; - } - - static void set extensionMethod(int x) { - _storeTo = x; - } - - void test() { - checkSetter(extensionGetter = 42); - checkSetter(extensionMethod = 42); - } -} - -class A12 {} - -// Check that a static setter in a class shadows extension -// members with the same basename from extension E11. -class A13 extends A12 { - static void set extensionGetter(int x) { - _storeTo = x; - } - - static void set extensionMethod(int x) { - _storeTo = x; - } - - void test() { - checkSetter(extensionGetter = 42); - checkSetter(extensionMethod = 42); - } -} - -void main() { - A1().test(); - A2().test(); - A3().test(); - A4().test(); - A6().test(); - A7().test(); - A8().test(); - A9().test(); - A10().test(); - A11().test(); - A12().test(); - A13().test(); -} diff --git a/tests/language_2/extension_methods/static_extension_internal_name_conflict_error_test.dart b/tests/language_2/extension_methods/static_extension_internal_name_conflict_error_test.dart deleted file mode 100644 index 59776bd8ef2..00000000000 --- a/tests/language_2/extension_methods/static_extension_internal_name_conflict_error_test.dart +++ /dev/null @@ -1,267 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests that errors are given for internal name conflicts in extension methods. - -// It is an error to have duplicate type parameter names. -extension E1 on int { -// ^ -// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION -// [cfe] A type variable can't have the same name as another. -} - -extension E2 on int {} - -// It is an error to have duplicate extension names. -extension E2 on int {} -// ^^ -// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION -// [cfe] 'E2' is already declared in this scope. - -class E2 {} -// ^^ -// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION -// [cfe] 'E2' is already declared in this scope. - -typedef E2 = int Function(int); -// ^^ -// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION -// [cfe] 'E2' is already declared in this scope. - -void E2(int x) {} -// ^^ -// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION -// [cfe] 'E2' is already declared in this scope. - -int E2 = 3; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION -// [cfe] 'E2' is already declared in this scope. - -//////////////////////////////////////////////////////////////////// -// It is an error to have two static members with the same base name -// unless one is a setter and one is a getter. -// -// The next set of tests check various combinations of member name -// conflicts: first testing that members of the same kind (e.g. -// method/method) induce conflicts for the various combinations of -// static/instance; and then testing that members of different kind (e.g. -// method/getter) induce conflicts for the various combinations of -// static/instance. -//////////////////////////////////////////////////////////////////// - -// Check static members colliding with static members (of the same kind) -extension E3 on int { - static int method() => 0; - static int get property => 1; - static void set property(int value) {} - static int field = 3; - static int field2 = 4; - // ^ - // [cfe] Conflicts with setter 'field2'. - - static int method() => 0; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'method' is already declared in this scope. - static int get property => 1; - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'property' is already declared in this scope. - static void set property(int value) {} - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'property' is already declared in this scope. - static int field = 3; - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'field' is already declared in this scope. - static int get field2 => 1; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'field2' is already declared in this scope. - static void set field2(int value) {} - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] Conflicts with the implicit setter of the field 'field2'. -} - -// Check instance members colliding with instance members (of the same kind). -extension E4 on int { - int method() => 0; - int get property => 1; - void set property(int value) {} - - int method() => 0; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'method' is already declared in this scope. - int get property => 1; - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'property' is already declared in this scope. - void set property(int value) {} - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'property' is already declared in this scope. -} - -// Check static members colliding with static members (of the same kind). -extension E5 on int { - static int method() => 0; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE - static int get property => 1; - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Conflicts with setter 'property'. - static void set property(int value) {} - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Conflicts with member 'property'. - static int get property2 => 1; - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Conflicts with setter 'property2'. - static void set property3(int x) {} - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Conflicts with member 'property3'. - static int field = 3; - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Conflicts with setter 'field'. - static int field2 = 3; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE - - int method() => 0; - // ^ - // [cfe] 'method' is already declared in this scope. - int get property => 1; - // ^ - // [cfe] 'property' is already declared in this scope. - // ^ - // [cfe] Conflicts with setter 'property'. - void set property(int value) {} - // ^ - // [cfe] 'property' is already declared in this scope. - // ^ - // [cfe] Conflicts with member 'property'. - void set property2(int value) {} - // ^ - // [cfe] Conflicts with member 'property2'. - int get property3 => 1; - // ^ - // [cfe] Conflicts with setter 'property3'. - void set field(int value) {} - // ^ - // [cfe] Conflicts with the implicit setter of the field 'field'. - int get field2 => 1; - // ^ - // [cfe] 'field2' is already declared in this scope. -} - -// Check a static method colliding with a static getter. -extension E6 on int { - static int method() => 0; - static int get method => 1; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'method' is already declared in this scope. -} - -// Check a static method colliding with a static setter. -extension E7 on int { - static int method() => 0; - // ^ - // [cfe] Conflicts with setter 'method'. - static void set method(int value) {} - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] Conflicts with member 'method'. -} - -// Check a static method colliding with a static field. -extension E8 on int { - static int method() => 0; - static int method = 3; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'method' is already declared in this scope. -} - -// Check an instance method colliding with an instance getter. -extension E9 on int { - int method() => 0; - int get method => 1; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'method' is already declared in this scope. -} - -// Check an instance method colliding with an instance setter. -extension E10 on int { - int method() => 0; - // ^ - // [cfe] Conflicts with setter 'method'. - void set method(int value) {} - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] Conflicts with member 'method'. -} - -// Check a static method colliding with an instance getter. -extension E11 on int { - static int method() => 0; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE - int get method => 1; - // ^ - // [cfe] 'method' is already declared in this scope. -} - -// Check a static method colliding with an instance setter. -extension E12 on int { - static int method() => 0; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Conflicts with setter 'method'. - void set method(int value) {} - // ^ - // [cfe] Conflicts with member 'method'. -} - -// Check an instance method colliding with a static getter. -extension E13 on int { - int method() => 0; - static int get method => 1; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE - // [cfe] 'method' is already declared in this scope. -} - -// Check an instance method colliding with a static setter. -extension E14 on int { - int method() => 0; - // ^ - // [cfe] Conflicts with setter 'method'. - static void set method(int value) {} - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Conflicts with member 'method'. -} - -// Check an instance method colliding with a static field. -extension E15 on int { - int method() => 0; - static int method = 3; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE - // [cfe] 'method' is already declared in this scope. -} - -void main() {} diff --git a/tests/language_2/extension_methods/static_extension_internal_resolution_0_test.dart b/tests/language_2/extension_methods/static_extension_internal_resolution_0_test.dart deleted file mode 100644 index 5bcf11a8187..00000000000 --- a/tests/language_2/extension_methods/static_extension_internal_resolution_0_test.dart +++ /dev/null @@ -1,208 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests resolution of identifiers inside of extension methods - -// Test an extension MyExt with no members against: -// - a class A with only its own members -// - and another extension ExtraExt with only its own members - -import "package:expect/expect.dart"; - -///////////////////////////////////////////////////////////////////////// -// Note: These imports may be deliberately unused. They bring certain -// names into scope, in order to test that certain resolution choices are -// made even in the presence of other symbols. -///////////////////////////////////////////////////////////////////////// - -// Do Not Delete. -// Bring global members into scope. -import "helpers/global_scope.dart"; - -// Do Not Delete. -// Bring a class A with instance members into scope. -import "helpers/class_no_shadow.dart"; - -// Do Not Delete. -// Bring an extension ExtraExt with no overlapping symbols into scope. -import "helpers/extension_only.dart"; - -const bool extensionValue = true; - -// An extension which defines no members of its own -extension MyExt on A { - void testNakedIdentifiers() { - // Globals should resolve to the global name space, and not to the members - // of the other extension (when present) - { - int t0 = fieldInGlobalScope; - checkGlobalValue(t0); - int t1 = getterInGlobalScope; - checkGlobalValue(t1); - setterInGlobalScope = globalValue; - int t2 = methodInGlobalScope(); - checkGlobalValue(t2); - } - - // Instance members resolve to the instance methods and not the members - // of the other extension (when present) - { - String t0 = fieldInInstanceScope; - checkInstanceValue(t0); - String t1 = getterInInstanceScope; - checkInstanceValue(t0); - setterInInstanceScope = instanceValue; - String t2 = methodInInstanceScope(); - checkInstanceValue(t0); - } - - // Extension members resolve to the extension methods in the other - // extension (unresolved identifier "id" gets turned into "this.id", - // which is then subject to extension method lookup). - { - double t0 = fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - setterInOtherExtensionScope = otherExtensionValue; - double t2 = methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } - } - - void testIdentifiersOnThis() { - // Instance members resolve to the instance methods and not the members - // of the other extension (when present) - { - String t0 = this.fieldInInstanceScope; - checkInstanceValue(t0); - String t1 = this.getterInInstanceScope; - checkInstanceValue(t0); - this.setterInInstanceScope = instanceValue; - String t2 = this.methodInInstanceScope(); - checkInstanceValue(t0); - } - - // Extension members resolve to the extension methods in the other - // extension. - { - double t0 = this.fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = this.getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - this.setterInOtherExtensionScope = otherExtensionValue; - double t2 = this.methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } - } - - void testIdentifiersOnInstance() { - A self = this; - - // Instance members resolve to the instance methods and not the members - // of the other extension (when present) - { - String t0 = self.fieldInInstanceScope; - checkInstanceValue(t0); - String t1 = self.getterInInstanceScope; - checkInstanceValue(t1); - self.setterInInstanceScope = instanceValue; - String t2 = self.methodInInstanceScope(); - checkInstanceValue(t2); - } - - // Extension members resolve to the extension methods in the other - // extension. - { - double t0 = self.fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = self.getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - self.setterInOtherExtensionScope = otherExtensionValue; - double t2 = self.methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } - } - - void instanceTest() { - MyExt(this).testNakedIdentifiers(); - MyExt(this).testIdentifiersOnThis(); - MyExt(this).testIdentifiersOnInstance(); - } -} - -class B extends A { - void testNakedIdentifiers() { - // Globals should resolve to the global name space, and not to the members - // of the other extension (when present) - { - int t0 = fieldInGlobalScope; - checkGlobalValue(t0); - int t1 = getterInGlobalScope; - checkGlobalValue(t1); - setterInGlobalScope = globalValue; - int t2 = methodInGlobalScope(); - checkGlobalValue(t2); - } - - // Instance members resolve to the instance methods and not the members - // of the other extension (when present) - { - String t0 = fieldInInstanceScope; - checkInstanceValue(t0); - String t1 = getterInInstanceScope; - checkInstanceValue(t0); - setterInInstanceScope = instanceValue; - String t2 = methodInInstanceScope(); - checkInstanceValue(t0); - } - - // Extension members resolve to the extension methods in the other - // extension (unresolved identifier "id" gets turned into "this.id", - // which is then subject to extension method lookup). - { - double t0 = fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - setterInOtherExtensionScope = otherExtensionValue; - double t2 = methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } - } -} - -void main() { - var a = new A(); - a.instanceTest(); - new B().testNakedIdentifiers(); - - // Check external resolution as well while we're here - - // Instance members resolve to the instance methods and not the members - // of the other extension (when present) - { - String t0 = a.fieldInInstanceScope; - checkInstanceValue(t0); - String t1 = a.getterInInstanceScope; - checkInstanceValue(t1); - a.setterInInstanceScope = instanceValue; - String t2 = a.methodInInstanceScope(); - checkInstanceValue(t2); - } - - // Extension members resolve to the extension methods in the other - // extension. - { - double t0 = a.fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = a.getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - a.setterInOtherExtensionScope = otherExtensionValue; - double t2 = a.methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } -} diff --git a/tests/language_2/extension_methods/static_extension_internal_resolution_1_test.dart b/tests/language_2/extension_methods/static_extension_internal_resolution_1_test.dart deleted file mode 100644 index 9035ae3764a..00000000000 --- a/tests/language_2/extension_methods/static_extension_internal_resolution_1_test.dart +++ /dev/null @@ -1,244 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests resolution of identifiers inside of extension methods - -// Test an extension MyExt with no members against: -// - a class A with only its own members -// - and an extension ExtraExt which overlaps the global and class members - -import "package:expect/expect.dart"; - -///////////////////////////////////////////////////////////////////////// -// Note: These imports may be deliberately unused. They bring certain -// names into scope, in order to test that certain resolution choices are -// made even in the presence of other symbols. -///////////////////////////////////////////////////////////////////////// - -// Do Not Delete. -// Bring global members into scope. -import "helpers/global_scope.dart"; - -// Do Not Delete. -// Bring a class A with instance members into scope. -import "helpers/class_no_shadow.dart"; - -// Do Not Delete. -// Bring an extension ExtraExt that overlaps the global and instance names -// into scope. -import "helpers/extension_global_instance.dart"; - -const bool extensionValue = true; - -// An extension which defines no members of its own -extension MyExt on A { - void testNakedIdentifiers() { - // Globals should resolve to the global name space, and not to the members - // of the other extension (when present) - { - int t0 = fieldInGlobalScope; - checkGlobalValue(t0); - int t1 = getterInGlobalScope; - checkGlobalValue(t1); - setterInGlobalScope = globalValue; - int t2 = methodInGlobalScope(); - checkGlobalValue(t2); - } - - // Instance members resolve to the instance methods and not the members - // of the other extension (when present) - { - String t0 = fieldInInstanceScope; - checkInstanceValue(t0); - String t1 = getterInInstanceScope; - checkInstanceValue(t0); - setterInInstanceScope = instanceValue; - String t2 = methodInInstanceScope(); - checkInstanceValue(t0); - } - - // Extension members resolve to the extension methods in the other - // extension (unresolved identifier "id" gets turned into "this.id", - // which is then subject to extension method lookup). - { - double t0 = fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - setterInOtherExtensionScope = otherExtensionValue; - double t2 = methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } - } - - void testIdentifiersOnThis() { - // Global symbols prefixed by `this` resolve to the version on the other - // extension - { - double t0 = this.fieldInGlobalScope; - checkOtherExtensionValue(t0); - double t1 = this.getterInGlobalScope; - checkOtherExtensionValue(t1); - this.setterInGlobalScope = otherExtensionValue; - double t2 = this.methodInGlobalScope(); - checkOtherExtensionValue(t2); - } - - // Instance members resolve to the instance methods and not the members - // of the other extension (when present) - { - String t0 = this.fieldInInstanceScope; - checkInstanceValue(t0); - String t1 = this.getterInInstanceScope; - checkInstanceValue(t0); - this.setterInInstanceScope = instanceValue; - String t2 = this.methodInInstanceScope(); - checkInstanceValue(t0); - } - - // Extension members resolve to the extension methods in the other - // extension. - { - double t0 = this.fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = this.getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - this.setterInOtherExtensionScope = otherExtensionValue; - double t2 = this.methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } - } - - void testIdentifiersOnInstance() { - A self = this; - - // Global symbols on an instance resolve to the version on the other - // extension - { - double t0 = self.fieldInGlobalScope; - checkOtherExtensionValue(t0); - double t1 = self.getterInGlobalScope; - checkOtherExtensionValue(t1); - self.setterInGlobalScope = otherExtensionValue; - double t2 = self.methodInGlobalScope(); - checkOtherExtensionValue(t2); - } - // Instance members resolve to the instance methods and not the members - // of the other extension (when present) - { - String t0 = self.fieldInInstanceScope; - checkInstanceValue(t0); - String t1 = self.getterInInstanceScope; - checkInstanceValue(t1); - self.setterInInstanceScope = instanceValue; - String t2 = self.methodInInstanceScope(); - checkInstanceValue(t2); - } - - // Extension members resolve to the extension methods in the other - // extension. - { - double t0 = self.fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = self.getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - self.setterInOtherExtensionScope = otherExtensionValue; - double t2 = self.methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } - } - - void instanceTest() { - MyExt(this).testNakedIdentifiers(); - MyExt(this).testIdentifiersOnThis(); - MyExt(this).testIdentifiersOnInstance(); - } -} - -class B extends A { - void testNakedIdentifiers() { - // Globals should resolve to the global name space, and not to the members - // of the other extension (when present) - { - int t0 = fieldInGlobalScope; - checkGlobalValue(t0); - int t1 = getterInGlobalScope; - checkGlobalValue(t1); - setterInGlobalScope = globalValue; - int t2 = methodInGlobalScope(); - checkGlobalValue(t2); - } - - // Instance members resolve to the instance methods and not the members - // of the other extension (when present) - { - String t0 = fieldInInstanceScope; - checkInstanceValue(t0); - String t1 = getterInInstanceScope; - checkInstanceValue(t0); - setterInInstanceScope = instanceValue; - String t2 = methodInInstanceScope(); - checkInstanceValue(t0); - } - - // Extension members resolve to the extension methods in the other - // extension (unresolved identifier "id" gets turned into "this.id", - // which is then subject to extension method lookup). - { - double t0 = fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - setterInOtherExtensionScope = otherExtensionValue; - double t2 = methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } - } -} - -void main() { - var a = new A(); - a.instanceTest(); - new B().testNakedIdentifiers(); - - // Check external resolution as well while we're here - - // Global symbols on an instance resolve to the version on the other - // extension - { - double t0 = a.fieldInGlobalScope; - checkOtherExtensionValue(t0); - double t1 = a.getterInGlobalScope; - checkOtherExtensionValue(t1); - a.setterInGlobalScope = otherExtensionValue; - double t2 = a.methodInGlobalScope(); - checkOtherExtensionValue(t2); - } - - // Instance members resolve to the instance methods and not the members - // of the other extension (when present) - { - String t0 = a.fieldInInstanceScope; - checkInstanceValue(t0); - String t1 = a.getterInInstanceScope; - checkInstanceValue(t1); - a.setterInInstanceScope = instanceValue; - String t2 = a.methodInInstanceScope(); - checkInstanceValue(t2); - } - - // Extension members resolve to the extension methods in the other - // extension. - { - double t0 = a.fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = a.getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - a.setterInOtherExtensionScope = otherExtensionValue; - double t2 = a.methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } -} diff --git a/tests/language_2/extension_methods/static_extension_internal_resolution_2_test.dart b/tests/language_2/extension_methods/static_extension_internal_resolution_2_test.dart deleted file mode 100644 index 2276f391e18..00000000000 --- a/tests/language_2/extension_methods/static_extension_internal_resolution_2_test.dart +++ /dev/null @@ -1,325 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests resolution of identifiers inside of extension methods - -// Test an extension MyExt with members whose names overlap with names from the -// global, and instance scopes: -// - a class A with only its own members -// - an extension ExtraExt which has only its own members - -import "package:expect/expect.dart"; - -///////////////////////////////////////////////////////////////////////// -// Note: These imports may be deliberately unused. They bring certain -// names into scope, in order to test that certain resolution choices are -// made even in the presence of other symbols. -///////////////////////////////////////////////////////////////////////// - -// Do Not Delete. -// Bring global members into scope. -import "helpers/global_scope.dart"; - -// Do Not Delete. -// Bring a class A with instance members into scope. -import "helpers/class_no_shadow.dart"; - -// Do Not Delete. -// Bring an extension ExtraExt with no overlapping symbols into scope. -import "helpers/extension_only.dart"; - -const bool extensionValue = true; - -void checkExtensionValue(bool x) { - Expect.equals(x, extensionValue); -} - -// An extension which defines all members -extension MyExt on A { - bool get fieldInGlobalScope => true; - bool get getterInGlobalScope => true; - set setterInGlobalScope(bool x) { - Expect.equals(true, x); - } - - bool methodInGlobalScope() => true; - - bool get fieldInInstanceScope => true; - bool get getterInInstanceScope => true; - set setterInInstanceScope(bool x) { - Expect.equals(true, x); - } - - bool methodInInstanceScope() => true; - - bool get fieldInExtensionScope => true; - bool get getterInExtensionScope => true; - set setterInExtensionScope(bool x) { - Expect.equals(true, x); - } - - bool methodInExtensionScope() => true; - - void testNakedIdentifiers() { - // Globals should resolve to local extension versions - { - bool t0 = fieldInGlobalScope; - checkExtensionValue(t0); - bool t1 = getterInGlobalScope; - checkExtensionValue(t1); - setterInGlobalScope = extensionValue; - bool t2 = methodInGlobalScope(); - checkExtensionValue(t2); - } - - // Un-prefixed instance members resolve to the local extension versions - { - bool t0 = fieldInInstanceScope; - checkExtensionValue(t0); - bool t1 = getterInInstanceScope; - checkExtensionValue(t0); - setterInInstanceScope = extensionValue; - bool t2 = methodInInstanceScope(); - checkExtensionValue(t0); - } - - // Extension members resolve to the extension methods in this extension - { - bool t0 = fieldInExtensionScope; - checkExtensionValue(t0); - bool t1 = getterInExtensionScope; - checkExtensionValue(t1); - setterInExtensionScope = extensionValue; - bool t2 = methodInExtensionScope(); - checkExtensionValue(t2); - } - - // Extension members not on this extension resolve to the extension methods - // in the other extension (unresolved identifier "id" gets turned into - // "this.id", which is then subject to extension method lookup). - { - double t0 = fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - setterInOtherExtensionScope = otherExtensionValue; - double t2 = methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } - } - - void testIdentifiersOnThis() { - // Globals should resolve to local extension versions - { - bool t0 = this.fieldInGlobalScope; - checkExtensionValue(t0); - bool t1 = this.getterInGlobalScope; - checkExtensionValue(t1); - this.setterInGlobalScope = extensionValue; - bool t2 = this.methodInGlobalScope(); - checkExtensionValue(t2); - } - - // Instance members resolve to the instance methods and not the members - // of the extension - { - String t0 = this.fieldInInstanceScope; - checkInstanceValue(t0); - String t1 = this.getterInInstanceScope; - checkInstanceValue(t0); - this.setterInInstanceScope = instanceValue; - String t2 = this.methodInInstanceScope(); - checkInstanceValue(t0); - } - - // Extension members resolve to the extension methods on this extension - { - bool t0 = this.fieldInExtensionScope; - checkExtensionValue(t0); - bool t1 = this.getterInExtensionScope; - checkExtensionValue(t1); - this.setterInExtensionScope = extensionValue; - bool t2 = this.methodInExtensionScope(); - checkExtensionValue(t2); - } - - // Extension members not on this extension resolve to the extension methods - // in the other extension. - { - double t0 = this.fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = this.getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - this.setterInOtherExtensionScope = otherExtensionValue; - double t2 = this.methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } - } - - void testIdentifiersOnInstance() { - A self = this; - - // Globals should resolve to local extension versions - { - bool t0 = self.fieldInGlobalScope; - checkExtensionValue(t0); - bool t1 = self.getterInGlobalScope; - checkExtensionValue(t1); - self.setterInGlobalScope = extensionValue; - bool t2 = self.methodInGlobalScope(); - checkExtensionValue(t2); - } - - // Instance members resolve to the instance methods and not the members - // of the extension - { - String t0 = self.fieldInInstanceScope; - checkInstanceValue(t0); - String t1 = self.getterInInstanceScope; - checkInstanceValue(t0); - self.setterInInstanceScope = instanceValue; - String t2 = self.methodInInstanceScope(); - checkInstanceValue(t0); - } - - // Extension members resolve to the extension methods on this extension - { - bool t0 = self.fieldInExtensionScope; - checkExtensionValue(t0); - bool t1 = self.getterInExtensionScope; - checkExtensionValue(t1); - self.setterInExtensionScope = extensionValue; - bool t2 = self.methodInExtensionScope(); - checkExtensionValue(t2); - } - - // Extension members not on this extension resolve to the extension methods - // in the other extension. - { - double t0 = self.fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = self.getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - self.setterInOtherExtensionScope = otherExtensionValue; - double t2 = self.methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } - } - - void instanceTest() { - MyExt(this).testNakedIdentifiers(); - MyExt(this).testIdentifiersOnThis(); - MyExt(this).testIdentifiersOnInstance(); - } -} - -class B extends A { - void testNakedIdentifiers() { - // Globals should resolve to the global name space, and not to the members - // of the other extension (when present) - { - int t0 = fieldInGlobalScope; - checkGlobalValue(t0); - int t1 = getterInGlobalScope; - checkGlobalValue(t1); - setterInGlobalScope = globalValue; - int t2 = methodInGlobalScope(); - checkGlobalValue(t2); - } - - // Instance members resolve to the instance methods and not the members - // of the other extension (when present) - { - String t0 = fieldInInstanceScope; - checkInstanceValue(t0); - String t1 = getterInInstanceScope; - checkInstanceValue(t0); - setterInInstanceScope = instanceValue; - String t2 = methodInInstanceScope(); - checkInstanceValue(t0); - } - - // Extension members defined only in this extension resolve correctly. - { - bool t0 = fieldInExtensionScope; - checkExtensionValue(t0); - bool t1 = getterInExtensionScope; - checkExtensionValue(t1); - setterInExtensionScope = extensionValue; - bool t2 = methodInExtensionScope(); - checkExtensionValue(t2); - } - - // Extension members defined in the external extension resolve correctly - // (an unresolved identifier "id" gets turned into "this.id", - // which is then subject to extension method lookup). - { - double t0 = fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - setterInOtherExtensionScope = otherExtensionValue; - double t2 = methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } - } -} - -void main() { - var a = new A(); - a.instanceTest(); - new B().testNakedIdentifiers(); - - // Check external resolution as well while we're here - - // Global symbols on an instance resolve to the version on this - // extension - { - bool t0 = a.fieldInGlobalScope; - checkExtensionValue(t0); - bool t1 = a.getterInGlobalScope; - checkExtensionValue(t1); - a.setterInGlobalScope = extensionValue; - bool t2 = a.methodInGlobalScope(); - checkExtensionValue(t2); - } - - // Instance members resolve to the instance methods and not the members - // of the other extension (when present) - { - String t0 = a.fieldInInstanceScope; - checkInstanceValue(t0); - String t1 = a.getterInInstanceScope; - checkInstanceValue(t1); - a.setterInInstanceScope = instanceValue; - String t2 = a.methodInInstanceScope(); - checkInstanceValue(t2); - } - - // Extension members resolve to the extension methods in this - // extension. - { - bool t0 = a.fieldInExtensionScope; - checkExtensionValue(t0); - bool t1 = a.getterInExtensionScope; - checkExtensionValue(t1); - a.setterInExtensionScope = extensionValue; - bool t2 = a.methodInExtensionScope(); - checkExtensionValue(t2); - } - - // Extension members resolve to the extension methods in the other - // extension. - { - double t0 = a.fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = a.getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - a.setterInOtherExtensionScope = otherExtensionValue; - double t2 = a.methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } -} diff --git a/tests/language_2/extension_methods/static_extension_internal_resolution_3_error_test.dart b/tests/language_2/extension_methods/static_extension_internal_resolution_3_error_test.dart deleted file mode 100644 index f5de7e0559d..00000000000 --- a/tests/language_2/extension_methods/static_extension_internal_resolution_3_error_test.dart +++ /dev/null @@ -1,262 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests resolution of identifiers inside of extension methods - -// Test the error cases for an extension MyExt with member names -// overlapping the global and instance scopes against: -// - a class A with only its own members -// - an extension ExtraExt which has global and instance members as well as -// its own - -import "package:expect/expect.dart"; - -///////////////////////////////////////////////////////////////////////// -// Note: These imports may be deliberately unused. They bring certain -// names into scope, in order to test that certain resolution choices are -// made even in the presence of other symbols. -///////////////////////////////////////////////////////////////////////// - -// Do Not Delete. -// Bring global members into scope. -import "helpers/global_scope.dart"; - -// Do Not Delete. -// Bring a class A with instance members into scope. -import "helpers/class_no_shadow.dart"; - -// Do Not Delete. -// Bring an extension ExtraExt with members that overlap the global and instance -// names into scope. -import "helpers/extension_global_instance.dart"; - -const bool extensionValue = true; - -void checkExtensionValue(bool x) { - Expect.equals(x, extensionValue); -} - -// An extension which defines members of its own, as well members overlapping -// the instance and global names. -extension MyExt on A { - bool get fieldInGlobalScope => extensionValue; - bool get getterInGlobalScope => extensionValue; - set setterInGlobalScope(bool x) { - checkExtensionValue(x); - } - - bool methodInGlobalScope() => extensionValue; - - bool get fieldInInstanceScope => extensionValue; - bool get getterInInstanceScope => extensionValue; - set setterInInstanceScope(bool x) { - checkExtensionValue(x); - } - - bool methodInInstanceScope() => extensionValue; - - bool get fieldInExtensionScope => extensionValue; - bool get getterInExtensionScope => extensionValue; - set setterInExtensionScope(bool x) { - checkExtensionValue(x); - } - - bool methodInExtensionScope() => extensionValue; - - void testNakedIdentifiers() { - // Globals should resolve to local extension versions - { - // No errors: see static_extension_internal_resolution_3_test.dart - } - - // Un-prefixed instance members resolve to the local extension versions - { - // No errors: see static_extension_internal_resolution_3_test.dart - } - - // Extension members resolve to the extension methods in this extension - { - // No errors: see static_extension_internal_resolution_3_test.dart - } - - // Extension members not on this extension resolve to the extension methods - // in the other extension (unresolved identifier "id" gets turned into - // "this.id", which is then subject to extension method lookup). - { - // No errors: see static_extension_internal_resolution_3_test.dart - } - } - - void testIdentifiersOnThis() { - // Prefixed globals are ambiguous - { - bool t0 = this.fieldInGlobalScope; - // ^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'fieldInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t0); - bool t1 = this.getterInGlobalScope; - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'getterInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t1); - this.setterInGlobalScope = extensionValue; - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'setterInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - bool t2 = this.methodInGlobalScope(); - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The method 'methodInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t2); - } - - // Instance members resolve to the instance methods and not the members - // of either extension - { - // No errors: see static_extension_internal_resolution_3_test.dart - } - - // Extension members resolve to the extension methods on this extension - { - // No errors: see static_extension_internal_resolution_3_test.dart - } - - // Extension members not on this extension resolve to the extension methods - // in the other extension. - { - // No errors: see static_extension_internal_resolution_3_test.dart - } - } - - void testIdentifiersOnInstance() { - A self = this; - - // Prefixed globals are ambiguous - { - bool t0 = self.fieldInGlobalScope; - // ^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'fieldInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t0); - bool t1 = self.getterInGlobalScope; - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'getterInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t1); - self.setterInGlobalScope = extensionValue; - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'setterInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - bool t2 = self.methodInGlobalScope(); - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The method 'methodInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t2); - } - - // Instance members resolve to the instance methods and not the members - // of the extension - { - // No errors: see static_extension_internal_resolution_3_test.dart - } - - // Extension members resolve to the extension methods on this extension - { - // No errors: see static_extension_internal_resolution_3_test.dart - } - - // Extension members not on this extension resolve to the extension methods - // in the other extension. - { - // No errors: see static_extension_internal_resolution_3_test.dart - } - } - - void instanceTest() { - MyExt(this).testNakedIdentifiers(); - MyExt(this).testIdentifiersOnThis(); - MyExt(this).testIdentifiersOnInstance(); - } -} - -class B extends A { - void testNakedIdentifiers() { - // Globals should resolve to the global name space, and not to the members - // of either extension - { - // No errors: see static_extension_internal_resolution_3_test.dart - } - - // Instance members resolve to the instance methods and not the members - // of the other extension (when present) - { - // No errors: see static_extension_internal_resolution_3_test.dart - } - - // Extension members resolve to the extension methods in the local - // extension. - { - // No errors: see static_extension_internal_resolution_3_test.dart - } - - // Extension members resolve to the extension methods in the other - // extension (unresolved identifier "id" gets turned into "this.id", - // which is then subject to extension method lookup). - { - // No errors: see static_extension_internal_resolution_3_test.dart - } - } -} - -void main() { - var a = new A(); - a.instanceTest(); - new B().testNakedIdentifiers(); - - // Check external resolution as well while we're here - - // Global names come from both extensions and hence are ambiguous. - { - bool t0 = a.fieldInGlobalScope; - // ^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'fieldInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t0); - bool t1 = a.getterInGlobalScope; - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'getterInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t1); - a.setterInGlobalScope = extensionValue; - //^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'setterInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - bool t2 = a.methodInGlobalScope(); - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The method 'methodInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t2); - } - - // Instance members resolve to the instance methods and not the members - // of the other extension (when present) - { - // No errors: see static_extension_internal_resolution_3_test.dart - } - - // Extension members resolve to the extension methods in this - // extension. - { - // No errors: see static_extension_internal_resolution_3_test.dart - } - - // Extension members resolve to the extension methods in the other - // extension. - { - // No errors: see static_extension_internal_resolution_3_test.dart - } -} diff --git a/tests/language_2/extension_methods/static_extension_internal_resolution_3_test.dart b/tests/language_2/extension_methods/static_extension_internal_resolution_3_test.dart deleted file mode 100644 index ebe18c587d2..00000000000 --- a/tests/language_2/extension_methods/static_extension_internal_resolution_3_test.dart +++ /dev/null @@ -1,309 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests resolution of identifiers inside of extension methods - -// Test the non error cases for an extension MyExt with member names -// overlapping the global and instance scopes against: -// - a class A with only its own members -// - an extension ExtraExt which has global and instance members as well as -// its own - -import "package:expect/expect.dart"; - -///////////////////////////////////////////////////////////////////////// -// Note: These imports may be deliberately unused. They bring certain -// names into scope, in order to test that certain resolution choices are -// made even in the presence of other symbols. -///////////////////////////////////////////////////////////////////////// - -// Do Not Delete. -// Bring global members into scope. -import "helpers/global_scope.dart"; - -// Do Not Delete. -// Bring a class A with instance members into scope. -import "helpers/class_no_shadow.dart"; - -// Do Not Delete. -// Bring an extension ExtraExt with members that overlap the global and instance -// names into scope. -import "helpers/extension_global_instance.dart"; - -const bool extensionValue = true; - -void checkExtensionValue(bool x) { - Expect.equals(x, extensionValue); -} - -// An extension which defines members of its own, as well members overlapping -// the instance and global names. -extension MyExt on A { - bool get fieldInGlobalScope => extensionValue; - bool get getterInGlobalScope => extensionValue; - set setterInGlobalScope(bool x) { - checkExtensionValue(x); - } - - bool methodInGlobalScope() => extensionValue; - - bool get fieldInInstanceScope => extensionValue; - bool get getterInInstanceScope => extensionValue; - set setterInInstanceScope(bool x) { - checkExtensionValue(x); - } - - bool methodInInstanceScope() => extensionValue; - - bool get fieldInExtensionScope => extensionValue; - bool get getterInExtensionScope => extensionValue; - set setterInExtensionScope(bool x) { - checkExtensionValue(x); - } - - bool methodInExtensionScope() => extensionValue; - - void testNakedIdentifiers() { - // Globals should resolve to local extension versions - { - bool t0 = fieldInGlobalScope; - checkExtensionValue(t0); - bool t1 = getterInGlobalScope; - checkExtensionValue(t1); - setterInGlobalScope = extensionValue; - bool t2 = methodInGlobalScope(); - checkExtensionValue(t2); - } - - // Un-prefixed instance members resolve to the local extension versions - { - bool t0 = fieldInInstanceScope; - checkExtensionValue(t0); - bool t1 = getterInInstanceScope; - checkExtensionValue(t0); - setterInInstanceScope = extensionValue; - bool t2 = methodInInstanceScope(); - checkExtensionValue(t0); - } - - // Extension members resolve to the extension methods in this extension - { - bool t0 = fieldInExtensionScope; - checkExtensionValue(t0); - bool t1 = getterInExtensionScope; - checkExtensionValue(t1); - setterInExtensionScope = extensionValue; - bool t2 = methodInExtensionScope(); - checkExtensionValue(t2); - } - - // Extension members not on this extension resolve to the extension methods - // in the other extension (unresolved identifier "id" gets turned into - // "this.id", which is then subject to extension method lookup). - { - double t0 = fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - setterInOtherExtensionScope = otherExtensionValue; - double t2 = methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } - } - - void testIdentifiersOnThis() { - // Prefixed globals are ambiguous - { - // Error cases tested in static_extension_internal_resolution_3_error_test.dart - } - - // Instance members resolve to the instance methods and not the members - // of either extension - { - String t0 = this.fieldInInstanceScope; - checkInstanceValue(t0); - String t1 = this.getterInInstanceScope; - checkInstanceValue(t0); - this.setterInInstanceScope = instanceValue; - String t2 = this.methodInInstanceScope(); - checkInstanceValue(t0); - } - - // Extension members resolve to the extension methods on this extension - { - bool t0 = this.fieldInExtensionScope; - checkExtensionValue(t0); - bool t1 = this.getterInExtensionScope; - checkExtensionValue(t1); - this.setterInExtensionScope = extensionValue; - bool t2 = this.methodInExtensionScope(); - checkExtensionValue(t2); - } - - // Extension members not on this extension resolve to the extension methods - // in the other extension. - { - double t0 = this.fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = this.getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - this.setterInOtherExtensionScope = otherExtensionValue; - double t2 = this.methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } - } - - void testIdentifiersOnInstance() { - A self = this; - - // Prefixed globals are ambiguous - { - // Error cases tested in static_extension_internal_resolution_3_error_test.dart - } - - // Instance members resolve to the instance methods and not the members - // of the extension - { - String t0 = self.fieldInInstanceScope; - checkInstanceValue(t0); - String t1 = self.getterInInstanceScope; - checkInstanceValue(t0); - self.setterInInstanceScope = instanceValue; - String t2 = self.methodInInstanceScope(); - checkInstanceValue(t0); - } - - // Extension members resolve to the extension methods on this extension - { - bool t0 = self.fieldInExtensionScope; - checkExtensionValue(t0); - bool t1 = self.getterInExtensionScope; - checkExtensionValue(t1); - self.setterInExtensionScope = extensionValue; - bool t2 = self.methodInExtensionScope(); - checkExtensionValue(t2); - } - - // Extension members not on this extension resolve to the extension methods - // in the other extension. - { - double t0 = self.fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = self.getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - self.setterInOtherExtensionScope = otherExtensionValue; - double t2 = self.methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } - } - - void instanceTest() { - MyExt(this).testNakedIdentifiers(); - MyExt(this).testIdentifiersOnThis(); - MyExt(this).testIdentifiersOnInstance(); - } -} - -class B extends A { - void testNakedIdentifiers() { - // Globals should resolve to the global name space, and not to the members - // of either extension - { - int t0 = fieldInGlobalScope; - checkGlobalValue(t0); - int t1 = getterInGlobalScope; - checkGlobalValue(t1); - setterInGlobalScope = globalValue; - int t2 = methodInGlobalScope(); - checkGlobalValue(t2); - } - - // Instance members resolve to the instance methods and not the members - // of the other extension (when present) - { - String t0 = fieldInInstanceScope; - checkInstanceValue(t0); - String t1 = getterInInstanceScope; - checkInstanceValue(t0); - setterInInstanceScope = instanceValue; - String t2 = methodInInstanceScope(); - checkInstanceValue(t0); - } - - // Extension members defined internally resolve correctly. - { - bool t0 = fieldInExtensionScope; - checkExtensionValue(t0); - bool t1 = getterInExtensionScope; - checkExtensionValue(t1); - setterInExtensionScope = extensionValue; - bool t2 = methodInExtensionScope(); - checkExtensionValue(t2); - } - - // Extension members defined elsewhere resolve correctly - // (an unresolved identifier "id" gets turned into "this.id", - // which is then subject to extension method lookup). - { - double t0 = fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - setterInOtherExtensionScope = otherExtensionValue; - double t2 = methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } - } -} - -void main() { - var a = new A(); - a.instanceTest(); - new B().testNakedIdentifiers(); - - // Check external resolution as well while we're here - - // Global names come from both extensions and hence are ambiguous. - { - // Error cases tested in static_extension_internal_resolution_3_error_test.dart - } - - // Instance members resolve to the instance methods and not the members - // of the other extension (when present) - { - String t0 = a.fieldInInstanceScope; - checkInstanceValue(t0); - String t1 = a.getterInInstanceScope; - checkInstanceValue(t1); - a.setterInInstanceScope = instanceValue; - String t2 = a.methodInInstanceScope(); - checkInstanceValue(t2); - } - - // Extension members resolve to the extension methods in this - // extension. - { - bool t0 = a.fieldInExtensionScope; - checkExtensionValue(t0); - bool t1 = a.getterInExtensionScope; - checkExtensionValue(t1); - a.setterInExtensionScope = extensionValue; - bool t2 = a.methodInExtensionScope(); - checkExtensionValue(t2); - } - - // Extension members resolve to the extension methods in the other - // extension. - { - double t0 = a.fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = a.getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - a.setterInOtherExtensionScope = otherExtensionValue; - double t2 = a.methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } -} diff --git a/tests/language_2/extension_methods/static_extension_internal_resolution_4_error_test.dart b/tests/language_2/extension_methods/static_extension_internal_resolution_4_error_test.dart deleted file mode 100644 index 5acc4855f0b..00000000000 --- a/tests/language_2/extension_methods/static_extension_internal_resolution_4_error_test.dart +++ /dev/null @@ -1,338 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests resolution of identifiers inside of extension methods - -// Test the error cases for an extension MyExt with member names -// overlapping the global and instance scopes against: -// - a class A with only its own members -// - an extension ExtraExt which has members overlapping the global names, -// the instance names from A, and the extension names from MyExt, as well as -// its own names. - -import "package:expect/expect.dart"; - -///////////////////////////////////////////////////////////////////////// -// Note: These imports may be deliberately unused. They bring certain -// names into scope, in order to test that certain resolution choices are -// made even in the presence of other symbols. -///////////////////////////////////////////////////////////////////////// - -// Do Not Delete. -// Bring global members into scope. -import "helpers/global_scope.dart"; - -// Do Not Delete. -// Bring a class A with instance members into scope. -import "helpers/class_no_shadow.dart"; - -// Do Not Delete. -// Bring an extension ExtraExt with symbols that overlap the global, instance, -// and extension names into scope. -import "helpers/extension_all.dart"; - -const bool extensionValue = true; - -void checkExtensionValue(bool x) { - Expect.equals(x, extensionValue); -} - -// An extension which defines its own members -extension MyExt on A { - bool get fieldInGlobalScope => extensionValue; - bool get getterInGlobalScope => extensionValue; - set setterInGlobalScope(bool x) { - checkExtensionValue(x); - } - - bool methodInGlobalScope() => extensionValue; - - bool get fieldInInstanceScope => extensionValue; - bool get getterInInstanceScope => extensionValue; - set setterInInstanceScope(bool x) { - checkExtensionValue(x); - } - - bool methodInInstanceScope() => extensionValue; - - bool get fieldInExtensionScope => extensionValue; - bool get getterInExtensionScope => extensionValue; - set setterInExtensionScope(bool x) { - checkExtensionValue(x); - } - - bool methodInExtensionScope() => extensionValue; - - void testNakedIdentifiers() { - // Globals should resolve to local extension versions - { - // No errors: see static_extension_internal_resolution_4_test.dart - } - - // Un-prefixed instance members resolve to the local extension versions - { - // No errors: see static_extension_internal_resolution_4_test.dart - } - - // Extension members resolve to the extension methods in this extension - { - // No errors: see static_extension_internal_resolution_4_test.dart - } - - // Extension members not on this extension resolve to the extension methods - // in the other extension (unresolved identifier "id" gets turned into - // "this.id", which is then subject to extension method lookup). - { - // No errors: see static_extension_internal_resolution_4_test.dart - } - } - - void testIdentifiersOnThis() { - // Prefixed globals are ambiguous - { - bool t0 = this.fieldInGlobalScope; - // ^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'fieldInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t0); - bool t1 = this.getterInGlobalScope; - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'getterInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t1); - this.setterInGlobalScope = extensionValue; - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'setterInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - bool t2 = this.methodInGlobalScope(); - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The method 'methodInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t2); - } - - // Instance members resolve to the instance methods and not the members - // of either extension - { - // No errors: see static_extension_internal_resolution_4_test.dart - } - - // Extension members are ambiguous. - { - bool t0 = this.fieldInExtensionScope; - // ^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'fieldInExtensionScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t0); - bool t1 = this.getterInExtensionScope; - // ^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'getterInExtensionScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t1); - this.setterInExtensionScope = extensionValue; - // ^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'setterInExtensionScope' is defined in multiple extensions for 'A' and neither is more specific. - bool t2 = this.methodInExtensionScope(); - // ^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The method 'methodInExtensionScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t2); - } - - // Extension members not on this extension resolve to the extension methods - // in the other extension. - { - // No errors: see static_extension_internal_resolution_4_test.dart - } - } - - void testIdentifiersOnInstance() { - A self = this; - - // Prefixed globals are ambiguous - { - bool t0 = self.fieldInGlobalScope; - // ^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'fieldInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t0); - bool t1 = self.getterInGlobalScope; - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'getterInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t1); - self.setterInGlobalScope = extensionValue; - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'setterInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - bool t2 = self.methodInGlobalScope(); - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The method 'methodInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t2); - } - - // Instance members resolve to the instance methods and not the members - // of the extension - { - // No errors: see static_extension_internal_resolution_4_test.dart - } - - // Extension members are ambiguous. - { - bool t0 = self.fieldInExtensionScope; - // ^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'fieldInExtensionScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t0); - bool t1 = self.getterInExtensionScope; - // ^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'getterInExtensionScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t1); - self.setterInExtensionScope = extensionValue; - // ^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'setterInExtensionScope' is defined in multiple extensions for 'A' and neither is more specific. - bool t2 = self.methodInExtensionScope(); - // ^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The method 'methodInExtensionScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t2); - } - - // Extension members not on this extension resolve to the extension methods - // in the other extension. - { - // No errors: see static_extension_internal_resolution_4_test.dart - } - } - - void instanceTest() { - MyExt(this).testNakedIdentifiers(); - MyExt(this).testIdentifiersOnThis(); - MyExt(this).testIdentifiersOnInstance(); - } -} - -class B extends A { - void testNakedIdentifiers() { - // Globals should resolve to the global name space, and not to the members - // of either extension - { - // No errors: see static_extension_internal_resolution_4_test.dart - } - - // Instance members resolve to the instance methods and not the members - // of the other extension (when present) - { - // No errors: see static_extension_internal_resolution_4_test.dart - } - - // Extension members are ambiguous - { - bool t0 = fieldInExtensionScope; - // ^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'fieldInExtensionScope' is defined in multiple extensions for 'B' and neither is more specific. - // ^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER - checkExtensionValue(t0); - bool t1 = getterInExtensionScope; - // ^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'getterInExtensionScope' is defined in multiple extensions for 'B' and neither is more specific. - // ^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER - checkExtensionValue(t1); - setterInExtensionScope = extensionValue; -// ^^^^^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS -// [cfe] The property 'setterInExtensionScope' is defined in multiple extensions for 'B' and neither is more specific. -// ^^^^^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER - bool t2 = methodInExtensionScope(); - // ^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The method 'methodInExtensionScope' is defined in multiple extensions for 'B' and neither is more specific. - checkExtensionValue(t2); - } - - // Extension members resolve to the extension methods in the other - // extension (unresolved identifier "id" gets turned into "this.id", - // which is then subject to extension method lookup). - { - // No errors: see static_extension_internal_resolution_4_test.dart - } - } -} - -void main() { - var a = new A(); - a.instanceTest(); - new B().testNakedIdentifiers(); - - // Check external resolution as well while we're here - - // Global names come from both extensions and hence are ambiguous. - { - bool t0 = a.fieldInGlobalScope; - // ^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'fieldInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t0); - bool t1 = a.getterInGlobalScope; - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'getterInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t1); - a.setterInGlobalScope = extensionValue; - //^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'setterInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - bool t2 = a.methodInGlobalScope(); - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The method 'methodInGlobalScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t2); - } - - // Instance members resolve to the instance methods and not the members - // of the other extension (when present) - { - // No errors: see static_extension_internal_resolution_4_test.dart - } - - // Extension members are ambiguous - { - bool t0 = a.fieldInExtensionScope; - // ^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'fieldInExtensionScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t0); - bool t1 = a.getterInExtensionScope; - // ^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'getterInExtensionScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t1); - a.setterInExtensionScope = extensionValue; - //^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'setterInExtensionScope' is defined in multiple extensions for 'A' and neither is more specific. - bool t2 = a.methodInExtensionScope(); - // ^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The method 'methodInExtensionScope' is defined in multiple extensions for 'A' and neither is more specific. - checkExtensionValue(t2); - } - - // Extension members resolve to the extension methods in the other - // extension. - { - // No errors: see static_extension_internal_resolution_4_test.dart - } -} diff --git a/tests/language_2/extension_methods/static_extension_internal_resolution_4_test.dart b/tests/language_2/extension_methods/static_extension_internal_resolution_4_test.dart deleted file mode 100644 index 430b6f53474..00000000000 --- a/tests/language_2/extension_methods/static_extension_internal_resolution_4_test.dart +++ /dev/null @@ -1,284 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests resolution of identifiers inside of extension methods - -// Test the non error cases for an extension MyExt with member names -// overlapping the global and instance scopes against: -// - a class A with only its own members -// - an extension ExtraExt which has members overlapping the global names, -// the instance names from A, and the extension names from MyExt, as well as -// its own names. - -import "package:expect/expect.dart"; - -///////////////////////////////////////////////////////////////////////// -// Note: These imports may be deliberately unused. They bring certain -// names into scope, in order to test that certain resolution choices are -// made even in the presence of other symbols. -///////////////////////////////////////////////////////////////////////// - -// Do Not Delete. -// Bring global members into scope. -import "helpers/global_scope.dart"; - -// Do Not Delete. -// Bring a class A with instance members into scope. -import "helpers/class_no_shadow.dart"; - -// Do Not Delete. -// Bring an extension ExtraExt with symbols that overlap the global, instance, -// and extension names into scope. -import "helpers/extension_all.dart"; - -const bool extensionValue = true; - -void checkExtensionValue(bool x) { - Expect.equals(x, extensionValue); -} - -// An extension which defines its own members -extension MyExt on A { - bool get fieldInGlobalScope => extensionValue; - bool get getterInGlobalScope => extensionValue; - set setterInGlobalScope(bool x) { - checkExtensionValue(x); - } - - bool methodInGlobalScope() => extensionValue; - - bool get fieldInInstanceScope => extensionValue; - bool get getterInInstanceScope => extensionValue; - set setterInInstanceScope(bool x) { - checkExtensionValue(x); - } - - bool methodInInstanceScope() => extensionValue; - - bool get fieldInExtensionScope => extensionValue; - bool get getterInExtensionScope => extensionValue; - set setterInExtensionScope(bool x) { - checkExtensionValue(x); - } - - bool methodInExtensionScope() => extensionValue; - - void testNakedIdentifiers() { - // Globals should resolve to local extension versions - { - bool t0 = fieldInGlobalScope; - checkExtensionValue(t0); - bool t1 = getterInGlobalScope; - checkExtensionValue(t1); - setterInGlobalScope = extensionValue; - bool t2 = methodInGlobalScope(); - checkExtensionValue(t2); - } - - // Un-prefixed instance members resolve to the local extension versions - { - bool t0 = fieldInInstanceScope; - checkExtensionValue(t0); - bool t1 = getterInInstanceScope; - checkExtensionValue(t0); - setterInInstanceScope = extensionValue; - bool t2 = methodInInstanceScope(); - checkExtensionValue(t0); - } - - // Extension members resolve to the extension methods in this extension - { - bool t0 = fieldInExtensionScope; - checkExtensionValue(t0); - bool t1 = getterInExtensionScope; - checkExtensionValue(t1); - setterInExtensionScope = extensionValue; - bool t2 = methodInExtensionScope(); - checkExtensionValue(t2); - } - - // Extension members not on this extension resolve to the extension methods - // in the other extension (unresolved identifier "id" gets turned into - // "this.id", which is then subject to extension method lookup). - { - double t0 = fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - setterInOtherExtensionScope = otherExtensionValue; - double t2 = methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } - } - - void testIdentifiersOnThis() { - // Prefixed globals are ambiguous - { - // Error cases tested in static_extension_internal_resolution_4_error_test.dart - } - - // Instance members resolve to the instance methods and not the members - // of either extension - { - String t0 = this.fieldInInstanceScope; - checkInstanceValue(t0); - String t1 = this.getterInInstanceScope; - checkInstanceValue(t0); - this.setterInInstanceScope = instanceValue; - String t2 = this.methodInInstanceScope(); - checkInstanceValue(t0); - } - - // Extension members are ambiguous. - { - // Error cases tested in static_extension_internal_resolution_4_error_test.dart - } - - // Extension members not on this extension resolve to the extension methods - // in the other extension. - { - double t0 = this.fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = this.getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - this.setterInOtherExtensionScope = otherExtensionValue; - double t2 = this.methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } - } - - void testIdentifiersOnInstance() { - A self = this; - - // Prefixed globals are ambiguous - { - // Error cases tested in static_extension_internal_resolution_4_error_test.dart - } - - // Instance members resolve to the instance methods and not the members - // of the extension - { - String t0 = self.fieldInInstanceScope; - checkInstanceValue(t0); - String t1 = self.getterInInstanceScope; - checkInstanceValue(t0); - self.setterInInstanceScope = instanceValue; - String t2 = self.methodInInstanceScope(); - checkInstanceValue(t0); - } - - // Extension members are ambiguous. - { - // Error cases tested in static_extension_internal_resolution_4_error_test.dart - } - - // Extension members not on this extension resolve to the extension methods - // in the other extension. - { - double t0 = self.fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = self.getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - self.setterInOtherExtensionScope = otherExtensionValue; - double t2 = self.methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } - } - - void instanceTest() { - MyExt(this).testNakedIdentifiers(); - MyExt(this).testIdentifiersOnThis(); - MyExt(this).testIdentifiersOnInstance(); - } -} - -class B extends A { - void testNakedIdentifiers() { - // Globals should resolve to the global name space, and not to the members - // of either extension - { - int t0 = fieldInGlobalScope; - checkGlobalValue(t0); - int t1 = getterInGlobalScope; - checkGlobalValue(t1); - setterInGlobalScope = globalValue; - int t2 = methodInGlobalScope(); - checkGlobalValue(t2); - } - - // Instance members resolve to the instance methods and not the members - // of the other extension (when present) - { - String t0 = fieldInInstanceScope; - checkInstanceValue(t0); - String t1 = getterInInstanceScope; - checkInstanceValue(t0); - setterInInstanceScope = instanceValue; - String t2 = methodInInstanceScope(); - checkInstanceValue(t0); - } - - // Extension members are ambiguous. - { - // Error cases tested in static_extension_internal_resolution_4_error_test.dart - } - - // Extension members resolve to the extension methods in the other - // extension (unresolved identifier "id" gets turned into "this.id", - // which is then subject to extension method lookup). - { - double t0 = fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - setterInOtherExtensionScope = otherExtensionValue; - double t2 = methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } - } -} - -void main() { - var a = new A(); - a.instanceTest(); - new B().testNakedIdentifiers(); - - // Check external resolution as well while we're here - - // Global names come from both extensions and hence are ambiguous. - { - // Error cases tested in static_extension_internal_resolution_4_error_test.dart - } - - // Instance members resolve to the instance methods and not the members - // of the other extension (when present) - { - String t0 = a.fieldInInstanceScope; - checkInstanceValue(t0); - String t1 = a.getterInInstanceScope; - checkInstanceValue(t1); - a.setterInInstanceScope = instanceValue; - String t2 = a.methodInInstanceScope(); - checkInstanceValue(t2); - } - - // Extension members are ambiguous. - { - // Error cases tested in static_extension_internal_resolution_4_error_test.dart - } - - // Extension members resolve to the extension methods in the other - // extension. - { - double t0 = a.fieldInOtherExtensionScope; - checkOtherExtensionValue(t0); - double t1 = a.getterInOtherExtensionScope; - checkOtherExtensionValue(t1); - a.setterInOtherExtensionScope = otherExtensionValue; - double t2 = a.methodInOtherExtensionScope(); - checkOtherExtensionValue(t2); - } -} diff --git a/tests/language_2/extension_methods/static_extension_internal_resolution_5_test.dart b/tests/language_2/extension_methods/static_extension_internal_resolution_5_test.dart deleted file mode 100644 index db258495d0b..00000000000 --- a/tests/language_2/extension_methods/static_extension_internal_resolution_5_test.dart +++ /dev/null @@ -1,163 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests resolution of identifiers inside of extension methods - -// Test the non error cases for an extension MyExt with member names -// overlapping the instance scopes against: -// - a class AGlobal which overlaps the names from the global scope as well -// as providing its own members - -import "package:expect/expect.dart"; - -///////////////////////////////////////////////////////////////////////// -// Note: These imports may be deliberately unused. They bring certain -// names into scope, in order to test that certain resolution choices are -// made even in the presence of other symbols. -///////////////////////////////////////////////////////////////////////// - -// Do Not Delete. -// Bring global members into scope. -import "helpers/global_scope.dart"; - -// Do Not Delete. -// Bring a class AGlobal with instance members and global members into scope. -import "helpers/class_shadow.dart"; -import "helpers/class_no_shadow.dart"; - -const bool extensionValue = true; - -void checkExtensionValue(bool x) { - Expect.equals(x, extensionValue); -} - -// Put the extension members in the global scope -int fieldInExtensionScope = globalValue; -int get getterInExtensionScope => globalValue; -set setterInExtensionScope(int x) { - checkGlobalValue(x); -} - -int methodInExtensionScope() => globalValue; - -// Put the superclass members in the global scope -int fieldInInstanceScope = globalValue; -int get getterInInstanceScope => globalValue; -set setterInInstanceScope(int x) { - checkGlobalValue(x); -} - -int methodInInstanceScope() => globalValue; - -// An extension which defines only its own members -extension MyExt on AGlobal { - bool get fieldInExtensionScope => extensionValue; - bool get getterInExtensionScope => extensionValue; - set setterInExtensionScope(bool x) { - checkExtensionValue(x); - } - - bool methodInExtensionScope() => extensionValue; - - bool get fieldInInstanceScope => extensionValue; - bool get getterInInstanceScope => extensionValue; - set setterInInstanceScope(bool x) { - checkExtensionValue(x); - } - - bool methodInInstanceScope() => extensionValue; - - void testNakedIdentifiers() { - // Members that are in the global namespace and the instance namespace - // resolve to the global namespace. - { - int t0 = fieldInGlobalScope; - checkGlobalValue(t0); - int t1 = getterInGlobalScope; - checkGlobalValue(t1); - setterInGlobalScope = globalValue; - int t2 = methodInGlobalScope(); - checkGlobalValue(t2); - } - - // Members that are in the global namespace and the local namespace resolve - // to the local namespace. - { - bool t0 = fieldInExtensionScope; - checkExtensionValue(t0); - bool t1 = getterInExtensionScope; - checkExtensionValue(t1); - setterInExtensionScope = extensionValue; - bool t2 = methodInExtensionScope(); - checkExtensionValue(t2); - } - - // Members that are in the global namespace and the instance and the local - // namespace resolve to the local namespace. - { - bool t0 = fieldInInstanceScope; - checkExtensionValue(t0); - bool t1 = getterInInstanceScope; - checkExtensionValue(t1); - setterInInstanceScope = extensionValue; - bool t2 = methodInInstanceScope(); - checkExtensionValue(t2); - } - } - - void instanceTest() { - MyExt(this).testNakedIdentifiers(); - } -} - -class B extends AGlobal { - void testNakedIdentifiers() { - // Members that are in the global namespace and the superclass namespace - // should resolve to the global name space, and not to the members of the - // superclass. - { - int t0 = fieldInGlobalScope; - checkGlobalValue(t0); - int t1 = getterInGlobalScope; - checkGlobalValue(t1); - setterInGlobalScope = globalValue; - int t2 = methodInGlobalScope(); - checkGlobalValue(t2); - } - - // Members that are in the global namespace and the extension namespace - // should resolve to the global name space, and not to the members of the - // extension. - { - int t0 = fieldInExtensionScope; - checkGlobalValue(t0); - int t1 = getterInExtensionScope; - checkGlobalValue(t1); - setterInExtensionScope = globalValue; - int t2 = methodInExtensionScope(); - checkGlobalValue(t2); - } - - // Members that are in the global namespace, and the superclass namespace, - // and the extension namespace, should resolve to the global name space, and - // not to the members of the extension nor the members of the superclass. - { - int t0 = fieldInInstanceScope; - checkGlobalValue(t0); - int t1 = getterInInstanceScope; - checkGlobalValue(t1); - setterInInstanceScope = globalValue; - int t2 = methodInInstanceScope(); - checkGlobalValue(t2); - } - } -} - -void main() { - var a = new AGlobal(); - a.instanceTest(); - new B().testNakedIdentifiers(); -} diff --git a/tests/language_2/extension_methods/static_extension_internal_resolution_6_error_test.dart b/tests/language_2/extension_methods/static_extension_internal_resolution_6_error_test.dart deleted file mode 100644 index 0acc1d0e9a4..00000000000 --- a/tests/language_2/extension_methods/static_extension_internal_resolution_6_error_test.dart +++ /dev/null @@ -1,124 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests resolution of identifiers inside of extension methods - -// Test various static error corner cases around internal resolution. - -import "package:expect/expect.dart"; - -///////////////////////////////////////////////////////////////////////// -// Note: These imports may be deliberately unused. They bring certain -// names into scope, in order to test that certain resolution choices are -// made even in the presence of other symbols. -///////////////////////////////////////////////////////////////////////// - -// Do Not Delete. -// Bring global members into scope. -import "helpers/global_scope.dart"; - -// Do Not Delete. -// Bring a class AGlobal with instance members and global members into scope. -import "helpers/class_shadow.dart"; - -extension GenericExtension on T { - T get self => this; - // Check that capture is avoided when expanding out - // self references. - void shadowTypeParam(T x) { - T y = self; - // ^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type '#T' can't be assigned to a variable of type 'T'. - } - - void castToShadowedTypeParam() { - dynamic s = self; - (s as T); - } - - List mkList() => []; - void castToShadowedTypeList() { - (mkList() as List); - } -} - -const bool extensionValue = true; - -void checkExtensionValue(bool x) { - Expect.equals(x, extensionValue); -} - -extension StaticExt on AGlobal { - // Valid to overlap static names with the target type symbols - static bool get fieldInInstanceScope => extensionValue; - // ^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE - static bool get getterInInstanceScope => extensionValue; - // ^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE - static set setterInInstanceScope(bool x) { - // ^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE - checkExtensionValue(x); - } - - static bool methodInInstanceScope() => extensionValue; - // ^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE - - // Add the global symbols - static bool get fieldInGlobalScope => extensionValue; - static bool get getterInGlobalScope => extensionValue; - static set setterInGlobalScope(bool x) { - checkExtensionValue(x); - } - - static bool methodInGlobalScope() => extensionValue; - - // Invalid to overlap the static and extension scopes - bool get fieldInInstanceScope => extensionValue; - // ^ - // [cfe] 'fieldInInstanceScope' is already declared in this scope. - bool get getterInInstanceScope => extensionValue; - // ^ - // [cfe] 'getterInInstanceScope' is already declared in this scope. - set setterInInstanceScope(bool x) { - //^ - // [cfe] 'setterInInstanceScope' is already declared in this scope. - checkExtensionValue(x); - } - - bool methodInInstanceScope() => extensionValue; - // ^ - // [cfe] 'methodInInstanceScope' is already declared in this scope. - - void testNakedIdentifiers() { - // Symbols in the global scope and the local static scope resolve to - // the local static scope. - { - // No errors: see static_extension_internal_resolution_6_test.dart - } - - // Symbols in the global scope, the instance scope, and the local static scope - // resolve to the local static scope. - { - // No errors: see static_extension_internal_resolution_6_test.dart - } - } - - void instanceTest() { - StaticExt(this).testNakedIdentifiers(); - } -} - -void main() { - var a = new AGlobal(); - a.instanceTest(); - - Expect.throwsTypeError(() => 3.castToShadowedTypeParam()); - Expect.throwsTypeError(() => 3.castToShadowedTypeList()); -} diff --git a/tests/language_2/extension_methods/static_extension_internal_resolution_6_test.dart b/tests/language_2/extension_methods/static_extension_internal_resolution_6_test.dart deleted file mode 100644 index 60ec5566cf2..00000000000 --- a/tests/language_2/extension_methods/static_extension_internal_resolution_6_test.dart +++ /dev/null @@ -1,101 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests resolution of identifiers inside of extension methods - -// Test various non-error corner cases around internal resolution. - -import "package:expect/expect.dart"; - -///////////////////////////////////////////////////////////////////////// -// Note: These imports may be deliberately unused. They bring certain -// names into scope, in order to test that certain resolution choices are -// made even in the presence of other symbols. -///////////////////////////////////////////////////////////////////////// - -// Do Not Delete. -// Bring global members into scope. -import "helpers/global_scope.dart"; - -// Do Not Delete. -// Bring a class AGlobal with instance members and global members into scope. -import "helpers/class_shadow.dart"; - -extension GenericExtension on T { - T get self => this; - void castToShadowedTypeParam() { - dynamic s = self; - (s as T); - } - - List mkList() => []; - void castToShadowedTypeList() { - (mkList() as List); - } -} - -const bool extensionValue = true; - -void checkExtensionValue(bool x) { - Expect.equals(x, extensionValue); -} - -extension StaticExt on AGlobal { - // Valid to overlap static names with the target type symbols - static bool get fieldInInstanceScope => extensionValue; - static bool get getterInInstanceScope => extensionValue; - static set setterInInstanceScope(bool x) { - checkExtensionValue(x); - } - - static bool methodInInstanceScope() => extensionValue; - - // Add the global symbols - static bool get fieldInGlobalScope => extensionValue; - static bool get getterInGlobalScope => extensionValue; - static set setterInGlobalScope(bool x) { - checkExtensionValue(x); - } - - static bool methodInGlobalScope() => extensionValue; - - void testNakedIdentifiers() { - // Symbols in the global scope and the local static scope resolve to - // the local static scope. - { - bool t0 = fieldInGlobalScope; - checkExtensionValue(t0); - bool t1 = getterInGlobalScope; - checkExtensionValue(t1); - setterInGlobalScope = extensionValue; - bool t2 = methodInGlobalScope(); - checkExtensionValue(t2); - } - - // Symbols in the global scope, the instance scope, and the local static scope - // resolve to the local static scope. - { - bool t0 = fieldInInstanceScope; - checkExtensionValue(t0); - bool t1 = getterInInstanceScope; - checkExtensionValue(t1); - setterInInstanceScope = extensionValue; - bool t2 = methodInInstanceScope(); - checkExtensionValue(t2); - } - } - - void instanceTest() { - StaticExt(this).testNakedIdentifiers(); - } -} - -void main() { - var a = new AGlobal(); - a.instanceTest(); - - Expect.throwsTypeError(() => 3.castToShadowedTypeParam()); -} diff --git a/tests/language_2/extension_methods/static_extension_operator_override_error_test.dart b/tests/language_2/extension_methods/static_extension_operator_override_error_test.dart deleted file mode 100644 index ccf436fc341..00000000000 --- a/tests/language_2/extension_methods/static_extension_operator_override_error_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Regression test for https://github.com/dart-lang/sdk/issues/43114. - -class A {} - -extension E on A { - String operator +(int other) => ''; -} - -f(A a, int b) { - int i = E(a) + b; - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. -} - -main() { - f(A(), 0); -} diff --git a/tests/language_2/extension_methods/static_extension_operators_test.dart b/tests/language_2/extension_methods/static_extension_operators_test.dart deleted file mode 100644 index 52f99e31515..00000000000 --- a/tests/language_2/extension_methods/static_extension_operators_test.dart +++ /dev/null @@ -1,130 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Tests that static extensions can be used for all operators. - -void main() { - Object a = "a"; - Object b = "b"; - Object c = "c"; - - expect("(-a)", -a); - expect("(~a)", ~a); - expect("(a+b)", a + b); - expect("(a-b)", a - b); - expect("(a*b)", a * b); - expect("(a/b)", a / b); - expect("(a%b)", a % b); - expect("(a~/b)", a ~/ b); - expect("(a|b)", a | b); - expect("(a&b)", a & b); - expect("(a^b)", a ^ b); - expect("(ab)", a > b); - expect("(a<=b)", a <= b); - expect("(a>=b)", a >= b); - expect("(a<>b)", a >> b); - // expect("(a>>>b)", a >>> b); - expect("a(b)", a(b)); - expect("a(b,c)", a(b, c)); - expect("a[b]", a[b]); - expect("c", a[b] = c, "a[b]=c"); - - // Operator-assignment works and evaluates to its RHS value. - expect("(a.field+b)", a.field += b, "a.field=(a.field+b)"); - expect("(a.field-b)", a.field -= b, "a.field=(a.field-b)"); - expect("(a.field*b)", a.field *= b, "a.field=(a.field*b)"); - expect("(a.field/b)", a.field /= b, "a.field=(a.field/b)"); - expect("(a.field%b)", a.field %= b, "a.field=(a.field%b)"); - expect("(a.field~/b)", a.field ~/= b, "a.field=(a.field~/b)"); - expect("(a.field|b)", a.field |= b, "a.field=(a.field|b)"); - expect("(a.field&b)", a.field &= b, "a.field=(a.field&b)"); - expect("(a.field^b)", a.field ^= b, "a.field=(a.field^b)"); - expect("(a.field<>b)", a.field >>= b, "a.field=(a.field>>b)"); - // expect("(a.field>>>b)", a.field >>>= b, "a.field=(a.field>>>b)"); - - // Even on index operations. - expect("(a[c]+b)", a[c] += b, "a[c]=(a[c]+b)"); - expect("(a[c]-b)", a[c] -= b, "a[c]=(a[c]-b)"); - expect("(a[c]*b)", a[c] *= b, "a[c]=(a[c]*b)"); - expect("(a[c]/b)", a[c] /= b, "a[c]=(a[c]/b)"); - expect("(a[c]%b)", a[c] %= b, "a[c]=(a[c]%b)"); - expect("(a[c]~/b)", a[c] ~/= b, "a[c]=(a[c]~/b)"); - expect("(a[c]|b)", a[c] |= b, "a[c]=(a[c]|b)"); - expect("(a[c]&b)", a[c] &= b, "a[c]=(a[c]&b)"); - expect("(a[c]^b)", a[c] ^= b, "a[c]=(a[c]^b)"); - expect("(a[c]<>b)", a[c] >>= b, "a[c]=(a[c]>>b)"); - // expect("(a[c]>>>b)", a[c] >>>= b, "a[c]=(a[c]>>>b)"); - - // And ++/-- expands to their assignments. - expect("(a.field+1)", ++a.field, "a.field=(a.field+1)"); - expect("(a.field-1)", --a.field, "a.field=(a.field-1)"); - expect("a.field", a.field++, "a.field=(a.field+1)"); - expect("a.field", a.field--, "a.field=(a.field-1)"); - expect("(a[b]+1)", ++a[b], "a[b]=(a[b]+1)"); - expect("(a[b]-1)", --a[b], "a[b]=(a[b]-1)"); - expect("a[b]", a[b]++, "a[b]=(a[b]+1)"); - expect("a[b]", a[b]--, "a[b]=(a[b]-1)"); - - // Combinations. - expect("(a+b[b(c)]((a*b)))", a + b[c[a] = b(c)](a * b), "c[a]=b(c)"); - - // Operator precedence is unaffected by being extensions. - expect("(c<((-a)|(b^((~c)&((a<>((c-a)+((((b*c)~/a)%b)/c)))))))", - c < -a | b ^ ~c & a << b >> c - a + b * c ~/ a % b / c); - expect("((((((((((((c/b)%a)~/c)*b)+a)-c)<>a)&(~c))^b)|(-a))>b)", - c / b % a ~/ c * b + a - c << b >> a & ~c ^ b | -a > b); -} - -// Last value set by []= or setter. -String setValue = ""; - -void expect(String expect, Object value, [String expectSet]) { - Expect.equals(expect, value, "value"); - if (expectSet != null) Expect.equals(expectSet, setValue, "assignment"); -} - -extension Ops on Object { - Object operator -() => "(-${this})"; - Object operator ~() => "(~${this})"; - Object operator +(Object other) => "(${this}+$other)"; - Object operator -(Object other) => "(${this}-$other)"; - Object operator *(Object other) => "(${this}*$other)"; - Object operator /(Object other) => "(${this}/$other)"; - Object operator %(Object other) => "(${this}%$other)"; - Object operator ~/(Object other) => "(${this}~/$other)"; - Object operator |(Object other) => "(${this}|$other)"; - Object operator &(Object other) => "(${this}&$other)"; - Object operator ^(Object other) => "(${this}^$other)"; - Object operator <(Object other) => "(${this}<$other)"; - Object operator >(Object other) => "(${this}>$other)"; - Object operator <=(Object other) => "(${this}<=$other)"; - Object operator >=(Object other) => "(${this}>=$other)"; - Object operator <<(Object other) => "(${this}<<$other)"; - Object operator >>(Object other) => "(${this}>>$other)"; - // TODO: enable `>>>` when it has been implemented. - // String operator >>>(Object other) => "(${this}>>>$other)"; - - // Cannot make an extension method for `==` because it's declared by Object. - - Object operator [](Object other) => "${this}[$other]"; - void operator []=(Object other, Object value) { - setValue = "${this}[$other]=$value"; - } - - Object call([arg1, arg2]) => - "${this}(${[arg1, arg2].where((x) => x != null).join(",")})"; - - Object get field => "${this}.field"; - void set field(Object other) { - setValue = "${this}.field=$other"; - } -} diff --git a/tests/language_2/extension_methods/static_extension_prefix_double_import_test.dart b/tests/language_2/extension_methods/static_extension_prefix_double_import_test.dart deleted file mode 100644 index ce7c828c5ee..00000000000 --- a/tests/language_2/extension_methods/static_extension_prefix_double_import_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -import "helpers/on_object.dart"; -import "helpers/on_object.dart" as p2; - -void main() { - Object o = 1; - Expect.equals("object", o.onObject); -} diff --git a/tests/language_2/extension_methods/static_extension_prefix_import_conflict_test.dart b/tests/language_2/extension_methods/static_extension_prefix_import_conflict_test.dart deleted file mode 100644 index 8984ed20f81..00000000000 --- a/tests/language_2/extension_methods/static_extension_prefix_import_conflict_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -import "helpers/on_object.dart"; -import "helpers/also_on_object.dart" as p2; - -void main() { - Object o = 1; - o.onObject; - //^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'onObject' is defined in multiple extensions for 'Object' and neither is more specific. -} diff --git a/tests/language_2/extension_methods/static_extension_prefix_import_show_test.dart b/tests/language_2/extension_methods/static_extension_prefix_import_show_test.dart deleted file mode 100644 index 8cc7e817cff..00000000000 --- a/tests/language_2/extension_methods/static_extension_prefix_import_show_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -import "helpers/on_object.dart" as p1 show OnObject; -import "helpers/on_int.dart" as p2 show OnInt; - -void main() { - int i = 0; - Object o = i; - Expect.equals("int", i.onInt); - Expect.equals("int", i.onObject); - Expect.equals("object", o.onObject); -} diff --git a/tests/language_2/extension_methods/static_extension_prefix_import_test.dart b/tests/language_2/extension_methods/static_extension_prefix_import_test.dart deleted file mode 100644 index 412b4991bb3..00000000000 --- a/tests/language_2/extension_methods/static_extension_prefix_import_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -import "helpers/on_object.dart" as p1; -import "helpers/on_int.dart" as p2; - -void main() { - int i = 0; - Object o = i; - Expect.equals("int", i.onInt); - Expect.equals("int", i.onObject); - Expect.equals("object", o.onObject); -} diff --git a/tests/language_2/extension_methods/static_extension_resolution_failures_test.dart b/tests/language_2/extension_methods/static_extension_resolution_failures_test.dart deleted file mode 100644 index 0555d3d997f..00000000000 --- a/tests/language_2/extension_methods/static_extension_resolution_failures_test.dart +++ /dev/null @@ -1,124 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests extension method resolution failures. - -import "package:expect/expect.dart"; - -main() { - A a = C(); - B1 b1 = C(); - B2 b2 = C(); - C c = C(); - - Expect.equals("EA.v1", a.v1); - Expect.equals("EB1.v1", b1.v1); - Expect.equals("EB2.v1", b2.v1); - Expect.equals("EC.v1", c.v1); - - Expect.equals("EA.v2", a.v2); - Expect.equals("EB1.v2", b1.v2); - Expect.equals("EB2.v2", b2.v2); - // Cannot determine which of EB1 and EB2's v2 is more specific - c.v2; - //^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'v2' is defined in multiple extensions for 'C' and neither is more specific. - - Expect.equals("EA.v3", a.v3); - Expect.equals("EA.v3", b1.v3); - Expect.equals("EA.v3", b2.v3); - Expect.equals("EA.v3", c.v3); - - Iterable i_num = []; - Iterable ii = []; - List ln = []; - List li = []; - - // No `i_num` extension declared. - i_num.i_num; - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'i_num' isn't defined for the class 'Iterable'. - - Expect.equals("Iterable.i_num", ii.i_num); - Expect.equals("List.i_num", ln.i_num); - - // Both apply, neither is more specific. - li.i_num; - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'i_num' is defined in multiple extensions for 'List' and neither is more specific. - - // no most specific because both are equally specific. - c.cs; - //^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The property 'cs' is defined in multiple extensions for 'C' and neither is more specific. - - // Both EIT.e1 and ELO.e1 apply, but their instantiated on - // types are incomparable, and hence this is an error. - ln.e1(); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_EXTENSION_MEMBER_ACCESS - // [cfe] The method 'e1' is defined in multiple extensions for 'List' and neither is more specific. -} - -// Diamond class hierarchy. -class A {} - -class B1 implements A {} - -class B2 implements A {} - -class C implements B1, B2 {} - -extension EA on A { - String get v1 => "EA.v1"; - String get v2 => "EA.v2"; - String get v3 => "EA.v3"; -} - -extension EB1 on B1 { - String get v1 => "EB1.v1"; - String get v2 => "EB1.v2"; -} - -extension EB2 on B2 { - String get v1 => "EB2.v1"; - String get v2 => "EB2.v2"; -} - -extension EC on C { - String get v1 => "EC.v1"; -} - -// Iterable, Iterable, List and List also forms diamond -// hierarchy. -extension II on Iterable { - String get i_num => "Iterable.i_num"; -} - -extension LN on List { - String get i_num => "List.i_num"; -} - -// Two exactly identical `on` types. -extension C1 on C { - String get cs => "C1.cs"; -} - -extension C2 on C { - String get cs => "C2.cs"; -} - -extension EIT on Iterable { - String e1() => "Iterable.e1"; -} - -extension ELO on List { - String e1() => "List.e1"; -} diff --git a/tests/language_2/extension_methods/static_extension_resolution_test.dart b/tests/language_2/extension_methods/static_extension_resolution_test.dart deleted file mode 100644 index ffde669ce2a..00000000000 --- a/tests/language_2/extension_methods/static_extension_resolution_test.dart +++ /dev/null @@ -1,232 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Tests the resolution of multiple applicable extensions. - -String lastSetterValue; - -class SuperTarget {} - -class Target extends SuperTarget { - String targetMethod() => "targetMethod"; - String get targetGetter => "targetGetter"; - void set targetSetter(String argument) { - lastSetterValue = "targetSetter: $argument"; - } -} - -class SubTarget extends Target { - String subTargetMethod() => "subTargetMethod"; - String get subTargetGetter => "subTargetGetter"; - void set subTargetSetter(String argument) { - lastSetterValue = "subTargetSetter: $argument"; - } -} - -extension E1 on SubTarget { - static String name = "SubTarget"; - - String e1() => "$name.e1"; - - String targetMethod() => "$name.targetMethod"; - String get targetGetter => "$name.targetGetter"; - void set targetSetter(String value) { - lastSetterValue = "$name.targetSetter: $value"; - } - - String subTargetMethod() => "$name.subTargetMethod"; - String get subTargetGetter => "$name.subTargetGetter"; - void set subTargetSetter(String value) { - lastSetterValue = "$name.subTargetSetter: $value"; - } - - List get typedList => []; -} - -extension E2 on SubTarget { - static String name = "SubTarget"; - - String e1() => "$name.e1"; - String e2() => "$name.e2"; - - String targetMethod() => "$name.targetMethod"; - String get targetGetter => "$name.targetGetter"; - void set targetSetter(String value) { - lastSetterValue = "$name.targetSetter: $value"; - } - - String subTargetMethod() => "$name.subTargetMethod"; - String get subTargetGetter => "$name.subTargetGetter"; - void set subTargetSetter(String value) { - lastSetterValue = "$name.subTargetSetter: $value"; - } -} - -extension E3 on Target { - static String name = "Target"; - - String e1() => "$name.e1"; - String e2() => "$name.e2"; - String e3() => "$name.e3"; - - String targetMethod() => "$name.targetMethod"; - String get targetGetter => "$name.targetGetter"; - void set targetSetter(String value) { - lastSetterValue = "$name.targetSetter: $value"; - } - - String subTargetMethod() => "$name.subTargetMethod"; - String get subTargetGetter => "$name.subTargetGetter"; - void set subTargetSetter(String value) { - lastSetterValue = "$name.subTargetSetter: $value"; - } - - List get typedList => []; -} - -extension E4 on Target { - static String name = "Target"; - - String e1() => "$name.e1"; - String e2() => "$name.e2"; - String e3() => "$name.e3"; - String e4() => "$name.e4"; - - String targetMethod() => "$name.targetMethod"; - String get targetGetter => "$name.targetGetter"; - void set targetSetter(String value) { - lastSetterValue = "$name.targetSetter: $value"; - } - - String subTargetMethod() => "$name.subTargetMethod"; - String get subTargetGetter => "$name.subTargetGetter"; - void set subTargetSetter(String value) { - lastSetterValue = "$name.subTargetSetter: $value"; - } -} - -extension E5 on T { - static String name = "T"; - - String e1() => "$name.e1"; - String e2() => "$name.e2"; - String e3() => "$name.e3"; - String e4() => "$name.e4"; - String e5() => "$name.e5"; - - String targetMethod() => "$name.targetMethod"; - String get targetGetter => "$name.targetGetter"; - void set targetSetter(String value) { - lastSetterValue = "$name.targetSetter: $value"; - } - - String subTargetMethod() => "$name.subTargetMethod"; - String get subTargetGetter => "$name.subTargetGetter"; - void set subTargetSetter(String value) { - lastSetterValue = "$name.subTargetSetter: $value"; - } - - List get typedList => []; -} - -extension E6 on Object { - static String name = "Object"; - - String e1() => "$name.e1"; - String e2() => "$name.e2"; - String e3() => "$name.e3"; - String e4() => "$name.e4"; - String e5() => "$name.e5"; - String e6() => "$name.e6"; - - String targetMethod() => "$name.targetMethod"; - String get targetGetter => "$name.targetGetter"; - void set targetSetter(String value) { - lastSetterValue = "$name.targetSetter: $value"; - } - - String subTargetMethod() => "$name.subTargetMethod"; - String get subTargetGetter => "$name.subTargetGetter"; - void set subTargetSetter(String value) { - lastSetterValue = "$name.subTargetSetter: $value"; - } -} - -main() { - SubTarget s1 = SubTarget(); - Target t1 = SubTarget(); - SuperTarget o1 = SubTarget(); - Target ti1 = SubTarget(); - ; - SubTarget si1 = SubTarget(); - ; - - // Interface methods take precedence. - - Expect.equals("targetGetter", s1.targetGetter); - Expect.equals("targetMethod", s1.targetMethod()); - s1.targetSetter = "1"; - Expect.equals("targetSetter: 1", lastSetterValue); - - Expect.equals("subTargetGetter", s1.subTargetGetter); - Expect.equals("subTargetMethod", s1.subTargetMethod()); - s1.subTargetSetter = "2"; - Expect.equals("subTargetSetter: 2", lastSetterValue); - - Expect.equals("targetGetter", t1.targetGetter); - Expect.equals("targetMethod", t1.targetMethod()); - t1.targetSetter = "3"; - Expect.equals("targetSetter: 3", lastSetterValue); - - // Methods not on the instance resolve to extension methods. - - Expect.equals("Target.subTargetGetter", t1.subTargetGetter); - Expect.equals("Target.subTargetMethod", t1.subTargetMethod()); - t1.subTargetSetter = "4"; - Expect.equals("Target.subTargetSetter: 4", lastSetterValue); - - Expect.type>(ti1.typedList); - Expect.type>(si1.typedList); - Expect.type>(o1.typedList); - - // Extension methods can be called directly using override syntax. - - Expect.equals("SubTarget.targetGetter", E1(si1).targetGetter); - Expect.equals("SubTarget.targetMethod", E1(si1).targetMethod()); - E1(si1).targetSetter = "5"; - Expect.equals("SubTarget.targetSetter: 5", lastSetterValue); - - Expect.equals("SubTarget.subTargetGetter", E1(si1).subTargetGetter); - Expect.equals("SubTarget.subTargetMethod", E1(si1).subTargetMethod()); - E1(si1).subTargetSetter = "6"; - Expect.equals("SubTarget.subTargetSetter: 6", lastSetterValue); - - Expect.type>(E1(si1).typedList); - - // Applicable methods. - Expect.equals("SubTarget.e1", s1.e1()); - Expect.equals("T.e2", s1.e2()); - Expect.equals("T.e3", s1.e3()); - Expect.equals("T.e4", s1.e4()); - Expect.equals("T.e5", s1.e5()); - Expect.equals("Object.e6", s1.e6()); - - Expect.equals("Target.e1", t1.e1()); - Expect.equals("Target.e2", t1.e2()); - Expect.equals("Target.e3", t1.e3()); - Expect.equals("T.e4", t1.e4()); - Expect.equals("T.e5", t1.e5()); - Expect.equals("Object.e6", t1.e6()); - - Expect.equals("T.e1", o1.e1()); - Expect.equals("T.e2", o1.e2()); - Expect.equals("T.e3", o1.e3()); - Expect.equals("T.e4", o1.e4()); - Expect.equals("T.e5", o1.e5()); - Expect.equals("Object.e6", o1.e6()); -} diff --git a/tests/language_2/extension_methods/static_extension_setter_getter_assignability_error_test.dart b/tests/language_2/extension_methods/static_extension_setter_getter_assignability_error_test.dart deleted file mode 100644 index f6e685432a9..00000000000 --- a/tests/language_2/extension_methods/static_extension_setter_getter_assignability_error_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// 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. - -// @dart = 2.9 - -// It is an error to have a setter and a getter in an extension where -// the return type of the getter is not assignable to the argument type -// of the setter. -extension E1 on int { - static int get property => 1; - // ^^ - // [cfe] unspecified - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_ASSIGNABLE_SETTER_TYPES - static void set property(String value) {} - // ^^ - // [cfe] unspecified - int get property2 => 1; - // ^^ - // [cfe] unspecified - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_ASSIGNABLE_SETTER_TYPES - void set property2(String x) {} - // ^^ - // [cfe] unspecified -} - -void main() {} diff --git a/tests/language_2/extension_methods/static_extension_silly_types_test.dart b/tests/language_2/extension_methods/static_extension_silly_types_test.dart deleted file mode 100644 index 722e5ee5085..00000000000 --- a/tests/language_2/extension_methods/static_extension_silly_types_test.dart +++ /dev/null @@ -1,158 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests extension methods on the non-function, non-class types. - -import "dart:async" show FutureOr; - -import "package:expect/expect.dart"; - -void main() { - M m = C(); - Object o = Object(); - Function fun = () => null; - f() => 0; - String f1(int x) => "$x"; - String f2([int x = 0, int y = 0]) => "${x + y}"; - int i = 0; - Future fi = Future.value(0); - Future> ffi = Future>.value(fi); - FutureOr> foi = 1; - Future fn = Future.value(null); - Null n = null; - - // `on M` matches mixin interface. - Expect.equals(1, m.m); - // `on void` matches anything. - Expect.equals(2, o.v); - Expect.equals(2, n.v); - // `on dynamic` matches anything. - Expect.equals(3, o.d); - Expect.equals(3, n.d); - // `on Function` matches any function type and Function itself. - Expect.equals(4, f.f); - Expect.equals(4, fun.f); - Expect.equals(4, f1.f); - Expect.equals(4, f2.f); - // `on ` matches those functions. - Expect.equals(5, f1.fu); - Expect.equals(5, f2.fu); - // `on FutureOr` matches both future and not. - Expect.equals(6, i.fi); - Expect.equals(6, fi.fi); - // `on FutureOr` matches everything. - Expect.equals(7, o.fo); - Expect.equals(7, n.fo); - // `on FutureOr>` matches any future or futureOr. - Expect.equals(8, fi.ffo); - Expect.equals(8, ffi.ffo); - // `on FutureOr` matches Null and FutureOr. - Expect.equals(9, fn.fn); - Expect.equals(9, n.fn); - // `on Null` does match null. No errors for receiver being null. - Expect.equals(10, n.n); - - // Matching can deconstruct static function types. - Expect.equals(int, f1.parameterType); - Expect.equals(String, f1.returnType); - Expect.equals(int, f2.parameterType); - Expect.equals(String, f2.returnType); - // And static FutureOr types. - Expect.equals(int, i.futureType); - Expect.equals(int, fi.futureType); - Expect.equals(type>(), ffi.futureType); - Expect.equals(type>(), foi.futureType); - // TODO: Update and enable when - // https://github.com/dart-lang/language/issues/436 - // is resolved. - // Expect.equals(dynamic, n.futureType); // Inference treats `null` as no hint. -} - -Type type() => T; - -mixin M {} - -class C = Object with M; - -extension on M { - int get m => 1; -} - -extension on void { - int get v => 2; - testVoid() { - // No access on void. Static type of `this` is void! - this // - .toString() //# 01: compile-time error - ; - } -} - -extension on dynamic { - int get d => 3; - - void testDynamic() { - // Static type of `this` is dynamic, allows dynamic invocation. - this.arglebargle(); - } -} - -extension on Function { - int get f => 4; - - void testFunction() { - // Static type of `this` is Function. Allows any dynamic invocation. - this(); - this(1); - this(x: 1); - // No function can have both optional positional and named parameters. - } -} - -extension on String Function(int) { - int get fu => 5; -} - -extension on FutureOr { - int get fi => 6; - - void testFutureOr() { - var self = this; - // The `this` type can be type-promoted to both Future and int. - if (self is Future) { - self.then((int x) {}); - } else if (self is int) { - self + 2; - } - } -} - -extension on FutureOr { - int get fo => 7; -} - -extension on FutureOr> { - int get ffo => 8; -} - -extension on FutureOr { - int get fn => 9; -} - -extension on Null { - int get n => 10; -} - -// TODO: Type `Never` when it's added. - -extension on FutureOr { - Type get futureType => T; -} - -extension on R Function(T) { - Type get returnType => R; - Type get parameterType => T; -} diff --git a/tests/language_2/extension_methods/static_extension_syntax_test.dart b/tests/language_2/extension_methods/static_extension_syntax_test.dart deleted file mode 100644 index 495d297bcff..00000000000 --- a/tests/language_2/extension_methods/static_extension_syntax_test.dart +++ /dev/null @@ -1,162 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests extension declaration syntax combinations. - -import "package:expect/expect.dart"; - -void checkStaticType(T x) { - Expect.type(x); -} - -main() { - Object object = []; - List list = []; - List numList = []; - Pair numPair = Pair(1, 2.5); - RecSolution recs = RecSolution(); - - Expect.equals(0, object.e0); - Expect.equals(0, list.e0); - - Expect.equals(1, object.e1); - Expect.equals(1, list.e1); - - Expect.equals(0, object.e4); - Expect.equals(0, list.e4); - Expect.equals(4, numList.e4); - - Expect.equals(0, object.e5); - Expect.equals(0, list.e5); - Expect.equals(5, numList.e5); - - Expect.equals(0, object.e6); - Expect.equals(6, list.e6); - Expect.equals(6, numList.e6); - checkStaticType>(numList.list6); - - Expect.equals(0, object.e7); - Expect.equals(7, list.e7); - Expect.equals(7, numList.e7); - checkStaticType>(numList.list7); - - Expect.equals(10, object.e10); - Expect.equals(10, numList.e10); - checkStaticType>(object.list10); - checkStaticType>>(numList.list10); - - Expect.equals(11, object.e11); - Expect.equals(11, numList.e11); - checkStaticType>(object.list11); - checkStaticType>>(numList.list11); - - Expect.equals(0, object.e14); - Expect.equals(14, numPair.e14); - Expect.type>(numPair.list14); - checkStaticType>(numPair.list14); - - Expect.equals(0, object.e16); - Expect.equals(16, numPair.e16); - Expect.type>(numPair.map16); - checkStaticType>(numPair.map16); - - Expect.equals(0, object.e17); - Expect.equals(0, list.e17); - Expect.equals(17, numList.e17); - Expect.type>(numList.list17); - checkStaticType>(numList.list17); - - Expect.equals(0, object.e19); - Expect.equals(19, recs.e19); - Expect.type>(recs.list19); - checkStaticType>(recs.list19); - - Expect.equals(0, object.e20); - Expect.equals(20, recs.e20); - Expect.type>(recs.list20); - checkStaticType>(recs.list20); -} - -extension on Object { - int get e0 => 0; - // Fallbacks to test cases where other extensions do not apply. - int get e4 => 0; - int get e5 => 0; - int get e6 => 0; - int get e7 => 0; - int get e14 => 0; - int get e16 => 0; - int get e17 => 0; - int get e19 => 0; - int get e20 => 0; -} - -extension E1 on Object { - int get e1 => 1; -} - -extension on List { - int get e4 => 4; -} - -extension E5 on List { - int get e5 => 5; -} - -extension on List { - int get e6 => 6; - List get list6 => []; -} - -extension E7 on List { - int get e7 => 7; - List get list7 => []; -} - -extension on T { - int get e10 => 10; - List get list10 => []; -} - -extension E11 on T { - int get e11 => 11; - List get list11 => []; -} - -extension on Pair { - int get e14 => 14; - List get list14 => []; -} - -extension E16 on Pair { - int get e16 => 16; - Map get map16 => {}; -} - -extension on List { - int get e17 => 17; - List get list17 => []; -} - -extension> on T { - int get e19 => 19; - List get list19 => []; -} - -extension E20> on T { - int get e20 => 20; - List get list20 => []; -} - -class Pair { - final A first; - final B second; - const Pair(this.first, this.second); -} - -class Rec> {} - -class RecSolution extends Rec {} diff --git a/tests/language_2/extension_methods/static_extension_this_not_promoted_error_test.dart b/tests/language_2/extension_methods/static_extension_this_not_promoted_error_test.dart deleted file mode 100644 index 4e8f4a74359..00000000000 --- a/tests/language_2/extension_methods/static_extension_this_not_promoted_error_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// 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. - -// @dart = 2.9 - -// This test verifies that attempts to promote the type of `this` inside an -// extension method have no effect. - -void f(dynamic d) {} - -class C { - int cProp; -} - -class D extends C { - int dProp; -} - -extension on C { - void testC() { - if (this is D) { - f(this.dProp); - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'dProp' isn't defined for the class 'C'. - f(dProp); - //^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER - // [cfe] The getter 'dProp' isn't defined for the class 'C'. - } - } -} - -main() { - C().testC(); - D().testC(); -} diff --git a/tests/language_2/extension_methods/syntax/extension_methods_test.dart b/tests/language_2/extension_methods/syntax/extension_methods_test.dart deleted file mode 100644 index d67a039d32c..00000000000 --- a/tests/language_2/extension_methods/syntax/extension_methods_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -class C { - int get one => 1; -} - -extension E on C { - int get two => 2; -} - -main() { - C c = C(); - var result = c.one + c.two; - Expect.equals(result, 3); -} diff --git a/tests/language_2/factory/and_instance_variable_runtime_test.dart b/tests/language_2/factory/and_instance_variable_runtime_test.dart deleted file mode 100644 index ef2a3b371b1..00000000000 --- a/tests/language_2/factory/and_instance_variable_runtime_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -abstract class A { - var bar; - factory A.bar() = B.bar; - - get foo => bar; - -} - -class B implements A { - var bar; - factory B.bar() => new C.bar(); - - get foo => bar; - - - B() {} -} - -class C extends B { - C.bar() { - bar = "foo"; - } - - -} - -main() { - assert(new A.bar().foo == "foo"); - assert(new B.bar().foo == "foo"); - assert(new C.bar().foo == "foo"); - assert(new A.bar().bar == "foo"); - assert(new B.bar().bar == "foo"); - assert(new C.bar().bar == "foo"); -} diff --git a/tests/language_2/factory/and_instance_variable_test.dart b/tests/language_2/factory/and_instance_variable_test.dart deleted file mode 100644 index 79cef395939..00000000000 --- a/tests/language_2/factory/and_instance_variable_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2018, 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 - -abstract class A { - var bar; - factory A.bar() = B.bar; - - get foo => bar; - static get baz => bar; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.INSTANCE_MEMBER_ACCESS_FROM_STATIC - // [cfe] Undefined name 'bar'. -} - -class B implements A { - var bar; - factory B.bar() => new C.bar(); - - get foo => bar; - static get baz => bar; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.INSTANCE_MEMBER_ACCESS_FROM_STATIC - // [cfe] Undefined name 'bar'. - - B() {} -} - -class C extends B { - C.bar() { - bar = "foo"; - } - - static get baz => bar; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.INSTANCE_MEMBER_ACCESS_FROM_STATIC - // [cfe] Undefined name 'bar'. -} - -main() { - assert(new A.bar().foo == "foo"); - assert(new B.bar().foo == "foo"); - assert(new C.bar().foo == "foo"); - assert(new A.bar().bar == "foo"); - assert(new B.bar().bar == "foo"); - assert(new C.bar().bar == "foo"); -} diff --git a/tests/language_2/factory/arrow_test.dart b/tests/language_2/factory/arrow_test.dart deleted file mode 100644 index 6066f8af786..00000000000 --- a/tests/language_2/factory/arrow_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class A { - A.foo() {} - factory A() => new A.foo(); -} - -main() { - Expect.isTrue(new A() is A); -} diff --git a/tests/language_2/factory/factory1_test.dart b/tests/language_2/factory/factory1_test.dart deleted file mode 100644 index bac0e9418ac..00000000000 --- a/tests/language_2/factory/factory1_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing factory generic result types. - -// @dart = 2.9 - -class A { - A() {} - factory A.factory() { - return new A(); - // ^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // ^ - // [cfe] A value of type 'A' can't be assigned to a variable of type 'A'. - } -} - -class B extends A { - B() {} - factory B.factory() { - return new B(); - // ^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // ^ - // [cfe] A value of type 'B' can't be assigned to a variable of type 'B'. - } -} - -main() { - new A.factory(); - new A.factory(); - new B.factory(); - new B.factory(); -} diff --git a/tests/language_2/factory/factory2_test.dart b/tests/language_2/factory/factory2_test.dart deleted file mode 100644 index 48c45d0dde0..00000000000 --- a/tests/language_2/factory/factory2_test.dart +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2012, 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 - -// Test compile time error for factories with parameterized types. - -import "dart:collection"; - -abstract class A { - factory A.create() = AFactory.create; - // ^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS - // ^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE - // [cfe] Expected 0 type arguments. -} - -class AFactory { - // Compile time error: should be AFactory to match abstract class above - factory A.create() { - // ^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_FACTORY_NAME_NOT_A_CLASS - // [cfe] The name of a constructor must match the name of the enclosing class. - } -} - -abstract class Link extends IterableBase { - // does not match constructor for LinkFactory - factory Link(T head, [Link tail]) = - LinkFactory; -// ^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE -// [cfe] The constructor function type 'LinkFactory Function(dynamic, [Link])' isn't a subtype of 'Link Function(T, [Link])'. - Link prepend(T element); -} - -abstract class EmptyLink extends Link { - const factory EmptyLink() = LinkTail; -} - -class LinkFactory { - factory LinkFactory(head, [Link tail]) {} -} - -// Does not implement all of Iterable -class AbstractLink implements Link { -// ^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER -// [cfe] The non-abstract class 'AbstractLink' is missing implementations for these members: - const AbstractLink(); - Link prepend(T element) { - return new Link(element, this); - } -} - -// Does not implement all of Iterable -class LinkTail extends AbstractLink implements EmptyLink { -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER -// [cfe] The non-abstract class 'LinkTail' is missing implementations for these members: - const LinkTail(); -} - -// Does not implement all of Iterable -class LinkEntry extends AbstractLink { -// ^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER -// [cfe] The non-abstract class 'LinkEntry' is missing implementations for these members: - LinkEntry(T head, Link realTail); -} - -class Fisk { - // instantiation of abstract class - Link nodes = const EmptyLink(); -} - -main() { - // Equivalent to new Link.create(). - var a = new A.create(); - - new Fisk(); - // instantiation of abstract class - new EmptyLink().prepend('hest'); - // instantiation of abstract class - const EmptyLink().prepend('fisk'); -} diff --git a/tests/language_2/factory/factory3_test.dart b/tests/language_2/factory/factory3_test.dart deleted file mode 100644 index d5f0313b64b..00000000000 --- a/tests/language_2/factory/factory3_test.dart +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2012, 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 - -import "dart:collection"; - -// Test compile time error for factories with parameterized types. - -abstract class A { - A(); - A.create(); -} - -abstract class B extends A {} - -// Compile time error: should be AFactory to match abstract class above -class AFactory extends B { - factory A.create() { - // ^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_FACTORY_NAME_NOT_A_CLASS - // [cfe] The name of a constructor must match the name of the enclosing class. - } -} - -abstract class Link extends IterableBase { - factory Link(T head, [Link tail]) = LinkEntry; - Link prepend(T element); -} - -abstract class EmptyLink extends Link { - const factory EmptyLink() = LinkTail; -} - -class AbstractLink implements Link { -// ^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER -// [cfe] The non-abstract class 'AbstractLink' is missing implementations for these members: - const AbstractLink(); - Link prepend(T element) { - print("$element"); - if (0 is T) { - throw "0 is not a T"; - } - return new Link(element, this); - } -} - -class LinkTail extends AbstractLink implements EmptyLink { -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER -// [cfe] The non-abstract class 'LinkTail' is missing implementations for these members: - const LinkTail(); -} - -class LinkEntry extends AbstractLink { -// ^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER -// [cfe] The non-abstract class 'LinkEntry' is missing implementations for these members: - LinkEntry(T head, [Link Tail]); -} - -class Fisk { - Link nodes = const EmptyLink(); - final int id; - Fisk(this.id); - toString() => id.toString(); -} - -main() { - var a = new AFactory.create(); - new Fisk(0).nodes.prepend(new Fisk(1)).prepend(new Fisk(2)); -} diff --git a/tests/language_2/factory/factory4_runtime_test.dart b/tests/language_2/factory/factory4_runtime_test.dart deleted file mode 100644 index 7391e768c3e..00000000000 --- a/tests/language_2/factory/factory4_runtime_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -abstract class Link { - -} - -class A {} - -class LinkFactory extends A { - factory LinkFactory.create() { - return null; - } -} - -main() { - -} diff --git a/tests/language_2/factory/factory4_test.dart b/tests/language_2/factory/factory4_test.dart deleted file mode 100644 index 220c014fdca..00000000000 --- a/tests/language_2/factory/factory4_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012, 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 - -abstract class Link { - factory Link.create() = LinkFactory.create; - // ^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE - // [cfe] The constructor function type 'LinkFactory Function()' isn't a subtype of 'Link Function()'. -} - -class A {} - -class LinkFactory extends A { - factory LinkFactory.create() { - return null; - } -} - -main() { - new Link.create(); -} diff --git a/tests/language_2/factory/factory5_runtime_test.dart b/tests/language_2/factory/factory5_runtime_test.dart deleted file mode 100644 index e7b8700ffc1..00000000000 --- a/tests/language_2/factory/factory5_runtime_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -abstract class Link { - -} - -class LinkFactory { - factory LinkFactory.create() { - return null; - } - -} - -main() { - -} diff --git a/tests/language_2/factory/factory5_test.dart b/tests/language_2/factory/factory5_test.dart deleted file mode 100644 index 5b1e442585e..00000000000 --- a/tests/language_2/factory/factory5_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2012, 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 - -abstract class Link { - factory Link.create() = LinkFactory.create; - // ^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE - // [cfe] The constructor function type 'LinkFactory Function()' isn't a subtype of 'Link Function()'. -} - -class LinkFactory { - factory LinkFactory.create() { - return null; - } - factory LinkFactory.Foo() = Foo; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_NON_CLASS - // [cfe] Couldn't find constructor 'Foo'. - // ^ - // [cfe] Redirection constructor target not found: 'Foo' -} - -main() { - new Link.create(); -} diff --git a/tests/language_2/factory/factory6_runtime_test.dart b/tests/language_2/factory/factory6_runtime_test.dart deleted file mode 100644 index 68d4d7b3cda..00000000000 --- a/tests/language_2/factory/factory6_runtime_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2016, 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 'package:expect/expect.dart'; - -abstract class Link { - -} - -class LinkFactory { - -} - -main() { - -} diff --git a/tests/language_2/factory/factory6_test.dart b/tests/language_2/factory/factory6_test.dart deleted file mode 100644 index d89d52117ed..00000000000 --- a/tests/language_2/factory/factory6_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'package:expect/expect.dart'; - -abstract class Link { - factory Link.Foo() = LinkFactory.Foo; - // ^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE - // [cfe] The constructor function type 'LinkFactory Function()' isn't a subtype of 'Link Function()'. -} - -class LinkFactory { - factory LinkFactory.Foo() = Foo; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_NON_CLASS - // [cfe] Couldn't find constructor 'Foo'. - // ^ - // [cfe] Redirection constructor target not found: 'Foo' -} - -main() { - Expect.throws(() => new Link.Foo()); -} diff --git a/tests/language_2/factory/factory_test.dart b/tests/language_2/factory/factory_test.dart deleted file mode 100644 index 81f556a75d0..00000000000 --- a/tests/language_2/factory/factory_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// 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 test program for testing factories. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - factory A(n) { - return new A.internal(n); - } - A.internal(n) : n_ = n {} - var n_; -} - -class B { - factory B.my() { - return new B(3); - } - B(n) : n_ = n {} - var n_; -} - -class FactoryTest { - static testMain() { - new B.my(); - var b = new B.my(); - Expect.equals(3, b.n_); - var a = new A(5); - Expect.equals(5, a.n_); - } -} - -// Test compile time error for factories with parameterized types. - -abstract class Link { - factory Link.create() = LinkFactory.create; - // ^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS - // [cfe] Expected 0 type arguments. - // ^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE -} - -class LinkFactory { - // Compile time error: should be LinkFactory to match abstract class above - factory Link.create() { - // ^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_FACTORY_NAME_NOT_A_CLASS - // [cfe] The name of a constructor must match the name of the enclosing class. - return null; - } -} - -main() { - FactoryTest.testMain(); - var a = new Link.create(); -} diff --git a/tests/language_2/factory/implementation_test.dart b/tests/language_2/factory/implementation_test.dart deleted file mode 100644 index e381fbe2a1b..00000000000 --- a/tests/language_2/factory/implementation_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -abstract class A { - factory A(int x, int y) = B; -} - -class B implements A { - final int x; - final int y; - - B(this.x, this.y); - - // This factory should never be invoked. - factory B.A(int a, int b) { - return new B(0, 0); - } - - factory B.X(int a, int b) { - return new B(a * 10, b * 10); - } -} - -main() { - var a = new B(1, 2); - // Check that constructor B is invoked and not factory B.A. - Expect.equals(1, a.x); - Expect.equals(2, a.y); - - var x = new B.X(11, 22); - // Check that factory is invoked. - Expect.equals(110, x.x); - Expect.equals(220, x.y); -} diff --git a/tests/language_2/factory/redirection2_runtime_test.dart b/tests/language_2/factory/redirection2_runtime_test.dart deleted file mode 100644 index ab1f3e537f4..00000000000 --- a/tests/language_2/factory/redirection2_runtime_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 "package:expect/expect.dart"; - -// Test that it is a compile-time error to have a redirection in a -// non-factory constructor. - -class Foo { - Foo() - - ; -} - -class Bar extends Foo { - factory Bar() => null; -} - -main() { - Expect.isTrue(new Foo() is Foo); - Expect.isFalse(new Foo() is Bar); -} diff --git a/tests/language_2/factory/redirection2_test.dart b/tests/language_2/factory/redirection2_test.dart deleted file mode 100644 index 44976a8724c..00000000000 --- a/tests/language_2/factory/redirection2_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test that it is a compile-time error to have a redirection in a -// non-factory constructor. - -class Foo { - Foo() - = Bar -//^ -// [analyzer] SYNTACTIC_ERROR.REDIRECTION_IN_NON_FACTORY_CONSTRUCTOR -// [cfe] Expected a function body or '=>'. -//^ -// [cfe] Only factory constructor can specify '=' redirection. -// ^ -// [cfe] Constructors can't have a return type. - ; -} - -class Bar extends Foo { - factory Bar() => null; -} - -main() { - Expect.isTrue(new Foo() is Foo); - Expect.isFalse(new Foo() is Bar); -} diff --git a/tests/language_2/factory/redirection3_cyclic_runtime_test.dart b/tests/language_2/factory/redirection3_cyclic_runtime_test.dart deleted file mode 100644 index 14982d7a10d..00000000000 --- a/tests/language_2/factory/redirection3_cyclic_runtime_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test that a cycle in redirecting factories leads to a compile-time error. - -class A { - factory A.foo() = B; -} - -class B implements A { - factory B() = C.bar; -} - -class C implements B { - factory C.bar() = C.foo; - factory C.foo() = C - - ; - C(); -} - -main() { - new A.foo(); -} diff --git a/tests/language_2/factory/redirection3_cyclic_test.dart b/tests/language_2/factory/redirection3_cyclic_test.dart deleted file mode 100644 index 2f3659406eb..00000000000 --- a/tests/language_2/factory/redirection3_cyclic_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that a cycle in redirecting factories leads to a compile-time error. - -class A { - factory A.foo() = B; -} - -class B implements A { - factory B() = C.bar; -} - -class C implements B { - factory C.bar() = C.foo; - // ^ - // [cfe] Cyclic definition of factory 'C.bar'. - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_CONSTRUCTOR_REDIRECT - factory C.foo() = C.bar(); - // ^ - // [cfe] Cyclic definition of factory 'C.foo'. - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_CONSTRUCTOR_REDIRECT - // ^^^ - // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN - // [cfe] Expected ';' after this. - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] Expected an identifier, but got '('. - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER - C(); -} - -main() { - new A.foo(); -} diff --git a/tests/language_2/factory/redirection_test.dart b/tests/language_2/factory/redirection_test.dart deleted file mode 100644 index 75d7071bf3d..00000000000 --- a/tests/language_2/factory/redirection_test.dart +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - A() : x = null; - - const A.constant(this.x); - - factory A.factory() { - return new B(); - } - - factory A.test01() = T; // //# 01: compile-time error - - factory A.test02() = dynamic; // //# 02: compile-time error - - factory A.test03() = Undefined; // //# 03: compile-time error - - factory A.test04() = C.test04; // //# 04: compile-time error - - final T x; -} - -class B extends A { - B(); - - factory B.A() = A; - - const factory B.A_constant(T x) = A.constant; - - factory B.A_factory() = A.factory; - - factory B.test04() = A.test04; // //# 04: continued - - factory B.test05(int incompatible) = A.factory; // //# 05: compile-time error - - factory B.test05(int incompatible) = A.factory; // //# 06: compile-time error -} - -class C extends B { - C(); - - factory C.A() = A; // //# none: compile-time error - - factory C.A_factory() = A.factory; // //# none: compile-time error - - const factory C.B_constant(V x) = B.A_constant; - - factory C.test04() = B.test04; // //# 04: continued - - factory C.test06(int incompatible) = B.test05; // //# 06: continued - - const factory C.test07(V x) = B.A; // //# 07: compile-time error -} - -main() { - new A.test01(); // //# 01: continued - new A.test02(); // //# 02: continued - new A.test03(); // //# 03: continued - new C.test04(); // //# 04: continued - new B.test05(0); // //# 05: continued - new C.test06(0); // //# 06: continued - new C.test07(0); // //# 07: continued - Expect.isTrue(new A() is A); - Expect.isTrue(new A.constant(true).x); - Expect.isTrue(new A.factory() is B); - Expect.isTrue(new B.A() is A); // //# 08: compile-time error - Expect.isFalse(new B.A() is A); // //# 09: compile-time error - Expect.isTrue(new B.A_constant(true).x); // //# 10: compile-time error - Expect.isTrue(new B.A_factory() is B); // //# 11: compile-time error - Expect.isTrue(new C.A() is A); // //# 12: compile-time error - Expect.isTrue(new C.A_factory() is B); // //# 13: compile-time error - Expect.isTrue(new C.B_constant(true).x); // //# 14: compile-time error -} diff --git a/tests/language_2/factory/return_type_checked_runtime_test.dart b/tests/language_2/factory/return_type_checked_runtime_test.dart deleted file mode 100644 index 0e2febd8035..00000000000 --- a/tests/language_2/factory/return_type_checked_runtime_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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 "package:expect/expect.dart"; - -class A { - -} - -main() { - -} diff --git a/tests/language_2/factory/return_type_checked_test.dart b/tests/language_2/factory/return_type_checked_test.dart deleted file mode 100644 index 069fe48ae73..00000000000 --- a/tests/language_2/factory/return_type_checked_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A { - factory A() => 42; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'int' can't be assigned to a variable of type 'A'. -} - -main() { - Expect.throws(() => new A()); -} diff --git a/tests/language_2/factory/runtime_test.dart b/tests/language_2/factory/runtime_test.dart deleted file mode 100644 index d22ba6f6481..00000000000 --- a/tests/language_2/factory/runtime_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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 test program for testing factories. - -import "package:expect/expect.dart"; - -class A { - factory A(n) { - return new A.internal(n); - } - A.internal(n) : n_ = n {} - var n_; -} - -class B { - factory B.my() { - return new B(3); - } - B(n) : n_ = n {} - var n_; -} - -class FactoryTest { - static testMain() { - new B.my(); - var b = new B.my(); - Expect.equals(3, b.n_); - var a = new A(5); - Expect.equals(5, a.n_); - } -} - -// Test compile time error for factories with parameterized types. - - - - - - - // Compile time error: should be LinkFactory to match abstract class above - - - - - - -main() { - FactoryTest.testMain(); - -} diff --git a/tests/language_2/factory/type_parameter2_test.dart b/tests/language_2/factory/type_parameter2_test.dart deleted file mode 100644 index 9f50ff0e2b7..00000000000 --- a/tests/language_2/factory/type_parameter2_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that type variables are correctly set in instances created by factories. - -import 'package:expect/expect.dart'; - -var p; -bool done = false; - -class D {} - -abstract class I { - factory I.name() { - return new C.name(); - } -} - -class C implements I { - C.name() { - Expect.isTrue(p is T); - done = true; - } -} - -main() { - p = new D(); - new I.name(); - Expect.equals(true, done); -} diff --git a/tests/language_2/factory/type_parameter_test.dart b/tests/language_2/factory/type_parameter_test.dart deleted file mode 100644 index 88b4ef3728c..00000000000 --- a/tests/language_2/factory/type_parameter_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - factory A.factory() { - return new B(); - } - - A(); - - build() { - return new A(); - } -} - -class B extends A { - B(); - - build() { - return new B(); - } -} - -main() { - Expect.isTrue(new A() is A); - Expect.isTrue(new A.factory() is B); - - // Check that we don't always return true for is checks with - // generics. - Expect.isFalse(new A() is A); - Expect.isFalse(new A.factory() is B); - - Expect.isTrue(new A().build() is A); - Expect.isFalse(new A().build() is A); - - Expect.isTrue(new A.factory().build() is B); - Expect.isFalse(new A.factory().build() is B); - - Expect.isTrue(new B().build() is B); - Expect.isFalse(new B().build() is B); -} diff --git a/tests/language_2/factory/with_type_parameters_test.dart b/tests/language_2/factory/with_type_parameters_test.dart deleted file mode 100644 index ec7e6817dcc..00000000000 --- a/tests/language_2/factory/with_type_parameters_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2018, 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 - -class Foo { - Foo._(); - - factory Foo - //# 01: syntax error - //# 02: syntax error - () => new Bar(); - - factory Foo - //# 03: syntax error - //# 04: syntax error - .far - //# 05: syntax error - //# 06: syntax error - .fip //# 07: syntax error - .fip //# 08: syntax error - () => new Bar(); -} - -class Bar extends Foo { - Bar(): super._() {} -} - -main() { - new Foo(); - new Foo.far(); -} diff --git a/tests/language_2/field/decl_missing_var_type_runtime_test.dart b/tests/language_2/field/decl_missing_var_type_runtime_test.dart deleted file mode 100644 index 07f9d79ceb5..00000000000 --- a/tests/language_2/field/decl_missing_var_type_runtime_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 test program for constructors and initializers. - -// Exercises issue 2997, missing var or type on field declarations should -// generate a compile-time error. - -class A { - - -} - -main() { - -} diff --git a/tests/language_2/field/decl_missing_var_type_test.dart b/tests/language_2/field/decl_missing_var_type_test.dart deleted file mode 100644 index 9761b69be7c..00000000000 --- a/tests/language_2/field/decl_missing_var_type_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2012, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Exercises issue 2997, missing var or type on field declarations should -// generate a compile-time error. - -class A { - _this; -//^^^^^ -// [analyzer] SYNTACTIC_ERROR.MISSING_CONST_FINAL_VAR_OR_TYPE -// [cfe] Variables must be declared using the keywords 'const', 'final', 'var' or a type name. - A(x) : this._this = x; -} - -main() { - new A(0); -} diff --git a/tests/language_2/field/field1_test.dart b/tests/language_2/field/field1_test.dart deleted file mode 100644 index 6969d7e9b83..00000000000 --- a/tests/language_2/field/field1_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// 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 test to catch error reporting bugs in class fields declarations. -// Should be an error because we have setter/getter functions and fields -// in the class. - -// @dart = 2.9 - -class C { - var a; - // ^ - // [cfe] Conflicts with setter 'a'. - - get a { - // ^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'a' is already declared in this scope. - return 1; - } - - set a(int val) { - // ^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] Conflicts with the implicit setter of the field 'a'. - var x = val; - } - - get b { - return 2; - } - - set b(int val) { - var x = val; - } -} - -class Field1Test { - static testMain() { - var c = new C(); - } -} - -main() { - Field1Test.testMain(); -} diff --git a/tests/language_2/field/field2_test.dart b/tests/language_2/field/field2_test.dart deleted file mode 100644 index 679e48e918d..00000000000 --- a/tests/language_2/field/field2_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// 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 test to catch error reporting bugs in class fields declarations. -// Should be an error because we have setter/getter functions and fields -// in the class. - -// @dart = 2.9 - -class C { - get a { - return 1; - } - - set a(int val) { - // ^ - // [cfe] Conflicts with the implicit setter of the field 'a'. - var x = val; - } - - get b { - return 2; - } - - set b(int val) { - var x = val; - } - - var a; - // ^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'a' is already declared in this scope. - // [cfe] Conflicts with setter 'a'. -} - -class Field2Test { - static testMain() { - var c = new C(); - } -} - -main() { - Field2Test.testMain(); -} diff --git a/tests/language_2/field/field3_test.dart b/tests/language_2/field/field3_test.dart deleted file mode 100644 index f97d31ba621..00000000000 --- a/tests/language_2/field/field3_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// 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 test to catch error reporting bugs in class fields declarations. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class C { - // illegal: var cannot follow final - final var a = 0;// //# 00: syntax error - // illegal: final field declaration, must be initialized - final b; // //# 01: compile-time error - final c; // //# 02: compile-time error - final d; // //# 03: ok - final e; // //# 04: ok - final f = 0; // //# 05: ok - - C() {} //# 02: continued - C(this.d) {} //# 03: continued - C(x) : e = x {} //# 04: continued -} - -main() { - var val = new C(); //# 00: continued - var val = new C(); //# 01: continued - var val = new C(); //# 02: continued - var val = new C(0); //# 03: continued - var val = new C(0); //# 04: continued - var val = new C(); //# 05: continued -} diff --git a/tests/language_2/field/field4_test.dart b/tests/language_2/field/field4_test.dart deleted file mode 100644 index 85517e4b7d1..00000000000 --- a/tests/language_2/field/field4_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// 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 test to catch error reporting bugs in class fields declarations. -// Should be an error because we have a field overriding a function name. - -// @dart = 2.9 - -class A { - int a() { - return 1; - } - - var a; - // ^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'a' is already declared in this scope. -} - -class Field4Test { - static testMain() { - var a = new A(); - } -} - -main() { - Field4Test.testMain(); -} diff --git a/tests/language_2/field/field5_test.dart b/tests/language_2/field/field5_test.dart deleted file mode 100644 index f8f0b9d3451..00000000000 --- a/tests/language_2/field/field5_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// 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 test to catch error reporting bugs in class fields declarations. -// Should be an error because we have a function overriding a field name. - -// @dart = 2.9 - -class A { - var a; - int a() { - // ^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'a' is already declared in this scope. - return 1; - } -} - -class Field5Test { - static testMain() { - var a = new A(); - } -} - -main() { - Field5Test.testMain(); -} diff --git a/tests/language_2/field/field6_test.dart b/tests/language_2/field/field6_test.dart deleted file mode 100644 index 459844aea26..00000000000 --- a/tests/language_2/field/field6_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// 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 test to catch error reporting bugs in class fields declarations. -// Should be an error because we have a getter overriding a function name. - -// @dart = 2.9 - -class A { - int a() { // //# 00: ok - return 1;// //# 00: ok - }// //# 00: ok - - int get a {// //# 00: compile-time error - return 10;// //# 00: ok - }// //# 00: ok - - int get a {// //# 01: ok - return 10;// //# 01: ok - }// //# 01: ok - - int a() {// //# 01: compile-time error - return 1;// //# 01: ok - }// //# 01: ok - -} - -class Field6Test { - static testMain() { - var a = new A(); - } -} - -main() { - Field6Test.testMain(); -} diff --git a/tests/language_2/field/field_test.dart b/tests/language_2/field/field_test.dart deleted file mode 100644 index cc8975cbd77..00000000000 --- a/tests/language_2/field/field_test.dart +++ /dev/null @@ -1,89 +0,0 @@ -// 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 test program for testing setting/getting of instance fields. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class First { - First() {} - var a; - var b; - - addFields() { - return a + b; - } - - setValues() { - a = 24; - b = 10; - return a + b; - } -} - -class Second extends First { - var c; - get a { - return -12; - } - - set b(a) { - a.c = 12; - } -} - -class FieldInitializedToNull { - int x, y; - - static void test() { - var f = new FieldInitializedToNull(); - int missingArg([int x = 42]) => x; - Expect.isNull(f.x); - Expect.isNull(f.y); - // Regression tests for a DDC bug, where undefined gets initialized in the - // fields, and is incorrect recognized as a missing argument. - Expect.isNull(missingArg(f.x)); - Expect.isNull(missingArg(f.y)); - } -} - -class FieldTest { - static one() { - var f = new First(); - f.a = 3; - f.b = f.a; - Expect.equals(3, f.a); - Expect.equals(f.a, f.b); - f.b = (f.a = 10); - Expect.equals(10, f.a); - Expect.equals(10, f.b); - f.b = f.a = 15; - Expect.equals(15, f.a); - Expect.equals(15, f.b); - Expect.equals(30, f.addFields()); - Expect.equals(34, f.setValues()); - Expect.equals(24, f.a); - Expect.equals(10, f.b); - } - - static two() { - // The tests below are a little cumbersome because not - // everything is implemented yet. - var o = new Second(); - // 'a' getter is overridden, always returns -12. - Expect.equals(-12, o.a); - o.a = 2; - Expect.equals(-12, o.a); - // 'b' setter is overridden to write 12 to field 'c'. - o.b = o; - Expect.equals(12, o.c); - } -} - -main() { - FieldTest.one(); - FieldTest.two(); - FieldInitializedToNull.test(); -} diff --git a/tests/language_2/field/function_field_test.dart b/tests/language_2/field/function_field_test.dart deleted file mode 100644 index 1b40df75425..00000000000 --- a/tests/language_2/field/function_field_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2022, 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 "package:expect/expect.dart"; - -class A { - int Function(int) f; - - A(this.f); -} - -main() { - A a = A((x) => x + x); - Expect.equals(a.f(2), 4); -} diff --git a/tests/language_2/field/increment_bailout_test.dart b/tests/language_2/field/increment_bailout_test.dart deleted file mode 100644 index 8ec50483966..00000000000 --- a/tests/language_2/field/increment_bailout_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2013, 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 - -// dart2js regression test for issue 8781. - -import "package:expect/expect.dart"; - -class N { - var outgoing; - var incoming; - N(this.outgoing, this.incoming); -} - -class A { - int offset = 0; - var list; - var node; - - A(node) - : node = node, - list = node.outgoing; - - next() { - // dart2js used to update [offset] twice: once in the optimized - // version, which would bailout to the non-optimized version - // because [list] is not an Array, and once in the non-optimized - // version. - var edge = list[offset++]; - if (list == node.outgoing) { - list = node.incoming; - offset = 0; - } else - list = null; - return edge; - } -} - -main() { - var o = new A(new N(confuse([1]), confuse([2]))); - - for (var i = 1; i <= 2; i++) Expect.equals(i, o.next()); - - Expect.equals(null, o.list); -} - -// Use confuse to defeat type inferencing. -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(x) { - return x; -} diff --git a/tests/language_2/field/inference_test.dart b/tests/language_2/field/inference_test.dart deleted file mode 100644 index ba4f160e52e..00000000000 --- a/tests/language_2/field/inference_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js and its SsaConstructionFieldTypes -// phase. - -import "package:expect/expect.dart"; - -class A { - var _field; - final other; - get field => _field; - A(this._field) : other = null; - A.fromOther(this.other) { - _field = other.field; - } -} - -class B { - var a; - B() { - try { - // Defeat inlining. - // An inlined generative constructor call used to confuse - // dart2js. - a = new A(42); - } catch (e) { - rethrow; - } - } -} - -var array = [new A(42), new B()]; - -main() { - // Surround the call to [analyzeAfterB] by two [: new B() :] calls - // to ensure the [B] constructor will be analyzed first. - new B(); - var a = analyzeAfterB(); - new B(); - Expect.equals(42, a._field); -} - -analyzeAfterB() { - try { - // Defeat inlining. - return new A.fromOther(array[0]); - } catch (e) { - rethrow; - } -} diff --git a/tests/language_2/field/initialization_order_test.dart b/tests/language_2/field/initialization_order_test.dart deleted file mode 100644 index 3c9d091ff4b..00000000000 --- a/tests/language_2/field/initialization_order_test.dart +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test that field initializers are evaluated in the right order. - -int counter = 0; - -class Mark { - static StringBuffer buffer; - Mark(value) { - buffer.write('$value.'); - } -} - -class OneField { - var a = new Mark('a'); - - OneField(); - - OneField.init() : a = new Mark('ai'); -} - -class TwoFields { - var b = new Mark('b'); - var a = new Mark('a'); - - TwoFields(); - - TwoFields.initA() : a = new Mark('ai'); - - TwoFields.initB() : b = new Mark('bi'); - - TwoFields.initBoth() - : a = new Mark('ai'), - b = new Mark('bi'); -} - -class InheritOneField extends OneField { - var b = new Mark('b'); - - InheritOneField() : super(); - - InheritOneField.init() - : b = new Mark('bi'), - super(); - - InheritOneField.superWithInit() : super.init(); - - InheritOneField.initWithSuperInit_correctOrder() - : b = new Mark('bi'), - super.init(); - - InheritOneField.initWithSuperInit_incorrectOrder() - : - super.init(), //# 01: compile-time error - b = new Mark('bi') - , super.init() //# none: ok - ; -} - -String run(callback) { - Mark.buffer = new StringBuffer(); - callback(); - return Mark.buffer.toString(); -} - -main() { - Expect.equals('a.', run(() => new OneField())); - Expect.equals('a.ai.', run(() => new OneField.init())); - - Expect.equals('b.a.', run(() => new TwoFields())); - Expect.equals('b.a.ai.', run(() => new TwoFields.initA())); - Expect.equals('b.a.bi.', run(() => new TwoFields.initB())); - Expect.equals('b.a.ai.bi.', run(() => new TwoFields.initBoth())); - - Expect.equals('b.a.', run(() => new InheritOneField())); - Expect.equals('b.bi.a.', run(() => new InheritOneField.init())); - Expect.equals('b.a.ai.', run(() => new InheritOneField.superWithInit())); - Expect.equals( - 'b.bi.a.ai.', run(() => new InheritOneField.initWithSuperInit_correctOrder())); - Expect.equals( - 'b.bi.a.ai.', run(() => new InheritOneField.initWithSuperInit_incorrectOrder())); -} diff --git a/tests/language_2/field/method_test.dart b/tests/language_2/field/method_test.dart deleted file mode 100644 index b31123539c8..00000000000 --- a/tests/language_2/field/method_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// 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 test. Fields can be invoked directly if they are unqualified. - -// @dart = 2.9 - -class A { - var foo; - A() { - foo = () {}; - } - void bar() { - foo(); // <= foo is a field, but can still be invoked without parenthesis. - } -} - -class FieldMethodTest { - static testMain() { - new A().bar(); - } -} - -main() { - FieldMethodTest.testMain(); -} diff --git a/tests/language_2/field/optimization2_test.dart b/tests/language_2/field/optimization2_test.dart deleted file mode 100644 index 8013e3562d4..00000000000 --- a/tests/language_2/field/optimization2_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Dart test program to test type-based optimization on fields. - -class A { - var x; - A() : x = new B(); - foo() { - x++; - } -} - -class B { - operator +(other) => 498; -} - -main() { - var a = new A(); - a.foo(); - a.foo(); - Expect.equals(499, a.x); -} diff --git a/tests/language_2/field/optimization3_test.dart b/tests/language_2/field/optimization3_test.dart deleted file mode 100644 index a18821a7933..00000000000 --- a/tests/language_2/field/optimization3_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Dart test program to test type-based optimization on fields. - -class A { - dynamic a = 0; - var b = 0; - foo() { - var c = b + 27; - for (var i = 0; i < 1; i++) { - for (var j = 0; j < 1; j++) { - Expect.equals(50, c + 23); - } - } - return a > 0.2; - } - - setA(value) { - a = value; - } - - setB(value) { - b = value; - } - - operator >(other) => other == 0.2; -} - -main() { - var a = new A(); - Expect.isFalse(a.foo()); - a.setA(new A()); - a.setB(0); - Expect.isTrue(a.foo()); -} diff --git a/tests/language_2/field/optimization_test.dart b/tests/language_2/field/optimization_test.dart deleted file mode 100644 index 7779e16bf77..00000000000 --- a/tests/language_2/field/optimization_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Dart test program to test type-based optimization on fields. - -class A { - var x; - A() : x = 0; - foo() { - x++; - } - - toto() { - x = 99; - } - - bar(y) { - x = y; - } -} - -class B { - operator +(other) => "ok"; -} - -main() { - var a = new A(); - a.foo(); - a.toto(); - a.bar("str"); - a.bar(new B()); - a.foo(); - Expect.equals("ok", a.x); -} diff --git a/tests/language_2/field/override2_test.dart b/tests/language_2/field/override2_test.dart deleted file mode 100644 index 29c666a4aee..00000000000 --- a/tests/language_2/field/override2_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that we are accessing the right field in a method of a super -// class, when that field is overridden. - -import "package:expect/expect.dart"; - -class A { - final dynamic a = [42]; - foo() => a[0]; -} - -class B extends A { - final dynamic a = new Map(); -} - -main() { - Expect.equals(null, new B().foo()); - Expect.equals(42, new A().foo()); -} diff --git a/tests/language_2/field/override3_test.dart b/tests/language_2/field/override3_test.dart deleted file mode 100644 index ca175a7f813..00000000000 --- a/tests/language_2/field/override3_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that we report a compile-time error when a static field conflicts with -// an inherited instance member of the same name. - -import "package:expect/expect.dart"; - -class A { - var foo = 42; // //# 00: compile-time error - get foo => 42; // //# 01: compile-time error - foo() => 42; // //# 02: compile-time error - set foo(value) { } // //# 03: compile-time error -} - -class B extends A { - static var foo = 42; -} - -main() { - Expect.equals(42, B.foo); -} diff --git a/tests/language_2/field/override4_test.dart b/tests/language_2/field/override4_test.dart deleted file mode 100644 index 4429c4c1d8e..00000000000 --- a/tests/language_2/field/override4_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that we report a compile-time error when an instance field conflicts -// with an inherited instance method of the same name. - -import "package:expect/expect.dart"; - -class A { - dynamic foo = 42; // //# 00: ok - get foo => 42; // //# 01: ok - foo() => 42; // //# 02: compile-time error - set foo(value) { } // //# 03: ok -} - -class B extends A { - dynamic foo = 42; -} - -main() { - Expect.equals(42, new B().foo); -} diff --git a/tests/language_2/field/override_optimization_test.dart b/tests/language_2/field/override_optimization_test.dart deleted file mode 100644 index 7027a45c1bd..00000000000 --- a/tests/language_2/field/override_optimization_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A { - final bool flag = true; - final int x = 42; -} - -class B extends A { - bool flag; - int x; -} - -void main() { - A a = new B(); - var exception; - try { - if (a.flag) { - Expect.fail('This should be unreachable'); - } else { - Expect.fail('This should also be unreachable'); - } - } on AssertionError catch (e) { - exception = e; - } - Expect.isTrue(exception is AssertionError); - Expect.throws(() => a.x + 8); -} diff --git a/tests/language_2/field/override_test.dart b/tests/language_2/field/override_test.dart deleted file mode 100644 index b57f3d450ea..00000000000 --- a/tests/language_2/field/override_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2012, 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. -// Test overriding of fields. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A {} - -class B1 extends A {} - -class B2 extends A {} - -class Super { - Super() : super(); - - B1 field; -} - -class Sub extends Super { - Sub() : super(); - - // Invalid override. The type of 'Sub.field' ('() → A') isn't a subtype of - // 'Super.field' ('() → B1'). - A field; // //# 00: compile-time error -} - -class SubSub extends Super { - SubSub() : super(); - - // B2 not assignable to B1 - B2 field; // //# 01: compile-time error -} - -main() { - SubSub val1 = new SubSub(); - val1.field = new B2(); //# 02: compile-time error - Expect.equals(true, val1.field is B2); //# 02: continued - - Sub val2 = new Sub(); - val2.field = new A(); //# none: compile-time error - Expect.equals(true, val2.field is A); - Expect.equals(false, val2.field is B1); - Expect.equals(false, val2.field is B2); - - Super val3 = new Super(); - val3.field = new B1(); - Expect.equals(true, val3.field is B1); - Expect.equals(false, val3.field is B2); -} diff --git a/tests/language_2/field/parameter_test.dart b/tests/language_2/field/parameter_test.dart deleted file mode 100644 index d51525a769f..00000000000 --- a/tests/language_2/field/parameter_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing setting/getting of instance fields. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - var x = 4; - A(this.x); - A.named([this.x]); - A.named2([this.x = 2]); - A.named3(); -} - -class B extends A { - B(x) : super(x + 10); - B.named_() : super.named(); - B.named(x) : super.named(x + 10); - B.named2_() : super.named2(); - B.named2(x) : super.named2(x + 10); - B.named3() : super.named3(); -} - -main() { - Expect.equals(0, new A(0).x); - Expect.equals(null, new A.named().x); - Expect.equals(1, new A.named(1).x); - Expect.equals(2, new A.named2().x); - Expect.equals(3, new A.named2(3).x); - Expect.equals(4, new A.named3().x); - - Expect.equals(10, new B(0).x); - Expect.equals(null, new B.named_().x); - Expect.equals(11, new B.named(1).x); - Expect.equals(2, new B.named2_().x); - Expect.equals(13, new B.named2(3).x); - Expect.equals(4, new B.named3().x); -} diff --git a/tests/language_2/field/super_access2_test.dart b/tests/language_2/field/super_access2_test.dart deleted file mode 100644 index 84c9b622ae4..00000000000 --- a/tests/language_2/field/super_access2_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 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 - -// Tests that a super call to access a field in a super class is just a normal -// field access. - -import "package:expect/expect.dart"; - -class A { - final int y = 42; -} - -class B extends A { - int get x => super.y; - void set x(val) {} -} - -void main() { - var b = new B(); - Expect.equals(42, b.x); -} diff --git a/tests/language_2/field/super_access_test.dart b/tests/language_2/field/super_access_test.dart deleted file mode 100644 index 8951668849e..00000000000 --- a/tests/language_2/field/super_access_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2016, 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 - -// Tests that a super call to access a field in a super class is just a normal -// field access. - -import "package:expect/expect.dart"; - -class A { - int y; -} - -class B extends A { - int get x => super.y; - void set x(val) { - super.y = val; - } -} - -void main() { - var b = new B(); - b.x = 42; - Expect.equals(42, b.x); -} diff --git a/tests/language_2/field/type_check2_test.dart b/tests/language_2/field/type_check2_test.dart deleted file mode 100644 index 3189789b980..00000000000 --- a/tests/language_2/field/type_check2_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012, 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 - -class A { - A a; - - bar(c) { - c.a = 2; //# 01: runtime error - } -} - -class B { - int a; -} - -main() { - new A().bar(new A()); //# 01: continued - new A().bar(new B()); -} diff --git a/tests/language_2/field/type_check_runtime_test.dart b/tests/language_2/field/type_check_runtime_test.dart deleted file mode 100644 index 97085f282a1..00000000000 --- a/tests/language_2/field/type_check_runtime_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -class A { - int e; -} - -int main() { - -} diff --git a/tests/language_2/field/type_check_test.dart b/tests/language_2/field/type_check_test.dart deleted file mode 100644 index 382bfdbdbe1..00000000000 --- a/tests/language_2/field/type_check_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2012, 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 - -class A { - int e; -} - -int main() { - new A().e = "String"; - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. -} diff --git a/tests/language_2/field/wierd_name_test.dart b/tests/language_2/field/wierd_name_test.dart deleted file mode 100644 index 1b50ebf7abd..00000000000 --- a/tests/language_2/field/wierd_name_test.dart +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) 2017, 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 test program for testing setting/getting of instance fields. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// dart2js used to have a bug where a local called '_' in the constructor -// shadowed the parameter named after a field. This lead to the field being -// initialized to 'this' (a cycle) rather than the correct initializer value. -// -// This test is in the language tests rather than dart2js specific tests since -// the dart2js specific tests are not run in all configurations that could -// tickle this issue. - -int ii = 0; - -class Thing { - var _; - var $_; - // Extra fields to make use of local in constructor beneficial and to exhaust - // single-character names. - var a = ++ii, b = ++ii, c = ++ii, d = ++ii, e = ++ii; - var f = ++ii, g = ++ii, h = ++ii, i = ++ii, j = ++ii; - var k = ++ii, l = ++ii, m = ++ii, n = ++ii, o = ++ii; - var p = ++ii, q = ++ii, r = ++ii, s = ++ii, t = ++ii; - var u = ++ii, v = ++ii, w = ++ii, x = ++ii, y = ++ii; - var z = ++ii; - var A = ++ii, B = ++ii, C = ++ii, D = ++ii, E = ++ii; - var F = ++ii, G = ++ii, H = ++ii, I = ++ii, J = ++ii; - var K = ++ii, L = ++ii, M = ++ii, N = ++ii, O = ++ii; - var P = ++ii, Q = ++ii, R = ++ii, S = ++ii, T = ++ii; - var U = ++ii, V = ++ii, W = ++ii, X = ++ii, Y = ++ii; - var Z = ++ii; - var $ = ++ii; - - var f30 = ++ii, f31 = ++ii, f32 = ++ii, f33 = ++ii, f34 = ++ii; - var f35 = ++ii, f36 = ++ii, f37 = ++ii, f38 = ++ii, f39 = ++ii; - var f40 = ++ii, f41 = ++ii, f42 = ++ii, f43 = ++ii, f44 = ++ii; - var f45 = ++ii, f46 = ++ii, f47 = ++ii, f48 = ++ii, f49 = ++ii; - var f50 = ++ii, f51 = ++ii, f52 = ++ii, f53 = ++ii, f54 = ++ii; - var f55 = ++ii, f56 = ++ii, f57 = ++ii, f58 = ++ii, f59 = ++ii; - - @pragma('dart2js:noInline') - Thing(this._, this.$_); - toString() { - if (depth > 0) return 'recursion!'; - try { - ++depth; - var sum = a + - b + - c + - d + - e + - f + - g + - h + - i + - j + - k + - l + - m + - n + - o + - p + - q + - r + - s + - t + - u + - v + - w + - x + - y + - z + - A + - B + - C + - D + - E + - F + - G + - H + - I + - J + - K + - L + - M + - N + - O + - P + - Q + - R + - S + - T + - U + - V + - W + - X + - Y + - Z + - $ + - f30 + - f31 + - f32 + - f33 + - f34 + - f35 + - f36 + - f37 + - f38 + - f39 + - f40 + - f41 + - f42 + - f43 + - f44 + - f45 + - f46 + - f47 + - f48 + - f49 + - f50 + - f51 + - f52 + - f53 + - f54 + - f55 + - f56 + - f57 + - f58 + - f59; - return 'Thing(${_}, ${$_}, ${sum})'; - } finally { - --depth; - } - } - - static int depth = 0; -} - -main() { - var t1 = new Thing(1, 2); - var t2 = new Thing(3, 4); - var t3 = []; - - Expect.equals( - '[Thing(1, 2, 3486), Thing(3, 4, 10375), []]', '${[t1, t2, t3]}'); -} diff --git a/tests/language_2/final/attempt_reinitialization_runtime_test.dart b/tests/language_2/final/attempt_reinitialization_runtime_test.dart deleted file mode 100644 index 9cc11b592a4..00000000000 --- a/tests/language_2/final/attempt_reinitialization_runtime_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -class Foo { - - -} - -class CoffeeShop { - - - -} - -void main() { - - - -} diff --git a/tests/language_2/final/attempt_reinitialization_test.dart b/tests/language_2/final/attempt_reinitialization_test.dart deleted file mode 100644 index 89cd75d53fe..00000000000 --- a/tests/language_2/final/attempt_reinitialization_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2017, 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 - -class Foo { - Foo(this.x); - // ^ - // [analyzer] COMPILE_TIME_ERROR.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR - // [cfe] 'x' is a final instance variable that was initialized at the declaration. - final int x = 42; -} - -class CoffeeShop { - final String shopName = "Coffee Lab"; - CoffeeShop.name(String shopName) - : this.shopName = shopName; - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION - // ^ - // [cfe] 'shopName' is a final instance variable that was initialized at the declaration. -} - -void main() { - Foo f = new Foo(10); - CoffeeShop presidentialCoffee = - new CoffeeShop.name("Covfefe Lab"); -} diff --git a/tests/language_2/final/field_initialization_order_test.dart b/tests/language_2/final/field_initialization_order_test.dart deleted file mode 100644 index eb9cd2f88e1..00000000000 --- a/tests/language_2/final/field_initialization_order_test.dart +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test that initializers for final fields are evaluated in the right -// order. - -int counter = 0; - -class Mark { - static StringBuffer buffer; - Mark(value) { - buffer.write('$value.'); - } -} - -class OneField { - final a = new Mark('a'); - OneField(); -} - -class TwoFields { - final a = new Mark('a'); - final b = new Mark('b'); - TwoFields(); -} - -class InheritOneField extends OneField { - final b = new Mark('b'); - InheritOneField(); -} - -class MixedFields extends OneField { - final b = new Mark('b'); - var c = new Mark('c'); - final d = new Mark('d'); - MixedFields(); - MixedFields.c0() : c = new Mark('cc'); - MixedFields.c1() - : c = new Mark('cc'), - super(); -} - -String run(callback) { - Mark.buffer = new StringBuffer(); - callback(); - return Mark.buffer.toString(); -} - -main() { - Expect.equals('a.', run(() => new OneField())); - Expect.equals('a.b.', run(() => new TwoFields())); - Expect.equals('b.a.', run(() => new InheritOneField())); - - Expect.equals('b.c.d.a.', run(() => new MixedFields())); - Expect.equals('b.c.d.cc.a.', run(() => new MixedFields.c0())); - Expect.equals('b.c.d.cc.a.', run(() => new MixedFields.c1())); -} diff --git a/tests/language_2/final/field_override_test.dart b/tests/language_2/final/field_override_test.dart deleted file mode 100644 index d17629fe6e1..00000000000 --- a/tests/language_2/final/field_override_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -class A { - int _x = 42; - void set x(int val) { - _x = val; - } - - int get x => _x; -} - -class B extends A { - final x = 3; - // we can still get to the super property - int get y => _x; -} - -void main() { - var b = new B(); - Expect.equals(3, b.x); - - b.x = 21; - Expect.equals(3, b.x); - Expect.equals(21, b.y); -} diff --git a/tests/language_2/final/for_in_variable_test.dart b/tests/language_2/final/for_in_variable_test.dart deleted file mode 100644 index 7fb8aa63ac6..00000000000 --- a/tests/language_2/final/for_in_variable_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2012, 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() { - for (final i in [1, 2, 3]) { - i = 4; -// ^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL -// [cfe] Can't assign to the final variable 'i'. - } -} diff --git a/tests/language_2/final/initializer_instance_reference_test.dart b/tests/language_2/final/initializer_instance_reference_test.dart deleted file mode 100644 index be02d1ec0a6..00000000000 --- a/tests/language_2/final/initializer_instance_reference_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2016, 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 - -// Dart2js regression test. Error in initializer might be report with the wrong -// current element. - -class C { - const C(); -//^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST - - final x = 1; - final y = x; - // ^ - // [analyzer] COMPILE_TIME_ERROR.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER - // [cfe] Can't access 'this' in a field initializer to read 'x'. - // [cfe] Not a constant expression. -} - -main() { - const C().y; -} diff --git a/tests/language_2/final/is_not_const_test.dart b/tests/language_2/final/is_not_const_test.dart deleted file mode 100644 index e00c708980a..00000000000 --- a/tests/language_2/final/is_not_const_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -final F0 = 42; -const C0 = F0; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE -// [cfe] Constant evaluation error: -// [cfe] Not a constant expression. - -main() { - Expect.equals(42, F0); - Expect.equals(42, C0); -} diff --git a/tests/language_2/final/param_test.dart b/tests/language_2/final/param_test.dart deleted file mode 100644 index 3711e780c4d..00000000000 --- a/tests/language_2/final/param_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// 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. -// Disallow assignment of parameters marked as final. - -// @dart = 2.9 - -class A { - static void test(final x) { - x = 2; -// ^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL -// [cfe] Can't assign to the final variable 'x'. - } -} - -main() { - A.test(1); -} diff --git a/tests/language_2/final/super_field_set_test.dart b/tests/language_2/final/super_field_set_test.dart deleted file mode 100644 index 8cd8156637f..00000000000 --- a/tests/language_2/final/super_field_set_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2015, 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 - -class SuperClass { - final field = 0; - noSuchMethod(_) => 42; -} - -class Class extends SuperClass { - m() { - super.field = 87; - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SUPER_MEMBER - // [cfe] Superclass has no setter named 'field'. - } -} - -main() { - new Class().m(); -} diff --git a/tests/language_2/final/syntax_test.dart b/tests/language_2/final/syntax_test.dart deleted file mode 100644 index c83d57381a8..00000000000 --- a/tests/language_2/final/syntax_test.dart +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - final f0 = 42; - final f1; //# 01: compile-time error - final int f2 = 87; - final int f3; //# 02: compile-time error - Expect.equals(42, f0); - Expect.equals(87, f2); - - Expect.equals(42, F0); - Expect.equals(null, F1); //# 03: continued - Expect.equals(87, F2); - Expect.equals(null, F3); //# 04: continued - - Expect.isTrue(P0 is Point); - Expect.isTrue(P1 is int); - Expect.isTrue(P2 is Point); - Expect.isTrue(P3 is int); - - Expect.isTrue(A0 is int); - Expect.isTrue(A1 is int); - Expect.isTrue(A2 is int); //# 08: runtime error - Expect.isTrue(A3 is int); //# 08: continued - - Expect.isTrue(C0.X is C1); - Expect.isTrue(C0.X.x is C1); //# 09: compile-time error - - Expect.equals("Hello 42", B2); - Expect.equals("42Hello", B3); //# 10: compile-time error -} - -final F0 = 42; -final F1; // //# 03: syntax error -final int F2 = 87; -final int F3; // //# 04: syntax error - -class Point { - final x, y; - const Point(this.x, this.y); - operator +(int other) => x; -} - -// Check that compile time expressions can include invocations of -// user-defined final constructors. -final P0 = const Point(0, 0); -final P1 = const Point(0, 0) + 1; -final P2 = new Point(0, 0); -final P3 = new Point(0, 0) + 1; - -// Check that we cannot have cyclic references in compile time -// expressions. -final A0 = 42; -final A1 = A0 + 1; -final dynamic A2 = A3 + 1; //# 08: continued -final dynamic A3 = A2 + 1; //# 08: continued - -class C0 { - static final X = const C1(); -} - -class C1 { - const C1() - : x = C0.X //# 09: continued - ; - final x = null; -} - -// Check that sub-expressions of binary + are numeric. -final B0 = 42; -final B1 = "Hello"; -final B2 = "$B1 $B0"; -final B3 = B0 + B1; //# 10: continued diff --git a/tests/language_2/final/used_in_try_test.dart b/tests/language_2/final/used_in_try_test.dart deleted file mode 100644 index 3415c92c3eb..00000000000 --- a/tests/language_2/final/used_in_try_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - while (true) { - final a = 'fff'.substring(1, 2); - try { - Expect.equals('f', a); - } catch (e) { - rethrow; - } - break; - } -} diff --git a/tests/language_2/final/variable_assignment_runtime_test.dart b/tests/language_2/final/variable_assignment_runtime_test.dart deleted file mode 100644 index b4d4253e8e8..00000000000 --- a/tests/language_2/final/variable_assignment_runtime_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -// Test to make sure we catch assignments to final local variables. - -main() { - final x = 30; - - - - -} diff --git a/tests/language_2/final/variable_assignment_test.dart b/tests/language_2/final/variable_assignment_test.dart deleted file mode 100644 index 9586f487668..00000000000 --- a/tests/language_2/final/variable_assignment_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012, 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 - -// Test to make sure we catch assignments to final local variables. - -main() { - final x = 30; - x = 0; -//^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL -// [cfe] Can't assign to the final variable 'x'. - x += 1; -//^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL -// [cfe] Can't assign to the final variable 'x'. - ++x; - //^ - // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL - // [cfe] Can't assign to the final variable 'x'. - x++; -//^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL -// [cfe] Can't assign to the final variable 'x'. -} diff --git a/tests/language_2/fixed_size_int/README.md b/tests/language_2/fixed_size_int/README.md deleted file mode 100644 index 6b768e9dc51..00000000000 --- a/tests/language_2/fixed_size_int/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Feature tests for fixed size integers - -This directory was created in order to hold tests pertaining to the Dart -feature which changes the `int` type to have a fixed-size representation -(as opposed to implicitly transitioning into an arbitrary bigint -representation when needed). For more details, please check the -[informal specification](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/int64.md). diff --git a/tests/language_2/function/apply_generic2_test.dart b/tests/language_2/function/apply_generic2_test.dart deleted file mode 100644 index 8bfaa55ee0d..00000000000 --- a/tests/language_2/function/apply_generic2_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -makeFn() { - return ({T a1, T a2, T a3, T a4, T a5}) { - return [a1, a2, a3, a4, a5]; - }; -} - -staticFn({T a1, T a2, T a3, T a4, T a5, T xx}) { - return [a1, a2, a3, a4, a5, xx]; -} - -class CCC { - memberFn({T a1, T a2, T a3, T a4, T a5, T yy}) { - return [a1, a2, a3, a4, a5, yy]; - } -} - -check(a, b) { - print('a: $a\nb: $b'); - Expect.equals(a.toString(), b.toString()); -} - -main() { - check('[null, 33, null, 11, 22, null]', - Function.apply(new CCC().memberFn, [], {#a4: 11, #a5: 22, #a2: 33})); - - Expect.throwsTypeError( - () => Function.apply(new CCC().memberFn, [], {#a3: 'hi'})); - - check('[11, 22, 33, null, null]', - Function.apply(makeFn(), [], {#a1: 11, #a2: 22, #a3: 33})); - - check('[null, 33, null, 11, 22]', - Function.apply(makeFn(), [], {#a4: 11, #a5: 22, #a2: 33})); - - Expect.throwsTypeError(() => Function.apply(makeFn(), [], {#a3: 'hi'})); - - check('[null, 33, null, 11, 22, null]', - Function.apply(staticFn, [], {#a4: 11, #a5: 22, #a2: 33})); - - Expect.throwsTypeError(() => Function.apply(staticFn, [], {#a3: 'hi'})); -} diff --git a/tests/language_2/function/apply_generic_test.dart b/tests/language_2/function/apply_generic_test.dart deleted file mode 100644 index c5af4c1184b..00000000000 --- a/tests/language_2/function/apply_generic_test.dart +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -List staticFn( - [T a1, T a2, T a3, T a4, T a5, T a6, T a7, T a8, T a9, T a10]) { - return [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10]; -} - -class C { - List memberFn( - [T a1, T a2, T a3, T a4, T a5, T a6, T a7, T a8, T a9, T a10]) { - return [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10]; - } - - // Intercepted, e.g. on JSArray. - List map( - [T a1, T a2, T a3, T a4, T a5, T a6, T a7, T a8, T a9, T a10]) { - return [a1, a2, a3, a4, a5, a6, a7, a8, a9, a10]; - } -} - -check(a, b) { - print('a: $a\nb: $b'); - Expect.equals(a.toString(), b.toString()); -} - -main() { - check('[1, 2, 3, null, null, null, null, null, null, null]', - Function.apply(staticFn, [1, 2, 3])); - - check('[1, 2, 3, 4, null, null, null, null, null, null]', - Function.apply(staticFn, [1, 2, 3, 4])); - - check('[1, 2, 3, 4, 5, 6, 7, null, null, null]', - Function.apply(staticFn, [1, 2, 3, 4, 5, 6, 7])); - - var o = new C(); - dynamic memberFn1 = o.map; - - check('[1, 2, 3, null, null, null, null, null, null, null]', - Function.apply(memberFn1, [1, 2, 3])); - - check('[1, 2, 3, 4, null, null, null, null, null, null]', - Function.apply(memberFn1, [1, 2, 3, 4])); - - check('[1, 2, 3, 4, 5, 6, 7, null, null, null]', - Function.apply(memberFn1, [1, 2, 3, 4, 5, 6, 7])); - - dynamic memberFn2 = o.memberFn; - - check('[1, 2, 3, null, null, null, null, null, null, null]', - Function.apply(memberFn2, [1, 2, 3])); - - check('[1, 2, 3, 4, null, null, null, null, null, null]', - Function.apply(memberFn2, [1, 2, 3, 4])); - - check('[1, 2, 3, 4, 5, 6, 7, null, null, null]', - Function.apply(memberFn2, [1, 2, 3, 4, 5, 6, 7])); - - // TODO(sra): Apply of instantiations -} diff --git a/tests/language_2/function/argument_test.dart b/tests/language_2/function/argument_test.dart deleted file mode 100644 index e07f5a750a5..00000000000 --- a/tests/language_2/function/argument_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// 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 test for function passing. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class FunctionArgumentTest { - static testMe(Function f) { - return f(); - } - - static void testMain() { - Expect.equals(42, testMe(() { - return 42; - })); - } -} - -main() { - FunctionArgumentTest.testMain(); -} diff --git a/tests/language_2/function/call_generic_test.dart b/tests/language_2/function/call_generic_test.dart deleted file mode 100644 index f904806cce9..00000000000 --- a/tests/language_2/function/call_generic_test.dart +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2018, 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. -// dart2jsOptions=-Ddart.isdart2js=true - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -@pragma('dart2js:noInline') -List staticFn([T a1, T a2, T a3, T a4, T a5]) => [T, a1, a2, a3, a4, a5]; - -class C { - @pragma('dart2js:noInline') - List memberFn([T a1, T a2, T a3, T a4, T a5]) => [T, a1, a2, a3, a4, a5]; - - @pragma('dart2js:noInline') - // 'map' is implemented by native iterables. On dart2js, 'map' has interceptor - // calling convention. - List map([T a1, T a2, T a3, T a4, T a5]) => [T, a1, a2, a3, a4, a5]; -} - -check(expected, actual) { - print('a: $expected'); - print('b: $actual'); - if (((actual[0] == Object && expected[0] == dynamic) || - (actual[0] == dynamic && expected[0] == Object)) && - !const bool.fromEnvironment('dart.isdart2js')) { - // TODO(32483): dartdevk sometimes defaults type to 'Object' when 'dynamic' - // is required. Remove this hack when fixed. - // TODO(31581): dart2js needs instantiate-to-bound to generic 'dynamic' - // instead of 'Object'. - actual = actual.toList()..[0] = expected[0]; - print('b*: $actual'); - } - Expect.equals(expected.toString(), actual.toString()); -} - -main() { - check([dynamic, 1, 2, 3, null, null], staticFn(1 as dynamic, 2, 3)); - - check([Object, 'Z', 2, 4, null, null], staticFn('Z', 2, 4)); - - check([int, 3, 2, 1, null, null], staticFn(3, 2, 1)); - - dynamic f1 = staticFn; - - check([dynamic, 4, 2, 3, null, null], f1(4 as dynamic, 2, 3)); - - check([dynamic, 'Q', 2, 3, null, null], f1('Q', 2, 3)); - - check([dynamic, 6, 2, 3, null, null], f1(6, 2, 3)); - - check([int, 7, 2, null, null, null], f1(7, 2)); - - var c = new C(); - - check([dynamic, 8, 2, 3, null, null], c.memberFn(8 as dynamic, 2, 3)); - - check([Object, 'A', 2, 3, null, null], c.memberFn('A', 2, 3)); - - check([int, 9, 2, 3, null, null], c.memberFn(9, 2, 3)); - - check([dynamic, 10, 2, 3, null, null], c.map(10 as dynamic, 2, 3)); - - check([Object, 'B', 2, 3, null, null], c.map('B', 2, 3)); - - check([int, 11, 2, 3, null, null], c.map(11, 2, 3)); - - dynamic o = new C(); - - check([dynamic, 12, 2, 3, null, null], o.memberFn(12 as dynamic, 2, 3)); - - check([dynamic, 'C', 2, 3, null, null], o.memberFn('C', 2, 3)); - - check([int, 13, 2, null, null, null], o.memberFn(13, 2)); - - check([dynamic, 14, 2, 3, null, null], o.map(14 as dynamic, 2, 3)); - - check([dynamic, 'D', 2, 3, null, null], o.map('D', 2, 3)); - - check([int, 15, null, null, null, null], o.map(15)); - - check([int, 16, 2, 3, 4, null], o.map(16, 2, 3, 4)); -} diff --git a/tests/language_2/function/field_test.dart b/tests/language_2/function/field_test.dart deleted file mode 100644 index 2be3bae63af..00000000000 --- a/tests/language_2/function/field_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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. -// VMOptions=--fatal-type-errors --enable_type_checks -// -// Test of calling Function, which is field of some class. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Wrapper { - Function f; -} - -main() { - Wrapper w = new Wrapper(); - w.f = () { - return 42; - }; - Expect.equals(42, w.f()); -} diff --git a/tests/language_2/function/function_test.dart b/tests/language_2/function/function_test.dart deleted file mode 100644 index a08cd05571f..00000000000 --- a/tests/language_2/function/function_test.dart +++ /dev/null @@ -1,380 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Tests function statements and expressions. - -class Bug4089219 { - int x; - var f; - - Bug4089219(int i) : this.x = i { - f = () => x; - } -} - -class Bug4342163 { - final m; - Bug4342163(int a) : this.m = (() => a) {} -} - -class StaticFunctionDef { - static const int one = 1; - static var fn1; - static var fn2; - static var fn3; - - static init() { - fn1 = () { - return one; - }; - fn2 = () { - return (() { - return one; - })(); - }; - fn3 = () { - final local = 1; - return (() { - return local; - })(); - }; - } -} - -class A { - var ma; - A(a) { - ma = a; - } -} - -class B1 extends A { - final mfn; - B1(int a) - : this.mfn = (() { - return a; - }), - super(a); -} - -class B2 extends A { - final mfn; - B2(int a) - : this.mfn = (() { - return a; - }), - super(2); -} - -class B3 extends A { - final mfn; - B3(int a) - : this.mfn = (() { - return a; - }), - super(() { - return a; - }); -} - -typedef void Fisk(); - -class FunctionTest { - FunctionTest() {} - - static void testMain() { - var test = new FunctionTest(); - test.testForEach(); - test.testVarOrder1(); - test.testVarOrder2(); - test.testLexicalClosureRef1(); - test.testLexicalClosureRef2(); - test.testLexicalClosureRef3(); - test.testLexicalClosureRef4(); - test.testLexicalClosureRef5(); - test.testDefaultParametersOrder(); - test.testParametersOrder(); - test.testFunctionDefaults1(); - test.testFunctionDefaults2(); - test.testEscapingFunctions(); - test.testThisBinding(); - test.testFnBindingInStatics(); - test.testFnBindingInInitLists(); - test.testSubclassConstructorScopeAlias(); - } - - void testSubclassConstructorScopeAlias() { - var b1 = new B1(10); - Expect.equals(10, (b1.mfn)()); - Expect.equals(10, b1.ma); - - var b2 = new B2(11); - Expect.equals(11, (b2.mfn)()); - Expect.equals(2, b2.ma); - - var b3 = new B3(12); - Expect.equals(12, (b3.mfn)()); - Expect.equals(12, (b3.ma)()); - } - - void testFnBindingInInitLists() { - Expect.equals(1, (new Bug4342163(1).m)()); - } - - void testFnBindingInStatics() { - StaticFunctionDef.init(); - Expect.equals(1, ((StaticFunctionDef.fn1)())); - Expect.equals(1, ((StaticFunctionDef.fn2)())); - Expect.equals(1, ((StaticFunctionDef.fn3)())); - } - - Fisk testReturnVoidFunction() { - void f() {} - Fisk x = f; - return f; - } - - void testVarOrder1() { - var a = 0, b = a++, c = a++; - - Expect.equals(a, 2); - Expect.equals(b, 0); - Expect.equals(c, 1); - } - - void testVarOrder2() { - var a = 0; - f() { - return a++; - } - - ; - var b = f(), c = f(); - - Expect.equals(a, 2); - Expect.equals(b, 0); - Expect.equals(c, 1); - } - - void testLexicalClosureRef1() { - var a = 1; - var f, g; - { - var b = 2; - f = () { - return b - a; - }; - } - - { - var b = 3; - g = () { - return b - a; - }; - } - Expect.equals(1, f()); - Expect.equals(2, g()); - } - - void testLexicalClosureRef2() { - var a = 1; - var f, g; - { - var b = 2; - f = () { - return (() { - return b - a; - })(); - }; - } - - { - var b = 3; - g = () { - return (() { - return b - a; - })(); - }; - } - Expect.equals(1, f()); - Expect.equals(2, g()); - } - - void testLexicalClosureRef3() { - var a = []; - for (int i = 0; i < 10; i++) { - var x = i; - a.add(() { - return x; - }); - } - - var sum = 0; - for (int i = 0; i < a.length; i++) { - sum += (a[i])(); - } - - Expect.equals(45, sum); - } - - void testLexicalClosureRef5() { - { - var a; - Expect.equals(null, a); - a = 1; - Expect.equals(1, a); - } - - { - var a; - Expect.equals(null, a); - a = 1; - Expect.equals(1, a); - } - } - - // Make sure labels are preserved, and a second 'i' does influence the first. - void testLexicalClosureRef4() { - var a = []; - x: - for (int i = 0; i < 10; i++) { - a.add(() { - return i; - }); - continue x; - } - - var sum = 0; - for (int i = 0; i < a.length; i++) { - sum += (a[i])(); - } - - Expect.equals(45, sum); - } - - int tempField; - - void testForEach() { - List vals = [1, 2, 3]; - int total = 0; - vals.forEach((int v) { - total += v; - }); - Expect.equals(6, total); - } - - void testDefaultParametersOrder() { - f([a = 1, b = 3]) { - return a - b; - } - - Expect.equals(-2, f()); - } - - void testParametersOrder() { - f(a, b) { - return a - b; - } - - Expect.equals(-2, f(1, 3)); - } - - void testFunctionDefaults1() { - // TODO(jimhug): This return null shouldn't be necessary. - f() { - return null; - } - - ; - (([a = 10]) { - Expect.equals(10, a); - })(); - ((a, [b = 10]) { - Expect.equals(10, b); - })(1); - (([a = 10]) { - Expect.equals(null, a); - })(f()); - // FAILS: (([a = 10]) { Expect.equals(null ,a); })( f() ); - } - - void testFunctionDefaults2() { - Expect.equals(10, helperFunctionDefaults2()); - Expect.equals(1, helperFunctionDefaults2(1)); - } - - num helperFunctionDefaults2([a = 10]) { - return (() { - return a; - })(); - } - - void testEscapingFunctions() { - f() { - return 42; - } - - ; - (() { - Expect.equals(42, f()); - })(); - var o = new Bug4089219(42); - Expect.equals(42, (o.f)()); - } - - void testThisBinding() { - Expect.equals(this, () { - return this; - }()); - } -} - -typedef void Foo(A a, B b); - -class Bar { - Foo field; - Bar(A a, B b) : this.field = ((A a1, B b2) {}) { - field(a, b); - } -} - -typedef UntypedFunction(arg); -typedef UntypedFunction2(arg); - -class UseFunctionTypes { - void test() { - Function f = null; - UntypedFunction uf = null; - UntypedFunction2 uf2 = null; - Foo foo = null; - Foo fooIntString = null; - Foo fooObjectObject = null; - - f = uf; - f = uf2; - f = foo; - f = fooIntString; - - uf = f; - uf2 = f; - foo = f; - fooIntString = f; - - fooIntString = foo; - - foo = fooObjectObject; - fooObjectObject = foo; - - uf = uf2; - uf2 = uf; - } -} - -main() { - FunctionTest.testMain(); -} diff --git a/tests/language_2/function/getter_test.dart b/tests/language_2/function/getter_test.dart deleted file mode 100644 index 81a70a975ee..00000000000 --- a/tests/language_2/function/getter_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - a() => 42; -} - -main() { - Expect.equals(new A().a(), (new A().a)()); -} diff --git a/tests/language_2/function/literals2_test.dart b/tests/language_2/function/literals2_test.dart deleted file mode 100644 index 0c99d59e4a8..00000000000 --- a/tests/language_2/function/literals2_test.dart +++ /dev/null @@ -1,115 +0,0 @@ -// 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 test for new function type alias. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class FunctionLiteralsTest { - static void testMain() { - f(x) { - return x * 2; - } - - f(42); // make sure it is parsed as a function call - Expect.equals(20, f(10)); - - int g(x) { - return x * 2; - } - - g(42); // make sure it is parsed as a function call - Expect.equals(20, g(10)); - - h(x) { - return x * 2; - } - - h(42); // make sure it is parsed as a function call - Expect.equals(20, h(10)); - - dynamic a = (x) { - return x + 2; - }; - Expect.equals(7, a(5)); - - Expect.equals( - 10, - apply((k) { - return k << 1; - }, 5)); - Expect.equals(20, apply((k) => k << 1, 10)); - - a = new A(3); - Expect.equals(-1, a.f); - Expect.equals(-3, a.f2); - - a = new A.n(5); - Expect.equals(-2, a.f); - Expect.equals(2, a.f2); - - Expect.equals(true, isOdd(5)); - Expect.equals(false, isOdd(8)); - - var b = new B(10); - Expect.equals(10, b.n); - Expect.equals(100, (b.f)(10)); - - b = new B.withZ(10); - Expect.equals(10, b.n); - Expect.equals(101, (b.f)(10)); - - var c = new C(5); - Expect.equals("2*x is 10", c.s); - - int x = 0; - int y = 1; - // make sure this isn't parsed as a generic type - Expect.isTrue(x < y, "foo"); - } -} - -apply(f, n) { - return f(n); -} - -bool isOdd(b) => b % 2 == 1; - -class A { - int f; - int f2; - A(p) : f = apply((j) => 2 - j, p) { - /* constr. body */ - f2 = -p; - } - A.n(p) : f = 1 + apply((j) => 2 - j, p) { - /* constr. body */ - f2 = -f; - } -} - -class B { - var f; - int n; - B(z) : f = ((x) => x * x) { - n = z; - } - B.withZ(z) - : f = ((x) { - return x * x + 1; - }) { - n = z; - } -} - -class C { - String s; - C(x) : s = "2*x is ${() { return 2*x; }()}"; -} - -main() { - FunctionLiteralsTest.testMain(); -} diff --git a/tests/language_2/function/literals_test.dart b/tests/language_2/function/literals_test.dart deleted file mode 100644 index f3eee9e40dd..00000000000 --- a/tests/language_2/function/literals_test.dart +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -/** - * Test various forms of function literals. - */ -typedef int IntFunc(int); - -class FunctionLiteralsTest { - static void checkIntFunction(expected, int f(T x), arg) { - Expect.equals(expected, f(arg)); - } - - static void checkIntFuncFunction(expected, IntFunc f(T x), arg) { - Expect.equals(expected, f(arg)(arg)); - } - - int func1(int x) => x; - - int func2(x) => x; - - int func3(int x) { - return x; - } - - int func4(x) { - return x; - } - - FunctionLiteralsTest() {} - - static void testMain() { - var test = new FunctionLiteralsTest(); - test.testArrow(); - test.testArrowArrow(); - test.testArrowBlock(); - test.testBlock(); - test.testBlockArrow(); - test.testBlockBlock(); - test.testFunctionRef(); - } - - void testArrow() { - checkIntFunction(42, (x) => x, 42); - checkIntFunction(42, (dynamic x) => x, 42); - } - - void testArrowArrow() { - checkIntFuncFunction(84, (x) => (y) => x + y, 42); - checkIntFuncFunction(84, (dynamic x) => (y) => x + y, 42); - } - - void testArrowBlock() { - checkIntFuncFunction( - 84, - (x) => (y) { - return x + y; - }, - 42); - checkIntFuncFunction( - 84, - (int x) => (y) { - return x + y; - }, - 42); - } - - void testBlock() { - checkIntFunction(42, (x) { - return x; - }, 42); - checkIntFunction(42, (int x) { - return x; - }, 42); - } - - void testBlockArrow() { - checkIntFuncFunction(84, (x) { - return (y) => x + y; - }, 42); - checkIntFuncFunction(84, (int x) { - return (y) => (x + y) as int; - }, 42); - } - - void testBlockBlock() { - checkIntFuncFunction(84, (x) { - return (y) { - return x + y; - }; - }, 42); - checkIntFuncFunction(84, (int x) { - return (y) { - return x + y; - }; - }, 42); - } - - void testFunctionRef() { - checkIntFunction(42, func1, 42); - checkIntFunction(42, func2, 42); - checkIntFunction(42, func3, 42); - checkIntFunction(42, func4, 42); - } -} - -main() { - FunctionLiteralsTest.testMain(); -} diff --git a/tests/language_2/function/local2_test.dart b/tests/language_2/function/local2_test.dart deleted file mode 100644 index e7045dae244..00000000000 --- a/tests/language_2/function/local2_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// 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 test program testing closures. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -typedef T F(T t); - -class Parameterized { - Parameterized() {} - T mul3(F f, T t) { - return (3 as dynamic) * f(t); - } - - T test(T t) { - return mul3((T t) { - return (3 as dynamic) * t; - }, t); - } -} - -class LocalFunction2Test { - static int f(int n) { - int a = 0; - var g = (int n) { - a += n; - return a; - }; - var h = (int n) { - a += 10 * n; - return a; - }; - return g(n) + h(n); - } - - static testMain() { - Expect.equals(3 + 33, f(3)); - Expect.equals(9.0, new Parameterized().test(1.0)); - } -} - -main() { - LocalFunction2Test.testMain(); -} diff --git a/tests/language_2/function/local3_test.dart b/tests/language_2/function/local3_test.dart deleted file mode 100644 index 88d2878a5ca..00000000000 --- a/tests/language_2/function/local3_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// 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 test program testing closures. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class LocalFunction3Test { - static testExceptions() { - dynamic f = (int n) { - return n + 1; - }; - Expect.equals(true, f is Object); - bool exception_caught = false; - try { - f.xyz(0); - } on NoSuchMethodError { - exception_caught = true; - } - Expect.equals(true, exception_caught); - exception_caught = false; - String f_string; - try { - f_string = f.toString(); - } on NoSuchMethodError { - exception_caught = true; - } - Expect.equals(false, exception_caught); - Expect.equals(true, f_string.startsWith("Closure")); - } - - static testMain() { - testExceptions(); - } -} - -main() { - LocalFunction3Test.testMain(); -} diff --git a/tests/language_2/function/local_function_test.dart b/tests/language_2/function/local_function_test.dart deleted file mode 100644 index a48f0df2375..00000000000 --- a/tests/language_2/function/local_function_test.dart +++ /dev/null @@ -1,229 +0,0 @@ -// 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 test program testing closures. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class LocalFunctionTest { - LocalFunctionTest() - : field1 = 100, - field2_ = 200 {} - static int f(int n) { - int a = 0; - g(int m) { - a = 3 * n + m + 1; // Capture parameter n and local a. - return a; - } - - var b = g(n); - return a + b; - } - - static int h(int n) { - k(int n) { - var a = new List.filled(n, null); - var b = new List.filled(n, null); - int i; - for (i = 0; i < n; i++) { - var j = i; - a[i] = () => i; // Captured i is always n. - b[i] = () => j; // Captured j varies from 0 to n-1. - } - var a_sum = 0; - var b_sum = 0; - for (int i = 0; i < n; i++) { - a_sum += a[i](); - b_sum += b[i](); - } - return a_sum + b_sum; - } - - return k(n); - } - - static int h2(int n) { - k(int n) { - var a = new List.filled(n, null); - var b = new List.filled(n, null); - for (int i = 0; i < n; i++) { - var j = i; - a[i] = () => i; // Captured i varies from 0 to n-1. - b[i] = () => j; // Captured j varies from 0 to n-1. - } - var a_sum = 0; - var b_sum = 0; - for (int i = 0; i < n; i++) { - a_sum += a[i](); - b_sum += b[i](); - } - return a_sum + b_sum; - } - - return k(n); - } - - int field1; - int field2_; - int get field2 { - return field2_; - } - - void set field2(int value) { - field2_ = value; - } - - int method(int n) { - incField1() { - field1++; - } - - incField2() { - field2++; - } - - for (int i = 0; i < n; i++) { - incField1(); - incField2(); - } - return field1 + field2; - } - - int execute(int times, apply(int x)) { - for (int i = 0; i < times; i++) { - apply(i); - } - return field1; - } - - int testExecute(int n) { - execute(n, (int x) { - field1 += x; - }); - return field1; - } - - static int foo(int n) { - return -100; // Wrong foo. - } - - static testSelfReference1(int n) { - int foo(int n) { - if (n == 0) { - return 0; - } else { - return 1 + foo(n - 1); // Local foo, not static foo. - } - } - - ; - return foo(n); // Local foo, not static foo. - } - - static void hep(Function f) { - f(); - } - - static testNesting(int n) { - var a = new List.filled(n * n, null); - f0() { - for (int i = 0; i < n; i++) { - int vi = i; - f1() { - for (int j = 0; j < n; j++) { - int vj = j; - a[i * n + j] = () => vi * n + vj; - } - } - - f1(); - } - } - - f0(); - int result = 0; - for (int k = 0; k < n * n; k++) { - Expect.equals(k, a[k]()); - result += a[k](); - } - return result; - } - - static var field5; - static var set_field5_func; - static testClosureCallStatement(int x) { - LocalFunctionTest.set_field5_func = (int n) { - field5 = n * n; - }; - (LocalFunctionTest.set_field5_func)(x); - Expect.equals(x * x, LocalFunctionTest.field5); - return true; - } - - static testExceptions() { - dynamic f = (int n) => n + 1; - Expect.equals(2, f(1)); - Expect.equals(true, f is Function); - Expect.equals(true, f is Object); - Expect.equals(true, f.toString().startsWith("Closure")); - bool exception_caught = false; - try { - f(1, 2); - } on NoSuchMethodError catch (e) { - exception_caught = true; - } - Expect.equals(true, exception_caught); - exception_caught = false; - try { - f(); - } on NoSuchMethodError catch (e) { - exception_caught = true; - } - Expect.equals(true, exception_caught); - exception_caught = false; - try { - f.xyz(0); - } on NoSuchMethodError catch (e) { - exception_caught = true; - } - Expect.equals(true, exception_caught); - - // Overwrite closure value. - f = 3; - exception_caught = false; - try { - f(1); - } on NoSuchMethodError catch (e) { - exception_caught = true; - } - Expect.equals(true, exception_caught); - - // Do not expect any exceptions to be thrown. - var g = ([int n = 1]) => n + 1; - Expect.equals(2, g()); - Expect.equals(3, g(2)); - } - - static int doThis(int n, int f(int n)) { - return f(n); - } - - static testMain() { - Expect.equals(2 * (3 * 2 + 2 + 1), f(2)); - Expect.equals(10 * 10 + 10 * 9 / 2, h(10)); - Expect.equals(90, h2(10)); - Expect.equals(320, new LocalFunctionTest().method(10)); - Expect.equals(145, new LocalFunctionTest().testExecute(10)); - Expect.equals(5, testSelfReference1(5)); - Expect.equals(24 * 25 / 2, testNesting(5)); - Expect.equals(true, testClosureCallStatement(7)); - Expect.equals(99, doThis(10, (n) => n * n - 1)); - testExceptions(); - } -} - -main() { - LocalFunctionTest.testMain(); -} diff --git a/tests/language_2/function/malformed_result_type_runtime_test.dart b/tests/language_2/function/malformed_result_type_runtime_test.dart deleted file mode 100644 index e69b3fdb442..00000000000 --- a/tests/language_2/function/malformed_result_type_runtime_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 test for a function with a malformed result type. - -import "package:expect/expect.dart"; - -class C {} - -main() { - -} diff --git a/tests/language_2/function/malformed_result_type_test.dart b/tests/language_2/function/malformed_result_type_test.dart deleted file mode 100644 index 99589d18bcd..00000000000 --- a/tests/language_2/function/malformed_result_type_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2012, 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 - -// Dart test for a function with a malformed result type. - -import "package:expect/expect.dart"; - -class C {} - -main() { - C f() => null; -//^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS -// [cfe] Expected 2 type arguments. -} diff --git a/tests/language_2/function/propagation_test.dart b/tests/language_2/function/propagation_test.dart deleted file mode 100644 index 8803479c622..00000000000 --- a/tests/language_2/function/propagation_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -class A { - int call(String str) => 499; -} - -typedef int F(String str); - -main() { - var a = new A(); - Expect.type(a); - Expect.notType(a); - - Function a3 = new A(); - Expect.notType(a3); - - F a4 = new A(); - Expect.notType(a4); -} diff --git a/tests/language_2/function/regress_45601_test.dart b/tests/language_2/function/regress_45601_test.dart deleted file mode 100644 index 758623a7311..00000000000 --- a/tests/language_2/function/regress_45601_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2021, 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 - -import "package:expect/expect.dart"; - -// Regression test for https://github.com/dart-lang/sdk/issues/45601 -// When comparing values of type `Function` for equality DDC was generating -// code that would throw at runtime. - -void fn(T t) => null; - -void main() { - testStaticEquality(); - testDynamicEquality(); -} - -/// Ensure `==` calls on function values that are statically typed as `Function` -/// work as expected. -void testStaticEquality() { - Function staticFunction = fn; - Expect.isTrue(staticFunction == fn); - Expect.isFalse(staticFunction == main); - - Function staticFunction2 = null; - Expect.isFalse(staticFunction2 == staticFunction); - staticFunction2 = fn; - Expect.isTrue(staticFunction2 == staticFunction); -} - -/// Ensure `==` calls on function values that are statically typed as `dynamic` -/// work as expected. -void testDynamicEquality() { - dynamic dynamicFunction = fn; - Expect.isTrue(dynamicFunction == fn); - Expect.isFalse(dynamicFunction == main); - - dynamic dynamicFunction2 = null; - Expect.isFalse(dynamicFunction2 == dynamicFunction); - dynamicFunction2 = fn; - Expect.isTrue(dynamicFunction2 == dynamicFunction); -} diff --git a/tests/language_2/function/syntax_test.dart b/tests/language_2/function/syntax_test.dart deleted file mode 100644 index f2529f0a927..00000000000 --- a/tests/language_2/function/syntax_test.dart +++ /dev/null @@ -1,735 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Tests function statement and expression syntax. - -class FunctionSyntaxTest { - static void testMain -/* //# 00: syntax error - () -*/ //# 00: continued - { - testNestedFunctions(); - testFunctionExpressions(); - testPrecedence(); - testInitializers(); - testFunctionParameter(); - testFunctionIdentifierExpression(); - testFunctionIdentifierStatement(); - } - - static void testNestedFunctions -/* //# 01: syntax error - () -*/ //# 01: continued - { - // No types - braces. - nb0 -/* //# 02: syntax error - () -*/ //# 02: continued - { - return 42; - } - - nb1 -/* //# 03: syntax error - (a) -*/ //# 03: continued - { - return a; - } - - nb2 -/* //# 04: syntax error - (a, b) -*/ //# 04: continued - { - return a + b; - } - - Expect.equals(42, nb0()); - Expect.equals(87, nb1(87)); - Expect.equals(1 + 2, nb2(1, 2)); - - // No types - arrows. - na0 -/* //# 05: syntax error - () -*/ //# 05: continued - => - 42; - na1 -/* //# 06: syntax error - (a) -*/ //# 06: continued - => - a; - na2 -/* //# 07: syntax error - (a, b) -*/ //# 07: continued - => - a + b; - Expect.equals(42, na0()); - Expect.equals(87, na1(87)); - Expect.equals(1 + 2, na2(1, 2)); - - // Return type - braces. - int rb0 -/* //# 08: syntax error - () -*/ //# 08: continued - { - return 42; - } - - int rb1 -/* //# 09: syntax error - (a) -*/ //# 09: continued - { - return a; - } - - int rb2 -/* //# 10: syntax error - (a, b) -*/ //# 10: continued - { - return a + b; - } - - Expect.equals(42, rb0()); - Expect.equals(87, rb1(87)); - Expect.equals(1 + 2, rb2(1, 2)); - - // Return type - arrows. - int ra0 -/* //# 11: syntax error - () -*/ //# 11: continued - => - 42; - int ra1 -/* //# 12: syntax error - (a) -*/ //# 12: continued - => - a; - int ra2 -/* //# 13: syntax error - (a, b) -*/ //# 13: continued - => - a + b; - Expect.equals(42, ra0()); - Expect.equals(87, ra1(87)); - Expect.equals(1 + 2, ra2(1, 2)); - - // Fully typed - braces. - int fb1 -/* //# 14: syntax error - (int a) -*/ //# 14: continued - { - return a; - } - - int fb2 -/* //# 15: syntax error - (int a, int b) -*/ //# 15: continued - { - return a + b; - } - - Expect.equals(42, rb0()); - Expect.equals(87, rb1(87)); - Expect.equals(1 + 2, rb2(1, 2)); - - // Fully typed - arrows. - int fa1 -/* //# 16: syntax error - (int a) -*/ //# 16: continued - => - a; - int fa2 -/* //# 17: syntax error - (int a, int b) -*/ //# 17: continued - => - a + b; - Expect.equals(42, ra0()); - Expect.equals(87, ra1(87)); - Expect.equals(1 + 2, ra2(1, 2)); - - // Generic types - braces. - List gb0 -/* //# 18: syntax error - () -*/ //# 18: continued - { - return [42]; - } - - List gb1 -/* //# 19: syntax error - (List a) -*/ //# 19: continued - { - return a; - } - - Expect.equals(42, gb0()[0]); - Expect.equals(87, gb1([87])[0]); - - // Generic types - arrows. - List ga0 -/* //# 20: syntax error - () -*/ //# 20: continued - => - [42]; - List ga1 -/* //# 21: syntax error - (List a) -*/ //# 21: continued - => - a; - Expect.equals(42, ga0()[0]); - Expect.equals(87, ga1([87])[0]); - } - - static void testFunctionExpressions -/* //# 22: syntax error - () -*/ //# 22: continued - { - eval0 -/* //# 23: syntax error - (fn) -*/ //# 23: continued - => - fn(); - eval1 -/* //# 24: syntax error - (fn, a) -*/ //# 24: continued - => - fn(a); - eval2 -/* //# 25: syntax error - (fn, a, b) -*/ //# 25: continued - => - fn(a, b); - - // No types - braces. - Expect.equals(42, eval0( -/* //# 26: syntax error - () -*/ //# 26: continued - { - return 42; - })); - Expect.equals( - 87, - eval1( -/* //# 27: syntax error - (a) -*/ //# 27: continued - { - return a; - }, 87)); - Expect.equals( - 1 + 2, - eval2( -/* //# 28: syntax error - (a, b) -*/ //# 28: continued - { - return a + b; - }, 1, 2)); - Expect.equals(42, eval0( -/* //# 29: syntax error - () -*/ //# 29: continued - { - return 42; - })); - Expect.equals( - 87, - eval1( -/* //# 30: syntax error - (a) -*/ //# 30: continued - { - return a; - }, 87)); - Expect.equals( - 1 + 2, - eval2( -/* //# 31: syntax error - (a, b) -*/ //# 31: continued - { - return a + b; - }, 1, 2)); - - // No types - arrows. - Expect.equals( - 42, - eval0( -/* //# 32: syntax error - () -*/ //# 32: continued - => - 42)); - Expect.equals( - 87, - eval1( -/* //# 33: syntax error - (a) -*/ //# 33: continued - => - a, - 87)); - Expect.equals( - 1 + 2, - eval2( -/* //# 34: syntax error - (a, b) -*/ //# 34: continued - => - a + b, - 1, - 2)); - Expect.equals( - 42, - eval0( -/* //# 35: syntax error - () -*/ //# 35: continued - => - 42)); - Expect.equals( - 87, - eval1( -/* //# 36: syntax error - (a) -*/ //# 36: continued - => - a, - 87)); - Expect.equals( - 1 + 2, - eval2( -/* //# 37: syntax error - (a, b) -*/ //# 37: continued - => - a + b, - 1, - 2)); - - // Argument types - braces. - Expect.equals(42, eval0( -/* //# 44: syntax error - () -*/ //# 44: continued - { - return 42; - })); - Expect.equals( - 87, - eval1( -/* //# 45: syntax error - (int a) -*/ //# 45: continued - { - return a; - }, 87)); - Expect.equals( - 1 + 2, - eval2( -/* //# 46: syntax error - (int a, int b) -*/ //# 46: continued - { - return a + b; - }, 1, 2)); - Expect.equals(42, eval0( -/* //# 47: syntax error - () -*/ //# 47: continued - { - return 42; - })); - Expect.equals( - 87, - eval1( -/* //# 48: syntax error - (int a) -*/ //# 48: continued - { - return a; - }, 87)); - Expect.equals( - 1 + 2, - eval2( -/* //# 49: syntax error - (int a, int b) -*/ //# 49: continued - { - return a + b; - }, 1, 2)); - - // Argument types - arrows. - Expect.equals( - 42, - eval0( -/* //# 50: syntax error - () -*/ //# 50: continued - => - 42)); - Expect.equals( - 87, - eval1( -/* //# 51: syntax error - (int a) -*/ //# 51: continued - => - a, - 87)); - Expect.equals( - 1 + 2, - eval2( -/* //# 52: syntax error - (int a, int b) -*/ //# 52: continued - => - a + b, - 1, - 2)); - Expect.equals( - 42, - eval0( -/* //# 53: syntax error - () -*/ //# 53: continued - => - 42)); - Expect.equals( - 87, - eval1( -/* //# 54: syntax error - (int a) -*/ //# 54: continued - => - a, - 87)); - Expect.equals( - 1 + 2, - eval2( -/* //# 55: syntax error - (int a, int b) -*/ //# 55: continued - => - a + b, - 1, - 2)); - } - - static void testPrecedence -/* //# 64: syntax error - () -*/ //# 64: continued - { - expectEvaluatesTo -/* //# 65: syntax error - (value, fn) -*/ //# 65: continued - { - Expect.equals(value, fn()); - } - - // Assignment. - var x; - expectEvaluatesTo(42, () => x = 42); - Expect.equals(42, x); - x = 1; - expectEvaluatesTo(100, () => x += 99); - Expect.equals(100, x); - x = 1; - expectEvaluatesTo(87, () => x *= 87); - Expect.equals(87, x); - - // Conditional. - expectEvaluatesTo(42, () => true ? 42 : 87); - expectEvaluatesTo(87, () => false ? 42 : 87); - - // Logical or. - expectEvaluatesTo(true, () => true || true); - expectEvaluatesTo(true, () => true || false); - expectEvaluatesTo(true, () => false || true); - expectEvaluatesTo(false, () => false || false); - - // Logical and. - expectEvaluatesTo(true, () => true && true); - expectEvaluatesTo(false, () => true && false); - expectEvaluatesTo(false, () => false && true); - expectEvaluatesTo(false, () => false && false); - - // Bitwise operations. - expectEvaluatesTo(3, () => 1 | 2); - expectEvaluatesTo(2, () => 3 ^ 1); - expectEvaluatesTo(1, () => 3 & 1); - - // Equality. - expectEvaluatesTo(true, () => 1 == 1); - expectEvaluatesTo(false, () => 1 != 1); - expectEvaluatesTo(true, () => identical(1, 1)); - expectEvaluatesTo(false, () => !identical(1, 1)); - - // Relational. - expectEvaluatesTo(true, () => 1 <= 1); - expectEvaluatesTo(false, () => 1 < 1); - expectEvaluatesTo(false, () => 1 > 1); - expectEvaluatesTo(true, () => 1 >= 1); - - // Is. - expectEvaluatesTo(true, () => 1 is int); - expectEvaluatesTo(true, () => 1.0 is double); - - // Shift. - expectEvaluatesTo(2, () => 1 << 1); - expectEvaluatesTo(1, () => 2 >> 1); - - // Additive. - expectEvaluatesTo(2, () => 1 + 1); - expectEvaluatesTo(1, () => 2 - 1); - - // Multiplicative. - expectEvaluatesTo(2, () => 1 * 2); - expectEvaluatesTo(2.0, () => 4 / 2); - expectEvaluatesTo(2, () => 4 ~/ 2); - expectEvaluatesTo(0, () => 4 % 2); - - // Negate. - expectEvaluatesTo(false, () => !true); - - // Postfix / prefix. - var y = 0; - expectEvaluatesTo(0, () => y++); - expectEvaluatesTo(2, () => ++y); - expectEvaluatesTo(1, () => --y); - expectEvaluatesTo(1, () => y--); - Expect.equals(0, y); - - // Selector. - fn -/* //# 66: syntax error - () -*/ //# 66: continued - => - 42; - var list = [87]; - expectEvaluatesTo(42, () => fn()); - expectEvaluatesTo(1, () => list.length); - expectEvaluatesTo(87, () => list[0]); - expectEvaluatesTo(87, () => list.removeLast()); - } - - static void testInitializers -/* //# 67: syntax error - () -*/ //# 67: continued - { - Expect.equals(42, (new C.cb0().fn)()); - Expect.equals(43, (new C.ca0().fn)()); - Expect.equals(44, (new C.cb1().fn)()); - Expect.equals(45, (new C.ca1().fn)()); - Expect.equals(46, (new C.cb2().fn)()); - Expect.equals(47, (new C.ca2().fn)()); - Expect.equals(48, (new C.cb3().fn)()); - Expect.equals(49, (new C.ca3().fn)()); - - Expect.equals(52, (new C.nb0().fn)()); - Expect.equals(53, (new C.na0().fn)()); - Expect.equals(54, (new C.nb1().fn)()); - Expect.equals(55, (new C.na1().fn)()); - Expect.equals(56, (new C.nb2().fn)()); - Expect.equals(57, (new C.na2().fn)()); - Expect.equals(58, (new C.nb3().fn)()); - Expect.equals(59, (new C.na3().fn)()); - - Expect.equals(62, (new C.rb0().fn)()); - Expect.equals(63, (new C.ra0().fn)()); - Expect.equals(64, (new C.rb1().fn)()); - Expect.equals(65, (new C.ra1().fn)()); - Expect.equals(66, (new C.rb2().fn)()); - Expect.equals(67, (new C.ra2().fn)()); - Expect.equals(68, (new C.rb3().fn)()); - Expect.equals(69, (new C.ra3().fn)()); - } - - static void testFunctionParameter -/* //# 68: syntax error - () -*/ //# 68: continued - { - f0(fn()) => fn(); - Expect.equals(42, f0(() => 42)); - - f1(int fn()) => fn(); - Expect.equals(87, f1(() => 87)); - - f2(fn(a)) => fn(42); - Expect.equals(43, f2((a) => a + 1)); - - f3(fn(int a)) => fn(42); - Expect.equals(44, f3((int a) => a + 2)); - } - - static void testFunctionIdentifierExpression -/* //# 69: syntax error - () -*/ //# 69: continued - { - Expect.equals( - 87, - ( -/* //# 70: syntax error - () -*/ //# 70: continued - => - 87)()); - } - - static void testFunctionIdentifierStatement -/* //# 71: syntax error - () -*/ //# 71: continued - { - function -/* //# 72: syntax error - () -*/ //# 72: continued - => - 42; - Expect.equals(42, function()); - Expect.equals(true, function is Function); - } -} - -class C { - C.cb0() - : fn = (() { - return 42; - }) {} - C.ca0() : fn = (() => 43) {} - - C.cb1() - : fn = wrap(() { - return 44; - }) {} - C.ca1() : fn = wrap(() => 45) {} - - C.cb2() - : fn = [ - () { - return 46; - } - ][0] {} - C.ca2() : fn = [() => 47][0] {} - - C.cb3() - : fn = { - 'x': () { - return 48; - } - }['x'] {} - C.ca3() : fn = {'x': () => 49}['x'] {} - - C.nb0() - : fn = (() { - return 52; - }) {} - C.na0() : fn = (() => 53) {} - - C.nb1() - : fn = wrap(() { - return 54; - }) {} - C.na1() : fn = wrap(() => 55) {} - - C.nb2() - : fn = [ - () { - return 56; - } - ][0] {} - C.na2() : fn = [() => 57][0] {} - - C.nb3() - : fn = { - 'x': () { - return 58; - } - }['x'] {} - C.na3() : fn = {'x': () => 59}['x'] {} - - C.rb0() - : fn = (() { - return 62; - }) {} - C.ra0() : fn = (() => 63) {} - - C.rb1() - : fn = wrap(() { - return 64; - }) {} - C.ra1() : fn = wrap(() => 65) {} - - C.rb2() - : fn = [ - () { - return 66; - } - ][0] {} - C.ra2() : fn = [() => 67][0] {} - - C.rb3() - : fn = { - 'x': () { - return 68; - } - }['x'] {} - C.ra3() : fn = {'x': () => 69}['x'] {} - - static wrap -/* //# 73: syntax error - (fn) -*/ //# 73: continued - { - return fn; - } - - final fn; -} - -main -/* //# 74: syntax error - () -*/ //# 74: continued -{ - FunctionSyntaxTest.testMain(); -} diff --git a/tests/language_2/function/type2_test.dart b/tests/language_2/function/type2_test.dart deleted file mode 100644 index dcfa499e1bb..00000000000 --- a/tests/language_2/function/type2_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A { - A(f) { - f(42); - } -} - -class B extends A { - B() : super((T param) => 42); -} - -main() { - var t = new B(); - Expect.throwsTypeError(() => new B()); -} diff --git a/tests/language_2/function/type3_test.dart b/tests/language_2/function/type3_test.dart deleted file mode 100644 index c5d09ddf428..00000000000 --- a/tests/language_2/function/type3_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -class A { - @pragma('dart2js:noInline') - A(); - - @pragma('dart2js:noInline') - foo() => new B(); -} - -class B { - T bar() => null; -} - -typedef F(); -typedef F2(x); - -// Dart2js realized that the generic type for A was not needed, but then used -// it nevertheless when it constructed the closure. -main() { - var f = new A().foo().bar; - Expect.isTrue(f is F); - Expect.isFalse(f is F2); -} diff --git a/tests/language_2/function/type_alias10_test.dart b/tests/language_2/function/type_alias10_test.dart deleted file mode 100644 index 5f2add19e6c..00000000000 --- a/tests/language_2/function/type_alias10_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2017, 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 - -// Regression test for https://github.com/dart-lang/sdk/issues/30912. -import 'package:expect/expect.dart'; - -class Foo {} - -class Bar {} - -typedef Type Func(T s); - -class Baz { - Func func; -} - -void main() { - dynamic baz = new Baz(); - Expect.isNull(baz.func); - baz.func = (Bar b) => b.runtimeType; - Expect.equals(baz.func(new Bar()), Bar); -} diff --git a/tests/language_2/function/type_alias2_test.dart b/tests/language_2/function/type_alias2_test.dart deleted file mode 100644 index ac35279715c..00000000000 --- a/tests/language_2/function/type_alias2_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// 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. -// VMOptions=--enable_type_checks - -// @dart = 2.9 - -// Dart test for function type alias with optional parameters. -import "package:expect/expect.dart"; - -typedef int f1([int a, int b, T c]); -typedef int f2([int a, int b, T d]); -typedef int f3({int a, int b, T c}); -typedef int f4({int a, int b, T d}); - -class A { - int baz([int a, int b, T c]) {} - int bar({int a, int b, T c}) {} -} - -int baz([int a, int b, int c]) {} - -int bar({int a, int b, int c}) {} - -main() { - Expect.isFalse(baz is f1); - Expect.isFalse(baz is f3); - Expect.isFalse(bar is f1); - Expect.isFalse(bar is f3); - Expect.isFalse(baz is f1); - Expect.isTrue(baz is f1); - Expect.isTrue(bar is f3); - Expect.isFalse(baz is f1); - Expect.isFalse(bar is f3); - Expect.isFalse(baz is f2); - Expect.isFalse(bar is f4); - Expect.isTrue(baz is f2); - Expect.isFalse(bar is f2); - - A a = new A(); - Expect.isTrue(a.baz is f1); - Expect.isFalse(a.baz is f3); - Expect.isFalse(a.bar is f1); - Expect.isTrue(a.bar is f3); - Expect.isTrue(a.baz is f1); - Expect.isTrue(a.baz is f1); - Expect.isTrue(a.bar is f3); - Expect.isTrue(a.baz is f1); - Expect.isTrue(a.bar is f3); - Expect.isTrue(a.baz is f1); - Expect.isTrue(a.bar is f3); - Expect.isTrue(a.baz is f2); - Expect.isFalse(a.bar is f4); - Expect.isTrue(a.baz is f2); - Expect.isFalse(a.bar is f2); -} diff --git a/tests/language_2/function/type_alias3_test.dart b/tests/language_2/function/type_alias3_test.dart deleted file mode 100644 index 1d241432d4f..00000000000 --- a/tests/language_2/function/type_alias3_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// 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 - -// Dart test for function type alias with an imported result type that happens -// to have the same name as a type parameter. -import "package:expect/expect.dart"; -import "../library11.dart" as lib11; - -typedef lib11.Library111 F( - lib11.Library111 a, Library111 b); - -class A { - T foo(T a, bool b) {} -} - -main() { - var a = new A>(); - var b = new A>(); - Expect.isTrue(a.foo is! F); - Expect.isTrue(a.foo is F); - Expect.isTrue(a.foo is! F); - Expect.isTrue(b.foo is! F); - Expect.isTrue(b.foo is! F); - Expect.isTrue(a.foo is! F); -} diff --git a/tests/language_2/function/type_alias4_test.dart b/tests/language_2/function/type_alias4_test.dart deleted file mode 100644 index b99efe0727e..00000000000 --- a/tests/language_2/function/type_alias4_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// 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 - -// Dart test for function type alias with a type parameter as result type. -import "package:expect/expect.dart"; - -typedef bool F(bool a); // 'bool' is not the boolean type. - -bool bar(bool a) {} - -int baz(int a) {} - -class A { - T foo(T a) {} -} - -main() { - Expect.isTrue(bar is! F); - Expect.isTrue(baz is! F); - Expect.isTrue(bar is! F); - Expect.isTrue(baz is! F); - Expect.isTrue(bar is F); - Expect.isTrue(baz is F); - Expect.isTrue(bar is! F); - Expect.isTrue(baz is! F); - - var b = new A(); - var i = new A(); - Expect.isTrue(b.foo is F, 'runtime type of covariant parameters is Object'); - Expect.isTrue(i.foo is F, 'runtime type of covariant parameters is Object'); - Expect.isTrue( - b.foo is F, 'runtime type of covariant parameters is Object'); - Expect.isTrue( - i.foo is F, 'runtime type of covariant parameters is Object'); - Expect.isTrue(b.foo is F); - Expect.isTrue(i.foo is F); - Expect.isTrue(b.foo is! F); - Expect.isTrue(i.foo is! F); -} diff --git a/tests/language_2/function/type_alias5_test.dart b/tests/language_2/function/type_alias5_test.dart deleted file mode 100644 index 42d10e6e80f..00000000000 --- a/tests/language_2/function/type_alias5_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2012, 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 test for illegally self referencing function type alias. - -// @dart = 2.9 - -typedef Handle Handle(String command); //# 00: compile-time error - -typedef F(F x); //# 01: compile-time error - -typedef A(B x); //# 02: compile-time error -typedef B(A x); //# 02: continued - -main() { - Handle h; //# 00: continued - F f; //# 01: continued - A f; //# 02: continued -} diff --git a/tests/language_2/function/type_alias6_runtime_test.dart b/tests/language_2/function/type_alias6_runtime_test.dart deleted file mode 100644 index 4017e5bd650..00000000000 --- a/tests/language_2/function/type_alias6_runtime_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 test for legally self referencing function type alias. - -import "package:expect/expect.dart"; - -typedef F( - List - - x); - -typedef D C(); - -class D { - C foo() {} - D bar() {} -} - -main() { - var f = (List x) {}; - Expect.isTrue(f is F); - var g = (List x) {}; - Expect.isFalse(g is F); - var d = new D(); - Expect.isTrue(d.foo is! C); - Expect.isTrue(d.bar is C); -} diff --git a/tests/language_2/function/type_alias6_test.dart b/tests/language_2/function/type_alias6_test.dart deleted file mode 100644 index 55ade341bcf..00000000000 --- a/tests/language_2/function/type_alias6_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2012, 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 test for legally self referencing function type alias. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -typedef F(List x); -// ^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF -// [cfe] The typedef 'F' has a reference to itself. - -typedef D C(); - -class D { - C foo() {} - D bar() {} -} - -main() { - var f = (List x) {}; - Expect.isTrue(f is F); - var g = (List x) {}; - Expect.isFalse(g is F); - var d = new D(); - Expect.isTrue(d.foo is! C); - Expect.isTrue(d.bar is C); -} diff --git a/tests/language_2/function/type_alias7_test.dart b/tests/language_2/function/type_alias7_test.dart deleted file mode 100644 index 49616a9632d..00000000000 --- a/tests/language_2/function/type_alias7_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2012, 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 - -typedef void funcType([int arg]); - -typedef void badFuncType([int arg = 0]); //# 00: compile-time error - -typedef void badFuncType({int arg: 0}); //# 02: compile-time error - -class A - extends funcType // //# 01: compile-time error -{} - -main() { - new A(); - badFuncType f; //# 00: continued - badFuncType f; //# 02: continued -} diff --git a/tests/language_2/function/type_alias8_test.dart b/tests/language_2/function/type_alias8_test.dart deleted file mode 100644 index 9b93f34f983..00000000000 --- a/tests/language_2/function/type_alias8_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for issue 9442. - -typedef dynamic GetFromThing(T target); - -typedef GetFromThing DefGetFromThing(dynamic def); - -class Thing {} - -class Test { - static final DefGetFromThing fromThing = (dynamic def) {}; -} - -main() { - Test.fromThing(10); -} diff --git a/tests/language_2/function/type_alias9_runtime_test.dart b/tests/language_2/function/type_alias9_runtime_test.dart deleted file mode 100644 index ffab7783cca..00000000000 --- a/tests/language_2/function/type_alias9_runtime_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 test for legally self referencing function type alias. - -typedef void F( - List - - l); -typedef void G(List l); - -main() { - F foo(G g) => g; - foo(null); -} diff --git a/tests/language_2/function/type_alias9_test.dart b/tests/language_2/function/type_alias9_test.dart deleted file mode 100644 index ed8029adb54..00000000000 --- a/tests/language_2/function/type_alias9_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2012, 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 test for legally self referencing function type alias. - -// @dart = 2.9 - -typedef void F(List l); -// ^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF -// [cfe] The typedef 'F' has a reference to itself. -typedef void G(List l); -// ^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF - -main() { - F foo(G g) => g; - foo(null); -} diff --git a/tests/language_2/function/type_alias_test.dart b/tests/language_2/function/type_alias_test.dart deleted file mode 100644 index 4ecdbf7d81f..00000000000 --- a/tests/language_2/function/type_alias_test.dart +++ /dev/null @@ -1,127 +0,0 @@ -// 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. -// VMOptions=--enable_type_checks -// -// Dart test for function type alias. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -typedef Fun(Null a, Null b); - -typedef int IntFun(Null a, Null b); - -typedef bool BoolFun(Null a, Null b); - -typedef int CompareObj(Object a, Object b); - -typedef int CompareInt(int a, int b); - -typedef int CompareString(String a, String b, [bool swap]); - -typedef void Test(); - -typedef ParameterizedFun1(T t, U u); - -typedef List ParameterizedFun2>( - Map t, U u); - -typedef void BoundsCheck(T arg); - -class FunctionTypeAliasTest { - FunctionTypeAliasTest() {} - static int test(int compare(T a, T b), T a, T b) { - return compare(a, b); - } - - foo(Test arg) {} - static bar() { - FunctionTypeAliasTest a = new FunctionTypeAliasTest(); - a.foo(() {}); - return 0; - } - - static void testMain() { - int compareStrLen(String a, String b) { - return a.length - b.length; - } - - Expect.isTrue(compareStrLen is Fun); - Expect.isTrue(compareStrLen is IntFun); - Expect.isTrue(compareStrLen is! BoolFun); - Expect.isTrue(compareStrLen is! CompareObj); - Expect.isTrue(compareStrLen is! CompareInt); - Expect.isTrue(compareStrLen is! CompareString); - Expect.equals(3, test(compareStrLen, "abcdef", "xyz")); - - int compareStrLenSwap(String a, String b, [bool swap = false]) { - return swap ? (a.length - b.length) : (b.length - a.length); - } - - Expect.isTrue(compareStrLenSwap is Fun); - Expect.isTrue(compareStrLenSwap is IntFun); - Expect.isTrue(compareStrLenSwap is! BoolFun); - Expect.isTrue(compareStrLenSwap is! CompareObj); - Expect.isTrue(compareStrLenSwap is! CompareInt); - Expect.isTrue(compareStrLenSwap is CompareString); - - int compareStrLenReverse(String a, String b, [bool reverse = false]) { - return reverse ? (a.length - b.length) : (b.length - a.length); - } - - Expect.isTrue(compareStrLenReverse is Fun); - Expect.isTrue(compareStrLenReverse is IntFun); - Expect.isTrue(compareStrLenReverse is! BoolFun); - Expect.isTrue(compareStrLenReverse is! CompareObj); - Expect.isTrue(compareStrLenReverse is! CompareInt); - Expect.isTrue(compareStrLenReverse is CompareString); - - int compareObj(Object a, Object b) { - return identical(a, b) ? 0 : -1; - } - - Expect.isTrue(compareObj is Fun); - Expect.isTrue(compareObj is IntFun); - Expect.isTrue(compareObj is! BoolFun); - Expect.isTrue(compareObj is CompareObj); - Expect.isTrue(compareObj is CompareInt); - Expect.isTrue(compareObj is! CompareString); - Expect.equals(-1, test(compareObj, "abcdef", "xyz")); - - CompareInt minus = (int a, int b) { - return a - b; - }; - Expect.isTrue(minus is Fun); - Expect.isTrue(minus is IntFun); - Expect.isTrue(minus is! BoolFun); - Expect.isTrue(minus is! CompareObj); - Expect.isTrue(minus is CompareInt); - Expect.isTrue(minus is! CompareString); - Expect.equals(99, test(minus, 100, 1)); - - int plus(int a, [int b = 1]) { - return a + b; - } - - ; - Expect.isTrue(plus is Fun); - Expect.isTrue(plus is IntFun); - Expect.isTrue(plus is! BoolFun); - Expect.isTrue(plus is! CompareObj); - Expect.isTrue(plus is CompareInt); - Expect.isTrue(plus is! CompareString); - - Expect.equals(0, bar()); - - Function boundsTrue = (num arg) {}; - Function boundsFalse = (String arg) {}; - Expect.isTrue(boundsTrue is BoundsCheck); - Expect.isFalse(boundsFalse is BoundsCheck); - } -} - -main() { - FunctionTypeAliasTest.testMain(); -} diff --git a/tests/language_2/function/type_call_getter2_runtime_test.dart b/tests/language_2/function/type_call_getter2_runtime_test.dart deleted file mode 100644 index 5cbfd1fb5a9..00000000000 --- a/tests/language_2/function/type_call_getter2_runtime_test.dart +++ /dev/null @@ -1,78 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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 "package:expect/expect.dart"; - -class A { - final call = null; -} - -class B { - get call => null; -} - -class C { - set call(x) {} -} - -typedef int F(String str); - -main() { - A a = new A(); - B b = new B(); - C c = new C(); - - final - - a2 = a; - - final - - a3 = a; - - final - - b2 = b; - - final - - b3 = b; - - final - - c2 = c; - - final - - c3 = c; - - Expect.throwsTypeError(() { - Function a4 = a as dynamic; - }); - - Expect.throwsTypeError(() { - F a5 = a as dynamic; - }); - - Expect.throwsTypeError(() { - Function b4 = b as dynamic; - }); - - Expect.throwsTypeError(() { - F b5 = b as dynamic; - }); - - Expect.throwsTypeError(() { - Function c4 = c as dynamic; - }); - - Expect.throwsTypeError(() { - F c5 = c as dynamic; - }); -} diff --git a/tests/language_2/function/type_call_getter2_test.dart b/tests/language_2/function/type_call_getter2_test.dart deleted file mode 100644 index 023b14caf5d..00000000000 --- a/tests/language_2/function/type_call_getter2_test.dart +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -class A { - final call = null; -} - -class B { - get call => null; -} - -class C { - set call(x) {} -} - -typedef int F(String str); - -main() { - A a = new A(); - B b = new B(); - C c = new C(); - - final - Function - a2 = a; - // ^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'A' can't be assigned to a variable of type 'Function'. - - final - F - a3 = a; - // ^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'A' can't be assigned to a variable of type 'int Function(String)'. - - final - Function - b2 = b; - // ^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'B' can't be assigned to a variable of type 'Function'. - - final - F - b3 = b; - // ^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'B' can't be assigned to a variable of type 'int Function(String)'. - - final - Function - c2 = c; - // ^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'C' can't be assigned to a variable of type 'Function'. - - final - F - c3 = c; - // ^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'C' can't be assigned to a variable of type 'int Function(String)'. - - Expect.throwsTypeError(() { - Function a4 = a as dynamic; - }); - - Expect.throwsTypeError(() { - F a5 = a as dynamic; - }); - - Expect.throwsTypeError(() { - Function b4 = b as dynamic; - }); - - Expect.throwsTypeError(() { - F b5 = b as dynamic; - }); - - Expect.throwsTypeError(() { - Function c4 = c as dynamic; - }); - - Expect.throwsTypeError(() { - F c5 = c as dynamic; - }); -} diff --git a/tests/language_2/function/type_call_getter_test.dart b/tests/language_2/function/type_call_getter_test.dart deleted file mode 100644 index 792fd396ae6..00000000000 --- a/tests/language_2/function/type_call_getter_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -class A { - final call = null; -} - -class B { - get call => null; -} - -class C { - set call(x) {} -} - -typedef int F(String str); - -main() { - Expect.isFalse(new A() is Function); - Expect.isFalse(new B() is Function); - Expect.isFalse(new C() is Function); - Expect.isFalse(new A() is F); - Expect.isFalse(new B() is F); - Expect.isFalse(new C() is F); -} diff --git a/tests/language_2/function/type_in_constant_test.dart b/tests/language_2/function/type_in_constant_test.dart deleted file mode 100644 index 9b967efe0be..00000000000 --- a/tests/language_2/function/type_in_constant_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2017, 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 - -/// Test that consts can be created with inlined function types as type -/// arguments. - -import 'package:expect/expect.dart'; - -class A { - const A(); -} - -@pragma('dart2js:noInline') -test(a, b) { - Expect.notEquals(a, b); -} - -main() { - test(const A(), const A()); - test(const A(), const A()); - test(const A(), const A()); -} diff --git a/tests/language_2/function/type_parameter2_test.dart b/tests/language_2/function/type_parameter2_test.dart deleted file mode 100644 index 0ca6000c1ce..00000000000 --- a/tests/language_2/function/type_parameter2_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// 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 - -// Test to check that we can parse closure type formal parameters with -// default value. - -import "package:expect/expect.dart"; - -class FunctionTypeParameterTest { - static var formatter; - - static SetFormatter([String fmt(int i) = null]) { - formatter = fmt; - } - - static void testMain() { - Expect.equals(null, formatter); - SetFormatter((i) => "$i"); - Expect.equals(false, null == formatter); - Expect.equals("1234", formatter(1230 + 4)); - SetFormatter(); - Expect.equals(null, formatter); - } -} - -main() { - FunctionTypeParameterTest.testMain(); -} diff --git a/tests/language_2/function/type_parameter3_test.dart b/tests/language_2/function/type_parameter3_test.dart deleted file mode 100644 index 67a06c9b9ec..00000000000 --- a/tests/language_2/function/type_parameter3_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Test that we detect that a function literal is not -/// a compile time constant. - -test([String fmt(int i) = (i) => "$i"]) {} -// ^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_CONSTANT_DEFAULT_VALUE -// [cfe] Not a constant expression. -// ^ -// [cfe] Not a constant expression. - -main() { - test(); -} diff --git a/tests/language_2/function/type_parameter_bound_object_test.dart b/tests/language_2/function/type_parameter_bound_object_test.dart deleted file mode 100644 index f20d2fb000d..00000000000 --- a/tests/language_2/function/type_parameter_bound_object_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2018, 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 - -Q hest(dynamic x) { - if (x is Q) return x; - return null; -} - -Q Function(dynamic) pony = hest; -Q Function(dynamic) zebra = hest; - -main() { - hest(42).fisk(); //# 01: runtime error - pony(42).fisk(); //# 02: runtime error - zebra(42).fisk(); //# 03: compile-time error -} diff --git a/tests/language_2/function/type_parameter_test.dart b/tests/language_2/function/type_parameter_test.dart deleted file mode 100644 index 0393ed52813..00000000000 --- a/tests/language_2/function/type_parameter_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Test to check that we can parse closure type formal parameters with -// default value. - -class A { - final f; - A(int this.f()); - const A.nother(int this.f()); - - static Function func; - - static SetFunc([String fmt(int i) = null]) { - func = fmt; - } -} - -main() { - Expect.equals(null, A.func); - A.SetFunc((i) => "$i"); - Expect.equals(false, null == A.func); - Expect.equals("1234", A.func(1230 + 4)); - A.SetFunc(); - Expect.equals(null, A.func); - - Expect.equals(42, new A(() => 42).f()); - Expect.equals(42, new A.nother(() => 42).f()); -} diff --git a/tests/language_2/function/type_test.dart b/tests/language_2/function/type_test.dart deleted file mode 100644 index 96c2550ac3f..00000000000 --- a/tests/language_2/function/type_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2012, 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 - -// Dart test for a function type test that cannot be eliminated at compile time. -import "package:expect/expect.dart"; - -typedef FListInt(List l); - -main() { - Expect.throwsTypeError(() { - // Static result type of f(), i.e. FList, is a subtype of FListInt. - // However, run time type of returned function is not a subtype of FListInt. - // Run time type check should not be eliminated. - FListInt fli = ((List l) => null) as dynamic; - }); -} diff --git a/tests/language_2/function/type_this_parameter_test.dart b/tests/language_2/function/type_this_parameter_test.dart deleted file mode 100644 index 78b5f3cc625..00000000000 --- a/tests/language_2/function/type_this_parameter_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2012, 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. -// Check that function types are accepted for constructor arguments that -// initialize fields. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - Function f; - A(int this.f()); -} - -main() { - var a = new A(() => 499); - Expect.equals(499, (a.f)()); -} diff --git a/tests/language_2/function_subtype/bound_closure0_test.dart b/tests/language_2/function_subtype/bound_closure0_test.dart deleted file mode 100644 index 394f8af0ef9..00000000000 --- a/tests/language_2/function_subtype/bound_closure0_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for bound closures. - -import 'package:expect/expect.dart'; - -typedef int Foo(bool a, [String b]); -typedef int Bar(bool a, [String b]); -typedef int Baz(bool a, {String b}); -typedef int Boz(bool a); - -class C { - int foo(bool a, [String b]) => null; - int baz(bool a, {String b}) => null; - int boz(bool a, {int b}) => null; -} - -main() { - var c = new C(); - var foo = c.foo; - Expect.isTrue(foo is Foo, 'foo is Foo'); - Expect.isTrue(foo is Bar, 'foo is Bar'); - Expect.isFalse(foo is Baz, 'foo is Baz'); - Expect.isTrue(foo is Boz, 'foo is Boz'); - - var baz = c.baz; - Expect.isFalse(baz is Foo, 'baz is Foo'); - Expect.isFalse(baz is Bar, 'baz is Bar'); - Expect.isTrue(baz is Baz, 'baz is Baz'); - Expect.isTrue(baz is Boz, 'baz is Boz'); - - var boz = c.boz; - Expect.isFalse(boz is Foo, 'boz is Foo'); - Expect.isFalse(boz is Bar, 'boz is Bar'); - Expect.isFalse(boz is Baz, 'boz is Baz'); - Expect.isTrue(boz is Boz, 'boz is Boz'); -} diff --git a/tests/language_2/function_subtype/bound_closure1_test.dart b/tests/language_2/function_subtype/bound_closure1_test.dart deleted file mode 100644 index 4c84632cfb9..00000000000 --- a/tests/language_2/function_subtype/bound_closure1_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for bound closures against generic typedefs. - -import 'package:expect/expect.dart'; - -typedef int Foo(T a, [String b]); -typedef int Bar(T a, [String b]); -typedef int Baz(T a, {String b}); -typedef int Boz(T a); - -class C { - int foo(bool a, [String b]) => null; - int baz(bool a, {String b}) => null; -} - -main() { - var c = new C(); - var foo = c.foo; - Expect.isTrue(foo is Foo, 'foo is Foo'); - Expect.isTrue(foo is Bar, 'foo is Bar'); - Expect.isFalse(foo is Baz, 'foo is Baz'); - Expect.isTrue(foo is Boz, 'foo is Boz'); - - Expect.isFalse(foo is Foo, 'foo is Foo'); - Expect.isFalse(foo is Bar, 'foo is Bar'); - Expect.isFalse(foo is Baz, 'foo is Baz'); - Expect.isFalse(foo is Boz, 'foo is Boz'); - - Expect.isFalse(foo is Foo, 'foo is Foo'); - Expect.isFalse(foo is Bar, 'foo is Bar'); - Expect.isFalse(foo is Baz, 'foo is Baz'); - Expect.isFalse(foo is Boz, 'foo is Boz'); - - var baz = c.baz; - Expect.isFalse(baz is Foo, 'baz is Foo'); - Expect.isFalse(baz is Bar, 'baz is Bar'); - Expect.isTrue(baz is Baz, 'baz is Baz'); - Expect.isTrue(baz is Boz, 'baz is Boz'); - - Expect.isFalse(baz is Foo, 'baz is Foo'); - Expect.isFalse(baz is Bar, 'baz is Bar'); - Expect.isFalse(baz is Baz, 'baz is Baz'); - Expect.isFalse(baz is Boz, 'baz is Boz'); - - Expect.isFalse(baz is Foo, 'baz is Foo'); - Expect.isFalse(baz is Bar, 'baz is Bar'); - Expect.isFalse(baz is Baz, 'baz is Baz'); - Expect.isFalse(baz is Boz, 'baz is Boz'); -} diff --git a/tests/language_2/function_subtype/bound_closure2_test.dart b/tests/language_2/function_subtype/bound_closure2_test.dart deleted file mode 100644 index db2f3ace571..00000000000 --- a/tests/language_2/function_subtype/bound_closure2_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for bound closures on generic type against generic -// typedefs. - -import 'package:expect/expect.dart'; - -typedef int Foo(T a, [String b]); -typedef int Bar(T a, [String b]); -typedef int Baz(T a, {String b}); -typedef int Boz(T a); -typedef int Biz(T a, int b); - -class C { - int foo(bool a, [String b]) => null; - int baz(bool a, {String b}) => null; - - void test(String nameOfT, bool expectedResult) { - Expect.equals(expectedResult, foo is Foo, 'foo is Foo<$nameOfT>'); - Expect.equals(expectedResult, foo is Bar, 'foo is Bar<$nameOfT>'); - Expect.isFalse(foo is Baz, 'foo is Baz<$nameOfT>'); - Expect.equals(expectedResult, foo is Boz, 'foo is Boz<$nameOfT>'); - Expect.isFalse(foo is Biz, 'foo is Biz<$nameOfT>'); - - Expect.isFalse(baz is Foo, 'baz is Foo<$nameOfT>'); - Expect.isFalse(baz is Bar, 'baz is Bar<$nameOfT>'); - Expect.equals(expectedResult, baz is Baz, 'baz is Baz<$nameOfT>'); - Expect.equals(expectedResult, baz is Boz, 'baz is Boz<$nameOfT>'); - Expect.isFalse(baz is Biz, 'bar is Biz<$nameOfT>'); - } -} - -main() { - new C().test('bool', true); - new C().test('int', false); - new C().test('Object', false); - new C().test('dynamic', false); -} diff --git a/tests/language_2/function_subtype/bound_closure3_test.dart b/tests/language_2/function_subtype/bound_closure3_test.dart deleted file mode 100644 index 50adafb799a..00000000000 --- a/tests/language_2/function_subtype/bound_closure3_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for generic bound closures. - -import 'package:expect/expect.dart'; - -typedef void Foo(bool a, [String b]); -typedef void Bar(bool a, [String b]); -typedef void Baz(bool a, {String b}); -typedef int Boz(bool a); - -class C { - void foo(T a, [String b]) {} - void baz(T a, {String b}) {} - - void test(String nameOfT) { - Expect.isTrue(foo is Foo, 'C<$nameOfT>.foo is not Foo'); - Expect.isTrue(foo is Bar, 'C<$nameOfT>.foo is not Bar'); - Expect.isFalse(foo is Baz, 'C<$nameOfT>.foo is Baz'); - Expect.isFalse(foo is Boz, 'C<$nameOfT>.foo is Boz'); - - Expect.isFalse(baz is Foo, 'C<$nameOfT>.baz is Foo'); - Expect.isFalse(baz is Bar, 'C<$nameOfT>.baz is Bar'); - Expect.isTrue(baz is Baz, 'C<$nameOfT>.baz is not Baz'); - Expect.isFalse(baz is Boz, 'C<$nameOfT>.baz is Boz'); - } -} - -main() { - new C().test('bool'); - new C().test('int'); - new C().test('dynamic'); -} diff --git a/tests/language_2/function_subtype/bound_closure4_test.dart b/tests/language_2/function_subtype/bound_closure4_test.dart deleted file mode 100644 index 25f436eba95..00000000000 --- a/tests/language_2/function_subtype/bound_closure4_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for generic bound closures. - -import 'package:expect/expect.dart'; - -typedef void Foo(bool a, [String b]); -typedef void Bar(bool a, [String b]); -typedef void Baz(bool a, {String b}); -typedef int Boz(bool a); - -class C { - void foo(T a, [String b]) {} - void baz(T a, {String b}) {} - - void test(String nameOfT) { - Expect.isTrue(foo is Foo, 'C<$nameOfT>.foo is not Foo'); - Expect.isTrue(foo is Bar, 'C<$nameOfT>.foo is not Bar'); - Expect.isFalse(foo is Baz, 'C<$nameOfT>.foo is Baz'); - Expect.isFalse(foo is Boz, 'C<$nameOfT>.foo is Boz'); - - Expect.isFalse(baz is Foo, 'C<$nameOfT>.baz is Foo'); - Expect.isFalse(baz is Bar, 'C<$nameOfT>.baz is Bar'); - Expect.isTrue(baz is Baz, 'C<$nameOfT>.baz is not Baz'); - Expect.isFalse(baz is Boz, 'C<$nameOfT>.baz is Boz'); - } -} - -class D extends C {} - -main() { - new D().test('bool'); - new D().test('int'); - new D().test('dynamic'); -} diff --git a/tests/language_2/function_subtype/bound_closure5_test.dart b/tests/language_2/function_subtype/bound_closure5_test.dart deleted file mode 100644 index 29e8a819384..00000000000 --- a/tests/language_2/function_subtype/bound_closure5_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for bound closures on generic type against generic -// typedefs. - -import 'package:expect/expect.dart'; - -typedef int Foo(T a, [String b]); -typedef int Bar(T a, [String b]); -typedef int Baz(T a, {String b}); -typedef int Boz(T a); -typedef int Biz(T a, int b); - -class C { - int foo(bool a, [String b]) => null; - int baz(bool a, {String b}) => null; - - void test(String nameOfT, bool expectedResult) { - Expect.equals(expectedResult, foo is Foo, 'foo is Foo<$nameOfT>'); - Expect.equals(expectedResult, foo is Bar, 'foo is Bar<$nameOfT>'); - Expect.isFalse(foo is Baz, 'foo is Baz<$nameOfT>'); - Expect.equals(expectedResult, foo is Boz, 'foo is Boz<$nameOfT>'); - Expect.isFalse(foo is Biz, 'foo is Biz<$nameOfT>'); - - Expect.isFalse(baz is Foo, 'baz is Foo<$nameOfT>'); - Expect.isFalse(baz is Bar, 'baz is Bar<$nameOfT>'); - Expect.equals(expectedResult, baz is Baz, 'baz is Baz<$nameOfT>'); - Expect.equals(expectedResult, baz is Boz, 'baz is Boz<$nameOfT>'); - Expect.isFalse(baz is Biz, 'bar is Biz<$nameOfT>'); - } -} - -class D extends C {} - -main() { - new D().test('bool', true); - new D().test('int', false); - new D().test('Object', false); - new D().test('Null', true); - new D().test('dynamic', false); -} diff --git a/tests/language_2/function_subtype/bound_closure5a_test.dart b/tests/language_2/function_subtype/bound_closure5a_test.dart deleted file mode 100644 index 57d7858fabf..00000000000 --- a/tests/language_2/function_subtype/bound_closure5a_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for bound closures on generic type against generic -// typedefs. - -import 'package:expect/expect.dart'; - -typedef int Foo(T a, [String b]); -typedef int Bar(T a, [String b]); -typedef int Baz(T a, {String b}); -typedef int Boz(T a); -typedef int Biz(T a, int b); - -class C { - int foo(bool a, [String b]) => null; - int baz(bool a, {String b}) => null; - - void test(String nameOfT, bool expectedResult) { - Expect.equals(expectedResult, foo is Foo, 'foo is Foo<$nameOfT>'); - Expect.equals(expectedResult, foo is Bar, 'foo is Bar<$nameOfT>'); - Expect.isFalse(foo is Baz, 'foo is Baz<$nameOfT>'); - Expect.equals(expectedResult, foo is Boz, 'foo is Boz<$nameOfT>'); - Expect.isFalse(foo is Biz, 'foo is Biz<$nameOfT>'); - - Expect.isFalse(baz is Foo, 'baz is Foo<$nameOfT>'); - Expect.isFalse(baz is Bar, 'baz is Bar<$nameOfT>'); - Expect.equals(expectedResult, baz is Baz, 'baz is Baz<$nameOfT>'); - Expect.equals(expectedResult, baz is Boz, 'baz is Boz<$nameOfT>'); - Expect.isFalse(baz is Biz, 'bar is Biz<$nameOfT>'); - } -} - -class Cm extends C {} - -class D extends Cm {} - -main() { - new D().test('bool', true); - new D().test('int', false); - new D().test('Object', false); - new D().test('Null', true); - new D().test('dynamic', false); -} diff --git a/tests/language_2/function_subtype/bound_closure6_test.dart b/tests/language_2/function_subtype/bound_closure6_test.dart deleted file mode 100644 index 34e71ea40ce..00000000000 --- a/tests/language_2/function_subtype/bound_closure6_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for bound closures on generic type against generic -// typedefs. - -import 'package:expect/expect.dart'; - -typedef int Foo(T a, [String b]); -typedef int Bar(T a, [String b]); -typedef int Baz(T a, {String b}); -typedef int Boz(T a); -typedef int Biz(T a, int b); - -class C { - int foo(bool a, [String b]) => null; - int baz(bool a, {String b}) => null; - - void test(String nameOfT, bool expectedResult) { - void localMethod() { - Expect.equals(expectedResult, foo is Foo, 'foo is Foo<$nameOfT>'); - Expect.equals(expectedResult, foo is Bar, 'foo is Bar<$nameOfT>'); - Expect.isFalse(foo is Baz, 'foo is Baz<$nameOfT>'); - Expect.equals(expectedResult, foo is Boz, 'foo is Boz<$nameOfT>'); - Expect.isFalse(foo is Biz, 'foo is Biz<$nameOfT>'); - - Expect.isFalse(baz is Foo, 'baz is Foo<$nameOfT>'); - Expect.isFalse(baz is Bar, 'baz is Bar<$nameOfT>'); - Expect.equals(expectedResult, baz is Baz, 'baz is Baz<$nameOfT>'); - Expect.equals(expectedResult, baz is Boz, 'baz is Boz<$nameOfT>'); - Expect.isFalse(baz is Biz, 'bar is Biz<$nameOfT>'); - } - - localMethod(); - } -} - -main() { - new C().test('bool', true); - new C().test('int', false); - new C().test('Object', false); - new C().test('dynamic', false); - new C().test('Null', true); -} diff --git a/tests/language_2/function_subtype/bound_closure7_test.dart b/tests/language_2/function_subtype/bound_closure7_test.dart deleted file mode 100644 index a9a706089a7..00000000000 --- a/tests/language_2/function_subtype/bound_closure7_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for bound closures. - -import 'package:expect/expect.dart'; - -typedef Foo(T t); - -class Class { - foo(Foo o) => o is Foo; -} - -bar(int i) {} - -baz(Foo o) => o is Foo; - -void main() { - dynamic f = new Class().foo; - Expect.isTrue(f(bar)); - Expect.isTrue(f is Foo>); - Expect.isFalse(f is Foo); - Expect.isFalse(f is Foo); - Expect.throwsTypeError(() => f(f)); - Expect.throwsTypeError(() => f(42)); - - Foo> bazInt = baz; // implicit instantiation baz - f = bazInt; - Expect.isTrue(f(bar)); - Expect.isFalse(f is Foo); - Expect.throwsTypeError(() => f(f)); - Expect.throwsTypeError(() => f(42)); -} diff --git a/tests/language_2/function_subtype/call0_test.dart b/tests/language_2/function_subtype/call0_test.dart deleted file mode 100644 index ad24bb2888b..00000000000 --- a/tests/language_2/function_subtype/call0_test.dart +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for classes with call functions. - -import 'package:expect/expect.dart'; - -typedef void Foo(bool a, [String b]); -typedef void Bar(bool a, [String b]); -typedef void Baz(bool a, {String b}); -typedef void Boz(bool a); - -class C1 { - void call(bool a, [String b]) {} -} - -class C2 { - void call(bool a, {String b}) {} -} - -class C3 { - void call(bool a, {int b}) {} -} - -main() { - Function c1 = new C1(); // implicit tearoff of `call` - Expect.isTrue(c1 is Foo, 'c1 is Foo'); - Expect.isTrue(c1 is Bar, 'c1 is Bar'); - Expect.isFalse(c1 is Baz, 'c1 is Baz'); - Expect.isTrue(c1 is Boz, 'c1 is Boz'); - Expect.isFalse(c1 is C1, 'c1 is C1'); - - Function c2 = new C2(); // implicit tearoff of `call` - Expect.isFalse(c2 is Foo, 'c2 is Foo'); - Expect.isFalse(c2 is Bar, 'c2 is Bar'); - Expect.isTrue(c2 is Baz, 'c2 is Baz'); - Expect.isTrue(c2 is Boz, 'c2 is Boz'); - Expect.isFalse(c2 is C2, 'c2 is C2'); - - Function c3 = new C3(); // implicit tearoff of `call` - Expect.isFalse(c3 is Foo, 'c3 is Foo'); - Expect.isFalse(c3 is Bar, 'c3 is Bar'); - Expect.isFalse(c3 is Baz, 'c3 is Baz'); - Expect.isTrue(c3 is Boz, 'c3 is Boz'); - Expect.isFalse(c3 is C3, 'c3 is C3'); - - expectIsNotFunction(new C1()); - expectIsNotFunction(new C2()); - expectIsNotFunction(new C3()); -} - -expectIsNotFunction(Object obj) { - Expect.isFalse(obj is Function, '$obj should not be a Function'); - Expect.isFalse(obj is Foo, '$obj should not be a Foo'); - Expect.isFalse(obj is Bar, '$obj should not be a Bar'); - Expect.isFalse(obj is Baz, '$obj should not be a Baz'); - Expect.isFalse(obj is Boz, '$obj should not be a Boz'); -} diff --git a/tests/language_2/function_subtype/call1_test.dart b/tests/language_2/function_subtype/call1_test.dart deleted file mode 100644 index 0df346ac619..00000000000 --- a/tests/language_2/function_subtype/call1_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for classes with call functions. - -import 'package:expect/expect.dart'; - -typedef void Foo(bool a, [String b]); -typedef void Bar(bool a, [String b]); -typedef void Baz(bool a, {String b}); -typedef void Boz(bool a); - -class C1 { - void call(T a, [String b]) {} -} - -class C2 { - void call(T a, {String b}) {} -} - -main() { - Function c1_bool = new C1(); // implicit tearoff of `call` - Expect.isTrue(c1_bool is Foo, 'c1_bool is Foo'); - Expect.isTrue(c1_bool is Bar, 'c1_bool is Bar'); - Expect.isFalse(c1_bool is Baz, 'c1_bool is Baz'); - Expect.isTrue(c1_bool is Boz, 'c1_bool is Boz'); - - Function c1_int = new C1(); // implicit tearoff of `call` - Expect.isTrue(c1_int is Foo, 'c1_int is Foo'); - Expect.isTrue(c1_int is Bar, 'c1_int is Bar'); - Expect.isFalse(c1_int is Baz, 'c1_int is Baz'); - Expect.isTrue(c1_int is Boz, 'c1_int is Boz'); - - Function c1 = new C1(); // implicit tearoff of `call` - Expect.isTrue(c1 is Foo, 'c1 is Foo'); - Expect.isTrue(c1 is Bar, 'c1 is Bar'); - Expect.isFalse(c1 is Baz, 'c1 is Baz'); - Expect.isTrue(c1 is Boz, 'c1 is Boz'); - - Function c2_bool = new C2(); // implicit tearoff of `call` - Expect.isFalse(c2_bool is Foo, 'c2_bool is Foo'); - Expect.isFalse(c2_bool is Bar, 'c2_bool is Bar'); - Expect.isTrue(c2_bool is Baz, 'c2_bool is Baz'); - Expect.isTrue(c2_bool is Boz, 'c2_bool is Boz'); - - Function c2_int = new C2(); // implicit tearoff of `call` - Expect.isFalse(c2_int is Foo, 'c2_int is Foo'); - Expect.isFalse(c2_int is Bar, 'c2_int is Bar'); - Expect.isTrue(c2_int is Baz, 'c2_int is Baz'); - Expect.isTrue(c2_int is Boz, 'c2_int is Boz'); - - Function c2 = new C2(); // implicit tearoff of `call` - Expect.isFalse(c2 is Foo, 'c2 is Foo'); - Expect.isFalse(c2 is Bar, 'c2 is Bar'); - Expect.isTrue(c2 is Baz, 'c2 is Baz'); - Expect.isTrue(c2 is Boz, 'c2 is Boz'); -} diff --git a/tests/language_2/function_subtype/call2_test.dart b/tests/language_2/function_subtype/call2_test.dart deleted file mode 100644 index da64f65272a..00000000000 --- a/tests/language_2/function_subtype/call2_test.dart +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for classes with call functions. - -import 'package:expect/expect.dart'; - -typedef void Foo(bool a, [String b]); -typedef void Bar(bool a, [String b]); -typedef void Baz(bool a, {String b}); -typedef void Boz(bool a); - -class C1 { - void call(T a, [String b]) {} -} - -class D1 extends C1 {} - -class C2 { - void call(T a, {String b}) {} -} - -class D2 extends C2 {} - -main() { - Function d1_String_bool = new D1(); - Expect.isTrue(d1_String_bool is Foo, 'd1_String_bool is Foo'); - Expect.isTrue(d1_String_bool is Bar, 'd1_String_bool is Bar'); - Expect.isFalse(d1_String_bool is Baz, 'd1_String_bool is Baz'); - Expect.isTrue(d1_String_bool is Boz, 'd1_String_bool is Boz'); - - Function d1_bool_int = new D1(); - Expect.isTrue(d1_bool_int is Foo, 'd1_bool_int is Foo'); - Expect.isTrue(d1_bool_int is Bar, 'd1_bool_int is Bar'); - Expect.isFalse(d1_bool_int is Baz, 'd1_bool_int is Baz'); - Expect.isTrue(d1_bool_int is Boz, 'd1_bool_int is Boz'); - - Function d1 = new D1(); - Expect.isTrue(d1 is Foo, 'd1 is Foo'); - Expect.isTrue(d1 is Bar, 'd1 is Bar'); - Expect.isFalse(d1 is Baz, 'd1 is Baz'); - Expect.isTrue(d1 is Boz, 'd1 is Boz'); - - Function d2_String_bool = new D2(); - Expect.isFalse(d2_String_bool is Foo, 'd2_String_bool is Foo'); - Expect.isFalse(d2_String_bool is Bar, 'd2_String_bool is Bar'); - Expect.isTrue(d2_String_bool is Baz, 'd2_String_bool is Baz'); - Expect.isTrue(d2_String_bool is Boz, 'd2_String_bool is Boz'); - - Function d2_bool_int = new D2(); - Expect.isFalse(d2_bool_int is Foo, 'd2_bool_int is Foo'); - Expect.isFalse(d2_bool_int is Bar, 'd2_bool_int is Bar'); - Expect.isTrue(d2_bool_int is Baz, 'd2_bool_int is Baz'); - Expect.isTrue(d2_bool_int is Boz, 'd2_bool_int is Boz'); - - Function d2 = new D2(); - Expect.isFalse(d2 is Foo, 'd2 is Foo'); - Expect.isFalse(d2 is Bar, 'd2 is Bar'); - Expect.isTrue(d2 is Baz, 'd2 is Baz'); - Expect.isTrue(d2 is Boz, 'd2 is Boz'); -} diff --git a/tests/language_2/function_subtype/call_type_variable_test.dart b/tests/language_2/function_subtype/call_type_variable_test.dart deleted file mode 100644 index a33cea3a39e..00000000000 --- a/tests/language_2/function_subtype/call_type_variable_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test that it is possible to invoke an object whose type is a proper subtype -// of a function type (that is, its type is 'function-type bounded', and we -// get to call it as if its type had been that bound). - -class A { - final Y f; - A(this.f); - X m(X value) => f(value); -} - -class B extends A { - B(String Function(String, {int i}) f) : super(f); - String m(String value) => f(value, i: 42); -} - -void main() { - B b = B((String s, {int i}) => "$s and $i"); - Expect.equals('24 and 42', b.m('24')); -} diff --git a/tests/language_2/function_subtype/cast0_test.dart b/tests/language_2/function_subtype/cast0_test.dart deleted file mode 100644 index 4a8b80c4501..00000000000 --- a/tests/language_2/function_subtype/cast0_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping casts. - -import 'package:expect/expect.dart'; - -typedef void Foo(T t); -typedef void Bar(int i); - -void bar(int i) {} - -void main() { - Expect.throws(() => bar as Foo); - Expect.throws(() => bar as Foo); - Expect.isNotNull(bar as Foo); - Expect.isNotNull(bar as Bar); -} diff --git a/tests/language_2/function_subtype/cast1_test.dart b/tests/language_2/function_subtype/cast1_test.dart deleted file mode 100644 index d98d2cb7db5..00000000000 --- a/tests/language_2/function_subtype/cast1_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping casts. - -import 'package:expect/expect.dart'; - -typedef void Foo(T t); -typedef void Bar(int i); - -class Class { - void bar(T i) {} -} - -void main() { - Expect.isNotNull(new Class().bar as Foo); - Expect.isNotNull(new Class().bar as Foo); - Expect.isNotNull(new Class().bar as Foo); - Expect.isNotNull(new Class().bar as Bar); - - Expect.isNotNull(new Class().bar as Foo); - Expect.isNotNull(new Class().bar as Foo); - Expect.isNotNull(new Class().bar as Foo); - Expect.isNotNull(new Class().bar as Bar); - - Expect.isNotNull(new Class().bar as Foo); - Expect.isNotNull(new Class().bar as Foo); - Expect.isNotNull(new Class().bar as Foo); - Expect.isNotNull(new Class().bar as Bar); -} diff --git a/tests/language_2/function_subtype/cast2_test.dart b/tests/language_2/function_subtype/cast2_test.dart deleted file mode 100644 index b71394ffa17..00000000000 --- a/tests/language_2/function_subtype/cast2_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping casts. - -import 'package:expect/expect.dart'; - -typedef void Foo(T t); -typedef void Bar(int i); - -class Class { - test(bool expectedResult, var o, String typeName) { - if (expectedResult) { - Expect.isNotNull(o as Foo, "bar as Foo<$typeName>"); - } else { - Expect.throws(() => o as Foo, (e) => true, "bar as Foo<$typeName>"); - } - Expect.isNotNull(o as Bar, "bar as Bar"); - } -} - -void bar(int i) {} - -void main() { - new Class().test(false, bar, "dynamic"); - new Class().test(false, bar, "Object"); - new Class().test(true, bar, "Null"); - new Class().test(true, bar, "int"); - new Class().test(false, bar, "bool"); -} diff --git a/tests/language_2/function_subtype/cast3_test.dart b/tests/language_2/function_subtype/cast3_test.dart deleted file mode 100644 index 801f0fee580..00000000000 --- a/tests/language_2/function_subtype/cast3_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping casts. - -import 'package:expect/expect.dart'; - -typedef void Foo(T t); -typedef void Bar(int i); - -class Class { - test(bool expectedResult, var o, String typeName) { - void local() { - if (expectedResult) { - Expect.isNotNull(o as Foo, "bar as Foo<$typeName>"); - } else { - Expect.throws(() => o as Foo, (e) => true, "bar as Foo<$typeName>"); - } - Expect.isNotNull(o as Bar, "bar as Bar"); - } - - local(); - } -} - -void bar(int i) {} - -void main() { - new Class().test(false, bar, "dynamic"); - new Class().test(false, bar, "Object"); - new Class().test(true, bar, "int"); - new Class().test(false, bar, "bool"); -} diff --git a/tests/language_2/function_subtype/checked0_test.dart b/tests/language_2/function_subtype/checked0_test.dart deleted file mode 100644 index 9cc46deadfe..00000000000 --- a/tests/language_2/function_subtype/checked0_test.dart +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping of typedef vs. inlined function types. - -import 'package:expect/expect.dart'; - -typedef int Foo(T a, [String b]); -typedef int Bar(T a, [String b]); -typedef int Baz(T a, {String b}); -typedef int Boz(T a); - -int fooF(bool a, [String b]) => null; -int bazF(bool a, {String b}) => null; -int bozF(bool a, {int b}) => null; - -class C { - void test1a(Foo f) {} - void test1b(Bar f) {} - void test1c(int f(T a, [String b])) {} - - void test2a(Baz f) {} - void test2b(int f(T a, {String b})) {} - - void test3a(Boz f) {} - void test3b(int f(T a)) {} - - void test(String nameOfT, bool expectedResult) { - check(bool expectedResult, f()) { - if (!expectedResult) { - Expect.throwsTypeError(f); - } else { - f(); - } - } - - dynamic foo = fooF, baz = bazF, boz = bozF; - - check(expectedResult, () => test1a(foo)); - check(expectedResult, () => test1b(foo)); - check(expectedResult, () => test1b(foo)); - check(false, () => test2a(foo)); - check(false, () => test2b(foo)); - check(expectedResult, () => test3a(foo)); - check(expectedResult, () => test3b(foo)); - - check(false, () => test1a(baz)); - check(false, () => test1b(baz)); - check(false, () => test1b(baz)); - check(expectedResult, () => test2a(baz)); - check(expectedResult, () => test2b(baz)); - check(expectedResult, () => test3a(baz)); - check(expectedResult, () => test3b(baz)); - - check(false, () => test1a(boz)); - check(false, () => test1b(boz)); - check(false, () => test1b(boz)); - check(false, () => test2a(boz)); - check(false, () => test2b(boz)); - check(expectedResult, () => test3a(boz)); - check(expectedResult, () => test3b(boz)); - } -} - -main() { - new C().test('bool', true); - new C().test('int', false); - new C().test('dynamic', false); - new C().test('Object', false); - new C().test('Null', true); -} diff --git a/tests/language_2/function_subtype/closure0_test.dart b/tests/language_2/function_subtype/closure0_test.dart deleted file mode 100644 index 4bc8462b0d5..00000000000 --- a/tests/language_2/function_subtype/closure0_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping of static functions. - -import 'package:expect/expect.dart'; - -typedef I f2(); - -class X { - static J f1() => null; -} - -class C { - C(f2 f); -} - -class I {} - -class J extends I {} - -main() { - new C(X.f1); - Expect.throwsTypeError(() => new C(X.f1 as dynamic)); -} diff --git a/tests/language_2/function_subtype/closure1_test.dart b/tests/language_2/function_subtype/closure1_test.dart deleted file mode 100644 index 8f1fccfd2e3..00000000000 --- a/tests/language_2/function_subtype/closure1_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping of dynamic closures. - -import 'package:expect/expect.dart'; - -typedef I f2(); - -class X { - J f1() => null; -} - -class C { - C(f2 f); -} - -class I {} - -class J extends I {} - -main() { - new C(new X().f1); - Expect.throwsTypeError(() => new C(new X().f1 as dynamic)); -} diff --git a/tests/language_2/function_subtype/factory0_test.dart b/tests/language_2/function_subtype/factory0_test.dart deleted file mode 100644 index acda285f6df..00000000000 --- a/tests/language_2/function_subtype/factory0_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping with type variables in factory constructors. - -import 'package:expect/expect.dart'; - -typedef void Foo(T t); - -class C { - factory C(foo) { - if (foo is Foo) { - return new C.internal(); - } - return null; - } - C.internal(); -} - -void method(String s) {} - -void main() { - Expect.isNotNull(new C(method)); - Expect.isNull(new C(method)); -} diff --git a/tests/language_2/function_subtype/factory1_test.dart b/tests/language_2/function_subtype/factory1_test.dart deleted file mode 100644 index 79f8e9a2d96..00000000000 --- a/tests/language_2/function_subtype/factory1_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping with type variables in factory constructors. - -import 'package:expect/expect.dart'; - -class C { - factory C(void foo(T t)) => new C.internal(); - C.internal(); -} - -void method(String s) {} - -void main() { - Expect.isNotNull(new C(method)); - Expect.throwsTypeError(() => new C(method as dynamic)); -} diff --git a/tests/language_2/function_subtype/function_subtype0_test.dart b/tests/language_2/function_subtype/function_subtype0_test.dart deleted file mode 100644 index 86fdab10cb5..00000000000 --- a/tests/language_2/function_subtype/function_subtype0_test.dart +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping. - -import 'package:expect/expect.dart'; - -typedef t__(); -typedef void t_void_(); -typedef void t_void_2(); -typedef int t_int_(); -typedef int t_int_2(); -typedef Object t_Object_(); -typedef double t_double_(); -typedef void t_void__int(int i); -typedef int t_int__int(int i); -typedef int t_int__int2(int i); -typedef int t_int__Object(Object o); -typedef Object t_Object__int(int i); -typedef int t_int__double(double d); -typedef int t_int__int_int(int i1, int i2); -typedef void t_inline_void_(void f()); -typedef void t_inline_void__int(void f(int i)); - -void _() => null; -void void_() {} -void void_2() {} -int int_() => 0; -int int_2() => 0; -Object Object_() => null; -double double_() => 0.0; -void void__int(int i) {} -int int__int(int i) => 0; -int int__int2(int i) => 0; -int int__Object(Object o) => 0; -Object Object__int(int i) => null; -int int__double(double d) => 0; -int int__int_int(int i1, int i2) => 0; -void inline_void_(void f()) {} -void inline_void__int(void f(int i)) {} - -main() { - // () -> int <: Function - Expect.isTrue(int_ is Function); - // () -> dynamic <: () -> dynamic - Expect.isTrue(_ is t__); - // () -> dynamic <: () -> void - Expect.isTrue(_ is t_void_); - // () -> void <: () -> dynamic - Expect.isTrue(void_ is t__); - // () -> int <: () -> void - Expect.isTrue(int_ is t_void_); - // () -> void <: () -> int - Expect.isFalse(void_ is t_int_); - // () -> void <: () -> void - Expect.isTrue(void_ is t_void_2); - // () -> int <: () -> int - Expect.isTrue(int_ is t_int_2); - // () -> int <: () -> Object - Expect.isTrue(int_ is t_Object_); - // () -> int <: () -> double - Expect.isFalse(int_ is t_double_); - // () -> int <: (int) -> void - Expect.isFalse(int_ is t_void__int); - // () -> void <: (int) -> int - Expect.isFalse(void_ is t_int__int); - // () -> void <: (int) -> void - Expect.isFalse(void_ is t_void__int); - // (int) -> int <: (int) -> int - Expect.isTrue(int__int is t_int__int2); - // (Object) -> int <: (int) -> Object - Expect.isTrue(int__Object is t_Object__int); - // (int) -> int <: (double) -> int - Expect.isFalse(int__int is t_int__double); - // () -> int <: (int) -> int - Expect.isFalse(int_ is t_int__int); - // (int) -> int <: (int,int) -> int - Expect.isFalse(int__int is t_int__int_int); - // (int,int) -> int <: (int) -> int - Expect.isFalse(int__int_int is t_int__int); - // (()->void) -> void <: ((int)->void) -> void - Expect.isFalse(inline_void_ is t_inline_void__int); - // ((int)->void) -> void <: (()->void) -> void - Expect.isFalse(inline_void__int is t_inline_void_); -} diff --git a/tests/language_2/function_subtype/function_subtype1_test.dart b/tests/language_2/function_subtype/function_subtype1_test.dart deleted file mode 100644 index b7b7b652ffd..00000000000 --- a/tests/language_2/function_subtype/function_subtype1_test.dart +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping. - -import 'package:expect/expect.dart'; - -class C {} - -typedef _(); -typedef void void_(); -typedef void void_2(); -typedef int int_(); -typedef int int_2(); -typedef Object Object_(); -typedef double double_(); -typedef void void__int(int i); -typedef int int__int(int i); -typedef int int__int2(int i); -typedef int int__Object(Object o); -typedef Object Object__int(int i); -typedef int int__double(double d); -typedef int int__int_int(int i1, int i2); -typedef void inline_void_(void f()); -typedef void inline_void__int(void f(int i)); - -main() { - // () -> int <: Function - Expect.isTrue(new C() is C); - // Function <: () -> int - Expect.isFalse(new C() is C); - // () -> dynamic <: () -> dynamic - Expect.isTrue(new C<_>() is C<_>); - // () -> dynamic <: () -> void - Expect.isTrue(new C<_>() is C); - // () -> void <: () -> dynamic - Expect.isTrue(new C() is C<_>); - // () -> int <: () -> void - Expect.isTrue(new C() is C); - // () -> void <: () -> int - Expect.isFalse(new C() is C); - // () -> void <: () -> void - Expect.isTrue(new C() is C); - // () -> int <: () -> int - Expect.isTrue(new C() is C); - // () -> int <: () -> Object - Expect.isTrue(new C() is C); - // () -> int <: () -> double - Expect.isFalse(new C() is C); - // () -> int <: (int) -> void - Expect.isFalse(new C() is C); - // () -> void <: (int) -> int - Expect.isFalse(new C() is C); - // () -> void <: (int) -> void - Expect.isFalse(new C() is C); - // (int) -> int <: (int) -> int - Expect.isTrue(new C() is C); - // (Object) -> int <: (int) -> Object - Expect.isTrue(new C() is C); - // (int) -> int <: (double) -> int - Expect.isFalse(new C() is C); - // () -> int <: (int) -> int - Expect.isFalse(new C() is C); - // (int) -> int <: (int,int) -> int - Expect.isFalse(new C() is C); - // (int,int) -> int <: (int) -> int - Expect.isFalse(new C() is C); - // (()->void) -> void <: ((int)->void) -> void - Expect.isFalse(new C() is C); - // ((int)->void) -> void <: (()->void) -> void - Expect.isFalse(new C() is C); -} diff --git a/tests/language_2/function_subtype/function_subtype2_test.dart b/tests/language_2/function_subtype/function_subtype2_test.dart deleted file mode 100644 index c4bc6246e09..00000000000 --- a/tests/language_2/function_subtype/function_subtype2_test.dart +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for optional parameters. - -import 'package:expect/expect.dart'; - -typedef void T1(int a, int b); -typedef void T2(int a, [int b]); -typedef void T3([int a, int b]); -typedef void T4(int a, [int b, int c]); -typedef void T5([int a, int b, int c]); - -class C { - get m1 => (T a, S b) {}; - get m2 => (T a, [S b]) {}; - get m3 => ([T a, S b]) {}; - get m4 => (T a, [S b, U c]) {}; - get m5 => ([T a, S b, U c]) {}; -} - -main() { - var c1 = new C(); - Expect.isTrue(c1.m1 is T1, "(int,int)->void is (int,int)->void"); - Expect.isFalse(c1.m1 is T2, "(int,int)->void is not (int,[int])->void"); - Expect.isFalse(c1.m1 is T3, "(int,int)->void is not ([int,int])->void"); - Expect.isFalse(c1.m1 is T4, "(int,int)->void is not (int,[int,int])->void"); - Expect.isFalse(c1.m1 is T5, "(int,int)->void is not ([int,int,int])->void"); - - Expect.isTrue(c1.m2 is T1, "(int,[int])->void is (int,int)->void"); - Expect.isTrue(c1.m2 is T2, "(int,[int])->void is (int,[int])->void"); - Expect.isFalse(c1.m2 is T3, "(int,[int])->void is not ([int,int])->void"); - Expect.isFalse(c1.m2 is T4, "(int,[int])->void is not (int,[int,int])->void"); - Expect.isFalse(c1.m2 is T5, "(int,[int])->void is not ([int,int,int])->void"); - - Expect.isTrue(c1.m3 is T1, "([int,int])->void is (int,int)->void"); - Expect.isTrue(c1.m3 is T2, "([int,int])->void is (int,[int])->void"); - Expect.isTrue(c1.m3 is T3, "([int,int])->void is ([int,int])->void"); - Expect.isFalse(c1.m3 is T4, "([int,int])->void is not (int,[int,int])->void"); - Expect.isFalse(c1.m3 is T5, "([int,int])->void is not ([int,int,int])->void"); - - Expect.isTrue(c1.m4 is T1, "(int,[int,int])->void is (int,int)->void"); - Expect.isTrue(c1.m4 is T2, "(int,[int,int])->void is (int,[int])->void"); - Expect.isFalse(c1.m4 is T3, "(int,[int,int])->void is not ([int,int])->void"); - Expect.isTrue(c1.m4 is T4, "(int,[int,int])->void is (int,[int,int])->void"); - Expect.isFalse( - c1.m4 is T5, "(int,[int,int])->void is not ([int,int,int])->void"); - - Expect.isTrue(c1.m5 is T1, "([int,int,int])->void is (int,int)->void"); - Expect.isTrue(c1.m5 is T2, "([int,int,int])->void is (int,[int])->void"); - Expect.isTrue(c1.m5 is T3, "([int,int,int])->void is ([int,int])->void"); - Expect.isTrue(c1.m5 is T4, "([int,int,int])->void is (int,[int,int])->void"); - Expect.isTrue(c1.m5 is T5, "([int,int,int])->void is ([int,int,int])->void"); - - var c2 = new C(); - Expect.isFalse(c2.m1 is T1, "(int,double)->void is not (int,int)->void"); - Expect.isFalse( - c2.m1 is T2, "(int,double)->void is not (int,[int])->void"); - Expect.isFalse(c2.m1 is T3, "(int,double)->void is not ([int,int])->void"); - Expect.isFalse( - c2.m1 is T4, "(int,double)->void is not (int,[int,int])->void"); - Expect.isFalse( - c2.m1 is T5, "(int,double)->void is not ([int,int,int])->void"); - - Expect.isFalse(c2.m2 is T1, "(int,[double])->void is not (int,int)->void"); - Expect.isFalse(c2.m2 is T2, "(int,[double])->void is not (int,[int])->void"); - Expect.isFalse(c2.m2 is T3, "(int,[double])->void is not ([int,int])->void"); - Expect.isFalse( - c2.m2 is T4, "(int,[double])->void is not (int,[int,int])->void"); - Expect.isFalse( - c2.m2 is T5, "(int,[double])->void is not ([int,int,int])->void"); - - Expect.isFalse(c2.m3 is T1, "([int,double])->void is not (int,int)->void"); - Expect.isFalse(c2.m3 is T2, "([int,double])->void is not (int,[int])->void"); - Expect.isFalse(c2.m3 is T3, "([int,double])->void is not ([int,int])->void"); - Expect.isFalse( - c2.m3 is T4, "([int,double])->void is not (int,[int,int])->void"); - Expect.isFalse( - c2.m3 is T5, "([int,double])->void is not ([int,int,int])->void"); - - Expect.isFalse( - c2.m4 is T1, "(int,[double,int])->void is not (int,int)->void"); - Expect.isFalse( - c2.m4 is T2, "(int,[double,int])->void is not (int,[int])->void"); - Expect.isFalse( - c2.m4 is T3, "(int,[double,int])->void is not ([int,int])->void"); - Expect.isFalse( - c2.m4 is T4, "(int,[double,int])->void is (int,[int,int])->void"); - Expect.isFalse( - c2.m4 is T5, "(int,[double,int])->void is ([int,int,int])->void"); - - Expect.isFalse( - c2.m5 is T1, "([int,double,int])->void is not (int,int)->void"); - Expect.isFalse( - c2.m5 is T2, "([int,double,int])->void is not (int,[int])->void"); - Expect.isFalse( - c2.m5 is T3, "([int,double,int])->void is not ([int,int])->void"); - Expect.isFalse( - c2.m5 is T4, "([int,double,int])->void is (int,[int,int])->void"); - Expect.isFalse( - c2.m5 is T5, "([int,double,int])->void is ([int,int,int])->void"); - - var c3 = new C(); - Expect.isTrue(c3.m1 is T1, "(int,int)->void is (int,int)->void"); - Expect.isFalse(c3.m1 is T2, "(int,int)->void is not (int,[int])->void"); - Expect.isFalse(c3.m1 is T3, "(int,int)->void is not ([int,int])->void"); - Expect.isFalse(c3.m1 is T4, "(int,int)->void is not (int,[int,int])->void"); - Expect.isFalse(c3.m1 is T5, "(int,int)->void is not ([int,int,int])->void"); - - Expect.isTrue(c3.m2 is T1, "(int,[int])->void is (int,int)->void"); - Expect.isTrue(c3.m2 is T2, "(int,[int])->void is (int,[int])->void"); - Expect.isFalse(c3.m2 is T3, "(int,[int])->void is not ([int,int])->void"); - Expect.isFalse(c3.m2 is T4, "(int,[int])->void is not (int,[int,int])->void"); - Expect.isFalse(c3.m2 is T5, "(int,[int])->void is not ([int,int,int])->void"); - - Expect.isTrue(c3.m3 is T1, "([int,int])->void is (int,int)->void"); - Expect.isTrue(c3.m3 is T2, "([int,int])->void is (int,[int])->void"); - Expect.isTrue(c3.m3 is T3, "([int,int])->void is ([int,int])->void"); - Expect.isFalse(c3.m3 is T4, "([int,int])->void is not (int,[int,int])->void"); - Expect.isFalse(c3.m3 is T5, "([int,int])->void is not ([int,int,int])->void"); - - Expect.isTrue(c3.m4 is T1, "(int,[int,double])->void is (int,int)->void"); - Expect.isTrue(c3.m4 is T2, "(int,[int,double])->void is (int,[int])->void"); - Expect.isFalse( - c3.m4 is T3, "(int,[int,double])->void is not ([int,int])->void"); - Expect.isFalse( - c3.m4 is T4, "(int,[int,double])->void is (int,[int,int])->void"); - Expect.isFalse( - c3.m4 is T5, "(int,[int,double])->void is ([int,int,int])->void"); - - Expect.isTrue(c3.m5 is T1, "([int,int,double])->void is (int,int)->void"); - Expect.isTrue(c3.m5 is T2, "([int,int,double])->void is (int,[int])->void"); - Expect.isTrue(c3.m5 is T3, "([int,int,double])->void is ([int,int])->void"); - Expect.isFalse( - c3.m5 is T4, "([int,int,double])->void is (int,[int,int])->void"); - Expect.isFalse( - c3.m5 is T5, "([int,int,double])->void is ([int,int,int])->void"); -} diff --git a/tests/language_2/function_subtype/function_subtype3_test.dart b/tests/language_2/function_subtype/function_subtype3_test.dart deleted file mode 100644 index 9a7f30a447f..00000000000 --- a/tests/language_2/function_subtype/function_subtype3_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'package:expect/expect.dart'; - -class FunctionLike { - T call(T arg) { - return arg; - } -} - -class Foo { - testString() => new FunctionLike() is T; - testInt() => new FunctionLike() is T; -} - -class Bar { - testString() { - Function f = new FunctionLike(); - return f is T; - } - - testInt() { - Function f = new FunctionLike(); - return f is T; - } -} - -typedef String ReturnString(Object arg); -typedef int ReturnInt(Object arg); - -main() { - { - var stringFoo = new Foo(); - var intFoo = new Foo(); - Expect.isFalse(stringFoo.testString()); - Expect.isFalse(stringFoo.testInt()); - Expect.isFalse(intFoo.testString()); - Expect.isFalse(intFoo.testInt()); - } - - { - var stringBar = new Bar(); - var intBar = new Bar(); - Expect.isTrue(stringBar.testString()); - Expect.isFalse(stringBar.testInt()); - Expect.isFalse(intBar.testString()); - Expect.isTrue(intBar.testInt()); - } -} diff --git a/tests/language_2/function_subtype/inline0_test.dart b/tests/language_2/function_subtype/inline0_test.dart deleted file mode 100644 index 19edeedae20..00000000000 --- a/tests/language_2/function_subtype/inline0_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for generic bound closures. - -import 'package:expect/expect.dart'; - -typedef void Foo(bool a, [String b]); -typedef void Bar(bool a, [String b]); -typedef void Baz(bool a, {String b}); -typedef int Boz(bool a); - -class C { - void test(String nameOfT, bool expectedResult) { - Expect.equals(expectedResult, (T a, [String b]) {} is Foo, - '($nameOfT,[String])->void is Foo'); - Expect.equals(expectedResult, (T a, [String b]) {} is Bar, - '($nameOfT,[String])->void is Bar'); - Expect.isFalse( - (T a, [String b]) {} is Baz, '($nameOfT,[String])->void is Baz'); - Expect.equals(expectedResult, (T a, [String b]) {} is Boz, - '($nameOfT,[String])->void is Boz'); - - Expect.isFalse( - (T a, {String b}) {} is Foo, '($nameOfT,{b:String})->void is Foo'); - Expect.isFalse( - (T a, {String b}) {} is Bar, '($nameOfT,{b:String})->void is Bar'); - Expect.equals(expectedResult, (T a, {String b}) {} is Baz, - '($nameOfT,{b:String})->void is Baz'); - Expect.equals(expectedResult, (T a, {String b}) {} is Boz, - '($nameOfT,{b:String})->void is Boz'); - } -} - -main() { - new C().test('bool', true); - new C().test('int', false); - new C().test('dynamic', true); -} diff --git a/tests/language_2/function_subtype/inline1_test.dart b/tests/language_2/function_subtype/inline1_test.dart deleted file mode 100644 index 55e14142e99..00000000000 --- a/tests/language_2/function_subtype/inline1_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping. - -import 'package:expect/expect.dart'; - -class A {} - -class B extends A {} - -class C extends A {} - -class Class { - void forEach(void f(K k, V v)) {} -} - -main() { - Class c = new Class(); - c.forEach((A a, A b) {}); - c.forEach((B a, C b) {}); - Expect.throwsTypeError(() => c.forEach((A a, B b) {} as dynamic)); -} diff --git a/tests/language_2/function_subtype/inline2_test.dart b/tests/language_2/function_subtype/inline2_test.dart deleted file mode 100644 index 95a9e9249f0..00000000000 --- a/tests/language_2/function_subtype/inline2_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping of inlined function typed parameters. - -import '../dynamic_type_helper.dart'; - -class C { - var field; - C.c1(int this.field()); - C.c2({int this.field()}); - C.c3({int field(): null}); - C.c4({int this.field(): null}); - C.c5([int this.field()]); - C.c6([int field() = null]); - C.c7([int this.field() = null]); -} - -void test(var f, String constructorName) { - testDynamicTypeError(false, () => f(m1), "'new C.$constructorName(m1)'"); - testDynamicTypeError(true, () => f(m2), "'new C.$constructorName(m2)'"); - testDynamicTypeError(false, () => f(m3), "'new C.$constructorName(m3)'"); - testDynamicTypeError(true, () => f(m4), "'new C.$constructorName(m4)'"); -} - -int m1() => null; -String m2() => null; -Null m3() => null; -Null m4(int i) => null; - -main() { - test((m) => new C.c1(m), 'c1'); - test((m) => new C.c2(field: m), 'c2'); - test((m) => new C.c3(field: m), 'c3'); - test((m) => new C.c4(field: m), 'c4'); - test((m) => new C.c5(m), 'c5'); - test((m) => new C.c6(m), 'c6'); - test((m) => new C.c7(m), 'c7'); -} diff --git a/tests/language_2/function_subtype/local0_test.dart b/tests/language_2/function_subtype/local0_test.dart deleted file mode 100644 index f8805c2abae..00000000000 --- a/tests/language_2/function_subtype/local0_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for local functions. - -import 'package:expect/expect.dart'; - -typedef int Foo(bool a, [String b]); -typedef int Bar(bool a, [String b]); -typedef int Baz(bool a, {String b}); -typedef int Boz(bool a); - -main() { - int foo(bool a, [String b]) => null; - int baz(bool a, {String b}) => null; - int boz(bool a, {int b}) => null; - - Expect.isTrue(foo is Foo, 'foo is Foo'); - Expect.isTrue(foo is Bar, 'foo is Bar'); - Expect.isFalse(foo is Baz, 'foo is Baz'); - Expect.isTrue(foo is Boz, 'foo is Boz'); - - Expect.isFalse(baz is Foo, 'baz is Foo'); - Expect.isFalse(baz is Bar, 'baz is Bar'); - Expect.isTrue(baz is Baz, 'baz is Baz'); - Expect.isTrue(baz is Boz, 'baz is Boz'); - - Expect.isFalse(boz is Foo, 'boz is Foo'); - Expect.isFalse(boz is Bar, 'boz is Bar'); - Expect.isFalse(boz is Baz, 'boz is Baz'); - Expect.isTrue(boz is Boz, 'boz is Boz'); -} diff --git a/tests/language_2/function_subtype/local1_test.dart b/tests/language_2/function_subtype/local1_test.dart deleted file mode 100644 index 9f05b289ee3..00000000000 --- a/tests/language_2/function_subtype/local1_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for local functions against generic typedefs. - -import 'package:expect/expect.dart'; - -typedef int Foo(T a, [String b]); -typedef int Bar(T a, [String b]); -typedef int Baz(T a, {String b}); -typedef int Boz(T a); - -main() { - int foo(bool a, [String b]) => null; - int baz(bool a, {String b}) => null; - - Expect.isTrue(foo is Foo, 'foo is Foo'); - Expect.isTrue(foo is Bar, 'foo is Bar'); - Expect.isFalse(foo is Baz, 'foo is Baz'); - Expect.isTrue(foo is Boz, 'foo is Boz'); - - Expect.isFalse(foo is Foo, 'foo is Foo'); - Expect.isFalse(foo is Bar, 'foo is Bar'); - Expect.isFalse(foo is Baz, 'foo is Baz'); - Expect.isFalse(foo is Boz, 'foo is Boz'); - - Expect.isFalse(foo is Foo, 'foo is Foo'); - Expect.isFalse(foo is Bar, 'foo is Bar'); - Expect.isFalse(foo is Baz, 'foo is Baz'); - Expect.isFalse(foo is Boz, 'foo is Boz'); - - Expect.isFalse(baz is Foo, 'baz is Foo'); - Expect.isFalse(baz is Bar, 'baz is Bar'); - Expect.isTrue(baz is Baz, 'baz is Baz'); - Expect.isTrue(baz is Boz, 'baz is Boz'); - - Expect.isFalse(baz is Foo, 'baz is Foo'); - Expect.isFalse(baz is Bar, 'baz is Bar'); - Expect.isFalse(baz is Baz, 'baz is Baz'); - Expect.isFalse(baz is Boz, 'baz is Boz'); - - Expect.isFalse(baz is Foo, 'baz is Foo'); - Expect.isFalse(baz is Bar, 'baz is Bar'); - Expect.isFalse(baz is Baz, 'baz is Baz'); - Expect.isFalse(baz is Boz, 'baz is Boz'); -} diff --git a/tests/language_2/function_subtype/local2_test.dart b/tests/language_2/function_subtype/local2_test.dart deleted file mode 100644 index 7ea39c88fa3..00000000000 --- a/tests/language_2/function_subtype/local2_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for local functions on generic type against generic -// typedefs. - -import 'package:expect/expect.dart'; - -typedef int Foo(T a, [String b]); -typedef int Bar(T a, [String b]); -typedef int Baz(T a, {String b}); -typedef int Boz(T a); -typedef int Biz(T a, int b); - -class C { - void test(String nameOfT, bool expectedResult) { - int foo(bool a, [String b]) => null; - int baz(bool a, {String b}) => null; - - Expect.equals(expectedResult, foo is Foo, 'foo is Foo<$nameOfT>'); - Expect.equals(expectedResult, foo is Bar, 'foo is Bar<$nameOfT>'); - Expect.isFalse(foo is Baz, 'foo is Baz<$nameOfT>'); - Expect.equals(expectedResult, foo is Boz, 'foo is Boz<$nameOfT>'); - Expect.isFalse(foo is Biz, 'foo is Biz<$nameOfT>'); - - Expect.isFalse(baz is Foo, 'baz is Foo<$nameOfT>'); - Expect.isFalse(baz is Bar, 'baz is Bar<$nameOfT>'); - Expect.equals(expectedResult, baz is Baz, 'baz is Baz<$nameOfT>'); - Expect.equals(expectedResult, baz is Boz, 'baz is Boz<$nameOfT>'); - Expect.isFalse(baz is Biz, 'bar is Biz<$nameOfT>'); - } -} - -main() { - new C().test('bool', true); - new C().test('int', false); - new C().test('dynamic', false); - new C().test('Object', false); - new C().test('Null', true); -} diff --git a/tests/language_2/function_subtype/local3_test.dart b/tests/language_2/function_subtype/local3_test.dart deleted file mode 100644 index dcb9d9a79b1..00000000000 --- a/tests/language_2/function_subtype/local3_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for generic bound closures. - -import 'package:expect/expect.dart'; - -typedef void Foo(bool a, [String b]); -typedef void Bar(bool a, [String b]); -typedef void Baz(bool a, {String b}); -typedef int Boz(bool a); - -class C { - void test(String nameOfT, bool expectedResult) { - void foo(T a, [String b]) {} - void baz(T a, {String b}) {} - - Expect.equals(expectedResult, foo is Foo, 'C<$nameOfT>.foo is Foo'); - Expect.equals(expectedResult, foo is Bar, 'C<$nameOfT>.foo is Bar'); - Expect.isFalse(foo is Baz, 'C<$nameOfT>.foo is Baz'); - Expect.isFalse(foo is Boz, 'C<$nameOfT>.foo is Boz'); - - Expect.isFalse(baz is Foo, 'C<$nameOfT>.baz is Foo'); - Expect.isFalse(baz is Bar, 'C<$nameOfT>.baz is Bar'); - Expect.equals(expectedResult, baz is Baz, 'C<$nameOfT>.baz is Baz'); - Expect.isFalse(baz is Boz, 'C<$nameOfT>.baz is Boz'); - } -} - -main() { - new C().test('bool', true); - new C().test('int', false); - new C().test('dynamic', true); -} diff --git a/tests/language_2/function_subtype/local4_test.dart b/tests/language_2/function_subtype/local4_test.dart deleted file mode 100644 index 1a66f21f14e..00000000000 --- a/tests/language_2/function_subtype/local4_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for generic bound closures. This also tests -// type argument substitution. - -import 'package:expect/expect.dart'; - -typedef void Foo(bool a, [String b]); -typedef void Bar(bool a, [String b]); -typedef void Baz(bool a, {String b}); -typedef int Boz(bool a); - -class C { - void test(String nameOfT, bool expectedResult) { - void foo(T a, [String b]) {} - void baz(T a, {String b}) {} - - Expect.equals(expectedResult, foo is Foo, 'C<$nameOfT>.foo is Foo'); - Expect.equals(expectedResult, foo is Bar, 'C<$nameOfT>.foo is Bar'); - Expect.isFalse(foo is Baz, 'C<$nameOfT>.foo is Baz'); - Expect.isFalse(foo is Boz, 'C<$nameOfT>.foo is Boz'); - - Expect.isFalse(baz is Foo, 'C<$nameOfT>.baz is Foo'); - Expect.isFalse(baz is Bar, 'C<$nameOfT>.baz is Bar'); - Expect.equals(expectedResult, baz is Baz, 'C<$nameOfT>.baz is Baz'); - Expect.isFalse(baz is Boz, 'C<$nameOfT>.baz is Boz'); - } -} - -class D extends C {} - -main() { - new D().test('bool', true); - new D().test('int', false); - new D().test('dynamic', true); -} diff --git a/tests/language_2/function_subtype/local5_test.dart b/tests/language_2/function_subtype/local5_test.dart deleted file mode 100644 index 450174fc97a..00000000000 --- a/tests/language_2/function_subtype/local5_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for local functions on generic type against generic -// typedefs. - -import 'package:expect/expect.dart'; - -typedef int Foo(T a, [String b]); -typedef int Bar(T a, [String b]); -typedef int Baz(T a, {String b}); -typedef int Boz(T a); -typedef int Biz(T a, int b); - -class C { - void test(String nameOfT, bool expectedResult) { - int foo(bool a, [String b]) => null; - int baz(bool a, {String b}) => null; - - Expect.equals(expectedResult, foo is Foo, 'foo is Foo<$nameOfT>'); - Expect.equals(expectedResult, foo is Bar, 'foo is Bar<$nameOfT>'); - Expect.isFalse(foo is Baz, 'foo is Baz<$nameOfT>'); - Expect.equals(expectedResult, foo is Boz, 'foo is Boz<$nameOfT>'); - Expect.isFalse(foo is Biz, 'foo is Biz<$nameOfT>'); - - Expect.isFalse(baz is Foo, 'baz is Foo<$nameOfT>'); - Expect.isFalse(baz is Bar, 'baz is Bar<$nameOfT>'); - Expect.equals(expectedResult, baz is Baz, 'baz is Baz<$nameOfT>'); - Expect.equals(expectedResult, baz is Boz, 'baz is Boz<$nameOfT>'); - Expect.isFalse(baz is Biz, 'bar is Biz<$nameOfT>'); - } -} - -class D extends C {} - -main() { - new D().test('bool', true); - new D().test('int', false); - new D().test('dynamic', false); - new D().test('Object', false); - new D().test('Null', true); -} diff --git a/tests/language_2/function_subtype/local6_test.dart b/tests/language_2/function_subtype/local6_test.dart deleted file mode 100644 index 9ef9ac65a57..00000000000 --- a/tests/language_2/function_subtype/local6_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. -// VMOptions=--no-eliminate-type-checks - -// @dart = 2.9 - -// Regression test for issue 12127. - -class C { - void test() { - void foo(T a) {} - } -} - -main() { - new C().test(); -} diff --git a/tests/language_2/function_subtype/named1_test.dart b/tests/language_2/function_subtype/named1_test.dart deleted file mode 100644 index 0934c5a610a..00000000000 --- a/tests/language_2/function_subtype/named1_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping. - -import 'package:expect/expect.dart'; - -void void_() {} -void void__int(int i) {} -void void___a_int({int a}) {} -void void___a_int2({int a}) {} -void void___b_int({int b}) {} -void void___a_Object({Object a}) {} -void void__int__a_int(int i1, {int a}) {} -void void__int__a_int2(int i1, {int a}) {} -void void___a_double({double a}) {} -void void___a_int_b_int({int a, int b}) {} -void void___a_int_b_int_c_int({int a, int b, int c}) {} -void void___a_int_c_int({int a, int c}) {} -void void___b_int_c_int({int b, int c}) {} -void void___c_int({int c}) {} - -typedef void t_void_(); -typedef void t_void__int(int i); -typedef void t_void___a_int({int a}); -typedef void t_void___a_int2({int a}); -typedef void t_void___b_int({int b}); -typedef void t_void___a_Object({Object a}); -typedef void t_void__int__a_int(int i1, {int a}); -typedef void t_void__int__a_int2(int i1, {int a}); -typedef void t_void___a_double({double a}); -typedef void t_void___a_int_b_int({int a, int b}); -typedef void t_void___a_int_b_int_c_int({int a, int b, int c}); -typedef void t_void___a_int_c_int({int a, int c}); -typedef void t_void___b_int_c_int({int b, int c}); -typedef void t_void___c_int({int c}); - -main() { - // Test ({int a})->void <: ()->void. - Expect.isTrue(void___a_int is t_void_); - // Test ({int a})->void <: (int)->void. - Expect.isFalse(void___a_int is t_void__int); - // Test (int)->void <: ({int a})->void. - Expect.isFalse(void__int is t_void___a_int); - // Test ({int a})->void <: ({int a})->void. - Expect.isTrue(void___a_int is t_void___a_int2); - // Test ({int a})->void <: ({int b})->void. - Expect.isFalse(void___a_int is t_void___b_int); - // Test ({Object a})->void <: ({int a})->void. - Expect.isTrue(void___a_Object is t_void___a_int); - // Test ({int a})->void <: ({Object a})->void. - Expect.isFalse(void___a_int is t_void___a_Object); - // Test (int,{int a})->void <: (int,{int a})->void. - Expect.isTrue(void__int__a_int is t_void__int__a_int2); - // Test ({int a})->void <: ({double a})->void. - Expect.isFalse(void___a_int is t_void___a_double); - // Test ({int a})->void <: ({int a,int b})->void. - Expect.isFalse(void___a_int is t_void___a_int_b_int); - // Test ({int a,int b})->void <: ({int a})->void. - Expect.isTrue(void___a_int_b_int is t_void___a_int); - // Test ({int a,int b,int c})->void <: ({int a,int c})->void. - Expect.isTrue(void___a_int_b_int_c_int is t_void___a_int_c_int); - // Test ({int a,int b,int c})->void <: ({int b,int c})->void. - Expect.isTrue(void___a_int_b_int_c_int is t_void___b_int_c_int); - // Test ({int a,int b,int c})->void <: ({int c})->void. - Expect.isTrue(void___a_int_b_int_c_int is t_void___c_int); -} diff --git a/tests/language_2/function_subtype/named2_test.dart b/tests/language_2/function_subtype/named2_test.dart deleted file mode 100644 index c24ec8dc672..00000000000 --- a/tests/language_2/function_subtype/named2_test.dart +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping. - -import 'package:expect/expect.dart'; - -class C {} - -typedef void void_(); -typedef void void__int(int i); -typedef void void___a_int({int a}); -typedef void void___a_int2({int a}); -typedef void void___b_int({int b}); -typedef void void___a_Object({Object a}); -typedef void void__int__a_int(int i1, {int a}); -typedef void void__int__a_int2(int i1, {int a}); -typedef void void___a_double({double a}); -typedef void void___a_int_b_int({int a, int b}); -typedef void void___a_int_b_int_c_int({int a, int b, int c}); -typedef void void___a_int_c_int({int a, int c}); -typedef void void___b_int_c_int({int b, int c}); -typedef void void___c_int({int c}); - -main() { - // Test ({int a})->void <: ()->void. - Expect.isTrue(new C() is C); - // Test ({int a})->void <: (int)->void. - Expect.isFalse(new C() is C); - // Test (int)->void <: ({int a})->void. - Expect.isFalse(new C() is C); - // Test ({int a})->void <: ({int a})->void. - Expect.isTrue(new C() is C); - // Test ({int a})->void <: ({int b})->void. - Expect.isFalse(new C() is C); - // Test ({Object a})->void <: ({int a})->void. - Expect.isTrue(new C() is C); - // Test ({int a})->void <: ({Object a})->void. - Expect.isFalse(new C() is C); - // Test (int,{int a})->void <: (int,{int a})->void. - Expect.isTrue(new C() is C); - // Test ({int a})->void <: ({double a})->void. - Expect.isFalse(new C() is C); - // Test ({int a})->void <: ({int a,int b})->void. - Expect.isFalse(new C() is C); - // Test ({int a,int b})->void <: ({int a})->void. - Expect.isTrue(new C() is C); - // Test ({int a,int b,int c})->void <: ({int a,int c})->void. - Expect.isTrue(new C() is C); - // Test ({int a,int b,int c})->void <: ({int b,int c})->void. - Expect.isTrue(new C() is C); - // Test ({int a,int b,int c})->void <: ({int c})->void. - Expect.isTrue(new C() is C); -} diff --git a/tests/language_2/function_subtype/nested_function_type_test.dart b/tests/language_2/function_subtype/nested_function_type_test.dart deleted file mode 100644 index 79bc0aae677..00000000000 --- a/tests/language_2/function_subtype/nested_function_type_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2021, 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 - -import "package:expect/expect.dart"; - -// Two function types that are identical except the argument type of the -// nested function is a type variable from the outer function. -typedef Fn = void Function(S val) Function(T val); -typedef Gn = void Function(T val) Function(T val); - -void Function(S) fn(T val) => (R val) {}; -void Function(T) gn(T val) => (T val) {}; - -// The same pattern here except with bounds on the type arguments. -typedef Xn = void Function(S val) Function(T val); -typedef Yn = void Function(T val) Function(T val); - -void Function(S) xn(T val) => - (R val) {}; -void Function(T) yn(T val) => - (T val) {}; - -// The nested function here uses concrete type in the argument position so it -// should satisfy either of the previous typedefs. -void Function(num) zn(T val) => - (num val) {}; - -void main() { - Expect.isTrue(fn is Fn); - Expect.isFalse(fn is Gn); - - Expect.isTrue(gn is Gn); - Expect.isFalse(gn is Fn); - - Expect.isTrue(xn is Xn); - Expect.isFalse(xn is Yn); - - Expect.isTrue(yn is Yn); - Expect.isFalse(yn is Xn); - - Expect.isTrue(zn is Xn); - Expect.isTrue(zn is Yn); -} diff --git a/tests/language_2/function_subtype/not0_test.dart b/tests/language_2/function_subtype/not0_test.dart deleted file mode 100644 index 8b06b8b5794..00000000000 --- a/tests/language_2/function_subtype/not0_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check negative function subtyping tests. - -import 'package:expect/expect.dart'; - -typedef void Foo(T t); -typedef void Bar(int i); - -void bar(int i) {} - -void main() { - Expect.isTrue(bar is! Foo); - Expect.isTrue(bar is! Foo); - Expect.isFalse(bar is! Foo); - Expect.isFalse(bar is! Bar); -} diff --git a/tests/language_2/function_subtype/not1_test.dart b/tests/language_2/function_subtype/not1_test.dart deleted file mode 100644 index b4fbaace995..00000000000 --- a/tests/language_2/function_subtype/not1_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check negative function subtyping tests. - -import 'package:expect/expect.dart'; - -typedef void Foo(T t); -typedef void Bar(int i); - -class Class { - void bar(T i) {} -} - -void main() { - Expect.isFalse(new Class().bar is! Foo); - Expect.isFalse(new Class().bar is! Foo); - Expect.isFalse(new Class().bar is! Foo); - Expect.isFalse(new Class().bar is! Bar); - - Expect.isFalse(new Class().bar is! Foo); - Expect.isFalse(new Class().bar is! Foo); - Expect.isFalse(new Class().bar is! Foo); - Expect.isFalse(new Class().bar is! Bar); - - Expect.isFalse(new Class().bar is! Foo); - Expect.isFalse(new Class().bar is! Foo); - Expect.isFalse(new Class().bar is! Foo); - Expect.isFalse(new Class().bar is! Bar); -} diff --git a/tests/language_2/function_subtype/not2_test.dart b/tests/language_2/function_subtype/not2_test.dart deleted file mode 100644 index cd1120e3cf8..00000000000 --- a/tests/language_2/function_subtype/not2_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check negative function subtyping tests. - -import 'package:expect/expect.dart'; - -typedef void Foo(T t); -typedef void Bar(int i); - -class Class { - test(bool expectedResult, var o, String typeName) { - Expect.equals(expectedResult, o is! Foo, "bar is! Foo<$typeName>"); - Expect.isFalse(o is! Bar, "bar is! Bar"); - } -} - -void bar(int i) {} - -void main() { - new Class().test(true, bar, "dynamic"); - new Class().test(true, bar, "Object"); - new Class().test(false, bar, "Null"); - new Class().test(false, bar, "int"); - new Class().test(true, bar, "bool"); -} diff --git a/tests/language_2/function_subtype/not3_test.dart b/tests/language_2/function_subtype/not3_test.dart deleted file mode 100644 index dde3cd1fe76..00000000000 --- a/tests/language_2/function_subtype/not3_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check negative function subtyping tests. - -import 'package:expect/expect.dart'; - -typedef void Foo(T t); -typedef void Bar(int i); - -class Class { - test(bool expectedResult, var o, String typeName) { - void local() { - Expect.equals(expectedResult, o is! Foo, "bar is! Foo<$typeName>"); - Expect.isFalse(o is! Bar, "bar is! Bar"); - } - - local(); - } -} - -void bar(int i) {} - -void main() { - new Class().test(true, bar, "dynamic"); - new Class().test(true, bar, "Object"); - new Class().test(false, bar, "Null"); - new Class().test(false, bar, "int"); - new Class().test(true, bar, "bool"); -} diff --git a/tests/language_2/function_subtype/null_test.dart b/tests/language_2/function_subtype/null_test.dart deleted file mode 100644 index a11cde30626..00000000000 --- a/tests/language_2/function_subtype/null_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for null. - -import 'package:expect/expect.dart'; - -typedef int Foo(bool a, [String b]); -typedef int Bar(T a, [String b]); - -main() { - Expect.isFalse(null is Foo, 'null is Foo'); - Expect.isFalse(null is Bar, 'null is Bar'); - Expect.isFalse(null is Bar, 'null is Bar'); -} diff --git a/tests/language_2/function_subtype/optional1_test.dart b/tests/language_2/function_subtype/optional1_test.dart deleted file mode 100644 index 8ba13ec4cf9..00000000000 --- a/tests/language_2/function_subtype/optional1_test.dart +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping. - -import 'package:expect/expect.dart'; - -void void_() {} -void void__int(int i) {} -void void___int([int i]) {} -void void___int2([int i]) {} -void void___Object([Object o]) {} -void void__int__int(int i1, [int i2]) {} -void void__int__int2(int i1, [int i2]) {} -void void__int__int_int(int i1, [int i2, int i3]) {} -void void___double(double d) {} -void void___int_int([int i1, int i2]) {} -void void___int_int_int([int i1, int i2, int i3]) {} -void void___Object_int([Object o, int i]) {} - -typedef void t_void_(); -typedef void t_void__int(int i); -typedef void t_void___int([int i]); -typedef void t_void___int2([int i]); -typedef void t_void___Object([Object o]); -typedef void t_void__int__int(int i1, [int i2]); -typedef void t_void__int__int2(int i1, [int i2]); -typedef void t_void__int__int_int(int i1, [int i2, int i3]); -typedef void t_void___double(double d); -typedef void t_void___int_int([int i1, int i2]); -typedef void t_void___int_int_int([int i1, int i2, int i3]); -typedef void t_void___Object_int([Object o, int i]); - -main() { - // Test ([int])->void <: ()->void. - Expect.isTrue(void___int is t_void_); - // Test ([int])->void <: (int)->void. - Expect.isTrue(void___int is t_void__int); - // Test (int)->void <: ([int])->void. - Expect.isFalse(void__int is t_void___int); - // Test ([int])->void <: ([int])->void. - Expect.isTrue(void___int is t_void___int2); - // Test ([Object])->void <: ([int])->void. - Expect.isTrue(void___Object is t_void___int); - // Test ([int])->void <: ([Object])->void. - Expect.isFalse(void___int is t_void___Object); - // Test (int,[int])->void <: (int)->void. - Expect.isTrue(void__int__int is t_void__int); - // Test (int,[int])->void <: (int,[int])->void. - Expect.isTrue(void__int__int is t_void__int__int2); - // Test (int)->void <: ([int])->void. - Expect.isFalse(void__int is t_void___int); - // Test ([int,int])->void <: (int)->void. - Expect.isTrue(void___int_int is t_void__int); - // Test ([int,int])->void <: (int,[int])->void. - Expect.isTrue(void___int_int is t_void__int__int); - // Test ([int,int])->void <: (int,[int,int])->void. - Expect.isFalse(void___int_int is t_void__int__int_int); - // Test ([int,int,int])->void <: (int,[int,int])->void. - Expect.isTrue(void___int_int_int is t_void__int__int_int); - // Test ([int])->void <: ([double])->void. - Expect.isFalse(void___int is t_void___double); - // Test ([int])->void <: ([int,int])->void. - Expect.isFalse(void___int is t_void___int_int); - // Test ([int,int])->void <: ([int])->void. - Expect.isTrue(void___int_int is t_void___int); - // Test ([Object,int])->void <: ([int])->void. - Expect.isTrue(void___Object_int is t_void___int); -} diff --git a/tests/language_2/function_subtype/optional2_test.dart b/tests/language_2/function_subtype/optional2_test.dart deleted file mode 100644 index b2101f631bf..00000000000 --- a/tests/language_2/function_subtype/optional2_test.dart +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping. - -import 'package:expect/expect.dart'; - -class C {} - -typedef void void_(); -typedef void void__int(int i); -typedef void void___int([int i]); -typedef void void___int2([int i]); -typedef void void___Object([Object o]); -typedef void void__int__int(int i1, [int i2]); -typedef void void__int__int2(int i1, [int i2]); -typedef void void__int__int_int(int i1, [int i2, int i3]); -typedef void void___double(double d); -typedef void void___int_int([int i1, int i2]); -typedef void void___int_int_int([int i1, int i2, int i3]); -typedef void void___Object_int([Object o, int i]); - -main() { - // Test ([int])->void <: ()->void. - Expect.isTrue(new C() is C); - // Test ([int])->void <: (int)->void. - Expect.isTrue(new C() is C); - // Test (int)->void <: ([int])->void. - Expect.isFalse(new C() is C); - // Test ([int])->void <: ([int])->void. - Expect.isTrue(new C() is C); - // Test ([Object])->void <: ([int])->void. - Expect.isTrue(new C() is C); - // Test ([int])->void <: ([Object])->void. - Expect.isFalse(new C() is C); - // Test (int,[int])->void <: (int)->void. - Expect.isTrue(new C() is C); - // Test (int,[int])->void <: (int,[int])->void. - Expect.isTrue(new C() is C); - // Test (int)->void <: ([int])->void. - Expect.isFalse(new C() is C); - // Test ([int,int])->void <: (int)->void. - Expect.isTrue(new C() is C); - // Test ([int,int])->void <: (int,[int])->void. - Expect.isTrue(new C() is C); - // Test ([int,int])->void <: (int,[int,int])->void. - Expect.isFalse(new C() is C); - // Test ([int,int,int])->void <: (int,[int,int])->void. - Expect.isTrue(new C() is C); - // Test ([int])->void <: ([double])->void. - Expect.isFalse(new C() is C); - // Test ([int])->void <: ([int,int])->void. - Expect.isFalse(new C() is C); - // Test ([int,int])->void <: ([int])->void. - Expect.isTrue(new C() is C); - // Test ([Object,int])->void <: ([int])->void. - Expect.isTrue(new C() is C); -} diff --git a/tests/language_2/function_subtype/regress41680_test.dart b/tests/language_2/function_subtype/regress41680_test.dart deleted file mode 100644 index f37f5730e95..00000000000 --- a/tests/language_2/function_subtype/regress41680_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// 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. - -// @dart = 2.9 - -// [NNBD non-migrated]: This test is migrated to regress41680_strong_test.dart -// and regress41680_weak_test.dart. -import "package:expect/expect.dart"; - -typedef dynamicToDynamic = dynamic Function(dynamic); - -typedef voidToT = T Function(); - -dynamic dynamicNull = null; - -dynamic cast(dynamic value) => value as T; - -bool allowsArgument(T Function() fn) => true; - -main() { - // In legacy Dart 2 Null should be allowed as a subtype of function types. - Expect.equals(null, dynamicNull as Function); - Expect.equals(null, dynamicNull as dynamicToDynamic); - Expect.equals(null, cast(dynamicNull)); - Expect.equals(null, dynamicNull as voidToT); - Expect.equals(true, allowsArgument(dynamicNull)); -} diff --git a/tests/language_2/function_subtype/regression_ddc_588_test.dart b/tests/language_2/function_subtype/regression_ddc_588_test.dart deleted file mode 100644 index 6ac60ac5088..00000000000 --- a/tests/language_2/function_subtype/regression_ddc_588_test.dart +++ /dev/null @@ -1,16 +0,0 @@ - -// @dart = 2.9 -import "package:expect/expect.dart"; - -// regression test for ddc #588 - -typedef int Int2Int(int x); - -void foo(List list) { - list.forEach((f) => print(f(42))); -} - -void main() { - var l = []; - Expect.throwsTypeError(() => foo(l)); -} diff --git a/tests/language_2/function_subtype/setter0_test.dart b/tests/language_2/function_subtype/setter0_test.dart deleted file mode 100644 index d052b62b284..00000000000 --- a/tests/language_2/function_subtype/setter0_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for implicit setters. - -import 'package:expect/expect.dart'; - -typedef void Foo(); - -class A {} - -class C { - Foo foo; - A bar; -} - -class D { - Foo foo; - A bar; -} - -test(c) { - Expect.throwsTypeError(() => c.foo = 1); -} - -void main() { - test(new C()); - test(new D()); -} diff --git a/tests/language_2/function_subtype/simple0_test.dart b/tests/language_2/function_subtype/simple0_test.dart deleted file mode 100644 index a8671c7b7ce..00000000000 --- a/tests/language_2/function_subtype/simple0_test.dart +++ /dev/null @@ -1,318 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping of simple function types. - -import 'package:expect/expect.dart'; - -typedef Args0(); -typedef Args1(a); -typedef Args2(a, b); -typedef Args3(a, b, c); -typedef Args4(a, b, c, d); -typedef Args5(a, b, c, d, e); -typedef Args6(a, b, c, d, e, f); -typedef Args7(a, b, c, d, e, f, g); -typedef Args8(a, b, c, d, e, f, g, h); -typedef Args9(a, b, c, d, e, f, g, h, i); -typedef Args10(a, b, c, d, e, f, g, h, i, j); -typedef Args11(a, b, c, d, e, f, g, h, i, j, k); -typedef Args12(a, b, c, d, e, f, g, h, i, j, k, l); -typedef Args13(a, b, c, d, e, f, g, h, i, j, k, l, m); -typedef Args14(a, b, c, d, e, f, g, h, i, j, k, l, m, n); -typedef Args15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o); - -args0() {} -args1(a) {} -args2(a, b) {} -args3(a, b, c) {} -args4(a, b, c, d) {} -args5(a, b, c, d, e) {} -args6(a, b, c, d, e, f) {} -args7(a, b, c, d, e, f, g) {} -args8(a, b, c, d, e, f, g, h) {} -args9(a, b, c, d, e, f, g, h, i) {} -args10(a, b, c, d, e, f, g, h, i, j) {} -args11(a, b, c, d, e, f, g, h, i, j, k) {} -args12(a, b, c, d, e, f, g, h, i, j, k, l) {} -args13(a, b, c, d, e, f, g, h, i, j, k, l, m) {} -args14(a, b, c, d, e, f, g, h, i, j, k, l, m, n) {} -args15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) {} - -main() { - Expect.isTrue(args0 is Args0); - Expect.isFalse(args0 is Args1); - Expect.isFalse(args0 is Args2); - Expect.isFalse(args0 is Args3); - Expect.isFalse(args0 is Args4); - Expect.isFalse(args0 is Args5); - Expect.isFalse(args0 is Args6); - Expect.isFalse(args0 is Args7); - Expect.isFalse(args0 is Args8); - Expect.isFalse(args0 is Args9); - Expect.isFalse(args0 is Args10); - Expect.isFalse(args0 is Args11); - Expect.isFalse(args0 is Args12); - Expect.isFalse(args0 is Args13); - Expect.isFalse(args0 is Args14); - Expect.isFalse(args0 is Args15); - - Expect.isFalse(args1 is Args0); - Expect.isTrue(args1 is Args1); - Expect.isFalse(args1 is Args2); - Expect.isFalse(args1 is Args3); - Expect.isFalse(args1 is Args4); - Expect.isFalse(args1 is Args5); - Expect.isFalse(args1 is Args6); - Expect.isFalse(args1 is Args7); - Expect.isFalse(args1 is Args8); - Expect.isFalse(args1 is Args9); - Expect.isFalse(args1 is Args10); - Expect.isFalse(args1 is Args11); - Expect.isFalse(args1 is Args12); - Expect.isFalse(args1 is Args13); - Expect.isFalse(args1 is Args14); - Expect.isFalse(args1 is Args15); - - Expect.isFalse(args2 is Args0); - Expect.isFalse(args2 is Args1); - Expect.isTrue(args2 is Args2); - Expect.isFalse(args2 is Args3); - Expect.isFalse(args2 is Args4); - Expect.isFalse(args2 is Args5); - Expect.isFalse(args2 is Args6); - Expect.isFalse(args2 is Args7); - Expect.isFalse(args2 is Args8); - Expect.isFalse(args2 is Args9); - Expect.isFalse(args2 is Args10); - Expect.isFalse(args2 is Args11); - Expect.isFalse(args2 is Args12); - Expect.isFalse(args2 is Args13); - Expect.isFalse(args2 is Args14); - Expect.isFalse(args2 is Args15); - - Expect.isFalse(args3 is Args0); - Expect.isFalse(args3 is Args1); - Expect.isFalse(args3 is Args2); - Expect.isTrue(args3 is Args3); - Expect.isFalse(args3 is Args4); - Expect.isFalse(args3 is Args5); - Expect.isFalse(args3 is Args6); - Expect.isFalse(args3 is Args7); - Expect.isFalse(args3 is Args8); - Expect.isFalse(args3 is Args9); - Expect.isFalse(args3 is Args10); - Expect.isFalse(args3 is Args11); - Expect.isFalse(args3 is Args12); - Expect.isFalse(args3 is Args13); - Expect.isFalse(args3 is Args14); - Expect.isFalse(args3 is Args15); - - Expect.isFalse(args4 is Args0); - Expect.isFalse(args4 is Args1); - Expect.isFalse(args4 is Args2); - Expect.isFalse(args4 is Args3); - Expect.isTrue(args4 is Args4); - Expect.isFalse(args4 is Args5); - Expect.isFalse(args4 is Args6); - Expect.isFalse(args4 is Args7); - Expect.isFalse(args4 is Args8); - Expect.isFalse(args4 is Args9); - Expect.isFalse(args4 is Args10); - Expect.isFalse(args4 is Args11); - Expect.isFalse(args4 is Args12); - Expect.isFalse(args4 is Args13); - Expect.isFalse(args4 is Args14); - Expect.isFalse(args4 is Args15); - - Expect.isFalse(args5 is Args0); - Expect.isFalse(args5 is Args1); - Expect.isFalse(args5 is Args2); - Expect.isFalse(args5 is Args3); - Expect.isFalse(args5 is Args4); - Expect.isTrue(args5 is Args5); - Expect.isFalse(args5 is Args6); - Expect.isFalse(args5 is Args7); - Expect.isFalse(args5 is Args8); - Expect.isFalse(args5 is Args9); - Expect.isFalse(args5 is Args10); - Expect.isFalse(args5 is Args11); - Expect.isFalse(args5 is Args12); - Expect.isFalse(args5 is Args13); - Expect.isFalse(args5 is Args14); - Expect.isFalse(args5 is Args15); - - Expect.isFalse(args6 is Args0); - Expect.isFalse(args6 is Args1); - Expect.isFalse(args6 is Args2); - Expect.isFalse(args6 is Args3); - Expect.isFalse(args6 is Args4); - Expect.isFalse(args6 is Args5); - Expect.isTrue(args6 is Args6); - Expect.isFalse(args6 is Args7); - Expect.isFalse(args6 is Args8); - Expect.isFalse(args6 is Args9); - Expect.isFalse(args6 is Args10); - Expect.isFalse(args6 is Args11); - Expect.isFalse(args6 is Args12); - Expect.isFalse(args6 is Args13); - Expect.isFalse(args6 is Args14); - Expect.isFalse(args6 is Args15); - - Expect.isFalse(args7 is Args0); - Expect.isFalse(args7 is Args1); - Expect.isFalse(args7 is Args2); - Expect.isFalse(args7 is Args3); - Expect.isFalse(args7 is Args4); - Expect.isFalse(args7 is Args5); - Expect.isFalse(args7 is Args6); - Expect.isTrue(args7 is Args7); - Expect.isFalse(args7 is Args8); - Expect.isFalse(args7 is Args9); - Expect.isFalse(args7 is Args10); - Expect.isFalse(args7 is Args11); - Expect.isFalse(args7 is Args12); - Expect.isFalse(args7 is Args13); - Expect.isFalse(args7 is Args14); - Expect.isFalse(args7 is Args15); - - Expect.isFalse(args8 is Args0); - Expect.isFalse(args8 is Args1); - Expect.isFalse(args8 is Args2); - Expect.isFalse(args8 is Args3); - Expect.isFalse(args8 is Args4); - Expect.isFalse(args8 is Args5); - Expect.isFalse(args8 is Args6); - Expect.isFalse(args8 is Args7); - Expect.isTrue(args8 is Args8); - Expect.isFalse(args8 is Args9); - Expect.isFalse(args8 is Args10); - Expect.isFalse(args8 is Args11); - Expect.isFalse(args8 is Args12); - Expect.isFalse(args8 is Args13); - Expect.isFalse(args8 is Args14); - Expect.isFalse(args8 is Args15); - - Expect.isFalse(args9 is Args0); - Expect.isFalse(args9 is Args1); - Expect.isFalse(args9 is Args2); - Expect.isFalse(args9 is Args3); - Expect.isFalse(args9 is Args4); - Expect.isFalse(args9 is Args5); - Expect.isFalse(args9 is Args6); - Expect.isFalse(args9 is Args7); - Expect.isFalse(args9 is Args8); - Expect.isTrue(args9 is Args9); - Expect.isFalse(args9 is Args10); - Expect.isFalse(args9 is Args11); - Expect.isFalse(args9 is Args12); - Expect.isFalse(args9 is Args13); - Expect.isFalse(args9 is Args14); - Expect.isFalse(args9 is Args15); - - Expect.isFalse(args10 is Args0); - Expect.isFalse(args10 is Args1); - Expect.isFalse(args10 is Args2); - Expect.isFalse(args10 is Args3); - Expect.isFalse(args10 is Args4); - Expect.isFalse(args10 is Args5); - Expect.isFalse(args10 is Args6); - Expect.isFalse(args10 is Args7); - Expect.isFalse(args10 is Args8); - Expect.isFalse(args10 is Args9); - Expect.isTrue(args10 is Args10); - Expect.isFalse(args10 is Args11); - Expect.isFalse(args10 is Args12); - Expect.isFalse(args10 is Args13); - Expect.isFalse(args10 is Args14); - Expect.isFalse(args10 is Args15); - - Expect.isFalse(args11 is Args0); - Expect.isFalse(args11 is Args1); - Expect.isFalse(args11 is Args2); - Expect.isFalse(args11 is Args3); - Expect.isFalse(args11 is Args4); - Expect.isFalse(args11 is Args5); - Expect.isFalse(args11 is Args6); - Expect.isFalse(args11 is Args7); - Expect.isFalse(args11 is Args8); - Expect.isFalse(args11 is Args9); - Expect.isFalse(args11 is Args10); - Expect.isTrue(args11 is Args11); - Expect.isFalse(args11 is Args12); - Expect.isFalse(args11 is Args13); - Expect.isFalse(args11 is Args14); - Expect.isFalse(args11 is Args15); - - Expect.isFalse(args12 is Args0); - Expect.isFalse(args12 is Args1); - Expect.isFalse(args12 is Args2); - Expect.isFalse(args12 is Args3); - Expect.isFalse(args12 is Args4); - Expect.isFalse(args12 is Args5); - Expect.isFalse(args12 is Args6); - Expect.isFalse(args12 is Args7); - Expect.isFalse(args12 is Args8); - Expect.isFalse(args12 is Args9); - Expect.isFalse(args12 is Args10); - Expect.isFalse(args12 is Args11); - Expect.isTrue(args12 is Args12); - Expect.isFalse(args12 is Args13); - Expect.isFalse(args12 is Args14); - Expect.isFalse(args12 is Args15); - - Expect.isFalse(args13 is Args0); - Expect.isFalse(args13 is Args1); - Expect.isFalse(args13 is Args2); - Expect.isFalse(args13 is Args3); - Expect.isFalse(args13 is Args4); - Expect.isFalse(args13 is Args5); - Expect.isFalse(args13 is Args6); - Expect.isFalse(args13 is Args7); - Expect.isFalse(args13 is Args8); - Expect.isFalse(args13 is Args9); - Expect.isFalse(args13 is Args10); - Expect.isFalse(args13 is Args11); - Expect.isFalse(args13 is Args12); - Expect.isTrue(args13 is Args13); - Expect.isFalse(args13 is Args14); - Expect.isFalse(args13 is Args15); - - Expect.isFalse(args14 is Args0); - Expect.isFalse(args14 is Args1); - Expect.isFalse(args14 is Args2); - Expect.isFalse(args14 is Args3); - Expect.isFalse(args14 is Args4); - Expect.isFalse(args14 is Args5); - Expect.isFalse(args14 is Args6); - Expect.isFalse(args14 is Args7); - Expect.isFalse(args14 is Args8); - Expect.isFalse(args14 is Args9); - Expect.isFalse(args14 is Args10); - Expect.isFalse(args14 is Args11); - Expect.isFalse(args14 is Args12); - Expect.isFalse(args14 is Args13); - Expect.isTrue(args14 is Args14); - Expect.isFalse(args14 is Args15); - - Expect.isFalse(args15 is Args0); - Expect.isFalse(args15 is Args1); - Expect.isFalse(args15 is Args2); - Expect.isFalse(args15 is Args3); - Expect.isFalse(args15 is Args4); - Expect.isFalse(args15 is Args5); - Expect.isFalse(args15 is Args6); - Expect.isFalse(args15 is Args7); - Expect.isFalse(args15 is Args8); - Expect.isFalse(args15 is Args9); - Expect.isFalse(args15 is Args10); - Expect.isFalse(args15 is Args11); - Expect.isFalse(args15 is Args12); - Expect.isFalse(args15 is Args13); - Expect.isFalse(args15 is Args14); - Expect.isTrue(args15 is Args15); -} diff --git a/tests/language_2/function_subtype/simple1_test.dart b/tests/language_2/function_subtype/simple1_test.dart deleted file mode 100644 index a35751a5ebb..00000000000 --- a/tests/language_2/function_subtype/simple1_test.dart +++ /dev/null @@ -1,331 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping of simple function types. - -import 'package:expect/expect.dart'; - -typedef Args0(); -typedef Args1(Null a); -typedef Args2(Null a, Null b); -typedef Args3(Null a, Null b, Null c); -typedef Args4(Null a, Null b, Null c, Null d); -typedef Args5(Null a, Null b, Null c, Null d, Null e); -typedef Args6(Null a, Null b, Null c, Null d, Null e, Null f); -typedef Args7(Null a, Null b, Null c, Null d, Null e, Null f, Null g); -typedef Args8(Null a, Null b, Null c, Null d, Null e, Null f, Null g, Null h); -typedef Args9( - Null a, Null b, Null c, Null d, Null e, Null f, Null g, Null h, Null i); -typedef Args10(Null a, Null b, Null c, Null d, Null e, Null f, Null g, Null h, - Null i, Null j); -typedef Args11(Null a, Null b, Null c, Null d, Null e, Null f, Null g, Null h, - Null i, Null j, Null k); -typedef Args12(Null a, Null b, Null c, Null d, Null e, Null f, Null g, Null h, - Null i, Null j, Null k, Null l); -typedef Args13(Null a, Null b, Null c, Null d, Null e, Null f, Null g, Null h, - Null i, Null j, Null k, Null l, Null m); -typedef Args14(Null a, Null b, Null c, Null d, Null e, Null f, Null g, Null h, - Null i, Null j, Null k, Null l, Null m, Null n); -typedef Args15(Null a, Null b, Null c, Null d, Null e, Null f, Null g, Null h, - Null i, Null j, Null k, Null l, Null m, Null n, Null o); - -void args0() {} -void args1(int a) {} -void args2(int a, int b) {} -void args3(int a, int b, int c) {} -void args4(int a, int b, int c, int d) {} -void args5(int a, int b, int c, int d, int e) {} -void args6(int a, int b, int c, int d, int e, int f) {} -void args7(int a, int b, int c, int d, int e, int f, int g) {} -void args8(int a, int b, int c, int d, int e, int f, int g, int h) {} -void args9(int a, int b, int c, int d, int e, int f, int g, int h, int i) {} -void args10( - int a, int b, int c, int d, int e, int f, int g, int h, int i, int j) {} -void args11(int a, int b, int c, int d, int e, int f, int g, int h, int i, - int j, int k) {} -void args12(int a, int b, int c, int d, int e, int f, int g, int h, int i, - int j, int k, int l) {} -void args13(int a, int b, int c, int d, int e, int f, int g, int h, int i, - int j, int k, int l, int m) {} -void args14(int a, int b, int c, int d, int e, int f, int g, int h, int i, - int j, int k, int l, int m, int n) {} -void args15(int a, int b, int c, int d, int e, int f, int g, int h, int i, - int j, int k, int l, int m, int n, int o) {} - -main() { - Expect.isTrue(args0 is Args0); - Expect.isFalse(args0 is Args1); - Expect.isFalse(args0 is Args2); - Expect.isFalse(args0 is Args3); - Expect.isFalse(args0 is Args4); - Expect.isFalse(args0 is Args5); - Expect.isFalse(args0 is Args6); - Expect.isFalse(args0 is Args7); - Expect.isFalse(args0 is Args8); - Expect.isFalse(args0 is Args9); - Expect.isFalse(args0 is Args10); - Expect.isFalse(args0 is Args11); - Expect.isFalse(args0 is Args12); - Expect.isFalse(args0 is Args13); - Expect.isFalse(args0 is Args14); - Expect.isFalse(args0 is Args15); - - Expect.isFalse(args1 is Args0); - Expect.isTrue(args1 is Args1); - Expect.isFalse(args1 is Args2); - Expect.isFalse(args1 is Args3); - Expect.isFalse(args1 is Args4); - Expect.isFalse(args1 is Args5); - Expect.isFalse(args1 is Args6); - Expect.isFalse(args1 is Args7); - Expect.isFalse(args1 is Args8); - Expect.isFalse(args1 is Args9); - Expect.isFalse(args1 is Args10); - Expect.isFalse(args1 is Args11); - Expect.isFalse(args1 is Args12); - Expect.isFalse(args1 is Args13); - Expect.isFalse(args1 is Args14); - Expect.isFalse(args1 is Args15); - - Expect.isFalse(args2 is Args0); - Expect.isFalse(args2 is Args1); - Expect.isTrue(args2 is Args2); - Expect.isFalse(args2 is Args3); - Expect.isFalse(args2 is Args4); - Expect.isFalse(args2 is Args5); - Expect.isFalse(args2 is Args6); - Expect.isFalse(args2 is Args7); - Expect.isFalse(args2 is Args8); - Expect.isFalse(args2 is Args9); - Expect.isFalse(args2 is Args10); - Expect.isFalse(args2 is Args11); - Expect.isFalse(args2 is Args12); - Expect.isFalse(args2 is Args13); - Expect.isFalse(args2 is Args14); - Expect.isFalse(args2 is Args15); - - Expect.isFalse(args3 is Args0); - Expect.isFalse(args3 is Args1); - Expect.isFalse(args3 is Args2); - Expect.isTrue(args3 is Args3); - Expect.isFalse(args3 is Args4); - Expect.isFalse(args3 is Args5); - Expect.isFalse(args3 is Args6); - Expect.isFalse(args3 is Args7); - Expect.isFalse(args3 is Args8); - Expect.isFalse(args3 is Args9); - Expect.isFalse(args3 is Args10); - Expect.isFalse(args3 is Args11); - Expect.isFalse(args3 is Args12); - Expect.isFalse(args3 is Args13); - Expect.isFalse(args3 is Args14); - Expect.isFalse(args3 is Args15); - - Expect.isFalse(args4 is Args0); - Expect.isFalse(args4 is Args1); - Expect.isFalse(args4 is Args2); - Expect.isFalse(args4 is Args3); - Expect.isTrue(args4 is Args4); - Expect.isFalse(args4 is Args5); - Expect.isFalse(args4 is Args6); - Expect.isFalse(args4 is Args7); - Expect.isFalse(args4 is Args8); - Expect.isFalse(args4 is Args9); - Expect.isFalse(args4 is Args10); - Expect.isFalse(args4 is Args11); - Expect.isFalse(args4 is Args12); - Expect.isFalse(args4 is Args13); - Expect.isFalse(args4 is Args14); - Expect.isFalse(args4 is Args15); - - Expect.isFalse(args5 is Args0); - Expect.isFalse(args5 is Args1); - Expect.isFalse(args5 is Args2); - Expect.isFalse(args5 is Args3); - Expect.isFalse(args5 is Args4); - Expect.isTrue(args5 is Args5); - Expect.isFalse(args5 is Args6); - Expect.isFalse(args5 is Args7); - Expect.isFalse(args5 is Args8); - Expect.isFalse(args5 is Args9); - Expect.isFalse(args5 is Args10); - Expect.isFalse(args5 is Args11); - Expect.isFalse(args5 is Args12); - Expect.isFalse(args5 is Args13); - Expect.isFalse(args5 is Args14); - Expect.isFalse(args5 is Args15); - - Expect.isFalse(args6 is Args0); - Expect.isFalse(args6 is Args1); - Expect.isFalse(args6 is Args2); - Expect.isFalse(args6 is Args3); - Expect.isFalse(args6 is Args4); - Expect.isFalse(args6 is Args5); - Expect.isTrue(args6 is Args6); - Expect.isFalse(args6 is Args7); - Expect.isFalse(args6 is Args8); - Expect.isFalse(args6 is Args9); - Expect.isFalse(args6 is Args10); - Expect.isFalse(args6 is Args11); - Expect.isFalse(args6 is Args12); - Expect.isFalse(args6 is Args13); - Expect.isFalse(args6 is Args14); - Expect.isFalse(args6 is Args15); - - Expect.isFalse(args7 is Args0); - Expect.isFalse(args7 is Args1); - Expect.isFalse(args7 is Args2); - Expect.isFalse(args7 is Args3); - Expect.isFalse(args7 is Args4); - Expect.isFalse(args7 is Args5); - Expect.isFalse(args7 is Args6); - Expect.isTrue(args7 is Args7); - Expect.isFalse(args7 is Args8); - Expect.isFalse(args7 is Args9); - Expect.isFalse(args7 is Args10); - Expect.isFalse(args7 is Args11); - Expect.isFalse(args7 is Args12); - Expect.isFalse(args7 is Args13); - Expect.isFalse(args7 is Args14); - Expect.isFalse(args7 is Args15); - - Expect.isFalse(args8 is Args0); - Expect.isFalse(args8 is Args1); - Expect.isFalse(args8 is Args2); - Expect.isFalse(args8 is Args3); - Expect.isFalse(args8 is Args4); - Expect.isFalse(args8 is Args5); - Expect.isFalse(args8 is Args6); - Expect.isFalse(args8 is Args7); - Expect.isTrue(args8 is Args8); - Expect.isFalse(args8 is Args9); - Expect.isFalse(args8 is Args10); - Expect.isFalse(args8 is Args11); - Expect.isFalse(args8 is Args12); - Expect.isFalse(args8 is Args13); - Expect.isFalse(args8 is Args14); - Expect.isFalse(args8 is Args15); - - Expect.isFalse(args9 is Args0); - Expect.isFalse(args9 is Args1); - Expect.isFalse(args9 is Args2); - Expect.isFalse(args9 is Args3); - Expect.isFalse(args9 is Args4); - Expect.isFalse(args9 is Args5); - Expect.isFalse(args9 is Args6); - Expect.isFalse(args9 is Args7); - Expect.isFalse(args9 is Args8); - Expect.isTrue(args9 is Args9); - Expect.isFalse(args9 is Args10); - Expect.isFalse(args9 is Args11); - Expect.isFalse(args9 is Args12); - Expect.isFalse(args9 is Args13); - Expect.isFalse(args9 is Args14); - Expect.isFalse(args9 is Args15); - - Expect.isFalse(args10 is Args0); - Expect.isFalse(args10 is Args1); - Expect.isFalse(args10 is Args2); - Expect.isFalse(args10 is Args3); - Expect.isFalse(args10 is Args4); - Expect.isFalse(args10 is Args5); - Expect.isFalse(args10 is Args6); - Expect.isFalse(args10 is Args7); - Expect.isFalse(args10 is Args8); - Expect.isFalse(args10 is Args9); - Expect.isTrue(args10 is Args10); - Expect.isFalse(args10 is Args11); - Expect.isFalse(args10 is Args12); - Expect.isFalse(args10 is Args13); - Expect.isFalse(args10 is Args14); - Expect.isFalse(args10 is Args15); - - Expect.isFalse(args11 is Args0); - Expect.isFalse(args11 is Args1); - Expect.isFalse(args11 is Args2); - Expect.isFalse(args11 is Args3); - Expect.isFalse(args11 is Args4); - Expect.isFalse(args11 is Args5); - Expect.isFalse(args11 is Args6); - Expect.isFalse(args11 is Args7); - Expect.isFalse(args11 is Args8); - Expect.isFalse(args11 is Args9); - Expect.isFalse(args11 is Args10); - Expect.isTrue(args11 is Args11); - Expect.isFalse(args11 is Args12); - Expect.isFalse(args11 is Args13); - Expect.isFalse(args11 is Args14); - Expect.isFalse(args11 is Args15); - - Expect.isFalse(args12 is Args0); - Expect.isFalse(args12 is Args1); - Expect.isFalse(args12 is Args2); - Expect.isFalse(args12 is Args3); - Expect.isFalse(args12 is Args4); - Expect.isFalse(args12 is Args5); - Expect.isFalse(args12 is Args6); - Expect.isFalse(args12 is Args7); - Expect.isFalse(args12 is Args8); - Expect.isFalse(args12 is Args9); - Expect.isFalse(args12 is Args10); - Expect.isFalse(args12 is Args11); - Expect.isTrue(args12 is Args12); - Expect.isFalse(args12 is Args13); - Expect.isFalse(args12 is Args14); - Expect.isFalse(args12 is Args15); - - Expect.isFalse(args13 is Args0); - Expect.isFalse(args13 is Args1); - Expect.isFalse(args13 is Args2); - Expect.isFalse(args13 is Args3); - Expect.isFalse(args13 is Args4); - Expect.isFalse(args13 is Args5); - Expect.isFalse(args13 is Args6); - Expect.isFalse(args13 is Args7); - Expect.isFalse(args13 is Args8); - Expect.isFalse(args13 is Args9); - Expect.isFalse(args13 is Args10); - Expect.isFalse(args13 is Args11); - Expect.isFalse(args13 is Args12); - Expect.isTrue(args13 is Args13); - Expect.isFalse(args13 is Args14); - Expect.isFalse(args13 is Args15); - - Expect.isFalse(args14 is Args0); - Expect.isFalse(args14 is Args1); - Expect.isFalse(args14 is Args2); - Expect.isFalse(args14 is Args3); - Expect.isFalse(args14 is Args4); - Expect.isFalse(args14 is Args5); - Expect.isFalse(args14 is Args6); - Expect.isFalse(args14 is Args7); - Expect.isFalse(args14 is Args8); - Expect.isFalse(args14 is Args9); - Expect.isFalse(args14 is Args10); - Expect.isFalse(args14 is Args11); - Expect.isFalse(args14 is Args12); - Expect.isFalse(args14 is Args13); - Expect.isTrue(args14 is Args14); - Expect.isFalse(args14 is Args15); - - Expect.isFalse(args15 is Args0); - Expect.isFalse(args15 is Args1); - Expect.isFalse(args15 is Args2); - Expect.isFalse(args15 is Args3); - Expect.isFalse(args15 is Args4); - Expect.isFalse(args15 is Args5); - Expect.isFalse(args15 is Args6); - Expect.isFalse(args15 is Args7); - Expect.isFalse(args15 is Args8); - Expect.isFalse(args15 is Args9); - Expect.isFalse(args15 is Args10); - Expect.isFalse(args15 is Args11); - Expect.isFalse(args15 is Args12); - Expect.isFalse(args15 is Args13); - Expect.isFalse(args15 is Args14); - Expect.isTrue(args15 is Args15); -} diff --git a/tests/language_2/function_subtype/simple2_test.dart b/tests/language_2/function_subtype/simple2_test.dart deleted file mode 100644 index 9eb7549f1be..00000000000 --- a/tests/language_2/function_subtype/simple2_test.dart +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping of simple function types. - -import 'package:expect/expect.dart'; - -typedef Args0(); -typedef Args1(a); -typedef Args2(a, b); -typedef Args3(a, b, c); -typedef Args4(a, b, c, d); - -args0_1([a]) {} -args1_2(a, [b]) {} -args0_2([a, b]) {} -args1_3(a, [b, c]) {} - -args0_1_named({a}) {} -args1_2_named(a, {b}) {} -args0_2_named({a, b}) {} -args1_3_named(a, {b, c}) {} - -main() { - Expect.isTrue(args0_1 is Args0); - Expect.isTrue(args0_1 is Args1); - Expect.isFalse(args0_1 is Args2); - Expect.isFalse(args0_1 is Args3); - Expect.isFalse(args0_1 is Args4); - - Expect.isFalse(args1_2 is Args0); - Expect.isTrue(args1_2 is Args1); - Expect.isTrue(args1_2 is Args2); - Expect.isFalse(args1_2 is Args3); - Expect.isFalse(args1_2 is Args4); - - Expect.isTrue(args0_2 is Args0); - Expect.isTrue(args0_2 is Args1); - Expect.isTrue(args0_2 is Args2); - Expect.isFalse(args0_2 is Args3); - Expect.isFalse(args0_2 is Args4); - - Expect.isFalse(args1_3 is Args0); - Expect.isTrue(args1_3 is Args1); - Expect.isTrue(args1_3 is Args2); - Expect.isTrue(args1_3 is Args3); - Expect.isFalse(args1_3 is Args4); - - Expect.isTrue(args0_1_named is Args0); - Expect.isFalse(args0_1_named is Args1); - Expect.isFalse(args0_1_named is Args2); - Expect.isFalse(args0_1_named is Args3); - Expect.isFalse(args0_1_named is Args4); - - Expect.isFalse(args1_2_named is Args0); - Expect.isTrue(args1_2_named is Args1); - Expect.isFalse(args1_2_named is Args2); - Expect.isFalse(args1_2_named is Args3); - Expect.isFalse(args1_2_named is Args4); - - Expect.isTrue(args0_2_named is Args0); - Expect.isFalse(args0_2_named is Args1); - Expect.isFalse(args0_2_named is Args2); - Expect.isFalse(args0_2_named is Args3); - Expect.isFalse(args0_2_named is Args4); - - Expect.isFalse(args1_3_named is Args0); - Expect.isTrue(args1_3_named is Args1); - Expect.isFalse(args1_3_named is Args2); - Expect.isFalse(args1_3_named is Args3); - Expect.isFalse(args1_3_named is Args4); -} diff --git a/tests/language_2/function_subtype/top_level0_test.dart b/tests/language_2/function_subtype/top_level0_test.dart deleted file mode 100644 index 491dbfbe3df..00000000000 --- a/tests/language_2/function_subtype/top_level0_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for top level functions. - -import 'package:expect/expect.dart'; - -typedef int Foo(bool a, [String b]); -typedef int Bar(bool a, [String b]); -typedef int Baz(bool a, {String b}); -typedef int Boz(bool a); - -int foo(bool a, [String b]) => null; -int baz(bool a, {String b}) => null; -int boz(bool a, {int b}) => null; - -main() { - Expect.isTrue(foo is Foo, 'foo is Foo'); - Expect.isTrue(foo is Bar, 'foo is Bar'); - Expect.isFalse(foo is Baz, 'foo is Baz'); - Expect.isTrue(foo is Boz, 'foo is Boz'); - - Expect.isFalse(baz is Foo, 'foo is Foo'); - Expect.isFalse(baz is Bar, 'foo is Bar'); - Expect.isTrue(baz is Baz, 'foo is Baz'); - Expect.isTrue(baz is Boz, 'foo is Boz'); - - Expect.isFalse(boz is Foo, 'foo is Foo'); - Expect.isFalse(boz is Bar, 'foo is Bar'); - Expect.isFalse(boz is Baz, 'foo is Baz'); - Expect.isTrue(boz is Boz, 'foo is Boz'); -} diff --git a/tests/language_2/function_subtype/top_level1_test.dart b/tests/language_2/function_subtype/top_level1_test.dart deleted file mode 100644 index 0334e767ff9..00000000000 --- a/tests/language_2/function_subtype/top_level1_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping for top level functions. - -import 'package:expect/expect.dart'; - -typedef int Foo(T a, [String b]); -typedef int Bar(T a, [String b]); -typedef int Baz(T a, {String b}); -typedef int Boz(T a); - -int foo(bool a, [String b]) => null; -int baz(bool a, {String b}) => null; -int boz(bool a, {int b}) => null; - -class C { - void test(String nameOfT, bool expectedResult) { - Expect.equals(expectedResult, foo is Foo, 'foo is Foo<$nameOfT>'); - Expect.equals(expectedResult, foo is Bar, 'foo is Bar<$nameOfT>'); - Expect.isFalse(foo is Baz, 'foo is Baz<$nameOfT>'); - Expect.equals(expectedResult, foo is Boz, 'foo is Boz<$nameOfT>'); - - Expect.isFalse(baz is Foo, 'foo is Foo<$nameOfT>'); - Expect.isFalse(baz is Bar, 'foo is Bar<$nameOfT>'); - Expect.equals(expectedResult, baz is Baz, 'foo is Baz<$nameOfT>'); - Expect.equals(expectedResult, baz is Boz, 'foo is Boz<$nameOfT>'); - - Expect.isFalse(boz is Foo, 'foo is Foo<$nameOfT>'); - Expect.isFalse(boz is Bar, 'foo is Bar<$nameOfT>'); - Expect.isFalse(boz is Baz, 'foo is Baz<$nameOfT>'); - Expect.equals(expectedResult, boz is Boz, 'foo is Boz<$nameOfT>'); - } -} - -main() { - new C().test('bool', true); - new C().test('int', false); - new C().test('Object', false); - new C().test('dynamic', false); - new C().test('Null', true); -} diff --git a/tests/language_2/function_subtype/typearg0_test.dart b/tests/language_2/function_subtype/typearg0_test.dart deleted file mode 100644 index f1eb40d1fa9..00000000000 --- a/tests/language_2/function_subtype/typearg0_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping with type variables in factory constructors. - -import 'package:expect/expect.dart'; - -typedef void Foo(); - -class A { - bool foo(a) => a is T; -} - -void bar1() {} -void bar2(i) {} - -void main() { - void bar3() {} - void bar4(i) {} - - Expect.isTrue(new A().foo(bar1)); - Expect.isFalse(new A().foo(bar2)); - Expect.isTrue(new A().foo(bar3)); - Expect.isFalse(new A().foo(bar4)); - Expect.isTrue(new A().foo(() {})); - Expect.isFalse(new A().foo((i) {})); -} diff --git a/tests/language_2/function_subtype/typearg1_test.dart b/tests/language_2/function_subtype/typearg1_test.dart deleted file mode 100644 index 8e48557825b..00000000000 --- a/tests/language_2/function_subtype/typearg1_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping of type arguments. - -import 'package:expect/expect.dart'; - -class C {} - -class I {} - -class J extends I {} - -typedef void f1(C c); -typedef void f2(C c); - -main() { - Expect.isTrue(new C() is C); -} diff --git a/tests/language_2/function_subtype/typearg2_test.dart b/tests/language_2/function_subtype/typearg2_test.dart deleted file mode 100644 index 2a608111185..00000000000 --- a/tests/language_2/function_subtype/typearg2_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping of type arguments. - -import 'package:expect/expect.dart'; - -class C {} - -class I {} - -class J extends I {} - -typedef void f1(C c); -typedef void f2(C c); - -main() { - Expect.isFalse(new C() is C); - Expect.isTrue(new C() is C); -} diff --git a/tests/language_2/function_subtype/typearg3_test.dart b/tests/language_2/function_subtype/typearg3_test.dart deleted file mode 100644 index 8af7af933d5..00000000000 --- a/tests/language_2/function_subtype/typearg3_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2013, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check function subtyping of type arguments. - -import 'package:expect/expect.dart'; - -class C {} - -class I {} - -class J extends I {} - -typedef J f1(); -typedef I f2(); - -main() { - Expect.isTrue(new C() is C); - Expect.isFalse(new C() is C); -} diff --git a/tests/language_2/function_subtype/typearg5_test.dart b/tests/language_2/function_subtype/typearg5_test.dart deleted file mode 100644 index bcada2097ac..00000000000 --- a/tests/language_2/function_subtype/typearg5_test.dart +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2016, 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 - -// Check function subtyping of type arguments. These cases use typedefs as type -// arguments, and the typedefs have type parameters that are used more than -// once. - -import 'package:expect/expect.dart'; - -typedef A F(A arg1, A arg2); -typedef B G(B arg1, B arg2); - -typedef Set FS(Set arg1, Set arg2); - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -dyn(x) => x; - -class CheckEnv { - test(bool intX) { - Expect.isTrue(>[] is! List); - Expect.isTrue(>[] is List>); - Expect.isTrue(>[] is List>); - - Expect.isTrue(dyn(>[]) is! List); - Expect.isTrue(dyn(>[]) is List>); - Expect.isTrue(dyn(>[]) is List>); - - Expect.isFalse(>[] is List>); - Expect.isFalse(>[] is List>); - - Expect.isFalse(dyn(>[]) is List>); - Expect.isFalse(dyn(>[]) is List>); - - Expect.isFalse(dyn(>[]) is List); - Expect.isFalse(dyn(>[]) is List>); - Expect.isTrue(dyn(>[]) is List>); - if (intX) { - Expect.isTrue(dyn(>[]) is List>); - Expect.isTrue(dyn(>[]) is List>); - Expect.isFalse(dyn(>[]) is List>); - Expect.isFalse(dyn(>[]) is List>); - } - } -} - -main() { - Expect.isTrue(>[] is List>); - Expect.isTrue(dyn(>[]) is List>); - Expect.isTrue(>[] is List>); - Expect.isTrue(dyn(>[]) is List>); - - new CheckEnv().test(true); - new CheckEnv().test(false); -} diff --git a/tests/language_2/function_type/function_type0_test.dart b/tests/language_2/function_type/function_type0_test.dart deleted file mode 100644 index 3678a19bdcb..00000000000 --- a/tests/language_2/function_type/function_type0_test.dart +++ /dev/null @@ -1,922 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int x); -typedef F1 = Function Function(List x); -typedef F2 = core.List Function(int y, {List x}); -typedef F3 = Function(int x0, {Function x}); -typedef F4 = Function Function(int x); -typedef F5 = int Function(int x0, {int x}) Function(); -typedef F6 = int Function([core.List x]) Function(); -typedef F7 = Function Function(int y, [int x]) Function(); -typedef F8 = Function Function(int x1, [List x2]) Function(); -typedef F9 = Function Function(int x0, {List x}) Function(); -typedef F10 = List Function(List x) Function(); -typedef F11 = List Function(int y, [List x]) Function(); -typedef F12 = core.List Function([Function x1]) Function(); -typedef F13 = core.List Function({core.List x}) - Function(); -typedef F14 = List Function(int y, {int x}) Function(); -typedef F15 = List Function(int x0, [core.List x]) Function(); -typedef F16 = Function(int x0) Function(); -typedef F17 = Function(int x, [List x2]) Function(); -typedef F18 = Function(int y, {List x}) Function(); -typedef F19 = void Function([List x]) Function(); -typedef F20 = void Function(List x0) Function(); -typedef F21 = List Function(Function x) Function(); -typedef F22 = Function(List x) Function(); -typedef F23 = void Function(core.List x) Function(); - -int f0(int x) => null; -Function f1(List x) => null; -core.List f2(int y, {List x}) => null; -f3(int x0, {Function x}) => null; -Function f4(int x) => null; -int Function(int x0, {int x}) f5() => null; -int Function([core.List x]) f6() => null; -Function Function(int y, [int x]) f7() => null; -Function Function(int x0, [List x1]) f8() => null; -Function Function(int x0, {List x}) f9() => null; -List Function(List x) f10() => null; -List Function(int y, [List x]) f11() => null; -core.List Function([Function x0]) f12() => null; -core.List Function({core.List x}) f13() => null; -List Function(int y, {int x}) f14() => null; -List Function(int x0, [core.List x]) f15() => null; -Function(int x0) f16() => null; -Function(int x, [List x0]) f17() => null; -Function(int y, {List x}) f18() => null; -void Function([List x]) f19() => null; -void Function(List x0) f20() => null; -List Function(Function x) f21() => null; -Function(List x) f22() => null; -void Function(core.List x) f23() => null; - -class U0 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int x) x0; - Function Function(List x) x1; - core.List Function(int y, {List x}) x2; - Function(int x0, {Function x}) x3; - Function Function(int x) x4; - int Function(int x0, {int x}) Function() x5; - int Function([core.List x]) Function() x6; - Function Function(int y, [int x]) Function() x7; - Function Function(int x1, [List x2]) Function() x8; - Function Function(int x0, {List x}) Function() x9; - List Function(List x) Function() x10; - List Function(int y, [List x]) Function() x11; - core.List Function([Function x1]) Function() x12; - core.List Function({core.List x}) Function() x13; - List Function(int y, {int x}) Function() x14; - List Function(int x0, [core.List x]) Function() x15; - Function(int x0) Function() x16; - Function(int x, [List x2]) Function() x17; - Function(int y, {List x}) Function() x18; - void Function([List x]) Function() x19; - void Function(List x0) Function() x20; - List Function(Function x) Function() x21; - Function(List x) Function() x22; - void Function(core.List x) Function() x23; - - U0({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int x) => null; - Function m1(List x) => null; - core.List m2(int y, {List x}) => null; - m3(int x0, {Function x}) => null; - Function m4(int x) => null; - int Function(int x0, {int x}) m5() => null; - int Function([core.List x]) m6() => null; - Function Function(int y, [int x]) m7() => null; - Function Function(int x0, [List x1]) m8() => null; - Function Function(int x0, {List x}) m9() => null; - List Function(List x) m10() => null; - List Function(int y, [List x]) m11() => null; - core.List Function([Function x0]) m12() => null; - core.List Function({core.List x}) m13() => null; - List Function(int y, {int x}) m14() => null; - List Function(int x0, [core.List x]) m15() => null; - Function(int x0) m16() => null; - Function(int x, [List x0]) m17() => null; - Function(int y, {List x}) m18() => null; - void Function([List x]) m19() => null; - void Function(List x0) m20() => null; - List Function(Function x) m21() => null; - Function(List x) m22() => null; - void Function(core.List x) m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int x) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int x) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int x)); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// Function Function(List x) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - Function Function(List x) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is Function Function(List x)); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - // The static function has its T always set to int. - Expect.isTrue(f1 is F1); - Expect.isFalse(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - Expect.isFalse(confuse(f1) is F1); - if (tIsBool) { - Expect.throws(() { - x1 = (f1 as dynamic); - }); - Expect.throws(() { - x1 = confuse(f1); - }); - Expect.throws(() { - l1 = (f1 as dynamic); - }); - Expect.throws(() { - l1 = confuse(f1); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m1 is F1); - Expect.equals(true, m1 is F1); - Expect.equals(true, confuse(m1) is F1); - Expect.equals(true, confuse(m1) is F1); - } - } - - /// core.List Function(int y, {List x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function(int y, {List x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue( - m2 is core.List Function(int y, {List x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// Function(int x0, {Function x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(int x0, {Function x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(int x0, {Function x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// Function Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - Function Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is Function Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x0, {int x}) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x0, {int x}) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x0, {int x}) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function([core.List x]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function([core.List x]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function([core.List x]) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int y, [int x]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int y, [int x]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int y, [int x]) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x1, [List x2]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x1, [List x2]) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function(int x1, [List x2]) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// Function Function(int x0, {List x}) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - Function Function(int x0, {List x}) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is Function Function(int x0, {List x}) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - // The static function has its T always set to int. - Expect.isTrue(f9 is F9); - Expect.isFalse(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - Expect.isFalse(confuse(f9) is F9); - if (tIsBool) { - Expect.throws(() { - x9 = (f9 as dynamic); - }); - Expect.throws(() { - x9 = confuse(f9); - }); - Expect.throws(() { - l9 = (f9 as dynamic); - }); - Expect.throws(() { - l9 = confuse(f9); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m9 is F9); - Expect.equals(tIsBool, m9 is F9); - Expect.equals(tIsInt, confuse(m9) is F9); - Expect.equals(tIsBool, confuse(m9) is F9); - } - } - - /// List Function(List x) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(List x) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(List x) Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(int y, [List x]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(int y, [List x]) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is List Function(int y, [List x]) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function([Function x1]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function([Function x1]) Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue( - m12 is core.List Function([Function x1]) Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function({core.List x}) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function({core.List x}) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function({core.List x}) - Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - } - - /// List Function(int y, {int x}) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int y, {int x}) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int y, {int x}) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x0, [core.List x]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x0, [core.List x]) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue( - m15 is List Function(int x0, [core.List x]) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x0) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x0) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x0) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x, [List x2]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x, [List x2]) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x, [List x2]) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// Function(int y, {List x}) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - Function(int y, {List x}) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is Function(int y, {List x}) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - // The static function has its T always set to int. - Expect.isTrue(f18 is F18); - Expect.isFalse(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - Expect.isFalse(confuse(f18) is F18); - if (tIsBool) { - Expect.throws(() { - x18 = (f18 as dynamic); - }); - Expect.throws(() { - x18 = confuse(f18); - }); - Expect.throws(() { - l18 = (f18 as dynamic); - }); - Expect.throws(() { - l18 = confuse(f18); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m18 is F18); - Expect.equals(tIsBool, m18 is F18); - Expect.equals(tIsInt, confuse(m18) is F18); - Expect.equals(tIsBool, confuse(m18) is F18); - } - } - - /// void Function([List x]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function([List x]) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function([List x]) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function(List x0) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function(List x0) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function(List x0) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(Function x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(Function x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(Function x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// Function(List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function(List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is Function(List x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// void Function(core.List x) Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - void Function(core.List x) Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is void Function(core.List x) Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U0().runTests(); - new U0(tIsInt: true).runTests(); - new U0(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type10_test.dart b/tests/language_2/function_type/function_type10_test.dart deleted file mode 100644 index d54897aa397..00000000000 --- a/tests/language_2/function_type/function_type10_test.dart +++ /dev/null @@ -1,936 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int y, {int x}); -typedef F1 = Function Function(int y, {List x}); -typedef F2 = core.List Function(int x0, {core.List x}); -typedef F3 = Function({List x}); -typedef F4 = List Function(List x); -typedef F5 = int Function(Function x) Function(); -typedef F6 = int Function(int y, [core.List x]) - Function(); -typedef F7 = Function Function([int x1]) Function(); -typedef F8 = Function Function({List x}) - Function(); -typedef F9 = Function Function() Function(); -typedef F10 = List Function(int x1, [List x]) - Function(); -typedef F11 = List Function([List x1]) - Function(); -typedef F12 = core.List Function(int x, [Function x1]) - Function(); -typedef F13 = core.List Function(int y, {core.List x}) - Function(); -typedef F14 = List Function([Function x]) Function(); -typedef F15 = List Function(core.List x1) - Function(); -typedef F16 = Function(int x2, [int x3]) Function(); -typedef F17 = Function(int x1, {List x}) - Function(); -typedef F18 = void Function(int x) Function(); -typedef F19 = void Function(int y, [List x]) - Function(); -typedef F20 = void Function(int x2, [List x3]) - Function(); -typedef F21 = List Function(core.List x) - Function(); -typedef F22 = Function(List x) Function(); -typedef F23 = void Function() Function(); - -int f0(int y, {int x}) => null; -Function f1(int y, {List x}) => null; -core.List f2(int x0, {core.List x}) => null; -f3({List x}) => null; -List f4(List x) => null; -int Function(Function x) f5() => null; -int Function(int y, [core.List x]) f6() => null; -Function Function([int x0]) f7() => null; -Function Function({List x}) f8() => null; -Function Function() f9() => null; -List Function(int x0, [List x]) f10() => - null; -List Function([List x0]) f11() => null; -core.List Function(int x, [Function x0]) f12() => - null; -core.List Function(int y, {core.List x}) - f13() => null; -List Function([Function x]) f14() => null; -List Function(core.List x0) f15() => null; -Function(int x0, [int x1]) f16() => null; -Function(int x0, {List x}) f17() => null; -void Function(int x) f18() => null; -void Function(int y, [List x]) f19() => null; -void Function(int x0, [List x1]) f20() => null; -List Function(core.List x) f21() => - null; -Function(List x) f22() => null; -void Function() f23() => null; - -class U10 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int y, {int x}) x0; - Function Function(int y, {List x}) x1; - core.List Function(int x0, {core.List x}) x2; - Function({List x}) x3; - List Function(List x) x4; - int Function(Function x) Function() x5; - int Function(int y, [core.List x]) Function() - x6; - Function Function([int x1]) Function() x7; - Function Function({List x}) Function() x8; - Function Function() Function() x9; - List Function(int x1, [List x]) - Function() x10; - List Function([List x1]) Function() x11; - core.List Function(int x, [Function x1]) - Function() x12; - core.List Function(int y, {core.List x}) - Function() x13; - List Function([Function x]) Function() x14; - List Function(core.List x1) Function() x15; - Function(int x2, [int x3]) Function() x16; - Function(int x1, {List x}) Function() x17; - void Function(int x) Function() x18; - void Function(int y, [List x]) Function() x19; - void Function(int x2, [List x3]) Function() x20; - List Function(core.List x) - Function() x21; - Function(List x) Function() x22; - void Function() Function() x23; - - U10({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int y, {int x}) => null; - Function m1(int y, {List x}) => null; - core.List m2(int x0, {core.List x}) => null; - m3({List x}) => null; - List m4(List x) => null; - int Function(Function x) m5() => null; - int Function(int y, [core.List x]) m6() => null; - Function Function([int x0]) m7() => null; - Function Function({List x}) m8() => null; - Function Function() m9() => null; - List Function(int x0, [List x]) - m10() => null; - List Function([List x0]) m11() => null; - core.List Function(int x, [Function x0]) - m12() => null; - core.List Function(int y, {core.List x}) - m13() => null; - List Function([Function x]) m14() => null; - List Function(core.List x0) m15() => null; - Function(int x0, [int x1]) m16() => null; - Function(int x0, {List x}) m17() => null; - void Function(int x) m18() => null; - void Function(int y, [List x]) m19() => null; - void Function(int x0, [List x1]) m20() => null; - List Function(core.List x) m21() => - null; - Function(List x) m22() => null; - void Function() m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int y, {int x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int y, {int x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int y, {int x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// Function Function(int y, {List x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - Function Function(int y, {List x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is Function Function(int y, {List x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - // The static function has its T always set to int. - Expect.isTrue(f1 is F1); - Expect.isFalse(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - Expect.isFalse(confuse(f1) is F1); - if (tIsBool) { - Expect.throws(() { - x1 = (f1 as dynamic); - }); - Expect.throws(() { - x1 = confuse(f1); - }); - Expect.throws(() { - l1 = (f1 as dynamic); - }); - Expect.throws(() { - l1 = confuse(f1); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m1 is F1); - Expect.equals(true, m1 is F1); - Expect.equals(true, confuse(m1) is F1); - Expect.equals(true, confuse(m1) is F1); - } - } - - /// core.List Function(int x0, {core.List x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function(int x0, {core.List x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue( - m2 is core.List Function(int x0, {core.List x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// Function({List x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function({List x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function({List x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// List Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(Function x) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(Function x) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function(Function x) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int y, [core.List x]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int y, [core.List x]) Function() - l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int y, [core.List x]) - Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function([int x1]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function([int x1]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue( - m7 is Function Function([int x1]) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function({List x}) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function({List x}) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function({List x}) - Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// Function Function() Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - Function Function() Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is Function Function() Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x1, [List x]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x1, [List x]) - Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x1, [List x]) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function([List x1]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function([List x1]) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function([List x1]) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function(int x, [Function x1]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x, [Function x1]) - Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x, [Function x1]) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int y, {core.List x}) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int y, {core.List x}) - Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int y, - {core.List x}) - Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - } - - /// List Function([Function x]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function([Function x]) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function([Function x]) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(core.List x1) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(core.List x1) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(core.List x1) - Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x2, [int x3]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x2, [int x3]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function(int x2, [int x3]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x1, {List x}) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x1, {List x}) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x1, {List x}) - Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int y, [List x]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int y, [List x]) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int y, [List x]) - Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function(int x2, [List x3]) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function(int x2, [List x3]) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function(int x2, [List x3]) - Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(core.List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(core.List x) - Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(core.List x) - Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// Function(List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function(List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is Function(List x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - // The static function has its T always set to int. - Expect.isTrue(f22 is F22); - Expect.isFalse(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - Expect.isFalse(confuse(f22) is F22); - if (tIsBool) { - Expect.throws(() { - x22 = (f22 as dynamic); - }); - Expect.throws(() { - x22 = confuse(f22); - }); - Expect.throws(() { - l22 = (f22 as dynamic); - }); - Expect.throws(() { - l22 = confuse(f22); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m22 is F22); - Expect.equals(tIsBool, m22 is F22); - Expect.equals(tIsInt, confuse(m22) is F22); - Expect.equals(tIsBool, confuse(m22) is F22); - } - } - - /// void Function() Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - void Function() Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is void Function() Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U10().runTests(); - new U10(tIsInt: true).runTests(); - new U10(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type11_test.dart b/tests/language_2/function_type/function_type11_test.dart deleted file mode 100644 index 8f3439c4ae8..00000000000 --- a/tests/language_2/function_type/function_type11_test.dart +++ /dev/null @@ -1,934 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(Function x); -typedef F1 = Function Function(); -typedef F2 = core.List Function(int y, {core.List x}); -typedef F3 = Function(int x0, {List x}); -typedef F4 = List Function(core.List x); -typedef F5 = int Function(Function x) Function(int x); -typedef F6 = int Function(int y, [core.List x]) - Function(int x); -typedef F7 = Function Function([int x1]) Function(int x); -typedef F8 = Function Function({List x}) - Function(int x); -typedef F9 = Function Function() Function(int x); -typedef F10 = List Function(int x1, [List x]) - Function(int x); -typedef F11 = List Function([List x1]) - Function(int x); -typedef F12 = core.List Function(int x, [Function x1]) - Function(int x); -typedef F13 = core.List Function(int y, {core.List x}) - Function(int x); -typedef F14 = List Function([Function x]) Function( - int x); -typedef F15 = List Function(core.List x1) - Function(int x); -typedef F16 = Function(int x2, [int x3]) Function(int x); -typedef F17 = Function(int x1, {List x}) - Function(int x); -typedef F18 = void Function(int x) Function(int x); -typedef F19 = void Function(int y, [List x]) - Function(int x); -typedef F20 = void Function(int x2, [List x3]) - Function(int x); -typedef F21 = List Function(core.List x) - Function(int x); -typedef F22 = Function(List x) Function(int x); -typedef F23 = void Function() Function(int x); - -int f0(Function x) => null; -Function f1() => null; -core.List f2(int y, {core.List x}) => null; -f3(int x0, {List x}) => null; -List f4(core.List x) => null; -int Function(Function x) f5(int x) => null; -int Function(int y, [core.List x]) f6(int x) => - null; -Function Function([int x0]) f7(int x) => null; -Function Function({List x}) f8(int x) => null; -Function Function() f9(int x) => null; -List Function(int x0, [List x]) f10( - int x) => - null; -List Function([List x0]) f11(int x) => null; -core.List Function(int x, [Function x0]) f12( - int x) => - null; -core.List Function(int y, {core.List x}) - f13(int x) => null; -List Function([Function x]) f14(int x) => null; -List Function(core.List x0) f15(int x) => - null; -Function(int x0, [int x1]) f16(int x) => null; -Function(int x0, {List x}) f17(int x) => null; -void Function(int x) f18(int x) => null; -void Function(int y, [List x]) f19(int x) => null; -void Function(int x0, [List x1]) f20(int x) => null; -List Function(core.List x) f21( - int x) => - null; -Function(List x) f22(int x) => null; -void Function() f23(int x) => null; - -class U11 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(Function x) x0; - Function Function() x1; - core.List Function(int y, {core.List x}) x2; - Function(int x0, {List x}) x3; - List Function(core.List x) x4; - int Function(Function x) Function(int x) x5; - int Function(int y, [core.List x]) Function( - int x) x6; - Function Function([int x1]) Function(int x) x7; - Function Function({List x}) Function(int x) x8; - Function Function() Function(int x) x9; - List Function(int x1, [List x]) - Function(int x) x10; - List Function([List x1]) Function(int x) x11; - core.List Function(int x, [Function x1]) - Function(int x) x12; - core.List Function(int y, {core.List x}) - Function(int x) x13; - List Function([Function x]) Function(int x) x14; - List Function(core.List x1) Function(int x) - x15; - Function(int x2, [int x3]) Function(int x) x16; - Function(int x1, {List x}) Function(int x) x17; - void Function(int x) Function(int x) x18; - void Function(int y, [List x]) Function(int x) - x19; - void Function(int x2, [List x3]) Function(int x) x20; - List Function(core.List x) - Function(int x) x21; - Function(List x) Function(int x) x22; - void Function() Function(int x) x23; - - U11({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(Function x) => null; - Function m1() => null; - core.List m2(int y, {core.List x}) => null; - m3(int x0, {List x}) => null; - List m4(core.List x) => null; - int Function(Function x) m5(int x) => null; - int Function(int y, [core.List x]) m6(int x) => - null; - Function Function([int x0]) m7(int x) => null; - Function Function({List x}) m8(int x) => null; - Function Function() m9(int x) => null; - List Function(int x0, [List x]) m10( - int x) => - null; - List Function([List x0]) m11(int x) => null; - core.List Function(int x, [Function x0]) m12( - int x) => - null; - core.List Function(int y, {core.List x}) - m13(int x) => null; - List Function([Function x]) m14(int x) => null; - List Function(core.List x0) m15(int x) => - null; - Function(int x0, [int x1]) m16(int x) => null; - Function(int x0, {List x}) m17(int x) => null; - void Function(int x) m18(int x) => null; - void Function(int y, [List x]) m19(int x) => - null; - void Function(int x0, [List x1]) m20(int x) => null; - List Function(core.List x) m21( - int x) => - null; - Function(List x) m22(int x) => null; - void Function() m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(Function x) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(Function x) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(Function x)); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// Function Function() - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - Function Function() l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is Function Function()); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// core.List Function(int y, {core.List x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function(int y, {core.List x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue( - m2 is core.List Function(int y, {core.List x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// Function(int x0, {List x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(int x0, {List x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(int x0, {List x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// List Function(core.List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function(core.List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function(core.List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(Function x) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(Function x) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function(Function x) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int y, [core.List x]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int y, [core.List x]) Function( - int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int y, [core.List x]) - Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function([int x1]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function([int x1]) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue( - m7 is Function Function([int x1]) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function({List x}) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function({List x}) Function(int x) - l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function({List x}) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// Function Function() Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - Function Function() Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is Function Function() Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x1, [List x]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x1, [List x]) - Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x1, [List x]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function([List x1]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function([List x1]) Function(int x) - l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function([List x1]) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function(int x, [Function x1]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x, [Function x1]) - Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x, [Function x1]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int y, {core.List x}) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int y, {core.List x}) - Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int y, - {core.List x}) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - } - - /// List Function([Function x]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function([Function x]) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function([Function x]) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(core.List x1) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(core.List x1) Function(int x) - l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(core.List x1) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x2, [int x3]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x2, [int x3]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function(int x2, [int x3]) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x1, {List x}) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x1, {List x}) Function(int x) - l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x1, {List x}) - Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue( - m18 is void Function(int x) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int y, [List x]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int y, [List x]) Function(int x) - l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int y, [List x]) - Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function(int x2, [List x3]) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function(int x2, [List x3]) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function(int x2, [List x3]) - Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(core.List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(core.List x) - Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(core.List x) - Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// Function(List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function(List x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is Function(List x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - // The static function has its T always set to int. - Expect.isTrue(f22 is F22); - Expect.isFalse(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - Expect.isFalse(confuse(f22) is F22); - if (tIsBool) { - Expect.throws(() { - x22 = (f22 as dynamic); - }); - Expect.throws(() { - x22 = confuse(f22); - }); - Expect.throws(() { - l22 = (f22 as dynamic); - }); - Expect.throws(() { - l22 = confuse(f22); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m22 is F22); - Expect.equals(tIsBool, m22 is F22); - Expect.equals(tIsInt, confuse(m22) is F22); - Expect.equals(tIsBool, confuse(m22) is F22); - } - } - - /// void Function() Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - void Function() Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue( - m23 is void Function() Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U11().runTests(); - new U11(tIsInt: true).runTests(); - new U11(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type12_test.dart b/tests/language_2/function_type/function_type12_test.dart deleted file mode 100644 index 24eefa31e47..00000000000 --- a/tests/language_2/function_type/function_type12_test.dart +++ /dev/null @@ -1,943 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function([Function x]); -typedef F1 = List Function(int x); -typedef F2 = core.List Function(List x); -typedef F3 = Function(int y, {List x}); -typedef F4 = List Function(List x); -typedef F5 = int Function([Function x]) Function(); -typedef F6 = int Function(core.List x0) Function(); -typedef F7 = Function Function(int x1, [int x2]) Function(); -typedef F8 = Function Function(int x0, {List x}) Function(); -typedef F9 = List Function(int x) Function(); -typedef F10 = List Function(int y, [List x]) Function(); -typedef F11 = List Function(int x1, [List x2]) Function(); -typedef F12 = core.List Function({Function x}) Function(); -typedef F13 = core.List Function(List x) Function(); -typedef F14 = List Function(int x0, [Function x]) Function(); -typedef F15 = List Function([core.List x1]) Function(); -typedef F16 = Function(int x, [int x2]) Function(); -typedef F17 = Function(int y, {List x}) Function(); -typedef F18 = void Function([int x]) Function(); -typedef F19 = void Function(List x0) Function(); -typedef F20 = void Function(int x, [List x2]) Function(); -typedef F21 = List Function(List x) Function(); -typedef F22 = Function() Function(); -typedef F23 = void Function(A x) Function(); - -int f0([Function x]) => null; -List f1(int x) => null; -core.List f2(List x) => null; -f3(int y, {List x}) => null; -List f4(List x) => null; -int Function([Function x]) f5() => null; -int Function(core.List x0) f6() => null; -Function Function(int x0, [int x1]) f7() => null; -Function Function(int x0, {List x}) f8() => null; -List Function(int x) f9() => null; -List Function(int y, [List x]) f10() => null; -List Function(int x0, [List x1]) f11() => null; -core.List Function({Function x}) f12() => null; -core.List Function(List x) f13() => null; -List Function(int x0, [Function x]) f14() => null; -List Function([core.List x0]) f15() => null; -Function(int x, [int x0]) f16() => null; -Function(int y, {List x}) f17() => null; -void Function([int x]) f18() => null; -void Function(List x0) f19() => null; -void Function(int x, [List x0]) f20() => null; -List Function(List x) f21() => null; -Function() f22() => null; -void Function(A x) f23() => null; - -class U12 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function([Function x]) x0; - List Function(int x) x1; - core.List Function(List x) x2; - Function(int y, {List x}) x3; - List Function(List x) x4; - int Function([Function x]) Function() x5; - int Function(core.List x0) Function() x6; - Function Function(int x1, [int x2]) Function() x7; - Function Function(int x0, {List x}) Function() x8; - List Function(int x) Function() x9; - List Function(int y, [List x]) Function() x10; - List Function(int x1, [List x2]) Function() x11; - core.List Function({Function x}) Function() x12; - core.List Function(List x) Function() x13; - List Function(int x0, [Function x]) Function() x14; - List Function([core.List x1]) Function() x15; - Function(int x, [int x2]) Function() x16; - Function(int y, {List x}) Function() x17; - void Function([int x]) Function() x18; - void Function(List x0) Function() x19; - void Function(int x, [List x2]) Function() x20; - List Function(List x) Function() x21; - Function() Function() x22; - void Function(A x) Function() x23; - - U12({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0([Function x]) => null; - List m1(int x) => null; - core.List m2(List x) => null; - m3(int y, {List x}) => null; - List m4(List x) => null; - int Function([Function x]) m5() => null; - int Function(core.List x0) m6() => null; - Function Function(int x0, [int x1]) m7() => null; - Function Function(int x0, {List x}) m8() => null; - List Function(int x) m9() => null; - List Function(int y, [List x]) m10() => null; - List Function(int x0, [List x1]) m11() => null; - core.List Function({Function x}) m12() => null; - core.List Function(List x) m13() => null; - List Function(int x0, [Function x]) m14() => null; - List Function([core.List x0]) m15() => null; - Function(int x, [int x0]) m16() => null; - Function(int y, {List x}) m17() => null; - void Function([int x]) m18() => null; - void Function(List x0) m19() => null; - void Function(int x, [List x0]) m20() => null; - List Function(List x) m21() => null; - Function() m22() => null; - void Function(A x) m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function([Function x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function([Function x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function([Function x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int x) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int x) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int x)); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// core.List Function(List x) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function(List x) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is core.List Function(List x)); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m2 is F2); - Expect.equals(true, m2 is F2); - Expect.equals(true, confuse(m2) is F2); - Expect.equals(true, confuse(m2) is F2); - } - } - - /// Function(int y, {List x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(int y, {List x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(int y, {List x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// List Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - // The static function has its T always set to int. - Expect.isTrue(f4 is F4); - Expect.isFalse(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - Expect.isFalse(confuse(f4) is F4); - if (tIsBool) { - Expect.throws(() { - x4 = (f4 as dynamic); - }); - Expect.throws(() { - x4 = confuse(f4); - }); - Expect.throws(() { - l4 = (f4 as dynamic); - }); - Expect.throws(() { - l4 = confuse(f4); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m4 is F4); - Expect.equals(true, m4 is F4); - Expect.equals(true, confuse(m4) is F4); - Expect.equals(true, confuse(m4) is F4); - } - } - - /// int Function([Function x]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function([Function x]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function([Function x]) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(core.List x0) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(core.List x0) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(core.List x0) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int x1, [int x2]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x1, [int x2]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x1, [int x2]) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x0, {List x}) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x0, {List x}) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function(int x0, {List x}) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int y, [List x]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int y, [List x]) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue( - m10 is List Function(int y, [List x]) Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(int x1, [List x2]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(int x1, [List x2]) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is List Function(int x1, [List x2]) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function({Function x}) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function({Function x}) Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function({Function x}) Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(List x) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(List x) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(List x) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x0, [Function x]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x0, [Function x]) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int x0, [Function x]) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function([core.List x1]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function([core.List x1]) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function([core.List x1]) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x, [int x2]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x, [int x2]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x, [int x2]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int y, {List x}) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int y, {List x}) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int y, {List x}) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function([int x]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function([int x]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function([int x]) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(List x0) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(List x0) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(List x0) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function(int x, [List x2]) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function(int x, [List x2]) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function(int x, [List x2]) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(List x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// Function() Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function() Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is Function() Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// void Function(A x) Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - void Function(A x) Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is void Function(A x) Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U12().runTests(); - new U12(tIsInt: true).runTests(); - new U12(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type13_test.dart b/tests/language_2/function_type/function_type13_test.dart deleted file mode 100644 index 4c47ae72dc3..00000000000 --- a/tests/language_2/function_type/function_type13_test.dart +++ /dev/null @@ -1,923 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int x0, [Function x]); -typedef F1 = List Function([int x]); -typedef F2 = core.List Function([List x]); -typedef F3 = Function(core.List x); -typedef F4 = List Function(); -typedef F5 = int Function([Function x]) Function(int x); -typedef F6 = int Function(core.List x1) Function(int x); -typedef F7 = Function Function(int x2, [int x3]) Function(int x); -typedef F8 = Function Function(int x1, {List x}) Function(int x); -typedef F9 = List Function(int x) Function(int x); -typedef F10 = List Function(int y, [List x]) Function( - int x); -typedef F11 = List Function(int x2, [List x3]) Function(int x); -typedef F12 = core.List Function({Function x}) Function(int x); -typedef F13 = core.List Function(List x) Function(int x); -typedef F14 = List Function(int x1, [Function x]) Function(int x); -typedef F15 = List Function([core.List x1]) Function(int x); -typedef F16 = Function(int x, [int x1]) Function(int x); -typedef F17 = Function(int y, {List x}) Function(int x); -typedef F18 = void Function([int x]) Function(int x); -typedef F19 = void Function(List x1) Function(int x); -typedef F20 = void Function(int x, [List x1]) Function(int x); -typedef F21 = List Function(List x) Function(int x); -typedef F22 = Function() Function(int x); -typedef F23 = void Function(A x) Function(int x); - -int f0(int x0, [Function x]) => null; -List f1([int x]) => null; -core.List f2([List x]) => null; -f3(core.List x) => null; -List f4() => null; -int Function([Function x]) f5(int x) => null; -int Function(core.List x0) f6(int x) => null; -Function Function(int x0, [int x1]) f7(int x) => null; -Function Function(int x0, {List x}) f8(int x) => null; -List Function(int x) f9(int x) => null; -List Function(int y, [List x]) f10(int x) => null; -List Function(int x0, [List x1]) f11(int x) => null; -core.List Function({Function x}) f12(int x) => null; -core.List Function(List x) f13(int x) => null; -List Function(int x0, [Function x]) f14(int x) => null; -List Function([core.List x0]) f15(int x) => null; -Function(int x, [int x0]) f16(int x) => null; -Function(int y, {List x}) f17(int x) => null; -void Function([int x]) f18(int x) => null; -void Function(List x0) f19(int x) => null; -void Function(int x, [List x0]) f20(int x) => null; -List Function(List x) f21(int x) => null; -Function() f22(int x) => null; -void Function(A x) f23(int x) => null; - -class U13 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int x0, [Function x]) x0; - List Function([int x]) x1; - core.List Function([List x]) x2; - Function(core.List x) x3; - List Function() x4; - int Function([Function x]) Function(int x) x5; - int Function(core.List x1) Function(int x) x6; - Function Function(int x2, [int x3]) Function(int x) x7; - Function Function(int x1, {List x}) Function(int x) x8; - List Function(int x) Function(int x) x9; - List Function(int y, [List x]) Function(int x) x10; - List Function(int x2, [List x3]) Function(int x) x11; - core.List Function({Function x}) Function(int x) x12; - core.List Function(List x) Function(int x) x13; - List Function(int x1, [Function x]) Function(int x) x14; - List Function([core.List x1]) Function(int x) x15; - Function(int x, [int x1]) Function(int x) x16; - Function(int y, {List x}) Function(int x) x17; - void Function([int x]) Function(int x) x18; - void Function(List x1) Function(int x) x19; - void Function(int x, [List x1]) Function(int x) x20; - List Function(List x) Function(int x) x21; - Function() Function(int x) x22; - void Function(A x) Function(int x) x23; - - U13({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int x0, [Function x]) => null; - List m1([int x]) => null; - core.List m2([List x]) => null; - m3(core.List x) => null; - List m4() => null; - int Function([Function x]) m5(int x) => null; - int Function(core.List x0) m6(int x) => null; - Function Function(int x0, [int x1]) m7(int x) => null; - Function Function(int x0, {List x}) m8(int x) => null; - List Function(int x) m9(int x) => null; - List Function(int y, [List x]) m10(int x) => null; - List Function(int x0, [List x1]) m11(int x) => null; - core.List Function({Function x}) m12(int x) => null; - core.List Function(List x) m13(int x) => null; - List Function(int x0, [Function x]) m14(int x) => null; - List Function([core.List x0]) m15(int x) => null; - Function(int x, [int x0]) m16(int x) => null; - Function(int y, {List x}) m17(int x) => null; - void Function([int x]) m18(int x) => null; - void Function(List x0) m19(int x) => null; - void Function(int x, [List x0]) m20(int x) => null; - List Function(List x) m21(int x) => null; - Function() m22(int x) => null; - void Function(A x) m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int x0, [Function x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int x0, [Function x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int x0, [Function x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function([int x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function([int x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function([int x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// core.List Function([List x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function([List x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is core.List Function([List x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m2 is F2); - Expect.equals(true, m2 is F2); - Expect.equals(true, confuse(m2) is F2); - Expect.equals(true, confuse(m2) is F2); - } - } - - /// Function(core.List x) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(core.List x) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(core.List x)); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// List Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function([Function x]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function([Function x]) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function([Function x]) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(core.List x1) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(core.List x1) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(core.List x1) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int x2, [int x3]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x2, [int x3]) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x2, [int x3]) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x1, {List x}) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x1, {List x}) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function(int x1, {List x}) Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int y, [List x]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int y, [List x]) Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int y, [List x]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(int x2, [List x3]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(int x2, [List x3]) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is List Function(int x2, [List x3]) Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function({Function x}) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function({Function x}) Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue( - m12 is core.List Function({Function x}) Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(List x) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(List x) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue( - m13 is core.List Function(List x) Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x1, [Function x]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x1, [Function x]) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function(int x1, [Function x]) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function([core.List x1]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function([core.List x1]) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue( - m15 is List Function([core.List x1]) Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x, [int x1]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x, [int x1]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x, [int x1]) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int y, {List x}) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int y, {List x}) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int y, {List x}) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function([int x]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function([int x]) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function([int x]) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(List x1) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(List x1) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(List x1) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function(int x, [List x1]) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function(int x, [List x1]) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function(int x, [List x1]) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(List x) Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// Function() Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function() Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is Function() Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// void Function(A x) Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - void Function(A x) Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is void Function(A x) Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U13().runTests(); - new U13(tIsInt: true).runTests(); - new U13(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type14_test.dart b/tests/language_2/function_type/function_type14_test.dart deleted file mode 100644 index 15bc6c9b209..00000000000 --- a/tests/language_2/function_type/function_type14_test.dart +++ /dev/null @@ -1,957 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int y, [Function x]); -typedef F1 = List Function(int x0, [int x]); -typedef F2 = core.List Function(int x0, [List x]); -typedef F3 = Function([core.List x]); -typedef F4 = List Function(A x); -typedef F5 = int Function([Function x]) Function(); -typedef F6 = int Function(core.List x1) - Function(); -typedef F7 = Function Function(int x2, [int x3]) - Function(); -typedef F8 = Function Function(int x1, {List x}) - Function(); -typedef F9 = List Function(int x) Function(); -typedef F10 = List Function(int y, [List x]) - Function(); -typedef F11 = List Function(int x2, [List x3]) - Function(); -typedef F12 = core.List Function({Function x}) - Function(); -typedef F13 = core.List Function(List x) - Function(); -typedef F14 = List Function(int x1, [Function x]) - Function(); -typedef F15 = List Function([core.List x1]) - Function(); -typedef F16 = Function(int x, [int x1]) Function(); -typedef F17 = Function(int y, {List x}) - Function(); -typedef F18 = void Function([int x]) Function(); -typedef F19 = void Function(List x1) - Function(); -typedef F20 = void Function(int x, [List x1]) - Function(); -typedef F21 = List Function(List x) - Function(); -typedef F22 = Function() Function(); -typedef F23 = void Function(A x) Function(); - -int f0(int y, [Function x]) => null; -List f1(int x0, [int x]) => null; -core.List f2(int x0, [List x]) => null; -f3([core.List x]) => null; -List f4(A x) => null; -int Function([Function x]) f5() => null; -int Function(core.List x0) f6() => null; -Function Function(int x0, [int x1]) f7() => null; -Function Function(int x0, {List x}) f8() => null; -List Function(int x) f9() => null; -List Function(int y, [List x]) f10() => - null; -List Function(int x0, [List x1]) f11() => - null; -core.List Function({Function x}) f12() => null; -core.List Function(List x) f13() => null; -List Function(int x0, [Function x]) f14() => null; -List Function([core.List x0]) f15() => null; -Function(int x, [int x0]) f16() => null; -Function(int y, {List x}) f17() => null; -void Function([int x]) f18() => null; -void Function(List x0) f19() => null; -void Function(int x, [List x0]) f20() => null; -List Function(List x) f21() => null; -Function() f22() => null; -void Function(A x) f23() => null; - -class U14 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int y, [Function x]) x0; - List Function(int x0, [int x]) x1; - core.List Function(int x0, [List x]) x2; - Function([core.List x]) x3; - List Function(A x) x4; - int Function([Function x]) Function() x5; - int Function(core.List x1) Function() x6; - Function Function(int x2, [int x3]) Function() x7; - Function Function(int x1, {List x}) Function() - x8; - List Function(int x) Function() x9; - List Function(int y, [List x]) - Function() x10; - List Function(int x2, [List x3]) Function() - x11; - core.List Function({Function x}) Function() x12; - core.List Function(List x) Function() x13; - List Function(int x1, [Function x]) Function() x14; - List Function([core.List x1]) Function() x15; - Function(int x, [int x1]) Function() x16; - Function(int y, {List x}) Function() x17; - void Function([int x]) Function() x18; - void Function(List x1) Function() x19; - void Function(int x, [List x1]) Function() x20; - List Function(List x) Function() x21; - Function() Function() x22; - void Function(A x) Function() x23; - - U14({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int y, [Function x]) => null; - List m1(int x0, [int x]) => null; - core.List m2(int x0, [List x]) => null; - m3([core.List x]) => null; - List m4(A x) => null; - int Function([Function x]) m5() => null; - int Function(core.List x0) m6() => null; - Function Function(int x0, [int x1]) m7() => null; - Function Function(int x0, {List x}) m8() => - null; - List Function(int x) m9() => null; - List Function(int y, [List x]) - m10() => null; - List Function(int x0, [List x1]) m11() => - null; - core.List Function({Function x}) m12() => null; - core.List Function(List x) m13() => null; - List Function(int x0, [Function x]) m14() => null; - List Function([core.List x0]) m15() => null; - Function(int x, [int x0]) m16() => null; - Function(int y, {List x}) m17() => null; - void Function([int x]) m18() => null; - void Function(List x0) m19() => null; - void Function(int x, [List x0]) m20() => null; - List Function(List x) m21() => null; - Function() m22() => null; - void Function(A x) m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int y, [Function x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int y, [Function x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int y, [Function x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int x0, [int x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int x0, [int x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int x0, [int x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// core.List Function(int x0, [List x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function(int x0, [List x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is core.List Function(int x0, [List x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m2 is F2); - Expect.equals(true, m2 is F2); - Expect.equals(true, confuse(m2) is F2); - Expect.equals(true, confuse(m2) is F2); - } - } - - /// Function([core.List x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function([core.List x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function([core.List x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// List Function(A x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function(A x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function(A x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function([Function x]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function([Function x]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function([Function x]) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(core.List x1) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(core.List x1) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(core.List x1) - Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int x2, [int x3]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x2, [int x3]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x2, [int x3]) - Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x1, {List x}) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x1, {List x}) Function() - l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x1, {List x}) - Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is List Function(int x) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int y, [List x]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int y, [List x]) - Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int y, [List x]) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(int x2, [List x3]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(int x2, [List x3]) Function() - l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function(int x2, [List x3]) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function({Function x}) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function({Function x}) Function() - l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function({Function x}) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(List x) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(List x) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(List x) - Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x1, [Function x]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x1, [Function x]) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int x1, [Function x]) - Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function([core.List x1]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function([core.List x1]) Function() - l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function([core.List x1]) - Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x, [int x1]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x, [int x1]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function(int x, [int x1]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int y, {List x}) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int y, {List x}) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int y, {List x}) - Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function([int x]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function([int x]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function([int x]) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(List x1) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(List x1) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function(List x1) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function(int x, [List x1]) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function(int x, [List x1]) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function(int x, [List x1]) - Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(List x) - Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// Function() Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function() Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is Function() Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// void Function(A x) Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - void Function(A x) Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is void Function(A x) Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U14().runTests(); - new U14(tIsInt: true).runTests(); - new U14(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type15_test.dart b/tests/language_2/function_type/function_type15_test.dart deleted file mode 100644 index 69bcf21332c..00000000000 --- a/tests/language_2/function_type/function_type15_test.dart +++ /dev/null @@ -1,978 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(Function x0); -typedef F1 = List Function(int y, [int x]); -typedef F2 = core.List Function(int y, [List x]); -typedef F3 = Function(int x0, [core.List x]); -typedef F4 = List Function(List x); -typedef F5 = int Function([Function x]) Function(int x); -typedef F6 = int Function(core.List x1) - Function(int x); -typedef F7 = Function Function(int x2, [int x3]) - Function(int x); -typedef F8 = Function Function(int x1, {List x}) - Function(int x); -typedef F9 = List Function(int x) Function( - int x); -typedef F10 = List Function(int y, [List x]) - Function(int x); -typedef F11 = List Function(int x2, [List x3]) - Function(int x); -typedef F12 = core.List Function({Function x}) - Function(int x); -typedef F13 = core.List Function(List x) - Function(int x); -typedef F14 = List Function(int x1, [Function x]) - Function(int x); -typedef F15 = List Function([core.List x1]) - Function(int x); -typedef F16 = Function(int x, [int x1]) Function(int x); -typedef F17 = Function(int y, {List x}) - Function(int x); -typedef F18 = void Function([int x]) Function(int x); -typedef F19 = void Function(List x1) Function( - int x); -typedef F20 = void Function(int x, [List x1]) - Function(int x); -typedef F21 = List Function(List x) - Function(int x); -typedef F22 = Function() Function(int x); -typedef F23 = void Function(A x) Function(int x); - -int f0(Function x0) => null; -List f1(int y, [int x]) => null; -core.List f2(int y, [List x]) => null; -f3(int x0, [core.List x]) => null; -List f4(List x) => null; -int Function([Function x]) f5(int x) => null; -int Function(core.List x0) f6(int x) => null; -Function Function(int x0, [int x1]) f7(int x) => null; -Function Function(int x0, {List x}) f8(int x) => - null; -List Function(int x) f9(int x) => null; -List Function(int y, [List x]) f10( - int x) => - null; -List Function(int x0, [List x1]) f11( - int x) => - null; -core.List Function({Function x}) f12(int x) => - null; -core.List Function(List x) f13(int x) => - null; -List Function(int x0, [Function x]) f14(int x) => null; -List Function([core.List x0]) f15(int x) => - null; -Function(int x, [int x0]) f16(int x) => null; -Function(int y, {List x}) f17(int x) => null; -void Function([int x]) f18(int x) => null; -void Function(List x0) f19(int x) => null; -void Function(int x, [List x0]) f20(int x) => null; -List Function(List x) f21(int x) => null; -Function() f22(int x) => null; -void Function(A x) f23(int x) => null; - -class U15 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(Function x0) x0; - List Function(int y, [int x]) x1; - core.List Function(int y, [List x]) x2; - Function(int x0, [core.List x]) x3; - List Function(List x) x4; - int Function([Function x]) Function(int x) x5; - int Function(core.List x1) Function(int x) x6; - Function Function(int x2, [int x3]) Function(int x) x7; - Function Function(int x1, {List x}) Function( - int x) x8; - List Function(int x) Function(int x) x9; - List Function(int y, [List x]) - Function(int x) x10; - List Function(int x2, [List x3]) Function( - int x) x11; - core.List Function({Function x}) Function(int x) - x12; - core.List Function(List x) Function(int x) - x13; - List Function(int x1, [Function x]) Function(int x) - x14; - List Function([core.List x1]) Function(int x) - x15; - Function(int x, [int x1]) Function(int x) x16; - Function(int y, {List x}) Function(int x) x17; - void Function([int x]) Function(int x) x18; - void Function(List x1) Function(int x) x19; - void Function(int x, [List x1]) Function(int x) x20; - List Function(List x) Function(int x) x21; - Function() Function(int x) x22; - void Function(A x) Function(int x) x23; - - U15({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(Function x0) => null; - List m1(int y, [int x]) => null; - core.List m2(int y, [List x]) => null; - m3(int x0, [core.List x]) => null; - List m4(List x) => null; - int Function([Function x]) m5(int x) => null; - int Function(core.List x0) m6(int x) => null; - Function Function(int x0, [int x1]) m7(int x) => null; - Function Function(int x0, {List x}) m8(int x) => - null; - List Function(int x) m9(int x) => null; - List Function(int y, [List x]) m10( - int x) => - null; - List Function(int x0, [List x1]) m11( - int x) => - null; - core.List Function({Function x}) m12(int x) => - null; - core.List Function(List x) m13(int x) => - null; - List Function(int x0, [Function x]) m14(int x) => null; - List Function([core.List x0]) m15(int x) => - null; - Function(int x, [int x0]) m16(int x) => null; - Function(int y, {List x}) m17(int x) => null; - void Function([int x]) m18(int x) => null; - void Function(List x0) m19(int x) => null; - void Function(int x, [List x0]) m20(int x) => null; - List Function(List x) m21(int x) => null; - Function() m22(int x) => null; - void Function(A x) m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(Function x0) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(Function x0) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(Function x0)); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int y, [int x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int y, [int x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int y, [int x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// core.List Function(int y, [List x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function(int y, [List x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is core.List Function(int y, [List x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m2 is F2); - Expect.equals(true, m2 is F2); - Expect.equals(true, confuse(m2) is F2); - Expect.equals(true, confuse(m2) is F2); - } - } - - /// Function(int x0, [core.List x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(int x0, [core.List x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(int x0, [core.List x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// List Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function([Function x]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function([Function x]) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function([Function x]) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(core.List x1) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(core.List x1) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(core.List x1) - Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int x2, [int x3]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x2, [int x3]) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x2, [int x3]) - Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x1, {List x}) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x1, {List x}) Function( - int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x1, {List x}) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int y, [List x]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int y, [List x]) - Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int y, [List x]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(int x2, [List x3]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(int x2, [List x3]) Function( - int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function(int x2, [List x3]) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function({Function x}) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function({Function x}) Function( - int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function({Function x}) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(List x) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(List x) Function(int x) - l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(List x) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x1, [Function x]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x1, [Function x]) Function(int x) - l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int x1, [Function x]) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function([core.List x1]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function([core.List x1]) Function( - int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function([core.List x1]) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x, [int x1]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x, [int x1]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function(int x, [int x1]) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int y, {List x}) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int y, {List x}) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int y, {List x}) - Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function([int x]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function([int x]) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue( - m18 is void Function([int x]) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(List x1) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(List x1) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(List x1) - Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function(int x, [List x1]) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function(int x, [List x1]) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function(int x, [List x1]) - Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function(int x) - l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(List x) - Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// Function() Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function() Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is Function() Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// void Function(A x) Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - void Function(A x) Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue( - m23 is void Function(A x) Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U15().runTests(); - new U15(tIsInt: true).runTests(); - new U15(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type16_test.dart b/tests/language_2/function_type/function_type16_test.dart deleted file mode 100644 index e64fc261445..00000000000 --- a/tests/language_2/function_type/function_type16_test.dart +++ /dev/null @@ -1,894 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function([Function x1]); -typedef F1 = List Function(int x0); -typedef F2 = core.List Function(List x0); -typedef F3 = Function(int y, [core.List x]); -typedef F4 = core.List Function(int x); -typedef F5 = int Function(int x0, [Function x]) Function(); -typedef F6 = int Function([core.List x1]) Function(); -typedef F7 = Function Function(int x, [int x2]) Function(); -typedef F8 = Function Function(int y, {List x}) Function(); -typedef F9 = List Function([int x]) Function(); -typedef F10 = List Function(List x0) Function(); -typedef F11 = List Function(int x, [List x2]) Function(); -typedef F12 = core.List Function(int x0, {Function x}) Function(); -typedef F13 = core.List Function([List x]) Function(); -typedef F14 = List Function(int y, [Function x]) Function(); -typedef F15 = List Function(int x1, [core.List x2]) Function(); -typedef F16 = Function({int x}) Function(); -typedef F17 = Function(core.List x) Function(); -typedef F18 = void Function(int x0, [int x]) Function(); -typedef F19 = void Function([List x1]) Function(); -typedef F20 = void Function({List x}) Function(); -typedef F21 = List Function() Function(); -typedef F22 = Function(A x) Function(); -typedef F23 = void Function(List x) Function(); - -int f0([Function x0]) => null; -List f1(int x0) => null; -core.List f2(List x0) => null; -f3(int y, [core.List x]) => null; -core.List f4(int x) => null; -int Function(int x0, [Function x]) f5() => null; -int Function([core.List x0]) f6() => null; -Function Function(int x, [int x0]) f7() => null; -Function Function(int y, {List x}) f8() => null; -List Function([int x]) f9() => null; -List Function(List x0) f10() => null; -List Function(int x, [List x0]) f11() => null; -core.List Function(int x0, {Function x}) f12() => null; -core.List Function([List x]) f13() => null; -List Function(int y, [Function x]) f14() => null; -List Function(int x0, [core.List x1]) f15() => null; -Function({int x}) f16() => null; -Function(core.List x) f17() => null; -void Function(int x0, [int x]) f18() => null; -void Function([List x0]) f19() => null; -void Function({List x}) f20() => null; -List Function() f21() => null; -Function(A x) f22() => null; -void Function(List x) f23() => null; - -class U16 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function([Function x1]) x0; - List Function(int x0) x1; - core.List Function(List x0) x2; - Function(int y, [core.List x]) x3; - core.List Function(int x) x4; - int Function(int x0, [Function x]) Function() x5; - int Function([core.List x1]) Function() x6; - Function Function(int x, [int x2]) Function() x7; - Function Function(int y, {List x}) Function() x8; - List Function([int x]) Function() x9; - List Function(List x0) Function() x10; - List Function(int x, [List x2]) Function() x11; - core.List Function(int x0, {Function x}) Function() x12; - core.List Function([List x]) Function() x13; - List Function(int y, [Function x]) Function() x14; - List Function(int x1, [core.List x2]) Function() x15; - Function({int x}) Function() x16; - Function(core.List x) Function() x17; - void Function(int x0, [int x]) Function() x18; - void Function([List x1]) Function() x19; - void Function({List x}) Function() x20; - List Function() Function() x21; - Function(A x) Function() x22; - void Function(List x) Function() x23; - - U16({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0([Function x0]) => null; - List m1(int x0) => null; - core.List m2(List x0) => null; - m3(int y, [core.List x]) => null; - core.List m4(int x) => null; - int Function(int x0, [Function x]) m5() => null; - int Function([core.List x0]) m6() => null; - Function Function(int x, [int x0]) m7() => null; - Function Function(int y, {List x}) m8() => null; - List Function([int x]) m9() => null; - List Function(List x0) m10() => null; - List Function(int x, [List x0]) m11() => null; - core.List Function(int x0, {Function x}) m12() => null; - core.List Function([List x]) m13() => null; - List Function(int y, [Function x]) m14() => null; - List Function(int x0, [core.List x1]) m15() => null; - Function({int x}) m16() => null; - Function(core.List x) m17() => null; - void Function(int x0, [int x]) m18() => null; - void Function([List x0]) m19() => null; - void Function({List x}) m20() => null; - List Function() m21() => null; - Function(A x) m22() => null; - void Function(List x) m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function([Function x1]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function([Function x1]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function([Function x1])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int x0) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int x0) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int x0)); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// core.List Function(List x0) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function(List x0) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is core.List Function(List x0)); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m2 is F2); - Expect.equals(true, m2 is F2); - Expect.equals(true, confuse(m2) is F2); - Expect.equals(true, confuse(m2) is F2); - } - } - - /// Function(int y, [core.List x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(int y, [core.List x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(int y, [core.List x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// core.List Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - core.List Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is core.List Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x0, [Function x]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x0, [Function x]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x0, [Function x]) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function([core.List x1]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function([core.List x1]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function([core.List x1]) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int x, [int x2]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x, [int x2]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x, [int x2]) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int y, {List x}) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int y, {List x}) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function(int y, {List x}) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function([int x]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function([int x]) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function([int x]) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(List x0) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(List x0) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(List x0) Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(int x, [List x2]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(int x, [List x2]) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is List Function(int x, [List x2]) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function(int x0, {Function x}) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x0, {Function x}) Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue( - m12 is core.List Function(int x0, {Function x}) Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function([List x]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function([List x]) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function([List x]) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int y, [Function x]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int y, [Function x]) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int y, [Function x]) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x1, [core.List x2]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x1, [core.List x2]) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue( - m15 is List Function(int x1, [core.List x2]) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function({int x}) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function({int x}) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function({int x}) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(core.List x) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(core.List x) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(core.List x) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x0, [int x]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x0, [int x]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x0, [int x]) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function([List x1]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function([List x1]) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function([List x1]) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function({List x}) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function({List x}) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function({List x}) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function() Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function() Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function() Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// Function(A x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function(A x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is Function(A x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// void Function(List x) Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - void Function(List x) Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is void Function(List x) Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U16().runTests(); - new U16(tIsInt: true).runTests(); - new U16(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type17_test.dart b/tests/language_2/function_type/function_type17_test.dart deleted file mode 100644 index 8fdee380d72..00000000000 --- a/tests/language_2/function_type/function_type17_test.dart +++ /dev/null @@ -1,898 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int x1, [Function x2]); -typedef F1 = List Function([int x1]); -typedef F2 = core.List Function([List x1]); -typedef F3 = Function(core.List x0); -typedef F4 = core.List Function(Function x); -typedef F5 = int Function(int x1, [Function x]) Function(int x); -typedef F6 = int Function([core.List x1]) Function(int x); -typedef F7 = Function Function(int x, [int x1]) Function(int x); -typedef F8 = Function Function(int y, {List x}) Function(int x); -typedef F9 = List Function([int x]) Function(int x); -typedef F10 = List Function(List x1) Function(int x); -typedef F11 = List Function(int x, [List x1]) Function(int x); -typedef F12 = core.List Function(int x1, {Function x}) Function( - int x); -typedef F13 = core.List Function([List x]) Function(int x); -typedef F14 = List Function(int y, [Function x]) Function(int x); -typedef F15 = List Function(int x2, [core.List x3]) Function( - int x); -typedef F16 = Function({int x}) Function(int x); -typedef F17 = Function(core.List x) Function(int x); -typedef F18 = void Function(int x1, [int x]) Function(int x); -typedef F19 = void Function([List x1]) Function(int x); -typedef F20 = void Function({List x}) Function(int x); -typedef F21 = List Function() Function(int x); -typedef F22 = Function(A x) Function(int x); -typedef F23 = void Function(List x) Function(int x); - -int f0(int x0, [Function x1]) => null; -List f1([int x0]) => null; -core.List f2([List x0]) => null; -f3(core.List x0) => null; -core.List f4(Function x) => null; -int Function(int x0, [Function x]) f5(int x) => null; -int Function([core.List x0]) f6(int x) => null; -Function Function(int x, [int x0]) f7(int x) => null; -Function Function(int y, {List x}) f8(int x) => null; -List Function([int x]) f9(int x) => null; -List Function(List x0) f10(int x) => null; -List Function(int x, [List x0]) f11(int x) => null; -core.List Function(int x0, {Function x}) f12(int x) => null; -core.List Function([List x]) f13(int x) => null; -List Function(int y, [Function x]) f14(int x) => null; -List Function(int x0, [core.List x1]) f15(int x) => null; -Function({int x}) f16(int x) => null; -Function(core.List x) f17(int x) => null; -void Function(int x0, [int x]) f18(int x) => null; -void Function([List x0]) f19(int x) => null; -void Function({List x}) f20(int x) => null; -List Function() f21(int x) => null; -Function(A x) f22(int x) => null; -void Function(List x) f23(int x) => null; - -class U17 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int x1, [Function x2]) x0; - List Function([int x1]) x1; - core.List Function([List x1]) x2; - Function(core.List x0) x3; - core.List Function(Function x) x4; - int Function(int x1, [Function x]) Function(int x) x5; - int Function([core.List x1]) Function(int x) x6; - Function Function(int x, [int x1]) Function(int x) x7; - Function Function(int y, {List x}) Function(int x) x8; - List Function([int x]) Function(int x) x9; - List Function(List x1) Function(int x) x10; - List Function(int x, [List x1]) Function(int x) x11; - core.List Function(int x1, {Function x}) Function(int x) x12; - core.List Function([List x]) Function(int x) x13; - List Function(int y, [Function x]) Function(int x) x14; - List Function(int x2, [core.List x3]) Function(int x) x15; - Function({int x}) Function(int x) x16; - Function(core.List x) Function(int x) x17; - void Function(int x1, [int x]) Function(int x) x18; - void Function([List x1]) Function(int x) x19; - void Function({List x}) Function(int x) x20; - List Function() Function(int x) x21; - Function(A x) Function(int x) x22; - void Function(List x) Function(int x) x23; - - U17({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int x0, [Function x1]) => null; - List m1([int x0]) => null; - core.List m2([List x0]) => null; - m3(core.List x0) => null; - core.List m4(Function x) => null; - int Function(int x0, [Function x]) m5(int x) => null; - int Function([core.List x0]) m6(int x) => null; - Function Function(int x, [int x0]) m7(int x) => null; - Function Function(int y, {List x}) m8(int x) => null; - List Function([int x]) m9(int x) => null; - List Function(List x0) m10(int x) => null; - List Function(int x, [List x0]) m11(int x) => null; - core.List Function(int x0, {Function x}) m12(int x) => null; - core.List Function([List x]) m13(int x) => null; - List Function(int y, [Function x]) m14(int x) => null; - List Function(int x0, [core.List x1]) m15(int x) => null; - Function({int x}) m16(int x) => null; - Function(core.List x) m17(int x) => null; - void Function(int x0, [int x]) m18(int x) => null; - void Function([List x0]) m19(int x) => null; - void Function({List x}) m20(int x) => null; - List Function() m21(int x) => null; - Function(A x) m22(int x) => null; - void Function(List x) m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int x1, [Function x2]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int x1, [Function x2]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int x1, [Function x2])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function([int x1]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function([int x1]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function([int x1])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// core.List Function([List x1]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function([List x1]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is core.List Function([List x1])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m2 is F2); - Expect.equals(true, m2 is F2); - Expect.equals(true, confuse(m2) is F2); - Expect.equals(true, confuse(m2) is F2); - } - } - - /// Function(core.List x0) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(core.List x0) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(core.List x0)); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// core.List Function(Function x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - core.List Function(Function x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is core.List Function(Function x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x1, [Function x]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x1, [Function x]) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x1, [Function x]) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function([core.List x1]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function([core.List x1]) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function([core.List x1]) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int x, [int x1]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x, [int x1]) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x, [int x1]) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int y, {List x}) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int y, {List x}) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function(int y, {List x}) Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function([int x]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function([int x]) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function([int x]) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(List x1) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(List x1) Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue( - m10 is List Function(List x1) Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(int x, [List x1]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(int x, [List x1]) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is List Function(int x, [List x1]) Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function(int x1, {Function x}) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x1, {Function x}) Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x1, {Function x}) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function([List x]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function([List x]) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue( - m13 is core.List Function([List x]) Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int y, [Function x]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int y, [Function x]) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int y, [Function x]) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x2, [core.List x3]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x2, [core.List x3]) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x2, [core.List x3]) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function({int x}) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function({int x}) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function({int x}) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(core.List x) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(core.List x) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(core.List x) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x1, [int x]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x1, [int x]) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x1, [int x]) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function([List x1]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function([List x1]) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function([List x1]) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function({List x}) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function({List x}) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function({List x}) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function() Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function() Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function() Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// Function(A x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function(A x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is Function(A x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// void Function(List x) Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - void Function(List x) Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is void Function(List x) Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U17().runTests(); - new U17(tIsInt: true).runTests(); - new U17(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type18_test.dart b/tests/language_2/function_type/function_type18_test.dart deleted file mode 100644 index c1c9bcb0ea6..00000000000 --- a/tests/language_2/function_type/function_type18_test.dart +++ /dev/null @@ -1,934 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int x, [Function x2]); -typedef F1 = List Function(int x1, [int x2]); -typedef F2 = core.List Function(int x1, [List x2]); -typedef F3 = Function([core.List x1]); -typedef F4 = core.List Function(List x); -typedef F5 = int Function(int x1, [Function x]) - Function(); -typedef F6 = int Function([core.List x1]) - Function(); -typedef F7 = Function Function(int x, [int x1]) - Function(); -typedef F8 = Function Function(int y, {List x}) - Function(); -typedef F9 = List Function([int x]) Function(); -typedef F10 = List Function(List x1) - Function(); -typedef F11 = List Function(int x, [List x1]) - Function(); -typedef F12 = core.List Function(int x1, {Function x}) - Function(); -typedef F13 = core.List Function([List x]) - Function(); -typedef F14 = List Function(int y, [Function x]) - Function(); -typedef F15 = List Function(int x2, [core.List x3]) - Function(); -typedef F16 = Function({int x}) Function(); -typedef F17 = Function(core.List x) Function(); -typedef F18 = void Function(int x1, [int x]) Function(); -typedef F19 = void Function([List x1]) - Function(); -typedef F20 = void Function({List x}) Function(); -typedef F21 = List Function() Function(); -typedef F22 = Function(A x) Function(); -typedef F23 = void Function(List x) Function(); - -int f0(int x, [Function x0]) => null; -List f1(int x0, [int x1]) => null; -core.List f2(int x0, [List x1]) => null; -f3([core.List x0]) => null; -core.List f4(List x) => null; -int Function(int x0, [Function x]) f5() => null; -int Function([core.List x0]) f6() => null; -Function Function(int x, [int x0]) f7() => null; -Function Function(int y, {List x}) f8() => null; -List Function([int x]) f9() => null; -List Function(List x0) f10() => null; -List Function(int x, [List x0]) f11() => - null; -core.List Function(int x0, {Function x}) f12() => - null; -core.List Function([List x]) f13() => null; -List Function(int y, [Function x]) f14() => null; -List Function(int x0, [core.List x1]) - f15() => null; -Function({int x}) f16() => null; -Function(core.List x) f17() => null; -void Function(int x0, [int x]) f18() => null; -void Function([List x0]) f19() => null; -void Function({List x}) f20() => null; -List Function() f21() => null; -Function(A x) f22() => null; -void Function(List x) f23() => null; - -class U18 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int x, [Function x2]) x0; - List Function(int x1, [int x2]) x1; - core.List Function(int x1, [List x2]) x2; - Function([core.List x1]) x3; - core.List Function(List x) x4; - int Function(int x1, [Function x]) Function() x5; - int Function([core.List x1]) Function() x6; - Function Function(int x, [int x1]) Function() x7; - Function Function(int y, {List x}) Function() - x8; - List Function([int x]) Function() x9; - List Function(List x1) Function() x10; - List Function(int x, [List x1]) Function() - x11; - core.List Function(int x1, {Function x}) - Function() x12; - core.List Function([List x]) Function() x13; - List Function(int y, [Function x]) Function() x14; - List Function(int x2, [core.List x3]) - Function() x15; - Function({int x}) Function() x16; - Function(core.List x) Function() x17; - void Function(int x1, [int x]) Function() x18; - void Function([List x1]) Function() x19; - void Function({List x}) Function() x20; - List Function() Function() x21; - Function(A x) Function() x22; - void Function(List x) Function() x23; - - U18({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int x, [Function x0]) => null; - List m1(int x0, [int x1]) => null; - core.List m2(int x0, [List x1]) => null; - m3([core.List x0]) => null; - core.List m4(List x) => null; - int Function(int x0, [Function x]) m5() => null; - int Function([core.List x0]) m6() => null; - Function Function(int x, [int x0]) m7() => null; - Function Function(int y, {List x}) m8() => null; - List Function([int x]) m9() => null; - List Function(List x0) m10() => null; - List Function(int x, [List x0]) m11() => - null; - core.List Function(int x0, {Function x}) - m12() => null; - core.List Function([List x]) m13() => null; - List Function(int y, [Function x]) m14() => null; - List Function(int x0, [core.List x1]) - m15() => null; - Function({int x}) m16() => null; - Function(core.List x) m17() => null; - void Function(int x0, [int x]) m18() => null; - void Function([List x0]) m19() => null; - void Function({List x}) m20() => null; - List Function() m21() => null; - Function(A x) m22() => null; - void Function(List x) m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int x, [Function x2]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int x, [Function x2]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int x, [Function x2])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int x1, [int x2]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int x1, [int x2]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int x1, [int x2])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// core.List Function(int x1, [List x2]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function(int x1, [List x2]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is core.List Function(int x1, [List x2])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m2 is F2); - Expect.equals(true, m2 is F2); - Expect.equals(true, confuse(m2) is F2); - Expect.equals(true, confuse(m2) is F2); - } - } - - /// Function([core.List x1]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function([core.List x1]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function([core.List x1])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// core.List Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - core.List Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is core.List Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x1, [Function x]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x1, [Function x]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x1, [Function x]) - Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function([core.List x1]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function([core.List x1]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function([core.List x1]) - Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int x, [int x1]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x, [int x1]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x, [int x1]) - Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int y, {List x}) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int y, {List x}) Function() - l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int y, {List x}) - Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function([int x]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function([int x]) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is List Function([int x]) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(List x1) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(List x1) Function() - l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(List x1) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(int x, [List x1]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(int x, [List x1]) Function() - l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function(int x, [List x1]) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function(int x1, {Function x}) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x1, {Function x}) - Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x1, {Function x}) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function([List x]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function([List x]) Function() - l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function([List x]) - Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int y, [Function x]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int y, [Function x]) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int y, [Function x]) - Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x2, [core.List x3]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x2, [core.List x3]) - Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x2, [core.List x3]) - Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function({int x}) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function({int x}) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function({int x}) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(core.List x) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(core.List x) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue( - m17 is Function(core.List x) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x1, [int x]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x1, [int x]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue( - m18 is void Function(int x1, [int x]) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function([List x1]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function([List x1]) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function([List x1]) - Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function({List x}) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function({List x}) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is void Function({List x}) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function() Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function() Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is List Function() Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// Function(A x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function(A x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is Function(A x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// void Function(List x) Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - void Function(List x) Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue( - m23 is void Function(List x) Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U18().runTests(); - new U18(tIsInt: true).runTests(); - new U18(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type19_test.dart b/tests/language_2/function_type/function_type19_test.dart deleted file mode 100644 index 546f1abe88d..00000000000 --- a/tests/language_2/function_type/function_type19_test.dart +++ /dev/null @@ -1,953 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function({Function x}); -typedef F1 = List Function(int x, [int x2]); -typedef F2 = core.List Function(int x, [List x2]); -typedef F3 = Function(int x1, [core.List x2]); -typedef F4 = core.List Function(core.List x); -typedef F5 = int Function(int x1, [Function x]) Function( - int x); -typedef F6 = int Function([core.List x1]) - Function(int x); -typedef F7 = Function Function(int x, [int x1]) Function( - int x); -typedef F8 = Function Function(int y, {List x}) - Function(int x); -typedef F9 = List Function([int x]) Function( - int x); -typedef F10 = List Function(List x1) - Function(int x); -typedef F11 = List Function(int x, [List x1]) - Function(int x); -typedef F12 = core.List Function(int x1, {Function x}) - Function(int x); -typedef F13 = core.List Function([List x]) - Function(int x); -typedef F14 = List Function(int y, [Function x]) - Function(int x); -typedef F15 = List Function(int x2, [core.List x3]) - Function(int x); -typedef F16 = Function({int x}) Function(int x); -typedef F17 = Function(core.List x) Function( - int x); -typedef F18 = void Function(int x1, [int x]) Function( - int x); -typedef F19 = void Function([List x1]) - Function(int x); -typedef F20 = void Function({List x}) Function(int x); -typedef F21 = List Function() Function( - int x); -typedef F22 = Function(A x) Function(int x); -typedef F23 = void Function(List x) Function( - int x); - -int f0({Function x}) => null; -List f1(int x, [int x0]) => null; -core.List f2(int x, [List x0]) => null; -f3(int x0, [core.List x1]) => null; -core.List f4(core.List x) => null; -int Function(int x0, [Function x]) f5(int x) => null; -int Function([core.List x0]) f6(int x) => null; -Function Function(int x, [int x0]) f7(int x) => null; -Function Function(int y, {List x}) f8(int x) => - null; -List Function([int x]) f9(int x) => null; -List Function(List x0) f10(int x) => - null; -List Function(int x, [List x0]) f11(int x) => - null; -core.List Function(int x0, {Function x}) f12( - int x) => - null; -core.List Function([List x]) f13(int x) => - null; -List Function(int y, [Function x]) f14(int x) => null; -List Function(int x0, [core.List x1]) f15( - int x) => - null; -Function({int x}) f16(int x) => null; -Function(core.List x) f17(int x) => null; -void Function(int x0, [int x]) f18(int x) => null; -void Function([List x0]) f19(int x) => null; -void Function({List x}) f20(int x) => null; -List Function() f21(int x) => null; -Function(A x) f22(int x) => null; -void Function(List x) f23(int x) => null; - -class U19 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function({Function x}) x0; - List Function(int x, [int x2]) x1; - core.List Function(int x, [List x2]) x2; - Function(int x1, [core.List x2]) x3; - core.List Function(core.List x) x4; - int Function(int x1, [Function x]) Function(int x) x5; - int Function([core.List x1]) Function(int x) x6; - Function Function(int x, [int x1]) Function(int x) x7; - Function Function(int y, {List x}) Function( - int x) x8; - List Function([int x]) Function(int x) x9; - List Function(List x1) Function(int x) - x10; - List Function(int x, [List x1]) Function( - int x) x11; - core.List Function(int x1, {Function x}) - Function(int x) x12; - core.List Function([List x]) Function(int x) - x13; - List Function(int y, [Function x]) Function(int x) x14; - List Function(int x2, [core.List x3]) - Function(int x) x15; - Function({int x}) Function(int x) x16; - Function(core.List x) Function(int x) x17; - void Function(int x1, [int x]) Function(int x) x18; - void Function([List x1]) Function(int x) x19; - void Function({List x}) Function(int x) x20; - List Function() Function(int x) x21; - Function(A x) Function(int x) x22; - void Function(List x) Function(int x) x23; - - U19({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0({Function x}) => null; - List m1(int x, [int x0]) => null; - core.List m2(int x, [List x0]) => null; - m3(int x0, [core.List x1]) => null; - core.List m4(core.List x) => null; - int Function(int x0, [Function x]) m5(int x) => null; - int Function([core.List x0]) m6(int x) => null; - Function Function(int x, [int x0]) m7(int x) => null; - Function Function(int y, {List x}) m8(int x) => - null; - List Function([int x]) m9(int x) => null; - List Function(List x0) m10(int x) => - null; - List Function(int x, [List x0]) m11(int x) => - null; - core.List Function(int x0, {Function x}) m12( - int x) => - null; - core.List Function([List x]) m13(int x) => - null; - List Function(int y, [Function x]) m14(int x) => null; - List Function(int x0, [core.List x1]) m15( - int x) => - null; - Function({int x}) m16(int x) => null; - Function(core.List x) m17(int x) => null; - void Function(int x0, [int x]) m18(int x) => null; - void Function([List x0]) m19(int x) => null; - void Function({List x}) m20(int x) => null; - List Function() m21(int x) => null; - Function(A x) m22(int x) => null; - void Function(List x) m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function({Function x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function({Function x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function({Function x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int x, [int x2]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int x, [int x2]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int x, [int x2])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// core.List Function(int x, [List x2]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function(int x, [List x2]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is core.List Function(int x, [List x2])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m2 is F2); - Expect.equals(true, m2 is F2); - Expect.equals(true, confuse(m2) is F2); - Expect.equals(true, confuse(m2) is F2); - } - } - - /// Function(int x1, [core.List x2]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(int x1, [core.List x2]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(int x1, [core.List x2])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// core.List Function(core.List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - core.List Function(core.List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is core.List Function(core.List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x1, [Function x]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x1, [Function x]) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x1, [Function x]) - Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function([core.List x1]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function([core.List x1]) Function(int x) - l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function([core.List x1]) - Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int x, [int x1]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x, [int x1]) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x, [int x1]) - Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int y, {List x}) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int y, {List x}) Function( - int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int y, {List x}) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function([int x]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function([int x]) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function([int x]) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(List x1) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(List x1) Function( - int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(List x1) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(int x, [List x1]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(int x, [List x1]) Function( - int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function(int x, [List x1]) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function(int x1, {Function x}) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x1, {Function x}) - Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x1, {Function x}) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function([List x]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function([List x]) Function( - int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function([List x]) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int y, [Function x]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int y, [Function x]) Function(int x) - l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int y, [Function x]) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x2, [core.List x3]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x2, [core.List x3]) - Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x2, [core.List x3]) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function({int x}) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function({int x}) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function({int x}) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(core.List x) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(core.List x) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(core.List x) - Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x1, [int x]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x1, [int x]) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x1, [int x]) - Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function([List x1]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function([List x1]) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function([List x1]) - Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function({List x}) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function({List x}) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is void Function({List x}) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function() Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function() Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function() - Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// Function(A x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function(A x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is Function(A x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// void Function(List x) Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - void Function(List x) Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue( - m23 is void Function(List x) Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U19().runTests(); - new U19(tIsInt: true).runTests(); - new U19(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type1_test.dart b/tests/language_2/function_type/function_type1_test.dart deleted file mode 100644 index 7e267fdd279..00000000000 --- a/tests/language_2/function_type/function_type1_test.dart +++ /dev/null @@ -1,925 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function([int x]); -typedef F1 = Function Function([List x]); -typedef F2 = core.List Function(core.List x); -typedef F3 = Function(int y, {Function x}); -typedef F4 = Function Function(Function x); -typedef F5 = int Function(int x1, {int x}) Function(int x); -typedef F6 = int Function([core.List x]) Function(int x); -typedef F7 = Function Function(int y, [int x]) Function(int x); -typedef F8 = Function Function(int x2, [List x3]) Function(int x); -typedef F9 = Function Function(int x1, {List x}) Function(int x); -typedef F10 = List Function(List x) Function(int x); -typedef F11 = List Function(int y, [List x]) Function(int x); -typedef F12 = core.List Function([Function x1]) Function(int x); -typedef F13 = core.List Function({core.List x}) Function( - int x); -typedef F14 = List Function(int y, {int x}) Function(int x); -typedef F15 = List Function(int x1, [core.List x]) Function( - int x); -typedef F16 = Function(int x1) Function(int x); -typedef F17 = Function(int x, [List x1]) Function(int x); -typedef F18 = Function(int y, {List x}) Function(int x); -typedef F19 = void Function([List x]) Function(int x); -typedef F20 = void Function(List x1) Function(int x); -typedef F21 = List Function(Function x) Function(int x); -typedef F22 = Function(List x) Function(int x); -typedef F23 = void Function(core.List x) Function(int x); - -int f0([int x]) => null; -Function f1([List x]) => null; -core.List f2(core.List x) => null; -f3(int y, {Function x}) => null; -Function f4(Function x) => null; -int Function(int x0, {int x}) f5(int x) => null; -int Function([core.List x]) f6(int x) => null; -Function Function(int y, [int x]) f7(int x) => null; -Function Function(int x0, [List x1]) f8(int x) => null; -Function Function(int x0, {List x}) f9(int x) => null; -List Function(List x) f10(int x) => null; -List Function(int y, [List x]) f11(int x) => null; -core.List Function([Function x0]) f12(int x) => null; -core.List Function({core.List x}) f13(int x) => null; -List Function(int y, {int x}) f14(int x) => null; -List Function(int x0, [core.List x]) f15(int x) => null; -Function(int x0) f16(int x) => null; -Function(int x, [List x0]) f17(int x) => null; -Function(int y, {List x}) f18(int x) => null; -void Function([List x]) f19(int x) => null; -void Function(List x0) f20(int x) => null; -List Function(Function x) f21(int x) => null; -Function(List x) f22(int x) => null; -void Function(core.List x) f23(int x) => null; - -class U1 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function([int x]) x0; - Function Function([List x]) x1; - core.List Function(core.List x) x2; - Function(int y, {Function x}) x3; - Function Function(Function x) x4; - int Function(int x1, {int x}) Function(int x) x5; - int Function([core.List x]) Function(int x) x6; - Function Function(int y, [int x]) Function(int x) x7; - Function Function(int x2, [List x3]) Function(int x) x8; - Function Function(int x1, {List x}) Function(int x) x9; - List Function(List x) Function(int x) x10; - List Function(int y, [List x]) Function(int x) x11; - core.List Function([Function x1]) Function(int x) x12; - core.List Function({core.List x}) Function(int x) x13; - List Function(int y, {int x}) Function(int x) x14; - List Function(int x1, [core.List x]) Function(int x) x15; - Function(int x1) Function(int x) x16; - Function(int x, [List x1]) Function(int x) x17; - Function(int y, {List x}) Function(int x) x18; - void Function([List x]) Function(int x) x19; - void Function(List x1) Function(int x) x20; - List Function(Function x) Function(int x) x21; - Function(List x) Function(int x) x22; - void Function(core.List x) Function(int x) x23; - - U1({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0([int x]) => null; - Function m1([List x]) => null; - core.List m2(core.List x) => null; - m3(int y, {Function x}) => null; - Function m4(Function x) => null; - int Function(int x0, {int x}) m5(int x) => null; - int Function([core.List x]) m6(int x) => null; - Function Function(int y, [int x]) m7(int x) => null; - Function Function(int x0, [List x1]) m8(int x) => null; - Function Function(int x0, {List x}) m9(int x) => null; - List Function(List x) m10(int x) => null; - List Function(int y, [List x]) m11(int x) => null; - core.List Function([Function x0]) m12(int x) => null; - core.List Function({core.List x}) m13(int x) => null; - List Function(int y, {int x}) m14(int x) => null; - List Function(int x0, [core.List x]) m15(int x) => null; - Function(int x0) m16(int x) => null; - Function(int x, [List x0]) m17(int x) => null; - Function(int y, {List x}) m18(int x) => null; - void Function([List x]) m19(int x) => null; - void Function(List x0) m20(int x) => null; - List Function(Function x) m21(int x) => null; - Function(List x) m22(int x) => null; - void Function(core.List x) m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function([int x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function([int x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function([int x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// Function Function([List x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - Function Function([List x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is Function Function([List x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - // The static function has its T always set to int. - Expect.isTrue(f1 is F1); - Expect.isFalse(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - Expect.isFalse(confuse(f1) is F1); - if (tIsBool) { - Expect.throws(() { - x1 = (f1 as dynamic); - }); - Expect.throws(() { - x1 = confuse(f1); - }); - Expect.throws(() { - l1 = (f1 as dynamic); - }); - Expect.throws(() { - l1 = confuse(f1); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m1 is F1); - Expect.equals(true, m1 is F1); - Expect.equals(true, confuse(m1) is F1); - Expect.equals(true, confuse(m1) is F1); - } - } - - /// core.List Function(core.List x) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function(core.List x) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is core.List Function(core.List x)); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// Function(int y, {Function x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(int y, {Function x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(int y, {Function x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// Function Function(Function x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - Function Function(Function x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is Function Function(Function x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x1, {int x}) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x1, {int x}) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x1, {int x}) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function([core.List x]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function([core.List x]) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function([core.List x]) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int y, [int x]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int y, [int x]) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int y, [int x]) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x2, [List x3]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x2, [List x3]) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function(int x2, [List x3]) Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// Function Function(int x1, {List x}) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - Function Function(int x1, {List x}) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is Function Function(int x1, {List x}) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - // The static function has its T always set to int. - Expect.isTrue(f9 is F9); - Expect.isFalse(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - Expect.isFalse(confuse(f9) is F9); - if (tIsBool) { - Expect.throws(() { - x9 = (f9 as dynamic); - }); - Expect.throws(() { - x9 = confuse(f9); - }); - Expect.throws(() { - l9 = (f9 as dynamic); - }); - Expect.throws(() { - l9 = confuse(f9); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m9 is F9); - Expect.equals(tIsBool, m9 is F9); - Expect.equals(tIsInt, confuse(m9) is F9); - Expect.equals(tIsBool, confuse(m9) is F9); - } - } - - /// List Function(List x) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(List x) Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue( - m10 is List Function(List x) Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(int y, [List x]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(int y, [List x]) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is List Function(int y, [List x]) Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function([Function x1]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function([Function x1]) Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue( - m12 is core.List Function([Function x1]) Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function({core.List x}) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function({core.List x}) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function({core.List x}) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - } - - /// List Function(int y, {int x}) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int y, {int x}) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int y, {int x}) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x1, [core.List x]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x1, [core.List x]) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x1, [core.List x]) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x1) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x1) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x1) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x, [List x1]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x, [List x1]) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x, [List x1]) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// Function(int y, {List x}) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - Function(int y, {List x}) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is Function(int y, {List x}) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - // The static function has its T always set to int. - Expect.isTrue(f18 is F18); - Expect.isFalse(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - Expect.isFalse(confuse(f18) is F18); - if (tIsBool) { - Expect.throws(() { - x18 = (f18 as dynamic); - }); - Expect.throws(() { - x18 = confuse(f18); - }); - Expect.throws(() { - l18 = (f18 as dynamic); - }); - Expect.throws(() { - l18 = confuse(f18); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m18 is F18); - Expect.equals(tIsBool, m18 is F18); - Expect.equals(tIsInt, confuse(m18) is F18); - Expect.equals(tIsBool, confuse(m18) is F18); - } - } - - /// void Function([List x]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function([List x]) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function([List x]) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function(List x1) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function(List x1) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function(List x1) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(Function x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(Function x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is List Function(Function x) Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// Function(List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function(List x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is Function(List x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// void Function(core.List x) Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - void Function(core.List x) Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue( - m23 is void Function(core.List x) Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U1().runTests(); - new U1(tIsInt: true).runTests(); - new U1(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type20_test.dart b/tests/language_2/function_type/function_type20_test.dart deleted file mode 100644 index ab832758a11..00000000000 --- a/tests/language_2/function_type/function_type20_test.dart +++ /dev/null @@ -1,920 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int x0, {Function x}); -typedef F1 = List Function({int x}); -typedef F2 = core.List Function({List x}); -typedef F3 = Function(int x, [core.List x2]); -typedef F4 = core.List Function(List x); -typedef F5 = int Function(int y, [Function x]) Function(); -typedef F6 = int Function(int x1, [core.List x2]) Function(); -typedef F7 = Function Function({int x}) Function(); -typedef F8 = Function Function(core.List x) Function(); -typedef F9 = List Function(int x0, [int x]) Function(); -typedef F10 = List Function([List x1]) Function(); -typedef F11 = List Function({List x}) Function(); -typedef F12 = core.List Function(int y, {Function x}) Function(); -typedef F13 = core.List Function(int x0, [List x]) Function(); -typedef F14 = List Function(Function x0) Function(); -typedef F15 = List Function(int x, [core.List x2]) Function(); -typedef F16 = Function(int x0, {int x}) Function(); -typedef F17 = Function([core.List x]) Function(); -typedef F18 = void Function(int y, [int x]) Function(); -typedef F19 = void Function(int x1, [List x2]) Function(); -typedef F20 = void Function(int x0, {List x}) Function(); -typedef F21 = List Function(A x) Function(); -typedef F22 = Function(List x) Function(); -typedef F23 = int Function(B x) Function(); - -int f0(int x0, {Function x}) => null; -List f1({int x}) => null; -core.List f2({List x}) => null; -f3(int x, [core.List x0]) => null; -core.List f4(List x) => null; -int Function(int y, [Function x]) f5() => null; -int Function(int x0, [core.List x1]) f6() => null; -Function Function({int x}) f7() => null; -Function Function(core.List x) f8() => null; -List Function(int x0, [int x]) f9() => null; -List Function([List x0]) f10() => null; -List Function({List x}) f11() => null; -core.List Function(int y, {Function x}) f12() => null; -core.List Function(int x0, [List x]) f13() => null; -List Function(Function x0) f14() => null; -List Function(int x, [core.List x0]) f15() => null; -Function(int x0, {int x}) f16() => null; -Function([core.List x]) f17() => null; -void Function(int y, [int x]) f18() => null; -void Function(int x0, [List x1]) f19() => null; -void Function(int x0, {List x}) f20() => null; -List Function(A x) f21() => null; -Function(List x) f22() => null; -int Function(B x) f23() => null; - -class U20 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int x0, {Function x}) x0; - List Function({int x}) x1; - core.List Function({List x}) x2; - Function(int x, [core.List x2]) x3; - core.List Function(List x) x4; - int Function(int y, [Function x]) Function() x5; - int Function(int x1, [core.List x2]) Function() x6; - Function Function({int x}) Function() x7; - Function Function(core.List x) Function() x8; - List Function(int x0, [int x]) Function() x9; - List Function([List x1]) Function() x10; - List Function({List x}) Function() x11; - core.List Function(int y, {Function x}) Function() x12; - core.List Function(int x0, [List x]) Function() x13; - List Function(Function x0) Function() x14; - List Function(int x, [core.List x2]) Function() x15; - Function(int x0, {int x}) Function() x16; - Function([core.List x]) Function() x17; - void Function(int y, [int x]) Function() x18; - void Function(int x1, [List x2]) Function() x19; - void Function(int x0, {List x}) Function() x20; - List Function(A x) Function() x21; - Function(List x) Function() x22; - int Function(B x) Function() x23; - - U20({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int x0, {Function x}) => null; - List m1({int x}) => null; - core.List m2({List x}) => null; - m3(int x, [core.List x0]) => null; - core.List m4(List x) => null; - int Function(int y, [Function x]) m5() => null; - int Function(int x0, [core.List x1]) m6() => null; - Function Function({int x}) m7() => null; - Function Function(core.List x) m8() => null; - List Function(int x0, [int x]) m9() => null; - List Function([List x0]) m10() => null; - List Function({List x}) m11() => null; - core.List Function(int y, {Function x}) m12() => null; - core.List Function(int x0, [List x]) m13() => null; - List Function(Function x0) m14() => null; - List Function(int x, [core.List x0]) m15() => null; - Function(int x0, {int x}) m16() => null; - Function([core.List x]) m17() => null; - void Function(int y, [int x]) m18() => null; - void Function(int x0, [List x1]) m19() => null; - void Function(int x0, {List x}) m20() => null; - List Function(A x) m21() => null; - Function(List x) m22() => null; - int Function(B x) m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int x0, {Function x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int x0, {Function x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int x0, {Function x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function({int x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function({int x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function({int x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// core.List Function({List x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function({List x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is core.List Function({List x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m2 is F2); - Expect.equals(true, m2 is F2); - Expect.equals(true, confuse(m2) is F2); - Expect.equals(true, confuse(m2) is F2); - } - } - - /// Function(int x, [core.List x2]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(int x, [core.List x2]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(int x, [core.List x2])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// core.List Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - core.List Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is core.List Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - // The static function has its T always set to int. - Expect.isTrue(f4 is F4); - Expect.isFalse(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - Expect.isFalse(confuse(f4) is F4); - if (tIsBool) { - Expect.throws(() { - x4 = (f4 as dynamic); - }); - Expect.throws(() { - x4 = confuse(f4); - }); - Expect.throws(() { - l4 = (f4 as dynamic); - }); - Expect.throws(() { - l4 = confuse(f4); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m4 is F4); - Expect.equals(true, m4 is F4); - Expect.equals(true, confuse(m4) is F4); - Expect.equals(true, confuse(m4) is F4); - } - } - - /// int Function(int y, [Function x]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int y, [Function x]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int y, [Function x]) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x1, [core.List x2]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x1, [core.List x2]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function(int x1, [core.List x2]) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function({int x}) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function({int x}) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function({int x}) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(core.List x) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(core.List x) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(core.List x) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x0, [int x]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x0, [int x]) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x0, [int x]) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function([List x1]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function([List x1]) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue( - m10 is List Function([List x1]) Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function({List x}) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function({List x}) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function({List x}) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function(int y, {Function x}) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int y, {Function x}) Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue( - m12 is core.List Function(int y, {Function x}) Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int x0, [List x]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int x0, [List x]) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue( - m13 is core.List Function(int x0, [List x]) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(Function x0) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(Function x0) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(Function x0) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x, [core.List x2]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x, [core.List x2]) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue( - m15 is List Function(int x, [core.List x2]) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x0, {int x}) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x0, {int x}) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x0, {int x}) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function([core.List x]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function([core.List x]) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function([core.List x]) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int y, [int x]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int y, [int x]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int y, [int x]) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x1, [List x2]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x1, [List x2]) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x1, [List x2]) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function(int x0, {List x}) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function(int x0, {List x}) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function(int x0, {List x}) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(A x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(A x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(A x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// Function(List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function(List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is Function(List x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// int Function(B x) Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - int Function(B x) Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is int Function(B x) Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U20().runTests(); - new U20(tIsInt: true).runTests(); - new U20(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type21_test.dart b/tests/language_2/function_type/function_type21_test.dart deleted file mode 100644 index 163cb844fb2..00000000000 --- a/tests/language_2/function_type/function_type21_test.dart +++ /dev/null @@ -1,901 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int y, {Function x}); -typedef F1 = List Function(int x0, {int x}); -typedef F2 = core.List Function(int x0, {List x}); -typedef F3 = Function({core.List x}); -typedef F4 = core.List Function(); -typedef F5 = int Function(int y, [Function x]) Function(int x); -typedef F6 = int Function(int x2, [core.List x3]) Function(int x); -typedef F7 = Function Function({int x}) Function(int x); -typedef F8 = Function Function(core.List x) Function(int x); -typedef F9 = List Function(int x1, [int x]) Function(int x); -typedef F10 = List Function([List x1]) Function(int x); -typedef F11 = List Function({List x}) Function(int x); -typedef F12 = core.List Function(int y, {Function x}) Function( - int x); -typedef F13 = core.List Function(int x1, [List x]) Function( - int x); -typedef F14 = List Function(Function x1) Function(int x); -typedef F15 = List Function(int x, [core.List x1]) Function( - int x); -typedef F16 = Function(int x1, {int x}) Function(int x); -typedef F17 = Function([core.List x]) Function(int x); -typedef F18 = void Function(int y, [int x]) Function(int x); -typedef F19 = void Function(int x2, [List x3]) Function(int x); -typedef F20 = void Function(int x1, {List x}) Function(int x); -typedef F21 = List Function(A x) Function(int x); -typedef F22 = Function(List x) Function(int x); -typedef F23 = int Function(B x) Function(int x); - -int f0(int y, {Function x}) => null; -List f1(int x0, {int x}) => null; -core.List f2(int x0, {List x}) => null; -f3({core.List x}) => null; -core.List f4() => null; -int Function(int y, [Function x]) f5(int x) => null; -int Function(int x0, [core.List x1]) f6(int x) => null; -Function Function({int x}) f7(int x) => null; -Function Function(core.List x) f8(int x) => null; -List Function(int x0, [int x]) f9(int x) => null; -List Function([List x0]) f10(int x) => null; -List Function({List x}) f11(int x) => null; -core.List Function(int y, {Function x}) f12(int x) => null; -core.List Function(int x0, [List x]) f13(int x) => null; -List Function(Function x0) f14(int x) => null; -List Function(int x, [core.List x0]) f15(int x) => null; -Function(int x0, {int x}) f16(int x) => null; -Function([core.List x]) f17(int x) => null; -void Function(int y, [int x]) f18(int x) => null; -void Function(int x0, [List x1]) f19(int x) => null; -void Function(int x0, {List x}) f20(int x) => null; -List Function(A x) f21(int x) => null; -Function(List x) f22(int x) => null; -int Function(B x) f23(int x) => null; - -class U21 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int y, {Function x}) x0; - List Function(int x0, {int x}) x1; - core.List Function(int x0, {List x}) x2; - Function({core.List x}) x3; - core.List Function() x4; - int Function(int y, [Function x]) Function(int x) x5; - int Function(int x2, [core.List x3]) Function(int x) x6; - Function Function({int x}) Function(int x) x7; - Function Function(core.List x) Function(int x) x8; - List Function(int x1, [int x]) Function(int x) x9; - List Function([List x1]) Function(int x) x10; - List Function({List x}) Function(int x) x11; - core.List Function(int y, {Function x}) Function(int x) x12; - core.List Function(int x1, [List x]) Function(int x) x13; - List Function(Function x1) Function(int x) x14; - List Function(int x, [core.List x1]) Function(int x) x15; - Function(int x1, {int x}) Function(int x) x16; - Function([core.List x]) Function(int x) x17; - void Function(int y, [int x]) Function(int x) x18; - void Function(int x2, [List x3]) Function(int x) x19; - void Function(int x1, {List x}) Function(int x) x20; - List Function(A x) Function(int x) x21; - Function(List x) Function(int x) x22; - int Function(B x) Function(int x) x23; - - U21({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int y, {Function x}) => null; - List m1(int x0, {int x}) => null; - core.List m2(int x0, {List x}) => null; - m3({core.List x}) => null; - core.List m4() => null; - int Function(int y, [Function x]) m5(int x) => null; - int Function(int x0, [core.List x1]) m6(int x) => null; - Function Function({int x}) m7(int x) => null; - Function Function(core.List x) m8(int x) => null; - List Function(int x0, [int x]) m9(int x) => null; - List Function([List x0]) m10(int x) => null; - List Function({List x}) m11(int x) => null; - core.List Function(int y, {Function x}) m12(int x) => null; - core.List Function(int x0, [List x]) m13(int x) => null; - List Function(Function x0) m14(int x) => null; - List Function(int x, [core.List x0]) m15(int x) => null; - Function(int x0, {int x}) m16(int x) => null; - Function([core.List x]) m17(int x) => null; - void Function(int y, [int x]) m18(int x) => null; - void Function(int x0, [List x1]) m19(int x) => null; - void Function(int x0, {List x}) m20(int x) => null; - List Function(A x) m21(int x) => null; - Function(List x) m22(int x) => null; - int Function(B x) m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int y, {Function x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int y, {Function x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int y, {Function x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int x0, {int x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int x0, {int x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int x0, {int x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// core.List Function(int x0, {List x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function(int x0, {List x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is core.List Function(int x0, {List x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m2 is F2); - Expect.equals(true, m2 is F2); - Expect.equals(true, confuse(m2) is F2); - Expect.equals(true, confuse(m2) is F2); - } - } - - /// Function({core.List x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function({core.List x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function({core.List x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// core.List Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - core.List Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is core.List Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int y, [Function x]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int y, [Function x]) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int y, [Function x]) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x2, [core.List x3]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x2, [core.List x3]) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function(int x2, [core.List x3]) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function({int x}) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function({int x}) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function({int x}) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(core.List x) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(core.List x) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function(core.List x) Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x1, [int x]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x1, [int x]) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is List Function(int x1, [int x]) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function([List x1]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function([List x1]) Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue( - m10 is List Function([List x1]) Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function({List x}) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function({List x}) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function({List x}) Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function(int y, {Function x}) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int y, {Function x}) Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int y, {Function x}) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int x1, [List x]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int x1, [List x]) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int x1, [List x]) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(Function x1) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(Function x1) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(Function x1) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x, [core.List x1]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x, [core.List x1]) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x, [core.List x1]) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x1, {int x}) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x1, {int x}) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x1, {int x}) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function([core.List x]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function([core.List x]) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function([core.List x]) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int y, [int x]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int y, [int x]) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int y, [int x]) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x2, [List x3]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x2, [List x3]) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function(int x2, [List x3]) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function(int x1, {List x}) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function(int x1, {List x}) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function(int x1, {List x}) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(A x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(A x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(A x) Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// Function(List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function(List x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is Function(List x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// int Function(B x) Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - int Function(B x) Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is int Function(B x) Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U21().runTests(); - new U21(tIsInt: true).runTests(); - new U21(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type22_test.dart b/tests/language_2/function_type/function_type22_test.dart deleted file mode 100644 index f4df66f10d7..00000000000 --- a/tests/language_2/function_type/function_type22_test.dart +++ /dev/null @@ -1,938 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(List x); -typedef F1 = List Function(int y, {int x}); -typedef F2 = core.List Function(int y, {List x}); -typedef F3 = Function(int x0, {core.List x}); -typedef F4 = core.List Function(A x); -typedef F5 = int Function(int y, [Function x]) - Function(); -typedef F6 = int Function(int x2, [core.List x3]) - Function(); -typedef F7 = Function Function({int x}) Function(); -typedef F8 = Function Function(core.List x) - Function(); -typedef F9 = List Function(int x1, [int x]) - Function(); -typedef F10 = List Function([List x1]) - Function(); -typedef F11 = List Function({List x}) - Function(); -typedef F12 = core.List Function(int y, {Function x}) - Function(); -typedef F13 = core.List Function(int x1, [List x]) - Function(); -typedef F14 = List Function(Function x1) Function(); -typedef F15 = List Function(int x, [core.List x1]) - Function(); -typedef F16 = Function(int x1, {int x}) Function(); -typedef F17 = Function([core.List x]) - Function(); -typedef F18 = void Function(int y, [int x]) Function(); -typedef F19 = void Function(int x2, [List x3]) - Function(); -typedef F20 = void Function(int x1, {List x}) - Function(); -typedef F21 = List Function(A x) Function(); -typedef F22 = Function(List x) Function(); -typedef F23 = Function Function(B x) Function(); - -int f0(List x) => null; -List f1(int y, {int x}) => null; -core.List f2(int y, {List x}) => null; -f3(int x0, {core.List x}) => null; -core.List f4(A x) => null; -int Function(int y, [Function x]) f5() => null; -int Function(int x0, [core.List x1]) f6() => null; -Function Function({int x}) f7() => null; -Function Function(core.List x) f8() => null; -List Function(int x0, [int x]) f9() => null; -List Function([List x0]) f10() => null; -List Function({List x}) f11() => null; -core.List Function(int y, {Function x}) f12() => - null; -core.List Function(int x0, [List x]) f13() => - null; -List Function(Function x0) f14() => null; -List Function(int x, [core.List x0]) f15() => - null; -Function(int x0, {int x}) f16() => null; -Function([core.List x]) f17() => null; -void Function(int y, [int x]) f18() => null; -void Function(int x0, [List x1]) f19() => null; -void Function(int x0, {List x}) f20() => null; -List Function(A x) f21() => null; -Function(List x) f22() => null; -Function Function(B x) f23() => null; - -class U22 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(List x) x0; - List Function(int y, {int x}) x1; - core.List Function(int y, {List x}) x2; - Function(int x0, {core.List x}) x3; - core.List Function(A x) x4; - int Function(int y, [Function x]) Function() x5; - int Function(int x2, [core.List x3]) Function() - x6; - Function Function({int x}) Function() x7; - Function Function(core.List x) Function() x8; - List Function(int x1, [int x]) Function() x9; - List Function([List x1]) Function() - x10; - List Function({List x}) Function() x11; - core.List Function(int y, {Function x}) - Function() x12; - core.List Function(int x1, [List x]) - Function() x13; - List Function(Function x1) Function() x14; - List Function(int x, [core.List x1]) - Function() x15; - Function(int x1, {int x}) Function() x16; - Function([core.List x]) Function() x17; - void Function(int y, [int x]) Function() x18; - void Function(int x2, [List x3]) Function() x19; - void Function(int x1, {List x}) Function() x20; - List Function(A x) Function() x21; - Function(List x) Function() x22; - Function Function(B x) Function() x23; - - U22({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(List x) => null; - List m1(int y, {int x}) => null; - core.List m2(int y, {List x}) => null; - m3(int x0, {core.List x}) => null; - core.List m4(A x) => null; - int Function(int y, [Function x]) m5() => null; - int Function(int x0, [core.List x1]) m6() => - null; - Function Function({int x}) m7() => null; - Function Function(core.List x) m8() => null; - List Function(int x0, [int x]) m9() => null; - List Function([List x0]) m10() => - null; - List Function({List x}) m11() => null; - core.List Function(int y, {Function x}) m12() => - null; - core.List Function(int x0, [List x]) m13() => - null; - List Function(Function x0) m14() => null; - List Function(int x, [core.List x0]) m15() => - null; - Function(int x0, {int x}) m16() => null; - Function([core.List x]) m17() => null; - void Function(int y, [int x]) m18() => null; - void Function(int x0, [List x1]) m19() => null; - void Function(int x0, {List x}) m20() => null; - List Function(A x) m21() => null; - Function(List x) m22() => null; - Function Function(B x) m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(List x) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(List x) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(List x)); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int y, {int x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int y, {int x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int y, {int x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// core.List Function(int y, {List x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function(int y, {List x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is core.List Function(int y, {List x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m2 is F2); - Expect.equals(true, m2 is F2); - Expect.equals(true, confuse(m2) is F2); - Expect.equals(true, confuse(m2) is F2); - } - } - - /// Function(int x0, {core.List x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(int x0, {core.List x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(int x0, {core.List x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// core.List Function(A x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - core.List Function(A x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is core.List Function(A x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int y, [Function x]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int y, [Function x]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function(int y, [Function x]) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x2, [core.List x3]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x2, [core.List x3]) - Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int x2, [core.List x3]) - Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function({int x}) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function({int x}) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue( - m7 is Function Function({int x}) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(core.List x) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(core.List x) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(core.List x) - Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x1, [int x]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x1, [int x]) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x1, [int x]) - Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function([List x1]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function([List x1]) Function() - l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function([List x1]) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function({List x}) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function({List x}) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function({List x}) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function(int y, {Function x}) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int y, {Function x}) - Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int y, {Function x}) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int x1, [List x]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int x1, [List x]) - Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int x1, [List x]) - Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(Function x1) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(Function x1) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function(Function x1) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x, [core.List x1]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x, [core.List x1]) - Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x, [core.List x1]) - Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x1, {int x}) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x1, {int x}) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function(int x1, {int x}) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function([core.List x]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function([core.List x]) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function([core.List x]) - Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int y, [int x]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int y, [int x]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue( - m18 is void Function(int y, [int x]) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x2, [List x3]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x2, [List x3]) Function() - l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x2, [List x3]) - Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function(int x1, {List x}) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function(int x1, {List x}) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function(int x1, {List x}) - Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(A x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(A x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is List Function(A x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// Function(List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function(List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is Function(List x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// Function Function(B x) Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - Function Function(B x) Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is Function Function(B x) Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U22().runTests(); - new U22(tIsInt: true).runTests(); - new U22(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type23_test.dart b/tests/language_2/function_type/function_type23_test.dart deleted file mode 100644 index 9d8ea27511a..00000000000 --- a/tests/language_2/function_type/function_type23_test.dart +++ /dev/null @@ -1,937 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function([List x]); -typedef F1 = List Function(Function x); -typedef F2 = core.List Function(); -typedef F3 = Function(int y, {core.List x}); -typedef F4 = core.List Function(List x); -typedef F5 = int Function(int y, [Function x]) Function( - int x); -typedef F6 = int Function(int x2, [core.List x3]) - Function(int x); -typedef F7 = Function Function({int x}) Function(int x); -typedef F8 = Function Function(core.List x) - Function(int x); -typedef F9 = List Function(int x1, [int x]) - Function(int x); -typedef F10 = List Function([List x1]) - Function(int x); -typedef F11 = List Function({List x}) - Function(int x); -typedef F12 = core.List Function(int y, {Function x}) - Function(int x); -typedef F13 = core.List Function(int x1, [List x]) - Function(int x); -typedef F14 = List Function(Function x1) Function( - int x); -typedef F15 = List Function(int x, [core.List x1]) - Function(int x); -typedef F16 = Function(int x1, {int x}) Function(int x); -typedef F17 = Function([core.List x]) Function( - int x); -typedef F18 = void Function(int y, [int x]) Function( - int x); -typedef F19 = void Function(int x2, [List x3]) - Function(int x); -typedef F20 = void Function(int x1, {List x}) - Function(int x); -typedef F21 = List Function(A x) Function( - int x); -typedef F22 = Function(List x) Function(int x); -typedef F23 = Function Function(B x) Function(int x); - -int f0([List x]) => null; -List f1(Function x) => null; -core.List f2() => null; -f3(int y, {core.List x}) => null; -core.List f4(List x) => null; -int Function(int y, [Function x]) f5(int x) => null; -int Function(int x0, [core.List x1]) f6(int x) => - null; -Function Function({int x}) f7(int x) => null; -Function Function(core.List x) f8(int x) => null; -List Function(int x0, [int x]) f9(int x) => null; -List Function([List x0]) f10(int x) => - null; -List Function({List x}) f11(int x) => null; -core.List Function(int y, {Function x}) f12( - int x) => - null; -core.List Function(int x0, [List x]) f13( - int x) => - null; -List Function(Function x0) f14(int x) => null; -List Function(int x, [core.List x0]) f15( - int x) => - null; -Function(int x0, {int x}) f16(int x) => null; -Function([core.List x]) f17(int x) => null; -void Function(int y, [int x]) f18(int x) => null; -void Function(int x0, [List x1]) f19(int x) => - null; -void Function(int x0, {List x}) f20(int x) => null; -List Function(A x) f21(int x) => null; -Function(List x) f22(int x) => null; -Function Function(B x) f23(int x) => null; - -class U23 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function([List x]) x0; - List Function(Function x) x1; - core.List Function() x2; - Function(int y, {core.List x}) x3; - core.List Function(List x) x4; - int Function(int y, [Function x]) Function(int x) x5; - int Function(int x2, [core.List x3]) Function( - int x) x6; - Function Function({int x}) Function(int x) x7; - Function Function(core.List x) Function(int x) - x8; - List Function(int x1, [int x]) Function(int x) - x9; - List Function([List x1]) Function( - int x) x10; - List Function({List x}) Function(int x) x11; - core.List Function(int y, {Function x}) - Function(int x) x12; - core.List Function(int x1, [List x]) - Function(int x) x13; - List Function(Function x1) Function(int x) x14; - List Function(int x, [core.List x1]) - Function(int x) x15; - Function(int x1, {int x}) Function(int x) x16; - Function([core.List x]) Function(int x) x17; - void Function(int y, [int x]) Function(int x) x18; - void Function(int x2, [List x3]) Function(int x) - x19; - void Function(int x1, {List x}) Function(int x) x20; - List Function(A x) Function(int x) x21; - Function(List x) Function(int x) x22; - Function Function(B x) Function(int x) x23; - - U23({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0([List x]) => null; - List m1(Function x) => null; - core.List m2() => null; - m3(int y, {core.List x}) => null; - core.List m4(List x) => null; - int Function(int y, [Function x]) m5(int x) => null; - int Function(int x0, [core.List x1]) m6( - int x) => - null; - Function Function({int x}) m7(int x) => null; - Function Function(core.List x) m8(int x) => - null; - List Function(int x0, [int x]) m9(int x) => - null; - List Function([List x0]) m10(int x) => - null; - List Function({List x}) m11(int x) => null; - core.List Function(int y, {Function x}) m12( - int x) => - null; - core.List Function(int x0, [List x]) m13( - int x) => - null; - List Function(Function x0) m14(int x) => null; - List Function(int x, [core.List x0]) m15( - int x) => - null; - Function(int x0, {int x}) m16(int x) => null; - Function([core.List x]) m17(int x) => null; - void Function(int y, [int x]) m18(int x) => null; - void Function(int x0, [List x1]) m19(int x) => - null; - void Function(int x0, {List x}) m20(int x) => null; - List Function(A x) m21(int x) => null; - Function(List x) m22(int x) => null; - Function Function(B x) m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function([List x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function([List x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function([List x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(Function x) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(Function x) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(Function x)); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// core.List Function() - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function() l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is core.List Function()); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// Function(int y, {core.List x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(int y, {core.List x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(int y, {core.List x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// core.List Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - core.List Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is core.List Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int y, [Function x]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int y, [Function x]) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int y, [Function x]) - Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x2, [core.List x3]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x2, [core.List x3]) Function( - int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int x2, [core.List x3]) - Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function({int x}) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function({int x}) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue( - m7 is Function Function({int x}) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(core.List x) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(core.List x) Function(int x) - l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(core.List x) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x1, [int x]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x1, [int x]) Function(int x) - l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x1, [int x]) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function([List x1]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function([List x1]) Function( - int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function([List x1]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function({List x}) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function({List x}) Function(int x) - l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function({List x}) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function(int y, {Function x}) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int y, {Function x}) - Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int y, {Function x}) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int x1, [List x]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int x1, [List x]) - Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int x1, [List x]) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(Function x1) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(Function x1) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(Function x1) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x, [core.List x1]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x, [core.List x1]) - Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x, [core.List x1]) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x1, {int x}) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x1, {int x}) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function(int x1, {int x}) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function([core.List x]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function([core.List x]) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function([core.List x]) - Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int y, [int x]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int y, [int x]) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int y, [int x]) - Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x2, [List x3]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x2, [List x3]) Function( - int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x2, [List x3]) - Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function(int x1, {List x}) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function(int x1, {List x}) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function(int x1, {List x}) - Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(A x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(A x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(A x) - Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// Function(List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function(List x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is Function(List x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// Function Function(B x) Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - Function Function(B x) Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue( - m23 is Function Function(B x) Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U23().runTests(); - new U23(tIsInt: true).runTests(); - new U23(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type24_test.dart b/tests/language_2/function_type/function_type24_test.dart deleted file mode 100644 index 458c3c5d0e0..00000000000 --- a/tests/language_2/function_type/function_type24_test.dart +++ /dev/null @@ -1,947 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int x0, [List x]); -typedef F1 = List Function([Function x]); -typedef F2 = List Function(int x); -typedef F3 = Function(List x); -typedef F4 = List Function(int x); -typedef F5 = int Function(Function x0) Function(); -typedef F6 = int Function(int x, [core.List x2]) Function(); -typedef F7 = Function Function(int x0, {int x}) Function(); -typedef F8 = Function Function([core.List x]) Function(); -typedef F9 = List Function(int y, [int x]) Function(); -typedef F10 = List Function(int x1, [List x2]) - Function(); -typedef F11 = List Function(int x0, {List x}) Function(); -typedef F12 = core.List Function(List x) Function(); -typedef F13 = core.List Function(int y, [List x]) Function(); -typedef F14 = List Function([Function x1]) Function(); -typedef F15 = List Function({core.List x}) Function(); -typedef F16 = Function(int y, {int x}) Function(); -typedef F17 = Function(int x0, [core.List x]) Function(); -typedef F18 = void Function(int x0) Function(); -typedef F19 = void Function(int x, [List x2]) Function(); -typedef F20 = void Function(int y, {List x}) Function(); -typedef F21 = List Function(List x) Function(); -typedef F22 = A Function(int x) Function(); -typedef F23 = List Function(B x) Function(); - -int f0(int x0, [List x]) => null; -List f1([Function x]) => null; -List f2(int x) => null; -f3(List x) => null; -List f4(int x) => null; -int Function(Function x0) f5() => null; -int Function(int x, [core.List x0]) f6() => null; -Function Function(int x0, {int x}) f7() => null; -Function Function([core.List x]) f8() => null; -List Function(int y, [int x]) f9() => null; -List Function(int x0, [List x1]) f10() => null; -List Function(int x0, {List x}) f11() => null; -core.List Function(List x) f12() => null; -core.List Function(int y, [List x]) f13() => null; -List Function([Function x0]) f14() => null; -List Function({core.List x}) f15() => null; -Function(int y, {int x}) f16() => null; -Function(int x0, [core.List x]) f17() => null; -void Function(int x0) f18() => null; -void Function(int x, [List x0]) f19() => null; -void Function(int y, {List x}) f20() => null; -List Function(List x) f21() => null; -A Function(int x) f22() => null; -List Function(B x) f23() => null; - -class U24 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int x0, [List x]) x0; - List Function([Function x]) x1; - List Function(int x) x2; - Function(List x) x3; - List Function(int x) x4; - int Function(Function x0) Function() x5; - int Function(int x, [core.List x2]) Function() x6; - Function Function(int x0, {int x}) Function() x7; - Function Function([core.List x]) Function() x8; - List Function(int y, [int x]) Function() x9; - List Function(int x1, [List x2]) Function() x10; - List Function(int x0, {List x}) Function() x11; - core.List Function(List x) Function() x12; - core.List Function(int y, [List x]) Function() x13; - List Function([Function x1]) Function() x14; - List Function({core.List x}) Function() x15; - Function(int y, {int x}) Function() x16; - Function(int x0, [core.List x]) Function() x17; - void Function(int x0) Function() x18; - void Function(int x, [List x2]) Function() x19; - void Function(int y, {List x}) Function() x20; - List Function(List x) Function() x21; - A Function(int x) Function() x22; - List Function(B x) Function() x23; - - U24({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int x0, [List x]) => null; - List m1([Function x]) => null; - List m2(int x) => null; - m3(List x) => null; - List m4(int x) => null; - int Function(Function x0) m5() => null; - int Function(int x, [core.List x0]) m6() => null; - Function Function(int x0, {int x}) m7() => null; - Function Function([core.List x]) m8() => null; - List Function(int y, [int x]) m9() => null; - List Function(int x0, [List x1]) m10() => null; - List Function(int x0, {List x}) m11() => null; - core.List Function(List x) m12() => null; - core.List Function(int y, [List x]) m13() => null; - List Function([Function x0]) m14() => null; - List Function({core.List x}) m15() => null; - Function(int y, {int x}) m16() => null; - Function(int x0, [core.List x]) m17() => null; - void Function(int x0) m18() => null; - void Function(int x, [List x0]) m19() => null; - void Function(int y, {List x}) m20() => null; - List Function(List x) m21() => null; - A Function(int x) m22() => null; - List Function(B x) m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int x0, [List x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int x0, [List x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int x0, [List x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function([Function x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function([Function x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function([Function x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int x) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int x) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int x)); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// Function(List x) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(List x) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(List x)); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - // The static function has its T always set to int. - Expect.isTrue(f3 is F3); - Expect.isFalse(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - Expect.isFalse(confuse(f3) is F3); - if (tIsBool) { - Expect.throws(() { - x3 = (f3 as dynamic); - }); - Expect.throws(() { - x3 = confuse(f3); - }); - Expect.throws(() { - l3 = (f3 as dynamic); - }); - Expect.throws(() { - l3 = confuse(f3); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m3 is F3); - Expect.equals(true, m3 is F3); - Expect.equals(true, confuse(m3) is F3); - Expect.equals(true, confuse(m3) is F3); - } - } - - /// List Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - // The static function has its T always set to int. - Expect.isTrue(f4 is F4); - Expect.isFalse(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - Expect.isFalse(confuse(f4) is F4); - if (tIsBool) { - Expect.throws(() { - x4 = (f4 as dynamic); - }); - Expect.throws(() { - x4 = confuse(f4); - }); - Expect.throws(() { - l4 = (f4 as dynamic); - }); - Expect.throws(() { - l4 = confuse(f4); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m4 is F4); - Expect.equals(tIsBool, m4 is F4); - Expect.equals(tIsInt, confuse(m4) is F4); - Expect.equals(tIsBool, confuse(m4) is F4); - } - } - - /// int Function(Function x0) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(Function x0) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(Function x0) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x, [core.List x2]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x, [core.List x2]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function(int x, [core.List x2]) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int x0, {int x}) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x0, {int x}) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x0, {int x}) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function([core.List x]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function([core.List x]) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function([core.List x]) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int y, [int x]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int y, [int x]) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int y, [int x]) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x1, [List x2]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x1, [List x2]) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue( - m10 is List Function(int x1, [List x2]) Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(int x0, {List x}) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(int x0, {List x}) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is List Function(int x0, {List x}) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function(List x) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(List x) Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue( - m12 is core.List Function(List x) Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int y, [List x]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int y, [List x]) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue( - m13 is core.List Function(int y, [List x]) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function([Function x1]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function([Function x1]) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function([Function x1]) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function({core.List x}) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function({core.List x}) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function({core.List x}) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int y, {int x}) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int y, {int x}) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int y, {int x}) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x0, [core.List x]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x0, [core.List x]) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x0, [core.List x]) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x0) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x0) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x0) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x, [List x2]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x, [List x2]) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x, [List x2]) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function(int y, {List x}) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function(int y, {List x}) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function(int y, {List x}) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(List x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(int x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(int x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is A Function(int x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// List Function(B x) Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - List Function(B x) Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue( - m23 is List Function(B x) Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U24().runTests(); - new U24(tIsInt: true).runTests(); - new U24(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type25_test.dart b/tests/language_2/function_type/function_type25_test.dart deleted file mode 100644 index 567f2aa6833..00000000000 --- a/tests/language_2/function_type/function_type25_test.dart +++ /dev/null @@ -1,954 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int y, [List x]); -typedef F1 = List Function(int x0, [Function x]); -typedef F2 = List Function([int x]); -typedef F3 = Function([List x]); -typedef F4 = List Function(Function x); -typedef F5 = int Function(Function x1) Function(int x); -typedef F6 = int Function(int x, [core.List x1]) Function(int x); -typedef F7 = Function Function(int x1, {int x}) Function(int x); -typedef F8 = Function Function([core.List x]) Function(int x); -typedef F9 = List Function(int y, [int x]) Function(int x); -typedef F10 = List Function(int x2, [List x3]) Function( - int x); -typedef F11 = List Function(int x1, {List x}) Function(int x); -typedef F12 = core.List Function(List x) Function(int x); -typedef F13 = core.List Function(int y, [List x]) Function( - int x); -typedef F14 = List Function([Function x1]) Function(int x); -typedef F15 = List Function({core.List x}) Function(int x); -typedef F16 = Function(int y, {int x}) Function(int x); -typedef F17 = Function(int x1, [core.List x]) Function(int x); -typedef F18 = void Function(int x1) Function(int x); -typedef F19 = void Function(int x, [List x1]) Function(int x); -typedef F20 = void Function(int y, {List x}) Function(int x); -typedef F21 = List Function(List x) Function(int x); -typedef F22 = A Function(int x) Function(int x); -typedef F23 = List Function(B x) Function( - int x); - -int f0(int y, [List x]) => null; -List f1(int x0, [Function x]) => null; -List f2([int x]) => null; -f3([List x]) => null; -List f4(Function x) => null; -int Function(Function x0) f5(int x) => null; -int Function(int x, [core.List x0]) f6(int x) => null; -Function Function(int x0, {int x}) f7(int x) => null; -Function Function([core.List x]) f8(int x) => null; -List Function(int y, [int x]) f9(int x) => null; -List Function(int x0, [List x1]) f10(int x) => null; -List Function(int x0, {List x}) f11(int x) => null; -core.List Function(List x) f12(int x) => null; -core.List Function(int y, [List x]) f13(int x) => null; -List Function([Function x0]) f14(int x) => null; -List Function({core.List x}) f15(int x) => null; -Function(int y, {int x}) f16(int x) => null; -Function(int x0, [core.List x]) f17(int x) => null; -void Function(int x0) f18(int x) => null; -void Function(int x, [List x0]) f19(int x) => null; -void Function(int y, {List x}) f20(int x) => null; -List Function(List x) f21(int x) => null; -A Function(int x) f22(int x) => null; -List Function(B x) f23(int x) => null; - -class U25 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int y, [List x]) x0; - List Function(int x0, [Function x]) x1; - List Function([int x]) x2; - Function([List x]) x3; - List Function(Function x) x4; - int Function(Function x1) Function(int x) x5; - int Function(int x, [core.List x1]) Function(int x) x6; - Function Function(int x1, {int x}) Function(int x) x7; - Function Function([core.List x]) Function(int x) x8; - List Function(int y, [int x]) Function(int x) x9; - List Function(int x2, [List x3]) Function(int x) x10; - List Function(int x1, {List x}) Function(int x) x11; - core.List Function(List x) Function(int x) x12; - core.List Function(int y, [List x]) Function(int x) x13; - List Function([Function x1]) Function(int x) x14; - List Function({core.List x}) Function(int x) x15; - Function(int y, {int x}) Function(int x) x16; - Function(int x1, [core.List x]) Function(int x) x17; - void Function(int x1) Function(int x) x18; - void Function(int x, [List x1]) Function(int x) x19; - void Function(int y, {List x}) Function(int x) x20; - List Function(List x) Function(int x) x21; - A Function(int x) Function(int x) x22; - List Function(B x) Function(int x) x23; - - U25({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int y, [List x]) => null; - List m1(int x0, [Function x]) => null; - List m2([int x]) => null; - m3([List x]) => null; - List m4(Function x) => null; - int Function(Function x0) m5(int x) => null; - int Function(int x, [core.List x0]) m6(int x) => null; - Function Function(int x0, {int x}) m7(int x) => null; - Function Function([core.List x]) m8(int x) => null; - List Function(int y, [int x]) m9(int x) => null; - List Function(int x0, [List x1]) m10(int x) => null; - List Function(int x0, {List x}) m11(int x) => null; - core.List Function(List x) m12(int x) => null; - core.List Function(int y, [List x]) m13(int x) => null; - List Function([Function x0]) m14(int x) => null; - List Function({core.List x}) m15(int x) => null; - Function(int y, {int x}) m16(int x) => null; - Function(int x0, [core.List x]) m17(int x) => null; - void Function(int x0) m18(int x) => null; - void Function(int x, [List x0]) m19(int x) => null; - void Function(int y, {List x}) m20(int x) => null; - List Function(List x) m21(int x) => null; - A Function(int x) m22(int x) => null; - List Function(B x) m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int y, [List x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int y, [List x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int y, [List x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int x0, [Function x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int x0, [Function x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int x0, [Function x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function([int x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function([int x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function([int x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// Function([List x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function([List x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function([List x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - // The static function has its T always set to int. - Expect.isTrue(f3 is F3); - Expect.isFalse(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - Expect.isFalse(confuse(f3) is F3); - if (tIsBool) { - Expect.throws(() { - x3 = (f3 as dynamic); - }); - Expect.throws(() { - x3 = confuse(f3); - }); - Expect.throws(() { - l3 = (f3 as dynamic); - }); - Expect.throws(() { - l3 = confuse(f3); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m3 is F3); - Expect.equals(true, m3 is F3); - Expect.equals(true, confuse(m3) is F3); - Expect.equals(true, confuse(m3) is F3); - } - } - - /// List Function(Function x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function(Function x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function(Function x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - // The static function has its T always set to int. - Expect.isTrue(f4 is F4); - Expect.isFalse(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - Expect.isFalse(confuse(f4) is F4); - if (tIsBool) { - Expect.throws(() { - x4 = (f4 as dynamic); - }); - Expect.throws(() { - x4 = confuse(f4); - }); - Expect.throws(() { - l4 = (f4 as dynamic); - }); - Expect.throws(() { - l4 = confuse(f4); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m4 is F4); - Expect.equals(tIsBool, m4 is F4); - Expect.equals(tIsInt, confuse(m4) is F4); - Expect.equals(tIsBool, confuse(m4) is F4); - } - } - - /// int Function(Function x1) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(Function x1) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(Function x1) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x, [core.List x1]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x, [core.List x1]) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function(int x, [core.List x1]) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int x1, {int x}) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x1, {int x}) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x1, {int x}) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function([core.List x]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function([core.List x]) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function([core.List x]) Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int y, [int x]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int y, [int x]) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is List Function(int y, [int x]) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x2, [List x3]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x2, [List x3]) Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x2, [List x3]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(int x1, {List x}) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(int x1, {List x}) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is List Function(int x1, {List x}) Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function(List x) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(List x) Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue( - m12 is core.List Function(List x) Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int y, [List x]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int y, [List x]) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int y, [List x]) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function([Function x1]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function([Function x1]) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function([Function x1]) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function({core.List x}) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function({core.List x}) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue( - m15 is List Function({core.List x}) Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int y, {int x}) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int y, {int x}) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int y, {int x}) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x1, [core.List x]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x1, [core.List x]) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue( - m17 is Function(int x1, [core.List x]) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x1) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x1) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x1) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x, [List x1]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x, [List x1]) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function(int x, [List x1]) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function(int y, {List x}) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function(int y, {List x}) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function(int y, {List x}) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(List x) Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(int x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(int x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is A Function(int x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// List Function(B x) Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - List Function(B x) Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is List Function(B x) - Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U25().runTests(); - new U25(tIsInt: true).runTests(); - new U25(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type26_test.dart b/tests/language_2/function_type/function_type26_test.dart deleted file mode 100644 index 8c5f5cecb8a..00000000000 --- a/tests/language_2/function_type/function_type26_test.dart +++ /dev/null @@ -1,994 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(List x0); -typedef F1 = List Function(int y, [Function x]); -typedef F2 = List Function(int x0, [int x]); -typedef F3 = Function(int x0, [List x]); -typedef F4 = List Function(List x); -typedef F5 = int Function(Function x1) Function(); -typedef F6 = int Function(int x, [core.List x1]) - Function(); -typedef F7 = Function Function(int x1, {int x}) - Function(); -typedef F8 = Function Function([core.List x]) - Function(); -typedef F9 = List Function(int y, [int x]) - Function(); -typedef F10 = List Function(int x2, [List x3]) - Function(); -typedef F11 = List Function(int x1, {List x}) - Function(); -typedef F12 = core.List Function(List x) - Function(); -typedef F13 = core.List Function(int y, [List x]) - Function(); -typedef F14 = List Function([Function x1]) Function(); -typedef F15 = List Function({core.List x}) - Function(); -typedef F16 = Function(int y, {int x}) Function(); -typedef F17 = Function(int x1, [core.List x]) - Function(); -typedef F18 = void Function(int x1) Function(); -typedef F19 = void Function(int x, [List x1]) - Function(); -typedef F20 = void Function(int y, {List x}) - Function(); -typedef F21 = List Function(List x) - Function(); -typedef F22 = A Function(int x) Function(); -typedef F23 = core.List Function(B x) - Function(); - -int f0(List x0) => null; -List f1(int y, [Function x]) => null; -List f2(int x0, [int x]) => null; -f3(int x0, [List x]) => null; -List f4(List x) => null; -int Function(Function x0) f5() => null; -int Function(int x, [core.List x0]) f6() => null; -Function Function(int x0, {int x}) f7() => null; -Function Function([core.List x]) f8() => null; -List Function(int y, [int x]) f9() => null; -List Function(int x0, [List x1]) - f10() => null; -List Function(int x0, {List x}) f11() => - null; -core.List Function(List x) f12() => - null; -core.List Function(int y, [List x]) f13() => - null; -List Function([Function x0]) f14() => null; -List Function({core.List x}) f15() => null; -Function(int y, {int x}) f16() => null; -Function(int x0, [core.List x]) f17() => null; -void Function(int x0) f18() => null; -void Function(int x, [List x0]) f19() => null; -void Function(int y, {List x}) f20() => null; -List Function(List x) f21() => null; -A Function(int x) f22() => null; -core.List Function(B x) f23() => null; - -class U26 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(List x0) x0; - List Function(int y, [Function x]) x1; - List Function(int x0, [int x]) x2; - Function(int x0, [List x]) x3; - List Function(List x) x4; - int Function(Function x1) Function() x5; - int Function(int x, [core.List x1]) Function() - x6; - Function Function(int x1, {int x}) Function() x7; - Function Function([core.List x]) Function() x8; - List Function(int y, [int x]) Function() x9; - List Function(int x2, [List x3]) - Function() x10; - List Function(int x1, {List x}) Function() - x11; - core.List Function(List x) Function() - x12; - core.List Function(int y, [List x]) - Function() x13; - List Function([Function x1]) Function() x14; - List Function({core.List x}) Function() x15; - Function(int y, {int x}) Function() x16; - Function(int x1, [core.List x]) Function() x17; - void Function(int x1) Function() x18; - void Function(int x, [List x1]) Function() x19; - void Function(int y, {List x}) Function() x20; - List Function(List x) Function() x21; - A Function(int x) Function() x22; - core.List Function(B x) Function() x23; - - U26({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(List x0) => null; - List m1(int y, [Function x]) => null; - List m2(int x0, [int x]) => null; - m3(int x0, [List x]) => null; - List m4(List x) => null; - int Function(Function x0) m5() => null; - int Function(int x, [core.List x0]) m6() => - null; - Function Function(int x0, {int x}) m7() => null; - Function Function([core.List x]) m8() => null; - List Function(int y, [int x]) m9() => null; - List Function(int x0, [List x1]) - m10() => null; - List Function(int x0, {List x}) m11() => - null; - core.List Function(List x) m12() => - null; - core.List Function(int y, [List x]) m13() => - null; - List Function([Function x0]) m14() => null; - List Function({core.List x}) m15() => null; - Function(int y, {int x}) m16() => null; - Function(int x0, [core.List x]) m17() => null; - void Function(int x0) m18() => null; - void Function(int x, [List x0]) m19() => null; - void Function(int y, {List x}) m20() => null; - List Function(List x) m21() => null; - A Function(int x) m22() => null; - core.List Function(B x) m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(List x0) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(List x0) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(List x0)); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int y, [Function x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int y, [Function x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int y, [Function x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int x0, [int x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int x0, [int x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int x0, [int x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// Function(int x0, [List x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(int x0, [List x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(int x0, [List x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - // The static function has its T always set to int. - Expect.isTrue(f3 is F3); - Expect.isFalse(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - Expect.isFalse(confuse(f3) is F3); - if (tIsBool) { - Expect.throws(() { - x3 = (f3 as dynamic); - }); - Expect.throws(() { - x3 = confuse(f3); - }); - Expect.throws(() { - l3 = (f3 as dynamic); - }); - Expect.throws(() { - l3 = confuse(f3); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m3 is F3); - Expect.equals(true, m3 is F3); - Expect.equals(true, confuse(m3) is F3); - Expect.equals(true, confuse(m3) is F3); - } - } - - /// List Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - // The static function has its T always set to int. - Expect.isTrue(f4 is F4); - Expect.isFalse(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - Expect.isFalse(confuse(f4) is F4); - if (tIsBool) { - Expect.throws(() { - x4 = (f4 as dynamic); - }); - Expect.throws(() { - x4 = confuse(f4); - }); - Expect.throws(() { - l4 = (f4 as dynamic); - }); - Expect.throws(() { - l4 = confuse(f4); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m4 is F4); - Expect.equals(tIsBool, m4 is F4); - Expect.equals(tIsInt, confuse(m4) is F4); - Expect.equals(tIsBool, confuse(m4) is F4); - } - } - - /// int Function(Function x1) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(Function x1) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function(Function x1) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x, [core.List x1]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x, [core.List x1]) Function() - l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int x, [core.List x1]) - Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int x1, {int x}) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x1, {int x}) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x1, {int x}) - Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function([core.List x]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function([core.List x]) Function() - l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function([core.List x]) - Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int y, [int x]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int y, [int x]) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int y, [int x]) - Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x2, [List x3]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x2, [List x3]) - Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x2, [List x3]) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(int x1, {List x}) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(int x1, {List x}) Function() - l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function(int x1, {List x}) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function(List x) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(List x) - Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(List x) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int y, [List x]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int y, [List x]) - Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int y, [List x]) - Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function([Function x1]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function([Function x1]) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function([Function x1]) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function({core.List x}) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function({core.List x}) Function() - l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function({core.List x}) - Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int y, {int x}) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int y, {int x}) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function(int y, {int x}) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x1, [core.List x]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x1, [core.List x]) Function() - l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x1, [core.List x]) - Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x1) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x1) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x1) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x, [List x1]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x, [List x1]) Function() - l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x, [List x1]) - Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function(int y, {List x}) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function(int y, {List x}) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function(int y, {List x}) - Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(List x) - Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(int x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(int x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is A Function(int x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// core.List Function(B x) Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - core.List Function(B x) Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is core.List Function(B x) - Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U26().runTests(); - new U26(tIsInt: true).runTests(); - new U26(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type27_test.dart b/tests/language_2/function_type/function_type27_test.dart deleted file mode 100644 index ef6da7fb7b4..00000000000 --- a/tests/language_2/function_type/function_type27_test.dart +++ /dev/null @@ -1,1018 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function([List x1]); -typedef F1 = List Function(Function x0); -typedef F2 = List Function(int y, [int x]); -typedef F3 = Function(int y, [List x]); -typedef F4 = List Function(core.List x); -typedef F5 = int Function(Function x1) Function(int x); -typedef F6 = int Function(int x, [core.List x1]) - Function(int x); -typedef F7 = Function Function(int x1, {int x}) Function( - int x); -typedef F8 = Function Function([core.List x]) - Function(int x); -typedef F9 = List Function(int y, [int x]) - Function(int x); -typedef F10 = List Function(int x2, [List x3]) - Function(int x); -typedef F11 = List Function(int x1, {List x}) - Function(int x); -typedef F12 = core.List Function(List x) - Function(int x); -typedef F13 = core.List Function(int y, [List x]) - Function(int x); -typedef F14 = List Function([Function x1]) Function( - int x); -typedef F15 = List Function({core.List x}) - Function(int x); -typedef F16 = Function(int y, {int x}) Function(int x); -typedef F17 = Function(int x1, [core.List x]) - Function(int x); -typedef F18 = void Function(int x1) Function(int x); -typedef F19 = void Function(int x, [List x1]) - Function(int x); -typedef F20 = void Function(int y, {List x}) Function( - int x); -typedef F21 = List Function(List x) - Function(int x); -typedef F22 = A Function(int x) Function(int x); -typedef F23 = core.List Function(B x) Function( - int x); - -int f0([List x0]) => null; -List f1(Function x0) => null; -List f2(int y, [int x]) => null; -f3(int y, [List x]) => null; -List f4(core.List x) => null; -int Function(Function x0) f5(int x) => null; -int Function(int x, [core.List x0]) f6(int x) => - null; -Function Function(int x0, {int x}) f7(int x) => null; -Function Function([core.List x]) f8(int x) => - null; -List Function(int y, [int x]) f9(int x) => null; -List Function(int x0, [List x1]) f10( - int x) => - null; -List Function(int x0, {List x}) f11(int x) => - null; -core.List Function(List x) f12(int x) => - null; -core.List Function(int y, [List x]) f13( - int x) => - null; -List Function([Function x0]) f14(int x) => null; -List Function({core.List x}) f15(int x) => - null; -Function(int y, {int x}) f16(int x) => null; -Function(int x0, [core.List x]) f17(int x) => - null; -void Function(int x0) f18(int x) => null; -void Function(int x, [List x0]) f19(int x) => - null; -void Function(int y, {List x}) f20(int x) => null; -List Function(List x) f21(int x) => null; -A Function(int x) f22(int x) => null; -core.List Function(B x) f23(int x) => null; - -class U27 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function([List x1]) x0; - List Function(Function x0) x1; - List Function(int y, [int x]) x2; - Function(int y, [List x]) x3; - List Function(core.List x) x4; - int Function(Function x1) Function(int x) x5; - int Function(int x, [core.List x1]) Function( - int x) x6; - Function Function(int x1, {int x}) Function(int x) x7; - Function Function([core.List x]) Function(int x) - x8; - List Function(int y, [int x]) Function(int x) - x9; - List Function(int x2, [List x3]) - Function(int x) x10; - List Function(int x1, {List x}) Function( - int x) x11; - core.List Function(List x) Function( - int x) x12; - core.List Function(int y, [List x]) Function( - int x) x13; - List Function([Function x1]) Function(int x) x14; - List Function({core.List x}) Function(int x) - x15; - Function(int y, {int x}) Function(int x) x16; - Function(int x1, [core.List x]) Function(int x) - x17; - void Function(int x1) Function(int x) x18; - void Function(int x, [List x1]) Function(int x) - x19; - void Function(int y, {List x}) Function(int x) x20; - List Function(List x) Function(int x) x21; - A Function(int x) Function(int x) x22; - core.List Function(B x) Function(int x) x23; - - U27({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0([List x0]) => null; - List m1(Function x0) => null; - List m2(int y, [int x]) => null; - m3(int y, [List x]) => null; - List m4(core.List x) => null; - int Function(Function x0) m5(int x) => null; - int Function(int x, [core.List x0]) m6(int x) => - null; - Function Function(int x0, {int x}) m7(int x) => null; - Function Function([core.List x]) m8(int x) => - null; - List Function(int y, [int x]) m9(int x) => null; - List Function(int x0, [List x1]) m10( - int x) => - null; - List Function(int x0, {List x}) m11(int x) => - null; - core.List Function(List x) m12( - int x) => - null; - core.List Function(int y, [List x]) m13( - int x) => - null; - List Function([Function x0]) m14(int x) => null; - List Function({core.List x}) m15(int x) => - null; - Function(int y, {int x}) m16(int x) => null; - Function(int x0, [core.List x]) m17(int x) => - null; - void Function(int x0) m18(int x) => null; - void Function(int x, [List x0]) m19(int x) => - null; - void Function(int y, {List x}) m20(int x) => null; - List Function(List x) m21(int x) => null; - A Function(int x) m22(int x) => null; - core.List Function(B x) m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function([List x1]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function([List x1]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function([List x1])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(Function x0) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(Function x0) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(Function x0)); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int y, [int x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int y, [int x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int y, [int x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// Function(int y, [List x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(int y, [List x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(int y, [List x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - // The static function has its T always set to int. - Expect.isTrue(f3 is F3); - Expect.isFalse(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - Expect.isFalse(confuse(f3) is F3); - if (tIsBool) { - Expect.throws(() { - x3 = (f3 as dynamic); - }); - Expect.throws(() { - x3 = confuse(f3); - }); - Expect.throws(() { - l3 = (f3 as dynamic); - }); - Expect.throws(() { - l3 = confuse(f3); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m3 is F3); - Expect.equals(true, m3 is F3); - Expect.equals(true, confuse(m3) is F3); - Expect.equals(true, confuse(m3) is F3); - } - } - - /// List Function(core.List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function(core.List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function(core.List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - // The static function has its T always set to int. - Expect.isTrue(f4 is F4); - Expect.isFalse(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - Expect.isFalse(confuse(f4) is F4); - if (tIsBool) { - Expect.throws(() { - x4 = (f4 as dynamic); - }); - Expect.throws(() { - x4 = confuse(f4); - }); - Expect.throws(() { - l4 = (f4 as dynamic); - }); - Expect.throws(() { - l4 = confuse(f4); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m4 is F4); - Expect.equals(tIsBool, m4 is F4); - Expect.equals(tIsInt, confuse(m4) is F4); - Expect.equals(tIsBool, confuse(m4) is F4); - } - } - - /// int Function(Function x1) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(Function x1) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function(Function x1) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x, [core.List x1]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x, [core.List x1]) Function( - int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int x, [core.List x1]) - Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int x1, {int x}) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x1, {int x}) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x1, {int x}) - Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function([core.List x]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function([core.List x]) Function( - int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function([core.List x]) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int y, [int x]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int y, [int x]) Function(int x) - l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int y, [int x]) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x2, [List x3]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x2, [List x3]) - Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x2, [List x3]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(int x1, {List x}) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(int x1, {List x}) Function( - int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function(int x1, {List x}) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function(List x) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(List x) Function( - int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(List x) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int y, [List x]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int y, [List x]) - Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int y, [List x]) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function([Function x1]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function([Function x1]) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function([Function x1]) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function({core.List x}) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function({core.List x}) Function( - int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function({core.List x}) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int y, {int x}) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int y, {int x}) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function(int y, {int x}) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x1, [core.List x]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x1, [core.List x]) Function( - int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x1, [core.List x]) - Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x1) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x1) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue( - m18 is void Function(int x1) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x, [List x1]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x, [List x1]) Function( - int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x, [List x1]) - Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function(int y, {List x}) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function(int y, {List x}) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function(int y, {List x}) - Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function(int x) - l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(List x) - Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(int x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(int x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is A Function(int x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// core.List Function(B x) Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - core.List Function(B x) Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is core.List Function(B x) - Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U27().runTests(); - new U27(tIsInt: true).runTests(); - new U27(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type28_test.dart b/tests/language_2/function_type/function_type28_test.dart deleted file mode 100644 index c88505556f4..00000000000 --- a/tests/language_2/function_type/function_type28_test.dart +++ /dev/null @@ -1,945 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int x1, [List x2]); -typedef F1 = List Function([Function x1]); -typedef F2 = List Function(int x0); -typedef F3 = Function(List x0); -typedef F4 = List Function(List x); -typedef F5 = int Function([Function x1]) Function(); -typedef F6 = int Function({core.List x}) Function(); -typedef F7 = Function Function(int y, {int x}) Function(); -typedef F8 = Function Function(int x0, [core.List x]) Function(); -typedef F9 = List Function(int x0) Function(); -typedef F10 = List Function(int x, [List x2]) Function(); -typedef F11 = List Function(int y, {List x}) Function(); -typedef F12 = core.List Function([List x]) Function(); -typedef F13 = core.List Function(List x0) Function(); -typedef F14 = List Function(int x1, [Function x2]) Function(); -typedef F15 = List Function(int x0, {core.List x}) Function(); -typedef F16 = Function(Function x) Function(); -typedef F17 = Function(int y, [core.List x]) Function(); -typedef F18 = void Function([int x1]) Function(); -typedef F19 = void Function({List x}) Function(); -typedef F20 = void Function() Function(); -typedef F21 = core.List Function(int x) Function(); -typedef F22 = A Function(Function x) Function(); -typedef F23 = List Function(B x) Function(); - -int f0(int x0, [List x1]) => null; -List f1([Function x0]) => null; -List f2(int x0) => null; -f3(List x0) => null; -List f4(List x) => null; -int Function([Function x0]) f5() => null; -int Function({core.List x}) f6() => null; -Function Function(int y, {int x}) f7() => null; -Function Function(int x0, [core.List x]) f8() => null; -List Function(int x0) f9() => null; -List Function(int x, [List x0]) f10() => null; -List Function(int y, {List x}) f11() => null; -core.List Function([List x]) f12() => null; -core.List Function(List x0) f13() => null; -List Function(int x0, [Function x1]) f14() => null; -List Function(int x0, {core.List x}) f15() => null; -Function(Function x) f16() => null; -Function(int y, [core.List x]) f17() => null; -void Function([int x0]) f18() => null; -void Function({List x}) f19() => null; -void Function() f20() => null; -core.List Function(int x) f21() => null; -A Function(Function x) f22() => null; -List Function(B x) f23() => null; - -class U28 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int x1, [List x2]) x0; - List Function([Function x1]) x1; - List Function(int x0) x2; - Function(List x0) x3; - List Function(List x) x4; - int Function([Function x1]) Function() x5; - int Function({core.List x}) Function() x6; - Function Function(int y, {int x}) Function() x7; - Function Function(int x0, [core.List x]) Function() x8; - List Function(int x0) Function() x9; - List Function(int x, [List x2]) Function() x10; - List Function(int y, {List x}) Function() x11; - core.List Function([List x]) Function() x12; - core.List Function(List x0) Function() x13; - List Function(int x1, [Function x2]) Function() x14; - List Function(int x0, {core.List x}) Function() x15; - Function(Function x) Function() x16; - Function(int y, [core.List x]) Function() x17; - void Function([int x1]) Function() x18; - void Function({List x}) Function() x19; - void Function() Function() x20; - core.List Function(int x) Function() x21; - A Function(Function x) Function() x22; - List Function(B x) Function() x23; - - U28({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int x0, [List x1]) => null; - List m1([Function x0]) => null; - List m2(int x0) => null; - m3(List x0) => null; - List m4(List x) => null; - int Function([Function x0]) m5() => null; - int Function({core.List x}) m6() => null; - Function Function(int y, {int x}) m7() => null; - Function Function(int x0, [core.List x]) m8() => null; - List Function(int x0) m9() => null; - List Function(int x, [List x0]) m10() => null; - List Function(int y, {List x}) m11() => null; - core.List Function([List x]) m12() => null; - core.List Function(List x0) m13() => null; - List Function(int x0, [Function x1]) m14() => null; - List Function(int x0, {core.List x}) m15() => null; - Function(Function x) m16() => null; - Function(int y, [core.List x]) m17() => null; - void Function([int x0]) m18() => null; - void Function({List x}) m19() => null; - void Function() m20() => null; - core.List Function(int x) m21() => null; - A Function(Function x) m22() => null; - List Function(B x) m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int x1, [List x2]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int x1, [List x2]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int x1, [List x2])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function([Function x1]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function([Function x1]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function([Function x1])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int x0) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int x0) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int x0)); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// Function(List x0) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(List x0) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(List x0)); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - // The static function has its T always set to int. - Expect.isTrue(f3 is F3); - Expect.isFalse(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - Expect.isFalse(confuse(f3) is F3); - if (tIsBool) { - Expect.throws(() { - x3 = (f3 as dynamic); - }); - Expect.throws(() { - x3 = confuse(f3); - }); - Expect.throws(() { - l3 = (f3 as dynamic); - }); - Expect.throws(() { - l3 = confuse(f3); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m3 is F3); - Expect.equals(true, m3 is F3); - Expect.equals(true, confuse(m3) is F3); - Expect.equals(true, confuse(m3) is F3); - } - } - - /// List Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - // The static function has its T always set to int. - Expect.isTrue(f4 is F4); - Expect.isFalse(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - Expect.isFalse(confuse(f4) is F4); - if (tIsBool) { - Expect.throws(() { - x4 = (f4 as dynamic); - }); - Expect.throws(() { - x4 = confuse(f4); - }); - Expect.throws(() { - l4 = (f4 as dynamic); - }); - Expect.throws(() { - l4 = confuse(f4); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m4 is F4); - Expect.equals(tIsBool, m4 is F4); - Expect.equals(tIsInt, confuse(m4) is F4); - Expect.equals(tIsBool, confuse(m4) is F4); - } - } - - /// int Function([Function x1]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function([Function x1]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function([Function x1]) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function({core.List x}) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function({core.List x}) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function({core.List x}) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int y, {int x}) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int y, {int x}) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int y, {int x}) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x0, [core.List x]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x0, [core.List x]) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function(int x0, [core.List x]) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x0) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x0) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x0) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x, [List x2]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x, [List x2]) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue( - m10 is List Function(int x, [List x2]) Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(int y, {List x}) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(int y, {List x}) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is List Function(int y, {List x}) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function([List x]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function([List x]) Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue( - m12 is core.List Function([List x]) Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(List x0) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(List x0) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(List x0) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x1, [Function x2]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x1, [Function x2]) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int x1, [Function x2]) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x0, {core.List x}) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x0, {core.List x}) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue( - m15 is List Function(int x0, {core.List x}) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(Function x) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(Function x) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(Function x) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int y, [core.List x]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int y, [core.List x]) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int y, [core.List x]) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function([int x1]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function([int x1]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function([int x1]) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function({List x}) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function({List x}) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function({List x}) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function() Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function() Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function() Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(int x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(int x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function(int x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(Function x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(Function x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is A Function(Function x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// List Function(B x) Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - List Function(B x) Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is List Function(B x) Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - // The static function has its T always set to int. - Expect.isTrue(f23 is F23); - Expect.isFalse(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - Expect.isFalse(confuse(f23) is F23); - if (tIsBool) { - Expect.throws(() { - x23 = (f23 as dynamic); - }); - Expect.throws(() { - x23 = confuse(f23); - }); - Expect.throws(() { - l23 = (f23 as dynamic); - }); - Expect.throws(() { - l23 = confuse(f23); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m23 is F23); - Expect.equals(tIsBool, m23 is F23); - Expect.equals(tIsInt, confuse(m23) is F23); - Expect.equals(tIsBool, confuse(m23) is F23); - } - } -} - -void main() { - new U28().runTests(); - new U28(tIsInt: true).runTests(); - new U28(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type29_test.dart b/tests/language_2/function_type/function_type29_test.dart deleted file mode 100644 index 81740b1bcb5..00000000000 --- a/tests/language_2/function_type/function_type29_test.dart +++ /dev/null @@ -1,954 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int x, [List x2]); -typedef F1 = List Function(int x1, [Function x2]); -typedef F2 = List Function([int x1]); -typedef F3 = Function([List x1]); -typedef F4 = List Function(); -typedef F5 = int Function([Function x1]) Function(int x); -typedef F6 = int Function({core.List x}) Function(int x); -typedef F7 = Function Function(int y, {int x}) Function(int x); -typedef F8 = Function Function(int x1, [core.List x]) Function( - int x); -typedef F9 = List Function(int x1) Function(int x); -typedef F10 = List Function(int x, [List x1]) Function( - int x); -typedef F11 = List Function(int y, {List x}) Function(int x); -typedef F12 = core.List Function([List x]) Function( - int x); -typedef F13 = core.List Function(List x1) Function(int x); -typedef F14 = List Function(int x2, [Function x3]) Function(int x); -typedef F15 = List Function(int x1, {core.List x}) Function( - int x); -typedef F16 = Function(Function x) Function(int x); -typedef F17 = Function(int y, [core.List x]) Function(int x); -typedef F18 = void Function([int x1]) Function(int x); -typedef F19 = void Function({List x}) Function(int x); -typedef F20 = void Function() Function(int x); -typedef F21 = core.List Function(int x) Function(int x); -typedef F22 = A Function(Function x) Function(int x); -typedef F23 = List Function(B x) Function(int x); - -int f0(int x, [List x0]) => null; -List f1(int x0, [Function x1]) => null; -List f2([int x0]) => null; -f3([List x0]) => null; -List f4() => null; -int Function([Function x0]) f5(int x) => null; -int Function({core.List x}) f6(int x) => null; -Function Function(int y, {int x}) f7(int x) => null; -Function Function(int x0, [core.List x]) f8(int x) => null; -List Function(int x0) f9(int x) => null; -List Function(int x, [List x0]) f10(int x) => null; -List Function(int y, {List x}) f11(int x) => null; -core.List Function([List x]) f12(int x) => null; -core.List Function(List x0) f13(int x) => null; -List Function(int x0, [Function x1]) f14(int x) => null; -List Function(int x0, {core.List x}) f15(int x) => null; -Function(Function x) f16(int x) => null; -Function(int y, [core.List x]) f17(int x) => null; -void Function([int x0]) f18(int x) => null; -void Function({List x}) f19(int x) => null; -void Function() f20(int x) => null; -core.List Function(int x) f21(int x) => null; -A Function(Function x) f22(int x) => null; -List Function(B x) f23(int x) => null; - -class U29 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int x, [List x2]) x0; - List Function(int x1, [Function x2]) x1; - List Function([int x1]) x2; - Function([List x1]) x3; - List Function() x4; - int Function([Function x1]) Function(int x) x5; - int Function({core.List x}) Function(int x) x6; - Function Function(int y, {int x}) Function(int x) x7; - Function Function(int x1, [core.List x]) Function(int x) x8; - List Function(int x1) Function(int x) x9; - List Function(int x, [List x1]) Function(int x) x10; - List Function(int y, {List x}) Function(int x) x11; - core.List Function([List x]) Function(int x) x12; - core.List Function(List x1) Function(int x) x13; - List Function(int x2, [Function x3]) Function(int x) x14; - List Function(int x1, {core.List x}) Function(int x) x15; - Function(Function x) Function(int x) x16; - Function(int y, [core.List x]) Function(int x) x17; - void Function([int x1]) Function(int x) x18; - void Function({List x}) Function(int x) x19; - void Function() Function(int x) x20; - core.List Function(int x) Function(int x) x21; - A Function(Function x) Function(int x) x22; - List Function(B x) Function(int x) x23; - - U29({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int x, [List x0]) => null; - List m1(int x0, [Function x1]) => null; - List m2([int x0]) => null; - m3([List x0]) => null; - List m4() => null; - int Function([Function x0]) m5(int x) => null; - int Function({core.List x}) m6(int x) => null; - Function Function(int y, {int x}) m7(int x) => null; - Function Function(int x0, [core.List x]) m8(int x) => null; - List Function(int x0) m9(int x) => null; - List Function(int x, [List x0]) m10(int x) => null; - List Function(int y, {List x}) m11(int x) => null; - core.List Function([List x]) m12(int x) => null; - core.List Function(List x0) m13(int x) => null; - List Function(int x0, [Function x1]) m14(int x) => null; - List Function(int x0, {core.List x}) m15(int x) => null; - Function(Function x) m16(int x) => null; - Function(int y, [core.List x]) m17(int x) => null; - void Function([int x0]) m18(int x) => null; - void Function({List x}) m19(int x) => null; - void Function() m20(int x) => null; - core.List Function(int x) m21(int x) => null; - A Function(Function x) m22(int x) => null; - List Function(B x) m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int x, [List x2]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int x, [List x2]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int x, [List x2])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int x1, [Function x2]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int x1, [Function x2]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int x1, [Function x2])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function([int x1]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function([int x1]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function([int x1])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// Function([List x1]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function([List x1]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function([List x1])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - // The static function has its T always set to int. - Expect.isTrue(f3 is F3); - Expect.isFalse(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - Expect.isFalse(confuse(f3) is F3); - if (tIsBool) { - Expect.throws(() { - x3 = (f3 as dynamic); - }); - Expect.throws(() { - x3 = confuse(f3); - }); - Expect.throws(() { - l3 = (f3 as dynamic); - }); - Expect.throws(() { - l3 = confuse(f3); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m3 is F3); - Expect.equals(true, m3 is F3); - Expect.equals(true, confuse(m3) is F3); - Expect.equals(true, confuse(m3) is F3); - } - } - - /// List Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - // The static function has its T always set to int. - Expect.isTrue(f4 is F4); - Expect.isFalse(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - Expect.isFalse(confuse(f4) is F4); - if (tIsBool) { - Expect.throws(() { - x4 = (f4 as dynamic); - }); - Expect.throws(() { - x4 = confuse(f4); - }); - Expect.throws(() { - l4 = (f4 as dynamic); - }); - Expect.throws(() { - l4 = confuse(f4); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m4 is F4); - Expect.equals(tIsBool, m4 is F4); - Expect.equals(tIsInt, confuse(m4) is F4); - Expect.equals(tIsBool, confuse(m4) is F4); - } - } - - /// int Function([Function x1]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function([Function x1]) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function([Function x1]) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function({core.List x}) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function({core.List x}) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function({core.List x}) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int y, {int x}) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int y, {int x}) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int y, {int x}) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x1, [core.List x]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x1, [core.List x]) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x1, [core.List x]) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x1) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x1) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x1) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x, [List x1]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x, [List x1]) Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x, [List x1]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(int y, {List x}) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(int y, {List x}) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is List Function(int y, {List x}) Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function([List x]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function([List x]) Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function([List x]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(List x1) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(List x1) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue( - m13 is core.List Function(List x1) Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x2, [Function x3]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x2, [Function x3]) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function(int x2, [Function x3]) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x1, {core.List x}) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x1, {core.List x}) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x1, {core.List x}) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(Function x) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(Function x) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(Function x) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int y, [core.List x]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int y, [core.List x]) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue( - m17 is Function(int y, [core.List x]) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function([int x1]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function([int x1]) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function([int x1]) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function({List x}) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function({List x}) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function({List x}) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function() Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function() Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function() Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(int x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(int x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is core.List Function(int x) Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(Function x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(Function x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is A Function(Function x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// List Function(B x) Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - List Function(B x) Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue( - m23 is List Function(B x) Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - // The static function has its T always set to int. - Expect.isTrue(f23 is F23); - Expect.isFalse(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - Expect.isFalse(confuse(f23) is F23); - if (tIsBool) { - Expect.throws(() { - x23 = (f23 as dynamic); - }); - Expect.throws(() { - x23 = confuse(f23); - }); - Expect.throws(() { - l23 = (f23 as dynamic); - }); - Expect.throws(() { - l23 = confuse(f23); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m23 is F23); - Expect.equals(tIsBool, m23 is F23); - Expect.equals(tIsInt, confuse(m23) is F23); - Expect.equals(tIsBool, confuse(m23) is F23); - } - } -} - -void main() { - new U29().runTests(); - new U29(tIsInt: true).runTests(); - new U29(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type2_test.dart b/tests/language_2/function_type/function_type2_test.dart deleted file mode 100644 index ed1eab98fa7..00000000000 --- a/tests/language_2/function_type/function_type2_test.dart +++ /dev/null @@ -1,963 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int x0, [int x]); -typedef F1 = Function Function(int x0, [List x]); -typedef F2 = core.List Function([core.List x]); -typedef F3 = Function(List x); -typedef F4 = Function Function(List x); -typedef F5 = int Function(int x1, {int x}) Function(); -typedef F6 = int Function([core.List x]) - Function(); -typedef F7 = Function Function(int y, [int x]) - Function(); -typedef F8 = Function Function(int x2, [List x3]) - Function(); -typedef F9 = Function Function(int x1, {List x}) - Function(); -typedef F10 = List Function(List x) - Function(); -typedef F11 = List Function(int y, [List x]) - Function(); -typedef F12 = core.List Function([Function x1]) - Function(); -typedef F13 = core.List Function({core.List x}) - Function(); -typedef F14 = List Function(int y, {int x}) - Function(); -typedef F15 = List Function(int x1, [core.List x]) - Function(); -typedef F16 = Function(int x1) Function(); -typedef F17 = Function(int x, [List x1]) - Function(); -typedef F18 = Function(int y, {List x}) Function(); -typedef F19 = void Function([List x]) - Function(); -typedef F20 = void Function(List x1) Function(); -typedef F21 = List Function(Function x) - Function(); -typedef F22 = Function(List x) Function(); -typedef F23 = void Function(core.List x) - Function(); - -int f0(int x0, [int x]) => null; -Function f1(int x0, [List x]) => null; -core.List f2([core.List x]) => null; -f3(List x) => null; -Function f4(List x) => null; -int Function(int x0, {int x}) f5() => null; -int Function([core.List x]) f6() => null; -Function Function(int y, [int x]) f7() => null; -Function Function(int x0, [List x1]) f8() => null; -Function Function(int x0, {List x}) f9() => null; -List Function(List x) f10() => null; -List Function(int y, [List x]) f11() => null; -core.List Function([Function x0]) f12() => null; -core.List Function({core.List x}) - f13() => null; -List Function(int y, {int x}) f14() => null; -List Function(int x0, [core.List x]) f15() => - null; -Function(int x0) f16() => null; -Function(int x, [List x0]) f17() => null; -Function(int y, {List x}) f18() => null; -void Function([List x]) f19() => null; -void Function(List x0) f20() => null; -List Function(Function x) f21() => null; -Function(List x) f22() => null; -void Function(core.List x) f23() => null; - -class U2 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int x0, [int x]) x0; - Function Function(int x0, [List x]) x1; - core.List Function([core.List x]) x2; - Function(List x) x3; - Function Function(List x) x4; - int Function(int x1, {int x}) Function() x5; - int Function([core.List x]) Function() x6; - Function Function(int y, [int x]) Function() x7; - Function Function(int x2, [List x3]) Function() - x8; - Function Function(int x1, {List x}) Function() x9; - List Function(List x) Function() x10; - List Function(int y, [List x]) Function() - x11; - core.List Function([Function x1]) Function() - x12; - core.List Function({core.List x}) - Function() x13; - List Function(int y, {int x}) Function() x14; - List Function(int x1, [core.List x]) - Function() x15; - Function(int x1) Function() x16; - Function(int x, [List x1]) Function() x17; - Function(int y, {List x}) Function() x18; - void Function([List x]) Function() x19; - void Function(List x1) Function() x20; - List Function(Function x) Function() x21; - Function(List x) Function() x22; - void Function(core.List x) Function() x23; - - U2({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int x0, [int x]) => null; - Function m1(int x0, [List x]) => null; - core.List m2([core.List x]) => null; - m3(List x) => null; - Function m4(List x) => null; - int Function(int x0, {int x}) m5() => null; - int Function([core.List x]) m6() => null; - Function Function(int y, [int x]) m7() => null; - Function Function(int x0, [List x1]) m8() => - null; - Function Function(int x0, {List x}) m9() => null; - List Function(List x) m10() => null; - List Function(int y, [List x]) m11() => null; - core.List Function([Function x0]) m12() => null; - core.List Function({core.List x}) - m13() => null; - List Function(int y, {int x}) m14() => null; - List Function(int x0, [core.List x]) m15() => - null; - Function(int x0) m16() => null; - Function(int x, [List x0]) m17() => null; - Function(int y, {List x}) m18() => null; - void Function([List x]) m19() => null; - void Function(List x0) m20() => null; - List Function(Function x) m21() => null; - Function(List x) m22() => null; - void Function(core.List x) m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int x0, [int x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int x0, [int x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int x0, [int x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// Function Function(int x0, [List x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - Function Function(int x0, [List x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is Function Function(int x0, [List x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - // The static function has its T always set to int. - Expect.isTrue(f1 is F1); - Expect.isFalse(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - Expect.isFalse(confuse(f1) is F1); - if (tIsBool) { - Expect.throws(() { - x1 = (f1 as dynamic); - }); - Expect.throws(() { - x1 = confuse(f1); - }); - Expect.throws(() { - l1 = (f1 as dynamic); - }); - Expect.throws(() { - l1 = confuse(f1); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m1 is F1); - Expect.equals(true, m1 is F1); - Expect.equals(true, confuse(m1) is F1); - Expect.equals(true, confuse(m1) is F1); - } - } - - /// core.List Function([core.List x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function([core.List x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is core.List Function([core.List x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// Function(List x) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(List x) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(List x)); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// Function Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - Function Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is Function Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x1, {int x}) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x1, {int x}) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function(int x1, {int x}) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function([core.List x]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function([core.List x]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function([core.List x]) - Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int y, [int x]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int y, [int x]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue( - m7 is Function Function(int y, [int x]) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x2, [List x3]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x2, [List x3]) - Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x2, [List x3]) - Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// Function Function(int x1, {List x}) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - Function Function(int x1, {List x}) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is Function Function(int x1, {List x}) - Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - // The static function has its T always set to int. - Expect.isTrue(f9 is F9); - Expect.isFalse(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - Expect.isFalse(confuse(f9) is F9); - if (tIsBool) { - Expect.throws(() { - x9 = (f9 as dynamic); - }); - Expect.throws(() { - x9 = confuse(f9); - }); - Expect.throws(() { - l9 = (f9 as dynamic); - }); - Expect.throws(() { - l9 = confuse(f9); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m9 is F9); - Expect.equals(tIsBool, m9 is F9); - Expect.equals(tIsInt, confuse(m9) is F9); - Expect.equals(tIsBool, confuse(m9) is F9); - } - } - - /// List Function(List x) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(List x) Function() - l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(List x) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(int y, [List x]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(int y, [List x]) Function() - l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function(int y, [List x]) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function([Function x1]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function([Function x1]) Function() - l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function([Function x1]) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function({core.List x}) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function({core.List x}) - Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function({core.List x}) - Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - } - - /// List Function(int y, {int x}) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int y, {int x}) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function(int y, {int x}) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x1, [core.List x]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x1, [core.List x]) - Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x1, [core.List x]) - Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x1) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x1) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x1) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x, [List x1]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x, [List x1]) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x, [List x1]) - Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// Function(int y, {List x}) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - Function(int y, {List x}) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue( - m18 is Function(int y, {List x}) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - // The static function has its T always set to int. - Expect.isTrue(f18 is F18); - Expect.isFalse(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - Expect.isFalse(confuse(f18) is F18); - if (tIsBool) { - Expect.throws(() { - x18 = (f18 as dynamic); - }); - Expect.throws(() { - x18 = confuse(f18); - }); - Expect.throws(() { - l18 = (f18 as dynamic); - }); - Expect.throws(() { - l18 = confuse(f18); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m18 is F18); - Expect.equals(tIsBool, m18 is F18); - Expect.equals(tIsInt, confuse(m18) is F18); - Expect.equals(tIsBool, confuse(m18) is F18); - } - } - - /// void Function([List x]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function([List x]) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function([List x]) - Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function(List x1) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function(List x1) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is void Function(List x1) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(Function x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(Function x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(Function x) - Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// Function(List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function(List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is Function(List x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// void Function(core.List x) Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - void Function(core.List x) Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is void Function(core.List x) - Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U2().runTests(); - new U2(tIsInt: true).runTests(); - new U2(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type30_test.dart b/tests/language_2/function_type/function_type30_test.dart deleted file mode 100644 index 3fbb971081d..00000000000 --- a/tests/language_2/function_type/function_type30_test.dart +++ /dev/null @@ -1,961 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function({List x}); -typedef F1 = List Function(int x, [Function x2]); -typedef F2 = List Function(int x1, [int x2]); -typedef F3 = Function(int x1, [List x2]); -typedef F4 = List Function(A x); -typedef F5 = int Function([Function x1]) Function(); -typedef F6 = int Function({core.List x}) - Function(); -typedef F7 = Function Function(int y, {int x}) - Function(); -typedef F8 = Function Function(int x1, [core.List x]) - Function(); -typedef F9 = List Function(int x1) Function(); -typedef F10 = List Function(int x, [List x1]) - Function(); -typedef F11 = List Function(int y, {List x}) - Function(); -typedef F12 = core.List Function([List x]) - Function(); -typedef F13 = core.List Function(List x1) - Function(); -typedef F14 = List Function(int x2, [Function x3]) - Function(); -typedef F15 = List Function(int x1, {core.List x}) - Function(); -typedef F16 = Function(Function x) Function(); -typedef F17 = Function(int y, [core.List x]) - Function(); -typedef F18 = void Function([int x1]) Function(); -typedef F19 = void Function({List x}) - Function(); -typedef F20 = void Function() Function(); -typedef F21 = core.List Function(int x) - Function(); -typedef F22 = A Function(Function x) Function(); -typedef F23 = Function(B x) Function(); - -int f0({List x}) => null; -List f1(int x, [Function x0]) => null; -List f2(int x0, [int x1]) => null; -f3(int x0, [List x1]) => null; -List f4(A x) => null; -int Function([Function x0]) f5() => null; -int Function({core.List x}) f6() => null; -Function Function(int y, {int x}) f7() => null; -Function Function(int x0, [core.List x]) f8() => - null; -List Function(int x0) f9() => null; -List Function(int x, [List x0]) f10() => - null; -List Function(int y, {List x}) f11() => null; -core.List Function([List x]) f12() => - null; -core.List Function(List x0) f13() => null; -List Function(int x0, [Function x1]) f14() => null; -List Function(int x0, {core.List x}) f15() => - null; -Function(Function x) f16() => null; -Function(int y, [core.List x]) f17() => null; -void Function([int x0]) f18() => null; -void Function({List x}) f19() => null; -void Function() f20() => null; -core.List Function(int x) f21() => null; -A Function(Function x) f22() => null; -Function(B x) f23() => null; - -class U30 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function({List x}) x0; - List Function(int x, [Function x2]) x1; - List Function(int x1, [int x2]) x2; - Function(int x1, [List x2]) x3; - List Function(A x) x4; - int Function([Function x1]) Function() x5; - int Function({core.List x}) Function() x6; - Function Function(int y, {int x}) Function() x7; - Function Function(int x1, [core.List x]) - Function() x8; - List Function(int x1) Function() x9; - List Function(int x, [List x1]) - Function() x10; - List Function(int y, {List x}) Function() - x11; - core.List Function([List x]) - Function() x12; - core.List Function(List x1) Function() x13; - List Function(int x2, [Function x3]) Function() x14; - List Function(int x1, {core.List x}) - Function() x15; - Function(Function x) Function() x16; - Function(int y, [core.List x]) Function() x17; - void Function([int x1]) Function() x18; - void Function({List x}) Function() x19; - void Function() Function() x20; - core.List Function(int x) Function() x21; - A Function(Function x) Function() x22; - Function(B x) Function() x23; - - U30({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0({List x}) => null; - List m1(int x, [Function x0]) => null; - List m2(int x0, [int x1]) => null; - m3(int x0, [List x1]) => null; - List m4(A x) => null; - int Function([Function x0]) m5() => null; - int Function({core.List x}) m6() => null; - Function Function(int y, {int x}) m7() => null; - Function Function(int x0, [core.List x]) m8() => - null; - List Function(int x0) m9() => null; - List Function(int x, [List x0]) - m10() => null; - List Function(int y, {List x}) m11() => null; - core.List Function([List x]) m12() => - null; - core.List Function(List x0) m13() => null; - List Function(int x0, [Function x1]) m14() => null; - List Function(int x0, {core.List x}) m15() => - null; - Function(Function x) m16() => null; - Function(int y, [core.List x]) m17() => null; - void Function([int x0]) m18() => null; - void Function({List x}) m19() => null; - void Function() m20() => null; - core.List Function(int x) m21() => null; - A Function(Function x) m22() => null; - Function(B x) m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function({List x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function({List x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function({List x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int x, [Function x2]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int x, [Function x2]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int x, [Function x2])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int x1, [int x2]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int x1, [int x2]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int x1, [int x2])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// Function(int x1, [List x2]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(int x1, [List x2]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(int x1, [List x2])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - // The static function has its T always set to int. - Expect.isTrue(f3 is F3); - Expect.isFalse(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - Expect.isFalse(confuse(f3) is F3); - if (tIsBool) { - Expect.throws(() { - x3 = (f3 as dynamic); - }); - Expect.throws(() { - x3 = confuse(f3); - }); - Expect.throws(() { - l3 = (f3 as dynamic); - }); - Expect.throws(() { - l3 = confuse(f3); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m3 is F3); - Expect.equals(true, m3 is F3); - Expect.equals(true, confuse(m3) is F3); - Expect.equals(true, confuse(m3) is F3); - } - } - - /// List Function(A x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function(A x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function(A x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - // The static function has its T always set to int. - Expect.isTrue(f4 is F4); - Expect.isFalse(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - Expect.isFalse(confuse(f4) is F4); - if (tIsBool) { - Expect.throws(() { - x4 = (f4 as dynamic); - }); - Expect.throws(() { - x4 = confuse(f4); - }); - Expect.throws(() { - l4 = (f4 as dynamic); - }); - Expect.throws(() { - l4 = confuse(f4); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m4 is F4); - Expect.equals(tIsBool, m4 is F4); - Expect.equals(tIsInt, confuse(m4) is F4); - Expect.equals(tIsBool, confuse(m4) is F4); - } - } - - /// int Function([Function x1]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function([Function x1]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function([Function x1]) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function({core.List x}) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function({core.List x}) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function({core.List x}) - Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int y, {int x}) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int y, {int x}) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue( - m7 is Function Function(int y, {int x}) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x1, [core.List x]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x1, [core.List x]) - Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x1, [core.List x]) - Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x1) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x1) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is List Function(int x1) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x, [List x1]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x, [List x1]) - Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x, [List x1]) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(int y, {List x}) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(int y, {List x}) Function() - l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function(int y, {List x}) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function([List x]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function([List x]) - Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function([List x]) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(List x1) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(List x1) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(List x1) - Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x2, [Function x3]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x2, [Function x3]) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int x2, [Function x3]) - Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x1, {core.List x}) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x1, {core.List x}) - Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x1, {core.List x}) - Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(Function x) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(Function x) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(Function x) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int y, [core.List x]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int y, [core.List x]) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int y, [core.List x]) - Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function([int x1]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function([int x1]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue( - m18 is void Function([int x1]) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function({List x}) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function({List x}) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function({List x}) - Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function() Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function() Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function() Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(int x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(int x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function(int x) - Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(Function x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(Function x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is A Function(Function x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// Function(B x) Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - Function(B x) Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is Function(B x) Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U30().runTests(); - new U30(tIsInt: true).runTests(); - new U30(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type31_test.dart b/tests/language_2/function_type/function_type31_test.dart deleted file mode 100644 index 00099809ddc..00000000000 --- a/tests/language_2/function_type/function_type31_test.dart +++ /dev/null @@ -1,987 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int x0, {List x}); -typedef F1 = List Function({Function x}); -typedef F2 = List Function(int x, [int x2]); -typedef F3 = Function(int x, [List x2]); -typedef F4 = List Function(List x); -typedef F5 = int Function([Function x1]) Function(int x); -typedef F6 = int Function({core.List x}) - Function(int x); -typedef F7 = Function Function(int y, {int x}) Function( - int x); -typedef F8 = Function Function(int x1, [core.List x]) - Function(int x); -typedef F9 = List Function(int x1) Function( - int x); -typedef F10 = List Function(int x, [List x1]) - Function(int x); -typedef F11 = List Function(int y, {List x}) - Function(int x); -typedef F12 = core.List Function([List x]) - Function(int x); -typedef F13 = core.List Function(List x1) - Function(int x); -typedef F14 = List Function(int x2, [Function x3]) - Function(int x); -typedef F15 = List Function(int x1, {core.List x}) - Function(int x); -typedef F16 = Function(Function x) Function(int x); -typedef F17 = Function(int y, [core.List x]) - Function(int x); -typedef F18 = void Function([int x1]) Function(int x); -typedef F19 = void Function({List x}) Function( - int x); -typedef F20 = void Function() Function(int x); -typedef F21 = core.List Function(int x) - Function(int x); -typedef F22 = A Function(Function x) Function(int x); -typedef F23 = Function(B x) Function(int x); - -int f0(int x0, {List x}) => null; -List f1({Function x}) => null; -List f2(int x, [int x0]) => null; -f3(int x, [List x0]) => null; -List f4(List x) => null; -int Function([Function x0]) f5(int x) => null; -int Function({core.List x}) f6(int x) => null; -Function Function(int y, {int x}) f7(int x) => null; -Function Function(int x0, [core.List x]) f8( - int x) => - null; -List Function(int x0) f9(int x) => null; -List Function(int x, [List x0]) f10( - int x) => - null; -List Function(int y, {List x}) f11(int x) => - null; -core.List Function([List x]) f12( - int x) => - null; -core.List Function(List x0) f13(int x) => - null; -List Function(int x0, [Function x1]) f14(int x) => - null; -List Function(int x0, {core.List x}) f15( - int x) => - null; -Function(Function x) f16(int x) => null; -Function(int y, [core.List x]) f17(int x) => null; -void Function([int x0]) f18(int x) => null; -void Function({List x}) f19(int x) => null; -void Function() f20(int x) => null; -core.List Function(int x) f21(int x) => null; -A Function(Function x) f22(int x) => null; -Function(B x) f23(int x) => null; - -class U31 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int x0, {List x}) x0; - List Function({Function x}) x1; - List Function(int x, [int x2]) x2; - Function(int x, [List x2]) x3; - List Function(List x) x4; - int Function([Function x1]) Function(int x) x5; - int Function({core.List x}) Function(int x) x6; - Function Function(int y, {int x}) Function(int x) x7; - Function Function(int x1, [core.List x]) - Function(int x) x8; - List Function(int x1) Function(int x) x9; - List Function(int x, [List x1]) - Function(int x) x10; - List Function(int y, {List x}) Function( - int x) x11; - core.List Function([List x]) Function( - int x) x12; - core.List Function(List x1) Function(int x) - x13; - List Function(int x2, [Function x3]) Function(int x) - x14; - List Function(int x1, {core.List x}) - Function(int x) x15; - Function(Function x) Function(int x) x16; - Function(int y, [core.List x]) Function(int x) - x17; - void Function([int x1]) Function(int x) x18; - void Function({List x}) Function(int x) x19; - void Function() Function(int x) x20; - core.List Function(int x) Function(int x) - x21; - A Function(Function x) Function(int x) x22; - Function(B x) Function(int x) x23; - - U31({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int x0, {List x}) => null; - List m1({Function x}) => null; - List m2(int x, [int x0]) => null; - m3(int x, [List x0]) => null; - List m4(List x) => null; - int Function([Function x0]) m5(int x) => null; - int Function({core.List x}) m6(int x) => null; - Function Function(int y, {int x}) m7(int x) => null; - Function Function(int x0, [core.List x]) m8( - int x) => - null; - List Function(int x0) m9(int x) => null; - List Function(int x, [List x0]) m10( - int x) => - null; - List Function(int y, {List x}) m11(int x) => - null; - core.List Function([List x]) m12( - int x) => - null; - core.List Function(List x0) m13(int x) => - null; - List Function(int x0, [Function x1]) m14(int x) => - null; - List Function(int x0, {core.List x}) m15( - int x) => - null; - Function(Function x) m16(int x) => null; - Function(int y, [core.List x]) m17(int x) => - null; - void Function([int x0]) m18(int x) => null; - void Function({List x}) m19(int x) => null; - void Function() m20(int x) => null; - core.List Function(int x) m21(int x) => null; - A Function(Function x) m22(int x) => null; - Function(B x) m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int x0, {List x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int x0, {List x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int x0, {List x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function({Function x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function({Function x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function({Function x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int x, [int x2]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int x, [int x2]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int x, [int x2])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// Function(int x, [List x2]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(int x, [List x2]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(int x, [List x2])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - // The static function has its T always set to int. - Expect.isTrue(f3 is F3); - Expect.isFalse(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - Expect.isFalse(confuse(f3) is F3); - if (tIsBool) { - Expect.throws(() { - x3 = (f3 as dynamic); - }); - Expect.throws(() { - x3 = confuse(f3); - }); - Expect.throws(() { - l3 = (f3 as dynamic); - }); - Expect.throws(() { - l3 = confuse(f3); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m3 is F3); - Expect.equals(true, m3 is F3); - Expect.equals(true, confuse(m3) is F3); - Expect.equals(true, confuse(m3) is F3); - } - } - - /// List Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - // The static function has its T always set to int. - Expect.isTrue(f4 is F4); - Expect.isFalse(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - Expect.isFalse(confuse(f4) is F4); - if (tIsBool) { - Expect.throws(() { - x4 = (f4 as dynamic); - }); - Expect.throws(() { - x4 = confuse(f4); - }); - Expect.throws(() { - l4 = (f4 as dynamic); - }); - Expect.throws(() { - l4 = confuse(f4); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m4 is F4); - Expect.equals(tIsBool, m4 is F4); - Expect.equals(tIsInt, confuse(m4) is F4); - Expect.equals(tIsBool, confuse(m4) is F4); - } - } - - /// int Function([Function x1]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function([Function x1]) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function([Function x1]) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function({core.List x}) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function({core.List x}) Function(int x) - l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function({core.List x}) - Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int y, {int x}) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int y, {int x}) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int y, {int x}) - Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x1, [core.List x]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x1, [core.List x]) - Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x1, [core.List x]) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x1) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x1) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x1) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x, [List x1]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x, [List x1]) - Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x, [List x1]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(int y, {List x}) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(int y, {List x}) Function( - int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function(int y, {List x}) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function([List x]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function([List x]) - Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function([List x]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(List x1) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(List x1) Function(int x) - l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(List x1) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x2, [Function x3]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x2, [Function x3]) Function(int x) - l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int x2, [Function x3]) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x1, {core.List x}) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x1, {core.List x}) - Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x1, {core.List x}) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(Function x) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(Function x) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function(Function x) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int y, [core.List x]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int y, [core.List x]) Function(int x) - l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int y, [core.List x]) - Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function([int x1]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function([int x1]) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue( - m18 is void Function([int x1]) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function({List x}) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function({List x}) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function({List x}) - Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function() Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function() Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function() Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(int x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(int x) Function(int x) - l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function(int x) - Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(Function x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(Function x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is A Function(Function x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// Function(B x) Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - Function(B x) Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is Function(B x) Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U31().runTests(); - new U31(tIsInt: true).runTests(); - new U31(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type32_test.dart b/tests/language_2/function_type/function_type32_test.dart deleted file mode 100644 index 2714ce95546..00000000000 --- a/tests/language_2/function_type/function_type32_test.dart +++ /dev/null @@ -1,872 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int y, {List x}); -typedef F1 = List Function(int x0, {Function x}); -typedef F2 = List Function({int x}); -typedef F3 = Function({List x}); -typedef F4 = Function(int x); -typedef F5 = int Function(int x1, [Function x2]) Function(); -typedef F6 = int Function(int x0, {core.List x}) Function(); -typedef F7 = Function Function(Function x) Function(); -typedef F8 = Function Function(int y, [core.List x]) Function(); -typedef F9 = List Function([int x1]) Function(); -typedef F10 = List Function({List x}) Function(); -typedef F11 = List Function() Function(); -typedef F12 = core.List Function(int x0, [List x]) - Function(); -typedef F13 = core.List Function([List x1]) Function(); -typedef F14 = List Function(int x, [Function x2]) Function(); -typedef F15 = List Function(int y, {core.List x}) Function(); -typedef F16 = Function([Function x]) Function(); -typedef F17 = Function(core.List x0) Function(); -typedef F18 = void Function(int x1, [int x2]) Function(); -typedef F19 = void Function(int x0, {List x}) Function(); -typedef F20 = int Function(int x) Function(); -typedef F21 = core.List Function(Function x) Function(); -typedef F22 = A Function(List x) Function(); -typedef F23 = B Function(B x) Function(); - -int f0(int y, {List x}) => null; -List f1(int x0, {Function x}) => null; -List f2({int x}) => null; -f3({List x}) => null; -f4(int x) => null; -int Function(int x0, [Function x1]) f5() => null; -int Function(int x0, {core.List x}) f6() => null; -Function Function(Function x) f7() => null; -Function Function(int y, [core.List x]) f8() => null; -List Function([int x0]) f9() => null; -List Function({List x}) f10() => null; -List Function() f11() => null; -core.List Function(int x0, [List x]) f12() => null; -core.List Function([List x0]) f13() => null; -List Function(int x, [Function x0]) f14() => null; -List Function(int y, {core.List x}) f15() => null; -Function([Function x]) f16() => null; -Function(core.List x0) f17() => null; -void Function(int x0, [int x1]) f18() => null; -void Function(int x0, {List x}) f19() => null; -int Function(int x) f20() => null; -core.List Function(Function x) f21() => null; -A Function(List x) f22() => null; -B Function(B x) f23() => null; - -class U32 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int y, {List x}) x0; - List Function(int x0, {Function x}) x1; - List Function({int x}) x2; - Function({List x}) x3; - Function(int x) x4; - int Function(int x1, [Function x2]) Function() x5; - int Function(int x0, {core.List x}) Function() x6; - Function Function(Function x) Function() x7; - Function Function(int y, [core.List x]) Function() x8; - List Function([int x1]) Function() x9; - List Function({List x}) Function() x10; - List Function() Function() x11; - core.List Function(int x0, [List x]) Function() x12; - core.List Function([List x1]) Function() x13; - List Function(int x, [Function x2]) Function() x14; - List Function(int y, {core.List x}) Function() x15; - Function([Function x]) Function() x16; - Function(core.List x0) Function() x17; - void Function(int x1, [int x2]) Function() x18; - void Function(int x0, {List x}) Function() x19; - int Function(int x) Function() x20; - core.List Function(Function x) Function() x21; - A Function(List x) Function() x22; - B Function(B x) Function() x23; - - U32({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int y, {List x}) => null; - List m1(int x0, {Function x}) => null; - List m2({int x}) => null; - m3({List x}) => null; - m4(int x) => null; - int Function(int x0, [Function x1]) m5() => null; - int Function(int x0, {core.List x}) m6() => null; - Function Function(Function x) m7() => null; - Function Function(int y, [core.List x]) m8() => null; - List Function([int x0]) m9() => null; - List Function({List x}) m10() => null; - List Function() m11() => null; - core.List Function(int x0, [List x]) m12() => null; - core.List Function([List x0]) m13() => null; - List Function(int x, [Function x0]) m14() => null; - List Function(int y, {core.List x}) m15() => null; - Function([Function x]) m16() => null; - Function(core.List x0) m17() => null; - void Function(int x0, [int x1]) m18() => null; - void Function(int x0, {List x}) m19() => null; - int Function(int x) m20() => null; - core.List Function(Function x) m21() => null; - A Function(List x) m22() => null; - B Function(B x) m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int y, {List x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int y, {List x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int y, {List x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int x0, {Function x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int x0, {Function x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int x0, {Function x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function({int x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function({int x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function({int x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// Function({List x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function({List x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function({List x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - // The static function has its T always set to int. - Expect.isTrue(f3 is F3); - Expect.isFalse(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - Expect.isFalse(confuse(f3) is F3); - if (tIsBool) { - Expect.throws(() { - x3 = (f3 as dynamic); - }); - Expect.throws(() { - x3 = confuse(f3); - }); - Expect.throws(() { - l3 = (f3 as dynamic); - }); - Expect.throws(() { - l3 = confuse(f3); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m3 is F3); - Expect.equals(true, m3 is F3); - Expect.equals(true, confuse(m3) is F3); - Expect.equals(true, confuse(m3) is F3); - } - } - - /// Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x1, [Function x2]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x1, [Function x2]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x1, [Function x2]) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x0, {core.List x}) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x0, {core.List x}) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function(int x0, {core.List x}) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(Function x) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(Function x) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(Function x) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int y, [core.List x]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int y, [core.List x]) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function(int y, [core.List x]) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function([int x1]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function([int x1]) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function([int x1]) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function({List x}) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function({List x}) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue( - m10 is List Function({List x}) Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function() Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function() Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function() Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x0, [List x]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x0, [List x]) Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 - is core.List Function(int x0, [List x]) Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function([List x1]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function([List x1]) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function([List x1]) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x, [Function x2]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x, [Function x2]) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int x, [Function x2]) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int y, {core.List x}) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int y, {core.List x}) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue( - m15 is List Function(int y, {core.List x}) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function([Function x]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function([Function x]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function([Function x]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(core.List x0) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(core.List x0) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(core.List x0) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x1, [int x2]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x1, [int x2]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x1, [int x2]) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x0, {List x}) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x0, {List x}) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x0, {List x}) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(int x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(int x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is int Function(int x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(Function x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(Function x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is core.List Function(Function x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is A Function(List x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// B Function(B x) Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - B Function(B x) Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is B Function(B x) Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U32().runTests(); - new U32(tIsInt: true).runTests(); - new U32(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type33_test.dart b/tests/language_2/function_type/function_type33_test.dart deleted file mode 100644 index 17ad658aaaa..00000000000 --- a/tests/language_2/function_type/function_type33_test.dart +++ /dev/null @@ -1,879 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(core.List x); -typedef F1 = List Function(int y, {Function x}); -typedef F2 = List Function(int x0, {int x}); -typedef F3 = Function(int x0, {List x}); -typedef F4 = Function(Function x); -typedef F5 = int Function(int x2, [Function x3]) Function(int x); -typedef F6 = int Function(int x1, {core.List x}) Function(int x); -typedef F7 = Function Function(Function x) Function(int x); -typedef F8 = Function Function(int y, [core.List x]) Function( - int x); -typedef F9 = List Function([int x1]) Function(int x); -typedef F10 = List Function({List x}) Function(int x); -typedef F11 = List Function() Function(int x); -typedef F12 = core.List Function(int x1, [List x]) - Function(int x); -typedef F13 = core.List Function([List x1]) Function(int x); -typedef F14 = List Function(int x, [Function x1]) Function(int x); -typedef F15 = List Function(int y, {core.List x}) Function( - int x); -typedef F16 = Function([Function x]) Function(int x); -typedef F17 = Function(core.List x1) Function(int x); -typedef F18 = void Function(int x2, [int x3]) Function(int x); -typedef F19 = void Function(int x1, {List x}) Function(int x); -typedef F20 = int Function(int x) Function(int x); -typedef F21 = core.List Function(Function x) Function(int x); -typedef F22 = A Function(List x) Function(int x); -typedef F23 = B Function(B x) Function(int x); - -int f0(core.List x) => null; -List f1(int y, {Function x}) => null; -List f2(int x0, {int x}) => null; -f3(int x0, {List x}) => null; -f4(Function x) => null; -int Function(int x0, [Function x1]) f5(int x) => null; -int Function(int x0, {core.List x}) f6(int x) => null; -Function Function(Function x) f7(int x) => null; -Function Function(int y, [core.List x]) f8(int x) => null; -List Function([int x0]) f9(int x) => null; -List Function({List x}) f10(int x) => null; -List Function() f11(int x) => null; -core.List Function(int x0, [List x]) f12(int x) => null; -core.List Function([List x0]) f13(int x) => null; -List Function(int x, [Function x0]) f14(int x) => null; -List Function(int y, {core.List x}) f15(int x) => null; -Function([Function x]) f16(int x) => null; -Function(core.List x0) f17(int x) => null; -void Function(int x0, [int x1]) f18(int x) => null; -void Function(int x0, {List x}) f19(int x) => null; -int Function(int x) f20(int x) => null; -core.List Function(Function x) f21(int x) => null; -A Function(List x) f22(int x) => null; -B Function(B x) f23(int x) => null; - -class U33 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(core.List x) x0; - List Function(int y, {Function x}) x1; - List Function(int x0, {int x}) x2; - Function(int x0, {List x}) x3; - Function(Function x) x4; - int Function(int x2, [Function x3]) Function(int x) x5; - int Function(int x1, {core.List x}) Function(int x) x6; - Function Function(Function x) Function(int x) x7; - Function Function(int y, [core.List x]) Function(int x) x8; - List Function([int x1]) Function(int x) x9; - List Function({List x}) Function(int x) x10; - List Function() Function(int x) x11; - core.List Function(int x1, [List x]) Function(int x) x12; - core.List Function([List x1]) Function(int x) x13; - List Function(int x, [Function x1]) Function(int x) x14; - List Function(int y, {core.List x}) Function(int x) x15; - Function([Function x]) Function(int x) x16; - Function(core.List x1) Function(int x) x17; - void Function(int x2, [int x3]) Function(int x) x18; - void Function(int x1, {List x}) Function(int x) x19; - int Function(int x) Function(int x) x20; - core.List Function(Function x) Function(int x) x21; - A Function(List x) Function(int x) x22; - B Function(B x) Function(int x) x23; - - U33({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(core.List x) => null; - List m1(int y, {Function x}) => null; - List m2(int x0, {int x}) => null; - m3(int x0, {List x}) => null; - m4(Function x) => null; - int Function(int x0, [Function x1]) m5(int x) => null; - int Function(int x0, {core.List x}) m6(int x) => null; - Function Function(Function x) m7(int x) => null; - Function Function(int y, [core.List x]) m8(int x) => null; - List Function([int x0]) m9(int x) => null; - List Function({List x}) m10(int x) => null; - List Function() m11(int x) => null; - core.List Function(int x0, [List x]) m12(int x) => null; - core.List Function([List x0]) m13(int x) => null; - List Function(int x, [Function x0]) m14(int x) => null; - List Function(int y, {core.List x}) m15(int x) => null; - Function([Function x]) m16(int x) => null; - Function(core.List x0) m17(int x) => null; - void Function(int x0, [int x1]) m18(int x) => null; - void Function(int x0, {List x}) m19(int x) => null; - int Function(int x) m20(int x) => null; - core.List Function(Function x) m21(int x) => null; - A Function(List x) m22(int x) => null; - B Function(B x) m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(core.List x) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(core.List x) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(core.List x)); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int y, {Function x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int y, {Function x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int y, {Function x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int x0, {int x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int x0, {int x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int x0, {int x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// Function(int x0, {List x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(int x0, {List x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(int x0, {List x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - // The static function has its T always set to int. - Expect.isTrue(f3 is F3); - Expect.isFalse(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - Expect.isFalse(confuse(f3) is F3); - if (tIsBool) { - Expect.throws(() { - x3 = (f3 as dynamic); - }); - Expect.throws(() { - x3 = confuse(f3); - }); - Expect.throws(() { - l3 = (f3 as dynamic); - }); - Expect.throws(() { - l3 = confuse(f3); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m3 is F3); - Expect.equals(true, m3 is F3); - Expect.equals(true, confuse(m3) is F3); - Expect.equals(true, confuse(m3) is F3); - } - } - - /// Function(Function x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - Function(Function x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is Function(Function x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x2, [Function x3]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x2, [Function x3]) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x2, [Function x3]) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x1, {core.List x}) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x1, {core.List x}) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function(int x1, {core.List x}) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(Function x) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(Function x) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(Function x) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int y, [core.List x]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int y, [core.List x]) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int y, [core.List x]) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function([int x1]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function([int x1]) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function([int x1]) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function({List x}) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function({List x}) Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue( - m10 is List Function({List x}) Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function() Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function() Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function() Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x1, [List x]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x1, [List x]) Function(int x) - l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x1, - [List x]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function([List x1]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function([List x1]) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue( - m13 is core.List Function([List x1]) Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x, [Function x1]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x, [Function x1]) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function(int x, [Function x1]) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int y, {core.List x}) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int y, {core.List x}) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int y, {core.List x}) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function([Function x]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function([Function x]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function([Function x]) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(core.List x1) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(core.List x1) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(core.List x1) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x2, [int x3]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x2, [int x3]) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x2, [int x3]) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x1, {List x}) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x1, {List x}) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function(int x1, {List x}) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(int x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(int x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is int Function(int x) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(Function x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(Function x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is core.List Function(Function x) Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(List x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is A Function(List x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// B Function(B x) Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - B Function(B x) Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is B Function(B x) Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U33().runTests(); - new U33(tIsInt: true).runTests(); - new U33(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type34_test.dart b/tests/language_2/function_type/function_type34_test.dart deleted file mode 100644 index 1bc1dda8ebf..00000000000 --- a/tests/language_2/function_type/function_type34_test.dart +++ /dev/null @@ -1,915 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function([core.List x]); -typedef F1 = List Function(List x); -typedef F2 = List Function(int y, {int x}); -typedef F3 = Function(int y, {List x}); -typedef F4 = Function(List x); -typedef F5 = int Function(int x2, [Function x3]) - Function(); -typedef F6 = int Function(int x1, {core.List x}) - Function(); -typedef F7 = Function Function(Function x) Function(); -typedef F8 = Function Function(int y, [core.List x]) - Function(); -typedef F9 = List Function([int x1]) - Function(); -typedef F10 = List Function({List x}) - Function(); -typedef F11 = List Function() Function(); -typedef F12 = core.List Function(int x1, [List x]) - Function(); -typedef F13 = core.List Function([List x1]) - Function(); -typedef F14 = List Function(int x, [Function x1]) - Function(); -typedef F15 = List Function(int y, {core.List x}) - Function(); -typedef F16 = Function([Function x]) Function(); -typedef F17 = Function(core.List x1) - Function(); -typedef F18 = void Function(int x2, [int x3]) Function(); -typedef F19 = void Function(int x1, {List x}) - Function(); -typedef F20 = int Function(int x) Function(); -typedef F21 = core.List Function(Function x) - Function(); -typedef F22 = A Function(List x) Function(); -typedef F23 = List Function(B x) Function(); - -int f0([core.List x]) => null; -List f1(List x) => null; -List f2(int y, {int x}) => null; -f3(int y, {List x}) => null; -f4(List x) => null; -int Function(int x0, [Function x1]) f5() => null; -int Function(int x0, {core.List x}) f6() => null; -Function Function(Function x) f7() => null; -Function Function(int y, [core.List x]) f8() => - null; -List Function([int x0]) f9() => null; -List Function({List x}) f10() => null; -List Function() f11() => null; -core.List Function(int x0, [List x]) - f12() => null; -core.List Function([List x0]) f13() => null; -List Function(int x, [Function x0]) f14() => null; -List Function(int y, {core.List x}) f15() => - null; -Function([Function x]) f16() => null; -Function(core.List x0) f17() => null; -void Function(int x0, [int x1]) f18() => null; -void Function(int x0, {List x}) f19() => null; -int Function(int x) f20() => null; -core.List Function(Function x) f21() => null; -A Function(List x) f22() => null; -List Function(B x) f23() => null; - -class U34 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function([core.List x]) x0; - List Function(List x) x1; - List Function(int y, {int x}) x2; - Function(int y, {List x}) x3; - Function(List x) x4; - int Function(int x2, [Function x3]) Function() x5; - int Function(int x1, {core.List x}) Function() - x6; - Function Function(Function x) Function() x7; - Function Function(int y, [core.List x]) - Function() x8; - List Function([int x1]) Function() x9; - List Function({List x}) Function() - x10; - List Function() Function() x11; - core.List Function(int x1, [List x]) - Function() x12; - core.List Function([List x1]) Function() x13; - List Function(int x, [Function x1]) Function() x14; - List Function(int y, {core.List x}) - Function() x15; - Function([Function x]) Function() x16; - Function(core.List x1) Function() x17; - void Function(int x2, [int x3]) Function() x18; - void Function(int x1, {List x}) Function() x19; - int Function(int x) Function() x20; - core.List Function(Function x) Function() - x21; - A Function(List x) Function() x22; - List Function(B x) Function() x23; - - U34({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0([core.List x]) => null; - List m1(List x) => null; - List m2(int y, {int x}) => null; - m3(int y, {List x}) => null; - m4(List x) => null; - int Function(int x0, [Function x1]) m5() => null; - int Function(int x0, {core.List x}) m6() => - null; - Function Function(Function x) m7() => null; - Function Function(int y, [core.List x]) m8() => - null; - List Function([int x0]) m9() => null; - List Function({List x}) m10() => null; - List Function() m11() => null; - core.List Function(int x0, [List x]) - m12() => null; - core.List Function([List x0]) m13() => null; - List Function(int x, [Function x0]) m14() => null; - List Function(int y, {core.List x}) m15() => - null; - Function([Function x]) m16() => null; - Function(core.List x0) m17() => null; - void Function(int x0, [int x1]) m18() => null; - void Function(int x0, {List x}) m19() => null; - int Function(int x) m20() => null; - core.List Function(Function x) m21() => null; - A Function(List x) m22() => null; - List Function(B x) m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function([core.List x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function([core.List x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function([core.List x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(List x) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(List x) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(List x)); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int y, {int x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int y, {int x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int y, {int x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// Function(int y, {List x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(int y, {List x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(int y, {List x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - // The static function has its T always set to int. - Expect.isTrue(f3 is F3); - Expect.isFalse(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - Expect.isFalse(confuse(f3) is F3); - if (tIsBool) { - Expect.throws(() { - x3 = (f3 as dynamic); - }); - Expect.throws(() { - x3 = confuse(f3); - }); - Expect.throws(() { - l3 = (f3 as dynamic); - }); - Expect.throws(() { - l3 = confuse(f3); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m3 is F3); - Expect.equals(true, m3 is F3); - Expect.equals(true, confuse(m3) is F3); - Expect.equals(true, confuse(m3) is F3); - } - } - - /// Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x2, [Function x3]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x2, [Function x3]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x2, [Function x3]) - Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x1, {core.List x}) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x1, {core.List x}) Function() - l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int x1, {core.List x}) - Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(Function x) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(Function x) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue( - m7 is Function Function(Function x) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int y, [core.List x]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int y, [core.List x]) - Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int y, [core.List x]) - Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function([int x1]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function([int x1]) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is List Function([int x1]) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function({List x}) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function({List x}) Function() - l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function({List x}) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function() Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function() Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is List Function() Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x1, [List x]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x1, [List x]) - Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x1, - [List x]) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function([List x1]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function([List x1]) Function() - l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function([List x1]) - Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x, [Function x1]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x, [Function x1]) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int x, [Function x1]) - Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int y, {core.List x}) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int y, {core.List x}) - Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int y, {core.List x}) - Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function([Function x]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function([Function x]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function([Function x]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(core.List x1) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(core.List x1) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue( - m17 is Function(core.List x1) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x2, [int x3]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x2, [int x3]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue( - m18 is void Function(int x2, [int x3]) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x1, {List x}) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x1, {List x}) Function() - l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x1, {List x}) - Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(int x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(int x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is int Function(int x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(Function x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(Function x) Function() - l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function(Function x) - Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is A Function(List x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// List Function(B x) Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - List Function(B x) Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is List Function(B x) Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U34().runTests(); - new U34(tIsInt: true).runTests(); - new U34(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type35_test.dart b/tests/language_2/function_type/function_type35_test.dart deleted file mode 100644 index f9362f030d6..00000000000 --- a/tests/language_2/function_type/function_type35_test.dart +++ /dev/null @@ -1,913 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int x0, [core.List x]); -typedef F1 = List Function([List x]); -typedef F2 = List Function(Function x); -typedef F3 = Function(); -typedef F4 = Function(core.List x); -typedef F5 = int Function(int x2, [Function x3]) - Function(int x); -typedef F6 = int Function(int x1, {core.List x}) - Function(int x); -typedef F7 = Function Function(Function x) Function( - int x); -typedef F8 = Function Function(int y, [core.List x]) - Function(int x); -typedef F9 = List Function([int x1]) Function( - int x); -typedef F10 = List Function({List x}) - Function(int x); -typedef F11 = List Function() Function(int x); -typedef F12 = core.List Function(int x1, [List x]) - Function(int x); -typedef F13 = core.List Function([List x1]) - Function(int x); -typedef F14 = List Function(int x, [Function x1]) - Function(int x); -typedef F15 = List Function(int y, {core.List x}) - Function(int x); -typedef F16 = Function([Function x]) Function(int x); -typedef F17 = Function(core.List x1) Function( - int x); -typedef F18 = void Function(int x2, [int x3]) Function( - int x); -typedef F19 = void Function(int x1, {List x}) - Function(int x); -typedef F20 = int Function(int x) Function(int x); -typedef F21 = core.List Function(Function x) - Function(int x); -typedef F22 = A Function(List x) Function( - int x); -typedef F23 = List Function(B x) Function(int x); - -int f0(int x0, [core.List x]) => null; -List f1([List x]) => null; -List f2(Function x) => null; -f3() => null; -f4(core.List x) => null; -int Function(int x0, [Function x1]) f5(int x) => null; -int Function(int x0, {core.List x}) f6(int x) => - null; -Function Function(Function x) f7(int x) => null; -Function Function(int y, [core.List x]) f8( - int x) => - null; -List Function([int x0]) f9(int x) => null; -List Function({List x}) f10(int x) => - null; -List Function() f11(int x) => null; -core.List Function(int x0, [List x]) - f12(int x) => null; -core.List Function([List x0]) f13(int x) => - null; -List Function(int x, [Function x0]) f14(int x) => null; -List Function(int y, {core.List x}) f15( - int x) => - null; -Function([Function x]) f16(int x) => null; -Function(core.List x0) f17(int x) => null; -void Function(int x0, [int x1]) f18(int x) => null; -void Function(int x0, {List x}) f19(int x) => - null; -int Function(int x) f20(int x) => null; -core.List Function(Function x) f21(int x) => - null; -A Function(List x) f22(int x) => null; -List Function(B x) f23(int x) => null; - -class U35 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int x0, [core.List x]) x0; - List Function([List x]) x1; - List Function(Function x) x2; - Function() x3; - Function(core.List x) x4; - int Function(int x2, [Function x3]) Function(int x) x5; - int Function(int x1, {core.List x}) Function( - int x) x6; - Function Function(Function x) Function(int x) x7; - Function Function(int y, [core.List x]) - Function(int x) x8; - List Function([int x1]) Function(int x) x9; - List Function({List x}) Function( - int x) x10; - List Function() Function(int x) x11; - core.List Function(int x1, [List x]) - Function(int x) x12; - core.List Function([List x1]) Function(int x) - x13; - List Function(int x, [Function x1]) Function(int x) - x14; - List Function(int y, {core.List x}) Function( - int x) x15; - Function([Function x]) Function(int x) x16; - Function(core.List x1) Function(int x) x17; - void Function(int x2, [int x3]) Function(int x) x18; - void Function(int x1, {List x}) Function(int x) - x19; - int Function(int x) Function(int x) x20; - core.List Function(Function x) Function( - int x) x21; - A Function(List x) Function(int x) x22; - List Function(B x) Function(int x) x23; - - U35({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int x0, [core.List x]) => null; - List m1([List x]) => null; - List m2(Function x) => null; - m3() => null; - m4(core.List x) => null; - int Function(int x0, [Function x1]) m5(int x) => null; - int Function(int x0, {core.List x}) m6(int x) => - null; - Function Function(Function x) m7(int x) => null; - Function Function(int y, [core.List x]) m8( - int x) => - null; - List Function([int x0]) m9(int x) => null; - List Function({List x}) m10(int x) => - null; - List Function() m11(int x) => null; - core.List Function(int x0, [List x]) - m12(int x) => null; - core.List Function([List x0]) m13(int x) => - null; - List Function(int x, [Function x0]) m14(int x) => null; - List Function(int y, {core.List x}) m15( - int x) => - null; - Function([Function x]) m16(int x) => null; - Function(core.List x0) m17(int x) => null; - void Function(int x0, [int x1]) m18(int x) => null; - void Function(int x0, {List x}) m19(int x) => - null; - int Function(int x) m20(int x) => null; - core.List Function(Function x) m21(int x) => - null; - A Function(List x) m22(int x) => null; - List Function(B x) m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int x0, [core.List x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int x0, [core.List x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int x0, [core.List x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function([List x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function([List x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function([List x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(Function x) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(Function x) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(Function x)); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// Function() - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function() l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function()); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// Function(core.List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - Function(core.List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is Function(core.List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x2, [Function x3]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x2, [Function x3]) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x2, [Function x3]) - Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x1, {core.List x}) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x1, {core.List x}) Function( - int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int x1, {core.List x}) - Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(Function x) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(Function x) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(Function x) - Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int y, [core.List x]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int y, [core.List x]) - Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int y, [core.List x]) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function([int x1]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function([int x1]) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function([int x1]) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function({List x}) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function({List x}) Function( - int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function({List x}) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function() Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function() Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is List Function() Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x1, [List x]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x1, [List x]) - Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x1, - [List x]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function([List x1]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function([List x1]) Function( - int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function([List x1]) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x, [Function x1]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x, [Function x1]) Function(int x) - l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int x, [Function x1]) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int y, {core.List x}) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int y, {core.List x}) - Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int y, {core.List x}) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function([Function x]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function([Function x]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function([Function x]) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(core.List x1) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(core.List x1) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(core.List x1) - Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x2, [int x3]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x2, [int x3]) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x2, [int x3]) - Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x1, {List x}) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x1, {List x}) Function( - int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x1, {List x}) - Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(int x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(int x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is int Function(int x) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(Function x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(Function x) Function( - int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function(Function x) - Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(List x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is A Function(List x) - Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// List Function(B x) Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - List Function(B x) Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue( - m23 is List Function(B x) Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U35().runTests(); - new U35(tIsInt: true).runTests(); - new U35(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type36_test.dart b/tests/language_2/function_type/function_type36_test.dart deleted file mode 100644 index 5ba9e98d350..00000000000 --- a/tests/language_2/function_type/function_type36_test.dart +++ /dev/null @@ -1,871 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int y, [core.List x]); -typedef F1 = List Function(int x0, [List x]); -typedef F2 = List Function([Function x]); -typedef F3 = void Function(int x); -typedef F4 = Function(List x); -typedef F5 = int Function(int x, [Function x2]) Function(); -typedef F6 = int Function(int y, {core.List x}) Function(); -typedef F7 = Function Function([Function x]) Function(); -typedef F8 = Function Function(core.List x0) Function(); -typedef F9 = List Function(int x1, [int x2]) Function(); -typedef F10 = List Function(int x0, {List x}) Function(); -typedef F11 = core.List Function(int x) Function(); -typedef F12 = core.List Function(int y, [List x]) - Function(); -typedef F13 = core.List Function(int x1, [List x2]) Function(); -typedef F14 = List Function({Function x}) Function(); -typedef F15 = List Function(List x) Function(); -typedef F16 = Function(int x0, [Function x]) Function(); -typedef F17 = Function([core.List x1]) Function(); -typedef F18 = void Function(int x, [int x2]) Function(); -typedef F19 = void Function(int y, {List x}) Function(); -typedef F20 = int Function(Function x) Function(); -typedef F21 = core.List Function(List x) Function(); -typedef F22 = A Function(core.List x) Function(); -typedef F23 = void Function(B x) Function(); - -int f0(int y, [core.List x]) => null; -List f1(int x0, [List x]) => null; -List f2([Function x]) => null; -void f3(int x) => null; -f4(List x) => null; -int Function(int x, [Function x0]) f5() => null; -int Function(int y, {core.List x}) f6() => null; -Function Function([Function x]) f7() => null; -Function Function(core.List x0) f8() => null; -List Function(int x0, [int x1]) f9() => null; -List Function(int x0, {List x}) f10() => null; -core.List Function(int x) f11() => null; -core.List Function(int y, [List x]) f12() => null; -core.List Function(int x0, [List x1]) f13() => null; -List Function({Function x}) f14() => null; -List Function(List x) f15() => null; -Function(int x0, [Function x]) f16() => null; -Function([core.List x0]) f17() => null; -void Function(int x, [int x0]) f18() => null; -void Function(int y, {List x}) f19() => null; -int Function(Function x) f20() => null; -core.List Function(List x) f21() => null; -A Function(core.List x) f22() => null; -void Function(B x) f23() => null; - -class U36 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int y, [core.List x]) x0; - List Function(int x0, [List x]) x1; - List Function([Function x]) x2; - void Function(int x) x3; - Function(List x) x4; - int Function(int x, [Function x2]) Function() x5; - int Function(int y, {core.List x}) Function() x6; - Function Function([Function x]) Function() x7; - Function Function(core.List x0) Function() x8; - List Function(int x1, [int x2]) Function() x9; - List Function(int x0, {List x}) Function() x10; - core.List Function(int x) Function() x11; - core.List Function(int y, [List x]) Function() x12; - core.List Function(int x1, [List x2]) Function() x13; - List Function({Function x}) Function() x14; - List Function(List x) Function() x15; - Function(int x0, [Function x]) Function() x16; - Function([core.List x1]) Function() x17; - void Function(int x, [int x2]) Function() x18; - void Function(int y, {List x}) Function() x19; - int Function(Function x) Function() x20; - core.List Function(List x) Function() x21; - A Function(core.List x) Function() x22; - void Function(B x) Function() x23; - - U36({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int y, [core.List x]) => null; - List m1(int x0, [List x]) => null; - List m2([Function x]) => null; - void m3(int x) => null; - m4(List x) => null; - int Function(int x, [Function x0]) m5() => null; - int Function(int y, {core.List x}) m6() => null; - Function Function([Function x]) m7() => null; - Function Function(core.List x0) m8() => null; - List Function(int x0, [int x1]) m9() => null; - List Function(int x0, {List x}) m10() => null; - core.List Function(int x) m11() => null; - core.List Function(int y, [List x]) m12() => null; - core.List Function(int x0, [List x1]) m13() => null; - List Function({Function x}) m14() => null; - List Function(List x) m15() => null; - Function(int x0, [Function x]) m16() => null; - Function([core.List x0]) m17() => null; - void Function(int x, [int x0]) m18() => null; - void Function(int y, {List x}) m19() => null; - int Function(Function x) m20() => null; - core.List Function(List x) m21() => null; - A Function(core.List x) m22() => null; - void Function(B x) m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int y, [core.List x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int y, [core.List x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int y, [core.List x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int x0, [List x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int x0, [List x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int x0, [List x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function([Function x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function([Function x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function([Function x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int x) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int x) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int x)); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - // The static function has its T always set to int. - Expect.isTrue(f4 is F4); - Expect.isFalse(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - Expect.isFalse(confuse(f4) is F4); - if (tIsBool) { - Expect.throws(() { - x4 = (f4 as dynamic); - }); - Expect.throws(() { - x4 = confuse(f4); - }); - Expect.throws(() { - l4 = (f4 as dynamic); - }); - Expect.throws(() { - l4 = confuse(f4); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m4 is F4); - Expect.equals(true, m4 is F4); - Expect.equals(true, confuse(m4) is F4); - Expect.equals(true, confuse(m4) is F4); - } - } - - /// int Function(int x, [Function x2]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x, [Function x2]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x, [Function x2]) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int y, {core.List x}) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int y, {core.List x}) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function(int y, {core.List x}) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function([Function x]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function([Function x]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function([Function x]) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(core.List x0) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(core.List x0) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(core.List x0) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x1, [int x2]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x1, [int x2]) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x1, [int x2]) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x0, {List x}) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x0, {List x}) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue( - m10 is List Function(int x0, {List x}) Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int x) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int y, [List x]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int y, [List x]) Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int y, [List x]) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int x1, [List x2]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int x1, [List x2]) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue( - m13 is core.List Function(int x1, [List x2]) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function({Function x}) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function({Function x}) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function({Function x}) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(List x) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(List x) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(List x) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x0, [Function x]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x0, [Function x]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x0, [Function x]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function([core.List x1]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function([core.List x1]) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function([core.List x1]) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x, [int x2]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x, [int x2]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x, [int x2]) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int y, {List x}) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int y, {List x}) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int y, {List x}) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(Function x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(Function x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is int Function(Function x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(List x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is core.List Function(List x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(core.List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(core.List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is A Function(core.List x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// void Function(B x) Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - void Function(B x) Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is void Function(B x) Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U36().runTests(); - new U36(tIsInt: true).runTests(); - new U36(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type37_test.dart b/tests/language_2/function_type/function_type37_test.dart deleted file mode 100644 index 9f2b14d910b..00000000000 --- a/tests/language_2/function_type/function_type37_test.dart +++ /dev/null @@ -1,853 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(core.List x0); -typedef F1 = List Function(int y, [List x]); -typedef F2 = List Function(int x0, [Function x]); -typedef F3 = void Function([int x]); -typedef F4 = Function(); -typedef F5 = int Function(int x, [Function x1]) Function(int x); -typedef F6 = int Function(int y, {core.List x}) Function(int x); -typedef F7 = Function Function([Function x]) Function(int x); -typedef F8 = Function Function(core.List x1) Function(int x); -typedef F9 = List Function(int x2, [int x3]) Function(int x); -typedef F10 = List Function(int x1, {List x}) Function( - int x); -typedef F11 = core.List Function(int x) Function(int x); -typedef F12 = core.List Function(int y, [List x]) - Function(int x); -typedef F13 = core.List Function(int x2, [List x3]) Function( - int x); -typedef F14 = List Function({Function x}) Function(int x); -typedef F15 = List Function(List x) Function(int x); -typedef F16 = Function(int x1, [Function x]) Function(int x); -typedef F17 = Function([core.List x1]) Function(int x); -typedef F18 = void Function(int x, [int x1]) Function(int x); -typedef F19 = void Function(int y, {List x}) Function(int x); -typedef F20 = int Function(Function x) Function(int x); -typedef F21 = core.List Function(List x) Function( - int x); -typedef F22 = A Function(core.List x) Function(int x); -typedef F23 = void Function(B x) Function(int x); - -int f0(core.List x0) => null; -List f1(int y, [List x]) => null; -List f2(int x0, [Function x]) => null; -void f3([int x]) => null; -f4() => null; -int Function(int x, [Function x0]) f5(int x) => null; -int Function(int y, {core.List x}) f6(int x) => null; -Function Function([Function x]) f7(int x) => null; -Function Function(core.List x0) f8(int x) => null; -List Function(int x0, [int x1]) f9(int x) => null; -List Function(int x0, {List x}) f10(int x) => null; -core.List Function(int x) f11(int x) => null; -core.List Function(int y, [List x]) f12(int x) => null; -core.List Function(int x0, [List x1]) f13(int x) => null; -List Function({Function x}) f14(int x) => null; -List Function(List x) f15(int x) => null; -Function(int x0, [Function x]) f16(int x) => null; -Function([core.List x0]) f17(int x) => null; -void Function(int x, [int x0]) f18(int x) => null; -void Function(int y, {List x}) f19(int x) => null; -int Function(Function x) f20(int x) => null; -core.List Function(List x) f21(int x) => null; -A Function(core.List x) f22(int x) => null; -void Function(B x) f23(int x) => null; - -class U37 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(core.List x0) x0; - List Function(int y, [List x]) x1; - List Function(int x0, [Function x]) x2; - void Function([int x]) x3; - Function() x4; - int Function(int x, [Function x1]) Function(int x) x5; - int Function(int y, {core.List x}) Function(int x) x6; - Function Function([Function x]) Function(int x) x7; - Function Function(core.List x1) Function(int x) x8; - List Function(int x2, [int x3]) Function(int x) x9; - List Function(int x1, {List x}) Function(int x) x10; - core.List Function(int x) Function(int x) x11; - core.List Function(int y, [List x]) Function(int x) x12; - core.List Function(int x2, [List x3]) Function(int x) x13; - List Function({Function x}) Function(int x) x14; - List Function(List x) Function(int x) x15; - Function(int x1, [Function x]) Function(int x) x16; - Function([core.List x1]) Function(int x) x17; - void Function(int x, [int x1]) Function(int x) x18; - void Function(int y, {List x}) Function(int x) x19; - int Function(Function x) Function(int x) x20; - core.List Function(List x) Function(int x) x21; - A Function(core.List x) Function(int x) x22; - void Function(B x) Function(int x) x23; - - U37({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(core.List x0) => null; - List m1(int y, [List x]) => null; - List m2(int x0, [Function x]) => null; - void m3([int x]) => null; - m4() => null; - int Function(int x, [Function x0]) m5(int x) => null; - int Function(int y, {core.List x}) m6(int x) => null; - Function Function([Function x]) m7(int x) => null; - Function Function(core.List x0) m8(int x) => null; - List Function(int x0, [int x1]) m9(int x) => null; - List Function(int x0, {List x}) m10(int x) => null; - core.List Function(int x) m11(int x) => null; - core.List Function(int y, [List x]) m12(int x) => null; - core.List Function(int x0, [List x1]) m13(int x) => null; - List Function({Function x}) m14(int x) => null; - List Function(List x) m15(int x) => null; - Function(int x0, [Function x]) m16(int x) => null; - Function([core.List x0]) m17(int x) => null; - void Function(int x, [int x0]) m18(int x) => null; - void Function(int y, {List x}) m19(int x) => null; - int Function(Function x) m20(int x) => null; - core.List Function(List x) m21(int x) => null; - A Function(core.List x) m22(int x) => null; - void Function(B x) m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(core.List x0) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(core.List x0) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(core.List x0)); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int y, [List x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int y, [List x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int y, [List x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int x0, [Function x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int x0, [Function x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int x0, [Function x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function([int x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function([int x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function([int x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x, [Function x1]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x, [Function x1]) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x, [Function x1]) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int y, {core.List x}) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int y, {core.List x}) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function(int y, {core.List x}) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function([Function x]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function([Function x]) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function([Function x]) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(core.List x1) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(core.List x1) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function(core.List x1) Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x2, [int x3]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x2, [int x3]) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is List Function(int x2, [int x3]) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x1, {List x}) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x1, {List x}) Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x1, {List x}) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int x) Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int y, [List x]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int y, [List x]) Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int y, [List x]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int x2, [List x3]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int x2, [List x3]) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int x2, [List x3]) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function({Function x}) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function({Function x}) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function({Function x}) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(List x) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(List x) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(List x) Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x1, [Function x]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x1, [Function x]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x1, [Function x]) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function([core.List x1]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function([core.List x1]) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function([core.List x1]) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x, [int x1]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x, [int x1]) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x, [int x1]) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int y, {List x}) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int y, {List x}) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function(int y, {List x}) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(Function x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(Function x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is int Function(Function x) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(List x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function(List x) - Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(core.List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(core.List x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is A Function(core.List x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// void Function(B x) Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - void Function(B x) Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue( - m23 is void Function(B x) Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U37().runTests(); - new U37(tIsInt: true).runTests(); - new U37(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type38_test.dart b/tests/language_2/function_type/function_type38_test.dart deleted file mode 100644 index 26cc22af015..00000000000 --- a/tests/language_2/function_type/function_type38_test.dart +++ /dev/null @@ -1,888 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function([core.List x1]); -typedef F1 = List Function(List x0); -typedef F2 = List Function(int y, [Function x]); -typedef F3 = void Function(int x0, [int x]); -typedef F4 = Function(A x); -typedef F5 = int Function(int x, [Function x1]) - Function(); -typedef F6 = int Function(int y, {core.List x}) - Function(); -typedef F7 = Function Function([Function x]) Function(); -typedef F8 = Function Function(core.List x1) - Function(); -typedef F9 = List Function(int x2, [int x3]) - Function(); -typedef F10 = List Function(int x1, {List x}) - Function(); -typedef F11 = core.List Function(int x) - Function(); -typedef F12 = core.List Function(int y, [List x]) - Function(); -typedef F13 = core.List Function(int x2, [List x3]) - Function(); -typedef F14 = List Function({Function x}) Function(); -typedef F15 = List Function(List x) Function(); -typedef F16 = Function(int x1, [Function x]) Function(); -typedef F17 = Function([core.List x1]) - Function(); -typedef F18 = void Function(int x, [int x1]) Function(); -typedef F19 = void Function(int y, {List x}) - Function(); -typedef F20 = int Function(Function x) Function(); -typedef F21 = core.List Function(List x) - Function(); -typedef F22 = A Function(core.List x) - Function(); -typedef F23 = B Function(int x) Function(); - -int f0([core.List x0]) => null; -List f1(List x0) => null; -List f2(int y, [Function x]) => null; -void f3(int x0, [int x]) => null; -f4(A x) => null; -int Function(int x, [Function x0]) f5() => null; -int Function(int y, {core.List x}) f6() => null; -Function Function([Function x]) f7() => null; -Function Function(core.List x0) f8() => null; -List Function(int x0, [int x1]) f9() => null; -List Function(int x0, {List x}) f10() => - null; -core.List Function(int x) f11() => null; -core.List Function(int y, [List x]) - f12() => null; -core.List Function(int x0, [List x1]) - f13() => null; -List Function({Function x}) f14() => null; -List Function(List x) f15() => null; -Function(int x0, [Function x]) f16() => null; -Function([core.List x0]) f17() => null; -void Function(int x, [int x0]) f18() => null; -void Function(int y, {List x}) f19() => null; -int Function(Function x) f20() => null; -core.List Function(List x) f21() => - null; -A Function(core.List x) f22() => null; -B Function(int x) f23() => null; - -class U38 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function([core.List x1]) x0; - List Function(List x0) x1; - List Function(int y, [Function x]) x2; - void Function(int x0, [int x]) x3; - Function(A x) x4; - int Function(int x, [Function x1]) Function() x5; - int Function(int y, {core.List x}) Function() - x6; - Function Function([Function x]) Function() x7; - Function Function(core.List x1) Function() x8; - List Function(int x2, [int x3]) Function() x9; - List Function(int x1, {List x}) - Function() x10; - core.List Function(int x) Function() x11; - core.List Function(int y, [List x]) - Function() x12; - core.List Function(int x2, [List x3]) - Function() x13; - List Function({Function x}) Function() x14; - List Function(List x) Function() x15; - Function(int x1, [Function x]) Function() x16; - Function([core.List x1]) Function() x17; - void Function(int x, [int x1]) Function() x18; - void Function(int y, {List x}) Function() x19; - int Function(Function x) Function() x20; - core.List Function(List x) - Function() x21; - A Function(core.List x) Function() x22; - B Function(int x) Function() x23; - - U38({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0([core.List x0]) => null; - List m1(List x0) => null; - List m2(int y, [Function x]) => null; - void m3(int x0, [int x]) => null; - m4(A x) => null; - int Function(int x, [Function x0]) m5() => null; - int Function(int y, {core.List x}) m6() => null; - Function Function([Function x]) m7() => null; - Function Function(core.List x0) m8() => null; - List Function(int x0, [int x1]) m9() => null; - List Function(int x0, {List x}) - m10() => null; - core.List Function(int x) m11() => null; - core.List Function(int y, [List x]) - m12() => null; - core.List Function(int x0, [List x1]) - m13() => null; - List Function({Function x}) m14() => null; - List Function(List x) m15() => null; - Function(int x0, [Function x]) m16() => null; - Function([core.List x0]) m17() => null; - void Function(int x, [int x0]) m18() => null; - void Function(int y, {List x}) m19() => null; - int Function(Function x) m20() => null; - core.List Function(List x) m21() => - null; - A Function(core.List x) m22() => null; - B Function(int x) m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function([core.List x1]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function([core.List x1]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function([core.List x1])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(List x0) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(List x0) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(List x0)); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int y, [Function x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int y, [Function x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int y, [Function x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int x0, [int x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int x0, [int x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int x0, [int x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// Function(A x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - Function(A x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is Function(A x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x, [Function x1]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x, [Function x1]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x, [Function x1]) - Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int y, {core.List x}) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int y, {core.List x}) Function() - l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int y, {core.List x}) - Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function([Function x]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function([Function x]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue( - m7 is Function Function([Function x]) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(core.List x1) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(core.List x1) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(core.List x1) - Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x2, [int x3]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x2, [int x3]) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x2, [int x3]) - Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x1, {List x}) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x1, {List x}) - Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x1, {List x}) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int x) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int y, [List x]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int y, [List x]) - Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int y, [List x]) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int x2, [List x3]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int x2, [List x3]) - Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int x2, [List x3]) - Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function({Function x}) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function({Function x}) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function({Function x}) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(List x) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(List x) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue( - m15 is List Function(List x) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x1, [Function x]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x1, [Function x]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function(int x1, [Function x]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function([core.List x1]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function([core.List x1]) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function([core.List x1]) - Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x, [int x1]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x, [int x1]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue( - m18 is void Function(int x, [int x1]) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int y, {List x}) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int y, {List x}) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int y, {List x}) - Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(Function x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(Function x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is int Function(Function x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(List x) - Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function(List x) - Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(core.List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(core.List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is A Function(core.List x) - Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// B Function(int x) Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - B Function(int x) Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is B Function(int x) Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U38().runTests(); - new U38(tIsInt: true).runTests(); - new U38(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type39_test.dart b/tests/language_2/function_type/function_type39_test.dart deleted file mode 100644 index a0792677650..00000000000 --- a/tests/language_2/function_type/function_type39_test.dart +++ /dev/null @@ -1,913 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int x1, [core.List x2]); -typedef F1 = List Function([List x1]); -typedef F2 = List Function(Function x0); -typedef F3 = void Function(int y, [int x]); -typedef F4 = Function(List x); -typedef F5 = int Function(int x, [Function x1]) Function( - int x); -typedef F6 = int Function(int y, {core.List x}) - Function(int x); -typedef F7 = Function Function([Function x]) Function( - int x); -typedef F8 = Function Function(core.List x1) - Function(int x); -typedef F9 = List Function(int x2, [int x3]) - Function(int x); -typedef F10 = List Function(int x1, {List x}) - Function(int x); -typedef F11 = core.List Function(int x) - Function(int x); -typedef F12 = core.List Function(int y, [List x]) - Function(int x); -typedef F13 = core.List Function(int x2, [List x3]) - Function(int x); -typedef F14 = List Function({Function x}) Function( - int x); -typedef F15 = List Function(List x) Function( - int x); -typedef F16 = Function(int x1, [Function x]) Function( - int x); -typedef F17 = Function([core.List x1]) - Function(int x); -typedef F18 = void Function(int x, [int x1]) Function( - int x); -typedef F19 = void Function(int y, {List x}) - Function(int x); -typedef F20 = int Function(Function x) Function( - int x); -typedef F21 = core.List Function(List x) - Function(int x); -typedef F22 = A Function(core.List x) - Function(int x); -typedef F23 = B Function(int x) Function(int x); - -int f0(int x0, [core.List x1]) => null; -List f1([List x0]) => null; -List f2(Function x0) => null; -void f3(int y, [int x]) => null; -f4(List x) => null; -int Function(int x, [Function x0]) f5(int x) => null; -int Function(int y, {core.List x}) f6(int x) => - null; -Function Function([Function x]) f7(int x) => null; -Function Function(core.List x0) f8(int x) => null; -List Function(int x0, [int x1]) f9(int x) => null; -List Function(int x0, {List x}) f10( - int x) => - null; -core.List Function(int x) f11(int x) => null; -core.List Function(int y, [List x]) f12( - int x) => - null; -core.List Function(int x0, [List x1]) f13( - int x) => - null; -List Function({Function x}) f14(int x) => null; -List Function(List x) f15(int x) => null; -Function(int x0, [Function x]) f16(int x) => null; -Function([core.List x0]) f17(int x) => null; -void Function(int x, [int x0]) f18(int x) => null; -void Function(int y, {List x}) f19(int x) => null; -int Function(Function x) f20(int x) => null; -core.List Function(List x) f21( - int x) => - null; -A Function(core.List x) f22(int x) => null; -B Function(int x) f23(int x) => null; - -class U39 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int x1, [core.List x2]) x0; - List Function([List x1]) x1; - List Function(Function x0) x2; - void Function(int y, [int x]) x3; - Function(List x) x4; - int Function(int x, [Function x1]) Function(int x) x5; - int Function(int y, {core.List x}) Function( - int x) x6; - Function Function([Function x]) Function(int x) x7; - Function Function(core.List x1) Function(int x) - x8; - List Function(int x2, [int x3]) Function(int x) - x9; - List Function(int x1, {List x}) - Function(int x) x10; - core.List Function(int x) Function(int x) x11; - core.List Function(int y, [List x]) - Function(int x) x12; - core.List Function(int x2, [List x3]) - Function(int x) x13; - List Function({Function x}) Function(int x) x14; - List Function(List x) Function(int x) x15; - Function(int x1, [Function x]) Function(int x) x16; - Function([core.List x1]) Function(int x) x17; - void Function(int x, [int x1]) Function(int x) x18; - void Function(int y, {List x}) Function(int x) - x19; - int Function(Function x) Function(int x) x20; - core.List Function(List x) - Function(int x) x21; - A Function(core.List x) Function(int x) x22; - B Function(int x) Function(int x) x23; - - U39({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int x0, [core.List x1]) => null; - List m1([List x0]) => null; - List m2(Function x0) => null; - void m3(int y, [int x]) => null; - m4(List x) => null; - int Function(int x, [Function x0]) m5(int x) => null; - int Function(int y, {core.List x}) m6(int x) => - null; - Function Function([Function x]) m7(int x) => null; - Function Function(core.List x0) m8(int x) => - null; - List Function(int x0, [int x1]) m9(int x) => - null; - List Function(int x0, {List x}) m10( - int x) => - null; - core.List Function(int x) m11(int x) => null; - core.List Function(int y, [List x]) - m12(int x) => null; - core.List Function(int x0, [List x1]) m13( - int x) => - null; - List Function({Function x}) m14(int x) => null; - List Function(List x) m15(int x) => null; - Function(int x0, [Function x]) m16(int x) => null; - Function([core.List x0]) m17(int x) => null; - void Function(int x, [int x0]) m18(int x) => null; - void Function(int y, {List x}) m19(int x) => - null; - int Function(Function x) m20(int x) => null; - core.List Function(List x) m21( - int x) => - null; - A Function(core.List x) m22(int x) => null; - B Function(int x) m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int x1, [core.List x2]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int x1, [core.List x2]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int x1, [core.List x2])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function([List x1]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function([List x1]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function([List x1])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(Function x0) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(Function x0) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(Function x0)); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int y, [int x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int y, [int x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int y, [int x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x, [Function x1]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x, [Function x1]) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x, [Function x1]) - Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int y, {core.List x}) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int y, {core.List x}) Function( - int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int y, {core.List x}) - Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function([Function x]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function([Function x]) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function([Function x]) - Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(core.List x1) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(core.List x1) Function( - int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(core.List x1) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x2, [int x3]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x2, [int x3]) Function( - int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x2, [int x3]) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x1, {List x}) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x1, {List x}) - Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x1, {List x}) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int x) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int y, [List x]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int y, [List x]) - Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int y, [List x]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int x2, [List x3]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int x2, [List x3]) - Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int x2, [List x3]) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function({Function x}) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function({Function x}) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function({Function x}) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(List x) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(List x) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue( - m15 is List Function(List x) Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x1, [Function x]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x1, [Function x]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x1, [Function x]) - Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function([core.List x1]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function([core.List x1]) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function([core.List x1]) - Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x, [int x1]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x, [int x1]) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x, [int x1]) - Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int y, {List x}) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int y, {List x}) Function(int x) - l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int y, {List x}) - Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(Function x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(Function x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is int Function(Function x) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(List x) - Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function(List x) - Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(core.List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(core.List x) Function(int x) - l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is A Function(core.List x) - Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// B Function(int x) Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - B Function(int x) Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is B Function(int x) Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U39().runTests(); - new U39(tIsInt: true).runTests(); - new U39(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type3_test.dart b/tests/language_2/function_type/function_type3_test.dart deleted file mode 100644 index 52ae455adb4..00000000000 --- a/tests/language_2/function_type/function_type3_test.dart +++ /dev/null @@ -1,988 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int y, [int x]); -typedef F1 = Function Function(int y, [List x]); -typedef F2 = core.List Function(int x0, [core.List x]); -typedef F3 = Function([List x]); -typedef F4 = Function Function(core.List x); -typedef F5 = int Function(int x1, {int x}) Function( - int x); -typedef F6 = int Function([core.List x]) - Function(int x); -typedef F7 = Function Function(int y, [int x]) Function( - int x); -typedef F8 = Function Function(int x2, [List x3]) - Function(int x); -typedef F9 = Function Function(int x1, {List x}) - Function(int x); -typedef F10 = List Function(List x) - Function(int x); -typedef F11 = List Function(int y, [List x]) - Function(int x); -typedef F12 = core.List Function([Function x1]) - Function(int x); -typedef F13 = core.List Function({core.List x}) - Function(int x); -typedef F14 = List Function(int y, {int x}) Function( - int x); -typedef F15 = List Function(int x1, [core.List x]) - Function(int x); -typedef F16 = Function(int x1) Function(int x); -typedef F17 = Function(int x, [List x1]) - Function(int x); -typedef F18 = Function(int y, {List x}) Function( - int x); -typedef F19 = void Function([List x]) Function( - int x); -typedef F20 = void Function(List x1) Function(int x); -typedef F21 = List Function(Function x) - Function(int x); -typedef F22 = Function(List x) Function( - int x); -typedef F23 = void Function(core.List x) - Function(int x); - -int f0(int y, [int x]) => null; -Function f1(int y, [List x]) => null; -core.List f2(int x0, [core.List x]) => null; -f3([List x]) => null; -Function f4(core.List x) => null; -int Function(int x0, {int x}) f5(int x) => null; -int Function([core.List x]) f6(int x) => null; -Function Function(int y, [int x]) f7(int x) => null; -Function Function(int x0, [List x1]) f8(int x) => - null; -Function Function(int x0, {List x}) f9(int x) => null; -List Function(List x) f10(int x) => - null; -List Function(int y, [List x]) f11(int x) => - null; -core.List Function([Function x0]) f12(int x) => - null; -core.List Function({core.List x}) f13( - int x) => - null; -List Function(int y, {int x}) f14(int x) => null; -List Function(int x0, [core.List x]) f15( - int x) => - null; -Function(int x0) f16(int x) => null; -Function(int x, [List x0]) f17(int x) => null; -Function(int y, {List x}) f18(int x) => null; -void Function([List x]) f19(int x) => null; -void Function(List x0) f20(int x) => null; -List Function(Function x) f21(int x) => null; -Function(List x) f22(int x) => null; -void Function(core.List x) f23(int x) => null; - -class U3 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int y, [int x]) x0; - Function Function(int y, [List x]) x1; - core.List Function(int x0, [core.List x]) x2; - Function([List x]) x3; - Function Function(core.List x) x4; - int Function(int x1, {int x}) Function(int x) x5; - int Function([core.List x]) Function(int x) x6; - Function Function(int y, [int x]) Function(int x) x7; - Function Function(int x2, [List x3]) Function( - int x) x8; - Function Function(int x1, {List x}) Function(int x) x9; - List Function(List x) Function(int x) - x10; - List Function(int y, [List x]) Function( - int x) x11; - core.List Function([Function x1]) Function( - int x) x12; - core.List Function({core.List x}) - Function(int x) x13; - List Function(int y, {int x}) Function(int x) x14; - List Function(int x1, [core.List x]) - Function(int x) x15; - Function(int x1) Function(int x) x16; - Function(int x, [List x1]) Function(int x) x17; - Function(int y, {List x}) Function(int x) x18; - void Function([List x]) Function(int x) x19; - void Function(List x1) Function(int x) x20; - List Function(Function x) Function(int x) - x21; - Function(List x) Function(int x) x22; - void Function(core.List x) Function(int x) - x23; - - U3({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int y, [int x]) => null; - Function m1(int y, [List x]) => null; - core.List m2(int x0, [core.List x]) => null; - m3([List x]) => null; - Function m4(core.List x) => null; - int Function(int x0, {int x}) m5(int x) => null; - int Function([core.List x]) m6(int x) => null; - Function Function(int y, [int x]) m7(int x) => null; - Function Function(int x0, [List x1]) m8( - int x) => - null; - Function Function(int x0, {List x}) m9(int x) => null; - List Function(List x) m10(int x) => - null; - List Function(int y, [List x]) m11(int x) => - null; - core.List Function([Function x0]) m12(int x) => - null; - core.List Function({core.List x}) m13( - int x) => - null; - List Function(int y, {int x}) m14(int x) => null; - List Function(int x0, [core.List x]) m15( - int x) => - null; - Function(int x0) m16(int x) => null; - Function(int x, [List x0]) m17(int x) => null; - Function(int y, {List x}) m18(int x) => null; - void Function([List x]) m19(int x) => null; - void Function(List x0) m20(int x) => null; - List Function(Function x) m21(int x) => null; - Function(List x) m22(int x) => null; - void Function(core.List x) m23(int x) => - null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int y, [int x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int y, [int x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int y, [int x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// Function Function(int y, [List x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - Function Function(int y, [List x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is Function Function(int y, [List x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - // The static function has its T always set to int. - Expect.isTrue(f1 is F1); - Expect.isFalse(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - Expect.isFalse(confuse(f1) is F1); - if (tIsBool) { - Expect.throws(() { - x1 = (f1 as dynamic); - }); - Expect.throws(() { - x1 = confuse(f1); - }); - Expect.throws(() { - l1 = (f1 as dynamic); - }); - Expect.throws(() { - l1 = confuse(f1); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m1 is F1); - Expect.equals(true, m1 is F1); - Expect.equals(true, confuse(m1) is F1); - Expect.equals(true, confuse(m1) is F1); - } - } - - /// core.List Function(int x0, [core.List x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function(int x0, [core.List x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue( - m2 is core.List Function(int x0, [core.List x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// Function([List x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function([List x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function([List x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// Function Function(core.List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - Function Function(core.List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is Function Function(core.List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x1, {int x}) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x1, {int x}) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x1, {int x}) - Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function([core.List x]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function([core.List x]) Function(int x) - l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function([core.List x]) - Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int y, [int x]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int y, [int x]) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int y, [int x]) - Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x2, [List x3]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x2, [List x3]) Function( - int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x2, [List x3]) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// Function Function(int x1, {List x}) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - Function Function(int x1, {List x}) Function(int x) - l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is Function Function(int x1, {List x}) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - // The static function has its T always set to int. - Expect.isTrue(f9 is F9); - Expect.isFalse(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - Expect.isFalse(confuse(f9) is F9); - if (tIsBool) { - Expect.throws(() { - x9 = (f9 as dynamic); - }); - Expect.throws(() { - x9 = confuse(f9); - }); - Expect.throws(() { - l9 = (f9 as dynamic); - }); - Expect.throws(() { - l9 = confuse(f9); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m9 is F9); - Expect.equals(tIsBool, m9 is F9); - Expect.equals(tIsInt, confuse(m9) is F9); - Expect.equals(tIsBool, confuse(m9) is F9); - } - } - - /// List Function(List x) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(List x) Function( - int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(List x) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(int y, [List x]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(int y, [List x]) Function( - int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function(int y, [List x]) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function([Function x1]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function([Function x1]) Function( - int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function([Function x1]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function({core.List x}) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function({core.List x}) - Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function({core.List x}) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - } - - /// List Function(int y, {int x}) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int y, {int x}) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int y, {int x}) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x1, [core.List x]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x1, [core.List x]) - Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x1, [core.List x]) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x1) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x1) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x1) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x, [List x1]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x, [List x1]) Function(int x) - l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x, [List x1]) - Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// Function(int y, {List x}) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - Function(int y, {List x}) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is Function(int y, {List x}) - Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - // The static function has its T always set to int. - Expect.isTrue(f18 is F18); - Expect.isFalse(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - Expect.isFalse(confuse(f18) is F18); - if (tIsBool) { - Expect.throws(() { - x18 = (f18 as dynamic); - }); - Expect.throws(() { - x18 = confuse(f18); - }); - Expect.throws(() { - l18 = (f18 as dynamic); - }); - Expect.throws(() { - l18 = confuse(f18); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m18 is F18); - Expect.equals(tIsBool, m18 is F18); - Expect.equals(tIsInt, confuse(m18) is F18); - Expect.equals(tIsBool, confuse(m18) is F18); - } - } - - /// void Function([List x]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function([List x]) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function([List x]) - Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function(List x1) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function(List x1) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is void Function(List x1) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(Function x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(Function x) Function(int x) - l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(Function x) - Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// Function(List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function(List x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is Function(List x) - Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// void Function(core.List x) Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - void Function(core.List x) Function(int x) - l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is void Function(core.List x) - Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U3().runTests(); - new U3(tIsInt: true).runTests(); - new U3(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type40_test.dart b/tests/language_2/function_type/function_type40_test.dart deleted file mode 100644 index 9bf69105a41..00000000000 --- a/tests/language_2/function_type/function_type40_test.dart +++ /dev/null @@ -1,895 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int x, [core.List x2]); -typedef F1 = List Function(int x1, [List x2]); -typedef F2 = List Function([Function x1]); -typedef F3 = void Function(int x0); -typedef F4 = A Function(int x); -typedef F5 = int Function({Function x}) Function(); -typedef F6 = int Function(List x) Function(); -typedef F7 = Function Function(int x0, [Function x]) Function(); -typedef F8 = Function Function([core.List x1]) Function(); -typedef F9 = List Function(int x, [int x2]) Function(); -typedef F10 = List Function(int y, {List x}) Function(); -typedef F11 = core.List Function([int x]) Function(); -typedef F12 = core.List Function(List x0) Function(); -typedef F13 = core.List Function(int x, [List x2]) Function(); -typedef F14 = List Function(int x0, {Function x}) Function(); -typedef F15 = List Function([List x]) Function(); -typedef F16 = Function(int y, [Function x]) Function(); -typedef F17 = Function(int x1, [core.List x2]) Function(); -typedef F18 = void Function({int x}) Function(); -typedef F19 = void Function(core.List x) Function(); -typedef F20 = int Function(List x) Function(); -typedef F21 = core.List Function(core.List x) - Function(); -typedef F22 = A Function(List x) Function(); -typedef F23 = B Function(Function x) Function(); - -int f0(int x, [core.List x0]) => null; -List f1(int x0, [List x1]) => null; -List f2([Function x0]) => null; -void f3(int x0) => null; -A f4(int x) => null; -int Function({Function x}) f5() => null; -int Function(List x) f6() => null; -Function Function(int x0, [Function x]) f7() => null; -Function Function([core.List x0]) f8() => null; -List Function(int x, [int x0]) f9() => null; -List Function(int y, {List x}) f10() => null; -core.List Function([int x]) f11() => null; -core.List Function(List x0) f12() => null; -core.List Function(int x, [List x0]) f13() => null; -List Function(int x0, {Function x}) f14() => null; -List Function([List x]) f15() => null; -Function(int y, [Function x]) f16() => null; -Function(int x0, [core.List x1]) f17() => null; -void Function({int x}) f18() => null; -void Function(core.List x) f19() => null; -int Function(List x) f20() => null; -core.List Function(core.List x) f21() => null; -A Function(List x) f22() => null; -B Function(Function x) f23() => null; - -class U40 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int x, [core.List x2]) x0; - List Function(int x1, [List x2]) x1; - List Function([Function x1]) x2; - void Function(int x0) x3; - A Function(int x) x4; - int Function({Function x}) Function() x5; - int Function(List x) Function() x6; - Function Function(int x0, [Function x]) Function() x7; - Function Function([core.List x1]) Function() x8; - List Function(int x, [int x2]) Function() x9; - List Function(int y, {List x}) Function() x10; - core.List Function([int x]) Function() x11; - core.List Function(List x0) Function() x12; - core.List Function(int x, [List x2]) Function() x13; - List Function(int x0, {Function x}) Function() x14; - List Function([List x]) Function() x15; - Function(int y, [Function x]) Function() x16; - Function(int x1, [core.List x2]) Function() x17; - void Function({int x}) Function() x18; - void Function(core.List x) Function() x19; - int Function(List x) Function() x20; - core.List Function(core.List x) Function() x21; - A Function(List x) Function() x22; - B Function(Function x) Function() x23; - - U40({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int x, [core.List x0]) => null; - List m1(int x0, [List x1]) => null; - List m2([Function x0]) => null; - void m3(int x0) => null; - A m4(int x) => null; - int Function({Function x}) m5() => null; - int Function(List x) m6() => null; - Function Function(int x0, [Function x]) m7() => null; - Function Function([core.List x0]) m8() => null; - List Function(int x, [int x0]) m9() => null; - List Function(int y, {List x}) m10() => null; - core.List Function([int x]) m11() => null; - core.List Function(List x0) m12() => null; - core.List Function(int x, [List x0]) m13() => null; - List Function(int x0, {Function x}) m14() => null; - List Function([List x]) m15() => null; - Function(int y, [Function x]) m16() => null; - Function(int x0, [core.List x1]) m17() => null; - void Function({int x}) m18() => null; - void Function(core.List x) m19() => null; - int Function(List x) m20() => null; - core.List Function(core.List x) m21() => null; - A Function(List x) m22() => null; - B Function(Function x) m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int x, [core.List x2]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int x, [core.List x2]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int x, [core.List x2])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int x1, [List x2]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int x1, [List x2]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int x1, [List x2])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function([Function x1]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function([Function x1]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function([Function x1])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int x0) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int x0) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int x0)); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// A Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - A Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is A Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function({Function x}) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function({Function x}) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function({Function x}) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(List x) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(List x) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(List x) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int x0, [Function x]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x0, [Function x]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x0, [Function x]) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function([core.List x1]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function([core.List x1]) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function([core.List x1]) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x, [int x2]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x, [int x2]) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x, [int x2]) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int y, {List x}) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int y, {List x}) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue( - m10 is List Function(int y, {List x}) Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function([int x]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function([int x]) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function([int x]) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(List x0) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(List x0) Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue( - m12 is core.List Function(List x0) Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int x, [List x2]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int x, [List x2]) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue( - m13 is core.List Function(int x, [List x2]) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x0, {Function x}) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x0, {Function x}) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int x0, {Function x}) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function([List x]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function([List x]) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function([List x]) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int y, [Function x]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int y, [Function x]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int y, [Function x]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x1, [core.List x2]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x1, [core.List x2]) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x1, [core.List x2]) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function({int x}) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function({int x}) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function({int x}) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(core.List x) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(core.List x) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(core.List x) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(List x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(List x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is int Function(List x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(core.List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(core.List x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function(core.List x) - Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is A Function(List x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - // The static function has its T always set to int. - Expect.isTrue(f22 is F22); - Expect.isFalse(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - Expect.isFalse(confuse(f22) is F22); - if (tIsBool) { - Expect.throws(() { - x22 = (f22 as dynamic); - }); - Expect.throws(() { - x22 = confuse(f22); - }); - Expect.throws(() { - l22 = (f22 as dynamic); - }); - Expect.throws(() { - l22 = confuse(f22); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m22 is F22); - Expect.equals(tIsBool, m22 is F22); - Expect.equals(tIsInt, confuse(m22) is F22); - Expect.equals(tIsBool, confuse(m22) is F22); - } - } - - /// B Function(Function x) Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - B Function(Function x) Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is B Function(Function x) Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U40().runTests(); - new U40(tIsInt: true).runTests(); - new U40(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type41_test.dart b/tests/language_2/function_type/function_type41_test.dart deleted file mode 100644 index 784144bcaf0..00000000000 --- a/tests/language_2/function_type/function_type41_test.dart +++ /dev/null @@ -1,904 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function({core.List x}); -typedef F1 = List Function(int x, [List x2]); -typedef F2 = List Function(int x1, [Function x2]); -typedef F3 = void Function([int x1]); -typedef F4 = A Function(Function x); -typedef F5 = int Function({Function x}) Function(int x); -typedef F6 = int Function(List x) Function(int x); -typedef F7 = Function Function(int x1, [Function x]) Function(int x); -typedef F8 = Function Function([core.List x1]) Function(int x); -typedef F9 = List Function(int x, [int x1]) Function(int x); -typedef F10 = List Function(int y, {List x}) Function( - int x); -typedef F11 = core.List Function([int x]) Function(int x); -typedef F12 = core.List Function(List x1) Function( - int x); -typedef F13 = core.List Function(int x, [List x1]) Function( - int x); -typedef F14 = List Function(int x1, {Function x}) Function(int x); -typedef F15 = List Function([List x]) Function(int x); -typedef F16 = Function(int y, [Function x]) Function(int x); -typedef F17 = Function(int x2, [core.List x3]) Function(int x); -typedef F18 = void Function({int x}) Function(int x); -typedef F19 = void Function(core.List x) Function(int x); -typedef F20 = int Function(List x) Function(int x); -typedef F21 = core.List Function(core.List x) - Function(int x); -typedef F22 = A Function(List x) Function(int x); -typedef F23 = B Function(Function x) Function(int x); - -int f0({core.List x}) => null; -List f1(int x, [List x0]) => null; -List f2(int x0, [Function x1]) => null; -void f3([int x0]) => null; -A f4(Function x) => null; -int Function({Function x}) f5(int x) => null; -int Function(List x) f6(int x) => null; -Function Function(int x0, [Function x]) f7(int x) => null; -Function Function([core.List x0]) f8(int x) => null; -List Function(int x, [int x0]) f9(int x) => null; -List Function(int y, {List x}) f10(int x) => null; -core.List Function([int x]) f11(int x) => null; -core.List Function(List x0) f12(int x) => null; -core.List Function(int x, [List x0]) f13(int x) => null; -List Function(int x0, {Function x}) f14(int x) => null; -List Function([List x]) f15(int x) => null; -Function(int y, [Function x]) f16(int x) => null; -Function(int x0, [core.List x1]) f17(int x) => null; -void Function({int x}) f18(int x) => null; -void Function(core.List x) f19(int x) => null; -int Function(List x) f20(int x) => null; -core.List Function(core.List x) f21(int x) => null; -A Function(List x) f22(int x) => null; -B Function(Function x) f23(int x) => null; - -class U41 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function({core.List x}) x0; - List Function(int x, [List x2]) x1; - List Function(int x1, [Function x2]) x2; - void Function([int x1]) x3; - A Function(Function x) x4; - int Function({Function x}) Function(int x) x5; - int Function(List x) Function(int x) x6; - Function Function(int x1, [Function x]) Function(int x) x7; - Function Function([core.List x1]) Function(int x) x8; - List Function(int x, [int x1]) Function(int x) x9; - List Function(int y, {List x}) Function(int x) x10; - core.List Function([int x]) Function(int x) x11; - core.List Function(List x1) Function(int x) x12; - core.List Function(int x, [List x1]) Function(int x) x13; - List Function(int x1, {Function x}) Function(int x) x14; - List Function([List x]) Function(int x) x15; - Function(int y, [Function x]) Function(int x) x16; - Function(int x2, [core.List x3]) Function(int x) x17; - void Function({int x}) Function(int x) x18; - void Function(core.List x) Function(int x) x19; - int Function(List x) Function(int x) x20; - core.List Function(core.List x) Function(int x) x21; - A Function(List x) Function(int x) x22; - B Function(Function x) Function(int x) x23; - - U41({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0({core.List x}) => null; - List m1(int x, [List x0]) => null; - List m2(int x0, [Function x1]) => null; - void m3([int x0]) => null; - A m4(Function x) => null; - int Function({Function x}) m5(int x) => null; - int Function(List x) m6(int x) => null; - Function Function(int x0, [Function x]) m7(int x) => null; - Function Function([core.List x0]) m8(int x) => null; - List Function(int x, [int x0]) m9(int x) => null; - List Function(int y, {List x}) m10(int x) => null; - core.List Function([int x]) m11(int x) => null; - core.List Function(List x0) m12(int x) => null; - core.List Function(int x, [List x0]) m13(int x) => null; - List Function(int x0, {Function x}) m14(int x) => null; - List Function([List x]) m15(int x) => null; - Function(int y, [Function x]) m16(int x) => null; - Function(int x0, [core.List x1]) m17(int x) => null; - void Function({int x}) m18(int x) => null; - void Function(core.List x) m19(int x) => null; - int Function(List x) m20(int x) => null; - core.List Function(core.List x) m21(int x) => null; - A Function(List x) m22(int x) => null; - B Function(Function x) m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function({core.List x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function({core.List x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function({core.List x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int x, [List x2]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int x, [List x2]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int x, [List x2])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int x1, [Function x2]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int x1, [Function x2]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int x1, [Function x2])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function([int x1]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function([int x1]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function([int x1])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// A Function(Function x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - A Function(Function x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is A Function(Function x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function({Function x}) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function({Function x}) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function({Function x}) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(List x) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(List x) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(List x) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int x1, [Function x]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x1, [Function x]) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue( - m7 is Function Function(int x1, [Function x]) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function([core.List x1]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function([core.List x1]) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function([core.List x1]) Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x, [int x1]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x, [int x1]) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is List Function(int x, [int x1]) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int y, {List x}) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int y, {List x}) Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int y, {List x}) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function([int x]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function([int x]) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function([int x]) Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(List x1) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(List x1) Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue( - m12 is core.List Function(List x1) Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int x, [List x1]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int x, [List x1]) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int x, [List x1]) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x1, {Function x}) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x1, {Function x}) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function(int x1, {Function x}) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function([List x]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function([List x]) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function([List x]) Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int y, [Function x]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int y, [Function x]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int y, [Function x]) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x2, [core.List x3]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x2, [core.List x3]) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue( - m17 is Function(int x2, [core.List x3]) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function({int x}) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function({int x}) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function({int x}) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(core.List x) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(core.List x) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(core.List x) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(List x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(List x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is int Function(List x) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(core.List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(core.List x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function(core.List x) - Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(List x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is A Function(List x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - // The static function has its T always set to int. - Expect.isTrue(f22 is F22); - Expect.isFalse(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - Expect.isFalse(confuse(f22) is F22); - if (tIsBool) { - Expect.throws(() { - x22 = (f22 as dynamic); - }); - Expect.throws(() { - x22 = confuse(f22); - }); - Expect.throws(() { - l22 = (f22 as dynamic); - }); - Expect.throws(() { - l22 = confuse(f22); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m22 is F22); - Expect.equals(tIsBool, m22 is F22); - Expect.equals(tIsInt, confuse(m22) is F22); - Expect.equals(tIsBool, confuse(m22) is F22); - } - } - - /// B Function(Function x) Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - B Function(Function x) Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue( - m23 is B Function(Function x) Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U41().runTests(); - new U41(tIsInt: true).runTests(); - new U41(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type42_test.dart b/tests/language_2/function_type/function_type42_test.dart deleted file mode 100644 index b7bd2e9adb5..00000000000 --- a/tests/language_2/function_type/function_type42_test.dart +++ /dev/null @@ -1,937 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int x0, {core.List x}); -typedef F1 = List Function({List x}); -typedef F2 = List Function(int x, [Function x2]); -typedef F3 = void Function(int x1, [int x2]); -typedef F4 = A Function(List x); -typedef F5 = int Function({Function x}) Function(); -typedef F6 = int Function(List x) Function(); -typedef F7 = Function Function(int x1, [Function x]) - Function(); -typedef F8 = Function Function([core.List x1]) - Function(); -typedef F9 = List Function(int x, [int x1]) - Function(); -typedef F10 = List Function(int y, {List x}) - Function(); -typedef F11 = core.List Function([int x]) - Function(); -typedef F12 = core.List Function(List x1) - Function(); -typedef F13 = core.List Function(int x, [List x1]) - Function(); -typedef F14 = List Function(int x1, {Function x}) - Function(); -typedef F15 = List Function([List x]) Function(); -typedef F16 = Function(int y, [Function x]) Function(); -typedef F17 = Function(int x2, [core.List x3]) - Function(); -typedef F18 = void Function({int x}) Function(); -typedef F19 = void Function(core.List x) - Function(); -typedef F20 = int Function(List x) - Function(); -typedef F21 = core.List Function(core.List x) - Function(); -typedef F22 = A Function(List x) Function(); -typedef F23 = B Function(List x) Function(); - -int f0(int x0, {core.List x}) => null; -List f1({List x}) => null; -List f2(int x, [Function x0]) => null; -void f3(int x0, [int x1]) => null; -A f4(List x) => null; -int Function({Function x}) f5() => null; -int Function(List x) f6() => null; -Function Function(int x0, [Function x]) f7() => null; -Function Function([core.List x0]) f8() => null; -List Function(int x, [int x0]) f9() => null; -List Function(int y, {List x}) f10() => - null; -core.List Function([int x]) f11() => null; -core.List Function(List x0) f12() => - null; -core.List Function(int x, [List x0]) f13() => - null; -List Function(int x0, {Function x}) f14() => null; -List Function([List x]) f15() => null; -Function(int y, [Function x]) f16() => null; -Function(int x0, [core.List x1]) f17() => null; -void Function({int x}) f18() => null; -void Function(core.List x) f19() => null; -int Function(List x) f20() => null; -core.List Function(core.List x) - f21() => null; -A Function(List x) f22() => null; -B Function(List x) f23() => null; - -class U42 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int x0, {core.List x}) x0; - List Function({List x}) x1; - List Function(int x, [Function x2]) x2; - void Function(int x1, [int x2]) x3; - A Function(List x) x4; - int Function({Function x}) Function() x5; - int Function(List x) Function() x6; - Function Function(int x1, [Function x]) Function() x7; - Function Function([core.List x1]) Function() x8; - List Function(int x, [int x1]) Function() x9; - List Function(int y, {List x}) - Function() x10; - core.List Function([int x]) Function() x11; - core.List Function(List x1) Function() - x12; - core.List Function(int x, [List x1]) - Function() x13; - List Function(int x1, {Function x}) Function() x14; - List Function([List x]) Function() x15; - Function(int y, [Function x]) Function() x16; - Function(int x2, [core.List x3]) Function() x17; - void Function({int x}) Function() x18; - void Function(core.List x) Function() x19; - int Function(List x) Function() x20; - core.List Function(core.List x) - Function() x21; - A Function(List x) Function() x22; - B Function(List x) Function() x23; - - U42({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int x0, {core.List x}) => null; - List m1({List x}) => null; - List m2(int x, [Function x0]) => null; - void m3(int x0, [int x1]) => null; - A m4(List x) => null; - int Function({Function x}) m5() => null; - int Function(List x) m6() => null; - Function Function(int x0, [Function x]) m7() => null; - Function Function([core.List x0]) m8() => null; - List Function(int x, [int x0]) m9() => null; - List Function(int y, {List x}) - m10() => null; - core.List Function([int x]) m11() => null; - core.List Function(List x0) m12() => - null; - core.List Function(int x, [List x0]) m13() => - null; - List Function(int x0, {Function x}) m14() => null; - List Function([List x]) m15() => null; - Function(int y, [Function x]) m16() => null; - Function(int x0, [core.List x1]) m17() => null; - void Function({int x}) m18() => null; - void Function(core.List x) m19() => null; - int Function(List x) m20() => null; - core.List Function(core.List x) - m21() => null; - A Function(List x) m22() => null; - B Function(List x) m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int x0, {core.List x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int x0, {core.List x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int x0, {core.List x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function({List x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function({List x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function({List x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int x, [Function x2]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int x, [Function x2]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int x, [Function x2])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int x1, [int x2]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int x1, [int x2]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int x1, [int x2])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// A Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - A Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is A Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function({Function x}) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function({Function x}) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function({Function x}) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(List x) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(List x) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(List x) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int x1, [Function x]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x1, [Function x]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x1, [Function x]) - Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function([core.List x1]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function([core.List x1]) Function() - l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function([core.List x1]) - Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x, [int x1]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x, [int x1]) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x, [int x1]) - Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int y, {List x}) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int y, {List x}) - Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int y, {List x}) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function([int x]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function([int x]) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function([int x]) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(List x1) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(List x1) - Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(List x1) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int x, [List x1]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int x, [List x1]) - Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int x, [List x1]) - Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x1, {Function x}) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x1, {Function x}) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int x1, {Function x}) - Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function([List x]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function([List x]) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue( - m15 is List Function([List x]) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int y, [Function x]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int y, [Function x]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function(int y, [Function x]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x2, [core.List x3]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x2, [core.List x3]) Function() - l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x2, [core.List x3]) - Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function({int x}) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function({int x}) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function({int x}) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(core.List x) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(core.List x) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(core.List x) - Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(List x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(List x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is int Function(List x) - Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(core.List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(core.List x) - Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function(core.List x) - Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is A Function(List x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - // The static function has its T always set to int. - Expect.isTrue(f22 is F22); - Expect.isFalse(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - Expect.isFalse(confuse(f22) is F22); - if (tIsBool) { - Expect.throws(() { - x22 = (f22 as dynamic); - }); - Expect.throws(() { - x22 = confuse(f22); - }); - Expect.throws(() { - l22 = (f22 as dynamic); - }); - Expect.throws(() { - l22 = confuse(f22); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m22 is F22); - Expect.equals(tIsBool, m22 is F22); - Expect.equals(tIsInt, confuse(m22) is F22); - Expect.equals(tIsBool, confuse(m22) is F22); - } - } - - /// B Function(List x) Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - B Function(List x) Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue( - m23 is B Function(List x) Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U42().runTests(); - new U42(tIsInt: true).runTests(); - new U42(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type43_test.dart b/tests/language_2/function_type/function_type43_test.dart deleted file mode 100644 index e7171e8c5f3..00000000000 --- a/tests/language_2/function_type/function_type43_test.dart +++ /dev/null @@ -1,964 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int y, {core.List x}); -typedef F1 = List Function(int x0, {List x}); -typedef F2 = List Function({Function x}); -typedef F3 = void Function(int x, [int x2]); -typedef F4 = A Function(core.List x); -typedef F5 = int Function({Function x}) Function(int x); -typedef F6 = int Function(List x) Function(int x); -typedef F7 = Function Function(int x1, [Function x]) - Function(int x); -typedef F8 = Function Function([core.List x1]) - Function(int x); -typedef F9 = List Function(int x, [int x1]) - Function(int x); -typedef F10 = List Function(int y, {List x}) - Function(int x); -typedef F11 = core.List Function([int x]) - Function(int x); -typedef F12 = core.List Function(List x1) - Function(int x); -typedef F13 = core.List Function(int x, [List x1]) - Function(int x); -typedef F14 = List Function(int x1, {Function x}) - Function(int x); -typedef F15 = List Function([List x]) Function( - int x); -typedef F16 = Function(int y, [Function x]) Function( - int x); -typedef F17 = Function(int x2, [core.List x3]) - Function(int x); -typedef F18 = void Function({int x}) Function(int x); -typedef F19 = void Function(core.List x) - Function(int x); -typedef F20 = int Function(List x) Function( - int x); -typedef F21 = core.List Function(core.List x) - Function(int x); -typedef F22 = A Function(List x) Function(int x); -typedef F23 = B Function(List x) Function( - int x); - -int f0(int y, {core.List x}) => null; -List f1(int x0, {List x}) => null; -List f2({Function x}) => null; -void f3(int x, [int x0]) => null; -A f4(core.List x) => null; -int Function({Function x}) f5(int x) => null; -int Function(List x) f6(int x) => null; -Function Function(int x0, [Function x]) f7(int x) => null; -Function Function([core.List x0]) f8(int x) => - null; -List Function(int x, [int x0]) f9(int x) => null; -List Function(int y, {List x}) f10( - int x) => - null; -core.List Function([int x]) f11(int x) => null; -core.List Function(List x0) f12( - int x) => - null; -core.List Function(int x, [List x0]) f13( - int x) => - null; -List Function(int x0, {Function x}) f14(int x) => null; -List Function([List x]) f15(int x) => null; -Function(int y, [Function x]) f16(int x) => null; -Function(int x0, [core.List x1]) f17(int x) => - null; -void Function({int x}) f18(int x) => null; -void Function(core.List x) f19(int x) => null; -int Function(List x) f20(int x) => null; -core.List Function(core.List x) f21( - int x) => - null; -A Function(List x) f22(int x) => null; -B Function(List x) f23(int x) => null; - -class U43 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int y, {core.List x}) x0; - List Function(int x0, {List x}) x1; - List Function({Function x}) x2; - void Function(int x, [int x2]) x3; - A Function(core.List x) x4; - int Function({Function x}) Function(int x) x5; - int Function(List x) Function(int x) x6; - Function Function(int x1, [Function x]) Function(int x) - x7; - Function Function([core.List x1]) Function( - int x) x8; - List Function(int x, [int x1]) Function(int x) - x9; - List Function(int y, {List x}) - Function(int x) x10; - core.List Function([int x]) Function(int x) x11; - core.List Function(List x1) Function( - int x) x12; - core.List Function(int x, [List x1]) - Function(int x) x13; - List Function(int x1, {Function x}) Function(int x) - x14; - List Function([List x]) Function(int x) x15; - Function(int y, [Function x]) Function(int x) x16; - Function(int x2, [core.List x3]) Function(int x) - x17; - void Function({int x}) Function(int x) x18; - void Function(core.List x) Function(int x) x19; - int Function(List x) Function(int x) x20; - core.List Function(core.List x) - Function(int x) x21; - A Function(List x) Function(int x) x22; - B Function(List x) Function(int x) x23; - - U43({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int y, {core.List x}) => null; - List m1(int x0, {List x}) => null; - List m2({Function x}) => null; - void m3(int x, [int x0]) => null; - A m4(core.List x) => null; - int Function({Function x}) m5(int x) => null; - int Function(List x) m6(int x) => null; - Function Function(int x0, [Function x]) m7(int x) => null; - Function Function([core.List x0]) m8(int x) => - null; - List Function(int x, [int x0]) m9(int x) => - null; - List Function(int y, {List x}) m10( - int x) => - null; - core.List Function([int x]) m11(int x) => null; - core.List Function(List x0) m12( - int x) => - null; - core.List Function(int x, [List x0]) m13( - int x) => - null; - List Function(int x0, {Function x}) m14(int x) => null; - List Function([List x]) m15(int x) => null; - Function(int y, [Function x]) m16(int x) => null; - Function(int x0, [core.List x1]) m17(int x) => - null; - void Function({int x}) m18(int x) => null; - void Function(core.List x) m19(int x) => null; - int Function(List x) m20(int x) => null; - core.List Function(core.List x) - m21(int x) => null; - A Function(List x) m22(int x) => null; - B Function(List x) m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int y, {core.List x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int y, {core.List x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int y, {core.List x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int x0, {List x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int x0, {List x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int x0, {List x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function({Function x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function({Function x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function({Function x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int x, [int x2]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int x, [int x2]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int x, [int x2])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// A Function(core.List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - A Function(core.List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is A Function(core.List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function({Function x}) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function({Function x}) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function({Function x}) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(List x) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(List x) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function(List x) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int x1, [Function x]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x1, [Function x]) Function(int x) - l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x1, [Function x]) - Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function([core.List x1]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function([core.List x1]) Function( - int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function([core.List x1]) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x, [int x1]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x, [int x1]) Function(int x) - l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x, [int x1]) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int y, {List x}) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int y, {List x}) - Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int y, {List x}) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function([int x]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function([int x]) Function(int x) - l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function([int x]) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(List x1) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(List x1) - Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(List x1) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int x, [List x1]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int x, [List x1]) - Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int x, [List x1]) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x1, {Function x}) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x1, {Function x}) Function(int x) - l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int x1, {Function x}) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function([List x]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function([List x]) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function([List x]) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int y, [Function x]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int y, [Function x]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int y, [Function x]) - Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x2, [core.List x3]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x2, [core.List x3]) Function( - int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x2, [core.List x3]) - Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function({int x}) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function({int x}) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue( - m18 is void Function({int x}) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(core.List x) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(core.List x) Function(int x) - l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(core.List x) - Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(List x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(List x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is int Function(List x) - Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(core.List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(core.List x) - Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function(core.List x) - Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(List x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is A Function(List x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - // The static function has its T always set to int. - Expect.isTrue(f22 is F22); - Expect.isFalse(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - Expect.isFalse(confuse(f22) is F22); - if (tIsBool) { - Expect.throws(() { - x22 = (f22 as dynamic); - }); - Expect.throws(() { - x22 = confuse(f22); - }); - Expect.throws(() { - l22 = (f22 as dynamic); - }); - Expect.throws(() { - l22 = confuse(f22); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m22 is F22); - Expect.equals(tIsBool, m22 is F22); - Expect.equals(tIsInt, confuse(m22) is F22); - Expect.equals(tIsBool, confuse(m22) is F22); - } - } - - /// B Function(List x) Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - B Function(List x) Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is B Function(List x) - Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U43().runTests(); - new U43(tIsInt: true).runTests(); - new U43(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type44_test.dart b/tests/language_2/function_type/function_type44_test.dart deleted file mode 100644 index 8b470c3fcf6..00000000000 --- a/tests/language_2/function_type/function_type44_test.dart +++ /dev/null @@ -1,946 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(List x); -typedef F1 = List Function(int y, {List x}); -typedef F2 = List Function(int x0, {Function x}); -typedef F3 = void Function({int x}); -typedef F4 = A Function(List x); -typedef F5 = int Function(int x0, {Function x}) Function(); -typedef F6 = int Function([List x]) Function(); -typedef F7 = Function Function(int y, [Function x]) Function(); -typedef F8 = Function Function(int x1, [core.List x2]) Function(); -typedef F9 = List Function({int x}) Function(); -typedef F10 = List Function(core.List x) Function(); -typedef F11 = core.List Function(int x0, [int x]) Function(); -typedef F12 = core.List Function([List x1]) Function(); -typedef F13 = core.List Function({List x}) Function(); -typedef F14 = List Function(int y, {Function x}) Function(); -typedef F15 = List Function(int x0, [List x]) Function(); -typedef F16 = Function(Function x0) Function(); -typedef F17 = Function(int x, [core.List x2]) Function(); -typedef F18 = void Function(int x0, {int x}) Function(); -typedef F19 = void Function([core.List x]) Function(); -typedef F20 = int Function(core.List x) Function(); -typedef F21 = core.List Function(List x) Function(); -typedef F22 = A Function() Function(); -typedef F23 = B Function(core.List x) - Function(); - -int f0(List x) => null; -List f1(int y, {List x}) => null; -List f2(int x0, {Function x}) => null; -void f3({int x}) => null; -A f4(List x) => null; -int Function(int x0, {Function x}) f5() => null; -int Function([List x]) f6() => null; -Function Function(int y, [Function x]) f7() => null; -Function Function(int x0, [core.List x1]) f8() => null; -List Function({int x}) f9() => null; -List Function(core.List x) f10() => null; -core.List Function(int x0, [int x]) f11() => null; -core.List Function([List x0]) f12() => null; -core.List Function({List x}) f13() => null; -List Function(int y, {Function x}) f14() => null; -List Function(int x0, [List x]) f15() => null; -Function(Function x0) f16() => null; -Function(int x, [core.List x0]) f17() => null; -void Function(int x0, {int x}) f18() => null; -void Function([core.List x]) f19() => null; -int Function(core.List x) f20() => null; -core.List Function(List x) f21() => null; -A Function() f22() => null; -B Function(core.List x) f23() => null; - -class U44 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(List x) x0; - List Function(int y, {List x}) x1; - List Function(int x0, {Function x}) x2; - void Function({int x}) x3; - A Function(List x) x4; - int Function(int x0, {Function x}) Function() x5; - int Function([List x]) Function() x6; - Function Function(int y, [Function x]) Function() x7; - Function Function(int x1, [core.List x2]) Function() x8; - List Function({int x}) Function() x9; - List Function(core.List x) Function() x10; - core.List Function(int x0, [int x]) Function() x11; - core.List Function([List x1]) Function() x12; - core.List Function({List x}) Function() x13; - List Function(int y, {Function x}) Function() x14; - List Function(int x0, [List x]) Function() x15; - Function(Function x0) Function() x16; - Function(int x, [core.List x2]) Function() x17; - void Function(int x0, {int x}) Function() x18; - void Function([core.List x]) Function() x19; - int Function(core.List x) Function() x20; - core.List Function(List x) Function() x21; - A Function() Function() x22; - B Function(core.List x) Function() x23; - - U44({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(List x) => null; - List m1(int y, {List x}) => null; - List m2(int x0, {Function x}) => null; - void m3({int x}) => null; - A m4(List x) => null; - int Function(int x0, {Function x}) m5() => null; - int Function([List x]) m6() => null; - Function Function(int y, [Function x]) m7() => null; - Function Function(int x0, [core.List x1]) m8() => null; - List Function({int x}) m9() => null; - List Function(core.List x) m10() => null; - core.List Function(int x0, [int x]) m11() => null; - core.List Function([List x0]) m12() => null; - core.List Function({List x}) m13() => null; - List Function(int y, {Function x}) m14() => null; - List Function(int x0, [List x]) m15() => null; - Function(Function x0) m16() => null; - Function(int x, [core.List x0]) m17() => null; - void Function(int x0, {int x}) m18() => null; - void Function([core.List x]) m19() => null; - int Function(core.List x) m20() => null; - core.List Function(List x) m21() => null; - A Function() m22() => null; - B Function(core.List x) m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(List x) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(List x) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(List x)); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - // The static function has its T always set to int. - Expect.isTrue(f0 is F0); - Expect.isFalse(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - Expect.isFalse(confuse(f0) is F0); - if (tIsBool) { - Expect.throws(() { - x0 = (f0 as dynamic); - }); - Expect.throws(() { - x0 = confuse(f0); - }); - Expect.throws(() { - l0 = (f0 as dynamic); - }); - Expect.throws(() { - l0 = confuse(f0); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m0 is F0); - Expect.equals(true, m0 is F0); - Expect.equals(true, confuse(m0) is F0); - Expect.equals(true, confuse(m0) is F0); - } - } - - /// List Function(int y, {List x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int y, {List x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int y, {List x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int x0, {Function x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int x0, {Function x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int x0, {Function x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function({int x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function({int x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function({int x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// A Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - A Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is A Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - // The static function has its T always set to int. - Expect.isTrue(f4 is F4); - Expect.isFalse(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - Expect.isFalse(confuse(f4) is F4); - if (tIsBool) { - Expect.throws(() { - x4 = (f4 as dynamic); - }); - Expect.throws(() { - x4 = confuse(f4); - }); - Expect.throws(() { - l4 = (f4 as dynamic); - }); - Expect.throws(() { - l4 = confuse(f4); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m4 is F4); - Expect.equals(true, m4 is F4); - Expect.equals(true, confuse(m4) is F4); - Expect.equals(true, confuse(m4) is F4); - } - } - - /// int Function(int x0, {Function x}) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x0, {Function x}) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x0, {Function x}) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function([List x]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function([List x]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function([List x]) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int y, [Function x]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int y, [Function x]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int y, [Function x]) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x1, [core.List x2]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x1, [core.List x2]) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function(int x1, [core.List x2]) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function({int x}) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function({int x}) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function({int x}) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(core.List x) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(core.List x) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue( - m10 is List Function(core.List x) Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x0, [int x]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x0, [int x]) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is core.List Function(int x0, [int x]) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function([List x1]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function([List x1]) Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue( - m12 is core.List Function([List x1]) Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function({List x}) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function({List x}) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function({List x}) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int y, {Function x}) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int y, {Function x}) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int y, {Function x}) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x0, [List x]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x0, [List x]) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x0, [List x]) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(Function x0) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(Function x0) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(Function x0) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x, [core.List x2]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x, [core.List x2]) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x, [core.List x2]) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x0, {int x}) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x0, {int x}) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x0, {int x}) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function([core.List x]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function([core.List x]) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function([core.List x]) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(core.List x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(core.List x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is int Function(core.List x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(List x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function(List x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// A Function() Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function() Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is A Function() Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// B Function(core.List x) Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - B Function(core.List x) Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is B Function(core.List x) - Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U44().runTests(); - new U44(tIsInt: true).runTests(); - new U44(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type45_test.dart b/tests/language_2/function_type/function_type45_test.dart deleted file mode 100644 index 62823998662..00000000000 --- a/tests/language_2/function_type/function_type45_test.dart +++ /dev/null @@ -1,928 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function([List x]); -typedef F1 = List Function(core.List x); -typedef F2 = List Function(int y, {Function x}); -typedef F3 = void Function(int x0, {int x}); -typedef F4 = A Function(); -typedef F5 = int Function(int x1, {Function x}) Function(int x); -typedef F6 = int Function([List x]) Function(int x); -typedef F7 = Function Function(int y, [Function x]) Function(int x); -typedef F8 = Function Function(int x2, [core.List x3]) Function( - int x); -typedef F9 = List Function({int x}) Function(int x); -typedef F10 = List Function(core.List x) Function(int x); -typedef F11 = core.List Function(int x1, [int x]) Function(int x); -typedef F12 = core.List Function([List x1]) Function( - int x); -typedef F13 = core.List Function({List x}) Function(int x); -typedef F14 = List Function(int y, {Function x}) Function(int x); -typedef F15 = List Function(int x1, [List x]) Function(int x); -typedef F16 = Function(Function x1) Function(int x); -typedef F17 = Function(int x, [core.List x1]) Function(int x); -typedef F18 = void Function(int x1, {int x}) Function(int x); -typedef F19 = void Function([core.List x]) Function(int x); -typedef F20 = int Function(core.List x) Function(int x); -typedef F21 = core.List Function(List x) Function(int x); -typedef F22 = A Function() Function(int x); -typedef F23 = B Function(core.List x) Function( - int x); - -int f0([List x]) => null; -List f1(core.List x) => null; -List f2(int y, {Function x}) => null; -void f3(int x0, {int x}) => null; -A f4() => null; -int Function(int x0, {Function x}) f5(int x) => null; -int Function([List x]) f6(int x) => null; -Function Function(int y, [Function x]) f7(int x) => null; -Function Function(int x0, [core.List x1]) f8(int x) => null; -List Function({int x}) f9(int x) => null; -List Function(core.List x) f10(int x) => null; -core.List Function(int x0, [int x]) f11(int x) => null; -core.List Function([List x0]) f12(int x) => null; -core.List Function({List x}) f13(int x) => null; -List Function(int y, {Function x}) f14(int x) => null; -List Function(int x0, [List x]) f15(int x) => null; -Function(Function x0) f16(int x) => null; -Function(int x, [core.List x0]) f17(int x) => null; -void Function(int x0, {int x}) f18(int x) => null; -void Function([core.List x]) f19(int x) => null; -int Function(core.List x) f20(int x) => null; -core.List Function(List x) f21(int x) => null; -A Function() f22(int x) => null; -B Function(core.List x) f23(int x) => null; - -class U45 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function([List x]) x0; - List Function(core.List x) x1; - List Function(int y, {Function x}) x2; - void Function(int x0, {int x}) x3; - A Function() x4; - int Function(int x1, {Function x}) Function(int x) x5; - int Function([List x]) Function(int x) x6; - Function Function(int y, [Function x]) Function(int x) x7; - Function Function(int x2, [core.List x3]) Function(int x) x8; - List Function({int x}) Function(int x) x9; - List Function(core.List x) Function(int x) x10; - core.List Function(int x1, [int x]) Function(int x) x11; - core.List Function([List x1]) Function(int x) x12; - core.List Function({List x}) Function(int x) x13; - List Function(int y, {Function x}) Function(int x) x14; - List Function(int x1, [List x]) Function(int x) x15; - Function(Function x1) Function(int x) x16; - Function(int x, [core.List x1]) Function(int x) x17; - void Function(int x1, {int x}) Function(int x) x18; - void Function([core.List x]) Function(int x) x19; - int Function(core.List x) Function(int x) x20; - core.List Function(List x) Function(int x) x21; - A Function() Function(int x) x22; - B Function(core.List x) Function(int x) x23; - - U45({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0([List x]) => null; - List m1(core.List x) => null; - List m2(int y, {Function x}) => null; - void m3(int x0, {int x}) => null; - A m4() => null; - int Function(int x0, {Function x}) m5(int x) => null; - int Function([List x]) m6(int x) => null; - Function Function(int y, [Function x]) m7(int x) => null; - Function Function(int x0, [core.List x1]) m8(int x) => null; - List Function({int x}) m9(int x) => null; - List Function(core.List x) m10(int x) => null; - core.List Function(int x0, [int x]) m11(int x) => null; - core.List Function([List x0]) m12(int x) => null; - core.List Function({List x}) m13(int x) => null; - List Function(int y, {Function x}) m14(int x) => null; - List Function(int x0, [List x]) m15(int x) => null; - Function(Function x0) m16(int x) => null; - Function(int x, [core.List x0]) m17(int x) => null; - void Function(int x0, {int x}) m18(int x) => null; - void Function([core.List x]) m19(int x) => null; - int Function(core.List x) m20(int x) => null; - core.List Function(List x) m21(int x) => null; - A Function() m22(int x) => null; - B Function(core.List x) m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function([List x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function([List x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function([List x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - // The static function has its T always set to int. - Expect.isTrue(f0 is F0); - Expect.isFalse(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - Expect.isFalse(confuse(f0) is F0); - if (tIsBool) { - Expect.throws(() { - x0 = (f0 as dynamic); - }); - Expect.throws(() { - x0 = confuse(f0); - }); - Expect.throws(() { - l0 = (f0 as dynamic); - }); - Expect.throws(() { - l0 = confuse(f0); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m0 is F0); - Expect.equals(true, m0 is F0); - Expect.equals(true, confuse(m0) is F0); - Expect.equals(true, confuse(m0) is F0); - } - } - - /// List Function(core.List x) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(core.List x) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(core.List x)); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int y, {Function x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int y, {Function x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int y, {Function x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int x0, {int x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int x0, {int x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int x0, {int x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// A Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - A Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is A Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x1, {Function x}) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x1, {Function x}) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x1, {Function x}) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function([List x]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function([List x]) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function([List x]) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int y, [Function x]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int y, [Function x]) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int y, [Function x]) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x2, [core.List x3]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x2, [core.List x3]) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x2, [core.List x3]) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function({int x}) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function({int x}) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function({int x}) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(core.List x) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(core.List x) Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue( - m10 is List Function(core.List x) Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x1, [int x]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x1, [int x]) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is core.List Function(int x1, [int x]) Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function([List x1]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function([List x1]) Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function([List x1]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function({List x}) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function({List x}) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue( - m13 is core.List Function({List x}) Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int y, {Function x}) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int y, {Function x}) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int y, {Function x}) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x1, [List x]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x1, [List x]) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x1, [List x]) Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(Function x1) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(Function x1) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(Function x1) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x, [core.List x1]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x, [core.List x1]) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue( - m17 is Function(int x, [core.List x1]) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x1, {int x}) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x1, {int x}) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x1, {int x}) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function([core.List x]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function([core.List x]) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function([core.List x]) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(core.List x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(core.List x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is int Function(core.List x) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(List x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is core.List Function(List x) Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// A Function() Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function() Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is A Function() Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// B Function(core.List x) Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - B Function(core.List x) Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is B Function(core.List x) - Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U45().runTests(); - new U45(tIsInt: true).runTests(); - new U45(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type46_test.dart b/tests/language_2/function_type/function_type46_test.dart deleted file mode 100644 index 7349efb2680..00000000000 --- a/tests/language_2/function_type/function_type46_test.dart +++ /dev/null @@ -1,987 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int x0, [List x]); -typedef F1 = List Function([core.List x]); -typedef F2 = List Function(List x); -typedef F3 = void Function(int y, {int x}); -typedef F4 = A Function(A x); -typedef F5 = int Function(int x1, {Function x}) - Function(); -typedef F6 = int Function([List x]) Function(); -typedef F7 = Function Function(int y, [Function x]) - Function(); -typedef F8 = Function Function(int x2, [core.List x3]) - Function(); -typedef F9 = List Function({int x}) Function(); -typedef F10 = List Function(core.List x) - Function(); -typedef F11 = core.List Function(int x1, [int x]) - Function(); -typedef F12 = core.List Function([List x1]) - Function(); -typedef F13 = core.List Function({List x}) - Function(); -typedef F14 = List Function(int y, {Function x}) - Function(); -typedef F15 = List Function(int x1, [List x]) - Function(); -typedef F16 = Function(Function x1) Function(); -typedef F17 = Function(int x, [core.List x1]) - Function(); -typedef F18 = void Function(int x1, {int x}) Function(); -typedef F19 = void Function([core.List x]) - Function(); -typedef F20 = int Function(core.List x) - Function(); -typedef F21 = core.List Function(List x) - Function(); -typedef F22 = A Function() Function(); -typedef F23 = B Function(List x) Function(); - -int f0(int x0, [List x]) => null; -List f1([core.List x]) => null; -List f2(List x) => null; -void f3(int y, {int x}) => null; -A f4(A x) => null; -int Function(int x0, {Function x}) f5() => null; -int Function([List x]) f6() => null; -Function Function(int y, [Function x]) f7() => null; -Function Function(int x0, [core.List x1]) f8() => - null; -List Function({int x}) f9() => null; -List Function(core.List x) f10() => - null; -core.List Function(int x0, [int x]) f11() => null; -core.List Function([List x0]) f12() => - null; -core.List Function({List x}) f13() => null; -List Function(int y, {Function x}) f14() => null; -List Function(int x0, [List x]) f15() => null; -Function(Function x0) f16() => null; -Function(int x, [core.List x0]) f17() => null; -void Function(int x0, {int x}) f18() => null; -void Function([core.List x]) f19() => null; -int Function(core.List x) f20() => null; -core.List Function(List x) f21() => null; -A Function() f22() => null; -B Function(List x) f23() => null; - -class U46 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int x0, [List x]) x0; - List Function([core.List x]) x1; - List Function(List x) x2; - void Function(int y, {int x}) x3; - A Function(A x) x4; - int Function(int x1, {Function x}) Function() x5; - int Function([List x]) Function() x6; - Function Function(int y, [Function x]) Function() x7; - Function Function(int x2, [core.List x3]) - Function() x8; - List Function({int x}) Function() x9; - List Function(core.List x) Function() - x10; - core.List Function(int x1, [int x]) Function() - x11; - core.List Function([List x1]) - Function() x12; - core.List Function({List x}) Function() x13; - List Function(int y, {Function x}) Function() x14; - List Function(int x1, [List x]) Function() x15; - Function(Function x1) Function() x16; - Function(int x, [core.List x1]) Function() x17; - void Function(int x1, {int x}) Function() x18; - void Function([core.List x]) Function() x19; - int Function(core.List x) Function() x20; - core.List Function(List x) Function() x21; - A Function() Function() x22; - B Function(List x) Function() x23; - - U46({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int x0, [List x]) => null; - List m1([core.List x]) => null; - List m2(List x) => null; - void m3(int y, {int x}) => null; - A m4(A x) => null; - int Function(int x0, {Function x}) m5() => null; - int Function([List x]) m6() => null; - Function Function(int y, [Function x]) m7() => null; - Function Function(int x0, [core.List x1]) - m8() => null; - List Function({int x}) m9() => null; - List Function(core.List x) m10() => - null; - core.List Function(int x0, [int x]) m11() => - null; - core.List Function([List x0]) m12() => - null; - core.List Function({List x}) m13() => null; - List Function(int y, {Function x}) m14() => null; - List Function(int x0, [List x]) m15() => null; - Function(Function x0) m16() => null; - Function(int x, [core.List x0]) m17() => null; - void Function(int x0, {int x}) m18() => null; - void Function([core.List x]) m19() => null; - int Function(core.List x) m20() => null; - core.List Function(List x) m21() => null; - A Function() m22() => null; - B Function(List x) m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int x0, [List x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int x0, [List x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int x0, [List x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - // The static function has its T always set to int. - Expect.isTrue(f0 is F0); - Expect.isFalse(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - Expect.isFalse(confuse(f0) is F0); - if (tIsBool) { - Expect.throws(() { - x0 = (f0 as dynamic); - }); - Expect.throws(() { - x0 = confuse(f0); - }); - Expect.throws(() { - l0 = (f0 as dynamic); - }); - Expect.throws(() { - l0 = confuse(f0); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m0 is F0); - Expect.equals(true, m0 is F0); - Expect.equals(true, confuse(m0) is F0); - Expect.equals(true, confuse(m0) is F0); - } - } - - /// List Function([core.List x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function([core.List x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function([core.List x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(List x) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(List x) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(List x)); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int y, {int x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int y, {int x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int y, {int x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// A Function(A x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - A Function(A x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is A Function(A x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x1, {Function x}) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x1, {Function x}) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x1, {Function x}) - Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function([List x]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function([List x]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function([List x]) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int y, [Function x]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int y, [Function x]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int y, [Function x]) - Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x2, [core.List x3]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x2, [core.List x3]) - Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x2, [core.List x3]) - Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function({int x}) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function({int x}) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is List Function({int x}) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(core.List x) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(core.List x) - Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(core.List x) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x1, [int x]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x1, [int x]) Function() - l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int x1, [int x]) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function([List x1]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function([List x1]) - Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function([List x1]) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function({List x}) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function({List x}) Function() - l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function({List x}) - Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int y, {Function x}) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int y, {Function x}) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int y, {Function x}) - Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x1, [List x]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x1, [List x]) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x1, [List x]) - Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(Function x1) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(Function x1) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(Function x1) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x, [core.List x1]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x, [core.List x1]) Function() - l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x, [core.List x1]) - Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x1, {int x}) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x1, {int x}) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue( - m18 is void Function(int x1, {int x}) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function([core.List x]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function([core.List x]) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function([core.List x]) - Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(core.List x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(core.List x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is int Function(core.List x) - Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(List x) Function() - l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function(List x) - Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// A Function() Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function() Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is A Function() Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// B Function(List x) Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - B Function(List x) Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is B Function(List x) Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - // The static function has its T always set to int. - Expect.isTrue(f23 is F23); - Expect.isFalse(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - Expect.isFalse(confuse(f23) is F23); - if (tIsBool) { - Expect.throws(() { - x23 = (f23 as dynamic); - }); - Expect.throws(() { - x23 = confuse(f23); - }); - Expect.throws(() { - l23 = (f23 as dynamic); - }); - Expect.throws(() { - l23 = confuse(f23); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m23 is F23); - Expect.equals(tIsBool, m23 is F23); - Expect.equals(tIsInt, confuse(m23) is F23); - Expect.equals(tIsBool, confuse(m23) is F23); - } - } -} - -void main() { - new U46().runTests(); - new U46(tIsInt: true).runTests(); - new U46(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type47_test.dart b/tests/language_2/function_type/function_type47_test.dart deleted file mode 100644 index 3a49d25ec86..00000000000 --- a/tests/language_2/function_type/function_type47_test.dart +++ /dev/null @@ -1,1016 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int y, [List x]); -typedef F1 = List Function(int x0, [core.List x]); -typedef F2 = List Function([List x]); -typedef F3 = void Function(Function x); -typedef F4 = A Function(List x); -typedef F5 = int Function(int x1, {Function x}) Function( - int x); -typedef F6 = int Function([List x]) Function(int x); -typedef F7 = Function Function(int y, [Function x]) - Function(int x); -typedef F8 = Function Function(int x2, [core.List x3]) - Function(int x); -typedef F9 = List Function({int x}) Function( - int x); -typedef F10 = List Function(core.List x) - Function(int x); -typedef F11 = core.List Function(int x1, [int x]) - Function(int x); -typedef F12 = core.List Function([List x1]) - Function(int x); -typedef F13 = core.List Function({List x}) - Function(int x); -typedef F14 = List Function(int y, {Function x}) - Function(int x); -typedef F15 = List Function(int x1, [List x]) - Function(int x); -typedef F16 = Function(Function x1) Function(int x); -typedef F17 = Function(int x, [core.List x1]) - Function(int x); -typedef F18 = void Function(int x1, {int x}) Function( - int x); -typedef F19 = void Function([core.List x]) - Function(int x); -typedef F20 = int Function(core.List x) - Function(int x); -typedef F21 = core.List Function(List x) - Function(int x); -typedef F22 = A Function() Function(int x); -typedef F23 = B Function(List x) Function(int x); - -int f0(int y, [List x]) => null; -List f1(int x0, [core.List x]) => null; -List f2([List x]) => null; -void f3(Function x) => null; -A f4(List x) => null; -int Function(int x0, {Function x}) f5(int x) => null; -int Function([List x]) f6(int x) => null; -Function Function(int y, [Function x]) f7(int x) => null; -Function Function(int x0, [core.List x1]) f8( - int x) => - null; -List Function({int x}) f9(int x) => null; -List Function(core.List x) f10(int x) => - null; -core.List Function(int x0, [int x]) f11(int x) => - null; -core.List Function([List x0]) f12( - int x) => - null; -core.List Function({List x}) f13(int x) => - null; -List Function(int y, {Function x}) f14(int x) => null; -List Function(int x0, [List x]) f15(int x) => - null; -Function(Function x0) f16(int x) => null; -Function(int x, [core.List x0]) f17(int x) => - null; -void Function(int x0, {int x}) f18(int x) => null; -void Function([core.List x]) f19(int x) => null; -int Function(core.List x) f20(int x) => null; -core.List Function(List x) f21(int x) => - null; -A Function() f22(int x) => null; -B Function(List x) f23(int x) => null; - -class U47 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int y, [List x]) x0; - List Function(int x0, [core.List x]) x1; - List Function([List x]) x2; - void Function(Function x) x3; - A Function(List x) x4; - int Function(int x1, {Function x}) Function(int x) x5; - int Function([List x]) Function(int x) x6; - Function Function(int y, [Function x]) Function(int x) x7; - Function Function(int x2, [core.List x3]) - Function(int x) x8; - List Function({int x}) Function(int x) x9; - List Function(core.List x) Function( - int x) x10; - core.List Function(int x1, [int x]) Function( - int x) x11; - core.List Function([List x1]) - Function(int x) x12; - core.List Function({List x}) Function(int x) - x13; - List Function(int y, {Function x}) Function(int x) x14; - List Function(int x1, [List x]) Function(int x) x15; - Function(Function x1) Function(int x) x16; - Function(int x, [core.List x1]) Function(int x) - x17; - void Function(int x1, {int x}) Function(int x) x18; - void Function([core.List x]) Function(int x) - x19; - int Function(core.List x) Function(int x) - x20; - core.List Function(List x) Function(int x) - x21; - A Function() Function(int x) x22; - B Function(List x) Function(int x) x23; - - U47({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int y, [List x]) => null; - List m1(int x0, [core.List x]) => null; - List m2([List x]) => null; - void m3(Function x) => null; - A m4(List x) => null; - int Function(int x0, {Function x}) m5(int x) => null; - int Function([List x]) m6(int x) => null; - Function Function(int y, [Function x]) m7(int x) => null; - Function Function(int x0, [core.List x1]) m8( - int x) => - null; - List Function({int x}) m9(int x) => null; - List Function(core.List x) m10( - int x) => - null; - core.List Function(int x0, [int x]) m11( - int x) => - null; - core.List Function([List x0]) m12( - int x) => - null; - core.List Function({List x}) m13(int x) => - null; - List Function(int y, {Function x}) m14(int x) => null; - List Function(int x0, [List x]) m15(int x) => null; - Function(Function x0) m16(int x) => null; - Function(int x, [core.List x0]) m17(int x) => - null; - void Function(int x0, {int x}) m18(int x) => null; - void Function([core.List x]) m19(int x) => null; - int Function(core.List x) m20(int x) => null; - core.List Function(List x) m21(int x) => - null; - A Function() m22(int x) => null; - B Function(List x) m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int y, [List x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int y, [List x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int y, [List x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - // The static function has its T always set to int. - Expect.isTrue(f0 is F0); - Expect.isFalse(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - Expect.isFalse(confuse(f0) is F0); - if (tIsBool) { - Expect.throws(() { - x0 = (f0 as dynamic); - }); - Expect.throws(() { - x0 = confuse(f0); - }); - Expect.throws(() { - l0 = (f0 as dynamic); - }); - Expect.throws(() { - l0 = confuse(f0); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m0 is F0); - Expect.equals(true, m0 is F0); - Expect.equals(true, confuse(m0) is F0); - Expect.equals(true, confuse(m0) is F0); - } - } - - /// List Function(int x0, [core.List x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int x0, [core.List x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue( - m1 is List Function(int x0, [core.List x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function([List x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function([List x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function([List x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(Function x) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(Function x) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(Function x)); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// A Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - A Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is A Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x1, {Function x}) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x1, {Function x}) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x1, {Function x}) - Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function([List x]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function([List x]) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function([List x]) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int y, [Function x]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int y, [Function x]) Function(int x) - l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int y, [Function x]) - Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x2, [core.List x3]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x2, [core.List x3]) - Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x2, [core.List x3]) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function({int x}) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function({int x}) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function({int x}) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(core.List x) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(core.List x) Function( - int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(core.List x) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x1, [int x]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x1, [int x]) Function( - int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int x1, [int x]) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function([List x1]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function([List x1]) - Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function([List x1]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function({List x}) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function({List x}) Function( - int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function({List x}) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int y, {Function x}) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int y, {Function x}) Function(int x) - l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int y, {Function x}) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x1, [List x]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x1, [List x]) Function(int x) - l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x1, [List x]) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(Function x1) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(Function x1) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function(Function x1) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x, [core.List x1]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x, [core.List x1]) Function( - int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x, [core.List x1]) - Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x1, {int x}) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x1, {int x}) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x1, {int x}) - Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function([core.List x]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function([core.List x]) Function(int x) - l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function([core.List x]) - Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(core.List x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(core.List x) Function(int x) - l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is int Function(core.List x) - Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(List x) Function( - int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function(List x) - Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// A Function() Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function() Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is A Function() Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// B Function(List x) Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - B Function(List x) Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue( - m23 is B Function(List x) Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - // The static function has its T always set to int. - Expect.isTrue(f23 is F23); - Expect.isFalse(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - Expect.isFalse(confuse(f23) is F23); - if (tIsBool) { - Expect.throws(() { - x23 = (f23 as dynamic); - }); - Expect.throws(() { - x23 = confuse(f23); - }); - Expect.throws(() { - l23 = (f23 as dynamic); - }); - Expect.throws(() { - l23 = confuse(f23); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m23 is F23); - Expect.equals(tIsBool, m23 is F23); - Expect.equals(tIsInt, confuse(m23) is F23); - Expect.equals(tIsBool, confuse(m23) is F23); - } - } -} - -void main() { - new U47().runTests(); - new U47(tIsInt: true).runTests(); - new U47(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type48_test.dart b/tests/language_2/function_type/function_type48_test.dart deleted file mode 100644 index 07487ca186c..00000000000 --- a/tests/language_2/function_type/function_type48_test.dart +++ /dev/null @@ -1,924 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(List x0); -typedef F1 = List Function(int y, [core.List x]); -typedef F2 = List Function(int x0, [List x]); -typedef F3 = void Function([Function x]); -typedef F4 = List Function(int x); -typedef F5 = int Function(int y, {Function x}) Function(); -typedef F6 = int Function(int x0, [List x]) Function(); -typedef F7 = Function Function(Function x0) Function(); -typedef F8 = Function Function(int x, [core.List x2]) Function(); -typedef F9 = List Function(int x0, {int x}) Function(); -typedef F10 = List Function([core.List x]) Function(); -typedef F11 = core.List Function(int y, [int x]) Function(); -typedef F12 = core.List Function(int x1, [List x2]) - Function(); -typedef F13 = core.List Function(int x0, {List x}) Function(); -typedef F14 = List Function(List x) Function(); -typedef F15 = List Function(int y, [List x]) Function(); -typedef F16 = Function([Function x1]) Function(); -typedef F17 = Function({core.List x}) Function(); -typedef F18 = void Function(int y, {int x}) Function(); -typedef F19 = void Function(int x0, [core.List x]) Function(); -typedef F20 = int Function(List x) Function(); -typedef F21 = core.List Function() Function(); -typedef F22 = A Function(A x) Function(); -typedef F23 = B Function() Function(); - -int f0(List x0) => null; -List f1(int y, [core.List x]) => null; -List f2(int x0, [List x]) => null; -void f3([Function x]) => null; -List f4(int x) => null; -int Function(int y, {Function x}) f5() => null; -int Function(int x0, [List x]) f6() => null; -Function Function(Function x0) f7() => null; -Function Function(int x, [core.List x0]) f8() => null; -List Function(int x0, {int x}) f9() => null; -List Function([core.List x]) f10() => null; -core.List Function(int y, [int x]) f11() => null; -core.List Function(int x0, [List x1]) f12() => null; -core.List Function(int x0, {List x}) f13() => null; -List Function(List x) f14() => null; -List Function(int y, [List x]) f15() => null; -Function([Function x0]) f16() => null; -Function({core.List x}) f17() => null; -void Function(int y, {int x}) f18() => null; -void Function(int x0, [core.List x]) f19() => null; -int Function(List x) f20() => null; -core.List Function() f21() => null; -A Function(A x) f22() => null; -B Function() f23() => null; - -class U48 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(List x0) x0; - List Function(int y, [core.List x]) x1; - List Function(int x0, [List x]) x2; - void Function([Function x]) x3; - List Function(int x) x4; - int Function(int y, {Function x}) Function() x5; - int Function(int x0, [List x]) Function() x6; - Function Function(Function x0) Function() x7; - Function Function(int x, [core.List x2]) Function() x8; - List Function(int x0, {int x}) Function() x9; - List Function([core.List x]) Function() x10; - core.List Function(int y, [int x]) Function() x11; - core.List Function(int x1, [List x2]) Function() x12; - core.List Function(int x0, {List x}) Function() x13; - List Function(List x) Function() x14; - List Function(int y, [List x]) Function() x15; - Function([Function x1]) Function() x16; - Function({core.List x}) Function() x17; - void Function(int y, {int x}) Function() x18; - void Function(int x0, [core.List x]) Function() x19; - int Function(List x) Function() x20; - core.List Function() Function() x21; - A Function(A x) Function() x22; - B Function() Function() x23; - - U48({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(List x0) => null; - List m1(int y, [core.List x]) => null; - List m2(int x0, [List x]) => null; - void m3([Function x]) => null; - List m4(int x) => null; - int Function(int y, {Function x}) m5() => null; - int Function(int x0, [List x]) m6() => null; - Function Function(Function x0) m7() => null; - Function Function(int x, [core.List x0]) m8() => null; - List Function(int x0, {int x}) m9() => null; - List Function([core.List x]) m10() => null; - core.List Function(int y, [int x]) m11() => null; - core.List Function(int x0, [List x1]) m12() => null; - core.List Function(int x0, {List x}) m13() => null; - List Function(List x) m14() => null; - List Function(int y, [List x]) m15() => null; - Function([Function x0]) m16() => null; - Function({core.List x}) m17() => null; - void Function(int y, {int x}) m18() => null; - void Function(int x0, [core.List x]) m19() => null; - int Function(List x) m20() => null; - core.List Function() m21() => null; - A Function(A x) m22() => null; - B Function() m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(List x0) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(List x0) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(List x0)); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - // The static function has its T always set to int. - Expect.isTrue(f0 is F0); - Expect.isFalse(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - Expect.isFalse(confuse(f0) is F0); - if (tIsBool) { - Expect.throws(() { - x0 = (f0 as dynamic); - }); - Expect.throws(() { - x0 = confuse(f0); - }); - Expect.throws(() { - l0 = (f0 as dynamic); - }); - Expect.throws(() { - l0 = confuse(f0); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m0 is F0); - Expect.equals(true, m0 is F0); - Expect.equals(true, confuse(m0) is F0); - Expect.equals(true, confuse(m0) is F0); - } - } - - /// List Function(int y, [core.List x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int y, [core.List x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue( - m1 is List Function(int y, [core.List x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int x0, [List x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int x0, [List x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int x0, [List x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function([Function x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function([Function x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function([Function x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// List Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int y, {Function x}) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int y, {Function x}) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int y, {Function x}) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x0, [List x]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x0, [List x]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int x0, [List x]) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(Function x0) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(Function x0) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(Function x0) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x, [core.List x2]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x, [core.List x2]) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function(int x, [core.List x2]) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x0, {int x}) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x0, {int x}) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x0, {int x}) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function([core.List x]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function([core.List x]) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue( - m10 is List Function([core.List x]) Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int y, [int x]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int y, [int x]) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is core.List Function(int y, [int x]) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x1, [List x2]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x1, [List x2]) Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x1, - [List x2]) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int x0, {List x}) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int x0, {List x}) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue( - m13 is core.List Function(int x0, {List x}) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(List x) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(List x) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(List x) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int y, [List x]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int y, [List x]) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int y, [List x]) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function([Function x1]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function([Function x1]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function([Function x1]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function({core.List x}) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function({core.List x}) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function({core.List x}) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int y, {int x}) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int y, {int x}) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int y, {int x}) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x0, [core.List x]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x0, [core.List x]) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function(int x0, [core.List x]) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(List x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(List x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is int Function(List x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// core.List Function() Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function() Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function() Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(A x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(A x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is A Function(A x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// B Function() Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - B Function() Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is B Function() Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U48().runTests(); - new U48(tIsInt: true).runTests(); - new U48(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type49_test.dart b/tests/language_2/function_type/function_type49_test.dart deleted file mode 100644 index 570f24e01dd..00000000000 --- a/tests/language_2/function_type/function_type49_test.dart +++ /dev/null @@ -1,928 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function([List x1]); -typedef F1 = List Function(core.List x0); -typedef F2 = List Function(int y, [List x]); -typedef F3 = void Function(int x0, [Function x]); -typedef F4 = List Function(Function x); -typedef F5 = int Function(int y, {Function x}) Function(int x); -typedef F6 = int Function(int x1, [List x]) Function(int x); -typedef F7 = Function Function(Function x1) Function(int x); -typedef F8 = Function Function(int x, [core.List x1]) Function( - int x); -typedef F9 = List Function(int x1, {int x}) Function(int x); -typedef F10 = List Function([core.List x]) Function( - int x); -typedef F11 = core.List Function(int y, [int x]) Function(int x); -typedef F12 = core.List Function(int x2, [List x3]) - Function(int x); -typedef F13 = core.List Function(int x1, {List x}) Function( - int x); -typedef F14 = List Function(List x) Function(int x); -typedef F15 = List Function(int y, [List x]) Function(int x); -typedef F16 = Function([Function x1]) Function(int x); -typedef F17 = Function({core.List x}) Function(int x); -typedef F18 = void Function(int y, {int x}) Function(int x); -typedef F19 = void Function(int x1, [core.List x]) Function(int x); -typedef F20 = int Function(List x) Function(int x); -typedef F21 = core.List Function() Function(int x); -typedef F22 = A Function(A x) Function(int x); -typedef F23 = B Function() Function(int x); - -int f0([List x0]) => null; -List f1(core.List x0) => null; -List f2(int y, [List x]) => null; -void f3(int x0, [Function x]) => null; -List f4(Function x) => null; -int Function(int y, {Function x}) f5(int x) => null; -int Function(int x0, [List x]) f6(int x) => null; -Function Function(Function x0) f7(int x) => null; -Function Function(int x, [core.List x0]) f8(int x) => null; -List Function(int x0, {int x}) f9(int x) => null; -List Function([core.List x]) f10(int x) => null; -core.List Function(int y, [int x]) f11(int x) => null; -core.List Function(int x0, [List x1]) f12(int x) => null; -core.List Function(int x0, {List x}) f13(int x) => null; -List Function(List x) f14(int x) => null; -List Function(int y, [List x]) f15(int x) => null; -Function([Function x0]) f16(int x) => null; -Function({core.List x}) f17(int x) => null; -void Function(int y, {int x}) f18(int x) => null; -void Function(int x0, [core.List x]) f19(int x) => null; -int Function(List x) f20(int x) => null; -core.List Function() f21(int x) => null; -A Function(A x) f22(int x) => null; -B Function() f23(int x) => null; - -class U49 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function([List x1]) x0; - List Function(core.List x0) x1; - List Function(int y, [List x]) x2; - void Function(int x0, [Function x]) x3; - List Function(Function x) x4; - int Function(int y, {Function x}) Function(int x) x5; - int Function(int x1, [List x]) Function(int x) x6; - Function Function(Function x1) Function(int x) x7; - Function Function(int x, [core.List x1]) Function(int x) x8; - List Function(int x1, {int x}) Function(int x) x9; - List Function([core.List x]) Function(int x) x10; - core.List Function(int y, [int x]) Function(int x) x11; - core.List Function(int x2, [List x3]) Function(int x) x12; - core.List Function(int x1, {List x}) Function(int x) x13; - List Function(List x) Function(int x) x14; - List Function(int y, [List x]) Function(int x) x15; - Function([Function x1]) Function(int x) x16; - Function({core.List x}) Function(int x) x17; - void Function(int y, {int x}) Function(int x) x18; - void Function(int x1, [core.List x]) Function(int x) x19; - int Function(List x) Function(int x) x20; - core.List Function() Function(int x) x21; - A Function(A x) Function(int x) x22; - B Function() Function(int x) x23; - - U49({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0([List x0]) => null; - List m1(core.List x0) => null; - List m2(int y, [List x]) => null; - void m3(int x0, [Function x]) => null; - List m4(Function x) => null; - int Function(int y, {Function x}) m5(int x) => null; - int Function(int x0, [List x]) m6(int x) => null; - Function Function(Function x0) m7(int x) => null; - Function Function(int x, [core.List x0]) m8(int x) => null; - List Function(int x0, {int x}) m9(int x) => null; - List Function([core.List x]) m10(int x) => null; - core.List Function(int y, [int x]) m11(int x) => null; - core.List Function(int x0, [List x1]) m12(int x) => null; - core.List Function(int x0, {List x}) m13(int x) => null; - List Function(List x) m14(int x) => null; - List Function(int y, [List x]) m15(int x) => null; - Function([Function x0]) m16(int x) => null; - Function({core.List x}) m17(int x) => null; - void Function(int y, {int x}) m18(int x) => null; - void Function(int x0, [core.List x]) m19(int x) => null; - int Function(List x) m20(int x) => null; - core.List Function() m21(int x) => null; - A Function(A x) m22(int x) => null; - B Function() m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function([List x1]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function([List x1]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function([List x1])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - // The static function has its T always set to int. - Expect.isTrue(f0 is F0); - Expect.isFalse(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - Expect.isFalse(confuse(f0) is F0); - if (tIsBool) { - Expect.throws(() { - x0 = (f0 as dynamic); - }); - Expect.throws(() { - x0 = confuse(f0); - }); - Expect.throws(() { - l0 = (f0 as dynamic); - }); - Expect.throws(() { - l0 = confuse(f0); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m0 is F0); - Expect.equals(true, m0 is F0); - Expect.equals(true, confuse(m0) is F0); - Expect.equals(true, confuse(m0) is F0); - } - } - - /// List Function(core.List x0) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(core.List x0) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(core.List x0)); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int y, [List x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int y, [List x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int y, [List x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int x0, [Function x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int x0, [Function x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int x0, [Function x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// List Function(Function x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function(Function x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function(Function x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int y, {Function x}) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int y, {Function x}) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int y, {Function x}) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x1, [List x]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x1, [List x]) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int x1, [List x]) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(Function x1) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(Function x1) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(Function x1) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x, [core.List x1]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x, [core.List x1]) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x, [core.List x1]) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x1, {int x}) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x1, {int x}) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is List Function(int x1, {int x}) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function([core.List x]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function([core.List x]) Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function([core.List x]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int y, [int x]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int y, [int x]) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is core.List Function(int y, [int x]) Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x2, [List x3]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x2, [List x3]) Function(int x) - l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x2, - [List x3]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int x1, {List x}) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int x1, {List x}) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int x1, {List x}) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(List x) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(List x) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(List x) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int y, [List x]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int y, [List x]) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int y, [List x]) Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function([Function x1]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function([Function x1]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function([Function x1]) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function({core.List x}) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function({core.List x}) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function({core.List x}) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int y, {int x}) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int y, {int x}) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int y, {int x}) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x1, [core.List x]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x1, [core.List x]) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function(int x1, [core.List x]) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(List x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(List x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is int Function(List x) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// core.List Function() Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function() Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function() Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(A x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(A x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is A Function(A x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// B Function() Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - B Function() Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is B Function() Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U49().runTests(); - new U49(tIsInt: true).runTests(); - new U49(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type4_test.dart b/tests/language_2/function_type/function_type4_test.dart deleted file mode 100644 index 0d8bf38e5e4..00000000000 --- a/tests/language_2/function_type/function_type4_test.dart +++ /dev/null @@ -1,951 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int x0); -typedef F1 = Function Function(List x0); -typedef F2 = core.List Function(int y, [core.List x]); -typedef F3 = Function(int x0, [List x]); -typedef F4 = Function Function(List x); -typedef F5 = int Function(int y, {int x}) Function(); -typedef F6 = int Function(int x0, [core.List x]) Function(); -typedef F7 = Function Function(int x0) Function(); -typedef F8 = Function Function(int x, [List x2]) Function(); -typedef F9 = Function Function(int y, {List x}) Function(); -typedef F10 = List Function([List x]) Function(); -typedef F11 = List Function(List x0) Function(); -typedef F12 = core.List Function(int x1, [Function x2]) Function(); -typedef F13 = core.List Function(int x0, {core.List x}) - Function(); -typedef F14 = List Function(Function x) Function(); -typedef F15 = List Function(int y, [core.List x]) Function(); -typedef F16 = Function([int x1]) Function(); -typedef F17 = Function({List x}) Function(); -typedef F18 = Function() Function(); -typedef F19 = void Function(int x0, [List x]) Function(); -typedef F20 = void Function([List x1]) Function(); -typedef F21 = List Function(List x) Function(); -typedef F22 = Function(core.List x) Function(); -typedef F23 = void Function(List x) Function(); - -int f0(int x0) => null; -Function f1(List x0) => null; -core.List f2(int y, [core.List x]) => null; -f3(int x0, [List x]) => null; -Function f4(List x) => null; -int Function(int y, {int x}) f5() => null; -int Function(int x0, [core.List x]) f6() => null; -Function Function(int x0) f7() => null; -Function Function(int x, [List x0]) f8() => null; -Function Function(int y, {List x}) f9() => null; -List Function([List x]) f10() => null; -List Function(List x0) f11() => null; -core.List Function(int x0, [Function x1]) f12() => null; -core.List Function(int x0, {core.List x}) f13() => null; -List Function(Function x) f14() => null; -List Function(int y, [core.List x]) f15() => null; -Function([int x0]) f16() => null; -Function({List x}) f17() => null; -Function() f18() => null; -void Function(int x0, [List x]) f19() => null; -void Function([List x0]) f20() => null; -List Function(List x) f21() => null; -Function(core.List x) f22() => null; -void Function(List x) f23() => null; - -class U4 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int x0) x0; - Function Function(List x0) x1; - core.List Function(int y, [core.List x]) x2; - Function(int x0, [List x]) x3; - Function Function(List x) x4; - int Function(int y, {int x}) Function() x5; - int Function(int x0, [core.List x]) Function() x6; - Function Function(int x0) Function() x7; - Function Function(int x, [List x2]) Function() x8; - Function Function(int y, {List x}) Function() x9; - List Function([List x]) Function() x10; - List Function(List x0) Function() x11; - core.List Function(int x1, [Function x2]) Function() x12; - core.List Function(int x0, {core.List x}) Function() x13; - List Function(Function x) Function() x14; - List Function(int y, [core.List x]) Function() x15; - Function([int x1]) Function() x16; - Function({List x}) Function() x17; - Function() Function() x18; - void Function(int x0, [List x]) Function() x19; - void Function([List x1]) Function() x20; - List Function(List x) Function() x21; - Function(core.List x) Function() x22; - void Function(List x) Function() x23; - - U4({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int x0) => null; - Function m1(List x0) => null; - core.List m2(int y, [core.List x]) => null; - m3(int x0, [List x]) => null; - Function m4(List x) => null; - int Function(int y, {int x}) m5() => null; - int Function(int x0, [core.List x]) m6() => null; - Function Function(int x0) m7() => null; - Function Function(int x, [List x0]) m8() => null; - Function Function(int y, {List x}) m9() => null; - List Function([List x]) m10() => null; - List Function(List x0) m11() => null; - core.List Function(int x0, [Function x1]) m12() => null; - core.List Function(int x0, {core.List x}) m13() => null; - List Function(Function x) m14() => null; - List Function(int y, [core.List x]) m15() => null; - Function([int x0]) m16() => null; - Function({List x}) m17() => null; - Function() m18() => null; - void Function(int x0, [List x]) m19() => null; - void Function([List x0]) m20() => null; - List Function(List x) m21() => null; - Function(core.List x) m22() => null; - void Function(List x) m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int x0) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int x0) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int x0)); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// Function Function(List x0) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - Function Function(List x0) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is Function Function(List x0)); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - // The static function has its T always set to int. - Expect.isTrue(f1 is F1); - Expect.isFalse(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - Expect.isFalse(confuse(f1) is F1); - if (tIsBool) { - Expect.throws(() { - x1 = (f1 as dynamic); - }); - Expect.throws(() { - x1 = confuse(f1); - }); - Expect.throws(() { - l1 = (f1 as dynamic); - }); - Expect.throws(() { - l1 = confuse(f1); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m1 is F1); - Expect.equals(true, m1 is F1); - Expect.equals(true, confuse(m1) is F1); - Expect.equals(true, confuse(m1) is F1); - } - } - - /// core.List Function(int y, [core.List x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function(int y, [core.List x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue( - m2 is core.List Function(int y, [core.List x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// Function(int x0, [List x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(int x0, [List x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(int x0, [List x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// Function Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - Function Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is Function Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - // The static function has its T always set to int. - Expect.isTrue(f4 is F4); - Expect.isFalse(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - Expect.isFalse(confuse(f4) is F4); - if (tIsBool) { - Expect.throws(() { - x4 = (f4 as dynamic); - }); - Expect.throws(() { - x4 = confuse(f4); - }); - Expect.throws(() { - l4 = (f4 as dynamic); - }); - Expect.throws(() { - l4 = confuse(f4); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m4 is F4); - Expect.equals(true, m4 is F4); - Expect.equals(true, confuse(m4) is F4); - Expect.equals(true, confuse(m4) is F4); - } - } - - /// int Function(int y, {int x}) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int y, {int x}) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int y, {int x}) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x0, [core.List x]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x0, [core.List x]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function(int x0, [core.List x]) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int x0) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x0) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x0) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x, [List x2]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x, [List x2]) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function(int x, [List x2]) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// Function Function(int y, {List x}) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - Function Function(int y, {List x}) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is Function Function(int y, {List x}) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - // The static function has its T always set to int. - Expect.isTrue(f9 is F9); - Expect.isFalse(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - Expect.isFalse(confuse(f9) is F9); - if (tIsBool) { - Expect.throws(() { - x9 = (f9 as dynamic); - }); - Expect.throws(() { - x9 = confuse(f9); - }); - Expect.throws(() { - l9 = (f9 as dynamic); - }); - Expect.throws(() { - l9 = confuse(f9); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m9 is F9); - Expect.equals(tIsBool, m9 is F9); - Expect.equals(tIsInt, confuse(m9) is F9); - Expect.equals(tIsBool, confuse(m9) is F9); - } - } - - /// List Function([List x]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function([List x]) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue( - m10 is List Function([List x]) Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(List x0) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(List x0) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function(List x0) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function(int x1, [Function x2]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x1, [Function x2]) Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue( - m12 is core.List Function(int x1, [Function x2]) Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int x0, {core.List x}) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int x0, {core.List x}) Function() - l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int x0, - {core.List x}) - Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - } - - /// List Function(Function x) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(Function x) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(Function x) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int y, [core.List x]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int y, [core.List x]) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue( - m15 is List Function(int y, [core.List x]) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function([int x1]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function([int x1]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function([int x1]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function({List x}) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function({List x}) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function({List x}) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// Function() Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - Function() Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is Function() Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x0, [List x]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x0, [List x]) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x0, [List x]) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function([List x1]) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function([List x1]) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function([List x1]) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is List Function(List x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// Function(core.List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function(core.List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is Function(core.List x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// void Function(List x) Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - void Function(List x) Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is void Function(List x) Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - // The static function has its T always set to int. - Expect.isTrue(f23 is F23); - Expect.isFalse(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - Expect.isFalse(confuse(f23) is F23); - if (tIsBool) { - Expect.throws(() { - x23 = (f23 as dynamic); - }); - Expect.throws(() { - x23 = confuse(f23); - }); - Expect.throws(() { - l23 = (f23 as dynamic); - }); - Expect.throws(() { - l23 = confuse(f23); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m23 is F23); - Expect.equals(tIsBool, m23 is F23); - Expect.equals(tIsInt, confuse(m23) is F23); - Expect.equals(tIsBool, confuse(m23) is F23); - } - } -} - -void main() { - new U4().runTests(); - new U4(tIsInt: true).runTests(); - new U4(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type50_test.dart b/tests/language_2/function_type/function_type50_test.dart deleted file mode 100644 index 43fd72e7634..00000000000 --- a/tests/language_2/function_type/function_type50_test.dart +++ /dev/null @@ -1,940 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int x1, [List x2]); -typedef F1 = List Function([core.List x1]); -typedef F2 = List Function(List x0); -typedef F3 = void Function(int y, [Function x]); -typedef F4 = List Function(List x); -typedef F5 = int Function(int y, {Function x}) - Function(); -typedef F6 = int Function(int x1, [List x]) - Function(); -typedef F7 = Function Function(Function x1) Function(); -typedef F8 = Function Function(int x, [core.List x1]) - Function(); -typedef F9 = List Function(int x1, {int x}) - Function(); -typedef F10 = List Function([core.List x]) - Function(); -typedef F11 = core.List Function(int y, [int x]) - Function(); -typedef F12 = core.List Function(int x2, [List x3]) - Function(); -typedef F13 = core.List Function(int x1, {List x}) - Function(); -typedef F14 = List Function(List x) - Function(); -typedef F15 = List Function(int y, [List x]) - Function(); -typedef F16 = Function([Function x1]) Function(); -typedef F17 = Function({core.List x}) - Function(); -typedef F18 = void Function(int y, {int x}) Function(); -typedef F19 = void Function(int x1, [core.List x]) - Function(); -typedef F20 = int Function(List x) Function(); -typedef F21 = core.List Function() - Function(); -typedef F22 = A Function(A x) Function(); - -int f0(int x0, [List x1]) => null; -List f1([core.List x0]) => null; -List f2(List x0) => null; -void f3(int y, [Function x]) => null; -List f4(List x) => null; -int Function(int y, {Function x}) f5() => null; -int Function(int x0, [List x]) f6() => null; -Function Function(Function x0) f7() => null; -Function Function(int x, [core.List x0]) f8() => - null; -List Function(int x0, {int x}) f9() => null; -List Function([core.List x]) f10() => - null; -core.List Function(int y, [int x]) f11() => null; -core.List Function(int x0, [List x1]) - f12() => null; -core.List Function(int x0, {List x}) f13() => - null; -List Function(List x) f14() => null; -List Function(int y, [List x]) f15() => null; -Function([Function x0]) f16() => null; -Function({core.List x}) f17() => null; -void Function(int y, {int x}) f18() => null; -void Function(int x0, [core.List x]) f19() => - null; -int Function(List x) f20() => null; -core.List Function() f21() => null; -A Function(A x) f22() => null; - -class U50 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int x1, [List x2]) x0; - List Function([core.List x1]) x1; - List Function(List x0) x2; - void Function(int y, [Function x]) x3; - List Function(List x) x4; - int Function(int y, {Function x}) Function() x5; - int Function(int x1, [List x]) Function() x6; - Function Function(Function x1) Function() x7; - Function Function(int x, [core.List x1]) - Function() x8; - List Function(int x1, {int x}) Function() x9; - List Function([core.List x]) - Function() x10; - core.List Function(int y, [int x]) Function() - x11; - core.List Function(int x2, [List x3]) - Function() x12; - core.List Function(int x1, {List x}) - Function() x13; - List Function(List x) Function() x14; - List Function(int y, [List x]) Function() x15; - Function([Function x1]) Function() x16; - Function({core.List x}) Function() x17; - void Function(int y, {int x}) Function() x18; - void Function(int x1, [core.List x]) Function() - x19; - int Function(List x) Function() x20; - core.List Function() Function() x21; - A Function(A x) Function() x22; - - U50({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int x0, [List x1]) => null; - List m1([core.List x0]) => null; - List m2(List x0) => null; - void m3(int y, [Function x]) => null; - List m4(List x) => null; - int Function(int y, {Function x}) m5() => null; - int Function(int x0, [List x]) m6() => null; - Function Function(Function x0) m7() => null; - Function Function(int x, [core.List x0]) m8() => - null; - List Function(int x0, {int x}) m9() => null; - List Function([core.List x]) m10() => - null; - core.List Function(int y, [int x]) m11() => - null; - core.List Function(int x0, [List x1]) - m12() => null; - core.List Function(int x0, {List x}) m13() => - null; - List Function(List x) m14() => null; - List Function(int y, [List x]) m15() => null; - Function([Function x0]) m16() => null; - Function({core.List x}) m17() => null; - void Function(int y, {int x}) m18() => null; - void Function(int x0, [core.List x]) m19() => - null; - int Function(List x) m20() => null; - core.List Function() m21() => null; - A Function(A x) m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// int Function(int x1, [List x2]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int x1, [List x2]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int x1, [List x2])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - // The static function has its T always set to int. - Expect.isTrue(f0 is F0); - Expect.isFalse(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - Expect.isFalse(confuse(f0) is F0); - if (tIsBool) { - Expect.throws(() { - x0 = (f0 as dynamic); - }); - Expect.throws(() { - x0 = confuse(f0); - }); - Expect.throws(() { - l0 = (f0 as dynamic); - }); - Expect.throws(() { - l0 = confuse(f0); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m0 is F0); - Expect.equals(true, m0 is F0); - Expect.equals(true, confuse(m0) is F0); - Expect.equals(true, confuse(m0) is F0); - } - } - - /// List Function([core.List x1]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function([core.List x1]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function([core.List x1])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(List x0) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(List x0) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(List x0)); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int y, [Function x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int y, [Function x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int y, [Function x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// List Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int y, {Function x}) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int y, {Function x}) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function(int y, {Function x}) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x1, [List x]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x1, [List x]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function(int x1, [List x]) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(Function x1) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(Function x1) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue( - m7 is Function Function(Function x1) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x, [core.List x1]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x, [core.List x1]) - Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x, [core.List x1]) - Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x1, {int x}) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x1, {int x}) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x1, {int x}) - Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function([core.List x]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function([core.List x]) - Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function([core.List x]) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int y, [int x]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int y, [int x]) Function() - l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int y, [int x]) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x2, [List x3]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x2, [List x3]) - Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x2, - [List x3]) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int x1, {List x}) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int x1, {List x}) - Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int x1, {List x}) - Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(List x) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(List x) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(List x) - Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int y, [List x]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int y, [List x]) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int y, [List x]) - Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function([Function x1]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function([Function x1]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function([Function x1]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function({core.List x}) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function({core.List x}) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function({core.List x}) - Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int y, {int x}) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int y, {int x}) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue( - m18 is void Function(int y, {int x}) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x1, [core.List x]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x1, [core.List x]) - Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x1, [core.List x]) - Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(List x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(List x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is int Function(List x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// core.List Function() Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function() Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function() - Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(A x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(A x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is A Function(A x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U50().runTests(); - new U50(tIsInt: true).runTests(); - new U50(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type51_test.dart b/tests/language_2/function_type/function_type51_test.dart deleted file mode 100644 index a466411f54a..00000000000 --- a/tests/language_2/function_type/function_type51_test.dart +++ /dev/null @@ -1,956 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int x, [List x2]); -typedef F1 = List Function(int x1, [core.List x2]); -typedef F2 = List Function([List x1]); -typedef F3 = void Function(Function x0); -typedef F4 = List Function(core.List x); -typedef F5 = int Function(int y, {Function x}) Function( - int x); -typedef F6 = int Function(int x1, [List x]) Function( - int x); -typedef F7 = Function Function(Function x1) Function( - int x); -typedef F8 = Function Function(int x, [core.List x1]) - Function(int x); -typedef F9 = List Function(int x1, {int x}) - Function(int x); -typedef F10 = List Function([core.List x]) - Function(int x); -typedef F11 = core.List Function(int y, [int x]) - Function(int x); -typedef F12 = core.List Function(int x2, [List x3]) - Function(int x); -typedef F13 = core.List Function(int x1, {List x}) - Function(int x); -typedef F14 = List Function(List x) - Function(int x); -typedef F15 = List Function(int y, [List x]) - Function(int x); -typedef F16 = Function([Function x1]) Function(int x); -typedef F17 = Function({core.List x}) Function( - int x); -typedef F18 = void Function(int y, {int x}) Function( - int x); -typedef F19 = void Function(int x1, [core.List x]) - Function(int x); -typedef F20 = int Function(List x) Function(int x); -typedef F21 = core.List Function() Function( - int x); -typedef F22 = A Function(A x) Function(int x); - -int f0(int x, [List x0]) => null; -List f1(int x0, [core.List x1]) => null; -List f2([List x0]) => null; -void f3(Function x0) => null; -List f4(core.List x) => null; -int Function(int y, {Function x}) f5(int x) => null; -int Function(int x0, [List x]) f6(int x) => null; -Function Function(Function x0) f7(int x) => null; -Function Function(int x, [core.List x0]) f8( - int x) => - null; -List Function(int x0, {int x}) f9(int x) => null; -List Function([core.List x]) f10( - int x) => - null; -core.List Function(int y, [int x]) f11(int x) => - null; -core.List Function(int x0, [List x1]) - f12(int x) => null; -core.List Function(int x0, {List x}) f13( - int x) => - null; -List Function(List x) f14(int x) => null; -List Function(int y, [List x]) f15(int x) => null; -Function([Function x0]) f16(int x) => null; -Function({core.List x}) f17(int x) => null; -void Function(int y, {int x}) f18(int x) => null; -void Function(int x0, [core.List x]) f19(int x) => - null; -int Function(List x) f20(int x) => null; -core.List Function() f21(int x) => null; -A Function(A x) f22(int x) => null; - -class U51 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int x, [List x2]) x0; - List Function(int x1, [core.List x2]) x1; - List Function([List x1]) x2; - void Function(Function x0) x3; - List Function(core.List x) x4; - int Function(int y, {Function x}) Function(int x) x5; - int Function(int x1, [List x]) Function(int x) x6; - Function Function(Function x1) Function(int x) x7; - Function Function(int x, [core.List x1]) - Function(int x) x8; - List Function(int x1, {int x}) Function(int x) - x9; - List Function([core.List x]) Function( - int x) x10; - core.List Function(int y, [int x]) Function( - int x) x11; - core.List Function(int x2, [List x3]) - Function(int x) x12; - core.List Function(int x1, {List x}) - Function(int x) x13; - List Function(List x) Function(int x) x14; - List Function(int y, [List x]) Function(int x) x15; - Function([Function x1]) Function(int x) x16; - Function({core.List x}) Function(int x) x17; - void Function(int y, {int x}) Function(int x) x18; - void Function(int x1, [core.List x]) Function( - int x) x19; - int Function(List x) Function(int x) x20; - core.List Function() Function(int x) x21; - A Function(A x) Function(int x) x22; - - U51({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int x, [List x0]) => null; - List m1(int x0, [core.List x1]) => null; - List m2([List x0]) => null; - void m3(Function x0) => null; - List m4(core.List x) => null; - int Function(int y, {Function x}) m5(int x) => null; - int Function(int x0, [List x]) m6(int x) => null; - Function Function(Function x0) m7(int x) => null; - Function Function(int x, [core.List x0]) m8( - int x) => - null; - List Function(int x0, {int x}) m9(int x) => - null; - List Function([core.List x]) m10( - int x) => - null; - core.List Function(int y, [int x]) m11(int x) => - null; - core.List Function(int x0, [List x1]) - m12(int x) => null; - core.List Function(int x0, {List x}) m13( - int x) => - null; - List Function(List x) m14(int x) => null; - List Function(int y, [List x]) m15(int x) => null; - Function([Function x0]) m16(int x) => null; - Function({core.List x}) m17(int x) => null; - void Function(int y, {int x}) m18(int x) => null; - void Function(int x0, [core.List x]) m19( - int x) => - null; - int Function(List x) m20(int x) => null; - core.List Function() m21(int x) => null; - A Function(A x) m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// int Function(int x, [List x2]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int x, [List x2]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int x, [List x2])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - // The static function has its T always set to int. - Expect.isTrue(f0 is F0); - Expect.isFalse(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - Expect.isFalse(confuse(f0) is F0); - if (tIsBool) { - Expect.throws(() { - x0 = (f0 as dynamic); - }); - Expect.throws(() { - x0 = confuse(f0); - }); - Expect.throws(() { - l0 = (f0 as dynamic); - }); - Expect.throws(() { - l0 = confuse(f0); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m0 is F0); - Expect.equals(true, m0 is F0); - Expect.equals(true, confuse(m0) is F0); - Expect.equals(true, confuse(m0) is F0); - } - } - - /// List Function(int x1, [core.List x2]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int x1, [core.List x2]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue( - m1 is List Function(int x1, [core.List x2])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function([List x1]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function([List x1]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function([List x1])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(Function x0) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(Function x0) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(Function x0)); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// List Function(core.List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function(core.List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function(core.List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int y, {Function x}) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int y, {Function x}) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int y, {Function x}) - Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x1, [List x]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x1, [List x]) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int x1, [List x]) - Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(Function x1) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(Function x1) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(Function x1) - Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x, [core.List x1]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x, [core.List x1]) - Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x, [core.List x1]) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int x1, {int x}) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x1, {int x}) Function(int x) - l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x1, {int x}) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function([core.List x]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function([core.List x]) - Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function([core.List x]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int y, [int x]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int y, [int x]) Function( - int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int y, [int x]) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x2, [List x3]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x2, [List x3]) - Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x2, - [List x3]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int x1, {List x}) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int x1, {List x}) - Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int x1, {List x}) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(List x) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(List x) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(List x) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int y, [List x]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int y, [List x]) Function(int x) - l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int y, [List x]) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function([Function x1]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function([Function x1]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function([Function x1]) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function({core.List x}) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function({core.List x}) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function({core.List x}) - Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int y, {int x}) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int y, {int x}) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int y, {int x}) - Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x1, [core.List x]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x1, [core.List x]) Function( - int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x1, [core.List x]) - Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(List x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(List x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is int Function(List x) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// core.List Function() Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function() Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function() - Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(A x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(A x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is A Function(A x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U51().runTests(); - new U51(tIsInt: true).runTests(); - new U51(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type52_test.dart b/tests/language_2/function_type/function_type52_test.dart deleted file mode 100644 index 1cd849bd5a3..00000000000 --- a/tests/language_2/function_type/function_type52_test.dart +++ /dev/null @@ -1,893 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function({List x}); -typedef F1 = List Function(int x, [core.List x2]); -typedef F2 = List Function(int x1, [List x2]); -typedef F3 = void Function([Function x1]); -typedef F4 = List Function(List x); -typedef F5 = int Function(List x) Function(); -typedef F6 = int Function(int y, [List x]) Function(); -typedef F7 = Function Function([Function x1]) Function(); -typedef F8 = Function Function({core.List x}) Function(); -typedef F9 = List Function(int y, {int x}) Function(); -typedef F10 = List Function(int x0, [core.List x]) - Function(); -typedef F11 = core.List Function(int x0) Function(); -typedef F12 = core.List Function(int x, [List x2]) - Function(); -typedef F13 = core.List Function(int y, {List x}) Function(); -typedef F14 = List Function([List x]) Function(); -typedef F15 = List Function(List x0) Function(); -typedef F16 = Function(int x1, [Function x2]) Function(); -typedef F17 = Function(int x0, {core.List x}) Function(); -typedef F18 = void Function(Function x) Function(); -typedef F19 = void Function(int y, [core.List x]) Function(); -typedef F20 = int Function() Function(); -typedef F21 = core.List Function(A x) Function(); -typedef F22 = A Function(List x) Function(); - -int f0({List x}) => null; -List f1(int x, [core.List x0]) => null; -List f2(int x0, [List x1]) => null; -void f3([Function x0]) => null; -List f4(List x) => null; -int Function(List x) f5() => null; -int Function(int y, [List x]) f6() => null; -Function Function([Function x0]) f7() => null; -Function Function({core.List x}) f8() => null; -List Function(int y, {int x}) f9() => null; -List Function(int x0, [core.List x]) f10() => null; -core.List Function(int x0) f11() => null; -core.List Function(int x, [List x0]) f12() => null; -core.List Function(int y, {List x}) f13() => null; -List Function([List x]) f14() => null; -List Function(List x0) f15() => null; -Function(int x0, [Function x1]) f16() => null; -Function(int x0, {core.List x}) f17() => null; -void Function(Function x) f18() => null; -void Function(int y, [core.List x]) f19() => null; -int Function() f20() => null; -core.List Function(A x) f21() => null; -A Function(List x) f22() => null; - -class U52 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function({List x}) x0; - List Function(int x, [core.List x2]) x1; - List Function(int x1, [List x2]) x2; - void Function([Function x1]) x3; - List Function(List x) x4; - int Function(List x) Function() x5; - int Function(int y, [List x]) Function() x6; - Function Function([Function x1]) Function() x7; - Function Function({core.List x}) Function() x8; - List Function(int y, {int x}) Function() x9; - List Function(int x0, [core.List x]) Function() x10; - core.List Function(int x0) Function() x11; - core.List Function(int x, [List x2]) Function() x12; - core.List Function(int y, {List x}) Function() x13; - List Function([List x]) Function() x14; - List Function(List x0) Function() x15; - Function(int x1, [Function x2]) Function() x16; - Function(int x0, {core.List x}) Function() x17; - void Function(Function x) Function() x18; - void Function(int y, [core.List x]) Function() x19; - int Function() Function() x20; - core.List Function(A x) Function() x21; - A Function(List x) Function() x22; - - U52({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0({List x}) => null; - List m1(int x, [core.List x0]) => null; - List m2(int x0, [List x1]) => null; - void m3([Function x0]) => null; - List m4(List x) => null; - int Function(List x) m5() => null; - int Function(int y, [List x]) m6() => null; - Function Function([Function x0]) m7() => null; - Function Function({core.List x}) m8() => null; - List Function(int y, {int x}) m9() => null; - List Function(int x0, [core.List x]) m10() => null; - core.List Function(int x0) m11() => null; - core.List Function(int x, [List x0]) m12() => null; - core.List Function(int y, {List x}) m13() => null; - List Function([List x]) m14() => null; - List Function(List x0) m15() => null; - Function(int x0, [Function x1]) m16() => null; - Function(int x0, {core.List x}) m17() => null; - void Function(Function x) m18() => null; - void Function(int y, [core.List x]) m19() => null; - int Function() m20() => null; - core.List Function(A x) m21() => null; - A Function(List x) m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// int Function({List x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function({List x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function({List x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - // The static function has its T always set to int. - Expect.isTrue(f0 is F0); - Expect.isFalse(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - Expect.isFalse(confuse(f0) is F0); - if (tIsBool) { - Expect.throws(() { - x0 = (f0 as dynamic); - }); - Expect.throws(() { - x0 = confuse(f0); - }); - Expect.throws(() { - l0 = (f0 as dynamic); - }); - Expect.throws(() { - l0 = confuse(f0); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m0 is F0); - Expect.equals(true, m0 is F0); - Expect.equals(true, confuse(m0) is F0); - Expect.equals(true, confuse(m0) is F0); - } - } - - /// List Function(int x, [core.List x2]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int x, [core.List x2]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue( - m1 is List Function(int x, [core.List x2])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int x1, [List x2]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int x1, [List x2]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int x1, [List x2])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function([Function x1]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function([Function x1]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function([Function x1])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// List Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - // The static function has its T always set to int. - Expect.isTrue(f4 is F4); - Expect.isFalse(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - Expect.isFalse(confuse(f4) is F4); - if (tIsBool) { - Expect.throws(() { - x4 = (f4 as dynamic); - }); - Expect.throws(() { - x4 = confuse(f4); - }); - Expect.throws(() { - l4 = (f4 as dynamic); - }); - Expect.throws(() { - l4 = confuse(f4); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m4 is F4); - Expect.equals(true, m4 is F4); - Expect.equals(true, confuse(m4) is F4); - Expect.equals(true, confuse(m4) is F4); - } - } - - /// int Function(List x) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(List x) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(List x) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int y, [List x]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int y, [List x]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int y, [List x]) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function([Function x1]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function([Function x1]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function([Function x1]) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function({core.List x}) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function({core.List x}) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function({core.List x}) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int y, {int x}) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int y, {int x}) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int y, {int x}) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x0, [core.List x]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x0, [core.List x]) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 - is List Function(int x0, [core.List x]) Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x0) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x0) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int x0) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x, [List x2]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x, [List x2]) Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 - is core.List Function(int x, [List x2]) Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int y, {List x}) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int y, {List x}) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue( - m13 is core.List Function(int y, {List x}) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function([List x]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function([List x]) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function([List x]) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(List x0) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(List x0) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(List x0) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x1, [Function x2]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x1, [Function x2]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x1, [Function x2]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x0, {core.List x}) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x0, {core.List x}) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x0, {core.List x}) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(Function x) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(Function x) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(Function x) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int y, [core.List x]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int y, [core.List x]) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function(int y, [core.List x]) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function() Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function() Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is int Function() Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(A x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(A x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function(A x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is A Function(List x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U52().runTests(); - new U52(tIsInt: true).runTests(); - new U52(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type53_test.dart b/tests/language_2/function_type/function_type53_test.dart deleted file mode 100644 index b16845fa2d0..00000000000 --- a/tests/language_2/function_type/function_type53_test.dart +++ /dev/null @@ -1,875 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int x0, {List x}); -typedef F1 = List Function({core.List x}); -typedef F2 = List Function(int x, [List x2]); -typedef F3 = void Function(int x1, [Function x2]); -typedef F4 = List Function(); -typedef F5 = int Function(List x) Function(int x); -typedef F6 = int Function(int y, [List x]) Function(int x); -typedef F7 = Function Function([Function x1]) Function(int x); -typedef F8 = Function Function({core.List x}) Function(int x); -typedef F9 = List Function(int y, {int x}) Function(int x); -typedef F10 = List Function(int x1, [core.List x]) - Function(int x); -typedef F11 = core.List Function(int x1) Function(int x); -typedef F12 = core.List Function(int x, [List x1]) - Function(int x); -typedef F13 = core.List Function(int y, {List x}) Function( - int x); -typedef F14 = List Function([List x]) Function(int x); -typedef F15 = List Function(List x1) Function(int x); -typedef F16 = Function(int x2, [Function x3]) Function(int x); -typedef F17 = Function(int x1, {core.List x}) Function(int x); -typedef F18 = void Function(Function x) Function(int x); -typedef F19 = void Function(int y, [core.List x]) Function(int x); -typedef F20 = int Function() Function(int x); -typedef F21 = core.List Function(A x) Function(int x); -typedef F22 = A Function(List x) Function(int x); - -int f0(int x0, {List x}) => null; -List f1({core.List x}) => null; -List f2(int x, [List x0]) => null; -void f3(int x0, [Function x1]) => null; -List f4() => null; -int Function(List x) f5(int x) => null; -int Function(int y, [List x]) f6(int x) => null; -Function Function([Function x0]) f7(int x) => null; -Function Function({core.List x}) f8(int x) => null; -List Function(int y, {int x}) f9(int x) => null; -List Function(int x0, [core.List x]) f10(int x) => null; -core.List Function(int x0) f11(int x) => null; -core.List Function(int x, [List x0]) f12(int x) => null; -core.List Function(int y, {List x}) f13(int x) => null; -List Function([List x]) f14(int x) => null; -List Function(List x0) f15(int x) => null; -Function(int x0, [Function x1]) f16(int x) => null; -Function(int x0, {core.List x}) f17(int x) => null; -void Function(Function x) f18(int x) => null; -void Function(int y, [core.List x]) f19(int x) => null; -int Function() f20(int x) => null; -core.List Function(A x) f21(int x) => null; -A Function(List x) f22(int x) => null; - -class U53 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int x0, {List x}) x0; - List Function({core.List x}) x1; - List Function(int x, [List x2]) x2; - void Function(int x1, [Function x2]) x3; - List Function() x4; - int Function(List x) Function(int x) x5; - int Function(int y, [List x]) Function(int x) x6; - Function Function([Function x1]) Function(int x) x7; - Function Function({core.List x}) Function(int x) x8; - List Function(int y, {int x}) Function(int x) x9; - List Function(int x1, [core.List x]) Function(int x) x10; - core.List Function(int x1) Function(int x) x11; - core.List Function(int x, [List x1]) Function(int x) x12; - core.List Function(int y, {List x}) Function(int x) x13; - List Function([List x]) Function(int x) x14; - List Function(List x1) Function(int x) x15; - Function(int x2, [Function x3]) Function(int x) x16; - Function(int x1, {core.List x}) Function(int x) x17; - void Function(Function x) Function(int x) x18; - void Function(int y, [core.List x]) Function(int x) x19; - int Function() Function(int x) x20; - core.List Function(A x) Function(int x) x21; - A Function(List x) Function(int x) x22; - - U53({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int x0, {List x}) => null; - List m1({core.List x}) => null; - List m2(int x, [List x0]) => null; - void m3(int x0, [Function x1]) => null; - List m4() => null; - int Function(List x) m5(int x) => null; - int Function(int y, [List x]) m6(int x) => null; - Function Function([Function x0]) m7(int x) => null; - Function Function({core.List x}) m8(int x) => null; - List Function(int y, {int x}) m9(int x) => null; - List Function(int x0, [core.List x]) m10(int x) => null; - core.List Function(int x0) m11(int x) => null; - core.List Function(int x, [List x0]) m12(int x) => null; - core.List Function(int y, {List x}) m13(int x) => null; - List Function([List x]) m14(int x) => null; - List Function(List x0) m15(int x) => null; - Function(int x0, [Function x1]) m16(int x) => null; - Function(int x0, {core.List x}) m17(int x) => null; - void Function(Function x) m18(int x) => null; - void Function(int y, [core.List x]) m19(int x) => null; - int Function() m20(int x) => null; - core.List Function(A x) m21(int x) => null; - A Function(List x) m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// int Function(int x0, {List x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int x0, {List x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int x0, {List x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - // The static function has its T always set to int. - Expect.isTrue(f0 is F0); - Expect.isFalse(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - Expect.isFalse(confuse(f0) is F0); - if (tIsBool) { - Expect.throws(() { - x0 = (f0 as dynamic); - }); - Expect.throws(() { - x0 = confuse(f0); - }); - Expect.throws(() { - l0 = (f0 as dynamic); - }); - Expect.throws(() { - l0 = confuse(f0); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m0 is F0); - Expect.equals(true, m0 is F0); - Expect.equals(true, confuse(m0) is F0); - Expect.equals(true, confuse(m0) is F0); - } - } - - /// List Function({core.List x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function({core.List x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function({core.List x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int x, [List x2]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int x, [List x2]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int x, [List x2])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int x1, [Function x2]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int x1, [Function x2]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int x1, [Function x2])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// List Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(List x) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(List x) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(List x) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int y, [List x]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int y, [List x]) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int y, [List x]) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function([Function x1]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function([Function x1]) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function([Function x1]) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function({core.List x}) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function({core.List x}) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function({core.List x}) Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int y, {int x}) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int y, {int x}) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is List Function(int y, {int x}) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x1, [core.List x]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x1, [core.List x]) Function(int x) - l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x1, - [core.List x]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x1) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x1) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int x1) Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x, [List x1]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x, [List x1]) Function(int x) - l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x, - [List x1]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int y, {List x}) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int y, {List x}) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int y, {List x}) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function([List x]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function([List x]) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function([List x]) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(List x1) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(List x1) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(List x1) Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x2, [Function x3]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x2, [Function x3]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x2, [Function x3]) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x1, {core.List x}) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x1, {core.List x}) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue( - m17 is Function(int x1, {core.List x}) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(Function x) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(Function x) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(Function x) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int y, [core.List x]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int y, [core.List x]) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function(int y, [core.List x]) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function() Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function() Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is int Function() Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(A x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(A x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function(A x) Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(List x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is A Function(List x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U53().runTests(); - new U53(tIsInt: true).runTests(); - new U53(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type54_test.dart b/tests/language_2/function_type/function_type54_test.dart deleted file mode 100644 index bf5da700e79..00000000000 --- a/tests/language_2/function_type/function_type54_test.dart +++ /dev/null @@ -1,908 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int y, {List x}); -typedef F1 = List Function(int x0, {core.List x}); -typedef F2 = List Function({List x}); -typedef F3 = void Function(int x, [Function x2]); -typedef F4 = List Function(A x); -typedef F5 = int Function(List x) Function(); -typedef F6 = int Function(int y, [List x]) Function(); -typedef F7 = Function Function([Function x1]) Function(); -typedef F8 = Function Function({core.List x}) - Function(); -typedef F9 = List Function(int y, {int x}) - Function(); -typedef F10 = List Function(int x1, [core.List x]) - Function(); -typedef F11 = core.List Function(int x1) - Function(); -typedef F12 = core.List Function(int x, [List x1]) - Function(); -typedef F13 = core.List Function(int y, {List x}) - Function(); -typedef F14 = List Function([List x]) - Function(); -typedef F15 = List Function(List x1) Function(); -typedef F16 = Function(int x2, [Function x3]) Function(); -typedef F17 = Function(int x1, {core.List x}) - Function(); -typedef F18 = void Function(Function x) Function(); -typedef F19 = void Function(int y, [core.List x]) - Function(); -typedef F20 = int Function() Function(); -typedef F21 = core.List Function(A x) - Function(); -typedef F22 = A Function(List x) Function(); - -int f0(int y, {List x}) => null; -List f1(int x0, {core.List x}) => null; -List f2({List x}) => null; -void f3(int x, [Function x0]) => null; -List f4(A x) => null; -int Function(List x) f5() => null; -int Function(int y, [List x]) f6() => null; -Function Function([Function x0]) f7() => null; -Function Function({core.List x}) f8() => null; -List Function(int y, {int x}) f9() => null; -List Function(int x0, [core.List x]) - f10() => null; -core.List Function(int x0) f11() => null; -core.List Function(int x, [List x0]) - f12() => null; -core.List Function(int y, {List x}) f13() => - null; -List Function([List x]) f14() => null; -List Function(List x0) f15() => null; -Function(int x0, [Function x1]) f16() => null; -Function(int x0, {core.List x}) f17() => null; -void Function(Function x) f18() => null; -void Function(int y, [core.List x]) f19() => null; -int Function() f20() => null; -core.List Function(A x) f21() => null; -A Function(List x) f22() => null; - -class U54 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int y, {List x}) x0; - List Function(int x0, {core.List x}) x1; - List Function({List x}) x2; - void Function(int x, [Function x2]) x3; - List Function(A x) x4; - int Function(List x) Function() x5; - int Function(int y, [List x]) Function() x6; - Function Function([Function x1]) Function() x7; - Function Function({core.List x}) Function() x8; - List Function(int y, {int x}) Function() x9; - List Function(int x1, [core.List x]) - Function() x10; - core.List Function(int x1) Function() x11; - core.List Function(int x, [List x1]) - Function() x12; - core.List Function(int y, {List x}) - Function() x13; - List Function([List x]) Function() x14; - List Function(List x1) Function() x15; - Function(int x2, [Function x3]) Function() x16; - Function(int x1, {core.List x}) Function() x17; - void Function(Function x) Function() x18; - void Function(int y, [core.List x]) Function() - x19; - int Function() Function() x20; - core.List Function(A x) Function() x21; - A Function(List x) Function() x22; - - U54({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int y, {List x}) => null; - List m1(int x0, {core.List x}) => null; - List m2({List x}) => null; - void m3(int x, [Function x0]) => null; - List m4(A x) => null; - int Function(List x) m5() => null; - int Function(int y, [List x]) m6() => null; - Function Function([Function x0]) m7() => null; - Function Function({core.List x}) m8() => null; - List Function(int y, {int x}) m9() => null; - List Function(int x0, [core.List x]) - m10() => null; - core.List Function(int x0) m11() => null; - core.List Function(int x, [List x0]) - m12() => null; - core.List Function(int y, {List x}) m13() => - null; - List Function([List x]) m14() => null; - List Function(List x0) m15() => null; - Function(int x0, [Function x1]) m16() => null; - Function(int x0, {core.List x}) m17() => null; - void Function(Function x) m18() => null; - void Function(int y, [core.List x]) m19() => - null; - int Function() m20() => null; - core.List Function(A x) m21() => null; - A Function(List x) m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// int Function(int y, {List x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int y, {List x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int y, {List x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - // The static function has its T always set to int. - Expect.isTrue(f0 is F0); - Expect.isFalse(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - Expect.isFalse(confuse(f0) is F0); - if (tIsBool) { - Expect.throws(() { - x0 = (f0 as dynamic); - }); - Expect.throws(() { - x0 = confuse(f0); - }); - Expect.throws(() { - l0 = (f0 as dynamic); - }); - Expect.throws(() { - l0 = confuse(f0); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m0 is F0); - Expect.equals(true, m0 is F0); - Expect.equals(true, confuse(m0) is F0); - Expect.equals(true, confuse(m0) is F0); - } - } - - /// List Function(int x0, {core.List x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int x0, {core.List x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue( - m1 is List Function(int x0, {core.List x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function({List x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function({List x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function({List x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int x, [Function x2]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int x, [Function x2]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int x, [Function x2])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// List Function(A x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function(A x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function(A x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(List x) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(List x) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function(List x) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int y, [List x]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int y, [List x]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function(int y, [List x]) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function([Function x1]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function([Function x1]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue( - m7 is Function Function([Function x1]) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function({core.List x}) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function({core.List x}) Function() - l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function({core.List x}) - Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int y, {int x}) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int y, {int x}) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int y, {int x}) - Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x1, [core.List x]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x1, [core.List x]) - Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x1, - [core.List x]) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x1) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x1) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int x1) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x, [List x1]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x, [List x1]) - Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x, - [List x1]) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int y, {List x}) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int y, {List x}) - Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int y, {List x}) - Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function([List x]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function([List x]) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function([List x]) - Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(List x1) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(List x1) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue( - m15 is List Function(List x1) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x2, [Function x3]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x2, [Function x3]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function(int x2, [Function x3]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x1, {core.List x}) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x1, {core.List x}) Function() - l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x1, {core.List x}) - Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(Function x) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(Function x) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue( - m18 is void Function(Function x) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int y, [core.List x]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int y, [core.List x]) Function() - l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int y, [core.List x]) - Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function() Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function() Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is int Function() Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(A x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(A x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function(A x) - Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is A Function(List x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U54().runTests(); - new U54(tIsInt: true).runTests(); - new U54(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type55_test.dart b/tests/language_2/function_type/function_type55_test.dart deleted file mode 100644 index 2c771d24fc8..00000000000 --- a/tests/language_2/function_type/function_type55_test.dart +++ /dev/null @@ -1,903 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(); -typedef F1 = List Function(int y, {core.List x}); -typedef F2 = List Function(int x0, {List x}); -typedef F3 = void Function({Function x}); -typedef F4 = List Function(List x); -typedef F5 = int Function(List x) Function( - int x); -typedef F6 = int Function(int y, [List x]) Function( - int x); -typedef F7 = Function Function([Function x1]) Function( - int x); -typedef F8 = Function Function({core.List x}) - Function(int x); -typedef F9 = List Function(int y, {int x}) - Function(int x); -typedef F10 = List Function(int x1, [core.List x]) - Function(int x); -typedef F11 = core.List Function(int x1) - Function(int x); -typedef F12 = core.List Function(int x, [List x1]) - Function(int x); -typedef F13 = core.List Function(int y, {List x}) - Function(int x); -typedef F14 = List Function([List x]) - Function(int x); -typedef F15 = List Function(List x1) Function( - int x); -typedef F16 = Function(int x2, [Function x3]) Function( - int x); -typedef F17 = Function(int x1, {core.List x}) - Function(int x); -typedef F18 = void Function(Function x) Function(int x); -typedef F19 = void Function(int y, [core.List x]) - Function(int x); -typedef F20 = int Function() Function(int x); -typedef F21 = core.List Function(A x) - Function(int x); -typedef F22 = A Function(List x) Function(int x); - -int f0() => null; -List f1(int y, {core.List x}) => null; -List f2(int x0, {List x}) => null; -void f3({Function x}) => null; -List f4(List x) => null; -int Function(List x) f5(int x) => null; -int Function(int y, [List x]) f6(int x) => null; -Function Function([Function x0]) f7(int x) => null; -Function Function({core.List x}) f8(int x) => - null; -List Function(int y, {int x}) f9(int x) => null; -List Function(int x0, [core.List x]) - f10(int x) => null; -core.List Function(int x0) f11(int x) => null; -core.List Function(int x, [List x0]) - f12(int x) => null; -core.List Function(int y, {List x}) f13( - int x) => - null; -List Function([List x]) f14(int x) => null; -List Function(List x0) f15(int x) => null; -Function(int x0, [Function x1]) f16(int x) => null; -Function(int x0, {core.List x}) f17(int x) => - null; -void Function(Function x) f18(int x) => null; -void Function(int y, [core.List x]) f19(int x) => - null; -int Function() f20(int x) => null; -core.List Function(A x) f21(int x) => null; -A Function(List x) f22(int x) => null; - -class U55 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function() x0; - List Function(int y, {core.List x}) x1; - List Function(int x0, {List x}) x2; - void Function({Function x}) x3; - List Function(List x) x4; - int Function(List x) Function(int x) x5; - int Function(int y, [List x]) Function(int x) x6; - Function Function([Function x1]) Function(int x) x7; - Function Function({core.List x}) Function(int x) - x8; - List Function(int y, {int x}) Function(int x) - x9; - List Function(int x1, [core.List x]) - Function(int x) x10; - core.List Function(int x1) Function(int x) x11; - core.List Function(int x, [List x1]) - Function(int x) x12; - core.List Function(int y, {List x}) Function( - int x) x13; - List Function([List x]) Function(int x) x14; - List Function(List x1) Function(int x) x15; - Function(int x2, [Function x3]) Function(int x) x16; - Function(int x1, {core.List x}) Function(int x) - x17; - void Function(Function x) Function(int x) x18; - void Function(int y, [core.List x]) Function( - int x) x19; - int Function() Function(int x) x20; - core.List Function(A x) Function(int x) x21; - A Function(List x) Function(int x) x22; - - U55({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0() => null; - List m1(int y, {core.List x}) => null; - List m2(int x0, {List x}) => null; - void m3({Function x}) => null; - List m4(List x) => null; - int Function(List x) m5(int x) => null; - int Function(int y, [List x]) m6(int x) => null; - Function Function([Function x0]) m7(int x) => null; - Function Function({core.List x}) m8(int x) => - null; - List Function(int y, {int x}) m9(int x) => null; - List Function(int x0, [core.List x]) - m10(int x) => null; - core.List Function(int x0) m11(int x) => null; - core.List Function(int x, [List x0]) - m12(int x) => null; - core.List Function(int y, {List x}) m13( - int x) => - null; - List Function([List x]) m14(int x) => null; - List Function(List x0) m15(int x) => null; - Function(int x0, [Function x1]) m16(int x) => null; - Function(int x0, {core.List x}) m17(int x) => - null; - void Function(Function x) m18(int x) => null; - void Function(int y, [core.List x]) m19( - int x) => - null; - int Function() m20(int x) => null; - core.List Function(A x) m21(int x) => null; - A Function(List x) m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// int Function() - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function() l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function()); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int y, {core.List x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int y, {core.List x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue( - m1 is List Function(int y, {core.List x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int x0, {List x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int x0, {List x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int x0, {List x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function({Function x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function({Function x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function({Function x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// List Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(List x) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(List x) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(List x) - Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int y, [List x]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int y, [List x]) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int y, [List x]) - Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function([Function x1]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function([Function x1]) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function([Function x1]) - Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function({core.List x}) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function({core.List x}) Function( - int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function({core.List x}) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(int y, {int x}) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int y, {int x}) Function(int x) - l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int y, {int x}) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x1, [core.List x]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x1, [core.List x]) - Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x1, - [core.List x]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x1) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x1) Function(int x) - l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int x1) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x, [List x1]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x, [List x1]) - Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x, - [List x1]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int y, {List x}) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int y, {List x}) - Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int y, {List x}) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function([List x]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function([List x]) Function(int x) - l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function([List x]) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(List x1) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(List x1) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(List x1) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x2, [Function x3]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x2, [Function x3]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x2, [Function x3]) - Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x1, {core.List x}) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x1, {core.List x}) Function( - int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x1, {core.List x}) - Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(Function x) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(Function x) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue( - m18 is void Function(Function x) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int y, [core.List x]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int y, [core.List x]) Function( - int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int y, [core.List x]) - Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function() Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function() Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is int Function() Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(A x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(A x) Function(int x) - l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function(A x) - Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// A Function(List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - A Function(List x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is A Function(List x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U55().runTests(); - new U55(tIsInt: true).runTests(); - new U55(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type56_test.dart b/tests/language_2/function_type/function_type56_test.dart deleted file mode 100644 index 4a805e9fd14..00000000000 --- a/tests/language_2/function_type/function_type56_test.dart +++ /dev/null @@ -1,841 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int x); -typedef F1 = List Function(List x); -typedef F2 = List Function(int y, {List x}); -typedef F3 = void Function(int x0, {Function x}); -typedef F4 = void Function(int x); -typedef F5 = int Function([List x]) Function(); -typedef F6 = int Function(List x0) Function(); -typedef F7 = Function Function(int x1, [Function x2]) Function(); -typedef F8 = Function Function(int x0, {core.List x}) Function(); -typedef F9 = List Function(Function x) Function(); -typedef F10 = List Function(int y, [core.List x]) - Function(); -typedef F11 = core.List Function([int x1]) Function(); -typedef F12 = core.List Function({List x}) Function(); -typedef F13 = core.List Function() Function(); -typedef F14 = List Function(int x0, [List x]) Function(); -typedef F15 = List Function([List x1]) Function(); -typedef F16 = Function(int x, [Function x2]) Function(); -typedef F17 = Function(int y, {core.List x}) Function(); -typedef F18 = void Function([Function x]) Function(); -typedef F19 = void Function(core.List x0) Function(); -typedef F20 = int Function(A x) Function(); -typedef F21 = core.List Function(List x) Function(); -typedef F22 = List Function(int x) Function(); - -Function f0(int x) => null; -List f1(List x) => null; -List f2(int y, {List x}) => null; -void f3(int x0, {Function x}) => null; -void f4(int x) => null; -int Function([List x]) f5() => null; -int Function(List x0) f6() => null; -Function Function(int x0, [Function x1]) f7() => null; -Function Function(int x0, {core.List x}) f8() => null; -List Function(Function x) f9() => null; -List Function(int y, [core.List x]) f10() => null; -core.List Function([int x0]) f11() => null; -core.List Function({List x}) f12() => null; -core.List Function() f13() => null; -List Function(int x0, [List x]) f14() => null; -List Function([List x0]) f15() => null; -Function(int x, [Function x0]) f16() => null; -Function(int y, {core.List x}) f17() => null; -void Function([Function x]) f18() => null; -void Function(core.List x0) f19() => null; -int Function(A x) f20() => null; -core.List Function(List x) f21() => null; -List Function(int x) f22() => null; - -class U56 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int x) x0; - List Function(List x) x1; - List Function(int y, {List x}) x2; - void Function(int x0, {Function x}) x3; - void Function(int x) x4; - int Function([List x]) Function() x5; - int Function(List x0) Function() x6; - Function Function(int x1, [Function x2]) Function() x7; - Function Function(int x0, {core.List x}) Function() x8; - List Function(Function x) Function() x9; - List Function(int y, [core.List x]) Function() x10; - core.List Function([int x1]) Function() x11; - core.List Function({List x}) Function() x12; - core.List Function() Function() x13; - List Function(int x0, [List x]) Function() x14; - List Function([List x1]) Function() x15; - Function(int x, [Function x2]) Function() x16; - Function(int y, {core.List x}) Function() x17; - void Function([Function x]) Function() x18; - void Function(core.List x0) Function() x19; - int Function(A x) Function() x20; - core.List Function(List x) Function() x21; - List Function(int x) Function() x22; - - U56({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int x) => null; - List m1(List x) => null; - List m2(int y, {List x}) => null; - void m3(int x0, {Function x}) => null; - void m4(int x) => null; - int Function([List x]) m5() => null; - int Function(List x0) m6() => null; - Function Function(int x0, [Function x1]) m7() => null; - Function Function(int x0, {core.List x}) m8() => null; - List Function(Function x) m9() => null; - List Function(int y, [core.List x]) m10() => null; - core.List Function([int x0]) m11() => null; - core.List Function({List x}) m12() => null; - core.List Function() m13() => null; - List Function(int x0, [List x]) m14() => null; - List Function([List x0]) m15() => null; - Function(int x, [Function x0]) m16() => null; - Function(int y, {core.List x}) m17() => null; - void Function([Function x]) m18() => null; - void Function(core.List x0) m19() => null; - int Function(A x) m20() => null; - core.List Function(List x) m21() => null; - List Function(int x) m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int x) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int x) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int x)); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(List x) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(List x) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(List x)); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - // The static function has its T always set to int. - Expect.isTrue(f1 is F1); - Expect.isFalse(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - Expect.isFalse(confuse(f1) is F1); - if (tIsBool) { - Expect.throws(() { - x1 = (f1 as dynamic); - }); - Expect.throws(() { - x1 = confuse(f1); - }); - Expect.throws(() { - l1 = (f1 as dynamic); - }); - Expect.throws(() { - l1 = confuse(f1); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m1 is F1); - Expect.equals(true, m1 is F1); - Expect.equals(true, confuse(m1) is F1); - Expect.equals(true, confuse(m1) is F1); - } - } - - /// List Function(int y, {List x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int y, {List x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int y, {List x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int x0, {Function x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int x0, {Function x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int x0, {Function x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// void Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - void Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is void Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function([List x]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function([List x]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function([List x]) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(List x0) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(List x0) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(List x0) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int x1, [Function x2]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x1, [Function x2]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x1, [Function x2]) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x0, {core.List x}) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x0, {core.List x}) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function(int x0, {core.List x}) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(Function x) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(Function x) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(Function x) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int y, [core.List x]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int y, [core.List x]) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int y, [core.List x]) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function([int x1]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function([int x1]) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function([int x1]) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function({List x}) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function({List x}) Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue( - m12 is core.List Function({List x}) Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function() Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function() Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function() Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - } - - /// List Function(int x0, [List x]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x0, [List x]) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function(int x0, [List x]) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function([List x1]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function([List x1]) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function([List x1]) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x, [Function x2]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x, [Function x2]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x, [Function x2]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int y, {core.List x}) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int y, {core.List x}) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int y, {core.List x}) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function([Function x]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function([Function x]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function([Function x]) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(core.List x0) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(core.List x0) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(core.List x0) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(A x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(A x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is int Function(A x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(List x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function(List x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// List Function(int x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(int x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is List Function(int x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U56().runTests(); - new U56(tIsInt: true).runTests(); - new U56(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type57_test.dart b/tests/language_2/function_type/function_type57_test.dart deleted file mode 100644 index 869755ccbf7..00000000000 --- a/tests/language_2/function_type/function_type57_test.dart +++ /dev/null @@ -1,847 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function([int x]); -typedef F1 = List Function([List x]); -typedef F2 = List Function(core.List x); -typedef F3 = void Function(int y, {Function x}); -typedef F4 = void Function(Function x); -typedef F5 = int Function([List x]) Function(int x); -typedef F6 = int Function(List x1) Function(int x); -typedef F7 = Function Function(int x2, [Function x3]) Function(int x); -typedef F8 = Function Function(int x1, {core.List x}) Function( - int x); -typedef F9 = List Function(Function x) Function(int x); -typedef F10 = List Function(int y, [core.List x]) - Function(int x); -typedef F11 = core.List Function([int x1]) Function(int x); -typedef F12 = core.List Function({List x}) Function( - int x); -typedef F13 = core.List Function() Function(int x); -typedef F14 = List Function(int x1, [List x]) Function(int x); -typedef F15 = List Function([List x1]) Function(int x); -typedef F16 = Function(int x, [Function x1]) Function(int x); -typedef F17 = Function(int y, {core.List x}) Function(int x); -typedef F18 = void Function([Function x]) Function(int x); -typedef F19 = void Function(core.List x1) Function(int x); -typedef F20 = int Function(A x) Function(int x); -typedef F21 = core.List Function(List x) Function(int x); -typedef F22 = List Function(int x) Function(int x); - -Function f0([int x]) => null; -List f1([List x]) => null; -List f2(core.List x) => null; -void f3(int y, {Function x}) => null; -void f4(Function x) => null; -int Function([List x]) f5(int x) => null; -int Function(List x0) f6(int x) => null; -Function Function(int x0, [Function x1]) f7(int x) => null; -Function Function(int x0, {core.List x}) f8(int x) => null; -List Function(Function x) f9(int x) => null; -List Function(int y, [core.List x]) f10(int x) => null; -core.List Function([int x0]) f11(int x) => null; -core.List Function({List x}) f12(int x) => null; -core.List Function() f13(int x) => null; -List Function(int x0, [List x]) f14(int x) => null; -List Function([List x0]) f15(int x) => null; -Function(int x, [Function x0]) f16(int x) => null; -Function(int y, {core.List x}) f17(int x) => null; -void Function([Function x]) f18(int x) => null; -void Function(core.List x0) f19(int x) => null; -int Function(A x) f20(int x) => null; -core.List Function(List x) f21(int x) => null; -List Function(int x) f22(int x) => null; - -class U57 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function([int x]) x0; - List Function([List x]) x1; - List Function(core.List x) x2; - void Function(int y, {Function x}) x3; - void Function(Function x) x4; - int Function([List x]) Function(int x) x5; - int Function(List x1) Function(int x) x6; - Function Function(int x2, [Function x3]) Function(int x) x7; - Function Function(int x1, {core.List x}) Function(int x) x8; - List Function(Function x) Function(int x) x9; - List Function(int y, [core.List x]) Function(int x) x10; - core.List Function([int x1]) Function(int x) x11; - core.List Function({List x}) Function(int x) x12; - core.List Function() Function(int x) x13; - List Function(int x1, [List x]) Function(int x) x14; - List Function([List x1]) Function(int x) x15; - Function(int x, [Function x1]) Function(int x) x16; - Function(int y, {core.List x}) Function(int x) x17; - void Function([Function x]) Function(int x) x18; - void Function(core.List x1) Function(int x) x19; - int Function(A x) Function(int x) x20; - core.List Function(List x) Function(int x) x21; - List Function(int x) Function(int x) x22; - - U57({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0([int x]) => null; - List m1([List x]) => null; - List m2(core.List x) => null; - void m3(int y, {Function x}) => null; - void m4(Function x) => null; - int Function([List x]) m5(int x) => null; - int Function(List x0) m6(int x) => null; - Function Function(int x0, [Function x1]) m7(int x) => null; - Function Function(int x0, {core.List x}) m8(int x) => null; - List Function(Function x) m9(int x) => null; - List Function(int y, [core.List x]) m10(int x) => null; - core.List Function([int x0]) m11(int x) => null; - core.List Function({List x}) m12(int x) => null; - core.List Function() m13(int x) => null; - List Function(int x0, [List x]) m14(int x) => null; - List Function([List x0]) m15(int x) => null; - Function(int x, [Function x0]) m16(int x) => null; - Function(int y, {core.List x}) m17(int x) => null; - void Function([Function x]) m18(int x) => null; - void Function(core.List x0) m19(int x) => null; - int Function(A x) m20(int x) => null; - core.List Function(List x) m21(int x) => null; - List Function(int x) m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function([int x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function([int x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function([int x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function([List x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function([List x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function([List x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - // The static function has its T always set to int. - Expect.isTrue(f1 is F1); - Expect.isFalse(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - Expect.isFalse(confuse(f1) is F1); - if (tIsBool) { - Expect.throws(() { - x1 = (f1 as dynamic); - }); - Expect.throws(() { - x1 = confuse(f1); - }); - Expect.throws(() { - l1 = (f1 as dynamic); - }); - Expect.throws(() { - l1 = confuse(f1); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m1 is F1); - Expect.equals(true, m1 is F1); - Expect.equals(true, confuse(m1) is F1); - Expect.equals(true, confuse(m1) is F1); - } - } - - /// List Function(core.List x) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(core.List x) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(core.List x)); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int y, {Function x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int y, {Function x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int y, {Function x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// void Function(Function x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - void Function(Function x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is void Function(Function x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function([List x]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function([List x]) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function([List x]) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(List x1) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(List x1) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(List x1) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int x2, [Function x3]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x2, [Function x3]) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue( - m7 is Function Function(int x2, [Function x3]) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x1, {core.List x}) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x1, {core.List x}) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x1, {core.List x}) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(Function x) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(Function x) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(Function x) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int y, [core.List x]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int y, [core.List x]) Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int y, [core.List x]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function([int x1]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function([int x1]) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is core.List Function([int x1]) Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function({List x}) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function({List x}) Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function({List x}) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function() Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function() Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function() Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - } - - /// List Function(int x1, [List x]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x1, [List x]) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function(int x1, [List x]) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function([List x1]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function([List x1]) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function([List x1]) Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x, [Function x1]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x, [Function x1]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x, [Function x1]) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int y, {core.List x}) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int y, {core.List x}) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue( - m17 is Function(int y, {core.List x}) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function([Function x]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function([Function x]) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function([Function x]) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(core.List x1) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(core.List x1) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(core.List x1) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(A x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(A x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is int Function(A x) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(List x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is core.List Function(List x) Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// List Function(int x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(int x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is List Function(int x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U57().runTests(); - new U57(tIsInt: true).runTests(); - new U57(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type58_test.dart b/tests/language_2/function_type/function_type58_test.dart deleted file mode 100644 index afcd6ff805a..00000000000 --- a/tests/language_2/function_type/function_type58_test.dart +++ /dev/null @@ -1,880 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int x0, [int x]); -typedef F1 = List Function(int x0, [List x]); -typedef F2 = List Function([core.List x]); -typedef F3 = void Function(List x); -typedef F4 = void Function(List x); -typedef F5 = int Function([List x]) Function(); -typedef F6 = int Function(List x1) Function(); -typedef F7 = Function Function(int x2, [Function x3]) - Function(); -typedef F8 = Function Function(int x1, {core.List x}) - Function(); -typedef F9 = List Function(Function x) - Function(); -typedef F10 = List Function(int y, [core.List x]) - Function(); -typedef F11 = core.List Function([int x1]) - Function(); -typedef F12 = core.List Function({List x}) - Function(); -typedef F13 = core.List Function() Function(); -typedef F14 = List Function(int x1, [List x]) - Function(); -typedef F15 = List Function([List x1]) Function(); -typedef F16 = Function(int x, [Function x1]) Function(); -typedef F17 = Function(int y, {core.List x}) - Function(); -typedef F18 = void Function([Function x]) Function(); -typedef F19 = void Function(core.List x1) - Function(); -typedef F20 = int Function(A x) Function(); -typedef F21 = core.List Function(List x) - Function(); -typedef F22 = List Function(int x) Function(); - -Function f0(int x0, [int x]) => null; -List f1(int x0, [List x]) => null; -List f2([core.List x]) => null; -void f3(List x) => null; -void f4(List x) => null; -int Function([List x]) f5() => null; -int Function(List x0) f6() => null; -Function Function(int x0, [Function x1]) f7() => null; -Function Function(int x0, {core.List x}) f8() => - null; -List Function(Function x) f9() => null; -List Function(int y, [core.List x]) - f10() => null; -core.List Function([int x0]) f11() => null; -core.List Function({List x}) f12() => - null; -core.List Function() f13() => null; -List Function(int x0, [List x]) f14() => - null; -List Function([List x0]) f15() => null; -Function(int x, [Function x0]) f16() => null; -Function(int y, {core.List x}) f17() => null; -void Function([Function x]) f18() => null; -void Function(core.List x0) f19() => null; -int Function(A x) f20() => null; -core.List Function(List x) f21() => null; -List Function(int x) f22() => null; - -class U58 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int x0, [int x]) x0; - List Function(int x0, [List x]) x1; - List Function([core.List x]) x2; - void Function(List x) x3; - void Function(List x) x4; - int Function([List x]) Function() x5; - int Function(List x1) Function() x6; - Function Function(int x2, [Function x3]) Function() x7; - Function Function(int x1, {core.List x}) - Function() x8; - List Function(Function x) Function() x9; - List Function(int y, [core.List x]) - Function() x10; - core.List Function([int x1]) Function() x11; - core.List Function({List x}) - Function() x12; - core.List Function() Function() x13; - List Function(int x1, [List x]) Function() - x14; - List Function([List x1]) Function() x15; - Function(int x, [Function x1]) Function() x16; - Function(int y, {core.List x}) Function() x17; - void Function([Function x]) Function() x18; - void Function(core.List x1) Function() x19; - int Function(A x) Function() x20; - core.List Function(List x) Function() x21; - List Function(int x) Function() x22; - - U58({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int x0, [int x]) => null; - List m1(int x0, [List x]) => null; - List m2([core.List x]) => null; - void m3(List x) => null; - void m4(List x) => null; - int Function([List x]) m5() => null; - int Function(List x0) m6() => null; - Function Function(int x0, [Function x1]) m7() => null; - Function Function(int x0, {core.List x}) m8() => - null; - List Function(Function x) m9() => null; - List Function(int y, [core.List x]) - m10() => null; - core.List Function([int x0]) m11() => null; - core.List Function({List x}) m12() => - null; - core.List Function() m13() => null; - List Function(int x0, [List x]) m14() => - null; - List Function([List x0]) m15() => null; - Function(int x, [Function x0]) m16() => null; - Function(int y, {core.List x}) m17() => null; - void Function([Function x]) m18() => null; - void Function(core.List x0) m19() => null; - int Function(A x) m20() => null; - core.List Function(List x) m21() => null; - List Function(int x) m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int x0, [int x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int x0, [int x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int x0, [int x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int x0, [List x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int x0, [List x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int x0, [List x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - // The static function has its T always set to int. - Expect.isTrue(f1 is F1); - Expect.isFalse(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - Expect.isFalse(confuse(f1) is F1); - if (tIsBool) { - Expect.throws(() { - x1 = (f1 as dynamic); - }); - Expect.throws(() { - x1 = confuse(f1); - }); - Expect.throws(() { - l1 = (f1 as dynamic); - }); - Expect.throws(() { - l1 = confuse(f1); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m1 is F1); - Expect.equals(true, m1 is F1); - Expect.equals(true, confuse(m1) is F1); - Expect.equals(true, confuse(m1) is F1); - } - } - - /// List Function([core.List x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function([core.List x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function([core.List x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(List x) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(List x) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(List x)); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// void Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - void Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is void Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function([List x]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function([List x]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function([List x]) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(List x1) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(List x1) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function(List x1) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int x2, [Function x3]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x2, [Function x3]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x2, [Function x3]) - Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x1, {core.List x}) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x1, {core.List x}) - Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x1, {core.List x}) - Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(Function x) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(Function x) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(Function x) - Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int y, [core.List x]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int y, [core.List x]) - Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int y, [core.List x]) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function([int x1]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function([int x1]) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function([int x1]) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function({List x}) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function({List x}) - Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function({List x}) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function() Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function() Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue( - m13 is core.List Function() Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - } - - /// List Function(int x1, [List x]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x1, [List x]) Function() - l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int x1, [List x]) - Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function([List x1]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function([List x1]) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue( - m15 is List Function([List x1]) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x, [Function x1]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x, [Function x1]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function(int x, [Function x1]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int y, {core.List x}) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int y, {core.List x}) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int y, {core.List x}) - Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function([Function x]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function([Function x]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue( - m18 is void Function([Function x]) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(core.List x1) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(core.List x1) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(core.List x1) - Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(A x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(A x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is int Function(A x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(List x) Function() - l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function(List x) - Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// List Function(int x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(int x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is List Function(int x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U58().runTests(); - new U58(tIsInt: true).runTests(); - new U58(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type59_test.dart b/tests/language_2/function_type/function_type59_test.dart deleted file mode 100644 index c92f6126e22..00000000000 --- a/tests/language_2/function_type/function_type59_test.dart +++ /dev/null @@ -1,903 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int y, [int x]); -typedef F1 = List Function(int y, [List x]); -typedef F2 = List Function(int x0, [core.List x]); -typedef F3 = void Function([List x]); -typedef F4 = void Function(core.List x); -typedef F5 = int Function([List x]) Function( - int x); -typedef F6 = int Function(List x1) Function(int x); -typedef F7 = Function Function(int x2, [Function x3]) - Function(int x); -typedef F8 = Function Function(int x1, {core.List x}) - Function(int x); -typedef F9 = List Function(Function x) - Function(int x); -typedef F10 = List Function(int y, [core.List x]) - Function(int x); -typedef F11 = core.List Function([int x1]) - Function(int x); -typedef F12 = core.List Function({List x}) - Function(int x); -typedef F13 = core.List Function() Function( - int x); -typedef F14 = List Function(int x1, [List x]) - Function(int x); -typedef F15 = List Function([List x1]) Function( - int x); -typedef F16 = Function(int x, [Function x1]) Function( - int x); -typedef F17 = Function(int y, {core.List x}) - Function(int x); -typedef F18 = void Function([Function x]) Function( - int x); -typedef F19 = void Function(core.List x1) - Function(int x); -typedef F20 = int Function(A x) Function(int x); -typedef F21 = core.List Function(List x) - Function(int x); -typedef F22 = List Function(int x) Function(int x); - -Function f0(int y, [int x]) => null; -List f1(int y, [List x]) => null; -List f2(int x0, [core.List x]) => null; -void f3([List x]) => null; -void f4(core.List x) => null; -int Function([List x]) f5(int x) => null; -int Function(List x0) f6(int x) => null; -Function Function(int x0, [Function x1]) f7(int x) => null; -Function Function(int x0, {core.List x}) f8( - int x) => - null; -List Function(Function x) f9(int x) => null; -List Function(int y, [core.List x]) f10( - int x) => - null; -core.List Function([int x0]) f11(int x) => null; -core.List Function({List x}) f12( - int x) => - null; -core.List Function() f13(int x) => null; -List Function(int x0, [List x]) f14(int x) => - null; -List Function([List x0]) f15(int x) => null; -Function(int x, [Function x0]) f16(int x) => null; -Function(int y, {core.List x}) f17(int x) => null; -void Function([Function x]) f18(int x) => null; -void Function(core.List x0) f19(int x) => null; -int Function(A x) f20(int x) => null; -core.List Function(List x) f21(int x) => - null; -List Function(int x) f22(int x) => null; - -class U59 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int y, [int x]) x0; - List Function(int y, [List x]) x1; - List Function(int x0, [core.List x]) x2; - void Function([List x]) x3; - void Function(core.List x) x4; - int Function([List x]) Function(int x) x5; - int Function(List x1) Function(int x) x6; - Function Function(int x2, [Function x3]) Function(int x) - x7; - Function Function(int x1, {core.List x}) - Function(int x) x8; - List Function(Function x) Function(int x) x9; - List Function(int y, [core.List x]) - Function(int x) x10; - core.List Function([int x1]) Function(int x) - x11; - core.List Function({List x}) Function( - int x) x12; - core.List Function() Function(int x) x13; - List Function(int x1, [List x]) Function( - int x) x14; - List Function([List x1]) Function(int x) x15; - Function(int x, [Function x1]) Function(int x) x16; - Function(int y, {core.List x}) Function(int x) - x17; - void Function([Function x]) Function(int x) x18; - void Function(core.List x1) Function(int x) x19; - int Function(A x) Function(int x) x20; - core.List Function(List x) Function(int x) - x21; - List Function(int x) Function(int x) x22; - - U59({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int y, [int x]) => null; - List m1(int y, [List x]) => null; - List m2(int x0, [core.List x]) => null; - void m3([List x]) => null; - void m4(core.List x) => null; - int Function([List x]) m5(int x) => null; - int Function(List x0) m6(int x) => null; - Function Function(int x0, [Function x1]) m7(int x) => - null; - Function Function(int x0, {core.List x}) m8( - int x) => - null; - List Function(Function x) m9(int x) => null; - List Function(int y, [core.List x]) - m10(int x) => null; - core.List Function([int x0]) m11(int x) => null; - core.List Function({List x}) m12( - int x) => - null; - core.List Function() m13(int x) => null; - List Function(int x0, [List x]) m14(int x) => - null; - List Function([List x0]) m15(int x) => null; - Function(int x, [Function x0]) m16(int x) => null; - Function(int y, {core.List x}) m17(int x) => - null; - void Function([Function x]) m18(int x) => null; - void Function(core.List x0) m19(int x) => null; - int Function(A x) m20(int x) => null; - core.List Function(List x) m21(int x) => - null; - List Function(int x) m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int y, [int x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int y, [int x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int y, [int x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int y, [List x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int y, [List x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int y, [List x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - // The static function has its T always set to int. - Expect.isTrue(f1 is F1); - Expect.isFalse(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - Expect.isFalse(confuse(f1) is F1); - if (tIsBool) { - Expect.throws(() { - x1 = (f1 as dynamic); - }); - Expect.throws(() { - x1 = confuse(f1); - }); - Expect.throws(() { - l1 = (f1 as dynamic); - }); - Expect.throws(() { - l1 = confuse(f1); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m1 is F1); - Expect.equals(true, m1 is F1); - Expect.equals(true, confuse(m1) is F1); - Expect.equals(true, confuse(m1) is F1); - } - } - - /// List Function(int x0, [core.List x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int x0, [core.List x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int x0, [core.List x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function([List x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function([List x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function([List x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// void Function(core.List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - void Function(core.List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is void Function(core.List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function([List x]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function([List x]) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function([List x]) - Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(List x1) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(List x1) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function(List x1) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int x2, [Function x3]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x2, [Function x3]) Function(int x) - l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x2, [Function x3]) - Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x1, {core.List x}) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x1, {core.List x}) - Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x1, {core.List x}) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function(Function x) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(Function x) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(Function x) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int y, [core.List x]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int y, [core.List x]) - Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int y, [core.List x]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function([int x1]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function([int x1]) Function(int x) - l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function([int x1]) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function({List x}) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function({List x}) - Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function({List x}) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function() Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function() Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function() - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - } - - /// List Function(int x1, [List x]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x1, [List x]) Function( - int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int x1, [List x]) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function([List x1]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function([List x1]) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function([List x1]) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x, [Function x1]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x, [Function x1]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x, [Function x1]) - Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int y, {core.List x}) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int y, {core.List x}) Function(int x) - l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int y, {core.List x}) - Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function([Function x]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function([Function x]) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue( - m18 is void Function([Function x]) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(core.List x1) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(core.List x1) Function(int x) - l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(core.List x1) - Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(A x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(A x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is int Function(A x) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// core.List Function(List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - core.List Function(List x) Function( - int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is core.List Function(List x) - Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// List Function(int x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(int x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is List Function(int x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U59().runTests(); - new U59(tIsInt: true).runTests(); - new U59(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type5_test.dart b/tests/language_2/function_type/function_type5_test.dart deleted file mode 100644 index ef9245a458f..00000000000 --- a/tests/language_2/function_type/function_type5_test.dart +++ /dev/null @@ -1,931 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function([int x1]); -typedef F1 = Function Function([List x1]); -typedef F2 = core.List Function(core.List x0); -typedef F3 = Function(int y, [List x]); -typedef F4 = Function Function(); -typedef F5 = int Function(int y, {int x}) Function(int x); -typedef F6 = int Function(int x1, [core.List x]) Function(int x); -typedef F7 = Function Function(int x1) Function(int x); -typedef F8 = Function Function(int x, [List x1]) Function(int x); -typedef F9 = Function Function(int y, {List x}) Function(int x); -typedef F10 = List Function([List x]) Function(int x); -typedef F11 = List Function(List x1) Function(int x); -typedef F12 = core.List Function(int x2, [Function x3]) Function( - int x); -typedef F13 = core.List Function(int x1, {core.List x}) - Function(int x); -typedef F14 = List Function(Function x) Function(int x); -typedef F15 = List Function(int y, [core.List x]) Function( - int x); -typedef F16 = Function([int x1]) Function(int x); -typedef F17 = Function({List x}) Function(int x); -typedef F18 = Function() Function(int x); -typedef F19 = void Function(int x1, [List x]) Function(int x); -typedef F20 = void Function([List x1]) Function(int x); -typedef F21 = List Function(List x) Function(int x); -typedef F22 = Function(core.List x) Function(int x); -typedef F23 = void Function(List x) Function(int x); - -int f0([int x0]) => null; -Function f1([List x0]) => null; -core.List f2(core.List x0) => null; -f3(int y, [List x]) => null; -Function f4() => null; -int Function(int y, {int x}) f5(int x) => null; -int Function(int x0, [core.List x]) f6(int x) => null; -Function Function(int x0) f7(int x) => null; -Function Function(int x, [List x0]) f8(int x) => null; -Function Function(int y, {List x}) f9(int x) => null; -List Function([List x]) f10(int x) => null; -List Function(List x0) f11(int x) => null; -core.List Function(int x0, [Function x1]) f12(int x) => null; -core.List Function(int x0, {core.List x}) f13(int x) => - null; -List Function(Function x) f14(int x) => null; -List Function(int y, [core.List x]) f15(int x) => null; -Function([int x0]) f16(int x) => null; -Function({List x}) f17(int x) => null; -Function() f18(int x) => null; -void Function(int x0, [List x]) f19(int x) => null; -void Function([List x0]) f20(int x) => null; -List Function(List x) f21(int x) => null; -Function(core.List x) f22(int x) => null; -void Function(List x) f23(int x) => null; - -class U5 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function([int x1]) x0; - Function Function([List x1]) x1; - core.List Function(core.List x0) x2; - Function(int y, [List x]) x3; - Function Function() x4; - int Function(int y, {int x}) Function(int x) x5; - int Function(int x1, [core.List x]) Function(int x) x6; - Function Function(int x1) Function(int x) x7; - Function Function(int x, [List x1]) Function(int x) x8; - Function Function(int y, {List x}) Function(int x) x9; - List Function([List x]) Function(int x) x10; - List Function(List x1) Function(int x) x11; - core.List Function(int x2, [Function x3]) Function(int x) x12; - core.List Function(int x1, {core.List x}) Function(int x) - x13; - List Function(Function x) Function(int x) x14; - List Function(int y, [core.List x]) Function(int x) x15; - Function([int x1]) Function(int x) x16; - Function({List x}) Function(int x) x17; - Function() Function(int x) x18; - void Function(int x1, [List x]) Function(int x) x19; - void Function([List x1]) Function(int x) x20; - List Function(List x) Function(int x) x21; - Function(core.List x) Function(int x) x22; - void Function(List x) Function(int x) x23; - - U5({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0([int x0]) => null; - Function m1([List x0]) => null; - core.List m2(core.List x0) => null; - m3(int y, [List x]) => null; - Function m4() => null; - int Function(int y, {int x}) m5(int x) => null; - int Function(int x0, [core.List x]) m6(int x) => null; - Function Function(int x0) m7(int x) => null; - Function Function(int x, [List x0]) m8(int x) => null; - Function Function(int y, {List x}) m9(int x) => null; - List Function([List x]) m10(int x) => null; - List Function(List x0) m11(int x) => null; - core.List Function(int x0, [Function x1]) m12(int x) => null; - core.List Function(int x0, {core.List x}) m13(int x) => - null; - List Function(Function x) m14(int x) => null; - List Function(int y, [core.List x]) m15(int x) => null; - Function([int x0]) m16(int x) => null; - Function({List x}) m17(int x) => null; - Function() m18(int x) => null; - void Function(int x0, [List x]) m19(int x) => null; - void Function([List x0]) m20(int x) => null; - List Function(List x) m21(int x) => null; - Function(core.List x) m22(int x) => null; - void Function(List x) m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function([int x1]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function([int x1]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function([int x1])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// Function Function([List x1]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - Function Function([List x1]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is Function Function([List x1])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - // The static function has its T always set to int. - Expect.isTrue(f1 is F1); - Expect.isFalse(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - Expect.isFalse(confuse(f1) is F1); - if (tIsBool) { - Expect.throws(() { - x1 = (f1 as dynamic); - }); - Expect.throws(() { - x1 = confuse(f1); - }); - Expect.throws(() { - l1 = (f1 as dynamic); - }); - Expect.throws(() { - l1 = confuse(f1); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m1 is F1); - Expect.equals(true, m1 is F1); - Expect.equals(true, confuse(m1) is F1); - Expect.equals(true, confuse(m1) is F1); - } - } - - /// core.List Function(core.List x0) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function(core.List x0) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is core.List Function(core.List x0)); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// Function(int y, [List x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(int y, [List x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(int y, [List x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// Function Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - Function Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is Function Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int y, {int x}) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int y, {int x}) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int y, {int x}) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x1, [core.List x]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x1, [core.List x]) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function(int x1, [core.List x]) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int x1) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x1) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x1) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x, [List x1]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x, [List x1]) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function(int x, [List x1]) Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// Function Function(int y, {List x}) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - Function Function(int y, {List x}) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is Function Function(int y, {List x}) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - // The static function has its T always set to int. - Expect.isTrue(f9 is F9); - Expect.isFalse(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - Expect.isFalse(confuse(f9) is F9); - if (tIsBool) { - Expect.throws(() { - x9 = (f9 as dynamic); - }); - Expect.throws(() { - x9 = confuse(f9); - }); - Expect.throws(() { - l9 = (f9 as dynamic); - }); - Expect.throws(() { - l9 = confuse(f9); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m9 is F9); - Expect.equals(tIsBool, m9 is F9); - Expect.equals(tIsInt, confuse(m9) is F9); - Expect.equals(tIsBool, confuse(m9) is F9); - } - } - - /// List Function([List x]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function([List x]) Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue( - m10 is List Function([List x]) Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(List x1) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(List x1) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function(List x1) Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function(int x2, [Function x3]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x2, [Function x3]) Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x2, [Function x3]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int x1, {core.List x}) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int x1, {core.List x}) Function( - int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int x1, - {core.List x}) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - } - - /// List Function(Function x) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(Function x) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(Function x) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int y, [core.List x]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int y, [core.List x]) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int y, [core.List x]) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function([int x1]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function([int x1]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function([int x1]) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function({List x}) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function({List x}) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function({List x}) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// Function() Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - Function() Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is Function() Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x1, [List x]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x1, [List x]) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function(int x1, [List x]) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function([List x1]) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function([List x1]) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function([List x1]) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is List Function(List x) Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// Function(core.List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function(core.List x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is Function(core.List x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// void Function(List x) Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - void Function(List x) Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is void Function(List x) Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - // The static function has its T always set to int. - Expect.isTrue(f23 is F23); - Expect.isFalse(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - Expect.isFalse(confuse(f23) is F23); - if (tIsBool) { - Expect.throws(() { - x23 = (f23 as dynamic); - }); - Expect.throws(() { - x23 = confuse(f23); - }); - Expect.throws(() { - l23 = (f23 as dynamic); - }); - Expect.throws(() { - l23 = confuse(f23); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m23 is F23); - Expect.equals(tIsBool, m23 is F23); - Expect.equals(tIsInt, confuse(m23) is F23); - Expect.equals(tIsBool, confuse(m23) is F23); - } - } -} - -void main() { - new U5().runTests(); - new U5(tIsInt: true).runTests(); - new U5(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type60_test.dart b/tests/language_2/function_type/function_type60_test.dart deleted file mode 100644 index 0f85e50ab70..00000000000 --- a/tests/language_2/function_type/function_type60_test.dart +++ /dev/null @@ -1,942 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int x0); -typedef F1 = List Function(List x0); -typedef F2 = List Function(int y, [core.List x]); -typedef F3 = void Function(int x0, [List x]); -typedef F4 = void Function(List x); -typedef F5 = int Function(int x0, [List x]) Function(); -typedef F6 = int Function([List x1]) Function(); -typedef F7 = Function Function(int x, [Function x2]) Function(); -typedef F8 = Function Function(int y, {core.List x}) Function(); -typedef F9 = List Function([Function x]) Function(); -typedef F10 = List Function(core.List x0) Function(); -typedef F11 = core.List Function(int x1, [int x2]) Function(); -typedef F12 = core.List Function(int x0, {List x}) - Function(); -typedef F13 = List Function(int x) Function(); -typedef F14 = List Function(int y, [List x]) Function(); -typedef F15 = List Function(int x1, [List x2]) Function(); -typedef F16 = Function({Function x}) Function(); -typedef F17 = Function(List x) Function(); -typedef F18 = void Function(int x0, [Function x]) Function(); -typedef F19 = void Function([core.List x1]) Function(); -typedef F20 = int Function(List x) Function(); -typedef F21 = List Function(int x) Function(); -typedef F22 = List Function(Function x) Function(); - -Function f0(int x0) => null; -List f1(List x0) => null; -List f2(int y, [core.List x]) => null; -void f3(int x0, [List x]) => null; -void f4(List x) => null; -int Function(int x0, [List x]) f5() => null; -int Function([List x0]) f6() => null; -Function Function(int x, [Function x0]) f7() => null; -Function Function(int y, {core.List x}) f8() => null; -List Function([Function x]) f9() => null; -List Function(core.List x0) f10() => null; -core.List Function(int x0, [int x1]) f11() => null; -core.List Function(int x0, {List x}) f12() => null; -List Function(int x) f13() => null; -List Function(int y, [List x]) f14() => null; -List Function(int x0, [List x1]) f15() => null; -Function({Function x}) f16() => null; -Function(List x) f17() => null; -void Function(int x0, [Function x]) f18() => null; -void Function([core.List x0]) f19() => null; -int Function(List x) f20() => null; -List Function(int x) f21() => null; -List Function(Function x) f22() => null; - -class U60 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int x0) x0; - List Function(List x0) x1; - List Function(int y, [core.List x]) x2; - void Function(int x0, [List x]) x3; - void Function(List x) x4; - int Function(int x0, [List x]) Function() x5; - int Function([List x1]) Function() x6; - Function Function(int x, [Function x2]) Function() x7; - Function Function(int y, {core.List x}) Function() x8; - List Function([Function x]) Function() x9; - List Function(core.List x0) Function() x10; - core.List Function(int x1, [int x2]) Function() x11; - core.List Function(int x0, {List x}) Function() x12; - List Function(int x) Function() x13; - List Function(int y, [List x]) Function() x14; - List Function(int x1, [List x2]) Function() x15; - Function({Function x}) Function() x16; - Function(List x) Function() x17; - void Function(int x0, [Function x]) Function() x18; - void Function([core.List x1]) Function() x19; - int Function(List x) Function() x20; - List Function(int x) Function() x21; - List Function(Function x) Function() x22; - - U60({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int x0) => null; - List m1(List x0) => null; - List m2(int y, [core.List x]) => null; - void m3(int x0, [List x]) => null; - void m4(List x) => null; - int Function(int x0, [List x]) m5() => null; - int Function([List x0]) m6() => null; - Function Function(int x, [Function x0]) m7() => null; - Function Function(int y, {core.List x}) m8() => null; - List Function([Function x]) m9() => null; - List Function(core.List x0) m10() => null; - core.List Function(int x0, [int x1]) m11() => null; - core.List Function(int x0, {List x}) m12() => null; - List Function(int x) m13() => null; - List Function(int y, [List x]) m14() => null; - List Function(int x0, [List x1]) m15() => null; - Function({Function x}) m16() => null; - Function(List x) m17() => null; - void Function(int x0, [Function x]) m18() => null; - void Function([core.List x0]) m19() => null; - int Function(List x) m20() => null; - List Function(int x) m21() => null; - List Function(Function x) m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int x0) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int x0) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int x0)); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(List x0) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(List x0) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(List x0)); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - // The static function has its T always set to int. - Expect.isTrue(f1 is F1); - Expect.isFalse(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - Expect.isFalse(confuse(f1) is F1); - if (tIsBool) { - Expect.throws(() { - x1 = (f1 as dynamic); - }); - Expect.throws(() { - x1 = confuse(f1); - }); - Expect.throws(() { - l1 = (f1 as dynamic); - }); - Expect.throws(() { - l1 = confuse(f1); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m1 is F1); - Expect.equals(true, m1 is F1); - Expect.equals(true, confuse(m1) is F1); - Expect.equals(true, confuse(m1) is F1); - } - } - - /// List Function(int y, [core.List x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int y, [core.List x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int y, [core.List x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int x0, [List x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int x0, [List x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int x0, [List x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// void Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - void Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is void Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - // The static function has its T always set to int. - Expect.isTrue(f4 is F4); - Expect.isFalse(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - Expect.isFalse(confuse(f4) is F4); - if (tIsBool) { - Expect.throws(() { - x4 = (f4 as dynamic); - }); - Expect.throws(() { - x4 = confuse(f4); - }); - Expect.throws(() { - l4 = (f4 as dynamic); - }); - Expect.throws(() { - l4 = confuse(f4); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m4 is F4); - Expect.equals(true, m4 is F4); - Expect.equals(true, confuse(m4) is F4); - Expect.equals(true, confuse(m4) is F4); - } - } - - /// int Function(int x0, [List x]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x0, [List x]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x0, [List x]) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function([List x1]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function([List x1]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function([List x1]) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int x, [Function x2]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x, [Function x2]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x, [Function x2]) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int y, {core.List x}) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int y, {core.List x}) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function(int y, {core.List x}) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function([Function x]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function([Function x]) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function([Function x]) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(core.List x0) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(core.List x0) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue( - m10 is List Function(core.List x0) Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x1, [int x2]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x1, [int x2]) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is core.List Function(int x1, [int x2]) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x0, {List x}) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x0, {List x}) Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 - is core.List Function(int x0, {List x}) Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function(int x) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int y, [List x]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int y, [List x]) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function(int y, [List x]) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x1, [List x2]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x1, [List x2]) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x1, [List x2]) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function({Function x}) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function({Function x}) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function({Function x}) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(List x) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(List x) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(List x) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int x0, [Function x]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x0, [Function x]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x0, [Function x]) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function([core.List x1]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function([core.List x1]) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function([core.List x1]) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(List x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(List x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is int Function(List x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(int x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(int x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(int x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(Function x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(Function x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is List Function(Function x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U60().runTests(); - new U60(tIsInt: true).runTests(); - new U60(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type61_test.dart b/tests/language_2/function_type/function_type61_test.dart deleted file mode 100644 index 319b52ef5d3..00000000000 --- a/tests/language_2/function_type/function_type61_test.dart +++ /dev/null @@ -1,925 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function([int x1]); -typedef F1 = List Function([List x1]); -typedef F2 = List Function(core.List x0); -typedef F3 = void Function(int y, [List x]); -typedef F4 = void Function(); -typedef F5 = int Function(int x1, [List x]) Function(int x); -typedef F6 = int Function([List x1]) Function(int x); -typedef F7 = Function Function(int x, [Function x1]) Function(int x); -typedef F8 = Function Function(int y, {core.List x}) Function( - int x); -typedef F9 = List Function([Function x]) Function(int x); -typedef F10 = List Function(core.List x1) Function( - int x); -typedef F11 = core.List Function(int x2, [int x3]) Function(int x); -typedef F12 = core.List Function(int x1, {List x}) - Function(int x); -typedef F13 = List Function(int x) Function(int x); -typedef F14 = List Function(int y, [List x]) Function(int x); -typedef F15 = List Function(int x2, [List x3]) Function(int x); -typedef F16 = Function({Function x}) Function(int x); -typedef F17 = Function(List x) Function(int x); -typedef F18 = void Function(int x1, [Function x]) Function(int x); -typedef F19 = void Function([core.List x1]) Function(int x); -typedef F20 = int Function(List x) Function(int x); -typedef F21 = List Function(int x) Function(int x); -typedef F22 = List Function(Function x) Function(int x); - -Function f0([int x0]) => null; -List f1([List x0]) => null; -List f2(core.List x0) => null; -void f3(int y, [List x]) => null; -void f4() => null; -int Function(int x0, [List x]) f5(int x) => null; -int Function([List x0]) f6(int x) => null; -Function Function(int x, [Function x0]) f7(int x) => null; -Function Function(int y, {core.List x}) f8(int x) => null; -List Function([Function x]) f9(int x) => null; -List Function(core.List x0) f10(int x) => null; -core.List Function(int x0, [int x1]) f11(int x) => null; -core.List Function(int x0, {List x}) f12(int x) => null; -List Function(int x) f13(int x) => null; -List Function(int y, [List x]) f14(int x) => null; -List Function(int x0, [List x1]) f15(int x) => null; -Function({Function x}) f16(int x) => null; -Function(List x) f17(int x) => null; -void Function(int x0, [Function x]) f18(int x) => null; -void Function([core.List x0]) f19(int x) => null; -int Function(List x) f20(int x) => null; -List Function(int x) f21(int x) => null; -List Function(Function x) f22(int x) => null; - -class U61 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function([int x1]) x0; - List Function([List x1]) x1; - List Function(core.List x0) x2; - void Function(int y, [List x]) x3; - void Function() x4; - int Function(int x1, [List x]) Function(int x) x5; - int Function([List x1]) Function(int x) x6; - Function Function(int x, [Function x1]) Function(int x) x7; - Function Function(int y, {core.List x}) Function(int x) x8; - List Function([Function x]) Function(int x) x9; - List Function(core.List x1) Function(int x) x10; - core.List Function(int x2, [int x3]) Function(int x) x11; - core.List Function(int x1, {List x}) Function(int x) x12; - List Function(int x) Function(int x) x13; - List Function(int y, [List x]) Function(int x) x14; - List Function(int x2, [List x3]) Function(int x) x15; - Function({Function x}) Function(int x) x16; - Function(List x) Function(int x) x17; - void Function(int x1, [Function x]) Function(int x) x18; - void Function([core.List x1]) Function(int x) x19; - int Function(List x) Function(int x) x20; - List Function(int x) Function(int x) x21; - List Function(Function x) Function(int x) x22; - - U61({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0([int x0]) => null; - List m1([List x0]) => null; - List m2(core.List x0) => null; - void m3(int y, [List x]) => null; - void m4() => null; - int Function(int x0, [List x]) m5(int x) => null; - int Function([List x0]) m6(int x) => null; - Function Function(int x, [Function x0]) m7(int x) => null; - Function Function(int y, {core.List x}) m8(int x) => null; - List Function([Function x]) m9(int x) => null; - List Function(core.List x0) m10(int x) => null; - core.List Function(int x0, [int x1]) m11(int x) => null; - core.List Function(int x0, {List x}) m12(int x) => null; - List Function(int x) m13(int x) => null; - List Function(int y, [List x]) m14(int x) => null; - List Function(int x0, [List x1]) m15(int x) => null; - Function({Function x}) m16(int x) => null; - Function(List x) m17(int x) => null; - void Function(int x0, [Function x]) m18(int x) => null; - void Function([core.List x0]) m19(int x) => null; - int Function(List x) m20(int x) => null; - List Function(int x) m21(int x) => null; - List Function(Function x) m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function([int x1]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function([int x1]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function([int x1])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function([List x1]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function([List x1]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function([List x1])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - // The static function has its T always set to int. - Expect.isTrue(f1 is F1); - Expect.isFalse(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - Expect.isFalse(confuse(f1) is F1); - if (tIsBool) { - Expect.throws(() { - x1 = (f1 as dynamic); - }); - Expect.throws(() { - x1 = confuse(f1); - }); - Expect.throws(() { - l1 = (f1 as dynamic); - }); - Expect.throws(() { - l1 = confuse(f1); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m1 is F1); - Expect.equals(true, m1 is F1); - Expect.equals(true, confuse(m1) is F1); - Expect.equals(true, confuse(m1) is F1); - } - } - - /// List Function(core.List x0) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(core.List x0) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(core.List x0)); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int y, [List x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int y, [List x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int y, [List x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// void Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - void Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is void Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x1, [List x]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x1, [List x]) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function(int x1, [List x]) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function([List x1]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function([List x1]) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function([List x1]) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int x, [Function x1]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x, [Function x1]) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue( - m7 is Function Function(int x, [Function x1]) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int y, {core.List x}) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int y, {core.List x}) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int y, {core.List x}) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function([Function x]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function([Function x]) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function([Function x]) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(core.List x1) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(core.List x1) Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue( - m10 is List Function(core.List x1) Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x2, [int x3]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x2, [int x3]) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is core.List Function(int x2, [int x3]) Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x1, {List x}) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x1, {List x}) Function(int x) - l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x1, - {List x}) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function(int x) Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int y, [List x]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int y, [List x]) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function(int y, [List x]) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x2, [List x3]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x2, [List x3]) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue( - m15 is List Function(int x2, [List x3]) Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function({Function x}) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function({Function x}) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function({Function x}) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(List x) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(List x) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(List x) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int x1, [Function x]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x1, [Function x]) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x1, [Function x]) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function([core.List x1]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function([core.List x1]) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function([core.List x1]) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(List x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(List x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is int Function(List x) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(int x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(int x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(int x) Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(Function x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(Function x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is List Function(Function x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U61().runTests(); - new U61(tIsInt: true).runTests(); - new U61(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type62_test.dart b/tests/language_2/function_type/function_type62_test.dart deleted file mode 100644 index 6f8946d4a84..00000000000 --- a/tests/language_2/function_type/function_type62_test.dart +++ /dev/null @@ -1,957 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int x1, [int x2]); -typedef F1 = List Function(int x1, [List x2]); -typedef F2 = List Function([core.List x1]); -typedef F3 = void Function(List x0); -typedef F4 = void Function(A x); -typedef F5 = int Function(int x1, [List x]) - Function(); -typedef F6 = int Function([List x1]) Function(); -typedef F7 = Function Function(int x, [Function x1]) - Function(); -typedef F8 = Function Function(int y, {core.List x}) - Function(); -typedef F9 = List Function([Function x]) - Function(); -typedef F10 = List Function(core.List x1) - Function(); -typedef F11 = core.List Function(int x2, [int x3]) - Function(); -typedef F12 = core.List Function(int x1, {List x}) - Function(); -typedef F13 = List Function(int x) Function(); -typedef F14 = List Function(int y, [List x]) - Function(); -typedef F15 = List Function(int x2, [List x3]) - Function(); -typedef F16 = Function({Function x}) Function(); -typedef F17 = Function(List x) Function(); -typedef F18 = void Function(int x1, [Function x]) - Function(); -typedef F19 = void Function([core.List x1]) - Function(); -typedef F20 = int Function(List x) Function(); -typedef F21 = List Function(int x) Function(); -typedef F22 = List Function(Function x) Function(); - -Function f0(int x0, [int x1]) => null; -List f1(int x0, [List x1]) => null; -List f2([core.List x0]) => null; -void f3(List x0) => null; -void f4(A x) => null; -int Function(int x0, [List x]) f5() => null; -int Function([List x0]) f6() => null; -Function Function(int x, [Function x0]) f7() => null; -Function Function(int y, {core.List x}) f8() => - null; -List Function([Function x]) f9() => null; -List Function(core.List x0) f10() => - null; -core.List Function(int x0, [int x1]) f11() => - null; -core.List Function(int x0, {List x}) - f12() => null; -List Function(int x) f13() => null; -List Function(int y, [List x]) f14() => null; -List Function(int x0, [List x1]) f15() => null; -Function({Function x}) f16() => null; -Function(List x) f17() => null; -void Function(int x0, [Function x]) f18() => null; -void Function([core.List x0]) f19() => null; -int Function(List x) f20() => null; -List Function(int x) f21() => null; -List Function(Function x) f22() => null; - -class U62 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int x1, [int x2]) x0; - List Function(int x1, [List x2]) x1; - List Function([core.List x1]) x2; - void Function(List x0) x3; - void Function(A x) x4; - int Function(int x1, [List x]) Function() x5; - int Function([List x1]) Function() x6; - Function Function(int x, [Function x1]) Function() x7; - Function Function(int y, {core.List x}) - Function() x8; - List Function([Function x]) Function() x9; - List Function(core.List x1) Function() - x10; - core.List Function(int x2, [int x3]) Function() - x11; - core.List Function(int x1, {List x}) - Function() x12; - List Function(int x) Function() x13; - List Function(int y, [List x]) Function() - x14; - List Function(int x2, [List x3]) Function() x15; - Function({Function x}) Function() x16; - Function(List x) Function() x17; - void Function(int x1, [Function x]) Function() x18; - void Function([core.List x1]) Function() x19; - int Function(List x) Function() x20; - List Function(int x) Function() x21; - List Function(Function x) Function() x22; - - U62({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int x0, [int x1]) => null; - List m1(int x0, [List x1]) => null; - List m2([core.List x0]) => null; - void m3(List x0) => null; - void m4(A x) => null; - int Function(int x0, [List x]) m5() => null; - int Function([List x0]) m6() => null; - Function Function(int x, [Function x0]) m7() => null; - Function Function(int y, {core.List x}) m8() => - null; - List Function([Function x]) m9() => null; - List Function(core.List x0) m10() => - null; - core.List Function(int x0, [int x1]) m11() => - null; - core.List Function(int x0, {List x}) - m12() => null; - List Function(int x) m13() => null; - List Function(int y, [List x]) m14() => null; - List Function(int x0, [List x1]) m15() => null; - Function({Function x}) m16() => null; - Function(List x) m17() => null; - void Function(int x0, [Function x]) m18() => null; - void Function([core.List x0]) m19() => null; - int Function(List x) m20() => null; - List Function(int x) m21() => null; - List Function(Function x) m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int x1, [int x2]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int x1, [int x2]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int x1, [int x2])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int x1, [List x2]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int x1, [List x2]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int x1, [List x2])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - // The static function has its T always set to int. - Expect.isTrue(f1 is F1); - Expect.isFalse(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - Expect.isFalse(confuse(f1) is F1); - if (tIsBool) { - Expect.throws(() { - x1 = (f1 as dynamic); - }); - Expect.throws(() { - x1 = confuse(f1); - }); - Expect.throws(() { - l1 = (f1 as dynamic); - }); - Expect.throws(() { - l1 = confuse(f1); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m1 is F1); - Expect.equals(true, m1 is F1); - Expect.equals(true, confuse(m1) is F1); - Expect.equals(true, confuse(m1) is F1); - } - } - - /// List Function([core.List x1]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function([core.List x1]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function([core.List x1])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(List x0) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(List x0) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(List x0)); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// void Function(A x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - void Function(A x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is void Function(A x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x1, [List x]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x1, [List x]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x1, [List x]) - Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function([List x1]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function([List x1]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function([List x1]) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int x, [Function x1]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x, [Function x1]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x, [Function x1]) - Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int y, {core.List x}) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int y, {core.List x}) - Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int y, {core.List x}) - Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function([Function x]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function([Function x]) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function([Function x]) - Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(core.List x1) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(core.List x1) - Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(core.List x1) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x2, [int x3]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x2, [int x3]) - Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int x2, [int x3]) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x1, {List x}) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x1, {List x}) - Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x1, - {List x}) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue( - m13 is List Function(int x) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int y, [List x]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int y, [List x]) Function() - l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int y, [List x]) - Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x2, [List x3]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x2, [List x3]) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x2, [List x3]) - Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function({Function x}) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function({Function x}) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function({Function x}) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(List x) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(List x) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(List x) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int x1, [Function x]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x1, [Function x]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x1, [Function x]) - Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function([core.List x1]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function([core.List x1]) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function([core.List x1]) - Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(List x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(List x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is int Function(List x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(int x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(int x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is List Function(int x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(Function x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(Function x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is List Function(Function x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U62().runTests(); - new U62(tIsInt: true).runTests(); - new U62(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type63_test.dart b/tests/language_2/function_type/function_type63_test.dart deleted file mode 100644 index 98160448971..00000000000 --- a/tests/language_2/function_type/function_type63_test.dart +++ /dev/null @@ -1,979 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int x, [int x2]); -typedef F1 = List Function(int x, [List x2]); -typedef F2 = List Function(int x1, [core.List x2]); -typedef F3 = void Function([List x1]); -typedef F4 = void Function(List x); -typedef F5 = int Function(int x1, [List x]) - Function(int x); -typedef F6 = int Function([List x1]) Function(int x); -typedef F7 = Function Function(int x, [Function x1]) - Function(int x); -typedef F8 = Function Function(int y, {core.List x}) - Function(int x); -typedef F9 = List Function([Function x]) - Function(int x); -typedef F10 = List Function(core.List x1) - Function(int x); -typedef F11 = core.List Function(int x2, [int x3]) - Function(int x); -typedef F12 = core.List Function(int x1, {List x}) - Function(int x); -typedef F13 = List Function(int x) Function(int x); -typedef F14 = List Function(int y, [List x]) - Function(int x); -typedef F15 = List Function(int x2, [List x3]) - Function(int x); -typedef F16 = Function({Function x}) Function(int x); -typedef F17 = Function(List x) Function(int x); -typedef F18 = void Function(int x1, [Function x]) - Function(int x); -typedef F19 = void Function([core.List x1]) - Function(int x); -typedef F20 = int Function(List x) Function(int x); -typedef F21 = List Function(int x) Function(int x); -typedef F22 = List Function(Function x) Function( - int x); - -Function f0(int x, [int x0]) => null; -List f1(int x, [List x0]) => null; -List f2(int x0, [core.List x1]) => null; -void f3([List x0]) => null; -void f4(List x) => null; -int Function(int x0, [List x]) f5(int x) => null; -int Function([List x0]) f6(int x) => null; -Function Function(int x, [Function x0]) f7(int x) => null; -Function Function(int y, {core.List x}) f8( - int x) => - null; -List Function([Function x]) f9(int x) => null; -List Function(core.List x0) f10( - int x) => - null; -core.List Function(int x0, [int x1]) f11(int x) => - null; -core.List Function(int x0, {List x}) - f12(int x) => null; -List Function(int x) f13(int x) => null; -List Function(int y, [List x]) f14(int x) => - null; -List Function(int x0, [List x1]) f15(int x) => - null; -Function({Function x}) f16(int x) => null; -Function(List x) f17(int x) => null; -void Function(int x0, [Function x]) f18(int x) => null; -void Function([core.List x0]) f19(int x) => null; -int Function(List x) f20(int x) => null; -List Function(int x) f21(int x) => null; -List Function(Function x) f22(int x) => null; - -class U63 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int x, [int x2]) x0; - List Function(int x, [List x2]) x1; - List Function(int x1, [core.List x2]) x2; - void Function([List x1]) x3; - void Function(List x) x4; - int Function(int x1, [List x]) Function(int x) - x5; - int Function([List x1]) Function(int x) x6; - Function Function(int x, [Function x1]) Function(int x) - x7; - Function Function(int y, {core.List x}) - Function(int x) x8; - List Function([Function x]) Function(int x) x9; - List Function(core.List x1) Function( - int x) x10; - core.List Function(int x2, [int x3]) Function( - int x) x11; - core.List Function(int x1, {List x}) - Function(int x) x12; - List Function(int x) Function(int x) x13; - List Function(int y, [List x]) Function( - int x) x14; - List Function(int x2, [List x3]) Function(int x) - x15; - Function({Function x}) Function(int x) x16; - Function(List x) Function(int x) x17; - void Function(int x1, [Function x]) Function(int x) x18; - void Function([core.List x1]) Function(int x) - x19; - int Function(List x) Function(int x) x20; - List Function(int x) Function(int x) x21; - List Function(Function x) Function(int x) x22; - - U63({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int x, [int x0]) => null; - List m1(int x, [List x0]) => null; - List m2(int x0, [core.List x1]) => null; - void m3([List x0]) => null; - void m4(List x) => null; - int Function(int x0, [List x]) m5(int x) => - null; - int Function([List x0]) m6(int x) => null; - Function Function(int x, [Function x0]) m7(int x) => null; - Function Function(int y, {core.List x}) m8( - int x) => - null; - List Function([Function x]) m9(int x) => null; - List Function(core.List x0) m10( - int x) => - null; - core.List Function(int x0, [int x1]) m11( - int x) => - null; - core.List Function(int x0, {List x}) - m12(int x) => null; - List Function(int x) m13(int x) => null; - List Function(int y, [List x]) m14(int x) => - null; - List Function(int x0, [List x1]) m15(int x) => null; - Function({Function x}) m16(int x) => null; - Function(List x) m17(int x) => null; - void Function(int x0, [Function x]) m18(int x) => null; - void Function([core.List x0]) m19(int x) => - null; - int Function(List x) m20(int x) => null; - List Function(int x) m21(int x) => null; - List Function(Function x) m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int x, [int x2]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int x, [int x2]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int x, [int x2])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int x, [List x2]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int x, [List x2]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int x, [List x2])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - // The static function has its T always set to int. - Expect.isTrue(f1 is F1); - Expect.isFalse(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - Expect.isFalse(confuse(f1) is F1); - if (tIsBool) { - Expect.throws(() { - x1 = (f1 as dynamic); - }); - Expect.throws(() { - x1 = confuse(f1); - }); - Expect.throws(() { - l1 = (f1 as dynamic); - }); - Expect.throws(() { - l1 = confuse(f1); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m1 is F1); - Expect.equals(true, m1 is F1); - Expect.equals(true, confuse(m1) is F1); - Expect.equals(true, confuse(m1) is F1); - } - } - - /// List Function(int x1, [core.List x2]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int x1, [core.List x2]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int x1, [core.List x2])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function([List x1]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function([List x1]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function([List x1])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// void Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - void Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is void Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x1, [List x]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x1, [List x]) Function(int x) - l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x1, [List x]) - Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function([List x1]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function([List x1]) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function([List x1]) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int x, [Function x1]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x, [Function x1]) Function(int x) - l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x, [Function x1]) - Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int y, {core.List x}) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int y, {core.List x}) - Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int y, {core.List x}) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// List Function([Function x]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function([Function x]) Function(int x) - l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function([Function x]) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(core.List x1) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(core.List x1) - Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(core.List x1) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x2, [int x3]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x2, [int x3]) Function( - int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int x2, [int x3]) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x1, {List x}) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x1, {List x}) - Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x1, - {List x}) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue( - m13 is List Function(int x) Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int y, [List x]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int y, [List x]) Function( - int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int y, [List x]) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x2, [List x3]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x2, [List x3]) Function(int x) - l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x2, [List x3]) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function({Function x}) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function({Function x}) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function({Function x}) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(List x) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(List x) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue( - m17 is Function(List x) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int x1, [Function x]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x1, [Function x]) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x1, [Function x]) - Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function([core.List x1]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function([core.List x1]) Function(int x) - l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function([core.List x1]) - Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// int Function(List x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - int Function(List x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is int Function(List x) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(int x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(int x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is List Function(int x) Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(Function x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(Function x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is List Function(Function x) - Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U63().runTests(); - new U63(tIsInt: true).runTests(); - new U63(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type64_test.dart b/tests/language_2/function_type/function_type64_test.dart deleted file mode 100644 index 83ec553fe75..00000000000 --- a/tests/language_2/function_type/function_type64_test.dart +++ /dev/null @@ -1,942 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function({int x}); -typedef F1 = List Function({List x}); -typedef F2 = List Function(int x, [core.List x2]); -typedef F3 = void Function(int x1, [List x2]); -typedef F4 = int Function(int x) Function(); -typedef F5 = int Function(int y, [List x]) Function(); -typedef F6 = int Function(int x1, [List x2]) Function(); -typedef F7 = Function Function({Function x}) Function(); -typedef F8 = Function Function(List x) Function(); -typedef F9 = List Function(int x0, [Function x]) Function(); -typedef F10 = List Function([core.List x1]) Function(); -typedef F11 = core.List Function(int x, [int x2]) Function(); -typedef F12 = core.List Function(int y, {List x}) - Function(); -typedef F13 = List Function([int x]) Function(); -typedef F14 = List Function(List x0) Function(); -typedef F15 = List Function(int x, [List x2]) Function(); -typedef F16 = Function(int x0, {Function x}) Function(); -typedef F17 = Function([List x]) Function(); -typedef F18 = void Function(int y, [Function x]) Function(); -typedef F19 = void Function(int x1, [core.List x2]) Function(); -typedef F20 = Function Function(int x) Function(); -typedef F21 = List Function(Function x) Function(); -typedef F22 = List Function(List x) Function(); - -Function f0({int x}) => null; -List f1({List x}) => null; -List f2(int x, [core.List x0]) => null; -void f3(int x0, [List x1]) => null; -int Function(int x) f4() => null; -int Function(int y, [List x]) f5() => null; -int Function(int x0, [List x1]) f6() => null; -Function Function({Function x}) f7() => null; -Function Function(List x) f8() => null; -List Function(int x0, [Function x]) f9() => null; -List Function([core.List x0]) f10() => null; -core.List Function(int x, [int x0]) f11() => null; -core.List Function(int y, {List x}) f12() => null; -List Function([int x]) f13() => null; -List Function(List x0) f14() => null; -List Function(int x, [List x0]) f15() => null; -Function(int x0, {Function x}) f16() => null; -Function([List x]) f17() => null; -void Function(int y, [Function x]) f18() => null; -void Function(int x0, [core.List x1]) f19() => null; -Function Function(int x) f20() => null; -List Function(Function x) f21() => null; -List Function(List x) f22() => null; - -class U64 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function({int x}) x0; - List Function({List x}) x1; - List Function(int x, [core.List x2]) x2; - void Function(int x1, [List x2]) x3; - int Function(int x) Function() x4; - int Function(int y, [List x]) Function() x5; - int Function(int x1, [List x2]) Function() x6; - Function Function({Function x}) Function() x7; - Function Function(List x) Function() x8; - List Function(int x0, [Function x]) Function() x9; - List Function([core.List x1]) Function() x10; - core.List Function(int x, [int x2]) Function() x11; - core.List Function(int y, {List x}) Function() x12; - List Function([int x]) Function() x13; - List Function(List x0) Function() x14; - List Function(int x, [List x2]) Function() x15; - Function(int x0, {Function x}) Function() x16; - Function([List x]) Function() x17; - void Function(int y, [Function x]) Function() x18; - void Function(int x1, [core.List x2]) Function() x19; - Function Function(int x) Function() x20; - List Function(Function x) Function() x21; - List Function(List x) Function() x22; - - U64({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0({int x}) => null; - List m1({List x}) => null; - List m2(int x, [core.List x0]) => null; - void m3(int x0, [List x1]) => null; - int Function(int x) m4() => null; - int Function(int y, [List x]) m5() => null; - int Function(int x0, [List x1]) m6() => null; - Function Function({Function x}) m7() => null; - Function Function(List x) m8() => null; - List Function(int x0, [Function x]) m9() => null; - List Function([core.List x0]) m10() => null; - core.List Function(int x, [int x0]) m11() => null; - core.List Function(int y, {List x}) m12() => null; - List Function([int x]) m13() => null; - List Function(List x0) m14() => null; - List Function(int x, [List x0]) m15() => null; - Function(int x0, {Function x}) m16() => null; - Function([List x]) m17() => null; - void Function(int y, [Function x]) m18() => null; - void Function(int x0, [core.List x1]) m19() => null; - Function Function(int x) m20() => null; - List Function(Function x) m21() => null; - List Function(List x) m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function({int x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function({int x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function({int x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function({List x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function({List x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function({List x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - // The static function has its T always set to int. - Expect.isTrue(f1 is F1); - Expect.isFalse(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - Expect.isFalse(confuse(f1) is F1); - if (tIsBool) { - Expect.throws(() { - x1 = (f1 as dynamic); - }); - Expect.throws(() { - x1 = confuse(f1); - }); - Expect.throws(() { - l1 = (f1 as dynamic); - }); - Expect.throws(() { - l1 = confuse(f1); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m1 is F1); - Expect.equals(true, m1 is F1); - Expect.equals(true, confuse(m1) is F1); - Expect.equals(true, confuse(m1) is F1); - } - } - - /// List Function(int x, [core.List x2]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int x, [core.List x2]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int x, [core.List x2])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int x1, [List x2]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int x1, [List x2]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int x1, [List x2])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function(int x) Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int x) Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function(int x) Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int y, [List x]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int y, [List x]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int y, [List x]) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x1, [List x2]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x1, [List x2]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int x1, [List x2]) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function({Function x}) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function({Function x}) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function({Function x}) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(List x) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(List x) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(List x) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int x0, [Function x]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x0, [Function x]) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is List Function(int x0, [Function x]) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function([core.List x1]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function([core.List x1]) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue( - m10 is List Function([core.List x1]) Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x, [int x2]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x, [int x2]) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is core.List Function(int x, [int x2]) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int y, {List x}) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int y, {List x}) Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int y, {List x}) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function([int x]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function([int x]) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function([int x]) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(List x0) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(List x0) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(List x0) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x, [List x2]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x, [List x2]) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x, [List x2]) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x0, {Function x}) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x0, {Function x}) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x0, {Function x}) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function([List x]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function([List x]) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function([List x]) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int y, [Function x]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int y, [Function x]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int y, [Function x]) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x1, [core.List x2]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x1, [core.List x2]) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function(int x1, [core.List x2]) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// Function Function(int x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(int x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is Function Function(int x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(Function x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(Function x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(Function x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is List Function(List x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U64().runTests(); - new U64(tIsInt: true).runTests(); - new U64(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type65_test.dart b/tests/language_2/function_type/function_type65_test.dart deleted file mode 100644 index 57116641d51..00000000000 --- a/tests/language_2/function_type/function_type65_test.dart +++ /dev/null @@ -1,945 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int x0, {int x}); -typedef F1 = List Function(int x0, {List x}); -typedef F2 = List Function({core.List x}); -typedef F3 = void Function(int x, [List x2]); -typedef F4 = int Function(int x) Function(int x); -typedef F5 = int Function(int y, [List x]) Function(int x); -typedef F6 = int Function(int x2, [List x3]) Function(int x); -typedef F7 = Function Function({Function x}) Function(int x); -typedef F8 = Function Function(List x) Function(int x); -typedef F9 = List Function(int x1, [Function x]) Function(int x); -typedef F10 = List Function([core.List x1]) Function( - int x); -typedef F11 = core.List Function(int x, [int x1]) Function(int x); -typedef F12 = core.List Function(int y, {List x}) - Function(int x); -typedef F13 = List Function([int x]) Function(int x); -typedef F14 = List Function(List x1) Function(int x); -typedef F15 = List Function(int x, [List x1]) Function(int x); -typedef F16 = Function(int x1, {Function x}) Function(int x); -typedef F17 = Function([List x]) Function(int x); -typedef F18 = void Function(int y, [Function x]) Function(int x); -typedef F19 = void Function(int x2, [core.List x3]) Function( - int x); -typedef F20 = Function Function(int x) Function(int x); -typedef F21 = List Function(Function x) Function(int x); -typedef F22 = List Function(List x) Function(int x); - -Function f0(int x0, {int x}) => null; -List f1(int x0, {List x}) => null; -List f2({core.List x}) => null; -void f3(int x, [List x0]) => null; -int Function(int x) f4(int x) => null; -int Function(int y, [List x]) f5(int x) => null; -int Function(int x0, [List x1]) f6(int x) => null; -Function Function({Function x}) f7(int x) => null; -Function Function(List x) f8(int x) => null; -List Function(int x0, [Function x]) f9(int x) => null; -List Function([core.List x0]) f10(int x) => null; -core.List Function(int x, [int x0]) f11(int x) => null; -core.List Function(int y, {List x}) f12(int x) => null; -List Function([int x]) f13(int x) => null; -List Function(List x0) f14(int x) => null; -List Function(int x, [List x0]) f15(int x) => null; -Function(int x0, {Function x}) f16(int x) => null; -Function([List x]) f17(int x) => null; -void Function(int y, [Function x]) f18(int x) => null; -void Function(int x0, [core.List x1]) f19(int x) => null; -Function Function(int x) f20(int x) => null; -List Function(Function x) f21(int x) => null; -List Function(List x) f22(int x) => null; - -class U65 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int x0, {int x}) x0; - List Function(int x0, {List x}) x1; - List Function({core.List x}) x2; - void Function(int x, [List x2]) x3; - int Function(int x) Function(int x) x4; - int Function(int y, [List x]) Function(int x) x5; - int Function(int x2, [List x3]) Function(int x) x6; - Function Function({Function x}) Function(int x) x7; - Function Function(List x) Function(int x) x8; - List Function(int x1, [Function x]) Function(int x) x9; - List Function([core.List x1]) Function(int x) x10; - core.List Function(int x, [int x1]) Function(int x) x11; - core.List Function(int y, {List x}) Function(int x) x12; - List Function([int x]) Function(int x) x13; - List Function(List x1) Function(int x) x14; - List Function(int x, [List x1]) Function(int x) x15; - Function(int x1, {Function x}) Function(int x) x16; - Function([List x]) Function(int x) x17; - void Function(int y, [Function x]) Function(int x) x18; - void Function(int x2, [core.List x3]) Function(int x) x19; - Function Function(int x) Function(int x) x20; - List Function(Function x) Function(int x) x21; - List Function(List x) Function(int x) x22; - - U65({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int x0, {int x}) => null; - List m1(int x0, {List x}) => null; - List m2({core.List x}) => null; - void m3(int x, [List x0]) => null; - int Function(int x) m4(int x) => null; - int Function(int y, [List x]) m5(int x) => null; - int Function(int x0, [List x1]) m6(int x) => null; - Function Function({Function x}) m7(int x) => null; - Function Function(List x) m8(int x) => null; - List Function(int x0, [Function x]) m9(int x) => null; - List Function([core.List x0]) m10(int x) => null; - core.List Function(int x, [int x0]) m11(int x) => null; - core.List Function(int y, {List x}) m12(int x) => null; - List Function([int x]) m13(int x) => null; - List Function(List x0) m14(int x) => null; - List Function(int x, [List x0]) m15(int x) => null; - Function(int x0, {Function x}) m16(int x) => null; - Function([List x]) m17(int x) => null; - void Function(int y, [Function x]) m18(int x) => null; - void Function(int x0, [core.List x1]) m19(int x) => null; - Function Function(int x) m20(int x) => null; - List Function(Function x) m21(int x) => null; - List Function(List x) m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int x0, {int x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int x0, {int x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int x0, {int x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int x0, {List x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int x0, {List x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int x0, {List x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - // The static function has its T always set to int. - Expect.isTrue(f1 is F1); - Expect.isFalse(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - Expect.isFalse(confuse(f1) is F1); - if (tIsBool) { - Expect.throws(() { - x1 = (f1 as dynamic); - }); - Expect.throws(() { - x1 = confuse(f1); - }); - Expect.throws(() { - l1 = (f1 as dynamic); - }); - Expect.throws(() { - l1 = confuse(f1); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m1 is F1); - Expect.equals(true, m1 is F1); - Expect.equals(true, confuse(m1) is F1); - Expect.equals(true, confuse(m1) is F1); - } - } - - /// List Function({core.List x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function({core.List x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function({core.List x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int x, [List x2]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int x, [List x2]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int x, [List x2])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function(int x) Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int x) Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function(int x) Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int y, [List x]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int y, [List x]) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function(int y, [List x]) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x2, [List x3]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x2, [List x3]) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int x2, [List x3]) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function({Function x}) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function({Function x}) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function({Function x}) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(List x) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(List x) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(List x) Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int x1, [Function x]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x1, [Function x]) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is List Function(int x1, [Function x]) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function([core.List x1]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function([core.List x1]) Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function([core.List x1]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x, [int x1]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x, [int x1]) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is core.List Function(int x, [int x1]) Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int y, {List x}) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int y, {List x}) Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int y, {List x}) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function([int x]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function([int x]) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function([int x]) Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(List x1) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(List x1) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(List x1) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x, [List x1]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x, [List x1]) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x, [List x1]) Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x1, {Function x}) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x1, {Function x}) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x1, {Function x}) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function([List x]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function([List x]) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function([List x]) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int y, [Function x]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int y, [Function x]) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int y, [Function x]) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x2, [core.List x3]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x2, [core.List x3]) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function(int x2, [core.List x3]) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// Function Function(int x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(int x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is Function Function(int x) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(Function x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(Function x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(Function x) Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(List x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is List Function(List x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U65().runTests(); - new U65(tIsInt: true).runTests(); - new U65(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type66_test.dart b/tests/language_2/function_type/function_type66_test.dart deleted file mode 100644 index 783881e7c50..00000000000 --- a/tests/language_2/function_type/function_type66_test.dart +++ /dev/null @@ -1,982 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int y, {int x}); -typedef F1 = List Function(int y, {List x}); -typedef F2 = List Function(int x0, {core.List x}); -typedef F3 = void Function({List x}); -typedef F4 = int Function(int x) Function(); -typedef F5 = int Function(int y, [List x]) - Function(); -typedef F6 = int Function(int x2, [List x3]) - Function(); -typedef F7 = Function Function({Function x}) Function(); -typedef F8 = Function Function(List x) Function(); -typedef F9 = List Function(int x1, [Function x]) - Function(); -typedef F10 = List Function([core.List x1]) - Function(); -typedef F11 = core.List Function(int x, [int x1]) - Function(); -typedef F12 = core.List Function(int y, {List x}) - Function(); -typedef F13 = List Function([int x]) Function(); -typedef F14 = List Function(List x1) - Function(); -typedef F15 = List Function(int x, [List x1]) - Function(); -typedef F16 = Function(int x1, {Function x}) Function(); -typedef F17 = Function([List x]) Function(); -typedef F18 = void Function(int y, [Function x]) - Function(); -typedef F19 = void Function(int x2, [core.List x3]) - Function(); -typedef F20 = Function Function(int x) Function(); -typedef F21 = List Function(Function x) Function(); -typedef F22 = List Function(List x) - Function(); - -Function f0(int y, {int x}) => null; -List f1(int y, {List x}) => null; -List f2(int x0, {core.List x}) => null; -void f3({List x}) => null; -int Function(int x) f4() => null; -int Function(int y, [List x]) f5() => null; -int Function(int x0, [List x1]) f6() => null; -Function Function({Function x}) f7() => null; -Function Function(List x) f8() => null; -List Function(int x0, [Function x]) f9() => null; -List Function([core.List x0]) f10() => - null; -core.List Function(int x, [int x0]) f11() => null; -core.List Function(int y, {List x}) - f12() => null; -List Function([int x]) f13() => null; -List Function(List x0) f14() => null; -List Function(int x, [List x0]) f15() => null; -Function(int x0, {Function x}) f16() => null; -Function([List x]) f17() => null; -void Function(int y, [Function x]) f18() => null; -void Function(int x0, [core.List x1]) f19() => - null; -Function Function(int x) f20() => null; -List Function(Function x) f21() => null; -List Function(List x) f22() => null; - -class U66 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int y, {int x}) x0; - List Function(int y, {List x}) x1; - List Function(int x0, {core.List x}) x2; - void Function({List x}) x3; - int Function(int x) Function() x4; - int Function(int y, [List x]) Function() x5; - int Function(int x2, [List x3]) Function() x6; - Function Function({Function x}) Function() x7; - Function Function(List x) Function() x8; - List Function(int x1, [Function x]) Function() - x9; - List Function([core.List x1]) - Function() x10; - core.List Function(int x, [int x1]) Function() - x11; - core.List Function(int y, {List x}) - Function() x12; - List Function([int x]) Function() x13; - List Function(List x1) Function() x14; - List Function(int x, [List x1]) Function() x15; - Function(int x1, {Function x}) Function() x16; - Function([List x]) Function() x17; - void Function(int y, [Function x]) Function() x18; - void Function(int x2, [core.List x3]) Function() - x19; - Function Function(int x) Function() x20; - List Function(Function x) Function() x21; - List Function(List x) Function() x22; - - U66({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int y, {int x}) => null; - List m1(int y, {List x}) => null; - List m2(int x0, {core.List x}) => null; - void m3({List x}) => null; - int Function(int x) m4() => null; - int Function(int y, [List x]) m5() => null; - int Function(int x0, [List x1]) m6() => null; - Function Function({Function x}) m7() => null; - Function Function(List x) m8() => null; - List Function(int x0, [Function x]) m9() => - null; - List Function([core.List x0]) m10() => - null; - core.List Function(int x, [int x0]) m11() => - null; - core.List Function(int y, {List x}) - m12() => null; - List Function([int x]) m13() => null; - List Function(List x0) m14() => null; - List Function(int x, [List x0]) m15() => null; - Function(int x0, {Function x}) m16() => null; - Function([List x]) m17() => null; - void Function(int y, [Function x]) m18() => null; - void Function(int x0, [core.List x1]) m19() => - null; - Function Function(int x) m20() => null; - List Function(Function x) m21() => null; - List Function(List x) m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int y, {int x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int y, {int x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int y, {int x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function(int y, {List x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function(int y, {List x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function(int y, {List x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - // The static function has its T always set to int. - Expect.isTrue(f1 is F1); - Expect.isFalse(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - Expect.isFalse(confuse(f1) is F1); - if (tIsBool) { - Expect.throws(() { - x1 = (f1 as dynamic); - }); - Expect.throws(() { - x1 = confuse(f1); - }); - Expect.throws(() { - l1 = (f1 as dynamic); - }); - Expect.throws(() { - l1 = confuse(f1); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m1 is F1); - Expect.equals(true, m1 is F1); - Expect.equals(true, confuse(m1) is F1); - Expect.equals(true, confuse(m1) is F1); - } - } - - /// List Function(int x0, {core.List x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int x0, {core.List x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int x0, {core.List x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function({List x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function({List x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function({List x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function(int x) Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int x) Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function(int x) Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int y, [List x]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int y, [List x]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int y, [List x]) - Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x2, [List x3]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x2, [List x3]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int x2, [List x3]) - Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function({Function x}) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function({Function x}) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue( - m7 is Function Function({Function x}) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(List x) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(List x) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function(List x) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int x1, [Function x]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x1, [Function x]) Function() - l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x1, [Function x]) - Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function([core.List x1]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function([core.List x1]) - Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function([core.List x1]) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x, [int x1]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x, [int x1]) Function() - l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int x, [int x1]) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int y, {List x}) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int y, {List x}) - Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int y, {List x}) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function([int x]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function([int x]) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue( - m13 is List Function([int x]) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(List x1) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(List x1) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(List x1) - Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x, [List x1]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x, [List x1]) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x, [List x1]) - Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x1, {Function x}) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x1, {Function x}) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function(int x1, {Function x}) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function([List x]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function([List x]) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function([List x]) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int y, [Function x]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int y, [Function x]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int y, [Function x]) - Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x2, [core.List x3]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x2, [core.List x3]) - Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x2, [core.List x3]) - Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// Function Function(int x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(int x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is Function Function(int x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(Function x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(Function x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is List Function(Function x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is List Function(List x) - Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U66().runTests(); - new U66(tIsInt: true).runTests(); - new U66(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type67_test.dart b/tests/language_2/function_type/function_type67_test.dart deleted file mode 100644 index 8c123813ae7..00000000000 --- a/tests/language_2/function_type/function_type67_test.dart +++ /dev/null @@ -1,977 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(Function x); -typedef F1 = List Function(); -typedef F2 = List Function(int y, {core.List x}); -typedef F3 = void Function(int x0, {List x}); -typedef F4 = int Function(int x) Function(int x); -typedef F5 = int Function(int y, [List x]) - Function(int x); -typedef F6 = int Function(int x2, [List x3]) Function( - int x); -typedef F7 = Function Function({Function x}) Function( - int x); -typedef F8 = Function Function(List x) Function( - int x); -typedef F9 = List Function(int x1, [Function x]) - Function(int x); -typedef F10 = List Function([core.List x1]) - Function(int x); -typedef F11 = core.List Function(int x, [int x1]) - Function(int x); -typedef F12 = core.List Function(int y, {List x}) - Function(int x); -typedef F13 = List Function([int x]) Function(int x); -typedef F14 = List Function(List x1) - Function(int x); -typedef F15 = List Function(int x, [List x1]) - Function(int x); -typedef F16 = Function(int x1, {Function x}) Function( - int x); -typedef F17 = Function([List x]) Function(int x); -typedef F18 = void Function(int y, [Function x]) - Function(int x); -typedef F19 = void Function(int x2, [core.List x3]) - Function(int x); -typedef F20 = Function Function(int x) Function( - int x); -typedef F21 = List Function(Function x) Function( - int x); -typedef F22 = List Function(List x) - Function(int x); - -Function f0(Function x) => null; -List f1() => null; -List f2(int y, {core.List x}) => null; -void f3(int x0, {List x}) => null; -int Function(int x) f4(int x) => null; -int Function(int y, [List x]) f5(int x) => null; -int Function(int x0, [List x1]) f6(int x) => null; -Function Function({Function x}) f7(int x) => null; -Function Function(List x) f8(int x) => null; -List Function(int x0, [Function x]) f9(int x) => - null; -List Function([core.List x0]) f10( - int x) => - null; -core.List Function(int x, [int x0]) f11(int x) => - null; -core.List Function(int y, {List x}) f12( - int x) => - null; -List Function([int x]) f13(int x) => null; -List Function(List x0) f14(int x) => null; -List Function(int x, [List x0]) f15(int x) => - null; -Function(int x0, {Function x}) f16(int x) => null; -Function([List x]) f17(int x) => null; -void Function(int y, [Function x]) f18(int x) => null; -void Function(int x0, [core.List x1]) f19( - int x) => - null; -Function Function(int x) f20(int x) => null; -List Function(Function x) f21(int x) => null; -List Function(List x) f22(int x) => null; - -class U67 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(Function x) x0; - List Function() x1; - List Function(int y, {core.List x}) x2; - void Function(int x0, {List x}) x3; - int Function(int x) Function(int x) x4; - int Function(int y, [List x]) Function(int x) - x5; - int Function(int x2, [List x3]) Function(int x) x6; - Function Function({Function x}) Function(int x) x7; - Function Function(List x) Function(int x) x8; - List Function(int x1, [Function x]) Function( - int x) x9; - List Function([core.List x1]) - Function(int x) x10; - core.List Function(int x, [int x1]) Function( - int x) x11; - core.List Function(int y, {List x}) - Function(int x) x12; - List Function([int x]) Function(int x) x13; - List Function(List x1) Function(int x) x14; - List Function(int x, [List x1]) Function(int x) x15; - Function(int x1, {Function x}) Function(int x) x16; - Function([List x]) Function(int x) x17; - void Function(int y, [Function x]) Function(int x) x18; - void Function(int x2, [core.List x3]) Function( - int x) x19; - Function Function(int x) Function(int x) x20; - List Function(Function x) Function(int x) x21; - List Function(List x) Function(int x) x22; - - U67({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(Function x) => null; - List m1() => null; - List m2(int y, {core.List x}) => null; - void m3(int x0, {List x}) => null; - int Function(int x) m4(int x) => null; - int Function(int y, [List x]) m5(int x) => null; - int Function(int x0, [List x1]) m6(int x) => null; - Function Function({Function x}) m7(int x) => null; - Function Function(List x) m8(int x) => null; - List Function(int x0, [Function x]) m9(int x) => - null; - List Function([core.List x0]) m10( - int x) => - null; - core.List Function(int x, [int x0]) m11( - int x) => - null; - core.List Function(int y, {List x}) - m12(int x) => null; - List Function([int x]) m13(int x) => null; - List Function(List x0) m14(int x) => null; - List Function(int x, [List x0]) m15(int x) => null; - Function(int x0, {Function x}) m16(int x) => null; - Function([List x]) m17(int x) => null; - void Function(int y, [Function x]) m18(int x) => null; - void Function(int x0, [core.List x1]) m19( - int x) => - null; - Function Function(int x) m20(int x) => null; - List Function(Function x) m21(int x) => null; - List Function(List x) m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(Function x) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(Function x) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(Function x)); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// List Function() - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - List Function() l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is List Function()); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int y, {core.List x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int y, {core.List x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int y, {core.List x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int x0, {List x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int x0, {List x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int x0, {List x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function(int x) Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int x) Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue( - m4 is int Function(int x) Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int y, [List x]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int y, [List x]) Function(int x) - l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int y, [List x]) - Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x2, [List x3]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x2, [List x3]) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int x2, [List x3]) - Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function({Function x}) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function({Function x}) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function({Function x}) - Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(List x) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(List x) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function(List x) Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int x1, [Function x]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x1, [Function x]) Function( - int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x1, [Function x]) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function([core.List x1]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function([core.List x1]) - Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function([core.List x1]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x, [int x1]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x, [int x1]) Function( - int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int x, [int x1]) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int y, {List x}) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int y, {List x}) - Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int y, {List x}) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function([int x]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function([int x]) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue( - m13 is List Function([int x]) Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(List x1) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(List x1) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(List x1) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x, [List x1]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x, [List x1]) Function(int x) - l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x, [List x1]) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x1, {Function x}) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x1, {Function x}) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x1, {Function x}) - Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function([List x]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function([List x]) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue( - m17 is Function([List x]) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int y, [Function x]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int y, [Function x]) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int y, [Function x]) - Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x2, [core.List x3]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x2, [core.List x3]) - Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x2, [core.List x3]) - Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// Function Function(int x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(int x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is Function Function(int x) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(Function x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(Function x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(Function x) - Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(List x) Function(int x) - l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is List Function(List x) - Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U67().runTests(); - new U67(tIsInt: true).runTests(); - new U67(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type68_test.dart b/tests/language_2/function_type/function_type68_test.dart deleted file mode 100644 index 39aad3859e1..00000000000 --- a/tests/language_2/function_type/function_type68_test.dart +++ /dev/null @@ -1,917 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function([Function x]); -typedef F1 = core.List Function(int x); -typedef F2 = List Function(List x); -typedef F3 = void Function(int y, {List x}); -typedef F4 = int Function([int x]) Function(); -typedef F5 = int Function(List x0) Function(); -typedef F6 = int Function(int x, [List x2]) Function(); -typedef F7 = Function Function(int x0, {Function x}) Function(); -typedef F8 = Function Function([List x]) Function(); -typedef F9 = List Function(int y, [Function x]) Function(); -typedef F10 = List Function(int x1, [core.List x2]) - Function(); -typedef F11 = core.List Function({int x}) Function(); -typedef F12 = core.List Function(core.List x) Function(); -typedef F13 = List Function(int x0, [int x]) Function(); -typedef F14 = List Function([List x1]) Function(); -typedef F15 = List Function({List x}) Function(); -typedef F16 = Function(int y, {Function x}) Function(); -typedef F17 = Function(int x0, [List x]) Function(); -typedef F18 = void Function(Function x0) Function(); -typedef F19 = void Function(int x, [core.List x2]) Function(); -typedef F20 = Function Function(Function x) Function(); -typedef F21 = List Function(List x) Function(); -typedef F22 = List Function(core.List x) Function(); - -Function f0([Function x]) => null; -core.List f1(int x) => null; -List f2(List x) => null; -void f3(int y, {List x}) => null; -int Function([int x]) f4() => null; -int Function(List x0) f5() => null; -int Function(int x, [List x0]) f6() => null; -Function Function(int x0, {Function x}) f7() => null; -Function Function([List x]) f8() => null; -List Function(int y, [Function x]) f9() => null; -List Function(int x0, [core.List x1]) f10() => null; -core.List Function({int x}) f11() => null; -core.List Function(core.List x) f12() => null; -List Function(int x0, [int x]) f13() => null; -List Function([List x0]) f14() => null; -List Function({List x}) f15() => null; -Function(int y, {Function x}) f16() => null; -Function(int x0, [List x]) f17() => null; -void Function(Function x0) f18() => null; -void Function(int x, [core.List x0]) f19() => null; -Function Function(Function x) f20() => null; -List Function(List x) f21() => null; -List Function(core.List x) f22() => null; - -class U68 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function([Function x]) x0; - core.List Function(int x) x1; - List Function(List x) x2; - void Function(int y, {List x}) x3; - int Function([int x]) Function() x4; - int Function(List x0) Function() x5; - int Function(int x, [List x2]) Function() x6; - Function Function(int x0, {Function x}) Function() x7; - Function Function([List x]) Function() x8; - List Function(int y, [Function x]) Function() x9; - List Function(int x1, [core.List x2]) Function() x10; - core.List Function({int x}) Function() x11; - core.List Function(core.List x) Function() x12; - List Function(int x0, [int x]) Function() x13; - List Function([List x1]) Function() x14; - List Function({List x}) Function() x15; - Function(int y, {Function x}) Function() x16; - Function(int x0, [List x]) Function() x17; - void Function(Function x0) Function() x18; - void Function(int x, [core.List x2]) Function() x19; - Function Function(Function x) Function() x20; - List Function(List x) Function() x21; - List Function(core.List x) Function() x22; - - U68({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0([Function x]) => null; - core.List m1(int x) => null; - List m2(List x) => null; - void m3(int y, {List x}) => null; - int Function([int x]) m4() => null; - int Function(List x0) m5() => null; - int Function(int x, [List x0]) m6() => null; - Function Function(int x0, {Function x}) m7() => null; - Function Function([List x]) m8() => null; - List Function(int y, [Function x]) m9() => null; - List Function(int x0, [core.List x1]) m10() => null; - core.List Function({int x}) m11() => null; - core.List Function(core.List x) m12() => null; - List Function(int x0, [int x]) m13() => null; - List Function([List x0]) m14() => null; - List Function({List x}) m15() => null; - Function(int y, {Function x}) m16() => null; - Function(int x0, [List x]) m17() => null; - void Function(Function x0) m18() => null; - void Function(int x, [core.List x0]) m19() => null; - Function Function(Function x) m20() => null; - List Function(List x) m21() => null; - List Function(core.List x) m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function([Function x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function([Function x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function([Function x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function(int x) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function(int x) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function(int x)); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(List x) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(List x) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(List x)); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int y, {List x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int y, {List x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int y, {List x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function([int x]) Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function([int x]) Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function([int x]) Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(List x0) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(List x0) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(List x0) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x, [List x2]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x, [List x2]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int x, [List x2]) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int x0, {Function x}) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x0, {Function x}) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x0, {Function x}) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function([List x]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function([List x]) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function([List x]) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int y, [Function x]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int y, [Function x]) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is List Function(int y, [Function x]) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x1, [core.List x2]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x1, [core.List x2]) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x1, - [core.List x2]) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function({int x}) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function({int x}) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function({int x}) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(core.List x) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(core.List x) Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue( - m12 is core.List Function(core.List x) Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x0, [int x]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x0, [int x]) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function(int x0, [int x]) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function([List x1]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function([List x1]) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function([List x1]) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function({List x}) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function({List x}) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function({List x}) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int y, {Function x}) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int y, {Function x}) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int y, {Function x}) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x0, [List x]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x0, [List x]) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x0, [List x]) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(Function x0) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(Function x0) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(Function x0) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x, [core.List x2]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x, [core.List x2]) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function(int x, [core.List x2]) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// Function Function(Function x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(Function x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is Function Function(Function x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(List x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(core.List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(core.List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is List Function(core.List x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U68().runTests(); - new U68(tIsInt: true).runTests(); - new U68(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type69_test.dart b/tests/language_2/function_type/function_type69_test.dart deleted file mode 100644 index 8ad28c6d053..00000000000 --- a/tests/language_2/function_type/function_type69_test.dart +++ /dev/null @@ -1,921 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int x0, [Function x]); -typedef F1 = core.List Function([int x]); -typedef F2 = List Function([List x]); -typedef F3 = void Function(core.List x); -typedef F4 = int Function([int x]) Function(int x); -typedef F5 = int Function(List x1) Function(int x); -typedef F6 = int Function(int x, [List x1]) Function(int x); -typedef F7 = Function Function(int x1, {Function x}) Function(int x); -typedef F8 = Function Function([List x]) Function(int x); -typedef F9 = List Function(int y, [Function x]) Function(int x); -typedef F10 = List Function(int x2, [core.List x3]) - Function(int x); -typedef F11 = core.List Function({int x}) Function(int x); -typedef F12 = core.List Function(core.List x) Function( - int x); -typedef F13 = List Function(int x1, [int x]) Function(int x); -typedef F14 = List Function([List x1]) Function(int x); -typedef F15 = List Function({List x}) Function(int x); -typedef F16 = Function(int y, {Function x}) Function(int x); -typedef F17 = Function(int x1, [List x]) Function(int x); -typedef F18 = void Function(Function x1) Function(int x); -typedef F19 = void Function(int x, [core.List x1]) Function(int x); -typedef F20 = Function Function(Function x) Function(int x); -typedef F21 = List Function(List x) Function(int x); -typedef F22 = List Function(core.List x) Function(int x); - -Function f0(int x0, [Function x]) => null; -core.List f1([int x]) => null; -List f2([List x]) => null; -void f3(core.List x) => null; -int Function([int x]) f4(int x) => null; -int Function(List x0) f5(int x) => null; -int Function(int x, [List x0]) f6(int x) => null; -Function Function(int x0, {Function x}) f7(int x) => null; -Function Function([List x]) f8(int x) => null; -List Function(int y, [Function x]) f9(int x) => null; -List Function(int x0, [core.List x1]) f10(int x) => null; -core.List Function({int x}) f11(int x) => null; -core.List Function(core.List x) f12(int x) => null; -List Function(int x0, [int x]) f13(int x) => null; -List Function([List x0]) f14(int x) => null; -List Function({List x}) f15(int x) => null; -Function(int y, {Function x}) f16(int x) => null; -Function(int x0, [List x]) f17(int x) => null; -void Function(Function x0) f18(int x) => null; -void Function(int x, [core.List x0]) f19(int x) => null; -Function Function(Function x) f20(int x) => null; -List Function(List x) f21(int x) => null; -List Function(core.List x) f22(int x) => null; - -class U69 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int x0, [Function x]) x0; - core.List Function([int x]) x1; - List Function([List x]) x2; - void Function(core.List x) x3; - int Function([int x]) Function(int x) x4; - int Function(List x1) Function(int x) x5; - int Function(int x, [List x1]) Function(int x) x6; - Function Function(int x1, {Function x}) Function(int x) x7; - Function Function([List x]) Function(int x) x8; - List Function(int y, [Function x]) Function(int x) x9; - List Function(int x2, [core.List x3]) Function(int x) x10; - core.List Function({int x}) Function(int x) x11; - core.List Function(core.List x) Function(int x) x12; - List Function(int x1, [int x]) Function(int x) x13; - List Function([List x1]) Function(int x) x14; - List Function({List x}) Function(int x) x15; - Function(int y, {Function x}) Function(int x) x16; - Function(int x1, [List x]) Function(int x) x17; - void Function(Function x1) Function(int x) x18; - void Function(int x, [core.List x1]) Function(int x) x19; - Function Function(Function x) Function(int x) x20; - List Function(List x) Function(int x) x21; - List Function(core.List x) Function(int x) x22; - - U69({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int x0, [Function x]) => null; - core.List m1([int x]) => null; - List m2([List x]) => null; - void m3(core.List x) => null; - int Function([int x]) m4(int x) => null; - int Function(List x0) m5(int x) => null; - int Function(int x, [List x0]) m6(int x) => null; - Function Function(int x0, {Function x}) m7(int x) => null; - Function Function([List x]) m8(int x) => null; - List Function(int y, [Function x]) m9(int x) => null; - List Function(int x0, [core.List x1]) m10(int x) => null; - core.List Function({int x}) m11(int x) => null; - core.List Function(core.List x) m12(int x) => null; - List Function(int x0, [int x]) m13(int x) => null; - List Function([List x0]) m14(int x) => null; - List Function({List x}) m15(int x) => null; - Function(int y, {Function x}) m16(int x) => null; - Function(int x0, [List x]) m17(int x) => null; - void Function(Function x0) m18(int x) => null; - void Function(int x, [core.List x0]) m19(int x) => null; - Function Function(Function x) m20(int x) => null; - List Function(List x) m21(int x) => null; - List Function(core.List x) m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int x0, [Function x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int x0, [Function x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int x0, [Function x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function([int x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function([int x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function([int x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function([List x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function([List x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function([List x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(core.List x) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(core.List x) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(core.List x)); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function([int x]) Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function([int x]) Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function([int x]) Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(List x1) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(List x1) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(List x1) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x, [List x1]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x, [List x1]) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int x, [List x1]) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int x1, {Function x}) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x1, {Function x}) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue( - m7 is Function Function(int x1, {Function x}) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function([List x]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function([List x]) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function([List x]) Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int y, [Function x]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int y, [Function x]) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is List Function(int y, [Function x]) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x2, [core.List x3]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x2, [core.List x3]) Function(int x) - l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x2, - [core.List x3]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function({int x}) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function({int x}) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function({int x}) Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(core.List x) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(core.List x) Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(core.List x) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x1, [int x]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x1, [int x]) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function(int x1, [int x]) Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function([List x1]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function([List x1]) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function([List x1]) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function({List x}) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function({List x}) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function({List x}) Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int y, {Function x}) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int y, {Function x}) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int y, {Function x}) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x1, [List x]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x1, [List x]) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x1, [List x]) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(Function x1) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(Function x1) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(Function x1) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x, [core.List x1]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x, [core.List x1]) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function(int x, [core.List x1]) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// Function Function(Function x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(Function x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is Function Function(Function x) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(List x) Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(core.List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(core.List x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is List Function(core.List x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U69().runTests(); - new U69(tIsInt: true).runTests(); - new U69(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type6_test.dart b/tests/language_2/function_type/function_type6_test.dart deleted file mode 100644 index 761ecec2612..00000000000 --- a/tests/language_2/function_type/function_type6_test.dart +++ /dev/null @@ -1,968 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int x1, [int x2]); -typedef F1 = Function Function(int x1, [List x2]); -typedef F2 = core.List Function([core.List x1]); -typedef F3 = Function(List x0); -typedef F4 = Function Function(A x); -typedef F5 = int Function(int y, {int x}) Function(); -typedef F6 = int Function(int x1, [core.List x]) - Function(); -typedef F7 = Function Function(int x1) Function(); -typedef F8 = Function Function(int x, [List x1]) - Function(); -typedef F9 = Function Function(int y, {List x}) - Function(); -typedef F10 = List Function([List x]) - Function(); -typedef F11 = List Function(List x1) - Function(); -typedef F12 = core.List Function(int x2, [Function x3]) - Function(); -typedef F13 = core.List Function(int x1, {core.List x}) - Function(); -typedef F14 = List Function(Function x) Function(); -typedef F15 = List Function(int y, [core.List x]) - Function(); -typedef F16 = Function([int x1]) Function(); -typedef F17 = Function({List x}) Function(); -typedef F18 = Function() Function(); -typedef F19 = void Function(int x1, [List x]) - Function(); -typedef F20 = void Function([List x1]) Function(); -typedef F21 = List Function(List x) - Function(); -typedef F22 = Function(core.List x) - Function(); -typedef F23 = void Function(List x) Function(); - -int f0(int x0, [int x1]) => null; -Function f1(int x0, [List x1]) => null; -core.List f2([core.List x0]) => null; -f3(List x0) => null; -Function f4(A x) => null; -int Function(int y, {int x}) f5() => null; -int Function(int x0, [core.List x]) f6() => null; -Function Function(int x0) f7() => null; -Function Function(int x, [List x0]) f8() => null; -Function Function(int y, {List x}) f9() => null; -List Function([List x]) f10() => null; -List Function(List x0) f11() => null; -core.List Function(int x0, [Function x1]) f12() => - null; -core.List Function(int x0, {core.List x}) - f13() => null; -List Function(Function x) f14() => null; -List Function(int y, [core.List x]) f15() => - null; -Function([int x0]) f16() => null; -Function({List x}) f17() => null; -Function() f18() => null; -void Function(int x0, [List x]) f19() => null; -void Function([List x0]) f20() => null; -List Function(List x) f21() => null; -Function(core.List x) f22() => null; -void Function(List x) f23() => null; - -class U6 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int x1, [int x2]) x0; - Function Function(int x1, [List x2]) x1; - core.List Function([core.List x1]) x2; - Function(List x0) x3; - Function Function(A x) x4; - int Function(int y, {int x}) Function() x5; - int Function(int x1, [core.List x]) Function() - x6; - Function Function(int x1) Function() x7; - Function Function(int x, [List x1]) Function() - x8; - Function Function(int y, {List x}) Function() x9; - List Function([List x]) Function() - x10; - List Function(List x1) Function() x11; - core.List Function(int x2, [Function x3]) - Function() x12; - core.List Function(int x1, {core.List x}) - Function() x13; - List Function(Function x) Function() x14; - List Function(int y, [core.List x]) - Function() x15; - Function([int x1]) Function() x16; - Function({List x}) Function() x17; - Function() Function() x18; - void Function(int x1, [List x]) Function() x19; - void Function([List x1]) Function() x20; - List Function(List x) Function() - x21; - Function(core.List x) Function() x22; - void Function(List x) Function() x23; - - U6({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int x0, [int x1]) => null; - Function m1(int x0, [List x1]) => null; - core.List m2([core.List x0]) => null; - m3(List x0) => null; - Function m4(A x) => null; - int Function(int y, {int x}) m5() => null; - int Function(int x0, [core.List x]) m6() => - null; - Function Function(int x0) m7() => null; - Function Function(int x, [List x0]) m8() => - null; - Function Function(int y, {List x}) m9() => null; - List Function([List x]) m10() => null; - List Function(List x0) m11() => null; - core.List Function(int x0, [Function x1]) - m12() => null; - core.List Function(int x0, {core.List x}) - m13() => null; - List Function(Function x) m14() => null; - List Function(int y, [core.List x]) m15() => - null; - Function([int x0]) m16() => null; - Function({List x}) m17() => null; - Function() m18() => null; - void Function(int x0, [List x]) m19() => null; - void Function([List x0]) m20() => null; - List Function(List x) m21() => - null; - Function(core.List x) m22() => null; - void Function(List x) m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int x1, [int x2]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int x1, [int x2]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int x1, [int x2])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// Function Function(int x1, [List x2]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - Function Function(int x1, [List x2]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is Function Function(int x1, [List x2])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - // The static function has its T always set to int. - Expect.isTrue(f1 is F1); - Expect.isFalse(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - Expect.isFalse(confuse(f1) is F1); - if (tIsBool) { - Expect.throws(() { - x1 = (f1 as dynamic); - }); - Expect.throws(() { - x1 = confuse(f1); - }); - Expect.throws(() { - l1 = (f1 as dynamic); - }); - Expect.throws(() { - l1 = confuse(f1); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m1 is F1); - Expect.equals(true, m1 is F1); - Expect.equals(true, confuse(m1) is F1); - Expect.equals(true, confuse(m1) is F1); - } - } - - /// core.List Function([core.List x1]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function([core.List x1]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is core.List Function([core.List x1])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// Function(List x0) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(List x0) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(List x0)); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// Function Function(A x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - Function Function(A x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is Function Function(A x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int y, {int x}) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int y, {int x}) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function(int y, {int x}) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x1, [core.List x]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x1, [core.List x]) Function() - l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int x1, [core.List x]) - Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int x1) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x1) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue( - m7 is Function Function(int x1) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x, [List x1]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x, [List x1]) Function() - l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x, [List x1]) - Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// Function Function(int y, {List x}) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - Function Function(int y, {List x}) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is Function Function(int y, {List x}) - Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - // The static function has its T always set to int. - Expect.isTrue(f9 is F9); - Expect.isFalse(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - Expect.isFalse(confuse(f9) is F9); - if (tIsBool) { - Expect.throws(() { - x9 = (f9 as dynamic); - }); - Expect.throws(() { - x9 = confuse(f9); - }); - Expect.throws(() { - l9 = (f9 as dynamic); - }); - Expect.throws(() { - l9 = confuse(f9); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m9 is F9); - Expect.equals(tIsBool, m9 is F9); - Expect.equals(tIsInt, confuse(m9) is F9); - Expect.equals(tIsBool, confuse(m9) is F9); - } - } - - /// List Function([List x]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function([List x]) Function() - l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function([List x]) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(List x1) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(List x1) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function(List x1) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function(int x2, [Function x3]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x2, [Function x3]) - Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x2, [Function x3]) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int x1, {core.List x}) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int x1, {core.List x}) - Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int x1, - {core.List x}) - Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - } - - /// List Function(Function x) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(Function x) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function(Function x) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int y, [core.List x]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int y, [core.List x]) - Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int y, [core.List x]) - Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function([int x1]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function([int x1]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function([int x1]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function({List x}) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function({List x}) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue( - m17 is Function({List x}) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// Function() Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - Function() Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is Function() Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x1, [List x]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x1, [List x]) Function() - l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x1, [List x]) - Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function([List x1]) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function([List x1]) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is void Function([List x1]) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function() - l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(List x) - Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// Function(core.List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function(core.List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is Function(core.List x) - Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// void Function(List x) Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - void Function(List x) Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue( - m23 is void Function(List x) Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - // The static function has its T always set to int. - Expect.isTrue(f23 is F23); - Expect.isFalse(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - Expect.isFalse(confuse(f23) is F23); - if (tIsBool) { - Expect.throws(() { - x23 = (f23 as dynamic); - }); - Expect.throws(() { - x23 = confuse(f23); - }); - Expect.throws(() { - l23 = (f23 as dynamic); - }); - Expect.throws(() { - l23 = confuse(f23); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m23 is F23); - Expect.equals(tIsBool, m23 is F23); - Expect.equals(tIsInt, confuse(m23) is F23); - Expect.equals(tIsBool, confuse(m23) is F23); - } - } -} - -void main() { - new U6().runTests(); - new U6(tIsInt: true).runTests(); - new U6(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type70_test.dart b/tests/language_2/function_type/function_type70_test.dart deleted file mode 100644 index b8e748716bb..00000000000 --- a/tests/language_2/function_type/function_type70_test.dart +++ /dev/null @@ -1,957 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int y, [Function x]); -typedef F1 = core.List Function(int x0, [int x]); -typedef F2 = List Function(int x0, [List x]); -typedef F3 = void Function([core.List x]); -typedef F4 = int Function([int x]) Function(); -typedef F5 = int Function(List x1) Function(); -typedef F6 = int Function(int x, [List x1]) - Function(); -typedef F7 = Function Function(int x1, {Function x}) - Function(); -typedef F8 = Function Function([List x]) Function(); -typedef F9 = List Function(int y, [Function x]) - Function(); -typedef F10 = List Function(int x2, [core.List x3]) - Function(); -typedef F11 = core.List Function({int x}) - Function(); -typedef F12 = core.List Function(core.List x) - Function(); -typedef F13 = List Function(int x1, [int x]) - Function(); -typedef F14 = List Function([List x1]) - Function(); -typedef F15 = List Function({List x}) Function(); -typedef F16 = Function(int y, {Function x}) Function(); -typedef F17 = Function(int x1, [List x]) Function(); -typedef F18 = void Function(Function x1) Function(); -typedef F19 = void Function(int x, [core.List x1]) - Function(); -typedef F20 = Function Function(Function x) - Function(); -typedef F21 = List Function(List x) - Function(); -typedef F22 = List Function(core.List x) - Function(); - -Function f0(int y, [Function x]) => null; -core.List f1(int x0, [int x]) => null; -List f2(int x0, [List x]) => null; -void f3([core.List x]) => null; -int Function([int x]) f4() => null; -int Function(List x0) f5() => null; -int Function(int x, [List x0]) f6() => null; -Function Function(int x0, {Function x}) f7() => null; -Function Function([List x]) f8() => null; -List Function(int y, [Function x]) f9() => null; -List Function(int x0, [core.List x1]) - f10() => null; -core.List Function({int x}) f11() => null; -core.List Function(core.List x) f12() => - null; -List Function(int x0, [int x]) f13() => null; -List Function([List x0]) f14() => null; -List Function({List x}) f15() => null; -Function(int y, {Function x}) f16() => null; -Function(int x0, [List x]) f17() => null; -void Function(Function x0) f18() => null; -void Function(int x, [core.List x0]) f19() => - null; -Function Function(Function x) f20() => null; -List Function(List x) f21() => null; -List Function(core.List x) f22() => null; - -class U70 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int y, [Function x]) x0; - core.List Function(int x0, [int x]) x1; - List Function(int x0, [List x]) x2; - void Function([core.List x]) x3; - int Function([int x]) Function() x4; - int Function(List x1) Function() x5; - int Function(int x, [List x1]) Function() x6; - Function Function(int x1, {Function x}) Function() x7; - Function Function([List x]) Function() x8; - List Function(int y, [Function x]) Function() - x9; - List Function(int x2, [core.List x3]) - Function() x10; - core.List Function({int x}) Function() x11; - core.List Function(core.List x) - Function() x12; - List Function(int x1, [int x]) Function() x13; - List Function([List x1]) Function() x14; - List Function({List x}) Function() x15; - Function(int y, {Function x}) Function() x16; - Function(int x1, [List x]) Function() x17; - void Function(Function x1) Function() x18; - void Function(int x, [core.List x1]) Function() - x19; - Function Function(Function x) Function() x20; - List Function(List x) Function() x21; - List Function(core.List x) Function() x22; - - U70({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int y, [Function x]) => null; - core.List m1(int x0, [int x]) => null; - List m2(int x0, [List x]) => null; - void m3([core.List x]) => null; - int Function([int x]) m4() => null; - int Function(List x0) m5() => null; - int Function(int x, [List x0]) m6() => null; - Function Function(int x0, {Function x}) m7() => null; - Function Function([List x]) m8() => null; - List Function(int y, [Function x]) m9() => null; - List Function(int x0, [core.List x1]) - m10() => null; - core.List Function({int x}) m11() => null; - core.List Function(core.List x) - m12() => null; - List Function(int x0, [int x]) m13() => null; - List Function([List x0]) m14() => null; - List Function({List x}) m15() => null; - Function(int y, {Function x}) m16() => null; - Function(int x0, [List x]) m17() => null; - void Function(Function x0) m18() => null; - void Function(int x, [core.List x0]) m19() => - null; - Function Function(Function x) m20() => null; - List Function(List x) m21() => null; - List Function(core.List x) m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int y, [Function x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int y, [Function x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int y, [Function x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function(int x0, [int x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function(int x0, [int x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function(int x0, [int x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int x0, [List x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int x0, [List x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int x0, [List x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function([core.List x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function([core.List x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function([core.List x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function([int x]) Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function([int x]) Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function([int x]) Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(List x1) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(List x1) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function(List x1) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x, [List x1]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x, [List x1]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function(int x, [List x1]) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int x1, {Function x}) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x1, {Function x}) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x1, {Function x}) - Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function([List x]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function([List x]) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function([List x]) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int y, [Function x]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int y, [Function x]) Function() - l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int y, [Function x]) - Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x2, [core.List x3]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x2, [core.List x3]) - Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x2, - [core.List x3]) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function({int x}) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function({int x}) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function({int x}) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(core.List x) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(core.List x) - Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(core.List x) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x1, [int x]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x1, [int x]) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function(int x1, [int x]) - Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function([List x1]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function([List x1]) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function([List x1]) - Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function({List x}) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function({List x}) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue( - m15 is List Function({List x}) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int y, {Function x}) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int y, {Function x}) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function(int y, {Function x}) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x1, [List x]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x1, [List x]) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue( - m17 is Function(int x1, [List x]) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(Function x1) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(Function x1) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue( - m18 is void Function(Function x1) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x, [core.List x1]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x, [core.List x1]) - Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x, [core.List x1]) - Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// Function Function(Function x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(Function x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is Function Function(Function x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(List x) - Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(core.List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(core.List x) Function() - l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is List Function(core.List x) - Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U70().runTests(); - new U70(tIsInt: true).runTests(); - new U70(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type71_test.dart b/tests/language_2/function_type/function_type71_test.dart deleted file mode 100644 index 1198b38e4be..00000000000 --- a/tests/language_2/function_type/function_type71_test.dart +++ /dev/null @@ -1,976 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(Function x0); -typedef F1 = core.List Function(int y, [int x]); -typedef F2 = List Function(int y, [List x]); -typedef F3 = void Function(int x0, [core.List x]); -typedef F4 = int Function([int x]) Function(int x); -typedef F5 = int Function(List x1) Function( - int x); -typedef F6 = int Function(int x, [List x1]) Function( - int x); -typedef F7 = Function Function(int x1, {Function x}) - Function(int x); -typedef F8 = Function Function([List x]) Function( - int x); -typedef F9 = List Function(int y, [Function x]) - Function(int x); -typedef F10 = List Function(int x2, [core.List x3]) - Function(int x); -typedef F11 = core.List Function({int x}) - Function(int x); -typedef F12 = core.List Function(core.List x) - Function(int x); -typedef F13 = List Function(int x1, [int x]) Function( - int x); -typedef F14 = List Function([List x1]) - Function(int x); -typedef F15 = List Function({List x}) Function( - int x); -typedef F16 = Function(int y, {Function x}) Function( - int x); -typedef F17 = Function(int x1, [List x]) Function( - int x); -typedef F18 = void Function(Function x1) Function(int x); -typedef F19 = void Function(int x, [core.List x1]) - Function(int x); -typedef F20 = Function Function(Function x) Function( - int x); -typedef F21 = List Function(List x) - Function(int x); -typedef F22 = List Function(core.List x) - Function(int x); - -Function f0(Function x0) => null; -core.List f1(int y, [int x]) => null; -List f2(int y, [List x]) => null; -void f3(int x0, [core.List x]) => null; -int Function([int x]) f4(int x) => null; -int Function(List x0) f5(int x) => null; -int Function(int x, [List x0]) f6(int x) => null; -Function Function(int x0, {Function x}) f7(int x) => null; -Function Function([List x]) f8(int x) => null; -List Function(int y, [Function x]) f9(int x) => - null; -List Function(int x0, [core.List x1]) - f10(int x) => null; -core.List Function({int x}) f11(int x) => null; -core.List Function(core.List x) f12( - int x) => - null; -List Function(int x0, [int x]) f13(int x) => null; -List Function([List x0]) f14(int x) => null; -List Function({List x}) f15(int x) => null; -Function(int y, {Function x}) f16(int x) => null; -Function(int x0, [List x]) f17(int x) => null; -void Function(Function x0) f18(int x) => null; -void Function(int x, [core.List x0]) f19(int x) => - null; -Function Function(Function x) f20(int x) => null; -List Function(List x) f21(int x) => null; -List Function(core.List x) f22(int x) => - null; - -class U71 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(Function x0) x0; - core.List Function(int y, [int x]) x1; - List Function(int y, [List x]) x2; - void Function(int x0, [core.List x]) x3; - int Function([int x]) Function(int x) x4; - int Function(List x1) Function(int x) x5; - int Function(int x, [List x1]) Function(int x) x6; - Function Function(int x1, {Function x}) Function(int x) - x7; - Function Function([List x]) Function(int x) x8; - List Function(int y, [Function x]) Function( - int x) x9; - List Function(int x2, [core.List x3]) - Function(int x) x10; - core.List Function({int x}) Function(int x) x11; - core.List Function(core.List x) - Function(int x) x12; - List Function(int x1, [int x]) Function(int x) x13; - List Function([List x1]) Function(int x) x14; - List Function({List x}) Function(int x) x15; - Function(int y, {Function x}) Function(int x) x16; - Function(int x1, [List x]) Function(int x) x17; - void Function(Function x1) Function(int x) x18; - void Function(int x, [core.List x1]) Function( - int x) x19; - Function Function(Function x) Function(int x) x20; - List Function(List x) Function(int x) x21; - List Function(core.List x) Function(int x) - x22; - - U71({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(Function x0) => null; - core.List m1(int y, [int x]) => null; - List m2(int y, [List x]) => null; - void m3(int x0, [core.List x]) => null; - int Function([int x]) m4(int x) => null; - int Function(List x0) m5(int x) => null; - int Function(int x, [List x0]) m6(int x) => null; - Function Function(int x0, {Function x}) m7(int x) => null; - Function Function([List x]) m8(int x) => null; - List Function(int y, [Function x]) m9(int x) => - null; - List Function(int x0, [core.List x1]) - m10(int x) => null; - core.List Function({int x}) m11(int x) => null; - core.List Function(core.List x) m12( - int x) => - null; - List Function(int x0, [int x]) m13(int x) => null; - List Function([List x0]) m14(int x) => null; - List Function({List x}) m15(int x) => null; - Function(int y, {Function x}) m16(int x) => null; - Function(int x0, [List x]) m17(int x) => null; - void Function(Function x0) m18(int x) => null; - void Function(int x, [core.List x0]) m19( - int x) => - null; - Function Function(Function x) m20(int x) => null; - List Function(List x) m21(int x) => null; - List Function(core.List x) m22(int x) => - null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(Function x0) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(Function x0) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(Function x0)); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function(int y, [int x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function(int y, [int x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function(int y, [int x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int y, [List x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int y, [List x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int y, [List x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int x0, [core.List x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int x0, [core.List x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int x0, [core.List x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function([int x]) Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function([int x]) Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue( - m4 is int Function([int x]) Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(List x1) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(List x1) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(List x1) - Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x, [List x1]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x, [List x1]) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int x, [List x1]) - Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int x1, {Function x}) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x1, {Function x}) Function(int x) - l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x1, {Function x}) - Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function([List x]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function([List x]) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function([List x]) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int y, [Function x]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int y, [Function x]) Function( - int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int y, [Function x]) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x2, [core.List x3]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x2, [core.List x3]) - Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x2, - [core.List x3]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function({int x}) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function({int x}) Function(int x) - l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function({int x}) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(core.List x) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(core.List x) - Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(core.List x) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x1, [int x]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x1, [int x]) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function(int x1, [int x]) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function([List x1]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function([List x1]) Function(int x) - l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function([List x1]) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function({List x}) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function({List x}) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function({List x}) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int y, {Function x}) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int y, {Function x}) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int y, {Function x}) - Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x1, [List x]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x1, [List x]) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x1, [List x]) - Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(Function x1) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(Function x1) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue( - m18 is void Function(Function x1) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x, [core.List x1]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x, [core.List x1]) Function( - int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x, [core.List x1]) - Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// Function Function(Function x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(Function x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is Function Function(Function x) - Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function(int x) - l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(List x) - Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(core.List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(core.List x) Function( - int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is List Function(core.List x) - Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U71().runTests(); - new U71(tIsInt: true).runTests(); - new U71(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type72_test.dart b/tests/language_2/function_type/function_type72_test.dart deleted file mode 100644 index 8afc187081b..00000000000 --- a/tests/language_2/function_type/function_type72_test.dart +++ /dev/null @@ -1,942 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function([Function x1]); -typedef F1 = core.List Function(int x0); -typedef F2 = List Function(List x0); -typedef F3 = void Function(int y, [core.List x]); -typedef F4 = int Function(int x0, [int x]) Function(); -typedef F5 = int Function([List x1]) Function(); -typedef F6 = int Function({List x}) Function(); -typedef F7 = Function Function(int y, {Function x}) Function(); -typedef F8 = Function Function(int x0, [List x]) Function(); -typedef F9 = List Function(Function x0) Function(); -typedef F10 = List Function(int x, [core.List x2]) - Function(); -typedef F11 = core.List Function(int x0, {int x}) Function(); -typedef F12 = core.List Function([core.List x]) - Function(); -typedef F13 = List Function(int y, [int x]) Function(); -typedef F14 = List Function(int x1, [List x2]) Function(); -typedef F15 = List Function(int x0, {List x}) Function(); -typedef F16 = Function(List x) Function(); -typedef F17 = Function(int y, [List x]) Function(); -typedef F18 = void Function([Function x1]) Function(); -typedef F19 = void Function({core.List x}) Function(); -typedef F20 = Function Function(List x) Function(); -typedef F21 = List Function(core.List x) Function(); -typedef F22 = List Function(List x) Function(); - -Function f0([Function x0]) => null; -core.List f1(int x0) => null; -List f2(List x0) => null; -void f3(int y, [core.List x]) => null; -int Function(int x0, [int x]) f4() => null; -int Function([List x0]) f5() => null; -int Function({List x}) f6() => null; -Function Function(int y, {Function x}) f7() => null; -Function Function(int x0, [List x]) f8() => null; -List Function(Function x0) f9() => null; -List Function(int x, [core.List x0]) f10() => null; -core.List Function(int x0, {int x}) f11() => null; -core.List Function([core.List x]) f12() => null; -List Function(int y, [int x]) f13() => null; -List Function(int x0, [List x1]) f14() => null; -List Function(int x0, {List x}) f15() => null; -Function(List x) f16() => null; -Function(int y, [List x]) f17() => null; -void Function([Function x0]) f18() => null; -void Function({core.List x}) f19() => null; -Function Function(List x) f20() => null; -List Function(core.List x) f21() => null; -List Function(List x) f22() => null; - -class U72 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function([Function x1]) x0; - core.List Function(int x0) x1; - List Function(List x0) x2; - void Function(int y, [core.List x]) x3; - int Function(int x0, [int x]) Function() x4; - int Function([List x1]) Function() x5; - int Function({List x}) Function() x6; - Function Function(int y, {Function x}) Function() x7; - Function Function(int x0, [List x]) Function() x8; - List Function(Function x0) Function() x9; - List Function(int x, [core.List x2]) Function() x10; - core.List Function(int x0, {int x}) Function() x11; - core.List Function([core.List x]) Function() x12; - List Function(int y, [int x]) Function() x13; - List Function(int x1, [List x2]) Function() x14; - List Function(int x0, {List x}) Function() x15; - Function(List x) Function() x16; - Function(int y, [List x]) Function() x17; - void Function([Function x1]) Function() x18; - void Function({core.List x}) Function() x19; - Function Function(List x) Function() x20; - List Function(core.List x) Function() x21; - List Function(List x) Function() x22; - - U72({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0([Function x0]) => null; - core.List m1(int x0) => null; - List m2(List x0) => null; - void m3(int y, [core.List x]) => null; - int Function(int x0, [int x]) m4() => null; - int Function([List x0]) m5() => null; - int Function({List x}) m6() => null; - Function Function(int y, {Function x}) m7() => null; - Function Function(int x0, [List x]) m8() => null; - List Function(Function x0) m9() => null; - List Function(int x, [core.List x0]) m10() => null; - core.List Function(int x0, {int x}) m11() => null; - core.List Function([core.List x]) m12() => null; - List Function(int y, [int x]) m13() => null; - List Function(int x0, [List x1]) m14() => null; - List Function(int x0, {List x}) m15() => null; - Function(List x) m16() => null; - Function(int y, [List x]) m17() => null; - void Function([Function x0]) m18() => null; - void Function({core.List x}) m19() => null; - Function Function(List x) m20() => null; - List Function(core.List x) m21() => null; - List Function(List x) m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function([Function x1]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function([Function x1]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function([Function x1])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function(int x0) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function(int x0) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function(int x0)); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(List x0) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(List x0) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(List x0)); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int y, [core.List x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int y, [core.List x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int y, [core.List x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function(int x0, [int x]) Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int x0, [int x]) Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function(int x0, [int x]) Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function([List x1]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function([List x1]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function([List x1]) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function({List x}) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function({List x}) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function({List x}) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int y, {Function x}) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int y, {Function x}) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int y, {Function x}) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x0, [List x]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x0, [List x]) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x0, [List x]) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(Function x0) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(Function x0) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(Function x0) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x, [core.List x2]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x, [core.List x2]) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 - is List Function(int x, [core.List x2]) Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x0, {int x}) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x0, {int x}) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is core.List Function(int x0, {int x}) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function([core.List x]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function([core.List x]) Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function([core.List x]) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int y, [int x]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int y, [int x]) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function(int y, [int x]) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x1, [List x2]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x1, [List x2]) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function(int x1, [List x2]) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x0, {List x}) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x0, {List x}) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x0, {List x}) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(List x) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(List x) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(List x) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int y, [List x]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int y, [List x]) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int y, [List x]) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function([Function x1]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function([Function x1]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function([Function x1]) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function({core.List x}) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function({core.List x}) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function({core.List x}) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// Function Function(List x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(List x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is Function Function(List x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(core.List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(core.List x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(core.List x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is List Function(List x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - // The static function has its T always set to int. - Expect.isTrue(f22 is F22); - Expect.isFalse(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - Expect.isFalse(confuse(f22) is F22); - if (tIsBool) { - Expect.throws(() { - x22 = (f22 as dynamic); - }); - Expect.throws(() { - x22 = confuse(f22); - }); - Expect.throws(() { - l22 = (f22 as dynamic); - }); - Expect.throws(() { - l22 = confuse(f22); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m22 is F22); - Expect.equals(tIsBool, m22 is F22); - Expect.equals(tIsInt, confuse(m22) is F22); - Expect.equals(tIsBool, confuse(m22) is F22); - } - } -} - -void main() { - new U72().runTests(); - new U72(tIsInt: true).runTests(); - new U72(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type73_test.dart b/tests/language_2/function_type/function_type73_test.dart deleted file mode 100644 index f89804e8522..00000000000 --- a/tests/language_2/function_type/function_type73_test.dart +++ /dev/null @@ -1,947 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int x1, [Function x2]); -typedef F1 = core.List Function([int x1]); -typedef F2 = List Function([List x1]); -typedef F3 = void Function(core.List x0); -typedef F4 = int Function(int x1, [int x]) Function(int x); -typedef F5 = int Function([List x1]) Function(int x); -typedef F6 = int Function({List x}) Function(int x); -typedef F7 = Function Function(int y, {Function x}) Function(int x); -typedef F8 = Function Function(int x1, [List x]) Function(int x); -typedef F9 = List Function(Function x1) Function(int x); -typedef F10 = List Function(int x, [core.List x1]) - Function(int x); -typedef F11 = core.List Function(int x1, {int x}) Function(int x); -typedef F12 = core.List Function([core.List x]) Function( - int x); -typedef F13 = List Function(int y, [int x]) Function(int x); -typedef F14 = List Function(int x2, [List x3]) Function(int x); -typedef F15 = List Function(int x1, {List x}) Function(int x); -typedef F16 = Function(List x) Function(int x); -typedef F17 = Function(int y, [List x]) Function(int x); -typedef F18 = void Function([Function x1]) Function(int x); -typedef F19 = void Function({core.List x}) Function(int x); -typedef F20 = Function Function(List x) Function(int x); -typedef F21 = List Function(core.List x) Function(int x); -typedef F22 = List Function(List x) Function(int x); - -Function f0(int x0, [Function x1]) => null; -core.List f1([int x0]) => null; -List f2([List x0]) => null; -void f3(core.List x0) => null; -int Function(int x0, [int x]) f4(int x) => null; -int Function([List x0]) f5(int x) => null; -int Function({List x}) f6(int x) => null; -Function Function(int y, {Function x}) f7(int x) => null; -Function Function(int x0, [List x]) f8(int x) => null; -List Function(Function x0) f9(int x) => null; -List Function(int x, [core.List x0]) f10(int x) => null; -core.List Function(int x0, {int x}) f11(int x) => null; -core.List Function([core.List x]) f12(int x) => null; -List Function(int y, [int x]) f13(int x) => null; -List Function(int x0, [List x1]) f14(int x) => null; -List Function(int x0, {List x}) f15(int x) => null; -Function(List x) f16(int x) => null; -Function(int y, [List x]) f17(int x) => null; -void Function([Function x0]) f18(int x) => null; -void Function({core.List x}) f19(int x) => null; -Function Function(List x) f20(int x) => null; -List Function(core.List x) f21(int x) => null; -List Function(List x) f22(int x) => null; - -class U73 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int x1, [Function x2]) x0; - core.List Function([int x1]) x1; - List Function([List x1]) x2; - void Function(core.List x0) x3; - int Function(int x1, [int x]) Function(int x) x4; - int Function([List x1]) Function(int x) x5; - int Function({List x}) Function(int x) x6; - Function Function(int y, {Function x}) Function(int x) x7; - Function Function(int x1, [List x]) Function(int x) x8; - List Function(Function x1) Function(int x) x9; - List Function(int x, [core.List x1]) Function(int x) x10; - core.List Function(int x1, {int x}) Function(int x) x11; - core.List Function([core.List x]) Function(int x) x12; - List Function(int y, [int x]) Function(int x) x13; - List Function(int x2, [List x3]) Function(int x) x14; - List Function(int x1, {List x}) Function(int x) x15; - Function(List x) Function(int x) x16; - Function(int y, [List x]) Function(int x) x17; - void Function([Function x1]) Function(int x) x18; - void Function({core.List x}) Function(int x) x19; - Function Function(List x) Function(int x) x20; - List Function(core.List x) Function(int x) x21; - List Function(List x) Function(int x) x22; - - U73({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int x0, [Function x1]) => null; - core.List m1([int x0]) => null; - List m2([List x0]) => null; - void m3(core.List x0) => null; - int Function(int x0, [int x]) m4(int x) => null; - int Function([List x0]) m5(int x) => null; - int Function({List x}) m6(int x) => null; - Function Function(int y, {Function x}) m7(int x) => null; - Function Function(int x0, [List x]) m8(int x) => null; - List Function(Function x0) m9(int x) => null; - List Function(int x, [core.List x0]) m10(int x) => null; - core.List Function(int x0, {int x}) m11(int x) => null; - core.List Function([core.List x]) m12(int x) => null; - List Function(int y, [int x]) m13(int x) => null; - List Function(int x0, [List x1]) m14(int x) => null; - List Function(int x0, {List x}) m15(int x) => null; - Function(List x) m16(int x) => null; - Function(int y, [List x]) m17(int x) => null; - void Function([Function x0]) m18(int x) => null; - void Function({core.List x}) m19(int x) => null; - Function Function(List x) m20(int x) => null; - List Function(core.List x) m21(int x) => null; - List Function(List x) m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int x1, [Function x2]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int x1, [Function x2]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int x1, [Function x2])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function([int x1]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function([int x1]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function([int x1])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function([List x1]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function([List x1]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function([List x1])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(core.List x0) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(core.List x0) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(core.List x0)); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function(int x1, [int x]) Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int x1, [int x]) Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function(int x1, [int x]) Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function([List x1]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function([List x1]) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function([List x1]) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function({List x}) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function({List x}) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function({List x}) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int y, {Function x}) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int y, {Function x}) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int y, {Function x}) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x1, [List x]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x1, [List x]) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x1, [List x]) Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(Function x1) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(Function x1) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(Function x1) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x, [core.List x1]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x, [core.List x1]) Function(int x) - l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x, - [core.List x1]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x1, {int x}) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x1, {int x}) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is core.List Function(int x1, {int x}) Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function([core.List x]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function([core.List x]) Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function([core.List x]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int y, [int x]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int y, [int x]) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function(int y, [int x]) Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x2, [List x3]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x2, [List x3]) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function(int x2, [List x3]) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x1, {List x}) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x1, {List x}) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x1, {List x}) Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(List x) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(List x) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(List x) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int y, [List x]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int y, [List x]) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int y, [List x]) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function([Function x1]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function([Function x1]) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function([Function x1]) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function({core.List x}) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function({core.List x}) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function({core.List x}) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// Function Function(List x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(List x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is Function Function(List x) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(core.List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(core.List x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is List Function(core.List x) Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(List x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is List Function(List x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - // The static function has its T always set to int. - Expect.isTrue(f22 is F22); - Expect.isFalse(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - Expect.isFalse(confuse(f22) is F22); - if (tIsBool) { - Expect.throws(() { - x22 = (f22 as dynamic); - }); - Expect.throws(() { - x22 = confuse(f22); - }); - Expect.throws(() { - l22 = (f22 as dynamic); - }); - Expect.throws(() { - l22 = confuse(f22); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m22 is F22); - Expect.equals(tIsBool, m22 is F22); - Expect.equals(tIsInt, confuse(m22) is F22); - Expect.equals(tIsBool, confuse(m22) is F22); - } - } -} - -void main() { - new U73().runTests(); - new U73(tIsInt: true).runTests(); - new U73(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type74_test.dart b/tests/language_2/function_type/function_type74_test.dart deleted file mode 100644 index f5fe9193976..00000000000 --- a/tests/language_2/function_type/function_type74_test.dart +++ /dev/null @@ -1,985 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int x, [Function x2]); -typedef F1 = core.List Function(int x1, [int x2]); -typedef F2 = List Function(int x1, [List x2]); -typedef F3 = void Function([core.List x1]); -typedef F4 = int Function(int x1, [int x]) Function(); -typedef F5 = int Function([List x1]) - Function(); -typedef F6 = int Function({List x}) Function(); -typedef F7 = Function Function(int y, {Function x}) - Function(); -typedef F8 = Function Function(int x1, [List x]) - Function(); -typedef F9 = List Function(Function x1) - Function(); -typedef F10 = List Function(int x, [core.List x1]) - Function(); -typedef F11 = core.List Function(int x1, {int x}) - Function(); -typedef F12 = core.List Function([core.List x]) - Function(); -typedef F13 = List Function(int y, [int x]) - Function(); -typedef F14 = List Function(int x2, [List x3]) - Function(); -typedef F15 = List Function(int x1, {List x}) - Function(); -typedef F16 = Function(List x) Function(); -typedef F17 = Function(int y, [List x]) Function(); -typedef F18 = void Function([Function x1]) Function(); -typedef F19 = void Function({core.List x}) - Function(); -typedef F20 = Function Function(List x) - Function(); -typedef F21 = List Function(core.List x) - Function(); -typedef F22 = List Function(List x) Function(); - -Function f0(int x, [Function x0]) => null; -core.List f1(int x0, [int x1]) => null; -List f2(int x0, [List x1]) => null; -void f3([core.List x0]) => null; -int Function(int x0, [int x]) f4() => null; -int Function([List x0]) f5() => null; -int Function({List x}) f6() => null; -Function Function(int y, {Function x}) f7() => null; -Function Function(int x0, [List x]) f8() => null; -List Function(Function x0) f9() => null; -List Function(int x, [core.List x0]) - f10() => null; -core.List Function(int x0, {int x}) f11() => null; -core.List Function([core.List x]) - f12() => null; -List Function(int y, [int x]) f13() => null; -List Function(int x0, [List x1]) f14() => - null; -List Function(int x0, {List x}) f15() => null; -Function(List x) f16() => null; -Function(int y, [List x]) f17() => null; -void Function([Function x0]) f18() => null; -void Function({core.List x}) f19() => null; -Function Function(List x) f20() => null; -List Function(core.List x) f21() => null; -List Function(List x) f22() => null; - -class U74 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int x, [Function x2]) x0; - core.List Function(int x1, [int x2]) x1; - List Function(int x1, [List x2]) x2; - void Function([core.List x1]) x3; - int Function(int x1, [int x]) Function() x4; - int Function([List x1]) Function() x5; - int Function({List x}) Function() x6; - Function Function(int y, {Function x}) Function() x7; - Function Function(int x1, [List x]) Function() x8; - List Function(Function x1) Function() x9; - List Function(int x, [core.List x1]) - Function() x10; - core.List Function(int x1, {int x}) Function() - x11; - core.List Function([core.List x]) - Function() x12; - List Function(int y, [int x]) Function() x13; - List Function(int x2, [List x3]) Function() - x14; - List Function(int x1, {List x}) Function() x15; - Function(List x) Function() x16; - Function(int y, [List x]) Function() x17; - void Function([Function x1]) Function() x18; - void Function({core.List x}) Function() x19; - Function Function(List x) Function() x20; - List Function(core.List x) Function() x21; - List Function(List x) Function() x22; - - U74({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int x, [Function x0]) => null; - core.List m1(int x0, [int x1]) => null; - List m2(int x0, [List x1]) => null; - void m3([core.List x0]) => null; - int Function(int x0, [int x]) m4() => null; - int Function([List x0]) m5() => null; - int Function({List x}) m6() => null; - Function Function(int y, {Function x}) m7() => null; - Function Function(int x0, [List x]) m8() => null; - List Function(Function x0) m9() => null; - List Function(int x, [core.List x0]) - m10() => null; - core.List Function(int x0, {int x}) m11() => - null; - core.List Function([core.List x]) - m12() => null; - List Function(int y, [int x]) m13() => null; - List Function(int x0, [List x1]) m14() => - null; - List Function(int x0, {List x}) m15() => null; - Function(List x) m16() => null; - Function(int y, [List x]) m17() => null; - void Function([Function x0]) m18() => null; - void Function({core.List x}) m19() => null; - Function Function(List x) m20() => null; - List Function(core.List x) m21() => null; - List Function(List x) m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int x, [Function x2]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int x, [Function x2]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int x, [Function x2])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function(int x1, [int x2]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function(int x1, [int x2]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function(int x1, [int x2])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int x1, [List x2]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int x1, [List x2]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int x1, [List x2])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function([core.List x1]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function([core.List x1]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function([core.List x1])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function(int x1, [int x]) Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int x1, [int x]) Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue( - m4 is int Function(int x1, [int x]) Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function([List x1]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function([List x1]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function([List x1]) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function({List x}) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function({List x}) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function({List x}) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int y, {Function x}) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int y, {Function x}) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int y, {Function x}) - Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x1, [List x]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x1, [List x]) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x1, [List x]) - Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(Function x1) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(Function x1) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(Function x1) - Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x, [core.List x1]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x, [core.List x1]) - Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x, - [core.List x1]) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x1, {int x}) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x1, {int x}) Function() - l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int x1, {int x}) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function([core.List x]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function([core.List x]) - Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function([core.List x]) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int y, [int x]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int y, [int x]) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue( - m13 is List Function(int y, [int x]) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x2, [List x3]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x2, [List x3]) Function() - l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int x2, [List x3]) - Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x1, {List x}) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x1, {List x}) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x1, {List x}) - Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(List x) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(List x) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function(List x) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int y, [List x]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int y, [List x]) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue( - m17 is Function(int y, [List x]) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function([Function x1]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function([Function x1]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue( - m18 is void Function([Function x1]) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function({core.List x}) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function({core.List x}) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function({core.List x}) - Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// Function Function(List x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(List x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is Function Function(List x) - Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(core.List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(core.List x) Function() - l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(core.List x) - Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is List Function(List x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - // The static function has its T always set to int. - Expect.isTrue(f22 is F22); - Expect.isFalse(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - Expect.isFalse(confuse(f22) is F22); - if (tIsBool) { - Expect.throws(() { - x22 = (f22 as dynamic); - }); - Expect.throws(() { - x22 = confuse(f22); - }); - Expect.throws(() { - l22 = (f22 as dynamic); - }); - Expect.throws(() { - l22 = confuse(f22); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m22 is F22); - Expect.equals(tIsBool, m22 is F22); - Expect.equals(tIsInt, confuse(m22) is F22); - Expect.equals(tIsBool, confuse(m22) is F22); - } - } -} - -void main() { - new U74().runTests(); - new U74(tIsInt: true).runTests(); - new U74(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type75_test.dart b/tests/language_2/function_type/function_type75_test.dart deleted file mode 100644 index f6f205402b9..00000000000 --- a/tests/language_2/function_type/function_type75_test.dart +++ /dev/null @@ -1,1006 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function({Function x}); -typedef F1 = core.List Function(int x, [int x2]); -typedef F2 = List Function(int x, [List x2]); -typedef F3 = void Function(int x1, [core.List x2]); -typedef F4 = int Function(int x1, [int x]) Function( - int x); -typedef F5 = int Function([List x1]) Function( - int x); -typedef F6 = int Function({List x}) Function(int x); -typedef F7 = Function Function(int y, {Function x}) - Function(int x); -typedef F8 = Function Function(int x1, [List x]) - Function(int x); -typedef F9 = List Function(Function x1) - Function(int x); -typedef F10 = List Function(int x, [core.List x1]) - Function(int x); -typedef F11 = core.List Function(int x1, {int x}) - Function(int x); -typedef F12 = core.List Function([core.List x]) - Function(int x); -typedef F13 = List Function(int y, [int x]) Function( - int x); -typedef F14 = List Function(int x2, [List x3]) - Function(int x); -typedef F15 = List Function(int x1, {List x}) - Function(int x); -typedef F16 = Function(List x) Function(int x); -typedef F17 = Function(int y, [List x]) Function( - int x); -typedef F18 = void Function([Function x1]) Function( - int x); -typedef F19 = void Function({core.List x}) - Function(int x); -typedef F20 = Function Function(List x) - Function(int x); -typedef F21 = List Function(core.List x) - Function(int x); -typedef F22 = List Function(List x) Function( - int x); - -Function f0({Function x}) => null; -core.List f1(int x, [int x0]) => null; -List f2(int x, [List x0]) => null; -void f3(int x0, [core.List x1]) => null; -int Function(int x0, [int x]) f4(int x) => null; -int Function([List x0]) f5(int x) => null; -int Function({List x}) f6(int x) => null; -Function Function(int y, {Function x}) f7(int x) => null; -Function Function(int x0, [List x]) f8(int x) => null; -List Function(Function x0) f9(int x) => null; -List Function(int x, [core.List x0]) - f10(int x) => null; -core.List Function(int x0, {int x}) f11(int x) => - null; -core.List Function([core.List x]) f12( - int x) => - null; -List Function(int y, [int x]) f13(int x) => null; -List Function(int x0, [List x1]) f14( - int x) => - null; -List Function(int x0, {List x}) f15(int x) => - null; -Function(List x) f16(int x) => null; -Function(int y, [List x]) f17(int x) => null; -void Function([Function x0]) f18(int x) => null; -void Function({core.List x}) f19(int x) => null; -Function Function(List x) f20(int x) => null; -List Function(core.List x) f21(int x) => - null; -List Function(List x) f22(int x) => null; - -class U75 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function({Function x}) x0; - core.List Function(int x, [int x2]) x1; - List Function(int x, [List x2]) x2; - void Function(int x1, [core.List x2]) x3; - int Function(int x1, [int x]) Function(int x) x4; - int Function([List x1]) Function(int x) x5; - int Function({List x}) Function(int x) x6; - Function Function(int y, {Function x}) Function(int x) x7; - Function Function(int x1, [List x]) Function(int x) x8; - List Function(Function x1) Function(int x) x9; - List Function(int x, [core.List x1]) - Function(int x) x10; - core.List Function(int x1, {int x}) Function( - int x) x11; - core.List Function([core.List x]) - Function(int x) x12; - List Function(int y, [int x]) Function(int x) x13; - List Function(int x2, [List x3]) Function( - int x) x14; - List Function(int x1, {List x}) Function(int x) x15; - Function(List x) Function(int x) x16; - Function(int y, [List x]) Function(int x) x17; - void Function([Function x1]) Function(int x) x18; - void Function({core.List x}) Function(int x) - x19; - Function Function(List x) Function(int x) - x20; - List Function(core.List x) Function(int x) - x21; - List Function(List x) Function(int x) x22; - - U75({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0({Function x}) => null; - core.List m1(int x, [int x0]) => null; - List m2(int x, [List x0]) => null; - void m3(int x0, [core.List x1]) => null; - int Function(int x0, [int x]) m4(int x) => null; - int Function([List x0]) m5(int x) => null; - int Function({List x}) m6(int x) => null; - Function Function(int y, {Function x}) m7(int x) => null; - Function Function(int x0, [List x]) m8(int x) => null; - List Function(Function x0) m9(int x) => null; - List Function(int x, [core.List x0]) - m10(int x) => null; - core.List Function(int x0, {int x}) m11( - int x) => - null; - core.List Function([core.List x]) m12( - int x) => - null; - List Function(int y, [int x]) m13(int x) => null; - List Function(int x0, [List x1]) m14( - int x) => - null; - List Function(int x0, {List x}) m15(int x) => null; - Function(List x) m16(int x) => null; - Function(int y, [List x]) m17(int x) => null; - void Function([Function x0]) m18(int x) => null; - void Function({core.List x}) m19(int x) => null; - Function Function(List x) m20(int x) => null; - List Function(core.List x) m21(int x) => - null; - List Function(List x) m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function({Function x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function({Function x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function({Function x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function(int x, [int x2]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function(int x, [int x2]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function(int x, [int x2])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int x, [List x2]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int x, [List x2]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int x, [List x2])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int x1, [core.List x2]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int x1, [core.List x2]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int x1, [core.List x2])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function(int x1, [int x]) Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int x1, [int x]) Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function(int x1, [int x]) - Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function([List x1]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function([List x1]) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function([List x1]) - Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function({List x}) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function({List x}) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function({List x}) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(int y, {Function x}) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int y, {Function x}) Function(int x) - l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int y, {Function x}) - Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x1, [List x]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x1, [List x]) Function(int x) - l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x1, [List x]) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(Function x1) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(Function x1) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(Function x1) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x, [core.List x1]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x, [core.List x1]) - Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x, - [core.List x1]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int x1, {int x}) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x1, {int x}) Function( - int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int x1, {int x}) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function([core.List x]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function([core.List x]) - Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function([core.List x]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int y, [int x]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int y, [int x]) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function(int y, [int x]) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x2, [List x3]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x2, [List x3]) Function( - int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int x2, [List x3]) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int x1, {List x}) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int x1, {List x}) Function(int x) - l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int x1, {List x}) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(List x) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(List x) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function(List x) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int y, [List x]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int y, [List x]) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int y, [List x]) - Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function([Function x1]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function([Function x1]) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function([Function x1]) - Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function({core.List x}) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function({core.List x}) Function(int x) - l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function({core.List x}) - Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// Function Function(List x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(List x) Function(int x) - l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is Function Function(List x) - Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(core.List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(core.List x) Function( - int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(core.List x) - Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(List x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is List Function(List x) - Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - // The static function has its T always set to int. - Expect.isTrue(f22 is F22); - Expect.isFalse(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - Expect.isFalse(confuse(f22) is F22); - if (tIsBool) { - Expect.throws(() { - x22 = (f22 as dynamic); - }); - Expect.throws(() { - x22 = confuse(f22); - }); - Expect.throws(() { - l22 = (f22 as dynamic); - }); - Expect.throws(() { - l22 = confuse(f22); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m22 is F22); - Expect.equals(tIsBool, m22 is F22); - Expect.equals(tIsInt, confuse(m22) is F22); - Expect.equals(tIsBool, confuse(m22) is F22); - } - } -} - -void main() { - new U75().runTests(); - new U75(tIsInt: true).runTests(); - new U75(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type76_test.dart b/tests/language_2/function_type/function_type76_test.dart deleted file mode 100644 index f1c1ef902e2..00000000000 --- a/tests/language_2/function_type/function_type76_test.dart +++ /dev/null @@ -1,920 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int x0, {Function x}); -typedef F1 = core.List Function({int x}); -typedef F2 = List Function({List x}); -typedef F3 = void Function(int x, [core.List x2]); -typedef F4 = int Function(int y, [int x]) Function(); -typedef F5 = int Function(int x1, [List x2]) Function(); -typedef F6 = int Function(int x0, {List x}) Function(); -typedef F7 = Function Function(List x) Function(); -typedef F8 = Function Function(int y, [List x]) Function(); -typedef F9 = List Function([Function x1]) Function(); -typedef F10 = List Function({core.List x}) Function(); -typedef F11 = core.List Function(int y, {int x}) Function(); -typedef F12 = core.List Function(int x0, [core.List x]) - Function(); -typedef F13 = List Function(int x0) Function(); -typedef F14 = List Function(int x, [List x2]) Function(); -typedef F15 = List Function(int y, {List x}) Function(); -typedef F16 = Function([List x]) Function(); -typedef F17 = Function(List x0) Function(); -typedef F18 = void Function(int x1, [Function x2]) Function(); -typedef F19 = void Function(int x0, {core.List x}) Function(); -typedef F20 = Function Function(core.List x) Function(); -typedef F21 = List Function(List x) Function(); -typedef F22 = List Function() Function(); - -Function f0(int x0, {Function x}) => null; -core.List f1({int x}) => null; -List f2({List x}) => null; -void f3(int x, [core.List x0]) => null; -int Function(int y, [int x]) f4() => null; -int Function(int x0, [List x1]) f5() => null; -int Function(int x0, {List x}) f6() => null; -Function Function(List x) f7() => null; -Function Function(int y, [List x]) f8() => null; -List Function([Function x0]) f9() => null; -List Function({core.List x}) f10() => null; -core.List Function(int y, {int x}) f11() => null; -core.List Function(int x0, [core.List x]) f12() => null; -List Function(int x0) f13() => null; -List Function(int x, [List x0]) f14() => null; -List Function(int y, {List x}) f15() => null; -Function([List x]) f16() => null; -Function(List x0) f17() => null; -void Function(int x0, [Function x1]) f18() => null; -void Function(int x0, {core.List x}) f19() => null; -Function Function(core.List x) f20() => null; -List Function(List x) f21() => null; -List Function() f22() => null; - -class U76 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int x0, {Function x}) x0; - core.List Function({int x}) x1; - List Function({List x}) x2; - void Function(int x, [core.List x2]) x3; - int Function(int y, [int x]) Function() x4; - int Function(int x1, [List x2]) Function() x5; - int Function(int x0, {List x}) Function() x6; - Function Function(List x) Function() x7; - Function Function(int y, [List x]) Function() x8; - List Function([Function x1]) Function() x9; - List Function({core.List x}) Function() x10; - core.List Function(int y, {int x}) Function() x11; - core.List Function(int x0, [core.List x]) Function() x12; - List Function(int x0) Function() x13; - List Function(int x, [List x2]) Function() x14; - List Function(int y, {List x}) Function() x15; - Function([List x]) Function() x16; - Function(List x0) Function() x17; - void Function(int x1, [Function x2]) Function() x18; - void Function(int x0, {core.List x}) Function() x19; - Function Function(core.List x) Function() x20; - List Function(List x) Function() x21; - List Function() Function() x22; - - U76({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int x0, {Function x}) => null; - core.List m1({int x}) => null; - List m2({List x}) => null; - void m3(int x, [core.List x0]) => null; - int Function(int y, [int x]) m4() => null; - int Function(int x0, [List x1]) m5() => null; - int Function(int x0, {List x}) m6() => null; - Function Function(List x) m7() => null; - Function Function(int y, [List x]) m8() => null; - List Function([Function x0]) m9() => null; - List Function({core.List x}) m10() => null; - core.List Function(int y, {int x}) m11() => null; - core.List Function(int x0, [core.List x]) m12() => null; - List Function(int x0) m13() => null; - List Function(int x, [List x0]) m14() => null; - List Function(int y, {List x}) m15() => null; - Function([List x]) m16() => null; - Function(List x0) m17() => null; - void Function(int x0, [Function x1]) m18() => null; - void Function(int x0, {core.List x}) m19() => null; - Function Function(core.List x) m20() => null; - List Function(List x) m21() => null; - List Function() m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int x0, {Function x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int x0, {Function x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int x0, {Function x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function({int x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function({int x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function({int x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function({List x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function({List x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function({List x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int x, [core.List x2]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int x, [core.List x2]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int x, [core.List x2])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function(int y, [int x]) Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int y, [int x]) Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function(int y, [int x]) Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x1, [List x2]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x1, [List x2]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x1, [List x2]) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x0, {List x}) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x0, {List x}) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int x0, {List x}) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(List x) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(List x) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(List x) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int y, [List x]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int y, [List x]) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int y, [List x]) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function([Function x1]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function([Function x1]) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function([Function x1]) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function({core.List x}) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function({core.List x}) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue( - m10 is List Function({core.List x}) Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int y, {int x}) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int y, {int x}) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is core.List Function(int y, {int x}) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x0, [core.List x]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x0, [core.List x]) Function() - l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x0, - [core.List x]) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x0) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x0) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function(int x0) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x, [List x2]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x, [List x2]) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function(int x, [List x2]) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int y, {List x}) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int y, {List x}) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int y, {List x}) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function([List x]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function([List x]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function([List x]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(List x0) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(List x0) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(List x0) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int x1, [Function x2]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x1, [Function x2]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x1, [Function x2]) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x0, {core.List x}) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x0, {core.List x}) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function(int x0, {core.List x}) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// Function Function(core.List x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(core.List x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is Function Function(core.List x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(List x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function() Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function() Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is List Function() Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U76().runTests(); - new U76(tIsInt: true).runTests(); - new U76(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type77_test.dart b/tests/language_2/function_type/function_type77_test.dart deleted file mode 100644 index fd100137d2e..00000000000 --- a/tests/language_2/function_type/function_type77_test.dart +++ /dev/null @@ -1,925 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int y, {Function x}); -typedef F1 = core.List Function(int x0, {int x}); -typedef F2 = List Function(int x0, {List x}); -typedef F3 = void Function({core.List x}); -typedef F4 = int Function(int y, [int x]) Function(int x); -typedef F5 = int Function(int x2, [List x3]) Function(int x); -typedef F6 = int Function(int x1, {List x}) Function(int x); -typedef F7 = Function Function(List x) Function(int x); -typedef F8 = Function Function(int y, [List x]) Function(int x); -typedef F9 = List Function([Function x1]) Function(int x); -typedef F10 = List Function({core.List x}) Function( - int x); -typedef F11 = core.List Function(int y, {int x}) Function(int x); -typedef F12 = core.List Function(int x1, [core.List x]) - Function(int x); -typedef F13 = List Function(int x1) Function(int x); -typedef F14 = List Function(int x, [List x1]) Function(int x); -typedef F15 = List Function(int y, {List x}) Function(int x); -typedef F16 = Function([List x]) Function(int x); -typedef F17 = Function(List x1) Function(int x); -typedef F18 = void Function(int x2, [Function x3]) Function(int x); -typedef F19 = void Function(int x1, {core.List x}) Function(int x); -typedef F20 = Function Function(core.List x) Function(int x); -typedef F21 = List Function(List x) Function(int x); -typedef F22 = List Function() Function(int x); - -Function f0(int y, {Function x}) => null; -core.List f1(int x0, {int x}) => null; -List f2(int x0, {List x}) => null; -void f3({core.List x}) => null; -int Function(int y, [int x]) f4(int x) => null; -int Function(int x0, [List x1]) f5(int x) => null; -int Function(int x0, {List x}) f6(int x) => null; -Function Function(List x) f7(int x) => null; -Function Function(int y, [List x]) f8(int x) => null; -List Function([Function x0]) f9(int x) => null; -List Function({core.List x}) f10(int x) => null; -core.List Function(int y, {int x}) f11(int x) => null; -core.List Function(int x0, [core.List x]) f12(int x) => - null; -List Function(int x0) f13(int x) => null; -List Function(int x, [List x0]) f14(int x) => null; -List Function(int y, {List x}) f15(int x) => null; -Function([List x]) f16(int x) => null; -Function(List x0) f17(int x) => null; -void Function(int x0, [Function x1]) f18(int x) => null; -void Function(int x0, {core.List x}) f19(int x) => null; -Function Function(core.List x) f20(int x) => null; -List Function(List x) f21(int x) => null; -List Function() f22(int x) => null; - -class U77 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int y, {Function x}) x0; - core.List Function(int x0, {int x}) x1; - List Function(int x0, {List x}) x2; - void Function({core.List x}) x3; - int Function(int y, [int x]) Function(int x) x4; - int Function(int x2, [List x3]) Function(int x) x5; - int Function(int x1, {List x}) Function(int x) x6; - Function Function(List x) Function(int x) x7; - Function Function(int y, [List x]) Function(int x) x8; - List Function([Function x1]) Function(int x) x9; - List Function({core.List x}) Function(int x) x10; - core.List Function(int y, {int x}) Function(int x) x11; - core.List Function(int x1, [core.List x]) Function(int x) - x12; - List Function(int x1) Function(int x) x13; - List Function(int x, [List x1]) Function(int x) x14; - List Function(int y, {List x}) Function(int x) x15; - Function([List x]) Function(int x) x16; - Function(List x1) Function(int x) x17; - void Function(int x2, [Function x3]) Function(int x) x18; - void Function(int x1, {core.List x}) Function(int x) x19; - Function Function(core.List x) Function(int x) x20; - List Function(List x) Function(int x) x21; - List Function() Function(int x) x22; - - U77({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int y, {Function x}) => null; - core.List m1(int x0, {int x}) => null; - List m2(int x0, {List x}) => null; - void m3({core.List x}) => null; - int Function(int y, [int x]) m4(int x) => null; - int Function(int x0, [List x1]) m5(int x) => null; - int Function(int x0, {List x}) m6(int x) => null; - Function Function(List x) m7(int x) => null; - Function Function(int y, [List x]) m8(int x) => null; - List Function([Function x0]) m9(int x) => null; - List Function({core.List x}) m10(int x) => null; - core.List Function(int y, {int x}) m11(int x) => null; - core.List Function(int x0, [core.List x]) m12(int x) => - null; - List Function(int x0) m13(int x) => null; - List Function(int x, [List x0]) m14(int x) => null; - List Function(int y, {List x}) m15(int x) => null; - Function([List x]) m16(int x) => null; - Function(List x0) m17(int x) => null; - void Function(int x0, [Function x1]) m18(int x) => null; - void Function(int x0, {core.List x}) m19(int x) => null; - Function Function(core.List x) m20(int x) => null; - List Function(List x) m21(int x) => null; - List Function() m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int y, {Function x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int y, {Function x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int y, {Function x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function(int x0, {int x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function(int x0, {int x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function(int x0, {int x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int x0, {List x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int x0, {List x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int x0, {List x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function({core.List x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function({core.List x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function({core.List x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function(int y, [int x]) Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int y, [int x]) Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function(int y, [int x]) Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x2, [List x3]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x2, [List x3]) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function(int x2, [List x3]) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x1, {List x}) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x1, {List x}) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int x1, {List x}) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(List x) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(List x) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(List x) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int y, [List x]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int y, [List x]) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int y, [List x]) Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function([Function x1]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function([Function x1]) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function([Function x1]) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function({core.List x}) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function({core.List x}) Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function({core.List x}) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int y, {int x}) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int y, {int x}) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is core.List Function(int y, {int x}) Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x1, [core.List x]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x1, [core.List x]) Function( - int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x1, - [core.List x]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x1) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x1) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function(int x1) Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x, [List x1]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x, [List x1]) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function(int x, [List x1]) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int y, {List x}) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int y, {List x}) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int y, {List x}) Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function([List x]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function([List x]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function([List x]) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(List x1) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(List x1) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(List x1) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int x2, [Function x3]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x2, [Function x3]) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x2, [Function x3]) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x1, {core.List x}) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x1, {core.List x}) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function(int x1, {core.List x}) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// Function Function(core.List x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(core.List x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is Function Function(core.List x) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(List x) Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function() Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function() Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is List Function() Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U77().runTests(); - new U77(tIsInt: true).runTests(); - new U77(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type78_test.dart b/tests/language_2/function_type/function_type78_test.dart deleted file mode 100644 index 2052c5ea673..00000000000 --- a/tests/language_2/function_type/function_type78_test.dart +++ /dev/null @@ -1,963 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(List x); -typedef F1 = core.List Function(int y, {int x}); -typedef F2 = List Function(int y, {List x}); -typedef F3 = void Function(int x0, {core.List x}); -typedef F4 = int Function(int y, [int x]) Function(); -typedef F5 = int Function(int x2, [List x3]) - Function(); -typedef F6 = int Function(int x1, {List x}) - Function(); -typedef F7 = Function Function(List x) - Function(); -typedef F8 = Function Function(int y, [List x]) - Function(); -typedef F9 = List Function([Function x1]) - Function(); -typedef F10 = List Function({core.List x}) - Function(); -typedef F11 = core.List Function(int y, {int x}) - Function(); -typedef F12 = core.List Function(int x1, [core.List x]) - Function(); -typedef F13 = List Function(int x1) Function(); -typedef F14 = List Function(int x, [List x1]) - Function(); -typedef F15 = List Function(int y, {List x}) - Function(); -typedef F16 = Function([List x]) Function(); -typedef F17 = Function(List x1) Function(); -typedef F18 = void Function(int x2, [Function x3]) - Function(); -typedef F19 = void Function(int x1, {core.List x}) - Function(); -typedef F20 = Function Function(core.List x) - Function(); -typedef F21 = List Function(List x) Function(); -typedef F22 = List Function() Function(); - -Function f0(List x) => null; -core.List f1(int y, {int x}) => null; -List f2(int y, {List x}) => null; -void f3(int x0, {core.List x}) => null; -int Function(int y, [int x]) f4() => null; -int Function(int x0, [List x1]) f5() => null; -int Function(int x0, {List x}) f6() => null; -Function Function(List x) f7() => null; -Function Function(int y, [List x]) f8() => null; -List Function([Function x0]) f9() => null; -List Function({core.List x}) f10() => - null; -core.List Function(int y, {int x}) f11() => null; -core.List Function(int x0, [core.List x]) - f12() => null; -List Function(int x0) f13() => null; -List Function(int x, [List x0]) f14() => - null; -List Function(int y, {List x}) f15() => null; -Function([List x]) f16() => null; -Function(List x0) f17() => null; -void Function(int x0, [Function x1]) f18() => null; -void Function(int x0, {core.List x}) f19() => - null; -Function Function(core.List x) f20() => null; -List Function(List x) f21() => null; -List Function() f22() => null; - -class U78 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(List x) x0; - core.List Function(int y, {int x}) x1; - List Function(int y, {List x}) x2; - void Function(int x0, {core.List x}) x3; - int Function(int y, [int x]) Function() x4; - int Function(int x2, [List x3]) Function() x5; - int Function(int x1, {List x}) Function() x6; - Function Function(List x) Function() x7; - Function Function(int y, [List x]) Function() x8; - List Function([Function x1]) Function() x9; - List Function({core.List x}) - Function() x10; - core.List Function(int y, {int x}) Function() - x11; - core.List Function(int x1, [core.List x]) - Function() x12; - List Function(int x1) Function() x13; - List Function(int x, [List x1]) Function() - x14; - List Function(int y, {List x}) Function() x15; - Function([List x]) Function() x16; - Function(List x1) Function() x17; - void Function(int x2, [Function x3]) Function() x18; - void Function(int x1, {core.List x}) Function() - x19; - Function Function(core.List x) Function() - x20; - List Function(List x) Function() x21; - List Function() Function() x22; - - U78({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(List x) => null; - core.List m1(int y, {int x}) => null; - List m2(int y, {List x}) => null; - void m3(int x0, {core.List x}) => null; - int Function(int y, [int x]) m4() => null; - int Function(int x0, [List x1]) m5() => null; - int Function(int x0, {List x}) m6() => null; - Function Function(List x) m7() => null; - Function Function(int y, [List x]) m8() => null; - List Function([Function x0]) m9() => null; - List Function({core.List x}) m10() => - null; - core.List Function(int y, {int x}) m11() => - null; - core.List Function(int x0, [core.List x]) - m12() => null; - List Function(int x0) m13() => null; - List Function(int x, [List x0]) m14() => - null; - List Function(int y, {List x}) m15() => null; - Function([List x]) m16() => null; - Function(List x0) m17() => null; - void Function(int x0, [Function x1]) m18() => null; - void Function(int x0, {core.List x}) m19() => - null; - Function Function(core.List x) m20() => null; - List Function(List x) m21() => null; - List Function() m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(List x) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(List x) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(List x)); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function(int y, {int x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function(int y, {int x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function(int y, {int x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function(int y, {List x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function(int y, {List x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function(int y, {List x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int x0, {core.List x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int x0, {core.List x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int x0, {core.List x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function(int y, [int x]) Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int y, [int x]) Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue( - m4 is int Function(int y, [int x]) Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x2, [List x3]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x2, [List x3]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x2, [List x3]) - Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x1, {List x}) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x1, {List x}) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function(int x1, {List x}) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(List x) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(List x) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(List x) - Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int y, [List x]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int y, [List x]) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int y, [List x]) - Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function([Function x1]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function([Function x1]) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function([Function x1]) - Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function({core.List x}) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function({core.List x}) - Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function({core.List x}) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int y, {int x}) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int y, {int x}) Function() - l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int y, {int x}) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x1, [core.List x]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x1, [core.List x]) - Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x1, - [core.List x]) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x1) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x1) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue( - m13 is List Function(int x1) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x, [List x1]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x, [List x1]) Function() - l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int x, [List x1]) - Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int y, {List x}) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int y, {List x}) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int y, {List x}) - Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function([List x]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function([List x]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function([List x]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(List x1) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(List x1) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(List x1) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int x2, [Function x3]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x2, [Function x3]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x2, [Function x3]) - Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x1, {core.List x}) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x1, {core.List x}) - Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x1, {core.List x}) - Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// Function Function(core.List x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(core.List x) Function() - l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is Function Function(core.List x) - Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is List Function(List x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function() Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function() Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is List Function() Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U78().runTests(); - new U78(tIsInt: true).runTests(); - new U78(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type79_test.dart b/tests/language_2/function_type/function_type79_test.dart deleted file mode 100644 index 9a172528be0..00000000000 --- a/tests/language_2/function_type/function_type79_test.dart +++ /dev/null @@ -1,981 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function([List x]); -typedef F1 = core.List Function(Function x); -typedef F2 = List Function(); -typedef F3 = void Function(int y, {core.List x}); -typedef F4 = int Function(int y, [int x]) Function( - int x); -typedef F5 = int Function(int x2, [List x3]) - Function(int x); -typedef F6 = int Function(int x1, {List x}) Function( - int x); -typedef F7 = Function Function(List x) - Function(int x); -typedef F8 = Function Function(int y, [List x]) - Function(int x); -typedef F9 = List Function([Function x1]) - Function(int x); -typedef F10 = List Function({core.List x}) - Function(int x); -typedef F11 = core.List Function(int y, {int x}) - Function(int x); -typedef F12 = core.List Function(int x1, [core.List x]) - Function(int x); -typedef F13 = List Function(int x1) Function(int x); -typedef F14 = List Function(int x, [List x1]) - Function(int x); -typedef F15 = List Function(int y, {List x}) - Function(int x); -typedef F16 = Function([List x]) Function( - int x); -typedef F17 = Function(List x1) Function(int x); -typedef F18 = void Function(int x2, [Function x3]) - Function(int x); -typedef F19 = void Function(int x1, {core.List x}) - Function(int x); -typedef F20 = Function Function(core.List x) - Function(int x); -typedef F21 = List Function(List x) Function( - int x); -typedef F22 = List Function() Function(int x); - -Function f0([List x]) => null; -core.List f1(Function x) => null; -List f2() => null; -void f3(int y, {core.List x}) => null; -int Function(int y, [int x]) f4(int x) => null; -int Function(int x0, [List x1]) f5(int x) => null; -int Function(int x0, {List x}) f6(int x) => null; -Function Function(List x) f7(int x) => null; -Function Function(int y, [List x]) f8(int x) => null; -List Function([Function x0]) f9(int x) => null; -List Function({core.List x}) f10( - int x) => - null; -core.List Function(int y, {int x}) f11(int x) => - null; -core.List Function(int x0, [core.List x]) - f12(int x) => null; -List Function(int x0) f13(int x) => null; -List Function(int x, [List x0]) f14(int x) => - null; -List Function(int y, {List x}) f15(int x) => null; -Function([List x]) f16(int x) => null; -Function(List x0) f17(int x) => null; -void Function(int x0, [Function x1]) f18(int x) => null; -void Function(int x0, {core.List x}) f19(int x) => - null; -Function Function(core.List x) f20(int x) => - null; -List Function(List x) f21(int x) => null; -List Function() f22(int x) => null; - -class U79 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function([List x]) x0; - core.List Function(Function x) x1; - List Function() x2; - void Function(int y, {core.List x}) x3; - int Function(int y, [int x]) Function(int x) x4; - int Function(int x2, [List x3]) Function(int x) - x5; - int Function(int x1, {List x}) Function(int x) x6; - Function Function(List x) Function(int x) x7; - Function Function(int y, [List x]) Function(int x) x8; - List Function([Function x1]) Function(int x) x9; - List Function({core.List x}) Function( - int x) x10; - core.List Function(int y, {int x}) Function( - int x) x11; - core.List Function(int x1, [core.List x]) - Function(int x) x12; - List Function(int x1) Function(int x) x13; - List Function(int x, [List x1]) Function( - int x) x14; - List Function(int y, {List x}) Function(int x) x15; - Function([List x]) Function(int x) x16; - Function(List x1) Function(int x) x17; - void Function(int x2, [Function x3]) Function(int x) x18; - void Function(int x1, {core.List x}) Function( - int x) x19; - Function Function(core.List x) Function( - int x) x20; - List Function(List x) Function(int x) x21; - List Function() Function(int x) x22; - - U79({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0([List x]) => null; - core.List m1(Function x) => null; - List m2() => null; - void m3(int y, {core.List x}) => null; - int Function(int y, [int x]) m4(int x) => null; - int Function(int x0, [List x1]) m5(int x) => - null; - int Function(int x0, {List x}) m6(int x) => null; - Function Function(List x) m7(int x) => null; - Function Function(int y, [List x]) m8(int x) => null; - List Function([Function x0]) m9(int x) => null; - List Function({core.List x}) m10( - int x) => - null; - core.List Function(int y, {int x}) m11(int x) => - null; - core.List Function(int x0, [core.List x]) - m12(int x) => null; - List Function(int x0) m13(int x) => null; - List Function(int x, [List x0]) m14(int x) => - null; - List Function(int y, {List x}) m15(int x) => null; - Function([List x]) m16(int x) => null; - Function(List x0) m17(int x) => null; - void Function(int x0, [Function x1]) m18(int x) => null; - void Function(int x0, {core.List x}) m19( - int x) => - null; - Function Function(core.List x) m20(int x) => - null; - List Function(List x) m21(int x) => null; - List Function() m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function([List x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function([List x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function([List x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function(Function x) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function(Function x) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function(Function x)); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// List Function() - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - List Function() l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is List Function()); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - // The static function has its T always set to int. - Expect.isTrue(f2 is F2); - Expect.isFalse(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - Expect.isFalse(confuse(f2) is F2); - if (tIsBool) { - Expect.throws(() { - x2 = (f2 as dynamic); - }); - Expect.throws(() { - x2 = confuse(f2); - }); - Expect.throws(() { - l2 = (f2 as dynamic); - }); - Expect.throws(() { - l2 = confuse(f2); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m2 is F2); - Expect.equals(tIsBool, m2 is F2); - Expect.equals(tIsInt, confuse(m2) is F2); - Expect.equals(tIsBool, confuse(m2) is F2); - } - } - - /// void Function(int y, {core.List x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int y, {core.List x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int y, {core.List x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function(int y, [int x]) Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int y, [int x]) Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue( - m4 is int Function(int y, [int x]) Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x2, [List x3]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x2, [List x3]) Function( - int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x2, [List x3]) - Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x1, {List x}) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x1, {List x}) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int x1, {List x}) - Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function(List x) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(List x) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(List x) - Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int y, [List x]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int y, [List x]) Function(int x) - l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int y, [List x]) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function([Function x1]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function([Function x1]) Function(int x) - l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function([Function x1]) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function({core.List x}) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function({core.List x}) - Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function({core.List x}) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(int y, {int x}) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int y, {int x}) Function( - int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int y, {int x}) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x1, [core.List x]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x1, [core.List x]) - Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x1, - [core.List x]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x1) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x1) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue( - m13 is List Function(int x1) Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x, [List x1]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x, [List x1]) Function( - int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int x, [List x1]) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int y, {List x}) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int y, {List x}) Function(int x) - l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int y, {List x}) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function([List x]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function([List x]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function([List x]) - Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(List x1) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(List x1) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue( - m17 is Function(List x1) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int x2, [Function x3]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x2, [Function x3]) Function(int x) - l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x2, [Function x3]) - Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x1, {core.List x}) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x1, {core.List x}) Function( - int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x1, {core.List x}) - Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// Function Function(core.List x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(core.List x) Function( - int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is Function Function(core.List x) - Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(List x) - Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function() Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function() Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is List Function() Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U79().runTests(); - new U79(tIsInt: true).runTests(); - new U79(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type7_test.dart b/tests/language_2/function_type/function_type7_test.dart deleted file mode 100644 index 7c8bf2bf238..00000000000 --- a/tests/language_2/function_type/function_type7_test.dart +++ /dev/null @@ -1,988 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int x, [int x2]); -typedef F1 = Function Function(int x, [List x2]); -typedef F2 = core.List Function(int x1, [core.List x2]); -typedef F3 = Function([List x1]); -typedef F4 = Function Function(List x); -typedef F5 = int Function(int y, {int x}) Function( - int x); -typedef F6 = int Function(int x1, [core.List x]) - Function(int x); -typedef F7 = Function Function(int x1) Function(int x); -typedef F8 = Function Function(int x, [List x1]) - Function(int x); -typedef F9 = Function Function(int y, {List x}) - Function(int x); -typedef F10 = List Function([List x]) - Function(int x); -typedef F11 = List Function(List x1) - Function(int x); -typedef F12 = core.List Function(int x2, [Function x3]) - Function(int x); -typedef F13 = core.List Function(int x1, {core.List x}) - Function(int x); -typedef F14 = List Function(Function x) Function( - int x); -typedef F15 = List Function(int y, [core.List x]) - Function(int x); -typedef F16 = Function([int x1]) Function(int x); -typedef F17 = Function({List x}) Function( - int x); -typedef F18 = Function() Function(int x); -typedef F19 = void Function(int x1, [List x]) - Function(int x); -typedef F20 = void Function([List x1]) Function( - int x); -typedef F21 = List Function(List x) - Function(int x); -typedef F22 = Function(core.List x) - Function(int x); -typedef F23 = void Function(List x) Function( - int x); - -int f0(int x, [int x0]) => null; -Function f1(int x, [List x0]) => null; -core.List f2(int x0, [core.List x1]) => null; -f3([List x0]) => null; -Function f4(List x) => null; -int Function(int y, {int x}) f5(int x) => null; -int Function(int x0, [core.List x]) f6(int x) => - null; -Function Function(int x0) f7(int x) => null; -Function Function(int x, [List x0]) f8(int x) => - null; -Function Function(int y, {List x}) f9(int x) => null; -List Function([List x]) f10(int x) => - null; -List Function(List x0) f11(int x) => null; -core.List Function(int x0, [Function x1]) f12( - int x) => - null; -core.List Function(int x0, {core.List x}) - f13(int x) => null; -List Function(Function x) f14(int x) => null; -List Function(int y, [core.List x]) f15( - int x) => - null; -Function([int x0]) f16(int x) => null; -Function({List x}) f17(int x) => null; -Function() f18(int x) => null; -void Function(int x0, [List x]) f19(int x) => - null; -void Function([List x0]) f20(int x) => null; -List Function(List x) f21(int x) => - null; -Function(core.List x) f22(int x) => null; -void Function(List x) f23(int x) => null; - -class U7 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int x, [int x2]) x0; - Function Function(int x, [List x2]) x1; - core.List Function(int x1, [core.List x2]) x2; - Function([List x1]) x3; - Function Function(List x) x4; - int Function(int y, {int x}) Function(int x) x5; - int Function(int x1, [core.List x]) Function( - int x) x6; - Function Function(int x1) Function(int x) x7; - Function Function(int x, [List x1]) Function( - int x) x8; - Function Function(int y, {List x}) Function(int x) x9; - List Function([List x]) Function( - int x) x10; - List Function(List x1) Function(int x) x11; - core.List Function(int x2, [Function x3]) - Function(int x) x12; - core.List Function(int x1, {core.List x}) - Function(int x) x13; - List Function(Function x) Function(int x) x14; - List Function(int y, [core.List x]) Function( - int x) x15; - Function([int x1]) Function(int x) x16; - Function({List x}) Function(int x) x17; - Function() Function(int x) x18; - void Function(int x1, [List x]) Function(int x) - x19; - void Function([List x1]) Function(int x) x20; - List Function(List x) Function( - int x) x21; - Function(core.List x) Function(int x) x22; - void Function(List x) Function(int x) x23; - - U7({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int x, [int x0]) => null; - Function m1(int x, [List x0]) => null; - core.List m2(int x0, [core.List x1]) => null; - m3([List x0]) => null; - Function m4(List x) => null; - int Function(int y, {int x}) m5(int x) => null; - int Function(int x0, [core.List x]) m6(int x) => - null; - Function Function(int x0) m7(int x) => null; - Function Function(int x, [List x0]) m8(int x) => - null; - Function Function(int y, {List x}) m9(int x) => null; - List Function([List x]) m10(int x) => - null; - List Function(List x0) m11(int x) => null; - core.List Function(int x0, [Function x1]) m12( - int x) => - null; - core.List Function(int x0, {core.List x}) - m13(int x) => null; - List Function(Function x) m14(int x) => null; - List Function(int y, [core.List x]) m15( - int x) => - null; - Function([int x0]) m16(int x) => null; - Function({List x}) m17(int x) => null; - Function() m18(int x) => null; - void Function(int x0, [List x]) m19(int x) => - null; - void Function([List x0]) m20(int x) => null; - List Function(List x) m21(int x) => - null; - Function(core.List x) m22(int x) => null; - void Function(List x) m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int x, [int x2]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int x, [int x2]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int x, [int x2])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// Function Function(int x, [List x2]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - Function Function(int x, [List x2]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is Function Function(int x, [List x2])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - // The static function has its T always set to int. - Expect.isTrue(f1 is F1); - Expect.isFalse(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - Expect.isFalse(confuse(f1) is F1); - if (tIsBool) { - Expect.throws(() { - x1 = (f1 as dynamic); - }); - Expect.throws(() { - x1 = confuse(f1); - }); - Expect.throws(() { - l1 = (f1 as dynamic); - }); - Expect.throws(() { - l1 = confuse(f1); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m1 is F1); - Expect.equals(true, m1 is F1); - Expect.equals(true, confuse(m1) is F1); - Expect.equals(true, confuse(m1) is F1); - } - } - - /// core.List Function(int x1, [core.List x2]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function(int x1, [core.List x2]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue( - m2 is core.List Function(int x1, [core.List x2])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// Function([List x1]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function([List x1]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function([List x1])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// Function Function(List x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - Function Function(List x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is Function Function(List x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int y, {int x}) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int y, {int x}) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function(int y, {int x}) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int x1, [core.List x]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int x1, [core.List x]) Function( - int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int x1, [core.List x]) - Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int x1) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x1) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue( - m7 is Function Function(int x1) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x, [List x1]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x, [List x1]) Function( - int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x, [List x1]) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// Function Function(int y, {List x}) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - Function Function(int y, {List x}) Function(int x) - l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is Function Function(int y, {List x}) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - // The static function has its T always set to int. - Expect.isTrue(f9 is F9); - Expect.isFalse(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - Expect.isFalse(confuse(f9) is F9); - if (tIsBool) { - Expect.throws(() { - x9 = (f9 as dynamic); - }); - Expect.throws(() { - x9 = confuse(f9); - }); - Expect.throws(() { - l9 = (f9 as dynamic); - }); - Expect.throws(() { - l9 = confuse(f9); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m9 is F9); - Expect.equals(tIsBool, m9 is F9); - Expect.equals(tIsInt, confuse(m9) is F9); - Expect.equals(tIsBool, confuse(m9) is F9); - } - } - - /// List Function([List x]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function([List x]) Function( - int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function([List x]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function(List x1) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function(List x1) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function(List x1) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function(int x2, [Function x3]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x2, [Function x3]) - Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x2, [Function x3]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int x1, {core.List x}) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int x1, {core.List x}) - Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int x1, - {core.List x}) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - } - - /// List Function(Function x) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(Function x) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(Function x) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(int y, [core.List x]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(int y, [core.List x]) - Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(int y, [core.List x]) - Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function([int x1]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function([int x1]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function([int x1]) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function({List x}) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function({List x}) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function({List x}) - Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// Function() Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - Function() Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is Function() Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x1, [List x]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x1, [List x]) Function( - int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x1, [List x]) - Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function([List x1]) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function([List x1]) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is void Function([List x1]) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function( - int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(List x) - Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// Function(core.List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function(core.List x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is Function(core.List x) - Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } - - /// void Function(List x) Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - void Function(List x) Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue( - m23 is void Function(List x) Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - // The static function has its T always set to int. - Expect.isTrue(f23 is F23); - Expect.isFalse(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - Expect.isFalse(confuse(f23) is F23); - if (tIsBool) { - Expect.throws(() { - x23 = (f23 as dynamic); - }); - Expect.throws(() { - x23 = confuse(f23); - }); - Expect.throws(() { - l23 = (f23 as dynamic); - }); - Expect.throws(() { - l23 = confuse(f23); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m23 is F23); - Expect.equals(tIsBool, m23 is F23); - Expect.equals(tIsInt, confuse(m23) is F23); - Expect.equals(tIsBool, confuse(m23) is F23); - } - } -} - -void main() { - new U7().runTests(); - new U7(tIsInt: true).runTests(); - new U7(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type80_test.dart b/tests/language_2/function_type/function_type80_test.dart deleted file mode 100644 index 0527832da31..00000000000 --- a/tests/language_2/function_type/function_type80_test.dart +++ /dev/null @@ -1,943 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int x0, [List x]); -typedef F1 = core.List Function([Function x]); -typedef F2 = Function(int x); -typedef F3 = void Function(List x); -typedef F4 = int Function(int x0) Function(); -typedef F5 = int Function(int x, [List x2]) Function(); -typedef F6 = int Function(int y, {List x}) Function(); -typedef F7 = Function Function([List x]) Function(); -typedef F8 = Function Function(List x0) Function(); -typedef F9 = List Function(int x1, [Function x2]) Function(); -typedef F10 = List Function(int x0, {core.List x}) - Function(); -typedef F11 = core.List Function(Function x) Function(); -typedef F12 = core.List Function(int y, [core.List x]) - Function(); -typedef F13 = List Function([int x1]) Function(); -typedef F14 = List Function({List x}) Function(); -typedef F15 = List Function() Function(); -typedef F16 = Function(int x0, [List x]) Function(); -typedef F17 = Function([List x1]) Function(); -typedef F18 = void Function(int x, [Function x2]) Function(); -typedef F19 = void Function(int y, {core.List x}) Function(); -typedef F20 = Function Function(List x) Function(); -typedef F21 = List Function() Function(); -typedef F22 = List Function(A x) Function(); - -Function f0(int x0, [List x]) => null; -core.List f1([Function x]) => null; -f2(int x) => null; -void f3(List x) => null; -int Function(int x0) f4() => null; -int Function(int x, [List x0]) f5() => null; -int Function(int y, {List x}) f6() => null; -Function Function([List x]) f7() => null; -Function Function(List x0) f8() => null; -List Function(int x0, [Function x1]) f9() => null; -List Function(int x0, {core.List x}) f10() => null; -core.List Function(Function x) f11() => null; -core.List Function(int y, [core.List x]) f12() => null; -List Function([int x0]) f13() => null; -List Function({List x}) f14() => null; -List Function() f15() => null; -Function(int x0, [List x]) f16() => null; -Function([List x0]) f17() => null; -void Function(int x, [Function x0]) f18() => null; -void Function(int y, {core.List x}) f19() => null; -Function Function(List x) f20() => null; -List Function() f21() => null; -List Function(A x) f22() => null; - -class U80 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int x0, [List x]) x0; - core.List Function([Function x]) x1; - Function(int x) x2; - void Function(List x) x3; - int Function(int x0) Function() x4; - int Function(int x, [List x2]) Function() x5; - int Function(int y, {List x}) Function() x6; - Function Function([List x]) Function() x7; - Function Function(List x0) Function() x8; - List Function(int x1, [Function x2]) Function() x9; - List Function(int x0, {core.List x}) Function() x10; - core.List Function(Function x) Function() x11; - core.List Function(int y, [core.List x]) Function() x12; - List Function([int x1]) Function() x13; - List Function({List x}) Function() x14; - List Function() Function() x15; - Function(int x0, [List x]) Function() x16; - Function([List x1]) Function() x17; - void Function(int x, [Function x2]) Function() x18; - void Function(int y, {core.List x}) Function() x19; - Function Function(List x) Function() x20; - List Function() Function() x21; - List Function(A x) Function() x22; - - U80({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int x0, [List x]) => null; - core.List m1([Function x]) => null; - m2(int x) => null; - void m3(List x) => null; - int Function(int x0) m4() => null; - int Function(int x, [List x0]) m5() => null; - int Function(int y, {List x}) m6() => null; - Function Function([List x]) m7() => null; - Function Function(List x0) m8() => null; - List Function(int x0, [Function x1]) m9() => null; - List Function(int x0, {core.List x}) m10() => null; - core.List Function(Function x) m11() => null; - core.List Function(int y, [core.List x]) m12() => null; - List Function([int x0]) m13() => null; - List Function({List x}) m14() => null; - List Function() m15() => null; - Function(int x0, [List x]) m16() => null; - Function([List x0]) m17() => null; - void Function(int x, [Function x0]) m18() => null; - void Function(int y, {core.List x}) m19() => null; - Function Function(List x) m20() => null; - List Function() m21() => null; - List Function(A x) m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int x0, [List x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int x0, [List x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int x0, [List x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function([Function x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function([Function x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function([Function x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// Function(int x) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - Function(int x) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is Function(int x)); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// void Function(List x) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(List x) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(List x)); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - // The static function has its T always set to int. - Expect.isTrue(f3 is F3); - Expect.isFalse(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - Expect.isFalse(confuse(f3) is F3); - if (tIsBool) { - Expect.throws(() { - x3 = (f3 as dynamic); - }); - Expect.throws(() { - x3 = confuse(f3); - }); - Expect.throws(() { - l3 = (f3 as dynamic); - }); - Expect.throws(() { - l3 = confuse(f3); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m3 is F3); - Expect.equals(true, m3 is F3); - Expect.equals(true, confuse(m3) is F3); - Expect.equals(true, confuse(m3) is F3); - } - } - - /// int Function(int x0) Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int x0) Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function(int x0) Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x, [List x2]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x, [List x2]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x, [List x2]) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int y, {List x}) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int y, {List x}) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int y, {List x}) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function([List x]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function([List x]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function([List x]) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(List x0) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(List x0) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(List x0) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int x1, [Function x2]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x1, [Function x2]) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is List Function(int x1, [Function x2]) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x0, {core.List x}) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x0, {core.List x}) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 - is List Function(int x0, {core.List x}) Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(Function x) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(Function x) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(Function x) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int y, [core.List x]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int y, [core.List x]) Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int y, - [core.List x]) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function([int x1]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function([int x1]) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function([int x1]) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function({List x}) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function({List x}) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function({List x}) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function() Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function() Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function() Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x0, [List x]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x0, [List x]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x0, [List x]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function([List x1]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function([List x1]) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function([List x1]) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int x, [Function x2]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x, [Function x2]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x, [Function x2]) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int y, {core.List x}) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int y, {core.List x}) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function(int y, {core.List x}) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// Function Function(List x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(List x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is Function Function(List x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function() Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function() Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function() Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(A x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(A x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is List Function(A x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U80().runTests(); - new U80(tIsInt: true).runTests(); - new U80(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type81_test.dart b/tests/language_2/function_type/function_type81_test.dart deleted file mode 100644 index 26c7a938424..00000000000 --- a/tests/language_2/function_type/function_type81_test.dart +++ /dev/null @@ -1,950 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int y, [List x]); -typedef F1 = core.List Function(int x0, [Function x]); -typedef F2 = Function([int x]); -typedef F3 = void Function([List x]); -typedef F4 = int Function(int x1) Function(int x); -typedef F5 = int Function(int x, [List x1]) Function(int x); -typedef F6 = int Function(int y, {List x}) Function(int x); -typedef F7 = Function Function([List x]) Function(int x); -typedef F8 = Function Function(List x1) Function(int x); -typedef F9 = List Function(int x2, [Function x3]) Function(int x); -typedef F10 = List Function(int x1, {core.List x}) - Function(int x); -typedef F11 = core.List Function(Function x) Function(int x); -typedef F12 = core.List Function(int y, [core.List x]) - Function(int x); -typedef F13 = List Function([int x1]) Function(int x); -typedef F14 = List Function({List x}) Function(int x); -typedef F15 = List Function() Function(int x); -typedef F16 = Function(int x1, [List x]) Function(int x); -typedef F17 = Function([List x1]) Function(int x); -typedef F18 = void Function(int x, [Function x1]) Function(int x); -typedef F19 = void Function(int y, {core.List x}) Function(int x); -typedef F20 = Function Function(List x) Function(int x); -typedef F21 = List Function() Function(int x); -typedef F22 = List Function(A x) Function(int x); - -Function f0(int y, [List x]) => null; -core.List f1(int x0, [Function x]) => null; -f2([int x]) => null; -void f3([List x]) => null; -int Function(int x0) f4(int x) => null; -int Function(int x, [List x0]) f5(int x) => null; -int Function(int y, {List x}) f6(int x) => null; -Function Function([List x]) f7(int x) => null; -Function Function(List x0) f8(int x) => null; -List Function(int x0, [Function x1]) f9(int x) => null; -List Function(int x0, {core.List x}) f10(int x) => null; -core.List Function(Function x) f11(int x) => null; -core.List Function(int y, [core.List x]) f12(int x) => null; -List Function([int x0]) f13(int x) => null; -List Function({List x}) f14(int x) => null; -List Function() f15(int x) => null; -Function(int x0, [List x]) f16(int x) => null; -Function([List x0]) f17(int x) => null; -void Function(int x, [Function x0]) f18(int x) => null; -void Function(int y, {core.List x}) f19(int x) => null; -Function Function(List x) f20(int x) => null; -List Function() f21(int x) => null; -List Function(A x) f22(int x) => null; - -class U81 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int y, [List x]) x0; - core.List Function(int x0, [Function x]) x1; - Function([int x]) x2; - void Function([List x]) x3; - int Function(int x1) Function(int x) x4; - int Function(int x, [List x1]) Function(int x) x5; - int Function(int y, {List x}) Function(int x) x6; - Function Function([List x]) Function(int x) x7; - Function Function(List x1) Function(int x) x8; - List Function(int x2, [Function x3]) Function(int x) x9; - List Function(int x1, {core.List x}) Function(int x) x10; - core.List Function(Function x) Function(int x) x11; - core.List Function(int y, [core.List x]) Function(int x) - x12; - List Function([int x1]) Function(int x) x13; - List Function({List x}) Function(int x) x14; - List Function() Function(int x) x15; - Function(int x1, [List x]) Function(int x) x16; - Function([List x1]) Function(int x) x17; - void Function(int x, [Function x1]) Function(int x) x18; - void Function(int y, {core.List x}) Function(int x) x19; - Function Function(List x) Function(int x) x20; - List Function() Function(int x) x21; - List Function(A x) Function(int x) x22; - - U81({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int y, [List x]) => null; - core.List m1(int x0, [Function x]) => null; - m2([int x]) => null; - void m3([List x]) => null; - int Function(int x0) m4(int x) => null; - int Function(int x, [List x0]) m5(int x) => null; - int Function(int y, {List x}) m6(int x) => null; - Function Function([List x]) m7(int x) => null; - Function Function(List x0) m8(int x) => null; - List Function(int x0, [Function x1]) m9(int x) => null; - List Function(int x0, {core.List x}) m10(int x) => null; - core.List Function(Function x) m11(int x) => null; - core.List Function(int y, [core.List x]) m12(int x) => - null; - List Function([int x0]) m13(int x) => null; - List Function({List x}) m14(int x) => null; - List Function() m15(int x) => null; - Function(int x0, [List x]) m16(int x) => null; - Function([List x0]) m17(int x) => null; - void Function(int x, [Function x0]) m18(int x) => null; - void Function(int y, {core.List x}) m19(int x) => null; - Function Function(List x) m20(int x) => null; - List Function() m21(int x) => null; - List Function(A x) m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int y, [List x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int y, [List x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int y, [List x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function(int x0, [Function x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function(int x0, [Function x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function(int x0, [Function x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// Function([int x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - Function([int x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is Function([int x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// void Function([List x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function([List x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function([List x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - // The static function has its T always set to int. - Expect.isTrue(f3 is F3); - Expect.isFalse(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - Expect.isFalse(confuse(f3) is F3); - if (tIsBool) { - Expect.throws(() { - x3 = (f3 as dynamic); - }); - Expect.throws(() { - x3 = confuse(f3); - }); - Expect.throws(() { - l3 = (f3 as dynamic); - }); - Expect.throws(() { - l3 = confuse(f3); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m3 is F3); - Expect.equals(true, m3 is F3); - Expect.equals(true, confuse(m3) is F3); - Expect.equals(true, confuse(m3) is F3); - } - } - - /// int Function(int x1) Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int x1) Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function(int x1) Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x, [List x1]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x, [List x1]) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function(int x, [List x1]) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int y, {List x}) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int y, {List x}) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int y, {List x}) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function([List x]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function([List x]) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function([List x]) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(List x1) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(List x1) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(List x1) Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int x2, [Function x3]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x2, [Function x3]) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is List Function(int x2, [Function x3]) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x1, {core.List x}) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x1, {core.List x}) Function(int x) - l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x1, - {core.List x}) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(Function x) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(Function x) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is core.List Function(Function x) Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int y, [core.List x]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int y, [core.List x]) Function(int x) - l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int y, - [core.List x]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function([int x1]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function([int x1]) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function([int x1]) Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function({List x}) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function({List x}) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function({List x}) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function() Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function() Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function() Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x1, [List x]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x1, [List x]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x1, [List x]) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function([List x1]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function([List x1]) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function([List x1]) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int x, [Function x1]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x, [Function x1]) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x, [Function x1]) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int y, {core.List x}) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int y, {core.List x}) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function(int y, {core.List x}) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// Function Function(List x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(List x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is Function Function(List x) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function() Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function() Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function() Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(A x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(A x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is List Function(A x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U81().runTests(); - new U81(tIsInt: true).runTests(); - new U81(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type82_test.dart b/tests/language_2/function_type/function_type82_test.dart deleted file mode 100644 index ea17429cdfa..00000000000 --- a/tests/language_2/function_type/function_type82_test.dart +++ /dev/null @@ -1,977 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(List x0); -typedef F1 = core.List Function(int y, [Function x]); -typedef F2 = Function(int x0, [int x]); -typedef F3 = void Function(int x0, [List x]); -typedef F4 = int Function(int x1) Function(); -typedef F5 = int Function(int x, [List x1]) - Function(); -typedef F6 = int Function(int y, {List x}) Function(); -typedef F7 = Function Function([List x]) - Function(); -typedef F8 = Function Function(List x1) Function(); -typedef F9 = List Function(int x2, [Function x3]) - Function(); -typedef F10 = List Function(int x1, {core.List x}) - Function(); -typedef F11 = core.List Function(Function x) - Function(); -typedef F12 = core.List Function(int y, [core.List x]) - Function(); -typedef F13 = List Function([int x1]) Function(); -typedef F14 = List Function({List x}) - Function(); -typedef F15 = List Function() Function(); -typedef F16 = Function(int x1, [List x]) - Function(); -typedef F17 = Function([List x1]) Function(); -typedef F18 = void Function(int x, [Function x1]) - Function(); -typedef F19 = void Function(int y, {core.List x}) - Function(); -typedef F20 = Function Function(List x) Function(); -typedef F21 = List Function() Function(); -typedef F22 = List Function(A x) Function(); - -Function f0(List x0) => null; -core.List f1(int y, [Function x]) => null; -f2(int x0, [int x]) => null; -void f3(int x0, [List x]) => null; -int Function(int x0) f4() => null; -int Function(int x, [List x0]) f5() => null; -int Function(int y, {List x}) f6() => null; -Function Function([List x]) f7() => null; -Function Function(List x0) f8() => null; -List Function(int x0, [Function x1]) f9() => null; -List Function(int x0, {core.List x}) - f10() => null; -core.List Function(Function x) f11() => null; -core.List Function(int y, [core.List x]) - f12() => null; -List Function([int x0]) f13() => null; -List Function({List x}) f14() => null; -List Function() f15() => null; -Function(int x0, [List x]) f16() => null; -Function([List x0]) f17() => null; -void Function(int x, [Function x0]) f18() => null; -void Function(int y, {core.List x}) f19() => null; -Function Function(List x) f20() => null; -List Function() f21() => null; -List Function(A x) f22() => null; - -class U82 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(List x0) x0; - core.List Function(int y, [Function x]) x1; - Function(int x0, [int x]) x2; - void Function(int x0, [List x]) x3; - int Function(int x1) Function() x4; - int Function(int x, [List x1]) Function() x5; - int Function(int y, {List x}) Function() x6; - Function Function([List x]) Function() x7; - Function Function(List x1) Function() x8; - List Function(int x2, [Function x3]) Function() - x9; - List Function(int x1, {core.List x}) - Function() x10; - core.List Function(Function x) Function() x11; - core.List Function(int y, [core.List x]) - Function() x12; - List Function([int x1]) Function() x13; - List Function({List x}) Function() x14; - List Function() Function() x15; - Function(int x1, [List x]) Function() x16; - Function([List x1]) Function() x17; - void Function(int x, [Function x1]) Function() x18; - void Function(int y, {core.List x}) Function() - x19; - Function Function(List x) Function() x20; - List Function() Function() x21; - List Function(A x) Function() x22; - - U82({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(List x0) => null; - core.List m1(int y, [Function x]) => null; - m2(int x0, [int x]) => null; - void m3(int x0, [List x]) => null; - int Function(int x0) m4() => null; - int Function(int x, [List x0]) m5() => null; - int Function(int y, {List x}) m6() => null; - Function Function([List x]) m7() => null; - Function Function(List x0) m8() => null; - List Function(int x0, [Function x1]) m9() => - null; - List Function(int x0, {core.List x}) - m10() => null; - core.List Function(Function x) m11() => null; - core.List Function(int y, [core.List x]) - m12() => null; - List Function([int x0]) m13() => null; - List Function({List x}) m14() => null; - List Function() m15() => null; - Function(int x0, [List x]) m16() => null; - Function([List x0]) m17() => null; - void Function(int x, [Function x0]) m18() => null; - void Function(int y, {core.List x}) m19() => - null; - Function Function(List x) m20() => null; - List Function() m21() => null; - List Function(A x) m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(List x0) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(List x0) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(List x0)); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function(int y, [Function x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function(int y, [Function x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function(int y, [Function x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// Function(int x0, [int x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - Function(int x0, [int x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is Function(int x0, [int x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// void Function(int x0, [List x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int x0, [List x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int x0, [List x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - // The static function has its T always set to int. - Expect.isTrue(f3 is F3); - Expect.isFalse(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - Expect.isFalse(confuse(f3) is F3); - if (tIsBool) { - Expect.throws(() { - x3 = (f3 as dynamic); - }); - Expect.throws(() { - x3 = confuse(f3); - }); - Expect.throws(() { - l3 = (f3 as dynamic); - }); - Expect.throws(() { - l3 = confuse(f3); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m3 is F3); - Expect.equals(true, m3 is F3); - Expect.equals(true, confuse(m3) is F3); - Expect.equals(true, confuse(m3) is F3); - } - } - - /// int Function(int x1) Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int x1) Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function(int x1) Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x, [List x1]) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x, [List x1]) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x, [List x1]) - Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int y, {List x}) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int y, {List x}) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function(int y, {List x}) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function([List x]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function([List x]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function([List x]) - Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(List x1) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(List x1) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function(List x1) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int x2, [Function x3]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x2, [Function x3]) - Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x2, [Function x3]) - Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x1, {core.List x}) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x1, {core.List x}) - Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x1, - {core.List x}) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(Function x) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(Function x) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(Function x) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int y, [core.List x]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int y, [core.List x]) - Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int y, - [core.List x]) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function([int x1]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function([int x1]) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue( - m13 is List Function([int x1]) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function({List x}) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function({List x}) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function({List x}) - Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function() Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function() Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function() Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x1, [List x]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x1, [List x]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x1, [List x]) - Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function([List x1]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function([List x1]) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function([List x1]) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int x, [Function x1]) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x, [Function x1]) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x, [Function x1]) - Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int y, {core.List x}) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int y, {core.List x}) Function() - l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int y, {core.List x}) - Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// Function Function(List x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(List x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is Function Function(List x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function() Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function() Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function() Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(A x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(A x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is List Function(A x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U82().runTests(); - new U82(tIsInt: true).runTests(); - new U82(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type83_test.dart b/tests/language_2/function_type/function_type83_test.dart deleted file mode 100644 index 01b39abc17d..00000000000 --- a/tests/language_2/function_type/function_type83_test.dart +++ /dev/null @@ -1,997 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function([List x1]); -typedef F1 = core.List Function(Function x0); -typedef F2 = Function(int y, [int x]); -typedef F3 = void Function(int y, [List x]); -typedef F4 = int Function(int x1) Function(int x); -typedef F5 = int Function(int x, [List x1]) - Function(int x); -typedef F6 = int Function(int y, {List x}) Function( - int x); -typedef F7 = Function Function([List x]) - Function(int x); -typedef F8 = Function Function(List x1) Function( - int x); -typedef F9 = List Function(int x2, [Function x3]) - Function(int x); -typedef F10 = List Function(int x1, {core.List x}) - Function(int x); -typedef F11 = core.List Function(Function x) - Function(int x); -typedef F12 = core.List Function(int y, [core.List x]) - Function(int x); -typedef F13 = List Function([int x1]) Function(int x); -typedef F14 = List Function({List x}) - Function(int x); -typedef F15 = List Function() Function(int x); -typedef F16 = Function(int x1, [List x]) - Function(int x); -typedef F17 = Function([List x1]) Function(int x); -typedef F18 = void Function(int x, [Function x1]) - Function(int x); -typedef F19 = void Function(int y, {core.List x}) - Function(int x); -typedef F20 = Function Function(List x) Function( - int x); -typedef F21 = List Function() Function(int x); -typedef F22 = List Function(A x) Function(int x); - -Function f0([List x0]) => null; -core.List f1(Function x0) => null; -f2(int y, [int x]) => null; -void f3(int y, [List x]) => null; -int Function(int x0) f4(int x) => null; -int Function(int x, [List x0]) f5(int x) => null; -int Function(int y, {List x}) f6(int x) => null; -Function Function([List x]) f7(int x) => null; -Function Function(List x0) f8(int x) => null; -List Function(int x0, [Function x1]) f9(int x) => - null; -List Function(int x0, {core.List x}) - f10(int x) => null; -core.List Function(Function x) f11(int x) => null; -core.List Function(int y, [core.List x]) - f12(int x) => null; -List Function([int x0]) f13(int x) => null; -List Function({List x}) f14(int x) => null; -List Function() f15(int x) => null; -Function(int x0, [List x]) f16(int x) => null; -Function([List x0]) f17(int x) => null; -void Function(int x, [Function x0]) f18(int x) => null; -void Function(int y, {core.List x}) f19(int x) => - null; -Function Function(List x) f20(int x) => null; -List Function() f21(int x) => null; -List Function(A x) f22(int x) => null; - -class U83 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function([List x1]) x0; - core.List Function(Function x0) x1; - Function(int y, [int x]) x2; - void Function(int y, [List x]) x3; - int Function(int x1) Function(int x) x4; - int Function(int x, [List x1]) Function(int x) - x5; - int Function(int y, {List x}) Function(int x) x6; - Function Function([List x]) Function(int x) x7; - Function Function(List x1) Function(int x) x8; - List Function(int x2, [Function x3]) Function( - int x) x9; - List Function(int x1, {core.List x}) - Function(int x) x10; - core.List Function(Function x) Function(int x) - x11; - core.List Function(int y, [core.List x]) - Function(int x) x12; - List Function([int x1]) Function(int x) x13; - List Function({List x}) Function(int x) x14; - List Function() Function(int x) x15; - Function(int x1, [List x]) Function(int x) x16; - Function([List x1]) Function(int x) x17; - void Function(int x, [Function x1]) Function(int x) x18; - void Function(int y, {core.List x}) Function( - int x) x19; - Function Function(List x) Function(int x) x20; - List Function() Function(int x) x21; - List Function(A x) Function(int x) x22; - - U83({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0([List x0]) => null; - core.List m1(Function x0) => null; - m2(int y, [int x]) => null; - void m3(int y, [List x]) => null; - int Function(int x0) m4(int x) => null; - int Function(int x, [List x0]) m5(int x) => - null; - int Function(int y, {List x}) m6(int x) => null; - Function Function([List x]) m7(int x) => null; - Function Function(List x0) m8(int x) => null; - List Function(int x0, [Function x1]) m9( - int x) => - null; - List Function(int x0, {core.List x}) - m10(int x) => null; - core.List Function(Function x) m11(int x) => - null; - core.List Function(int y, [core.List x]) - m12(int x) => null; - List Function([int x0]) m13(int x) => null; - List Function({List x}) m14(int x) => null; - List Function() m15(int x) => null; - Function(int x0, [List x]) m16(int x) => null; - Function([List x0]) m17(int x) => null; - void Function(int x, [Function x0]) m18(int x) => null; - void Function(int y, {core.List x}) m19( - int x) => - null; - Function Function(List x) m20(int x) => null; - List Function() m21(int x) => null; - List Function(A x) m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function([List x1]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function([List x1]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function([List x1])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function(Function x0) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function(Function x0) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function(Function x0)); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// Function(int y, [int x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - Function(int y, [int x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is Function(int y, [int x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// void Function(int y, [List x]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int y, [List x]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int y, [List x])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - // The static function has its T always set to int. - Expect.isTrue(f3 is F3); - Expect.isFalse(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - Expect.isFalse(confuse(f3) is F3); - if (tIsBool) { - Expect.throws(() { - x3 = (f3 as dynamic); - }); - Expect.throws(() { - x3 = confuse(f3); - }); - Expect.throws(() { - l3 = (f3 as dynamic); - }); - Expect.throws(() { - l3 = confuse(f3); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m3 is F3); - Expect.equals(true, m3 is F3); - Expect.equals(true, confuse(m3) is F3); - Expect.equals(true, confuse(m3) is F3); - } - } - - /// int Function(int x1) Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int x1) Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue( - m4 is int Function(int x1) Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x, [List x1]) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x, [List x1]) Function(int x) - l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x, [List x1]) - Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int y, {List x}) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int y, {List x}) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function(int y, {List x}) - Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - // The static function has its T always set to int. - Expect.isTrue(f6 is F6); - Expect.isFalse(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - Expect.isFalse(confuse(f6) is F6); - if (tIsBool) { - Expect.throws(() { - x6 = (f6 as dynamic); - }); - Expect.throws(() { - x6 = confuse(f6); - }); - Expect.throws(() { - l6 = (f6 as dynamic); - }); - Expect.throws(() { - l6 = confuse(f6); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m6 is F6); - Expect.equals(tIsBool, m6 is F6); - Expect.equals(tIsInt, confuse(m6) is F6); - Expect.equals(tIsBool, confuse(m6) is F6); - } - } - - /// Function Function([List x]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function([List x]) Function(int x) - l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function([List x]) - Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(List x1) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(List x1) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(List x1) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int x2, [Function x3]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x2, [Function x3]) Function( - int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x2, [Function x3]) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x1, {core.List x}) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x1, {core.List x}) - Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x1, - {core.List x}) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function(Function x) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(Function x) Function(int x) - l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(Function x) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int y, [core.List x]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int y, [core.List x]) - Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int y, - [core.List x]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function([int x1]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function([int x1]) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue( - m13 is List Function([int x1]) Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function({List x}) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function({List x}) Function(int x) - l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function({List x}) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function() Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function() Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue( - m15 is List Function() Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x1, [List x]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x1, [List x]) Function(int x) - l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x1, [List x]) - Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function([List x1]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function([List x1]) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue( - m17 is Function([List x1]) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int x, [Function x1]) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x, [Function x1]) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x, [Function x1]) - Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int y, {core.List x}) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int y, {core.List x}) Function( - int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int y, {core.List x}) - Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// Function Function(List x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(List x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is Function Function(List x) - Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function() Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function() Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is List Function() Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(A x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(A x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is List Function(A x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U83().runTests(); - new U83(tIsInt: true).runTests(); - new U83(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type84_test.dart b/tests/language_2/function_type/function_type84_test.dart deleted file mode 100644 index 6db3eb6b091..00000000000 --- a/tests/language_2/function_type/function_type84_test.dart +++ /dev/null @@ -1,893 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int x1, [List x2]); -typedef F1 = core.List Function([Function x1]); -typedef F2 = Function(int x0); -typedef F3 = void Function(List x0); -typedef F4 = int Function([int x1]) Function(); -typedef F5 = int Function({List x}) Function(); -typedef F6 = int Function() Function(); -typedef F7 = Function Function(int x0, [List x]) Function(); -typedef F8 = Function Function([List x1]) Function(); -typedef F9 = List Function(int x, [Function x2]) Function(); -typedef F10 = List Function(int y, {core.List x}) - Function(); -typedef F11 = core.List Function([Function x]) Function(); -typedef F12 = core.List Function(core.List x0) - Function(); -typedef F13 = List Function(int x1, [int x2]) Function(); -typedef F14 = List Function(int x0, {List x}) Function(); -typedef F15 = Function(int x) Function(); -typedef F16 = Function(int y, [List x]) Function(); -typedef F17 = Function(int x1, [List x2]) Function(); -typedef F18 = void Function({Function x}) Function(); -typedef F19 = void Function(List x) Function(); -typedef F20 = Function Function() Function(); -typedef F21 = List Function(A x) Function(); -typedef F22 = List Function(List x) Function(); - -Function f0(int x0, [List x1]) => null; -core.List f1([Function x0]) => null; -f2(int x0) => null; -void f3(List x0) => null; -int Function([int x0]) f4() => null; -int Function({List x}) f5() => null; -int Function() f6() => null; -Function Function(int x0, [List x]) f7() => null; -Function Function([List x0]) f8() => null; -List Function(int x, [Function x0]) f9() => null; -List Function(int y, {core.List x}) f10() => null; -core.List Function([Function x]) f11() => null; -core.List Function(core.List x0) f12() => null; -List Function(int x0, [int x1]) f13() => null; -List Function(int x0, {List x}) f14() => null; -Function(int x) f15() => null; -Function(int y, [List x]) f16() => null; -Function(int x0, [List x1]) f17() => null; -void Function({Function x}) f18() => null; -void Function(List x) f19() => null; -Function Function() f20() => null; -List Function(A x) f21() => null; -List Function(List x) f22() => null; - -class U84 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int x1, [List x2]) x0; - core.List Function([Function x1]) x1; - Function(int x0) x2; - void Function(List x0) x3; - int Function([int x1]) Function() x4; - int Function({List x}) Function() x5; - int Function() Function() x6; - Function Function(int x0, [List x]) Function() x7; - Function Function([List x1]) Function() x8; - List Function(int x, [Function x2]) Function() x9; - List Function(int y, {core.List x}) Function() x10; - core.List Function([Function x]) Function() x11; - core.List Function(core.List x0) Function() x12; - List Function(int x1, [int x2]) Function() x13; - List Function(int x0, {List x}) Function() x14; - Function(int x) Function() x15; - Function(int y, [List x]) Function() x16; - Function(int x1, [List x2]) Function() x17; - void Function({Function x}) Function() x18; - void Function(List x) Function() x19; - Function Function() Function() x20; - List Function(A x) Function() x21; - List Function(List x) Function() x22; - - U84({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int x0, [List x1]) => null; - core.List m1([Function x0]) => null; - m2(int x0) => null; - void m3(List x0) => null; - int Function([int x0]) m4() => null; - int Function({List x}) m5() => null; - int Function() m6() => null; - Function Function(int x0, [List x]) m7() => null; - Function Function([List x0]) m8() => null; - List Function(int x, [Function x0]) m9() => null; - List Function(int y, {core.List x}) m10() => null; - core.List Function([Function x]) m11() => null; - core.List Function(core.List x0) m12() => null; - List Function(int x0, [int x1]) m13() => null; - List Function(int x0, {List x}) m14() => null; - Function(int x) m15() => null; - Function(int y, [List x]) m16() => null; - Function(int x0, [List x1]) m17() => null; - void Function({Function x}) m18() => null; - void Function(List x) m19() => null; - Function Function() m20() => null; - List Function(A x) m21() => null; - List Function(List x) m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int x1, [List x2]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int x1, [List x2]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int x1, [List x2])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function([Function x1]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function([Function x1]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function([Function x1])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// Function(int x0) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - Function(int x0) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is Function(int x0)); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// void Function(List x0) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(List x0) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(List x0)); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - // The static function has its T always set to int. - Expect.isTrue(f3 is F3); - Expect.isFalse(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - Expect.isFalse(confuse(f3) is F3); - if (tIsBool) { - Expect.throws(() { - x3 = (f3 as dynamic); - }); - Expect.throws(() { - x3 = confuse(f3); - }); - Expect.throws(() { - l3 = (f3 as dynamic); - }); - Expect.throws(() { - l3 = confuse(f3); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m3 is F3); - Expect.equals(true, m3 is F3); - Expect.equals(true, confuse(m3) is F3); - Expect.equals(true, confuse(m3) is F3); - } - } - - /// int Function([int x1]) Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function([int x1]) Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function([int x1]) Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function({List x}) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function({List x}) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function({List x}) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function() Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function() Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function() Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int x0, [List x]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x0, [List x]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue( - m7 is Function Function(int x0, [List x]) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function([List x1]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function([List x1]) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function([List x1]) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int x, [Function x2]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x, [Function x2]) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is List Function(int x, [Function x2]) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int y, {core.List x}) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int y, {core.List x}) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int y, {core.List x}) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function([Function x]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function([Function x]) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function([Function x]) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(core.List x0) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(core.List x0) Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue( - m12 is core.List Function(core.List x0) Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x1, [int x2]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x1, [int x2]) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function(int x1, [int x2]) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x0, {List x}) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x0, {List x}) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function(int x0, {List x}) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// Function(int x) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - Function(int x) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is Function(int x) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - } - - /// Function(int y, [List x]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int y, [List x]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int y, [List x]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x1, [List x2]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x1, [List x2]) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x1, [List x2]) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function({Function x}) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function({Function x}) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function({Function x}) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(List x) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(List x) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(List x) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - // The static function has its T always set to int. - Expect.isTrue(f19 is F19); - Expect.isFalse(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - Expect.isFalse(confuse(f19) is F19); - if (tIsBool) { - Expect.throws(() { - x19 = (f19 as dynamic); - }); - Expect.throws(() { - x19 = confuse(f19); - }); - Expect.throws(() { - l19 = (f19 as dynamic); - }); - Expect.throws(() { - l19 = confuse(f19); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m19 is F19); - Expect.equals(tIsBool, m19 is F19); - Expect.equals(tIsInt, confuse(m19) is F19); - Expect.equals(tIsBool, confuse(m19) is F19); - } - } - - /// Function Function() Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function() Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is Function Function() Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(A x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(A x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(A x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is List Function(List x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U84().runTests(); - new U84(tIsInt: true).runTests(); - new U84(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type85_test.dart b/tests/language_2/function_type/function_type85_test.dart deleted file mode 100644 index d60125700f4..00000000000 --- a/tests/language_2/function_type/function_type85_test.dart +++ /dev/null @@ -1,894 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int x, [List x2]); -typedef F1 = core.List Function(int x1, [Function x2]); -typedef F2 = Function([int x1]); -typedef F3 = void Function([List x1]); -typedef F4 = int Function([int x1]) Function(int x); -typedef F5 = int Function({List x}) Function(int x); -typedef F6 = int Function() Function(int x); -typedef F7 = Function Function(int x1, [List x]) Function(int x); -typedef F8 = Function Function([List x1]) Function(int x); -typedef F9 = List Function(int x, [Function x1]) Function(int x); -typedef F10 = List Function(int y, {core.List x}) - Function(int x); -typedef F11 = core.List Function([Function x]) Function(int x); -typedef F12 = core.List Function(core.List x1) Function( - int x); -typedef F13 = List Function(int x2, [int x3]) Function(int x); -typedef F14 = List Function(int x1, {List x}) Function(int x); -typedef F15 = Function(int x) Function(int x); -typedef F16 = Function(int y, [List x]) Function(int x); -typedef F17 = Function(int x2, [List x3]) Function(int x); -typedef F18 = void Function({Function x}) Function(int x); -typedef F19 = void Function(List x) Function(int x); -typedef F20 = Function Function() Function(int x); -typedef F21 = List Function(A x) Function(int x); -typedef F22 = List Function(List x) Function(int x); - -Function f0(int x, [List x0]) => null; -core.List f1(int x0, [Function x1]) => null; -f2([int x0]) => null; -void f3([List x0]) => null; -int Function([int x0]) f4(int x) => null; -int Function({List x}) f5(int x) => null; -int Function() f6(int x) => null; -Function Function(int x0, [List x]) f7(int x) => null; -Function Function([List x0]) f8(int x) => null; -List Function(int x, [Function x0]) f9(int x) => null; -List Function(int y, {core.List x}) f10(int x) => null; -core.List Function([Function x]) f11(int x) => null; -core.List Function(core.List x0) f12(int x) => null; -List Function(int x0, [int x1]) f13(int x) => null; -List Function(int x0, {List x}) f14(int x) => null; -Function(int x) f15(int x) => null; -Function(int y, [List x]) f16(int x) => null; -Function(int x0, [List x1]) f17(int x) => null; -void Function({Function x}) f18(int x) => null; -void Function(List x) f19(int x) => null; -Function Function() f20(int x) => null; -List Function(A x) f21(int x) => null; -List Function(List x) f22(int x) => null; - -class U85 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int x, [List x2]) x0; - core.List Function(int x1, [Function x2]) x1; - Function([int x1]) x2; - void Function([List x1]) x3; - int Function([int x1]) Function(int x) x4; - int Function({List x}) Function(int x) x5; - int Function() Function(int x) x6; - Function Function(int x1, [List x]) Function(int x) x7; - Function Function([List x1]) Function(int x) x8; - List Function(int x, [Function x1]) Function(int x) x9; - List Function(int y, {core.List x}) Function(int x) x10; - core.List Function([Function x]) Function(int x) x11; - core.List Function(core.List x1) Function(int x) x12; - List Function(int x2, [int x3]) Function(int x) x13; - List Function(int x1, {List x}) Function(int x) x14; - Function(int x) Function(int x) x15; - Function(int y, [List x]) Function(int x) x16; - Function(int x2, [List x3]) Function(int x) x17; - void Function({Function x}) Function(int x) x18; - void Function(List x) Function(int x) x19; - Function Function() Function(int x) x20; - List Function(A x) Function(int x) x21; - List Function(List x) Function(int x) x22; - - U85({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int x, [List x0]) => null; - core.List m1(int x0, [Function x1]) => null; - m2([int x0]) => null; - void m3([List x0]) => null; - int Function([int x0]) m4(int x) => null; - int Function({List x}) m5(int x) => null; - int Function() m6(int x) => null; - Function Function(int x0, [List x]) m7(int x) => null; - Function Function([List x0]) m8(int x) => null; - List Function(int x, [Function x0]) m9(int x) => null; - List Function(int y, {core.List x}) m10(int x) => null; - core.List Function([Function x]) m11(int x) => null; - core.List Function(core.List x0) m12(int x) => null; - List Function(int x0, [int x1]) m13(int x) => null; - List Function(int x0, {List x}) m14(int x) => null; - Function(int x) m15(int x) => null; - Function(int y, [List x]) m16(int x) => null; - Function(int x0, [List x1]) m17(int x) => null; - void Function({Function x}) m18(int x) => null; - void Function(List x) m19(int x) => null; - Function Function() m20(int x) => null; - List Function(A x) m21(int x) => null; - List Function(List x) m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int x, [List x2]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int x, [List x2]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int x, [List x2])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function(int x1, [Function x2]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function(int x1, [Function x2]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function(int x1, [Function x2])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// Function([int x1]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - Function([int x1]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is Function([int x1])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// void Function([List x1]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function([List x1]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function([List x1])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - // The static function has its T always set to int. - Expect.isTrue(f3 is F3); - Expect.isFalse(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - Expect.isFalse(confuse(f3) is F3); - if (tIsBool) { - Expect.throws(() { - x3 = (f3 as dynamic); - }); - Expect.throws(() { - x3 = confuse(f3); - }); - Expect.throws(() { - l3 = (f3 as dynamic); - }); - Expect.throws(() { - l3 = confuse(f3); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m3 is F3); - Expect.equals(true, m3 is F3); - Expect.equals(true, confuse(m3) is F3); - Expect.equals(true, confuse(m3) is F3); - } - } - - /// int Function([int x1]) Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function([int x1]) Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function([int x1]) Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function({List x}) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function({List x}) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function({List x}) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function() Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function() Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function() Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int x1, [List x]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x1, [List x]) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue( - m7 is Function Function(int x1, [List x]) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function([List x1]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function([List x1]) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function([List x1]) Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int x, [Function x1]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x, [Function x1]) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is List Function(int x, [Function x1]) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int y, {core.List x}) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int y, {core.List x}) Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int y, {core.List x}) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function([Function x]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function([Function x]) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is core.List Function([Function x]) Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(core.List x1) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(core.List x1) Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(core.List x1) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x2, [int x3]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x2, [int x3]) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function(int x2, [int x3]) Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x1, {List x}) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x1, {List x}) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function(int x1, {List x}) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// Function(int x) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - Function(int x) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is Function(int x) Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - } - - /// Function(int y, [List x]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int y, [List x]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int y, [List x]) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x2, [List x3]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x2, [List x3]) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x2, [List x3]) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function({Function x}) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function({Function x}) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function({Function x}) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(List x) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(List x) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(List x) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - // The static function has its T always set to int. - Expect.isTrue(f19 is F19); - Expect.isFalse(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - Expect.isFalse(confuse(f19) is F19); - if (tIsBool) { - Expect.throws(() { - x19 = (f19 as dynamic); - }); - Expect.throws(() { - x19 = confuse(f19); - }); - Expect.throws(() { - l19 = (f19 as dynamic); - }); - Expect.throws(() { - l19 = confuse(f19); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m19 is F19); - Expect.equals(tIsBool, m19 is F19); - Expect.equals(tIsInt, confuse(m19) is F19); - Expect.equals(tIsBool, confuse(m19) is F19); - } - } - - /// Function Function() Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function() Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is Function Function() Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(A x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(A x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(A x) Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(List x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is List Function(List x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U85().runTests(); - new U85(tIsInt: true).runTests(); - new U85(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type86_test.dart b/tests/language_2/function_type/function_type86_test.dart deleted file mode 100644 index 12c841c1e7e..00000000000 --- a/tests/language_2/function_type/function_type86_test.dart +++ /dev/null @@ -1,928 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function({List x}); -typedef F1 = core.List Function(int x, [Function x2]); -typedef F2 = Function(int x1, [int x2]); -typedef F3 = void Function(int x1, [List x2]); -typedef F4 = int Function([int x1]) Function(); -typedef F5 = int Function({List x}) Function(); -typedef F6 = int Function() Function(); -typedef F7 = Function Function(int x1, [List x]) - Function(); -typedef F8 = Function Function([List x1]) Function(); -typedef F9 = List Function(int x, [Function x1]) - Function(); -typedef F10 = List Function(int y, {core.List x}) - Function(); -typedef F11 = core.List Function([Function x]) - Function(); -typedef F12 = core.List Function(core.List x1) - Function(); -typedef F13 = List Function(int x2, [int x3]) - Function(); -typedef F14 = List Function(int x1, {List x}) - Function(); -typedef F15 = Function(int x) Function(); -typedef F16 = Function(int y, [List x]) - Function(); -typedef F17 = Function(int x2, [List x3]) Function(); -typedef F18 = void Function({Function x}) Function(); -typedef F19 = void Function(List x) Function(); -typedef F20 = Function Function() Function(); -typedef F21 = List Function(A x) Function(); -typedef F22 = List Function(List x) Function(); - -Function f0({List x}) => null; -core.List f1(int x, [Function x0]) => null; -f2(int x0, [int x1]) => null; -void f3(int x0, [List x1]) => null; -int Function([int x0]) f4() => null; -int Function({List x}) f5() => null; -int Function() f6() => null; -Function Function(int x0, [List x]) f7() => null; -Function Function([List x0]) f8() => null; -List Function(int x, [Function x0]) f9() => null; -List Function(int y, {core.List x}) - f10() => null; -core.List Function([Function x]) f11() => null; -core.List Function(core.List x0) - f12() => null; -List Function(int x0, [int x1]) f13() => null; -List Function(int x0, {List x}) f14() => - null; -Function(int x) f15() => null; -Function(int y, [List x]) f16() => null; -Function(int x0, [List x1]) f17() => null; -void Function({Function x}) f18() => null; -void Function(List x) f19() => null; -Function Function() f20() => null; -List Function(A x) f21() => null; -List Function(List x) f22() => null; - -class U86 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function({List x}) x0; - core.List Function(int x, [Function x2]) x1; - Function(int x1, [int x2]) x2; - void Function(int x1, [List x2]) x3; - int Function([int x1]) Function() x4; - int Function({List x}) Function() x5; - int Function() Function() x6; - Function Function(int x1, [List x]) Function() - x7; - Function Function([List x1]) Function() x8; - List Function(int x, [Function x1]) Function() - x9; - List Function(int y, {core.List x}) - Function() x10; - core.List Function([Function x]) Function() x11; - core.List Function(core.List x1) - Function() x12; - List Function(int x2, [int x3]) Function() x13; - List Function(int x1, {List x}) Function() - x14; - Function(int x) Function() x15; - Function(int y, [List x]) Function() x16; - Function(int x2, [List x3]) Function() x17; - void Function({Function x}) Function() x18; - void Function(List x) Function() x19; - Function Function() Function() x20; - List Function(A x) Function() x21; - List Function(List x) Function() x22; - - U86({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0({List x}) => null; - core.List m1(int x, [Function x0]) => null; - m2(int x0, [int x1]) => null; - void m3(int x0, [List x1]) => null; - int Function([int x0]) m4() => null; - int Function({List x}) m5() => null; - int Function() m6() => null; - Function Function(int x0, [List x]) m7() => - null; - Function Function([List x0]) m8() => null; - List Function(int x, [Function x0]) m9() => - null; - List Function(int y, {core.List x}) - m10() => null; - core.List Function([Function x]) m11() => null; - core.List Function(core.List x0) - m12() => null; - List Function(int x0, [int x1]) m13() => null; - List Function(int x0, {List x}) m14() => - null; - Function(int x) m15() => null; - Function(int y, [List x]) m16() => null; - Function(int x0, [List x1]) m17() => null; - void Function({Function x}) m18() => null; - void Function(List x) m19() => null; - Function Function() m20() => null; - List Function(A x) m21() => null; - List Function(List x) m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function({List x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function({List x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function({List x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function(int x, [Function x2]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function(int x, [Function x2]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function(int x, [Function x2])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// Function(int x1, [int x2]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - Function(int x1, [int x2]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is Function(int x1, [int x2])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// void Function(int x1, [List x2]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int x1, [List x2]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int x1, [List x2])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - // The static function has its T always set to int. - Expect.isTrue(f3 is F3); - Expect.isFalse(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - Expect.isFalse(confuse(f3) is F3); - if (tIsBool) { - Expect.throws(() { - x3 = (f3 as dynamic); - }); - Expect.throws(() { - x3 = confuse(f3); - }); - Expect.throws(() { - l3 = (f3 as dynamic); - }); - Expect.throws(() { - l3 = confuse(f3); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m3 is F3); - Expect.equals(true, m3 is F3); - Expect.equals(true, confuse(m3) is F3); - Expect.equals(true, confuse(m3) is F3); - } - } - - /// int Function([int x1]) Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function([int x1]) Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function([int x1]) Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function({List x}) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function({List x}) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function({List x}) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function() Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function() Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function() Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int x1, [List x]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x1, [List x]) Function() - l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x1, [List x]) - Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function([List x1]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function([List x1]) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function([List x1]) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int x, [Function x1]) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x, [Function x1]) Function() - l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x, [Function x1]) - Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int y, {core.List x}) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int y, {core.List x}) - Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int y, {core.List x}) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function([Function x]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function([Function x]) Function() - l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function([Function x]) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(core.List x1) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(core.List x1) - Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(core.List x1) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x2, [int x3]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x2, [int x3]) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function(int x2, [int x3]) - Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x1, {List x}) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x1, {List x}) Function() - l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int x1, {List x}) - Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// Function(int x) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - Function(int x) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is Function(int x) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - } - - /// Function(int y, [List x]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int y, [List x]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int y, [List x]) - Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x2, [List x3]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x2, [List x3]) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue( - m17 is Function(int x2, [List x3]) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function({Function x}) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function({Function x}) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue( - m18 is void Function({Function x}) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(List x) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(List x) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function(List x) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - // The static function has its T always set to int. - Expect.isTrue(f19 is F19); - Expect.isFalse(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - Expect.isFalse(confuse(f19) is F19); - if (tIsBool) { - Expect.throws(() { - x19 = (f19 as dynamic); - }); - Expect.throws(() { - x19 = confuse(f19); - }); - Expect.throws(() { - l19 = (f19 as dynamic); - }); - Expect.throws(() { - l19 = confuse(f19); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m19 is F19); - Expect.equals(tIsBool, m19 is F19); - Expect.equals(tIsInt, confuse(m19) is F19); - Expect.equals(tIsBool, confuse(m19) is F19); - } - } - - /// Function Function() Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function() Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is Function Function() Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(A x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(A x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is List Function(A x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is List Function(List x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U86().runTests(); - new U86(tIsInt: true).runTests(); - new U86(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type87_test.dart b/tests/language_2/function_type/function_type87_test.dart deleted file mode 100644 index f597bf5f946..00000000000 --- a/tests/language_2/function_type/function_type87_test.dart +++ /dev/null @@ -1,943 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int x0, {List x}); -typedef F1 = core.List Function({Function x}); -typedef F2 = Function(int x, [int x2]); -typedef F3 = void Function(int x, [List x2]); -typedef F4 = int Function([int x1]) Function(int x); -typedef F5 = int Function({List x}) Function( - int x); -typedef F6 = int Function() Function(int x); -typedef F7 = Function Function(int x1, [List x]) - Function(int x); -typedef F8 = Function Function([List x1]) Function( - int x); -typedef F9 = List Function(int x, [Function x1]) - Function(int x); -typedef F10 = List Function(int y, {core.List x}) - Function(int x); -typedef F11 = core.List Function([Function x]) - Function(int x); -typedef F12 = core.List Function(core.List x1) - Function(int x); -typedef F13 = List Function(int x2, [int x3]) - Function(int x); -typedef F14 = List Function(int x1, {List x}) - Function(int x); -typedef F15 = Function(int x) Function(int x); -typedef F16 = Function(int y, [List x]) - Function(int x); -typedef F17 = Function(int x2, [List x3]) Function( - int x); -typedef F18 = void Function({Function x}) Function( - int x); -typedef F19 = void Function(List x) Function(int x); -typedef F20 = Function Function() Function(int x); -typedef F21 = List Function(A x) Function(int x); -typedef F22 = List Function(List x) Function( - int x); - -Function f0(int x0, {List x}) => null; -core.List f1({Function x}) => null; -f2(int x, [int x0]) => null; -void f3(int x, [List x0]) => null; -int Function([int x0]) f4(int x) => null; -int Function({List x}) f5(int x) => null; -int Function() f6(int x) => null; -Function Function(int x0, [List x]) f7(int x) => - null; -Function Function([List x0]) f8(int x) => null; -List Function(int x, [Function x0]) f9(int x) => - null; -List Function(int y, {core.List x}) f10( - int x) => - null; -core.List Function([Function x]) f11(int x) => - null; -core.List Function(core.List x0) f12( - int x) => - null; -List Function(int x0, [int x1]) f13(int x) => null; -List Function(int x0, {List x}) f14(int x) => - null; -Function(int x) f15(int x) => null; -Function(int y, [List x]) f16(int x) => null; -Function(int x0, [List x1]) f17(int x) => null; -void Function({Function x}) f18(int x) => null; -void Function(List x) f19(int x) => null; -Function Function() f20(int x) => null; -List Function(A x) f21(int x) => null; -List Function(List x) f22(int x) => null; - -class U87 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int x0, {List x}) x0; - core.List Function({Function x}) x1; - Function(int x, [int x2]) x2; - void Function(int x, [List x2]) x3; - int Function([int x1]) Function(int x) x4; - int Function({List x}) Function(int x) x5; - int Function() Function(int x) x6; - Function Function(int x1, [List x]) Function( - int x) x7; - Function Function([List x1]) Function(int x) x8; - List Function(int x, [Function x1]) Function( - int x) x9; - List Function(int y, {core.List x}) - Function(int x) x10; - core.List Function([Function x]) Function(int x) - x11; - core.List Function(core.List x1) - Function(int x) x12; - List Function(int x2, [int x3]) Function(int x) x13; - List Function(int x1, {List x}) Function( - int x) x14; - Function(int x) Function(int x) x15; - Function(int y, [List x]) Function(int x) x16; - Function(int x2, [List x3]) Function(int x) x17; - void Function({Function x}) Function(int x) x18; - void Function(List x) Function(int x) x19; - Function Function() Function(int x) x20; - List Function(A x) Function(int x) x21; - List Function(List x) Function(int x) x22; - - U87({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int x0, {List x}) => null; - core.List m1({Function x}) => null; - m2(int x, [int x0]) => null; - void m3(int x, [List x0]) => null; - int Function([int x0]) m4(int x) => null; - int Function({List x}) m5(int x) => null; - int Function() m6(int x) => null; - Function Function(int x0, [List x]) m7(int x) => - null; - Function Function([List x0]) m8(int x) => null; - List Function(int x, [Function x0]) m9(int x) => - null; - List Function(int y, {core.List x}) - m10(int x) => null; - core.List Function([Function x]) m11(int x) => - null; - core.List Function(core.List x0) m12( - int x) => - null; - List Function(int x0, [int x1]) m13(int x) => null; - List Function(int x0, {List x}) m14(int x) => - null; - Function(int x) m15(int x) => null; - Function(int y, [List x]) m16(int x) => null; - Function(int x0, [List x1]) m17(int x) => null; - void Function({Function x}) m18(int x) => null; - void Function(List x) m19(int x) => null; - Function Function() m20(int x) => null; - List Function(A x) m21(int x) => null; - List Function(List x) m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int x0, {List x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int x0, {List x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int x0, {List x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function({Function x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function({Function x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function({Function x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// Function(int x, [int x2]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - Function(int x, [int x2]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is Function(int x, [int x2])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// void Function(int x, [List x2]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int x, [List x2]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int x, [List x2])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - // The static function has its T always set to int. - Expect.isTrue(f3 is F3); - Expect.isFalse(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - Expect.isFalse(confuse(f3) is F3); - if (tIsBool) { - Expect.throws(() { - x3 = (f3 as dynamic); - }); - Expect.throws(() { - x3 = confuse(f3); - }); - Expect.throws(() { - l3 = (f3 as dynamic); - }); - Expect.throws(() { - l3 = confuse(f3); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m3 is F3); - Expect.equals(true, m3 is F3); - Expect.equals(true, confuse(m3) is F3); - Expect.equals(true, confuse(m3) is F3); - } - } - - /// int Function([int x1]) Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function([int x1]) Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue( - m4 is int Function([int x1]) Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function({List x}) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function({List x}) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function({List x}) - Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function() Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function() Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is int Function() Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int x1, [List x]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int x1, [List x]) Function( - int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int x1, [List x]) - Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function([List x1]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function([List x1]) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function([List x1]) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int x, [Function x1]) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x, [Function x1]) Function( - int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x, [Function x1]) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int y, {core.List x}) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int y, {core.List x}) - Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int y, {core.List x}) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// core.List Function([Function x]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function([Function x]) Function( - int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function([Function x]) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(core.List x1) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(core.List x1) - Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(core.List x1) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x2, [int x3]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x2, [int x3]) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function(int x2, [int x3]) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int x1, {List x}) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int x1, {List x}) Function( - int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int x1, {List x}) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// Function(int x) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - Function(int x) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is Function(int x) Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - } - - /// Function(int y, [List x]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int y, [List x]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int y, [List x]) - Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x2, [List x3]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x2, [List x3]) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x2, [List x3]) - Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function({Function x}) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function({Function x}) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue( - m18 is void Function({Function x}) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(List x) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(List x) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function(List x) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - // The static function has its T always set to int. - Expect.isTrue(f19 is F19); - Expect.isFalse(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - Expect.isFalse(confuse(f19) is F19); - if (tIsBool) { - Expect.throws(() { - x19 = (f19 as dynamic); - }); - Expect.throws(() { - x19 = confuse(f19); - }); - Expect.throws(() { - l19 = (f19 as dynamic); - }); - Expect.throws(() { - l19 = confuse(f19); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m19 is F19); - Expect.equals(tIsBool, m19 is F19); - Expect.equals(tIsInt, confuse(m19) is F19); - Expect.equals(tIsBool, confuse(m19) is F19); - } - } - - /// Function Function() Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function() Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is Function Function() Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(A x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(A x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is List Function(A x) Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// List Function(List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - List Function(List x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is List Function(List x) - Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U87().runTests(); - new U87(tIsInt: true).runTests(); - new U87(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type88_test.dart b/tests/language_2/function_type/function_type88_test.dart deleted file mode 100644 index f855e7d1d29..00000000000 --- a/tests/language_2/function_type/function_type88_test.dart +++ /dev/null @@ -1,916 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int y, {List x}); -typedef F1 = core.List Function(int x0, {Function x}); -typedef F2 = Function({int x}); -typedef F3 = void Function({List x}); -typedef F4 = int Function(int x1, [int x2]) Function(); -typedef F5 = int Function(int x0, {List x}) Function(); -typedef F6 = Function Function(int x) Function(); -typedef F7 = Function Function(int y, [List x]) Function(); -typedef F8 = Function Function(int x1, [List x2]) Function(); -typedef F9 = List Function({Function x}) Function(); -typedef F10 = List Function(List x) Function(); -typedef F11 = core.List Function(int x0, [Function x]) Function(); -typedef F12 = core.List Function([core.List x1]) - Function(); -typedef F13 = List Function(int x, [int x2]) Function(); -typedef F14 = List Function(int y, {List x}) Function(); -typedef F15 = Function([int x]) Function(); -typedef F16 = Function(List x0) Function(); -typedef F17 = Function(int x, [List x2]) Function(); -typedef F18 = void Function(int x0, {Function x}) Function(); -typedef F19 = void Function([List x]) Function(); -typedef F20 = Function Function(A x) Function(); -typedef F21 = List Function(List x) Function(); -typedef F22 = void Function(int x) Function(); - -Function f0(int y, {List x}) => null; -core.List f1(int x0, {Function x}) => null; -f2({int x}) => null; -void f3({List x}) => null; -int Function(int x0, [int x1]) f4() => null; -int Function(int x0, {List x}) f5() => null; -Function Function(int x) f6() => null; -Function Function(int y, [List x]) f7() => null; -Function Function(int x0, [List x1]) f8() => null; -List Function({Function x}) f9() => null; -List Function(List x) f10() => null; -core.List Function(int x0, [Function x]) f11() => null; -core.List Function([core.List x0]) f12() => null; -List Function(int x, [int x0]) f13() => null; -List Function(int y, {List x}) f14() => null; -Function([int x]) f15() => null; -Function(List x0) f16() => null; -Function(int x, [List x0]) f17() => null; -void Function(int x0, {Function x}) f18() => null; -void Function([List x]) f19() => null; -Function Function(A x) f20() => null; -List Function(List x) f21() => null; -void Function(int x) f22() => null; - -class U88 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int y, {List x}) x0; - core.List Function(int x0, {Function x}) x1; - Function({int x}) x2; - void Function({List x}) x3; - int Function(int x1, [int x2]) Function() x4; - int Function(int x0, {List x}) Function() x5; - Function Function(int x) Function() x6; - Function Function(int y, [List x]) Function() x7; - Function Function(int x1, [List x2]) Function() x8; - List Function({Function x}) Function() x9; - List Function(List x) Function() x10; - core.List Function(int x0, [Function x]) Function() x11; - core.List Function([core.List x1]) Function() x12; - List Function(int x, [int x2]) Function() x13; - List Function(int y, {List x}) Function() x14; - Function([int x]) Function() x15; - Function(List x0) Function() x16; - Function(int x, [List x2]) Function() x17; - void Function(int x0, {Function x}) Function() x18; - void Function([List x]) Function() x19; - Function Function(A x) Function() x20; - List Function(List x) Function() x21; - void Function(int x) Function() x22; - - U88({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int y, {List x}) => null; - core.List m1(int x0, {Function x}) => null; - m2({int x}) => null; - void m3({List x}) => null; - int Function(int x0, [int x1]) m4() => null; - int Function(int x0, {List x}) m5() => null; - Function Function(int x) m6() => null; - Function Function(int y, [List x]) m7() => null; - Function Function(int x0, [List x1]) m8() => null; - List Function({Function x}) m9() => null; - List Function(List x) m10() => null; - core.List Function(int x0, [Function x]) m11() => null; - core.List Function([core.List x0]) m12() => null; - List Function(int x, [int x0]) m13() => null; - List Function(int y, {List x}) m14() => null; - Function([int x]) m15() => null; - Function(List x0) m16() => null; - Function(int x, [List x0]) m17() => null; - void Function(int x0, {Function x}) m18() => null; - void Function([List x]) m19() => null; - Function Function(A x) m20() => null; - List Function(List x) m21() => null; - void Function(int x) m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int y, {List x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int y, {List x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int y, {List x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function(int x0, {Function x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function(int x0, {Function x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function(int x0, {Function x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// Function({int x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - Function({int x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is Function({int x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// void Function({List x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function({List x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function({List x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - // The static function has its T always set to int. - Expect.isTrue(f3 is F3); - Expect.isFalse(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - Expect.isFalse(confuse(f3) is F3); - if (tIsBool) { - Expect.throws(() { - x3 = (f3 as dynamic); - }); - Expect.throws(() { - x3 = confuse(f3); - }); - Expect.throws(() { - l3 = (f3 as dynamic); - }); - Expect.throws(() { - l3 = confuse(f3); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m3 is F3); - Expect.equals(true, m3 is F3); - Expect.equals(true, confuse(m3) is F3); - Expect.equals(true, confuse(m3) is F3); - } - } - - /// int Function(int x1, [int x2]) Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int x1, [int x2]) Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function(int x1, [int x2]) Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x0, {List x}) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x0, {List x}) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x0, {List x}) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// Function Function(int x) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - Function Function(int x) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is Function Function(int x) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int y, [List x]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int y, [List x]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue( - m7 is Function Function(int y, [List x]) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x1, [List x2]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x1, [List x2]) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x1, [List x2]) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function({Function x}) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function({Function x}) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function({Function x}) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(List x) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(List x) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(List x) Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - // The static function has its T always set to int. - Expect.isTrue(f10 is F10); - Expect.isFalse(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - Expect.isFalse(confuse(f10) is F10); - if (tIsBool) { - Expect.throws(() { - x10 = (f10 as dynamic); - }); - Expect.throws(() { - x10 = confuse(f10); - }); - Expect.throws(() { - l10 = (f10 as dynamic); - }); - Expect.throws(() { - l10 = confuse(f10); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m10 is F10); - Expect.equals(tIsBool, m10 is F10); - Expect.equals(tIsInt, confuse(m10) is F10); - Expect.equals(tIsBool, confuse(m10) is F10); - } - } - - /// core.List Function(int x0, [Function x]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x0, [Function x]) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is core.List Function(int x0, [Function x]) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function([core.List x1]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function([core.List x1]) Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function([core.List x1]) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x, [int x2]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x, [int x2]) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function(int x, [int x2]) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int y, {List x}) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int y, {List x}) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function(int y, {List x}) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// Function([int x]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - Function([int x]) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is Function([int x]) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - } - - /// Function(List x0) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(List x0) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(List x0) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x, [List x2]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x, [List x2]) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x, [List x2]) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int x0, {Function x}) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x0, {Function x}) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x0, {Function x}) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function([List x]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function([List x]) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function([List x]) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - // The static function has its T always set to int. - Expect.isTrue(f19 is F19); - Expect.isFalse(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - Expect.isFalse(confuse(f19) is F19); - if (tIsBool) { - Expect.throws(() { - x19 = (f19 as dynamic); - }); - Expect.throws(() { - x19 = confuse(f19); - }); - Expect.throws(() { - l19 = (f19 as dynamic); - }); - Expect.throws(() { - l19 = confuse(f19); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m19 is F19); - Expect.equals(tIsBool, m19 is F19); - Expect.equals(tIsInt, confuse(m19) is F19); - Expect.equals(tIsBool, confuse(m19) is F19); - } - } - - /// Function Function(A x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(A x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is Function Function(A x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(List x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// void Function(int x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - void Function(int x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is void Function(int x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U88().runTests(); - new U88(tIsInt: true).runTests(); - new U88(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type89_test.dart b/tests/language_2/function_type/function_type89_test.dart deleted file mode 100644 index 1a4d3b02f8d..00000000000 --- a/tests/language_2/function_type/function_type89_test.dart +++ /dev/null @@ -1,919 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(core.List x); -typedef F1 = core.List Function(int y, {Function x}); -typedef F2 = Function(int x0, {int x}); -typedef F3 = void Function(int x0, {List x}); -typedef F4 = int Function(int x2, [int x3]) Function(int x); -typedef F5 = int Function(int x1, {List x}) Function(int x); -typedef F6 = Function Function(int x) Function(int x); -typedef F7 = Function Function(int y, [List x]) Function(int x); -typedef F8 = Function Function(int x2, [List x3]) Function(int x); -typedef F9 = List Function({Function x}) Function(int x); -typedef F10 = List Function(List x) Function(int x); -typedef F11 = core.List Function(int x1, [Function x]) Function( - int x); -typedef F12 = core.List Function([core.List x1]) - Function(int x); -typedef F13 = List Function(int x, [int x1]) Function(int x); -typedef F14 = List Function(int y, {List x}) Function(int x); -typedef F15 = Function([int x]) Function(int x); -typedef F16 = Function(List x1) Function(int x); -typedef F17 = Function(int x, [List x1]) Function(int x); -typedef F18 = void Function(int x1, {Function x}) Function(int x); -typedef F19 = void Function([List x]) Function(int x); -typedef F20 = Function Function(A x) Function(int x); -typedef F21 = List Function(List x) Function(int x); -typedef F22 = void Function(int x) Function(int x); - -Function f0(core.List x) => null; -core.List f1(int y, {Function x}) => null; -f2(int x0, {int x}) => null; -void f3(int x0, {List x}) => null; -int Function(int x0, [int x1]) f4(int x) => null; -int Function(int x0, {List x}) f5(int x) => null; -Function Function(int x) f6(int x) => null; -Function Function(int y, [List x]) f7(int x) => null; -Function Function(int x0, [List x1]) f8(int x) => null; -List Function({Function x}) f9(int x) => null; -List Function(List x) f10(int x) => null; -core.List Function(int x0, [Function x]) f11(int x) => null; -core.List Function([core.List x0]) f12(int x) => null; -List Function(int x, [int x0]) f13(int x) => null; -List Function(int y, {List x}) f14(int x) => null; -Function([int x]) f15(int x) => null; -Function(List x0) f16(int x) => null; -Function(int x, [List x0]) f17(int x) => null; -void Function(int x0, {Function x}) f18(int x) => null; -void Function([List x]) f19(int x) => null; -Function Function(A x) f20(int x) => null; -List Function(List x) f21(int x) => null; -void Function(int x) f22(int x) => null; - -class U89 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(core.List x) x0; - core.List Function(int y, {Function x}) x1; - Function(int x0, {int x}) x2; - void Function(int x0, {List x}) x3; - int Function(int x2, [int x3]) Function(int x) x4; - int Function(int x1, {List x}) Function(int x) x5; - Function Function(int x) Function(int x) x6; - Function Function(int y, [List x]) Function(int x) x7; - Function Function(int x2, [List x3]) Function(int x) x8; - List Function({Function x}) Function(int x) x9; - List Function(List x) Function(int x) x10; - core.List Function(int x1, [Function x]) Function(int x) x11; - core.List Function([core.List x1]) Function(int x) x12; - List Function(int x, [int x1]) Function(int x) x13; - List Function(int y, {List x}) Function(int x) x14; - Function([int x]) Function(int x) x15; - Function(List x1) Function(int x) x16; - Function(int x, [List x1]) Function(int x) x17; - void Function(int x1, {Function x}) Function(int x) x18; - void Function([List x]) Function(int x) x19; - Function Function(A x) Function(int x) x20; - List Function(List x) Function(int x) x21; - void Function(int x) Function(int x) x22; - - U89({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(core.List x) => null; - core.List m1(int y, {Function x}) => null; - m2(int x0, {int x}) => null; - void m3(int x0, {List x}) => null; - int Function(int x0, [int x1]) m4(int x) => null; - int Function(int x0, {List x}) m5(int x) => null; - Function Function(int x) m6(int x) => null; - Function Function(int y, [List x]) m7(int x) => null; - Function Function(int x0, [List x1]) m8(int x) => null; - List Function({Function x}) m9(int x) => null; - List Function(List x) m10(int x) => null; - core.List Function(int x0, [Function x]) m11(int x) => null; - core.List Function([core.List x0]) m12(int x) => null; - List Function(int x, [int x0]) m13(int x) => null; - List Function(int y, {List x}) m14(int x) => null; - Function([int x]) m15(int x) => null; - Function(List x0) m16(int x) => null; - Function(int x, [List x0]) m17(int x) => null; - void Function(int x0, {Function x}) m18(int x) => null; - void Function([List x]) m19(int x) => null; - Function Function(A x) m20(int x) => null; - List Function(List x) m21(int x) => null; - void Function(int x) m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(core.List x) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(core.List x) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(core.List x)); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function(int y, {Function x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function(int y, {Function x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function(int y, {Function x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// Function(int x0, {int x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - Function(int x0, {int x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is Function(int x0, {int x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// void Function(int x0, {List x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int x0, {List x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int x0, {List x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - // The static function has its T always set to int. - Expect.isTrue(f3 is F3); - Expect.isFalse(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - Expect.isFalse(confuse(f3) is F3); - if (tIsBool) { - Expect.throws(() { - x3 = (f3 as dynamic); - }); - Expect.throws(() { - x3 = confuse(f3); - }); - Expect.throws(() { - l3 = (f3 as dynamic); - }); - Expect.throws(() { - l3 = confuse(f3); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m3 is F3); - Expect.equals(true, m3 is F3); - Expect.equals(true, confuse(m3) is F3); - Expect.equals(true, confuse(m3) is F3); - } - } - - /// int Function(int x2, [int x3]) Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int x2, [int x3]) Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function(int x2, [int x3]) Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x1, {List x}) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x1, {List x}) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function(int x1, {List x}) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// Function Function(int x) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - Function Function(int x) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is Function Function(int x) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int y, [List x]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int y, [List x]) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue( - m7 is Function Function(int y, [List x]) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x2, [List x3]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x2, [List x3]) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function(int x2, [List x3]) Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function({Function x}) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function({Function x}) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function({Function x}) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(List x) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(List x) Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(List x) Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - // The static function has its T always set to int. - Expect.isTrue(f10 is F10); - Expect.isFalse(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - Expect.isFalse(confuse(f10) is F10); - if (tIsBool) { - Expect.throws(() { - x10 = (f10 as dynamic); - }); - Expect.throws(() { - x10 = confuse(f10); - }); - Expect.throws(() { - l10 = (f10 as dynamic); - }); - Expect.throws(() { - l10 = confuse(f10); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m10 is F10); - Expect.equals(tIsBool, m10 is F10); - Expect.equals(tIsInt, confuse(m10) is F10); - Expect.equals(tIsBool, confuse(m10) is F10); - } - } - - /// core.List Function(int x1, [Function x]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x1, [Function x]) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int x1, [Function x]) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function([core.List x1]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function([core.List x1]) Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function([core.List x1]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x, [int x1]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x, [int x1]) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function(int x, [int x1]) Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int y, {List x}) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int y, {List x}) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function(int y, {List x}) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// Function([int x]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - Function([int x]) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is Function([int x]) Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - } - - /// Function(List x1) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(List x1) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(List x1) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x, [List x1]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x, [List x1]) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x, [List x1]) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int x1, {Function x}) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x1, {Function x}) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x1, {Function x}) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function([List x]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function([List x]) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function([List x]) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - // The static function has its T always set to int. - Expect.isTrue(f19 is F19); - Expect.isFalse(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - Expect.isFalse(confuse(f19) is F19); - if (tIsBool) { - Expect.throws(() { - x19 = (f19 as dynamic); - }); - Expect.throws(() { - x19 = confuse(f19); - }); - Expect.throws(() { - l19 = (f19 as dynamic); - }); - Expect.throws(() { - l19 = confuse(f19); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m19 is F19); - Expect.equals(tIsBool, m19 is F19); - Expect.equals(tIsInt, confuse(m19) is F19); - Expect.equals(tIsBool, confuse(m19) is F19); - } - } - - /// Function Function(A x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(A x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is Function Function(A x) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(List x) Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// void Function(int x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - void Function(int x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is void Function(int x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U89().runTests(); - new U89(tIsInt: true).runTests(); - new U89(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type8_test.dart b/tests/language_2/function_type/function_type8_test.dart deleted file mode 100644 index 800b1b18b39..00000000000 --- a/tests/language_2/function_type/function_type8_test.dart +++ /dev/null @@ -1,898 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function({int x}); -typedef F1 = Function Function({List x}); -typedef F2 = core.List Function(int x, [core.List x2]); -typedef F3 = Function(int x1, [List x2]); -typedef F4 = List Function(int x); -typedef F5 = int Function(Function x) Function(); -typedef F6 = int Function(int y, [core.List x]) Function(); -typedef F7 = Function Function([int x1]) Function(); -typedef F8 = Function Function({List x}) Function(); -typedef F9 = Function Function() Function(); -typedef F10 = List Function(int x0, [List x]) Function(); -typedef F11 = List Function([List x1]) Function(); -typedef F12 = core.List Function(int x, [Function x2]) Function(); -typedef F13 = core.List Function(int y, {core.List x}) - Function(); -typedef F14 = List Function([Function x]) Function(); -typedef F15 = List Function(core.List x0) Function(); -typedef F16 = Function(int x1, [int x2]) Function(); -typedef F17 = Function(int x0, {List x}) Function(); -typedef F18 = void Function(int x) Function(); -typedef F19 = void Function(int y, [List x]) Function(); -typedef F20 = void Function(int x1, [List x2]) Function(); -typedef F21 = List Function(core.List x) Function(); -typedef F22 = Function(List x) Function(); -typedef F23 = void Function() Function(); - -int f0({int x}) => null; -Function f1({List x}) => null; -core.List f2(int x, [core.List x0]) => null; -f3(int x0, [List x1]) => null; -List f4(int x) => null; -int Function(Function x) f5() => null; -int Function(int y, [core.List x]) f6() => null; -Function Function([int x0]) f7() => null; -Function Function({List x}) f8() => null; -Function Function() f9() => null; -List Function(int x0, [List x]) f10() => null; -List Function([List x0]) f11() => null; -core.List Function(int x, [Function x0]) f12() => null; -core.List Function(int y, {core.List x}) f13() => null; -List Function([Function x]) f14() => null; -List Function(core.List x0) f15() => null; -Function(int x0, [int x1]) f16() => null; -Function(int x0, {List x}) f17() => null; -void Function(int x) f18() => null; -void Function(int y, [List x]) f19() => null; -void Function(int x0, [List x1]) f20() => null; -List Function(core.List x) f21() => null; -Function(List x) f22() => null; -void Function() f23() => null; - -class U8 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function({int x}) x0; - Function Function({List x}) x1; - core.List Function(int x, [core.List x2]) x2; - Function(int x1, [List x2]) x3; - List Function(int x) x4; - int Function(Function x) Function() x5; - int Function(int y, [core.List x]) Function() x6; - Function Function([int x1]) Function() x7; - Function Function({List x}) Function() x8; - Function Function() Function() x9; - List Function(int x0, [List x]) Function() x10; - List Function([List x1]) Function() x11; - core.List Function(int x, [Function x2]) Function() x12; - core.List Function(int y, {core.List x}) Function() x13; - List Function([Function x]) Function() x14; - List Function(core.List x0) Function() x15; - Function(int x1, [int x2]) Function() x16; - Function(int x0, {List x}) Function() x17; - void Function(int x) Function() x18; - void Function(int y, [List x]) Function() x19; - void Function(int x1, [List x2]) Function() x20; - List Function(core.List x) Function() x21; - Function(List x) Function() x22; - void Function() Function() x23; - - U8({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0({int x}) => null; - Function m1({List x}) => null; - core.List m2(int x, [core.List x0]) => null; - m3(int x0, [List x1]) => null; - List m4(int x) => null; - int Function(Function x) m5() => null; - int Function(int y, [core.List x]) m6() => null; - Function Function([int x0]) m7() => null; - Function Function({List x}) m8() => null; - Function Function() m9() => null; - List Function(int x0, [List x]) m10() => null; - List Function([List x0]) m11() => null; - core.List Function(int x, [Function x0]) m12() => null; - core.List Function(int y, {core.List x}) m13() => null; - List Function([Function x]) m14() => null; - List Function(core.List x0) m15() => null; - Function(int x0, [int x1]) m16() => null; - Function(int x0, {List x}) m17() => null; - void Function(int x) m18() => null; - void Function(int y, [List x]) m19() => null; - void Function(int x0, [List x1]) m20() => null; - List Function(core.List x) m21() => null; - Function(List x) m22() => null; - void Function() m23() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function({int x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function({int x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function({int x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// Function Function({List x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - Function Function({List x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is Function Function({List x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - // The static function has its T always set to int. - Expect.isTrue(f1 is F1); - Expect.isFalse(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - Expect.isFalse(confuse(f1) is F1); - if (tIsBool) { - Expect.throws(() { - x1 = (f1 as dynamic); - }); - Expect.throws(() { - x1 = confuse(f1); - }); - Expect.throws(() { - l1 = (f1 as dynamic); - }); - Expect.throws(() { - l1 = confuse(f1); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m1 is F1); - Expect.equals(true, m1 is F1); - Expect.equals(true, confuse(m1) is F1); - Expect.equals(true, confuse(m1) is F1); - } - } - - /// core.List Function(int x, [core.List x2]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function(int x, [core.List x2]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue( - m2 is core.List Function(int x, [core.List x2])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// Function(int x1, [List x2]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(int x1, [List x2]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(int x1, [List x2])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// List Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(Function x) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(Function x) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(Function x) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int y, [core.List x]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int y, [core.List x]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function(int y, [core.List x]) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function([int x1]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function([int x1]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function([int x1]) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function({List x}) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function({List x}) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function({List x}) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// Function Function() Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - Function Function() Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is Function Function() Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x0, [List x]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x0, [List x]) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue( - m10 is List Function(int x0, [List x]) Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function([List x1]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function([List x1]) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function([List x1]) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function(int x, [Function x2]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x, [Function x2]) Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue( - m12 is core.List Function(int x, [Function x2]) Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int y, {core.List x}) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int y, {core.List x}) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int y, - {core.List x}) - Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - } - - /// List Function([Function x]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function([Function x]) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function([Function x]) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(core.List x0) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(core.List x0) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is List Function(core.List x0) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x1, [int x2]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x1, [int x2]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x1, [int x2]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x0, {List x}) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x0, {List x}) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x0, {List x}) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int y, [List x]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int y, [List x]) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int y, [List x]) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function(int x1, [List x2]) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function(int x1, [List x2]) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function(int x1, [List x2]) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(core.List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(core.List x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is List Function(core.List x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// Function(List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function(List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is Function(List x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - // The static function has its T always set to int. - Expect.isTrue(f22 is F22); - Expect.isFalse(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - Expect.isFalse(confuse(f22) is F22); - if (tIsBool) { - Expect.throws(() { - x22 = (f22 as dynamic); - }); - Expect.throws(() { - x22 = confuse(f22); - }); - Expect.throws(() { - l22 = (f22 as dynamic); - }); - Expect.throws(() { - l22 = confuse(f22); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m22 is F22); - Expect.equals(tIsBool, m22 is F22); - Expect.equals(tIsInt, confuse(m22) is F22); - Expect.equals(tIsBool, confuse(m22) is F22); - } - } - - /// void Function() Function() - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - void Function() Function() l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is void Function() Function()); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U8().runTests(); - new U8(tIsInt: true).runTests(); - new U8(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type90_test.dart b/tests/language_2/function_type/function_type90_test.dart deleted file mode 100644 index 98b1ca3f3f3..00000000000 --- a/tests/language_2/function_type/function_type90_test.dart +++ /dev/null @@ -1,951 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function([core.List x]); -typedef F1 = core.List Function(List x); -typedef F2 = Function(int y, {int x}); -typedef F3 = void Function(int y, {List x}); -typedef F4 = int Function(int x2, [int x3]) Function(); -typedef F5 = int Function(int x1, {List x}) - Function(); -typedef F6 = Function Function(int x) Function(); -typedef F7 = Function Function(int y, [List x]) - Function(); -typedef F8 = Function Function(int x2, [List x3]) - Function(); -typedef F9 = List Function({Function x}) - Function(); -typedef F10 = List Function(List x) - Function(); -typedef F11 = core.List Function(int x1, [Function x]) - Function(); -typedef F12 = core.List Function([core.List x1]) - Function(); -typedef F13 = List Function(int x, [int x1]) - Function(); -typedef F14 = List Function(int y, {List x}) - Function(); -typedef F15 = Function([int x]) Function(); -typedef F16 = Function(List x1) Function(); -typedef F17 = Function(int x, [List x1]) Function(); -typedef F18 = void Function(int x1, {Function x}) - Function(); -typedef F19 = void Function([List x]) Function(); -typedef F20 = Function Function(A x) Function(); -typedef F21 = List Function(List x) Function(); -typedef F22 = void Function(int x) Function(); - -Function f0([core.List x]) => null; -core.List f1(List x) => null; -f2(int y, {int x}) => null; -void f3(int y, {List x}) => null; -int Function(int x0, [int x1]) f4() => null; -int Function(int x0, {List x}) f5() => null; -Function Function(int x) f6() => null; -Function Function(int y, [List x]) f7() => null; -Function Function(int x0, [List x1]) f8() => null; -List Function({Function x}) f9() => null; -List Function(List x) f10() => null; -core.List Function(int x0, [Function x]) f11() => - null; -core.List Function([core.List x0]) - f12() => null; -List Function(int x, [int x0]) f13() => null; -List Function(int y, {List x}) f14() => null; -Function([int x]) f15() => null; -Function(List x0) f16() => null; -Function(int x, [List x0]) f17() => null; -void Function(int x0, {Function x}) f18() => null; -void Function([List x]) f19() => null; -Function Function(A x) f20() => null; -List Function(List x) f21() => null; -void Function(int x) f22() => null; - -class U90 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function([core.List x]) x0; - core.List Function(List x) x1; - Function(int y, {int x}) x2; - void Function(int y, {List x}) x3; - int Function(int x2, [int x3]) Function() x4; - int Function(int x1, {List x}) Function() x5; - Function Function(int x) Function() x6; - Function Function(int y, [List x]) Function() - x7; - Function Function(int x2, [List x3]) Function() x8; - List Function({Function x}) Function() x9; - List Function(List x) Function() x10; - core.List Function(int x1, [Function x]) - Function() x11; - core.List Function([core.List x1]) - Function() x12; - List Function(int x, [int x1]) Function() x13; - List Function(int y, {List x}) Function() - x14; - Function([int x]) Function() x15; - Function(List x1) Function() x16; - Function(int x, [List x1]) Function() x17; - void Function(int x1, {Function x}) Function() x18; - void Function([List x]) Function() x19; - Function Function(A x) Function() x20; - List Function(List x) Function() x21; - void Function(int x) Function() x22; - - U90({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0([core.List x]) => null; - core.List m1(List x) => null; - m2(int y, {int x}) => null; - void m3(int y, {List x}) => null; - int Function(int x0, [int x1]) m4() => null; - int Function(int x0, {List x}) m5() => null; - Function Function(int x) m6() => null; - Function Function(int y, [List x]) m7() => null; - Function Function(int x0, [List x1]) m8() => null; - List Function({Function x}) m9() => null; - List Function(List x) m10() => null; - core.List Function(int x0, [Function x]) - m11() => null; - core.List Function([core.List x0]) - m12() => null; - List Function(int x, [int x0]) m13() => null; - List Function(int y, {List x}) m14() => null; - Function([int x]) m15() => null; - Function(List x0) m16() => null; - Function(int x, [List x0]) m17() => null; - void Function(int x0, {Function x}) m18() => null; - void Function([List x]) m19() => null; - Function Function(A x) m20() => null; - List Function(List x) m21() => null; - void Function(int x) m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function([core.List x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function([core.List x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function([core.List x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function(List x) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function(List x) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function(List x)); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// Function(int y, {int x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - Function(int y, {int x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is Function(int y, {int x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// void Function(int y, {List x}) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function(int y, {List x}) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function(int y, {List x})); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - // The static function has its T always set to int. - Expect.isTrue(f3 is F3); - Expect.isFalse(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - Expect.isFalse(confuse(f3) is F3); - if (tIsBool) { - Expect.throws(() { - x3 = (f3 as dynamic); - }); - Expect.throws(() { - x3 = confuse(f3); - }); - Expect.throws(() { - l3 = (f3 as dynamic); - }); - Expect.throws(() { - l3 = confuse(f3); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m3 is F3); - Expect.equals(true, m3 is F3); - Expect.equals(true, confuse(m3) is F3); - Expect.equals(true, confuse(m3) is F3); - } - } - - /// int Function(int x2, [int x3]) Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int x2, [int x3]) Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue( - m4 is int Function(int x2, [int x3]) Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x1, {List x}) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x1, {List x}) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x1, {List x}) - Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// Function Function(int x) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - Function Function(int x) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is Function Function(int x) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int y, [List x]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int y, [List x]) Function() - l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int y, [List x]) - Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x2, [List x3]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x2, [List x3]) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x2, [List x3]) - Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function({Function x}) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function({Function x}) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function({Function x}) - Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(List x) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(List x) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(List x) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - // The static function has its T always set to int. - Expect.isTrue(f10 is F10); - Expect.isFalse(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - Expect.isFalse(confuse(f10) is F10); - if (tIsBool) { - Expect.throws(() { - x10 = (f10 as dynamic); - }); - Expect.throws(() { - x10 = confuse(f10); - }); - Expect.throws(() { - l10 = (f10 as dynamic); - }); - Expect.throws(() { - l10 = confuse(f10); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m10 is F10); - Expect.equals(tIsBool, m10 is F10); - Expect.equals(tIsInt, confuse(m10) is F10); - Expect.equals(tIsBool, confuse(m10) is F10); - } - } - - /// core.List Function(int x1, [Function x]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x1, [Function x]) - Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int x1, [Function x]) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function([core.List x1]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function([core.List x1]) - Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function([core.List x1]) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x, [int x1]) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x, [int x1]) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function(int x, [int x1]) - Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int y, {List x}) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int y, {List x}) Function() - l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int y, {List x}) - Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// Function([int x]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - Function([int x]) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is Function([int x]) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - } - - /// Function(List x1) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(List x1) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function(List x1) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x, [List x1]) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x, [List x1]) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue( - m17 is Function(int x, [List x1]) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int x1, {Function x}) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x1, {Function x}) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x1, {Function x}) - Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function([List x]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function([List x]) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function([List x]) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - // The static function has its T always set to int. - Expect.isTrue(f19 is F19); - Expect.isFalse(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - Expect.isFalse(confuse(f19) is F19); - if (tIsBool) { - Expect.throws(() { - x19 = (f19 as dynamic); - }); - Expect.throws(() { - x19 = confuse(f19); - }); - Expect.throws(() { - l19 = (f19 as dynamic); - }); - Expect.throws(() { - l19 = confuse(f19); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m19 is F19); - Expect.equals(tIsBool, m19 is F19); - Expect.equals(tIsInt, confuse(m19) is F19); - Expect.equals(tIsBool, confuse(m19) is F19); - } - } - - /// Function Function(A x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(A x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is Function Function(A x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(List x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is List Function(List x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// void Function(int x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - void Function(int x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is void Function(int x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U90().runTests(); - new U90(tIsInt: true).runTests(); - new U90(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type91_test.dart b/tests/language_2/function_type/function_type91_test.dart deleted file mode 100644 index 784144ec94f..00000000000 --- a/tests/language_2/function_type/function_type91_test.dart +++ /dev/null @@ -1,943 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int x0, [core.List x]); -typedef F1 = core.List Function([List x]); -typedef F2 = Function(Function x); -typedef F3 = void Function(); -typedef F4 = int Function(int x2, [int x3]) Function( - int x); -typedef F5 = int Function(int x1, {List x}) - Function(int x); -typedef F6 = Function Function(int x) Function(int x); -typedef F7 = Function Function(int y, [List x]) - Function(int x); -typedef F8 = Function Function(int x2, [List x3]) - Function(int x); -typedef F9 = List Function({Function x}) - Function(int x); -typedef F10 = List Function(List x) - Function(int x); -typedef F11 = core.List Function(int x1, [Function x]) - Function(int x); -typedef F12 = core.List Function([core.List x1]) - Function(int x); -typedef F13 = List Function(int x, [int x1]) Function( - int x); -typedef F14 = List Function(int y, {List x}) - Function(int x); -typedef F15 = Function([int x]) Function(int x); -typedef F16 = Function(List x1) Function( - int x); -typedef F17 = Function(int x, [List x1]) Function( - int x); -typedef F18 = void Function(int x1, {Function x}) - Function(int x); -typedef F19 = void Function([List x]) Function(int x); -typedef F20 = Function Function(A x) Function(int x); -typedef F21 = List Function(List x) Function( - int x); -typedef F22 = void Function(int x) Function(int x); - -Function f0(int x0, [core.List x]) => null; -core.List f1([List x]) => null; -f2(Function x) => null; -void f3() => null; -int Function(int x0, [int x1]) f4(int x) => null; -int Function(int x0, {List x}) f5(int x) => null; -Function Function(int x) f6(int x) => null; -Function Function(int y, [List x]) f7(int x) => - null; -Function Function(int x0, [List x1]) f8(int x) => null; -List Function({Function x}) f9(int x) => null; -List Function(List x) f10(int x) => null; -core.List Function(int x0, [Function x]) f11( - int x) => - null; -core.List Function([core.List x0]) f12( - int x) => - null; -List Function(int x, [int x0]) f13(int x) => null; -List Function(int y, {List x}) f14(int x) => - null; -Function([int x]) f15(int x) => null; -Function(List x0) f16(int x) => null; -Function(int x, [List x0]) f17(int x) => null; -void Function(int x0, {Function x}) f18(int x) => null; -void Function([List x]) f19(int x) => null; -Function Function(A x) f20(int x) => null; -List Function(List x) f21(int x) => null; -void Function(int x) f22(int x) => null; - -class U91 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int x0, [core.List x]) x0; - core.List Function([List x]) x1; - Function(Function x) x2; - void Function() x3; - int Function(int x2, [int x3]) Function(int x) x4; - int Function(int x1, {List x}) Function(int x) - x5; - Function Function(int x) Function(int x) x6; - Function Function(int y, [List x]) Function( - int x) x7; - Function Function(int x2, [List x3]) Function(int x) - x8; - List Function({Function x}) Function(int x) x9; - List Function(List x) Function(int x) x10; - core.List Function(int x1, [Function x]) - Function(int x) x11; - core.List Function([core.List x1]) - Function(int x) x12; - List Function(int x, [int x1]) Function(int x) x13; - List Function(int y, {List x}) Function( - int x) x14; - Function([int x]) Function(int x) x15; - Function(List x1) Function(int x) x16; - Function(int x, [List x1]) Function(int x) x17; - void Function(int x1, {Function x}) Function(int x) x18; - void Function([List x]) Function(int x) x19; - Function Function(A x) Function(int x) x20; - List Function(List x) Function(int x) x21; - void Function(int x) Function(int x) x22; - - U91({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int x0, [core.List x]) => null; - core.List m1([List x]) => null; - m2(Function x) => null; - void m3() => null; - int Function(int x0, [int x1]) m4(int x) => null; - int Function(int x0, {List x}) m5(int x) => - null; - Function Function(int x) m6(int x) => null; - Function Function(int y, [List x]) m7(int x) => - null; - Function Function(int x0, [List x1]) m8(int x) => null; - List Function({Function x}) m9(int x) => null; - List Function(List x) m10(int x) => null; - core.List Function(int x0, [Function x]) m11( - int x) => - null; - core.List Function([core.List x0]) - m12(int x) => null; - List Function(int x, [int x0]) m13(int x) => null; - List Function(int y, {List x}) m14(int x) => - null; - Function([int x]) m15(int x) => null; - Function(List x0) m16(int x) => null; - Function(int x, [List x0]) m17(int x) => null; - void Function(int x0, {Function x}) m18(int x) => null; - void Function([List x]) m19(int x) => null; - Function Function(A x) m20(int x) => null; - List Function(List x) m21(int x) => null; - void Function(int x) m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int x0, [core.List x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int x0, [core.List x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int x0, [core.List x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function([List x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function([List x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function([List x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// Function(Function x) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - Function(Function x) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is Function(Function x)); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// void Function() - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - void Function() l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is void Function()); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function(int x2, [int x3]) Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int x2, [int x3]) Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function(int x2, [int x3]) - Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int x1, {List x}) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int x1, {List x}) Function(int x) - l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int x1, {List x}) - Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// Function Function(int x) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - Function Function(int x) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is Function Function(int x) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(int y, [List x]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(int y, [List x]) Function( - int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(int y, [List x]) - Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x2, [List x3]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x2, [List x3]) Function(int x) - l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x2, [List x3]) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function({Function x}) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function({Function x}) Function(int x) - l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function({Function x}) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(List x) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(List x) Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(List x) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - // The static function has its T always set to int. - Expect.isTrue(f10 is F10); - Expect.isFalse(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - Expect.isFalse(confuse(f10) is F10); - if (tIsBool) { - Expect.throws(() { - x10 = (f10 as dynamic); - }); - Expect.throws(() { - x10 = confuse(f10); - }); - Expect.throws(() { - l10 = (f10 as dynamic); - }); - Expect.throws(() { - l10 = confuse(f10); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m10 is F10); - Expect.equals(tIsBool, m10 is F10); - Expect.equals(tIsInt, confuse(m10) is F10); - Expect.equals(tIsBool, confuse(m10) is F10); - } - } - - /// core.List Function(int x1, [Function x]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int x1, [Function x]) - Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int x1, [Function x]) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function([core.List x1]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function([core.List x1]) - Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function([core.List x1]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x, [int x1]) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x, [int x1]) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function(int x, [int x1]) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(int y, {List x}) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(int y, {List x}) Function( - int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(int y, {List x}) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// Function([int x]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - Function([int x]) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is Function([int x]) Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - } - - /// Function(List x1) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(List x1) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function(List x1) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x, [List x1]) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x, [List x1]) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x, [List x1]) - Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int x1, {Function x}) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x1, {Function x}) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x1, {Function x}) - Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function([List x]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function([List x]) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function([List x]) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - // The static function has its T always set to int. - Expect.isTrue(f19 is F19); - Expect.isFalse(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - Expect.isFalse(confuse(f19) is F19); - if (tIsBool) { - Expect.throws(() { - x19 = (f19 as dynamic); - }); - Expect.throws(() { - x19 = confuse(f19); - }); - Expect.throws(() { - l19 = (f19 as dynamic); - }); - Expect.throws(() { - l19 = confuse(f19); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m19 is F19); - Expect.equals(tIsBool, m19 is F19); - Expect.equals(tIsInt, confuse(m19) is F19); - Expect.equals(tIsBool, confuse(m19) is F19); - } - } - - /// Function Function(A x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(A x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is Function Function(A x) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// List Function(List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(List x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(List x) - Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - // The static function has its T always set to int. - Expect.isTrue(f21 is F21); - Expect.isFalse(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - Expect.isFalse(confuse(f21) is F21); - if (tIsBool) { - Expect.throws(() { - x21 = (f21 as dynamic); - }); - Expect.throws(() { - x21 = confuse(f21); - }); - Expect.throws(() { - l21 = (f21 as dynamic); - }); - Expect.throws(() { - l21 = confuse(f21); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m21 is F21); - Expect.equals(tIsBool, m21 is F21); - Expect.equals(tIsInt, confuse(m21) is F21); - Expect.equals(tIsBool, confuse(m21) is F21); - } - } - - /// void Function(int x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - void Function(int x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is void Function(int x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U91().runTests(); - new U91(tIsInt: true).runTests(); - new U91(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type92_test.dart b/tests/language_2/function_type/function_type92_test.dart deleted file mode 100644 index 823ee3e1bba..00000000000 --- a/tests/language_2/function_type/function_type92_test.dart +++ /dev/null @@ -1,868 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int y, [core.List x]); -typedef F1 = core.List Function(int x0, [List x]); -typedef F2 = Function([Function x]); -typedef F3 = int Function(int x); -typedef F4 = int Function(int x, [int x2]) Function(); -typedef F5 = int Function(int y, {List x}) Function(); -typedef F6 = Function Function([int x]) Function(); -typedef F7 = Function Function(List x0) Function(); -typedef F8 = Function Function(int x, [List x2]) Function(); -typedef F9 = List Function(int x0, {Function x}) Function(); -typedef F10 = List Function([List x]) Function(); -typedef F11 = core.List Function(int y, [Function x]) Function(); -typedef F12 = core.List Function(int x1, [core.List x2]) - Function(); -typedef F13 = List Function({int x}) Function(); -typedef F14 = List Function(core.List x) Function(); -typedef F15 = Function(int x0, [int x]) Function(); -typedef F16 = Function([List x1]) Function(); -typedef F17 = Function({List x}) Function(); -typedef F18 = void Function(int y, {Function x}) Function(); -typedef F19 = void Function(int x0, [List x]) Function(); -typedef F20 = Function Function(List x) Function(); -typedef F21 = Function(int x) Function(); -typedef F22 = void Function(Function x) Function(); - -Function f0(int y, [core.List x]) => null; -core.List f1(int x0, [List x]) => null; -f2([Function x]) => null; -int f3(int x) => null; -int Function(int x, [int x0]) f4() => null; -int Function(int y, {List x}) f5() => null; -Function Function([int x]) f6() => null; -Function Function(List x0) f7() => null; -Function Function(int x, [List x0]) f8() => null; -List Function(int x0, {Function x}) f9() => null; -List Function([List x]) f10() => null; -core.List Function(int y, [Function x]) f11() => null; -core.List Function(int x0, [core.List x1]) f12() => null; -List Function({int x}) f13() => null; -List Function(core.List x) f14() => null; -Function(int x0, [int x]) f15() => null; -Function([List x0]) f16() => null; -Function({List x}) f17() => null; -void Function(int y, {Function x}) f18() => null; -void Function(int x0, [List x]) f19() => null; -Function Function(List x) f20() => null; -Function(int x) f21() => null; -void Function(Function x) f22() => null; - -class U92 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int y, [core.List x]) x0; - core.List Function(int x0, [List x]) x1; - Function([Function x]) x2; - int Function(int x) x3; - int Function(int x, [int x2]) Function() x4; - int Function(int y, {List x}) Function() x5; - Function Function([int x]) Function() x6; - Function Function(List x0) Function() x7; - Function Function(int x, [List x2]) Function() x8; - List Function(int x0, {Function x}) Function() x9; - List Function([List x]) Function() x10; - core.List Function(int y, [Function x]) Function() x11; - core.List Function(int x1, [core.List x2]) Function() x12; - List Function({int x}) Function() x13; - List Function(core.List x) Function() x14; - Function(int x0, [int x]) Function() x15; - Function([List x1]) Function() x16; - Function({List x}) Function() x17; - void Function(int y, {Function x}) Function() x18; - void Function(int x0, [List x]) Function() x19; - Function Function(List x) Function() x20; - Function(int x) Function() x21; - void Function(Function x) Function() x22; - - U92({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int y, [core.List x]) => null; - core.List m1(int x0, [List x]) => null; - m2([Function x]) => null; - int m3(int x) => null; - int Function(int x, [int x0]) m4() => null; - int Function(int y, {List x}) m5() => null; - Function Function([int x]) m6() => null; - Function Function(List x0) m7() => null; - Function Function(int x, [List x0]) m8() => null; - List Function(int x0, {Function x}) m9() => null; - List Function([List x]) m10() => null; - core.List Function(int y, [Function x]) m11() => null; - core.List Function(int x0, [core.List x1]) m12() => null; - List Function({int x}) m13() => null; - List Function(core.List x) m14() => null; - Function(int x0, [int x]) m15() => null; - Function([List x0]) m16() => null; - Function({List x}) m17() => null; - void Function(int y, {Function x}) m18() => null; - void Function(int x0, [List x]) m19() => null; - Function Function(List x) m20() => null; - Function(int x) m21() => null; - void Function(Function x) m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int y, [core.List x]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int y, [core.List x]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int y, [core.List x])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function(int x0, [List x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function(int x0, [List x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue( - m1 is core.List Function(int x0, [List x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// Function([Function x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - Function([Function x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is Function([Function x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// int Function(int x) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - int Function(int x) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is int Function(int x)); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function(int x, [int x2]) Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int x, [int x2]) Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function(int x, [int x2]) Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int y, {List x}) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int y, {List x}) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int y, {List x}) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// Function Function([int x]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - Function Function([int x]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is Function Function([int x]) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(List x0) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(List x0) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(List x0) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x, [List x2]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x, [List x2]) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x, [List x2]) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int x0, {Function x}) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x0, {Function x}) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is List Function(int x0, {Function x}) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function([List x]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function([List x]) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function([List x]) Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - // The static function has its T always set to int. - Expect.isTrue(f10 is F10); - Expect.isFalse(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - Expect.isFalse(confuse(f10) is F10); - if (tIsBool) { - Expect.throws(() { - x10 = (f10 as dynamic); - }); - Expect.throws(() { - x10 = confuse(f10); - }); - Expect.throws(() { - l10 = (f10 as dynamic); - }); - Expect.throws(() { - l10 = confuse(f10); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m10 is F10); - Expect.equals(tIsBool, m10 is F10); - Expect.equals(tIsInt, confuse(m10) is F10); - Expect.equals(tIsBool, confuse(m10) is F10); - } - } - - /// core.List Function(int y, [Function x]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int y, [Function x]) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is core.List Function(int y, [Function x]) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x1, [core.List x2]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x1, [core.List x2]) Function() - l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x1, - [core.List x2]) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function({int x}) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function({int x}) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function({int x}) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(core.List x) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(core.List x) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(core.List x) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// Function(int x0, [int x]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - Function(int x0, [int x]) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is Function(int x0, [int x]) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - } - - /// Function([List x1]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function([List x1]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function([List x1]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function({List x}) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function({List x}) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function({List x}) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int y, {Function x}) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int y, {Function x}) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int y, {Function x}) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x0, [List x]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x0, [List x]) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x0, [List x]) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - // The static function has its T always set to int. - Expect.isTrue(f19 is F19); - Expect.isFalse(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - Expect.isFalse(confuse(f19) is F19); - if (tIsBool) { - Expect.throws(() { - x19 = (f19 as dynamic); - }); - Expect.throws(() { - x19 = confuse(f19); - }); - Expect.throws(() { - l19 = (f19 as dynamic); - }); - Expect.throws(() { - l19 = confuse(f19); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m19 is F19); - Expect.equals(tIsBool, m19 is F19); - Expect.equals(tIsInt, confuse(m19) is F19); - Expect.equals(tIsBool, confuse(m19) is F19); - } - } - - /// Function Function(List x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(List x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is Function Function(List x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// Function(int x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - Function(int x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is Function(int x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// void Function(Function x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - void Function(Function x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is void Function(Function x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U92().runTests(); - new U92(tIsInt: true).runTests(); - new U92(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type93_test.dart b/tests/language_2/function_type/function_type93_test.dart deleted file mode 100644 index 93913ce2937..00000000000 --- a/tests/language_2/function_type/function_type93_test.dart +++ /dev/null @@ -1,874 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(core.List x0); -typedef F1 = core.List Function(int y, [List x]); -typedef F2 = Function(int x0, [Function x]); -typedef F3 = int Function(Function x); -typedef F4 = int Function(int x, [int x1]) Function(int x); -typedef F5 = int Function(int y, {List x}) Function(int x); -typedef F6 = Function Function([int x]) Function(int x); -typedef F7 = Function Function(List x1) Function(int x); -typedef F8 = Function Function(int x, [List x1]) Function(int x); -typedef F9 = List Function(int x1, {Function x}) Function(int x); -typedef F10 = List Function([List x]) Function(int x); -typedef F11 = core.List Function(int y, [Function x]) Function( - int x); -typedef F12 = core.List Function(int x2, [core.List x3]) - Function(int x); -typedef F13 = List Function({int x}) Function(int x); -typedef F14 = List Function(core.List x) Function(int x); -typedef F15 = Function(int x1, [int x]) Function(int x); -typedef F16 = Function([List x1]) Function(int x); -typedef F17 = Function({List x}) Function(int x); -typedef F18 = void Function(int y, {Function x}) Function(int x); -typedef F19 = void Function(int x1, [List x]) Function(int x); -typedef F20 = Function Function(List x) Function(int x); -typedef F21 = Function(int x) Function(int x); -typedef F22 = void Function(Function x) Function(int x); - -Function f0(core.List x0) => null; -core.List f1(int y, [List x]) => null; -f2(int x0, [Function x]) => null; -int f3(Function x) => null; -int Function(int x, [int x0]) f4(int x) => null; -int Function(int y, {List x}) f5(int x) => null; -Function Function([int x]) f6(int x) => null; -Function Function(List x0) f7(int x) => null; -Function Function(int x, [List x0]) f8(int x) => null; -List Function(int x0, {Function x}) f9(int x) => null; -List Function([List x]) f10(int x) => null; -core.List Function(int y, [Function x]) f11(int x) => null; -core.List Function(int x0, [core.List x1]) f12(int x) => - null; -List Function({int x}) f13(int x) => null; -List Function(core.List x) f14(int x) => null; -Function(int x0, [int x]) f15(int x) => null; -Function([List x0]) f16(int x) => null; -Function({List x}) f17(int x) => null; -void Function(int y, {Function x}) f18(int x) => null; -void Function(int x0, [List x]) f19(int x) => null; -Function Function(List x) f20(int x) => null; -Function(int x) f21(int x) => null; -void Function(Function x) f22(int x) => null; - -class U93 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(core.List x0) x0; - core.List Function(int y, [List x]) x1; - Function(int x0, [Function x]) x2; - int Function(Function x) x3; - int Function(int x, [int x1]) Function(int x) x4; - int Function(int y, {List x}) Function(int x) x5; - Function Function([int x]) Function(int x) x6; - Function Function(List x1) Function(int x) x7; - Function Function(int x, [List x1]) Function(int x) x8; - List Function(int x1, {Function x}) Function(int x) x9; - List Function([List x]) Function(int x) x10; - core.List Function(int y, [Function x]) Function(int x) x11; - core.List Function(int x2, [core.List x3]) Function(int x) - x12; - List Function({int x}) Function(int x) x13; - List Function(core.List x) Function(int x) x14; - Function(int x1, [int x]) Function(int x) x15; - Function([List x1]) Function(int x) x16; - Function({List x}) Function(int x) x17; - void Function(int y, {Function x}) Function(int x) x18; - void Function(int x1, [List x]) Function(int x) x19; - Function Function(List x) Function(int x) x20; - Function(int x) Function(int x) x21; - void Function(Function x) Function(int x) x22; - - U93({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(core.List x0) => null; - core.List m1(int y, [List x]) => null; - m2(int x0, [Function x]) => null; - int m3(Function x) => null; - int Function(int x, [int x0]) m4(int x) => null; - int Function(int y, {List x}) m5(int x) => null; - Function Function([int x]) m6(int x) => null; - Function Function(List x0) m7(int x) => null; - Function Function(int x, [List x0]) m8(int x) => null; - List Function(int x0, {Function x}) m9(int x) => null; - List Function([List x]) m10(int x) => null; - core.List Function(int y, [Function x]) m11(int x) => null; - core.List Function(int x0, [core.List x1]) m12(int x) => - null; - List Function({int x}) m13(int x) => null; - List Function(core.List x) m14(int x) => null; - Function(int x0, [int x]) m15(int x) => null; - Function([List x0]) m16(int x) => null; - Function({List x}) m17(int x) => null; - void Function(int y, {Function x}) m18(int x) => null; - void Function(int x0, [List x]) m19(int x) => null; - Function Function(List x) m20(int x) => null; - Function(int x) m21(int x) => null; - void Function(Function x) m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(core.List x0) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(core.List x0) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(core.List x0)); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function(int y, [List x]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function(int y, [List x]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue( - m1 is core.List Function(int y, [List x])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// Function(int x0, [Function x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - Function(int x0, [Function x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is Function(int x0, [Function x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// int Function(Function x) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - int Function(Function x) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is int Function(Function x)); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function(int x, [int x1]) Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int x, [int x1]) Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function(int x, [int x1]) Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int y, {List x}) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int y, {List x}) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue( - m5 is int Function(int y, {List x}) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// Function Function([int x]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - Function Function([int x]) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is Function Function([int x]) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(List x1) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(List x1) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(List x1) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x, [List x1]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x, [List x1]) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x, [List x1]) Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int x1, {Function x}) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x1, {Function x}) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is List Function(int x1, {Function x}) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function([List x]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function([List x]) Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function([List x]) Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - // The static function has its T always set to int. - Expect.isTrue(f10 is F10); - Expect.isFalse(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - Expect.isFalse(confuse(f10) is F10); - if (tIsBool) { - Expect.throws(() { - x10 = (f10 as dynamic); - }); - Expect.throws(() { - x10 = confuse(f10); - }); - Expect.throws(() { - l10 = (f10 as dynamic); - }); - Expect.throws(() { - l10 = confuse(f10); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m10 is F10); - Expect.equals(tIsBool, m10 is F10); - Expect.equals(tIsInt, confuse(m10) is F10); - Expect.equals(tIsBool, confuse(m10) is F10); - } - } - - /// core.List Function(int y, [Function x]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int y, [Function x]) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int y, [Function x]) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x2, [core.List x3]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x2, [core.List x3]) Function( - int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x2, - [core.List x3]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function({int x}) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function({int x}) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function({int x}) Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(core.List x) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(core.List x) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function(core.List x) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// Function(int x1, [int x]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - Function(int x1, [int x]) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is Function(int x1, [int x]) Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - } - - /// Function([List x1]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function([List x1]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function([List x1]) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function({List x}) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function({List x}) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function({List x}) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int y, {Function x}) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int y, {Function x}) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int y, {Function x}) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x1, [List x]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x1, [List x]) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x1, [List x]) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - // The static function has its T always set to int. - Expect.isTrue(f19 is F19); - Expect.isFalse(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - Expect.isFalse(confuse(f19) is F19); - if (tIsBool) { - Expect.throws(() { - x19 = (f19 as dynamic); - }); - Expect.throws(() { - x19 = confuse(f19); - }); - Expect.throws(() { - l19 = (f19 as dynamic); - }); - Expect.throws(() { - l19 = confuse(f19); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m19 is F19); - Expect.equals(tIsBool, m19 is F19); - Expect.equals(tIsInt, confuse(m19) is F19); - Expect.equals(tIsBool, confuse(m19) is F19); - } - } - - /// Function Function(List x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(List x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is Function Function(List x) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// Function(int x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - Function(int x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is Function(int x) Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// void Function(Function x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - void Function(Function x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is void Function(Function x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U93().runTests(); - new U93(tIsInt: true).runTests(); - new U93(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type94_test.dart b/tests/language_2/function_type/function_type94_test.dart deleted file mode 100644 index d8c9432c5bd..00000000000 --- a/tests/language_2/function_type/function_type94_test.dart +++ /dev/null @@ -1,900 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function([core.List x1]); -typedef F1 = core.List Function(List x0); -typedef F2 = Function(int y, [Function x]); -typedef F3 = int Function(List x); -typedef F4 = int Function(int x, [int x1]) Function(); -typedef F5 = int Function(int y, {List x}) - Function(); -typedef F6 = Function Function([int x]) Function(); -typedef F7 = Function Function(List x1) - Function(); -typedef F8 = Function Function(int x, [List x1]) - Function(); -typedef F9 = List Function(int x1, {Function x}) - Function(); -typedef F10 = List Function([List x]) - Function(); -typedef F11 = core.List Function(int y, [Function x]) - Function(); -typedef F12 = core.List Function(int x2, [core.List x3]) - Function(); -typedef F13 = List Function({int x}) Function(); -typedef F14 = List Function(core.List x) - Function(); -typedef F15 = Function(int x1, [int x]) Function(); -typedef F16 = Function([List x1]) Function(); -typedef F17 = Function({List x}) Function(); -typedef F18 = void Function(int y, {Function x}) - Function(); -typedef F19 = void Function(int x1, [List x]) - Function(); -typedef F20 = Function Function(List x) Function(); -typedef F21 = Function(int x) Function(); -typedef F22 = void Function(Function x) Function(); - -Function f0([core.List x0]) => null; -core.List f1(List x0) => null; -f2(int y, [Function x]) => null; -int f3(List x) => null; -int Function(int x, [int x0]) f4() => null; -int Function(int y, {List x}) f5() => null; -Function Function([int x]) f6() => null; -Function Function(List x0) f7() => null; -Function Function(int x, [List x0]) f8() => null; -List Function(int x0, {Function x}) f9() => null; -List Function([List x]) f10() => null; -core.List Function(int y, [Function x]) f11() => - null; -core.List Function(int x0, [core.List x1]) - f12() => null; -List Function({int x}) f13() => null; -List Function(core.List x) f14() => null; -Function(int x0, [int x]) f15() => null; -Function([List x0]) f16() => null; -Function({List x}) f17() => null; -void Function(int y, {Function x}) f18() => null; -void Function(int x0, [List x]) f19() => null; -Function Function(List x) f20() => null; -Function(int x) f21() => null; -void Function(Function x) f22() => null; - -class U94 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function([core.List x1]) x0; - core.List Function(List x0) x1; - Function(int y, [Function x]) x2; - int Function(List x) x3; - int Function(int x, [int x1]) Function() x4; - int Function(int y, {List x}) Function() x5; - Function Function([int x]) Function() x6; - Function Function(List x1) Function() x7; - Function Function(int x, [List x1]) Function() x8; - List Function(int x1, {Function x}) Function() - x9; - List Function([List x]) Function() x10; - core.List Function(int y, [Function x]) - Function() x11; - core.List Function(int x2, [core.List x3]) - Function() x12; - List Function({int x}) Function() x13; - List Function(core.List x) Function() x14; - Function(int x1, [int x]) Function() x15; - Function([List x1]) Function() x16; - Function({List x}) Function() x17; - void Function(int y, {Function x}) Function() x18; - void Function(int x1, [List x]) Function() x19; - Function Function(List x) Function() x20; - Function(int x) Function() x21; - void Function(Function x) Function() x22; - - U94({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0([core.List x0]) => null; - core.List m1(List x0) => null; - m2(int y, [Function x]) => null; - int m3(List x) => null; - int Function(int x, [int x0]) m4() => null; - int Function(int y, {List x}) m5() => null; - Function Function([int x]) m6() => null; - Function Function(List x0) m7() => null; - Function Function(int x, [List x0]) m8() => null; - List Function(int x0, {Function x}) m9() => - null; - List Function([List x]) m10() => null; - core.List Function(int y, [Function x]) m11() => - null; - core.List Function(int x0, [core.List x1]) - m12() => null; - List Function({int x}) m13() => null; - List Function(core.List x) m14() => null; - Function(int x0, [int x]) m15() => null; - Function([List x0]) m16() => null; - Function({List x}) m17() => null; - void Function(int y, {Function x}) m18() => null; - void Function(int x0, [List x]) m19() => null; - Function Function(List x) m20() => null; - Function(int x) m21() => null; - void Function(Function x) m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function([core.List x1]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function([core.List x1]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function([core.List x1])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function(List x0) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function(List x0) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function(List x0)); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// Function(int y, [Function x]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - Function(int y, [Function x]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is Function(int y, [Function x])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// int Function(List x) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - int Function(List x) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is int Function(List x)); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function(int x, [int x1]) Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int x, [int x1]) Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue( - m4 is int Function(int x, [int x1]) Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int y, {List x}) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int y, {List x}) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int y, {List x}) - Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// Function Function([int x]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - Function Function([int x]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is Function Function([int x]) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(List x1) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(List x1) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(List x1) - Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x, [List x1]) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x, [List x1]) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x, [List x1]) - Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int x1, {Function x}) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x1, {Function x}) Function() - l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x1, {Function x}) - Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function([List x]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function([List x]) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function([List x]) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - // The static function has its T always set to int. - Expect.isTrue(f10 is F10); - Expect.isFalse(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - Expect.isFalse(confuse(f10) is F10); - if (tIsBool) { - Expect.throws(() { - x10 = (f10 as dynamic); - }); - Expect.throws(() { - x10 = confuse(f10); - }); - Expect.throws(() { - l10 = (f10 as dynamic); - }); - Expect.throws(() { - l10 = confuse(f10); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m10 is F10); - Expect.equals(tIsBool, m10 is F10); - Expect.equals(tIsInt, confuse(m10) is F10); - Expect.equals(tIsBool, confuse(m10) is F10); - } - } - - /// core.List Function(int y, [Function x]) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int y, [Function x]) - Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int y, [Function x]) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x2, [core.List x3]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x2, [core.List x3]) - Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x2, - [core.List x3]) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function({int x}) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function({int x}) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue( - m13 is List Function({int x}) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(core.List x) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(core.List x) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(core.List x) - Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// Function(int x1, [int x]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - Function(int x1, [int x]) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue( - m15 is Function(int x1, [int x]) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - } - - /// Function([List x1]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function([List x1]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue( - m16 is Function([List x1]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function({List x}) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function({List x}) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function({List x}) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int y, {Function x}) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int y, {Function x}) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int y, {Function x}) - Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x1, [List x]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x1, [List x]) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x1, [List x]) - Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - // The static function has its T always set to int. - Expect.isTrue(f19 is F19); - Expect.isFalse(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - Expect.isFalse(confuse(f19) is F19); - if (tIsBool) { - Expect.throws(() { - x19 = (f19 as dynamic); - }); - Expect.throws(() { - x19 = confuse(f19); - }); - Expect.throws(() { - l19 = (f19 as dynamic); - }); - Expect.throws(() { - l19 = confuse(f19); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m19 is F19); - Expect.equals(tIsBool, m19 is F19); - Expect.equals(tIsInt, confuse(m19) is F19); - Expect.equals(tIsBool, confuse(m19) is F19); - } - } - - /// Function Function(List x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(List x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue( - m20 is Function Function(List x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// Function(int x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - Function(int x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is Function(int x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// void Function(Function x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - void Function(Function x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue( - m22 is void Function(Function x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U94().runTests(); - new U94(tIsInt: true).runTests(); - new U94(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type95_test.dart b/tests/language_2/function_type/function_type95_test.dart deleted file mode 100644 index a4902c6f6e6..00000000000 --- a/tests/language_2/function_type/function_type95_test.dart +++ /dev/null @@ -1,917 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int x1, [core.List x2]); -typedef F1 = core.List Function([List x1]); -typedef F2 = Function(Function x0); -typedef F3 = int Function(core.List x); -typedef F4 = int Function(int x, [int x1]) Function( - int x); -typedef F5 = int Function(int y, {List x}) - Function(int x); -typedef F6 = Function Function([int x]) Function(int x); -typedef F7 = Function Function(List x1) - Function(int x); -typedef F8 = Function Function(int x, [List x1]) - Function(int x); -typedef F9 = List Function(int x1, {Function x}) - Function(int x); -typedef F10 = List Function([List x]) - Function(int x); -typedef F11 = core.List Function(int y, [Function x]) - Function(int x); -typedef F12 = core.List Function(int x2, [core.List x3]) - Function(int x); -typedef F13 = List Function({int x}) Function(int x); -typedef F14 = List Function(core.List x) - Function(int x); -typedef F15 = Function(int x1, [int x]) Function(int x); -typedef F16 = Function([List x1]) Function( - int x); -typedef F17 = Function({List x}) Function(int x); -typedef F18 = void Function(int y, {Function x}) - Function(int x); -typedef F19 = void Function(int x1, [List x]) - Function(int x); -typedef F20 = Function Function(List x) Function( - int x); -typedef F21 = Function(int x) Function(int x); -typedef F22 = void Function(Function x) Function( - int x); - -Function f0(int x0, [core.List x1]) => null; -core.List f1([List x0]) => null; -f2(Function x0) => null; -int f3(core.List x) => null; -int Function(int x, [int x0]) f4(int x) => null; -int Function(int y, {List x}) f5(int x) => null; -Function Function([int x]) f6(int x) => null; -Function Function(List x0) f7(int x) => null; -Function Function(int x, [List x0]) f8(int x) => null; -List Function(int x0, {Function x}) f9(int x) => - null; -List Function([List x]) f10(int x) => null; -core.List Function(int y, [Function x]) f11( - int x) => - null; -core.List Function(int x0, [core.List x1]) - f12(int x) => null; -List Function({int x}) f13(int x) => null; -List Function(core.List x) f14(int x) => - null; -Function(int x0, [int x]) f15(int x) => null; -Function([List x0]) f16(int x) => null; -Function({List x}) f17(int x) => null; -void Function(int y, {Function x}) f18(int x) => null; -void Function(int x0, [List x]) f19(int x) => null; -Function Function(List x) f20(int x) => null; -Function(int x) f21(int x) => null; -void Function(Function x) f22(int x) => null; - -class U95 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int x1, [core.List x2]) x0; - core.List Function([List x1]) x1; - Function(Function x0) x2; - int Function(core.List x) x3; - int Function(int x, [int x1]) Function(int x) x4; - int Function(int y, {List x}) Function(int x) - x5; - Function Function([int x]) Function(int x) x6; - Function Function(List x1) Function(int x) x7; - Function Function(int x, [List x1]) Function(int x) x8; - List Function(int x1, {Function x}) Function( - int x) x9; - List Function([List x]) Function(int x) x10; - core.List Function(int y, [Function x]) - Function(int x) x11; - core.List Function(int x2, [core.List x3]) - Function(int x) x12; - List Function({int x}) Function(int x) x13; - List Function(core.List x) Function(int x) - x14; - Function(int x1, [int x]) Function(int x) x15; - Function([List x1]) Function(int x) x16; - Function({List x}) Function(int x) x17; - void Function(int y, {Function x}) Function(int x) x18; - void Function(int x1, [List x]) Function(int x) x19; - Function Function(List x) Function(int x) x20; - Function(int x) Function(int x) x21; - void Function(Function x) Function(int x) x22; - - U95({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int x0, [core.List x1]) => null; - core.List m1([List x0]) => null; - m2(Function x0) => null; - int m3(core.List x) => null; - int Function(int x, [int x0]) m4(int x) => null; - int Function(int y, {List x}) m5(int x) => null; - Function Function([int x]) m6(int x) => null; - Function Function(List x0) m7(int x) => null; - Function Function(int x, [List x0]) m8(int x) => null; - List Function(int x0, {Function x}) m9(int x) => - null; - List Function([List x]) m10(int x) => null; - core.List Function(int y, [Function x]) m11( - int x) => - null; - core.List Function(int x0, [core.List x1]) - m12(int x) => null; - List Function({int x}) m13(int x) => null; - List Function(core.List x) m14(int x) => - null; - Function(int x0, [int x]) m15(int x) => null; - Function([List x0]) m16(int x) => null; - Function({List x}) m17(int x) => null; - void Function(int y, {Function x}) m18(int x) => null; - void Function(int x0, [List x]) m19(int x) => null; - Function Function(List x) m20(int x) => null; - Function(int x) m21(int x) => null; - void Function(Function x) m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int x1, [core.List x2]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int x1, [core.List x2]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int x1, [core.List x2])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function([List x1]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function([List x1]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function([List x1])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// Function(Function x0) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - Function(Function x0) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is Function(Function x0)); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// int Function(core.List x) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - int Function(core.List x) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is int Function(core.List x)); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function(int x, [int x1]) Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function(int x, [int x1]) Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function(int x, [int x1]) - Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(int y, {List x}) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(int y, {List x}) Function(int x) - l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(int y, {List x}) - Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// Function Function([int x]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - Function Function([int x]) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is Function Function([int x]) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function(List x1) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function(List x1) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function(List x1) - Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function(int x, [List x1]) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function(int x, [List x1]) Function(int x) - l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function(int x, [List x1]) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int x1, {Function x}) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int x1, {Function x}) Function( - int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int x1, {Function x}) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function([List x]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function([List x]) Function(int x) - l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function([List x]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - // The static function has its T always set to int. - Expect.isTrue(f10 is F10); - Expect.isFalse(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - Expect.isFalse(confuse(f10) is F10); - if (tIsBool) { - Expect.throws(() { - x10 = (f10 as dynamic); - }); - Expect.throws(() { - x10 = confuse(f10); - }); - Expect.throws(() { - l10 = (f10 as dynamic); - }); - Expect.throws(() { - l10 = confuse(f10); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m10 is F10); - Expect.equals(tIsBool, m10 is F10); - Expect.equals(tIsInt, confuse(m10) is F10); - Expect.equals(tIsBool, confuse(m10) is F10); - } - } - - /// core.List Function(int y, [Function x]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(int y, [Function x]) - Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(int y, [Function x]) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x2, [core.List x3]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x2, [core.List x3]) - Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x2, - [core.List x3]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function({int x}) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function({int x}) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue( - m13 is List Function({int x}) Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function(core.List x) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function(core.List x) Function(int x) - l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function(core.List x) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// Function(int x1, [int x]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - Function(int x1, [int x]) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue( - m15 is Function(int x1, [int x]) Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - } - - /// Function([List x1]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function([List x1]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function([List x1]) - Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function({List x}) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function({List x}) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue( - m17 is Function({List x}) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(int y, {Function x}) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int y, {Function x}) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int y, {Function x}) - Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int x1, [List x]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int x1, [List x]) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int x1, [List x]) - Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - // The static function has its T always set to int. - Expect.isTrue(f19 is F19); - Expect.isFalse(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - Expect.isFalse(confuse(f19) is F19); - if (tIsBool) { - Expect.throws(() { - x19 = (f19 as dynamic); - }); - Expect.throws(() { - x19 = confuse(f19); - }); - Expect.throws(() { - l19 = (f19 as dynamic); - }); - Expect.throws(() { - l19 = confuse(f19); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m19 is F19); - Expect.equals(tIsBool, m19 is F19); - Expect.equals(tIsInt, confuse(m19) is F19); - Expect.equals(tIsBool, confuse(m19) is F19); - } - } - - /// Function Function(List x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - Function Function(List x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is Function Function(List x) - Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// Function(int x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - Function(int x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is Function(int x) Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// void Function(Function x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - void Function(Function x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is void Function(Function x) - Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U95().runTests(); - new U95(tIsInt: true).runTests(); - new U95(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type96_test.dart b/tests/language_2/function_type/function_type96_test.dart deleted file mode 100644 index f6beecd1091..00000000000 --- a/tests/language_2/function_type/function_type96_test.dart +++ /dev/null @@ -1,893 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int x, [core.List x2]); -typedef F1 = core.List Function(int x1, [List x2]); -typedef F2 = Function([Function x1]); -typedef F3 = int Function(List x); -typedef F4 = int Function({int x}) Function(); -typedef F5 = int Function(core.List x) Function(); -typedef F6 = Function Function(int x0, [int x]) Function(); -typedef F7 = Function Function([List x1]) Function(); -typedef F8 = Function Function({List x}) Function(); -typedef F9 = List Function(int y, {Function x}) Function(); -typedef F10 = List Function(int x0, [List x]) Function(); -typedef F11 = core.List Function(Function x0) Function(); -typedef F12 = core.List Function(int x, [core.List x2]) - Function(); -typedef F13 = List Function(int x0, {int x}) Function(); -typedef F14 = List Function([core.List x]) Function(); -typedef F15 = Function(int y, [int x]) Function(); -typedef F16 = Function(int x1, [List x2]) Function(); -typedef F17 = Function(int x0, {List x}) Function(); -typedef F18 = void Function(List x) Function(); -typedef F19 = void Function(int y, [List x]) Function(); -typedef F20 = List Function(int x) Function(); -typedef F21 = Function(Function x) Function(); -typedef F22 = void Function(List x) Function(); - -Function f0(int x, [core.List x0]) => null; -core.List f1(int x0, [List x1]) => null; -f2([Function x0]) => null; -int f3(List x) => null; -int Function({int x}) f4() => null; -int Function(core.List x) f5() => null; -Function Function(int x0, [int x]) f6() => null; -Function Function([List x0]) f7() => null; -Function Function({List x}) f8() => null; -List Function(int y, {Function x}) f9() => null; -List Function(int x0, [List x]) f10() => null; -core.List Function(Function x0) f11() => null; -core.List Function(int x, [core.List x0]) f12() => null; -List Function(int x0, {int x}) f13() => null; -List Function([core.List x]) f14() => null; -Function(int y, [int x]) f15() => null; -Function(int x0, [List x1]) f16() => null; -Function(int x0, {List x}) f17() => null; -void Function(List x) f18() => null; -void Function(int y, [List x]) f19() => null; -List Function(int x) f20() => null; -Function(Function x) f21() => null; -void Function(List x) f22() => null; - -class U96 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int x, [core.List x2]) x0; - core.List Function(int x1, [List x2]) x1; - Function([Function x1]) x2; - int Function(List x) x3; - int Function({int x}) Function() x4; - int Function(core.List x) Function() x5; - Function Function(int x0, [int x]) Function() x6; - Function Function([List x1]) Function() x7; - Function Function({List x}) Function() x8; - List Function(int y, {Function x}) Function() x9; - List Function(int x0, [List x]) Function() x10; - core.List Function(Function x0) Function() x11; - core.List Function(int x, [core.List x2]) Function() x12; - List Function(int x0, {int x}) Function() x13; - List Function([core.List x]) Function() x14; - Function(int y, [int x]) Function() x15; - Function(int x1, [List x2]) Function() x16; - Function(int x0, {List x}) Function() x17; - void Function(List x) Function() x18; - void Function(int y, [List x]) Function() x19; - List Function(int x) Function() x20; - Function(Function x) Function() x21; - void Function(List x) Function() x22; - - U96({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int x, [core.List x0]) => null; - core.List m1(int x0, [List x1]) => null; - m2([Function x0]) => null; - int m3(List x) => null; - int Function({int x}) m4() => null; - int Function(core.List x) m5() => null; - Function Function(int x0, [int x]) m6() => null; - Function Function([List x0]) m7() => null; - Function Function({List x}) m8() => null; - List Function(int y, {Function x}) m9() => null; - List Function(int x0, [List x]) m10() => null; - core.List Function(Function x0) m11() => null; - core.List Function(int x, [core.List x0]) m12() => null; - List Function(int x0, {int x}) m13() => null; - List Function([core.List x]) m14() => null; - Function(int y, [int x]) m15() => null; - Function(int x0, [List x1]) m16() => null; - Function(int x0, {List x}) m17() => null; - void Function(List x) m18() => null; - void Function(int y, [List x]) m19() => null; - List Function(int x) m20() => null; - Function(Function x) m21() => null; - void Function(List x) m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int x, [core.List x2]) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int x, [core.List x2]) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int x, [core.List x2])); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function(int x1, [List x2]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function(int x1, [List x2]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue( - m1 is core.List Function(int x1, [List x2])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// Function([Function x1]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - Function([Function x1]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is Function([Function x1])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// int Function(List x) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - int Function(List x) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is int Function(List x)); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - // The static function has its T always set to int. - Expect.isTrue(f3 is F3); - Expect.isFalse(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - Expect.isFalse(confuse(f3) is F3); - if (tIsBool) { - Expect.throws(() { - x3 = (f3 as dynamic); - }); - Expect.throws(() { - x3 = confuse(f3); - }); - Expect.throws(() { - l3 = (f3 as dynamic); - }); - Expect.throws(() { - l3 = confuse(f3); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m3 is F3); - Expect.equals(true, m3 is F3); - Expect.equals(true, confuse(m3) is F3); - Expect.equals(true, confuse(m3) is F3); - } - } - - /// int Function({int x}) Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function({int x}) Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function({int x}) Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(core.List x) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(core.List x) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(core.List x) Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// Function Function(int x0, [int x]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - Function Function(int x0, [int x]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is Function Function(int x0, [int x]) Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function([List x1]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function([List x1]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function([List x1]) Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function({List x}) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function({List x}) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function({List x}) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int y, {Function x}) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int y, {Function x}) Function() l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is List Function(int y, {Function x}) Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x0, [List x]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x0, [List x]) Function() l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue( - m10 is List Function(int x0, [List x]) Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - // The static function has its T always set to int. - Expect.isTrue(f10 is F10); - Expect.isFalse(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - Expect.isFalse(confuse(f10) is F10); - if (tIsBool) { - Expect.throws(() { - x10 = (f10 as dynamic); - }); - Expect.throws(() { - x10 = confuse(f10); - }); - Expect.throws(() { - l10 = (f10 as dynamic); - }); - Expect.throws(() { - l10 = confuse(f10); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m10 is F10); - Expect.equals(tIsBool, m10 is F10); - Expect.equals(tIsInt, confuse(m10) is F10); - Expect.equals(tIsBool, confuse(m10) is F10); - } - } - - /// core.List Function(Function x0) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(Function x0) Function() l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(Function x0) Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x, [core.List x2]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x, [core.List x2]) Function() - l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x, - [core.List x2]) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x0, {int x}) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x0, {int x}) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function(int x0, {int x}) Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function([core.List x]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function([core.List x]) Function() l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function([core.List x]) Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// Function(int y, [int x]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - Function(int y, [int x]) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is Function(int y, [int x]) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - } - - /// Function(int x1, [List x2]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x1, [List x2]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x1, [List x2]) Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x0, {List x}) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x0, {List x}) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x0, {List x}) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(List x) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(List x) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(List x) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int y, [List x]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int y, [List x]) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int y, [List x]) Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - // The static function has its T always set to int. - Expect.isTrue(f19 is F19); - Expect.isFalse(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - Expect.isFalse(confuse(f19) is F19); - if (tIsBool) { - Expect.throws(() { - x19 = (f19 as dynamic); - }); - Expect.throws(() { - x19 = confuse(f19); - }); - Expect.throws(() { - l19 = (f19 as dynamic); - }); - Expect.throws(() { - l19 = confuse(f19); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m19 is F19); - Expect.equals(tIsBool, m19 is F19); - Expect.equals(tIsInt, confuse(m19) is F19); - Expect.equals(tIsBool, confuse(m19) is F19); - } - } - - /// List Function(int x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - List Function(int x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is List Function(int x) Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// Function(Function x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - Function(Function x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is Function(Function x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// void Function(List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - void Function(List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is void Function(List x) Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U96().runTests(); - new U96(tIsInt: true).runTests(); - new U96(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type97_test.dart b/tests/language_2/function_type/function_type97_test.dart deleted file mode 100644 index 1e90015d417..00000000000 --- a/tests/language_2/function_type/function_type97_test.dart +++ /dev/null @@ -1,873 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function({core.List x}); -typedef F1 = core.List Function(int x, [List x2]); -typedef F2 = Function(int x1, [Function x2]); -typedef F3 = int Function(); -typedef F4 = int Function({int x}) Function(int x); -typedef F5 = int Function(core.List x) Function(int x); -typedef F6 = Function Function(int x1, [int x]) Function(int x); -typedef F7 = Function Function([List x1]) Function(int x); -typedef F8 = Function Function({List x}) Function(int x); -typedef F9 = List Function(int y, {Function x}) Function(int x); -typedef F10 = List Function(int x1, [List x]) Function(int x); -typedef F11 = core.List Function(Function x1) Function(int x); -typedef F12 = core.List Function(int x, [core.List x1]) - Function(int x); -typedef F13 = List Function(int x1, {int x}) Function(int x); -typedef F14 = List Function([core.List x]) Function(int x); -typedef F15 = Function(int y, [int x]) Function(int x); -typedef F16 = Function(int x2, [List x3]) Function(int x); -typedef F17 = Function(int x1, {List x}) Function(int x); -typedef F18 = void Function(List x) Function(int x); -typedef F19 = void Function(int y, [List x]) Function(int x); -typedef F20 = List Function(int x) Function(int x); -typedef F21 = Function(Function x) Function(int x); -typedef F22 = void Function(List x) Function(int x); - -Function f0({core.List x}) => null; -core.List f1(int x, [List x0]) => null; -f2(int x0, [Function x1]) => null; -int f3() => null; -int Function({int x}) f4(int x) => null; -int Function(core.List x) f5(int x) => null; -Function Function(int x0, [int x]) f6(int x) => null; -Function Function([List x0]) f7(int x) => null; -Function Function({List x}) f8(int x) => null; -List Function(int y, {Function x}) f9(int x) => null; -List Function(int x0, [List x]) f10(int x) => null; -core.List Function(Function x0) f11(int x) => null; -core.List Function(int x, [core.List x0]) f12(int x) => - null; -List Function(int x0, {int x}) f13(int x) => null; -List Function([core.List x]) f14(int x) => null; -Function(int y, [int x]) f15(int x) => null; -Function(int x0, [List x1]) f16(int x) => null; -Function(int x0, {List x}) f17(int x) => null; -void Function(List x) f18(int x) => null; -void Function(int y, [List x]) f19(int x) => null; -List Function(int x) f20(int x) => null; -Function(Function x) f21(int x) => null; -void Function(List x) f22(int x) => null; - -class U97 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function({core.List x}) x0; - core.List Function(int x, [List x2]) x1; - Function(int x1, [Function x2]) x2; - int Function() x3; - int Function({int x}) Function(int x) x4; - int Function(core.List x) Function(int x) x5; - Function Function(int x1, [int x]) Function(int x) x6; - Function Function([List x1]) Function(int x) x7; - Function Function({List x}) Function(int x) x8; - List Function(int y, {Function x}) Function(int x) x9; - List Function(int x1, [List x]) Function(int x) x10; - core.List Function(Function x1) Function(int x) x11; - core.List Function(int x, [core.List x1]) Function(int x) - x12; - List Function(int x1, {int x}) Function(int x) x13; - List Function([core.List x]) Function(int x) x14; - Function(int y, [int x]) Function(int x) x15; - Function(int x2, [List x3]) Function(int x) x16; - Function(int x1, {List x}) Function(int x) x17; - void Function(List x) Function(int x) x18; - void Function(int y, [List x]) Function(int x) x19; - List Function(int x) Function(int x) x20; - Function(Function x) Function(int x) x21; - void Function(List x) Function(int x) x22; - - U97({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0({core.List x}) => null; - core.List m1(int x, [List x0]) => null; - m2(int x0, [Function x1]) => null; - int m3() => null; - int Function({int x}) m4(int x) => null; - int Function(core.List x) m5(int x) => null; - Function Function(int x0, [int x]) m6(int x) => null; - Function Function([List x0]) m7(int x) => null; - Function Function({List x}) m8(int x) => null; - List Function(int y, {Function x}) m9(int x) => null; - List Function(int x0, [List x]) m10(int x) => null; - core.List Function(Function x0) m11(int x) => null; - core.List Function(int x, [core.List x0]) m12(int x) => - null; - List Function(int x0, {int x}) m13(int x) => null; - List Function([core.List x]) m14(int x) => null; - Function(int y, [int x]) m15(int x) => null; - Function(int x0, [List x1]) m16(int x) => null; - Function(int x0, {List x}) m17(int x) => null; - void Function(List x) m18(int x) => null; - void Function(int y, [List x]) m19(int x) => null; - List Function(int x) m20(int x) => null; - Function(Function x) m21(int x) => null; - void Function(List x) m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function({core.List x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function({core.List x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function({core.List x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function(int x, [List x2]) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function(int x, [List x2]) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue( - m1 is core.List Function(int x, [List x2])); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// Function(int x1, [Function x2]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - Function(int x1, [Function x2]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is Function(int x1, [Function x2])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// int Function() - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - int Function() l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is int Function()); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function({int x}) Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function({int x}) Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function({int x}) Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(core.List x) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(core.List x) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(core.List x) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// Function Function(int x1, [int x]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - Function Function(int x1, [int x]) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is Function Function(int x1, [int x]) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function([List x1]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function([List x1]) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function([List x1]) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function({List x}) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function({List x}) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function({List x}) Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int y, {Function x}) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int y, {Function x}) Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue( - m9 is List Function(int y, {Function x}) Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x1, [List x]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x1, [List x]) Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue( - m10 is List Function(int x1, [List x]) Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - // The static function has its T always set to int. - Expect.isTrue(f10 is F10); - Expect.isFalse(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - Expect.isFalse(confuse(f10) is F10); - if (tIsBool) { - Expect.throws(() { - x10 = (f10 as dynamic); - }); - Expect.throws(() { - x10 = confuse(f10); - }); - Expect.throws(() { - l10 = (f10 as dynamic); - }); - Expect.throws(() { - l10 = confuse(f10); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m10 is F10); - Expect.equals(tIsBool, m10 is F10); - Expect.equals(tIsInt, confuse(m10) is F10); - Expect.equals(tIsBool, confuse(m10) is F10); - } - } - - /// core.List Function(Function x1) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(Function x1) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue( - m11 is core.List Function(Function x1) Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x, [core.List x1]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x, [core.List x1]) Function( - int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x, - [core.List x1]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x1, {int x}) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x1, {int x}) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function(int x1, {int x}) Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function([core.List x]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function([core.List x]) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue( - m14 is List Function([core.List x]) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// Function(int y, [int x]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - Function(int y, [int x]) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue(m15 is Function(int y, [int x]) Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - } - - /// Function(int x2, [List x3]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x2, [List x3]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x2, [List x3]) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x1, {List x}) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x1, {List x}) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x1, {List x}) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(List x) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(List x) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(List x) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int y, [List x]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int y, [List x]) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int y, [List x]) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - // The static function has its T always set to int. - Expect.isTrue(f19 is F19); - Expect.isFalse(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - Expect.isFalse(confuse(f19) is F19); - if (tIsBool) { - Expect.throws(() { - x19 = (f19 as dynamic); - }); - Expect.throws(() { - x19 = confuse(f19); - }); - Expect.throws(() { - l19 = (f19 as dynamic); - }); - Expect.throws(() { - l19 = confuse(f19); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m19 is F19); - Expect.equals(tIsBool, m19 is F19); - Expect.equals(tIsInt, confuse(m19) is F19); - Expect.equals(tIsBool, confuse(m19) is F19); - } - } - - /// List Function(int x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - List Function(int x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is List Function(int x) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// Function(Function x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - Function(Function x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is Function(Function x) Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// void Function(List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - void Function(List x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is void Function(List x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U97().runTests(); - new U97(tIsInt: true).runTests(); - new U97(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type98_test.dart b/tests/language_2/function_type/function_type98_test.dart deleted file mode 100644 index 212d5fe35a4..00000000000 --- a/tests/language_2/function_type/function_type98_test.dart +++ /dev/null @@ -1,905 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int x0, {core.List x}); -typedef F1 = core.List Function({List x}); -typedef F2 = Function(int x, [Function x2]); -typedef F3 = int Function(A x); -typedef F4 = int Function({int x}) Function(); -typedef F5 = int Function(core.List x) - Function(); -typedef F6 = Function Function(int x1, [int x]) - Function(); -typedef F7 = Function Function([List x1]) - Function(); -typedef F8 = Function Function({List x}) Function(); -typedef F9 = List Function(int y, {Function x}) - Function(); -typedef F10 = List Function(int x1, [List x]) - Function(); -typedef F11 = core.List Function(Function x1) - Function(); -typedef F12 = core.List Function(int x, [core.List x1]) - Function(); -typedef F13 = List Function(int x1, {int x}) - Function(); -typedef F14 = List Function([core.List x]) - Function(); -typedef F15 = Function(int y, [int x]) Function(); -typedef F16 = Function(int x2, [List x3]) - Function(); -typedef F17 = Function(int x1, {List x}) Function(); -typedef F18 = void Function(List x) Function(); -typedef F19 = void Function(int y, [List x]) - Function(); -typedef F20 = List Function(int x) - Function(); -typedef F21 = Function(Function x) Function(); -typedef F22 = void Function(List x) - Function(); - -Function f0(int x0, {core.List x}) => null; -core.List f1({List x}) => null; -f2(int x, [Function x0]) => null; -int f3(A x) => null; -int Function({int x}) f4() => null; -int Function(core.List x) f5() => null; -Function Function(int x0, [int x]) f6() => null; -Function Function([List x0]) f7() => null; -Function Function({List x}) f8() => null; -List Function(int y, {Function x}) f9() => null; -List Function(int x0, [List x]) f10() => - null; -core.List Function(Function x0) f11() => null; -core.List Function(int x, [core.List x0]) - f12() => null; -List Function(int x0, {int x}) f13() => null; -List Function([core.List x]) f14() => null; -Function(int y, [int x]) f15() => null; -Function(int x0, [List x1]) f16() => null; -Function(int x0, {List x}) f17() => null; -void Function(List x) f18() => null; -void Function(int y, [List x]) f19() => null; -List Function(int x) f20() => null; -Function(Function x) f21() => null; -void Function(List x) f22() => null; - -class U98 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int x0, {core.List x}) x0; - core.List Function({List x}) x1; - Function(int x, [Function x2]) x2; - int Function(A x) x3; - int Function({int x}) Function() x4; - int Function(core.List x) Function() x5; - Function Function(int x1, [int x]) Function() x6; - Function Function([List x1]) Function() x7; - Function Function({List x}) Function() x8; - List Function(int y, {Function x}) Function() - x9; - List Function(int x1, [List x]) Function() - x10; - core.List Function(Function x1) Function() x11; - core.List Function(int x, [core.List x1]) - Function() x12; - List Function(int x1, {int x}) Function() x13; - List Function([core.List x]) Function() x14; - Function(int y, [int x]) Function() x15; - Function(int x2, [List x3]) Function() x16; - Function(int x1, {List x}) Function() x17; - void Function(List x) Function() x18; - void Function(int y, [List x]) Function() x19; - List Function(int x) Function() x20; - Function(Function x) Function() x21; - void Function(List x) Function() x22; - - U98({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int x0, {core.List x}) => null; - core.List m1({List x}) => null; - m2(int x, [Function x0]) => null; - int m3(A x) => null; - int Function({int x}) m4() => null; - int Function(core.List x) m5() => null; - Function Function(int x0, [int x]) m6() => null; - Function Function([List x0]) m7() => null; - Function Function({List x}) m8() => null; - List Function(int y, {Function x}) m9() => null; - List Function(int x0, [List x]) m10() => - null; - core.List Function(Function x0) m11() => null; - core.List Function(int x, [core.List x0]) - m12() => null; - List Function(int x0, {int x}) m13() => null; - List Function([core.List x]) m14() => null; - Function(int y, [int x]) m15() => null; - Function(int x0, [List x1]) m16() => null; - Function(int x0, {List x}) m17() => null; - void Function(List x) m18() => null; - void Function(int y, [List x]) m19() => null; - List Function(int x) m20() => null; - Function(Function x) m21() => null; - void Function(List x) m22() => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int x0, {core.List x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int x0, {core.List x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int x0, {core.List x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function({List x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function({List x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is core.List Function({List x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// Function(int x, [Function x2]) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - Function(int x, [Function x2]) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is Function(int x, [Function x2])); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// int Function(A x) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - int Function(A x) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is int Function(A x)); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function({int x}) Function() - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function({int x}) Function() l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is int Function({int x}) Function()); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(core.List x) Function() - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(core.List x) Function() l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(core.List x) - Function()); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// Function Function(int x1, [int x]) Function() - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - Function Function(int x1, [int x]) Function() l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is Function Function(int x1, [int x]) - Function()); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function([List x1]) Function() - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function([List x1]) Function() l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function([List x1]) - Function()); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function({List x}) Function() - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function({List x}) Function() l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue( - m8 is Function Function({List x}) Function()); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int y, {Function x}) Function() - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int y, {Function x}) Function() - l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int y, {Function x}) - Function()); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x1, [List x]) Function() - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x1, [List x]) Function() - l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x1, [List x]) - Function()); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - // The static function has its T always set to int. - Expect.isTrue(f10 is F10); - Expect.isFalse(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - Expect.isFalse(confuse(f10) is F10); - if (tIsBool) { - Expect.throws(() { - x10 = (f10 as dynamic); - }); - Expect.throws(() { - x10 = confuse(f10); - }); - Expect.throws(() { - l10 = (f10 as dynamic); - }); - Expect.throws(() { - l10 = confuse(f10); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m10 is F10); - Expect.equals(tIsBool, m10 is F10); - Expect.equals(tIsInt, confuse(m10) is F10); - Expect.equals(tIsBool, confuse(m10) is F10); - } - } - - /// core.List Function(Function x1) Function() - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(Function x1) Function() - l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(Function x1) - Function()); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x, [core.List x1]) Function() - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x, [core.List x1]) - Function() l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x, - [core.List x1]) - Function()); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x1, {int x}) Function() - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x1, {int x}) Function() l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function(int x1, {int x}) - Function()); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function([core.List x]) Function() - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function([core.List x]) Function() - l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function([core.List x]) - Function()); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// Function(int y, [int x]) Function() - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - Function(int y, [int x]) Function() l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue( - m15 is Function(int y, [int x]) Function()); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - } - - /// Function(int x2, [List x3]) Function() - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x2, [List x3]) Function() l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x2, [List x3]) - Function()); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x1, {List x}) Function() - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x1, {List x}) Function() l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue( - m17 is Function(int x1, {List x}) Function()); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(List x) Function() - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(List x) Function() l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue( - m18 is void Function(List x) Function()); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int y, [List x]) Function() - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int y, [List x]) Function() l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int y, [List x]) - Function()); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - // The static function has its T always set to int. - Expect.isTrue(f19 is F19); - Expect.isFalse(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - Expect.isFalse(confuse(f19) is F19); - if (tIsBool) { - Expect.throws(() { - x19 = (f19 as dynamic); - }); - Expect.throws(() { - x19 = confuse(f19); - }); - Expect.throws(() { - l19 = (f19 as dynamic); - }); - Expect.throws(() { - l19 = confuse(f19); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m19 is F19); - Expect.equals(tIsBool, m19 is F19); - Expect.equals(tIsInt, confuse(m19) is F19); - Expect.equals(tIsBool, confuse(m19) is F19); - } - } - - /// List Function(int x) Function() - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - List Function(int x) Function() l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is List Function(int x) - Function()); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// Function(Function x) Function() - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - Function(Function x) Function() l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is Function(Function x) Function()); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// void Function(List x) Function() - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - void Function(List x) Function() l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is void Function(List x) - Function()); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U98().runTests(); - new U98(tIsInt: true).runTests(); - new U98(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type99_test.dart b/tests/language_2/function_type/function_type99_test.dart deleted file mode 100644 index 0bceaaaeac5..00000000000 --- a/tests/language_2/function_type/function_type99_test.dart +++ /dev/null @@ -1,920 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = Function Function(int y, {core.List x}); -typedef F1 = core.List Function(int x0, {List x}); -typedef F2 = Function({Function x}); -typedef F3 = int Function(List x); -typedef F4 = int Function({int x}) Function(int x); -typedef F5 = int Function(core.List x) - Function(int x); -typedef F6 = Function Function(int x1, [int x]) Function( - int x); -typedef F7 = Function Function([List x1]) - Function(int x); -typedef F8 = Function Function({List x}) Function( - int x); -typedef F9 = List Function(int y, {Function x}) - Function(int x); -typedef F10 = List Function(int x1, [List x]) - Function(int x); -typedef F11 = core.List Function(Function x1) - Function(int x); -typedef F12 = core.List Function(int x, [core.List x1]) - Function(int x); -typedef F13 = List Function(int x1, {int x}) Function( - int x); -typedef F14 = List Function([core.List x]) - Function(int x); -typedef F15 = Function(int y, [int x]) Function(int x); -typedef F16 = Function(int x2, [List x3]) - Function(int x); -typedef F17 = Function(int x1, {List x}) Function( - int x); -typedef F18 = void Function(List x) Function( - int x); -typedef F19 = void Function(int y, [List x]) Function( - int x); -typedef F20 = List Function(int x) Function( - int x); -typedef F21 = Function(Function x) Function(int x); -typedef F22 = void Function(List x) - Function(int x); - -Function f0(int y, {core.List x}) => null; -core.List f1(int x0, {List x}) => null; -f2({Function x}) => null; -int f3(List x) => null; -int Function({int x}) f4(int x) => null; -int Function(core.List x) f5(int x) => null; -Function Function(int x0, [int x]) f6(int x) => null; -Function Function([List x0]) f7(int x) => null; -Function Function({List x}) f8(int x) => null; -List Function(int y, {Function x}) f9(int x) => - null; -List Function(int x0, [List x]) f10(int x) => - null; -core.List Function(Function x0) f11(int x) => - null; -core.List Function(int x, [core.List x0]) - f12(int x) => null; -List Function(int x0, {int x}) f13(int x) => null; -List Function([core.List x]) f14(int x) => - null; -Function(int y, [int x]) f15(int x) => null; -Function(int x0, [List x1]) f16(int x) => null; -Function(int x0, {List x}) f17(int x) => null; -void Function(List x) f18(int x) => null; -void Function(int y, [List x]) f19(int x) => null; -List Function(int x) f20(int x) => null; -Function(Function x) f21(int x) => null; -void Function(List x) f22(int x) => null; - -class U99 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - Function Function(int y, {core.List x}) x0; - core.List Function(int x0, {List x}) x1; - Function({Function x}) x2; - int Function(List x) x3; - int Function({int x}) Function(int x) x4; - int Function(core.List x) Function(int x) x5; - Function Function(int x1, [int x]) Function(int x) x6; - Function Function([List x1]) Function(int x) x7; - Function Function({List x}) Function(int x) x8; - List Function(int y, {Function x}) Function( - int x) x9; - List Function(int x1, [List x]) Function( - int x) x10; - core.List Function(Function x1) Function(int x) - x11; - core.List Function(int x, [core.List x1]) - Function(int x) x12; - List Function(int x1, {int x}) Function(int x) x13; - List Function([core.List x]) Function(int x) - x14; - Function(int y, [int x]) Function(int x) x15; - Function(int x2, [List x3]) Function(int x) x16; - Function(int x1, {List x}) Function(int x) x17; - void Function(List x) Function(int x) x18; - void Function(int y, [List x]) Function(int x) x19; - List Function(int x) Function(int x) x20; - Function(Function x) Function(int x) x21; - void Function(List x) Function(int x) x22; - - U99({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - Function m0(int y, {core.List x}) => null; - core.List m1(int x0, {List x}) => null; - m2({Function x}) => null; - int m3(List x) => null; - int Function({int x}) m4(int x) => null; - int Function(core.List x) m5(int x) => null; - Function Function(int x0, [int x]) m6(int x) => null; - Function Function([List x0]) m7(int x) => null; - Function Function({List x}) m8(int x) => null; - List Function(int y, {Function x}) m9(int x) => - null; - List Function(int x0, [List x]) m10(int x) => - null; - core.List Function(Function x0) m11(int x) => - null; - core.List Function(int x, [core.List x0]) - m12(int x) => null; - List Function(int x0, {int x}) m13(int x) => null; - List Function([core.List x]) m14(int x) => - null; - Function(int y, [int x]) m15(int x) => null; - Function(int x0, [List x1]) m16(int x) => null; - Function(int x0, {List x}) m17(int x) => null; - void Function(List x) m18(int x) => null; - void Function(int y, [List x]) m19(int x) => null; - List Function(int x) m20(int x) => null; - Function(Function x) m21(int x) => null; - void Function(List x) m22(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - } - - /// Function Function(int y, {core.List x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - Function Function(int y, {core.List x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is Function Function(int y, {core.List x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// core.List Function(int x0, {List x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - core.List Function(int x0, {List x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue( - m1 is core.List Function(int x0, {List x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - } - - /// Function({Function x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - Function({Function x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is Function({Function x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// int Function(List x) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - int Function(List x) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is int Function(List x)); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// int Function({int x}) Function(int x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - int Function({int x}) Function(int x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue( - m4 is int Function({int x}) Function(int x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(core.List x) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(core.List x) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(core.List x) - Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// Function Function(int x1, [int x]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - Function Function(int x1, [int x]) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue(m6 is Function Function(int x1, [int x]) - Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function([List x1]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function([List x1]) Function(int x) - l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function([List x1]) - Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function({List x}) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function({List x}) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function({List x}) - Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - // The static function has its T always set to int. - Expect.isTrue(f8 is F8); - Expect.isFalse(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - Expect.isFalse(confuse(f8) is F8); - if (tIsBool) { - Expect.throws(() { - x8 = (f8 as dynamic); - }); - Expect.throws(() { - x8 = confuse(f8); - }); - Expect.throws(() { - l8 = (f8 as dynamic); - }); - Expect.throws(() { - l8 = confuse(f8); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m8 is F8); - Expect.equals(tIsBool, m8 is F8); - Expect.equals(tIsInt, confuse(m8) is F8); - Expect.equals(tIsBool, confuse(m8) is F8); - } - } - - /// List Function(int y, {Function x}) Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - List Function(int y, {Function x}) Function( - int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is List Function(int y, {Function x}) - Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x1, [List x]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x1, [List x]) Function( - int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x1, [List x]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - // The static function has its T always set to int. - Expect.isTrue(f10 is F10); - Expect.isFalse(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - Expect.isFalse(confuse(f10) is F10); - if (tIsBool) { - Expect.throws(() { - x10 = (f10 as dynamic); - }); - Expect.throws(() { - x10 = confuse(f10); - }); - Expect.throws(() { - l10 = (f10 as dynamic); - }); - Expect.throws(() { - l10 = confuse(f10); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m10 is F10); - Expect.equals(tIsBool, m10 is F10); - Expect.equals(tIsInt, confuse(m10) is F10); - Expect.equals(tIsBool, confuse(m10) is F10); - } - } - - /// core.List Function(Function x1) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - core.List Function(Function x1) Function( - int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is core.List Function(Function x1) - Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - } - - /// core.List Function(int x, [core.List x1]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x, [core.List x1]) - Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x, - [core.List x1]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// List Function(int x1, {int x}) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - List Function(int x1, {int x}) Function(int x) l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is List Function(int x1, {int x}) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - // The static function has its T always set to int. - Expect.isTrue(f13 is F13); - Expect.isFalse(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - Expect.isFalse(confuse(f13) is F13); - if (tIsBool) { - Expect.throws(() { - x13 = (f13 as dynamic); - }); - Expect.throws(() { - x13 = confuse(f13); - }); - Expect.throws(() { - l13 = (f13 as dynamic); - }); - Expect.throws(() { - l13 = confuse(f13); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m13 is F13); - Expect.equals(tIsBool, m13 is F13); - Expect.equals(tIsInt, confuse(m13) is F13); - Expect.equals(tIsBool, confuse(m13) is F13); - } - } - - /// List Function([core.List x]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function([core.List x]) Function( - int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function([core.List x]) - Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// Function(int y, [int x]) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - Function(int y, [int x]) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue( - m15 is Function(int y, [int x]) Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - } - - /// Function(int x2, [List x3]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x2, [List x3]) Function(int x) - l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x2, [List x3]) - Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x1, {List x}) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x1, {List x}) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x1, {List x}) - Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - // The static function has its T always set to int. - Expect.isTrue(f17 is F17); - Expect.isFalse(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - Expect.isFalse(confuse(f17) is F17); - if (tIsBool) { - Expect.throws(() { - x17 = (f17 as dynamic); - }); - Expect.throws(() { - x17 = confuse(f17); - }); - Expect.throws(() { - l17 = (f17 as dynamic); - }); - Expect.throws(() { - l17 = confuse(f17); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m17 is F17); - Expect.equals(tIsBool, m17 is F17); - Expect.equals(tIsInt, confuse(m17) is F17); - Expect.equals(tIsBool, confuse(m17) is F17); - } - } - - /// void Function(List x) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(List x) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(List x) - Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int y, [List x]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int y, [List x]) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue(m19 is void Function(int y, [List x]) - Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - // The static function has its T always set to int. - Expect.isTrue(f19 is F19); - Expect.isFalse(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - Expect.isFalse(confuse(f19) is F19); - if (tIsBool) { - Expect.throws(() { - x19 = (f19 as dynamic); - }); - Expect.throws(() { - x19 = confuse(f19); - }); - Expect.throws(() { - l19 = (f19 as dynamic); - }); - Expect.throws(() { - l19 = confuse(f19); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m19 is F19); - Expect.equals(tIsBool, m19 is F19); - Expect.equals(tIsInt, confuse(m19) is F19); - Expect.equals(tIsBool, confuse(m19) is F19); - } - } - - /// List Function(int x) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - List Function(int x) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is List Function(int x) - Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - } - - /// Function(Function x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - Function(Function x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue( - m21 is Function(Function x) Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// void Function(List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - void Function(List x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is void Function(List x) - Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - } -} - -void main() { - new U99().runTests(); - new U99(tIsInt: true).runTests(); - new U99(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/function_type9_test.dart b/tests/language_2/function_type/function_type9_test.dart deleted file mode 100644 index e447cac8019..00000000000 --- a/tests/language_2/function_type/function_type9_test.dart +++ /dev/null @@ -1,905 +0,0 @@ -// Copyright (c) 2016, 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 - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; - -typedef F0 = int Function(int x0, {int x}); -typedef F1 = Function Function(int x0, {List x}); -typedef F2 = core.List Function({core.List x}); -typedef F3 = Function(int x, [List x2]); -typedef F4 = List Function(Function x); -typedef F5 = int Function(Function x) Function(int x); -typedef F6 = int Function(int y, [core.List x]) Function(int x); -typedef F7 = Function Function([int x1]) Function(int x); -typedef F8 = Function Function({List x}) Function(int x); -typedef F9 = Function Function() Function(int x); -typedef F10 = List Function(int x1, [List x]) Function( - int x); -typedef F11 = List Function([List x1]) Function(int x); -typedef F12 = core.List Function(int x, [Function x1]) Function( - int x); -typedef F13 = core.List Function(int y, {core.List x}) - Function(int x); -typedef F14 = List Function([Function x]) Function(int x); -typedef F15 = List Function(core.List x1) Function(int x); -typedef F16 = Function(int x2, [int x3]) Function(int x); -typedef F17 = Function(int x1, {List x}) Function(int x); -typedef F18 = void Function(int x) Function(int x); -typedef F19 = void Function(int y, [List x]) Function(int x); -typedef F20 = void Function(int x2, [List x3]) Function(int x); -typedef F21 = List Function(core.List x) Function( - int x); -typedef F22 = Function(List x) Function(int x); -typedef F23 = void Function() Function(int x); - -int f0(int x0, {int x}) => null; -Function f1(int x0, {List x}) => null; -core.List f2({core.List x}) => null; -f3(int x, [List x0]) => null; -List f4(Function x) => null; -int Function(Function x) f5(int x) => null; -int Function(int y, [core.List x]) f6(int x) => null; -Function Function([int x0]) f7(int x) => null; -Function Function({List x}) f8(int x) => null; -Function Function() f9(int x) => null; -List Function(int x0, [List x]) f10(int x) => null; -List Function([List x0]) f11(int x) => null; -core.List Function(int x, [Function x0]) f12(int x) => null; -core.List Function(int y, {core.List x}) f13(int x) => null; -List Function([Function x]) f14(int x) => null; -List Function(core.List x0) f15(int x) => null; -Function(int x0, [int x1]) f16(int x) => null; -Function(int x0, {List x}) f17(int x) => null; -void Function(int x) f18(int x) => null; -void Function(int y, [List x]) f19(int x) => null; -void Function(int x0, [List x1]) f20(int x) => null; -List Function(core.List x) f21(int x) => null; -Function(List x) f22(int x) => null; -void Function() f23(int x) => null; - -class U9 { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - - int Function(int x0, {int x}) x0; - Function Function(int x0, {List x}) x1; - core.List Function({core.List x}) x2; - Function(int x, [List x2]) x3; - List Function(Function x) x4; - int Function(Function x) Function(int x) x5; - int Function(int y, [core.List x]) Function(int x) x6; - Function Function([int x1]) Function(int x) x7; - Function Function({List x}) Function(int x) x8; - Function Function() Function(int x) x9; - List Function(int x1, [List x]) Function(int x) x10; - List Function([List x1]) Function(int x) x11; - core.List Function(int x, [Function x1]) Function(int x) x12; - core.List Function(int y, {core.List x}) Function(int x) - x13; - List Function([Function x]) Function(int x) x14; - List Function(core.List x1) Function(int x) x15; - Function(int x2, [int x3]) Function(int x) x16; - Function(int x1, {List x}) Function(int x) x17; - void Function(int x) Function(int x) x18; - void Function(int y, [List x]) Function(int x) x19; - void Function(int x2, [List x3]) Function(int x) x20; - List Function(core.List x) Function(int x) x21; - Function(List x) Function(int x) x22; - void Function() Function(int x) x23; - - U9({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - - int m0(int x0, {int x}) => null; - Function m1(int x0, {List x}) => null; - core.List m2({core.List x}) => null; - m3(int x, [List x0]) => null; - List m4(Function x) => null; - int Function(Function x) m5(int x) => null; - int Function(int y, [core.List x]) m6(int x) => null; - Function Function([int x0]) m7(int x) => null; - Function Function({List x}) m8(int x) => null; - Function Function() m9(int x) => null; - List Function(int x0, [List x]) m10(int x) => null; - List Function([List x0]) m11(int x) => null; - core.List Function(int x, [Function x0]) m12(int x) => null; - core.List Function(int y, {core.List x}) m13(int x) => - null; - List Function([Function x]) m14(int x) => null; - List Function(core.List x0) m15(int x) => null; - Function(int x0, [int x1]) m16(int x) => null; - Function(int x0, {List x}) m17(int x) => null; - void Function(int x) m18(int x) => null; - void Function(int y, [List x]) m19(int x) => null; - void Function(int x0, [List x1]) m20(int x) => null; - List Function(core.List x) m21(int x) => null; - Function(List x) m22(int x) => null; - void Function() m23(int x) => null; - - runTests() { - testF0(); - testF1(); - testF2(); - testF3(); - testF4(); - testF5(); - testF6(); - testF7(); - testF8(); - testF9(); - testF10(); - testF11(); - testF12(); - testF13(); - testF14(); - testF15(); - testF16(); - testF17(); - testF18(); - testF19(); - testF20(); - testF21(); - testF22(); - testF23(); - } - - /// int Function(int x0, {int x}) - void testF0() { - Expect.isTrue(f0 is F0); - Expect.isTrue(confuse(f0) is F0); - // In checked mode, verifies the type. - int Function(int x0, {int x}) l0; - // The static function f0 sets `T` to `int`. - if (tIsInt) { - x0 = f0 as dynamic; - l0 = f0 as dynamic; - x0 = confuse(f0); - l0 = confuse(f0); - } - - Expect.isTrue(m0 is F0); - Expect.isTrue(m0 is int Function(int x0, {int x})); - Expect.isTrue(confuse(m0) is F0); - // In checked mode, verifies the type. - x0 = m0; - l0 = m0; - x0 = confuse(m0); - l0 = confuse(m0); - } - - /// Function Function(int x0, {List x}) - void testF1() { - Expect.isTrue(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - // In checked mode, verifies the type. - Function Function(int x0, {List x}) l1; - // The static function f1 sets `T` to `int`. - if (tIsInt) { - x1 = f1 as dynamic; - l1 = f1 as dynamic; - x1 = confuse(f1); - l1 = confuse(f1); - } - - Expect.isTrue(m1 is F1); - Expect.isTrue(m1 is Function Function(int x0, {List x})); - Expect.isTrue(confuse(m1) is F1); - // In checked mode, verifies the type. - x1 = m1; - l1 = m1; - x1 = confuse(m1); - l1 = confuse(m1); - // The static function has its T always set to int. - Expect.isTrue(f1 is F1); - Expect.isFalse(f1 is F1); - Expect.isTrue(confuse(f1) is F1); - Expect.isFalse(confuse(f1) is F1); - if (tIsBool) { - Expect.throws(() { - x1 = (f1 as dynamic); - }); - Expect.throws(() { - x1 = confuse(f1); - }); - Expect.throws(() { - l1 = (f1 as dynamic); - }); - Expect.throws(() { - l1 = confuse(f1); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(true, m1 is F1); - Expect.equals(true, m1 is F1); - Expect.equals(true, confuse(m1) is F1); - Expect.equals(true, confuse(m1) is F1); - } - } - - /// core.List Function({core.List x}) - void testF2() { - Expect.isTrue(f2 is F2); - Expect.isTrue(confuse(f2) is F2); - // In checked mode, verifies the type. - core.List Function({core.List x}) l2; - // The static function f2 sets `T` to `int`. - if (tIsInt) { - x2 = f2 as dynamic; - l2 = f2 as dynamic; - x2 = confuse(f2); - l2 = confuse(f2); - } - - Expect.isTrue(m2 is F2); - Expect.isTrue(m2 is core.List Function({core.List x})); - Expect.isTrue(confuse(m2) is F2); - // In checked mode, verifies the type. - x2 = m2; - l2 = m2; - x2 = confuse(m2); - l2 = confuse(m2); - } - - /// Function(int x, [List x2]) - void testF3() { - Expect.isTrue(f3 is F3); - Expect.isTrue(confuse(f3) is F3); - // In checked mode, verifies the type. - Function(int x, [List x2]) l3; - // The static function f3 sets `T` to `int`. - if (tIsInt) { - x3 = f3 as dynamic; - l3 = f3 as dynamic; - x3 = confuse(f3); - l3 = confuse(f3); - } - - Expect.isTrue(m3 is F3); - Expect.isTrue(m3 is Function(int x, [List x2])); - Expect.isTrue(confuse(m3) is F3); - // In checked mode, verifies the type. - x3 = m3; - l3 = m3; - x3 = confuse(m3); - l3 = confuse(m3); - } - - /// List Function(Function x) - void testF4() { - Expect.isTrue(f4 is F4); - Expect.isTrue(confuse(f4) is F4); - // In checked mode, verifies the type. - List Function(Function x) l4; - // The static function f4 sets `T` to `int`. - if (tIsInt) { - x4 = f4 as dynamic; - l4 = f4 as dynamic; - x4 = confuse(f4); - l4 = confuse(f4); - } - - Expect.isTrue(m4 is F4); - Expect.isTrue(m4 is List Function(Function x)); - Expect.isTrue(confuse(m4) is F4); - // In checked mode, verifies the type. - x4 = m4; - l4 = m4; - x4 = confuse(m4); - l4 = confuse(m4); - } - - /// int Function(Function x) Function(int x) - void testF5() { - Expect.isTrue(f5 is F5); - Expect.isTrue(confuse(f5) is F5); - // In checked mode, verifies the type. - int Function(Function x) Function(int x) l5; - // The static function f5 sets `T` to `int`. - if (tIsInt) { - x5 = f5 as dynamic; - l5 = f5 as dynamic; - x5 = confuse(f5); - l5 = confuse(f5); - } - - Expect.isTrue(m5 is F5); - Expect.isTrue(m5 is int Function(Function x) Function(int x)); - Expect.isTrue(confuse(m5) is F5); - // In checked mode, verifies the type. - x5 = m5; - l5 = m5; - x5 = confuse(m5); - l5 = confuse(m5); - } - - /// int Function(int y, [core.List x]) Function(int x) - void testF6() { - Expect.isTrue(f6 is F6); - Expect.isTrue(confuse(f6) is F6); - // In checked mode, verifies the type. - int Function(int y, [core.List x]) Function(int x) l6; - // The static function f6 sets `T` to `int`. - if (tIsInt) { - x6 = f6 as dynamic; - l6 = f6 as dynamic; - x6 = confuse(f6); - l6 = confuse(f6); - } - - Expect.isTrue(m6 is F6); - Expect.isTrue( - m6 is int Function(int y, [core.List x]) Function(int x)); - Expect.isTrue(confuse(m6) is F6); - // In checked mode, verifies the type. - x6 = m6; - l6 = m6; - x6 = confuse(m6); - l6 = confuse(m6); - } - - /// Function Function([int x1]) Function(int x) - void testF7() { - Expect.isTrue(f7 is F7); - Expect.isTrue(confuse(f7) is F7); - // In checked mode, verifies the type. - Function Function([int x1]) Function(int x) l7; - // The static function f7 sets `T` to `int`. - if (tIsInt) { - x7 = f7 as dynamic; - l7 = f7 as dynamic; - x7 = confuse(f7); - l7 = confuse(f7); - } - - Expect.isTrue(m7 is F7); - Expect.isTrue(m7 is Function Function([int x1]) Function(int x)); - Expect.isTrue(confuse(m7) is F7); - // In checked mode, verifies the type. - x7 = m7; - l7 = m7; - x7 = confuse(m7); - l7 = confuse(m7); - } - - /// Function Function({List x}) Function(int x) - void testF8() { - Expect.isTrue(f8 is F8); - Expect.isTrue(confuse(f8) is F8); - // In checked mode, verifies the type. - Function Function({List x}) Function(int x) l8; - // The static function f8 sets `T` to `int`. - if (tIsInt) { - x8 = f8 as dynamic; - l8 = f8 as dynamic; - x8 = confuse(f8); - l8 = confuse(f8); - } - - Expect.isTrue(m8 is F8); - Expect.isTrue(m8 is Function Function({List x}) Function(int x)); - Expect.isTrue(confuse(m8) is F8); - // In checked mode, verifies the type. - x8 = m8; - l8 = m8; - x8 = confuse(m8); - l8 = confuse(m8); - } - - /// Function Function() Function(int x) - void testF9() { - Expect.isTrue(f9 is F9); - Expect.isTrue(confuse(f9) is F9); - // In checked mode, verifies the type. - Function Function() Function(int x) l9; - // The static function f9 sets `T` to `int`. - if (tIsInt) { - x9 = f9 as dynamic; - l9 = f9 as dynamic; - x9 = confuse(f9); - l9 = confuse(f9); - } - - Expect.isTrue(m9 is F9); - Expect.isTrue(m9 is Function Function() Function(int x)); - Expect.isTrue(confuse(m9) is F9); - // In checked mode, verifies the type. - x9 = m9; - l9 = m9; - x9 = confuse(m9); - l9 = confuse(m9); - } - - /// List Function(int x1, [List x]) Function(int x) - void testF10() { - Expect.isTrue(f10 is F10); - Expect.isTrue(confuse(f10) is F10); - // In checked mode, verifies the type. - List Function(int x1, [List x]) Function(int x) l10; - // The static function f10 sets `T` to `int`. - if (tIsInt) { - x10 = f10 as dynamic; - l10 = f10 as dynamic; - x10 = confuse(f10); - l10 = confuse(f10); - } - - Expect.isTrue(m10 is F10); - Expect.isTrue(m10 is List Function(int x1, [List x]) - Function(int x)); - Expect.isTrue(confuse(m10) is F10); - // In checked mode, verifies the type. - x10 = m10; - l10 = m10; - x10 = confuse(m10); - l10 = confuse(m10); - } - - /// List Function([List x1]) Function(int x) - void testF11() { - Expect.isTrue(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - // In checked mode, verifies the type. - List Function([List x1]) Function(int x) l11; - // The static function f11 sets `T` to `int`. - if (tIsInt) { - x11 = f11 as dynamic; - l11 = f11 as dynamic; - x11 = confuse(f11); - l11 = confuse(f11); - } - - Expect.isTrue(m11 is F11); - Expect.isTrue(m11 is List Function([List x1]) Function(int x)); - Expect.isTrue(confuse(m11) is F11); - // In checked mode, verifies the type. - x11 = m11; - l11 = m11; - x11 = confuse(m11); - l11 = confuse(m11); - // The static function has its T always set to int. - Expect.isTrue(f11 is F11); - Expect.isFalse(f11 is F11); - Expect.isTrue(confuse(f11) is F11); - Expect.isFalse(confuse(f11) is F11); - if (tIsBool) { - Expect.throws(() { - x11 = (f11 as dynamic); - }); - Expect.throws(() { - x11 = confuse(f11); - }); - Expect.throws(() { - l11 = (f11 as dynamic); - }); - Expect.throws(() { - l11 = confuse(f11); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m11 is F11); - Expect.equals(tIsBool, m11 is F11); - Expect.equals(tIsInt, confuse(m11) is F11); - Expect.equals(tIsBool, confuse(m11) is F11); - } - } - - /// core.List Function(int x, [Function x1]) Function(int x) - void testF12() { - Expect.isTrue(f12 is F12); - Expect.isTrue(confuse(f12) is F12); - // In checked mode, verifies the type. - core.List Function(int x, [Function x1]) Function(int x) l12; - // The static function f12 sets `T` to `int`. - if (tIsInt) { - x12 = f12 as dynamic; - l12 = f12 as dynamic; - x12 = confuse(f12); - l12 = confuse(f12); - } - - Expect.isTrue(m12 is F12); - Expect.isTrue(m12 is core.List Function(int x, [Function x1]) - Function(int x)); - Expect.isTrue(confuse(m12) is F12); - // In checked mode, verifies the type. - x12 = m12; - l12 = m12; - x12 = confuse(m12); - l12 = confuse(m12); - } - - /// core.List Function(int y, {core.List x}) Function(int x) - void testF13() { - Expect.isTrue(f13 is F13); - Expect.isTrue(confuse(f13) is F13); - // In checked mode, verifies the type. - core.List Function(int y, {core.List x}) Function(int x) - l13; - // The static function f13 sets `T` to `int`. - if (tIsInt) { - x13 = f13 as dynamic; - l13 = f13 as dynamic; - x13 = confuse(f13); - l13 = confuse(f13); - } - - Expect.isTrue(m13 is F13); - Expect.isTrue(m13 is core.List Function(int y, - {core.List x}) - Function(int x)); - Expect.isTrue(confuse(m13) is F13); - // In checked mode, verifies the type. - x13 = m13; - l13 = m13; - x13 = confuse(m13); - l13 = confuse(m13); - } - - /// List Function([Function x]) Function(int x) - void testF14() { - Expect.isTrue(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - // In checked mode, verifies the type. - List Function([Function x]) Function(int x) l14; - // The static function f14 sets `T` to `int`. - if (tIsInt) { - x14 = f14 as dynamic; - l14 = f14 as dynamic; - x14 = confuse(f14); - l14 = confuse(f14); - } - - Expect.isTrue(m14 is F14); - Expect.isTrue(m14 is List Function([Function x]) Function(int x)); - Expect.isTrue(confuse(m14) is F14); - // In checked mode, verifies the type. - x14 = m14; - l14 = m14; - x14 = confuse(m14); - l14 = confuse(m14); - // The static function has its T always set to int. - Expect.isTrue(f14 is F14); - Expect.isFalse(f14 is F14); - Expect.isTrue(confuse(f14) is F14); - Expect.isFalse(confuse(f14) is F14); - if (tIsBool) { - Expect.throws(() { - x14 = (f14 as dynamic); - }); - Expect.throws(() { - x14 = confuse(f14); - }); - Expect.throws(() { - l14 = (f14 as dynamic); - }); - Expect.throws(() { - l14 = confuse(f14); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m14 is F14); - Expect.equals(tIsBool, m14 is F14); - Expect.equals(tIsInt, confuse(m14) is F14); - Expect.equals(tIsBool, confuse(m14) is F14); - } - } - - /// List Function(core.List x1) Function(int x) - void testF15() { - Expect.isTrue(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - // In checked mode, verifies the type. - List Function(core.List x1) Function(int x) l15; - // The static function f15 sets `T` to `int`. - if (tIsInt) { - x15 = f15 as dynamic; - l15 = f15 as dynamic; - x15 = confuse(f15); - l15 = confuse(f15); - } - - Expect.isTrue(m15 is F15); - Expect.isTrue( - m15 is List Function(core.List x1) Function(int x)); - Expect.isTrue(confuse(m15) is F15); - // In checked mode, verifies the type. - x15 = m15; - l15 = m15; - x15 = confuse(m15); - l15 = confuse(m15); - // The static function has its T always set to int. - Expect.isTrue(f15 is F15); - Expect.isFalse(f15 is F15); - Expect.isTrue(confuse(f15) is F15); - Expect.isFalse(confuse(f15) is F15); - if (tIsBool) { - Expect.throws(() { - x15 = (f15 as dynamic); - }); - Expect.throws(() { - x15 = confuse(f15); - }); - Expect.throws(() { - l15 = (f15 as dynamic); - }); - Expect.throws(() { - l15 = confuse(f15); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m15 is F15); - Expect.equals(tIsBool, m15 is F15); - Expect.equals(tIsInt, confuse(m15) is F15); - Expect.equals(tIsBool, confuse(m15) is F15); - } - } - - /// Function(int x2, [int x3]) Function(int x) - void testF16() { - Expect.isTrue(f16 is F16); - Expect.isTrue(confuse(f16) is F16); - // In checked mode, verifies the type. - Function(int x2, [int x3]) Function(int x) l16; - // The static function f16 sets `T` to `int`. - if (tIsInt) { - x16 = f16 as dynamic; - l16 = f16 as dynamic; - x16 = confuse(f16); - l16 = confuse(f16); - } - - Expect.isTrue(m16 is F16); - Expect.isTrue(m16 is Function(int x2, [int x3]) Function(int x)); - Expect.isTrue(confuse(m16) is F16); - // In checked mode, verifies the type. - x16 = m16; - l16 = m16; - x16 = confuse(m16); - l16 = confuse(m16); - } - - /// Function(int x1, {List x}) Function(int x) - void testF17() { - Expect.isTrue(f17 is F17); - Expect.isTrue(confuse(f17) is F17); - // In checked mode, verifies the type. - Function(int x1, {List x}) Function(int x) l17; - // The static function f17 sets `T` to `int`. - if (tIsInt) { - x17 = f17 as dynamic; - l17 = f17 as dynamic; - x17 = confuse(f17); - l17 = confuse(f17); - } - - Expect.isTrue(m17 is F17); - Expect.isTrue(m17 is Function(int x1, {List x}) Function(int x)); - Expect.isTrue(confuse(m17) is F17); - // In checked mode, verifies the type. - x17 = m17; - l17 = m17; - x17 = confuse(m17); - l17 = confuse(m17); - } - - /// void Function(int x) Function(int x) - void testF18() { - Expect.isTrue(f18 is F18); - Expect.isTrue(confuse(f18) is F18); - // In checked mode, verifies the type. - void Function(int x) Function(int x) l18; - // The static function f18 sets `T` to `int`. - if (tIsInt) { - x18 = f18 as dynamic; - l18 = f18 as dynamic; - x18 = confuse(f18); - l18 = confuse(f18); - } - - Expect.isTrue(m18 is F18); - Expect.isTrue(m18 is void Function(int x) Function(int x)); - Expect.isTrue(confuse(m18) is F18); - // In checked mode, verifies the type. - x18 = m18; - l18 = m18; - x18 = confuse(m18); - l18 = confuse(m18); - } - - /// void Function(int y, [List x]) Function(int x) - void testF19() { - Expect.isTrue(f19 is F19); - Expect.isTrue(confuse(f19) is F19); - // In checked mode, verifies the type. - void Function(int y, [List x]) Function(int x) l19; - // The static function f19 sets `T` to `int`. - if (tIsInt) { - x19 = f19 as dynamic; - l19 = f19 as dynamic; - x19 = confuse(f19); - l19 = confuse(f19); - } - - Expect.isTrue(m19 is F19); - Expect.isTrue( - m19 is void Function(int y, [List x]) Function(int x)); - Expect.isTrue(confuse(m19) is F19); - // In checked mode, verifies the type. - x19 = m19; - l19 = m19; - x19 = confuse(m19); - l19 = confuse(m19); - } - - /// void Function(int x2, [List x3]) Function(int x) - void testF20() { - Expect.isTrue(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - // In checked mode, verifies the type. - void Function(int x2, [List x3]) Function(int x) l20; - // The static function f20 sets `T` to `int`. - if (tIsInt) { - x20 = f20 as dynamic; - l20 = f20 as dynamic; - x20 = confuse(f20); - l20 = confuse(f20); - } - - Expect.isTrue(m20 is F20); - Expect.isTrue(m20 is void Function(int x2, [List x3]) Function(int x)); - Expect.isTrue(confuse(m20) is F20); - // In checked mode, verifies the type. - x20 = m20; - l20 = m20; - x20 = confuse(m20); - l20 = confuse(m20); - // The static function has its T always set to int. - Expect.isTrue(f20 is F20); - Expect.isFalse(f20 is F20); - Expect.isTrue(confuse(f20) is F20); - Expect.isFalse(confuse(f20) is F20); - if (tIsBool) { - Expect.throws(() { - x20 = (f20 as dynamic); - }); - Expect.throws(() { - x20 = confuse(f20); - }); - Expect.throws(() { - l20 = (f20 as dynamic); - }); - Expect.throws(() { - l20 = confuse(f20); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m20 is F20); - Expect.equals(tIsBool, m20 is F20); - Expect.equals(tIsInt, confuse(m20) is F20); - Expect.equals(tIsBool, confuse(m20) is F20); - } - } - - /// List Function(core.List x) Function(int x) - void testF21() { - Expect.isTrue(f21 is F21); - Expect.isTrue(confuse(f21) is F21); - // In checked mode, verifies the type. - List Function(core.List x) Function(int x) l21; - // The static function f21 sets `T` to `int`. - if (tIsInt) { - x21 = f21 as dynamic; - l21 = f21 as dynamic; - x21 = confuse(f21); - l21 = confuse(f21); - } - - Expect.isTrue(m21 is F21); - Expect.isTrue(m21 is List Function(core.List x) - Function(int x)); - Expect.isTrue(confuse(m21) is F21); - // In checked mode, verifies the type. - x21 = m21; - l21 = m21; - x21 = confuse(m21); - l21 = confuse(m21); - } - - /// Function(List x) Function(int x) - void testF22() { - Expect.isTrue(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - // In checked mode, verifies the type. - Function(List x) Function(int x) l22; - // The static function f22 sets `T` to `int`. - if (tIsInt) { - x22 = f22 as dynamic; - l22 = f22 as dynamic; - x22 = confuse(f22); - l22 = confuse(f22); - } - - Expect.isTrue(m22 is F22); - Expect.isTrue(m22 is Function(List x) Function(int x)); - Expect.isTrue(confuse(m22) is F22); - // In checked mode, verifies the type. - x22 = m22; - l22 = m22; - x22 = confuse(m22); - l22 = confuse(m22); - // The static function has its T always set to int. - Expect.isTrue(f22 is F22); - Expect.isFalse(f22 is F22); - Expect.isTrue(confuse(f22) is F22); - Expect.isFalse(confuse(f22) is F22); - if (tIsBool) { - Expect.throws(() { - x22 = (f22 as dynamic); - }); - Expect.throws(() { - x22 = confuse(f22); - }); - Expect.throws(() { - l22 = (f22 as dynamic); - }); - Expect.throws(() { - l22 = confuse(f22); - }); - } - if (tIsInt || tIsBool) { - Expect.equals(tIsInt, m22 is F22); - Expect.equals(tIsBool, m22 is F22); - Expect.equals(tIsInt, confuse(m22) is F22); - Expect.equals(tIsBool, confuse(m22) is F22); - } - } - - /// void Function() Function(int x) - void testF23() { - Expect.isTrue(f23 is F23); - Expect.isTrue(confuse(f23) is F23); - // In checked mode, verifies the type. - void Function() Function(int x) l23; - // The static function f23 sets `T` to `int`. - if (tIsInt) { - x23 = f23 as dynamic; - l23 = f23 as dynamic; - x23 = confuse(f23); - l23 = confuse(f23); - } - - Expect.isTrue(m23 is F23); - Expect.isTrue(m23 is void Function() Function(int x)); - Expect.isTrue(confuse(m23) is F23); - // In checked mode, verifies the type. - x23 = m23; - l23 = m23; - x23 = confuse(m23); - l23 = confuse(m23); - } -} - -void main() { - new U9().runTests(); - new U9(tIsInt: true).runTests(); - new U9(tIsBool: true).runTests(); -} diff --git a/tests/language_2/function_type/test_generator.dart b/tests/language_2/function_type/test_generator.dart deleted file mode 100644 index 48265aa8941..00000000000 --- a/tests/language_2/function_type/test_generator.dart +++ /dev/null @@ -1,804 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'dart:io'; - -// By convention: -// -// T: generic type of typedef. -// A: generic type of returned function. -// B: generic type of function. -// -// Example: -// typedef F: Function Function(); -// -// We only use: Function, List, int (and function types). -// We import 'dart:core' directly and with prefix 'core'. - -abstract class Printable { - /// Builds a descriptive string that can be used as an identifier. - /// - /// The string is mainly used for disambiguation, and not for its readability. - void writeIdentifier(StringBuffer buffer); -} - -abstract class TypeLike implements Printable { - /// Prints `this` as valid Dart code for a Type. - void writeType(StringBuffer buffer); - - /// Whether this type uses T in some way. - bool get usesT; - - /// Whether this type uses T in a return (covariant) position. - /// - /// For example: `T`, `List`, `T Function()`, or `Function(Function(T))`. - bool get returnsT; - - /// Whether this type uses T in a parameter (contravariant) position. - /// - /// For example, `Function(T)`, `Function(List)`, or - /// `Function(T Function())`. - bool get takesT; -} - -/// Provides a unique integer for every parameter in a function. -int parameterNameCounter = 0; - -/// Whether `T` should be replaced with `int`. -bool shouldReplaceTWithInt = false; - -class Parameter implements TypeLike { - final TypeLike type; - final String name; - - Parameter(this.type, this.name); - - // Type or name can be null. - @override - writeIdentifier(buffer) { - if (type == null) { - buffer.write("null"); - } else { - type.writeIdentifier(buffer); - } - buffer.write("_"); - buffer.write(name); - } - - void writeType(StringBuffer buffer) { - assert(type != null || name != null); - if (name == null) { - type.writeType(buffer); - } else if (type == null) { - buffer.write(name); - } else { - type.writeType(buffer); - buffer.write(" "); - buffer.write(name); - } - } - - void writeInFunction(StringBuffer buffer) { - assert(type != null || name != null); - if (name == null) { - type.writeType(buffer); - buffer.write(" x"); - buffer.write(parameterNameCounter++); - } else if (type == null) { - buffer.write(name); - } else { - type.writeType(buffer); - buffer.write(" "); - buffer.write(name); - } - } - - bool operator ==(other) { - return other is Parameter && name == other.name && type == other.type; - } - - int get hashCode { - return ((name.hashCode * 37) ^ type.hashCode) & 0xFFFFFFFF; - } - - bool get usesT => type?.usesT ?? false; - bool get takesT => type?.takesT ?? false; - bool get returnsT => type?.returnsT ?? false; -} - -class GenericParameter implements TypeLike { - final String name; - final TypeLike bound; - - GenericParameter(this.name, [this.bound]); - - // Bound may be null. - @override - writeIdentifier(buffer) { - buffer.write(name); - buffer.write("_"); - if (bound == null) { - buffer.write("null"); - } else { - bound.writeIdentifier(buffer); - } - } - - @override - writeType(buffer) { - buffer.write(name); - if (bound != null) { - buffer.write(" extends "); - bound.writeType(buffer); - } - } - - bool operator ==(other) { - return other is GenericParameter && - name == other.name && - bound == other.bound; - } - - int get hashCode { - return ((name.hashCode * 23) ^ bound.hashCode) & 0xFFFFFFFF; - } - - bool get usesT => bound?.usesT ?? false; - bool get takesT => bound?.takesT ?? false; - bool get returnsT => bound?.returnsT ?? false; -} - -void _describeList(StringBuffer buffer, List list) { - if (list == null) { - buffer.write("0"); - return; - } - buffer.write(list.length.toString()); - buffer.write("_"); - for (int i = 0; i < list.length; i++) { - if (i != 0) buffer.write("_"); - list[i].writeIdentifier(buffer); - } -} - -void _writeTypes(StringBuffer buffer, List list, - [String prefix = "", String postfix = ""]) { - if (list == null || list.isEmpty) return; - buffer.write(prefix); - for (int i = 0; i < list.length; i++) { - if (i != 0) buffer.write(", "); - list[i].writeType(buffer); - } - buffer.write(postfix); -} - -void _writeParameters( - StringBuffer buffer, List list, bool inFunction, - [String prefix = "", String postfix = ""]) { - if (list == null || list.isEmpty) return; - buffer.write(prefix); - for (int i = 0; i < list.length; i++) { - if (i != 0) buffer.write(", "); - if (inFunction) { - list[i].writeInFunction(buffer); - } else { - list[i].writeType(buffer); - } - } - buffer.write(postfix); -} - -bool _listUsesT(List elements) { - if (elements == null) return false; - return elements.any((p) => p.usesT); -} - -bool _listEquals(List list1, List list2) { - if (list1 == list2) return true; // Also covers both being null. - if (list1 == null || list2 == null) return false; - for (int i = 0; i < list1.length; i++) { - if (list1[i] != list2[i]) return false; - } - return true; -} - -int _listHash(List list) { - if (list == null) return null.hashCode; - int result = 71; - for (int i = 0; i < list.length; i++) { - result = ((result * 11) ^ list[i].hashCode) & 0xFFFFFFFF; - } - return result; -} - -class FunctionType implements TypeLike { - final TypeLike returnType; - final List generic; - final List required; - final List optional; - final List named; - - FunctionType(this.returnType, this.generic, this.required, - [this.optional, this.named]); - - @override - writeIdentifier(buffer) { - buffer.write("Fun_"); - if (returnType == null) { - buffer.write("null"); - } else { - returnType.writeIdentifier(buffer); - } - buffer.write("_"); - _describeList(buffer, generic); - buffer.write("_"); - _describeList(buffer, required); - buffer.write("_"); - _describeList(buffer, optional); - buffer.write("_"); - _describeList(buffer, named); - } - - @override - writeType(buffer) { - if (returnType != null) { - returnType.writeType(buffer); - buffer.write(" "); - } - buffer.write("Function"); - if (generic != null) _writeTypes(buffer, generic, "<", ">"); - buffer.write("("); - bool notInFunction = true; - _writeParameters(buffer, required, notInFunction); - if ((optional != null || named != null) && - required != null && - required.isNotEmpty) { - buffer.write(", "); - } - _writeParameters(buffer, optional, notInFunction, "[", "]"); - _writeParameters(buffer, named, notInFunction, "{", "}"); - buffer.write(")"); - } - - /// Writes this type as if it was a function. - void writeFunction(StringBuffer buffer, String name, {bool replaceT: true}) { - shouldReplaceTWithInt = replaceT; - parameterNameCounter = 0; - - if (returnType != null) { - returnType.writeType(buffer); - buffer.write(" "); - } - - buffer.write(name); - if (generic != null) _writeTypes(buffer, generic, "<", ">"); - buffer.write("("); - bool inFunction = true; - _writeParameters(buffer, required, inFunction); - if ((optional != null || named != null) && - required != null && - required.isNotEmpty) { - buffer.write(", "); - } - _writeParameters(buffer, optional, inFunction, "[", "]"); - _writeParameters(buffer, named, inFunction, "{", "}"); - buffer.write(") => null;"); - - shouldReplaceTWithInt = false; - } - - bool operator ==(other) { - return returnType == other.returnType && - _listEquals(generic, other.generic) && - _listEquals(required, other.required) && - _listEquals(optional, other.optional) && - _listEquals(named, other.named); - } - - int get hashCode { - return ((returnType.hashCode * 13) ^ - (_listHash(generic) * 17) ^ - (_listHash(required) * 53) ^ - (_listHash(optional) ^ 31) ^ - (_listHash(named) * 87)) & - 0xFFFFFFFF; - } - - bool get usesT { - return (returnType?.usesT ?? false) || - [generic, required, optional, named].any(_listUsesT); - } - - bool get returnsT { - return (returnType?.returnsT ?? false) || - [generic, required, optional, named] - .any((l) => l?.any((p) => p.takesT) ?? false); - } - - bool get takesT { - return (returnType?.takesT ?? false) || - [generic, required, optional, named] - .any((l) => l?.any((p) => p.returnsT) ?? false); - } - - bool get reifiedTypeUsesT { - return returnType?.usesT ?? returnsT; - } -} - -class NominalType implements TypeLike { - final String prefix; - final String name; - final List generic; - - NominalType(this.name, [this.prefix, this.generic]); - - @override - writeIdentifier(buffer) { - buffer.write(prefix); - buffer.write("_"); - buffer.write(name); - _describeList(buffer, generic); - } - - @override - writeType(buffer) { - if (prefix != null && prefix != "") { - buffer.write(prefix); - buffer.write("."); - } - if (shouldReplaceTWithInt && name == "T") { - buffer.write("int"); - } else { - buffer.write(name); - } - _writeTypes(buffer, generic, "<", ">"); - } - - bool operator ==(other) { - return other is NominalType && prefix == other.prefix && name == other.name; - } - - int get hashCode { - return ((prefix.hashCode * 37) ^ name.hashCode) & 0xFFFFFFFF; - } - - bool get usesT => name == "T" || _listUsesT(generic); - - bool get returnsT => name == "T" || generic?.any((t) => t.returnsT) ?? false; - - bool get takesT => generic?.any((t) => t.takesT) ?? false; -} - -List buildFunctionTypes() { - List as = [ - new GenericParameter("A"), - // new GenericParameter("A", new NominalType("int")), - // new GenericParameter("A", new NominalType("int", "core")), - ]; - List bs = [ - // new GenericParameter("B"), - // new GenericParameter("B", new NominalType("int")), - new GenericParameter("B", new NominalType("int", "core")), - ]; - List basicTypes = [ - new NominalType("int"), - // new NominalType("int", "core"), - // new NominalType("List"), - // new NominalType("List", "core"), - new NominalType("Function"), - new NominalType("List", "", [new NominalType("Function")]), - new NominalType("List", "core", [new NominalType("int", "core")]), - new NominalType("List", "", [new NominalType("T")]), - // new NominalType("List", "", [new NominalType("Function")]), - ]; - - List basicsPlusNull = [ - basicTypes, - [null] - ].expand((x) => x).toList(); - - List basicsPlusNullPlusVoid = [ - basicsPlusNull, - [new NominalType("void")], - ].expand((x) => x).toList(); - - List basicsPlusNullPlusB = [ - basicsPlusNull, - [ - new NominalType("B"), - new NominalType("List", "", [new NominalType("B")]) - ] - ].expand((x) => x).toList(); - - List basicsPlusNullPlusBPlusVoid = [ - basicsPlusNullPlusB, - [new NominalType("void")], - ].expand((x) => x).toList(); - - List basicsPlusNullPlusA = [ - basicsPlusNull, - [ - new NominalType("A"), - new NominalType("List", "", [new NominalType("A")]) - ] - ].expand((x) => x).toList(); - - List basicsPlusNullPlusAPlusVoid = [ - basicsPlusNullPlusA, - [new NominalType("void")], - ].expand((x) => x).toList(); - - List buildFunctionTypes(TypeLike returnType, TypeLike parameterType, - [List generics, - bool generateMoreCombinations = false]) { - List result = []; - - if (parameterType == null) { - // int Function(). - result.add(new FunctionType(returnType, generics, null)); - return result; - } - - // int Function(int x). - result.add(new FunctionType( - returnType, generics, [new Parameter(parameterType, "x")])); - - if (!generateMoreCombinations) return result; - - // int Function([int x]). - result.add(new FunctionType( - returnType, generics, null, [new Parameter(parameterType, "x")])); - // int Function(int, [int x]) - result.add(new FunctionType( - returnType, - generics, - [new Parameter(new NominalType("int"), null)], - [new Parameter(parameterType, "x")])); - // int Function(int x, [int x]) - result.add(new FunctionType( - returnType, - generics, - [new Parameter(new NominalType("int"), "y")], - [new Parameter(parameterType, "x")])); - // int Function(int); - result.add(new FunctionType( - returnType, generics, [new Parameter(parameterType, null)])); - // int Function([int]); - result.add(new FunctionType( - returnType, generics, null, [new Parameter(parameterType, null)])); - // int Function(int, [int]) - result.add(new FunctionType( - returnType, - generics, - [new Parameter(new NominalType("int"), null)], - [new Parameter(parameterType, null)])); - // int Function(int x, [int]) - result.add(new FunctionType( - returnType, - generics, - [new Parameter(new NominalType("int"), "x")], - [new Parameter(parameterType, null)])); - // int Function({int x}). - result.add(new FunctionType( - returnType, generics, null, null, [new Parameter(parameterType, "x")])); - // int Function(int, {int x}) - result.add(new FunctionType( - returnType, - generics, - [new Parameter(new NominalType("int"), null)], - null, - [new Parameter(parameterType, "x")])); - // int Function(int x, {int x}) - result.add(new FunctionType( - returnType, - generics, - [new Parameter(new NominalType("int"), "y")], - null, - [new Parameter(parameterType, "x")])); - return result; - } - - // The "smaller" function types. May also be used non-nested. - List functionTypes = []; - - for (TypeLike returnType in basicsPlusNullPlusVoid) { - for (TypeLike parameterType in basicsPlusNull) { - bool generateMoreCombinations = true; - functionTypes.addAll(buildFunctionTypes( - returnType, parameterType, null, generateMoreCombinations)); - } - } - - // These use `B` from the generic type of the enclosing function. - List returnFunctionTypesB = []; - for (TypeLike returnType in basicsPlusNullPlusBPlusVoid) { - TypeLike parameterType = new NominalType("B"); - returnFunctionTypesB.addAll(buildFunctionTypes(returnType, parameterType)); - } - for (TypeLike parameterType in basicsPlusNull) { - TypeLike returnType = new NominalType("B"); - returnFunctionTypesB.addAll(buildFunctionTypes(returnType, parameterType)); - } - - for (TypeLike returnType in basicsPlusNullPlusAPlusVoid) { - for (TypeLike parameterType in basicsPlusNullPlusA) { - for (GenericParameter a in as) { - functionTypes - .addAll(buildFunctionTypes(returnType, parameterType, [a])); - } - } - } - - List types = []; - types.addAll(functionTypes); - - // Now add some higher-order function types. - for (TypeLike returnType in functionTypes) { - types.addAll(buildFunctionTypes(returnType, null)); - types.addAll(buildFunctionTypes(returnType, new NominalType("int"))); - for (var b in bs) { - types.addAll(buildFunctionTypes(returnType, null, [b])); - types.addAll(buildFunctionTypes(returnType, new NominalType("int"), [b])); - } - } - for (TypeLike returnType in returnFunctionTypesB) { - for (var b in bs) { - types.addAll(buildFunctionTypes(returnType, null, [b])); - types.addAll(buildFunctionTypes(returnType, new NominalType("int"), [b])); - } - } - - return types; -} - -final String HEADER = """ -// Copyright (c) 2016, 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. - -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. -// GENERATED - DON'T EDIT. - -import 'dart:core'; -import 'dart:core' as core; -import 'package:expect/expect.dart'; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(f) => f; -"""; - -class Unit { - int typeCounter = 0; - final String name; - final StringBuffer typedefs = new StringBuffer(); - final StringBuffer globals = new StringBuffer(); - final StringBuffer tests = new StringBuffer(); - final StringBuffer fields = new StringBuffer(); - final StringBuffer statics = new StringBuffer(); - final StringBuffer testMethods = new StringBuffer(); - final StringBuffer methods = new StringBuffer(); - - Unit(this.name); - - void write(StringBuffer buffer) { - buffer.write(""" -$HEADER - -$typedefs - -$globals - -class $name { - final bool tIsBool; - final bool tIsInt; - final bool tIsDynamic; - -$fields - - $name({this.tIsBool: false, this.tIsInt: false}) - : tIsDynamic = !tIsBool && !tIsInt; - -$methods - - runTests() {\n$tests } - -$testMethods -} - -void main() { - new $name().runTests(); - new $name(tIsInt: true).runTests(); - new $name(tIsBool: true).runTests(); -} - """); - } -} - -final TEST_METHOD_HEADER = """ - /// #typeCode - void #testName() {"""; - -// Tests that apply for every type. -final COMMON_TESTS_TEMPLATE = """ - Expect.isTrue(#staticFunName is #typeName); - Expect.isTrue(confuse(#staticFunName) is #typeName); - // In checked mode, verifies the type. - #typeCode #localName; - // The static function #staticFunName sets `T` to `int`. - if (tIsInt) { - #fieldName = #staticFunName as dynamic; - #localName = #staticFunName as dynamic; - #fieldName = confuse(#staticFunName); - #localName = confuse(#staticFunName); - } - - Expect.isTrue(#methodFunName is #typeName); - Expect.isTrue(#methodFunName is #typeCode); - Expect.isTrue(confuse(#methodFunName) is #typeName); - // In checked mode, verifies the type. - #fieldName = #methodFunName; - #localName = #methodFunName; - #fieldName = confuse(#methodFunName); - #localName = confuse(#methodFunName);"""; - -// Tests that depend on the typedef "T" argument. -// -// These tests are executed when the surrounding class is instantiated with -// its generic type set to `int`, `dynamic` or `bool`. In the latter case, the -// class field `tIsBool` is set to true. - -// While the types themselves are not affected by the class` `T`, the methods -// of the class may use `T`: -// -// For example: -// class A { -// f(List x) {} -// } -final TYPEDEF_T_TESTS_TEMPLATE = """ - // The static function has its T always set to int. - Expect.isTrue(#staticFunName is #typeName); - Expect.isFalse(#staticFunName is #typeName); - Expect.isTrue(confuse(#staticFunName) is #typeName); - Expect.isFalse(confuse(#staticFunName) is #typeName); - if (tIsBool) { - Expect.throws(() { #fieldName = (#staticFunName as dynamic); }); - Expect.throws(() { #fieldName = confuse(#staticFunName); }); - Expect.throws(() { #localName = (#staticFunName as dynamic); }); - Expect.throws(() { #localName = confuse(#staticFunName); }); - } - if (tIsInt || tIsBool) { - Expect.equals(#isIntValue, #methodFunName is #typeName); - Expect.equals(#isBoolValue, #methodFunName is #typeName); - Expect.equals(#isIntValue, confuse(#methodFunName) is #typeName); - Expect.equals(#isBoolValue, confuse(#methodFunName) is #typeName); - } -"""; - -final TEST_METHOD_FOOTER = " }"; - -String createTypeName(int id) => "F$id"; -String createStaticFunName(int id) => "f$id"; -String createMethodFunName(int id) => "m$id"; -String createFieldName(int id) => "x$id"; -String createLocalName(int id) => "l$id"; -String createTestName(int id) => "test${createTypeName(id)}"; - -String createTypeCode(FunctionType type) { - StringBuffer typeBuffer = new StringBuffer(); - type.writeType(typeBuffer); - return typeBuffer.toString(); -} - -String createStaticFunCode(FunctionType type, int id) { - StringBuffer staticFunBuffer = new StringBuffer(); - type.writeFunction(staticFunBuffer, createStaticFunName(id)); - return staticFunBuffer.toString(); -} - -String createMethodFunCode(FunctionType type, int id) { - StringBuffer methodFunBuffer = new StringBuffer(); - type.writeFunction(methodFunBuffer, createMethodFunName(id), replaceT: false); - return methodFunBuffer.toString(); -} - -String createTestMethodFunCode(FunctionType type, String typeCode, int id) { - var tIsInt = type.reifiedTypeUsesT ? 'tIsInt' : 'true'; - var tIsBool = type.reifiedTypeUsesT ? 'tIsBool' : 'true'; - - String fillTemplate(String template, int id) { - var result = template - .replaceAll("#typeName", createTypeName(id)) - .replaceAll("#staticFunName", createStaticFunName(id)) - .replaceAll("#methodFunName", createMethodFunName(id)) - .replaceAll("#fieldName", createFieldName(id)) - .replaceAll("#localName", createLocalName(id)) - .replaceAll("#testName", createTestName(id)) - .replaceAll("#typeCode", typeCode) - .replaceAll("#isIntValue", tIsInt) - .replaceAll("#isBoolValue", tIsBool); - assert(!result.contains("#")); - return result; - } - - String commonTests = fillTemplate(COMMON_TESTS_TEMPLATE, id); - String genericTTests = ""; - if (type.usesT) { - genericTTests = fillTemplate(TYPEDEF_T_TESTS_TEMPLATE, id); - } - return """ -${fillTemplate(TEST_METHOD_HEADER, id)} -$commonTests -$genericTTests -$TEST_METHOD_FOOTER -"""; -} - -void generateTests() { - // Keep methods and classes smaller by distributing over several different - // classes. - List units = []; - for (int i = 0; i < 100; i++) { - units.add(new Unit("U$i")); - } - - var types = buildFunctionTypes(); - - int unitCounter = 0; - types.forEach((FunctionType type) { - Unit unit = units[unitCounter % units.length]; - unitCounter++; - int typeCounter = unit.typeCounter++; - - String typeName = createTypeName(typeCounter); - String fieldName = createFieldName(typeCounter); - String testName = createTestName(typeCounter); - - String typeCode = createTypeCode(type); - String staticFunCode = createStaticFunCode(type, typeCounter); - String methodFunCode = createMethodFunCode(type, typeCounter); - String testMethodCode = - createTestMethodFunCode(type, typeCode, typeCounter); - - unit.typedefs.writeln("typedef $typeName = $typeCode;"); - unit.globals.writeln(staticFunCode); - unit.fields.writeln(" $typeCode $fieldName;"); - unit.methods.writeln(" $methodFunCode"); - unit.testMethods.writeln("$testMethodCode"); - unit.tests.writeln(" $testName();"); - }); - - for (int i = 0; i < units.length; i++) { - var unit = units[i]; - var buffer = new StringBuffer(); - unit.write(buffer); - var path = Platform.script.resolve("function_type${i}_test.dart").path; - new File(path).writeAsStringSync(buffer.toString()); - } -} - -void printUsage() { - print(""" -Generates function type tests. - -All tests are generated in the same directory as this script. -"""); -} - -void main(List arguments) { - if (arguments.length != 0) { - printUsage(); - return; - } - generateTests(); -} diff --git a/tests/language_2/generic/async_star_test.dart b/tests/language_2/generic/async_star_test.dart deleted file mode 100644 index 66b6eb3d441..00000000000 --- a/tests/language_2/generic/async_star_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -import 'dart:async'; - -Stream foo(T x) async* { - for (int i = 0; i < 3; i++) { - yield x; - } -} - -main() async { - await for (var x in foo(1)) { - Expect.equals(1, x); - } -} diff --git a/tests/language_2/generic/async_test.dart b/tests/language_2/generic/async_test.dart deleted file mode 100644 index 10310a89666..00000000000 --- a/tests/language_2/generic/async_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -import 'dart:async'; - -Future foo(T x) async => x; - -main() async { - Expect.equals(1, await foo(1)); -} diff --git a/tests/language_2/generic/cascaded_forwarding_stubs_generic_test.dart b/tests/language_2/generic/cascaded_forwarding_stubs_generic_test.dart deleted file mode 100644 index d97fa3dca93..00000000000 --- a/tests/language_2/generic/cascaded_forwarding_stubs_generic_test.dart +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class C { - void f(B x, B y) {} -} - -abstract class I1 { - void f(T x, B y); -} - -// D contains a forwarding stub for f which ensures that `x` is type checked. -class D extends C implements I1 {} - -abstract class I2 { - void f(B x, T y); -} - -// E contains a forwarding stub for f which ensures that `y` is type checked. -class E extends D implements I2 {} - -main() { - E e = new E(); - C c = e; - I1 i1 = e; - D d = e; - I2 i2 = e; - A a = new A(); - B b = new B(); - c.f(b, b); // No error - i1.f(b, b); // No error - d.f(b, b); // No error - i2.f(b, b); // No error - e.f(b, b); // No error - Expect.throwsTypeError(() { - i1.f(a, b); - }); - Expect.throwsTypeError(() { - d.f(a, b); - }); - Expect.throwsTypeError(() { - i2.f(b, a); - }); - Expect.throwsTypeError(() { - e.f(a, b); - }); - Expect.throwsTypeError(() { - e.f(b, a); - }); -} diff --git a/tests/language_2/generic/closure_test.dart b/tests/language_2/generic/closure_test.dart deleted file mode 100644 index 91845efd58f..00000000000 --- a/tests/language_2/generic/closure_test.dart +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2014, 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 test program for constructors and initializers. - -// @dart = 2.9 - -// Check that generic closures are properly instantiated. - -import 'package:expect/expect.dart'; - -typedef T F(T x); -typedef R G(T x); - -class C { - get f => (T x) => x; - T g(T x) => x; -} - -main() { - { - var c = new C(); - var f = c.f; - var g = c.g; - Expect.equals("(int) => int", f.runtimeType.toString()); //# 01: ok - Expect.equals("(Object) => int", g.runtimeType.toString()); //# 01: ok - Expect.equals(21, f(21)); - Expect.equals(14, g(14)); - Expect.isTrue(f is Function); - Expect.isTrue(g is Function); - Expect.isTrue(f is! F); - Expect.isTrue(g is F); - Expect.isTrue(f is F); - Expect.isTrue(g is F); - Expect.isTrue(f is! F); - Expect.isTrue(g is! F); - Expect.isTrue(f is G); - Expect.isTrue(g is G); - Expect.isTrue(f is! G); - Expect.isTrue(g is! G); - Expect.isTrue(f is! G); - Expect.isTrue(g is G); - } - - { - var c = new C(); - var f = c.f; - var g = c.g; - Expect.equals("(bool) => bool", f.runtimeType.toString()); //# 01: ok - Expect.equals("(Object) => bool", g.runtimeType.toString()); //# 01: ok - Expect.isTrue(f is! F); - Expect.isTrue(g is F); - Expect.isTrue(f is! F); - Expect.isTrue(g is! F); - Expect.isTrue(f is F); - Expect.isTrue(g is F); - } - - { - var c = new C(); - var f = c.f; - var g = c.g; - Expect.equals("(dynamic) => dynamic", f.runtimeType.toString()); //# 01: ok - Expect.equals("(Object) => dynamic", g.runtimeType.toString()); //# 01: ok - Expect.isTrue(f is F); - Expect.isTrue(g is F); - Expect.isTrue(f is! F); - Expect.isTrue(g is! F); - Expect.isTrue(f is! F); - Expect.isTrue(g is! F); - } -} diff --git a/tests/language_2/generic/conflicting_generic_interfaces_hierarchy_loop_infinite_test.dart b/tests/language_2/generic/conflicting_generic_interfaces_hierarchy_loop_infinite_test.dart deleted file mode 100644 index 5aba1f1cca8..00000000000 --- a/tests/language_2/generic/conflicting_generic_interfaces_hierarchy_loop_infinite_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2018, 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 test program to test arithmetic operations. - -// @dart = 2.9 - -// There is an interface conflict here due to a loop in the class -// hierarchy leading to an infinite set of implemented types; this loop -// shouldn't cause non-termination. -class A implements B> {} -// ^ -// [analyzer] COMPILE_TIME_ERROR.RECURSIVE_INTERFACE_INHERITANCE -// [cfe] 'A' is a supertype of itself. - -class B implements A> {} -// ^ -// [analyzer] COMPILE_TIME_ERROR.RECURSIVE_INTERFACE_INHERITANCE -// [cfe] 'B' is a supertype of itself. - -main() { - new A(); - new B(); -} diff --git a/tests/language_2/generic/conflicting_generic_interfaces_hierarchy_loop_test.dart b/tests/language_2/generic/conflicting_generic_interfaces_hierarchy_loop_test.dart deleted file mode 100644 index 59caff833e6..00000000000 --- a/tests/language_2/generic/conflicting_generic_interfaces_hierarchy_loop_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2018, 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 test program to test arithmetic operations. - -// @dart = 2.9 - -// There is no interface conflict here, but there is a loop in the class -// hierarchy leading to a finite set of implemented types; this loop -// shouldn't cause non-termination. -class A implements B {} -// ^ -// [analyzer] COMPILE_TIME_ERROR.RECURSIVE_INTERFACE_INHERITANCE -// [cfe] 'A' is a supertype of itself. - -class B implements A {} -// ^ -// [analyzer] COMPILE_TIME_ERROR.RECURSIVE_INTERFACE_INHERITANCE -// [cfe] 'B' is a supertype of itself. - -main() { - new A(); - new B(); -} diff --git a/tests/language_2/generic/conflicting_generic_interfaces_no_conflict_test.dart b/tests/language_2/generic/conflicting_generic_interfaces_no_conflict_test.dart deleted file mode 100644 index 61d4b0c7cfa..00000000000 --- a/tests/language_2/generic/conflicting_generic_interfaces_no_conflict_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2018, 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 test program to test arithmetic operations. - -// @dart = 2.9 - -class I {} - -class A implements I {} - -class B implements I {} - -class C extends A implements B {} - -main() { - new C(); -} diff --git a/tests/language_2/generic/conflicting_generic_interfaces_simple_test.dart b/tests/language_2/generic/conflicting_generic_interfaces_simple_test.dart deleted file mode 100644 index b02cd265445..00000000000 --- a/tests/language_2/generic/conflicting_generic_interfaces_simple_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2018, 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 test program to test arithmetic operations. - -// @dart = 2.9 - -class I {} - -class A implements I {} - -class B implements I {} - -class C extends A implements B {} -// ^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES -// [cfe] 'C' can't implement both 'I' and 'I' - -main() { - new C(); -} diff --git a/tests/language_2/generic/constructor_mixin2_runtime_test.dart b/tests/language_2/generic/constructor_mixin2_runtime_test.dart deleted file mode 100644 index 2d693e3d2b7..00000000000 --- a/tests/language_2/generic/constructor_mixin2_runtime_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -// Test that parameter types are checked correctly in the face of -// mixin application upon a generic constructor. - -import '../dynamic_type_helper.dart'; - -class A { - A(X x); -} - -class B {} - -class C {} - -class D = A with B, C; - -void main() { - var v = 0; - checkNoDynamicTypeError(() => new D(v)); - -} diff --git a/tests/language_2/generic/constructor_mixin2_test.dart b/tests/language_2/generic/constructor_mixin2_test.dart deleted file mode 100644 index a187eed4360..00000000000 --- a/tests/language_2/generic/constructor_mixin2_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2014, 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 - -// Test that parameter types are checked correctly in the face of -// mixin application upon a generic constructor. - -import '../dynamic_type_helper.dart'; - -class A { - A(X x); -} - -class B {} - -class C {} - -class D = A with B, C; - -void main() { - var v = 0; - checkNoDynamicTypeError(() => new D(v)); - checkDynamicTypeError(() => new D(v)); - // ^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'int' can't be assigned to the parameter type 'String'. -} diff --git a/tests/language_2/generic/constructor_mixin3_runtime_test.dart b/tests/language_2/generic/constructor_mixin3_runtime_test.dart deleted file mode 100644 index 1b90efbd261..00000000000 --- a/tests/language_2/generic/constructor_mixin3_runtime_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -// Test that parameter types are checked correctly in the face of -// mixin application upon a generic constructor. - -import '../dynamic_type_helper.dart'; - -class A { - A(X x); -} - -class B {} - -class C1 = A with B; -class C2 = A with B; - -void main() { - var v = 0; - checkNoDynamicTypeError(() => new C1(v)); - -} diff --git a/tests/language_2/generic/constructor_mixin3_test.dart b/tests/language_2/generic/constructor_mixin3_test.dart deleted file mode 100644 index a2e5129a839..00000000000 --- a/tests/language_2/generic/constructor_mixin3_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 - -// Test that parameter types are checked correctly in the face of -// mixin application upon a generic constructor. - -import '../dynamic_type_helper.dart'; - -class A { - A(X x); -} - -class B {} - -class C1 = A with B; -class C2 = A with B; - -void main() { - var v = 0; - checkNoDynamicTypeError(() => new C1(v)); - checkDynamicTypeError(() => new C2(v)); - // ^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'int' can't be assigned to the parameter type 'String'. -} diff --git a/tests/language_2/generic/constructor_mixin_runtime_test.dart b/tests/language_2/generic/constructor_mixin_runtime_test.dart deleted file mode 100644 index 1430c8e4d0b..00000000000 --- a/tests/language_2/generic/constructor_mixin_runtime_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -// Test that parameter types are checked correctly in the face of -// mixin application upon a generic constructor. - -import '../dynamic_type_helper.dart'; - -class A { - A(X x); -} - -class B {} - -class C = A with B; - -void main() { - var v = 0; - checkNoDynamicTypeError(() => new C(v)); - -} diff --git a/tests/language_2/generic/constructor_mixin_test.dart b/tests/language_2/generic/constructor_mixin_test.dart deleted file mode 100644 index e87d5d0c026..00000000000 --- a/tests/language_2/generic/constructor_mixin_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2014, 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 - -// Test that parameter types are checked correctly in the face of -// mixin application upon a generic constructor. - -import '../dynamic_type_helper.dart'; - -class A { - A(X x); -} - -class B {} - -class C = A with B; - -void main() { - var v = 0; - checkNoDynamicTypeError(() => new C(v)); - checkDynamicTypeError(() => new C(v)); - // ^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'int' can't be assigned to the parameter type 'String'. -} diff --git a/tests/language_2/generic/creation_test.dart b/tests/language_2/generic/creation_test.dart deleted file mode 100644 index 40cb4b687c5..00000000000 --- a/tests/language_2/generic/creation_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - shift() => new A(); - swap() => new A(); - first() => new A(); - last() => new A(); - wrap() => new A, A, A>(); -} - -class B extends A {} - -class C extends A {} - -class D extends A {} - -class U {} - -class V {} - -class W {} - -sameType(a, b) => Expect.equals(a.runtimeType, b.runtimeType); - -main() { - A a = new A(); - sameType(new A(), a.shift()); - sameType(new A(), a.swap()); - sameType(new A(), a.first()); - sameType(new A(), a.last()); - sameType(new A, A, A>(), a.wrap()); - B b = new B(); - sameType(new A, A, A>(), b.wrap()); - C c = new C(); - sameType(new A, A, A>(), c.wrap()); - D d = new D(); - sameType(new A, A, A>(), d.wrap()); -} diff --git a/tests/language_2/generic/deep_test.dart b/tests/language_2/generic/deep_test.dart deleted file mode 100644 index 7ebf7ea6268..00000000000 --- a/tests/language_2/generic/deep_test.dart +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Dart test for deeply nested generic types. - -/** A natural number aka Peano number. */ -abstract class N { - N add1(); - N sub1(); -} - -/** Zero element. */ -class Z implements N { - Z(); - N add1() { - return new S(this); - } - - N sub1() { - throw "Error: sub1(0)"; - } -} - -/** Successor element. */ -class S implements N { - N before; - S(this.before); - N add1() { - return new S>(this); - } - - N sub1() { - // It would be super cool if this could be "new K()". - return before; - } -} - -N NFromInt(int x) { - if (x == 0) - return new Z(); - else - return NFromInt(x - 1).add1(); -} - -int IntFromN(N x) { - if (x is Z) return 0; - if (x is S) return IntFromN(x.sub1()) + 1; - throw "Error"; -} - -bool IsEven(N x) { - if (x is Z) return true; - if (x is S) return false; - if (x is S) return IsEven(x.sub1().sub1()); - throw "Error in IsEven"; -} - -main() { - Expect.isTrue(NFromInt(0) is Z); - Expect.isTrue(NFromInt(1) is S); - Expect.isTrue(NFromInt(2) is S>); - Expect.isTrue(NFromInt(3) is S>>); - Expect.isTrue(NFromInt(10) is S>>>>>>>>>); - - // Negative tests. - Expect.isTrue(NFromInt(0) is! S); - Expect.isTrue(NFromInt(1) is! Z); - Expect.isTrue(NFromInt(1) is! S); - Expect.isTrue(NFromInt(2) is! Z); - Expect.isTrue(NFromInt(2) is! S); - Expect.isTrue(NFromInt(2) is! S>); - - // Greater-than tests - Expect.isTrue(NFromInt(4) is S); // 4 >= 2 - Expect.isTrue(NFromInt(4) is S>); // 4 >= 3 - Expect.isTrue(NFromInt(4) is S>>); // 4 >= 4 - Expect.isTrue(NFromInt(4) is! S>>>); // 4 < 5 - - Expect.isTrue(IsEven(NFromInt(0))); - Expect.isFalse(IsEven(NFromInt(1))); - Expect.isTrue(IsEven(NFromInt(2))); - Expect.isFalse(IsEven(NFromInt(3))); - Expect.isTrue(IsEven(NFromInt(4))); - - Expect.equals(0, IntFromN(NFromInt(0))); - Expect.equals(1, IntFromN(NFromInt(1))); - Expect.equals(2, IntFromN(NFromInt(2))); - Expect.equals(50, IntFromN(NFromInt(50))); -} diff --git a/tests/language_2/generic/f_bounded_equality_test.dart b/tests/language_2/generic/f_bounded_equality_test.dart deleted file mode 100644 index 6d33996199a..00000000000 --- a/tests/language_2/generic/f_bounded_equality_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class Magnitude { - get t => T; -} - -class Real extends Magnitude {} - -class FBound> { - get f => F; -} - -class Bar extends FBound {} - -main() { - var r = new Real(); - Expect.equals(r.runtimeType, Real); - Expect.equals(r.t, Real); - Expect.equals(r.runtimeType, r.t); - - var b = new Bar(); - Expect.equals(b.runtimeType, Bar); - Expect.equals(b.f, Bar); - Expect.equals(b.runtimeType, b.f); -} diff --git a/tests/language_2/generic/f_bounded_quantification2_test.dart b/tests/language_2/generic/f_bounded_quantification2_test.dart deleted file mode 100644 index 9c3dc43998d..00000000000 --- a/tests/language_2/generic/f_bounded_quantification2_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test for F-Bounded Quantification. Regression test for issue 9291. - -class Entities> implements EntitiesApi {} - -class ConceptEntity> implements EntityApi {} - -abstract class EntityApi> {} - -abstract class EntitiesApi> {} - -class Concept extends ConceptEntity {} - -main() { - new ConceptEntity(); -} diff --git a/tests/language_2/generic/f_bounded_quantification3_test.dart b/tests/language_2/generic/f_bounded_quantification3_test.dart deleted file mode 100644 index e8a7da5337e..00000000000 --- a/tests/language_2/generic/f_bounded_quantification3_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test for F-Bounded Quantification. - -class FBound1, F2 extends FBound2> { - Test() { - new FBound1(); - new FBound2(); - } -} - -class FBound2, F2 extends FBound2> { - Test() { - new FBound1(); - new FBound2(); - } -} - -class Bar extends FBound1 {} - -class Baz extends FBound2 {} - -main() { - new FBound1().Test(); - new FBound2().Test(); -} diff --git a/tests/language_2/generic/f_bounded_quantification4_test.dart b/tests/language_2/generic/f_bounded_quantification4_test.dart deleted file mode 100644 index 154628639a3..00000000000 --- a/tests/language_2/generic/f_bounded_quantification4_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test for F-Bounded Quantification. - -import "package:expect/expect.dart"; - -class A> {} - -class B> extends A {} - -class Foo> extends B> {} - -main() { - Expect.equals("Foo>>", new Foo().runtimeType.toString()); -} diff --git a/tests/language_2/generic/f_bounded_quantification5_test.dart b/tests/language_2/generic/f_bounded_quantification5_test.dart deleted file mode 100644 index 3d68ea4c843..00000000000 --- a/tests/language_2/generic/f_bounded_quantification5_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test for F-Bounded Quantification. - -import "package:expect/expect.dart"; - -@pragma("vm:entry-point") -class A> {} - -@pragma("vm:entry-point") -class B {} - -main() { - // Getting "int" when calling toString() on the int type is not required. - // However, we want to keep the original names for the most common core - // types so we make sure to handle these specifically in the compiler. - Expect.equals("A>", new A>().runtimeType.toString()); -} diff --git a/tests/language_2/generic/f_bounded_quantification_runtime_test.dart b/tests/language_2/generic/f_bounded_quantification_runtime_test.dart deleted file mode 100644 index b425012fc20..00000000000 --- a/tests/language_2/generic/f_bounded_quantification_runtime_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -// Test for F-Bounded Quantification. - -class FBound> {} - -class Bar extends FBound {} - -class SubBar extends Bar {} - -class Baz extends FBound> {} - -class SubBaz extends Baz {} - -main() { - FBound fb = new FBound(); - - - FBound> fbb = new FBound>(); - -} diff --git a/tests/language_2/generic/f_bounded_quantification_test.dart b/tests/language_2/generic/f_bounded_quantification_test.dart deleted file mode 100644 index 7ff3b40e9b5..00000000000 --- a/tests/language_2/generic/f_bounded_quantification_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// 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 - -// Test for F-Bounded Quantification. - -class FBound> {} - -class Bar extends FBound {} - -class SubBar extends Bar {} - -class Baz extends FBound> {} - -class SubBaz extends Baz {} - -main() { - FBound fb = new FBound(); - FBound fsb = new FBound(); -//^ -// [cfe] Type argument 'SubBar' doesn't conform to the bound 'FBound' of the type variable 'F' on 'FBound'. - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - // ^ - // [cfe] Type argument 'SubBar' doesn't conform to the bound 'FBound' of the type variable 'F' on 'FBound'. - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - - FBound> fbb = new FBound>(); - FBound> fsbb = new FBound>(); -//^ -// [cfe] Type argument 'SubBaz' doesn't conform to the bound 'FBound' of the type variable 'F' on 'FBound'. - // ^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - // ^ - // [cfe] Type argument 'SubBaz' doesn't conform to the bound 'FBound' of the type variable 'F' on 'FBound'. - // ^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS -} diff --git a/tests/language_2/generic/field_mixin2_test.dart b/tests/language_2/generic/field_mixin2_test.dart deleted file mode 100644 index 425dec93ffb..00000000000 --- a/tests/language_2/generic/field_mixin2_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 - -// Test that generic types in mixins are handled. - -import 'package:expect/expect.dart'; - -class M { - var field = T; -} - -class A {} - -class C1 = Object with M; -class C2 = Object with M; -class C3 = Object with M; - -main() { - Expect.equals(int, new C1().field); - Expect.equals(String, new C1().field); - - Expect.equals(int, new C2().field); - - Expect.equals(String, new C3().field); -} diff --git a/tests/language_2/generic/field_mixin3_test.dart b/tests/language_2/generic/field_mixin3_test.dart deleted file mode 100644 index f801244f604..00000000000 --- a/tests/language_2/generic/field_mixin3_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 - -// Test that generic types in mixins are handled. - -import 'package:expect/expect.dart'; - -class M { - var field = new A() is A; -} - -class A {} - -class C1 = Object with M; -class C2 = Object with M; -class C3 = Object with M; - -main() { - Expect.isTrue(new C1().field); - Expect.isFalse(new C1().field); - - Expect.isTrue(new C2().field); - - Expect.isFalse(new C3().field); -} diff --git a/tests/language_2/generic/field_mixin4_test.dart b/tests/language_2/generic/field_mixin4_test.dart deleted file mode 100644 index df4cfaa09c3..00000000000 --- a/tests/language_2/generic/field_mixin4_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2014, 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 - -// Test that generic types in mixins are handled. - -import 'package:expect/expect.dart'; - -class M { - bool field = () { - try { - throw 0; - } on T catch (e) { - return true; - } catch (e) {} - return false; - }(); -} - -class A {} - -class C1 = Object with M; -class C2 = Object with M; -class C3 = Object with M; - -main() { - Expect.isTrue(new C1().field); - Expect.isFalse(new C1().field); - - Expect.isTrue(new C2().field); - - Expect.isFalse(new C3().field); -} diff --git a/tests/language_2/generic/field_mixin5_test.dart b/tests/language_2/generic/field_mixin5_test.dart deleted file mode 100644 index 0a44e4ef3bc..00000000000 --- a/tests/language_2/generic/field_mixin5_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2014, 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 - -// Test that generic types in mixins are handled. - -import 'package:expect/expect.dart'; - -class M { - Type field = () { - return T; - }(); -} - -class A {} - -class C1 = Object with M; -class C2 = Object with M; -class C3 = Object with M; - -main() { - Expect.equals(int, new C1().field); - Expect.equals(String, new C1().field); - - Expect.equals(int, new C2().field); - - Expect.equals(String, new C3().field); -} diff --git a/tests/language_2/generic/field_mixin6_runtime_test.dart b/tests/language_2/generic/field_mixin6_runtime_test.dart deleted file mode 100644 index 24a6fdef41c..00000000000 --- a/tests/language_2/generic/field_mixin6_runtime_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -// Test that generic types in mixins are handled. - -import 'package:expect/expect.dart'; - -class M { - - T field2 = 0 as dynamic; -} - -class A {} - -class C1 = Object with M; -class C2 = Object with M; -class C3 = Object with M; - -main() { - // no error: 0 is an int - new C1(); - new C2(); - - // type error: 0 is not a string - Expect.throwsTypeError(() => new C1()); - Expect.throws(() => new C3()); -} diff --git a/tests/language_2/generic/field_mixin6_test.dart b/tests/language_2/generic/field_mixin6_test.dart deleted file mode 100644 index 8bd5366309e..00000000000 --- a/tests/language_2/generic/field_mixin6_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2014, 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 - -// Test that generic types in mixins are handled. - -import 'package:expect/expect.dart'; - -class M { - T field1 = 0; - // ^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'int' can't be assigned to a variable of type 'T'. - T field2 = 0 as dynamic; -} - -class A {} - -class C1 = Object with M; -class C2 = Object with M; -class C3 = Object with M; - -main() { - // no error: 0 is an int - new C1(); - new C2(); - - // type error: 0 is not a string - Expect.throwsTypeError(() => new C1()); - Expect.throws(() => new C3()); -} diff --git a/tests/language_2/generic/field_mixin_test.dart b/tests/language_2/generic/field_mixin_test.dart deleted file mode 100644 index c208d19f51a..00000000000 --- a/tests/language_2/generic/field_mixin_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2014, 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 - -// Test that generic types in mixins are handled. - -import 'package:expect/expect.dart'; - -class M { - var field = new A(); -} - -class A {} - -class C1 = Object with M; -class C2 = Object with M; -class C3 = Object with M; - -main() { - Expect.isTrue(new C1().field is A); - Expect.isFalse(new C1().field is A); - Expect.isFalse(new C1().field is A); - Expect.isTrue(new C1().field is A); - - Expect.isTrue(new C2().field is A); - Expect.isFalse(new C2().field is A); - - Expect.isFalse(new C3().field is A); - Expect.isTrue(new C3().field is A); -} diff --git a/tests/language_2/generic/function_bounds_test.dart b/tests/language_2/generic/function_bounds_test.dart deleted file mode 100644 index f5690efe54d..00000000000 --- a/tests/language_2/generic/function_bounds_test.dart +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) 2017, 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 - -// VMOptions=--lazy-dispatchers -// VMOptions=--no-lazy-dispatchers - -import 'dart:math'; -import 'package:expect/expect.dart'; - -Type getType() => T; - -void testInstantiateToBounds() { - f() => [T, U]; - g, U extends int>() => [T, U]; - h(T x, U y) => [T, U]; - - // Check that instantiate to bounds creates the correct type arguments - // during dynamic calls. - Expect.listEquals([num, num], (f as dynamic)()); - Expect.listEquals([getType>(), int], (g as dynamic)()); - Expect.listEquals([num, num], (h as dynamic)(null, null)); - - // Check that when instantiate to bounds creates a super-bounded type argument - // during a dynamic call, an error is thrown. - i>() => null; - j, S extends T>() => null; - Expect.throwsTypeError(() => (i as dynamic)(), "Super bounded type argument"); - Expect.throwsTypeError(() => (j as dynamic)(), "Super bounded type argument"); -} - -void testChecksBound() { - f(T x) => x; - g(T x, U y) => x; - - // Check that arguments are checked against the correct types when instantiate - // to bounds produces a type argument during a dynamic call. - Expect.equals((f as dynamic)(42), 42); - Expect.equals((g as dynamic)(42.0, 100), 42.0); - Expect.throwsTypeError(() => (f as dynamic)('42'), "Argument check"); - Expect.throwsTypeError(() => (g as dynamic)('hi', 100), "Argument check"); - - // Check that an actual type argument is checked against the bound during a - // dynamic call. - Expect.equals((f as dynamic)(42), 42); - Expect.equals((g as dynamic)(42.0, 100), 42.0); - Expect.throwsTypeError(() => (g as dynamic)(42.0, 100), - "Type argument bounds check"); - Expect.throwsTypeError( - () => (f as dynamic)(42), "Type argument bounds check"); - Expect.throwsTypeError(() => (g as dynamic)(42.0, 100), - "Type argument bounds check"); - Expect.throwsTypeError(() => (g as dynamic)(42.0, 100), - "Type argument bounds check"); -} - -typedef G = num Function(T x); - -typedef F = Object Function(T x); - -void testSubtype() { - num f(T x) => x + 2; - dynamic d = f; - - // Check that casting to an equal generic function type works - Expect.equals((f as G)(40), 42); - Expect.equals((d as G)(40), 42); - - // Check that casting to a more general generic function type works - Expect.equals((f as F)(40), 42); - Expect.equals((d as F)(40), 42); - - // Check that casting to a generic function with more specific bounds fails - Expect.throwsTypeError( - () => (f as G), "Generic functions are invariant"); - Expect.throwsTypeError( - () => (d as G), "Generic functions are invariant"); - Expect.throwsTypeError( - () => (f as G), "Generic functions are invariant"); - Expect.throwsTypeError( - () => (d as G), "Generic functions are invariant"); - Expect.throwsTypeError( - () => (f as G), "Generic functions are invariant"); - Expect.throwsTypeError( - () => (d as G), "Generic functions are invariant"); - - // Check that casting to a generic function with a more general bound fails - Expect.throwsTypeError( - () => (f as G), "Generic functions are invariant"); - Expect.throwsTypeError( - () => (d as G), "Generic functions are invariant"); - - // Check that casting to a generic function with an unrelated bound fails - Expect.throwsTypeError( - () => (f as G), "Generic functions are invariant"); - Expect.throwsTypeError( - () => (d as G), "Generic functions are invariant"); -} - -void testToString() { - num f(T x, U y) => min(x, y); - num g(T x, U y) => max(x as num, y as num); - String h(T x, U y) => h.runtimeType.toString(); - - // Check that generic method types are printed in a reasonable way - Expect.isTrue( - new RegExp(r'<(\w+) extends num, (\w+) extends \1>\(\1, \2\) => num') - .hasMatch(f.runtimeType.toString())); - Expect.isTrue(new RegExp(r'<(\w+), (\w+)>\(\1, \2\) => num') - .hasMatch(g.runtimeType.toString())); - Expect.isTrue( - new RegExp(r'<(\w+), (\w+)>\(\1, \2\) => String').hasMatch(h(42, 123.0))); -} - -main() { - testInstantiateToBounds(); //# 01: ok - testToString(); //# 02: ok - testChecksBound(); //# 03: ok - testSubtype(); //# 04: ok -} diff --git a/tests/language_2/generic/function_dcall_test.dart b/tests/language_2/generic/function_dcall_test.dart deleted file mode 100644 index bc73b00c07d..00000000000 --- a/tests/language_2/generic/function_dcall_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2017, 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 - -import 'package:expect/expect.dart'; - -void testCallsToGenericFn() { - T f(T a, T b) => ((a as dynamic) + b) as T; - - var x = (f as dynamic)(40, 2); - Expect.equals(x, 42); - - var y = (f as dynamic)('hi', '!'); - Expect.equals(y, 'hi!'); - - var dd2d = (x, y) => x; - dd2d = f; // implicit - x = (dd2d as dynamic)(40, 2); - Expect.equals(x, 42); - y = (dd2d as dynamic)('hi', '!'); - Expect.equals(y, 'hi!'); -} - -void testGenericFnAsArg() { - h(a) => a as T; - Object foo(f(Object a), Object a) => f(a); - Expect.throws(() => foo(h as dynamic, 42)); - - var int2int = (int x) => x; - T bar(x) => x as T; - dynamic list = [1, 2, 3]; - Expect.throws(() => list.map(bar)); - int2int = bar; - Expect.listEquals([1, 2, 3], list.map(int2int).toList()); -} - -typedef T2T = T Function(T t); -void testGenericFnAsGenericFnArg() { - h(a) => a as T; - S foo(T2T f, S a) => f(a); - Expect.equals(foo(h, 42), 42); - Expect.equals(foo(h, 42), 42); - Expect.equals(foo(h as dynamic, 42), 42); - Expect.equals(foo(h as dynamic, 42), 42); -} - -void testGenericFnTypeToString() { - T f(T a) => a; - Expect.isTrue( - f.runtimeType.toString().contains(RegExp(r'<(\w+)>\(\1\) => \1'))); -} - -main() { - testCallsToGenericFn(); - testGenericFnAsArg(); - testGenericFnAsGenericFnArg(); - testGenericFnTypeToString(); //# 01: ok -} diff --git a/tests/language_2/generic/function_subtype_parametrized_typedef_runtime_1_test.dart b/tests/language_2/generic/function_subtype_parametrized_typedef_runtime_1_test.dart deleted file mode 100644 index 56e3910ee6a..00000000000 --- a/tests/language_2/generic/function_subtype_parametrized_typedef_runtime_1_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Test of the subtype relationship that includes parametrized typedefs and -// invariant occurrences of types. - -typedef H = void Function(); - -class A {} - -class B extends A {} - -class C extends B {} - -void foo(H ha, H hb, H hc) { - H haa = ha; - - - - - - - - - - -} - -main() {} diff --git a/tests/language_2/generic/function_subtype_parametrized_typedef_runtime_2_test.dart b/tests/language_2/generic/function_subtype_parametrized_typedef_runtime_2_test.dart deleted file mode 100644 index 9f93afa43a7..00000000000 --- a/tests/language_2/generic/function_subtype_parametrized_typedef_runtime_2_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Test of the subtype relationship that includes parametrized typedefs and -// invariant occurrences of types. - -typedef H = void Function(); - -class A {} - -class B extends A {} - -class C extends B {} - -void foo(H ha, H hb, H hc) { - - - - - - H hbb = hb; - - - - - -} - -main() {} diff --git a/tests/language_2/generic/function_subtype_parametrized_typedef_runtime_3_test.dart b/tests/language_2/generic/function_subtype_parametrized_typedef_runtime_3_test.dart deleted file mode 100644 index 9c861078e99..00000000000 --- a/tests/language_2/generic/function_subtype_parametrized_typedef_runtime_3_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Test of the subtype relationship that includes parametrized typedefs and -// invariant occurrences of types. - -typedef H = void Function(); - -class A {} - -class B extends A {} - -class C extends B {} - -void foo(H ha, H hb, H hc) { - - - - - - - - - - - H hcc = hc; -} - -main() {} diff --git a/tests/language_2/generic/function_subtype_parametrized_typedef_runtime_test.dart b/tests/language_2/generic/function_subtype_parametrized_typedef_runtime_test.dart deleted file mode 100644 index 7bb124babd9..00000000000 --- a/tests/language_2/generic/function_subtype_parametrized_typedef_runtime_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Test of the subtype relationship that includes parametrized typedefs and -// invariant occurrences of types. - -typedef H = void Function(); - -class A {} - -class B extends A {} - -class C extends B {} - -void foo(H ha, H hb, H hc) { - - - - - - - - - - - -} - -main() {} diff --git a/tests/language_2/generic/function_subtype_parametrized_typedef_test.dart b/tests/language_2/generic/function_subtype_parametrized_typedef_test.dart deleted file mode 100644 index 1df3b9d0048..00000000000 --- a/tests/language_2/generic/function_subtype_parametrized_typedef_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test of the subtype relationship that includes parametrized typedefs and -// invariant occurrences of types. - -typedef H = void Function(); - -class A {} - -class B extends A {} - -class C extends B {} - -void foo(H ha, H hb, H hc) { - H haa = ha; - H hab = hb; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'void Function()' can't be assigned to a variable of type 'void Function()'. - H hac = hc; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'void Function()' can't be assigned to a variable of type 'void Function()'. - - H hba = ha; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'void Function()' can't be assigned to a variable of type 'void Function()'. - H hbb = hb; - H hbc = hc; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'void Function()' can't be assigned to a variable of type 'void Function()'. - - H hca = ha; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'void Function()' can't be assigned to a variable of type 'void Function()'. - H hcb = hb; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'void Function()' can't be assigned to a variable of type 'void Function()'. - H hcc = hc; -} - -main() {} diff --git a/tests/language_2/generic/function_subtype_runtime_1_test.dart b/tests/language_2/generic/function_subtype_runtime_1_test.dart deleted file mode 100644 index a69ca1c14b6..00000000000 --- a/tests/language_2/generic/function_subtype_runtime_1_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Simple test of the subtype relationship on generic function types. - -typedef F1 = void Function(); -typedef F2 = void Function(); - -void f1() {} -void f2() {} - -void foo() { - F1 f11 = f1; - - - - -} - -main() {} diff --git a/tests/language_2/generic/function_subtype_runtime_2_test.dart b/tests/language_2/generic/function_subtype_runtime_2_test.dart deleted file mode 100644 index 18f49106063..00000000000 --- a/tests/language_2/generic/function_subtype_runtime_2_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Simple test of the subtype relationship on generic function types. - -typedef F1 = void Function(); -typedef F2 = void Function(); - -void f1() {} -void f2() {} - -void foo() { - - - - - F2 f22 = f2; -} - -main() {} diff --git a/tests/language_2/generic/function_subtype_runtime_test.dart b/tests/language_2/generic/function_subtype_runtime_test.dart deleted file mode 100644 index 9f45d65bedb..00000000000 --- a/tests/language_2/generic/function_subtype_runtime_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Simple test of the subtype relationship on generic function types. - -typedef F1 = void Function(); -typedef F2 = void Function(); - -void f1() {} -void f2() {} - -void foo() { - - - - - -} - -main() {} diff --git a/tests/language_2/generic/function_subtype_test.dart b/tests/language_2/generic/function_subtype_test.dart deleted file mode 100644 index 35e543cc662..00000000000 --- a/tests/language_2/generic/function_subtype_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2018, 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 - -// Simple test of the subtype relationship on generic function types. - -typedef F1 = void Function(); -typedef F2 = void Function(); - -void f1() {} -void f2() {} - -void foo() { - F1 f11 = f1; - F1 f12 = f2; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'void Function()' can't be assigned to a variable of type 'void Function()'. - - F2 f21 = f1; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'void Function()' can't be assigned to a variable of type 'void Function()'. - F2 f22 = f2; -} - -main() {} diff --git a/tests/language_2/generic/function_type_as_type_argument_runtime_1_test.dart b/tests/language_2/generic/function_type_as_type_argument_runtime_1_test.dart deleted file mode 100644 index 0feeeb1c448..00000000000 --- a/tests/language_2/generic/function_type_as_type_argument_runtime_1_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. -// -// VMOptions=--reify-generic-functions - -import "package:expect/expect.dart"; - -T foo(T i) => i; - -void main() { - Expect.equals(42, foo(42)); - - var bar = foo; - Expect.equals(42, bar(42)); - - // Generic function types are not allowed as type arguments. - - - // Type inference must also give an error. - - - // No error if illegal type cannot be inferred. - var dynamicList = [foo]; - Expect.equals(42, (dynamicList[0] as T Function(T))(42)); -} diff --git a/tests/language_2/generic/function_type_as_type_argument_runtime_test.dart b/tests/language_2/generic/function_type_as_type_argument_runtime_test.dart deleted file mode 100644 index c5f49119921..00000000000 --- a/tests/language_2/generic/function_type_as_type_argument_runtime_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. -// -// VMOptions=--reify-generic-functions - -import "package:expect/expect.dart"; - -T foo(T i) => i; - -void main() { - Expect.equals(42, foo(42)); - - var bar = foo; - Expect.equals(42, bar(42)); - - // Generic function types are not allowed as type arguments. - - - // Type inference must also give an error. - - - // No error if illegal type cannot be inferred. - - -} diff --git a/tests/language_2/generic/function_type_as_type_argument_test.dart b/tests/language_2/generic/function_type_as_type_argument_test.dart deleted file mode 100644 index 6dcc8f70393..00000000000 --- a/tests/language_2/generic/function_type_as_type_argument_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2017, 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. -// -// VMOptions=--reify-generic-functions - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -T foo(T i) => i; - -void main() { - Expect.equals(42, foo(42)); - - var bar = foo; - Expect.equals(42, bar(42)); - - // Generic function types are not allowed as type arguments. - List(T)> typedList = (T)>[foo]; -//^ -// [cfe] A generic function type can't be used as a type argument. -// ^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT - - // Type inference must also give an error. - var inferredList = [foo]; - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.COULD_NOT_INFER - // [cfe] Generic function type 'T Function(T)' inferred as a type argument. - - // No error if illegal type cannot be inferred. - var dynamicList = [foo]; - Expect.equals(42, (dynamicList[0] as T Function(T))(42)); -} diff --git a/tests/language_2/generic/function_typedef2_runtime_test.dart b/tests/language_2/generic/function_typedef2_runtime_test.dart deleted file mode 100644 index 9e39010f0c5..00000000000 --- a/tests/language_2/generic/function_typedef2_runtime_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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 test for a function type test that cannot be eliminated at compile time. - -import "package:expect/expect.dart"; - -class A {} - -typedef int F(); - - - - - -typedef K = Function( - Function(A - - )); -typedef L = Function( - { - - bool - - x}); - -typedef M = Function( - { - - bool - - int}); - -foo({bool int}) {} -main() { - bool b = true; - Expect.isFalse(b is L); - Expect.isFalse(b is M); - Expect.isTrue(foo is M); -} diff --git a/tests/language_2/generic/function_typedef2_test.dart b/tests/language_2/generic/function_typedef2_test.dart deleted file mode 100644 index b82b29cbef0..00000000000 --- a/tests/language_2/generic/function_typedef2_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2017, 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 test for a function type test that cannot be eliminated at compile time. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A {} - -typedef int F(); - -typedef G = F; -// ^ -// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED -// [cfe] Can't create typedef from non-function type. -typedef H = int; -// ^ -// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED -// [cfe] Can't create typedef from non-function type. -typedef I = A; -// ^ -// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED -// [cfe] Can't create typedef from non-function type. -typedef J = List; -// ^ -// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED -// [cfe] Can't create typedef from non-function type. -typedef K = Function(Function(A)); -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS -// [cfe] Can't use type arguments with type variable 'A'. -typedef L = Function({x}); -// ^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_CLASS -// [cfe] Type 'x' not found. -// ^ -// [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER -// [cfe] Expected an identifier, but got '}'. - -typedef M = Function({int}); - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] Expected an identifier, but got '}'. - -foo({bool int}) {} -main() { - bool b = true; - Expect.isFalse(b is L); - Expect.isFalse(b is M); - Expect.isTrue(foo is M); -} diff --git a/tests/language_2/generic/function_typedef_test.dart b/tests/language_2/generic/function_typedef_test.dart deleted file mode 100644 index 1902ad1b9c6..00000000000 --- a/tests/language_2/generic/function_typedef_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2017, 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 test for a function type test that cannot be eliminated at compile time. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A {} - -typedef F = Function(List, Function(String), num); -typedef G = Function(List, Function(A), T); - -foo(List x, bar(String y), num z) {} -foo2(List x, bar(String y), num z) {} -foo3(List x, Function(S) y, num z) {} - -main() { - Expect.isTrue(foo is F); - Expect.isTrue(foo is F); - Expect.isTrue(foo is F); - - Expect.isFalse(foo2 is F, //# 01: ok - "sound function types: cannot allow passing List to List"); //# 01: ok - Expect.isTrue(foo2 is F); - Expect.isFalse(foo2 is F); - - Expect.isFalse(foo3 is F); //# 01: ok - Expect.isFalse(foo3 is F); //# 01: ok - Expect.isFalse(foo3 is F); //# 01: ok - - Expect.isFalse(foo is G); //# 01: ok - Expect.isFalse(foo is G); //# 01: ok - Expect.isFalse(foo is G); - - Expect.isFalse(foo2 is G); //# 01: ok - Expect.isFalse(foo2 is G); //# 01: ok - Expect.isFalse(foo2 is G); - - Expect.isFalse(foo3 is G, //# 01: ok - "sound function types: cannot allow passing any Object to num"); //# 01: ok - Expect.isTrue(foo3 is G); - Expect.isFalse(foo3 is G); -} diff --git a/tests/language_2/generic/functions_test.dart b/tests/language_2/generic/functions_test.dart deleted file mode 100644 index 16f674afdcb..00000000000 --- a/tests/language_2/generic/functions_test.dart +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) 2016, 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 - -/// Dart test verifying that the parser can handle type parameterization of -/// function declarations and function invocations. Variant of code from -/// DEP #22, adjusted to use generic top level functions. - -library generic_functions_test; - -import "package:expect/expect.dart"; - -class BinaryTreeNode, V> { - final K _key; - final V _value; - final BinaryTreeNode _left; - final BinaryTreeNode _right; - - BinaryTreeNode(this._key, this._value, - {BinaryTreeNode left: null, BinaryTreeNode right: null}) - : _left = left, - _right = right; - - BinaryTreeNode insert(K key, V value) { - int c = key.compareTo(_key); - if (c == 0) return this; - var _insert = (BinaryTreeNode t, K key, V value) => - insertOpt(t, key, value); - BinaryTreeNode left = _left; - BinaryTreeNode right = _right; - if (c < 0) { - left = _insert(_left, key, value); - } else { - right = _insert(_right, key, value); - } - return new BinaryTreeNode(_key, _value, left: left, right: right); - } - - BinaryTreeNode map(U f(V x)) { - var _map = (BinaryTreeNode t, U f(V x)) => mapOpt(t, f); - return new BinaryTreeNode(_key, f(_value), - left: _map(_left, f), right: _map(_right, f)); - } - - S foldPre(S init, S f(V t, S s)) { - var _fold = (BinaryTreeNode t, S s, S f(V t, S s)) => - foldPreOpt(t, s, f); - S s = init; - s = f(_value, s); - s = _fold(_left, s, f); - s = _fold(_right, s, f); - return s; - } -} - -BinaryTreeNode insertOpt, V2>( - BinaryTreeNode t, K2 key, V2 value) { - return (t == null) ? new BinaryTreeNode(key, value) : t.insert(key, value); -} - -BinaryTreeNode mapOpt, V, U>( - BinaryTreeNode t, U f(V x)) { - return (t == null) ? null : t.map(f); -} - -S foldPreOpt, V, S>( - BinaryTreeNode t, S init, S f(V t, S s)) { - return (t == null) ? init : t.foldPre(init, f); -} - -class BinaryTree, V> { - final BinaryTreeNode _root; - - BinaryTree._internal(this._root); - BinaryTree.empty() : this._internal(null); - - BinaryTree insert(K key, V value) { - BinaryTreeNode root = insertOpt(_root, key, value); - return new BinaryTree._internal(root); - } - - BinaryTree map(U f(V x)) { - BinaryTreeNode root = mapOpt(_root, f); - return new BinaryTree._internal(root); - } - - S foldPre(S init, S f(V t, S s)) { - return foldPreOpt(_root, init, f); - } -} - -main() { - BinaryTree sT = new BinaryTree.empty(); - - sT = sT.insert(0, ""); - sT = sT.insert(1, " "); - sT = sT.insert(2, " "); - sT = sT.insert(3, " "); - - BinaryTree iT = sT.map((String s) => s.length); - - Expect.equals(iT.foldPre(0, (num i, num s) => i + s), 6); -} diff --git a/tests/language_2/generic/generic2_test.dart b/tests/language_2/generic/generic2_test.dart deleted file mode 100644 index 7416bd93795..00000000000 --- a/tests/language_2/generic/generic2_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test is-tests with type variables. - -import "package:expect/expect.dart"; - -class A { - foo(o) => o is T; -} - -class B {} - -class C extends A {} - -main() { - Expect.isTrue(new A().foo(new B())); - Expect.isTrue(new A().foo(1)); - Expect.isFalse(new A().foo(new Object())); - Expect.isFalse(new A().foo('hest')); - Expect.isTrue(new A().foo(new B())); - Expect.isFalse(new A().foo(new Object())); - Expect.isFalse(new A().foo(1)); - Expect.isTrue(new C().foo(1)); - Expect.isFalse(new C().foo(new Object())); - Expect.isFalse(new C().foo('hest')); - Expect.isTrue(new A>().foo([])); - Expect.isFalse(new A>().foo([])); -} diff --git a/tests/language_2/generic/generic_test.dart b/tests/language_2/generic/generic_test.dart deleted file mode 100644 index 9f4820e308f..00000000000 --- a/tests/language_2/generic/generic_test.dart +++ /dev/null @@ -1,59 +0,0 @@ -// 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 - -/// Dart test program testing generic type allocations and generic type tests. -import "package:expect/expect.dart"; - -class A { - const A(); -} - -class AA extends A { - const AA(); -} - -class AX { - const AX(); -} - -class B { - final A a_; - final T t_; - const B(T t) - : a_ = t, - t_ = t; - isT(x) { - return x is T; - } -} - -class C { - B b_; - C(T t) : b_ = new B(t) {} -} - -class D { - C caa_; - D() : caa_ = new C(const AA()) {} -} - -class E { - C cax_ = new C(const AX()); //# 01: compile-time error -} - -main() { - D d = new D(); - Expect.equals(true, d.caa_.b_ is B); - Expect.equals(true, d.caa_.b_.isT(const AA())); - C c = new C(const AA()); // inferred as `C` because of the `extends A`. - Expect.equals(true, c is C); - Expect.equals(false, c is C, 'C is not a subtype of C'); - Expect.equals(true, c.b_ is B); - Expect.equals(false, c.b_ is B); - Expect.equals(true, c.b_.isT(const AA()), 'AA is a subtype of A'); - Expect.equals(false, c.b_.isT(const AX()), 'AX is not a subtype of A'); - new E(); -} diff --git a/tests/language_2/generic/generics2_test.dart b/tests/language_2/generic/generics2_test.dart deleted file mode 100644 index c2699dd203b..00000000000 --- a/tests/language_2/generic/generics2_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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. -// VMOptions=--enable_type_checks -// -// Dart test program testing generic type allocations and generic type tests. - -// @dart = 2.9 - -class A {} - -class Pair extends A /* i.e. extends A */ { - final P fst; - final Q snd; - Pair(this.fst, this.snd); -} - -main() { - print(new Pair(1, 2)); - print(new Pair("1", 2)); -} diff --git a/tests/language_2/generic/generics3_test.dart b/tests/language_2/generic/generics3_test.dart deleted file mode 100644 index 0d7f7759ba0..00000000000 --- a/tests/language_2/generic/generics3_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2013, 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 test program testing generic type allocations and generic type tests. -// Regression test for issue 8710. - -// @dart = 2.9 - -class C1 {} - -class C2 {} - -class C3 extends C2> {} - -class C4 extends C3 { - f() => new C5>(new C1()); -} - -class C5 { - C5(T x); -} // Checked mode: x must be of type C1. - -main() { - new C4().f(); -} diff --git a/tests/language_2/generic/generics_test.dart b/tests/language_2/generic/generics_test.dart deleted file mode 100644 index 2d653098ddc..00000000000 --- a/tests/language_2/generic/generics_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// 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 test for generic types. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -abstract class GenericsTest implements Map { - static int myFunc(bool a, bool b) { - Expect.equals(true, a); - Expect.equals(false, b); - return 42; - } - - static void testMain() { - int a = 1; - int b = 2; - int c = 3; - int d = 4; - Expect.equals(true, a < b); - Expect.equals(42, myFunc(a < b, c > d)); - Map e; - GenericsTest> f; - - e = new Map(); - takesMapMethod(e); - Expect.equals(2, e[0]); - Map h = new Map(); - } - - static void takesMapMethod(Map m) { - m[0] = 2; - } - - Map returnMap() { - return null; - } -} - -class LongGeneric {} - -class LongerGeneric { - void func() { - LongGeneric, Map>>> id; - - LongGeneric, - LongGeneric, Map>>>> id2; - } -} - -main() { - GenericsTest.testMain(); -} diff --git a/tests/language_2/generic/inheritance_test.dart b/tests/language_2/generic/inheritance_test.dart deleted file mode 100644 index a46f3f98195..00000000000 --- a/tests/language_2/generic/inheritance_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// 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. -// -// Test verifying that the type argument vector of subclasses are properly -// initialized by the class finalizer. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - A(); -} - -class B extends A { - B(); -} - -class C extends B { - C(); -} - -main() { - var a = new A(); - var b = new B(); - var c = new C(); - Expect.isTrue(a is Object); - Expect.isTrue(a is A); - Expect.isTrue(a is A); - Expect.isTrue(a is! A); - Expect.isTrue(b is Object); - Expect.isTrue(b is A); - Expect.isTrue(b is! A); - Expect.isTrue(b is Object); - Expect.isTrue(c is Object); - Expect.isTrue(c is A); - Expect.isTrue(c is! A); - Expect.isTrue(c is B); -} diff --git a/tests/language_2/generic/instanceof.dart b/tests/language_2/generic/instanceof.dart deleted file mode 100644 index 2d62881a586..00000000000 --- a/tests/language_2/generic/instanceof.dart +++ /dev/null @@ -1,132 +0,0 @@ -// 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. -// Test that instanceof works correctly with type variables. - -// @dart = 2.9 - -part of GenericInstanceofTest.dart; - -class Foo { - Foo() {} - - bool isT(x) { - // Untyped parameter to ensure that the static type - // does not affect the result. - return x is T; - } - - bool isListT(x) { - return x is List; - } -} - -class GenericInstanceof { - static void testMain() { - // Using Object instead of String to ensure that the static type - // does not affect the result. - Foo fooObject = new Foo(); - Expect.equals(true, fooObject.isT("string")); - Expect.equals(false, fooObject.isT(1)); - - Foo fooString = new Foo(); - Expect.equals(true, fooString.isT("string")); - Expect.equals(false, fooString.isT(1)); - - // Not providing a type argument to ensure that the static type - // does not affect the result. - { - Foo foo = new Foo(); - Expect.equals(true, foo.isT("string")); - Expect.equals(false, foo.isT(1)); - } - { - Foo foo = new Foo(); - Expect.equals(true, foo.isT(new List.filled(5, null))); - Expect.equals(true, foo.isT(new List.filled(5, null))); - Expect.equals(true, foo.isT(new List.filled(5, null))); - Expect.equals(true, foo.isT(new List.filled(5, null))); - Expect.equals(true, foo.isT(new List.filled(5, null))); - } - { - Foo foo = new Foo(); - Expect.equals(true, foo.isT(new List.filled(5, null))); - Expect.equals(true, foo.isT(new List.filled(5, null))); - Expect.equals(true, foo.isT(new List.filled(5, null))); - Expect.equals(true, foo.isT(new List.filled(5, null))); - Expect.equals(true, foo.isT(new List.filled(5, null))); - } - { - Foo foo = new Foo>(); - Expect.equals(true, foo.isT(new List.filled(5, null))); - Expect.equals(true, foo.isT(new List.filled(5, null))); - Expect.equals(true, foo.isT(new List.filled(5, null))); - Expect.equals(true, foo.isT(new List.filled(5, null))); - Expect.equals(true, foo.isT(new List.filled(5, null))); - } - { - Foo foo = new Foo>(); - Expect.equals(false, foo.isT(new List.filled(5, null))); - Expect.equals(false, foo.isT(new List.filled(5, null))); - Expect.equals(true, foo.isT(new List.filled(5, null))); - Expect.equals(false, foo.isT(new List.filled(5, null))); - Expect.equals(false, foo.isT(new List.filled(5, null))); - } - { - Foo foo = new Foo>(); - Expect.equals(false, foo.isT(new List.filled(5, null))); - Expect.equals(false, foo.isT(new List.filled(5, null))); - Expect.equals(true, foo.isT(new List.filled(5, null))); - Expect.equals(true, foo.isT(new List.filled(5, null))); - Expect.equals(false, foo.isT(new List.filled(5, null))); - } - { - Foo foo = new Foo>(); - Expect.equals(false, foo.isT(new List.filled(5, null))); - Expect.equals(false, foo.isT(new List.filled(5, null))); - Expect.equals(false, foo.isT(new List.filled(5, null))); - Expect.equals(false, foo.isT(new List.filled(5, null))); - Expect.equals(true, foo.isT(new List.filled(5, null))); - } - { - Foo foo = new Foo(); - Expect.equals(true, foo.isListT(new List.filled(5, null))); - Expect.equals(true, foo.isListT(new List.filled(5, null))); - Expect.equals(true, foo.isListT(new List.filled(5, null))); - Expect.equals(true, foo.isListT(new List.filled(5, null))); - Expect.equals(true, foo.isListT(new List.filled(5, null))); - } - { - Foo foo = new Foo(); - Expect.equals(true, foo.isListT(new List.filled(5, null))); - Expect.equals(true, foo.isListT(new List.filled(5, null))); - Expect.equals(true, foo.isListT(new List.filled(5, null))); - Expect.equals(true, foo.isListT(new List.filled(5, null))); - Expect.equals(true, foo.isListT(new List.filled(5, null))); - } - { - Foo foo = new Foo(); - Expect.equals(false, foo.isListT(new List.filled(5, null))); - Expect.equals(false, foo.isListT(new List.filled(5, null))); - Expect.equals(true, foo.isListT(new List.filled(5, null))); - Expect.equals(false, foo.isListT(new List.filled(5, null))); - Expect.equals(false, foo.isListT(new List.filled(5, null))); - } - { - Foo foo = new Foo(); - Expect.equals(false, foo.isListT(new List.filled(5, null))); - Expect.equals(false, foo.isListT(new List.filled(5, null))); - Expect.equals(true, foo.isListT(new List.filled(5, null))); - Expect.equals(true, foo.isListT(new List.filled(5, null))); - Expect.equals(false, foo.isListT(new List.filled(5, null))); - } - { - Foo foo = new Foo(); - Expect.equals(false, foo.isListT(new List.filled(5, null))); - Expect.equals(false, foo.isListT(new List.filled(5, null))); - Expect.equals(false, foo.isListT(new List.filled(5, null))); - Expect.equals(false, foo.isListT(new List.filled(5, null))); - Expect.equals(true, foo.isListT(new List.filled(5, null))); - } - } -} diff --git a/tests/language_2/generic/instanceof2_test.dart b/tests/language_2/generic/instanceof2_test.dart deleted file mode 100644 index 36dbf286fa4..00000000000 --- a/tests/language_2/generic/instanceof2_test.dart +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2012, 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. -// Test that instanceof works correctly with type variables. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test that partially typed generic instances are correctly constructed. - -// Test factory case. -class Foo { - Foo() {} - - factory Foo.fac() { - return new Foo(); - } - - FooString() { - return new Foo.fac(); - } -} - -// Test constructor case. -class Moo { - Moo() {} - - MooString() { - return new Moo(); - } -} - -testAll() { - var foo_int_num = new Foo(); - Expect.isTrue(foo_int_num is Foo); - Expect.isTrue(foo_int_num is! Foo); - // foo_int_num.FooString() returns a Foo - Expect.isTrue(foo_int_num.FooString() is! Foo); - Expect.isTrue(foo_int_num.FooString() is Foo); - - var foo_raw = new Foo(); - Expect.isTrue(foo_raw is! Foo); - Expect.isTrue(foo_raw is! Foo); - Expect.isTrue(foo_raw is Foo); - // foo_raw.FooString() returns a Foo - Expect.isTrue(foo_raw.FooString() is! Foo); - Expect.isTrue(foo_raw.FooString() is! Foo); - Expect.isTrue(foo_raw.FooString() is Foo); - - var moo_int_num = new Moo(); - Expect.isTrue(moo_int_num is Moo); - Expect.isTrue(moo_int_num is! Moo); - // moo_int_num.MooString() returns a Moo - Expect.isTrue(moo_int_num.MooString() is! Moo); - Expect.isTrue(moo_int_num.MooString() is Moo); - - var moo_raw = new Moo(); - Expect.isTrue(moo_raw is! Moo); - Expect.isTrue(moo_raw is! Moo); - Expect.isTrue(moo_raw is Moo); - // moo_raw.MooString() returns a Moo - Expect.isTrue(moo_raw.MooString() is! Moo); - Expect.isTrue(moo_raw.MooString() is! Moo); - Expect.isTrue(moo_raw.MooString() is Moo); -} - -main() { - // Repeat type checks so that inlined tests can be tested as well. - for (int i = 0; i < 5; i++) { - testAll(); - } -} diff --git a/tests/language_2/generic/instanceof3_test.dart b/tests/language_2/generic/instanceof3_test.dart deleted file mode 100644 index 3d896383a26..00000000000 --- a/tests/language_2/generic/instanceof3_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing the instanceof operation. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Tests involving generics. - -abstract class I {} - -class A implements I {} - -class B implements I {} - -abstract class K {} - -abstract class L extends K {} - -class C implements L {} - -class D implements B {} - -main() { - var a = new A(); - var b = new B(); - var c = new C(); - var d = new D(); - // Repeat type checks so that inlined tests can be tested as well. - for (int i = 0; i < 5; i++) { - Expect.isFalse(a is I); - Expect.isTrue(a is I); - Expect.isFalse(b is I); - Expect.isFalse(c is K); - Expect.isFalse(c is K); - Expect.isTrue(c is L); - Expect.isFalse(c is L); - Expect.isTrue(c is K); - Expect.isFalse(c is K); - Expect.isFalse(d is I); - Expect.isTrue(d is I); - } -} diff --git a/tests/language_2/generic/instanceof4_test.dart b/tests/language_2/generic/instanceof4_test.dart deleted file mode 100644 index fca5b802060..00000000000 --- a/tests/language_2/generic/instanceof4_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2014, 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. -// Test that instanceof works correctly with type variables. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - foo(x) { - // Don't inline. - if (new DateTime.now().millisecondsSinceEpoch == 42) return foo(x); - return x is T; - } -} - -class BB {} - -class B implements BB { - foo() { - // Don't inline. - if (new DateTime.now().millisecondsSinceEpoch == 42) return foo(); - return new A().foo(new B()); - } -} - -main() { - Expect.isTrue(new B().foo()); -} diff --git a/tests/language_2/generic/instanceof5_test.dart b/tests/language_2/generic/instanceof5_test.dart deleted file mode 100644 index 425011ad0fc..00000000000 --- a/tests/language_2/generic/instanceof5_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2014, 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. -// Test that instanceof works correctly with type variables. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A {} - -class B {} - -class C extends A with B {} - -class D { - foo(x) { - // Avoid inlining. - if (new DateTime.now().millisecondsSinceEpoch == 42) foo(x); - return x is T; - return true; // Avoid inlining. - } -} - -main() { - Expect.isTrue(new D>().foo(new C())); -} diff --git a/tests/language_2/generic/instanceof_test.dart b/tests/language_2/generic/instanceof_test.dart deleted file mode 100644 index 49f6f5b4f20..00000000000 --- a/tests/language_2/generic/instanceof_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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. -// Test that instanceof works correctly with type variables. - -// @dart = 2.9 - -library GenericInstanceofTest.dart; - -import "package:expect/expect.dart"; -part "instanceof.dart"; - -main() { - // Repeat type checks so that inlined tests can be tested as well. - for (int i = 0; i < 5; i++) { - GenericInstanceof.testMain(); - } -} diff --git a/tests/language_2/generic/instantiate_tearoff_after_contravariance_check_test.dart b/tests/language_2/generic/instantiate_tearoff_after_contravariance_check_test.dart deleted file mode 100644 index 2ed97b2d827..00000000000 --- a/tests/language_2/generic/instantiate_tearoff_after_contravariance_check_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class C { - void Function(T) f(U x) => (y) {}; -} - -void test(C cA, C cB) { - // Tear-off of c.f needs to be type checked due to contravariance. The - // instantiation should occur after the type check, so if the type is wrong we - // should get a type error. - void Function(A) Function(int) tearoffOfCA = cA.f; - Expect.throwsTypeError(() { - void Function(A) Function(int) tearoffOfCB = cB.f; - }); -} - -main() { - test(new C(), new C()); -} diff --git a/tests/language_2/generic/instantiate_tearoff_of_call_test.dart b/tests/language_2/generic/instantiate_tearoff_of_call_test.dart deleted file mode 100644 index 55643beeef6..00000000000 --- a/tests/language_2/generic/instantiate_tearoff_of_call_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -T f(T x) => x; - -void test(T Function(T) f) { - int Function(int) intFunc = f.call; - dynamic intFuncDynamic = intFunc; - Expect.isTrue(intFuncDynamic is int Function(int)); - Expect.isFalse(intFuncDynamic is String Function(String)); - Expect.equals(intFuncDynamic(1), 1); - Expect.throwsTypeError(() { - intFuncDynamic('oops'); - }); - String Function(String) stringFunc = f.call; - dynamic stringFuncDynamic = stringFunc; - Expect.isTrue(stringFuncDynamic is String Function(String)); - Expect.isFalse(stringFuncDynamic is int Function(int)); - Expect.equals(stringFuncDynamic('hello'), 'hello'); - Expect.throwsTypeError(() { - stringFuncDynamic(1); - }); -} - -main() { - test(f); -} diff --git a/tests/language_2/generic/instantiate_tearoff_test.dart b/tests/language_2/generic/instantiate_tearoff_test.dart deleted file mode 100644 index ed27adbce28..00000000000 --- a/tests/language_2/generic/instantiate_tearoff_test.dart +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2017, 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 - -// VMOptions=--lazy-dispatchers -// VMOptions=--no-lazy-dispatchers - -import "package:expect/expect.dart"; - -T f(T x) => x; - -int intToInt(int x) => x; -String stringToString(String x) => x; -String stringAndIntToString(String x, int y) => x; - -test(intFuncDynamic, stringFuncDynamic, dynamicFuncDynamic) { - Expect.isTrue(intFuncDynamic is int Function(int)); - Expect.isFalse(intFuncDynamic is String Function(String)); - Expect.equals(intFuncDynamic(1), 1); - Expect.equals("${intFuncDynamic.runtimeType}", "${intToInt.runtimeType}"); - Expect.throwsTypeError(() { - intFuncDynamic('oops'); - }); - Expect.throwsNoSuchMethodError(() { - intFuncDynamic('oops'); - }); - Expect.isTrue(stringFuncDynamic is String Function(String)); - Expect.isFalse(stringFuncDynamic is int Function(int)); - Expect.equals(stringFuncDynamic('hello'), 'hello'); - Expect.equals( - "${stringFuncDynamic.runtimeType}", "${stringToString.runtimeType}"); - Expect.throwsTypeError(() { - stringFuncDynamic(1); - }); - Expect.throwsNoSuchMethodError(() { - stringFuncDynamic(1); - }); - Expect.throwsNoSuchMethodError(() { - dynamicFuncDynamic(1); - }); -} - -main() { - int Function(int) if1 = f; - String Function(String) sf1 = f; - dynamic Function(dynamic) df1 = f; - test(if1, sf1, df1); - - T local(T x) => x; - - int Function(int) if2 = local; - String Function(String) sf2 = local; - dynamic Function(dynamic) df2 = local; - test(if2, sf2, df2); - - dynamic bar() { - String foo(X x, T t) { - return "$X, $T"; - } - - String Function(X, int) x = foo; - return x; - } - - dynamic fn = bar(); - Expect.equals("${fn.runtimeType}", "${stringAndIntToString.runtimeType}"); - Expect.equals(fn("a", 1), "String, int"); -} diff --git a/tests/language_2/generic/instantiate_to_bounds_super_bounded_test.dart b/tests/language_2/generic/instantiate_to_bounds_super_bounded_test.dart deleted file mode 100644 index 3d8c9f9ca93..00000000000 --- a/tests/language_2/generic/instantiate_to_bounds_super_bounded_test.dart +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) 2018, 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 - -// Verify that when a super-bounded type is produced by instantiate-to-bounds, -// it's properly allowed or rejected depending on the context in which it's -// used. - -// Raw `A` will be instantiated to `A>`, which is super-bounded. -class A> extends Base { - const A(); -} - -class B {} - -class Base { - const Base(); - - factory Base.test() = A; //# 01: compile-time error -} - -typedef void OldStyleTypedef(); - -typedef NewStyleTypedef = void Function(); - -void genericFunction() {} - -mixin Mixin {} - -class C { - dynamic field; - - void genericMethod() {} - - A test; //# 02: ok - - A test() {} //# 03: ok - - void test(A param()) {} //# 04: ok - - void test(A param) {} //# 05: ok - - void test([A param]) {} //# 06: ok - - void test({A param}) {} //# 07: ok - - C(A param()); //# 08: ok - - C(A this.field); //# 09: ok - - C(A param); //# 10: ok - - C([A param]); //# 11: ok - - C({A param}); //# 12: ok -} - -class Test extends B {} //# 13: ok - -class Test extends A {} //# 14: compile-time error - -class Test implements A {} //# 15: compile-time error - -class Test extends Object with A {} //# 16: compile-time error - -class Test = A with Mixin; //# 17: compile-time error - -class Test = Object with Mixin implements A; //# 18: compile-time error - -class Test = Object with A; //# 19: compile-time error - -mixin Test implements A {} //# 20: compile-time error - -mixin Test on A {} //# 21: compile-time error - -A test; //# 22: ok - -A test() {} //# 23: ok - -void test(A param()) {} //# 24: ok - -void test(A param) {} //# 25: ok - -void test([A param]) {} //# 26: ok - -void test({A param}) {} //# 27: ok - -typedef A Test(); //# 28: ok - -typedef void Test(A param()); //# 29: ok - -typedef void Test(A param); //# 30: ok - -typedef void Test([A param]); //# 31: ok - -typedef void Test({A param}); //# 32: ok - -typedef Test = A Function(); //# 33: ok - -typedef Test = void Function(A param); //# 34: ok - -typedef Test = void Function(A); //# 35: ok - -typedef Test = void Function([A param]); //# 36: ok - -typedef Test = void Function([A]); //# 37: ok - -typedef Test = void Function({A param}); //# 38: ok - -void f(dynamic x) { - void localFunction() {} - - g(x as A); //# 39: ok - g(x is A); //# 40: ok - try {} on A catch (_) {} //# 41: ok - for (A test in [x]) {} //# 42: ok - A test; //# 43: ok - OldStyleTypedef test; //# 44: ok - NewStyleTypedef test; //# 45: ok - genericFunction(); //# 46: ok - new C().genericMethod(); //# 47: ok - localFunction(); //# 48: ok - A test() {} //# 49: ok - void test(A param()) {} //# 50: ok - void test(A param) {} //# 51: ok - void test([A param]) {} //# 52: ok - void test({A param}) {} //# 53: ok - void Function(A param) test; //# 54: ok - void Function(A) test; //# 55: ok - void Function([A param]) test; //# 56: ok - void Function([A]) test; //# 57: ok - void Function({A param}) test; //# 58: ok - A(); //# 59: compile-time error - new A(); //# 60: compile-time error - const A(); //# 61: compile-time error - const test = A(); //# 62: compile-time error -} - -void g(dynamic x) {} - -main() { - f(null); -} diff --git a/tests/language_2/generic/instantiate_type_variable_runtime_test.dart b/tests/language_2/generic/instantiate_type_variable_runtime_test.dart deleted file mode 100644 index 35274169f21..00000000000 --- a/tests/language_2/generic/instantiate_type_variable_runtime_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -// Test that you cannot instantiate a type variable. - -class Foo { - Foo() {} - T make() { - - } -} - -main() { - new Foo().make(); -} diff --git a/tests/language_2/generic/instantiate_type_variable_test.dart b/tests/language_2/generic/instantiate_type_variable_test.dart deleted file mode 100644 index 1b9bee1fdb0..00000000000 --- a/tests/language_2/generic/instantiate_type_variable_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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 - -// Test that you cannot instantiate a type variable. - -class Foo { - Foo() {} - T make() { - return new T(); - // ^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // [cfe] Couldn't find constructor 'T'. - } -} - -main() { - new Foo().make(); -} diff --git a/tests/language_2/generic/is_check_test.dart b/tests/language_2/generic/is_check_test.dart deleted file mode 100644 index 505c70079fe..00000000000 --- a/tests/language_2/generic/is_check_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A { - foo() => this is A; -} - -main() { - Expect.isFalse(new A().foo()); - Expect.isTrue(new A().foo()); - Expect.isFalse(new A().foo()); -} diff --git a/tests/language_2/generic/list_checked_test.dart b/tests/language_2/generic/list_checked_test.dart deleted file mode 100644 index c4926894245..00000000000 --- a/tests/language_2/generic/list_checked_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -main() { - Expect.throws(() { - List t = ([] as Object); - }); -} diff --git a/tests/language_2/generic/local_functions_test.dart b/tests/language_2/generic/local_functions_test.dart deleted file mode 100644 index c05359c4fe5..00000000000 --- a/tests/language_2/generic/local_functions_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 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 - -/// Dart test verifying that the parser can handle type parameterization of -/// local function declarations, and declarations of function parameters. - -library generic_local_functions_test; - -import "package:expect/expect.dart"; - -// Declare a generic function parameter. -int f(Y g(Map arg, X x)) => g({1: 42}, 1); - -main() { - // Declare a generic local function - Y h(Map m, X x) => m[x]; - // Pass a generic local function as an argument. - Expect.equals(f(h), 42); - // Pass a function expression as an argument. - Expect.equals(f((Map m, X x) => m[x]), 42); -} diff --git a/tests/language_2/generic/many_generic_instanceof_test.dart b/tests/language_2/generic/many_generic_instanceof_test.dart deleted file mode 100644 index 917bd6e698e..00000000000 --- a/tests/language_2/generic/many_generic_instanceof_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// 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. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -library GenericInstanceofTest.dart; - -import "package:expect/expect.dart"; -part "instanceof.dart"; - -class ManyGenericInstanceofTest { - static testMain() { - for (int i = 0; i < 20; i++) { - GenericInstanceof.testMain(); - } - } -} - -main() { - ManyGenericInstanceofTest.testMain(); -} diff --git a/tests/language_2/generic/metadata_in_function_body_test.dart b/tests/language_2/generic/metadata_in_function_body_test.dart deleted file mode 100644 index 79af7e05ac1..00000000000 --- a/tests/language_2/generic/metadata_in_function_body_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2021, 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 - -// Check that annotations inside function bodies cannot use type arguments, but -// can be raw. - -// @dart=2.11 - -class C { - const C(); -} - -void ignore(dynamic value) {} - -main() { - @C() - @C() - //^ - // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED - // [cfe] An annotation can't use type arguments. - @C() - //^ - // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED - // [cfe] An annotation can't use type arguments. - int i = 0; - ignore(i); -} diff --git a/tests/language_2/generic/metadata_runtime_1_test.dart b/tests/language_2/generic/metadata_runtime_1_test.dart deleted file mode 100644 index 754aa7b38fb..00000000000 --- a/tests/language_2/generic/metadata_runtime_1_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2016, 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. - -// Check that annotations cannot use type arguments, but can be raw. - -class C { - const C(); -} - -@C() - - -main() {} diff --git a/tests/language_2/generic/metadata_runtime_test.dart b/tests/language_2/generic/metadata_runtime_test.dart deleted file mode 100644 index 003da95366e..00000000000 --- a/tests/language_2/generic/metadata_runtime_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2016, 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. - -// Check that annotations cannot use type arguments, but can be raw. - -class C { - const C(); -} - - - - -main() {} diff --git a/tests/language_2/generic/metadata_test.dart b/tests/language_2/generic/metadata_test.dart deleted file mode 100644 index 29ec0d9b565..00000000000 --- a/tests/language_2/generic/metadata_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 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 - -// Check that annotations cannot use type arguments, but can be raw. - -// @dart=2.11 - -class C { - const C(); -} - -@C() -@C() -//^ -// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED -// [cfe] An annotation can't use type arguments. -@C() -//^ -// [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED -// [cfe] An annotation can't use type arguments. -main() {} diff --git a/tests/language_2/generic/method_types_test.dart b/tests/language_2/generic/method_types_test.dart deleted file mode 100644 index aeafb7740d2..00000000000 --- a/tests/language_2/generic/method_types_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'package:expect/expect.dart'; - -typedef Convert1 = O Function(I input); -typedef Convert2 = O Function(I input); -typedef Convert3 = O Function(I input); -typedef Other(a, b); - -class Mixin { - E convert1(I input) => null; -} - -class Class extends Object with Mixin { - O convert2(F input) => null; -} - -O convert3(I input) => null; - -test1() { - var val = new Class(); - Expect.isTrue(val.convert1 is Convert1); - Expect.isFalse(val.convert1 is Convert2); - Expect.isTrue(val.convert1 is Convert1); - Expect.isFalse(val.convert1 is Convert1); - Expect.isFalse(val.convert1 is Convert2); - Expect.isFalse(val.convert1 is Other); -} - -test2() { - var val = new Class(); - Expect.isTrue(val.convert2 is Convert2); - Expect.isTrue(val.convert2 is Convert1); - Expect.isTrue(val.convert2 is Convert2); - Expect.isTrue(val.convert2 is Convert2); - Expect.isFalse(val.convert2 is Convert1); - Expect.isFalse(val.convert2 is Other); -} - -test3() { - Expect.isTrue(convert3 is Convert3); - Expect.isFalse(convert3 is Other); -} - -main() { - test1(); //# 01: ok - test2(); //# 02: ok - test3(); //# 03: ok -} diff --git a/tests/language_2/generic/mock_test.dart b/tests/language_2/generic/mock_test.dart deleted file mode 100644 index 28289337d10..00000000000 --- a/tests/language_2/generic/mock_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Regression test for https://github.com/dart-lang/sdk/issues/38384 - -class Built {} - -class Foo { - foo, B extends Built>() {} -} - -class Mock { - noSuchMethod(Invocation i) {} -} - -class MockFoo extends Mock implements Foo {} - -main() {} diff --git a/tests/language_2/generic/native_test.dart b/tests/language_2/generic/native_test.dart deleted file mode 100644 index 36132b0b7f9..00000000000 --- a/tests/language_2/generic/native_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test is-tests with type variables on native subclasses. - -import "package:expect/expect.dart"; - -class A { - foo(o) => o is T; -} - -class B {} - -class C {} - -main() { - Expect.isTrue(new A>().foo([])); - Expect.isFalse(new A>().foo([])); - - Expect.isTrue(new A().foo('hest')); - - Expect.isTrue(new A>().foo('hest')); - Expect.isFalse(new A>().foo('hest')); -} diff --git a/tests/language_2/generic/no_such_method_dispatcher_test.dart b/tests/language_2/generic/no_such_method_dispatcher_test.dart deleted file mode 100644 index aa0fce9fdd7..00000000000 --- a/tests/language_2/generic/no_such_method_dispatcher_test.dart +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2017, 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. -// VMOptions=--reify-generic-functions --optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test that noSuchMethod dispatching and auto-closurization work correctly -// with generic functions. - -class A { - noSuchMethod(m) { - return 123; - } - - bar(x) => x + 1; -} - -class B extends A {} - -class C { - C(this.typeArgs, this.posArgs, this.namedArgs); - List typeArgs; - List posArgs; - Map namedArgs; - noSuchMethod(m) { - Expect.equals(typeArgs.length, m.typeArguments.length); - for (var i = 0; i < typeArgs.length; ++i) { - Expect.equals(typeArgs[i], m.typeArguments[i]); - } - Expect.equals(posArgs.length, m.positionalArguments.length); - for (var i = 0; i < posArgs.length; ++i) { - Expect.equals(posArgs[i], m.positionalArguments[i]); - } - Expect.equals(namedArgs.length, m.namedArguments.length); - for (var k in namedArgs.keys) { - Expect.equals(namedArgs[k], m.namedArguments[new Symbol(k)]); - } - return 123; - } -} - -main() { - dynamic a = new A(); - for (var i = 0; i < 20; ++i) Expect.equals(123, a.foo()); - Expect.throws(() => (a.foo)()); - Expect.throws(() => (a.foo)()); - Expect.equals("123", (a.foo).toString()); - - dynamic b = new B(); - for (var i = 0; i < 20; ++i) { - Expect.equals(2, b.bar(1)); - Expect.equals(2, b.bar(1)); - Expect.equals(123, b.bar()); - Expect.equals(3, b.bar(2)); - Expect.equals(123, b.bar(1)); - } - - for (var i = 0; i < 20; ++i) { - Expect.equals(123, b.bar(1, 2, 3)); - Expect.equals(123, b.bar(1, 2, foo: 3)); - Expect.equals(123, b.bar(1)); - } - - // Test type, named, and positional arguments. - dynamic c = new C([int, A], [100], {"n1": 101, "n2": 102}); - for (var i = 0; i < 20; ++i) { - Expect.equals(123, c.bar(100, n1: 101, n2: 102)); - Expect.equals(123, c.bar(100, n2: 102, n1: 101)); - } -} diff --git a/tests/language_2/generic/object_type_test.dart b/tests/language_2/generic/object_type_test.dart deleted file mode 100644 index 0af0abfe7b4..00000000000 --- a/tests/language_2/generic/object_type_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -class Tester { - testGenericType(x) { - return x is T; - } -} - -main() { - // The Dart Object type is special in that it doesn't have any superclass. - Expect.isTrue(new Tester().testGenericType(new Object())); -} diff --git a/tests/language_2/generic/parameterized_extends_test.dart b/tests/language_2/generic/parameterized_extends_test.dart deleted file mode 100644 index a333de6f994..00000000000 --- a/tests/language_2/generic/parameterized_extends_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// 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. -// -// Test verifying that generic extends are processed correctly. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A {} - -class B> {} - -class C, T2> {} - -main() { - var a = new A(); - var b = new B>(); - var c = new C, String>(); - Expect.isTrue(a is Object); - Expect.isTrue(a is A); - Expect.isTrue(a is A); - Expect.isTrue(a is! A); - Expect.isTrue(b is Object); - Expect.isTrue(b is B>); - Expect.isTrue(b is B>); - Expect.isTrue(b is! B>); - Expect.isTrue(c is Object); - Expect.isTrue(c is C, Object>); - Expect.isTrue(c is C, String>); - Expect.isTrue(c is! C, int>); -} diff --git a/tests/language_2/generic/recursive_generic_test.dart b/tests/language_2/generic/recursive_generic_test.dart deleted file mode 100644 index 28d551596cb..00000000000 --- a/tests/language_2/generic/recursive_generic_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -abstract class S> { - m() => 123; - get S_T => T; -} - -class C> extends S> { - m() => 456; - get C_T => T; -} - -class D extends C {} - -main() { - regress31434(); - - Expect.equals(new C().m(), 456); - Expect.equals(new C().C_T, D); - Expect.equals(new C().S_T.toString(), 'C'); -} - -class F {} - -class E extends F, R> {} - -regress31434() { - type() => T; - dynamic e = new E(); - Expect.equals(e.runtimeType, type>()); -} diff --git a/tests/language_2/generic/reify_typevar_runtime_1_test.dart b/tests/language_2/generic/reify_typevar_runtime_1_test.dart deleted file mode 100644 index 2eebebca345..00000000000 --- a/tests/language_2/generic/reify_typevar_runtime_1_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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 "package:expect/expect.dart"; - -class C { - final x; - C([this.x]); - - static staticFunction(bool b) => - - null; - factory C.factoryConstructor(bool b) => new C( - b ? T : - null); - C.redirectingConstructor(bool b) : this( - - null); - C.ordinaryConstructor(bool b) - : x = - - null; -} - -main() { - Expect.equals(null, C.staticFunction(false)); - Expect.equals(null, new C.factoryConstructor(false).x); - Expect.equals(null, new C.redirectingConstructor(false).x); - Expect.equals(null, new C.ordinaryConstructor(false).x); -} diff --git a/tests/language_2/generic/reify_typevar_runtime_2_test.dart b/tests/language_2/generic/reify_typevar_runtime_2_test.dart deleted file mode 100644 index 5b37d7f7dc4..00000000000 --- a/tests/language_2/generic/reify_typevar_runtime_2_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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 "package:expect/expect.dart"; - -class C { - final x; - C([this.x]); - - static staticFunction(bool b) => - - null; - factory C.factoryConstructor(bool b) => new C( - - null); - C.redirectingConstructor(bool b) : this( - b ? T : - null); - C.ordinaryConstructor(bool b) - : x = - - null; -} - -main() { - Expect.equals(null, C.staticFunction(false)); - Expect.equals(null, new C.factoryConstructor(false).x); - Expect.equals(null, new C.redirectingConstructor(false).x); - Expect.equals(null, new C.ordinaryConstructor(false).x); -} diff --git a/tests/language_2/generic/reify_typevar_runtime_3_test.dart b/tests/language_2/generic/reify_typevar_runtime_3_test.dart deleted file mode 100644 index 3908383423a..00000000000 --- a/tests/language_2/generic/reify_typevar_runtime_3_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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 "package:expect/expect.dart"; - -class C { - final x; - C([this.x]); - - static staticFunction(bool b) => - - null; - factory C.factoryConstructor(bool b) => new C( - - null); - C.redirectingConstructor(bool b) : this( - - null); - C.ordinaryConstructor(bool b) - : x = - b ? T : - null; -} - -main() { - Expect.equals(null, C.staticFunction(false)); - Expect.equals(null, new C.factoryConstructor(false).x); - Expect.equals(null, new C.redirectingConstructor(false).x); - Expect.equals(null, new C.ordinaryConstructor(false).x); -} diff --git a/tests/language_2/generic/reify_typevar_runtime_test.dart b/tests/language_2/generic/reify_typevar_runtime_test.dart deleted file mode 100644 index 9b3c94b51a2..00000000000 --- a/tests/language_2/generic/reify_typevar_runtime_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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 "package:expect/expect.dart"; - -class C { - final x; - C([this.x]); - - static staticFunction(bool b) => - - null; - factory C.factoryConstructor(bool b) => new C( - - null); - C.redirectingConstructor(bool b) : this( - - null); - C.ordinaryConstructor(bool b) - : x = - - null; -} - -main() { - Expect.equals(null, C.staticFunction(false)); - Expect.equals(null, new C.factoryConstructor(false).x); - Expect.equals(null, new C.redirectingConstructor(false).x); - Expect.equals(null, new C.ordinaryConstructor(false).x); -} diff --git a/tests/language_2/generic/reify_typevar_static_test.dart b/tests/language_2/generic/reify_typevar_static_test.dart deleted file mode 100644 index 338e2fbeafc..00000000000 --- a/tests/language_2/generic/reify_typevar_static_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -class C { - final x; - C([this.x]); - - static staticFunction(bool b) => - b ? T : - // ^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC - // [cfe] Type variables can't be used in static members. - null; - factory C.factoryConstructor(bool b) => new C( - b ? T : - null); - C.redirectingConstructor(bool b) : this( - b ? T : - null); - C.ordinaryConstructor(bool b) - : x = - b ? T : - null; -} - -main() { - Expect.equals(null, C.staticFunction(false)); - Expect.equals(null, new C.factoryConstructor(false).x); - Expect.equals(null, new C.redirectingConstructor(false).x); - Expect.equals(null, new C.ordinaryConstructor(false).x); -} diff --git a/tests/language_2/generic/self_reference_test.dart b/tests/language_2/generic/self_reference_test.dart deleted file mode 100644 index 5ffd2eb8ea0..00000000000 --- a/tests/language_2/generic/self_reference_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -class Bar {} - -class Foo extends Bar> {} - -void main() { - print(new Foo()); -} diff --git a/tests/language_2/generic/sends_test.dart b/tests/language_2/generic/sends_test.dart deleted file mode 100644 index ddfd2410ee3..00000000000 --- a/tests/language_2/generic/sends_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2016, 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 - -/// Dart test verifying that the parser can handle certain cases where -/// grammar ambiguity is resolved in favor of generic sends, not -/// relational expressions. - -library generic_sends_test; - -f(arg1, [arg2]) => null; -g(arg) => null; - -main() { - // Generic invocations. - f(g(3)); - f(g>(3)); - f(g(3), 4); - f(g>(3), 4); - - // Relational expressions. - int a = 0, b = 1, c = 2, d = 3; - f(a < b, c > 3); - f(a < b, c >> 3); - f(a < b, c < d >> 3); -} diff --git a/tests/language_2/generic/sync_star_test.dart b/tests/language_2/generic/sync_star_test.dart deleted file mode 100644 index 088ee58211e..00000000000 --- a/tests/language_2/generic/sync_star_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -Iterable foo(T x) sync* { - for (int i = 0; i < 3; i++) { - yield x; - } -} - -main() { - for (var x in foo(1)) { - Expect.equals(1, x); - } -} diff --git a/tests/language_2/generic/syntax_test.dart b/tests/language_2/generic/syntax_test.dart deleted file mode 100644 index 99ff230ebb7..00000000000 --- a/tests/language_2/generic/syntax_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Dart test verifying that the parser does not confuse parameterized types with -// boolean expressions, since both contain '<'. - -class GenericSyntaxTest { - GenericSyntaxTest() {} - - void foo(x1, x2, x3, x4, x5) { - Expect.equals(true, x1); - Expect.equals(3, x2); - Expect.equals(4, x3); - Expect.equals(5, x4); - Expect.equals(false, x5); - } - - void bar(x) { - Expect.equals(null, x(null)); - } - - test() { - var a = 1; - var b = 2; - var c = 3; - var d = 4; - var e = 5; - var f = 6; - var g = 7; - var h = null; - bar((A g) { - return h; - }); // 'A g); // 'a {} - -main() { - GenericSyntaxTest.testMain(); -} diff --git a/tests/language_2/generic/tearoff_test.dart b/tests/language_2/generic/tearoff_test.dart deleted file mode 100644 index e633ffb4f1b..00000000000 --- a/tests/language_2/generic/tearoff_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'dart:math' as math; -import 'dart:math' show min; // <-- generic: (T, T) -> T -import 'package:expect/expect.dart'; - -class C { - T m(T x, T y) => min(x, y); - int m2(int x, int y) => min(x, y); -} - -typedef int Int2Int2Int(int x, int y); - -void _test(Int2Int2Int f) { - int y = f(123, 456); - Expect.equals(y, 123); - // `f` doesn't take type args. - Expect.throws(() => (f as dynamic)(123, 456)); -} - -void _testParam(T minFn(T x, T y)) { - _test(minFn); -} - -main() { - // Strong mode infers: `min` - // Test simple/prefixed identifiers and property access - _test(min); - _test(math.min); - _test(new C().m); - - // Test local function, variable, and parameter - T m(T x, T y) => min(x, y); - _test(m); - final f = min; - _test(f); - _testParam(math.min); - - // A few misc tests for methods - Expect.equals(123, (new C() as dynamic).m(123, 456)); - Expect.throws(() => (new C() as dynamic).m2(123, 456)); -} diff --git a/tests/language_2/generic/type_argument_in_super_type_test.dart b/tests/language_2/generic/type_argument_in_super_type_test.dart deleted file mode 100644 index 8007470471a..00000000000 --- a/tests/language_2/generic/type_argument_in_super_type_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class C {} - -class A { - var field; - A(this.field); - T foo() => field; - int bar() => field; -} - -class B extends A { - B() : super(new C()); -} - -main() { - B b = new B(); - Expect.equals(b.field, b.foo()); - Expect.throwsTypeError(b.bar); -} diff --git a/tests/language_2/generic/type_argument_substitution_test.dart b/tests/language_2/generic/type_argument_substitution_test.dart deleted file mode 100644 index 946e56139c5..00000000000 --- a/tests/language_2/generic/type_argument_substitution_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2014, 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 - -// Test that substitutions are emitted for classes that are only used as -// type arguments. - -import 'package:expect/expect.dart'; - -class K {} - -class A {} - -class B extends A {} - -class X {} - -main() { - var v = new DateTime.now().millisecondsSinceEpoch != 42 - ? new X() - : new X>(); - Expect.isFalse(v is X>); -} diff --git a/tests/language_2/generic/type_parameter_literal_test.dart b/tests/language_2/generic/type_parameter_literal_test.dart deleted file mode 100644 index 7aa7f9218cf..00000000000 --- a/tests/language_2/generic/type_parameter_literal_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Test type parameter literal expressions. - -class D { - Type getT() { - return T; - } -} - -main() { - Expect.equals(int, new D().getT()); -} diff --git a/tests/language_2/generic/type_parameter_test.dart b/tests/language_2/generic/type_parameter_test.dart deleted file mode 100644 index 25f06e5d606..00000000000 --- a/tests/language_2/generic/type_parameter_test.dart +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - Function closure; - A._(this.closure); - - factory A() { - return new A._(() => new Set()); - } - - A.bar() { - closure = () => new Set(); - } - - static - T //# 01: compile-time error - staticMethod( - T //# 02: compile-time error - a) { - final - T //# 03: compile-time error - a = "not_null"; - print(a); - return a; - } - - static final - T //# 04: compile-time error - staticFinalField = "not_null"; - - static const - T //# 05: compile-time error - staticConstField = "not_null"; - - static not_null() => "not_null"; - static final - T //# 06: compile-time error - staticFinalField2 = not_null(); - - // Type parameters are not in scope inside static methods. - static - T //# 07: compile-time error - staticMethod2( - T //# 07: compile-time error - a) { - final - T //# 07: compile-time error - a = null; - print(a); - return a; - } - - static final - T //# 08: compile-time error - staticFinalField3 = null; - - static null_() => null; - static final - T //# 09: compile-time error - staticFinalField4 = null_(); -} - -main() { - var s = ((new A()).closure)(); - Expect.isTrue(s is Set); - - s = ((new A.bar()).closure)(); - Expect.isTrue(s is Set); - - s = ((new A()).closure)(); - Expect.isTrue(s is Set); - Expect.isFalse(s is Set); - - s = ((new A.bar()).closure)(); - Expect.isTrue(s is Set); - Expect.isFalse(s is Set); - - A.staticMethod("not_null"); - print(A.staticFinalField); - print(A.staticConstField); - print(A.staticFinalField2); - - A.staticMethod2(null); - print(A.staticFinalField3); - print(A.staticFinalField4); -} diff --git a/tests/language_2/generic/typedef_test.dart b/tests/language_2/generic/typedef_test.dart deleted file mode 100644 index 7622f437358..00000000000 --- a/tests/language_2/generic/typedef_test.dart +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2017, 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 - -import 'package:expect/expect.dart'; - -// Test runtime behavior of generic function typedefs: -// -// - use "is" and "as" on them. -// - get Type values from runtimeType. -// - pass type parameters from another generic type to them. - -typedef A = T Function(T x, T y); -typedef B = T Function(T x, T y); - -typedef C = Map Function(K k, V v); -typedef D = Map Function(String k, V v); - -class G { - test() { - dynamic d = (Y x, Y y) => y; - Expect.isTrue(d is A); - Expect.equals(d is A, Y == Z); - - Expect.isFalse(d is B); - Expect.throws(() => d as B); - - d = (Y y, Z z) => {}; - Expect.isFalse(d is C); - - d = (Y y, S s) => {}; - Expect.isTrue(d is C); - Expect.equals(d is C, Y == Z); - Expect.equals(d is D, Y == String); - } -} - -main() { - dynamic d = (int x, int y) => x + y; - Expect.isTrue(d is A); - Expect.equals((d as A)(1, 2), 3); - - Expect.isFalse(d is B); - Expect.throws(() => d as B); - - d = (S x, S y) => x is String ? x : y; - Expect.isFalse(d is A); - Expect.throws(() => d as A); - - Expect.isTrue(d is B); - // TODO(jmesserly): Analyzer incorrectly rejects this form: - // Expect.equals((d as B)(1, 2), 2); - B b = d; - Expect.equals(b(1, 2), 2); - Expect.equals(b('a', 'b'), 'a'); - - - new G().test(); - new G().test(); -} diff --git a/tests/language_2/generic/wrong_number_type_arguments_runtime_test.dart b/tests/language_2/generic/wrong_number_type_arguments_runtime_test.dart deleted file mode 100644 index 9884079f365..00000000000 --- a/tests/language_2/generic/wrong_number_type_arguments_runtime_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 "package:expect/expect.dart"; - -// Map takes 2 type arguments. -Map - -foo; -Map - -baz; - -main() { - - var bar = new Map - - (); - -} diff --git a/tests/language_2/generic/wrong_number_type_arguments_test.dart b/tests/language_2/generic/wrong_number_type_arguments_test.dart deleted file mode 100644 index bc9b1e91885..00000000000 --- a/tests/language_2/generic/wrong_number_type_arguments_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012, 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 - -// Map takes 2 type arguments. -Map foo; -// [error line 8, column 1, length 11] -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS -// [cfe] Expected 2 type arguments. -Map baz; -// [error line 12, column 1, length 11] -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS -// [cfe] Expected 2 type arguments. - -main() { - foo = null; - var bar = new Map(); - // ^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS - // [cfe] Expected 2 type arguments. - baz = new Map(); -} diff --git a/tests/language_2/generic_methods/bounds_test.dart b/tests/language_2/generic_methods/bounds_test.dart deleted file mode 100644 index faadde604c6..00000000000 --- a/tests/language_2/generic_methods/bounds_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2017, 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 - -// Test that a dynamic call to a generic function checks the type argument -// against its bound. - -library generic_methods_bounds_test; - -import "package:expect/expect.dart"; - -class A {} - -class B {} - -class C { - void fun(T t) {} -} - -main() { - C c = new C(); - c.fun(new B()); //# 01: compile-time error - - dynamic obj = new C(); - obj.fun(new B()); //# 02: runtime error -} diff --git a/tests/language_2/generic_methods/closure_test.dart b/tests/language_2/generic_methods/closure_test.dart deleted file mode 100644 index c13cd1dad63..00000000000 --- a/tests/language_2/generic_methods/closure_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2017, 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 - -// Test that a generic closure is correctly constructed. - -library generic_methods_closure_test; - -import "package:expect/expect.dart"; - -class A {} - -class I {} - -class B extends I {} - -void fun(List list) { - var helper1 = (List list) { - if (list.length > 0) { - Expect.isTrue(list[0] is S); - } - Expect.isTrue(list is List); - Expect.isTrue(list is List); - }; - - void helper2(List list) { - if (list.length > 0) { - Expect.isTrue(list[0] is S); - } - Expect.isTrue(list is List); - Expect.isTrue(list is List); - } - - helper1(list); - helper2(list); -} - -main() { - List list = [new B()]; - fun(list); -} diff --git a/tests/language_2/generic_methods/dynamic_test.dart b/tests/language_2/generic_methods/dynamic_test.dart deleted file mode 100644 index 68033f50b44..00000000000 --- a/tests/language_2/generic_methods/dynamic_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2017, 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 - -// Test that if the type of a parameter of a generic method is a type parameter, -// the type of the passed argument is checked (01) at compile time -// if the receiver is given via an interface-type variable, and (02) at runtime -// if the receiver is dynamic. - -library generic_methods_dynamic_test; - -import "package:expect/expect.dart"; - -class A {} - -class B {} - -class C { - T foo(T t) => t; - List bar(Iterable t) => [t.first]; -} - -main() { - B b = new B(); - C c = new C(); - dynamic obj = c; - - c.foo(b); //# 01: compile-time error - obj.foo(b); //# 02: runtime error - - c.bar([new B()]); //# 03: compile-time error - obj.bar([new B()]); //# 04: runtime error - - Expect.equals(c.foo(b), b); //# 05: ok - Expect.equals(obj.foo(b), b); //# 05: continued - - dynamic x = c.bar([new B()]); //# 05: continued - Expect.isTrue(x is List); //# 05: continued - Expect.equals(x.length, 1); //# 05: continued - - dynamic y = obj.bar([new B()]); //# 05: continued - Expect.isTrue(y is List); //# 05: continued - Expect.equals(y.length, 1); //# 05: continued -} diff --git a/tests/language_2/generic_methods/function_type_test.dart b/tests/language_2/generic_methods/function_type_test.dart deleted file mode 100644 index e8f5ad7fdd8..00000000000 --- a/tests/language_2/generic_methods/function_type_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2016, 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 - -/// Dart test on the usage of method type arguments in a function typed -/// parameter declaration. - -library generic_methods_function_type_test; - -import "package:expect/expect.dart"; - -class C { - U m1(U f(V v), V v) => f(v); - V m2(V f(U v), U u) => f(u); -} - -main() { - Expect.equals(new C().m1((x) => x, 10), 10); - Expect.equals(new C().m2((x) => x, 20), 20); -} diff --git a/tests/language_2/generic_methods/generic_class_tearoff_test.dart b/tests/language_2/generic_methods/generic_class_tearoff_test.dart deleted file mode 100644 index 57b923c4210..00000000000 --- a/tests/language_2/generic_methods/generic_class_tearoff_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2017, 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 - -// Test that a torn off method of a generic class is not a generic method, -// and that it is correctly specialized. - -library generic_methods_generic_class_tearoff_test; - -import "package:expect/expect.dart"; - -class A { - T fun(T t) => t; -} - -typedef Int2Int = int Function(int); -typedef String2String = String Function(String); -typedef Object2Object = Object Function(Object); -typedef GenericMethod = T Function(T); - -main() { - A x = new A(); - var f = x.fun; // The type of f should be 'int Function(Object)'. - A y = new A(); - var g = y.fun; // The type of g should be 'String Function(Object)'. - A z = new A(); - var h = z.fun; // The type of h should be 'dynamic Function(Object)'. - - Expect.isTrue(f is Int2Int); - Expect.isTrue(f is! String2String); - Expect.isTrue(f is Object2Object); - Expect.isTrue(f is! GenericMethod); - - Expect.isTrue(g is! Int2Int); - Expect.isTrue(g is String2String); - Expect.isTrue(g is Object2Object); - Expect.isTrue(g is! GenericMethod); - - Expect.isTrue(h is! Int2Int); - Expect.isTrue(h is! String2String); - Expect.isTrue(h is Object2Object); - Expect.isTrue(h is! GenericMethod); -} diff --git a/tests/language_2/generic_methods/generic_function_parameter_test.dart b/tests/language_2/generic_methods/generic_function_parameter_test.dart deleted file mode 100644 index 99fcff3e190..00000000000 --- a/tests/language_2/generic_methods/generic_function_parameter_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -class C { - bar(T t, int u, V v) => t.toString() + u.toString() + v.toString(); - foo(bar(T t, U u, V v)) => bar(1 as T, 2 as U, 3); -} - -main() { - var c = new C(); - Expect.equals("123", c.foo(c.bar)); -} diff --git a/tests/language_2/generic_methods/generic_function_result_runtime_test.dart b/tests/language_2/generic_methods/generic_function_result_runtime_test.dart deleted file mode 100644 index 8eb8217af29..00000000000 --- a/tests/language_2/generic_methods/generic_function_result_runtime_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -// Verify that function type parameter S can be resolved in bar's result type. -// Verify that generic function types are not allowed as type arguments. - -import "package:expect/expect.dart"; - -int foo - - (int i, int j) => i + j; - -List bar() { - return [foo, foo]; -} - -void main() { - var list = bar(); - print(list[0].runtimeType); - Expect.equals(123, list[1](100, 23)); -} diff --git a/tests/language_2/generic_methods/generic_function_result_test.dart b/tests/language_2/generic_methods/generic_function_result_test.dart deleted file mode 100644 index d50dcb53827..00000000000 --- a/tests/language_2/generic_methods/generic_function_result_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2017, 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 - -// Verify that function type parameter S can be resolved in bar's result type. -// Verify that generic function types are not allowed as type arguments. - -// @dart=2.11 - -import "package:expect/expect.dart"; - -int foo - - (int i, int j) => i + j; - -List(S, int)> bar() { -// [error column 1] -// [cfe] A generic function type can't be used as a type argument. -// ^^^^^^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT - return (S, int)>[foo, foo]; -} - -void main() { - var list = bar(); - print(list[0].runtimeType); - Expect.equals(123, list[1](100, 23)); -} diff --git a/tests/language_2/generic_methods/generic_invocation_all_subexpression_types_test.dart b/tests/language_2/generic_methods/generic_invocation_all_subexpression_types_test.dart deleted file mode 100644 index b395dc9beaf..00000000000 --- a/tests/language_2/generic_methods/generic_invocation_all_subexpression_types_test.dart +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2021, 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 - -// This test verifies that `EXPR(arguments)` is properly parsed -// as a generic invocation, for all types of expressions that may appear as -// EXPR. We try to pay extra attention to ambiguous expressions (that is, where -// interpreting the `<` and `>` as operators would also have led to a valid -// parse). - -import '../syntax_helper.dart'; - -class C extends SyntaxTracker { - C([Object x = absent, Object y = absent]) - : super('new C${SyntaxTracker.args(x, y)}'); - - C.syntax(String s) : super(s); -} - -class ThisTest extends C { - ThisTest() : super.syntax('this'); - - void test() { - checkSyntax(f(this(0)), 'f(this(0))'); - // Note: SyntaxTracker can't see the parens around `this` in the line below - checkSyntax(f((this)(0)), 'f(this(0))'); - } -} - -main() { - SyntaxTracker.known[C] = 'C'; - SyntaxTracker.known[#x] = '#x'; - checkSyntax(f(f(0)), 'f(f(0))'); - checkSyntax(f(x.method(0)), 'f(x.method(0))'); - checkSyntax(f(C()(0)), 'f(new C()(0))'); - checkSyntax(f(new C()(0)), 'f(new C()(0))'); - checkSyntax(f(f()(0)), 'f(f()(0))'); - checkSyntax(f(x.method()(0)), 'f(x.method()(0))'); - checkSyntax(f(x[0]()(0)), 'f(x[0]()(0))'); - checkSyntax(f(#x(0)), 'f(#x(0))'); - checkSyntax(f(null(0)), 'f(null(0))'); - checkSyntax(f(0(0)), 'f(0(0))'); - checkSyntax(f(0.5(0)), 'f(0.5(0))'); - checkSyntax(f([](0)), 'f([](0))'); - checkSyntax(f([0](0)), 'f([0](0))'); - checkSyntax(f({}(0)), 'f({}(0))'); - checkSyntax(f({0}(0)), 'f({0}(0))'); - checkSyntax(f({0: 0}(0)), 'f({ 0: 0 }(0))'); - checkSyntax(f(true(0)), 'f(true(0))'); - checkSyntax(f("s"(0)), 'f("s"(0))'); - checkSyntax(f(r"s"(0)), 'f("s"(0))'); - checkSyntax(f(x[0](0)), 'f(x[0](0))'); - // Note: SyntaxTracker can't see the parens around `x` in the line below - checkSyntax(f((x)(0)), 'f(x(0))'); - ThisTest().test(); -} diff --git a/tests/language_2/generic_methods/generic_invocation_all_types_test.dart b/tests/language_2/generic_methods/generic_invocation_all_types_test.dart deleted file mode 100644 index 1c9fda2a8ea..00000000000 --- a/tests/language_2/generic_methods/generic_invocation_all_types_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2021, 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 - -// This test verifies that `f(0)` is properly parsed as a generic -// invocation, for all type syntaxes that may appear as T and U. - -// Note: it doesn't really matter what we import here; it's just a handy library -// that has declares a types so that we can refer a type via a prefix. -import 'dart:async' as prefix; - -import '../syntax_helper.dart'; - -class C extends SyntaxTracker { - C([Object x = absent, Object y = absent]) - : super('new C${SyntaxTracker.args(x, y)}'); -} - -/// Helper function to work around the fact that not all types can be expressed -/// as type literals. -Type typeOf() => T; - -main() { - SyntaxTracker.known[C] = 'C'; - SyntaxTracker.known[prefix.Zone] = 'prefix.Zone'; - SyntaxTracker.known[dynamic] = 'dynamic'; - SyntaxTracker.known[typeOf>()] = 'List'; - SyntaxTracker.known[typeOf()] = 'void Function()'; - checkSyntax(f(f(0)), 'f(f(0))'); - checkSyntax(f(f(0)), 'f(f(0))'); - checkSyntax(f(f(0)), 'f(f(0))'); - checkSyntax(f(f, C>(0)), 'f(f, C>(0))'); - checkSyntax(f(f(0)), 'f(f(0))'); - checkSyntax(f(f(0)), 'f(f(0))'); - checkSyntax(f(f(0)), 'f(f(0))'); - checkSyntax(f(f>(0)), 'f(f>(0))'); - checkSyntax(f(f(0)), 'f(f(0))'); -} diff --git a/tests/language_2/generic_methods/generic_methods_test.dart b/tests/language_2/generic_methods/generic_methods_test.dart deleted file mode 100644 index f6646560b4e..00000000000 --- a/tests/language_2/generic_methods/generic_methods_test.dart +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) 2016, 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 - -/// Dart test verifying that the parser can handle type parameterization of -/// method declarations and method invocations. Slightly adjusted version of -/// code from DEP #22. - -library generic_methods_test; - -import "package:expect/expect.dart"; - -class BinaryTreeNode, V> { - final K _key; - final V _value; - final BinaryTreeNode _left; - final BinaryTreeNode _right; - - BinaryTreeNode(this._key, this._value, - {BinaryTreeNode left: null, BinaryTreeNode right: null}) - : _left = left, - _right = right; - - // Use fresh type variables. - static BinaryTreeNode insertOpt, V2>( - BinaryTreeNode t, K2 key, V2 value) { - return (t == null) ? new BinaryTreeNode(key, value) : t.insert(key, value); - } - - BinaryTreeNode insert(K key, V value) { - int c = key.compareTo(_key); - if (c == 0) return this; - var _insert = (BinaryTreeNode node, K key, V value) => - insertOpt(node, key, value); - BinaryTreeNode left = _left; - BinaryTreeNode right = _right; - if (c < 0) { - left = _insert(_left, key, value); - } else { - right = _insert(_right, key, value); - } - return new BinaryTreeNode(_key, _value, left: left, right: right); - } - - // Reuse type variables [K], [V] to test shadowing. - static BinaryTreeNode mapOpt, V, U>( - BinaryTreeNode t, U f(V x)) { - return (t == null) ? null : t.map(f); - } - - BinaryTreeNode map(U f(V x)) { - var _map = (BinaryTreeNode t, U f(V x)) => mapOpt(t, f); - return new BinaryTreeNode(_key, f(_value), - left: _map(_left, f), right: _map(_right, f)); - } - - // Use fresh [K2], shadowing [V]. - static S foldPreOpt, V, S>( - BinaryTreeNode t, S init, S f(V t, S s)) { - return (t == null) ? init : t.foldPre(init, f); - } - - S foldPre(S init, S f(V t, S s)) { - var _fold = (BinaryTreeNode t, S s, S f(V t, S s)) => - foldPreOpt(t, s, f); - S s = init; - s = f(_value, s); - s = _fold(_left, s, f); - s = _fold(_right, s, f); - return s; - } -} - -class BinaryTree, V> { - final BinaryTreeNode _root; - - BinaryTree._internal(this._root); - BinaryTree.empty() : this._internal(null); - - BinaryTree insert(K key, V value) { - BinaryTreeNode root = - BinaryTreeNode.insertOpt(_root, key, value); - return new BinaryTree._internal(root); - } - - BinaryTree map(U f(V x)) { - BinaryTreeNode root = BinaryTreeNode.mapOpt(_root, f); - return new BinaryTree._internal(root); - } - - S foldPre(S init, S f(V t, S s)) { - return BinaryTreeNode.foldPreOpt(_root, init, f); - } -} - -main() { - BinaryTree sT = new BinaryTree.empty(); - - sT = sT.insert(0, ""); - sT = sT.insert(1, " "); - sT = sT.insert(2, " "); - sT = sT.insert(3, " "); - - BinaryTree iT = sT.map((String s) => s.length); - - Expect.equals(iT.foldPre(0, (num i, num s) => i + s), 6); -} diff --git a/tests/language_2/generic_methods/local_variable_declaration_test.dart b/tests/language_2/generic_methods/local_variable_declaration_test.dart deleted file mode 100644 index d2f98418861..00000000000 --- a/tests/language_2/generic_methods/local_variable_declaration_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2017, 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 - -// Test that a type variable can be used to declare local variables, and that -// these local variables are of correct type. - -library generic_methods_local_variable_declaration_test; - -import "package:expect/expect.dart"; - -class X {} - -abstract class Generator { - T generate(); -} - -class A implements Generator { - generate() { - return new A(); - } - - String toString() => "instance of A"; -} - -class B implements Generator { - generate() { - return new B(); - } - - String toString() => "instance of B"; -} - -String fun>(T t) { - T another = t.generate(); - String anotherName = "$another"; - - Expect.isTrue(another is T); - Expect.isTrue(another is Generator); - - return anotherName; -} - -main() { - A a = new A(); - B b = new B(); - - Expect.equals(fun(a), "instance of A"); - Expect.equals(fun(b), "instance of B"); -} diff --git a/tests/language_2/generic_methods/named_parameters_test.dart b/tests/language_2/generic_methods/named_parameters_test.dart deleted file mode 100644 index 7a519550ea8..00000000000 --- a/tests/language_2/generic_methods/named_parameters_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2017, 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 - -// Test that generic methods with named parameters are of correct type. - -library generic_methods_named_parameters_test; - -import "package:expect/expect.dart"; - -typedef FunObjObj = Object Function(Object, {Object y}); -typedef FunTypObj = Object Function(T, {Object y}); -typedef FunObjTyp = Object Function(Object, {T y}); -typedef FunTypTyp = Object Function(T, {T y}); - -Object funObjObj(Object x, {Object y}) => x; -Object funTypObj(T x, {Object y}) => y; -Object funObjTyp(Object x, {T y}) => x; -Object funTypTyp(T x, {T y}) => null; - -main() { - Expect.isTrue(funObjObj is FunObjObj); - Expect.isTrue(funObjObj is FunTypObj); - Expect.isTrue(funObjObj is FunObjTyp); - Expect.isTrue(funObjObj is FunTypTyp); - - Expect.isTrue(funTypObj is! FunObjObj); - Expect.isTrue(funTypObj is FunTypObj); - Expect.isTrue(funTypObj is! FunObjTyp); - Expect.isTrue(funTypObj is FunTypTyp); - - Expect.isTrue(funObjTyp is! FunObjObj); - Expect.isTrue(funObjTyp is! FunTypObj); - Expect.isTrue(funObjTyp is FunObjTyp); - Expect.isTrue(funObjTyp is FunTypTyp); - - Expect.isTrue(funTypTyp is! FunObjObj); - Expect.isTrue(funTypTyp is! FunTypObj); - Expect.isTrue(funTypTyp is! FunObjTyp); - Expect.isTrue(funTypTyp is FunTypTyp); -} diff --git a/tests/language_2/generic_methods/new_test.dart b/tests/language_2/generic_methods/new_test.dart deleted file mode 100644 index e2bcc0978cf..00000000000 --- a/tests/language_2/generic_methods/new_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2016, 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 -import "package:expect/expect.dart"; - -class C { - E e; - C(this.e); -} - -C f1(T t) => new C(t); - -List f2(T t) => [t]; - -Map f3(T t) => {t: 'hi'}; - -main() { - C c = f1(42); - List i = f2("Hello!"); - Expect.isTrue(c is C); - Expect.isFalse(c is C); - Expect.isTrue(i is List); - Expect.isFalse(i is List); - Expect.equals(c.e, 42); - Expect.equals(i[0], "Hello!"); - - Map m1 = f3(1); - Expect.isTrue(m1 is Map); - Expect.isFalse(m1 is Map); - Expect.isFalse(m1 is Map); - Expect.equals('hi', m1[1]); -} diff --git a/tests/language_2/generic_methods/non_generic_invocation_all_first_expression_types_test.dart b/tests/language_2/generic_methods/non_generic_invocation_all_first_expression_types_test.dart deleted file mode 100644 index 779ebd5bff0..00000000000 --- a/tests/language_2/generic_methods/non_generic_invocation_all_first_expression_types_test.dart +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2021, 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 - -// This test verifies that `EXPR-x` is properly parsed as a pair of -// expressions separated by a `,`, for all types of expressions that may appear -// as EXPR. We try to pay extra attention to expressions that will become -// ambiguous when the "constructor tearoffs" feature is enabled (that is, where -// interpreting the `<` and `>` as delimiting a list of type arguments would -// also have led to a valid parse). - -import '../syntax_helper.dart'; - -class C extends SyntaxTracker { - C([Object x = absent, Object y = absent]) - : super('new C${SyntaxTracker.args(x, y)}'); - - C.syntax(String s) : super(s); - - Object operator <(Object other) => - SyntaxTracker('(${syntax(this)} < ${syntax(other)})'); -} - -class ThisTest extends C { - ThisTest() : super.syntax('this'); - - void test() { - checkSyntax(f(this < C, C > -x), 'f((this < C), (C > (-x)))'); - // Note: SyntaxTracker can't see the parens around `this` in the line below - checkSyntax(f((this) < C, C > -x), 'f((this < C), (C > (-x)))'); - } -} - -class SuperTest extends C { - SuperTest() : super.syntax('super'); - - void test() { - checkSyntax(f(super < C, C > -x), 'f((super < C), (C > (-x)))'); - } -} - -main() { - const y = 123; - SyntaxTracker.known[C] = 'C'; - SyntaxTracker.known[#x] = '#x'; - SyntaxTracker.known[y] = 'y'; - checkSyntax(f(x < C, C > -x), 'f((x < C), (C > (-x)))'); - checkSyntax(f(x.getter < C, C > -x), 'f((x.getter < C), (C > (-x)))'); - checkSyntax(f(C() < C, C > -x), 'f((new C() < C), (C > (-x)))'); - checkSyntax(f(new C() < C, C > -x), 'f((new C() < C), (C > (-x)))'); - checkSyntax(f(f() < C, C > -x), 'f((f() < C), (C > (-x)))'); - checkSyntax(f(x.method() < C, C > -x), 'f((x.method() < C), (C > (-x)))'); - checkSyntax(f(x[0]() < C, C > -x), 'f((x[0]() < C), (C > (-x)))'); - checkSyntax(f(#x < C, C > -x), 'f((#x < C), (C > (-x)))'); - checkSyntax(f(null < C, C > -x), 'f((null < C), (C > (-x)))'); - checkSyntax(f(0 < y, C > -x), 'f(true, (C > (-x)))'); - checkSyntax(f(0.5 < y, C > -x), 'f(true, (C > (-x)))'); - checkSyntax(f([] < C, C > -x), 'f(([] < C), (C > (-x)))'); - checkSyntax(f([0] < C, C > -x), 'f(([0] < C), (C > (-x)))'); - checkSyntax(f({} < C, C > -x), 'f(({} < C), (C > (-x)))'); - checkSyntax(f({0} < C, C > -x), 'f(({0} < C), (C > (-x)))'); - checkSyntax(f({0: 0} < C, C > -x), 'f(({ 0: 0 } < C), (C > (-x)))'); - checkSyntax(f(true < C, C > -x), 'f((true < C), (C > (-x)))'); - checkSyntax(f("s" < C, C > -x), 'f(("s" < C), (C > (-x)))'); - checkSyntax(f(r"s" < C, C > -x), 'f(("s" < C), (C > (-x)))'); - checkSyntax(f(x[0] < C, C > -x), 'f((x[0] < C), (C > (-x)))'); - // Note: SyntaxTracker can't see the parens around `x` in the line below - checkSyntax(f((x) < C, C > -x), 'f((x < C), (C > (-x)))'); - checkSyntax(f(-x < C, C > -x), 'f(((-x) < C), (C > (-x)))'); - checkSyntax(f(!true < C, C > -x), 'f((false < C), (C > (-x)))'); - checkSyntax(f(!(true) < C, C > -x), 'f((false < C), (C > (-x)))'); - checkSyntax(f(~x < C, C > -x), 'f(((~x) < C), (C > (-x)))'); - checkSyntax(f(x * x < C, C > -x), 'f(((x * x) < C), (C > (-x)))'); - checkSyntax(f(x / x < C, C > -x), 'f(((x / x) < C), (C > (-x)))'); - checkSyntax(f(x ~/ x < C, C > -x), 'f(((x ~/ x) < C), (C > (-x)))'); - checkSyntax(f(x % x < C, C > -x), 'f(((x % x) < C), (C > (-x)))'); - checkSyntax(f(x + x < C, C > -x), 'f(((x + x) < C), (C > (-x)))'); - checkSyntax(f(x - x < C, C > -x), 'f(((x - x) < C), (C > (-x)))'); - checkSyntax(f(x << x < C, C > -x), 'f(((x << x) < C), (C > (-x)))'); - checkSyntax(f(x >> x < C, C > -x), 'f(((x >> x) < C), (C > (-x)))'); - checkSyntax(f(x & x < C, C > -x), 'f(((x & x) < C), (C > (-x)))'); - checkSyntax(f(x ^ x < C, C > -x), 'f(((x ^ x) < C), (C > (-x)))'); - checkSyntax(f(x | x < C, C > -x), 'f(((x | x) < C), (C > (-x)))'); - ThisTest().test(); - SuperTest().test(); -} diff --git a/tests/language_2/generic_methods/non_generic_invocation_all_first_types_test.dart b/tests/language_2/generic_methods/non_generic_invocation_all_first_types_test.dart deleted file mode 100644 index 7d817eeeced..00000000000 --- a/tests/language_2/generic_methods/non_generic_invocation_all_first_types_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2021, 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 - -// This test verifies that `f(x)` is properly parsed as a pair of -// expressions separated by a `,`, for all types of expressions that may appear -// as EXPR that can't be parsed as types. - -import '../syntax_helper.dart'; - -class C extends SyntaxTracker { - C([Object x = absent, Object y = absent]) - : super('new C${SyntaxTracker.args(x, y)}'); - - C.syntax(String s) : super(s); -} - -class ThisTest extends C { - ThisTest() : super.syntax('this'); - - void test() { - checkSyntax(f(x < this, C > (x)), 'f((x < this), (C > x))'); - // Note: SyntaxTracker can't see the parens around `this` in the line below - checkSyntax(f(x < (this), C > (x)), 'f((x < this), (C > x))'); - } -} - -main() { - SyntaxTracker.known[C] = 'C'; - SyntaxTracker.known[#x] = '#x'; - checkSyntax( - f(x < x.getter.getter, C > (x)), 'f((x < x.getter.getter), (C > x))'); - checkSyntax(f(x < C(), C > (x)), 'f((x < new C()), (C > x))'); - checkSyntax(f(x < new C(), C > (x)), 'f((x < new C()), (C > x))'); - checkSyntax(f(x < f(), C > (x)), 'f((x < f()), (C > x))'); - checkSyntax(f(x < x.method(), C > (x)), 'f((x < x.method()), (C > x))'); - checkSyntax(f(x < x[0](), C > (x)), 'f((x < x[0]()), (C > x))'); - checkSyntax(f(x < #x, C > (x)), 'f((x < #x), (C > x))'); - checkSyntax(f(x < null, C > (x)), 'f((x < null), (C > x))'); - checkSyntax(f(x < 0, C > (x)), 'f((x < 0), (C > x))'); - checkSyntax(f(x < 0.5, C > (x)), 'f((x < 0.5), (C > x))'); - checkSyntax(f(x < [], C > (x)), 'f((x < []), (C > x))'); - checkSyntax(f(x < [0], C > (x)), 'f((x < [0]), (C > x))'); - checkSyntax(f(x < {}, C > (x)), 'f((x < {}), (C > x))'); - checkSyntax(f(x < {0}, C > (x)), 'f((x < {0}), (C > x))'); - checkSyntax(f(x < {0: 0}, C > (x)), 'f((x < { 0: 0 }), (C > x))'); - checkSyntax(f(x < true, C > (x)), 'f((x < true), (C > x))'); - checkSyntax(f(x < "s", C > (x)), 'f((x < "s"), (C > x))'); - checkSyntax(f(x < r"s", C > (x)), 'f((x < "s"), (C > x))'); - checkSyntax(f(x < x[0], C > (x)), 'f((x < x[0]), (C > x))'); - // Note: SyntaxTracker can't see the parens around `x` in the line below - checkSyntax(f(x < (x), C > (x)), 'f((x < x), (C > x))'); - checkSyntax(f(x < -x, C > (x)), 'f((x < (-x)), (C > x))'); - checkSyntax(f(x < !true, C > (x)), 'f((x < false), (C > x))'); - checkSyntax(f(x < !(true), C > (x)), 'f((x < false), (C > x))'); - checkSyntax(f(x < ~x, C > (x)), 'f((x < (~x)), (C > x))'); - checkSyntax(f(x < x * x, C > (x)), 'f((x < (x * x)), (C > x))'); - checkSyntax(f(x < x / x, C > (x)), 'f((x < (x / x)), (C > x))'); - checkSyntax(f(x < x ~/ x, C > (x)), 'f((x < (x ~/ x)), (C > x))'); - checkSyntax(f(x < x % x, C > (x)), 'f((x < (x % x)), (C > x))'); - checkSyntax(f(x < x + x, C > (x)), 'f((x < (x + x)), (C > x))'); - checkSyntax(f(x < x - x, C > (x)), 'f((x < (x - x)), (C > x))'); - checkSyntax(f(x < x << x, C > (x)), 'f((x < (x << x)), (C > x))'); - checkSyntax(f(x < x >> x, C > (x)), 'f((x < (x >> x)), (C > x))'); - checkSyntax(f(x < x & x, C > (x)), 'f((x < (x & x)), (C > x))'); - checkSyntax(f(x < x ^ x, C > (x)), 'f((x < (x ^ x)), (C > x))'); - checkSyntax(f(x < x | x, C > (x)), 'f((x < (x | x)), (C > x))'); - ThisTest().test(); -} diff --git a/tests/language_2/generic_methods/non_generic_invocation_all_second_expression_types_test.dart b/tests/language_2/generic_methods/non_generic_invocation_all_second_expression_types_test.dart deleted file mode 100644 index 53bfeb73ed4..00000000000 --- a/tests/language_2/generic_methods/non_generic_invocation_all_second_expression_types_test.dart +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2021, 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 - -// This test verifies that `fEXPR` is properly parsed as a pair of -// expressions separated by a `,`, for all types of expressions that may appear -// as EXPR. We try to pay extra attention to expressions that will become -// ambiguous when the "constructor tearoffs" feature is enabled (that is, where -// interpreting the `<` and `>` as delimiting a list of type arguments would -// also have led to a valid parse). - -import '../syntax_helper.dart'; - -class C extends SyntaxTracker { - C([Object x = absent, Object y = absent]) - : super('new C${SyntaxTracker.args(x, y)}'); - - C.syntax(String s) : super(s); - - Object operator <(Object other) => - SyntaxTracker('(${syntax(this)} < ${syntax(other)})'); -} - -class ThisTest extends C { - ThisTest() : super.syntax('this'); - - void test() { - checkSyntax(f(x < C, C > this), 'f((x < C), (C > this))'); - } -} - -main() { - SyntaxTracker.known[C] = 'C'; - SyntaxTracker.known[#x] = '#x'; - checkSyntax(f(x < C, C > x), 'f((x < C), (C > x))'); - checkSyntax(f(x < C, C > x.getter), 'f((x < C), (C > x.getter))'); - checkSyntax(f(x < C, C > C()), 'f((x < C), (C > new C()))'); - checkSyntax(f(x < C, C > new C()), 'f((x < C), (C > new C()))'); - checkSyntax(f(x < C, C > f()), 'f((x < C), (C > f()))'); - checkSyntax(f(x < C, C > x.method()), 'f((x < C), (C > x.method()))'); - checkSyntax(f(x < C, C > x[0]()), 'f((x < C), (C > x[0]()))'); - checkSyntax(f(x < C, C > #x), 'f((x < C), (C > #x))'); - checkSyntax(f(x < C, C > null), 'f((x < C), (C > null))'); - checkSyntax(f(x < C, C > 0), 'f((x < C), (C > 0))'); - checkSyntax(f(x < C, C > 0.5), 'f((x < C), (C > 0.5))'); - checkSyntax(f(x < C, C > []), 'f((x < C), (C > []))'); - checkSyntax(f(x < C, C > [0]), 'f((x < C), (C > [0]))'); - checkSyntax(f(x < C, C > {}), 'f((x < C), (C > {}))'); - checkSyntax(f(x < C, C > {0}), 'f((x < C), (C > {0}))'); - checkSyntax(f(x < C, C > {0: 0}), 'f((x < C), (C > { 0: 0 }))'); - checkSyntax(f(x < C, C > true), 'f((x < C), (C > true))'); - checkSyntax(f(x < C, C > "s"), 'f((x < C), (C > "s"))'); - checkSyntax(f(x < C, C > r"s"), 'f((x < C), (C > "s"))'); - checkSyntax(f(x < C, C > x[0]), 'f((x < C), (C > x[0]))'); - checkSyntax(f(x < C, C > -x), 'f((x < C), (C > (-x)))'); - checkSyntax(f(x < C, C > !true), 'f((x < C), (C > false))'); - checkSyntax(f(x < C, C > !(true)), 'f((x < C), (C > false))'); - checkSyntax(f(x < C, C > ~x), 'f((x < C), (C > (~x)))'); - checkSyntax(f(x < C, C > x * x), 'f((x < C), (C > (x * x)))'); - checkSyntax(f(x < C, C > x / x), 'f((x < C), (C > (x / x)))'); - checkSyntax(f(x < C, C > x ~/ x), 'f((x < C), (C > (x ~/ x)))'); - checkSyntax(f(x < C, C > x % x), 'f((x < C), (C > (x % x)))'); - checkSyntax(f(x < C, C > x + x), 'f((x < C), (C > (x + x)))'); - checkSyntax(f(x < C, C > x - x), 'f((x < C), (C > (x - x)))'); - checkSyntax(f(x < C, C > x << x), 'f((x < C), (C > (x << x)))'); - checkSyntax(f(x < C, C > x >> x), 'f((x < C), (C > (x >> x)))'); - checkSyntax(f(x < C, C > x & x), 'f((x < C), (C > (x & x)))'); - checkSyntax(f(x < C, C > x ^ x), 'f((x < C), (C > (x ^ x)))'); - checkSyntax(f(x < C, C > x | x), 'f((x < C), (C > (x | x)))'); - ThisTest().test(); -} diff --git a/tests/language_2/generic_methods/non_generic_invocation_all_second_types_test.dart b/tests/language_2/generic_methods/non_generic_invocation_all_second_types_test.dart deleted file mode 100644 index c388dda1775..00000000000 --- a/tests/language_2/generic_methods/non_generic_invocation_all_second_types_test.dart +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2021, 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 - -// This test verifies that `f(x)` is properly parsed as a pair of -// expressions separated by a `,`, for all types of expressions that may appear -// as EXPR that can't be parsed as types. - -import '../syntax_helper.dart'; - -class C extends SyntaxTracker { - C([Object x = absent, Object y = absent]) - : super('new C${SyntaxTracker.args(x, y)}'); - - C.syntax(String s) : super(s); - - Object operator >(Object other) => - SyntaxTracker('(${syntax(this)} > ${syntax(other)})'); -} - -class ThisTest extends C { - ThisTest() : super.syntax('this'); - - void test() { - checkSyntax(f(x < C, this > (x)), 'f((x < C), (this > x))'); - // Note: SyntaxTracker can't see the parens around `this` in the line below - checkSyntax(f(x < C, (this) > (x)), 'f((x < C), (this > x))'); - } -} - -class SuperTest extends C { - SuperTest() : super.syntax('super'); - - void test() { - checkSyntax(f(x < C, super > (x)), 'f((x < C), (super > x))'); - } -} - -main() { - const y = 123; - SyntaxTracker.known[C] = 'C'; - SyntaxTracker.known[#x] = '#x'; - SyntaxTracker.known[y] = 'y'; - checkSyntax( - f(x < C, x.getter.getter > (x)), 'f((x < C), (x.getter.getter > x))'); - checkSyntax(f(x < C, C() > (x)), 'f((x < C), (new C() > x))'); - checkSyntax(f(x < C, new C() > (x)), 'f((x < C), (new C() > x))'); - checkSyntax(f(x < C, f() > (x)), 'f((x < C), (f() > x))'); - checkSyntax(f(x < C, x.method() > (x)), 'f((x < C), (x.method() > x))'); - checkSyntax(f(x < C, x[0]() > (x)), 'f((x < C), (x[0]() > x))'); - checkSyntax(f(x < C, #x > (x)), 'f((x < C), (#x > x))'); - checkSyntax(f(x < C, null > (x)), 'f((x < C), (null > x))'); - checkSyntax(f(x < C, 0 > (y)), 'f((x < C), false)'); - checkSyntax(f(x < C, 0.5 > (y)), 'f((x < C), false)'); - checkSyntax(f(x < C, [] > (x)), 'f((x < C), ([] > x))'); - checkSyntax(f(x < C, [0] > (x)), 'f((x < C), ([0] > x))'); - checkSyntax(f(x < C, {} > (x)), 'f((x < C), ({} > x))'); - checkSyntax(f(x < C, {0} > (x)), 'f((x < C), ({0} > x))'); - checkSyntax(f(x < C, {0: 0} > (x)), 'f((x < C), ({ 0: 0 } > x))'); - checkSyntax(f(x < C, true > (x)), 'f((x < C), (true > x))'); - checkSyntax(f(x < C, "s" > (x)), 'f((x < C), ("s" > x))'); - checkSyntax(f(x < C, r"s" > (x)), 'f((x < C), ("s" > x))'); - checkSyntax(f(x < C, x[0] > (x)), 'f((x < C), (x[0] > x))'); - // Note: SyntaxTracker can't see the parens around `x` in the line below - checkSyntax(f(x < C, (x) > (x)), 'f((x < C), (x > x))'); - checkSyntax(f(x < C, -x > (x)), 'f((x < C), ((-x) > x))'); - checkSyntax(f(x < C, !true > (x)), 'f((x < C), (false > x))'); - checkSyntax(f(x < C, !(true) > (x)), 'f((x < C), (false > x))'); - checkSyntax(f(x < C, ~x > (x)), 'f((x < C), ((~x) > x))'); - checkSyntax(f(x < C, x * x > (x)), 'f((x < C), ((x * x) > x))'); - checkSyntax(f(x < C, x / x > (x)), 'f((x < C), ((x / x) > x))'); - checkSyntax(f(x < C, x ~/ x > (x)), 'f((x < C), ((x ~/ x) > x))'); - checkSyntax(f(x < C, x % x > (x)), 'f((x < C), ((x % x) > x))'); - checkSyntax(f(x < C, x + x > (x)), 'f((x < C), ((x + x) > x))'); - checkSyntax(f(x < C, x - x > (x)), 'f((x < C), ((x - x) > x))'); - checkSyntax(f(x < C, x << x > (x)), 'f((x < C), ((x << x) > x))'); - checkSyntax(f(x < C, x >> x > (x)), 'f((x < C), ((x >> x) > x))'); - checkSyntax(f(x < C, x & x > (x)), 'f((x < C), ((x & x) > x))'); - checkSyntax(f(x < C, x ^ x > (x)), 'f((x < C), ((x ^ x) > x))'); - checkSyntax(f(x < C, x | x > (x)), 'f((x < C), ((x | x) > x))'); - ThisTest().test(); - SuperTest().test(); -} diff --git a/tests/language_2/generic_methods/optional_parameters_test.dart b/tests/language_2/generic_methods/optional_parameters_test.dart deleted file mode 100644 index f6250b79be6..00000000000 --- a/tests/language_2/generic_methods/optional_parameters_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2017, 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 - -// Test that generic methods with optional parameters are of correct type. - -library generic_methods_optional_parameters_test; - -import "package:expect/expect.dart"; - -typedef FunObjObj = Object Function(Object, [Object]); -typedef FunTypObj = Object Function(T, [Object]); -typedef FunObjTyp = Object Function(Object, [T]); -typedef FunTypTyp = Object Function(T, [T]); - -Object funObjObj(Object x, [Object y]) => x; -Object funTypObj(T x, [Object y]) => y; -Object funObjTyp(Object x, [T y]) => x; -Object funTypTyp(T x, [T y]) => null; - -main() { - Expect.isTrue(funObjObj is FunObjObj); - Expect.isTrue(funObjObj is FunTypObj); - Expect.isTrue(funObjObj is FunObjTyp); - Expect.isTrue(funObjObj is FunTypTyp); - - Expect.isTrue(funTypObj is! FunObjObj); - Expect.isTrue(funTypObj is FunTypObj); - Expect.isTrue(funTypObj is! FunObjTyp); - Expect.isTrue(funTypObj is FunTypTyp); - - Expect.isTrue(funObjTyp is! FunObjObj); - Expect.isTrue(funObjTyp is! FunTypObj); - Expect.isTrue(funObjTyp is FunObjTyp); - Expect.isTrue(funObjTyp is FunTypTyp); - - Expect.isTrue(funTypTyp is! FunObjObj); - Expect.isTrue(funTypTyp is! FunTypObj); - Expect.isTrue(funTypTyp is! FunObjTyp); - Expect.isTrue(funTypTyp is FunTypTyp); -} diff --git a/tests/language_2/generic_methods/overriding_test.dart b/tests/language_2/generic_methods/overriding_test.dart deleted file mode 100644 index ffa4f5080fe..00000000000 --- a/tests/language_2/generic_methods/overriding_test.dart +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2017, 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 - -// Test that generic methods can be overloaded (a) with widened type bounds, and -// (b) using the bound as the type of the parameter in the overloaded method. - -library generic_methods_overriding_test; - -import "package:expect/expect.dart"; - -class X {} - -class Y extends X {} - -class Z extends Y {} - -class C { - String fun(T t) => "C"; -} - -class D extends C { - String fun(T t) => "D"; //# 01: compile-time error - String fun(T t) => "D"; //# 02: ok -} - -class E extends C { - String fun(Y y) => "E"; //# 03: compile-time error - String fun(Y y) => "E"; //# 04: ok -} - -class F extends C { - String foobar(Z z) { - return "FZ"; - } - - String fun(T t) { - if (t is Z) { - return this.foobar(t as Z); //# 05: ok - return this.foobar(t); //# 06: ok - } - return "FY"; - } -} - -main() { - Y y = new Y(); - Z z = new Z(); - - C c = new C(); - D d = new D(); - E e = new E(); - F f = new F(); - - Expect.equals(c.fun(y), "C"); - Expect.equals(d.fun(y), "D"); //# 02: continued - Expect.equals(e.fun(y), "E"); //# 04: continued - Expect.equals(f.fun(y), "FY"); //# 05: continued - Expect.equals(f.fun(z), "FZ"); //# 05: continued - Expect.equals(f.fun(y), "FY"); //# 06: continued - Expect.equals(f.fun(z), "FZ"); //# 06: continued -} diff --git a/tests/language_2/generic_methods/recursive_bound_test.dart b/tests/language_2/generic_methods/recursive_bound_test.dart deleted file mode 100644 index a6ab1556b6f..00000000000 --- a/tests/language_2/generic_methods/recursive_bound_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2017, 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 - -// Test that F-bounded quantification works for generic methods, and that types -// that are passed to generic methods in dynamic calls are checked for being -// recursively defined. - -library generic_methods_recursive_bound_test; - -import "package:expect/expect.dart"; - -abstract class I { - bool fun(T x); -} - -void foo>(List a) { - if (a.length > 1) { - a[0].fun(a[1]); - } -} - -class C implements I { - bool fun(C c) => true; -} - -main() { - foo([new C(), new C()]); //# 01: ok - - dynamic bar = foo; - List list2 = [4, 2]; - // The type int does not extend I. - foo(list2); //# 02: compile-time error - bar(list2); //# 03: runtime error -} diff --git a/tests/language_2/generic_methods/reuse_type_variables_test.dart b/tests/language_2/generic_methods/reuse_type_variables_test.dart deleted file mode 100644 index aca75f960f9..00000000000 --- a/tests/language_2/generic_methods/reuse_type_variables_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2017, 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 - -// Test that type parameter can be passed as a type argument in a definition of -// a local variable, and that this local variable is correctly constructed. - -library generic_methods_reuse_type_variables_test; - -import "package:expect/expect.dart"; - -int fun(T t) { - List list = [t, t, t]; - Expect.isTrue(list is List); - Expect.isTrue(list is! List); - return list.length; -} - -main() { - Expect.equals(fun("foo"), 3); -} diff --git a/tests/language_2/generic_methods/shadowing_test.dart b/tests/language_2/generic_methods/shadowing_test.dart deleted file mode 100644 index ea975dce9e7..00000000000 --- a/tests/language_2/generic_methods/shadowing_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2017, 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 - -// Test that type parameters in generic methods can be shadowed. - -library generic_methods_shadowing_test; - -import "package:expect/expect.dart"; - -class X {} - -class Y {} - -bool foo(T t, S s) { - // The type parameter T of bar shadows the type parameter T of foo. - bool bar(T t) { - return t is T && t is S; - } - - return bar(s); -} - -main() { - Expect.isTrue(foo(new X(), new Y())); -} diff --git a/tests/language_2/generic_methods/simple_as_expression_test.dart b/tests/language_2/generic_methods/simple_as_expression_test.dart deleted file mode 100644 index 947d02fd60f..00000000000 --- a/tests/language_2/generic_methods/simple_as_expression_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2017, 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 - -// Test that type parameters in generic methods can be used in as-expressions. - -library generic_methods_simple_as_expression_test; - -import "package:expect/expect.dart"; - -T cast(dynamic obj) { - return obj as T; -} - -main() { - Expect.equals(cast(42), 42); //# 01: ok - cast(42); //# 02: runtime error -} diff --git a/tests/language_2/generic_methods/simple_is_expression_test.dart b/tests/language_2/generic_methods/simple_is_expression_test.dart deleted file mode 100644 index bf3e5839f04..00000000000 --- a/tests/language_2/generic_methods/simple_is_expression_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2017, 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 - -// Test that type parameters in generic methods can be used in is-expressions. - -library generic_methods_simple_is_expression_test; - -import "package:expect/expect.dart"; - -bool fun(int n) { - return n is T; -} - -main() { - Expect.isTrue(fun(42)); - Expect.isFalse(fun(42)); -} diff --git a/tests/language_2/generic_methods/tearoff_specialization_test.dart b/tests/language_2/generic_methods/tearoff_specialization_test.dart deleted file mode 100644 index db4e2cfb051..00000000000 --- a/tests/language_2/generic_methods/tearoff_specialization_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2017, 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 - -// Test that generic methods can be specialized after being torn off, and that -// their specialized versions are correctly constructed. - -library generic_methods_tearoff_specialization_test; - -import "package:expect/expect.dart"; - -class A { - T fun(T t) => t; -} - -typedef Int2Int = int Function(int); -typedef String2String = String Function(String); -typedef Object2Object = Object Function(Object); -typedef GenericMethod = T Function(T); - -main() { - A a = new A(); - Int2Int f = a.fun; - String2String g = a.fun; - Object2Object h = a.fun; - var generic = a.fun; - - Expect.isTrue(f is Int2Int); - Expect.isTrue(f is! String2String); - Expect.isTrue(f is! Object2Object); - Expect.isTrue(f is! GenericMethod); - - Expect.isTrue(g is! Int2Int); - Expect.isTrue(g is String2String); - Expect.isTrue(g is! Object2Object); - Expect.isTrue(g is! GenericMethod); - - Expect.isTrue(h is! Int2Int); - Expect.isTrue(h is! String2String); - Expect.isTrue(h is Object2Object); - Expect.isTrue(g is! GenericMethod); - - Expect.isTrue(generic is! Int2Int); - Expect.isTrue(generic is! String2String); - Expect.isTrue(generic is! Object2Object); - Expect.isTrue(generic is GenericMethod); -} diff --git a/tests/language_2/generic_methods/type_expression_test.dart b/tests/language_2/generic_methods/type_expression_test.dart deleted file mode 100644 index b39a6735fbc..00000000000 --- a/tests/language_2/generic_methods/type_expression_test.dart +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2016, 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 - -/// Dart test on the usage of method type arguments in type expressions. - -import "package:expect/expect.dart"; - -bool f1(Object o) => o is T; - -bool f2(Object o) => o is List; - -bool f3(Object o) => o is! T; - -bool f4(Object o) => o is! List; - -T f5(Object o) => o as T; - -List f6(Object o) => o as List; - -Type f7() => T; - -class TypeValue { - Type get value => X; -} - -Type f8() => new TypeValue>().value; - -bool f9(Object o) => o is Map; - -class IsMap { - @pragma('dart2js:noInline') - bool check(o) => o is Map; -} - -main() { - String s = "Hello!"; - List ss = [s]; - Expect.isTrue(f1(42)); - Expect.isFalse(f1(42)); - Expect.isTrue(f2([42])); - Expect.isFalse(f2([42])); // `is List` is false. - Expect.isFalse(f3(42)); - Expect.isTrue(f3(42)); - Expect.isFalse(f4([42])); - Expect.isTrue(f4([42])); // `is! List` is true. - Expect.equals(f5(s), s); // `s as String == s` - Expect.throwsTypeError(() => f5(s)); // `s as int == s` - Expect.equals(f6(ss), ss); - Expect.throwsTypeError(() => f6(ss)); // `as List` fails. - Expect.equals(f7(), int); - - // Returns `List`. - Expect.equals(f8(), new TypeValue>().value); - - Expect.isTrue(f9({})); - Expect.isFalse(f9({})); - Expect.isFalse(f9({})); - - Expect.isTrue(new IsMap().check({})); - Expect.isFalse(new IsMap().check({})); -} diff --git a/tests/language_2/generic_methods/unused_parameter_test.dart b/tests/language_2/generic_methods/unused_parameter_test.dart deleted file mode 100644 index f39af16ca53..00000000000 --- a/tests/language_2/generic_methods/unused_parameter_test.dart +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) 2017, 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 - -// Test that generic methods with unused parameters aren't treated as -// non-generic methods, but can be specialized as such. - -library generic_methods_unused_parameter_test; - -import "package:expect/expect.dart"; - -typedef Fun = int Function(); -typedef FunReq = int Function(int); -typedef FunOpt = int Function([int]); -typedef FunReqOpt = int Function(int, [int]); -typedef FunNam = int Function({int p}); -typedef FunReqNam = int Function(int, {int p}); - -typedef FunTyp = int Function(); -typedef FunTypReq = int Function(int); -typedef FunTypOpt = int Function([int]); -typedef FunTypReqOpt = int Function(int, [int]); -typedef FunTypNam = int Function({int p}); -typedef FunTypReqNam = int Function(int, {int p}); - -int fun() {} -int funReq(int x) => x; -int funOpt([int y]) => y ?? 42; -int funReqOpt(int x, [int y]) => x; -int funNam({int p}) => p ?? 42; -int funReqNam(int x, {int p}) => x; - -int funTyp() {} -int funTypReq(int x) => x; -int funTypOpt([int y]) => y ?? 42; -int funTypReqOpt(int x, [int y]) => x; -int funTypNam({int p}) => p ?? 42; -int funTypReqNam(int x, {int p}) => x; - -main() { - Fun varFun = funTyp; - FunReq varFunReq = funTypReq; - FunOpt varFunOpt = funTypOpt; - FunReqOpt varFunReqOpt = funTypReqOpt; - FunNam varFunNam = funTypNam; - FunReqNam varFunReqNam = funTypReqNam; - - Expect.isTrue(fun is Fun); - Expect.isTrue(fun is! FunTyp); - Expect.isTrue(funTyp is! Fun); - Expect.isTrue(funTyp is FunTyp); - Expect.isTrue(varFun is Fun); - Expect.isTrue(varFun is! FunTyp); - - Expect.isTrue(funReq is FunReq); - Expect.isTrue(funReq is! FunTypReq); - Expect.isTrue(funTypReq is! FunReq); - Expect.isTrue(funTypReq is FunTypReq); - Expect.isTrue(varFunReq is FunReq); - Expect.isTrue(varFunReq is! FunTypReq); - - Expect.isTrue(funOpt is FunOpt); - Expect.isTrue(funOpt is! FunTypOpt); - Expect.isTrue(funTypOpt is! FunOpt); - Expect.isTrue(funTypOpt is FunTypOpt); - Expect.isTrue(varFunOpt is FunOpt); - Expect.isTrue(varFunOpt is! FunTypOpt); - - Expect.isTrue(funReqOpt is FunReqOpt); - Expect.isTrue(funReqOpt is! FunTypReqOpt); - Expect.isTrue(funTypReqOpt is! FunReqOpt); - Expect.isTrue(funTypReqOpt is FunTypReqOpt); - Expect.isTrue(varFunReqOpt is FunReqOpt); - Expect.isTrue(varFunReqOpt is! FunTypReqOpt); - - Expect.isTrue(funNam is FunNam); - Expect.isTrue(funNam is! FunTypNam); - Expect.isTrue(funTypNam is! FunNam); - Expect.isTrue(funTypNam is FunTypNam); - Expect.isTrue(varFunNam is FunNam); - Expect.isTrue(varFunNam is! FunTypNam); - - Expect.isTrue(funReqNam is FunReqNam); - Expect.isTrue(funReqNam is! FunTypReqNam); - Expect.isTrue(funTypReqNam is! FunReqNam); - Expect.isTrue(funTypReqNam is FunTypReqNam); - Expect.isTrue(varFunReqNam is FunReqNam); - Expect.isTrue(varFunReqNam is! FunTypReqNam); -} diff --git a/tests/language_2/getter/closure_execution_order_test.dart b/tests/language_2/getter/closure_execution_order_test.dart deleted file mode 100644 index 9eebed680a2..00000000000 --- a/tests/language_2/getter/closure_execution_order_test.dart +++ /dev/null @@ -1,91 +0,0 @@ -// 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. -// -// Test that a getter is evaluated after the arguments, when a getter is -// for invoking a method. See chapter 'Method Invocation' in specification. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -var counter = 0; - -class Test1 { - get a { - Expect.equals(1, counter); - counter++; - return (c) {}; - } - - b() { - Expect.equals(0, counter); - counter++; - return 1; - } -} - -class Test2 { - static get a { - Expect.equals(0, counter); - counter++; - return (c) {}; - } - - static b() { - Expect.equals(1, counter); - counter++; - return 1; - } -} - -get a { - Expect.equals(0, counter); - counter++; - return (c) {}; -} - -b() { - Expect.equals(1, counter); - counter++; - return 1; -} - -main() { - var failures = []; - try { - // Check instance getters. - counter = 0; - var o = new Test1(); - o.a(o.b()); - Expect.equals(2, counter); - } catch (exc, stack) { - failures.add(exc); - failures.add(stack); - } - try { - // Check static getters. - counter = 0; - Test2.a(Test2.b()); - Expect.equals(2, counter); - } catch (exc, stack) { - failures.add(exc); - failures.add(stack); - } - try { - // Check top-level getters. - counter = 0; - a(b()); - Expect.equals(2, counter); - } catch (exc, stack) { - failures.add(exc); - failures.add(stack); - } - // If any of the tests failed print out the details and fail the test. - if (failures.length != 0) { - for (var msg in failures) { - print(msg.toString()); - } - throw "${failures.length ~/ 2} tests failed."; - } -} diff --git a/tests/language_2/getter/declaration_test.dart b/tests/language_2/getter/declaration_test.dart deleted file mode 100644 index eeab6b7ce57..00000000000 --- a/tests/language_2/getter/declaration_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Test that a getter takes no parameters. -get m(extraParam) { -// ^ -// [analyzer] SYNTACTIC_ERROR.GETTER_WITH_PARAMETERS -// [cfe] A getter can't have formal parameters. - return null; -} - -main() { - m; -} diff --git a/tests/language_2/getter/no_setter2_runtime_test.dart b/tests/language_2/getter/no_setter2_runtime_test.dart deleted file mode 100644 index b7724cba903..00000000000 --- a/tests/language_2/getter/no_setter2_runtime_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. -// Verifies behavior with a static getter, but no field and no setter. - -import "package:expect/expect.dart"; - -class Example { - static int _var = 1; - static int get nextVar => _var++; - Example() { - - - } - static test() { - - - } -} - -class Example1 { - Example1(int i) {} -} - -class Example2 extends Example1 { - static int _var = 1; - static int get nextVar => _var++; - Example2() : super(nextVar) {} // No 'this' in scope. -} - -void main() { - Example x = new Example(); - Example.test(); - Example2 x2 = new Example2(); -} diff --git a/tests/language_2/getter/no_setter2_test.dart b/tests/language_2/getter/no_setter2_test.dart deleted file mode 100644 index 42af45955df..00000000000 --- a/tests/language_2/getter/no_setter2_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2012, 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. -// Verifies behavior with a static getter, but no field and no setter. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Example { - static int _var = 1; - static int get nextVar => _var++; - Example() { - nextVar++; -// ^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'nextVar'. - this.nextVar++; - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER - // [cfe] The getter 'nextVar' isn't defined for the class 'Example'. - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INSTANCE_ACCESS_TO_STATIC_MEMBER - // [cfe] The setter 'nextVar' isn't defined for the class 'Example'. - } - static test() { - nextVar++; -// ^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'nextVar'. - this.nextVar++; -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_REFERENCE_TO_THIS -// [cfe] Expected identifier, but got 'this'. -// ^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INSTANCE_ACCESS_TO_STATIC_MEMBER -// ^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER - } -} - -class Example1 { - Example1(int i) {} -} - -class Example2 extends Example1 { - static int _var = 1; - static int get nextVar => _var++; - Example2() : super(nextVar) {} // No 'this' in scope. -} - -void main() { - Example x = new Example(); - Example.test(); - Example2 x2 = new Example2(); -} diff --git a/tests/language_2/getter/no_setter_runtime_test.dart b/tests/language_2/getter/no_setter_runtime_test.dart deleted file mode 100644 index b7724cba903..00000000000 --- a/tests/language_2/getter/no_setter_runtime_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. -// Verifies behavior with a static getter, but no field and no setter. - -import "package:expect/expect.dart"; - -class Example { - static int _var = 1; - static int get nextVar => _var++; - Example() { - - - } - static test() { - - - } -} - -class Example1 { - Example1(int i) {} -} - -class Example2 extends Example1 { - static int _var = 1; - static int get nextVar => _var++; - Example2() : super(nextVar) {} // No 'this' in scope. -} - -void main() { - Example x = new Example(); - Example.test(); - Example2 x2 = new Example2(); -} diff --git a/tests/language_2/getter/no_setter_test.dart b/tests/language_2/getter/no_setter_test.dart deleted file mode 100644 index 9690f56ce4e..00000000000 --- a/tests/language_2/getter/no_setter_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2012, 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. -// Verifies behavior with a static getter, but no field and no setter. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Example { - static int _var = 1; - static int get nextVar => _var++; - Example() { - nextVar = 1; -// ^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'nextVar'. - this.nextVar = 1; - // ^^^^^^^ - // [cfe] The setter 'nextVar' isn't defined for the class 'Example'. - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER - } - static test() { - nextVar = 0; -// ^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'nextVar'. - this.nextVar = 0; -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_REFERENCE_TO_THIS -// [cfe] Expected identifier, but got 'this'. -// ^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER - } -} - -class Example1 { - Example1(int i) {} -} - -class Example2 extends Example1 { - static int _var = 1; - static int get nextVar => _var++; - Example2() : super(nextVar) {} // No 'this' in scope. -} - -void main() { - Example x = new Example(); - Example.test(); - Example2 x2 = new Example2(); -} diff --git a/tests/language_2/getter/override2_test.dart b/tests/language_2/getter/override2_test.dart deleted file mode 100644 index 548f4f93d8e..00000000000 --- a/tests/language_2/getter/override2_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that we report a compile-time error when an instance getter conflicts -// with an inherited instance method of the same name. - -import "package:expect/expect.dart"; - -class A { - var foo = 42; // //# 00: ok - get foo => 42; // //# 01: ok - foo() => 42; // //# 02: compile-time error - set foo(value) { } // //# 03: ok -} - -class B extends A { - get foo => 42; -} - -main() { - Expect.equals(42, new B().foo); -} diff --git a/tests/language_2/getter/override3_test.dart b/tests/language_2/getter/override3_test.dart deleted file mode 100644 index 787ab7a717d..00000000000 --- a/tests/language_2/getter/override3_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2016, 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 - -// Tests that a getter in a subclass does not shadow the setter in the -// superclass. -import "package:expect/expect.dart"; - -class A { - int _x = 42; - void set x(int val) { - _x = val; - } -} - -class B extends A { - int get x => _x; -} - -void main() { - var b = new B(); - Expect.equals(42, b.x); - - b.x = 21; - Expect.equals(21, b.x); -} diff --git a/tests/language_2/getter/override_test.dart b/tests/language_2/getter/override_test.dart deleted file mode 100644 index 713e5d9c31b..00000000000 --- a/tests/language_2/getter/override_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that we report a compile-time error when a static getter conflicts with -// an inherited instance member of the same name. - -import "package:expect/expect.dart"; - -class A { - var foo = 42; // //# 00: compile-time error - get foo => 42; // //# 01: compile-time error - foo() => 42; // //# 02: compile-time error - set foo(value) { } // //# 03: compile-time error -} - -class B extends A { - static get foo => 42; -} - -main() { - Expect.equals(42, B.foo); -} diff --git a/tests/language_2/getter/parameters_runtime_test.dart b/tests/language_2/getter/parameters_runtime_test.dart deleted file mode 100644 index 4d9a128871d..00000000000 --- a/tests/language_2/getter/parameters_runtime_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. -// -// Test that a getter has no parameters. - -get f1 => null; -get f2 - - => null; -get f3 - - => null; -get f4 - - => null; -get f5 - - => null; - -main() { - f1; - f2; - f3; - f4; - f5; -} diff --git a/tests/language_2/getter/parameters_test.dart b/tests/language_2/getter/parameters_test.dart deleted file mode 100644 index 12ce7e863f3..00000000000 --- a/tests/language_2/getter/parameters_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2013, 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. -// -// Test that a getter has no parameters. - -// @dart = 2.9 - -get f1 => null; -get f2 -() -// [error line 11, column 1, length 1] -// [analyzer] SYNTACTIC_ERROR.GETTER_WITH_PARAMETERS -// [cfe] A getter can't have formal parameters. - => null; -get f3 -(arg) -// [error line 17, column 1, length 1] -// [analyzer] SYNTACTIC_ERROR.GETTER_WITH_PARAMETERS -// [cfe] A getter can't have formal parameters. - => null; -get f4 -([arg]) -// [error line 23, column 1, length 1] -// [analyzer] SYNTACTIC_ERROR.GETTER_WITH_PARAMETERS -// [cfe] A getter can't have formal parameters. - => null; -get f5 -({arg}) -// [error line 29, column 1, length 1] -// [analyzer] SYNTACTIC_ERROR.GETTER_WITH_PARAMETERS -// [cfe] A getter can't have formal parameters. - => null; - -main() { - f1; - f2; - f3; - f4; - f5; -} diff --git a/tests/language_2/getter/setter2_runtime_test.dart b/tests/language_2/getter/setter2_runtime_test.dart deleted file mode 100644 index 5debd8f5e36..00000000000 --- a/tests/language_2/getter/setter2_runtime_test.dart +++ /dev/null @@ -1,87 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -// [NNBD non-migrated]: This test relies on implicit downcasts which are an -// error in NNBD, so has no version in language/. -import "package:expect/expect.dart"; - -// Tests classes with getters and setters that do not have the same type. - -class A { - int a() { - return 37; - } -} - -class B extends A { - int b() { - return 38; - } -} - -class C {} - -class T1 { - A getterField; - A get field { - return getterField; - } - - // OK, B is assignable to A - void set field(B arg) { - getterField = arg; - } -} - -class T2 { - A getterField; - C setterField; - A get field { - return getterField; - } - - // Type C is not assignable to A - -} - -class T3 { - B getterField; - B get field { - return getterField; - } - - // OK, A is assignable to B - void set field(A arg) { - getterField = arg; - } -} - -main() { - T1 instance1 = new T1(); - - T3 instance3 = new T3(); - - instance1.field = new B(); - A resultA = instance1.field; - Expect.throwsTypeError(() => instance1.field = new A() as dynamic); - B resultB = instance1.field; - - int result; - result = instance1.field.a(); - Expect.equals(37, result); - - // Type 'A' has no method named 'b' - - - instance3.field = new B(); - result = instance3.field.a(); - Expect.equals(37, result); - result = instance3.field.b(); - Expect.equals(38, result); -} diff --git a/tests/language_2/getter/setter2_test.dart b/tests/language_2/getter/setter2_test.dart deleted file mode 100644 index 5fd824826e1..00000000000 --- a/tests/language_2/getter/setter2_test.dart +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Tests classes with getters and setters that do not have the same type. - -class A { - int a() { - return 37; - } -} - -class B extends A { - int b() { - return 38; - } -} - -class C {} - -class T1 { - A getterField; - A get field { - return getterField; - } - - // OK, B is assignable to A - void set field(B arg) { - getterField = arg; - } -} - -class T2 { - A getterField; - C setterField; - A get field { - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_ASSIGNABLE_SETTER_TYPES - // [cfe] The type 'A' of the getter 'T2.field' is not assignable to the type 'C' of the setter 'T2.field'. - return getterField; - } - - // Type C is not assignable to A - void set field(C arg) { setterField = arg; } -} - -class T3 { - B getterField; - B get field { - return getterField; - } - - // OK, A is assignable to B - void set field(A arg) { - getterField = arg; - } -} - -main() { - T1 instance1 = new T1(); - T2 instance2 = new T2(); - T3 instance3 = new T3(); - - instance1.field = new B(); - A resultA = instance1.field; - Expect.throwsTypeError(() => instance1.field = new A() as dynamic); - B resultB = instance1.field; - - int result; - result = instance1.field.a(); - Expect.equals(37, result); - - // Type 'A' has no method named 'b' - instance1.field.b(); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD - // [cfe] The method 'b' isn't defined for the class 'A'. - - instance3.field = new B(); - result = instance3.field.a(); - Expect.equals(37, result); - result = instance3.field.b(); - Expect.equals(38, result); -} diff --git a/tests/language_2/getter/setter_getters_setters_test.dart b/tests/language_2/getter/setter_getters_setters_test.dart deleted file mode 100644 index 453ab5fd8d3..00000000000 --- a/tests/language_2/getter/setter_getters_setters_test.dart +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class GettersSettersTest { - static int foo; - - static testMain() { - A a = new A(); - a.x = 2; - Expect.equals(2, a.x); - Expect.equals(2, a.x_); - - // Test inheritance. - a = new B(); - a.x = 4; - Expect.equals(4, a.x); - Expect.equals(4, a.x_); - - // Test overriding. - C c = new C(); - c.x = 8; - Expect.equals(8, c.x); - Expect.equals(0, c.x_); - Expect.equals(8, c.y_); - - // Test keyed getters and setters. - a.x_ = 0; - Expect.equals(2, a[2]); - a[2] = 4; - Expect.equals(6, a[0]); - - // Test assignment operators. - a.x_ = 0; - a[2] += 8; - Expect.equals(12, a[0]); - - // Test calling a function that internally uses getters. - Expect.equals(true, a.isXPositive()); - - // Test static fields. - foo = 42; - Expect.equals(42, foo); - A.foo = 43; - Expect.equals(43, A.foo); - - new D().test(); - - OverrideField of = new OverrideField(); - Expect.equals(27, of.getX_()); - - ReferenceField rf = new ReferenceField(); - rf.x_ = 1; - Expect.equals(1, rf.getIt()); - rf.setIt(2); - Expect.equals(2, rf.x_); - } -} - -class A { - int x_; - static int foo; - - static get bar { - return foo; - } - - static set bar(newValue) { - foo = newValue; - } - - int get x { - return x_; - } - - void set x(int value) { - x_ = value; - } - - bool isXPositive() { - return x > 0; - } - - int operator [](int index) { - return x_ + index; - } - - void operator []=(int index, int value) { - x_ = index + value; - } - - int getX_() { - return x_; - } -} - -class B extends A {} - -class C extends A { - int y_; - - C() : super() { - this.x_ = 0; - } - - int get x { - return y_; - } - - void set x(int value) { - y_ = value; - } -} - -class D extends A { - var x2_; - - set x(new_x) { - x2_ = new_x; - } - - test() { - x = 87; - Expect.equals(87, x2_); - x = 42; - Expect.equals(42, x2_); - } -} - -class OverrideField extends A { - int get x_ { - return 27; - } -} - -class ReferenceField extends A { - setIt(a) { - super.x_ = a; - } - - int getIt() { - return super.x_; - } -} - -main() { - GettersSettersTest.testMain(); -} diff --git a/tests/language_2/getter/setter_in_lib.dart b/tests/language_2/getter/setter_in_lib.dart deleted file mode 100644 index f19c973d010..00000000000 --- a/tests/language_2/getter/setter_in_lib.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2012, 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 GetterSetterInLib; - -get foo => 42; -set foo(a) {} - -get bar => 77; diff --git a/tests/language_2/getter/setter_in_lib2.dart b/tests/language_2/getter/setter_in_lib2.dart deleted file mode 100644 index e3b587975c8..00000000000 --- a/tests/language_2/getter/setter_in_lib2.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2015, 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 GetterSetterInLib2; - -set bar(a) {} diff --git a/tests/language_2/getter/setter_in_lib3.dart b/tests/language_2/getter/setter_in_lib3.dart deleted file mode 100644 index 3d1270e2d1f..00000000000 --- a/tests/language_2/getter/setter_in_lib3.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2015, 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 GetterSetterInLib3; - -var _f = 33; - -set bar(a) { - _f = a; -} - -get bar => _f; diff --git a/tests/language_2/getter/setter_in_lib_test.dart b/tests/language_2/getter/setter_in_lib_test.dart deleted file mode 100644 index 1ac76cbb717..00000000000 --- a/tests/language_2/getter/setter_in_lib_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012, 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 GetterSetterInLibTest; - -import "package:expect/expect.dart"; -import 'setter_in_lib.dart'; -import 'setter_in_lib2.dart'; -import 'setter_in_lib3.dart' as L3; - -main() { - Expect.equals(42, foo); - foo = 43; - Expect.equals(42, foo); - - Expect.equals(77, bar); - bar = 43; - Expect.equals(77, bar); - - Expect.equals(L3.bar, 33); - L3.bar = 44; - Expect.equals(L3.bar, 44); -} diff --git a/tests/language_2/getter/setter_interceptor_test.dart b/tests/language_2/getter/setter_interceptor_test.dart deleted file mode 100644 index 1b165eb4e02..00000000000 --- a/tests/language_2/getter/setter_interceptor_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - int length = 0; -} - -class B { - int length = 0; - foo(receiver) { - length++; - return receiver.length++; - } - - bar(receiver) { - ++length; - return ++receiver.length; - } -} - -main() { - var a = new A(); - var b = new B(); - var c = [1, 2, 3]; - - Expect.equals(3, b.foo(c)); - Expect.equals(5, b.bar(c)); - Expect.equals(5, c.length); - - Expect.equals(0, b.foo(a)); - Expect.equals(2, b.bar(a)); - Expect.equals(2, a.length); - - Expect.equals(4, b.length); -} diff --git a/tests/language_2/getter/setter_order_test.dart b/tests/language_2/getter/setter_order_test.dart deleted file mode 100644 index 8f3ff6bb87c..00000000000 --- a/tests/language_2/getter/setter_order_test.dart +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test for the evaluation order of getters and setters. - -import 'package:expect/expect.dart'; - -var trace; - -class X { - get b { - trace.add('get b'); - return new X(); - } - - set c(value) { - trace.add('set c'); - } - - toString() { - trace.add('toString'); - return 'X'; - } - - get c { - trace.add('get c'); - return 42; - } - - get d { - trace.add('get d'); - return new X(); - } - - operator [](index) { - trace.add('index'); - return 42; - } - - operator []=(index, value) { - trace.add('indexSet'); - } -} - -main() { - var x = new X(); - - trace = []; - x.b.c = '$x'; - Expect.listEquals(['get b', 'toString', 'set c'], trace); - - trace = []; - x.b.c += '$x'.hashCode; - Expect.listEquals(['get b', 'get c', 'toString', 'set c'], trace); - - trace = []; - x.b.c++; - Expect.listEquals(['get b', 'get c', 'set c'], trace); - - trace = []; - x.b.d[42] = '$x'; - Expect.listEquals(['get b', 'get d', 'toString', 'indexSet'], trace); - - trace = []; - x.b.d[42] += '$x'.hashCode; - Expect.listEquals(['get b', 'get d', 'index', 'toString', 'indexSet'], trace); - - trace = []; - x.b.d[42]++; - Expect.listEquals(['get b', 'get d', 'index', 'indexSet'], trace); - - trace = []; - ++x.b.d[42]; - Expect.listEquals(['get b', 'get d', 'index', 'indexSet'], trace); - - trace = []; - x.b.d[x.c] *= '$x'.hashCode; - Expect.listEquals( - ['get b', 'get d', 'get c', 'index', 'toString', 'indexSet'], trace); - - trace = []; - x.b.c = x.d.c = '$x'; - Expect.listEquals([ - 'get b', - 'get d', - 'toString', - 'set c', - 'set c', - ], trace); - - trace = []; - x.b.c = x.d[42] *= '$x'.hashCode; - Expect.listEquals( - ['get b', 'get d', 'index', 'toString', 'indexSet', 'set c'], trace); - - trace = []; - x.b.c = ++x.d.c; - Expect.listEquals(['get b', 'get d', 'get c', 'set c', 'set c'], trace); -} diff --git a/tests/language_2/getter/setter_type2_test.dart b/tests/language_2/getter/setter_type2_test.dart deleted file mode 100644 index 2eb953ae13b..00000000000 --- a/tests/language_2/getter/setter_type2_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012, 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. -// Getters and setters can have different types, and it is not a warning if the -// two types are assignable. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -int bar = 499; - -int get foo => bar; - -void set foo(str) { - bar = str.length; -} - -main() { - int x = foo; - Expect.equals(499, x); - foo = "1234"; - int y = foo; - Expect.equals(4, y); -} diff --git a/tests/language_2/getter/setter_type3_test.dart b/tests/language_2/getter/setter_type3_test.dart deleted file mode 100644 index 0637d171d7c..00000000000 --- a/tests/language_2/getter/setter_type3_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2012, 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. -// Getters and setters can have different types, and it is not a warning if the -// two types are assignable. - -// @dart = 2.9 - -// [NNBD non-migrated]: NNBD requires a getter's return type to be a subtype of -// the corresponding setter's parameter type. So this test would be a static -// error, and hence there is no corresponding NNBD version. -import "package:expect/expect.dart"; - -int bar = 499; - -get foo => bar; - -void set foo(String str) { - bar = str.length; -} - -main() { - int x = foo; - Expect.equals(499, x); - foo = "1234"; - int y = foo; - Expect.equals(4, y); -} diff --git a/tests/language_2/getter/setter_type_runtime_test.dart b/tests/language_2/getter/setter_type_runtime_test.dart deleted file mode 100644 index 4348bff648b..00000000000 --- a/tests/language_2/getter/setter_type_runtime_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. -// Getters and setters can have different types, but it is a warning if the -// two types are not assignable. - -import "package:expect/expect.dart"; - -int bar = 499; - - -get foo => bar; - -void set foo( - - str) { - bar = str.length; -} - -main() { - int x = foo; - Expect.equals(499, x); - foo = "1234"; - int y = foo; - Expect.equals(4, y); -} diff --git a/tests/language_2/getter/setter_type_test.dart b/tests/language_2/getter/setter_type_test.dart deleted file mode 100644 index 118366b7583..00000000000 --- a/tests/language_2/getter/setter_type_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2012, 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. -// Getters and setters can have different types, but it is a warning if the -// two types are not assignable. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -int bar = 499; - -int get foo => bar; -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_ASSIGNABLE_SETTER_TYPES -// [cfe] The type 'int' of the getter 'foo' is not assignable to the type 'String' of the setter 'foo'. - -void set foo(String str) { - bar = str.length; -} - -main() { - int x = foo; - Expect.equals(499, x); - foo = "1234"; - int y = foo; - Expect.equals(4, y); -} diff --git a/tests/language_2/getter/syntax_get_set_syntax_test.dart b/tests/language_2/getter/syntax_get_set_syntax_test.dart deleted file mode 100644 index 31bcf4e8058..00000000000 --- a/tests/language_2/getter/syntax_get_set_syntax_test.dart +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) 2012, 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 - -var get; -var get a; -// [error line 8, column 1, length 3] -// [analyzer] SYNTACTIC_ERROR.VAR_RETURN_TYPE -// [cfe] The return type can't be 'var'. -// ^ -// [analyzer] SYNTACTIC_ERROR.MISSING_FUNCTION_BODY -// [cfe] Expected a function body or '=>'. -var get b, c; -// [error line 15, column 1, length 3] -// [analyzer] SYNTACTIC_ERROR.VAR_RETURN_TYPE -// [cfe] The return type can't be 'var'. -// ^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_EXECUTABLE -// [analyzer] SYNTACTIC_ERROR.MISSING_FUNCTION_BODY -// [cfe] Expected '{' before this. -// [cfe] Expected a declaration, but got ','. -// [cfe] Expected a function body, but got ','. -// [cfe] Expected a function body, but got '{'. -// ^ -// [analyzer] SYNTACTIC_ERROR.MISSING_CONST_FINAL_VAR_OR_TYPE -// [cfe] Variables must be declared using the keywords 'const', 'final', 'var' or a type name. - -var set; -var set d; -// [error line 31, column 1, length 3] -// [analyzer] SYNTACTIC_ERROR.VAR_RETURN_TYPE -// [cfe] The return type can't be 'var'. -// ^ -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER -// [analyzer] SYNTACTIC_ERROR.MISSING_FUNCTION_PARAMETERS -// [cfe] A function declaration needs an explicit list of parameters. -// ^ -// [analyzer] SYNTACTIC_ERROR.MISSING_FUNCTION_BODY -// [cfe] A setter should have exactly one formal parameter. -// [cfe] Expected a function body or '=>'. -var set e, f; -// [error line 43, column 1, length 3] -// [analyzer] SYNTACTIC_ERROR.VAR_RETURN_TYPE -// [cfe] The return type can't be 'var'. -// ^ -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER -// [analyzer] SYNTACTIC_ERROR.MISSING_FUNCTION_PARAMETERS -// [cfe] A function declaration needs an explicit list of parameters. -// ^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_EXECUTABLE -// [analyzer] SYNTACTIC_ERROR.MISSING_FUNCTION_BODY -// [cfe] A setter should have exactly one formal parameter. -// [cfe] Expected '{' before this. -// [cfe] Expected a declaration, but got ','. -// ^ -// [analyzer] SYNTACTIC_ERROR.MISSING_CONST_FINAL_VAR_OR_TYPE -// [cfe] Variables must be declared using the keywords 'const', 'final', 'var' or a type name. - -class C0 { -// ^ -// [cfe] The non-abstract class 'C0' is missing implementations for these members: - var get; - var get a; -//^^^ -// [analyzer] SYNTACTIC_ERROR.VAR_RETURN_TYPE -// [cfe] The return type can't be 'var'. -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER - var get b, c; -//^^^ -// [analyzer] SYNTACTIC_ERROR.VAR_RETURN_TYPE -// [cfe] The return type can't be 'var'. -// ^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_CLASS_MEMBER -// [analyzer] SYNTACTIC_ERROR.MISSING_FUNCTION_BODY -// [cfe] Expected '{' before this. -// [cfe] Expected a class member, but got ','. -// ^ -// [analyzer] SYNTACTIC_ERROR.MISSING_CONST_FINAL_VAR_OR_TYPE -// [cfe] Variables must be declared using the keywords 'const', 'final', 'var' or a type name. - - var set; - var set d; -//^^^ -// [analyzer] SYNTACTIC_ERROR.VAR_RETURN_TYPE -// [cfe] The return type can't be 'var'. -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER -// ^ -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER -// [analyzer] SYNTACTIC_ERROR.MISSING_METHOD_PARAMETERS -// [cfe] A method declaration needs an explicit list of parameters. -// ^ -// [cfe] A setter should have exactly one formal parameter. - var set e, f; -//^^^ -// [analyzer] SYNTACTIC_ERROR.VAR_RETURN_TYPE -// [cfe] The return type can't be 'var'. -// ^ -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER -// [analyzer] SYNTACTIC_ERROR.MISSING_METHOD_PARAMETERS -// [cfe] A method declaration needs an explicit list of parameters. -// ^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_CLASS_MEMBER -// [analyzer] SYNTACTIC_ERROR.MISSING_FUNCTION_BODY -// [cfe] A setter should have exactly one formal parameter. -// [cfe] Expected '{' before this. -// [cfe] Expected a class member, but got ','. -// ^ -// [analyzer] SYNTACTIC_ERROR.MISSING_CONST_FINAL_VAR_OR_TYPE -// [cfe] Variables must be declared using the keywords 'const', 'final', 'var' or a type name. -} - -class C1 { - List get; - List get a => null; - List get b, c; - // ^ - // [analyzer] SYNTACTIC_ERROR.EXPECTED_CLASS_MEMBER - // [analyzer] SYNTACTIC_ERROR.MISSING_FUNCTION_BODY - // [cfe] Expected '{' before this. - // [cfe] Expected a class member, but got ','. - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_CONST_FINAL_VAR_OR_TYPE - // [cfe] Variables must be declared using the keywords 'const', 'final', 'var' or a type name. - - List set; - List set d; -//^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER -//^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER -// [cfe] The return type of the setter must be 'void' or absent. -// ^ -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER -// [analyzer] SYNTACTIC_ERROR.MISSING_METHOD_PARAMETERS -// [cfe] A method declaration needs an explicit list of parameters. -// ^ -// [cfe] A setter should have exactly one formal parameter. - List set e, f; -//^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER -// [cfe] The return type of the setter must be 'void' or absent. -// ^ -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER -// [analyzer] SYNTACTIC_ERROR.MISSING_METHOD_PARAMETERS -// [cfe] A method declaration needs an explicit list of parameters. -// ^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_CLASS_MEMBER -// [analyzer] SYNTACTIC_ERROR.MISSING_FUNCTION_BODY -// [cfe] A setter should have exactly one formal parameter. -// [cfe] Expected '{' before this. -// [cfe] Expected a class member, but got ','. -// ^ -// [analyzer] SYNTACTIC_ERROR.MISSING_CONST_FINAL_VAR_OR_TYPE -// [cfe] Variables must be declared using the keywords 'const', 'final', 'var' or a type name. -} - -class C2 { - List get; - List get a => null; - List get b, c; - // ^ - // [analyzer] SYNTACTIC_ERROR.EXPECTED_CLASS_MEMBER - // [analyzer] SYNTACTIC_ERROR.MISSING_FUNCTION_BODY - // [cfe] Expected '{' before this. - // [cfe] Expected a class member, but got ','. - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_CONST_FINAL_VAR_OR_TYPE - // [cfe] Variables must be declared using the keywords 'const', 'final', 'var' or a type name. - - List set; - List set d; -//^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER -//^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER -// [cfe] The return type of the setter must be 'void' or absent. -// ^ -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER -// [analyzer] SYNTACTIC_ERROR.MISSING_METHOD_PARAMETERS -// [cfe] A method declaration needs an explicit list of parameters. -// ^ -// [cfe] A setter should have exactly one formal parameter. - List set e, f; -//^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER -// [cfe] The return type of the setter must be 'void' or absent. -// ^ -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER -// [analyzer] SYNTACTIC_ERROR.MISSING_METHOD_PARAMETERS -// [cfe] A method declaration needs an explicit list of parameters. -// ^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_CLASS_MEMBER -// [analyzer] SYNTACTIC_ERROR.MISSING_FUNCTION_BODY -// [cfe] A setter should have exactly one formal parameter. -// [cfe] Expected '{' before this. -// [cfe] Expected a class member, but got ','. -// ^ -// [analyzer] SYNTACTIC_ERROR.MISSING_CONST_FINAL_VAR_OR_TYPE -// [cfe] Variables must be declared using the keywords 'const', 'final', 'var' or a type name. -} - -main() { - new C0(); - new C1(); - new C2(); -} diff --git a/tests/language_2/getter/syntax_runtime_1_test.dart b/tests/language_2/getter/syntax_runtime_1_test.dart deleted file mode 100644 index 0fd7fcc9d74..00000000000 --- a/tests/language_2/getter/syntax_runtime_1_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -var get; - - - -var set; - - - -class C0 { - var get; - - - - var set; - - -} - -class C1 { - List get; - List get a => null; - - - List set; - - -} - -class C2 { - List get; - List get a => null; - - - List set; - - -} - -main() { - new C0(); - new C1(); - new C2(); -} diff --git a/tests/language_2/getter/syntax_runtime_test.dart b/tests/language_2/getter/syntax_runtime_test.dart deleted file mode 100644 index abd575ce382..00000000000 --- a/tests/language_2/getter/syntax_runtime_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - - - - - - - - - -class C0 { - - - - - - - -} - -class C1 { - - - - - - - -} - -class C2 { - - - - - - - -} - -main() { - new C0(); - new C1(); - new C2(); -} diff --git a/tests/language_2/getter/unbound_test.dart b/tests/language_2/getter/unbound_test.dart deleted file mode 100644 index 18e77cc570f..00000000000 --- a/tests/language_2/getter/unbound_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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. -// Verify that an unbound getter is properly resolved at runtime. - -// @dart = 2.9 - -class A { - const A(); - foo() { - return y; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER - // [cfe] The getter 'y' isn't defined for the class 'A'. - } -} - -main() { - new A().foo(); -} diff --git a/tests/language_2/identifier/built_in_identifier_test.dart b/tests/language_2/identifier/built_in_identifier_test.dart deleted file mode 100644 index a19d8934fea..00000000000 --- a/tests/language_2/identifier/built_in_identifier_test.dart +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) 2012, 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. -// Check that we can use pseudo keywords as names in function level code. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class PseudoKWTest { - static testMain() { - // This is a list of built-in identifiers from the Dart spec. - // It sanity checks that these pseudo-keywords are legal identifiers. - - var abstract = 0; //# 01: ok - var as = 0; - var dynamic = 0; - var export = 0; - var external = 0; //# 01: ok - var factory = 0; - var get = 0; - var interface = 0; - var implements = 0; - var import = 0; - var library = 0; - var mixin = 0; - var operator = 0; - var part = 0; - var set = 0; - var static = 0; //# 01: ok - var typedef = 0; - - // "native" is a per-implementation extension that is not a part of the - // Dart language. While it is not an official built-in identifier, it - // is useful to ensure that it remains a legal identifier. - var native = 0; - - // The code below adds a few additional variants of usage without any - // attempt at complete coverage. - { - void factory(set) { - return; //# 01: ok - } - } - - get: - while (import > 0) { - break get; - } - - return - static + //# 01: ok - library * operator; - } -} - -typedef(x) => "typedef $x"; //# 01: ok - -static(abstract) { //# 01: ok - return abstract == true; //# 01: ok -} //# 01: ok - -class A { - var typedef = 0; - final operator = "smooth"; - - set(x) { - typedef = x; - } - - get() => typedef - 5; - - static static() { //# 01: ok - return 1; //# 01: ok - } //# 01: ok - static check() { - var o = new A(); - o.set(55); - Expect.equals(50, o.get()); - static(); //# 01: ok - } -} - -class B { - var set = 100; - get get => set; - set get(get) => set = 2 * get.get; - - static() { //# 01: ok - var set = new B(); //# 01: ok - set.get = set; //# 01: ok - Expect.equals(200, set.get); //# 01: ok - } //# 01: ok - int operator() { - return 1; - } -} - -class C { - static int operator = (5); - static var get; - static get set => 111; - static set set(set) {} -} - -main() { - PseudoKWTest.testMain(); - A.check(); - new B().static(); //# 01: ok - Expect.equals(1, new B().operator()); - Expect.equals(1, A.static()); //# 01: ok - typedef("T"); //# 01: ok - Expect.equals("typedef T", typedef("T")); //# 01: ok - static("true"); //# 01: ok - Expect.equals(false, static("true")); //# 01: ok - Expect.equals(5, C.operator); - Expect.equals(null, C.get); - C.set = 0; - Expect.equals(111, C.set); -} diff --git a/tests/language_2/identifier/built_in_illegal_runtime_test.dart b/tests/language_2/identifier/built_in_illegal_runtime_test.dart deleted file mode 100644 index 667aa87fdc1..00000000000 --- a/tests/language_2/identifier/built_in_illegal_runtime_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. -// Check that we cannot use a pseudo keyword at the class level code. - -// Pseudo keywords are not allowed to be used as class names. - - - - - - - - - - - - - - - - - - -main() {} diff --git a/tests/language_2/identifier/built_in_illegal_test.dart b/tests/language_2/identifier/built_in_illegal_test.dart deleted file mode 100644 index 652199e8aeb..00000000000 --- a/tests/language_2/identifier/built_in_illegal_test.dart +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2012, 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. -// Check that we cannot use a pseudo keyword at the class level code. - -// @dart = 2.9 - -// Pseudo keywords are not allowed to be used as class names. -class abstract { } -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION -// [cfe] Can't use 'abstract' as a name here. -class as { } -// ^^ -// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION -// [cfe] Can't use 'as' as a name here. -class dynamic { } -// ^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION -// [cfe] Can't use 'dynamic' as a name here. -class export { } -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION -// [cfe] Can't use 'export' as a name here. -class external { } -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION -// [cfe] Can't use 'external' as a name here. -class factory { } -// ^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION -// [cfe] Can't use 'factory' as a name here. -class get { } -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION -// [cfe] Can't use 'get' as a name here. -class interface { } -// ^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION -// [cfe] Can't use 'interface' as a name here. -class implements { } -// ^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION -// [cfe] Can't use 'implements' as a name here. -class import { } -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION -// [cfe] Can't use 'import' as a name here. -class mixin { } -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION -// [cfe] Can't use 'mixin' as a name here. -class library { } -// ^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION -// [cfe] Can't use 'library' as a name here. -class operator { } -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION -// [cfe] Can't use 'operator' as a name here. -class part { } -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION -// [cfe] Can't use 'part' as a name here. -class set { } -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION -// [cfe] Can't use 'set' as a name here. -class static { } -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION -// [cfe] Can't use 'static' as a name here. -class typedef { } -// ^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.BUILT_IN_IDENTIFIER_IN_DECLARATION -// [cfe] Can't use 'typedef' as a name here. - -main() {} diff --git a/tests/language_2/identifier/built_in_not_prefix_test.dart b/tests/language_2/identifier/built_in_not_prefix_test.dart deleted file mode 100644 index d6f22b6cda4..00000000000 --- a/tests/language_2/identifier/built_in_not_prefix_test.dart +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2017, 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 - -// From The Dart Programming Language Specification, section 16.33 -// "Identifier Reference": -// -// "A built-in identifier is one of the identifiers produced by the -// production BUILT_IN_IDENTIFIER. It is a compile-time error if a -// built-in identifier is used as the declared name of a prefix, class, -// type parameter or type alias. It is a compile-time error to use a -// built-in identifier other than dynamic in a type annotation or type -// parameter." -// -// Observation: it is illegal to use a built-in identifier as a library -// prefix. - -// Dart test for using a built-in identifier as a library prefix. - -import "dart:core" // Fine unless imported with a built-in identifier as prefix. -deferred as abstract // //# deferred-abstract: compile-time error -deferred as as // //# deferred-as: compile-time error -deferred as covariant // //# deferred-covariant: compile-time error -deferred as deferred // //# deferred-deferred: compile-time error -deferred as dynamic // //# deferred-dynamic: compile-time error -deferred as export // //# deferred-export: compile-time error -deferred as external // //# deferred-external: compile-time error -deferred as factory // //# deferred-factory: compile-time error -deferred as get // //# deferred-get: compile-time error -deferred as implements // //# deferred-implements: compile-time error -deferred as import // //# deferred-import: compile-time error -deferred as interface // //# deferred-interface: compile-time error -deferred as library // //# deferred-library: compile-time error -deferred as mixin // //# deferred-mixin: compile-time error -deferred as operator // //# deferred-operator: compile-time error -deferred as part // //# deferred-part: compile-time error -deferred as set // //# deferred-set: compile-time error -deferred as static // //# deferred-static: compile-time error -deferred as typedef // //# deferred-typedef: compile-time error -as abstract // //# abstract: compile-time error -as as // //# as: compile-time error -as covariant // //# covariant: compile-time error -as deferred // //# deferred: compile-time error -as dynamic // //# dynamic: compile-time error -as export // //# export: compile-time error -as external // //# external: compile-time error -as factory // //# factory: compile-time error -as get // //# get: compile-time error -as implements // //# implements: compile-time error -as import // //# import: compile-time error -as interface // //# interface: compile-time error -as library // //# library: compile-time error -as mixin // //# mixin: compile-time error -as operator // //# operator: compile-time error -as part // //# part: compile-time error -as set // //# set: compile-time error -as static // //# static: compile-time error -as typedef // //# typedef: compile-time error -; - -main() { -} diff --git a/tests/language_2/identifier/built_in_prefix_library_async.dart b/tests/language_2/identifier/built_in_prefix_library_async.dart deleted file mode 100644 index 88994e73daf..00000000000 --- a/tests/language_2/identifier/built_in_prefix_library_async.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2012, 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 async; - -class A {} - -class B {} - -class C {} diff --git a/tests/language_2/identifier/built_in_prefix_library_await.dart b/tests/language_2/identifier/built_in_prefix_library_await.dart deleted file mode 100644 index 9508b845ec6..00000000000 --- a/tests/language_2/identifier/built_in_prefix_library_await.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2012, 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 await; - -class A {} - -class B {} - -class C {} diff --git a/tests/language_2/identifier/built_in_prefix_library_hide.dart b/tests/language_2/identifier/built_in_prefix_library_hide.dart deleted file mode 100644 index e91272c2a67..00000000000 --- a/tests/language_2/identifier/built_in_prefix_library_hide.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2012, 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 hide; - -class A {} - -class B {} - -class C {} diff --git a/tests/language_2/identifier/built_in_prefix_library_library.dart b/tests/language_2/identifier/built_in_prefix_library_library.dart deleted file mode 100644 index 3a693012ecb..00000000000 --- a/tests/language_2/identifier/built_in_prefix_library_library.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2012, 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 library; - -class A {} - -class B {} - -class C {} diff --git a/tests/language_2/identifier/built_in_prefix_library_of.dart b/tests/language_2/identifier/built_in_prefix_library_of.dart deleted file mode 100644 index fb061cad800..00000000000 --- a/tests/language_2/identifier/built_in_prefix_library_of.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2012, 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 of; - -class A {} - -class B {} - -class C {} diff --git a/tests/language_2/identifier/built_in_prefix_library_on.dart b/tests/language_2/identifier/built_in_prefix_library_on.dart deleted file mode 100644 index 48658f50bcf..00000000000 --- a/tests/language_2/identifier/built_in_prefix_library_on.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2012, 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 on; - -class A {} - -class B {} - -class C {} diff --git a/tests/language_2/identifier/built_in_prefix_library_show.dart b/tests/language_2/identifier/built_in_prefix_library_show.dart deleted file mode 100644 index 54bcc77bbab..00000000000 --- a/tests/language_2/identifier/built_in_prefix_library_show.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2012, 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 show; - -class A {} - -class B {} - -class C {} diff --git a/tests/language_2/identifier/built_in_prefix_library_sync.dart b/tests/language_2/identifier/built_in_prefix_library_sync.dart deleted file mode 100644 index 004c3fb89dc..00000000000 --- a/tests/language_2/identifier/built_in_prefix_library_sync.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2012, 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 sync; - -class A {} - -class B {} - -class C {} diff --git a/tests/language_2/identifier/built_in_prefix_library_yield.dart b/tests/language_2/identifier/built_in_prefix_library_yield.dart deleted file mode 100644 index f3193be7d16..00000000000 --- a/tests/language_2/identifier/built_in_prefix_library_yield.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2012, 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 yield; - -class A {} - -class B {} - -class C {} diff --git a/tests/language_2/identifier/built_in_type_annotation_test.dart b/tests/language_2/identifier/built_in_type_annotation_test.dart deleted file mode 100644 index 4ef7b53f762..00000000000 --- a/tests/language_2/identifier/built_in_type_annotation_test.dart +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) 2017, 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 - -// From The Dart Programming Language Specification, section 16.33 -// "Identifier Reference": -// -// "A built-in identifier is one of the identifiers produced by the -// production BUILT_IN_IDENTIFIER. It is a compile-time error if a -// built-in identifier is used as the declared name of a prefix, class, -// type parameter or type alias. It is a compile-time error to use a -// built-in identifier other than dynamic in a type annotation or type -// parameter." -// -// Observation: it is illegal to use a built-in identifier other than -// `dynamic` in a type annotation. A type annotation is not fully defined -// in the specification, so we assume this means that the grammar -// production "type" cannot be a built-in identifier, and it cannot contain -// a built-in identifier at a location where it must denote a type. -// -// Note that we have several ways to use built-in identifiers other than -// `dynamic` in other locations in a type, e.g., `Function(int set)`. - -final // optional type before variable must not be a built-in identifier. -abstract // //# abstract: syntax error -as // //# as: syntax error -covariant // //# covariant: syntax error -deferred // //# deferred: syntax error -dynamic // //# dynamic: ok -export // //# export: syntax error -external // //# external: syntax error -factory // //# factory: syntax error -get // //# get: syntax error -implements // //# implements: syntax error -import // //# import: syntax error -interface // //# interface: syntax error -library // //# library: syntax error -mixin // //# mixin: syntax error -operator // //# operator: syntax error -part // //# part: syntax error -set // //# set: syntax error -static // //# static: syntax error -typedef // //# typedef: syntax error - -abstract // //# abstract-gen: syntax error -as // //# as-gen: syntax error -covariant // //# covariant-gen: syntax error -deferred // //# deferred-gen: syntax error -dynamic // //# dynamic-gen: compile-time error -export // //# export-gen: syntax error -external // //# external-gen: syntax error -factory // //# factory-gen: syntax error -get // //# get-gen: syntax error -implements // //# implements-gen: syntax error -import // //# import-gen: syntax error -interface // //# interface-gen: syntax error -library // //# library-gen: syntax error -mixin // //# mixin-gen: syntax error -operator // //# operator-gen: syntax error -part // //# part-gen: syntax error -set // //# set-gen: syntax error -static // //# static-gen: syntax error -typedef // //# typedef-gen: syntax error - -List // //# abstract-list: syntax error -List // //# as-list: syntax error -List // //# covariant-list: syntax error -List // //# deferred-list: syntax error -List // //# dynamic-list: ok -List // //# export-list: syntax error -List // //# external-list: syntax error -List // //# factory-list: syntax error -List // //# get-list: syntax error -List // //# implements-list: syntax error -List // //# import-list: syntax error -List // //# interface-list: syntax error -List // //# library-list: syntax error -List // //# mixin-list: syntax error -List // //# operator-list: syntax error -List // //# part-list: syntax error -List // //# set-list: syntax error -List // //# static-list: syntax error -List // //# typedef-list: syntax error - -Function(abstract) // //# abstract-funarg: syntax error -Function(as) // //# as-funarg: syntax error -Function(covariant) // //# covariant-funarg: syntax error -Function(deferred) // //# deferred-funarg: syntax error -Function(dynamic) // //# dynamic-funarg: ok -Function(export) // //# export-funarg: syntax error -Function(external) // //# external-funarg: syntax error -Function(factory) // //# factory-funarg: syntax error -Function(get) // //# get-funarg: syntax error -Function(implements) // //# implements-funarg: syntax error -Function(import) // //# import-funarg: syntax error -Function(interface) // //# interface-funarg: syntax error -Function(library) // //# library-funarg: syntax error -Function(mixin) // //# mixin-funarg: syntax error -Function(operator) // //# operator-funarg: syntax error -Function(part) // //# part-funarg: syntax error -Function(set) // //# set-funarg: syntax error -Function(static) // //# static-funarg: syntax error -Function(typedef) // //# typedef-funarg: syntax error - -abstract Function() // //# abstract-funret: syntax error -as Function() // //# as-funret: syntax error -covariant Function() // //# covariant-funret: syntax error -deferred Function() // //# deferred-funret: syntax error -dynamic Function() // //# dynamic-funret: ok -export Function() // //# export-funret: syntax error -external Function() // //# external-funret: syntax error -factory Function() // //# factory-funret: syntax error -get Function() // //# get-funret: syntax error -implements Function() // //# implements-funret: syntax error -import Function() // //# import-funret: syntax error -interface Function() // //# interface-funret: syntax error -library Function() // //# library-funret: syntax error -mixin Function() // //# mixin-funret: syntax error -operator Function() // //# operator-funret: syntax error -part Function() // //# part-funret: syntax error -set Function() // //# set-funret: syntax error -static Function() // //# static-funret: syntax error -typedef Function() // //# typedef-funret: syntax error - -x = null; - -main() { - x.toString(); -} diff --git a/tests/language_2/identifier/known_prefix_error_runtime_test.dart b/tests/language_2/identifier/known_prefix_error_runtime_test.dart deleted file mode 100644 index f83e405da7a..00000000000 --- a/tests/language_2/identifier/known_prefix_error_runtime_test.dart +++ /dev/null @@ -1,83 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -// Test that identifiers which are used explicitly in the grammar but are -// not built-in identifiers can be used as library prefixes. - -// The identifiers listed below are mentioned in the grammar, but none of -// them is a reserved word or a built-in identifier. Such an identifier can -// be used as a library prefix; this test puts such prefixes in wrong -// locations to verify that this is being handled. Here are the 'known' -// identifiers: `async`, `await`, `hide`, `of`, `on`, `show`, `sync`, `yield`. - -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_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; - - - - - - - - - - - - - - - - - - - - - - - - - - - - -main() { - - - - - - - - - - - - - - - - - - - - - - - - - - -} diff --git a/tests/language_2/identifier/known_prefix_error_test.dart b/tests/language_2/identifier/known_prefix_error_test.dart deleted file mode 100644 index e4bd56f37a8..00000000000 --- a/tests/language_2/identifier/known_prefix_error_test.dart +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) 2017, 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 - -// Test that identifiers which are used explicitly in the grammar but are -// not built-in identifiers can be used as library prefixes. - -// The identifiers listed below are mentioned in the grammar, but none of -// them is a reserved word or a built-in identifier. Such an identifier can -// be used as a library prefix; this test puts such prefixes in wrong -// locations to verify that this is being handled. Here are the 'known' -// identifiers: `async`, `await`, `hide`, `of`, `on`, `show`, `sync`, `yield`. - -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 _async = new async.A(); -// [error line 30, column 1, length 5] -// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE -// [cfe] 'async' isn't a type. -await _await = new await.A(); -// [error line 34, column 1, length 5] -// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE -// [cfe] 'await' isn't a type. -hide _hide = new hide.A(); -// [error line 38, column 1, length 4] -// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE -// [cfe] 'hide' isn't a type. -of _of = new of.A(); -// [error line 42, column 1, length 2] -// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE -// [cfe] 'of' isn't a type. -on _on = new on.A(); -// [error line 46, column 1, length 2] -// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE -// [cfe] 'on' isn't a type. -show _show = new show.A(); -// [error line 50, column 1, length 4] -// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE -// [cfe] 'show' isn't a type. -sync _sync = new sync.A(); -// [error line 54, column 1, length 4] -// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE -// [cfe] 'sync' isn't a type. -yield _yield = new yield.A(); -// [error line 58, column 1, length 5] -// [analyzer] COMPILE_TIME_ERROR.NOT_A_TYPE -// [cfe] 'yield' isn't a type. - -async.B _B_async = new async.B(); -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT -// [cfe] 'async' isn't a type. -await.B _B_await = new await.B(); -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT -// [cfe] 'await' isn't a type. -hide.B _B_hide = new hide.B(); -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT -// [cfe] 'hide' isn't a type. -of.B _B_of = new of.B(); -// ^^ -// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT -// [cfe] 'of' isn't a type. -on.B _B_on = new on.B(); -// ^^ -// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT -// [cfe] 'on' isn't a type. -show.B _B_show = new show.B(); -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT -// [cfe] 'show' isn't a type. -sync.B _B_sync = new sync.B(); -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT -// [cfe] 'sync' isn't a type. -yield.B _B_yield = new yield.B(); -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT -// [cfe] 'yield' isn't a type. - -async.B> _B2_async = new async.B(); -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT -// [cfe] 'async' isn't a type. -await.B> _B2_await = new await.B(); -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT -// [cfe] 'await' isn't a type. -hide.B> _B2_hide = new hide.B(); -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT -// [cfe] 'hide' isn't a type. -of.B> _B2_of = new of.B(); -// ^^ -// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT -// [cfe] 'of' isn't a type. -on.B> _B2_on = new on.B(); -// ^^ -// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT -// [cfe] 'on' isn't a type. -show.B> _B2_show = new show.B(); -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT -// [cfe] 'show' isn't a type. -sync.B> _B2_sync = new sync.B(); -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT -// [cfe] 'sync' isn't a type. -yield.B> _B2_yield = new yield.B(); -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT -// [cfe] 'yield' isn't a type. - -main() { - Expect.isTrue(_async is async.A); - Expect.isTrue(_await is await.A); - Expect.isTrue(_hide is hide.A); - Expect.isTrue(_of is of.A); - Expect.isTrue(_on is on.A); - Expect.isTrue(_show is show.A); - Expect.isTrue(_sync is sync.A); - Expect.isTrue(_yield is yield.A); - - Expect.isTrue(_B_async is async.B); - Expect.isTrue(_B_await is await.B); - Expect.isTrue(_B_hide is hide.B); - Expect.isTrue(_B_of is of.B); - Expect.isTrue(_B_on is on.B); - Expect.isTrue(_B_show is show.B); - Expect.isTrue(_B_sync is sync.B); - Expect.isTrue(_B_yield is yield.B); - - Expect.isTrue(_B2_async is async.B); - Expect.isTrue(_B2_await is await.B); - Expect.isTrue(_B2_hide is hide.B); - Expect.isTrue(_B2_of is of.B); - Expect.isTrue(_B2_on is on.B); - Expect.isTrue(_B2_show is show.B); - Expect.isTrue(_B2_sync is sync.B); - Expect.isTrue(_B2_yield is yield.B); -} diff --git a/tests/language_2/identifier/known_prefix_test.dart b/tests/language_2/identifier/known_prefix_test.dart deleted file mode 100644 index 2b18de79f2c..00000000000 --- a/tests/language_2/identifier/known_prefix_test.dart +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2017, 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 - -// The identifiers listed below are mentioned in the grammar, but none of -// them is a reserved word or a built-in identifier. Such an identifier can -// be used as library prefix. Here are said 'known' identifiers: -// -// `async`, `await`, `hide`, `of`, `on`, `show`, `sync`, `yield`. - -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_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.A _async = new async.A(); -await.A _await = new await.A(); -hide.A _hide = new hide.A(); -of.A _of = new of.A(); -on.A _on = new on.A(); -show.A _show = new show.A(); -sync.A _sync = new sync.A(); -yield.A _yield = new yield.A(); - -async.B dynamic_B_async = new async.B(); -await.B dynamic_B_await = new await.B(); -hide.B dynamic_B_hide = new hide.B(); -of.B dynamic_B_of = new of.B(); -on.B dynamic_B_on = new on.B(); -show.B dynamic_B_show = new show.B(); -sync.B dynamic_B_sync = new sync.B(); -yield.B dynamic_B_yield = new yield.B(); - -class UseA { - async.A _async = new async.A(); - await.A _await = new await.A(); - hide.A _hide = new hide.A(); - of.A _of = new of.A(); - on.A _on = new on.A(); - show.A _show = new show.A(); - sync.A _sync = new sync.A(); - yield.A _yield = new yield.A(); -} - -main() { - Expect.isTrue(_async is async.A); - Expect.isTrue(_await is await.A); - Expect.isTrue(_hide is hide.A); - Expect.isTrue(_of is of.A); - Expect.isTrue(_on is on.A); - Expect.isTrue(_show is show.A); - Expect.isTrue(_sync is sync.A); - Expect.isTrue(_yield is yield.A); - - Expect.isTrue(dynamic_B_async is async.B); - Expect.isTrue(dynamic_B_await is await.B); - Expect.isTrue(dynamic_B_hide is hide.B); - Expect.isTrue(dynamic_B_of is of.B); - Expect.isTrue(dynamic_B_on is on.B); - Expect.isTrue(dynamic_B_show is show.B); - Expect.isTrue(dynamic_B_sync is sync.B); - Expect.isTrue(dynamic_B_yield is yield.B); - - var x = new UseA(); - Expect.isTrue(x._async is async.A); - Expect.isTrue(x._await is await.A); - Expect.isTrue(x._hide is hide.A); - Expect.isTrue(x._of is of.A); - Expect.isTrue(x._on is on.A); - Expect.isTrue(x._show is show.A); - Expect.isTrue(x._sync is sync.A); - Expect.isTrue(x._yield is yield.A); -} diff --git a/tests/language_2/identifier/known_usage_error_runtime_test.dart b/tests/language_2/identifier/known_usage_error_runtime_test.dart deleted file mode 100644 index 29a187d69ad..00000000000 --- a/tests/language_2/identifier/known_usage_error_runtime_test.dart +++ /dev/null @@ -1,78 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -// The identifiers listed below are mentioned in the grammar, but none of -// them is a reserved word or a built-in identifier. Such an identifier can -// be used just like all other identifiers, with the exceptions mentioned -// below. Here are said 'known' identifiers: -// -// `async`, `await`, `hide`, `of`, `on`, `show`, `sync`, `yield` -// -// The following exceptions apply: -// -// It is a compile-time error to use `await` or `yield` as an identifier in -// the body of a function marked `async`, `async*`, or `sync*`. -// -// It is a compile-time error if an asynchronous for-in appears inside a -// synchronous function. - -import 'dart:async'; - -Future f1() async { - // Allowed: - int async = 1; - - - - Stream s = new Stream.fromFuture(new Future.value(1)); - await for (int i in s) { - return i + 1; - } -} - -Stream f2() async* { - int async = 1; - - - - Stream s = new Stream.fromFuture(new Future.value(1)); - await for (var i in s) { - yield i + 1; - } -} - -Iterable f3() sync* { - int async = 1; - - - - Stream s = new Stream.fromFuture(new Future.value(1)); - - - -} - -int f4() { - int async = 1; - int await = 1; - int yield = 1; - - Stream s = new Stream.fromFuture(new Future.value(1)); - - - - -} - -main() { - Future f = f1(); - Stream s = f2(); - Iterable i = f3(); - int x = f4(); -} diff --git a/tests/language_2/identifier/known_usage_error_test.dart b/tests/language_2/identifier/known_usage_error_test.dart deleted file mode 100644 index 8dcde29ec34..00000000000 --- a/tests/language_2/identifier/known_usage_error_test.dart +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2017, 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 - -// The identifiers listed below are mentioned in the grammar, but none of -// them is a reserved word or a built-in identifier. Such an identifier can -// be used just like all other identifiers, with the exceptions mentioned -// below. Here are said 'known' identifiers: -// -// `async`, `await`, `hide`, `of`, `on`, `show`, `sync`, `yield` -// -// The following exceptions apply: -// -// It is a compile-time error to use `await` or `yield` as an identifier in -// the body of a function marked `async`, `async*`, or `sync*`. -// -// It is a compile-time error if an asynchronous for-in appears inside a -// synchronous function. - -import 'dart:async'; - -Future f1() async { - // Allowed: - int async = 1; - int await = 1; - // ^^^^^ - // [analyzer] SYNTACTIC_ERROR.ASYNC_KEYWORD_USED_AS_IDENTIFIER - // [cfe] 'await' can't be used as an identifier in 'async', 'async*', or 'sync*' methods. - int yield = 1; - // ^^^^^ - // [analyzer] SYNTACTIC_ERROR.ASYNC_KEYWORD_USED_AS_IDENTIFIER - // [cfe] 'yield' can't be used as an identifier in 'async', 'async*', or 'sync*' methods. - - Stream s = new Stream.fromFuture(new Future.value(1)); - await for (int i in s) { - return i + 1; - } -} - -Stream f2() async* { - int async = 1; - int await = 1; - // ^^^^^ - // [analyzer] SYNTACTIC_ERROR.ASYNC_KEYWORD_USED_AS_IDENTIFIER - // [cfe] 'await' can't be used as an identifier in 'async', 'async*', or 'sync*' methods. - int yield = 1; - // ^^^^^ - // [analyzer] SYNTACTIC_ERROR.ASYNC_KEYWORD_USED_AS_IDENTIFIER - // [cfe] 'yield' can't be used as an identifier in 'async', 'async*', or 'sync*' methods. - - Stream s = new Stream.fromFuture(new Future.value(1)); - await for (var i in s) { - yield i + 1; - } -} - -Iterable f3() sync* { - int async = 1; - int await = 1; - // ^^^^^ - // [analyzer] SYNTACTIC_ERROR.ASYNC_KEYWORD_USED_AS_IDENTIFIER - // [cfe] 'await' can't be used as an identifier in 'async', 'async*', or 'sync*' methods. - int yield = 1; - // ^^^^^ - // [analyzer] SYNTACTIC_ERROR.ASYNC_KEYWORD_USED_AS_IDENTIFIER - // [cfe] 'yield' can't be used as an identifier in 'async', 'async*', or 'sync*' methods. - - Stream s = new Stream.fromFuture(new Future.value(1)); - await for (int i in s) { -//^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASYNC_FOR_IN_WRONG_CONTEXT -// [cfe] The asynchronous for-in can only be used in functions marked with 'async' or 'async*'. - yield i + 1; - } -} - -int f4() { - int async = 1; - int await = 1; - int yield = 1; - - Stream s = new Stream.fromFuture(new Future.value(1)); - await for (int i in s) { -//^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASYNC_FOR_IN_WRONG_CONTEXT -// [cfe] The asynchronous for-in can only be used in functions marked with 'async' or 'async*'. - return i + 1; - } - -} - -main() { - Future f = f1(); - Stream s = f2(); - Iterable i = f3(); - int x = f4(); -} diff --git a/tests/language_2/identifier/known_usage_test.dart b/tests/language_2/identifier/known_usage_test.dart deleted file mode 100644 index 00eb2e80846..00000000000 --- a/tests/language_2/identifier/known_usage_test.dart +++ /dev/null @@ -1,372 +0,0 @@ -// Copyright (c) 2017, 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 - -// The identifiers listed below are mentioned in the grammar, but none of -// them is a reserved word or a built-in identifier. Such an identifier can -// be used just like all other identifiers, with a few exceptions. Here are -// said 'known' identifiers: -// -// `async`, `await`, `hide`, `of`, `on`, `show`, `sync`, `yield` -// -// This test contains various declarations of entities whose name is one of -// these known identifiers. - -// Top level. - -var async; //# 01: ok -var await; //# 01: continued -var hide; //# 01: continued -var of; //# 01: continued -var on; //# 01: continued -var show; //# 01: continued -var sync; //# 01: continued -var yield; //# 01: continued - -int async; //# 02: ok -int await; //# 02: continued -int hide; //# 02: continued -int of; //# 02: continued -int on; //# 02: continued -int show; //# 02: continued -int sync; //# 02: continued -int yield; //# 02: continued - -final String async = ""; //# 03: ok -final String await = ""; //# 03: continued -final String hide = ""; //# 03: continued -final String of = ""; //# 03: continued -final String on = ""; //# 03: continued -final String show = ""; //# 03: continued -final String sync = ""; //# 03: continued -final String yield = ""; //# 03: continued - -const async = null; //# 04: ok -const await = null; //# 04: continued -const hide = null; //# 04: continued -const of = null; //# 04: continued -const on = null; //# 04: continued -const show = null; //# 04: continued -const sync = null; //# 04: continued -const yield = null; //# 04: continued - -void async() {} //# 05: ok -void await() {} //# 05: continued -void hide() {} //# 05: continued -void of() {} //# 05: continued -void on() {} //# 05: continued -void show() {} //# 05: continued -void sync() {} //# 05: continued -void yield() {} //# 05: continued - -void f1(async, await, hide, of, on, show, sync, yield) {} -void f2([async, await, hide, of, on, show, sync, yield]) {} -void f3({async, await, hide, of, on, show, sync, yield}) {} - -void f4( - int async, - int await, - int hide, - int of, - int on, - int show, - int sync, - int yield, -) {} - -void f5([ - int async, - int await, - int hide, - int of, - int on, - int show, - int sync, - int yield, -]) {} - -void f6({ - int async, - int await, - int hide, - int of, - int on, - int show, - int sync, - int yield, -}) {} - -class A { - var async; //# 01: continued - var await; //# 01: continued - var hide; //# 01: continued - var of; //# 01: continued - var on; //# 01: continued - var show; //# 01: continued - var sync; //# 01: continued - var yield; //# 01: continued - - num async; //# 02: continued - num await; //# 02: continued - num hide; //# 02: continued - num of; //# 02: continued - num on; //# 02: continued - num show; //# 02: continued - num sync; //# 02: continued - num yield; //# 02: continued - - final String async = ""; //# 03: continued - final String await = ""; //# 03: continued - final String hide = ""; //# 03: continued - final String of = ""; //# 03: continued - final String on = ""; //# 03: continued - final String show = ""; //# 03: continued - final String sync = ""; //# 03: continued - final String yield = ""; //# 03: continued - - String get async => ""; //# 04: continued - String get await => ""; //# 04: continued - String get hide => ""; //# 04: continued - String get of => ""; //# 04: continued - String get on => ""; //# 04: continued - String get show => ""; //# 04: continued - String get sync => ""; //# 04: continued - String get yield => ""; //# 04: continued - - void async() {} //# 05: ok - void await() {} //# 05: continued - void hide() {} //# 05: continued - void of() {} //# 05: continued - void on() {} //# 05: continued - void show() {} //# 05: continued - void sync() {} //# 05: continued - void yield() {} //# 05: continued - - A(); - - A.c1( //# 01: continued - this.async, //# 01: continued - this.await, //# 01: continued - this.hide, //# 01: continued - this.of, //# 01: continued - this.on, //# 01: continued - this.show, //# 01: continued - this.sync, //# 01: continued - this.yield, //# 01: continued - ) {} //# 01: continued - - A.c2([ //# 01: continued - this.async, //# 01: continued - this.await, //# 01: continued - this.hide, //# 01: continued - this.of, //# 01: continued - this.on, //# 01: continued - this.show, //# 01: continued - this.sync, //# 01: continued - this.yield, //# 01: continued - ]) {} //# 01: continued - - A.c3({ //# 01: continued - this.async, //# 01: continued - this.await, //# 01: continued - this.hide, //# 01: continued - this.of, //# 01: continued - this.on, //# 01: continued - this.show, //# 01: continued - this.sync, //# 01: continued - this.yield, //# 01: continued - }) {} //# 01: continued - - A.c4( //# 02: continued - int this.async, //# 02: continued - int this.await, //# 02: continued - int this.hide, //# 02: continued - int this.of, //# 02: continued - int this.on, //# 02: continued - int this.show, //# 02: continued - int this.sync, //# 02: continued - int this.yield, //# 02: continued - ) {} //# 02: continued - - A.c5([ //# 02: continued - int this.async, //# 02: continued - int this.await, //# 02: continued - int this.hide, //# 02: continued - int this.of, //# 02: continued - int this.on, //# 02: continued - int this.show, //# 02: continued - int this.sync, //# 02: continued - int this.yield, //# 02: continued - ]) {} //# 02: continued - - A.c6({ //# 02: continued - int this.async, //# 02: continued - int this.await, //# 02: continued - int this.hide, //# 02: continued - int this.of, //# 02: continued - int this.on, //# 02: continued - int this.show, //# 02: continued - int this.sync, //# 02: continued - int this.yield, //# 02: continued - }) {} //# 02: continued - - void method1( - covariant int async, - covariant int await, - covariant int hide, - covariant int of, - covariant int on, - covariant int show, - covariant int sync, - covariant int yield, - ) {} - - void method2([ - covariant int async, - covariant int await, - covariant int hide, - covariant int of, - covariant int on, - covariant int show, - covariant int sync, - covariant int yield, - ]) {} - - void method3({ - covariant int async, - covariant int await, - covariant int hide, - covariant int of, - covariant int on, - covariant int show, - covariant int sync, - covariant int yield, - }) {} -} - -class B { - static var async; //# 01: continued - static var await; //# 01: continued - static var hide; //# 01: continued - static var of; //# 01: continued - static var on; //# 01: continued - static var show; //# 01: continued - static var sync; //# 01: continued - static var yield; //# 01: continued - - static num async; //# 02: continued - static num await; //# 02: continued - static num hide; //# 02: continued - static num of; //# 02: continued - static num on; //# 02: continued - static num show; //# 02: continued - static num sync; //# 02: continued - static num yield; //# 02: continued - - static final String async = ""; //# 03: continued - static final String await = ""; //# 03: continued - static final String hide = ""; //# 03: continued - static final String of = ""; //# 03: continued - static final String on = ""; //# 03: continued - static final String show = ""; //# 03: continued - static final String sync = ""; //# 03: continued - static final String yield = ""; //# 03: continued - - static const async = null; //# 04: continued - static const await = null; //# 04: continued - static const hide = null; //# 04: continued - static const of = null; //# 04: continued - static const on = null; //# 04: continued - static const show = null; //# 04: continued - static const sync = null; //# 04: continued - static const yield = null; //# 04: continued - - static get async => null; //# 05: continued - static get await => null; //# 05: continued - static get hide => null; //# 05: continued - static get of => null; //# 05: continued - static get on => null; //# 05: continued - static get show => null; //# 05: continued - static get sync => null; //# 05: continued - static get yield => null; //# 05: continued -} - -main() { - /* //# none: ok - - // Except none: Use a top-level declaration. - var top_async = async; - var top_await = await; - var top_hide = hide; - var top_of = of; - var top_on = on; - var top_show = show; - var top_sync = sync; - var top_yield = yield; - - // Except none: Use an instance member of A. - A a = new A(); - var instance_async = a.async; - var instance_await = a.await; - var instance_hide = a.hide; - var instance_of = a.of; - var instance_on = a.on; - var instance_show = a.show; - var instance_sync = a.sync; - var instance_yield = a.yield; - - // Except none: Use a static member of B. - - var static_async = B.async; - var static_await = B.await; - var static_hide = B.hide; - var static_of = B.of; - var static_on = B.on; - var static_show = B.show; - var static_sync = B.sync; - var static_yield = B.yield; - - */ //# none: continued - - var a1 = new A.c1(1, 1, 1, 1, 1, 1, 1, 1); //# 01: continued - var a2 = new A.c2(); //# 01: continued - var a3 = new A.c3( //# 01: continued - async: 1, //# 01: continued - await: 1, //# 01: continued - hide: 1, //# 01: continued - of: 1, //# 01: continued - on: 1, //# 01: continued - show: 1, //# 01: continued - sync: 1, //# 01: continued - yield: 1, //# 01: continued - ); //# 01: continued - - var a4 = new A.c4(1, 1, 1, 1, 1, 1, 1, 1); //# 02: continued - var a5 = new A.c5(); //# 02: continued - var a6 = new A.c6( //# 02: continued - async: 1, //# 02: continued - await: 1, //# 02: continued - hide: 1, //# 02: continued - of: 1, //# 02: continued - on: 1, //# 02: continued - show: 1, //# 02: continued - sync: 1, //# 02: continued - yield: 1, //# 02: continued - ); //# 02: continued - - var aa = new A(); - aa.method1(1, 1, 1, 1, 1, 1, 1, 1); - aa.method2(); - aa.method3( - async: 1, - await: 1, - hide: 1, - of: 1, - on: 1, - show: 1, - sync: 1, - yield: 1, - ); -} diff --git a/tests/language_2/identifier/naming2_test.dart b/tests/language_2/identifier/naming2_test.dart deleted file mode 100644 index a23b0be5f13..00000000000 --- a/tests/language_2/identifier/naming2_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - var function; - A(function) : function = function; -} - -main() { - var a = new A(499); - Expect.equals(499, a.function); -} diff --git a/tests/language_2/identifier/naming3_test.dart b/tests/language_2/identifier/naming3_test.dart deleted file mode 100644 index 4017b7ff382..00000000000 --- a/tests/language_2/identifier/naming3_test.dart +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - var __PROTO__ = 499; - var constructor = 1; - var prototype = 2; -} - -// TODO(jmesserly): changed this test to avoid shadowing a field with a getter, -// which DDC doesn't currently support, see: -// https://github.com/dart-lang/dev_compiler/issues/52 -class A2 { - get __PROTO__ => 499; - get constructor => 1; - get prototype => 2; -} - -class B extends A2 { - get __PROTO__ => 42; - get constructor => 3; - get prototype => 4; -} - -class P { - m() => 42; -} - -class C { - m() => 777; - static get prototype => new P(); - static get name => 'hello from C.name'; - static void _check(obj) { - Expect.equals(obj, 'hello'); - check_++; - } - - static void as(obj) { - Expect.equals(obj, 'world'); - as_++; - } - - static int as_ = 0; - static int check_ = 0; -} - -// Regression test for https://github.com/dart-lang/sdk/issues/31049 -regress31049() { - dynamic d = new C(); - C c = d; // implicit cast - d as C; // explicit cast - C._check('hello'); - Expect.equals(C.check_, 1); - C.as('world'); - Expect.equals(C.as_, 1); -} - -// Regression test for https://github.com/dart-lang/sdk/issues/31050 -regress31050() { - Expect.isFalse((C).toString().contains('C.name'), 'should not call C.name'); - Expect.equals(C.name, 'hello from C.name'); - Expect.equals(C.prototype.m(), 42); - Expect.equals(new C().m(), 777); -} - -var name = 42; -regress31117() { - Expect.equals(name, 42); -} - -main() { - var a = new A(); - var a2 = new A2(); - var b = new B(); - var list = [a, a2, b]; - for (int i = 0; i < list.length; i++) { - var proto = list[i].__PROTO__; - var constructor = list[i].constructor; - var prototype = list[i].prototype; - if (i < 2) { - Expect.equals(499, proto); - Expect.equals(1, constructor); - Expect.equals(2, prototype); - } else { - Expect.equals(42, proto); - Expect.equals(3, constructor); - Expect.equals(4, prototype); - } - } - - regress31049(); - regress31050(); - regress31117(); -} diff --git a/tests/language_2/identifier/naming_test.dart b/tests/language_2/identifier/naming_test.dart deleted file mode 100644 index 4ab6a0002e6..00000000000 --- a/tests/language_2/identifier/naming_test.dart +++ /dev/null @@ -1,530 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class A { - A() { - NamingTest.count++; - } - foo(a, b) { - Expect.equals(1, a); - Expect.equals(2, b); - } -} - -class MyException { - MyException() {} -} - -class debugger { - static const int __PROTO__ = 5; - - int x; - - factory debugger.F() { - return new debugger(1); - } - debugger(x) : this.x = x + 1 {} - debugger.C(x) : this.x = x + 2 {} - debugger.C$C(x) : this.x = x + 3 {} - debugger.C$I(x) : this.x = x + 4 {} -} - -class debugger$C { - int x; - - factory debugger$C.F() { - return new debugger$C(1); - } - debugger$C(x) : this.x = x + 5 {} - debugger$C.C(x) : this.x = x + 6 {} - debugger$C.C$C(x) : this.x = x + 7 {} - debugger$C.C$I(x) : this.x = x + 8 {} -} - -class debugger$C$C { - int x; - - factory debugger$C$C.F() { - return new debugger$C$C(1); - } - debugger$C$C(x) : this.x = x + 9 {} - debugger$C$C.C(x) : this.x = x + 10 {} - debugger$C$C.C$C(x) : this.x = x + 11 {} - debugger$C$C.C$I(x) : this.x = x + 12 {} -} - -class with$I extends debugger$C { - int y; - - factory with$I.F() { - return new with$I(1, 2); - } - with$I(x, y) - : this.y = y + 11, - super(x) {} - with$I.I(x, y) - : this.y = y + 12, - super.C(x) {} - with$I.C(x, y) - : this.y = y + 13, - super.C$C(x){} - with$I.I$C(x, y) - : this.y = y + 14, - super.C$I(x) {} - with$I.C$C(x, y) - : this.y = y + 15, - super(x) {} - with$I.C$C$C(x, y) - : this.y = y + 16, - super.C(x) {} - with$I.$C$I(x, y) - :this.y = y + 17, - super.C$C(x) {} - with$I.$$I$C(x, y) - :this.y = y + 18, - super.C$I(x) {} - with$I.$(x, y) - : this.y = y + 19, - super(x) {} - with$I.$$(x, y) - : this.y = y + 20, - super.C(x) {} -} - -class with$C extends debugger$C$C { - int y; - - factory with$C.F() { - return new with$C(1, 2); - } - with$C(x, y) - : this.y = y + 21, - super(x) {} - with$C.I(x, y) - : this.y = y + 22, - super.C(x) {} - with$C.C(x, y) - : this.y = y + 23, - super.C$C(x) {} - with$C.I$C(x, y) - : this.y = y + 24, - super.C$I(x) {} - with$C.C$C(x, y) - : this.y = y + 25, - super(x) {} - with$C.C$C$C(x, y) - : this.y = y + 26, - super.C(x) {} - with$C.$C$I(x, y) - : this.y = y + 27, - super.C$C(x) {} - with$C.$$I$C(x, y) - : this.y = y + 28, - super.C$I(x) {} - with$C.$(x, y) - : this.y = y + 29, - super(x) {} - with$C.$$(x, y) - : this.y = y + 30, - super.C(x) {} -} - -class with$I$C extends debugger$C$C { - int y; - - factory with$I$C.F() { - return new with$I$C(1, 2); - } - with$I$C(x, y) - : this.y = y + 31, - super(x) {} - with$I$C.I(x, y) - : this.y = y + 32, - super.C(x) {} - with$I$C.C(x, y) - : this.y = y + 33, - super.C$C(x) {} - with$I$C.I$C(x, y) - : this.y = y + 34, - super.C$I(x) {} - with$I$C.C$C(x, y) - : this.y = y + 35, - super(x) {} - with$I$C.C$C$C(x, y) - : this.y = y + 36, - super.C(x) {} - with$I$C.$C$I(x, y) - : this.y = y + 37, - super.C$C(x) {} - with$I$C.$$I$C(x, y) - : this.y = y + 38, - super.C$I(x) {} - with$I$C.$(x, y) - : this.y = y + 39, - super(x) {} - with$I$C.$$(x, y) - : this.y = y + 40, - super.C(x) {} -} - -class Tata { - var prototype; - - Tata() : this.prototype = 0 {} - - __PROTO__$() { - return 12; - } -} - -class Toto extends Tata { - var __PROTO__; - - Toto() - : this.__PROTO__ = 0, - super() {} - - prototype$() { - return 10; - } - - titi() { - Expect.equals(0, prototype); - Expect.equals(0, __PROTO__); - prototype = 3; - __PROTO__ = 5; - Expect.equals(3, prototype); - Expect.equals(5, __PROTO__); - Expect.equals(10, prototype$()); - Expect.equals(12, __PROTO__$()); - Expect.equals(12, this.__PROTO__$()); - Expect.equals(10, this.prototype$()); - Expect.equals(12, __PROTO__$()); - } -} - -class Bug4082360 { - int x_; - Bug4082360() {} - - int get x { - return x_; - } - - void set x(int value) { - x_ = value; - } - - void indirectSet(int value) { - x = value; - } - - static void test() { - var bug = new Bug4082360(); - bug.indirectSet(42); - Expect.equals(42, bug.x_); - Expect.equals(42, bug.x); - } -} - -class Hoisting { - var f_; - Hoisting.negate(var x) { - f_ = () { - return x; - }; - } - - operator -() { - var x = 3; - return () { - return x + 1; - }; - } - - operator [](x) { - return () { - return x + 3; - }; - } - - static void test() { - var h = new Hoisting.negate(1); - Expect.equals(1, (h.f_)()); - var f = -h; - Expect.equals(4, f()); - Expect.equals(7, h[4]()); - } -} - -// It is not possible to make sure that the backend uses the hardcoded names -// we are testing against. This test might therefore become rapidly out of date -class NamingTest { - static int count; - - static testExceptionNaming() { - // Exceptions use a hardcoded "e" as exception name. If the namer works - // correctly then it will be renamed in case of clashes. - var e = 3; - var caught = 0; - try { - throw new MyException(); - } catch (exc) { - try { - throw new MyException(); - } catch (exc2) { - caught++; - } - Expect.equals(1, caught); - caught++; - } - Expect.equals(2, caught); - Expect.equals(3, e); - } - - static testTmpNaming() { - Expect.equals(0, count); - var tmp$0 = 1; - var tmp$1 = 2; - new A().foo(tmp$0, tmp$1++); - Expect.equals(1, count); - Expect.equals(3, tmp$1); - } - - static testScopeNaming() { - // Alias scopes use a hardcoded "dartc_scp$" as names. - var dartc_scp$1 = 5; - var foo = 8; - var f = () { - var dartc_scp$1 = 15; - return foo + dartc_scp$1; - }; - Expect.equals(5, dartc_scp$1); - Expect.equals(23, f()); - } - - static testGlobalMangling() { - var x; - x = new debugger(0); - Expect.equals(1, x.x); - x = new debugger.C(0); - Expect.equals(2, x.x); - x = new debugger.C$C(0); - Expect.equals(3, x.x); - x = new debugger.C$I(0); - Expect.equals(4, x.x); - x = new debugger$C(0); - Expect.equals(5, x.x); - x = new debugger$C.C(0); - Expect.equals(6, x.x); - x = new debugger$C.C$C(0); - Expect.equals(7, x.x); - x = new debugger$C.C$I(0); - Expect.equals(8, x.x); - x = new debugger$C$C(0); - Expect.equals(9, x.x); - x = new debugger$C$C.C(0); - Expect.equals(10, x.x); - x = new debugger$C$C.C$C(0); - Expect.equals(11, x.x); - x = new debugger$C$C.C$I(0); - Expect.equals(12, x.x); - x = new with$I(0, 0); - Expect.equals(5, x.x); - Expect.equals(11, x.y); - x = new with$I.I(0, 0); - Expect.equals(6, x.x); - Expect.equals(12, x.y); - x = new with$I.C(0, 0); - Expect.equals(7, x.x); - Expect.equals(13, x.y); - x = new with$I.I$C(0, 0); - Expect.equals(8, x.x); - Expect.equals(14, x.y); - x = new with$I.C$C(0, 0); - Expect.equals(5, x.x); - Expect.equals(15, x.y); - x = new with$I.C$C$C(0, 0); - Expect.equals(6, x.x); - Expect.equals(16, x.y); - x = new with$I.$C$I(0, 0); - Expect.equals(7, x.x); - Expect.equals(17, x.y); - x = new with$I.$$I$C(0, 0); - Expect.equals(8, x.x); - Expect.equals(18, x.y); - x = new with$I.$(0, 0); - Expect.equals(5, x.x); - Expect.equals(19, x.y); - x = new with$I.$$(0, 0); - Expect.equals(6, x.x); - Expect.equals(20, x.y); - x = new with$C(0, 0); - Expect.equals(9, x.x); - Expect.equals(21, x.y); - x = new with$C.I(0, 0); - Expect.equals(10, x.x); - Expect.equals(22, x.y); - x = new with$C.C(0, 0); - Expect.equals(11, x.x); - Expect.equals(23, x.y); - x = new with$C.I$C(0, 0); - Expect.equals(12, x.x); - Expect.equals(24, x.y); - x = new with$C.C$C(0, 0); - Expect.equals(9, x.x); - Expect.equals(25, x.y); - x = new with$C.C$C$C(0, 0); - Expect.equals(10, x.x); - Expect.equals(26, x.y); - x = new with$C.$C$I(0, 0); - Expect.equals(11, x.x); - Expect.equals(27, x.y); - x = new with$C.$$I$C(0, 0); - Expect.equals(12, x.x); - Expect.equals(28, x.y); - x = new with$C.$(0, 0); - Expect.equals(9, x.x); - Expect.equals(29, x.y); - x = new with$C.$$(0, 0); - Expect.equals(10, x.x); - Expect.equals(30, x.y); - x = new with$I$C(0, 0); - Expect.equals(9, x.x); - Expect.equals(31, x.y); - x = new with$I$C.I(0, 0); - Expect.equals(10, x.x); - Expect.equals(32, x.y); - x = new with$I$C.C(0, 0); - Expect.equals(11, x.x); - Expect.equals(33, x.y); - x = new with$I$C.I$C(0, 0); - Expect.equals(12, x.x); - Expect.equals(34, x.y); - x = new with$I$C.C$C(0, 0); - Expect.equals(9, x.x); - Expect.equals(35, x.y); - x = new with$I$C.C$C$C(0, 0); - Expect.equals(10, x.x); - Expect.equals(36, x.y); - x = new with$I$C.$C$I(0, 0); - Expect.equals(11, x.x); - Expect.equals(37, x.y); - x = new with$I$C.$$I$C(0, 0); - Expect.equals(12, x.x); - Expect.equals(38, x.y); - x = new with$I$C.$(0, 0); - Expect.equals(9, x.x); - Expect.equals(39, x.y); - x = new with$I$C.$$(0, 0); - Expect.equals(10, x.x); - Expect.equals(40, x.y); - } - - static void testMemberMangling() { - Expect.equals(5, debugger.__PROTO__); - new Toto().titi(); - } - - static void testFactoryMangling() { - var o = new debugger.F() as dynamic; - Expect.equals(2, o.x); - o = new debugger$C.F(); - Expect.equals(6, o.x); - o = new debugger$C$C.F(); - Expect.equals(10, o.x); - o = new with$I.F(); - Expect.equals(6, o.x); - Expect.equals(13, o.y); - o = new with$C.F(); - Expect.equals(10, o.x); - Expect.equals(23, o.y); - o = new with$I$C.F(); - Expect.equals(10, o.x); - Expect.equals(33, o.y); - } - - static testFunctionParameters() { - a(eval) { - return eval; - } - - b(arguments) { - return arguments; - } - - Expect.equals(10, a(10)); - Expect.equals(10, b(10)); - } - - static testPseudoTokens() { - var EOS = 400; - var ILLEGAL = 99; - Expect.equals(499, EOS + ILLEGAL); - } - - static testDollar() { - Expect.equals(123, $(123).wrapped); - var x = new Object(), y = new Object(); - Expect.identical(x, $(x).wrapped); - Expect.identical(y, $(x).$add(y)); - Expect.identical(x, $(x).$negate()); - Expect.equals(123, $(x) + x); - Expect.equals(444, -$(x)); - } - - static void testMain() { - count = 0; - testExceptionNaming(); - testTmpNaming(); - testScopeNaming(); - testGlobalMangling(); - testMemberMangling(); - testFactoryMangling(); - testFunctionParameters(); - Bug4082360.test(); - Hoisting.test(); - testPseudoTokens(); - testDollar(); - } -} - -// Test that the generated JS names don't conflict with "$" -class DartQuery { - Object wrapped; - DartQuery(this.wrapped); - - $add(Object other) => other; - $negate() => wrapped; - - operator +(Object other) => 123; - operator -() => 444; -} - -$add(Object first, Object second) => second; -DartQuery $(Object obj) => new DartQuery(obj); - -// Ensure we don't have false positive. -class Naming2Test { - Naming2Test() {} - int get foo { - return 1; - } - - set foo(x) {} - - static void main(args) { - var a = new Naming2Test() as dynamic; - Expect.throwsNoSuchMethodError(() => a.foo(2)); - } -} - -main() { - NamingTest.testMain(); - Naming2Test.main(null); -} diff --git a/tests/language_2/identity/closure2_test.dart b/tests/language_2/identity/closure2_test.dart deleted file mode 100644 index 1027b6339c7..00000000000 --- a/tests/language_2/identity/closure2_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -var myIdentical = identical; - -main() { - // Mint (2^63). - // TODO(rnystrom): Figure out how to change this to work on the web. - Expect.isTrue(myIdentical(0x8000000000000000, 0x8000000000000000)); - Expect.isFalse(myIdentical(0x8000000000000000, 0x8000000000000001)); - - // Different types. - Expect.isFalse(myIdentical(42, 42.0)); - - // NaN handling. - Expect.isTrue(myIdentical(double.nan, double.nan)); -} diff --git a/tests/language_2/identity/closure_test.dart b/tests/language_2/identity/closure_test.dart deleted file mode 100644 index 63e7d91f818..00000000000 --- a/tests/language_2/identity/closure_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -var myIdentical = identical; - -class Point { - num x, y; - Point(this.x, this.y); -} - -main() { - // int. - Expect.isTrue(myIdentical(42, 42)); - Expect.isFalse(myIdentical(42, 41)); - - // double. - Expect.isTrue(myIdentical(42.0, 42.0)); - Expect.isFalse(myIdentical(42.0, 41.0)); - - // Mint (2^45). - Expect.isTrue(myIdentical(35184372088832, 35184372088832)); - Expect.isFalse(myIdentical(35184372088832, 35184372088831)); - - // Different types. - Expect.isFalse(myIdentical("hello", 41)); - - // Points. - var p = new Point(1, 1); - var q = new Point(1, 1); - Expect.isFalse(myIdentical(p, q)); - - // Strings. - var a = "hello"; - var b = "hello"; - // Identical strings are coalesced into single instances. - Expect.isTrue(myIdentical(a, b)); - - // Null handling. - Expect.isFalse(myIdentical(42, null)); - Expect.isTrue(myIdentical(null, null)); -} diff --git a/tests/language_2/identity/const_test.dart b/tests/language_2/identity/const_test.dart deleted file mode 100644 index 2ea728bbbe4..00000000000 --- a/tests/language_2/identity/const_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'package:expect/expect.dart'; - -f() {} -const g = 1; - -const identical_ff = identical(f, f); -const identical_fg = identical(f, g); -const identical_gf = identical(g, f); -const identical_gg = identical(g, g); - -// Verify proper compile time computation of identical() -const a = const { - identical_ff: 0, //# 01: compile-time error - identical_gg: 0, //# 02: compile-time error - true: 0 -}; - -const b = const { - identical_fg: 0, //# 03: compile-time error - identical_gf: 0, //# 04: compile-time error - false: 0 -}; - -use(x) => x; - -main() { - use(a); - use(b); - - // Verify proper run time computation of identical() - Expect.isTrue(identical_ff); //# 05: ok - Expect.isTrue(identical_gg); //# 06: ok - Expect.isFalse(identical_fg); //# 07: ok - Expect.isFalse(identical_gf); //# 08: ok -} diff --git a/tests/language_2/identity/identical_test.dart b/tests/language_2/identity/identical_test.dart deleted file mode 100644 index 8be2590f6f4..00000000000 --- a/tests/language_2/identity/identical_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2013, 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. -// Test efficient and correct implementation of !identical(a, b). -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -notIdenticalTest1(a) { - if (!identical("ho", a)) { - return 2; - } else { - return 1; - } -} - -notIdenticalTest2(a) { - var x = identical("ho", a); - if (!x) { - Expect.equals(false, x); - return x; - } else { - Expect.equals(true, x); - return 1; - } -} - -notIdenticalTest3(a) { - var x = identical("ho", a); - return !x; -} - -main() { - for (int i = 0; i < 20; i++) { - Expect.equals(1, notIdenticalTest1("ho")); - Expect.equals(1, notIdenticalTest2("ho")); - Expect.equals(false, notIdenticalTest3("ho")); - } -} diff --git a/tests/language_2/identity/mint_identical_test.dart b/tests/language_2/identity/mint_identical_test.dart deleted file mode 100644 index ab81c99581b..00000000000 --- a/tests/language_2/identity/mint_identical_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -main() { - // Smis on 64-bit. - Expect.isTrue(identical(2305843009213693952, 2305843009213693952)); - Expect.isTrue(identical(2305843009213693953, 2305843009213693953)); - Expect.isTrue(identical(2305843009213693954, 2305843009213693954)); - Expect.isTrue(identical(4611686018427387903, 4611686018427387903)); - - // Mints on 64-bit. - Expect.isTrue(identical(4611686018427387904, 4611686018427387904)); - Expect.isTrue(identical(4611686018427387905, 4611686018427387905)); -} diff --git a/tests/language_2/identity/nan_identical_test.dart b/tests/language_2/identity/nan_identical_test.dart deleted file mode 100644 index b352f80e73d..00000000000 --- a/tests/language_2/identity/nan_identical_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2015, 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. -// Test a new statement by itself. -// VMOptions=--optimization-counter-threshold=4 --no-use-osr - -// @dart = 2.9 - -import 'dart:typed_data'; - -import "package:expect/expect.dart"; - -double uint64toDouble(int i) { - var buffer = new Uint8List(8).buffer; - var bdata = new ByteData.view(buffer); - bdata.setUint64(0, i); - return bdata.getFloat64(0); -} - -double createOtherNAN() { - return uint64toDouble((1 << 64) - 2); -} - -main() { - var otherNAN = createOtherNAN(); - for (int i = 0; i < 100; i++) { - Expect.isFalse(checkIdentical(double.nan, -double.nan)); - Expect.isTrue(checkIdentical(double.nan, double.nan)); - Expect.isTrue(checkIdentical(-double.nan, -double.nan)); - - Expect.isFalse(checkIdentical(otherNAN, -otherNAN)); - Expect.isTrue(checkIdentical(otherNAN, otherNAN)); - Expect.isTrue(checkIdentical(-otherNAN, -otherNAN)); - - var a = otherNAN; - var b = double.nan; - Expect.isFalse(checkIdentical(a, b)); - Expect.isFalse(checkIdentical(-a, -b)); - Expect.isFalse(checkIdentical(-a, b)); - Expect.isFalse(checkIdentical(a, -b)); - - a = -a; - Expect.isFalse(checkIdentical(a, b)); - Expect.isFalse(checkIdentical(-a, -b)); - Expect.isFalse(checkIdentical(-a, b)); - Expect.isFalse(checkIdentical(a, -b)); - - Expect.isTrue(checkIdentical(-(-a), a)); - Expect.isTrue(checkIdentical(-(-b), b)); - } -} - -checkIdentical(a, b) => identical(a, b); diff --git a/tests/language_2/identity/strict_equal_test.dart b/tests/language_2/identity/strict_equal_test.dart deleted file mode 100644 index 72f46918d6a..00000000000 --- a/tests/language_2/identity/strict_equal_test.dart +++ /dev/null @@ -1,130 +0,0 @@ -// 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. -// VMOptions=--optimization-counter-threshold=10 - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - for (int i = 0; i < 20; i++) { - Expect.isFalse(test1(5)); - Expect.isTrue(test1(3)); - - Expect.isTrue(test2(5)); - Expect.isFalse(test2(3)); - - Expect.isTrue(test2r(5)); - Expect.isFalse(test2r(3)); - - Expect.isTrue(test3()); - - Expect.equals(2, test4(5)); - Expect.equals(1, test4(3)); - - Expect.equals(1, test5(5)); - Expect.equals(2, test5(3)); - - Expect.equals(1, test6()); - - Expect.isFalse(test7()); - Expect.equals(2, test8()); - - Expect.isFalse(test9(2)); - Expect.isFalse(test9r(2)); - Expect.isTrue(test9(0)); - Expect.isTrue(test9r(0)); - - Expect.isFalse(test10(0)); - Expect.isFalse(test10r(0)); - Expect.isTrue(test10(2)); - Expect.isTrue(test10r(2)); - - test11(i); - } -} - -test1(a) { - return identical(a, 3); -} - -test2(a) { - return !identical(a, 3); -} - -test2r(a) { - return !identical(3, a); -} - -test3() { - return identical(get5(), 5); -} - -test4(a) { - if (identical(a, 3)) { - return 1; - } else { - return 2; - } -} - -test5(a) { - if (!identical(a, 3)) { - return 1; - } else { - return 2; - } -} - -test6() { - if (identical(get5(), 5)) { - return 1; - } else { - return 2; - } -} - -get5() { - return 5; -} - -test7() { - return null != null; -} - -test8() { - if (null != null) { - return 1; - } else { - return 2; - } -} - -test9(a) { - return identical(a, 0); -} - -test9r(a) { - return identical(0, a); -} - -test10(a) { - return !identical(a, 0); -} - -test10r(a) { - return !identical(0, a); -} - -test11(a) { - if (identical(a, 0)) { - Expect.isTrue(identical(0, a)); - Expect.isFalse(!identical(a, 0)); - Expect.isFalse(!identical(0, a)); - } else { - Expect.isFalse(identical(0, a)); - Expect.isTrue(!identical(a, 0)); - Expect.isTrue(!identical(0, a)); - } -} diff --git a/tests/language_2/if/and_test.dart b/tests/language_2/if/and_test.dart deleted file mode 100644 index 531e38d3113..00000000000 --- a/tests/language_2/if/and_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// The "if (negative) res2 |= 3" below can be emitted as negative && (res2 |= 3) -// in JavaScript. Dart2js produced the wrong output. - -_shiftRight(x, y) => x; -int64_bits(x) => x; - -class A { - opshr(int n, a2) { - int res2; - bool negative = a2 == 496; - - res2 = _shiftRight(a2, n); - if (negative) { - res2 |= 3; - } - return int64_bits(res2); - } -} - -main() { - var a = new A(); - var t; - for (int i = 0; i < 3; i++) { - t = a.opshr(99, 496); - } - Expect.equals(499, t); -} diff --git a/tests/language_2/if/dangling_else_test.dart b/tests/language_2/if/dangling_else_test.dart deleted file mode 100644 index 921c3b51a27..00000000000 --- a/tests/language_2/if/dangling_else_test.dart +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2012, 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. -// Tests dangling else. The VM should not have any problems, but dart2js or -// dart2dart could get this wrong. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -nestedIf1(notTrue) { - if (notTrue) return 'bad input'; - if (notTrue) { - if (notTrue) { - return 'bad'; - } - } else { - return 'good'; - } - return 'bug'; -} - -nestedIf2(notTrue) { - if (notTrue) return 'bad input'; - if (notTrue) { - if (notTrue) { - return 'bad'; - } else { - if (notTrue) { - return 'bad'; - } - } - } else { - return 'good'; - } - return 'bug'; -} - -nestedWhile(notTrue) { - if (notTrue) return 'bad input'; - if (notTrue) { - while (notTrue) { - if (notTrue) { - return 'bad'; - } - } - } else { - return 'good'; - } - return 'bug'; -} - -nestedFor(notTrue) { - if (notTrue) return 'bad input'; - if (notTrue) { - for (int i = 0; i < 3; i++) { - if (i == 0) { - return 'bad'; - } - } - } else { - return 'good'; - } - return 'bug'; -} - -nestedLabeledStatement(notTrue) { - if (notTrue) return 'bad input'; - if (notTrue) { - label: - if (notTrue) { - break label; - } - } else { - return 'good'; - } - return 'bug'; -} - -main() { - Expect.equals('good', nestedIf1(false)); - Expect.equals('good', nestedIf2(false)); - Expect.equals('good', nestedWhile(false)); - Expect.equals('good', nestedFor(false)); - Expect.equals('good', nestedLabeledStatement(false)); -} diff --git a/tests/language_2/if/if_test.dart b/tests/language_2/if/if_test.dart deleted file mode 100644 index 5b48a2e18bc..00000000000 --- a/tests/language_2/if/if_test.dart +++ /dev/null @@ -1,97 +0,0 @@ -// 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 test program for testing if statement. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Helper { - static int f0(bool b) { - if (b) ; - if (b) - ; - else - ; - if (b) {} - if (b) {} else {} - return 0; - } - - static int f1(bool b) { - if (b) - return 1; - else - return 2; - } - - static int f2(bool b) { - if (b) { - return 1; - } else { - return 2; - } - } - - static int f3(bool b) { - if (b) return 1; - return 2; - } - - static int f4(bool b) { - if (b) { - return 1; - } - return 2; - } - - static int f5(bool b) { - if (!b) { - return 1; - } - return 2; - } - - static int f6(bool a, bool b) { - if (a || b) { - return 1; - } - return 2; - } - - static int f7(bool a, bool b) { - if (a && b) { - return 1; - } - return 2; - } -} - -class IfTest { - static testMain() { - Expect.equals(0, Helper.f0(true)); - Expect.equals(1, Helper.f1(true)); - Expect.equals(2, Helper.f1(false)); - Expect.equals(1, Helper.f2(true)); - Expect.equals(2, Helper.f2(false)); - Expect.equals(1, Helper.f3(true)); - Expect.equals(2, Helper.f3(false)); - Expect.equals(1, Helper.f4(true)); - Expect.equals(2, Helper.f4(false)); - Expect.equals(2, Helper.f5(true)); - Expect.equals(1, Helper.f5(false)); - Expect.equals(1, Helper.f6(true, true)); - Expect.equals(1, Helper.f6(true, false)); - Expect.equals(1, Helper.f6(false, true)); - Expect.equals(2, Helper.f6(false, false)); - Expect.equals(1, Helper.f7(true, true)); - Expect.equals(2, Helper.f7(true, false)); - Expect.equals(2, Helper.f7(false, true)); - Expect.equals(2, Helper.f7(false, false)); - } -} - -main() { - IfTest.testMain(); -} diff --git a/tests/language_2/if/nested_if_test.dart b/tests/language_2/if/nested_if_test.dart deleted file mode 100644 index 3e347e5bb8f..00000000000 --- a/tests/language_2/if/nested_if_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// 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. -// Dart2Js had problems with nested ifs inside loops. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -foo(x, a) { - /*---------------------------------------------*/ - /*---------------------------------------------*/ - /*---------------------------------------------*/ - /*---------------------------------------------*/ - /*---------------------------------------------*/ - /*---------------------------------------------*/ - /*------- Avoid inlining ----------------------*/ - /*---------------------------------------------*/ - /*---------------------------------------------*/ - /*---------------------------------------------*/ - /*---------------------------------------------*/ - /*---------------------------------------------*/ - /*---------------------------------------------*/ - for (int i = 0; i < 10; i++) { - if (x) { - if (!x) a = []; - a.add(3); - } - } - return a; -} - -main() { - var a = foo(true, []); - Expect.equals(10, a.length); - Expect.equals(3, a[0]); -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_10_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_10_test.dart deleted file mode 100644 index 00ba8d5e9b9..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_10_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - - - { var l; yGetValue = 1; check(1, () => l ??= y, ['y']); Expect.equals(1, l); } - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_13_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_13_test.dart deleted file mode 100644 index f46dc5d2af2..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_13_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - C.xGetValue = 1; check(1, () => C.x ??= bad(), ['C.x']); - - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_14_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_14_test.dart deleted file mode 100644 index 53939332a71..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_14_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - yGetValue = 1; check(1, () => C.x ??= y, ['C.x', 'y', 'C.x=1']); - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_15_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_15_test.dart deleted file mode 100644 index 89de7c3a013..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_15_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - h.C.xGetValue = 1; check(1, () => h.C.x ??= bad(), ['h.C.x']); - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_16_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_16_test.dart deleted file mode 100644 index e67d1c0245c..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_16_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - - yGetValue = 1; check(1, () => h.C.x ??= y, ['h.C.x', 'y', 'h.C.x=1']); - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_17_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_17_test.dart deleted file mode 100644 index 54d92ded68f..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_17_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - xGetValue = new C('x'); xGetValue.vGetValue = 1; - check(1, () => x.v ??= bad(), ['x', 'x.v']); - - - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_18_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_18_test.dart deleted file mode 100644 index 0d0bae169ab..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_18_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - xGetValue = new C('x'); yGetValue = 1; - check(1, () => x.v ??= y, ['x', 'x.v', 'y', 'x.v=1']); - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_19_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_19_test.dart deleted file mode 100644 index ab7e577ceb2..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_19_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - fValue = new C('f()'); fValue.vGetValue = 1; - check(1, () => f().v ??= bad(), ['f()', 'f().v']); - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_1_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_1_test.dart deleted file mode 100644 index 5714958d30d..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_1_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - vGetValue = 1; check(1, () => v ??= bad(), ['$s.v']); - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_20_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_20_test.dart deleted file mode 100644 index cec8faaff4c..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_20_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - - - fValue = new C('f()'); yGetValue = 1; - check(1, () => f().v ??= y, ['f()', 'f().v', 'y', 'f().v=1']); - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_21_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_21_test.dart deleted file mode 100644 index d9c76126e67..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_21_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - xGetValue = new C('x'); yGetValue = 1; xGetValue.indexGetValue = 2; - check(2, () => x[y] ??= bad(), ['x', 'y', 'x[1]']); - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_22_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_22_test.dart deleted file mode 100644 index 48287dba7e8..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_22_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - xGetValue = new C('x'); yGetValue = 1; zGetValue = 2; - check(2, () => x[y] ??= z, ['x', 'y', 'x[1]', 'z', 'x[1]=2']); - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_23_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_23_test.dart deleted file mode 100644 index acc4b164649..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_23_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - check(null, () => x?.v ??= bad(), ['x']); - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_24_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_24_test.dart deleted file mode 100644 index 697e6dea6da..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_24_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - xGetValue = new C('x'); xGetValue.vGetValue = 1; - check(1, () => x?.v ??= bad(), ['x', 'x.v']); - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_25_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_25_test.dart deleted file mode 100644 index ecd8f446046..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_25_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - xGetValue = new C('x'); yGetValue = 1; - check(1, () => x?.v ??= y, ['x', 'x.v', 'y', 'x.v=1']); - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_26_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_26_test.dart deleted file mode 100644 index 707d2fdee58..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_26_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - yGetValue = 1; - check(1, () => C?.x ??= y, ['C.x', 'y', 'C.x=1']); - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_27_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_27_test.dart deleted file mode 100644 index 2afb861aed2..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_27_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - yGetValue = 1; - check(1, () => h.C?.x ??= y, ['h.C.x', 'y', 'h.C.x=1']); -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_2_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_2_test.dart deleted file mode 100644 index ed3489a9e60..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_2_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - yGetValue = 1; check(1, () => v ??= y, ['$s.v', 'y', '$s.v=1']); - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_3_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_3_test.dart deleted file mode 100644 index 8fe5ecbc3c2..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_3_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - vGetValue = 1; check(1, () => super.v ??= bad(), ['$s.v']); - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_4_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_4_test.dart deleted file mode 100644 index b4aa3da96ea..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_4_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - yGetValue = 1; check(1, () => super.v ??= y, ['$s.v', 'y', '$s.v=1']); - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_5_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_5_test.dart deleted file mode 100644 index 20a0ccc6208..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_5_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - xGetValue = 1; check(1, () => x ??= bad(), ['x']); - - - - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_6_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_6_test.dart deleted file mode 100644 index 9505cd71ce1..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_6_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - yGetValue = 1; check(1, () => x ??= y, ['x', 'y', 'x=1']); - - - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_7_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_7_test.dart deleted file mode 100644 index 4ba0c2b251c..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_7_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - h.xGetValue = 1; check(1, () => h.x ??= bad(), ['h.x']); - - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_8_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_8_test.dart deleted file mode 100644 index 5d0674c7d44..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_8_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; check(1, () => h.x ??= y, ['h.x', 'y', 'h.x=1']); - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_9_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_9_test.dart deleted file mode 100644 index be41efac795..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_9_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - - { var l = 1; check(1, () => l ??= bad(), []); } - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_runtime_test.dart b/tests/language_2/if_null/assignment_behavior_runtime_test.dart deleted file mode 100644 index 7bdbbcb6e45..00000000000 --- a/tests/language_2/if_null/assignment_behavior_runtime_test.dart +++ /dev/null @@ -1,211 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - - - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - - - - - - - - - - - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - - - - - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - - - - - - - - - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - - - - - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - - - - - - - // C?.v ??= e2 is equivalent to C.v ??= e2. - - - - - - - - -} diff --git a/tests/language_2/if_null/assignment_behavior_test.dart b/tests/language_2/if_null/assignment_behavior_test.dart deleted file mode 100644 index 17fe757b8dd..00000000000 --- a/tests/language_2/if_null/assignment_behavior_test.dart +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright (c) 2015, 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 - -// Verify semantics of the ??= operator, including order of operations, by -// keeping track of the operations performed. - -import "package:expect/expect.dart"; -import "assignment_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -var xGetValue = null; - -get x { - h.operations.add('x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - h.operations.add('x=$value'); -} - -var yGetValue = null; - -get y { - h.operations.add('y'); - var tmp = yGetValue; - yGetValue = null; - return tmp; -} - -void set y(value) { - h.operations.add('y=$value'); -} - -var zGetValue = null; - -get z { - h.operations.add('z'); - var tmp = zGetValue; - zGetValue = null; - return tmp; -} - -void set z(value) { - h.operations.add('z=$value'); -} - -var fValue = null; - -f() { - h.operations.add('f()'); - var tmp = fValue; - fValue = null; - return tmp; -} - -void check(expectedValue, f(), expectedOperations) { - Expect.equals(expectedValue, f()); - Expect.listEquals(expectedOperations, h.operations); - h.operations = []; -} - -class C { - final String s; - - C(this.s); - - @override - String toString() => s; - - static var xGetValue = null; - - static get x { - h.operations.add('C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - h.operations.add('C.x=$value'); - } - - var vGetValue = null; - - get v { - h.operations.add('$s.v'); - var tmp = vGetValue; - vGetValue = null; - return tmp; - } - - void set v(value) { - h.operations.add('$s.v=$value'); - } - - var indexGetValue = null; - - operator [](index) { - h.operations.add('$s[$index]'); - var tmp = indexGetValue; - indexGetValue = null; - return tmp; - } - - void operator []=(index, value) { - h.operations.add('$s[$index]=$value'); - } - - final finalOne = 1; - final finalNull = null; - - void instanceTest() { - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - vGetValue = 1; check(1, () => v ??= bad(), ['$s.v']); - yGetValue = 1; check(1, () => v ??= y, ['$s.v', 'y', '$s.v=1']); - finalOne ??= null; -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL -// [cfe] The setter 'finalOne' isn't defined for the class 'C'. - yGetValue = 1; - } -} - -class D extends C { - D(String s) : super(s); - - get v => bad(); - - void set v(value) { - bad(); - } - - void derivedInstanceTest() { - // super.v ??= e is equivalent to - // ((x) => x == null ? super.v = e : x)(super.v) - vGetValue = 1; check(1, () => super.v ??= bad(), ['$s.v']); - yGetValue = 1; check(1, () => super.v ??= y, ['$s.v', 'y', '$s.v=1']); - } -} - -main() { - // Make sure the "none" test fails if "??=" is not implemented. This makes - // status files easier to maintain. - var _; - _ ??= null; - - new C('c').instanceTest(); - new D('d').derivedInstanceTest(); - - // v ??= e is equivalent to ((x) => x == null ? v = e : x)(v) - xGetValue = 1; check(1, () => x ??= bad(), ['x']); - yGetValue = 1; check(1, () => x ??= y, ['x', 'y', 'x=1']); - h.xGetValue = 1; check(1, () => h.x ??= bad(), ['h.x']); - yGetValue = 1; check(1, () => h.x ??= y, ['h.x', 'y', 'h.x=1']); - { var l = 1; check(1, () => l ??= bad(), []); } - { var l; yGetValue = 1; check(1, () => l ??= y, ['y']); Expect.equals(1, l); } - { final l = 1; l ??= null; } - // ^ - // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL - // [cfe] Can't assign to the final variable 'l'. - C ??= null; -//^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE -// [cfe] Can't assign to a type literal. - h ??= null; -//^ -// [analyzer] COMPILE_TIME_ERROR.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT -// [cfe] A prefix can't be used as an expression. - h[0] ??= null; -//^ -// [analyzer] COMPILE_TIME_ERROR.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT -// [cfe] A prefix can't be used as an expression. - - // C.v ??= e is equivalent to ((x) => x == null ? C.v = e : x)(C.v) - C.xGetValue = 1; check(1, () => C.x ??= bad(), ['C.x']); - yGetValue = 1; check(1, () => C.x ??= y, ['C.x', 'y', 'C.x=1']); - h.C.xGetValue = 1; check(1, () => h.C.x ??= bad(), ['h.C.x']); - yGetValue = 1; check(1, () => h.C.x ??= y, ['h.C.x', 'y', 'h.C.x=1']); - - // e1.v ??= e2 is equivalent to - // ((x) => ((y) => y == null ? x.v = e2 : y)(x.v))(e1) - xGetValue = new C('x'); xGetValue.vGetValue = 1; - check(1, () => x.v ??= bad(), ['x', 'x.v']); - xGetValue = new C('x'); yGetValue = 1; - check(1, () => x.v ??= y, ['x', 'x.v', 'y', 'x.v=1']); - fValue = new C('f()'); fValue.vGetValue = 1; - check(1, () => f().v ??= bad(), ['f()', 'f().v']); - fValue = new C('f()'); yGetValue = 1; - check(1, () => f().v ??= y, ['f()', 'f().v', 'y', 'f().v=1']); - - // e1[e2] ??= e3 is equivalent to - // ((a, i) => ((x) => x == null ? a[i] = e3 : x)(a[i]))(e1, e2) - xGetValue = new C('x'); yGetValue = 1; xGetValue.indexGetValue = 2; - check(2, () => x[y] ??= bad(), ['x', 'y', 'x[1]']); - xGetValue = new C('x'); yGetValue = 1; zGetValue = 2; - check(2, () => x[y] ??= z, ['x', 'y', 'x[1]', 'z', 'x[1]=2']); - - // e1?.v ??= e2 is equivalent to ((x) => x == null ? null : x.v ??= e2)(e1). - check(null, () => x?.v ??= bad(), ['x']); - xGetValue = new C('x'); xGetValue.vGetValue = 1; - check(1, () => x?.v ??= bad(), ['x', 'x.v']); - xGetValue = new C('x'); yGetValue = 1; - check(1, () => x?.v ??= y, ['x', 'x.v', 'y', 'x.v=1']); - - // C?.v ??= e2 is equivalent to C.v ??= e2. - C.xGetValue = 1; - check(1, () => C?.x ??= bad(), ['C.x']); - h.C.xgetValue = 1; - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER - // [cfe] Setter not found: 'xgetValue'. - check(1, () => h.c?.x ??= bad(), ['h.C.x']); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_PREFIXED_NAME - // [cfe] Undefined name 'c'. - yGetValue = 1; - check(1, () => C?.x ??= y, ['C.x', 'y', 'C.x=1']); - yGetValue = 1; - check(1, () => h.C?.x ??= y, ['h.C.x', 'y', 'h.C.x=1']); -} diff --git a/tests/language_2/if_null/assignment_helper.dart b/tests/language_2/if_null/assignment_helper.dart deleted file mode 100644 index 281ae52bbfd..00000000000 --- a/tests/language_2/if_null/assignment_helper.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2015, 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 used by if_null_assignment_behavior_test.dart, which -// imports it using the prefix "h.". - -library lib; - -import "package:expect/expect.dart"; - -List operations = []; - -var xGetValue = null; - -get x { - operations.add('h.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; -} - -void set x(value) { - operations.add('h.x=$value'); -} - -class C { - static var xGetValue = null; - - static get x { - operations.add('h.C.x'); - var tmp = xGetValue; - xGetValue = null; - return tmp; - } - - static void set x(value) { - operations.add('h.C.x=$value'); - } -} diff --git a/tests/language_2/if_null/assignment_static_test.dart b/tests/language_2/if_null/assignment_static_test.dart deleted file mode 100644 index 020b988607d..00000000000 --- a/tests/language_2/if_null/assignment_static_test.dart +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) 2015, 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 - -// Verify that the static type of a ??= b is the least upper bound of the -// static types of a and b. - -import "package:expect/expect.dart"; - -bad() { - Expect.fail('Should not be executed'); -} - -/// Actually of type B so that the implicit downcasts below succeed at runtime. -A theA = new B(); -B theB = new B(); - -class A { - String a; -} - -class B extends A { - String b; -} - -class C extends A { - String c; -} - -A get a => null; - -void set a(A value) {} - -B get b => null; - -void set b(B value) {} - -class ClassWithStaticGetters { - static A get a => null; - - static void set a(A value) {} - - static B get b => null; - - static void set b(B value) {} -} - -class ClassWithInstanceGetters { - A get a => null; - - void set a(A value) {} - - B get b => null; - - void set b(B value) {} -} - -class DerivedClass extends ClassWithInstanceGetters { - A get a => bad(); - - void set a(A value) { - bad(); - } - - B get b => bad(); - - void set b(B value) { - bad(); - } - - void derivedTest() { - // The static type of super.v ??= e is the LUB of the static types of - // super.v and e. - (super.a ??= theA).a; //# 01: ok - (super.a ??= theA).b; //# 02: compile-time error - (super.a ??= theB).a; //# 03: ok - (super.a ??= theB).b; //# 04: compile-time error - (super.b ??= theA).a; //# 05: ok - (super.b ??= theA).b; //# 06: compile-time error - - // Exactly the same static errors that would be caused by super.v = e - // are also generated in the case of super.v ??= e. - super.b ??= new C(); //# 07: compile-time error - } -} - -main() { - new DerivedClass().derivedTest(); - - // The static type of v ??= e is the LUB of the static types of v and e. - (a ??= theA).a; //# 08: ok - (a ??= theA).b; //# 09: compile-time error - (a ??= theB).a; //# 10: ok - (a ??= theB).b; //# 11: compile-time error - (b ??= theA).a; //# 12: ok - (b ??= theA).b; //# 13: compile-time error - - // Exactly the same static errors that would be caused by v = e are also - // generated in the case of v ??= e. - b ??= new C(); //# 14: compile-time error - - // The static type of C.v ??= e is the LUB of the static types of C.v and e. - (ClassWithStaticGetters.a ??= theA).a; //# 15: ok - (ClassWithStaticGetters.a ??= theA).b; //# 16: compile-time error - (ClassWithStaticGetters.a ??= theB).a; //# 17: ok - (ClassWithStaticGetters.a ??= theB).b; //# 18: compile-time error - (ClassWithStaticGetters.b ??= theA).a; //# 19: ok - (ClassWithStaticGetters.b ??= theA).b; //# 20: compile-time error - - // Exactly the same static errors that would be caused by C.v = e are - // also generated in the case of C.v ??= e. - ClassWithStaticGetters.b ??= new C(); //# 21: compile-time error - - // The static type of e1.v ??= e2 is the LUB of the static types of e1.v and - // e2. - (new ClassWithInstanceGetters().a ??= theA).a; //# 22: ok - (new ClassWithInstanceGetters().a ??= theA).b; //# 23: compile-time error - (new ClassWithInstanceGetters().a ??= theB).a; //# 24: ok - (new ClassWithInstanceGetters().a ??= theB).b; //# 25: compile-time error - (new ClassWithInstanceGetters().b ??= theA).a; //# 26: ok - (new ClassWithInstanceGetters().b ??= theA).b; //# 27: compile-time error - - // Exactly the same static errors that would be caused by e1.v = e2 are - // also generated in the case of e1.v ??= e2. - new ClassWithInstanceGetters().b ??= new C(); //# 28: compile-time error - - // The static type of e1[e2] ??= e3 is the LUB of the static types of e1[e2] - // and e3. - (([null])[0] ??= theA).a; //# 29: ok - (([null])[0] ??= theA).b; //# 30: compile-time error - (([null])[0] ??= theB).a; //# 31: ok - (([null])[0] ??= theB).b; //# 32: compile-time error - (([null])[0] ??= theA).a; //# 33: ok - (([null])[0] ??= theA).b; //# 34: compile-time error - - // Exactly the same static errors that would be caused by e1[e2] = e3 are - // also generated in the case of e1[e2] ??= e3. - ([null])[0] ??= new C(); //# 35: compile-time error - - // The static type of e1?.v op= e2 is the static type of e1.v op e2, - // therefore the static type of e1?.v ??= e2 is the static type of - // e1.v ?? e2, which is the LUB of the static types of e1?.v and e2. - (new ClassWithInstanceGetters()?.a ??= theA).a; //# 36: ok - (new ClassWithInstanceGetters()?.a ??= theA).b; //# 37: compile-time error - (new ClassWithInstanceGetters()?.a ??= theB).a; //# 38: ok - (new ClassWithInstanceGetters()?.a ??= theB).b; //# 39: compile-time error - (new ClassWithInstanceGetters()?.b ??= theA).a; //# 40: ok - (new ClassWithInstanceGetters()?.b ??= theA).b; //# 41: compile-time error - - // Exactly the same static errors that would be caused by e1.v ??= e2 are - // also generated in the case of e1?.v ??= e2. - new ClassWithInstanceGetters()?.b ??= new C(); //# 42: compile-time error -} diff --git a/tests/language_2/if_null/behavior_test.dart b/tests/language_2/if_null/behavior_test.dart deleted file mode 100644 index 02422029512..00000000000 --- a/tests/language_2/if_null/behavior_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2015, 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 - -// Evaluation of an if-null expression e of the form e1 ?? e2 is equivalent to -// the evaluation of the expression ((x) => x == null ? e2 : x)(e1). The -// static type of e is the least upper bound of the static type of e1 and the -// static type of e2. - -import "package:expect/expect.dart"; - -class A { - final String a; - A(this.a); -} - -class B extends A { - B(String v) - : b = v, - super(v); - final String b; -} - -class C extends A { - C(String v) - : c = v, - super(v); - final String c; -} - -B nullB() => null; -C nullC() => null; - -main() { - Expect.equals(1, 1 ?? 2); - Expect.equals(1, 1 ?? null); - Expect.equals(2, null ?? 2); - Expect.equals(null, null ?? null); - Expect.equals('B', (new B('B') ?? new C('C')).a); - Expect.equals('B', ((new B('B') ?? new C('C')) as dynamic).b); - Expect.throwsNoSuchMethodError(() => ((new B('B') ?? new C('C')) as dynamic).c); - Expect.equals('B', (new B('B') ?? nullC()).a); - Expect.equals('B', ((new B('B') ?? nullC()) as dynamic).b); - Expect.throwsNoSuchMethodError(() => ((new B('B') ?? nullC()) as dynamic).c); - Expect.equals('C', (nullB() ?? new C('C')).a); - Expect.throwsNoSuchMethodError(() => ((nullB() ?? new C('C')) as dynamic).b); - Expect.equals('C', ((nullB() ?? new C('C')) as dynamic).c); - Expect.throwsNoSuchMethodError(() => (nullB() ?? nullC()).a); - Expect.throwsNoSuchMethodError(() => ((nullB() ?? nullC()) as dynamic).b); - Expect.throwsNoSuchMethodError(() => ((nullB() ?? nullC()) as dynamic).c); -} diff --git a/tests/language_2/if_null/evaluation_order_test.dart b/tests/language_2/if_null/evaluation_order_test.dart deleted file mode 100644 index 4d40b885f7a..00000000000 --- a/tests/language_2/if_null/evaluation_order_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2015, 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 - -// Evaluation of an if-null expression e of the form e1 ?? e2 is equivalent to -// the evaluation of the expression ((x) => x == null ? e2 : x)(e1). -// -// Therefore, e1 should be evaluated first; if it is non-null, e2 should not -// be evaluated. - -import "package:expect/expect.dart"; - -bad() { - throw new Exception(); -} - -bool firstExecuted = false; - -first() { - firstExecuted = true; - return null; -} - -second() { - Expect.isTrue(firstExecuted); - return 2; -} - -main() { - Expect.equals(1, 1 ?? bad()); - Expect.equals(2, first() ?? second()); -} diff --git a/tests/language_2/if_null/precedence_runtime_test.dart b/tests/language_2/if_null/precedence_runtime_test.dart deleted file mode 100644 index f91ef9bac71..00000000000 --- a/tests/language_2/if_null/precedence_runtime_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify that '??' binds tighter than '?:' and less tightly than '||'. - -import "package:expect/expect.dart"; - -main() { - // Make sure the "none" test fails if "??" is not implemented. This makes - // status files easier to maintain. - var _ = null ?? null; - - // "a ?? b ?? c" should be legal, and should evaluate to the first non-null - // value (or null if there are no non-null values). - Expect.equals(1, 1 ?? 2 ?? 3); - Expect.equals(2, null ?? 2 ?? 3); - Expect.equals(3, null ?? null ?? 3); - Expect.equals(null, null ?? null ?? null); - - // "a ?? b ? c : d" should parse as "(a ?? b) ? c : d", therefore provided - // that a is true, b need not be a bool. An incorrect parse of - // "a ?? (b ? c : d)" would require b to be a bool to avoid a static type - // warning. - Expect.equals(2, true ?? 1 ? 2 : 3); - - // "a ?? b || c" should parse as "a ?? (b || c)", therefore it's a static - // type warning if b doesn't have type bool. An incorrect parse of - // "(a ?? b) || c" would allow b to have any type provided that a is bool. - - - // "a || b ?? c" should parse as "(a || b) ?? c", therefore it is a static - // type warning if b doesn't have type bool. An incorrect parse of - // "a || (b ?? c)" would allow b to have any type provided that c is bool. - - - // An incorrect parse of "a || (b ?? c)" would result in no checked-mode - // error. - Expect.throwsAssertionError(() => false || null ?? true); -} diff --git a/tests/language_2/if_null/precedence_test.dart b/tests/language_2/if_null/precedence_test.dart deleted file mode 100644 index a5b5d162431..00000000000 --- a/tests/language_2/if_null/precedence_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2015, 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 - -// Verify that '??' binds tighter than '?:' and less tightly than '||'. - -import "package:expect/expect.dart"; - -main() { - // Make sure the "none" test fails if "??" is not implemented. This makes - // status files easier to maintain. - var _ = null ?? null; - - // "a ?? b ?? c" should be legal, and should evaluate to the first non-null - // value (or null if there are no non-null values). - Expect.equals(1, 1 ?? 2 ?? 3); - Expect.equals(2, null ?? 2 ?? 3); - Expect.equals(3, null ?? null ?? 3); - Expect.equals(null, null ?? null ?? null); - - // "a ?? b ? c : d" should parse as "(a ?? b) ? c : d", therefore provided - // that a is true, b need not be a bool. An incorrect parse of - // "a ?? (b ? c : d)" would require b to be a bool to avoid a static type - // warning. - Expect.equals(2, true ?? 1 ? 2 : 3); - - // "a ?? b || c" should parse as "a ?? (b || c)", therefore it's a static - // type warning if b doesn't have type bool. An incorrect parse of - // "(a ?? b) || c" would allow b to have any type provided that a is bool. - false ?? 1 || true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND - // [cfe] A value of type 'int' can't be assigned to a variable of type 'bool'. - - // "a || b ?? c" should parse as "(a || b) ?? c", therefore it is a static - // type warning if b doesn't have type bool. An incorrect parse of - // "a || (b ?? c)" would allow b to have any type provided that c is bool. - false || 1 ?? true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.NON_BOOL_OPERAND - // [cfe] A value of type 'int' can't be assigned to a variable of type 'bool'. - - // An incorrect parse of "a || (b ?? c)" would result in no checked-mode - // error. - Expect.throwsAssertionError(() => false || null ?? true); -} diff --git a/tests/language_2/implicit_creation/README.md b/tests/language_2/implicit_creation/README.md deleted file mode 100644 index 09172264fde..00000000000 --- a/tests/language_2/implicit_creation/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Feature tests for optional const and optional new - -This directory was created in order to hold tests pertaining to the -Dart feature that allows the `new` and `const` keywords on instance -creation expressions and composite literals (maps and lists) to be -omitted. For more details, please check the feature specifications -on -[optional const](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/optional-const.md) -and on -[optional new](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/optional-new.md). \ No newline at end of file diff --git a/tests/language_2/implicit_creation/implicit_const_context_constructor_generic_named_test.dart b/tests/language_2/implicit_creation/implicit_const_context_constructor_generic_named_test.dart deleted file mode 100644 index 82b0151e9bc..00000000000 --- a/tests/language_2/implicit_creation/implicit_const_context_constructor_generic_named_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// Test that constructor invocations are constant -// when evaluated in a const context. - -class C { - final T x; - const C.named(this.x); - - // Static const. - static const staticConst = C.named(42); -} - -// Top-level const. -const topConst = C.named(42); - -main() { - const c0 = const C.named(42); // Explicit const. - - // RHS of const local variable. - const c1 = C.named(42); - - // Inside const expression. - var c2 = (const [C.named(42)])[0]; // List element. - var c3 = (const {C.named(42): 0}).keys.first; // Map key. - var c4 = (const {0: C.named(42)}).values.first; // Map value. - var c5 = (const C.named(C.named(42))).x; // Constructor argument. - - Expect.identical(c0, c1); - Expect.identical(c0, c2); - Expect.identical(c0, c3); - Expect.identical(c0, c4); - Expect.identical(c0, c5); - Expect.identical(c0, C.staticConst); - Expect.identical(c0, topConst); - - // Switch case expression. - switch (c0) { - case C.named(42): break; - default: Expect.fail("Didn't match constant"); - } - - // Annotation argument. - // (Cannot check that it's const, just that it's accepted). - @C.named(C.named(42)) - var foo = null; - foo; // avoid "unused" hints. -} diff --git a/tests/language_2/implicit_creation/implicit_const_context_constructor_generic_test.dart b/tests/language_2/implicit_creation/implicit_const_context_constructor_generic_test.dart deleted file mode 100644 index a23dad535c1..00000000000 --- a/tests/language_2/implicit_creation/implicit_const_context_constructor_generic_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// Test that constructor invocations are constant -// when evaluated in a const context. - -class C { - final T x; - const C(this.x); - - // Static const. - static const staticConst = C(42); -} - -// Top-level const. -const topConst = C(42); - -main() { - const c0 = const C(42); // Explicit const. - - // RHS of const local variable. - const c1 = C(42); - - // Inside const expression. - var c2 = (const [C(42)])[0]; // List element. - var c3 = (const {C(42): 0}).keys.first; // Map key. - var c4 = (const {0: C(42)}).values.first; // Map value. - var c5 = (const C(C(42))).x; // Constructor argument. - - Expect.identical(c0, c1); - Expect.identical(c0, c2); - Expect.identical(c0, c3); - Expect.identical(c0, c4); - Expect.identical(c0, c5); - Expect.identical(c0, C.staticConst); - Expect.identical(c0, topConst); - - // Switch case expression. - switch (c0) { - case C(42): - break; - default: - Expect.fail("Didn't match constant"); - } - - // Annotation argument. - // (Cannot check that it's const, just that it's accepted). - @C(C(42)) - var foo = null; - foo; // avoid "unused" hints. -} diff --git a/tests/language_2/implicit_creation/implicit_const_context_constructor_named_test.dart b/tests/language_2/implicit_creation/implicit_const_context_constructor_named_test.dart deleted file mode 100644 index cf308ef154b..00000000000 --- a/tests/language_2/implicit_creation/implicit_const_context_constructor_named_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// Test that constructor invocations are constant -// when evaluated in a const context. - -class C { - final Object x; - const C.named(this.x); - - // Static const. - static const staticConst = C.named(42); -} - -// Top-level const. -const topConst = C.named(42); - -main() { - const c0 = const C.named(42); // Explicit const. - - // RHS of const local variable. - const c1 = C.named(42); - - // Inside const expression. - var c2 = (const [C.named(42)])[0]; // List element. - var c3 = (const {C.named(42): 0}).keys.first; // Map key. - var c4 = (const {0: C.named(42)}).values.first; // Map value. - var c5 = (const C.named(C.named(42))).x; // Constructor argument. - - Expect.identical(c0, c1); - Expect.identical(c0, c2); - Expect.identical(c0, c3); - Expect.identical(c0, c4); - Expect.identical(c0, c5); - Expect.identical(c0, C.staticConst); - Expect.identical(c0, topConst); - - // Switch case expression. - switch (c0) { - case C.named(42): - break; - default: - Expect.fail("Didn't match constant"); - } - - // Annotation argument. - // (Cannot check that it's const, just that it's accepted). - @C.named(C.named(42)) - var foo = null; - foo; // avoid "unused" hints. -} diff --git a/tests/language_2/implicit_creation/implicit_const_context_constructor_test.dart b/tests/language_2/implicit_creation/implicit_const_context_constructor_test.dart deleted file mode 100644 index a80dcde8675..00000000000 --- a/tests/language_2/implicit_creation/implicit_const_context_constructor_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// Test that constructor invocations are constant -// when evaluated in a const context. - -class C { - final Object x; - const C(this.x); - - // Static const. - static const staticConst = C(42); -} - -// Top-level const. -const topConst = C(42); - -main() { - const c0 = const C(42); // Explicit const. - - // RHS of const local variable. - const c1 = C(42); - - // Inside const expression. - var c2 = (const [C(42)])[0]; // List element. - var c3 = (const {C(42): 0}).keys.first; // Map key. - var c4 = (const {0: C(42)}).values.first; // Map value. - var c5 = (const C(C(42))).x; // Constructor argument. - - Expect.identical(c0, c1); - Expect.identical(c0, c2); - Expect.identical(c0, c3); - Expect.identical(c0, c4); - Expect.identical(c0, c5); - Expect.identical(c0, C.staticConst); - Expect.identical(c0, topConst); - - // Switch case expression. - switch (c0) { - case C(42): - break; - default: - Expect.fail("Didn't match constant"); - } - - // Annotation argument. - // (Cannot check that it's const, just that it's accepted). - @C(C(42)) - var foo = null; - foo; // avoid "unused" hints. -} diff --git a/tests/language_2/implicit_creation/implicit_const_context_list_test.dart b/tests/language_2/implicit_creation/implicit_const_context_list_test.dart deleted file mode 100644 index c8aa9a0d1f1..00000000000 --- a/tests/language_2/implicit_creation/implicit_const_context_list_test.dart +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// Test that list literals are constant when evaluated in a const context. - -class C { - final Object x; - const C(this.x); - - // Static const. - static const staticConst = [42]; -} - -// Top-level const. -const topConst = [42]; - -main() { - const c0 = const [42]; // Explicit const. - - // RHS of const local variable. - const c1 = [42]; - - // Inside const expression. - var c2 = (const [ - [42] - ])[0]; // List element. - var c3 = (const { - [42]: 0 - }) - .keys - .first; // Map key. - var c4 = (const { - 0: [42] - }) - .values - .first; // Map value. - var c5 = (const C([42])).x; // Constructor argument. - - Expect.identical(c0, c1); - Expect.identical(c0, c2); - Expect.identical(c0, c3); - Expect.identical(c0, c4); - Expect.identical(c0, c5); - Expect.identical(c0, C.staticConst); - Expect.identical(c0, topConst); - - // Switch case expression. - switch (c0) { - case [42]: - break; - default: - Expect.fail("Didn't match constant"); - } - - // Annotation argument. - // (Cannot check that it's const, just that it's accepted). - @C([42]) - var foo = null; - foo; // avoid "unused" hints. -} diff --git a/tests/language_2/implicit_creation/implicit_const_context_map_test.dart b/tests/language_2/implicit_creation/implicit_const_context_map_test.dart deleted file mode 100644 index b9f866855a0..00000000000 --- a/tests/language_2/implicit_creation/implicit_const_context_map_test.dart +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// Test that map literals are constant when evaluated in a const context. - -class C { - final Object x; - const C(this.x); - - // Static const. - static const staticConst = {37: 87}; -} - -// Top-level const. -const topConst = {37: 87}; - -main() { - const c0 = const {37: 87}; // Explicit const. - - // RHS of const local variable. - const c1 = {37: 87}; - - // Inside const expression. - var c2 = (const [ - {37: 87} - ])[0]; // List element. - var c3 = (const { - {37: 87}: 0 - }) - .keys - .first; // Map key. - var c4 = (const { - 0: {37: 87} - }) - .values - .first; // Map value. - var c5 = (const C({37: 87})).x; // Constructor argument. - - Expect.identical(c0, c1); - Expect.identical(c0, c2); - Expect.identical(c0, c3); - Expect.identical(c0, c4); - Expect.identical(c0, c5); - Expect.identical(c0, C.staticConst); - Expect.identical(c0, topConst); - - // Switch case expression. - switch (c0) { - case {37: 87}: - break; - default: - Expect.fail("Didn't match constant"); - } - - // Annotation argument. - // (Cannot check that it's const, just that it's accepted). - @C({37: 87}) - var foo = null; - foo; // avoid "unused" hints. -} diff --git a/tests/language_2/implicit_creation/implicit_const_context_not_test.dart b/tests/language_2/implicit_creation/implicit_const_context_not_test.dart deleted file mode 100644 index 26f72406a9d..00000000000 --- a/tests/language_2/implicit_creation/implicit_const_context_not_test.dart +++ /dev/null @@ -1,80 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Check places that are *not* supposed to be constant contexts, -// but which do require constant values, do not introduce an implicit const. -// Nested expressions still do. -// (Also acts as regression test for http:/dartbug.com/36533) - -class C { - final v; - - // Initializer of final field in class with const constructor. - // Can't use `const C()`, it's a cyclic constant dependency. - final i1 = []; //# 1: compile-time error - final i2 = const []; - final i3 = const [[]]; - - const C([this.v]); - - // Initializer expression in generative const constructor. - const C.c1() : v = C(); //# 2: compile-time error - const C.c2() : v = const C(); - const C.c3() : v = const C(C()); - - // Expression in redirecting generative const constructor. - const C.r1() : this(C()); //# 3: compile-time error - const C.r2() : this(const C()); - const C.r3() : this(const C(C())); - - // Default value of positional optional parameter. - static List foo([ - p1 = C(), //# 4: compile-time error - p2 = const C(), - p3 = const C(C()), - ]) => - [p2, p3]; - - // Default value of named optional parameter. - static List bar({ - p1 = C(), //# 5: compile-time error - p2 = const C(), - p3 = const C(C()), - }) => - [p2, p3]; -} - -void main() { - var c = const C(); - var cc = const C(C()); - - // Check that const constructors can be invoked without `const`, - // creating new instances every time. - var nc1 = C(); - var nc2 = C.c2(); - var nc3 = C.c3(); - var nc4 = C.r2(); - var nc5 = C.r3(); - Expect.allDistinct([nc1, nc2, nc3, nc4, nc5, c, cc]); - - // Check that const invocations create identical objects. - Expect.identical(c, C.c2().v); - Expect.identical(cc, C.c3().v); - - Expect.identical(c, C.r2().v); - Expect.identical(cc, C.r3().v); - - Expect.identical(const [], C().i2); - Expect.identical(const [[]], C().i3); - - Expect.identical(c, C.foo()[0]); - Expect.identical(cc, C.foo()[1]); - - Expect.identical(c, C.bar()[0]); - Expect.identical(cc, C.bar()[1]); -} diff --git a/tests/language_2/implicit_creation/implicit_const_context_prefix_constructor_generic_named_test.dart b/tests/language_2/implicit_creation/implicit_const_context_prefix_constructor_generic_named_test.dart deleted file mode 100644 index 765272da1d8..00000000000 --- a/tests/language_2/implicit_creation/implicit_const_context_prefix_constructor_generic_named_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -import "implicit_const_context_prefix_constructor_generic_named_test.dart" - as prefix; - -// Test that constructor invocations are constant -// when evaluated in a const context. - -class C { - final T x; - const C.named(this.x); - - // Static const. - static const staticConst = prefix.C.named(42); -} - -// Top-level const. -const topConst = prefix.C.named(42); - -main() { - const c0 = const prefix.C.named(42); // Explicit const. - - // RHS of const local variable. - const c1 = prefix.C.named(42); - - // Inside const expression. - var c2 = (const [prefix.C.named(42)])[0]; // List element. - var c3 = (const {prefix.C.named(42): 0}).keys.first; // Map key. - var c4 = (const {0: prefix.C.named(42)}).values.first; // Map value. - var c5 = (const C.named(prefix.C.named(42))).x; // Constructor argument. - - Expect.identical(c0, c1); - Expect.identical(c0, c2); - Expect.identical(c0, c3); - Expect.identical(c0, c4); - Expect.identical(c0, c5); - Expect.identical(c0, C.staticConst); - Expect.identical(c0, topConst); - - // Switch case expression. - switch (c0) { - case prefix.C.named(42): break; - default: Expect.fail("Didn't match constant"); - } - - // Annotation argument. - // (Cannot check that it's const, just that it's accepted). - @C.named(prefix.C.named(42)) - var foo = null; - foo; // avoid "unused" hints. -} diff --git a/tests/language_2/implicit_creation/implicit_const_context_prefix_constructor_generic_test.dart b/tests/language_2/implicit_creation/implicit_const_context_prefix_constructor_generic_test.dart deleted file mode 100644 index b4105a826de..00000000000 --- a/tests/language_2/implicit_creation/implicit_const_context_prefix_constructor_generic_test.dart +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -import "implicit_const_context_prefix_constructor_generic_test.dart" as prefix; - -// Test that constructor invocations are constant -// when evaluated in a const context. - -class C { - final T x; - const C(this.x); - - // Static const. - static const staticConst = prefix.C(42); -} - -// Top-level const. -const topConst = prefix.C(42); - -main() { - const c0 = const prefix.C(42); // Explicit const. - - // RHS of const local variable. - const c1 = prefix.C(42); - - // Inside const expression. - var c2 = (const [prefix.C(42)])[0]; // List element. - var c3 = (const {prefix.C(42): 0}).keys.first; // Map key. - var c4 = (const {0: prefix.C(42)}).values.first; // Map value. - var c5 = (const C(prefix.C(42))).x; // Constructor argument. - - Expect.identical(c0, c1); - Expect.identical(c0, c2); - Expect.identical(c0, c3); - Expect.identical(c0, c4); - Expect.identical(c0, c5); - Expect.identical(c0, C.staticConst); - Expect.identical(c0, topConst); - - // Switch case expression. - switch (c0) { - case prefix.C(42): - break; - default: - Expect.fail("Didn't match constant"); - } - - // Annotation argument. - // (Cannot check that it's const, just that it's accepted). - @C(prefix.C(42)) - var foo = null; - foo; // avoid "unused" hints. -} diff --git a/tests/language_2/implicit_creation/implicit_const_context_prefix_constructor_named_test.dart b/tests/language_2/implicit_creation/implicit_const_context_prefix_constructor_named_test.dart deleted file mode 100644 index 61d604e02d0..00000000000 --- a/tests/language_2/implicit_creation/implicit_const_context_prefix_constructor_named_test.dart +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -import "implicit_const_context_prefix_constructor_named_test.dart" as prefix; - -// Test that constructor invocations are constant -// when evaluated in a const context. - -class C { - final Object x; - const C.named(this.x); - - // Static const. - static const staticConst = prefix.C.named(42); -} - -// Top-level const. -const topConst = prefix.C.named(42); - -main() { - const c0 = const prefix.C.named(42); // Explicit const. - - // RHS of const local variable. - const c1 = prefix.C.named(42); - - // Inside const expression. - var c2 = (const [prefix.C.named(42)])[0]; // List element. - var c3 = (const {prefix.C.named(42): 0}).keys.first; // Map key. - var c4 = (const {0: prefix.C.named(42)}).values.first; // Map value. - var c5 = (const C.named(prefix.C.named(42))).x; // Constructor argument. - - Expect.identical(c0, c1); - Expect.identical(c0, c2); - Expect.identical(c0, c3); - Expect.identical(c0, c4); - Expect.identical(c0, c5); - Expect.identical(c0, C.staticConst); - Expect.identical(c0, topConst); - - // Switch case expression. - switch (c0) { - case prefix.C.named(42): - break; - default: - Expect.fail("Didn't match constant"); - } - - // Annotation argument. - // (Cannot check that it's const, just that it's accepted). - @C.named(prefix.C.named(42)) - var foo = null; - foo; // avoid "unused" hints. -} diff --git a/tests/language_2/implicit_creation/implicit_const_context_prefix_constructor_test.dart b/tests/language_2/implicit_creation/implicit_const_context_prefix_constructor_test.dart deleted file mode 100644 index 98b58af56c5..00000000000 --- a/tests/language_2/implicit_creation/implicit_const_context_prefix_constructor_test.dart +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -import "implicit_const_context_prefix_constructor_test.dart" as prefix; - -// Test that constructor invocations are constant -// when evaluated in a const context. - -class C { - final Object x; - const C(this.x); - - // Static const. - static const staticConst = prefix.C(42); -} - -// Top-level const. -const topConst = prefix.C(42); - -main() { - const c0 = const prefix.C(42); // Explicit const. - - // RHS of const local variable. - const c1 = prefix.C(42); - - // Inside const expression. - var c2 = (const [prefix.C(42)])[0]; // List element. - var c3 = (const {prefix.C(42): 0}).keys.first; // Map key. - var c4 = (const {0: prefix.C(42)}).values.first; // Map value. - var c5 = (const C(prefix.C(42))).x; // Constructor argument. - - Expect.identical(c0, c1); - Expect.identical(c0, c2); - Expect.identical(c0, c3); - Expect.identical(c0, c4); - Expect.identical(c0, c5); - Expect.identical(c0, C.staticConst); - Expect.identical(c0, topConst); - - // Switch case expression. - switch (c0) { - case prefix.C(42): - break; - default: - Expect.fail("Didn't match constant"); - } - - // Annotation argument. - // (Cannot check that it's const, just that it's accepted). - @C(prefix.C(42)) - var foo = null; - foo; // avoid "unused" hints. -} diff --git a/tests/language_2/implicit_creation/implicit_const_not_default_values_test.dart b/tests/language_2/implicit_creation/implicit_const_not_default_values_test.dart deleted file mode 100644 index 77ed9a66d53..00000000000 --- a/tests/language_2/implicit_creation/implicit_const_not_default_values_test.dart +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2018, 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 - -// Tests that const/new-insertion does the right thing for default values. -// A default-value expression does not introduce a const context. - -main() { - foo(); - bar(); - baz(); - qux(); - C.foo(); - C.bar(); - new C().baz(); - new C().qux(); - new C.pos(); - new C.nam(); - const C.pos(); - const C.nam(); -} - -// Default arguments must be const to be accepted -foo([x // - = const [C()] // //# o1: ok - = const {42: C()} // //# o2: ok - = const C(C()) // //# o3: ok - = [42] // //# e1: compile-time error - = {42: 42} // //# e2: compile-time error - = C([]) // //# e3: compile-time error - ]) { -} - -bar({x // - = const [C()] // //# o4: ok - = const {42: C()} // //# o5: ok - = const C(C()) // //# o6: ok - = [42] // //# e4: compile-time error - = {42: 42} // //# e5: compile-time error - = C([]) // //# e6: compile-time error - }) { -} - -var baz = ([x - = const [C()] // //# o7: ok - = const {42: C()} // //# o8: ok - = const C(C()) // //# o9: ok - = [42] // //# e7: compile-time error - = {42: 42} // //# e8: compile-time error - = C([]) // //# e9: compile-time error -]) => 42; - -var qux = ({x - = const [C()] // //# o10: ok - = const {42: C()} // //# o11: ok - = const C(C()) // //# o12: ok - = [42] // //# e10: compile-time error - = {42: 42} // //# e11: compile-time error - = C([]) // //# e12: compile-time error -}) => 42; - -class C { - final x; - const C([this.x]); - - const C.pos([this.x // - = const [C()] // //# o13: ok - = const {42: C()} // //# o14: ok - = const C(C()) // //# o15: ok - = [42] // //# e13: compile-time error - = {42: 42} // //# e14: compile-time error - = C([]) // //# e15: compile-time error - ]); - - const C.nam({this.x // - = const [C()] // //# o16: ok - = const {42: C()} // //# o17: ok - = const C(C()) // //# o18: ok - = [42] // //# e16: compile-time error - = {42: 42} // //# e17: compile-time error - = C([]) // //# e18: compile-time error - }); - - static foo([x // - = const [C()] // //# o19: ok - = const {42: C()} // //# o20: ok - = const C(C()) // //# o21: ok - = [42] // //# e19: compile-time error - = {42: 42} // //# e20: compile-time error - = C([]) // //# e21: compile-time error - ]) { - } - - static bar({x // - = const [C()] // //# o22: ok - = const {42: C()} // //# o23: ok - = const C(C()) // //# o24: ok - = [42] // //# e22: compile-time error - = {42: 42} // //# e23: compile-time error - = C([]) // //# e24: compile-time error - }) { - } - - baz([x // - = const [C()] // //# o25: ok - = const {42: C()} // //# o26: ok - = const C(C()) // //# o27: ok - = [42] // //# e25: compile-time error - = {42: 42} // //# e26: compile-time error - = C([]) // //# e27: compile-time error - ]) { - } - - qux({x // - = const [C()] // //# o28: ok - = const {42: C()} // //# o29: ok - = const C(C()) // //# o30: ok - = [42] // //# e28: compile-time error - = {42: 42} // //# e29: compile-time error - = C([]) // //# e30: compile-time error - }) { - } -} diff --git a/tests/language_2/implicit_creation/implicit_new_constructor_generic_named_test.dart b/tests/language_2/implicit_creation/implicit_new_constructor_generic_named_test.dart deleted file mode 100644 index ce3612d4a23..00000000000 --- a/tests/language_2/implicit_creation/implicit_new_constructor_generic_named_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// Test that an omitted `new` is allowed for a generic constructor invocation. - -class C { - final T x; - C(this.x); // Not const constructor. - const C.c(this.x); // Const constructor. - - operator <(other) => this; - operator >(other) => other; - operator -() => this; - - C get self => this; - C method() => self; -} - -T id(T x) => x; - -main() { - const cc = const C.c(42); // Canonicalized. - var x = 42; // Avoid constant parameter for constant constructor. - var c0 = new C.c(x); // Original syntax. - - // Uses of `C.c(x)` in various contexts. - var c1 = C.c(x); - var c2 = [C.c(x)][0]; - var c3 = {C.c(x): 0}.keys.first; - var c4 = {0: C.c(x)}.values.first; - var c5 = id(C.c(x)); - var c6 = C.c(x).self; - var c7 = C.c(x).method(); - var c8 = C(C.c(x)).x; - var c9 = -C.c(x); - var c10 = C.c(x) < 9; - var c11 = C(null) > C.c(x); - var c12 = (c10 == c11) ? null : C.c(x); - var c13 = C.c(x)..method(); - var c14; - try { - throw C.c(x); - } catch (e) { - c14 = e; - } - - switch (C.c(x)) { - case cc: - Expect.fail("Should not be const"); - break; - default: - // Success. - } - - for (C.c(x); false; C.c(x), C.c(x)) { - Expect.fail("Unreachable"); - } - - var values = - [cc, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14]; - Expect.allDistinct(values); // Non of them create constants. - for (var value in values) { - Expect.isTrue(value is C); - Expect.equals(42, (value as C).x); - } -} diff --git a/tests/language_2/implicit_creation/implicit_new_constructor_generic_test.dart b/tests/language_2/implicit_creation/implicit_new_constructor_generic_test.dart deleted file mode 100644 index c53178a3a46..00000000000 --- a/tests/language_2/implicit_creation/implicit_new_constructor_generic_test.dart +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// Test that an omitted `new` is allowed for a generic constructor invocation. - -class C { - final T x; - C(this.x); // Not const constructor. - const C.c(this.x); // Const constructor. - - operator <(other) => this; - operator >(other) => other; - operator -() => this; - - C get self => this; - C method() => self; -} - -T id(T x) => x; - -main() { - const cc = const C.c(42); // Canonicalized. - - var c0 = new C(42); // Original syntax. - - // Uses of `C(42)` in various contexts. - var c1 = C(42); - var c2 = [C(42)][0]; - var c3 = {C(42): 0}.keys.first; - var c4 = {0: C(42)}.values.first; - var c5 = id(C(42)); - var c6 = C(42).self; - var c7 = C(42).method(); - var c8 = C(C(42)).x; - var c9 = -C(42); - var c10 = C(42) < 9; - var c11 = C(null) > C(42); - var c12 = (c10 == c11) ? null : C(42); - var c13 = C(42)..method(); - var c14; - try { - throw C(42); - } catch (e) { - c14 = e; - } - - switch (C(42)) { - case cc: - Expect.fail("Should not be const"); - break; - default: - // Success. - } - - for (C(42); false; C(42), C(42)) { - Expect.fail("Unreachable"); - } - - var values = [ - cc, - c0, - c1, - c2, - c3, - c4, - c5, - c6, - c7, - c8, - c9, - c10, - c11, - c12, - c13, - c14 - ]; - Expect.allDistinct(values); // Non of them create constants. - for (var value in values) { - Expect.isTrue(value is C); - Expect.equals(42, (value as C).x); - } -} diff --git a/tests/language_2/implicit_creation/implicit_new_constructor_named_test.dart b/tests/language_2/implicit_creation/implicit_new_constructor_named_test.dart deleted file mode 100644 index a8a4f1481c5..00000000000 --- a/tests/language_2/implicit_creation/implicit_new_constructor_named_test.dart +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// Test that an omitted `new` is allowed for a non-generic class. - -class C { - final Object x; - C(this.x); // Not const constructor. - const C.c(this.x); // Const constructor. - - operator <(other) => this; - operator >(other) => other; - operator -() => this; - - C get self => this; - C method() => self; -} - -T id(T x) => x; - -main() { - const cc = const C.c(42); // Canonicalized. - var x = 42; // Avoid constant parameter. - var c0 = new C.c(x); // Original syntax. - - // Uses of `C.c(x)` in various contexts. - var c1 = C.c(x); - var c2 = [C.c(x)][0]; - var c3 = {C.c(x): 0}.keys.first; - var c4 = {0: C.c(x)}.values.first; - var c5 = id(C.c(x)); - var c6 = C.c(x).self; - var c7 = C.c(x).method(); - var c8 = C(C.c(x)).x; - var c9 = -C.c(x); - var c10 = C.c(x) < 9; - var c11 = C(null) > C.c(x); - var c12 = (c10 == c11) ? null : C.c(x); - var c13 = C.c(x)..method(); - var c14; - try { - throw C.c(x); - } catch (e) { - c14 = e; - } - Expect.isNotNull(c12); - - switch (C.c(x)) { - case cc: - Expect.fail("Should not be const"); - break; - default: - // Success. - } - - for (C.c(x); false; C.c(x), C.c(x)) { - Expect.fail("Unreachable"); - } - - var values = [ - cc, - c0, - c1, - c2, - c3, - c4, - c5, - c6, - c7, - c8, - c9, - c10, - c11, - c12, - c13, - c14 - ]; - Expect.allDistinct(values); // Non of them create constants. - for (var value in values) { - Expect.isTrue(value is C); - Expect.equals(42, (value as C).x); - } -} diff --git a/tests/language_2/implicit_creation/implicit_new_constructor_test.dart b/tests/language_2/implicit_creation/implicit_new_constructor_test.dart deleted file mode 100644 index 88899b9b5a5..00000000000 --- a/tests/language_2/implicit_creation/implicit_new_constructor_test.dart +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// Test that an omitted `new` is allowed for a non-generic class. - -class C { - final Object x; - C(this.x); // Not const constructor. - const C.c(this.x); // Const constructor. - - operator <(other) => this; - operator >(other) => other; - operator -() => this; - - C get self => this; - C method() => self; -} - -T id(T x) => x; - -main() { - const cc = const C.c(42); // Canonicalized. - - var c0 = new C(42); // Original syntax. - - // Uses of `C(42)` in various contexts. - var c1 = C(42); - var c2 = [C(42)][0]; - var c3 = {C(42): 0}.keys.first; - var c4 = {0: C(42)}.values.first; - var c5 = id(C(42)); - var c6 = C(42).self; - var c7 = C(42).method(); - var c8 = C(C(42)).x; - var c9 = -C(42); - var c10 = C(42) < 9; - var c11 = C(null) > C(42); - var c12 = (c10 == c11) ? null : C(42); - var c13 = C(42)..method(); - var c14; - try { - throw C(42); - } catch (e) { - c14 = e; - } - - switch (C(42)) { - case cc: - Expect.fail("Should not be const"); - break; - default: - // Success. - } - - for (C(42); false; C(42), C(42)) { - Expect.fail("Unreachable"); - } - - var values = [ - cc, - c0, - c1, - c2, - c3, - c4, - c5, - c6, - c7, - c8, - c9, - c10, - c11, - c12, - c13, - c14 - ]; - Expect.allDistinct(values); // Non of them create constants. - for (var value in values) { - Expect.isTrue(value is C); - Expect.equals(42, (value as C).x); - } -} - -void testNamed() { - const cc = const C.c(42); // Canonicalized. - var x = 42; // Avoid constant parameter. - var c0 = new C.c(x); // Original syntax. - - // Uses of `C.c(x)` in various contexts. - var c1 = C.c(x); - var c2 = [C.c(x)][0]; - var c3 = {C.c(x): 0}.keys.first; - var c4 = {0: C.c(x)}.values.first; - var c5 = id(C.c(x)); - var c6 = C.c(x).self; - var c7 = C.c(x).method(); - var c8 = C(C.c(x)).x; - var c9 = -C.c(x); - var c10 = C.c(x) < 9; - var c11 = C(null) > C.c(x); - var c12 = (c10 == c11) ? null : C.c(x); - var c13 = C.c(x)..method(); - var c14; - try { - throw C.c(x); - } catch (e) { - c14 = e; - } - Expect.isNotNull(c12); - - switch (C.c(x)) { - case cc: - Expect.fail("Should not be const"); - break; - default: - // Success. - } - - for (C.c(x); false; C.c(x), C.c(x)) { - Expect.fail("Unreachable"); - } - - var values = [ - cc, - c0, - c1, - c2, - c3, - c4, - c5, - c6, - c7, - c8, - c9, - c10, - c11, - c12, - c13, - c14 - ]; - Expect.allDistinct(values); // Non of them create constants. - for (var value in values) { - Expect.isTrue(value is C); - Expect.equals(42, (value as C).x); - } -} diff --git a/tests/language_2/implicit_creation/implicit_new_or_const_composite_test.dart b/tests/language_2/implicit_creation/implicit_new_or_const_composite_test.dart deleted file mode 100644 index 47613fbf981..00000000000 --- a/tests/language_2/implicit_creation/implicit_new_or_const_composite_test.dart +++ /dev/null @@ -1,230 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// Tests that new-insertion always inserts `new` when not in const context, -// no matter what the arguments are. -// There is (currently) no automatic const insertion in non-const context. -// -// Not testing inference, so all type arguments are explicit. - -main() { - var x = 42; - const cc42 = const C(42); - var c42 = cc42; - - const clist = const [37]; - var list = clist; - const cmap = const {19: 87}; - var map = cmap; - - { - // Constructor inside constructor. - var d42 = const D(42); - - const cd1 = const C(const D(42)); - const cd2 = C(D(42)); // Const context. - var cd3 = C(D(42)); // Non-constant context, so `new`. - var cd4 = C(D(x)); // Non-constant context, so `new`. - var cd5 = C(d42); // Non-constant context, so `new`. - - Expect.identical(cd1, cd2); - Expect.allDistinct([cd1, cd3, cd4, cd5]); - } - - { - // List inside other constructor - const cl1 = const C(const [37]); - const cl2 = C(clist); // Constant context. - const cl3 = C(const [37]); // Constant context. - const cl4 = C([37]); // Constant context. - var cl5 = C(clist); // Non-constant context, so `new`. - var cl6 = C(const [37]); // Non-constant context, so `new`. - var cl7 = C(list); // Non-constant context, so `new`. - var cl8 = C([37]); // Non-constant context, so `new`. - - Expect.allIdentical([cl1, cl2, cl3, cl4]); - Expect.allDistinct([cl1, cl5, cl6, cl7, cl8]); - } - - { - // Map inside other constructor. - const cm1 = C(cmap); // Constant context. - const cm2 = C(const {19: 87}); // Constant context. - const cm3 = C({19: 87}); // Constant context. - var cm4 = C(cmap); // Non-constant context, so `new`. - var cm5 = C(const {19: 87}); // Non-constant context, so `new`. - var cm6 = C(map); // Non-constant context, so `new`. - var cm7 = C({19: 87}); // Non-constant context, so `new`. - - Expect.identical(cm1, cm2); - Expect.identical(cm1, cm3); - Expect.allDistinct([cm1, cm4, cm5, cm6, cm7]); - } - - { - // Composite with more than one sub-expression. - const n1 = N(clist, cmap); - const n2 = N(const [37], const {19: 87}); - const n3 = N([37], {19: 87}); - var n4 = N(const [37], const {19: 87}); - var n5 = N([37], const {19: 87}); - var n6 = N(const [37], {19: 87}); - var n7 = N([37], {19: 87}); - var n8 = N(clist, cmap); - var n9 = N([37], cmap); - var n10 = N(clist, {19: 87}); - var n11 = N([37], {19: 87}); - var n12 = N(list, cmap); - var n13 = N(clist, map); - var n14 = N(list, map); - - Expect.identical(n1, n2); - Expect.identical(n1, n3); - Expect.allDistinct([n1, n4, n5, n6, n7, n8, n9, n10, n11, n12, n13, n14]); - - Expect - .allIdentical([clist, n6.left, n10.left, n12.left, n13.left, n14.left]); - Expect.allDistinct([n5.left, n7.left, n9.left, n11.left]); - - Expect.allIdentical( - [cmap, n5.right, n9.right, n12.right, n13.right, n14.right]); - Expect.allDistinct([n6.right, n7.right, n10.right, n11.right]); - - const n20 = const N(const C(42), const [37]); - const n21 = N(const C(42), const [37]); - const n22 = N(C(42), const [37]); - const n23 = N(C(42), clist); - const n24 = N(C(42), [37]); - var n25 = N(const C(42), const [37]); - var n26 = N(C(42), const [37]); - var n27 = N(C(42), clist); - var n28 = N(C(42), [37]); - var n29 = N(C(42), list); - var n30 = N(c42, clist); - var n31 = N(cc42, list); - - Expect.allIdentical([n20, n21, n22, n23, n24]); - Expect.allDistinct([n20, n25, n26, n27, n28, n29, n30, n31]); - - Expect.allDistinct([cc42, n28.left, n29.left]); - Expect.identical(cc42, n30.left); - Expect.identical(cc42, n31.left); - Expect.allIdentical([clist, n29.right, n30.right, n31.right]); - Expect.notIdentical(clist, n28.right); - } - - { - // List literals. - const l20 = const [ - const C(42), - const [37] - ]; - const l21 = [ - const C(42), - const [37] - ]; - const l22 = [ - C(42), - const [37] - ]; - var l23 = const [C(42), clist]; - const l24 = [ - C(42), - [37] - ]; - var l25 = [ - const C(42), - const [37] - ]; - var l26 = [ - C(42), - const [37] - ]; - var l27 = [C(42), clist]; - var l28 = [ - C(42), - [37] - ]; - var l29 = [C(42), list]; - var l30 = [c42, clist]; - var l31 = [cc42, list]; - - Expect.allIdentical([l20, l21, l22, l23, l24]); - // List literals are never const unless in const context. - Expect.allDistinct([l20, l25, l26, l27, l28, l29, l30, l31]); - Expect.allIdentical([cc42, l25[0], l30[0], l31[0]]); - Expect.allDistinct([cc42, l26[0], l27[0], l28[0], l29[0]]); - Expect - .allIdentical([clist, l25[1], l26[1], l27[1], l29[1], l30[1], l31[1]]); - Expect.notIdentical(clist, l28[1]); - } - - { - // Map literals. - const m20 = const >{ - const C(42): const [37] - }; - const m21 = { - const C(42): const [37] - }; - const m22 = { - C(42): const [37] - }; - var m23 = const {C(42): clist}; - const m24 = { - C(42): [37] - }; - var m25 = { - const C(42): const [37] - }; - var m26 = { - C(42): const [37] - }; - var m27 = {C(42): clist}; - var m28 = { - C(42): [37] - }; - var m29 = {C(42): list}; - var m30 = {c42: clist}; - var m31 = {cc42: list}; - - Expect.allIdentical([m20, m21, m22, m23, m24]); - // Map literals are never const unless in const context. - Expect.allDistinct([m20, m25, m26, m27, m28, m29, m30, m31]); - Expect.identical(cc42, m25.keys.first); - Expect.allDistinct( - [cc42, m26.keys.first, m27.keys.first, m28.keys.first, m29.keys.first]); - Expect.identical(cc42, m30.keys.first); - Expect.identical(cc42, m31.keys.first); - Expect.allIdentical([ - clist, - m25.values.first, - m26.values.first, - m27.values.first, - m29.values.first, - m30.values.first, - m31.values.first - ]); - Expect.notIdentical(clist, m28.values.first); - } -} - -class C { - final Object x; - const C(this.x); -} - -class D { - final T x; - const D(this.x); -} - -class N { - final Object left, right; - const N(this.left, this.right); -} diff --git a/tests/language_2/implicit_creation/implicit_new_or_const_generic_test.dart b/tests/language_2/implicit_creation/implicit_new_or_const_generic_test.dart deleted file mode 100644 index 1215efcdd6b..00000000000 --- a/tests/language_2/implicit_creation/implicit_new_or_const_generic_test.dart +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -import "implicit_new_or_const_generic_test.dart" as prefix; - -// Test that const constructors with const arguments do not become const -// if not in a const context. - -// This test uses a generic class constructor with no prefix, -// which requires new Dart 2 syntax. - -main() { - // Various valid object creation expressions. - var x = 42; // non constant variable. - - // Various valid object creation expressions of a generic constructor. - // (Requires inference to infer `` for the invocations of `D`.) - var instances = [ - new D(x), - new D(42), - const D(42), - D(x), - D(42), - new D.named(x), - new D.named(42), - const D.named(42), - D.named(x), - D.named(42), - new prefix.D(x), - new prefix.D(42), - const prefix.D(42), - prefix.D(x), - prefix.D(42), - new prefix.D.named(x), - new prefix.D.named(42), - const prefix.D.named(42), - prefix.D.named(x), - prefix.D.named(42), - new D(x), - new D(42), - const D(42), - D(x), - D(42), - new D.named(x), - new D.named(42), - const D.named(42), - D.named(x), - D.named(42), - new prefix.D(x), - new prefix.D(42), - const prefix.D(42), - prefix.D(x), - prefix.D(42), - new prefix.D.named(x), - new prefix.D.named(42), - const prefix.D.named(42), - prefix.D.named(x), - prefix.D.named(42), - ]; - - const d42 = const D(42); - for (var i = 0; i < instances.length; i++) { - var d = instances[i]; - Expect.equals(d42, d); - if (i % 5 == 2) { - // The cases of D(42) without "new" are all constant. - Expect.identical(d42, d, "$i"); - } else { - // The rest are not. - Expect.notIdentical(d42, d, "$i"); - } - } - - // Test instance creation with type parameters. - new G().testWithInt(); -} - -class D { - final T x; - - const D(this.x); - const D.named(this.x); - - int get hashCode => x.hashCode; - bool operator ==(Object other) => other is D && x == other.x; -} - -class G { - // Tests creation of D where T is a type variable. - void testWithInt() { - // Cannot create constants referencing T or x. - var instances = [ - new D(null), - D(null), - new D.named(null), - D.named(null), - new prefix.D(null), - prefix.D(null), - new prefix.D.named(null), - prefix.D.named(null), - ]; - - const dx = const D(null); - Expect.allDistinct([dx]..addAll(instances)); - for (var i = 0; i < instances.length; i++) { - var d = instances[i]; - Expect.isTrue(d is D); - Expect.isTrue(d is! D); - Expect.equals(dx, d, "$i"); - } - } -} diff --git a/tests/language_2/implicit_creation/implicit_new_or_const_test.dart b/tests/language_2/implicit_creation/implicit_new_or_const_test.dart deleted file mode 100644 index aaef189b410..00000000000 --- a/tests/language_2/implicit_creation/implicit_new_or_const_test.dart +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -import "implicit_new_or_const_test.dart" as prefix; - -// Test that const constructors with const arguments do not become const -// if not in a const context. - -main() { - // Various valid object creation expressions. - var x = 42; // non constant variable. - - var instances = [ - new C(x), - new C(42), - const C(42), - C(x), - C(42), - new C.named(x), - new C.named(42), - const C.named(42), - C.named(x), - C.named(42), - new prefix.C(x), - new prefix.C(42), - const prefix.C(42), - prefix.C(x), - prefix.C(42), - new prefix.C.named(x), - new prefix.C.named(42), - const prefix.C.named(42), - prefix.C.named(x), - prefix.C.named(42), - ]; - - // Test that the correct ones are constant, and the rest are not. - const c42 = const C(42); // Reference constant. - - for (var i = 0; i < instances.length; i++) { - var c = instances[i]; - Expect.equals(c42, c); - if (i % 5 == 2) { - Expect.identical(c42, c, "$i"); - } else { - Expect.notIdentical(c42, c, "$i"); - } - } -} - -class C { - final Object x; - - const C(this.x); - const C.named(this.x); - - int get hashCode => x.hashCode; - bool operator ==(Object other) => other is C && x == other.x; -} diff --git a/tests/language_2/implicit_creation/implicit_new_prefix_constructor_generic_named_test.dart b/tests/language_2/implicit_creation/implicit_new_prefix_constructor_generic_named_test.dart deleted file mode 100644 index d9cc0ad5fc5..00000000000 --- a/tests/language_2/implicit_creation/implicit_new_prefix_constructor_generic_named_test.dart +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -import "implicit_new_prefix_constructor_generic_named_test.dart" as prefix; - -// Test that an omitted `new` is allowed for a generic constructor invocation. - -class C { - final T x; - C(this.x); // Not const constructor. - const C.c(this.x); // Const constructor. - - operator <(other) => this; - operator >(other) => other; - operator -() => this; - - C get self => this; - C method() => self; -} - -T id(T x) => x; - -main() { - const cc = const C.c(42); // Canonicalized. - var x = 42; // Avoid constant parameter. - var c0 = new prefix.C.c(x); // Original syntax. - - // Uses of `prefix.C.c(x)` in various contexts. - var c1 = prefix.C.c(x); - var c2 = [prefix.C.c(x)][0]; - var c3 = {prefix.C.c(x): 0}.keys.first; - var c4 = {0: prefix.C.c(x)}.values.first; - var c5 = id(prefix.C.c(x)); - var c6 = prefix.C.c(x).self; - var c7 = prefix.C.c(x).method(); - var c8 = C(prefix.C.c(x)).x; - var c9 = -prefix.C.c(x); - var c10 = prefix.C.c(x) < 9; - var c11 = C(null) > prefix.C.c(x); - var c12 = (c10 == c11) ? null : prefix.C.c(x); - var c13 = prefix.C.c(x)..method(); - var c14; - try { - throw prefix.C.c(x); - } catch (e) { - c14 = e; - } - - switch (prefix.C.c(x)) { - case cc: - Expect.fail("Should not be const"); - break; - default: - // Success. - } - - for (prefix.C.c(x); false; prefix.C.c(x), prefix.C.c(x)) { - Expect.fail("Unreachable"); - } - - var values = - [cc, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14]; - Expect.allDistinct(values); // Non of them create constants. - for (var value in values) { - Expect.isTrue(value is C); - Expect.equals(42, (value as C).x); - } -} diff --git a/tests/language_2/implicit_creation/implicit_new_prefix_constructor_generic_test.dart b/tests/language_2/implicit_creation/implicit_new_prefix_constructor_generic_test.dart deleted file mode 100644 index 6fa68b30234..00000000000 --- a/tests/language_2/implicit_creation/implicit_new_prefix_constructor_generic_test.dart +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -import "implicit_new_prefix_constructor_generic_test.dart" as prefix; - -// Test that an omitted `new` is allowed for a generic constructor invocation. - -class C { - final T x; - C(this.x); // Not const constructor. - const C.c(this.x); // Const constructor. - - operator <(other) => this; - operator >(other) => other; - operator -() => this; - - C get self => this; - C method() => self; -} - -T id(T x) => x; - -main() { - const cc = const C.c(42); // Canonicalized. - - var c0 = new prefix.C(42); // Original syntax. - - // Uses of `prefix.C(42)` in various contexts. - var c1 = prefix.C(42); - var c2 = [prefix.C(42)][0]; - var c3 = {prefix.C(42): 0}.keys.first; - var c4 = {0: prefix.C(42)}.values.first; - var c5 = id(prefix.C(42)); - var c6 = prefix.C(42).self; - var c7 = prefix.C(42).method(); - var c8 = C(prefix.C(42)).x; - var c9 = -prefix.C(42); - var c10 = prefix.C(42) < 9; - var c11 = C(null) > prefix.C(42); - var c12 = (c10 == c11) ? null : prefix.C(42); - var c13 = prefix.C(42)..method(); - var c14; - try { - throw prefix.C(42); - } catch (e) { - c14 = e; - } - - switch (prefix.C(42)) { - case cc: - Expect.fail("Should not be const"); - break; - default: - // Success. - } - - for (prefix.C(42); false; prefix.C(42), prefix.C(42)) { - Expect.fail("Unreachable"); - } - - var values = [ - cc, - c0, - c1, - c2, - c3, - c4, - c5, - c6, - c7, - c8, - c9, - c10, - c11, - c12, - c13, - c14 - ]; - Expect.allDistinct(values); // Non of them create constants. - for (var value in values) { - Expect.isTrue(value is C); - Expect.equals(42, (value as C).x); - } -} diff --git a/tests/language_2/implicit_creation/implicit_new_prefix_constructor_named_test.dart b/tests/language_2/implicit_creation/implicit_new_prefix_constructor_named_test.dart deleted file mode 100644 index 5fe061679ed..00000000000 --- a/tests/language_2/implicit_creation/implicit_new_prefix_constructor_named_test.dart +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -import "implicit_new_prefix_constructor_named_test.dart" as prefix; - -// Test that an omitted `new` is allowed for a non-generic class. - -class C { - final Object x; - C(this.x); // Not const constructor. - const C.c(this.x); // Const constructor. - - operator <(other) => this; - operator >(other) => other; - operator -() => this; - - C get self => this; - C method() => self; -} - -T id(T x) => x; - -main() { - const cc = const C.c(42); // Canonicalized. - var x = 42; // Avoid constant parameter. - var c0 = new prefix.C.c(x); // Original syntax. - - // Uses of `prefix.C.c(x)` in various contexts. - var c1 = prefix.C.c(x); - var c2 = [prefix.C.c(x)][0]; - var c3 = {prefix.C.c(x): 0}.keys.first; - var c4 = {0: prefix.C.c(x)}.values.first; - var c5 = id(prefix.C.c(x)); - var c6 = prefix.C.c(x).self; - var c7 = prefix.C.c(x).method(); - var c8 = C(prefix.C.c(x)).x; - var c9 = -prefix.C.c(x); - var c10 = prefix.C.c(x) < 9; - var c11 = C(null) > prefix.C.c(x); - var c12 = (c10 == c11) ? null : prefix.C.c(x); - var c13 = prefix.C.c(x)..method(); - var c14; - try { - throw prefix.C.c(x); - } catch (e) { - c14 = e; - } - Expect.isNotNull(c12); - - switch (prefix.C.c(x)) { - case cc: - Expect.fail("Should not be const"); - break; - default: - // Success. - } - - for (prefix.C.c(x); false; prefix.C.c(x), prefix.C.c(x)) { - Expect.fail("Unreachable"); - } - - var values = [ - cc, - c0, - c1, - c2, - c3, - c4, - c5, - c6, - c7, - c8, - c9, - c10, - c11, - c12, - c13, - c14 - ]; - Expect.allDistinct(values); // Non of them create constants. - for (var value in values) { - Expect.isTrue(value is C); - Expect.equals(42, (value as C).x); - } -} diff --git a/tests/language_2/implicit_creation/implicit_new_prefix_constructor_test.dart b/tests/language_2/implicit_creation/implicit_new_prefix_constructor_test.dart deleted file mode 100644 index 71a917e6e76..00000000000 --- a/tests/language_2/implicit_creation/implicit_new_prefix_constructor_test.dart +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -import "implicit_new_prefix_constructor_test.dart" as prefix; - -// Test that an omitted `new` is allowed for a non-generic class. - -class C { - final Object x; - C(this.x); // Not const constructor. - const C.c(this.x); // Const constructor. - - operator <(other) => this; - operator >(other) => other; - operator -() => this; - - C get self => this; - C method() => self; -} - -T id(T x) => x; - -main() { - const cc = const C.c(42); // Canonicalized. - - var c0 = new prefix.C(42); // Original syntax. - - // Uses of `prefix.C(42)` in various contexts. - var c1 = prefix.C(42); - var c2 = [prefix.C(42)][0]; - var c3 = {prefix.C(42): 0}.keys.first; - var c4 = {0: prefix.C(42)}.values.first; - var c5 = id(prefix.C(42)); - var c6 = prefix.C(42).self; - var c7 = prefix.C(42).method(); - var c8 = C(prefix.C(42)).x; - var c9 = -prefix.C(42); - var c10 = prefix.C(42) < 9; - var c11 = C(null) > prefix.C(42); - var c12 = (c10 == c11) ? null : prefix.C(42); - var c13 = prefix.C(42)..method(); - var c14; - try { - throw prefix.C(42); - } catch (e) { - c14 = e; - } - Expect.isNotNull(c12); - - switch (prefix.C(42)) { - case cc: - Expect.fail("Should not be const"); - break; - default: - // Success. - } - - for (prefix.C(42); false; prefix.C(42), prefix.C(42)) { - Expect.fail("Unreachable"); - } - - var values = [ - cc, - c0, - c1, - c2, - c3, - c4, - c5, - c6, - c7, - c8, - c9, - c10, - c11, - c12, - c13, - c14 - ]; - Expect.allDistinct(values); // Non of them create constants. - for (var value in values) { - Expect.isTrue(value is C); - Expect.equals(42, (value as C).x); - } -} diff --git a/tests/language_2/implicit_downcast_during/assert_initializer_test.dart b/tests/language_2/implicit_downcast_during/assert_initializer_test.dart deleted file mode 100644 index e28353f25f5..00000000000 --- a/tests/language_2/implicit_downcast_during/assert_initializer_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2017, 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 - -class C { - C.oneArg(Object x) : assert(x); - C.twoArgs(Object x, Object y) : assert(x, y); -} - -void main() { - Object b = true; - new C.oneArg(b); // No error - assert(b, 'should not fail'); // No error - try { - new C.twoArgs(false, b); // Type is ok - } on AssertionError {} - b = new Object(); - try { - new C.oneArg(b); - assert(false, 'Did not throw'); - } on TypeError {} - try { - new C.twoArgs(b, 'type error should occur before assert check'); - assert(false, 'Did not throw'); - } on TypeError {} -} diff --git a/tests/language_2/implicit_downcast_during/assert_statement_test.dart b/tests/language_2/implicit_downcast_during/assert_statement_test.dart deleted file mode 100644 index f0a3e00069f..00000000000 --- a/tests/language_2/implicit_downcast_during/assert_statement_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2017, 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 - -void main() { - Object b = true; - assert(b); // No error - assert(b, 'should not fail'); // No error - try { - assert(false, b); // Type is ok - } on AssertionError {} - b = new Object(); - try { - assert(b); - assert(false, 'Did not throw'); - } on TypeError {} - try { - assert(b, 'type error should occur before assert check'); - assert(false, 'Did not throw'); - } on TypeError {} -} diff --git a/tests/language_2/implicit_downcast_during/assignment_test.dart b/tests/language_2/implicit_downcast_during/assignment_test.dart deleted file mode 100644 index 28a8925b587..00000000000 --- a/tests/language_2/implicit_downcast_during/assignment_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -void main() { - B b; - A a1 = new B(); - A a2 = new A(); - b = a1; // No error - Expect.throwsTypeError(() { - b = a2; - }); -} diff --git a/tests/language_2/implicit_downcast_during/combiner_test.dart b/tests/language_2/implicit_downcast_during/combiner_test.dart deleted file mode 100644 index 3ebd023a4f0..00000000000 --- a/tests/language_2/implicit_downcast_during/combiner_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class C { - C operator +(B b) => this; -} - -void main() { - C c = new C(); - A a1 = new B(); - A a2 = new A(); - c += a1; // No error - Expect.throwsTypeError(() { - c += a2; - }); -} diff --git a/tests/language_2/implicit_downcast_during/compound_assignment_test.dart b/tests/language_2/implicit_downcast_during/compound_assignment_test.dart deleted file mode 100644 index 6d05918904b..00000000000 --- a/tests/language_2/implicit_downcast_during/compound_assignment_test.dart +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A { - static Object returnValue; - static Object argument; - Object operator +(Object x) { - argument = x; - return returnValue; - } -} - -void main() { - B origB = new B(); - B b = origB; - B.returnValue = new B(); - B.argument = null; - Expect.identical(B.returnValue, b += 2); // No error - types compatible - Expect.identical(B.returnValue, b); - Expect.identical(2, B.argument); - - b = origB; - B.returnValue = new A(); - B.argument = null; - Expect.throwsTypeError(() { - b += 3; - }); - // The exception should have happened after the call to operator+ but before - // the assignment to b. - Expect.identical(origB, b); - Expect.identical(3, B.argument); - - b = origB; - B.returnValue = new B(); - B.argument = null; - Expect.identical(B.returnValue, ++b); // No error - types compatible - Expect.identical(B.returnValue, b); - Expect.identical(1, B.argument); - - b = origB; - B.returnValue = new A(); - B.argument = null; - Expect.throwsTypeError(() { - ++b; - }); - // The exception should have happened after the call to operator+ but before - // the assignment to b. - Expect.identical(origB, b); - Expect.identical(1, B.argument); - - b = origB; - B.returnValue = new B(); - B.argument = null; - Expect.identical(origB, b++); // No error - types compatible - Expect.identical(B.returnValue, b); - Expect.identical(1, B.argument); - - b = origB; - B.returnValue = new A(); - B.argument = null; - Expect.throwsTypeError(() { - b++; - }); - // The exception should have happened after the call to operator+ but before - // the assignment to b. - Expect.identical(origB, b); - Expect.identical(1, B.argument); -} diff --git a/tests/language_2/implicit_downcast_during/conditional_expression_test.dart b/tests/language_2/implicit_downcast_during/conditional_expression_test.dart deleted file mode 100644 index 89c379c4576..00000000000 --- a/tests/language_2/implicit_downcast_during/conditional_expression_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -void main() { - Object b = true; - b ? 1 : 2; // No error - b = new Object(); - Expect.throwsTypeError(() { - b ? 1 : 2; - }); -} diff --git a/tests/language_2/implicit_downcast_during/constructor_initializer_test.dart b/tests/language_2/implicit_downcast_during/constructor_initializer_test.dart deleted file mode 100644 index 18bde65e5c6..00000000000 --- a/tests/language_2/implicit_downcast_during/constructor_initializer_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class C { - B b; - C(A a) : b = a; -} - -void main() { - A a1 = new B(); - A a2 = new A(); - new C(a1); // No error - Expect.throwsTypeError(() { - new C(a2); - }); -} diff --git a/tests/language_2/implicit_downcast_during/constructor_invocation_test.dart b/tests/language_2/implicit_downcast_during/constructor_invocation_test.dart deleted file mode 100644 index e6d26b41281..00000000000 --- a/tests/language_2/implicit_downcast_during/constructor_invocation_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class C { - C(B b); -} - -main() { - A a1 = new B(); - A a2 = new A(); - new C(a1); // No error - Expect.throwsTypeError(() { - new C(a2); - }); -} diff --git a/tests/language_2/implicit_downcast_during/do_test.dart b/tests/language_2/implicit_downcast_during/do_test.dart deleted file mode 100644 index ca3cebf17ad..00000000000 --- a/tests/language_2/implicit_downcast_during/do_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -void main() { - Object b = false; - do {} while (b); // No error - b = new Object(); - Expect.throwsTypeError(() { - do {} while (b); - }); -} diff --git a/tests/language_2/implicit_downcast_during/factory_constructor_invocation_test.dart b/tests/language_2/implicit_downcast_during/factory_constructor_invocation_test.dart deleted file mode 100644 index 09aca6a4952..00000000000 --- a/tests/language_2/implicit_downcast_during/factory_constructor_invocation_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class C { - factory C(B b) => new C._(); - C._(); -} - -main() { - A a1 = new B(); - A a2 = new A(); - new C(a1); // No error - Expect.throwsTypeError(() { - new C(a2); - }); -} diff --git a/tests/language_2/implicit_downcast_during/field_declaration_test.dart b/tests/language_2/implicit_downcast_during/field_declaration_test.dart deleted file mode 100644 index 5a41dbc8f6f..00000000000 --- a/tests/language_2/implicit_downcast_during/field_declaration_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -A a1 = new B(); -A a2 = new A(); -B b1 = a1; -B b2 = a2; - -class C { - static B b3 = a1; - static B b4 = a2; - B b5 = a1; -} - -class D { - B b6 = a2; -} - -void main() { - b1; // No error - Expect.throwsTypeError(() { - b2; - }); - C.b3; // No error - Expect.throwsTypeError(() { - C.b4; - }); - new C(); // No error - Expect.throwsTypeError(() { - new D(); - }); -} diff --git a/tests/language_2/implicit_downcast_during/for_condition_test.dart b/tests/language_2/implicit_downcast_during/for_condition_test.dart deleted file mode 100644 index 037fb82423c..00000000000 --- a/tests/language_2/implicit_downcast_during/for_condition_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -void main() { - Object b = false; - for (int i = 0; b; i++) {} // No error - b = new Object(); - Expect.throwsTypeError(() { - for (int i = 0; b; i++) {} - }); -} diff --git a/tests/language_2/implicit_downcast_during/for_in_element_test.dart b/tests/language_2/implicit_downcast_during/for_in_element_test.dart deleted file mode 100644 index 5910259c68a..00000000000 --- a/tests/language_2/implicit_downcast_during/for_in_element_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -void main() { - List listOfA = [new B()]; - Object o = listOfA; - for (B x in o) {} // No error - for (B x in listOfA) {} // No error - B y; - for (y in o) {} // No error - for (y in listOfA) {} // No error - listOfA[0] = new A(); - Expect.throwsTypeError(() { - for (B x in o) {} - }); - Expect.throwsTypeError(() { - for (B x in listOfA) {} - }); - Expect.throwsTypeError(() { - for (y in o) {} - }); - Expect.throwsTypeError(() { - for (y in listOfA) {} - }); -} diff --git a/tests/language_2/implicit_downcast_during/for_in_iterable_test.dart b/tests/language_2/implicit_downcast_during/for_in_iterable_test.dart deleted file mode 100644 index 3d4e2de7c49..00000000000 --- a/tests/language_2/implicit_downcast_during/for_in_iterable_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -void main() { - Object o = []; - for (var x in o) {} // No error - for (B x in o) {} // No error - B y; - for (y in o) {} // No error - o = new Object(); - Expect.throwsTypeError(() { - for (var x in o) {} - }); - Expect.throwsTypeError(() { - for (B x in o) {} - }); - Expect.throwsTypeError(() { - for (y in o) {} - }); -} diff --git a/tests/language_2/implicit_downcast_during/for_initializer_expression_test.dart b/tests/language_2/implicit_downcast_during/for_initializer_expression_test.dart deleted file mode 100644 index d9bacb5329e..00000000000 --- a/tests/language_2/implicit_downcast_during/for_initializer_expression_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -void main() { - Object b = 0; - int i; - for (i = b; i < 1; i++) {} // No error - b = new Object(); - Expect.throwsTypeError(() { - for (i = b; i < 1; i++) {} - }); -} diff --git a/tests/language_2/implicit_downcast_during/for_initializer_var_test.dart b/tests/language_2/implicit_downcast_during/for_initializer_var_test.dart deleted file mode 100644 index 847e5def9b1..00000000000 --- a/tests/language_2/implicit_downcast_during/for_initializer_var_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -void main() { - Object b = 0; - for (int i = b; i < 1; i++) {} // No error - b = new Object(); - Expect.throwsTypeError(() { - for (int i = b; i < 1; i++) {} - }); -} diff --git a/tests/language_2/implicit_downcast_during/function_literal_arrow_test.dart b/tests/language_2/implicit_downcast_during/function_literal_arrow_test.dart deleted file mode 100644 index 7ee2d92a96b..00000000000 --- a/tests/language_2/implicit_downcast_during/function_literal_arrow_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -void main() { - Object b; - A a = new B(); - B Function(A) f = (A a) => a; - b = f(a); // No error - a = new A(); - Expect.throwsTypeError(() { - f(a); - }); -} diff --git a/tests/language_2/implicit_downcast_during/function_literal_return_test.dart b/tests/language_2/implicit_downcast_during/function_literal_return_test.dart deleted file mode 100644 index 6eaf42c735f..00000000000 --- a/tests/language_2/implicit_downcast_during/function_literal_return_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -void main() { - Object b; - A a = new B(); - B Function(A) f = (A a) { - return a; - }; - b = f(a); // No error - a = new A(); - Expect.throwsTypeError(() { - f(a); - }); -} diff --git a/tests/language_2/implicit_downcast_during/if_null_assignment_test.dart b/tests/language_2/implicit_downcast_during/if_null_assignment_test.dart deleted file mode 100644 index 04e917cf5b1..00000000000 --- a/tests/language_2/implicit_downcast_during/if_null_assignment_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -void main() { - B b; - A a1 = new B(); - A a2 = new A(); - b ??= a1; // No error - types compatible - b ??= a2; // No error - assignment has no effect - b = null; - Expect.throwsTypeError(() { - b ??= a2; - }); -} diff --git a/tests/language_2/implicit_downcast_during/if_statement_test.dart b/tests/language_2/implicit_downcast_during/if_statement_test.dart deleted file mode 100644 index 6d954a8d911..00000000000 --- a/tests/language_2/implicit_downcast_during/if_statement_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -void main() { - Object b = true; - if (b) {} // No error - b = new Object(); - Expect.throwsTypeError(() { - if (b) {} - }); -} diff --git a/tests/language_2/implicit_downcast_during/indexed_assignment_test.dart b/tests/language_2/implicit_downcast_during/indexed_assignment_test.dart deleted file mode 100644 index 86c771188cc..00000000000 --- a/tests/language_2/implicit_downcast_during/indexed_assignment_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class C { - void operator []=(B b, Object o) {} -} - -void main() { - A a1 = new B(); - A a2 = new A(); - C c = new C(); - c[a1] = null; // No error - Expect.throwsTypeError(() { - c[a2] = null; - }); -} diff --git a/tests/language_2/implicit_downcast_during/indexed_compound_assignment_test.dart b/tests/language_2/implicit_downcast_during/indexed_compound_assignment_test.dart deleted file mode 100644 index 18f2c11d404..00000000000 --- a/tests/language_2/implicit_downcast_during/indexed_compound_assignment_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class C { - int operator [](A a) => 0; - void operator []=(B b, int o) {} -} - -class D { - int operator [](B b) => 0; - void operator []=(A a, int o) {} -} - -void main() { - A a1 = new B(); - A a2 = new A(); - C c = new C(); - D d = new D(); - c[a1] += 1; // No error - d[a1] += 1; // No error - Expect.throwsTypeError(() { - c[a2] += 1; - }); - Expect.throwsTypeError(() { - d[a2] += 1; - }); -} diff --git a/tests/language_2/implicit_downcast_during/indexed_get_test.dart b/tests/language_2/implicit_downcast_during/indexed_get_test.dart deleted file mode 100644 index 7886e358740..00000000000 --- a/tests/language_2/implicit_downcast_during/indexed_get_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class C { - Object operator [](B b) => null; -} - -void main() { - A a1 = new B(); - A a2 = new A(); - C c = new C(); - c[a1]; // No error - Expect.throwsTypeError(() { - c[a2]; - }); -} diff --git a/tests/language_2/implicit_downcast_during/indexed_if_null_assignment_test.dart b/tests/language_2/implicit_downcast_during/indexed_if_null_assignment_test.dart deleted file mode 100644 index b65ef3de538..00000000000 --- a/tests/language_2/implicit_downcast_during/indexed_if_null_assignment_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class C { - Object operator [](A a) => 0; - void operator []=(B b, Object o) {} -} - -class D { - Object operator [](B b) => 0; - void operator []=(A a, Object o) {} -} - -class E { - Object operator [](A a) => null; - void operator []=(B b, Object o) {} -} - -void main() { - A a1 = new B(); - A a2 = new A(); - C c = new C(); - D d = new D(); - E e = new E(); - c[a1] ??= 1; // No error - d[a1] ??= 1; // No error - e[a1] ??= 1; // No error - c[a2] ??= 1; // No error - []= skipped - Expect.throwsTypeError(() { - d[a2] ??= 1; - }); - Expect.throwsTypeError(() { - e[a2] ??= 1; - }); -} diff --git a/tests/language_2/implicit_downcast_during/invocation_test.dart b/tests/language_2/implicit_downcast_during/invocation_test.dart deleted file mode 100644 index b09e00f393d..00000000000 --- a/tests/language_2/implicit_downcast_during/invocation_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -void f(B b) {} - -main() { - A a1 = new B(); - A a2 = new A(); - f(a1); // No error - Expect.throwsTypeError(() { - f(a2); - }); -} diff --git a/tests/language_2/implicit_downcast_during/list_literal_test.dart b/tests/language_2/implicit_downcast_during/list_literal_test.dart deleted file mode 100644 index 48d27162d9b..00000000000 --- a/tests/language_2/implicit_downcast_during/list_literal_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -void main() { - A a1 = new B(); - A a2 = new A(); - [a1]; // No error - Expect.throwsTypeError(() { - [a2]; - }); -} diff --git a/tests/language_2/implicit_downcast_during/logical_expression_test.dart b/tests/language_2/implicit_downcast_during/logical_expression_test.dart deleted file mode 100644 index 8da77c09113..00000000000 --- a/tests/language_2/implicit_downcast_during/logical_expression_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -void main() { - Object t = true; - Object f = false; - Object o = new Object(); - t || o; // No error - f || f; // No error - Expect.throwsTypeError(() { - o || t; - }); - Expect.throwsTypeError(() { - f || o; - }); - f && o; // No error - t && t; // No error - Expect.throwsTypeError(() { - o && f; - }); - Expect.throwsTypeError(() { - t && o; - }); -} diff --git a/tests/language_2/implicit_downcast_during/map_literal_test.dart b/tests/language_2/implicit_downcast_during/map_literal_test.dart deleted file mode 100644 index a31f6a25a51..00000000000 --- a/tests/language_2/implicit_downcast_during/map_literal_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -void main() { - A a1 = new B(); - A a2 = new A(); - {a1: 1}; // No error - {1: a1}; // No error - Expect.throwsTypeError(() { - {a2: 1}; - }); - Expect.throwsTypeError(() { - {1: a2}; - }); -} diff --git a/tests/language_2/implicit_downcast_during/method_invocation_test.dart b/tests/language_2/implicit_downcast_during/method_invocation_test.dart deleted file mode 100644 index f67bf58678a..00000000000 --- a/tests/language_2/implicit_downcast_during/method_invocation_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class C { - void f(B b) {} -} - -main() { - C c = new C(); - A a1 = new B(); - A a2 = new A(); - c.f(a1); // No error - Expect.throwsTypeError(() { - c.f(a2); - }); -} diff --git a/tests/language_2/implicit_downcast_during/not_test.dart b/tests/language_2/implicit_downcast_during/not_test.dart deleted file mode 100644 index da1cbbbf405..00000000000 --- a/tests/language_2/implicit_downcast_during/not_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -void main() { - Object b = true; - !b; // No error - b = new Object(); - Expect.throwsTypeError(() { - !b; - }); -} diff --git a/tests/language_2/implicit_downcast_during/null_aware_method_invocation_test.dart b/tests/language_2/implicit_downcast_during/null_aware_method_invocation_test.dart deleted file mode 100644 index a5384265c96..00000000000 --- a/tests/language_2/implicit_downcast_during/null_aware_method_invocation_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class C { - void f(B b) {} -} - -main() { - C c = new C(); - A a1 = new B(); - A a2 = new A(); - c?.f(a1); // No error - Expect.throwsTypeError(() { - c?.f(a2); - }); -} diff --git a/tests/language_2/implicit_downcast_during/redirecting_initializer_test.dart b/tests/language_2/implicit_downcast_during/redirecting_initializer_test.dart deleted file mode 100644 index 14c602ac344..00000000000 --- a/tests/language_2/implicit_downcast_during/redirecting_initializer_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class C { - C(A a) : this._(a); - C._(B b); -} - -main() { - A a1 = new B(); - A a2 = new A(); - new C(a1); // No error - Expect.throwsTypeError(() { - new C(a2); - }); -} diff --git a/tests/language_2/implicit_downcast_during/return_async_test.dart b/tests/language_2/implicit_downcast_during/return_async_test.dart deleted file mode 100644 index ceaeb3ff8c3..00000000000 --- a/tests/language_2/implicit_downcast_during/return_async_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2017, 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 - -import 'dart:async'; -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -Future f1(A a) async { - return a as FutureOr; -} - -Future f2(A a) async => a as FutureOr; - -main() async { - Object b; - A a = new B(); - b = await f1(a); // No error - b = await f2(a); // No error - a = new A(); - try { - await f1(a); - Expect.fail('await f1(a) should have thrown TypeError'); - } on TypeError {} - try { - await f2(a); - Expect.fail('await f2(a) should have thrown TypeError'); - } on TypeError {} -} diff --git a/tests/language_2/implicit_downcast_during/return_test.dart b/tests/language_2/implicit_downcast_during/return_test.dart deleted file mode 100644 index 899706aa606..00000000000 --- a/tests/language_2/implicit_downcast_during/return_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -B f1(A a) { - return a; -} - -B f2(A a) => a; - -void main() { - Object b; - A a = new B(); - b = f1(a); // No error - b = f2(a); // No error - a = new A(); - Expect.throwsTypeError(() { - f1(a); - }); - Expect.throwsTypeError(() { - f2(a); - }); -} diff --git a/tests/language_2/implicit_downcast_during/static_method_invocation_test.dart b/tests/language_2/implicit_downcast_during/static_method_invocation_test.dart deleted file mode 100644 index 4428b47440d..00000000000 --- a/tests/language_2/implicit_downcast_during/static_method_invocation_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class C { - static void f(B b) {} -} - -main() { - A a1 = new B(); - A a2 = new A(); - C.f(a1); // No error - Expect.throwsTypeError(() { - C.f(a2); - }); -} diff --git a/tests/language_2/implicit_downcast_during/super_initializer_test.dart b/tests/language_2/implicit_downcast_during/super_initializer_test.dart deleted file mode 100644 index b2b9be4f046..00000000000 --- a/tests/language_2/implicit_downcast_during/super_initializer_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class Base { - Base(B b); -} - -class C extends Base { - C(A a) : super(a); -} - -main() { - A a1 = new B(); - A a2 = new A(); - new C(a1); // No error - Expect.throwsTypeError(() { - new C(a2); - }); -} diff --git a/tests/language_2/implicit_downcast_during/super_method_invocation_test.dart b/tests/language_2/implicit_downcast_during/super_method_invocation_test.dart deleted file mode 100644 index b2f804c208a..00000000000 --- a/tests/language_2/implicit_downcast_during/super_method_invocation_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class Base { - void g(B b) {} -} - -class C extends Base { - void f(A a) { - g(a); - } -} - -main() { - C c = new C(); - A a1 = new B(); - A a2 = new A(); - c.f(a1); // No error - Expect.throwsTypeError(() { - c.f(a2); - }); -} diff --git a/tests/language_2/implicit_downcast_during/variable_declaration_test.dart b/tests/language_2/implicit_downcast_during/variable_declaration_test.dart deleted file mode 100644 index c996db157d7..00000000000 --- a/tests/language_2/implicit_downcast_during/variable_declaration_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -void main() { - A a1 = new B(); - A a2 = new A(); - B b1 = a1; // No error - Expect.throwsTypeError(() { - B b2 = a2; - }); -} diff --git a/tests/language_2/implicit_downcast_during/while_statement_test.dart b/tests/language_2/implicit_downcast_during/while_statement_test.dart deleted file mode 100644 index 310c7c81fc8..00000000000 --- a/tests/language_2/implicit_downcast_during/while_statement_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -void main() { - Object b = false; - while (b) {} // No error - b = new Object(); - Expect.throwsTypeError(() { - while (b) {} - }); -} diff --git a/tests/language_2/implicit_downcast_during/yield_star_test.dart b/tests/language_2/implicit_downcast_during/yield_star_test.dart deleted file mode 100644 index 09acc266916..00000000000 --- a/tests/language_2/implicit_downcast_during/yield_star_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -Iterable f(Iterable a) sync* { - yield* a; -} - -void main() { - B b = new B(); - for (var x in f([b])) {} // No error - var iterator = f([b]).iterator; - Expect.throwsTypeError(() { - iterator.moveNext(); - }); -} diff --git a/tests/language_2/implicit_downcast_during/yield_test.dart b/tests/language_2/implicit_downcast_during/yield_test.dart deleted file mode 100644 index 97b69929163..00000000000 --- a/tests/language_2/implicit_downcast_during/yield_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -Iterable f(A a) sync* { - yield a; -} - -void main() { - A a = new B(); - for (var x in f(a)) {} // No error - a = new A(); - var iterator = f(a).iterator; - Expect.throwsTypeError(() { - iterator.moveNext(); - }); -} diff --git a/tests/language_2/import/collection_no_prefix_test.dart b/tests/language_2/import/collection_no_prefix_test.dart deleted file mode 100644 index 538be1a706a..00000000000 --- a/tests/language_2/import/collection_no_prefix_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// 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 - -// Dart test program importing the core library explicitly. - -library ImportCollectionNoPrefixTest.dart; - -import "dart:collection"; - -main() { - var e = new SplayTreeMap(); - print('"dart:collection" imported, $e allocated'); -} diff --git a/tests/language_2/import/combinators2_runtime_test.dart b/tests/language_2/import/combinators2_runtime_test.dart deleted file mode 100644 index aeef4ba8f5c..00000000000 --- a/tests/language_2/import/combinators2_runtime_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 test program importing with show/hide combinators. - -// Show "hide" and "show", hide "ugly". -import "import1_lib.dart" show hide, show hide ugly; - -main() { - print(hide); - print(show); - - // Ugly is hidden. - -} diff --git a/tests/language_2/import/combinators2_test.dart b/tests/language_2/import/combinators2_test.dart deleted file mode 100644 index 6b2c716f2ac..00000000000 --- a/tests/language_2/import/combinators2_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2012, 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 - -// Dart test program importing with show/hide combinators. - -// Show "hide" and "show", hide "ugly". -import "import1_lib.dart" show hide, show hide ugly; - -main() { - print(hide); - print(show); - - // Ugly is hidden. - print(ugly); - // ^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER - // [cfe] Undefined name 'ugly'. -} diff --git a/tests/language_2/import/combinators_part.dart b/tests/language_2/import/combinators_part.dart deleted file mode 100644 index d63ef0537cf..00000000000 --- a/tests/language_2/import/combinators_part.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2012, 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 - -// This file is part of the test import_combinators_test.dart - -part of importCombinatorsTest; - -lookBehindCurtain() { - return show; // show is an imported identifier. -} diff --git a/tests/language_2/import/combinators_test.dart b/tests/language_2/import/combinators_test.dart deleted file mode 100644 index 2c0f499f947..00000000000 --- a/tests/language_2/import/combinators_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2012, 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 - -// Dart test program importing with show/hide combinators. - -library importCombinatorsTest; - -import "package:expect/expect.dart"; -import "import1_lib.dart" show hide, show hide ugly; -import "export1_lib.dart"; -import "dart:math" as M show e; - -part "combinators_part.dart"; - -main() { - Expect.equals("hide", hide); - Expect.equals("show", show); - // Top-level function from part, refers to imported variable show. - Expect.equals("show", lookBehindCurtain()); - // Top-level variable E from export1_lib.dart. - Expect.equals("E", e); - // Top-level variable E imported from dart:math. - Expect.equals(2.718281828459045, M.e); - // Constant LN2 from math library, re-exported by export1_lib.dart. - Expect.equals(0.6931471805599453, ln2); -} diff --git a/tests/language_2/import/conditional_import_test.dart b/tests/language_2/import/conditional_import_test.dart deleted file mode 100644 index 0cabc2ed761..00000000000 --- a/tests/language_2/import/conditional_import_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -// All three libraries have an HttpRequest class. -import "conditional_import_test.dart" - if (dart.library.io) "dart:io" - if (dart.library.html) "dart:html" deferred as d show HttpRequest; - -class HttpRequest {} - -void main() { - asyncStart(); - var io = const bool.fromEnvironment("dart.library.io"); - var html = const bool.fromEnvironment("dart.library.html"); - () async { - // Shouldn't fail. Shouldn't time out. - await d.loadLibrary().timeout(const Duration(seconds: 5)); - if (io) { - print("io"); - Expect.throws(() => new d.HttpRequest()); // Class is abstract in dart:io - } else if (html) { - print("html"); - dynamic r = new d.HttpRequest(); // Shouldn't throw - var o = r.open; // Shouldn't fail, the open method is there. - } else { - print("none"); - dynamic r = new d.HttpRequest(); - Expect.isTrue(r is HttpRequest); - } - asyncEnd(); - }(); -} diff --git a/tests/language_2/import/conditional_string_test.dart b/tests/language_2/import/conditional_string_test.dart deleted file mode 100644 index 8103d0eb356..00000000000 --- a/tests/language_2/import/conditional_string_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -// All three libraries have an HttpRequest class. -import "conditional_string_test.dart" - if (dart.library.io == "true") "dart:io" - if (dart.library.html == "true") "dart:html" deferred as d show HttpRequest; - -class HttpRequest {} - -void main() { - asyncStart(); - var io = const String.fromEnvironment("dart.library.io"); - var html = const String.fromEnvironment("dart.library.html"); - () async { - // Shouldn't fail. Shouldn't time out. - await d.loadLibrary().timeout(const Duration(seconds: 5)); - if (io == "true") { - print("io"); - Expect.throws(() => new d.HttpRequest()); // Class is abstract in dart:io - } else if (html == "true") { - print("html"); - dynamic r = new d.HttpRequest(); // Shouldn't throw - var o = r.open; // Shouldn't fail, the open method is there. - } else { - print("none"); - dynamic r = new d.HttpRequest(); - Expect.isTrue(r is HttpRequest); - } - asyncEnd(); - }(); -} diff --git a/tests/language_2/import/config_corelib_general.dart b/tests/language_2/import/config_corelib_general.dart deleted file mode 100644 index fdd163e1814..00000000000 --- a/tests/language_2/import/config_corelib_general.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2015, 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 - -class Classy { - String get name => "classy general"; - String httpSpecific() => throw UnimplementedError(); - String ioSpecific() => throw UnimplementedError(); -} - -bool general() => true; -bool httpSpecific() => false; -bool ioSpecific() => false; -final String name = "general"; diff --git a/tests/language_2/import/config_corelib_http.dart b/tests/language_2/import/config_corelib_http.dart deleted file mode 100644 index be230111c5b..00000000000 --- a/tests/language_2/import/config_corelib_http.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:http"; - -class Classy { - String get name => "classy http"; - String httpSpecific() => "classy http"; - String ioSpecific() => throw UnimplementedError(); -} - -bool general() => true; -bool httpSpecific() => true; -bool ioSpecific() => false; -final String name = "http"; diff --git a/tests/language_2/import/config_corelib_io.dart b/tests/language_2/import/config_corelib_io.dart deleted file mode 100644 index fe9b1e92954..00000000000 --- a/tests/language_2/import/config_corelib_io.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:io"; - -class Classy { - String get name => "classy io"; - String httpSpecific() => throw UnimplementedError(); - String ioSpecific() => "classy io"; -} - -bool general() => true; -bool httpSpecific() => false; -bool ioSpecific() => true; -final String name = "io"; diff --git a/tests/language_2/import/config_corelib_test.dart b/tests/language_2/import/config_corelib_test.dart deleted file mode 100644 index 46262c13707..00000000000 --- a/tests/language_2/import/config_corelib_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'package:expect/expect.dart'; - -import 'config_corelib_general.dart' - if (dart.library.io) 'config_corelib_io.dart' - if (dart.library.http) 'config_corelib_http.dart' as lib; - -class SubClassy extends lib.Classy { - String get superName => super.name; -} - -main() { - var io = const bool.fromEnvironment("dart.library.io"); - var http = const bool.fromEnvironment("dart.library.http"); - - var cy = new SubClassy(); - - if (io) { - Expect.isTrue(lib.general()); - Expect.equals("io", lib.name); - Expect.equals("classy io", cy.name); - - Expect.isTrue(lib.ioSpecific()); - Expect.equals("classy io", cy.ioSpecific()); - - Expect.isFalse(lib.httpSpecific()); - Expect.throws(cy.httpSpecific); - } else if (http) { - Expect.isTrue(lib.general()); - Expect.equals("http", lib.name); - Expect.equals("classy http", cy.name); - - Expect.isFalse(lib.ioSpecific()); - Expect.throws(cy.ioSpecific); - - Expect.isTrue(lib.httpSpecific()); - Expect.equals("classy http", cy.httpSpecific()); - } else { - Expect.isTrue(lib.general()); - Expect.equals("general", lib.name); - Expect.equals("classy general", cy.name); - - Expect.isFalse(lib.ioSpecific()); - Expect.throws(cy.ioSpecific); - - Expect.isFalse(lib.httpSpecific()); - Expect.throws(cy.httpSpecific); - } -} diff --git a/tests/language_2/import/core_no_prefix_test.dart b/tests/language_2/import/core_no_prefix_test.dart deleted file mode 100644 index 146dfd7b29c..00000000000 --- a/tests/language_2/import/core_no_prefix_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// 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 - -// Dart test program importing the core library explicitly. - -library ImportCoreNoPrefixTest.dart; - -import "dart:core"; - -main() { - print('"dart:core" imported.'); -} diff --git a/tests/language_2/import/core_prefix_test.dart b/tests/language_2/import/core_prefix_test.dart deleted file mode 100644 index 524bc9411f3..00000000000 --- a/tests/language_2/import/core_prefix_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012, 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. -// Test explicit import of dart:core in the source code.. - -// @dart = 2.9 - -library ImportCorePrefixTest.dart; - -import "package:expect/expect.dart"; -import "dart:core" as mycore; - -class Object {} - -class Map { - Map(this._lat, this._long); - - get isPrimeMeridian => _long == 0; - - var _lat; - var _long; -} - -void main() { - var test = new mycore.Map(); - mycore.bool boolval = false; - mycore.int variable = 10; - mycore.num value = 10; - mycore.dynamic d = null; - mycore.print(new mycore.Object()); - mycore.print(new Object()); - - var greenwich = new Map(51, 0); - var kpao = new Map(37, -122); - Expect.isTrue(greenwich.isPrimeMeridian); - Expect.isFalse(kpao.isPrimeMeridian); -} diff --git a/tests/language_2/import/core_test.dart b/tests/language_2/import/core_test.dart deleted file mode 100644 index 9bcd512d5f1..00000000000 --- a/tests/language_2/import/core_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2012, 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. -// Test explicit import of dart:core in the source code.. - -// @dart = 2.9 - -library ImportCoreTest.dart; - -import "dart:core"; - -void main() { - var test = new Map(); - bool value = false; - int variable = 10; - num intval = 10; -} diff --git a/tests/language_2/import/cyclic_test.dart b/tests/language_2/import/cyclic_test.dart deleted file mode 100644 index a9b188408cc..00000000000 --- a/tests/language_2/import/cyclic_test.dart +++ /dev/null @@ -1,11 +0,0 @@ - -// @dart = 2.9 -library CyclicImportTest; - -import 'sub/sub.dart'; - -var value = 42; - -main() { - subMain(); -} diff --git a/tests/language_2/import/duplicate_import_liba.dart b/tests/language_2/import/duplicate_import_liba.dart deleted file mode 100644 index 7913ee42231..00000000000 --- a/tests/language_2/import/duplicate_import_liba.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2012, 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 liba; - -var field; - -void method() {} - -class Class {} - -void methodOrClass() {} diff --git a/tests/language_2/import/duplicate_libb.dart b/tests/language_2/import/duplicate_libb.dart deleted file mode 100644 index 66a23796916..00000000000 --- a/tests/language_2/import/duplicate_libb.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2012, 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 libb; - -var field; - -void method() {} - -class Class {} - -class methodOrClass {} diff --git a/tests/language_2/import/duplicate_prefix_test.dart b/tests/language_2/import/duplicate_prefix_test.dart deleted file mode 100644 index f2e5c0742d7..00000000000 --- a/tests/language_2/import/duplicate_prefix_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2014, 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 - -// Importing with a duplicate prefix is allowed. - -import "duplicate_import_liba.dart" as a; -import "duplicate_libb.dart" as a; - -void main() {} diff --git a/tests/language_2/import/export1_lib.dart b/tests/language_2/import/export1_lib.dart deleted file mode 100644 index 5addb9e8b84..00000000000 --- a/tests/language_2/import/export1_lib.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2012, 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 export1_lib; - -export "dart:math" show ln10, ln2, e; - -var e = "E"; // Hides constant E from math lib. diff --git a/tests/language_2/import/hidden_import_test.dart b/tests/language_2/import/hidden_import_test.dart deleted file mode 100644 index 3d80f38e71a..00000000000 --- a/tests/language_2/import/hidden_import_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2013, 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 - -// Tests that dart: imports are implicitly hidden and cause warning on use. - -library hidden_import; - -import 'hidden_lib.dart'; -import 'hidden_lib.dart' as prefix; -import 'dart:async'; -import 'dart:async' as prefix; - -main() { - new Future(); - new prefix.Future(); -} diff --git a/tests/language_2/import/hidden_lib.dart b/tests/language_2/import/hidden_lib.dart deleted file mode 100644 index f40d422e8b3..00000000000 --- a/tests/language_2/import/hidden_lib.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2013, 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 hidden_import_lib; - -class Future {} diff --git a/tests/language_2/import/hidden_runtime_test.dart b/tests/language_2/import/hidden_runtime_test.dart deleted file mode 100644 index f3c4d7c070f..00000000000 --- a/tests/language_2/import/hidden_runtime_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Tests that dart: imports are implicitly hidden and cause warning on use. - -library hidden_import; - -import 'hidden_lib.dart'; -import 'hidden_lib.dart' as prefix; -import 'dart:async'; -import 'dart:async' as prefix; - -main() { - - -} diff --git a/tests/language_2/import/import1_lib.dart b/tests/language_2/import/import1_lib.dart deleted file mode 100644 index 5ebed89d76e..00000000000 --- a/tests/language_2/import/import1_lib.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2012, 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 import1_lib; - -int libfunc(a, b) => a + b; - -var show = 'show'; -var hide = 'hide'; - -var ugly = 'ugly'; - -class Q { - var _s; - Q(s) : _s = s; - toString() => "LQQK: '$_s'"; -} diff --git a/tests/language_2/import/internal_library_runtime_test.dart b/tests/language_2/import/internal_library_runtime_test.dart deleted file mode 100644 index d76974bb815..00000000000 --- a/tests/language_2/import/internal_library_runtime_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test that a private library cannot be accessed from outside the platform. - -library internal_library_test; - -import 'dart:core'; // This loads 'dart:_foreign_helper' and 'patch:core'. - - - - -void main() { - - -} diff --git a/tests/language_2/import/name_clash_lib1.dart b/tests/language_2/import/name_clash_lib1.dart deleted file mode 100644 index c2a3c8506ea..00000000000 --- a/tests/language_2/import/name_clash_lib1.dart +++ /dev/null @@ -1,7 +0,0 @@ -// 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. - -// @dart = 2.9 - -library clashing.nonempty.name; diff --git a/tests/language_2/import/name_clash_lib2.dart b/tests/language_2/import/name_clash_lib2.dart deleted file mode 100644 index c2a3c8506ea..00000000000 --- a/tests/language_2/import/name_clash_lib2.dart +++ /dev/null @@ -1,7 +0,0 @@ -// 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. - -// @dart = 2.9 - -library clashing.nonempty.name; diff --git a/tests/language_2/import/name_clash_test.dart b/tests/language_2/import/name_clash_test.dart deleted file mode 100644 index 7d44f02e12b..00000000000 --- a/tests/language_2/import/name_clash_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Check that a library name clash is not an error. - -import "name_clash_lib1.dart"; -import "name_clash_lib2.dart"; - -export "name_clash_lib1.dart"; -export "name_clash_lib2.dart"; - -main() {} diff --git a/tests/language_2/import/nonexisting_dart_uri_runtime_test.dart b/tests/language_2/import/nonexisting_dart_uri_runtime_test.dart deleted file mode 100644 index 3e132311da9..00000000000 --- a/tests/language_2/import/nonexisting_dart_uri_runtime_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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() {} diff --git a/tests/language_2/import/nonexisting_dart_uri_test.dart b/tests/language_2/import/nonexisting_dart_uri_test.dart deleted file mode 100644 index 1dd02ea0472..00000000000 --- a/tests/language_2/import/nonexisting_dart_uri_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2018, 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 - -import "dart:nonexisting/nonexisting.dart"; -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.URI_DOES_NOT_EXIST -// [cfe] Dart library 'dart:nonexisting/nonexisting.dart' is not available on this platform. - -main() {} diff --git a/tests/language_2/import/private_runtime_test.dart b/tests/language_2/import/private_runtime_test.dart deleted file mode 100644 index fddcf749d2d..00000000000 --- a/tests/language_2/import/private_runtime_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. -// Check that private dart:_ libraries cannot be imported. - - - -main() { - print("Done."); -} diff --git a/tests/language_2/import/private_test.dart b/tests/language_2/import/private_test.dart deleted file mode 100644 index 434ca2b5197..00000000000 --- a/tests/language_2/import/private_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2013, 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. -// Check that private dart:_ libraries cannot be imported. - -// @dart = 2.9 - -import "dart:_internal"; -// ^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.IMPORT_INTERNAL_LIBRARY -// [cfe] Can't access platform private library. - -main() { - print("Done."); -} diff --git a/tests/language_2/import/self_runtime_test.dart b/tests/language_2/import/self_runtime_test.dart deleted file mode 100644 index 03db0a5d5f4..00000000000 --- a/tests/language_2/import/self_runtime_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. -// -// Check that private names cannot be imported even if the library imports -// itself. - -library import_self; - -import "package:expect/expect.dart"; - -// Eliminate the import of the unmodified file or else the analyzer -// will generate the static error in the import_self_test_none case. - - -var _x = "The quick brown fox jumps over the dazy log"; - -main() { - -} diff --git a/tests/language_2/import/self_test.dart b/tests/language_2/import/self_test.dart deleted file mode 100644 index 6d76c26af7b..00000000000 --- a/tests/language_2/import/self_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2014, 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. -// -// Check that private names cannot be imported even if the library imports -// itself. - -// @dart = 2.9 - -library import_self; - -import "package:expect/expect.dart"; - -// Eliminate the import of the unmodified file or else the analyzer -// will generate the static error in the import_self_test_none case. -import "self_test.dart" as p; - -var _x = "The quick brown fox jumps over the dazy log"; - -main() { - p._x; - //^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_PREFIXED_NAME - // [cfe] Undefined name '_x'. -} diff --git a/tests/language_2/import/show_lib.dart b/tests/language_2/import/show_lib.dart deleted file mode 100644 index b5e7eb29114..00000000000 --- a/tests/language_2/import/show_lib.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2013, 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 import_show_lib; - -get theEnd => "http://www.endoftheinternet.com/"; diff --git a/tests/language_2/import/show_test.dart b/tests/language_2/import/show_test.dart deleted file mode 100644 index b8ac20400a7..00000000000 --- a/tests/language_2/import/show_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2013, 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 import_show_test; - -import "package:expect/expect.dart"; -import "show_lib.dart" show theEnd; - -main() { - var foo = theEnd; - Expect.equals("http://www.endoftheinternet.com/", foo); -} diff --git a/tests/language_2/import/sub/sub.dart b/tests/language_2/import/sub/sub.dart deleted file mode 100644 index 9a9899e2fd4..00000000000 --- a/tests/language_2/import/sub/sub.dart +++ /dev/null @@ -1,10 +0,0 @@ - -// @dart = 2.9 -library sub; - -import '../cyclic_test.dart'; -import 'package:expect/expect.dart'; - -subMain() { - Expect.equals(42, value); -} diff --git a/tests/language_2/import/transitive_private_library_access_test.dart b/tests/language_2/import/transitive_private_library_access_test.dart deleted file mode 100644 index 3d0e1c908a9..00000000000 --- a/tests/language_2/import/transitive_private_library_access_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2015, 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 test program to check that we can resolve unqualified identifiers - -// @dart = 2.9 - -// Import 'dart:typed_data' which internally imports 'dart:_internal'. -import 'dart:typed_data'; - -import 'package:expect/expect.dart'; - -main() { - ClassID.GetID(4); -//^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER -// [cfe] Undefined name 'ClassID'. -} diff --git a/tests/language_2/inference/accessor_ref_runtime_1_test.dart b/tests/language_2/inference/accessor_ref_runtime_1_test.dart deleted file mode 100644 index eecd4374db1..00000000000 --- a/tests/language_2/inference/accessor_ref_runtime_1_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -/*@testedFeatures=inference*/ -library test; - -class A { - B b; -} - -class B { - C get c => null; - void set c(C value) {} -} - -class C {} - -class D extends C {} - -class E extends C {} - -// Inferred type: A -var a = new A(); - -// Inferred type: C -var x = a.b.c; - -// Inferred type: C -var y = a.b.c ??= new D(); - -test() { - // Verify the types of x and y by trying to assign to them. - x = new C(); - - - - - -} - -main() {} diff --git a/tests/language_2/inference/accessor_ref_runtime_2_test.dart b/tests/language_2/inference/accessor_ref_runtime_2_test.dart deleted file mode 100644 index 73f51bf6c55..00000000000 --- a/tests/language_2/inference/accessor_ref_runtime_2_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -/*@testedFeatures=inference*/ -library test; - -class A { - B b; -} - -class B { - C get c => null; - void set c(C value) {} -} - -class C {} - -class D extends C {} - -class E extends C {} - -// Inferred type: A -var a = new A(); - -// Inferred type: C -var x = a.b.c; - -// Inferred type: C -var y = a.b.c ??= new D(); - -test() { - // Verify the types of x and y by trying to assign to them. - - x = new E(); - - - - -} - -main() {} diff --git a/tests/language_2/inference/accessor_ref_runtime_3_test.dart b/tests/language_2/inference/accessor_ref_runtime_3_test.dart deleted file mode 100644 index 589abb2ec14..00000000000 --- a/tests/language_2/inference/accessor_ref_runtime_3_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -/*@testedFeatures=inference*/ -library test; - -class A { - B b; -} - -class B { - C get c => null; - void set c(C value) {} -} - -class C {} - -class D extends C {} - -class E extends C {} - -// Inferred type: A -var a = new A(); - -// Inferred type: C -var x = a.b.c; - -// Inferred type: C -var y = a.b.c ??= new D(); - -test() { - // Verify the types of x and y by trying to assign to them. - - - - y = new C(); - - -} - -main() {} diff --git a/tests/language_2/inference/accessor_ref_runtime_4_test.dart b/tests/language_2/inference/accessor_ref_runtime_4_test.dart deleted file mode 100644 index 5e0fb2e68db..00000000000 --- a/tests/language_2/inference/accessor_ref_runtime_4_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -/*@testedFeatures=inference*/ -library test; - -class A { - B b; -} - -class B { - C get c => null; - void set c(C value) {} -} - -class C {} - -class D extends C {} - -class E extends C {} - -// Inferred type: A -var a = new A(); - -// Inferred type: C -var x = a.b.c; - -// Inferred type: C -var y = a.b.c ??= new D(); - -test() { - // Verify the types of x and y by trying to assign to them. - - - - - y = new E(); - -} - -main() {} diff --git a/tests/language_2/inference/accessor_ref_runtime_test.dart b/tests/language_2/inference/accessor_ref_runtime_test.dart deleted file mode 100644 index 3adb3acffba..00000000000 --- a/tests/language_2/inference/accessor_ref_runtime_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -/*@testedFeatures=inference*/ -library test; - -class A { - B b; -} - -class B { - C get c => null; - void set c(C value) {} -} - -class C {} - -class D extends C {} - -class E extends C {} - -// Inferred type: A -var a = new A(); - -// Inferred type: C -var x = a.b.c; - -// Inferred type: C -var y = a.b.c ??= new D(); - -test() { - // Verify the types of x and y by trying to assign to them. - - - - - - -} - -main() {} diff --git a/tests/language_2/inference/accessor_ref_test.dart b/tests/language_2/inference/accessor_ref_test.dart deleted file mode 100644 index 3a789351062..00000000000 --- a/tests/language_2/inference/accessor_ref_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2018, 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 - -/*@testedFeatures=inference*/ -library test; - -class A { - B b; -} - -class B { - C get c => null; - void set c(C value) {} -} - -class C {} - -class D extends C {} - -class E extends C {} - -// Inferred type: A -var a = new A(); - -// Inferred type: C -var x = a.b.c; - -// Inferred type: C -var y = a.b.c ??= new D(); - -test() { - // Verify the types of x and y by trying to assign to them. - x = new C(); - x = new E(); - x = new B(); - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'B' can't be assigned to a variable of type 'C'. - y = new C(); - y = new E(); - y = new B(); - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'B' can't be assigned to a variable of type 'C'. -} - -main() {} diff --git a/tests/language_2/inference/circularity_test.dart b/tests/language_2/inference/circularity_test.dart deleted file mode 100644 index 5a6087c974e..00000000000 --- a/tests/language_2/inference/circularity_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2017, 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 - -var x = () => y; -// ^ -// [analyzer] COMPILE_TIME_ERROR.TOP_LEVEL_CYCLE -// [cfe] Can't infer the type of 'x': circularity found during type inference. -var y = () => x; -// ^ -// [analyzer] COMPILE_TIME_ERROR.TOP_LEVEL_CYCLE - -void main() { - x; - y; -} diff --git a/tests/language_2/inference/inconsistent_inheritance_test.dart b/tests/language_2/inference/inconsistent_inheritance_test.dart deleted file mode 100644 index 362a5c6c062..00000000000 --- a/tests/language_2/inference/inconsistent_inheritance_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2017, 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 - -class A { - void f(Object x) {} -} - -class B { - void f(String x) {} -} - -class C extends A implements B { - void f(x) {} -} - -void main() {} diff --git a/tests/language_2/inference_update_2/no_such_method_restriction_disabled_lib.dart b/tests/language_2/inference_update_2/no_such_method_restriction_disabled_lib.dart deleted file mode 100644 index d54773d4ef4..00000000000 --- a/tests/language_2/inference_update_2/no_such_method_restriction_disabled_lib.dart +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) 2022, 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 used by `no_such_method_restriction_disabled_test.dart`. - -// @dart=2.9 - -class Interface { - static int interfaceCount = 0; - - int _privateField = 100; - - int get _privateGetter { - interfaceCount++; - return 101; - } - - set _privateSetter(int value) { - interfaceCount++; - } - - int _privateMethod() { - interfaceCount++; - return 102; - } - - int publicField = 103; - - int get publicGetter { - interfaceCount++; - return 104; - } - - set publicSetter(int value) { - interfaceCount++; - } - - int publicMethod() { - interfaceCount++; - return 105; - } - - static int getPrivateField(Interface x) => x._privateField; - - static void setPrivateField(Interface x) => x._privateField = 106; - - static int callPrivateGetter(Interface x) => x._privateGetter; - - static void callPrivateSetter(Interface x) => x._privateSetter = 107; - - static int callPrivateMethod(Interface x) => x._privateMethod(); - - static int getPublicField(Interface x) => x.publicField; - - static void setPublicField(Interface x) => x.publicField = 108; - - static int callPublicGetter(Interface x) => x.publicGetter; - - static void callPublicSetter(Interface x) => x.publicSetter = 109; - - static int callPublicMethod(Interface x) => x.publicMethod(); -} - -class Dynamic { - static int getPrivateField(dynamic x) => x._privateField; - - static void setPrivateField(dynamic x) => x._privateField = 103; - - static int callPrivateGetter(dynamic x) => x._privateGetter; - - static void callPrivateSetter(dynamic x) => x._privateSetter = 104; - - static int callPrivateMethod(dynamic x) => x._privateMethod(); - - static int getPublicField(dynamic x) => x.publicField; - - static void setPublicField(dynamic x) => x.publicField = 108; - - static int callPublicGetter(dynamic x) => x.publicGetter; - - static void callPublicSetter(dynamic x) => x.publicSetter = 109; - - static int callPublicMethod(dynamic x) => x.publicMethod(); -} - -class Nsm { - int otherNsmCount = 0; - - @override - noSuchMethod(Invocation invocation) { - return otherNsmCount++; - } -} - -class Stubs implements Interface { - int stubsNsmCount = 0; - - @override - noSuchMethod(Invocation invocation) { - return stubsNsmCount++; - } -} diff --git a/tests/language_2/inference_update_2/no_such_method_restriction_disabled_test.dart b/tests/language_2/inference_update_2/no_such_method_restriction_disabled_test.dart deleted file mode 100644 index fa1387f45a4..00000000000 --- a/tests/language_2/inference_update_2/no_such_method_restriction_disabled_test.dart +++ /dev/null @@ -1,413 +0,0 @@ -// Copyright (c) 2022, 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. - -// Tests that the behavior of forwarding stubs to call noSuchMethod is -// restricted to public members and members from the same library; forwarding -// stubs for private members from other libraries always throw. -// -// Without this, field promotion would not be sound. For example, in the code -// below, each attempt to get `_i` from an instance of class `B` would result in -// an invocation of `B.noSuchMethod`, so evaluation of `a._i` at (1) would yield -// `0`, and evaluation of `a._i` at (2) would yield `null`. -// -// main.dart: -// import 'other.dart'; -// class B implements A { -// bool b = false; -// @override -// dynamic noSuchMethod(Invocation invocation) => (b = !b) ? 0 : null; -// } -// main() => foo(new B()); -// other.dart: -// class A { -// final int? _i; -// A(this._i); -// } -// void foo(A a) { -// if (a._i != null) { // (1) -// print(a._i + 1); // (2) -// } -// } -// -// Whereas with the restriction, any attempt to get `_i` from an instance of -// class `B` would result in an exception, so the code would never reach (2). -// -// Since this behavior involves interactions among libraries, we have to think -// carefully about how it is affected by language versioning. There are two -// issues to consider: -// -// 1. Should the forwarding stub throw even if the language feature -// "inference-update-2" is disabled in the library containing the class -// that's causing the forwarding stub to be generated? We need to answer -// this question with a "yes", otherwise a class declaration in a library -// with an older language version could still ruin the soundness of field -// promotion in some other library. -// -// 2. Should the forwarding stub throw even if the language feature -// "inference-update-2" is disabled in the library containing the private -// member in question? Our answer to this question doesn't affect soundness, -// because field promotion can't happen in libraries for which the language -// feature is disabled. However, we still answer "yes", because otherwise an -// attempt to upgrade to a newer language version in one library might cause -// unexpected behavior changes in other libraries that import it, and we -// don't want that to happen. -// -// This file covers cases where the language feature "inference-update-2" is -// disabled. - -// @dart=2.9 - -import 'package:expect/expect.dart'; - -import 'no_such_method_restriction_disabled_lib.dart' as lib; - -class Interface { - static int interfaceCount = 0; - - int _privateField = 100; - - int get _privateGetter { - interfaceCount++; - return 101; - } - - set _privateSetter(int value) { - interfaceCount++; - } - - int _privateMethod() { - interfaceCount++; - return 102; - } - - int publicField = 103; - - int get publicGetter { - interfaceCount++; - return 104; - } - - set publicSetter(int value) { - interfaceCount++; - } - - int publicMethod() { - interfaceCount++; - return 105; - } - - static int getPrivateField(Interface x) => x._privateField; - - static void setPrivateField(Interface x) => x._privateField = 106; - - static int callPrivateGetter(Interface x) => x._privateGetter; - - static void callPrivateSetter(Interface x) => x._privateSetter = 107; - - static int callPrivateMethod(Interface x) => x._privateMethod(); - - static int getPublicField(Interface x) => x.publicField; - - static void setPublicField(Interface x) => x.publicField = 108; - - static int callPublicGetter(Interface x) => x.publicGetter; - - static void callPublicSetter(Interface x) => x.publicSetter = 109; - - static int callPublicMethod(Interface x) => x.publicMethod(); -} - -class Dynamic { - static int getPrivateField(dynamic x) => x._privateField; - - static void setPrivateField(dynamic x) => x._privateField = 103; - - static int callPrivateGetter(dynamic x) => x._privateGetter; - - static void callPrivateSetter(dynamic x) => x._privateSetter = 104; - - static int callPrivateMethod(dynamic x) => x._privateMethod(); - - static int getPublicField(dynamic x) => x.publicField; - - static void setPublicField(dynamic x) => x.publicField = 108; - - static int callPublicGetter(dynamic x) => x.publicGetter; - - static void callPublicSetter(dynamic x) => x.publicSetter = 109; - - static int callPublicMethod(dynamic x) => x.publicMethod(); -} - -/// The tests in this class cover the case where the members are in the same -/// library as the forwarding stubs. All member invocations should be -/// dispatched to noSuchMethod. -class Local implements Interface { - int _localNsmCount = 0; - - @override - noSuchMethod(Invocation invocation) { - return _localNsmCount++; - } - - static void testPrivate() { - var x = Local(); - Expect.equals(0, Interface.getPrivateField(x)); - Expect.equals(1, x._localNsmCount); - Interface.setPrivateField(x); - Expect.equals(2, x._localNsmCount); - Expect.equals(2, Interface.callPrivateGetter(x)); - Expect.equals(3, x._localNsmCount); - Interface.callPrivateSetter(x); - Expect.equals(4, x._localNsmCount); - Expect.equals(4, Interface.callPrivateMethod(x)); - Expect.equals(5, x._localNsmCount); - Expect.equals(0, Interface.interfaceCount); - } - - static void testPublic() { - var x = Local(); - Expect.equals(0, Interface.getPublicField(x)); - Expect.equals(1, x._localNsmCount); - Interface.setPublicField(x); - Expect.equals(2, x._localNsmCount); - Expect.equals(2, Interface.callPublicGetter(x)); - Expect.equals(3, x._localNsmCount); - Interface.callPublicSetter(x); - Expect.equals(4, x._localNsmCount); - Expect.equals(4, Interface.callPublicMethod(x)); - Expect.equals(5, x._localNsmCount); - Expect.equals(0, Interface.interfaceCount); - } - - static void testPrivateDynamic() { - var x = Local(); - Expect.equals(0, Dynamic.getPrivateField(x)); - Expect.equals(1, x._localNsmCount); - Dynamic.setPrivateField(x); - Expect.equals(2, x._localNsmCount); - Expect.equals(2, Dynamic.callPrivateGetter(x)); - Expect.equals(3, x._localNsmCount); - Dynamic.callPrivateSetter(x); - Expect.equals(4, x._localNsmCount); - Expect.equals(4, Dynamic.callPrivateMethod(x)); - Expect.equals(5, x._localNsmCount); - } - - static void testPublicDynamic() { - var x = Local(); - Expect.equals(0, Dynamic.getPublicField(x)); - Expect.equals(1, x._localNsmCount); - Dynamic.setPublicField(x); - Expect.equals(2, x._localNsmCount); - Expect.equals(2, Dynamic.callPublicGetter(x)); - Expect.equals(3, x._localNsmCount); - Dynamic.callPublicSetter(x); - Expect.equals(4, x._localNsmCount); - Expect.equals(4, Dynamic.callPublicMethod(x)); - Expect.equals(5, x._localNsmCount); - } -} - -/// The tests in this class cover the case where both noSuchMethod and the other -/// members are in the same library as the forwarding stubs, but that library is -/// not the same as the library containing this class. All member invocations -/// should be dispatched to noSuchMethod. -class RemoteStubs extends lib.Stubs { - static void testPrivate() { - var x = RemoteStubs(); - Expect.equals(0, lib.Interface.getPrivateField(x)); - Expect.equals(1, x.stubsNsmCount); - lib.Interface.setPrivateField(x); - Expect.equals(2, x.stubsNsmCount); - Expect.equals(2, lib.Interface.callPrivateGetter(x)); - Expect.equals(3, x.stubsNsmCount); - lib.Interface.callPrivateSetter(x); - Expect.equals(4, x.stubsNsmCount); - Expect.equals(4, lib.Interface.callPrivateMethod(x)); - Expect.equals(5, x.stubsNsmCount); - Expect.equals(0, lib.Interface.interfaceCount); - } - - static void testPublic() { - var x = RemoteStubs(); - Expect.equals(0, lib.Interface.getPublicField(x)); - Expect.equals(1, x.stubsNsmCount); - lib.Interface.setPublicField(x); - Expect.equals(2, x.stubsNsmCount); - Expect.equals(2, lib.Interface.callPublicGetter(x)); - Expect.equals(3, x.stubsNsmCount); - lib.Interface.callPublicSetter(x); - Expect.equals(4, x.stubsNsmCount); - Expect.equals(4, lib.Interface.callPublicMethod(x)); - Expect.equals(5, x.stubsNsmCount); - Expect.equals(0, lib.Interface.interfaceCount); - } - - static void testPrivateDynamic() { - var x = RemoteStubs(); - Expect.equals(0, lib.Dynamic.getPrivateField(x)); - Expect.equals(1, x.stubsNsmCount); - lib.Dynamic.setPrivateField(x); - Expect.equals(2, x.stubsNsmCount); - Expect.equals(2, lib.Dynamic.callPrivateGetter(x)); - Expect.equals(3, x.stubsNsmCount); - lib.Dynamic.callPrivateSetter(x); - Expect.equals(4, x.stubsNsmCount); - Expect.equals(4, lib.Dynamic.callPrivateMethod(x)); - Expect.equals(5, x.stubsNsmCount); - } - - static void testPublicDynamic() { - var x = RemoteStubs(); - Expect.equals(0, lib.Dynamic.getPublicField(x)); - Expect.equals(1, x.stubsNsmCount); - lib.Dynamic.setPublicField(x); - Expect.equals(2, x.stubsNsmCount); - Expect.equals(2, lib.Dynamic.callPublicGetter(x)); - Expect.equals(3, x.stubsNsmCount); - lib.Dynamic.callPublicSetter(x); - Expect.equals(4, x.stubsNsmCount); - Expect.equals(4, lib.Dynamic.callPublicMethod(x)); - Expect.equals(5, x.stubsNsmCount); - } -} - -/// The tests in this class cover the case where noSuchMember is local, but the -/// other members are in a different library from the forwarding stubs. All -/// public member invocations should be dispatched to noSuchMethod; all private -/// member invocations should throw. -class LocalNsm implements lib.Interface { - int _localNsmCount = 0; - - @override - noSuchMethod(Invocation invocation) { - return _localNsmCount++; - } - - static void testPrivate() { - var x = LocalNsm(); - Expect.throwsNoSuchMethodError(() => lib.Interface.getPrivateField(x)); - Expect.throwsNoSuchMethodError(() => lib.Interface.setPrivateField(x)); - Expect.throwsNoSuchMethodError(() => lib.Interface.callPrivateGetter(x)); - Expect.throwsNoSuchMethodError(() => lib.Interface.callPrivateSetter(x)); - Expect.throwsNoSuchMethodError(() => lib.Interface.callPrivateMethod(x)); - Expect.equals(0, x._localNsmCount); - Expect.equals(0, lib.Interface.interfaceCount); - } - - static void testPublic() { - var x = LocalNsm(); - Expect.equals(0, lib.Interface.getPublicField(x)); - Expect.equals(1, x._localNsmCount); - lib.Interface.setPublicField(x); - Expect.equals(2, x._localNsmCount); - Expect.equals(2, lib.Interface.callPublicGetter(x)); - Expect.equals(3, x._localNsmCount); - lib.Interface.callPublicSetter(x); - Expect.equals(4, x._localNsmCount); - Expect.equals(4, lib.Interface.callPublicMethod(x)); - Expect.equals(5, x._localNsmCount); - Expect.equals(0, lib.Interface.interfaceCount); - } - - static void testPrivateDynamic() { - var x = LocalNsm(); - Expect.throwsNoSuchMethodError(() => lib.Dynamic.getPrivateField(x)); - Expect.throwsNoSuchMethodError(() => lib.Dynamic.setPrivateField(x)); - Expect.throwsNoSuchMethodError(() => lib.Dynamic.callPrivateGetter(x)); - Expect.throwsNoSuchMethodError(() => lib.Dynamic.callPrivateSetter(x)); - Expect.throwsNoSuchMethodError(() => lib.Dynamic.callPrivateMethod(x)); - Expect.equals(0, x._localNsmCount); - } - - static void testPublicDynamic() { - var x = LocalNsm(); - Expect.equals(0, lib.Dynamic.getPublicField(x)); - Expect.equals(1, x._localNsmCount); - lib.Dynamic.setPublicField(x); - Expect.equals(2, x._localNsmCount); - Expect.equals(2, lib.Dynamic.callPublicGetter(x)); - Expect.equals(3, x._localNsmCount); - lib.Dynamic.callPublicSetter(x); - Expect.equals(4, x._localNsmCount); - Expect.equals(4, lib.Dynamic.callPublicMethod(x)); - Expect.equals(5, x._localNsmCount); - } -} - -/// The tests in this class cover the case where both noSuchMember and the other -/// members are in a different library from the forwarding stubs. All public -/// member invocations should be dispatched to noSuchMethod; all private member -/// invocations should throw. -class RemoteNsm extends lib.Nsm implements lib.Interface { - static void testPrivate() { - var x = RemoteNsm(); - Expect.throwsNoSuchMethodError(() => lib.Interface.getPrivateField(x)); - Expect.throwsNoSuchMethodError(() => lib.Interface.setPrivateField(x)); - Expect.throwsNoSuchMethodError(() => lib.Interface.callPrivateGetter(x)); - Expect.throwsNoSuchMethodError(() => lib.Interface.callPrivateSetter(x)); - Expect.throwsNoSuchMethodError(() => lib.Interface.callPrivateMethod(x)); - Expect.equals(0, x.otherNsmCount); - Expect.equals(0, lib.Interface.interfaceCount); - } - - static void testPublic() { - var x = RemoteNsm(); - Expect.equals(0, lib.Interface.getPublicField(x)); - Expect.equals(1, x.otherNsmCount); - lib.Interface.setPublicField(x); - Expect.equals(2, x.otherNsmCount); - Expect.equals(2, lib.Interface.callPublicGetter(x)); - Expect.equals(3, x.otherNsmCount); - lib.Interface.callPublicSetter(x); - Expect.equals(4, x.otherNsmCount); - Expect.equals(4, lib.Interface.callPublicMethod(x)); - Expect.equals(5, x.otherNsmCount); - Expect.equals(0, lib.Interface.interfaceCount); - } - - static void testPrivateDynamic() { - var x = RemoteNsm(); - Expect.throwsNoSuchMethodError(() => lib.Dynamic.getPrivateField(x)); - Expect.throwsNoSuchMethodError(() => lib.Dynamic.setPrivateField(x)); - Expect.throwsNoSuchMethodError(() => lib.Dynamic.callPrivateGetter(x)); - Expect.throwsNoSuchMethodError(() => lib.Dynamic.callPrivateSetter(x)); - Expect.throwsNoSuchMethodError(() => lib.Dynamic.callPrivateMethod(x)); - Expect.equals(0, x.otherNsmCount); - } - - static void testPublicDynamic() { - var x = RemoteNsm(); - Expect.equals(0, lib.Dynamic.getPublicField(x)); - Expect.equals(1, x.otherNsmCount); - lib.Dynamic.setPublicField(x); - Expect.equals(2, x.otherNsmCount); - Expect.equals(2, lib.Dynamic.callPublicGetter(x)); - Expect.equals(3, x.otherNsmCount); - lib.Dynamic.callPublicSetter(x); - Expect.equals(4, x.otherNsmCount); - Expect.equals(4, lib.Dynamic.callPublicMethod(x)); - Expect.equals(5, x.otherNsmCount); - } -} - -main() { - Local.testPrivate(); - Local.testPublic(); - Local.testPrivateDynamic(); - Local.testPublicDynamic(); - RemoteStubs.testPrivate(); - RemoteStubs.testPublic(); - RemoteStubs.testPrivateDynamic(); - RemoteStubs.testPublicDynamic(); - LocalNsm.testPrivate(); - LocalNsm.testPublic(); - LocalNsm.testPrivateDynamic(); - LocalNsm.testPublicDynamic(); - RemoteNsm.testPrivate(); - RemoteNsm.testPublic(); - RemoteNsm.testPrivateDynamic(); - RemoteNsm.testPublicDynamic(); -} diff --git a/tests/language_2/inference_update_2/no_such_method_restriction_stack_trace_lib1.dart b/tests/language_2/inference_update_2/no_such_method_restriction_stack_trace_lib1.dart deleted file mode 100644 index 1b981e4acbd..00000000000 --- a/tests/language_2/inference_update_2/no_such_method_restriction_stack_trace_lib1.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2022, 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 used by 'no_such_method_restriction_stack_trace_test.dart' - -// @dart=2.9 - -import 'no_such_method_restriction_stack_trace_lib2.dart'; - -class Test extends Nsm implements Interface {} diff --git a/tests/language_2/inference_update_2/no_such_method_restriction_stack_trace_lib2.dart b/tests/language_2/inference_update_2/no_such_method_restriction_stack_trace_lib2.dart deleted file mode 100644 index a6d6c4183ca..00000000000 --- a/tests/language_2/inference_update_2/no_such_method_restriction_stack_trace_lib2.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2022, 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 used by 'no_such_method_restriction_stack_trace_test.dart' - -// @dart=2.9 - -import 'no_such_method_restriction_stack_trace_lib2.dart'; - -class Nsm { - @override - noSuchMethod(Invocation invocation) {} -} - -class Interface { - void _privateMethod() {} -} - -void callPrivateMethod(Interface x) { - x._privateMethod(); -} diff --git a/tests/language_2/inference_update_2/no_such_method_restriction_stack_trace_test.dart b/tests/language_2/inference_update_2/no_such_method_restriction_stack_trace_test.dart deleted file mode 100644 index e693e8170f5..00000000000 --- a/tests/language_2/inference_update_2/no_such_method_restriction_stack_trace_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2022, 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. - -// Tests that when a noSuchMethod forwarder throws an exception due to the fact -// that the forwarding stub is for a private member of another library, the -// resulting stack trace points to the class for which the noSuchMethod -// forwarder was created. - -// @dart=2.9 - -import 'package:expect/expect.dart'; - -import 'no_such_method_restriction_stack_trace_lib1.dart'; -import 'no_such_method_restriction_stack_trace_lib2.dart'; - -main() { - try { - callPrivateMethod(Test()); - } on NoSuchMethodError catch (e, st) { - var stackString = st.toString(); - if (stackString.contains('.js:') || !stackString.contains('.dart')) { - // Obfuscated stacktrace. We don't expect to be able to resolve Dart - // files from this stack trace, so just let the test pass. - // - // Note: it's not sufficient to check for the absence of `.dart` in the - // stacktrace, because obfuscated JavaScript stacktraces often contain - // `self.dartMainRunner`. - } else { - Expect.contains( - 'no_such_method_restriction_stack_trace_lib1.dart', stackString); - } - } -} diff --git a/tests/language_2/initializer_assert/README.md b/tests/language_2/initializer_assert/README.md deleted file mode 100644 index 44d18b33447..00000000000 --- a/tests/language_2/initializer_assert/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Feature tests for assert in initializer lists - -This directory was created in order to hold tests pertaining to the Dart -feature which allows an assertion (`assert(...)`) to occur in the -initializer list of a constructor, including `const` constructors. For -more details, please check the -[language specification update](https://github.com/dart-lang/sdk/commit/609d26a2274ccde0f74725f4df7e081ebc8ea020). diff --git a/tests/language_2/initializing_formal/access_test.dart b/tests/language_2/initializing_formal/access_test.dart deleted file mode 100644 index 4db10c1fdfc..00000000000 --- a/tests/language_2/initializing_formal/access_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -class C { - final int x; - final int y; - - const C.constant(this.x) : y = x + 1; - - C(this.x) : y = x + 1 { - int z = x + 2; - assert(z == y + 1); - } -} - -main() { - C c = new C(2); - Expect.equals(c.x, 2); - Expect.equals(c.y, 3); - const C cc = const C.constant(4); - Expect.equals(cc.x, 4); - Expect.equals(cc.y, 5); -} diff --git a/tests/language_2/initializing_formal/capture_test.dart b/tests/language_2/initializing_formal/capture_test.dart deleted file mode 100644 index 3eb86f60ab5..00000000000 --- a/tests/language_2/initializing_formal/capture_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -class A { - var x, y; - A(this.x) : y = (() => x); -} - -main() { - A a = new A(2); - a.x = 3; - Expect.equals(a.x, 3); - Expect.equals(a.y(), 2); -} diff --git a/tests/language_2/initializing_formal/final_test.dart b/tests/language_2/initializing_formal/final_test.dart deleted file mode 100644 index e780a89923b..00000000000 --- a/tests/language_2/initializing_formal/final_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -class A { - var x, y; - // This should cause an error because `x` is final when accessed as an - // initializing formal. - A(this.x) - : y = (() { - x = 3; -// ^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL -// [cfe] Can't assign to the final variable 'x'. - }); -} - -main() {} diff --git a/tests/language_2/initializing_formal/promotion_test.dart b/tests/language_2/initializing_formal/promotion_test.dart deleted file mode 100644 index bde1d8b6d56..00000000000 --- a/tests/language_2/initializing_formal/promotion_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -class B {} - -class A { - B x, y; - // Promotion occurs for the initializing formal because C <: B. - A(this.x) : y = (x is C) ? x.x : x; -} - -class C extends A implements B { - C(B x) : super(x); -} - -main() { - C c = new C(null); - C cc = new C(c); - Expect.equals(c.y, null); - Expect.equals(cc.y, null); -} diff --git a/tests/language_2/initializing_formal/scope_test.dart b/tests/language_2/initializing_formal/scope_test.dart deleted file mode 100644 index c94bf59050f..00000000000 --- a/tests/language_2/initializing_formal/scope_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -// Duplicate definition checks for `this.x` will check the scopes associated -// with the constructor, not all enclosing scopes; so this is not a conflict. -var x; - -class A { - var x; - A(this.x) { - // In the body the field is in scope, not the initializing formal; - // so we can use the setter. - x += 1; - } -} - -main() { - A a = new A(2); - Expect.equals(a.x, 3); -} diff --git a/tests/language_2/initializing_formal/type_annotation_runtime_test.dart b/tests/language_2/initializing_formal/type_annotation_runtime_test.dart deleted file mode 100644 index 5f5b0b7129c..00000000000 --- a/tests/language_2/initializing_formal/type_annotation_runtime_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -// Testing the static checks for type annotations on initializing formals. - -class C { - num a; - C.sameType(num this.a); - C.subType(int this.a); - - -} - -main() { - new C.sameType(3.14); - new C.subType(42); - - -} diff --git a/tests/language_2/initializing_formal/type_annotation_test.dart b/tests/language_2/initializing_formal/type_annotation_test.dart deleted file mode 100644 index 312baab0be5..00000000000 --- a/tests/language_2/initializing_formal/type_annotation_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2017, 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 - -// Testing the static checks for type annotations on initializing formals. - -class C { - num a; - C.sameType(num this.a); - C.subType(int this.a); - C.superType(dynamic this.a); - // ^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE - // ^ - // [cfe] The type of parameter 'a', 'dynamic' is not a subtype of the corresponding field's type, 'num'. - C.unrelatedType(String this.a); - // ^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE - // ^ - // [cfe] The type of parameter 'a', 'String' is not a subtype of the corresponding field's type, 'num'. -} - -main() { - new C.sameType(3.14); - new C.subType(42); - new C.superType([]); - new C.unrelatedType('String'); -} diff --git a/tests/language_2/initializing_formal/type_test.dart b/tests/language_2/initializing_formal/type_test.dart deleted file mode 100644 index aacb74157d2..00000000000 --- a/tests/language_2/initializing_formal/type_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -class A { - num x; - double y; - // Finding the type of an initializing formal: should cause an error - // in the initializer but not the body, because the former has type - // `int` and the latter has type `num`. - A(int this.x) : y = x { - // ^ - // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_NOT_ASSIGNABLE - // [cfe] A value of type 'int' can't be assigned to a variable of type 'double'. - y = x; - } -} - -main() { - A a = new A(null); - Expect.equals(a.x, null); - Expect.equals(a.y, null); -} diff --git a/tests/language_2/instance/call_wrong_argument_count_test.dart b/tests/language_2/instance/call_wrong_argument_count_test.dart deleted file mode 100644 index b900f948548..00000000000 --- a/tests/language_2/instance/call_wrong_argument_count_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Test mismatch in argument counts. - -class Niederhorn { - int goodCall(int a, int b, int c) { - return a + b; - } -} - -main() { - var niederhorn = Niederhorn(); - niederhorn.goodCall(1, 2, 3); - niederhorn.goodCall(1, 2, 3, 4); - // ^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS - // ^^^^^^^^^^^^ - // [cfe] Too many positional arguments: 3 allowed, but 4 found. -} diff --git a/tests/language_2/instance/compound_assignment_operator_test.dart b/tests/language_2/instance/compound_assignment_operator_test.dart deleted file mode 100644 index 922d74feac4..00000000000 --- a/tests/language_2/instance/compound_assignment_operator_test.dart +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2012, 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. -// Test correct instance compound assignment operator. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - A() : f = 2 {} - var f; - operator [](index) => f; - operator []=(index, value) => f = value; - - var _g = 0; - var gGetCount = 0; - var gSetCount = 0; - get g { - gGetCount++; - return _g; - } - - set g(value) { - gSetCount++; - _g = value; - } -} - -class B { - B() - : _a = new A(), - count = 0 {} - get a { - count++; - return _a; - } - - var _a; - var count; -} - -var globalA; -var fooCounter = 0; -foo() { - fooCounter++; - return globalA; -} - -main() { - B b = new B(); - Expect.equals(0, b.count); - Expect.equals(2, b.a.f); - Expect.equals(1, b.count); - var o = b.a; - Expect.equals(2, b.count); - b.a.f = 1; - Expect.equals(3, b.count); - Expect.equals(1, b._a.f); - b.a.f += 1; - Expect.equals(4, b.count); - Expect.equals(2, b._a.f); - - b.count = 0; - b._a.f = 2; - Expect.equals(0, b.count); - Expect.equals(2, b.a[0]); - Expect.equals(1, b.count); - o = b.a; - Expect.equals(2, b.count); - b.a[0] = 1; - Expect.equals(3, b.count); - Expect.equals(1, b._a.f); - b.a[0] += 1; - Expect.equals(4, b.count); - Expect.equals(2, b._a.f); - - b._a.g++; - Expect.equals(1, b._a.gGetCount); - Expect.equals(1, b._a.gSetCount); - Expect.equals(1, b._a._g); - - globalA = b._a; - globalA.f = 0; - foo().f += 1; - Expect.equals(1, fooCounter); - Expect.equals(1, globalA.f); -} diff --git a/tests/language_2/instance/field_initializer_test.dart b/tests/language_2/instance/field_initializer_test.dart deleted file mode 100644 index 8063b1793db..00000000000 --- a/tests/language_2/instance/field_initializer_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class A { - int x = 1; - A() {} - A.reassign() : x = 2 {} - A.reassign2(this.x) {} -} - -class B extends A { - B() : super() {} - B.reassign() : super.reassign() {} - B.reassign2() : super.reassign2(3) {} -} - -class InstanceFieldInitializerTest { - static testMain() { - Expect.equals(1, new A().x); - Expect.equals(2, new A.reassign().x); - Expect.equals(3, new A.reassign2(3).x); - - Expect.equals(1, new B().x); - Expect.equals(2, new B.reassign().x); - Expect.equals(3, new B.reassign2().x); - } -} - -main() { - InstanceFieldInitializerTest.testMain(); -} diff --git a/tests/language_2/instance/incr_deopt_test.dart b/tests/language_2/instance/incr_deopt_test.dart deleted file mode 100644 index 36a5232ee67..00000000000 --- a/tests/language_2/instance/incr_deopt_test.dart +++ /dev/null @@ -1,58 +0,0 @@ -// 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. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Check correct deoptimization of instance field increment. - -main() { - var a = new A(); - var aa = new A(); - for (int i = 0; i < 20; i++) { - a.Incr(); - myIncr(aa); - conditionalIncr(false, a); - } - Expect.equals(20, a.f); - Expect.equals(20, aa.f); - a.f = 1.0; - // Deoptimize ++ part of instance increment. - a.Incr(); - Expect.equals(2.0, a.f); - var b = new B(); - // Deoptimize getfield part of instance increment. - myIncr(b); - Expect.equals(1.0, b.f); - // Deoptimize since no type feedback was collected. - var old = a.f; - conditionalIncr(true, a); - Expect.equals(old + 1, a.f); -} - -myIncr(var a) { - a.f++; -} - -conditionalIncr(var f, var a) { - if (f) { - a.f++; - } -} - -class A { - A() : f = 0; - Incr() { - f++; - } - - var f; -} - -class B { - B() : f = 0; - var f; -} diff --git a/tests/language_2/instance/inline_test.dart b/tests/language_2/instance/inline_test.dart deleted file mode 100644 index 406752ba59c..00000000000 --- a/tests/language_2/instance/inline_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test inlining of assignments in parameter passing. If [StringScanner.charAt] -// is inlined, the argument expression `++byteOffset` should not be duplicated. - -class StringScanner { - final String string; - int byteOffset = -1; - - StringScanner(this.string); - - int nextByte() => charAt(++byteOffset); - - int charAt(index) => (string.length > index) ? string.codeUnitAt(index) : -1; -} - -void main() { - var scanner = new StringScanner('az9'); - Expect.equals(0x61, scanner.nextByte()); // Expect a. - Expect.equals(0x7A, scanner.nextByte()); // Expect z. - Expect.equals(0x39, scanner.nextByte()); // Expect 9. - Expect.equals(-1, scanner.nextByte()); -} diff --git a/tests/language_2/instance/method2_test.dart b/tests/language_2/instance/method2_test.dart deleted file mode 100644 index 620ae2bf997..00000000000 --- a/tests/language_2/instance/method2_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Check that we correctly flag the use of an instance method (as a closure) -/// from a static method. - -class Goofy { - String instMethod() { - return "woof"; - } - - static Function bark() { - return instMethod; - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INSTANCE_MEMBER_ACCESS_FROM_STATIC - // [cfe] Undefined name 'instMethod'. - } -} - -main() { - var s = Goofy.bark(); -} diff --git a/tests/language_2/instance/method_test.dart b/tests/language_2/instance/method_test.dart deleted file mode 100644 index 9ac86ac25e2..00000000000 --- a/tests/language_2/instance/method_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Check that we correctly flag the use of an instance method from a static -/// method. - -class Goofy { - String instMethod() { - return "woof"; - } - - static String bark() { - return instMethod(); - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INSTANCE_MEMBER_ACCESS_FROM_STATIC - // [cfe] Method not found: 'instMethod'. - } -} - -main() { - Goofy.bark(); -} diff --git a/tests/language_2/instantiate_to_bound/README.md b/tests/language_2/instantiate_to_bound/README.md deleted file mode 100644 index a015f2ed696..00000000000 --- a/tests/language_2/instantiate_to_bound/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Feature tests for instantiation to bounds, and super-bounded types - -This directory was created in order to hold tests pertaining to the -Dart feature _instantiate to bound_, which provides inference of -default values for omitted type arguments. In order to handle -F-bounded type parameters without introducing infinite types, this -feature relies on another feature, _super-bounded types_, which is -therefore also in focus for tests in this directory. For more details, -please check the feature specifications on -[super-bounded types](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/super-bounded-types.md) -and on -[instantiate to bound](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/instantiate-to-bound.md). \ No newline at end of file diff --git a/tests/language_2/interceptor/interceptor2_test.dart b/tests/language_2/interceptor/interceptor2_test.dart deleted file mode 100644 index 9233e294d06..00000000000 --- a/tests/language_2/interceptor/interceptor2_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Regression test for issue http://dartbug.com/6903: dart2js used to -// not generate an interceptor forwarder when a getter call and a -// method call on an intercepted method were both used. - -class A { - get iterator => () => 499; -} - -main() { - var a = [ - new A(), - [1, 1] - ]; - Expect.equals(499, a[0].iterator()); - Expect.equals(499, (a[0].iterator)()); - for (var i in a[1]) { - Expect.equals(1, i); - } -} diff --git a/tests/language_2/interceptor/interceptor3_test.dart b/tests/language_2/interceptor/interceptor3_test.dart deleted file mode 100644 index 6c688b000c6..00000000000 --- a/tests/language_2/interceptor/interceptor3_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test that code motion in the presence of interceptors work in dart2js. - -main() { - var a = [2, '2']; - var b = a[1]; - if (a[0] == 2 && b is String) { - Expect.isTrue(b.contains('2')); - } else { - b.isEven(); - } -} diff --git a/tests/language_2/interceptor/interceptor4_test.dart b/tests/language_2/interceptor/interceptor4_test.dart deleted file mode 100644 index c8d1f41fb43..00000000000 --- a/tests/language_2/interceptor/interceptor4_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test that dart2js gets the right interceptor for an int. - -main() { - var a = [1]; - var b = a[0]; - Expect.equals('1', b.toString()); - Expect.isTrue(b.isOdd); -} diff --git a/tests/language_2/interceptor/interceptor5_test.dart b/tests/language_2/interceptor/interceptor5_test.dart deleted file mode 100644 index 190b5a17d85..00000000000 --- a/tests/language_2/interceptor/interceptor5_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -get X => [() => 123]; - -main() { - Expect.equals(123, X.last()); -} diff --git a/tests/language_2/interceptor/interceptor7_test.dart b/tests/language_2/interceptor/interceptor7_test.dart deleted file mode 100644 index 0f968abfdd7..00000000000 --- a/tests/language_2/interceptor/interceptor7_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that dart2js uses the right interceptor when call a method on -// something that has type number. - -import 'package:expect/expect.dart'; - -var array = []; - -main() { - array.add(false); - dynamic x = array[0] ? 1.5 : 2; - Expect.isTrue(x.isEven); -} diff --git a/tests/language_2/interceptor/interceptor8_test.dart b/tests/language_2/interceptor/interceptor8_test.dart deleted file mode 100644 index 2d78fbb66f5..00000000000 --- a/tests/language_2/interceptor/interceptor8_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js whose codegen used to not consider a double -// could be instantiated when doing int / int. - -var a = [5, 2]; - -main() { - print(a[0] / a[1]); -} diff --git a/tests/language_2/interceptor/interceptor9_test.dart b/tests/language_2/interceptor/interceptor9_test.dart deleted file mode 100644 index 1d59f35e211..00000000000 --- a/tests/language_2/interceptor/interceptor9_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2014, 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 - -// Regression test for dart2js whose codegen in some cases did not take is -// tests into account when computing the set of classes for interceptors. -// See http://dartbug.com/17325 - -import "package:expect/expect.dart"; -import "dart:typed_data"; - -confuse(x, [y = null]) => new DateTime.now().day == 42 ? y : x; - -boom() { - var x = confuse(new Uint8List(22), ""); - Expect.isTrue(x is Uint8List); - x.startsWith("a"); - x.endsWith("u"); -} - -main() { - try { - var f; - if (confuse(true)) { - // prevent inlining - f = boom; - } - f(); - } catch (e) { - if (e is ExpectException) throw e; - } -} diff --git a/tests/language_2/interceptor/interceptor_test.dart b/tests/language_2/interceptor/interceptor_test.dart deleted file mode 100644 index 3da812ebca8..00000000000 --- a/tests/language_2/interceptor/interceptor_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test that interceptors (that is, methods in classes implemented as -// JavaScript primitives) in dart2js work. - -class A { - codeUnitAt(a) => a; -} - -main() { - var res = [[], 1, 'foo', new A()]; - Expect.throws(() => res[0].codeUnitAt(1)); - Expect.throws(() => (res[0].codeUnitAt)(1)); - - Expect.throws(() => res[1].codeUnitAt(1)); - Expect.throws(() => (res[1].codeUnitAt)(1)); - - Expect.equals(111, res[2].codeUnitAt(1)); - Expect.equals(111, (res[2].codeUnitAt)(1)); - Expect.throws(() => res[2].codeUnitAt(1, 4)); - Expect.throws(() => res[2].codeUnitAt()); - Expect.throws(() => (res[2].codeUnitAt)(1, 4)); - Expect.throws(() => (res[2].codeUnitAt)()); - - Expect.equals(1, res[3].codeUnitAt(1)); - Expect.equals(1, (res[3].codeUnitAt)(1)); - Expect.throws(() => res[3].codeUnitAt(1, 4)); - Expect.throws(() => res[3].codeUnitAt()); - Expect.throws(() => (res[3].codeUnitAt)(1, 4)); - Expect.throws(() => (res[3].codeUnitAt)()); -} diff --git a/tests/language_2/interface/constants_test.dart b/tests/language_2/interface/constants_test.dart deleted file mode 100644 index 88f25a9745e..00000000000 --- a/tests/language_2/interface/constants_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -abstract class Constants { - static const int FIVE = 5; -} - -class InterfaceConstantsTest { - InterfaceConstantsTest() {} - - static void testMain() { - Expect.equals(5, Constants.FIVE); - } -} - -main() { - InterfaceConstantsTest.testMain(); -} diff --git a/tests/language_2/interface/cycle_test.dart b/tests/language_2/interface/cycle_test.dart deleted file mode 100644 index defd898d79c..00000000000 --- a/tests/language_2/interface/cycle_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2012, 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. -// Check fail because of cycles in super interface relationship. - -// @dart = 2.9 - -class C implements B {} - -class A implements B {} - -class B - implements A // //# 01: compile-time error - implements A // //# 02: compile-time error -{} - -main() { - new C(); // //# 01: continued - []; // //# 02: continued -} diff --git a/tests/language_2/interface/duplicate_implements_test.dart b/tests/language_2/interface/duplicate_implements_test.dart deleted file mode 100644 index a5b00151a98..00000000000 --- a/tests/language_2/interface/duplicate_implements_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012, 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. -// Check that duplicate types in implements/extends list are -// compile-time errors. - -// @dart = 2.9 - -abstract class I {} - -abstract class J {} - -abstract class K {} - -class X implements I, J, I { } // //# 01: compile-time error -class X implements J, I, K, K { } // //# 02: compile-time error - -abstract class Z implements I, J, J { } // //# 03: compile-time error -abstract class Z implements K, K { } // //# 04: compile-time error - -main() { - X x = new X(); // //# 01: continued - X x = new X(); // //# 02: continued - Z z = new Z(); // //# 03: continued - Z z = new Z(); // //# 04: continued -} diff --git a/tests/language_2/interface/duplicate_interface_implements_runtime_test.dart b/tests/language_2/interface/duplicate_interface_implements_runtime_test.dart deleted file mode 100644 index 53272e55641..00000000000 --- a/tests/language_2/interface/duplicate_interface_implements_runtime_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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 "duplicate_interface_lib.dart" as alib; -import "duplicate_interface_lib.dart" show InterfA; - -// Expect error since InterfA and alib.InterfA refer to the same interface. -class Foo implements InterfA - -{} - -main() { - new Foo(); -} diff --git a/tests/language_2/interface/duplicate_interface_implements_test.dart b/tests/language_2/interface/duplicate_interface_implements_test.dart deleted file mode 100644 index 066a2fcdf48..00000000000 --- a/tests/language_2/interface/duplicate_interface_implements_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2013, 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 - -import "duplicate_interface_lib.dart" as alib; -import "duplicate_interface_lib.dart" show InterfA; - -// Expect error since InterfA and alib.InterfA refer to the same interface. -class Foo implements InterfA - , alib.InterfA - //^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.IMPLEMENTS_REPEATED - // [cfe] 'InterfA' can only be implemented once. -{} - -main() { - new Foo(); -} diff --git a/tests/language_2/interface/duplicate_interface_lib.dart b/tests/language_2/interface/duplicate_interface_lib.dart deleted file mode 100644 index 8ddb8294a68..00000000000 --- a/tests/language_2/interface/duplicate_interface_lib.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2013, 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. -// Check fail because of cycles in super class relationship. - -// @dart = 2.9 - -library Interface_Lib; - -class InterfA {} - -class InterfB {} diff --git a/tests/language_2/interface/duplicate_interface_test.dart b/tests/language_2/interface/duplicate_interface_test.dart deleted file mode 100644 index b36a2a18330..00000000000 --- a/tests/language_2/interface/duplicate_interface_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2013, 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. -// Check fail because of cycles in super class relationship. - -// @dart = 2.9 - -library duplicateInterfaceTest; - -import 'package:expect/expect.dart'; -import "duplicate_interface_lib.dart" as alib; - -class InterfB {} - -// Ok since InterfB and alib.InterfB are not the same interface -class Foo implements InterfB, alib.InterfB {} - -main() { - Expect.isTrue(new Foo() is InterfB); - Expect.isTrue(new Foo() is alib.InterfB); -} diff --git a/tests/language_2/interface/implements_futureor_runtime_test.dart b/tests/language_2/interface/implements_futureor_runtime_test.dart deleted file mode 100644 index 898410b6a69..00000000000 --- a/tests/language_2/interface/implements_futureor_runtime_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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:async'; - -class A - -{} - -void main() { - A a = new A(); -} diff --git a/tests/language_2/interface/implements_futureor_test.dart b/tests/language_2/interface/implements_futureor_test.dart deleted file mode 100644 index a2984d23956..00000000000 --- a/tests/language_2/interface/implements_futureor_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -class A implements FutureOr {} -// ^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE -// ^ -// [cfe] The type 'FutureOr' can't be used in an 'implements' clause. - -void main() { - A a = new A(); -} diff --git a/tests/language_2/interface/inherit_field_test.dart b/tests/language_2/interface/inherit_field_test.dart deleted file mode 100644 index 9451ee567a5..00000000000 --- a/tests/language_2/interface/inherit_field_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012, 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 - -// Test that it is legal to override a field with a field in an interface. - -abstract class IA { - final int foo; - IA(this.foo); -} - -abstract class IB implements IA { - final int foo; - IB(this.foo); -} - -class B implements IB { - int _f = 123; - int get foo => _f; -} - -main() { - IB b = new B(); - print('b.foo = ${b.foo}'); -} diff --git a/tests/language_2/interface/injection1_runtime_test.dart b/tests/language_2/interface/injection1_runtime_test.dart deleted file mode 100644 index 4e590c84f85..00000000000 --- a/tests/language_2/interface/injection1_runtime_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -// The removed language feature "interface injection" is now a syntax error. - -import "package:expect/expect.dart"; - -abstract class S { } -abstract class I { } - - -class C implements I { } - -main() { - Expect.isFalse(new C() is S); -} diff --git a/tests/language_2/interface/injection1_test.dart b/tests/language_2/interface/injection1_test.dart deleted file mode 100644 index 0239efcdbf3..00000000000 --- a/tests/language_2/interface/injection1_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2012, 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 - -// The removed language feature "interface injection" is now a syntax error. - -import "package:expect/expect.dart"; - -abstract class S { } -abstract class I { } -abstract class I implements S; -// ^ -// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION -// [cfe] 'I' is already declared in this scope. -// ^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_BODY -// [cfe] A class declaration must have a body, even if it is empty. -// ^ -// [analyzer] SYNTACTIC_ERROR.UNEXPECTED_TOKEN -// [cfe] Unexpected token ';'. - -class C implements I { } -// ^ -// [cfe] 'I' isn't a type. - -main() { - Expect.isFalse(new C() is S); -} diff --git a/tests/language_2/interface/injection2_runtime_test.dart b/tests/language_2/interface/injection2_runtime_test.dart deleted file mode 100644 index fd89b6a8540..00000000000 --- a/tests/language_2/interface/injection2_runtime_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -// The removed language feature "interface injection" is now a syntax error. - -import "package:expect/expect.dart"; - -abstract class S { } -class C { } - - -main() { - Expect.isFalse(new C() is S); -} diff --git a/tests/language_2/interface/injection2_test.dart b/tests/language_2/interface/injection2_test.dart deleted file mode 100644 index 606d1951e68..00000000000 --- a/tests/language_2/interface/injection2_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2012, 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 - -// The removed language feature "interface injection" is now a syntax error. - -import "package:expect/expect.dart"; - -abstract class S { } -class C { } -class C implements S; -// ^ -// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION -// [cfe] 'C' is already declared in this scope. -// ^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_BODY -// [cfe] A class declaration must have a body, even if it is empty. -// ^ -// [analyzer] SYNTACTIC_ERROR.UNEXPECTED_TOKEN -// [cfe] Unexpected token ';'. - -main() { - Expect.isFalse(new C() is S); - // ^ - // [cfe] Couldn't find constructor 'C'. -} diff --git a/tests/language_2/interface/interface2_test.dart b/tests/language_2/interface/interface2_test.dart deleted file mode 100644 index fb7140ab02c..00000000000 --- a/tests/language_2/interface/interface2_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// A class must implement a known interface. - -class Interface2NegativeTest implements BooHoo {} -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.IMPLEMENTS_NON_CLASS -// [cfe] Type 'BooHoo' not found. - -main() { - Interface2NegativeTest(); -} diff --git a/tests/language_2/interface/interface_test.dart b/tests/language_2/interface/interface_test.dart deleted file mode 100644 index 61033fe3629..00000000000 --- a/tests/language_2/interface/interface_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing Interfaces. - -// @dart = 2.9 - -abstract class Ai { - int foo(); -} - -abstract class Bi implements Ai { - factory Bi() = InterfaceTest; - // ^ - // [cfe] Factory redirects to class 'InterfaceTest', which is abstract and can't be instantiated. - // ^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_ABSTRACT_CLASS_CONSTRUCTOR -} - -abstract class Simple implements Ai {} - -abstract class Aai {} - -abstract class Abi {} - -abstract class Bar {} - -abstract class Foo implements Bar {} - -abstract class Baz implements Bar, Foo {} - -abstract class InterfaceTest implements Ai, Aai, Abi, Baz, Bi { - var f; - - InterfaceTest() {} - int foo() { - return 1; - } - - // intentionally unimplemented methods - beta(); // Abstract. - String beta1(); // Abstract. - String beta2(double d); // Abstract. -} - -main() { - new Bi(); -} diff --git a/tests/language_2/interface/runtime_test.dart b/tests/language_2/interface/runtime_test.dart deleted file mode 100644 index 8570fc72383..00000000000 --- a/tests/language_2/interface/runtime_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 test program for testing Interfaces. - -abstract class Ai { - int foo(); -} - -abstract class Bi implements Ai { - -} - -abstract class Simple implements Ai {} - -abstract class Aai {} - -abstract class Abi {} - -abstract class Bar {} - -abstract class Foo implements Bar {} - -abstract class Baz implements Bar, Foo {} - -abstract class InterfaceTest implements Ai, Aai, Abi, Baz, Bi { - var f; - - InterfaceTest() {} - int foo() { - return 1; - } - - // intentionally unimplemented methods - beta(); // Abstract. - String beta1(); // Abstract. - String beta2(double d); // Abstract. -} - -main() { - -} diff --git a/tests/language_2/interface/static_method_test.dart b/tests/language_2/interface/static_method_test.dart deleted file mode 100644 index c2e27f83ca9..00000000000 --- a/tests/language_2/interface/static_method_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// 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. - -// @dart = 2.9 - -abstract class A { - static void foo(); - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_FUNCTION_BODY - // [cfe] Expected a function body or '=>'. -} - -main() { - A(); -//^ -// [analyzer] COMPILE_TIME_ERROR.INSTANTIATE_ABSTRACT_CLASS -// [cfe] The class 'A' is abstract and can't be instantiated. -} diff --git a/tests/language_2/invalid_returns/README.md b/tests/language_2/invalid_returns/README.md deleted file mode 100644 index 7ab657e49f3..00000000000 --- a/tests/language_2/invalid_returns/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# Feature tests for invalid returns - -This directory holds tests for valid and invalid returns from functions. See -the -[feature specification](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/generalized-void.md) for -details, or the formal spec once integrated. diff --git a/tests/language_2/invalid_returns/async_invalid_return_00_test.dart b/tests/language_2/invalid_returns/async_invalid_return_00_test.dart deleted file mode 100644 index 6cc0bddb490..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_00_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return;` is an error if `flatten(T)` is not `void`, `dynamic`, or `Null` -*/ -Object test() async { - return; //# none: static type warning -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_01_test.dart b/tests/language_2/invalid_returns/async_invalid_return_01_test.dart deleted file mode 100644 index b4efc34b106..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_01_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return;` is an error if `flatten(T)` is not `void`, `dynamic`, or `Null` -*/ -Future test() async { - return; //# none: static type warning -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_02_test.dart b/tests/language_2/invalid_returns/async_invalid_return_02_test.dart deleted file mode 100644 index dab4a779de8..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_02_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return;` is an error if `flatten(T)` is not `void`, `dynamic`, or `Null` -*/ -FutureOr test() async { - return; //# none: static type warning -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_03_test.dart b/tests/language_2/invalid_returns/async_invalid_return_03_test.dart deleted file mode 100644 index 3974975b040..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_03_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return;` is an error if `flatten(T)` is not `void`, `dynamic`, or `Null` -*/ -Future test() async { - return; //# none: static type warning -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_04_test.dart b/tests/language_2/invalid_returns/async_invalid_return_04_test.dart deleted file mode 100644 index b3dae4e96c8..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_04_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return;` is an error if `flatten(T)` is not `void`, `dynamic`, or `Null` -*/ -FutureOr test() async { - return; //# none: static type warning -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_05_test.dart b/tests/language_2/invalid_returns/async_invalid_return_05_test.dart deleted file mode 100644 index 63e7d93cf8c..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_05_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `flatten(T)` is - `void` and `flatten(S)` is not `void`, `dynamic`, or `Null` -*/ -int v = null; -void test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] Can't return a value from a void function. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_08_test.dart b/tests/language_2/invalid_returns/async_invalid_return_08_test.dart deleted file mode 100644 index ef8ee9767e6..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_08_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `flatten(T)` is - `void` and `flatten(S)` is not `void`, `dynamic`, or `Null` -*/ -Object v = null; -void test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] Can't return a value from a void function. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_11_test.dart b/tests/language_2/invalid_returns/async_invalid_return_11_test.dart deleted file mode 100644 index 466ea780ffc..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_11_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `flatten(T)` is - `void` and `flatten(S)` is not `void`, `dynamic`, or `Null` -*/ -Future v = null; -void test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] Can't return a value from a void function. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_14_test.dart b/tests/language_2/invalid_returns/async_invalid_return_14_test.dart deleted file mode 100644 index b511d2752f8..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_14_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `flatten(T)` is - `void` and `flatten(S)` is not `void`, `dynamic`, or `Null` -*/ -FutureOr v = null; -void test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] Can't return a value from a void function. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_17_test.dart b/tests/language_2/invalid_returns/async_invalid_return_17_test.dart deleted file mode 100644 index f932b310210..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_17_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `flatten(T)` is - `void` and `flatten(S)` is not `void`, `dynamic`, or `Null` -*/ -Future v = null; -void test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] Can't return a value from a void function. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_20_test.dart b/tests/language_2/invalid_returns/async_invalid_return_20_test.dart deleted file mode 100644 index a085998e729..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_20_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `flatten(T)` is - `void` and `flatten(S)` is not `void`, `dynamic`, or `Null` -*/ -FutureOr v = null; -void test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] Can't return a value from a void function. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_23_test.dart b/tests/language_2/invalid_returns/async_invalid_return_23_test.dart deleted file mode 100644 index 80b9551d96d..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_23_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `flatten(S)` is - `void` and `flatten(T)` is not `void`, `dynamic`, or `Null`. -*/ -void v = null; -Object test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_24_test.dart b/tests/language_2/invalid_returns/async_invalid_return_24_test.dart deleted file mode 100644 index a5d411b93c9..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_24_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `flatten(S)` is - `void` and `flatten(T)` is not `void`, `dynamic`, or `Null`. -*/ -Future v = null; -Object test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_25_test.dart b/tests/language_2/invalid_returns/async_invalid_return_25_test.dart deleted file mode 100644 index 5229529db09..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_25_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `flatten(S)` is - `void` and `flatten(T)` is not `void`, `dynamic`, or `Null`. -*/ -FutureOr v = null; -Object test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_26_test.dart b/tests/language_2/invalid_returns/async_invalid_return_26_test.dart deleted file mode 100644 index 304fb4e344d..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_26_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `flatten(S)` is - `void` and `flatten(T)` is not `void`, `dynamic`, or `Null`. -*/ -void v = null; -Future test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_27_test.dart b/tests/language_2/invalid_returns/async_invalid_return_27_test.dart deleted file mode 100644 index 337e5adeff4..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_27_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `flatten(S)` is - `void` and `flatten(T)` is not `void`, `dynamic`, or `Null`. -*/ -Future v = null; -Future test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_28_test.dart b/tests/language_2/invalid_returns/async_invalid_return_28_test.dart deleted file mode 100644 index 5458744606a..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_28_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `flatten(S)` is - `void` and `flatten(T)` is not `void`, `dynamic`, or `Null`. -*/ -FutureOr v = null; -Future test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_29_test.dart b/tests/language_2/invalid_returns/async_invalid_return_29_test.dart deleted file mode 100644 index 8babacffcaa..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_29_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `flatten(S)` is - `void` and `flatten(T)` is not `void`, `dynamic`, or `Null`. -*/ -void v = null; -FutureOr test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_30_test.dart b/tests/language_2/invalid_returns/async_invalid_return_30_test.dart deleted file mode 100644 index 28cb5883c2f..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_30_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `flatten(S)` is - `void` and `flatten(T)` is not `void`, `dynamic`, or `Null`. -*/ -Future v = null; -FutureOr test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_31_test.dart b/tests/language_2/invalid_returns/async_invalid_return_31_test.dart deleted file mode 100644 index 0c047ffdeee..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_31_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `flatten(S)` is - `void` and `flatten(T)` is not `void`, `dynamic`, or `Null`. -*/ -FutureOr v = null; -FutureOr test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_32_test.dart b/tests/language_2/invalid_returns/async_invalid_return_32_test.dart deleted file mode 100644 index c3026bbdff3..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_32_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `flatten(S)` is - `void` and `flatten(T)` is not `void`, `dynamic`, or `Null`. -*/ -void v = null; -Future test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_33_test.dart b/tests/language_2/invalid_returns/async_invalid_return_33_test.dart deleted file mode 100644 index 3081313d3c0..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_33_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `flatten(S)` is - `void` and `flatten(T)` is not `void`, `dynamic`, or `Null`. -*/ -Future v = null; -Future test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_34_test.dart b/tests/language_2/invalid_returns/async_invalid_return_34_test.dart deleted file mode 100644 index ac370068ef9..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_34_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `flatten(S)` is - `void` and `flatten(T)` is not `void`, `dynamic`, or `Null`. -*/ -FutureOr v = null; -Future test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_35_test.dart b/tests/language_2/invalid_returns/async_invalid_return_35_test.dart deleted file mode 100644 index f1e858072a8..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_35_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `flatten(S)` is - `void` and `flatten(T)` is not `void`, `dynamic`, or `Null`. -*/ -void v = null; -FutureOr test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_36_test.dart b/tests/language_2/invalid_returns/async_invalid_return_36_test.dart deleted file mode 100644 index 59557a73783..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_36_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `flatten(S)` is - `void` and `flatten(T)` is not `void`, `dynamic`, or `Null`. -*/ -Future v = null; -FutureOr test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_37_test.dart b/tests/language_2/invalid_returns/async_invalid_return_37_test.dart deleted file mode 100644 index e67b6fa75a6..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_37_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `flatten(S)` is - `void` and `flatten(T)` is not `void`, `dynamic`, or `Null`. -*/ -FutureOr v = null; -FutureOr test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_38_test.dart b/tests/language_2/invalid_returns/async_invalid_return_38_test.dart deleted file mode 100644 index 836c9c2bd91..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_38_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if - `Future` is not assignable to `T`. -*/ -int v = null; -Future test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'Future' can't be assigned to a variable of type 'FutureOr'. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_39_test.dart b/tests/language_2/invalid_returns/async_invalid_return_39_test.dart deleted file mode 100644 index 00496a99c14..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_39_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if - `Future` is not assignable to `T`. -*/ -Future v = null; -Future test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'Future' can't be assigned to a variable of type 'FutureOr'. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_40_test.dart b/tests/language_2/invalid_returns/async_invalid_return_40_test.dart deleted file mode 100644 index 3faea6c8474..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_40_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if - `Future` is not assignable to `T`. -*/ -FutureOr v = null; -Future test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'Future' can't be assigned to a variable of type 'FutureOr'. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_41_test.dart b/tests/language_2/invalid_returns/async_invalid_return_41_test.dart deleted file mode 100644 index bbc742acf7b..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_41_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if - `Future` is not assignable to `T`. -*/ -Future> v = null; -Future test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'Future>' can't be assigned to a variable of type 'FutureOr'. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_42_test.dart b/tests/language_2/invalid_returns/async_invalid_return_42_test.dart deleted file mode 100644 index 6e84244fa63..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_42_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if - `Future` is not assignable to `T`. -*/ -int v = null; -FutureOr test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'Future' can't be assigned to a variable of type 'FutureOr'. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_43_test.dart b/tests/language_2/invalid_returns/async_invalid_return_43_test.dart deleted file mode 100644 index e2aa1dab425..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_43_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if - `Future` is not assignable to `T`. -*/ -Future v = null; -FutureOr test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'Future' can't be assigned to a variable of type 'FutureOr'. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_44_test.dart b/tests/language_2/invalid_returns/async_invalid_return_44_test.dart deleted file mode 100644 index fd0d1b2d5df..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_44_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if - `Future` is not assignable to `T`. -*/ -FutureOr v = null; -FutureOr test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'Future' can't be assigned to a variable of type 'FutureOr'. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_invalid_return_45_test.dart b/tests/language_2/invalid_returns/async_invalid_return_45_test.dart deleted file mode 100644 index f9e94d85213..00000000000 --- a/tests/language_2/invalid_returns/async_invalid_return_45_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if - `Future` is not assignable to `T`. -*/ -Future> v = null; -FutureOr test() async { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'Future>' can't be assigned to a variable of type 'FutureOr'. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/async_valid_returns_test.dart b/tests/language_2/invalid_returns/async_valid_returns_test.dart deleted file mode 100644 index 4c7db334bc5..00000000000 --- a/tests/language_2/invalid_returns/async_valid_returns_test.dart +++ /dev/null @@ -1,513 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -void vv = null; -dynamic vd = null; -Object vo = null; -Null vn = null; -int vi = null; -Future fvv = null; -Future fvd = null; -Future fvo = null; -Future fvn = null; -Future fvi = null; -FutureOr fovv = null; -FutureOr fovd = null; -FutureOr fovo = null; -FutureOr fovn = null; -FutureOr fovi = null; - -/* Test the cases where expression bodied functions are more permissive - * than block bodied functions (places where they behave the same - * are tested below). - -An asynchronous expression bodied function with return type `T` and return -expression `e` has a valid return if: - * `flatten(T)` is `void` - * or `return e;` is a valid return for an equivalent block bodied function - with return type `T` as defined below. -*/ - -void async_int_to_void_e() async => vi; -Future async_int_to_Future_void__e() async => vi; -FutureOr async_int_to_FutureOr_void__e() async => vi; -void async_Object_to_void_e() async => vo; -Future async_Object_to_Future_void__e() async => vo; -FutureOr async_Object_to_FutureOr_void__e() async => vo; -void async_Future_int__to_void_e() async => fvi; -Future async_Future_int__to_Future_void__e() async => fvi; -FutureOr async_Future_int__to_FutureOr_void__e() async => fvi; -void async_FutureOr_int__to_void_e() async => fovi; -Future async_FutureOr_int__to_Future_void__e() async => fovi; -FutureOr async_FutureOr_int__to_FutureOr_void__e() async => fovi; -void async_Future_Object__to_void_e() async => fvo; -Future async_Future_Object__to_Future_void__e() async => fvo; -FutureOr async_Future_Object__to_FutureOr_void__e() async => fvo; -void async_FutureOr_Object__to_void_e() async => fovo; -Future async_FutureOr_Object__to_Future_void__e() async => fovo; -FutureOr async_FutureOr_Object__to_FutureOr_void__e() async => fovo; - -/* Test the cases that apply only to block bodied functions - */ - -/* -* `return;` is a valid return if any of the following are true: - * `flatten(T)` is `void` - * `flatten(T)` is `dynamic` - * `flatten(T)` is `Null`. -*/ -Future async_empty_to_Future_void_() async { - return; -} - -Future async_empty_to_Future_dynamic_() async { - return; -} - -Future async_empty_to_Future_Null_() async { - return; -} - -FutureOr async_empty_to_FutureOr_void_() async { - return; -} - -FutureOr async_empty_to_FutureOr_dynamic_() async { - return; -} - -FutureOr async_empty_to_FutureOr_Null_() async { - return; -} - -void async_empty_to_void() async { - return; -} - -dynamic async_empty_to_dynamic() async { - return; -} - -/* Test the cases that apply to both expression bodied and block bodied - * functions - */ - -/* -* `return exp;` where `exp` has static type `S` is a valid return if: - * `flatten(S)` is `void` - * and `flatten(T)` is `void`, `dynamic` or `Null` -*/ -Future async_void_to_Future_void__e() async => vv; -Future async_void_to_Future_void_() async { - return vv; -} - -Future async_Future_void__to_Future_void__e() async => fvv; -Future async_Future_void__to_Future_void_() async { - return fvv; -} - -Future async_FutureOr_void__to_Future_void__e() async => fovv; -Future async_FutureOr_void__to_Future_void_() async { - return fovv; -} - -Future async_void_to_Future_dynamic__e() async => vv; -Future async_void_to_Future_dynamic_() async { - return vv; -} - -Future async_Future_void__to_Future_dynamic__e() async => fvv; -Future async_Future_void__to_Future_dynamic_() async { - return fvv; -} - -Future async_FutureOr_void__to_Future_dynamic__e() async => fovv; -Future async_FutureOr_void__to_Future_dynamic_() async { - return fovv; -} - -Future async_void_to_Future_Null__e() async => vv; -Future async_void_to_Future_Null_() async { - return vv; -} - -Future async_Future_void__to_Future_Null__e() async => fvv; -Future async_Future_void__to_Future_Null_() async { - return fvv; -} - -Future async_FutureOr_void__to_Future_Null__e() async => fovv; -Future async_FutureOr_void__to_Future_Null_() async { - return fovv; -} - -FutureOr async_void_to_FutureOr_void__e() async => vv; -FutureOr async_void_to_FutureOr_void_() async { - return vv; -} - -FutureOr async_Future_void__to_FutureOr_void__e() async => fvv; -FutureOr async_Future_void__to_FutureOr_void_() async { - return fvv; -} - -FutureOr async_FutureOr_void__to_FutureOr_void__e() async => fovv; -FutureOr async_FutureOr_void__to_FutureOr_void_() async { - return fovv; -} - -FutureOr async_void_to_FutureOr_dynamic__e() async => vv; -FutureOr async_void_to_FutureOr_dynamic_() async { - return vv; -} - -FutureOr async_Future_void__to_FutureOr_dynamic__e() async => fvv; -FutureOr async_Future_void__to_FutureOr_dynamic_() async { - return fvv; -} - -FutureOr async_FutureOr_void__to_FutureOr_dynamic__e() async => fovv; -FutureOr async_FutureOr_void__to_FutureOr_dynamic_() async { - return fovv; -} - -FutureOr async_void_to_FutureOr_Null__e() async => vv; -FutureOr async_void_to_FutureOr_Null_() async { - return vv; -} - -FutureOr async_Future_void__to_FutureOr_Null__e() async => fvv; -FutureOr async_Future_void__to_FutureOr_Null_() async { - return fvv; -} - -FutureOr async_FutureOr_void__to_FutureOr_Null__e() async => fovv; -FutureOr async_FutureOr_void__to_FutureOr_Null_() async { - return fovv; -} - -void async_void_to_void_e() async => vv; -void async_void_to_void() async { - return vv; -} - -void async_Future_void__to_void_e() async => fvv; -void async_Future_void__to_void() async { - return fvv; -} - -void async_FutureOr_void__to_void_e() async => fovv; -void async_FutureOr_void__to_void() async { - return fovv; -} - -dynamic async_void_to_dynamic_e() async => vv; -dynamic async_void_to_dynamic() async { - return vv; -} - -dynamic async_Future_void__to_dynamic_e() async => fvv; -dynamic async_Future_void__to_dynamic() async { - return fvv; -} - -dynamic async_FutureOr_void__to_dynamic_e() async => fovv; -dynamic async_FutureOr_void__to_dynamic() async { - return fovv; -} - -/* -* `return exp;` where `exp` has static type `S` is a valid return if: - * `flatten(T)` is `void` - * and `flatten(S)` is `void`, `dynamic` or `Null` -*/ -void async_Future_dynamic__to_void_e() async => fvd; -void async_Future_dynamic__to_void() async { - return fvd; -} - -Future async_Future_dynamic__to_Future_void__e() async => fvd; -Future async_Future_dynamic__to_Future_void_() async { - return fvd; -} - -FutureOr async_Future_dynamic__to_FutureOr_void__e() async => fvd; -FutureOr async_Future_dynamic__to_FutureOr_void_() async { - return fvd; -} - -void async_Future_Null__to_void_e() async => fvn; -void async_Future_Null__to_void() async { - return fvn; -} - -Future async_Future_Null__to_Future_void__e() async => fvn; -Future async_Future_Null__to_Future_void_() async { - return fvn; -} - -FutureOr async_Future_Null__to_FutureOr_void__e() async => fvn; -FutureOr async_Future_Null__to_FutureOr_void_() async { - return fvn; -} - -void async_FutureOr_dynamic__to_void_e() async => fovd; -void async_FutureOr_dynamic__to_void() async { - return fovd; -} - -Future async_FutureOr_dynamic__to_Future_void__e() async => fovd; -Future async_FutureOr_dynamic__to_Future_void_() async { - return fovd; -} - -FutureOr async_FutureOr_dynamic__to_FutureOr_void__e() async => fovd; -FutureOr async_FutureOr_dynamic__to_FutureOr_void_() async { - return fovd; -} - -void async_FutureOr_Null__to_void_e() async => fovn; -void async_FutureOr_Null__to_void() async { - return fovn; -} - -Future async_FutureOr_Null__to_Future_void__e() async => fovn; -Future async_FutureOr_Null__to_Future_void_() async { - return fovn; -} - -FutureOr async_FutureOr_Null__to_FutureOr_void__e() async => fovn; -FutureOr async_FutureOr_Null__to_FutureOr_void_() async { - return fovn; -} - -void async_dynamic_to_void_e() async => vd; -void async_dynamic_to_void() async { - return vd; -} - -Future async_dynamic_to_Future_void__e() async => vd; -Future async_dynamic_to_Future_void_() async { - return vd; -} - -FutureOr async_dynamic_to_FutureOr_void__e() async => vd; -FutureOr async_dynamic_to_FutureOr_void_() async { - return vd; -} - -void async_Null_to_void_e() async => vn; -void async_Null_to_void() async { - return vn; -} - -Future async_Null_to_Future_void__e() async => vn; -Future async_Null_to_Future_void_() async { - return vn; -} - -FutureOr async_Null_to_FutureOr_void__e() async => vn; -FutureOr async_Null_to_FutureOr_void_() async { - return vn; -} - -/* -* `return exp;` where `exp` has static type `S` is a valid return if: - * `T` is not `void` - * and `flatten(S)` is not `void` - * and `Future` is assignable to `T` -*/ -Future async_int_to_Future_int__e() async => vi; -Future async_int_to_Future_int_() async { - return vi; -} - -Future async_Object_to_Future_int__e() async => vo; -Future async_Object_to_Future_int_() async { - return vo; -} - -Future async_FutureOr_int__to_Future_int__e() async => fovi; -Future async_FutureOr_int__to_Future_int_() async { - return fovi; -} - -Future async_Future_int__to_Future_int__e() async => fvi; -Future async_Future_int__to_Future_int_() async { - return fvi; -} - -Future async_int_to_Future_void_() async { - return vi; -} - -Future async_Object_to_Future_void_() async { - return vo; -} - -Future async_FutureOr_int__to_Future_void_() async { - return fovi; -} - -Future async_Future_int__to_Future_void_() async { - return fvi; -} - -FutureOr async_int_to_FutureOr_void_() async { - return vi; -} - -FutureOr async_Object_to_FutureOr_void_() async { - return vo; -} - -FutureOr async_FutureOr_int__to_FutureOr_void_() async { - return fovi; -} - -FutureOr async_Future_int__to_FutureOr_void_() async { - return fvi; -} - -void main() { - async_int_to_void_e(); - async_int_to_Future_void__e(); - async_int_to_FutureOr_void__e(); - async_Object_to_void_e(); - async_Object_to_Future_void__e(); - async_Object_to_FutureOr_void__e(); - async_Future_int__to_void_e(); - async_Future_int__to_Future_void__e(); - async_Future_int__to_FutureOr_void__e(); - async_FutureOr_int__to_void_e(); - async_FutureOr_int__to_Future_void__e(); - async_FutureOr_int__to_FutureOr_void__e(); - async_Future_Object__to_void_e(); - async_Future_Object__to_Future_void__e(); - async_Future_Object__to_FutureOr_void__e(); - async_FutureOr_Object__to_void_e(); - async_FutureOr_Object__to_Future_void__e(); - async_FutureOr_Object__to_FutureOr_void__e(); - async_empty_to_Future_void_(); - async_empty_to_Future_dynamic_(); - async_empty_to_Future_Null_(); - async_empty_to_FutureOr_void_(); - async_empty_to_FutureOr_dynamic_(); - async_empty_to_FutureOr_Null_(); - async_empty_to_void(); - async_empty_to_dynamic(); - async_void_to_Future_void__e(); - async_void_to_Future_void_(); - async_Future_void__to_Future_void__e(); - async_Future_void__to_Future_void_(); - async_FutureOr_void__to_Future_void__e(); - async_FutureOr_void__to_Future_void_(); - async_void_to_Future_dynamic__e(); - async_void_to_Future_dynamic_(); - async_Future_void__to_Future_dynamic__e(); - async_Future_void__to_Future_dynamic_(); - async_FutureOr_void__to_Future_dynamic__e(); - async_FutureOr_void__to_Future_dynamic_(); - async_void_to_Future_Null__e(); - async_void_to_Future_Null_(); - async_Future_void__to_Future_Null__e(); - async_Future_void__to_Future_Null_(); - async_FutureOr_void__to_Future_Null__e(); - async_FutureOr_void__to_Future_Null_(); - async_void_to_FutureOr_void__e(); - async_void_to_FutureOr_void_(); - async_Future_void__to_FutureOr_void__e(); - async_Future_void__to_FutureOr_void_(); - async_FutureOr_void__to_FutureOr_void__e(); - async_FutureOr_void__to_FutureOr_void_(); - async_void_to_FutureOr_dynamic__e(); - async_void_to_FutureOr_dynamic_(); - async_Future_void__to_FutureOr_dynamic__e(); - async_Future_void__to_FutureOr_dynamic_(); - async_FutureOr_void__to_FutureOr_dynamic__e(); - async_FutureOr_void__to_FutureOr_dynamic_(); - async_void_to_FutureOr_Null__e(); - async_void_to_FutureOr_Null_(); - async_Future_void__to_FutureOr_Null__e(); - async_Future_void__to_FutureOr_Null_(); - async_FutureOr_void__to_FutureOr_Null__e(); - async_FutureOr_void__to_FutureOr_Null_(); - async_void_to_void_e(); - async_void_to_void(); - async_Future_void__to_void_e(); - async_Future_void__to_void(); - async_FutureOr_void__to_void_e(); - async_FutureOr_void__to_void(); - async_void_to_dynamic_e(); - async_void_to_dynamic(); - async_Future_void__to_dynamic_e(); - async_Future_void__to_dynamic(); - async_FutureOr_void__to_dynamic_e(); - async_FutureOr_void__to_dynamic(); - async_Future_dynamic__to_void_e(); - async_Future_dynamic__to_void(); - async_Future_dynamic__to_Future_void__e(); - async_Future_dynamic__to_Future_void_(); - async_Future_dynamic__to_FutureOr_void__e(); - async_Future_dynamic__to_FutureOr_void_(); - async_Future_Null__to_void_e(); - async_Future_Null__to_void(); - async_Future_Null__to_Future_void__e(); - async_Future_Null__to_Future_void_(); - async_Future_Null__to_FutureOr_void__e(); - async_Future_Null__to_FutureOr_void_(); - async_FutureOr_dynamic__to_void_e(); - async_FutureOr_dynamic__to_void(); - async_FutureOr_dynamic__to_Future_void__e(); - async_FutureOr_dynamic__to_Future_void_(); - async_FutureOr_dynamic__to_FutureOr_void__e(); - async_FutureOr_dynamic__to_FutureOr_void_(); - async_FutureOr_Null__to_void_e(); - async_FutureOr_Null__to_void(); - async_FutureOr_Null__to_Future_void__e(); - async_FutureOr_Null__to_Future_void_(); - async_FutureOr_Null__to_FutureOr_void__e(); - async_FutureOr_Null__to_FutureOr_void_(); - async_dynamic_to_void_e(); - async_dynamic_to_void(); - async_dynamic_to_Future_void__e(); - async_dynamic_to_Future_void_(); - async_dynamic_to_FutureOr_void__e(); - async_dynamic_to_FutureOr_void_(); - async_Null_to_void_e(); - async_Null_to_void(); - async_Null_to_Future_void__e(); - async_Null_to_Future_void_(); - async_Null_to_FutureOr_void__e(); - async_Null_to_FutureOr_void_(); - async_int_to_Future_int__e(); - async_int_to_Future_int_(); - async_Object_to_Future_int__e(); - async_Object_to_Future_int_(); - async_FutureOr_int__to_Future_int__e(); - async_FutureOr_int__to_Future_int_(); - async_Future_int__to_Future_int__e(); - async_Future_int__to_Future_int_(); - async_int_to_Future_void__e(); - async_int_to_Future_void_(); - async_Object_to_Future_void__e(); - async_Object_to_Future_void_(); - async_FutureOr_int__to_Future_void__e(); - async_FutureOr_int__to_Future_void_(); - async_Future_int__to_Future_void__e(); - async_Future_int__to_Future_void_(); - async_int_to_FutureOr_void__e(); - async_int_to_FutureOr_void_(); - async_Object_to_FutureOr_void__e(); - async_Object_to_FutureOr_void_(); - async_FutureOr_int__to_FutureOr_void__e(); - async_FutureOr_int__to_FutureOr_void_(); - async_Future_int__to_FutureOr_void__e(); - async_Future_int__to_FutureOr_void_(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_00_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_00_test.dart deleted file mode 100644 index e3e3316391f..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_00_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return;` is an error if `T` is not `void`, `dynamic`, or `Null` -*/ -int test() { - return; //# none: static type warning -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_01_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_01_test.dart deleted file mode 100644 index c81b1dc42f6..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_01_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return;` is an error if `T` is not `void`, `dynamic`, or `Null` -*/ -Object test() { - return; //# none: static type warning -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_02_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_02_test.dart deleted file mode 100644 index f7584a7f7a8..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_02_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return;` is an error if `T` is not `void`, `dynamic`, or `Null` -*/ -Future test() { - return; //# none: static type warning -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_03_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_03_test.dart deleted file mode 100644 index 9e972dad91b..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_03_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return;` is an error if `T` is not `void`, `dynamic`, or `Null` -*/ -FutureOr test() { - return; //# none: static type warning -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_04_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_04_test.dart deleted file mode 100644 index 8f03155f050..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_04_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return;` is an error if `T` is not `void`, `dynamic`, or `Null` -*/ -Future test() { - return; //# none: static type warning -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_05_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_05_test.dart deleted file mode 100644 index 7fbc21b23c2..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_05_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return;` is an error if `T` is not `void`, `dynamic`, or `Null` -*/ -FutureOr test() { - return; //# none: static type warning -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_06_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_06_test.dart deleted file mode 100644 index 9d26ea7aafb..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_06_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `T` is `void` and - `S` is not `void`, `dynamic`, or `Null` -*/ -int v = null; -void test() { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] Can't return a value from a void function. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_07_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_07_test.dart deleted file mode 100644 index 5d3c1663a61..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_07_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `T` is `void` and - `S` is not `void`, `dynamic`, or `Null` -*/ -Object v = null; -void test() { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] Can't return a value from a void function. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_08_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_08_test.dart deleted file mode 100644 index 6d79d3b65a8..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_08_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `T` is `void` and - `S` is not `void`, `dynamic`, or `Null` -*/ -Future v = null; -void test() { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] Can't return a value from a void function. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_09_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_09_test.dart deleted file mode 100644 index 85bf9373ed3..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_09_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `T` is `void` and - `S` is not `void`, `dynamic`, or `Null` -*/ -FutureOr v = null; -void test() { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] Can't return a value from a void function. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_10_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_10_test.dart deleted file mode 100644 index 6195019fb9d..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_10_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `T` is `void` and - `S` is not `void`, `dynamic`, or `Null` -*/ -Future v = null; -void test() { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] Can't return a value from a void function. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_11_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_11_test.dart deleted file mode 100644 index e426be93822..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_11_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `T` is `void` and - `S` is not `void`, `dynamic`, or `Null` -*/ -FutureOr v = null; -void test() { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] Can't return a value from a void function. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_12_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_12_test.dart deleted file mode 100644 index 9fbd3453bfd..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_12_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `S` is `void` and - `T` is not `void`, or `dynamic` or `Null`. -*/ -void v = null; -int test() { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_13_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_13_test.dart deleted file mode 100644 index 889e9863ab4..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_13_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `S` is `void` and - `T` is not `void`, or `dynamic` or `Null`. -*/ -void v = null; -Object test() { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_14_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_14_test.dart deleted file mode 100644 index 90efd31df7a..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_14_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `S` is `void` and - `T` is not `void`, or `dynamic` or `Null`. -*/ -void v = null; -Future test() { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_15_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_15_test.dart deleted file mode 100644 index 8ee6a812725..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_15_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `S` is `void` and - `T` is not `void`, or `dynamic` or `Null`. -*/ -void v = null; -FutureOr test() { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_16_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_16_test.dart deleted file mode 100644 index 8bc773bb679..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_16_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `S` is `void` and - `T` is not `void`, or `dynamic` or `Null`. -*/ -void v = null; -Future test() { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_17_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_17_test.dart deleted file mode 100644 index e5b4e8ffd3a..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_17_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `S` is `void` and - `T` is not `void`, or `dynamic` or `Null`. -*/ -void v = null; -FutureOr test() { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_18_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_18_test.dart deleted file mode 100644 index 2b8637edd17..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_18_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `S` is not - assignable to `T`. -*/ -int v = null; -String test() { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'int' can't be assigned to a variable of type 'String'. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_19_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_19_test.dart deleted file mode 100644 index d227e6419a2..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_19_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `S` is not - assignable to `T`. -*/ -Future v = null; -String test() { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'Future' can't be assigned to a variable of type 'String'. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_20_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_20_test.dart deleted file mode 100644 index 6664d4cc9e5..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_20_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `S` is not - assignable to `T`. -*/ -FutureOr v = null; -String test() { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'FutureOr' can't be assigned to a variable of type 'String'. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_21_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_21_test.dart deleted file mode 100644 index 2f3d58486e9..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_21_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `S` is not - assignable to `T`. -*/ -int v = null; -Future test() { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'int' can't be assigned to a variable of type 'Future'. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_22_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_22_test.dart deleted file mode 100644 index 3d3024c2b9b..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_22_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `S` is not - assignable to `T`. -*/ -Future v = null; -Future test() { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'Future' can't be assigned to a variable of type 'Future'. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_23_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_23_test.dart deleted file mode 100644 index 3cca2693ff9..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_23_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `S` is not - assignable to `T`. -*/ -FutureOr v = null; -Future test() { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'FutureOr' can't be assigned to a variable of type 'Future'. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_24_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_24_test.dart deleted file mode 100644 index aa9eeab2a94..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_24_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `S` is not - assignable to `T`. -*/ -int v = null; -FutureOr test() { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'int' can't be assigned to a variable of type 'FutureOr'. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_25_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_25_test.dart deleted file mode 100644 index 8744c10110b..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_25_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `S` is not - assignable to `T`. -*/ -Future v = null; -FutureOr test() { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'Future' can't be assigned to a variable of type 'FutureOr'. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_invalid_return_26_test.dart b/tests/language_2/invalid_returns/sync_invalid_return_26_test.dart deleted file mode 100644 index 2f220422945..00000000000 --- a/tests/language_2/invalid_returns/sync_invalid_return_26_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -/* -* `return exp;` where `exp` has static type `S` is an error if `S` is not - assignable to `T`. -*/ -FutureOr v = null; -FutureOr test() { - return v; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'FutureOr' can't be assigned to a variable of type 'FutureOr'. -} - -void main() { - test(); -} diff --git a/tests/language_2/invalid_returns/sync_valid_returns_test.dart b/tests/language_2/invalid_returns/sync_valid_returns_test.dart deleted file mode 100644 index 0cb6a2a4151..00000000000 --- a/tests/language_2/invalid_returns/sync_valid_returns_test.dart +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -void vv = null; -dynamic vd = null; -Object vo = null; -Null vn = null; -int vi = null; -Future fvv = null; -Future fvd = null; -Future fvo = null; -Future fvn = null; -Future fvi = null; -FutureOr fovv = null; -FutureOr fovd = null; -FutureOr fovo = null; -FutureOr fovn = null; -FutureOr fovi = null; - -/* Test the cases where expression bodied functions are more permissive - * than block bodied functions (places where they behave the same - * are tested below). - -A synchronous expression bodied function with return type `T` and return expression -`e` has a valid return if: - * `T` is `void` - * or `return exp;` is a valid return for an equivalent block bodied function - with return type `T` as defined below. -*/ -void sync_int_to_void_e() => vi; -void sync_Object_to_void_e() => vo; -void sync_Future_int__to_void_e() => fvi; -void sync_FutureOr_int__to_void_e() => fovi; -void sync_Future_Object__to_void_e() => fvo; -void sync_FutureOr_Object__to_void_e() => fovo; - -/* Test the cases that apply only to block bodied functions - */ - -/* -* `return;` is a valid return if any of the following are true: - * `T` is `void` - * `T` is `dynamic` - * `T` is `Null`. -*/ -void sync_empty_to_void() { - return; -} - -dynamic sync_empty_to_dynamic() { - return; -} - -Null sync_empty_to_Null() { - return; -} - -/* Test the cases that apply to both expression bodied and block bodied - * functions - */ - -/* -* `return exp;` where `exp` has static type `S` is a valid return if: - * `S` is `void` - * and `T` is `void` or `dynamic` or `Null` -*/ -void sync_void_to_void_e() => vv; -void sync_void_to_void() { - return vv; -} - -dynamic sync_void_to_dynamic_e() => vv; -dynamic sync_void_to_dynamic() { - return vv; -} - -Null sync_void_to_Null_e() => vv; -Null sync_void_to_Null() { - return vv; -} - -/* -* `return exp;` where `exp` has static type `S` is a valid return if: - * `T` is `void` - * and `S` is `void` or `dynamic` or `Null` - -*/ -void sync_dynamic_to_void_e() => vd; -void sync_dynamic_to_void() { - return vd; -} - -void sync_Null_to_void_e() => vn; -void sync_Null_to_void() { - return vn; -} - -/* -* `return exp;` where `exp` has static type `S` is a valid return if: - * `T` is not `void` - * and `S` is not `void` - * and `S` is assignable to `T` -*/ -int sync_int_to_int_e() => vi; -int sync_int_to_int() { - return vi; -} - -int sync_Object_to_int_e() => vo; -int sync_Object_to_int() { - return vo; -} - -int sync_FutureOr_int__to_int_e() => fovi; -int sync_FutureOr_int__to_int() { - return fovi; -} - -void main() { - sync_int_to_void_e(); - sync_Object_to_void_e(); - sync_Future_int__to_void_e(); - sync_FutureOr_int__to_void_e(); - sync_Future_Object__to_void_e(); - sync_FutureOr_Object__to_void_e(); - sync_empty_to_void(); - sync_empty_to_dynamic(); - sync_empty_to_Null(); - sync_void_to_void_e(); - sync_void_to_void(); - sync_void_to_dynamic_e(); - sync_void_to_dynamic(); - sync_void_to_Null_e(); - sync_void_to_Null(); - sync_dynamic_to_void_e(); - sync_dynamic_to_void(); - sync_Null_to_void_e(); - sync_Null_to_void(); - sync_int_to_int_e(); - sync_int_to_int(); - sync_Object_to_int_e(); - sync_Object_to_int(); - sync_FutureOr_int__to_int_e(); - sync_FutureOr_int__to_int(); -} diff --git a/tests/language_2/is/function_test.dart b/tests/language_2/is/function_test.dart deleted file mode 100644 index b4c9885e842..00000000000 --- a/tests/language_2/is/function_test.dart +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -var staticClosure; -int staticMethod() => 42; - -class B { - var instanceClosure; - var nullField; - int instanceMethod() => 43; -} - -checkUntyped(closure) { - Expect.isTrue(closure is Function); -} - -checkTyped(int closure()) { - Expect.isTrue(closure is Function); -} - -checkTypedNull(int closure()) { - Expect.isFalse(closure is Function); -} - -checkUntypedNull(closure) { - Expect.isFalse(closure is Function); -} - -main() { - staticClosure = () => 44; - B b = new B(); - b.instanceClosure = () => 45; - - closureStatement() => 46; - var closureExpression = () => 47; - - checkUntyped(staticClosure); - checkTyped(staticClosure); - - checkUntyped(staticMethod); - checkTyped(staticMethod); - - checkUntyped(b.instanceClosure); - checkTyped(b.instanceClosure); - - checkUntyped(b.instanceMethod); - checkTyped(b.instanceMethod); - - checkUntyped(closureStatement); - checkTyped(closureStatement); - - checkUntyped(closureExpression); - checkTyped(closureExpression); - - checkTypedNull(b.nullField); - checkUntypedNull(b.nullField); -} diff --git a/tests/language_2/is/instanceof_test.dart b/tests/language_2/is/instanceof_test.dart deleted file mode 100644 index dabf8f38f1d..00000000000 --- a/tests/language_2/is/instanceof_test.dart +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class InstanceofTest { - InstanceofTest() {} - - static void testBasicTypes() { - Expect.equals(true, 0 is int); - Expect.equals(false, (0 is bool)); - Expect.equals(false, (0 is String)); - Expect.equals(true, 1 is int); - Expect.equals(false, (1 is bool)); - Expect.equals(false, (1 is String)); - - Expect.equals(false, (true is int)); - Expect.equals(true, true is bool); - Expect.equals(false, (true is String)); - Expect.equals(false, (false is int)); - Expect.equals(true, false is bool); - Expect.equals(false, (false is String)); - - Expect.equals(false, ("a" is int)); - Expect.equals(false, ("a" is bool)); - Expect.equals(true, "a" is String); - - Expect.equals(false, ("" is int)); - Expect.equals(false, ("" is bool)); - Expect.equals(true, "" is String); - } - - static void testInterfaces() { - // Simple Cases with interfaces. - var a = new A(); - Expect.equals(true, a is I); - Expect.equals(true, a is A); - Expect.equals(false, (a is String)); - Expect.equals(false, (a is int)); - Expect.equals(false, (a is bool)); - Expect.equals(false, (a is B)); - Expect.equals(false, (a is J)); - - // Interfaces with parent - var c = new C(); - Expect.equals(true, c is I); - Expect.equals(true, c is J); - Expect.equals(true, c is K); - - var d = new D(); - Expect.equals(true, d is I); - Expect.equals(true, d is J); - Expect.equals(true, d is K); - - Expect.equals(true, [] is List); - Expect.equals(true, [1, 2, 3] is List); - Expect.equals(false, (d is List)); - Expect.equals(false, (null is List)); - Expect.equals(false, (null is D)); - } - - static void testnum() { - Expect.equals(true, 0 is num); - Expect.equals(true, 123 is num); - Expect.equals(true, 123.34 is num); - Expect.equals(false, ("123" is num)); - Expect.equals(false, (null is num)); - Expect.equals(false, (true is num)); - Expect.equals(false, (false is num)); - var a = new A(); - Expect.equals(false, (a is num)); - } - - static void testTypeOfInstanceOf() { - var a = new A(); - // Interfaces with parent - var c = new C(); - var d = new D(); - - Expect.equals(true, (null is int) is bool); - Expect.equals(true, (null is bool) is bool); - Expect.equals(true, (null is String) is bool); - Expect.equals(true, (null is A) is bool); - Expect.equals(true, (null is B) is bool); - Expect.equals(true, (null is I) is bool); - Expect.equals(true, (null is J) is bool); - - Expect.equals(true, (0 is int) is bool); - Expect.equals(true, (0 is bool) is bool); - Expect.equals(true, (0 is String) is bool); - Expect.equals(true, (0 is A) is bool); - Expect.equals(true, (0 is B) is bool); - Expect.equals(true, (0 is I) is bool); - Expect.equals(true, (0 is J) is bool); - - Expect.equals(true, (1 is int) is bool); - Expect.equals(true, (1 is bool) is bool); - Expect.equals(true, (1 is String) is bool); - Expect.equals(true, (1 is A) is bool); - Expect.equals(true, (1 is B) is bool); - Expect.equals(true, (1 is I) is bool); - Expect.equals(true, (1 is J) is bool); - - Expect.equals(true, (true is int) is bool); - Expect.equals(true, (true is bool) is bool); - Expect.equals(true, (true is String) is bool); - Expect.equals(true, (true is A) is bool); - Expect.equals(true, (true is B) is bool); - Expect.equals(true, (true is I) is bool); - Expect.equals(true, (true is J) is bool); - - Expect.equals(true, (false is int) is bool); - Expect.equals(true, (false is bool) is bool); - Expect.equals(true, (false is String) is bool); - Expect.equals(true, (false is A) is bool); - Expect.equals(true, (false is B) is bool); - Expect.equals(true, (false is I) is bool); - Expect.equals(true, (false is J) is bool); - - Expect.equals(true, ("a" is int) is bool); - Expect.equals(true, ("a" is bool) is bool); - Expect.equals(true, ("a" is String) is bool); - Expect.equals(true, ("a" is A) is bool); - Expect.equals(true, ("a" is B) is bool); - Expect.equals(true, ("a" is I) is bool); - Expect.equals(true, ("a" is J) is bool); - - Expect.equals(true, ("" is int) is bool); - Expect.equals(true, ("" is bool) is bool); - Expect.equals(true, ("" is String) is bool); - Expect.equals(true, ("" is A) is bool); - Expect.equals(true, ("" is B) is bool); - Expect.equals(true, ("" is I) is bool); - Expect.equals(true, ("" is J) is bool); - - Expect.equals(true, (a is int) is bool); - Expect.equals(true, (a is bool) is bool); - Expect.equals(true, (a is String) is bool); - Expect.equals(true, (a is A) is bool); - Expect.equals(true, (a is B) is bool); - Expect.equals(true, (a is I) is bool); - Expect.equals(true, (a is J) is bool); - - Expect.equals(true, (c is int) is bool); - Expect.equals(true, (c is bool) is bool); - Expect.equals(true, (c is String) is bool); - Expect.equals(true, (c is A) is bool); - Expect.equals(true, (c is B) is bool); - Expect.equals(true, (c is I) is bool); - Expect.equals(true, (c is J) is bool); - - Expect.equals(true, (d is int) is bool); - Expect.equals(true, (d is bool) is bool); - Expect.equals(true, (d is String) is bool); - Expect.equals(true, (d is A) is bool); - Expect.equals(true, (d is B) is bool); - Expect.equals(true, (d is I) is bool); - Expect.equals(true, (d is J) is bool); - } - - static void testMain() { - testBasicTypes(); - // TODO(sra): enable after fixing b/4604295 - // testnum(); - testInterfaces(); - testTypeOfInstanceOf(); - } -} - -abstract class I {} - -class A implements I { - A() {} -} - -class B { - B() {} -} - -abstract class J {} - -abstract class K implements J {} - -class C implements I, K { - C() {} -} - -class D extends C { - D() : super() {} -} - -main() { - // Repeat type checks so that inlined tests can be tested as well. - for (int i = 0; i < 5; i++) { - InstanceofTest.testMain(); - } -} diff --git a/tests/language_2/is/interfaces2_test.dart b/tests/language_2/is/interfaces2_test.dart deleted file mode 100644 index 01db9e2dbd4..00000000000 --- a/tests/language_2/is/interfaces2_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class C extends B {} - -class D implements C {} - -int inscrutable(int x) => (x == 0) ? 0 : (x | inscrutable(x & (x - 1))); - -main() { - var things = [new A(), new B(), new C(), new D()]; - - var a = things[inscrutable(0)]; - Expect.isTrue(a is A); - Expect.isFalse(a is B); - Expect.isFalse(a is C); - Expect.isFalse(a is D); - - var b = things[inscrutable(1)]; - Expect.isTrue(b is A); - Expect.isTrue(b is B); - Expect.isFalse(b is C); - Expect.isFalse(b is D); - - var c = things[inscrutable(2)]; - Expect.isTrue(c is A); - Expect.isTrue(c is B); - Expect.isTrue(c is C); - Expect.isFalse(c is D); - - var d = things[inscrutable(3)]; - Expect.isTrue(d is A); - Expect.isTrue(d is B); - Expect.isTrue(d is C); - Expect.isTrue(d is D); -} diff --git a/tests/language_2/is/interfaces_test.dart b/tests/language_2/is/interfaces_test.dart deleted file mode 100644 index a8d1decf2bd..00000000000 --- a/tests/language_2/is/interfaces_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class C implements B {} - -int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); - -main() { - var things = [new A(), new B(), new C()]; - - var a = things[inscrutable(0)]; - Expect.isTrue(a is A); - Expect.isFalse(a is B); - Expect.isFalse(a is C); - - var b = things[inscrutable(1)]; - Expect.isTrue(b is A); - Expect.isTrue(b is B); - Expect.isFalse(b is C); - - var c = things[inscrutable(2)]; - Expect.isTrue(c is A); - Expect.isTrue(c is B); - Expect.isTrue(c is C); -} diff --git a/tests/language_2/is/is2_test.dart b/tests/language_2/is/is2_test.dart deleted file mode 100644 index edfbc575dc2..00000000000 --- a/tests/language_2/is/is2_test.dart +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing the instanceof operation. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -abstract class I {} - -abstract class AI implements I {} - -class A implements AI { - const A(); -} - -class B implements I { - const B(); -} - -class C extends A { - const C() : super(); -} - -class InstanceofTest { - static testMain() { - var a = new A(); - var b = new B(); - var c = new C(); - var n = null; - - Expect.equals(true, a is A); - Expect.equals(true, b is B); - Expect.equals(true, c is C); - Expect.equals(true, c is A); - - Expect.equals(true, a is AI); - Expect.equals(true, a is I); - Expect.equals(false, b is AI); - Expect.equals(true, b is I); - Expect.equals(true, c is AI); - Expect.equals(true, c is I); - Expect.equals(false, n is AI); - Expect.equals(false, n is I); - - Expect.equals(false, a is B); - Expect.equals(false, a is C); - Expect.equals(false, b is A); - Expect.equals(false, b is C); - Expect.equals(false, c is B); - Expect.equals(false, n is A); - - Expect.equals(false, null is A); - Expect.equals(false, null is B); - Expect.equals(false, null is C); - Expect.equals(false, null is AI); - Expect.equals(false, null is I); - - { - var a = new List.filled(5, null); - Expect.equals(true, a is List); - Expect.equals(true, a is List); - Expect.equals(false, a is List); - Expect.equals(false, a is List); - Expect.equals(false, a is List); - } - { - var a = new List.filled(5, null); - Expect.equals(true, a is List); - Expect.equals(true, a is List); - Expect.equals(false, a is List); - Expect.equals(false, a is List); - Expect.equals(false, a is List); - } - { - var a = new List.filled(5, null); - Expect.equals(true, a is List); - Expect.equals(true, a is List); - Expect.equals(true, a is List); - Expect.equals(true, a is List); - Expect.equals(false, a is List); - } - { - var a = new List.filled(5, null); - Expect.equals(true, a is List); - Expect.equals(true, a is List); - Expect.equals(false, a is List); - Expect.equals(true, a is List); - Expect.equals(false, a is List); - } - { - var a = new List.filled(5, null); - Expect.equals(true, a is List); - Expect.equals(true, a is List); - Expect.equals(false, a is List); - Expect.equals(false, a is List); - Expect.equals(true, a is List); - } - } -} - -main() { - // Repeat type checks so that inlined tests can be tested as well. - for (int i = 0; i < 5; i++) { - InstanceofTest.testMain(); - } -} diff --git a/tests/language_2/is/is4_test.dart b/tests/language_2/is/is4_test.dart deleted file mode 100644 index 4be4b2673bf..00000000000 --- a/tests/language_2/is/is4_test.dart +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing the instanceof operation. -// Regression test for issue 5216. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Foo { - bool isT() => "a string" is T; - bool isNotT() => "a string" is! T; - bool isListT() => [0, 1, 2] is List; - bool isNotListT() => [0, 1, 2] is! List; - bool isAlsoListT() => [0, 1, 2] is List; - bool isNeitherListT() => [0, 1, 2] is! List; -} - -testFooString() { - var o = new Foo(); - Expect.isTrue(o.isT()); - Expect.isTrue(!o.isNotT()); - Expect.isTrue(!o.isListT()); - Expect.isTrue(o.isNotListT()); - Expect.isTrue(!o.isAlsoListT()); // //# 01: ok - Expect.isTrue(o.isNeitherListT()); // //# 01: ok - for (var i = 0; i < 20; i++) { - // Make sure methods are optimized. - o.isT(); - o.isNotT(); - o.isListT(); - o.isNotListT(); - o.isAlsoListT(); // //# 01: ok - o.isNeitherListT(); // //# 01: ok - } - Expect.isTrue(o.isT(), "1"); - Expect.isTrue(!o.isNotT(), "2"); - Expect.isTrue(!o.isListT(), "3"); - Expect.isTrue(o.isNotListT(), "4"); - Expect.isTrue(!o.isAlsoListT(), "5"); // //# 01: ok - Expect.isTrue(o.isNeitherListT(), "6"); // //# 01: ok -} - -testFooInt() { - var o = new Foo(); - Expect.isTrue(!o.isT()); - Expect.isTrue(o.isNotT()); - Expect.isTrue(o.isListT()); - Expect.isTrue(!o.isNotListT()); - Expect.isTrue(o.isAlsoListT()); - Expect.isTrue(!o.isNeitherListT()); - for (var i = 0; i < 20; i++) { - // Make sure methods are optimized. - o.isT(); - o.isNotT(); - o.isListT(); - o.isNotListT(); - o.isAlsoListT(); - o.isNeitherListT(); - } - Expect.isTrue(!o.isT()); - Expect.isTrue(o.isNotT()); - Expect.isTrue(o.isListT()); - Expect.isTrue(!o.isNotListT()); - Expect.isTrue(o.isAlsoListT()); - Expect.isTrue(!o.isNeitherListT()); -} - -main() { - testFooString(); - testFooInt(); -} diff --git a/tests/language_2/is/isnot_malformed_type_runtime_test.dart b/tests/language_2/is/isnot_malformed_type_runtime_test.dart deleted file mode 100644 index 4e223a88de0..00000000000 --- a/tests/language_2/is/isnot_malformed_type_runtime_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 'package:expect/expect.dart'; - -f(obj) { - // 'Baz' is not loaded, throws a type error on test. - -} - -main() { - -} diff --git a/tests/language_2/is/isnot_malformed_type_test.dart b/tests/language_2/is/isnot_malformed_type_test.dart deleted file mode 100644 index 6d7003c5564..00000000000 --- a/tests/language_2/is/isnot_malformed_type_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'package:expect/expect.dart'; - -f(obj) { - // 'Baz' is not loaded, throws a type error on test. - return (obj is! Baz); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME - // [cfe] 'Baz' isn't a type. -} - -main() { - f(null); -} diff --git a/tests/language_2/is/malformed_type_runtime_test.dart b/tests/language_2/is/malformed_type_runtime_test.dart deleted file mode 100644 index 879a637df15..00000000000 --- a/tests/language_2/is/malformed_type_runtime_test.dart +++ /dev/null @@ -1,62 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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 test program for the "is" and "as" operator with malformed type. - -import "package:expect/expect.dart"; - -testEval(x) { - return x; -} - -test99(e) { - // Test that a runtime error is thrown when the 'is' operator checks for a - // malformed type. - -} - -test98(e) { - // Test that a runtime error is thrown when the 'as' operator checks for a - // malformed type. - -} - -test97(e) { - // Check that the remaining expression after the type test - // with malformed type is parsed, but not executed at runtime. - // Regression test for issue 16985. - -} - -test96(e) { - // Check that the remaining expression after the type test - // with malformed type is parsed, but not executed at runtime. - // Regression test for issue 16985. - -} - -test95(e) { - // Check that the type-tested expression is evaluated before the - // runtime error is thrown. - -} - -test94(e) { - // Check that the type-tested expression is evaluated before the - // runtime error is thrown. - -} - -main() { - - - - - - -} diff --git a/tests/language_2/is/malformed_type_test.dart b/tests/language_2/is/malformed_type_test.dart deleted file mode 100644 index 3bc0ee6e7a8..00000000000 --- a/tests/language_2/is/malformed_type_test.dart +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2014, 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 test program for the "is" and "as" operator with malformed type. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -testEval(x) { - return x; -} - -test99(e) { - // Test that a runtime error is thrown when the 'is' operator checks for a - // malformed type. - if (e is Undefined) Expect.fail("unreachable"); - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME - // [cfe] 'Undefined' isn't a type. -} - -test98(e) { - // Test that a runtime error is thrown when the 'as' operator checks for a - // malformed type. - if (e as Undefined) Expect.fail("unreachable"); - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE - // [cfe] 'Undefined' isn't a type. -} - -test97(e) { - // Check that the remaining expression after the type test - // with malformed type is parsed, but not executed at runtime. - // Regression test for issue 16985. - if (e is Undefined && testEval(e)) Expect.fail("unreachable"); - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME - // [cfe] 'Undefined' isn't a type. -} - -test96(e) { - // Check that the remaining expression after the type test - // with malformed type is parsed, but not executed at runtime. - // Regression test for issue 16985. - if (e as Undefined && testEval(e)) Expect.fail("unreachable"); - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE - // [cfe] 'Undefined' isn't a type. -} - -test95(e) { - // Check that the type-tested expression is evaluated before the - // runtime error is thrown. - if (testEval(e) is Undefined) Expect.fail("unreachable"); - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME - // [cfe] 'Undefined' isn't a type. -} - -test94(e) { - // Check that the type-tested expression is evaluated before the - // runtime error is thrown. - if (testEval(e) as Undefined) Expect.fail("unreachable"); - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE - // [cfe] 'Undefined' isn't a type. -} - -main() { - test99("99 bottles"); - test98("98 bottles"); - test97("97 bottles"); - test96("96 bottles"); - test95("95 bottles"); - test94("94 bottles"); -} diff --git a/tests/language_2/is/nan_test.dart b/tests/language_2/is/nan_test.dart deleted file mode 100644 index 571da26b5a8..00000000000 --- a/tests/language_2/is/nan_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - bool get isNaN => false; -} - -main() { - Expect.isTrue(foo(double.nan)); - Expect.isFalse(foo(new A())); - Expect.throwsNoSuchMethodError(() => foo('bar')); -} - -foo(a) => a.isNaN; diff --git a/tests/language_2/is/not_class1_test.dart b/tests/language_2/is/not_class1_test.dart deleted file mode 100644 index 89f01eba1e5..00000000000 --- a/tests/language_2/is/not_class1_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// 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 - -/// Test that we expect a class after an 'is'. -class A {} - -main() { - var a = A(); - if (a is "A") return 0; - // ^^^ - // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN - // [analyzer] SYNTACTIC_ERROR.EXPECTED_TYPE_NAME - // [cfe] Expected ')' before this. - // [cfe] Expected a type, but got '"A"'. - // [cfe] This couldn't be parsed. -} diff --git a/tests/language_2/is/not_class2_runtime_test.dart b/tests/language_2/is/not_class2_runtime_test.dart deleted file mode 100644 index 607862768ef..00000000000 --- a/tests/language_2/is/not_class2_runtime_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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 test program for catch that we expect a class after an 'is'. 'aa' is a -// malformed type and a type error should be thrown upon test. - -import 'package:expect/expect.dart'; - -class A { - const A(); -} - -class IsNotClass2NegativeTest { - static testMain() { - var a = new A(); - var aa = new A(); - - - - - return 0; - } -} - -main() { - IsNotClass2NegativeTest.testMain(); -} diff --git a/tests/language_2/is/not_class2_test.dart b/tests/language_2/is/not_class2_test.dart deleted file mode 100644 index b66f1a4b405..00000000000 --- a/tests/language_2/is/not_class2_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// 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 - -// Dart test program for catch that we expect a class after an 'is'. 'aa' is a -// malformed type and a type error should be thrown upon test. - -import 'package:expect/expect.dart'; - -class A { - const A(); -} - -class IsNotClass2NegativeTest { - static testMain() { - var a = new A(); - var aa = new A(); - - if (a is aa) { - // ^^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_NON_TYPE - // [cfe] 'aa' isn't a type. - return 0; - } - return 0; - } -} - -main() { - IsNotClass2NegativeTest.testMain(); -} diff --git a/tests/language_2/is/not_class4_test.dart b/tests/language_2/is/not_class4_test.dart deleted file mode 100644 index 62ea922da6d..00000000000 --- a/tests/language_2/is/not_class4_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Test that the parser emits an error when one 'is' expression follows -/// another. -class A {} - -main() { - var a = A(); - if (a is A is A) return 0; - // ^^ - // [analyzer] SYNTACTIC_ERROR.UNEXPECTED_TOKEN - // [cfe] Unexpected token 'is'. -} diff --git a/tests/language_2/is/object_test.dart b/tests/language_2/is/object_test.dart deleted file mode 100644 index 4be183a6401..00000000000 --- a/tests/language_2/is/object_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// 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 test program for the "is" type test operator. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -testTryCatch(x) { - try { - throw x; - Expect.fail("Exception '$x' should've been thrown"); - } on Object catch (obj) { - Expect.equals(obj, x); - } -} - -main() { - var evalCount = 0; - testEval(x) { - evalCount++; - return x; - } - - // Test that types that match JS primitive types compare correctly to Object - var x = 1; - Expect.isTrue(x is Object); - var x2 = 'hi'; - Expect.isTrue(x2 is Object); - var x3 = true; - Expect.isTrue(x3 is Object); - var x4 = null; - Expect.isTrue(x4 is Object); - var y; - Expect.isTrue(y is Object); - - // Verify that operand is evaluated - Expect.isTrue(testEval(123) is Object); - Expect.equals(1, evalCount); - Expect.isTrue(testEval('world') is Object); - Expect.equals(2, evalCount); - Expect.isTrue(testEval(false) is Object); - Expect.equals(3, evalCount); - Expect.isTrue(testEval(null) is Object); - Expect.equals(4, evalCount); - - // Verify that these objects are catchable - testTryCatch(444); - testTryCatch('abc'); - testTryCatch(true); -} diff --git a/tests/language_2/is/operator_clash_test.dart b/tests/language_2/is/operator_clash_test.dart deleted file mode 100644 index 20eafb86cfc..00000000000 --- a/tests/language_2/is/operator_clash_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -class A {} - -class $B extends A {} - -class C implements $B { - // Try to clash with dart2js's isCLASS field. - var isB = false; - var $isB = false; - var is$B = false; - var is$$B = false; - var $is$B = false; - - var isA = false; - var $isA = false; - var is$A = false; - var is$$A = false; - var $is$A = false; -} - -int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); - -main() { - var things = [new A(), new $B(), new C()]; - - var a = things[inscrutable(0)]; - Expect.isTrue(a is A); - Expect.isFalse(a is $B); - Expect.isFalse(a is C); - - var b = things[inscrutable(1)]; - Expect.isTrue(b is A); - Expect.isTrue(b is $B); - Expect.isFalse(b is C); - - var c = things[inscrutable(2)]; - Expect.isTrue(c is A); - Expect.isTrue(c is $B); - Expect.isTrue(c is C); -} diff --git a/tests/language_2/is/operator_test.dart b/tests/language_2/is/operator_test.dart deleted file mode 100644 index f9abce85b8a..00000000000 --- a/tests/language_2/is/operator_test.dart +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) 2012, 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 test program for the "is" type test operator. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -abstract class I {} - -abstract class AI implements I {} - -class A implements AI { - const A(); -} - -class B implements I { - const B(); -} - -class C extends A { - const C() : super(); -} - -class IsOperatorTest { - static testMain() { - var a = new A(); - var b = new B(); - var c = new C(); - var n = null; - Expect.equals(true, a is A); - Expect.equals(false, a is! A); - Expect.equals(true, b is B); - Expect.equals(false, b is! B); - Expect.equals(true, c is C); - Expect.equals(false, c is! C); - Expect.equals(true, c is A); - Expect.equals(false, c is! A); - - Expect.equals(true, a is AI); - Expect.equals(false, a is! AI); - Expect.equals(true, a is I); - Expect.equals(false, a is! I); - Expect.equals(false, b is AI); - Expect.equals(true, b is! AI); - Expect.equals(true, b is I); - Expect.equals(false, b is! I); - Expect.equals(true, c is AI); - Expect.equals(false, c is! AI); - Expect.equals(true, c is I); - Expect.equals(false, c is! I); - Expect.equals(false, n is AI); - Expect.equals(true, n is! AI); - Expect.equals(false, n is I); - Expect.equals(true, n is! I); - - Expect.equals(false, a is B); - Expect.equals(true, a is! B); - Expect.equals(false, a is C); - Expect.equals(true, a is! C); - Expect.equals(false, b is A); - Expect.equals(true, b is! A); - Expect.equals(false, b is C); - Expect.equals(true, b is! C); - Expect.equals(false, c is B); - Expect.equals(true, c is! B); - Expect.equals(false, n is A); - Expect.equals(true, n is! A); - - Expect.equals(false, null is A); - Expect.equals(false, null is B); - Expect.equals(false, null is C); - Expect.equals(false, null is AI); - Expect.equals(false, null is I); - - Expect.equals(true, null is! A); - Expect.equals(true, null is! B); - Expect.equals(true, null is! C); - Expect.equals(true, null is! AI); - Expect.equals(true, null is! I); - } -} - -main() { - IsOperatorTest.testMain(); -} diff --git a/tests/language_2/is/optimized_test.dart b/tests/language_2/is/optimized_test.dart deleted file mode 100644 index cb1563232de..00000000000 --- a/tests/language_2/is/optimized_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) 2014, 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. -// Testing optimized 'is' tests. -// VMOptions=--optimization-counter-threshold=20 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -bool isInt(x) => x is int; - -int isIntRes(x) { - if (x is int) { - return 1; - } else { - return 0; - } -} - -int isNotIntRes(x) { - if (x is! int) { - return 1; - } else { - return 0; - } -} - -int isIfThenElseIntRes(x) { - return x is int ? 1 : 0; -} - -bool isString(x) => x is String; - -int isStringRes(x) { - if (x is String) { - return 1; - } else { - return 0; - } -} - -int isNotStringRes(x) { - if (x is! String) { - return 1; - } else { - return 0; - } -} - -main() { - for (int i = 0; i < 20; i++) { - Expect.isFalse(isInt(3.2)); - Expect.isTrue(isInt(3)); - Expect.isTrue(isInt(17179869184)); // Mint on ia32. - Expect.isFalse(isString(2.0)); - Expect.isTrue(isString("Morgan")); - } - // No deoptimization of isInt possible since all types are known by the compiler - - Expect.isFalse(isString(true)); - for (int i = 0; i < 20; i++) { - Expect.isFalse(isInt(3.2)); - Expect.isTrue(isInt(3)); - Expect.isTrue(isInt(17179869184)); // Mint on ia32. - Expect.isFalse(isInt("hu")); - Expect.isFalse(isString(2.0)); - Expect.isTrue(isString("Morgan")); - Expect.isFalse(isString(true)); - } - - for (int i = 0; i < 20; i++) { - Expect.equals(0, isIntRes(3.2)); - Expect.equals(1, isIntRes(3)); - Expect.equals(0, isIntRes("hi")); - Expect.equals(1, isNotIntRes(3.2)); - Expect.equals(0, isNotIntRes(3)); - Expect.equals(1, isNotIntRes("hi")); - Expect.equals(0, isIfThenElseIntRes(3.2)); - Expect.equals(1, isIfThenElseIntRes(3)); - Expect.equals(0, isIfThenElseIntRes("hi")); - } - - for (int i = 0; i < 20; i++) { - Expect.equals(0, isStringRes(3.2)); - Expect.equals(1, isStringRes("Lotus")); - Expect.equals(1, isNotStringRes(3.2)); - Expect.equals(0, isNotStringRes("Lotus")); - } - - // Deoptimize 'isStringRes', 'isNotIntRes'. - Expect.equals(0, isStringRes(null)); - Expect.equals(1, isNotIntRes(null)); - for (int i = 0; i < 20; i++) { - Expect.equals(0, isStringRes(3.2)); - Expect.equals(1, isStringRes("Lotus")); - Expect.equals(0, isStringRes(null)); - - Expect.equals(1, isNotStringRes(3.2)); - Expect.equals(0, isNotStringRes("Lotus")); - Expect.equals(1, isNotStringRes(null)); - } -} diff --git a/tests/language_2/label/label3_runtime_1_test.dart b/tests/language_2/label/label3_runtime_1_test.dart deleted file mode 100644 index 842c22f0547..00000000000 --- a/tests/language_2/label/label3_runtime_1_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -main() { - L: while (false) { - if (true) break L; - } - // Illegal: L is out of scope. - -} diff --git a/tests/language_2/label/label3_runtime_test.dart b/tests/language_2/label/label3_runtime_test.dart deleted file mode 100644 index 2758cabb925..00000000000 --- a/tests/language_2/label/label3_runtime_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -main() { - L: while (false) { - - } - // Illegal: L is out of scope. - -} diff --git a/tests/language_2/label/label3_test.dart b/tests/language_2/label/label3_test.dart deleted file mode 100644 index 8de76db27c5..00000000000 --- a/tests/language_2/label/label3_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// 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() { - L: while (false) { - if (true) break L; - } - // Illegal: L is out of scope. - continue L; -//^^^^^^^^ -// [analyzer] SYNTACTIC_ERROR.CONTINUE_OUTSIDE_OF_LOOP -// [cfe] A continue statement can't be used outside of a loop or switch statement. -// ^ -// [analyzer] COMPILE_TIME_ERROR.LABEL_UNDEFINED -// [cfe] Can't find label 'L'. -} diff --git a/tests/language_2/label/label5_runtime_test.dart b/tests/language_2/label/label5_runtime_test.dart deleted file mode 100644 index bfc0d955818..00000000000 --- a/tests/language_2/label/label5_runtime_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -main() { - var L = 33; - while (false) { - // Illegal: L is not a label. - - } -} diff --git a/tests/language_2/label/label5_test.dart b/tests/language_2/label/label5_test.dart deleted file mode 100644 index dde78b36773..00000000000 --- a/tests/language_2/label/label5_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// 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() { - var L = 33; - while (false) { - // Illegal: L is not a label. - if (true) break L; - // ^ - // [analyzer] COMPILE_TIME_ERROR.LABEL_UNDEFINED - // [cfe] Can't break to 'L'. - } -} diff --git a/tests/language_2/label/label6_runtime_1_test.dart b/tests/language_2/label/label6_runtime_1_test.dart deleted file mode 100644 index 08280fe7b9b..00000000000 --- a/tests/language_2/label/label6_runtime_1_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -main() { - L: - while (false) { - break; - - void innerfunc() { - // Illegal: jump target is outside of function - - } - - innerfunc(); - } -} diff --git a/tests/language_2/label/label6_runtime_2_test.dart b/tests/language_2/label/label6_runtime_2_test.dart deleted file mode 100644 index 693ec51d975..00000000000 --- a/tests/language_2/label/label6_runtime_2_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -main() { - L: - while (false) { - - break L; - void innerfunc() { - // Illegal: jump target is outside of function - - } - - innerfunc(); - } -} diff --git a/tests/language_2/label/label6_runtime_test.dart b/tests/language_2/label/label6_runtime_test.dart deleted file mode 100644 index 2fa8993a60b..00000000000 --- a/tests/language_2/label/label6_runtime_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -main() { - L: - while (false) { - - - void innerfunc() { - // Illegal: jump target is outside of function - - } - - innerfunc(); - } -} diff --git a/tests/language_2/label/label6_test.dart b/tests/language_2/label/label6_test.dart deleted file mode 100644 index 71b0275cded..00000000000 --- a/tests/language_2/label/label6_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// 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() { - L: - while (false) { - break; - break L; - void innerfunc() { - // Illegal: jump target is outside of function - if (true) break L; - // ^ - // [cfe] Can't break to 'L' in a different function. - // ^ - // [analyzer] COMPILE_TIME_ERROR.LABEL_IN_OUTER_SCOPE - } - - innerfunc(); - } -} diff --git a/tests/language_2/label/label8_runtime_test.dart b/tests/language_2/label/label8_runtime_test.dart deleted file mode 100644 index d3c87158a71..00000000000 --- a/tests/language_2/label/label8_runtime_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -main() { - int i; - // Grammar doesn't allow label on block for switch statement. - switch(i) - - { - case 111: - while (false) { - - } - i++; - } -} diff --git a/tests/language_2/label/label8_test.dart b/tests/language_2/label/label8_test.dart deleted file mode 100644 index 90675c900c1..00000000000 --- a/tests/language_2/label/label8_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// 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() { - int i; - // Grammar doesn't allow label on block for switch statement. - switch(i) - // ^ - // [analyzer] SYNTACTIC_ERROR.EXPECTED_BODY - // [cfe] A switch statement must have a body, even if it is empty. - L: - { - case 111: -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER -// [analyzer] SYNTACTIC_ERROR.EXPECTED_IDENTIFIER_BUT_GOT_KEYWORD -// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN -// [analyzer] SYNTACTIC_ERROR.MISSING_STATEMENT -// [cfe] 'case' can't be used as an identifier because it's a keyword. -// [cfe] Expected ';' after this. -// [cfe] Undefined name 'case'. -// ^^^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN -// [cfe] Expected ';' after this. -// ^ -// [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER -// [analyzer] SYNTACTIC_ERROR.UNEXPECTED_TOKEN -// [cfe] Expected an identifier, but got ':'. -// [cfe] Unexpected token ':'. - while (false) { - break L; - } - i++; - } -} diff --git a/tests/language_2/label/label_test.dart b/tests/language_2/label/label_test.dart deleted file mode 100644 index d255a5859ae..00000000000 --- a/tests/language_2/label/label_test.dart +++ /dev/null @@ -1,355 +0,0 @@ -// 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 test program to test check that we can parse labels. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Helper { - static int ticks; - - // Helper function to prevent endless loops in case labels or - // break/continue is broken. - static doAgain() { - ++ticks; - if (ticks > 300) { - // obfuscating man's assert(false) - Expect.equals(true, false); - } - return true; - } - - static test1() { - var i = 1; - while (doAgain()) { - if (i > 0) break; - return 0; - } - return 111; - } - - static test2() { - // Make sure we break out to default label. - var i = 1; - L: - while (doAgain()) { - // unused label - if (i > 0) break; - return 0; - } - return 111; - } - - static test3() { - // Make sure we break out of outer loop. - var i = 1; - L: - while (doAgain()) { - while (doAgain()) { - if (i > 0) break L; - return 0; - } - return 1; - } - return 111; - } - - static test4() { - // Make sure we break out of inner loop. - var i = 100; - L: - while (doAgain()) { - // unused label - while (doAgain()) { - if (i > 0) break; - return 0; - } - return 111; - } - return 1; - } - - static test5() { - // Make sure we jump to loop condition. - var i = 10; - while (i > 0) { - i--; - if (true) continue; // without the if the following return is dead code. - return 0; - } - return 111; - } - - static test6() { - // Make sure we jump to loop condition. - L: - for (int i = 10; i > 0; i--) { - // unreferenced label, should warn - if (true) continue; // without the if the following return is dead code. - return 0; - } - // Make sure this L does not conflict with previous L. - var k = 20; - L: - while (doAgain()) { - L0: - while (doAgain()) break L; // unreferenced label L0, should warn - return 1; - } - return 111; - } - - static test7() { - // Just weird stuff. - var i = 10; - L: - do { - L: - while (doAgain()) { - if (true) break L; // without the if the following line is dead code. - continue L; - } - i = 0; - continue L; - } while (i == 10 && doAgain()); - return 111; - } - - static test8() { - L: - while (false) { - var L = 33; // OK, shouldn't collide with label. - if (true) break L; - } - return 111; - } - - static test9() { - var i = 111; - L1: - if (i == 0) { - // unreferenced label, should warn - return 0; - } - - L2: - while (i == 0) { - // unreferenced label, should warn - return 0; - } - - L3: // useless label, should warn - return i; - } - - // Labels should be allowed on block/if/for/switch/while/do stmts. - static test10() { - int i = 111; - // block - while (doAgain()) { - L: - { - while (doAgain()) { - break L; - } - i--; - } - break; - } - Expect.equals(111, i); - - while (doAgain()) { - L: - if (doAgain()) { - while (doAgain()) { - break L; - } - i--; - } - break; - } - Expect.equals(111, i); - - while (doAgain()) { - L: - for (; doAgain();) { - while (doAgain()) { - break L; - } - i--; - } - break; - } - Expect.equals(111, i); - - L: - for (i in [111]) { - while (doAgain()) { - break L; - } - i--; - break; - } - Expect.equals(111, i); - - L: - for (var j in [111]) { - while (doAgain()) { - break L; - } - i--; - break; - } - Expect.equals(111, i); - - while (doAgain()) { - L: - switch (i) { - case 111: - while (doAgain()) { - break L; - } - i--; - break; - default: - i--; - } - break; - } - Expect.equals(111, i); - - while (doAgain()) { - L: - do { - while (doAgain()) { - break L; - } - i--; - } while (doAgain()); - break; - } - Expect.equals(111, i); - - while (doAgain()) { - L: - try { - while (doAgain()) { - break L; - } - i--; - } finally {} - break; - } - Expect.equals(111, i); - - return i; - } - - static test11() { - // Kind of odd, but is valid and shouldn't be flagged as useless either. - L: - break L; - return 111; - } - - static test12() { - int i = 111; - - // label the inner block on compound stmts - if (true) - L: - { - while (doAgain()) { - break L; - } - i--; - } - Expect.equals(111, i); - - // loop will execute each time, but won't execute code below the break - var forCount = 0; - for (forCount = 0; forCount < 2; forCount++) - L: - { - while (doAgain()) { - break L; - } - i--; - break; - } - Expect.equals(111, i); - Expect.equals(forCount, 2); - - for (i in [111]) - L: - { - while (doAgain()) { - break L; - } - i--; - break; - } - Expect.equals(111, i); - - for (var j in [111]) - L: - { - while (doAgain()) { - break L; - } - i--; - break; - } - Expect.equals(111, i); - - if (false) {} else - L: - { - while (doAgain()) { - break L; - } - i--; - } - Expect.equals(111, i); - - int whileCount = 0; - while (whileCount < 2) - L: - { - whileCount++; - while (doAgain()) { - break L; - } - i--; - break; - } - Expect.equals(111, i); - Expect.equals(2, whileCount); - - return i; - } -} - -class LabelTest { - static testMain() { - Helper.ticks = 0; - Expect.equals(111, Helper.test1()); - Expect.equals(111, Helper.test2()); - Expect.equals(111, Helper.test3()); - Expect.equals(111, Helper.test4()); - Expect.equals(111, Helper.test5()); - Expect.equals(111, Helper.test6()); - Expect.equals(111, Helper.test7()); - Expect.equals(111, Helper.test8()); - Expect.equals(111, Helper.test9()); - Expect.equals(111, Helper.test10()); - Expect.equals(111, Helper.test11()); - Expect.equals(111, Helper.test12()); - } -} - -main() { - LabelTest.testMain(); -} diff --git a/tests/language_2/language_2.status b/tests/language_2/language_2.status deleted file mode 100644 index a3eb4bd9ab0..00000000000 --- a/tests/language_2/language_2.status +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) 2017, 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. - -[ $compiler != dart2analyzer ] -switch/case_warn_test: Skip # Analyzer only, see language_analyzer2.status - -[ $compiler == spec_parser ] -double_literals/*: Skip # https://github.com/dart-lang/sdk/issues/34355 -invalid_returns/*: Skip # https://github.com/dart-lang/sdk/issues/34015 -mixin_declaration/*: Skip # See https://github.com/dart-lang/language/issues/7 -void/*: Skip # https://github.com/dart-lang/sdk/issues/34015 - -[ $mode == debug ] -class/large_class_declaration_test: Slow, Pass - -[ $mode == product ] -assert/assert_test: SkipByDesign # Requires checked mode. -generic/generic_test: SkipByDesign # Requires checked mode. -map/literal4_test: SkipByDesign # Requires checked mode. -parameter/named_type_test/01: SkipByDesign # Requires checked mode. -parameter/named_type_test/02: SkipByDesign # Requires checked mode. -parameter/named_type_test/03: SkipByDesign # Requires checked mode. -parameter/positional_type_test/01: SkipByDesign # Requires checked mode. -parameter/positional_type_test/02: SkipByDesign # Requires checked mode. -regress/regress29784_test/02: SkipByDesign # Requires checked mode. -stack_trace/demangle_ctors_test: SkipByDesign # Names are not scrubbed. -type/checks_in_factory_method_test: SkipByDesign # Requires checked mode. - -[ $runtime != vm ] -unsorted/disassemble_test: Skip # VM only test - -[ $compiler != dart2analyzer && $compiler != fasta ] -identifier/built_in_type_annotation_test/*: SkipByDesign # Analyzer/CFE only tests. - -[ $compiler != dart2js && !$checked ] -function_type/*: Skip # Needs checked mode. - -[ $compiler != dartk && $compiler != dartkp && $mode == debug && $runtime == vm ] -identifier/built_in_type_annotation_test/set: Crash # Not supported by legacy VM front-end. - -[ $hot_reload || $hot_reload_rollback ] -regress/regress22780_test/01: Crash # Issue 29094 -vm/optimized_stacktrace_test: Slow, Pass diff --git a/tests/language_2/language_2_analyzer.status b/tests/language_2/language_2_analyzer.status deleted file mode 100644 index f015cbb346c..00000000000 --- a/tests/language_2/language_2_analyzer.status +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright (c) 2017, 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. - -# Sections in this file should contain "$compiler == dart2analyzer". - -[ $compiler == dart2analyzer ] -class/large_class_declaration_test: Slow, Pass diff --git a/tests/language_2/language_2_dart2js.status b/tests/language_2/language_2_dart2js.status deleted file mode 100644 index 8a0db5928cb..00000000000 --- a/tests/language_2/language_2_dart2js.status +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) 2017, 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. -# Sections in this file should contain "$compiler == dart2js". - -[ $compiler == dart2js ] -async_star/async_star_await_for_test: Skip # evades flake detection https://github.com/dart-lang/sdk/issues/51086 -external_abstract_fields/external_fields_test: SkipByDesign # Non-JS-interop external members are not supported -mixin_method_override_test/G5: Skip # Issue 34354 -number/int64_literal_runtime*_test: Skip # This is testing Dart 2.0 int64 semantics -vm/*: SkipByDesign # Tests for the VM. - -[ $compiler != dart2js ] -closure/minify_closure_variable_collision_test: SkipByDesign # Regression test for dart2js - -[ $builder_tag == dart2js_production && $compiler == dart2js ] -call/implicit_tearoff_exceptions_test: SkipByDesign # No argument type checks in production mode, issue 45528 -control_flow_collections/for_non_bool_condition_test: Crash # Issue 36442 -regress/regress45428_test: SkipByDesign # No argument type checks in production mode, issue 45528 - -[ $compiler == dart2js && $runtime == chromeOnAndroid ] -override_field_test/02: Slow, Pass # TODO(kasperl): Please triage. - -[ $compiler == dart2js && $runtime == d8 ] -import/conditional_string_test: SkipByDesign # No XHR in d8 - -[ $compiler == dart2js && $runtime == jsshell ] -await/for_test: Skip # Jsshell does not provide periodic timers, Issue 7728 - -[ $compiler == dart2js && $system == windows ] -canonicalize/hashing_memoize_array_test: Skip # Issue 37631 -canonicalize/hashing_memoize_instance_test: Skip # Issue 37631 -canonicalize/hashing_shallow_collision_array_test: Skip # Issue 37631 -canonicalize/hashing_shallow_collision_instance_test: Skip # Issue 37631 diff --git a/tests/language_2/language_2_dartdevc.status b/tests/language_2/language_2_dartdevc.status deleted file mode 100644 index ebdbee41cbe..00000000000 --- a/tests/language_2/language_2_dartdevc.status +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) 2017, 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. - -# Sections in this file should contain "$compiler == ddc". - -[ $compiler == ddc ] -async_star/async_star_await_for_test: Skip # evades flake detection https://github.com/dart-lang/sdk/issues/51086 -async_star/throw_in_catch_test: Skip # Times out. Issue 29920 -external_abstract_fields/external_fields_test: SkipByDesign # Non-JS-interop external members are not supported -number/int64_literal_runtime*_test: Skip # This is testing Dart 2.0 int64 semantics. -superinterface_variance/*: Skip # Issue dart-lang/language#113 -vm/*: SkipByDesign # VM only tests.; VM only tests. - -[ $compiler == ddc && ($runtime == ff || $runtime == firefox) ] -async/return_throw_test: Skip # Flaky but not enough to be detected. Re-enable pending a decision on the correct behavior. https://github.com/dart-lang/sdk/issues/44395 diff --git a/tests/language_2/language_2_kernel.status b/tests/language_2/language_2_kernel.status deleted file mode 100644 index f0d51f42085..00000000000 --- a/tests/language_2/language_2_kernel.status +++ /dev/null @@ -1,124 +0,0 @@ -# Copyright (c) 2017, 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. - -[ $compiler == app_jitk ] -main/no_main_test/01: Crash -number/web_int_literals_test/*: SkipByDesign # Test applies only to JavaScript targets -vm/regress_27671_test: SkipByDesign # Relies on string comparison of exception message which may return '' - -[ $compiler == dartkp ] -number/web_int_literals_test/*: SkipByDesign # Test applies only to JavaScript targets - -[ $compiler == fasta ] -number/web_int_literals_test/*: SkipByDesign # Test applies only to JavaScript targets - -[ $fasta ] -nnbd/*: Skip -superinterface_variance/mixin_error_test/37: Crash # Issue dart-lang/language#113 -superinterface_variance/mixin_error_test/38: Crash # Issue dart-lang/language#113 -superinterface_variance/mixin_error_test/40: Crash # Issue dart-lang/language#113 -superinterface_variance/mixin_error_test/41: Crash # Issue dart-lang/language#113 -superinterface_variance/mixin_error_test/42: Crash # Issue dart-lang/language#113 -superinterface_variance/mixin_error_test/43: Crash # Issue dart-lang/language#113 -superinterface_variance/mixin_error_test/44: Crash # Issue dart-lang/language#113 -superinterface_variance/mixin_error_test/46: Crash # Issue dart-lang/language#113 -superinterface_variance/mixin_error_test/47: Crash # Issue dart-lang/language#113 -superinterface_variance/mixin_error_test/48: Crash # Issue dart-lang/language#113 - -[ $arch == ia32 && $mode == debug ] -*: Pass, Slow # The CFE is not run from AppJit snapshot, JIT warmup in debug mode very slow - -[ $builder_tag == obfuscated && $compiler == dartkp ] -generic/function_dcall_test/01: SkipByDesign # Prints type names -mixin/generic_test: SkipByDesign # Prints type names -mixin/mixin3_test: SkipByDesign # Prints type names -mixin/mixin5_test: SkipByDesign # Prints type names -mixin/mixin6_test: SkipByDesign # Prints type names -mixin/mixin_bound2_test: SkipByDesign # Prints type names -unsorted/cyclic_type2_test: SkipByDesign # Prints type names -unsorted/many_named_arguments_test: SkipByDesign # Checks names of arguments -unsorted/symbol_literal_test/02: SkipByDesign # We don't obfuscate const Symbol constructor -vm/bool_check_stack_traces_test: SkipByDesign # Looks for filenames in stacktrace output -vm/no_such_args_error_message_vm_test: SkipByDesign # Looks for function name in error message -vm/no_such_method_error_message_callable_vm_test: SkipByDesign # Expects unobfuscated method names -vm/no_such_method_error_message_vm_test: SkipByDesign # Looks for unobfuscated name in error message - -[ $compiler == dartk && $mode == debug && ($hot_reload || $hot_reload_rollback) ] -enum/duplicate_test/02: Crash # Issue 34606 -enum/duplicate_test/none: Crash # Issue 34606 -enum/private_test/01: Crash # Issue 34606 -unsorted/inference_enum_list_test: Skip # Issue 35885 - -[ $compiler == dartk && $mode == product && $runtime == vm ] -vm/lazy_async_exception_stack2_test: SkipByDesign -vm/lazy_async_exception_stack_test: SkipByDesign - -# ===== dartk + vm status lines ===== -[ $compiler == dartk && $runtime == vm ] -const/const2_test: Crash # Flaky -main/no_main_test/01: Skip -mixin/illegal_super_use_test: Skip # Issues 24478 and 23773 -mixin/illegal_superclass_test: Skip # Issues 24478 and 23773 -unsorted/disassemble_test: Slow, Crash # dartbug.com/34971 -vm/closure_memory_retention_test: Skip # KernelVM bug: Hits OOM -vm/regress_29145_test: Skip # Issue 29145 -web_int_literals_test/*: SkipByDesign # Test applies only to JavaScript targets - -[ $compiler == dartk && $hot_reload_rollback ] -symbol/conflict_test: Slow, Pass - -[ $compiler == dartk && ($hot_reload || $hot_reload_rollback) ] -type_constants_test/none: Skip # Deferred libraries and hot reload. - -[ $compiler == dartkp && $mode == debug && $runtime == dart_precompiled ] -vm/precompiled_static_initializer_test: Slow, Pass - -# ==== dartkp + dart_precompiled status lines ==== -[ $compiler == dartkp && $runtime == dart_precompiled ] -assert/with_type_test_or_cast_test: Crash -const/const2_test: Skip # Incompatible flag: --compile_all -const/evaluation_test: SkipByDesign -deferred/redirecting_factory_test: Crash # Issue 23408, KernelVM bug: Deferred loading kernel issue 30273. -export/ambiguous_main_test: Skip # Issue 29895 Fail Issue 14763 -export/double_same_main_test: Skip # Issue 29895 Crash Issue 29895 -field/increment_bailout_test: SkipByDesign -generic_methods_recursive_bound_test/03: Crash -main/no_main_test/01: Skip -main/not_a_function_test: Skip -mixin/illegal_super_use_test: Skip # Issues 24478 and 23773 -mixin/illegal_superclass_test: Skip # Issues 24478 and 23773 -no_such_method/many_overridden_test.dart: SkipByDesign -null_test/mirrors: Skip # Uses mirrors. -null_test/none: SkipByDesign -optimize/deopt_inlined_function_lazy_test: Skip # Incompatible flag: --deoptimize-alot -unsorted/hello_dart_test: Skip # Incompatible flag: --compile_all -unsorted/invocation_mirror2_test: SkipByDesign -vm/closure_memory_retention_test: Skip # KernelVM bug: Hits OOM -vm/lazy_async_exception_stack2_test: SkipByDesign -vm/lazy_async_exception_stack_test: SkipByDesign -vm/reflect_core_vm_test: SkipByDesign -vm/regress_27671_test: Skip # Unsupported -vm/regress_29145_test: Skip # Issue 29145 - -[ $compiler == dartkp && $runtime == dart_precompiled && $checked ] -assert/initializer_const_error2_test/cc01: Crash -assert/initializer_const_error2_test/cc02: Crash -assert/initializer_const_error2_test/cc03: Crash -assert/initializer_const_error2_test/cc04: Crash -assert/initializer_const_error2_test/cc05: Crash -assert/initializer_const_error2_test/cc06: Crash -assert/initializer_const_error2_test/cc07: Crash -assert/initializer_const_error2_test/cc08: Crash -assert/initializer_const_error2_test/cc09: Crash -assert/initializer_const_error2_test/cc10: Crash -assert/initializer_const_error2_test/cc11: Crash - -[ $compiler == dartkp && $system == windows ] -unsorted/disassemble_test: Slow, Pass - -[ $mode == debug && $runtime == vm && ($compiler == app_jitk || $compiler == dartk) ] -optimize/deopt_inlined_function_lazy_test: Skip - -[ $mode == debug && ($hot_reload || $hot_reload_rollback) ] -regress/regress41983_test: Pass, Slow diff --git a/tests/language_2/language_2_precompiled.status b/tests/language_2/language_2_precompiled.status deleted file mode 100644 index dbb5365a8c0..00000000000 --- a/tests/language_2/language_2_precompiled.status +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright (c) 2017, 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. -# Sections in this file should start with "$runtime == dart_precompiled". - -[ $arch == ia32 && $runtime == dart_precompiled ] -vm/regress_24517_test: Pass, Fail # Issue 24517. - -[ $compiler != dart2analyzer && $runtime == dart_precompiled ] -mixin/mixin2_test: Skip - -[ $runtime == dart_precompiled && $minified ] -enum/duplicate_test/*: Skip # Uses Enum.toString() -enum/enum_test: Skip # Uses Enum.toString() -enum/private_test/*: Skip # Uses Enum.toString() -mixin/generic_test: Skip -mixin/mixin3_test: Skip -mixin/mixin5_test: Skip -mixin/mixin6_test: Skip -mixin/mixin_bound2_test: Skip -mixin/mixin_type_arguments_test: Skip -mixin/super_2_test: Skip -no_such_method/dispatcher_test: Skip # Uses new Symbol() -stack_trace/full1_test: Skip -stack_trace/full2_test: Skip -stack_trace/full3_test: Skip -unsorted/cyclic_type_test/*: Skip -vm/no_such_args_error_message_vm_test: Skip -vm/no_such_method_error_message_callable_vm_test: Skip -vm/no_such_method_error_message_vm_test: Skip - -[ $runtime == dart_precompiled && ($mode == product || $minified) ] -stack_trace/rethrow_error_test: SkipByDesign # obfuscation/minification and instruction deduplication cause names of frames to be mangled (expected) -stack_trace/rethrow_nonerror_test: SkipByDesign # obfuscation/minification and instruction deduplication cause names of frames to be mangled (expected) diff --git a/tests/language_2/language_2_spec_parser.status b/tests/language_2/language_2_spec_parser.status deleted file mode 100644 index d5991466a44..00000000000 --- a/tests/language_2/language_2_spec_parser.status +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (c) 2017, 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. - -[ $compiler == spec_parser ] -class/large_class_declaration_test: Skip # JVM stack overflow. -closure/type_test: Pass # Marked as RuntimeError for all in language_2.status. -const/native_factory_test: Skip # Uses `native`. -double/invalid_test: Skip # Contains illegally formatted double. -nnbd/syntax/opt_out_nnbd_modifiers_test: Skip # Requires opt-out of NNBD. -regress/regress1751477_test: Skip # Times out: 9 levels, exponential blowup => 430 secs. -syntax/deep_nesting_expression_test: Skip # JVM stack overflow. -syntax/deep_nesting_statement_test: Skip # JVM stack overflow. -variance: Skip # Not yet supported. diff --git a/tests/language_2/language_2_vm.status b/tests/language_2/language_2_vm.status deleted file mode 100644 index 75a13aa05d8..00000000000 --- a/tests/language_2/language_2_vm.status +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) 2017, 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. -# Sections in this file should contain "$runtime == vm". - -[ $compiler == dartkp ] -assert/initializer_const_error2_test/cc01: MissingCompileTimeError # Not reporting failed assert() at compile time. -assert/initializer_const_error2_test/cc02: MissingCompileTimeError # Not reporting failed assert() at compile time. -assert/initializer_const_error2_test/cc03: MissingCompileTimeError # Not reporting failed assert() at compile time. -assert/initializer_const_error2_test/cc04: MissingCompileTimeError # Not reporting failed assert() at compile time. -assert/initializer_const_error2_test/cc05: MissingCompileTimeError # Not reporting failed assert() at compile time. -assert/initializer_const_error2_test/cc06: MissingCompileTimeError # Not reporting failed assert() at compile time. -assert/initializer_const_error2_test/cc07: MissingCompileTimeError # Not reporting failed assert() at compile time. -assert/initializer_const_error2_test/cc08: MissingCompileTimeError # Not reporting failed assert() at compile time. -assert/initializer_const_error2_test/cc09: MissingCompileTimeError # Not reporting failed assert() at compile time. -assert/initializer_const_error2_test/cc10: MissingCompileTimeError # Not reporting failed assert() at compile time. -assert/initializer_const_error2_test/cc11: MissingCompileTimeError # Not reporting failed assert() at compile time. - -[ $arch == ia32 && $mode == release && $runtime == vm ] -syntax/deep_nesting_expression_test/01: Crash, Pass # Issue 31496 - -[ $runtime == dart_precompiled || $runtime == vm ] -superinterface_variance/*: Skip # Issue dart-lang/language#113 diff --git a/tests/language_2/lazy/map_test.dart b/tests/language_2/lazy/map_test.dart deleted file mode 100644 index fae2aa80ae5..00000000000 --- a/tests/language_2/lazy/map_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -var data = {'a': 'a'}; -main() { - Expect.equals('a', data['a']); -} diff --git a/tests/language_2/lazy/static2_test.dart b/tests/language_2/lazy/static2_test.dart deleted file mode 100644 index ab3f983ff5d..00000000000 --- a/tests/language_2/lazy/static2_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -final x = (int t) => t + 1; - -main() { - Expect.equals(499, x(498)); - Expect.equals(42, x(41)); -} diff --git a/tests/language_2/lazy/static3_test.dart b/tests/language_2/lazy/static3_test.dart deleted file mode 100644 index b2c8b7339c5..00000000000 --- a/tests/language_2/lazy/static3_test.dart +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -final x = foo(); -var x2 = foo2(); -var x3 = foo3(); -var x4 = foo4(); -var x5 = foo5(); -final x6 = foo6(); -int x7 = x7 + 1; - -foo() { - throw "interrupt initialization"; -} - -foo2() { - x2 = 499; - throw "interrupt initialization"; -} - -foo3() => x3 + 1; -foo4() { - x4 = 498; - x4 = x4 + 1; - return x4; -} - -foo5() { - x5 = 498; - x5 = x5 + 1; -} - -foo6() { - try { - return x5 + 1; - } catch (e) { - return 499; - } -} - -fib(x) { - if (x is! int) return 0; - if (x < 2) return x; - return fib(x - 1) + fib(x - 2); -} - -main() { - Expect.throws(() => fib(x), (e) => e == "interrupt initialization"); - Expect.equals(null, x); - - Expect.throws(() => fib(x2), (e) => e == "interrupt initialization"); - Expect.equals(null, x2); - - Expect.throws(() => fib(x3), (e) => e is Error); - Expect.equals(null, x3); - - Expect.equals(499, x4); - - Expect.equals(null, x5); - - Expect.equals(499, x6); - - Expect.throws(() => fib(x7), (e) => e is Error); -} diff --git a/tests/language_2/lazy/static4_test.dart b/tests/language_2/lazy/static4_test.dart deleted file mode 100644 index af9f042467b..00000000000 --- a/tests/language_2/lazy/static4_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -final x = foo(499); -final y = foo(41) + 1; - -final t = bar(499); -final u = bar(41) + 1; -final v = bar("some string"); - -foo(x) => x; // The return type will always be int. -bar(x) => x; // The return type varies and can be int or String. - -main() { - Expect.equals(499, x); - Expect.equals(42, y); - Expect.equals(499, t); - Expect.equals(42, u); - Expect.equals("some string", v); -} diff --git a/tests/language_2/lazy/static5_test.dart b/tests/language_2/lazy/static5_test.dart deleted file mode 100644 index 0a3fecd0d2a..00000000000 --- a/tests/language_2/lazy/static5_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -final x = (int t) => (int u) => t + u; - -main() { - Expect.equals(499, x(498)(1)); - Expect.equals(42, x(39)(3)); -} diff --git a/tests/language_2/lazy/static6_src.dart b/tests/language_2/lazy/static6_src.dart deleted file mode 100644 index 14eb00f043e..00000000000 --- a/tests/language_2/lazy/static6_src.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2012, 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 lot of comments to make sure that the lazy initialization code has a - * position that does not fit into lazy_static6_test.dart file. - ****************************************************************************** - ****************************************************************************** - ****************************************************************************** - ****************************************************************************** - ****************************************************************************** - ****************************************************************************** - ****************************************************************************** - ****************************************************************************** - ****************************************************************************** - ****************************************************************************** - ****************************************************************************** - ****************************************************************************** - */ -part of lazy_static6_test; - -final x = (int t) => (int u) => t + u; - -main() { - Expect.equals(499, x(498)(1)); - Expect.equals(42, x(39)(3)); -} diff --git a/tests/language_2/lazy/static6_test.dart b/tests/language_2/lazy/static6_test.dart deleted file mode 100644 index 7891c0514fc..00000000000 --- a/tests/language_2/lazy/static6_test.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2012, 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 lazy_static6_test; - -import "package:expect/expect.dart"; -part "static6_src.dart"; diff --git a/tests/language_2/lazy/static7_test.dart b/tests/language_2/lazy/static7_test.dart deleted file mode 100644 index a05b244cfc9..00000000000 --- a/tests/language_2/lazy/static7_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -var sideEffect = 0; -int x = (() { - sideEffect++; - return 499; -})(); - -main() { - if (new DateTime.now().day >= -1) { - x = 42; - } - Expect.equals(42, x); - Expect.equals(0, sideEffect); -} diff --git a/tests/language_2/lazy/static8_test.dart b/tests/language_2/lazy/static8_test.dart deleted file mode 100644 index 67f8adf78b5..00000000000 --- a/tests/language_2/lazy/static8_test.dart +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -// Test reentrant initializer - calls throw Error. - -var trace; - -final foo = bar; - -get bar { - trace.add('bar'); - try { - return foo ?? 1; - } catch (e) { - trace.add(e is Error); - } - try { - return foo ?? 2; - } catch (e) { - trace.add(e is Error); - } - return 42; -} - -void testTopLevel() { - trace = []; - var result = foo; - Expect.equals(42, result); - Expect.equals('bar,true,true', trace.join(',')); - trace = []; - result = foo; - Expect.equals(42, result); - Expect.equals('', trace.join(',')); -} - -class X { - static final foo = X.bar; - - static get bar { - trace.add('X.bar'); - try { - return foo ?? 1; - } catch (e) { - trace.add(e is Error); - } - try { - return foo ?? 2; - } catch (e) { - trace.add(e is Error); - } - return 49; - } -} - -void testClassStatic() { - trace = []; - var result = X.foo; - Expect.equals(49, result); - Expect.equals('X.bar,true,true', trace.join(',')); - trace = []; - result = X.foo; - Expect.equals(49, result); - Expect.equals('', trace.join(',')); -} - -main() { - testTopLevel(); - testClassStatic(); -} diff --git a/tests/language_2/lazy/static_test.dart b/tests/language_2/lazy/static_test.dart deleted file mode 100644 index cb030c0b2fb..00000000000 --- a/tests/language_2/lazy/static_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -final x = foo(); -final y = y2(y3); -final y2 = incrementCreator(); -final y3 = fib(5); - -foo() => 499; - -incrementCreator() => (x) => x + 1; -fib(x) { - if (x < 2) return x; - return fib(x - 1) + fib(x - 2); -} - -var count = 0; -sideEffect() => count++; - -final t = sideEffect(); -var t2 = sideEffect(); - -class A { - static final a = toto(); - static final b = b2(b3); - static final b2 = decrementCreator(); - static final b3 = fact(5); - - static toto() => 666; - - static decrementCreator() => (x) => x - 1; - static fact(x) { - if (x <= 1) return x; - return x * fact(x - 1); - } -} - -main() { - Expect.equals(499, x); - Expect.equals(6, y); - Expect.equals(666, A.a); - Expect.equals(119, A.b); - Expect.equals(0, t); - t2 = 499; - Expect.equals(499, t2); - Expect.equals(1, count); -} diff --git a/tests/language_2/lazy/throwing_variable_test.dart b/tests/language_2/lazy/throwing_variable_test.dart deleted file mode 100644 index a6b96233195..00000000000 --- a/tests/language_2/lazy/throwing_variable_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that engines will not infer that [a] is always of type int. - -var a = foo(); - -foo() { - () => 42; - if (true) throw 'Sorry'; - return 42; -} - -main() { - try { - a; - } catch (e) { - // Ignore. - } - if (a is num) throw 'Test failed'; -} diff --git a/tests/language_2/least_upper_bound/expansive_runtime_test.dart b/tests/language_2/least_upper_bound/expansive_runtime_test.dart deleted file mode 100644 index 69c63edb899..00000000000 --- a/tests/language_2/least_upper_bound/expansive_runtime_test.dart +++ /dev/null @@ -1,106 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -class N { - T get n => null; -} - -class C1 extends N>> { - T get c1 => null; -} - -class C2 extends N>>>> { - T get c2 => null; -} - -/** - * Test that we don't try to find the least upper bound by applying the - * algorithm for finding the most specific common declaration recursively on - * type arguments. - * - * For C1 and N> this would result in this infinite chain of - * computations: - * - * lub(C1, N>) = lub(N>>, N>) - * => - * lub(N>, C1) = lub(N>, N>>) - * => - * lub(C1, N>) = lub(N>>, N>>) - * => ... - */ -void testC1(bool z, C1 a, N> b) { - if (z) { - // The least upper bound of C1 and N> is Object since the - // supertypes are - // {C1, N>>, Object} for C1 and - // {N>, Object} for N> and - // Object is the most specific type in the intersection of the supertypes. - - // Is least upper bound dynamic? - - // Is least upper bound N<...> ? - - // Is least upper bound C1<...> ? - - // Is least upper bound N ? - - // Is least upper bound N> ? - - // Is least upper bound N> ? - - } -} - -/** - * Test that we don't try to find the least upper bound by applying the - * algorithm for finding the most specific common declaration recursively on - * type arguments. - * - * For C1 and N> this would result in this infinite and - * expanding chain of computations: - * - * lub(C2, N>) = lub(N>>>>, N>) - * => - * lub(N>>>, C2) = - * lub(N>>>, N>>>>) - * => - * lub(C2>>, N>>>) = - * lub(N>>>>, N>>>>) - * => ... - */ - -void testC2(bool z, C2 a, N> b) { - if (z) { - // The least upper bound of C2 and N> is Object since the - // supertypes are - // {C2, N>>>>, Object} for C1 and - // {N>, Object} for N> and - // Object is the most specific type in the intersection of the supertypes. - - // Is least upper bound dynamic? - - // Is least upper bound N<...> ? - - // Is least upper bound C2<...> ? - - // Is least upper bound N ? - - // Is least upper bound N> ? - - // Is least upper bound N> ? - - } -} - -void main() { - testC1(false, null, null); - testC2(false, null, null); -} diff --git a/tests/language_2/least_upper_bound/expansive_test.dart b/tests/language_2/least_upper_bound/expansive_test.dart deleted file mode 100644 index 6a4b63ae7b1..00000000000 --- a/tests/language_2/least_upper_bound/expansive_test.dart +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test least upper bound through type checking of conditionals. - -class N { - T get n => null; -} - -class C1 extends N>> { - T get c1 => null; -} - -class C2 extends N>>>> { - T get c2 => null; -} - -/** - * Test that we don't try to find the least upper bound by applying the - * algorithm for finding the most specific common declaration recursively on - * type arguments. - * - * For C1 and N> this would result in this infinite chain of - * computations: - * - * lub(C1, N>) = lub(N>>, N>) - * => - * lub(N>, C1) = lub(N>, N>>) - * => - * lub(C1, N>) = lub(N>>, N>>) - * => ... - */ -void testC1(bool z, C1 a, N> b) { - if (z) { - // The least upper bound of C1 and N> is Object since the - // supertypes are - // {C1, N>>, Object} for C1 and - // {N>, Object} for N> and - // Object is the most specific type in the intersection of the supertypes. - - // Is least upper bound dynamic? - (z ? a : b).z; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'z' isn't defined for the class 'Object'. - - // Is least upper bound N<...> ? - (z ? a : b).n; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'n' isn't defined for the class 'Object'. - - // Is least upper bound C1<...> ? - (z ? a : b).c1; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c1' isn't defined for the class 'Object'. - - // Is least upper bound N ? - (z ? a : b).n.z; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'n' isn't defined for the class 'Object'. - - // Is least upper bound N> ? - (z ? a : b).n.n; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'n' isn't defined for the class 'Object'. - - // Is least upper bound N> ? - (z ? a : b).n.c1; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'n' isn't defined for the class 'Object'. - } -} - -/** - * Test that we don't try to find the least upper bound by applying the - * algorithm for finding the most specific common declaration recursively on - * type arguments. - * - * For C1 and N> this would result in this infinite and - * expanding chain of computations: - * - * lub(C2, N>) = lub(N>>>>, N>) - * => - * lub(N>>>, C2) = - * lub(N>>>, N>>>>) - * => - * lub(C2>>, N>>>) = - * lub(N>>>>, N>>>>) - * => ... - */ - -void testC2(bool z, C2 a, N> b) { - if (z) { - // The least upper bound of C2 and N> is Object since the - // supertypes are - // {C2, N>>>>, Object} for C1 and - // {N>, Object} for N> and - // Object is the most specific type in the intersection of the supertypes. - - // Is least upper bound dynamic? - (z ? a : b).z; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'z' isn't defined for the class 'Object'. - - // Is least upper bound N<...> ? - (z ? a : b).n; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'n' isn't defined for the class 'Object'. - - // Is least upper bound C2<...> ? - (z ? a : b).c2; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c2' isn't defined for the class 'Object'. - - // Is least upper bound N ? - (z ? a : b).n.z; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'n' isn't defined for the class 'Object'. - - // Is least upper bound N> ? - (z ? a : b).n.n; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'n' isn't defined for the class 'Object'. - - // Is least upper bound N> ? - (z ? a : b).n.c2; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'n' isn't defined for the class 'Object'. - } -} - -void main() { - testC1(false, null, null); - testC2(false, null, null); -} diff --git a/tests/language_2/least_upper_bound/least_upper_bound_test.dart b/tests/language_2/least_upper_bound/least_upper_bound_test.dart deleted file mode 100644 index 5fd28641c42..00000000000 --- a/tests/language_2/least_upper_bound/least_upper_bound_test.dart +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test least upper bound through type checking of conditionals. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - A r1 = true ? a : b; - B r2 = false ? a : b; - (true ? a : b).a = 0; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER - // [cfe] The setter 'a' isn't defined for the class 'Object'. - (false ? a : b).b = 0; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER - // [cfe] The setter 'b' isn't defined for the class 'Object'. - var c = new C(); - (true ? a as dynamic : c).a = 0; - (false ? c : b).b = 0; -} - -void testBC(B b, C c) { - B r1 = true ? b : c; - C r2 = false ? b : c; - (true ? b : c).b = 0; - (false ? b : c).c = 0; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER - // [cfe] The setter 'c' isn't defined for the class 'B'. - var a = null; - (true ? b : a).b = 0; - (false ? a : b).c = 0; - (true ? c : a).b = 0; - (false ? a : c).c = 0; -} - -void testCD(C c, D d) { - C r1 = true ? c : d; - D r2 = false ? c : d; - (true ? c : d).b = 0; - (false ? c : d).b = 0; - (true ? c : d).c = 0; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER - // [cfe] The setter 'c' isn't defined for the class 'B'. - (false ? c : d).d = 0; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER - // [cfe] The setter 'd' isn't defined for the class 'B'. -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - E r1 = true ? e : f; - F r2 = false ? e : f; - A r3 = true ? e : f; - // ^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'E' can't be assigned to a variable of type 'A'. - B r4 = false ? e : f; - // ^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'E' can't be assigned to a variable of type 'B'. - (true ? e : f).e = null; - (false ? e : f).e = null; -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - E r1 = true ? e : f; - F r2 = false ? e : f; - A r3 = true ? e : f; - // ^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'E' can't be assigned to a variable of type 'A'. - B r4 = false ? e : f; - // ^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'E' can't be assigned to a variable of type 'B'. - var r5; - r5 = (true ? e : f).e; - r5 = (false ? e : f).f; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'f' isn't defined for the class 'E'. -} diff --git a/tests/language_2/least_upper_bound/runtime_10_test.dart b/tests/language_2/least_upper_bound/runtime_10_test.dart deleted file mode 100644 index caeae51c2aa..00000000000 --- a/tests/language_2/least_upper_bound/runtime_10_test.dart +++ /dev/null @@ -1,100 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - - - - - var c = new C(); - - -} - -void testBC(B b, C c) { - - - - - var a = null; - - - (true ? c : a).b = 0; - -} - -void testCD(C c, D d) { - - - - - - -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - - - - - - -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - - - - - var r5; - - -} diff --git a/tests/language_2/least_upper_bound/runtime_11_test.dart b/tests/language_2/least_upper_bound/runtime_11_test.dart deleted file mode 100644 index 2f334d0809d..00000000000 --- a/tests/language_2/least_upper_bound/runtime_11_test.dart +++ /dev/null @@ -1,100 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - - - - - var c = new C(); - - -} - -void testBC(B b, C c) { - - - - - var a = null; - - - - (false ? a : c).c = 0; -} - -void testCD(C c, D d) { - - - - - - -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - - - - - - -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - - - - - var r5; - - -} diff --git a/tests/language_2/least_upper_bound/runtime_12_test.dart b/tests/language_2/least_upper_bound/runtime_12_test.dart deleted file mode 100644 index 5c37565fe89..00000000000 --- a/tests/language_2/least_upper_bound/runtime_12_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -// [NNBD non-migrated]: This test relies on implicit downcasts, so isn't -// meaningful under NNBD. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - - - - - var c = new C(); - - -} - -void testBC(B b, C c) { - - - - - var a = null; - - - - -} - -void testCD(C c, D d) { - C r1 = true ? c : d; - - - - - -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - - - - - - -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - - - - - var r5; - - -} diff --git a/tests/language_2/least_upper_bound/runtime_13_test.dart b/tests/language_2/least_upper_bound/runtime_13_test.dart deleted file mode 100644 index 73b1ed1f950..00000000000 --- a/tests/language_2/least_upper_bound/runtime_13_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -// [NNBD non-migrated]: This test relies on implicit downcasts, so isn't -// meaningful under NNBD. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - - - - - var c = new C(); - - -} - -void testBC(B b, C c) { - - - - - var a = null; - - - - -} - -void testCD(C c, D d) { - - D r2 = false ? c : d; - - - - -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - - - - - - -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - - - - - var r5; - - -} diff --git a/tests/language_2/least_upper_bound/runtime_14_test.dart b/tests/language_2/least_upper_bound/runtime_14_test.dart deleted file mode 100644 index 59ad272a557..00000000000 --- a/tests/language_2/least_upper_bound/runtime_14_test.dart +++ /dev/null @@ -1,100 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - - - - - var c = new C(); - - -} - -void testBC(B b, C c) { - - - - - var a = null; - - - - -} - -void testCD(C c, D d) { - - - (true ? c : d).b = 0; - - - -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - - - - - - -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - - - - - var r5; - - -} diff --git a/tests/language_2/least_upper_bound/runtime_15_test.dart b/tests/language_2/least_upper_bound/runtime_15_test.dart deleted file mode 100644 index 62b3188ee2c..00000000000 --- a/tests/language_2/least_upper_bound/runtime_15_test.dart +++ /dev/null @@ -1,100 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - - - - - var c = new C(); - - -} - -void testBC(B b, C c) { - - - - - var a = null; - - - - -} - -void testCD(C c, D d) { - - - - (false ? c : d).b = 0; - - -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - - - - - - -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - - - - - var r5; - - -} diff --git a/tests/language_2/least_upper_bound/runtime_16_test.dart b/tests/language_2/least_upper_bound/runtime_16_test.dart deleted file mode 100644 index fbfedae3f73..00000000000 --- a/tests/language_2/least_upper_bound/runtime_16_test.dart +++ /dev/null @@ -1,100 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - - - - - var c = new C(); - - -} - -void testBC(B b, C c) { - - - - - var a = null; - - - - -} - -void testCD(C c, D d) { - - - - - - -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - E r1 = true ? e : f; - - - - - -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - - - - - var r5; - - -} diff --git a/tests/language_2/least_upper_bound/runtime_17_test.dart b/tests/language_2/least_upper_bound/runtime_17_test.dart deleted file mode 100644 index 53ba3f6935e..00000000000 --- a/tests/language_2/least_upper_bound/runtime_17_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -// [NNBD non-migrated]: This test relies on implicit downcasts, so isn't -// meaningful under NNBD. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - - - - - var c = new C(); - - -} - -void testBC(B b, C c) { - - - - - var a = null; - - - - -} - -void testCD(C c, D d) { - - - - - - -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - - F r2 = false ? e : f; - - - - -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - - - - - var r5; - - -} diff --git a/tests/language_2/least_upper_bound/runtime_18_test.dart b/tests/language_2/least_upper_bound/runtime_18_test.dart deleted file mode 100644 index 8600210ee39..00000000000 --- a/tests/language_2/least_upper_bound/runtime_18_test.dart +++ /dev/null @@ -1,100 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - - - - - var c = new C(); - - -} - -void testBC(B b, C c) { - - - - - var a = null; - - - - -} - -void testCD(C c, D d) { - - - - - - -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - - - - - (true ? e : f).e = null; - -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - - - - - var r5; - - -} diff --git a/tests/language_2/least_upper_bound/runtime_19_test.dart b/tests/language_2/least_upper_bound/runtime_19_test.dart deleted file mode 100644 index 7c5ebae7dc5..00000000000 --- a/tests/language_2/least_upper_bound/runtime_19_test.dart +++ /dev/null @@ -1,100 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - - - - - var c = new C(); - - -} - -void testBC(B b, C c) { - - - - - var a = null; - - - - -} - -void testCD(C c, D d) { - - - - - - -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - - - - - - (false ? e : f).e = null; -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - - - - - var r5; - - -} diff --git a/tests/language_2/least_upper_bound/runtime_1_test.dart b/tests/language_2/least_upper_bound/runtime_1_test.dart deleted file mode 100644 index 775c95e660f..00000000000 --- a/tests/language_2/least_upper_bound/runtime_1_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -// [NNBD non-migrated]: This test relies on implicit downcasts, so isn't -// meaningful under NNBD. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - A r1 = true ? a : b; - - - - var c = new C(); - - -} - -void testBC(B b, C c) { - - - - - var a = null; - - - - -} - -void testCD(C c, D d) { - - - - - - -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - - - - - - -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - - - - - var r5; - - -} diff --git a/tests/language_2/least_upper_bound/runtime_20_test.dart b/tests/language_2/least_upper_bound/runtime_20_test.dart deleted file mode 100644 index 4e2fe64f957..00000000000 --- a/tests/language_2/least_upper_bound/runtime_20_test.dart +++ /dev/null @@ -1,100 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - - - - - var c = new C(); - - -} - -void testBC(B b, C c) { - - - - - var a = null; - - - - -} - -void testCD(C c, D d) { - - - - - - -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - - - - - - -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - E r1 = true ? e : f; - - - - var r5; - - -} diff --git a/tests/language_2/least_upper_bound/runtime_21_test.dart b/tests/language_2/least_upper_bound/runtime_21_test.dart deleted file mode 100644 index 6cbb67c6d13..00000000000 --- a/tests/language_2/least_upper_bound/runtime_21_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -// [NNBD non-migrated]: This test relies on implicit downcasts, so isn't -// meaningful under NNBD. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - - - - - var c = new C(); - - -} - -void testBC(B b, C c) { - - - - - var a = null; - - - - -} - -void testCD(C c, D d) { - - - - - - -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - - - - - - -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - - F r2 = false ? e : f; - - - var r5; - - -} diff --git a/tests/language_2/least_upper_bound/runtime_22_test.dart b/tests/language_2/least_upper_bound/runtime_22_test.dart deleted file mode 100644 index 0d2398d0c0c..00000000000 --- a/tests/language_2/least_upper_bound/runtime_22_test.dart +++ /dev/null @@ -1,100 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - - - - - var c = new C(); - - -} - -void testBC(B b, C c) { - - - - - var a = null; - - - - -} - -void testCD(C c, D d) { - - - - - - -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - - - - - - -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - - - - - var r5; - r5 = (true ? e : f).e; - -} diff --git a/tests/language_2/least_upper_bound/runtime_2_test.dart b/tests/language_2/least_upper_bound/runtime_2_test.dart deleted file mode 100644 index 5ee9a36490e..00000000000 --- a/tests/language_2/least_upper_bound/runtime_2_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -// [NNBD non-migrated]: This test relies on implicit downcasts, so isn't -// meaningful under NNBD. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - - B r2 = false ? a : b; - - - var c = new C(); - - -} - -void testBC(B b, C c) { - - - - - var a = null; - - - - -} - -void testCD(C c, D d) { - - - - - - -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - - - - - - -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - - - - - var r5; - - -} diff --git a/tests/language_2/least_upper_bound/runtime_3_test.dart b/tests/language_2/least_upper_bound/runtime_3_test.dart deleted file mode 100644 index 816e7997581..00000000000 --- a/tests/language_2/least_upper_bound/runtime_3_test.dart +++ /dev/null @@ -1,100 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - - - - - var c = new C(); - (true ? a as dynamic : c).a = 0; - -} - -void testBC(B b, C c) { - - - - - var a = null; - - - - -} - -void testCD(C c, D d) { - - - - - - -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - - - - - - -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - - - - - var r5; - - -} diff --git a/tests/language_2/least_upper_bound/runtime_4_test.dart b/tests/language_2/least_upper_bound/runtime_4_test.dart deleted file mode 100644 index eb008f4c6dc..00000000000 --- a/tests/language_2/least_upper_bound/runtime_4_test.dart +++ /dev/null @@ -1,100 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - - - - - var c = new C(); - - (false ? c : b).b = 0; -} - -void testBC(B b, C c) { - - - - - var a = null; - - - - -} - -void testCD(C c, D d) { - - - - - - -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - - - - - - -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - - - - - var r5; - - -} diff --git a/tests/language_2/least_upper_bound/runtime_5_test.dart b/tests/language_2/least_upper_bound/runtime_5_test.dart deleted file mode 100644 index 57ceed7e6ca..00000000000 --- a/tests/language_2/least_upper_bound/runtime_5_test.dart +++ /dev/null @@ -1,100 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - - - - - var c = new C(); - - -} - -void testBC(B b, C c) { - B r1 = true ? b : c; - - - - var a = null; - - - - -} - -void testCD(C c, D d) { - - - - - - -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - - - - - - -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - - - - - var r5; - - -} diff --git a/tests/language_2/least_upper_bound/runtime_6_test.dart b/tests/language_2/least_upper_bound/runtime_6_test.dart deleted file mode 100644 index b961fd3b6c1..00000000000 --- a/tests/language_2/least_upper_bound/runtime_6_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -// [NNBD non-migrated]: This test relies on implicit downcasts, so isn't -// meaningful under NNBD. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - - - - - var c = new C(); - - -} - -void testBC(B b, C c) { - - C r2 = false ? b : c; - - - var a = null; - - - - -} - -void testCD(C c, D d) { - - - - - - -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - - - - - - -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - - - - - var r5; - - -} diff --git a/tests/language_2/least_upper_bound/runtime_7_test.dart b/tests/language_2/least_upper_bound/runtime_7_test.dart deleted file mode 100644 index 7557361c518..00000000000 --- a/tests/language_2/least_upper_bound/runtime_7_test.dart +++ /dev/null @@ -1,100 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - - - - - var c = new C(); - - -} - -void testBC(B b, C c) { - - - (true ? b : c).b = 0; - - var a = null; - - - - -} - -void testCD(C c, D d) { - - - - - - -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - - - - - - -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - - - - - var r5; - - -} diff --git a/tests/language_2/least_upper_bound/runtime_8_test.dart b/tests/language_2/least_upper_bound/runtime_8_test.dart deleted file mode 100644 index 0bbad5e8a49..00000000000 --- a/tests/language_2/least_upper_bound/runtime_8_test.dart +++ /dev/null @@ -1,100 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - - - - - var c = new C(); - - -} - -void testBC(B b, C c) { - - - - - var a = null; - (true ? b : a).b = 0; - - - -} - -void testCD(C c, D d) { - - - - - - -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - - - - - - -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - - - - - var r5; - - -} diff --git a/tests/language_2/least_upper_bound/runtime_9_test.dart b/tests/language_2/least_upper_bound/runtime_9_test.dart deleted file mode 100644 index 03aa22d1cd8..00000000000 --- a/tests/language_2/least_upper_bound/runtime_9_test.dart +++ /dev/null @@ -1,100 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - - - - - var c = new C(); - - -} - -void testBC(B b, C c) { - - - - - var a = null; - - (false ? a : b).c = 0; - - -} - -void testCD(C c, D d) { - - - - - - -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - - - - - - -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - - - - - var r5; - - -} diff --git a/tests/language_2/least_upper_bound/runtime_test.dart b/tests/language_2/least_upper_bound/runtime_test.dart deleted file mode 100644 index f0df39c2a50..00000000000 --- a/tests/language_2/least_upper_bound/runtime_test.dart +++ /dev/null @@ -1,100 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test least upper bound through type checking of conditionals. - -class A { - var a; -} - -class B { - var b; -} - -class C extends B { - var c; -} - -class D extends B { - var d; -} - -class E { - T e; - - E(this.e); -} - -class F extends E { - T f; - - F(T f) - : this.f = f, - super(f); -} - -void main() { - testAB(new A(), new B()); - testBC(new C(), new C()); - testCD(new C(), new D()); - testEE(new F(new C()), new F(new C())); - testEF(new F(new C()), new F(new C())); -} - -void testAB(A a, B b) { - - - - - var c = new C(); - - -} - -void testBC(B b, C c) { - - - - - var a = null; - - - - -} - -void testCD(C c, D d) { - - - - - - -} - -void testEE(E e, E f) { - // The least upper bound of E and E is E. - - - - - - -} - -void testEF(E e, F f) { - // The least upper bound of E and F is E. - - - - - var r5; - - -} diff --git a/tests/language_2/library/ambiguous_test.dart b/tests/language_2/library/ambiguous_test.dart deleted file mode 100644 index 228bc10f9ba..00000000000 --- a/tests/language_2/library/ambiguous_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012, 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 - -// This test should fail to load because we are importing two libraries -// which define the same top level name foo, and we are referring to the name. - -import "library1.dart"; // Defines top level variable 'foo' -import "library2.dart"; // Defines top level variable 'foo' - -class X -extends baw // //# 05: compile-time error -{} - -main() { - print(foo); //# 00: compile-time error - print(bar()); //# 01: compile-time error - print(baz()); //# 02: compile-time error - print(bay()); //# 03: compile-time error - print(main is bax); //# 04: compile-time error - var x = new X(); - print("No error expected if ambiguous definitions are not used."); -} diff --git a/tests/language_2/library/env_test.dart b/tests/language_2/library/env_test.dart deleted file mode 100644 index 34fd5b55805..00000000000 --- a/tests/language_2/library/env_test.dart +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'package:expect/expect.dart'; -import 'package:expect/config.dart'; - -main() { - const NOT_PRESENT = false; - - Expect.isTrue(const bool.fromEnvironment("dart.library.async")); - Expect.isTrue(const bool.fromEnvironment("dart.library.collection")); - Expect.isTrue(const bool.fromEnvironment("dart.library.convert")); - Expect.isTrue(const bool.fromEnvironment("dart.library.core")); - Expect.isTrue(const bool.fromEnvironment("dart.library.typed_data")); - Expect.isTrue(const bool.fromEnvironment("dart.library.developer")); - - // Internal libraries should not be exposed. - Expect.equals( - NOT_PRESENT, - const bool.fromEnvironment("dart.library._internal", - defaultValue: NOT_PRESENT)); - - bool hasHtmlSupport; - hasHtmlSupport = true; //# has_html_support: ok - hasHtmlSupport = false; //# has_no_html_support: ok - - if (hasHtmlSupport != null) { - bool expectedResult = hasHtmlSupport ? true : NOT_PRESENT; - - Expect.equals( - expectedResult, - const bool.fromEnvironment("dart.library.html", - defaultValue: NOT_PRESENT)); - Expect.equals( - expectedResult, - const bool.fromEnvironment("dart.library.indexed_db", - defaultValue: NOT_PRESENT)); - Expect.equals( - expectedResult, - const bool.fromEnvironment("dart.library.svg", - defaultValue: NOT_PRESENT)); - Expect.equals( - expectedResult, - const bool.fromEnvironment("dart.library.web_audio", - defaultValue: NOT_PRESENT)); - Expect.equals( - expectedResult, - const bool.fromEnvironment("dart.library.web_gl", - defaultValue: NOT_PRESENT)); - } - - bool hasIoSupport; - hasIoSupport = true; //# has_io_support: ok - hasIoSupport = false; //# has_no_io_support: ok - - if (hasIoSupport != null) { - // Web platforms override 'dart.library.io' to return "false". - // We don't test for the non-existence, but just make sure that - // dart.library.io is not set to true. - Expect.equals(hasIoSupport, - const bool.fromEnvironment("dart.library.io", defaultValue: false)); - } - - bool hasMirrorSupport = !isDart2jsConfiguration && - !isDdcConfiguration && !isVmAotConfiguration; - Expect.equals( - hasMirrorSupport, - const bool.fromEnvironment("dart.library.mirrors", - defaultValue: NOT_PRESENT)); - - Expect.equals( - NOT_PRESENT, - const bool.fromEnvironment("dart.library.XYZ", - defaultValue: NOT_PRESENT)); - Expect.equals( - NOT_PRESENT, - const bool.fromEnvironment("dart.library.Collection", - defaultValue: NOT_PRESENT)); - Expect.equals( - NOT_PRESENT, - const bool.fromEnvironment("dart.library.converT", - defaultValue: NOT_PRESENT)); - Expect.equals(NOT_PRESENT, - const bool.fromEnvironment("dart.library.", defaultValue: NOT_PRESENT)); - Expect.equals( - NOT_PRESENT, - const bool.fromEnvironment("dart.library.core ", - defaultValue: NOT_PRESENT)); -} diff --git a/tests/language_2/library/juxtaposition_lib.dart b/tests/language_2/library/juxtaposition_lib.dart deleted file mode 100644 index d1fdb716a0f..00000000000 --- a/tests/language_2/library/juxtaposition_lib.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2012, 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 lib; - -part "" "juxtaposition_" "part.dart"; diff --git a/tests/language_2/library/juxtaposition_part.dart b/tests/language_2/library/juxtaposition_part.dart deleted file mode 100644 index dcae020d7cf..00000000000 --- a/tests/language_2/library/juxtaposition_part.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2012, 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 - -part of lib; - -const c = 47; diff --git a/tests/language_2/library/juxtaposition_test.dart b/tests/language_2/library/juxtaposition_test.dart deleted file mode 100644 index 4c4b4a552f3..00000000000 --- a/tests/language_2/library/juxtaposition_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; -import "" "juxtaposition_" "lib.dart"; -export "" "juxtaposition_" "lib.dart"; - -main() { - Expect.equals(c, 47); -} diff --git a/tests/language_2/library/library1.dart b/tests/language_2/library/library1.dart deleted file mode 100644 index 78c860cb772..00000000000 --- a/tests/language_2/library/library1.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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 library1.dart; - -var foo; - -bar() => "library1.dart bar()"; - -baz() => "library1.dart baz()"; - -var bay; - -typedef int bax(int a, int b); - -class baw {} diff --git a/tests/language_2/library/library1_lib.dart b/tests/language_2/library/library1_lib.dart deleted file mode 100644 index 1d36227b7c6..00000000000 --- a/tests/language_2/library/library1_lib.dart +++ /dev/null @@ -1,14 +0,0 @@ -// 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 Library1Lib; - -class A { - A() {} - String foo() { - return "foo-rty two"; - } -} diff --git a/tests/language_2/library/library1_test.dart b/tests/language_2/library/library1_test.dart deleted file mode 100644 index 6b3cfdf5fbe..00000000000 --- a/tests/language_2/library/library1_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// 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 test program for testing libraries. - -// @dart = 2.9 - -library Library1Test.dart; - -import "package:expect/expect.dart"; -import "library1_lib.dart"; - -main() { - Library1Test.testMain(); -} - -class Library1Test { - static testMain() { - var a = new A(); - String s = a.foo(); - Expect.equals(s, "foo-rty two"); - } -} diff --git a/tests/language_2/library/library2.dart b/tests/language_2/library/library2.dart deleted file mode 100644 index 8a1a94eed27..00000000000 --- a/tests/language_2/library/library2.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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 - -var foo; -var foo1 = 0; - -bar() => "library2.dart bar()"; - -var baz; - -bay() => "library2.dart bay()"; - -typedef double bax(int a, int b); - -var baw; diff --git a/tests/language_2/library/library5_test.dart b/tests/language_2/library/library5_test.dart deleted file mode 100644 index 86547eff1a6..00000000000 --- a/tests/language_2/library/library5_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// 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 Library5Test.dart; - -import "package:expect/expect.dart"; -import "library5a.dart" as lib5a; -import "library5b.dart" as lib5b; - -int foo(lib5a.Fun f) { - return f(); -} - -int bar(lib5b.Fun f) { - return f(42); -} - -main() { - Expect.equals(41, foo(() => 41)); - Expect.equals(42, bar((x) => x)); -} diff --git a/tests/language_2/library/library5a.dart b/tests/language_2/library/library5a.dart deleted file mode 100644 index 16d57c5a783..00000000000 --- a/tests/language_2/library/library5a.dart +++ /dev/null @@ -1,10 +0,0 @@ -// 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 Library5a.dart; - -typedef int Fun(); diff --git a/tests/language_2/library/library5b.dart b/tests/language_2/library/library5b.dart deleted file mode 100644 index a46bd3bbcc6..00000000000 --- a/tests/language_2/library/library5b.dart +++ /dev/null @@ -1,10 +0,0 @@ -// 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 Library5b.dart; - -typedef int Fun(x); diff --git a/tests/language_2/library/library6_test.dart b/tests/language_2/library/library6_test.dart deleted file mode 100644 index fb089f917d3..00000000000 --- a/tests/language_2/library/library6_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2012, 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 - -// This tests that it is not a compile-time error to both import a library -// that defines a function type alias and to have a local definition for -// another function type alias with the same name. - -import "library5a.dart"; // Defines function type alias Fun - -typedef int Fun(); // Does not conflict with definition of Fun from library5a - -main() {} diff --git a/tests/language_2/library/library_test.dart b/tests/language_2/library/library_test.dart deleted file mode 100644 index c7dffb53e82..00000000000 --- a/tests/language_2/library/library_test.dart +++ /dev/null @@ -1,11 +0,0 @@ -// 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 - -import "nonexistent_library.dart"; //# 01: compile-time error - -main() { - print("Er, hello world? This should not be printed!"); -} diff --git a/tests/language_2/library/prefixes.dart b/tests/language_2/library/prefixes.dart deleted file mode 100644 index 377493f40d9..00000000000 --- a/tests/language_2/library/prefixes.dart +++ /dev/null @@ -1,76 +0,0 @@ -// 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 LibraryPrefixes.lib; - -import "prefixes_test1.dart"; -import "prefixes_test2.dart" as other; - -class LibraryPrefixes { - static void main(var expectEquals) { - var a = Constants.PI; - var b = other.Constants.PI; - expectEquals(3.14, a); - expectEquals(3.14, b); - - expectEquals(1, Constants.foo); - expectEquals(2, other.Constants.foo); - - expectEquals(-1, A.y); - expectEquals(0, other.A.y); - - expectEquals(1, new A().x); - expectEquals(2, new other.A().x); - - expectEquals(3, new A.named().x); - expectEquals(4, new other.A.named().x); - - expectEquals(3, new A.fac().x); - expectEquals(4, new other.A.fac().x); - - expectEquals(1, new B().x); - expectEquals(2, new other.B().x); - - expectEquals(8, new B.named().x); - expectEquals(13, new other.B.named().x); - - expectEquals(8, new B.fac().x); - expectEquals(13, new other.B.fac().x); - - expectEquals(1, const C().x); - expectEquals(2, const other.C().x); - - expectEquals(3, const C.named().x); - expectEquals(4, const other.C.named().x); - - expectEquals(3, new C.fac().x); - expectEquals(4, new other.C.fac().x); - - expectEquals(1, const D().x); - expectEquals(2, const other.D().x); - - expectEquals(8, const D.named().x); - expectEquals(13, const other.D.named().x); - - expectEquals(8, new D.fac().x); - expectEquals(13, new other.D.fac().x); - - expectEquals(0, E.foo()); - expectEquals(3, other.E.foo()); - - expectEquals(1, new E().bar()); - expectEquals(4, new other.E().bar()); - - expectEquals(9, new E().toto(7)()); - expectEquals(16, new other.E().toto(11)()); - - expectEquals(111, (new E.fun(100).f)()); - expectEquals(1313, (new other.E.fun(1300).f)()); - - expectEquals(999, E.fooo(900)()); - expectEquals(2048, other.E.fooo(1024)()); - } -} diff --git a/tests/language_2/library/prefixes_test.dart b/tests/language_2/library/prefixes_test.dart deleted file mode 100644 index fdc790375dc..00000000000 --- a/tests/language_2/library/prefixes_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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 LibraryPrefixesTest.dart; - -import "package:expect/expect.dart"; -import "prefixes.dart"; - -class LibraryPrefixesTest { - static testMain() { - LibraryPrefixes.main((a, b) { - Expect.equals(a, b); - }); - } -} - -main() { - LibraryPrefixesTest.testMain(); -} diff --git a/tests/language_2/library/prefixes_test1.dart b/tests/language_2/library/prefixes_test1.dart deleted file mode 100644 index 9cdc1c64969..00000000000 --- a/tests/language_2/library/prefixes_test1.dart +++ /dev/null @@ -1,75 +0,0 @@ -// 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 - -class Constants { - static const PI = 3.14; - static const foo = 1; -} - -class A { - static const y = -1; - int x; - A() : x = 1 {} - A.named() : x = 3 {} - A.superC(x) : x = x + 7 {} - factory A.fac() { - return new A.named(); - } -} - -class B extends A { - B() : super() {} - B.named() : super.superC(1) {} - factory B.fac() { - return new B.named(); - } -} - -class C { - final int x; - const C() : x = 1; - const C.named() : x = 3; - const C.superC(x) : x = x + 7; - factory C.fac() { - return const C.named(); - } -} - -class D extends C { - const D() : super(); - const D.named() : super.superC(1); - factory D.fac() { - return const D.named(); - } -} - -class E { - var f; - E() {} - E.fun(x) - : f = (() { - return x + 11; - }) {} - static foo() { - return 0; - } - - static fooo(x) { - return () { - return x + 99; - }; - } - - bar() { - return 1; - } - - toto(x) { - return () { - return x + 2; - }; - } -} diff --git a/tests/language_2/library/prefixes_test2.dart b/tests/language_2/library/prefixes_test2.dart deleted file mode 100644 index d1dd475c9ea..00000000000 --- a/tests/language_2/library/prefixes_test2.dart +++ /dev/null @@ -1,75 +0,0 @@ -// 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 - -class Constants { - static const PI = 3.14; - static const foo = 2; -} - -class A { - static const y = 0; - int x; - A() : x = 2 {} - A.named() : x = 4 {} - A.superC(x) : x = x + 11 {} - factory A.fac() { - return new A.named(); - } -} - -class B extends A { - B() : super() {} - B.named() : super.superC(2) {} - factory B.fac() { - return new B.named(); - } -} - -class C { - final int x; - const C() : x = 2; - const C.named() : x = 4; - const C.superC(x) : x = x + 11; - factory C.fac() { - return const C.named(); - } -} - -class D extends C { - const D() : super(); - const D.named() : super.superC(2); - factory D.fac() { - return const D.named(); - } -} - -class E { - var f; - E() {} - E.fun(x) - : f = (() { - return x + 13; - }) {} - static foo() { - return 3; - } - - static fooo(x) { - return () { - return x + 1024; - }; - } - - bar() { - return 4; - } - - toto(x) { - return () { - return x + 5; - }; - } -} diff --git a/tests/language_2/library/private_in_constructor_a.dart b/tests/language_2/library/private_in_constructor_a.dart deleted file mode 100644 index 0353149653d..00000000000 --- a/tests/language_2/library/private_in_constructor_a.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2012, 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 LibraryPrivateInConstructorA; - -class PrivateA { - const PrivateA(); - final _val = 499; -} - -var fooA = const PrivateA(); - -class A { - var x; - A() : this.x = fooA._val; -} diff --git a/tests/language_2/library/private_in_constructor_b.dart b/tests/language_2/library/private_in_constructor_b.dart deleted file mode 100644 index 04f717336c0..00000000000 --- a/tests/language_2/library/private_in_constructor_b.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2012, 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 LibraryPrivateInConstructorB; - -import "private_in_constructor_a.dart"; - -class PrivateB { - const PrivateB(); - final _val = 42; -} - -var fooB = const PrivateB(); - -class B extends A { - var y; - B() : this.y = fooB._val; -} diff --git a/tests/language_2/library/private_in_constructor_test.dart b/tests/language_2/library/private_in_constructor_test.dart deleted file mode 100644 index c26bedc16be..00000000000 --- a/tests/language_2/library/private_in_constructor_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2012, 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 LibraryPrivateInConstructor; - -import "package:expect/expect.dart"; -import "private_in_constructor_a.dart"; -import "private_in_constructor_b.dart"; - -main() { - var b = new B(); - Expect.equals(499, b.x); - Expect.equals(42, b.y); -} diff --git a/tests/language_2/library/same_name_used_lib1.dart b/tests/language_2/library/same_name_used_lib1.dart deleted file mode 100644 index 67c946a06f0..00000000000 --- a/tests/language_2/library/same_name_used_lib1.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2012, 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 lib1; - -import 'same_name_used_lib2.dart' as lib2; - -abstract class X {} - -X makeX() { - return new lib2.X(); -} diff --git a/tests/language_2/library/same_name_used_lib2.dart b/tests/language_2/library/same_name_used_lib2.dart deleted file mode 100644 index 7b9c605fd95..00000000000 --- a/tests/language_2/library/same_name_used_lib2.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2012, 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 lib2; - -import 'same_name_used_lib1.dart' as lib1; // for abstract class X. - -class X implements lib1.X { - X(); - toString() => 'lib2.X'; -} diff --git a/tests/language_2/library/same_name_used_test.dart b/tests/language_2/library/same_name_used_test.dart deleted file mode 100644 index 9efc200cf45..00000000000 --- a/tests/language_2/library/same_name_used_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2012, 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 - -// 'X' is defined as an abstract class in lib1 and a class implementing that -// abstract class in lib2. Use of import prefixes should allow this. - -library main; - -import "package:expect/expect.dart"; -import "same_name_used_lib1.dart"; - -main() { - var x = makeX(); - Expect.equals('lib2.X', '$x'); -} diff --git a/tests/language_2/library1.dart b/tests/language_2/library1.dart deleted file mode 100644 index 78c860cb772..00000000000 --- a/tests/language_2/library1.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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 library1.dart; - -var foo; - -bar() => "library1.dart bar()"; - -baz() => "library1.dart baz()"; - -var bay; - -typedef int bax(int a, int b); - -class baw {} diff --git a/tests/language_2/library10.dart b/tests/language_2/library10.dart deleted file mode 100644 index 9a173790c43..00000000000 --- a/tests/language_2/library10.dart +++ /dev/null @@ -1,42 +0,0 @@ -// 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 library10.dart; - -import "library11.dart" as lib11; -import "package:expect/expect.dart"; - -class Library10 { - Library10(this.fld); - func() { - return 2; - } - - var fld; - static static_func() { - var result = 0; - var obj = new lib11.Library11(4); - result = obj.fld; - Expect.equals(4, result); - result += obj.func(); - Expect.equals(7, result); - result += lib11.Library11.static_func(); - Expect.equals(9, result); - result += lib11.Library11.static_fld; - Expect.equals(10, result); - Expect.equals(100, lib11.top_level11); - Expect.equals(200, lib11.top_level_func11()); - return 3; - } - - static var static_fld = 4; -} - -const int top_level10 = 10; -top_level_func10() { - return 20; -} diff --git a/tests/language_2/library11.dart b/tests/language_2/library11.dart deleted file mode 100644 index 5523666d676..00000000000 --- a/tests/language_2/library11.dart +++ /dev/null @@ -1,33 +0,0 @@ -// 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 library11.dart; - -class Library11 { - Library11(this.fld); - Library11.namedConstructor(this.fld); - func() { - return 3; - } - - var fld; - static static_func() { - return 2; - } - - static var static_fld = 1; -} - -class Library111 { - Library111.namedConstructor(T this.fld); - T fld; -} - -const int top_level11 = 100; -top_level_func11() { - return 200; -} diff --git a/tests/language_2/library12.dart b/tests/language_2/library12.dart deleted file mode 100644 index 3203a89f3f8..00000000000 --- a/tests/language_2/library12.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2012, 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 library12.dart; - -import 'package:expect/expect.dart'; - -import "library11.dart"; - -class Library12 { - Library12(this.fld); - Library12.other(fld, multiplier) { - this.fld = fld * multiplier; - } - func() { - return 2; - } - - var fld; - static static_func() { - var result = 0; - var obj = new Library11(4); - result = obj.fld; - Expect.equals(4, result); - result += obj.func(); - Expect.equals(7, result); - result += Library11.static_func(); - Expect.equals(9, result); - result += Library11.static_fld; - Expect.equals(10, result); - Expect.equals(100, top_level11); - Expect.equals(200, top_level_func11()); - return 3; - } - - static var static_fld = 4; -} - -abstract class Library12Interface { - Library12 addObjects(Library12 value1, Library12 value2); -} - -const int top_level12 = 10; -top_level_func12() { - return 20; -} diff --git a/tests/language_2/library2.dart b/tests/language_2/library2.dart deleted file mode 100644 index 8a1a94eed27..00000000000 --- a/tests/language_2/library2.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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 - -var foo; -var foo1 = 0; - -bar() => "library2.dart bar()"; - -var baz; - -bay() => "library2.dart bay()"; - -typedef double bax(int a, int b); - -var baw; diff --git a/tests/language_2/list/double_index_in_loop2_test.dart b/tests/language_2/list/double_index_in_loop2_test.dart deleted file mode 100644 index 7633b07e51e..00000000000 --- a/tests/language_2/list/double_index_in_loop2_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing arrays. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -bar() => true; - -tata() => 1.5; - -// The type propagation in Dart2Js wrongly took the intersection of all incoming -// types in a loop-phi. In this case the back-edge brought type 'number' which, -// combined with 'integer' (i = 0) was narrowed to 'integer'. As a result no -// check was inserted for the list access. -foo(a) { - var i; - if (bar()) { - // t's desired type is conflicting. Once it is used as array receiver. And - // once as integer. The backward propagation thus can't decide. - // The forward declaration, however, will assign type num. - dynamic t = 0 + tata(); - i = t; - if (!bar()) t[0]; - } else { - i = 0; - } - for (int j = 0; j < 1; j++) { - // The phi, combining the two 'i's must reach the conclusion that i is of - // type num and therefore needs a check before accessing the array. - a[i]; - } -} - -main() { - Expect.throws(() => foo([1, 2])); -} diff --git a/tests/language_2/list/double_index_in_loop_test.dart b/tests/language_2/list/double_index_in_loop_test.dart deleted file mode 100644 index 92ab549541c..00000000000 --- a/tests/language_2/list/double_index_in_loop_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing arrays. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -bar() => true; - -// The type propagation in Dart2Js wrongly took the intersection of all incoming -// types in a loop-phi. In this case the back-edge brought type 'number' which, -// combined with 'integer' (i = 0) was narrowed to 'integer'. As a result no -// check was inserted for the list access. -foo(a) { - num i = 0; - while (true) { - if (i > 1) return a[i]; - if (bar()) { - // Adding a double guarantees a double result. Therefore guard by an if. - i = i + 1.5; - } - } -} - -main() { - Expect.throws(() => foo([1, 2])); -} diff --git a/tests/language_2/list/in_closure_test.dart b/tests/language_2/list/in_closure_test.dart deleted file mode 100644 index 539b0abc97a..00000000000 --- a/tests/language_2/list/in_closure_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to see aborting closure -// bodies as aborting their enclosing element. - -import "package:expect/expect.dart"; - -main() { - var c = () { - throw 42; - }; - () { - // dart2js would not seen this initialization and therefore think - // that the argument passed to a is a list of nulls. - var a = [42]; - foo(a); - }(); -} - -foo(arg) { - Expect.isTrue(arg[0] == 42); -} diff --git a/tests/language_2/list/is_test.dart b/tests/language_2/list/is_test.dart deleted file mode 100644 index 26699566137..00000000000 --- a/tests/language_2/list/is_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - bar() => []; -} - -main() { - check([], true, false, false); - check([], true, true, false); - check([], true, false, true); - check(new A().bar(), true, false, false); - check(new A().bar(), true, true, false); - check(new A().bar(), true, false, true); - check(new Object(), false, false, false); -} - -check(val, expectList, expectListInt, expectListDouble) { - Expect.equals(expectList, val is List); - Expect.equals(expectListInt, val is List); - Expect.equals(expectListDouble, val is List); -} diff --git a/tests/language_2/list/length_tracer_test.dart b/tests/language_2/list/length_tracer_test.dart deleted file mode 100644 index 6d9417a58ba..00000000000 --- a/tests/language_2/list/length_tracer_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that dart2js' optimization on list length does not fold a -// length getter to a constant if the receiver can be null. - -import "package:expect/expect.dart"; - -var a = 42; -var b; - -main() { - Expect.throws(() => b.length); - b = const [42]; -} diff --git a/tests/language_2/list/list_test.dart b/tests/language_2/list/list_test.dart deleted file mode 100644 index 5139b72e40f..00000000000 --- a/tests/language_2/list/list_test.dart +++ /dev/null @@ -1,134 +0,0 @@ -// 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 test program for testing arrays. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A {} - -class B {} - -class ListTest { - static void TestIterator() { - List a = new List.filled(10, null); - int count = 0; - - // Basic iteration over ObjectList. - for (int elem in a) { - Expect.equals(null, elem); - count++; - } - Expect.equals(10, count); - - // List length is 0. - List fa = []; - count = 0; - for (int elem in fa) { - count++; - } - Expect.equals(0, count); - - // Iterate over ImmutableList. - List ca = const [0, 1, 2, 3, 4, 5]; - int sum = 0; - for (int elem in ca) { - sum += elem; - fa.add(elem); - } - Expect.equals(15, sum); - - // Iterate over List. - int sum2 = 0; - for (int elem in fa) { - sum2 += elem; - } - Expect.equals(sum, sum2); - } - - static void testSublistTypeArguments() { - final list1 = new List.filled(0, null).sublist(0); - Expect.isTrue(list1 is List); - Expect.isTrue(list1 is! List); - - final list2 = new List.filled(0, null).toList(growable: false); - Expect.isTrue(list2 is List); - Expect.isTrue(list2 is! List); - } - - static void testMain() { - int len = 10; - List a = new List.filled(len, null); - Expect.equals(true, a is List); - Expect.equals(len, a.length); - a.forEach((element) { - Expect.equals(null, element); - }); - a[1] = 1; - Expect.equals(1, a[1]); - Expect.throwsRangeError(() => a[len]); - - Expect.throws(() { - List a = new List.filled(4, null); - a.setRange(1, 2, a, null); - }); - - Expect.throws(() { - List a = new List.filled(4, null); - a.setRange(1, 2, const [1, 2, 3, 4], null); - }); - - Expect.throwsRangeError(() { - List a = new List.filled(4, null); - a.setRange(10, 11, a, 1); - }); - - a = new List.filled(4, null); - List b = new List.filled(4, null); - b.setRange(0, 4, a, 0); - - List unsorted = [4, 3, 9, 12, -4, 9]; - int compare(a, b) { - if (a < b) return -1; - if (a > b) return 1; - return 0; - } - - unsorted.sort(compare); - Expect.equals(6, unsorted.length); - Expect.equals(-4, unsorted[0]); - Expect.equals(12, unsorted[unsorted.length - 1]); - int compare2(a, b) { - if (a < b) return 1; - if (a > b) return -1; - return 0; - } - - unsorted.sort(compare2); - Expect.equals(12, unsorted[0]); - Expect.equals(-4, unsorted[unsorted.length - 1]); - Set t = new Set.from(unsorted); - Expect.equals(true, t.contains(9)); - Expect.equals(true, t.contains(-4)); - Expect.equals(false, t.contains(-3)); - Expect.equals(6, unsorted.length); - Expect.equals(5, t.length); - TestIterator(); - int element = unsorted[2]; - Expect.equals(9, element); - - Expect.throws(() => new List.filled(-1, null)); - Expect.throws(() => new List.filled(0x7ffffffffffff000, null)); - - List list = []; - Expect.throwsRangeError(list.removeLast); - Expect.equals(0, list.length); - } -} - -main() { - ListTest.testMain(); - ListTest.testSublistTypeArguments(); -} diff --git a/tests/language_2/list/literal1_runtime_test.dart b/tests/language_2/list/literal1_runtime_test.dart deleted file mode 100644 index e6f9ab9e3f4..00000000000 --- a/tests/language_2/list/literal1_runtime_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. -// -// A type mismatch in a list literal is a compile-time error - -main() { - var m = const - - [0, 1]; -} diff --git a/tests/language_2/list/literal1_test.dart b/tests/language_2/list/literal1_test.dart deleted file mode 100644 index a34bec137fa..00000000000 --- a/tests/language_2/list/literal1_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// 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 type mismatch in a list literal is a compile-time error - -// @dart = 2.9 - -main() { - var m = const - - [0, 1]; -// ^ -// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE -// [cfe] A value of type 'int' can't be assigned to a variable of type 'String'. -// ^ -// [analyzer] COMPILE_TIME_ERROR.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE -// [cfe] A value of type 'int' can't be assigned to a variable of type 'String'. -} diff --git a/tests/language_2/list/literal2_test.dart b/tests/language_2/list/literal2_test.dart deleted file mode 100644 index d1c9d47acb2..00000000000 --- a/tests/language_2/list/literal2_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// 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. -// Test program for array literals. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class ArrayLiteral2Test { - static const int LAUREL = 1965; - static const int HARDY = 1957; - - static const LUCKY_DOG = const [1919, 1921]; - static const MUSIC_BOX = const [LAUREL, HARDY]; - - static testMain() { - Expect.equals(2, LUCKY_DOG.length); - Expect.equals(2, MUSIC_BOX.length); - - Expect.equals(1919, LUCKY_DOG[0]); - Expect.equals(1921, LUCKY_DOG[1]); - - Expect.equals(LAUREL, MUSIC_BOX[0]); - Expect.equals(HARDY, MUSIC_BOX[1]); - } -} - -main() { - ArrayLiteral2Test.testMain(); -} diff --git a/tests/language_2/list/literal3_test.dart b/tests/language_2/list/literal3_test.dart deleted file mode 100644 index 248eaae8f4d..00000000000 --- a/tests/language_2/list/literal3_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// 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. -// Check that arrays from const array literals are immutable. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class ListLiteral3Test { - static const List canonicalJoke = const ["knock", "knock"]; - - static testMain() { - List joke = const ["knock", "knock"]; - // Elements of canonical lists are canonicalized. - Expect.identical(joke, canonicalJoke); - Expect.identical(joke[0], joke[1]); - Expect.identical(joke[0], canonicalJoke[0]); - - // Lists from literals are immutable. - Expect.throwsUnsupportedError(() => joke[0] = "sock"); - Expect.identical(joke[0], joke[1]); - - // Make sure lists allocated at runtime are mutable and are - // not canonicalized. - List lame_joke = ["knock", "knock"]; // Invokes operator new. - Expect.identical(joke[1], lame_joke[1]); - // Operator new creates a mutable list. - Expect.equals(false, identical(joke, lame_joke)); - lame_joke[1] = "who"; - Expect.identical("who", lame_joke[1]); - - // Elements of canonical lists are canonicalized. - List> a = const >[ - const [1, 2], - const [1, 2] - ]; - Expect.identical(a[0], a[1]); - Expect.identical(a[0][0], a[1][0]); - Expect.throwsUnsupportedError(() => a[0][0] = 42); - - List> b = const [ - const [1.0, 2.0], - const [1.0, 2.0] - ]; - Expect.identical(b[0], b[1]); - Expect.equals(true, b[0][0] == 1.0); - Expect.identical(b[0][0], b[1][0]); - Expect.throwsUnsupportedError(() => b[0][0] = 42.0); - } -} - -main() { - ListLiteral3Test.testMain(); -} diff --git a/tests/language_2/list/literal4_test.dart b/tests/language_2/list/literal4_test.dart deleted file mode 100644 index 95039a2cedc..00000000000 --- a/tests/language_2/list/literal4_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class ListLiteral4Test { - void test() { - int result = 0; - { - var m = [0, 1]; //# 00: compile-time error - } - { - var m = [0, 1]; - m["0"] = 1; //# 01: compile-time error - } - { - var m = ["a" as T, "b" as T]; //# 02: runtime error - } - var m = [0 as T, 1 as T]; // OK. - { - var m = [0 as T, 1 as T]; - m["0"] = 1; //# 03: compile-time error - } - { - var m = const [0, 1]; - m["0"] = 1; //# 04: compile-time error - } - { - var m = [0 as T, 1 as T]; // OK. Tested above. - List ls = m; //# 05: compile-time error - } - } -} - -main() { - var t = new ListLiteral4Test(); - t.test(); -} diff --git a/tests/language_2/list/literal5_test.dart b/tests/language_2/list/literal5_test.dart deleted file mode 100644 index f9b63531ed8..00000000000 --- a/tests/language_2/list/literal5_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Legacy compound literal syntax that should go away. - -main() { - new List[1, 2]; -//^^^^^^^^ -// [analyzer] SYNTACTIC_ERROR.LITERAL_WITH_CLASS_AND_NEW -// [cfe] A list literal can't be prefixed by 'new List'. -} diff --git a/tests/language_2/list/literal6_test.dart b/tests/language_2/list/literal6_test.dart deleted file mode 100644 index f14b4fd8bf0..00000000000 --- a/tests/language_2/list/literal6_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Dart test program const map literals. - -class ListLiteral2NegativeTest { - test() { - // Type parameter is not allowed with const. - var m = const []; - // ^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_TYPE_ARGUMENT_IN_CONST_LITERAL - // [cfe] Type variables can't be used as constants. - } -} - -main() { - ListLiteral2NegativeTest().test(); -} diff --git a/tests/language_2/list/literal_syntax_test.dart b/tests/language_2/list/literal_syntax_test.dart deleted file mode 100644 index 827a4ec68cc..00000000000 --- a/tests/language_2/list/literal_syntax_test.dart +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -abstract class I {} - -void main() { - var list; - list = < - int - I //# 00: syntax error - , int //# 01: compile-time error - >[0]; - Expect.equals(1, list.length); - - list = < - int - , int //# 02: compile-time error - , int //# 02: continued - >[0]; - Expect.equals(1, list.length); - - list = < - int - , int //# 03: compile-time error - , int //# 03: continued - , int //# 03: continued - >[0]; - Expect.equals(1, list.length); - - list = - <> //# 04: syntax error - [0]; - Expect.equals(1, list.length); - - list = - <<>> //# 05: syntax error - [0]; - Expect.equals(1, list.length); - - list = - <<<>>> //# 06: syntax error - [0]; - Expect.equals(1, list.length); - - list = - <[]> //# 07: syntax error - [0]; - Expect.equals(1, list.length); - - list = [ - [ - [1][0] - ][0] - ]; - Expect.equals(1, list.length); - Expect.equals(1, list[0]); - - list = [ - >[ - [1] - ][0][0] - ]; - Expect.equals(1, list.length); - Expect.equals(1, list[0]); -} diff --git a/tests/language_2/list/literal_test.dart b/tests/language_2/list/literal_test.dart deleted file mode 100644 index c877081cd1b..00000000000 --- a/tests/language_2/list/literal_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// 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. -// Test program for array literals. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class ListLiteralTest { - static const LAUREL = 1; - static const HARDY = 2; - - static testMain() { - var funny = [ - LAUREL, - HARDY, - ]; // Check that trailing comma works. - Expect.equals(2, funny.length); - - List m = [101, 102, 100 + 3]; - Expect.equals(3, m.length); - Expect.equals(101, m[0]); - Expect.equals(103, m[2]); - - var d = m[2] - m[1]; - Expect.equals(1, d); - - dynamic e2 = [5.1, -55, 555, 5555][2]; - Expect.equals(555, e2); - - e2 = [5.1, -55, 555, 5555][2]; - Expect.equals(555, e2); - - e2 = const [5.1, -55, 555, 5555][2]; - Expect.equals(555, e2); - - e2 = (const [ - 5.1, - const [-55, 555], - 5555 - ][1] as dynamic)[1]; - Expect.equals(555, e2); - - Expect.equals(0, [].length); - Expect.equals(0, [].length); - Expect.equals(0, const [].length); - Expect.equals(0, const [].length); - - e2 = [1, 2.0, 0x03, 2.0e5]; - Expect.equals(1, e2[0]); - Expect.equals(2.0, e2[1]); - Expect.equals(3, e2[2]); - Expect.equals(200000.0, e2[3]); - } -} - -main() { - ListLiteralTest.testMain(); -} diff --git a/tests/language_2/list/mixin_test.dart b/tests/language_2/list/mixin_test.dart deleted file mode 100644 index 233cb3a820b..00000000000 --- a/tests/language_2/list/mixin_test.dart +++ /dev/null @@ -1,20 +0,0 @@ - -// @dart = 2.9 -import 'dart:collection'; -import 'package:expect/expect.dart'; - -class MyList extends ListBase { - int get length => 4; - set length(int x) {} - int operator [](int x) => 42; - void operator []=(int x, val) {} -} - -main() { - var x = new MyList(); - int z = 0; - x.forEach((y) { - z += y; - }); - Expect.equals(z, 4 * 42); -} diff --git a/tests/language_2/list/tracer_call_last_test.dart b/tests/language_2/list/tracer_call_last_test.dart deleted file mode 100644 index 782aa7c5dae..00000000000 --- a/tests/language_2/list/tracer_call_last_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2013, 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 - -// dart2js used to fail this test, by inferring that `a.last()` -// returns the element type of the `a` list. - -main() { - var a = [() => 123]; - if (a.last() is! num) { - throw 'Test failed'; - } -} diff --git a/tests/language_2/list/tracer_closure_test.dart b/tests/language_2/list/tracer_closure_test.dart deleted file mode 100644 index c07ba8b5590..00000000000 --- a/tests/language_2/list/tracer_closure_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js' inferrer: if we closurize a method, we -// still need to collect the users of the parameters for the trace -// container pass to work. - -main() { - var a = []; - a.add; - var b = []; - var c = new List.filled(1, null); - b.add(c); - b[0][0] = 42; - if (c[0] is! int) { - throw 'Test failed'; - } -} diff --git a/tests/language_2/list/tracer_in_list_test.dart b/tests/language_2/list/tracer_in_list_test.dart deleted file mode 100644 index c8602e9e81a..00000000000 --- a/tests/language_2/list/tracer_in_list_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2013, 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() { - var a = [[]]; - a[0].add(42); - if (a[0].length != 1) { - throw 'Test failed'; - } -} diff --git a/tests/language_2/list/tracer_in_map_test.dart b/tests/language_2/list/tracer_in_map_test.dart deleted file mode 100644 index 45895a844a1..00000000000 --- a/tests/language_2/list/tracer_in_map_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js, whose type inferrer used to not see -// literal maps as places where a list could escape. - -var b = [42]; -var a = {'foo': b}; - -main() { - a['foo'].clear(); - if (b.length != 0) throw 'Test failed'; -} diff --git a/tests/language_2/list/tracer_return_from_tearoff_closure_test.dart b/tests/language_2/list/tracer_return_from_tearoff_closure_test.dart deleted file mode 100644 index 7f816fd8681..00000000000 --- a/tests/language_2/list/tracer_return_from_tearoff_closure_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js's list tracer, that used to not see a -// returned value of a method can escape to places where that method -// is closurized and invoked. - -var a = [42]; - -foo() { - return a; -} - -main() { - (foo)().clear(); - if (a.length == 1) { - throw 'Test failed'; - } -} diff --git a/tests/language_2/loop/break_outside_loop_runtime_test.dart b/tests/language_2/loop/break_outside_loop_runtime_test.dart deleted file mode 100644 index 778a35476e4..00000000000 --- a/tests/language_2/loop/break_outside_loop_runtime_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 test program to test check that we catch label errors. - -main() { - if (true) { - - } -} diff --git a/tests/language_2/loop/break_outside_loop_test.dart b/tests/language_2/loop/break_outside_loop_test.dart deleted file mode 100644 index fecee3eac58..00000000000 --- a/tests/language_2/loop/break_outside_loop_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2018, 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 test program to test check that we catch label errors. - -// @dart = 2.9 - -main() { - if (true) { - break; -// ^^^^^ -// [analyzer] SYNTACTIC_ERROR.BREAK_OUTSIDE_OF_LOOP -// [cfe] A break statement can't be used outside of a loop or switch statement. - } -} diff --git a/tests/language_2/loop/break_test.dart b/tests/language_2/loop/break_test.dart deleted file mode 100644 index 340b7c6edea..00000000000 --- a/tests/language_2/loop/break_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// 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 test for breaks in for, do/while and while loops. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class BreakTest { - static testMain() { - int i; - int forCounter = 0; - for (i = 0; i < 10; i++) { - forCounter++; - if (i > 3) break; - } - Expect.equals(5, forCounter); - Expect.equals(4, i); - - i = 0; - int doWhileCounter = 0; - do { - i++; - doWhileCounter++; - if (i > 3) break; - } while (i < 10); - Expect.equals(4, doWhileCounter); - Expect.equals(4, i); - - i = 0; - int whileCounter = 0; - while (i < 10) { - i++; - whileCounter++; - if (i > 3) break; - } - Expect.equals(4, whileCounter); - Expect.equals(4, i); - - // Use a label to break to the outer loop. - i = 0; - L: - while (i < 10) { - i++; - while (i > 5) { - break L; - } - } - Expect.equals(6, i); - } -} - -main() { - BreakTest.testMain(); -} diff --git a/tests/language_2/loop/continue_test.dart b/tests/language_2/loop/continue_test.dart deleted file mode 100644 index 0d18cb7e5bc..00000000000 --- a/tests/language_2/loop/continue_test.dart +++ /dev/null @@ -1,78 +0,0 @@ -// 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 test for continue in for, do/while and while loops. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class ContinueTest { - static testMain() { - int i; - int forCounter = 0; - for (i = 0; i < 10; i++) { - if (i > 3) continue; - forCounter++; - } - Expect.equals(4, forCounter); - Expect.equals(10, i); - - i = 0; - int doWhileCounter = 0; - do { - i++; - if (i > 3) continue; - doWhileCounter++; - } while (i < 10); - Expect.equals(3, doWhileCounter); - Expect.equals(10, i); - - i = 0; - int whileCounter = 0; - while (i < 10) { - i++; - if (i > 3) continue; - whileCounter++; - } - Expect.equals(3, whileCounter); - Expect.equals(10, i); - - // Use a label to continue to the outer loop. - i = 0; - L: - while (i < 50) { - i += 3; - while (i < 30) { - i += 2; - if (i < 10) { - continue L; - } else { - i++; - break; - } - } - break; - } - Expect.equals(11, i); - - // continue without label inside switch continues to innermost loop. - do { - i = 20; - switch (0) { - case 0: - i = 22; - continue; - default: - i = 25; - break; - } - i = 30; - } while (false); - Expect.equals(22, i); - } -} - -main() { - ContinueTest.testMain(); -} diff --git a/tests/language_2/loop/do_while2_test.dart b/tests/language_2/loop/do_while2_test.dart deleted file mode 100644 index 1bf16343ca4..00000000000 --- a/tests/language_2/loop/do_while2_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -var a = 42; - -foo1() { - var i = 0; - var saved; - do { - saved = i; - i = a; - } while (i == saved); - Expect.equals(0, saved); - Expect.equals(42, i); -} - -foo2() { - var i = 0; - var saved; - do { - saved = i; - i = a; - } while (i != saved); - Expect.equals(42, saved); - Expect.equals(42, i); -} - -foo3() { - var i = 0; - var saved; - do { - saved = i; - i = a; - if (i == saved) continue; - } while (i != saved); - Expect.equals(42, saved); - Expect.equals(42, i); -} - -main() { - foo1(); - foo2(); - foo3(); -} diff --git a/tests/language_2/loop/do_while3_test.dart b/tests/language_2/loop/do_while3_test.dart deleted file mode 100644 index 1d0e2e29350..00000000000 --- a/tests/language_2/loop/do_while3_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test that a condition is only evaluated once in a loop. - -main() { - int c = 0; - do { - c++; - } while (c++ < 2); - Expect.equals(4, c); -} diff --git a/tests/language_2/loop/do_while4_test.dart b/tests/language_2/loop/do_while4_test.dart deleted file mode 100644 index baa46efd45e..00000000000 --- a/tests/language_2/loop/do_while4_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to crash in the presence of -// do/while, break and a local variable declared after the break. - -import "package:expect/expect.dart"; - -var a = false; -main() { - do { - if (!a) break; - var c = main(); - a = true; - } while (true); - Expect.isFalse(a); -} diff --git a/tests/language_2/loop/do_while_test.dart b/tests/language_2/loop/do_while_test.dart deleted file mode 100644 index 562ec1fe6c8..00000000000 --- a/tests/language_2/loop/do_while_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -// 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 test program for testing do while statement. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Helper { - static int f1(bool b) { - do return 1; while (b); - return 2; - } - - static int f2(bool b) { - do { - return 1; - } while (b); - return 2; - } - - static int f3(bool b) { - do ; while (b); - return 2; - } - - static int f4(bool b) { - do {} while (b); - return 2; - } - - static int f5(int n) { - int i = 0; - do { - i++; - } while (i < n); - return i; - } -} - -class DoWhileTest { - static testMain() { - Expect.equals(1, Helper.f1(true)); - Expect.equals(1, Helper.f1(false)); - Expect.equals(1, Helper.f2(true)); - Expect.equals(1, Helper.f2(false)); - Expect.equals(2, Helper.f3(false)); - Expect.equals(2, Helper.f4(false)); - Expect.equals(1, Helper.f5(-2)); - Expect.equals(1, Helper.f5(-1)); - Expect.equals(1, Helper.f5(0)); - Expect.equals(1, Helper.f5(1)); - Expect.equals(2, Helper.f5(2)); - Expect.equals(3, Helper.f5(3)); - } -} - -main() { - DoWhileTest.testMain(); -} diff --git a/tests/language_2/loop/exchange2_test.dart b/tests/language_2/loop/exchange2_test.dart deleted file mode 100644 index 2f6491c334a..00000000000 --- a/tests/language_2/loop/exchange2_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// This program tripped dart2js. -main() { - var a = 1; - var b = 2; - var c = 3; - var d = 4; - var e = 5; - for (int i = 0; i < 2; i++) { - if (i == 1) { - Expect.equals(4, e); - Expect.equals(3, d); - Expect.equals(8, c); - Expect.equals(1, b); - Expect.equals(32, a); - } - int f; - int k; - if (i < 20) { - f = b & c | ~b & d; - k = 0x5A827999; - } else if (i < 40) { - f = b ^ c ^ d; - k = 0x6ED9EBA1; - } else if (i < 60) { - f = b & c | b & d | c & d; - k = 0x8F1BBCDC; - } else { - f = b ^ c ^ d; - k = 0xCA62C1D6; - } - - int temp = a << 5; - e = d; - d = c; - c = b << 2; - b = a; - a = temp; - } -} diff --git a/tests/language_2/loop/exchange3_test.dart b/tests/language_2/loop/exchange3_test.dart deleted file mode 100644 index 3d62359913b..00000000000 --- a/tests/language_2/loop/exchange3_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// This program tripped dart2js. -main() { - int foo; - for (var i = 0; i < 10; foo = i, i++) { - if (i > 0) { - Expect.equals(i - 1, foo); - } - } -} diff --git a/tests/language_2/loop/exchange4_test.dart b/tests/language_2/loop/exchange4_test.dart deleted file mode 100644 index 920fb1273aa..00000000000 --- a/tests/language_2/loop/exchange4_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// This program tripped dart2js. -main() { - var count = 0; - for (var i = 0; i < 1; i++, count += i) {} - - int foo; - for (var i = 0; i < 10; foo = i, i++) { - if (i > 0) { - Expect.equals(i - 1, foo); - } - } -} diff --git a/tests/language_2/loop/exchange_loop_exchange_test.dart b/tests/language_2/loop/exchange_loop_exchange_test.dart deleted file mode 100644 index 1043d954693..00000000000 --- a/tests/language_2/loop/exchange_loop_exchange_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// This program tripped dart2js. -main() { - var x = 1; - var y = 2; - for (int i = 0; i < 2; i++) { - if (i == 1) Expect.equals(2, x); - var tmp = x; - x = y; - y = tmp; - } -} diff --git a/tests/language_2/loop/exhaustive_for_test.dart b/tests/language_2/loop/exhaustive_for_test.dart deleted file mode 100644 index 153f268710f..00000000000 --- a/tests/language_2/loop/exhaustive_for_test.dart +++ /dev/null @@ -1,810 +0,0 @@ -// Copyright (c) 2013, 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 test program for testing for statement. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test several variations of for loops: -// * With or without an initializer. -// * With or without a test. -// * With or without an update. -// * With or without a continue. -// * With or without a fall through exit from the body. -// * With or without a break. - -// Note that some possibilities are infinite loops and so not tested. -// Combinations that do not have a break or a test but do have a -// fall through from the body or a continue will never exit the loop. - -// Each loop test function sets a status containing a bit for each part of -// the loop that is present, and then clears the bit as that part of the -// loop is executed. The test expectation should be 0 (all present parts -// were executed), except for a few cases where an update expression is -// unreachable due to a break or return in the loop body. - -const int INIT = 1; -const int TEST = 2; -const int UPDATE = 4; -const int CONTINUE = 8; -const int FALL = 16; -const int BREAK = 32; - -var status; - -void loop0() { - status = 0; - for (;;) { - return; - } -} - -void loop1() { - status = INIT; - for (status &= ~INIT;;) { - return; - } -} - -void loop2() { - status = TEST; - for (; (status &= ~TEST) != 0;) { - return; - } -} - -void loop3() { - status = INIT | TEST; - for (status &= ~INIT; (status &= ~TEST) != 0;) { - return; - } -} - -void loop4() { - status = UPDATE; - for (;; status &= ~UPDATE) { - return; - } -} - -void loop5() { - status = INIT | UPDATE; - for (status &= ~INIT;; status &= ~UPDATE) { - return; - } -} - -void loop6() { - status = TEST | UPDATE; - for (; (status &= ~TEST) != 0; status &= ~UPDATE) { - return; - } -} - -void loop7() { - status = INIT | TEST | UPDATE; - for (status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { - return; - } -} - -// Infinite loop not tested. -void loop8() { - status = CONTINUE; - for (;;) { - status &= ~CONTINUE; - continue; - } -} - -// Infinite loop not tested. -void loop9() { - status = INIT | CONTINUE; - for (status &= ~INIT;;) { - status &= ~CONTINUE; - continue; - } -} - -void loop10() { - status = TEST | CONTINUE; - for (; (status &= ~TEST) != 0;) { - status &= ~CONTINUE; - continue; - } -} - -void loop11() { - status = INIT | TEST | CONTINUE; - for (status &= ~INIT; (status &= ~TEST) != 0;) { - status &= ~CONTINUE; - continue; - } -} - -// Infinite loop. -void loop12() { - status = UPDATE | CONTINUE; - for (;; status &= ~UPDATE) { - status &= ~CONTINUE; - continue; - } -} - -// Infinite loop. -void loop13() { - status = INIT | UPDATE | CONTINUE; - for (status &= ~INIT;; status &= ~UPDATE) { - status &= ~CONTINUE; - continue; - } -} - -void loop14() { - status = TEST | UPDATE | CONTINUE; - for (; (status &= ~TEST) != 0; status &= ~UPDATE) { - status &= ~CONTINUE; - continue; - } -} - -void loop15() { - status = INIT | TEST | UPDATE | CONTINUE; - for (status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { - status &= ~CONTINUE; - continue; - } -} - -// Infinite loop. -void loop16() { - status = FALL; - for (;;) { - status &= ~FALL; - } -} - -// Infinite loop. -void loop17() { - status = INIT | FALL; - for (status &= ~INIT;;) { - status &= ~FALL; - } -} - -void loop18() { - status = TEST | FALL; - for (; (status &= ~TEST) != 0;) { - status &= ~FALL; - } -} - -void loop19() { - status = INIT | TEST | FALL; - for (status &= ~INIT; (status &= ~TEST) != 0;) { - status &= ~FALL; - } -} - -// Infinite loop. -void loop20() { - status = UPDATE | FALL; - for (;; status &= ~UPDATE) { - status &= ~FALL; - } -} - -// Infinite loop. -void loop21() { - status = INIT | UPDATE | FALL; - for (status &= ~INIT;; status &= ~UPDATE) { - status &= ~FALL; - } -} - -void loop22() { - status = TEST | UPDATE | FALL; - for (; (status &= ~TEST) != 0; status &= ~UPDATE) { - status &= ~FALL; - } -} - -void loop23() { - status = INIT | TEST | UPDATE | FALL; - for (status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { - status &= ~FALL; - } -} - -// Infinite loop. -void loop24() { - status = CONTINUE | FALL; - for (;;) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - status &= ~FALL; - } -} - -// Infinite loop. -void loop25() { - status = INIT | CONTINUE | FALL; - for (status &= ~INIT;;) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - status &= ~FALL; - } -} - -void loop26() { - status = TEST | CONTINUE | FALL; - for (; (status &= ~TEST) != 0;) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - status &= ~FALL; - } -} - -void loop27() { - status = INIT | TEST | CONTINUE | FALL; - for (status &= ~INIT; (status &= ~TEST) != 0;) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - status &= ~FALL; - } -} - -// Infinite loop. -void loop28() { - status = UPDATE | CONTINUE | FALL; - for (;; status &= ~UPDATE) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - status &= ~FALL; - } -} - -// Infinite loop. -void loop29() { - status = INIT | UPDATE | CONTINUE | FALL; - for (status &= ~INIT;; status &= ~UPDATE) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - status &= ~FALL; - } -} - -void loop30() { - status = TEST | UPDATE | CONTINUE | FALL; - for (; (status &= ~TEST) != 0; status &= ~UPDATE) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - status &= ~FALL; - } -} - -void loop31() { - status = INIT | TEST | UPDATE | CONTINUE | FALL; - for (status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - status &= ~FALL; - } -} - -void loop32() { - status = BREAK; - for (;;) { - status &= ~BREAK; - break; - } -} - -void loop33() { - status = INIT | BREAK; - for (status &= ~INIT;;) { - status &= ~BREAK; - break; - } -} - -void loop34() { - status = TEST | BREAK; - for (; (status &= ~TEST) != 0;) { - status &= ~BREAK; - break; - } -} - -void loop35() { - status = INIT | TEST | BREAK; - for (status &= ~INIT; (status &= ~TEST) != 0;) { - status &= ~BREAK; - break; - } -} - -void loop36() { - status = UPDATE | BREAK; - for (;; status &= ~UPDATE) { - status &= ~BREAK; - break; - } -} - -void loop37() { - status = INIT | UPDATE | BREAK; - for (status &= ~INIT;; status &= ~UPDATE) { - status &= ~BREAK; - break; - } -} - -void loop38() { - status = TEST | UPDATE | BREAK; - for (; (status &= ~TEST) != 0; status &= ~UPDATE) { - status &= ~BREAK; - break; - } -} - -void loop39() { - status = INIT | TEST | UPDATE | BREAK; - for (status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { - status &= ~BREAK; - break; - } -} - -void loop40() { - status = CONTINUE | BREAK; - for (;;) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - status &= ~BREAK; - break; - } -} - -void loop41() { - status = INIT | CONTINUE | BREAK; - for (status &= ~INIT;;) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - status &= ~BREAK; - break; - } -} - -void loop42() { - status = TEST | CONTINUE | BREAK; - for (; (status &= ~TEST) != 0;) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - status &= ~BREAK; - break; - } -} - -void loop43() { - status = INIT | TEST | CONTINUE | BREAK; - for (status &= ~INIT; (status &= ~TEST) != 0;) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - status &= ~BREAK; - break; - } -} - -void loop44() { - status = UPDATE | CONTINUE | BREAK; - for (;; status &= ~UPDATE) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - status &= ~BREAK; - break; - } -} - -void loop45() { - status = INIT | UPDATE | CONTINUE | BREAK; - for (status &= ~INIT;; status &= ~UPDATE) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - status &= ~BREAK; - break; - } -} - -void loop46() { - status = TEST | UPDATE | CONTINUE | BREAK; - for (; (status &= ~TEST) != 0; status &= ~UPDATE) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - status &= ~BREAK; - break; - } -} - -void loop47() { - status = INIT | TEST | UPDATE | CONTINUE | BREAK; - for (status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - status &= ~BREAK; - break; - } -} - -void loop48() { - status = FALL | BREAK; - for (;;) { - if ((status & FALL) == FALL) { - status &= ~FALL; - } else { - status &= ~BREAK; - break; - } - } -} - -void loop49() { - status = INIT | FALL | BREAK; - for (status &= ~INIT;;) { - if ((status & FALL) == FALL) { - status &= ~FALL; - } else { - status &= ~BREAK; - break; - } - } -} - -void loop50() { - status = TEST | FALL | BREAK; - for (; (status &= ~TEST) != 0;) { - if ((status & FALL) == FALL) { - status &= ~FALL; - } else { - status &= ~BREAK; - break; - } - } -} - -void loop51() { - status = INIT | TEST | FALL | BREAK; - for (status &= ~INIT; (status &= ~TEST) != 0;) { - if ((status & FALL) == FALL) { - status &= ~FALL; - } else { - status &= ~BREAK; - break; - } - } -} - -void loop52() { - status = UPDATE | FALL | BREAK; - for (;; status &= ~UPDATE) { - if ((status & FALL) == FALL) { - status &= ~FALL; - } else { - status &= ~BREAK; - break; - } - } -} - -void loop53() { - status = INIT | UPDATE | FALL | BREAK; - for (status &= ~INIT;; status &= ~UPDATE) { - if ((status & FALL) == FALL) { - status &= ~FALL; - } else { - status &= ~BREAK; - break; - } - } -} - -void loop54() { - status = TEST | UPDATE | FALL | BREAK; - for (; (status &= ~TEST) != 0; status &= ~UPDATE) { - if ((status & FALL) == FALL) { - status &= ~FALL; - } else { - status &= ~BREAK; - break; - } - } -} - -void loop55() { - status = INIT | TEST | UPDATE | FALL | BREAK; - for (status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { - if ((status & FALL) == FALL) { - status &= ~FALL; - } else { - status &= ~BREAK; - break; - } - } -} - -void loop56() { - status = CONTINUE | FALL | BREAK; - for (;;) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - if ((status & FALL) == FALL) { - status &= ~FALL; - } else { - status &= ~BREAK; - break; - } - } -} - -void loop57() { - status = INIT | CONTINUE | FALL | BREAK; - for (status &= ~INIT;;) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - if ((status & FALL) == FALL) { - status &= ~FALL; - } else { - status &= ~BREAK; - break; - } - } -} - -void loop58() { - status = TEST | CONTINUE | FALL | BREAK; - for (; (status &= ~TEST) != 0;) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - if ((status & FALL) == FALL) { - status &= ~FALL; - } else { - status &= ~BREAK; - break; - } - } -} - -void loop59() { - status = INIT | TEST | CONTINUE | FALL | BREAK; - for (status &= ~INIT; (status &= ~TEST) != 0;) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - if ((status & FALL) == FALL) { - status &= ~FALL; - } else { - status &= ~BREAK; - break; - } - } -} - -void loop60() { - status = UPDATE | CONTINUE | FALL | BREAK; - for (;; status &= ~UPDATE) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - if ((status & FALL) == FALL) { - status &= ~FALL; - } else { - status &= ~BREAK; - break; - } - } -} - -void loop61() { - status = INIT | UPDATE | CONTINUE | FALL | BREAK; - for (status &= ~INIT;; status &= ~UPDATE) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - if ((status & FALL) == FALL) { - status &= ~FALL; - } else { - status &= ~BREAK; - break; - } - } -} - -void loop62() { - status = TEST | UPDATE | CONTINUE | FALL | BREAK; - for (; (status &= ~TEST) != 0; status &= ~UPDATE) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - if ((status & FALL) == FALL) { - status &= ~FALL; - } else { - status &= ~BREAK; - break; - } - } -} - -void loop63() { - status = INIT | TEST | UPDATE | CONTINUE | FALL | BREAK; - for (status &= ~INIT; (status &= ~TEST) != 0; status &= ~UPDATE) { - if ((status & CONTINUE) == CONTINUE) { - status &= ~CONTINUE; - continue; - } - if ((status & FALL) == FALL) { - status &= ~FALL; - } else { - status &= ~BREAK; - break; - } - } -} - -void main() { - loop0(); - Expect.equals(0, status); - loop1(); - Expect.equals(0, status); - loop2(); - Expect.equals(0, status); - loop3(); - Expect.equals(0, status); - - // The next four tests return with status UPDATE because they return - // before the update expression is reached. - loop4(); - Expect.equals(UPDATE, status); - loop5(); - Expect.equals(UPDATE, status); - loop6(); - Expect.equals(UPDATE, status); - loop7(); - Expect.equals(UPDATE, status); - - loop10(); - Expect.equals(0, status); - loop11(); - Expect.equals(0, status); - loop14(); - Expect.equals(0, status); - loop15(); - Expect.equals(0, status); - loop18(); - Expect.equals(0, status); - loop19(); - Expect.equals(0, status); - loop22(); - Expect.equals(0, status); - loop23(); - Expect.equals(0, status); - loop26(); - Expect.equals(0, status); - loop27(); - Expect.equals(0, status); - loop30(); - Expect.equals(0, status); - loop31(); - Expect.equals(0, status); - loop32(); - Expect.equals(0, status); - loop33(); - Expect.equals(0, status); - loop34(); - Expect.equals(0, status); - loop35(); - Expect.equals(0, status); - - // The next four tests return with status UPDATE because they break from - // the loop before the update expression is reached. - loop36(); - Expect.equals(4, status); - loop37(); - Expect.equals(4, status); - loop38(); - Expect.equals(4, status); - loop39(); - Expect.equals(4, status); - - loop40(); - Expect.equals(0, status); - loop41(); - Expect.equals(0, status); - loop42(); - Expect.equals(0, status); - loop43(); - Expect.equals(0, status); - loop44(); - Expect.equals(0, status); - loop45(); - Expect.equals(0, status); - loop46(); - Expect.equals(0, status); - loop47(); - Expect.equals(0, status); - loop48(); - Expect.equals(0, status); - loop49(); - Expect.equals(0, status); - loop50(); - Expect.equals(0, status); - loop51(); - Expect.equals(0, status); - loop52(); - Expect.equals(0, status); - loop53(); - Expect.equals(0, status); - loop54(); - Expect.equals(0, status); - loop55(); - Expect.equals(0, status); - loop56(); - Expect.equals(0, status); - loop57(); - Expect.equals(0, status); - loop58(); - Expect.equals(0, status); - loop59(); - Expect.equals(0, status); - loop60(); - Expect.equals(0, status); - loop61(); - Expect.equals(0, status); - loop62(); - Expect.equals(0, status); - loop63(); - Expect.equals(0, status); -} diff --git a/tests/language_2/loop/for2_test.dart b/tests/language_2/loop/for2_test.dart deleted file mode 100644 index c91b189c9cd..00000000000 --- a/tests/language_2/loop/for2_test.dart +++ /dev/null @@ -1,73 +0,0 @@ -// 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 test program for testing for statement which captures loop variable. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -var f; - -main() { - // Capture the loop variable, ensure we capture the right value. - for (int i = 0; i < 10; i++) { - if (i == 7) { - f = () => "i = $i"; - } - } - Expect.equals("i = 7", f()); - - // There is only one instance of k. The captured variable continues - // to change. - int k; - for (k = 0; k < 10; k++) { - if (k == 7) { - f = () => "k = $k"; - } - } - Expect.equals("k = 10", f()); - - // l gets modified after it's captured. n++ is executed on the - // newly introduced instance of n (i.e. the instance of the loop - // iteration after the value is captured). - for (int n = 0; n < 10; n++) { - var l = n; - if (l == 7) { - f = () => "l = $l, n = $n"; - } - l++; - } - Expect.equals("l = 8, n = 7", f()); - - // Loop variable is incremented in loop body instead of the increment. - // expression. Thus, the captured value is incremented by one before - // a new loop variable instance is created. - for (int i = 0; i < 10; /*nothing*/) { - if (i == 7) { - f = () => "i = $i"; - } - i++; - } - Expect.equals("i = 8", f()); - - // Make sure continue still ensures the loop variable is captured correctly. - for (int i = 0; i < 10; i++) { - if (i == 7) { - f = () => "i = $i"; - } - continue; - i++; - } - Expect.equals("i = 7", f()); - - // Nested loops with captured variables. - for (int k = 0; k < 5; k++) { - for (int i = 0; i < 10; i++) { - if (k == 3 && i == 7) { - f = () => "k = $k, i = $i"; - } - } - } - Expect.equals("k = 3, i = 7", f()); -} diff --git a/tests/language_2/loop/for_in2_test.dart b/tests/language_2/loop/for_in2_test.dart deleted file mode 100644 index 4dcae09f555..00000000000 --- a/tests/language_2/loop/for_in2_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that using a field or a global variable for a for/in variable -// works. - -import "package:expect/expect.dart"; - -Set set = new Set.from([1, 2]); -var x; - -class A { - var field; - test() { - int count = 0; - for (field in set) { - count += field; - } - Expect.equals(3, count); - - count = 0; - for (x in set) { - count += x; - } - Expect.equals(3, count); - } -} - -void main() { - new A().test(); -} diff --git a/tests/language_2/loop/for_in3_test.dart b/tests/language_2/loop/for_in3_test.dart deleted file mode 100644 index f64bcc06aa4..00000000000 --- a/tests/language_2/loop/for_in3_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2016, 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 - -// Dart test for testing that strings aren't iterable. - -main() { - var chars = []; - for (var c in "foo") chars.add(c); - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.FOR_IN_OF_INVALID_TYPE - // [cfe] The type 'String' used in the 'for' loop must implement 'Iterable'. -} diff --git a/tests/language_2/loop/for_in_side_effects_test.dart b/tests/language_2/loop/for_in_side_effects_test.dart deleted file mode 100644 index 747d1575c8d..00000000000 --- a/tests/language_2/loop/for_in_side_effects_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to not see side effects of -// iterator calls made in a "for in". - -import "package:expect/expect.dart"; - -var global = 42; -var array = [new A()]; - -class A extends Iterable { - Iterator get iterator { - global = 54; - return [this].iterator; - } - - moveNext() => false; - - bar(a) { - for (var a in this) {} - } -} - -main() { - array[0].bar(global); - Expect.equals(54, global); -} diff --git a/tests/language_2/loop/for_in_test.dart b/tests/language_2/loop/for_in_test.dart deleted file mode 100644 index 370e18218b5..00000000000 --- a/tests/language_2/loop/for_in_test.dart +++ /dev/null @@ -1,66 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Dart test for testing for in on a list literal. - -main() { - testSimple(); - testGenericSyntax1(); - testGenericSyntax2(); - testGenericSyntax3(); - testGenericSyntax4(); - testShadowLocal1(); - testShadowLocal2(); -} - -void testSimple() { - var list = [1, 3, 5]; - var sum = 0; - for (var i in list) { - sum += i; - } - Expect.equals(9, sum); -} - -void testGenericSyntax1() { - List> aCollection = []; - for (List strArrArr in aCollection) {} -} - -void testGenericSyntax2() { - List> aCollection = []; - List strArrArr; - for (strArrArr in aCollection) {} -} - -void testGenericSyntax3() { - List>> aCollection = []; - for (List> strArrArr in aCollection) {} -} - -void testGenericSyntax4() { - List>> aCollection = []; - List> strArrArr; - for (strArrArr in aCollection) {} -} - -void testShadowLocal1() { - List x = [1, 2, 3]; - var i = 0; - for (var x in x) { - Expect.equals(x, ++i); - } -} - -void testShadowLocal2() { - Object x = [1, 2, 3]; - var i = 0; - for (x in x) { - Expect.equals(x, ++i); - } -} diff --git a/tests/language_2/loop/for_inlining_test.dart b/tests/language_2/loop/for_inlining_test.dart deleted file mode 100644 index 30955618294..00000000000 --- a/tests/language_2/loop/for_inlining_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to emit an invalid JS -// variable declaration initializer in a for initializer. - -import "package:expect/expect.dart"; - -var global; - -inlineMe() { - global = 42; - return 54; -} - -main() { - for (var t = inlineMe(); t < 42; t++) {} - Expect.equals(42, global); -} diff --git a/tests/language_2/loop/for_runtime_test.dart b/tests/language_2/loop/for_runtime_test.dart deleted file mode 100644 index 7ae24f2144e..00000000000 --- a/tests/language_2/loop/for_runtime_test.dart +++ /dev/null @@ -1,95 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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 test program for testing for statement. - -import "package:expect/expect.dart"; - -class Helper { - static int f1() { - for (;;) return 1; - } - - static int f2(var n) { - int i = 0; - for (; i < n; i++); - return i; - } - - static int f3(int n) { - int i = 0; - for (int j = 0; j < n; j++) i = i + j + 1; - return i; - } - - static int f4(n) { - int i = 0; - for (bool stop = false; (i < n) && !stop; i++) { - if (i >= 5) { - stop = true; - } - } - return i; - } - - static var status; - static void f5() { - status = 0; - for (var stop = false;;) { - if (stop) { - break; - } else { - stop = true; - continue; - } - } - status = 1; - } - - static int f6() { - // Verify that side effects in the condition are visible after the loop. - int i = 0; - for (; ++i < 3;) {} - return i; - } -} - -class ForTest { - static testMain() { - Expect.equals(1, Helper.f1()); - Expect.equals(0, Helper.f2(-1)); - Expect.equals(0, Helper.f2(0)); - Expect.equals(10, Helper.f2(10)); - Expect.equals(0, Helper.f3(-1)); - Expect.equals(0, Helper.f3(0)); - Expect.equals(1, Helper.f3(1)); - Expect.equals(3, Helper.f3(2)); - Expect.equals(6, Helper.f3(3)); - Expect.equals(10, Helper.f3(4)); - Expect.equals(0, Helper.f4(-1)); - Expect.equals(0, Helper.f4(0)); - Expect.equals(1, Helper.f4(1)); - Expect.equals(6, Helper.f4(6)); - Expect.equals(6, Helper.f4(10)); - - Helper.f5(); - Expect.equals(1, Helper.status); - - Expect.equals(3, Helper.f6()); - } -} - -main() { - ForTest.testMain(); - testShadowLocal(); -} - -void testShadowLocal() { - List x = [1, 2, 3]; - -} diff --git a/tests/language_2/loop/for_test.dart b/tests/language_2/loop/for_test.dart deleted file mode 100644 index 8e494c8d010..00000000000 --- a/tests/language_2/loop/for_test.dart +++ /dev/null @@ -1,94 +0,0 @@ -// 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 test program for testing for statement. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Helper { - static int f1() { - for (;;) return 1; - } - - static int f2(var n) { - int i = 0; - for (; i < n; i++); - return i; - } - - static int f3(int n) { - int i = 0; - for (int j = 0; j < n; j++) i = i + j + 1; - return i; - } - - static int f4(n) { - int i = 0; - for (bool stop = false; (i < n) && !stop; i++) { - if (i >= 5) { - stop = true; - } - } - return i; - } - - static var status; - static void f5() { - status = 0; - for (var stop = false;;) { - if (stop) { - break; - } else { - stop = true; - continue; - } - } - status = 1; - } - - static int f6() { - // Verify that side effects in the condition are visible after the loop. - int i = 0; - for (; ++i < 3;) {} - return i; - } -} - -class ForTest { - static testMain() { - Expect.equals(1, Helper.f1()); - Expect.equals(0, Helper.f2(-1)); - Expect.equals(0, Helper.f2(0)); - Expect.equals(10, Helper.f2(10)); - Expect.equals(0, Helper.f3(-1)); - Expect.equals(0, Helper.f3(0)); - Expect.equals(1, Helper.f3(1)); - Expect.equals(3, Helper.f3(2)); - Expect.equals(6, Helper.f3(3)); - Expect.equals(10, Helper.f3(4)); - Expect.equals(0, Helper.f4(-1)); - Expect.equals(0, Helper.f4(0)); - Expect.equals(1, Helper.f4(1)); - Expect.equals(6, Helper.f4(6)); - Expect.equals(6, Helper.f4(10)); - - Helper.f5(); - Expect.equals(1, Helper.status); - - Expect.equals(3, Helper.f6()); - } -} - -main() { - ForTest.testMain(); - testShadowLocal(); -} - -void testShadowLocal() { - List x = [1, 2, 3]; - for (var x = x;;) break; - // ^ - // [cfe] Local variable 'x' can't be referenced before it is declared. -} diff --git a/tests/language_2/loop/for_variable_capture_test.dart b/tests/language_2/loop/for_variable_capture_test.dart deleted file mode 100644 index 098f97c7d9c..00000000000 --- a/tests/language_2/loop/for_variable_capture_test.dart +++ /dev/null @@ -1,304 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -run(callback) => callback(); - -initializer() { - var closure; - for (var i = 0, fn = () => i; i < 3; i++) { - i += 1; - closure = fn; - } - Expect.equals(1, closure()); -} - -condition() { - var closures = []; - check(callback) { - closures.add(callback); - return callback(); - } - - var values = []; - for (var i = 0; check(() => ++i) < 8; ++i) { - values.add(i); - } - Expect.listEquals([1, 3, 5, 7], values); - Expect.listEquals([2, 4, 6, 8, 10], closures.map(run).toList()); -} - -body() { - var closures = []; - for (var i = 0, j = 0; i < 3; i++) { - j++; - closures.add(() => i); - closures.add(() => j); - } - Expect.listEquals([0, 1, 1, 2, 2, 3], closures.map(run).toList()); -} - -update() { - var closures = []; - check(callback) { - closures.add(callback); - return callback(); - } - - var values = []; - for (var i = 0; i < 4; check(() => ++i)) { - values.add(i); - } - Expect.listEquals([0, 1, 2, 3], values); - Expect.listEquals([2, 3, 4, 5], closures.map(run).toList()); -} - -initializer_condition() { - var values = []; - for (var i = 0, fn = () => i; run(() => ++i) < 3;) { - values.add(i); - values.add(fn()); - } - Expect.listEquals([1, 1, 2, 1], values); -} - -initializer_update() { - var update_closures = []; - update(callback) { - update_closures.add(callback); - return callback(); - } - - var init_closure; - for (var i = 0, fn = () => i; i < 4; update(() => ++i)) { - init_closure = fn; - if (i == 0) { - ++i; // Mutate copy of 'i' from first iteration. - } - } - Expect.equals(1, init_closure()); - Expect.listEquals([3, 4, 5], update_closures.map(run).toList()); - Expect.equals(1, init_closure()); -} - -initializer_body() { - var closures = []; - for (var i = 0, fn = () => i; i < 3; i++) { - closures.add(() => i); - closures.add(fn); - fn = () => i; - } - Expect.listEquals([0, 0, 1, 0, 2, 1], closures.map(run).toList()); -} - -condition_update() { - var cond_closures = []; - check(callback) { - cond_closures.add(callback); - return callback(); - } - - var update_closures = []; - update(callback) { - update_closures.add(callback); - return callback(); - } - - var values = []; - for (var i = 0; check(() => i) < 4; update(() => ++i)) { - values.add(i); - } - Expect.listEquals([0, 1, 2, 3], values); - - Expect.listEquals([0, 1, 2, 3, 4], cond_closures.map(run).toList()); - Expect.listEquals([2, 3, 4, 5], update_closures.map(run).toList()); - Expect.listEquals([0, 2, 3, 4, 5], cond_closures.map(run).toList()); -} - -condition_body() { - var cond_closures = []; - check(callback) { - cond_closures.add(callback); - return callback(); - } - - var body_closures = []; - do_body(callback) { - body_closures.add(callback); - return callback(); - } - - for (var i = 0; check(() => i) < 4; ++i) { - do_body(() => i); - } - Expect.listEquals([0, 1, 2, 3, 4], cond_closures.map(run).toList()); - Expect.listEquals([0, 1, 2, 3], body_closures.map(run).toList()); -} - -initializer_condition_update() { - var init; - var cond_closures = []; - check(callback) { - cond_closures.add(callback); - return callback(); - } - - var update_closures = []; - update(callback) { - update_closures.add(callback); - return callback(); - } - - var values = []; - for (var i = 0, fn = () => i; check(() => ++i) < 8; update(() => ++i)) { - init = fn; - values.add(i); - } - Expect.listEquals([1, 3, 5, 7], values); - Expect.equals(1, init()); - - Expect.listEquals([2, 4, 6, 8, 10], cond_closures.map(run).toList()); - Expect.listEquals([5, 7, 9, 11], update_closures.map(run).toList()); -} - -initializer_condition_body() { - var init; - var cond_closures = []; - check(callback) { - cond_closures.add(callback); - return callback(); - } - - var body_closures = []; - do_body(callback) { - body_closures.add(callback); - return callback(); - } - - var values = []; - for (var i = 0, fn = () => i; check(() => ++i) < 8;) { - init = fn; - do_body(() => ++i); - values.add(i); - } - Expect.listEquals([2, 4, 6, 8], values); - Expect.equals(2, init()); - - Expect.listEquals([3, 5, 7, 9, 10], cond_closures.map(run).toList()); - Expect.listEquals([4, 6, 8, 10], body_closures.map(run).toList()); -} - -initializer_update_body() { - var init; - var update_closures = []; - update(callback) { - update_closures.add(callback); - return callback(); - } - - var body_closures = []; - do_body(callback) { - body_closures.add(callback); - return callback(); - } - - var values = []; - for (var i = 0, fn = () => i; i < 8; update(() => ++i)) { - init = fn; - do_body(() => ++i); - values.add(i); - } - Expect.listEquals([1, 3, 5, 7], values); - Expect.equals(1, init()); - - Expect.listEquals([4, 6, 8, 9], update_closures.map(run).toList()); - Expect.listEquals([2, 5, 7, 9], body_closures.map(run).toList()); -} - -condition_update_body() { - var cond_closures = []; - check(callback) { - cond_closures.add(callback); - return callback(); - } - - var update_closures = []; - update(callback) { - update_closures.add(callback); - return callback(); - } - - var body_closures = []; - do_body(callback) { - body_closures.add(callback); - return callback(); - } - - var values = []; - for (var i = 0; check(() => i) < 8; update(() => ++i)) { - do_body(() => ++i); - values.add(i); - } - Expect.listEquals([1, 3, 5, 7], values); - - Expect.listEquals([1, 3, 5, 7, 8], cond_closures.map(run).toList()); - Expect.listEquals([4, 6, 8, 9], update_closures.map(run).toList()); - Expect.listEquals([2, 5, 7, 9], body_closures.map(run).toList()); - Expect.listEquals([2, 5, 7, 9, 9], cond_closures.map(run).toList()); -} - -initializer_condition_update_body() { - var init; - var cond_closures = []; - check(callback) { - cond_closures.add(callback); - return callback(); - } - - var update_closures = []; - update(callback) { - update_closures.add(callback); - return callback(); - } - - var body_closures = []; - do_body(callback) { - body_closures.add(callback); - return callback(); - } - - var values = []; - for (var i = 0, fn = () => i; check(() => i) < 8; update(() => ++i)) { - init = fn; - do_body(() => ++i); - values.add(i); - } - Expect.listEquals([1, 3, 5, 7], values); - Expect.equals(1, init()); - - Expect.listEquals([1, 3, 5, 7, 8], cond_closures.map(run).toList()); - Expect.listEquals([4, 6, 8, 9], update_closures.map(run).toList()); - Expect.listEquals([2, 5, 7, 9], body_closures.map(run).toList()); - Expect.listEquals([2, 5, 7, 9, 9], cond_closures.map(run).toList()); -} - -main() { - initializer(); - condition(); - update(); - body(); - initializer_condition(); - initializer_update(); - initializer_body(); - condition_update(); - condition_body(); - initializer_condition_update(); - initializer_condition_body(); - initializer_update_body(); - condition_update_body(); - initializer_condition_update_body(); -} diff --git a/tests/language_2/loop/for_without_condition_test.dart b/tests/language_2/loop/for_without_condition_test.dart deleted file mode 100644 index 2f709f05b54..00000000000 --- a/tests/language_2/loop/for_without_condition_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - int i = 0; - for (;; i++) { - if (i == 0) break; - Expect.fail("Should not enter here"); - } - Expect.equals(0, i); -} diff --git a/tests/language_2/loop/hoist_test.dart b/tests/language_2/loop/hoist_test.dart deleted file mode 100644 index a5ce53dee5c..00000000000 --- a/tests/language_2/loop/hoist_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - num x; - A() : this.x = 0; - - void bar() { - // dart2js hoisted the this.x out of the loop, and missed that setX would - // change the value. - for (int i = 1; i < 3; i++) { - setX(499); - foo(x); - break; - } - } - - setX(x) => this.x = x; -} - -var saved; -foo(x) => saved = x; - -main() { - A a = new A(); - for (int i = 0; i < 1; i++) { - a.bar(); - } - Expect.equals(499, saved); -} diff --git a/tests/language_2/loop/non_dominating_loop_test.dart b/tests/language_2/loop/non_dominating_loop_test.dart deleted file mode 100644 index aa6d4a5106c..00000000000 --- a/tests/language_2/loop/non_dominating_loop_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -int calls = 0; - -void callMeOnce() { - Expect.equals(0, calls); - calls++; -} - -main() { - int i = 0; - do { - i++; - if (i > 3) break; - } while (i < 10); - - callMeOnce(); - Expect.equals(4, i); -} diff --git a/tests/language_2/loop/unconditional_break_test.dart b/tests/language_2/loop/unconditional_break_test.dart deleted file mode 100644 index 32d50d9d572..00000000000 --- a/tests/language_2/loop/unconditional_break_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test to ensure that we get don't exceptions in the SSA verifier when -// generating phi for the return value of an inlined function that contains a -// loop that always breaks. -doWhileBreak() { - do { - break; - } while (true); -} - -main() { - doWhileBreak(); -} diff --git a/tests/language_2/loop/while_test.dart b/tests/language_2/loop/while_test.dart deleted file mode 100644 index 3636225178b..00000000000 --- a/tests/language_2/loop/while_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// 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 test program for testing while statement. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Helper { - static int f1(bool b) { - while (b) return 1; - - return 2; - } - - static int f2(bool b) { - while (b) { - return 1; - } - return 2; - } - - static int f3(int n) { - int i = 0; - while (i < n) { - i++; - } - return i; - } - - static int f4() { - // Verify that side effects in the condition are visible after the loop. - int i = 0; - while (++i < 3) {} - return i; - } -} - -class WhileTest { - static testMain() { - Expect.equals(1, Helper.f1(true)); - Expect.equals(2, Helper.f1(false)); - Expect.equals(1, Helper.f2(true)); - Expect.equals(2, Helper.f2(false)); - Expect.equals(0, Helper.f3(-2)); - Expect.equals(0, Helper.f3(-1)); - Expect.equals(0, Helper.f3(0)); - Expect.equals(1, Helper.f3(1)); - Expect.equals(2, Helper.f3(2)); - Expect.equals(3, Helper.f4()); - } -} - -main() { - WhileTest.testMain(); -} diff --git a/tests/language_2/main/main_test.dart b/tests/language_2/main/main_test.dart deleted file mode 100644 index 5fb10affba3..00000000000 --- a/tests/language_2/main/main_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2014, 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( - -a // //# 01: ok -a, b // //# 02: ok -a, b, c // //# 03: ok -a, b, {c} //# 04: ok -a, b, [c] //# 05: ok - -[a] // //# 20: ok -a, [b] // //# 21: ok -[a, b] // //# 22: ok - -{a} // //# 41: ok -a, {b} // //# 42: ok -{a, b} // //# 43: ok -[a, b, c] //# 44: ok -{a, b, c} //# 45: ok - - ) {} diff --git a/tests/language_2/main/no_main_test.dart b/tests/language_2/main/no_main_test.dart deleted file mode 100644 index 7866fb2d3c1..00000000000 --- a/tests/language_2/main/no_main_test.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2014, 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 - -/* //# 01: static type warning, runtime error -main() {} -*/ //# 01: continued diff --git a/tests/language_2/main/not_a_function_test.dart b/tests/language_2/main/not_a_function_test.dart deleted file mode 100644 index 5b5321c59fe..00000000000 --- a/tests/language_2/main/not_a_function_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2014, 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() {} - -var main; -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION -// [cfe] 'main' is already declared in this scope. diff --git a/tests/language_2/malbounded/instantiation_runtime_test.dart b/tests/language_2/malbounded/instantiation_runtime_test.dart deleted file mode 100644 index b326933bf79..00000000000 --- a/tests/language_2/malbounded/instantiation_runtime_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -class Super {} - - - -main() { - - - -} diff --git a/tests/language_2/malbounded/instantiation_test.dart b/tests/language_2/malbounded/instantiation_test.dart deleted file mode 100644 index b3f0bfa79dc..00000000000 --- a/tests/language_2/malbounded/instantiation_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2013, 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 - -class Super {} -class Malbounded1 implements Super {} -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS -class Malbounded2 extends Super {} -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - -main() { - new Malbounded1(); - new Malbounded2(); - new Super(); - // ^ - // [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS -} diff --git a/tests/language_2/malbounded/redirecting_factory_test.dart b/tests/language_2/malbounded/redirecting_factory_test.dart deleted file mode 100644 index 0c9c6ca9413..00000000000 --- a/tests/language_2/malbounded/redirecting_factory_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2013, 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 - -class A< - Ta - extends num // //# 02: continued - > implements B, C {} - -class B< - Tb - extends num // //# 03: continued - > { - factory B() = A; -} - -class C< - Tc - extends num // //# 04: continued - > { - factory C() = A; -} - -class D< - Td - extends num // //# 05: continued - > { - test() => new C(); -} - -main() { - new D().test(); - new D().test(); // //# 01: ok - new D().test(); // //# 02: compile-time error - new D().test(); // //# 03: compile-time error - new D().test(); // //# 04: compile-time error - new D().test(); // //# 05: compile-time error -} diff --git a/tests/language_2/malbounded/type_cast2_test.dart b/tests/language_2/malbounded/type_cast2_test.dart deleted file mode 100644 index 70d11c2d241..00000000000 --- a/tests/language_2/malbounded/type_cast2_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B { - test() { - new A() as A; - // ^ - // [cfe] Type argument 'T' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. - // ^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - } -} - -main() { - var b = new B(); - Expect.throws(() => b.test()); -} diff --git a/tests/language_2/malbounded/type_cast_runtime_test.dart b/tests/language_2/malbounded/type_cast_runtime_test.dart deleted file mode 100644 index 7c9f34d27fc..00000000000 --- a/tests/language_2/malbounded/type_cast_runtime_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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 'package:expect/expect.dart'; - -class Super {} -class Malbounded1 implements Super - - {} -class Malbounded2 extends Super - - {} - -main() { - var m = new Malbounded1(); - Expect.throwsTypeError(() => m as Super); - var s = new Super(); - Expect.throwsTypeError(() => s as Malbounded1); - Expect.throwsTypeError(() => s as Malbounded2); - s as Super - - ; -} diff --git a/tests/language_2/malbounded/type_cast_test.dart b/tests/language_2/malbounded/type_cast_test.dart deleted file mode 100644 index 7e98c551b50..00000000000 --- a/tests/language_2/malbounded/type_cast_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -class Super {} -class Malbounded1 implements Super -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. - -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - {} -class Malbounded2 extends Super -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. - -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - {} - -main() { - var m = new Malbounded1(); - Expect.throwsTypeError(() => m as Super); - var s = new Super(); - Expect.throwsTypeError(() => s as Malbounded1); - Expect.throwsTypeError(() => s as Malbounded2); - s as Super - // ^ - // [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. - -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - ; -} diff --git a/tests/language_2/malbounded/type_literal_runtime_test.dart b/tests/language_2/malbounded/type_literal_runtime_test.dart deleted file mode 100644 index 2ca0f44237f..00000000000 --- a/tests/language_2/malbounded/type_literal_runtime_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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 'package:expect/expect.dart'; - -class Super {} - -class Malbounded extends Super - - {} - -main() { - Type t = Malbounded; - Expect.isNotNull(t); - Expect.isTrue(t is Type); -} diff --git a/tests/language_2/malbounded/type_literal_test.dart b/tests/language_2/malbounded/type_literal_test.dart deleted file mode 100644 index eb4a34c0ebe..00000000000 --- a/tests/language_2/malbounded/type_literal_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -class Super {} - -class Malbounded extends Super -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. - -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - {} - -main() { - Type t = Malbounded; - Expect.isNotNull(t); - Expect.isTrue(t is Type); -} diff --git a/tests/language_2/malbounded/type_test2_runtime_test.dart b/tests/language_2/malbounded/type_test2_runtime_test.dart deleted file mode 100644 index 21d04c8349e..00000000000 --- a/tests/language_2/malbounded/type_test2_runtime_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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 "package:expect/expect.dart"; - -class A {} - -class B { - test() { - new A() is A - - ; - } -} - -main() { - var b = new B(); - b.test(); -} diff --git a/tests/language_2/malbounded/type_test2_test.dart b/tests/language_2/malbounded/type_test2_test.dart deleted file mode 100644 index 0e4cb696e40..00000000000 --- a/tests/language_2/malbounded/type_test2_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B { - test() { - new A() is A - // ^ - // [cfe] Type argument 'T' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. - -// ^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - ; - } -} - -main() { - var b = new B(); - b.test(); -} diff --git a/tests/language_2/malbounded/type_test_runtime_test.dart b/tests/language_2/malbounded/type_test_runtime_test.dart deleted file mode 100644 index 92a424b2556..00000000000 --- a/tests/language_2/malbounded/type_test_runtime_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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 'package:expect/expect.dart'; - -class Super {} - -class Malbounded1 implements Super - - {} - -class Malbounded2 extends Super - - {} - -main() { - var m = new Malbounded1(); - Expect.isFalse(m is Super); - var s = new Super(); - Expect.isFalse(s is Malbounded1); - Expect.isFalse(s is Malbounded2); - Expect.isTrue(s is Super - - ); -} diff --git a/tests/language_2/malbounded/type_test_test.dart b/tests/language_2/malbounded/type_test_test.dart deleted file mode 100644 index c3128573e8e..00000000000 --- a/tests/language_2/malbounded/type_test_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -class Super {} - -class Malbounded1 implements Super -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. - -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - {} - -class Malbounded2 extends Super -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. - -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - {} - -main() { - var m = new Malbounded1(); - Expect.isFalse(m is Super); - var s = new Super(); - Expect.isFalse(s is Malbounded1); - Expect.isFalse(s is Malbounded2); - Expect.isTrue(s is Super - // ^ - // [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'Super'. - -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - ); -} diff --git a/tests/language_2/malformed/bound_test.dart b/tests/language_2/malformed/bound_test.dart deleted file mode 100644 index fbc42f675c8..00000000000 --- a/tests/language_2/malformed/bound_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2014, 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 - -class C { - f(T t) => t - .foo //# 01: compile-time error - ; -} - -main() { - new C().f(1); -} diff --git a/tests/language_2/malformed/inheritance_runtime_test.dart b/tests/language_2/malformed/inheritance_runtime_test.dart deleted file mode 100644 index 8d943b127ad..00000000000 --- a/tests/language_2/malformed/inheritance_runtime_test.dart +++ /dev/null @@ -1,88 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Tests that malformed types used in extends, implements, and with clauses -// cause compile-time errors. - -class A {} - -class C - - { -} - -class C1 - - { -} - -class C2 - - { -} - -class C3 - - { -} - -class C4 - - { -} - -class C5 - - { -} - -class C6 - - { -} - -class C7 - - { -} - -class C8 - - { -} - -class C9 - - { -} - -class C10 - - { -} - -class C11 - - { -} - -void main() { - new C(); - new C1(); - new C2(); - new C3(); - new C4(); - new C5(); - new C6(); - new C7(); - new C8(); - new C9(); - new C10(); - new C11(); -} diff --git a/tests/language_2/malformed/inheritance_test.dart b/tests/language_2/malformed/inheritance_test.dart deleted file mode 100644 index 6a0c070789f..00000000000 --- a/tests/language_2/malformed/inheritance_test.dart +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) 2013, 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 - -// Tests that malformed types used in extends, implements, and with clauses -// cause compile-time errors. - -class A {} - -class C - extends Unresolved - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.EXTENDS_NON_CLASS - // [cfe] Type 'Unresolved' not found. - { -} - -class C1 - extends A - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT - // [cfe] Type 'Unresolved' not found. - { -} - -class C2 -// ^ -// [cfe] The type 'Unresolved' can't be mixed in. - extends Object with Unresolved - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.MIXIN_OF_NON_CLASS - // [cfe] Type 'Unresolved' not found. - { -} - -class C3 - extends Object with A - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT - // [cfe] Type 'Unresolved' not found. - { -} - -class C4 - implements Unresolved - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.IMPLEMENTS_NON_CLASS - // [cfe] Type 'Unresolved' not found. - { -} - -class C5 - implements A - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT - // [cfe] Type 'Unresolved' not found. - { -} - -class C6 - extends A - // ^ - // [analyzer] COMPILE_TIME_ERROR.EXTENDS_NON_CLASS - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS - // [cfe] Can't use type arguments with type variable 'A'. - { -} - -class C7 - extends A - // ^ - // [analyzer] COMPILE_TIME_ERROR.EXTENDS_NON_CLASS - // ^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS - // [cfe] Can't use type arguments with type variable 'A'. - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT - // [cfe] Type 'Unresolved' not found. - { -} - -class C8 -// ^ -// [cfe] The type 'A' can't be mixed in. - extends Object with A - // ^ - // [analyzer] COMPILE_TIME_ERROR.MIXIN_OF_NON_CLASS - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS - // [cfe] Can't use type arguments with type variable 'A'. - { -} - -class C9 -// ^ -// [cfe] The type 'A' can't be mixed in. - extends Object with A - // ^ - // [analyzer] COMPILE_TIME_ERROR.MIXIN_OF_NON_CLASS - // ^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS - // [cfe] Can't use type arguments with type variable 'A'. - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT - // [cfe] Type 'Unresolved' not found. - { -} - -class C10 - implements A - // ^ - // [analyzer] COMPILE_TIME_ERROR.IMPLEMENTS_NON_CLASS - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS - // [cfe] Can't use type arguments with type variable 'A'. - { -} - -class C11 - implements A - // ^ - // [analyzer] COMPILE_TIME_ERROR.IMPLEMENTS_NON_CLASS - // ^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS - // [cfe] Can't use type arguments with type variable 'A'. - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT - // [cfe] Type 'Unresolved' not found. - { -} - -void main() { - new C(); - new C1(); - new C2(); - new C3(); - new C4(); - new C5(); - new C6(); - new C7(); - new C8(); - new C9(); - new C10(); - new C11(); -} diff --git a/tests/language_2/malformed/malformed2_lib.dart b/tests/language_2/malformed/malformed2_lib.dart deleted file mode 100644 index d46a0fccdfb..00000000000 --- a/tests/language_2/malformed/malformed2_lib.dart +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2013, 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 - -part of malformed_test; - -void testValue(var o) { - o is Unresolved1; - o is List; - o is! Unresolved3; - o is! List; - - try { - o as Unresolved5; - } catch (e) { - } - - try { - o as List; - } catch (e) { - } - - try { - } on Unresolved7 catch (e) { - } catch (e) { - } - - try { - throw o; - } on Unresolved8 catch (e) { - } catch (e) { - } - - try { - throw o; - } on List catch (e) { - } on TypeError catch (e) { - } on Unresolved9 catch (e) { - } catch (e) { - } - - try { - throw o; - } on List catch (e) { - } on TypeError catch (e) { - } on Unresolved11 catch (e) { - } catch (e) { - } - - Unresolved12 u = o; - - List u2 = o; -} diff --git a/tests/language_2/malformed/malformed2_test.dart b/tests/language_2/malformed/malformed2_test.dart deleted file mode 100644 index f6c32cb502e..00000000000 --- a/tests/language_2/malformed/malformed2_test.dart +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2013, 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 malformed_test; - -// This part includes the actual tests. -part 'malformed2_lib.dart'; - -// The part-file cannot contain error markers. -// Therefore we create a fresh class for each test. -/* //# 01: compile-time error -class Unresolved1 {} -*/ //# 01: continued -/* //# 02: compile-time error -class Unresolved2 {} -*/ //# 02: continued -/* //# 03: compile-time error -class Unresolved3 {} -*/ //# 03: continued -/* //# 04: compile-time error -class Unresolved4 {} -*/ //# 04: continued -/* //# 05: compile-time error -class Unresolved5 {} -*/ //# 05: continued -/* //# 06: compile-time error -class Unresolved6 {} -*/ //# 06: continued -/* //# 07: compile-time error -class Unresolved7 {} -*/ //# 07: continued -/* //# 08: compile-time error -class Unresolved8 {} -*/ //# 08: continued -/* //# 09: compile-time error -class Unresolved9 {} -*/ //# 09: continued -/* //# 10: compile-time error -class Unresolved10 {} -*/ //# 10: continued -/* //# 11: compile-time error -class Unresolved11 {} -*/ //# 11: continued -/* //# 12: compile-time error -class Unresolved12 {} -*/ //# 12: continued -/* //# 13: compile-time error -class Unresolved13 {} -*/ //# 13: continued - -const Unresolved c1 = 0; //# 00: compile-time error - -void main() { - print(c1); //# 00: continued - testValue(null); -} diff --git a/tests/language_2/malformed/malformed_test.dart b/tests/language_2/malformed/malformed_test.dart deleted file mode 100644 index 9d5f2aeb9b9..00000000000 --- a/tests/language_2/malformed/malformed_test.dart +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:expect/expect.dart' as prefix; // Define 'prefix'. - -checkIsUnresolved(var v) { - v is Unresolved; - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME - // [cfe] 'Unresolved' isn't a type. - v is Unresolved; - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME - // [cfe] 'Unresolved' isn't a type. - v is prefix.Unresolved; - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME - // ^ - // [cfe] 'Unresolved' isn't a type. - v is prefix.Unresolved; - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_UNDEFINED_NAME - // ^ - // [cfe] 'Unresolved' isn't a type. -} - -checkIsListUnresolved(var v) { - v is List; - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT - // [cfe] 'Unresolved' isn't a type. - v is List>; - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT - // [cfe] 'Unresolved' isn't a type. - v is List; - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT - // ^ - // [cfe] 'Unresolved' isn't a type. - v is List>; - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT - // ^ - // [cfe] 'Unresolved' isn't a type. - v is List; - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS - // [cfe] Expected 1 type arguments. -} - -checkAsUnresolved(var v) { - v as Unresolved; - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE - // [cfe] 'Unresolved' isn't a type. - v as Unresolved; - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE - // [cfe] 'Unresolved' isn't a type. - v as prefix.Unresolved; - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE - // ^ - // [cfe] 'Unresolved' isn't a type. - v as prefix.Unresolved; - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE - // ^ - // [cfe] 'Unresolved' isn't a type. -} - -checkAsListUnresolved(var v) { - v as List; - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT - // [cfe] 'Unresolved' isn't a type. - v as List>; - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT - // [cfe] 'Unresolved' isn't a type. - v as List; - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT - // ^ - // [cfe] 'Unresolved' isn't a type. - v as List>; - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT - // ^ - // [cfe] 'Unresolved' isn't a type. - v as List; - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS - // [cfe] Expected 1 type arguments. -} - -void main() { - checkIsUnresolved(''); - checkAsUnresolved(''); - checkIsListUnresolved([]); - checkAsListUnresolved([]); - - new undeclared_prefix.Unresolved(); - // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // [cfe] Couldn't find constructor 'undeclared_prefix.Unresolved'. - new undeclared_prefix.Unresolved(); - // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // [cfe] Couldn't find constructor 'undeclared_prefix.Unresolved'. - - try { - throw 'foo'; - } - on Unresolved - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_IN_CATCH_CLAUSE - // [cfe] 'Unresolved' isn't a type. - catch (e) { - } - - try { - throw 'foo'; - } - on Unresolved - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_IN_CATCH_CLAUSE - // [cfe] 'Unresolved' isn't a type. - catch (e) { - } - - try { - throw 'foo'; - } - on prefix.Unresolved - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_IN_CATCH_CLAUSE - // ^ - // [cfe] 'Unresolved' isn't a type. - catch (e) { - } - - try { - throw 'foo'; - } - on prefix.Unresolved - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_IN_CATCH_CLAUSE - // ^ - // [cfe] 'Unresolved' isn't a type. - catch (e) { - } - - try { - throw 'foo'; - } - on undeclared_prefix.Unresolved - // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_IN_CATCH_CLAUSE - // [cfe] 'undeclared_prefix.Unresolved' can't be used as a type because 'undeclared_prefix' isn't defined. - catch (e) { - } -} diff --git a/tests/language_2/malformed/runtime_test.dart b/tests/language_2/malformed/runtime_test.dart deleted file mode 100644 index bf16221a384..00000000000 --- a/tests/language_2/malformed/runtime_test.dart +++ /dev/null @@ -1,86 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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 'package:expect/expect.dart'; -import 'package:expect/expect.dart' as prefix; // Define 'prefix'. - -checkIsUnresolved(var v) { - - - - -} - -checkIsListUnresolved(var v) { - - - - - -} - -checkAsUnresolved(var v) { - - - - -} - -checkAsListUnresolved(var v) { - - - - - -} - -void main() { - checkIsUnresolved(''); - checkAsUnresolved(''); - checkIsListUnresolved([]); - checkAsListUnresolved([]); - - - - - try { - throw 'foo'; - } - - catch (e) { - } - - try { - throw 'foo'; - } - - catch (e) { - } - - try { - throw 'foo'; - } - - catch (e) { - } - - try { - throw 'foo'; - } - - catch (e) { - } - - try { - throw 'foo'; - } - - catch (e) { - } -} diff --git a/tests/language_2/malformed/type_test.dart b/tests/language_2/malformed/type_test.dart deleted file mode 100644 index f86205ab9be..00000000000 --- a/tests/language_2/malformed/type_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2012, 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 - -null_() => null; -final Undeclared x = null_(); -// ^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_CLASS -// [cfe] 'Undeclared' isn't a type. -// [cfe] Type 'Undeclared' not found. - -main() { - print(x); -} diff --git a/tests/language_2/map/literal10_test.dart b/tests/language_2/map/literal10_test.dart deleted file mode 100644 index 58706567251..00000000000 --- a/tests/language_2/map/literal10_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test the use of '__proto__' keys in maps. - -library map_literal10_test; - -import "package:expect/expect.dart"; - -void main() { - var m1 = const {"__proto__": 0, 1: 1}; - Expect.isTrue(m1.containsKey("__proto__")); - Expect.equals(0, m1["__proto__"]); - Expect.isTrue(m1.containsKey(1)); - Expect.equals(1, m1[1]); - Expect.listEquals(["__proto__", 1], m1.keys.toList()); - - var m2 = const {1: 0, "__proto__": 1}; - Expect.isTrue(m2.containsKey(1)); - Expect.equals(0, m2[1]); - Expect.isTrue(m2.containsKey("__proto__")); - Expect.equals(1, m2["__proto__"]); - Expect.listEquals([1, "__proto__"], m2.keys.toList()); - - var m3 = const {"1": 0, "__proto__": 1}; - Expect.isTrue(m3.containsKey("1")); - Expect.equals(0, m3["1"]); - Expect.isTrue(m3.containsKey("__proto__")); - Expect.equals(1, m3["__proto__"]); - Expect.listEquals(["1", "__proto__"], m3.keys.toList()); - - var m4 = const {"__proto__": 1, "1": 2}; - Expect.isTrue(m4.containsKey("1")); - Expect.equals(2, m4["1"]); - Expect.isTrue(m4.containsKey("__proto__")); - Expect.equals(1, m4["__proto__"]); - Expect.listEquals(["__proto__", "1"], m4.keys.toList()); -} diff --git a/tests/language_2/map/literal11_test.dart b/tests/language_2/map/literal11_test.dart deleted file mode 100644 index ce974958981..00000000000 --- a/tests/language_2/map/literal11_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test the use type arguments on constant maps. - -library map_literal11_test; - -import "package:expect/expect.dart"; - -void foo(Map m) { - m[23] = 23; //# none: runtime error -} - -void main() { - Map map = {}; - foo(map); -} diff --git a/tests/language_2/map/literal12_test.dart b/tests/language_2/map/literal12_test.dart deleted file mode 100644 index 9cce37db2b0..00000000000 --- a/tests/language_2/map/literal12_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test relative order of key and value evaluation. - -library map_literal12_test; - -import "package:expect/expect.dart"; - -int x = 0; -void main() { - var map1 = {++x: ++x}; - Expect.equals('{1: 2}', map1.toString()); - - var map2 = {++x: ++x, ++x: ++x}; - Expect.equals('{3: 4, 5: 6}', map2.toString()); -} diff --git a/tests/language_2/map/literal13_test.dart b/tests/language_2/map/literal13_test.dart deleted file mode 100644 index 8e8156fcad8..00000000000 --- a/tests/language_2/map/literal13_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Legacy compound literal syntax that should go away. - -main() { - var map = new Map{ "a": 1, "b": 2, "c": 3 }; - // ^^^^^^^ - // [analyzer] SYNTACTIC_ERROR.LITERAL_WITH_CLASS_AND_NEW - // [cfe] A map literal can't be prefixed by 'new Map'. - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.MAP_ENTRY_NOT_IN_MAP - // ^ - // [cfe] Expected ',' before this. - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.MAP_ENTRY_NOT_IN_MAP - // ^ - // [cfe] Expected ',' before this. - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.MAP_ENTRY_NOT_IN_MAP - // ^ - // [cfe] Expected ',' before this. -} diff --git a/tests/language_2/map/literal14_test.dart b/tests/language_2/map/literal14_test.dart deleted file mode 100644 index a3850d279e5..00000000000 --- a/tests/language_2/map/literal14_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Dart test program const map literals. - -class MapLiteral2NegativeTest { - test() { - var m = const {}; - // ^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_TYPE_ARGUMENT_IN_CONST_LITERAL - // [cfe] Type variables can't be used as constants. - } -} - -main() { - MapLiteral2NegativeTest().test(); -} diff --git a/tests/language_2/map/literal15_test.dart b/tests/language_2/map/literal15_test.dart deleted file mode 100644 index 3ce3460abd5..00000000000 --- a/tests/language_2/map/literal15_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2021, 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 - -// Test the use of `null` keys in const maps. In versions before 2.12, when -// nullable types were introduced, types were nullable so it was legal to have -// `null` keys in maps. - -library map_literal15_test; - -import "package:expect/expect.dart"; - -void test1() { - var m1 = const {null: 10, 'null': 20}; - Expect.isTrue(m1.containsKey(null)); - Expect.isTrue(m1.containsKey(undefined())); - Expect.equals(10, m1[null]); - Expect.equals(10, m1[undefined()]); - Expect.isTrue(m1.containsKey('null')); - Expect.equals(20, m1['null']); - // The '.keys' carry the 'String' type - Expect.type>(m1.keys); - Expect.type>(m1.keys); - Expect.notType>(m1.keys); -} - -void test2() { - var m2 = const {null: 10, 'null': 20}; - Expect.isTrue(m2.containsKey(null)); - Expect.isTrue(m2.containsKey(undefined())); - Expect.equals(10, m2[null]); - Expect.equals(10, m2[undefined()]); - Expect.isTrue(m2.containsKey('null')); - Expect.equals(20, m2['null']); - // The '.keys' carry the 'Comparable' type - Expect.notType>(m2.keys); - Expect.type>(m2.keys); - Expect.notType>(m2.keys); -} - -main() { - test1(); - test2(); -} - -// Calling `undefined()` gives us a `null` that is implemented as JavaScript -// `undefined` on dart2js. -@pragma('dart2js:noInline') -dynamic get undefined => _undefined; - -@pragma('dart2js:noInline') -void _undefined() {} diff --git a/tests/language_2/map/literal1_runtime_test.dart b/tests/language_2/map/literal1_runtime_test.dart deleted file mode 100644 index 7f29a097263..00000000000 --- a/tests/language_2/map/literal1_runtime_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. -// -// A type mismatch in a constant map literal is a compile-time error. - -main() { - var m = const - - {"a": 0}; -} diff --git a/tests/language_2/map/literal1_test.dart b/tests/language_2/map/literal1_test.dart deleted file mode 100644 index 228f1b7ba00..00000000000 --- a/tests/language_2/map/literal1_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// 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 type mismatch in a constant map literal is a compile-time error. - -// @dart = 2.9 - -main() { - var m = const - - {"a": 0}; - // ^ - // [analyzer] COMPILE_TIME_ERROR.MAP_VALUE_TYPE_NOT_ASSIGNABLE - // [cfe] A value of type 'int' can't be assigned to a variable of type 'String'. -} diff --git a/tests/language_2/map/literal2_test.dart b/tests/language_2/map/literal2_test.dart deleted file mode 100644 index 0275dff0a78..00000000000 --- a/tests/language_2/map/literal2_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// 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. -// Test program for map literals. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -int nextValCtr; - -get nextVal { - return nextValCtr++; -} - -main() { - // Map literals with string interpolation in keys. - nextValCtr = 0; - var map = {"a$nextVal": "Grey", "a$nextVal": "Poupon"}; - Expect.equals(true, map.containsKey("a0")); - Expect.equals(true, map.containsKey("a1")); - Expect.equals("Grey", map["a0"]); - Expect.equals("Poupon", map["a1"]); -} diff --git a/tests/language_2/map/literal3_test.dart b/tests/language_2/map/literal3_test.dart deleted file mode 100644 index abf13100464..00000000000 --- a/tests/language_2/map/literal3_test.dart +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2012, 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. -// Test program for map literals. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class MapLiteralTest { - static testMain() { - var map = {"a": 1, "b": 2, "c": 3}; - - Expect.equals(map.length, 3); - Expect.equals(map["a"], 1); - Expect.equals(map["z"], null); - Expect.equals(map["c"], 3); - - map["foo"] = 42; - Expect.equals(map.length, 4); - Expect.equals(map["foo"], 42); - map["foo"] = 55; - Expect.equals(map.length, 4); - Expect.equals(map["foo"], 55); - - map.remove("foo"); - Expect.equals(map.length, 3); - Expect.equals(map["foo"], null); - - map["foo"] = "bar"; - Expect.equals(map.length, 4); - Expect.equals(map["foo"], "bar"); - - map.clear(); - Expect.equals(map.length, 0); - - var b = 22; - Expect.equals( - 22, - { - "a": 11, - "b": b, - }["b"]); - - var m = new Map(); - Expect.equals(m.length, 0); - for (var i = 1; i <= 16; i++) { - m[i.toString()] = i; - } - Expect.equals(16, m.length); - Expect.equals(1, m.remove("1")); - Expect.isNull(m.remove("1")); // Remove element twice. - Expect.equals(16, m.remove("16")); - Expect.equals(14, m.length); - - final cmap = const {"a": 10, "b": 100, "a": 1000}; //# 01: compile-time error - final cmap2 = const {"a": 10, "a": 100, "a": 1000}; //# 02: compile-time error - var mmap = {"a": 10, "b": 100, "a": 1000}; //# 03: ok - var mmap = {"a": ctr(), "b": ctr(), "a": ctr()}; //# 04: compile-time error - - Expect.equals(10, {"beta": 100, "alpha": 9 + 1}["alpha"]); - Expect.equals( - 10, - { - "beta": {"delta": 10}, - "alpha": {"gamma": 10} - }["alpha"]["gamma"]); - - // Map literals at beginning of statement. - {"pink": 100}; - const {"floyd": 100}; - } -} - -main() { - MapLiteralTest.testMain(); -} diff --git a/tests/language_2/map/literal4_test.dart b/tests/language_2/map/literal4_test.dart deleted file mode 100644 index 7e8196903d0..00000000000 --- a/tests/language_2/map/literal4_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// 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. -// VMOptions=--enable_type_checks -// -// Dart test program testing type checks in map literals. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class MapLiteral4Test { - test() { - int result = 0; - var m = {"a": 0}; //# 01: compile-time error - var m = {"a": 0}; //# 02: ok - m[2] = 1; //# 02: compile-time error - var m = {"a": "b"}; //# 03: compile-time error - var m = {"a": 0}; //# 04: compile-time error - var m = {"a": 0}; //# 05: continued - m[2] = 1; //# 05: compile-time error - var m = const {"a": 0}; //# 06: continued - m[2] = 1; //# 06: compile-time error - } -} - -main() { - var t = new MapLiteral4Test(); -} diff --git a/tests/language_2/map/literal5_test.dart b/tests/language_2/map/literal5_test.dart deleted file mode 100644 index b69d529a730..00000000000 --- a/tests/language_2/map/literal5_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test the use of general expression as keys in map literals. - -library map_literal5_test; - -import "package:expect/expect.dart"; - -void main() { - test(true); - test(false); -} - -void test(bool b) { - var m = create(b); - Expect.equals(b, m.containsKey(true)); - Expect.equals(b, m.containsKey(2)); - Expect.equals(b, m.containsKey(1)); - Expect.equals(!b, m.containsKey(false)); - Expect.equals(!b, m.containsKey("bar")); - Expect.equals(!b, m.containsKey("foo")); - if (b) { - Expect.equals(0, m[true]); - Expect.equals(3, m[2]); - Expect.equals(2, m[1]); - } else { - Expect.equals(0, m[false]); - Expect.equals("baz", m["bar"]); - Expect.equals(2, m["foo"]); - } -} - -Map create(bool b) { - return { - b: 0, - m(b): n(b), - b ? 1 : "foo": 2, - }; -} - -Object m(bool b) => b ? 2 : "bar"; -Object n(bool b) => b ? 3 : "baz"; diff --git a/tests/language_2/map/literal6_test.dart b/tests/language_2/map/literal6_test.dart deleted file mode 100644 index 2eb2339b0c4..00000000000 --- a/tests/language_2/map/literal6_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test the use of general expression as keys in const map literals. - -library map_literal6_test; - -import "package:expect/expect.dart"; - -class A { - const A(); -} - -class B { - final a; - const B(this.a); -} - -void main() { - var m1 = const { - const A(): 0, - const B(1): 2, - const B(const A()): 3, - const B(0): 4, - }; - Expect.isTrue(m1.containsKey(const A())); - Expect.isTrue(m1.containsKey(const B(0))); - Expect.isTrue(m1.containsKey(const B(1))); - Expect.isTrue(m1.containsKey(const B(const A()))); - Expect.equals(0, m1[const A()]); - Expect.equals(4, m1[const B(0)]); - Expect.equals(2, m1[const B(1)]); - Expect.equals(3, m1[const B(const A())]); -} diff --git a/tests/language_2/map/literal7_test.dart b/tests/language_2/map/literal7_test.dart deleted file mode 100644 index d366a6b38f6..00000000000 --- a/tests/language_2/map/literal7_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test the use type arguments on constant maps. - -library map_literal7_test; - -import "package:expect/expect.dart"; - -void main() { - Map m1 = const {"0": 0, "1": 1}; - Expect.isTrue(m1 is Map); - Expect.isFalse(m1 is Map); - Expect.isFalse(m1 is Map); - Expect.isFalse(m1 is Map); - - Map m2 = const {"0": 0, "1": 1}; - Expect.isTrue(m2 is Map); - Expect.isTrue(m2 is Map); - Expect.isFalse(m2 is Map); - Expect.isFalse(m2 is Map); -} diff --git a/tests/language_2/map/literal8_test.dart b/tests/language_2/map/literal8_test.dart deleted file mode 100644 index 649a2518cdb..00000000000 --- a/tests/language_2/map/literal8_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test the use of type arguments on const map literals using general expression -// as keys. - -library map_literal8_test; - -import "package:expect/expect.dart"; - -class A { - const A(); -} - -class B extends A { - final a; - const B(this.a); -} - -void main() { - var m1 = const { - const A(): 0, - const B(0): 1, - const B(1): 2, - const B(const A()): 3, - }; - Expect.isTrue(m1 is Map); - Expect.isTrue(m1 is Map); - Expect.isFalse(m1 is Map); - Expect.isFalse(m1 is Map); - - var m2 = const { - const A(): 0, - const B(0): 1, - const B(1): 2, - const B(const A()): 3, - }; - Expect.isTrue(m2 is Map); - Expect.isTrue(m2 is Map); - Expect.isFalse(m2 is Map); - Expect.isFalse(m2 is Map); -} diff --git a/tests/language_2/map/literal9_test.dart b/tests/language_2/map/literal9_test.dart deleted file mode 100644 index 8e9c37645ae..00000000000 --- a/tests/language_2/map/literal9_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test the use type arguments on constant maps. - -library map_literal9_test; - -import "package:expect/expect.dart"; - -void main() { - var m1 = const {"[object Object]": 0, "1": 1}; - Expect.isFalse(m1.containsKey(new Object())); - Expect.isNull(m1[new Object()]); - Expect.isFalse(m1.containsKey(1)); - Expect.isNull(m1[1]); - - var m2 = const {"[object Object]": 0, "1": 1, "__proto__": 2}; - Expect.isFalse(m2.containsKey(new Object())); - Expect.isNull(m2[new Object()]); - Expect.isFalse(m2.containsKey(1)); - Expect.isNull(m2[1]); -} diff --git a/tests/language_2/map/literal_syntax_test.dart b/tests/language_2/map/literal_syntax_test.dart deleted file mode 100644 index 54e5141f3a2..00000000000 --- a/tests/language_2/map/literal_syntax_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class Foo { - var x; - var y; - var z; - var v; - Foo() - : x = {}, - y = {}, - z = const {}, - v = const {}; -} - -main() { - Expect.equals("{}", new Foo().x.toString()); - Expect.equals("{}", new Foo().y.toString()); - Expect.equals("{}", new Foo().z.toString()); - Expect.equals("{}", new Foo().v.toString()); -} diff --git a/tests/language_2/map/literal_test.dart b/tests/language_2/map/literal_test.dart deleted file mode 100644 index ba1c3dcf125..00000000000 --- a/tests/language_2/map/literal_test.dart +++ /dev/null @@ -1,80 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Tests map literals. - -class MapLiteralTest { - MapLiteralTest() {} - - static testMain() { - var test = new MapLiteralTest(); - test.testStaticInit(); - test.testConstInit(); - } - - testStaticInit() { - var testClass = new StaticInit(); - testClass.test(); - } - - testConstInit() { - var testClass = new ConstInit(); - testClass.test(); - } - - testLocalInit() { - // Test construction of static const map literals - var map1 = {"a": 1, "b": 2}; - // Test construction of static const map literals, with numbers - var map2 = {"1": 1, "2": 2}; - - Expect.equals(1, map1["a"]); - Expect.equals(2, map1["b"]); - - Expect.equals(1, map2["1"]); - Expect.equals(2, map2["2"]); - } -} - -class StaticInit { - StaticInit() {} - - // Test construction of static const map literals - static const map1 = const {"a": 1, "b": 2}; - // Test construction of static const map literals, with numbers - static const map2 = const {"1": 1, "2": 2}; - - test() { - Expect.equals(1, map1["a"]); - Expect.equals(2, map1["b"]); - - Expect.equals(1, map2["1"]); - Expect.equals(2, map2["2"]); - } -} - -class ConstInit { - final map1; - final map2; - - ConstInit() - : this.map1 = {"a": 1, "b": 2}, - this.map2 = {"1": 1, "2": 2} {} - - test() { - Expect.equals(1, map1["a"]); - Expect.equals(2, map1["b"]); - - Expect.equals(1, map2["1"]); - Expect.equals(2, map2["2"]); - } -} - -main() { - MapLiteralTest.testMain(); -} diff --git a/tests/language_2/map/map_test.dart b/tests/language_2/map/map_test.dart deleted file mode 100644 index 797572b56eb..00000000000 --- a/tests/language_2/map/map_test.dart +++ /dev/null @@ -1,224 +0,0 @@ -// 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 subtest of the larger MapTest. Will eliminate once the full -// test is running. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class MapTest { - static void testDeletedElement(Map map) { - map.clear(); - for (int i = 0; i < 100; i++) { - map[1] = 2; - Expect.equals(1, map.length); - int x = map.remove(1); - Expect.equals(2, x); - Expect.equals(0, map.length); - } - Expect.equals(0, map.length); - for (int i = 0; i < 100; i++) { - map[i] = 2; - Expect.equals(1, map.length); - int x = map.remove(105); - Expect.equals(null, x); - Expect.equals(1, map.length); - x = map.remove(i); - Expect.equals(2, x); - Expect.equals(0, map.length); - } - Expect.equals(0, map.length); - map.remove(105); - } - - static void test(Map map) { - testDeletedElement(map); - testMap(map, 1, 2, 3, 4, 5, 6, 7, 8); - map.clear(); - testMap(map, "value1", "value2", "value3", "value4", "value5", "value6", - "value7", "value8"); - } - - static void testMap(Map map, key1, key2, key3, key4, key5, key6, key7, key8) { - int value1 = 10; - int value2 = 20; - int value3 = 30; - int value4 = 40; - int value5 = 50; - int value6 = 60; - int value7 = 70; - int value8 = 80; - - Expect.equals(0, map.length); - - map[key1] = value1; - Expect.equals(value1, map[key1]); - map[key1] = value2; - Expect.equals(false, map.containsKey(key2)); - Expect.equals(1, map.length); - - map[key1] = value1; - Expect.equals(value1, map[key1]); - // Add enough entries to make sure the table grows. - map[key2] = value2; - Expect.equals(value2, map[key2]); - Expect.equals(2, map.length); - map[key3] = value3; - Expect.equals(value2, map[key2]); - Expect.equals(value3, map[key3]); - map[key4] = value4; - Expect.equals(value3, map[key3]); - Expect.equals(value4, map[key4]); - map[key5] = value5; - Expect.equals(value4, map[key4]); - Expect.equals(value5, map[key5]); - map[key6] = value6; - Expect.equals(value5, map[key5]); - Expect.equals(value6, map[key6]); - map[key7] = value7; - Expect.equals(value6, map[key6]); - Expect.equals(value7, map[key7]); - map[key8] = value8; - Expect.equals(value1, map[key1]); - Expect.equals(value2, map[key2]); - Expect.equals(value3, map[key3]); - Expect.equals(value4, map[key4]); - Expect.equals(value5, map[key5]); - Expect.equals(value6, map[key6]); - Expect.equals(value7, map[key7]); - Expect.equals(value8, map[key8]); - Expect.equals(8, map.length); - - map.remove(key4); - Expect.equals(false, map.containsKey(key4)); - Expect.equals(7, map.length); - - // Test clearing the table. - map.clear(); - Expect.equals(0, map.length); - Expect.equals(false, map.containsKey(key1)); - Expect.equals(false, map.containsKey(key2)); - Expect.equals(false, map.containsKey(key3)); - Expect.equals(false, map.containsKey(key4)); - Expect.equals(false, map.containsKey(key5)); - Expect.equals(false, map.containsKey(key6)); - Expect.equals(false, map.containsKey(key7)); - Expect.equals(false, map.containsKey(key8)); - - // Test adding and removing again. - map[key1] = value1; - Expect.equals(value1, map[key1]); - Expect.equals(1, map.length); - map[key2] = value2; - Expect.equals(value2, map[key2]); - Expect.equals(2, map.length); - map[key3] = value3; - Expect.equals(value3, map[key3]); - map.remove(key3); - Expect.equals(2, map.length); - map[key4] = value4; - Expect.equals(value4, map[key4]); - map.remove(key4); - Expect.equals(2, map.length); - map[key5] = value5; - Expect.equals(value5, map[key5]); - map.remove(key5); - Expect.equals(2, map.length); - map[key6] = value6; - Expect.equals(value6, map[key6]); - map.remove(key6); - Expect.equals(2, map.length); - map[key7] = value7; - Expect.equals(value7, map[key7]); - map.remove(key7); - Expect.equals(2, map.length); - map[key8] = value8; - Expect.equals(value8, map[key8]); - map.remove(key8); - Expect.equals(2, map.length); - - Expect.equals(true, map.containsKey(key1)); - Expect.equals(true, map.containsValue(value1)); - - // Test Map.forEach. - Map other_map = new Map(); - void testForEachMap(key, value) { - other_map[key] = value; - } - - map.forEach(testForEachMap); - Expect.equals(true, other_map.containsKey(key1)); - Expect.equals(true, other_map.containsKey(key2)); - Expect.equals(true, other_map.containsValue(value1)); - Expect.equals(true, other_map.containsValue(value2)); - Expect.equals(2, other_map.length); - - other_map.clear(); - Expect.equals(0, other_map.length); - - // Test Collection.keys. - void testForEachCollection(value) { - other_map[value] = value; - } - - Iterable keys = map.keys; - keys.forEach(testForEachCollection); - Expect.equals(true, other_map.containsKey(key1)); - Expect.equals(true, other_map.containsKey(key2)); - Expect.equals(true, other_map.containsValue(key1)); - Expect.equals(true, other_map.containsValue(key2)); - Expect.equals(true, !other_map.containsKey(value1)); - Expect.equals(true, !other_map.containsKey(value2)); - Expect.equals(true, !other_map.containsValue(value1)); - Expect.equals(true, !other_map.containsValue(value2)); - Expect.equals(2, other_map.length); - other_map.clear(); - Expect.equals(0, other_map.length); - - // Test Collection.values. - Iterable values = map.values; - values.forEach(testForEachCollection); - Expect.equals(true, !other_map.containsKey(key1)); - Expect.equals(true, !other_map.containsKey(key2)); - Expect.equals(true, !other_map.containsValue(key1)); - Expect.equals(true, !other_map.containsValue(key2)); - Expect.equals(true, other_map.containsKey(value1)); - Expect.equals(true, other_map.containsKey(value2)); - Expect.equals(true, other_map.containsValue(value1)); - Expect.equals(true, other_map.containsValue(value2)); - Expect.equals(2, other_map.length); - other_map.clear(); - Expect.equals(0, other_map.length); - - // Test Map.putIfAbsent. - map.clear(); - Expect.equals(false, map.containsKey(key1)); - map.putIfAbsent(key1, () => 10); - Expect.equals(true, map.containsKey(key1)); - Expect.equals(10, map[key1]); - Expect.equals(10, map.putIfAbsent(key1, () => 11)); - } - - static testKeys(Map map) { - map[1] = 101; - map[2] = 102; - Iterable k = map.keys; - Expect.equals(2, k.length); - Iterable v = map.values; - Expect.equals(2, v.length); - Expect.equals(true, map.containsValue(101)); - Expect.equals(true, map.containsValue(102)); - Expect.equals(false, map.containsValue(103)); - } - - static testMain() { - test(new Map()); - testKeys(new Map()); - } -} - -main() { - MapTest.testMain(); -} diff --git a/tests/language_2/map/null_key_foreach_test.dart b/tests/language_2/map/null_key_foreach_test.dart deleted file mode 100644 index a8ea1860a20..00000000000 --- a/tests/language_2/map/null_key_foreach_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -// Regression test for using `null` as a key with `forEach`. - -main() { - var x = new Map(); - x[1] = 2; - x[null] = 1; - int c = 0; - x.forEach((int i, int j) { - c++; - Expect.isTrue(i == null || i is int, 'int or null expected'); - }); - Expect.equals(2, c); -} diff --git a/tests/language_2/map/ordered_test.dart b/tests/language_2/map/ordered_test.dart deleted file mode 100644 index 0678d1add09..00000000000 --- a/tests/language_2/map/ordered_test.dart +++ /dev/null @@ -1,82 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Tests that map literals are ordered. - -class OrderedMapsTest { - static testMain() { - testMaps(const {"a": 1, "c": 2}, const {"c": 2, "a": 1}, true); - testMaps({"a": 1, "c": 2}, {"c": 2, "a": 1}, false); - } - - static void testMaps(map1, map2, bool isConst) { - Expect.isFalse(identical(map1, map2)); - - var keys = map1.keys.toList(); - Expect.equals(2, keys.length); - Expect.equals("a", keys[0]); - Expect.equals("c", keys[1]); - - keys = map2.keys.toList(); - Expect.equals(2, keys.length); - Expect.equals("c", keys[0]); - Expect.equals("a", keys[1]); - - var values = map1.values.toList(); - Expect.equals(2, values.length); - Expect.equals(1, values[0]); - Expect.equals(2, values[1]); - - values = map2.values.toList(); - Expect.equals(2, values.length); - Expect.equals(2, values[0]); - Expect.equals(1, values[1]); - - if (isConst) return; - - map1["b"] = 3; - map2["b"] = 3; - - keys = map1.keys.toList(); - Expect.equals(3, keys.length); - Expect.equals("a", keys[0]); - Expect.equals("c", keys[1]); - Expect.equals("b", keys[2]); - - keys = map2.keys.toList(); - Expect.equals(3, keys.length); - Expect.equals("c", keys[0]); - Expect.equals("a", keys[1]); - Expect.equals("b", keys[2]); - - values = map1.values.toList(); - Expect.equals(3, values.length); - Expect.equals(1, values[0]); - Expect.equals(2, values[1]); - Expect.equals(3, values[2]); - - values = map2.values.toList(); - Expect.equals(3, values.length); - Expect.equals(2, values[0]); - Expect.equals(1, values[1]); - Expect.equals(3, values[2]); - - map1["a"] = 4; - keys = map1.keys.toList(); - Expect.equals(3, keys.length); - Expect.equals("a", keys[0]); - - values = map1.values.toList(); - Expect.equals(3, values.length); - Expect.equals(4, values[0]); - } -} - -main() { - OrderedMapsTest.testMain(); -} diff --git a/tests/language_2/metadata/cyclic_test.dart b/tests/language_2/metadata/cyclic_test.dart deleted file mode 100644 index d120e84c436..00000000000 --- a/tests/language_2/metadata/cyclic_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2014, 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 - -// Check that metadata on a class 'Super' using subtypes of 'Super' are not -// considered as cyclic inheritance or lead to crashes. - -@Sub1(0) //# 01: ok -class Super { - final field; - @Sub2(1) //# 02: ok - const Super(this.field); -} - -class Sub1 extends Super { - const Sub1(var field) : super(field); -} - -class Sub2 extends Super { - const Sub2(var field) : super(field); -} - -void main() { - print(new Super(1)); -} diff --git a/tests/language_2/metadata/lib.dart b/tests/language_2/metadata/lib.dart deleted file mode 100644 index 3b05b6b2c0e..00000000000 --- a/tests/language_2/metadata/lib.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2012, 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 metadata.dart; - -class Alien { - final String qwrrkz; - const Alien(this.qwrrkz); - const Alien.unknown() : qwrrkz = "???"; -} - -const Klingon = const Alien("Klingon"); diff --git a/tests/language_2/metadata/metadata_builtin_test.dart b/tests/language_2/metadata/metadata_builtin_test.dart deleted file mode 100644 index acba9821795..00000000000 --- a/tests/language_2/metadata/metadata_builtin_test.dart +++ /dev/null @@ -1,117 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Verify that built-in identifiers can be used to specify metadata. - -const abstract = 0; -const as = 0; -const covariant = 0; -const deferred = 0; -const dynamic = 0; -const export = 0; -const external = 0; -const factory = 0; -const Function = 0; -const get = 0; -const implements = 0; -const import = 0; -const interface = 0; -const library = 0; -const mixin = 0; -const operator = 0; -const part = 0; -const set = 0; -const static = 0; -const typedef = 0; - -@abstract -@as -@covariant -@deferred -@dynamic -@export -@external -@factory -@Function -@get -@implements -@import -@interface -@library -@mixin -@operator -@part -@set -@static -@typedef -void main( - @abstract - @as - @covariant - @deferred - @dynamic - @export - @external - @factory - @Function - @get - @implements - @import - @interface - @library - @mixin - @operator - @part - @set - @static - @typedef - List args, -) { - @abstract - @as - @covariant - @deferred - @dynamic - @export - @external - @factory - @Function - @get - @implements - @import - @interface - @library - @mixin - @operator - @part - @set - @static - @typedef - var x = true; - - void f< - @abstract - @as - @covariant - @deferred - @dynamic - @export - @external - @factory - @Function - @get - @implements - @import - @interface - @library - @mixin - @operator - @part - @set - @static - @typedef - X>() {} -} diff --git a/tests/language_2/metadata/metadata_test.dart b/tests/language_2/metadata/metadata_test.dart deleted file mode 100644 index 468c4f61f30..00000000000 --- a/tests/language_2/metadata/metadata_test.dart +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2012, 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 - -// Test ensuring that compiler can parse metadata. Need to add negative -// test cases with illegal metadata annotations. - -library metadata_test.dart; - -import "package:expect/expect.dart"; -import "lib.dart" as Meta; - -class Tag { - final String annotation; - const Tag(this.annotation); -} - -const meta1 = 1; -const meta2 = const Tag("meta2"); - -const extern = const Tag("external"); - -@meta1 -var topLevelVar; -@Meta.Alien.unknown() -List unknownUnknowns; - -@meta1 -typedef int DingDong<@meta2 T>(@meta1 event); - -@meta1 -class A<@Tag("typeParam") T> { - @meta1 - @meta2 - static String staticField; - - @Meta.Alien("ET") - int foo(@meta1 bool fool, {@meta1 @Tag("opt") x: 100}) { - g() => 10; - return x * g(); - } - - @Tag(r"timewarp") - List getNextWeeksLottoNumbers() => [1, 2, 3, 4, 5, 6]; -} - -@meta1 -main() { - @meta1 - var a = new A(); - Expect.equals(0, a.foo(false, x: 0)); - - for (@Tag("loopvar") - int i = 0; - i < 10; - i++) { - // Do something. - } - - @meta1 - var s = r'This is a raw \\ string.'; -} diff --git a/tests/language_2/metadata/scope1_test.dart b/tests/language_2/metadata/scope1_test.dart deleted file mode 100644 index 9ee34d455ce..00000000000 --- a/tests/language_2/metadata/scope1_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2014, 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 - -// Test that a type variable is not in scope for metadata declared on the type -// declaration. - -@deprecated -typedef Foo - // //# 01: ok - (); - -main() { - Foo f = null; -} diff --git a/tests/language_2/metadata/scope2_test.dart b/tests/language_2/metadata/scope2_test.dart deleted file mode 100644 index 4afea25011d..00000000000 --- a/tests/language_2/metadata/scope2_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2014, 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 - -// Test that a type variable is not in scope for metadata declared on the type -// declaration. - -@deprecated -class Foo - // //# 01: ok -{} - -main() { - Foo f = null; -} diff --git a/tests/language_2/metadata/self_test.dart b/tests/language_2/metadata/self_test.dart deleted file mode 100644 index 4185d5c2103..00000000000 --- a/tests/language_2/metadata/self_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2014, 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 - -// Test that metadata refer to the annotated declaration. - -@Foo() -class Foo { - const Foo(); -} - -main() { - Foo f = const Foo(); -} diff --git a/tests/language_2/metadata/type_parameter_scope_inner_test.dart b/tests/language_2/metadata/type_parameter_scope_inner_test.dart deleted file mode 100644 index d88c1248451..00000000000 --- a/tests/language_2/metadata/type_parameter_scope_inner_test.dart +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2021, 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. - -// Test that metadata on a type parameter cannot refer to declarations in an -// inner scope. See https://github.com/dart-lang/language/issues/1790. - -class Annotation { - const Annotation(dynamic d); -} - -class Class<@Annotation(foo) T> { -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_WITH_NON_CONSTANT_ARGUMENT -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER -// [cfe] Undefined name 'foo'. - static void foo() {} -} - -void function<@Annotation(foo) T>(dynamic foo) { -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_WITH_NON_CONSTANT_ARGUMENT -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER -// [cfe] Undefined name 'foo'. - dynamic foo; -} - -extension Extension<@Annotation(foo) T> on Class { -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_WITH_NON_CONSTANT_ARGUMENT -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER -// [cfe] Undefined name 'foo'. - static void foo() {} - - void extensionMethod<@Annotation(foo) T, @Annotation(bar) U>() {} - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_WITH_NON_CONSTANT_ARGUMENT - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER - // [cfe] Undefined name 'bar'. -} - -class C { - void method<@Annotation(foo) T, @Annotation(bar) U>(dynamic foo) { - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_WITH_NON_CONSTANT_ARGUMENT - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER - // [cfe] Undefined name 'foo'. - dynamic foo; - } - - static void bar() {} -} - -mixin Mixin<@Annotation(foo) T> { -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_WITH_NON_CONSTANT_ARGUMENT -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER -// [cfe] Undefined name 'foo'. - static void foo() {} -} - -typedef Typedef<@Annotation(foo) T> = void Function(); -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.CONST_WITH_NON_CONSTANT_ARGUMENT -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER -// [cfe] Undefined name 'foo'. diff --git a/tests/language_2/metadata/type_parameter_scope_other_test.dart b/tests/language_2/metadata/type_parameter_scope_other_test.dart deleted file mode 100644 index f2aa95c0d7a..00000000000 --- a/tests/language_2/metadata/type_parameter_scope_other_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2021, 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. - -// Test that identifiers in type parameter metadata can refer to other type -// parameters in the same declaration; they are in scope and take precedence -// over top level declarations, even if this leads to compile errors. - -/// Top level declaration of T; nothing should resolve to this. -void T() {} - -class Annotation { - const Annotation(dynamic d); -} - -class Class {} -// ^ -// [analyzer] COMPILE_TIME_ERROR.CONST_TYPE_PARAMETER -// [cfe] Type variables can't be used as constants. - -void function() {} -// ^ -// [analyzer] COMPILE_TIME_ERROR.CONST_TYPE_PARAMETER -// [cfe] Type variables can't be used as constants. - -extension Extension on Map {} -// ^ -// [analyzer] COMPILE_TIME_ERROR.CONST_TYPE_PARAMETER -// [cfe] Type variables can't be used as constants. - -class C { - void method() {} - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONST_TYPE_PARAMETER - // [cfe] Type variables can't be used as constants. -} - -mixin Mixin {} -// ^ -// [analyzer] COMPILE_TIME_ERROR.CONST_TYPE_PARAMETER -// [cfe] Type variables can't be used as constants. - -typedef void Typedef1(T t, U u); -// ^ -// [analyzer] COMPILE_TIME_ERROR.CONST_TYPE_PARAMETER -// [cfe] Type variables can't be used as constants. - -typedef Typedef2 = void Function(T t, U u); -// ^ -// [analyzer] COMPILE_TIME_ERROR.CONST_TYPE_PARAMETER -// [cfe] Type variables can't be used as constants. diff --git a/tests/language_2/method/as_constants2_test.dart b/tests/language_2/method/as_constants2_test.dart deleted file mode 100644 index 2b5121fbb0d..00000000000 --- a/tests/language_2/method/as_constants2_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2012, 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. -// Test that a function only used by compile-time constants is being -// generated. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -topLevelMethod() => 42; - -class A { - final Function f; - const A(this.f); -} - -main() { - Expect.equals(42, const A(topLevelMethod).f()); -} diff --git a/tests/language_2/method/as_constants_test.dart b/tests/language_2/method/as_constants_test.dart deleted file mode 100644 index ed313133ea5..00000000000 --- a/tests/language_2/method/as_constants_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -topLevelMethod() => 't'; - -const topLevelFieldForTopLevelMethod = topLevelMethod; -const topLevelFieldForStaticMethod = A.staticMethod; - -class A { - final Function closure; - const A(this.closure); - const A.defaultTopLevel([this.closure = topLevelMethod]); - const A.defaultStatic([this.closure = staticMethod]); - const A.defaultStatic2([this.closure = A.staticMethod]); - run() => closure(); - - static staticMethod() => 's'; - static const staticFieldForStaticMethod = staticMethod; - static const staticFieldForTopLevelMethod = topLevelMethod; -} - -main() { - Expect.equals('t', (const A(topLevelMethod)).run()); - Expect.equals('s', (const A(A.staticMethod)).run()); - Expect.equals('t', (const A.defaultTopLevel()).run()); - Expect.equals('s', (const A.defaultStatic()).run()); - Expect.equals('s', (const A.defaultStatic2()).run()); - Expect.equals('t', (new A.defaultTopLevel()).run()); - Expect.equals('s', (new A.defaultStatic()).run()); - Expect.equals('s', (new A.defaultStatic2()).run()); - Expect.equals('t', topLevelFieldForTopLevelMethod()); - Expect.equals('s', topLevelFieldForStaticMethod()); - Expect.equals('t', A.staticFieldForTopLevelMethod()); - Expect.equals('s', A.staticFieldForStaticMethod()); - - var map = const {'t': topLevelMethod, 's': A.staticMethod}; - Expect.equals('t', map['t']()); - Expect.equals('s', map['s']()); -} diff --git a/tests/language_2/method/binding_test.dart b/tests/language_2/method/binding_test.dart deleted file mode 100644 index 6f708de15a1..00000000000 --- a/tests/language_2/method/binding_test.dart +++ /dev/null @@ -1,176 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Bind a method to a variable that can be invoked as a function - -class A { - int a; - - static var func; - - A(this.a) {} - - static foo() { - return 4; - } - - bar() { - return a; - } - - int baz() { - return a; - } - - getThis() { - return this.bar; - } - - getNoThis() { - return bar; - } - - methodArgs(arg) { - return arg + a; - } - - selfReference() { - return selfReference; - } - - invokeBaz() { - return (baz)(); - } - - invokeBar(var obj) { - return (obj.bar)(); - } - - invokeThisBar() { - return (this.bar)(); - } - - implicitStaticRef() { - return foo; - } -} - -class B { - static foo() { - return -1; - } -} - -class C { - C() {} - var f; -} - -topLevel99() { - return 99; -} - -var topFunc; - -class D extends A { - D(a) : super(a) {} - getSuper() { - return super.bar; - } -} - -class MethodBindingTest { - static test() { - // Create closure from global - Expect.equals(99, topLevel99()); - Function f99 = topLevel99; - Expect.equals(99, f99()); - - // Invoke closure through a global - topFunc = f99; - Expect.equals(99, topFunc()); - - // Create closure from static method - Function f4 = A.foo; - Expect.equals(4, f4()); - - // Create closure from instance method - var o5 = new A(5); - Function f5 = o5.bar; - Expect.equals(5, f5()); - - // Assign closure to field and invoke it - var c = new C(); - c.f = () => "success"; - Expect.equals("success", c.f()); - - // referencing instance method with explicit 'this' qualifier - var o6 = new A(6); - var f6 = o6.getThis(); - Expect.equals(6, f6()); - - // referencing an instance method with no qualifier - var o7 = new A(7); - var f7 = o7.getNoThis(); - Expect.equals(7, f7()); - - // bind a method that takes arguments - var o8 = new A(8); - Function f8 = o8.methodArgs; - Expect.equals(9, f8(1)); - - // Self referential method - var o9 = new A(9); - Function f9 = o9.selfReference; - - // invoking a known method as if it were a bound closure... - var o10 = new A(10); - Expect.equals(10, o10.invokeBaz()); - - // invoking a known method as if it were a bound closure... - var o11 = new A(11); - Expect.equals(10, o11.invokeBar(o10)); - - // invoking a known method as if it were a bound closure... - var o12 = new A(12); - Expect.equals(12, o12.invokeThisBar()); - - // bind to a static variable with no explicit class qualifier - var o13 = new A(13); - Function f13 = o13.implicitStaticRef(); - Expect.equals(4, f13()); - - var o14 = new D(14); - Function f14 = o14.getSuper(); - Expect.equals(14, f14()); - - // Assign static field to a function and invoke it. - A.func = A.foo; - Expect.equals(4, A.func()); - - // bind a function that is possibly native in JavaScript. - String o15 = 'hithere'; - var f15 = o15.substring; - Expect.equals('i', f15(1, 2)); - - var o16 = 'hithere'; - var f16 = o16.substring; - Expect.equals('i', f16(1, 2)); - - var f17 = 'hithere'.substring; - Expect.equals('i', f17(1, 2)); - } - - static testMain() { - test(); - } -} - -main() { - MethodBindingTest.testMain(); -} diff --git a/tests/language_2/method/invocation_test.dart b/tests/language_2/method/invocation_test.dart deleted file mode 100644 index 8ba25abbd8a..00000000000 --- a/tests/language_2/method/invocation_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Testing method invocation. -// Currently testing only NoSuchMethodError. - -class A { - A() {} - int foo() { - return 1; - } -} - -class B { - get f { - throw 123; - } -} - -class MethodInvocationTest { - static void testNullReceiver() { - A a = new A(); - Expect.equals(1, a.foo()); - a = null; - bool exceptionCaught = false; - try { - a.foo(); - } on NoSuchMethodError catch (e) { - exceptionCaught = true; - } - Expect.equals(true, exceptionCaught); - } - - static testGetterMethodInvocation() { - var b = new B(); - try { - b.f(); - } catch (e) { - Expect.equals(123, e); - } - } - - static void testMain() { - testNullReceiver(); - testGetterMethodInvocation(); - } -} - -main() { - MethodInvocationTest.testMain(); -} diff --git a/tests/language_2/method/name_test.dart b/tests/language_2/method/name_test.dart deleted file mode 100644 index f9cd04ec964..00000000000 --- a/tests/language_2/method/name_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Tests that methods with names "get", "set" and "operator" don't -// cause fatal problems. - -// With return type. -class A { - int get() { - return 1; - } - - int set() { - return 2; - } - - int operator() { - return 3; - } -} - -// Without return types. -class B { - get() { - return 1; - } - - set() { - return 2; - } - - operator() { - return 3; - } -} - -main() { - { - A a = new A(); - Expect.equals(1, a.get()); - Expect.equals(2, a.set()); - Expect.equals(3, a.operator()); - } - { - B b = new B(); - Expect.equals(1, b.get()); - Expect.equals(2, b.set()); - Expect.equals(3, b.operator()); - } -} diff --git a/tests/language_2/method/not_found_runtime_test.dart b/tests/language_2/method/not_found_runtime_test.dart deleted file mode 100644 index cce2881cbf3..00000000000 --- a/tests/language_2/method/not_found_runtime_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -class A { - - static const field = const B(); -} - -class B { - const B(); -} - -main() { - print(A.field); -} diff --git a/tests/language_2/method/not_found_test.dart b/tests/language_2/method/not_found_test.dart deleted file mode 100644 index 32337be6adb..00000000000 --- a/tests/language_2/method/not_found_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2018, 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 - -class A { -// ^ -// [cfe] The non-abstract class 'A' is missing implementations for these members: - B(); -//^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER - static const field = const B(); - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE - // ^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // [cfe] Can't access 'this' in a field initializer to read 'B'. - // [cfe] Couldn't find constructor 'B'. -} - -class B { - const B(); -} - -main() { - print(A.field); -} diff --git a/tests/language_2/method/override2_test.dart b/tests/language_2/method/override2_test.dart deleted file mode 100644 index 740fefc18cc..00000000000 --- a/tests/language_2/method/override2_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2012, 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 - -// Checks that an overriding method has compatible parameters. - -abstract class I { - m({a, b}); -} - -abstract class J extends I {} - -abstract class K extends J { - m({c, d}); // //# 00: compile-time error -} - -class C implements I { - m({a, b}) { - print("$a $b"); - } -} - -class D - extends C // //# 01: compile-time error - implements I // //# 02: compile-time error - implements J // //# 03: compile-time error -{ - m({c, d}) { - print("$c $d"); - } -} - -int main() { - var c = new C(); - c.m(a: "hello", b: "world"); - var d = new D(); - d.m(c: "hello", d: "world"); -} diff --git a/tests/language_2/method/override3_runtime_test.dart b/tests/language_2/method/override3_runtime_test.dart deleted file mode 100644 index 448bbed5de6..00000000000 --- a/tests/language_2/method/override3_runtime_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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 'package:expect/expect.dart'; - -class A { - foo(required1, {named1: 499}) => -(required1 + named1 * 3); - bar(required1, required2, {named1: 13, named2: 17}) => - -(required1 + required2 * 3 + named1 * 5 + named2 * 7); - gee({named1: 31}) => -named1; -} - -class B extends A { - foo( - required1 - - , - {named1: 499} - - ) { - return required1; - } - - bar(required1, required2, - {named1: 13 - - , - named2: 17 - - }) { - return required1 + required2 * 3 + named1 * 5; - } - - gee( - {named2: 11 - - , - named1: 31 - - }) { - return named2 * 99; - } -} - -main() { - // Ensure that compile-time errors are reached. - var b = new B(); - b.foo(499); - b.bar(1, 3, named1: 5); - b.gee(named2: 3); -} diff --git a/tests/language_2/method/override3_test.dart b/tests/language_2/method/override3_test.dart deleted file mode 100644 index faf298aadf3..00000000000 --- a/tests/language_2/method/override3_test.dart +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -class A { - foo(required1, {named1: 499}) => -(required1 + named1 * 3); - bar(required1, required2, {named1: 13, named2: 17}) => - -(required1 + required2 * 3 + named1 * 5 + named2 * 7); - gee({named1: 31}) => -named1; -} - -class B extends A { - foo( -//^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -// [cfe] The method 'B.foo' has fewer named arguments than those of overridden method 'A.foo'. - required1 - /* - , - {named1: 499} - */ - ) { - return required1; - } - - bar(required1, required2, -//^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -// [cfe] The method 'B.bar' has fewer named arguments than those of overridden method 'A.bar'. - {named1: 13 - /* - , - named2: 17 - */ - }) { - return required1 + required2 * 3 + named1 * 5; - } - - gee( -//^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -// [cfe] The method 'B.gee' doesn't have the named parameter 'named1' of overridden method 'A.gee'. - {named2: 11 - /* - , - named1: 31 - */ - }) { - return named2 * 99; - } -} - -main() { - // Ensure that compile-time errors are reached. - var b = new B(); - b.foo(499); - b.bar(1, 3, named1: 5); - b.gee(named2: 3); -} diff --git a/tests/language_2/method/override7_test.dart b/tests/language_2/method/override7_test.dart deleted file mode 100644 index 23c6565c80f..00000000000 --- a/tests/language_2/method/override7_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that we report a compile-time error when a static function conflicts -// with an inherited instance member of the same name. - -import "package:expect/expect.dart"; - -class A { - var foo = 42; // //# 00: compile-time error - get foo => 42; // //# 01: compile-time error - foo() => 42; // //# 02: compile-time error - set foo(value) { } // //# 03: compile-time error -} - -class B extends A { - static foo() => 42; -} - -main() { - Expect.equals(42, B.foo()); -} diff --git a/tests/language_2/method/override8_test.dart b/tests/language_2/method/override8_test.dart deleted file mode 100644 index e67065af5bc..00000000000 --- a/tests/language_2/method/override8_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that we report a compile-time error when an instance method conflicts -// with an inherited instance field or getter of the same name. - -import "package:expect/expect.dart"; - -class A { - var foo = 42; // //# 00: compile-time error - get foo => 42; // //# 01: compile-time error - foo() => 42; // //# 02: ok - set foo(value) { } // //# 03: compile-time error -} - -class B extends A { - foo() => 42; -} - -main() { - Expect.equals(42, new B().foo()); -} diff --git a/tests/language_2/method/override_test.dart b/tests/language_2/method/override_test.dart deleted file mode 100644 index 898a2761c0d..00000000000 --- a/tests/language_2/method/override_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Checks that a method with an instantiated return type can override a method -// with a generic return type. - -typedef V RemoveFunctionType(K key); - -class MapBase { - K remove(K key) { - throw 'Must be implemented'; - } - - void tests() { - Expect.isTrue(this is MapBase); - - // `remove` takes an argument which is covariant-by-class, so - // the tear-off has dynamic type `int Function(Object)`. - - Expect.isTrue(remove is RemoveFunctionType); - Expect.isTrue(remove is RemoveFunctionType); - Expect.isTrue(remove is RemoveFunctionType); - Expect.isTrue(remove is RemoveFunctionType, int>); - } -} - -class MethodOverrideTest extends MapBase { - String remove(String key) { - throw 'Must be implemented'; - } - - void tests() { - Expect.isTrue(this is MethodOverrideTest); - Expect.isTrue(this is MapBase); - - // `remove` takes an argument which is covariant-by-class because - // an overridden method does so, and hence the tear-off has dynamic - // type `String Function(Object)`; so does `super.remove`. - - Expect.isTrue(remove is RemoveFunctionType); - Expect.isTrue(remove is RemoveFunctionType); - Expect.isTrue(remove is! RemoveFunctionType); - Expect.isTrue(super.remove is RemoveFunctionType); - Expect.isTrue(super.remove is RemoveFunctionType); - Expect.isTrue(super.remove is! RemoveFunctionType); - } -} - -main() { - new MapBase().tests(); - new MethodOverrideTest().tests(); -} diff --git a/tests/language_2/mixin/abstract_getter_test.dart b/tests/language_2/mixin/abstract_getter_test.dart deleted file mode 100644 index 55c4d039e71..00000000000 --- a/tests/language_2/mixin/abstract_getter_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'package:expect/expect.dart'; - -abstract class B { - int get x; -} - -class C { - int get x => 42; -} - -class D extends C with B { - final int x; - - D(this.x); -} - -class C2 { - int get x => 42; -} - -abstract class B2 extends C2 { - int get x; -} - -class D2 extends B2 { - final int x; - - D2(this.x); -} - -void main() { - var d = new D(17); - Expect.equals(d.x, 17); - - var d2 = new D2(17); - Expect.equals(d.x, 17); -} diff --git a/tests/language_2/mixin/accessor_test.dart b/tests/language_2/mixin/accessor_test.dart deleted file mode 100644 index ddad1fbf301..00000000000 --- a/tests/language_2/mixin/accessor_test.dart +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2018, 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 - -// Regression test case for DDC bug where if a getter/setter is mixed in -// without a corresponding getter/setter, DDC fails to install a the -// corresponding getter/setter that calls super. - -import "package:expect/expect.dart"; - -abstract class C { - E get first; - set first(E value); - E operator [](int index); - operator []=(int index, E value); -} - -abstract class CMixin implements C { - E get first => this[0]; - set first(E x) { - this[0] = x; - } -} - -abstract class CBase extends Object with CMixin {} - -abstract class DMixin implements C { - set first(E _) => throw new UnsupportedError(''); - operator []=(int index, E value) => throw new UnsupportedError(''); -} - -abstract class DBase = CBase with DMixin; - -class DView extends DBase { - final Iterable _source; - DView(this._source); - E operator [](int index) => _source.elementAt(index); -} - -abstract class FMixin implements C { - E get first => throw new UnsupportedError(''); - E operator [](int index) => throw new UnsupportedError(''); -} - -class FView extends CBase with FMixin { - List _values; - FView(this._values); - operator []=(int index, E value) { - _values[index] = value; - } -} - -void main() { - var d = new DView([3]); - Expect.equals(3, d.first); - Expect.throws(() => d.first = 42, (e) => e is UnsupportedError); - - var list = [3]; - var f = new FView(list); - f.first = 42; - Expect.equals(42, list[0]); - Expect.throws(() => f.first, (e) => e is UnsupportedError); -} diff --git a/tests/language_2/mixin/and_extension_member_test.dart b/tests/language_2/mixin/and_extension_member_test.dart deleted file mode 100644 index e8d29f16f5b..00000000000 --- a/tests/language_2/mixin/and_extension_member_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2017, 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 - -import 'dart:collection'; -import 'package:expect/expect.dart'; - -class OverrideFirstGetter { - get first => 9999; -} - -class ListMock extends ListBase with OverrideFirstGetter { - final _list = []; - int get length => _list.length; - void set length(int x) { - _list.length = x; - } - - operator [](x) => _list[x]; - void operator []=(x, y) { - _list[x] = y; - } -} - -// Regression test for -// https://github.com/dart-lang/sdk/issues/29273#issuecomment-292384130 -main() { - List x = new ListMock(); - x.add(42); - Expect.equals(42, x[0]); - Expect.equals(9999, x.first); -} diff --git a/tests/language_2/mixin/black_listed_test.dart b/tests/language_2/mixin/black_listed_test.dart deleted file mode 100644 index 47a79992810..00000000000 --- a/tests/language_2/mixin/black_listed_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2013, 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 - -// Check mixin of black-listed types. - -import 'package:expect/expect.dart'; - -class C {} - -class D {} - -class C1 extends Object -with String //# 01: compile-time error -{} - -class D1 extends Object with C -, Null //# 02: compile-time error -{} - -class E1 extends Object - with -int, //# 03: compile-time error - C {} - -class F1 extends Object - with - C -, double //# 04: compile-time error - , - D {} - -class C2 = Object with num; //# 05: compile-time error - -class D2 = Object with C -, bool //# 06: compile-time error - ; - -class E2 = Object - with -String, //# 07: compile-time error - C; - -class F2 = Object - with - C, -dynamic, //# 08: compile-time error - D; - -main() { - Expect.isNotNull(new C1()); - Expect.isNotNull(new D1()); - Expect.isNotNull(new E1()); - Expect.isNotNull(new F1()); - Expect.isNotNull(new C2()); //# 05: continued - Expect.isNotNull(new D2()); - Expect.isNotNull(new E2()); - Expect.isNotNull(new F2()); -} diff --git a/tests/language_2/mixin/bound_test.dart b/tests/language_2/mixin/bound_test.dart deleted file mode 100644 index aeb5fdad2cf..00000000000 --- a/tests/language_2/mixin/bound_test.dart +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -// library abstract_expressions; - -abstract class AbstractExpression {} - -abstract class AbstractAddition { - E operand1, operand2; - AbstractAddition(this.operand1, this.operand2); -} - -abstract class AbstractSubtraction { - E operand1, operand2; - AbstractSubtraction(this.operand1, this.operand2); -} - -abstract class AbstractNumber { - int val; - AbstractNumber(this.val); -} - -// library evaluator; - -abstract class ExpressionWithEval { - int get eval; -} - -abstract class AdditionWithEval { - E get operand1; - E get operand2; - int get eval => operand1.eval + operand2.eval; -} - -abstract class SubtractionWithEval { - E get operand1; - E get operand2; - int get eval => operand1.eval - operand2.eval; -} - -abstract class NumberWithEval { - int get val; - int get eval => val; -} - -// library multiplication; - -abstract class AbstractMultiplication { - E operand1, operand2; - AbstractMultiplication(this.operand1, this.operand2); -} - -// library multiplicationEvaluator; - -// import 'evaluator.dart' show ExpressionWithEval; - -abstract class MultiplicationWithEval { - E get operand1; - E get operand2; - int get eval => operand1.eval * operand2.eval; -} - -// library string_converter; - -abstract class ExpressionWithStringConversion { - String toString(); -} - -abstract class AdditionWithStringConversion< - E extends ExpressionWithStringConversion> { - E get operand1; - E get operand2; - String toString() => '($operand1 + $operand2))'; -} - -abstract class SubtractionWithStringConversion< - E extends ExpressionWithStringConversion> { - E get operand1; - E get operand2; - String toString() => '($operand1 - $operand2)'; -} - -abstract class NumberWithStringConversion { - int get val; - String toString() => val.toString(); -} - -abstract class MultiplicationWithStringConversion< - E extends ExpressionWithStringConversion> { - E get operand1; - E get operand2; - String toString() => '($operand1 * $operand2)'; -} - -// library expressions; - -// import 'abstractExpressions.dart'; -// import 'evaluator.dart'; -// import 'multiplication.dart'; -// import 'multiplicationEvaluator.dart'; -// import 'stringConverter.dart'; - -abstract class Expression = AbstractExpression - with ExpressionWithEval, ExpressionWithStringConversion; - -class Addition = AbstractAddition - with AdditionWithEval, AdditionWithStringConversion - implements Expression; - -class Subtraction = AbstractSubtraction - with - SubtractionWithEval, - SubtractionWithStringConversion - implements Expression; - -class Number = AbstractNumber - with NumberWithEval, NumberWithStringConversion - implements Expression; - -class Multiplication = AbstractMultiplication - with - MultiplicationWithEval, - MultiplicationWithStringConversion - implements Expression; - -void main() { - Expression e = new Multiplication(new Addition(new Number(4), new Number(2)), - new Subtraction(new Number(10), new Number(7))); - Expect.equals('((4 + 2)) * (10 - 7)) = 18', '$e = ${e.eval}'); -} diff --git a/tests/language_2/mixin/class_from_core_library_test.dart b/tests/language_2/mixin/class_from_core_library_test.dart deleted file mode 100644 index 713649309be..00000000000 --- a/tests/language_2/mixin/class_from_core_library_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2017, 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 -import 'dart:collection'; - -class MyList extends Object with ListMixin { - int length = 0; - operator [](index) => null; - void operator []=(index, value) {} -} - -main() { - new MyList().length; -} diff --git a/tests/language_2/mixin/cyclic_runtime_test.dart b/tests/language_2/mixin/cyclic_runtime_test.dart deleted file mode 100644 index 886299b822e..00000000000 --- a/tests/language_2/mixin/cyclic_runtime_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test for cyclicity check on named mixin applications. - -class A {} - -class S {} - -class M {} - -class C1 = S with M; - -class C3 = S with M implements A; - - -void main() { - new C1(); - - new C3(); - -} diff --git a/tests/language_2/mixin/cyclic_test.dart b/tests/language_2/mixin/cyclic_test.dart deleted file mode 100644 index 2276fb72f0e..00000000000 --- a/tests/language_2/mixin/cyclic_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test for cyclicity check on named mixin applications. - -class A {} - -class S {} - -class M {} - -class C1 = S with M; -class C2 = S with C2; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.RECURSIVE_INTERFACE_INHERITANCE -// [cfe] 'C2' is a supertype of itself. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -class C3 = S with M implements A; -class C4 = S with M implements C4; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.RECURSIVE_INTERFACE_INHERITANCE -// [cfe] 'C4' is a supertype of itself. - -void main() { - new C1(); - new C2(); - new C3(); - new C4(); -} diff --git a/tests/language_2/mixin/deduplication_test.dart b/tests/language_2/mixin/deduplication_test.dart deleted file mode 100644 index 3510f9e1e0f..00000000000 --- a/tests/language_2/mixin/deduplication_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test mixin de-duplication with new mixin syntax. - -import 'package:expect/expect.dart'; - -class A { - int foo() => 1; -} - -class B { - int bar() => 2; -} - -abstract class C implements A, B { -} - -mixin M1 on A, B { - int sum() => foo() + bar(); -} - -mixin M2 on A, B, M1 { - int sumX2() => sum()*2; -} - -class X extends C with M1, M2 { - int foo() => 4; - int bar() => 5; -} - -class Y extends C with M1, M2 { - int foo() => 7; - int bar() => 10; -} - -X x = new X(); -Y y = new Y(); - -void main() { - Expect.equals(9, x.sum()); - Expect.equals(18, x.sumX2()); - Expect.equals(17, y.sum()); - Expect.equals(34, y.sumX2()); -} diff --git a/tests/language_2/mixin/extends_field_test.dart b/tests/language_2/mixin/extends_field_test.dart deleted file mode 100644 index 0f7aff6123b..00000000000 --- a/tests/language_2/mixin/extends_field_test.dart +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class S { - var foo = "S-foo"; -} - -class M1 { - final bar = "M1-bar"; -} - -class M2 { - var baz = "M2-baz"; -} - -class C extends S with M1 {} - -class D extends S with M1, M2 {} - -class E extends S with M2, M1 {} - -class F extends E { - var fez = "F-fez"; -} - -main() { - dynamic c = new C(); - dynamic d = new D(); - dynamic e = new E(); - dynamic f = new F(); - - Expect.equals("S-foo", c.foo); - Expect.equals("S-foo", d.foo); - Expect.equals("S-foo", e.foo); - Expect.equals("S-foo", f.foo); - - Expect.equals("M1-bar", c.bar); - Expect.equals("M1-bar", d.bar); - Expect.equals("M1-bar", e.bar); - Expect.equals("M1-bar", f.bar); - - Expect.throwsNoSuchMethodError(() => c.baz); - Expect.equals("M2-baz", d.baz); - Expect.equals("M2-baz", e.baz); - Expect.equals("M2-baz", f.baz); - - Expect.throwsNoSuchMethodError(() => c.fez); - Expect.throwsNoSuchMethodError(() => d.fez); - Expect.throwsNoSuchMethodError(() => e.fez); - Expect.equals("F-fez", f.fez); - - c.foo = "S-foo-c"; - Expect.equals("S-foo-c", c.foo); - Expect.equals("S-foo", d.foo); - Expect.equals("S-foo", e.foo); - Expect.equals("S-foo", f.foo); - - d.foo = "S-foo-d"; - Expect.equals("S-foo-c", c.foo); - Expect.equals("S-foo-d", d.foo); - Expect.equals("S-foo", e.foo); - Expect.equals("S-foo", f.foo); - - e.foo = "S-foo-e"; - Expect.equals("S-foo-c", c.foo); - Expect.equals("S-foo-d", d.foo); - Expect.equals("S-foo-e", e.foo); - Expect.equals("S-foo", f.foo); - - f.foo = "S-foo-f"; - Expect.equals("S-foo-c", c.foo); - Expect.equals("S-foo-d", d.foo); - Expect.equals("S-foo-e", e.foo); - Expect.equals("S-foo-f", f.foo); - - Expect.throwsNoSuchMethodError(() => c.bar = 0); - Expect.throwsNoSuchMethodError(() => d.bar = 0); - Expect.throwsNoSuchMethodError(() => e.bar = 0); - Expect.throwsNoSuchMethodError(() => f.bar = 0); - Expect.equals("M1-bar", c.bar); - Expect.equals("M1-bar", d.bar); - Expect.equals("M1-bar", e.bar); - Expect.equals("M1-bar", f.bar); - - Expect.throwsNoSuchMethodError(() => c.baz = 0); - Expect.throwsNoSuchMethodError(() => c.baz); - Expect.equals("M2-baz", d.baz); - Expect.equals("M2-baz", e.baz); - Expect.equals("M2-baz", f.baz); - - d.baz = "M2-baz-d"; - Expect.throwsNoSuchMethodError(() => c.baz); - Expect.equals("M2-baz-d", d.baz); - Expect.equals("M2-baz", e.baz); - Expect.equals("M2-baz", f.baz); - Expect.equals("M2-baz", f.baz); - - e.baz = "M2-baz-e"; - Expect.throwsNoSuchMethodError(() => c.baz); - Expect.equals("M2-baz-d", d.baz); - Expect.equals("M2-baz-e", e.baz); - Expect.equals("M2-baz", f.baz); - - f.baz = "M2-baz-f"; - Expect.throwsNoSuchMethodError(() => c.baz); - Expect.equals("M2-baz-d", d.baz); - Expect.equals("M2-baz-e", e.baz); - Expect.equals("M2-baz-f", f.baz); - - Expect.throwsNoSuchMethodError(() => c.fez = 0); - Expect.throwsNoSuchMethodError(() => d.fez = 0); - Expect.throwsNoSuchMethodError(() => e.fez = 0); - - f.fez = "F-fez-f"; - Expect.throwsNoSuchMethodError(() => c.fez); - Expect.throwsNoSuchMethodError(() => d.fez); - Expect.throwsNoSuchMethodError(() => e.fez); - Expect.equals("F-fez-f", f.fez); -} diff --git a/tests/language_2/mixin/extends_is_test.dart b/tests/language_2/mixin/extends_is_test.dart deleted file mode 100644 index 1c3b99be5b9..00000000000 --- a/tests/language_2/mixin/extends_is_test.dart +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class S {} - -class M1 {} - -class M2 {} - -class C extends S with M1 {} - -class D extends S with M1, M2 {} - -class E extends S with M2, M1 {} - -class F extends E {} - -class C_ extends S with M1 {} - -class D_ extends S with M1, M2 {} - -class E_ extends S with M2, M1 {} - -class F_ extends E_ {} - -main() { - var c = new C(); - Expect.isTrue(c is C); - Expect.isFalse(c is D); - Expect.isFalse(c is E); - Expect.isFalse(c is F); - Expect.isTrue(c is S); - Expect.isTrue(c is M1); - Expect.isFalse(c is M2); - - var d = new D(); - Expect.isFalse(d is C); - Expect.isTrue(d is D); - Expect.isFalse(d is E); - Expect.isFalse(d is F); - Expect.isTrue(d is S); - Expect.isTrue(d is M1); - Expect.isTrue(d is M2); - - var e = new E(); - Expect.isFalse(e is C); - Expect.isFalse(e is D); - Expect.isTrue(e is E); - Expect.isFalse(e is F); - Expect.isTrue(e is S); - Expect.isTrue(e is M1); - Expect.isTrue(e is M2); - - var f = new F(); - Expect.isFalse(f is C); - Expect.isFalse(f is D); - Expect.isTrue(f is E); - Expect.isTrue(f is F); - Expect.isTrue(f is S); - Expect.isTrue(f is M1); - Expect.isTrue(f is M2); - - // Make sure we get a new class for each mixin - // application (at least the named ones). - Expect.isFalse(c is C_); - Expect.isFalse(c is D_); - Expect.isFalse(c is E_); - Expect.isFalse(c is F_); - - Expect.isFalse(d is C_); - Expect.isFalse(d is D_); - Expect.isFalse(d is E_); - Expect.isFalse(d is F_); - - Expect.isFalse(e is C_); - Expect.isFalse(e is D_); - Expect.isFalse(e is E_); - Expect.isFalse(e is F_); - - Expect.isFalse(f is C_); - Expect.isFalse(f is D_); - Expect.isFalse(f is E_); - Expect.isFalse(f is F_); -} diff --git a/tests/language_2/mixin/extends_method_test.dart b/tests/language_2/mixin/extends_method_test.dart deleted file mode 100644 index cafe5529836..00000000000 --- a/tests/language_2/mixin/extends_method_test.dart +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class S { - foo() => "S-foo"; - baz() => "S-baz"; -} - -class M1 { - static m1bar() => "M1-bar"; - bar() => m1bar(); -} - -class M2 { - bar() => "M2-bar"; - baz() => "M2-baz"; - fez() => "M2-fez"; -} - -class C extends S with M1 {} - -class D extends S with M1, M2 {} - -class E extends S with M2, M1 {} - -class F extends E { - fez() => "F-fez"; -} - -main() { - dynamic c = new C(); - Expect.equals("S-foo", c.foo()); - Expect.equals("M1-bar", c.bar()); - Expect.equals("S-baz", c.baz()); - Expect.throwsNoSuchMethodError(() => c.fez()); - - var d = new D(); - Expect.equals("S-foo", d.foo()); - Expect.equals("M2-bar", d.bar()); - Expect.equals("M2-baz", d.baz()); - Expect.equals("M2-fez", d.fez()); - - var e = new E(); - Expect.equals("S-foo", e.foo()); - Expect.equals("M1-bar", e.bar()); - Expect.equals("M2-baz", e.baz()); - Expect.equals("M2-fez", e.fez()); - - var f = new F(); - Expect.equals("S-foo", f.foo()); - Expect.equals("M1-bar", f.bar()); - Expect.equals("M2-baz", f.baz()); - Expect.equals("F-fez", f.fez()); -} diff --git a/tests/language_2/mixin/factory_constructor_test.dart b/tests/language_2/mixin/factory_constructor_test.dart deleted file mode 100644 index 2dd5f8bb2e8..00000000000 --- a/tests/language_2/mixin/factory_constructor_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class Base { - var y; - Base._() { - y = "world"; - } -} - -abstract class Mixin implements Base { - final x = "hello"; - factory Mixin() => new _MixinAndBase._(); -} - -// TODO(jmesserly): according to the spec, this does not appear to be a valid -// mixin (because it declares a constructor), however it is supported by Dart -// implementations. -class _MixinAndBase = Base with Mixin; - -void main() { - var val = new Mixin(); - Expect.equals(val.x, "hello"); - Expect.equals(val.y, "world"); -} diff --git a/tests/language_2/mixin/field_initializer_test.dart b/tests/language_2/mixin/field_initializer_test.dart deleted file mode 100644 index 46364cd91dc..00000000000 --- a/tests/language_2/mixin/field_initializer_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2013, 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 test program for testing throw statement - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -class S { - var s1 = good_stuff(); - static good_stuff() => "Speyburn"; -} - -good_stuff() => "Glenfiddich"; - -class M { - var m1 = good_stuff(); - static good_stuff() => "Macallen"; -} - -class A extends S with M { - static good_stuff() => "Ardberg"; -} - -main() { - var a = new A(); - Expect.equals("Macallen", a.m1); - Expect.equals("Speyburn", a.s1); - - var m = new M(); - Expect.equals("Macallen", m.m1); -} diff --git a/tests/language_2/mixin/field_test.dart b/tests/language_2/mixin/field_test.dart deleted file mode 100644 index c4a3fd888ee..00000000000 --- a/tests/language_2/mixin/field_test.dart +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class S { - var foo = "S-foo"; -} - -class M1 { - final bar = "M1-bar"; -} - -class M2 { - var baz = "M2-baz"; -} - -class C = S with M1; -class D = S with M1, M2; -class E = S with M2, M1; - -class F extends E { - var fez = "F-fez"; -} - -main() { - dynamic c = new C(); - dynamic d = new D(); - dynamic e = new E(); - dynamic f = new F(); - - Expect.equals("S-foo", c.foo); - Expect.equals("S-foo", d.foo); - Expect.equals("S-foo", e.foo); - Expect.equals("S-foo", f.foo); - - Expect.equals("M1-bar", c.bar); - Expect.equals("M1-bar", d.bar); - Expect.equals("M1-bar", e.bar); - Expect.equals("M1-bar", f.bar); - - Expect.throwsNoSuchMethodError(() => c.baz); - Expect.equals("M2-baz", d.baz); - Expect.equals("M2-baz", e.baz); - Expect.equals("M2-baz", f.baz); - - Expect.throwsNoSuchMethodError(() => c.fez); - Expect.throwsNoSuchMethodError(() => d.fez); - Expect.throwsNoSuchMethodError(() => e.fez); - Expect.equals("F-fez", f.fez); - - c.foo = "S-foo-c"; - Expect.equals("S-foo-c", c.foo); - Expect.equals("S-foo", d.foo); - Expect.equals("S-foo", e.foo); - Expect.equals("S-foo", f.foo); - - d.foo = "S-foo-d"; - Expect.equals("S-foo-c", c.foo); - Expect.equals("S-foo-d", d.foo); - Expect.equals("S-foo", e.foo); - Expect.equals("S-foo", f.foo); - - e.foo = "S-foo-e"; - Expect.equals("S-foo-c", c.foo); - Expect.equals("S-foo-d", d.foo); - Expect.equals("S-foo-e", e.foo); - Expect.equals("S-foo", f.foo); - - f.foo = "S-foo-f"; - Expect.equals("S-foo-c", c.foo); - Expect.equals("S-foo-d", d.foo); - Expect.equals("S-foo-e", e.foo); - Expect.equals("S-foo-f", f.foo); - - Expect.throwsNoSuchMethodError(() => c.bar = 0); - Expect.throwsNoSuchMethodError(() => d.bar = 0); - Expect.throwsNoSuchMethodError(() => e.bar = 0); - Expect.throwsNoSuchMethodError(() => f.bar = 0); - Expect.equals("M1-bar", c.bar); - Expect.equals("M1-bar", d.bar); - Expect.equals("M1-bar", e.bar); - Expect.equals("M1-bar", f.bar); - - Expect.throwsNoSuchMethodError(() => c.baz = 0); - Expect.throwsNoSuchMethodError(() => c.baz); - Expect.equals("M2-baz", d.baz); - Expect.equals("M2-baz", e.baz); - Expect.equals("M2-baz", f.baz); - - d.baz = "M2-baz-d"; - Expect.throwsNoSuchMethodError(() => c.baz); - Expect.equals("M2-baz-d", d.baz); - Expect.equals("M2-baz", e.baz); - Expect.equals("M2-baz", f.baz); - Expect.equals("M2-baz", f.baz); - - e.baz = "M2-baz-e"; - Expect.throwsNoSuchMethodError(() => c.baz); - Expect.equals("M2-baz-d", d.baz); - Expect.equals("M2-baz-e", e.baz); - Expect.equals("M2-baz", f.baz); - - f.baz = "M2-baz-f"; - Expect.throwsNoSuchMethodError(() => c.baz); - Expect.equals("M2-baz-d", d.baz); - Expect.equals("M2-baz-e", e.baz); - Expect.equals("M2-baz-f", f.baz); - - Expect.throwsNoSuchMethodError(() => c.fez = 0); - Expect.throwsNoSuchMethodError(() => d.fez = 0); - Expect.throwsNoSuchMethodError(() => e.fez = 0); - - f.fez = "F-fez-f"; - Expect.throwsNoSuchMethodError(() => c.fez); - Expect.throwsNoSuchMethodError(() => d.fez); - Expect.throwsNoSuchMethodError(() => e.fez); - Expect.equals("F-fez-f", f.fez); -} diff --git a/tests/language_2/mixin/forwarding_constructor1_test.dart b/tests/language_2/mixin/forwarding_constructor1_test.dart deleted file mode 100644 index f4a6d37dff3..00000000000 --- a/tests/language_2/mixin/forwarding_constructor1_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -abstract class Mixin1 { - var mixin1Field = 1; -} - -abstract class Mixin2 { - var mixin2Field = 2; -} - -class A { - var superField; - A(foo) : superField = foo; -} - -class B extends A with Mixin1, Mixin2 { - var field = 4; - B(unused) : super(3); -} - -main() { - var b = new B(null); - Expect.equals(1, b.mixin1Field); - Expect.equals(2, b.mixin2Field); - Expect.equals(3, b.superField); - Expect.equals(4, b.field); -} diff --git a/tests/language_2/mixin/forwarding_constructor2_test.dart b/tests/language_2/mixin/forwarding_constructor2_test.dart deleted file mode 100644 index 262c3fba7c6..00000000000 --- a/tests/language_2/mixin/forwarding_constructor2_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -abstract class Mixin1 { - var mixin1Field = 1; -} - -abstract class Mixin2 { - var mixin2Field = 2; -} - -class A { - var superField; - A() : superField = 3; -} - -class B extends A with Mixin1, Mixin2 { - var field = 4; -} - -main() { - var b = new B(); - Expect.equals(1, b.mixin1Field); - Expect.equals(2, b.mixin2Field); - Expect.equals(3, b.superField); - Expect.equals(4, b.field); -} diff --git a/tests/language_2/mixin/forwarding_constructor3_test.dart b/tests/language_2/mixin/forwarding_constructor3_test.dart deleted file mode 100644 index b9e36190d4f..00000000000 --- a/tests/language_2/mixin/forwarding_constructor3_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2014, 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 - -// Verify that a named mixin constructor forwards to the corresponding named -// base class constructor. - -import "package:expect/expect.dart"; - -abstract class Mixin1 { - var mixin1Field = 1; -} - -abstract class Mixin2 { - var mixin2Field = 2; -} - -class A { - var superField; - A(foo) : superField = 0; - A.c1(foo) : superField = foo; - A.c2(foo) : superField = 0; -} - -class B extends A with Mixin1, Mixin2 { - var field = 4; - B(unused) : super.c1(3); -} - -main() { - var b = new B(null); - Expect.equals(1, b.mixin1Field); - Expect.equals(2, b.mixin2Field); - Expect.equals(3, b.superField); - Expect.equals(4, b.field); -} diff --git a/tests/language_2/mixin/forwarding_constructor4_test.dart b/tests/language_2/mixin/forwarding_constructor4_test.dart deleted file mode 100644 index ded2752938e..00000000000 --- a/tests/language_2/mixin/forwarding_constructor4_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2014, 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 - -// Verify that a forwarding constructor is generated even when there is an -// optional parameter. - -abstract class Mixin {} - -class Base { - Base( - {x} // //# 01: ok - {x} // //# 02: ok - {x} // //# 03: ok - ); -} - -class C extends Base with Mixin { - C(); // //# 02: continued - C() : super(); //# 03: continued -} - -main() { - new C(); -} diff --git a/tests/language_2/mixin/generic_test.dart b/tests/language_2/mixin/generic_test.dart deleted file mode 100644 index 42fd4f229c3..00000000000 --- a/tests/language_2/mixin/generic_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class S { - s() { - return T; - } -} - -class M { - m() { - return T; - } -} - -class N { - n() { - return T; - } -} - -class C extends S> with M>, N> {} - -main() { - var c = new C(); - Expect.isTrue(c is S>); - Expect.equals("Map", c.s().toString()); - Expect.isTrue(c is M>); - Expect.equals("List", c.m().toString()); - Expect.isTrue(c is N>); - Expect.equals("Set", c.n().toString()); -} diff --git a/tests/language_2/mixin/getter_regression_test.dart b/tests/language_2/mixin/getter_regression_test.dart deleted file mode 100644 index 0e2dd1cf20a..00000000000 --- a/tests/language_2/mixin/getter_regression_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test case for dart2js bug where the getter for y wasn't -// properly mixed in. - -import "package:expect/expect.dart"; - -class C { - int x; - int get y => x; -} - -class E { - int z = 10; -} - -class D extends E with C { - int w = 42; -} - -main() { - var d = new D(); - d.x = 37; - Expect.equals(37, d.x); - Expect.equals(10, d.z); - Expect.equals(42, d.w); - Expect.equals(37, d.y); -} diff --git a/tests/language_2/mixin/illegal_constructor_runtime_test.dart b/tests/language_2/mixin/illegal_constructor_runtime_test.dart deleted file mode 100644 index 2ef9ac3c010..00000000000 --- a/tests/language_2/mixin/illegal_constructor_runtime_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -class M0 { - factory M0(a, b, c) => null; - factory M0.named() => null; -} - -class M1 { - M1(); -} - -class M2 { - M2.named(); -} - -class C0 = Object with M0; - - - - - - - -class D0 extends Object with M0 {} - - - - - - - -main() { - new C0(); - - - - - - - - new D0(); - - - - - - - - - - - -} diff --git a/tests/language_2/mixin/illegal_constructor_test.dart b/tests/language_2/mixin/illegal_constructor_test.dart deleted file mode 100644 index b2b3ac7baf2..00000000000 --- a/tests/language_2/mixin/illegal_constructor_test.dart +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) 2013, 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 - -class M0 { - factory M0(a, b, c) => null; - factory M0.named() => null; -} - -class M1 { - M1(); -} - -class M2 { - M2.named(); -} - -class C0 = Object with M0; -class C1 = Object with M1; -// ^ -// [cfe] Can't use 'M1' as a mixin because it has constructors. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_CLASS_DECLARES_CONSTRUCTOR -class C2 = Object with M2; -// ^ -// [cfe] Can't use 'M2' as a mixin because it has constructors. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_CLASS_DECLARES_CONSTRUCTOR -class C3 = Object with M0, M1; -// ^ -// [cfe] Can't use 'M1' as a mixin because it has constructors. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_CLASS_DECLARES_CONSTRUCTOR -class C4 = Object with M1, M0; -// ^ -// [cfe] Can't use 'M1' as a mixin because it has constructors. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_CLASS_DECLARES_CONSTRUCTOR -class C5 = Object with M0, M2; -// ^ -// [cfe] Can't use 'M2' as a mixin because it has constructors. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_CLASS_DECLARES_CONSTRUCTOR -class C6 = Object with M2, M0; -// ^ -// [cfe] Can't use 'M2' as a mixin because it has constructors. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_CLASS_DECLARES_CONSTRUCTOR - -class D0 extends Object with M0 {} -class D1 extends Object with M1 { } -// ^ -// [cfe] Can't use 'M1' as a mixin because it has constructors. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_CLASS_DECLARES_CONSTRUCTOR -class D2 extends Object with M2 { } -// ^ -// [cfe] Can't use 'M2' as a mixin because it has constructors. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_CLASS_DECLARES_CONSTRUCTOR -class D3 extends Object with M0, M1 { } -// ^ -// [cfe] Can't use 'M1' as a mixin because it has constructors. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_CLASS_DECLARES_CONSTRUCTOR -class D4 extends Object with M1, M0 { } -// ^ -// [cfe] Can't use 'M1' as a mixin because it has constructors. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_CLASS_DECLARES_CONSTRUCTOR -class D5 extends Object with M0, M2 { } -// ^ -// [cfe] Can't use 'M2' as a mixin because it has constructors. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_CLASS_DECLARES_CONSTRUCTOR -class D6 extends Object with M2, M0 { } -// ^ -// [cfe] Can't use 'M2' as a mixin because it has constructors. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_CLASS_DECLARES_CONSTRUCTOR - -main() { - new C0(); - new C1(); - new C2(); - new C3(); - new C4(); - new C5(); - new C6(); - - new D0(); - new D1(); - new D2(); - new D3(); - new D4(); - new D5(); - new D6(); - - new C0(1,2,3); - // ^ - // [cfe] Too many positional arguments: 0 allowed, but 3 found. - // ^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS - new C0.named(); - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR - // [cfe] Couldn't find constructor 'C0.named'. - new D0(1,2,3); - // ^ - // [cfe] Too many positional arguments: 0 allowed, but 3 found. - // ^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS - new D0.named(); - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR - // [cfe] Couldn't find constructor 'D0.named'. -} diff --git a/tests/language_2/mixin/illegal_cycles_runtime_test.dart b/tests/language_2/mixin/illegal_cycles_runtime_test.dart deleted file mode 100644 index de5a401d217..00000000000 --- a/tests/language_2/mixin/illegal_cycles_runtime_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -class M {} - - - - - - - - - - - - - - - - - -main() { - - - - - - - - - - - - - - - -} diff --git a/tests/language_2/mixin/illegal_cycles_test.dart b/tests/language_2/mixin/illegal_cycles_test.dart deleted file mode 100644 index faa4c64061f..00000000000 --- a/tests/language_2/mixin/illegal_cycles_test.dart +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2013, 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 - -class M {} -class M0 extends Object with M0 { } -// ^^ -// [analyzer] COMPILE_TIME_ERROR.RECURSIVE_INTERFACE_INHERITANCE -// [cfe] 'M0' is a supertype of itself. -// ^ -// [cfe] 'Object with M0' is a supertype of itself. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -class M1 = Object with M1; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.RECURSIVE_INTERFACE_INHERITANCE -// [cfe] 'M1' is a supertype of itself. - -class M2 = Object with M3; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.RECURSIVE_INTERFACE_INHERITANCE -// [cfe] 'M2' is a supertype of itself. -class M3 = Object with M2; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.RECURSIVE_INTERFACE_INHERITANCE -// [cfe] 'M3' is a supertype of itself. - -class M4 = Object with M5; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.RECURSIVE_INTERFACE_INHERITANCE -// [cfe] 'M4' is a supertype of itself. -class M5 = Object with M6; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.RECURSIVE_INTERFACE_INHERITANCE -// [cfe] 'M5' is a supertype of itself. -class M6 = Object with M4; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.RECURSIVE_INTERFACE_INHERITANCE -// [cfe] 'M6' is a supertype of itself. - -class M7 extends Object with M8 { } -// ^^ -// [analyzer] COMPILE_TIME_ERROR.RECURSIVE_INTERFACE_INHERITANCE -// [cfe] 'M7' is a supertype of itself. -// ^ -// [cfe] 'Object with M8' is a supertype of itself. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -class M8 extends Object with M7 { } -// ^^ -// [analyzer] COMPILE_TIME_ERROR.RECURSIVE_INTERFACE_INHERITANCE -// [cfe] 'M8' is a supertype of itself. -// ^ -// [cfe] 'Object with M7' is a supertype of itself. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT - -class M9 = Object with M91; -// ^ -// [cfe] 'M9' is a supertype of itself. -class M91 = Object with M92; -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.RECURSIVE_INTERFACE_INHERITANCE -// [cfe] 'M91' is a supertype of itself. -class M92 = Object with M91; -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.RECURSIVE_INTERFACE_INHERITANCE -// [cfe] 'M92' is a supertype of itself. - -main() { - new M0(); - - new M1(); - - new M2(); - new M3(); - - new M4(); - new M5(); - new M6(); - - new M7(); - new M8(); - - new M9(); -} diff --git a/tests/language_2/mixin/illegal_object_runtime_test.dart b/tests/language_2/mixin/illegal_object_runtime_test.dart deleted file mode 100644 index 62afbd1a8c2..00000000000 --- a/tests/language_2/mixin/illegal_object_runtime_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Object has a non-trivial constructor and hence cannot be used as mixin. - -class S {} - -class C0 extends S - -{} - - - -main() { - new C0(); - -} diff --git a/tests/language_2/mixin/illegal_object_test.dart b/tests/language_2/mixin/illegal_object_test.dart deleted file mode 100644 index fffc7aa3870..00000000000 --- a/tests/language_2/mixin/illegal_object_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2013, 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 - -// Object has a non-trivial constructor and hence cannot be used as mixin. - -class S {} - -class C0 extends S -// ^ -// [cfe] Can't use 'Object' as a mixin because it has constructors. -with Object -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_CLASS_DECLARES_CONSTRUCTOR -{} - -class C1 = S with Object; -// ^ -// [cfe] Can't use 'Object' as a mixin because it has constructors. -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_CLASS_DECLARES_CONSTRUCTOR - -main() { - new C0(); - new C1(); -} diff --git a/tests/language_2/mixin/illegal_static_access_runtime_test.dart b/tests/language_2/mixin/illegal_static_access_runtime_test.dart deleted file mode 100644 index 93f145ea31b..00000000000 --- a/tests/language_2/mixin/illegal_static_access_runtime_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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 "package:expect/expect.dart"; - -class S { - static foo() => 42; -} - -class M { - static bar() => 87; -} - -class C = S with M; - -main() { - Expect.equals(42, S.foo()); - Expect.equals(87, M.bar()); - - - -} diff --git a/tests/language_2/mixin/illegal_static_access_test.dart b/tests/language_2/mixin/illegal_static_access_test.dart deleted file mode 100644 index f07cb38a73f..00000000000 --- a/tests/language_2/mixin/illegal_static_access_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class S { - static foo() => 42; -} - -class M { - static bar() => 87; -} - -class C = S with M; - -main() { - Expect.equals(42, S.foo()); - Expect.equals(87, M.bar()); - - Expect.throwsNoSuchMethodError(() => C.foo()); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD - // [cfe] Member not found: 'C.foo'. - Expect.throwsNoSuchMethodError(() => C.bar()); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD - // [cfe] Member not found: 'C.bar'. -} diff --git a/tests/language_2/mixin/illegal_super_use_runtime_test.dart b/tests/language_2/mixin/illegal_super_use_runtime_test.dart deleted file mode 100644 index 4b681b43d26..00000000000 --- a/tests/language_2/mixin/illegal_super_use_runtime_test.dart +++ /dev/null @@ -1,75 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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 "package:expect/expect.dart"; - -class M {} - -class P0 { - foo() { - - - - - void inner() { - - - - } - inner(); - - (() { - - - - })(); - - return 42; - } -} - -class P1 { - bar() { - - return 87; - } - - // The test method is strategically placed here to try to force the - // P1 class and its bar method to be resolved before resolving the - // mixin applications. - test() { - new C(); - var d = new D(); - var e = new E(); - var f = new F(); - Expect.equals(42, d.foo()); - Expect.equals(87, e.bar()); - Expect.equals(99, f.baz()); - } -} - -class P2 { - baz() { - - return 99; - } -} - -class C = Object with M; -class D = Object with P0; -class E = Object with M, P1; -class F = Object with P2, M; - -main() { - var p1 = new P1(); - var p2 = new P2(); - Expect.equals(87, p1.bar()); - p1.test(); - Expect.equals(99, p2.baz()); -} diff --git a/tests/language_2/mixin/illegal_super_use_test.dart b/tests/language_2/mixin/illegal_super_use_test.dart deleted file mode 100644 index 7ea789486e2..00000000000 --- a/tests/language_2/mixin/illegal_super_use_test.dart +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class M {} - -class P0 { - foo() { - super.toString(); - super.foo(); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SUPER_MEMBER - // [cfe] Superclass has no method named 'foo'. - super.bar = 100; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SUPER_MEMBER - // [cfe] Superclass has no setter named 'bar'. - - void inner() { - super.toString(); - super.foo(); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SUPER_MEMBER - // [cfe] Superclass has no method named 'foo'. - super.bar = 100; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SUPER_MEMBER - // [cfe] Superclass has no setter named 'bar'. - } - inner(); - - (() { - super.toString(); - super.foo(); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SUPER_MEMBER - // [cfe] Superclass has no method named 'foo'. - super.bar = 100; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SUPER_MEMBER - // [cfe] Superclass has no setter named 'bar'. - })(); - - return 42; - } -} - -class P1 { - bar() { - super.toString(); - return 87; - } - - // The test method is strategically placed here to try to force the - // P1 class and its bar method to be resolved before resolving the - // mixin applications. - test() { - new C(); - var d = new D(); - var e = new E(); - var f = new F(); - Expect.equals(42, d.foo()); - Expect.equals(87, e.bar()); - Expect.equals(99, f.baz()); - } -} - -class P2 { - baz() { - super.toString(); - return 99; - } -} - -class C = Object with M; -class D = Object with P0; -class E = Object with M, P1; -class F = Object with P2, M; - -main() { - var p1 = new P1(); - var p2 = new P2(); - Expect.equals(87, p1.bar()); - p1.test(); - Expect.equals(99, p2.baz()); -} diff --git a/tests/language_2/mixin/illegal_superclass_runtime_test.dart b/tests/language_2/mixin/illegal_superclass_runtime_test.dart deleted file mode 100644 index 265822db26a..00000000000 --- a/tests/language_2/mixin/illegal_superclass_runtime_test.dart +++ /dev/null @@ -1,136 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -class S0 {} - -class S1 extends Object {} - -class S2 extends S0 {} - -class M0 {} - -class M1 extends Object {} - -class M2 extends M0 {} - -class C00 = S0 with M0; -class C01 = S0 with M1; - -class C03 = S0 with M0, M1; - - - - - -class C10 = S1 with M0; -class C11 = S1 with M1; - -class C13 = S1 with M0, M1; - - - - - -class C20 = S2 with M0; -class C21 = S2 with M1; - -class C23 = S2 with M0, M1; - - - - - -class D00 extends S0 with M0 {} - -class D01 extends S0 with M1 {} - - -class D03 extends S0 with M0, M1 {} - - - - - -class D10 extends S1 with M0 {} - -class D11 extends S1 with M1 {} - - -class D13 extends S1 with M0, M1 {} - - - - - -class D20 extends S2 with M0 {} - -class D21 extends S2 with M1 {} - - -class D23 extends S2 with M0, M1 {} - - - - - -main() { - new C00(); - new C01(); - - new C03(); - - - - - - new C10(); - new C11(); - - new C13(); - - - - - - new C20(); - new C21(); - - new C23(); - - - - - - new D00(); - new D01(); - - new D03(); - - - - - - new D10(); - new D11(); - - new D13(); - - - - - - new D20(); - new D21(); - - new D23(); - - - - -} diff --git a/tests/language_2/mixin/illegal_superclass_test.dart b/tests/language_2/mixin/illegal_superclass_test.dart deleted file mode 100644 index 9290955005e..00000000000 --- a/tests/language_2/mixin/illegal_superclass_test.dart +++ /dev/null @@ -1,253 +0,0 @@ -// Copyright (c) 2013, 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 - -class S0 {} - -class S1 extends Object {} - -class S2 extends S0 {} - -class M0 {} - -class M1 extends Object {} - -class M2 extends M0 {} - -class C00 = S0 with M0; -class C01 = S0 with M1; -class C02 = S0 with M2; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 21, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class C03 = S0 with M0, M1; -class C04 = S0 with M0, M2; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 25, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class C05 = S0 with M2, M0; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 21, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class C06 = S0 with M1, M2; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 25, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class C07 = S0 with M2, M1; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 21, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. - -class C10 = S1 with M0; -class C11 = S1 with M1; -class C12 = S1 with M2; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 21, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class C13 = S1 with M0, M1; -class C14 = S1 with M0, M2; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 25, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class C15 = S1 with M2, M0; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 21, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class C16 = S1 with M1, M2; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 25, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class C17 = S1 with M2, M1; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 21, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. - -class C20 = S2 with M0; -class C21 = S2 with M1; -class C22 = S2 with M2; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 21, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class C23 = S2 with M0, M1; -class C24 = S2 with M0, M2; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 25, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class C25 = S2 with M2, M0; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 21, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class C26 = S2 with M1, M2; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 25, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class C27 = S2 with M2, M1; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 21, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. - -class D00 extends S0 with M0 {} - -class D01 extends S0 with M1 {} - -class D02 extends S0 with M2 { } -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 27, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class D03 extends S0 with M0, M1 {} -class D04 extends S0 with M0, M2 { } -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 31, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class D05 extends S0 with M2, M0 { } -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 27, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class D06 extends S0 with M1, M2 { } -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 31, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class D07 extends S0 with M2, M1 { } -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 27, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. - -class D10 extends S1 with M0 {} - -class D11 extends S1 with M1 {} - -class D12 extends S1 with M2 { } -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 27, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class D13 extends S1 with M0, M1 {} -class D14 extends S1 with M0, M2 { } -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 31, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class D15 extends S1 with M2, M0 { } -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 27, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class D16 extends S1 with M1, M2 { } -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 31, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class D17 extends S1 with M2, M1 { } -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 27, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. - -class D20 extends S2 with M0 {} - -class D21 extends S2 with M1 {} - -class D22 extends S2 with M2 { } -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 27, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class D23 extends S2 with M0, M1 {} -class D24 extends S2 with M0, M2 { } -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 31, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class D25 extends S2 with M2, M0 { } -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 27, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class D26 extends S2 with M1, M2 { } -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 31, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. -class D27 extends S2 with M2, M1 { } -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_INHERITS_FROM_NOT_OBJECT -// [error column 27, length 0] -// [cfe] The class 'M2' can't be used as a mixin because it extends a class other than 'Object'. - -main() { - new C00(); - new C01(); - new C02(); - new C03(); - new C04(); - new C05(); - new C06(); - new C07(); - - new C10(); - new C11(); - new C12(); - new C13(); - new C14(); - new C15(); - new C16(); - new C17(); - - new C20(); - new C21(); - new C22(); - new C23(); - new C24(); - new C25(); - new C26(); - new C27(); - - new D00(); - new D01(); - new D02(); - new D03(); - new D04(); - new D05(); - new D06(); - new D07(); - - new D10(); - new D11(); - new D12(); - new D13(); - new D14(); - new D15(); - new D16(); - new D17(); - - new D20(); - new D21(); - new D22(); - new D23(); - new D24(); - new D25(); - new D26(); - new D27(); -} diff --git a/tests/language_2/mixin/illegal_syntax_test.dart b/tests/language_2/mixin/illegal_syntax_test.dart deleted file mode 100644 index 25802e9bdff..00000000000 --- a/tests/language_2/mixin/illegal_syntax_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2013, 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 - -class S { } -class G { } -class M { } - -class T0 = S with M; -abstract class T0A = S with M; -class T1 = final S with M; // //# 01: syntax error -class T2 = var S with M; // //# 02: syntax error -class T3 = const S with M; // //# 03: syntax error -class T4 = static S with M; // //# 04: syntax error -class T5 = external S with M; // //# 05: syntax error -class T6 = G with M; -class T7 = G> with M; - -class C0 extends abstract S with M { } // //# 06: syntax error -class C1 extends final S with M { } // //# 07: syntax error -class C2 extends var S with M { } // //# 08: syntax error -class C3 extends const S with M { } // //# 09: syntax error -class C4 extends static S with M { } // //# 10: syntax error -class C5 extends external S with M { } // //# 11: syntax error -class C6 extends G with M { } -class C7 extends G> with M { } - -class D0 extends S with M - implements M // //# 12: syntax error - implements M { } - -class D1 extends T0 { } - -class X = S; // //# 14: syntax error - -main() { - new T0(); - new T0A(); // //# 13: compile-time error - new T1(); // //# 01: continued - new T2(); // //# 02: continued - new T3(); // //# 03: continued - new T4(); // //# 04: continued - new T5(); // //# 05: continued - new T6(); - new T7(); - - new C0(); // //# 06: continued - new C1(); // //# 07: continued - new C2(); // //# 08: continued - new C3(); // //# 09: continued - new C4(); // //# 10: continued - new C5(); // //# 11: continued - new C6(); - new C7(); - - new D0(); // //# 12: continued - new D1(); - new X(); // //# 14: continued -} diff --git a/tests/language_2/mixin/implements2_test.dart b/tests/language_2/mixin/implements2_test.dart deleted file mode 100644 index 5362059a4cc..00000000000 --- a/tests/language_2/mixin/implements2_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for named mixin applications with implements clause. - -class A {} - -class S {} - -class M {} - -class C = S with M implements A; - -void main() { - new C(); -} diff --git a/tests/language_2/mixin/implements_test.dart b/tests/language_2/mixin/implements_test.dart deleted file mode 100644 index 16f54ca1e86..00000000000 --- a/tests/language_2/mixin/implements_test.dart +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -abstract class I0 { - foo(); -} - -abstract class I1 { - bar(); -} - -abstract class I2 implements I0, I1 {} - -class M { - foo() => 42; - bar() => 87; -} - -class C0 = Object with M; -class C1 = Object with M implements I0; -class C2 = Object with M implements I1; -class C3 = Object with M implements I0, I1; -class C4 = Object with M implements I1, I0; -class C5 = Object with M implements I2; - -main() { - var c0 = new C0(); - Expect.equals(42, c0.foo()); - Expect.equals(87, c0.bar()); - Expect.isTrue(c0 is M); - Expect.isFalse(c0 is I0); - Expect.isFalse(c0 is I1); - Expect.isFalse(c0 is I2); - - var c1 = new C1(); - Expect.equals(42, c1.foo()); - Expect.equals(87, c1.bar()); - Expect.isTrue(c1 is M); - Expect.isTrue(c1 is I0); - Expect.isFalse(c1 is I1); - Expect.isFalse(c1 is I2); - - var c2 = new C2(); - Expect.equals(42, c2.foo()); - Expect.equals(87, c2.bar()); - Expect.isTrue(c2 is M); - Expect.isFalse(c2 is I0); - Expect.isTrue(c2 is I1); - Expect.isFalse(c1 is I2); - - var c3 = new C3(); - Expect.equals(42, c3.foo()); - Expect.equals(87, c3.bar()); - Expect.isTrue(c3 is M); - Expect.isTrue(c3 is I0); - Expect.isTrue(c3 is I1); - Expect.isFalse(c1 is I2); - - var c4 = new C4(); - Expect.equals(42, c4.foo()); - Expect.equals(87, c4.bar()); - Expect.isTrue(c4 is M); - Expect.isTrue(c4 is I0); - Expect.isTrue(c4 is I1); - Expect.isFalse(c1 is I2); - - var c5 = new C5(); - Expect.equals(42, c5.foo()); - Expect.equals(87, c5.bar()); - Expect.isTrue(c5 is M); - Expect.isTrue(c5 is I0); - Expect.isTrue(c5 is I1); - Expect.isTrue(c5 is I2); -} diff --git a/tests/language_2/mixin/implicit_covariance_test.dart b/tests/language_2/mixin/implicit_covariance_test.dart deleted file mode 100644 index 223cf7f3456..00000000000 --- a/tests/language_2/mixin/implicit_covariance_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -abstract class A { - foo(T x); -} - -abstract class B implements A {} - -class C { - foo(num x) { - if (x is! num) { - throw "Soundness issue: expected x to be num, got ${x.runtimeType}."; - } - } -} - -class D extends C with B {} - -class E = C with B; - -test(B b) { - b.foo("bar"); -} - -main() { - Expect.throws(() => test(new D())); - Expect.throws(() => test(new E())); -} diff --git a/tests/language_2/mixin/inference_mixin_field_test.dart b/tests/language_2/mixin/inference_mixin_field_test.dart deleted file mode 100644 index dd593d17598..00000000000 --- a/tests/language_2/mixin/inference_mixin_field_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class Mixin { - var field; - createIt() { - if (field == null) field = 42; - } -} - -class A { - A(foo); -} - -class B extends A with Mixin { - // Because [super] references a synthesized constructor, dart2js - // used to not see the null assignment to it. - B(foo) : super(foo); -} - -main() { - var a = new B(42); - a.createIt(); - Expect.equals(42, a.field); -} diff --git a/tests/language_2/mixin/interface_check_runtime_test.dart b/tests/language_2/mixin/interface_check_runtime_test.dart deleted file mode 100644 index b0f38bea915..00000000000 --- a/tests/language_2/mixin/interface_check_runtime_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -class Thing {} - -class SubThing extends Thing { - void sub() {} -} - -class A { - Thing get thing => new Thing(); -} - -abstract class B implements A { - @override - SubThing get thing; -} - -class C extends A // - - -{} - -main() { - new C() - .thing // - - ; -} diff --git a/tests/language_2/mixin/interface_check_test.dart b/tests/language_2/mixin/interface_check_test.dart deleted file mode 100644 index 136ea4f6322..00000000000 --- a/tests/language_2/mixin/interface_check_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2018, 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 - -class Thing {} - -class SubThing extends Thing { - void sub() {} -} - -class A { - Thing get thing => new Thing(); -} - -abstract class B implements A { - @override - SubThing get thing; -} - -class C extends A // -// ^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_IMPLEMENTATION_OVERRIDE -// [cfe] The implementation of 'thing' in the non-abstract class 'C' does not conform to its interface. - with - B -{} - -main() { - new C() - .thing // - .sub() - ; -} diff --git a/tests/language_2/mixin/invalid_bound2_test.dart b/tests/language_2/mixin/invalid_bound2_test.dart deleted file mode 100644 index b7eaf6456d6..00000000000 --- a/tests/language_2/mixin/invalid_bound2_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2014, 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 - -class S0 {} - -class S extends S0 {} - -class M {} - -class A extends S with M {} - -// A StaticWarning is reported here and in C, D, and E below, because U and V -// are not bounded. The purpose of this test is to verify bound checking in S, -// M, and A, the reason no bounds are declared for U and V here. -class B extends S with M {} //# 04: continued -class B extends S with M {} //# 05: continued -class B extends S with M {} //# 06: continued - -class C extends S with M {} //# 07: continued -class C extends S with M {} //# 08: continued -class C extends S with M {} //# 09: continued - -class D extends S with M {} //# 10: continued -class D extends S with M {} //# 11: continued -class D extends S with M {} //# 12: continued - -class E extends S with M {} //# 13: continued -class E extends S with M {} //# 14: continued -class E extends S with M {} //# 15: continued - -main() { - new A(); // //# 01: ok - new A(); // //# 02: compile-time error - new A(); // //# 03: compile-time error - new B(); // //# 04: compile-time error - new B(); // //# 05: compile-time error - new B(); // //# 06: compile-time error - new C(); // //# 07: compile-time error - new C(); // //# 08: compile-time error - new C(); // //# 09: compile-time error - new D(); // //# 10: compile-time error - new D(); // //# 11: compile-time error - new D(); // //# 12: compile-time error - new E(); // //# 13: compile-time error - new E(); // //# 14: compile-time error - new E(); // //# 15: compile-time error -} diff --git a/tests/language_2/mixin/invalid_bound_test.dart b/tests/language_2/mixin/invalid_bound_test.dart deleted file mode 100644 index c7103def614..00000000000 --- a/tests/language_2/mixin/invalid_bound_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2014, 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 - -class S0 {} - -class S extends S0 {} - -class M {} - -class A extends S with M {} - -// A CompileTimeError is reported here and in C, D, and E below, because T is -// not bounded. The purpose of this test is to verify bound checking in S, M, -// and A, the reason no bound is declared for T here. -class B extends S with M {} //# 03: continued -class B extends S with M {} //# 04: continued - -class C extends S with M {} //# 05: continued -class C extends S with M {} //# 06: continued - -class D extends S with M {} //# 07: continued -class D extends S with M {} //# 08: continued - -class E extends S with M {} //# 09: continued -class E extends S with M {} //# 10: continued - -main() { - new A(); // //# 01: ok - new A(); // //# 02: compile-time error - new B(); // //# 03: compile-time error - new B(); // //# 04: compile-time error - new C(); // //# 05: compile-time error - new C(); // //# 06: compile-time error - new D(); // //# 07: compile-time error - new D(); // //# 08: compile-time error - new E(); // //# 09: compile-time error - new E(); // //# 10: compile-time error -} diff --git a/tests/language_2/mixin/invalid_inheritance1_test.dart b/tests/language_2/mixin/invalid_inheritance1_test.dart deleted file mode 100644 index dfead53c1b8..00000000000 --- a/tests/language_2/mixin/invalid_inheritance1_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2013, 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 - -class C extends Object - with Malformed // //# 01: compile-time error - with T // //# 02: compile-time error - with T // //# 03: compile-time error -{} - -main() => new C(); diff --git a/tests/language_2/mixin/invalid_inheritance2_test.dart b/tests/language_2/mixin/invalid_inheritance2_test.dart deleted file mode 100644 index 5dca5b5b2d8..00000000000 --- a/tests/language_2/mixin/invalid_inheritance2_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2013, 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 - -class C = Object with Malformed; // //# 01: compile-time error -class C = Object with T; // //# 02: compile-time error -class C = OBject with T; // //# 03: compile-time error - -main() { - new C(); // //# 01: continued - new C(); // //# 02: continued - new C(); // //# 03: continued -} diff --git a/tests/language_2/mixin/invalid_override_in_mixin_runtime_test.dart b/tests/language_2/mixin/invalid_override_in_mixin_runtime_test.dart deleted file mode 100644 index cca7cdf7ef8..00000000000 --- a/tests/language_2/mixin/invalid_override_in_mixin_runtime_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 'package:expect/expect.dart'; - -class A { - -} - -class C extends Object with A { - test() { - print("Hello from test"); - } -} - -main() { - C c = new C(); - c.test(); - dynamic cc = c; - Expect.throwsNoSuchMethodError(() => cc.doesntExist()); -} diff --git a/tests/language_2/mixin/invalid_override_in_mixin_test.dart b/tests/language_2/mixin/invalid_override_in_mixin_test.dart deleted file mode 100644 index 815910b6b2e..00000000000 --- a/tests/language_2/mixin/invalid_override_in_mixin_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'package:expect/expect.dart'; - -class A { - noSuchMethod() {} -//^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -// [cfe] The method 'A.noSuchMethod' has fewer positional arguments than those of overridden method 'Object.noSuchMethod'. -} - -class C extends Object with A { -// ^ -// [cfe] Applying the mixin 'A' to 'Object' introduces an erroneous override of 'noSuchMethod'. -// ^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE - test() { - print("Hello from test"); - } -} - -main() { - C c = new C(); - c.test(); - dynamic cc = c; - Expect.throwsNoSuchMethodError(() => cc.doesntExist()); -} diff --git a/tests/language_2/mixin/is_test.dart b/tests/language_2/mixin/is_test.dart deleted file mode 100644 index 31b55156f03..00000000000 --- a/tests/language_2/mixin/is_test.dart +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class S {} - -class M1 {} - -class M2 {} - -class C = S with M1; -class D = S with M1, M2; -class E = S with M2, M1; - -class F extends E {} - -class C_ = S with M1; -class D_ = S with M1, M2; -class E_ = S with M2, M1; - -class F_ extends E_ {} - -main() { - var c = new C(); - Expect.isTrue(c is C); - Expect.isFalse(c is D); - Expect.isFalse(c is E); - Expect.isFalse(c is F); - Expect.isTrue(c is S); - Expect.isTrue(c is M1); - Expect.isFalse(c is M2); - - var d = new D(); - Expect.isFalse(d is C); - Expect.isTrue(d is D); - Expect.isFalse(d is E); - Expect.isFalse(d is F); - Expect.isTrue(d is S); - Expect.isTrue(d is M1); - Expect.isTrue(d is M2); - - var e = new E(); - Expect.isFalse(e is C); - Expect.isFalse(e is D); - Expect.isTrue(e is E); - Expect.isFalse(e is F); - Expect.isTrue(e is S); - Expect.isTrue(e is M1); - Expect.isTrue(e is M2); - - var f = new F(); - Expect.isFalse(f is C); - Expect.isFalse(f is D); - Expect.isTrue(f is E); - Expect.isTrue(f is F); - Expect.isTrue(f is S); - Expect.isTrue(f is M1); - Expect.isTrue(f is M2); - - // Make sure we get a new class for each mixin - // application (at least the named ones). - Expect.isFalse(c is C_); - Expect.isFalse(c is D_); - Expect.isFalse(c is E_); - Expect.isFalse(c is F_); - - Expect.isFalse(d is C_); - Expect.isFalse(d is D_); - Expect.isFalse(d is E_); - Expect.isFalse(d is F_); - - Expect.isFalse(e is C_); - Expect.isFalse(e is D_); - Expect.isFalse(e is E_); - Expect.isFalse(e is F_); - - Expect.isFalse(f is C_); - Expect.isFalse(f is D_); - Expect.isFalse(f is E_); - Expect.isFalse(f is F_); -} diff --git a/tests/language_2/mixin/issue10216_2_test.dart b/tests/language_2/mixin/issue10216_2_test.dart deleted file mode 100644 index db268f7ab12..00000000000 --- a/tests/language_2/mixin/issue10216_2_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class M1 = Object with M0; -class M2 = Object with M1; - -class M0 { - foo() => 42; -} - -makeM2() { - return [new Object(), new M2()].last as M2; -} - -main() { - Expect.equals(42, makeM2().foo()); -} diff --git a/tests/language_2/mixin/issue10216_test.dart b/tests/language_2/mixin/issue10216_test.dart deleted file mode 100644 index 1a7874ae8b5..00000000000 --- a/tests/language_2/mixin/issue10216_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A { - foo(x, [y]) => '$x;$y'; -} - -class B extends A with M1, M2, M3 {} - -class M1 {} - -class M2 { - plain(x) => 'P $x'; - bar(x, [y]) => '$y,$x'; -} - -class M3 {} - -makeB() { - return [new A(), new B()].last as B; -} - -main() { - var b = makeB(); - Expect.equals('1;2', b.foo(1, 2)); - Expect.equals('2;null', b.foo(2)); - Expect.equals('P 3', b.plain(3)); - Expect.equals('100,4', b.bar(4, 100)); - Expect.equals('null,5', b.bar(5)); -} diff --git a/tests/language_2/mixin/lib_extends_field_lib.dart b/tests/language_2/mixin/lib_extends_field_lib.dart deleted file mode 100644 index 68318fd9427..00000000000 --- a/tests/language_2/mixin/lib_extends_field_lib.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2013, 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 mixin_lib_extends_field_lib; - -class M1 { - final bar = "M1-bar"; -} - -class M2 { - var baz = "M2-$_baz"; -} - -var _baz = "baz"; diff --git a/tests/language_2/mixin/lib_extends_field_test.dart b/tests/language_2/mixin/lib_extends_field_test.dart deleted file mode 100644 index 1e42915d366..00000000000 --- a/tests/language_2/mixin/lib_extends_field_test.dart +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) 2013, 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 mixin_lib_extends_field_test; - -import 'package:expect/expect.dart'; -import "lib_extends_field_lib.dart" as L; - -class S { - var foo = "S-foo"; -} - -class C extends S with L.M1 {} - -class D extends S with L.M1, L.M2 {} - -class E extends S with L.M2, L.M1 {} - -class F extends E { - var fez = "F-fez"; -} - -main() { - dynamic c = new C(); - dynamic d = new D(); - dynamic e = new E(); - dynamic f = new F(); - - Expect.equals("S-foo", c.foo); - Expect.equals("S-foo", d.foo); - Expect.equals("S-foo", e.foo); - Expect.equals("S-foo", f.foo); - - Expect.equals("M1-bar", c.bar); - Expect.equals("M1-bar", d.bar); - Expect.equals("M1-bar", e.bar); - Expect.equals("M1-bar", f.bar); - - Expect.throwsNoSuchMethodError(() => c.baz); - Expect.equals("M2-baz", d.baz); - Expect.equals("M2-baz", e.baz); - Expect.equals("M2-baz", f.baz); - - Expect.throwsNoSuchMethodError(() => c.fez); - Expect.throwsNoSuchMethodError(() => d.fez); - Expect.throwsNoSuchMethodError(() => e.fez); - Expect.equals("F-fez", f.fez); - - c.foo = "S-foo-c"; - Expect.equals("S-foo-c", c.foo); - Expect.equals("S-foo", d.foo); - Expect.equals("S-foo", e.foo); - Expect.equals("S-foo", f.foo); - - d.foo = "S-foo-d"; - Expect.equals("S-foo-c", c.foo); - Expect.equals("S-foo-d", d.foo); - Expect.equals("S-foo", e.foo); - Expect.equals("S-foo", f.foo); - - e.foo = "S-foo-e"; - Expect.equals("S-foo-c", c.foo); - Expect.equals("S-foo-d", d.foo); - Expect.equals("S-foo-e", e.foo); - Expect.equals("S-foo", f.foo); - - f.foo = "S-foo-f"; - Expect.equals("S-foo-c", c.foo); - Expect.equals("S-foo-d", d.foo); - Expect.equals("S-foo-e", e.foo); - Expect.equals("S-foo-f", f.foo); - - Expect.throwsNoSuchMethodError(() => c.bar = 0); - Expect.throwsNoSuchMethodError(() => d.bar = 0); - Expect.throwsNoSuchMethodError(() => e.bar = 0); - Expect.throwsNoSuchMethodError(() => f.bar = 0); - Expect.equals("M1-bar", c.bar); - Expect.equals("M1-bar", d.bar); - Expect.equals("M1-bar", e.bar); - Expect.equals("M1-bar", f.bar); - - Expect.throwsNoSuchMethodError(() => c.baz = 0); - Expect.throwsNoSuchMethodError(() => c.baz); - Expect.equals("M2-baz", d.baz); - Expect.equals("M2-baz", e.baz); - Expect.equals("M2-baz", f.baz); - - d.baz = "M2-baz-d"; - Expect.throwsNoSuchMethodError(() => c.baz); - Expect.equals("M2-baz-d", d.baz); - Expect.equals("M2-baz", e.baz); - Expect.equals("M2-baz", f.baz); - Expect.equals("M2-baz", f.baz); - - e.baz = "M2-baz-e"; - Expect.throwsNoSuchMethodError(() => c.baz); - Expect.equals("M2-baz-d", d.baz); - Expect.equals("M2-baz-e", e.baz); - Expect.equals("M2-baz", f.baz); - - f.baz = "M2-baz-f"; - Expect.throwsNoSuchMethodError(() => c.baz); - Expect.equals("M2-baz-d", d.baz); - Expect.equals("M2-baz-e", e.baz); - Expect.equals("M2-baz-f", f.baz); - - Expect.throwsNoSuchMethodError(() => c.fez = 0); - Expect.throwsNoSuchMethodError(() => d.fez = 0); - Expect.throwsNoSuchMethodError(() => e.fez = 0); - - f.fez = "F-fez-f"; - Expect.throwsNoSuchMethodError(() => c.fez); - Expect.throwsNoSuchMethodError(() => d.fez); - Expect.throwsNoSuchMethodError(() => e.fez); - Expect.equals("F-fez-f", f.fez); -} diff --git a/tests/language_2/mixin/lib_extends_method_lib.dart b/tests/language_2/mixin/lib_extends_method_lib.dart deleted file mode 100644 index 9743324b366..00000000000 --- a/tests/language_2/mixin/lib_extends_method_lib.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2013, 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 mixin_lib_extends_method_lib; - -class M1 { - bar() => "M1-bar"; - - clo(s) { - var l = s; - return (s) => "$l$s"; - } -} - -class M2 { - // Make sure mixed-in method has access to library-private names. - bar() => _M2_bar(); - baz() => _M2_baz; - fez() => "M2-${_fez()}"; - _fez() => "fez"; -} - -_M2_bar() { - return "M2-bar"; -} - -var _M2_baz = "M2-baz"; diff --git a/tests/language_2/mixin/lib_extends_method_test.dart b/tests/language_2/mixin/lib_extends_method_test.dart deleted file mode 100644 index 1a5c7059a86..00000000000 --- a/tests/language_2/mixin/lib_extends_method_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2013, 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 mixin_lib_extends_method_test; - -import "package:expect/expect.dart"; -import "lib_extends_method_lib.dart" as L; - -class S { - foo() => "S-foo"; - baz() => "S-baz"; -} - -class C extends S with L.M1 {} - -class D extends S with L.M1, L.M2 {} - -class E extends S with L.M2, L.M1 {} - -class F extends E { - fez() => "F-fez"; -} - -main() { - dynamic c = new C(); - Expect.equals("S-foo", c.foo()); - Expect.equals("M1-bar", c.bar()); - Expect.equals("S-baz", c.baz()); - Expect.throwsNoSuchMethodError(() => c.fez()); - Expect.equals("sugus", c.clo("su")("gus")); - - var d = new D(); - Expect.equals("S-foo", d.foo()); - Expect.equals("M2-bar", d.bar()); - Expect.equals("M2-baz", d.baz()); - Expect.equals("M2-fez", d.fez()); - Expect.equals("sugus", d.clo("su")("gus")); - - var e = new E(); - Expect.equals("S-foo", e.foo()); - Expect.equals("M1-bar", e.bar()); - Expect.equals("M2-baz", e.baz()); - Expect.equals("M2-fez", e.fez()); - Expect.equals("sugus", e.clo("su")("gus")); - - var f = new F(); - Expect.equals("S-foo", f.foo()); - Expect.equals("M1-bar", f.bar()); - Expect.equals("M2-baz", f.baz()); - Expect.equals("F-fez", f.fez()); - Expect.equals("sugus", f.clo("su")("gus")); -} diff --git a/tests/language_2/mixin/method_override_runtime_test.dart b/tests/language_2/mixin/method_override_runtime_test.dart deleted file mode 100644 index c5711edcef7..00000000000 --- a/tests/language_2/mixin/method_override_runtime_test.dart +++ /dev/null @@ -1,164 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Signature conformance test. -abstract class CII { - int id(int x); -} - -class CSI { - String id(int x) => "$x"; -} - -class CIS { - int id(String x) => 0; -} - -class CTT { - T id(T x) => x; -} - -// Wrong return type. - - -// Wrong argument type. - - - -// Similar as the above but using an instantiated class instead. -abstract class C5 = CII with CTT; -abstract class C6 extends CII with CTT {} - - - -// Named parameters -abstract class NIIx { - int id({int x}) => x; -} - -class NIIxy { - int id({int x, int y}) => y; -} - -class NIIy { - int id({int y}) => y; -} - -class NII { - int id(int x) => x; -} - -// It's OK to introduce more named parameters. -abstract class N1 = NIIx with NIIxy; -abstract class N2 extends NIIx with NIIxy {} -// It's NOT OK to rename named parameters. - - -// It's NOT OK to drop named parameters. - - - -class NBABxy { - B id ({A x, B y}) => y; -} - -class NTTy { - T id({T y}) => y; -} - -class NTTx { - T id(T x) => x; -} - -// Same as above but with generic classes. -abstract class N7 = NIIx with NBABxy; -abstract class N8 extends NIIx with NBABxy {} - - - - - - - -// Optional positional parameters -abstract class OII { - int id([int x]) => x; -} - -class OIII { - int id([int x, int y]) => y; -} - -class OIIy { - int id([int y]) => y; -} - -class PII { - int id(int x) => x; -} - -// It's OK to introduce more optional parameters. -abstract class O1 = OII with OIII; -abstract class O2 extends OII with OIII {} -// It's OK to rename optional parameters. -abstract class O3 = OII with OIIy; -abstract class O4 extends OII with OIIy {} -// It's NOT OK to drop optional parameters. - - - -class OBAB { - B id ([A x, B y]) => y; -} - -class OTTy { - T id([T y]) => y; -} - -class PTT { - T id(T x) => x; -} - -// Same as above but with generic classes. -abstract class O7 = OII with OBAB; -abstract class O8 extends OII with OBAB {} - - -abstract class O11 = OII with OTTy; -abstract class O12 extends OII with OTTy {} - - - -// More tests with generic classes. -abstract class GTTnum { - T id(x); -} - -class MTTnum { - T id(x) => x; -} - -class MTTint { - T id(x) => x; -} - -class MTT { - T id(x) => x; -} - -class MTTnumR { - T id(x) => x; -} -class G1 = GTTnum with MTTnum; - - - - - -void main() {} diff --git a/tests/language_2/mixin/method_override_test.dart b/tests/language_2/mixin/method_override_test.dart deleted file mode 100644 index 89023aa5466..00000000000 --- a/tests/language_2/mixin/method_override_test.dart +++ /dev/null @@ -1,272 +0,0 @@ -// Copyright (c) 2018, 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 - -// Signature conformance test. -abstract class CII { - int id(int x); -} - -class CSI { - String id(int x) => "$x"; -} - -class CIS { - int id(String x) => 0; -} - -class CTT { - T id(T x) => x; -} - -// Wrong return type. -abstract class C1 = CII with CIS; -// ^ -// [cfe] The mixin application class 'C1' introduces an erroneous override of 'id'. -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -abstract class C2 extends CII with CIS {} -// ^ -// [cfe] Applying the mixin 'CIS' to 'CII' introduces an erroneous override of 'id'. -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE - - -// Wrong argument type. -abstract class C3 = CII with CSI; -// ^ -// [cfe] The mixin application class 'C3' introduces an erroneous override of 'id'. -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -abstract class C4 extends CII with CSI {} -// ^ -// [cfe] Applying the mixin 'CSI' to 'CII' introduces an erroneous override of 'id'. -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE - -// Similar as the above but using an instantiated class instead. -abstract class C5 = CII with CTT; -abstract class C6 extends CII with CTT {} -abstract class C7 = CII with CTT; -// ^ -// [cfe] The mixin application class 'C7' introduces an erroneous override of 'id'. -// ^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -abstract class C8 extends CII with CTT {} -// ^ -// [cfe] Applying the mixin 'CTT' to 'CII' introduces an erroneous override of 'id'. -// ^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE - -// Named parameters -abstract class NIIx { - int id({int x}) => x; -} - -class NIIxy { - int id({int x, int y}) => y; -} - -class NIIy { - int id({int y}) => y; -} - -class NII { - int id(int x) => x; -} - -// It's OK to introduce more named parameters. -abstract class N1 = NIIx with NIIxy; -abstract class N2 extends NIIx with NIIxy {} -// It's NOT OK to rename named parameters. -abstract class N3 = NIIx with NIIy; -// ^ -// [cfe] The mixin application class 'N3' introduces an erroneous override of 'id'. -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -abstract class N4 extends NIIx with NIIy {} -// ^ -// [cfe] Applying the mixin 'NIIy' to 'NIIx' introduces an erroneous override of 'id'. -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE - - -// It's NOT OK to drop named parameters. -abstract class N5 = NIIx with NII; -// ^ -// [cfe] The mixin application class 'N5' introduces an erroneous override of 'id'. -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -abstract class N6 extends NIIx with NII {} -// ^ -// [cfe] Applying the mixin 'NII' to 'NIIx' introduces an erroneous override of 'id'. -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE - -class NBABxy { - B id ({A x, B y}) => y; -} - -class NTTy { - T id({T y}) => y; -} - -class NTTx { - T id(T x) => x; -} - -// Same as above but with generic classes. -abstract class N7 = NIIx with NBABxy; -abstract class N8 extends NIIx with NBABxy {} -abstract class N9 = NIIx with NBABxy; -// ^ -// [cfe] The mixin application class 'N9' introduces an erroneous override of 'id'. -// ^^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -abstract class N10 extends NIIx with NBABxy {} -// ^ -// [cfe] Applying the mixin 'NBABxy' to 'NIIx' introduces an erroneous override of 'id'. -// ^^^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -abstract class N11 = NIIx with NTTy; -// ^ -// [cfe] The mixin application class 'N11' introduces an erroneous override of 'id'. -// ^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -abstract class N12 extends NIIx with NTTy {} -// ^ -// [cfe] Applying the mixin 'NTTy' to 'NIIx' introduces an erroneous override of 'id'. -// ^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -abstract class N13 = NIIx with NTTx; -// ^ -// [cfe] The mixin application class 'N13' introduces an erroneous override of 'id'. -// ^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -abstract class N14 extends NIIx with NTTx {} -// ^ -// [cfe] Applying the mixin 'NTTx' to 'NIIx' introduces an erroneous override of 'id'. -// ^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE - -// Optional positional parameters -abstract class OII { - int id([int x]) => x; -} - -class OIII { - int id([int x, int y]) => y; -} - -class OIIy { - int id([int y]) => y; -} - -class PII { - int id(int x) => x; -} - -// It's OK to introduce more optional parameters. -abstract class O1 = OII with OIII; -abstract class O2 extends OII with OIII {} -// It's OK to rename optional parameters. -abstract class O3 = OII with OIIy; -abstract class O4 extends OII with OIIy {} -// It's NOT OK to drop optional parameters. -abstract class O5 = OII with PII; -// ^ -// [cfe] The mixin application class 'O5' introduces an erroneous override of 'id'. -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -abstract class O6 extends OII with PII {} -// ^ -// [cfe] Applying the mixin 'PII' to 'OII' introduces an erroneous override of 'id'. -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE - -class OBAB { - B id ([A x, B y]) => y; -} - -class OTTy { - T id([T y]) => y; -} - -class PTT { - T id(T x) => x; -} - -// Same as above but with generic classes. -abstract class O7 = OII with OBAB; -abstract class O8 extends OII with OBAB {} -abstract class O9 = OII with OBAB; -// ^ -// [cfe] The mixin application class 'O9' introduces an erroneous override of 'id'. -// ^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -abstract class O10 extends OII with OBAB {} -// ^ -// [cfe] Applying the mixin 'OBAB' to 'OII' introduces an erroneous override of 'id'. -// ^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -abstract class O11 = OII with OTTy; -abstract class O12 extends OII with OTTy {} -abstract class O13 = OII with PTT; -// ^ -// [cfe] The mixin application class 'O13' introduces an erroneous override of 'id'. -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -abstract class O14 extends OII with PTT {} -// ^ -// [cfe] Applying the mixin 'PTT' to 'OII' introduces an erroneous override of 'id'. -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE - -// More tests with generic classes. -abstract class GTTnum { - T id(x); -} - -class MTTnum { - T id(x) => x; -} - -class MTTint { - T id(x) => x; -} - -class MTT { - T id(x) => x; -} - -class MTTnumR { - T id(x) => x; -} -class G1 = GTTnum with MTTnum; -class G2 = GTTnum with MTTint; -// ^ -// [cfe] The mixin application class 'G2' introduces an erroneous override of 'id'. -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -class G3 = GTTnum with MTT; -// ^ -// [cfe] The mixin application class 'G3' introduces an erroneous override of 'id'. -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -class G4 = GTTnum with MTTnumR; -// ^ -// [cfe] The mixin application class 'G4' introduces an erroneous override of 'id'. -// ^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -class G5 = GTTnum with CII; -// ^^ -// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER -// [cfe] The mixin application class 'G5' introduces an erroneous override of 'id'. -// ^ -// [cfe] The non-abstract class 'G5' is missing implementations for these members: -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE - -void main() {} diff --git a/tests/language_2/mixin/method_test.dart b/tests/language_2/mixin/method_test.dart deleted file mode 100644 index f6787dad2eb..00000000000 --- a/tests/language_2/mixin/method_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class S { - foo() => "S-foo"; - baz() => "S-baz"; -} - -class M1 { - bar() => "M1-bar"; -} - -class M2 { - bar() => "M2-bar"; - baz() => "M2-baz"; - fez() => "M2-fez"; -} - -class C = S with M1; -class D = S with M1, M2; -class E = S with M2, M1; - -class F extends E { - fez() => "F-fez"; -} - -main() { - dynamic c = new C(); - Expect.equals("S-foo", c.foo()); - Expect.equals("M1-bar", c.bar()); - Expect.equals("S-baz", c.baz()); - Expect.throwsNoSuchMethodError(() => c.fez()); - - var d = new D(); - Expect.equals("S-foo", d.foo()); - Expect.equals("M2-bar", d.bar()); - Expect.equals("M2-baz", d.baz()); - Expect.equals("M2-fez", d.fez()); - - var e = new E(); - Expect.equals("S-foo", e.foo()); - Expect.equals("M1-bar", e.bar()); - Expect.equals("M2-baz", e.baz()); - Expect.equals("M2-fez", e.fez()); - - var f = new F(); - Expect.equals("S-foo", f.foo()); - Expect.equals("M1-bar", f.bar()); - Expect.equals("M2-baz", f.baz()); - Expect.equals("F-fez", f.fez()); -} diff --git a/tests/language_2/mixin/mixin2_test.dart b/tests/language_2/mixin/mixin2_test.dart deleted file mode 100644 index ae37057cc82..00000000000 --- a/tests/language_2/mixin/mixin2_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class M { - t() { - return T; - } -} - -class A = Object with M; - -class B = Object with A; - -class C = Object with M>; - -class D = Object with C>; - -class E extends A {} - -class F extends B {} - -class G extends C {} - -class H extends D> {} - -main() { - Expect.equals("num", new E().t().toString()); - Expect.equals("String", new F().t().toString()); - Expect.equals("List", new G().t().toString()); - Expect.equals("List>>", new H().t().toString()); -} diff --git a/tests/language_2/mixin/mixin3_test.dart b/tests/language_2/mixin/mixin3_test.dart deleted file mode 100644 index 13b9d0495d7..00000000000 --- a/tests/language_2/mixin/mixin3_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class M { - t() { - return T; - } -} - -class A = Object with M>; - -class B0 = Object with A>; - -class B1 = Object with A>; - -class C0 extends B0 {} - -class C1 extends B1 {} - -class A2 = Object with M>; - -class B2 = Object with A2, List>; - -class B3 = Object with A2, List>; - -class C2 extends B2 {} - -class C3 extends B3 {} - -class N { - q() { - return 42; - } -} - -class O = Object with N; - -class P = Object with O; - -class Q extends P {} - -main() { - Expect.equals("List>", new C0().t().toString()); - Expect.equals("List>", new C1().t().toString()); - Expect.equals("Map, List>", new C2().t().toString()); - Expect.equals("Map, List>", new C3().t().toString()); - Expect.equals(42, new Q().q()); -} diff --git a/tests/language_2/mixin/mixin4_test.dart b/tests/language_2/mixin/mixin4_test.dart deleted file mode 100644 index d0c61b3c054..00000000000 --- a/tests/language_2/mixin/mixin4_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class I {} - -class J {} - -class S {} - -class M { - t() { - return T; - } -} - -class A = Object with M> implements I; - -class C = S with A> implements J; - -main() { - var c = new C(); - Expect.equals("Map>", c.t().toString()); - Expect.isTrue(c is I>); - Expect.isTrue(c is J); - Expect.isTrue(c is S); - Expect.isTrue(c is A>); - Expect.isTrue(c is M>>); -} diff --git a/tests/language_2/mixin/mixin5_test.dart b/tests/language_2/mixin/mixin5_test.dart deleted file mode 100644 index 4497cc42730..00000000000 --- a/tests/language_2/mixin/mixin5_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class I {} - -class J {} - -class K {} - -class S {} - -class M { - m() { - return T; - } -} - -class A = Object with M> implements I; - -class B = Object with A> implements J; - -class C = S> with B> implements K; - -main() { - var c = new C(); - Expect.equals("Map, Set>>", c.m().toString()); - Expect.isTrue(c is K); - Expect.isTrue(c is J>); - Expect.isTrue(c is I>>); - Expect.isTrue(c is S>); - Expect.isTrue(c is A, Set>>); - Expect.isTrue(c is M, Set>>>); -} diff --git a/tests/language_2/mixin/mixin6_test.dart b/tests/language_2/mixin/mixin6_test.dart deleted file mode 100644 index cd8c8be9a60..00000000000 --- a/tests/language_2/mixin/mixin6_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class I {} - -class J {} - -class K {} - -class S {} - -class M { - m() { - return T; - } -} - -class A = Object with M> implements I; - -class B = Object with A> implements J; - -class C = S> with B implements K; // B is raw. - -main() { - var c = new C(); - Expect.equals("Map>", c.m().toString()); - Expect.isTrue(c is K); - Expect.isTrue(c is J); - Expect.isTrue(c is I); - Expect.isTrue(c is S>); - Expect.isTrue(c is A); - Expect.isTrue(c is M>); -} diff --git a/tests/language_2/mixin/mixin7_test.dart b/tests/language_2/mixin/mixin7_test.dart deleted file mode 100644 index d6b484f0f92..00000000000 --- a/tests/language_2/mixin/mixin7_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class I {} - -class J {} - -class K {} - -class S {} - -class M { - m() { - return T; - } -} - -class A = Object with M implements I; // M is raw. - -class B = Object with A implements J; // A is raw. - -class C = S> with B implements K; // B is raw. - -main() { - var c = new C(); - Expect.equals("dynamic", c.m().toString()); - Expect.isTrue(c is K); - Expect.isTrue(c is J); - Expect.isTrue(c is I); - Expect.isTrue(c is S>); - Expect.isTrue(c is A); - Expect.isTrue(c is M); -} diff --git a/tests/language_2/mixin/mixin_bound2_test.dart b/tests/language_2/mixin/mixin_bound2_test.dart deleted file mode 100644 index 524aa6e530e..00000000000 --- a/tests/language_2/mixin/mixin_bound2_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -class I {} - -class J {} - -class K {} - -class S, V> {} - -class M> { - m() { - return T; - } -} - -class A> = Object with M> implements I; - -class B> = Object with A> implements J; - -class C = S, T> with B> implements K; - -main() { - var c = new C(); - Expect.equals("Map, Set>>", c.m().toString()); - Expect.isTrue(c is K); - Expect.isTrue(c is J>); - Expect.isTrue(c is I>>); - Expect.isTrue(c is S, int>); - Expect.isTrue(c is A, Set>>); - Expect.isTrue( - c is M, Set>, Map, Set>>>); -} diff --git a/tests/language_2/mixin/mixin_bound_test.dart b/tests/language_2/mixin/mixin_bound_test.dart deleted file mode 100644 index 764fc2670ea..00000000000 --- a/tests/language_2/mixin/mixin_bound_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -class I {} - -class J {} - -class S, V> {} - -class M> { - t() { - return T; - } -} - -class A = Object with M> implements I; - -class C = S, T> with A> implements J; - -main() { - var c = new C(); - Expect.equals("Map>", c.t().toString()); - Expect.isTrue(c is I>); - Expect.isTrue(c is J); - Expect.isTrue(c is S, int>); - Expect.isTrue(c is A>); - Expect.isTrue(c is M, Map>>); -} diff --git a/tests/language_2/mixin/mixin_test.dart b/tests/language_2/mixin/mixin_test.dart deleted file mode 100644 index 76fab896fd6..00000000000 --- a/tests/language_2/mixin/mixin_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class M1 { - foo() => 42; -} - -class M2 = Object with M1; - -class S {} - -class C = S with M2; - -main() { - var c = new C(); - Expect.isTrue(c is S); - Expect.isTrue(c is M1); - Expect.isTrue(c is M2); - Expect.isTrue(c is C); - Expect.equals(42, c.foo()); -} diff --git a/tests/language_2/mixin/mixin_type_arguments_test.dart b/tests/language_2/mixin/mixin_type_arguments_test.dart deleted file mode 100644 index 4730c648789..00000000000 --- a/tests/language_2/mixin/mixin_type_arguments_test.dart +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2017, 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 - -import 'package:expect/expect.dart' show Expect; - -@pragma("vm:entry-point") // Prevent obfuscation -class A {} - -@pragma("vm:entry-point") // Prevent obfuscation -class B {} - -@pragma("vm:entry-point") // Prevent obfuscation -class C {} - -@pragma("vm:entry-point") // Prevent obfuscation -class D {} - -@pragma("vm:entry-point") // Prevent obfuscation -class E {} - -@pragma("vm:entry-point") // Prevent obfuscation -class F {} - -@pragma("vm:entry-point") // Prevent obfuscation -class M1 { - m1() => "M1<$Tm1>"; -} - -@pragma("vm:entry-point") // Prevent obfuscation -class M2 { - m2() => "M2<$Tm2>"; -} - -@pragma("vm:entry-point") // Prevent obfuscation -class M3 { - m3() => "M3<$Tm3>"; -} - -@pragma("vm:entry-point") // Prevent obfuscation -class M4 { - m4() => "M4<$Tm4>"; -} - -@pragma("vm:entry-point") // Prevent obfuscation -class M5 { - m5() => "M5<$Tm5>"; -} - -class C1 = Object with M1, M2, M3, M4, M5; - -class C2 = Object with M1, M2, M3, M4, M5; - -class C3 = Object with M1, M2, M3, M4, M5; - -class C4 extends Object with M1, M2, M3, M4, M5 {} - -class C5 extends Object with M1, M2, M3, M4, M5 {} - -class C6 extends Object with M1, M2, M3, M4, M5 {} - -class C7 = Object with M1, M2, M3, M4, M5; - -class C8 extends Object with M1, M2, M3, M4, M5 {} - -class C9 = Object - with M1>, M2>, M3>, M4>, M5>; - -class CA extends Object - with M1>, M2>, M3>, M4>, M5> {} - -trace(x) => "${x.m1()}, ${x.m2()}, ${x.m3()}, ${x.m4()}, ${x.m5()}"; - -main() { - Expect.stringEquals( - "M1, M2, M3, M4, M5", trace(new C1())); - Expect.stringEquals("M1, M2, M3, M4, M5", trace(new C2())); - Expect.stringEquals( - "M1, M2, M3, M4, M5", trace(new C3())); - Expect.stringEquals( - "M1, M2, M3, M4, M5", trace(new C3())); - Expect.stringEquals( - "M1, M2, M3, M4, M5", trace(new C4())); - Expect.stringEquals("M1, M2, M3, M4, M5", trace(new C5())); - Expect.stringEquals( - "M1, M2, M3, M4, M5", trace(new C6())); - Expect.stringEquals( - "M1, M2, M3, M4, M5", trace(new C6())); - Expect.stringEquals("M1, M2, M3, M4, M5", trace(new C7())); - Expect.stringEquals("M1, M2, M3, M4, M5", trace(new C8())); - Expect.stringEquals( - "M1>, M2>, M3>, M4>, M5>", - trace(new C9())); - Expect.stringEquals( - "M1>, M2>, M3>, M4>, M5>", - trace(new CA())); -} diff --git a/tests/language_2/mixin/named_constructor_test.dart b/tests/language_2/mixin/named_constructor_test.dart deleted file mode 100644 index f8cb8f97ad5..00000000000 --- a/tests/language_2/mixin/named_constructor_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -var calls = []; - -abstract class A { - bool _done = true; - var a = calls.add('A()') as dynamic; -} - -abstract class B { - B.protected() { - calls.add('B.protected()'); - } -} - -class C extends B with A { - C() : super.protected() { - calls.add('C()'); - } -} - -void main() { - var c = new C(); - Expect.isTrue(c._done); - Expect.equals(calls.join(', '), 'A(), B.protected(), C()'); -} diff --git a/tests/language_2/mixin/naming_test.dart b/tests/language_2/mixin/naming_test.dart deleted file mode 100644 index 4ad1455dc71..00000000000 --- a/tests/language_2/mixin/naming_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class S {} - -class M1 {} - -class M2 {} - -class M3 {} - -class C = S with M1, M2, M3; - -class D extends S with M1, M2, M3 {} - -class S_M1 {} - -class S_M1_M2 {} - -main() { - var c = new C(); - Expect.isTrue(c is C); - Expect.isFalse(c is D); - Expect.isTrue(c is S); - Expect.isFalse(c is S_M1); - Expect.isFalse(c is S_M1_M2); - - var d = new D(); - Expect.isFalse(d is C); - Expect.isTrue(d is D); - Expect.isTrue(d is S); - Expect.isFalse(d is S_M1); - Expect.isFalse(d is S_M1_M2); - - var sm = new S_M1(); - Expect.isFalse(sm is C); - Expect.isFalse(sm is D); - Expect.isFalse(sm is S); - Expect.isTrue(sm is S_M1); - Expect.isFalse(sm is S_M1_M2); - - var smm = new S_M1_M2(); - Expect.isFalse(smm is C); - Expect.isFalse(smm is D); - Expect.isFalse(smm is S); - Expect.isFalse(smm is S_M1); - Expect.isTrue(smm is S_M1_M2); -} diff --git a/tests/language_2/mixin/only_for_rti_test.dart b/tests/language_2/mixin/only_for_rti_test.dart deleted file mode 100644 index 501e94731b1..00000000000 --- a/tests/language_2/mixin/only_for_rti_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -class Tester { - testGenericType(x) { - return x is T; - } -} - -abstract class A = B with C; - -class B {} - -class C {} - -class X extends Y with Z {} - -class Y {} - -class Z {} - -main() { - // Classes A and X are only used as generic arguments. - Expect.isFalse(new Tester().testGenericType(new Object())); - Expect.isFalse(new Tester().testGenericType(new Object())); -} diff --git a/tests/language_2/mixin/override_regression_test.dart b/tests/language_2/mixin/override_regression_test.dart deleted file mode 100644 index 08b95b271c9..00000000000 --- a/tests/language_2/mixin/override_regression_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class C0 { - int m1() => 5; - int m2() => m1(); -} - -class C1 = Object with C0; - -class D { - int m1() => 7; -} - -class E0 extends C0 with D {} - -class E1 extends C1 with D {} - -main() { - Expect.equals(7, new E0().m2()); - Expect.equals(7, new E1().m2()); -} diff --git a/tests/language_2/mixin/prefix_lib.dart b/tests/language_2/mixin/prefix_lib.dart deleted file mode 100644 index 25894fcb2e5..00000000000 --- a/tests/language_2/mixin/prefix_lib.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2013, 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 mixin_prefix_lib; - -import "dart:convert"; - -class MixinClass { - String bar() => json.encode({'a': 1}); -} diff --git a/tests/language_2/mixin/prefix_test.dart b/tests/language_2/mixin/prefix_test.dart deleted file mode 100644 index 0572b8f8a5d..00000000000 --- a/tests/language_2/mixin/prefix_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for issue 11891. - -import "package:expect/expect.dart"; -import "prefix_lib.dart"; - -class A extends Object with MixinClass { - String baz() => bar(); -} - -void main() { - var a = new A(); - Expect.equals('{"a":1}', a.baz()); -} diff --git a/tests/language_2/mixin/proto_test.dart b/tests/language_2/mixin/proto_test.dart deleted file mode 100644 index 5291acf707e..00000000000 --- a/tests/language_2/mixin/proto_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2016, 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 - -// Tests that a program in csp mode doesn't access the prototype chain -// on platforms that don't support direct access to __proto__. -// This test is most useful with --csp and on a platform that doesn't support -// __proto__ access (such as Rhino). -// See http://dartbug.com/27290 . - -import 'package:expect/expect.dart'; - -class A { - var x; - foo() => 44; - bar() => 22; -} - -class B { - var y; - foo() => 42; -} - -class C extends A with B { - var z; - bar() => 499; -} - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -confuse(x) => x; - -main() { - var all = [new A(), new B(), new C()]; - Expect.equals(44, confuse(all[0]).foo()); - Expect.equals(22, confuse(all[0]).bar()); - Expect.equals(42, confuse(all[1]).foo()); - Expect.equals(42, confuse(all[2]).foo()); - Expect.equals(499, confuse(all[2]).bar()); -} diff --git a/tests/language_2/mixin/recursive_mixin_test.dart b/tests/language_2/mixin/recursive_mixin_test.dart deleted file mode 100644 index 446af199793..00000000000 --- a/tests/language_2/mixin/recursive_mixin_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -class A { - bool foo(T x) => true; -} - -class B extends Object with A, C {} - -// Tests #31290 -class C {} - -main() { - var b = new B(); - Expect.isTrue(b is B); - Expect.isTrue(b is A); - Expect.isTrue(b is C); - - // Verify that runtime checking enforces A instead of A - dynamic d = b; - Expect.isTrue(d.foo(b)); - Expect.throws(() => d.foo(42)); -} diff --git a/tests/language_2/mixin/regress_11398_test.dart b/tests/language_2/mixin/regress_11398_test.dart deleted file mode 100644 index f5f5c4772bd..00000000000 --- a/tests/language_2/mixin/regress_11398_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -void main() { - var hva = new HasValueA(); - hva.value = '42'; - Expect.equals('42', hva.value); - - var hvb = new HasValueB(); - hvb.value = '87'; - Expect.equals('87', hvb.value); - - var hvc = new HasValueC(); - hvc.value = '99'; - Expect.equals('99', hvc.value); -} - -abstract class Delegate { - String invoke(String value); -} - -abstract class DelegateMixin { - String invoke(String value) => value; -} - -abstract class HasValueMixin implements Delegate { - String _value; - set value(String value) { - _value = invoke(value); - } - - String get value => _value; -} - -class HasValueA extends Object with HasValueMixin, DelegateMixin {} - -class HasValueB extends Object with DelegateMixin, HasValueMixin {} - -class HasValueC extends Object with HasValueMixin { - String invoke(String value) => value; -} diff --git a/tests/language_2/mixin/regress_13688_test.dart b/tests/language_2/mixin/regress_13688_test.dart deleted file mode 100644 index ed86fc9d85d..00000000000 --- a/tests/language_2/mixin/regress_13688_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class ComparableMixin { - e() { - return E; - } -} - -class KUID extends Object with ComparableMixin {} - -main() { - var kuid = new KUID(); - Expect.equals(kuid.runtimeType.toString(), kuid.e().toString()); -} diff --git a/tests/language_2/mixin/regress_47645_test.dart b/tests/language_2/mixin/regress_47645_test.dart deleted file mode 100644 index 27885e9262a..00000000000 --- a/tests/language_2/mixin/regress_47645_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2021, 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 - -import "package:expect/expect.dart"; - -// Regression test for https://github.com/dart-lang/sdk/issues/47645. -// To reproduce the issue the class declaration must appear before the mixin -// declaration. -class C with M> {} - -mixin M { - bool fn() => true; -} - -void main() { - var c = C(); - Expect.isTrue(c.fn()); -} diff --git a/tests/language_2/mixin/regress_flutter_55345_const_test.dart b/tests/language_2/mixin/regress_flutter_55345_const_test.dart deleted file mode 100644 index 797aacad5cc..00000000000 --- a/tests/language_2/mixin/regress_flutter_55345_const_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Verifies that references to deduplicated mixins are properly updated -// in types which are only accessible through constants. -// Regression test for https://github.com/flutter/flutter/issues/55345. - -class Diagnosticable {} - -class SomeClass with Diagnosticable {} - -class State with Diagnosticable { - const State(); -} - -class StateA extends State { - const StateA(); -} - -class StateB extends State { - const StateB(); -} - -const c1 = StateA(); -const c2 = StateB(); - -main() { - print(const [ - { - (c1 ?? c2): [ - [c1 ?? c2] - ] - }, - 'abc' - ]); - // No compile time or runtime errors. -} diff --git a/tests/language_2/mixin/regress_flutter_55345_test.dart b/tests/language_2/mixin/regress_flutter_55345_test.dart deleted file mode 100644 index e9612ca9e0d..00000000000 --- a/tests/language_2/mixin/regress_flutter_55345_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Verifies that references to deduplicated mixins are properly updated. -// Regression test for https://github.com/flutter/flutter/issues/55345. - -class Diagnosticable {} - -class SomeClass with Diagnosticable {} - -class State with Diagnosticable {} - -class StateA extends State {} - -class StateB extends State {} - -StateA a = StateA(); -StateB b = StateB(); - -List foo(T x) { - print(T); - return [x]; -} - -T Function(T) bar(T x) { - print(T); - - return (T y) { - print(S); - print(y); - return y; - }; -} - -main() { - State x1 = a ?? b; - print(x1); - - var x2 = a ?? b; - var x3 = foo(x2); - var x4 = bar(x3); - x4(x3); - // No compile time or runtime errors. -} diff --git a/tests/language_2/mixin/regress_flutter_66859_1_test.dart b/tests/language_2/mixin/regress_flutter_66859_1_test.dart deleted file mode 100644 index 1f4b34d1788..00000000000 --- a/tests/language_2/mixin/regress_flutter_66859_1_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Verifies that mixin supertypes are properly maintained even if marked as -// deferred (e.g., in a circular hierarchy). -// Regression test for: https://github.com/flutter/flutter/issues/66859 - -import "package:expect/expect.dart"; - -mixin M {} - -mixin N {} - -class A extends B with M, N {} - -class B {} - -class C extends A {} - -class Z extends B with M {} - -main() { - var z = Z(); - Expect.isTrue(z is B); - Expect.isTrue(z is M); - var a = A(); - Expect.isTrue(a is M); - Expect.isTrue(a is N); - Expect.isTrue(a is B); -} diff --git a/tests/language_2/mixin/regress_flutter_66859_2_test.dart b/tests/language_2/mixin/regress_flutter_66859_2_test.dart deleted file mode 100644 index d0d735c55e9..00000000000 --- a/tests/language_2/mixin/regress_flutter_66859_2_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Verifies that mixin supertypes are properly maintained even if marked as -// deferred (e.g., in a circular hierarchy). -// Regression test for: https://github.com/flutter/flutter/issues/66859 - -import "package:expect/expect.dart"; - -mixin X {} -mixin Y {} -mixin Z {} - -class A extends B with X {} - -class C extends A with Z {} - -class B extends Object with Y {} - -main() { - var a = A(); - var b = B(); - var c = C(); - Expect.isTrue(a is A); - Expect.isTrue(a is B); - Expect.isTrue(a is X); - Expect.isTrue(a is Y); - Expect.isTrue(c is C); - Expect.isTrue(c is A); - Expect.isTrue(c is B); - Expect.isTrue(c is X); - Expect.isTrue(c is Y); - Expect.isTrue(c is Z); - Expect.isTrue(b is B); - Expect.isTrue(b is Y); -} diff --git a/tests/language_2/mixin/substitution_test.dart b/tests/language_2/mixin/substitution_test.dart deleted file mode 100644 index 1c26b889db6..00000000000 --- a/tests/language_2/mixin/substitution_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that mixins don't interfere with type variable substitution. - -import '../dynamic_type_helper.dart'; - -class B { - B(T x); -} - -class M {} - -class A extends B with M { - A(T x) : super(x); // This line must be warning free. -} - -class C = B with M; - -main() { - new A(null); - new C(''); - dynamic value = 0; - checkDynamicTypeError(() => new C(value)); -} diff --git a/tests/language_2/mixin/super_2_test.dart b/tests/language_2/mixin/super_2_test.dart deleted file mode 100644 index bcb922d37b3..00000000000 --- a/tests/language_2/mixin/super_2_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -class B { - // 'super' resolves to Object, and in some tests, multiple points in the - // inheritance chain. - toString() => 'B(' + super.toString() + ')'; -} - -class R { - toString() => 'R[' + super.toString() + ']'; -} - -class D extends R with B { - toString() => 'D<' + super.toString() + '>'; -} - -class E extends D with B { - toString() => 'E{' + super.toString() + '}'; -} - -class F = R with B, B; - -class G extends F with B { - toString() => 'G{' + super.toString() + '}'; -} - -main() { - check(object, String expected) { - Expect.equals(expected, object.toString()); - } - - check(B(), "B(Instance of '$B')"); - check(R(), "R[Instance of '$R']"); - check(D(), "D"); - check(E(), "E{B(D)}"); - check(G(), "G{B(B(B(R[Instance of '$G'])))}"); -} diff --git a/tests/language_2/mixin/super_bound_runtime_test.dart b/tests/language_2/mixin/super_bound_runtime_test.dart deleted file mode 100644 index 0823a5f2cd4..00000000000 --- a/tests/language_2/mixin/super_bound_runtime_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -class M {} - -class N {} - -class S {} - -class MNA extends S> - with M, N, List> {} - -class MNA2 = S> with M, N, List>; - -main() { - new MNA(); - new MNA2(); - - // Type parameter U of M must extend type parameter V, but - // type argument num is not a subtype of int. - - // Type parameter U of M must extend type parameter V, but - // type argument num is not a subtype of int. - -} diff --git a/tests/language_2/mixin/super_bound_test.dart b/tests/language_2/mixin/super_bound_test.dart deleted file mode 100644 index 3b3eaf16e6b..00000000000 --- a/tests/language_2/mixin/super_bound_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2015, 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 - -class M {} - -class N {} - -class S {} - -class MNA extends S> - with M, N, List> {} - -class MNA2 = S> with M, N, List>; - -main() { - new MNA(); - new MNA2(); - - // Type parameter U of M must extend type parameter V, but - // type argument num is not a subtype of int. - new MNA(); - // ^ - // [cfe] Type argument 'num' doesn't conform to the bound 'U' of the type variable 'V' on 'MNA'. - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - - // Type parameter U of M must extend type parameter V, but - // type argument num is not a subtype of int. - new MNA2(); - // ^ - // [cfe] Type argument 'num' doesn't conform to the bound 'U' of the type variable 'V' on 'MNA2'. - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS -} diff --git a/tests/language_2/mixin/super_constructor2_test.dart b/tests/language_2/mixin/super_constructor2_test.dart deleted file mode 100644 index ecf8f0f6a74..00000000000 --- a/tests/language_2/mixin/super_constructor2_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class Base { - var i, j; - Base.ctor1(int i, this.j) : this.i = i + 7; - Base.ctor2(int i, this.j) : this.i = i + 8; -} - -abstract class M { - get i; - get j; - int k = 42; - foo() => i + j; -} - -class C extends Base with M { - int l = 131; - C.ctor1() : super.ctor1(1, 13); - C.ctor2() : super.ctor2(1, 13); -} - -main() { - C c1 = new C.ctor1(); - Expect.equals(8, c1.i); - Expect.equals(13, c1.j); - Expect.equals(42, c1.k); - Expect.equals(131, c1.l); - Expect.equals(21, c1.foo()); - C c2 = new C.ctor2(); - Expect.equals(9, c2.i); - Expect.equals(13, c2.j); - Expect.equals(42, c2.k); - Expect.equals(131, c2.l); - Expect.equals(22, c2.foo()); -} diff --git a/tests/language_2/mixin/super_constructor_default_test.dart b/tests/language_2/mixin/super_constructor_default_test.dart deleted file mode 100644 index 4c65c8141e1..00000000000 --- a/tests/language_2/mixin/super_constructor_default_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class Base { - int i, j; - Base(int i, this.j) : this.i = i + 7; -} - -abstract class M { - int get i; - int get j; - int k = 42; - foo() => i + j; -} - -class C extends Base with M { - int l = 131; - C() : super(1, 13); -} - -main() { - C c = new C(); - Expect.equals(8, c.i); - Expect.equals(13, c.j); - Expect.equals(21, c.foo()); - Expect.equals(42, c.k); - Expect.equals(131, c.l); -} diff --git a/tests/language_2/mixin/super_constructor_multiple_test.dart b/tests/language_2/mixin/super_constructor_multiple_test.dart deleted file mode 100644 index 0fb5208b3b9..00000000000 --- a/tests/language_2/mixin/super_constructor_multiple_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class S { - int i; - S.foo() : i = 1742; -} - -class M1 {} - -class M2 {} - -class C extends S with M1, M2 { - C.foo() : super.foo(); -} - -main() { - Expect.equals(1742, new C.foo().i); -} diff --git a/tests/language_2/mixin/super_constructor_named_test.dart b/tests/language_2/mixin/super_constructor_named_test.dart deleted file mode 100644 index 057b3ae154f..00000000000 --- a/tests/language_2/mixin/super_constructor_named_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class Base { - int i, j; - Base.ctor(int this.i - , {int this.j: 10} // //# 01: ok - ) { - if (j == null) { - j = 10; - } - } -} - -abstract class M { - int get i; - int get j; - int k = 42; - foo() => i + j; -} - -class C extends Base with M { - int l = 131; - C.foo() : super.ctor(1, j: 13); //# 01: continued - C.bar() : super.ctor(1); -} - -main() { - C c1 = new C.foo(); // //# 01: continued - C c2 = new C.bar(); - Expect.equals(1, c2.i); - Expect.equals(10, c2.j); - Expect.equals(11, c2.foo()); - Expect.equals(42, c2.k); - Expect.equals(131, c2.l); -} diff --git a/tests/language_2/mixin/super_constructor_positionals_test.dart b/tests/language_2/mixin/super_constructor_positionals_test.dart deleted file mode 100644 index a2ba5510ba8..00000000000 --- a/tests/language_2/mixin/super_constructor_positionals_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class Base { - int i, j; - Base.ctor( - int this.i, - [ // //# 01: ok - int this.j - ] // //# 01: continued - ); -} - -abstract class M { - int get i; - int get j; - int k = 42; - foo() => i + j; -} - -class C extends Base with M { - int l = 131; - C.foo() : super.ctor(1, 13); - C.bar() : super.ctor(1); // //# 01: continued -} - -main() { - C c1 = new C.foo(); - Expect.equals(1, c1.i); - Expect.equals(13, c1.j); - Expect.equals(14, c1.foo()); - Expect.equals(42, c1.k); - Expect.equals(131, c1.l); - C c2 = new C.bar(); // //# 01: continued -} diff --git a/tests/language_2/mixin/super_constructor_test.dart b/tests/language_2/mixin/super_constructor_test.dart deleted file mode 100644 index 9246e1dbd15..00000000000 --- a/tests/language_2/mixin/super_constructor_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class Base { - int i, j; - Base.ctor(int i, this.j) : this.i = i + 7; -} - -abstract class M { - int get i; - int get j; - int k = 42; - foo() => i + j; -} - -class C extends Base with M { - int l = 131; - C() : super.ctor(1, 13); -} - -main() { - C c = new C(); - Expect.equals(8, c.i); - Expect.equals(13, c.j); - Expect.equals(42, c.k); - Expect.equals(131, c.l); - Expect.equals(21, c.foo()); -} diff --git a/tests/language_2/mixin/super_test.dart b/tests/language_2/mixin/super_test.dart deleted file mode 100644 index e55fd8a7a78..00000000000 --- a/tests/language_2/mixin/super_test.dart +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -class MS { - foo() { - return "MS<$T>.foo\n"; - } -} - -mixin M on MS> { - foo() { - return super.foo() + "M<$T>.foo\n"; - } -} - -class NS { - foo() { - return "NS<$T>.foo\n"; - } -} - -mixin N on NS> { - foo() { - return super.foo() + "N<$T>.foo\n"; - } -} - -class S implements MS>, NS> { - foo() { - return "S<$T,$V,$W>.foo\n"; - } -} - -class SM = S with M; - -class MNA1 extends S with M, N { - foo() { - return super.foo() + "MNA1<$U, $V, $W>.foo\n"; - } -} - -class MNA2 extends SM with N { - foo() { - return super.foo() + "MNA2<$U, $V, $W>.foo\n"; - } -} - -class MNA3 extends S with M, N { - foo() { - return super.foo() + "MNA3<$U, $V, $W>.foo\n"; - } -} - -abstract class Base { - static String log = ''; - Base() { - log += 'Base()\n'; - } -} - -mixin Foo on Base { - var x = Base.log += 'Foo.x\n'; -} - -mixin Bar on Base { - var y = Base.log += 'Bar.y\n'; -} - -class Derived extends Base with Foo, Bar { - String get log => Base.log; -} - -main() { - Expect.equals( - "S.foo\n" - "M.foo\n", - SM().foo()); - Expect.equals( - "S.foo\n" - "M.foo\n" - "N.foo\n" - "MNA1.foo\n", - MNA1().foo()); - Expect.equals( - "S.foo\n" - "M.foo\n" - "N.foo\n" - "MNA2.foo\n", - MNA2().foo()); - Expect.equals( - "S.foo\n" - "M.foo\n" - "N.foo\n" - "MNA3.foo\n", - MNA3().foo()); - Expect.equals( - "Bar.y\n" - "Foo.x\n" - "Base()\n", - Derived().log); -} diff --git a/tests/language_2/mixin/super_use_test.dart b/tests/language_2/mixin/super_use_test.dart deleted file mode 100644 index 6dff263a69d..00000000000 --- a/tests/language_2/mixin/super_use_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class M {} - -class P0 { - foo() { - super.toString(); - - void inner() { - super.toString(); - } - - inner(); - - (() { - super.toString(); - })(); - - return 42; - } -} - -class P1 { - bar() { - super.toString(); - return 87; - } - - // The test method is strategically placed here to try to force the - // P1 class and its bar method to be resolved before resolving the - // mixin applications. - test() { - new C(); - var d = new D(); - var e = new E(); - var f = new F(); - Expect.equals(42, d.foo()); - Expect.equals(87, e.bar()); - Expect.equals(99, f.baz()); - } -} - -class P2 { - baz() { - super.toString(); - return 99; - } -} - -class C = Object with M; -class D = Object with P0; -class E = Object with M, P1; -class F = Object with P2, M; - -main() { - var p1 = new P1(); - var p2 = new P2(); - Expect.equals(87, p1.bar()); - p1.test(); - Expect.equals(99, p2.baz()); -} diff --git a/tests/language_2/mixin/super_with_initializer_test.dart b/tests/language_2/mixin/super_with_initializer_test.dart deleted file mode 100644 index 3a374d295b8..00000000000 --- a/tests/language_2/mixin/super_with_initializer_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2021, 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 - -/// Regression test for mixin overrides (dartbug.com/44636). -/// -/// Prior to the fix, B's initializer was accidentally being applied on the -/// overridden definition in C, and as a result, the program would stack -/// overflow. -import 'package:expect/expect.dart'; - -class A = B with C; - -mixin M {} - -abstract class B with M { - Object _test = "a"; -} - -mixin C on B, M { - @override - Object get _test => super._test; - - @override - set _test(Object value) { - super._test = value; - } -} - -main() => Expect.equals("a", A()._test); diff --git a/tests/language_2/mixin/superclass_runtime_test.dart b/tests/language_2/mixin/superclass_runtime_test.dart deleted file mode 100644 index 7db5d288832..00000000000 --- a/tests/language_2/mixin/superclass_runtime_test.dart +++ /dev/null @@ -1,127 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -class S0 {} - -class S1 extends Object {} - -class S2 extends S0 {} - -class M0 {} - -class M1 extends Object {} - -mixin M2 on M0 {} - -class C00 = S0 with M0; -class C01 = S0 with M1; - -class C03 = S0 with M0, M1; -class C04 = S0 with M0, M2; - - - - -class C10 = S1 with M0; -class C11 = S1 with M1; - -class C13 = S1 with M0, M1; -class C14 = S1 with M0, M2; - - - - -class C20 = S2 with M0; -class C21 = S2 with M1; - -class C23 = S2 with M0, M1; -class C24 = S2 with M0, M2; - - - - -class D00 extends S0 with M0 {} - -class D01 extends S0 with M1 {} - - - -class D03 extends S0 with M0, M1 {} - -class D04 extends S0 with M0, M2 {} - - - - - - - -class D10 extends S1 with M0 {} - -class D11 extends S1 with M1 {} - - - -class D13 extends S1 with M0, M1 {} - -class D14 extends S1 with M0, M2 {} - - - - - - - -class D20 extends S2 with M0 {} - -class D21 extends S2 with M1 {} - - - -class D23 extends S2 with M0, M1 {} - -class D24 extends S2 with M0, M2 {} - - - - - - - -main() { - new C00(); - new C01(); - new C03(); - new C04(); - - new C10(); - new C11(); - new C13(); - new C14(); - - new C20(); - new C21(); - new C23(); - new C24(); - - new D00(); - new D01(); - new D03(); - new D04(); - - new D10(); - new D11(); - new D13(); - new D14(); - - new D20(); - new D21(); - new D23(); - new D24(); -} diff --git a/tests/language_2/mixin/superclass_test.dart b/tests/language_2/mixin/superclass_test.dart deleted file mode 100644 index 1c81a63d896..00000000000 --- a/tests/language_2/mixin/superclass_test.dart +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright (c) 2013, 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 - -class S0 {} - -class S1 extends Object {} - -class S2 extends S0 {} - -class M0 {} - -class M1 extends Object {} - -mixin M2 on M0 {} - -class C00 = S0 with M0; -class C01 = S0 with M1; -class C02 = S0 with M2; -// ^ -// [cfe] 'S0' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE -class C03 = S0 with M0, M1; -class C04 = S0 with M0, M2; -class C05 = S0 with M2, M0; -// ^ -// [cfe] 'S0' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE -class C06 = S0 with M1, M2; -// ^ -// [cfe] '_C06&S0&M1' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE -class C07 = S0 with M2, M1; -// ^ -// [cfe] 'S0' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE - -class C10 = S1 with M0; -class C11 = S1 with M1; -class C12 = S1 with M2; -// ^ -// [cfe] 'S1' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE -class C13 = S1 with M0, M1; -class C14 = S1 with M0, M2; -class C15 = S1 with M2, M0; -// ^ -// [cfe] 'S1' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE -class C16 = S1 with M1, M2; -// ^ -// [cfe] '_C16&S1&M1' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE -class C17 = S1 with M2, M1; -// ^ -// [cfe] 'S1' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE - -class C20 = S2 with M0; -class C21 = S2 with M1; -class C22 = S2 with M2; -// ^ -// [cfe] 'S2' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE -class C23 = S2 with M0, M1; -class C24 = S2 with M0, M2; -class C25 = S2 with M2, M0; -// ^ -// [cfe] 'S2' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE -class C26 = S2 with M1, M2; -// ^ -// [cfe] '_C26&S2&M1' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE -class C27 = S2 with M2, M1; -// ^ -// [cfe] 'S2' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE - -class D00 extends S0 with M0 {} - -class D01 extends S0 with M1 {} - -class D02 extends S0 with M2 {} -// ^ -// [cfe] 'S0' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE - -class D03 extends S0 with M0, M1 {} - -class D04 extends S0 with M0, M2 {} - -class D05 extends S0 with M2, M0 {} -// ^ -// [cfe] 'S0' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE - -class D06 extends S0 with M1, M2 {} -// ^ -// [cfe] '_D06&S0&M1' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE - -class D07 extends S0 with M2, M1 {} -// ^ -// [cfe] 'S0' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE - -class D10 extends S1 with M0 {} - -class D11 extends S1 with M1 {} - -class D12 extends S1 with M2 {} -// ^ -// [cfe] 'S1' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE - -class D13 extends S1 with M0, M1 {} - -class D14 extends S1 with M0, M2 {} - -class D15 extends S1 with M2, M0 {} -// ^ -// [cfe] 'S1' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE - -class D16 extends S1 with M1, M2 {} -// ^ -// [cfe] '_D16&S1&M1' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE - -class D17 extends S1 with M2, M1 {} -// ^ -// [cfe] 'S1' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE - -class D20 extends S2 with M0 {} - -class D21 extends S2 with M1 {} - -class D22 extends S2 with M2 {} -// ^ -// [cfe] 'S2' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE - -class D23 extends S2 with M0, M1 {} - -class D24 extends S2 with M0, M2 {} - -class D25 extends S2 with M2, M0 {} -// ^ -// [cfe] 'S2' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE - -class D26 extends S2 with M1, M2 {} -// ^ -// [cfe] '_D26&S2&M1' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE - -class D27 extends S2 with M2, M1 {} -// ^ -// [cfe] 'S2' doesn't implement 'M0' so it can't be used with 'M2'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE - -main() { - new C00(); - new C01(); - new C03(); - new C04(); - - new C10(); - new C11(); - new C13(); - new C14(); - - new C20(); - new C21(); - new C23(); - new C24(); - - new D00(); - new D01(); - new D03(); - new D04(); - - new D10(); - new D11(); - new D13(); - new D14(); - - new D20(); - new D21(); - new D23(); - new D24(); -} diff --git a/tests/language_2/mixin/supertype_subclass2_test.dart b/tests/language_2/mixin/supertype_subclass2_test.dart deleted file mode 100644 index 8114eb699d5..00000000000 --- a/tests/language_2/mixin/supertype_subclass2_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2016, 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 - -class B {} - -class C {} - -class D {} - -class E extends B with C implements D {} - -class F extends E {} - -// M is mixed onto E which implements B, C and D. -mixin M // - on B //# 01: ok - on C //# 02: ok - on D //# 03: ok - on E //# 04: ok - on F //# 05: compile-time error -{} - -class A extends E with M {} - -main() { - new A(); -} diff --git a/tests/language_2/mixin/supertype_subclass_test.dart b/tests/language_2/mixin/supertype_subclass_test.dart deleted file mode 100644 index e7c4cad1f84..00000000000 --- a/tests/language_2/mixin/supertype_subclass_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2016, 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 - -class B {} - -class C {} - -class D {} - -class E extends B with C implements D {} - -class F extends E {} - -// M is mixed onto E which implements B, C and D. -mixin M // - on B //# 01: ok - on C //# 02: ok - on D //# 03: ok - on E //# 04: ok - on F //# 05: compile-time error -{} - -class A = E with M; - -main() { - new A(); -} diff --git a/tests/language_2/mixin/this_use_test.dart b/tests/language_2/mixin/this_use_test.dart deleted file mode 100644 index 7d2f99ddd19..00000000000 --- a/tests/language_2/mixin/this_use_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that [:this:] in a class A used as a mixin in class D knows it can be an -// instance of D. - -import "package:expect/expect.dart"; - -class A { - foo() => bar(); // Implicit use of [:this:] - bar() => 42; -} - -class B {} - -class C = B with A; - -class D extends C { - bar() => 54; -} - -class E extends A { - bar() => 68; -} - -main() { - Expect.equals(54, new D().foo()); - Expect.equals(68, new E().foo()); -} diff --git a/tests/language_2/mixin/type_parameter1_test.dart b/tests/language_2/mixin/type_parameter1_test.dart deleted file mode 100644 index d7cf77371f0..00000000000 --- a/tests/language_2/mixin/type_parameter1_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -abstract class Mixin1 {} - -abstract class Mixin2 {} - -class A {} - -class MyTypedef = A with Mixin1, Mixin2; - -class B extends MyTypedef {} - -main() { - var b = new B(); - Expect.isTrue(b is Mixin1); - Expect.isTrue(b is! Mixin1); - Expect.isTrue(b is Mixin2); - Expect.isTrue(b is! Mixin2); -} diff --git a/tests/language_2/mixin/type_parameter2_test.dart b/tests/language_2/mixin/type_parameter2_test.dart deleted file mode 100644 index 27ab6391cdd..00000000000 --- a/tests/language_2/mixin/type_parameter2_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -abstract class Mixin1 {} - -abstract class Mixin2 {} - -class A { - A(foo); -} - -class MyTypedef = A with Mixin1, Mixin2; - -class B extends MyTypedef { - B(foo) : super(foo); -} - -main() { - var b = new B(null); - Expect.isTrue(b is Mixin1); - Expect.isTrue(b is! Mixin1); - Expect.isTrue(b is Mixin2); - Expect.isTrue(b is! Mixin2); -} diff --git a/tests/language_2/mixin/type_parameter3_test.dart b/tests/language_2/mixin/type_parameter3_test.dart deleted file mode 100644 index 36591665d15..00000000000 --- a/tests/language_2/mixin/type_parameter3_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -abstract class Mixin1 {} - -abstract class Mixin2 {} - -class A { - A(foo); -} - -class B extends A with Mixin1, Mixin2 { - B(foo) : super(foo); -} - -main() { - var b = new B(null); - Expect.isTrue(b is Mixin1); - Expect.isTrue(b is! Mixin1); - Expect.isTrue(b is Mixin2); - Expect.isTrue(b is! Mixin2); -} diff --git a/tests/language_2/mixin/type_parameter4_test.dart b/tests/language_2/mixin/type_parameter4_test.dart deleted file mode 100644 index 87cb7605e63..00000000000 --- a/tests/language_2/mixin/type_parameter4_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class R {} - -class M implements R {} - -class B1 {} - -class B2 {} - -class A1 extends B1 with M {} - -class A2 = B2 with M; - -main() { - var a1 = new A1(); - Expect.isTrue(a1 is R); - var a2 = new A2(); - Expect.isTrue(a2 is R); -} diff --git a/tests/language_2/mixin/type_parameter5_test.dart b/tests/language_2/mixin/type_parameter5_test.dart deleted file mode 100644 index f93a9ba4d9c..00000000000 --- a/tests/language_2/mixin/type_parameter5_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 - -class MixinA { - T intField; -} - -class MixinB { - S stringField; -} - -class MixinC { - U listField; - V mapField; -} - -class C extends Object with MixinA, MixinB, MixinC {} - -void main() { - var c = new C(); - c.intField = 0; - c.stringField = ''; - c.listField = []; - c.mapField = {}; -} diff --git a/tests/language_2/mixin/type_parameter6_test.dart b/tests/language_2/mixin/type_parameter6_test.dart deleted file mode 100644 index 6aec9de42a3..00000000000 --- a/tests/language_2/mixin/type_parameter6_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2014, 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 - -class A {} - -class B { - int foo(S s) => null; -} - -class C extends A with B {} - -main() { - var list = ['foo']; - var c = new C(); - list.map(c.foo); -} diff --git a/tests/language_2/mixin/type_parameter_inference_error_test.dart b/tests/language_2/mixin/type_parameter_inference_error_test.dart deleted file mode 100644 index 7d09d22e265..00000000000 --- a/tests/language_2/mixin/type_parameter_inference_error_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2018, 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 - -abstract class A {} - -class B {} - -mixin M on A {} - -// No matching class from which to infer the type parameter of M -class C extends Object with M {} //# 01: compile-time error - -class C = Object with M; //# 02: compile-time error - -// Satisfying the constraint with an "implements" clause is not sufficient -class C extends Object with M implements A {} //# 03: compile-time error - -class C = Object with M implements A; //# 04: compile-time error - -// Mixin works when used correctly. -class D = A with M; - -main() {} diff --git a/tests/language_2/mixin/type_parameter_inference_previous_mixin_test.dart b/tests/language_2/mixin/type_parameter_inference_previous_mixin_test.dart deleted file mode 100644 index 191e77b1b7a..00000000000 --- a/tests/language_2/mixin/type_parameter_inference_previous_mixin_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -abstract class A { - // This is ok because type inference will ensure that in C, A and M are - // instantiated with the same T. - T f(T x) => x; //# 01: ok -} - -class B {} - -abstract class M1 implements A {} - -mixin M2 on A { - T f(T x) => x; - T g(T x) => x; - Type h() => T; -} - -// Inferred as `class C extends Object with M1, M2` -class C extends Object with M1, M2 {} - -main() { - C c = new C(); - - // M is instantiated with B, so C.g has type (B) -> B. - B Function(B) x = c.g; //# 02: ok - Null Function(Null) x = c.g; //# 03: compile-time error - Object Function(Object) x = c.g; //# 04: compile-time error - - // And verify that the runtime system has the right type for the type - // parameter - Expect.equals(c.h(), B); //# 05: ok -} diff --git a/tests/language_2/mixin/type_parameter_inference_test.dart b/tests/language_2/mixin/type_parameter_inference_test.dart deleted file mode 100644 index b3cf4bf3833..00000000000 --- a/tests/language_2/mixin/type_parameter_inference_test.dart +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -abstract class A { - // This is ok because type inference will ensure that in C, A and M are - // instantiated with the same T. - T f(T x) => x; //# 01: ok -} - -class B {} - -mixin M1 on A { - T f(T x) => x; - T g(T x) => x; - Type h() => T; -} - -class M2 { - T g(T x) => x; - Type h() => T; -} - -// Inferred as `class C extends A with M1` -class C extends A with M1 {} - -// Inferred as `class D = A with M1` -class D = A with M1; - -// Inferred as `class E extends Object with M2` -class E extends Object with M2 {} - -// Ok because a type parameter is supplied -class F extends Object with M2 {} - -main() { - C c = new C(); - D d = new D(); - E e = new E(); - F f = new F(); - - // M1 is instantiated with B, so C.g has type (B) -> B. - B Function(B) x = c.g; //# 02: ok - B Function(B) x = d.g; //# 03: ok - Null Function(Null) x = c.g; //# 04: compile-time error - Null Function(Null) x = d.g; //# 05: compile-time error - Object Function(Object) x = c.g; //# 06: compile-time error - Object Function(Object) x = d.g; //# 07: compile-time error - - // And verify that the runtime system has the right type for the type - // parameter - Expect.equals(c.h(), B); //# 08: ok - Expect.equals(c.h(), B); //# 09: ok - - // M2 is instantiated with dynamic, so E.g has type (dynamic) -> dynamic. - dynamic Function(dynamic) x = e.g; //# 10: ok - B Function(B) x = e.g; //# 11: compile-time error - - // And verify that the runtime system has the right type for the type - // parameter - Expect.equals(e.h(), dynamic); //# 12: ok - - // M2 is instantiated with B, so F.g has type (B) -> B. - B Function(B) x = f.g; //# 13: ok - Null Function(Null) x = f.g; //# 14: compile-time error - Object Function(Object) x = f.g; //# 15: compile-time error - - // And verify that the runtime system has the right type for the type - // parameter - Expect.equals(f.h(), B); //# 16: ok -} diff --git a/tests/language_2/mixin/type_parameters_errors_runtime_test.dart b/tests/language_2/mixin/type_parameters_errors_runtime_test.dart deleted file mode 100644 index e7829d1922d..00000000000 --- a/tests/language_2/mixin/type_parameters_errors_runtime_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -class S {} - -class M {} - -class A extends S with M {} - - - -class F = S with M; - - -main() { - var a; - a = new A(); - a = new A(); - - a = new F(); - -} diff --git a/tests/language_2/mixin/type_parameters_errors_test.dart b/tests/language_2/mixin/type_parameters_errors_test.dart deleted file mode 100644 index a995ab4ba21..00000000000 --- a/tests/language_2/mixin/type_parameters_errors_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2013, 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 - -class S {} - -class M {} - -class A extends S with M {} -class B extends S with M { } -// ^ -// [cfe] The type 'M' can't be mixed in. -// ^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS -// [cfe] Expected 1 type arguments. -class C extends S with M { } -// ^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS -// [cfe] Expected 1 type arguments. - -class F = S with M; -class G = S with M; -// ^ -// [cfe] The type 'M' can't be mixed in. -// ^^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS -// [cfe] Expected 1 type arguments. - -main() { - var a; - a = new A(); - a = new A(); - a = new A(); - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS - // [cfe] Expected 1 type arguments. - a = new F(); - a = new F(); - // ^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS - // [cfe] Expected 1 type arguments. -} diff --git a/tests/language_2/mixin/type_parameters_mixin_extends_test.dart b/tests/language_2/mixin/type_parameters_mixin_extends_test.dart deleted file mode 100644 index 2f86d0add5e..00000000000 --- a/tests/language_2/mixin/type_parameters_mixin_extends_test.dart +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class M { - bool matches(o) { - bool isChecked = checkUsingIs(o); - if (checkedMode) { - Expect.equals(isChecked, checkUsingCheckedMode(o)); - } - return isChecked; - } - - bool checkUsingIs(o) { - return o is T; - } - - bool checkUsingCheckedMode(o) { - try { - T x = o; - } on Error { - return false; - } - return true; - } - - static final bool checkedMode = computeCheckedMode(); - static bool computeCheckedMode() { - try { - int x = "foo" as dynamic; - } on Error { - return true; - } - return false; - } -} - -class S {} - -class C0 extends S with M {} - -class C1 extends S with M {} - -class C2 extends S with M {} - -class C3 extends S with M {} - -main() { - var c0 = new C0(); - Expect.isTrue(c0 is M); - Expect.isFalse(c0 is M); - Expect.isFalse(c0 is M); - Expect.isTrue(c0.matches(c0)); - Expect.isTrue(c0.matches(42)); - Expect.isTrue(c0.matches("hello")); - - var c0_int = new C0(); - Expect.isTrue(c0_int is M); - Expect.isFalse(c0_int is M); - Expect.isFalse(c0_int is M); - Expect.isTrue(c0_int.matches(c0)); - Expect.isTrue(c0_int.matches(42)); - Expect.isTrue(c0_int.matches("hello")); - - var c0_String = new C0(); - Expect.isTrue(c0_String is M); - Expect.isFalse(c0_String is M); - Expect.isFalse(c0_String is M); - Expect.isTrue(c0_String.matches(c0)); - Expect.isTrue(c0_String.matches(42)); - Expect.isTrue(c0_String.matches("hello")); - - var c1 = new C1(); - Expect.isTrue(c1 is M); - Expect.isFalse(c1 is M); - Expect.isFalse(c1 is M); - Expect.isTrue(c1.matches(c1)); - Expect.isTrue(c1.matches(42)); - Expect.isTrue(c1.matches("hello")); - - var c1_int = new C1(); - Expect.isTrue(c1_int is M); - Expect.isTrue(c1_int is M); - Expect.isFalse(c1_int is M); - Expect.isFalse(c1_int.matches(c1)); - Expect.isTrue(c1_int.matches(42)); - Expect.isFalse(c1_int.matches("hello")); - - var c1_String = new C1(); - Expect.isTrue(c1_String is M); - Expect.isFalse(c1_String is M); - Expect.isTrue(c1_String is M); - Expect.isFalse(c1_String.matches(c1)); - Expect.isFalse(c1_String.matches(42)); - Expect.isTrue(c1_String.matches("hello")); - - var c2 = new C2(); - Expect.isTrue(c2 is M); - Expect.isTrue(c2 is M); - Expect.isFalse(c2 is M); - Expect.isFalse(c2.matches(c2)); - Expect.isTrue(c2.matches(42)); - Expect.isFalse(c2.matches("hello")); - - var c2_int = new C2(); - Expect.isTrue(c2_int is M); - Expect.isTrue(c2_int is M); - Expect.isFalse(c2_int is M); - Expect.isFalse(c2_int.matches(c2)); - Expect.isTrue(c2_int.matches(42)); - Expect.isFalse(c2_int.matches("hello")); - - var c2_String = new C2(); - Expect.isTrue(c2_String is M); - Expect.isTrue(c2_String is M); - Expect.isFalse(c2_String is M); - Expect.isFalse(c2_String.matches(c2)); - Expect.isTrue(c2_String.matches(42)); - Expect.isFalse(c2_String.matches("hello")); - - var c3 = new C3(); - Expect.isTrue(c3 is M); - Expect.isFalse(c3 is M); - Expect.isTrue(c3 is M); - Expect.isFalse(c3.matches(c2)); - Expect.isFalse(c3.matches(42)); - Expect.isTrue(c3.matches("hello")); -} diff --git a/tests/language_2/mixin/type_parameters_mixin_test.dart b/tests/language_2/mixin/type_parameters_mixin_test.dart deleted file mode 100644 index 58fdfc25973..00000000000 --- a/tests/language_2/mixin/type_parameters_mixin_test.dart +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class M { - bool matches(o) { - bool isChecked = checkUsingIs(o); - if (checkedMode) { - Expect.equals(isChecked, checkUsingCheckedMode(o)); - } - return isChecked; - } - - bool checkUsingIs(o) { - return o is T; - } - - bool checkUsingCheckedMode(o) { - try { - T x = o; - } on Error { - return false; - } - return true; - } - - static final bool checkedMode = computeCheckedMode(); - static bool computeCheckedMode() { - try { - int x = "foo" as dynamic; - } on Error { - return true; - } - return false; - } -} - -class S {} - -class C0 = S with M; -class C1 = S with M; -class C2 = S with M; -class C3 = S with M; - -main() { - var c0 = new C0(); - Expect.isTrue(c0 is M); - Expect.isFalse(c0 is M); - Expect.isFalse(c0 is M); - Expect.isTrue(c0.matches(c0)); - Expect.isTrue(c0.matches(42)); - Expect.isTrue(c0.matches("hello")); - - var c0_int = new C0(); - Expect.isTrue(c0_int is M); - Expect.isFalse(c0_int is M); - Expect.isFalse(c0_int is M); - Expect.isTrue(c0_int.matches(c0)); - Expect.isTrue(c0_int.matches(42)); - Expect.isTrue(c0_int.matches("hello")); - - var c0_String = new C0(); - Expect.isTrue(c0_String is M); - Expect.isFalse(c0_String is M); - Expect.isFalse(c0_String is M); - Expect.isTrue(c0_String.matches(c0)); - Expect.isTrue(c0_String.matches(42)); - Expect.isTrue(c0_String.matches("hello")); - - var c1 = new C1(); - Expect.isTrue(c1 is M); - Expect.isFalse(c1 is M); - Expect.isFalse(c1 is M); - Expect.isTrue(c1.matches(c1)); - Expect.isTrue(c1.matches(42)); - Expect.isTrue(c1.matches("hello")); - - var c1_int = new C1(); - Expect.isTrue(c1_int is M); - Expect.isTrue(c1_int is M); - Expect.isFalse(c1_int is M); - Expect.isFalse(c1_int.matches(c1)); - Expect.isTrue(c1_int.matches(42)); - Expect.isFalse(c1_int.matches("hello")); - - var c1_String = new C1(); - Expect.isTrue(c1_String is M); - Expect.isFalse(c1_String is M); - Expect.isTrue(c1_String is M); - Expect.isFalse(c1_String.matches(c1)); - Expect.isFalse(c1_String.matches(42)); - Expect.isTrue(c1_String.matches("hello")); - - var c2 = new C2(); - Expect.isTrue(c2 is M); - Expect.isTrue(c2 is M); - Expect.isFalse(c2 is M); - Expect.isFalse(c2.matches(c2)); - Expect.isTrue(c2.matches(42)); - Expect.isFalse(c2.matches("hello")); - - var c2_int = new C2(); - Expect.isTrue(c2_int is M); - Expect.isTrue(c2_int is M); - Expect.isFalse(c2_int is M); - Expect.isFalse(c2_int.matches(c2)); - Expect.isTrue(c2_int.matches(42)); - Expect.isFalse(c2_int.matches("hello")); - - var c2_String = new C2(); - Expect.isTrue(c2_String is M); - Expect.isTrue(c2_String is M); - Expect.isFalse(c2_String is M); - Expect.isFalse(c2_String.matches(c2)); - Expect.isTrue(c2_String.matches(42)); - Expect.isFalse(c2_String.matches("hello")); - - var c3 = new C3(); - Expect.isTrue(c3 is M); - Expect.isFalse(c3 is M); - Expect.isTrue(c3 is M); - Expect.isFalse(c3.matches(c2)); - Expect.isFalse(c3.matches(42)); - Expect.isTrue(c3.matches("hello")); -} diff --git a/tests/language_2/mixin/type_parameters_simple_test.dart b/tests/language_2/mixin/type_parameters_simple_test.dart deleted file mode 100644 index 81964ca5ca5..00000000000 --- a/tests/language_2/mixin/type_parameters_simple_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class S {} - -class M1 { - m1() => X; -} - -class M2 { - m2() => Y; -} - -class A extends S with M1, M2 {} - -main() { - var a = new A(); - // Getting "int" when calling toString() on the int type is not required. - // However, we want to keep the original names for the most common core types - // so we make sure to handle these specifically in the compiler. - Expect.equals("int", a.m1().toString()); - Expect.equals("int", a.m2().toString()); - var a2 = new A(); - Expect.equals("String", a2.m1().toString()); - Expect.equals("String", a2.m2().toString()); -} diff --git a/tests/language_2/mixin/type_parameters_super_extends_test.dart b/tests/language_2/mixin/type_parameters_super_extends_test.dart deleted file mode 100644 index 267489930ba..00000000000 --- a/tests/language_2/mixin/type_parameters_super_extends_test.dart +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class S { - bool matches(o) { - bool isChecked = checkUsingIs(o); - if (checkedMode) { - Expect.equals(isChecked, checkUsingCheckedMode(o)); - } - return isChecked; - } - - bool checkUsingIs(o) { - return o is T; - } - - bool checkUsingCheckedMode(o) { - try { - T x = o; - } on Error { - return false; - } - return true; - } - - static final bool checkedMode = computeCheckedMode(); - static bool computeCheckedMode() { - try { - int x = "foo" as dynamic; - } on Error { - return true; - } - return false; - } -} - -class M {} - -class C0 extends S with M {} - -class C1 extends S with M {} - -class C2 extends S with M {} - -class C3 extends S with M {} - -main() { - var c0 = new C0(); - Expect.isTrue(c0 is S); - Expect.isFalse(c0 is S); - Expect.isFalse(c0 is S); - Expect.isTrue(c0.matches(c0)); - Expect.isTrue(c0.matches(42)); - Expect.isTrue(c0.matches("hello")); - - var c0_int = new C0(); - Expect.isTrue(c0_int is S); - Expect.isFalse(c0_int is S); - Expect.isFalse(c0_int is S); - Expect.isTrue(c0_int.matches(c0)); - Expect.isTrue(c0_int.matches(42)); - Expect.isTrue(c0_int.matches("hello")); - - var c0_String = new C0(); - Expect.isTrue(c0_String is S); - Expect.isFalse(c0_String is S); - Expect.isFalse(c0_String is S); - Expect.isTrue(c0_String.matches(c0)); - Expect.isTrue(c0_String.matches(42)); - Expect.isTrue(c0_String.matches("hello")); - - var c1 = new C1(); - Expect.isTrue(c1 is S); - Expect.isFalse(c1 is S); - Expect.isFalse(c1 is S); - Expect.isTrue(c1.matches(c1)); - Expect.isTrue(c1.matches(42)); - Expect.isTrue(c1.matches("hello")); - - var c1_int = new C1(); - Expect.isTrue(c1_int is S); - Expect.isTrue(c1_int is S); - Expect.isFalse(c1_int is S); - Expect.isFalse(c1_int.matches(c1)); - Expect.isTrue(c1_int.matches(42)); - Expect.isFalse(c1_int.matches("hello")); - - var c1_String = new C1(); - Expect.isTrue(c1_String is S); - Expect.isFalse(c1_String is S); - Expect.isTrue(c1_String is S); - Expect.isFalse(c1_String.matches(c1)); - Expect.isFalse(c1_String.matches(42)); - Expect.isTrue(c1_String.matches("hello")); - - var c2 = new C2(); - Expect.isTrue(c2 is S); - Expect.isTrue(c2 is S); - Expect.isFalse(c2 is S); - Expect.isFalse(c2.matches(c2)); - Expect.isTrue(c2.matches(42)); - Expect.isFalse(c2.matches("hello")); - - var c2_int = new C2(); - Expect.isTrue(c2_int is S); - Expect.isTrue(c2_int is S); - Expect.isFalse(c2_int is S); - Expect.isFalse(c2_int.matches(c2)); - Expect.isTrue(c2_int.matches(42)); - Expect.isFalse(c2_int.matches("hello")); - - var c2_String = new C2(); - Expect.isTrue(c2_String is S); - Expect.isTrue(c2_String is S); - Expect.isFalse(c2_String is S); - Expect.isFalse(c2_String.matches(c2)); - Expect.isTrue(c2_String.matches(42)); - Expect.isFalse(c2_String.matches("hello")); - - var c3 = new C3(); - Expect.isTrue(c3 is S); - Expect.isFalse(c3 is S); - Expect.isTrue(c3 is S); - Expect.isFalse(c3.matches(c2)); - Expect.isFalse(c3.matches(42)); - Expect.isTrue(c3.matches("hello")); -} diff --git a/tests/language_2/mixin/type_parameters_super_test.dart b/tests/language_2/mixin/type_parameters_super_test.dart deleted file mode 100644 index ede714277bc..00000000000 --- a/tests/language_2/mixin/type_parameters_super_test.dart +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class S { - bool matches(o) => o is T; -} - -class M {} - -class C0 = S with M; -class C1 = S with M; -class C2 = S with M; -class C3 = S with M; - -main() { - var c0 = new C0(); - Expect.isTrue(c0 is S); - Expect.isFalse(c0 is S); - Expect.isFalse(c0 is S); - Expect.isTrue(c0.matches(c0)); - Expect.isTrue(c0.matches(42)); - Expect.isTrue(c0.matches("hello")); - - var c0_int = new C0(); - Expect.isTrue(c0_int is S); - Expect.isFalse(c0_int is S); - Expect.isFalse(c0_int is S); - Expect.isTrue(c0_int.matches(c0)); - Expect.isTrue(c0_int.matches(42)); - Expect.isTrue(c0_int.matches("hello")); - - var c0_String = new C0(); - Expect.isTrue(c0_String is S); - Expect.isFalse(c0_String is S); - Expect.isFalse(c0_String is S); - Expect.isTrue(c0_String.matches(c0)); - Expect.isTrue(c0_String.matches(42)); - Expect.isTrue(c0_String.matches("hello")); - - var c1 = new C1(); - Expect.isTrue(c1 is S); - Expect.isFalse(c1 is S); - Expect.isFalse(c1 is S); - Expect.isTrue(c1.matches(c1)); - Expect.isTrue(c1.matches(42)); - Expect.isTrue(c1.matches("hello")); - - var c1_int = new C1(); - Expect.isTrue(c1_int is S); - Expect.isTrue(c1_int is S); - Expect.isFalse(c1_int is S); - Expect.isFalse(c1_int.matches(c1)); - Expect.isTrue(c1_int.matches(42)); - Expect.isFalse(c1_int.matches("hello")); - - var c1_String = new C1(); - Expect.isTrue(c1_String is S); - Expect.isFalse(c1_String is S); - Expect.isTrue(c1_String is S); - Expect.isFalse(c1_String.matches(c1)); - Expect.isFalse(c1_String.matches(42)); - Expect.isTrue(c1_String.matches("hello")); - - var c2 = new C2(); - Expect.isTrue(c2 is S); - Expect.isTrue(c2 is S); - Expect.isFalse(c2 is S); - Expect.isFalse(c2.matches(c2)); - Expect.isTrue(c2.matches(42)); - Expect.isFalse(c2.matches("hello")); - - var c2_int = new C2(); - Expect.isTrue(c2_int is S); - Expect.isTrue(c2_int is S); - Expect.isFalse(c2_int is S); - Expect.isFalse(c2_int.matches(c2)); - Expect.isTrue(c2_int.matches(42)); - Expect.isFalse(c2_int.matches("hello")); - - var c2_String = new C2(); - Expect.isTrue(c2_String is S); - Expect.isTrue(c2_String is S); - Expect.isFalse(c2_String is S); - Expect.isFalse(c2_String.matches(c2)); - Expect.isTrue(c2_String.matches(42)); - Expect.isFalse(c2_String.matches("hello")); - - var c3 = new C3(); - Expect.isTrue(c3 is S); - Expect.isFalse(c3 is S); - Expect.isTrue(c3 is S); - Expect.isFalse(c3.matches(c2)); - Expect.isFalse(c3.matches(42)); - Expect.isTrue(c3.matches("hello")); -} diff --git a/tests/language_2/mixin/type_variable_test.dart b/tests/language_2/mixin/type_variable_test.dart deleted file mode 100644 index 65ef6beb5a8..00000000000 --- a/tests/language_2/mixin/type_variable_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2014, 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 - -// Regression test for generic mixin fields. - -class A { - T field; -} - -class B = Object with A; - -class C extends B {} //# 03: ok -class D extends B {} //# 04: ok - -class E = Object with A; - -class F extends E {} //# 06: ok - -class G extends Object with A {} //# 07: ok -class H extends Object with A {} //# 08: ok - -void main() { - new A(); //# 01: ok - new B(); //# 02: ok - new C(); //# 03: continued - new D(); //# 04: continued - new E(); //# 05: ok - new F(); //# 06: continued - new G(); //# 07: continued - new H(); //# 08: continued -} diff --git a/tests/language_2/mixin/typedef_constructor_test.dart b/tests/language_2/mixin/typedef_constructor_test.dart deleted file mode 100644 index e04daa5c30a..00000000000 --- a/tests/language_2/mixin/typedef_constructor_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A { - var field; - A(this.field); -} - -class Mixin { - var mixinField = 54; -} - -class MyClass = A with Mixin; - -main() { - var a = new MyClass(42); - Expect.equals(42, a.field); - Expect.equals(54, a.mixinField); -} diff --git a/tests/language_2/mixin/with_named_import_test.dart b/tests/language_2/mixin/with_named_import_test.dart deleted file mode 100644 index 962055519c8..00000000000 --- a/tests/language_2/mixin/with_named_import_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2017, 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 - -import 'dart:collection' as collection; - -class Foo extends Object with collection.ListMixin { - int get length => 0; - operator [](int index) => null; - void operator []=(int index, value) => null; - set length(int newLength) => null; -} - -main() { - new Foo(); -} diff --git a/tests/language_2/mixin/with_two_implicit_constructors_test.dart b/tests/language_2/mixin/with_two_implicit_constructors_test.dart deleted file mode 100644 index a772cb27159..00000000000 --- a/tests/language_2/mixin/with_two_implicit_constructors_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A { - var field; - A.bar() : field = 1; - A() : field = 2; -} - -class Mixin {} - -class B extends A with Mixin {} - -main() { - Expect.equals(2, new B().field); - new B.bar(); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR - // [cfe] Couldn't find constructor 'B.bar'. -} diff --git a/tests/language_2/mixin_constructor_forwarding/const_constructor_test.dart b/tests/language_2/mixin_constructor_forwarding/const_constructor_test.dart deleted file mode 100644 index 53e38c63311..00000000000 --- a/tests/language_2/mixin_constructor_forwarding/const_constructor_test.dart +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -abstract class Mixin { - // Declares no instance variable. - int get x; - int get m => x; -} - -class Base { - final int x; - - // Non-const constructors. - Base.c1(this.x); - Base.c2([this.x = 37]); - Base.c3({this.x = 37}); - - // Non-forwarding generative const constructors. - const Base.c4(this.x); - const Base.c5([this.x = 37]); - const Base.c6({this.x = 37}); - - // Forwarding generative const constructors. - const Base.c7(int x) : this.c4(x); - const Base.c8([int x = 87]) : this.c4(x); - const Base.c9({int x = 87}) : this.c4(x); - const Base.c10(int x) : this.c5(x); - const Base.c11([int x = 87]) : this.c5(x); - const Base.c12({int x = 87}) : this.c5(x); - const Base.c13(int x) : this.c6(x: x); - const Base.c14([int x = 87]) : this.c6(x: x); - const Base.c15({int x = 87}) : this.c6(x: x); - - // Non-generative constructor. - const factory Base() = Base.c5; -} - -class Application = Base with Mixin; - -main() { - Expect.equals(42, new Application.c1(42).m); - Expect.equals(42, new Application.c2(42).m); - Expect.equals(42, new Application.c3(x: 42).m); - Expect.equals(42, const Application.c4(42).m); - Expect.equals(42, const Application.c5(42).m); - Expect.equals(42, const Application.c6(x: 42).m); - Expect.equals(42, const Application.c7(42).m); - Expect.equals(42, const Application.c8(42).m); - Expect.equals(42, const Application.c9(x: 42).m); - Expect.equals(42, const Application.c10(42).m); - Expect.equals(42, const Application.c11(42).m); - Expect.equals(42, const Application.c12(x: 42).m); - Expect.equals(42, const Application.c13(42).m); - Expect.equals(42, const Application.c14(42).m); - Expect.equals(42, const Application.c15(x: 42).m); - - Expect.equals(37, new Application.c2().m); //# issue38304: ok - Expect.equals(37, new Application.c3().m); - Expect.equals(37, const Application.c5().m); //# issue38304: continued - Expect.equals(37, const Application.c6().m); - Expect.equals(87, const Application.c8().m); //# issue38304: continued - Expect.equals(87, const Application.c9().m); - Expect.equals(87, const Application.c11().m); //# issue38304: continued - Expect.equals(87, const Application.c12().m); - Expect.equals(87, const Application.c14().m); //# issue38304: continued - Expect.equals(87, const Application.c15().m); - - // Only make forwarders const if original constructor is const. - const Application.c1(0); //# 01: compile-time error - const Application.c2(0); //# 02: compile-time error - const Application.c3(x: 0); //# 03: compile-time error - - // Only insert forwarders for generative constructors. - new Application(); //# 04: compile-time error -} diff --git a/tests/language_2/mixin_constructor_forwarding/const_constructor_with_field_test.dart b/tests/language_2/mixin_constructor_forwarding/const_constructor_with_field_test.dart deleted file mode 100644 index a9dc56b9702..00000000000 --- a/tests/language_2/mixin_constructor_forwarding/const_constructor_with_field_test.dart +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -abstract class Mixin { - // Declares an instance variable. - // Declaration would be valid in a "const class", but mixin application - // won't get const constructor forwarders. - final int y = 0; - - int get x; - int get m => x; -} - -class Base { - final int x; - - // Non-const constructors. - Base.c1(this.x); - Base.c2([this.x = 37]); - Base.c3({this.x = 37}); - - // Non-forwarding generative const constructors. - const Base.c4(this.x); - const Base.c5([this.x = 37]); - const Base.c6({this.x = 37}); - - // Forwarding generative const constructors. - const Base.c7(int x) : this.c4(x); - const Base.c8([int x = 87]) : this.c4(x); - const Base.c9({int x = 87}) : this.c4(x); - const Base.c10(int x) : this.c5(x); - const Base.c11([int x = 87]) : this.c5(x); - const Base.c12({int x = 87}) : this.c5(x); - const Base.c13(int x) : this.c6(x: x); - const Base.c14([int x = 87]) : this.c6(x: x); - const Base.c15({int x = 87}) : this.c6(x: x); - - // Non-generative constructor. - const factory Base() = Base.c5; -} - -class Application = Base with Mixin; - -main() { - Expect.equals(42, new Application.c1(42).m); - Expect.equals(42, new Application.c2(42).m); - Expect.equals(42, new Application.c3(x: 42).m); - Expect.equals(42, new Application.c4(42).m); - Expect.equals(42, new Application.c5(42).m); - Expect.equals(42, new Application.c6(x: 42).m); - Expect.equals(42, new Application.c7(42).m); - Expect.equals(42, new Application.c8(42).m); - Expect.equals(42, new Application.c9(x: 42).m); - Expect.equals(42, new Application.c10(42).m); - Expect.equals(42, new Application.c11(42).m); - Expect.equals(42, new Application.c12(x: 42).m); - Expect.equals(42, new Application.c13(42).m); - Expect.equals(42, new Application.c14(42).m); - Expect.equals(42, new Application.c15(x: 42).m); - - Expect.equals(37, new Application.c2().m); //# issue38304: ok - Expect.equals(37, new Application.c3().m); - Expect.equals(37, new Application.c5().m); //# issue38304: continued - Expect.equals(37, new Application.c6().m); - Expect.equals(87, new Application.c8().m); //# issue38304: continued - Expect.equals(87, new Application.c9().m); - Expect.equals(87, new Application.c11().m); //# issue38304: continued - Expect.equals(87, new Application.c12().m); - Expect.equals(87, new Application.c14().m); //# issue38304: continued - Expect.equals(87, new Application.c15().m); - - // Don't make constructors const if mixin declares instance variable. - const Application.c4(42); //# 00: compile-time error - const Application.c5(42); //# 01: compile-time error - const Application.c6(x: 42); //# 02: compile-time error - const Application.c7(42); //# 03: compile-time error - const Application.c8(42); //# 04: compile-time error - const Application.c9(x: 42); //# 05: compile-time error - const Application.c10(42); //# 06: compile-time error - const Application.c11(42); //# 07: compile-time error - const Application.c12(x: 42); //# 08: compile-time error - const Application.c13(42); //# 09: compile-time error - const Application.c14(42); //# 10: compile-time error - const Application.c15(x: 42); //# 11: compile-time error - - // Only insert forwarders for generative constructors. - new Application(); //# 12: compile-time error -} diff --git a/tests/language_2/mixin_constructor_forwarding/mixin_constructor_parameter_forwarding_helper.dart b/tests/language_2/mixin_constructor_forwarding/mixin_constructor_parameter_forwarding_helper.dart deleted file mode 100644 index 73094d5704d..00000000000 --- a/tests/language_2/mixin_constructor_forwarding/mixin_constructor_parameter_forwarding_helper.dart +++ /dev/null @@ -1,25 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "mixin_constructor_parameter_forwarding_test.dart"; - -// A private class that the mixin application cannot access syntactically, -// yet it needs an instance of it for the default value. -class _Private { - const _Private(); -} - -class B2 implements B { - final T x; - final Object y; - const B2(T x, [Object y = const _Private()]) - : x = x, - y = y; -} - -// Leaking the constant value in a non-constant way which cannot be used -// for the default value of the mixin application. -Object get privateValue => const _Private(); diff --git a/tests/language_2/mixin_constructor_forwarding/mixin_constructor_parameter_forwarding_test.dart b/tests/language_2/mixin_constructor_forwarding/mixin_constructor_parameter_forwarding_test.dart deleted file mode 100644 index 00c923eaed2..00000000000 --- a/tests/language_2/mixin_constructor_forwarding/mixin_constructor_parameter_forwarding_test.dart +++ /dev/null @@ -1,79 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests that mixin application forwarding constructors correctly forward -// optional parameter default values. - -import "package:expect/expect.dart"; - -import "mixin_constructor_parameter_forwarding_helper.dart" - show B2, privateValue; - -class B { - final T x; - final Object y; - const B(T x, [Object y = 0]) - : x = x, - y = y; - const B.b1(T x, {Object y = 0}) - : x = x, - y = y; - const B.b2(T x, [Object y = const [0]]) - : x = x, - y = y; -} - -mixin M1 on B { - void check(int x, Object y) { - Expect.identical(x, this.x); - Expect.identical(y, this.y); - } -} - -mixin M2 on B { - void check(T x, Object y) { - Expect.identical(x, this.x); - Expect.identical(y, this.y); - } -} - -class A1 = B with M1; -class A2 = B with M2; -class P1 = B2 with M2; - -main() { - A1(1, 2).check(1, 2); - A1.b1(1, y: 2).check(1, 2); - A1.b2(1, 2).check(1, 2); - A2(1, 2).check(1, 2); - A2.b1(1, y: 2).check(1, 2); - A2.b2(1, 2).check(1, 2); - P1(1, 2).check(1, 2); - - A1(1).check(1, 0); - A1.b1(1).check(1, 0); - A1.b2(1).check(1, const [0]); - A2(1).check(1, 0); - A2.b1(1).check(1, 0); - A2.b2(1).check(1, const [0]); - P1(1).check(1, privateValue); - - const A1(1, 2).check(1, 2); - const A1.b1(1, y: 2).check(1, 2); - const A1.b2(1, 2).check(1, 2); - const A2(1, 2).check(1, 2); - const A2.b1(1, y: 2).check(1, 2); - const A2.b2(1, 2).check(1, 2); - const P1(1, 2).check(1, 2); - - const A1(1).check(1, 0); - const A1.b1(1).check(1, 0); - const A1.b2(1).check(1, const [0]); - const A2(1).check(1, 0); - const A2.b1(1).check(1, 0); - const A2.b2(1).check(1, const [0]); - const P1(1).check(1, privateValue); -} diff --git a/tests/language_2/mixin_constructor_forwarding/optional_named_parameters_test.dart b/tests/language_2/mixin_constructor_forwarding/optional_named_parameters_test.dart deleted file mode 100644 index 8b40cb7af26..00000000000 --- a/tests/language_2/mixin_constructor_forwarding/optional_named_parameters_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -abstract class Mixin { - int get x; - int get m => x; -} - -class Base { - final int x; - Base.c1(this.x); - Base.c2({this.x = 37}); - Base.c3(int x) : this.c1(x); - Base.c4({int x = 37}) : this.c1(x); - Base.c5(int x) : this.c2(x: x); - Base.c6({int x = 37}) : this.c2(x: x); - factory Base() = Base.c2; -} - -class Application = Base with Mixin; - -main() { - Expect.equals(42, new Application.c1(42).m); - Expect.equals(42, new Application.c2(x: 42).m); - Expect.equals(42, new Application.c3(42).m); - Expect.equals(42, new Application.c4(x: 42).m); - Expect.equals(42, new Application.c5(42).m); - Expect.equals(42, new Application.c6(x: 42).m); - Expect.equals(37, new Application.c2().m); - Expect.equals(37, new Application.c4().m); - Expect.equals(37, new Application.c6().m); - - // Only insert forwarders for generative constructors. - new Application(); //# 01: compile-time error -} diff --git a/tests/language_2/mixin_constructor_forwarding/optional_positional_parameters_test.dart b/tests/language_2/mixin_constructor_forwarding/optional_positional_parameters_test.dart deleted file mode 100644 index e5e1b4954b2..00000000000 --- a/tests/language_2/mixin_constructor_forwarding/optional_positional_parameters_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -abstract class Mixin { - int get x; - int get m => x; -} - -class Base { - final int x; - Base.c1(this.x); - Base.c2([this.x = 37]); - Base.c3(int x) : this.c1(x); - Base.c4([int x = 37]) : this.c1(x); - Base.c5(int x) : this.c2(x); - Base.c6([int x = 37]) : this.c2(x); - factory Base() = Base.c2; -} - -class Application = Base with Mixin; - -main() { - Expect.equals(42, new Application.c1(42).m); - Expect.equals(42, new Application.c2(42).m); - Expect.equals(42, new Application.c3(42).m); - Expect.equals(42, new Application.c4(42).m); - Expect.equals(42, new Application.c5(42).m); - Expect.equals(42, new Application.c6(42).m); - Expect.equals(37, new Application.c2().m); - Expect.equals(37, new Application.c4().m); - Expect.equals(37, new Application.c6().m); - - // Only insert forwarders for generative constructors. - new Application(); //# 01: compile-time error -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_factory_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_factory_test.dart deleted file mode 100644 index 9388a3b17b7..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_factory_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2018, 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 mixin declaration cannot declare any (factory) constructors. - -class A {} - -class B implements A { - const B(); -} - -mixin M on A { - factory M.foo() => null; //# 01: compile-time error - const factory M.bar() = B; //# 02: compile-time error - M.baz(); //# 03: compile-time error -} - -class MA extends A with M {} - -class N { - // It's OK for a mixin derived from a class to have factory constructors. - factory N.quux() => null; //# none: ok - N.bar(); //# 04: compile-time error -} - -class NA extends A with N {} - -main() { - new MA(); - new NA(); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_00_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_00_test.dart deleted file mode 100644 index 2ca0bcae55a..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_00_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -class I {} - -mixin M0 on I {} - -/////////////////////////////////////////////////////// -// Inference happens from superclasses to subclasses -/////////////////////////////////////////////////////// - -// Error since class hierarchy is inconsistent -class A00 extends I with M0 {} -// ^ -// [cfe] 'I with M0' can't implement both 'I' and 'I' -// [cfe] 'I' doesn't implement 'I' so it can't be used with 'M0'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE - -void main() {} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_01_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_01_test.dart deleted file mode 100644 index 794744cb6b8..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_01_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2018, 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 - -class I {} - -mixin M0 on I {} - -mixin M1 on I {} - -/////////////////////////////////////////////////////// -// Inference happens from superclasses to subclasses -/////////////////////////////////////////////////////// - -// Error since class hierarchy is inconsistent -class A00 extends I with M0, M1 {} -// ^ -// [cfe] 'I with M0, M1' can't implement both 'I' and 'I' -// [cfe] '_A00&I&M0' doesn't implement 'I' so it can't be used with 'M1'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE - -void main() {} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_02_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_02_test.dart deleted file mode 100644 index 5a91874d8a8..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_02_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2018, 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 - -class I {} - -mixin M0 implements I {} - -mixin M1 on I {} - -/////////////////////////////////////////////////////// -// Inference happens from superclasses to subclasses -/////////////////////////////////////////////////////// - -// Error since class hierarchy is inconsistent -class A00 with M0, M1 {} -// ^ -// [cfe] 'Object with M0, M1' can't implement both 'I' and 'I' -// [cfe] '_A00&Object&M0' doesn't implement 'I' so it can't be used with 'M1'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE - -void main() {} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_03_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_03_test.dart deleted file mode 100644 index 3da5db19348..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_03_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2018, 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 - -class I {} - -mixin M0 implements I {} - -////////////////////////////////////////////////////// -// Inference happens from superclasses to subclasses -/////////////////////////////////////////////////////// - -// Error since class hierarchy is inconsistent -class A00 extends Object with M0 implements I {} -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES -// [cfe] 'A00' can't implement both 'I' and 'I' - -void main() {} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_04_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_04_test.dart deleted file mode 100644 index 8b83d4a479c..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_04_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2018, 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 - -class I {} - -mixin M0 implements I {} - -////////////////////////////////////////////////////// -// Inference does not use implements constraints on mixin -/////////////////////////////////////////////////////// - -// Error since class hierarchy is inconsistent -class A00 with M0 implements I {} -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES -// [cfe] 'A00' can't implement both 'I' and 'I' - -void main() {} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_05_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_05_test.dart deleted file mode 100644 index 9e6ca94f790..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_05_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -class I {} - -mixin M0 implements I {} - -mixin M1 implements I {} - -////////////////////////////////////////////////////// -// Inference does not use implements constraints on mixin -/////////////////////////////////////////////////////// - -// Error since class hierarchy is inconsistent -class A00 extends I with M0, M1 {} -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES -// [cfe] 'I with M0, M1' can't implement both 'I' and 'I' - -void main() {} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_06_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_06_test.dart deleted file mode 100644 index e1e18418a65..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_06_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2018, 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 - -class I {} - -class J {} - -mixin M0 implements I, J {} - -mixin M1 implements I, J {} - -////////////////////////////////////////////////////// -// Inference does not use implements constraints on mixin -/////////////////////////////////////////////////////// - -class A00 extends I with M0 {} -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES -// [cfe] 'I with M0' can't implement both 'I' and 'I' - -class A01 extends J with M1 {} -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES -// [cfe] 'J with M1' can't implement both 'J' and 'J' - -// Error since class hierarchy is inconsistent -class A02 extends A00 implements A01 {} -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES -// [cfe] 'A02' can't implement both 'I' and 'I' -// [cfe] 'A02' can't implement both 'J' and 'J' - -void main() {} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_07_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_07_test.dart deleted file mode 100644 index fadea9d8d3f..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_07_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2018, 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 - -class I {} - -mixin M0> on I {} - -class M1 implements I {} - -////////////////////////////////////////////////////// -// Inference does not produce super-bounded types -/////////////////////////////////////////////////////// - -// M0 is inferred as M0> -// Error since super-bounded type not allowed -class A extends M1 with M0 {} -// ^^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS -// [cfe] Inferred type argument 'Comparable' doesn't conform to the bound 'Comparable' of the type variable 'Y' on 'M0'. - -void main() {} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_08_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_08_test.dart deleted file mode 100644 index e6d98491721..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_08_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2018, 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 - -class I {} - -mixin M0 implements I {} - -mixin M1 implements I {} - -////////////////////////////////////////////////////// -// Inference is not bi-directional -/////////////////////////////////////////////////////// - -// M0, M1 is a solution, but we shouldn't find it -// M0 inferred as M0 -// M1 inferred as M1 -class A with M0, M1 {} -// ^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES -// [cfe] 'Object with M0, M1' can't implement both 'I' and 'I' - -void main() {} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_09_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_09_test.dart deleted file mode 100644 index e589fb7e08b..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_09_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2018, 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 - -class I {} - -mixin M0 implements I> {} - -mixin M1 implements I, T> {} - -////////////////////////////////////////////////////// -// Inference does not produce infinite types -/////////////////////////////////////////////////////// - -// No solution, even with unification, since solution -// requires that I, U0> == I> -// for some U0, U1, and hence that: -// U0 = List -// U1 = List -// which has no finite solution -class A with M0, M1 {} -// ^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES -// [cfe] 'Object with M0, M1' can't implement both 'I>' and 'I, dynamic>' - -void main() {} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_10_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_10_test.dart deleted file mode 100644 index 9dc67535391..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_10_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2018, 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 - -class I {} - -class J {} - -mixin M0 implements I, J {} - -////////////////////////////////////////////////////// -// Over-constrained results are caught -/////////////////////////////////////////////////////// - -class A with I, J, M0 {} -// ^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES -// [cfe] 'Object with I, J, M0' can't implement both 'I' and 'I' -// [cfe] 'Object with I, J, M0' can't implement both 'J' and 'J' - -void main() {} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_11_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_11_test.dart deleted file mode 100644 index 90d66d35808..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_invalid_11_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2018, 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 - -class I {} - -mixin M1 on I {} - -////////////////////////////////////////////////////// -// Mixin type argument inference is not performed on -// the "on" clause of a mixin -/////////////////////////////////////////////////////// - -mixin A00Mixin on I, M1 {} -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES -// [cfe] 'I with M1' can't implement both 'I' and 'I' - -void main() {} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A00_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A00_test.dart deleted file mode 100644 index 4bbfab6c893..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A00_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M1 is inferred as M1 -class A00 extends I with M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -void main() { - Expect.type>(new A00()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A01_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A01_test.dart deleted file mode 100644 index f3f487d4f8d..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A01_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M1 is inferred as M1 -class A01 extends C0 with M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -void main() { - Expect.type>(new A01()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A02_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A02_test.dart deleted file mode 100644 index 828e4c61a3e..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A02_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M1 is inferred as M1 -class A02 extends C1 with M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -void main() { - Expect.type>(new A02()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A10_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A10_test.dart deleted file mode 100644 index 9ee967e97e4..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A10_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M1 is inferred as M1 -class A10 extends I with M3, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -void main() { - Expect.type>(new A10()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A11_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A11_test.dart deleted file mode 100644 index f3417a21eef..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A11_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M1 is inferred as M1 -class A11 extends C0 with M3, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -void main() { - Expect.type>(new A11()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A12_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A12_test.dart deleted file mode 100644 index aaf8a21998c..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A12_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M1 is inferred as M1 -class A12 extends C1 with M3, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -void main() { - Expect.type>(new A12()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A20_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A20_test.dart deleted file mode 100644 index d03358811bc..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A20_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M4 is inferred as M4 -class A20 extends C2 with M4 { - void check() { - // Verify that M4.S is exactly int - int Function(int) f0 = this.value0; - // Verify that M4.T is exactly double - double Function(double) f1 = this.value1; - } -} - -void main() { - Expect.type>(new A20()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A21_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A21_test.dart deleted file mode 100644 index e3d4e40960b..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A21_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M4 is inferred as M4 -class A21 extends C3 with M2, M4 { - void check() { - // Verify that M4.S is exactly int - int Function(int) f0 = this.value0; - // Verify that M4.T is exactly double - double Function(double) f1 = this.value1; - } -} - -void main() { - Expect.type>(new A21()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A22_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A22_test.dart deleted file mode 100644 index a543c73c563..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A22_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M4 is inferred as M4 -class A22 extends C2 with M1, M4 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - // Verify that M4.S is exactly int - int Function(int) f0 = this.value0; - // Verify that M4.T is exactly double - double Function(double) f1 = this.value1; - } -} - -void main() { - Expect.type>(new A22()..check()); - Expect.type>(new A22()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A23_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A23_test.dart deleted file mode 100644 index 1bd13eeea1d..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A23_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -mixin _M5 on I implements J {} - -// Inference here puts J in the superclass hierarchy -class _A23 extends C0 with _M5 {} - -// Inference here should get J for M4.T -// if inference for _M5 is done first (correctly) -// and otherwise J -class A23 extends _A23 with M4 { - void check() { - // Verify that M4.S is exactly int - int Function(int) f0 = this.value0; - // Verify that M4.T is exactly int - int Function(int) f1 = this.value1; - } -} - -void main() { - Expect.type>(new A23()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A30_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A30_test.dart deleted file mode 100644 index 48027c91d0f..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A30_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -mixin M5 on I { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M5 is inferred as M5 -class A30 extends C0 with M5 { - void check() { - // Verify that M5.S is exactly int - int Function(int) f0 = this.value0; - // Verify that M5.T is exactly String - String Function(String) f1 = this.value1; - } -} - -void main() { - Expect.type>(new A30()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A31_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A31_test.dart deleted file mode 100644 index 88dfa7e2537..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A31_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -mixin M6 on I { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M6 is inferred as M6 -class A31 extends C0 with M6 { - void check() { - // Verify that M6.S is exactly int - int Function(int) f0 = this.value0; - // Verify that M6.T is exactly int - int Function(int) f1 = this.value1; - } -} - -void main() { - Expect.type>(new A31()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A42_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A42_test.dart deleted file mode 100644 index 30e4c4ab62d..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_A42_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -mixin M7 on I> { - T Function(T) get value0 => null; -} - -class A40 extends I> {} - -class A41 extends A40> {} - -// M7 is inferred as M7> -class A42 extends A41 with M7 { - void check() { - // Verify that M7.T is exactly Map - Map Function(Map) f1 = this.value0; - } -} - -void main() { - Expect.type>>(new A42()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B00_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B00_test.dart deleted file mode 100644 index 13d41f7546e..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B00_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M1 is inferred as M1 -class B00 extends Object with I, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -void main() { - Expect.type>(new B00()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B01_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B01_test.dart deleted file mode 100644 index b75bc8507d5..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B01_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M1 is inferred as M1 -class B01 extends Object with C1, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -void main() { - Expect.type>(new B01()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B02_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B02_test.dart deleted file mode 100644 index c7d7f1ef2c0..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B02_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M1 is inferred as M1 -class B02 extends I with M0, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -void main() { - Expect.type>(new B02()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B03_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B03_test.dart deleted file mode 100644 index 02bce346461..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B03_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M1 is inferred as M1 -class B03 extends Object with M2, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -void main() { - Expect.type>(new B03()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B10_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B10_test.dart deleted file mode 100644 index 15c356421ad..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B10_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M1 is inferred as M1 -class B10 extends Object with I, M3, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -void main() { - Expect.type>(new B10()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B11_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B11_test.dart deleted file mode 100644 index d7592d79cd3..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B11_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M1 is inferred as M1 -class B11 extends Object with C1, M3, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -void main() { - Expect.type>(new B11()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B12_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B12_test.dart deleted file mode 100644 index 2cd0960cb58..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B12_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M1 is inferred as M1 -class B12 extends I with M0, M3, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -void main() { - Expect.type>(new B12()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B13_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B13_test.dart deleted file mode 100644 index a3254218fb8..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_B13_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M1 is inferred as M1 -class B13 extends Object with M2, M3, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -void main() { - Expect.type>(new B13()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C00_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C00_test.dart deleted file mode 100644 index 2f5bc276dc9..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C00_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M1 is inferred as M1 -class C00 with I, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -void main() { - Expect.type>(new C00()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C01_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C01_test.dart deleted file mode 100644 index 922530c8e3a..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C01_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M1 is inferred as M1 -class C01 with C1, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -void main() { - Expect.type>(new C01()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C02_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C02_test.dart deleted file mode 100644 index 0f7b8897d59..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C02_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M1 is inferred as M1 -class C02 with I, M0, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -void main() { - Expect.type>(new C02()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C03_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C03_test.dart deleted file mode 100644 index 8f1d4b76752..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C03_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M1 is inferred as M1 -class C03 with M2, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -void main() { - Expect.type>(new C03()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C10_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C10_test.dart deleted file mode 100644 index 1672941569c..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C10_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M1 is inferred as M1 -class C10 with I, M3, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -void main() { - Expect.type>(new C10()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C11_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C11_test.dart deleted file mode 100644 index ee45f72c4f8..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C11_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M1 is inferred as M1 -class C11 with C1, M3, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -void main() { - Expect.type>(new C11()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C12_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C12_test.dart deleted file mode 100644 index 5af11e5f7b2..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C12_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M1 is inferred as M1 -class C12 with I, M0, M3, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -void main() { - Expect.type>(new C12()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C13_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C13_test.dart deleted file mode 100644 index 1343291639e..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_C13_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -// M1 is inferred as M1 -class C13 with M2, M3, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -void main() { - Expect.type>(new C13()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_mixin_applications_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_mixin_applications_test.dart deleted file mode 100644 index 1a9d410bca8..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_inference_valid_mixin_applications_test.dart +++ /dev/null @@ -1,448 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -/////////////////////////////////////////////////////// -// Tests for inference of type arguments to mixins in -// class definition mixin applications of the form -// `class Foo = A with M` -/////////////////////////////////////////////////////// - -class I {} - -class C0 extends I {} -class C1 implements I {} - -mixin M0 on I { -} - -mixin M1 on I { - T Function(T) get value => null; -} - -mixin M2 implements I {} - -mixin M3 on I {} - -class J {} -class C2 extends C1 implements J {} -class C3 extends J {} - -mixin M4 on I, J { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -/////////////////////////////////////////////////////// -// Inference of a single mixin from a super class works -/////////////////////////////////////////////////////// - -mixin A00Mixin on M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -// M1 is inferred as M1 -class A00 = I with M1, A00Mixin; - -mixin A01Mixin on M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -// M1 is inferred as M1 -class A01 = C0 with M1, A01Mixin; - -mixin A02Mixin on M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -// M1 is inferred as M1 -class A02 = C1 with M1, A02Mixin; - -/////////////////////////////////////////////////////// -// Inference of a single mixin from another mixin works -/////////////////////////////////////////////////////// - -mixin B00Mixin on M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -// M1 is inferred as M1 -class B00 = Object with I, M1, B00Mixin; - -mixin B01Mixin on M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -// M1 is inferred as M1 -class B01 = Object with C1, M1, B01Mixin; - -mixin B02Mixin on M0, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -// M1 is inferred as M1 -class B02 = I with M0, M1, B02Mixin; - -mixin B03Mixin on M2, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -// M1 is inferred as M1 -class B03 = Object with M2, M1, B03Mixin; - -/////////////////////////////////////////////////////// -// Inference of a single mixin from another mixin works -// with the shorthand syntax -/////////////////////////////////////////////////////// - -mixin C00Mixin on M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -// M1 is inferred as M1 -class C00 = Object with I, M1, C00Mixin; - -mixin C01Mixin on C1, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -// M1 is inferred as M1 -class C01 = Object with C1, M1, C01Mixin; - -mixin C02Mixin on M0, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -// M1 is inferred as M1 -class C02 = Object with I, M0, M1, C02Mixin; - -mixin C03Mixin on M2, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -// M1 is inferred as M1 -class C03 = Object with M2, M1, C03Mixin; - -/////////////////////////////////////////////////////// -// Inference of two mixins from a super class works -/////////////////////////////////////////////////////// - -mixin A10Mixin on M3, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -// M1 is inferred as M1 -class A10 = I with M3, M1, A10Mixin; - -mixin A11Mixin on C0, M3, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -// M1 is inferred as M1 -class A11 = C0 with M3, M1, A11Mixin; - -mixin A12Mixin on C1, M3, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -// M1 is inferred as M1 -class A12 = C1 with M3, M1, A12Mixin; - -/////////////////////////////////////////////////////// -// Inference of two mixins from another mixin works -/////////////////////////////////////////////////////// - -mixin B10Mixin on I, M3, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -// M1 is inferred as M1 -class B10 = Object with I, M3, M1, B10Mixin; - -mixin B11Mixin on C1, M3, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -// M1 is inferred as M1 -class B11 = Object with C1, M3, M1, B11Mixin; - -mixin B12Mixin on I, M0, M3, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -// M1 is inferred as M1 -class B12 = I with M0, M3, M1, B12Mixin; - -mixin B13Mixin on M2, M3, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -// M1 is inferred as M1 -class B13 = Object with M2, M3, M1, B13Mixin; - -/////////////////////////////////////////////////////// -// Inference of a single mixin from another mixin works -// with the shorthand syntax -/////////////////////////////////////////////////////// - -mixin C10Mixin on I, M3, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -// M1 is inferred as M1 -class C10 = Object with I, M3, M1, C10Mixin; - -mixin C11Mixin on C1, M3, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -// M1 is inferred as M1 -class C11 = Object with C1, M3, M1, C11Mixin; - -mixin C12Mixin on I, M0, M3, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -// M1 is inferred as M1 -class C12 = Object with I, M0, M3, M1, C12Mixin; - -mixin C13Mixin on M2, M3, M1 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - } -} - -// M1 is inferred as M1 -class C13 = Object with M2, M3, M1, C13Mixin; - - -/////////////////////////////////////////////////////// -// Inference from multiple constraints works -/////////////////////////////////////////////////////// - - -mixin A20Mixin on C2, M4 { - void check() { - // Verify that M4.S is exactly int - int Function(int) f0 = this.value0; - // Verify that M4.T is exactly double - double Function(double) f1 = this.value1; - } -} - -// M4 is inferred as M4 -class A20 = C2 with M4, A20Mixin; - -mixin A21Mixin on C3, M2, M4 { - void check() { - // Verify that M4.S is exactly int - int Function(int) f0 = this.value0; - // Verify that M4.T is exactly double - double Function(double) f1 = this.value1; - } -} - -// M4 is inferred as M4 -class A21 = C3 with M2, M4, A21Mixin; - -mixin A22Mixin on C2, M1, M4 { - void check() { - // Verify that M1.T is exactly int - int Function(int) f = this.value; - // Verify that M4.S is exactly int - int Function(int) f0 = this.value0; - // Verify that M4.T is exactly double - double Function(double) f1 = this.value1; - } -} - -// M4 is inferred as M4 -class A22 = C2 with M1, M4, A22Mixin; - -mixin _M5 on I implements J {} - -// Inference here puts J in the superclass hierarchy -class _A23 extends C0 with _M5 {} - -mixin A23Mixin on _A23, M4 { - void check() { - // Verify that M4.S is exactly int - int Function(int) f0 = this.value0; - // Verify that M4.T is exactly int - int Function(int) f1 = this.value1; - } -} - -// Inference here should get J for M4.T -// if inference for _A23 is done first (correctly) -// and otherwise J -class A23 = _A23 with M4, A23Mixin; - -/////////////////////////////////////////////////////// -// Unconstrained parameters go to bounds -/////////////////////////////////////////////////////// - -mixin M5 on I { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -mixin M6 on I { - S Function(S) get value0 => null; - T Function(T) get value1 => null; -} - -mixin A30Mixin on C0, M5 { - void check() { - // Verify that M5.S is exactly int - int Function(int) f0 = this.value0; - // Verify that M5.T is exactly String - String Function(String) f1 = this.value1; - } -} - -// M5 is inferred as M5 -class A30 = C0 with M5, A30Mixin; - -mixin A31Mixin on C0, M6 { - void check() { - // Verify that M6.S is exactly int - int Function(int) f0 = this.value0; - // Verify that M6.T is exactly int - int Function(int) f1 = this.value1; - } -} - -// M6 is inferred as M6 -class A31 = C0 with M6, A31Mixin; - -/////////////////////////////////////////////////////// -// Non-trivial constraints should work -/////////////////////////////////////////////////////// - -mixin M7 on I> { - T Function(T) get value0 => null; -} - -class A40 extends I> {} - -class A41 extends A40> {} - -mixin A42Mixin on A41, M7> { - void check() { - // Verify that M7.T is exactly Map - Map Function(Map) f1 = this.value0; - } -} - -// M7 is inferred as M7> -class A42 = A41 with M7, A42Mixin; - -void main() { - Expect.type>(new A00()..check()); - Expect.type>(new A01()..check()); - Expect.type>(new A02()..check()); - - Expect.type>(new B00()..check()); - Expect.type>(new B01()..check()); - Expect.type>(new B02()..check()); - Expect.type>(new B03()..check()); - - Expect.type>(new C00()..check()); - Expect.type>(new C01()..check()); - Expect.type>(new C02()..check()); - Expect.type>(new C03()..check()); - - Expect.type>(new A10()..check()); - Expect.type>(new A11()..check()); - Expect.type>(new A12()..check()); - - Expect.type>(new B10()..check()); - Expect.type>(new B11()..check()); - Expect.type>(new B12()..check()); - Expect.type>(new B13()..check()); - - Expect.type>(new C10()..check()); - Expect.type>(new C11()..check()); - Expect.type>(new C12()..check()); - Expect.type>(new C13()..check()); - - Expect.type>(new A20()..check()); - Expect.type>(new A21()..check()); - Expect.type>(new A22()..check()); - Expect.type>(new A22()..check()); - Expect.type>(new A23()..check()); - - Expect.type>(new A30()..check()); - Expect.type>(new A31()..check()); - - Expect.type>>(new A42()..check()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_invalid_application_supertype_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_invalid_application_supertype_test.dart deleted file mode 100644 index be90fa8e591..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_invalid_application_supertype_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// Test various invalid mixin applications where the supertype doesn't -// implement the super-interfaces. - -abstract class UnaryNum { - num foo(num x) => x; -} - -abstract class UnaryInt { - num foo(int x) => x; -} - -mixin M1 on UnaryNum {} - -class _ = Object with M1; //# 01: compile-time error -class _ = Null with M1; //# 02: compile-time error -class _ = UnaryInt with M1; //# 03: compile-time error - -mixin M2 on UnaryNum, UnaryInt {} - -class _ = UnaryInt with M2; //# 04: compile-time error -class _ = UnaryNum with M2; //# 05: compile-time error - -// Note that it is not sufficient for the application to declare that it -// implements the super-interface. -abstract class _ = Object with M1 implements UnaryNum; //# 06: compile-time error - -// Nor is it sufficient, in the case of an anonymous mixin application, for the -// containing class to declare that it implements the super-interface. -abstract class _ extends Object with M1 implements UnaryNum {} //# 07: compile-time error - -main() { - // M1 and M2 are valid types. - Expect.notType(null); - Expect.notType(null); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_invalid_override_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_invalid_override_test.dart deleted file mode 100644 index 64dad10d133..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_invalid_override_test.dart +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// Test various invalid super-constraints for mixin declarations. - -abstract class UnaryNum { - num foo(num x); -} - -// Overrides must still be valid, wrt. signatures and types. - -mixin M3 on UnaryNum { - // M3.foo is a valid override of UnaryNum.foo - num foo(num x) => super.foo(x) * 2; -} - -// Invalid signature override (overriding optional parameter with required). -class C3 implements UnaryNum { - // C3.foo is a valid override of UnaryNum.foo - num foo([num x]) => x ?? 17; -} -// M3.foo is not a valid override for C3.foo. -class A3 extends C3 // - with M3 //# 06: compile-time error -{} - -// Invalid type override (overriding `int` return with `num` return). -class C4 implements UnaryNum { - // C4.foo is a valid override of UnaryNum.foo - int foo(num x) => x.toInt(); -} -// M3.foo is not a valid override for C4.foo. -class A4 extends C4 // - with M3 //# 07: compile-time error -{} - -// It's not required to have an implementation of members which are not super- -// invoked, if the application class is abstract. -abstract class C5 { - num foo(num x); - num bar(num x); -} -mixin M5 on C5 { - num baz(num x) => super.foo(x); -} -abstract class C5Foo implements C5 { - num foo(num x) => x; -} -abstract class C5Bar implements C5 { - num bar(num x) => x; -} - -// Valid abstract class, super-invocation of foo hits implementation, -// even if bar is still abstract. -abstract class A5Foo = C5Foo with M5; -// Invalid since super-invocation of foo does not hit concrete implementation. -abstract class _ = C5Bar with M5; //# 08: compile-time error - -class A5FooConcrete = A5Foo with C5Bar; - -main() { - Expect.equals(42, A5FooConcrete().baz(42)); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_invalid_superinvocation_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_invalid_superinvocation_test.dart deleted file mode 100644 index 8926165a56b..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_invalid_superinvocation_test.dart +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test various invalid super-invocations for mixin declarations. - -abstract class UnaryInt { - num foo(int x); -} - -abstract class UnaryNum { - num foo(num x); -} - -abstract class UnaryOptionalNum { - num foo([num x]); -} - -// Mixins may contain super-invocations. -// The super-invocation must be valid against the combined super-interfaces -// (i.e., valid against the most specific of them for that method). - -mixin M1 on UnaryNum { - void bar() { - super.foo(); //# 01: compile-time error - super.foo(1, 2); //# 02: compile-time error - super.foo("not num"); //# 03: compile-time error - super.bar; //# 04: compile-time error - super + 2; //# 05: compile-time error - } -} - -mixin M2 on UnaryNum, UnaryInt { - void bar() { - super.foo(4.2); // Allows most specific type. - super.foo(1, 2); //# 06: compile-time error - super.foo("not num"); //# 07: compile-time error - } -} - -mixin M3 on UnaryNum, UnaryOptionalNum { - void bar() { - super.foo(4.2); - super.foo(); //# 10: ok - super.foo(1, 2); //# 08: compile-time error - super.foo("not num"); //# 09: compile-time error - } -} - -class C1 implements UnaryNum, UnaryInt, UnaryOptionalNum { - num foo([num x]) => x ?? 37.0; -} - -class A1 = C1 with M1; -class A2 = C1 with M2; -class A3 = C1 with M3; -main() { - A1().bar(); - A2().bar(); - A3().bar(); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_invalid_syntax_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_invalid_syntax_test.dart deleted file mode 100644 index eb14237c581..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_invalid_syntax_test.dart +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// Test various invalid syntax combinations. - -// You cannot prefix "mixin" with anything. -abstract //# 01: compile-time error -static //# 02: compile-time error -const //# 03: compile-time error -mixin M0 {} - -// Cannot use "extends". -mixin M1 // - extends A //# 04: compile-time error -{} - -// On-clause must be before implements clause. -mixin M2 - implements B //# 05: compile-time error - on A -{} - -// Cannot use "on" on class declarations. -class C0 // - on A //# 06: compile-time error -{} - -// Type parameters must not be empty. -mixin M3 // - <> //# 07: compile-time error -{} - -// Super-class restrictions and implements must be well-formed. -mixin M4 on List - //# 08: compile-time error -{} -mixin M5 implements List - //# 09: compile-time error -{} - -mixin M6 { - // Mixins cannot have constructors (or members with same name as mixin). - factory M6() {} //# 10: compile-time error - M6() {} //# 11: compile-time error - M6.foo(); //# 12: compile-time error - get M6 => 42; //# 13: compile-time error -} - -// Cannot declare local mixins. -class C { - static mixin M {}; //# 14: compile-time error - mixin M {} //# 15: compile-time error -} - -// Just to have some types. -class A {} -class B {} - -main() { - new C(); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_invalid_type_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_invalid_type_test.dart deleted file mode 100644 index 219555a3a0e..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_invalid_type_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// Test various invalid type-declaration combinations. - -// Types must be class types. -mixin M on void {} //# 01: compile-time error -mixin M on double {} //# 02: compile-time error -mixin M on FutureOr {} //# 03: compile-time error -mixin M on FunType {} //# 04: compile-time error - -mixin M implements void {} //# 05: compile-time error -mixin M implements double {} //# 06: compile-time error -mixin M implements FutureOr {} //# 07: compile-time error -mixin M implements FunType {} //# 08: compile-time error - -// Types must be extensible. -mixin M on bool {} //# 09: compile-time error -mixin M on num {} //# 10: compile-time error -mixin M on int {} //# 11: compile-time error -mixin M on double {} //# 12: compile-time error -mixin M on Null {} //# 13: compile-time error -mixin M on String {} //# 14: compile-time error -mixin M implements bool {} //# 15: compile-time error -mixin M implements num {} //# 16: compile-time error -mixin M implements int {} //# 17: compile-time error -mixin M implements double {} //# 18: compile-time error -mixin M implements Null {} //# 19: compile-time error -mixin M implements String {} //# 20: compile-time error - -// Mixin type cannot depend on itself -mixin M on M {} //# 21: compile-time error -mixin M implements M {} //# 22: compile-time error - -// Types must exist and be valid -mixin M on Undeclared {} //# 23: compile-time error -mixin M on A {} //# 24: compile-time error -mixin M implements Undeclared {} //# 25: compile-time error -mixin M implements A {} //# 26: compile-time error - -main() {} - -// Just to have some types. -class A {} -class B {} -typedef FuntType = int Function(int); diff --git a/tests/language_2/mixin_declaration/mixin_declaration_invalid_usage_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_invalid_usage_test.dart deleted file mode 100644 index cc41d723608..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_invalid_usage_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2018, 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 - -mixin Mixin // cannot `extend` anything. - extends M //# 01: compile-time error - extends Object //# 02: compile-time error -{} - -// You cannot extend a mixin. -class Class // cannot extend a mixin - extends Mixin //# 03: compile-time error -{} - -void main() { - // Cannot instantiate a mixin. - new Mixin(); //# 04: compile-time error - new Class(); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_nsm_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_nsm_test.dart deleted file mode 100644 index c65688a9503..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_nsm_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -abstract class Bar { - String bar(); -} - -abstract class Foo { - String foo(); -} - -mixin M implements Bar { - dynamic noSuchMethod(i) => "M:${i.memberName == #foo ? "foo" : "bar"}"; -} - -abstract class C { - dynamic noSuchMethod(i) => "C:${i.memberName == #foo ? "foo" : "bar"}"; -} - -abstract class D { - String foo() => "D:foo"; - String bar() => "D:bar"; -} - -class A1 extends Foo with M {} -class A2 extends C with M implements Foo {} -class A3 extends D with M implements Foo {} - -main() { - Expect.equals("M:foo", A1().foo()); - Expect.equals("M:bar", A1().bar()); - Expect.equals("M:foo", A2().foo()); - Expect.equals("M:bar", A2().bar()); - Expect.equals("D:foo", A3().foo()); - Expect.equals("D:bar", A3().bar()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_on_keyword_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_on_keyword_test.dart deleted file mode 100644 index 6d22a067c21..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_on_keyword_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// The `on` word is not a reserved word or built-in identifier. -// It's a purely contextual keyword. -// A type can have the name `on`, and even a mixin. - -class A {} - -mixin on on A {} - -mixin M on on {} - -mixin M2 implements on {} - -class B = A with on; -class C = B with M; -class D = Object with M2; - -main() { - Expect.type(B()); - Expect.type(C()); - Expect.type(D()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_static_scope_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_static_scope_test.dart deleted file mode 100644 index a5bfdb8254b..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_static_scope_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// A mixin declaration introduces a static scope. -// Instance members keep seeing this scope when mixed in. - -abstract class UnaryNum { - num foo(num x); -} - -mixin M1 on UnaryNum { - static int counter = 0; - static int next() => ++counter; - int count() => foo(next()); -} - -class C1 implements UnaryNum { - static int counter = 87; - static int next() => 42; - num foo(num x) => x * 10; -} - -class A1 = C1 with M1; - -main() { - Expect.equals(0, M1.counter); - Expect.equals(1, M1.next()); - Expect.equals(2, M1.next()); - var a = A1(); - Expect.equals(30, a.count()); - Expect.equals(40, a.count()); - Expect.equals(5, M1.next()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_subtype_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_subtype_test.dart deleted file mode 100644 index 94ebca65f0b..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_subtype_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// A mixin declaration introduces a type. - -// A mixin with multiple super-types and implemented types. -class A {} -class B {} -class I {} -class J {} - -mixin M on A, B implements I, J {} - -class C implements A, B {} - -class D = C with M; - -// Same, with generics. -class GA {} -class GB {} -class GI {} -class GJ {} - -mixin GM on GA, GB> implements GI>, GJ> {} - -class GC implements GA, GB> {} - -class GD = GC with GM; - -main() { - Expect.subtype(); - Expect.subtype(); - Expect.subtype(); - Expect.subtype(); - Expect.subtype(); - Expect.subtype(); - Expect.notSubtype(); - Expect.notSubtype(); - - Expect.subtype, GA>(); - Expect.subtype, GB>>(); - Expect.subtype, GI>>(); - Expect.subtype, GJ>>(); - Expect.subtype, GM>(); - Expect.subtype, GC>(); - Expect.notSubtype, GC>(); - Expect.notSubtype, GM>(); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_superinvocation_application_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_superinvocation_application_test.dart deleted file mode 100644 index b4665a06dab..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_superinvocation_application_test.dart +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test various invalid mixin applications due to insufficient super-invoked -// methods. - -abstract class UnaryNum { - num foo(num x); -} - -abstract class UnaryOptionalNum { - num foo([num x]); -} - -// When a mixin is applied, the super-invoked methods must have -// a concrete implementation in the superclass which satisfies -// the signature in the super-interfaces. - -mixin M1 on UnaryNum { - num bar() { - return super.foo(42.0); - } -} - -mixin M11 on UnaryNum { - num bar() { - return 0.0; - } - num foo(num x) { - return super.foo(42.0); - } -} - -// The super-invoked method must be non-abstract. -class A1 extends UnaryNum // - with M1 //# 04: compile-time error - with M11 //# 05: compile-time error - with M1, M11 //# 06: compile-time error - with M11, M1 //# 07: compile-time error -{ - // M1.bar does super.foo and UnaryNum has no implementation. - num foo(num x) => x; -} - -// The super-invoked method must satisfy the most specific signature -// among super-interfaces of the mixin. -class C1 { - num foo(num x) => x; -} - -abstract class C2 extends C1 implements UnaryOptionalNum { - num foo([num x]); -} - -mixin M2 on UnaryOptionalNum { - num bar() { - // Allowed, super.foo has signature num Function([num]). - return super.foo(42.0); - } -} - -class A2 extends C2 // - with M2 //# 08: compile-time error -{ - // M2.bar does a super.foo, so C2.foo must satisfy the super-interface of M2. - // It doesn't, even if the super-call would succeed against C1.foo. - num foo([num x]) => x ?? 0; -} - -main() { - A1().bar(); //# 04: continued - A1().bar(); //# 05: continued - A1().bar(); //# 06: continued - A1().bar(); //# 07: continued - A2().bar(); //# 08: continued -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_supertype_compatible_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_supertype_compatible_test.dart deleted file mode 100644 index 6aa894f9323..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_supertype_compatible_test.dart +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// Test various invalid super-constraints for mixin declarations. - -abstract class BinaryNumInt { - num foo(num x, int y); -} - -abstract class BinaryIntNum { - num foo(int x, num y); -} - -abstract class GetterNumNum { - num Function(num) get foo; -} - -abstract class GetterIntInt { - int Function(int) get foo; -} - -abstract class UnaryInt { - num foo(int x); -} - -abstract class UnaryNum { - num foo(num x); -} - -abstract class UnaryString { - num foo(String x); -} - -// The super-interfaces must be *compatible*. -// Any member declared by more than one super-interface must have at -// least one most-specific signature among the super-interfaces. - -// Incompatible member kinds, one is a getter, the other a method. -mixin _ on UnaryNum, GetterNumNum {} //# 01: compile-time error - -// Incompatible signature structure, unary vs binary. -mixin _ on UnaryNum, BinaryNumInt {} //# 02: compile-time error - -// Incompatible method parameter type, neither is more specific. -mixin _ on UnaryNum, UnaryString {} //# 03: compile-time error - -// Compatible types for each parameter, but still no most specific signature. -mixin _ on BinaryNumInt, BinaryIntNum {} //# 04: compile-time error - -// Incompatible return type for getter. -mixin _ on GetterNumNum, GetterIntInt {} //# 05: compile-time error - - -// Mixin is valid when one signature is more specific. -mixin M1 on UnaryNum, UnaryInt { - // May call the method in a super-invocation, at the most specific type. - num bar() { - return super.foo(42.0); - } -} - -class C1 implements UnaryNum, UnaryInt { - num foo(num x) => x; -} - -class A1 = C1 with M1; - -main() { - Expect.equals(42.0, A1().bar()); -} diff --git a/tests/language_2/mixin_declaration/mixin_declaration_syntax_test.dart b/tests/language_2/mixin_declaration/mixin_declaration_syntax_test.dart deleted file mode 100644 index 41ce938ba9f..00000000000 --- a/tests/language_2/mixin_declaration/mixin_declaration_syntax_test.dart +++ /dev/null @@ -1,422 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -// Test various combinations of valid mixin declarations. - -// Class unrelated to everything else here, just Object with a toString. -class O { - String toString() => "O"; -} - -abstract class A { - String toString() => "A"; - String methodA() => "A:${this}.A"; -} - -class B implements A { - String toString() => "B"; - String methodA() => "B:${this}.A"; - String methodB() => "B:${this}.B"; -} - -class C extends A { - String toString() => "C"; - String methodA() => "C:${this}.A->${super.methodA()}"; - String methodC() => "C:${this}.C"; -} - -class AIJ implements A, I, J { - String toString() => "AIJ"; - String methodA() => "AIJ:${this}.A"; - String methodI() => "AIJ:${this}.I"; - String methodJ() => "AIJ:${this}.J"; -} - -class BC extends C implements B { - String toString() => "BC"; - String methodA() => "BC:${this}.A->${super.methodA()}"; - String methodB() => "BC:${this}.B"; - String methodC() => "BC:${this}.C->${super.methodC()}"; -} - -// Interfaces. -abstract class I { - String methodI(); -} -abstract class J { - String methodJ(); -} - -// Simple mixin with no super-invocations, no super restrictions -// and no interfaces implemented. -mixin M { - String toString() => "?&M"; - String methodM() => "M:${this}.M"; -} - - -// Mixin which uses the implicit "on Object" to do a super-invocation. -mixin MO { - String toString() => "${super.toString()}&MO"; - String methodMO() => "MO:${this}.MO"; -} - - -// Mixin with "implements" clause. -mixin MOiIJ implements I, J { - String toString() => "${super.toString()}&MOiIJ"; - String methodMOiIJ() => "MOiIJ:${this}.MOiIJ"; - String methodI() => "MOiIJ:${this}.I"; - String methodJ() => "MOiIJ:${this}.J"; -} - - -// Mixin with single non-Object super-constraint. -mixin MA on A { - String toString() => "${super.toString()}&MA"; - String methodMA() => "MA:${this}.MA"; - String methodA() => "MA:${this}.A->${super.methodA()}"; -} - - -// Mixin with super-restriction implementing other interfaces. -mixin MAiBC on A implements B, C { - String toString() => "${super.toString()}&MAiBC"; - String methodMAiBC() => "MAiBC:${this}.MAiBC"; - String methodA() => "MAiBC:${this}.A->${super.methodA()}"; - String methodB() => "MAiBC:${this}.B"; - String methodC() => "MAiBC:${this}.C"; -} - -// Mixin with "implements" clause. -mixin MBiIJ on B implements I, J { - String toString() => "${super.toString()}&MBiIJ"; - String methodMOiIJ() => "MBiIJ:${this}.MBiIJ"; - String methodI() => "MBiIJ:${this}.I"; - String methodJ() => "MBiIJ:${this}.J"; -} - - -// Mixin on more than one class. -mixin MBC on B, C { - String toString() => "${super.toString()}&MBC"; - String methodMBC() => "MBC:${this}.MBC"; - String methodA() => "MBC:${this}.A->${super.methodA()}"; - String methodB() => "MBC:${this}.B->${super.methodB()}"; - String methodC() => "MBC:${this}.C->${super.methodC()}"; -} - - -// One with everything. -mixin MBCiIJ on B, C implements I, J { - String toString() => "${super.toString()}&MBCiIJ"; - String methodMBCiIJ() => "MBCiIJ:${this}.MBCiIJ"; - String methodA() => "MBCiIJ:${this}.A->${super.methodA()}"; - String methodB() => "MBCiIJ:${this}.B->${super.methodB()}"; - String methodC() => "MBCiIJ:${this}.C->${super.methodC()}"; - String methodI() => "MBCiIJ:${this}.I"; - String methodJ() => "MBCiIJ:${this}.J"; -} - - -// Abstract mixin, doesn't implement its interface. -mixin MiIJ implements I, J { - String toString() => "${super.toString()}&MiIJ"; -} - - -// Applications of the mixins. - -class COaM = O with M; - -class COaM_2 extends O with M {} - -class CBaM = B with M; - -class CBaM_2 extends B with M {} - -class COaMO = O with MO; - -class COaMO_2 extends O with MO {} - -class CBaMO = B with MO; - -class CBaMO_2 extends B with MO {} - -class COaMOiIJ = O with MOiIJ; - -class COaMOiIJ_2 extends O with MOiIJ {} - -class CBaMBiIJ = B with MBiIJ; - -class CBaMBiIJ_2 extends B with MBiIJ {} - -class CAaMA = A with MA; - -class CAaMA_2 extends A with MA {} - -class CBaMA = B with MA; - -class CBaMA_2 extends B with MA {} - -class CAaMAiBC = A with MAiBC; - -class CAaMAiBC_2 extends A with MAiBC {} - -class CBaMAiBC = B with MAiBC; - -class CBaMAiBC_2 extends B with MAiBC {} - -class CBCaMBC = BC with MBC; - -class CBCaMBC_2 extends BC with MBC {} - -class CAaMAiBCaMBC = CAaMAiBC with MBC; - -class CAaMAiBCaMBC_2 extends CAaMAiBC with MBC {} - -class CBCaMBCiIJ = BC with MBCiIJ; - -class CBCaMBCiIJ_2 extends BC with MBCiIJ {} - -class CAaMAiBCaMBCiIJ = CAaMAiBC with MBCiIJ; - -class CAaMAiBCaMBCiIJ_2 extends CAaMAiBC with MBCiIJ {} - -// Abstract mixin application does not implement I and J. -abstract class OaMiIJ = O with MiIJ; - -// Concrete subclass of abstract mixin application -class COaMiIJ extends OaMiIJ { - String toString() => "${super.toString()}:COaMiIJ"; - String methodI() => "COaMiIJ:${this}.I"; - String methodJ() => "COaMiIJ:${this}.J"; -} - -// Abstract class with mixin application and does not implement I and J. -abstract class OaMiIJ_2 extends O with MiIJ {} - -// Concrete subclass of abstract mixin application -class COaMiIJ_2 extends OaMiIJ_2 { - String toString() => "${super.toString()}:COaMiIJ"; - String methodI() => "COaMiIJ:${this}.I"; - String methodJ() => "COaMiIJ:${this}.J"; -} - -// Test of `class C with M` syntax. -class CwithM with M {} -class CeOwithM extends Object with M {} - -// Test that the mixin applications behave as expected. -void main() { - { - for (dynamic o in [COaM(), COaM_2()]) { - Expect.type(o); - Expect.type(o); - Expect.equals("?&M", "$o"); - Expect.equals("M:$o.M", o.methodM()); - } - } - - { - for (dynamic o in [CBaM(), CBaM_2()]) { - Expect.type(o); - Expect.type(o); - Expect.equals("?&M", "$o"); - Expect.equals("B:$o.B", o.methodB()); - Expect.equals("M:$o.M", (o as M).methodM()); - } - } - - { - for (dynamic o in [COaMO(), COaMO_2()]) { - Expect.type(o); - Expect.type(o); - Expect.equals("O&MO", "$o"); - Expect.equals("MO:$o.MO", o.methodMO()); - } - } - - { - for (dynamic o in [CBaMO(), CBaMO_2()]) { - Expect.type(o); - Expect.type(o); - Expect.equals("B&MO", "$o"); - Expect.equals("MO:$o.MO", (o as MO).methodMO()); - Expect.equals("B:$o.B", o.methodB()); - } - } - - { - for (dynamic o in [COaMOiIJ(), COaMOiIJ_2()]) { - Expect.type(o); - Expect.type(o); - Expect.type(o); - Expect.type(o); - Expect.equals("O&MOiIJ", "$o"); - Expect.equals("MOiIJ:$o.MOiIJ", o.methodMOiIJ()); - Expect.equals("MOiIJ:$o.I", o.methodI()); - Expect.equals("MOiIJ:$o.J", o.methodJ()); - } - } - - { - for (dynamic o in [CBaMBiIJ(), CBaMBiIJ_2()]) { - Expect.type(o); - Expect.type(o); - Expect.type(o); - Expect.type(o); - Expect.equals("B&MBiIJ", "$o"); - Expect.equals("MBiIJ:$o.MBiIJ", o.methodMOiIJ()); - Expect.equals("B:$o.B", o.methodB()); - Expect.equals("MBiIJ:$o.I", o.methodI()); - Expect.equals("MBiIJ:$o.J", o.methodJ()); - } - } - - { - for (dynamic o in [CAaMA(), CAaMA_2()]) { - Expect.type(o); - Expect.type(o); - Expect.equals("A&MA", "$o"); - Expect.equals("MA:$o.MA", o.methodMA()); - Expect.equals("MA:$o.A->A:$o.A", o.methodA()); - } - } - - { - for (dynamic o in [CBaMA(), CBaMA_2()]) { - Expect.type(o); - Expect.type(o); - Expect.equals("B&MA", "$o"); - Expect.equals("MA:$o.MA", (o as MA).methodMA()); - Expect.equals("MA:$o.A->B:$o.A", (o as MA).methodA()); - Expect.equals("B:$o.B", o.methodB()); - } - } - - { - for (dynamic o in [CAaMAiBC(), CAaMAiBC_2()]) { - Expect.type(o); - Expect.type(o); - Expect.type(o); - Expect.type(o); - Expect.equals("A&MAiBC", "$o"); - Expect.equals("MAiBC:$o.MAiBC", o.methodMAiBC()); - Expect.equals("MAiBC:$o.A->A:$o.A", o.methodA()); - Expect.equals("MAiBC:$o.B", o.methodB()); - Expect.equals("MAiBC:$o.C", o.methodC()); - } - } - - { - for (dynamic o in [CBaMAiBC(), CBaMAiBC_2()]) { - Expect.type(o); - Expect.type(o); - Expect.type(o); - Expect.type(o); - Expect.equals("B&MAiBC", "$o"); - Expect.equals("MAiBC:$o.MAiBC", o.methodMAiBC()); - Expect.equals("MAiBC:$o.A->B:$o.A", o.methodA()); - Expect.equals("MAiBC:$o.B", o.methodB()); - Expect.equals("MAiBC:$o.C", o.methodC()); - } - } - - { - for (dynamic o in [CBCaMBC(), CBCaMBC_2()]) { - Expect.type(o); - Expect.type(o); - Expect.equals("BC&MBC", "$o"); - Expect.equals("MBC:$o.MBC", o.methodMBC()); - Expect.equals("MBC:$o.A->BC:$o.A->C:$o.A->A:$o.A", o.methodA()); - Expect.equals("MBC:$o.B->BC:$o.B", o.methodB()); - Expect.equals("MBC:$o.C->BC:$o.C->C:$o.C", o.methodC()); - } - } - - { - // Mixin on top of mixin application. - for (dynamic o in [CAaMAiBCaMBC(), CAaMAiBCaMBC_2()]) { - Expect.type(o); - Expect.type(o); - Expect.equals("A&MAiBC&MBC", "$o"); - Expect.equals("MBC:$o.MBC", (o as MBC).methodMBC()); - Expect.equals("MAiBC:$o.MAiBC", o.methodMAiBC()); - Expect.equals("MBC:$o.A->MAiBC:$o.A->A:$o.A", o.methodA()); - Expect.equals("MBC:$o.B->MAiBC:$o.B", o.methodB()); - Expect.equals("MBC:$o.C->MAiBC:$o.C", o.methodC()); - } - } - - { - for (dynamic o in [CBCaMBCiIJ(), CBCaMBCiIJ_2()]) { - Expect.type(o); - Expect.type(o); - Expect.type(o); - Expect.type(o); - Expect.equals("BC&MBCiIJ", "$o"); - Expect.equals("MBCiIJ:$o.MBCiIJ", o.methodMBCiIJ()); - Expect.equals("MBCiIJ:$o.A->BC:$o.A->C:$o.A->A:$o.A", o.methodA()); - Expect.equals("MBCiIJ:$o.B->BC:$o.B", o.methodB()); - Expect.equals("MBCiIJ:$o.C->BC:$o.C->C:$o.C", o.methodC()); - Expect.equals("MBCiIJ:$o.I", o.methodI()); - Expect.equals("MBCiIJ:$o.J", o.methodJ()); - } - } - - { - // Mixin on top of mixin application. - for (dynamic o in [CAaMAiBCaMBCiIJ(), CAaMAiBCaMBCiIJ_2()]) { - Expect.type(o); - Expect.type(o); - Expect.type(o); - Expect.type(o); - Expect.equals("A&MAiBC&MBCiIJ", "$o"); - Expect.equals("MBCiIJ:$o.MBCiIJ", o.methodMBCiIJ()); - Expect.equals("MAiBC:$o.MAiBC", (o as CAaMAiBC).methodMAiBC()); - Expect.equals("MBCiIJ:$o.A->MAiBC:$o.A->A:$o.A", o.methodA()); - Expect.equals("MBCiIJ:$o.B->MAiBC:$o.B", o.methodB()); - Expect.equals("MBCiIJ:$o.C->MAiBC:$o.C", o.methodC()); - Expect.equals("MBCiIJ:$o.I", o.methodI()); - Expect.equals("MBCiIJ:$o.J", o.methodJ()); - } - } - - { - // Abstract mixin application, concrete subclass. - for (dynamic o in [COaMiIJ(), COaMiIJ_2()]) { - Expect.type(o); - Expect.type(o); - Expect.isTrue(o is OaMiIJ || o is OaMiIJ_2, - "`$o` should subtype OaMiIJ or OaMiIJ_2"); - Expect.type(o); - Expect.type(o); - Expect.equals("O&MiIJ:COaMiIJ", "$o"); - Expect.equals("COaMiIJ:$o.I", o.methodI()); - Expect.equals("COaMiIJ:$o.J", o.methodJ()); - } - } - - Expect.equals(CeOwithM().toString(), CwithM().toString()); - - { - // Regression test for private fields. - var c = PrivateFieldClass(); - Expect.equals(42, c._foo); - } -} - - -mixin PrivateFieldMixin { - int _foo = 40; -} - -class PrivateFieldClass with PrivateFieldMixin { - int get _foo => super._foo + 2; -} diff --git a/tests/language_2/new/create_unresolved_type_runtime_test.dart b/tests/language_2/new/create_unresolved_type_runtime_test.dart deleted file mode 100644 index d1f3a29115a..00000000000 --- a/tests/language_2/new/create_unresolved_type_runtime_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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() { - -} diff --git a/tests/language_2/new/create_unresolved_type_test.dart b/tests/language_2/new/create_unresolved_type_test.dart deleted file mode 100644 index e5362cd7c32..00000000000 --- a/tests/language_2/new/create_unresolved_type_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2013, 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() { - new F(); - // ^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // [cfe] Couldn't find constructor 'F'. -} diff --git a/tests/language_2/new/expression1_test.dart b/tests/language_2/new/expression1_test.dart deleted file mode 100644 index 1706b069c9f..00000000000 --- a/tests/language_2/new/expression1_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// 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. - -// @dart = 2.9 - -class C {} - -main() { - new C; - // ^ - // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN - // [cfe] Expected '(' after this. -} diff --git a/tests/language_2/new/expression2_test.dart b/tests/language_2/new/expression2_test.dart deleted file mode 100644 index 54a17fd3c5b..00000000000 --- a/tests/language_2/new/expression2_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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. - -// @dart = 2.9 - -class C {} - -main() { - new C(; - // ^ - // [cfe] Can't find ')' to match '('. - // ^ - // [cfe] Too many positional arguments: 0 allowed, but 1 found. - // ^ - // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN - // [cfe] Expected an identifier, but got ';'. - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER -} diff --git a/tests/language_2/new/expression3_test.dart b/tests/language_2/new/expression3_test.dart deleted file mode 100644 index 06cd1bd17d2..00000000000 --- a/tests/language_2/new/expression3_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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. - -// @dart = 2.9 - -class C {} - -main() { - new C(...; - // ^ - // [cfe] Can't find ')' to match '('. - // ^ - // [cfe] Too many positional arguments: 0 allowed, but 1 found. - // ^^^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] Expected an identifier, but got '...'. - // ^ - // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN -} diff --git a/tests/language_2/new/expression_type_args_runtime_test.dart b/tests/language_2/new/expression_type_args_runtime_test.dart deleted file mode 100644 index 0546fe870d0..00000000000 --- a/tests/language_2/new/expression_type_args_runtime_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -// Tests showing errors using type-arguments in new expressions: -class A { - // Can't instantiate type parameter (within static or instance method). - - - - // OK when used within instance method, but not in static method. - m3() => new A(); - -} - -main() { - A a = new A(); - - - a.m3(); - -} diff --git a/tests/language_2/new/expression_type_args_test.dart b/tests/language_2/new/expression_type_args_test.dart deleted file mode 100644 index 7a82ace97fd..00000000000 --- a/tests/language_2/new/expression_type_args_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2012, 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 - -// Tests showing errors using type-arguments in new expressions: -class A { - // Can't instantiate type parameter (within static or instance method). - m1() => new T(); - // ^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // [cfe] Couldn't find constructor 'T'. - static m2() => new T(); - // ^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC - // [cfe] Couldn't find constructor 'T'. - - // OK when used within instance method, but not in static method. - m3() => new A(); - static m4() => new A(); - // ^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC - // [cfe] Type variables can't be used in static members. -} - -main() { - A a = new A(); - a.m1(); - A.m2(); - a.m3(); - A.m4(); -} diff --git a/tests/language_2/new/prefix_runtime_test.dart b/tests/language_2/new/prefix_runtime_test.dart deleted file mode 100644 index 5e63fdfbeb6..00000000000 --- a/tests/language_2/new/prefix_runtime_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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:core' as prefix; - -main() { - -} diff --git a/tests/language_2/new/prefix_test.dart b/tests/language_2/new/prefix_test.dart deleted file mode 100644 index 4e352d19e7c..00000000000 --- a/tests/language_2/new/prefix_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'dart:core' as prefix; - -main() { - return new prefix(); - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // [cfe] Couldn't find constructor 'prefix'. -} diff --git a/tests/language_2/new/statement_test.dart b/tests/language_2/new/statement_test.dart deleted file mode 100644 index 4d29c8678ea..00000000000 --- a/tests/language_2/new/statement_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// 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. -// Test a new statement by itself. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - int a; - int b; - static int c; - static int d; - - A(int x, int y) - : a = x, - b = y { - A.c = x; - A.d = y; - } -} - -class NewStatementTest { - static testMain() { - new A(10, 20); - Expect.equals(10, A.c); - Expect.equals(20, A.d); - } -} - -main() { - NewStatementTest.testMain(); -} diff --git a/tests/language_2/no_such_method/dispatcher_test.dart b/tests/language_2/no_such_method/dispatcher_test.dart deleted file mode 100644 index 7de405efa7b..00000000000 --- a/tests/language_2/no_such_method/dispatcher_test.dart +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2013, 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. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test that noSuchMethod dispatching and auto-closurization work correctly. - -class A { - noSuchMethod(m) { - return 123; - } - - bar(x) => x + 1; -} - -class B extends A {} - -class C { - C(this.pos, this.named, this.posArgs, this.namedArgs); - var pos, named; - noSuchMethod(m) { - Expect.equals(pos, m.positionalArguments.length); - Expect.equals(named, m.namedArguments.length); - for (var i = 0; i < posArgs.length; ++i) { - Expect.equals(posArgs[i], m.positionalArguments[i]); - } - for (var k in namedArgs.keys) { - Expect.equals(namedArgs[k], m.namedArguments[k]); - } - return 123; - } - - List posArgs; - Map namedArgs; -} - -main() { - var a = new A() as dynamic; - for (var i = 0; i < 20; ++i) Expect.equals(123, a.foo()); - Expect.throws(() => (a.foo)()); - Expect.equals("123", (a.foo).toString()); - - var b = new B() as dynamic; - for (var i = 0; i < 20; ++i) { - Expect.equals(2, b.bar(1)); - Expect.equals(123, b.bar()); - Expect.equals(2, b.bar(1)); - } - - for (var i = 0; i < 20; ++i) { - Expect.equals(123, b.bar(1, 2, 3)); - Expect.equals(123, b.bar(1, 2, foo: 3)); - } - - // Test named and positional arguments. - var c = new C(1, 2, [100], {#n1: 101, #n2: 102}) as dynamic; - for (var i = 0; i < 20; ++i) { - Expect.equals(123, c.bar(100, n1: 101, n2: 102)); - Expect.equals(123, c.bar(100, n2: 102, n1: 101)); - } -} diff --git a/tests/language_2/no_such_method/empty_selector_test.dart b/tests/language_2/no_such_method/empty_selector_test.dart deleted file mode 100644 index 3c4d015d071..00000000000 --- a/tests/language_2/no_such_method/empty_selector_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A { - noSuchMethod(_) => 'foo'; - get hashCode => 42; -} - -// Keep that list empty to make the inferrer infer an empty element -// type. -var a = []; -var b = [new A(), new Object() as dynamic]; - -main() { - // The following [hashCode] call will create a selector whose - // receiver type is empty. This used to make dart2js generate a - // [noSuchMethod] handler for [hashCode] on the Object class, which - // would override the actual implementation. - Expect.throwsRangeError(() => a[0].hashCode); - - // This code calls the [hashCode] method put on the [Object] class, - // which used to be a [noSuchMethod] handler method. - Expect.isTrue(b[1].hashCode is int); - - // Sanity checks. - Expect.equals(42, b[0].hashCode); - Expect.equals('foo', b[0].foo()); - - // Prevent optimizations on the [b] variable. - b.clear(); -} diff --git a/tests/language_2/no_such_method/many_overridden_test.dart b/tests/language_2/no_such_method/many_overridden_test.dart deleted file mode 100644 index ba10f50a55e..00000000000 --- a/tests/language_2/no_such_method/many_overridden_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// 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. -// VMOptions=--optimization-counter-threshold=10 - -// @dart = 2.9 - -library OverriddenNoSuchMethodTest.dart; - -import "package:expect/expect.dart"; - -part "overridden.dart"; - -class ManyOverriddenNoSuchMethodTest { - static testMain() { - for (int i = 0; i < 20; i++) { - OverriddenNoSuchMethod.testMain(); - } - } -} - -main() { - ManyOverriddenNoSuchMethodTest.testMain(); -} diff --git a/tests/language_2/no_such_method/megamorphic_test.dart b/tests/language_2/no_such_method/megamorphic_test.dart deleted file mode 100644 index 8bf3edb0d5f..00000000000 --- a/tests/language_2/no_such_method/megamorphic_test.dart +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2012, 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. -// Test program for correct optimizations related to types fo allocated lists. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Classes to induce polymorphism of degree 10. -class A0 { - test() => 0; -} - -class A1 { - test() => 1; -} - -class A2 { - test() => 2; -} - -class A3 { - test() => 3; -} - -class A4 { - test() => 4; -} - -class A5 { - test() => 5; -} - -class A6 { - test() => 6; -} - -class A7 { - test() => 7; -} - -class A8 { - test() => 8; -} - -class A9 { - test() => 9; -} - -// Class with no test method. -class B {} - -test(obj) { - return obj.test(); -} - -main() { - // Trigger optimization of 'test' function. - List list = [ - new A0(), - new A1(), - new A2(), - new A3(), - new A4(), - new A5(), - new A6(), - new A7(), - new A8(), - new A9() - ]; - for (int i = 0; i < 20; i++) { - for (var obj in list) { - test(obj); - } - } - Expect.throwsNoSuchMethodError(() => test(new B())); -} diff --git a/tests/language_2/no_such_method/mock_test.dart b/tests/language_2/no_such_method/mock_test.dart deleted file mode 100644 index 85d920f639f..00000000000 --- a/tests/language_2/no_such_method/mock_test.dart +++ /dev/null @@ -1,175 +0,0 @@ -// 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 test program testing that NoSuchMethod is properly called. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Cat { - bool eatFood(String food) => true; - String scratch(String furniture) => 'purr'; - String mood; -} - -class MockCat implements Cat { - dynamic noSuchMethod(Invocation invocation) { - var arg = invocation.positionalArguments[0]; - return arg is String && arg.isNotEmpty; - } -} - -class MockCat2 extends MockCat { - // this apparently works. - noSuchMethod(_); -} - -class MockCat3 extends MockCat2 implements Cat { - bool eatFood(String food, {double amount}); - String scratch(String furniture, [String furniture2]); - - dynamic noSuchMethod(Invocation invocation) { - if (invocation.memberName == #scratch) { - return invocation.positionalArguments.join(','); - } - - return (invocation.positionalArguments[0] as String).isNotEmpty && - invocation.namedArguments[#amount] > 0.5; - } -} - -class MockWithGenerics { - List doStuff(T t); - - noSuchMethod(i) => (i as dynamic).typeArguments; -} - -class MockWithGetterSetter { - get getter; - set setter(value); - - Invocation invocation; - noSuchMethod(i) { - invocation = i; - } -} - -class Callable { - int call() => 1; - int m() => 2; -} - -class MockCallable implements Callable { - noSuchMethod(i) => i.memberName == #call ? 42 : 0; -} - -void main() { - MockCat mock = new MockCat(); - Expect.isTrue((mock as dynamic).eatFood("cat food")); - Expect.isFalse(mock.eatFood("")); - mock.mood = 'sleepy'; - (mock as dynamic).mood = 'playful'; - Expect.throwsTypeError(() { - (mock as dynamic).mood = 42; - }); - - // In strong mode this will be a runtime type error: - // bool is not a String. VM will fail with noSuchMethod +. - Expect.throws(() => mock.scratch("couch") + ''); - - var mock2 = new MockCat2(); - Expect.isTrue(mock2.eatFood("cat food")); - - var mock3 = new MockCat3(); - Expect.isTrue(mock3.eatFood("cat food", amount: 0.9)); - Expect.isFalse(mock3.eatFood("cat food", amount: 0.3)); - Expect.equals("chair,null", mock3.scratch("chair")); - Expect.equals("chair,couch", mock3.scratch("chair", "couch")); - Expect.equals("chair,null", mock3.scratch("chair", null)); - Expect.equals("chair,", mock3.scratch("chair", "")); - - var g = new MockWithGenerics(); - Expect.listEquals([int], g.doStuff(42)); - Expect.listEquals([num], g.doStuff(42)); - Expect.listEquals([String], g.doStuff('hi')); - - var s = new MockWithGetterSetter(); - s.getter; - Expect.equals(0, s.invocation.positionalArguments.length); - Expect.isTrue(s.invocation.isGetter); - Expect.isFalse(s.invocation.isSetter); - Expect.isFalse(s.invocation.isMethod); - s.setter = 42; - Expect.equals(42, s.invocation.positionalArguments.single); - Expect.isFalse(s.invocation.isGetter); - Expect.isTrue(s.invocation.isSetter); - Expect.isFalse(s.invocation.isMethod); - - testMockTearoffs(); - testMockCallable(); - testMockCallableTearoff(); -} - -testMockCallable() { - Callable call = new MockCallable(); - Expect.equals(42, call()); - Expect.equals(42, (call as dynamic)()); - Expect.equals(0, call.m()); - Expect.equals(0, (call as dynamic).m()); -} - -testMockCallableTearoff() { - var mock = new MockCallable(); - Function f = mock; - Expect.equals(42, f()); - Expect.equals(42, (f as dynamic)()); - Expect.equals(f, mock.call); - Expect.equals(f.call, mock.call); - Expect.equals((f as dynamic).call, mock.call); - Expect.equals(f.call, (mock as dynamic).call); -} - -typedef bool EatFoodType(String food); - -testMockTearoffs() { - var mock2 = new MockCat2(); - var eat = mock2.eatFood; - var eat2 = (mock2 as dynamic).eatFood; - - Expect.isTrue(eat is EatFoodType, 'eat is EatFoodType'); - Expect.isTrue(eat2 is EatFoodType, 'eat2 is EatFoodType'); - Expect.equals(eat, eat2, 'eat == eat2'); - Expect.isTrue(eat.runtimeType == eat2.runtimeType, - 'eat.runtimeType == eat2.runtimeType'); - - Expect.isTrue(eat("cat food"), 'eat("cat food")'); - Expect.isFalse(eat(""), 'eat("")'); - Expect.isTrue(eat2("cat food"), 'eat2("cat food")'); - Expect.isFalse(eat2(""), 'eat2("")'); - - var g = new MockWithGenerics(); - var doStuff = g.doStuff; - var doStuff2 = (g as dynamic).doStuff; - - Expect.equals(doStuff, doStuff2, 'doStuff == doStuff2'); - Expect.equals(doStuff.runtimeType, doStuff2.runtimeType, - 'doStuff.runtimeType == doStuff2.runtimeType'); - - Expect.listEquals([int], doStuff(42)); - Expect.listEquals([num], doStuff(42)); - Expect.listEquals([String], doStuff('hi')); - - // no inference happens because `doStuff2` is dynamic. - Expect.listEquals([num], doStuff2(42)); - expectIsDynamicOrObject(List types) { - Expect.equals(1, types.length); - var t = types[0]; - // TODO(jmesserly): allows either type because of - // https://github.com/dart-lang/sdk/issues/32483 - Expect.isTrue(t == dynamic || t == Object, '$t == dynamic || $t == Object'); - } - - expectIsDynamicOrObject(doStuff2(42)); - expectIsDynamicOrObject(doStuff2('hi')); -} diff --git a/tests/language_2/no_such_method/native_test.dart b/tests/language_2/no_such_method/native_test.dart deleted file mode 100644 index 35ffccc3cf3..00000000000 --- a/tests/language_2/no_such_method/native_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2016, 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 test program testing that NoSuchMethod is properly called. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -Invocation invocation; - -class C { - noSuchMethod(Invocation i) { - invocation = i; - return 42; - } -} - -expectNSME(Object d) { - try { - d.noSuchMethod(invocation); - } on NoSuchMethodError catch (e) { - Expect.isTrue(e.toString().contains('foobar')); - } -} - -main() { - dynamic c = new C() as dynamic; - Expect.equals(42, c.foobar(123)); - Expect.equals(#foobar, invocation.memberName); - Expect.listEquals([123], invocation.positionalArguments); - expectNSME(null); - expectNSME(777); - expectNSME('hello'); - expectNSME([]); - expectNSME(['a', 'b', 'c']); -} diff --git a/tests/language_2/no_such_method/no_such_method2_test.dart b/tests/language_2/no_such_method/no_such_method2_test.dart deleted file mode 100644 index 2528d632b00..00000000000 --- a/tests/language_2/no_such_method/no_such_method2_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -// Regression test for https://code.google.com/p/dart/issues/detail?id=7697. -// dart2js used to optimize [noSuchMethod] based on the user-provided -// argument, and forget that the runtime might call it with its own -// [Invocation] implementation. - -class Hey { - foo() => noSuchMethod(new FakeInvocationMirror()); - noSuchMethod(x) => x; -} - -class You extends Hey { - // We used to think this method is always called with a - // FakeInvocationMirror instance, but it's also called with the - // internal mirror implementation. - noSuchMethod(x) => x.isGetter; -} - -class FakeInvocationMirror extends Invocation { - final bool isGetter = false; - @override - bool get isMethod => false; - - @override - bool get isSetter => false; - - @override - Symbol get memberName => null; - - @override - Map get namedArguments => {}; - - @override - List get positionalArguments => []; -} - -main() { - var x = new Hey(); - Expect.isTrue(x.foo() is FakeInvocationMirror); - var y = [new You() as dynamic]; - Expect.isTrue(y[0].bar); -} diff --git a/tests/language_2/no_such_method/no_such_method3_test.dart b/tests/language_2/no_such_method/no_such_method3_test.dart deleted file mode 100644 index acc09517ec9..00000000000 --- a/tests/language_2/no_such_method/no_such_method3_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that a static type inferrer takes [noSuchMethod] into account. - -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -import "package:expect/expect.dart"; - -class A { - B foobarbaz() { - return new B(); - } -} - -class B { - noSuchMethod(im) { - return 42; - } -} - -bar() { - var b; - for (int i = 0; i < 20; ++i) - if (i % 2 == 0) - b = new A(); - else - b = new B(); - return b; -} - -void main() { - var x = bar(); - var y = x.foobarbaz(); - Expect.equals(42, y); - Expect.isFalse(y is B); -} diff --git a/tests/language_2/no_such_method/no_such_method4_test.dart b/tests/language_2/no_such_method/no_such_method4_test.dart deleted file mode 100644 index e0c7722b906..00000000000 --- a/tests/language_2/no_such_method/no_such_method4_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -class NoSuchMethodNegativeTest { - foo() { - return 1; - } -} - -main() { - var obj = new NoSuchMethodNegativeTest() as dynamic; - Expect.throwsNoSuchMethodError(() { - obj.moo(); - }); -} diff --git a/tests/language_2/no_such_method/no_such_method_private_setter_lib.dart b/tests/language_2/no_such_method/no_such_method_private_setter_lib.dart deleted file mode 100644 index ffb9f4966a8..00000000000 --- a/tests/language_2/no_such_method/no_such_method_private_setter_lib.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2018, 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 - -class Bar { - int _x; -} - -void baz(Bar bar) { - (bar as dynamic)._x = "Sixtyfour"; //# 01: runtime error -} diff --git a/tests/language_2/no_such_method/no_such_method_test.dart b/tests/language_2/no_such_method/no_such_method_test.dart deleted file mode 100644 index 37e3b6ff025..00000000000 --- a/tests/language_2/no_such_method/no_such_method_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// 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 test program testing that NoSuchMethod is properly called. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class NoSuchMethodTest { - foo({a: 10, b: 20}) { - return (10 * a) + b; - } - - noSuchMethod(Invocation im) { - Expect.equals(#moo, im.memberName); - Expect.equals(0, im.positionalArguments.length); - Expect.equals(1, im.namedArguments.length); - return foo(b: im.namedArguments[const Symbol("b")]); - } -} - -main() { - var obj = new NoSuchMethodTest() as dynamic; - Expect.equals(199, obj.moo(b: 99)); // obj.NoSuchMethod called here. -} diff --git a/tests/language_2/no_such_method/nsm4_test.dart b/tests/language_2/no_such_method/nsm4_test.dart deleted file mode 100644 index c58455c7de2..00000000000 --- a/tests/language_2/no_such_method/nsm4_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 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 - -// Test for compile-time errors for member access on classes that inherit a -// user defined noSuchMethod. - -import "package:expect/expect.dart"; - -class Mock { - noSuchMethod(i) => 42; -} - -abstract class Foo { - int foo(); -} - -class Valid extends Mock implements Foo {} - -main() { - Expect.equals(new Valid().foo(), 42); -} diff --git a/tests/language_2/no_such_method/nsm5_test.dart b/tests/language_2/no_such_method/nsm5_test.dart deleted file mode 100644 index 79b485a8651..00000000000 --- a/tests/language_2/no_such_method/nsm5_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2016, 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 - -// Test for compile-time errors for member access on classes that inherit a -// user defined noSuchMethod, even if it is abstract. - -import 'package:expect/expect.dart'; - -abstract class Mock { - noSuchMethod(i); -} - -abstract class Foo { - int foo(); -} - -class WarnMe extends Mock implements Foo {} -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER -// [cfe] The non-abstract class 'WarnMe' is missing implementations for these members: - -main() {} diff --git a/tests/language_2/no_such_method/overridden.dart b/tests/language_2/no_such_method/overridden.dart deleted file mode 100644 index baa817efd42..00000000000 --- a/tests/language_2/no_such_method/overridden.dart +++ /dev/null @@ -1,27 +0,0 @@ -// 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 test program testing overridden messageNotUnderstood. - -// @dart = 2.9 - -part of OverriddenNoSuchMethodTest.dart; - -class OverriddenNoSuchMethod { - OverriddenNoSuchMethod() {} - - noSuchMethod(Invocation mirror) { - Expect.equals(#foo, mirror.memberName); - // 'foo' was called with two parameters (not counting receiver). - List args = mirror.positionalArguments; - Expect.equals(2, args.length); - Expect.equals(101, args[0]); - Expect.equals(202, args[1]); - return 5; - } - - static testMain() { - dynamic obj = new OverriddenNoSuchMethod(); - obj.foo(101, 202); - } -} diff --git a/tests/language_2/no_such_method/overridden_no_such_method_test.dart b/tests/language_2/no_such_method/overridden_no_such_method_test.dart deleted file mode 100644 index 26c8a480a6e..00000000000 --- a/tests/language_2/no_such_method/overridden_no_such_method_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// 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 test program testing overridden messageNotUnderstood. - -// @dart = 2.9 - -library OverriddenNoSuchMethodTest.dart; - -import "package:expect/expect.dart"; -part "overridden.dart"; - -main() { - OverriddenNoSuchMethod.testMain(); -} diff --git a/tests/language_2/no_such_method/private_setter_test.dart b/tests/language_2/no_such_method/private_setter_test.dart deleted file mode 100644 index e495a15a8d2..00000000000 --- a/tests/language_2/no_such_method/private_setter_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'no_such_method_private_setter_lib.dart'; - -class Foo implements Bar {} - -main() { - baz(new Foo()); //# 01: runtime error -} diff --git a/tests/language_2/no_such_method/simple_type_arguments_test.dart b/tests/language_2/no_such_method/simple_type_arguments_test.dart deleted file mode 100644 index 81a8a94f8e9..00000000000 --- a/tests/language_2/no_such_method/simple_type_arguments_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2018, 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. -// dart2jsOptions=--disable-rti-optimization - -// @dart = 2.9 - -// Dart test program testing that type arguments are captured by the Invocation -// passed to noSuchMethod from a dynamic call. - -import "package:expect/expect.dart"; - -class Mock { - noSuchMethod(i) => i.typeArguments; -} - -void main() { - var g = new Mock(); - - Expect.listEquals( - [String, int], (g as dynamic).hurrah(moose: 42, duck: 12)); - - // map has interceptor calling convention in dart2js. - Expect.listEquals([String, int], (g as dynamic).map()); -} diff --git a/tests/language_2/no_such_method/subtype_test.dart b/tests/language_2/no_such_method/subtype_test.dart deleted file mode 100644 index bf408f651a7..00000000000 --- a/tests/language_2/no_such_method/subtype_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A { - foo() => 42; -} - -class B implements A { - noSuchMethod(im) => 84; -} - -main() { - var a = [new A(), new B()]; - var b = a[1]; - if (b is A) { - // `b.foo()` will create a typed selector whose receiver type is a - // subtype of `A`. Because not all subtypes of `A` implement - // `foo`, dart2js must generate a `noSuchMethod` stub for `foo` in - // the top Object class. - Expect.equals(84, b.foo()); - return; - } - Expect.fail('Should not be here'); -} diff --git a/tests/language_2/no_such_method/tearoff_fta_test.dart b/tests/language_2/no_such_method/tearoff_fta_test.dart deleted file mode 100644 index eb6d6101003..00000000000 --- a/tests/language_2/no_such_method/tearoff_fta_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'package:expect/expect.dart'; - -void foo() {} - -main() { - final dynamic tearoff = foo; - - Expect.throwsNoSuchMethodError(() { - tearoff(3); - }, 'Providing type arguments to a non-generic tearoff should throw go NSM.'); -} diff --git a/tests/language_2/nosuchmethod_forwarding/README.md b/tests/language_2/nosuchmethod_forwarding/README.md deleted file mode 100644 index ed26b01c7e9..00000000000 --- a/tests/language_2/nosuchmethod_forwarding/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Feature tests for noSuchMethod forwarding - -This directory was created in order to hold tests pertaining to the -Dart feature which causes forwarding methods to be generated -implicitly for all method signatures in the interface of a class that -declares a non-trivial `noSuchMethod`. For more details, please check -the -[feature specification](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/nosuchmethod-forwarding.md). diff --git a/tests/language_2/nosuchmethod_forwarding/abstract_override_with_different_type_test.dart b/tests/language_2/nosuchmethod_forwarding/abstract_override_with_different_type_test.dart deleted file mode 100644 index 5de6e925e8b..00000000000 --- a/tests/language_2/nosuchmethod_forwarding/abstract_override_with_different_type_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2018, 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 - -// This is a regression test for http://dartbug.com/40248. - -import "package:expect/expect.dart"; - -class Base { - set push(int x); - set float(covariant int x); - noSuchMethod(i) => print("${runtimeType}: ${i.positionalArguments[0]}"); -} - -class Me extends Base {} - -class You extends Base { - set push(num x); - set float(num x); -} - -main() { - List list = [Me(), You()]; - for (Base baba in list) { - baba.push = 0; - baba.float = 1; - if (baba is You) { - baba.push = 2.3; - baba.float = 4.5; - } - try { - (baba as dynamic).push = 6.7; - Expect.isTrue(baba is You); - } on TypeError { - Expect.isTrue(baba is Me); - } - try { - (baba as dynamic).float = 8.9; - Expect.isTrue(baba is You); - } on TypeError { - Expect.isTrue(baba is Me); - } - } -} diff --git a/tests/language_2/nosuchmethod_forwarding/nosuchmethod_forwarding_arguments_test.dart b/tests/language_2/nosuchmethod_forwarding/nosuchmethod_forwarding_arguments_test.dart deleted file mode 100644 index 37fa52fbc10..00000000000 --- a/tests/language_2/nosuchmethod_forwarding/nosuchmethod_forwarding_arguments_test.dart +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) 2018, 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 - -// Testing that `noSuchMethod` forwarding properly handles optional, named and -// type parameters, and result type checking. - -// VMOptions=--lazy-dispatchers -// VMOptions=--no-lazy-dispatchers - -import 'package:expect/expect.dart'; - -class A { - dynamic noSuchMethod(Invocation invoke) { - if (invoke.memberName == #test0) { - Expect.equals(invoke.positionalArguments[0], 1); - Expect.equals(invoke.positionalArguments[1], 2); - return null; - } else if (invoke.memberName == #test1) { - Expect.isTrue(invoke.namedArguments.length == 1); - Expect.equals(null, invoke.namedArguments[#x]); - return null; - } else if (invoke.memberName == #test2) { - Expect.isTrue(invoke.namedArguments.length == 1); - Expect.equals("w/e", invoke.namedArguments[#x]); - return null; - } else if (invoke.memberName == #test3) { - Expect.equals(invoke.namedArguments[#x], "ok"); - return null; - } else if (invoke.memberName == #test4) { - Expect.equals(invoke.positionalArguments[0], "ok"); - return null; - } else if (invoke.memberName == #test5) { - Expect.equals(invoke.typeArguments[0].toString(), "int"); - return null; - } else if (invoke.memberName == #test6) { - return 1; - } else if (invoke.memberName == #test7) { - return "hi"; - } else if (invoke.memberName == #allTogetherNow) { - Expect.equals(invoke.typeArguments.length, 2); - Expect.equals(invoke.typeArguments[0].toString(), "num"); - Expect.equals(invoke.typeArguments[1].toString(), "double"); - - Expect.equals(invoke.positionalArguments.length, 1); - Expect.equals(invoke.positionalArguments[0], 2.0); - - Expect.equals(invoke.namedArguments.length, 1); - Expect.equals(invoke.namedArguments[#foo], const [3, 4]); - } else if (invoke.memberName == #test8) { - Expect.equals(1, invoke.positionalArguments.length); - Expect.equals(null, invoke.positionalArguments[0]); - } else if (invoke.memberName == #test9) { - Expect.equals(invoke.typeArguments.length, 2); - Expect.equals(invoke.typeArguments[0].toString(), "num"); - Expect.equals(invoke.typeArguments[1].toString(), "double"); - - Expect.equals(1, invoke.positionalArguments.length); - Expect.equals(4.2, invoke.positionalArguments[0]); - - Expect.equals(1, invoke.namedArguments.length); - Expect.equals(3, invoke.namedArguments[#foo]); - } - } - - void test0(int x, int y); - void test1({String x}); - void test2({String x: "w/e"}); - void test3({String x: "w/e"}); - void test4([String x]); - void test5(T x); - String test6(); - - int get test7; - void set test7(int x); - - void test8([String x]); - void test9(S x1, {T foo}); - - T allTogetherNow(S x1, {List foo: const []}); -} - -main() { - var a = new A(); - - a.test0(1, 2); - (a.test0 as dynamic)(1, 2); - - a.test1(); - (a.test1 as dynamic)(); - - a.test2(); - (a.test2 as dynamic)(); - - a.test3(x: "ok"); - (a.test3 as dynamic)(x: "ok"); - - a.test4("ok"); - (a.test4 as dynamic)("ok"); - - a.test5(1); - (a.test5 as dynamic)(1); - Expect.throwsTypeError(() => (a.test5 as dynamic)("foo")); - Expect.throwsTypeError(() => (a.test5 as dynamic)(3.1)); - - Expect.throwsTypeError(() => a.test6()); - Expect.throwsTypeError(() => (a.test6 as dynamic)()); - - Expect.throwsTypeError(() => a.test7); - Expect.throwsTypeError(() => (a as dynamic).test7 = "hi"); - - a.allTogetherNow(2.0, foo: const [3, 4]); - Expect.throwsTypeError(() => - (a.allTogetherNow as dynamic)(2.0, foo: const [3, 4])); - Expect.throwsTypeError(() => - (a.allTogetherNow as dynamic)(2.0, foo: const [3, 4])); - Expect.throwsTypeError(() => (a.allTogetherNow - as dynamic)(2.0, foo: const [3, 4])); - - a.test8(); - - a.test9(4.2, foo: 3); - Expect.throwsTypeError(() => (a.test9 as dynamic)(3, foo: 3)); - Expect.throwsTypeError( - () => (a.test9 as dynamic)(3, foo: 3.2)); - // Added to check that uses of positions from the ArgumentsDescriptor in the - // VM properly offsets named argument positions if there are also type - // arguments. allTogetherNow doesn't work for this because the runtime type of - // the positional argument cannot be the same as the type of the named - // argument without the positional argument failing to match its own type, - // and positional argument types are usually checked first. - Expect.throwsTypeError( - () => (a.test9 as dynamic)(4.2, foo: 3.2)); -} diff --git a/tests/language_2/nosuchmethod_forwarding/nosuchmethod_forwarding_partial_instantiation_test.dart b/tests/language_2/nosuchmethod_forwarding/nosuchmethod_forwarding_partial_instantiation_test.dart deleted file mode 100644 index 25df5f6f0b5..00000000000 --- a/tests/language_2/nosuchmethod_forwarding/nosuchmethod_forwarding_partial_instantiation_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2018, 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 - -// Testing that `noSuchMethod` forwarders can be partially instantiated, and -// that their delayed type arguments are transparently passed to `noSuchMethod`. - -import 'package:expect/expect.dart'; - -class C { - T test1(T x); - - dynamic noSuchMethod(Invocation invoke) { - Expect.equals(invoke.typeArguments.length, 1); - Expect.equals(invoke.typeArguments[0].toString(), 'int'); - Expect.equals(invoke.positionalArguments[0], 1); - return null; - } -} - -void main() { - var c = new C(); - int Function(int) k1 = c.test1; - k1(1); -} diff --git a/tests/language_2/nosuchmethod_forwarding/nosuchmethod_forwarding_test.dart b/tests/language_2/nosuchmethod_forwarding/nosuchmethod_forwarding_test.dart deleted file mode 100644 index 4d29890e80b..00000000000 --- a/tests/language_2/nosuchmethod_forwarding/nosuchmethod_forwarding_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2017, 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 - -// Testing that `noSuchMethod` appears to use implicit forwarders (we don't -// care how it's actually implemented, but it should look like that). - -import 'package:expect/expect.dart'; - -// "Template" class: Something to emulate. -class A { - int foo(String s) => s.length; -} - -// Emulate `A`, but only dynamically. -class B { - noSuchMethod(_) => 31; -} - -// Emulate `A`, including its type. -class C implements A { - noSuchMethod(_) => 41; -} - -// Emulate `A` with its type, based on an inherited `noSuchMethod`. -class D extends B implements A {} - -void test(A a, int expectedValue) { - // Regular superinterfaces can be supported by `noSuchMethod`. - Expect.equals(expectedValue, a.foo('Hello!')); //# 04: ok - - // `noSuchMethod` triggers generation of forwarders, so a statically - // known instance method tear-off yields a `Function`, also when invoked - // dynamically. - Expect.isTrue(a.foo is Function); //# 05: ok - Expect.isTrue((a as dynamic).foo is Function); //# 06: ok - - // For an unknown member name the invocation must be dynamic, and in that - // case it does not match a forwarder, but we invoke `noSuchMethod`. - Expect.equals(expectedValue, (a as dynamic).bar); //# 07: ok -} - -main() { - // Dynamic invocations can make a `B` seem to implement `A`. - Expect.equals(31, (new B() as dynamic).foo('Hello!')); //# 01: ok - - // But `noSuchMethod` does not affect the type or interface of a class. - A a; //# 02: continued - Expect.throws(() => a = new B() as dynamic); //# 02: ok - new B().foo('Hello!'); //# 03: compile-time error - - test(new C(), 41); - test(new D(), 31); -} diff --git a/tests/language_2/null/access_error_test.dart b/tests/language_2/null/access_error_test.dart deleted file mode 100644 index 75808fd15b7..00000000000 --- a/tests/language_2/null/access_error_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class NullAccessTest { - static void testNullVariable() { - int variable; - bool exceptionCaught = false; - bool wrongExceptionCaught = false; - try { - variable++; - } on NoSuchMethodError catch (ex) { - exceptionCaught = true; - } catch (ex) { - wrongExceptionCaught = true; - } - Expect.isTrue(exceptionCaught); - Expect.isFalse(wrongExceptionCaught); - } - - static int helperFunction(int parameter) { - return parameter++; - } - - static void testNullFunctionCall() { - int variable; - bool exceptionCaught = false; - bool wrongExceptionCaught = false; - try { - variable = helperFunction(variable); - } on NoSuchMethodError catch (ex) { - exceptionCaught = true; - } catch (ex) { - wrongExceptionCaught = true; - } - Expect.isTrue(exceptionCaught); - Expect.isFalse(wrongExceptionCaught); - } - - static void testMain() { - testNullVariable(); - testNullFunctionCall(); - } -} - -main() { - NullAccessTest.testMain(); -} diff --git a/tests/language_2/null/checked_null_test.dart b/tests/language_2/null/checked_null_test.dart deleted file mode 100644 index f13f61430d9..00000000000 --- a/tests/language_2/null/checked_null_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - Map a; - Comparator b; - // This code exhibited a bug in dart2js, where the type of [a] was inferred to - // be [Comparator] or null; - A() - : b = null, - a = null; -} - -main() { - Expect.throws(bar); -} - -bar() { - // We would create a typed selector for the call to foo, where the - // receiver type is a typedef. Some code in the dart2js backend were - // not dealing correctly with typedefs and lead the compiler to - // crash. - new A().a.foo(); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD - // [cfe] The method 'foo' isn't defined for the class 'Map'. -} diff --git a/tests/language_2/null/checked_runtime_test.dart b/tests/language_2/null/checked_runtime_test.dart deleted file mode 100644 index 20b088a8ef4..00000000000 --- a/tests/language_2/null/checked_runtime_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 "package:expect/expect.dart"; - -class A { - Map a; - Comparator b; - // This code exhibited a bug in dart2js, where the type of [a] was inferred to - // be [Comparator] or null; - A() - : b = null, - a = null; -} - -main() { - -} - -bar() { - // We would create a typed selector for the call to foo, where the - // receiver type is a typedef. Some code in the dart2js backend were - // not dealing correctly with typedefs and lead the compiler to - // crash. - -} diff --git a/tests/language_2/null/inherit_static_errors_test.dart b/tests/language_2/null/inherit_static_errors_test.dart deleted file mode 100644 index 099abb9bf7f..00000000000 --- a/tests/language_2/null/inherit_static_errors_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2022, 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. - -// TODO(https://github.com/dart-lang/sdk/issues/51557): Decide if the mixins -// being applied in this test should be "mixin", "mixin class" or the test -// should be left at 2.19. -// @dart=2.19 - -class BadExtends extends Null {} -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE -// ^ -// [cfe] 'Null' is restricted and can't be extended or implemented. -// [cfe] The superclass, 'Null', has no unnamed constructor that takes no arguments. -// ^ -// [cfe] 'Null' is restricted and can't be extended or implemented. - -class BadImplements implements Null {} -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE -// ^ -// [cfe] 'Null' is restricted and can't be extended or implemented. -// ^ -// [cfe] 'Null' is restricted and can't be extended or implemented. - -class BadMixin extends Object with Null {} -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE -// ^ -// [cfe] 'Null' is restricted and can't be extended or implemented. -// ^ -// [cfe] 'Null' is restricted and can't be extended or implemented. - -class BadMixin2 = Object with Null; -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE -// ^ -// [cfe] 'Null' is restricted and can't be extended or implemented. -// ^ -// [cfe] 'Null' is restricted and can't be extended or implemented. diff --git a/tests/language_2/null/inline_test.dart b/tests/language_2/null/inline_test.dart deleted file mode 100644 index c62383d62f9..00000000000 --- a/tests/language_2/null/inline_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that inlining takes null into account. - -import "package:expect/expect.dart"; - -class A { - foo() => this; -} - -var global; - -main() { - Expect.throws(() => global.foo()); - global = new A(); - Expect.equals(global, global.foo()); -} diff --git a/tests/language_2/null/is2_test.dart b/tests/language_2/null/is2_test.dart deleted file mode 100644 index e8fc8e1709f..00000000000 --- a/tests/language_2/null/is2_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class Test { - foo(a) => a is T; -} - -main() { - Expect.isTrue(new Test().foo(null)); - Expect.isTrue(new Test().foo(null)); - Expect.isFalse(new Test().foo(null)); - Expect.isFalse(null is List); -} diff --git a/tests/language_2/null/is_test.dart b/tests/language_2/null/is_test.dart deleted file mode 100644 index 32478fdd8e6..00000000000 --- a/tests/language_2/null/is_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - Expect.isTrue(null is Object); - Expect.isTrue(null is Null); - Expect.isFalse(null is int); - Expect.isFalse(null is bool); - Expect.isFalse(null is num); - Expect.isFalse(null is String); - Expect.isFalse(null is List); - Expect.isFalse(null is Expect); - - test(null); - - Expect.isFalse(1 is Null); - Expect.isFalse("1" is Null); - Expect.isFalse(true is Null); - Expect.isFalse(false is Null); - Expect.isFalse(new Object() is Null); - - testNegative(1); - testNegative("1"); - testNegative(true); - testNegative(false); - testNegative(new Object()); -} - -test(n) { - // Test where the argument is not a compile-time constant. - Expect.isTrue(n is Object); - Expect.isTrue(n is Null); - Expect.isFalse(n is int); - Expect.isFalse(n is bool); - Expect.isFalse(n is num); - Expect.isFalse(n is String); - Expect.isFalse(n is List); - Expect.isFalse(n is Expect); -} - -testNegative(n) { - Expect.isFalse(n is Null); -} diff --git a/tests/language_2/null/method_test.dart b/tests/language_2/null/method_test.dart deleted file mode 100644 index d8f331e7e8a..00000000000 --- a/tests/language_2/null/method_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to not compile null methods -// in the presence of typed selectors. - -import "package:expect/expect.dart"; - -class C { - foo(s) { - return s.hashCode; - } -} - -main() { - var c = new C(); - Expect.isNotNull(c.foo('foo')); - Expect.isNotNull(c.foo(null)); -} diff --git a/tests/language_2/null/no_such_method_test.dart b/tests/language_2/null/no_such_method_test.dart deleted file mode 100644 index 4f8bba66f66..00000000000 --- a/tests/language_2/null/no_such_method_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -main() { - Expect.throwsNoSuchMethodError(() => -(null as dynamic)); - // Make sure we have an untyped call to operator-. - print(-array[0]); -} - -var array = [1]; diff --git a/tests/language_2/null/null2_test.dart b/tests/language_2/null/null2_test.dart deleted file mode 100644 index cb7a9b410ab..00000000000 --- a/tests/language_2/null/null2_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2014, 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. -// Second dart test program. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Magic incantation to avoid the compiler recognizing the constant values -// at compile time. If the result is computed at compile time, the dynamic code -// will not be tested. -confuse(x) { - try { - if (new DateTime.now().millisecondsSinceEpoch == 42) x = 42; - throw [x]; - } on dynamic catch (e) { - return e[0]; - } - return 42; -} - -main() { - Expect.equals("Null", null.runtimeType.toString()); - Expect.equals("Null", confuse(null).runtimeType.toString()); -} diff --git a/tests/language_2/null/null_test.dart b/tests/language_2/null/null_test.dart deleted file mode 100644 index c7d39dd0168..00000000000 --- a/tests/language_2/null/null_test.dart +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) 2013, 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. -// Second dart test program. - -// @dart = 2.9 - -// VMOptions=--optimization-counter-threshold=90 - -import "package:expect/expect.dart"; - -class EqualsNotCalled { - int get hashCode => throw "And don't warn!"; - bool operator ==(Object other) { - throw "SHOULD NOT GET HERE"; - } -} - -class Generic { - bool test(o) => o is T; - T cast(o) => o as T; - Type get type => T; -} - -class Generic2 { - bool test(o) => new Generic().test(o); - T cast(o) => new Generic().cast(o); - Type get type => new Generic().type; -} - -// Magic incantation to avoid the compiler recognizing the constant values -// at compile time. If the result is computed at compile time, the dynamic code -// will not be tested. -confuse(x) { - try { - if (new DateTime.now().millisecondsSinceEpoch == 42) x = 42; - throw [x]; - } on dynamic catch (e) { - return e[0]; - } - return 42; -} - -void main() { - for (int i = 0; i < 100; i++) { - test(); - } -} - -void test() { - int foo(var obj) { - Expect.equals(null, obj); - } - - bool compareToNull(var value) { - return null == value; - } - - bool compareWithNull(var value) { - return value == null; - } - - var val = 1; - var obj = confuse(null); // Null value that isn't known at compile-time. - Expect.isTrue(identical(obj, null), "identical"); - - Expect.isTrue(null == null); - Expect.isTrue(null == obj); - Expect.isTrue(obj == null); - Expect.isTrue(obj == obj); - - // Using == null or null == will not call any equality method. - Expect.isFalse(new EqualsNotCalled() == null); - Expect.isFalse(null == new EqualsNotCalled()); - Expect.isFalse(new EqualsNotCalled() == obj); - Expect.isFalse(obj == new EqualsNotCalled()); - - Expect.isFalse(null == false); - Expect.isFalse(null == 0); - Expect.isFalse(null == ""); - Expect.isFalse(null == []); - Expect.isFalse(null == 0.0); - Expect.isFalse(null == -0.0); - Expect.isFalse(null == double.nan); - - Expect.isFalse(obj == false); - Expect.isFalse(obj == 0); - Expect.isFalse(obj == ""); - Expect.isFalse(obj == []); - Expect.isFalse(obj == 0.0); - Expect.isFalse(obj == -0.0); - Expect.isFalse(obj == double.nan); - - // Explicit constant expressions. - const t1 = null == null; - const t2 = null == 0; - const t3 = false == null; - Expect.isTrue(t1); - Expect.isFalse(t2); - Expect.isFalse(t3); - - foo(obj); - foo(null); - if (obj != null) { - foo(null); - } else { - foo(obj); - } - - // Test "is" operator. - Expect.isTrue(null is Null); - Expect.isTrue(obj is Null); - Expect.isTrue(null is Object); - Expect.isTrue(obj is Object); - Expect.isTrue(null is dynamic); - Expect.isTrue(obj is dynamic); - Expect.isFalse(null is String); - Expect.isFalse(obj is String); - Expect.isFalse(0 is Null); // It's only assignable. - Expect.isFalse(null is! Null); - Expect.isFalse(obj is! Null); - Expect.isFalse(null is! Object); - Expect.isFalse(obj is! Object); - Expect.isFalse(null is! dynamic); - Expect.isFalse(obj is! dynamic); - Expect.isTrue(null is! String); - Expect.isTrue(obj is! String); - Expect.isTrue(0 is! Null); // It's only assignable. - - // Test "is" operator with generic type variable. - Expect.isTrue(new Generic().test(null)); - Expect.isFalse(new Generic().test(42)); - Expect.isTrue(new Generic2().test(null)); - Expect.isFalse(new Generic2().test(42)); - - // Test cast, "as", operator. - Expect.equals(null, null as Null); - Expect.equals(null, null as Object); - Expect.equals(null, null as int); - Expect.throwsTypeError(() => 42 as Null); - Expect.equals(null, new Generic().cast(null)); - Expect.equals(null, new Generic().cast(null)); - Expect.equals(null, new Generic().cast(null)); - - Expect.equals(null, obj as Null); - Expect.equals(null, obj as Object); - Expect.equals(null, obj as int); - Expect.equals(null, new Generic().cast(obj)); - Expect.equals(null, new Generic().cast(obj)); - Expect.equals(null, new Generic().cast(obj)); - - Expect.equals("null", null.toString()); - Expect.equals("null", "${null}"); - Expect.equals("null", obj.toString()); - Expect.equals("null", "${obj}"); - - Expect.equals(Null, null.runtimeType); - Expect.equals(Null, obj.runtimeType); - Expect.equals(Null, new Generic().type); - Expect.equals(Null, new Generic2().type); - - Expect.isFalse(compareToNull(val)); - Expect.isTrue(compareToNull(obj)); - Expect.isFalse(compareWithNull(val)); - Expect.isTrue(compareWithNull(obj)); - - // Method/value extraction. The runtimeType was checked above, and operator== - // cannot be extracted. - // Currently fails in VM. - Expect.equals(null.toString, obj.toString); - Expect.equals(null.noSuchMethod, obj.noSuchMethod); - Expect.equals(null.hashCode, obj.hashCode); - - var toString = null.toString; - Expect.equals("null", toString()); - Expect.equals("null", Function.apply(toString, [])); - - Expect.throws(() => obj.notDeclared()); - var noSuchMethod = null.noSuchMethod; - // Assign to "dynamic" to prevent compile-time error. - dynamic capture = new CaptureInvocationMirror(); - var mirror = capture.notDeclared(); - Expect.throws(() => noSuchMethod(mirror)); - Expect.throws(() => Function.apply(noSuchMethod, [mirror])); -} - -class CaptureInvocationMirror { - noSuchMethod(mirror) => mirror; -} diff --git a/tests/language_2/null/to_string2_test.dart b/tests/language_2/null/to_string2_test.dart deleted file mode 100644 index 26a40db59b7..00000000000 --- a/tests/language_2/null/to_string2_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2012, 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. -// Test correct handling of NULL object in invocation and implicit closures. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A {} - -A foo() => null; - -main() { - A nullObj = foo(); - var x = nullObj.toString(); - Expect.isTrue(x is String); - var y = nullObj.toString; - Expect.isNotNull(y); -} diff --git a/tests/language_2/null/to_string_test.dart b/tests/language_2/null/to_string_test.dart deleted file mode 100644 index 08a865b8e5c..00000000000 --- a/tests/language_2/null/to_string_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// 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. -// Test correct handling of NULL object in invocation and implicit closures. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - var nullObj = null; - var x = nullObj.toString(); - Expect.isTrue(x is String); - var y = nullObj.toString; - Expect.isNotNull(y); -} diff --git a/tests/language_2/null_aware/access_runtime_1_test.dart b/tests/language_2/null_aware/access_runtime_1_test.dart deleted file mode 100644 index 8cb0707c7cf..00000000000 --- a/tests/language_2/null_aware/access_runtime_1_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it does not appear on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if property access using "?." is not - // implemented. This makes status files easier to maintain. - nullC()?.v; - - // e1?.id is equivalent to ((x) => x == null ? null : x.id)(e1). - Expect.equals(null, nullC()?.v); - - - // C?.id is equivalent to C.id. - - - - // The static type of e1?.d is the static type of e1.id. - - - - - - - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same static warnings that would be caused by y.id are also - // generated in the case of e1?.id. - - - - // '?.' cannot be used to access toplevel properties in libraries imported via - // prefix. - - - // Nor can it be used to access the hashCode getter on the class Type. - - -} diff --git a/tests/language_2/null_aware/access_runtime_2_test.dart b/tests/language_2/null_aware/access_runtime_2_test.dart deleted file mode 100644 index fd00d2b599e..00000000000 --- a/tests/language_2/null_aware/access_runtime_2_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it does not appear on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if property access using "?." is not - // implemented. This makes status files easier to maintain. - nullC()?.v; - - // e1?.id is equivalent to ((x) => x == null ? null : x.id)(e1). - - Expect.equals(1, new C(1)?.v); - - // C?.id is equivalent to C.id. - - - - // The static type of e1?.d is the static type of e1.id. - - - - - - - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same static warnings that would be caused by y.id are also - // generated in the case of e1?.id. - - - - // '?.' cannot be used to access toplevel properties in libraries imported via - // prefix. - - - // Nor can it be used to access the hashCode getter on the class Type. - - -} diff --git a/tests/language_2/null_aware/access_runtime_3_test.dart b/tests/language_2/null_aware/access_runtime_3_test.dart deleted file mode 100644 index 0db61029952..00000000000 --- a/tests/language_2/null_aware/access_runtime_3_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it does not appear on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if property access using "?." is not - // implemented. This makes status files easier to maintain. - nullC()?.v; - - // e1?.id is equivalent to ((x) => x == null ? null : x.id)(e1). - - - - // C?.id is equivalent to C.id. - { C.staticInt = 1; Expect.equals(1, C?.staticInt); } - - - // The static type of e1?.d is the static type of e1.id. - - - - - - - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same static warnings that would be caused by y.id are also - // generated in the case of e1?.id. - - - - // '?.' cannot be used to access toplevel properties in libraries imported via - // prefix. - - - // Nor can it be used to access the hashCode getter on the class Type. - - -} diff --git a/tests/language_2/null_aware/access_runtime_4_test.dart b/tests/language_2/null_aware/access_runtime_4_test.dart deleted file mode 100644 index 8e664c95bdf..00000000000 --- a/tests/language_2/null_aware/access_runtime_4_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it does not appear on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if property access using "?." is not - // implemented. This makes status files easier to maintain. - nullC()?.v; - - // e1?.id is equivalent to ((x) => x == null ? null : x.id)(e1). - - - - // C?.id is equivalent to C.id. - - { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt); } - - // The static type of e1?.d is the static type of e1.id. - - - - - - - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same static warnings that would be caused by y.id are also - // generated in the case of e1?.id. - - - - // '?.' cannot be used to access toplevel properties in libraries imported via - // prefix. - - - // Nor can it be used to access the hashCode getter on the class Type. - - -} diff --git a/tests/language_2/null_aware/access_runtime_5_test.dart b/tests/language_2/null_aware/access_runtime_5_test.dart deleted file mode 100644 index 065ced133b9..00000000000 --- a/tests/language_2/null_aware/access_runtime_5_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it does not appear on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if property access using "?." is not - // implemented. This makes status files easier to maintain. - nullC()?.v; - - // e1?.id is equivalent to ((x) => x == null ? null : x.id)(e1). - - - - // C?.id is equivalent to C.id. - - - - // The static type of e1?.d is the static type of e1.id. - { int i = new C(1)?.v; Expect.equals(1, i); } - - - - - - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same static warnings that would be caused by y.id are also - // generated in the case of e1?.id. - - - - // '?.' cannot be used to access toplevel properties in libraries imported via - // prefix. - - - // Nor can it be used to access the hashCode getter on the class Type. - - -} diff --git a/tests/language_2/null_aware/access_runtime_6_test.dart b/tests/language_2/null_aware/access_runtime_6_test.dart deleted file mode 100644 index 73fb9f1aa38..00000000000 --- a/tests/language_2/null_aware/access_runtime_6_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it does not appear on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if property access using "?." is not - // implemented. This makes status files easier to maintain. - nullC()?.v; - - // e1?.id is equivalent to ((x) => x == null ? null : x.id)(e1). - - - - // C?.id is equivalent to C.id. - - - - // The static type of e1?.d is the static type of e1.id. - - - { C.staticInt = 1; int i = C?.staticInt; Expect.equals(1, i); } - - - - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same static warnings that would be caused by y.id are also - // generated in the case of e1?.id. - - - - // '?.' cannot be used to access toplevel properties in libraries imported via - // prefix. - - - // Nor can it be used to access the hashCode getter on the class Type. - - -} diff --git a/tests/language_2/null_aware/access_runtime_7_test.dart b/tests/language_2/null_aware/access_runtime_7_test.dart deleted file mode 100644 index 2c17b29b8f6..00000000000 --- a/tests/language_2/null_aware/access_runtime_7_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it does not appear on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if property access using "?." is not - // implemented. This makes status files easier to maintain. - nullC()?.v; - - // e1?.id is equivalent to ((x) => x == null ? null : x.id)(e1). - - - - // C?.id is equivalent to C.id. - - - - // The static type of e1?.d is the static type of e1.id. - - - - { h.C.staticInt = 1; int i = h.C?.staticInt; Expect.equals(1, i); } - - - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same static warnings that would be caused by y.id are also - // generated in the case of e1?.id. - - - - // '?.' cannot be used to access toplevel properties in libraries imported via - // prefix. - - - // Nor can it be used to access the hashCode getter on the class Type. - - -} diff --git a/tests/language_2/null_aware/access_runtime_test.dart b/tests/language_2/null_aware/access_runtime_test.dart deleted file mode 100644 index f28fcc40db8..00000000000 --- a/tests/language_2/null_aware/access_runtime_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it does not appear on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if property access using "?." is not - // implemented. This makes status files easier to maintain. - nullC()?.v; - - // e1?.id is equivalent to ((x) => x == null ? null : x.id)(e1). - - - - // C?.id is equivalent to C.id. - - - - // The static type of e1?.d is the static type of e1.id. - - - - - - - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same static warnings that would be caused by y.id are also - // generated in the case of e1?.id. - - - - // '?.' cannot be used to access toplevel properties in libraries imported via - // prefix. - - - // Nor can it be used to access the hashCode getter on the class Type. - - -} diff --git a/tests/language_2/null_aware/access_test.dart b/tests/language_2/null_aware/access_test.dart deleted file mode 100644 index 9b5ec26921c..00000000000 --- a/tests/language_2/null_aware/access_test.dart +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2015, 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 - -// Verify semantics of the ?. operator when it does not appear on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if property access using "?." is not - // implemented. This makes status files easier to maintain. - nullC()?.v; - - // e1?.id is equivalent to ((x) => x == null ? null : x.id)(e1). - Expect.equals(null, nullC()?.v); - Expect.equals(1, new C(1)?.v); - - // C?.id is equivalent to C.id. - { C.staticInt = 1; Expect.equals(1, C?.staticInt); } - { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt); } - - // The static type of e1?.d is the static type of e1.id. - { int i = new C(1)?.v; Expect.equals(1, i); } - { String s = new C(null)?.v; Expect.equals(null, s); } - // ^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'int' can't be assigned to a variable of type 'String'. - { C.staticInt = 1; int i = C?.staticInt; Expect.equals(1, i); } - { h.C.staticInt = 1; int i = h.C?.staticInt; Expect.equals(1, i); } - { C.staticInt = null; String s = C?.staticInt; Expect.equals(null, s); } - // ^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'int' can't be assigned to a variable of type 'String'. - { h.C.staticInt = null; String s = h.C?.staticInt; Expect.equals(null, s); } - // ^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'int' can't be assigned to a variable of type 'String'. - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same static warnings that would be caused by y.id are also - // generated in the case of e1?.id. - Expect.equals(null, nullC()?.bad); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'bad' isn't defined for the class 'C'. - { B b = new C(1); Expect.equals(1, b?.v); } - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'v' isn't defined for the class 'B'. - - // '?.' cannot be used to access toplevel properties in libraries imported via - // prefix. - var x = h?.topLevelVar; - // ^ - // [analyzer] COMPILE_TIME_ERROR.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT - // [cfe] A prefix can't be used with null-aware operators. - - // Nor can it be used to access the hashCode getter on the class Type. - Expect.throwsNoSuchMethodError(() => C?.hashCode); - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] Member not found: 'hashCode'. - Expect.throwsNoSuchMethodError(() => h.C?.hashCode); - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] Member not found: 'hashCode'. -} diff --git a/tests/language_2/null_aware/assignment_runtime_10_test.dart b/tests/language_2/null_aware/assignment_runtime_10_test.dart deleted file mode 100644 index 038604b12c9..00000000000 --- a/tests/language_2/null_aware/assignment_runtime_10_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1). - - - - // C?.v = e2 is equivalent to C.v = e2. - - - - // The static type of e1?.v = e2 is the static type of e2. - - - - - - - - // Exactly the same errors that would be caused by e1.v = e2 are - // also generated in the case of e1?.v = e2. - - - - // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1). - - - - // C?.v op= e2 is equivalent to C.v op= e2. - { C.staticInt = 1; Expect.equals(3, C?.staticInt += 2); Expect.equals(3, C?.staticInt); } - - // The static type of e1?.v op= e2 is the static type of e1.v op e2. - - - - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same errors that would be caused by y.v op e2 are - // also generated in the case of e1?.v op= e2. - - - - - - - - - - // '?.' cannot be used to assign to toplevel properties in libraries imported - // via prefix. - - - -} diff --git a/tests/language_2/null_aware/assignment_runtime_11_test.dart b/tests/language_2/null_aware/assignment_runtime_11_test.dart deleted file mode 100644 index d7e0c81dee7..00000000000 --- a/tests/language_2/null_aware/assignment_runtime_11_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1). - - - - // C?.v = e2 is equivalent to C.v = e2. - - - - // The static type of e1?.v = e2 is the static type of e2. - - - - - - - - // Exactly the same errors that would be caused by e1.v = e2 are - // also generated in the case of e1?.v = e2. - - - - // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1). - - - - // C?.v op= e2 is equivalent to C.v op= e2. - - - // The static type of e1?.v op= e2 is the static type of e1.v op e2. - { D d = new D(new E()); F f = (d?.v += 1); Expect.identical(d.v, f); } - - - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same errors that would be caused by y.v op e2 are - // also generated in the case of e1?.v op= e2. - - - - - - - - - - // '?.' cannot be used to assign to toplevel properties in libraries imported - // via prefix. - - - -} diff --git a/tests/language_2/null_aware/assignment_runtime_12_test.dart b/tests/language_2/null_aware/assignment_runtime_12_test.dart deleted file mode 100644 index 18a228a1a65..00000000000 --- a/tests/language_2/null_aware/assignment_runtime_12_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1). - - - - // C?.v = e2 is equivalent to C.v = e2. - - - - // The static type of e1?.v = e2 is the static type of e2. - - - - - - - - // Exactly the same errors that would be caused by e1.v = e2 are - // also generated in the case of e1?.v = e2. - - - - // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1). - - - - // C?.v op= e2 is equivalent to C.v op= e2. - - - // The static type of e1?.v op= e2 is the static type of e1.v op e2. - - { D.staticE = new E(); F f = (D?.staticE += 1); Expect.identical(D.staticE, f); } - - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same errors that would be caused by y.v op e2 are - // also generated in the case of e1?.v op= e2. - - - - - - - - - - // '?.' cannot be used to assign to toplevel properties in libraries imported - // via prefix. - - - -} diff --git a/tests/language_2/null_aware/assignment_runtime_13_test.dart b/tests/language_2/null_aware/assignment_runtime_13_test.dart deleted file mode 100644 index bcb1be37e9d..00000000000 --- a/tests/language_2/null_aware/assignment_runtime_13_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1). - - - - // C?.v = e2 is equivalent to C.v = e2. - - - - // The static type of e1?.v = e2 is the static type of e2. - - - - - - - - // Exactly the same errors that would be caused by e1.v = e2 are - // also generated in the case of e1?.v = e2. - - - - // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1). - - - - // C?.v op= e2 is equivalent to C.v op= e2. - - - // The static type of e1?.v op= e2 is the static type of e1.v op e2. - - - { h.D.staticE = new h.E(); h.F f = (h.D?.staticE += 1); Expect.identical(h.D.staticE, f); } - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same errors that would be caused by y.v op e2 are - // also generated in the case of e1?.v op= e2. - - - - - - - - - - // '?.' cannot be used to assign to toplevel properties in libraries imported - // via prefix. - - - -} diff --git a/tests/language_2/null_aware/assignment_runtime_1_test.dart b/tests/language_2/null_aware/assignment_runtime_1_test.dart deleted file mode 100644 index 2f114730189..00000000000 --- a/tests/language_2/null_aware/assignment_runtime_1_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1). - Expect.equals(null, nullC()?.v = bad()); - - - // C?.v = e2 is equivalent to C.v = e2. - - - - // The static type of e1?.v = e2 is the static type of e2. - - - - - - - - // Exactly the same errors that would be caused by e1.v = e2 are - // also generated in the case of e1?.v = e2. - - - - // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1). - - - - // C?.v op= e2 is equivalent to C.v op= e2. - - - // The static type of e1?.v op= e2 is the static type of e1.v op e2. - - - - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same errors that would be caused by y.v op e2 are - // also generated in the case of e1?.v op= e2. - - - - - - - - - - // '?.' cannot be used to assign to toplevel properties in libraries imported - // via prefix. - - - -} diff --git a/tests/language_2/null_aware/assignment_runtime_2_test.dart b/tests/language_2/null_aware/assignment_runtime_2_test.dart deleted file mode 100644 index d286599c0a4..00000000000 --- a/tests/language_2/null_aware/assignment_runtime_2_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1). - - { C c = new C(1); Expect.equals(2, c?.v = 2); Expect.equals(2, c.v); } - - // C?.v = e2 is equivalent to C.v = e2. - - - - // The static type of e1?.v = e2 is the static type of e2. - - - - - - - - // Exactly the same errors that would be caused by e1.v = e2 are - // also generated in the case of e1?.v = e2. - - - - // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1). - - - - // C?.v op= e2 is equivalent to C.v op= e2. - - - // The static type of e1?.v op= e2 is the static type of e1.v op e2. - - - - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same errors that would be caused by y.v op e2 are - // also generated in the case of e1?.v op= e2. - - - - - - - - - - // '?.' cannot be used to assign to toplevel properties in libraries imported - // via prefix. - - - -} diff --git a/tests/language_2/null_aware/assignment_runtime_3_test.dart b/tests/language_2/null_aware/assignment_runtime_3_test.dart deleted file mode 100644 index 4f10b56ba04..00000000000 --- a/tests/language_2/null_aware/assignment_runtime_3_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1). - - - - // C?.v = e2 is equivalent to C.v = e2. - { C.staticInt = 1; Expect.equals(2, C?.staticInt = 2); Expect.equals(2, C.staticInt); } - - - // The static type of e1?.v = e2 is the static type of e2. - - - - - - - - // Exactly the same errors that would be caused by e1.v = e2 are - // also generated in the case of e1?.v = e2. - - - - // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1). - - - - // C?.v op= e2 is equivalent to C.v op= e2. - - - // The static type of e1?.v op= e2 is the static type of e1.v op e2. - - - - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same errors that would be caused by y.v op e2 are - // also generated in the case of e1?.v op= e2. - - - - - - - - - - // '?.' cannot be used to assign to toplevel properties in libraries imported - // via prefix. - - - -} diff --git a/tests/language_2/null_aware/assignment_runtime_4_test.dart b/tests/language_2/null_aware/assignment_runtime_4_test.dart deleted file mode 100644 index ce893457755..00000000000 --- a/tests/language_2/null_aware/assignment_runtime_4_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1). - - - - // C?.v = e2 is equivalent to C.v = e2. - - { h.C.staticInt = 1; Expect.equals(2, h.C?.staticInt = 2); Expect.equals(2, h.C.staticInt); } - - // The static type of e1?.v = e2 is the static type of e2. - - - - - - - - // Exactly the same errors that would be caused by e1.v = e2 are - // also generated in the case of e1?.v = e2. - - - - // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1). - - - - // C?.v op= e2 is equivalent to C.v op= e2. - - - // The static type of e1?.v op= e2 is the static type of e1.v op e2. - - - - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same errors that would be caused by y.v op e2 are - // also generated in the case of e1?.v op= e2. - - - - - - - - - - // '?.' cannot be used to assign to toplevel properties in libraries imported - // via prefix. - - - -} diff --git a/tests/language_2/null_aware/assignment_runtime_5_test.dart b/tests/language_2/null_aware/assignment_runtime_5_test.dart deleted file mode 100644 index 6d2e41ebb48..00000000000 --- a/tests/language_2/null_aware/assignment_runtime_5_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1). - - - - // C?.v = e2 is equivalent to C.v = e2. - - - - // The static type of e1?.v = e2 is the static type of e2. - { D d = new D(new E()); G g = new G(); F f = (d?.v = g); Expect.identical(f, g); } - - - - - - - // Exactly the same errors that would be caused by e1.v = e2 are - // also generated in the case of e1?.v = e2. - - - - // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1). - - - - // C?.v op= e2 is equivalent to C.v op= e2. - - - // The static type of e1?.v op= e2 is the static type of e1.v op e2. - - - - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same errors that would be caused by y.v op e2 are - // also generated in the case of e1?.v op= e2. - - - - - - - - - - // '?.' cannot be used to assign to toplevel properties in libraries imported - // via prefix. - - - -} diff --git a/tests/language_2/null_aware/assignment_runtime_6_test.dart b/tests/language_2/null_aware/assignment_runtime_6_test.dart deleted file mode 100644 index 915a914f684..00000000000 --- a/tests/language_2/null_aware/assignment_runtime_6_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1). - - - - // C?.v = e2 is equivalent to C.v = e2. - - - - // The static type of e1?.v = e2 is the static type of e2. - - - { D.staticE = new E(); G g = new G(); F f = (D?.staticE = g); Expect.identical(f, g); } - - - - - // Exactly the same errors that would be caused by e1.v = e2 are - // also generated in the case of e1?.v = e2. - - - - // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1). - - - - // C?.v op= e2 is equivalent to C.v op= e2. - - - // The static type of e1?.v op= e2 is the static type of e1.v op e2. - - - - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same errors that would be caused by y.v op e2 are - // also generated in the case of e1?.v op= e2. - - - - - - - - - - // '?.' cannot be used to assign to toplevel properties in libraries imported - // via prefix. - - - -} diff --git a/tests/language_2/null_aware/assignment_runtime_7_test.dart b/tests/language_2/null_aware/assignment_runtime_7_test.dart deleted file mode 100644 index a75fcaf9a7d..00000000000 --- a/tests/language_2/null_aware/assignment_runtime_7_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1). - - - - // C?.v = e2 is equivalent to C.v = e2. - - - - // The static type of e1?.v = e2 is the static type of e2. - - - - { h.D.staticE = new h.E(); h.G g = new h.G(); h.F f = (h.D?.staticE = g); Expect.identical(f, g); } - - - - // Exactly the same errors that would be caused by e1.v = e2 are - // also generated in the case of e1?.v = e2. - - - - // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1). - - - - // C?.v op= e2 is equivalent to C.v op= e2. - - - // The static type of e1?.v op= e2 is the static type of e1.v op e2. - - - - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same errors that would be caused by y.v op e2 are - // also generated in the case of e1?.v op= e2. - - - - - - - - - - // '?.' cannot be used to assign to toplevel properties in libraries imported - // via prefix. - - - -} diff --git a/tests/language_2/null_aware/assignment_runtime_8_test.dart b/tests/language_2/null_aware/assignment_runtime_8_test.dart deleted file mode 100644 index 84767100408..00000000000 --- a/tests/language_2/null_aware/assignment_runtime_8_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1). - - - - // C?.v = e2 is equivalent to C.v = e2. - - - - // The static type of e1?.v = e2 is the static type of e2. - - - - - - - - // Exactly the same errors that would be caused by e1.v = e2 are - // also generated in the case of e1?.v = e2. - - - - // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1). - Expect.equals(null, nullC()?.v += bad()); - - - // C?.v op= e2 is equivalent to C.v op= e2. - - - // The static type of e1?.v op= e2 is the static type of e1.v op e2. - - - - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same errors that would be caused by y.v op e2 are - // also generated in the case of e1?.v op= e2. - - - - - - - - - - // '?.' cannot be used to assign to toplevel properties in libraries imported - // via prefix. - - - -} diff --git a/tests/language_2/null_aware/assignment_runtime_9_test.dart b/tests/language_2/null_aware/assignment_runtime_9_test.dart deleted file mode 100644 index 7664f449cbd..00000000000 --- a/tests/language_2/null_aware/assignment_runtime_9_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1). - - - - // C?.v = e2 is equivalent to C.v = e2. - - - - // The static type of e1?.v = e2 is the static type of e2. - - - - - - - - // Exactly the same errors that would be caused by e1.v = e2 are - // also generated in the case of e1?.v = e2. - - - - // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1). - - { C c = new C(1); Expect.equals(3, c?.v += 2); Expect.equals(3, c.v); } - - // C?.v op= e2 is equivalent to C.v op= e2. - - - // The static type of e1?.v op= e2 is the static type of e1.v op e2. - - - - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same errors that would be caused by y.v op e2 are - // also generated in the case of e1?.v op= e2. - - - - - - - - - - // '?.' cannot be used to assign to toplevel properties in libraries imported - // via prefix. - - - -} diff --git a/tests/language_2/null_aware/assignment_runtime_test.dart b/tests/language_2/null_aware/assignment_runtime_test.dart deleted file mode 100644 index bc52d425abf..00000000000 --- a/tests/language_2/null_aware/assignment_runtime_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1). - - - - // C?.v = e2 is equivalent to C.v = e2. - - - - // The static type of e1?.v = e2 is the static type of e2. - - - - - - - - // Exactly the same errors that would be caused by e1.v = e2 are - // also generated in the case of e1?.v = e2. - - - - // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1). - - - - // C?.v op= e2 is equivalent to C.v op= e2. - - - // The static type of e1?.v op= e2 is the static type of e1.v op e2. - - - - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same errors that would be caused by y.v op e2 are - // also generated in the case of e1?.v op= e2. - - - - - - - - - - // '?.' cannot be used to assign to toplevel properties in libraries imported - // via prefix. - - - -} diff --git a/tests/language_2/null_aware/assignment_test.dart b/tests/language_2/null_aware/assignment_test.dart deleted file mode 100644 index ac9dbeda3d3..00000000000 --- a/tests/language_2/null_aware/assignment_test.dart +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) 2015, 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 - -// Verify semantics of the ?. operator when it appears on the LHS of an -// assignment. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1). - Expect.equals(null, nullC()?.v = bad()); - { C c = new C(1); Expect.equals(2, c?.v = 2); Expect.equals(2, c.v); } - - // C?.v = e2 is equivalent to C.v = e2. - { C.staticInt = 1; Expect.equals(2, C?.staticInt = 2); Expect.equals(2, C.staticInt); } - { h.C.staticInt = 1; Expect.equals(2, h.C?.staticInt = 2); Expect.equals(2, h.C.staticInt); } - - // The static type of e1?.v = e2 is the static type of e2. - { D d = new D(new E()); G g = new G(); F f = (d?.v = g); Expect.identical(f, g); } - { D d = new D(new E()); E e = new G(); F f = (d?.v = e); } - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'E' can't be assigned to a variable of type 'F'. - { D.staticE = new E(); G g = new G(); F f = (D?.staticE = g); Expect.identical(f, g); } - { h.D.staticE = new h.E(); h.G g = new h.G(); h.F f = (h.D?.staticE = g); Expect.identical(f, g); } - { D.staticE = new E(); E e = new G(); F f = (D?.staticE = e); } - // ^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'E' can't be assigned to a variable of type 'F'. - { h.D.staticE = new h.E(); h.E e = new h.G(); h.F f = (h.D?.staticE = e); } - // ^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'E' can't be assigned to a variable of type 'F'. - - // Exactly the same errors that would be caused by e1.v = e2 are - // also generated in the case of e1?.v = e2. - Expect.equals(null, nullC()?.bad = bad()); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER - // [cfe] The setter 'bad' isn't defined for the class 'C'. - { B b = new C(1); Expect.equals(2, b?.v = 2); } - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER - // [cfe] The setter 'v' isn't defined for the class 'B'. - - // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1). - Expect.equals(null, nullC()?.v += bad()); - { C c = new C(1); Expect.equals(3, c?.v += 2); Expect.equals(3, c.v); } - - // C?.v op= e2 is equivalent to C.v op= e2. - { C.staticInt = 1; Expect.equals(3, C?.staticInt += 2); Expect.equals(3, C?.staticInt); } - - // The static type of e1?.v op= e2 is the static type of e1.v op e2. - { D d = new D(new E()); F f = (d?.v += 1); Expect.identical(d.v, f); } - { D.staticE = new E(); F f = (D?.staticE += 1); Expect.identical(D.staticE, f); } - { h.D.staticE = new h.E(); h.F f = (h.D?.staticE += 1); Expect.identical(h.D.staticE, f); } - - // Let T be the static type of e1 and let y be a fresh variable of type T. - // Exactly the same errors that would be caused by y.v op e2 are - // also generated in the case of e1?.v op= e2. - nullC()?.bad = bad(); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER - // [cfe] The setter 'bad' isn't defined for the class 'C'. - { B b = new C(1); b?.v += 2; } - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER - // [cfe] The getter 'v' isn't defined for the class 'B'. - // [cfe] The setter 'v' isn't defined for the class 'B'. - { D d = new D(new E()); F f = (d?.v += nullC()); } - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] A value of type 'C' can't be assigned to a variable of type 'int'. - { D d = new D(new E()); H h = (d?.v += 1); } - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'G' can't be assigned to a variable of type 'H'. - { D.staticE = new E(); F f = (D?.staticE += nullC()); } - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] A value of type 'C' can't be assigned to a variable of type 'int'. - { h.D.staticE = new h.E(); h.F f = (h.D?.staticE += h.nullC()); } - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // ^ - // [cfe] A value of type 'C' can't be assigned to a variable of type 'int'. - { D.staticE = new E(); H h = (D?.staticE += 1); } - // ^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'G' can't be assigned to a variable of type 'H'. - { h.D.staticE = new h.E(); h.H hh = (h.D?.staticE += 1); } - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'G' can't be assigned to a variable of type 'H'. - - // '?.' cannot be used to assign to toplevel properties in libraries imported - // via prefix. - h?.topLevelVar = null; -//^ -// [analyzer] COMPILE_TIME_ERROR.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT -// [cfe] A prefix can't be used with null-aware operators. -// ^ -// [cfe] Can't assign to this. - h?.topLevelVar += null; -//^ -// [analyzer] COMPILE_TIME_ERROR.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT -// [cfe] A prefix can't be used with null-aware operators. -// ^ -// [cfe] Can't assign to this. - h?.topLevelVar ??= null; -//^ -// [analyzer] COMPILE_TIME_ERROR.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT -// [cfe] A prefix can't be used with null-aware operators. -// ^ -// [cfe] Can't assign to this. -} diff --git a/tests/language_2/null_aware/conditional_access_helper.dart b/tests/language_2/null_aware/conditional_access_helper.dart deleted file mode 100644 index 82e21a06b42..00000000000 --- a/tests/language_2/null_aware/conditional_access_helper.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2015, 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 used by conditional_property_assignment_test.dart, -// conditional_property_access_test.dart, and -// conditional_method_invocation_test.dart, all of which import it using the -// prefix "h.". - -library lib; - -var topLevelVar; - -void topLevelFunction() {} - -class C { - static int staticInt; - static staticF(callback()) => callback(); - static int staticG(int callback()) => callback(); -} - -C nullC() => null; - -class D { - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} diff --git a/tests/language_2/null_aware/dynamic_test.dart b/tests/language_2/null_aware/dynamic_test.dart deleted file mode 100644 index ce76d1a8ddc..00000000000 --- a/tests/language_2/null_aware/dynamic_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2017, 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 - -import 'package:expect/expect.dart'; - -void main() { - dynamic l; - var val = l?.first?.abs(); - Expect.equals(null, val); - l = [null, -2, -3]; - val = l?.first?.abs(); - Expect.equals(null, val); - l = [-1, -2, -3]; - val = l?.first?.abs(); - Expect.equals(1, val); -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_10_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_10_test.dart deleted file mode 100644 index c1431f55a1d..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_10_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - { C.staticInt = 1; Expect.equals(1, C?.staticInt--); Expect.equals(0, C.staticInt); } - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_11_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_11_test.dart deleted file mode 100644 index adf946081b9..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_11_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt--); Expect.equals(0, h.C.staticInt); } - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_12_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_12_test.dart deleted file mode 100644 index 7d176e3a391..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_12_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - { E e1 = new E(); D d = new D(e1); E e2 = d?.v--; Expect.identical(e1, e2); } - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_13_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_13_test.dart deleted file mode 100644 index 46d5e481803..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_13_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - { E e1 = new E(); D.staticE = e1; E e2 = D?.staticE--; Expect.identical(e1, e2); } - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_14_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_14_test.dart deleted file mode 100644 index d07a250b2ae..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_14_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - { h.E e1 = new h.E(); h.D.staticE = e1; h.E e2 = h.D?.staticE--; Expect.identical(e1, e2); } - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_15_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_15_test.dart deleted file mode 100644 index bd88fdd0596..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_15_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - Expect.equals(null, ++nullC()?.v); - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_16_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_16_test.dart deleted file mode 100644 index b51bf10ca3d..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_16_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - { C c = new C(1); Expect.equals(2, ++c?.v); Expect.equals(2, c.v); } - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_17_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_17_test.dart deleted file mode 100644 index 571d2ca1470..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_17_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - { C.staticInt = 1; Expect.equals(2, ++C?.staticInt); Expect.equals(2, C.staticInt); } - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_18_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_18_test.dart deleted file mode 100644 index 088ef8ea4b0..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_18_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - { h.C.staticInt = 1; Expect.equals(2, ++h.C?.staticInt); Expect.equals(2, h.C.staticInt); } - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_19_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_19_test.dart deleted file mode 100644 index 8306967bdc7..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_19_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - { D d = new D(new E()); F f = ++d?.v; Expect.identical(d.v, f); } - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_1_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_1_test.dart deleted file mode 100644 index 64576987410..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_1_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - Expect.equals(null, nullC()?.v++); - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_20_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_20_test.dart deleted file mode 100644 index 5e1f48bee92..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_20_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - { D.staticE = new E(); F f = ++D?.staticE; Expect.identical(D.staticE, f); } - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_21_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_21_test.dart deleted file mode 100644 index 3ee89828297..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_21_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - { h.D.staticE = new h.E(); h.F f = ++h.D?.staticE; Expect.identical(h.D.staticE, f); } - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_22_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_22_test.dart deleted file mode 100644 index fda1113f9a3..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_22_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - Expect.equals(null, --nullC()?.v); - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_23_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_23_test.dart deleted file mode 100644 index ec140f0a76d..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_23_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - { C c = new C(1); Expect.equals(0, --c?.v); Expect.equals(0, c.v); } - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_24_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_24_test.dart deleted file mode 100644 index 1d0d057e1f2..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_24_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - { C.staticInt = 1; Expect.equals(0, --C?.staticInt); Expect.equals(0, C.staticInt); } - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_25_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_25_test.dart deleted file mode 100644 index 54b419417b8..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_25_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - { h.C.staticInt = 1; Expect.equals(0, --h.C?.staticInt); Expect.equals(0, h.C.staticInt); } - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_26_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_26_test.dart deleted file mode 100644 index 95582eb9290..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_26_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - { D d = new D(new E()); F f = --d?.v; Expect.identical(d.v, f); } - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_27_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_27_test.dart deleted file mode 100644 index 14489c25667..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_27_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - { D.staticE = new E(); F f = --D?.staticE; Expect.identical(D.staticE, f); } - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_28_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_28_test.dart deleted file mode 100644 index aee46fe5937..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_28_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - { h.D.staticE = new h.E(); h.F f = --h.D?.staticE; Expect.identical(h.D.staticE, f); } - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_2_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_2_test.dart deleted file mode 100644 index fffdcd9bca3..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_2_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - { C c = new C(1); Expect.equals(1, c?.v++); Expect.equals(2, c.v); } - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_3_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_3_test.dart deleted file mode 100644 index 5cf0193d110..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_3_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - { C.staticInt = 1; Expect.equals(1, C?.staticInt++); Expect.equals(2, C.staticInt); } - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_4_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_4_test.dart deleted file mode 100644 index 3d736295799..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_4_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt++); Expect.equals(2, h.C.staticInt); } - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_5_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_5_test.dart deleted file mode 100644 index 5c56056232a..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_5_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - { E e1 = new E(); D d = new D(e1); E e2 = d?.v++; Expect.identical(e1, e2); } - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_6_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_6_test.dart deleted file mode 100644 index 823cd5e2585..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_6_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - { E e1 = new E(); D.staticE = e1; E e2 = D?.staticE++; Expect.identical(e1, e2); } - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_7_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_7_test.dart deleted file mode 100644 index 627a4782f51..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_7_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - { h.E e1 = new h.E(); h.D.staticE = e1; h.E e2 = h.D?.staticE++; Expect.identical(e1, e2); } - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_8_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_8_test.dart deleted file mode 100644 index 1b75510094a..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_8_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - Expect.equals(null, nullC()?.v--); - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_9_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_9_test.dart deleted file mode 100644 index 7afd7dc338c..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_9_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - { C c = new C(1); Expect.equals(1, c?.v--); Expect.equals(0, c.v); } - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_runtime_test.dart b/tests/language_2/null_aware/increment_decrement_runtime_test.dart deleted file mode 100644 index 8671ce70f03..00000000000 --- a/tests/language_2/null_aware/increment_decrement_runtime_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - - - - // C?.v++ is equivalent to C.v++. - - - - // The static type of e1?.v++ is the same as the static type of e1.v. - - - - - - - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - - - - // C?.v-- is equivalent to C.v--. - - - - // The static type of e1?.v-- is the same as the static type of e1.v. - - - - - - - - // ++e1?.v is equivalent to e1?.v += 1. - - - - // ++C?.v is equivalent to C?.v += 1. - - - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - - - - - - - - // --e1?.v is equivalent to e1?.v -= 1. - - - - // --C?.v is equivalent to C?.v -= 1. - - - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - - - - - - -} diff --git a/tests/language_2/null_aware/increment_decrement_test.dart b/tests/language_2/null_aware/increment_decrement_test.dart deleted file mode 100644 index 1b688ee1463..00000000000 --- a/tests/language_2/null_aware/increment_decrement_test.dart +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) 2015, 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 - -// Verify semantics of the ?. operator when it appears in a postincrement or -// preincrement expression (or a postdecrement or predecrement expression). - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -class C { - int v; - C(this.v); - static int staticInt; -} - -class D { - E v; - D(this.v); - static E staticE; -} - -class E { - G operator +(int i) => new I(); - G operator -(int i) => new I(); -} - -class F {} - -class G extends E implements F {} - -class H {} - -class I extends G implements H {} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if assignment to "?." is not implemented. - // This makes status files easier to maintain. - nullC()?.v = 1; - - // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1). - Expect.equals(null, nullC()?.v++); - { C c = new C(1); Expect.equals(1, c?.v++); Expect.equals(2, c.v); } - - // C?.v++ is equivalent to C.v++. - { C.staticInt = 1; Expect.equals(1, C?.staticInt++); Expect.equals(2, C.staticInt); } - { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt++); Expect.equals(2, h.C.staticInt); } - - // The static type of e1?.v++ is the same as the static type of e1.v. - { E e1 = new E(); D d = new D(e1); E e2 = d?.v++; Expect.identical(e1, e2); } - { G g = new G(); D d = new D(g); F f = d?.v++; Expect.identical(f, g); } - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'E' can't be assigned to a variable of type 'F'. - { E e1 = new E(); D.staticE = e1; E e2 = D?.staticE++; Expect.identical(e1, e2); } - { h.E e1 = new h.E(); h.D.staticE = e1; h.E e2 = h.D?.staticE++; Expect.identical(e1, e2); } - { G g = new G(); D.staticE = g; F f = D?.staticE++; Expect.identical(f, g); } - // ^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'E' can't be assigned to a variable of type 'F'. - { h.G g = new h.G(); h.D.staticE = g; h.F f = h.D?.staticE++; Expect.identical(f, g); } - // ^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'E' can't be assigned to a variable of type 'F'. - - // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1). - Expect.equals(null, nullC()?.v--); - { C c = new C(1); Expect.equals(1, c?.v--); Expect.equals(0, c.v); } - - // C?.v-- is equivalent to C.v--. - { C.staticInt = 1; Expect.equals(1, C?.staticInt--); Expect.equals(0, C.staticInt); } - { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt--); Expect.equals(0, h.C.staticInt); } - - // The static type of e1?.v-- is the same as the static type of e1.v. - { E e1 = new E(); D d = new D(e1); E e2 = d?.v--; Expect.identical(e1, e2); } - { G g = new G(); D d = new D(g); F f = d?.v--; Expect.identical(f, g); } - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'E' can't be assigned to a variable of type 'F'. - { E e1 = new E(); D.staticE = e1; E e2 = D?.staticE--; Expect.identical(e1, e2); } - { h.E e1 = new h.E(); h.D.staticE = e1; h.E e2 = h.D?.staticE--; Expect.identical(e1, e2); } - { G g = new G(); D.staticE = g; F f = D?.staticE--; Expect.identical(f, g); } - // ^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'E' can't be assigned to a variable of type 'F'. - { h.G g = new h.G(); h.D.staticE = g; h.F f = h.D?.staticE--; Expect.identical(f, g); } - // ^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'E' can't be assigned to a variable of type 'F'. - - // ++e1?.v is equivalent to e1?.v += 1. - Expect.equals(null, ++nullC()?.v); - { C c = new C(1); Expect.equals(2, ++c?.v); Expect.equals(2, c.v); } - - // ++C?.v is equivalent to C?.v += 1. - { C.staticInt = 1; Expect.equals(2, ++C?.staticInt); Expect.equals(2, C.staticInt); } - { h.C.staticInt = 1; Expect.equals(2, ++h.C?.staticInt); Expect.equals(2, h.C.staticInt); } - - // The static type of ++e1?.v is the same as the static type of e1.v + 1. - { D d = new D(new E()); F f = ++d?.v; Expect.identical(d.v, f); } - { D d = new D(new E()); H h = ++d?.v; Expect.identical(d.v, h); } - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'G' can't be assigned to a variable of type 'H'. - { D.staticE = new E(); F f = ++D?.staticE; Expect.identical(D.staticE, f); } - { h.D.staticE = new h.E(); h.F f = ++h.D?.staticE; Expect.identical(h.D.staticE, f); } - { D.staticE = new E(); H h = ++D?.staticE; Expect.identical(D.staticE, h); } - // ^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'G' can't be assigned to a variable of type 'H'. - { h.D.staticE = new h.E(); h.H hh = ++h.D?.staticE; Expect.identical(h.D.staticE, hh); } - // ^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'G' can't be assigned to a variable of type 'H'. - - // --e1?.v is equivalent to e1?.v -= 1. - Expect.equals(null, --nullC()?.v); - { C c = new C(1); Expect.equals(0, --c?.v); Expect.equals(0, c.v); } - - // --C?.v is equivalent to C?.v -= 1. - { C.staticInt = 1; Expect.equals(0, --C?.staticInt); Expect.equals(0, C.staticInt); } - { h.C.staticInt = 1; Expect.equals(0, --h.C?.staticInt); Expect.equals(0, h.C.staticInt); } - - // The static type of --e1?.v is the same as the static type of e1.v - 1. - { D d = new D(new E()); F f = --d?.v; Expect.identical(d.v, f); } - { D d = new D(new E()); H h = --d?.v; Expect.identical(d.v, h); } - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'G' can't be assigned to a variable of type 'H'. - { D.staticE = new E(); F f = --D?.staticE; Expect.identical(D.staticE, f); } - { h.D.staticE = new h.E(); h.F f = --h.D?.staticE; Expect.identical(h.D.staticE, f); } - { D.staticE = new E(); H h = --D?.staticE; Expect.identical(D.staticE, h); } - // ^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'G' can't be assigned to a variable of type 'H'. - { h.D.staticE = new h.E(); h.H hh = --h.D?.staticE; Expect.identical(h.D.staticE, hh); } - // ^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'G' can't be assigned to a variable of type 'H'. -} diff --git a/tests/language_2/null_aware/index_this_null_aware_equals_test.dart b/tests/language_2/null_aware/index_this_null_aware_equals_test.dart deleted file mode 100644 index 5b3a2e52b6b..00000000000 --- a/tests/language_2/null_aware/index_this_null_aware_equals_test.dart +++ /dev/null @@ -1,17 +0,0 @@ - -// @dart = 2.9 -class C { - static final Expando _debugIds = new Expando(); - - static int _nextDebugId = 0; - - @override - String toString() { - int id = _debugIds[this] ??= _nextDebugId++; - return 'C$id'; - } -} - -main() { - print(C()); -} diff --git a/tests/language_2/null_aware/invocation_runtime_1_test.dart b/tests/language_2/null_aware/invocation_runtime_1_test.dart deleted file mode 100644 index 75b37def509..00000000000 --- a/tests/language_2/null_aware/invocation_runtime_1_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it is used to invoke a method. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - f(callback()) => callback(); - int g(int callback()) => callback(); - static staticF(callback()) => callback(); - static int staticG(int callback()) => callback(); -} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if method invocation using "?." is not - // implemented. This makes status files easier to maintain. - nullC()?.f(null); - - // o?.m(...) is equivalent to ((x) => x == null ? null : x.m(...))(o). - Expect.equals(null, nullC()?.f(bad())); - - - // C?.m(...) is equivalent to C.m(...). - - - - // The static type of o?.m(...) is the same as the static type of - // o.m(...). - - - - - - - - - - // Let T be the static type of o and let y be a fresh variable of type T. - // Exactly the same static warnings that would be caused by y.m(...) are also - // generated in the case of o?.m(...). - - - - // '?.' can't be used to access toplevel functions in libraries imported via - // prefix. - - - // Nor can it be used to access the toString method on the class Type. - - -} diff --git a/tests/language_2/null_aware/invocation_runtime_2_test.dart b/tests/language_2/null_aware/invocation_runtime_2_test.dart deleted file mode 100644 index 6bebd419b40..00000000000 --- a/tests/language_2/null_aware/invocation_runtime_2_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it is used to invoke a method. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - f(callback()) => callback(); - int g(int callback()) => callback(); - static staticF(callback()) => callback(); - static int staticG(int callback()) => callback(); -} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if method invocation using "?." is not - // implemented. This makes status files easier to maintain. - nullC()?.f(null); - - // o?.m(...) is equivalent to ((x) => x == null ? null : x.m(...))(o). - - Expect.equals(1, new C()?.f(() => 1)); - - // C?.m(...) is equivalent to C.m(...). - - - - // The static type of o?.m(...) is the same as the static type of - // o.m(...). - - - - - - - - - - // Let T be the static type of o and let y be a fresh variable of type T. - // Exactly the same static warnings that would be caused by y.m(...) are also - // generated in the case of o?.m(...). - - - - // '?.' can't be used to access toplevel functions in libraries imported via - // prefix. - - - // Nor can it be used to access the toString method on the class Type. - - -} diff --git a/tests/language_2/null_aware/invocation_runtime_3_test.dart b/tests/language_2/null_aware/invocation_runtime_3_test.dart deleted file mode 100644 index de66b3ee7b1..00000000000 --- a/tests/language_2/null_aware/invocation_runtime_3_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it is used to invoke a method. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - f(callback()) => callback(); - int g(int callback()) => callback(); - static staticF(callback()) => callback(); - static int staticG(int callback()) => callback(); -} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if method invocation using "?." is not - // implemented. This makes status files easier to maintain. - nullC()?.f(null); - - // o?.m(...) is equivalent to ((x) => x == null ? null : x.m(...))(o). - - - - // C?.m(...) is equivalent to C.m(...). - Expect.equals(1, C?.staticF(() => 1)); - - - // The static type of o?.m(...) is the same as the static type of - // o.m(...). - - - - - - - - - - // Let T be the static type of o and let y be a fresh variable of type T. - // Exactly the same static warnings that would be caused by y.m(...) are also - // generated in the case of o?.m(...). - - - - // '?.' can't be used to access toplevel functions in libraries imported via - // prefix. - - - // Nor can it be used to access the toString method on the class Type. - - -} diff --git a/tests/language_2/null_aware/invocation_runtime_4_test.dart b/tests/language_2/null_aware/invocation_runtime_4_test.dart deleted file mode 100644 index e4456877654..00000000000 --- a/tests/language_2/null_aware/invocation_runtime_4_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it is used to invoke a method. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - f(callback()) => callback(); - int g(int callback()) => callback(); - static staticF(callback()) => callback(); - static int staticG(int callback()) => callback(); -} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if method invocation using "?." is not - // implemented. This makes status files easier to maintain. - nullC()?.f(null); - - // o?.m(...) is equivalent to ((x) => x == null ? null : x.m(...))(o). - - - - // C?.m(...) is equivalent to C.m(...). - - Expect.equals(1, h.C?.staticF(() => 1)); - - // The static type of o?.m(...) is the same as the static type of - // o.m(...). - - - - - - - - - - // Let T be the static type of o and let y be a fresh variable of type T. - // Exactly the same static warnings that would be caused by y.m(...) are also - // generated in the case of o?.m(...). - - - - // '?.' can't be used to access toplevel functions in libraries imported via - // prefix. - - - // Nor can it be used to access the toString method on the class Type. - - -} diff --git a/tests/language_2/null_aware/invocation_runtime_5_test.dart b/tests/language_2/null_aware/invocation_runtime_5_test.dart deleted file mode 100644 index 9733964709c..00000000000 --- a/tests/language_2/null_aware/invocation_runtime_5_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it is used to invoke a method. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - f(callback()) => callback(); - int g(int callback()) => callback(); - static staticF(callback()) => callback(); - static int staticG(int callback()) => callback(); -} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if method invocation using "?." is not - // implemented. This makes status files easier to maintain. - nullC()?.f(null); - - // o?.m(...) is equivalent to ((x) => x == null ? null : x.m(...))(o). - - - - // C?.m(...) is equivalent to C.m(...). - - - - // The static type of o?.m(...) is the same as the static type of - // o.m(...). - { int i = nullC()?.g(bad()); Expect.equals(null, i); } - - - - - - - - - // Let T be the static type of o and let y be a fresh variable of type T. - // Exactly the same static warnings that would be caused by y.m(...) are also - // generated in the case of o?.m(...). - - - - // '?.' can't be used to access toplevel functions in libraries imported via - // prefix. - - - // Nor can it be used to access the toString method on the class Type. - - -} diff --git a/tests/language_2/null_aware/invocation_runtime_6_test.dart b/tests/language_2/null_aware/invocation_runtime_6_test.dart deleted file mode 100644 index ce4ace509c2..00000000000 --- a/tests/language_2/null_aware/invocation_runtime_6_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it is used to invoke a method. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - f(callback()) => callback(); - int g(int callback()) => callback(); - static staticF(callback()) => callback(); - static int staticG(int callback()) => callback(); -} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if method invocation using "?." is not - // implemented. This makes status files easier to maintain. - nullC()?.f(null); - - // o?.m(...) is equivalent to ((x) => x == null ? null : x.m(...))(o). - - - - // C?.m(...) is equivalent to C.m(...). - - - - // The static type of o?.m(...) is the same as the static type of - // o.m(...). - - { int i = new C()?.g(() => 1); Expect.equals(1, i); } - - - - - - - - // Let T be the static type of o and let y be a fresh variable of type T. - // Exactly the same static warnings that would be caused by y.m(...) are also - // generated in the case of o?.m(...). - - - - // '?.' can't be used to access toplevel functions in libraries imported via - // prefix. - - - // Nor can it be used to access the toString method on the class Type. - - -} diff --git a/tests/language_2/null_aware/invocation_runtime_7_test.dart b/tests/language_2/null_aware/invocation_runtime_7_test.dart deleted file mode 100644 index 006886fb2cf..00000000000 --- a/tests/language_2/null_aware/invocation_runtime_7_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it is used to invoke a method. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - f(callback()) => callback(); - int g(int callback()) => callback(); - static staticF(callback()) => callback(); - static int staticG(int callback()) => callback(); -} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if method invocation using "?." is not - // implemented. This makes status files easier to maintain. - nullC()?.f(null); - - // o?.m(...) is equivalent to ((x) => x == null ? null : x.m(...))(o). - - - - // C?.m(...) is equivalent to C.m(...). - - - - // The static type of o?.m(...) is the same as the static type of - // o.m(...). - - - - - { int i = C?.staticG(() => 1); Expect.equals(1, i); } - - - - - // Let T be the static type of o and let y be a fresh variable of type T. - // Exactly the same static warnings that would be caused by y.m(...) are also - // generated in the case of o?.m(...). - - - - // '?.' can't be used to access toplevel functions in libraries imported via - // prefix. - - - // Nor can it be used to access the toString method on the class Type. - - -} diff --git a/tests/language_2/null_aware/invocation_runtime_8_test.dart b/tests/language_2/null_aware/invocation_runtime_8_test.dart deleted file mode 100644 index 3ee9a207bca..00000000000 --- a/tests/language_2/null_aware/invocation_runtime_8_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it is used to invoke a method. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - f(callback()) => callback(); - int g(int callback()) => callback(); - static staticF(callback()) => callback(); - static int staticG(int callback()) => callback(); -} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if method invocation using "?." is not - // implemented. This makes status files easier to maintain. - nullC()?.f(null); - - // o?.m(...) is equivalent to ((x) => x == null ? null : x.m(...))(o). - - - - // C?.m(...) is equivalent to C.m(...). - - - - // The static type of o?.m(...) is the same as the static type of - // o.m(...). - - - - - - { int i = h.C?.staticG(() => 1); Expect.equals(1, i); } - - - - // Let T be the static type of o and let y be a fresh variable of type T. - // Exactly the same static warnings that would be caused by y.m(...) are also - // generated in the case of o?.m(...). - - - - // '?.' can't be used to access toplevel functions in libraries imported via - // prefix. - - - // Nor can it be used to access the toString method on the class Type. - - -} diff --git a/tests/language_2/null_aware/invocation_runtime_test.dart b/tests/language_2/null_aware/invocation_runtime_test.dart deleted file mode 100644 index 90456375d51..00000000000 --- a/tests/language_2/null_aware/invocation_runtime_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify semantics of the ?. operator when it is used to invoke a method. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - f(callback()) => callback(); - int g(int callback()) => callback(); - static staticF(callback()) => callback(); - static int staticG(int callback()) => callback(); -} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if method invocation using "?." is not - // implemented. This makes status files easier to maintain. - nullC()?.f(null); - - // o?.m(...) is equivalent to ((x) => x == null ? null : x.m(...))(o). - - - - // C?.m(...) is equivalent to C.m(...). - - - - // The static type of o?.m(...) is the same as the static type of - // o.m(...). - - - - - - - - - - // Let T be the static type of o and let y be a fresh variable of type T. - // Exactly the same static warnings that would be caused by y.m(...) are also - // generated in the case of o?.m(...). - - - - // '?.' can't be used to access toplevel functions in libraries imported via - // prefix. - - - // Nor can it be used to access the toString method on the class Type. - - -} diff --git a/tests/language_2/null_aware/invocation_test.dart b/tests/language_2/null_aware/invocation_test.dart deleted file mode 100644 index eae3b763dea..00000000000 --- a/tests/language_2/null_aware/invocation_test.dart +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) 2015, 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 - -// Verify semantics of the ?. operator when it is used to invoke a method. - -import "package:expect/expect.dart"; -import "conditional_access_helper.dart" as h; - -bad() { - Expect.fail('Should not be executed'); -} - -class B {} - -class C extends B { - f(callback()) => callback(); - int g(int callback()) => callback(); - static staticF(callback()) => callback(); - static int staticG(int callback()) => callback(); -} - -C nullC() => null; - -main() { - // Make sure the "none" test fails if method invocation using "?." is not - // implemented. This makes status files easier to maintain. - nullC()?.f(null); - - // o?.m(...) is equivalent to ((x) => x == null ? null : x.m(...))(o). - Expect.equals(null, nullC()?.f(bad())); - Expect.equals(1, new C()?.f(() => 1)); - - // C?.m(...) is equivalent to C.m(...). - Expect.equals(1, C?.staticF(() => 1)); - Expect.equals(1, h.C?.staticF(() => 1)); - - // The static type of o?.m(...) is the same as the static type of - // o.m(...). - { int i = nullC()?.g(bad()); Expect.equals(null, i); } - { int i = new C()?.g(() => 1); Expect.equals(1, i); } - { String s = nullC()?.g(bad()); Expect.equals(null, s); } - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'int' can't be assigned to a variable of type 'String'. - { String s = new C()?.g(() => null); Expect.equals(null, s); } - // ^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'int' can't be assigned to a variable of type 'String'. - { int i = C?.staticG(() => 1); Expect.equals(1, i); } - { int i = h.C?.staticG(() => 1); Expect.equals(1, i); } - { String s = C?.staticG(() => null); Expect.equals(null, s); } - // ^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'int' can't be assigned to a variable of type 'String'. - { String s = h.C?.staticG(() => null); Expect.equals(null, s); } - // ^^^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'int' can't be assigned to a variable of type 'String'. - - // Let T be the static type of o and let y be a fresh variable of type T. - // Exactly the same static warnings that would be caused by y.m(...) are also - // generated in the case of o?.m(...). - { B b = new C(); Expect.equals(1, b?.f(() => 1)); } - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD - // [cfe] The method 'f' isn't defined for the class 'B'. - { int i = 1; Expect.equals(null, nullC()?.f(i)); } - // ^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'int' can't be assigned to the parameter type 'dynamic Function()'. - - // '?.' can't be used to access toplevel functions in libraries imported via - // prefix. - h?.topLevelFunction(); -//^ -// [analyzer] COMPILE_TIME_ERROR.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT -// [cfe] A prefix can't be used with null-aware operators. - - // Nor can it be used to access the toString method on the class Type. - Expect.throwsNoSuchMethodError(() => C?.toString()); - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD - // [cfe] Method not found: 'C.toString'. - Expect.throwsNoSuchMethodError(() => h.C?.toString()); - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD - // [cfe] Method not found: 'C.toString'. -} diff --git a/tests/language_2/null_aware/null_aware_index_on_null_error_test.dart b/tests/language_2/null_aware/null_aware_index_on_null_error_test.dart deleted file mode 100644 index 407d5dbff13..00000000000 --- a/tests/language_2/null_aware/null_aware_index_on_null_error_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2022, 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() { - null?[0]; - // ^ - // [analyzer] SYNTACTIC_ERROR.EXPERIMENT_NOT_ENABLED - // ^ - // [cfe] Null safety is disabled for this library. - // [cfe] The operator '[]' isn't defined for the class 'Null'. -} diff --git a/tests/language_2/null_aware/opt_test.dart b/tests/language_2/null_aware/opt_test.dart deleted file mode 100644 index 9993c040783..00000000000 --- a/tests/language_2/null_aware/opt_test.dart +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) 2015, 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. -// -// VMOptions=--optimization_counter_threshold=5 -// -// Basic null-aware operator test that invokes the optimizing compiler. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class C { - C(this.f); - var f; - m(a) => a; -} - -bomb() { - Expect.fail('Should not be executed'); - return 100; -} - -getNull() => null; - -test() { - var c; - var d = new C(5); - Expect.equals(null, c?.m(bomb())); - Expect.equals(null, getNull()?.anything(bomb())); - Expect.equals(1, d?.m(1)); - - Expect.equals(1, new C(1)?.f); - Expect.equals(null, c?.v); - Expect.equals(10, c ?? 10); - Expect.equals(d, d ?? bomb()); - Expect.equals( - 3, - [ - [3] - ]?.expand((i) => i).toList()[0]); - Expect.equals(null, (null as List>)?.expand((i) => i)?.toList()); - - var e; - // The assignment to e is not executed since d != null. - d ??= e ??= new C(100); - Expect.equals(null, e); - e ??= new C(100); - Expect.equals(100, e?.f); - e?.f ??= 200; - Expect.equals(100, e?.f); - - e.f = null; - e?.f ??= 200; - Expect.equals(200, e?.f); - - c?.f ??= 400; - Expect.equals(null, c?.f); - Expect.equals(null, c?.f++); - e?.f++; - Expect.equals(201, e.f); - - var x = 5 ?? bomb(); -} - -// Check that instructions without result do not crash. -test2() { - var c; - c?.v; - c?.m(bomb()); -} - -class Bar { - String s; -} - -class Foo { - Bar _bar; - String str; - - Foo(this._bar) : str = _bar?.s; -} - -// Check that ?? isn't incorrectly optimized as non-nullable -// (DDC regression test) -test3() { - List n = null; - var func = n?.add; - var result = func ?? 1; - Expect.equals(result, 1); - - String x = null; - Expect.equals(x?.split(',') ?? 'hello', 'hello'); -} - -main() { - for (int i = 0; i < 10; i++) { - test(); - test2(); - test3(); - } - - Expect.equals(null, new Foo(new Bar()).str); -} diff --git a/tests/language_2/number/constant_folding1_test.dart b/tests/language_2/number/constant_folding1_test.dart deleted file mode 100644 index 4af9bdca8bd..00000000000 --- a/tests/language_2/number/constant_folding1_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// On frogsh constant folded hex literals of large magnitude were truncated on -// constant folding - Issue 636 is 'fixed', remaining concerns at Issue 638. - -highDigitTruncationTest() { - Expect.equals(0x12345678A, 0x123456789 + 1); - - // in 32 bits this is 0xF0000000 which is negative. - Expect.isTrue(0x1f0000000 > 0); - - Expect.equals(0xf0, 0xf * 16); - Expect.equals(0xff0, 0xff * 16); - Expect.equals(0xfff0, 0xfff * 16); - Expect.equals(0xffff0, 0xffff * 16); - Expect.equals(0xfffff0, 0xfffff * 16); - Expect.equals(0xffffff0, 0xffffff * 16); - Expect.equals(0xfffffff0, 0xfffffff * 16); - Expect.equals(0xffffffff0, 0xffffffff * 16); - Expect.equals(0xfffffffff0, 0xfffffffff * 16); - Expect.equals(0xffffffffff0, 0xffffffffff * 16); -} - -main() { - highDigitTruncationTest(); -} diff --git a/tests/language_2/number/identifier_runtime_test.dart b/tests/language_2/number/identifier_runtime_test.dart deleted file mode 100644 index 8e81d21940b..00000000000 --- a/tests/language_2/number/identifier_runtime_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -import "package:expect/expect.dart"; - -main() { - // Integer literals. - Expect.isTrue(2 is int); - Expect.equals(2, 2 as int); - Expect.isTrue(-2 is int); - Expect.equals(-2, -2 as int); - Expect.isTrue(0x10 is int); - Expect.isTrue(-0x10 is int); - // "a" will be part of hex literal, the following "s" is an error. - - - - // Double literals. - Expect.isTrue(2.0 is double); - Expect.equals(2.0, 2.0 as double); - Expect.isTrue(-2.0 is double); - Expect.equals(-2.0, -2.0 as double); - Expect.isTrue(.2 is double); - Expect.equals(0.2, .2 as double); - Expect.isTrue(1e2 is double); - Expect.equals(1e2, 1e2 as double); - Expect.isTrue(1e-2 is double); - Expect.equals(1e-2, 1e-2 as double); - Expect.isTrue(1e+2 is double); - Expect.equals(1e+2, 1e+2 as double); - - - - - - - - - -} diff --git a/tests/language_2/number/identifier_test.dart b/tests/language_2/number/identifier_test.dart deleted file mode 100644 index 5efff7e70d9..00000000000 --- a/tests/language_2/number/identifier_test.dart +++ /dev/null @@ -1,115 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -main() { - // Integer literals. - Expect.isTrue(2 is int); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_NON_TYPE - // [cfe] Local variable 'int' can't be referenced before it is declared. - Expect.equals(2, 2 as int); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE - // [cfe] Local variable 'int' can't be referenced before it is declared. - Expect.isTrue(-2 is int); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_NON_TYPE - // [cfe] Local variable 'int' can't be referenced before it is declared. - Expect.equals(-2, -2 as int); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.CAST_TO_NON_TYPE - // [cfe] Local variable 'int' can't be referenced before it is declared. - Expect.isTrue(0x10 is int); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_NON_TYPE - // [cfe] Local variable 'int' can't be referenced before it is declared. - Expect.isTrue(-0x10 is int); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_TEST_WITH_NON_TYPE - // [cfe] Local variable 'int' can't be referenced before it is declared. - - // "a" will be part of hex literal, the following "s" is an error. - 0x10as int; -//^^^^^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN -// [cfe] Expected ';' after this. -// ^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_CLASS -// [cfe] 's' isn't a type. - 0x; -//^ -// [cfe] A hex digit (0-9 or A-F) must follow '0x'. -// ^ -// [analyzer] SYNTACTIC_ERROR.MISSING_HEX_DIGIT - - // Double literals. - Expect.isTrue(2.0 is double); - Expect.equals(2.0, 2.0 as double); - Expect.isTrue(-2.0 is double); - Expect.equals(-2.0, -2.0 as double); - Expect.isTrue(.2 is double); - Expect.equals(0.2, .2 as double); - Expect.isTrue(1e2 is double); - Expect.equals(1e2, 1e2 as double); - Expect.isTrue(1e-2 is double); - Expect.equals(1e-2, 1e-2 as double); - Expect.isTrue(1e+2 is double); - Expect.equals(1e+2, 1e+2 as double); - Expect.throwsNoSuchMethodError(() => 1.e+2); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'e' isn't defined for the class 'int'. - 1d; -//^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN -// [cfe] Expected ';' after this. -// ^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER -// [cfe] Undefined name 'd'. - 1D; -//^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN -// [cfe] Expected ';' after this. -// ^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER -// [cfe] Undefined name 'D'. - Expect.throwsNoSuchMethodError(() => 1.d+2); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'int'. - Expect.throwsNoSuchMethodError(() => 1.D+2); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'D' isn't defined for the class 'int'. - 1.1d; -//^^^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN -// [cfe] Expected ';' after this. -// ^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER -// [cfe] Undefined name 'd'. - 1.1D; -//^^^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN -// [cfe] Expected ';' after this. -// ^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER -// [cfe] Undefined name 'D'. - 1e; -//^ -// [cfe] Numbers in exponential notation should always contain an exponent (an integer number with an optional sign). -// ^ -// [analyzer] SYNTACTIC_ERROR.MISSING_DIGIT - 1x; -//^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN -// [cfe] Expected ';' after this. -// ^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER -// [cfe] Undefined name 'x'. -} diff --git a/tests/language_2/number/identity2_test.dart b/tests/language_2/number/identity2_test.dart deleted file mode 100644 index 2b8115884df..00000000000 --- a/tests/language_2/number/identity2_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing params. -// -// Contains test that is failing on dart2js. Merge this test with -// 'number_identity_test.dart' once fixed. -// VMOptions=--optimization-counter-threshold=10 - -// @dart = 2.9 - -import "package:expect/expect.dart"; -import 'dart:typed_data'; - -double uint64toDouble(int i) { - var buffer = new Uint8List(8).buffer; - var bdata = new ByteData.view(buffer); - bdata.setUint64(0, i); - return bdata.getFloat64(0); -} - -testNumberIdentity() { - var a = double.nan; - var b = a + 0.0; - Expect.isTrue(identical(a, b)); - - a = uint64toDouble((1 << 64) - 1); - b = uint64toDouble((1 << 64) - 2); - Expect.isFalse(identical(a, b)); - - a = 0.0 / 0.0; - b = 1.0 / 0.0; - Expect.isFalse(identical(a, b)); -} - -main() { - for (int i = 0; i < 20; i++) { - testNumberIdentity(); - } -} diff --git a/tests/language_2/number/identity_test.dart b/tests/language_2/number/identity_test.dart deleted file mode 100644 index a8486701a6e..00000000000 --- a/tests/language_2/number/identity_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing params. -// VMOptions=--optimization-counter-threshold=10 - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - for (int i = 0; i < 20; i++) testNumberIdentity(); -} - -testNumberIdentity() { - const int smi = 8; - const int mint = 9223372036854775806; - const double dbl = 8.0; - - var a = smi; - var b = a + 0; - Expect.isTrue(identical(a, b)); - Expect.isFalse(identical(b, mint)); - - a = mint; - b = a + 0; - Expect.isTrue(identical(a, b)); - Expect.isFalse(identical(b, smi)); - Expect.isFalse(identical(b, dbl)); - - var a2 = dbl; - var b2 = a2 + 0.0; - Expect.isTrue(identical(a2, b2)); - Expect.isFalse(identical(b2, mint)); -} diff --git a/tests/language_2/number/infinity_test.dart b/tests/language_2/number/infinity_test.dart deleted file mode 100644 index 6c0a20c3660..00000000000 --- a/tests/language_2/number/infinity_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); - -main() { - var things = [0, double.infinity, double.negativeInfinity]; - var first = things[1]; - var second = things[2]; - Expect.isFalse(first is int); - Expect.isFalse(second is int); - Expect.isTrue(first is double); - Expect.isTrue(second is double); -} diff --git a/tests/language_2/number/int2_test.dart b/tests/language_2/number/int2_test.dart deleted file mode 100644 index 3cf6e3d978d..00000000000 --- a/tests/language_2/number/int2_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to throw NoSuchMethod if an -// int did not fit in the SMI range. - -import "package:expect/expect.dart"; - -main() { - // dart2js knows that this list is int or null. - var b = [null, 9223372036854775806]; - - // Use b[1] twice to ensure dart2js realizes it's the same value - // after type propagation. - - // dart2js will inline an ArgumentError check on b[a]. - 42 + b[1]; - // dart2js will inline a NoSuchMethodError check. - var c = b[1] & 1; - Expect.equals(0, c); -} diff --git a/tests/language_2/number/int64_literal_runtime_10_test.dart b/tests/language_2/number/int64_literal_runtime_10_test.dart deleted file mode 100644 index 7e5ddd0528b..00000000000 --- a/tests/language_2/number/int64_literal_runtime_10_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 'package:expect/expect.dart'; - -const String realMaxInt64Value = '9223372036854775807'; -const String realMinInt64Value = '-9223372036854775808'; - -const int i21 = 2097152; - -main() { - int minInt64Value = -1 * i21 * i21 * i21; - - - - - - - - Expect.equals('$minInt64Value', realMinInt64Value); - Expect.equals('${minInt64Value - 1}', realMaxInt64Value); - - int maxInt64Value = 1 * i21 * i21 * i21 - 1; - - - - - - - maxInt64Value = -0x8000000000000000 - 1; - - - - Expect.equals('$maxInt64Value', realMaxInt64Value); - Expect.equals('${maxInt64Value + 1}', realMinInt64Value); -} diff --git a/tests/language_2/number/int64_literal_runtime_11_test.dart b/tests/language_2/number/int64_literal_runtime_11_test.dart deleted file mode 100644 index d57af66e309..00000000000 --- a/tests/language_2/number/int64_literal_runtime_11_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 'package:expect/expect.dart'; - -const String realMaxInt64Value = '9223372036854775807'; -const String realMinInt64Value = '-9223372036854775808'; - -const int i21 = 2097152; - -main() { - int minInt64Value = -1 * i21 * i21 * i21; - - - - - - - - Expect.equals('$minInt64Value', realMinInt64Value); - Expect.equals('${minInt64Value - 1}', realMaxInt64Value); - - int maxInt64Value = 1 * i21 * i21 * i21 - 1; - - - - - - - - - maxInt64Value = -(0x8000000000000001); - - Expect.equals('$maxInt64Value', realMaxInt64Value); - Expect.equals('${maxInt64Value + 1}', realMinInt64Value); -} diff --git a/tests/language_2/number/int64_literal_runtime_1_test.dart b/tests/language_2/number/int64_literal_runtime_1_test.dart deleted file mode 100644 index 8e6c83b331c..00000000000 --- a/tests/language_2/number/int64_literal_runtime_1_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 'package:expect/expect.dart'; - -const String realMaxInt64Value = '9223372036854775807'; -const String realMinInt64Value = '-9223372036854775808'; - -const int i21 = 2097152; - -main() { - int minInt64Value = -1 * i21 * i21 * i21; - minInt64Value = -9223372036854775807 - 1; - - - - - - - Expect.equals('$minInt64Value', realMinInt64Value); - Expect.equals('${minInt64Value - 1}', realMaxInt64Value); - - int maxInt64Value = 1 * i21 * i21 * i21 - 1; - - - - - - - - - - - Expect.equals('$maxInt64Value', realMaxInt64Value); - Expect.equals('${maxInt64Value + 1}', realMinInt64Value); -} diff --git a/tests/language_2/number/int64_literal_runtime_2_test.dart b/tests/language_2/number/int64_literal_runtime_2_test.dart deleted file mode 100644 index d4c17e9fda9..00000000000 --- a/tests/language_2/number/int64_literal_runtime_2_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 'package:expect/expect.dart'; - -const String realMaxInt64Value = '9223372036854775807'; -const String realMinInt64Value = '-9223372036854775808'; - -const int i21 = 2097152; - -main() { - int minInt64Value = -1 * i21 * i21 * i21; - - minInt64Value = -9223372036854775808; - - - - - - Expect.equals('$minInt64Value', realMinInt64Value); - Expect.equals('${minInt64Value - 1}', realMaxInt64Value); - - int maxInt64Value = 1 * i21 * i21 * i21 - 1; - - - - - - - - - - - Expect.equals('$maxInt64Value', realMaxInt64Value); - Expect.equals('${maxInt64Value + 1}', realMinInt64Value); -} diff --git a/tests/language_2/number/int64_literal_runtime_3_test.dart b/tests/language_2/number/int64_literal_runtime_3_test.dart deleted file mode 100644 index 5766d276922..00000000000 --- a/tests/language_2/number/int64_literal_runtime_3_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 'package:expect/expect.dart'; - -const String realMaxInt64Value = '9223372036854775807'; -const String realMinInt64Value = '-9223372036854775808'; - -const int i21 = 2097152; - -main() { - int minInt64Value = -1 * i21 * i21 * i21; - - - - minInt64Value = -(0x8000000000000000); - - - - Expect.equals('$minInt64Value', realMinInt64Value); - Expect.equals('${minInt64Value - 1}', realMaxInt64Value); - - int maxInt64Value = 1 * i21 * i21 * i21 - 1; - - - - - - - - - - - Expect.equals('$maxInt64Value', realMaxInt64Value); - Expect.equals('${maxInt64Value + 1}', realMinInt64Value); -} diff --git a/tests/language_2/number/int64_literal_runtime_4_test.dart b/tests/language_2/number/int64_literal_runtime_4_test.dart deleted file mode 100644 index 258e07027a4..00000000000 --- a/tests/language_2/number/int64_literal_runtime_4_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 'package:expect/expect.dart'; - -const String realMaxInt64Value = '9223372036854775807'; -const String realMinInt64Value = '-9223372036854775808'; - -const int i21 = 2097152; - -main() { - int minInt64Value = -1 * i21 * i21 * i21; - - - - - minInt64Value = 0x8000000000000000; - - - Expect.equals('$minInt64Value', realMinInt64Value); - Expect.equals('${minInt64Value - 1}', realMaxInt64Value); - - int maxInt64Value = 1 * i21 * i21 * i21 - 1; - - - - - - - - - - - Expect.equals('$maxInt64Value', realMaxInt64Value); - Expect.equals('${maxInt64Value + 1}', realMinInt64Value); -} diff --git a/tests/language_2/number/int64_literal_runtime_5_test.dart b/tests/language_2/number/int64_literal_runtime_5_test.dart deleted file mode 100644 index 0bf8cdb47c8..00000000000 --- a/tests/language_2/number/int64_literal_runtime_5_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 'package:expect/expect.dart'; - -const String realMaxInt64Value = '9223372036854775807'; -const String realMinInt64Value = '-9223372036854775808'; - -const int i21 = 2097152; - -main() { - int minInt64Value = -1 * i21 * i21 * i21; - - - - - - minInt64Value = -0x8000000000000000; - - Expect.equals('$minInt64Value', realMinInt64Value); - Expect.equals('${minInt64Value - 1}', realMaxInt64Value); - - int maxInt64Value = 1 * i21 * i21 * i21 - 1; - - - - - - - - - - - Expect.equals('$maxInt64Value', realMaxInt64Value); - Expect.equals('${maxInt64Value + 1}', realMinInt64Value); -} diff --git a/tests/language_2/number/int64_literal_runtime_6_test.dart b/tests/language_2/number/int64_literal_runtime_6_test.dart deleted file mode 100644 index 4b2d69888ba..00000000000 --- a/tests/language_2/number/int64_literal_runtime_6_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 'package:expect/expect.dart'; - -const String realMaxInt64Value = '9223372036854775807'; -const String realMinInt64Value = '-9223372036854775808'; - -const int i21 = 2097152; - -main() { - int minInt64Value = -1 * i21 * i21 * i21; - - - - - - - - Expect.equals('$minInt64Value', realMinInt64Value); - Expect.equals('${minInt64Value - 1}', realMaxInt64Value); - - int maxInt64Value = 1 * i21 * i21 * i21 - 1; - maxInt64Value = 9223372036854775807; - - - - - - - - - - Expect.equals('$maxInt64Value', realMaxInt64Value); - Expect.equals('${maxInt64Value + 1}', realMinInt64Value); -} diff --git a/tests/language_2/number/int64_literal_runtime_7_test.dart b/tests/language_2/number/int64_literal_runtime_7_test.dart deleted file mode 100644 index 4c17a63c8c4..00000000000 --- a/tests/language_2/number/int64_literal_runtime_7_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 'package:expect/expect.dart'; - -const String realMaxInt64Value = '9223372036854775807'; -const String realMinInt64Value = '-9223372036854775808'; - -const int i21 = 2097152; - -main() { - int minInt64Value = -1 * i21 * i21 * i21; - - - - - - - - Expect.equals('$minInt64Value', realMinInt64Value); - Expect.equals('${minInt64Value - 1}', realMaxInt64Value); - - int maxInt64Value = 1 * i21 * i21 * i21 - 1; - - maxInt64Value = 9223372036854775807; - - - - - - - - - Expect.equals('$maxInt64Value', realMaxInt64Value); - Expect.equals('${maxInt64Value + 1}', realMinInt64Value); -} diff --git a/tests/language_2/number/int64_literal_runtime_8_test.dart b/tests/language_2/number/int64_literal_runtime_8_test.dart deleted file mode 100644 index d1179a6c43d..00000000000 --- a/tests/language_2/number/int64_literal_runtime_8_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 'package:expect/expect.dart'; - -const String realMaxInt64Value = '9223372036854775807'; -const String realMinInt64Value = '-9223372036854775808'; - -const int i21 = 2097152; - -main() { - int minInt64Value = -1 * i21 * i21 * i21; - - - - - - - - Expect.equals('$minInt64Value', realMinInt64Value); - Expect.equals('${minInt64Value - 1}', realMaxInt64Value); - - int maxInt64Value = 1 * i21 * i21 * i21 - 1; - - - - maxInt64Value = -9223372036854775808 - 1; - - - - - - - Expect.equals('$maxInt64Value', realMaxInt64Value); - Expect.equals('${maxInt64Value + 1}', realMinInt64Value); -} diff --git a/tests/language_2/number/int64_literal_runtime_9_test.dart b/tests/language_2/number/int64_literal_runtime_9_test.dart deleted file mode 100644 index 17f73b78aa0..00000000000 --- a/tests/language_2/number/int64_literal_runtime_9_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 'package:expect/expect.dart'; - -const String realMaxInt64Value = '9223372036854775807'; -const String realMinInt64Value = '-9223372036854775808'; - -const int i21 = 2097152; - -main() { - int minInt64Value = -1 * i21 * i21 * i21; - - - - - - - - Expect.equals('$minInt64Value', realMinInt64Value); - Expect.equals('${minInt64Value - 1}', realMaxInt64Value); - - int maxInt64Value = 1 * i21 * i21 * i21 - 1; - - - - - - maxInt64Value = 0x8000000000000000 - 1; - - - - - Expect.equals('$maxInt64Value', realMaxInt64Value); - Expect.equals('${maxInt64Value + 1}', realMinInt64Value); -} diff --git a/tests/language_2/number/int64_literal_runtime_test.dart b/tests/language_2/number/int64_literal_runtime_test.dart deleted file mode 100644 index 8518390ed86..00000000000 --- a/tests/language_2/number/int64_literal_runtime_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 'package:expect/expect.dart'; - -const String realMaxInt64Value = '9223372036854775807'; -const String realMinInt64Value = '-9223372036854775808'; - -const int i21 = 2097152; - -main() { - int minInt64Value = -1 * i21 * i21 * i21; - - - - - - - - Expect.equals('$minInt64Value', realMinInt64Value); - Expect.equals('${minInt64Value - 1}', realMaxInt64Value); - - int maxInt64Value = 1 * i21 * i21 * i21 - 1; - - - - - - - - - - - Expect.equals('$maxInt64Value', realMaxInt64Value); - Expect.equals('${maxInt64Value + 1}', realMinInt64Value); -} diff --git a/tests/language_2/number/int64_literal_test.dart b/tests/language_2/number/int64_literal_test.dart deleted file mode 100644 index fb7dcb64512..00000000000 --- a/tests/language_2/number/int64_literal_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'package:expect/expect.dart'; - -const String realMaxInt64Value = '9223372036854775807'; -const String realMinInt64Value = '-9223372036854775808'; - -const int i21 = 2097152; - -main() { - int minInt64Value = -1 * i21 * i21 * i21; - minInt64Value = -9223372036854775807 - 1; - minInt64Value = -9223372036854775808; - minInt64Value = -(9223372036854775808); - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INTEGER_LITERAL_OUT_OF_RANGE - // [cfe] The integer literal 9223372036854775808 can't be represented in 64 bits. - minInt64Value = -(0x8000000000000000); - minInt64Value = 0x8000000000000000; - minInt64Value = -0x8000000000000000; - - Expect.equals('$minInt64Value', realMinInt64Value); - Expect.equals('${minInt64Value - 1}', realMaxInt64Value); - - int maxInt64Value = 1 * i21 * i21 * i21 - 1; - maxInt64Value = 9223372036854775807; - maxInt64Value = 9223372036854775807; - maxInt64Value = 9223372036854775808 - 1; - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INTEGER_LITERAL_OUT_OF_RANGE - // [cfe] The integer literal 9223372036854775808 can't be represented in 64 bits. - maxInt64Value = -9223372036854775808 - 1; - maxInt64Value = -9223372036854775809; - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INTEGER_LITERAL_OUT_OF_RANGE - // [cfe] The integer literal 9223372036854775809 can't be represented in 64 bits. - maxInt64Value = 0x8000000000000000 - 1; - maxInt64Value = -0x8000000000000000 - 1; - maxInt64Value = -0x8000000000000001; - // ^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INTEGER_LITERAL_OUT_OF_RANGE - // [cfe] The integer literal 0x8000000000000001 can't be represented in 64 bits. - maxInt64Value = -(0x8000000000000001); - - Expect.equals('$maxInt64Value', realMaxInt64Value); - Expect.equals('${maxInt64Value + 1}', realMinInt64Value); -} diff --git a/tests/language_2/number/int_test.dart b/tests/language_2/number/int_test.dart deleted file mode 100644 index 8184eb34ba3..00000000000 --- a/tests/language_2/number/int_test.dart +++ /dev/null @@ -1,62 +0,0 @@ -// 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. -// Test basic integer operations. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - test(literal, number) { - Expect.equals(literal, number); - Expect.identical(literal, number); - } - - test(0, 0 + 0); - test(1, 1 + 0); - test(2, 1 + 1); - test(3, -1 + 4); - test(3, 4 + -1); - - test(-0, -(0)); - test(-3, -(3)); - - test(1, 1 - 0); - test(0, 1 - 1); - test(1, 2 - 1); - test(2, 4 - 2); - test(-2, 2 - 4); - - test(0, 3 * 0); - test(0, 0 * 3); - test(1, 1 * 1); - test(5, 5 * 1); - test(15, 3 * 5); - test(-1, 1 * -1); - test(-15, -5 * 3); - test(15, -5 * -3); - - test(1, 2 ~/ 2); - test(2, 2 ~/ 1); - test(2, 4 ~/ 2); - test(2, 5 ~/ 2); - test(-2, -5 ~/ 2); - test(-2, -4 ~/ 2); - test(-2, 5 ~/ -2); - test(-2, 4 ~/ -2); - - test(3, 7 % 4); - test(2, 9 % 7); - test(2, -7 % 9); - test(7, 7 % -9); - test(7, 7 % 9); - test(2, -7 % -9); - - test(3, (7).remainder(4)); - test(2, (9).remainder(7)); - test(-7, (-7).remainder(9)); - test(7, (7).remainder(-9)); - test(7, (7).remainder(9)); - test(-7, (-7).remainder(-9)); -} diff --git a/tests/language_2/number/numbers_test.dart b/tests/language_2/number/numbers_test.dart deleted file mode 100644 index f10554076b2..00000000000 --- a/tests/language_2/number/numbers_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// 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. -// Test number types. - -// @dart = 2.9 - -library NumbersTest.dart; - -import "package:expect/expect.dart"; - -class NumbersTest { - static double testMain() { - var one = 1; - Expect.equals(true, one is Object); - Expect.equals(true, one is num); - Expect.equals(true, one is int); - Expect.equals(false, one is double); - - var two = 2.0; - Expect.equals(true, two is Object); - Expect.equals(true, two is num); - Expect.equals(false, two is int); - Expect.equals(true, two is double); - - var result = one + two; - Expect.equals(true, result is Object); - Expect.equals(true, result is num); - Expect.equals(false, result is int); - Expect.equals(true, result is double); - - Expect.equals(3.0, result); - return result; - } -} - -main() { - NumbersTest.testMain(); -} diff --git a/tests/language_2/number/syntax_test.dart b/tests/language_2/number/syntax_test.dart deleted file mode 100644 index 42115c77bdc..00000000000 --- a/tests/language_2/number/syntax_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class NumberSyntaxTest { - static void testMain() { - testShortDoubleSyntax(); - testDotSelectorSyntax(); - } - - static void testShortDoubleSyntax() { - Expect.equals(0.0, .0); - Expect.equals(0.5, .5); - Expect.equals(0.1234, .1234); - } - - static void testDotSelectorSyntax() { - // Integers. - Expect.equals('0', 0.toString()); - Expect.equals('1', 1.toString()); - Expect.equals('123', 123.toString()); - - Expect.equals('0', 0.toString()); - Expect.equals('1', 1.toString()); - Expect.equals('123', 123.toString()); - - Expect.equals('0', 0.toString()); - Expect.equals('1', 1.toString()); - Expect.equals('123', 123.toString()); - - // Doubles. - Expect.equals((0.0).toString(), 0.0.toString()); - Expect.equals((0.1).toString(), .1.toString()); - Expect.equals((1.1).toString(), 1.1.toString()); - Expect.equals((123.4).toString(), 123.4.toString()); - - Expect.equals((0.0).toString(), 0.0.toString()); - Expect.equals((0.1).toString(), .1.toString()); - Expect.equals((1.1).toString(), 1.1.toString()); - Expect.equals((123.4).toString(), 123.4.toString()); - - Expect.equals((0.0).toString(), 0.0.toString()); - Expect.equals((0.1).toString(), .1.toString()); - Expect.equals((1.1).toString(), 1.1.toString()); - Expect.equals((123.4).toString(), 123.4.toString()); - - // Exponent notation. - Expect.equals((0e0).toString(), 0e0.toString()); - Expect.equals((1e+1).toString(), 1e+1.toString()); - Expect.equals((2.1e-34).toString(), 2.1e-34.toString()); - } -} - -main() { - NumberSyntaxTest.testMain(); -} diff --git a/tests/language_2/number/web_int_literals_runtime_test.dart b/tests/language_2/number/web_int_literals_runtime_test.dart deleted file mode 100644 index 03414166033..00000000000 --- a/tests/language_2/number/web_int_literals_runtime_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 "package:expect/expect.dart"; - -main() { - check(0x8000000000000000); - - check(0x7FFF00001111F000); - check(0x7FFF00001111FC00); - - - - - check(0xFFFF00001111F000); - check(0xFFFF00001111F800); - - - - - - // Test all runs of 53 and 54 bits. - check(0x000FFFFFFFFFFFFF); - check(0x001FFFFFFFFFFFFF); - - check(0x003FFFFFFFFFFFFE); - - check(0x007FFFFFFFFFFFFC); - - check(0x00FFFFFFFFFFFFF8); - - check(0x01FFFFFFFFFFFFF0); - - check(0x03FFFFFFFFFFFFE0); - - check(0x07FFFFFFFFFFFFC0); - - check(0x0FFFFFFFFFFFFF80); - - check(0x1FFFFFFFFFFFFF00); - - check(0x3FFFFFFFFFFFFE00); - - check(0x7FFFFFFFFFFFFC00); - - check(0xFFFFFFFFFFFFF800); - - // Too big, even on VM. - - - - // 9223372036854775808 - 512 is rounded. - - // 9223372036854775808 - 1024 is exact. - check(9223372036854774784); - - check(-9223372036854775808); - - - check(-9223372036854774784); - - -} - -check(int n) {} diff --git a/tests/language_2/number/web_int_literals_test.dart b/tests/language_2/number/web_int_literals_test.dart deleted file mode 100644 index ae3735199cf..00000000000 --- a/tests/language_2/number/web_int_literals_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -main() { - check(0x8000000000000000); - - check(0x7FFF00001111F000); - check(0x7FFF00001111FC00); - check(0x7FFF00001111FE00); - check(0x7FFF00001111FF00); - check(0x7FFF00001111FFFF); - - check(0xFFFF00001111F000); - check(0xFFFF00001111F800); - check(0xFFFF00001111FC00); - check(0xFFFF00001111FE00); - check(0xFFFF00001111FF00); - check(0xFFFF00001111FFFF); - - // Test all runs of 53 and 54 bits. - check(0x000FFFFFFFFFFFFF); - check(0x001FFFFFFFFFFFFF); - check(0x003FFFFFFFFFFFFF); - check(0x003FFFFFFFFFFFFE); - check(0x007FFFFFFFFFFFFE); - check(0x007FFFFFFFFFFFFC); - check(0x00FFFFFFFFFFFFFC); - check(0x00FFFFFFFFFFFFF8); - check(0x01FFFFFFFFFFFFF8); - check(0x01FFFFFFFFFFFFF0); - check(0x03FFFFFFFFFFFFF0); - check(0x03FFFFFFFFFFFFE0); - check(0x07FFFFFFFFFFFFE0); - check(0x07FFFFFFFFFFFFC0); - check(0x0FFFFFFFFFFFFFC0); - check(0x0FFFFFFFFFFFFF80); - check(0x1FFFFFFFFFFFFF80); - check(0x1FFFFFFFFFFFFF00); - check(0x3FFFFFFFFFFFFF00); - check(0x3FFFFFFFFFFFFE00); - check(0x7FFFFFFFFFFFFE00); - check(0x7FFFFFFFFFFFFC00); - check(0xFFFFFFFFFFFFFC00); - check(0xFFFFFFFFFFFFF800); - - // Too big, even on VM. - check(9223372036854775808); - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INTEGER_LITERAL_OUT_OF_RANGE - // [cfe] The integer literal 9223372036854775808 can't be represented in 64 bits. - check(9223372036854775807); - check(9223372036854775806); - // 9223372036854775808 - 512 is rounded. - check(9223372036854775296); - // 9223372036854775808 - 1024 is exact. - check(9223372036854774784); - - check(-9223372036854775808); - check(-9223372036854775807); - check(-9223372036854775296); - check(-9223372036854774784); - - check(1000000000000000001); -} - -check(int n) {} diff --git a/tests/language_2/operator/and_operation_on_non_integer_operand_test.dart b/tests/language_2/operator/and_operation_on_non_integer_operand_test.dart deleted file mode 100644 index 9ceea3250e4..00000000000 --- a/tests/language_2/operator/and_operation_on_non_integer_operand_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2015, 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 - -// Regression test for dart2js that used to miscompile boolean add operations -// if one of the operands was an int and the other was not (issue 22427). - -import "package:expect/expect.dart"; - -class NotAnInt { - NotAnInt operator &(b) => this; -} - -@pragma('dart2js:assumeDynamic') -@pragma('dart2js:noInline') -id(x) => x; - -main() { - var a = id(new NotAnInt()); - Expect.equals(a, a & 5 & 2); -} diff --git a/tests/language_2/operator/arithmetic_canonicalization_test.dart b/tests/language_2/operator/arithmetic_canonicalization_test.dart deleted file mode 100644 index b1a40a728a5..00000000000 --- a/tests/language_2/operator/arithmetic_canonicalization_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2013, 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. -// Test canonicalization of simple arithmetic equivalences. -// VMOptions=--optimization-counter-threshold=20 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - for (var i = 0; i < 50; i++) { - Expect.isTrue(mul1double(i) is double); - Expect.equals(i.toDouble(), mul1double(i)); - Expect.equals(0.0, mul0double(i)); - Expect.equals(i.toDouble(), add0double(i)); - - Expect.equals(i, mul1int(i)); - Expect.equals(i, add0int(i)); - Expect.equals(0, mul0int(i)); - Expect.equals(0, and0(i)); - Expect.equals(i, and1(i)); - Expect.equals(i, or0(i)); - Expect.equals(i, xor0(i)); - } - - Expect.isTrue(mul0double(double.nan).isNaN); - Expect.isFalse(add0double(-0.0).isNegative); -} - -mul1double(x) => 1.0 * x; -mul0double(x) => 0.0 * x; -add0double(x) => 0.0 + x; - -mul1int(x) => 1 * x; -mul0int(x) => 0 * x; -add0int(x) => 0 + x; -and0(x) => 0 & x; -or0(x) => 0 | x; -xor0(x) => 0 ^ x; -and1(x) => (-1) & x; diff --git a/tests/language_2/operator/arithmetic_int64_test.dart b/tests/language_2/operator/arithmetic_int64_test.dart deleted file mode 100644 index eeee2a5de44..00000000000 --- a/tests/language_2/operator/arithmetic_int64_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2012, 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 test program to test arithmetic operations. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -library arithmetic_test; - -import "package:expect/expect.dart"; -import 'dart:math'; - -class ArithmeticTest { - static runOne() { - // Math functions. - Expect.equals(1234567890123456789, int.parse("1234567890123456789")); - Expect.equals(-1234567890123456789, int.parse("-1234567890123456789")); - Expect.equals(9223372036854775807, int.parse("9223372036854775807")); - Expect.equals(-9223372036854775808, int.parse("-9223372036854775808")); - } - - static testMain() { - runOne(); - } -} - -main() { - ArithmeticTest.testMain(); -} diff --git a/tests/language_2/operator/arithmetic_smi_overflow_test.dart b/tests/language_2/operator/arithmetic_smi_overflow_test.dart deleted file mode 100644 index 6362c6a786c..00000000000 --- a/tests/language_2/operator/arithmetic_smi_overflow_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2014, 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 test program to test arithmetic operations. - -// @dart = 2.9 - -// VMOptions=--optimization_counter_threshold=5 --no-background_compilation - -import "package:expect/expect.dart"; - -main() { - for (var i = 0; i < 10; i++) { - Expect.equals(0x40000000, (i - i) - -1073741824); - Expect.equals(0x4000000000000000, (i - i) - -4611686018427387904); - } -} diff --git a/tests/language_2/operator/arithmetic_test.dart b/tests/language_2/operator/arithmetic_test.dart deleted file mode 100644 index 9f1f74b017d..00000000000 --- a/tests/language_2/operator/arithmetic_test.dart +++ /dev/null @@ -1,569 +0,0 @@ -// Copyright (c) 2012, 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 test program to test arithmetic operations. - -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation -// VMOptions=--use_slow_path - -// @dart = 2.9 - -library arithmetic_test; - -import "package:expect/expect.dart"; -import 'dart:math'; - -class ArithmeticTest { - static bool exceptionCaughtParseInt(String s) { - try { - int.parse(s); - return false; - } on FormatException catch (e) { - return true; - } - } - - static bool exceptionCaughtParseDouble(String s) { - try { - double.parse(s); - return false; - } on FormatException catch (e) { - return true; - } - } - - static bool toIntThrowsUnsupportedError(String str) { - // No exception allowed for parse double. - double d = double.parse(str); - try { - var a = d.toInt(); - return false; - } on UnsupportedError catch (e) { - return true; - } - } - - static runOne() { - var a = 22; - var b = 4; - // Smi & smi. - Expect.equals(26, a + b); - Expect.equals(18, a - b); - Expect.equals(88, a * b); - Expect.equals(5, a ~/ b); - Expect.equals(5.5, a / b); - Expect.equals(2.0, 10 / 5); - Expect.equals(2, a % b); - Expect.equals(2, a.remainder(b)); - // Smi corner cases. - for (int i = 0; i < 80; i++) { - a = -(1 << i); - b = -1; - Expect.equals(1 << i, a ~/ b); - } - a = 22; - var c = 4.0; - // Smi & double. - Expect.equals(26.0, a + c); - Expect.equals(18.0, a - c); - Expect.equals(88.0, a * c); - Expect.equals(5, a ~/ c); - Expect.equals(5.5, a / c); - Expect.equals(2.0, a % c); - Expect.equals(2.0, a.remainder(c)); - var d = 22.0; - b = 4; - // Double & smi. - Expect.equals(26.0, d + b); - Expect.equals(18.0, d - b); - Expect.equals(88.0, d * b); - Expect.equals(5, d ~/ b); - Expect.equals(5.5, d / b); - Expect.equals(2.0, d % b); - Expect.equals(2.0, d.remainder(b)); - d = 22.0; - c = 4.0; - // Double & double. - Expect.equals(26.0, d + c); - Expect.equals(18.0, d - c); - Expect.equals(88.0, d * c); - Expect.equals(5, d ~/ c); - Expect.equals(5.5, d / c); - Expect.equals(2.0, d % c); - Expect.equals(2.0, d.remainder(c)); - - // Special int operations. - Expect.equals(2, (2).floor()); - Expect.equals(2, (2).ceil()); - Expect.equals(2, (2).round()); - Expect.equals(2, (2).truncate()); - - Expect.equals(-2, (-2).floor()); - Expect.equals(-2, (-2).ceil()); - Expect.equals(-2, (-2).round()); - Expect.equals(-2, (-2).truncate()); - - // Note that this number fits into 53 bits of a double. - int big = 123456789012345; - - Expect.equals(big, big.floor()); - Expect.equals(big, big.ceil()); - Expect.equals(big, big.round()); - Expect.equals(big, big.truncate()); - big = -big; - Expect.equals(big, big.floor()); - Expect.equals(big, big.ceil()); - Expect.equals(big, big.round()); - Expect.equals(big, big.truncate()); - - // Test if double is contagious. The assignment will check the type. - { - double d = 1 + 1.0; - } - { - double d = 1.0 + 1; - } - { - double d = 1 * 1.0; - } - { - double d = 0 * 1.0; - } - { - double d = 1.0 * 0; - } - { - double d = 1 / 1.0; - } - { - double d = 1.0 / 0; - } - { - double d = 1 - 1.0; - } - { - double d = 1.0 - 1; - } - { - double d = big * 1.0; - } - { - double d = 1.0 * big; - } - - // Reset big to positive value. - big = 123456789012345; - // -- isNegative --. - // Smi. - Expect.equals(false, (0).isNegative); - Expect.equals(false, (1).isNegative); - Expect.equals(true, (-1).isNegative); - // Big. - Expect.equals(false, big.isNegative); - Expect.equals(true, (-big).isNegative); - // Double. - // TODO(srdjan): enable the following test once isNegative works. - // Expect.equals(true, (-0.0).isNegative); - Expect.equals(false, (0.0).isNegative); - Expect.equals(false, (2.0).isNegative); - Expect.equals(true, (-2.0).isNegative); - - double negateDouble(double x) { - return -x; - } - - Expect.isTrue(negateDouble(0.0).isNegative); - Expect.isFalse(negateDouble(-0.0).isNegative); - Expect.isTrue(negateDouble(3.5e3).isNegative); - Expect.isFalse(negateDouble(-3.5e3).isNegative); - - // Constants. - final nan = 0.0 / 0.0; - final infinity = 1.0 / 0.0; - - // -- isInfinite --. - // Smi. - Expect.equals(false, (0).isInfinite); - Expect.equals(false, (1).isInfinite); - Expect.equals(false, (-1).isInfinite); - // Big. - Expect.equals(false, big.isInfinite); - Expect.equals(false, (-big).isInfinite); - // Double. - Expect.equals(false, (0.0).isInfinite); - Expect.equals(true, infinity.isInfinite); - Expect.equals(true, (-infinity).isInfinite); - Expect.equals(false, (12.0).isInfinite); - Expect.equals(false, (-12.0).isInfinite); - Expect.equals(false, nan.isInfinite); - - // -- isNaN --. - // Smi. - Expect.equals(false, (0).isNaN); - Expect.equals(false, (1).isNaN); - Expect.equals(false, (-1).isNaN); - // Big. - Expect.equals(false, big.isNaN); - Expect.equals(false, (-big).isNaN); - // Double. - Expect.equals(true, nan.isNaN); - Expect.equals(false, (12.0).isNaN); - Expect.equals(false, infinity.isNaN); - - // -- abs --. - // Smi. - Expect.equals(0, (0).abs()); - Expect.equals(2, (2).abs()); - Expect.equals(2, (-2).abs()); - // Big. - Expect.equals(big, big.abs()); - Expect.equals(big, (-big).abs()); - // Double. - Expect.equals(false, (0.0).abs().isNegative); - Expect.equals(false, (-0.0).abs().isNegative); - Expect.equals(2.0, (2.0).abs()); - Expect.equals(2.0, (-2.0).abs()); - - // -- ceil --. - // Smi. - Expect.equals(0, (0).ceil()); - Expect.equals(1, (1).ceil()); - Expect.equals(-1, (-1).ceil()); - // Big. - Expect.equals(big, big.ceil()); - Expect.equals(-big, (-big).ceil()); - // Double. - Expect.equals(0, (0.0).ceil()); - Expect.equals(false, (0.0).ceil().isNegative); - Expect.equals(1, (0.1).ceil()); - Expect.equals(1, double.minPositive.ceil()); - Expect.equals(1, (0.49999999999999994).ceil()); - Expect.equals(0, (-0.0).ceil()); - Expect.equals(0, (-0.3).ceil()); - Expect.isTrue((-0.0).ceil() is int); - Expect.isTrue((-0.3).ceil() is int); - Expect.equals(0, (-0.49999999999999994).ceil()); - Expect.equals(3, (2.1).ceil()); - Expect.equals(-2, (-2.1).ceil()); - - // -- floor --. - // Smi. - Expect.equals(0, (0).floor()); - Expect.equals(1, (1).floor()); - Expect.equals(-1, (-1).floor()); - // Big. - Expect.equals(big, big.floor()); - Expect.equals(-big, (-big).floor()); - // Double. - Expect.equals(0, (0.0).floor()); - Expect.equals(0, (0.1).floor()); - Expect.equals(0, (0.49999999999999994).floor()); - Expect.equals(0, double.minPositive.floor()); - Expect.isTrue((0.0).floor() is int); - Expect.isTrue((0.1).floor() is int); - Expect.equals(0, (-0.0).floor()); - Expect.isTrue((-0.0).floor() is int); - Expect.equals(-1, (-0.1).floor()); - Expect.equals(2, (2.1).floor()); - Expect.equals(-3, (-2.1).floor()); - Expect.equals(-1.0, (-0.49999999999999994).floor()); - Expect.equals(-3.0, (-2.1).floor()); - - // -- truncate --. - // Smi. - Expect.equals(0, (0).truncate()); - Expect.equals(1, (1).truncate()); - Expect.equals(-1, (-1).truncate()); - // Big. - Expect.equals(big, big.truncate()); - Expect.equals(-big, (-big).truncate()); - // Double. - Expect.equals(0, (0.0).truncate()); - Expect.equals(0, (0.1).truncate()); - Expect.isTrue((0.0).truncate() is int); - Expect.isTrue((0.1).truncate() is int); - Expect.equals(0, (-0.0).truncate()); - Expect.equals(0, (-0.3).truncate()); - Expect.isTrue((-0.0).truncate() is int); - Expect.isTrue((-0.3).truncate() is int); - Expect.equals(2, (2.1).truncate()); - Expect.equals(-2, (-2.1).truncate()); - - int b1 = (1234567890123.0).truncate(); - int b2 = (1234567890124.0).truncate(); - Expect.equals(b2, b1 + 1.0); - - // -- round --. - // Smi. - Expect.equals(0, (0).round()); - Expect.equals(1, (1).round()); - Expect.equals(-1, (-1).round()); - // Big. - Expect.equals(big, big.round()); - Expect.equals(-big, (-big).round()); - // Double. - Expect.equals(3, (2.6).round()); - Expect.equals(-3, (-2.6).round()); - Expect.equals(0, (0.0).round()); - Expect.equals(0, (0.1).round()); - Expect.equals(3, (2.5).round()); - Expect.equals(-3, (-2.5).round()); - Expect.isFalse((0.0).round().isNegative); - Expect.isFalse((0.1).round().isNegative); - Expect.equals(0, (-0.0).round()); - Expect.equals(0, (-0.3).round()); - Expect.equals(2, (2.1).round()); - Expect.equals(-2, (-2.1).round()); - Expect.equals(1, (0.5).round()); - Expect.equals(-1, (-0.5).round()); - Expect.isTrue((-0.0).round() is int); - Expect.isTrue((-0.3).round() is int); - Expect.isTrue((-0.5).round() is int); - Expect.equals(2, (1.5).round()); - Expect.equals(-2, (-1.5).round()); - Expect.equals(1, (0.99).round()); - - // -- toInt --. - // Smi. - Expect.equals(0, (0).toInt()); - Expect.equals(1, (1).toInt()); - Expect.equals(-1, (-1).toInt()); - // Type checks. - { - int i = (0).toInt(); - } - { - int i = (1).toInt(); - } - { - int i = (-1).toInt(); - } - // Big. - Expect.equals(big, big.toInt()); - Expect.equals(-big, (-big).toInt()); - { - int i = big.toInt(); - } - { - int i = (-big).toInt(); - } - // Double. - Expect.equals(1234567890123, (1234567890123.0).toInt()); - Expect.equals(-1234567890123, (-1234567890123.0).toInt()); - { - int i = (1234567890123.0).toInt(); - } - { - int i = (-1234567890123.0).toInt(); - } - // 32bit Smi border cases. - Expect.equals(-1073741824, (-1073741824.0).toInt()); - Expect.equals(-1073741825, (-1073741825.0).toInt()); - Expect.equals(1073741823, (1073741823.0).toInt()); - Expect.equals(1073741824, (1073741824.0).toInt()); - - { - int i = (-1073741824.0).toInt(); - } - { - int i = (-1073741825.0).toInt(); - } - { - int i = (1073741823.0).toInt(); - } - { - int i = (1073741824.0).toInt(); - } - - // -- toDouble --. - // Smi. - Expect.equals(0.0, (0).toDouble()); - Expect.equals(1.0, (1).toDouble()); - Expect.equals(-1.0, (-1).toDouble()); - // Type checks. - { - double d = (0).toDouble(); - } - { - double d = (1).toDouble(); - } - { - double d = (-1).toDouble(); - } - // Big. - Expect.equals(big, big.toInt()); - Expect.equals(-big, (-big).toInt()); - { - int i = big.toInt(); - } - { - int i = (-big).toInt(); - } - - // Math functions. - Expect.equals(2.0, sqrt(4.0)); - Expect.approxEquals(1.0, sin(3.14159265 / 2.0)); - Expect.approxEquals(-1.0, cos(3.14159265)); - - Expect.equals(12, int.parse("12")); - Expect.equals(-12, int.parse("-12")); - Expect.equals(9007199254740991, int.parse("9007199254740991")); - Expect.equals(-9007199254740991, int.parse("-9007199254740991")); - // Type checks. - { - int i = int.parse("12"); - } - { - int i = int.parse("-12"); - } - { - int i = int.parse("1234567890123456789"); - } - { - int i = int.parse("-1234567890123456789"); - } - { - int i = int.parse("9223372036854775807"); - } - { - int i = int.parse("-9223372036854775808"); - } - - Expect.equals(1.2, double.parse("1.2")); - Expect.equals(-1.2, double.parse("-1.2")); - // Type checks. - { - double d = double.parse("1.2"); - } - { - double d = double.parse("-1.2"); - } - { - double d = double.parse("0"); - } - - // Random - { - Random rand = new Random(); - double d = rand.nextDouble(); - } - - Expect.equals(false, exceptionCaughtParseInt("22")); - Expect.equals(true, exceptionCaughtParseInt("alpha")); - Expect.equals(true, exceptionCaughtParseInt("-alpha")); - Expect.equals(false, exceptionCaughtParseDouble("22.2")); - Expect.equals(true, exceptionCaughtParseDouble("alpha")); - Expect.equals(true, exceptionCaughtParseDouble("-alpha")); - - Expect.equals(false, double.parse("1.2").isNaN); - Expect.equals(false, double.parse("1.2").isInfinite); - - Expect.equals(true, double.parse("NaN").isNaN); - Expect.equals(true, double.parse("Infinity").isInfinite); - Expect.equals(true, double.parse("-Infinity").isInfinite); - - Expect.equals(false, double.parse("NaN").isNegative); - Expect.equals(false, double.parse("Infinity").isNegative); - Expect.equals(true, double.parse("-Infinity").isNegative); - - Expect.equals("NaN", double.parse("NaN").toString()); - Expect.equals("Infinity", double.parse("Infinity").toString()); - Expect.equals("-Infinity", double.parse("-Infinity").toString()); - - Expect.equals(false, toIntThrowsUnsupportedError("1.2")); - Expect.equals(true, toIntThrowsUnsupportedError("Infinity")); - Expect.equals(true, toIntThrowsUnsupportedError("-Infinity")); - Expect.equals(true, toIntThrowsUnsupportedError("NaN")); - - // Min/max - Expect.equals(1, min(1, 12)); - Expect.equals(12, max(1, 12)); - Expect.equals(1.0, min(1.0, 12.0)); - Expect.equals(12.0, max(1.0, 12.0)); - Expect.equals(false, 1.0 < min(1.0, 12.0)); - Expect.equals(true, 1.0 < max(1.0, 12.0)); - - // Hashcode - Expect.equals(false, (3.4).hashCode == (1.2).hashCode); - Expect.equals(true, (1.2).hashCode == (1.2).hashCode); - Expect.equals(false, (3).hashCode == (1).hashCode); - Expect.equals(true, (10).hashCode == (10).hashCode); - } - - static int div(a, b) => a ~/ b; - - static void testSmiDivDeopt() { - var a = -0x40000000; - var b = -1; - for (var i = 0; i < 10; i++) Expect.equals(0x40000000, div(a, b)); - } - - static int divMod(a, b) => a ~/ b + a % b; - - static void testSmiDivModDeopt() { - var a = -0x40000000; - var b = -1; - for (var i = 0; i < 10; i++) Expect.equals(0x40000000, divMod(a, b)); - } - - static double sinCosSub(double a) => sin(a) - cos(a); - - static double sinCosAddCos(double a) => sin(a) * cos(a) + cos(a); - - static void testSinCos() { - var e = sin(1.234) - cos(1.234); - var f = sin(1.234) * cos(1.234) + cos(1.234); - - for (var i = 0; i < 20; i++) { - Expect.approxEquals(e, sinCosSub(1.234)); - Expect.approxEquals(f, sinCosAddCos(1.234)); - } - Expect.approxEquals(1.0, sinCosSub(3.14159265)); - Expect.approxEquals(1.0, sinCosSub(3.14159265 / 2.0)); - } - - // Test fix for issue 16592. - static void testSinCosNoUse() { - for (var i = 0; i < 20; i++) { - sin(i); - cos(i); - } - } - - static mySqrt(var x) => sqrt(x); - - static testSqrtDeopt() { - for (var i = 0; i < 10; i++) mySqrt(4.0); - Expect.equals(2.0, mySqrt(4.0)); - Expect.throws(() => mySqrt("abc")); - } - - static self_equality(x) { - return x == x; - } - - static testDoubleEquality() { - Expect.isFalse(self_equality(double.nan)); - for (int i = 0; i < 20; i++) { - self_equality(3.0); - } - Expect.isFalse(self_equality(double.nan)); - } - - static testMain() { - for (int i = 0; i < 20; i++) { - runOne(); - testSmiDivDeopt(); - testSmiDivModDeopt(); - testSqrtDeopt(); - testDoubleEquality(); - testSinCos(); - testSinCosNoUse(); - } - } -} - -main() { - ArithmeticTest.testMain(); -} diff --git a/tests/language_2/operator/bit_operations_test.dart b/tests/language_2/operator/bit_operations_test.dart deleted file mode 100644 index d604759b045..00000000000 --- a/tests/language_2/operator/bit_operations_test.dart +++ /dev/null @@ -1,257 +0,0 @@ -// 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 test for testing bitwise operations. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -void main() { - for (int i = 0; i < 4; i++) { - test(); - } -} - -void test() { - Expect.equals(3, (3 & 7)); - Expect.equals(7, (3 | 7)); - Expect.equals(4, (3 ^ 7)); - Expect.equals(25, (100 >> 2)); - Expect.equals(400, (100 << 2)); - Expect.equals(-25, (-100 >> 2)); - Expect.equals(-101, ~100); - Expect.equals(0, 1 << 64); - Expect.equals(0, -1 << 64); - Expect.equals(0x40000000, 0x04000000 << 4); - Expect.equals(0x4000000000000000, 0x0400000000000000 << 4); - Expect.equals(0, ~ -1); - Expect.equals(-1, ~0); - - Expect.equals(0, 1 >> 160); - Expect.equals(-1, -1 >> 160); - - Expect.equals(0x1000000000000001, 0x1000000000000001 & 0x1000100F00000001); - Expect.equals(0x1, 0x1 & 0x1000100F00000001); - Expect.equals(0x1, 0x1000100F00000001 & 0x1); - - Expect.equals(0x1000100F00000001, 0x1000000000000001 | 0x1000100F00000001); - Expect.equals(0x1000100F00000011, 0x11 | 0x1000100F00000001); - Expect.equals(0x1000100F00000011, 0x1000100F00000001 | 0x11); - - Expect.equals(0x0F00000000000000, 0x0F00000000000001 ^ 0x0000000000000001); - Expect.equals(0x31, 0x0F00000000000001 ^ 0x0F00000000000030); - Expect.equals(0x0F00000000000031, 0x0F00000000000001 ^ 0x30); - Expect.equals(0x0F00000000000031, 0x30 ^ 0x0F00000000000001); - - Expect.equals(0x000000000000000F, 0x000000000000000F7 >> 4); - Expect.equals(15, 0xF00000000 >> 32); - Expect.equals(1030792151040, 16492674416655 >> 4); - - Expect.equals(0x00000000000000F0, 0xF00000000000000F << 4); - Expect.equals(0xF00000000, 15 << 32); - - // Test bitwise operations on booleans - // This avoids frontend optimizations - final trueValue = int.parse("1") == 1; - final falseValue = int.parse("2") == 1; - Expect.equals(trueValue, trueValue & trueValue); - Expect.equals(falseValue, trueValue & falseValue); - Expect.equals(falseValue, falseValue & trueValue); - Expect.equals(falseValue, falseValue & falseValue); - Expect.equals(trueValue, trueValue | trueValue); - Expect.equals(trueValue, trueValue | falseValue); - Expect.equals(trueValue, falseValue | trueValue); - Expect.equals(falseValue, falseValue | falseValue); - Expect.equals(falseValue, trueValue ^ trueValue); - Expect.equals(trueValue, trueValue ^ falseValue); - Expect.equals(trueValue, falseValue ^ trueValue); - Expect.equals(falseValue, falseValue ^ falseValue); - - testNegativeValueShifts(); - testPositiveValueShifts(); - testNoMaskingOfShiftCount(); - testNegativeCountShifts(); - for (int i = 0; i < 20; i++) { - testCornerCasesRightShifts(); - testRightShift64Bit(); - testLeftShift64Bit(); - testLeftShift64BitWithOverflow1(); - testLeftShift64BitWithOverflow2(); - testLeftShift64BitWithOverflow3(); - } - - // Test precedence. - testPrecedence(4, 5, 3, 1); - testPrecedence(3, 4, 5, 9); - testPrecedence(0x5c71, 0x6b92, 0x7654, 0x7d28); - - // Test more special cases. - testRightShift65(); -} - -void testCornerCasesRightShifts() { - var v32 = 0xFF000000; - var v64 = 0xFF00000000000000; - Expect.equals(0x3, v32 >> 0x1E); - Expect.equals(0x1, v32 >> 0x1F); - Expect.equals(0x0, v32 >> 0x20); - Expect.equals(-1, v64 >> 0x3E); - Expect.equals(-1, v64 >> 0x3F); - Expect.equals(-1, v64 >> 0x40); -} - -void testRightShift64Bit() { - var t = 0x1ffffffff; - Expect.equals(0xffffffff, t >> 1); -} - -void testLeftShift64Bit() { - var t = 0xffffffff; - Expect.equals(0xffffffff, t << 0); - Expect.equals(0x1fffffffe, t << 1); - Expect.equals(0x7fffffff80000000, t << 31); - Expect.equals(0x8000000000000000, (t + 1) << 31); -} - -void testLeftShift64BitWithOverflow1() { - var t = 0xffffffff; - Expect.equals(0, 2 * (t + 1) << 31); //# 03: ok -} - -void testLeftShift64BitWithOverflow2() { - var t = 0xffffffff; - Expect.equals(0, 4 * (t + 1) << 31); //# 04: ok -} - -void testLeftShift64BitWithOverflow3() { - var t = 0xffffffff; - Expect.equals(0x8000000000000000, (t + 1) << 31); -} - -void testNegativeCountShifts() { - bool throwOnLeft(a, b) { - try { - var x = a << b; - return false; - } catch (e) { - return true; - } - } - - bool throwOnRight(a, b) { - try { - var x = a >> b; - return false; - } catch (e) { - return true; - } - } - - Expect.isTrue(throwOnLeft(12, -3)); - Expect.isTrue(throwOnRight(12, -3)); - for (int i = 0; i < 20; i++) { - Expect.isFalse(throwOnLeft(12, 3)); - Expect.isFalse(throwOnRight(12, 3)); - } -} - -void testNegativeValueShifts() { - for (int value = 0; value > -100; value--) { - for (int i = 0; i < 300; i++) { - int b = (value << i) >> i; - if (i < (64 - value.bitLength)) { - // No bits lost. - Expect.equals(value, b); - } else if (i >= 64) { - // All bits are shifted out. - Expect.equals(0, b); - } else { - // Some bits are lost. - int masked_value = value & ((1 << (64 - i)) - 1); - int signbit = masked_value & (1 << (63 - i)); - int signmask = (signbit != 0) ? (-1 << (64 - i)) : 0; - Expect.equals(signmask | masked_value, b); - } - } - } -} - -void testPositiveValueShifts() { - for (int value = 0; value < 100; value++) { - for (int i = 0; i < 300; i++) { - int b = (value << i) >> i; - if (i < (64 - value.bitLength)) { - Expect.equals(value, b); - } else if (i >= 64) { - Expect.equals(0, b); - } else { - // Some bits are lost. - int masked_value = value & ((1 << (64 - i)) - 1); - int signbit = masked_value & (1 << (63 - i)); - int signmask = (signbit != 0) ? (-1 << (64 - i)) : 0; - Expect.equals(signmask | masked_value, b); - } - } - } -} - -void testNoMaskingOfShiftCount() { - // Shifts which would behave differently if shift count was masked into a - // range. - Expect.equals(0, 0 >> 256); - Expect.equals(0, 1 >> 256); - Expect.equals(0, 2 >> 256); - Expect.equals(0, shiftRight(0, 256)); - Expect.equals(0, shiftRight(1, 256)); - Expect.equals(0, shiftRight(2, 256)); - - for (int shift = 1; shift <= 256; shift++) { - Expect.equals(0, shiftRight(1, shift)); - Expect.equals(-1, shiftRight(-1, shift)); - if (shift < 63) { - Expect.equals(true, shiftLeft(1, shift) > shiftLeft(1, shift - 1)); - } else if (shift > 64) { - Expect.equals( - true, (shiftLeft(1, shift) == 0) && (shiftLeft(1, shift - 1) == 0)); - } - } -} - -int shiftLeft(int a, int b) { - return a << b; -} - -int shiftRight(int a, int b) { - return a >> b; -} - -void testPrecedence(int a, int b, int c, int d) { - // & binds stronger than ^, which binds stronger than |. - int result = a & b ^ c | d & b ^ c; - Expect.equals(((a & b) ^ c) | ((d & b) ^ c), result); // &^| - Expect.notEquals((a & (b ^ c)) | (d & (b ^ c)), result); // ^&| - Expect.notEquals((a & b) ^ (c | (d & b)) ^ c, result); // &|^ - Expect.notEquals((a & b) ^ ((c | d) & b) ^ c, result); // |&^ - Expect.notEquals(a & (b ^ (c | d)) & (b ^ c), result); // |^& - Expect.notEquals(a & ((b ^ c) | d) & (b ^ c), result); // ^|& - // Binds stronger than relational operators. - Expect.equals((a & b) < (c & d), a & b < c & d); - // Binds weaker than shift operators. - Expect.equals((a & (b << c)) ^ d, a & b << c ^ d); - Expect.notEquals((a & b) << (c ^ d), a & b << c ^ d); -} - -@pragma('vm:never-inline') -rightShift65Noinline(a) => a >> 65; - -testRightShift65() { - var a = 0x5f22334455667788; - var b = -0x5f22334455667788; - - for (var i = 0; i < 20; ++i) { - Expect.equals(0, rightShift65Noinline(a)); - Expect.equals(-1, rightShift65Noinline(b)); - } -} diff --git a/tests/language_2/operator/bit_shift_test.dart b/tests/language_2/operator/bit_shift_test.dart deleted file mode 100644 index efe2d291b11..00000000000 --- a/tests/language_2/operator/bit_shift_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2012, 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. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -constants() { - Expect.equals(0, 499 >> 33); - Expect.equals(0, (499 << 33) & 0xFFFFFFFF); - Expect.equals(0, (499 << 32) >> 65); - Expect.equals(0, (499 << 32) << 65); -} - -foo(i) { - if (i != 0) { - y--; - foo(i - 1); - y++; - } -} - -var y; - -// id returns [x] in a way that should be difficult to predict statically. -id(x) { - y = x; - foo(10); - return y; -} - -interceptors() { - Expect.equals(0, id(499) >> 33); - Expect.equals(0, (id(499) << 33) & 0xFFFFFFFF); - Expect.equals(0, id(499 << 32) >> 65); - Expect.equals(0, id(499 << 32) << 65); -} - -speculative() { - var a = id(499); - var b = id(499 << 32); - for (int i = 0; i < 1; i++) { - Expect.equals(0, a >> 33); - Expect.equals(0, (a << 33) & 0xFFFFFFFF); - Expect.equals(0, b >> 65); - Expect.equals(0, b << 65); - } -} - -// JavaScript shifts by the amount modulo 32. That is x << y is equivalent to -// x << (y & 0x1F). Dart does not. -main() { - for (var i = 0; i < 10; ++i) { - constants(); - interceptors(); - speculative(); - } -} diff --git a/tests/language_2/operator/comparison_test.dart b/tests/language_2/operator/comparison_test.dart deleted file mode 100644 index 11dcd6c9980..00000000000 --- a/tests/language_2/operator/comparison_test.dart +++ /dev/null @@ -1,327 +0,0 @@ -// 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 test program for testing comparison operators. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Helper { - static bool STRICT_EQ(a, b) { - return identical(a, b); - } - - static bool STRICT_NE(a, b) { - return !identical(a, b); - } - - static bool EQ(a, b) { - return a == b; - } - - static bool NE(a, b) { - return a != b; - } - - static bool LT(a, b) { - return a < b; - } - - static bool LE(a, b) { - return a <= b; - } - - static bool GT(a, b) { - return a > b; - } - - static bool GE(a, b) { - return a >= b; - } -} - -class A { - var b; - - A(x) : b = x {} -} - -class ComparisonTest { - static testMain() { - var a = new A(0); - var b = new A(1); - Expect.isTrue(Helper.STRICT_EQ(a, a)); - Expect.isFalse(Helper.STRICT_EQ(a, b)); - Expect.isFalse(Helper.STRICT_EQ(b, a)); - Expect.isTrue(Helper.STRICT_EQ(b, b)); - - Expect.isFalse(Helper.STRICT_NE(a, a)); - Expect.isTrue(Helper.STRICT_NE(a, b)); - Expect.isTrue(Helper.STRICT_NE(b, a)); - Expect.isFalse(Helper.STRICT_NE(b, b)); - - Expect.isTrue(Helper.STRICT_EQ(false, false)); - Expect.isFalse(Helper.STRICT_EQ(false, true)); - Expect.isFalse(Helper.STRICT_EQ(true, false)); - Expect.isTrue(Helper.STRICT_EQ(true, true)); - - Expect.isFalse(Helper.STRICT_NE(false, false)); - Expect.isTrue(Helper.STRICT_NE(false, true)); - Expect.isTrue(Helper.STRICT_NE(true, false)); - Expect.isFalse(Helper.STRICT_NE(true, true)); - - Expect.isTrue(Helper.STRICT_EQ(false, false)); - Expect.isFalse(Helper.STRICT_EQ(false, true)); - Expect.isFalse(Helper.STRICT_EQ(true, false)); - Expect.isTrue(Helper.STRICT_EQ(true, true)); - - Expect.isFalse(Helper.STRICT_NE(false, false)); - Expect.isTrue(Helper.STRICT_NE(false, true)); - Expect.isTrue(Helper.STRICT_NE(true, false)); - Expect.isFalse(Helper.STRICT_NE(true, true)); - - Expect.isTrue(Helper.EQ(false, false)); - Expect.isFalse(Helper.EQ(false, true)); - Expect.isFalse(Helper.EQ(true, false)); - Expect.isTrue(Helper.EQ(true, true)); - - Expect.isFalse(Helper.NE(false, false)); - Expect.isTrue(Helper.NE(false, true)); - Expect.isTrue(Helper.NE(true, false)); - Expect.isFalse(Helper.NE(true, true)); - - Expect.isTrue(Helper.STRICT_EQ(-1, -1)); - Expect.isTrue(Helper.STRICT_EQ(0, 0)); - Expect.isTrue(Helper.STRICT_EQ(1, 1)); - Expect.isFalse(Helper.STRICT_EQ(-1, 0)); - Expect.isFalse(Helper.STRICT_EQ(-1, 1)); - Expect.isFalse(Helper.STRICT_EQ(0, 1)); - - Expect.isFalse(Helper.STRICT_NE(-1, -1)); - Expect.isFalse(Helper.STRICT_NE(0, 0)); - Expect.isFalse(Helper.STRICT_NE(1, 1)); - Expect.isTrue(Helper.STRICT_NE(-1, 0)); - Expect.isTrue(Helper.STRICT_NE(-1, 1)); - Expect.isTrue(Helper.STRICT_NE(0, 1)); - - Expect.isTrue(Helper.EQ(-1, -1)); - Expect.isTrue(Helper.EQ(0, 0)); - Expect.isTrue(Helper.EQ(1, 1)); - Expect.isFalse(Helper.EQ(-1, 0)); - Expect.isFalse(Helper.EQ(-1, 1)); - Expect.isFalse(Helper.EQ(0, 1)); - - Expect.isFalse(Helper.NE(-1, -1)); - Expect.isFalse(Helper.NE(0, 0)); - Expect.isFalse(Helper.NE(1, 1)); - Expect.isTrue(Helper.NE(-1, 0)); - Expect.isTrue(Helper.NE(-1, 1)); - Expect.isTrue(Helper.NE(0, 1)); - - Expect.isFalse(Helper.LT(-1, -1)); - Expect.isFalse(Helper.LT(0, 0)); - Expect.isFalse(Helper.LT(1, 1)); - Expect.isTrue(Helper.LT(-1, 0)); - Expect.isTrue(Helper.LT(-1, 1)); - Expect.isTrue(Helper.LT(0, 1)); - Expect.isFalse(Helper.LT(0, -1)); - Expect.isFalse(Helper.LT(1, -1)); - Expect.isFalse(Helper.LT(1, 0)); - - Expect.isTrue(Helper.LE(-1, -1)); - Expect.isTrue(Helper.LE(0, 0)); - Expect.isTrue(Helper.LE(1, 1)); - Expect.isTrue(Helper.LE(-1, 0)); - Expect.isTrue(Helper.LE(-1, 1)); - Expect.isTrue(Helper.LE(0, 1)); - Expect.isFalse(Helper.LE(0, -1)); - Expect.isFalse(Helper.LE(1, -1)); - Expect.isFalse(Helper.LE(1, 0)); - - Expect.isFalse(Helper.GT(-1, -1)); - Expect.isFalse(Helper.GT(0, 0)); - Expect.isFalse(Helper.GT(1, 1)); - Expect.isFalse(Helper.GT(-1, 0)); - Expect.isFalse(Helper.GT(-1, 1)); - Expect.isFalse(Helper.GT(0, 1)); - Expect.isTrue(Helper.GT(0, -1)); - Expect.isTrue(Helper.GT(1, -1)); - Expect.isTrue(Helper.GT(1, 0)); - - Expect.isTrue(Helper.GE(-1, -1)); - Expect.isTrue(Helper.GE(0, 0)); - Expect.isTrue(Helper.GE(1, 1)); - Expect.isFalse(Helper.GE(-1, 0)); - Expect.isFalse(Helper.GE(-1, 1)); - Expect.isFalse(Helper.GE(0, 1)); - Expect.isTrue(Helper.GE(0, -1)); - Expect.isTrue(Helper.GE(1, -1)); - Expect.isTrue(Helper.GE(1, 0)); - - Expect.isTrue(Helper.STRICT_EQ(-1.0, -1.0)); - Expect.isTrue(Helper.STRICT_EQ(0.0, 0.0)); - Expect.isTrue(Helper.STRICT_EQ(1.0, 1.0)); - Expect.isFalse(Helper.STRICT_EQ(-1.0, 0.0)); - Expect.isFalse(Helper.STRICT_EQ(-1.0, 1.0)); - Expect.isFalse(Helper.STRICT_EQ(0.0, 1.0)); - - Expect.isFalse(Helper.STRICT_NE(-1.0, -1.0)); - Expect.isFalse(Helper.STRICT_NE(0.0, 0.0)); - Expect.isFalse(Helper.STRICT_NE(1.0, 1.0)); - Expect.isTrue(Helper.STRICT_NE(-1.0, 0.0)); - Expect.isTrue(Helper.STRICT_NE(-1.0, 1.0)); - Expect.isTrue(Helper.STRICT_NE(0.0, 1.0)); - - Expect.isTrue(Helper.EQ(-1.0, -1.0)); - Expect.isTrue(Helper.EQ(0.0, 0.0)); - Expect.isTrue(Helper.EQ(1.0, 1.0)); - Expect.isFalse(Helper.EQ(-1.0, 0.0)); - Expect.isFalse(Helper.EQ(-1.0, 1.0)); - Expect.isFalse(Helper.EQ(0.0, 1.0)); - - Expect.isFalse(Helper.NE(-1.0, -1.0)); - Expect.isFalse(Helper.NE(0.0, 0.0)); - Expect.isFalse(Helper.NE(1.0, 1.0)); - Expect.isTrue(Helper.NE(-1.0, 0.0)); - Expect.isTrue(Helper.NE(-1.0, 1.0)); - Expect.isTrue(Helper.NE(0.0, 1.0)); - - Expect.isFalse(Helper.LT(-1.0, -1.0)); - Expect.isFalse(Helper.LT(0.0, 0.0)); - Expect.isFalse(Helper.LT(1.0, 1.0)); - Expect.isTrue(Helper.LT(-1.0, 0.0)); - Expect.isTrue(Helper.LT(-1.0, 1.0)); - Expect.isTrue(Helper.LT(0.0, 1.0)); - Expect.isFalse(Helper.LT(0.0, -1.0)); - Expect.isFalse(Helper.LT(1.0, -1.0)); - Expect.isFalse(Helper.LT(1.0, 0.0)); - - Expect.isTrue(Helper.LE(-1.0, -1.0)); - Expect.isTrue(Helper.LE(0.0, 0.0)); - Expect.isTrue(Helper.LE(1.0, 1.0)); - Expect.isTrue(Helper.LE(-1.0, 0.0)); - Expect.isTrue(Helper.LE(-1.0, 1.0)); - Expect.isTrue(Helper.LE(0.0, 1.0)); - Expect.isFalse(Helper.LE(0.0, -1.0)); - Expect.isFalse(Helper.LE(1.0, -1.0)); - Expect.isFalse(Helper.LE(1.0, 0.0)); - - Expect.isFalse(Helper.GT(-1.0, -1.0)); - Expect.isFalse(Helper.GT(0.0, 0.0)); - Expect.isFalse(Helper.GT(1.0, 1.0)); - Expect.isFalse(Helper.GT(-1.0, 0.0)); - Expect.isFalse(Helper.GT(-1.0, 1.0)); - Expect.isFalse(Helper.GT(0.0, 1.0)); - Expect.isTrue(Helper.GT(0.0, -1.0)); - Expect.isTrue(Helper.GT(1.0, -1.0)); - Expect.isTrue(Helper.GT(1.0, 0.0)); - - Expect.isTrue(Helper.GE(-1.0, -1.0)); - Expect.isTrue(Helper.GE(0.0, 0.0)); - Expect.isTrue(Helper.GE(1.0, 1.0)); - Expect.isFalse(Helper.GE(-1.0, 0.0)); - Expect.isFalse(Helper.GE(-1.0, 1.0)); - Expect.isFalse(Helper.GE(0.0, 1.0)); - Expect.isTrue(Helper.GE(0.0, -1.0)); - Expect.isTrue(Helper.GE(1.0, -1.0)); - Expect.isTrue(Helper.GE(1.0, 0.0)); - - Expect.isTrue(Helper.EQ(null, null)); - Expect.isFalse(Helper.EQ(null, "Str")); - Expect.isTrue(Helper.NE(null, 2)); - Expect.isFalse(Helper.NE(null, null)); - - Expect.isTrue(Helper.STRICT_EQ(null, null)); - Expect.isFalse(Helper.STRICT_EQ(null, "Str")); - Expect.isTrue(Helper.STRICT_NE(null, 2)); - Expect.isFalse(Helper.STRICT_NE(null, null)); - - Expect.isFalse(Helper.GT(1, 1.2)); - Expect.isTrue(Helper.GT(3, 1.2)); - Expect.isTrue(Helper.GT(2.0, 1)); - Expect.isFalse(Helper.GT(3.1, 4)); - - Expect.isFalse(Helper.GE(1, 1.2)); - Expect.isTrue(Helper.GE(3, 1.2)); - Expect.isTrue(Helper.GE(2.0, 1)); - Expect.isFalse(Helper.GE(3.1, 4)); - Expect.isTrue(Helper.GE(2.0, 2)); - Expect.isTrue(Helper.GE(2, 2.0)); - - Expect.isTrue(Helper.LT(1, 1.2)); - Expect.isFalse(Helper.LT(3, 1.2)); - Expect.isFalse(Helper.LT(2.0, 1)); - Expect.isTrue(Helper.LT(3.1, 4)); - - Expect.isTrue(Helper.LE(1, 1.2)); - Expect.isFalse(Helper.LE(3, 1.2)); - Expect.isFalse(Helper.LE(2.0, 1)); - Expect.isTrue(Helper.LE(3.1, 4)); - Expect.isTrue(Helper.LE(2.0, 2)); - Expect.isTrue(Helper.LE(2, 2.0)); - - // Bignums. - Expect.isTrue(Helper.LE(0xF00000000005, 0xF00000000006)); - Expect.isTrue(Helper.LE(0xF00000000005, 0xF00000000005)); - Expect.isFalse(Helper.LE(0xF00000000006, 0xF00000000005)); - Expect.isTrue(Helper.LE(12, 0xF00000000005)); - Expect.isTrue(Helper.LE(12.2, 0xF00000000005)); - - Expect.isTrue(Helper.EQ(4294967295, 4.294967295e9)); - Expect.isTrue(Helper.EQ(4.294967295e9, 4294967295)); - Expect.isFalse(Helper.EQ(4.294967295e9, 42)); - Expect.isFalse(Helper.EQ(42, 4.294967295e9)); - Expect.isFalse(Helper.EQ(4294967295, 42)); - Expect.isFalse(Helper.EQ(42, 4294967295)); - - // Fractions & mixed - Expect.isTrue(Helper.EQ(1.0, 1)); - Expect.isTrue(Helper.EQ(1.0, 1)); - Expect.isTrue(Helper.EQ(1, 1.0)); - Expect.isTrue(Helper.EQ(1, 1.0)); - Expect.isTrue(Helper.EQ(1.1, 1.1)); - Expect.isTrue(Helper.EQ(1.1, 1.1)); - Expect.isTrue(Helper.EQ(1.1, 1.1)); - - Expect.isFalse(Helper.GT(1, 1.2)); - Expect.isTrue(Helper.GT(1.2, 1)); - Expect.isTrue(Helper.GT(1.2, 1.1)); - Expect.isTrue(Helper.GT(1.2, 1.1)); - Expect.isTrue(Helper.GT(1.2, 1.1)); - - Expect.isTrue(Helper.LT(1, 1.2)); - Expect.isFalse(Helper.LT(1.2, 1)); - Expect.isFalse(Helper.LT(1.2, 1.1)); - Expect.isFalse(Helper.LT(1.2, 1.1)); - Expect.isFalse(Helper.LT(1.2, 1.1)); - - Expect.isFalse(Helper.GE(1.1, 1.2)); - Expect.isFalse(Helper.GE(1.1, 1.2)); - Expect.isTrue(Helper.GE(1.2, 1.2)); - Expect.isTrue(Helper.GE(1.2, 1.2)); - - // With non-number classes. - Expect.isFalse(Helper.EQ(1, "eeny")); - Expect.isFalse(Helper.EQ("meeny", 1)); - Expect.isFalse(Helper.EQ(1.1, "miny")); - Expect.isFalse(Helper.EQ("moe", 1.1)); - Expect.isFalse(Helper.EQ(1.1, "catch")); - Expect.isFalse(Helper.EQ("the", 1.1)); - - // With null. - Expect.isFalse(Helper.EQ(1, null)); - Expect.isFalse(Helper.EQ(null, 1)); - Expect.isFalse(Helper.EQ(1.1, null)); - Expect.isFalse(Helper.EQ(null, 1.1)); - Expect.isFalse(Helper.EQ(1.1, null)); - Expect.isFalse(Helper.EQ(null, 1.1)); - - // TODO(srdjan): Clarify behaviour of greater/less comparisons - // between numbers and non-numbers. - } -} - -main() { - ComparisonTest.testMain(); -} diff --git a/tests/language_2/operator/compound_assignment_test.dart b/tests/language_2/operator/compound_assignment_test.dart deleted file mode 100644 index cc57b1a2f75..00000000000 --- a/tests/language_2/operator/compound_assignment_test.dart +++ /dev/null @@ -1,125 +0,0 @@ -// 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. -// Tests that lhs of a compound assignment is executed only once. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Indexed { - Indexed() - : _f = new List.filled(10, null), - count = 0 { - _f[0] = 100; - _f[1] = 200; - } - operator [](i) { - count++; - return _f; - } - - var count; - var _f; -} - -var result; - -class A { - get field { - result.add(1); - return 1; - } - - set field(value) {} - - static get static_field { - result.add(0); - return 1; - } - - static set static_field(value) { - result.add(1); - } -} - -class CompoundAssignmentOperatorTest { - static void testIndexed() { - Indexed indexed = new Indexed(); - Expect.equals(0, indexed.count); - var tmp = indexed[0]; - Expect.equals(1, indexed.count); - Expect.equals(100, indexed[4][0]); - Expect.equals(2, indexed.count); - Expect.equals(100, indexed[4][0]++); - Expect.equals(3, indexed.count); - Expect.equals(101, indexed[4][0]); - Expect.equals(4, indexed.count); - indexed[4][0] += 10; - Expect.equals(5, indexed.count); - Expect.equals(111, indexed[4][0]); - var i = 0; - indexed[3][i++] += 1; - Expect.equals(1, i); - } - - static testIndexedMore() { - result = []; - array() { - result.add(0); - return [0]; - } - - index() { - result.add(1); - return 0; - } - - middle() { - result.add(2); - } - - sequence(a, b, c) { - result.add(3); - } - - sequence(array()[index()] += 1, middle(), array()[index()] += 1); - Expect.listEquals([0, 1, 2, 0, 1, 3], result); - } - - static testIndexedMoreMore() { - result = []; - middle() { - result.add(2); - } - - obj() { - result.add(0); - return new A(); - } - - sequence(a, b, c) { - result.add(3); - } - - sequence(obj().field += 1, middle(), obj().field += 1); - Expect.listEquals([0, 1, 2, 0, 1, 3], result); - - result = []; - sequence(A.static_field++, middle(), A.static_field++); - Expect.listEquals([0, 1, 2, 0, 1, 3], result); - } - - static void testMain() { - for (int i = 0; i < 20; i++) { - testIndexed(); - testIndexedMore(); - testIndexedMoreMore(); - } - } -} - -main() { - CompoundAssignmentOperatorTest.testMain(); -} diff --git a/tests/language_2/operator/cond_expr_test.dart b/tests/language_2/operator/cond_expr_test.dart deleted file mode 100644 index b76a10e8b0c..00000000000 --- a/tests/language_2/operator/cond_expr_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// 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. -// Check that conditional expressions can contain assignment expressions. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -var e1, e2; - -f(a) => a < 0 ? e1 = -1 : e2 = 1; - -main() { - e1 = 0; - e2 = 0; - var r = f(-100); - Expect.equals(-1, r); - Expect.equals(-1, e1); - Expect.equals(0, e2); - - e1 = 0; - e2 = 0; - r = f(100); - Expect.equals(1, r); - Expect.equals(0, e1); - Expect.equals(1, e2); -} diff --git a/tests/language_2/operator/div_by_zero_test.dart b/tests/language_2/operator/div_by_zero_test.dart deleted file mode 100644 index 4339aaf3e95..00000000000 --- a/tests/language_2/operator/div_by_zero_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// 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 test program to test integer div by zero. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class DivByZeroTest { - static double divBy(int a, int b) { - var result = a / b; - return 1.0 * result; - } - - static bool moustacheDivBy(int a, int b) { - var val = null; - try { - val = a ~/ b; - } catch (e) { - return true; - } - print("Should not have gotten: $val"); - return false; - } - - static void testMain() { - Expect.isTrue(divBy(0, 0).isNaN); - Expect.isTrue(moustacheDivBy(0, 0)); - } -} - -main() { - DivByZeroTest.testMain(); -} diff --git a/tests/language_2/operator/div_with_power_of_two2_test.dart b/tests/language_2/operator/div_with_power_of_two2_test.dart deleted file mode 100644 index b3db5ce5dfe..00000000000 --- a/tests/language_2/operator/div_with_power_of_two2_test.dart +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) 2013, 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. -// Test division by power of two. -// Test that results before and after optimization are the same. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// [function, [list of tuples argument/result]]. -var expectedResults = [ - [ - divBy1, - [ - [134217730, 134217730], - [-134217730, -134217730], - [10, 10], - [-10, -10] - ] - ], - [ - divByNeg1, - [ - [134217730, -134217730], - [-134217730, 134217730], - [10, -10], - [-10, 10] - ] - ], - [ - divBy2, - [ - [134217730, 67108865], - [-134217730, -67108865], - [10, 5], - [-10, -5] - ] - ], - [ - divByNeg2, - [ - [134217730, -67108865], - [-134217730, 67108865], - [10, -5], - [-10, 5] - ] - ], - [ - divBy4, - [ - [134217730, 33554432], - [-134217730, -33554432], - [10, 2], - [-10, -2] - ] - ], - [ - divByNeg4, - [ - [134217730, -33554432], - [-134217730, 33554432], - [10, -2], - [-10, 2] - ] - ], - [ - divBy134217728, - [ - [134217730, 1], - [-134217730, -1], - [10, 0], - [-10, 0] - ] - ], - [ - divByNeg134217728, - [ - [134217730, -1], - [-134217730, 1], - [10, 0], - [-10, 0] - ] - ], - // Use different functions for 64 bit arguments. - [ - divBy4_, - [ - [549755813990, 137438953497], - [-549755813990, -137438953497], - [288230925907525632, 72057731476881408], - [-288230925907525632, -72057731476881408] - ] - ], - [ - divByNeg4_, - [ - [549755813990, -137438953497], - [-549755813990, 137438953497], - [288230925907525632, -72057731476881408], - [-288230925907525632, 72057731476881408] - ] - ], - [ - divBy549755813888, - [ - [549755813990, 1], - [-549755813990, -1], - [288230925907525632, 524289], - [-288230925907525632, -524289] - ] - ], - [ - divByNeg549755813888, - [ - [549755813990, -1], - [-549755813990, 1], - [288230925907525632, -524289], - [-288230925907525632, 524289] - ] - ], -]; - -divBy0(a) => a ~/ 0; -divBy1(a) => a ~/ 1; -divByNeg1(a) => a ~/ -1; -divBy2(a) => a ~/ 2; -divByNeg2(a) => a ~/ -2; -divBy4(a) => a ~/ 4; -divByNeg4(a) => a ~/ -4; -divBy134217728(a) => a ~/ 134217728; -divByNeg134217728(a) => a ~/ -134217728; - -divBy4_(a) => a ~/ 4; -divByNeg4_(a) => a ~/ -4; -divBy549755813888(a) => a ~/ 549755813888; -divByNeg549755813888(a) => a ~/ -549755813888; - -main() { - for (int i = 0; i < 20; i++) { - for (var e in expectedResults) { - Function f = e[0]; - List values = e[1]; - for (var v in values) { - int arg = v[0]; - int res = v[1]; - Expect.equals(res, f(arg)); - } - } - Expect.throws(() => divBy0(4)); - ; - } -} diff --git a/tests/language_2/operator/div_with_power_of_two_test.dart b/tests/language_2/operator/div_with_power_of_two_test.dart deleted file mode 100644 index 987b4676bff..00000000000 --- a/tests/language_2/operator/div_with_power_of_two_test.dart +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) 2013, 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. -// Test division by power of two. -// Test that results before and after optimization are the same. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// [function, [list of tuples argument/result]]. -var expectedResults = [ - [ - divBy1, - [ - [134217730, 134217730], - [-134217730, -134217730], - [10, 10], - [-10, -10] - ] - ], - [ - divByNeg1, - [ - [134217730, -134217730], - [-134217730, 134217730], - [10, -10], - [-10, 10] - ] - ], - [ - divBy2, - [ - [134217730, 67108865], - [-134217730, -67108865], - [10, 5], - [-10, -5] - ] - ], - [ - divByNeg2, - [ - [134217730, -67108865], - [-134217730, 67108865], - [10, -5], - [-10, 5] - ] - ], - [ - divBy4, - [ - [134217730, 33554432], - [-134217730, -33554432], - [10, 2], - [-10, -2] - ] - ], - [ - divByNeg4, - [ - [134217730, -33554432], - [-134217730, 33554432], - [10, -2], - [-10, 2] - ] - ], - [ - divBy134217728, - [ - [134217730, 1], - [-134217730, -1], - [10, 0], - [-10, 0] - ] - ], - [ - divByNeg134217728, - [ - [134217730, -1], - [-134217730, 1], - [10, 0], - [-10, 0] - ] - ], - // Use different functions for 64 bit arguments. - [ - divBy4_, - [ - [549755813990, 137438953497], - [-549755813990, -137438953497], - [288230925907525632, 72057731476881408], - [-288230925907525632, -72057731476881408] - ] - ], - [ - divByNeg4_, - [ - [549755813990, -137438953497], - [-549755813990, 137438953497], - [288230925907525632, -72057731476881408], - [-288230925907525632, 72057731476881408] - ] - ], - [ - divBy549755813888, - [ - [549755813990, 1], - [-549755813990, -1], - [288230925907525632, 524289], - [-288230925907525632, -524289] - ] - ], - [ - divByNeg549755813888, - [ - [549755813990, -1], - [-549755813990, 1], - [288230925907525632, -524289], - [-288230925907525632, 524289] - ] - ], -]; - -divBy0(a) => a ~/ 0; -divBy1(a) => a ~/ 1; -divByNeg1(a) => a ~/ -1; -divBy2(a) => a ~/ 2; -divByNeg2(a) => a ~/ -2; -divBy4(a) => a ~/ 4; -divByNeg4(a) => a ~/ -4; -divBy134217728(a) => a ~/ 134217728; -divByNeg134217728(a) => a ~/ -134217728; - -divBy4_(a) => a ~/ 4; -divByNeg4_(a) => a ~/ -4; -divBy549755813888(a) => a ~/ 549755813888; -divByNeg549755813888(a) => a ~/ -549755813888; - -main() { - for (int i = 0; i < 20; i++) { - for (var e in expectedResults) { - Function f = e[0]; - List values = e[1]; - for (var v in values) { - int arg = v[0]; - int res = v[1]; - Expect.equals(res, f(arg)); - } - } - } -} diff --git a/tests/language_2/operator/equality_test.dart b/tests/language_2/operator/equality_test.dart deleted file mode 100644 index ddab2c46f92..00000000000 --- a/tests/language_2/operator/equality_test.dart +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2012, 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. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - bool _result; - A(this._result); - operator ==(x) { - return _result; - } -} - -opaque(x) => [x, 1, 'y'][0]; // confuse the optimizers. - -class Death { - operator ==(x) { - throw 'Dead!'; - } -} - -death() => opaque(new Death()); -nullFn() => opaque(null); - -tests() { - var alwaysTrue = new A(true); - var alwaysFalse = new A(false); - Expect.isFalse(alwaysFalse == alwaysFalse); - Expect.isTrue(alwaysFalse != alwaysFalse); - Expect.isTrue(alwaysTrue == alwaysTrue); - Expect.isTrue(alwaysTrue == 5); - Expect.isFalse(alwaysTrue == null); - Expect.isFalse(null == alwaysTrue); - Expect.isTrue(alwaysTrue != null); - Expect.isTrue(null != alwaysTrue); - Expect.isTrue(null == null); - Expect.isFalse(null != null); - - Expect.throws(() => death() == 5); - Expect.isFalse(death() == nullFn()); - Expect.isFalse(nullFn() == death()); - Expect.isTrue(nullFn() == nullFn()); - Expect.isTrue(death() != nullFn()); - Expect.isTrue(nullFn() != death()); - Expect.isFalse(nullFn() != nullFn()); - - if (death() == nullFn()) { - throw "failed"; - } - if (death() != nullFn()) {} else { - throw "failed"; - } -} - -boolEqualityPositiveA(a) => a == true; -boolEqualityNegativeA(a) => a != true; - -boolEqualityPositiveB(a) => true == a; -boolEqualityNegativeB(a) => true != a; - -main() { - for (int i = 0; i < 20; i++) { - tests(); - // Do not inline calls to prevent constant folding. - Expect.isTrue(boolEqualityPositiveA(true)); - Expect.isFalse(boolEqualityPositiveA(false)); - Expect.isFalse(boolEqualityNegativeA(true)); - Expect.isTrue(boolEqualityNegativeA(false)); - - Expect.isTrue(boolEqualityPositiveB(true)); - Expect.isFalse(boolEqualityPositiveB(false)); - Expect.isFalse(boolEqualityNegativeB(true)); - Expect.isTrue(boolEqualityNegativeB(false)); - } - - // Deoptimize. - Expect.isFalse(boolEqualityPositiveA(1)); - Expect.isTrue(boolEqualityNegativeA("hi")); - Expect.isFalse(boolEqualityPositiveB(2.0)); - Expect.isTrue(boolEqualityNegativeB([])); -} diff --git a/tests/language_2/operator/equals_test.dart b/tests/language_2/operator/equals_test.dart deleted file mode 100644 index a6e496ee22c..00000000000 --- a/tests/language_2/operator/equals_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to infer [:super == null:] -// always returns an int. - -import 'package:expect/expect.dart'; - -class A { - operator ==(other) => 42; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'int' can't be assigned to a variable of type 'bool'. -} - -class B extends A { - foo() => (super == null) + 4; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '+' isn't defined for the class 'bool'. -} - -main() { - Expect.throwsNoSuchMethodError(() => new B().foo()); -} diff --git a/tests/language_2/operator/incr_op_test.dart b/tests/language_2/operator/incr_op_test.dart deleted file mode 100644 index c052b0fa43a..00000000000 --- a/tests/language_2/operator/incr_op_test.dart +++ /dev/null @@ -1,87 +0,0 @@ -// 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 test program for testing increment operator. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - static var yy; - static set y(v) { - yy = v; - } - - static get y { - return yy; - } -} - -class IncrOpTest { - var x; - static var y; - - IncrOpTest() {} - - static testMain() { - var a = 3; - var c = a++ + 1; - Expect.equals(4, c); - Expect.equals(4, a); - c = a-- + 1; - Expect.equals(5, c); - Expect.equals(3, a); - - c = --a + 1; - Expect.equals(3, c); - Expect.equals(2, a); - - c = 2 + ++a; - Expect.equals(5, c); - Expect.equals(3, a); - - var obj = new IncrOpTest(); - obj.x = 100; - Expect.equals(100, obj.x); - obj.x++; - Expect.equals(101, obj.x); - Expect.equals(102, ++obj.x); - Expect.equals(102, obj.x++); - Expect.equals(103, obj.x); - - A.y = 55; - Expect.equals(55, A.y++); - Expect.equals(56, A.y); - Expect.equals(57, ++A.y); - Expect.equals(57, A.y); - Expect.equals(56, --A.y); - - IncrOpTest.y = 55; - Expect.equals(55, IncrOpTest.y++); - Expect.equals(56, IncrOpTest.y); - Expect.equals(57, ++IncrOpTest.y); - Expect.equals(57, IncrOpTest.y); - Expect.equals(56, --IncrOpTest.y); - - var list = new List.filled(4, null); - for (int i = 0; i < list.length; i++) { - list[i] = i; - } - for (int i = 0; i < list.length; i++) { - list[i]++; - } - for (int i = 0; i < list.length; i++) { - Expect.equals(i + 1, list[i]); - ++list[i]; - } - Expect.equals(1 + 2, list[1]); - Expect.equals(1 + 2, list[1]--); - Expect.equals(1 + 1, list[1]); - Expect.equals(1 + 0, --list[1]); - } -} - -main() { - IncrOpTest.testMain(); -} diff --git a/tests/language_2/operator/index_evaluation_order_test.dart b/tests/language_2/operator/index_evaluation_order_test.dart deleted file mode 100644 index e66edf0084f..00000000000 --- a/tests/language_2/operator/index_evaluation_order_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class B { - int value; - List trace; - B(this.trace) : value = 100; - operator [](index) { - trace.add(-3); - trace.add(index); - trace.add(this.value); - this.value = this.value + 1; - return this; - } - - operator []=(index, value) { - trace.add(-5); - trace.add(index); - trace.add(value.value); - this.value = this.value + 1; - } - - operator +(int value) { - trace.add(-4); - trace.add(this.value); - trace.add(value); - this.value = this.value + 1; - return this; - } -} - -B getB(trace) { - trace.add(-1); - return new B(trace); -} - -int getIndex(trace) { - trace.add(-2); - return 42; -} - -main() { - List trace = []; - getB(trace)[getIndex(trace)] += 37; - - Expect.listEquals([-1, -2, -3, 42, 100, -4, 101, 37, -5, 42, 102], trace); -} diff --git a/tests/language_2/operator/index_test.dart b/tests/language_2/operator/index_test.dart deleted file mode 100644 index 27039c9e53b..00000000000 --- a/tests/language_2/operator/index_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// 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 test program for testing index operators. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Helper { - static int fibonacci(int n) { - int a = 0, b = 1, i = 0; - while (i++ < n) { - a = a + b; - b = a - b; - } - return a; - } -} - -class IndexTest { - static const ID_IDLE = 0; - - static testMain() { - var a = new List.filled(10, null); - Expect.equals(10, a.length); - for (int i = 0; i < a.length; i++) { - a[i] = Helper.fibonacci(i); - } - a[ID_IDLE] = Helper.fibonacci(0); - for (int i = 2; i < a.length; i++) { - Expect.equals(a[i - 2] + a[i - 1], a[i]); - } - Expect.equals(515, a[3] = 515); - } -} - -main() { - IndexTest.testMain(); -} diff --git a/tests/language_2/operator/integer_division_by_zero_test.dart b/tests/language_2/operator/integer_division_by_zero_test.dart deleted file mode 100644 index e1fc3438f5a..00000000000 --- a/tests/language_2/operator/integer_division_by_zero_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2013, 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. -// Test integer division by zero. -// Test that results before and after optimization are the same. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -num divBy(num a, num b) => a ~/ b; - -main() { - // Dividing integers by zero is an error. - Expect.throws(() => divBy(1, 0)); - Expect.throws(() => divBy(0, 0)); - - // Dividing doubles by zero is an error (result is never finite). - Expect.throws(() => divBy(1.0, 0)); - Expect.throws(() => divBy(1, 0.0)); - Expect.throws(() => divBy(1, -0.0)); - Expect.throws(() => divBy(1.0, 0.0)); - // Double division yielding infinity is an error, even when not dividing - // by zero. - Expect.throws(() => divBy(double.maxFinite, 0.5)); - Expect.throws(() => divBy(1, double.minPositive)); - Expect.throws(() => divBy(double.infinity, 2.0)); - Expect.throws(() => divBy(-double.maxFinite, 0.5)); - Expect.throws(() => divBy(-1, double.minPositive)); - Expect.throws(() => divBy(-double.infinity, 2.0)); - // Double division yielding NaN is an error. - Expect.throws(() => divBy(0.0, 0.0)); - Expect.throws(() => divBy(double.infinity, double.infinity)); - Expect.throws(() => divBy(-0.0, 0.0)); - Expect.throws(() => divBy(-double.infinity, double.infinity)); - - // Truncating division containing a double truncates to max integer - // on non-web. - num one = 1; - if (one is! double) { - var minInt = -0x8000000000000000; - var maxInt = minInt - 1; - Expect.isTrue(maxInt > 0); - // Not on web. - Expect.equals(divBy(double.maxFinite, 2), maxInt); - Expect.equals(divBy(-double.maxFinite, 2), minInt); - Expect.equals(divBy(maxInt, 0.25), maxInt); - Expect.equals(divBy(minInt, 0.25), minInt); - } -} diff --git a/tests/language_2/operator/invalid_assignment_to_postfix_increment_runtime_test.dart b/tests/language_2/operator/invalid_assignment_to_postfix_increment_runtime_test.dart deleted file mode 100644 index eff83d4a9d7..00000000000 --- a/tests/language_2/operator/invalid_assignment_to_postfix_increment_runtime_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -void f(int x, int y) { - - - -} - -main() { - f(1, 2); -} diff --git a/tests/language_2/operator/invalid_assignment_to_postfix_increment_test.dart b/tests/language_2/operator/invalid_assignment_to_postfix_increment_test.dart deleted file mode 100644 index 62d8eb06fa5..00000000000 --- a/tests/language_2/operator/invalid_assignment_to_postfix_increment_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2018, 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 - -void f(int x, int y) { - x++ = y; -//^^^ -// [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE -//^^^ -// [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR -// ^ -// [cfe] Illegal assignment to non-assignable expression. - x++ += y; -//^^^ -// [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE -//^^^ -// [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR -// ^ -// [cfe] Illegal assignment to non-assignable expression. - x++ ??= y; -//^^^ -// [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE -//^^^ -// [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR -// ^ -// [cfe] Illegal assignment to non-assignable expression. -} - -main() { - f(1, 2); -} diff --git a/tests/language_2/operator/invalid_operators_test.dart b/tests/language_2/operator/invalid_operators_test.dart deleted file mode 100644 index fdea2eed450..00000000000 --- a/tests/language_2/operator/invalid_operators_test.dart +++ /dev/null @@ -1,602 +0,0 @@ -// 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. - -// @dart = 2.9 - -class Operators1 { - operator ==() => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE - // [cfe] Operator '==' should have exactly one parameter. - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] The method 'Operators1.==' has fewer positional arguments than those of overridden method 'Object.=='. - operator <() => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '<' should have exactly one parameter. - operator >() => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '>' should have exactly one parameter. - operator <=() => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '<=' should have exactly one parameter. - operator >=() => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '>=' should have exactly one parameter. - operator +() => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '+' should have exactly one parameter. - operator /() => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '/' should have exactly one parameter. - operator ~/() => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '~/' should have exactly one parameter. - operator *() => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '*' should have exactly one parameter. - operator %() => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '%' should have exactly one parameter. - operator |() => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '|' should have exactly one parameter. - operator ^() => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '^' should have exactly one parameter. - operator &() => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '&' should have exactly one parameter. - operator <<() => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '<<' should have exactly one parameter. - operator >>() => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '>>' should have exactly one parameter. - operator []=(a, b, c) => true; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '[]=' should have exactly two parameters. - operator []() => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '[]' should have exactly one parameter. - operator ~(a) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '~' shouldn't have any parameters. -} - -class Operators2 { - operator ==(a, b) => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE - // [cfe] Operator '==' should have exactly one parameter. - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] The method 'Operators2.==' has more required arguments than those of overridden method 'Object.=='. - operator <(a, b) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '<' should have exactly one parameter. - operator >(a, b) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '>' should have exactly one parameter. - operator <=(a, b) => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '<=' should have exactly one parameter. - operator >=(a, b) => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '>=' should have exactly one parameter. - operator -(a, b) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '-' should have zero or one parameter. - operator +(a, b) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '+' should have exactly one parameter. - operator /(a, b) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '/' should have exactly one parameter. - operator ~/(a, b) => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '~/' should have exactly one parameter. - operator *(a, b) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '*' should have exactly one parameter. - operator %(a, b) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '%' should have exactly one parameter. - operator |(a, b) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '|' should have exactly one parameter. - operator ^(a, b) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '^' should have exactly one parameter. - operator &(a, b) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '&' should have exactly one parameter. - operator <<(a, b) => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '<<' should have exactly one parameter. - operator >>(a, b) => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '>>' should have exactly one parameter. - operator []=(a, b, c) => true; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '[]=' should have exactly two parameters. - operator [](a, b) => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '[]' should have exactly one parameter. - operator ~(a, b) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '~' shouldn't have any parameters. -} - -class Operators3 { - operator ==([a]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator <([a]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator >([a]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator <=([a]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator >=([a]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator -([a]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator +([a]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator /([a]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator ~/([a]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator *([a]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator %([a]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator |([a]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator ^([a]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator &([a]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator <<([a]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator >>([a]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator []=([a, b]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator []([a]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator ~([a]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '~' shouldn't have any parameters. -} - -class Operators4 { - operator ==({a}) => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE - // [cfe] The method 'Operators4.==' has fewer positional arguments than those of overridden method 'Object.=='. - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator <({a}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator >({a}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator <=({a}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator >=({a}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator -({a}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator +({a}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator /({a}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator ~/({a}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator *({a}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator %({a}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator |({a}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator ^({a}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator &({a}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator <<({a}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator >>({a}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator []=({a, b}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator []({a}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.OPTIONAL_PARAMETER_IN_OPERATOR - // [cfe] An operator can't have optional parameters. - operator ~({a}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '~' shouldn't have any parameters. -} - -class Operators5 { - operator ==(a, [b]) => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '==' should have exactly one parameter. - operator <(a, [b]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '<' should have exactly one parameter. - operator >(a, [b]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '>' should have exactly one parameter. - operator <=(a, [b]) => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '<=' should have exactly one parameter. - operator >=(a, [b]) => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '>=' should have exactly one parameter. - operator -(a, [b]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '-' should have zero or one parameter. - operator +(a, [b]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '+' should have exactly one parameter. - operator /(a, [b]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '/' should have exactly one parameter. - operator ~/(a, [b]) => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '~/' should have exactly one parameter. - operator *(a, [b]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '*' should have exactly one parameter. - operator %(a, [b]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '%' should have exactly one parameter. - operator |(a, [b]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '|' should have exactly one parameter. - operator ^(a, [b]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '^' should have exactly one parameter. - operator &(a, [b]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '&' should have exactly one parameter. - operator <<(a, [b]) => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '<<' should have exactly one parameter. - operator >>(a, [b]) => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '>>' should have exactly one parameter. - operator []=(a, b, [c]) => true; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '[]=' should have exactly two parameters. - operator [](a, [b]) => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '[]' should have exactly one parameter. - operator ~(a, [b]) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '~' shouldn't have any parameters. -} - -class Operators6 { - operator ==(a, {b}) => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '==' should have exactly one parameter. - operator <(a, {b}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '<' should have exactly one parameter. - operator >(a, {b}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '>' should have exactly one parameter. - operator <=(a, {b}) => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '<=' should have exactly one parameter. - operator >=(a, {b}) => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '>=' should have exactly one parameter. - operator -(a, {b}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '-' should have zero or one parameter. - operator +(a, {b}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '+' should have exactly one parameter. - operator /(a, {b}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '/' should have exactly one parameter. - operator ~/(a, {b}) => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '~/' should have exactly one parameter. - operator *(a, {b}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '*' should have exactly one parameter. - operator %(a, {b}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '%' should have exactly one parameter. - operator |(a, {b}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '|' should have exactly one parameter. - operator ^(a, {b}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '^' should have exactly one parameter. - operator &(a, {b}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '&' should have exactly one parameter. - operator <<(a, {b}) => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '<<' should have exactly one parameter. - operator >>(a, {b}) => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '>>' should have exactly one parameter. - operator []=(a, b, {c}) => true; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '[]=' should have exactly two parameters. - operator [](a, {b}) => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '[]' should have exactly one parameter. - operator ~(a, {b}) => true; - // ^ - // [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR - // [cfe] Operator '~' shouldn't have any parameters. -} - -class Operators7 { - operator ==(a) => true; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE - // [cfe] Can't infer types for '==' as the overridden members don't have a combined signature. - // ^ - // [cfe] Declared type variables of 'Operators7.==' doesn't match those on overridden method 'Object.=='. - // ^^^ - // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR - // ^ - // [cfe] Types parameters aren't allowed when defining an operator. - operator >(a) => true; - // ^^^ - // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR - // ^ - // [cfe] Types parameters aren't allowed when defining an operator. - operator <=(a) => true; - // ^^^ - // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR - // ^ - // [cfe] Types parameters aren't allowed when defining an operator. - operator >=(a) => true; - // ^^^ - // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR - // ^ - // [cfe] Types parameters aren't allowed when defining an operator. - operator -() => true; - // ^^^ - // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR - // ^ - // [cfe] Types parameters aren't allowed when defining an operator. - operator -(a) => true; - // ^^^ - // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR - // ^ - // [cfe] Types parameters aren't allowed when defining an operator. - operator +(a) => true; - // ^^^ - // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR - // ^ - // [cfe] Types parameters aren't allowed when defining an operator. - operator /(a) => true; - // ^^^ - // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR - // ^ - // [cfe] Types parameters aren't allowed when defining an operator. - operator ~/(a) => true; - // ^^^ - // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR - // ^ - // [cfe] Types parameters aren't allowed when defining an operator. - operator *(a) => true; - // ^^^ - // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR - // ^ - // [cfe] Types parameters aren't allowed when defining an operator. - operator %(a) => true; - // ^^^ - // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR - // ^ - // [cfe] Types parameters aren't allowed when defining an operator. - operator |(a) => true; - // ^^^ - // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR - // ^ - // [cfe] Types parameters aren't allowed when defining an operator. - operator ^(a) => true; - // ^^^ - // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR - // ^ - // [cfe] Types parameters aren't allowed when defining an operator. - operator &(a) => true; - // ^^^ - // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR - // ^ - // [cfe] Types parameters aren't allowed when defining an operator. - operator <<(a) => true; - // ^^^ - // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR - // ^ - // [cfe] Types parameters aren't allowed when defining an operator. - operator >>(a) => true; - // ^^^ - // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR - // ^ - // [cfe] Types parameters aren't allowed when defining an operator. - operator []=(a, b) => true; - // ^^^ - // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR - // ^ - // [cfe] Types parameters aren't allowed when defining an operator. - operator [](a) => true; - // ^^^ - // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR - // ^ - // [cfe] Types parameters aren't allowed when defining an operator. - operator ~() => true; - // ^^^^^^ - // [analyzer] SYNTACTIC_ERROR.TYPE_PARAMETER_ON_OPERATOR - // ^ - // [cfe] Types parameters aren't allowed when defining an operator. -} - -class Operators8 { - /*space*/ int operator []=(a, b) {} - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_OPERATOR - // [cfe] The return type of the operator []= must be 'void'. -} - -main() {} diff --git a/tests/language_2/operator/left_shift_test.dart b/tests/language_2/operator/left_shift_test.dart deleted file mode 100644 index 303747a776f..00000000000 --- a/tests/language_2/operator/left_shift_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - for (int i = 0; i < 80; i++) { - var a = -1 << i; - var b = -1; - Expect.equals(1 << i, a ~/ b); - } -} diff --git a/tests/language_2/operator/literal_unary_plus_test.dart b/tests/language_2/operator/literal_unary_plus_test.dart deleted file mode 100644 index 0ce8094db02..00000000000 --- a/tests/language_2/operator/literal_unary_plus_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2012, 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 - -// There is no unary plus operator in Dart. - -main() { - var a = + 1; // //# 01: syntax error - var x = +"foo"; // //# 02: syntax error - var x = + "foo"; // //# 03: syntax error -} diff --git a/tests/language_2/operator/logical_expression2_test.dart b/tests/language_2/operator/logical_expression2_test.dart deleted file mode 100644 index d1f25cd0db7..00000000000 --- a/tests/language_2/operator/logical_expression2_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -// Regression test for issue 17149. - -int globalCounter = 0; - -void nonInlinedUse(Object object) { - if (new DateTime.now().millisecondsSinceEpoch == 42) nonInlinedUse(object); - if (object is! String) globalCounter++; -} - -int confuse(x) { - if (new DateTime.now().millisecondsSinceEpoch == 42) return confuse(x - 1); - return x; -} - -main() { - var o = ["foo", 499][confuse(1)]; - - // The `o is String` check in the rhs of the logical or must not be - // propagated to the `if` body. - if ((o is num) || (o is String && true)) { - nonInlinedUse(o); - } - Expect.equals(1, globalCounter); -} diff --git a/tests/language_2/operator/logical_expression3_test.dart b/tests/language_2/operator/logical_expression3_test.dart deleted file mode 100644 index 04512ca1761..00000000000 --- a/tests/language_2/operator/logical_expression3_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -bool nonInlinedNumTypeCheck(Object object) { - if (new DateTime.now().millisecondsSinceEpoch == 42) { - return nonInlinedNumTypeCheck(object); - } - return object is num; -} - -int confuse(x) { - if (new DateTime.now().millisecondsSinceEpoch == 42) return confuse(x - 1); - return x; -} - -main() { - var o = ["foo", 499][confuse(0)]; - - // When the lhs of a logical or fails, it must not assume that all negative is - // checks in it, have failed. - // Here, the `o is! num` check succeeds, but the length test failed. - if ((o is! num && o.length == 4) || (nonInlinedNumTypeCheck(o))) { - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'length' isn't defined for the class 'Object'. - Expect.fail("Type-check failed"); - } -} diff --git a/tests/language_2/operator/logical_expression4_test.dart b/tests/language_2/operator/logical_expression4_test.dart deleted file mode 100644 index 5009722be40..00000000000 --- a/tests/language_2/operator/logical_expression4_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -bool nonInlinedNumTypeCheck(Object object) { - if (new DateTime.now().millisecondsSinceEpoch == 42) { - return nonInlinedNumTypeCheck(object); - } - return object is num; -} - -int confuse(x) { - if (new DateTime.now().millisecondsSinceEpoch == 42) return confuse(x - 1); - return x; -} - -main() { - var o = ["foo", 499][confuse(0)]; - - // The is-checks in the '!' must not be propagated to the if-body. - // This was a bug in dart2js. - if (!(o is num && o is num)) { - Expect.isFalse((nonInlinedNumTypeCheck(o))); - } -} diff --git a/tests/language_2/operator/logical_expression5_test.dart b/tests/language_2/operator/logical_expression5_test.dart deleted file mode 100644 index a3ab83b9bb5..00000000000 --- a/tests/language_2/operator/logical_expression5_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'package:expect/expect.dart'; - -bool nonInlinedNumTypeCheck(Object object) { - if (new DateTime.now().millisecondsSinceEpoch == 42) { - return nonInlinedNumTypeCheck(object); - } - return object is num; -} - -bool nonInlinedStringTypeCheck(Object object) { - if (new DateTime.now().millisecondsSinceEpoch == 42) { - return nonInlinedStringTypeCheck(object); - } - return object is String; -} - -int confuse(x) { - if (new DateTime.now().millisecondsSinceEpoch == 42) return confuse(x - 1); - return x; -} - -main() { - var o = ["foo", 499][confuse(0)]; - - // The is-checks in the '!' must not be propagated to the if-body, but - // the second is-check should. - if (!(o is num) && o is String) { - Expect.isFalse((nonInlinedNumTypeCheck(o))); - Expect.isTrue((nonInlinedStringTypeCheck(o))); - } -} diff --git a/tests/language_2/operator/logical_expression_test.dart b/tests/language_2/operator/logical_expression_test.dart deleted file mode 100644 index 0eceb92ba2c..00000000000 --- a/tests/language_2/operator/logical_expression_test.dart +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) 2014, 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 test program for testing if statement. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// For logical-or conditions dart2js sometimes inlined expressions, leading to -// completely broken programs. - -int globalCounter = 0; - -falseWithSideEffect() { - bool confuse() => new DateTime.now().millisecondsSinceEpoch == 42; - - var result = confuse(); - - // Make it harder to inline. - if (result) { - try { - try { - if (confuse()) falseWithSideEffect(); - if (confuse()) return 499; - } catch (e) { - rethrow; - } - } catch (e) { - rethrow; - } - } - globalCounter++; - return result; -} - -falseWithoutSideEffect() { - bool confuse() => new DateTime.now().millisecondsSinceEpoch == 42; - - var result = confuse(); - - // Make it harder to inline. - if (result) { - try { - try { - if (confuse()) falseWithSideEffect(); - if (confuse()) return 499; - } catch (e) { - rethrow; - } - } catch (e) { - rethrow; - } - } - return result; -} - -testLogicalOr() { - globalCounter = 0; - bool cond1 = falseWithSideEffect(); - if (cond1 || falseWithoutSideEffect()) Expect.fail("must be false"); - if (cond1 || falseWithoutSideEffect()) Expect.fail("must be false"); - if (cond1 || falseWithoutSideEffect()) Expect.fail("must be false"); - Expect.equals(1, globalCounter); - - cond1 = (falseWithSideEffect() == 499); - if (cond1 || falseWithoutSideEffect()) Expect.fail("must be false"); - if (cond1 || falseWithoutSideEffect()) Expect.fail("must be false"); - if (cond1 || falseWithoutSideEffect()) Expect.fail("must be false"); - Expect.equals(2, globalCounter); -} - -List globalList = []; -void testLogicalOr2() { - globalList.clear(); - testValueOr([]); - testValueOr(null); - Expect.listEquals([1, 2, 3], globalList); -} - -void testValueOr(List list) { - if (list == null) globalList.add(1); - if (list == null || list.contains("2")) globalList.add(2); - if (list == null || list.contains("3")) globalList.add(3); -} - -testLogicalAnd() { - globalCounter = 0; - bool cond1 = falseWithSideEffect(); - if (cond1 && falseWithoutSideEffect()) Expect.fail("must be false"); - if (cond1 && falseWithoutSideEffect()) Expect.fail("must be false"); - if (cond1 && falseWithoutSideEffect()) Expect.fail("must be false"); - Expect.equals(1, globalCounter); - - cond1 = (falseWithSideEffect() == 499); - if (cond1 && falseWithoutSideEffect()) Expect.fail("must be false"); - if (cond1 && falseWithoutSideEffect()) Expect.fail("must be false"); - if (cond1 && falseWithoutSideEffect()) Expect.fail("must be false"); - Expect.equals(2, globalCounter); -} - -void testLogicalAnd2() { - globalList.clear(); - testValueAnd([]); - testValueAnd(null); - Expect.listEquals([1, 2, 3], globalList); -} - -void testValueAnd(List list) { - if (list == null) globalList.add(1); - if (list == null && globalList.contains(1)) globalList.add(2); - if (list == null && globalList.contains(1)) globalList.add(3); -} - -main() { - testLogicalOr(); - testLogicalOr2(); - - testLogicalAnd(); - testLogicalAnd2(); -} diff --git a/tests/language_2/operator/mint_arithmetic_test.dart b/tests/language_2/operator/mint_arithmetic_test.dart deleted file mode 100644 index 424f1394397..00000000000 --- a/tests/language_2/operator/mint_arithmetic_test.dart +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2012, 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. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test arithmetic on 64-bit integers. - -test_and_1() { - try { - // Avoid optimizing this function. - f(a, b) { - var s = b; - var t = a & s; - return t == b; - } - - var x = 0xffffffff; - for (var i = 0; i < 20; i++) f(x, 0); - Expect.equals(true, f(x, 0)); - Expect.equals(false, f(x, -1)); // Triggers deoptimization. - } finally {} -} - -test_and_2() { - try { - // Avoid optimizing this function. - f(a, b) { - return a & b; - } - - var x = 0xffffffff; - for (var i = 0; i < 20; i++) f(x, x); - Expect.equals(x, f(x, x)); - Expect.equals(1234, f(0xffffffff, 1234)); - Expect.equals(0x100000001, f(0x100000001, -1)); - Expect.equals(-0x40000000, f(-0x40000000, -1)); - Expect.equals(0x40000000, f(0x40000000, -1)); - Expect.equals(0x3fffffff, f(0x3fffffff, -1)); - } finally {} -} - -test_xor_1() { - try { - // Avoid optimizing this function. - f(a, b) { - var s = b; - var t = a ^ s; - return t; - } - - var x = 0xffffffff; - for (var i = 0; i < 20; i++) f(x, x); - Expect.equals(0, f(x, x)); - Expect.equals(-x - 1, f(x, -1)); - var y = 0xffffffffffffffff; - Expect.equals(-y - 1, f(y, -1)); // Triggers deoptimization. - } finally {} -} - -test_or_1() { - try { - // Avoid optimizing this function. - f(a, b) { - var s = b; - var t = a | s; - return t; - } - - var x = 0xffffffff; - for (var i = 0; i < 20; i++) f(x, x); - Expect.equals(x, f(x, x)); - Expect.equals(-1, f(x, -1)); - var y = 0xffffffffffffffff; - Expect.equals(-1, f(y, -1)); // Triggers deoptimization. - } finally {} -} - -test_func(x, y) => (x & y) + 1.0; - -test_mint_double_op() { - for (var i = 0; i < 20; i++) test_func(4294967295, 1); - Expect.equals(2.0, test_func(4294967295, 1)); -} - -main() { - for (var i = 0; i < 5; i++) { - test_and_1(); - test_and_2(); - test_xor_1(); - test_or_1(); - test_mint_double_op(); - } -} diff --git a/tests/language_2/operator/modulo_test.dart b/tests/language_2/operator/modulo_test.dart deleted file mode 100644 index 417c55673fc..00000000000 --- a/tests/language_2/operator/modulo_test.dart +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2013, 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 test optimization of modulo operator on Smi. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - // Prime IC cache. - noDom(1); - noDom(-1); - for (int i = -30; i < 30; i++) { - Expect.equals(i % 256, foo(i)); - Expect.equals(i % -256, boo(i)); - Expect.throws(() => hoo(i), (e) => e is UnsupportedError); - - Expect.equals(i ~/ 254 + i % 254, fooTwo(i)); - Expect.equals(i ~/ -254 + i % -254, booTwo(i)); - Expect.throws(() => hooTwo(i), (e) => e is UnsupportedError); - if (i > 0) { - Expect.equals(i % 10, noDom(i)); - } else { - Expect.equals(i ~/ 10, noDom(i)); - } - Expect.equals((i ~/ 10) + (i % 10) + (i % 10), threeOp(i)); - Expect.equals((i ~/ 10) + (i ~/ 12) + (i % 10) + (i % 12), fourOp(i)); - - // Zero test is done outside the loop. - if (i < 0) { - Expect.equals(i % -i, foo2(i)); - Expect.equals(i ~/ -i + i % -i, fooTwo2(i)); - } else if (i > 0) { - Expect.equals(i % i, foo2(i)); - Expect.equals(i ~/ i + i % i, fooTwo2(i)); - } - } - Expect.throws(() => foo2(0), (e) => e is UnsupportedError); - Expect.throws(() => fooTwo2(0), (e) => e is UnsupportedError); -} - -foo(i) => i % 256; // This will get optimized to AND instruction. -boo(i) => i % -256; -hoo(i) => i % 0; - -fooTwo(i) => i ~/ 254 + i % 254; -booTwo(i) => i ~/ -254 + i % -254; -hooTwo(i) => i ~/ 0 + i % 0; - -noDom(a) { - var x; - if (a > 0) { - x = a % 10; - } else { - x = a ~/ 10; - } - return x; -} - -threeOp(a) { - var x = a ~/ 10; - var y = a % 10; - var z = a % 10; - return x + y + z; -} - -fourOp(a) { - var x0 = a ~/ 10; - var x1 = a ~/ 12; - var y0 = a % 10; - var y1 = a % 12; - return x0 + x1 + y0 + y1; -} - -foo2(i) { - // Make sure x has a range computed. - var x = 0; - if (i < 0) { - x = -i; - } else { - x = i; - } - return i % x; -} - -fooTwo2(i) { - // Make sure x has a range computed. - var x = 0; - if (i < 0) { - x = -i; - } else { - x = i; - } - return i ~/ x + i % x; -} diff --git a/tests/language_2/operator/mul_recipr_test.dart b/tests/language_2/operator/mul_recipr_test.dart deleted file mode 100644 index 516797cc0de..00000000000 --- a/tests/language_2/operator/mul_recipr_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2015, 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 test program checking that optimizations are not too aggressive and -// incorrect: -// - (a * (1.0 / b)) -// -// VMOptions=--optimization-counter-threshold=8 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -var xx = 23.0; - -main() { - xx = 1e-6; - scaleIt(1e-310); - Expect.isTrue(xx.isInfinite); - for (int i = 0; i < 10; i++) { - xx = 24.0; - scaleIt(6.0); - Expect.equals(4.0, xx); - } - xx = 1e-6; - scaleIt(1e-310); - Expect.isTrue(xx.isInfinite); -} - -scaleIt(double b) { - scale(1.0 / b); -} - -scale(a) { - xx *= a; -} diff --git a/tests/language_2/operator/multi_assign_test.dart b/tests/language_2/operator/multi_assign_test.dart deleted file mode 100644 index d3eee4a4fe4..00000000000 --- a/tests/language_2/operator/multi_assign_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// 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 test program testing multiple assignment. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class MultiAssignTest { - static testMain() { - var i, j, k; - i = j = k = 11; - Expect.equals(11, i); - Expect.equals(11, j); - Expect.equals(11, k); - - var m; - var n = m = k = 55; - Expect.equals(55, m); - Expect.equals(55, n); - Expect.equals(55, k); - } -} - -main() { - MultiAssignTest.testMain(); -} diff --git a/tests/language_2/operator/negate_and_method_negate_test.dart b/tests/language_2/operator/negate_and_method_negate_test.dart deleted file mode 100644 index 2248dc35276..00000000000 --- a/tests/language_2/operator/negate_and_method_negate_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// This checks that it is possible to have a method named negate as -// well as unary- operator. - -class Foo { - operator -() => 42; - negate() => 87; -} - -main() { - Expect.equals(42, -new Foo()); - Expect.equals(87, new Foo().negate()); -} diff --git a/tests/language_2/operator/operations_on_non_num_operand_test.dart b/tests/language_2/operator/operations_on_non_num_operand_test.dart deleted file mode 100644 index 4b90d419e4b..00000000000 --- a/tests/language_2/operator/operations_on_non_num_operand_test.dart +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) 2015, 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 - -/// Regression test for dart2js that used to miscompile boolean and operations -/// if one of the operands was an int and the other was not (issue 22427). -/// -/// Extended to all operations as there is a risk of similar bugs with other -/// operators, e.g. `a % 2` _looks_ like it might be 0 or 1. - -import "package:expect/expect.dart"; - -@pragma('dart2js:assumeDynamic') -@pragma('dart2js:noInline') -confuse(x) => x; - -class Thing1 { - operator &(b) => this; - operator |(b) => this; - operator ^(b) => this; - operator <<(b) => this; - operator >>(b) => this; - - operator +(b) => this; - operator -(b) => this; - operator *(b) => this; - operator /(b) => this; - operator ~/(b) => this; - operator %(b) => this; - remainder(b) => this; - - operator <(b) => this; - operator <=(b) => this; - operator >(b) => this; - operator >=(b) => this; -} - -class Thing2 { - @pragma('dart2js:noInline') - operator &(b) => this; - @pragma('dart2js:noInline') - operator |(b) => this; - @pragma('dart2js:noInline') - operator ^(b) => this; - @pragma('dart2js:noInline') - operator <<(b) => this; - @pragma('dart2js:noInline') - operator >>(b) => this; - - @pragma('dart2js:noInline') - operator +(b) => this; - @pragma('dart2js:noInline') - operator -(b) => this; - @pragma('dart2js:noInline') - operator *(b) => this; - @pragma('dart2js:noInline') - operator /(b) => this; - @pragma('dart2js:noInline') - operator ~/(b) => this; - @pragma('dart2js:noInline') - operator %(b) => this; - @pragma('dart2js:noInline') - remainder(b) => this; - - @pragma('dart2js:noInline') - operator <(b) => this; - @pragma('dart2js:noInline') - operator <=(b) => this; - @pragma('dart2js:noInline') - operator >(b) => this; - @pragma('dart2js:noInline') - operator >=(b) => this; -} - -confused() { - var a = new Thing1(); - Expect.equals(a, confuse(a) & 5 & 2); - Expect.equals(a, confuse(a) | 5 | 2); - Expect.equals(a, confuse(a) ^ 5 ^ 2); - Expect.equals(a, confuse(a) << 5 << 2); - Expect.equals(a, confuse(a) >> 5 >> 2); - - Expect.equals(a, confuse(a) + 5 + 2); - Expect.equals(a, confuse(a) - 5 - 2); - Expect.equals(a, confuse(a) * 5 * 2); - Expect.equals(a, confuse(a) / 5 / 2); - Expect.equals(a, confuse(a) % 5 % 2); - Expect.equals(a, confuse(a) ~/ 5 ~/ 2); - Expect.equals(a, confuse(a).remainder(5).remainder(2)); - - Expect.equals(a, (confuse(a) < 5) < 2); - Expect.equals(a, (confuse(a) <= 5) <= 2); - Expect.equals(a, (confuse(a) > 5) > 2); - Expect.equals(a, (confuse(a) >= 5) >= 2); -} - -direct1() { - var a = new Thing1(); - Expect.equals(a, a & 5 & 2); - Expect.equals(a, a | 5 | 2); - Expect.equals(a, a ^ 5 ^ 2); - Expect.equals(a, a << 5 << 2); - Expect.equals(a, a >> 5 >> 2); - - Expect.equals(a, a + 5 + 2); - Expect.equals(a, a - 5 - 2); - Expect.equals(a, a * 5 * 2); - Expect.equals(a, a / 5 / 2); - Expect.equals(a, a % 5 % 2); - Expect.equals(a, a ~/ 5 ~/ 2); - Expect.equals(a, a.remainder(5).remainder(2)); - - Expect.equals(a, (a < 5) < 2); - Expect.equals(a, (a <= 5) <= 2); - Expect.equals(a, (a > 5) > 2); - Expect.equals(a, (a >= 5) >= 2); -} - -direct2() { - var a = new Thing2(); - Expect.equals(a, a & 5 & 2); - Expect.equals(a, a | 5 | 2); - Expect.equals(a, a ^ 5 ^ 2); - Expect.equals(a, a << 5 << 2); - Expect.equals(a, a >> 5 >> 2); - - Expect.equals(a, a + 5 + 2); - Expect.equals(a, a - 5 - 2); - Expect.equals(a, a * 5 * 2); - Expect.equals(a, a / 5 / 2); - Expect.equals(a, a % 5 % 2); - Expect.equals(a, a ~/ 5 ~/ 2); - Expect.equals(a, a.remainder(5).remainder(2)); - - Expect.equals(a, (a < 5) < 2); - Expect.equals(a, (a <= 5) <= 2); - Expect.equals(a, (a > 5) > 2); - Expect.equals(a, (a >= 5) >= 2); -} - -main() { - confused(); - direct1(); - direct2(); -} diff --git a/tests/language_2/operator/operator1_test.dart b/tests/language_2/operator/operator1_test.dart deleted file mode 100644 index d25f9340138..00000000000 --- a/tests/language_2/operator/operator1_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Operator functions cannot be static. - -class C { - static operator +(int index) { -//^^^^^^ -// [analyzer] SYNTACTIC_ERROR.STATIC_OPERATOR -// [cfe] Operators can't be static. - return index; - } -} - -main() { - C(); -} diff --git a/tests/language_2/operator/operator2_test.dart b/tests/language_2/operator/operator2_test.dart deleted file mode 100644 index 8b0dcb5b707..00000000000 --- a/tests/language_2/operator/operator2_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// 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. -// Operator dart test program. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Helper { - int i; - Helper(int val) : i = val {} - operator [](int index) { - return i + index; - } - - void operator []=(int index, int val) { - i = val; - } -} - -main() { - Helper obj = new Helper(10); - Expect.equals(10, obj.i); - obj[10] = 20; - Expect.equals(30, obj[10]); - - regress32754(); -} - -// Regression test for https://github.com/dart-lang/sdk/issues/32754 -class C { - operator []=(i, value) { - value = 'OOPS'; - } -} - -class C2 { - int data; - operator []=(i, value) { - // The return expression must be evaluated, then ignored. - return () { - data = i + value; - return null; - }(); - } -} - -regress32754() { - var c = new C(); - Expect.equals('ok', c[0] = 'ok'); - - var c2 = new C2(); - Expect.equals(23, c2[100] = 23); - Expect.equals(123, c2.data); -} diff --git a/tests/language_2/operator/operator3_test.dart b/tests/language_2/operator/operator3_test.dart deleted file mode 100644 index 19eb77b2b0a..00000000000 --- a/tests/language_2/operator/operator3_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class A { - operator -() => this; - toString() => "5"; - abs() => "correct"; -} - -// This triggered a bug in Dart2Js: the speculative type optimization assigned -// type "number" to 'a' and then to '-a'. In the bailout version the type for -// 'a' was removed, but the type for '-a' was kept. -foo(a) => -(-a); - -main() { - Expect.equals("correct", foo(new A()).abs()); -} diff --git a/tests/language_2/operator/operator4_test.dart b/tests/language_2/operator/operator4_test.dart deleted file mode 100644 index 9cbe5235e67..00000000000 --- a/tests/language_2/operator/operator4_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class A { - operator <(other) => 1; -} - -// This triggered a bug in Dart2Js: relational operators were not correctly -// boolified. -foo(a) { - try { - if (a < a) { - return "bad"; - } else { - return 499; - } - } on TypeError catch (e) { - return 499; - } -} - -main() { - Expect.equals(499, foo(new A())); -} diff --git a/tests/language_2/operator/operator5_test.dart b/tests/language_2/operator/operator5_test.dart deleted file mode 100644 index cbcbd38d73b..00000000000 --- a/tests/language_2/operator/operator5_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - operator ==(other) => 1; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'int' can't be assigned to a variable of type 'bool'. - operator <(other) => null; - operator <=(other) => 499; - operator >(other) => "foo"; - operator >=(other) => 42; -} - -// This triggered a bug in Dart2Js: equality operator was always boolified. -equals(a) { - Expect.equals(1, a == a); -} - -less(a) { - Expect.equals(null, a < a); -} - -lessEqual(a) { - Expect.equals(499, a <= a); -} - -greater(a) { - Expect.equals("foo", a > a); -} - -greaterEqual(a) { - Expect.equals(42, a >= a); -} - -main() { - var a = new A(); - equals(a); - less(a); - lessEqual(a); - greater(a); - greaterEqual(a); -} diff --git a/tests/language_2/operator/operator6_test.dart b/tests/language_2/operator/operator6_test.dart deleted file mode 100644 index 53b570dc546..00000000000 --- a/tests/language_2/operator/operator6_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class OperatorTest { - static int i1, i2; - - OperatorTest() {} - - static testMain() { - var op1 = new Operator(1); - var op2 = new Operator(2); - Expect.equals(~1, ~op1); - } -} - -class Operator { - int value; - - Operator(int i) { - value = i; - } - - operator ~() { - return ~value; - } -} - -main() { - OperatorTest.testMain(); -} diff --git a/tests/language_2/operator/operator7_test.dart b/tests/language_2/operator/operator7_test.dart deleted file mode 100644 index 2d6ab19adba..00000000000 --- a/tests/language_2/operator/operator7_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// No "===" operator. - -class C { - operator ===(int index) { - // ^ - // [analyzer] SYNTACTIC_ERROR.UNSUPPORTED_OPERATOR - // [cfe] The '===' operator is not supported. - return index; - } -} - -main() { - C(); -} diff --git a/tests/language_2/operator/operator_test.dart b/tests/language_2/operator/operator_test.dart deleted file mode 100644 index 9763a582b7f..00000000000 --- a/tests/language_2/operator/operator_test.dart +++ /dev/null @@ -1,141 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class OperatorTest { - static int i1, i2; - - OperatorTest() {} - - static testMain() { - var op1 = new Operator(1); - var op2 = new Operator(2); - Expect.equals(3, op1 + op2); - Expect.equals(-1, op1 - op2); - Expect.equals(0.5, op1 / op2); - Expect.equals(0, op1 ~/ op2); - Expect.equals(2, op1 * op2); - Expect.equals(1, op1 % op2); - Expect.equals(true, !(op1 == op2)); - Expect.equals(true, op1 < op2); - Expect.equals(true, !(op1 > op2)); - Expect.equals(true, op1 <= op2); - Expect.equals(true, !(op1 >= op2)); - Expect.equals(3, (op1 | op2)); - Expect.equals(3, (op1 ^ op2)); - Expect.equals(0, (op1 & op2)); - Expect.equals(4, (op1 << op2)); - Expect.equals(0, (op1 >> op2)); - Expect.equals(-1, -op1); - - op1.value += op2.value; - Expect.equals(3, op1.value); - - op2.value += (op2.value += op2.value); - Expect.equals(6, op2.value); - - op2.value -= (op2.value -= op2.value); - Expect.equals(6, op2.value); - - op1.value = op2.value = 42; - Expect.equals(42, op1.value); - Expect.equals(42, op2.value); - - i1 = i2 = 42; - Expect.equals(42, i1); - Expect.equals(42, i2); - i1 += 7; - Expect.equals(49, i1); - i1 += (i2 = 17); - Expect.equals(66, i1); - Expect.equals(17, i2); - - i1 += i2 += 3; - Expect.equals(86, i1); - Expect.equals(20, i2); - } -} - -class Operator { - int value; - - Operator(int i) { - value = i; - } - - operator +(Operator other) { - return value + other.value; - } - - operator -(Operator other) { - return value - other.value; - } - - operator /(Operator other) { - return value / other.value; - } - - operator *(Operator other) { - return value * other.value; - } - - operator %(Operator other) { - return value % other.value; - } - - operator ==(dynamic other) { - return value == other.value; - } - - operator <(Operator other) { - return value < other.value; - } - - operator >(Operator other) { - return value > other.value; - } - - operator <=(Operator other) { - return value <= other.value; - } - - operator >=(Operator other) { - return value >= other.value; - } - - operator |(Operator other) { - return value | other.value; - } - - operator ^(Operator other) { - return value ^ other.value; - } - - operator &(Operator other) { - return value & other.value; - } - - operator <<(Operator other) { - return value << other.value; - } - - operator >>(Operator other) { - return value >> other.value; - } - - operator ~/(Operator other) { - return value ~/ other.value; - } - - operator -() { - return -value; - } -} - -main() { - OperatorTest.testMain(); -} diff --git a/tests/language_2/operator/positive_bit_operations_test.dart b/tests/language_2/operator/positive_bit_operations_test.dart deleted file mode 100644 index 7133f843118..00000000000 --- a/tests/language_2/operator/positive_bit_operations_test.dart +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -constants() { - Expect.equals(0x80000000, 0x80000000 | 0); - Expect.equals(0x80000001, 0x80000000 | 1); - Expect.equals(0x80000000, 0x80000000 | 0x80000000); - Expect.equals(0xFFFFFFFF, 0xFFFF0000 | 0xFFFF); - Expect.equals(0x80000000, 0x80000000 & 0xFFFFFFFF); - Expect.equals(0x80000000, 0x80000000 & 0x80000000); - Expect.equals(0x80000000, 0x80000000 & 0xF0000000); - Expect.equals(0x80000000, 0xFFFFFFFF & 0x80000000); - Expect.equals(0x80000000, 0x80000000 ^ 0); - Expect.equals(0xFFFFFFFF, 0x80000000 ^ 0x7FFFFFFF); - Expect.equals(0xFFFFFFFF, 0x7FFFFFFF ^ 0x80000000); - Expect.equals(0xF0000000, 0x70000000 ^ 0x80000000); - Expect.equals(0x80000000, 1 << 31); - Expect.equals(0xFFFFFFF0, 0xFFFFFFF << 4); - Expect.equals(0x7FFFFFFF, 0xFFFFFFFF >> 1); - Expect.equals( - 0xFFFFFFFC, - ((((((0xFFFFFFF << 4) // 0xFFFFFFF0 - >> - 1) // 0x7FFFFFF8 - | - 0x80000000) // 0xFFFFFFF8 - >> - 2) // 0x3FFFFFFE - ^ - 0x40000000) // 0x7FFFFFFE - << - 1)); -} - -foo(i) { - if (i != 0) { - y--; - foo(i - 1); - y++; - } -} - -var y; - -// id returns [x] in a way that should be difficult to predict statically. -id(x) { - y = x; - foo(10); - return y; -} - -interceptors() { - Expect.equals(0x80000000, id(0x80000000) | id(0)); - Expect.equals(0x80000001, id(0x80000000) | id(1)); - Expect.equals(0x80000000, id(0x80000000) | id(0x80000000)); - Expect.equals(0xFFFFFFFF, id(0xFFFF0000) | id(0xFFFF)); - Expect.equals(0x80000000, id(0x80000000) & id(0xFFFFFFFF)); - Expect.equals(0x80000000, id(0x80000000) & id(0x80000000)); - Expect.equals(0x80000000, id(0x80000000) & id(0xF0000000)); - Expect.equals(0x80000000, id(0xFFFFFFFF) & id(0x80000000)); - Expect.equals(0x80000000, id(0x80000000) ^ id(0)); - Expect.equals(0xFFFFFFFF, id(0x80000000) ^ id(0x7FFFFFFF)); - Expect.equals(0xFFFFFFFF, id(0x7FFFFFFF) ^ id(0x80000000)); - Expect.equals(0xF0000000, id(0x70000000) ^ id(0x80000000)); - Expect.equals(0x80000000, id(1) << id(31)); - Expect.equals(0xFFFFFFF0, id(0xFFFFFFF) << id(4)); - Expect.equals(0x7FFFFFFF, id(0xFFFFFFFF) >> id(1)); - Expect.equals( - 0xFFFFFFFC, - ((((((id(0xFFFFFFF) << 4) // 0xFFFFFFF0 - >> - 1) // 0x7FFFFFF8 - | - 0x80000000) // 0xFFFFFFF8 - >> - 2) // 0x3FFFFFFE - ^ - 0x40000000) // 0x7FFFFFFE - << - 1)); -} - -speculative() { - var a = id(0x80000000); - var b = id(0); - var c = id(1); - var d = id(0xFFFF0000); - var e = id(0xFFFF); - var f = id(0xFFFFFFFF); - var g = id(0xF0000000); - var h = id(0x7FFFFFFF); - var j = id(0x70000000); - var k = id(31); - var l = id(4); - var m = id(0xFFFFFFF); - for (int i = 0; i < 1; i++) { - Expect.equals(0x80000000, a | b); - Expect.equals(0x80000001, a | c); - Expect.equals(0x80000000, a | a); - Expect.equals(0xFFFFFFFF, d | e); - Expect.equals(0x80000000, a & f); - Expect.equals(0x80000000, a & a); - Expect.equals(0x80000000, a & g); - Expect.equals(0x80000000, f & a); - Expect.equals(0x80000000, a ^ b); - Expect.equals(0xFFFFFFFF, a ^ h); - Expect.equals(0xFFFFFFFF, h ^ a); - Expect.equals(0xF0000000, j ^ a); - Expect.equals(0x80000000, c << k); - Expect.equals(0xFFFFFFF0, m << l); - Expect.equals(0x7FFFFFFF, f >> c); - Expect.equals( - 0xFFFFFFFC, - ((((((m << 4) // 0xFFFFFFF0 - >> - 1) // 0x7FFFFFF8 - | - 0x80000000) // 0xFFFFFFF8 - >> - 2) // 0x3FFFFFFE - ^ - 0x40000000) // 0x7FFFFFFE - << - 1)); - } -} - -// Due to bad precedence rules this example was broken in Dart2Js. -precedence() { - Expect.equals(0x80000000, -1 & 0x80000000); - Expect.equals(0x80000000, id(-1) & 0x80000000); - Expect.equals(0x80000000, ~(~(0x80000000))); - Expect.equals(0x80000000, ~(~(id(0x80000000)))); -} - -main() { - constants(); - interceptors(); - speculative(); - precedence(); -} diff --git a/tests/language_2/operator/precedence_test.dart b/tests/language_2/operator/precedence_test.dart deleted file mode 100644 index 4db2b54f40d..00000000000 --- a/tests/language_2/operator/precedence_test.dart +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) 2017, 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 test program to test operation precedence. - -// @dart = 2.9 - -library precedence_test; - -import "package:expect/expect.dart"; - -main() { - testBang(); - testIndexWithPrefixAdd(); - testIndexWithPostfixAdd(); - testTilde(); - testUnaryPrefixWithAdd(); - testUnaryPostfixWithAdd(); - testUnaryPrefixWithMultiply(); - testUnaryPostfixWithMultiply(); -} - -void testBang() { - int x = 3; - - Expect.equals(!true == false, true); - Expect.equals(!x.isEven, true); - Expect.equals(!(++x).isEven, false); - Expect.equals(x, 4); - Expect.equals(!(x++).isEven, false); - Expect.equals(x, 5); -} - -void testIndexWithPrefixAdd() { - var x = [3]; - - Expect.equals(++x[0] + 3, 7); - Expect.equals(x[0], 4); - Expect.equals(++x[0] - 3, 2); - Expect.equals(x[0], 5); - Expect.equals(--x[0] + 4, 8); - Expect.equals(x[0], 4); - Expect.equals(--x[0] - 4, -1); - Expect.equals(x[0], 3); - - Expect.equals(3 + ++x[0], 7); - Expect.equals(x[0], 4); - Expect.equals(3 - ++x[0], -2); - Expect.equals(x[0], 5); - Expect.equals(4 + --x[0], 8); - Expect.equals(x[0], 4); - Expect.equals(4 - --x[0], 1); - Expect.equals(x[0], 3); -} - -void testIndexWithPostfixAdd() { - var x = [3]; - - Expect.equals(x[0]++ + 3, 6); - Expect.equals(x[0], 4); - Expect.equals(x[0]++ - 3, 1); - Expect.equals(x[0], 5); - Expect.equals(x[0]-- + 4, 9); - Expect.equals(x[0], 4); - Expect.equals(x[0]-- - 4, 0); - Expect.equals(x[0], 3); - - Expect.equals(3 + x[0]++, 6); - Expect.equals(x[0], 4); - Expect.equals(3 - x[0]++, -1); - Expect.equals(x[0], 5); - Expect.equals(4 + x[0]--, 9); - Expect.equals(x[0], 4); - Expect.equals(4 - x[0]--, 0); - Expect.equals(x[0], 3); -} - -void testTilde() { - int x = 3; - - Expect.equals(~x.sign, ~(x.sign)); - Expect.equals(~x + 7, (~3) + 7); - - Expect.equals(~++x + 7, (~4) + 7); - Expect.equals(x, 4); - Expect.equals(~x++ + 7, (~4) + 7); - Expect.equals(x, 5); - - Expect.equals(~ --x + 7, (~4) + 7); - Expect.equals(x, 4); - Expect.equals(~x-- + 7, (~4) + 7); - Expect.equals(x, 3); -} - -void testUnaryPrefixWithAdd() { - int x = 3; - - Expect.equals(++x + 3, 7); - Expect.equals(x, 4); - Expect.equals(++x - 3, 2); - Expect.equals(x, 5); - Expect.equals(--x + 4, 8); - Expect.equals(x, 4); - Expect.equals(--x - 4, -1); - Expect.equals(x, 3); - - Expect.equals(3 + ++x, 7); - Expect.equals(x, 4); - Expect.equals(3 - ++x, -2); - Expect.equals(x, 5); - Expect.equals(4 + --x, 8); - Expect.equals(x, 4); - Expect.equals(4 - --x, 1); - Expect.equals(x, 3); -} - -void testUnaryPostfixWithAdd() { - int x = 3; - - Expect.equals(x++ + 3, 6); - Expect.equals(x, 4); - Expect.equals(x++ - 3, 1); - Expect.equals(x, 5); - Expect.equals(x-- + 4, 9); - Expect.equals(x, 4); - Expect.equals(x-- - 4, 0); - Expect.equals(x, 3); - - Expect.equals(3 + x++, 6); - Expect.equals(x, 4); - Expect.equals(3 - x++, -1); - Expect.equals(x, 5); - Expect.equals(4 + x--, 9); - Expect.equals(x, 4); - Expect.equals(4 - x--, 0); - Expect.equals(x, 3); -} - -void testUnaryPrefixWithMultiply() { - int x = 3; - - Expect.equals(++x * 3, 12); - Expect.equals(x, 4); - Expect.equals(++x / 5, 1.0); - Expect.equals(x, 5); - Expect.equals(--x * 3, 12); - Expect.equals(x, 4); - Expect.equals(--x / 4, 0.75); - Expect.equals(x, 3); - - Expect.equals(3 * ++x, 12); - Expect.equals(x, 4); - Expect.equals(5 / ++x, 1.0); - Expect.equals(x, 5); - Expect.equals(3 * --x, 12); - Expect.equals(x, 4); - Expect.equals(6 / --x, 2.0); - Expect.equals(x, 3); -} - -void testUnaryPostfixWithMultiply() { - int x = 3; - - Expect.equals(x++ * 3, 9); - Expect.equals(x, 4); - Expect.equals(x++ / 4, 1.0); - Expect.equals(x, 5); - Expect.equals(x-- * 3, 15); - Expect.equals(x, 4); - Expect.equals(x-- / 4, 1.0); - Expect.equals(x, 3); - - Expect.equals(3 * x++, 9); - Expect.equals(x, 4); - Expect.equals(3 / x++, 0.75); - Expect.equals(x, 5); - Expect.equals(4 * x--, 20); - Expect.equals(x, 4); - Expect.equals(4 / x--, 1.0); - Expect.equals(x, 3); -} diff --git a/tests/language_2/operator/round_test.dart b/tests/language_2/operator/round_test.dart deleted file mode 100644 index 8f6025a144d..00000000000 --- a/tests/language_2/operator/round_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2013, 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 - -/// Test of a common rounding bug. -/// -/// This bug is common in JavaScript implementations because the ECMA-262 -/// specification of JavaScript incorrectly claims: -/// -/// The value of [:Math.round(x):] is the same as the value of -/// [:Math.floor(x+0.5):], except when x is 0 or is less than 0 but greater -/// than or equal to -0.5; for these cases [:Math.round(x):] returns 0, but -/// [:Math.floor(x+0.5):] returns +0. -/// -/// However, 0.49999999999999994 + 0.5 is 1 and 9007199254740991 + 0.5 is -/// 9007199254740992, so you cannot implement Math.round in terms of -/// Math.floor. - -import 'package:expect/expect.dart'; - -main() { - Expect.equals(0, (0.49999999999999994).round()); - Expect.equals(0, (-0.49999999999999994).round()); - - Expect.equals(9007199254740991, (9007199254740991.0).round()); - Expect.equals(-9007199254740991, (-9007199254740991.0).round()); -} diff --git a/tests/language_2/operator/smi_type_test.dart b/tests/language_2/operator/smi_type_test.dart deleted file mode 100644 index 02cb4a457fa..00000000000 --- a/tests/language_2/operator/smi_type_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2013, 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. -// VMOptions=--optimization-counter-threshold=8 - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - // Make instance-of polymorphic. - isNum([]); - isNumRaw([]); - isNotNum([]); - isNotInt([]); - for (int i = 0; i < 20; i++) { - Expect.isTrue(isNum(i)); - Expect.isTrue(isNumRaw(i)); - Expect.isFalse(isNotNum(i)); - Expect.isFalse(isNotInt(i)); - } -} - -isNum(a) { - return a is Comparable; -} - -isNumRaw(a) { - return a is Comparable; -} - -isNotNum(a) { - return a is Comparable; -} - -isNotInt(a) { - return a is Comparable; -} diff --git a/tests/language_2/operator/ternary_test.dart b/tests/language_2/operator/ternary_test.dart deleted file mode 100644 index 628ec570eed..00000000000 --- a/tests/language_2/operator/ternary_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// 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 test for testing the ternary operator. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class TernaryTest { - static true_cond() { - return true; - } - - static false_cond() { - return false; - } - - static foo() { - return -4; - } - - static moo() { - return 5; - } - - static testMain() { - Expect.equals( - -4, (TernaryTest.true_cond() ? TernaryTest.foo() : TernaryTest.moo())); - Expect.equals( - 5, (TernaryTest.false_cond() ? TernaryTest.foo() : TernaryTest.moo())); - } -} - -main() { - TernaryTest.testMain(); -} diff --git a/tests/language_2/operator/truncdiv_test.dart b/tests/language_2/operator/truncdiv_test.dart deleted file mode 100644 index e8d7d924421..00000000000 --- a/tests/language_2/operator/truncdiv_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2013, 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 test optimization of modulo operator on Smi. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - for (int i = -30; i < 30; i++) { - Expect.equals(i % 9, foo(i, 9)); - // Zero test is done outside the loop. - if (i < 0) { - Expect.equals(i ~/ -i, foo2(i)); - } else if (i > 0) { - Expect.equals(i ~/ i, foo2(i)); - } - } - // We don't specify the exact exception type here, that is covered in - // truncdiv_zero_test. - Expect.throws(() => foo2(0)); -} - -foo(i, x) => i % x; - -foo2(i) { - // Make sure x has a range computed. - var x = 0; - if (i < 0) { - x = -i; - } else { - x = i; - } - return i ~/ x; -} diff --git a/tests/language_2/operator/truncdiv_uint32_test.dart b/tests/language_2/operator/truncdiv_uint32_test.dart deleted file mode 100644 index 3ca40be2dca..00000000000 --- a/tests/language_2/operator/truncdiv_uint32_test.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2013, 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 - -var a = [0xFFFFFFFF]; - -main() { - if (a[0] ~/ 1 != 0xFFFFFFFF) throw 'Test failed'; -} diff --git a/tests/language_2/operator/truncdiv_zero_test.dart b/tests/language_2/operator/truncdiv_zero_test.dart deleted file mode 100644 index c69b9288692..00000000000 --- a/tests/language_2/operator/truncdiv_zero_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// 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. -// Dart test optimization of modulo operator on Smi. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -import "truncdiv_test.dart" as truncdiv_test show foo, foo2; - -main() { - Expect.throws(() => truncdiv_test.foo(12, 0)); - Expect.throws(() => truncdiv_test.foo2(0)); -} diff --git a/tests/language_2/operator/unary2_test.dart b/tests/language_2/operator/unary2_test.dart deleted file mode 100644 index 87fe30b4d21..00000000000 --- a/tests/language_2/operator/unary2_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012, 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 test for testing binary operations. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class UnaryTest { - static foo() { - return -4; - } - - static moo() { - return 5; - } - - static testMain() { - Expect.equals(1, (UnaryTest.foo() + UnaryTest.moo())); - } -} - -main() { - UnaryTest.testMain(); -} diff --git a/tests/language_2/operator/unary_plus_test.dart b/tests/language_2/operator/unary_plus_test.dart deleted file mode 100644 index 279dbdac348..00000000000 --- a/tests/language_2/operator/unary_plus_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// There is no unary plus operator in Dart. - -main() { - var a = 1; - var b = +a; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] '+' is not a prefix operator. -} diff --git a/tests/language_2/operator/unary_test.dart b/tests/language_2/operator/unary_test.dart deleted file mode 100644 index 469925dc9cf..00000000000 --- a/tests/language_2/operator/unary_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Dart test for testing binary operations. - -class UnaryTest { - static foo() { - return 4; - } - - static moo() { - return 5; - } - - static testMain() { - Expect.equals(9.0, (UnaryTest.foo() + UnaryTest.moo())); - } -} - -main() { - UnaryTest.testMain(); -} diff --git a/tests/language_2/operator/unsupported_runtime_test.dart b/tests/language_2/operator/unsupported_runtime_test.dart deleted file mode 100644 index a1bf3d71095..00000000000 --- a/tests/language_2/operator/unsupported_runtime_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test handling of unsupported operators. - -library unsupported_operators; - -class C { - m() { - print( - - null); - print( - - null); - } -} - -void main() { - new C().m(); - new C().m(); - print( - - null); - print( - - null); -} diff --git a/tests/language_2/operator/unsupported_test.dart b/tests/language_2/operator/unsupported_test.dart deleted file mode 100644 index 7ead00a760a..00000000000 --- a/tests/language_2/operator/unsupported_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test handling of unsupported operators. - -library unsupported_operators; - -class C { - m() { - print( - super === - // ^ - // [analyzer] SYNTACTIC_ERROR.UNSUPPORTED_OPERATOR - // [cfe] The '===' operator is not supported. - // ^ - // [cfe] The string '===' isn't a user-definable operator. - null); - print( - super !== - // ^ - // [analyzer] SYNTACTIC_ERROR.UNSUPPORTED_OPERATOR - // [cfe] The '!==' operator is not supported. - // ^ - // [cfe] The string '!==' isn't a user-definable operator. - null); - } -} - -void main() { - new C().m(); - new C().m(); - print( - "foo" === - // ^ - // [analyzer] SYNTACTIC_ERROR.UNSUPPORTED_OPERATOR - // [cfe] The '===' operator is not supported. - // ^ - // [cfe] The string '===' isn't a user-definable operator. - null); - print( - "foo" !== - // ^ - // [analyzer] SYNTACTIC_ERROR.UNSUPPORTED_OPERATOR - // [cfe] The '!==' operator is not supported. - // ^ - // [cfe] The string '!==' isn't a user-definable operator. - null); -} diff --git a/tests/language_2/optimize/allocation_sinking_inlining_test.dart b/tests/language_2/optimize/allocation_sinking_inlining_test.dart deleted file mode 100644 index 8ca3c16564d..00000000000 --- a/tests/language_2/optimize/allocation_sinking_inlining_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2013, 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. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -// Test allocation sinking with polymorphic inlining. - -import "package:expect/expect.dart"; - -class A { - foo(x) => ++x.f; -} - -class B { - foo(x) => --x.f; -} - -class C { - int f = 0; -} - -test(obj) { - var c = new C(); - return obj.foo(c); -} - -main() { - var a = new A(); - var b = new B(); - Expect.equals(1, test(a)); - Expect.equals(-1, test(b)); - for (var i = 0; i < 20; i++) test(a); - Expect.equals(1, test(a)); - Expect.equals(-1, test(b)); -} diff --git a/tests/language_2/optimize/bailout2_test.dart b/tests/language_2/optimize/bailout2_test.dart deleted file mode 100644 index e594c99f0e0..00000000000 --- a/tests/language_2/optimize/bailout2_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -var a; - -main() { - // Write a loop to force a bailout method on [A.foo]. - for (int i = 0; i < 10; i++) { - if (a != null) new A().foo([]); - Expect.equals(42, new A().foo(new A())); - } -} - -class A { - // In dart2js, the optimized version of foo tries to optimize the - // uses of a.length (which is used two times here: for the index, - // and for the bounds check), and that optimization used to crash - // the compiler. - foo(a) => a[a.length]; - - int get length => 42; - operator [](index) => 42; -} diff --git a/tests/language_2/optimize/bailout3_test.dart b/tests/language_2/optimize/bailout3_test.dart deleted file mode 100644 index 2a74b057d42..00000000000 --- a/tests/language_2/optimize/bailout3_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test that the return type of a method is being registered for both -// its bailout and optimized version in dart2js. - -var a; - -bar() { - if (a[0] == 0) { - // Force bailout version. - bar(); - // Avoid inlining. - throw 0; - } - for (int i = 0; i < 10; i++) { - a[0] = 42; - } - // This return should say that bar can return an array or unknown. - return a; -} - -foo() { - if (a[0] == 0) { - // Avoid inlining. - throw 0; - } - var b = bar(); - // This check used to fail because dart2js was assuming [b] was an - // array. - Expect.equals(1, b.length); -} - -main() { - a = new Map(); - bar(); - foo(); -} diff --git a/tests/language_2/optimize/bailout4_test.dart b/tests/language_2/optimize/bailout4_test.dart deleted file mode 100644 index 31934961885..00000000000 --- a/tests/language_2/optimize/bailout4_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test that dart2s computes the right bailout environment in presence -// of nested loops. - -class A { - operator [](index) => 42; -} - -var a = new A(); -var b = new List.filled(4, null); -int count = 0; - -main() { - // Make the method recursive to make sure it gets an optimized - // version. - if (b[0] != null) main(); - - for (int i = 0; i < 2; i++) { - for (int j = 0; j < 2; j++) { - for (int k = 0; k < 2; k++) { - Expect.equals(42, a[i + j + k]); - count++; - } - } - } - Expect.equals(8, count); -} diff --git a/tests/language_2/optimize/bailout5_test.dart b/tests/language_2/optimize/bailout5_test.dart deleted file mode 100644 index bbf7da6f25b..00000000000 --- a/tests/language_2/optimize/bailout5_test.dart +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -// Test to make sure the bailout environment in dart2js is correct. - -var global; - -class A { - var array; - - initArray() { - return global[0] == null ? [null] : new Map(); - } - - bar() { - array = initArray(); - do { - var element = array[0]; // bailout here - if (element is Map) continue; - if (element == null) break; - } while (true); - return global[0]; // bailout here - } - - baz() { - do { - var element = bar(); - if (element == null) return global[0]; // bailout here - if (element is Map) continue; - if (element is num) break; - } while (true); - return global[0]; // bailout here - } -} - -void main() { - global = [1]; - for (int i = 0; i < 2; i++) { - Expect.equals(1, new A().baz()); - Expect.equals(1, new A().bar()); - } - global = new Map(); - for (int i = 0; i < 2; i++) { - Expect.equals(null, new A().baz()); - Expect.equals(null, new A().bar()); - } - - global[0] = 42; - for (int i = 0; i < 2; i++) { - Expect.equals(42, new A().baz()); - Expect.equals(42, new A().bar()); - } -} diff --git a/tests/language_2/optimize/bailout6_test.dart b/tests/language_2/optimize/bailout6_test.dart deleted file mode 100644 index bd22f36500a..00000000000 --- a/tests/language_2/optimize/bailout6_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -// Test for dart2js to make sure the computed bailout environment is -// correct. - -var global; - -class A { - var array; - - foo() { - do { - var element = global; - if (element is Map) continue; - if (element is num) break; - } while (true); - return array[0]; // bailout here. - } -} - -void main() { - var a = new A(); - a.array = [42]; - global = 42; - - for (int i = 0; i < 2; i++) { - Expect.equals(42, a.foo()); - } - - a.array = new Map(); - a.array[0] = 42; - for (int i = 0; i < 2; i++) { - Expect.equals(42, a.foo()); - } - global = null; -} diff --git a/tests/language_2/optimize/bailout7_test.dart b/tests/language_2/optimize/bailout7_test.dart deleted file mode 100644 index 7d02e92d5b9..00000000000 --- a/tests/language_2/optimize/bailout7_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -// Test to make sure the do/while loop exit condition is generated. - -var global; - -class A { - var array; - - initArray() { - if (global[0] == null) { - return [2]; - } else { - var map = new Map(); - map[0] = 2; - return map; - } - } - - bar() { - array = initArray(); - var element; - do { - element = array[0]; // bailout here - if (element is Map) continue; - if (element == null) break; - } while (element != 2); - return global[0]; // bailout here - } -} - -void main() { - global = [2]; - for (int i = 0; i < 2; i++) { - Expect.equals(2, new A().bar()); - } - - global = new Map(); - global[0] = 2; - for (int i = 0; i < 2; i++) { - Expect.equals(2, new A().bar()); - } -} diff --git a/tests/language_2/optimize/bailout_container_type_test.dart b/tests/language_2/optimize/bailout_container_type_test.dart deleted file mode 100644 index ab8442c5463..00000000000 --- a/tests/language_2/optimize/bailout_container_type_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to generate bad code for the -// non-bailout version of [main]. - -var a = [ - false, - [1, 2, 3] -]; -var b; - -main() { - // Defeat type inferencing for [b]. - b = new Object(); - b = 42; - b = []; - - // Make the function recursive to force a bailout version. - if (a[0]) main(); - - // We used to ask [b] to be of the same type as [a], but not - // checking that the length and element type are the same. - var arrayPhi = a[0] ? a : b; - - if (arrayPhi.length != 0) { - throw 'Test failed'; - } -} diff --git a/tests/language_2/optimize/bailout_test.dart b/tests/language_2/optimize/bailout_test.dart deleted file mode 100644 index 42ddf807dda..00000000000 --- a/tests/language_2/optimize/bailout_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test that a call to a bailout method in dart2js resolves to the -// right method. - -var reachedAfoo = new C(); - -class A { - foo() { - // Using '++' makes sure there is a type guard. - reachedAfoo++; - } -} - -class B extends A { - foo() { - reachedAfoo++; - // Call the Expect method after the type guard. - Expect.fail('Should never reach B.foo'); - } - - bar() { - super.foo(); - } -} - -class C { - int value = 0; - operator +(val) { - value += val; - return this; - } -} - -main() { - // Using a loop makes sure the 'foo' methods will have an optimized - // version. - while (reachedAfoo.value != 0) { - new A().foo(); - new B().foo(); - } - new B().bar(); - Expect.equals(1, reachedAfoo.value); -} diff --git a/tests/language_2/optimize/cha_deopt1_deferred_lib.dart b/tests/language_2/optimize/cha_deopt1_deferred_lib.dart deleted file mode 100644 index 25c46967863..00000000000 --- a/tests/language_2/optimize/cha_deopt1_deferred_lib.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2014, 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 - -import "cha_deopt1_lib.dart"; - -class U extends T { - m() => "good horse"; -} - -make_u() => new U(); diff --git a/tests/language_2/optimize/cha_deopt1_lib.dart b/tests/language_2/optimize/cha_deopt1_lib.dart deleted file mode 100644 index d5760bbea0f..00000000000 --- a/tests/language_2/optimize/cha_deopt1_lib.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2014, 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 mylib; - -class T { - m() => 42; -} diff --git a/tests/language_2/optimize/cha_deopt1_test.dart b/tests/language_2/optimize/cha_deopt1_test.dart deleted file mode 100644 index e128ba30794..00000000000 --- a/tests/language_2/optimize/cha_deopt1_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2014, 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. -// VMOptions=--optimization-counter-threshold=100 --no-background-compilation - -// @dart = 2.9 - -// Test lazy deoptimization at field guards with deferred loading. - -import "package:expect/expect.dart"; -import "cha_deopt1_lib.dart"; -import "cha_deopt1_deferred_lib.dart" deferred as d; - -var loaded = false; - -main() { - for (var i = 0; i < 2000; i++) bla(); - Expect.equals(42, bla()); - d.loadLibrary().then((_) { - loaded = true; - Expect.equals("good horse", bla()); - }); -} - -make_t() { - try { - if (loaded) { - return d.make_u(); - } else { - return new T(); - } - } catch (e) {} -} - -bla() { - var x = new X(); - x.test(make_t()); - return x.fld.m(); -} - -class X { - T fld = new T(); - - test(T t) { - if (t != null) { - T tmp = t; - fld = tmp; - } - } -} diff --git a/tests/language_2/optimize/cha_deopt2_deferred_lib.dart b/tests/language_2/optimize/cha_deopt2_deferred_lib.dart deleted file mode 100644 index 59ec9f80b32..00000000000 --- a/tests/language_2/optimize/cha_deopt2_deferred_lib.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2014, 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 - -import "cha_deopt2_lib.dart"; - -class U extends T {} - -make_u() => new U(); diff --git a/tests/language_2/optimize/cha_deopt2_lib.dart b/tests/language_2/optimize/cha_deopt2_lib.dart deleted file mode 100644 index 20231d9c6a5..00000000000 --- a/tests/language_2/optimize/cha_deopt2_lib.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2014, 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 mylib; - -class A {} - -class B {} - -class C {} - -class D {} - -class E {} - -class T {} diff --git a/tests/language_2/optimize/cha_deopt2_test.dart b/tests/language_2/optimize/cha_deopt2_test.dart deleted file mode 100644 index 15b486d0e0c..00000000000 --- a/tests/language_2/optimize/cha_deopt2_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2014, 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. -// VMOptions=--optimization-counter-threshold=100 --no-background-compilation -// VMOptions=--optimization-counter-threshold=100 --no-background-compilation --no-use-field-guards - -// @dart = 2.9 - -// Test lazy deoptimization at type checks with deferred loading. - -import "package:expect/expect.dart"; -import "cha_deopt2_lib.dart"; -import "cha_deopt2_deferred_lib.dart" deferred as d; - -var loaded = false; - -main() { - for (var i = 0; i < 2000; i++) bla(); - Expect.equals(1, bla()); - d.loadLibrary().then((_) { - loaded = true; - Expect.equals(1, bla()); - }); -} - -make_array() { - try { - if (loaded) { - return [new A(), new B(), new C(), new D(), new E(), d.make_u()]; - } else { - return [new A(), new B(), new C(), new D(), new E(), new T()]; - } - } catch (e) {} -} - -bla() { - var count = 0; - for (var x in make_array()) { - if (x is T) count++; - } - return count; -} diff --git a/tests/language_2/optimize/cha_deopt3_deferred_lib.dart b/tests/language_2/optimize/cha_deopt3_deferred_lib.dart deleted file mode 100644 index 62e9bedb82d..00000000000 --- a/tests/language_2/optimize/cha_deopt3_deferred_lib.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2014, 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 - -import "cha_deopt3_lib.dart"; - -class U implements T {} - -make_u() => new U(); diff --git a/tests/language_2/optimize/cha_deopt3_lib.dart b/tests/language_2/optimize/cha_deopt3_lib.dart deleted file mode 100644 index 20231d9c6a5..00000000000 --- a/tests/language_2/optimize/cha_deopt3_lib.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2014, 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 mylib; - -class A {} - -class B {} - -class C {} - -class D {} - -class E {} - -class T {} diff --git a/tests/language_2/optimize/cha_deopt3_test.dart b/tests/language_2/optimize/cha_deopt3_test.dart deleted file mode 100644 index 6bb78fb9f3d..00000000000 --- a/tests/language_2/optimize/cha_deopt3_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2014, 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. -// VMOptions=--optimization-counter-threshold=100 --no-background-compilation -// VMOptions=--optimization-counter-threshold=100 --no-background-compilation --no-use-field-guards - -// @dart = 2.9 - -// Test lazy deoptimization at type checks with interface implementation. - -import "package:expect/expect.dart"; -import "cha_deopt3_lib.dart"; -import "cha_deopt3_deferred_lib.dart" deferred as d; - -var loaded = false; - -main() { - for (var i = 0; i < 2000; i++) bla(); - Expect.equals(1, bla()); - d.loadLibrary().then((_) { - loaded = true; - Expect.equals(1, bla()); - }); -} - -make_array() { - try { - if (loaded) { - return [new A(), new B(), new C(), new D(), new E(), d.make_u()]; - } else { - return [new A(), new B(), new C(), new D(), new E(), new T()]; - } - } catch (e) {} -} - -bla() { - var count = 0; - for (var x in make_array()) { - if (x is T) count++; - } - return count; -} diff --git a/tests/language_2/optimize/code_motion_crash_test.dart b/tests/language_2/optimize/code_motion_crash_test.dart deleted file mode 100644 index 06f81a73209..00000000000 --- a/tests/language_2/optimize/code_motion_crash_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to crash during the -// [SsaCodeMotion] phase on this code. - -class A { - final finalField; - var field = 2; - foo() { - new A().field = 42; - } - - A._() : finalField = 42; - A() : finalField = [new A._(), new B(), new Object()][1]; -} - -class B { - foo() {} - bar() {} -} - -main() { - var a = new A(); - // Create a new block for SsaCodeMotion: the phase will want to move - // field access on [a] to this block. - if (true) { - var b = a.finalField; - var d = a.field; - b.bar(); - - // [c] gets GVN'ed with [b]. As a consequence, the type propagator - // that runs after GVN sees that [c] can only be a [B] because of - // the call to [bar]. - var c = a.finalField; - c.foo(); - - // [e] does not get GVN'ed because the GVN phase sees [c.foo()] as - // having side effects. - var e = a.field; - if (d + e != 4) throw 'Test failed'; - } -} diff --git a/tests/language_2/optimize/constant_fold_equals_test.dart b/tests/language_2/optimize/constant_fold_equals_test.dart deleted file mode 100644 index 21705d039d0..00000000000 --- a/tests/language_2/optimize/constant_fold_equals_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - dynamic a = 'foo'; - for (int i = 0; i < 10; i++) { - if (i == 0) { - Expect.isTrue(identical(a, 'foo')); - } else { - Expect.isTrue(a == 2); - } - a = 2; - } -} diff --git a/tests/language_2/optimize/constant_propagation_phis_test.dart b/tests/language_2/optimize/constant_propagation_phis_test.dart deleted file mode 100644 index 2428d0a013c..00000000000 --- a/tests/language_2/optimize/constant_propagation_phis_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2013, 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. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test that constant propagation correctly updates phis when predecessor's -// reachability changes. - -final keys = const ["keyA"]; -final values = const ["a"]; - -main() { - for (var i = 0; i < 20; i++) test(keys[0]); -} - -test(key) { - var ref = key2value(key); - Expect.equals("a", (ref == null) ? "-" : ref); -} - -key2value(key) { - var index = indexOf(keys, key); - return (index == -1) ? null : values[index]; -} - -indexOf(keys, key) { - for (var i = keys.length - 1; i >= 0; i--) { - var equals = keys[i] == key; - if (equals) return i; - } - return -1; -} diff --git a/tests/language_2/optimize/critical_edge2_test.dart b/tests/language_2/optimize/critical_edge2_test.dart deleted file mode 100644 index 3f3c81d8944..00000000000 --- a/tests/language_2/optimize/critical_edge2_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2014, 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 - -// This test broke dart2js. -// A compiler must not construct a critical edge on this program. -// -// See critical_edge_test.dart for a description of the problem. - -import "package:expect/expect.dart"; - -String parse(String uri) { - int index = 0; - int char = -1; - - void parseAuth() { - index; - char; - } - - while (index < 1000) { - char = uri.codeUnitAt(index); - if (char == 1234) { - break; - } - if (char == 0x3A) { - return "good"; - } - index++; - } - - print(char); - return "bad"; -} - -main() { - Expect.equals("good", parse("dart:_foreign_helper")); -} diff --git a/tests/language_2/optimize/critical_edge_test.dart b/tests/language_2/optimize/critical_edge_test.dart deleted file mode 100644 index 9226b206b6c..00000000000 --- a/tests/language_2/optimize/critical_edge_test.dart +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2014, 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 - -// This test broke dart2js. -// A compiler must not construct a critical edge on this program. -// -// In particular we have to watch out for: -// - the while-loop branch going to the body-block and to the exit-block, and -// - the exit-block having as incoming the condition-block and the -// break-blocks. -// -// Triggering the bug is relatively hard, since pushing instructions back the -// exit-block to the incoming blocks is not guaranteed to trigger an error. -// Dart2js frequently ended up with update-assignments just before the -// condition: -// for (int i = 0; state = state0, i < 10; i++) { -// if (..) { state = 1; } -// ... -// } -// use(state); -// -// In this case the "state" variable was assigned before the loop and then -// reassigned before the break. The exit-block pushed the assignment back -// to its incoming blocks and that's why the "state = state0" assignment ended -// up just before the condition. -// Note that the assignment was executed at every iteration instead of just -// when exiting the loop. -// This repeated assignments don't have any negative effect unless the state -// variable is also assigned and used inside the loop-body. It turns out that -// this is very rare and needs some tricks to make happen. - -import "package:expect/expect.dart"; - -String parse(String uri) { - int index = 0; - int char = -1; - - void parseAuth() { - index; - char; - } - - int state = 0; - while (true) { - char = uri.codeUnitAt(index); - if (char == 1234) { - state = (index == 0) ? 1 : 2; - break; - } - if (char == 0x3A) { - return "good"; - } - index++; - } - - if (state == 1) { - print(char == 1234); - print(index == uri.length); - } - return "bad"; -} - -main() { - Expect.equals("good", parse("dart:_foreign_helper")); -} diff --git a/tests/language_2/optimize/dead_field_access_test.dart b/tests/language_2/optimize/dead_field_access_test.dart deleted file mode 100644 index 361e2742c57..00000000000 --- a/tests/language_2/optimize/dead_field_access_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'package:expect/expect.dart'; - -class Foo { - var field = 10; -} - -@pragma('dart2js:noInline') -getField(x) { - x.field; - return 34; -} - -main() { - Expect.equals(34, getField(new Foo())); - Expect.throws(() => getField(null)); -} diff --git a/tests/language_2/optimize/deopt_inlined_function_lazy_test.dart b/tests/language_2/optimize/deopt_inlined_function_lazy_test.dart deleted file mode 100644 index feda11769dd..00000000000 --- a/tests/language_2/optimize/deopt_inlined_function_lazy_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2012, 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. -// Test lazy deoptimization from within an inlined function. -// VMOptions=--deoptimize_alot --optimization-counter-threshold=10 --no-use-osr - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -call_native(x) { - // Wrap in try to avoid inlining. - // Use a large int so the intrinsifier does not fire. - try { - return x + 9223372036854775807; - } finally {} -} - -bar(x) { - if (x < 0) call_native(x); - x = 42; - return x; -} - -foo(x) { - x = bar(x); - return x; -} - -main() { - Expect.equals(42, foo(1)); - for (var i = 0; i < 20; i++) foo(7); - Expect.equals(42, foo(2)); - // Call the runtime to trigger lazy deopt with foo/bar on the stack. - Expect.equals(42, foo(-1)); -} diff --git a/tests/language_2/optimize/deopt_inlined_function_test.dart b/tests/language_2/optimize/deopt_inlined_function_test.dart deleted file mode 100644 index ad2760015c2..00000000000 --- a/tests/language_2/optimize/deopt_inlined_function_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2012, 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. -// Test deoptimization from within an inlined function. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - deopt_here() => 1; -} - -class B { - deopt_here() => 2; -} - -dynamic obj = new A(); - -bar(x) { - x = 42; - obj.deopt_here(); - return x; -} - -foo(x) { - x = bar(x); - return x; -} - -main() { - Expect.equals(42, foo(1)); - for (var i = 0; i < 2000; i++) foo(7); - Expect.equals(42, foo(2)); - obj = new B(); - Expect.equals(42, foo(3)); // <-- deoptimization via foo/bar/obj.deopt_here -} diff --git a/tests/language_2/optimize/deopt_lazy_finalization_test.dart b/tests/language_2/optimize/deopt_lazy_finalization_test.dart deleted file mode 100644 index 3c0f27677d0..00000000000 --- a/tests/language_2/optimize/deopt_lazy_finalization_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2012, 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. -// Test deoptimization caused by lazy finalization. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - Expect.equals(20000, part1()); - // Trigger lazy finalization of class B, which should invalidate - // optimized code for A.loop. - Expect.equals(-20000, part2()); -} - -part1() { - var a = new A(); - a.loop(); - // Second invocation calls optimized code. - return a.loop(); -} - -part2() { - var b = new B(); - b.loop(); - // Second invocation calls optimized code. - return b.loop(); -} - -class A { - foo() => 2; - - loop() { - var sum = 0; - for (int i = 0; i < 10000; i++) { - sum += foo(); - } - return sum; - } -} - -class Aa extends A {} - -class B extends Aa { - foo() => -2; -} diff --git a/tests/language_2/optimize/deopt_no_feedback_test.dart b/tests/language_2/optimize/deopt_no_feedback_test.dart deleted file mode 100644 index bd5af7f32ae..00000000000 --- a/tests/language_2/optimize/deopt_no_feedback_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// 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. -// Test deoptimization caused by running code that did not collect type -// feedback before. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -testStoreIndexed() { - test(a, i, v, flag) { - if (flag) { - // No type feedback in first pass - return a[i] = v; - } else { - return a[i] = i; - } - } - - var a = new List.filled(10, null); - for (var i = 0; i < 20; i++) { - var r = test(a, 3, 888, false); - Expect.equals(3, r); - Expect.equals(3, a[3]); - } - // Deopt. - var r = test(a, 3, 888, true); - Expect.equals(888, r); - Expect.equals(888, a[3]); -} - -testIncrLocal() { - test(a, flag) { - if (flag) { - a++; - return a; - } else { - return -1; - } - } - - for (var i = 0; i < 20; i++) { - var r = test(10, false); - Expect.equals(-1, r); - } - // Deopt. - var r = test(10, true); - Expect.equals(11, r); -} - -main() { - for (var i = 0; i < 20; i++) {} - testStoreIndexed(); - testIncrLocal(); -} diff --git a/tests/language_2/optimize/deopt_smi_op_test.dart b/tests/language_2/optimize/deopt_smi_op_test.dart deleted file mode 100644 index 851a334aa44..00000000000 --- a/tests/language_2/optimize/deopt_smi_op_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2012, 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. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test hoisted (loop-invariant) smi operations with deoptimization. - -test_mul(h) { - var x; - for (var i = 0; i < 3; i++) { - x = h * 100000; - } - return x; -} - -test_neg(h) { - var x; - for (var i = 0; i < 3; i++) { - x = -h; - } - return x; -} - -main() { - for (var i = 0; i < 20; i++) test_mul(10); - Expect.equals(1000000, test_mul(10)); - Expect.equals(100000000000, test_mul(1000000)); - Expect.equals(100000 * 0x3fffffffffffffff, test_mul(0x3fffffffffffffff)); - - for (var i = 0; i < 20; i++) test_neg(10); - Expect.equals(-10, test_neg(10)); - Expect.equals(0x40000000, test_neg(-0x40000000)); - Expect.equals(0x4000000000000000, test_neg(-0x4000000000000000)); -} diff --git a/tests/language_2/optimize/deoptimized_function_on_stack_test.dart b/tests/language_2/optimize/deoptimized_function_on_stack_test.dart deleted file mode 100644 index a1ab683ce9d..00000000000 --- a/tests/language_2/optimize/deoptimized_function_on_stack_test.dart +++ /dev/null @@ -1,62 +0,0 @@ -// 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. -// VMOptions=--optimization-counter-threshold=10 - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// This is a test for deoptimization infrastructure and to reproduce the -// failure from bug 5442338. - -main() { - warmup(); - runTest(); -} - -// Create a situation where method 'call' is optimized for using class A -// when calling foo. -warmup() { - List a = [new A(), new A(), new A(), new A()]; - var res = 0; - for (int i = 0; i < 20; i++) { - res = call(a, 0); - } - Expect.equals(10, res); -} - -// Create a situation where several optimized frames of 'call' are on stack -// when deoptimization occurs because B.foo is called. After the first -// deoptimization, several optimized frames of 'call' are still on stack and -// some of them will be deoptimized. -runTest() { - List a = [new A(), new A(), new B(), new A(), new B(), new B()]; - var res = call(a, 0); - Expect.equals(35, res); -} - -// This method will be optimized for using class A when calling 'foo' and -// later will be deoptimized because B.foo is required. -call(List a, int n) { - if (n < a.length) { - var sum = call(a, n + 1); - for (int i = n; i < a.length; i++) { - sum += a[i].foo(); - } - return sum; - } - return 0; -} - -class A { - foo() { - return 1; - } -} - -class B { - foo() { - return 2; - } -} diff --git a/tests/language_2/optimize/hoisting_checked_mode_assert_test.dart b/tests/language_2/optimize/hoisting_checked_mode_assert_test.dart deleted file mode 100644 index 12e1c71e81e..00000000000 --- a/tests/language_2/optimize/hoisting_checked_mode_assert_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012, 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. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test checked mode assertions inside loops. - -int foo(x, n) { - double z = 0.0; - for (var i = 0; i < n; i++) { - double z = x; - } - return 0; -} - -main() { - for (var i = 0; i < 20; i++) foo(1.0, 10); - Expect.equals(0, foo(1.0, 10)); - Expect.equals(0, foo(2, 0)); // Must not throw in checked mode. -} diff --git a/tests/language_2/optimize/inferrer_closure_test.dart b/tests/language_2/optimize/inferrer_closure_test.dart deleted file mode 100644 index 2eaa3027a44..00000000000 --- a/tests/language_2/optimize/inferrer_closure_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to not see a closure could be -// invoked through a getter access followed by an invocation. - -var closure = (Object a) => a.toString(); - -get foo => closure; - -main() { - if (foo(42) != '42') { - throw 'Test failed'; - } -} diff --git a/tests/language_2/optimize/inferrer_constructor2_test.dart b/tests/language_2/optimize/inferrer_constructor2_test.dart deleted file mode 100644 index 3db6e2207df..00000000000 --- a/tests/language_2/optimize/inferrer_constructor2_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to optimistically infer the -// wrong types for fields because of generative constructors being -// inlined. - -import "package:expect/expect.dart"; - -class A { - var foo; - var bar; - - @pragma('vm:never-inline') - @pragma('dart2js:noInline') - A() { - // Currently defeat inlining by using a closure. - bar = () => 42; - foo = 54; - } - A.inline(); -} - -main() { - // Make sure A's constructor is analyzed first by surrounding the - // body by two allocations. - new A(); - bar(); - new A(); -} - -class B { - var bar; - var closure; - @pragma('vm:never-inline') - @pragma('dart2js:noInline') - B() { - // Currently defeat inlining by using a closure. - closure = () => 42; - bar = new A().foo; - } -} - -@pragma('vm:never-inline') -@pragma('dart2js:noInline') -bar() { - // Make sure B's constructor is analyzed first by surrounding the - // body by two allocations. - new B(); - // Currently defeat inlining by using a closure. - Expect.throwsNoSuchMethodError(() => new A.inline().foo + 42); - codegenLast(); - new B(); -} - -@pragma('vm:never-inline') -@pragma('dart2js:noInline') -codegenLast() { - // This assignment currently defeats simple type inference, but not - // the optimistic inferrer. - new A().foo = new B().bar; - // Currently defeat inlining by using a closure. - new B().closure = () => 42; -} diff --git a/tests/language_2/optimize/inferrer_constructor3_test.dart b/tests/language_2/optimize/inferrer_constructor3_test.dart deleted file mode 100644 index 4c37e33a20f..00000000000 --- a/tests/language_2/optimize/inferrer_constructor3_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to optimistically infer the -// wrong types for fields because of generative constructors being -// inlined. - -import "package:expect/expect.dart"; - -class A { - var field; - A(this.field); -} - -dynamic c = () => new List.filled(42, null)[0]; - -main() { - bar(); - // Defeat type inferencing. - new A(c()); - doIt(); - bar(); -} - -@pragma('vm:never-inline') -@pragma('dart2js:noInline') -doIt() { - () => 42; - var c = new A(null); - Expect.throwsNoSuchMethodError(() => c.field + 42); -} - -@pragma('vm:never-inline') -@pragma('dart2js:noInline') -bar() { - () => 42; - return inlineLevel1(); -} - -inlineLevel1() { - return inlineLevel2(); -} - -inlineLevel2() { - return inlineLevel3(); -} - -inlineLevel3() { - return inlineLevel4(); -} - -inlineLevel4() { - return new A(42); -} diff --git a/tests/language_2/optimize/inferrer_constructor4_test.dart b/tests/language_2/optimize/inferrer_constructor4_test.dart deleted file mode 100644 index 223ac4a8b05..00000000000 --- a/tests/language_2/optimize/inferrer_constructor4_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -escape(object) { - print(object.field + 42); -} - -class A { - A() { - escape(this); - } -} - -class B extends A { - var field; - B() { - field = 42; - } -} - -main() { - Expect.throwsNoSuchMethodError(() => new B()); -} diff --git a/tests/language_2/optimize/inferrer_constructor5_runtime_test.dart b/tests/language_2/optimize/inferrer_constructor5_runtime_test.dart deleted file mode 100644 index 85b718a65b7..00000000000 --- a/tests/language_2/optimize/inferrer_constructor5_runtime_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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 "package:expect/expect.dart"; - -class A { - A() { - - } -} - -class B extends A { - var field; - B() { - field = 42; - } -} - -main() { - -} diff --git a/tests/language_2/optimize/inferrer_constructor5_test.dart b/tests/language_2/optimize/inferrer_constructor5_test.dart deleted file mode 100644 index 6ba164bcf3f..00000000000 --- a/tests/language_2/optimize/inferrer_constructor5_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A { - A() { - print(field + 42); - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER - // [cfe] The getter 'field' isn't defined for the class 'A'. - } -} - -class B extends A { - var field; - B() { - field = 42; - } -} - -main() { - Expect.throwsNoSuchMethodError(() => new B()); -} diff --git a/tests/language_2/optimize/inferrer_constructor_test.dart b/tests/language_2/optimize/inferrer_constructor_test.dart deleted file mode 100644 index 980a9473850..00000000000 --- a/tests/language_2/optimize/inferrer_constructor_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that dart2js type inferrer detects dead code. - -import "package:expect/expect.dart"; - -class A { - var field; - A(test) { - if (test) { - return; - field = 42; - } else { - field = 54; - } - } -} - -main() { - var a = new A(true); - Expect.throwsNoSuchMethodError(() => a.field + 42); -} diff --git a/tests/language_2/optimize/inferrer_named_parameter_test.dart b/tests/language_2/optimize/inferrer_named_parameter_test.dart deleted file mode 100644 index fd95b33f2f9..00000000000 --- a/tests/language_2/optimize/inferrer_named_parameter_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js's type inferrer, that used to not -// correctly infer optional named parameters. - -import "package:expect/expect.dart"; - -@pragma('vm:never-inline') -@pragma('dart2js:noInline') -foo({path}) { - () => 42; - return path; -} - -main() { - foo(path: '42'); - Expect.isFalse(foo() is String); -} diff --git a/tests/language_2/optimize/inferrer_synthesized_constructor_test.dart b/tests/language_2/optimize/inferrer_synthesized_constructor_test.dart deleted file mode 100644 index 876befd8446..00000000000 --- a/tests/language_2/optimize/inferrer_synthesized_constructor_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js's type inferrer that used to not -// propagate default types in synthesized calls. - -import "package:expect/expect.dart"; - -class A { - final x; - A([this.x = 'foo']); -} - -class B extends A { - // The synthesized constructor was not saying that it would call - // [A]'s constructor with its default type. -} - -main() { - // By calling [B]'s constructor with an int parameter, the inferrer - // used to only see this call and consider the [A.x] field to always - // be int. - Expect.equals(84, new A(42).x + 42); - Expect.throwsTypeError(() => new B().x + 42); -} diff --git a/tests/language_2/optimize/inferrer_synthesized_super_constructor2_test.dart b/tests/language_2/optimize/inferrer_synthesized_super_constructor2_test.dart deleted file mode 100644 index 7b7bc356099..00000000000 --- a/tests/language_2/optimize/inferrer_synthesized_super_constructor2_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 - -bool inConstructor = false; - -class A { - A._() { - inConstructor = true; - } -} - -class B extends A { - B() : super._(); -} - -main() { - new B(); - if (!inConstructor) throw 'Test failed'; -} diff --git a/tests/language_2/optimize/inferrer_synthesized_super_constructor_test.dart b/tests/language_2/optimize/inferrer_synthesized_super_constructor_test.dart deleted file mode 100644 index 8b686aec72e..00000000000 --- a/tests/language_2/optimize/inferrer_synthesized_super_constructor_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 - -class A { - @pragma('vm:never-inline') - @pragma('dart2js:noInline') - A([a]) { - () => 42; - if (a != null) throw 'Test failed'; - } -} - -class B extends A { - B(); -} - -main() { - new B(); -} diff --git a/tests/language_2/optimize/inferrer_this_access_test.dart b/tests/language_2/optimize/inferrer_this_access_test.dart deleted file mode 100644 index 2c9c1317fec..00000000000 --- a/tests/language_2/optimize/inferrer_this_access_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A { - var fisk; - A() { - // dart2js's inferrer used to not recognize the following call to - // be on [this]. - fisk--; - fisk = 42; - } -} - -abstract class B { - var a; - B() { - hest = 54; - a = 42; - } - set hest(value); -} - -class C extends B { - set hest(value) { - a + 42; - } -} - -main() { - Expect.throwsNoSuchMethodError(() => new A()); - Expect.throwsNoSuchMethodError(() => new C()); -} diff --git a/tests/language_2/optimize/inline_add_constants_to_initial_env_test.dart b/tests/language_2/optimize/inline_add_constants_to_initial_env_test.dart deleted file mode 100644 index 04e90c6b593..00000000000 --- a/tests/language_2/optimize/inline_add_constants_to_initial_env_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2012, 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. -// Test that SSA values are correctly numbered after inlining that adds -// constants to original environment. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -h(x, y) => x == y; - -g(y, [x0 = 0, x1 = 1, x2 = 2, x3 = 3]) => y + x0 + x1 + x2 + x3; - -f(y) => h(y, g(y)); - -main() { - for (var i = 0; i < 20; i++) f(i); -} diff --git a/tests/language_2/optimize/inline_argument_test.dart b/tests/language_2/optimize/inline_argument_test.dart deleted file mode 100644 index 9ef9919e705..00000000000 --- a/tests/language_2/optimize/inline_argument_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2012, 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. -// Test that when inlining A.foo, we're not evaluating the argument -// twice. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - var field = 0; - - foo(b) { - Expect.equals(0, b); - Expect.equals(0, b); - } - - bar() { - foo(field++); - } -} - -main() { - var a = new A(); - a.bar(); - Expect.equals(1, a.field); -} diff --git a/tests/language_2/optimize/inline_closure_with_constant_arguments_test.dart b/tests/language_2/optimize/inline_closure_with_constant_arguments_test.dart deleted file mode 100644 index c72511d7a68..00000000000 --- a/tests/language_2/optimize/inline_closure_with_constant_arguments_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012, 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. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test inlining of a closure call with constant propagation. -primeForSmis(bool b) { - smi_op(a, b) => a + b; - if (b) { - return smi_op(1, 2); - } else { - return smi_op(true, false); - } -} - -main() { - for (var i = 0; i < 20; i++) { - Expect.equals(3, primeForSmis(true)); - } -} diff --git a/tests/language_2/optimize/inline_conditional_test.dart b/tests/language_2/optimize/inline_conditional_test.dart deleted file mode 100644 index 00766fd34f1..00000000000 --- a/tests/language_2/optimize/inline_conditional_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js. There was a bug in the variable -// allocator when a pure (side-effect free) instruction stand -// in-between an inlined `if` and its inlined expression. - -import "package:expect/expect.dart"; - -var topLevel; - -// Make [foo] an inlineable expression with a return type check. -Function foo(c) { - // Use [c] twice to make sure it is stored in a local. - return (c is Function ? null : c); -} - -bar() { - var b = new Object(); - f() { - // Inside a closure, locals that escape are stored in a closure - // class. By using [b] in both branches, the optimizers will move - // the fetching of [b] before the `if`. This puts the fetching - // instruction in between the `if` and the expression of the `if`. - // This instruction being pure, the variable allocator was dealing - // with it in a special way. - // - // Because the expression in the `if` is being recognized by the - // optimizers as being also a JavaScript expression, we do not - // allocate a name for it. But some expressions that it uses still - // can have a name, and our variable allocator did not handle live - // variables due to the inlining of the ternary expression in [foo]. - if (foo(topLevel) == null) { - return b.toString(); - } else { - return b.hashCode; - } - } - - return f(); -} - -main() { - // Make sure the inferrer does not get an exact type for [topLevel]. - topLevel = new Object(); - topLevel = main; - var res = bar(); - Expect.isTrue(res is String); -} diff --git a/tests/language_2/optimize/inline_effect_context_test.dart b/tests/language_2/optimize/inline_effect_context_test.dart deleted file mode 100644 index df085faf77f..00000000000 --- a/tests/language_2/optimize/inline_effect_context_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2012, 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. -// Test inlining of simple function with control flow in an effect context. -// Optimize function foo with instance of A and inlined function bar. Call later -// with instance of B and cause deoptimization. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - var x = 1; -} - -class B { - var x = 0; -} - -int bar(o) { - if (o.x > 0) { - // <-- Deoptimize from inner frame. - return 1; - } else { - return 0; - } -} - -int foo(o) { - bar(o); // <-- Used in an effect context. - return 1; -} - -main() { - dynamic o = new A(); - int sum = 0; - for (int i = 0; i < 20; i++) sum += foo(o); - o = new B(); - sum += foo(o); // <-- Cause deoptimization of bar within foo. - Expect.equals(21, sum); -} diff --git a/tests/language_2/optimize/inline_getter_test.dart b/tests/language_2/optimize/inline_getter_test.dart deleted file mode 100644 index a46d36139ec..00000000000 --- a/tests/language_2/optimize/inline_getter_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// 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. -// Test inlining of instance getters. -// Three classes access always the same field. Optimize method foo and inline -// getter for classes 'A' and 'B'. Call later via 'C' and cause deoptimization. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - int f; - A(this.f) {} - int foo() { - return f; // <-- inline getter for classes 'A' and 'B'. - } -} - -class B extends A { - B() : super(2) {} -} - -class C extends A { - C() : super(10) {} -} - -class InlineGetterTest { - static testMain() { - var a = new A(1); - var b = new B(); - int sum = 0; - for (int i = 0; i < 20; i++) { - sum += a.foo(); - sum += b.foo(); - } - var c = new C(); - sum += c.foo(); // <-- Deoptimizing. - Expect.equals(70, sum); - } -} - -main() { - InlineGetterTest.testMain(); -} diff --git a/tests/language_2/optimize/inline_in_for_initializer_and_bailout_test.dart b/tests/language_2/optimize/inline_in_for_initializer_and_bailout_test.dart deleted file mode 100644 index 21f86833b73..00000000000 --- a/tests/language_2/optimize/inline_in_for_initializer_and_bailout_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -dynamic a = 42; - -inlineMe() { - // Add control flow to confuse the compiler. - if (a is int) { - print('a is int'); - } - return a[0]; -} - -main() { - a = [42]; - // Make [main] recursive to force a bailout version. - if (false) main(); - int i = 0; - for (i = inlineMe(); i < 42; i++); - Expect.equals(42, i); -} diff --git a/tests/language_2/optimize/inline_super_field_lib.dart b/tests/language_2/optimize/inline_super_field_lib.dart deleted file mode 100644 index d3f232aa89e..00000000000 --- a/tests/language_2/optimize/inline_super_field_lib.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2013, 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 inline_super_field_lib; - -// The comment is inserted to ensure that the offset of [bar] is not within -// the length of the [:inline_super_field_test.dart] script. -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ - -var i = 0; - -class M1 { - final bar = ++i; -} diff --git a/tests/language_2/optimize/inline_super_field_test.dart b/tests/language_2/optimize/inline_super_field_test.dart deleted file mode 100644 index 3b4d8f32ec5..00000000000 --- a/tests/language_2/optimize/inline_super_field_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that source maps use the correct compilation unit when super class -// fields from another compilation unit are inlined. - -library inline_super_field_test; - -import 'package:expect/expect.dart'; -import "inline_super_field_lib.dart"; - -class S {} - -class C extends S with M1 {} - -void main() { - var c = new C(); - Expect.equals(1, c.bar); -} diff --git a/tests/language_2/optimize/inline_super_part.dart b/tests/language_2/optimize/inline_super_part.dart deleted file mode 100644 index 9708bb7abdd..00000000000 --- a/tests/language_2/optimize/inline_super_part.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2012, 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 - -part of inline_super_test; - -class Player extends LivingActor { - Player() : super(); -} diff --git a/tests/language_2/optimize/inline_super_test.dart b/tests/language_2/optimize/inline_super_test.dart deleted file mode 100644 index 876fee41b20..00000000000 --- a/tests/language_2/optimize/inline_super_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2012, 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 - -// Regression test for dart2js issue 6639. - -library inline_super_test; - -import "package:expect/expect.dart"; - -part 'inline_super_part.dart'; - -// Long comment to ensure source positions in the following code are -// larger than the part file. Best way to ensure that is to include -// the part as a comment: -// -// class Player extends LivingActor { -// Player (deathCallback) : super(null, deathCallback); -// } - -class Percept {} - -class Actor { - final percept; - Actor(this.percept); -} - -class LivingActor extends Actor { - // The bug occurs when inlining the node [:new Percept():] into - // [Actor]'s constructor. When this inlining is being initiated - // from [Player], we must take care to ensure that we know that we - // are inlining from this location, and not [Player]. - LivingActor() : super(new Percept()); -} - -main() { - Expect.isTrue(new Player().percept is Percept); -} diff --git a/tests/language_2/optimize/inline_test.dart b/tests/language_2/optimize/inline_test.dart deleted file mode 100644 index 8420bc3ecdc..00000000000 --- a/tests/language_2/optimize/inline_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to produce a non-valid SSA -// graph when inlining within a loop. - -class X { - void x(a, b) { - do { - if (identical(a, b)) { - break; - } - } while (p(a, b)); - } - - bool p(a, b) { - return identical(a, b); - } -} - -main() { - var x = new X(); - x.x(1, 2); -} diff --git a/tests/language_2/optimize/inline_test_context_test.dart b/tests/language_2/optimize/inline_test_context_test.dart deleted file mode 100644 index 2c111836e83..00000000000 --- a/tests/language_2/optimize/inline_test_context_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2012, 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. -// Test inlining of simple function with control flow in a test context. -// Optimize function foo with instance of A and inlined function bar. Call later -// with instance of B and cause deoptimization. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - var x = 1; -} - -class B { - var x = 0; -} - -bool bar(o) { - if (o.x > 0) { - // <-- Deoptimize from inner frame. - return true; - } else { - return false; - } -} - -int foo(o) { - if (bar(o)) { - // <-- Used in a test context. - return 1; - } else { - return 0; - } -} - -main() { - dynamic o = new A(); - int sum = 0; - for (int i = 0; i < 20; i++) sum += foo(o); - o = new B(); - sum += foo(o); // <-- Cause deoptimization of bar within foo. - Expect.equals(20, sum); -} diff --git a/tests/language_2/optimize/inline_throw_test.dart b/tests/language_2/optimize/inline_throw_test.dart deleted file mode 100644 index 9b6ca2a4a2d..00000000000 --- a/tests/language_2/optimize/inline_throw_test.dart +++ /dev/null @@ -1,305 +0,0 @@ -// Copyright (c) 2013, 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 - -// Dart test program to test check that we don't fail to compile when an -// inlinable method contains a throw. - -import 'package:expect/expect.dart'; - -dynamic x = false; - -bool called; - -bool callMeTrue() { - called = true; - return true; -} - -bool callMeFalse() { - called = true; - return false; -} - -void callMe() { - called = true; -} - -testCallThenThrow(fn) { - called = false; - Expect.throws(() => fn()); - Expect.isTrue(called); -} - -testCall(fn) { - called = false; - fn(); - Expect.isTrue(called); -} - -testNoThrow(fn) { - called = false; - Expect.throws(() => fn()); - Expect.isFalse(called); -} - -kast(x) { - throw x; -} - -ternary(a, b, c) { - if (x == 2) throw "ternary"; -} - -hest() => kast("hest"); -hest2() { - return kast("hest2"); -} - -foo() => true || kast("foo"); -bar() => false || kast("foo"); -barc() => callMeTrue() || kast("foo"); -barCallThrow() => callMeFalse() || kast("foo"); -baz(x) => x ? kast("baz") : 0; -bazc() => callMeFalse() ? kast("baz") : 0; -bazCallThrow() => callMeTrue() ? kast("baz") : 0; -fizz(x) => x ? 0 : kast("baz"); -fizzc() => callMeTrue() ? 0 : kast("baz"); -fizzCallThrow() => callMeFalse() ? 0 : kast("baz"); -fuzz() => kast("baz") ? 0 : 1; -farce() => !kast("baz"); -unary() => ~(kast("baz")); -boo() { - callMe(); - x = kast("boo"); -} - -yo() { - throw kast("yo"); -} - -bin() { - return 5 * kast("bin"); -} - -binCallThrow() { - return (callMe() as dynamic) * kast("binct"); -} - -hoo() { - x[kast("hoo")] = 0; - x[kast("hoo")]; - kast("hoo").x = 0; - kast("hoo").x; -} - -switcheroo() { - switch (kast("switcheroo")) { - case 0: - boo(); - } -} - -class ThrowConstructor { - ThrowConstructor() - : foo = callMeTrue(), - bar = kast("ThrowConstructor") { - called = false; - } - - bool foo; - var bar; -} - -throwConstructor() { - called = false; - return new ThrowConstructor(); -} - -cascade() { - return []..add(callMeTrue())..add(kast("cascade")); -} - -interpole() => "inter${kast('tada!')}pole"; -interpoleCallThrow() => "inter${callMeTrue()}...${kast('tada!')}pole"; - -call1() => ternary(0, kast("call1"), 1); -call2() => ternary(kast("call2"), 0, 1); -call3() => ternary(0, 1, kast("call3")); -call1c() => ternary(callMe() as dynamic, kast("call1"), 1); -call3c() => ternary(callMeTrue(), 1, kast("call3")); -call4c() => ternary(0, callMeTrue(), kast("call3")); - -sendSet() { - var x = kast("sendSet"); -} - -sendSetCallThrow() { - var x = callMe() as dynamic, y = kast("sendSet"); -} - -isSend() => kast("isSend") is int; - -vile() { - while (kast("vile")) { - callMe(); - } -} - -dovile() { - var x = 0; - do { - callMe(); - x = 1; - } while (kast("vile")); - print(x); -} - -dovileBreak() { - var x = 0; - do { - callMe(); - x = 1; - break; - } while (kast("vile")); - return (x); -} - -dovileContinue() { - var x = 0; - do { - callMe(); - x = 1; - continue; - } while (kast("vile")); - return (x); -} - -dovileBreakContinue(x) { - do { - callMe(); - if (x == 1) break; - continue; - } while (kast("vile")); - return (x); -} - -faar1() { - callMe(); - for (kast("faar"); called = false; called = false) { - called = false; - } -} - -faar2() { - for (callMe(); kast("faar"); called = false) { - called = false; - } -} - -faar3() { - for (; true; kast("faar")) { - callMe(); - } - called = false; -} - -faar4() { - callMe(); - for (kast("faar"); called = false; called = false) { - called = false; - continue; - } -} - -faar5() { - for (callMe(); kast("faar"); called = false) { - called = false; - continue; - } -} - -faar6() { - for (; true; kast("faar")) { - callMe(); - continue; - } - called = false; -} - -faar7() { - callMe(); - for (kast("faar"); called = false; called = false) { - called = false; - break; - } -} - -faar8() { - for (callMe(); kast("faar"); called = false) { - called = false; - break; - } -} - -faar9() { - for (; true; kast("faar")) { - callMe(); - break; - called = false; - } -} - -main() { - Expect.throws(hest); - Expect.throws(hest2); - foo(); - Expect.throws(bar); - testCall(barc); - testCallThenThrow(barCallThrow); - Expect.equals(0, baz(false)); - Expect.throws(() => baz(true)); - testCall(bazc); - testCallThenThrow(bazCallThrow); - Expect.throws(() => fizz(false)); - testCall(fizzc); - testCallThenThrow(fizzCallThrow); - Expect.throws(fuzz); - Expect.throws(farce); - Expect.throws(unary); - testCallThenThrow(boo); - Expect.throws(yo); - Expect.throws(bin); - testCallThenThrow(binCallThrow); - Expect.throws(hoo); - Expect.throws(switcheroo); - Expect.throws(interpole); - testCallThenThrow(interpoleCallThrow); - Expect.throws(call1); - Expect.throws(call2); - Expect.throws(call3); - testCallThenThrow(call1c); - testCallThenThrow(call3c); - testCallThenThrow(call4c); - Expect.throws(sendSet); - testCallThenThrow(sendSetCallThrow); - Expect.throws(isSend); - testNoThrow(vile); - testCallThenThrow(dovile); - testCall(dovileBreak); - testCallThenThrow(dovileContinue); - testCallThenThrow(throwConstructor); - testCallThenThrow(cascade); - dovileBreakContinue(1); - testCallThenThrow(faar1); - testCallThenThrow(faar2); - testCallThenThrow(faar3); - testCallThenThrow(faar4); - testCallThenThrow(faar5); - testCallThenThrow(faar6); - testCallThenThrow(faar7); - testCallThenThrow(faar8); - testCall(faar9); -} diff --git a/tests/language_2/optimize/inline_value_context_test.dart b/tests/language_2/optimize/inline_value_context_test.dart deleted file mode 100644 index b876bfb7b6e..00000000000 --- a/tests/language_2/optimize/inline_value_context_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2012, 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. -// Test inlining of simple function with control flow in a value context. -// Optimize function foo with instance of A and inlined function bar. Call later -// with instance of B and cause deoptimization. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - var x = 1; -} - -class B { - var x = 0; -} - -int bar(o) { - if (o.x > 0) { - // <-- Deoptimize from inner frame. - return 1; - } else { - return 0; - } -} - -int foo(o) { - if (bar(o) > 0) { - // <-- Used in a value context. - return 1; - } else { - return 0; - } -} - -main() { - dynamic o = new A(); - int sum = 0; - for (int i = 0; i < 20; i++) sum += foo(o); - o = new B(); - sum += foo(o); // <-- Cause deoptimization of bar within foo. - Expect.equals(20, sum); -} diff --git a/tests/language_2/optimize/isempty_test.dart b/tests/language_2/optimize/isempty_test.dart deleted file mode 100644 index 08ad4d383f7..00000000000 --- a/tests/language_2/optimize/isempty_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr - -// @dart = 2.9 - -// Test optimization and polymorphic inlining of String.isEmpty. - -import "package:expect/expect.dart"; - -test(s) => s.isEmpty; - -main() { - var x = "abc"; - var y = [123, 12345, 765]; - Expect.equals(false, test(x)); - Expect.equals(false, test(y)); - for (var i = 0; i < 20; i++) test(x); - Expect.equals(false, test(x)); - Expect.equals(false, test(y)); -} diff --git a/tests/language_2/optimize/licm2_test.dart b/tests/language_2/optimize/licm2_test.dart deleted file mode 100644 index 4ad53930811..00000000000 --- a/tests/language_2/optimize/licm2_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that a loop invariant code motion optimization does not try to -// hoist instructions that may throw. - -import "package:expect/expect.dart"; - -var a = 42; -var b; - -main() { - Expect.throws(() { - while (true) { - a = 54; - b.length; - } - }); - b = []; - Expect.equals(54, a); -} diff --git a/tests/language_2/optimize/licm3_test.dart b/tests/language_2/optimize/licm3_test.dart deleted file mode 100644 index 15f916cfbd2..00000000000 --- a/tests/language_2/optimize/licm3_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that a loop invariant code motion optimization correctly hoists -// instructions that may cause deoptimization. - -import "package:expect/expect.dart"; - -foo(o) { - var r = 0; - for (var i = 0; i < 3; i++) { - r += o.z; - } - return r; -} - -class A { - var z = 3; -} - -main() { - var a = new A(); - for (var i = 0; i < 10000; i++) foo(a); - Expect.equals(9, foo(a)); - Expect.throws(() => foo(42)); - for (var i = 0; i < 10000; i++) foo(a); - Expect.throws(() => foo(42)); -} diff --git a/tests/language_2/optimize/licm_test.dart b/tests/language_2/optimize/licm_test.dart deleted file mode 100644 index 3be61450ac1..00000000000 --- a/tests/language_2/optimize/licm_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -var sum = 0; -var foo = 0; -var bar = 1; - -test() { - while (true) { - if (0 == foo) { - sum += 2; - if (1 == bar) { - sum += 3; - break; - } - break; - } - } -} - -main() { - test(); - Expect.equals(5, sum); -} diff --git a/tests/language_2/optimize/lists_test.dart b/tests/language_2/optimize/lists_test.dart deleted file mode 100644 index 8c5fc38df46..00000000000 --- a/tests/language_2/optimize/lists_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2012, 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. -// Test program for correct optimizations related to types fo allocated lists. -// VMOptions=--optimization-counter-threshold=10 - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - // Trigger optimization of 'test' method. - for (int i = 0; i < 20; i++) { - test(2); - } -} - -test(n) { - var a = []; // Growable list. - var b = new List.filled(10, null); // Fixed size list. - var c = const [1, 2, 3, 4]; // Constant aray. - // In optimized mode the class checks will be eliminated since the - // constructors above provide information about exact types. - a.add(4); - b[0] = 5; - Expect.equals(4, a[0]); - Expect.equals(5, b[0]); - // Test bound check elimination. - Expect.equals(2, c[1]); - // Test elimination of array length computation. - var v = c[n]; - Expect.equals(v, c[n]); -} diff --git a/tests/language_2/optimize/osr_test.dart b/tests/language_2/optimize/osr_test.dart deleted file mode 100644 index a88b88960a2..00000000000 --- a/tests/language_2/optimize/osr_test.dart +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2014, 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. -// VMOptions=--optimization-counter-threshold=20 --no-background-compilation -// Test correct OSR (issue 16151). - -// @dart = 2.9 - -import "dart:collection"; -import "package:expect/expect.dart"; - -List create([int length]) { - return new MyList(length); -} - -main() { - test(create); -} - -class MyList extends ListBase { - List _list; - - MyList([int length]) - : _list = (length == null ? [] : new List.filled(length, null)); - - E operator [](int index) => _list[index]; - - void operator []=(int index, E value) { - _list[index] = value; - } - - int get length => _list.length; - - void set length(int newLength) { - _list.length = newLength; - } -} - -test(List create([int length])) { - sort_A01_t02_test(create); -} - -// From library co19 sort_A01_t02. - -sort_A01_t02_test(List create([int length])) { - int c(var a, var b) { - return a < b ? -1 : (a == b ? 0 : 1); - } - - int maxlen = 7; - int prevLength = 0; - for (int length = 1; length < maxlen; ++length) { - // Check that we are making progress. - if (prevLength == length) { - // Cannot use Expect.notEquals since it hides the bug. - throw "No progress made"; - } - prevLength = length; - List a = create(length); - List expected = create(length); - for (int i = 0; i < length; ++i) { - expected[i] = i; - a[i] = i; - } - - void swap(int i, int j) { - var t = a[i]; - a[i] = a[j]; - a[j] = t; - } - - void check() { - return; - // Deleting the code below will throw a RangeError instead of throw above. - var a_copy = new List.filled(length, null); - a_copy.setRange(0, length, a); - a_copy.sort(c); - } - - void permute(int n) { - if (n == 1) { - check(); - } else { - for (int i = 0; i < n; i++) { - permute(n - 1); - if (n % 2 == 1) { - swap(0, n - 1); - } else { - swap(i, n - 1); - } - } - } - } //void permute - - permute(length); - } //for i in 0..length -} // test diff --git a/tests/language_2/optimize/phi_merge_test.dart b/tests/language_2/optimize/phi_merge_test.dart deleted file mode 100644 index 4f0ac2635a3..00000000000 --- a/tests/language_2/optimize/phi_merge_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to crash on this code. - -class A { - operator []=(index, value) { - switch (value) { - case 42: - break; - case 43: - break; - } - } -} - -main() { - // Make [a] a phi. - var a; - if (true) { - a = new A(); - } else { - a = new A(); - } - // `A[]=` being inlined, the compiler was confused when merging the - // phis after the switch. - a[0] = 42; - - // Use [a] to provoke the crash. - print(a); -} diff --git a/tests/language_2/optimize/pure_function2_test.dart b/tests/language_2/optimize/pure_function2_test.dart deleted file mode 100644 index fb593cf56d3..00000000000 --- a/tests/language_2/optimize/pure_function2_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -// Regression test for issue 17483. - -confuse(x) { - if (new DateTime.now().millisecondsSinceEpoch == 42) return confuse(x); - return x; -} - -foo(trace) { - trace.add("foo"); - return "foo"; -} - -bar(trace) { - trace.add("bar"); - return "bar"; -} - -main() { - var f = confuse(foo); - var b = confuse(bar); - - var trace = []; - // Dart2js must keep the order of t1 and t2. - var t1 = f(trace); - var t2 = b(trace); - var t3 = identical(t2, "foo"); - trace.add(t1); - trace.add(t3); - trace.add(t3); - Expect.listEquals(["foo", "bar", "foo", false, false], trace); -} diff --git a/tests/language_2/optimize/pure_function_test.dart b/tests/language_2/optimize/pure_function_test.dart deleted file mode 100644 index 9d555d2b47b..00000000000 --- a/tests/language_2/optimize/pure_function_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -// Regression test for issue 17483. - -class A { - var x, y; - A(x, this.y) { - this.x = x; - } - toString() => "a"; -} - -foo(trace) => trace.add("foo"); -bar(trace) => trace.add("bar"); - -main() { - var trace = []; - // Dart2js must keep the order of t1 and t2. - var t1 = foo(trace); - var t2 = bar(trace); - // Dart2js inlines the constructor, yielding something like: - // t3 = jsNew A(null, t2); // Note that jsNew is pure. - // t3.x = t1; - // t3 is used twice and cannot be generated at use site. - // Dart2js must not allow t1 to cross the t3-line. - var a = new A(t1, t2); - // Use a. It is already implicitly used by the this.x = x line in its - // constructor. With the following use we use it twice and make sure that - // the allocation can not be generated at use-site. - trace.add(a.toString()); - Expect.listEquals(["foo", "bar", "a"], trace); -} diff --git a/tests/language_2/optimize/redundant_array_load_test.dart b/tests/language_2/optimize/redundant_array_load_test.dart deleted file mode 100644 index eb89df61d16..00000000000 --- a/tests/language_2/optimize/redundant_array_load_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2012, 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. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test optimization of redundant array loads. - -var A = [0, 2, 3]; - -test1(a) { - int x = a[0]; - int y = a[1]; - ++a[0]; - return a[0] + y + a[2]; -} - -int test2(a) { - return a[2] + a[2]; -} - -main() { - for (int i = 0; i < 20; i++) { - test1(A); - test2(A); - } - Expect.equals(26, test1(A)); - Expect.equals(6, test2(A)); -} diff --git a/tests/language_2/optimize/setter_test.dart b/tests/language_2/optimize/setter_test.dart deleted file mode 100644 index 682dab8d143..00000000000 --- a/tests/language_2/optimize/setter_test.dart +++ /dev/null @@ -1,157 +0,0 @@ -// 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. -// Test various setter situations, testing special cases in optimizing compiler. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - int field = 0; -} - -class B extends A {} - -void sameImplicitSetter() { - oneTarget(var a, var v) { - a.field = v; - } - - A a = new A(); - B b = new B(); - // Optimize 'oneTarget' for one class, one target. - for (int i = 0; i < 20; i++) { - oneTarget(a, 5); - Expect.equals(5, a.field); - } - // Deoptimize 'oneTarget', since class B is not expected. - oneTarget(b, 6); - Expect.equals(6, b.field); - // Optimize 'oneTarget' for A and B classes, one target. - for (int i = 0; i < 20; i++) { - oneTarget(a, 7); - Expect.equals(7, a.field); - } - oneTarget(b, 8); - Expect.equals(8, b.field); -} - -// Deoptimize when no feedback exists. -void setterNoFeedback() { - maybeSet(var a, var v, bool set_it) { - if (set_it) { - return a.field = v; - } - return -1; - } - - A a = new A(); - for (int i = 0; i < 20; i++) { - var r = maybeSet(a, 5, false); - Expect.equals(0, a.field); - Expect.equals(-1, r); - } - var r = maybeSet(a, 5, true); - Expect.equals(5, a.field); - Expect.equals(5, r); - for (int i = 0; i < 20; i++) { - var r = maybeSet(a, 6, true); - Expect.equals(6, a.field); - Expect.equals(6, r); - } -} - -// Check non-implicit setter -class X { - int pField = 0; - set field(v) { - pField = v; - } - - get field => 10; -} - -void sameNotImplicitSetter() { - oneTarget(var a, var v) { - return a.field = v; - } - - incField(var a) { - a.field++; - } - - X x = new X(); - for (int i = 0; i < 20; i++) { - var r = oneTarget(x, 3); - Expect.equals(3, x.pField); - Expect.equals(3, r); - } - oneTarget(x, 0); - for (int i = 0; i < 20; i++) { - incField(x); - } - Expect.equals(11, x.pField); -} - -class Y { - int field = 0; -} - -multiImplicitSetter() { - oneTarget(var a, var v) { - return a.field = v; - } - - // Both classes 'Y' and 'A' have a distinct field getter. - A a = new A(); - Y y = new Y(); - for (int i = 0; i < 20; i++) { - var r = oneTarget(a, 5); - Expect.equals(5, a.field); - Expect.equals(5, r); - r = oneTarget(y, 6); - Expect.equals(6, y.field); - Expect.equals(6, r); - } -} - -class Z { - int pField = 0; - set field(v) { - pField = v; - } - - get field => 10; -} - -multiNotImplicitSetter() { - oneTarget(var a, var v) { - return a.field = v; - } - - Y y = new Y(); - Z z = new Z(); - for (int i = 0; i < 20; i++) { - var r = oneTarget(y, 8); - Expect.equals(8, y.field); - Expect.equals(8, r); - r = oneTarget(z, 12); - Expect.equals(12, z.pField); - Expect.equals(12, r); - } - A a = new A(); - var r = oneTarget(a, 11); - Expect.equals(11, a.field); - Expect.equals(11, r); -} - -void main() { - sameImplicitSetter(); - setterNoFeedback(); - sameNotImplicitSetter(); - - multiImplicitSetter(); - multiNotImplicitSetter(); -} diff --git a/tests/language_2/optimize/string_charat_test.dart b/tests/language_2/optimize/string_charat_test.dart deleted file mode 100644 index fd26f796292..00000000000 --- a/tests/language_2/optimize/string_charat_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2012, 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. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test optimized [] on strings. - -var a = "abc"; -var b = "øbc"; -var c = new String.fromCharCodes([123, 456, 789]); - -test_charat(s, i) { - return s[i]; -} - -test_const_str(i) { - return "abc"[i]; -} - -test_const_index(s) { - return s[0]; -} - -test_const_index2(s) { - return s[3]; -} - -main() { - Expect.equals("a", test_charat(a, 0)); - for (var i = 0; i < 20; i++) test_charat(a, 0); - Expect.equals("a", test_charat(a, 0)); - Expect.equals("b", test_charat(a, 1)); - Expect.equals("c", test_charat(a, 2)); - Expect.throws(() => test_charat(a, 3)); - - Expect.equals("a", test_const_str(0)); - for (var i = 0; i < 20; i++) test_const_str(0); - Expect.equals("a", test_const_str(0)); - Expect.equals("b", test_const_str(1)); - Expect.equals("c", test_const_str(2)); - Expect.throws(() => test_const_str(3)); - - Expect.equals("a", test_const_index(a)); - for (var i = 0; i < 20; i++) test_const_index(a); - Expect.equals("a", test_const_index(a)); - Expect.equals("ø", test_const_index(b)); - Expect.equals(new String.fromCharCodes([123]), test_const_index(c)); - Expect.throws(() => test_const_index2(a)); - - Expect.equals("ø", test_charat(b, 0)); - for (var i = 0; i < 20; i++) test_charat(b, 0); - Expect.equals("ø", test_charat(b, 0)); - Expect.equals("b", test_charat(b, 1)); - Expect.equals("c", test_charat(b, 2)); - Expect.throws(() => test_charat(b, 3)); - - Expect.equals(new String.fromCharCodes([123]), test_charat(c, 0)); - for (var i = 0; i < 20; i++) test_charat(c, 0); - Expect.equals(new String.fromCharCodes([123]), test_charat(c, 0)); - Expect.equals(new String.fromCharCodes([456]), test_charat(c, 1)); - Expect.equals(new String.fromCharCodes([789]), test_charat(c, 2)); - Expect.throws(() => test_charat(c, 3)); -} diff --git a/tests/language_2/optimize/string_charcodeat_test.dart b/tests/language_2/optimize/string_charcodeat_test.dart deleted file mode 100644 index e4205a8cb1c..00000000000 --- a/tests/language_2/optimize/string_charcodeat_test.dart +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2012, 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. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -// Test optimized CodeUnitAt and array access. - -import "package:expect/expect.dart"; - -String one_byte = "hest"; -String two_byte = "h\u{2029}ns"; - -int testOneByteCodeUnitAt(String x, int j) { - int test() { - return x.codeUnitAt(j); - } - - for (int i = 0; i < 20; i++) test(); - return test(); -} - -int testTwoByteCodeUnitAt(String x, int j) { - int test() { - return x.codeUnitAt(j); - } - - for (int i = 0; i < 20; i++) test(); - return test(); -} - -int testConstantStringCodeUnitAt(int j) { - int test() { - return "høns".codeUnitAt(j); - } - - for (int i = 0; i < 20; i++) test(); - return test(); -} - -int testConstantIndexCodeUnitAt(String x) { - int test() { - return x.codeUnitAt(1); - } - - for (int i = 0; i < 20; i++) test(); - return test(); -} - -int testOneByteCodeUnitAtInLoop(var x) { - var result = 0; - for (int i = 0; i < x.length; i++) { - result += x.codeUnitAt(i); - } - return result; -} - -int testTwoByteCodeUnitAtInLoop(var x) { - var result = 0; - for (int i = 0; i < x.length; i++) { - result += x.codeUnitAt(i); - } - return result; -} - -main() { - for (int j = 0; j < 10; j++) { - Expect.equals(101, testOneByteCodeUnitAt(one_byte, 1)); - Expect.equals(8233, testTwoByteCodeUnitAt(two_byte, 1)); - Expect.equals(248, testConstantStringCodeUnitAt(1)); - Expect.equals(101, testConstantIndexCodeUnitAt(one_byte)); - } - for (int j = 0; j < 20; j++) { - Expect.equals(436, testOneByteCodeUnitAtInLoop(one_byte)); - Expect.equals(8562, testTwoByteCodeUnitAtInLoop(two_byte)); - } - Expect.throws(() => testOneByteCodeUnitAtInLoop(123)); - Expect.throws(() => testTwoByteCodeUnitAtInLoop(123)); -} diff --git a/tests/language_2/override/const_field_test.dart b/tests/language_2/override/const_field_test.dart deleted file mode 100644 index f988ee0283c..00000000000 --- a/tests/language_2/override/const_field_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// 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. -// Dart test checking that static/instance field shadowing do not conflict. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -class A { - final field; - const A(this.field); -} - -class B extends A { - final field; - const B(this.field, fieldA) : super(fieldA); - get fieldA => super.field; -} - -main() { - const b = B(1, 2); - Expect.equals(1, b.field); - Expect.equals(2, b.fieldA); -} diff --git a/tests/language_2/override/field_method1_test.dart b/tests/language_2/override/field_method1_test.dart deleted file mode 100644 index bb0cd319bd2..00000000000 --- a/tests/language_2/override/field_method1_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Overriding field with method. - -class A { - var foo; -} - -class B extends A { - foo() {} -//^^^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_METHOD_AND_FIELD -// [cfe] Can't declare a member that conflicts with an inherited one. -} - -main() { - B().foo(); -} diff --git a/tests/language_2/override/field_method2_test.dart b/tests/language_2/override/field_method2_test.dart deleted file mode 100644 index 6a51724fd0f..00000000000 --- a/tests/language_2/override/field_method2_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Overriding getter with method. - -class A { - get foo => 123; -} - -class B extends A { - foo() {} -//^^^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_METHOD_AND_FIELD -// [cfe] Can't declare a member that conflicts with an inherited one. -} - -main() { - B().foo(); -} diff --git a/tests/language_2/override/field_method3_test.dart b/tests/language_2/override/field_method3_test.dart deleted file mode 100644 index 9c9a5dca0f6..00000000000 --- a/tests/language_2/override/field_method3_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Overriding method with field. - -class A { - foo() {} -} - -class B extends A { - var foo; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_FIELD_AND_METHOD - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -main() { - B().foo; -} diff --git a/tests/language_2/override/field_method4_test.dart b/tests/language_2/override/field_method4_test.dart deleted file mode 100644 index 57510ff0cd5..00000000000 --- a/tests/language_2/override/field_method4_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Overriding method with getter. - -class A { - foo() => 999; -} - -class B extends A { - get foo => 123; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_FIELD_AND_METHOD - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -main() { - B().foo; -} diff --git a/tests/language_2/override/field_test.dart b/tests/language_2/override/field_test.dart deleted file mode 100644 index c1657a217ad..00000000000 --- a/tests/language_2/override/field_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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 test checking that static/instance field shadowing do not conflict. - -// @dart = 2.9 - -class A { - int instanceFieldInA; - static int staticFieldInA; -} - -class B extends A { - static int instanceFieldInA; // //# 01: compile-time error - int staticFieldInA; // //# 02: ok - static int staticFieldInA; // //# 03: ok -} - -main() { - var x = new B(); -} diff --git a/tests/language_2/override/inheritance_abstract_runtime_1_test.dart b/tests/language_2/override/inheritance_abstract_runtime_1_test.dart deleted file mode 100644 index 7fc7af01326..00000000000 --- a/tests/language_2/override/inheritance_abstract_runtime_1_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -abstract class A { - method1(); - - - - - - - - - - - - -} - -abstract class I { - - - - - - - - - - - - - - - - - -} - -abstract class J { - - - -} - -class Class extends A implements I, J { - method1() {} - - - - - - - - - - - - - -} - -main() { - new Class(); -} diff --git a/tests/language_2/override/inheritance_abstract_runtime_2_test.dart b/tests/language_2/override/inheritance_abstract_runtime_2_test.dart deleted file mode 100644 index 4bada81ecb9..00000000000 --- a/tests/language_2/override/inheritance_abstract_runtime_2_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -abstract class A { - - method5(); - - - - - - - - - - - -} - -abstract class I { - - - - - - - - - - - - - - - - - -} - -abstract class J { - - - -} - -class Class extends A implements I, J { - - - - - method5() {} - - - - - - - - - -} - -main() { - new Class(); -} diff --git a/tests/language_2/override/inheritance_abstract_runtime_3_test.dart b/tests/language_2/override/inheritance_abstract_runtime_3_test.dart deleted file mode 100644 index becf2221229..00000000000 --- a/tests/language_2/override/inheritance_abstract_runtime_3_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -abstract class A { - - - method6(); - - - - - - - - - - -} - -abstract class I { - - - - - - - - - - - - - - - - - -} - -abstract class J { - - - -} - -class Class extends A implements I, J { - - - - - - method6([a]) {} - - - - - - - - -} - -main() { - new Class(); -} diff --git a/tests/language_2/override/inheritance_abstract_runtime_4_test.dart b/tests/language_2/override/inheritance_abstract_runtime_4_test.dart deleted file mode 100644 index 9a05e06d1df..00000000000 --- a/tests/language_2/override/inheritance_abstract_runtime_4_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -abstract class A { - - - - - - - - - - - - method18() {} - -} - -abstract class I { - - - - - - - - - method18() {} - - - - - - - - -} - -abstract class J { - - - -} - -class Class extends A implements I, J { - - - - - - - - - - - - - - -} - -main() { - new Class(); -} diff --git a/tests/language_2/override/inheritance_abstract_runtime_5_test.dart b/tests/language_2/override/inheritance_abstract_runtime_5_test.dart deleted file mode 100644 index 42fd0ae2c3b..00000000000 --- a/tests/language_2/override/inheritance_abstract_runtime_5_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -abstract class A { - - - - - - - - - - - - - method27() {} -} - -abstract class I { - - - - - - - - - - - - - - - - - -} - -abstract class J { - - - -} - -class Class extends A implements I, J { - - - - - - - - - - - - - - method27(); -} - -main() { - new Class(); -} diff --git a/tests/language_2/override/inheritance_abstract_runtime_6_test.dart b/tests/language_2/override/inheritance_abstract_runtime_6_test.dart deleted file mode 100644 index 644ab0daf90..00000000000 --- a/tests/language_2/override/inheritance_abstract_runtime_6_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -abstract class A { - - - - - - - - - - - - - -} - -abstract class I { - - - - - - method15() {} - - - - - - - - - - - -} - -abstract class J { - - - -} - -class Class extends A implements I, J { - - - - - - - - - method15() {} - - - - - -} - -main() { - new Class(); -} diff --git a/tests/language_2/override/inheritance_abstract_runtime_7_test.dart b/tests/language_2/override/inheritance_abstract_runtime_7_test.dart deleted file mode 100644 index 878d9b007f9..00000000000 --- a/tests/language_2/override/inheritance_abstract_runtime_7_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -abstract class A { - - - - - - - - - - - - - -} - -abstract class I { - - - - - - - method16() {} - - - - - - - - - - -} - -abstract class J { - - - -} - -class Class extends A implements I, J { - - - - - - - - - - method16([a]) {} - - - - -} - -main() { - new Class(); -} diff --git a/tests/language_2/override/inheritance_abstract_runtime_test.dart b/tests/language_2/override/inheritance_abstract_runtime_test.dart deleted file mode 100644 index a1113886a68..00000000000 --- a/tests/language_2/override/inheritance_abstract_runtime_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -abstract class A { - - - - - - - - - - - - - -} - -abstract class I { - - - - - - - - - - - - - - - - - -} - -abstract class J { - - - -} - -class Class extends A implements I, J { - - - - - - - - - - - - - - -} - -main() { - new Class(); -} diff --git a/tests/language_2/override/inheritance_abstract_test.dart b/tests/language_2/override/inheritance_abstract_test.dart deleted file mode 100644 index 858cb0ab8a3..00000000000 --- a/tests/language_2/override/inheritance_abstract_test.dart +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2014, 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 - -abstract class A { - method1(); - method5(); - method6(); - method7(); - get getter8; - set setter9(_); - method10(); - get getter11; - set setter12(_); - get field13; - set field14(_); - method18() {} - method27() {} -} - -abstract class I { - method10() {} - get getter11 => 0; - set setter12(_) {} - var field13; - var field14; - method15() {} - method16() {} - method17() {} - method18() {} - var member19; - var member20; - var member21; - get member22 => 0; - set member23(_) {} - var member24; - var field25; - var member26; -} - -abstract class J { - get member20 => null; - set member20(_) {} - var member21; -} - -class Class extends A implements I, J { -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER -// [cfe] The non-abstract class 'Class' is missing implementations for these members: - method1() {} - method2(); -//^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER - get getter3; -//^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER - set setter4(_); -//^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER - method5() {} - method6([a]) {} - set field13(_) {} - get field14 => 0; - method15() {} - method16([a]) {} - get member24 => 0; - final field25 = 0; - set member26(_) {} - method27(); -} - -main() { - new Class(); -} diff --git a/tests/language_2/override/inheritance_field_test.dart b/tests/language_2/override/inheritance_field_test.dart deleted file mode 100644 index 456a54726f1..00000000000 --- a/tests/language_2/override/inheritance_field_test.dart +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) 2014, 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 - -class A { - get getter1 => null; //# 01: ok - num get getter2 => null; //# 02: ok - num get getter3 => null; //# 03: ok - int get getter4 => null; //# 04: compile-time error - int get getter5 => null; //# 05: compile-time error - int get getter6 => null; //# 06: compile-time error - int get getter7 => null; //# 07: compile-time error - int get getter8 => null; //# 08: compile-time error - - set setter1(_) => null; //# 21: ok - void set setter2(_) {} //# 22: ok - set setter3(_) => null; //# 23: ok - set setter4(_) => null; //# 24: ok - set setter5(num _) => null; //# 25: ok - set setter6(num _) => null; //# 26: compile-time error - set setter7(int _) => null; //# 27: ok - set setter8(int _) => null; //# 28: compile-time error - set setter9(int _) => null; //# 29: compile-time error - set setter10(int _) => null; //# 30: compile-time error - set setter11(int _) => null; //# 31: compile-time error - - int field1; //# 41: ok - num field2; //# 42: compile-time error - int field3; //# 43: compile-time error - int field4; //# 44: compile-time error - int field5; //# 45: compile-time error - num field6; //# 46: ok - num field7; //# 47: compile-time error - num get field8 => null; //# 48: compile-time error - num field9; //# 49: compile-time error - num field10; //# 50: compile-time error - set field11(int _) {} //# 51: ok - void set field12(int _) {} //# 52: ok - num field13; //# 53: compile-time error - set field14(num _) {} //# 54: compile-time error - num field15; //# 55: ok -} - -class B extends A { - num get getter6 => null; //# 06: continued - set setter9(num _) => null; //# 29: continued - num field5; //# 45: continued -} - -abstract class I { - num get getter7 => null; //# 07: continued - String get getter8 => null; //# 08: continued - int get getter9 => null; //# 09: compile-time error - int get getter10 => null; //# 10: compile-time error - int get getter11 => null; //# 11: compile-time error - set setter10(num _) => null; //# 30: continued - set setter11(String _) => null; //# 31: continued - set setter12(int _) => null; //# 32: compile-time error - set setter13(int _) => null; //# 33: compile-time error - set setter13(num _) => null; //# 33a: compile-time error - set setter14(int _) => null; //# 34: compile-time error -} - -abstract class J { - String get getter9 => null; //# 09: continued - num get getter10 => null; //# 10: continued - num get getter11 => null; //# 11: continued - set setter12(String _) => null; //# 32: continued - set setter13(num _) => null; //# 33: continued - set setter13(int _) => null; //# 33a: continued - set setter14(num _) => null; //# 34: continued -} - -abstract class Class extends B implements I, J { - get getter1 => null; //# 01: continued - num get getter2 => null; //# 02: continued - int get getter3 => null; //# 03: continued - num get getter4 => null; //# 04: continued - double get getter5 => null; //# 05: continued - double get getter6 => null; //# 06: continued - double get getter7 => null; //# 07: continued - double get getter8 => null; //# 08: continued - double get getter9 => null; //# 09: continued - - set setter1(_) => null; //# 21: continued - set setter2(_) => null; //# 22: continued - void set setter3(_) {} //# 23: continued - void set setter4(_) {} //# 24: continued - set setter5(num _) => null; //# 25: continued - set setter6(int _) => null; //# 26: continued - set setter7(num _) => null; //# 27: continued - set setter8(double _) => null; //# 28: continued - set setter9(double _) => null; //# 29: continued - set setter10(double _) => null; //# 30: continued - set setter11(double _) => null; //# 31: continued - set setter12(double _) => null; //# 32: continued - - int field1; //# 41: continued - int field2; //# 42: continued - num field3; //# 43: continued - double field4; //# 44: continued - double field5; //# 45: continued - int get field6 => null; //# 46: continued - String get field7 => null; //# 47: continued - String field8; //# 48: continued - set field9(int _) {} //# 49: continued - void set field10(int _) {} //# 50: continued - num field11; //# 51: continued - num field12; //# 52: continued - set field13(String _) {} //# 53: continued - String field14; //# 54: continued - set field15(covariant int _) {} //# 55: continued -} - -class SubClass extends Class { - double get getter10 => null; //# 10: continued - String get getter11 => null; //# 11: continued - set setter13(double _) => null; //# 33: continued - set setter13(double _) => null; //# 33a: continued - set setter14(String _) => null; //# 34: continued -} - -main() { - new SubClass(); -} diff --git a/tests/language_2/override/inheritance_generic_test.dart b/tests/language_2/override/inheritance_generic_test.dart deleted file mode 100644 index 43d6e9d4947..00000000000 --- a/tests/language_2/override/inheritance_generic_test.dart +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2014, 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 - -class A { - void method1(T t) => null; //# 01: ok - void method2(T t) => null; //# 02: compile-time error - void method4(T t) => null; //# 04: compile-time error - void method5(T t) => null; //# 05: ok - void method7(T t) => null; //# 07: compile-time error -} - -class B extends A - //# 01: continued - //# 02: continued - //# 04: continued - //# 05: continued -{ - void method1(S s) => null; //# 01: continued - void method2(int i) => null; //# 02: continued - void method3(S s) => null; //# 03: ok - void method4(int i) => null; //# 04: continued - void method6(S s) => null; //# 06: compile-time error -} - -abstract class I { - void method3(U u) => null; //# 03: continued - void method6(U u) => null; //# 06: continued - void method7(U u) => null; //# 07: continued - void method8(U u) => null; //# 08: compile-time error - void method9(U u) => null; //# 09: compile-time error - void method10(U u) => null; //# 10: compile-time error -} - -abstract class J { - void method8(V v) => null; //# 08: continued - void method9(V v) => null; //# 09: continued - void method10(V v) => null; //# 10: continued -} - -abstract class Class extends B - //# 03: continued - //# 05: continued - //# 06: continued - //# 07: continued - implements - I - //# 03: continued - //# 06: continued - //# 07: continued - //# 08: continued - //# 09: continued - //# 10: continued - , - J - //# 08: continued - //# 09: continued - //# 10: continued -{ - void method3(num i) => null; //# 03: continued - void method5(W w) => null; //# 05: continued - void method6(int i) => null; //# 06: continued - void method7(double d) => null; //# 07: continued - void method8(double d) => null; //# 08: continued -} - -class SubClass extends Class { - void method9(double d) => null; //# 09: continued - void method10(String s) => null; //# 10: continued -} - -main() { - new SubClass(); -} diff --git a/tests/language_2/override/inheritance_method2_test.dart b/tests/language_2/override/inheritance_method2_test.dart deleted file mode 100644 index 1dfad11e31f..00000000000 --- a/tests/language_2/override/inheritance_method2_test.dart +++ /dev/null @@ -1,1114 +0,0 @@ -// Copyright (c) 2018, 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() { - new C(); -} - -class A { - method1(covariant dynamic a) => null; //# 001: ok - method2(covariant dynamic a) => null; //# 002: ok - method3(covariant dynamic a) => null; //# 003: ok - method4(covariant dynamic a) => null; //# 004: ok - method5(covariant dynamic a) => null; //# 005: ok - method6(covariant dynamic a) => null; //# 006: ok - method7(covariant dynamic a) => null; //# 007: ok - method8(covariant dynamic a) => null; //# 008: ok - method9(covariant dynamic a) => null; //# 009: ok - method10(covariant dynamic a) => null; //# 010: ok - method11(covariant dynamic a) => null; //# 011: ok - method12(covariant dynamic a) => null; //# 012: compile-time error - method13(covariant dynamic a) => null; //# 013: ok - method14(covariant dynamic a) => null; //# 014: ok - method15(covariant dynamic a) => null; //# 015: ok - method16(covariant dynamic a) => null; //# 016: compile-time error - method17(covariant dynamic a) => null; //# 017: ok - method18(covariant dynamic a) => null; //# 018: ok - method19(covariant dynamic a) => null; //# 019: ok - method20(covariant dynamic a) => null; //# 020: compile-time error - method21(covariant dynamic a) => null; //# 021: ok - method22(covariant dynamic a) => null; //# 022: ok - method23(covariant dynamic a) => null; //# 023: ok - method24(covariant dynamic a) => null; //# 024: compile-time error - method25(covariant dynamic a) => null; //# 025: ok - method26(covariant dynamic a) => null; //# 026: compile-time error - method27(covariant dynamic a) => null; //# 027: compile-time error - method28(covariant dynamic a) => null; //# 028: ok - method29(covariant dynamic a) => null; //# 029: ok - method30(covariant dynamic a) => null; //# 030: compile-time error - method31(covariant dynamic a) => null; //# 031: compile-time error - method32(covariant dynamic a) => null; //# 032: ok - method33(covariant dynamic a) => null; //# 033: ok - method34(covariant dynamic a) => null; //# 034: ok - method35(covariant dynamic a) => null; //# 035: ok - method36(covariant dynamic a) => null; //# 036: ok - method37(covariant dynamic a) => null; //# 037: ok - method38(covariant dynamic a) => null; //# 038: ok - method39(covariant dynamic a) => null; //# 039: ok - method40(covariant dynamic a) => null; //# 040: ok - method41(covariant dynamic a) => null; //# 041: ok - method42(covariant dynamic a) => null; //# 042: ok - method43(covariant dynamic a) => null; //# 043: ok - method44(covariant dynamic a) => null; //# 044: compile-time error - method45(covariant dynamic a) => null; //# 045: ok - method46(covariant dynamic a) => null; //# 046: ok - method47(covariant dynamic a) => null; //# 047: ok - method48(covariant dynamic a) => null; //# 048: compile-time error - method49(covariant dynamic a) => null; //# 049: ok - method50(covariant dynamic a) => null; //# 050: ok - method51(covariant dynamic a) => null; //# 051: ok - method52(covariant dynamic a) => null; //# 052: compile-time error - method53(covariant dynamic a) => null; //# 053: ok - method54(covariant dynamic a) => null; //# 054: ok - method55(covariant dynamic a) => null; //# 055: ok - method56(covariant dynamic a) => null; //# 056: compile-time error - method57(covariant dynamic a) => null; //# 057: ok - method58(covariant dynamic a) => null; //# 058: compile-time error - method59(covariant dynamic a) => null; //# 059: compile-time error - method60(covariant dynamic a) => null; //# 060: ok - method61(covariant dynamic a) => null; //# 061: ok - method62(covariant dynamic a) => null; //# 062: compile-time error - method63(covariant dynamic a) => null; //# 063: compile-time error - method64(covariant dynamic a) => null; //# 064: ok - method65(covariant num a) => null; //# 065: ok - method66(covariant num a) => null; //# 066: ok - method67(covariant num a) => null; //# 067: ok - method68(covariant num a) => null; //# 068: compile-time error - method69(covariant num a) => null; //# 069: ok - method70(covariant num a) => null; //# 070: ok - method71(covariant num a) => null; //# 071: ok - method72(covariant num a) => null; //# 072: compile-time error - method73(covariant num a) => null; //# 073: ok - method74(covariant num a) => null; //# 074: ok - method75(covariant num a) => null; //# 075: ok - method76(covariant num a) => null; //# 076: compile-time error - method77(covariant num a) => null; //# 077: ok - method78(covariant num a) => null; //# 078: ok - method79(covariant num a) => null; //# 079: ok - method80(covariant num a) => null; //# 080: compile-time error - method81(covariant num a) => null; //# 081: ok - method82(covariant num a) => null; //# 082: ok - method83(covariant num a) => null; //# 083: ok - method84(covariant num a) => null; //# 084: compile-time error - method85(covariant num a) => null; //# 085: ok - method86(covariant num a) => null; //# 086: ok - method87(covariant num a) => null; //# 087: ok - method88(covariant num a) => null; //# 088: compile-time error - method89(covariant num a) => null; //# 089: compile-time error - method90(covariant num a) => null; //# 090: ok - method91(covariant num a) => null; //# 091: ok - method92(covariant num a) => null; //# 092: ok - method93(covariant num a) => null; //# 093: compile-time error - method94(covariant num a) => null; //# 094: ok - method95(covariant num a) => null; //# 095: ok - method96(covariant num a) => null; //# 096: ok - method97(covariant num a) => null; //# 097: compile-time error - method98(covariant num a) => null; //# 098: ok - method99(covariant num a) => null; //# 099: ok - method100(covariant num a) => null; //# 100: ok - method101(covariant num a) => null; //# 101: compile-time error - method102(covariant num a) => null; //# 102: ok - method103(covariant num a) => null; //# 103: ok - method104(covariant num a) => null; //# 104: ok - method105(covariant num a) => null; //# 105: compile-time error - method106(covariant num a) => null; //# 106: ok - method107(covariant num a) => null; //# 107: ok - method108(covariant num a) => null; //# 108: ok - method109(covariant num a) => null; //# 109: compile-time error - method110(covariant num a) => null; //# 110: ok - method111(covariant num a) => null; //# 111: ok - method112(covariant num a) => null; //# 112: ok - method113(covariant num a) => null; //# 113: compile-time error - method114(covariant num a) => null; //# 114: compile-time error - method115(covariant int a) => null; //# 115: ok - method116(covariant int a) => null; //# 116: ok - method117(covariant int a) => null; //# 117: ok - method118(covariant int a) => null; //# 118: compile-time error - method119(covariant int a) => null; //# 119: ok - method120(covariant int a) => null; //# 120: ok - method121(covariant int a) => null; //# 121: ok - method122(covariant int a) => null; //# 122: compile-time error - method123(covariant int a) => null; //# 123: ok - method124(covariant int a) => null; //# 124: ok - method125(covariant int a) => null; //# 125: ok - method126(covariant int a) => null; //# 126: compile-time error - method127(covariant int a) => null; //# 127: ok - method128(covariant int a) => null; //# 128: ok - method129(covariant int a) => null; //# 129: ok - method130(covariant int a) => null; //# 130: compile-time error - method131(covariant int a) => null; //# 131: ok - method132(covariant int a) => null; //# 132: ok - method133(covariant int a) => null; //# 133: ok - method134(covariant int a) => null; //# 134: compile-time error - method135(covariant int a) => null; //# 135: ok - method136(covariant int a) => null; //# 136: ok - method137(covariant int a) => null; //# 137: ok - method138(covariant int a) => null; //# 138: compile-time error - method139(covariant int a) => null; //# 139: compile-time error - method140(covariant int a) => null; //# 140: ok - method141(covariant int a) => null; //# 141: ok - method142(covariant int a) => null; //# 142: ok - method143(covariant int a) => null; //# 143: compile-time error - method144(covariant int a) => null; //# 144: ok - method145(covariant int a) => null; //# 145: ok - method146(covariant int a) => null; //# 146: ok - method147(covariant int a) => null; //# 147: compile-time error - method148(covariant int a) => null; //# 148: ok - method149(covariant int a) => null; //# 149: ok - method150(covariant int a) => null; //# 150: ok - method151(covariant int a) => null; //# 151: compile-time error - method152(covariant int a) => null; //# 152: ok - method153(covariant int a) => null; //# 153: ok - method154(covariant int a) => null; //# 154: ok - method155(covariant int a) => null; //# 155: compile-time error - method156(covariant int a) => null; //# 156: ok - method157(covariant int a) => null; //# 157: ok - method158(covariant int a) => null; //# 158: ok - method159(covariant int a) => null; //# 159: compile-time error - method160(covariant int a) => null; //# 160: ok - method161(covariant int a) => null; //# 161: ok - method162(covariant int a) => null; //# 162: ok - method163(covariant int a) => null; //# 163: compile-time error - method164(covariant int a) => null; //# 164: compile-time error - method165(covariant String a) => null; //# 165: ok - method166(covariant String a) => null; //# 166: compile-time error - method167(covariant String a) => null; //# 167: compile-time error - method168(covariant String a) => null; //# 168: ok - method169(covariant String a) => null; //# 169: ok - method170(covariant String a) => null; //# 170: compile-time error - method171(covariant String a) => null; //# 171: compile-time error - method172(covariant String a) => null; //# 172: ok - method173(covariant String a) => null; //# 173: compile-time error - method174(covariant String a) => null; //# 174: compile-time error - method175(covariant String a) => null; //# 175: ok - method176(covariant String a) => null; //# 176: compile-time error - method177(covariant String a) => null; //# 177: compile-time error - method178(covariant String a) => null; //# 178: ok - method179(covariant String a) => null; //# 179: ok - method180(covariant String a) => null; //# 180: compile-time error - method181(covariant String a) => null; //# 181: compile-time error - method182(covariant String a) => null; //# 182: ok - method183(covariant String a) => null; //# 183: ok - method184(covariant String a) => null; //# 184: compile-time error - method185(covariant String a) => null; //# 185: compile-time error - method186(covariant String a) => null; //# 186: ok - method187(covariant String a) => null; //# 187: ok - method188(covariant String a) => null; //# 188: compile-time error - method189(covariant String a) => null; //# 189: compile-time error - method190(covariant String a) => null; //# 190: ok - method191(covariant String a) => null; //# 191: compile-time error - method192(covariant String a) => null; //# 192: compile-time error - method193(covariant String a) => null; //# 193: ok - method194(covariant String a) => null; //# 194: compile-time error - method195(covariant String a) => null; //# 195: compile-time error - method196(covariant String a) => null; //# 196: ok - method197(covariant String a) => null; //# 197: ok - method198(covariant String a) => null; //# 198: compile-time error - method199(covariant String a) => null; //# 199: compile-time error - method200(covariant String a) => null; //# 200: ok - method201(dynamic a) => null; //# 201: ok - method202(dynamic a) => null; //# 202: ok - method203(dynamic a) => null; //# 203: ok - method204(dynamic a) => null; //# 204: ok - method205(dynamic a) => null; //# 205: ok - method206(dynamic a) => null; //# 206: ok - method207(dynamic a) => null; //# 207: ok - method208(dynamic a) => null; //# 208: ok - method209(dynamic a) => null; //# 209: ok - method210(dynamic a) => null; //# 210: ok - method211(dynamic a) => null; //# 211: ok - method212(dynamic a) => null; //# 212: compile-time error - method213(dynamic a) => null; //# 213: ok - method214(dynamic a) => null; //# 214: ok - method215(dynamic a) => null; //# 215: ok - method216(dynamic a) => null; //# 216: compile-time error - method217(dynamic a) => null; //# 217: ok - method218(dynamic a) => null; //# 218: ok - method219(dynamic a) => null; //# 219: ok - method220(dynamic a) => null; //# 220: compile-time error - method221(dynamic a) => null; //# 221: ok - method222(dynamic a) => null; //# 222: ok - method223(dynamic a) => null; //# 223: ok - method224(dynamic a) => null; //# 224: compile-time error - method225(dynamic a) => null; //# 225: ok - method226(dynamic a) => null; //# 226: compile-time error - method227(dynamic a) => null; //# 227: compile-time error - method228(dynamic a) => null; //# 228: ok - method229(dynamic a) => null; //# 229: ok - method230(dynamic a) => null; //# 230: compile-time error - method231(dynamic a) => null; //# 231: compile-time error - method232(dynamic a) => null; //# 232: ok - method233(dynamic a) => null; //# 233: ok - method234(dynamic a) => null; //# 234: ok - method235(dynamic a) => null; //# 235: ok - method236(dynamic a) => null; //# 236: ok - method237(dynamic a) => null; //# 237: ok - method238(dynamic a) => null; //# 238: compile-time error - method239(dynamic a) => null; //# 239: compile-time error - method240(dynamic a) => null; //# 240: compile-time error - method241(dynamic a) => null; //# 241: compile-time error - method242(dynamic a) => null; //# 242: compile-time error - method243(dynamic a) => null; //# 243: compile-time error - method244(num a) => null; //# 244: ok - method245(num a) => null; //# 245: ok - method246(num a) => null; //# 246: ok - method247(num a) => null; //# 247: compile-time error - method248(num a) => null; //# 248: ok - method249(num a) => null; //# 249: ok - method250(num a) => null; //# 250: ok - method251(num a) => null; //# 251: compile-time error - method252(num a) => null; //# 252: ok - method253(num a) => null; //# 253: ok - method254(num a) => null; //# 254: ok - method255(num a) => null; //# 255: compile-time error - method256(num a) => null; //# 256: ok - method257(num a) => null; //# 257: ok - method258(num a) => null; //# 258: ok - method259(num a) => null; //# 259: compile-time error - method260(num a) => null; //# 260: ok - method261(num a) => null; //# 261: ok - method262(num a) => null; //# 262: ok - method263(num a) => null; //# 263: compile-time error - method264(num a) => null; //# 264: ok - method265(num a) => null; //# 265: ok - method266(num a) => null; //# 266: ok - method267(num a) => null; //# 267: compile-time error - method268(num a) => null; //# 268: compile-time error - method269(num a) => null; //# 269: ok - method270(num a) => null; //# 270: ok - method271(num a) => null; //# 271: ok - method272(num a) => null; //# 272: compile-time error - method273(num a) => null; //# 273: ok - method274(num a) => null; //# 274: compile-time error - method275(num a) => null; //# 275: compile-time error - method276(num a) => null; //# 276: compile-time error - method277(num a) => null; //# 277: ok - method278(num a) => null; //# 278: ok - method279(num a) => null; //# 279: ok - method280(num a) => null; //# 280: compile-time error - method281(num a) => null; //# 281: ok - method282(num a) => null; //# 282: ok - method283(num a) => null; //# 283: compile-time error - method284(num a) => null; //# 284: compile-time error - method285(num a) => null; //# 285: compile-time error - method286(num a) => null; //# 286: compile-time error - method287(int a) => null; //# 287: ok - method288(int a) => null; //# 288: ok - method289(int a) => null; //# 289: ok - method290(int a) => null; //# 290: compile-time error - method291(int a) => null; //# 291: ok - method292(int a) => null; //# 292: ok - method293(int a) => null; //# 293: ok - method294(int a) => null; //# 294: compile-time error - method295(int a) => null; //# 295: ok - method296(int a) => null; //# 296: ok - method297(int a) => null; //# 297: ok - method298(int a) => null; //# 298: compile-time error - method299(int a) => null; //# 299: ok - method300(int a) => null; //# 300: ok - method301(int a) => null; //# 301: ok - method302(int a) => null; //# 302: compile-time error - method303(int a) => null; //# 303: ok - method304(int a) => null; //# 304: ok - method305(int a) => null; //# 305: ok - method306(int a) => null; //# 306: compile-time error - method307(int a) => null; //# 307: ok - method308(int a) => null; //# 308: ok - method309(int a) => null; //# 309: ok - method310(int a) => null; //# 310: compile-time error - method311(int a) => null; //# 311: compile-time error - method312(int a) => null; //# 312: ok - method313(int a) => null; //# 313: ok - method314(int a) => null; //# 314: ok - method315(int a) => null; //# 315: compile-time error - method316(int a) => null; //# 316: ok - method317(int a) => null; //# 317: compile-time error - method318(int a) => null; //# 318: compile-time error - method319(int a) => null; //# 319: compile-time error - method320(int a) => null; //# 320: ok - method321(int a) => null; //# 321: ok - method322(int a) => null; //# 322: ok - method323(int a) => null; //# 323: compile-time error - method324(int a) => null; //# 324: ok - method325(int a) => null; //# 325: ok - method326(int a) => null; //# 326: compile-time error - method327(int a) => null; //# 327: compile-time error - method328(int a) => null; //# 328: ok - method329(int a) => null; //# 329: ok - method330(int a) => null; //# 330: ok - method331(int a) => null; //# 331: compile-time error - method332(int a) => null; //# 332: ok - method333(int a) => null; //# 333: ok - method334(int a) => null; //# 334: ok - method335(int a) => null; //# 335: compile-time error - method336(int a) => null; //# 336: compile-time error - method337(String a) => null; //# 337: ok - method338(String a) => null; //# 338: compile-time error - method339(String a) => null; //# 339: compile-time error - method340(String a) => null; //# 340: ok - method341(String a) => null; //# 341: ok - method342(String a) => null; //# 342: compile-time error - method343(String a) => null; //# 343: compile-time error - method344(String a) => null; //# 344: ok - method345(String a) => null; //# 345: compile-time error - method346(String a) => null; //# 346: compile-time error - method347(String a) => null; //# 347: ok - method348(String a) => null; //# 348: compile-time error - method349(String a) => null; //# 349: compile-time error - method350(String a) => null; //# 350: ok - method351(String a) => null; //# 351: ok - method352(String a) => null; //# 352: compile-time error - method353(String a) => null; //# 353: compile-time error - method354(String a) => null; //# 354: ok - method355(String a) => null; //# 355: ok - method356(String a) => null; //# 356: compile-time error - method357(String a) => null; //# 357: compile-time error - method358(String a) => null; //# 358: ok - method359(String a) => null; //# 359: ok - method360(String a) => null; //# 360: compile-time error - method361(String a) => null; //# 361: compile-time error - method362(String a) => null; //# 362: compile-time error - method363(String a) => null; //# 363: compile-time error - method364(String a) => null; //# 364: compile-time error - method365(String a) => null; //# 365: ok - method366(String a) => null; //# 366: compile-time error - method367(String a) => null; //# 367: compile-time error - method368(String a) => null; //# 368: ok - method369(String a) => null; //# 369: ok - method370(String a) => null; //# 370: compile-time error - method371(String a) => null; //# 371: compile-time error - method372(String a) => null; //# 372: ok -} - -class B extends A { - method1(covariant dynamic a) => null; //# 001: continued - method2(covariant dynamic a) => null; //# 002: continued - method3(covariant dynamic a) => null; //# 003: continued - method4(covariant dynamic a) => null; //# 004: continued - method5(covariant dynamic a) => null; //# 005: continued - method6(covariant dynamic a) => null; //# 006: continued - method7(covariant dynamic a) => null; //# 007: continued - method8(covariant dynamic a) => null; //# 008: continued - method9(covariant num a) => null; //# 009: continued - method10(covariant num a) => null; //# 010: continued - method11(covariant num a) => null; //# 011: continued - method12(covariant num a) => null; //# 012: continued - method13(covariant num a) => null; //# 013: continued - method14(covariant num a) => null; //# 014: continued - method15(covariant num a) => null; //# 015: continued - method16(covariant num a) => null; //# 016: continued - method17(covariant int a) => null; //# 017: continued - method18(covariant int a) => null; //# 018: continued - method19(covariant int a) => null; //# 019: continued - method20(covariant int a) => null; //# 020: continued - method21(covariant int a) => null; //# 021: continued - method22(covariant int a) => null; //# 022: continued - method23(covariant int a) => null; //# 023: continued - method24(covariant int a) => null; //# 024: continued - method25(covariant String a) => null; //# 025: continued - method26(covariant String a) => null; //# 026: continued - method27(covariant String a) => null; //# 027: continued - method28(covariant String a) => null; //# 028: continued - method29(covariant String a) => null; //# 029: continued - method30(covariant String a) => null; //# 030: continued - method31(covariant String a) => null; //# 031: continued - method32(covariant String a) => null; //# 032: continued - method33(dynamic a) => null; //# 033: continued - method34(dynamic a) => null; //# 034: continued - method35(dynamic a) => null; //# 035: continued - method36(dynamic a) => null; //# 036: continued - method37(dynamic a) => null; //# 037: continued - method38(dynamic a) => null; //# 038: continued - method39(dynamic a) => null; //# 039: continued - method40(dynamic a) => null; //# 040: continued - method41(num a) => null; //# 041: continued - method42(num a) => null; //# 042: continued - method43(num a) => null; //# 043: continued - method44(num a) => null; //# 044: continued - method45(num a) => null; //# 045: continued - method46(num a) => null; //# 046: continued - method47(num a) => null; //# 047: continued - method48(num a) => null; //# 048: continued - method49(int a) => null; //# 049: continued - method50(int a) => null; //# 050: continued - method51(int a) => null; //# 051: continued - method52(int a) => null; //# 052: continued - method53(int a) => null; //# 053: continued - method54(int a) => null; //# 054: continued - method55(int a) => null; //# 055: continued - method56(int a) => null; //# 056: continued - method57(String a) => null; //# 057: continued - method58(String a) => null; //# 058: continued - method59(String a) => null; //# 059: continued - method60(String a) => null; //# 060: continued - method61(String a) => null; //# 061: continued - method62(String a) => null; //# 062: continued - method63(String a) => null; //# 063: continued - method64(String a) => null; //# 064: continued - method65(covariant dynamic a) => null; //# 065: continued - method66(covariant dynamic a) => null; //# 066: continued - method67(covariant dynamic a) => null; //# 067: continued - method68(covariant dynamic a) => null; //# 068: continued - method69(covariant dynamic a) => null; //# 069: continued - method70(covariant dynamic a) => null; //# 070: continued - method71(covariant dynamic a) => null; //# 071: continued - method72(covariant dynamic a) => null; //# 072: continued - method73(covariant num a) => null; //# 073: continued - method74(covariant num a) => null; //# 074: continued - method75(covariant num a) => null; //# 075: continued - method76(covariant num a) => null; //# 076: continued - method77(covariant num a) => null; //# 077: continued - method78(covariant num a) => null; //# 078: continued - method79(covariant num a) => null; //# 079: continued - method80(covariant num a) => null; //# 080: continued - method81(covariant int a) => null; //# 081: continued - method82(covariant int a) => null; //# 082: continued - method83(covariant int a) => null; //# 083: continued - method84(covariant int a) => null; //# 084: continued - method85(covariant int a) => null; //# 085: continued - method86(covariant int a) => null; //# 086: continued - method87(covariant int a) => null; //# 087: continued - method88(covariant int a) => null; //# 088: continued - method89(covariant String a) => null; //# 089: continued - method90(dynamic a) => null; //# 090: continued - method91(dynamic a) => null; //# 091: continued - method92(dynamic a) => null; //# 092: continued - method93(dynamic a) => null; //# 093: continued - method94(dynamic a) => null; //# 094: continued - method95(dynamic a) => null; //# 095: continued - method96(dynamic a) => null; //# 096: continued - method97(dynamic a) => null; //# 097: continued - method98(num a) => null; //# 098: continued - method99(num a) => null; //# 099: continued - method100(num a) => null; //# 100: continued - method101(num a) => null; //# 101: continued - method102(num a) => null; //# 102: continued - method103(num a) => null; //# 103: continued - method104(num a) => null; //# 104: continued - method105(num a) => null; //# 105: continued - method106(int a) => null; //# 106: continued - method107(int a) => null; //# 107: continued - method108(int a) => null; //# 108: continued - method109(int a) => null; //# 109: continued - method110(int a) => null; //# 110: continued - method111(int a) => null; //# 111: continued - method112(int a) => null; //# 112: continued - method113(int a) => null; //# 113: continued - method114(String a) => null; //# 114: continued - method115(covariant dynamic a) => null; //# 115: continued - method116(covariant dynamic a) => null; //# 116: continued - method117(covariant dynamic a) => null; //# 117: continued - method118(covariant dynamic a) => null; //# 118: continued - method119(covariant dynamic a) => null; //# 119: continued - method120(covariant dynamic a) => null; //# 120: continued - method121(covariant dynamic a) => null; //# 121: continued - method122(covariant dynamic a) => null; //# 122: continued - method123(covariant num a) => null; //# 123: continued - method124(covariant num a) => null; //# 124: continued - method125(covariant num a) => null; //# 125: continued - method126(covariant num a) => null; //# 126: continued - method127(covariant num a) => null; //# 127: continued - method128(covariant num a) => null; //# 128: continued - method129(covariant num a) => null; //# 129: continued - method130(covariant num a) => null; //# 130: continued - method131(covariant int a) => null; //# 131: continued - method132(covariant int a) => null; //# 132: continued - method133(covariant int a) => null; //# 133: continued - method134(covariant int a) => null; //# 134: continued - method135(covariant int a) => null; //# 135: continued - method136(covariant int a) => null; //# 136: continued - method137(covariant int a) => null; //# 137: continued - method138(covariant int a) => null; //# 138: continued - method139(covariant String a) => null; //# 139: continued - method140(dynamic a) => null; //# 140: continued - method141(dynamic a) => null; //# 141: continued - method142(dynamic a) => null; //# 142: continued - method143(dynamic a) => null; //# 143: continued - method144(dynamic a) => null; //# 144: continued - method145(dynamic a) => null; //# 145: continued - method146(dynamic a) => null; //# 146: continued - method147(dynamic a) => null; //# 147: continued - method148(num a) => null; //# 148: continued - method149(num a) => null; //# 149: continued - method150(num a) => null; //# 150: continued - method151(num a) => null; //# 151: continued - method152(num a) => null; //# 152: continued - method153(num a) => null; //# 153: continued - method154(num a) => null; //# 154: continued - method155(num a) => null; //# 155: continued - method156(int a) => null; //# 156: continued - method157(int a) => null; //# 157: continued - method158(int a) => null; //# 158: continued - method159(int a) => null; //# 159: continued - method160(int a) => null; //# 160: continued - method161(int a) => null; //# 161: continued - method162(int a) => null; //# 162: continued - method163(int a) => null; //# 163: continued - method164(String a) => null; //# 164: continued - method165(covariant dynamic a) => null; //# 165: continued - method166(covariant dynamic a) => null; //# 166: continued - method167(covariant dynamic a) => null; //# 167: continued - method168(covariant dynamic a) => null; //# 168: continued - method169(covariant dynamic a) => null; //# 169: continued - method170(covariant dynamic a) => null; //# 170: continued - method171(covariant dynamic a) => null; //# 171: continued - method172(covariant dynamic a) => null; //# 172: continued - method173(covariant num a) => null; //# 173: continued - method174(covariant int a) => null; //# 174: continued - method175(covariant String a) => null; //# 175: continued - method176(covariant String a) => null; //# 176: continued - method177(covariant String a) => null; //# 177: continued - method178(covariant String a) => null; //# 178: continued - method179(covariant String a) => null; //# 179: continued - method180(covariant String a) => null; //# 180: continued - method181(covariant String a) => null; //# 181: continued - method182(covariant String a) => null; //# 182: continued - method183(dynamic a) => null; //# 183: continued - method184(dynamic a) => null; //# 184: continued - method185(dynamic a) => null; //# 185: continued - method186(dynamic a) => null; //# 186: continued - method187(dynamic a) => null; //# 187: continued - method188(dynamic a) => null; //# 188: continued - method189(dynamic a) => null; //# 189: continued - method190(dynamic a) => null; //# 190: continued - method191(num a) => null; //# 191: continued - method192(int a) => null; //# 192: continued - method193(String a) => null; //# 193: continued - method194(String a) => null; //# 194: continued - method195(String a) => null; //# 195: continued - method196(String a) => null; //# 196: continued - method197(String a) => null; //# 197: continued - method198(String a) => null; //# 198: continued - method199(String a) => null; //# 199: continued - method200(String a) => null; //# 200: continued - method201(covariant dynamic a) => null; //# 201: continued - method202(covariant dynamic a) => null; //# 202: continued - method203(covariant dynamic a) => null; //# 203: continued - method204(covariant dynamic a) => null; //# 204: continued - method205(covariant dynamic a) => null; //# 205: continued - method206(covariant dynamic a) => null; //# 206: continued - method207(covariant dynamic a) => null; //# 207: continued - method208(covariant dynamic a) => null; //# 208: continued - method209(covariant num a) => null; //# 209: continued - method210(covariant num a) => null; //# 210: continued - method211(covariant num a) => null; //# 211: continued - method212(covariant num a) => null; //# 212: continued - method213(covariant num a) => null; //# 213: continued - method214(covariant num a) => null; //# 214: continued - method215(covariant num a) => null; //# 215: continued - method216(covariant num a) => null; //# 216: continued - method217(covariant int a) => null; //# 217: continued - method218(covariant int a) => null; //# 218: continued - method219(covariant int a) => null; //# 219: continued - method220(covariant int a) => null; //# 220: continued - method221(covariant int a) => null; //# 221: continued - method222(covariant int a) => null; //# 222: continued - method223(covariant int a) => null; //# 223: continued - method224(covariant int a) => null; //# 224: continued - method225(covariant String a) => null; //# 225: continued - method226(covariant String a) => null; //# 226: continued - method227(covariant String a) => null; //# 227: continued - method228(covariant String a) => null; //# 228: continued - method229(covariant String a) => null; //# 229: continued - method230(covariant String a) => null; //# 230: continued - method231(covariant String a) => null; //# 231: continued - method232(covariant String a) => null; //# 232: continued - method233(dynamic a) => null; //# 233: continued - method234(dynamic a) => null; //# 234: continued - method235(dynamic a) => null; //# 235: continued - method236(dynamic a) => null; //# 236: continued - method237(dynamic a) => null; //# 237: continued - method238(dynamic a) => null; //# 238: continued - method239(dynamic a) => null; //# 239: continued - method240(dynamic a) => null; //# 240: continued - method241(num a) => null; //# 241: continued - method242(int a) => null; //# 242: continued - method243(String a) => null; //# 243: continued - method244(covariant dynamic a) => null; //# 244: continued - method245(covariant dynamic a) => null; //# 245: continued - method246(covariant dynamic a) => null; //# 246: continued - method247(covariant dynamic a) => null; //# 247: continued - method248(covariant dynamic a) => null; //# 248: continued - method249(covariant dynamic a) => null; //# 249: continued - method250(covariant dynamic a) => null; //# 250: continued - method251(covariant dynamic a) => null; //# 251: continued - method252(covariant num a) => null; //# 252: continued - method253(covariant num a) => null; //# 253: continued - method254(covariant num a) => null; //# 254: continued - method255(covariant num a) => null; //# 255: continued - method256(covariant num a) => null; //# 256: continued - method257(covariant num a) => null; //# 257: continued - method258(covariant num a) => null; //# 258: continued - method259(covariant num a) => null; //# 259: continued - method260(covariant int a) => null; //# 260: continued - method261(covariant int a) => null; //# 261: continued - method262(covariant int a) => null; //# 262: continued - method263(covariant int a) => null; //# 263: continued - method264(covariant int a) => null; //# 264: continued - method265(covariant int a) => null; //# 265: continued - method266(covariant int a) => null; //# 266: continued - method267(covariant int a) => null; //# 267: continued - method268(covariant String a) => null; //# 268: continued - method269(dynamic a) => null; //# 269: continued - method270(dynamic a) => null; //# 270: continued - method271(dynamic a) => null; //# 271: continued - method272(dynamic a) => null; //# 272: continued - method273(dynamic a) => null; //# 273: continued - method274(dynamic a) => null; //# 274: continued - method275(dynamic a) => null; //# 275: continued - method276(dynamic a) => null; //# 276: continued - method277(num a) => null; //# 277: continued - method278(num a) => null; //# 278: continued - method279(num a) => null; //# 279: continued - method280(num a) => null; //# 280: continued - method281(num a) => null; //# 281: continued - method282(num a) => null; //# 282: continued - method283(num a) => null; //# 283: continued - method284(num a) => null; //# 284: continued - method285(int a) => null; //# 285: continued - method286(String a) => null; //# 286: continued - method287(covariant dynamic a) => null; //# 287: continued - method288(covariant dynamic a) => null; //# 288: continued - method289(covariant dynamic a) => null; //# 289: continued - method290(covariant dynamic a) => null; //# 290: continued - method291(covariant dynamic a) => null; //# 291: continued - method292(covariant dynamic a) => null; //# 292: continued - method293(covariant dynamic a) => null; //# 293: continued - method294(covariant dynamic a) => null; //# 294: continued - method295(covariant num a) => null; //# 295: continued - method296(covariant num a) => null; //# 296: continued - method297(covariant num a) => null; //# 297: continued - method298(covariant num a) => null; //# 298: continued - method299(covariant num a) => null; //# 299: continued - method300(covariant num a) => null; //# 300: continued - method301(covariant num a) => null; //# 301: continued - method302(covariant num a) => null; //# 302: continued - method303(covariant int a) => null; //# 303: continued - method304(covariant int a) => null; //# 304: continued - method305(covariant int a) => null; //# 305: continued - method306(covariant int a) => null; //# 306: continued - method307(covariant int a) => null; //# 307: continued - method308(covariant int a) => null; //# 308: continued - method309(covariant int a) => null; //# 309: continued - method310(covariant int a) => null; //# 310: continued - method311(covariant String a) => null; //# 311: continued - method312(dynamic a) => null; //# 312: continued - method313(dynamic a) => null; //# 313: continued - method314(dynamic a) => null; //# 314: continued - method315(dynamic a) => null; //# 315: continued - method316(dynamic a) => null; //# 316: continued - method317(dynamic a) => null; //# 317: continued - method318(dynamic a) => null; //# 318: continued - method319(dynamic a) => null; //# 319: continued - method320(num a) => null; //# 320: continued - method321(num a) => null; //# 321: continued - method322(num a) => null; //# 322: continued - method323(num a) => null; //# 323: continued - method324(num a) => null; //# 324: continued - method325(num a) => null; //# 325: continued - method326(num a) => null; //# 326: continued - method327(num a) => null; //# 327: continued - method328(int a) => null; //# 328: continued - method329(int a) => null; //# 329: continued - method330(int a) => null; //# 330: continued - method331(int a) => null; //# 331: continued - method332(int a) => null; //# 332: continued - method333(int a) => null; //# 333: continued - method334(int a) => null; //# 334: continued - method335(int a) => null; //# 335: continued - method336(String a) => null; //# 336: continued - method337(covariant dynamic a) => null; //# 337: continued - method338(covariant dynamic a) => null; //# 338: continued - method339(covariant dynamic a) => null; //# 339: continued - method340(covariant dynamic a) => null; //# 340: continued - method341(covariant dynamic a) => null; //# 341: continued - method342(covariant dynamic a) => null; //# 342: continued - method343(covariant dynamic a) => null; //# 343: continued - method344(covariant dynamic a) => null; //# 344: continued - method345(covariant num a) => null; //# 345: continued - method346(covariant int a) => null; //# 346: continued - method347(covariant String a) => null; //# 347: continued - method348(covariant String a) => null; //# 348: continued - method349(covariant String a) => null; //# 349: continued - method350(covariant String a) => null; //# 350: continued - method351(covariant String a) => null; //# 351: continued - method352(covariant String a) => null; //# 352: continued - method353(covariant String a) => null; //# 353: continued - method354(covariant String a) => null; //# 354: continued - method355(dynamic a) => null; //# 355: continued - method356(dynamic a) => null; //# 356: continued - method357(dynamic a) => null; //# 357: continued - method358(dynamic a) => null; //# 358: continued - method359(dynamic a) => null; //# 359: continued - method360(dynamic a) => null; //# 360: continued - method361(dynamic a) => null; //# 361: continued - method362(dynamic a) => null; //# 362: continued - method363(num a) => null; //# 363: continued - method364(int a) => null; //# 364: continued - method365(String a) => null; //# 365: continued - method366(String a) => null; //# 366: continued - method367(String a) => null; //# 367: continued - method368(String a) => null; //# 368: continued - method369(String a) => null; //# 369: continued - method370(String a) => null; //# 370: continued - method371(String a) => null; //# 371: continued - method372(String a) => null; //# 372: continued -} - -class C extends B { - method1(covariant dynamic a) => null; //# 001: continued - method2(covariant num a) => null; //# 002: continued - method3(covariant int a) => null; //# 003: continued - method4(covariant String a) => null; //# 004: continued - method5(dynamic a) => null; //# 005: continued - method6(num a) => null; //# 006: continued - method7(int a) => null; //# 007: continued - method8(String a) => null; //# 008: continued - method9(covariant dynamic a) => null; //# 009: continued - method10(covariant num a) => null; //# 010: continued - method11(covariant int a) => null; //# 011: continued - method12(covariant String a) => null; //# 012: continued - method13(dynamic a) => null; //# 013: continued - method14(num a) => null; //# 014: continued - method15(int a) => null; //# 015: continued - method16(String a) => null; //# 016: continued - method17(covariant dynamic a) => null; //# 017: continued - method18(covariant num a) => null; //# 018: continued - method19(covariant int a) => null; //# 019: continued - method20(covariant String a) => null; //# 020: continued - method21(dynamic a) => null; //# 021: continued - method22(num a) => null; //# 022: continued - method23(int a) => null; //# 023: continued - method24(String a) => null; //# 024: continued - method25(covariant dynamic a) => null; //# 025: continued - method26(covariant num a) => null; //# 026: continued - method27(covariant int a) => null; //# 027: continued - method28(covariant String a) => null; //# 028: continued - method29(dynamic a) => null; //# 029: continued - method30(num a) => null; //# 030: continued - method31(int a) => null; //# 031: continued - method32(String a) => null; //# 032: continued - method33(covariant dynamic a) => null; //# 033: continued - method34(covariant num a) => null; //# 034: continued - method35(covariant int a) => null; //# 035: continued - method36(covariant String a) => null; //# 036: continued - method37(dynamic a) => null; //# 037: continued - method38(num a) => null; //# 038: continued - method39(int a) => null; //# 039: continued - method40(String a) => null; //# 040: continued - method41(covariant dynamic a) => null; //# 041: continued - method42(covariant num a) => null; //# 042: continued - method43(covariant int a) => null; //# 043: continued - method44(covariant String a) => null; //# 044: continued - method45(dynamic a) => null; //# 045: continued - method46(num a) => null; //# 046: continued - method47(int a) => null; //# 047: continued - method48(String a) => null; //# 048: continued - method49(covariant dynamic a) => null; //# 049: continued - method50(covariant num a) => null; //# 050: continued - method51(covariant int a) => null; //# 051: continued - method52(covariant String a) => null; //# 052: continued - method53(dynamic a) => null; //# 053: continued - method54(num a) => null; //# 054: continued - method55(int a) => null; //# 055: continued - method56(String a) => null; //# 056: continued - method57(covariant dynamic a) => null; //# 057: continued - method58(covariant num a) => null; //# 058: continued - method59(covariant int a) => null; //# 059: continued - method60(covariant String a) => null; //# 060: continued - method61(dynamic a) => null; //# 061: continued - method62(num a) => null; //# 062: continued - method63(int a) => null; //# 063: continued - method64(String a) => null; //# 064: continued - method65(covariant dynamic a) => null; //# 065: continued - method66(covariant num a) => null; //# 066: continued - method67(covariant int a) => null; //# 067: continued - method68(covariant String a) => null; //# 068: continued - method69(dynamic a) => null; //# 069: continued - method70(num a) => null; //# 070: continued - method71(int a) => null; //# 071: continued - method72(String a) => null; //# 072: continued - method73(covariant dynamic a) => null; //# 073: continued - method74(covariant num a) => null; //# 074: continued - method75(covariant int a) => null; //# 075: continued - method76(covariant String a) => null; //# 076: continued - method77(dynamic a) => null; //# 077: continued - method78(num a) => null; //# 078: continued - method79(int a) => null; //# 079: continued - method80(String a) => null; //# 080: continued - method81(covariant dynamic a) => null; //# 081: continued - method82(covariant num a) => null; //# 082: continued - method83(covariant int a) => null; //# 083: continued - method84(covariant String a) => null; //# 084: continued - method85(dynamic a) => null; //# 085: continued - method86(num a) => null; //# 086: continued - method87(int a) => null; //# 087: continued - method88(String a) => null; //# 088: continued - method90(covariant dynamic a) => null; //# 090: continued - method91(covariant num a) => null; //# 091: continued - method92(covariant int a) => null; //# 092: continued - method93(covariant String a) => null; //# 093: continued - method94(dynamic a) => null; //# 094: continued - method95(num a) => null; //# 095: continued - method96(int a) => null; //# 096: continued - method97(String a) => null; //# 097: continued - method98(covariant dynamic a) => null; //# 098: continued - method99(covariant num a) => null; //# 099: continued - method100(covariant int a) => null; //# 100: continued - method101(covariant String a) => null; //# 101: continued - method102(dynamic a) => null; //# 102: continued - method103(num a) => null; //# 103: continued - method104(int a) => null; //# 104: continued - method105(String a) => null; //# 105: continued - method106(covariant dynamic a) => null; //# 106: continued - method107(covariant num a) => null; //# 107: continued - method108(covariant int a) => null; //# 108: continued - method109(covariant String a) => null; //# 109: continued - method110(dynamic a) => null; //# 110: continued - method111(num a) => null; //# 111: continued - method112(int a) => null; //# 112: continued - method113(String a) => null; //# 113: continued - method115(covariant dynamic a) => null; //# 115: continued - method116(covariant num a) => null; //# 116: continued - method117(covariant int a) => null; //# 117: continued - method118(covariant String a) => null; //# 118: continued - method119(dynamic a) => null; //# 119: continued - method120(num a) => null; //# 120: continued - method121(int a) => null; //# 121: continued - method122(String a) => null; //# 122: continued - method123(covariant dynamic a) => null; //# 123: continued - method124(covariant num a) => null; //# 124: continued - method125(covariant int a) => null; //# 125: continued - method126(covariant String a) => null; //# 126: continued - method127(dynamic a) => null; //# 127: continued - method128(num a) => null; //# 128: continued - method129(int a) => null; //# 129: continued - method130(String a) => null; //# 130: continued - method131(covariant dynamic a) => null; //# 131: continued - method132(covariant num a) => null; //# 132: continued - method133(covariant int a) => null; //# 133: continued - method134(covariant String a) => null; //# 134: continued - method135(dynamic a) => null; //# 135: continued - method136(num a) => null; //# 136: continued - method137(int a) => null; //# 137: continued - method138(String a) => null; //# 138: continued - method140(covariant dynamic a) => null; //# 140: continued - method141(covariant num a) => null; //# 141: continued - method142(covariant int a) => null; //# 142: continued - method143(covariant String a) => null; //# 143: continued - method144(dynamic a) => null; //# 144: continued - method145(num a) => null; //# 145: continued - method146(int a) => null; //# 146: continued - method147(String a) => null; //# 147: continued - method148(covariant dynamic a) => null; //# 148: continued - method149(covariant num a) => null; //# 149: continued - method150(covariant int a) => null; //# 150: continued - method151(covariant String a) => null; //# 151: continued - method152(dynamic a) => null; //# 152: continued - method153(num a) => null; //# 153: continued - method154(int a) => null; //# 154: continued - method155(String a) => null; //# 155: continued - method156(covariant dynamic a) => null; //# 156: continued - method157(covariant num a) => null; //# 157: continued - method158(covariant int a) => null; //# 158: continued - method159(covariant String a) => null; //# 159: continued - method160(dynamic a) => null; //# 160: continued - method161(num a) => null; //# 161: continued - method162(int a) => null; //# 162: continued - method163(String a) => null; //# 163: continued - method165(covariant dynamic a) => null; //# 165: continued - method166(covariant num a) => null; //# 166: continued - method167(covariant int a) => null; //# 167: continued - method168(covariant String a) => null; //# 168: continued - method169(dynamic a) => null; //# 169: continued - method170(num a) => null; //# 170: continued - method171(int a) => null; //# 171: continued - method172(String a) => null; //# 172: continued - method175(covariant dynamic a) => null; //# 175: continued - method176(covariant num a) => null; //# 176: continued - method177(covariant int a) => null; //# 177: continued - method178(covariant String a) => null; //# 178: continued - method179(dynamic a) => null; //# 179: continued - method180(num a) => null; //# 180: continued - method181(int a) => null; //# 181: continued - method182(String a) => null; //# 182: continued - method183(covariant dynamic a) => null; //# 183: continued - method184(covariant num a) => null; //# 184: continued - method185(covariant int a) => null; //# 185: continued - method186(covariant String a) => null; //# 186: continued - method187(dynamic a) => null; //# 187: continued - method188(num a) => null; //# 188: continued - method189(int a) => null; //# 189: continued - method190(String a) => null; //# 190: continued - method193(covariant dynamic a) => null; //# 193: continued - method194(covariant num a) => null; //# 194: continued - method195(covariant int a) => null; //# 195: continued - method196(covariant String a) => null; //# 196: continued - method197(dynamic a) => null; //# 197: continued - method198(num a) => null; //# 198: continued - method199(int a) => null; //# 199: continued - method200(String a) => null; //# 200: continued - method201(covariant dynamic a) => null; //# 201: continued - method202(covariant num a) => null; //# 202: continued - method203(covariant int a) => null; //# 203: continued - method204(covariant String a) => null; //# 204: continued - method205(dynamic a) => null; //# 205: continued - method206(num a) => null; //# 206: continued - method207(int a) => null; //# 207: continued - method208(String a) => null; //# 208: continued - method209(covariant dynamic a) => null; //# 209: continued - method210(covariant num a) => null; //# 210: continued - method211(covariant int a) => null; //# 211: continued - method212(covariant String a) => null; //# 212: continued - method213(dynamic a) => null; //# 213: continued - method214(num a) => null; //# 214: continued - method215(int a) => null; //# 215: continued - method216(String a) => null; //# 216: continued - method217(covariant dynamic a) => null; //# 217: continued - method218(covariant num a) => null; //# 218: continued - method219(covariant int a) => null; //# 219: continued - method220(covariant String a) => null; //# 220: continued - method221(dynamic a) => null; //# 221: continued - method222(num a) => null; //# 222: continued - method223(int a) => null; //# 223: continued - method224(String a) => null; //# 224: continued - method225(covariant dynamic a) => null; //# 225: continued - method226(covariant num a) => null; //# 226: continued - method227(covariant int a) => null; //# 227: continued - method228(covariant String a) => null; //# 228: continued - method229(dynamic a) => null; //# 229: continued - method230(num a) => null; //# 230: continued - method231(int a) => null; //# 231: continued - method232(String a) => null; //# 232: continued - method233(covariant dynamic a) => null; //# 233: continued - method234(covariant num a) => null; //# 234: continued - method235(covariant int a) => null; //# 235: continued - method236(covariant String a) => null; //# 236: continued - method237(dynamic a) => null; //# 237: continued - method238(num a) => null; //# 238: continued - method239(int a) => null; //# 239: continued - method240(String a) => null; //# 240: continued - method244(covariant dynamic a) => null; //# 244: continued - method245(covariant num a) => null; //# 245: continued - method246(covariant int a) => null; //# 246: continued - method247(covariant String a) => null; //# 247: continued - method248(dynamic a) => null; //# 248: continued - method249(num a) => null; //# 249: continued - method250(int a) => null; //# 250: continued - method251(String a) => null; //# 251: continued - method252(covariant dynamic a) => null; //# 252: continued - method253(covariant num a) => null; //# 253: continued - method254(covariant int a) => null; //# 254: continued - method255(covariant String a) => null; //# 255: continued - method256(dynamic a) => null; //# 256: continued - method257(num a) => null; //# 257: continued - method258(int a) => null; //# 258: continued - method259(String a) => null; //# 259: continued - method260(covariant dynamic a) => null; //# 260: continued - method261(covariant num a) => null; //# 261: continued - method262(covariant int a) => null; //# 262: continued - method263(covariant String a) => null; //# 263: continued - method264(dynamic a) => null; //# 264: continued - method265(num a) => null; //# 265: continued - method266(int a) => null; //# 266: continued - method267(String a) => null; //# 267: continued - method269(covariant dynamic a) => null; //# 269: continued - method270(covariant num a) => null; //# 270: continued - method271(covariant int a) => null; //# 271: continued - method272(covariant String a) => null; //# 272: continued - method273(dynamic a) => null; //# 273: continued - method274(num a) => null; //# 274: continued - method275(int a) => null; //# 275: continued - method276(String a) => null; //# 276: continued - method277(covariant dynamic a) => null; //# 277: continued - method278(covariant num a) => null; //# 278: continued - method279(covariant int a) => null; //# 279: continued - method280(covariant String a) => null; //# 280: continued - method281(dynamic a) => null; //# 281: continued - method282(num a) => null; //# 282: continued - method283(int a) => null; //# 283: continued - method284(String a) => null; //# 284: continued - method287(covariant dynamic a) => null; //# 287: continued - method288(covariant num a) => null; //# 288: continued - method289(covariant int a) => null; //# 289: continued - method290(covariant String a) => null; //# 290: continued - method291(dynamic a) => null; //# 291: continued - method292(num a) => null; //# 292: continued - method293(int a) => null; //# 293: continued - method294(String a) => null; //# 294: continued - method295(covariant dynamic a) => null; //# 295: continued - method296(covariant num a) => null; //# 296: continued - method297(covariant int a) => null; //# 297: continued - method298(covariant String a) => null; //# 298: continued - method299(dynamic a) => null; //# 299: continued - method300(num a) => null; //# 300: continued - method301(int a) => null; //# 301: continued - method302(String a) => null; //# 302: continued - method303(covariant dynamic a) => null; //# 303: continued - method304(covariant num a) => null; //# 304: continued - method305(covariant int a) => null; //# 305: continued - method306(covariant String a) => null; //# 306: continued - method307(dynamic a) => null; //# 307: continued - method308(num a) => null; //# 308: continued - method309(int a) => null; //# 309: continued - method310(String a) => null; //# 310: continued - method312(covariant dynamic a) => null; //# 312: continued - method313(covariant num a) => null; //# 313: continued - method314(covariant int a) => null; //# 314: continued - method315(covariant String a) => null; //# 315: continued - method316(dynamic a) => null; //# 316: continued - method317(num a) => null; //# 317: continued - method318(int a) => null; //# 318: continued - method319(String a) => null; //# 319: continued - method320(covariant dynamic a) => null; //# 320: continued - method321(covariant num a) => null; //# 321: continued - method322(covariant int a) => null; //# 322: continued - method323(covariant String a) => null; //# 323: continued - method324(dynamic a) => null; //# 324: continued - method325(num a) => null; //# 325: continued - method326(int a) => null; //# 326: continued - method327(String a) => null; //# 327: continued - method328(covariant dynamic a) => null; //# 328: continued - method329(covariant num a) => null; //# 329: continued - method330(covariant int a) => null; //# 330: continued - method331(covariant String a) => null; //# 331: continued - method332(dynamic a) => null; //# 332: continued - method333(num a) => null; //# 333: continued - method334(int a) => null; //# 334: continued - method335(String a) => null; //# 335: continued - method337(covariant dynamic a) => null; //# 337: continued - method338(covariant num a) => null; //# 338: continued - method339(covariant int a) => null; //# 339: continued - method340(covariant String a) => null; //# 340: continued - method341(dynamic a) => null; //# 341: continued - method342(num a) => null; //# 342: continued - method343(int a) => null; //# 343: continued - method344(String a) => null; //# 344: continued - method347(covariant dynamic a) => null; //# 347: continued - method348(covariant num a) => null; //# 348: continued - method349(covariant int a) => null; //# 349: continued - method350(covariant String a) => null; //# 350: continued - method351(dynamic a) => null; //# 351: continued - method352(num a) => null; //# 352: continued - method353(int a) => null; //# 353: continued - method354(String a) => null; //# 354: continued - method355(covariant dynamic a) => null; //# 355: continued - method356(covariant num a) => null; //# 356: continued - method357(covariant int a) => null; //# 357: continued - method358(covariant String a) => null; //# 358: continued - method359(dynamic a) => null; //# 359: continued - method360(num a) => null; //# 360: continued - method361(int a) => null; //# 361: continued - method362(String a) => null; //# 362: continued - method365(covariant dynamic a) => null; //# 365: continued - method366(covariant num a) => null; //# 366: continued - method367(covariant int a) => null; //# 367: continued - method368(covariant String a) => null; //# 368: continued - method369(dynamic a) => null; //# 369: continued - method370(num a) => null; //# 370: continued - method371(int a) => null; //# 371: continued - method372(String a) => null; //# 372: continued -} diff --git a/tests/language_2/override/inheritance_method_test.dart b/tests/language_2/override/inheritance_method_test.dart deleted file mode 100644 index 3b32e9d0fa3..00000000000 --- a/tests/language_2/override/inheritance_method_test.dart +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) 2014, 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 - -// Test static warnings for method overrides. - -class A { - method1() => null; //# 01: ok - method2(a) => null; //# 02: ok - method3(a, b, c, d) => null; //# 03: ok - method4() => null; //# 04: compile-time error - method6(a, b, c) => null; //# 06: compile-time error - method7([a]) => null; //# 07: ok - method8([a, b]) => null; //# 08: ok - method9([a, b, c]) => null; //# 09: ok - method10([a]) => null; //# 10: ok - method11(a) => null; //# 11: compile-time error - method12(a, [b]) => null; //# 12: compile-time error - method13(a, [b]) => null; //# 13: compile-time error - method14(a, b, [c, d, e]) => null; //# 14: compile-time error - method15({a}) => null; //# 15: ok - method16({a, b}) => null; //# 16: ok - method17({a, b, c}) => null; //# 17: ok - method18(d, {a, b, c}) => null; //# 18: ok - method19({a}) => null; //# 19: compile-time error - method20({a, b}) => null; //# 20: compile-time error - method21({a, b, c, d}) => null; //# 21: compile-time error - - method22(int a) => null; //# 22: ok - method23(int a) => null; //# 23: ok - void method24() {} //# 24: ok - method25() => null; //# 25: ok - void method26() {} //# 26: ok - int method27() => null; //# 27: compile-time error - method28(int a) => null; //# 28: compile-time error - method29(int a) => null; //# 29: compile-time error - method30(int a) => null; //# 30: compile-time error - method34(int a) => null; //# 34: ok - method35(int a) => null; //# 35: ok - method36(int a) => null; //# 36: compile-time error - method37(num a) => null; //# 37: ok - method38(covariant num a) => null; //# 38: ok - method39(num a) => null; //# 39: compile-time error -} - -class B extends A { - method28(num a) => null; //# 28: continued - method29(a) => null; //# 29: continued - method34(num a) => null; //# 34: continued - method35(dynamic a) => null; //# 35: continued - method36(dynamic a) => null; //# 36: continued - method37(covariant dynamic a) => null; //# 37: continued - method38(dynamic a) => null; //# 38: continued - method39(covariant dynamic a) => null; //# 39: continued -} - -abstract class I { - method5() => null; //# 05: compile-time error - method31(int a) => null; //# 31: compile-time error - method32(int a) => null; //# 32: compile-time error - method33(num a) => null; //# 33: compile-time error -} - -abstract class J { - method31(num a) => null; //# 31: continued - method32(double a) => null; //# 32: continued - method33(int a) => null; //# 33: continued -} - -class Class extends B implements I, J { - method1() => null; //# 01: continued - method2(b) => null; //# 02: continued - method3(b, a, d, c) => null; //# 03: continued - method4(a) => null; //# 04: continued - method5(a) => null; //# 05: continued - method6(a, b, c, d) => null; //# 06: continued - method7([a]) => null; //# 07: continued - method8([b, a]) => null; //# 08: continued - method9([b, d, a, c]) => null; //# 09: continued - method10([a]) => null; //# 10: continued - method11() => null; //# 11: continued - method12(a) => null; //# 12: continued - method13([a]) => null; //# 13: continued - method14([a, b, c, d]) => null; //# 14: continued - method15({a}) => null; //# 15: continued - method16({b, a}) => null; //# 16: continued - method17({b, c, a, d}) => null; //# 17: continued - method18(e, {b, c, a, d}) => null; //# 18: continued - method19() => null; //# 19: continued - method20({b}) => null; //# 20: continued - method21({a, e, d, c}) => null; //# 21: continued - - method22(int a) => null; //# 22: continued - method23(num a) => null; //# 23: continued - method24() => null; //# 24: continued - void method25() {} //# 25: continued - int method26() => null; //# 26: continued - void method27() {} //# 27: continued - method28(double a) => null; //# 28: continued - method29(String a) => null; //# 29: continued - method30(String a) => null; //# 30: continued - method36(int a) => null; //# 36: continued - method37(int a) => null; //# 37: continued - method38(int a) => null; //# 38: continued - method39(String a) => null; //# 39: continued -} - -class SubClass extends Class { - method31(double a) => null; //# 31: continued - method32(String a) => null; //# 32: continued - method33(double a) => null; //# 33: continued -} - -main() { - new SubClass(); -} diff --git a/tests/language_2/override/inheritance_mixed_test.dart b/tests/language_2/override/inheritance_mixed_test.dart deleted file mode 100644 index bd82c291a5a..00000000000 --- a/tests/language_2/override/inheritance_mixed_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2014, 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 - -class A { - var member1; //# 01: compile-time error - member2() {} //# 02: compile-time error - get member3 => null; //# 03: compile-time error - member4() {} //# 04: compile-time error -} - -abstract class I { - var member5; //# 05: ok - var member6; //# 06: compile-time error - get member7; //# 07: compile-time error - get member8; //# 08: compile-time error - get member9; //# 09: compile-time error -} - -abstract class J { - get member5; //# 05: continued - member6() {} //# 06: continued - member7() {} //# 07: continued - member8() {} //# 08: continued - member9() {} //# 09: continued -} - -abstract class B extends A implements I, J {} - -class Class extends B { - member1() {} //# 01: continued - var member2; //# 02: continued - member3() {} //# 03: continued - get member4 => null; //# 04: continued - var member5; //# 05: continued - member8() {} //# 08: continued - get member9 => null; //# 09: continued -} - -main() { - new Class(); -} diff --git a/tests/language_2/override/inheritance_no_such_method_test.dart b/tests/language_2/override/inheritance_no_such_method_test.dart deleted file mode 100644 index 0a60b22c6be..00000000000 --- a/tests/language_2/override/inheritance_no_such_method_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test use of noSuchMethod in relation to abstract methods in -// concrete classes. - -abstract class A { - method6(); //# 06: compile-time error - method7(); //# 07: compile-time error - method8(); //# 08: ok -} - -abstract class I { - method9(); //# 09: compile-time error - method10(); //# 10: compile-time error - method11(); //# 11: ok -} - -class Class1 extends A implements I { - method1(); //# 01: compile-time error - - noSuchMethod(_) => null; //# 03: ok - method3(); //# 03: continued - - noSuchMethod(_, [__]) => null; //# 04: ok - method4(); //# 04: continued - - noSuchMethod(_); //# 05: compile-time error - method5(); //# 05: continued - - noSuchMethod(_) => null; //# 08: continued - - noSuchMethod(_) => null; //# 11: continued -} - -class B { - method12(); //# 12: compile-time error - - noSuchMethod(_) => null; //# 13: ok - method13(); //# 13: continued -} - -class Class2 extends B {} - -main() { - new Class1(); - new Class2(); -} diff --git a/tests/language_2/override/inheritance_setter_test.dart b/tests/language_2/override/inheritance_setter_test.dart deleted file mode 100644 index a3c7a03052c..00000000000 --- a/tests/language_2/override/inheritance_setter_test.dart +++ /dev/null @@ -1,34 +0,0 @@ - -// @dart = 2.9 -main() { - new C(); -} - -class A { - void set setter1(num x) {} //# 001: compile-time error - void set setter2(num x) {} //# 002: compile-time error - void set setter3(num x) {} //# 003: ok - void set setter4(num x) {} //# 004: compile-time error - void set setter5(num x) {} //# 005: ok - void set setter6(num x) {} //# 006: compile-time error - void set setter7(num x) {} //# 007: ok -} - -class B extends A { - void set setter1(covariant dynamic x) {} //# 001: continued - void set setter2(int x) {} //# 002: continued - void set setter3(covariant dynamic x) {} //# 003: continued - void set setter4(dynamic x) {} //# 004: continued - void set setter5(covariant dynamic x) {} //# 005: continued - covariant dynamic setter6; //# 006: continued - covariant dynamic setter7; //# 007: continued -} - -class C extends B { - void set setter1(String x) {} //# 001: continued - void set setter3(num x) {} //# 003: continued - void set setter4(int x) {} //# 004: continued - void set setter5(int x) {} //# 005: continued - void set setter6(String x) {} //# 006: continued - void set setter7(int x) {} //# 007: continued -} diff --git a/tests/language_2/override/method_with_field_runtime_test.dart b/tests/language_2/override/method_with_field_runtime_test.dart deleted file mode 100644 index 62056187af5..00000000000 --- a/tests/language_2/override/method_with_field_runtime_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 "package:expect/expect.dart"; - -// Test overriding a method with a field. - -class Super { - Super() : super(); - - instanceMethod() => 42; -} - -class Sub extends Super { - Sub() : super(); - - - - superInstanceMethod() => super.instanceMethod(); -} - -main() { - var s = new Sub(); - Super sup = s; - Sub sub = s; - print(s.instanceMethod); - Expect.equals(42, s.superInstanceMethod()); - - Expect.equals(42, sub.superInstanceMethod()); -} diff --git a/tests/language_2/override/method_with_field_test.dart b/tests/language_2/override/method_with_field_test.dart deleted file mode 100644 index 169e4111841..00000000000 --- a/tests/language_2/override/method_with_field_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test overriding a method with a field. - -class Super { - Super() : super(); - - instanceMethod() => 42; -} - -class Sub extends Super { - Sub() : super(); - - var instanceMethod = 87; - // ^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_FIELD_AND_METHOD - // [cfe] Can't declare a member that conflicts with an inherited one. - - superInstanceMethod() => super.instanceMethod(); -} - -main() { - var s = new Sub(); - Super sup = s; - Sub sub = s; - print(s.instanceMethod); - Expect.equals(42, s.superInstanceMethod()); - Expect.equals(42, sup.superInstanceMethod()); - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD - // [cfe] The method 'superInstanceMethod' isn't defined for the class 'Super'. - Expect.equals(42, sub.superInstanceMethod()); -} diff --git a/tests/language_2/parameter/bad_named2_runtime_test.dart b/tests/language_2/parameter/bad_named2_runtime_test.dart deleted file mode 100644 index 22780ef14dc..00000000000 --- a/tests/language_2/parameter/bad_named2_runtime_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 test program for testing bad named parameters. - -class BadNamedParameters2Test { - int foo(int a) { - // Although no optional named parameters are declared, we must check that - // no named arguments are passed in, either here or in the resolving stub. - return a; - } -} - -main() { - BadNamedParameters2Test np = new BadNamedParameters2Test(); - - // No formal parameter named b. - -} diff --git a/tests/language_2/parameter/bad_named2_test.dart b/tests/language_2/parameter/bad_named2_test.dart deleted file mode 100644 index 0a32d4b819c..00000000000 --- a/tests/language_2/parameter/bad_named2_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing bad named parameters. - -// @dart = 2.9 - -class BadNamedParameters2Test { - int foo(int a) { - // Although no optional named parameters are declared, we must check that - // no named arguments are passed in, either here or in the resolving stub. - return a; - } -} - -main() { - BadNamedParameters2Test np = new BadNamedParameters2Test(); - - // No formal parameter named b. - np.foo(b: 25); - // ^ - // [analyzer] COMPILE_TIME_ERROR.NOT_ENOUGH_POSITIONAL_ARGUMENTS - // ^^^^^^^ - // [cfe] Too few positional arguments: 1 required, 0 given. - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_NAMED_PARAMETER -} diff --git a/tests/language_2/parameter/bad_named_parameters_test.dart b/tests/language_2/parameter/bad_named_parameters_test.dart deleted file mode 100644 index 05c4859a29c..00000000000 --- a/tests/language_2/parameter/bad_named_parameters_test.dart +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing bad named parameters. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class BadNamedParametersTest { - int f42(int a, {int b: 20, int c: 30}) { - return 100 * (100 * a + b) + c; - } - - int f52(int a, {int b: 20, int c, int d: 40}) { - return 100 * (100 * (100 * a + b) + (c == null ? 0 : c)) + d; - } -} - -main() { - BadNamedParametersTest np = new BadNamedParametersTest(); - - // Parameter b passed twice. - np.f42(10, 25, b: 25); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED - // ^^^^^^^^^^^^^^^ - // [cfe] Too many positional arguments: 1 allowed, but 2 found. - - // Parameter x does not exist. - np.f42(10, 25, x: 99); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED - // ^^^^^^^^^^^^^^^ - // [cfe] Too many positional arguments: 1 allowed, but 2 found. - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_NAMED_PARAMETER - - // Parameter b1 does not exist. - np.f52(10, b: 25, b1: 99, c: 35); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_NAMED_PARAMETER - // [cfe] No named parameter with the name 'b1'. - - // Too many parameters. - np.f42(10, 20, 30, 40); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED - // ^^^^^^^^^^^^^^^^ - // [cfe] Too many positional arguments: 1 allowed, but 4 found. - - // Too few parameters. - np.f42(b: 25); - // ^ - // [analyzer] COMPILE_TIME_ERROR.NOT_ENOUGH_POSITIONAL_ARGUMENTS - // ^^^^^^^ - // [cfe] Too few positional arguments: 1 required, 0 given. -} diff --git a/tests/language_2/parameter/bad_named_runtime_test.dart b/tests/language_2/parameter/bad_named_runtime_test.dart deleted file mode 100644 index 0eaedcdd555..00000000000 --- a/tests/language_2/parameter/bad_named_runtime_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 test program for testing bad named parameters. - -import "package:expect/expect.dart"; - -class BadNamedParametersTest { - int f42(int a, {int b: 20, int c: 30}) { - return 100 * (100 * a + b) + c; - } - - int f52(int a, {int b: 20, int c, int d: 40}) { - return 100 * (100 * (100 * a + b) + (c == null ? 0 : c)) + d; - } -} - -main() { - BadNamedParametersTest np = new BadNamedParametersTest(); - - // Parameter b passed twice. - - - // Parameter x does not exist. - - - // Parameter b1 does not exist. - - - // Too many parameters. - - - // Too few parameters. - -} diff --git a/tests/language_2/parameter/default_test.dart b/tests/language_2/parameter/default_test.dart deleted file mode 100644 index 4dad097fad9..00000000000 --- a/tests/language_2/parameter/default_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2013, 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 - -class C { - foo(a - : 1 // //# 01: syntax error - = 1 // //# 02: syntax error - ) { - print(a); - } - - static bar(a - : 1 // //# 03: syntax error - = 1 // //# 04: syntax error - ) { - print(a); - } -} - -baz(a - : 1 // //# 05: syntax error - = 1 // //# 06: syntax error - ) { - print(a); -} - -main() { - foo(a - : 1 // //# 07: syntax error - = 1 // //# 08: syntax error - ) { - print(a); - } - - foo(1); - - new C().foo(2); - - C.bar(3); - - baz(4); -} diff --git a/tests/language_2/parameter/initializer1_test.dart b/tests/language_2/parameter/initializer1_test.dart deleted file mode 100644 index ee2d304552f..00000000000 --- a/tests/language_2/parameter/initializer1_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Fails because this.x parameter is used in a function. - -class Foo { - var x; - foo(this.x) {} - // ^^^^ - // [analyzer] SYNTACTIC_ERROR.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR - // [cfe] Field formal parameters can only be used in a constructor. - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR -} - -main() { - Foo().foo(2); -} diff --git a/tests/language_2/parameter/initializer2_test.dart b/tests/language_2/parameter/initializer2_test.dart deleted file mode 100644 index 0a41accf4fb..00000000000 --- a/tests/language_2/parameter/initializer2_test.dart +++ /dev/null @@ -1,83 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Test Parameter Initializer. - -class ParameterInitializer2Test { - static testMain() { - var a = new A(123); - Expect.equals(123, a.x); - - var b = new B(123); - Expect.equals(123, b.x); - - var c = new C(123); - Expect.equals(123, c.x); - - var d = new D(123); - Expect.equals(123, d.x); - - var e = new E(1); - Expect.equals(4, e.x); - - var f = new F(1, 2, 3, 4); - Expect.equals(4, f.z); - } -} - -// untyped -class A { - A(this.x) {} - int x; -} - -// typed -class B { - B(int this.x) {} - int x; -} - -// const typed -class C { - const C(int this.x); - final int x; -} - -// const untyped -class D { - const D(this.x); - final x; -} - -// make sure this. references work properly in the constructor scope. -class E { - E(this.x) { - var myVar = this.x * 2; - this.x = myVar + 1; - x = myVar + 2; - var foo = x + 1; - } - int x; -} - -// mixed -class F { - F(x, this.y_, int w, int this.z) - : x_ = x, - w_ = w {} - F.foobar(this.z, int this.x_, int this.az_) {} - int x_; - int y_; - int w_; - int z; - int az_; -} - -main() { - ParameterInitializer2Test.testMain(); -} diff --git a/tests/language_2/parameter/initializer3_test.dart b/tests/language_2/parameter/initializer3_test.dart deleted file mode 100644 index 22db7071787..00000000000 --- a/tests/language_2/parameter/initializer3_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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 - -/// Fails because this.x parameter is used in a factory. - -class Foo { - var x; - factory Foo(this.x) => new Foo.named(); - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_FACTORY_CONSTRUCTOR - // [cfe] Field formal parameters can only be used in a constructor. - Foo.named() {} -} - -main() { - Foo(2); -} diff --git a/tests/language_2/parameter/initializer4_test.dart b/tests/language_2/parameter/initializer4_test.dart deleted file mode 100644 index ff49426b87b..00000000000 --- a/tests/language_2/parameter/initializer4_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Fails because this.x parameter is used in a static function. - -class Foo { - var x; - static foo(this.x) {} - // ^^^^ - // [analyzer] SYNTACTIC_ERROR.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR - // [cfe] Field formal parameters can only be used in a constructor. - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR -} - -main() { - Foo.foo(1); -} diff --git a/tests/language_2/parameter/initializer5_test.dart b/tests/language_2/parameter/initializer5_test.dart deleted file mode 100644 index d0d500b30d2..00000000000 --- a/tests/language_2/parameter/initializer5_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// 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 - -// Use the this.x parameter in an initializer expression. - -class Foo { - var x, y; - Foo(this.x) : y = x {} -} - -main() { - new Foo(12); -} diff --git a/tests/language_2/parameter/initializer6_test.dart b/tests/language_2/parameter/initializer6_test.dart deleted file mode 100644 index 0f3812b5d38..00000000000 --- a/tests/language_2/parameter/initializer6_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -/// It is a compile-time error if a named formal parameter begins with an '_'. - -class Foo { - num _y; - Foo.private({this._y: 77}) {} - // ^^ - // [analyzer] COMPILE_TIME_ERROR.PRIVATE_OPTIONAL_PARAMETER - // ^ - // [cfe] An optional named parameter can't start with '_'. -} - -main() { - Foo.private(_y: 222); -} diff --git a/tests/language_2/parameter/initializer7_test.dart b/tests/language_2/parameter/initializer7_test.dart deleted file mode 100644 index ee253d1f907..00000000000 --- a/tests/language_2/parameter/initializer7_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Fails because this.x parameter is used in a setter. - -class Foo { - var x; - set y(this.x) {} - // ^^^^ - // [analyzer] SYNTACTIC_ERROR.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR - // [cfe] Field formal parameters can only be used in a constructor. - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR -} - -main() { - Foo().y = 2; -} diff --git a/tests/language_2/parameter/initializer_test.dart b/tests/language_2/parameter/initializer_test.dart deleted file mode 100644 index 3a558e30c49..00000000000 --- a/tests/language_2/parameter/initializer_test.dart +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class ParameterInitializerTest { - static testMain() { - var obj = new Foo.untyped(1); - Expect.equals(1, obj.x); - - obj = new Foo.subtype(7); - Expect.equals(7, obj.x); - - obj = new Foo.optional(111); - Expect.equals(111, obj.x); - - obj = new Foo.optional(); - Expect.equals(5, obj.x); - - obj = new Foo(1); - Expect.equals(2, obj.x); - - obj = new SubFoo(42); - Expect.equals(1, obj.x); - - obj = new SubSubFoo(42); - Expect.equals(1, obj.x); - } -} - -class Foo { - Foo(num this.x) { - // Reference to x must resolve to the field. - x++; - Expect.equals(this.x, x); - } - - Foo.untyped(this.x) {} - Foo.subtype(int this.x) {} - Foo.optional([this.x = 5]) {} - - num x; -} - -class SubFoo extends Foo { - SubFoo(num y) - : x_ = 0, - super(y) { - // Subfoo.setter of x has been invoked in the Foo constructor. - Expect.equals(x, 1); - Expect.equals(x_, 1); - - // The super.x will resolved to the field in Foo. - Expect.equals(super.x, y); - } - - get x { - return x_; - } - - set x(num val) { - x_ = val; - } - - num x_; -} - -class SubSubFoo extends SubFoo { - SubSubFoo(num y) : super(y) { - // Subfoo.setter of x has been invoked in the Foo constructor. - Expect.equals(x, 1); - Expect.equals(x_, 1); - - // There is no way to get to the field in Foo. - Expect.equals(super.x, 1); - } -} - -main() { - ParameterInitializerTest.testMain(); -} diff --git a/tests/language_2/parameter/metadata_test.dart b/tests/language_2/parameter/metadata_test.dart deleted file mode 100644 index 8ad871bec58..00000000000 --- a/tests/language_2/parameter/metadata_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2014, 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 - -// Test that metadata annotations can be handled on nested parameters. - -test( - @deprecated // //# 01: ok - f( - @deprecated // //# 02: ok - a, - @deprecated // //# 03: ok - g( - @deprecated //# 04: ok - b))) {} - -main() { - test(null); -} diff --git a/tests/language_2/parameter/name_conflict_test.dart b/tests/language_2/parameter/name_conflict_test.dart deleted file mode 100644 index 8e5764f7486..00000000000 --- a/tests/language_2/parameter/name_conflict_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -foo(t0) { - var a = t0, b = baz(), c = bar(); - if (t0 == 'foo') { - // Force a SSA swapping problem where dart2js used to use 't0' as - // a temporary variable. - var tmp = c; - c = b; - b = tmp; - } - - Expect.equals('foo', a); - Expect.equals('foo', t0); - Expect.equals('bar', b); - Expect.equals('baz', c); -} - -bar() => 'bar'; -baz() => 'baz'; - -main() { - foo('foo'); -} diff --git a/tests/language_2/parameter/named2_test.dart b/tests/language_2/parameter/named2_test.dart deleted file mode 100644 index c58c842023e..00000000000 --- a/tests/language_2/parameter/named2_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing named parameters. -// You may not provide the same parameter as both a positional and a named argument. - -// @dart = 2.9 - -int test(int a, [int b]) { - return a; -} - -main() { - // Parameter b passed twice, as positional and named. - test(10, 25, b: 26); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_NAMED_PARAMETER - // [cfe] No named parameter with the name 'b'. -} diff --git a/tests/language_2/parameter/named3_test.dart b/tests/language_2/parameter/named3_test.dart deleted file mode 100644 index 20f340ec827..00000000000 --- a/tests/language_2/parameter/named3_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing named parameters. -// Specifying named argument for not existing named parameter is run time error. - -// @dart = 2.9 - -int test(int a, [int b]) { - return a; -} - -main() { - // 1 positional arg, as expected. Param x does not exist. - test(10, x: 99); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_NAMED_PARAMETER - // [cfe] No named parameter with the name 'x'. -} diff --git a/tests/language_2/parameter/named4_test.dart b/tests/language_2/parameter/named4_test.dart deleted file mode 100644 index a107cef33f3..00000000000 --- a/tests/language_2/parameter/named4_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing named parameters. -// Specifying named argument for not existing named parameter is run time error. - -// @dart = 2.9 - -// This test is very similar to NamedParameters3Test, but exercises a -// different corner case in the frog compiler. frog wasn't detecting unused -// named arguments when no other arguments were expected. So, this test -// purposely passes the exact number of positional parameters. - -int test(int a) { - return a; -} - -main() { - // 1 positional arg, as expected. Param x does not exist. - test(10, x: 99); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_NAMED_PARAMETER - // [cfe] No named parameter with the name 'x'. -} diff --git a/tests/language_2/parameter/named_aggregated_runtime_test.dart b/tests/language_2/parameter/named_aggregated_runtime_test.dart deleted file mode 100644 index 8c7110527fc..00000000000 --- a/tests/language_2/parameter/named_aggregated_runtime_test.dart +++ /dev/null @@ -1,59 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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 test program for testing named parameters. - -class TypeTester {} - -// Expect compile-time error as no default values are allowed -// in closure type definitions. -typedef void Callback([String msg - -]); - -class NamedParametersAggregatedTests { - static int F31(int a, {int b: 20, int c: 30}) { - return 100 * (100 * a + b) + c; - } - - static int f_missing_comma(a - - ) => - a; - - var _handler = null; - - // Expect compile-time error as no default values - // are allowed in closure type. - void InstallCallback( - void cb({String msg - - })) { - _handler = cb; - } -} - -main() { - // Expect compile-time error due to missing comma in function definition. - NamedParametersAggregatedTests.f_missing_comma(10 - - ); - - // Expect compile-time error due to duplicate named argument. - NamedParametersAggregatedTests.F31(10, b: 25 - - - ); - - // Expect compile-time error due to missing positional argument. - - - new TypeTester(); - - (new NamedParametersAggregatedTests()).InstallCallback(null); -} diff --git a/tests/language_2/parameter/named_aggregated_test.dart b/tests/language_2/parameter/named_aggregated_test.dart deleted file mode 100644 index b7150b7f6ae..00000000000 --- a/tests/language_2/parameter/named_aggregated_test.dart +++ /dev/null @@ -1,63 +0,0 @@ -// 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 test program for testing named parameters. - -// @dart = 2.9 - -class TypeTester {} - -// Expect compile-time error as no default values are allowed -// in closure type definitions. -typedef void Callback([String msg = ""]); -// ^ -// [analyzer] SYNTACTIC_ERROR.DEFAULT_VALUE_IN_FUNCTION_TYPE -// [cfe] Can't have a default value in a function type. - -class NamedParametersAggregatedTests { - static int F31(int a, {int b: 20, int c: 30}) { - return 100 * (100 * a + b) + c; - } - - static int f_missing_comma(a [b = 42]) => a; - // ^ - // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN - // [cfe] Expected ')' before this. - - var _handler = null; - - // Expect compile-time error as no default values - // are allowed in closure type. - void InstallCallback(void cb({String msg : null})) { - // ^ - // [analyzer] SYNTACTIC_ERROR.DEFAULT_VALUE_IN_FUNCTION_TYPE - // [cfe] Can't have a default value in a function type. - _handler = cb; - } -} - -main() { - // Expect compile-time error due to missing comma in function definition. - NamedParametersAggregatedTests.f_missing_comma(10, 25); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS - // ^^^^^^^^ - // [cfe] Too many positional arguments: 1 allowed, but 2 found. - - // Expect compile-time error due to duplicate named argument. - NamedParametersAggregatedTests.F31(10, b: 25, b:35); - // ^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_NAMED_ARGUMENT - // [cfe] Duplicated named argument 'b'. - - // Expect compile-time error due to missing positional argument. - NamedParametersAggregatedTests.F31(b: 25, c: 35); - // ^ - // [analyzer] COMPILE_TIME_ERROR.NOT_ENOUGH_POSITIONAL_ARGUMENTS - // ^^^^^^^^^^^^^^ - // [cfe] Too few positional arguments: 1 required, 0 given. - - new TypeTester(); - - (new NamedParametersAggregatedTests()).InstallCallback(null); -} diff --git a/tests/language_2/parameter/named_clash_test.dart b/tests/language_2/parameter/named_clash_test.dart deleted file mode 100644 index 2ec239909a4..00000000000 --- a/tests/language_2/parameter/named_clash_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'package:expect/expect.dart'; - -class Foo { - m({a, b, c}) { - try {} catch (e) {} // no inline - return 'Foo $a $b $c'; - } -} - -class Bar { - m(z, {a$b, c}) { - try {} catch (e) {} // no inline - var ab = a$b; - return 'Bar $z $ab $c'; - } -} - -inscrutable(xs, i) => i == 0 ? xs[0] : inscrutable(xs.sublist(1), i - 1); - -main() { - var list = [new Foo(), new Bar()]; - var foo = inscrutable(list, 0); - var bar = inscrutable(list, 1); - - Expect.equals(r'Foo a b c', foo.m(a: 'a', b: 'b', c: 'c')); - Expect.equals(r'Bar z a$b c', bar.m('z', a$b: r'a$b', c: 'c')); - - Expect.throwsNoSuchMethodError(() => foo.m('z', a$b: r'a$b', c: 'c')); - Expect.throwsNoSuchMethodError(() => bar.m(a: 'a', b: 'b', c: 'c')); -} diff --git a/tests/language_2/parameter/named_count_test.dart b/tests/language_2/parameter/named_count_test.dart deleted file mode 100644 index 0000fc1d229..00000000000 --- a/tests/language_2/parameter/named_count_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Test for named parameter called 'count'. - -class TestClass { - TestClass(); - - method([count]) => count; - - static staticMethod([count]) => count; -} - -globalMethod([count]) => count; - -main() { - var obj = new TestClass(); - - Expect.equals(null, obj.method()); - Expect.equals(0, obj.method(0)); - Expect.equals("", obj.method("")); - - Expect.equals(null, TestClass.staticMethod()); - Expect.equals(true, TestClass.staticMethod(true)); - Expect.equals(false, TestClass.staticMethod(false)); - - Expect.equals(null, globalMethod()); - Expect.equals(true, globalMethod(true)); - Expect.equals(false, globalMethod(false)); -} diff --git a/tests/language_2/parameter/named_default_eq_runtime_test.dart b/tests/language_2/parameter/named_default_eq_runtime_test.dart deleted file mode 100644 index a78cae63c21..00000000000 --- a/tests/language_2/parameter/named_default_eq_runtime_test.dart +++ /dev/null @@ -1,106 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2016, 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. - -// Check that both `=` and `:` are allowed for named parameters. - -import "package:expect/expect.dart"; - -// Default values are not allowed on typedefs. - - -typedef functype({x, y, z}); - -int topF({x = 3, y: 5, z}) => x * y * (z ?? 2); - -class A { - int x; - int y; - int z; - A({this.x = 3, this.y: 5, z}) : z = z ?? 2; - A.redirect({int x = 3, int y: 5, int z}) : this(x: x, y: y, z: z); - factory A.factory({int x = 3, int y: 5, int z}) => - new A(x: x, y: y, z: z ?? 2); - factory A.redirectFactory({int x, int y, int z}) = A; - - // Default values are not allowed on redirecting factory constructors. - - - - int get value => x * y * z; - - static int staticF({x = 3, y: 5, z}) => x * y * (z ?? 2); - int instanceF({x = 3, y: 5, z}) => x * y * (z ?? 2); -} - -main() { - // Reference the type, or dart2js won't see that the declaration is invalid - - - var a = new A(); - - int local({x = 3, y: 5, z}) => x * y * (z ?? 2); - var expr = ({x = 3, y: 5, z}) => x * y * (z ?? 2); - var tearOff = a.instanceF; - - test(function) { - Expect.equals(30, function()); - Expect.equals(70, function(x: 7)); - Expect.equals(42, function(y: 7)); - Expect.equals(28, function(x: 7, y: 2)); - Expect.equals(15, function(z: 1)); - Expect.equals(21, function(y: 7, z: 1)); - Expect.equals(35, function(x: 7, z: 1)); - Expect.equals(14, function(x: 7, y: 2, z: 1)); - Expect.isTrue(function is functype); - } - - test(topF); - test(A.staticF); - test(a.instanceF); - test(local); - test(expr); - test(tearOff); - - // Can't tear off constructors. - Expect.equals(30, new A().value); - Expect.equals(70, new A(x: 7).value); - Expect.equals(42, new A(y: 7).value); - Expect.equals(28, new A(x: 7, y: 2).value); - Expect.equals(15, new A(z: 1).value); - Expect.equals(21, new A(y: 7, z: 1).value); - Expect.equals(35, new A(x: 7, z: 1).value); - Expect.equals(14, new A(x: 7, y: 2, z: 1).value); - - Expect.equals(30, new A.redirect().value); - Expect.equals(70, new A.redirect(x: 7).value); - Expect.equals(42, new A.redirect(y: 7).value); - Expect.equals(28, new A.redirect(x: 7, y: 2).value); - Expect.equals(15, new A.redirect(z: 1).value); - Expect.equals(21, new A.redirect(y: 7, z: 1).value); - Expect.equals(35, new A.redirect(x: 7, z: 1).value); - Expect.equals(14, new A.redirect(x: 7, y: 2, z: 1).value); - - Expect.equals(30, new A.factory().value); - Expect.equals(70, new A.factory(x: 7).value); - Expect.equals(42, new A.factory(y: 7).value); - Expect.equals(28, new A.factory(x: 7, y: 2).value); - Expect.equals(15, new A.factory(z: 1).value); - Expect.equals(21, new A.factory(y: 7, z: 1).value); - Expect.equals(35, new A.factory(x: 7, z: 1).value); - Expect.equals(14, new A.factory(x: 7, y: 2, z: 1).value); - - Expect.equals(30, new A.redirectFactory().value); - Expect.equals(70, new A.redirectFactory(x: 7).value); - Expect.equals(42, new A.redirectFactory(y: 7).value); - Expect.equals(28, new A.redirectFactory(x: 7, y: 2).value); - Expect.equals(15, new A.redirectFactory(z: 1).value); - Expect.equals(21, new A.redirectFactory(y: 7, z: 1).value); - Expect.equals(35, new A.redirectFactory(x: 7, z: 1).value); - Expect.equals(14, new A.redirectFactory(x: 7, y: 2, z: 1).value); -} diff --git a/tests/language_2/parameter/named_default_eq_test.dart b/tests/language_2/parameter/named_default_eq_test.dart deleted file mode 100644 index 48846667714..00000000000 --- a/tests/language_2/parameter/named_default_eq_test.dart +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) 2016, 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 - -// Check that both `=` and `:` are allowed for named parameters. - -import "package:expect/expect.dart"; - -// Default values are not allowed on typedefs. -typedef F1({x = 3, y}); -// ^ -// [analyzer] SYNTACTIC_ERROR.DEFAULT_VALUE_IN_FUNCTION_TYPE -// [cfe] Can't have a default value in a function type. - -typedef functype({x, y, z}); - -int topF({x = 3, y: 5, z}) => x * y * (z ?? 2); - -class A { - int x; - int y; - int z; - A({this.x = 3, this.y: 5, z}) : z = z ?? 2; - A.redirect({int x = 3, int y: 5, int z}) : this(x: x, y: y, z: z); - factory A.factory({int x = 3, int y: 5, int z}) => - new A(x: x, y: y, z: z ?? 2); - factory A.redirectFactory({int x, int y, int z}) = A; - - // Default values are not allowed on redirecting factory constructors. - factory A.badRedirectFactory({int x = 3, int y}) = - // ^ - // [analyzer] COMPILE_TIME_ERROR.DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR - // ^ - // [cfe] Can't have a default value here because any default values of 'A' would be used instead. - A; - - int get value => x * y * z; - - static int staticF({x = 3, y: 5, z}) => x * y * (z ?? 2); - int instanceF({x = 3, y: 5, z}) => x * y * (z ?? 2); -} - -main() { - // Reference the type, or dart2js won't see that the declaration is invalid - F1 _ = null; - - var a = new A(); - - int local({x = 3, y: 5, z}) => x * y * (z ?? 2); - var expr = ({x = 3, y: 5, z}) => x * y * (z ?? 2); - var tearOff = a.instanceF; - - test(function) { - Expect.equals(30, function()); - Expect.equals(70, function(x: 7)); - Expect.equals(42, function(y: 7)); - Expect.equals(28, function(x: 7, y: 2)); - Expect.equals(15, function(z: 1)); - Expect.equals(21, function(y: 7, z: 1)); - Expect.equals(35, function(x: 7, z: 1)); - Expect.equals(14, function(x: 7, y: 2, z: 1)); - Expect.isTrue(function is functype); - } - - test(topF); - test(A.staticF); - test(a.instanceF); - test(local); - test(expr); - test(tearOff); - - // Can't tear off constructors. - Expect.equals(30, new A().value); - Expect.equals(70, new A(x: 7).value); - Expect.equals(42, new A(y: 7).value); - Expect.equals(28, new A(x: 7, y: 2).value); - Expect.equals(15, new A(z: 1).value); - Expect.equals(21, new A(y: 7, z: 1).value); - Expect.equals(35, new A(x: 7, z: 1).value); - Expect.equals(14, new A(x: 7, y: 2, z: 1).value); - - Expect.equals(30, new A.redirect().value); - Expect.equals(70, new A.redirect(x: 7).value); - Expect.equals(42, new A.redirect(y: 7).value); - Expect.equals(28, new A.redirect(x: 7, y: 2).value); - Expect.equals(15, new A.redirect(z: 1).value); - Expect.equals(21, new A.redirect(y: 7, z: 1).value); - Expect.equals(35, new A.redirect(x: 7, z: 1).value); - Expect.equals(14, new A.redirect(x: 7, y: 2, z: 1).value); - - Expect.equals(30, new A.factory().value); - Expect.equals(70, new A.factory(x: 7).value); - Expect.equals(42, new A.factory(y: 7).value); - Expect.equals(28, new A.factory(x: 7, y: 2).value); - Expect.equals(15, new A.factory(z: 1).value); - Expect.equals(21, new A.factory(y: 7, z: 1).value); - Expect.equals(35, new A.factory(x: 7, z: 1).value); - Expect.equals(14, new A.factory(x: 7, y: 2, z: 1).value); - - Expect.equals(30, new A.redirectFactory().value); - Expect.equals(70, new A.redirectFactory(x: 7).value); - Expect.equals(42, new A.redirectFactory(y: 7).value); - Expect.equals(28, new A.redirectFactory(x: 7, y: 2).value); - Expect.equals(15, new A.redirectFactory(z: 1).value); - Expect.equals(21, new A.redirectFactory(y: 7, z: 1).value); - Expect.equals(35, new A.redirectFactory(x: 7, z: 1).value); - Expect.equals(14, new A.redirectFactory(x: 7, y: 2, z: 1).value); -} diff --git a/tests/language_2/parameter/named_parameters_test.dart b/tests/language_2/parameter/named_parameters_test.dart deleted file mode 100644 index 7f75468f0ec..00000000000 --- a/tests/language_2/parameter/named_parameters_test.dart +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing named parameters. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class NamedParametersTest { - static int F00() { - return 0; - } - - int f11() { - return 0; - } - - static int F11(int a) { - return a; - } - - int f22(int a) { - return a; - } - - static int F10([int b = 20]) { - return b; - } - - int f21([int b = 20]) { - return b; - } - - static int F21(int a, [int b = 20]) { - return 100 * a + b; - } - - int f32(int a, [int b = 20]) { - return 100 * a + b; - } - - static int F31(int a, [int b = 20, int c = 30]) { - return 100 * (100 * a + b) + c; - } - - int f42(int a, [int b = 20, int c = 30]) { - return 100 * (100 * a + b) + c; - } - - static int F41(int a, [int b = 20, int c, int d = 40]) { - return 100 * (100 * (100 * a + b) + (c == null ? 0 : c)) + d; - } - - int f52(int a, [int b = 20, int c, int d = 40]) { - return 100 * (100 * (100 * a + b) + (c == null ? 0 : c)) + d; - } - - static testMain() { - NamedParametersTest np = new NamedParametersTest(); - Expect.equals(0, F00()); - Expect.equals(0, np.f11()); - Expect.equals(10, F11(10)); - Expect.equals(10, np.f22(10)); - Expect.equals(20, F10()); - Expect.equals(20, np.f21()); - Expect.equals(20, F10(20)); - Expect.equals(20, np.f21(20)); - Expect.equals(20, F10(b:20)); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_NAMED_PARAMETER - // [cfe] No named parameter with the name 'b'. - Expect.equals(20, np.f21(b:20)); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_NAMED_PARAMETER - // [cfe] No named parameter with the name 'b'. - Expect.equals(1020, F21(10)); - Expect.equals(1020, np.f32(10)); - Expect.equals(1025, F21(10, 25)); - Expect.equals(1025, np.f32(10, 25)); - Expect.equals(1025, F21(10, b:25)); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_NAMED_PARAMETER - // [cfe] No named parameter with the name 'b'. - Expect.equals(1025, np.f32(10, b:25)); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_NAMED_PARAMETER - // [cfe] No named parameter with the name 'b'. - Expect.equals(102030, F31(10)); - Expect.equals(102030, np.f42(10)); - Expect.equals(102530, F31(10, 25)); - Expect.equals(102530, np.f42(10, 25)); - Expect.equals(102035, F31(10, c:35)); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_NAMED_PARAMETER - // [cfe] No named parameter with the name 'c'. - Expect.equals(102035, np.f42(10, c:35)); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_NAMED_PARAMETER - // [cfe] No named parameter with the name 'c'. - Expect.equals(102535, F31(10, 25, 35)); - Expect.equals(102535, np.f42(10, 25, 35)); - Expect.equals(102535, F31(10, 25, c:35)); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_NAMED_PARAMETER - // [cfe] No named parameter with the name 'c'. - Expect.equals(102535, np.f42(10, 25, c:35)); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_NAMED_PARAMETER - // [cfe] No named parameter with the name 'c'. - Expect.equals(10200040, F41(10)); - Expect.equals(10200040, np.f52(10)); - Expect.equals(10203540, F41(10, c:35)); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_NAMED_PARAMETER - // [cfe] No named parameter with the name 'c'. - Expect.equals(10203540, np.f52(10, c:35)); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_NAMED_PARAMETER - // [cfe] No named parameter with the name 'c'. - } -} - -abstract class I { - factory I() = C; - int mul(int a, [int factor]); -} - -class C implements I { - int mul(int a, [int factor = 10]) { - return a * factor; - } -} - -hello(msg, to, {from}) => '${from} sent ${msg} to ${to}'; -message() => hello("gladiolas", "possums", from: "Edna"); - -main() { - NamedParametersTest.testMain(); - var i = new I(); - Expect.equals(100, i.mul(10)); - Expect.equals(1000, i.mul(10, 100)); - var c = new C(); - Expect.equals(100, c.mul(10)); - Expect.equals(1000, c.mul(10, 100)); - Expect.equals("Edna sent gladiolas to possums", message()); -} diff --git a/tests/language_2/parameter/named_passing_false_test.dart b/tests/language_2/parameter/named_passing_false_test.dart deleted file mode 100644 index 75c79bd42bb..00000000000 --- a/tests/language_2/parameter/named_passing_false_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Dart test program for testing named parameters with 'false' passed as an -// argument. - -class TestClass { - TestClass(); - - bool method([bool value]) => value; - bool method2({bool value}) => value; - - static bool staticMethod([bool value]) => value; - static bool staticMethod2({bool value}) => value; -} - -bool globalMethod([bool value]) => value; -bool globalMethod2({bool value}) => value; - -main() { - var obj = new TestClass(); - - Expect.equals(null, obj.method()); - Expect.equals(null, obj.method2()); - Expect.equals(true, obj.method(true)); - Expect.equals(true, obj.method2(value: true)); - Expect.equals(false, obj.method(false)); - Expect.equals(false, obj.method2(value: false)); - - Expect.equals(null, TestClass.staticMethod()); - Expect.equals(null, TestClass.staticMethod2()); - Expect.equals(true, TestClass.staticMethod(true)); - Expect.equals(true, TestClass.staticMethod2(value: true)); - Expect.equals(false, TestClass.staticMethod(false)); - Expect.equals(false, TestClass.staticMethod2(value: false)); - - Expect.equals(null, globalMethod()); - Expect.equals(null, globalMethod2()); - Expect.equals(true, globalMethod(true)); - Expect.equals(true, globalMethod2(value: true)); - Expect.equals(false, globalMethod(false)); - Expect.equals(false, globalMethod2(value: false)); -} diff --git a/tests/language_2/parameter/named_passing_falsy_test.dart b/tests/language_2/parameter/named_passing_falsy_test.dart deleted file mode 100644 index 7644fff2c3a..00000000000 --- a/tests/language_2/parameter/named_passing_falsy_test.dart +++ /dev/null @@ -1,58 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Dart test program for testing named parameters with various values that might -// be implemented as 'falsy' values in a JavaScript implementation. - -class TestClass { - TestClass(); - - method([value = 100]) => value; - method2({value: 100}) => value; - - static staticMethod([value = 200]) => value; - static staticMethod2({value: 200}) => value; -} - -globalMethod([value = 300]) => value; -globalMethod2({value: 300}) => value; - -const testValues = const [0, 0.0, '', false, null]; - -testFunction(f, f2) { - Expect.isTrue(f() >= 100); - for (var v in testValues) { - Expect.equals(v, f(v)); - Expect.equals(v, f2(value: v)); - } -} - -main() { - var obj = new TestClass(); - - Expect.equals(100, obj.method()); - Expect.equals(100, obj.method2()); - Expect.equals(200, TestClass.staticMethod()); - Expect.equals(200, TestClass.staticMethod2()); - Expect.equals(300, globalMethod()); - Expect.equals(300, globalMethod2()); - - for (var v in testValues) { - Expect.equals(v, obj.method(v)); - Expect.equals(v, obj.method2(value: v)); - Expect.equals(v, TestClass.staticMethod(v)); - Expect.equals(v, TestClass.staticMethod2(value: v)); - Expect.equals(v, globalMethod(v)); - Expect.equals(v, globalMethod2(value: v)); - } - - // Test via indirect call. - testFunction(obj.method, obj.method2); - testFunction(TestClass.staticMethod, TestClass.staticMethod2); - testFunction(globalMethod, globalMethod2); -} diff --git a/tests/language_2/parameter/named_passing_null_test.dart b/tests/language_2/parameter/named_passing_null_test.dart deleted file mode 100644 index d6ab9f22796..00000000000 --- a/tests/language_2/parameter/named_passing_null_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Dart test program for testing named parameters with 'null' passed as an -// argument. - -class TestClass { - TestClass(); - - num method([value = 100]) => value; - num method2({value: 100}) => value; - - static num staticMethod([value = 200]) => value; - static num staticMethod2({value: 200}) => value; -} - -num globalMethod([value = 300]) => value; -num globalMethod2({value: 300}) => value; - -main() { - var obj = new TestClass(); - - Expect.equals(100, obj.method()); - Expect.equals(100, obj.method2()); - Expect.equals(50, obj.method(50)); - Expect.equals(50, obj.method2(value: 50)); - Expect.equals(null, obj.method(null)); - Expect.equals(null, obj.method2(value: null)); - - Expect.equals(200, TestClass.staticMethod()); - Expect.equals(200, TestClass.staticMethod2()); - Expect.equals(50, TestClass.staticMethod(50)); - Expect.equals(50, TestClass.staticMethod2(value: 50)); - Expect.equals(null, TestClass.staticMethod(null)); - Expect.equals(null, TestClass.staticMethod2(value: null)); - - Expect.equals(300, globalMethod()); - Expect.equals(300, globalMethod2()); - Expect.equals(50, globalMethod(50)); - Expect.equals(50, globalMethod2(value: 50)); - Expect.equals(null, globalMethod(null)); - Expect.equals(null, globalMethod2(value: null)); -} diff --git a/tests/language_2/parameter/named_passing_zero_test.dart b/tests/language_2/parameter/named_passing_zero_test.dart deleted file mode 100644 index 6a9b8263495..00000000000 --- a/tests/language_2/parameter/named_passing_zero_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Dart test program for testing named parameters with zero passed as an -// argument. - -class TestClass { - TestClass(); - - num method([num value = 100]) => value; - num method2({num value: 100}) => value; - - static num staticMethod([num value = 200]) => value; - static num staticMethod2({num value: 200}) => value; -} - -num globalMethod([num value = 300]) => value; -num globalMethod2({num value: 300}) => value; - -main() { - var obj = new TestClass(); - - Expect.equals(100, obj.method()); - Expect.equals(100, obj.method2()); - Expect.equals(7, obj.method(7)); - Expect.equals(7, obj.method2(value: 7)); - Expect.equals(0, obj.method(0)); - Expect.equals(0, obj.method2(value: 0)); - - Expect.equals(200, TestClass.staticMethod()); - Expect.equals(200, TestClass.staticMethod2()); - Expect.equals(7, TestClass.staticMethod(7)); - Expect.equals(7, TestClass.staticMethod2(value: 7)); - Expect.equals(0, TestClass.staticMethod(0)); - Expect.equals(0, TestClass.staticMethod2(value: 0)); - - Expect.equals(300, globalMethod()); - Expect.equals(300, globalMethod2()); - Expect.equals(7, globalMethod(7)); - Expect.equals(7, globalMethod2(value: 7)); - Expect.equals(0, globalMethod(0)); - Expect.equals(0, globalMethod2(value: 0)); -} diff --git a/tests/language_2/parameter/named_regression_test.dart b/tests/language_2/parameter/named_regression_test.dart deleted file mode 100644 index 82581a738c2..00000000000 --- a/tests/language_2/parameter/named_regression_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012, 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 regression test for dart2js bug 6015. - -class Fisk { - foo({b, a: true}) { - if (b == null) return; - throw 'broken'; - } - - bar({a, b: true}) { - if (a == null) return; - throw 'broken'; - } -} - -main() { - new Fisk().foo(a: true); - new Fisk().bar(b: true); -} diff --git a/tests/language_2/parameter/named_runtime_test.dart b/tests/language_2/parameter/named_runtime_test.dart deleted file mode 100644 index dc581352ed5..00000000000 --- a/tests/language_2/parameter/named_runtime_test.dart +++ /dev/null @@ -1,120 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 test program for testing named parameters. - -import "package:expect/expect.dart"; - -class NamedParametersTest { - static int F00() { - return 0; - } - - int f11() { - return 0; - } - - static int F11(int a) { - return a; - } - - int f22(int a) { - return a; - } - - static int F10([int b = 20]) { - return b; - } - - int f21([int b = 20]) { - return b; - } - - static int F21(int a, [int b = 20]) { - return 100 * a + b; - } - - int f32(int a, [int b = 20]) { - return 100 * a + b; - } - - static int F31(int a, [int b = 20, int c = 30]) { - return 100 * (100 * a + b) + c; - } - - int f42(int a, [int b = 20, int c = 30]) { - return 100 * (100 * a + b) + c; - } - - static int F41(int a, [int b = 20, int c, int d = 40]) { - return 100 * (100 * (100 * a + b) + (c == null ? 0 : c)) + d; - } - - int f52(int a, [int b = 20, int c, int d = 40]) { - return 100 * (100 * (100 * a + b) + (c == null ? 0 : c)) + d; - } - - static testMain() { - NamedParametersTest np = new NamedParametersTest(); - Expect.equals(0, F00()); - Expect.equals(0, np.f11()); - Expect.equals(10, F11(10)); - Expect.equals(10, np.f22(10)); - Expect.equals(20, F10()); - Expect.equals(20, np.f21()); - Expect.equals(20, F10(20)); - Expect.equals(20, np.f21(20)); - - - Expect.equals(1020, F21(10)); - Expect.equals(1020, np.f32(10)); - Expect.equals(1025, F21(10, 25)); - Expect.equals(1025, np.f32(10, 25)); - - - Expect.equals(102030, F31(10)); - Expect.equals(102030, np.f42(10)); - Expect.equals(102530, F31(10, 25)); - Expect.equals(102530, np.f42(10, 25)); - - - Expect.equals(102535, F31(10, 25, 35)); - Expect.equals(102535, np.f42(10, 25, 35)); - - - Expect.equals(10200040, F41(10)); - Expect.equals(10200040, np.f52(10)); - - - } -} - -abstract class I { - factory I() = C; - int mul(int a, [int factor]); -} - -class C implements I { - int mul(int a, [int factor = 10]) { - return a * factor; - } -} - -hello(msg, to, {from}) => '${from} sent ${msg} to ${to}'; -message() => hello("gladiolas", "possums", from: "Edna"); - -main() { - NamedParametersTest.testMain(); - var i = new I(); - Expect.equals(100, i.mul(10)); - Expect.equals(1000, i.mul(10, 100)); - var c = new C(); - Expect.equals(100, c.mul(10)); - Expect.equals(1000, c.mul(10, 100)); - Expect.equals("Edna sent gladiolas to possums", message()); -} diff --git a/tests/language_2/parameter/named_type_runtime_test.dart b/tests/language_2/parameter/named_type_runtime_test.dart deleted file mode 100644 index a9ee03a4d72..00000000000 --- a/tests/language_2/parameter/named_type_runtime_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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 test program for testing optional named parameters in type tests. - -main() { - Function anyFunction; - void acceptFunNumOptBool(void funNumOptBool(num n, {bool b})) {} - ; - void funNum(num n) {} - ; - void funNumBool(num n, bool b) {} - ; - void funNumOptBool(num n, {bool b: true}) {} - ; - void funNumOptBoolX(num n, {bool x: true}) {} - ; - anyFunction = funNum; - anyFunction = funNumBool; - anyFunction = funNumOptBool; - anyFunction = funNumOptBoolX; - acceptFunNumOptBool(funNumOptBool); - - - -} diff --git a/tests/language_2/parameter/named_type_test.dart b/tests/language_2/parameter/named_type_test.dart deleted file mode 100644 index 34dbf291987..00000000000 --- a/tests/language_2/parameter/named_type_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// 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 test program for testing optional named parameters in type tests. - -// @dart = 2.9 - -main() { - Function anyFunction; - void acceptFunNumOptBool(void funNumOptBool(num n, {bool b})) {} - ; - void funNum(num n) {} - ; - void funNumBool(num n, bool b) {} - ; - void funNumOptBool(num n, {bool b: true}) {} - ; - void funNumOptBoolX(num n, {bool x: true}) {} - ; - anyFunction = funNum; - anyFunction = funNumBool; - anyFunction = funNumOptBool; - anyFunction = funNumOptBoolX; - acceptFunNumOptBool(funNumOptBool); - acceptFunNumOptBool(funNum); - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CAST_FUNCTION - // [cfe] The local function has type 'void Function(num)' that isn't of expected type 'void Function(num, {bool b})'. - acceptFunNumOptBool(funNumBool); - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'void Function(num, bool)' can't be assigned to the parameter type 'void Function(num, {bool b})'. - acceptFunNumOptBool(funNumOptBoolX); - // ^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'void Function(num, {bool x})' can't be assigned to the parameter type 'void Function(num, {bool b})'. -} diff --git a/tests/language_2/parameter/named_with_conversions_test.dart b/tests/language_2/parameter/named_with_conversions_test.dart deleted file mode 100644 index 0e640dc76cb..00000000000 --- a/tests/language_2/parameter/named_with_conversions_test.dart +++ /dev/null @@ -1,135 +0,0 @@ -// 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. -// -// Test named arguments work as expected regardless of whether the function or -// method is called via function call syntax or method call syntax. -// VMOptions=--optimization-counter-threshold=10 - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -Validate(tag, a, b) { - // tag encodes which parameters are passed in with values a: 111, b: 222. - if (tag == 'ab') { - Expect.equals(a, 111); - Expect.equals(b, 222); - } - if (tag == 'a') { - Expect.equals(a, 111); - Expect.equals(b, 20); - } - if (tag == 'b') { - Expect.equals(a, 10); - Expect.equals(b, 222); - } - if (tag == '') { - Expect.equals(a, 10); - Expect.equals(b, 20); - } -} - -class HasMethod { - int calls = 0; - - HasMethod(); - - foo(tag, [a = 10, b = 20]) { - calls += 1; - Validate(tag, a, b); - } - - foo2(tag, {a: 10, b: 20}) { - calls += 1; - Validate(tag, a, b); - } -} - -class HasField { - int calls = 0; - dynamic foo, foo2; - - HasField() { - foo = makeFoo(this); - foo2 = makeFoo2(this); - } - - makeFoo(owner) { - // This function is closed-over 'owner'. - return (tag, [a = 10, b = 20]) { - owner.calls += 1; - Validate(tag, a, b); - }; - } - - makeFoo2(owner) { - // This function is closed-over 'owner'. - return (tag, {a: 10, b: 20}) { - owner.calls += 1; - Validate(tag, a, b); - }; - } -} - -class NamedParametersWithConversionsTest { - static testMethodCallSyntax(a) { - a.foo(''); - a.foo('a', 111); - a.foo('ab', 111, 222); - a.foo2('a', a: 111); - a.foo2('b', b: 222); - a.foo2('ab', a: 111, b: 222); - a.foo2('ab', b: 222, a: 111); - - Expect.equals(7, a.calls); - - Expect.throwsNoSuchMethodError(() => a.foo()); // Too few arguments. - Expect.throwsNoSuchMethodError( - () => a.foo('abc', 1, 2, 3)); // Too many arguments. - Expect.throwsNoSuchMethodError(() => a.foo2('c', c: 1)); // Bad name. - Expect.throwsNoSuchMethodError( - () => a.foo2('c', a: 111, c: 1)); // Bad name. - - Expect.equals(7, a.calls); - } - - static testFunctionCallSyntax(a) { - var f = a.foo; - var f2 = a.foo2; - f(''); - f('a', 111); - f('ab', 111, 222); - f2('a', a: 111); - f2('b', b: 222); - f2('ab', a: 111, b: 222); - f2('ab', b: 222, a: 111); - - Expect.equals(7, a.calls); - - Expect.throwsNoSuchMethodError(() => f()); // Too few arguments. - Expect.throwsNoSuchMethodError( - () => f('abc', 1, 2, 3)); // Too many arguments. - Expect.throwsNoSuchMethodError(() => f2('c', c: 1)); // Bad name. - Expect.throwsNoSuchMethodError(() => f2('c', a: 111, c: 1)); // Bad name. - - Expect.equals(7, a.calls); - } - - static testMain() { - // 'Plain' calls where the method/field syntax matches the object. - testMethodCallSyntax(new HasMethod()); - testFunctionCallSyntax(new HasField()); - - // 'Conversion' calls where method/field call syntax does not match the - // object. - testMethodCallSyntax(new HasField()); - testFunctionCallSyntax(new HasMethod()); - } -} - -main() { - for (var i = 0; i < 20; i++) { - NamedParametersWithConversionsTest.testMain(); - } -} diff --git a/tests/language_2/parameter/named_with_dollars_test.dart b/tests/language_2/parameter/named_with_dollars_test.dart deleted file mode 100644 index 644771f30e8..00000000000 --- a/tests/language_2/parameter/named_with_dollars_test.dart +++ /dev/null @@ -1,93 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Test to stress Frog's named parameter scheme. - -main() { - testDollar(); - testPsycho(); -} - -class TestClass { - method({a, b, a$b, a$$b}) => [a, b, a$b, a$$b]; - - psycho({$, $$, $$$, $$$$}) => [$, $$, $$$, $$$$]; -} - -globalMethod({a, b, a$b, a$$b}) => [a, b, a$b, a$$b]; - -format(thing) { - if (thing == null) return '-'; - if (thing is List) { - var fragments = ['[']; - var sep; - for (final item in thing) { - if (sep != null) fragments.add(sep); - sep = ', '; - fragments.add(format(item)); - } - fragments.add(']'); - return fragments.join(); - } - return thing.toString(); -} - -// Hopefully inscrutable to static analysis. -makeTestClass(n) => [new TestClass(), new Decoy(), 'string'][n % 3]; - -class Decoy { - method([a$b, b, a]) { - throw new UnimplementedError(); - } - - psycho([$$$, $$, $]) { - throw new UnimplementedError(); - } -} - -testDollar() { - Expect.equals('[]', format([])); - - Expect.equals('[-, -, -, -]', format(globalMethod())); - Expect.equals('[1, 2, -, -]', format(globalMethod(a: 1, b: 2))); - Expect.equals('[1, 2, -, -]', format(globalMethod(b: 2, a: 1))); - Expect.equals('[-, -, 3, -]', format(globalMethod(a$b: 3))); - Expect.equals('[-, -, -, 4]', format(globalMethod(a$$b: 4))); - - TestClass t = new TestClass(); // Statically typed. - - Expect.equals('[-, -, -, -]', format(t.method())); - Expect.equals('[1, 2, -, -]', format(t.method(a: 1, b: 2))); - Expect.equals('[1, 2, -, -]', format(t.method(b: 2, a: 1))); - Expect.equals('[-, -, 3, -]', format(t.method(a$b: 3))); - Expect.equals('[-, -, -, 4]', format(t.method(a$$b: 4))); - - var obj = makeTestClass(0); - - Expect.equals('[-, -, -, -]', format(obj.method())); - Expect.equals('[1, 2, -, -]', format(obj.method(a: 1, b: 2))); - Expect.equals('[1, 2, -, -]', format(obj.method(b: 2, a: 1))); - Expect.equals('[-, -, 3, -]', format(obj.method(a$b: 3))); - Expect.equals('[-, -, -, 4]', format(obj.method(a$$b: 4))); -} - -testPsycho() { - TestClass t = new TestClass(); // Statically typed. - - Expect.equals('[1, 2, 3, -]', format(t.psycho($: 1, $$: 2, $$$: 3))); - Expect.equals('[1, 2, 3, -]', format(t.psycho($$$: 3, $$: 2, $: 1))); - Expect.equals('[1, 2, -, -]', format(t.psycho($: 1, $$: 2))); - Expect.equals('[-, -, -, 4]', format(t.psycho($$$$: 4))); - - var obj = makeTestClass(0); - - Expect.equals('[1, 2, -, -]', format(obj.psycho($: 1, $$: 2))); - Expect.equals('[-, -, -, 4]', format(obj.psycho($$$$: 4))); - Expect.equals('[1, 2, 3, -]', format(obj.psycho($: 1, $$: 2, $$$: 3))); - Expect.equals('[1, 2, 3, -]', format(obj.psycho($$$: 3, $$: 2, $: 1))); -} diff --git a/tests/language_2/parameter/named_with_object_property_names_test.dart b/tests/language_2/parameter/named_with_object_property_names_test.dart deleted file mode 100644 index b448f2097eb..00000000000 --- a/tests/language_2/parameter/named_with_object_property_names_test.dart +++ /dev/null @@ -1,247 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Test for named parameter with the name of a JavaScript property found on -// 'Object'. For such a NAME, foo.NAME may exist in an empty map, i.e. -// 'toString' in {} --> true. - -main() { - // Test properties found on instances of Object in Chrome 15 and Firefox 6. - test_constructor(); - test_hasOwnProperty(); - test_isPrototypeOf(); - test_propertyIsEnumerable(); - test_toSource(); - test_toLocaleString(); - test_toString(); - test_unwatch(); - test_valueOf(); - test_watch(); -} - -// 'constructor' property. - -class TestClass_constructor { - method({constructor}) => constructor; - static staticMethod({constructor}) => constructor; -} - -globalMethod_constructor({constructor}) => constructor; - -test_constructor() { - var obj = new TestClass_constructor(); - - Expect.equals(null, obj.method()); - Expect.equals(0, obj.method(constructor: 0)); - - Expect.equals(null, TestClass_constructor.staticMethod()); - Expect.equals(0, TestClass_constructor.staticMethod(constructor: 0)); - - Expect.equals(null, globalMethod_constructor()); - Expect.equals(0, globalMethod_constructor(constructor: 0)); -} - -// 'hasOwnProperty' property. - -class TestClass_hasOwnProperty { - method({hasOwnProperty}) => hasOwnProperty; - static staticMethod({hasOwnProperty}) => hasOwnProperty; -} - -globalMethod_hasOwnProperty({hasOwnProperty}) => hasOwnProperty; - -test_hasOwnProperty() { - var obj = new TestClass_hasOwnProperty(); - - Expect.equals(null, obj.method()); - Expect.equals(0, obj.method(hasOwnProperty: 0)); - - Expect.equals(null, TestClass_hasOwnProperty.staticMethod()); - Expect.equals(0, TestClass_hasOwnProperty.staticMethod(hasOwnProperty: 0)); - - Expect.equals(null, globalMethod_hasOwnProperty()); - Expect.equals(0, globalMethod_hasOwnProperty(hasOwnProperty: 0)); -} - -// 'isPrototypeOf' property. - -class TestClass_isPrototypeOf { - method({isPrototypeOf}) => isPrototypeOf; - static staticMethod({isPrototypeOf}) => isPrototypeOf; -} - -globalMethod_isPrototypeOf({isPrototypeOf}) => isPrototypeOf; - -test_isPrototypeOf() { - var obj = new TestClass_isPrototypeOf(); - - Expect.equals(null, obj.method()); - Expect.equals(0, obj.method(isPrototypeOf: 0)); - - Expect.equals(null, TestClass_isPrototypeOf.staticMethod()); - Expect.equals(0, TestClass_isPrototypeOf.staticMethod(isPrototypeOf: 0)); - - Expect.equals(null, globalMethod_isPrototypeOf()); - Expect.equals(0, globalMethod_isPrototypeOf(isPrototypeOf: 0)); -} - -// 'propertyIsEnumerable' property. - -class TestClass_propertyIsEnumerable { - method({propertyIsEnumerable}) => propertyIsEnumerable; - static staticMethod({propertyIsEnumerable}) => propertyIsEnumerable; -} - -globalMethod_propertyIsEnumerable({propertyIsEnumerable}) => - propertyIsEnumerable; - -test_propertyIsEnumerable() { - var obj = new TestClass_propertyIsEnumerable(); - - Expect.equals(null, obj.method()); - Expect.equals(0, obj.method(propertyIsEnumerable: 0)); - - Expect.equals(null, TestClass_propertyIsEnumerable.staticMethod()); - Expect.equals( - 0, TestClass_propertyIsEnumerable.staticMethod(propertyIsEnumerable: 0)); - - Expect.equals(null, globalMethod_propertyIsEnumerable()); - Expect.equals(0, globalMethod_propertyIsEnumerable(propertyIsEnumerable: 0)); -} - -// 'toSource' property. - -class TestClass_toSource { - method({toSource}) => toSource; - static staticMethod({toSource}) => toSource; -} - -globalMethod_toSource({toSource}) => toSource; - -test_toSource() { - var obj = new TestClass_toSource(); - - Expect.equals(null, obj.method()); - Expect.equals(0, obj.method(toSource: 0)); - - Expect.equals(null, TestClass_toSource.staticMethod()); - Expect.equals(0, TestClass_toSource.staticMethod(toSource: 0)); - - Expect.equals(null, globalMethod_toSource()); - Expect.equals(0, globalMethod_toSource(toSource: 0)); -} - -// 'toLocaleString' property. - -class TestClass_toLocaleString { - method({toLocaleString}) => toLocaleString; - static staticMethod({toLocaleString}) => toLocaleString; -} - -globalMethod_toLocaleString({toLocaleString}) => toLocaleString; - -test_toLocaleString() { - var obj = new TestClass_toLocaleString(); - - Expect.equals(null, obj.method()); - Expect.equals(0, obj.method(toLocaleString: 0)); - - Expect.equals(null, TestClass_toLocaleString.staticMethod()); - Expect.equals(0, TestClass_toLocaleString.staticMethod(toLocaleString: 0)); - - Expect.equals(null, globalMethod_toLocaleString()); - Expect.equals(0, globalMethod_toLocaleString(toLocaleString: 0)); -} - -// 'toString' property. - -class TestClass_toString { - method({toString}) => toString; - static staticMethod({toString}) => toString; -} - -globalMethod_toString({toString}) => toString; - -test_toString() { - var obj = new TestClass_toString(); - - Expect.equals(null, obj.method()); - Expect.equals(0, obj.method(toString: 0)); - - Expect.equals(null, TestClass_toString.staticMethod()); - Expect.equals(0, TestClass_toString.staticMethod(toString: 0)); - - Expect.equals(null, globalMethod_toString()); - Expect.equals(0, globalMethod_toString(toString: 0)); -} - -// 'unwatch' property. - -class TestClass_unwatch { - method({unwatch}) => unwatch; - static staticMethod({unwatch}) => unwatch; -} - -globalMethod_unwatch({unwatch}) => unwatch; - -test_unwatch() { - var obj = new TestClass_unwatch(); - - Expect.equals(null, obj.method()); - Expect.equals(0, obj.method(unwatch: 0)); - - Expect.equals(null, TestClass_unwatch.staticMethod()); - Expect.equals(0, TestClass_unwatch.staticMethod(unwatch: 0)); - - Expect.equals(null, globalMethod_unwatch()); - Expect.equals(0, globalMethod_unwatch(unwatch: 0)); -} - -// 'valueOf' property. - -class TestClass_valueOf { - method({valueOf}) => valueOf; - static staticMethod({valueOf}) => valueOf; -} - -globalMethod_valueOf({valueOf}) => valueOf; - -test_valueOf() { - var obj = new TestClass_valueOf(); - - Expect.equals(null, obj.method()); - Expect.equals(0, obj.method(valueOf: 0)); - - Expect.equals(null, TestClass_valueOf.staticMethod()); - Expect.equals(0, TestClass_valueOf.staticMethod(valueOf: 0)); - - Expect.equals(null, globalMethod_valueOf()); - Expect.equals(0, globalMethod_valueOf(valueOf: 0)); -} - -// 'watch' property. - -class TestClass_watch { - method({watch}) => watch; - static staticMethod({watch}) => watch; -} - -globalMethod_watch({watch}) => watch; - -test_watch() { - var obj = new TestClass_watch(); - - Expect.equals(null, obj.method()); - Expect.equals(0, obj.method(watch: 0)); - - Expect.equals(null, TestClass_watch.staticMethod()); - Expect.equals(0, TestClass_watch.staticMethod(watch: 0)); - - Expect.equals(null, globalMethod_watch()); - Expect.equals(0, globalMethod_watch(watch: 0)); -} diff --git a/tests/language_2/parameter/optional_named_runtime_test.dart b/tests/language_2/parameter/optional_named_runtime_test.dart deleted file mode 100644 index 2809398dc3d..00000000000 --- a/tests/language_2/parameter/optional_named_runtime_test.dart +++ /dev/null @@ -1,108 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 test program for testing optional named parameters. - -import "package:expect/expect.dart"; - -class OptionalNamedParametersTest { - static int F00() { - return 0; - } - - int f11() { - return 0; - } - - static int F11(int a) { - return a; - } - - int f22(int a) { - return a; - } - - static int F10({int b: 20}) { - return b; - } - - int f21({int b: 20}) { - return b; - } - - static int F21(int a, {int b: 20}) { - return 100 * a + b; - } - - int f32(int a, {int b: 20}) { - return 100 * a + b; - } - - static int F31(int a, {int b: 20, int c: 30}) { - return 100 * (100 * a + b) + c; - } - - int f42(int a, {int b: 20, int c: 30}) { - return 100 * (100 * a + b) + c; - } - - static int F41(int a, {int b: 20, int c, int d: 40}) { - return 100 * (100 * (100 * a + b) + ((c != null) ? c : 0)) + d; - } - - int f52(int a, {int b: 20, int c, int d: 40}) { - return 100 * (100 * (100 * a + b) + ((c != null) ? c : 0)) + d; - } - - static void test() { - OptionalNamedParametersTest np = new OptionalNamedParametersTest(); - Expect.equals(0, F00()); - Expect.equals(0, np.f11()); - Expect.equals(10, F11(10)); - Expect.equals(10, np.f22(10)); - Expect.equals(20, F10()); - Expect.equals(20, np.f21()); - - - Expect.equals(20, F10(b: 20)); - Expect.equals(20, np.f21(b: 20)); - Expect.equals(1020, F21(10)); - Expect.equals(1020, np.f32(10)); - - - Expect.equals(1025, F21(10, b: 25)); - Expect.equals(1025, np.f32(10, b: 25)); - Expect.equals(102030, F31(10)); - Expect.equals(102030, np.f42(10)); - - - Expect.equals(102530, F31(10, b: 25)); - Expect.equals(102530, np.f42(10, b: 25)); - Expect.equals(102035, F31(10, c: 35)); - Expect.equals(102035, np.f42(10, c: 35)); - Expect.equals(102535, F31(10, b: 25, c: 35)); - Expect.equals(102535, np.f42(10, b: 25, c: 35)); - - - Expect.equals(102535, F31(10, c: 35, b: 25)); - Expect.equals(102535, np.f42(10, c: 35, b: 25)); - Expect.equals(10200040, F41(10)); - Expect.equals(10200040, np.f52(10)); - Expect.equals(10203540, F41(10, c: 35)); - Expect.equals(10203540, np.f52(10, c: 35)); - Expect.equals(10250045, F41(10, d: 45, b: 25)); - - Expect.equals(10250045, np.f52(10, d: 45, b: 25)); - Expect.equals(10253545, F41(10, d: 45, c: 35, b: 25)); - Expect.equals(10253545, np.f52(10, d: 45, c: 35, b: 25)); - } -} - -main() { - OptionalNamedParametersTest.test(); -} diff --git a/tests/language_2/parameter/optional_named_test.dart b/tests/language_2/parameter/optional_named_test.dart deleted file mode 100644 index 17a32922c8e..00000000000 --- a/tests/language_2/parameter/optional_named_test.dart +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing optional named parameters. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class OptionalNamedParametersTest { - static int F00() { - return 0; - } - - int f11() { - return 0; - } - - static int F11(int a) { - return a; - } - - int f22(int a) { - return a; - } - - static int F10({int b: 20}) { - return b; - } - - int f21({int b: 20}) { - return b; - } - - static int F21(int a, {int b: 20}) { - return 100 * a + b; - } - - int f32(int a, {int b: 20}) { - return 100 * a + b; - } - - static int F31(int a, {int b: 20, int c: 30}) { - return 100 * (100 * a + b) + c; - } - - int f42(int a, {int b: 20, int c: 30}) { - return 100 * (100 * a + b) + c; - } - - static int F41(int a, {int b: 20, int c, int d: 40}) { - return 100 * (100 * (100 * a + b) + ((c != null) ? c : 0)) + d; - } - - int f52(int a, {int b: 20, int c, int d: 40}) { - return 100 * (100 * (100 * a + b) + ((c != null) ? c : 0)) + d; - } - - static void test() { - OptionalNamedParametersTest np = new OptionalNamedParametersTest(); - Expect.equals(0, F00()); - Expect.equals(0, np.f11()); - Expect.equals(10, F11(10)); - Expect.equals(10, np.f22(10)); - Expect.equals(20, F10()); - Expect.equals(20, np.f21()); - Expect.equals(20, F10(20)); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED - // ^^^^ - // [cfe] Too many positional arguments: 0 allowed, but 1 found. - Expect.equals(20, np.f21(20)); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED - // ^^^^ - // [cfe] Too many positional arguments: 0 allowed, but 1 found. - Expect.equals(20, F10(b: 20)); - Expect.equals(20, np.f21(b: 20)); - Expect.equals(1020, F21(10)); - Expect.equals(1020, np.f32(10)); - Expect.equals(1025, F21(10, 25)); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED - // ^^^^^^^^ - // [cfe] Too many positional arguments: 1 allowed, but 2 found. - Expect.equals(1025, np.f32(10, 25)); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED - // ^^^^^^^^ - // [cfe] Too many positional arguments: 1 allowed, but 2 found. - Expect.equals(1025, F21(10, b: 25)); - Expect.equals(1025, np.f32(10, b: 25)); - Expect.equals(102030, F31(10)); - Expect.equals(102030, np.f42(10)); - Expect.equals(102530, F31(10, 25)); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED - // ^^^^^^^^ - // [cfe] Too many positional arguments: 1 allowed, but 2 found. - Expect.equals(102530, np.f42(10, 25)); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED - // ^^^^^^^^ - // [cfe] Too many positional arguments: 1 allowed, but 2 found. - Expect.equals(102530, F31(10, b: 25)); - Expect.equals(102530, np.f42(10, b: 25)); - Expect.equals(102035, F31(10, c: 35)); - Expect.equals(102035, np.f42(10, c: 35)); - Expect.equals(102535, F31(10, b: 25, c: 35)); - Expect.equals(102535, np.f42(10, b: 25, c: 35)); - Expect.equals(102535, F31(10, 25, c:35)); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED - // ^^^^^^^^^^^^^^ - // [cfe] Too many positional arguments: 1 allowed, but 2 found. - Expect.equals(102535, np.f42(10, 25, c:35)); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED - // ^^^^^^^^^^^^^^ - // [cfe] Too many positional arguments: 1 allowed, but 2 found. - Expect.equals(102535, F31(10, c: 35, b: 25)); - Expect.equals(102535, np.f42(10, c: 35, b: 25)); - Expect.equals(10200040, F41(10)); - Expect.equals(10200040, np.f52(10)); - Expect.equals(10203540, F41(10, c: 35)); - Expect.equals(10203540, np.f52(10, c: 35)); - Expect.equals(10250045, F41(10, d: 45, b: 25)); - Expect.equals(10250045, F41(10, 25, d:45)); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED - // ^^^^^^^^^^^^^^ - // [cfe] Too many positional arguments: 1 allowed, but 2 found. - Expect.equals(10250045, np.f52(10, d: 45, b: 25)); - Expect.equals(10253545, F41(10, d: 45, c: 35, b: 25)); - Expect.equals(10253545, np.f52(10, d: 45, c: 35, b: 25)); - } -} - -main() { - OptionalNamedParametersTest.test(); -} diff --git a/tests/language_2/parameter/param_test.dart b/tests/language_2/parameter/param_test.dart deleted file mode 100644 index 579bf6edadb..00000000000 --- a/tests/language_2/parameter/param_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// 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 test program for testing params. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Helper { - static int foo(int i) { - var b; - b = i + 1; - return b; - } -} - -class ParamTest { - static testMain() { - Expect.equals(2, Helper.foo(1)); - } -} - -main() { - ParamTest.testMain(); -} diff --git a/tests/language_2/parameter/parameter1_test.dart b/tests/language_2/parameter/parameter1_test.dart deleted file mode 100644 index 67de1cb7b9e..00000000000 --- a/tests/language_2/parameter/parameter1_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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 test program for testing params. - -// @dart = 2.9 - -class Param1Test { - // TODO(asiva): Should we try to interpret 1 above as an int? In order to - // avoid a type error with --enable_type_checks, the type of i below is - // changed from int to String. - // static int testMain(String s, int i) { return i; } - static int testMain() { - return 0; - } -} - -main() { - Param1Test.testMain(); -} diff --git a/tests/language_2/parameter/parameter2_test.dart b/tests/language_2/parameter/parameter2_test.dart deleted file mode 100644 index 67ae462dde0..00000000000 --- a/tests/language_2/parameter/parameter2_test.dart +++ /dev/null @@ -1,65 +0,0 @@ -// 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 test program for testing function type parameters. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Param2Test { - static forEach(List a, int f(int k)) { - for (int i = 0; i < a.length; i++) { - a[i] = f(a[i]); - } - } - - static int apply(f(int k), int arg) { - var res = f(arg); - return res; - } - - static exists(List a, f(e)) { - for (int i = 0; i < a.length; i++) { - if (f(a[i])) return true; - } - return false; - } - - static testMain() { - int square(int x) { - return x * x; - } - - Expect.equals(4, apply(square, 2)); - Expect.equals(100, apply(square, 10)); - - var v = [1, 2, 3, 4, 5, 6]; - forEach(v, square); - Expect.equals(1, v[0]); - Expect.equals(4, v[1]); - Expect.equals(9, v[2]); - Expect.equals(16, v[3]); - Expect.equals(25, v[4]); - Expect.equals(36, v[5]); - - isOdd(element) { - return element % 2 == 1; - } - - Expect.equals(true, exists([3, 5, 7, 11, 13], isOdd)); - Expect.equals(false, exists([2, 4, 10], isOdd)); - Expect.equals(false, exists([], isOdd)); - - v = [4, 5, 7]; - Expect.equals(true, exists(v, (e) => e % 2 == 1)); - Expect.equals(false, exists(v, (e) => e == 6)); - - var isZero = (e) => e == 0; - Expect.equals(false, exists(v, isZero)); - } -} - -main() { - Param2Test.testMain(); -} diff --git a/tests/language_2/parameter/positional_type_runtime_test.dart b/tests/language_2/parameter/positional_type_runtime_test.dart deleted file mode 100644 index 50901a37127..00000000000 --- a/tests/language_2/parameter/positional_type_runtime_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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 test program for testing optional positional parameters in type tests. - -main() { - Function anyFunction; - void acceptFunNumOptBool(void funNumOptBool(num n, [bool b])) {} - void funNum(num n) {} - void funNumBool(num n, bool b) {} - void funNumOptBool(num n, [bool b = true]) {} - void funNumOptBoolX(num n, [bool x = true]) {} - - anyFunction = funNum; - anyFunction = funNumBool; - anyFunction = funNumOptBool; - anyFunction = funNumOptBoolX; - acceptFunNumOptBool(funNumOptBool); - acceptFunNumOptBool(funNumOptBoolX); - - -} diff --git a/tests/language_2/parameter/positional_type_test.dart b/tests/language_2/parameter/positional_type_test.dart deleted file mode 100644 index 8e96699f8b9..00000000000 --- a/tests/language_2/parameter/positional_type_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// 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 test program for testing optional positional parameters in type tests. - -// @dart = 2.9 - -main() { - Function anyFunction; - void acceptFunNumOptBool(void funNumOptBool(num n, [bool b])) {} - void funNum(num n) {} - void funNumBool(num n, bool b) {} - void funNumOptBool(num n, [bool b = true]) {} - void funNumOptBoolX(num n, [bool x = true]) {} - - anyFunction = funNum; - anyFunction = funNumBool; - anyFunction = funNumOptBool; - anyFunction = funNumOptBoolX; - acceptFunNumOptBool(funNumOptBool); - acceptFunNumOptBool(funNumOptBoolX); - acceptFunNumOptBool(funNum); - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CAST_FUNCTION - // [cfe] The local function has type 'void Function(num)' that isn't of expected type 'void Function(num, [bool])'. - acceptFunNumOptBool(funNumBool); - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CAST_FUNCTION - // [cfe] The local function has type 'void Function(num, bool)' that isn't of expected type 'void Function(num, [bool])'. -} diff --git a/tests/language_2/parameter/types_specialization_test.dart b/tests/language_2/parameter/types_specialization_test.dart deleted file mode 100644 index 5dae22ef3d7..00000000000 --- a/tests/language_2/parameter/types_specialization_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2012, 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. -// Test that we invalidate parameter type optimization in the presence -// of optional parameters. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - void foo(bool firstInvocation, [a = 42, b = 'foo']) { - if (firstInvocation) { - Expect.isTrue(a is String); - Expect.isTrue(b is int); - } else { - Expect.isTrue(a is int); - Expect.isTrue(b is String); - } - } -} - -test() { - // This call to [A.foo] will be in the queue after [A.foo] has been - // compiled with the optimistic type assumptions. - new A().foo(false); -} - -main() { - test(); - // This call to [A.foo] will be the first in the queue, and dart2js - // will optimize the method with these parameter types. - new A().foo(true, 'bar', 42); -} diff --git a/tests/language_2/part/missing_part_of_tag_part.dart b/tests/language_2/part/missing_part_of_tag_part.dart deleted file mode 100644 index 479f0d492f9..00000000000 --- a/tests/language_2/part/missing_part_of_tag_part.dart +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright (c) 2013, 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 diff --git a/tests/language_2/part/missing_part_of_tag_test.dart b/tests/language_2/part/missing_part_of_tag_test.dart deleted file mode 100644 index 5ac9b502b01..00000000000 --- a/tests/language_2/part/missing_part_of_tag_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test for missing part-of tag. - -library lib; - -part 'missing_part_of_tag_part.dart'; //# 01: compile-time error - -void main() {} diff --git a/tests/language_2/part/of_multiple_libs_lib.dart b/tests/language_2/part/of_multiple_libs_lib.dart deleted file mode 100644 index 9eebf167d41..00000000000 --- a/tests/language_2/part/of_multiple_libs_lib.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2018, 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 ambiguous_lib; - -part "of_multiple_libs_part.dart"; - -test() { - foo(); -} diff --git a/tests/language_2/part/of_multiple_libs_part.dart b/tests/language_2/part/of_multiple_libs_part.dart deleted file mode 100644 index 023bab5ba09..00000000000 --- a/tests/language_2/part/of_multiple_libs_part.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2018, 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 - -part of ambiguous_lib; - -bar() {} - -foo() { - bar(); -} diff --git a/tests/language_2/part/of_multiple_libs_runtime_test.dart b/tests/language_2/part/of_multiple_libs_runtime_test.dart deleted file mode 100644 index 96cfb95578d..00000000000 --- a/tests/language_2/part/of_multiple_libs_runtime_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 ambiguous_lib; - - - -part "of_multiple_libs_part.dart"; - -main() { - foo(); -} diff --git a/tests/language_2/part/of_multiple_libs_test.dart b/tests/language_2/part/of_multiple_libs_test.dart deleted file mode 100644 index 3fa76ca9d33..00000000000 --- a/tests/language_2/part/of_multiple_libs_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2018, 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 ambiguous_lib; - -import 'of_multiple_libs_lib.dart'; - -part "of_multiple_libs_part.dart"; - -//^ -// [cfe] Method not found: 'foo'. -main() { - foo(); -} diff --git a/tests/language_2/part/of_uri2_part.dart b/tests/language_2/part/of_uri2_part.dart deleted file mode 100644 index 11ee3f446a9..00000000000 --- a/tests/language_2/part/of_uri2_part.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2017, 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 - -part of "of_uri2_test.dart"; - -// Refer to declaration in library and other part. -const bar1 = "part1"; -const baz1 = "$foo${bar2}1"; diff --git a/tests/language_2/part/of_uri2_part2.dart b/tests/language_2/part/of_uri2_part2.dart deleted file mode 100644 index bb093eb1c62..00000000000 --- a/tests/language_2/part/of_uri2_part2.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2017, 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 - -part of part_of_uri2; - -// Refer to declaration in library and other part. -const bar2 = "part2"; -const baz2 = "$foo${bar1}2"; diff --git a/tests/language_2/part/of_uri2_test.dart b/tests/language_2/part/of_uri2_test.dart deleted file mode 100644 index 1b63b563b1e..00000000000 --- a/tests/language_2/part/of_uri2_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2017, 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 part_of_uri2; - -part "of_uri2_part.dart"; // declares bar1, baz1, uses URI. -part "of_uri2_part2.dart"; // declares bar2, baz2, uses id. - -const foo = 'foo'; -const qux = "$baz1$baz2"; - -main() { - if (!identical(qux, "foopart21foopart12")) throw "Fail: $qux"; -} diff --git a/tests/language_2/part/of_uri_part.dart b/tests/language_2/part/of_uri_part.dart deleted file mode 100644 index 6c9c1005244..00000000000 --- a/tests/language_2/part/of_uri_part.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2017, 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 - -part of "of_uri_test.dart"; - -// Refer to declaration in library and other part. -const bar1 = "part1"; -const baz1 = "$foo${bar2}1"; diff --git a/tests/language_2/part/of_uri_part2.dart b/tests/language_2/part/of_uri_part2.dart deleted file mode 100644 index ec19b10834f..00000000000 --- a/tests/language_2/part/of_uri_part2.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2017, 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 - -part of "of_uri_test.dart"; - -// Refer to declaration in library and other part. -const bar2 = "part2"; -const baz2 = "$foo${bar1}2"; diff --git a/tests/language_2/part/of_uri_test.dart b/tests/language_2/part/of_uri_test.dart deleted file mode 100644 index a1cef5633ff..00000000000 --- a/tests/language_2/part/of_uri_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2017, 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 - -// No library declaration -part "of_uri_part.dart"; // declares bar1, baz1 -part "of_uri_part2.dart"; // declares bar2, baz2 - -const foo = 'foo'; -const qux = "$baz1$baz2"; - -main() { - if (!identical(qux, "foopart21foopart12")) throw "Fail: $qux"; -} diff --git a/tests/language_2/part/part.dart b/tests/language_2/part/part.dart deleted file mode 100644 index 3e283596f3c..00000000000 --- a/tests/language_2/part/part.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2012, 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 - -part of org.dartlang.test.part_test; - -const foo = 'foo'; diff --git a/tests/language_2/part/part2_test.dart b/tests/language_2/part/part2_test.dart deleted file mode 100644 index dd92d83133e..00000000000 --- a/tests/language_2/part/part2_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2012, 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 org.dartlang.test.part2_test; - -part "part.dart"; //# 01: compile-time error - -main() { - print(foo); //# 01: continued -} diff --git a/tests/language_2/part/part_test.dart b/tests/language_2/part/part_test.dart deleted file mode 100644 index f4829e7eeda..00000000000 --- a/tests/language_2/part/part_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2012, 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 org.dartlang.test.part_test; - -part "part.dart"; - -main() { - print(foo); -} diff --git a/tests/language_2/part/refers_to_core_library_runtime_test.dart b/tests/language_2/part/refers_to_core_library_runtime_test.dart deleted file mode 100644 index 9b10a6c4558..00000000000 --- a/tests/language_2/part/refers_to_core_library_runtime_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -// This test reproduces https://github.com/dart-lang/sdk/issues/29709. - -library dart.async; - - - -main() {} diff --git a/tests/language_2/part/self_test.dart b/tests/language_2/part/self_test.dart deleted file mode 100644 index 8298f3cb21f..00000000000 --- a/tests/language_2/part/self_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// 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. - -// @dart = 2.9 - -part "self_test.dart"; -// ^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.PART_OF_NON_PART - -main() { - print('should not be able to recursively include self as library part'); -} diff --git a/tests/language_2/prefix/assignment_runtime_test.dart b/tests/language_2/prefix/assignment_runtime_test.dart deleted file mode 100644 index de7ec2b5c4a..00000000000 --- a/tests/language_2/prefix/assignment_runtime_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Validate that assignment to a prefix is handled consistently with the -// following spec text from section 16.19 (Assignment): -// Evaluation of an assignment a of the form v = e proceeds as follows: -// Let d be the innermost declaration whose name is v or v=, if it exists. -// It is a compile-time error if d denotes a prefix object. - -import "empty_library.dart" as p; - -class Base { - var p; -} - -class Derived extends Base { - void f() { - - } -} - -main() { - new Derived().f(); - -} diff --git a/tests/language_2/prefix/assignment_test.dart b/tests/language_2/prefix/assignment_test.dart deleted file mode 100644 index bed611979ce..00000000000 --- a/tests/language_2/prefix/assignment_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2015, 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 - -// Validate that assignment to a prefix is handled consistently with the -// following spec text from section 16.19 (Assignment): -// Evaluation of an assignment a of the form v = e proceeds as follows: -// Let d be the innermost declaration whose name is v or v=, if it exists. -// It is a compile-time error if d denotes a prefix object. - -import "empty_library.dart" as p; - -class Base { - var p; -} - -class Derived extends Base { - void f() { - p = 1; -// ^ -// [analyzer] COMPILE_TIME_ERROR.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT -// [cfe] A prefix can't be used as an expression. - } -} - -main() { - new Derived().f(); - p = 1; -//^ -// [analyzer] COMPILE_TIME_ERROR.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT -// [cfe] A prefix can't be used as an expression. -} diff --git a/tests/language_2/prefix/empty_library.dart b/tests/language_2/prefix/empty_library.dart deleted file mode 100644 index 073586f598d..00000000000 --- a/tests/language_2/prefix/empty_library.dart +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) 2015, 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 empty_library; diff --git a/tests/language_2/prefix/identifier_reference_test.dart b/tests/language_2/prefix/identifier_reference_test.dart deleted file mode 100644 index 6dcb682899e..00000000000 --- a/tests/language_2/prefix/identifier_reference_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2015, 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 - -// Validate the following spec text from section 16.32 (Identifier Reference): -// Evaluation of an identifier expression e of the form id proceeds as -// follows: -// Let d be the innermost declaration in the enclosing lexical scope whose -// name is id or id=. If no such declaration exists in the lexical scope, -// d be the declaration of the inherited member named id if it exists. -// - If d is a prefix p, a compile-time error occurs unless the token -// immediately following d is '.'. - -import "package:expect/expect.dart"; -import "empty_library.dart" as p; - -void f(x) {} - -main() { - f(p); // //# 01: compile-time error - var x = p; // //# 02: compile-time error - var x = p[0]; //# 03: compile-time error - p[0] = null; // //# 04: compile-time error - p += 0; // //# 05: compile-time error -} diff --git a/tests/language_2/prefix/import_collision_runtime_test.dart b/tests/language_2/prefix/import_collision_runtime_test.dart deleted file mode 100644 index 219a701096e..00000000000 --- a/tests/language_2/prefix/import_collision_runtime_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -// Using the same prefix name while importing two different libraries is -// not an error but both library1.dart and library2.dart define 'foo' which -// results in a duplicate definition error. -import "../library1.dart" as lib2; // defines 'foo'. -import "../library2.dart" as lib2; // also defines 'foo'. - -main() { - -} diff --git a/tests/language_2/prefix/import_collision_test.dart b/tests/language_2/prefix/import_collision_test.dart deleted file mode 100644 index c97ff674f0b..00000000000 --- a/tests/language_2/prefix/import_collision_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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 - -// Using the same prefix name while importing two different libraries is -// not an error but both library1.dart and library2.dart define 'foo' which -// results in a duplicate definition error. -import "../library1.dart" as lib2; // defines 'foo'. -import "../library2.dart" as lib2; // also defines 'foo'. - -main() { - lib2.foo = 1; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_IMPORT - // [cfe] Setter not found: 'foo'. -} diff --git a/tests/language_2/prefix/invalid_name_runtime_test.dart b/tests/language_2/prefix/invalid_name_runtime_test.dart deleted file mode 100644 index a88c4d0bd07..00000000000 --- a/tests/language_2/prefix/invalid_name_runtime_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -// Prefix must be a valid identifier. -import "../library1.dart" - - ; - -main() {} diff --git a/tests/language_2/prefix/invalid_name_test.dart b/tests/language_2/prefix/invalid_name_test.dart deleted file mode 100644 index b513fad54f1..00000000000 --- a/tests/language_2/prefix/invalid_name_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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 - -// Prefix must be a valid identifier. -import "../library1.dart" - as lib1.invalid - // ^^^^ - // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN - // [cfe] Expected ';' after this. - // ^ - // [analyzer] SYNTACTIC_ERROR.EXPECTED_EXECUTABLE - // [cfe] Expected a declaration, but got '.'. - // ^^^^^^^ - // [analyzer] SYNTACTIC_ERROR.MISSING_CONST_FINAL_VAR_OR_TYPE - // [cfe] Variables must be declared using the keywords 'const', 'final', 'var' or a type name. - ; - -main() {} diff --git a/tests/language_2/prefix/new_test.dart b/tests/language_2/prefix/new_test.dart deleted file mode 100644 index 8eac1769267..00000000000 --- a/tests/language_2/prefix/new_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2012, 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 PrefixTest; - -import "package:expect/expect.dart"; -import "new_test1.dart"; - -main() { - Expect.equals(Prefix.getSource(), Prefix.getImport() + 1); -} diff --git a/tests/language_2/prefix/new_test1.dart b/tests/language_2/prefix/new_test1.dart deleted file mode 100644 index 05681eee60c..00000000000 --- a/tests/language_2/prefix/new_test1.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2012, 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 PrefixTest1; - -import "new_test2.dart" as test2; - -class Prefix { - static const int foo = 43; - - static getSource() { - return foo; - } - - static getImport() { - return test2.Prefix.foo; - } -} diff --git a/tests/language_2/prefix/new_test2.dart b/tests/language_2/prefix/new_test2.dart deleted file mode 100644 index c23f84dda04..00000000000 --- a/tests/language_2/prefix/new_test2.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2012, 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 PrefixNewTest2; - -class Prefix { - static const int foo = 42; -} diff --git a/tests/language_2/prefix/prefix101_test.dart b/tests/language_2/prefix/prefix101_test.dart deleted file mode 100644 index cc2570f7b8b..00000000000 --- a/tests/language_2/prefix/prefix101_test.dart +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2012, 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 - -// Test to check if we are able to import multiple libraries using the -// same prefix. - -library Prefix101Test.dart; - -import "package:expect/expect.dart"; -import "../library10.dart" as lib101; -import "../library11.dart" as lib101; - -class Prefix101Test { - static Test1() { - var result = 0; - var obj = new lib101.Library10(1); - result = obj.fld; - Expect.equals(1, result); - result += obj.func(); - Expect.equals(3, result); - result += lib101.Library10.static_func(); - Expect.equals(6, result); - result += lib101.Library10.static_fld; - Expect.equals(10, result); - } - - static Test2() { - var result = 0; - var obj = new lib101.Library11(4); - result = obj.fld; - Expect.equals(4, result); - result += obj.func(); - Expect.equals(7, result); - result += lib101.Library11.static_func(); - Expect.equals(9, result); - result += lib101.Library11.static_fld; - Expect.equals(10, result); - } - - static Test3() { - Expect.equals(10, lib101.top_level10); - Expect.equals(20, lib101.top_level_func10()); - } - - static Test4() { - Expect.equals(100, lib101.top_level11); - Expect.equals(200, lib101.top_level_func11()); - } -} - -main() { - Prefix101Test.Test1(); - Prefix101Test.Test2(); - Prefix101Test.Test3(); - Prefix101Test.Test4(); -} diff --git a/tests/language_2/prefix/prefix10_test.dart b/tests/language_2/prefix/prefix10_test.dart deleted file mode 100644 index dbcd3fd1c1f..00000000000 --- a/tests/language_2/prefix/prefix10_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// 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 Prefix10Test.dart; - -import "package:expect/expect.dart"; -import "../library10.dart" as lib10; -import "../library11.dart" as lib11; - -class Prefix10Test { - static Test1() { - var result = 0; - var obj = new lib10.Library10(1); - result = obj.fld; - Expect.equals(1, result); - result += obj.func(); - Expect.equals(3, result); - result += lib10.Library10.static_func(); - Expect.equals(6, result); - result += lib10.Library10.static_fld; - Expect.equals(10, result); - } - - static Test2() { - var result = 0; - var obj = new lib11.Library11(4); - result = obj.fld; - Expect.equals(4, result); - result += obj.func(); - Expect.equals(7, result); - result += lib11.Library11.static_func(); - Expect.equals(9, result); - result += lib11.Library11.static_fld; - Expect.equals(10, result); - } - - static Test3() { - Expect.equals(10, lib10.top_level10); - Expect.equals(20, lib10.top_level_func10()); - } - - static Test4() { - Expect.equals(100, lib11.top_level11); - Expect.equals(200, lib11.top_level_func11()); - } -} - -main() { - Prefix10Test.Test1(); - Prefix10Test.Test2(); - Prefix10Test.Test3(); - Prefix10Test.Test4(); -} diff --git a/tests/language_2/prefix/prefix11_test.dart b/tests/language_2/prefix/prefix11_test.dart deleted file mode 100644 index b621f9e0640..00000000000 --- a/tests/language_2/prefix/prefix11_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// 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 Prefix11Test.dart; - -import "package:expect/expect.dart"; -import "../library10.dart"; -import "../library11.dart" as lib11; - -class Prefix11Test { - static Test1() { - var result = 0; - var obj = new Library10(1); - result = obj.fld; - Expect.equals(1, result); - result += obj.func(); - Expect.equals(3, result); - result += Library10.static_func(); - Expect.equals(6, result); - result += Library10.static_fld; - Expect.equals(10, result); - } - - static Test2() { - var result = 0; - var obj = new lib11.Library11(4); - result = obj.fld; - Expect.equals(4, result); - result += obj.func(); - Expect.equals(7, result); - result += lib11.Library11.static_func(); - Expect.equals(9, result); - result += lib11.Library11.static_fld; - Expect.equals(10, result); - } - - static Test3() { - Expect.equals(10, top_level10); - Expect.equals(20, top_level_func10()); - } - - static Test4() { - Expect.equals(100, lib11.top_level11); - Expect.equals(200, lib11.top_level_func11()); - } -} - -main() { - Prefix11Test.Test1(); - Prefix11Test.Test2(); - Prefix11Test.Test3(); - Prefix11Test.Test4(); -} diff --git a/tests/language_2/prefix/prefix12_test.dart b/tests/language_2/prefix/prefix12_test.dart deleted file mode 100644 index eeca2863b2c..00000000000 --- a/tests/language_2/prefix/prefix12_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// 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 Prefix12Test.dart; - -import "package:expect/expect.dart"; -import "../library11.dart" as lib11; - -class Prefix12Test { - static Test1() { - var result = 0; - var obj = new lib11.Library11.namedConstructor(10); - result = obj.fld; - Expect.equals(10, result); - } - - static Test2() { - int result = 0; - var obj = new lib11.Library111.namedConstructor(10); - result = obj.fld; - Expect.equals(10, result); - } -} - -main() { - Prefix12Test.Test1(); - Prefix12Test.Test2(); -} diff --git a/tests/language_2/prefix/prefix14_test.dart b/tests/language_2/prefix/prefix14_test.dart deleted file mode 100644 index a72ae2d7c68..00000000000 --- a/tests/language_2/prefix/prefix14_test.dart +++ /dev/null @@ -1,73 +0,0 @@ -// 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. -// -// Use qualified symbols at various places. - -// @dart = 2.9 - -library Prefix14Test.dart; - -import "package:expect/expect.dart"; -import "../library12.dart" as lib12; - -typedef lib12.Library12 myFunc(lib12.Library12 param); - -class myInterface implements lib12.Library12Interface { - myInterface(lib12.Library12 this.myfld); - lib12.Library12 addObjects(lib12.Library12 value1, lib12.Library12 value2) { - myfld.fld = (value1.fld + value2.fld + myfld.fld); - return myfld; - } - - lib12.Library12 myfld; -} - -class myClass extends lib12.Library12 { - myClass(int value) : super(value); - static lib12.Library12 func1() { - var i = new lib12.Library12(10); - return i; - } - - static lib12.Library12 func2(lib12.Library12 param) { - return param; - } -} - -class myClass1 { - myClass1(int value) : fld1 = new lib12.Library12(value); - lib12.Library12 fld1; -} - -class myClass2 { - myClass2(lib12.Library12 this.fld2); - lib12.Library12 fld2; -} - -main() { - var o; - o = myClass.func1(); - Expect.equals(2, o.func()); - o = new myClass(10); - Expect.equals(10, o.fld); - - myFunc func = myClass.func2; - Expect.equals(2, func(new lib12.Library12(10)).func()); - Expect.equals(10, func(new lib12.Library12(10)).fld); - - o = new myClass1(100); - Expect.equals(2, o.fld1.func()); - Expect.equals(100, o.fld1.fld); - - o = new myClass2(new lib12.Library12(200)); - Expect.equals(2, o.fld2.func()); - Expect.equals(200, o.fld2.fld); - - o = new myInterface(new lib12.Library12(100)); - Expect.equals(2, o.myfld.func()); - Expect.equals(100, o.myfld.fld); - o = o.addObjects(new lib12.Library12(200), new lib12.Library12(300)); - Expect.equals(2, o.func()); - Expect.equals(600, o.fld); -} diff --git a/tests/language_2/prefix/prefix15_test.dart b/tests/language_2/prefix/prefix15_test.dart deleted file mode 100644 index 85e6f16f495..00000000000 --- a/tests/language_2/prefix/prefix15_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// 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. -// -// Use qualified symbols with generics at various places. - -// @dart = 2.9 - -library Prefix15Test.dart; - -import "package:expect/expect.dart"; -import "../library12.dart" as lib12; - -typedef T myFunc(T param); - -class myInterface - implements lib12.Library12Interface { - myInterface(T this.myfld); - T addObjects(covariant T value1, covariant T value2) { - myfld.fld = (value1.fld + value2.fld + myfld.fld); - return myfld; - } - - T myfld; -} - -class myClass2 { - myClass2(T this.fld2); - T func(T val) => val; - T fld2; -} - -main() { - var o; - o = new myClass2(new lib12.Library12(100)); - myFunc func = o.func; - Expect.equals(2, func(new lib12.Library12(10)).func()); - Expect.equals(10, func(new lib12.Library12(10)).fld); - - o = new myClass2(new lib12.Library12(200)); - Expect.equals(2, o.fld2.func()); - Expect.equals(200, o.fld2.fld); - - o = new myInterface(new lib12.Library12(100)); - Expect.equals(2, o.myfld.func()); - Expect.equals(100, o.myfld.fld); - o = o.addObjects(new lib12.Library12(200), new lib12.Library12(300)); - Expect.equals(2, o.func()); - Expect.equals(600, o.fld); -} diff --git a/tests/language_2/prefix/prefix16_runtime_test.dart b/tests/language_2/prefix/prefix16_runtime_test.dart deleted file mode 100644 index 465bc059f18..00000000000 --- a/tests/language_2/prefix/prefix16_runtime_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. -// -// Unresolved imported symbols are errors. -// In this test, the function myFunc contains malformed types because -// lib12.Library13 is not resolved. - -import "package:expect/expect.dart"; -import "../library12.dart" as lib12; - -typedef - - myFunc( - - param); -typedef - - myFunc2( - - param, int i); - -main() { - Expect.isTrue(((Object x) => x) is myFunc); - Expect.isTrue(((Object x, int y) => x) is myFunc2); - Expect.isFalse(((Object x, String y) => x) is myFunc2); -} diff --git a/tests/language_2/prefix/prefix16_test.dart b/tests/language_2/prefix/prefix16_test.dart deleted file mode 100644 index e3f4ad9fb2b..00000000000 --- a/tests/language_2/prefix/prefix16_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// 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. -// -// Unresolved imported symbols are errors. -// In this test, the function myFunc contains malformed types because -// lib12.Library13 is not resolved. - -// @dart = 2.9 - -import "package:expect/expect.dart"; -import "../library12.dart" as lib12; - -typedef - lib12.Library13 -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_CLASS -// [cfe] Type 'lib12.Library13' not found. - myFunc( - lib12.Library13 -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_CLASS -// [cfe] Type 'lib12.Library13' not found. - param); -typedef - lib12.Library13 -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_CLASS -// [cfe] Type 'lib12.Library13' not found. - myFunc2( - lib12.Library13 -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_CLASS -// [cfe] Type 'lib12.Library13' not found. - param, int i); - -main() { - Expect.isTrue(((Object x) => x) is myFunc); - Expect.isTrue(((Object x, int y) => x) is myFunc2); - Expect.isFalse(((Object x, String y) => x) is myFunc2); -} diff --git a/tests/language_2/prefix/prefix17_test.dart b/tests/language_2/prefix/prefix17_test.dart deleted file mode 100644 index 1bbadd85b5f..00000000000 --- a/tests/language_2/prefix/prefix17_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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 Prefix17Test.dart; - -import "../library12.dart" as lib12; - -class LocalClass { - static int static_fld; -} - -void main() { - LocalClass.static_fld = 42; - var lc1 = new lib12.Library12(5); - lib12.Library12 lc2 = new lib12.Library12(10); - lib12.Library12 lc2m = new lib12.Library12.other(10, 2); - lib12.Library12.static_fld = 43; - //print("${LocalClass.static_fld}, ${lc1.fld}, ${lc2.fld}, ${lc2m.fld}, ${lib12.Library12.static_fld}"); -} diff --git a/tests/language_2/prefix/prefix21_bad_lib.dart b/tests/language_2/prefix/prefix21_bad_lib.dart deleted file mode 100644 index 4bd7201d388..00000000000 --- a/tests/language_2/prefix/prefix21_bad_lib.dart +++ /dev/null @@ -1,15 +0,0 @@ -// 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 Prefix21Bad; - -int badFunction(int x) { - return x << 1; -} - -Function get getValue { - return badFunction; -} diff --git a/tests/language_2/prefix/prefix21_good_lib.dart b/tests/language_2/prefix/prefix21_good_lib.dart deleted file mode 100644 index 1f1b3e3e733..00000000000 --- a/tests/language_2/prefix/prefix21_good_lib.dart +++ /dev/null @@ -1,15 +0,0 @@ -// 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 Prefix21Good; - -int goodFunction(int x) { - return x; -} - -Function get getValue { - return goodFunction; -} diff --git a/tests/language_2/prefix/prefix21_test.dart b/tests/language_2/prefix/prefix21_test.dart deleted file mode 100644 index 1c1121e9026..00000000000 --- a/tests/language_2/prefix/prefix21_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// 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 Prefix21; - -import "package:expect/expect.dart"; -import "prefix21_good_lib.dart" as good; -import "prefix21_bad_lib.dart" as bad; - -main() { - Expect.equals(good.getValue(42), 42); - Expect.equals(bad.getValue(42), 84); -} diff --git a/tests/language_2/prefix/prefix22_runtime_test.dart b/tests/language_2/prefix/prefix22_runtime_test.dart deleted file mode 100644 index 178ab0dd577..00000000000 --- a/tests/language_2/prefix/prefix22_runtime_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. -// -// Unresolved symbols should be reported as static type warnings. -// This should not prevent execution. - -library Prefix21NegativeTest.dart; -import "../library12.dart" as lib12; - -class myClass { - myClass( - - p) { } -} - -main() { - new myClass(null); // no dynamic type error when assigning null -} diff --git a/tests/language_2/prefix/prefix22_test.dart b/tests/language_2/prefix/prefix22_test.dart deleted file mode 100644 index 95d0827689a..00000000000 --- a/tests/language_2/prefix/prefix22_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012, 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. -// -// Unresolved symbols should be reported as static type warnings. -// This should not prevent execution. - -// @dart = 2.9 - -library Prefix21NegativeTest.dart; -import "../library12.dart" as lib12; - -class myClass { - myClass( - lib12.Library13 -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_CLASS -// [cfe] Type 'lib12.Library13' not found. -// ^ -// [cfe] 'Library13' isn't a type. - p) { } -} - -main() { - new myClass(null); // no dynamic type error when assigning null -} diff --git a/tests/language_2/prefix/prefix23_runtime_test.dart b/tests/language_2/prefix/prefix23_runtime_test.dart deleted file mode 100644 index 6d59d60d300..00000000000 --- a/tests/language_2/prefix/prefix23_runtime_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. -// -// Unresolved symbols should be reported as an static type warnings. -// This should not prevent execution. - -library Prefix23Test.dart; - -import "../library12.dart" as lib12; - -class myClass { - final - - fld = null; -} - -main() {} diff --git a/tests/language_2/prefix/prefix23_test.dart b/tests/language_2/prefix/prefix23_test.dart deleted file mode 100644 index a5c7b9485dc..00000000000 --- a/tests/language_2/prefix/prefix23_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// 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. -// -// Unresolved symbols should be reported as an static type warnings. -// This should not prevent execution. - -// @dart = 2.9 - -library Prefix23Test.dart; - -import "../library12.dart" as lib12; - -class myClass { - final - lib12.Library13 -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_CLASS -// [cfe] Type 'lib12.Library13' not found. -// ^ -// [cfe] 'Library13' isn't a type. - fld = null; -} - -main() {} diff --git a/tests/language_2/prefix/prefix24_lib1.dart b/tests/language_2/prefix/prefix24_lib1.dart deleted file mode 100644 index aca4e95c1e0..00000000000 --- a/tests/language_2/prefix/prefix24_lib1.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2013, 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 prefix24_lib1; - -import "prefix24_lib2.dart" as X; - -// lib1_foo() returns value of bar() in library prefix24_lib2. -lib1_foo() => X.bar(); diff --git a/tests/language_2/prefix/prefix24_lib2.dart b/tests/language_2/prefix/prefix24_lib2.dart deleted file mode 100644 index 1a9356700ae..00000000000 --- a/tests/language_2/prefix/prefix24_lib2.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2013, 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 prefix24_lib2; - -bar() => "prefix24_lib2_bar"; diff --git a/tests/language_2/prefix/prefix24_lib3.dart b/tests/language_2/prefix/prefix24_lib3.dart deleted file mode 100644 index 5a41739a8ee..00000000000 --- a/tests/language_2/prefix/prefix24_lib3.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2013, 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 prefix24_lib3; - -class X { - static bar() => "static method bar of class X"; -} diff --git a/tests/language_2/prefix/prefix24_test.dart b/tests/language_2/prefix/prefix24_test.dart deleted file mode 100644 index da8f1f3698e..00000000000 --- a/tests/language_2/prefix/prefix24_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2013, 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 prefix24_test; - -import "package:expect/expect.dart"; - -// Import a library that contains library prefix X. -import "prefix24_lib1.dart"; - -// Import a library that declares class X. -import "prefix24_lib3.dart"; - -// Check that the library prefix X that is used in library prefix24_lib1 -// remains private to that library and does not collide with class X -// defined in (and imported from) prefix24_lib3; - -main() { - Expect.equals("static method bar of class X", X.bar()); - Expect.equals("prefix24_lib2_bar", lib1_foo()); -} diff --git a/tests/language_2/prefix/prefix_test.dart b/tests/language_2/prefix/prefix_test.dart deleted file mode 100644 index a5341d68e7f..00000000000 --- a/tests/language_2/prefix/prefix_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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 PrefixTest.dart; - -import "package:expect/expect.dart"; -import "test1.dart"; - -class PrefixTest { - static testMain() { - Expect.equals(Prefix.getSource(), Prefix.getImport() + 1); - } -} - -main() { - PrefixTest.testMain(); -} diff --git a/tests/language_2/prefix/shadow_runtime_test.dart b/tests/language_2/prefix/shadow_runtime_test.dart deleted file mode 100644 index abab315a9ac..00000000000 --- a/tests/language_2/prefix/shadow_runtime_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -// Type parameters can shadow a library prefix. - -import "package:expect/expect.dart"; -import "../library10.dart" as T; -import "../library10.dart" as lib10; - -class P { - test() { - - } -} - -main() { - new P().test(); - - { - // Variables in the local scope hide the library prefix. - - var result = 0; - result = lib10.Library10.static_fld; - Expect.equals(4, result); - } - - { - // Shadowing is not an error. - var lib10 = 1; - Expect.equals(2, lib10 + 1); - } -} diff --git a/tests/language_2/prefix/shadow_test.dart b/tests/language_2/prefix/shadow_test.dart deleted file mode 100644 index 118c67acba5..00000000000 --- a/tests/language_2/prefix/shadow_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// 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 - -// Type parameters can shadow a library prefix. - -import "package:expect/expect.dart"; -import "../library10.dart" as T; -import "../library10.dart" as lib10; - -class P { - test() { - new T.Library10(10); - // ^ - // [analyzer] COMPILE_TIME_ERROR.PREFIX_SHADOWED_BY_LOCAL_DECLARATION - // ^ - // [cfe] Couldn't find constructor 'T.Library10'. - } -} - -main() { - new P().test(); - - { - // Variables in the local scope hide the library prefix. - var lib10 = 0; - var result = 0; - result = lib10.Library10.static_fld; - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'Library10' isn't defined for the class 'int'. - Expect.equals(4, result); - } - - { - // Shadowing is not an error. - var lib10 = 1; - Expect.equals(2, lib10 + 1); - } -} diff --git a/tests/language_2/prefix/test1.dart b/tests/language_2/prefix/test1.dart deleted file mode 100644 index 62e6567d615..00000000000 --- a/tests/language_2/prefix/test1.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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 PrefixTest1.dart; - -import "test2.dart" as prefix; - -class Prefix { - static const int foo = 43; - - static getSource() { - return foo; - } - - static getImport() { - return prefix.Prefix.foo; - } -} diff --git a/tests/language_2/prefix/test2.dart b/tests/language_2/prefix/test2.dart deleted file mode 100644 index 4042663a8fc..00000000000 --- a/tests/language_2/prefix/test2.dart +++ /dev/null @@ -1,11 +0,0 @@ -// 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 PrefixTest2.dart; - -class Prefix { - static const int foo = 42; -} diff --git a/tests/language_2/prefix/transitive_import_prefix_runtime_test.dart b/tests/language_2/prefix/transitive_import_prefix_runtime_test.dart deleted file mode 100644 index 78a0ece700d..00000000000 --- a/tests/language_2/prefix/transitive_import_prefix_runtime_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. -import "../library10.dart"; - -main() { - // Library prefixes in the imported libraries should not be visible here. - - - -} diff --git a/tests/language_2/prefix/transitive_import_prefix_test.dart b/tests/language_2/prefix/transitive_import_prefix_test.dart deleted file mode 100644 index cd08fe55c30..00000000000 --- a/tests/language_2/prefix/transitive_import_prefix_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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 -import "../library10.dart"; - -main() { - // Library prefixes in the imported libraries should not be visible here. - new lib11.Library11(1); - // ^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // [cfe] Couldn't find constructor 'lib11.Library11'. - lib11.Library11.static_func(); -//^^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER -// [cfe] Undefined name 'lib11'. - lib11.Library11.static_fld; -//^^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER -// [cfe] Undefined name 'lib11'. -} diff --git a/tests/language_2/prefix/transitive_import_runtime_test.dart b/tests/language_2/prefix/transitive_import_runtime_test.dart deleted file mode 100644 index b098e604996..00000000000 --- a/tests/language_2/prefix/transitive_import_runtime_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -// Symbols in libraries imported by the prefixed library should not be visible. - -import "../library12.dart" as lib12; - -main() { - // Class should not be visible. - - - // Variable should not be visible. - -} diff --git a/tests/language_2/prefix/transitive_import_test.dart b/tests/language_2/prefix/transitive_import_test.dart deleted file mode 100644 index ca407263dd0..00000000000 --- a/tests/language_2/prefix/transitive_import_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// 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 - -// Symbols in libraries imported by the prefixed library should not be visible. - -import "../library12.dart" as lib12; - -main() { - // Class should not be visible. - new lib12.Library11(1); - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // [cfe] Couldn't find constructor 'Library11'. - - // Variable should not be visible. - lib12.top_level11; - // ^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_PREFIXED_NAME - // [cfe] Undefined name 'top_level11'. -} diff --git a/tests/language_2/prefix/unqualified_invocation_runtime_test.dart b/tests/language_2/prefix/unqualified_invocation_runtime_test.dart deleted file mode 100644 index b74d67167a7..00000000000 --- a/tests/language_2/prefix/unqualified_invocation_runtime_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Validate the following spec text from section 16.14.3 (Unqualified -// invocation): -// An unqualifiedfunction invocation i has the form -// id(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k), -// where id is an identifier. -// If there exists a lexically visible declaration named id, let fid be the -// innermost such declaration. Then: -// - If fid is a prefix object, a compile-time error occurs. - -import "empty_library.dart" as p; - -class Base { - void p() {} -} - -class Derived extends Base { - void f() { - - } -} - -main() { - new Derived().f(); - -} diff --git a/tests/language_2/prefix/unqualified_invocation_test.dart b/tests/language_2/prefix/unqualified_invocation_test.dart deleted file mode 100644 index 8294dfbdaed..00000000000 --- a/tests/language_2/prefix/unqualified_invocation_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2015, 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 - -// Validate the following spec text from section 16.14.3 (Unqualified -// invocation): -// An unqualifiedfunction invocation i has the form -// id(a1, ..., an, xn+1 : an+1, ..., xn+k : an+k), -// where id is an identifier. -// If there exists a lexically visible declaration named id, let fid be the -// innermost such declaration. Then: -// - If fid is a prefix object, a compile-time error occurs. - -import "empty_library.dart" as p; - -class Base { - void p() {} -} - -class Derived extends Base { - void f() { - p(); -// ^ -// [analyzer] COMPILE_TIME_ERROR.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT -// [cfe] A prefix can't be used as an expression. - } -} - -main() { - new Derived().f(); - p(); -//^ -// [analyzer] COMPILE_TIME_ERROR.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT -// [cfe] A prefix can't be used as an expression. -} diff --git a/tests/language_2/prefix/unresolved_class_runtime_test.dart b/tests/language_2/prefix/unresolved_class_runtime_test.dart deleted file mode 100644 index 32efe0bc60d..00000000000 --- a/tests/language_2/prefix/unresolved_class_runtime_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -// Unresolved symbols should be reported as an error. -import "../library12.dart" as lib12; - -class Subclass - -{} - -class Implementer - -{} - -main() { - new Subclass(); - new Implementer(); -} diff --git a/tests/language_2/prefix/unresolved_class_test.dart b/tests/language_2/prefix/unresolved_class_test.dart deleted file mode 100644 index a0e532dd98a..00000000000 --- a/tests/language_2/prefix/unresolved_class_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// 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 - -// Unresolved symbols should be reported as an error. -import "../library12.dart" as lib12; - -class Subclass - extends lib12.Library13 - // ^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.EXTENDS_NON_CLASS - // [cfe] Type 'lib12.Library13' not found. -{} - -class Implementer - implements lib12.Library13 - // ^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.IMPLEMENTS_NON_CLASS - // [cfe] Type 'lib12.Library13' not found. -{} - -main() { - new Subclass(); - new Implementer(); -} diff --git a/tests/language_2/prefix/variable_collision_runtime_test.dart b/tests/language_2/prefix/variable_collision_runtime_test.dart deleted file mode 100644 index f702e99fe4b..00000000000 --- a/tests/language_2/prefix/variable_collision_runtime_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. -import "../library10.dart" as lib10; - -// Top level variables cannot shadow library prefixes, they should collide. - - -main() {} diff --git a/tests/language_2/prefix/variable_collision_test.dart b/tests/language_2/prefix/variable_collision_test.dart deleted file mode 100644 index 6668d452a5b..00000000000 --- a/tests/language_2/prefix/variable_collision_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// 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 -import "../library10.dart" as lib10; -// ^ -// [cfe] 'lib10' is already declared in this scope. - -// Top level variables cannot shadow library prefixes, they should collide. -var lib10; -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER - -main() {} diff --git a/tests/language_2/private/access_lib.dart b/tests/language_2/private/access_lib.dart deleted file mode 100644 index 3e6ef90d38b..00000000000 --- a/tests/language_2/private/access_lib.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2015, 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 private; - -_function() {} - -class _Class {} - -class Class { - Class._constructor(); -} diff --git a/tests/language_2/private/access_runtime_test.dart b/tests/language_2/private/access_runtime_test.dart deleted file mode 100644 index 5b90337302b..00000000000 --- a/tests/language_2/private/access_runtime_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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 'package:expect/expect.dart'; - -import 'access_lib.dart'; -import 'access_lib.dart' as private; - -main() { - - - - - - -} diff --git a/tests/language_2/private/access_test.dart b/tests/language_2/private/access_test.dart deleted file mode 100644 index 7bc1b6c020d..00000000000 --- a/tests/language_2/private/access_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'package:expect/expect.dart'; - -import 'access_lib.dart'; -import 'access_lib.dart' as private; - -main() { - _function(); -//^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION -// [cfe] Method not found: '_function'. - private._function(); -// ^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION -// [cfe] Method not found: '_function'. - new _Class(); - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // [cfe] Couldn't find constructor '_Class'. - private._Class(); -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION -// [cfe] Method not found: '_Class'. - new Class._constructor(); - // ^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR - // [cfe] Couldn't find constructor 'Class._constructor'. - new private.Class._constructor(); - // ^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NEW_WITH_UNDEFINED_CONSTRUCTOR - // [cfe] Couldn't find constructor 'Class._constructor'. -} diff --git a/tests/language_2/private/clash_lib.dart b/tests/language_2/private/clash_lib.dart deleted file mode 100644 index 720336abed7..00000000000 --- a/tests/language_2/private/clash_lib.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2015, 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 a$_b; - -class B { - var _c$ = 10; // With library prefix: _a$_b$_c$ - - getValueA() { - try {} catch (e) {} // no inline - return this._c$; - } -} diff --git a/tests/language_2/private/clash_test.dart b/tests/language_2/private/clash_test.dart deleted file mode 100644 index 8c719a9501d..00000000000 --- a/tests/language_2/private/clash_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2015, 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 a; - -import 'clash_lib.dart' as lib; -import 'package:expect/expect.dart'; - -class A extends lib.B { - var _b$_c$ = 100; // With library prefix: _a$_b$_c$ - - getValueB() { - try {} catch (e) {} // no inline - return this._b$_c$; - } -} - -main() { - A a = new A(); - Expect.equals(110, a.getValueA() + a.getValueB()); -} diff --git a/tests/language_2/private/lib.dart b/tests/language_2/private/lib.dart deleted file mode 100644 index 3c9c5ec5518..00000000000 --- a/tests/language_2/private/lib.dart +++ /dev/null @@ -1,14 +0,0 @@ -// 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 test for testing access to private fields. - -// @dart = 2.9 - -library PrivateLib; - -class PrivateLib { - final _myPrecious; - - const PrivateLib() : this._myPrecious = "The Ring"; -} diff --git a/tests/language_2/private/main.dart b/tests/language_2/private/main.dart deleted file mode 100644 index 6bf7927de64..00000000000 --- a/tests/language_2/private/main.dart +++ /dev/null @@ -1,63 +0,0 @@ -// 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 test for testing access to private fields. - -// @dart = 2.9 - -part of Private3Test.dart; - -main() { - PrivateMain.main(); -} - -class PrivateMain { - static const _myPrecious = "A Ring"; - - static accessMyPrivates() { - var value; - value = 0; - try { - value = _myPrecious; - } catch (e) { - value = -1; - } - Expect.equals("A Ring", value); - } - - static accessMyLibPrivates() { - var value; - value = 0; - var the_other = new PrivateOther(); - try { - value = the_other._myPrecious; - } catch (e, trace) { - print(e); - print(trace); - Expect.equals(true, e is NoSuchMethodError); - value = -1; - } - Expect.equals("Another Ring", value); - } - - static accessOtherLibPrivates() { - var value; - value = 0; - var the_other = new PrivateLib(); - try { - value = (the_other as dynamic)._myPrecious; - } catch (e, trace) { - print(e); - print(trace); - Expect.equals(true, e is NoSuchMethodError); - value = -1; - } - Expect.equals(-1, value); - } - - static main() { - accessMyPrivates(); - accessMyLibPrivates(); - accessOtherLibPrivates(); - } -} diff --git a/tests/language_2/private/member1_lib.dart b/tests/language_2/private/member1_lib.dart deleted file mode 100644 index 55b4f73eee7..00000000000 --- a/tests/language_2/private/member1_lib.dart +++ /dev/null @@ -1,11 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'member1_test.dart'; - -class B extends A { - bool _instanceField; -} diff --git a/tests/language_2/private/member1_test.dart b/tests/language_2/private/member1_test.dart deleted file mode 100644 index acd7259f263..00000000000 --- a/tests/language_2/private/member1_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'member1_lib.dart'; - -class A {} - -class Test extends B { - test() { - _instanceField = true; -// ^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER -// [cfe] The setter '_instanceField' isn't defined for the class 'Test'. - } -} - -void main() { - Test().test(); -} diff --git a/tests/language_2/private/member2_lib.dart b/tests/language_2/private/member2_lib.dart deleted file mode 100644 index 68acc8d0403..00000000000 --- a/tests/language_2/private/member2_lib.dart +++ /dev/null @@ -1,11 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'member2_test.dart'; - -class B extends A { - static bool _staticField; -} diff --git a/tests/language_2/private/member2_test.dart b/tests/language_2/private/member2_test.dart deleted file mode 100644 index 8b7fff5e428..00000000000 --- a/tests/language_2/private/member2_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'member2_lib.dart'; - -class A {} - -class Test extends B { - test() { - _staticField = true; -// ^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER -// [cfe] The setter '_staticField' isn't defined for the class 'Test'. - } -} - -void main() { - Test().test(); -} diff --git a/tests/language_2/private/member3_lib.dart b/tests/language_2/private/member3_lib.dart deleted file mode 100644 index 7d25d0ce2de..00000000000 --- a/tests/language_2/private/member3_lib.dart +++ /dev/null @@ -1,13 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'member3_test.dart'; - -class B extends A { - bool _fun() { - return true; - } -} diff --git a/tests/language_2/private/member3_test.dart b/tests/language_2/private/member3_test.dart deleted file mode 100644 index fd6e0a0b858..00000000000 --- a/tests/language_2/private/member3_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'member3_lib.dart'; - -class A {} - -class Test extends B { - test() { - _fun(); -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD -// [cfe] The method '_fun' isn't defined for the class 'Test'. - } -} - -void main() { - Test().test(); -} diff --git a/tests/language_2/private/member_lib_b.dart b/tests/language_2/private/member_lib_b.dart deleted file mode 100644 index 7442b13fd13..00000000000 --- a/tests/language_2/private/member_lib_b.dart +++ /dev/null @@ -1,19 +0,0 @@ -// 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 PrivateMemberLibB; - -import 'member_test.dart'; - -class B extends A { - bool _instanceField; - static bool _staticField; - bool _fun1(bool b) { - return true; - } - - void _fun2() {} -} diff --git a/tests/language_2/private/member_test.dart b/tests/language_2/private/member_test.dart deleted file mode 100644 index 1ea7adce48a..00000000000 --- a/tests/language_2/private/member_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2012, 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 PrivateMemberLibA; - -import 'member_lib_b.dart'; - -class A { - int i; - int _instanceField; - static int _staticField; - int _fun1() { - return 1; - } - - void _fun2(int i) {} -} - -class Test extends B { - test() { - i = _instanceField; - i = A._staticField; - i = _fun1(); - _fun2(42); - } -} - -void main() { - new Test().test(); -} diff --git a/tests/language_2/private/method_tearoff_lib.dart b/tests/language_2/private/method_tearoff_lib.dart deleted file mode 100644 index ecbbc4bbd11..00000000000 --- a/tests/language_2/private/method_tearoff_lib.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2018, 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 - -// Companion library for private_method_tearoff_test.dart. - -class Bar { - void _f() {} -} - -String baz(Bar bar) { - return bar._f.runtimeType.toString(); -} diff --git a/tests/language_2/private/method_tearoff_test.dart b/tests/language_2/private/method_tearoff_test.dart deleted file mode 100644 index 9978b55d8a5..00000000000 --- a/tests/language_2/private/method_tearoff_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'package:expect/expect.dart'; - -import 'method_tearoff_lib.dart'; - -// `Bar' contains a private method `_f'. The function `baz' is declared in the -// same library as `Bar'. Given an subtype of `Bar', it tearoffs `_f' and -// returns a string representation of its runtime type. For this code to -// evaluate correctly, the generated Kernel code for `Foo' must contain a no -// such method forwarder for `_f'. - -class Foo implements Bar {} - -main() { - Expect.equals("() => void", baz(new Foo())); -} diff --git a/tests/language_2/private/mixin2_test.dart b/tests/language_2/private/mixin2_test.dart deleted file mode 100644 index 041c79fd36d..00000000000 --- a/tests/language_2/private/mixin2_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2013, 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 - -// Dart test for testing access to private fields on mixins. - -library private_mixin2; - -import 'package:expect/expect.dart'; -import 'other_mixin2.dart'; - -void main() { - var c1; - c1 = new C1(); - Expect.throwsNoSuchMethodError(() => c1._field); - Expect.throwsNoSuchMethodError(() => c1.field); - - var c2; - c2 = new C2(); - Expect.throwsNoSuchMethodError(() => c2._field); - Expect.equals(42, c2.field); -} diff --git a/tests/language_2/private/mixin_exception_throw_test.dart b/tests/language_2/private/mixin_exception_throw_test.dart deleted file mode 100644 index ade4f0462d1..00000000000 --- a/tests/language_2/private/mixin_exception_throw_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for http://dartbug.com/11637 - -class _C {} - -class _E { - throwIt() => throw "it"; -} - -class _F { - throwIt() => throw "IT"; -} - -class _D extends _C with _E, _F {} - -main() { - var d = new _D(); - try { - d.throwIt(); - } catch (e, s) { - print("Exception: $e"); - print("Stacktrace:\n$s"); - } -} diff --git a/tests/language_2/private/other.dart b/tests/language_2/private/other.dart deleted file mode 100644 index 6f288821a28..00000000000 --- a/tests/language_2/private/other.dart +++ /dev/null @@ -1,14 +0,0 @@ -// 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 test for testing access to private fields. - -// @dart = 2.9 - -part of Private3Test.dart; - -class PrivateOther { - final _myPrecious; - - const PrivateOther() : this._myPrecious = "Another Ring"; -} diff --git a/tests/language_2/private/other_lib.dart b/tests/language_2/private/other_lib.dart deleted file mode 100644 index df83627506c..00000000000 --- a/tests/language_2/private/other_lib.dart +++ /dev/null @@ -1,41 +0,0 @@ -// 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 - -// Dart test for testing access to private fields. -library PrivateOther; - -import "private_test.dart"; - -class LibOther3 { - static accessFieldA3(var a) => a.fieldA; - static accessFieldB3(var b) => b._fieldB; - static int c_field1b(c) => c._field1; - static int c_field2b(c) => c._field2; -} - -class AImported extends AExposed { - AImported() : super(); - getFieldA() => fieldA; -} - -class C2 extends C1 { - int _field1; - C2() - : _field1 = 99, - super(); - - field1b() => _field1; -} - -class C4 extends C3 { - int _field2; - C4() - : _field2 = 1024, - super(); - - field2b() => _field2; - field1d() => _field1; -} diff --git a/tests/language_2/private/other_library.dart b/tests/language_2/private/other_library.dart deleted file mode 100644 index 83466b2cadf..00000000000 --- a/tests/language_2/private/other_library.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that inlining in the compiler works with privacy. - -library other_library; - -// Make [foo] small enough that is can be inlined. Make it call a -// private method. -foo(a) => a._bar(); - -class A { - _bar() => 42; -} diff --git a/tests/language_2/private/other_mixin2.dart b/tests/language_2/private/other_mixin2.dart deleted file mode 100644 index 31aa24de1bd..00000000000 --- a/tests/language_2/private/other_mixin2.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2013, 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 - -// Dart test for testing access to private fields on mixins. - -library private_mixin2_other; - -class C1 { - int _field = 42; -} - -class C2 extends Object with C1 { - int get field => _field; -} diff --git a/tests/language_2/private/private1.dart b/tests/language_2/private/private1.dart deleted file mode 100644 index e78ddcdac9d..00000000000 --- a/tests/language_2/private/private1.dart +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) 2012, 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 - -// Dart test for testing access to private fields. - -part of PrivateTest.dart; - -main() { - testPrivateTopLevel(); - testPrivateClasses(); -} - -void expectCatch(f) { - bool threw = false; - try { - f(); - } catch (e) { - threw = true; - } - Expect.equals(true, threw); -} - -String _private1() => "private1"; -const String _private1Field = "private1Field"; - -void testPrivateTopLevel() { - Expect.equals("private1", _private1()); - Expect.equals("private2", _private2()); - Expect.equals("private1Field", _private1Field); - Expect.equals("private2Field", _private2Field); -} - -class _A { - _A() : fieldA = 499; - - int fieldA; -} - -class AExposed extends _A { - AExposed() : super(); -} - -class B { - int _fieldB; - B() : _fieldB = 42; -} - -class C1 { - int _field1; - C1() : _field1 = 499; - - field1a() => _field1; -} - -class C3 extends C2 { - int _field2; - C3() - : _field2 = 42, - super(); - - field2a() => _field2; - field1c() => _field1; -} - -int c_field1a(c) => c._field1; -int c_field2a(c) => c._field2; - -int _field1FromNewC4() => new C4()._field1; -int _field2FromNewC4() => new C4()._field2; - -void testPrivateClasses() { - _A a = new _A(); - Expect.equals(499, a.fieldA); - Expect.equals(499, accessFieldA2(a)); - Expect.equals(499, LibOther3.accessFieldA3(a)); - - var a2 = new AImported(); - Expect.equals(499, a2.getFieldA()); - - B b = new B(); - Expect.equals(42, b._fieldB); - Expect.equals(42, accessFieldB2(b)); - expectCatch(() => LibOther3.accessFieldB3(b)); - - C4 c = new C4(); - Expect.equals(499, c._field1); - Expect.equals(499, c_field1a(c)); - Expect.equals(499, c.field1a()); - Expect.equals(42, c._field2); - Expect.equals(42, c_field2a(c)); - Expect.equals(42, c.field2a()); - Expect.equals(99, LibOther3.c_field1b(c)); - Expect.equals(99, c.field1b()); - Expect.equals(1024, LibOther3.c_field2b(c)); - Expect.equals(1024, c.field2b()); - Expect.equals(499, c.field1c()); - Expect.equals(99, c.field1d()); - Expect.equals(499, _field1FromNewC4()); - Expect.equals(42, _field2FromNewC4()); -} diff --git a/tests/language_2/private/private2.dart b/tests/language_2/private/private2.dart deleted file mode 100644 index 252babd302b..00000000000 --- a/tests/language_2/private/private2.dart +++ /dev/null @@ -1,23 +0,0 @@ -// 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 - -// Dart test for testing access to private fields. - -part of PrivateTest.dart; - -String _private2() { - return "private2"; -} - -const String _private2Field = "private2Field"; - -accessFieldA2(_A a) { - return a.fieldA; -} - -accessFieldB2(B b) { - return b._fieldB; -} diff --git a/tests/language_2/private/private2_lib.dart b/tests/language_2/private/private2_lib.dart deleted file mode 100644 index 46cffbdd572..00000000000 --- a/tests/language_2/private/private2_lib.dart +++ /dev/null @@ -1,14 +0,0 @@ -// 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 test for testing access to private fields across class hierarchies. - -// @dart = 2.9 - -library Private2Lib; - -import "private2_test.dart"; - -class B extends A { - B() : super(); -} diff --git a/tests/language_2/private/private2_main.dart b/tests/language_2/private/private2_main.dart deleted file mode 100644 index 852462e5a48..00000000000 --- a/tests/language_2/private/private2_main.dart +++ /dev/null @@ -1,29 +0,0 @@ -// 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 test for testing access to private fields across class hierarchies. - -// @dart = 2.9 - -part of Private2Test; - -class A { - var _f; - var g; - A() - : _f = 42, - g = 43; -} - -class C extends B { - C() : super(); -} - -main() { - var a = new A(); - print(a.g); - print(a._f); - var o = new C(); - print(o.g); // Access to public field in A. - print(o._f); // Access to private field in A is allowed. -} diff --git a/tests/language_2/private/private2_test.dart b/tests/language_2/private/private2_test.dart deleted file mode 100644 index b2d091561c0..00000000000 --- a/tests/language_2/private/private2_test.dart +++ /dev/null @@ -1,11 +0,0 @@ -// 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 test for testing access to private fields across class hierarchies. - -// @dart = 2.9 - -library Private2Test; - -import "private2_lib.dart"; -part "private2_main.dart"; diff --git a/tests/language_2/private/private3_test.dart b/tests/language_2/private/private3_test.dart deleted file mode 100644 index b83b7aedd8e..00000000000 --- a/tests/language_2/private/private3_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// 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 test for testing access to private fields. - -// @dart = 2.9 - -library Private3Test.dart; - -import "package:expect/expect.dart"; -import "lib.dart"; - -part "main.dart"; -part "other.dart"; diff --git a/tests/language_2/private/private4_test.dart b/tests/language_2/private/private4_test.dart deleted file mode 100644 index b282b7caf0d..00000000000 --- a/tests/language_2/private/private4_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that inlining in the compiler works with privacy. - -library private4_test; - -import "package:expect/expect.dart"; -import 'other_library.dart'; - -main() { - Expect.equals(42, foo(new A())); - Expect.throwsNoSuchMethodError(() => foo(new B())); -} - -class B { - _bar() => 42; -} diff --git a/tests/language_2/private/private_test.dart b/tests/language_2/private/private_test.dart deleted file mode 100644 index d8f3ba5af3a..00000000000 --- a/tests/language_2/private/private_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// 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 - -// Dart test for testing access to private fields. - -library PrivateTest.dart; - -import "package:expect/expect.dart"; -import "other_lib.dart"; -part "private1.dart"; -part "private2.dart"; diff --git a/tests/language_2/private/selector_lib.dart b/tests/language_2/private/selector_lib.dart deleted file mode 100644 index a0900a7a439..00000000000 --- a/tests/language_2/private/selector_lib.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2013, 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 private_selector_lib; - -import 'selector_test.dart'; - -bool executed = false; - -class A { - public() { - new B()._private(); - } - - _private() { - executed = true; - } -} diff --git a/tests/language_2/private/selector_test.dart b/tests/language_2/private/selector_test.dart deleted file mode 100644 index d0d36d8b6c0..00000000000 --- a/tests/language_2/private/selector_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2013, 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 private_selector_test; - -import "package:expect/expect.dart"; -import 'selector_lib.dart'; - -class B extends A {} - -main() { - new A().public(); - Expect.isTrue(executed); -} diff --git a/tests/language_2/private/super_constructor_lib.dart b/tests/language_2/private/super_constructor_lib.dart deleted file mode 100644 index 5da18fa9786..00000000000 --- a/tests/language_2/private/super_constructor_lib.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2015, 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 private_super_constructor_lib; - -class B { - B(); - B._foo(); -} diff --git a/tests/language_2/private/super_constructor_runtime_test.dart b/tests/language_2/private/super_constructor_runtime_test.dart deleted file mode 100644 index ddba3380352..00000000000 --- a/tests/language_2/private/super_constructor_runtime_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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 private_super_constructor_test; - -import 'super_constructor_lib.dart'; - -class C extends B { - -} - -main() => new C(); diff --git a/tests/language_2/private/super_constructor_test.dart b/tests/language_2/private/super_constructor_test.dart deleted file mode 100644 index 68905a60b79..00000000000 --- a/tests/language_2/private/super_constructor_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2015, 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 private_super_constructor_test; - -import 'super_constructor_lib.dart'; - -class C extends B { - C() : super._foo(); - // ^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER - // [cfe] Superclass has no constructor named 'B._foo'. -} - -main() => new C(); diff --git a/tests/language_2/propagate/argument_type_check_test.dart b/tests/language_2/propagate/argument_type_check_test.dart deleted file mode 100644 index beaf22d668f..00000000000 --- a/tests/language_2/propagate/argument_type_check_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - Expect.equals("str", foo("str")); -} - -foo(y) { - dynamic x = 3; - for (int i = 0; i < 2; i++) { - // Make sure that we don't think that the type of x is necessarily - // a number and optimize the x + y expression based on that. The - // value of x changes later... - if (i == 1) return bar(x + y); - x = new A(); - } -} - -bar(t) => t; - -class A { - A() {} - operator +(x) => x; -} diff --git a/tests/language_2/propagate/assert_assignable_test.dart b/tests/language_2/propagate/assert_assignable_test.dart deleted file mode 100644 index 58adf6487b1..00000000000 --- a/tests/language_2/propagate/assert_assignable_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2013, 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. -// Check that type of the AssertAssignable is recomputed correctly. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - final p; - final _b; - - b() { - try { - return _b; - } catch (e) {} - } - - A(this.p, this._b); -} - -class B extends A { - B(p, b) : super(p, b); -} - -bar(v) { - for (var x = v; x != null; x = x.p) { - if (x.b()) { - return x; - } - } - return null; -} - -foo(v) { - A x = bar(v); - return x != null; -} - -main() { - final a = new A(new B(new A("haha", true), false), false); - - for (var i = 0; i < 20; i++) { - Expect.isTrue(foo(a)); - } - Expect.isTrue(foo(a)); -} diff --git a/tests/language_2/propagate/in_for_update_test.dart b/tests/language_2/propagate/in_for_update_test.dart deleted file mode 100644 index e72058d8118..00000000000 --- a/tests/language_2/propagate/in_for_update_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2012, 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. -// Check that phi type computation in the Dart2Js compiler does the -// correct thing. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -bar() => 'foo'; - -main() { - Expect.throws(foo1); - Expect.throws(foo2); -} - -foo1() { - var a = bar(); - for (;; a = 1 + a) { - if (a != 'foo') return; - } -} - -foo2() { - var a = bar(); - for (;; a = 1 + a) { - if (a != 'foo') break; - } -} diff --git a/tests/language_2/propagate/past_constant_test.dart b/tests/language_2/propagate/past_constant_test.dart deleted file mode 100644 index 9e1f7f7a168..00000000000 --- a/tests/language_2/propagate/past_constant_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'package:expect/expect.dart'; - -foo(x) => x; - -check(y) { - Expect.equals('foo', y); -} - -main() { - var x = foo('foo'); - var y = foo(x); - x = 'constant'; - check( - y); // 'y' should not propagate here unless reference to 'x' is rewritten - foo(x); - foo(x); -} diff --git a/tests/language_2/propagate/phi_test.dart b/tests/language_2/propagate/phi_test.dart deleted file mode 100644 index c49c6d2f7ee..00000000000 --- a/tests/language_2/propagate/phi_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012, 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. -// Check that phi type computation in the Dart2Js compiler does the -// correct thing. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -bar() => 490; -bar2() => 0; - -foo(b) { - var x = bar(); - var x2 = x; - if (b) x2 = bar2(); - var x3 = 9 + x; // Guarantees that x is a number. Dart2js propagated the - // type information back to the phi (for x2). - return x2 + x3; -} - -main() { - Expect.equals(499, foo(true)); -} diff --git a/tests/language_2/propagate/propagate2_test.dart b/tests/language_2/propagate/propagate2_test.dart deleted file mode 100644 index 5c17bd3c215..00000000000 --- a/tests/language_2/propagate/propagate2_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to infinite loop on -// speculatively propagating types. - -class Bar { - noSuchMethod(e) => null; -} - -main() { - var d = new Bar(); - - while (false) { - // [input] will change from indexable to unknown: the use line 20 - // changes its decision because [a2] changes its type from unknown to - // null. - var input = ((x) {})(null); - var p2 = input.keys.firstWhere(null); - var a2 = input.keys.firstWhere(null); - print(input[a2] == p2); - } -} diff --git a/tests/language_2/propagate/propagate3_test.dart b/tests/language_2/propagate/propagate3_test.dart deleted file mode 100644 index d2fa1f2a3c6..00000000000 --- a/tests/language_2/propagate/propagate3_test.dart +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to generate wrong code for -// it. The bug happened in the SSA type propagation. - -class A { - next() => new B(); - doIt() => null; - bool get isEmpty => false; - foo() => 42; - bar() => 54; -} - -bool entered = false; - -class B extends A { - foo() => 54; - doIt() => new A(); - bool get isEmpty => true; - bar() => entered = true; -} - -// (1) At initialization phase of the type propagation, [a] would be -// marked as [exact A]. -// (2) Will make the loop phi [b] typed [null, exact A]. -// (3) Will create a [HTypeKnown] [exact A] for [b]. -// (4) Will create a [HTypeKnown] [exact A] for [b] and update users -// of [b] to use this [HTypeKnown] instead. -// (5) [a] will be updated to [subclass A]. -// (6) Will change the [HTypeKnown] of [b] from [exact A] to [subclass A]. -// (7) Receiver is [subclass A] and it will refine it to -// [subclass A]. We used to wrongly assume there was -// no need to update the [HTypeKnown] created in (3). -// (8) Consider that bar is called on an [exact A] (the [HTypeKnown] -// created in (3)) and remove the call because it does not have -// any side effects. - -main() { - var a = new A(); - for (var i in [42]) { - a = a.next(); - } - - // (1, 5) - - var b = a; - while (b.isEmpty) { - // (4, 6) - b.foo(); // (3, 7) - b.bar(); // (8) - b = b.doIt(); // (2) - } - - if (!entered) throw 'Test failed'; -} diff --git a/tests/language_2/propagate/type_propagation_test.dart b/tests/language_2/propagate/type_propagation_test.dart deleted file mode 100644 index 0b22d9a3c3f..00000000000 --- a/tests/language_2/propagate/type_propagation_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2013, 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 - -// dart2js used to have an infinite loop in its type propagation -// algorithm due to types becoming broader instead of narrower. - -import "package:expect/expect.dart"; - -class A { - resolveSend(node) { - if (node == null) { - return [new B()][0]; - } else { - return [new B(), new A()][1]; - } - } - - visitSend(node) { - var target = resolveSend(node); - - if (false) { - if (false) { - target = target.getter; - if (false) { - target = new Object(); - } - } - } - return true ? target : null; - } -} - -var a = 43; - -class B { - var getter = a == 42 ? new A() : null; -} - -main() { - Expect.isTrue(new A().visitSend(new A()) is A); - Expect.isTrue(new A().visitSend(null) is B); -} diff --git a/tests/language_2/redirecting/constructor_initializer_test.dart b/tests/language_2/redirecting/constructor_initializer_test.dart deleted file mode 100644 index 851f3241e0f..00000000000 --- a/tests/language_2/redirecting/constructor_initializer_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -var string = ''; - -append(x) { - string += x; - return x; -} - -class A { - var x = append('x'); - var y; - var z; - - // Should append y but not yet x. - A() : this.foo(append('y')); - - // Append x and z. - A.foo(this.y) : z = append('z'); -} - -class B extends A { - var w; - - // Call the redirecting constructor using super. - B() - : w = append('w'), - super(); -} - -main() { - string = ''; - new A(); - Expect.equals('yxz', string); - - string = ''; - new B(); - Expect.equals('wyxz', string); -} diff --git a/tests/language_2/redirecting/factory_bounds_test.dart b/tests/language_2/redirecting/factory_bounds_test.dart deleted file mode 100644 index f8fcca9520a..00000000000 --- a/tests/language_2/redirecting/factory_bounds_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2018, 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 - -// Bounds checking on redirecting factories. - -class Foo {} - -class Baz {} - -class Foobar implements Foo {} - -class Bar< - T // A comment to prevent dart format from joining the lines. - extends Foo //# 00: ok - extends Baz> //# 01: compile-time error - extends Foobar //# 02: compile-time error - > { - Bar.named(); - factory Bar() = Qux; -} - -class Qux< - T // A comment to prevent dart format from joining the lines. - extends Foo //# 00: continued - extends Foo //# 01: continued - extends Foo //# 02: continued - > extends Bar { - Qux() : super.named(); -} - - - -class A { - factory A() = B< - T // A comment to prevent dart format from joining the lines. - , int //# 03: compile-time error - , String //# 04: ok - >; -} - -class B implements A {} - -void main() { - new Bar(); - new A(); -} diff --git a/tests/language_2/redirecting/factory_default_values_runtime_test.dart b/tests/language_2/redirecting/factory_default_values_runtime_test.dart deleted file mode 100644 index 3120a387764..00000000000 --- a/tests/language_2/redirecting/factory_default_values_runtime_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test that parameter default values are disallowed in a redirecting factory. - -import "package:expect/expect.dart"; - -class A { - A(this.a, [this.b = 0]); - factory A.f(int a) = A; - - - - int a; - int b; -} - -main() { - var x = new A.f(42); - Expect.equals(x.a, 42); - Expect.equals(x.b, 0); - - -} diff --git a/tests/language_2/redirecting/factory_default_values_test.dart b/tests/language_2/redirecting/factory_default_values_test.dart deleted file mode 100644 index d4709b92e9f..00000000000 --- a/tests/language_2/redirecting/factory_default_values_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that parameter default values are disallowed in a redirecting factory. - -import "package:expect/expect.dart"; - -class A { - A(this.a, [this.b = 0]); - factory A.f(int a) = A; - factory A.g(int a, [int b = 0]) = A; - // ^ - // [analyzer] COMPILE_TIME_ERROR.DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR - // ^ - // [cfe] Can't have a default value here because any default values of 'A' would be used instead. - factory A.h(int a, {int b: 0}) = A; - // ^ - // [analyzer] COMPILE_TIME_ERROR.DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR - // ^ - // [cfe] Can't have a default value here because any default values of 'A' would be used instead. - // ^ - // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_FUNCTION_TYPE - // [cfe] The constructor function type 'A Function(int, [int])' isn't a subtype of 'A Function(int, {int b})'. - - int a; - int b; -} - -main() { - var x = new A.f(42); - Expect.equals(x.a, 42); - Expect.equals(x.b, 0); - - var y = new A.f(42, 43); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS - // ^^^^^^^^ - // [cfe] Too many positional arguments: 1 allowed, but 2 found. -} diff --git a/tests/language_2/redirecting/factory_incompatible_signature_runtime_test.dart b/tests/language_2/redirecting/factory_incompatible_signature_runtime_test.dart deleted file mode 100644 index 04743063ffb..00000000000 --- a/tests/language_2/redirecting/factory_incompatible_signature_runtime_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test that incompatible signatures in a forwarding factory -// constructor leads to a compile-time error. - -import "package:expect/expect.dart"; - -class A { - A(a, b); - -} - -main() { - -} diff --git a/tests/language_2/redirecting/factory_incompatible_signature_test.dart b/tests/language_2/redirecting/factory_incompatible_signature_test.dart deleted file mode 100644 index aef50104be3..00000000000 --- a/tests/language_2/redirecting/factory_incompatible_signature_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that incompatible signatures in a forwarding factory -// constructor leads to a compile-time error. - -import "package:expect/expect.dart"; - -class A { - A(a, b); - factory A.f() = A; - // ^ - // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_FUNCTION_TYPE - // [cfe] The constructor function type 'A Function(dynamic, dynamic)' isn't a subtype of 'A Function()'. -} - -main() { - new A.f(); -} diff --git a/tests/language_2/redirecting/factory_infinite_steps_test.dart b/tests/language_2/redirecting/factory_infinite_steps_test.dart deleted file mode 100644 index 8cc9443b976..00000000000 --- a/tests/language_2/redirecting/factory_infinite_steps_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012, 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 - -// From Dart Language Specification, 0.12 M1, "7.6.2 Factories": It is -// a compile-time error if a redirecting factory constructor does not -// redirect to a non-redirecting factory constructor or to a -// generative constructor in a finite number of steps. - -// TODO(ahe): The above specification will probably change to -// something like: "It is a compile-time error if a redirecting -// factory constructor redirects to itself, either directly or -// indirectly via a sequence of redirections." - -class Foo extends Bar { - factory Foo() = Bar; //# 01: compile-time error -} - -class Bar { - factory Bar() = Foo; //# 02: compile-time error -} - -main() { - new Foo(); -} diff --git a/tests/language_2/redirecting/factory_long_test.dart b/tests/language_2/redirecting/factory_long_test.dart deleted file mode 100644 index e1486cd28d2..00000000000 --- a/tests/language_2/redirecting/factory_long_test.dart +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test long substitution of long redirection chains. - -import 'package:expect/expect.dart'; - -class C { - const factory C() = D; -} - -class D implements C { - const factory D() = E; -} - -class E implements D { - final field = 42; - const E(); -} - -class X { - const factory X() = Y; -} - -class X1 { - const factory X1() = Y; -} - -class X2 { - const factory X2() = Y; -} - -class Y implements X, X1, X2 { - const factory Y() = Y1; -} - -class Y1 implements Y { - const factory Y1() = Z; -} - -class Z implements Y1 { - final field = 87; - const Z(); -} - -void main() { - testC(new C()); - testC(const C()); - testZ(new X()); - testZ(new X1()); - testZ(new X2()); - testZ(const X()); - testZ(const X1()); - testZ(const X2()); -} - -void testC(var c) { - Expect.isTrue(c is C); - Expect.isTrue(c is D); - Expect.isTrue(c is! D); - Expect.isTrue(c is E); - Expect.isTrue(c is! E); - Expect.isTrue(c is! E); - Expect.equals(42, c.field); -} - -void testZ(var z) { - Expect.isTrue(z is X); - Expect.isTrue(z is! X); - Expect.isTrue(z is X1); - Expect.isTrue(z is! X1); - Expect.isTrue(z is X2); - Expect.isTrue(z is Y); - Expect.isTrue(z is! Y); - Expect.isTrue(z is Y1); - Expect.isTrue(z is! Y1); - Expect.isTrue(z is Z); - Expect.isTrue(z is! Z); - Expect.equals(87, z.field); -} diff --git a/tests/language_2/redirecting/factory_malbounded_runtime_test.dart b/tests/language_2/redirecting/factory_malbounded_runtime_test.dart deleted file mode 100644 index 78c6f990d0e..00000000000 --- a/tests/language_2/redirecting/factory_malbounded_runtime_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -class Foo { - factory Foo() = Bar; - Foo.create() {} -} - -class Bar< - T - - > extends Foo { - factory Bar() { - return new Bar.create(); - } - - Bar.create() : super.create() {} -} - -main() { - new Foo(); -} diff --git a/tests/language_2/redirecting/factory_malbounded_test.dart b/tests/language_2/redirecting/factory_malbounded_test.dart deleted file mode 100644 index 24225b76b57..00000000000 --- a/tests/language_2/redirecting/factory_malbounded_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2013, 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 - -class Foo { - factory Foo() = Bar; - // ^ - // [cfe] The type 'T' doesn't extend 'num'. - // ^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - Foo.create() {} -} - -class Bar extends Foo { - factory Bar() { - return new Bar.create(); - } - - Bar.create() : super.create() {} -} - -main() { - new Foo(); -} diff --git a/tests/language_2/redirecting/factory_upcast_test.dart b/tests/language_2/redirecting/factory_upcast_test.dart deleted file mode 100644 index a91daeacb65..00000000000 --- a/tests/language_2/redirecting/factory_upcast_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2018, 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 - -class A implements B { - var x; - A(Object this.x); -} - -class B { - factory B(String s) = A; -} - -main() { - B(42 as dynamic); //# 01: runtime error -} diff --git a/tests/language_2/reg_exp/reg_exp2_test.dart b/tests/language_2/reg_exp/reg_exp2_test.dart deleted file mode 100644 index 50f061d93e6..00000000000 --- a/tests/language_2/reg_exp/reg_exp2_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// 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 test for testing regular expressions in Dart. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class RegExp2Test { - static String findImageTag_(String text, String extensions) { - final re = new RegExp('src="(http://\\S+\\.(${extensions}))"'); - print('REGEXP findImageTag_ $extensions text: \n$text'); - final match = re.firstMatch(text); - print('REGEXP findImageTag_ $extensions SUCCESS'); - if (match != null) { - return match[1]; - } else { - return null; - } - } - - static testMain() { - String text = - '''

My last entry was in December of 2009. I suppose I never was particularly good about updating this thing, but it seems a bit ridiculous that I couldn't be bothered to post once about the many, many things that have gone on since then. My apologies. I guess I could start by saying that the world looks like a very different place than it did back in second year.

- -'''; - String extensions = 'jpg|jpeg|png'; - String tag = findImageTag_(text, extensions); - Expect.isNotNull(tag); - } -} - -main() { - RegExp2Test.testMain(); -} diff --git a/tests/language_2/reg_exp/reg_exp3_test.dart b/tests/language_2/reg_exp/reg_exp3_test.dart deleted file mode 100644 index d39faae22f5..00000000000 --- a/tests/language_2/reg_exp/reg_exp3_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// 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 test for testing regular expressions in Dart. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class RegExp3Test { - static testMain() { - var i = 2000; - try { - RegExp exp = new RegExp("["); - i = 100; // Should not reach here. - } on FormatException catch (e) { - i = 0; - } - Expect.equals(0, i); - } -} - -main() { - RegExp3Test.testMain(); -} diff --git a/tests/language_2/reg_exp/reg_exp4_test.dart b/tests/language_2/reg_exp/reg_exp4_test.dart deleted file mode 100644 index 941118cf4a3..00000000000 --- a/tests/language_2/reg_exp/reg_exp4_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// 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 test for testing regular expressions in Dart. - -// @dart = 2.9 - -class RegEx2Test { - static void testMain() { - final helloPattern = new RegExp("with (hello)"); - String s = "this is a string with hello somewhere"; - Match match = helloPattern.firstMatch(s); - if (match != null) { - print("got match"); - int groupCount = match.groupCount; - print("groupCount is $groupCount"); - print("group 0 is ${match.group(0)}"); - print("group 1 is ${match.group(1)}"); - } else { - print("match not round"); - } - print("done"); - } -} - -main() { - RegEx2Test.testMain(); -} diff --git a/tests/language_2/reg_exp/reg_exp_test.dart b/tests/language_2/reg_exp/reg_exp_test.dart deleted file mode 100644 index d83588de6d9..00000000000 --- a/tests/language_2/reg_exp/reg_exp_test.dart +++ /dev/null @@ -1,86 +0,0 @@ -// 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 test for testing regular expressions in Dart. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -void main() { - RegExp exp = new RegExp(r"(\w+)"); - String str = "Parse my string"; - List matches = exp.allMatches(str).toList(); - Expect.equals(3, matches.length); - Expect.equals("Parse", matches[0].group(0)); - Expect.equals("my", matches[1].group(0)); - Expect.equals("string", matches[2].group(0)); - - // Check that allMatches progresses correctly for empty matches, and that - // it includes the empty match at the end position. - exp = new RegExp("a?"); - str = "babba"; - Expect.listEquals(["", "a", "", "", "a", ""], - exp.allMatches(str).map((x) => x[0]).toList()); - - // Check that allMatches works with optional start index. - exp = new RegExp("as{2}"); - str = "assassin"; - Expect.equals(2, exp.allMatches(str).length); - Expect.equals(2, exp.allMatches(str, 0).length); - Expect.equals(1, exp.allMatches(str, 1).length); - Expect.equals(0, exp.allMatches(str, 4).length); - Expect.equals(0, exp.allMatches(str, str.length).length); - Expect.throws(() => exp.allMatches(str, -1)); - Expect.throws(() => exp.allMatches(str, str.length + 1)); - - exp = new RegExp(".*"); - Expect.equals("", exp.allMatches(str, str.length).single[0]); - - // The "^" must only match at the beginning of the string. - // Using a start-index doesn't change where the string starts. - exp = new RegExp("^ass"); - Expect.equals(1, exp.allMatches(str, 0).length); - Expect.equals(0, exp.allMatches(str, 3).length); - - // Regression test for http://dartbug.com/2980 - exp = new RegExp("^", multiLine: true); // Any zero-length match will work. - str = "foo\nbar\nbaz"; - Expect.equals(" foo\n bar\n baz", str.replaceAll(exp, " ")); - - exp = new RegExp(r"(\w+)"); - Expect.isNull(exp.matchAsPrefix(" xyz ab")); - Expect.isNull(exp.matchAsPrefix(" xyz ab", 0)); - - var m = exp.matchAsPrefix(" xyz ab", 1); - Expect.equals("xyz", m[0]); - Expect.equals("xyz", m[1]); - Expect.equals(1, m.groupCount); - - m = exp.matchAsPrefix(" xyz ab", 2); - Expect.equals("yz", m[0]); - Expect.equals("yz", m[1]); - Expect.equals(1, m.groupCount); - - m = exp.matchAsPrefix(" xyz ab", 3); - Expect.equals("z", m[0]); - Expect.equals("z", m[1]); - Expect.equals(1, m.groupCount); - - Expect.isNull(exp.matchAsPrefix(" xyz ab", 4)); - - m = exp.matchAsPrefix(" xyz ab", 5); - Expect.equals("ab", m[0]); - Expect.equals("ab", m[1]); - Expect.equals(1, m.groupCount); - - m = exp.matchAsPrefix(" xyz ab", 6); - Expect.equals("b", m[0]); - Expect.equals("b", m[1]); - Expect.equals(1, m.groupCount); - - Expect.isNull(exp.matchAsPrefix(" xyz ab", 7)); - - Expect.throws(() => exp.matchAsPrefix(" xyz ab", -1)); - Expect.throws(() => exp.matchAsPrefix(" xyz ab", 8)); -} diff --git a/tests/language_2/regress/r24720_test.dart b/tests/language_2/regress/r24720_test.dart deleted file mode 100644 index c5fd87cfa9a..00000000000 --- a/tests/language_2/regress/r24720_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for r24720. - -import 'package:expect/expect.dart'; - -class A {} - -class B extends A { - B() : this.foo(); - B.foo(); -} - -main() { - Expect.isTrue(new B() is B); - Expect.isTrue(new B() is A); - Expect.isFalse(new B() is A); -} diff --git a/tests/language_2/regress/regress10204_test.dart b/tests/language_2/regress/regress10204_test.dart deleted file mode 100644 index 734ca2762c5..00000000000 --- a/tests/language_2/regress/regress10204_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to miscompile -// [A.visitInvokeDynamicMethod]. - -import "package:expect/expect.dart"; - -var a = 2; - -class Tupe { - const Tupe(); - get instructionType => a == 2 ? this : new A(); - refine(a, b) => '$a$b'; -} - -class Node { - final selector = null; - var inputs = {"a": const Tupe(), "b": const Tupe()}; - bool isCallOnInterceptor = false; - - getDartReceiver() { - return isCallOnInterceptor ? inputs["a"] : inputs["b"]; - } -} - -class A { - visitInvokeDynamicMethod(node) { - var receiverType = node.getDartReceiver().instructionType; - return receiverType.refine(node.selector, node.selector); - } -} - -main() { - Expect.equals( - 'nullnull', [new A()].last.visitInvokeDynamicMethod(new Node())); -} diff --git a/tests/language_2/regress/regress10321_test.dart b/tests/language_2/regress/regress10321_test.dart deleted file mode 100644 index 7632b8da191..00000000000 --- a/tests/language_2/regress/regress10321_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -// Regression test for dart2js that used to miscompile [A.foo]. - -var global = 54; - -class A { - int a = 0; - int b = 42; - final int c = global; - foo() { - int start = a - 1; - a = 54; - if (b == 42) { - b = 32; - } else { - b = 42; - } - Expect.equals(-1, start); - } - - bar() { - int start = a - c - 1; - a = 42; - if (b == 42) { - b = 32; - } else { - b = 42; - } - Expect.equals(-55, start); - } -} - -main() { - new A().foo(); - new A().bar(); -} diff --git a/tests/language_2/regress/regress10581_test.dart b/tests/language_2/regress/regress10581_test.dart deleted file mode 100644 index 21eefee32cc..00000000000 --- a/tests/language_2/regress/regress10581_test.dart +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for https://code.google.com/p/dart/issues/detail?id=10581. - -import 'package:expect/expect.dart'; - -abstract class AxesObject { - Update(); -} - -String result = ''; - -class Point2DObject extends AxesObject { - Update() { - result += 'P'; - } -} - -class BestFitObject extends AxesObject { - Update() { - result += 'B'; - } -} - -class Foo { - AddAxesObject(type) { - AxesObject a = null; - switch (type) { - case 100: - a = new Point2DObject(); - break; - case 200: - a = new BestFitObject(); - break; - } - if (a != null) { - a.Update(); - } - } - - AddAxesObject2(type) { - AxesObject a = null; - if (type == 100) { - a = new Point2DObject(); - } else if (type == 200) { - a = new BestFitObject(); - } - if (a != null) { - a.Update(); - } - } -} - -main() { - var f = new Foo(); - f.AddAxesObject(100); - f.AddAxesObject(200); - f.AddAxesObject2(100); - f.AddAxesObject2(200); - Expect.equals('PBPB', result); -} diff --git a/tests/language_2/regress/regress10721_test.dart b/tests/language_2/regress/regress10721_test.dart deleted file mode 100644 index cca6c9291b6..00000000000 --- a/tests/language_2/regress/regress10721_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -void main() { - Expect.equals('', useParameterInClosure(1)); - Expect.equals(43, updateParameterInClosure(1)()); -} - -String useParameterInClosure(arg1, {int arg2}) { - if (arg1 is Map) { - return arg1.keys.map((key) => arg1[key]).first; - } else { - return ''; - } -} - -Function updateParameterInClosure(arg1) { - if (arg1 is Map) { - return () => arg1 = 42; - } else { - return () => arg1 = arg1 + 42; - } -} diff --git a/tests/language_2/regress/regress10747_test.dart b/tests/language_2/regress/regress10747_test.dart deleted file mode 100644 index 38f6406be9e..00000000000 --- a/tests/language_2/regress/regress10747_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class B {} - -class A { - var field; - A(this.field); - asTypeVariable() => field as T; - asBOfT() => field as B; -} - -main() { - Expect.equals(42, new A(42).asTypeVariable()); - Expect.throwsTypeError(() => new A(42).asTypeVariable()); - - var b = new B(); - Expect.equals(b, new A(b).asBOfT()); - Expect.throwsTypeError(() => new A(b).asBOfT()); -} diff --git a/tests/language_2/regress/regress10783_test.dart b/tests/language_2/regress/regress10783_test.dart deleted file mode 100644 index 7a5ca314e48..00000000000 --- a/tests/language_2/regress/regress10783_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class C { - foo(int y) { - return y; - } -} - -main() { - for (var b in [ - [false, 'pig'] - ]) { - var c; - if (b[0]) c = new C(); - Expect.throwsNoSuchMethodError(() => print(c.foo(b[1]))); - } -} diff --git a/tests/language_2/regress/regress10996_lib.dart b/tests/language_2/regress/regress10996_lib.dart deleted file mode 100644 index 4dd4507c55e..00000000000 --- a/tests/language_2/regress/regress10996_lib.dart +++ /dev/null @@ -1,12 +0,0 @@ -// 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 regress_10996_lib; - -var a = 3; -var b = 4; -var c = 5; -var d = 6; diff --git a/tests/language_2/regress/regress10996_test.dart b/tests/language_2/regress/regress10996_test.dart deleted file mode 100644 index d6f07be8172..00000000000 --- a/tests/language_2/regress/regress10996_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import "regress10996_lib.dart" as lib; - -foo(a, [b]) { - return a + b + lib.a + lib.b; -} - -bar(c, {d}) { - return c + d + lib.c + lib.d; -} - -main() { - Expect.equals(1 + 2 + 3 + 4, foo(1, 2)); - Expect.equals(7 + 8 + 3 + 4, foo(7, 8)); - Expect.equals(3 + 4 + 5 + 6, bar(3, d: 4)); - Expect.equals(7 + 8 + 5 + 6, bar(7, d: 8)); -} diff --git a/tests/language_2/regress/regress11010_test.dart b/tests/language_2/regress/regress11010_test.dart deleted file mode 100644 index 203bdd81b4d..00000000000 --- a/tests/language_2/regress/regress11010_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2013, 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 - -// We used to have an issue in dart2js where calling a top-level or -// static field wouldn't register the 'call' selector correctly. -var caller = new Caller(); - -class Caller { - call(a, b) => a + b; -} - -main() { - if (caller(42, 87) != 42 + 87) { - throw 'unexpected result'; - } -} diff --git a/tests/language_2/regress/regress11724_runtime_test.dart b/tests/language_2/regress/regress11724_runtime_test.dart deleted file mode 100644 index e4057ceaf5f..00000000000 --- a/tests/language_2/regress/regress11724_runtime_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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 "package:expect/expect.dart"; - -void main() { - -} diff --git a/tests/language_2/regress/regress11724_test.dart b/tests/language_2/regress/regress11724_test.dart deleted file mode 100644 index f0394528af8..00000000000 --- a/tests/language_2/regress/regress11724_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -void main() { - method([]); -//^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION -// [cfe] Method not found: 'method'. -} diff --git a/tests/language_2/regress/regress11793_test.dart b/tests/language_2/regress/regress11793_test.dart deleted file mode 100644 index 00700d73121..00000000000 --- a/tests/language_2/regress/regress11793_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js, whose value range analysis phase -// assumed loop phis that were integer necessarily had integer inputs. - -var array = const [0, 0.5]; -var globalB = array[0]; -var otherArray = [5]; - -main() { - var b = globalB; - var a = b + 1; - if (otherArray[0] == 0) { - // Use a non-existing selector to prevent adding a bailout check. - (a as dynamic).noSuch(); - a = otherArray[0]; - } - - // Use [a] to make sure it does not become dead code. - var f = array[a]; - - // Add an integer check on [b]. - var d = array[b]; - - // This instruction will be GVN to the same value as [a]. - // By being GVN'ed, [e] will have its type changed from integer - // to number: because of the int type check on [b], we know - // [: b + 1 :] returns an integer. - // However we update this instruction with the previous [: b + 1 :] - // that did not have that information and therefore only knows that - // the instruction returns a number. - var e = b + 1; - - // Introduce a loop phi that has [e] as header input, and [e++] as - // update input. By having [e] as input, dart2js will compute an - // integer type for the phi. However, after GVN, [e] becomes a - // number. - - while (otherArray[0] == 0) { - // Use [e] as an index for an array so that the value range - // analysis tries to compute a range for [e]. - otherArray[e] = d + f; - e++; - } -} diff --git a/tests/language_2/regress/regress11800_test.dart b/tests/language_2/regress/regress11800_test.dart deleted file mode 100644 index a6c322fb0f4..00000000000 --- a/tests/language_2/regress/regress11800_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2013, 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. -// VMOptions=--optimization-counter-threshold=10 - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test correct register allocation with a value used twice at the same -// instruction. -test(List a, int v) { - a[v] = v; -} - -main() { - var list = new List.filled(2, null); - for (var i = 0; i < 20; i++) test(list, 1); - Expect.equals(null, list[0]); - Expect.equals(1, list[1]); -} diff --git a/tests/language_2/regress/regress12023_test.dart b/tests/language_2/regress/regress12023_test.dart deleted file mode 100644 index c8dc06de17c..00000000000 --- a/tests/language_2/regress/regress12023_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -void main() { - List test = ["f", "5", "s", "6"]; - int length = test.length; - for (int i = 0; i < length;) { - var action = test[i++]; - switch (action) { - case "f": - case "s": - action = test[i - 1]; - int value = int.parse(test[i++]); - if (action == "f") { - Expect.equals(5, value); - } else { - Expect.equals(6, value); - } - break; - } - } -} diff --git a/tests/language_2/regress/regress12118_test.dart b/tests/language_2/regress/regress12118_test.dart deleted file mode 100644 index ec4652b129c..00000000000 --- a/tests/language_2/regress/regress12118_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for issue 12118 which caused a crash in dart2js. - -const X = 42; - -class A { - final x; - A({this.x: X}); -} - -class B extends A {} - -void main() { - if (new B().x != 42) { - throw 'Test failed'; - } -} diff --git a/tests/language_2/regress/regress12284_test.dart b/tests/language_2/regress/regress12284_test.dart deleted file mode 100644 index 4c5b0bb7e86..00000000000 --- a/tests/language_2/regress/regress12284_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A { - int field; - - @pragma('vm:never-inline') - @pragma('dart2js:noInline') - A(param) { - // Currently defeat inlining by using a closure. - var bar = () => 42; - field = param + 42; - } - A.redirect() : this('foo'); -} - -main() { - Expect.equals(42 + 42, new A(42).field); - // TODO(jmesserly): DDC throws an nSM if the argument types mismatch, - // instead of a TypeError. - // https://github.com/dart-lang/dev_compiler/issues/534 - Expect.throws(() => new A.redirect(), - (e) => e is ArgumentError || e is TypeError || e is NoSuchMethodError); -} diff --git a/tests/language_2/regress/regress12288_test.dart b/tests/language_2/regress/regress12288_test.dart deleted file mode 100644 index 9227ae57057..00000000000 --- a/tests/language_2/regress/regress12288_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2013, 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() { - var parent = new Element(null); - var child = new Element(parent); - var result = child.path0.length; - if (result != 2) { - throw "Expected 2, but child.path0.length was $result"; - } -} - -class Element { - final Element parent; - - Element(this.parent); - - List get path0 { - if (parent == null) { - return [this]; - } else { - var list = parent.path0; - list.add(this); - return list; - } - } -} diff --git a/tests/language_2/regress/regress12336_test.dart b/tests/language_2/regress/regress12336_test.dart deleted file mode 100644 index df728703816..00000000000 --- a/tests/language_2/regress/regress12336_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to generate wrong code for -// [foo]. - -import "package:expect/expect.dart"; - -main() { - var result = foo(1, 2); - Expect.equals(1, result[0]); - Expect.equals(2, result[1]); - - result = foo([], 2); - Expect.equals(0, result[0]); - Expect.listEquals([], result[1]); -} - -@pragma('vm:never-inline') -@pragma('dart2js:noInline') -foo(a, b) { - () => 42; - if (a is List) { - var saved = a as List; - // By having two HTypeKnown SSA instructions for [a], dart2js was - // confused when updating the phis at exit of this block. - a = a.length; - b = saved; - } - return [a, b]; -} diff --git a/tests/language_2/regress/regress124683_test.dart b/tests/language_2/regress/regress124683_test.dart deleted file mode 100644 index 3da3ec970d1..00000000000 --- a/tests/language_2/regress/regress124683_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Regression test for ddc failure triggered by -// https://dart-review.googlesource.com/c/sdk/+/124683 - -class Class { - String toString() { - void local() {} - - return '${runtimeType.toString()}'; - } -} - -main() { - new Class().toString(); -} diff --git a/tests/language_2/regress/regress12561_test.dart b/tests/language_2/regress/regress12561_test.dart deleted file mode 100644 index 24b682faf85..00000000000 --- a/tests/language_2/regress/regress12561_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -class C { - noSuchMethod(int x, int y) => x + y; -//^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -// [cfe] The method 'C.noSuchMethod' has more required arguments than those of overridden method 'Object.noSuchMethod'. - // ^ - // [cfe] The parameter 'x' of the method 'C.noSuchMethod' has type 'int', which does not match the corresponding type, 'Invocation', in the overridden method, 'Object.noSuchMethod'. -} - -main() { - Expect.throws(() => new C().foo, (e) => e is Error); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'foo' isn't defined for the class 'C'. -} diff --git a/tests/language_2/regress/regress12615_test.dart b/tests/language_2/regress/regress12615_test.dart deleted file mode 100644 index 0e5a4f9cfb0..00000000000 --- a/tests/language_2/regress/regress12615_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2012, 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 - -// Test that try-catch works properly in the VM. - -main() { - void test() { - f() { - try {} catch (e) {} - } - - try {} catch (e) {} - } - - test(); -} diff --git a/tests/language_2/regress/regress13179_test.dart b/tests/language_2/regress/regress13179_test.dart deleted file mode 100644 index f8ac487d83e..00000000000 --- a/tests/language_2/regress/regress13179_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -int count = 0; - -void f([void f([Null x]) = f]) { - count++; - if (f != null) { - f(null); - } -} - -main() { - f(); - Expect.equals(2, count); -} diff --git a/tests/language_2/regress/regress13494_test.dart b/tests/language_2/regress/regress13494_test.dart deleted file mode 100644 index 9377eb9de1e..00000000000 --- a/tests/language_2/regress/regress13494_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js. Test that the argument to an unresolved static -// getter is only evaluated once. - -import "package:expect/expect.dart"; - -int i = 0; - -p(x) => i++; - -class A {} - -main() { - bool caught = false; - try { - A.unknown = p(2); - //^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER - // [cfe] Setter not found: 'unknown'. - } catch (_) { - caught = true; - } - Expect.isTrue(caught); - Expect.equals(1, i); -} diff --git a/tests/language_2/regress/regress13556_test.dart b/tests/language_2/regress/regress13556_test.dart deleted file mode 100644 index 14119d6c38c..00000000000 --- a/tests/language_2/regress/regress13556_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to crash when resolving the -// @B() annotation. - -class A { - final a; - const A({this.a}); -} - -class B extends A { - const B(); -} - -@B() -main() {} diff --git a/tests/language_2/regress/regress1363_lib.dart b/tests/language_2/regress/regress1363_lib.dart deleted file mode 100644 index 1706957248d..00000000000 --- a/tests/language_2/regress/regress1363_lib.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2012, 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 Issue1363; - -class C {} - -class Cup { - var foo; - Cup(this.foo); - - T getContents() => foo; -} diff --git a/tests/language_2/regress/regress1363_runtime_test.dart b/tests/language_2/regress/regress1363_runtime_test.dart deleted file mode 100644 index bb28153c977..00000000000 --- a/tests/language_2/regress/regress1363_runtime_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. -// VMOptions=--enable_type_checks - -library Issue1363Test.dart; - -import 'regress1363_lib.dart' as lib; - -main() { - new C().test(); -} - -class C { - lib.Cup libCup; - lib.Cup myCup; - - C(); - - test() { - myCup = new lib.Cup(new C()); - libCup = new lib.Cup(new lib.C()); - - C contents = myCup.getContents(); // expect no warning or error - - } -} diff --git a/tests/language_2/regress/regress1363_test.dart b/tests/language_2/regress/regress1363_test.dart deleted file mode 100644 index 71fc5fb026d..00000000000 --- a/tests/language_2/regress/regress1363_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2012, 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. -// VMOptions=--enable_type_checks - -// @dart = 2.9 - -library Issue1363Test.dart; - -import 'regress1363_lib.dart' as lib; - -main() { - new C().test(); -} - -class C { - lib.Cup libCup; - lib.Cup myCup; - - C(); - - test() { - myCup = new lib.Cup(new C()); - libCup = new lib.Cup(new lib.C()); - - C contents = myCup.getContents(); // expect no warning or error - contents = libCup.getContents(); - // ^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'C/*1*/' can't be assigned to a variable of type 'C/*2*/'. - } -} diff --git a/tests/language_2/regress/regress13673_test.dart b/tests/language_2/regress/regress13673_test.dart deleted file mode 100644 index 56631aae3d5..00000000000 --- a/tests/language_2/regress/regress13673_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class Bar { - Type field; - Bar(this.field); - foo() => field; -} - -dynamic topLevel = new Bar(String).foo(); - -main() { - Expect.isTrue(topLevel is Type); -} diff --git a/tests/language_2/regress/regress14014_2_test.dart b/tests/language_2/regress/regress14014_2_test.dart deleted file mode 100644 index 15436736a4c..00000000000 --- a/tests/language_2/regress/regress14014_2_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that a type variable used in a parameter of a constructor that -// has a closure in its initializer list does not lead to a crash in -// dart2js. - -class A { - A(f); -} - -class B extends A { - B({void f(T foo)}) - : super((T a) { - f = (a) => 42; - }); -} - -main() { - var t = new B(); -} diff --git a/tests/language_2/regress/regress14014_3_test.dart b/tests/language_2/regress/regress14014_3_test.dart deleted file mode 100644 index 8bdd11b16ad..00000000000 --- a/tests/language_2/regress/regress14014_3_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that an is check on a function type involving type parameters -// does not crash dart2js, when the is test is in the initializer list -// of a constructor. - -class A { - var f; - A(this.f); -} - -typedef foo(T a); - -class B extends A { - B({void f(T foo)}) : super(() => f is foo); -} - -main() { - var t = new B(f: (int a) => 42); - if (!t.f()) { - throw 'Test failed'; - } -} diff --git a/tests/language_2/regress/regress14014_test.dart b/tests/language_2/regress/regress14014_test.dart deleted file mode 100644 index ab0dd892c1b..00000000000 --- a/tests/language_2/regress/regress14014_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2013, 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 - -class A { - A(f); -} - -class B extends A { - B() : super((T param) => 42); -} - -main() { - var t = new B(); -} diff --git a/tests/language_2/regress/regress14105_test.dart b/tests/language_2/regress/regress14105_test.dart deleted file mode 100644 index 1ec2d0c58aa..00000000000 --- a/tests/language_2/regress/regress14105_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for Issue 14105. - -typedef UsedAsFieldType(); - -class ClassOnlyForRti { - UsedAsFieldType field; -} - -class A { - var field; -} - -use(a) => a.field = ""; - -var useFieldSetter = use; - -main() { - var a = new A(); - useFieldSetter(a); - print(a is A); -} diff --git a/tests/language_2/regress/regress14242_test.dart b/tests/language_2/regress/regress14242_test.dart deleted file mode 100644 index 57cf5505f8b..00000000000 --- a/tests/language_2/regress/regress14242_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to crash on type literals -// used in a cascade send. - -class A { - var bar; - var foo = {}; -} - -main() { - var a = new A(); - a - ..foo[Object] = 54 - ..bar = 42; - if (a.foo.keys.first is! Type) { - throw 'Test failed'; - } -} diff --git a/tests/language_2/regress/regress14348_test.dart b/tests/language_2/regress/regress14348_test.dart deleted file mode 100644 index 100eafafe08..00000000000 --- a/tests/language_2/regress/regress14348_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2014, 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 - -// Regression test for issue 14348. - -import "package:collection/equality.dart"; - -main() { - const Equality eq = const UnorderedIterableEquality(); - const Equality> mapeq = - const MapEquality(values: eq); -} diff --git a/tests/language_2/regress/regress15606_runtime_test.dart b/tests/language_2/regress/regress15606_runtime_test.dart deleted file mode 100644 index ddcd5792f39..00000000000 --- a/tests/language_2/regress/regress15606_runtime_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -class Foo {} - -var a = [new Object(), 42]; - -bar(x, y) {} - -main() { - while (false) { - // Comply to inlining heuristics. - // Use an unresolved prefix. - var foo = - - bar( - // Make dart2js generate a call to setRuntimeTypeInfo. - new Foo(), - // Use a one-shot interceptor. - a[0].toString()); - - // Do an is test on `Foo` to require setRuntimeTypeInfo. - print(foo is Foo); - } -} diff --git a/tests/language_2/regress/regress15606_test.dart b/tests/language_2/regress/regress15606_test.dart deleted file mode 100644 index 740f9199027..00000000000 --- a/tests/language_2/regress/regress15606_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2013, 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 - -class Foo {} - -var a = [new Object(), 42]; - -bar(x, y) {} - -main() { - while (false) { - // Comply to inlining heuristics. - // Use an unresolved prefix. - var foo = - Unresolved. -// ^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER -// [cfe] Undefined name 'Unresolved'. - bar( - // Make dart2js generate a call to setRuntimeTypeInfo. - new Foo(), - // Use a one-shot interceptor. - a[0].toString()); - - // Do an is test on `Foo` to require setRuntimeTypeInfo. - print(foo is Foo); - } -} diff --git a/tests/language_2/regress/regress15702_test.dart b/tests/language_2/regress/regress15702_test.dart deleted file mode 100644 index 13fbb67ae5e..00000000000 --- a/tests/language_2/regress/regress15702_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2013, 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() { - Amount stake = new Amount(2.5); - if ((stake.value * 10).toInt() != 25) { - throw 'Test failed'; - } -} - -class Amount { - num value; - Amount(this.value); -} diff --git a/tests/language_2/regress/regress15720_test.dart b/tests/language_2/regress/regress15720_test.dart deleted file mode 100644 index 14d5b183502..00000000000 --- a/tests/language_2/regress/regress15720_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// 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 - -// Regression test for dart2js, issue 15720. - -class B {} - -confuse(x) { - if (DateTime.now().millisecondsSinceEpoch == 42) return confuse(x); - return x; -} - -main() { - Set set = new Set.from([]); - - confuse(499); - confuse(set); - - // Dart2js used to reuse a variable name, overwriting the `set` variable with - // one of the B's. - var t1 = new B(); - var t2 = new B(); - var t3 = new B(); - var t4 = new B(); - - set.addAll([t1, t2, t3, t4]); - confuse(7); - - set.addAll([t1, t2, t3, t4]); -} diff --git a/tests/language_2/regress/regress1578_test.dart b/tests/language_2/regress/regress1578_test.dart deleted file mode 100644 index d899ca861ef..00000000000 --- a/tests/language_2/regress/regress1578_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012, 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 - -// Regression test for issue 1578. - -]~<)$ -// [error line 9, column 1, length 1] -// [analyzer] SYNTACTIC_ERROR.EXPECTED_EXECUTABLE -// [cfe] Expected a declaration, but got ']'. -// [error line 9, column 2, length 1] -// [analyzer] SYNTACTIC_ERROR.EXPECTED_EXECUTABLE -// [cfe] Expected a declaration, but got '~'. -//^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_EXECUTABLE -// [cfe] Expected a declaration, but got '<'. -// ^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_EXECUTABLE -// [cfe] Expected a declaration, but got ')'. -// ^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN -// [analyzer] SYNTACTIC_ERROR.MISSING_CONST_FINAL_VAR_OR_TYPE -// [cfe] Expected ';' after this. -// [cfe] Variables must be declared using the keywords 'const', 'final', 'var' or a type name. diff --git a/tests/language_2/regress/regress16640_test.dart b/tests/language_2/regress/regress16640_test.dart deleted file mode 100644 index 299442d6abf..00000000000 --- a/tests/language_2/regress/regress16640_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2014, 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 - -// Regression test for issue 16640. - -class Segment extends SegmentGen {} - -class SegmentGen extends ConceptEntity {} - -class ConceptEntity {} - -main() { - new ConceptEntity(); -} diff --git a/tests/language_2/regress/regress17382_test.dart b/tests/language_2/regress/regress17382_test.dart deleted file mode 100644 index 2b6bfaaaf8a..00000000000 --- a/tests/language_2/regress/regress17382_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2015, 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 - -// Regression test for issue 17382. - -import 'package:expect/expect.dart'; - -var mCalled = false; - -m(x) { - mCalled = true; - return x; -} - -main() { - try { - tl(m(0)); -// ^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION -// [cfe] Method not found: 'tl'. - } catch (e) {} - Expect.isTrue(mCalled); -} diff --git a/tests/language_2/regress/regress1751477_lib1.dart b/tests/language_2/regress/regress1751477_lib1.dart deleted file mode 100644 index 10ce32d7e39..00000000000 --- a/tests/language_2/regress/regress1751477_lib1.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 lib1; - -import 'regress1751477_lib2.dart'; -import 'regress1751477_lib3.dart'; -import 'regress1751477_lib4.dart'; -import 'regress1751477_lib5.dart'; -import 'regress1751477_lib6.dart'; -import 'regress1751477_lib7.dart'; -import 'regress1751477_lib8.dart'; -import 'regress1751477_lib9.dart'; - -import 'regress1751477_lib11.dart'; -import 'regress1751477_lib21.dart'; -import 'regress1751477_lib31.dart'; -import 'regress1751477_lib41.dart'; -import 'regress1751477_lib51.dart'; -import 'regress1751477_lib61.dart'; -import 'regress1751477_lib71.dart'; -import 'regress1751477_lib81.dart'; -import 'regress1751477_lib91.dart'; - -lib1_func() {} diff --git a/tests/language_2/regress/regress1751477_lib11.dart b/tests/language_2/regress/regress1751477_lib11.dart deleted file mode 100644 index f0c4e0dd3fa..00000000000 --- a/tests/language_2/regress/regress1751477_lib11.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 lib11; - -import 'regress1751477_lib1.dart'; -import 'regress1751477_lib2.dart'; -import 'regress1751477_lib3.dart'; -import 'regress1751477_lib4.dart'; -import 'regress1751477_lib5.dart'; -import 'regress1751477_lib6.dart'; -import 'regress1751477_lib7.dart'; -import 'regress1751477_lib8.dart'; -import 'regress1751477_lib9.dart'; - -import 'regress1751477_lib21.dart'; -import 'regress1751477_lib31.dart'; -import 'regress1751477_lib41.dart'; -import 'regress1751477_lib51.dart'; -import 'regress1751477_lib61.dart'; -import 'regress1751477_lib71.dart'; -import 'regress1751477_lib81.dart'; -import 'regress1751477_lib91.dart'; - -lib11_func() {} diff --git a/tests/language_2/regress/regress1751477_lib2.dart b/tests/language_2/regress/regress1751477_lib2.dart deleted file mode 100644 index 63a3216d51d..00000000000 --- a/tests/language_2/regress/regress1751477_lib2.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 lib2; - -import 'regress1751477_lib1.dart'; -import 'regress1751477_lib3.dart'; -import 'regress1751477_lib4.dart'; -import 'regress1751477_lib5.dart'; -import 'regress1751477_lib6.dart'; -import 'regress1751477_lib7.dart'; -import 'regress1751477_lib8.dart'; -import 'regress1751477_lib9.dart'; - -import 'regress1751477_lib11.dart'; -import 'regress1751477_lib21.dart'; -import 'regress1751477_lib31.dart'; -import 'regress1751477_lib41.dart'; -import 'regress1751477_lib51.dart'; -import 'regress1751477_lib61.dart'; -import 'regress1751477_lib71.dart'; -import 'regress1751477_lib81.dart'; -import 'regress1751477_lib91.dart'; - -lib2_func() {} diff --git a/tests/language_2/regress/regress1751477_lib21.dart b/tests/language_2/regress/regress1751477_lib21.dart deleted file mode 100644 index 24b9aeea1bd..00000000000 --- a/tests/language_2/regress/regress1751477_lib21.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 lib21; - -import 'regress1751477_lib1.dart'; -import 'regress1751477_lib2.dart'; -import 'regress1751477_lib3.dart'; -import 'regress1751477_lib4.dart'; -import 'regress1751477_lib5.dart'; -import 'regress1751477_lib6.dart'; -import 'regress1751477_lib7.dart'; -import 'regress1751477_lib8.dart'; -import 'regress1751477_lib9.dart'; - -import 'regress1751477_lib11.dart'; -import 'regress1751477_lib31.dart'; -import 'regress1751477_lib41.dart'; -import 'regress1751477_lib51.dart'; -import 'regress1751477_lib61.dart'; -import 'regress1751477_lib71.dart'; -import 'regress1751477_lib81.dart'; -import 'regress1751477_lib91.dart'; - -lib21_func() {} diff --git a/tests/language_2/regress/regress1751477_lib3.dart b/tests/language_2/regress/regress1751477_lib3.dart deleted file mode 100644 index c6518372f82..00000000000 --- a/tests/language_2/regress/regress1751477_lib3.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 lib3; - -import 'regress1751477_lib2.dart'; -import 'regress1751477_lib1.dart'; -import 'regress1751477_lib4.dart'; -import 'regress1751477_lib5.dart'; -import 'regress1751477_lib6.dart'; -import 'regress1751477_lib7.dart'; -import 'regress1751477_lib8.dart'; -import 'regress1751477_lib9.dart'; - -import 'regress1751477_lib11.dart'; -import 'regress1751477_lib21.dart'; -import 'regress1751477_lib31.dart'; -import 'regress1751477_lib41.dart'; -import 'regress1751477_lib51.dart'; -import 'regress1751477_lib61.dart'; -import 'regress1751477_lib71.dart'; -import 'regress1751477_lib81.dart'; -import 'regress1751477_lib91.dart'; - -lib3_func() {} diff --git a/tests/language_2/regress/regress1751477_lib31.dart b/tests/language_2/regress/regress1751477_lib31.dart deleted file mode 100644 index e27d72c7deb..00000000000 --- a/tests/language_2/regress/regress1751477_lib31.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 lib31; - -import 'regress1751477_lib1.dart'; -import 'regress1751477_lib2.dart'; -import 'regress1751477_lib3.dart'; -import 'regress1751477_lib4.dart'; -import 'regress1751477_lib5.dart'; -import 'regress1751477_lib6.dart'; -import 'regress1751477_lib7.dart'; -import 'regress1751477_lib8.dart'; -import 'regress1751477_lib9.dart'; - -import 'regress1751477_lib11.dart'; -import 'regress1751477_lib21.dart'; -import 'regress1751477_lib41.dart'; -import 'regress1751477_lib51.dart'; -import 'regress1751477_lib61.dart'; -import 'regress1751477_lib71.dart'; -import 'regress1751477_lib81.dart'; -import 'regress1751477_lib91.dart'; - -lib31_func() {} diff --git a/tests/language_2/regress/regress1751477_lib4.dart b/tests/language_2/regress/regress1751477_lib4.dart deleted file mode 100644 index db6297c8aa8..00000000000 --- a/tests/language_2/regress/regress1751477_lib4.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 lib4; - -import 'regress1751477_lib2.dart'; -import 'regress1751477_lib3.dart'; -import 'regress1751477_lib1.dart'; -import 'regress1751477_lib5.dart'; -import 'regress1751477_lib6.dart'; -import 'regress1751477_lib7.dart'; -import 'regress1751477_lib8.dart'; -import 'regress1751477_lib9.dart'; - -import 'regress1751477_lib11.dart'; -import 'regress1751477_lib21.dart'; -import 'regress1751477_lib31.dart'; -import 'regress1751477_lib41.dart'; -import 'regress1751477_lib51.dart'; -import 'regress1751477_lib61.dart'; -import 'regress1751477_lib71.dart'; -import 'regress1751477_lib81.dart'; -import 'regress1751477_lib91.dart'; - -lib4_func() {} diff --git a/tests/language_2/regress/regress1751477_lib41.dart b/tests/language_2/regress/regress1751477_lib41.dart deleted file mode 100644 index 0fb044e4f98..00000000000 --- a/tests/language_2/regress/regress1751477_lib41.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 lib41; - -import 'regress1751477_lib1.dart'; -import 'regress1751477_lib2.dart'; -import 'regress1751477_lib3.dart'; -import 'regress1751477_lib4.dart'; -import 'regress1751477_lib5.dart'; -import 'regress1751477_lib6.dart'; -import 'regress1751477_lib7.dart'; -import 'regress1751477_lib8.dart'; -import 'regress1751477_lib9.dart'; - -import 'regress1751477_lib11.dart'; -import 'regress1751477_lib21.dart'; -import 'regress1751477_lib31.dart'; -import 'regress1751477_lib51.dart'; -import 'regress1751477_lib61.dart'; -import 'regress1751477_lib71.dart'; -import 'regress1751477_lib81.dart'; -import 'regress1751477_lib91.dart'; - -lib41_func() {} diff --git a/tests/language_2/regress/regress1751477_lib5.dart b/tests/language_2/regress/regress1751477_lib5.dart deleted file mode 100644 index 6a2ec5b3a2d..00000000000 --- a/tests/language_2/regress/regress1751477_lib5.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 lib5; - -import 'regress1751477_lib2.dart'; -import 'regress1751477_lib3.dart'; -import 'regress1751477_lib4.dart'; -import 'regress1751477_lib1.dart'; -import 'regress1751477_lib6.dart'; -import 'regress1751477_lib7.dart'; -import 'regress1751477_lib8.dart'; -import 'regress1751477_lib9.dart'; - -import 'regress1751477_lib11.dart'; -import 'regress1751477_lib21.dart'; -import 'regress1751477_lib31.dart'; -import 'regress1751477_lib41.dart'; -import 'regress1751477_lib51.dart'; -import 'regress1751477_lib61.dart'; -import 'regress1751477_lib71.dart'; -import 'regress1751477_lib81.dart'; -import 'regress1751477_lib91.dart'; - -lib5_func() {} diff --git a/tests/language_2/regress/regress1751477_lib51.dart b/tests/language_2/regress/regress1751477_lib51.dart deleted file mode 100644 index e50b83e42d6..00000000000 --- a/tests/language_2/regress/regress1751477_lib51.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 lib51; - -import 'regress1751477_lib1.dart'; -import 'regress1751477_lib2.dart'; -import 'regress1751477_lib3.dart'; -import 'regress1751477_lib4.dart'; -import 'regress1751477_lib5.dart'; -import 'regress1751477_lib6.dart'; -import 'regress1751477_lib7.dart'; -import 'regress1751477_lib8.dart'; -import 'regress1751477_lib9.dart'; - -import 'regress1751477_lib11.dart'; -import 'regress1751477_lib21.dart'; -import 'regress1751477_lib31.dart'; -import 'regress1751477_lib41.dart'; -import 'regress1751477_lib61.dart'; -import 'regress1751477_lib71.dart'; -import 'regress1751477_lib81.dart'; -import 'regress1751477_lib91.dart'; - -lib51_func() {} diff --git a/tests/language_2/regress/regress1751477_lib6.dart b/tests/language_2/regress/regress1751477_lib6.dart deleted file mode 100644 index d9fd9ae4b44..00000000000 --- a/tests/language_2/regress/regress1751477_lib6.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 lib6; - -import 'regress1751477_lib2.dart'; -import 'regress1751477_lib3.dart'; -import 'regress1751477_lib4.dart'; -import 'regress1751477_lib5.dart'; -import 'regress1751477_lib1.dart'; -import 'regress1751477_lib7.dart'; -import 'regress1751477_lib8.dart'; -import 'regress1751477_lib9.dart'; - -import 'regress1751477_lib11.dart'; -import 'regress1751477_lib21.dart'; -import 'regress1751477_lib31.dart'; -import 'regress1751477_lib41.dart'; -import 'regress1751477_lib51.dart'; -import 'regress1751477_lib61.dart'; -import 'regress1751477_lib71.dart'; -import 'regress1751477_lib81.dart'; -import 'regress1751477_lib91.dart'; - -lib6_func() {} diff --git a/tests/language_2/regress/regress1751477_lib61.dart b/tests/language_2/regress/regress1751477_lib61.dart deleted file mode 100644 index c624ca517e0..00000000000 --- a/tests/language_2/regress/regress1751477_lib61.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 lib61; - -import 'regress1751477_lib1.dart'; -import 'regress1751477_lib2.dart'; -import 'regress1751477_lib3.dart'; -import 'regress1751477_lib4.dart'; -import 'regress1751477_lib5.dart'; -import 'regress1751477_lib6.dart'; -import 'regress1751477_lib7.dart'; -import 'regress1751477_lib8.dart'; -import 'regress1751477_lib9.dart'; - -import 'regress1751477_lib11.dart'; -import 'regress1751477_lib21.dart'; -import 'regress1751477_lib31.dart'; -import 'regress1751477_lib41.dart'; -import 'regress1751477_lib51.dart'; -import 'regress1751477_lib71.dart'; -import 'regress1751477_lib81.dart'; -import 'regress1751477_lib91.dart'; - -lib61_func() {} diff --git a/tests/language_2/regress/regress1751477_lib7.dart b/tests/language_2/regress/regress1751477_lib7.dart deleted file mode 100644 index 736473cc9b0..00000000000 --- a/tests/language_2/regress/regress1751477_lib7.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 lib7; - -import 'regress1751477_lib2.dart'; -import 'regress1751477_lib3.dart'; -import 'regress1751477_lib4.dart'; -import 'regress1751477_lib5.dart'; -import 'regress1751477_lib6.dart'; -import 'regress1751477_lib1.dart'; -import 'regress1751477_lib8.dart'; -import 'regress1751477_lib9.dart'; - -import 'regress1751477_lib11.dart'; -import 'regress1751477_lib21.dart'; -import 'regress1751477_lib31.dart'; -import 'regress1751477_lib41.dart'; -import 'regress1751477_lib51.dart'; -import 'regress1751477_lib61.dart'; -import 'regress1751477_lib71.dart'; -import 'regress1751477_lib81.dart'; -import 'regress1751477_lib91.dart'; - -lib7_func() {} diff --git a/tests/language_2/regress/regress1751477_lib71.dart b/tests/language_2/regress/regress1751477_lib71.dart deleted file mode 100644 index 735e989115c..00000000000 --- a/tests/language_2/regress/regress1751477_lib71.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 lib71; - -import 'regress1751477_lib1.dart'; -import 'regress1751477_lib2.dart'; -import 'regress1751477_lib3.dart'; -import 'regress1751477_lib4.dart'; -import 'regress1751477_lib5.dart'; -import 'regress1751477_lib6.dart'; -import 'regress1751477_lib7.dart'; -import 'regress1751477_lib8.dart'; -import 'regress1751477_lib9.dart'; - -import 'regress1751477_lib11.dart'; -import 'regress1751477_lib21.dart'; -import 'regress1751477_lib31.dart'; -import 'regress1751477_lib41.dart'; -import 'regress1751477_lib51.dart'; -import 'regress1751477_lib61.dart'; -import 'regress1751477_lib81.dart'; -import 'regress1751477_lib91.dart'; - -lib71_func() {} diff --git a/tests/language_2/regress/regress1751477_lib8.dart b/tests/language_2/regress/regress1751477_lib8.dart deleted file mode 100644 index 98a13b67eb6..00000000000 --- a/tests/language_2/regress/regress1751477_lib8.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 lib8; - -import 'regress1751477_lib2.dart'; -import 'regress1751477_lib3.dart'; -import 'regress1751477_lib4.dart'; -import 'regress1751477_lib5.dart'; -import 'regress1751477_lib6.dart'; -import 'regress1751477_lib7.dart'; -import 'regress1751477_lib1.dart'; -import 'regress1751477_lib9.dart'; - -import 'regress1751477_lib11.dart'; -import 'regress1751477_lib21.dart'; -import 'regress1751477_lib31.dart'; -import 'regress1751477_lib41.dart'; -import 'regress1751477_lib51.dart'; -import 'regress1751477_lib61.dart'; -import 'regress1751477_lib71.dart'; -import 'regress1751477_lib81.dart'; -import 'regress1751477_lib91.dart'; - -lib8_func() {} diff --git a/tests/language_2/regress/regress1751477_lib81.dart b/tests/language_2/regress/regress1751477_lib81.dart deleted file mode 100644 index d4ad07a46d0..00000000000 --- a/tests/language_2/regress/regress1751477_lib81.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 lib81; - -import 'regress1751477_lib1.dart'; -import 'regress1751477_lib2.dart'; -import 'regress1751477_lib3.dart'; -import 'regress1751477_lib4.dart'; -import 'regress1751477_lib5.dart'; -import 'regress1751477_lib6.dart'; -import 'regress1751477_lib7.dart'; -import 'regress1751477_lib8.dart'; -import 'regress1751477_lib9.dart'; - -import 'regress1751477_lib11.dart'; -import 'regress1751477_lib21.dart'; -import 'regress1751477_lib31.dart'; -import 'regress1751477_lib41.dart'; -import 'regress1751477_lib51.dart'; -import 'regress1751477_lib61.dart'; -import 'regress1751477_lib71.dart'; -import 'regress1751477_lib91.dart'; - -lib81_func() {} diff --git a/tests/language_2/regress/regress1751477_lib9.dart b/tests/language_2/regress/regress1751477_lib9.dart deleted file mode 100644 index 6355f021b41..00000000000 --- a/tests/language_2/regress/regress1751477_lib9.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 lib9; - -import 'regress1751477_lib2.dart'; -import 'regress1751477_lib3.dart'; -import 'regress1751477_lib4.dart'; -import 'regress1751477_lib5.dart'; -import 'regress1751477_lib6.dart'; -import 'regress1751477_lib7.dart'; -import 'regress1751477_lib8.dart'; -import 'regress1751477_lib1.dart'; - -import 'regress1751477_lib11.dart'; -import 'regress1751477_lib21.dart'; -import 'regress1751477_lib31.dart'; -import 'regress1751477_lib41.dart'; -import 'regress1751477_lib51.dart'; -import 'regress1751477_lib61.dart'; -import 'regress1751477_lib71.dart'; -import 'regress1751477_lib81.dart'; -import 'regress1751477_lib91.dart'; - -lib9_func() {} diff --git a/tests/language_2/regress/regress1751477_lib91.dart b/tests/language_2/regress/regress1751477_lib91.dart deleted file mode 100644 index dc3a0c97a6f..00000000000 --- a/tests/language_2/regress/regress1751477_lib91.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 lib91; - -import 'regress1751477_lib1.dart'; -import 'regress1751477_lib2.dart'; -import 'regress1751477_lib3.dart'; -import 'regress1751477_lib4.dart'; -import 'regress1751477_lib5.dart'; -import 'regress1751477_lib6.dart'; -import 'regress1751477_lib7.dart'; -import 'regress1751477_lib8.dart'; -import 'regress1751477_lib9.dart'; - -import 'regress1751477_lib11.dart'; -import 'regress1751477_lib21.dart'; -import 'regress1751477_lib31.dart'; -import 'regress1751477_lib41.dart'; -import 'regress1751477_lib51.dart'; -import 'regress1751477_lib61.dart'; -import 'regress1751477_lib71.dart'; -import 'regress1751477_lib81.dart'; - -lib91_func() {} diff --git a/tests/language_2/regress/regress1751477_test.dart b/tests/language_2/regress/regress1751477_test.dart deleted file mode 100644 index 5647ac9c5f6..00000000000 --- a/tests/language_2/regress/regress1751477_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'regress1751477_lib1.dart' deferred as lib1; -import 'regress1751477_lib2.dart' deferred as lib2; -import 'regress1751477_lib3.dart' deferred as lib3; -import 'regress1751477_lib4.dart' deferred as lib4; -import 'regress1751477_lib5.dart' deferred as lib5; -import 'regress1751477_lib6.dart' deferred as lib6; -import 'regress1751477_lib7.dart' deferred as lib7; -import 'regress1751477_lib8.dart' deferred as lib8; -import 'regress1751477_lib9.dart' deferred as lib9; - -main() { - lib1.loadLibrary().then((_) { - lib2.loadLibrary().then((_) { - lib3.loadLibrary().then((_) { - lib4.loadLibrary().then((_) { - lib5.loadLibrary().then((_) { - lib6.loadLibrary().then((_) { - lib7.loadLibrary().then((_) { - lib8.loadLibrary().then((_) { - lib9.loadLibrary().then((_) {}); - }); - }); - }); - }); - }); - }); - }); - }); -} diff --git a/tests/language_2/regress/regress18435_test.dart b/tests/language_2/regress/regress18435_test.dart deleted file mode 100644 index 599b21f16ed..00000000000 --- a/tests/language_2/regress/regress18435_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2014, 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 - -// Regression test for issue 18435. - -import "package:expect/expect.dart"; - -main() { - const MISSING_VALUE = "MISSING_VALUE"; - - void foo([var p1 = MISSING_VALUE, var p2 = MISSING_VALUE]) { - Expect.equals("P1", p1); - Expect.equals("P2", p2); - } - - void bar([var p1 = "MISSING_VALUE", var p2 = "MISSING_VALUE"]) { - Expect.equals("P1", p1); - Expect.equals("P2", p2); - } - - foo("P1", "P2"); - bar("P1", "P2"); -} diff --git a/tests/language_2/regress/regress18628_1_runtime_test.dart b/tests/language_2/regress/regress18628_1_runtime_test.dart deleted file mode 100644 index 8f996add9fd..00000000000 --- a/tests/language_2/regress/regress18628_1_runtime_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -// This test checks for a regression found in Dart Editor: the -// analyzer was treating [Type] as more specific than any type -// variable (generic parameter). -// -// https://code.google.com/p/dart/issues/detail?id=18628 - -class C { - // This line is supposed to cause the warning; the other commented - // line just doesn't make sense without this line. - -} - -main() { - C c = new C(); - -} diff --git a/tests/language_2/regress/regress18628_1_test.dart b/tests/language_2/regress/regress18628_1_test.dart deleted file mode 100644 index ba8e67c46a6..00000000000 --- a/tests/language_2/regress/regress18628_1_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2014, 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 - -// This test checks for a regression found in Dart Editor: the -// analyzer was treating [Type] as more specific than any type -// variable (generic parameter). -// -// https://code.google.com/p/dart/issues/detail?id=18628 - -class C { - // This line is supposed to cause the warning; the other commented - // line just doesn't make sense without this line. - T t = int; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'Type' can't be assigned to a variable of type 'T'. -} - -main() { - C c = new C(); - print(c.t); -} diff --git a/tests/language_2/regress/regress18628_2_runtime_test.dart b/tests/language_2/regress/regress18628_2_runtime_test.dart deleted file mode 100644 index ebfb189d74c..00000000000 --- a/tests/language_2/regress/regress18628_2_runtime_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -// This test checks for a regression found in Dart Editor: the -// analyzer was treating [Type] as more specific than any type -// variable (generic parameter). -// -// https://code.google.com/p/dart/issues/detail?id=18628 - -class X {} - -// This line is supposed to cause the warning; the other lines are -// marked because they don't make sense when [Y] is not defined. - - -main() { - - -} diff --git a/tests/language_2/regress/regress18628_2_test.dart b/tests/language_2/regress/regress18628_2_test.dart deleted file mode 100644 index e035c813a63..00000000000 --- a/tests/language_2/regress/regress18628_2_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2014, 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 - -// This test checks for a regression found in Dart Editor: the -// analyzer was treating [Type] as more specific than any type -// variable (generic parameter). -// -// https://code.google.com/p/dart/issues/detail?id=18628 - -class X {} - -// This line is supposed to cause the warning; the other lines are -// marked because they don't make sense when [Y] is not defined. -class Y extends X {} -// ^ -// [cfe] Type argument 'U' doesn't conform to the bound 'Type' of the type variable 'T' on 'X'. -// ^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - -main() { - X x = new X(); - Y y = new Y(); -} diff --git a/tests/language_2/regress/regress18713_test.dart b/tests/language_2/regress/regress18713_test.dart deleted file mode 100644 index 08a03b2b6a1..00000000000 --- a/tests/language_2/regress/regress18713_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -class T { - final Type tType = X; - Type get getTType => X; -} - -class S { - final Type sType = Y; - Type get getSType => Y; -} - -class TS = T with S; - -@pragma('dart2js:noInline') -@pragma('dart2js:assumeDynamic') -dyn(x) => x; - -main() { - var ts = new TS(); - - Expect.equals("String", ts.sType.toString()); - Expect.equals("int", ts.tType.toString()); - Expect.equals("String", ts.getSType.toString()); - Expect.equals("int", ts.getTType.toString()); - - Expect.equals("String", dyn(ts).sType.toString()); - Expect.equals("int", dyn(ts).tType.toString()); - Expect.equals("String", dyn(ts).getSType.toString()); - Expect.equals("int", dyn(ts).getTType.toString()); -} diff --git a/tests/language_2/regress/regress18865_test.dart b/tests/language_2/regress/regress18865_test.dart deleted file mode 100644 index ca7cec2c006..00000000000 --- a/tests/language_2/regress/regress18865_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2014, 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 - -// Regression test for issue 18865. - -class B {} - -class A extends B { - static foo() => new A(); -} - -main() { - A.foo(); -} diff --git a/tests/language_2/regress/regress19413_bar.dart b/tests/language_2/regress/regress19413_bar.dart deleted file mode 100644 index 681826b06c8..00000000000 --- a/tests/language_2/regress/regress19413_bar.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2014, 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 bar; - -f() { - print('bar.f()'); -} diff --git a/tests/language_2/regress/regress19413_foo.dart b/tests/language_2/regress/regress19413_foo.dart deleted file mode 100644 index 5165bbab347..00000000000 --- a/tests/language_2/regress/regress19413_foo.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2014, 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 foo; - -f() { - print('foo.f()'); -} diff --git a/tests/language_2/regress/regress19413_test.dart b/tests/language_2/regress/regress19413_test.dart deleted file mode 100644 index 6b9919412de..00000000000 --- a/tests/language_2/regress/regress19413_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2014, 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 - -// Regression test for issue 19413. - -import 'regress19413_foo.dart' as foo; -import 'regress19413_bar.dart' as foo; - -main() { - foo.f(); - // ^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_IMPORT - // [cfe] 'f' is imported from both 'tests/language_2/regress/regress19413_bar.dart' and 'tests/language_2/regress/regress19413_foo.dart'. -} diff --git a/tests/language_2/regress/regress19728_test.dart b/tests/language_2/regress/regress19728_test.dart deleted file mode 100644 index d2f5e3e23e4..00000000000 --- a/tests/language_2/regress/regress19728_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2014, 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 - -// Regression test for issue 19728. - -class C { - T field; - - test() { - field = 0; - // ^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'int' can't be assigned to a variable of type 'T'. - int i = field; - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'T' can't be assigned to a variable of type 'int'. - } -} - -void main() { - new C().test(); -} diff --git a/tests/language_2/regress/regress20074_test.dart b/tests/language_2/regress/regress20074_test.dart deleted file mode 100644 index 6b80c20f6f8..00000000000 --- a/tests/language_2/regress/regress20074_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2014, 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 - -// Regression test for issue 20074. Check that a parameter is not declared -// in the same scope as its function declaration. - -doit() { - error(error) { - print(error); - } - - error('foobar'); -} - -main() { - doit(); -} diff --git a/tests/language_2/regress/regress20394_lib.dart b/tests/language_2/regress/regress20394_lib.dart deleted file mode 100644 index e4f39ebbe0f..00000000000 --- a/tests/language_2/regress/regress20394_lib.dart +++ /dev/null @@ -1,8 +0,0 @@ - -// @dart = 2.9 -library lib; - -class Super { - Super(); - Super._private(arg); -} diff --git a/tests/language_2/regress/regress20394_runtime_test.dart b/tests/language_2/regress/regress20394_runtime_test.dart deleted file mode 100644 index e6458f84259..00000000000 --- a/tests/language_2/regress/regress20394_runtime_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -import 'regress20394_lib.dart'; - -class M {} - -class C extends Super with M { - -} - -main() { - new C(); -} diff --git a/tests/language_2/regress/regress20394_test.dart b/tests/language_2/regress/regress20394_test.dart deleted file mode 100644 index a09869bc126..00000000000 --- a/tests/language_2/regress/regress20394_test.dart +++ /dev/null @@ -1,16 +0,0 @@ - -// @dart = 2.9 -import 'regress20394_lib.dart'; - -class M {} - -class C extends Super with M { - C() : super._private(42); - // ^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER - // [cfe] Superclass has no constructor named 'Super._private'. -} - -main() { - new C(); -} diff --git a/tests/language_2/regress/regress20476_test.dart b/tests/language_2/regress/regress20476_test.dart deleted file mode 100644 index 5b4c9e8f4dd..00000000000 --- a/tests/language_2/regress/regress20476_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'package:expect/expect.dart'; - -foo() { - try { - try { - return 1; - } catch (e1) {} finally { - return 3; - } - } catch (e2) {} finally { - return 5; - } -} - -main() { - Expect.equals(5, foo()); -} diff --git a/tests/language_2/regress/regress20840_test.dart b/tests/language_2/regress/regress20840_test.dart deleted file mode 100644 index 792376442fe..00000000000 --- a/tests/language_2/regress/regress20840_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2014, 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 - -// Regression test for issue 20840. - -class SomeClass { - Object someField; - - SomeClass() { - [1].forEach((o) => someMethod()); - someField = new Object(); - } - - void someMethod() { - if (someField != null) { - throw "FAIL"; - } - } -} - -void main() { - new SomeClass(); -} diff --git a/tests/language_2/regress/regress21016_test.dart b/tests/language_2/regress/regress21016_test.dart deleted file mode 100644 index a98a85b291e..00000000000 --- a/tests/language_2/regress/regress21016_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2014, 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 - -// Test that we give up on tracing a function if one of its closurizations -// escapes tracing. - -class A { - var _boo = 22; - get boo { - return _boo; - return 1; - } -} - -class B { - var _bar = 42; - get boo { - return _bar; - return 1; - } -} - -class Holder { - tearMe(x) => x.boo; -} - -var list = []; - -main() { - var holder = new Holder(); - var hide = ((X) => X)(holder.tearMe); - hide(new A()); - list.add(holder.tearMe); - var x = list[0]; - x(new B()); -} diff --git a/tests/language_2/regress/regress21793_runtime_test.dart b/tests/language_2/regress/regress21793_runtime_test.dart deleted file mode 100644 index f7bc9da2ab6..00000000000 --- a/tests/language_2/regress/regress21793_runtime_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -// Regression test for issue 21793. - -import 'package:expect/expect.dart'; - - -class A { - call(x) => x; -} - - -main() { - print(new A()(499)); -} diff --git a/tests/language_2/regress/regress21793_test.dart b/tests/language_2/regress/regress21793_test.dart deleted file mode 100644 index dde067241fa..00000000000 --- a/tests/language_2/regress/regress21793_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2014, 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 - -// Regression test for issue 21793. - -import 'package:expect/expect.dart'; - -/* -class A { - call(x) => x; -} -*/ - -main() { - print(new A()(499)); - // ^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // [cfe] Couldn't find constructor 'A'. -} diff --git a/tests/language_2/regress/regress21795_test.dart b/tests/language_2/regress/regress21795_test.dart deleted file mode 100644 index bc0d46e73bb..00000000000 --- a/tests/language_2/regress/regress21795_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2015, 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 - -// Regression test for issue 21795. - -@pragma("vm:entry-point") // Prevent obfuscation -foo(t) { - try { - if (t == 123) throw 42; - } finally {} -} - -bar() { - try { - return 42; - } finally {} -} - -class A { - test(t) { - try { - foo(t); - } finally { - if (t == 0) { - try {} catch (err, st) {} - } - } - } -} - -main() { - var a = new A(); - for (var i = 0; i < 10000; ++i) a.test(0); - try { - a.test(123); - } catch (e, s) { - if (s.toString().indexOf("foo") == -1) { - print(s); - throw "Expected foo in stacktrace!"; - } - } -} diff --git a/tests/language_2/regress/regress21912_runtime_test.dart b/tests/language_2/regress/regress21912_runtime_test.dart deleted file mode 100644 index 5d98f6db03d..00000000000 --- a/tests/language_2/regress/regress21912_runtime_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Regression test for issue 21912. - -class A {} - -class B extends A {} - -typedef T Function2(S z); -typedef B AToB(A x); -typedef A BToA(B x); - -void main() { - { - Function2, Function2> t1; - Function2 t2; - Function2, Function2> left; - - - } -} diff --git a/tests/language_2/regress/regress21912_test.dart b/tests/language_2/regress/regress21912_test.dart deleted file mode 100644 index d103a787088..00000000000 --- a/tests/language_2/regress/regress21912_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2015, 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 - -// Regression test for issue 21912. - -class A {} - -class B extends A {} - -typedef T Function2(S z); -typedef B AToB(A x); -typedef A BToA(B x); - -void main() { - { - Function2, Function2> t1; - Function2 t2; - Function2, Function2> left; - left = t1; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'A Function(B) Function(B Function(A))' can't be assigned to a variable of type 'double Function(int) Function(double Function(int))'. - left = t2; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'A Function(B) Function(B Function(A))' can't be assigned to a variable of type 'double Function(int) Function(double Function(int))'. - } -} diff --git a/tests/language_2/regress/regress21957_double_test.dart b/tests/language_2/regress/regress21957_double_test.dart deleted file mode 100644 index 097f11d6deb..00000000000 --- a/tests/language_2/regress/regress21957_double_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2014, 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 - -// Check slow path for PotentialUnboxedStore. -// VMOptions=--optimization_counter_threshold=-1 - -main() { - for (int i = 0; i < 1000000; i++) { - new A(); - } -} - -class A { - var a = 1.0; -} diff --git a/tests/language_2/regress/regress21957_float32x4_test.dart b/tests/language_2/regress/regress21957_float32x4_test.dart deleted file mode 100644 index d668029aedf..00000000000 --- a/tests/language_2/regress/regress21957_float32x4_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Check slow path for PotentialUnboxedStore. -// VMOptions=--optimization_counter_threshold=-1 - -import "dart:typed_data"; - -main() { - for (int i = 0; i < 1000000; i++) { - new A(); - } -} - -class A { - var a = new Float32x4(1.0, 2.0, 3.0, 4.0); -} diff --git a/tests/language_2/regress/regress21957_float64x2_test.dart b/tests/language_2/regress/regress21957_float64x2_test.dart deleted file mode 100644 index 9b9890c2f41..00000000000 --- a/tests/language_2/regress/regress21957_float64x2_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Check slow path for PotentialUnboxedStore. -// VMOptions=--optimization_counter_threshold=-1 - -import "dart:typed_data"; - -main() { - for (int i = 0; i < 1000000; i++) { - new A(); - } -} - -class A { - var a = new Float64x2(1.0, 2.0); -} diff --git a/tests/language_2/regress/regress21998_1_test.dart b/tests/language_2/regress/regress21998_1_test.dart deleted file mode 100644 index 8f12a0b9c75..00000000000 --- a/tests/language_2/regress/regress21998_1_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'dart:math' as Math; -import 'package:expect/expect.dart'; - -main() { - Expect.equals(4, new C().m()); -} - -class C { - max(a) => a; - - m() { - return max(Math.max(2, 4)); - } -} diff --git a/tests/language_2/regress/regress21998_2_test.dart b/tests/language_2/regress/regress21998_2_test.dart deleted file mode 100644 index 83cdd76a644..00000000000 --- a/tests/language_2/regress/regress21998_2_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'dart:math' as Math; -import 'package:expect/expect.dart'; -import 'regress21998_lib1.dart' as lib1; - -main() { - Expect.equals(4, new C().m()); -} - -class C { - max(a) => a; - - m() { - return max(Math.max(2, lib1.max('a', 'b', 'cd').length)); - } -} diff --git a/tests/language_2/regress/regress21998_3_test.dart b/tests/language_2/regress/regress21998_3_test.dart deleted file mode 100644 index 970f31983bb..00000000000 --- a/tests/language_2/regress/regress21998_3_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'dart:math' as Math; -import 'package:expect/expect.dart'; -import 'regress21998_lib1.dart' as lib1; -import 'regress21998_lib2.dart'; - -main() { - Expect.equals(4, new C().m()); -} - -class C { - max(a) => a; - - m() { - return max( - Math.max(lib2_max(1, 2), lib1.max('a', 'b', 'cd').length)); - } -} diff --git a/tests/language_2/regress/regress21998_4_test.dart b/tests/language_2/regress/regress21998_4_test.dart deleted file mode 100644 index c1f6a0cb828..00000000000 --- a/tests/language_2/regress/regress21998_4_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'dart:math' as Math; -import 'package:expect/expect.dart'; -import 'regress21998_lib1.dart' as lib1; -import 'regress21998_lib2.dart'; -import 'regress21998_lib3.dart'; - -main() { - Expect.equals(4, new C().m()); -} - -class C { - max(a) => a; - - m() { - return max(Math.max( - lib3_max(0, lib2_max(1, 2)), lib1.max('a', 'b', 'cd').length)); - } -} diff --git a/tests/language_2/regress/regress21998_lib1.dart b/tests/language_2/regress/regress21998_lib1.dart deleted file mode 100644 index 2e3912cfdb2..00000000000 --- a/tests/language_2/regress/regress21998_lib1.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2015, 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 regress_21998_lib1; - -String max(String a, String b, String c) => '$a$b$c'; diff --git a/tests/language_2/regress/regress21998_lib2.dart b/tests/language_2/regress/regress21998_lib2.dart deleted file mode 100644 index 8cbff7c7a54..00000000000 --- a/tests/language_2/regress/regress21998_lib2.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2015, 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 regress_21998_lib2; - -import 'dart:math'; - -lib2_max(a, b) => max(a, b); diff --git a/tests/language_2/regress/regress21998_lib3.dart b/tests/language_2/regress/regress21998_lib3.dart deleted file mode 100644 index 3e355e5bb48..00000000000 --- a/tests/language_2/regress/regress21998_lib3.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2015, 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 regress_21998_lib3; - -import 'dart:math' as math; - -lib3_max(a, b) => math.max(a, b); diff --git a/tests/language_2/regress/regress22438_test.dart b/tests/language_2/regress/regress22438_test.dart deleted file mode 100644 index 13253fee03b..00000000000 --- a/tests/language_2/regress/regress22438_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:async"; -import "package:expect/expect.dart"; - -main() async { - var error = "no error"; - try { - try { - await new Future.error("error"); - } on MissingType catch (e) {} - // ^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_TYPE_IN_CATCH_CLAUSE - // [cfe] 'MissingType' isn't a type. - } catch (e) { - error = e; - } - Expect.isTrue(error is TypeError); -} diff --git a/tests/language_2/regress/regress22443_lib.dart b/tests/language_2/regress/regress22443_lib.dart deleted file mode 100644 index cc7c6d5cc1e..00000000000 --- a/tests/language_2/regress/regress22443_lib.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2015, 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 regress_22443; - -class LazyClass {} diff --git a/tests/language_2/regress/regress22443_test.dart b/tests/language_2/regress/regress22443_test.dart deleted file mode 100644 index c3272411c32..00000000000 --- a/tests/language_2/regress/regress22443_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'regress22443_lib.dart' deferred as D; -import 'package:expect/expect.dart'; - -int fooCount = 0; - -foo() { - fooCount++; - return new D.LazyClass(); -} - -main() { - var caughtIt = false; - try { - foo(); - } catch (e) { - caughtIt = true; - } - D.loadLibrary().then((_) { - foo(); - Expect.isTrue(caughtIt); - Expect.equals(2, fooCount); - }); -} diff --git a/tests/language_2/regress/regress22445_test.dart b/tests/language_2/regress/regress22445_test.dart deleted file mode 100644 index fc569aba475..00000000000 --- a/tests/language_2/regress/regress22445_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:async"; -import "package:expect/expect.dart"; - -foo() async { - try { - print("a"); - await new Future.value(3); - print("b"); - throw "Error"; - print("c"); - } catch (e) { - print("d"); - await new Future.error("Error2"); - } finally { - print("e"); - } - print("f"); -} - -main() async { - var error = "no error"; - try { - await foo(); - } catch (e) { - error = e; - } - Expect.equals("Error2", error); -} diff --git a/tests/language_2/regress/regress22579_test.dart b/tests/language_2/regress/regress22579_test.dart deleted file mode 100644 index 600006c1145..00000000000 --- a/tests/language_2/regress/regress22579_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:async"; -import "package:expect/expect.dart"; - -foo() async { - try { - await 1; - } catch (e) {} - throw "error"; -} - -main() async { - var error = "no error"; - try { - await foo(); - } catch (e) { - error = e; - } - Expect.equals("error", error); -} diff --git a/tests/language_2/regress/regress22666_test.dart b/tests/language_2/regress/regress22666_test.dart deleted file mode 100644 index fd89422439d..00000000000 --- a/tests/language_2/regress/regress22666_test.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'dart:collection'; - -class A extends Object with LinkedListEntry {} - -main() => new A(); diff --git a/tests/language_2/regress/regress22700_test.dart b/tests/language_2/regress/regress22700_test.dart deleted file mode 100644 index 844c381b46f..00000000000 --- a/tests/language_2/regress/regress22700_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -class WrapT { - Type get type => T; -} - -printAndCheck(t) { - print(t); - Expect.equals(String, t); -} - -class MyClass { - factory MyClass.works() { - Type t = new WrapT().type; - printAndCheck(t); - } - - factory MyClass.works2() { - printAndCheck(T); - } -} - -main() { - new MyClass.works(); - new MyClass.works2(); -} diff --git a/tests/language_2/regress/regress22719_test.dart b/tests/language_2/regress/regress22719_test.dart deleted file mode 100644 index 01be222a0a1..00000000000 --- a/tests/language_2/regress/regress22719_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'dart:collection'; -import 'package:expect/expect.dart'; - -abstract class A {} - -abstract class B extends Object with IterableMixin { - Iterator get iterator; -} - -abstract class C extends A with IterableMixin implements B { - final list = [1, 2, 3, 4, 5]; - Iterator get iterator => list.iterator; -} - -class D extends C {} - -void main() { - var d = new D(); - var expected = 1; - for (var i in d) { - Expect.equals(expected, i); - expected += 1; - } -} diff --git a/tests/language_2/regress/regress22728_test.dart b/tests/language_2/regress/regress22728_test.dart deleted file mode 100644 index 0e0aea6b6e6..00000000000 --- a/tests/language_2/regress/regress22728_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'package:expect/expect.dart'; - -bool assertsChecked() { - bool checked = false; - try { - assert(false); - } on AssertionError catch (error) { - checked = true; - } - return checked; -} - -main() async { - bool fault = false; - try { - assert(await false); - } on AssertionError catch (error) { - fault = true; - } - Expect.equals(assertsChecked(), fault); -} diff --git a/tests/language_2/regress/regress22777_test.dart b/tests/language_2/regress/regress22777_test.dart deleted file mode 100644 index 99fbdb23a80..00000000000 --- a/tests/language_2/regress/regress22777_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:async_helper/async_helper.dart"; -import "package:expect/expect.dart"; - -var a = 0; - -testSync() { - do { - continue; - } while (throw "Error"); - a = 100; -} - -testAsync() async { - do { - continue; - } while (await (throw "Error")); - a = 100; -} - -test() async { - try { - testSync(); - } catch (e) { - Expect.equals(e, "Error"); - } - Expect.equals(a, 0); - - try { - await testAsync(); - } catch (e) { - Expect.equals(e, "Error"); - } - Expect.equals(a, 0); -} - -main() { - asyncStart(); - test().then((_) => asyncEnd()); -} diff --git a/tests/language_2/regress/regress22780_test.dart b/tests/language_2/regress/regress22780_test.dart deleted file mode 100644 index d90a9459e39..00000000000 --- a/tests/language_2/regress/regress22780_test.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2015, 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() { - f() => "Oh, the joy of ${f()}"; print(f()); //# 01: runtime error -} diff --git a/tests/language_2/regress/regress22800_test.dart b/tests/language_2/regress/regress22800_test.dart deleted file mode 100644 index 929bb9deb64..00000000000 --- a/tests/language_2/regress/regress22800_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2015, 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 - -// Check proper exception handler finalization, even for unreachable handlers. - -void main() { - try { - print("Starting here"); - throw 0; - try {} catch (e) {} - } catch (e) { - print("Caught in here: $e"); - } - try {} catch (e) {} -} diff --git a/tests/language_2/regress/regress22822_test.dart b/tests/language_2/regress/regress22822_test.dart deleted file mode 100644 index 8a5e0ce0652..00000000000 --- a/tests/language_2/regress/regress22822_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2015, 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 - -// Regression test for issue 22822. The assignment in the finally block -// used to crash because it was executed at context level 1 instead of -// context level 2. - -import 'package:expect/expect.dart'; - -test(b) { - try { - for (int i = 0; i < 10; i++) { - // Closurizing i and b, thus the return statement - // executes at context level 2, and the code in - // the finally block runs at context level 1. - return () => i + b; - } - } finally { - b = 10; - } -} - -main() { - var c = test(0); - Expect.equals(10, c()); -} diff --git a/tests/language_2/regress/regress22858_test.dart b/tests/language_2/regress/regress22858_test.dart deleted file mode 100644 index fbc26cce4c8..00000000000 --- a/tests/language_2/regress/regress22858_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'package:expect/expect.dart'; - -main() { - var good = "good"; - - f1() { - { - var bad = "bad"; - f2() { - bad; - } - } - - Expect.equals("good", good); - do { - Expect.equals("good", good); - int ugly = 0; - f3() { - ugly; - } - } while (false); - } - - f1(); -} diff --git a/tests/language_2/regress/regress22936_test.dart b/tests/language_2/regress/regress22936_test.dart deleted file mode 100644 index 58010efa735..00000000000 --- a/tests/language_2/regress/regress22936_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2015, 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 - -// Regression test for issue 22936. - -import 'package:expect/expect.dart'; - -bool fooCalled = false; - -foo() { - fooCalled = true; - return null; -} - -main() { - final x = null; - try { - x = foo(); -// ^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_LOCAL -// [cfe] Can't assign to the final variable 'x'. - } on NoSuchMethodError {} - Expect.isTrue(fooCalled); -} diff --git a/tests/language_2/regress/regress22976_test.dart b/tests/language_2/regress/regress22976_test.dart deleted file mode 100644 index dc9a53fe82d..00000000000 --- a/tests/language_2/regress/regress22976_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2015, 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 - -// Regression test for issue 22976. - -class A {} - -class B implements A {} - -class C implements B, A {} -// [error line 13, column 7, length 1] -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_GENERIC_INTERFACES -// ^ -// [cfe] 'C' can't implement both 'A' and 'A' - -main() { - C c1 = new C(); - C c2 = new C(); - A a0 = c1; - A a1 = c2; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'C' can't be assigned to a variable of type 'A'. -} diff --git a/tests/language_2/regress/regress23038_runtime_test.dart b/tests/language_2/regress/regress23038_runtime_test.dart deleted file mode 100644 index 1e69c04072b..00000000000 --- a/tests/language_2/regress/regress23038_runtime_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -class C { - const - - C() - - ; -} - -main() { - const C(); -} diff --git a/tests/language_2/regress/regress23038_test.dart b/tests/language_2/regress/regress23038_test.dart deleted file mode 100644 index 605f629f9bf..00000000000 --- a/tests/language_2/regress/regress23038_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2015, 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 - -class C { - const - factory - C() -//^ -// [cfe] Cyclic definition of factory 'C'. - = C> - //^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_CONSTRUCTOR_REDIRECT - ; -} - -main() { - const C(); -} diff --git a/tests/language_2/regress/regress23046_test.dart b/tests/language_2/regress/regress23046_test.dart deleted file mode 100644 index 83ab215039d..00000000000 --- a/tests/language_2/regress/regress23046_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -// Make sure the logic for skipping the initial quotes in a string isn't -// re-triggered after an interpolation expression. - -const String x = '$y"'; -const String y = 'foo'; -const Map m = const {x: 0, y: 1}; - -main() { - Expect.equals(x, 'foo"'); - Expect.equals(m.length, 2); -} diff --git a/tests/language_2/regress/regress23051_test.dart b/tests/language_2/regress/regress23051_test.dart deleted file mode 100644 index 7aee0bf7078..00000000000 --- a/tests/language_2/regress/regress23051_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2015, 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 - -// Regression test for issue 23051. - -main() { - new A(); // //# 01: continued -} - -class A { // //# 01: continued - // Note the trailing ' in the next line. //# 01: continued - get foo => bar();' // //# 01: syntax error - // //# 01: continued - String bar( // //# 01: continued diff --git a/tests/language_2/regress/regress23089_test.dart b/tests/language_2/regress/regress23089_test.dart deleted file mode 100644 index d42cded74aa..00000000000 --- a/tests/language_2/regress/regress23089_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2015, 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 - -// Test doesn't cover http://dartbug.com/23089 anymore. -// Generic bounds now must be fully instantiated. This means that the -// cycle is not possible anymore. - -abstract class IPeer {} -// ^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NOT_INSTANTIATED_BOUND - -abstract class IPeerRoom

{} -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NOT_INSTANTIATED_BOUND -// ^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NOT_INSTANTIATED_BOUND - -abstract class IP2PClient {} -// ^ -// [cfe] Generic type 'IP2PClient' can't be used without type arguments in the bounds of its own type variables. It is referenced indirectly through 'IPeerRoom'. -// ^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NOT_INSTANTIATED_BOUND - -class _Peer implements IPeer {} -// ^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NOT_INSTANTIATED_BOUND - -class _PeerRoom

-// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NOT_INSTANTIATED_BOUND -// ^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NOT_INSTANTIATED_BOUND - implements - IPeerRoom {} - -abstract class _P2PClient -// ^ -// [cfe] Generic type '_P2PClient' can't be used without type arguments in the bounds of its own type variables. It is referenced indirectly through '_Peer'. -// [cfe] Generic type '_P2PClient' can't be used without type arguments in the bounds of its own type variables. It is referenced indirectly through '_PeerRoom'. -// ^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NOT_INSTANTIATED_BOUND -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NOT_INSTANTIATED_BOUND - implements - IP2PClient {} - -void main() {} diff --git a/tests/language_2/regress/regress23244_test.dart b/tests/language_2/regress/regress23244_test.dart deleted file mode 100644 index e3669e7ccad..00000000000 --- a/tests/language_2/regress/regress23244_test.dart +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test case for http://dartbug.com/23244 -import 'dart:async'; -import 'dart:isolate'; -import 'package:async_helper/async_helper.dart'; - -enum Fisk { - torsk, -} - -isolate1(Object port) { - (port as SendPort).send(Fisk.torsk); -} - -isolate2(Object port) { - (port as SendPort).send([Fisk.torsk]); -} - -isolate3(Object port) { - var x = new Map(); - x[0] = Fisk.torsk; - x[1] = Fisk.torsk; - (port as SendPort).send(x); -} - -main() async { - var port = new ReceivePort(); - asyncStart(); - await Isolate.spawn(isolate1, port.sendPort); - Completer completer1 = new Completer(); - port.listen((message) { - print("Received $message"); - port.close(); - expectTorsk(message); - completer1.complete(); - }); - await completer1.future; - Completer completer2 = new Completer(); - port = new ReceivePort(); - await Isolate.spawn(isolate2, port.sendPort); - port.listen((message) { - print("Received $message"); - port.close(); - expectTorsk(message[0]); - completer2.complete(); - }); - await completer2.future; - port = new ReceivePort(); - await Isolate.spawn(isolate3, port.sendPort); - port.listen((message) { - print("Received $message"); - port.close(); - expectTorsk(message[0]); - expectTorsk(message[1]); - asyncEnd(); - }); -} - -expectTorsk(Fisk fisk) { - if (fisk != Fisk.torsk) { - throw "$fisk isn't a ${Fisk.torsk}"; - } -} diff --git a/tests/language_2/regress/regress23408_lib.dart b/tests/language_2/regress/regress23408_lib.dart deleted file mode 100644 index 2ff9cedff8c..00000000000 --- a/tests/language_2/regress/regress23408_lib.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2015, 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 regress_23408_lib; - -import "regress23408_test.dart" as main; - -class K extends main.C { - K(); -} diff --git a/tests/language_2/regress/regress23408_test.dart b/tests/language_2/regress/regress23408_test.dart deleted file mode 100644 index 2a153c2572f..00000000000 --- a/tests/language_2/regress/regress23408_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2015, 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 regress_23408_test; - -import 'package:expect/expect.dart'; - -import 'regress23408_lib.dart' deferred as lib; - -class C { - var v = 55; - C(); - factory C.c() = lib.K; -} - -void main() { - lib.loadLibrary().then((_) { - var z = new C.c(); - Expect.equals(55, z.v); - }); -} diff --git a/tests/language_2/regress/regress23408a_test.dart b/tests/language_2/regress/regress23408a_test.dart deleted file mode 100644 index 8c417d84fa4..00000000000 --- a/tests/language_2/regress/regress23408a_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// 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. - -// @dart = 2.9 - -library regress_23408a_test; - -import 'package:expect/expect.dart'; - -import 'regress23408_lib.dart' deferred as lib; - -class A extends C { - get t => T; -} - -class C { - C(); - factory C.l() = A; - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_ANNOTATION_DEFERRED_CLASS - // [cfe] unspecified - get t => null; -} - -void main() async { - await lib.loadLibrary(); - Expect.equals(lib.K, C.l().t); -} diff --git a/tests/language_2/regress/regress23498_test.dart b/tests/language_2/regress/regress23498_test.dart deleted file mode 100644 index e6db4929709..00000000000 --- a/tests/language_2/regress/regress23498_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:async"; -import "package:expect/expect.dart"; - -foo() async { - try { - try { - await new Future.error('error'); - } catch (error) { - print("caught once"); - throw 'error'; - } - } catch (error) { - print("caught twice"); - throw 'error'; - } -} - -main() async { - var error = "no error"; - try { - await foo(); - } catch (e) { - error = e; - } - Expect.equals("error", error); -} diff --git a/tests/language_2/regress/regress23500_test.dart b/tests/language_2/regress/regress23500_test.dart deleted file mode 100644 index 931e57f4281..00000000000 --- a/tests/language_2/regress/regress23500_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:async"; -import "package:expect/expect.dart"; - -foo() async { - try { - try { - await for (var c in new Stream.fromIterable([])) {} // //# 01: ok - await 0; // //# 02: ok - } catch (error) {} - } catch (error) {} - throw "error"; -} - -main() async { - var error = "no error"; - try { - await foo(); - } catch (e) { - error = e; - } - Expect.equals("error", error); -} diff --git a/tests/language_2/regress/regress23537_test.dart b/tests/language_2/regress/regress23537_test.dart deleted file mode 100644 index 78cf2196d54..00000000000 --- a/tests/language_2/regress/regress23537_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'package:expect/expect.dart'; - -var d; - -test(a) { - while (true) { - try { - var b; - try { - for (int i = 0; i < 10; i++) { - // Closurizing i, a, and b, thus the return statement - // executes at context level 3, and the code in - // the finally blocks runs at context level 1 and 2. - return () => i + a + b; - } - } finally { - b = 10; - while (true) { - // Chain a new context. - var c = 5; - d = () => a + b + c; - break; - } - } - } finally { - a = 1; - } - break; - } -} - -main() { - var c = test(0); - Expect.equals(11, c()); - Expect.equals(16, d()); -} diff --git a/tests/language_2/regress/regress23650_test.dart b/tests/language_2/regress/regress23650_test.dart deleted file mode 100644 index 036e689a8ca..00000000000 --- a/tests/language_2/regress/regress23650_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2015, 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 - -// Test that type variables in try-catch work. - -import "package:expect/expect.dart"; - -class C { - C.foo(); - factory C() { - try { - return new C.foo(); - } finally {} - } -} - -main() { - var c = new C(); - Expect.isTrue(c is C); - Expect.isFalse(c is C); -} diff --git a/tests/language_2/regress/regress23746_test.dart b/tests/language_2/regress/regress23746_test.dart deleted file mode 100644 index 00c0e4fe2ee..00000000000 --- a/tests/language_2/regress/regress23746_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2021, 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 - -import "package:expect/expect.dart"; - -class A { - B get b => B(); -} - -class B {} - -@pragma('vm:never-inline') -bool test(Object a, Object b) { - print(a.runtimeType); - print(b.runtimeType); - return a.runtimeType == b.runtimeType; -} - -void main() { - Expect.isTrue(test(B(), A().b)); -} diff --git a/tests/language_2/regress/regress23914_test.dart b/tests/language_2/regress/regress23914_test.dart deleted file mode 100644 index f40c5d2d38b..00000000000 --- a/tests/language_2/regress/regress23914_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'dart:collection'; - -class C extends LinkedListEntry {} - -main() { - var ll = new LinkedList(); - var a = new List.unmodifiable(ll); -} diff --git a/tests/language_2/regress/regress23996_test.dart b/tests/language_2/regress/regress23996_test.dart deleted file mode 100644 index 7551471a21b..00000000000 --- a/tests/language_2/regress/regress23996_test.dart +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2016, 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 - -import "dart:async"; -import "package:async_helper/async_helper.dart"; - -/// This test verifies that an await for loop sends the correct -/// signals to the stream it iterates over: -/// 1) A listen event. -/// 2) A pause event when the loop body is awaiting something, -/// and more elements arrive on the stream. See issue -/// https://github.com/dart-lang/sdk/issues/23996 . -/// 3) A resume event, when the loop is again ready to iterate. -main() { - Completer listenEventReceived = new Completer(); - Completer pauseEventReceived = new Completer(); - Completer resumeEventReceived = new Completer(); - StreamController controller = new StreamController( - onListen: () => listenEventReceived.complete(), - onPause: () => pauseEventReceived.complete(), - onResume: () => resumeEventReceived.complete()); - - Completer forLoopEntered = new Completer(); - - /// The send function puts items on the stream. It waits for a - /// listener, puts "first" on the stream, waits for the for loop - /// to start (and eventually block), puts "second" on the stream - /// multiple times, letting the event loop run, until the for loop - /// pauses the stream because it it blocked. - /// The for loop unblocks after the pause message is received, and - /// reads the stream items, sending a stream resume message when it - /// is ready for more. - /// Then the send function puts a final "third" on the stream, and - /// closes the stream. - send() async { - await listenEventReceived.future; - controller.add('first'); - await forLoopEntered.future; - var timer = new Timer.periodic(new Duration(milliseconds: 10), (timer) { - controller.add('second'); - }); - await pauseEventReceived.future; - // pauseEventReceived.future completes when controller.stream is - // paused by the await-for loop below. What's specified is that - // await-for must pause immediately on an "await", but instead - // the implementations agree on not pausing until receiving the - // next event. For this reason, [timer] will call its callback at - // least once before we cancel it again. - timer.cancel(); - await resumeEventReceived.future; - controller.add('third'); - controller.close(); - } - - receive() async { - bool thirdReceived = false; - await for (var entry in controller.stream) { - if (entry == 'first') { - forLoopEntered.complete(); - await pauseEventReceived.future; - } else if (entry == 'third') { - thirdReceived = true; - } - } - if (!thirdReceived) { - throw "Error in await-for loop: 'third' not received"; - } - } - - asyncTest(() async { - // We need to start both functions in parallel, and wait on them both. - var f = send(); - await receive(); - await f; - }); -} diff --git a/tests/language_2/regress/regress24283_test.dart b/tests/language_2/regress/regress24283_test.dart deleted file mode 100644 index 28568871be7..00000000000 --- a/tests/language_2/regress/regress24283_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -main() { - // Smi - var i = 1 << 30; - var j = -i; - Expect.equals(0, i >> 37); - Expect.equals(-1, j >> 37); - // Mint - i = 1 << 50; - j = -i; - Expect.equals(0, i >> 67); - Expect.equals(-1, j >> 67); -} diff --git a/tests/language_2/regress/regress24567_test.dart b/tests/language_2/regress/regress24567_test.dart deleted file mode 100644 index e49fbfa6235..00000000000 --- a/tests/language_2/regress/regress24567_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; -import 'dart:math' as math; - -class Random {} - -typedef F(Random r); - -main() { - f(Random r) {} - g(math.Random r) {} - Expect.isTrue(f is F); - Expect.isFalse(g is F); -} diff --git a/tests/language_2/regress/regress24935_test.dart b/tests/language_2/regress/regress24935_test.dart deleted file mode 100644 index b225938da4d..00000000000 --- a/tests/language_2/regress/regress24935_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'dart:async'; - -S() => new Stream.fromIterable([1]); - -Future main() async { - L: - for (var s = 0; s < 10; s++) { - await for (var s1 in S()) { - await for (var s2 in S()) { - continue L; - } - } - } - // Regression check: make sure throwing an exception - // after breaking out of the innermost loop does not - // crash the VM. In other words, the expected test - // outcome is an unhandled exception. - throw "ball"; //# 01: runtime error -} diff --git a/tests/language_2/regress/regress25122_test.dart b/tests/language_2/regress/regress25122_test.dart deleted file mode 100644 index c3cad4fa666..00000000000 --- a/tests/language_2/regress/regress25122_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2015, 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() {} - -class AbstractListMember> {} - -class RepoListMember> - extends AbstractListMember {} diff --git a/tests/language_2/regress/regress25246_1_test.dart b/tests/language_2/regress/regress25246_1_test.dart deleted file mode 100644 index 722245c1607..00000000000 --- a/tests/language_2/regress/regress25246_1_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'regress25246_2.dart'; - -class ConcreteClass extends Object with MixIn {} - -void main() { - new ConcreteClass().test(); -} diff --git a/tests/language_2/regress/regress25246_2.dart b/tests/language_2/regress/regress25246_2.dart deleted file mode 100644 index 438b9c3cee9..00000000000 --- a/tests/language_2/regress/regress25246_2.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'regress25246_3.dart'; - -class MixIn { - var test3 = new Test3(() {}); - void test() { - test3.test(); - } -} diff --git a/tests/language_2/regress/regress25246_3.dart b/tests/language_2/regress/regress25246_3.dart deleted file mode 100644 index fb781b29410..00000000000 --- a/tests/language_2/regress/regress25246_3.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2015, 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 - -class Test3 { - final fn; - Test3(this.fn); - void test() { - fn(); - } -} diff --git a/tests/language_2/regress/regress25389_part.dart b/tests/language_2/regress/regress25389_part.dart deleted file mode 100644 index 0117fa01eed..00000000000 --- a/tests/language_2/regress/regress25389_part.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2016, 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 - -part of regress_25389; - -abstract class ComponentState> {} - -abstract class AbstractListEditorState> extends ComponentState {} - -class IssueListEditorState - extends AbstractListEditorState - implements ComponentState {} diff --git a/tests/language_2/regress/regress25389_test.dart b/tests/language_2/regress/regress25389_test.dart deleted file mode 100644 index 546350bbf3f..00000000000 --- a/tests/language_2/regress/regress25389_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2016, 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 regress_25389; - -part 'regress25389_part.dart'; - -main() { - new IssueListEditorState(); -} - -abstract class AbstractListEditor> {} diff --git a/tests/language_2/regress/regress25550_test.dart b/tests/language_2/regress/regress25550_test.dart deleted file mode 100644 index d679f363430..00000000000 --- a/tests/language_2/regress/regress25550_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2016, 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 - -typedef int Adder(int a, int b); - -class Mock { - noSuchMethod(i) => null; -} - -class MockAdder extends Mock { - int call(int a, int b); -} - -main() { - Adder adder = new MockAdder(); -} diff --git a/tests/language_2/regress/regress25568_test.dart b/tests/language_2/regress/regress25568_test.dart deleted file mode 100644 index 7f756efee12..00000000000 --- a/tests/language_2/regress/regress25568_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2016, 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() { - var c1 = new BacklogListEditorState(); - var c2 = new BacklogsState(); -} - -class BacklogListEditorState - extends AbstractListEditorState {} - -class BacklogsState extends MutableEntityState {} - -abstract class AbstractListEditorState, - S extends AbstractListEditorState> extends ComponentState {} - -abstract class ComponentState> {} - -abstract class EntityState> - extends ComponentState {} - -abstract class MutableEntityState> - extends EntityState implements ComponentState {} diff --git a/tests/language_2/regress/regress25609_lib1.dart b/tests/language_2/regress/regress25609_lib1.dart deleted file mode 100644 index ae8cbfc4b31..00000000000 --- a/tests/language_2/regress/regress25609_lib1.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2016, 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 regress_25609_lib1; - -import 'regress25609_lib2.dart'; - -typedef Bar Foo(int y); diff --git a/tests/language_2/regress/regress25609_lib2.dart b/tests/language_2/regress/regress25609_lib2.dart deleted file mode 100644 index bfbb2f972e9..00000000000 --- a/tests/language_2/regress/regress25609_lib2.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2016, 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 regress_25609_lib2; - -typedef void Bar(double x); diff --git a/tests/language_2/regress/regress25609_test.dart b/tests/language_2/regress/regress25609_test.dart deleted file mode 100644 index 18884dfc0f4..00000000000 --- a/tests/language_2/regress/regress25609_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'regress25609_lib1.dart'; - -Foo baz() => null; - -main() { - baz(); -} diff --git a/tests/language_2/regress/regress25620_test.dart b/tests/language_2/regress/regress25620_test.dart deleted file mode 100644 index bde71a25d86..00000000000 --- a/tests/language_2/regress/regress25620_test.dart +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) 2016, 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 - -import "dart:async"; - -typedef Future SyncedExecutionFn(Future fn()); -main() {} diff --git a/tests/language_2/regress/regress25935_test.dart b/tests/language_2/regress/regress25935_test.dart deleted file mode 100644 index de84161a0ae..00000000000 --- a/tests/language_2/regress/regress25935_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2016, 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() { - AddIssueSourceMember2 m = new AddIssueSourceMember2(); -} - -abstract class RepoListEditorState2, - S extends RepoListEditorState2> - extends AbstractListEditorState2 {} - -abstract class AbstractListEditorState2< - M extends AbstractListMember2, - S extends AbstractListEditorState2> extends ComponentState2 {} - -class AddIssueSourceMember2 extends RepoListMember2 {} - -class RepoListMember2> - extends AbstractListMember2 {} - -abstract class AbstractListMember2> - extends ComponentState2 {} - -abstract class ComponentState2> {} diff --git a/tests/language_2/regress/regress26133_test.dart b/tests/language_2/regress/regress26133_test.dart deleted file mode 100644 index cc89b4e6949..00000000000 --- a/tests/language_2/regress/regress26133_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'dart:async'; - -var x = 'a'; - -Future foo() async { - return x; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] A value of type 'Future' can't be assigned to a variable of type 'FutureOr'. -} - -main() { - foo(); -} diff --git a/tests/language_2/regress/regress26175_test.dart b/tests/language_2/regress/regress26175_test.dart deleted file mode 100644 index 8e2dd0884b9..00000000000 --- a/tests/language_2/regress/regress26175_test.dart +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'dart:async'; - -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -// Test that local variable reads and writes are sequenced correctly with -// respect to reads and writes in an awaited Future. See issue 26175. - -// Reads are sequenced correctly with respect to writes in a Future. -Future test1() async { - var x = 'a'; - f() async => x = 'b'; - Expect.equals('abb', '${x}${await f()}${x}'); -} - -// Writes are sequenced correctly with respect to writes in a Future. -Future test2(ignore) async { - var x; - f() async => x = 'b'; - Expect.equals('abb', '${x = 'a'}${await f()}${x}'); -} - -// Writes are sequenced correctly with respect to reads in a Future. -Future test3(ignore) async { - var x = 'a'; - f() async => x; - Expect.equals('bbb', '${x = 'b'}${await f()}${x}'); -} - -// Repeat the same tests for static variables. -var cell = 'a'; - -asyncReadCell() async => cell; -asyncWriteCell(value) async => cell = value; - -Future test4(ignore) async { - // This test assumes that it can read the initial value of cell. - Expect.equals('abb', '${cell}${await asyncWriteCell('b')}${cell}'); -} - -Future test5(ignore) async { - Expect.equals('abb', '${cell = 'a'}${await asyncWriteCell('b')}${cell}'); -} - -Future test6(ignore) async { - Expect.equals('bbb', '${cell = 'b'}${await asyncReadCell()}${cell}'); -} - -// Test that throwing is sequenced correctly with respect to other effects. -Future test7(ignore) async { - cell = 'a'; - try { - Expect.equals( - 'unreachable', '${throw 0}${await asyncWriteCell('b')}${cell}'); - } catch (_) { - Expect.equals('a', cell); - } -} - -main() { - asyncStart(); - test1() - .then(test2) - .then(test3) - .then(test4) - .then(test5) - .then(test6) - .then(test7) - .then((_) => asyncEnd()); -} diff --git a/tests/language_2/regress/regress26230_test.dart b/tests/language_2/regress/regress26230_test.dart deleted file mode 100644 index 31b645d9945..00000000000 --- a/tests/language_2/regress/regress26230_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2016, 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 - -class _RenderTabBar extends RenderBox - with - ContainerRenderObjectMixin, - RenderBoxContainerDefaultsMixin {} - -class RenderObject {} - -class RenderSector extends RenderObject {} - -class RenderBox extends RenderObject {} - -class ParentData {} - -class BoxParentData extends ParentData {} - -class SectorParentData extends ParentData {} - -class ContainerParentDataMixin {} - -class ContainerRenderObjectMixin> {} - -class SectorChildListParentData extends SectorParentData - with ContainerParentDataMixin {} - -class RenderDecoratedSector extends RenderSector {} - -class RenderSectorWithChildren extends RenderDecoratedSector - with ContainerRenderObjectMixin {} - -class ContainerBoxParentDataMixin - extends BoxParentData with ContainerParentDataMixin {} - -class RenderBoxContainerDefaultsMixin> - implements ContainerRenderObjectMixin {} - -class FlexParentData extends ContainerBoxParentDataMixin {} - -class _TabBarParentData extends ContainerBoxParentDataMixin {} - -main() { - new _RenderTabBar(); -} diff --git a/tests/language_2/regress/regress26453_test.dart b/tests/language_2/regress/regress26453_test.dart deleted file mode 100644 index fc7b61266e3..00000000000 --- a/tests/language_2/regress/regress26453_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2016, 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 - -// The program crashed with segfault because we when we first compile foo -// and bar we allocate all four variables (a, b, c and d) to the context. -// When we compile foo the second time (with optimizations) we allocate -// only c and d to the context. This happened because parser folds away -// "${a}" and "${b}" as constant expressions when parsing bar on its own, -// i.e. the expressions were not parsed again and thus a and b were not -// marked as captured. -// This caused a mismatch between a context that bar expects and that -// the optimized version of foo produces. - -foo() { - const a = 1; - const b = 2; - var c = 3; - var d = 4; - - bar() { - if ("${a}" != "1") throw "failed"; - if ("${b}" != "2") throw "failed"; - if ("${c}" != "3") throw "failed"; - if ("${d}" != "4") throw "failed"; - } - - bar(); -} - -main() { - for (var i = 0; i < 50000; i++) foo(); -} diff --git a/tests/language_2/regress/regress26530_test.dart b/tests/language_2/regress/regress26530_test.dart deleted file mode 100644 index 881dc049966..00000000000 --- a/tests/language_2/regress/regress26530_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -var trace = ""; - -main() { - var x = 0; - try { - try { - throw x++; // 1 - } on int catch (e) { - trace += "$e"; - trace += "-$x"; - x++; // 2 - try { - x++; // 3 - rethrow; - } finally { - trace += "-f"; - x++; // 4 - } - } - } catch (e) { - trace += "-c"; - trace += "-$e"; - trace += "-$x"; - } - Expect.equals("0-1-f-c-0-4", trace); -} diff --git a/tests/language_2/regress/regress26543_1_test.dart b/tests/language_2/regress/regress26543_1_test.dart deleted file mode 100644 index 1939171f5fc..00000000000 --- a/tests/language_2/regress/regress26543_1_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2016, 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 - -// Regression test for issue 26543 - -class C { - var x; - C() : x = null ?? {} {} -} - -main() { - print(new C()); -} diff --git a/tests/language_2/regress/regress26543_2_test.dart b/tests/language_2/regress/regress26543_2_test.dart deleted file mode 100644 index ba569b201d0..00000000000 --- a/tests/language_2/regress/regress26543_2_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2016, 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 - -// Regression test for issue 26543 - -class C { - var x, y; - C() - : x = null ?? {}, - y = 0 {} -} - -main() { - print(new C()); -} diff --git a/tests/language_2/regress/regress26543_3_test.dart b/tests/language_2/regress/regress26543_3_test.dart deleted file mode 100644 index 5ed39d20f76..00000000000 --- a/tests/language_2/regress/regress26543_3_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2016, 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 - -// Regression test for issue 26543 - -class C { - var x, y; - C() - : x = 0, - y = null ?? {} {} -} - -main() { - print(new C()); -} diff --git a/tests/language_2/regress/regress26668_test.dart b/tests/language_2/regress/regress26668_test.dart deleted file mode 100644 index 9b4b998d83f..00000000000 --- a/tests/language_2/regress/regress26668_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'dart:async'; - -main() async { - var myClass = new CustomClass(); - await myClass.processData(); -} - -class CustomClass { - Future processData() async { - return null; - } -} diff --git a/tests/language_2/regress/regress26855_runtime_test.dart b/tests/language_2/regress/regress26855_runtime_test.dart deleted file mode 100644 index 9802c5c6742..00000000000 --- a/tests/language_2/regress/regress26855_runtime_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2016, 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. - - - - - - - -class C { - C(); - var x; - - -} - -main() { - - - - C c = new C(); - - -} diff --git a/tests/language_2/regress/regress26855_test.dart b/tests/language_2/regress/regress26855_test.dart deleted file mode 100644 index c34f2640e18..00000000000 --- a/tests/language_2/regress/regress26855_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2016, 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 - -void f0(this.x) {} -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR -// [cfe] Field formal parameters can only be used in a constructor. - -void f1(int g(this.x)) {} -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR -// [cfe] Field formal parameters can only be used in a constructor. - -void f2(int g(int this.x)) {} -// ^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR -// ^ -// [cfe] Field formal parameters can only be used in a constructor. - -class C { - C(); - var x; - void f3(int g(this.x)) {} - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR - // [cfe] Field formal parameters can only be used in a constructor. - C.f4(int g(this.x)); - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR - // [cfe] Field formal parameters can only be used in a constructor. -} - -main() { - f0(null); - f1(null); - f2(null); - C c = new C(); - c.f3(null); - new C.f4(null); -} diff --git a/tests/language_2/regress/regress26948_test.dart b/tests/language_2/regress/regress26948_test.dart deleted file mode 100644 index 7dbd0db31c6..00000000000 --- a/tests/language_2/regress/regress26948_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2016, 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. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import 'dart:async'; -import "package:expect/expect.dart"; - -void check(Function f) { - Expect.isTrue(f()); -} - -Future doSync() async { - try { - await 123; - } finally { - var next = 5.0; - check(() => next == 5.0); - } -} - -main() async { - for (int i = 0; i < 20; i++) { - await doSync(); - } -} diff --git a/tests/language_2/regress/regress27164_test.dart b/tests/language_2/regress/regress27164_test.dart deleted file mode 100644 index 7b6766bd79c..00000000000 --- a/tests/language_2/regress/regress27164_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2016, 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 - -// Regression test for issue 27164. - -import 'package:expect/expect.dart'; - -String simpleEcho(String arg) => arg; - -class Echo { - final echo; - // Check that the expression simpleEcho is a compile-time constant. - const Echo() : echo = simpleEcho; -} - -void main() { - Expect.equals("hello", const Echo().echo("hello")); -} diff --git a/tests/language_2/regress/regress27572_test.dart b/tests/language_2/regress/regress27572_test.dart deleted file mode 100644 index 9f8b637c020..00000000000 --- a/tests/language_2/regress/regress27572_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2016, 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 - -// Test has been modified and doesn't test http://dartbug.com/275272 anymore. -// Static unresolved calls are not allowed anymore. - -import "package:expect/expect.dart"; - -import 'dart:collection' as col; - -main() { - col.foobar(1234567); - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION - // [cfe] Method not found: 'foobar'. -} diff --git a/tests/language_2/regress/regress27617_runtime_test.dart b/tests/language_2/regress/regress27617_runtime_test.dart deleted file mode 100644 index 3a1dca64b78..00000000000 --- a/tests/language_2/regress/regress27617_runtime_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2016, 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. - -class Foo { - final String greeting; - Foo._(this.greeting) {} - - // Const constructor must not redirect to non-const constructor. - -} - -main() { - -} diff --git a/tests/language_2/regress/regress27617_test.dart b/tests/language_2/regress/regress27617_test.dart deleted file mode 100644 index 1645a7cbfd6..00000000000 --- a/tests/language_2/regress/regress27617_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2016, 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 - -class Foo { - final String greeting; - Foo._(this.greeting) {} - - // Const constructor must not redirect to non-const constructor. - const Foo.hi() : this._('hi'); - // ^ - // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_NON_CONST_CONSTRUCTOR - // [cfe] A constant constructor can't call a non-constant constructor. -} - -main() { - const h = const Foo.hi(); -} diff --git a/tests/language_2/regress/regress27659_test.dart b/tests/language_2/regress/regress27659_test.dart deleted file mode 100644 index 06b5ac37b6f..00000000000 --- a/tests/language_2/regress/regress27659_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2016, 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 - -const String lineLength = '120'; - -foo({lineLength: lineLength}) { - print(lineLength); -} - -bar({lineLength: lineLength}) async { - print(lineLength); -} - -baz([lineLength = lineLength]) { - print(lineLength); -} - -qux([lineLength = lineLength]) async { - print(lineLength); -} - -main() { - foo(); - bar(); - baz(); - qux(); -} diff --git a/tests/language_2/regress/regress27700_test.dart b/tests/language_2/regress/regress27700_test.dart deleted file mode 100644 index d21e699fb05..00000000000 --- a/tests/language_2/regress/regress27700_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2017, 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 - -// Regression test for issue 27700. - -main() { - var x = new List.filled(0, null); - var z = "$x"; -} diff --git a/tests/language_2/regress/regress27957_lib1.dart b/tests/language_2/regress/regress27957_lib1.dart deleted file mode 100644 index e8a16e8de05..00000000000 --- a/tests/language_2/regress/regress27957_lib1.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2016, 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 regress_27957_lib1; - -class Superclass { - int m() => 1; -} diff --git a/tests/language_2/regress/regress27957_lib2.dart b/tests/language_2/regress/regress27957_lib2.dart deleted file mode 100644 index babe611831b..00000000000 --- a/tests/language_2/regress/regress27957_lib2.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2016, 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 regress_27957_lib2; - -class Superclass { - int m() => 2; -} diff --git a/tests/language_2/regress/regress27957_test.dart b/tests/language_2/regress/regress27957_test.dart deleted file mode 100644 index fa3fa743a98..00000000000 --- a/tests/language_2/regress/regress27957_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; -import 'regress27957_lib1.dart' as s1; -import 'regress27957_lib2.dart' as s2; - -class Mixin {} - -class C1 = s1.Superclass with Mixin; -class C2 = s2.Superclass with Mixin; - -main() { - var c1 = new C1(), c2 = new C2(); - Expect.equals(1, c1.m()); - Expect.equals(2, c2.m()); -} diff --git a/tests/language_2/regress/regress28217_test.dart b/tests/language_2/regress/regress28217_test.dart deleted file mode 100644 index 06fc8da727d..00000000000 --- a/tests/language_2/regress/regress28217_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2017, 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 - -// Test non-existing redirecting constructor and -// redirecting to a factory constructor. - -class B { - B() : this.a(); // //# none: compile-time error - factory B.a() {} // //# 01: compile-time error - B.a(); // //# 02: ok -} - -main() => new B(); diff --git a/tests/language_2/regress/regress28268_test.dart b/tests/language_2/regress/regress28268_test.dart deleted file mode 100644 index 591fa94081c..00000000000 --- a/tests/language_2/regress/regress28268_test.dart +++ /dev/null @@ -1,161 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -class E { - static final String a = "get a"; - static void set a(String o) { - printx("set a: $o"); - } - - static const String b = "get b"; - static void set b(String o) { - printx("set b: $o"); - } - - static void set c(String o) { - printx("set c: $o"); - } - - final String d = "get d"; - void set d(String o) { - printx("set d: $o"); - } - - final String e = "get e"; - - static const String f = "get f"; - - set g(v) { - printx("set g: $v"); - } - - set h(v) { - printx("set h: $v"); - } - - foo() { - printx(e); - e = "set e"; // //# 01: compile-time error - printx(e); - - printx(f); - f = "set f"; // //# 02: compile-time error - printx(f); - - printx(g); // //# 03: compile-time error - g = "set g"; - printx(g); // //# 04: compile-time error - - printx(h); // //# 05: compile-time error - h = "set h"; - printx(h); // //# 06: compile-time error - } -} - -set e(v) { - printx("Setting top-level e: $v"); -} - -set f(v) { - printx("Setting top-level f: $v"); -} - -final String g = "get g"; - -const String h = "get h"; - -const x = 42; -final y = 42; - -set x(v) { - printx("Setting top-level x: $v"); -} - -set y(v) { - printx("Setting top-level y: $v"); -} - -main() { - printx(E.a); - E.a = "set E"; - printx(E.a); - - printx(E.b); - E.b = "set E"; - printx(E.b); - - E.c = "set E"; - - E eInstance = new E(); - printx(eInstance.d); - eInstance.d = "set eInstance"; - printx(eInstance.d); - eInstance.foo(); - - printx(e); // //# 07: compile-time error - e = "set e"; - printx(e); // //# 08: compile-time error - - printx(f); // //# 09: compile-time error - f = "set f"; - printx(f); // //# 10: compile-time error - - printx(g); - g = "set g"; // //# 11: compile-time error - printx(g); - - printx(h); - h = "set h"; // //# 12: compile-time error - printx(h); - - printx(x); - x = "Hello world!"; - printx(x); - - printx(y); - y = "Hello world!"; - printx(y); - - Expect.listEquals(expected, actual); -} - -List actual = []; -void printx(Object x) { - actual.add(x.toString()); -} - -List expected = [ - "get a", - "set a: set E", - "get a", - "get b", - "set b: set E", - "get b", - "set c: set E", - "get d", - "set d: set eInstance", - "get d", - "get e", - "get e", - "get f", - "get f", - "set g: set g", - "set h: set h", - "Setting top-level e: set e", - "Setting top-level f: set f", - "get g", - "get g", - "get h", - "get h", - "42", - "Setting top-level x: Hello world!", - "42", - "42", - "Setting top-level y: Hello world!", - "42", -]; diff --git a/tests/language_2/regress/regress28278_lib.dart b/tests/language_2/regress/regress28278_lib.dart deleted file mode 100644 index 510109a6b72..00000000000 --- a/tests/language_2/regress/regress28278_lib.dart +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) 2017, 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 - -foo(x) => x + "Hello"; diff --git a/tests/language_2/regress/regress28278_test.dart b/tests/language_2/regress/regress28278_test.dart deleted file mode 100644 index 0f2004fe458..00000000000 --- a/tests/language_2/regress/regress28278_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2017, 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. -// VMOptions=--load-deferred-eagerly -// VMOptions= - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -import "regress28278_lib.dart" deferred as def; - -var result = ""; - -class D { - m() async { - await def.loadLibrary(); - result = def.foo(result += "Here"); - } -} - -main() async { - var d = new D(); - await d.m(); - await d.m(); - Expect.equals("HereHelloHereHello", result); -} diff --git a/tests/language_2/regress/regress28341_test.dart b/tests/language_2/regress/regress28341_test.dart deleted file mode 100644 index c15df1cce38..00000000000 --- a/tests/language_2/regress/regress28341_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -enum E { A } - -main() { - Expect.isTrue(E.values == const [E.A]); - Expect.isTrue(E.values == const [E.A]); -} diff --git a/tests/language_2/regress/regress28498_test.dart b/tests/language_2/regress/regress28498_test.dart deleted file mode 100644 index 9251f025e8e..00000000000 --- a/tests/language_2/regress/regress28498_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2018, 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 - -// The Kernel async transformer should not skip assert statements. - -import 'dart:async'; - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; - -g() async => 21; -f() async => 42; - -test() async { - assert(await g() == await f()); -} - -main() { - bool ok = true; - assert(!(ok = false)); - // !ok iff asserts are enabled. - - asyncStart(); - test().then((_) => Expect.isTrue(ok), onError: (error) { - // !ok implies error is AssertionError. - Expect.isTrue(ok || error is AssertionError); - }).whenComplete(asyncEnd); -} diff --git a/tests/language_2/regress/regress28610_test.dart b/tests/language_2/regress/regress28610_test.dart deleted file mode 100644 index b8b3755912d..00000000000 --- a/tests/language_2/regress/regress28610_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A { - final int Function = 0; -} - -main() { - final int Function = 0; - Expect.equals(Function, new A().Function); -} diff --git a/tests/language_2/regress/regress29025_test.dart b/tests/language_2/regress/regress29025_test.dart deleted file mode 100644 index f9a6b8c86ba..00000000000 --- a/tests/language_2/regress/regress29025_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2017, 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 - -abstract class F { - T foo(T t); -} - -class B> {} - -class C>> {} - -class D extends B implements F { - D foo(D x) => x; -} - -class E extends C implements F> { - C foo(C x) => x; -} - -main() { - D fd = D(); - var d = fd.foo(fd); - print(d); - E fe = E(); - var e = fe.foo(fe); - print(e); -} diff --git a/tests/language_2/regress/regress29243_test.dart b/tests/language_2/regress/regress29243_test.dart deleted file mode 100644 index 108ce422080..00000000000 --- a/tests/language_2/regress/regress29243_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -int Function() x = () => 42; -int Function(int Function()) y = (int Function() x) => x(); -List l = [()=>42, x]; -main() { - Expect.equals(42, y(l[1])); -} diff --git a/tests/language_2/regress/regress29349_test.dart b/tests/language_2/regress/regress29349_test.dart deleted file mode 100644 index d91e6befc07..00000000000 --- a/tests/language_2/regress/regress29349_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2017, 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 - -List get(T item) => [item]; -List get2(T item) => [item]; - -void main() { - print(get(1)); - print(get2(1)); -} diff --git a/tests/language_2/regress/regress29357_test.dart b/tests/language_2/regress/regress29357_test.dart deleted file mode 100644 index 34efe1543fd..00000000000 --- a/tests/language_2/regress/regress29357_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2017, 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 - -abstract class A> {} - -abstract class B> {} - -class C extends B> {} - -class D extends A> {} - -main() { - new D(); - new C(); - new D(); - new C(); -} diff --git a/tests/language_2/regress/regress29784_runtime_test.dart b/tests/language_2/regress/regress29784_runtime_test.dart deleted file mode 100644 index aa53e1657b6..00000000000 --- a/tests/language_2/regress/regress29784_runtime_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -// VMOptions=--enable_asserts - -// Verify that only static members can be accessed in initializers, and this -// applies to asserts in initializers. - -import 'package:expect/expect.dart'; - -class A { - - - var a, b; -} - -main() { - - -} diff --git a/tests/language_2/regress/regress29784_test.dart b/tests/language_2/regress/regress29784_test.dart deleted file mode 100644 index 4bef070fedf..00000000000 --- a/tests/language_2/regress/regress29784_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2017, 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 - -// VMOptions=--enable_asserts - -// Verify that only static members can be accessed in initializers, and this -// applies to asserts in initializers. - -import 'package:expect/expect.dart'; - -class A { - A.ok() : b = a; - // ^ - // [analyzer] COMPILE_TIME_ERROR.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER - // [cfe] Can't access 'this' in a field initializer to read 'a'. - A.ko() : assert(a == null); - // ^ - // [analyzer] COMPILE_TIME_ERROR.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER - // [cfe] Can't access 'this' in a field initializer to read 'a'. - var a, b; -} - -main() { - new A.ok(); - new A.ko(); -} diff --git a/tests/language_2/regress/regress29949_test.dart b/tests/language_2/regress/regress29949_test.dart deleted file mode 100644 index b3d00ca5d57..00000000000 --- a/tests/language_2/regress/regress29949_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2017, 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 - -abstract class S {} - -abstract class M {} - -abstract class N {} - -class C extends S with M>, N> {} - -main() { - new C(); -} diff --git a/tests/language_2/regress/regress30092_test.dart b/tests/language_2/regress/regress30092_test.dart deleted file mode 100644 index 1196edbe53e..00000000000 --- a/tests/language_2/regress/regress30092_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2017, 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 - -class BigInt {} - -main() { - void foo(void Function(BigInt, BigInt) f) { - f(new BigInt(), new BigInt()); - } - - foo((x, y) {}); -} diff --git a/tests/language_2/regress/regress30121_test.dart b/tests/language_2/regress/regress30121_test.dart deleted file mode 100644 index 835ad83fda3..00000000000 --- a/tests/language_2/regress/regress30121_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2017, 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 - -class Mock { - noSuchMethod(i) {} -} - -class Foo { - int call() => 1; -} - -class MockFoo extends Mock implements Foo {} - -main() { - var foo = new MockFoo(); - foo(); -} diff --git a/tests/language_2/regress/regress30339_test.dart b/tests/language_2/regress/regress30339_test.dart deleted file mode 100644 index a7ea7db936a..00000000000 --- a/tests/language_2/regress/regress30339_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2017, 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 - -import 'dart:async'; -import 'package:expect/expect.dart'; - -isCheckedMode() { - try { - dynamic i = 1; - String s = i; - return false; - } on TypeError { - return true; - } -} - -dynamic x = 'a'; - -Future foo() async { - return x; -} - -Future bar() async => x; - -main() { - foo().then((_) { - Expect.isFalse(isCheckedMode()); - }, onError: (e) { - Expect.isTrue(isCheckedMode() && (e is TypeError)); - }); - bar().then((_) { - Expect.isFalse(isCheckedMode()); - }, onError: (e) { - Expect.isTrue(isCheckedMode() && (e is TypeError)); - }); -} diff --git a/tests/language_2/regress/regress30516_test.dart b/tests/language_2/regress/regress30516_test.dart deleted file mode 100644 index 424fdd4d417..00000000000 --- a/tests/language_2/regress/regress30516_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2018, 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 - -typedef void RecognizerCallback(); -typedef void GestureTapCancelCallback(); -GestureTapCancelCallback onTapCancel; -T invokeCallback(String name, RecognizerCallback callback, - {String debugReport()}) {} -main() { - invokeCallback('spontaneous onTapCancel', onTapCancel); -} diff --git a/tests/language_2/regress/regress30669_test.dart b/tests/language_2/regress/regress30669_test.dart deleted file mode 100644 index 24f1ce70d1f..00000000000 --- a/tests/language_2/regress/regress30669_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2017, 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 - -import 'package:expect/expect.dart'; - -class M { - int compareTo(int x) => x.isEven ? 1 : -1; -} - -// All of these should work the same for the purposes of calling through -// the Comparable interface. - -class C extends M implements Comparable {} - -class D extends Object with M implements Comparable {} - -class E = Object with M implements Comparable; - -/// Regression test for https://github.com/dart-lang/sdk/issues/30669, DDC was -/// not attaching the "extension member" symbol to call `Comparable.compareTo` in -/// some cases. -main() { - testComparable(new C()); - testComparable(new D()); - testComparable(new E()); -} - -testComparable(Comparable c) { - Expect.equals(c.compareTo(42), 1, '$c'); - Expect.equals(c.compareTo(41), -1, '$c'); - Expect.throws(() => c.compareTo('42')); -} diff --git a/tests/language_2/regress/regress30927_test.dart b/tests/language_2/regress/regress30927_test.dart deleted file mode 100644 index 5cd4490e2d9..00000000000 --- a/tests/language_2/regress/regress30927_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2017, 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 - -import 'package:expect/expect.dart'; - -class B { - m(int v) => v + 42; -} - -abstract class C extends B { - m(Object v); -} - -class D extends C { - m(Object v) => 'hi $v!'; -} - -/// Regression test for https://github.com/dart-lang/sdk/issues/30927, DDC used -/// to use the incorrect signature for D.m. -main() { - dynamic d = new D(); - // Make sure we dispatch using the type signature for D.m, not B.m - Expect.equals(d.m('world'), 'hi world!'); -} diff --git a/tests/language_2/regress/regress31057_test.dart b/tests/language_2/regress/regress31057_test.dart deleted file mode 100644 index b205976a38d..00000000000 --- a/tests/language_2/regress/regress31057_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2017, 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 - -// VMOptions=--reify-generic-functions - -import 'package:expect/expect.dart'; - -class Foo { - a() { - b() { - c() => '$T $A $B $C'; - return c; - } - - return b; - } -} - -main() { - Expect.equals('bool int double String', - ((new Foo().a())())()); -} diff --git a/tests/language_2/regress/regress31066_test.dart b/tests/language_2/regress/regress31066_test.dart deleted file mode 100644 index 312fd0bdeac..00000000000 --- a/tests/language_2/regress/regress31066_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2017, 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 - -import 'package:expect/expect.dart'; - -typedef Bar = int Function(int); - -int defaultBar(int value) => value + 1; - -class Foo { - final Bar bar; - - const Foo._(Bar bar) : bar = bar ?? defaultBar; - - const Foo.baz({Bar bar}) : this._(bar); -} - -void main() { - final foo = const Foo.baz(); - Expect.equals(2, foo.bar(1)); -} diff --git a/tests/language_2/regress/regress31106_test.dart b/tests/language_2/regress/regress31106_test.dart deleted file mode 100644 index 3e431f73806..00000000000 --- a/tests/language_2/regress/regress31106_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2017, 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 - -import 'package:expect/expect.dart'; - -void main() { - final schema = const UserSchema(); - Expect.equals('users', schema.name); - final user = const User(first: 'firstname'); - var map = schema._decode(user); - Expect.equals('firstname', map['first']); -} - -class User { - final String first; - - const User({ - this.first, - }); -} - -class Schema { - final String name; - final Map Function(T) _decode; - - const Schema({ - this.name, - Map Function(T) decode, - }) - : _decode = decode; -} - -class UserSchema extends Schema { - static Map _decode$(User user) { - return { - 'first': user.first, - }; - } - - const UserSchema() : super(name: 'users', decode: _decode$); -} diff --git a/tests/language_2/regress/regress31279_test.dart b/tests/language_2/regress/regress31279_test.dart deleted file mode 100644 index 398a04822d7..00000000000 --- a/tests/language_2/regress/regress31279_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2017, 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 - -abstract class Base { - void update(void Function(Iterable) updates); - void update2(void updates(Iterable iterable)); -} - -class CovariantParsingIssue implements Base { - void update(covariant void Function(List) updates) {} - void update2(covariant void updates(List list)) {} -} - -void VoidParsingIssue() { - List functions = [(int i) => print(i + 1)]; - functions[0](42); -} - -void main() { - new CovariantParsingIssue(); - VoidParsingIssue(); -} diff --git a/tests/language_2/regress/regress31436_test.dart b/tests/language_2/regress/regress31436_test.dart deleted file mode 100644 index f151b6cc7a8..00000000000 --- a/tests/language_2/regress/regress31436_test.dart +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -void block_test() { - List Function() g; - g = () { - return [3]; - }; - assert(g is List Function()); - assert(g is! List Function()); - g().add("hello"); // No runtime error - List l = [3]; - g = () { - return l; - }; - assert(g is List Function()); - assert(g is List Function()); - Expect.throwsTypeError(() { - g().add("hello"); // runtime error - }); - Object o = l; - g = () { - return o; - }; // No implicit downcast on the assignment, implicit downcast on the return - assert(g is List Function()); - assert(g is! List Function()); - assert(g is Object Function()); - g(); // No runtime error; - o = 3; - Expect.throwsTypeError(() { - g(); // Failed runtime cast on the return type of f - }); -} - -void arrow_test() { - List Function() g; - g = () => [3]; - assert(g is List Function()); - assert(g is! List Function()); - g().add("hello"); // No runtime error - List l = [3]; - g = () => l; - assert(g is List Function()); - assert(g is List Function()); - Expect.throwsTypeError(() { - g().add("hello"); // runtime error - }); - Object o = l; - g = () => - o; // No implicit downcast on the assignment, implicit downcast on the return - assert(g is List Function()); - assert(g is! List Function()); - assert(g is Object Function()); - g(); // No runtime error; - o = 3; - Expect.throwsTypeError(() { - g(); // Failed runtime cast on the return type of f - }); -} - -main() { - block_test(); - arrow_test(); -} diff --git a/tests/language_2/regress/regress31591_test.dart b/tests/language_2/regress/regress31591_test.dart deleted file mode 100644 index 04ad7f6a800..00000000000 --- a/tests/language_2/regress/regress31591_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2014, 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 - -// VMOptions=--optimization-counter-threshold=90 - -import 'package:expect/expect.dart'; - -typedef FunObjObj = Object Function(Object, {Object y}); - -Object funTypObj(T x, {Object y}) => y; - -main() { - for (int i = 0; i < 100; i++) { - Expect.throwsTypeError(() { - dynamic y = funTypObj; - final FunObjObj x2 = y; - }); - } -} diff --git a/tests/language_2/regress/regress31596_covariant_declaration_test.dart b/tests/language_2/regress/regress31596_covariant_declaration_test.dart deleted file mode 100644 index 677efe6911a..00000000000 --- a/tests/language_2/regress/regress31596_covariant_declaration_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Test the treatment of a method whose signature has a covariant parameter -// in the interface of a class `C`, when the implementation of that method -// is inherited and its parameter is not covariant. - -class I0 {} - -class A {} - -class B extends A implements I0 {} - -class C { - void f(B x) {} -} - -abstract class I { - void f(covariant A x); -} - -// As of dart-lang/language#1833 this is not a compile-time error. -class D extends C implements I {} - -main() {} diff --git a/tests/language_2/regress/regress31596_override_test.dart b/tests/language_2/regress/regress31596_override_test.dart deleted file mode 100644 index 57f9e7be935..00000000000 --- a/tests/language_2/regress/regress31596_override_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2018, 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 - -class I0 {} - -class A {} - -class B extends A implements I0 {} - -class B2 extends A {} - -class C { - void f(B x) {} -} - -abstract class I1 { - void f(X x); -} - -// This class contains a forwarding stub for f to allow it to satisfy the -// interface I, while still ensuring that the x argument is type checked -// before C.f is executed. -class D extends C implements I1 {} - -class Test extends D { - void f(A x) {} //# 01: ok - void f(covariant A x) {} //# 02: ok - - void f(B x) {} //# 03: ok - void f(covariant B x) {} //# 04: ok - - void f(I0 x) {} //# 05: ok - void f(covariant I0 x) {} //# 06: ok - - void f(B2 x) {} //# 07: compile-time error - void f(covariant B2 x) {} //# 08: compile-time error -} - -main() { - // Make sure that Test is compiled. - new Test(); -} diff --git a/tests/language_2/regress/regress31596_runtime_test.dart b/tests/language_2/regress/regress31596_runtime_test.dart deleted file mode 100644 index c5d6223070e..00000000000 --- a/tests/language_2/regress/regress31596_runtime_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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 "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class B2 extends A {} - -class C { - void f(B x, B y) {} -} - -abstract class I { - void f(X x, B y); -} - -// This class contains a forwarding stub for f to allow it to satisfy the -// interface I, while still ensuring that the x argument is type checked -// before C.f is executed. -// -// For purposes of static type checking, the interface of the class D is -// considered to contain a method f with signature (B, B) -> void. For purposes -// of runtime behavior, a tearoff of D.f is considered to have the reified -// runtime type (Object, B) -> void. -class D extends C implements I {} - -main() { - var d = new D(); - I i = d; - A a = new A(); - B b = new B(); - B2 b2 = null; - - i.f(b2, b); // Ok since B2 assignable to A - // TODO: Downcast will be a compile-time error with NNBD. Consider using - // `d.f as dynamic`. - void Function(Object, B) g = d.f; // Ok; D.f reified as (Object, B) -> void - Expect.throwsTypeError(() { - // TODO: Downcast will be a compile-time error with NNBD. - d.f(a, b); - }); - Expect.throwsTypeError(() { - // TODO: Downcast will be a compile-time error with NNBD. - i.f(a, b); - }); -} diff --git a/tests/language_2/regress/regress31596_super_runtime_1_test.dart b/tests/language_2/regress/regress31596_super_runtime_1_test.dart deleted file mode 100644 index 70d96a5ee4c..00000000000 --- a/tests/language_2/regress/regress31596_super_runtime_1_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 "package:expect/expect.dart"; - -class I0 {} - -class A {} - -class B extends A implements I0 {} - -class B2 extends A {} - -class C { - void f(B x) {} -} - -abstract class I { - void f(X x); -} - -// This class contains a forwarding stub for f to allow it to satisfy the -// interface I, while still ensuring that the x argument is type checked -// before C.f is executed. -// -// Super calls in a derived class resolve directly to C.f, and are type checked -// accordingly at compile time. -class D extends C implements I {} - -class E extends D { - void test() { - I0 i0 = null; - B2 b2 = null; - - // ok since I0 is assignable to B - // TODO: Downcast from I0 to B will be a compile-time error with NNBD. - super.f(i0); - - // not ok since B2 is not assignable to B - - - var superF = super.f; // Inferred static type: void Function(B) - - // ok since I0 is assignable to B - // TODO: Downcast from I0 to B will be a compile-time error with NNBD. - - - // not ok since B2 is not assignable to B - - - // Should pass since superF's runtime type is void Function(Object) - - - - - } -} - -main() { - new E().test(); -} diff --git a/tests/language_2/regress/regress31596_super_runtime_2_test.dart b/tests/language_2/regress/regress31596_super_runtime_2_test.dart deleted file mode 100644 index 1be51486ffb..00000000000 --- a/tests/language_2/regress/regress31596_super_runtime_2_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 "package:expect/expect.dart"; - -class I0 {} - -class A {} - -class B extends A implements I0 {} - -class B2 extends A {} - -class C { - void f(B x) {} -} - -abstract class I { - void f(X x); -} - -// This class contains a forwarding stub for f to allow it to satisfy the -// interface I, while still ensuring that the x argument is type checked -// before C.f is executed. -// -// Super calls in a derived class resolve directly to C.f, and are type checked -// accordingly at compile time. -class D extends C implements I {} - -class E extends D { - void test() { - I0 i0 = null; - B2 b2 = null; - - // ok since I0 is assignable to B - // TODO: Downcast from I0 to B will be a compile-time error with NNBD. - - - // not ok since B2 is not assignable to B - - - var superF = super.f; // Inferred static type: void Function(B) - - // ok since I0 is assignable to B - // TODO: Downcast from I0 to B will be a compile-time error with NNBD. - superF(i0); - - // not ok since B2 is not assignable to B - - - // Should pass since superF's runtime type is void Function(Object) - - - - - } -} - -main() { - new E().test(); -} diff --git a/tests/language_2/regress/regress31596_super_runtime_3_test.dart b/tests/language_2/regress/regress31596_super_runtime_3_test.dart deleted file mode 100644 index d30aa103b7b..00000000000 --- a/tests/language_2/regress/regress31596_super_runtime_3_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 "package:expect/expect.dart"; - -class I0 {} - -class A {} - -class B extends A implements I0 {} - -class B2 extends A {} - -class C { - void f(B x) {} -} - -abstract class I { - void f(X x); -} - -// This class contains a forwarding stub for f to allow it to satisfy the -// interface I, while still ensuring that the x argument is type checked -// before C.f is executed. -// -// Super calls in a derived class resolve directly to C.f, and are type checked -// accordingly at compile time. -class D extends C implements I {} - -class E extends D { - void test() { - I0 i0 = null; - B2 b2 = null; - - // ok since I0 is assignable to B - // TODO: Downcast from I0 to B will be a compile-time error with NNBD. - - - // not ok since B2 is not assignable to B - - - var superF = super.f; // Inferred static type: void Function(B) - - // ok since I0 is assignable to B - // TODO: Downcast from I0 to B will be a compile-time error with NNBD. - - - // not ok since B2 is not assignable to B - - - // Should pass since superF's runtime type is void Function(Object) - Expect.isTrue(superF is void Function(B)); - Expect.isTrue(superF is void Function(I0)); - Expect.isTrue(superF is void Function(A)); - Expect.isTrue(superF is void Function(Object)); - } -} - -main() { - new E().test(); -} diff --git a/tests/language_2/regress/regress31596_super_runtime_test.dart b/tests/language_2/regress/regress31596_super_runtime_test.dart deleted file mode 100644 index f3d843432c6..00000000000 --- a/tests/language_2/regress/regress31596_super_runtime_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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 "package:expect/expect.dart"; - -class I0 {} - -class A {} - -class B extends A implements I0 {} - -class B2 extends A {} - -class C { - void f(B x) {} -} - -abstract class I { - void f(X x); -} - -// This class contains a forwarding stub for f to allow it to satisfy the -// interface I, while still ensuring that the x argument is type checked -// before C.f is executed. -// -// Super calls in a derived class resolve directly to C.f, and are type checked -// accordingly at compile time. -class D extends C implements I {} - -class E extends D { - void test() { - I0 i0 = null; - B2 b2 = null; - - // ok since I0 is assignable to B - // TODO: Downcast from I0 to B will be a compile-time error with NNBD. - - - // not ok since B2 is not assignable to B - - - var superF = super.f; // Inferred static type: void Function(B) - - // ok since I0 is assignable to B - // TODO: Downcast from I0 to B will be a compile-time error with NNBD. - - - // not ok since B2 is not assignable to B - - - // Should pass since superF's runtime type is void Function(Object) - - - - - } -} - -main() { - new E().test(); -} diff --git a/tests/language_2/regress/regress31596_super_test.dart b/tests/language_2/regress/regress31596_super_test.dart deleted file mode 100644 index faa166856b5..00000000000 --- a/tests/language_2/regress/regress31596_super_test.dart +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class I0 {} - -class A {} - -class B extends A implements I0 {} - -class B2 extends A {} - -class C { - void f(B x) {} -} - -abstract class I { - void f(X x); -} - -// This class contains a forwarding stub for f to allow it to satisfy the -// interface I, while still ensuring that the x argument is type checked -// before C.f is executed. -// -// Super calls in a derived class resolve directly to C.f, and are type checked -// accordingly at compile time. -class D extends C implements I {} - -class E extends D { - void test() { - I0 i0 = null; - B2 b2 = null; - - // ok since I0 is assignable to B - // TODO: Downcast from I0 to B will be a compile-time error with NNBD. - super.f(i0); - - // not ok since B2 is not assignable to B - super.f(b2); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'B2' can't be assigned to the parameter type 'B'. - - var superF = super.f; // Inferred static type: void Function(B) - - // ok since I0 is assignable to B - // TODO: Downcast from I0 to B will be a compile-time error with NNBD. - superF(i0); - - // not ok since B2 is not assignable to B - superF(b2); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'B2' can't be assigned to the parameter type 'B'. - - // Should pass since superF's runtime type is void Function(Object) - Expect.isTrue(superF is void Function(B)); - Expect.isTrue(superF is void Function(I0)); - Expect.isTrue(superF is void Function(A)); - Expect.isTrue(superF is void Function(Object)); - } -} - -main() { - new E().test(); -} diff --git a/tests/language_2/regress/regress31596_tearoff_test.dart b/tests/language_2/regress/regress31596_tearoff_test.dart deleted file mode 100644 index 7b3a9a58b97..00000000000 --- a/tests/language_2/regress/regress31596_tearoff_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class C { - void f(B x) {} -} - -abstract class I { - void f(X x); -} - -// This class contains a forwarding stub for f to allow it to satisfy the -// interface I, while still ensuring that the x argument is type checked -// before C.f is executed. -// -// For purposes of static type checking, the interface of the class D is -// considered to contain a method f with signature (B) -> void. For purposes of -// runtime behavior, a tearoff of D.f is considered to have the reified runtime -// type (Object) -> void. -class D extends C implements I {} - -main() { - var d = new D(); - A aNull = null; - A a = new A(); - - // Since the compile-time type of D.f is (B) -> void, it is assignable to (A) - // -> void. Since the runtime type is (Object) -> void, the assignment is - // allowed at runtime as well. - // TODO: Implicit downcast from void Function(B) to void Function(A) will be a - // compile-time error with NNBD. Consider using `d.f as dynamic`. - void Function(A) g = d.f; - - // However, the tear-off performs a runtime check of its argument, so it - // accepts a value of `null`, but it does not accept a value whose runtime - // type is A. - g(aNull); - Expect.throwsTypeError(() { - g(a); - }); -} diff --git a/tests/language_2/regress/regress31596_test.dart b/tests/language_2/regress/regress31596_test.dart deleted file mode 100644 index df94d093ed0..00000000000 --- a/tests/language_2/regress/regress31596_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class B2 extends A {} - -class C { - void f(B x, B y) {} -} - -abstract class I { - void f(X x, B y); -} - -// This class contains a forwarding stub for f to allow it to satisfy the -// interface I, while still ensuring that the x argument is type checked -// before C.f is executed. -// -// For purposes of static type checking, the interface of the class D is -// considered to contain a method f with signature (B, B) -> void. For purposes -// of runtime behavior, a tearoff of D.f is considered to have the reified -// runtime type (Object, B) -> void. -class D extends C implements I {} - -main() { - var d = new D(); - I i = d; - A a = new A(); - B b = new B(); - B2 b2 = null; - d.f(b2, b); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'B2' can't be assigned to the parameter type 'B'. - i.f(b2, b); // Ok since B2 assignable to A - // TODO: Downcast will be a compile-time error with NNBD. Consider using - // `d.f as dynamic`. - void Function(Object, B) g = d.f; // Ok; D.f reified as (Object, B) -> void - Expect.throwsTypeError(() { - // TODO: Downcast will be a compile-time error with NNBD. - d.f(a, b); - }); - Expect.throwsTypeError(() { - // TODO: Downcast will be a compile-time error with NNBD. - i.f(a, b); - }); -} diff --git a/tests/language_2/regress/regress32012_test.dart b/tests/language_2/regress/regress32012_test.dart deleted file mode 100644 index 1cc5cc264cd..00000000000 --- a/tests/language_2/regress/regress32012_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'package:expect/expect.dart'; - -class C { - int x; - - int bar() { - return 19; - } -} - -main() { - B foo(A a) { - int bar(B b) { - return 23 + b.bar(); - } - - a.x = bar(a); - return a; - } - - var x = (A a) { - return a; - }; - - Expect.equals(x(foo(new C())).x, 42); -} diff --git a/tests/language_2/regress/regress32267_test.dart b/tests/language_2/regress/regress32267_test.dart deleted file mode 100644 index 67f95ff4b8f..00000000000 --- a/tests/language_2/regress/regress32267_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2018, 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 - -// There was a bug in the Kernel mixin transformation: it copied factory -// constructors from the mixin into the mixin application class. This could be -// observed as an unbound type parameter which led to a crash. - -class State {} - -class A {} - -abstract class Mixin { - factory Mixin._() => null; -} - -class AState extends State {} - -class AStateImpl extends AState with Mixin {} - -void main() { - new AStateImpl(); -} diff --git a/tests/language_2/regress/regress32305_test.dart b/tests/language_2/regress/regress32305_test.dart deleted file mode 100644 index fb4198f1f0f..00000000000 --- a/tests/language_2/regress/regress32305_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2018, 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 - -void main() { - int Function(int) f; - - List l = []; - var a = l.map(f); - // ^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'int Function(int)' can't be assigned to the parameter type 'dynamic Function(num)'. -} diff --git a/tests/language_2/regress/regress32353_2_test.dart b/tests/language_2/regress/regress32353_2_test.dart deleted file mode 100644 index 78092534b3e..00000000000 --- a/tests/language_2/regress/regress32353_2_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2018, 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 - -// The following compile-time error is expected: -// -// Error: 'D' can't implement both '#lib1::B<#lib1::D::X, #lib1::D::Y>' and -// '#lib1::B<#lib1::D::X, #lib1::A>' -// class D extends B with C {} -// ~ - -class A {} - -class B {} - -mixin C on B {} - -class D extends B with C {} -// ^ -// [cfe] 'B with C' can't implement both 'B' and 'B' -// [cfe] 'B' doesn't implement 'B' so it can't be used with 'C'. -// ^ -// [analyzer] COMPILE_TIME_ERROR.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE - -main() {} diff --git a/tests/language_2/regress/regress32353_test.dart b/tests/language_2/regress/regress32353_test.dart deleted file mode 100644 index 2b109619a2e..00000000000 --- a/tests/language_2/regress/regress32353_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class io_FileSystemEntity {} - -class io_Directory extends io_FileSystemEntity {} - -class _LocalDirectory - extends _LocalFileSystemEntity<_LocalDirectory, io_Directory> - with ForwardingDirectory, DirectoryAddOnsMixin { - noSuchMethod(invocation) => null; -} - -abstract class _LocalFileSystemEntity extends ForwardingFileSystemEntity {} - -abstract class FileSystemEntity implements io_FileSystemEntity {} - -abstract class ForwardingFileSystemEntity implements FileSystemEntity {} - -mixin ForwardingDirectory - on ForwardingFileSystemEntity implements Directory { - get t => T; -} - -abstract class Directory implements FileSystemEntity, io_Directory {} - -abstract class DirectoryAddOnsMixin implements Directory {} - -main() { - var x = new _LocalDirectory(); - Expect.equals(x.t, _LocalDirectory); -} diff --git a/tests/language_2/regress/regress32372_test.dart b/tests/language_2/regress/regress32372_test.dart deleted file mode 100644 index 89c32c36a45..00000000000 --- a/tests/language_2/regress/regress32372_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class A extends Object with B, C {} - -class B {} - -mixin C on B { - get t => T; -} - -main() { - var x = new A(); - Expect.equals(x.t, String); -} diff --git a/tests/language_2/regress/regress32425_test.dart b/tests/language_2/regress/regress32425_test.dart deleted file mode 100644 index 56ce6b90f1f..00000000000 --- a/tests/language_2/regress/regress32425_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'package:expect/expect.dart'; - -class A {} - -final map = {}; - -class B { - void foo() { - Expect.equals(map[new A().runtimeType], 42); - } -} - -class C { - void build() { - new B().foo(); - new B().foo(); - Expect.equals(new B().runtimeType, new B().runtimeType); - } -} - -void main() { - map[new A().runtimeType] = 42; - new C().build(); -} diff --git a/tests/language_2/regress/regress32660_test.dart b/tests/language_2/regress/regress32660_test.dart deleted file mode 100644 index 8c003521d89..00000000000 --- a/tests/language_2/regress/regress32660_test.dart +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2018, 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 - -// noSuchMethod does not overwrite actual implementations, so if an -// implementation of a member exists that doesn't fulfill the interface it's -// an error. -// On the other hand, if no implementation exists, -// noSuchMethod will take its place and everything is okay. - -class B { - foo(int x, // force formatter to not combine these lines. - {int y} //# 02: compile-time error - ) => - x; -} - -class C extends B { - foo(int x, // force formatter to not combine these lines. - {int y} //# 01: compile-time error - ); - bar(); - - noSuchMethod(i) { - print("No such method!"); - return 42; - } -} - -abstract class D { - foo(int x, // force formatter to not combine these lines. - {int y} //# 03: ok - ); -} - -abstract class E { - foo(int x, // force formatter to not combine these lines. - {int y} //# 04: ok - ); -} - -class F extends D implements E { - noSuchMethod(i) { - print("No such method!"); - return 42; - } -} - -class G { - foo(int x, // force formatter to not combine these lines. - {int y} //# 05: ok - ) => - x; -} - -class H { - foo(int x, // force formatter to not combine these lines. - {int y} //# 06: compile-time error - ) => - x; -} - -class I extends G implements H { - noSuchMethod(i) { - print("No such method: $i!"); - return 42; - } -} - -main() { - var c = new C(); - c.foo(123); - c.bar(); - var f = new F(); - f.foo(42); - var i = new I(); - i.foo(42); -} diff --git a/tests/language_2/regress/regress33009_lib.dart b/tests/language_2/regress/regress33009_lib.dart deleted file mode 100644 index dd695fb2576..00000000000 --- a/tests/language_2/regress/regress33009_lib.dart +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) 2018, 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 - -class I { - T get foo => _foo; - T _foo = null; -} diff --git a/tests/language_2/regress/regress33009_test.dart b/tests/language_2/regress/regress33009_test.dart deleted file mode 100644 index 247fdb879c5..00000000000 --- a/tests/language_2/regress/regress33009_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'regress33009_lib.dart'; - -class A implements I { - dynamic get foo => 1; -} - -main() {} diff --git a/tests/language_2/regress/regress33235_01_runtime_test.dart b/tests/language_2/regress/regress33235_01_runtime_test.dart deleted file mode 100644 index a87f6387fda..00000000000 --- a/tests/language_2/regress/regress33235_01_runtime_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class C { - - - static int get n { - return 42; - } -} - -main() { - print(C); -} diff --git a/tests/language_2/regress/regress33235_01_test.dart b/tests/language_2/regress/regress33235_01_test.dart deleted file mode 100644 index fde55e8d8c4..00000000000 --- a/tests/language_2/regress/regress33235_01_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class C { - C.n() {} -//^ -// [cfe] Conflicts with member 'n'. -// ^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER - - static int get n { - // ^ - // [cfe] Conflicts with constructor 'C.n'. - return 42; - } -} - -main() { - print(C); -} diff --git a/tests/language_2/regress/regress33235_02_runtime_test.dart b/tests/language_2/regress/regress33235_02_runtime_test.dart deleted file mode 100644 index 3a07b765961..00000000000 --- a/tests/language_2/regress/regress33235_02_runtime_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class C { - - - static int n() { - return 42; - } -} - -main() { - print(C); -} diff --git a/tests/language_2/regress/regress33235_02_test.dart b/tests/language_2/regress/regress33235_02_test.dart deleted file mode 100644 index ddcd04a434f..00000000000 --- a/tests/language_2/regress/regress33235_02_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class C { - C.n() {} -//^ -// [cfe] Conflicts with member 'n'. -// ^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER - - static int n() { - // ^ - // [cfe] Conflicts with constructor 'C.n'. - return 42; - } -} - -main() { - print(C); -} diff --git a/tests/language_2/regress/regress33235_03_runtime_test.dart b/tests/language_2/regress/regress33235_03_runtime_test.dart deleted file mode 100644 index f7b3517df1a..00000000000 --- a/tests/language_2/regress/regress33235_03_runtime_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class C { - - - static set n(int x) {} -} - -main() { - print(C); -} diff --git a/tests/language_2/regress/regress33235_03_test.dart b/tests/language_2/regress/regress33235_03_test.dart deleted file mode 100644 index 1b6e87e7ce9..00000000000 --- a/tests/language_2/regress/regress33235_03_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class C { - C.n() {} -//^ -// [cfe] Conflicts with setter 'n'. -// ^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER - - static set n(int x) {} - // ^ - // [cfe] Conflicts with constructor 'n'. -} - -main() { - print(C); -} diff --git a/tests/language_2/regress/regress33235_04_runtime_test.dart b/tests/language_2/regress/regress33235_04_runtime_test.dart deleted file mode 100644 index 3761da1ca68..00000000000 --- a/tests/language_2/regress/regress33235_04_runtime_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class C { - - - static int n() => 42; -} - -main() { - print(C); -} diff --git a/tests/language_2/regress/regress33235_04_test.dart b/tests/language_2/regress/regress33235_04_test.dart deleted file mode 100644 index ebdb8d3af23..00000000000 --- a/tests/language_2/regress/regress33235_04_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class C { - static int get n => 42; - - static int n() => 42; - // ^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'n' is already declared in this scope. -} - -main() { - print(C); -} diff --git a/tests/language_2/regress/regress33235_05_runtime_test.dart b/tests/language_2/regress/regress33235_05_runtime_test.dart deleted file mode 100644 index a8425413c94..00000000000 --- a/tests/language_2/regress/regress33235_05_runtime_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - int get n => 43; -} - -class B extends A { - -} - -abstract class B2 implements A { - -} - -class C { - - - int get n => 43; -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_05_test.dart b/tests/language_2/regress/regress33235_05_test.dart deleted file mode 100644 index e60565898cb..00000000000 --- a/tests/language_2/regress/regress33235_05_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - int get n => 43; -} - -class B extends A { - static int get n => 42; - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -abstract class B2 implements A { - static int get n => 42; - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -class C { - static int get n => 42; - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - - int get n => 43; - // ^ - // [cfe] 'n' is already declared in this scope. -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_06_runtime_test.dart b/tests/language_2/regress/regress33235_06_runtime_test.dart deleted file mode 100644 index d3e35672d5d..00000000000 --- a/tests/language_2/regress/regress33235_06_runtime_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - int n() => 43; -} - -class B extends A { - -} - -abstract class B2 implements A { - -} - -class C { - - - int n() => 43; -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_06_test.dart b/tests/language_2/regress/regress33235_06_test.dart deleted file mode 100644 index 818c1c5c744..00000000000 --- a/tests/language_2/regress/regress33235_06_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - int n() => 43; -} - -class B extends A { - static int get n => 42; - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -abstract class B2 implements A { - static int get n => 42; - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -class C { - static int get n => 42; - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - - int n() => 43; - // ^ - // [cfe] 'n' is already declared in this scope. -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_07_runtime_test.dart b/tests/language_2/regress/regress33235_07_runtime_test.dart deleted file mode 100644 index 81dde9dd284..00000000000 --- a/tests/language_2/regress/regress33235_07_runtime_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - void set n(int i) {} -} - -class B extends A { - -} - -abstract class B2 implements A { - -} - -class C { - - - void set n(int i) {} -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_07_test.dart b/tests/language_2/regress/regress33235_07_test.dart deleted file mode 100644 index 66242727b8f..00000000000 --- a/tests/language_2/regress/regress33235_07_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - void set n(int i) {} -} - -class B extends A { - static int get n => 42; - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -abstract class B2 implements A { - static int get n => 42; - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -class C { - static int get n => 42; - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] This static member conflicts with an instance member. - - void set n(int i) {} -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_08_runtime_test.dart b/tests/language_2/regress/regress33235_08_runtime_test.dart deleted file mode 100644 index a8425413c94..00000000000 --- a/tests/language_2/regress/regress33235_08_runtime_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - int get n => 43; -} - -class B extends A { - -} - -abstract class B2 implements A { - -} - -class C { - - - int get n => 43; -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_08_test.dart b/tests/language_2/regress/regress33235_08_test.dart deleted file mode 100644 index 810b0bb1f32..00000000000 --- a/tests/language_2/regress/regress33235_08_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - int get n => 43; -} - -class B extends A { - static int n() => 42; - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -abstract class B2 implements A { - static int n() => 42; - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -class C { - static int n() => 42; - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - - int get n => 43; - // ^ - // [cfe] 'n' is already declared in this scope. -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_09_runtime_test.dart b/tests/language_2/regress/regress33235_09_runtime_test.dart deleted file mode 100644 index d3e35672d5d..00000000000 --- a/tests/language_2/regress/regress33235_09_runtime_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - int n() => 43; -} - -class B extends A { - -} - -abstract class B2 implements A { - -} - -class C { - - - int n() => 43; -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_09_test.dart b/tests/language_2/regress/regress33235_09_test.dart deleted file mode 100644 index be6f19c89cd..00000000000 --- a/tests/language_2/regress/regress33235_09_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - int n() => 43; -} - -class B extends A { - static int n() => 42; - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -abstract class B2 implements A { - static int n() => 42; - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -class C { - static int n() => 42; - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - - int n() => 43; - // ^ - // [cfe] 'n' is already declared in this scope. -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_10_runtime_test.dart b/tests/language_2/regress/regress33235_10_runtime_test.dart deleted file mode 100644 index 81dde9dd284..00000000000 --- a/tests/language_2/regress/regress33235_10_runtime_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - void set n(int i) {} -} - -class B extends A { - -} - -abstract class B2 implements A { - -} - -class C { - - - void set n(int i) {} -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_10_test.dart b/tests/language_2/regress/regress33235_10_test.dart deleted file mode 100644 index b26f77f5037..00000000000 --- a/tests/language_2/regress/regress33235_10_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - void set n(int i) {} -} - -class B extends A { - static int n() => 42; - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -abstract class B2 implements A { - static int n() => 42; - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -class C { - static int n() => 42; - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] This static member conflicts with an instance member. - - void set n(int i) {} -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_11_runtime_test.dart b/tests/language_2/regress/regress33235_11_runtime_test.dart deleted file mode 100644 index 3761da1ca68..00000000000 --- a/tests/language_2/regress/regress33235_11_runtime_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class C { - - - static int n() => 42; -} - -main() { - print(C); -} diff --git a/tests/language_2/regress/regress33235_11_test.dart b/tests/language_2/regress/regress33235_11_test.dart deleted file mode 100644 index 3376b7a52a0..00000000000 --- a/tests/language_2/regress/regress33235_11_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class C { - static void set n(int i) {} - - static int n() => 42; - // ^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'n' is already declared in this scope. -} - -main() { - print(C); -} diff --git a/tests/language_2/regress/regress33235_12_runtime_test.dart b/tests/language_2/regress/regress33235_12_runtime_test.dart deleted file mode 100644 index 0d880124b8d..00000000000 --- a/tests/language_2/regress/regress33235_12_runtime_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - int get n => 42; -} - -class B extends A { - -} - -abstract class B2 implements A { - -} - -class C { - - - int get n => 42; -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_12_test.dart b/tests/language_2/regress/regress33235_12_test.dart deleted file mode 100644 index 718c2a93abd..00000000000 --- a/tests/language_2/regress/regress33235_12_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - int get n => 42; -} - -class B extends A { - static void set n(int i) {} - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -abstract class B2 implements A { - static void set n(int i) {} - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -class C { - static void set n(int i) {} - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] This static member conflicts with an instance member. - - int get n => 42; -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_13_runtime_test.dart b/tests/language_2/regress/regress33235_13_runtime_test.dart deleted file mode 100644 index b519f17d34b..00000000000 --- a/tests/language_2/regress/regress33235_13_runtime_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - int n() => 42; -} - -class B extends A { - -} - -abstract class B2 implements A { - -} - -class C { - - - int n() => 42; -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_13_test.dart b/tests/language_2/regress/regress33235_13_test.dart deleted file mode 100644 index 2bbdafb7e4d..00000000000 --- a/tests/language_2/regress/regress33235_13_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - int n() => 42; -} - -class B extends A { - static void set n(int i) {} - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -abstract class B2 implements A { - static void set n(int i) {} - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -class C { - static void set n(int i) {} - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] This static member conflicts with an instance member. - - int n() => 42; -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_14_runtime_test.dart b/tests/language_2/regress/regress33235_14_runtime_test.dart deleted file mode 100644 index 4143a69638b..00000000000 --- a/tests/language_2/regress/regress33235_14_runtime_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. -class A { - void set n(int x) {} -} - -class B extends A { - -} - -abstract class B2 implements A { - -} - -class C { - - - void set n(int x) {} -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_14_test.dart b/tests/language_2/regress/regress33235_14_test.dart deleted file mode 100644 index 5005948f1f2..00000000000 --- a/tests/language_2/regress/regress33235_14_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. -class A { - void set n(int x) {} -} - -class B extends A { - static void set n(int i) {} - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -abstract class B2 implements A { - static void set n(int i) {} - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -class C { - static void set n(int i) {} - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - - void set n(int x) {} - // ^ - // [cfe] 'n' is already declared in this scope. -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_15_runtime_test.dart b/tests/language_2/regress/regress33235_15_runtime_test.dart deleted file mode 100644 index d3e35672d5d..00000000000 --- a/tests/language_2/regress/regress33235_15_runtime_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - int n() => 43; -} - -class B extends A { - -} - -abstract class B2 implements A { - -} - -class C { - - - int n() => 43; -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_15_test.dart b/tests/language_2/regress/regress33235_15_test.dart deleted file mode 100644 index 522c1325fdf..00000000000 --- a/tests/language_2/regress/regress33235_15_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - int n() => 43; -} - -class B extends A { - int get n => 42; - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_FIELD_AND_METHOD - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -abstract class B2 implements A { - int get n => 42; - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_FIELD_AND_METHOD - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -class C { - int get n => 42; - - int n() => 43; - // ^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'n' is already declared in this scope. -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_16_runtime_test.dart b/tests/language_2/regress/regress33235_16_runtime_test.dart deleted file mode 100644 index d3e35672d5d..00000000000 --- a/tests/language_2/regress/regress33235_16_runtime_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - int n() => 43; -} - -class B extends A { - -} - -abstract class B2 implements A { - -} - -class C { - - - int n() => 43; -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_16_test.dart b/tests/language_2/regress/regress33235_16_test.dart deleted file mode 100644 index e9a83200ddc..00000000000 --- a/tests/language_2/regress/regress33235_16_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - int n() => 43; -} - -class B extends A { - void set n(int i) {} - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_FIELD_AND_METHOD - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -abstract class B2 implements A { - void set n(int i) {} - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_FIELD_AND_METHOD - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -class C { - void set n(int i) {} - - int n() => 43; - // ^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'n' is already declared in this scope. -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_17_test.dart b/tests/language_2/regress/regress33235_17_test.dart deleted file mode 100644 index 43b5ee1f669..00000000000 --- a/tests/language_2/regress/regress33235_17_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class C { - static void set n(int i) {} - - static int get n { - return 43; - } -} - -main() { - print(C); -} diff --git a/tests/language_2/regress/regress33235_18_test.dart b/tests/language_2/regress/regress33235_18_test.dart deleted file mode 100644 index 4a39968527f..00000000000 --- a/tests/language_2/regress/regress33235_18_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - void set n(int i) {} -} - -class B extends A { - int get n { - return 42; - } -} - -abstract class B2 implements A { - int get n { - return 42; - } -} - -class C { - int get n { - return 42; - } - - void set n(int i) {} -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_19_test.dart b/tests/language_2/regress/regress33235_19_test.dart deleted file mode 100644 index 2b9343de9bb..00000000000 --- a/tests/language_2/regress/regress33235_19_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - int n() { - return 42; - } -} - -class B extends A { - B.n() {} -} - -abstract class B2 implements A { - B2.n() {} -} - -class C { - C.n() {} - - int n() { - return 42; - } -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_20_test.dart b/tests/language_2/regress/regress33235_20_test.dart deleted file mode 100644 index bee20948ef2..00000000000 --- a/tests/language_2/regress/regress33235_20_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - int get n { - return 42; - } -} - -class B extends A { - B.n() {} -} - -abstract class B2 implements A { - B2.n() {} -} - -class C { - C.n() {} - - int get n { - return 42; - } -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33235_21_test.dart b/tests/language_2/regress/regress33235_21_test.dart deleted file mode 100644 index 03614cd27a3..00000000000 --- a/tests/language_2/regress/regress33235_21_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test for compliance with tables at -// https://github.com/dart-lang/sdk/issues/33235#issue-326617285 -// Files 01 to 16 should be compile time errors, files 17 to 21 should not. - -class A { - void set n(int i) {} -} - -class B extends A { - B.n() {} -} - -abstract class B2 implements A { - B2.n() {} -} - -class C { - C.n() {} - - void set n(int i) {} -} - -main() { - print(C); - print(B); - print(B2); -} diff --git a/tests/language_2/regress/regress33392_test.dart b/tests/language_2/regress/regress33392_test.dart deleted file mode 100644 index e25a3dec3b5..00000000000 --- a/tests/language_2/regress/regress33392_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; -import 'package:expect/expect.dart'; - -class B extends A {} - -class A { - int x(FutureOr v) => 42; -} - -void main() { - Expect.equals(new B().x(new B()), 42); -} diff --git a/tests/language_2/regress/regress33479_runtime_test.dart b/tests/language_2/regress/regress33479_runtime_test.dart deleted file mode 100644 index 122be212fe6..00000000000 --- a/tests/language_2/regress/regress33479_runtime_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -class Hest {} - -typedef Fisk = void Function // don't merge lines - - (); - -main() { - Hest hest = new Hest(); -} diff --git a/tests/language_2/regress/regress33479_test.dart b/tests/language_2/regress/regress33479_test.dart deleted file mode 100644 index 492913e12ad..00000000000 --- a/tests/language_2/regress/regress33479_test.dart +++ /dev/null @@ -1,22 +0,0 @@ - -// @dart = 2.9 -class Hest {} -// ^ -// [cfe] Type variables can't have generic function types in their bounds. -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.NOT_INSTANTIATED_BOUND - -typedef Fisk = void Function // don't merge lines -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF -// ^ -// [cfe] Generic type 'Fisk' can't be used without type arguments in the bounds of its own type variables. It is referenced indirectly through 'Hest'. - (); -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.NOT_INSTANTIATED_BOUND - -main() { - Hest hest = new Hest(); -// ^ -// [cfe] Generic function type 'void Function()' inferred as a type argument. -} diff --git a/tests/language_2/regress/regress34034_test.dart b/tests/language_2/regress/regress34034_test.dart deleted file mode 100644 index 4df807b0d45..00000000000 --- a/tests/language_2/regress/regress34034_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -dynamic bar(int Function(int) f) => f; -T foo(T a) => a; - -void main() { - final closure = bar(foo); - String s = closure.toString(); - print(s); - Expect.isTrue(s.contains("(int) => int") || s.contains("with ")); -} diff --git a/tests/language_2/regress/regress34091.dart b/tests/language_2/regress/regress34091.dart deleted file mode 100644 index 7e759d51cc5..00000000000 --- a/tests/language_2/regress/regress34091.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2018, 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 - -// Tests that stack traces from data URIs don't contain the entire URI, and -// instead just have the substitute file name: - -import "dart:isolate"; -import "package:expect/expect.dart"; -import 'dart:async'; - -void main() { - // This data URI encodes: - /* - import "dart:isolate"; - void main(_, p){ - try { - throw("Hello World"); - } catch (e, s) { - p.send("$e\n$s"); - } - } - */ - final uri = Uri.parse( - "data:application/dart;charset=utf8,import%20%22dart%3Aisolate%22%3Bvoi" + - "d%20main(_%2Cp)%7Btry%7Bthrow(%22Hello%20World%22)%3B%7Dcatch(e%2C" + - "%20s)%7Bp.send(%22%24e%5Cn%24s%22)%3B%7D%7D"); - ReceivePort port = new ReceivePort(); - Isolate.spawnUri(uri, [], port.sendPort); - port.listen((trace) { - // Test that the trace contains the exception message. - Expect.isTrue(trace.contains("Hello World")); - - // Test that the trace contains data URI substitute. - Expect.isTrue(trace.contains("")); - - // Test that the trace doesn't contain any leftover URL encoded junk. - Expect.isFalse(trace.contains("%20")); - - port.close(); - }); -} diff --git a/tests/language_2/regress/regress34147_test.dart b/tests/language_2/regress/regress34147_test.dart deleted file mode 100644 index ba74a1ae434..00000000000 --- a/tests/language_2/regress/regress34147_test.dart +++ /dev/null @@ -1,74 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -void main() { - conditionalTest(); - orTest(); - andTest(); - ifTest(); - forTest(); - whileTest(); - doTest(); - notTest(); -} - -void conditionalTest() { - bool x = null; - Expect.throwsAssertionError(() => x ? 1 : 0); -} - -void orTest() { - bool x = null; - Expect.throwsAssertionError(() => x || x); - Expect.throwsAssertionError(() => x || false); - Expect.throwsAssertionError(() => x || true); - Expect.throwsAssertionError(() => false || x); - Expect.isTrue(true || x); -} - -void andTest() { - bool x = null; - Expect.throwsAssertionError(() => x && x); - Expect.throwsAssertionError(() => x && false); - Expect.throwsAssertionError(() => x && true); - Expect.isFalse(false && x); - Expect.throwsAssertionError(() => true && x); -} - -void ifTest() { - bool x = null; - Expect.throwsAssertionError(() { - if (x) {} - }); -} - -void forTest() { - bool x = null; - Expect.throwsAssertionError(() { - for (; x;) {} - }); -} - -void whileTest() { - bool x = null; - Expect.throwsAssertionError(() { - while (x) {} - }); -} - -void doTest() { - bool x = null; - Expect.throwsAssertionError(() { - do {} while (x); - }); -} - -void notTest() { - bool x = null; - Expect.throwsAssertionError(() => !x); -} diff --git a/tests/language_2/regress/regress34225_test.dart b/tests/language_2/regress/regress34225_test.dart deleted file mode 100644 index b99d904c7c6..00000000000 --- a/tests/language_2/regress/regress34225_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2018, 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 - -class C { - static set C(v) {} //# 01: compile-time error - set C(v) {} //# 02: compile-time error -} - -main() { - new C(); -} diff --git a/tests/language_2/regress/regress34235_runtime_test.dart b/tests/language_2/regress/regress34235_runtime_test.dart deleted file mode 100644 index 1f8058cb137..00000000000 --- a/tests/language_2/regress/regress34235_runtime_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -class Base { - void foo() {} -} - -class M1 { - void foo( - // Prevent formatter from joining the line below to the one above - - ) {} -} - -class BaseWithM1 = Base with M1; - -class M2 { - void foo() {} -} - -class Derived extends BaseWithM1 with M2 {} - -main() { - new Derived().foo(); -} diff --git a/tests/language_2/regress/regress34235_test.dart b/tests/language_2/regress/regress34235_test.dart deleted file mode 100644 index 5c199a5401d..00000000000 --- a/tests/language_2/regress/regress34235_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2018, 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 - -class Base { - void foo() {} -} - -class M1 { - void foo( - // Prevent formatter from joining the line below to the one above - {x} - ) {} -} - -class BaseWithM1 = Base with M1; - -class M2 { - void foo() {} -} - -class Derived extends BaseWithM1 with M2 {} -// ^^^^^^^ -// [cfe] Applying the mixin 'M2' to 'BaseWithM1' introduces an erroneous override of 'foo'. -// ^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE - -main() { - new Derived().foo(); -} diff --git a/tests/language_2/regress/regress34392_test.dart b/tests/language_2/regress/regress34392_test.dart deleted file mode 100644 index afdb5619149..00000000000 --- a/tests/language_2/regress/regress34392_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2018, 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 - -abstract class I { - foo([a]); -} - -abstract class A { - foo() {} -} - -abstract class B extends A implements I {} - -class C extends B { - foo([a]) {} -} - -void main() {} diff --git a/tests/language_2/regress/regress34404_flutter_modified_test.dart b/tests/language_2/regress/regress34404_flutter_modified_test.dart deleted file mode 100644 index 82be4b106bf..00000000000 --- a/tests/language_2/regress/regress34404_flutter_modified_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2018, 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 - -// This test case is a reduction of some Flutter code, modified to use the new -// mixin syntax. We wish to verify that the class _DismissibleState doesn't -// have any type inference errors. - -class _DismissibleState extends State - with TickerProviderStateMixin, AutomaticKeepAliveClientMixin {} - -abstract class State extends Diagnosticable {} - -abstract class StatefulWidget extends Widget {} - -abstract class Widget extends DiagnosticableTree {} - -abstract class DiagnosticableTree extends Diagnosticable {} - -abstract class Diagnosticable {} - -class Dismissible extends StatefulWidget {} - -mixin TickerProviderStateMixin on State - implements TickerProvider {} - -abstract class TickerProvider {} - -mixin AutomaticKeepAliveClientMixin on State {} - -main() { - new _DismissibleState(); -} diff --git a/tests/language_2/regress/regress34404_flutter_test.dart b/tests/language_2/regress/regress34404_flutter_test.dart deleted file mode 100644 index 9539112a378..00000000000 --- a/tests/language_2/regress/regress34404_flutter_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2018, 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 - -// This test case is a reduction of some Flutter code. We wish to verify that -// the class _DismissibleState doesn't have any type inference errors. - -class _DismissibleState extends State - with TickerProviderStateMixin, AutomaticKeepAliveClientMixin {} - -abstract class State extends Diagnosticable {} - -abstract class StatefulWidget extends Widget {} - -abstract class Widget extends DiagnosticableTree {} - -abstract class DiagnosticableTree extends Diagnosticable {} - -abstract class Diagnosticable {} - -class Dismissible extends StatefulWidget {} - -mixin TickerProviderStateMixin on State - implements TickerProvider {} - -abstract class TickerProvider {} - -mixin AutomaticKeepAliveClientMixin on State {} - -main() { - new _DismissibleState(); -} diff --git a/tests/language_2/regress/regress34482_test.dart b/tests/language_2/regress/regress34482_test.dart deleted file mode 100644 index 187c78b562d..00000000000 --- a/tests/language_2/regress/regress34482_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -main() { - Future f = new Future(() => 12345); - Future f1 = f; - - FutureOr fo = f; - f1 = fo; -} diff --git a/tests/language_2/regress/regress34488_runtime_test.dart b/tests/language_2/regress/regress34488_runtime_test.dart deleted file mode 100644 index b2957dfb200..00000000000 --- a/tests/language_2/regress/regress34488_runtime_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -abstract class Base { - void f(int i); - void g([int i]); - void h({int i}); -} - -abstract class Mixin implements Base {} - -class Derived extends Object with Mixin { - // Type `(int) -> void` should be inherited from `Base` - f(i) {} - - // Type `([int]) -> void` should be inherited from `Base` - g([i]) {} - - // Type `({h: int}) -> void` should be inherited from `Base` - h({i}) {} -} - -main() { - var d = new Derived(); - - - - - - -} diff --git a/tests/language_2/regress/regress34488_test.dart b/tests/language_2/regress/regress34488_test.dart deleted file mode 100644 index c0e40955015..00000000000 --- a/tests/language_2/regress/regress34488_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2018, 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 - -abstract class Base { - void f(int i); - void g([int i]); - void h({int i}); -} - -abstract class Mixin implements Base {} - -class Derived extends Object with Mixin { - // Type `(int) -> void` should be inherited from `Base` - f(i) {} - - // Type `([int]) -> void` should be inherited from `Base` - g([i]) {} - - // Type `({h: int}) -> void` should be inherited from `Base` - h({i}) {} -} - -main() { - var d = new Derived(); - d.f('bad'); - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'. - d.g('bad'); - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'. - d.h(i: 'bad'); - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'String' can't be assigned to the parameter type 'int'. - Object x = d.f(1); - // ^ - // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT - // [cfe] This expression has type 'void' and can't be used. - Object y = d.g(1); - // ^ - // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT - // [cfe] This expression has type 'void' and can't be used. - Object z = d.h(i: 1); - // ^ - // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT - // [cfe] This expression has type 'void' and can't be used. -} diff --git a/tests/language_2/regress/regress34489_runtime_test.dart b/tests/language_2/regress/regress34489_runtime_test.dart deleted file mode 100644 index c2efabadd5f..00000000000 --- a/tests/language_2/regress/regress34489_runtime_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -class C { - var field = T; -} - -main() { - -} diff --git a/tests/language_2/regress/regress34489_test.dart b/tests/language_2/regress/regress34489_test.dart deleted file mode 100644 index 28141dcbbc3..00000000000 --- a/tests/language_2/regress/regress34489_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2018, 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 - -class C { - var field = T; -} - -main() { - new C().field = 'bad'; - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'String' can't be assigned to a variable of type 'Type'. -} diff --git a/tests/language_2/regress/regress34495_runtime_test.dart b/tests/language_2/regress/regress34495_runtime_test.dart deleted file mode 100644 index 3e132311da9..00000000000 --- a/tests/language_2/regress/regress34495_runtime_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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() {} diff --git a/tests/language_2/regress/regress34495_test.dart b/tests/language_2/regress/regress34495_test.dart deleted file mode 100644 index 85d923d1a2c..00000000000 --- a/tests/language_2/regress/regress34495_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2018, 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 - -final foo = A.foo(); -// ^ -// [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE -// [cfe] Couldn't find constructor 'A'. -// ^ -// [analyzer] COMPILE_TIME_ERROR.NON_TYPE_AS_TYPE_ARGUMENT -// [cfe] 'B' isn't a type. - -main() {} diff --git a/tests/language_2/regress/regress34498_test.dart b/tests/language_2/regress/regress34498_test.dart deleted file mode 100644 index d52a7692e07..00000000000 --- a/tests/language_2/regress/regress34498_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:core'; -import 'dart:core' as core; - -class A { - core.List get core => null; -//^^^^ -// [analyzer] COMPILE_TIME_ERROR.PREFIX_SHADOWED_BY_LOCAL_DECLARATION -// [cfe] 'core.List' can't be used as a type because 'core' doesn't refer to an import prefix. -} - -main() { - new A().core; -} diff --git a/tests/language_2/regress/regress34514_test.dart b/tests/language_2/regress/regress34514_test.dart deleted file mode 100644 index b43bf495766..00000000000 --- a/tests/language_2/regress/regress34514_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2018, 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 - -// Inferred type should be `int` -var x = (() => 1)(); - -main() { - x = 'bad'; // `String` not assignable to `int` - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. -} diff --git a/tests/language_2/regress/regress34532_test.dart b/tests/language_2/regress/regress34532_test.dart deleted file mode 100644 index 47c8a7b6581..00000000000 --- a/tests/language_2/regress/regress34532_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2018, 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 - -class Foo {} - -class Bar> {} - -// Should be error here, because Bar completes to Bar -class Baz extends Bar {} -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS -// [cfe] Inferred type argument 'Foo' doesn't conform to the bound 'Foo' of the type variable 'T' on 'Bar'. - -void main() {} diff --git a/tests/language_2/regress/regress34635_test.dart b/tests/language_2/regress/regress34635_test.dart deleted file mode 100644 index 94a15d4b17d..00000000000 --- a/tests/language_2/regress/regress34635_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2018, 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 - -class A {} -// ^ -// [analyzer] COMPILE_TIME_ERROR.NOT_INSTANTIATED_BOUND - -class C {} -// ^ -// [cfe] Generic type 'C' can't be used without type arguments in the bounds of its own type variables. -// ^ -// [analyzer] COMPILE_TIME_ERROR.NOT_INSTANTIATED_BOUND - -main() {} diff --git a/tests/language_2/regress/regress34636_test.dart b/tests/language_2/regress/regress34636_test.dart deleted file mode 100644 index da8b6e2f8e8..00000000000 --- a/tests/language_2/regress/regress34636_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2018, 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 - -class A {} -// ^ -// [analyzer] COMPILE_TIME_ERROR.NOT_INSTANTIATED_BOUND - -class B {} -// ^ -// [cfe] Generic type 'B' can't be used without type arguments in the bounds of its own type variables. It is referenced indirectly through 'C'. -// ^ -// [analyzer] COMPILE_TIME_ERROR.NOT_INSTANTIATED_BOUND - -class C> {} -// ^ -// [analyzer] COMPILE_TIME_ERROR.NOT_INSTANTIATED_BOUND - -main() {} diff --git a/tests/language_2/regress/regress34870_test.dart b/tests/language_2/regress/regress34870_test.dart deleted file mode 100644 index 04a4b042d0b..00000000000 --- a/tests/language_2/regress/regress34870_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2018, 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 - -// Regression test: superclass is not shadowed by class members. - -class A extends B { - B() {} -} - -class B {} - -main() {} diff --git a/tests/language_2/regress/regress34877_test.dart b/tests/language_2/regress/regress34877_test.dart deleted file mode 100644 index 02e36a15149..00000000000 --- a/tests/language_2/regress/regress34877_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2018, 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 - -// Regression test: ensure that async for loops remain async for loops when -// mixed in. - -import 'dart:async'; - -abstract class _Mixin { - Future stuff(Stream values) async { - var total = 0; - await for (var value in values) { - total += value; - } - return total; - } -} - -class Implementation extends Object with _Mixin {} - -void main() async { - print(await Implementation().stuff(Stream.fromIterable([1, 2, 3]))); -} diff --git a/tests/language_2/regress/regress34896_test.dart b/tests/language_2/regress/regress34896_test.dart deleted file mode 100644 index 43f38c164d9..00000000000 --- a/tests/language_2/regress/regress34896_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2018, 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 - -// Regression test: verify super-signatures of super-invoked methods of a -// mixin against the superclass, not signatures in the mixin. - -class A { - void remove(T x) {} -} - -mixin M on A { - void remove(Object x) { - super.remove(x as U); - } -} - -class X = A with M; - -main() {} diff --git a/tests/language_2/regress/regress34907_test.dart b/tests/language_2/regress/regress34907_test.dart deleted file mode 100644 index 3a646bba0e7..00000000000 --- a/tests/language_2/regress/regress34907_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class C {} - -mixin M on C {} - -M f() { - Expect.equals(T, int); - return null; -} - -main() { - C c = f(); -} diff --git a/tests/language_2/regress/regress35043_runtime_test.dart b/tests/language_2/regress/regress35043_runtime_test.dart deleted file mode 100644 index 3e132311da9..00000000000 --- a/tests/language_2/regress/regress35043_runtime_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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() {} diff --git a/tests/language_2/regress/regress35043_test.dart b/tests/language_2/regress/regress35043_test.dart deleted file mode 100644 index 4bb870c1129..00000000000 --- a/tests/language_2/regress/regress35043_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2018, 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 - -final foo = Map(); -// ^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS -// [cfe] Expected 2 type arguments. - -main() {} diff --git a/tests/language_2/regress/regress35090_test.dart b/tests/language_2/regress/regress35090_test.dart deleted file mode 100644 index 405f7640fd9..00000000000 --- a/tests/language_2/regress/regress35090_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class A { - int get g => 0; -} - -class C implements A { - noSuchMethod(Invocation i) { - return 1; - } -} - -mixin M on A { - int test() { - return super.g; - } - - noSuchMethod(Invocation i) { - return 2; - } -} - -class MA extends C with M {} - -main() { - Expect.equals(new MA().g, 2); - Expect.equals(new MA().test(), 2); -} diff --git a/tests/language_2/regress/regress35258_runtime_test.dart b/tests/language_2/regress/regress35258_runtime_test.dart deleted file mode 100644 index 62bdb49baf4..00000000000 --- a/tests/language_2/regress/regress35258_runtime_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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() { - new C(42); -} - -class C { - final d; - - - C(this.d) {} -} diff --git a/tests/language_2/regress/regress35258_test.dart b/tests/language_2/regress/regress35258_test.dart deleted file mode 100644 index e084a5c355f..00000000000 --- a/tests/language_2/regress/regress35258_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2018, 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() { - new C(42); - // ^ - // [cfe] Can't use 'C' because it is declared more than once. - // ^^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS -} - -class C { - final d; - // ^ - // [cfe] Final field 'd' is not initialized. - - C() {} -//^ -// [analyzer] COMPILE_TIME_ERROR.FINAL_NOT_INITIALIZED_CONSTRUCTOR - C(this.d) {} -//^ -// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_CONSTRUCTOR -// [cfe] 'C' is already declared in this scope. -} diff --git a/tests/language_2/regress/regress35259_runtime_test.dart b/tests/language_2/regress/regress35259_runtime_test.dart deleted file mode 100644 index 203fbf43b5b..00000000000 --- a/tests/language_2/regress/regress35259_runtime_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -class Supertype { - - -} - -main() { - print(new Supertype()); -} diff --git a/tests/language_2/regress/regress35259_test.dart b/tests/language_2/regress/regress35259_test.dart deleted file mode 100644 index 245a0e67edb..00000000000 --- a/tests/language_2/regress/regress35259_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2018, 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 - -class Supertype { - factory Supertype() = Unresolved; - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_NON_CLASS - // [cfe] Couldn't find constructor 'Unresolved'. - // ^ - // [cfe] Redirection constructor target not found: 'Unresolved' - factory Supertype() = Unresolved; -// ^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_CONSTRUCTOR -// ^ -// [cfe] 'Supertype' is already declared in this scope. -// ^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_NON_CLASS -// [cfe] Couldn't find constructor 'Unresolved'. -// ^ -// [cfe] Redirection constructor target not found: 'Unresolved' -} - -main() { - print(new Supertype()); - // ^ - // [cfe] Can't use 'Supertype' because it is declared more than once. -} diff --git a/tests/language_2/regress/regress35260_runtime_test.dart b/tests/language_2/regress/regress35260_runtime_test.dart deleted file mode 100644 index c620ace5ab6..00000000000 --- a/tests/language_2/regress/regress35260_runtime_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -class Supertype { - factory Supertype() = X; - -} - -class X implements Supertype { - X(); -} - -main() { - X x = new Supertype(); -} diff --git a/tests/language_2/regress/regress35260_test.dart b/tests/language_2/regress/regress35260_test.dart deleted file mode 100644 index 6b1f53f4325..00000000000 --- a/tests/language_2/regress/regress35260_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2018, 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 - -class Supertype { - factory Supertype() = X; - factory Supertype() = X; -// ^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_CONSTRUCTOR -// ^ -// [cfe] 'Supertype' is already declared in this scope. -} - -class X implements Supertype { - X(); -} - -main() { - X x = new Supertype(); - // ^ - // [cfe] Can't use 'Supertype' because it is declared more than once. -} diff --git a/tests/language_2/regress/regress35266_runtime_test.dart b/tests/language_2/regress/regress35266_runtime_test.dart deleted file mode 100644 index 36006050ab7..00000000000 --- a/tests/language_2/regress/regress35266_runtime_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -class B extends C { - B(); - factory B.foo() = B; - -} - -class C { - C(); - factory C.bar() = B.foo; -} - -main() { - new C.bar(); -} diff --git a/tests/language_2/regress/regress35266_test.dart b/tests/language_2/regress/regress35266_test.dart deleted file mode 100644 index bd0dab1418e..00000000000 --- a/tests/language_2/regress/regress35266_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2018, 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 - -class B extends C { - B(); - factory B.foo() = B; - factory B.foo() = B; -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.DUPLICATE_CONSTRUCTOR -// ^ -// [cfe] 'B.foo' is already declared in this scope. -} - -class C { - C(); - factory C.bar() = B.foo; - // ^ - // [cfe] Can't use 'B.foo' because it is declared more than once. -} - -main() { - new C.bar(); -} diff --git a/tests/language_2/regress/regress35542_test.dart b/tests/language_2/regress/regress35542_test.dart deleted file mode 100644 index 434780285ae..00000000000 --- a/tests/language_2/regress/regress35542_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:async'; -import 'package:expect/expect.dart'; - -FutureOr x = 'abc'; -dynamic y = 'abc'; - -void smi() { - x = 42; - y = 42; -} - -void mint() { - x = 0x7fffffff00000000; - y = 0x7fffffff00000000; -} - -void dbl() { - x = 1.0; - y = 1.0; -} - -void main() { - smi(); - Expect.isTrue(identical(x, y)); - mint(); - Expect.isTrue(identical(x, y)); - dbl(); - Expect.isTrue(identical(x, y)); -} diff --git a/tests/language_2/regress/regress36084_test.dart b/tests/language_2/regress/regress36084_test.dart deleted file mode 100644 index bd033ba19e4..00000000000 --- a/tests/language_2/regress/regress36084_test.dart +++ /dev/null @@ -1,64 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - void call(int a, [int b]) {} -} - -class A1 { - void call(int a, [int b]) {} - int noSuchMethod(Invocation invocation) { - return 42; - } -} - -class A2 { - // Same as A1 but without a call method. - int noSuchMethod(Invocation invocation) { - return 42; - } -} - -class B { - dynamic foo; - dynamic get bar => foo; -} - -class B1 { - dynamic foo; - dynamic get bar => foo; - - int noSuchMethod(Invocation invocation) { - Expect.fail('B1.noSuchMethod should not be called.'); - } -} - -main() { - B b = new B(); - b.foo = new A(); - Expect.throwsNoSuchMethodError(() => b.foo(1, 2, 3)); - Expect.throwsNoSuchMethodError(() => b.bar(1, 2, 3)); - b.foo = new A1(); - Expect.equals(42, b.foo(1, 2, 3)); - Expect.equals(42, b.bar(1, 2, 3)); - b.foo = new A2(); - Expect.equals(42, b.foo(1, 2, 3)); - Expect.equals(42, b.bar(1, 2, 3)); - - // Same test but with B1, which has its own `noSuchMethod()` handler. - B1 b1 = new B1(); - b1.foo = new A(); - Expect.throwsNoSuchMethodError(() => b1.foo(1, 2, 3)); - Expect.throwsNoSuchMethodError(() => b1.bar(1, 2, 3)); - b1.foo = new A1(); - Expect.equals(42, b1.foo(1, 2, 3)); - Expect.equals(42, b1.bar(1, 2, 3)); - b1.foo = new A2(); - Expect.equals(42, b1.foo(1, 2, 3)); - Expect.equals(42, b1.bar(1, 2, 3)); -} diff --git a/tests/language_2/regress/regress3806_test.dart b/tests/language_2/regress/regress3806_test.dart deleted file mode 100644 index 3fd3fa98d04..00000000000 --- a/tests/language_2/regress/regress3806_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012, 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 - -// Dart2js produced a statement in an expression context for this test. - -class A { - dynamic foo = "foo"; - bar(x) { - if (foo == 3) return; - var t = x; - if (x == 0) t = foo; - foo = t; - } - - toto(x) => x; - titi() { - foo = 0; - for (int i = 0; i < 3; i++) bar(i); - } -} - -main() => new A().titi(); diff --git a/tests/language_2/regress/regress38816_test.dart b/tests/language_2/regress/regress38816_test.dart deleted file mode 100644 index 663e5c5b6dd..00000000000 --- a/tests/language_2/regress/regress38816_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -void foo(T x) {} -void bar(num x) {} - -typedef F = Function(T x); - -void main() { - Expect.isTrue(foo is F); - Expect.isTrue(bar is F); -} diff --git a/tests/language_2/regress/regress40066_test.dart b/tests/language_2/regress/regress40066_test.dart deleted file mode 100644 index 8cc91285168..00000000000 --- a/tests/language_2/regress/regress40066_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - foo(T x) { - print('T = $T'); - print('x.runtimeType = ${x.runtimeType}'); - print('x is T = ${x is T}'); - } -} - -typedef IntFunc = void Function(int); -typedef StringFunc = void Function(String); - -void main() { - void inner(S y) {} - - IntFunc innerOfInt = inner; - A a = new A(); - a.foo(innerOfInt); - - StringFunc innerOfString = inner; - Expect.throwsTypeError(() { - a.foo(innerOfString); - }); -} diff --git a/tests/language_2/regress/regress40765_test.dart b/tests/language_2/regress/regress40765_test.dart deleted file mode 100644 index 6037c00fc2d..00000000000 --- a/tests/language_2/regress/regress40765_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// 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. - -// @dart = 2.9 - -class Something { - final int x; - Something({this.x}); -} - -abstract class Base { - Something get x; -} - -class Child1 extends Base { - final Something x; - Child1({this.x}); -} - -class Child2 extends Base { - final int y; - final Something x; - Child2({this.x, this.y}); -} - -@pragma('vm:never-inline') -int foo(int k, Base x) { - var y = 0; - for (var i = 0; i < k; i++) { - x as Child1; - // Next line will be hoisted out as x.{Child1::x}.{Something::x} - // and at foo(0, Child2(..., y: 24)) will end up executing as - // x.{Child1::x} -> will load Child2::y (24) and then segfault. - y = x.x.x; - } - return y; -} - -void main() { - print(foo(1, Child1(x: Something(x: 1)))); - print(foo(1, Child1(x: Something(x: 2)))); - print(foo(0, Child2(x: Something(x: 42), y: 24))); -} diff --git a/tests/language_2/regress/regress4157508_test.dart b/tests/language_2/regress/regress4157508_test.dart deleted file mode 100644 index a2bd1110795..00000000000 --- a/tests/language_2/regress/regress4157508_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// 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 - -class Issue4157508Test { - Issue4157508Test(var v) { - var d = new DateTime.fromMillisecondsSinceEpoch(v, isUtc: true); - } - - static void testMain() { - var d = new Issue4157508Test(0); - } -} - -main() { - Issue4157508Test.testMain(); -} diff --git a/tests/language_2/regress/regress41983_test.dart b/tests/language_2/regress/regress41983_test.dart deleted file mode 100644 index 60f2016dd29..00000000000 --- a/tests/language_2/regress/regress41983_test.dart +++ /dev/null @@ -1,20016 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - List ints = [] - ..add(0) - ..add(1) - ..add(2) - ..add(3) - ..add(4) - ..add(5) - ..add(6) - ..add(7) - ..add(8) - ..add(9) - ..add(10) - ..add(11) - ..add(12) - ..add(13) - ..add(14) - ..add(15) - ..add(16) - ..add(17) - ..add(18) - ..add(19) - ..add(20) - ..add(21) - ..add(22) - ..add(23) - ..add(24) - ..add(25) - ..add(26) - ..add(27) - ..add(28) - ..add(29) - ..add(30) - ..add(31) - ..add(32) - ..add(33) - ..add(34) - ..add(35) - ..add(36) - ..add(37) - ..add(38) - ..add(39) - ..add(40) - ..add(41) - ..add(42) - ..add(43) - ..add(44) - ..add(45) - ..add(46) - ..add(47) - ..add(48) - ..add(49) - ..add(50) - ..add(51) - ..add(52) - ..add(53) - ..add(54) - ..add(55) - ..add(56) - ..add(57) - ..add(58) - ..add(59) - ..add(60) - ..add(61) - ..add(62) - ..add(63) - ..add(64) - ..add(65) - ..add(66) - ..add(67) - ..add(68) - ..add(69) - ..add(70) - ..add(71) - ..add(72) - ..add(73) - ..add(74) - ..add(75) - ..add(76) - ..add(77) - ..add(78) - ..add(79) - ..add(80) - ..add(81) - ..add(82) - ..add(83) - ..add(84) - ..add(85) - ..add(86) - ..add(87) - ..add(88) - ..add(89) - ..add(90) - ..add(91) - ..add(92) - ..add(93) - ..add(94) - ..add(95) - ..add(96) - ..add(97) - ..add(98) - ..add(99) - ..add(100) - ..add(101) - ..add(102) - ..add(103) - ..add(104) - ..add(105) - ..add(106) - ..add(107) - ..add(108) - ..add(109) - ..add(110) - ..add(111) - ..add(112) - ..add(113) - ..add(114) - ..add(115) - ..add(116) - ..add(117) - ..add(118) - ..add(119) - ..add(120) - ..add(121) - ..add(122) - ..add(123) - ..add(124) - ..add(125) - ..add(126) - ..add(127) - ..add(128) - ..add(129) - ..add(130) - ..add(131) - ..add(132) - ..add(133) - ..add(134) - ..add(135) - ..add(136) - ..add(137) - ..add(138) - ..add(139) - ..add(140) - ..add(141) - ..add(142) - ..add(143) - ..add(144) - ..add(145) - ..add(146) - ..add(147) - ..add(148) - ..add(149) - ..add(150) - ..add(151) - ..add(152) - ..add(153) - ..add(154) - ..add(155) - ..add(156) - ..add(157) - ..add(158) - ..add(159) - ..add(160) - ..add(161) - ..add(162) - ..add(163) - ..add(164) - ..add(165) - ..add(166) - ..add(167) - ..add(168) - ..add(169) - ..add(170) - ..add(171) - ..add(172) - ..add(173) - ..add(174) - ..add(175) - ..add(176) - ..add(177) - ..add(178) - ..add(179) - ..add(180) - ..add(181) - ..add(182) - ..add(183) - ..add(184) - ..add(185) - ..add(186) - ..add(187) - ..add(188) - ..add(189) - ..add(190) - ..add(191) - ..add(192) - ..add(193) - ..add(194) - ..add(195) - ..add(196) - ..add(197) - ..add(198) - ..add(199) - ..add(200) - ..add(201) - ..add(202) - ..add(203) - ..add(204) - ..add(205) - ..add(206) - ..add(207) - ..add(208) - ..add(209) - ..add(210) - ..add(211) - ..add(212) - ..add(213) - ..add(214) - ..add(215) - ..add(216) - ..add(217) - ..add(218) - ..add(219) - ..add(220) - ..add(221) - ..add(222) - ..add(223) - ..add(224) - ..add(225) - ..add(226) - ..add(227) - ..add(228) - ..add(229) - ..add(230) - ..add(231) - ..add(232) - ..add(233) - ..add(234) - ..add(235) - ..add(236) - ..add(237) - ..add(238) - ..add(239) - ..add(240) - ..add(241) - ..add(242) - ..add(243) - ..add(244) - ..add(245) - ..add(246) - ..add(247) - ..add(248) - ..add(249) - ..add(250) - ..add(251) - ..add(252) - ..add(253) - ..add(254) - ..add(255) - ..add(256) - ..add(257) - ..add(258) - ..add(259) - ..add(260) - ..add(261) - ..add(262) - ..add(263) - ..add(264) - ..add(265) - ..add(266) - ..add(267) - ..add(268) - ..add(269) - ..add(270) - ..add(271) - ..add(272) - ..add(273) - ..add(274) - ..add(275) - ..add(276) - ..add(277) - ..add(278) - ..add(279) - ..add(280) - ..add(281) - ..add(282) - ..add(283) - ..add(284) - ..add(285) - ..add(286) - ..add(287) - ..add(288) - ..add(289) - ..add(290) - ..add(291) - ..add(292) - ..add(293) - ..add(294) - ..add(295) - ..add(296) - ..add(297) - ..add(298) - ..add(299) - ..add(300) - ..add(301) - ..add(302) - ..add(303) - ..add(304) - ..add(305) - ..add(306) - ..add(307) - ..add(308) - ..add(309) - ..add(310) - ..add(311) - ..add(312) - ..add(313) - ..add(314) - ..add(315) - ..add(316) - ..add(317) - ..add(318) - ..add(319) - ..add(320) - ..add(321) - ..add(322) - ..add(323) - ..add(324) - ..add(325) - ..add(326) - ..add(327) - ..add(328) - ..add(329) - ..add(330) - ..add(331) - ..add(332) - ..add(333) - ..add(334) - ..add(335) - ..add(336) - ..add(337) - ..add(338) - ..add(339) - ..add(340) - ..add(341) - ..add(342) - ..add(343) - ..add(344) - ..add(345) - ..add(346) - ..add(347) - ..add(348) - ..add(349) - ..add(350) - ..add(351) - ..add(352) - ..add(353) - ..add(354) - ..add(355) - ..add(356) - ..add(357) - ..add(358) - ..add(359) - ..add(360) - ..add(361) - ..add(362) - ..add(363) - ..add(364) - ..add(365) - ..add(366) - ..add(367) - ..add(368) - ..add(369) - ..add(370) - ..add(371) - ..add(372) - ..add(373) - ..add(374) - ..add(375) - ..add(376) - ..add(377) - ..add(378) - ..add(379) - ..add(380) - ..add(381) - ..add(382) - ..add(383) - ..add(384) - ..add(385) - ..add(386) - ..add(387) - ..add(388) - ..add(389) - ..add(390) - ..add(391) - ..add(392) - ..add(393) - ..add(394) - ..add(395) - ..add(396) - ..add(397) - ..add(398) - ..add(399) - ..add(400) - ..add(401) - ..add(402) - ..add(403) - ..add(404) - ..add(405) - ..add(406) - ..add(407) - ..add(408) - ..add(409) - ..add(410) - ..add(411) - ..add(412) - ..add(413) - ..add(414) - ..add(415) - ..add(416) - ..add(417) - ..add(418) - ..add(419) - ..add(420) - ..add(421) - ..add(422) - ..add(423) - ..add(424) - ..add(425) - ..add(426) - ..add(427) - ..add(428) - ..add(429) - ..add(430) - ..add(431) - ..add(432) - ..add(433) - ..add(434) - ..add(435) - ..add(436) - ..add(437) - ..add(438) - ..add(439) - ..add(440) - ..add(441) - ..add(442) - ..add(443) - ..add(444) - ..add(445) - ..add(446) - ..add(447) - ..add(448) - ..add(449) - ..add(450) - ..add(451) - ..add(452) - ..add(453) - ..add(454) - ..add(455) - ..add(456) - ..add(457) - ..add(458) - ..add(459) - ..add(460) - ..add(461) - ..add(462) - ..add(463) - ..add(464) - ..add(465) - ..add(466) - ..add(467) - ..add(468) - ..add(469) - ..add(470) - ..add(471) - ..add(472) - ..add(473) - ..add(474) - ..add(475) - ..add(476) - ..add(477) - ..add(478) - ..add(479) - ..add(480) - ..add(481) - ..add(482) - ..add(483) - ..add(484) - ..add(485) - ..add(486) - ..add(487) - ..add(488) - ..add(489) - ..add(490) - ..add(491) - ..add(492) - ..add(493) - ..add(494) - ..add(495) - ..add(496) - ..add(497) - ..add(498) - ..add(499) - ..add(500) - ..add(501) - ..add(502) - ..add(503) - ..add(504) - ..add(505) - ..add(506) - ..add(507) - ..add(508) - ..add(509) - ..add(510) - ..add(511) - ..add(512) - ..add(513) - ..add(514) - ..add(515) - ..add(516) - ..add(517) - ..add(518) - ..add(519) - ..add(520) - ..add(521) - ..add(522) - ..add(523) - ..add(524) - ..add(525) - ..add(526) - ..add(527) - ..add(528) - ..add(529) - ..add(530) - ..add(531) - ..add(532) - ..add(533) - ..add(534) - ..add(535) - ..add(536) - ..add(537) - ..add(538) - ..add(539) - ..add(540) - ..add(541) - ..add(542) - ..add(543) - ..add(544) - ..add(545) - ..add(546) - ..add(547) - ..add(548) - ..add(549) - ..add(550) - ..add(551) - ..add(552) - ..add(553) - ..add(554) - ..add(555) - ..add(556) - ..add(557) - ..add(558) - ..add(559) - ..add(560) - ..add(561) - ..add(562) - ..add(563) - ..add(564) - ..add(565) - ..add(566) - ..add(567) - ..add(568) - ..add(569) - ..add(570) - ..add(571) - ..add(572) - ..add(573) - ..add(574) - ..add(575) - ..add(576) - ..add(577) - ..add(578) - ..add(579) - ..add(580) - ..add(581) - ..add(582) - ..add(583) - ..add(584) - ..add(585) - ..add(586) - ..add(587) - ..add(588) - ..add(589) - ..add(590) - ..add(591) - ..add(592) - ..add(593) - ..add(594) - ..add(595) - ..add(596) - ..add(597) - ..add(598) - ..add(599) - ..add(600) - ..add(601) - ..add(602) - ..add(603) - ..add(604) - ..add(605) - ..add(606) - ..add(607) - ..add(608) - ..add(609) - ..add(610) - ..add(611) - ..add(612) - ..add(613) - ..add(614) - ..add(615) - ..add(616) - ..add(617) - ..add(618) - ..add(619) - ..add(620) - ..add(621) - ..add(622) - ..add(623) - ..add(624) - ..add(625) - ..add(626) - ..add(627) - ..add(628) - ..add(629) - ..add(630) - ..add(631) - ..add(632) - ..add(633) - ..add(634) - ..add(635) - ..add(636) - ..add(637) - ..add(638) - ..add(639) - ..add(640) - ..add(641) - ..add(642) - ..add(643) - ..add(644) - ..add(645) - ..add(646) - ..add(647) - ..add(648) - ..add(649) - ..add(650) - ..add(651) - ..add(652) - ..add(653) - ..add(654) - ..add(655) - ..add(656) - ..add(657) - ..add(658) - ..add(659) - ..add(660) - ..add(661) - ..add(662) - ..add(663) - ..add(664) - ..add(665) - ..add(666) - ..add(667) - ..add(668) - ..add(669) - ..add(670) - ..add(671) - ..add(672) - ..add(673) - ..add(674) - ..add(675) - ..add(676) - ..add(677) - ..add(678) - ..add(679) - ..add(680) - ..add(681) - ..add(682) - ..add(683) - ..add(684) - ..add(685) - ..add(686) - ..add(687) - ..add(688) - ..add(689) - ..add(690) - ..add(691) - ..add(692) - ..add(693) - ..add(694) - ..add(695) - ..add(696) - ..add(697) - ..add(698) - ..add(699) - ..add(700) - ..add(701) - ..add(702) - ..add(703) - ..add(704) - ..add(705) - ..add(706) - ..add(707) - ..add(708) - ..add(709) - ..add(710) - ..add(711) - ..add(712) - ..add(713) - ..add(714) - ..add(715) - ..add(716) - ..add(717) - ..add(718) - ..add(719) - ..add(720) - ..add(721) - ..add(722) - ..add(723) - ..add(724) - ..add(725) - ..add(726) - ..add(727) - ..add(728) - ..add(729) - ..add(730) - ..add(731) - ..add(732) - ..add(733) - ..add(734) - ..add(735) - ..add(736) - ..add(737) - ..add(738) - ..add(739) - ..add(740) - ..add(741) - ..add(742) - ..add(743) - ..add(744) - ..add(745) - ..add(746) - ..add(747) - ..add(748) - ..add(749) - ..add(750) - ..add(751) - ..add(752) - ..add(753) - ..add(754) - ..add(755) - ..add(756) - ..add(757) - ..add(758) - ..add(759) - ..add(760) - ..add(761) - ..add(762) - ..add(763) - ..add(764) - ..add(765) - ..add(766) - ..add(767) - ..add(768) - ..add(769) - ..add(770) - ..add(771) - ..add(772) - ..add(773) - ..add(774) - ..add(775) - ..add(776) - ..add(777) - ..add(778) - ..add(779) - ..add(780) - ..add(781) - ..add(782) - ..add(783) - ..add(784) - ..add(785) - ..add(786) - ..add(787) - ..add(788) - ..add(789) - ..add(790) - ..add(791) - ..add(792) - ..add(793) - ..add(794) - ..add(795) - ..add(796) - ..add(797) - ..add(798) - ..add(799) - ..add(800) - ..add(801) - ..add(802) - ..add(803) - ..add(804) - ..add(805) - ..add(806) - ..add(807) - ..add(808) - ..add(809) - ..add(810) - ..add(811) - ..add(812) - ..add(813) - ..add(814) - ..add(815) - ..add(816) - ..add(817) - ..add(818) - ..add(819) - ..add(820) - ..add(821) - ..add(822) - ..add(823) - ..add(824) - ..add(825) - ..add(826) - ..add(827) - ..add(828) - ..add(829) - ..add(830) - ..add(831) - ..add(832) - ..add(833) - ..add(834) - ..add(835) - ..add(836) - ..add(837) - ..add(838) - ..add(839) - ..add(840) - ..add(841) - ..add(842) - ..add(843) - ..add(844) - ..add(845) - ..add(846) - ..add(847) - ..add(848) - ..add(849) - ..add(850) - ..add(851) - ..add(852) - ..add(853) - ..add(854) - ..add(855) - ..add(856) - ..add(857) - ..add(858) - ..add(859) - ..add(860) - ..add(861) - ..add(862) - ..add(863) - ..add(864) - ..add(865) - ..add(866) - ..add(867) - ..add(868) - ..add(869) - ..add(870) - ..add(871) - ..add(872) - ..add(873) - ..add(874) - ..add(875) - ..add(876) - ..add(877) - ..add(878) - ..add(879) - ..add(880) - ..add(881) - ..add(882) - ..add(883) - ..add(884) - ..add(885) - ..add(886) - ..add(887) - ..add(888) - ..add(889) - ..add(890) - ..add(891) - ..add(892) - ..add(893) - ..add(894) - ..add(895) - ..add(896) - ..add(897) - ..add(898) - ..add(899) - ..add(900) - ..add(901) - ..add(902) - ..add(903) - ..add(904) - ..add(905) - ..add(906) - ..add(907) - ..add(908) - ..add(909) - ..add(910) - ..add(911) - ..add(912) - ..add(913) - ..add(914) - ..add(915) - ..add(916) - ..add(917) - ..add(918) - ..add(919) - ..add(920) - ..add(921) - ..add(922) - ..add(923) - ..add(924) - ..add(925) - ..add(926) - ..add(927) - ..add(928) - ..add(929) - ..add(930) - ..add(931) - ..add(932) - ..add(933) - ..add(934) - ..add(935) - ..add(936) - ..add(937) - ..add(938) - ..add(939) - ..add(940) - ..add(941) - ..add(942) - ..add(943) - ..add(944) - ..add(945) - ..add(946) - ..add(947) - ..add(948) - ..add(949) - ..add(950) - ..add(951) - ..add(952) - ..add(953) - ..add(954) - ..add(955) - ..add(956) - ..add(957) - ..add(958) - ..add(959) - ..add(960) - ..add(961) - ..add(962) - ..add(963) - ..add(964) - ..add(965) - ..add(966) - ..add(967) - ..add(968) - ..add(969) - ..add(970) - ..add(971) - ..add(972) - ..add(973) - ..add(974) - ..add(975) - ..add(976) - ..add(977) - ..add(978) - ..add(979) - ..add(980) - ..add(981) - ..add(982) - ..add(983) - ..add(984) - ..add(985) - ..add(986) - ..add(987) - ..add(988) - ..add(989) - ..add(990) - ..add(991) - ..add(992) - ..add(993) - ..add(994) - ..add(995) - ..add(996) - ..add(997) - ..add(998) - ..add(999) - ..add(1000) - ..add(1001) - ..add(1002) - ..add(1003) - ..add(1004) - ..add(1005) - ..add(1006) - ..add(1007) - ..add(1008) - ..add(1009) - ..add(1010) - ..add(1011) - ..add(1012) - ..add(1013) - ..add(1014) - ..add(1015) - ..add(1016) - ..add(1017) - ..add(1018) - ..add(1019) - ..add(1020) - ..add(1021) - ..add(1022) - ..add(1023) - ..add(1024) - ..add(1025) - ..add(1026) - ..add(1027) - ..add(1028) - ..add(1029) - ..add(1030) - ..add(1031) - ..add(1032) - ..add(1033) - ..add(1034) - ..add(1035) - ..add(1036) - ..add(1037) - ..add(1038) - ..add(1039) - ..add(1040) - ..add(1041) - ..add(1042) - ..add(1043) - ..add(1044) - ..add(1045) - ..add(1046) - ..add(1047) - ..add(1048) - ..add(1049) - ..add(1050) - ..add(1051) - ..add(1052) - ..add(1053) - ..add(1054) - ..add(1055) - ..add(1056) - ..add(1057) - ..add(1058) - ..add(1059) - ..add(1060) - ..add(1061) - ..add(1062) - ..add(1063) - ..add(1064) - ..add(1065) - ..add(1066) - ..add(1067) - ..add(1068) - ..add(1069) - ..add(1070) - ..add(1071) - ..add(1072) - ..add(1073) - ..add(1074) - ..add(1075) - ..add(1076) - ..add(1077) - ..add(1078) - ..add(1079) - ..add(1080) - ..add(1081) - ..add(1082) - ..add(1083) - ..add(1084) - ..add(1085) - ..add(1086) - ..add(1087) - ..add(1088) - ..add(1089) - ..add(1090) - ..add(1091) - ..add(1092) - ..add(1093) - ..add(1094) - ..add(1095) - ..add(1096) - ..add(1097) - ..add(1098) - ..add(1099) - ..add(1100) - ..add(1101) - ..add(1102) - ..add(1103) - ..add(1104) - ..add(1105) - ..add(1106) - ..add(1107) - ..add(1108) - ..add(1109) - ..add(1110) - ..add(1111) - ..add(1112) - ..add(1113) - ..add(1114) - ..add(1115) - ..add(1116) - ..add(1117) - ..add(1118) - ..add(1119) - ..add(1120) - ..add(1121) - ..add(1122) - ..add(1123) - ..add(1124) - ..add(1125) - ..add(1126) - ..add(1127) - ..add(1128) - ..add(1129) - ..add(1130) - ..add(1131) - ..add(1132) - ..add(1133) - ..add(1134) - ..add(1135) - ..add(1136) - ..add(1137) - ..add(1138) - ..add(1139) - ..add(1140) - ..add(1141) - ..add(1142) - ..add(1143) - ..add(1144) - ..add(1145) - ..add(1146) - ..add(1147) - ..add(1148) - ..add(1149) - ..add(1150) - ..add(1151) - ..add(1152) - ..add(1153) - ..add(1154) - ..add(1155) - ..add(1156) - ..add(1157) - ..add(1158) - ..add(1159) - ..add(1160) - ..add(1161) - ..add(1162) - ..add(1163) - ..add(1164) - ..add(1165) - ..add(1166) - ..add(1167) - ..add(1168) - ..add(1169) - ..add(1170) - ..add(1171) - ..add(1172) - ..add(1173) - ..add(1174) - ..add(1175) - ..add(1176) - ..add(1177) - ..add(1178) - ..add(1179) - ..add(1180) - ..add(1181) - ..add(1182) - ..add(1183) - ..add(1184) - ..add(1185) - ..add(1186) - ..add(1187) - ..add(1188) - ..add(1189) - ..add(1190) - ..add(1191) - ..add(1192) - ..add(1193) - ..add(1194) - ..add(1195) - ..add(1196) - ..add(1197) - ..add(1198) - ..add(1199) - ..add(1200) - ..add(1201) - ..add(1202) - ..add(1203) - ..add(1204) - ..add(1205) - ..add(1206) - ..add(1207) - ..add(1208) - ..add(1209) - ..add(1210) - ..add(1211) - ..add(1212) - ..add(1213) - ..add(1214) - ..add(1215) - ..add(1216) - ..add(1217) - ..add(1218) - ..add(1219) - ..add(1220) - ..add(1221) - ..add(1222) - ..add(1223) - ..add(1224) - ..add(1225) - ..add(1226) - ..add(1227) - ..add(1228) - ..add(1229) - ..add(1230) - ..add(1231) - ..add(1232) - ..add(1233) - ..add(1234) - ..add(1235) - ..add(1236) - ..add(1237) - ..add(1238) - ..add(1239) - ..add(1240) - ..add(1241) - ..add(1242) - ..add(1243) - ..add(1244) - ..add(1245) - ..add(1246) - ..add(1247) - ..add(1248) - ..add(1249) - ..add(1250) - ..add(1251) - ..add(1252) - ..add(1253) - ..add(1254) - ..add(1255) - ..add(1256) - ..add(1257) - ..add(1258) - ..add(1259) - ..add(1260) - ..add(1261) - ..add(1262) - ..add(1263) - ..add(1264) - ..add(1265) - ..add(1266) - ..add(1267) - ..add(1268) - ..add(1269) - ..add(1270) - ..add(1271) - ..add(1272) - ..add(1273) - ..add(1274) - ..add(1275) - ..add(1276) - ..add(1277) - ..add(1278) - ..add(1279) - ..add(1280) - ..add(1281) - ..add(1282) - ..add(1283) - ..add(1284) - ..add(1285) - ..add(1286) - ..add(1287) - ..add(1288) - ..add(1289) - ..add(1290) - ..add(1291) - ..add(1292) - ..add(1293) - ..add(1294) - ..add(1295) - ..add(1296) - ..add(1297) - ..add(1298) - ..add(1299) - ..add(1300) - ..add(1301) - ..add(1302) - ..add(1303) - ..add(1304) - ..add(1305) - ..add(1306) - ..add(1307) - ..add(1308) - ..add(1309) - ..add(1310) - ..add(1311) - ..add(1312) - ..add(1313) - ..add(1314) - ..add(1315) - ..add(1316) - ..add(1317) - ..add(1318) - ..add(1319) - ..add(1320) - ..add(1321) - ..add(1322) - ..add(1323) - ..add(1324) - ..add(1325) - ..add(1326) - ..add(1327) - ..add(1328) - ..add(1329) - ..add(1330) - ..add(1331) - ..add(1332) - ..add(1333) - ..add(1334) - ..add(1335) - ..add(1336) - ..add(1337) - ..add(1338) - ..add(1339) - ..add(1340) - ..add(1341) - ..add(1342) - ..add(1343) - ..add(1344) - ..add(1345) - ..add(1346) - ..add(1347) - ..add(1348) - ..add(1349) - ..add(1350) - ..add(1351) - ..add(1352) - ..add(1353) - ..add(1354) - ..add(1355) - ..add(1356) - ..add(1357) - ..add(1358) - ..add(1359) - ..add(1360) - ..add(1361) - ..add(1362) - ..add(1363) - ..add(1364) - ..add(1365) - ..add(1366) - ..add(1367) - ..add(1368) - ..add(1369) - ..add(1370) - ..add(1371) - ..add(1372) - ..add(1373) - ..add(1374) - ..add(1375) - ..add(1376) - ..add(1377) - ..add(1378) - ..add(1379) - ..add(1380) - ..add(1381) - ..add(1382) - ..add(1383) - ..add(1384) - ..add(1385) - ..add(1386) - ..add(1387) - ..add(1388) - ..add(1389) - ..add(1390) - ..add(1391) - ..add(1392) - ..add(1393) - ..add(1394) - ..add(1395) - ..add(1396) - ..add(1397) - ..add(1398) - ..add(1399) - ..add(1400) - ..add(1401) - ..add(1402) - ..add(1403) - ..add(1404) - ..add(1405) - ..add(1406) - ..add(1407) - ..add(1408) - ..add(1409) - ..add(1410) - ..add(1411) - ..add(1412) - ..add(1413) - ..add(1414) - ..add(1415) - ..add(1416) - ..add(1417) - ..add(1418) - ..add(1419) - ..add(1420) - ..add(1421) - ..add(1422) - ..add(1423) - ..add(1424) - ..add(1425) - ..add(1426) - ..add(1427) - ..add(1428) - ..add(1429) - ..add(1430) - ..add(1431) - ..add(1432) - ..add(1433) - ..add(1434) - ..add(1435) - ..add(1436) - ..add(1437) - ..add(1438) - ..add(1439) - ..add(1440) - ..add(1441) - ..add(1442) - ..add(1443) - ..add(1444) - ..add(1445) - ..add(1446) - ..add(1447) - ..add(1448) - ..add(1449) - ..add(1450) - ..add(1451) - ..add(1452) - ..add(1453) - ..add(1454) - ..add(1455) - ..add(1456) - ..add(1457) - ..add(1458) - ..add(1459) - ..add(1460) - ..add(1461) - ..add(1462) - ..add(1463) - ..add(1464) - ..add(1465) - ..add(1466) - ..add(1467) - ..add(1468) - ..add(1469) - ..add(1470) - ..add(1471) - ..add(1472) - ..add(1473) - ..add(1474) - ..add(1475) - ..add(1476) - ..add(1477) - ..add(1478) - ..add(1479) - ..add(1480) - ..add(1481) - ..add(1482) - ..add(1483) - ..add(1484) - ..add(1485) - ..add(1486) - ..add(1487) - ..add(1488) - ..add(1489) - ..add(1490) - ..add(1491) - ..add(1492) - ..add(1493) - ..add(1494) - ..add(1495) - ..add(1496) - ..add(1497) - ..add(1498) - ..add(1499) - ..add(1500) - ..add(1501) - ..add(1502) - ..add(1503) - ..add(1504) - ..add(1505) - ..add(1506) - ..add(1507) - ..add(1508) - ..add(1509) - ..add(1510) - ..add(1511) - ..add(1512) - ..add(1513) - ..add(1514) - ..add(1515) - ..add(1516) - ..add(1517) - ..add(1518) - ..add(1519) - ..add(1520) - ..add(1521) - ..add(1522) - ..add(1523) - ..add(1524) - ..add(1525) - ..add(1526) - ..add(1527) - ..add(1528) - ..add(1529) - ..add(1530) - ..add(1531) - ..add(1532) - ..add(1533) - ..add(1534) - ..add(1535) - ..add(1536) - ..add(1537) - ..add(1538) - ..add(1539) - ..add(1540) - ..add(1541) - ..add(1542) - ..add(1543) - ..add(1544) - ..add(1545) - ..add(1546) - ..add(1547) - ..add(1548) - ..add(1549) - ..add(1550) - ..add(1551) - ..add(1552) - ..add(1553) - ..add(1554) - ..add(1555) - ..add(1556) - ..add(1557) - ..add(1558) - ..add(1559) - ..add(1560) - ..add(1561) - ..add(1562) - ..add(1563) - ..add(1564) - ..add(1565) - ..add(1566) - ..add(1567) - ..add(1568) - ..add(1569) - ..add(1570) - ..add(1571) - ..add(1572) - ..add(1573) - ..add(1574) - ..add(1575) - ..add(1576) - ..add(1577) - ..add(1578) - ..add(1579) - ..add(1580) - ..add(1581) - ..add(1582) - ..add(1583) - ..add(1584) - ..add(1585) - ..add(1586) - ..add(1587) - ..add(1588) - ..add(1589) - ..add(1590) - ..add(1591) - ..add(1592) - ..add(1593) - ..add(1594) - ..add(1595) - ..add(1596) - ..add(1597) - ..add(1598) - ..add(1599) - ..add(1600) - ..add(1601) - ..add(1602) - ..add(1603) - ..add(1604) - ..add(1605) - ..add(1606) - ..add(1607) - ..add(1608) - ..add(1609) - ..add(1610) - ..add(1611) - ..add(1612) - ..add(1613) - ..add(1614) - ..add(1615) - ..add(1616) - ..add(1617) - ..add(1618) - ..add(1619) - ..add(1620) - ..add(1621) - ..add(1622) - ..add(1623) - ..add(1624) - ..add(1625) - ..add(1626) - ..add(1627) - ..add(1628) - ..add(1629) - ..add(1630) - ..add(1631) - ..add(1632) - ..add(1633) - ..add(1634) - ..add(1635) - ..add(1636) - ..add(1637) - ..add(1638) - ..add(1639) - ..add(1640) - ..add(1641) - ..add(1642) - ..add(1643) - ..add(1644) - ..add(1645) - ..add(1646) - ..add(1647) - ..add(1648) - ..add(1649) - ..add(1650) - ..add(1651) - ..add(1652) - ..add(1653) - ..add(1654) - ..add(1655) - ..add(1656) - ..add(1657) - ..add(1658) - ..add(1659) - ..add(1660) - ..add(1661) - ..add(1662) - ..add(1663) - ..add(1664) - ..add(1665) - ..add(1666) - ..add(1667) - ..add(1668) - ..add(1669) - ..add(1670) - ..add(1671) - ..add(1672) - ..add(1673) - ..add(1674) - ..add(1675) - ..add(1676) - ..add(1677) - ..add(1678) - ..add(1679) - ..add(1680) - ..add(1681) - ..add(1682) - ..add(1683) - ..add(1684) - ..add(1685) - ..add(1686) - ..add(1687) - ..add(1688) - ..add(1689) - ..add(1690) - ..add(1691) - ..add(1692) - ..add(1693) - ..add(1694) - ..add(1695) - ..add(1696) - ..add(1697) - ..add(1698) - ..add(1699) - ..add(1700) - ..add(1701) - ..add(1702) - ..add(1703) - ..add(1704) - ..add(1705) - ..add(1706) - ..add(1707) - ..add(1708) - ..add(1709) - ..add(1710) - ..add(1711) - ..add(1712) - ..add(1713) - ..add(1714) - ..add(1715) - ..add(1716) - ..add(1717) - ..add(1718) - ..add(1719) - ..add(1720) - ..add(1721) - ..add(1722) - ..add(1723) - ..add(1724) - ..add(1725) - ..add(1726) - ..add(1727) - ..add(1728) - ..add(1729) - ..add(1730) - ..add(1731) - ..add(1732) - ..add(1733) - ..add(1734) - ..add(1735) - ..add(1736) - ..add(1737) - ..add(1738) - ..add(1739) - ..add(1740) - ..add(1741) - ..add(1742) - ..add(1743) - ..add(1744) - ..add(1745) - ..add(1746) - ..add(1747) - ..add(1748) - ..add(1749) - ..add(1750) - ..add(1751) - ..add(1752) - ..add(1753) - ..add(1754) - ..add(1755) - ..add(1756) - ..add(1757) - ..add(1758) - ..add(1759) - ..add(1760) - ..add(1761) - ..add(1762) - ..add(1763) - ..add(1764) - ..add(1765) - ..add(1766) - ..add(1767) - ..add(1768) - ..add(1769) - ..add(1770) - ..add(1771) - ..add(1772) - ..add(1773) - ..add(1774) - ..add(1775) - ..add(1776) - ..add(1777) - ..add(1778) - ..add(1779) - ..add(1780) - ..add(1781) - ..add(1782) - ..add(1783) - ..add(1784) - ..add(1785) - ..add(1786) - ..add(1787) - ..add(1788) - ..add(1789) - ..add(1790) - ..add(1791) - ..add(1792) - ..add(1793) - ..add(1794) - ..add(1795) - ..add(1796) - ..add(1797) - ..add(1798) - ..add(1799) - ..add(1800) - ..add(1801) - ..add(1802) - ..add(1803) - ..add(1804) - ..add(1805) - ..add(1806) - ..add(1807) - ..add(1808) - ..add(1809) - ..add(1810) - ..add(1811) - ..add(1812) - ..add(1813) - ..add(1814) - ..add(1815) - ..add(1816) - ..add(1817) - ..add(1818) - ..add(1819) - ..add(1820) - ..add(1821) - ..add(1822) - ..add(1823) - ..add(1824) - ..add(1825) - ..add(1826) - ..add(1827) - ..add(1828) - ..add(1829) - ..add(1830) - ..add(1831) - ..add(1832) - ..add(1833) - ..add(1834) - ..add(1835) - ..add(1836) - ..add(1837) - ..add(1838) - ..add(1839) - ..add(1840) - ..add(1841) - ..add(1842) - ..add(1843) - ..add(1844) - ..add(1845) - ..add(1846) - ..add(1847) - ..add(1848) - ..add(1849) - ..add(1850) - ..add(1851) - ..add(1852) - ..add(1853) - ..add(1854) - ..add(1855) - ..add(1856) - ..add(1857) - ..add(1858) - ..add(1859) - ..add(1860) - ..add(1861) - ..add(1862) - ..add(1863) - ..add(1864) - ..add(1865) - ..add(1866) - ..add(1867) - ..add(1868) - ..add(1869) - ..add(1870) - ..add(1871) - ..add(1872) - ..add(1873) - ..add(1874) - ..add(1875) - ..add(1876) - ..add(1877) - ..add(1878) - ..add(1879) - ..add(1880) - ..add(1881) - ..add(1882) - ..add(1883) - ..add(1884) - ..add(1885) - ..add(1886) - ..add(1887) - ..add(1888) - ..add(1889) - ..add(1890) - ..add(1891) - ..add(1892) - ..add(1893) - ..add(1894) - ..add(1895) - ..add(1896) - ..add(1897) - ..add(1898) - ..add(1899) - ..add(1900) - ..add(1901) - ..add(1902) - ..add(1903) - ..add(1904) - ..add(1905) - ..add(1906) - ..add(1907) - ..add(1908) - ..add(1909) - ..add(1910) - ..add(1911) - ..add(1912) - ..add(1913) - ..add(1914) - ..add(1915) - ..add(1916) - ..add(1917) - ..add(1918) - ..add(1919) - ..add(1920) - ..add(1921) - ..add(1922) - ..add(1923) - ..add(1924) - ..add(1925) - ..add(1926) - ..add(1927) - ..add(1928) - ..add(1929) - ..add(1930) - ..add(1931) - ..add(1932) - ..add(1933) - ..add(1934) - ..add(1935) - ..add(1936) - ..add(1937) - ..add(1938) - ..add(1939) - ..add(1940) - ..add(1941) - ..add(1942) - ..add(1943) - ..add(1944) - ..add(1945) - ..add(1946) - ..add(1947) - ..add(1948) - ..add(1949) - ..add(1950) - ..add(1951) - ..add(1952) - ..add(1953) - ..add(1954) - ..add(1955) - ..add(1956) - ..add(1957) - ..add(1958) - ..add(1959) - ..add(1960) - ..add(1961) - ..add(1962) - ..add(1963) - ..add(1964) - ..add(1965) - ..add(1966) - ..add(1967) - ..add(1968) - ..add(1969) - ..add(1970) - ..add(1971) - ..add(1972) - ..add(1973) - ..add(1974) - ..add(1975) - ..add(1976) - ..add(1977) - ..add(1978) - ..add(1979) - ..add(1980) - ..add(1981) - ..add(1982) - ..add(1983) - ..add(1984) - ..add(1985) - ..add(1986) - ..add(1987) - ..add(1988) - ..add(1989) - ..add(1990) - ..add(1991) - ..add(1992) - ..add(1993) - ..add(1994) - ..add(1995) - ..add(1996) - ..add(1997) - ..add(1998) - ..add(1999) - ..add(2000) - ..add(2001) - ..add(2002) - ..add(2003) - ..add(2004) - ..add(2005) - ..add(2006) - ..add(2007) - ..add(2008) - ..add(2009) - ..add(2010) - ..add(2011) - ..add(2012) - ..add(2013) - ..add(2014) - ..add(2015) - ..add(2016) - ..add(2017) - ..add(2018) - ..add(2019) - ..add(2020) - ..add(2021) - ..add(2022) - ..add(2023) - ..add(2024) - ..add(2025) - ..add(2026) - ..add(2027) - ..add(2028) - ..add(2029) - ..add(2030) - ..add(2031) - ..add(2032) - ..add(2033) - ..add(2034) - ..add(2035) - ..add(2036) - ..add(2037) - ..add(2038) - ..add(2039) - ..add(2040) - ..add(2041) - ..add(2042) - ..add(2043) - ..add(2044) - ..add(2045) - ..add(2046) - ..add(2047) - ..add(2048) - ..add(2049) - ..add(2050) - ..add(2051) - ..add(2052) - ..add(2053) - ..add(2054) - ..add(2055) - ..add(2056) - ..add(2057) - ..add(2058) - ..add(2059) - ..add(2060) - ..add(2061) - ..add(2062) - ..add(2063) - ..add(2064) - ..add(2065) - ..add(2066) - ..add(2067) - ..add(2068) - ..add(2069) - ..add(2070) - ..add(2071) - ..add(2072) - ..add(2073) - ..add(2074) - ..add(2075) - ..add(2076) - ..add(2077) - ..add(2078) - ..add(2079) - ..add(2080) - ..add(2081) - ..add(2082) - ..add(2083) - ..add(2084) - ..add(2085) - ..add(2086) - ..add(2087) - ..add(2088) - ..add(2089) - ..add(2090) - ..add(2091) - ..add(2092) - ..add(2093) - ..add(2094) - ..add(2095) - ..add(2096) - ..add(2097) - ..add(2098) - ..add(2099) - ..add(2100) - ..add(2101) - ..add(2102) - ..add(2103) - ..add(2104) - ..add(2105) - ..add(2106) - ..add(2107) - ..add(2108) - ..add(2109) - ..add(2110) - ..add(2111) - ..add(2112) - ..add(2113) - ..add(2114) - ..add(2115) - ..add(2116) - ..add(2117) - ..add(2118) - ..add(2119) - ..add(2120) - ..add(2121) - ..add(2122) - ..add(2123) - ..add(2124) - ..add(2125) - ..add(2126) - ..add(2127) - ..add(2128) - ..add(2129) - ..add(2130) - ..add(2131) - ..add(2132) - ..add(2133) - ..add(2134) - ..add(2135) - ..add(2136) - ..add(2137) - ..add(2138) - ..add(2139) - ..add(2140) - ..add(2141) - ..add(2142) - ..add(2143) - ..add(2144) - ..add(2145) - ..add(2146) - ..add(2147) - ..add(2148) - ..add(2149) - ..add(2150) - ..add(2151) - ..add(2152) - ..add(2153) - ..add(2154) - ..add(2155) - ..add(2156) - ..add(2157) - ..add(2158) - ..add(2159) - ..add(2160) - ..add(2161) - ..add(2162) - ..add(2163) - ..add(2164) - ..add(2165) - ..add(2166) - ..add(2167) - ..add(2168) - ..add(2169) - ..add(2170) - ..add(2171) - ..add(2172) - ..add(2173) - ..add(2174) - ..add(2175) - ..add(2176) - ..add(2177) - ..add(2178) - ..add(2179) - ..add(2180) - ..add(2181) - ..add(2182) - ..add(2183) - ..add(2184) - ..add(2185) - ..add(2186) - ..add(2187) - ..add(2188) - ..add(2189) - ..add(2190) - ..add(2191) - ..add(2192) - ..add(2193) - ..add(2194) - ..add(2195) - ..add(2196) - ..add(2197) - ..add(2198) - ..add(2199) - ..add(2200) - ..add(2201) - ..add(2202) - ..add(2203) - ..add(2204) - ..add(2205) - ..add(2206) - ..add(2207) - ..add(2208) - ..add(2209) - ..add(2210) - ..add(2211) - ..add(2212) - ..add(2213) - ..add(2214) - ..add(2215) - ..add(2216) - ..add(2217) - ..add(2218) - ..add(2219) - ..add(2220) - ..add(2221) - ..add(2222) - ..add(2223) - ..add(2224) - ..add(2225) - ..add(2226) - ..add(2227) - ..add(2228) - ..add(2229) - ..add(2230) - ..add(2231) - ..add(2232) - ..add(2233) - ..add(2234) - ..add(2235) - ..add(2236) - ..add(2237) - ..add(2238) - ..add(2239) - ..add(2240) - ..add(2241) - ..add(2242) - ..add(2243) - ..add(2244) - ..add(2245) - ..add(2246) - ..add(2247) - ..add(2248) - ..add(2249) - ..add(2250) - ..add(2251) - ..add(2252) - ..add(2253) - ..add(2254) - ..add(2255) - ..add(2256) - ..add(2257) - ..add(2258) - ..add(2259) - ..add(2260) - ..add(2261) - ..add(2262) - ..add(2263) - ..add(2264) - ..add(2265) - ..add(2266) - ..add(2267) - ..add(2268) - ..add(2269) - ..add(2270) - ..add(2271) - ..add(2272) - ..add(2273) - ..add(2274) - ..add(2275) - ..add(2276) - ..add(2277) - ..add(2278) - ..add(2279) - ..add(2280) - ..add(2281) - ..add(2282) - ..add(2283) - ..add(2284) - ..add(2285) - ..add(2286) - ..add(2287) - ..add(2288) - ..add(2289) - ..add(2290) - ..add(2291) - ..add(2292) - ..add(2293) - ..add(2294) - ..add(2295) - ..add(2296) - ..add(2297) - ..add(2298) - ..add(2299) - ..add(2300) - ..add(2301) - ..add(2302) - ..add(2303) - ..add(2304) - ..add(2305) - ..add(2306) - ..add(2307) - ..add(2308) - ..add(2309) - ..add(2310) - ..add(2311) - ..add(2312) - ..add(2313) - ..add(2314) - ..add(2315) - ..add(2316) - ..add(2317) - ..add(2318) - ..add(2319) - ..add(2320) - ..add(2321) - ..add(2322) - ..add(2323) - ..add(2324) - ..add(2325) - ..add(2326) - ..add(2327) - ..add(2328) - ..add(2329) - ..add(2330) - ..add(2331) - ..add(2332) - ..add(2333) - ..add(2334) - ..add(2335) - ..add(2336) - ..add(2337) - ..add(2338) - ..add(2339) - ..add(2340) - ..add(2341) - ..add(2342) - ..add(2343) - ..add(2344) - ..add(2345) - ..add(2346) - ..add(2347) - ..add(2348) - ..add(2349) - ..add(2350) - ..add(2351) - ..add(2352) - ..add(2353) - ..add(2354) - ..add(2355) - ..add(2356) - ..add(2357) - ..add(2358) - ..add(2359) - ..add(2360) - ..add(2361) - ..add(2362) - ..add(2363) - ..add(2364) - ..add(2365) - ..add(2366) - ..add(2367) - ..add(2368) - ..add(2369) - ..add(2370) - ..add(2371) - ..add(2372) - ..add(2373) - ..add(2374) - ..add(2375) - ..add(2376) - ..add(2377) - ..add(2378) - ..add(2379) - ..add(2380) - ..add(2381) - ..add(2382) - ..add(2383) - ..add(2384) - ..add(2385) - ..add(2386) - ..add(2387) - ..add(2388) - ..add(2389) - ..add(2390) - ..add(2391) - ..add(2392) - ..add(2393) - ..add(2394) - ..add(2395) - ..add(2396) - ..add(2397) - ..add(2398) - ..add(2399) - ..add(2400) - ..add(2401) - ..add(2402) - ..add(2403) - ..add(2404) - ..add(2405) - ..add(2406) - ..add(2407) - ..add(2408) - ..add(2409) - ..add(2410) - ..add(2411) - ..add(2412) - ..add(2413) - ..add(2414) - ..add(2415) - ..add(2416) - ..add(2417) - ..add(2418) - ..add(2419) - ..add(2420) - ..add(2421) - ..add(2422) - ..add(2423) - ..add(2424) - ..add(2425) - ..add(2426) - ..add(2427) - ..add(2428) - ..add(2429) - ..add(2430) - ..add(2431) - ..add(2432) - ..add(2433) - ..add(2434) - ..add(2435) - ..add(2436) - ..add(2437) - ..add(2438) - ..add(2439) - ..add(2440) - ..add(2441) - ..add(2442) - ..add(2443) - ..add(2444) - ..add(2445) - ..add(2446) - ..add(2447) - ..add(2448) - ..add(2449) - ..add(2450) - ..add(2451) - ..add(2452) - ..add(2453) - ..add(2454) - ..add(2455) - ..add(2456) - ..add(2457) - ..add(2458) - ..add(2459) - ..add(2460) - ..add(2461) - ..add(2462) - ..add(2463) - ..add(2464) - ..add(2465) - ..add(2466) - ..add(2467) - ..add(2468) - ..add(2469) - ..add(2470) - ..add(2471) - ..add(2472) - ..add(2473) - ..add(2474) - ..add(2475) - ..add(2476) - ..add(2477) - ..add(2478) - ..add(2479) - ..add(2480) - ..add(2481) - ..add(2482) - ..add(2483) - ..add(2484) - ..add(2485) - ..add(2486) - ..add(2487) - ..add(2488) - ..add(2489) - ..add(2490) - ..add(2491) - ..add(2492) - ..add(2493) - ..add(2494) - ..add(2495) - ..add(2496) - ..add(2497) - ..add(2498) - ..add(2499) - ..add(2500) - ..add(2501) - ..add(2502) - ..add(2503) - ..add(2504) - ..add(2505) - ..add(2506) - ..add(2507) - ..add(2508) - ..add(2509) - ..add(2510) - ..add(2511) - ..add(2512) - ..add(2513) - ..add(2514) - ..add(2515) - ..add(2516) - ..add(2517) - ..add(2518) - ..add(2519) - ..add(2520) - ..add(2521) - ..add(2522) - ..add(2523) - ..add(2524) - ..add(2525) - ..add(2526) - ..add(2527) - ..add(2528) - ..add(2529) - ..add(2530) - ..add(2531) - ..add(2532) - ..add(2533) - ..add(2534) - ..add(2535) - ..add(2536) - ..add(2537) - ..add(2538) - ..add(2539) - ..add(2540) - ..add(2541) - ..add(2542) - ..add(2543) - ..add(2544) - ..add(2545) - ..add(2546) - ..add(2547) - ..add(2548) - ..add(2549) - ..add(2550) - ..add(2551) - ..add(2552) - ..add(2553) - ..add(2554) - ..add(2555) - ..add(2556) - ..add(2557) - ..add(2558) - ..add(2559) - ..add(2560) - ..add(2561) - ..add(2562) - ..add(2563) - ..add(2564) - ..add(2565) - ..add(2566) - ..add(2567) - ..add(2568) - ..add(2569) - ..add(2570) - ..add(2571) - ..add(2572) - ..add(2573) - ..add(2574) - ..add(2575) - ..add(2576) - ..add(2577) - ..add(2578) - ..add(2579) - ..add(2580) - ..add(2581) - ..add(2582) - ..add(2583) - ..add(2584) - ..add(2585) - ..add(2586) - ..add(2587) - ..add(2588) - ..add(2589) - ..add(2590) - ..add(2591) - ..add(2592) - ..add(2593) - ..add(2594) - ..add(2595) - ..add(2596) - ..add(2597) - ..add(2598) - ..add(2599) - ..add(2600) - ..add(2601) - ..add(2602) - ..add(2603) - ..add(2604) - ..add(2605) - ..add(2606) - ..add(2607) - ..add(2608) - ..add(2609) - ..add(2610) - ..add(2611) - ..add(2612) - ..add(2613) - ..add(2614) - ..add(2615) - ..add(2616) - ..add(2617) - ..add(2618) - ..add(2619) - ..add(2620) - ..add(2621) - ..add(2622) - ..add(2623) - ..add(2624) - ..add(2625) - ..add(2626) - ..add(2627) - ..add(2628) - ..add(2629) - ..add(2630) - ..add(2631) - ..add(2632) - ..add(2633) - ..add(2634) - ..add(2635) - ..add(2636) - ..add(2637) - ..add(2638) - ..add(2639) - ..add(2640) - ..add(2641) - ..add(2642) - ..add(2643) - ..add(2644) - ..add(2645) - ..add(2646) - ..add(2647) - ..add(2648) - ..add(2649) - ..add(2650) - ..add(2651) - ..add(2652) - ..add(2653) - ..add(2654) - ..add(2655) - ..add(2656) - ..add(2657) - ..add(2658) - ..add(2659) - ..add(2660) - ..add(2661) - ..add(2662) - ..add(2663) - ..add(2664) - ..add(2665) - ..add(2666) - ..add(2667) - ..add(2668) - ..add(2669) - ..add(2670) - ..add(2671) - ..add(2672) - ..add(2673) - ..add(2674) - ..add(2675) - ..add(2676) - ..add(2677) - ..add(2678) - ..add(2679) - ..add(2680) - ..add(2681) - ..add(2682) - ..add(2683) - ..add(2684) - ..add(2685) - ..add(2686) - ..add(2687) - ..add(2688) - ..add(2689) - ..add(2690) - ..add(2691) - ..add(2692) - ..add(2693) - ..add(2694) - ..add(2695) - ..add(2696) - ..add(2697) - ..add(2698) - ..add(2699) - ..add(2700) - ..add(2701) - ..add(2702) - ..add(2703) - ..add(2704) - ..add(2705) - ..add(2706) - ..add(2707) - ..add(2708) - ..add(2709) - ..add(2710) - ..add(2711) - ..add(2712) - ..add(2713) - ..add(2714) - ..add(2715) - ..add(2716) - ..add(2717) - ..add(2718) - ..add(2719) - ..add(2720) - ..add(2721) - ..add(2722) - ..add(2723) - ..add(2724) - ..add(2725) - ..add(2726) - ..add(2727) - ..add(2728) - ..add(2729) - ..add(2730) - ..add(2731) - ..add(2732) - ..add(2733) - ..add(2734) - ..add(2735) - ..add(2736) - ..add(2737) - ..add(2738) - ..add(2739) - ..add(2740) - ..add(2741) - ..add(2742) - ..add(2743) - ..add(2744) - ..add(2745) - ..add(2746) - ..add(2747) - ..add(2748) - ..add(2749) - ..add(2750) - ..add(2751) - ..add(2752) - ..add(2753) - ..add(2754) - ..add(2755) - ..add(2756) - ..add(2757) - ..add(2758) - ..add(2759) - ..add(2760) - ..add(2761) - ..add(2762) - ..add(2763) - ..add(2764) - ..add(2765) - ..add(2766) - ..add(2767) - ..add(2768) - ..add(2769) - ..add(2770) - ..add(2771) - ..add(2772) - ..add(2773) - ..add(2774) - ..add(2775) - ..add(2776) - ..add(2777) - ..add(2778) - ..add(2779) - ..add(2780) - ..add(2781) - ..add(2782) - ..add(2783) - ..add(2784) - ..add(2785) - ..add(2786) - ..add(2787) - ..add(2788) - ..add(2789) - ..add(2790) - ..add(2791) - ..add(2792) - ..add(2793) - ..add(2794) - ..add(2795) - ..add(2796) - ..add(2797) - ..add(2798) - ..add(2799) - ..add(2800) - ..add(2801) - ..add(2802) - ..add(2803) - ..add(2804) - ..add(2805) - ..add(2806) - ..add(2807) - ..add(2808) - ..add(2809) - ..add(2810) - ..add(2811) - ..add(2812) - ..add(2813) - ..add(2814) - ..add(2815) - ..add(2816) - ..add(2817) - ..add(2818) - ..add(2819) - ..add(2820) - ..add(2821) - ..add(2822) - ..add(2823) - ..add(2824) - ..add(2825) - ..add(2826) - ..add(2827) - ..add(2828) - ..add(2829) - ..add(2830) - ..add(2831) - ..add(2832) - ..add(2833) - ..add(2834) - ..add(2835) - ..add(2836) - ..add(2837) - ..add(2838) - ..add(2839) - ..add(2840) - ..add(2841) - ..add(2842) - ..add(2843) - ..add(2844) - ..add(2845) - ..add(2846) - ..add(2847) - ..add(2848) - ..add(2849) - ..add(2850) - ..add(2851) - ..add(2852) - ..add(2853) - ..add(2854) - ..add(2855) - ..add(2856) - ..add(2857) - ..add(2858) - ..add(2859) - ..add(2860) - ..add(2861) - ..add(2862) - ..add(2863) - ..add(2864) - ..add(2865) - ..add(2866) - ..add(2867) - ..add(2868) - ..add(2869) - ..add(2870) - ..add(2871) - ..add(2872) - ..add(2873) - ..add(2874) - ..add(2875) - ..add(2876) - ..add(2877) - ..add(2878) - ..add(2879) - ..add(2880) - ..add(2881) - ..add(2882) - ..add(2883) - ..add(2884) - ..add(2885) - ..add(2886) - ..add(2887) - ..add(2888) - ..add(2889) - ..add(2890) - ..add(2891) - ..add(2892) - ..add(2893) - ..add(2894) - ..add(2895) - ..add(2896) - ..add(2897) - ..add(2898) - ..add(2899) - ..add(2900) - ..add(2901) - ..add(2902) - ..add(2903) - ..add(2904) - ..add(2905) - ..add(2906) - ..add(2907) - ..add(2908) - ..add(2909) - ..add(2910) - ..add(2911) - ..add(2912) - ..add(2913) - ..add(2914) - ..add(2915) - ..add(2916) - ..add(2917) - ..add(2918) - ..add(2919) - ..add(2920) - ..add(2921) - ..add(2922) - ..add(2923) - ..add(2924) - ..add(2925) - ..add(2926) - ..add(2927) - ..add(2928) - ..add(2929) - ..add(2930) - ..add(2931) - ..add(2932) - ..add(2933) - ..add(2934) - ..add(2935) - ..add(2936) - ..add(2937) - ..add(2938) - ..add(2939) - ..add(2940) - ..add(2941) - ..add(2942) - ..add(2943) - ..add(2944) - ..add(2945) - ..add(2946) - ..add(2947) - ..add(2948) - ..add(2949) - ..add(2950) - ..add(2951) - ..add(2952) - ..add(2953) - ..add(2954) - ..add(2955) - ..add(2956) - ..add(2957) - ..add(2958) - ..add(2959) - ..add(2960) - ..add(2961) - ..add(2962) - ..add(2963) - ..add(2964) - ..add(2965) - ..add(2966) - ..add(2967) - ..add(2968) - ..add(2969) - ..add(2970) - ..add(2971) - ..add(2972) - ..add(2973) - ..add(2974) - ..add(2975) - ..add(2976) - ..add(2977) - ..add(2978) - ..add(2979) - ..add(2980) - ..add(2981) - ..add(2982) - ..add(2983) - ..add(2984) - ..add(2985) - ..add(2986) - ..add(2987) - ..add(2988) - ..add(2989) - ..add(2990) - ..add(2991) - ..add(2992) - ..add(2993) - ..add(2994) - ..add(2995) - ..add(2996) - ..add(2997) - ..add(2998) - ..add(2999) - ..add(3000) - ..add(3001) - ..add(3002) - ..add(3003) - ..add(3004) - ..add(3005) - ..add(3006) - ..add(3007) - ..add(3008) - ..add(3009) - ..add(3010) - ..add(3011) - ..add(3012) - ..add(3013) - ..add(3014) - ..add(3015) - ..add(3016) - ..add(3017) - ..add(3018) - ..add(3019) - ..add(3020) - ..add(3021) - ..add(3022) - ..add(3023) - ..add(3024) - ..add(3025) - ..add(3026) - ..add(3027) - ..add(3028) - ..add(3029) - ..add(3030) - ..add(3031) - ..add(3032) - ..add(3033) - ..add(3034) - ..add(3035) - ..add(3036) - ..add(3037) - ..add(3038) - ..add(3039) - ..add(3040) - ..add(3041) - ..add(3042) - ..add(3043) - ..add(3044) - ..add(3045) - ..add(3046) - ..add(3047) - ..add(3048) - ..add(3049) - ..add(3050) - ..add(3051) - ..add(3052) - ..add(3053) - ..add(3054) - ..add(3055) - ..add(3056) - ..add(3057) - ..add(3058) - ..add(3059) - ..add(3060) - ..add(3061) - ..add(3062) - ..add(3063) - ..add(3064) - ..add(3065) - ..add(3066) - ..add(3067) - ..add(3068) - ..add(3069) - ..add(3070) - ..add(3071) - ..add(3072) - ..add(3073) - ..add(3074) - ..add(3075) - ..add(3076) - ..add(3077) - ..add(3078) - ..add(3079) - ..add(3080) - ..add(3081) - ..add(3082) - ..add(3083) - ..add(3084) - ..add(3085) - ..add(3086) - ..add(3087) - ..add(3088) - ..add(3089) - ..add(3090) - ..add(3091) - ..add(3092) - ..add(3093) - ..add(3094) - ..add(3095) - ..add(3096) - ..add(3097) - ..add(3098) - ..add(3099) - ..add(3100) - ..add(3101) - ..add(3102) - ..add(3103) - ..add(3104) - ..add(3105) - ..add(3106) - ..add(3107) - ..add(3108) - ..add(3109) - ..add(3110) - ..add(3111) - ..add(3112) - ..add(3113) - ..add(3114) - ..add(3115) - ..add(3116) - ..add(3117) - ..add(3118) - ..add(3119) - ..add(3120) - ..add(3121) - ..add(3122) - ..add(3123) - ..add(3124) - ..add(3125) - ..add(3126) - ..add(3127) - ..add(3128) - ..add(3129) - ..add(3130) - ..add(3131) - ..add(3132) - ..add(3133) - ..add(3134) - ..add(3135) - ..add(3136) - ..add(3137) - ..add(3138) - ..add(3139) - ..add(3140) - ..add(3141) - ..add(3142) - ..add(3143) - ..add(3144) - ..add(3145) - ..add(3146) - ..add(3147) - ..add(3148) - ..add(3149) - ..add(3150) - ..add(3151) - ..add(3152) - ..add(3153) - ..add(3154) - ..add(3155) - ..add(3156) - ..add(3157) - ..add(3158) - ..add(3159) - ..add(3160) - ..add(3161) - ..add(3162) - ..add(3163) - ..add(3164) - ..add(3165) - ..add(3166) - ..add(3167) - ..add(3168) - ..add(3169) - ..add(3170) - ..add(3171) - ..add(3172) - ..add(3173) - ..add(3174) - ..add(3175) - ..add(3176) - ..add(3177) - ..add(3178) - ..add(3179) - ..add(3180) - ..add(3181) - ..add(3182) - ..add(3183) - ..add(3184) - ..add(3185) - ..add(3186) - ..add(3187) - ..add(3188) - ..add(3189) - ..add(3190) - ..add(3191) - ..add(3192) - ..add(3193) - ..add(3194) - ..add(3195) - ..add(3196) - ..add(3197) - ..add(3198) - ..add(3199) - ..add(3200) - ..add(3201) - ..add(3202) - ..add(3203) - ..add(3204) - ..add(3205) - ..add(3206) - ..add(3207) - ..add(3208) - ..add(3209) - ..add(3210) - ..add(3211) - ..add(3212) - ..add(3213) - ..add(3214) - ..add(3215) - ..add(3216) - ..add(3217) - ..add(3218) - ..add(3219) - ..add(3220) - ..add(3221) - ..add(3222) - ..add(3223) - ..add(3224) - ..add(3225) - ..add(3226) - ..add(3227) - ..add(3228) - ..add(3229) - ..add(3230) - ..add(3231) - ..add(3232) - ..add(3233) - ..add(3234) - ..add(3235) - ..add(3236) - ..add(3237) - ..add(3238) - ..add(3239) - ..add(3240) - ..add(3241) - ..add(3242) - ..add(3243) - ..add(3244) - ..add(3245) - ..add(3246) - ..add(3247) - ..add(3248) - ..add(3249) - ..add(3250) - ..add(3251) - ..add(3252) - ..add(3253) - ..add(3254) - ..add(3255) - ..add(3256) - ..add(3257) - ..add(3258) - ..add(3259) - ..add(3260) - ..add(3261) - ..add(3262) - ..add(3263) - ..add(3264) - ..add(3265) - ..add(3266) - ..add(3267) - ..add(3268) - ..add(3269) - ..add(3270) - ..add(3271) - ..add(3272) - ..add(3273) - ..add(3274) - ..add(3275) - ..add(3276) - ..add(3277) - ..add(3278) - ..add(3279) - ..add(3280) - ..add(3281) - ..add(3282) - ..add(3283) - ..add(3284) - ..add(3285) - ..add(3286) - ..add(3287) - ..add(3288) - ..add(3289) - ..add(3290) - ..add(3291) - ..add(3292) - ..add(3293) - ..add(3294) - ..add(3295) - ..add(3296) - ..add(3297) - ..add(3298) - ..add(3299) - ..add(3300) - ..add(3301) - ..add(3302) - ..add(3303) - ..add(3304) - ..add(3305) - ..add(3306) - ..add(3307) - ..add(3308) - ..add(3309) - ..add(3310) - ..add(3311) - ..add(3312) - ..add(3313) - ..add(3314) - ..add(3315) - ..add(3316) - ..add(3317) - ..add(3318) - ..add(3319) - ..add(3320) - ..add(3321) - ..add(3322) - ..add(3323) - ..add(3324) - ..add(3325) - ..add(3326) - ..add(3327) - ..add(3328) - ..add(3329) - ..add(3330) - ..add(3331) - ..add(3332) - ..add(3333) - ..add(3334) - ..add(3335) - ..add(3336) - ..add(3337) - ..add(3338) - ..add(3339) - ..add(3340) - ..add(3341) - ..add(3342) - ..add(3343) - ..add(3344) - ..add(3345) - ..add(3346) - ..add(3347) - ..add(3348) - ..add(3349) - ..add(3350) - ..add(3351) - ..add(3352) - ..add(3353) - ..add(3354) - ..add(3355) - ..add(3356) - ..add(3357) - ..add(3358) - ..add(3359) - ..add(3360) - ..add(3361) - ..add(3362) - ..add(3363) - ..add(3364) - ..add(3365) - ..add(3366) - ..add(3367) - ..add(3368) - ..add(3369) - ..add(3370) - ..add(3371) - ..add(3372) - ..add(3373) - ..add(3374) - ..add(3375) - ..add(3376) - ..add(3377) - ..add(3378) - ..add(3379) - ..add(3380) - ..add(3381) - ..add(3382) - ..add(3383) - ..add(3384) - ..add(3385) - ..add(3386) - ..add(3387) - ..add(3388) - ..add(3389) - ..add(3390) - ..add(3391) - ..add(3392) - ..add(3393) - ..add(3394) - ..add(3395) - ..add(3396) - ..add(3397) - ..add(3398) - ..add(3399) - ..add(3400) - ..add(3401) - ..add(3402) - ..add(3403) - ..add(3404) - ..add(3405) - ..add(3406) - ..add(3407) - ..add(3408) - ..add(3409) - ..add(3410) - ..add(3411) - ..add(3412) - ..add(3413) - ..add(3414) - ..add(3415) - ..add(3416) - ..add(3417) - ..add(3418) - ..add(3419) - ..add(3420) - ..add(3421) - ..add(3422) - ..add(3423) - ..add(3424) - ..add(3425) - ..add(3426) - ..add(3427) - ..add(3428) - ..add(3429) - ..add(3430) - ..add(3431) - ..add(3432) - ..add(3433) - ..add(3434) - ..add(3435) - ..add(3436) - ..add(3437) - ..add(3438) - ..add(3439) - ..add(3440) - ..add(3441) - ..add(3442) - ..add(3443) - ..add(3444) - ..add(3445) - ..add(3446) - ..add(3447) - ..add(3448) - ..add(3449) - ..add(3450) - ..add(3451) - ..add(3452) - ..add(3453) - ..add(3454) - ..add(3455) - ..add(3456) - ..add(3457) - ..add(3458) - ..add(3459) - ..add(3460) - ..add(3461) - ..add(3462) - ..add(3463) - ..add(3464) - ..add(3465) - ..add(3466) - ..add(3467) - ..add(3468) - ..add(3469) - ..add(3470) - ..add(3471) - ..add(3472) - ..add(3473) - ..add(3474) - ..add(3475) - ..add(3476) - ..add(3477) - ..add(3478) - ..add(3479) - ..add(3480) - ..add(3481) - ..add(3482) - ..add(3483) - ..add(3484) - ..add(3485) - ..add(3486) - ..add(3487) - ..add(3488) - ..add(3489) - ..add(3490) - ..add(3491) - ..add(3492) - ..add(3493) - ..add(3494) - ..add(3495) - ..add(3496) - ..add(3497) - ..add(3498) - ..add(3499) - ..add(3500) - ..add(3501) - ..add(3502) - ..add(3503) - ..add(3504) - ..add(3505) - ..add(3506) - ..add(3507) - ..add(3508) - ..add(3509) - ..add(3510) - ..add(3511) - ..add(3512) - ..add(3513) - ..add(3514) - ..add(3515) - ..add(3516) - ..add(3517) - ..add(3518) - ..add(3519) - ..add(3520) - ..add(3521) - ..add(3522) - ..add(3523) - ..add(3524) - ..add(3525) - ..add(3526) - ..add(3527) - ..add(3528) - ..add(3529) - ..add(3530) - ..add(3531) - ..add(3532) - ..add(3533) - ..add(3534) - ..add(3535) - ..add(3536) - ..add(3537) - ..add(3538) - ..add(3539) - ..add(3540) - ..add(3541) - ..add(3542) - ..add(3543) - ..add(3544) - ..add(3545) - ..add(3546) - ..add(3547) - ..add(3548) - ..add(3549) - ..add(3550) - ..add(3551) - ..add(3552) - ..add(3553) - ..add(3554) - ..add(3555) - ..add(3556) - ..add(3557) - ..add(3558) - ..add(3559) - ..add(3560) - ..add(3561) - ..add(3562) - ..add(3563) - ..add(3564) - ..add(3565) - ..add(3566) - ..add(3567) - ..add(3568) - ..add(3569) - ..add(3570) - ..add(3571) - ..add(3572) - ..add(3573) - ..add(3574) - ..add(3575) - ..add(3576) - ..add(3577) - ..add(3578) - ..add(3579) - ..add(3580) - ..add(3581) - ..add(3582) - ..add(3583) - ..add(3584) - ..add(3585) - ..add(3586) - ..add(3587) - ..add(3588) - ..add(3589) - ..add(3590) - ..add(3591) - ..add(3592) - ..add(3593) - ..add(3594) - ..add(3595) - ..add(3596) - ..add(3597) - ..add(3598) - ..add(3599) - ..add(3600) - ..add(3601) - ..add(3602) - ..add(3603) - ..add(3604) - ..add(3605) - ..add(3606) - ..add(3607) - ..add(3608) - ..add(3609) - ..add(3610) - ..add(3611) - ..add(3612) - ..add(3613) - ..add(3614) - ..add(3615) - ..add(3616) - ..add(3617) - ..add(3618) - ..add(3619) - ..add(3620) - ..add(3621) - ..add(3622) - ..add(3623) - ..add(3624) - ..add(3625) - ..add(3626) - ..add(3627) - ..add(3628) - ..add(3629) - ..add(3630) - ..add(3631) - ..add(3632) - ..add(3633) - ..add(3634) - ..add(3635) - ..add(3636) - ..add(3637) - ..add(3638) - ..add(3639) - ..add(3640) - ..add(3641) - ..add(3642) - ..add(3643) - ..add(3644) - ..add(3645) - ..add(3646) - ..add(3647) - ..add(3648) - ..add(3649) - ..add(3650) - ..add(3651) - ..add(3652) - ..add(3653) - ..add(3654) - ..add(3655) - ..add(3656) - ..add(3657) - ..add(3658) - ..add(3659) - ..add(3660) - ..add(3661) - ..add(3662) - ..add(3663) - ..add(3664) - ..add(3665) - ..add(3666) - ..add(3667) - ..add(3668) - ..add(3669) - ..add(3670) - ..add(3671) - ..add(3672) - ..add(3673) - ..add(3674) - ..add(3675) - ..add(3676) - ..add(3677) - ..add(3678) - ..add(3679) - ..add(3680) - ..add(3681) - ..add(3682) - ..add(3683) - ..add(3684) - ..add(3685) - ..add(3686) - ..add(3687) - ..add(3688) - ..add(3689) - ..add(3690) - ..add(3691) - ..add(3692) - ..add(3693) - ..add(3694) - ..add(3695) - ..add(3696) - ..add(3697) - ..add(3698) - ..add(3699) - ..add(3700) - ..add(3701) - ..add(3702) - ..add(3703) - ..add(3704) - ..add(3705) - ..add(3706) - ..add(3707) - ..add(3708) - ..add(3709) - ..add(3710) - ..add(3711) - ..add(3712) - ..add(3713) - ..add(3714) - ..add(3715) - ..add(3716) - ..add(3717) - ..add(3718) - ..add(3719) - ..add(3720) - ..add(3721) - ..add(3722) - ..add(3723) - ..add(3724) - ..add(3725) - ..add(3726) - ..add(3727) - ..add(3728) - ..add(3729) - ..add(3730) - ..add(3731) - ..add(3732) - ..add(3733) - ..add(3734) - ..add(3735) - ..add(3736) - ..add(3737) - ..add(3738) - ..add(3739) - ..add(3740) - ..add(3741) - ..add(3742) - ..add(3743) - ..add(3744) - ..add(3745) - ..add(3746) - ..add(3747) - ..add(3748) - ..add(3749) - ..add(3750) - ..add(3751) - ..add(3752) - ..add(3753) - ..add(3754) - ..add(3755) - ..add(3756) - ..add(3757) - ..add(3758) - ..add(3759) - ..add(3760) - ..add(3761) - ..add(3762) - ..add(3763) - ..add(3764) - ..add(3765) - ..add(3766) - ..add(3767) - ..add(3768) - ..add(3769) - ..add(3770) - ..add(3771) - ..add(3772) - ..add(3773) - ..add(3774) - ..add(3775) - ..add(3776) - ..add(3777) - ..add(3778) - ..add(3779) - ..add(3780) - ..add(3781) - ..add(3782) - ..add(3783) - ..add(3784) - ..add(3785) - ..add(3786) - ..add(3787) - ..add(3788) - ..add(3789) - ..add(3790) - ..add(3791) - ..add(3792) - ..add(3793) - ..add(3794) - ..add(3795) - ..add(3796) - ..add(3797) - ..add(3798) - ..add(3799) - ..add(3800) - ..add(3801) - ..add(3802) - ..add(3803) - ..add(3804) - ..add(3805) - ..add(3806) - ..add(3807) - ..add(3808) - ..add(3809) - ..add(3810) - ..add(3811) - ..add(3812) - ..add(3813) - ..add(3814) - ..add(3815) - ..add(3816) - ..add(3817) - ..add(3818) - ..add(3819) - ..add(3820) - ..add(3821) - ..add(3822) - ..add(3823) - ..add(3824) - ..add(3825) - ..add(3826) - ..add(3827) - ..add(3828) - ..add(3829) - ..add(3830) - ..add(3831) - ..add(3832) - ..add(3833) - ..add(3834) - ..add(3835) - ..add(3836) - ..add(3837) - ..add(3838) - ..add(3839) - ..add(3840) - ..add(3841) - ..add(3842) - ..add(3843) - ..add(3844) - ..add(3845) - ..add(3846) - ..add(3847) - ..add(3848) - ..add(3849) - ..add(3850) - ..add(3851) - ..add(3852) - ..add(3853) - ..add(3854) - ..add(3855) - ..add(3856) - ..add(3857) - ..add(3858) - ..add(3859) - ..add(3860) - ..add(3861) - ..add(3862) - ..add(3863) - ..add(3864) - ..add(3865) - ..add(3866) - ..add(3867) - ..add(3868) - ..add(3869) - ..add(3870) - ..add(3871) - ..add(3872) - ..add(3873) - ..add(3874) - ..add(3875) - ..add(3876) - ..add(3877) - ..add(3878) - ..add(3879) - ..add(3880) - ..add(3881) - ..add(3882) - ..add(3883) - ..add(3884) - ..add(3885) - ..add(3886) - ..add(3887) - ..add(3888) - ..add(3889) - ..add(3890) - ..add(3891) - ..add(3892) - ..add(3893) - ..add(3894) - ..add(3895) - ..add(3896) - ..add(3897) - ..add(3898) - ..add(3899) - ..add(3900) - ..add(3901) - ..add(3902) - ..add(3903) - ..add(3904) - ..add(3905) - ..add(3906) - ..add(3907) - ..add(3908) - ..add(3909) - ..add(3910) - ..add(3911) - ..add(3912) - ..add(3913) - ..add(3914) - ..add(3915) - ..add(3916) - ..add(3917) - ..add(3918) - ..add(3919) - ..add(3920) - ..add(3921) - ..add(3922) - ..add(3923) - ..add(3924) - ..add(3925) - ..add(3926) - ..add(3927) - ..add(3928) - ..add(3929) - ..add(3930) - ..add(3931) - ..add(3932) - ..add(3933) - ..add(3934) - ..add(3935) - ..add(3936) - ..add(3937) - ..add(3938) - ..add(3939) - ..add(3940) - ..add(3941) - ..add(3942) - ..add(3943) - ..add(3944) - ..add(3945) - ..add(3946) - ..add(3947) - ..add(3948) - ..add(3949) - ..add(3950) - ..add(3951) - ..add(3952) - ..add(3953) - ..add(3954) - ..add(3955) - ..add(3956) - ..add(3957) - ..add(3958) - ..add(3959) - ..add(3960) - ..add(3961) - ..add(3962) - ..add(3963) - ..add(3964) - ..add(3965) - ..add(3966) - ..add(3967) - ..add(3968) - ..add(3969) - ..add(3970) - ..add(3971) - ..add(3972) - ..add(3973) - ..add(3974) - ..add(3975) - ..add(3976) - ..add(3977) - ..add(3978) - ..add(3979) - ..add(3980) - ..add(3981) - ..add(3982) - ..add(3983) - ..add(3984) - ..add(3985) - ..add(3986) - ..add(3987) - ..add(3988) - ..add(3989) - ..add(3990) - ..add(3991) - ..add(3992) - ..add(3993) - ..add(3994) - ..add(3995) - ..add(3996) - ..add(3997) - ..add(3998) - ..add(3999) - ..add(4000) - ..add(4001) - ..add(4002) - ..add(4003) - ..add(4004) - ..add(4005) - ..add(4006) - ..add(4007) - ..add(4008) - ..add(4009) - ..add(4010) - ..add(4011) - ..add(4012) - ..add(4013) - ..add(4014) - ..add(4015) - ..add(4016) - ..add(4017) - ..add(4018) - ..add(4019) - ..add(4020) - ..add(4021) - ..add(4022) - ..add(4023) - ..add(4024) - ..add(4025) - ..add(4026) - ..add(4027) - ..add(4028) - ..add(4029) - ..add(4030) - ..add(4031) - ..add(4032) - ..add(4033) - ..add(4034) - ..add(4035) - ..add(4036) - ..add(4037) - ..add(4038) - ..add(4039) - ..add(4040) - ..add(4041) - ..add(4042) - ..add(4043) - ..add(4044) - ..add(4045) - ..add(4046) - ..add(4047) - ..add(4048) - ..add(4049) - ..add(4050) - ..add(4051) - ..add(4052) - ..add(4053) - ..add(4054) - ..add(4055) - ..add(4056) - ..add(4057) - ..add(4058) - ..add(4059) - ..add(4060) - ..add(4061) - ..add(4062) - ..add(4063) - ..add(4064) - ..add(4065) - ..add(4066) - ..add(4067) - ..add(4068) - ..add(4069) - ..add(4070) - ..add(4071) - ..add(4072) - ..add(4073) - ..add(4074) - ..add(4075) - ..add(4076) - ..add(4077) - ..add(4078) - ..add(4079) - ..add(4080) - ..add(4081) - ..add(4082) - ..add(4083) - ..add(4084) - ..add(4085) - ..add(4086) - ..add(4087) - ..add(4088) - ..add(4089) - ..add(4090) - ..add(4091) - ..add(4092) - ..add(4093) - ..add(4094) - ..add(4095) - ..add(4096) - ..add(4097) - ..add(4098) - ..add(4099) - ..add(4100) - ..add(4101) - ..add(4102) - ..add(4103) - ..add(4104) - ..add(4105) - ..add(4106) - ..add(4107) - ..add(4108) - ..add(4109) - ..add(4110) - ..add(4111) - ..add(4112) - ..add(4113) - ..add(4114) - ..add(4115) - ..add(4116) - ..add(4117) - ..add(4118) - ..add(4119) - ..add(4120) - ..add(4121) - ..add(4122) - ..add(4123) - ..add(4124) - ..add(4125) - ..add(4126) - ..add(4127) - ..add(4128) - ..add(4129) - ..add(4130) - ..add(4131) - ..add(4132) - ..add(4133) - ..add(4134) - ..add(4135) - ..add(4136) - ..add(4137) - ..add(4138) - ..add(4139) - ..add(4140) - ..add(4141) - ..add(4142) - ..add(4143) - ..add(4144) - ..add(4145) - ..add(4146) - ..add(4147) - ..add(4148) - ..add(4149) - ..add(4150) - ..add(4151) - ..add(4152) - ..add(4153) - ..add(4154) - ..add(4155) - ..add(4156) - ..add(4157) - ..add(4158) - ..add(4159) - ..add(4160) - ..add(4161) - ..add(4162) - ..add(4163) - ..add(4164) - ..add(4165) - ..add(4166) - ..add(4167) - ..add(4168) - ..add(4169) - ..add(4170) - ..add(4171) - ..add(4172) - ..add(4173) - ..add(4174) - ..add(4175) - ..add(4176) - ..add(4177) - ..add(4178) - ..add(4179) - ..add(4180) - ..add(4181) - ..add(4182) - ..add(4183) - ..add(4184) - ..add(4185) - ..add(4186) - ..add(4187) - ..add(4188) - ..add(4189) - ..add(4190) - ..add(4191) - ..add(4192) - ..add(4193) - ..add(4194) - ..add(4195) - ..add(4196) - ..add(4197) - ..add(4198) - ..add(4199) - ..add(4200) - ..add(4201) - ..add(4202) - ..add(4203) - ..add(4204) - ..add(4205) - ..add(4206) - ..add(4207) - ..add(4208) - ..add(4209) - ..add(4210) - ..add(4211) - ..add(4212) - ..add(4213) - ..add(4214) - ..add(4215) - ..add(4216) - ..add(4217) - ..add(4218) - ..add(4219) - ..add(4220) - ..add(4221) - ..add(4222) - ..add(4223) - ..add(4224) - ..add(4225) - ..add(4226) - ..add(4227) - ..add(4228) - ..add(4229) - ..add(4230) - ..add(4231) - ..add(4232) - ..add(4233) - ..add(4234) - ..add(4235) - ..add(4236) - ..add(4237) - ..add(4238) - ..add(4239) - ..add(4240) - ..add(4241) - ..add(4242) - ..add(4243) - ..add(4244) - ..add(4245) - ..add(4246) - ..add(4247) - ..add(4248) - ..add(4249) - ..add(4250) - ..add(4251) - ..add(4252) - ..add(4253) - ..add(4254) - ..add(4255) - ..add(4256) - ..add(4257) - ..add(4258) - ..add(4259) - ..add(4260) - ..add(4261) - ..add(4262) - ..add(4263) - ..add(4264) - ..add(4265) - ..add(4266) - ..add(4267) - ..add(4268) - ..add(4269) - ..add(4270) - ..add(4271) - ..add(4272) - ..add(4273) - ..add(4274) - ..add(4275) - ..add(4276) - ..add(4277) - ..add(4278) - ..add(4279) - ..add(4280) - ..add(4281) - ..add(4282) - ..add(4283) - ..add(4284) - ..add(4285) - ..add(4286) - ..add(4287) - ..add(4288) - ..add(4289) - ..add(4290) - ..add(4291) - ..add(4292) - ..add(4293) - ..add(4294) - ..add(4295) - ..add(4296) - ..add(4297) - ..add(4298) - ..add(4299) - ..add(4300) - ..add(4301) - ..add(4302) - ..add(4303) - ..add(4304) - ..add(4305) - ..add(4306) - ..add(4307) - ..add(4308) - ..add(4309) - ..add(4310) - ..add(4311) - ..add(4312) - ..add(4313) - ..add(4314) - ..add(4315) - ..add(4316) - ..add(4317) - ..add(4318) - ..add(4319) - ..add(4320) - ..add(4321) - ..add(4322) - ..add(4323) - ..add(4324) - ..add(4325) - ..add(4326) - ..add(4327) - ..add(4328) - ..add(4329) - ..add(4330) - ..add(4331) - ..add(4332) - ..add(4333) - ..add(4334) - ..add(4335) - ..add(4336) - ..add(4337) - ..add(4338) - ..add(4339) - ..add(4340) - ..add(4341) - ..add(4342) - ..add(4343) - ..add(4344) - ..add(4345) - ..add(4346) - ..add(4347) - ..add(4348) - ..add(4349) - ..add(4350) - ..add(4351) - ..add(4352) - ..add(4353) - ..add(4354) - ..add(4355) - ..add(4356) - ..add(4357) - ..add(4358) - ..add(4359) - ..add(4360) - ..add(4361) - ..add(4362) - ..add(4363) - ..add(4364) - ..add(4365) - ..add(4366) - ..add(4367) - ..add(4368) - ..add(4369) - ..add(4370) - ..add(4371) - ..add(4372) - ..add(4373) - ..add(4374) - ..add(4375) - ..add(4376) - ..add(4377) - ..add(4378) - ..add(4379) - ..add(4380) - ..add(4381) - ..add(4382) - ..add(4383) - ..add(4384) - ..add(4385) - ..add(4386) - ..add(4387) - ..add(4388) - ..add(4389) - ..add(4390) - ..add(4391) - ..add(4392) - ..add(4393) - ..add(4394) - ..add(4395) - ..add(4396) - ..add(4397) - ..add(4398) - ..add(4399) - ..add(4400) - ..add(4401) - ..add(4402) - ..add(4403) - ..add(4404) - ..add(4405) - ..add(4406) - ..add(4407) - ..add(4408) - ..add(4409) - ..add(4410) - ..add(4411) - ..add(4412) - ..add(4413) - ..add(4414) - ..add(4415) - ..add(4416) - ..add(4417) - ..add(4418) - ..add(4419) - ..add(4420) - ..add(4421) - ..add(4422) - ..add(4423) - ..add(4424) - ..add(4425) - ..add(4426) - ..add(4427) - ..add(4428) - ..add(4429) - ..add(4430) - ..add(4431) - ..add(4432) - ..add(4433) - ..add(4434) - ..add(4435) - ..add(4436) - ..add(4437) - ..add(4438) - ..add(4439) - ..add(4440) - ..add(4441) - ..add(4442) - ..add(4443) - ..add(4444) - ..add(4445) - ..add(4446) - ..add(4447) - ..add(4448) - ..add(4449) - ..add(4450) - ..add(4451) - ..add(4452) - ..add(4453) - ..add(4454) - ..add(4455) - ..add(4456) - ..add(4457) - ..add(4458) - ..add(4459) - ..add(4460) - ..add(4461) - ..add(4462) - ..add(4463) - ..add(4464) - ..add(4465) - ..add(4466) - ..add(4467) - ..add(4468) - ..add(4469) - ..add(4470) - ..add(4471) - ..add(4472) - ..add(4473) - ..add(4474) - ..add(4475) - ..add(4476) - ..add(4477) - ..add(4478) - ..add(4479) - ..add(4480) - ..add(4481) - ..add(4482) - ..add(4483) - ..add(4484) - ..add(4485) - ..add(4486) - ..add(4487) - ..add(4488) - ..add(4489) - ..add(4490) - ..add(4491) - ..add(4492) - ..add(4493) - ..add(4494) - ..add(4495) - ..add(4496) - ..add(4497) - ..add(4498) - ..add(4499) - ..add(4500) - ..add(4501) - ..add(4502) - ..add(4503) - ..add(4504) - ..add(4505) - ..add(4506) - ..add(4507) - ..add(4508) - ..add(4509) - ..add(4510) - ..add(4511) - ..add(4512) - ..add(4513) - ..add(4514) - ..add(4515) - ..add(4516) - ..add(4517) - ..add(4518) - ..add(4519) - ..add(4520) - ..add(4521) - ..add(4522) - ..add(4523) - ..add(4524) - ..add(4525) - ..add(4526) - ..add(4527) - ..add(4528) - ..add(4529) - ..add(4530) - ..add(4531) - ..add(4532) - ..add(4533) - ..add(4534) - ..add(4535) - ..add(4536) - ..add(4537) - ..add(4538) - ..add(4539) - ..add(4540) - ..add(4541) - ..add(4542) - ..add(4543) - ..add(4544) - ..add(4545) - ..add(4546) - ..add(4547) - ..add(4548) - ..add(4549) - ..add(4550) - ..add(4551) - ..add(4552) - ..add(4553) - ..add(4554) - ..add(4555) - ..add(4556) - ..add(4557) - ..add(4558) - ..add(4559) - ..add(4560) - ..add(4561) - ..add(4562) - ..add(4563) - ..add(4564) - ..add(4565) - ..add(4566) - ..add(4567) - ..add(4568) - ..add(4569) - ..add(4570) - ..add(4571) - ..add(4572) - ..add(4573) - ..add(4574) - ..add(4575) - ..add(4576) - ..add(4577) - ..add(4578) - ..add(4579) - ..add(4580) - ..add(4581) - ..add(4582) - ..add(4583) - ..add(4584) - ..add(4585) - ..add(4586) - ..add(4587) - ..add(4588) - ..add(4589) - ..add(4590) - ..add(4591) - ..add(4592) - ..add(4593) - ..add(4594) - ..add(4595) - ..add(4596) - ..add(4597) - ..add(4598) - ..add(4599) - ..add(4600) - ..add(4601) - ..add(4602) - ..add(4603) - ..add(4604) - ..add(4605) - ..add(4606) - ..add(4607) - ..add(4608) - ..add(4609) - ..add(4610) - ..add(4611) - ..add(4612) - ..add(4613) - ..add(4614) - ..add(4615) - ..add(4616) - ..add(4617) - ..add(4618) - ..add(4619) - ..add(4620) - ..add(4621) - ..add(4622) - ..add(4623) - ..add(4624) - ..add(4625) - ..add(4626) - ..add(4627) - ..add(4628) - ..add(4629) - ..add(4630) - ..add(4631) - ..add(4632) - ..add(4633) - ..add(4634) - ..add(4635) - ..add(4636) - ..add(4637) - ..add(4638) - ..add(4639) - ..add(4640) - ..add(4641) - ..add(4642) - ..add(4643) - ..add(4644) - ..add(4645) - ..add(4646) - ..add(4647) - ..add(4648) - ..add(4649) - ..add(4650) - ..add(4651) - ..add(4652) - ..add(4653) - ..add(4654) - ..add(4655) - ..add(4656) - ..add(4657) - ..add(4658) - ..add(4659) - ..add(4660) - ..add(4661) - ..add(4662) - ..add(4663) - ..add(4664) - ..add(4665) - ..add(4666) - ..add(4667) - ..add(4668) - ..add(4669) - ..add(4670) - ..add(4671) - ..add(4672) - ..add(4673) - ..add(4674) - ..add(4675) - ..add(4676) - ..add(4677) - ..add(4678) - ..add(4679) - ..add(4680) - ..add(4681) - ..add(4682) - ..add(4683) - ..add(4684) - ..add(4685) - ..add(4686) - ..add(4687) - ..add(4688) - ..add(4689) - ..add(4690) - ..add(4691) - ..add(4692) - ..add(4693) - ..add(4694) - ..add(4695) - ..add(4696) - ..add(4697) - ..add(4698) - ..add(4699) - ..add(4700) - ..add(4701) - ..add(4702) - ..add(4703) - ..add(4704) - ..add(4705) - ..add(4706) - ..add(4707) - ..add(4708) - ..add(4709) - ..add(4710) - ..add(4711) - ..add(4712) - ..add(4713) - ..add(4714) - ..add(4715) - ..add(4716) - ..add(4717) - ..add(4718) - ..add(4719) - ..add(4720) - ..add(4721) - ..add(4722) - ..add(4723) - ..add(4724) - ..add(4725) - ..add(4726) - ..add(4727) - ..add(4728) - ..add(4729) - ..add(4730) - ..add(4731) - ..add(4732) - ..add(4733) - ..add(4734) - ..add(4735) - ..add(4736) - ..add(4737) - ..add(4738) - ..add(4739) - ..add(4740) - ..add(4741) - ..add(4742) - ..add(4743) - ..add(4744) - ..add(4745) - ..add(4746) - ..add(4747) - ..add(4748) - ..add(4749) - ..add(4750) - ..add(4751) - ..add(4752) - ..add(4753) - ..add(4754) - ..add(4755) - ..add(4756) - ..add(4757) - ..add(4758) - ..add(4759) - ..add(4760) - ..add(4761) - ..add(4762) - ..add(4763) - ..add(4764) - ..add(4765) - ..add(4766) - ..add(4767) - ..add(4768) - ..add(4769) - ..add(4770) - ..add(4771) - ..add(4772) - ..add(4773) - ..add(4774) - ..add(4775) - ..add(4776) - ..add(4777) - ..add(4778) - ..add(4779) - ..add(4780) - ..add(4781) - ..add(4782) - ..add(4783) - ..add(4784) - ..add(4785) - ..add(4786) - ..add(4787) - ..add(4788) - ..add(4789) - ..add(4790) - ..add(4791) - ..add(4792) - ..add(4793) - ..add(4794) - ..add(4795) - ..add(4796) - ..add(4797) - ..add(4798) - ..add(4799) - ..add(4800) - ..add(4801) - ..add(4802) - ..add(4803) - ..add(4804) - ..add(4805) - ..add(4806) - ..add(4807) - ..add(4808) - ..add(4809) - ..add(4810) - ..add(4811) - ..add(4812) - ..add(4813) - ..add(4814) - ..add(4815) - ..add(4816) - ..add(4817) - ..add(4818) - ..add(4819) - ..add(4820) - ..add(4821) - ..add(4822) - ..add(4823) - ..add(4824) - ..add(4825) - ..add(4826) - ..add(4827) - ..add(4828) - ..add(4829) - ..add(4830) - ..add(4831) - ..add(4832) - ..add(4833) - ..add(4834) - ..add(4835) - ..add(4836) - ..add(4837) - ..add(4838) - ..add(4839) - ..add(4840) - ..add(4841) - ..add(4842) - ..add(4843) - ..add(4844) - ..add(4845) - ..add(4846) - ..add(4847) - ..add(4848) - ..add(4849) - ..add(4850) - ..add(4851) - ..add(4852) - ..add(4853) - ..add(4854) - ..add(4855) - ..add(4856) - ..add(4857) - ..add(4858) - ..add(4859) - ..add(4860) - ..add(4861) - ..add(4862) - ..add(4863) - ..add(4864) - ..add(4865) - ..add(4866) - ..add(4867) - ..add(4868) - ..add(4869) - ..add(4870) - ..add(4871) - ..add(4872) - ..add(4873) - ..add(4874) - ..add(4875) - ..add(4876) - ..add(4877) - ..add(4878) - ..add(4879) - ..add(4880) - ..add(4881) - ..add(4882) - ..add(4883) - ..add(4884) - ..add(4885) - ..add(4886) - ..add(4887) - ..add(4888) - ..add(4889) - ..add(4890) - ..add(4891) - ..add(4892) - ..add(4893) - ..add(4894) - ..add(4895) - ..add(4896) - ..add(4897) - ..add(4898) - ..add(4899) - ..add(4900) - ..add(4901) - ..add(4902) - ..add(4903) - ..add(4904) - ..add(4905) - ..add(4906) - ..add(4907) - ..add(4908) - ..add(4909) - ..add(4910) - ..add(4911) - ..add(4912) - ..add(4913) - ..add(4914) - ..add(4915) - ..add(4916) - ..add(4917) - ..add(4918) - ..add(4919) - ..add(4920) - ..add(4921) - ..add(4922) - ..add(4923) - ..add(4924) - ..add(4925) - ..add(4926) - ..add(4927) - ..add(4928) - ..add(4929) - ..add(4930) - ..add(4931) - ..add(4932) - ..add(4933) - ..add(4934) - ..add(4935) - ..add(4936) - ..add(4937) - ..add(4938) - ..add(4939) - ..add(4940) - ..add(4941) - ..add(4942) - ..add(4943) - ..add(4944) - ..add(4945) - ..add(4946) - ..add(4947) - ..add(4948) - ..add(4949) - ..add(4950) - ..add(4951) - ..add(4952) - ..add(4953) - ..add(4954) - ..add(4955) - ..add(4956) - ..add(4957) - ..add(4958) - ..add(4959) - ..add(4960) - ..add(4961) - ..add(4962) - ..add(4963) - ..add(4964) - ..add(4965) - ..add(4966) - ..add(4967) - ..add(4968) - ..add(4969) - ..add(4970) - ..add(4971) - ..add(4972) - ..add(4973) - ..add(4974) - ..add(4975) - ..add(4976) - ..add(4977) - ..add(4978) - ..add(4979) - ..add(4980) - ..add(4981) - ..add(4982) - ..add(4983) - ..add(4984) - ..add(4985) - ..add(4986) - ..add(4987) - ..add(4988) - ..add(4989) - ..add(4990) - ..add(4991) - ..add(4992) - ..add(4993) - ..add(4994) - ..add(4995) - ..add(4996) - ..add(4997) - ..add(4998) - ..add(4999) - ..add(5000) - ..add(5001) - ..add(5002) - ..add(5003) - ..add(5004) - ..add(5005) - ..add(5006) - ..add(5007) - ..add(5008) - ..add(5009) - ..add(5010) - ..add(5011) - ..add(5012) - ..add(5013) - ..add(5014) - ..add(5015) - ..add(5016) - ..add(5017) - ..add(5018) - ..add(5019) - ..add(5020) - ..add(5021) - ..add(5022) - ..add(5023) - ..add(5024) - ..add(5025) - ..add(5026) - ..add(5027) - ..add(5028) - ..add(5029) - ..add(5030) - ..add(5031) - ..add(5032) - ..add(5033) - ..add(5034) - ..add(5035) - ..add(5036) - ..add(5037) - ..add(5038) - ..add(5039) - ..add(5040) - ..add(5041) - ..add(5042) - ..add(5043) - ..add(5044) - ..add(5045) - ..add(5046) - ..add(5047) - ..add(5048) - ..add(5049) - ..add(5050) - ..add(5051) - ..add(5052) - ..add(5053) - ..add(5054) - ..add(5055) - ..add(5056) - ..add(5057) - ..add(5058) - ..add(5059) - ..add(5060) - ..add(5061) - ..add(5062) - ..add(5063) - ..add(5064) - ..add(5065) - ..add(5066) - ..add(5067) - ..add(5068) - ..add(5069) - ..add(5070) - ..add(5071) - ..add(5072) - ..add(5073) - ..add(5074) - ..add(5075) - ..add(5076) - ..add(5077) - ..add(5078) - ..add(5079) - ..add(5080) - ..add(5081) - ..add(5082) - ..add(5083) - ..add(5084) - ..add(5085) - ..add(5086) - ..add(5087) - ..add(5088) - ..add(5089) - ..add(5090) - ..add(5091) - ..add(5092) - ..add(5093) - ..add(5094) - ..add(5095) - ..add(5096) - ..add(5097) - ..add(5098) - ..add(5099) - ..add(5100) - ..add(5101) - ..add(5102) - ..add(5103) - ..add(5104) - ..add(5105) - ..add(5106) - ..add(5107) - ..add(5108) - ..add(5109) - ..add(5110) - ..add(5111) - ..add(5112) - ..add(5113) - ..add(5114) - ..add(5115) - ..add(5116) - ..add(5117) - ..add(5118) - ..add(5119) - ..add(5120) - ..add(5121) - ..add(5122) - ..add(5123) - ..add(5124) - ..add(5125) - ..add(5126) - ..add(5127) - ..add(5128) - ..add(5129) - ..add(5130) - ..add(5131) - ..add(5132) - ..add(5133) - ..add(5134) - ..add(5135) - ..add(5136) - ..add(5137) - ..add(5138) - ..add(5139) - ..add(5140) - ..add(5141) - ..add(5142) - ..add(5143) - ..add(5144) - ..add(5145) - ..add(5146) - ..add(5147) - ..add(5148) - ..add(5149) - ..add(5150) - ..add(5151) - ..add(5152) - ..add(5153) - ..add(5154) - ..add(5155) - ..add(5156) - ..add(5157) - ..add(5158) - ..add(5159) - ..add(5160) - ..add(5161) - ..add(5162) - ..add(5163) - ..add(5164) - ..add(5165) - ..add(5166) - ..add(5167) - ..add(5168) - ..add(5169) - ..add(5170) - ..add(5171) - ..add(5172) - ..add(5173) - ..add(5174) - ..add(5175) - ..add(5176) - ..add(5177) - ..add(5178) - ..add(5179) - ..add(5180) - ..add(5181) - ..add(5182) - ..add(5183) - ..add(5184) - ..add(5185) - ..add(5186) - ..add(5187) - ..add(5188) - ..add(5189) - ..add(5190) - ..add(5191) - ..add(5192) - ..add(5193) - ..add(5194) - ..add(5195) - ..add(5196) - ..add(5197) - ..add(5198) - ..add(5199) - ..add(5200) - ..add(5201) - ..add(5202) - ..add(5203) - ..add(5204) - ..add(5205) - ..add(5206) - ..add(5207) - ..add(5208) - ..add(5209) - ..add(5210) - ..add(5211) - ..add(5212) - ..add(5213) - ..add(5214) - ..add(5215) - ..add(5216) - ..add(5217) - ..add(5218) - ..add(5219) - ..add(5220) - ..add(5221) - ..add(5222) - ..add(5223) - ..add(5224) - ..add(5225) - ..add(5226) - ..add(5227) - ..add(5228) - ..add(5229) - ..add(5230) - ..add(5231) - ..add(5232) - ..add(5233) - ..add(5234) - ..add(5235) - ..add(5236) - ..add(5237) - ..add(5238) - ..add(5239) - ..add(5240) - ..add(5241) - ..add(5242) - ..add(5243) - ..add(5244) - ..add(5245) - ..add(5246) - ..add(5247) - ..add(5248) - ..add(5249) - ..add(5250) - ..add(5251) - ..add(5252) - ..add(5253) - ..add(5254) - ..add(5255) - ..add(5256) - ..add(5257) - ..add(5258) - ..add(5259) - ..add(5260) - ..add(5261) - ..add(5262) - ..add(5263) - ..add(5264) - ..add(5265) - ..add(5266) - ..add(5267) - ..add(5268) - ..add(5269) - ..add(5270) - ..add(5271) - ..add(5272) - ..add(5273) - ..add(5274) - ..add(5275) - ..add(5276) - ..add(5277) - ..add(5278) - ..add(5279) - ..add(5280) - ..add(5281) - ..add(5282) - ..add(5283) - ..add(5284) - ..add(5285) - ..add(5286) - ..add(5287) - ..add(5288) - ..add(5289) - ..add(5290) - ..add(5291) - ..add(5292) - ..add(5293) - ..add(5294) - ..add(5295) - ..add(5296) - ..add(5297) - ..add(5298) - ..add(5299) - ..add(5300) - ..add(5301) - ..add(5302) - ..add(5303) - ..add(5304) - ..add(5305) - ..add(5306) - ..add(5307) - ..add(5308) - ..add(5309) - ..add(5310) - ..add(5311) - ..add(5312) - ..add(5313) - ..add(5314) - ..add(5315) - ..add(5316) - ..add(5317) - ..add(5318) - ..add(5319) - ..add(5320) - ..add(5321) - ..add(5322) - ..add(5323) - ..add(5324) - ..add(5325) - ..add(5326) - ..add(5327) - ..add(5328) - ..add(5329) - ..add(5330) - ..add(5331) - ..add(5332) - ..add(5333) - ..add(5334) - ..add(5335) - ..add(5336) - ..add(5337) - ..add(5338) - ..add(5339) - ..add(5340) - ..add(5341) - ..add(5342) - ..add(5343) - ..add(5344) - ..add(5345) - ..add(5346) - ..add(5347) - ..add(5348) - ..add(5349) - ..add(5350) - ..add(5351) - ..add(5352) - ..add(5353) - ..add(5354) - ..add(5355) - ..add(5356) - ..add(5357) - ..add(5358) - ..add(5359) - ..add(5360) - ..add(5361) - ..add(5362) - ..add(5363) - ..add(5364) - ..add(5365) - ..add(5366) - ..add(5367) - ..add(5368) - ..add(5369) - ..add(5370) - ..add(5371) - ..add(5372) - ..add(5373) - ..add(5374) - ..add(5375) - ..add(5376) - ..add(5377) - ..add(5378) - ..add(5379) - ..add(5380) - ..add(5381) - ..add(5382) - ..add(5383) - ..add(5384) - ..add(5385) - ..add(5386) - ..add(5387) - ..add(5388) - ..add(5389) - ..add(5390) - ..add(5391) - ..add(5392) - ..add(5393) - ..add(5394) - ..add(5395) - ..add(5396) - ..add(5397) - ..add(5398) - ..add(5399) - ..add(5400) - ..add(5401) - ..add(5402) - ..add(5403) - ..add(5404) - ..add(5405) - ..add(5406) - ..add(5407) - ..add(5408) - ..add(5409) - ..add(5410) - ..add(5411) - ..add(5412) - ..add(5413) - ..add(5414) - ..add(5415) - ..add(5416) - ..add(5417) - ..add(5418) - ..add(5419) - ..add(5420) - ..add(5421) - ..add(5422) - ..add(5423) - ..add(5424) - ..add(5425) - ..add(5426) - ..add(5427) - ..add(5428) - ..add(5429) - ..add(5430) - ..add(5431) - ..add(5432) - ..add(5433) - ..add(5434) - ..add(5435) - ..add(5436) - ..add(5437) - ..add(5438) - ..add(5439) - ..add(5440) - ..add(5441) - ..add(5442) - ..add(5443) - ..add(5444) - ..add(5445) - ..add(5446) - ..add(5447) - ..add(5448) - ..add(5449) - ..add(5450) - ..add(5451) - ..add(5452) - ..add(5453) - ..add(5454) - ..add(5455) - ..add(5456) - ..add(5457) - ..add(5458) - ..add(5459) - ..add(5460) - ..add(5461) - ..add(5462) - ..add(5463) - ..add(5464) - ..add(5465) - ..add(5466) - ..add(5467) - ..add(5468) - ..add(5469) - ..add(5470) - ..add(5471) - ..add(5472) - ..add(5473) - ..add(5474) - ..add(5475) - ..add(5476) - ..add(5477) - ..add(5478) - ..add(5479) - ..add(5480) - ..add(5481) - ..add(5482) - ..add(5483) - ..add(5484) - ..add(5485) - ..add(5486) - ..add(5487) - ..add(5488) - ..add(5489) - ..add(5490) - ..add(5491) - ..add(5492) - ..add(5493) - ..add(5494) - ..add(5495) - ..add(5496) - ..add(5497) - ..add(5498) - ..add(5499) - ..add(5500) - ..add(5501) - ..add(5502) - ..add(5503) - ..add(5504) - ..add(5505) - ..add(5506) - ..add(5507) - ..add(5508) - ..add(5509) - ..add(5510) - ..add(5511) - ..add(5512) - ..add(5513) - ..add(5514) - ..add(5515) - ..add(5516) - ..add(5517) - ..add(5518) - ..add(5519) - ..add(5520) - ..add(5521) - ..add(5522) - ..add(5523) - ..add(5524) - ..add(5525) - ..add(5526) - ..add(5527) - ..add(5528) - ..add(5529) - ..add(5530) - ..add(5531) - ..add(5532) - ..add(5533) - ..add(5534) - ..add(5535) - ..add(5536) - ..add(5537) - ..add(5538) - ..add(5539) - ..add(5540) - ..add(5541) - ..add(5542) - ..add(5543) - ..add(5544) - ..add(5545) - ..add(5546) - ..add(5547) - ..add(5548) - ..add(5549) - ..add(5550) - ..add(5551) - ..add(5552) - ..add(5553) - ..add(5554) - ..add(5555) - ..add(5556) - ..add(5557) - ..add(5558) - ..add(5559) - ..add(5560) - ..add(5561) - ..add(5562) - ..add(5563) - ..add(5564) - ..add(5565) - ..add(5566) - ..add(5567) - ..add(5568) - ..add(5569) - ..add(5570) - ..add(5571) - ..add(5572) - ..add(5573) - ..add(5574) - ..add(5575) - ..add(5576) - ..add(5577) - ..add(5578) - ..add(5579) - ..add(5580) - ..add(5581) - ..add(5582) - ..add(5583) - ..add(5584) - ..add(5585) - ..add(5586) - ..add(5587) - ..add(5588) - ..add(5589) - ..add(5590) - ..add(5591) - ..add(5592) - ..add(5593) - ..add(5594) - ..add(5595) - ..add(5596) - ..add(5597) - ..add(5598) - ..add(5599) - ..add(5600) - ..add(5601) - ..add(5602) - ..add(5603) - ..add(5604) - ..add(5605) - ..add(5606) - ..add(5607) - ..add(5608) - ..add(5609) - ..add(5610) - ..add(5611) - ..add(5612) - ..add(5613) - ..add(5614) - ..add(5615) - ..add(5616) - ..add(5617) - ..add(5618) - ..add(5619) - ..add(5620) - ..add(5621) - ..add(5622) - ..add(5623) - ..add(5624) - ..add(5625) - ..add(5626) - ..add(5627) - ..add(5628) - ..add(5629) - ..add(5630) - ..add(5631) - ..add(5632) - ..add(5633) - ..add(5634) - ..add(5635) - ..add(5636) - ..add(5637) - ..add(5638) - ..add(5639) - ..add(5640) - ..add(5641) - ..add(5642) - ..add(5643) - ..add(5644) - ..add(5645) - ..add(5646) - ..add(5647) - ..add(5648) - ..add(5649) - ..add(5650) - ..add(5651) - ..add(5652) - ..add(5653) - ..add(5654) - ..add(5655) - ..add(5656) - ..add(5657) - ..add(5658) - ..add(5659) - ..add(5660) - ..add(5661) - ..add(5662) - ..add(5663) - ..add(5664) - ..add(5665) - ..add(5666) - ..add(5667) - ..add(5668) - ..add(5669) - ..add(5670) - ..add(5671) - ..add(5672) - ..add(5673) - ..add(5674) - ..add(5675) - ..add(5676) - ..add(5677) - ..add(5678) - ..add(5679) - ..add(5680) - ..add(5681) - ..add(5682) - ..add(5683) - ..add(5684) - ..add(5685) - ..add(5686) - ..add(5687) - ..add(5688) - ..add(5689) - ..add(5690) - ..add(5691) - ..add(5692) - ..add(5693) - ..add(5694) - ..add(5695) - ..add(5696) - ..add(5697) - ..add(5698) - ..add(5699) - ..add(5700) - ..add(5701) - ..add(5702) - ..add(5703) - ..add(5704) - ..add(5705) - ..add(5706) - ..add(5707) - ..add(5708) - ..add(5709) - ..add(5710) - ..add(5711) - ..add(5712) - ..add(5713) - ..add(5714) - ..add(5715) - ..add(5716) - ..add(5717) - ..add(5718) - ..add(5719) - ..add(5720) - ..add(5721) - ..add(5722) - ..add(5723) - ..add(5724) - ..add(5725) - ..add(5726) - ..add(5727) - ..add(5728) - ..add(5729) - ..add(5730) - ..add(5731) - ..add(5732) - ..add(5733) - ..add(5734) - ..add(5735) - ..add(5736) - ..add(5737) - ..add(5738) - ..add(5739) - ..add(5740) - ..add(5741) - ..add(5742) - ..add(5743) - ..add(5744) - ..add(5745) - ..add(5746) - ..add(5747) - ..add(5748) - ..add(5749) - ..add(5750) - ..add(5751) - ..add(5752) - ..add(5753) - ..add(5754) - ..add(5755) - ..add(5756) - ..add(5757) - ..add(5758) - ..add(5759) - ..add(5760) - ..add(5761) - ..add(5762) - ..add(5763) - ..add(5764) - ..add(5765) - ..add(5766) - ..add(5767) - ..add(5768) - ..add(5769) - ..add(5770) - ..add(5771) - ..add(5772) - ..add(5773) - ..add(5774) - ..add(5775) - ..add(5776) - ..add(5777) - ..add(5778) - ..add(5779) - ..add(5780) - ..add(5781) - ..add(5782) - ..add(5783) - ..add(5784) - ..add(5785) - ..add(5786) - ..add(5787) - ..add(5788) - ..add(5789) - ..add(5790) - ..add(5791) - ..add(5792) - ..add(5793) - ..add(5794) - ..add(5795) - ..add(5796) - ..add(5797) - ..add(5798) - ..add(5799) - ..add(5800) - ..add(5801) - ..add(5802) - ..add(5803) - ..add(5804) - ..add(5805) - ..add(5806) - ..add(5807) - ..add(5808) - ..add(5809) - ..add(5810) - ..add(5811) - ..add(5812) - ..add(5813) - ..add(5814) - ..add(5815) - ..add(5816) - ..add(5817) - ..add(5818) - ..add(5819) - ..add(5820) - ..add(5821) - ..add(5822) - ..add(5823) - ..add(5824) - ..add(5825) - ..add(5826) - ..add(5827) - ..add(5828) - ..add(5829) - ..add(5830) - ..add(5831) - ..add(5832) - ..add(5833) - ..add(5834) - ..add(5835) - ..add(5836) - ..add(5837) - ..add(5838) - ..add(5839) - ..add(5840) - ..add(5841) - ..add(5842) - ..add(5843) - ..add(5844) - ..add(5845) - ..add(5846) - ..add(5847) - ..add(5848) - ..add(5849) - ..add(5850) - ..add(5851) - ..add(5852) - ..add(5853) - ..add(5854) - ..add(5855) - ..add(5856) - ..add(5857) - ..add(5858) - ..add(5859) - ..add(5860) - ..add(5861) - ..add(5862) - ..add(5863) - ..add(5864) - ..add(5865) - ..add(5866) - ..add(5867) - ..add(5868) - ..add(5869) - ..add(5870) - ..add(5871) - ..add(5872) - ..add(5873) - ..add(5874) - ..add(5875) - ..add(5876) - ..add(5877) - ..add(5878) - ..add(5879) - ..add(5880) - ..add(5881) - ..add(5882) - ..add(5883) - ..add(5884) - ..add(5885) - ..add(5886) - ..add(5887) - ..add(5888) - ..add(5889) - ..add(5890) - ..add(5891) - ..add(5892) - ..add(5893) - ..add(5894) - ..add(5895) - ..add(5896) - ..add(5897) - ..add(5898) - ..add(5899) - ..add(5900) - ..add(5901) - ..add(5902) - ..add(5903) - ..add(5904) - ..add(5905) - ..add(5906) - ..add(5907) - ..add(5908) - ..add(5909) - ..add(5910) - ..add(5911) - ..add(5912) - ..add(5913) - ..add(5914) - ..add(5915) - ..add(5916) - ..add(5917) - ..add(5918) - ..add(5919) - ..add(5920) - ..add(5921) - ..add(5922) - ..add(5923) - ..add(5924) - ..add(5925) - ..add(5926) - ..add(5927) - ..add(5928) - ..add(5929) - ..add(5930) - ..add(5931) - ..add(5932) - ..add(5933) - ..add(5934) - ..add(5935) - ..add(5936) - ..add(5937) - ..add(5938) - ..add(5939) - ..add(5940) - ..add(5941) - ..add(5942) - ..add(5943) - ..add(5944) - ..add(5945) - ..add(5946) - ..add(5947) - ..add(5948) - ..add(5949) - ..add(5950) - ..add(5951) - ..add(5952) - ..add(5953) - ..add(5954) - ..add(5955) - ..add(5956) - ..add(5957) - ..add(5958) - ..add(5959) - ..add(5960) - ..add(5961) - ..add(5962) - ..add(5963) - ..add(5964) - ..add(5965) - ..add(5966) - ..add(5967) - ..add(5968) - ..add(5969) - ..add(5970) - ..add(5971) - ..add(5972) - ..add(5973) - ..add(5974) - ..add(5975) - ..add(5976) - ..add(5977) - ..add(5978) - ..add(5979) - ..add(5980) - ..add(5981) - ..add(5982) - ..add(5983) - ..add(5984) - ..add(5985) - ..add(5986) - ..add(5987) - ..add(5988) - ..add(5989) - ..add(5990) - ..add(5991) - ..add(5992) - ..add(5993) - ..add(5994) - ..add(5995) - ..add(5996) - ..add(5997) - ..add(5998) - ..add(5999) - ..add(6000) - ..add(6001) - ..add(6002) - ..add(6003) - ..add(6004) - ..add(6005) - ..add(6006) - ..add(6007) - ..add(6008) - ..add(6009) - ..add(6010) - ..add(6011) - ..add(6012) - ..add(6013) - ..add(6014) - ..add(6015) - ..add(6016) - ..add(6017) - ..add(6018) - ..add(6019) - ..add(6020) - ..add(6021) - ..add(6022) - ..add(6023) - ..add(6024) - ..add(6025) - ..add(6026) - ..add(6027) - ..add(6028) - ..add(6029) - ..add(6030) - ..add(6031) - ..add(6032) - ..add(6033) - ..add(6034) - ..add(6035) - ..add(6036) - ..add(6037) - ..add(6038) - ..add(6039) - ..add(6040) - ..add(6041) - ..add(6042) - ..add(6043) - ..add(6044) - ..add(6045) - ..add(6046) - ..add(6047) - ..add(6048) - ..add(6049) - ..add(6050) - ..add(6051) - ..add(6052) - ..add(6053) - ..add(6054) - ..add(6055) - ..add(6056) - ..add(6057) - ..add(6058) - ..add(6059) - ..add(6060) - ..add(6061) - ..add(6062) - ..add(6063) - ..add(6064) - ..add(6065) - ..add(6066) - ..add(6067) - ..add(6068) - ..add(6069) - ..add(6070) - ..add(6071) - ..add(6072) - ..add(6073) - ..add(6074) - ..add(6075) - ..add(6076) - ..add(6077) - ..add(6078) - ..add(6079) - ..add(6080) - ..add(6081) - ..add(6082) - ..add(6083) - ..add(6084) - ..add(6085) - ..add(6086) - ..add(6087) - ..add(6088) - ..add(6089) - ..add(6090) - ..add(6091) - ..add(6092) - ..add(6093) - ..add(6094) - ..add(6095) - ..add(6096) - ..add(6097) - ..add(6098) - ..add(6099) - ..add(6100) - ..add(6101) - ..add(6102) - ..add(6103) - ..add(6104) - ..add(6105) - ..add(6106) - ..add(6107) - ..add(6108) - ..add(6109) - ..add(6110) - ..add(6111) - ..add(6112) - ..add(6113) - ..add(6114) - ..add(6115) - ..add(6116) - ..add(6117) - ..add(6118) - ..add(6119) - ..add(6120) - ..add(6121) - ..add(6122) - ..add(6123) - ..add(6124) - ..add(6125) - ..add(6126) - ..add(6127) - ..add(6128) - ..add(6129) - ..add(6130) - ..add(6131) - ..add(6132) - ..add(6133) - ..add(6134) - ..add(6135) - ..add(6136) - ..add(6137) - ..add(6138) - ..add(6139) - ..add(6140) - ..add(6141) - ..add(6142) - ..add(6143) - ..add(6144) - ..add(6145) - ..add(6146) - ..add(6147) - ..add(6148) - ..add(6149) - ..add(6150) - ..add(6151) - ..add(6152) - ..add(6153) - ..add(6154) - ..add(6155) - ..add(6156) - ..add(6157) - ..add(6158) - ..add(6159) - ..add(6160) - ..add(6161) - ..add(6162) - ..add(6163) - ..add(6164) - ..add(6165) - ..add(6166) - ..add(6167) - ..add(6168) - ..add(6169) - ..add(6170) - ..add(6171) - ..add(6172) - ..add(6173) - ..add(6174) - ..add(6175) - ..add(6176) - ..add(6177) - ..add(6178) - ..add(6179) - ..add(6180) - ..add(6181) - ..add(6182) - ..add(6183) - ..add(6184) - ..add(6185) - ..add(6186) - ..add(6187) - ..add(6188) - ..add(6189) - ..add(6190) - ..add(6191) - ..add(6192) - ..add(6193) - ..add(6194) - ..add(6195) - ..add(6196) - ..add(6197) - ..add(6198) - ..add(6199) - ..add(6200) - ..add(6201) - ..add(6202) - ..add(6203) - ..add(6204) - ..add(6205) - ..add(6206) - ..add(6207) - ..add(6208) - ..add(6209) - ..add(6210) - ..add(6211) - ..add(6212) - ..add(6213) - ..add(6214) - ..add(6215) - ..add(6216) - ..add(6217) - ..add(6218) - ..add(6219) - ..add(6220) - ..add(6221) - ..add(6222) - ..add(6223) - ..add(6224) - ..add(6225) - ..add(6226) - ..add(6227) - ..add(6228) - ..add(6229) - ..add(6230) - ..add(6231) - ..add(6232) - ..add(6233) - ..add(6234) - ..add(6235) - ..add(6236) - ..add(6237) - ..add(6238) - ..add(6239) - ..add(6240) - ..add(6241) - ..add(6242) - ..add(6243) - ..add(6244) - ..add(6245) - ..add(6246) - ..add(6247) - ..add(6248) - ..add(6249) - ..add(6250) - ..add(6251) - ..add(6252) - ..add(6253) - ..add(6254) - ..add(6255) - ..add(6256) - ..add(6257) - ..add(6258) - ..add(6259) - ..add(6260) - ..add(6261) - ..add(6262) - ..add(6263) - ..add(6264) - ..add(6265) - ..add(6266) - ..add(6267) - ..add(6268) - ..add(6269) - ..add(6270) - ..add(6271) - ..add(6272) - ..add(6273) - ..add(6274) - ..add(6275) - ..add(6276) - ..add(6277) - ..add(6278) - ..add(6279) - ..add(6280) - ..add(6281) - ..add(6282) - ..add(6283) - ..add(6284) - ..add(6285) - ..add(6286) - ..add(6287) - ..add(6288) - ..add(6289) - ..add(6290) - ..add(6291) - ..add(6292) - ..add(6293) - ..add(6294) - ..add(6295) - ..add(6296) - ..add(6297) - ..add(6298) - ..add(6299) - ..add(6300) - ..add(6301) - ..add(6302) - ..add(6303) - ..add(6304) - ..add(6305) - ..add(6306) - ..add(6307) - ..add(6308) - ..add(6309) - ..add(6310) - ..add(6311) - ..add(6312) - ..add(6313) - ..add(6314) - ..add(6315) - ..add(6316) - ..add(6317) - ..add(6318) - ..add(6319) - ..add(6320) - ..add(6321) - ..add(6322) - ..add(6323) - ..add(6324) - ..add(6325) - ..add(6326) - ..add(6327) - ..add(6328) - ..add(6329) - ..add(6330) - ..add(6331) - ..add(6332) - ..add(6333) - ..add(6334) - ..add(6335) - ..add(6336) - ..add(6337) - ..add(6338) - ..add(6339) - ..add(6340) - ..add(6341) - ..add(6342) - ..add(6343) - ..add(6344) - ..add(6345) - ..add(6346) - ..add(6347) - ..add(6348) - ..add(6349) - ..add(6350) - ..add(6351) - ..add(6352) - ..add(6353) - ..add(6354) - ..add(6355) - ..add(6356) - ..add(6357) - ..add(6358) - ..add(6359) - ..add(6360) - ..add(6361) - ..add(6362) - ..add(6363) - ..add(6364) - ..add(6365) - ..add(6366) - ..add(6367) - ..add(6368) - ..add(6369) - ..add(6370) - ..add(6371) - ..add(6372) - ..add(6373) - ..add(6374) - ..add(6375) - ..add(6376) - ..add(6377) - ..add(6378) - ..add(6379) - ..add(6380) - ..add(6381) - ..add(6382) - ..add(6383) - ..add(6384) - ..add(6385) - ..add(6386) - ..add(6387) - ..add(6388) - ..add(6389) - ..add(6390) - ..add(6391) - ..add(6392) - ..add(6393) - ..add(6394) - ..add(6395) - ..add(6396) - ..add(6397) - ..add(6398) - ..add(6399) - ..add(6400) - ..add(6401) - ..add(6402) - ..add(6403) - ..add(6404) - ..add(6405) - ..add(6406) - ..add(6407) - ..add(6408) - ..add(6409) - ..add(6410) - ..add(6411) - ..add(6412) - ..add(6413) - ..add(6414) - ..add(6415) - ..add(6416) - ..add(6417) - ..add(6418) - ..add(6419) - ..add(6420) - ..add(6421) - ..add(6422) - ..add(6423) - ..add(6424) - ..add(6425) - ..add(6426) - ..add(6427) - ..add(6428) - ..add(6429) - ..add(6430) - ..add(6431) - ..add(6432) - ..add(6433) - ..add(6434) - ..add(6435) - ..add(6436) - ..add(6437) - ..add(6438) - ..add(6439) - ..add(6440) - ..add(6441) - ..add(6442) - ..add(6443) - ..add(6444) - ..add(6445) - ..add(6446) - ..add(6447) - ..add(6448) - ..add(6449) - ..add(6450) - ..add(6451) - ..add(6452) - ..add(6453) - ..add(6454) - ..add(6455) - ..add(6456) - ..add(6457) - ..add(6458) - ..add(6459) - ..add(6460) - ..add(6461) - ..add(6462) - ..add(6463) - ..add(6464) - ..add(6465) - ..add(6466) - ..add(6467) - ..add(6468) - ..add(6469) - ..add(6470) - ..add(6471) - ..add(6472) - ..add(6473) - ..add(6474) - ..add(6475) - ..add(6476) - ..add(6477) - ..add(6478) - ..add(6479) - ..add(6480) - ..add(6481) - ..add(6482) - ..add(6483) - ..add(6484) - ..add(6485) - ..add(6486) - ..add(6487) - ..add(6488) - ..add(6489) - ..add(6490) - ..add(6491) - ..add(6492) - ..add(6493) - ..add(6494) - ..add(6495) - ..add(6496) - ..add(6497) - ..add(6498) - ..add(6499) - ..add(6500) - ..add(6501) - ..add(6502) - ..add(6503) - ..add(6504) - ..add(6505) - ..add(6506) - ..add(6507) - ..add(6508) - ..add(6509) - ..add(6510) - ..add(6511) - ..add(6512) - ..add(6513) - ..add(6514) - ..add(6515) - ..add(6516) - ..add(6517) - ..add(6518) - ..add(6519) - ..add(6520) - ..add(6521) - ..add(6522) - ..add(6523) - ..add(6524) - ..add(6525) - ..add(6526) - ..add(6527) - ..add(6528) - ..add(6529) - ..add(6530) - ..add(6531) - ..add(6532) - ..add(6533) - ..add(6534) - ..add(6535) - ..add(6536) - ..add(6537) - ..add(6538) - ..add(6539) - ..add(6540) - ..add(6541) - ..add(6542) - ..add(6543) - ..add(6544) - ..add(6545) - ..add(6546) - ..add(6547) - ..add(6548) - ..add(6549) - ..add(6550) - ..add(6551) - ..add(6552) - ..add(6553) - ..add(6554) - ..add(6555) - ..add(6556) - ..add(6557) - ..add(6558) - ..add(6559) - ..add(6560) - ..add(6561) - ..add(6562) - ..add(6563) - ..add(6564) - ..add(6565) - ..add(6566) - ..add(6567) - ..add(6568) - ..add(6569) - ..add(6570) - ..add(6571) - ..add(6572) - ..add(6573) - ..add(6574) - ..add(6575) - ..add(6576) - ..add(6577) - ..add(6578) - ..add(6579) - ..add(6580) - ..add(6581) - ..add(6582) - ..add(6583) - ..add(6584) - ..add(6585) - ..add(6586) - ..add(6587) - ..add(6588) - ..add(6589) - ..add(6590) - ..add(6591) - ..add(6592) - ..add(6593) - ..add(6594) - ..add(6595) - ..add(6596) - ..add(6597) - ..add(6598) - ..add(6599) - ..add(6600) - ..add(6601) - ..add(6602) - ..add(6603) - ..add(6604) - ..add(6605) - ..add(6606) - ..add(6607) - ..add(6608) - ..add(6609) - ..add(6610) - ..add(6611) - ..add(6612) - ..add(6613) - ..add(6614) - ..add(6615) - ..add(6616) - ..add(6617) - ..add(6618) - ..add(6619) - ..add(6620) - ..add(6621) - ..add(6622) - ..add(6623) - ..add(6624) - ..add(6625) - ..add(6626) - ..add(6627) - ..add(6628) - ..add(6629) - ..add(6630) - ..add(6631) - ..add(6632) - ..add(6633) - ..add(6634) - ..add(6635) - ..add(6636) - ..add(6637) - ..add(6638) - ..add(6639) - ..add(6640) - ..add(6641) - ..add(6642) - ..add(6643) - ..add(6644) - ..add(6645) - ..add(6646) - ..add(6647) - ..add(6648) - ..add(6649) - ..add(6650) - ..add(6651) - ..add(6652) - ..add(6653) - ..add(6654) - ..add(6655) - ..add(6656) - ..add(6657) - ..add(6658) - ..add(6659) - ..add(6660) - ..add(6661) - ..add(6662) - ..add(6663) - ..add(6664) - ..add(6665) - ..add(6666) - ..add(6667) - ..add(6668) - ..add(6669) - ..add(6670) - ..add(6671) - ..add(6672) - ..add(6673) - ..add(6674) - ..add(6675) - ..add(6676) - ..add(6677) - ..add(6678) - ..add(6679) - ..add(6680) - ..add(6681) - ..add(6682) - ..add(6683) - ..add(6684) - ..add(6685) - ..add(6686) - ..add(6687) - ..add(6688) - ..add(6689) - ..add(6690) - ..add(6691) - ..add(6692) - ..add(6693) - ..add(6694) - ..add(6695) - ..add(6696) - ..add(6697) - ..add(6698) - ..add(6699) - ..add(6700) - ..add(6701) - ..add(6702) - ..add(6703) - ..add(6704) - ..add(6705) - ..add(6706) - ..add(6707) - ..add(6708) - ..add(6709) - ..add(6710) - ..add(6711) - ..add(6712) - ..add(6713) - ..add(6714) - ..add(6715) - ..add(6716) - ..add(6717) - ..add(6718) - ..add(6719) - ..add(6720) - ..add(6721) - ..add(6722) - ..add(6723) - ..add(6724) - ..add(6725) - ..add(6726) - ..add(6727) - ..add(6728) - ..add(6729) - ..add(6730) - ..add(6731) - ..add(6732) - ..add(6733) - ..add(6734) - ..add(6735) - ..add(6736) - ..add(6737) - ..add(6738) - ..add(6739) - ..add(6740) - ..add(6741) - ..add(6742) - ..add(6743) - ..add(6744) - ..add(6745) - ..add(6746) - ..add(6747) - ..add(6748) - ..add(6749) - ..add(6750) - ..add(6751) - ..add(6752) - ..add(6753) - ..add(6754) - ..add(6755) - ..add(6756) - ..add(6757) - ..add(6758) - ..add(6759) - ..add(6760) - ..add(6761) - ..add(6762) - ..add(6763) - ..add(6764) - ..add(6765) - ..add(6766) - ..add(6767) - ..add(6768) - ..add(6769) - ..add(6770) - ..add(6771) - ..add(6772) - ..add(6773) - ..add(6774) - ..add(6775) - ..add(6776) - ..add(6777) - ..add(6778) - ..add(6779) - ..add(6780) - ..add(6781) - ..add(6782) - ..add(6783) - ..add(6784) - ..add(6785) - ..add(6786) - ..add(6787) - ..add(6788) - ..add(6789) - ..add(6790) - ..add(6791) - ..add(6792) - ..add(6793) - ..add(6794) - ..add(6795) - ..add(6796) - ..add(6797) - ..add(6798) - ..add(6799) - ..add(6800) - ..add(6801) - ..add(6802) - ..add(6803) - ..add(6804) - ..add(6805) - ..add(6806) - ..add(6807) - ..add(6808) - ..add(6809) - ..add(6810) - ..add(6811) - ..add(6812) - ..add(6813) - ..add(6814) - ..add(6815) - ..add(6816) - ..add(6817) - ..add(6818) - ..add(6819) - ..add(6820) - ..add(6821) - ..add(6822) - ..add(6823) - ..add(6824) - ..add(6825) - ..add(6826) - ..add(6827) - ..add(6828) - ..add(6829) - ..add(6830) - ..add(6831) - ..add(6832) - ..add(6833) - ..add(6834) - ..add(6835) - ..add(6836) - ..add(6837) - ..add(6838) - ..add(6839) - ..add(6840) - ..add(6841) - ..add(6842) - ..add(6843) - ..add(6844) - ..add(6845) - ..add(6846) - ..add(6847) - ..add(6848) - ..add(6849) - ..add(6850) - ..add(6851) - ..add(6852) - ..add(6853) - ..add(6854) - ..add(6855) - ..add(6856) - ..add(6857) - ..add(6858) - ..add(6859) - ..add(6860) - ..add(6861) - ..add(6862) - ..add(6863) - ..add(6864) - ..add(6865) - ..add(6866) - ..add(6867) - ..add(6868) - ..add(6869) - ..add(6870) - ..add(6871) - ..add(6872) - ..add(6873) - ..add(6874) - ..add(6875) - ..add(6876) - ..add(6877) - ..add(6878) - ..add(6879) - ..add(6880) - ..add(6881) - ..add(6882) - ..add(6883) - ..add(6884) - ..add(6885) - ..add(6886) - ..add(6887) - ..add(6888) - ..add(6889) - ..add(6890) - ..add(6891) - ..add(6892) - ..add(6893) - ..add(6894) - ..add(6895) - ..add(6896) - ..add(6897) - ..add(6898) - ..add(6899) - ..add(6900) - ..add(6901) - ..add(6902) - ..add(6903) - ..add(6904) - ..add(6905) - ..add(6906) - ..add(6907) - ..add(6908) - ..add(6909) - ..add(6910) - ..add(6911) - ..add(6912) - ..add(6913) - ..add(6914) - ..add(6915) - ..add(6916) - ..add(6917) - ..add(6918) - ..add(6919) - ..add(6920) - ..add(6921) - ..add(6922) - ..add(6923) - ..add(6924) - ..add(6925) - ..add(6926) - ..add(6927) - ..add(6928) - ..add(6929) - ..add(6930) - ..add(6931) - ..add(6932) - ..add(6933) - ..add(6934) - ..add(6935) - ..add(6936) - ..add(6937) - ..add(6938) - ..add(6939) - ..add(6940) - ..add(6941) - ..add(6942) - ..add(6943) - ..add(6944) - ..add(6945) - ..add(6946) - ..add(6947) - ..add(6948) - ..add(6949) - ..add(6950) - ..add(6951) - ..add(6952) - ..add(6953) - ..add(6954) - ..add(6955) - ..add(6956) - ..add(6957) - ..add(6958) - ..add(6959) - ..add(6960) - ..add(6961) - ..add(6962) - ..add(6963) - ..add(6964) - ..add(6965) - ..add(6966) - ..add(6967) - ..add(6968) - ..add(6969) - ..add(6970) - ..add(6971) - ..add(6972) - ..add(6973) - ..add(6974) - ..add(6975) - ..add(6976) - ..add(6977) - ..add(6978) - ..add(6979) - ..add(6980) - ..add(6981) - ..add(6982) - ..add(6983) - ..add(6984) - ..add(6985) - ..add(6986) - ..add(6987) - ..add(6988) - ..add(6989) - ..add(6990) - ..add(6991) - ..add(6992) - ..add(6993) - ..add(6994) - ..add(6995) - ..add(6996) - ..add(6997) - ..add(6998) - ..add(6999) - ..add(7000) - ..add(7001) - ..add(7002) - ..add(7003) - ..add(7004) - ..add(7005) - ..add(7006) - ..add(7007) - ..add(7008) - ..add(7009) - ..add(7010) - ..add(7011) - ..add(7012) - ..add(7013) - ..add(7014) - ..add(7015) - ..add(7016) - ..add(7017) - ..add(7018) - ..add(7019) - ..add(7020) - ..add(7021) - ..add(7022) - ..add(7023) - ..add(7024) - ..add(7025) - ..add(7026) - ..add(7027) - ..add(7028) - ..add(7029) - ..add(7030) - ..add(7031) - ..add(7032) - ..add(7033) - ..add(7034) - ..add(7035) - ..add(7036) - ..add(7037) - ..add(7038) - ..add(7039) - ..add(7040) - ..add(7041) - ..add(7042) - ..add(7043) - ..add(7044) - ..add(7045) - ..add(7046) - ..add(7047) - ..add(7048) - ..add(7049) - ..add(7050) - ..add(7051) - ..add(7052) - ..add(7053) - ..add(7054) - ..add(7055) - ..add(7056) - ..add(7057) - ..add(7058) - ..add(7059) - ..add(7060) - ..add(7061) - ..add(7062) - ..add(7063) - ..add(7064) - ..add(7065) - ..add(7066) - ..add(7067) - ..add(7068) - ..add(7069) - ..add(7070) - ..add(7071) - ..add(7072) - ..add(7073) - ..add(7074) - ..add(7075) - ..add(7076) - ..add(7077) - ..add(7078) - ..add(7079) - ..add(7080) - ..add(7081) - ..add(7082) - ..add(7083) - ..add(7084) - ..add(7085) - ..add(7086) - ..add(7087) - ..add(7088) - ..add(7089) - ..add(7090) - ..add(7091) - ..add(7092) - ..add(7093) - ..add(7094) - ..add(7095) - ..add(7096) - ..add(7097) - ..add(7098) - ..add(7099) - ..add(7100) - ..add(7101) - ..add(7102) - ..add(7103) - ..add(7104) - ..add(7105) - ..add(7106) - ..add(7107) - ..add(7108) - ..add(7109) - ..add(7110) - ..add(7111) - ..add(7112) - ..add(7113) - ..add(7114) - ..add(7115) - ..add(7116) - ..add(7117) - ..add(7118) - ..add(7119) - ..add(7120) - ..add(7121) - ..add(7122) - ..add(7123) - ..add(7124) - ..add(7125) - ..add(7126) - ..add(7127) - ..add(7128) - ..add(7129) - ..add(7130) - ..add(7131) - ..add(7132) - ..add(7133) - ..add(7134) - ..add(7135) - ..add(7136) - ..add(7137) - ..add(7138) - ..add(7139) - ..add(7140) - ..add(7141) - ..add(7142) - ..add(7143) - ..add(7144) - ..add(7145) - ..add(7146) - ..add(7147) - ..add(7148) - ..add(7149) - ..add(7150) - ..add(7151) - ..add(7152) - ..add(7153) - ..add(7154) - ..add(7155) - ..add(7156) - ..add(7157) - ..add(7158) - ..add(7159) - ..add(7160) - ..add(7161) - ..add(7162) - ..add(7163) - ..add(7164) - ..add(7165) - ..add(7166) - ..add(7167) - ..add(7168) - ..add(7169) - ..add(7170) - ..add(7171) - ..add(7172) - ..add(7173) - ..add(7174) - ..add(7175) - ..add(7176) - ..add(7177) - ..add(7178) - ..add(7179) - ..add(7180) - ..add(7181) - ..add(7182) - ..add(7183) - ..add(7184) - ..add(7185) - ..add(7186) - ..add(7187) - ..add(7188) - ..add(7189) - ..add(7190) - ..add(7191) - ..add(7192) - ..add(7193) - ..add(7194) - ..add(7195) - ..add(7196) - ..add(7197) - ..add(7198) - ..add(7199) - ..add(7200) - ..add(7201) - ..add(7202) - ..add(7203) - ..add(7204) - ..add(7205) - ..add(7206) - ..add(7207) - ..add(7208) - ..add(7209) - ..add(7210) - ..add(7211) - ..add(7212) - ..add(7213) - ..add(7214) - ..add(7215) - ..add(7216) - ..add(7217) - ..add(7218) - ..add(7219) - ..add(7220) - ..add(7221) - ..add(7222) - ..add(7223) - ..add(7224) - ..add(7225) - ..add(7226) - ..add(7227) - ..add(7228) - ..add(7229) - ..add(7230) - ..add(7231) - ..add(7232) - ..add(7233) - ..add(7234) - ..add(7235) - ..add(7236) - ..add(7237) - ..add(7238) - ..add(7239) - ..add(7240) - ..add(7241) - ..add(7242) - ..add(7243) - ..add(7244) - ..add(7245) - ..add(7246) - ..add(7247) - ..add(7248) - ..add(7249) - ..add(7250) - ..add(7251) - ..add(7252) - ..add(7253) - ..add(7254) - ..add(7255) - ..add(7256) - ..add(7257) - ..add(7258) - ..add(7259) - ..add(7260) - ..add(7261) - ..add(7262) - ..add(7263) - ..add(7264) - ..add(7265) - ..add(7266) - ..add(7267) - ..add(7268) - ..add(7269) - ..add(7270) - ..add(7271) - ..add(7272) - ..add(7273) - ..add(7274) - ..add(7275) - ..add(7276) - ..add(7277) - ..add(7278) - ..add(7279) - ..add(7280) - ..add(7281) - ..add(7282) - ..add(7283) - ..add(7284) - ..add(7285) - ..add(7286) - ..add(7287) - ..add(7288) - ..add(7289) - ..add(7290) - ..add(7291) - ..add(7292) - ..add(7293) - ..add(7294) - ..add(7295) - ..add(7296) - ..add(7297) - ..add(7298) - ..add(7299) - ..add(7300) - ..add(7301) - ..add(7302) - ..add(7303) - ..add(7304) - ..add(7305) - ..add(7306) - ..add(7307) - ..add(7308) - ..add(7309) - ..add(7310) - ..add(7311) - ..add(7312) - ..add(7313) - ..add(7314) - ..add(7315) - ..add(7316) - ..add(7317) - ..add(7318) - ..add(7319) - ..add(7320) - ..add(7321) - ..add(7322) - ..add(7323) - ..add(7324) - ..add(7325) - ..add(7326) - ..add(7327) - ..add(7328) - ..add(7329) - ..add(7330) - ..add(7331) - ..add(7332) - ..add(7333) - ..add(7334) - ..add(7335) - ..add(7336) - ..add(7337) - ..add(7338) - ..add(7339) - ..add(7340) - ..add(7341) - ..add(7342) - ..add(7343) - ..add(7344) - ..add(7345) - ..add(7346) - ..add(7347) - ..add(7348) - ..add(7349) - ..add(7350) - ..add(7351) - ..add(7352) - ..add(7353) - ..add(7354) - ..add(7355) - ..add(7356) - ..add(7357) - ..add(7358) - ..add(7359) - ..add(7360) - ..add(7361) - ..add(7362) - ..add(7363) - ..add(7364) - ..add(7365) - ..add(7366) - ..add(7367) - ..add(7368) - ..add(7369) - ..add(7370) - ..add(7371) - ..add(7372) - ..add(7373) - ..add(7374) - ..add(7375) - ..add(7376) - ..add(7377) - ..add(7378) - ..add(7379) - ..add(7380) - ..add(7381) - ..add(7382) - ..add(7383) - ..add(7384) - ..add(7385) - ..add(7386) - ..add(7387) - ..add(7388) - ..add(7389) - ..add(7390) - ..add(7391) - ..add(7392) - ..add(7393) - ..add(7394) - ..add(7395) - ..add(7396) - ..add(7397) - ..add(7398) - ..add(7399) - ..add(7400) - ..add(7401) - ..add(7402) - ..add(7403) - ..add(7404) - ..add(7405) - ..add(7406) - ..add(7407) - ..add(7408) - ..add(7409) - ..add(7410) - ..add(7411) - ..add(7412) - ..add(7413) - ..add(7414) - ..add(7415) - ..add(7416) - ..add(7417) - ..add(7418) - ..add(7419) - ..add(7420) - ..add(7421) - ..add(7422) - ..add(7423) - ..add(7424) - ..add(7425) - ..add(7426) - ..add(7427) - ..add(7428) - ..add(7429) - ..add(7430) - ..add(7431) - ..add(7432) - ..add(7433) - ..add(7434) - ..add(7435) - ..add(7436) - ..add(7437) - ..add(7438) - ..add(7439) - ..add(7440) - ..add(7441) - ..add(7442) - ..add(7443) - ..add(7444) - ..add(7445) - ..add(7446) - ..add(7447) - ..add(7448) - ..add(7449) - ..add(7450) - ..add(7451) - ..add(7452) - ..add(7453) - ..add(7454) - ..add(7455) - ..add(7456) - ..add(7457) - ..add(7458) - ..add(7459) - ..add(7460) - ..add(7461) - ..add(7462) - ..add(7463) - ..add(7464) - ..add(7465) - ..add(7466) - ..add(7467) - ..add(7468) - ..add(7469) - ..add(7470) - ..add(7471) - ..add(7472) - ..add(7473) - ..add(7474) - ..add(7475) - ..add(7476) - ..add(7477) - ..add(7478) - ..add(7479) - ..add(7480) - ..add(7481) - ..add(7482) - ..add(7483) - ..add(7484) - ..add(7485) - ..add(7486) - ..add(7487) - ..add(7488) - ..add(7489) - ..add(7490) - ..add(7491) - ..add(7492) - ..add(7493) - ..add(7494) - ..add(7495) - ..add(7496) - ..add(7497) - ..add(7498) - ..add(7499) - ..add(7500) - ..add(7501) - ..add(7502) - ..add(7503) - ..add(7504) - ..add(7505) - ..add(7506) - ..add(7507) - ..add(7508) - ..add(7509) - ..add(7510) - ..add(7511) - ..add(7512) - ..add(7513) - ..add(7514) - ..add(7515) - ..add(7516) - ..add(7517) - ..add(7518) - ..add(7519) - ..add(7520) - ..add(7521) - ..add(7522) - ..add(7523) - ..add(7524) - ..add(7525) - ..add(7526) - ..add(7527) - ..add(7528) - ..add(7529) - ..add(7530) - ..add(7531) - ..add(7532) - ..add(7533) - ..add(7534) - ..add(7535) - ..add(7536) - ..add(7537) - ..add(7538) - ..add(7539) - ..add(7540) - ..add(7541) - ..add(7542) - ..add(7543) - ..add(7544) - ..add(7545) - ..add(7546) - ..add(7547) - ..add(7548) - ..add(7549) - ..add(7550) - ..add(7551) - ..add(7552) - ..add(7553) - ..add(7554) - ..add(7555) - ..add(7556) - ..add(7557) - ..add(7558) - ..add(7559) - ..add(7560) - ..add(7561) - ..add(7562) - ..add(7563) - ..add(7564) - ..add(7565) - ..add(7566) - ..add(7567) - ..add(7568) - ..add(7569) - ..add(7570) - ..add(7571) - ..add(7572) - ..add(7573) - ..add(7574) - ..add(7575) - ..add(7576) - ..add(7577) - ..add(7578) - ..add(7579) - ..add(7580) - ..add(7581) - ..add(7582) - ..add(7583) - ..add(7584) - ..add(7585) - ..add(7586) - ..add(7587) - ..add(7588) - ..add(7589) - ..add(7590) - ..add(7591) - ..add(7592) - ..add(7593) - ..add(7594) - ..add(7595) - ..add(7596) - ..add(7597) - ..add(7598) - ..add(7599) - ..add(7600) - ..add(7601) - ..add(7602) - ..add(7603) - ..add(7604) - ..add(7605) - ..add(7606) - ..add(7607) - ..add(7608) - ..add(7609) - ..add(7610) - ..add(7611) - ..add(7612) - ..add(7613) - ..add(7614) - ..add(7615) - ..add(7616) - ..add(7617) - ..add(7618) - ..add(7619) - ..add(7620) - ..add(7621) - ..add(7622) - ..add(7623) - ..add(7624) - ..add(7625) - ..add(7626) - ..add(7627) - ..add(7628) - ..add(7629) - ..add(7630) - ..add(7631) - ..add(7632) - ..add(7633) - ..add(7634) - ..add(7635) - ..add(7636) - ..add(7637) - ..add(7638) - ..add(7639) - ..add(7640) - ..add(7641) - ..add(7642) - ..add(7643) - ..add(7644) - ..add(7645) - ..add(7646) - ..add(7647) - ..add(7648) - ..add(7649) - ..add(7650) - ..add(7651) - ..add(7652) - ..add(7653) - ..add(7654) - ..add(7655) - ..add(7656) - ..add(7657) - ..add(7658) - ..add(7659) - ..add(7660) - ..add(7661) - ..add(7662) - ..add(7663) - ..add(7664) - ..add(7665) - ..add(7666) - ..add(7667) - ..add(7668) - ..add(7669) - ..add(7670) - ..add(7671) - ..add(7672) - ..add(7673) - ..add(7674) - ..add(7675) - ..add(7676) - ..add(7677) - ..add(7678) - ..add(7679) - ..add(7680) - ..add(7681) - ..add(7682) - ..add(7683) - ..add(7684) - ..add(7685) - ..add(7686) - ..add(7687) - ..add(7688) - ..add(7689) - ..add(7690) - ..add(7691) - ..add(7692) - ..add(7693) - ..add(7694) - ..add(7695) - ..add(7696) - ..add(7697) - ..add(7698) - ..add(7699) - ..add(7700) - ..add(7701) - ..add(7702) - ..add(7703) - ..add(7704) - ..add(7705) - ..add(7706) - ..add(7707) - ..add(7708) - ..add(7709) - ..add(7710) - ..add(7711) - ..add(7712) - ..add(7713) - ..add(7714) - ..add(7715) - ..add(7716) - ..add(7717) - ..add(7718) - ..add(7719) - ..add(7720) - ..add(7721) - ..add(7722) - ..add(7723) - ..add(7724) - ..add(7725) - ..add(7726) - ..add(7727) - ..add(7728) - ..add(7729) - ..add(7730) - ..add(7731) - ..add(7732) - ..add(7733) - ..add(7734) - ..add(7735) - ..add(7736) - ..add(7737) - ..add(7738) - ..add(7739) - ..add(7740) - ..add(7741) - ..add(7742) - ..add(7743) - ..add(7744) - ..add(7745) - ..add(7746) - ..add(7747) - ..add(7748) - ..add(7749) - ..add(7750) - ..add(7751) - ..add(7752) - ..add(7753) - ..add(7754) - ..add(7755) - ..add(7756) - ..add(7757) - ..add(7758) - ..add(7759) - ..add(7760) - ..add(7761) - ..add(7762) - ..add(7763) - ..add(7764) - ..add(7765) - ..add(7766) - ..add(7767) - ..add(7768) - ..add(7769) - ..add(7770) - ..add(7771) - ..add(7772) - ..add(7773) - ..add(7774) - ..add(7775) - ..add(7776) - ..add(7777) - ..add(7778) - ..add(7779) - ..add(7780) - ..add(7781) - ..add(7782) - ..add(7783) - ..add(7784) - ..add(7785) - ..add(7786) - ..add(7787) - ..add(7788) - ..add(7789) - ..add(7790) - ..add(7791) - ..add(7792) - ..add(7793) - ..add(7794) - ..add(7795) - ..add(7796) - ..add(7797) - ..add(7798) - ..add(7799) - ..add(7800) - ..add(7801) - ..add(7802) - ..add(7803) - ..add(7804) - ..add(7805) - ..add(7806) - ..add(7807) - ..add(7808) - ..add(7809) - ..add(7810) - ..add(7811) - ..add(7812) - ..add(7813) - ..add(7814) - ..add(7815) - ..add(7816) - ..add(7817) - ..add(7818) - ..add(7819) - ..add(7820) - ..add(7821) - ..add(7822) - ..add(7823) - ..add(7824) - ..add(7825) - ..add(7826) - ..add(7827) - ..add(7828) - ..add(7829) - ..add(7830) - ..add(7831) - ..add(7832) - ..add(7833) - ..add(7834) - ..add(7835) - ..add(7836) - ..add(7837) - ..add(7838) - ..add(7839) - ..add(7840) - ..add(7841) - ..add(7842) - ..add(7843) - ..add(7844) - ..add(7845) - ..add(7846) - ..add(7847) - ..add(7848) - ..add(7849) - ..add(7850) - ..add(7851) - ..add(7852) - ..add(7853) - ..add(7854) - ..add(7855) - ..add(7856) - ..add(7857) - ..add(7858) - ..add(7859) - ..add(7860) - ..add(7861) - ..add(7862) - ..add(7863) - ..add(7864) - ..add(7865) - ..add(7866) - ..add(7867) - ..add(7868) - ..add(7869) - ..add(7870) - ..add(7871) - ..add(7872) - ..add(7873) - ..add(7874) - ..add(7875) - ..add(7876) - ..add(7877) - ..add(7878) - ..add(7879) - ..add(7880) - ..add(7881) - ..add(7882) - ..add(7883) - ..add(7884) - ..add(7885) - ..add(7886) - ..add(7887) - ..add(7888) - ..add(7889) - ..add(7890) - ..add(7891) - ..add(7892) - ..add(7893) - ..add(7894) - ..add(7895) - ..add(7896) - ..add(7897) - ..add(7898) - ..add(7899) - ..add(7900) - ..add(7901) - ..add(7902) - ..add(7903) - ..add(7904) - ..add(7905) - ..add(7906) - ..add(7907) - ..add(7908) - ..add(7909) - ..add(7910) - ..add(7911) - ..add(7912) - ..add(7913) - ..add(7914) - ..add(7915) - ..add(7916) - ..add(7917) - ..add(7918) - ..add(7919) - ..add(7920) - ..add(7921) - ..add(7922) - ..add(7923) - ..add(7924) - ..add(7925) - ..add(7926) - ..add(7927) - ..add(7928) - ..add(7929) - ..add(7930) - ..add(7931) - ..add(7932) - ..add(7933) - ..add(7934) - ..add(7935) - ..add(7936) - ..add(7937) - ..add(7938) - ..add(7939) - ..add(7940) - ..add(7941) - ..add(7942) - ..add(7943) - ..add(7944) - ..add(7945) - ..add(7946) - ..add(7947) - ..add(7948) - ..add(7949) - ..add(7950) - ..add(7951) - ..add(7952) - ..add(7953) - ..add(7954) - ..add(7955) - ..add(7956) - ..add(7957) - ..add(7958) - ..add(7959) - ..add(7960) - ..add(7961) - ..add(7962) - ..add(7963) - ..add(7964) - ..add(7965) - ..add(7966) - ..add(7967) - ..add(7968) - ..add(7969) - ..add(7970) - ..add(7971) - ..add(7972) - ..add(7973) - ..add(7974) - ..add(7975) - ..add(7976) - ..add(7977) - ..add(7978) - ..add(7979) - ..add(7980) - ..add(7981) - ..add(7982) - ..add(7983) - ..add(7984) - ..add(7985) - ..add(7986) - ..add(7987) - ..add(7988) - ..add(7989) - ..add(7990) - ..add(7991) - ..add(7992) - ..add(7993) - ..add(7994) - ..add(7995) - ..add(7996) - ..add(7997) - ..add(7998) - ..add(7999) - ..add(8000) - ..add(8001) - ..add(8002) - ..add(8003) - ..add(8004) - ..add(8005) - ..add(8006) - ..add(8007) - ..add(8008) - ..add(8009) - ..add(8010) - ..add(8011) - ..add(8012) - ..add(8013) - ..add(8014) - ..add(8015) - ..add(8016) - ..add(8017) - ..add(8018) - ..add(8019) - ..add(8020) - ..add(8021) - ..add(8022) - ..add(8023) - ..add(8024) - ..add(8025) - ..add(8026) - ..add(8027) - ..add(8028) - ..add(8029) - ..add(8030) - ..add(8031) - ..add(8032) - ..add(8033) - ..add(8034) - ..add(8035) - ..add(8036) - ..add(8037) - ..add(8038) - ..add(8039) - ..add(8040) - ..add(8041) - ..add(8042) - ..add(8043) - ..add(8044) - ..add(8045) - ..add(8046) - ..add(8047) - ..add(8048) - ..add(8049) - ..add(8050) - ..add(8051) - ..add(8052) - ..add(8053) - ..add(8054) - ..add(8055) - ..add(8056) - ..add(8057) - ..add(8058) - ..add(8059) - ..add(8060) - ..add(8061) - ..add(8062) - ..add(8063) - ..add(8064) - ..add(8065) - ..add(8066) - ..add(8067) - ..add(8068) - ..add(8069) - ..add(8070) - ..add(8071) - ..add(8072) - ..add(8073) - ..add(8074) - ..add(8075) - ..add(8076) - ..add(8077) - ..add(8078) - ..add(8079) - ..add(8080) - ..add(8081) - ..add(8082) - ..add(8083) - ..add(8084) - ..add(8085) - ..add(8086) - ..add(8087) - ..add(8088) - ..add(8089) - ..add(8090) - ..add(8091) - ..add(8092) - ..add(8093) - ..add(8094) - ..add(8095) - ..add(8096) - ..add(8097) - ..add(8098) - ..add(8099) - ..add(8100) - ..add(8101) - ..add(8102) - ..add(8103) - ..add(8104) - ..add(8105) - ..add(8106) - ..add(8107) - ..add(8108) - ..add(8109) - ..add(8110) - ..add(8111) - ..add(8112) - ..add(8113) - ..add(8114) - ..add(8115) - ..add(8116) - ..add(8117) - ..add(8118) - ..add(8119) - ..add(8120) - ..add(8121) - ..add(8122) - ..add(8123) - ..add(8124) - ..add(8125) - ..add(8126) - ..add(8127) - ..add(8128) - ..add(8129) - ..add(8130) - ..add(8131) - ..add(8132) - ..add(8133) - ..add(8134) - ..add(8135) - ..add(8136) - ..add(8137) - ..add(8138) - ..add(8139) - ..add(8140) - ..add(8141) - ..add(8142) - ..add(8143) - ..add(8144) - ..add(8145) - ..add(8146) - ..add(8147) - ..add(8148) - ..add(8149) - ..add(8150) - ..add(8151) - ..add(8152) - ..add(8153) - ..add(8154) - ..add(8155) - ..add(8156) - ..add(8157) - ..add(8158) - ..add(8159) - ..add(8160) - ..add(8161) - ..add(8162) - ..add(8163) - ..add(8164) - ..add(8165) - ..add(8166) - ..add(8167) - ..add(8168) - ..add(8169) - ..add(8170) - ..add(8171) - ..add(8172) - ..add(8173) - ..add(8174) - ..add(8175) - ..add(8176) - ..add(8177) - ..add(8178) - ..add(8179) - ..add(8180) - ..add(8181) - ..add(8182) - ..add(8183) - ..add(8184) - ..add(8185) - ..add(8186) - ..add(8187) - ..add(8188) - ..add(8189) - ..add(8190) - ..add(8191) - ..add(8192) - ..add(8193) - ..add(8194) - ..add(8195) - ..add(8196) - ..add(8197) - ..add(8198) - ..add(8199) - ..add(8200) - ..add(8201) - ..add(8202) - ..add(8203) - ..add(8204) - ..add(8205) - ..add(8206) - ..add(8207) - ..add(8208) - ..add(8209) - ..add(8210) - ..add(8211) - ..add(8212) - ..add(8213) - ..add(8214) - ..add(8215) - ..add(8216) - ..add(8217) - ..add(8218) - ..add(8219) - ..add(8220) - ..add(8221) - ..add(8222) - ..add(8223) - ..add(8224) - ..add(8225) - ..add(8226) - ..add(8227) - ..add(8228) - ..add(8229) - ..add(8230) - ..add(8231) - ..add(8232) - ..add(8233) - ..add(8234) - ..add(8235) - ..add(8236) - ..add(8237) - ..add(8238) - ..add(8239) - ..add(8240) - ..add(8241) - ..add(8242) - ..add(8243) - ..add(8244) - ..add(8245) - ..add(8246) - ..add(8247) - ..add(8248) - ..add(8249) - ..add(8250) - ..add(8251) - ..add(8252) - ..add(8253) - ..add(8254) - ..add(8255) - ..add(8256) - ..add(8257) - ..add(8258) - ..add(8259) - ..add(8260) - ..add(8261) - ..add(8262) - ..add(8263) - ..add(8264) - ..add(8265) - ..add(8266) - ..add(8267) - ..add(8268) - ..add(8269) - ..add(8270) - ..add(8271) - ..add(8272) - ..add(8273) - ..add(8274) - ..add(8275) - ..add(8276) - ..add(8277) - ..add(8278) - ..add(8279) - ..add(8280) - ..add(8281) - ..add(8282) - ..add(8283) - ..add(8284) - ..add(8285) - ..add(8286) - ..add(8287) - ..add(8288) - ..add(8289) - ..add(8290) - ..add(8291) - ..add(8292) - ..add(8293) - ..add(8294) - ..add(8295) - ..add(8296) - ..add(8297) - ..add(8298) - ..add(8299) - ..add(8300) - ..add(8301) - ..add(8302) - ..add(8303) - ..add(8304) - ..add(8305) - ..add(8306) - ..add(8307) - ..add(8308) - ..add(8309) - ..add(8310) - ..add(8311) - ..add(8312) - ..add(8313) - ..add(8314) - ..add(8315) - ..add(8316) - ..add(8317) - ..add(8318) - ..add(8319) - ..add(8320) - ..add(8321) - ..add(8322) - ..add(8323) - ..add(8324) - ..add(8325) - ..add(8326) - ..add(8327) - ..add(8328) - ..add(8329) - ..add(8330) - ..add(8331) - ..add(8332) - ..add(8333) - ..add(8334) - ..add(8335) - ..add(8336) - ..add(8337) - ..add(8338) - ..add(8339) - ..add(8340) - ..add(8341) - ..add(8342) - ..add(8343) - ..add(8344) - ..add(8345) - ..add(8346) - ..add(8347) - ..add(8348) - ..add(8349) - ..add(8350) - ..add(8351) - ..add(8352) - ..add(8353) - ..add(8354) - ..add(8355) - ..add(8356) - ..add(8357) - ..add(8358) - ..add(8359) - ..add(8360) - ..add(8361) - ..add(8362) - ..add(8363) - ..add(8364) - ..add(8365) - ..add(8366) - ..add(8367) - ..add(8368) - ..add(8369) - ..add(8370) - ..add(8371) - ..add(8372) - ..add(8373) - ..add(8374) - ..add(8375) - ..add(8376) - ..add(8377) - ..add(8378) - ..add(8379) - ..add(8380) - ..add(8381) - ..add(8382) - ..add(8383) - ..add(8384) - ..add(8385) - ..add(8386) - ..add(8387) - ..add(8388) - ..add(8389) - ..add(8390) - ..add(8391) - ..add(8392) - ..add(8393) - ..add(8394) - ..add(8395) - ..add(8396) - ..add(8397) - ..add(8398) - ..add(8399) - ..add(8400) - ..add(8401) - ..add(8402) - ..add(8403) - ..add(8404) - ..add(8405) - ..add(8406) - ..add(8407) - ..add(8408) - ..add(8409) - ..add(8410) - ..add(8411) - ..add(8412) - ..add(8413) - ..add(8414) - ..add(8415) - ..add(8416) - ..add(8417) - ..add(8418) - ..add(8419) - ..add(8420) - ..add(8421) - ..add(8422) - ..add(8423) - ..add(8424) - ..add(8425) - ..add(8426) - ..add(8427) - ..add(8428) - ..add(8429) - ..add(8430) - ..add(8431) - ..add(8432) - ..add(8433) - ..add(8434) - ..add(8435) - ..add(8436) - ..add(8437) - ..add(8438) - ..add(8439) - ..add(8440) - ..add(8441) - ..add(8442) - ..add(8443) - ..add(8444) - ..add(8445) - ..add(8446) - ..add(8447) - ..add(8448) - ..add(8449) - ..add(8450) - ..add(8451) - ..add(8452) - ..add(8453) - ..add(8454) - ..add(8455) - ..add(8456) - ..add(8457) - ..add(8458) - ..add(8459) - ..add(8460) - ..add(8461) - ..add(8462) - ..add(8463) - ..add(8464) - ..add(8465) - ..add(8466) - ..add(8467) - ..add(8468) - ..add(8469) - ..add(8470) - ..add(8471) - ..add(8472) - ..add(8473) - ..add(8474) - ..add(8475) - ..add(8476) - ..add(8477) - ..add(8478) - ..add(8479) - ..add(8480) - ..add(8481) - ..add(8482) - ..add(8483) - ..add(8484) - ..add(8485) - ..add(8486) - ..add(8487) - ..add(8488) - ..add(8489) - ..add(8490) - ..add(8491) - ..add(8492) - ..add(8493) - ..add(8494) - ..add(8495) - ..add(8496) - ..add(8497) - ..add(8498) - ..add(8499) - ..add(8500) - ..add(8501) - ..add(8502) - ..add(8503) - ..add(8504) - ..add(8505) - ..add(8506) - ..add(8507) - ..add(8508) - ..add(8509) - ..add(8510) - ..add(8511) - ..add(8512) - ..add(8513) - ..add(8514) - ..add(8515) - ..add(8516) - ..add(8517) - ..add(8518) - ..add(8519) - ..add(8520) - ..add(8521) - ..add(8522) - ..add(8523) - ..add(8524) - ..add(8525) - ..add(8526) - ..add(8527) - ..add(8528) - ..add(8529) - ..add(8530) - ..add(8531) - ..add(8532) - ..add(8533) - ..add(8534) - ..add(8535) - ..add(8536) - ..add(8537) - ..add(8538) - ..add(8539) - ..add(8540) - ..add(8541) - ..add(8542) - ..add(8543) - ..add(8544) - ..add(8545) - ..add(8546) - ..add(8547) - ..add(8548) - ..add(8549) - ..add(8550) - ..add(8551) - ..add(8552) - ..add(8553) - ..add(8554) - ..add(8555) - ..add(8556) - ..add(8557) - ..add(8558) - ..add(8559) - ..add(8560) - ..add(8561) - ..add(8562) - ..add(8563) - ..add(8564) - ..add(8565) - ..add(8566) - ..add(8567) - ..add(8568) - ..add(8569) - ..add(8570) - ..add(8571) - ..add(8572) - ..add(8573) - ..add(8574) - ..add(8575) - ..add(8576) - ..add(8577) - ..add(8578) - ..add(8579) - ..add(8580) - ..add(8581) - ..add(8582) - ..add(8583) - ..add(8584) - ..add(8585) - ..add(8586) - ..add(8587) - ..add(8588) - ..add(8589) - ..add(8590) - ..add(8591) - ..add(8592) - ..add(8593) - ..add(8594) - ..add(8595) - ..add(8596) - ..add(8597) - ..add(8598) - ..add(8599) - ..add(8600) - ..add(8601) - ..add(8602) - ..add(8603) - ..add(8604) - ..add(8605) - ..add(8606) - ..add(8607) - ..add(8608) - ..add(8609) - ..add(8610) - ..add(8611) - ..add(8612) - ..add(8613) - ..add(8614) - ..add(8615) - ..add(8616) - ..add(8617) - ..add(8618) - ..add(8619) - ..add(8620) - ..add(8621) - ..add(8622) - ..add(8623) - ..add(8624) - ..add(8625) - ..add(8626) - ..add(8627) - ..add(8628) - ..add(8629) - ..add(8630) - ..add(8631) - ..add(8632) - ..add(8633) - ..add(8634) - ..add(8635) - ..add(8636) - ..add(8637) - ..add(8638) - ..add(8639) - ..add(8640) - ..add(8641) - ..add(8642) - ..add(8643) - ..add(8644) - ..add(8645) - ..add(8646) - ..add(8647) - ..add(8648) - ..add(8649) - ..add(8650) - ..add(8651) - ..add(8652) - ..add(8653) - ..add(8654) - ..add(8655) - ..add(8656) - ..add(8657) - ..add(8658) - ..add(8659) - ..add(8660) - ..add(8661) - ..add(8662) - ..add(8663) - ..add(8664) - ..add(8665) - ..add(8666) - ..add(8667) - ..add(8668) - ..add(8669) - ..add(8670) - ..add(8671) - ..add(8672) - ..add(8673) - ..add(8674) - ..add(8675) - ..add(8676) - ..add(8677) - ..add(8678) - ..add(8679) - ..add(8680) - ..add(8681) - ..add(8682) - ..add(8683) - ..add(8684) - ..add(8685) - ..add(8686) - ..add(8687) - ..add(8688) - ..add(8689) - ..add(8690) - ..add(8691) - ..add(8692) - ..add(8693) - ..add(8694) - ..add(8695) - ..add(8696) - ..add(8697) - ..add(8698) - ..add(8699) - ..add(8700) - ..add(8701) - ..add(8702) - ..add(8703) - ..add(8704) - ..add(8705) - ..add(8706) - ..add(8707) - ..add(8708) - ..add(8709) - ..add(8710) - ..add(8711) - ..add(8712) - ..add(8713) - ..add(8714) - ..add(8715) - ..add(8716) - ..add(8717) - ..add(8718) - ..add(8719) - ..add(8720) - ..add(8721) - ..add(8722) - ..add(8723) - ..add(8724) - ..add(8725) - ..add(8726) - ..add(8727) - ..add(8728) - ..add(8729) - ..add(8730) - ..add(8731) - ..add(8732) - ..add(8733) - ..add(8734) - ..add(8735) - ..add(8736) - ..add(8737) - ..add(8738) - ..add(8739) - ..add(8740) - ..add(8741) - ..add(8742) - ..add(8743) - ..add(8744) - ..add(8745) - ..add(8746) - ..add(8747) - ..add(8748) - ..add(8749) - ..add(8750) - ..add(8751) - ..add(8752) - ..add(8753) - ..add(8754) - ..add(8755) - ..add(8756) - ..add(8757) - ..add(8758) - ..add(8759) - ..add(8760) - ..add(8761) - ..add(8762) - ..add(8763) - ..add(8764) - ..add(8765) - ..add(8766) - ..add(8767) - ..add(8768) - ..add(8769) - ..add(8770) - ..add(8771) - ..add(8772) - ..add(8773) - ..add(8774) - ..add(8775) - ..add(8776) - ..add(8777) - ..add(8778) - ..add(8779) - ..add(8780) - ..add(8781) - ..add(8782) - ..add(8783) - ..add(8784) - ..add(8785) - ..add(8786) - ..add(8787) - ..add(8788) - ..add(8789) - ..add(8790) - ..add(8791) - ..add(8792) - ..add(8793) - ..add(8794) - ..add(8795) - ..add(8796) - ..add(8797) - ..add(8798) - ..add(8799) - ..add(8800) - ..add(8801) - ..add(8802) - ..add(8803) - ..add(8804) - ..add(8805) - ..add(8806) - ..add(8807) - ..add(8808) - ..add(8809) - ..add(8810) - ..add(8811) - ..add(8812) - ..add(8813) - ..add(8814) - ..add(8815) - ..add(8816) - ..add(8817) - ..add(8818) - ..add(8819) - ..add(8820) - ..add(8821) - ..add(8822) - ..add(8823) - ..add(8824) - ..add(8825) - ..add(8826) - ..add(8827) - ..add(8828) - ..add(8829) - ..add(8830) - ..add(8831) - ..add(8832) - ..add(8833) - ..add(8834) - ..add(8835) - ..add(8836) - ..add(8837) - ..add(8838) - ..add(8839) - ..add(8840) - ..add(8841) - ..add(8842) - ..add(8843) - ..add(8844) - ..add(8845) - ..add(8846) - ..add(8847) - ..add(8848) - ..add(8849) - ..add(8850) - ..add(8851) - ..add(8852) - ..add(8853) - ..add(8854) - ..add(8855) - ..add(8856) - ..add(8857) - ..add(8858) - ..add(8859) - ..add(8860) - ..add(8861) - ..add(8862) - ..add(8863) - ..add(8864) - ..add(8865) - ..add(8866) - ..add(8867) - ..add(8868) - ..add(8869) - ..add(8870) - ..add(8871) - ..add(8872) - ..add(8873) - ..add(8874) - ..add(8875) - ..add(8876) - ..add(8877) - ..add(8878) - ..add(8879) - ..add(8880) - ..add(8881) - ..add(8882) - ..add(8883) - ..add(8884) - ..add(8885) - ..add(8886) - ..add(8887) - ..add(8888) - ..add(8889) - ..add(8890) - ..add(8891) - ..add(8892) - ..add(8893) - ..add(8894) - ..add(8895) - ..add(8896) - ..add(8897) - ..add(8898) - ..add(8899) - ..add(8900) - ..add(8901) - ..add(8902) - ..add(8903) - ..add(8904) - ..add(8905) - ..add(8906) - ..add(8907) - ..add(8908) - ..add(8909) - ..add(8910) - ..add(8911) - ..add(8912) - ..add(8913) - ..add(8914) - ..add(8915) - ..add(8916) - ..add(8917) - ..add(8918) - ..add(8919) - ..add(8920) - ..add(8921) - ..add(8922) - ..add(8923) - ..add(8924) - ..add(8925) - ..add(8926) - ..add(8927) - ..add(8928) - ..add(8929) - ..add(8930) - ..add(8931) - ..add(8932) - ..add(8933) - ..add(8934) - ..add(8935) - ..add(8936) - ..add(8937) - ..add(8938) - ..add(8939) - ..add(8940) - ..add(8941) - ..add(8942) - ..add(8943) - ..add(8944) - ..add(8945) - ..add(8946) - ..add(8947) - ..add(8948) - ..add(8949) - ..add(8950) - ..add(8951) - ..add(8952) - ..add(8953) - ..add(8954) - ..add(8955) - ..add(8956) - ..add(8957) - ..add(8958) - ..add(8959) - ..add(8960) - ..add(8961) - ..add(8962) - ..add(8963) - ..add(8964) - ..add(8965) - ..add(8966) - ..add(8967) - ..add(8968) - ..add(8969) - ..add(8970) - ..add(8971) - ..add(8972) - ..add(8973) - ..add(8974) - ..add(8975) - ..add(8976) - ..add(8977) - ..add(8978) - ..add(8979) - ..add(8980) - ..add(8981) - ..add(8982) - ..add(8983) - ..add(8984) - ..add(8985) - ..add(8986) - ..add(8987) - ..add(8988) - ..add(8989) - ..add(8990) - ..add(8991) - ..add(8992) - ..add(8993) - ..add(8994) - ..add(8995) - ..add(8996) - ..add(8997) - ..add(8998) - ..add(8999) - ..add(9000) - ..add(9001) - ..add(9002) - ..add(9003) - ..add(9004) - ..add(9005) - ..add(9006) - ..add(9007) - ..add(9008) - ..add(9009) - ..add(9010) - ..add(9011) - ..add(9012) - ..add(9013) - ..add(9014) - ..add(9015) - ..add(9016) - ..add(9017) - ..add(9018) - ..add(9019) - ..add(9020) - ..add(9021) - ..add(9022) - ..add(9023) - ..add(9024) - ..add(9025) - ..add(9026) - ..add(9027) - ..add(9028) - ..add(9029) - ..add(9030) - ..add(9031) - ..add(9032) - ..add(9033) - ..add(9034) - ..add(9035) - ..add(9036) - ..add(9037) - ..add(9038) - ..add(9039) - ..add(9040) - ..add(9041) - ..add(9042) - ..add(9043) - ..add(9044) - ..add(9045) - ..add(9046) - ..add(9047) - ..add(9048) - ..add(9049) - ..add(9050) - ..add(9051) - ..add(9052) - ..add(9053) - ..add(9054) - ..add(9055) - ..add(9056) - ..add(9057) - ..add(9058) - ..add(9059) - ..add(9060) - ..add(9061) - ..add(9062) - ..add(9063) - ..add(9064) - ..add(9065) - ..add(9066) - ..add(9067) - ..add(9068) - ..add(9069) - ..add(9070) - ..add(9071) - ..add(9072) - ..add(9073) - ..add(9074) - ..add(9075) - ..add(9076) - ..add(9077) - ..add(9078) - ..add(9079) - ..add(9080) - ..add(9081) - ..add(9082) - ..add(9083) - ..add(9084) - ..add(9085) - ..add(9086) - ..add(9087) - ..add(9088) - ..add(9089) - ..add(9090) - ..add(9091) - ..add(9092) - ..add(9093) - ..add(9094) - ..add(9095) - ..add(9096) - ..add(9097) - ..add(9098) - ..add(9099) - ..add(9100) - ..add(9101) - ..add(9102) - ..add(9103) - ..add(9104) - ..add(9105) - ..add(9106) - ..add(9107) - ..add(9108) - ..add(9109) - ..add(9110) - ..add(9111) - ..add(9112) - ..add(9113) - ..add(9114) - ..add(9115) - ..add(9116) - ..add(9117) - ..add(9118) - ..add(9119) - ..add(9120) - ..add(9121) - ..add(9122) - ..add(9123) - ..add(9124) - ..add(9125) - ..add(9126) - ..add(9127) - ..add(9128) - ..add(9129) - ..add(9130) - ..add(9131) - ..add(9132) - ..add(9133) - ..add(9134) - ..add(9135) - ..add(9136) - ..add(9137) - ..add(9138) - ..add(9139) - ..add(9140) - ..add(9141) - ..add(9142) - ..add(9143) - ..add(9144) - ..add(9145) - ..add(9146) - ..add(9147) - ..add(9148) - ..add(9149) - ..add(9150) - ..add(9151) - ..add(9152) - ..add(9153) - ..add(9154) - ..add(9155) - ..add(9156) - ..add(9157) - ..add(9158) - ..add(9159) - ..add(9160) - ..add(9161) - ..add(9162) - ..add(9163) - ..add(9164) - ..add(9165) - ..add(9166) - ..add(9167) - ..add(9168) - ..add(9169) - ..add(9170) - ..add(9171) - ..add(9172) - ..add(9173) - ..add(9174) - ..add(9175) - ..add(9176) - ..add(9177) - ..add(9178) - ..add(9179) - ..add(9180) - ..add(9181) - ..add(9182) - ..add(9183) - ..add(9184) - ..add(9185) - ..add(9186) - ..add(9187) - ..add(9188) - ..add(9189) - ..add(9190) - ..add(9191) - ..add(9192) - ..add(9193) - ..add(9194) - ..add(9195) - ..add(9196) - ..add(9197) - ..add(9198) - ..add(9199) - ..add(9200) - ..add(9201) - ..add(9202) - ..add(9203) - ..add(9204) - ..add(9205) - ..add(9206) - ..add(9207) - ..add(9208) - ..add(9209) - ..add(9210) - ..add(9211) - ..add(9212) - ..add(9213) - ..add(9214) - ..add(9215) - ..add(9216) - ..add(9217) - ..add(9218) - ..add(9219) - ..add(9220) - ..add(9221) - ..add(9222) - ..add(9223) - ..add(9224) - ..add(9225) - ..add(9226) - ..add(9227) - ..add(9228) - ..add(9229) - ..add(9230) - ..add(9231) - ..add(9232) - ..add(9233) - ..add(9234) - ..add(9235) - ..add(9236) - ..add(9237) - ..add(9238) - ..add(9239) - ..add(9240) - ..add(9241) - ..add(9242) - ..add(9243) - ..add(9244) - ..add(9245) - ..add(9246) - ..add(9247) - ..add(9248) - ..add(9249) - ..add(9250) - ..add(9251) - ..add(9252) - ..add(9253) - ..add(9254) - ..add(9255) - ..add(9256) - ..add(9257) - ..add(9258) - ..add(9259) - ..add(9260) - ..add(9261) - ..add(9262) - ..add(9263) - ..add(9264) - ..add(9265) - ..add(9266) - ..add(9267) - ..add(9268) - ..add(9269) - ..add(9270) - ..add(9271) - ..add(9272) - ..add(9273) - ..add(9274) - ..add(9275) - ..add(9276) - ..add(9277) - ..add(9278) - ..add(9279) - ..add(9280) - ..add(9281) - ..add(9282) - ..add(9283) - ..add(9284) - ..add(9285) - ..add(9286) - ..add(9287) - ..add(9288) - ..add(9289) - ..add(9290) - ..add(9291) - ..add(9292) - ..add(9293) - ..add(9294) - ..add(9295) - ..add(9296) - ..add(9297) - ..add(9298) - ..add(9299) - ..add(9300) - ..add(9301) - ..add(9302) - ..add(9303) - ..add(9304) - ..add(9305) - ..add(9306) - ..add(9307) - ..add(9308) - ..add(9309) - ..add(9310) - ..add(9311) - ..add(9312) - ..add(9313) - ..add(9314) - ..add(9315) - ..add(9316) - ..add(9317) - ..add(9318) - ..add(9319) - ..add(9320) - ..add(9321) - ..add(9322) - ..add(9323) - ..add(9324) - ..add(9325) - ..add(9326) - ..add(9327) - ..add(9328) - ..add(9329) - ..add(9330) - ..add(9331) - ..add(9332) - ..add(9333) - ..add(9334) - ..add(9335) - ..add(9336) - ..add(9337) - ..add(9338) - ..add(9339) - ..add(9340) - ..add(9341) - ..add(9342) - ..add(9343) - ..add(9344) - ..add(9345) - ..add(9346) - ..add(9347) - ..add(9348) - ..add(9349) - ..add(9350) - ..add(9351) - ..add(9352) - ..add(9353) - ..add(9354) - ..add(9355) - ..add(9356) - ..add(9357) - ..add(9358) - ..add(9359) - ..add(9360) - ..add(9361) - ..add(9362) - ..add(9363) - ..add(9364) - ..add(9365) - ..add(9366) - ..add(9367) - ..add(9368) - ..add(9369) - ..add(9370) - ..add(9371) - ..add(9372) - ..add(9373) - ..add(9374) - ..add(9375) - ..add(9376) - ..add(9377) - ..add(9378) - ..add(9379) - ..add(9380) - ..add(9381) - ..add(9382) - ..add(9383) - ..add(9384) - ..add(9385) - ..add(9386) - ..add(9387) - ..add(9388) - ..add(9389) - ..add(9390) - ..add(9391) - ..add(9392) - ..add(9393) - ..add(9394) - ..add(9395) - ..add(9396) - ..add(9397) - ..add(9398) - ..add(9399) - ..add(9400) - ..add(9401) - ..add(9402) - ..add(9403) - ..add(9404) - ..add(9405) - ..add(9406) - ..add(9407) - ..add(9408) - ..add(9409) - ..add(9410) - ..add(9411) - ..add(9412) - ..add(9413) - ..add(9414) - ..add(9415) - ..add(9416) - ..add(9417) - ..add(9418) - ..add(9419) - ..add(9420) - ..add(9421) - ..add(9422) - ..add(9423) - ..add(9424) - ..add(9425) - ..add(9426) - ..add(9427) - ..add(9428) - ..add(9429) - ..add(9430) - ..add(9431) - ..add(9432) - ..add(9433) - ..add(9434) - ..add(9435) - ..add(9436) - ..add(9437) - ..add(9438) - ..add(9439) - ..add(9440) - ..add(9441) - ..add(9442) - ..add(9443) - ..add(9444) - ..add(9445) - ..add(9446) - ..add(9447) - ..add(9448) - ..add(9449) - ..add(9450) - ..add(9451) - ..add(9452) - ..add(9453) - ..add(9454) - ..add(9455) - ..add(9456) - ..add(9457) - ..add(9458) - ..add(9459) - ..add(9460) - ..add(9461) - ..add(9462) - ..add(9463) - ..add(9464) - ..add(9465) - ..add(9466) - ..add(9467) - ..add(9468) - ..add(9469) - ..add(9470) - ..add(9471) - ..add(9472) - ..add(9473) - ..add(9474) - ..add(9475) - ..add(9476) - ..add(9477) - ..add(9478) - ..add(9479) - ..add(9480) - ..add(9481) - ..add(9482) - ..add(9483) - ..add(9484) - ..add(9485) - ..add(9486) - ..add(9487) - ..add(9488) - ..add(9489) - ..add(9490) - ..add(9491) - ..add(9492) - ..add(9493) - ..add(9494) - ..add(9495) - ..add(9496) - ..add(9497) - ..add(9498) - ..add(9499) - ..add(9500) - ..add(9501) - ..add(9502) - ..add(9503) - ..add(9504) - ..add(9505) - ..add(9506) - ..add(9507) - ..add(9508) - ..add(9509) - ..add(9510) - ..add(9511) - ..add(9512) - ..add(9513) - ..add(9514) - ..add(9515) - ..add(9516) - ..add(9517) - ..add(9518) - ..add(9519) - ..add(9520) - ..add(9521) - ..add(9522) - ..add(9523) - ..add(9524) - ..add(9525) - ..add(9526) - ..add(9527) - ..add(9528) - ..add(9529) - ..add(9530) - ..add(9531) - ..add(9532) - ..add(9533) - ..add(9534) - ..add(9535) - ..add(9536) - ..add(9537) - ..add(9538) - ..add(9539) - ..add(9540) - ..add(9541) - ..add(9542) - ..add(9543) - ..add(9544) - ..add(9545) - ..add(9546) - ..add(9547) - ..add(9548) - ..add(9549) - ..add(9550) - ..add(9551) - ..add(9552) - ..add(9553) - ..add(9554) - ..add(9555) - ..add(9556) - ..add(9557) - ..add(9558) - ..add(9559) - ..add(9560) - ..add(9561) - ..add(9562) - ..add(9563) - ..add(9564) - ..add(9565) - ..add(9566) - ..add(9567) - ..add(9568) - ..add(9569) - ..add(9570) - ..add(9571) - ..add(9572) - ..add(9573) - ..add(9574) - ..add(9575) - ..add(9576) - ..add(9577) - ..add(9578) - ..add(9579) - ..add(9580) - ..add(9581) - ..add(9582) - ..add(9583) - ..add(9584) - ..add(9585) - ..add(9586) - ..add(9587) - ..add(9588) - ..add(9589) - ..add(9590) - ..add(9591) - ..add(9592) - ..add(9593) - ..add(9594) - ..add(9595) - ..add(9596) - ..add(9597) - ..add(9598) - ..add(9599) - ..add(9600) - ..add(9601) - ..add(9602) - ..add(9603) - ..add(9604) - ..add(9605) - ..add(9606) - ..add(9607) - ..add(9608) - ..add(9609) - ..add(9610) - ..add(9611) - ..add(9612) - ..add(9613) - ..add(9614) - ..add(9615) - ..add(9616) - ..add(9617) - ..add(9618) - ..add(9619) - ..add(9620) - ..add(9621) - ..add(9622) - ..add(9623) - ..add(9624) - ..add(9625) - ..add(9626) - ..add(9627) - ..add(9628) - ..add(9629) - ..add(9630) - ..add(9631) - ..add(9632) - ..add(9633) - ..add(9634) - ..add(9635) - ..add(9636) - ..add(9637) - ..add(9638) - ..add(9639) - ..add(9640) - ..add(9641) - ..add(9642) - ..add(9643) - ..add(9644) - ..add(9645) - ..add(9646) - ..add(9647) - ..add(9648) - ..add(9649) - ..add(9650) - ..add(9651) - ..add(9652) - ..add(9653) - ..add(9654) - ..add(9655) - ..add(9656) - ..add(9657) - ..add(9658) - ..add(9659) - ..add(9660) - ..add(9661) - ..add(9662) - ..add(9663) - ..add(9664) - ..add(9665) - ..add(9666) - ..add(9667) - ..add(9668) - ..add(9669) - ..add(9670) - ..add(9671) - ..add(9672) - ..add(9673) - ..add(9674) - ..add(9675) - ..add(9676) - ..add(9677) - ..add(9678) - ..add(9679) - ..add(9680) - ..add(9681) - ..add(9682) - ..add(9683) - ..add(9684) - ..add(9685) - ..add(9686) - ..add(9687) - ..add(9688) - ..add(9689) - ..add(9690) - ..add(9691) - ..add(9692) - ..add(9693) - ..add(9694) - ..add(9695) - ..add(9696) - ..add(9697) - ..add(9698) - ..add(9699) - ..add(9700) - ..add(9701) - ..add(9702) - ..add(9703) - ..add(9704) - ..add(9705) - ..add(9706) - ..add(9707) - ..add(9708) - ..add(9709) - ..add(9710) - ..add(9711) - ..add(9712) - ..add(9713) - ..add(9714) - ..add(9715) - ..add(9716) - ..add(9717) - ..add(9718) - ..add(9719) - ..add(9720) - ..add(9721) - ..add(9722) - ..add(9723) - ..add(9724) - ..add(9725) - ..add(9726) - ..add(9727) - ..add(9728) - ..add(9729) - ..add(9730) - ..add(9731) - ..add(9732) - ..add(9733) - ..add(9734) - ..add(9735) - ..add(9736) - ..add(9737) - ..add(9738) - ..add(9739) - ..add(9740) - ..add(9741) - ..add(9742) - ..add(9743) - ..add(9744) - ..add(9745) - ..add(9746) - ..add(9747) - ..add(9748) - ..add(9749) - ..add(9750) - ..add(9751) - ..add(9752) - ..add(9753) - ..add(9754) - ..add(9755) - ..add(9756) - ..add(9757) - ..add(9758) - ..add(9759) - ..add(9760) - ..add(9761) - ..add(9762) - ..add(9763) - ..add(9764) - ..add(9765) - ..add(9766) - ..add(9767) - ..add(9768) - ..add(9769) - ..add(9770) - ..add(9771) - ..add(9772) - ..add(9773) - ..add(9774) - ..add(9775) - ..add(9776) - ..add(9777) - ..add(9778) - ..add(9779) - ..add(9780) - ..add(9781) - ..add(9782) - ..add(9783) - ..add(9784) - ..add(9785) - ..add(9786) - ..add(9787) - ..add(9788) - ..add(9789) - ..add(9790) - ..add(9791) - ..add(9792) - ..add(9793) - ..add(9794) - ..add(9795) - ..add(9796) - ..add(9797) - ..add(9798) - ..add(9799) - ..add(9800) - ..add(9801) - ..add(9802) - ..add(9803) - ..add(9804) - ..add(9805) - ..add(9806) - ..add(9807) - ..add(9808) - ..add(9809) - ..add(9810) - ..add(9811) - ..add(9812) - ..add(9813) - ..add(9814) - ..add(9815) - ..add(9816) - ..add(9817) - ..add(9818) - ..add(9819) - ..add(9820) - ..add(9821) - ..add(9822) - ..add(9823) - ..add(9824) - ..add(9825) - ..add(9826) - ..add(9827) - ..add(9828) - ..add(9829) - ..add(9830) - ..add(9831) - ..add(9832) - ..add(9833) - ..add(9834) - ..add(9835) - ..add(9836) - ..add(9837) - ..add(9838) - ..add(9839) - ..add(9840) - ..add(9841) - ..add(9842) - ..add(9843) - ..add(9844) - ..add(9845) - ..add(9846) - ..add(9847) - ..add(9848) - ..add(9849) - ..add(9850) - ..add(9851) - ..add(9852) - ..add(9853) - ..add(9854) - ..add(9855) - ..add(9856) - ..add(9857) - ..add(9858) - ..add(9859) - ..add(9860) - ..add(9861) - ..add(9862) - ..add(9863) - ..add(9864) - ..add(9865) - ..add(9866) - ..add(9867) - ..add(9868) - ..add(9869) - ..add(9870) - ..add(9871) - ..add(9872) - ..add(9873) - ..add(9874) - ..add(9875) - ..add(9876) - ..add(9877) - ..add(9878) - ..add(9879) - ..add(9880) - ..add(9881) - ..add(9882) - ..add(9883) - ..add(9884) - ..add(9885) - ..add(9886) - ..add(9887) - ..add(9888) - ..add(9889) - ..add(9890) - ..add(9891) - ..add(9892) - ..add(9893) - ..add(9894) - ..add(9895) - ..add(9896) - ..add(9897) - ..add(9898) - ..add(9899) - ..add(9900) - ..add(9901) - ..add(9902) - ..add(9903) - ..add(9904) - ..add(9905) - ..add(9906) - ..add(9907) - ..add(9908) - ..add(9909) - ..add(9910) - ..add(9911) - ..add(9912) - ..add(9913) - ..add(9914) - ..add(9915) - ..add(9916) - ..add(9917) - ..add(9918) - ..add(9919) - ..add(9920) - ..add(9921) - ..add(9922) - ..add(9923) - ..add(9924) - ..add(9925) - ..add(9926) - ..add(9927) - ..add(9928) - ..add(9929) - ..add(9930) - ..add(9931) - ..add(9932) - ..add(9933) - ..add(9934) - ..add(9935) - ..add(9936) - ..add(9937) - ..add(9938) - ..add(9939) - ..add(9940) - ..add(9941) - ..add(9942) - ..add(9943) - ..add(9944) - ..add(9945) - ..add(9946) - ..add(9947) - ..add(9948) - ..add(9949) - ..add(9950) - ..add(9951) - ..add(9952) - ..add(9953) - ..add(9954) - ..add(9955) - ..add(9956) - ..add(9957) - ..add(9958) - ..add(9959) - ..add(9960) - ..add(9961) - ..add(9962) - ..add(9963) - ..add(9964) - ..add(9965) - ..add(9966) - ..add(9967) - ..add(9968) - ..add(9969) - ..add(9970) - ..add(9971) - ..add(9972) - ..add(9973) - ..add(9974) - ..add(9975) - ..add(9976) - ..add(9977) - ..add(9978) - ..add(9979) - ..add(9980) - ..add(9981) - ..add(9982) - ..add(9983) - ..add(9984) - ..add(9985) - ..add(9986) - ..add(9987) - ..add(9988) - ..add(9989) - ..add(9990) - ..add(9991) - ..add(9992) - ..add(9993) - ..add(9994) - ..add(9995) - ..add(9996) - ..add(9997) - ..add(9998) - ..add(9999) - ..add(10000) - ..add(10001) - ..add(10002) - ..add(10003) - ..add(10004) - ..add(10005) - ..add(10006) - ..add(10007) - ..add(10008) - ..add(10009) - ..add(10010) - ..add(10011) - ..add(10012) - ..add(10013) - ..add(10014) - ..add(10015) - ..add(10016) - ..add(10017) - ..add(10018) - ..add(10019) - ..add(10020) - ..add(10021) - ..add(10022) - ..add(10023) - ..add(10024) - ..add(10025) - ..add(10026) - ..add(10027) - ..add(10028) - ..add(10029) - ..add(10030) - ..add(10031) - ..add(10032) - ..add(10033) - ..add(10034) - ..add(10035) - ..add(10036) - ..add(10037) - ..add(10038) - ..add(10039) - ..add(10040) - ..add(10041) - ..add(10042) - ..add(10043) - ..add(10044) - ..add(10045) - ..add(10046) - ..add(10047) - ..add(10048) - ..add(10049) - ..add(10050) - ..add(10051) - ..add(10052) - ..add(10053) - ..add(10054) - ..add(10055) - ..add(10056) - ..add(10057) - ..add(10058) - ..add(10059) - ..add(10060) - ..add(10061) - ..add(10062) - ..add(10063) - ..add(10064) - ..add(10065) - ..add(10066) - ..add(10067) - ..add(10068) - ..add(10069) - ..add(10070) - ..add(10071) - ..add(10072) - ..add(10073) - ..add(10074) - ..add(10075) - ..add(10076) - ..add(10077) - ..add(10078) - ..add(10079) - ..add(10080) - ..add(10081) - ..add(10082) - ..add(10083) - ..add(10084) - ..add(10085) - ..add(10086) - ..add(10087) - ..add(10088) - ..add(10089) - ..add(10090) - ..add(10091) - ..add(10092) - ..add(10093) - ..add(10094) - ..add(10095) - ..add(10096) - ..add(10097) - ..add(10098) - ..add(10099) - ..add(10100) - ..add(10101) - ..add(10102) - ..add(10103) - ..add(10104) - ..add(10105) - ..add(10106) - ..add(10107) - ..add(10108) - ..add(10109) - ..add(10110) - ..add(10111) - ..add(10112) - ..add(10113) - ..add(10114) - ..add(10115) - ..add(10116) - ..add(10117) - ..add(10118) - ..add(10119) - ..add(10120) - ..add(10121) - ..add(10122) - ..add(10123) - ..add(10124) - ..add(10125) - ..add(10126) - ..add(10127) - ..add(10128) - ..add(10129) - ..add(10130) - ..add(10131) - ..add(10132) - ..add(10133) - ..add(10134) - ..add(10135) - ..add(10136) - ..add(10137) - ..add(10138) - ..add(10139) - ..add(10140) - ..add(10141) - ..add(10142) - ..add(10143) - ..add(10144) - ..add(10145) - ..add(10146) - ..add(10147) - ..add(10148) - ..add(10149) - ..add(10150) - ..add(10151) - ..add(10152) - ..add(10153) - ..add(10154) - ..add(10155) - ..add(10156) - ..add(10157) - ..add(10158) - ..add(10159) - ..add(10160) - ..add(10161) - ..add(10162) - ..add(10163) - ..add(10164) - ..add(10165) - ..add(10166) - ..add(10167) - ..add(10168) - ..add(10169) - ..add(10170) - ..add(10171) - ..add(10172) - ..add(10173) - ..add(10174) - ..add(10175) - ..add(10176) - ..add(10177) - ..add(10178) - ..add(10179) - ..add(10180) - ..add(10181) - ..add(10182) - ..add(10183) - ..add(10184) - ..add(10185) - ..add(10186) - ..add(10187) - ..add(10188) - ..add(10189) - ..add(10190) - ..add(10191) - ..add(10192) - ..add(10193) - ..add(10194) - ..add(10195) - ..add(10196) - ..add(10197) - ..add(10198) - ..add(10199) - ..add(10200) - ..add(10201) - ..add(10202) - ..add(10203) - ..add(10204) - ..add(10205) - ..add(10206) - ..add(10207) - ..add(10208) - ..add(10209) - ..add(10210) - ..add(10211) - ..add(10212) - ..add(10213) - ..add(10214) - ..add(10215) - ..add(10216) - ..add(10217) - ..add(10218) - ..add(10219) - ..add(10220) - ..add(10221) - ..add(10222) - ..add(10223) - ..add(10224) - ..add(10225) - ..add(10226) - ..add(10227) - ..add(10228) - ..add(10229) - ..add(10230) - ..add(10231) - ..add(10232) - ..add(10233) - ..add(10234) - ..add(10235) - ..add(10236) - ..add(10237) - ..add(10238) - ..add(10239) - ..add(10240) - ..add(10241) - ..add(10242) - ..add(10243) - ..add(10244) - ..add(10245) - ..add(10246) - ..add(10247) - ..add(10248) - ..add(10249) - ..add(10250) - ..add(10251) - ..add(10252) - ..add(10253) - ..add(10254) - ..add(10255) - ..add(10256) - ..add(10257) - ..add(10258) - ..add(10259) - ..add(10260) - ..add(10261) - ..add(10262) - ..add(10263) - ..add(10264) - ..add(10265) - ..add(10266) - ..add(10267) - ..add(10268) - ..add(10269) - ..add(10270) - ..add(10271) - ..add(10272) - ..add(10273) - ..add(10274) - ..add(10275) - ..add(10276) - ..add(10277) - ..add(10278) - ..add(10279) - ..add(10280) - ..add(10281) - ..add(10282) - ..add(10283) - ..add(10284) - ..add(10285) - ..add(10286) - ..add(10287) - ..add(10288) - ..add(10289) - ..add(10290) - ..add(10291) - ..add(10292) - ..add(10293) - ..add(10294) - ..add(10295) - ..add(10296) - ..add(10297) - ..add(10298) - ..add(10299) - ..add(10300) - ..add(10301) - ..add(10302) - ..add(10303) - ..add(10304) - ..add(10305) - ..add(10306) - ..add(10307) - ..add(10308) - ..add(10309) - ..add(10310) - ..add(10311) - ..add(10312) - ..add(10313) - ..add(10314) - ..add(10315) - ..add(10316) - ..add(10317) - ..add(10318) - ..add(10319) - ..add(10320) - ..add(10321) - ..add(10322) - ..add(10323) - ..add(10324) - ..add(10325) - ..add(10326) - ..add(10327) - ..add(10328) - ..add(10329) - ..add(10330) - ..add(10331) - ..add(10332) - ..add(10333) - ..add(10334) - ..add(10335) - ..add(10336) - ..add(10337) - ..add(10338) - ..add(10339) - ..add(10340) - ..add(10341) - ..add(10342) - ..add(10343) - ..add(10344) - ..add(10345) - ..add(10346) - ..add(10347) - ..add(10348) - ..add(10349) - ..add(10350) - ..add(10351) - ..add(10352) - ..add(10353) - ..add(10354) - ..add(10355) - ..add(10356) - ..add(10357) - ..add(10358) - ..add(10359) - ..add(10360) - ..add(10361) - ..add(10362) - ..add(10363) - ..add(10364) - ..add(10365) - ..add(10366) - ..add(10367) - ..add(10368) - ..add(10369) - ..add(10370) - ..add(10371) - ..add(10372) - ..add(10373) - ..add(10374) - ..add(10375) - ..add(10376) - ..add(10377) - ..add(10378) - ..add(10379) - ..add(10380) - ..add(10381) - ..add(10382) - ..add(10383) - ..add(10384) - ..add(10385) - ..add(10386) - ..add(10387) - ..add(10388) - ..add(10389) - ..add(10390) - ..add(10391) - ..add(10392) - ..add(10393) - ..add(10394) - ..add(10395) - ..add(10396) - ..add(10397) - ..add(10398) - ..add(10399) - ..add(10400) - ..add(10401) - ..add(10402) - ..add(10403) - ..add(10404) - ..add(10405) - ..add(10406) - ..add(10407) - ..add(10408) - ..add(10409) - ..add(10410) - ..add(10411) - ..add(10412) - ..add(10413) - ..add(10414) - ..add(10415) - ..add(10416) - ..add(10417) - ..add(10418) - ..add(10419) - ..add(10420) - ..add(10421) - ..add(10422) - ..add(10423) - ..add(10424) - ..add(10425) - ..add(10426) - ..add(10427) - ..add(10428) - ..add(10429) - ..add(10430) - ..add(10431) - ..add(10432) - ..add(10433) - ..add(10434) - ..add(10435) - ..add(10436) - ..add(10437) - ..add(10438) - ..add(10439) - ..add(10440) - ..add(10441) - ..add(10442) - ..add(10443) - ..add(10444) - ..add(10445) - ..add(10446) - ..add(10447) - ..add(10448) - ..add(10449) - ..add(10450) - ..add(10451) - ..add(10452) - ..add(10453) - ..add(10454) - ..add(10455) - ..add(10456) - ..add(10457) - ..add(10458) - ..add(10459) - ..add(10460) - ..add(10461) - ..add(10462) - ..add(10463) - ..add(10464) - ..add(10465) - ..add(10466) - ..add(10467) - ..add(10468) - ..add(10469) - ..add(10470) - ..add(10471) - ..add(10472) - ..add(10473) - ..add(10474) - ..add(10475) - ..add(10476) - ..add(10477) - ..add(10478) - ..add(10479) - ..add(10480) - ..add(10481) - ..add(10482) - ..add(10483) - ..add(10484) - ..add(10485) - ..add(10486) - ..add(10487) - ..add(10488) - ..add(10489) - ..add(10490) - ..add(10491) - ..add(10492) - ..add(10493) - ..add(10494) - ..add(10495) - ..add(10496) - ..add(10497) - ..add(10498) - ..add(10499) - ..add(10500) - ..add(10501) - ..add(10502) - ..add(10503) - ..add(10504) - ..add(10505) - ..add(10506) - ..add(10507) - ..add(10508) - ..add(10509) - ..add(10510) - ..add(10511) - ..add(10512) - ..add(10513) - ..add(10514) - ..add(10515) - ..add(10516) - ..add(10517) - ..add(10518) - ..add(10519) - ..add(10520) - ..add(10521) - ..add(10522) - ..add(10523) - ..add(10524) - ..add(10525) - ..add(10526) - ..add(10527) - ..add(10528) - ..add(10529) - ..add(10530) - ..add(10531) - ..add(10532) - ..add(10533) - ..add(10534) - ..add(10535) - ..add(10536) - ..add(10537) - ..add(10538) - ..add(10539) - ..add(10540) - ..add(10541) - ..add(10542) - ..add(10543) - ..add(10544) - ..add(10545) - ..add(10546) - ..add(10547) - ..add(10548) - ..add(10549) - ..add(10550) - ..add(10551) - ..add(10552) - ..add(10553) - ..add(10554) - ..add(10555) - ..add(10556) - ..add(10557) - ..add(10558) - ..add(10559) - ..add(10560) - ..add(10561) - ..add(10562) - ..add(10563) - ..add(10564) - ..add(10565) - ..add(10566) - ..add(10567) - ..add(10568) - ..add(10569) - ..add(10570) - ..add(10571) - ..add(10572) - ..add(10573) - ..add(10574) - ..add(10575) - ..add(10576) - ..add(10577) - ..add(10578) - ..add(10579) - ..add(10580) - ..add(10581) - ..add(10582) - ..add(10583) - ..add(10584) - ..add(10585) - ..add(10586) - ..add(10587) - ..add(10588) - ..add(10589) - ..add(10590) - ..add(10591) - ..add(10592) - ..add(10593) - ..add(10594) - ..add(10595) - ..add(10596) - ..add(10597) - ..add(10598) - ..add(10599) - ..add(10600) - ..add(10601) - ..add(10602) - ..add(10603) - ..add(10604) - ..add(10605) - ..add(10606) - ..add(10607) - ..add(10608) - ..add(10609) - ..add(10610) - ..add(10611) - ..add(10612) - ..add(10613) - ..add(10614) - ..add(10615) - ..add(10616) - ..add(10617) - ..add(10618) - ..add(10619) - ..add(10620) - ..add(10621) - ..add(10622) - ..add(10623) - ..add(10624) - ..add(10625) - ..add(10626) - ..add(10627) - ..add(10628) - ..add(10629) - ..add(10630) - ..add(10631) - ..add(10632) - ..add(10633) - ..add(10634) - ..add(10635) - ..add(10636) - ..add(10637) - ..add(10638) - ..add(10639) - ..add(10640) - ..add(10641) - ..add(10642) - ..add(10643) - ..add(10644) - ..add(10645) - ..add(10646) - ..add(10647) - ..add(10648) - ..add(10649) - ..add(10650) - ..add(10651) - ..add(10652) - ..add(10653) - ..add(10654) - ..add(10655) - ..add(10656) - ..add(10657) - ..add(10658) - ..add(10659) - ..add(10660) - ..add(10661) - ..add(10662) - ..add(10663) - ..add(10664) - ..add(10665) - ..add(10666) - ..add(10667) - ..add(10668) - ..add(10669) - ..add(10670) - ..add(10671) - ..add(10672) - ..add(10673) - ..add(10674) - ..add(10675) - ..add(10676) - ..add(10677) - ..add(10678) - ..add(10679) - ..add(10680) - ..add(10681) - ..add(10682) - ..add(10683) - ..add(10684) - ..add(10685) - ..add(10686) - ..add(10687) - ..add(10688) - ..add(10689) - ..add(10690) - ..add(10691) - ..add(10692) - ..add(10693) - ..add(10694) - ..add(10695) - ..add(10696) - ..add(10697) - ..add(10698) - ..add(10699) - ..add(10700) - ..add(10701) - ..add(10702) - ..add(10703) - ..add(10704) - ..add(10705) - ..add(10706) - ..add(10707) - ..add(10708) - ..add(10709) - ..add(10710) - ..add(10711) - ..add(10712) - ..add(10713) - ..add(10714) - ..add(10715) - ..add(10716) - ..add(10717) - ..add(10718) - ..add(10719) - ..add(10720) - ..add(10721) - ..add(10722) - ..add(10723) - ..add(10724) - ..add(10725) - ..add(10726) - ..add(10727) - ..add(10728) - ..add(10729) - ..add(10730) - ..add(10731) - ..add(10732) - ..add(10733) - ..add(10734) - ..add(10735) - ..add(10736) - ..add(10737) - ..add(10738) - ..add(10739) - ..add(10740) - ..add(10741) - ..add(10742) - ..add(10743) - ..add(10744) - ..add(10745) - ..add(10746) - ..add(10747) - ..add(10748) - ..add(10749) - ..add(10750) - ..add(10751) - ..add(10752) - ..add(10753) - ..add(10754) - ..add(10755) - ..add(10756) - ..add(10757) - ..add(10758) - ..add(10759) - ..add(10760) - ..add(10761) - ..add(10762) - ..add(10763) - ..add(10764) - ..add(10765) - ..add(10766) - ..add(10767) - ..add(10768) - ..add(10769) - ..add(10770) - ..add(10771) - ..add(10772) - ..add(10773) - ..add(10774) - ..add(10775) - ..add(10776) - ..add(10777) - ..add(10778) - ..add(10779) - ..add(10780) - ..add(10781) - ..add(10782) - ..add(10783) - ..add(10784) - ..add(10785) - ..add(10786) - ..add(10787) - ..add(10788) - ..add(10789) - ..add(10790) - ..add(10791) - ..add(10792) - ..add(10793) - ..add(10794) - ..add(10795) - ..add(10796) - ..add(10797) - ..add(10798) - ..add(10799) - ..add(10800) - ..add(10801) - ..add(10802) - ..add(10803) - ..add(10804) - ..add(10805) - ..add(10806) - ..add(10807) - ..add(10808) - ..add(10809) - ..add(10810) - ..add(10811) - ..add(10812) - ..add(10813) - ..add(10814) - ..add(10815) - ..add(10816) - ..add(10817) - ..add(10818) - ..add(10819) - ..add(10820) - ..add(10821) - ..add(10822) - ..add(10823) - ..add(10824) - ..add(10825) - ..add(10826) - ..add(10827) - ..add(10828) - ..add(10829) - ..add(10830) - ..add(10831) - ..add(10832) - ..add(10833) - ..add(10834) - ..add(10835) - ..add(10836) - ..add(10837) - ..add(10838) - ..add(10839) - ..add(10840) - ..add(10841) - ..add(10842) - ..add(10843) - ..add(10844) - ..add(10845) - ..add(10846) - ..add(10847) - ..add(10848) - ..add(10849) - ..add(10850) - ..add(10851) - ..add(10852) - ..add(10853) - ..add(10854) - ..add(10855) - ..add(10856) - ..add(10857) - ..add(10858) - ..add(10859) - ..add(10860) - ..add(10861) - ..add(10862) - ..add(10863) - ..add(10864) - ..add(10865) - ..add(10866) - ..add(10867) - ..add(10868) - ..add(10869) - ..add(10870) - ..add(10871) - ..add(10872) - ..add(10873) - ..add(10874) - ..add(10875) - ..add(10876) - ..add(10877) - ..add(10878) - ..add(10879) - ..add(10880) - ..add(10881) - ..add(10882) - ..add(10883) - ..add(10884) - ..add(10885) - ..add(10886) - ..add(10887) - ..add(10888) - ..add(10889) - ..add(10890) - ..add(10891) - ..add(10892) - ..add(10893) - ..add(10894) - ..add(10895) - ..add(10896) - ..add(10897) - ..add(10898) - ..add(10899) - ..add(10900) - ..add(10901) - ..add(10902) - ..add(10903) - ..add(10904) - ..add(10905) - ..add(10906) - ..add(10907) - ..add(10908) - ..add(10909) - ..add(10910) - ..add(10911) - ..add(10912) - ..add(10913) - ..add(10914) - ..add(10915) - ..add(10916) - ..add(10917) - ..add(10918) - ..add(10919) - ..add(10920) - ..add(10921) - ..add(10922) - ..add(10923) - ..add(10924) - ..add(10925) - ..add(10926) - ..add(10927) - ..add(10928) - ..add(10929) - ..add(10930) - ..add(10931) - ..add(10932) - ..add(10933) - ..add(10934) - ..add(10935) - ..add(10936) - ..add(10937) - ..add(10938) - ..add(10939) - ..add(10940) - ..add(10941) - ..add(10942) - ..add(10943) - ..add(10944) - ..add(10945) - ..add(10946) - ..add(10947) - ..add(10948) - ..add(10949) - ..add(10950) - ..add(10951) - ..add(10952) - ..add(10953) - ..add(10954) - ..add(10955) - ..add(10956) - ..add(10957) - ..add(10958) - ..add(10959) - ..add(10960) - ..add(10961) - ..add(10962) - ..add(10963) - ..add(10964) - ..add(10965) - ..add(10966) - ..add(10967) - ..add(10968) - ..add(10969) - ..add(10970) - ..add(10971) - ..add(10972) - ..add(10973) - ..add(10974) - ..add(10975) - ..add(10976) - ..add(10977) - ..add(10978) - ..add(10979) - ..add(10980) - ..add(10981) - ..add(10982) - ..add(10983) - ..add(10984) - ..add(10985) - ..add(10986) - ..add(10987) - ..add(10988) - ..add(10989) - ..add(10990) - ..add(10991) - ..add(10992) - ..add(10993) - ..add(10994) - ..add(10995) - ..add(10996) - ..add(10997) - ..add(10998) - ..add(10999) - ..add(11000) - ..add(11001) - ..add(11002) - ..add(11003) - ..add(11004) - ..add(11005) - ..add(11006) - ..add(11007) - ..add(11008) - ..add(11009) - ..add(11010) - ..add(11011) - ..add(11012) - ..add(11013) - ..add(11014) - ..add(11015) - ..add(11016) - ..add(11017) - ..add(11018) - ..add(11019) - ..add(11020) - ..add(11021) - ..add(11022) - ..add(11023) - ..add(11024) - ..add(11025) - ..add(11026) - ..add(11027) - ..add(11028) - ..add(11029) - ..add(11030) - ..add(11031) - ..add(11032) - ..add(11033) - ..add(11034) - ..add(11035) - ..add(11036) - ..add(11037) - ..add(11038) - ..add(11039) - ..add(11040) - ..add(11041) - ..add(11042) - ..add(11043) - ..add(11044) - ..add(11045) - ..add(11046) - ..add(11047) - ..add(11048) - ..add(11049) - ..add(11050) - ..add(11051) - ..add(11052) - ..add(11053) - ..add(11054) - ..add(11055) - ..add(11056) - ..add(11057) - ..add(11058) - ..add(11059) - ..add(11060) - ..add(11061) - ..add(11062) - ..add(11063) - ..add(11064) - ..add(11065) - ..add(11066) - ..add(11067) - ..add(11068) - ..add(11069) - ..add(11070) - ..add(11071) - ..add(11072) - ..add(11073) - ..add(11074) - ..add(11075) - ..add(11076) - ..add(11077) - ..add(11078) - ..add(11079) - ..add(11080) - ..add(11081) - ..add(11082) - ..add(11083) - ..add(11084) - ..add(11085) - ..add(11086) - ..add(11087) - ..add(11088) - ..add(11089) - ..add(11090) - ..add(11091) - ..add(11092) - ..add(11093) - ..add(11094) - ..add(11095) - ..add(11096) - ..add(11097) - ..add(11098) - ..add(11099) - ..add(11100) - ..add(11101) - ..add(11102) - ..add(11103) - ..add(11104) - ..add(11105) - ..add(11106) - ..add(11107) - ..add(11108) - ..add(11109) - ..add(11110) - ..add(11111) - ..add(11112) - ..add(11113) - ..add(11114) - ..add(11115) - ..add(11116) - ..add(11117) - ..add(11118) - ..add(11119) - ..add(11120) - ..add(11121) - ..add(11122) - ..add(11123) - ..add(11124) - ..add(11125) - ..add(11126) - ..add(11127) - ..add(11128) - ..add(11129) - ..add(11130) - ..add(11131) - ..add(11132) - ..add(11133) - ..add(11134) - ..add(11135) - ..add(11136) - ..add(11137) - ..add(11138) - ..add(11139) - ..add(11140) - ..add(11141) - ..add(11142) - ..add(11143) - ..add(11144) - ..add(11145) - ..add(11146) - ..add(11147) - ..add(11148) - ..add(11149) - ..add(11150) - ..add(11151) - ..add(11152) - ..add(11153) - ..add(11154) - ..add(11155) - ..add(11156) - ..add(11157) - ..add(11158) - ..add(11159) - ..add(11160) - ..add(11161) - ..add(11162) - ..add(11163) - ..add(11164) - ..add(11165) - ..add(11166) - ..add(11167) - ..add(11168) - ..add(11169) - ..add(11170) - ..add(11171) - ..add(11172) - ..add(11173) - ..add(11174) - ..add(11175) - ..add(11176) - ..add(11177) - ..add(11178) - ..add(11179) - ..add(11180) - ..add(11181) - ..add(11182) - ..add(11183) - ..add(11184) - ..add(11185) - ..add(11186) - ..add(11187) - ..add(11188) - ..add(11189) - ..add(11190) - ..add(11191) - ..add(11192) - ..add(11193) - ..add(11194) - ..add(11195) - ..add(11196) - ..add(11197) - ..add(11198) - ..add(11199) - ..add(11200) - ..add(11201) - ..add(11202) - ..add(11203) - ..add(11204) - ..add(11205) - ..add(11206) - ..add(11207) - ..add(11208) - ..add(11209) - ..add(11210) - ..add(11211) - ..add(11212) - ..add(11213) - ..add(11214) - ..add(11215) - ..add(11216) - ..add(11217) - ..add(11218) - ..add(11219) - ..add(11220) - ..add(11221) - ..add(11222) - ..add(11223) - ..add(11224) - ..add(11225) - ..add(11226) - ..add(11227) - ..add(11228) - ..add(11229) - ..add(11230) - ..add(11231) - ..add(11232) - ..add(11233) - ..add(11234) - ..add(11235) - ..add(11236) - ..add(11237) - ..add(11238) - ..add(11239) - ..add(11240) - ..add(11241) - ..add(11242) - ..add(11243) - ..add(11244) - ..add(11245) - ..add(11246) - ..add(11247) - ..add(11248) - ..add(11249) - ..add(11250) - ..add(11251) - ..add(11252) - ..add(11253) - ..add(11254) - ..add(11255) - ..add(11256) - ..add(11257) - ..add(11258) - ..add(11259) - ..add(11260) - ..add(11261) - ..add(11262) - ..add(11263) - ..add(11264) - ..add(11265) - ..add(11266) - ..add(11267) - ..add(11268) - ..add(11269) - ..add(11270) - ..add(11271) - ..add(11272) - ..add(11273) - ..add(11274) - ..add(11275) - ..add(11276) - ..add(11277) - ..add(11278) - ..add(11279) - ..add(11280) - ..add(11281) - ..add(11282) - ..add(11283) - ..add(11284) - ..add(11285) - ..add(11286) - ..add(11287) - ..add(11288) - ..add(11289) - ..add(11290) - ..add(11291) - ..add(11292) - ..add(11293) - ..add(11294) - ..add(11295) - ..add(11296) - ..add(11297) - ..add(11298) - ..add(11299) - ..add(11300) - ..add(11301) - ..add(11302) - ..add(11303) - ..add(11304) - ..add(11305) - ..add(11306) - ..add(11307) - ..add(11308) - ..add(11309) - ..add(11310) - ..add(11311) - ..add(11312) - ..add(11313) - ..add(11314) - ..add(11315) - ..add(11316) - ..add(11317) - ..add(11318) - ..add(11319) - ..add(11320) - ..add(11321) - ..add(11322) - ..add(11323) - ..add(11324) - ..add(11325) - ..add(11326) - ..add(11327) - ..add(11328) - ..add(11329) - ..add(11330) - ..add(11331) - ..add(11332) - ..add(11333) - ..add(11334) - ..add(11335) - ..add(11336) - ..add(11337) - ..add(11338) - ..add(11339) - ..add(11340) - ..add(11341) - ..add(11342) - ..add(11343) - ..add(11344) - ..add(11345) - ..add(11346) - ..add(11347) - ..add(11348) - ..add(11349) - ..add(11350) - ..add(11351) - ..add(11352) - ..add(11353) - ..add(11354) - ..add(11355) - ..add(11356) - ..add(11357) - ..add(11358) - ..add(11359) - ..add(11360) - ..add(11361) - ..add(11362) - ..add(11363) - ..add(11364) - ..add(11365) - ..add(11366) - ..add(11367) - ..add(11368) - ..add(11369) - ..add(11370) - ..add(11371) - ..add(11372) - ..add(11373) - ..add(11374) - ..add(11375) - ..add(11376) - ..add(11377) - ..add(11378) - ..add(11379) - ..add(11380) - ..add(11381) - ..add(11382) - ..add(11383) - ..add(11384) - ..add(11385) - ..add(11386) - ..add(11387) - ..add(11388) - ..add(11389) - ..add(11390) - ..add(11391) - ..add(11392) - ..add(11393) - ..add(11394) - ..add(11395) - ..add(11396) - ..add(11397) - ..add(11398) - ..add(11399) - ..add(11400) - ..add(11401) - ..add(11402) - ..add(11403) - ..add(11404) - ..add(11405) - ..add(11406) - ..add(11407) - ..add(11408) - ..add(11409) - ..add(11410) - ..add(11411) - ..add(11412) - ..add(11413) - ..add(11414) - ..add(11415) - ..add(11416) - ..add(11417) - ..add(11418) - ..add(11419) - ..add(11420) - ..add(11421) - ..add(11422) - ..add(11423) - ..add(11424) - ..add(11425) - ..add(11426) - ..add(11427) - ..add(11428) - ..add(11429) - ..add(11430) - ..add(11431) - ..add(11432) - ..add(11433) - ..add(11434) - ..add(11435) - ..add(11436) - ..add(11437) - ..add(11438) - ..add(11439) - ..add(11440) - ..add(11441) - ..add(11442) - ..add(11443) - ..add(11444) - ..add(11445) - ..add(11446) - ..add(11447) - ..add(11448) - ..add(11449) - ..add(11450) - ..add(11451) - ..add(11452) - ..add(11453) - ..add(11454) - ..add(11455) - ..add(11456) - ..add(11457) - ..add(11458) - ..add(11459) - ..add(11460) - ..add(11461) - ..add(11462) - ..add(11463) - ..add(11464) - ..add(11465) - ..add(11466) - ..add(11467) - ..add(11468) - ..add(11469) - ..add(11470) - ..add(11471) - ..add(11472) - ..add(11473) - ..add(11474) - ..add(11475) - ..add(11476) - ..add(11477) - ..add(11478) - ..add(11479) - ..add(11480) - ..add(11481) - ..add(11482) - ..add(11483) - ..add(11484) - ..add(11485) - ..add(11486) - ..add(11487) - ..add(11488) - ..add(11489) - ..add(11490) - ..add(11491) - ..add(11492) - ..add(11493) - ..add(11494) - ..add(11495) - ..add(11496) - ..add(11497) - ..add(11498) - ..add(11499) - ..add(11500) - ..add(11501) - ..add(11502) - ..add(11503) - ..add(11504) - ..add(11505) - ..add(11506) - ..add(11507) - ..add(11508) - ..add(11509) - ..add(11510) - ..add(11511) - ..add(11512) - ..add(11513) - ..add(11514) - ..add(11515) - ..add(11516) - ..add(11517) - ..add(11518) - ..add(11519) - ..add(11520) - ..add(11521) - ..add(11522) - ..add(11523) - ..add(11524) - ..add(11525) - ..add(11526) - ..add(11527) - ..add(11528) - ..add(11529) - ..add(11530) - ..add(11531) - ..add(11532) - ..add(11533) - ..add(11534) - ..add(11535) - ..add(11536) - ..add(11537) - ..add(11538) - ..add(11539) - ..add(11540) - ..add(11541) - ..add(11542) - ..add(11543) - ..add(11544) - ..add(11545) - ..add(11546) - ..add(11547) - ..add(11548) - ..add(11549) - ..add(11550) - ..add(11551) - ..add(11552) - ..add(11553) - ..add(11554) - ..add(11555) - ..add(11556) - ..add(11557) - ..add(11558) - ..add(11559) - ..add(11560) - ..add(11561) - ..add(11562) - ..add(11563) - ..add(11564) - ..add(11565) - ..add(11566) - ..add(11567) - ..add(11568) - ..add(11569) - ..add(11570) - ..add(11571) - ..add(11572) - ..add(11573) - ..add(11574) - ..add(11575) - ..add(11576) - ..add(11577) - ..add(11578) - ..add(11579) - ..add(11580) - ..add(11581) - ..add(11582) - ..add(11583) - ..add(11584) - ..add(11585) - ..add(11586) - ..add(11587) - ..add(11588) - ..add(11589) - ..add(11590) - ..add(11591) - ..add(11592) - ..add(11593) - ..add(11594) - ..add(11595) - ..add(11596) - ..add(11597) - ..add(11598) - ..add(11599) - ..add(11600) - ..add(11601) - ..add(11602) - ..add(11603) - ..add(11604) - ..add(11605) - ..add(11606) - ..add(11607) - ..add(11608) - ..add(11609) - ..add(11610) - ..add(11611) - ..add(11612) - ..add(11613) - ..add(11614) - ..add(11615) - ..add(11616) - ..add(11617) - ..add(11618) - ..add(11619) - ..add(11620) - ..add(11621) - ..add(11622) - ..add(11623) - ..add(11624) - ..add(11625) - ..add(11626) - ..add(11627) - ..add(11628) - ..add(11629) - ..add(11630) - ..add(11631) - ..add(11632) - ..add(11633) - ..add(11634) - ..add(11635) - ..add(11636) - ..add(11637) - ..add(11638) - ..add(11639) - ..add(11640) - ..add(11641) - ..add(11642) - ..add(11643) - ..add(11644) - ..add(11645) - ..add(11646) - ..add(11647) - ..add(11648) - ..add(11649) - ..add(11650) - ..add(11651) - ..add(11652) - ..add(11653) - ..add(11654) - ..add(11655) - ..add(11656) - ..add(11657) - ..add(11658) - ..add(11659) - ..add(11660) - ..add(11661) - ..add(11662) - ..add(11663) - ..add(11664) - ..add(11665) - ..add(11666) - ..add(11667) - ..add(11668) - ..add(11669) - ..add(11670) - ..add(11671) - ..add(11672) - ..add(11673) - ..add(11674) - ..add(11675) - ..add(11676) - ..add(11677) - ..add(11678) - ..add(11679) - ..add(11680) - ..add(11681) - ..add(11682) - ..add(11683) - ..add(11684) - ..add(11685) - ..add(11686) - ..add(11687) - ..add(11688) - ..add(11689) - ..add(11690) - ..add(11691) - ..add(11692) - ..add(11693) - ..add(11694) - ..add(11695) - ..add(11696) - ..add(11697) - ..add(11698) - ..add(11699) - ..add(11700) - ..add(11701) - ..add(11702) - ..add(11703) - ..add(11704) - ..add(11705) - ..add(11706) - ..add(11707) - ..add(11708) - ..add(11709) - ..add(11710) - ..add(11711) - ..add(11712) - ..add(11713) - ..add(11714) - ..add(11715) - ..add(11716) - ..add(11717) - ..add(11718) - ..add(11719) - ..add(11720) - ..add(11721) - ..add(11722) - ..add(11723) - ..add(11724) - ..add(11725) - ..add(11726) - ..add(11727) - ..add(11728) - ..add(11729) - ..add(11730) - ..add(11731) - ..add(11732) - ..add(11733) - ..add(11734) - ..add(11735) - ..add(11736) - ..add(11737) - ..add(11738) - ..add(11739) - ..add(11740) - ..add(11741) - ..add(11742) - ..add(11743) - ..add(11744) - ..add(11745) - ..add(11746) - ..add(11747) - ..add(11748) - ..add(11749) - ..add(11750) - ..add(11751) - ..add(11752) - ..add(11753) - ..add(11754) - ..add(11755) - ..add(11756) - ..add(11757) - ..add(11758) - ..add(11759) - ..add(11760) - ..add(11761) - ..add(11762) - ..add(11763) - ..add(11764) - ..add(11765) - ..add(11766) - ..add(11767) - ..add(11768) - ..add(11769) - ..add(11770) - ..add(11771) - ..add(11772) - ..add(11773) - ..add(11774) - ..add(11775) - ..add(11776) - ..add(11777) - ..add(11778) - ..add(11779) - ..add(11780) - ..add(11781) - ..add(11782) - ..add(11783) - ..add(11784) - ..add(11785) - ..add(11786) - ..add(11787) - ..add(11788) - ..add(11789) - ..add(11790) - ..add(11791) - ..add(11792) - ..add(11793) - ..add(11794) - ..add(11795) - ..add(11796) - ..add(11797) - ..add(11798) - ..add(11799) - ..add(11800) - ..add(11801) - ..add(11802) - ..add(11803) - ..add(11804) - ..add(11805) - ..add(11806) - ..add(11807) - ..add(11808) - ..add(11809) - ..add(11810) - ..add(11811) - ..add(11812) - ..add(11813) - ..add(11814) - ..add(11815) - ..add(11816) - ..add(11817) - ..add(11818) - ..add(11819) - ..add(11820) - ..add(11821) - ..add(11822) - ..add(11823) - ..add(11824) - ..add(11825) - ..add(11826) - ..add(11827) - ..add(11828) - ..add(11829) - ..add(11830) - ..add(11831) - ..add(11832) - ..add(11833) - ..add(11834) - ..add(11835) - ..add(11836) - ..add(11837) - ..add(11838) - ..add(11839) - ..add(11840) - ..add(11841) - ..add(11842) - ..add(11843) - ..add(11844) - ..add(11845) - ..add(11846) - ..add(11847) - ..add(11848) - ..add(11849) - ..add(11850) - ..add(11851) - ..add(11852) - ..add(11853) - ..add(11854) - ..add(11855) - ..add(11856) - ..add(11857) - ..add(11858) - ..add(11859) - ..add(11860) - ..add(11861) - ..add(11862) - ..add(11863) - ..add(11864) - ..add(11865) - ..add(11866) - ..add(11867) - ..add(11868) - ..add(11869) - ..add(11870) - ..add(11871) - ..add(11872) - ..add(11873) - ..add(11874) - ..add(11875) - ..add(11876) - ..add(11877) - ..add(11878) - ..add(11879) - ..add(11880) - ..add(11881) - ..add(11882) - ..add(11883) - ..add(11884) - ..add(11885) - ..add(11886) - ..add(11887) - ..add(11888) - ..add(11889) - ..add(11890) - ..add(11891) - ..add(11892) - ..add(11893) - ..add(11894) - ..add(11895) - ..add(11896) - ..add(11897) - ..add(11898) - ..add(11899) - ..add(11900) - ..add(11901) - ..add(11902) - ..add(11903) - ..add(11904) - ..add(11905) - ..add(11906) - ..add(11907) - ..add(11908) - ..add(11909) - ..add(11910) - ..add(11911) - ..add(11912) - ..add(11913) - ..add(11914) - ..add(11915) - ..add(11916) - ..add(11917) - ..add(11918) - ..add(11919) - ..add(11920) - ..add(11921) - ..add(11922) - ..add(11923) - ..add(11924) - ..add(11925) - ..add(11926) - ..add(11927) - ..add(11928) - ..add(11929) - ..add(11930) - ..add(11931) - ..add(11932) - ..add(11933) - ..add(11934) - ..add(11935) - ..add(11936) - ..add(11937) - ..add(11938) - ..add(11939) - ..add(11940) - ..add(11941) - ..add(11942) - ..add(11943) - ..add(11944) - ..add(11945) - ..add(11946) - ..add(11947) - ..add(11948) - ..add(11949) - ..add(11950) - ..add(11951) - ..add(11952) - ..add(11953) - ..add(11954) - ..add(11955) - ..add(11956) - ..add(11957) - ..add(11958) - ..add(11959) - ..add(11960) - ..add(11961) - ..add(11962) - ..add(11963) - ..add(11964) - ..add(11965) - ..add(11966) - ..add(11967) - ..add(11968) - ..add(11969) - ..add(11970) - ..add(11971) - ..add(11972) - ..add(11973) - ..add(11974) - ..add(11975) - ..add(11976) - ..add(11977) - ..add(11978) - ..add(11979) - ..add(11980) - ..add(11981) - ..add(11982) - ..add(11983) - ..add(11984) - ..add(11985) - ..add(11986) - ..add(11987) - ..add(11988) - ..add(11989) - ..add(11990) - ..add(11991) - ..add(11992) - ..add(11993) - ..add(11994) - ..add(11995) - ..add(11996) - ..add(11997) - ..add(11998) - ..add(11999) - ..add(12000) - ..add(12001) - ..add(12002) - ..add(12003) - ..add(12004) - ..add(12005) - ..add(12006) - ..add(12007) - ..add(12008) - ..add(12009) - ..add(12010) - ..add(12011) - ..add(12012) - ..add(12013) - ..add(12014) - ..add(12015) - ..add(12016) - ..add(12017) - ..add(12018) - ..add(12019) - ..add(12020) - ..add(12021) - ..add(12022) - ..add(12023) - ..add(12024) - ..add(12025) - ..add(12026) - ..add(12027) - ..add(12028) - ..add(12029) - ..add(12030) - ..add(12031) - ..add(12032) - ..add(12033) - ..add(12034) - ..add(12035) - ..add(12036) - ..add(12037) - ..add(12038) - ..add(12039) - ..add(12040) - ..add(12041) - ..add(12042) - ..add(12043) - ..add(12044) - ..add(12045) - ..add(12046) - ..add(12047) - ..add(12048) - ..add(12049) - ..add(12050) - ..add(12051) - ..add(12052) - ..add(12053) - ..add(12054) - ..add(12055) - ..add(12056) - ..add(12057) - ..add(12058) - ..add(12059) - ..add(12060) - ..add(12061) - ..add(12062) - ..add(12063) - ..add(12064) - ..add(12065) - ..add(12066) - ..add(12067) - ..add(12068) - ..add(12069) - ..add(12070) - ..add(12071) - ..add(12072) - ..add(12073) - ..add(12074) - ..add(12075) - ..add(12076) - ..add(12077) - ..add(12078) - ..add(12079) - ..add(12080) - ..add(12081) - ..add(12082) - ..add(12083) - ..add(12084) - ..add(12085) - ..add(12086) - ..add(12087) - ..add(12088) - ..add(12089) - ..add(12090) - ..add(12091) - ..add(12092) - ..add(12093) - ..add(12094) - ..add(12095) - ..add(12096) - ..add(12097) - ..add(12098) - ..add(12099) - ..add(12100) - ..add(12101) - ..add(12102) - ..add(12103) - ..add(12104) - ..add(12105) - ..add(12106) - ..add(12107) - ..add(12108) - ..add(12109) - ..add(12110) - ..add(12111) - ..add(12112) - ..add(12113) - ..add(12114) - ..add(12115) - ..add(12116) - ..add(12117) - ..add(12118) - ..add(12119) - ..add(12120) - ..add(12121) - ..add(12122) - ..add(12123) - ..add(12124) - ..add(12125) - ..add(12126) - ..add(12127) - ..add(12128) - ..add(12129) - ..add(12130) - ..add(12131) - ..add(12132) - ..add(12133) - ..add(12134) - ..add(12135) - ..add(12136) - ..add(12137) - ..add(12138) - ..add(12139) - ..add(12140) - ..add(12141) - ..add(12142) - ..add(12143) - ..add(12144) - ..add(12145) - ..add(12146) - ..add(12147) - ..add(12148) - ..add(12149) - ..add(12150) - ..add(12151) - ..add(12152) - ..add(12153) - ..add(12154) - ..add(12155) - ..add(12156) - ..add(12157) - ..add(12158) - ..add(12159) - ..add(12160) - ..add(12161) - ..add(12162) - ..add(12163) - ..add(12164) - ..add(12165) - ..add(12166) - ..add(12167) - ..add(12168) - ..add(12169) - ..add(12170) - ..add(12171) - ..add(12172) - ..add(12173) - ..add(12174) - ..add(12175) - ..add(12176) - ..add(12177) - ..add(12178) - ..add(12179) - ..add(12180) - ..add(12181) - ..add(12182) - ..add(12183) - ..add(12184) - ..add(12185) - ..add(12186) - ..add(12187) - ..add(12188) - ..add(12189) - ..add(12190) - ..add(12191) - ..add(12192) - ..add(12193) - ..add(12194) - ..add(12195) - ..add(12196) - ..add(12197) - ..add(12198) - ..add(12199) - ..add(12200) - ..add(12201) - ..add(12202) - ..add(12203) - ..add(12204) - ..add(12205) - ..add(12206) - ..add(12207) - ..add(12208) - ..add(12209) - ..add(12210) - ..add(12211) - ..add(12212) - ..add(12213) - ..add(12214) - ..add(12215) - ..add(12216) - ..add(12217) - ..add(12218) - ..add(12219) - ..add(12220) - ..add(12221) - ..add(12222) - ..add(12223) - ..add(12224) - ..add(12225) - ..add(12226) - ..add(12227) - ..add(12228) - ..add(12229) - ..add(12230) - ..add(12231) - ..add(12232) - ..add(12233) - ..add(12234) - ..add(12235) - ..add(12236) - ..add(12237) - ..add(12238) - ..add(12239) - ..add(12240) - ..add(12241) - ..add(12242) - ..add(12243) - ..add(12244) - ..add(12245) - ..add(12246) - ..add(12247) - ..add(12248) - ..add(12249) - ..add(12250) - ..add(12251) - ..add(12252) - ..add(12253) - ..add(12254) - ..add(12255) - ..add(12256) - ..add(12257) - ..add(12258) - ..add(12259) - ..add(12260) - ..add(12261) - ..add(12262) - ..add(12263) - ..add(12264) - ..add(12265) - ..add(12266) - ..add(12267) - ..add(12268) - ..add(12269) - ..add(12270) - ..add(12271) - ..add(12272) - ..add(12273) - ..add(12274) - ..add(12275) - ..add(12276) - ..add(12277) - ..add(12278) - ..add(12279) - ..add(12280) - ..add(12281) - ..add(12282) - ..add(12283) - ..add(12284) - ..add(12285) - ..add(12286) - ..add(12287) - ..add(12288) - ..add(12289) - ..add(12290) - ..add(12291) - ..add(12292) - ..add(12293) - ..add(12294) - ..add(12295) - ..add(12296) - ..add(12297) - ..add(12298) - ..add(12299) - ..add(12300) - ..add(12301) - ..add(12302) - ..add(12303) - ..add(12304) - ..add(12305) - ..add(12306) - ..add(12307) - ..add(12308) - ..add(12309) - ..add(12310) - ..add(12311) - ..add(12312) - ..add(12313) - ..add(12314) - ..add(12315) - ..add(12316) - ..add(12317) - ..add(12318) - ..add(12319) - ..add(12320) - ..add(12321) - ..add(12322) - ..add(12323) - ..add(12324) - ..add(12325) - ..add(12326) - ..add(12327) - ..add(12328) - ..add(12329) - ..add(12330) - ..add(12331) - ..add(12332) - ..add(12333) - ..add(12334) - ..add(12335) - ..add(12336) - ..add(12337) - ..add(12338) - ..add(12339) - ..add(12340) - ..add(12341) - ..add(12342) - ..add(12343) - ..add(12344) - ..add(12345) - ..add(12346) - ..add(12347) - ..add(12348) - ..add(12349) - ..add(12350) - ..add(12351) - ..add(12352) - ..add(12353) - ..add(12354) - ..add(12355) - ..add(12356) - ..add(12357) - ..add(12358) - ..add(12359) - ..add(12360) - ..add(12361) - ..add(12362) - ..add(12363) - ..add(12364) - ..add(12365) - ..add(12366) - ..add(12367) - ..add(12368) - ..add(12369) - ..add(12370) - ..add(12371) - ..add(12372) - ..add(12373) - ..add(12374) - ..add(12375) - ..add(12376) - ..add(12377) - ..add(12378) - ..add(12379) - ..add(12380) - ..add(12381) - ..add(12382) - ..add(12383) - ..add(12384) - ..add(12385) - ..add(12386) - ..add(12387) - ..add(12388) - ..add(12389) - ..add(12390) - ..add(12391) - ..add(12392) - ..add(12393) - ..add(12394) - ..add(12395) - ..add(12396) - ..add(12397) - ..add(12398) - ..add(12399) - ..add(12400) - ..add(12401) - ..add(12402) - ..add(12403) - ..add(12404) - ..add(12405) - ..add(12406) - ..add(12407) - ..add(12408) - ..add(12409) - ..add(12410) - ..add(12411) - ..add(12412) - ..add(12413) - ..add(12414) - ..add(12415) - ..add(12416) - ..add(12417) - ..add(12418) - ..add(12419) - ..add(12420) - ..add(12421) - ..add(12422) - ..add(12423) - ..add(12424) - ..add(12425) - ..add(12426) - ..add(12427) - ..add(12428) - ..add(12429) - ..add(12430) - ..add(12431) - ..add(12432) - ..add(12433) - ..add(12434) - ..add(12435) - ..add(12436) - ..add(12437) - ..add(12438) - ..add(12439) - ..add(12440) - ..add(12441) - ..add(12442) - ..add(12443) - ..add(12444) - ..add(12445) - ..add(12446) - ..add(12447) - ..add(12448) - ..add(12449) - ..add(12450) - ..add(12451) - ..add(12452) - ..add(12453) - ..add(12454) - ..add(12455) - ..add(12456) - ..add(12457) - ..add(12458) - ..add(12459) - ..add(12460) - ..add(12461) - ..add(12462) - ..add(12463) - ..add(12464) - ..add(12465) - ..add(12466) - ..add(12467) - ..add(12468) - ..add(12469) - ..add(12470) - ..add(12471) - ..add(12472) - ..add(12473) - ..add(12474) - ..add(12475) - ..add(12476) - ..add(12477) - ..add(12478) - ..add(12479) - ..add(12480) - ..add(12481) - ..add(12482) - ..add(12483) - ..add(12484) - ..add(12485) - ..add(12486) - ..add(12487) - ..add(12488) - ..add(12489) - ..add(12490) - ..add(12491) - ..add(12492) - ..add(12493) - ..add(12494) - ..add(12495) - ..add(12496) - ..add(12497) - ..add(12498) - ..add(12499) - ..add(12500) - ..add(12501) - ..add(12502) - ..add(12503) - ..add(12504) - ..add(12505) - ..add(12506) - ..add(12507) - ..add(12508) - ..add(12509) - ..add(12510) - ..add(12511) - ..add(12512) - ..add(12513) - ..add(12514) - ..add(12515) - ..add(12516) - ..add(12517) - ..add(12518) - ..add(12519) - ..add(12520) - ..add(12521) - ..add(12522) - ..add(12523) - ..add(12524) - ..add(12525) - ..add(12526) - ..add(12527) - ..add(12528) - ..add(12529) - ..add(12530) - ..add(12531) - ..add(12532) - ..add(12533) - ..add(12534) - ..add(12535) - ..add(12536) - ..add(12537) - ..add(12538) - ..add(12539) - ..add(12540) - ..add(12541) - ..add(12542) - ..add(12543) - ..add(12544) - ..add(12545) - ..add(12546) - ..add(12547) - ..add(12548) - ..add(12549) - ..add(12550) - ..add(12551) - ..add(12552) - ..add(12553) - ..add(12554) - ..add(12555) - ..add(12556) - ..add(12557) - ..add(12558) - ..add(12559) - ..add(12560) - ..add(12561) - ..add(12562) - ..add(12563) - ..add(12564) - ..add(12565) - ..add(12566) - ..add(12567) - ..add(12568) - ..add(12569) - ..add(12570) - ..add(12571) - ..add(12572) - ..add(12573) - ..add(12574) - ..add(12575) - ..add(12576) - ..add(12577) - ..add(12578) - ..add(12579) - ..add(12580) - ..add(12581) - ..add(12582) - ..add(12583) - ..add(12584) - ..add(12585) - ..add(12586) - ..add(12587) - ..add(12588) - ..add(12589) - ..add(12590) - ..add(12591) - ..add(12592) - ..add(12593) - ..add(12594) - ..add(12595) - ..add(12596) - ..add(12597) - ..add(12598) - ..add(12599) - ..add(12600) - ..add(12601) - ..add(12602) - ..add(12603) - ..add(12604) - ..add(12605) - ..add(12606) - ..add(12607) - ..add(12608) - ..add(12609) - ..add(12610) - ..add(12611) - ..add(12612) - ..add(12613) - ..add(12614) - ..add(12615) - ..add(12616) - ..add(12617) - ..add(12618) - ..add(12619) - ..add(12620) - ..add(12621) - ..add(12622) - ..add(12623) - ..add(12624) - ..add(12625) - ..add(12626) - ..add(12627) - ..add(12628) - ..add(12629) - ..add(12630) - ..add(12631) - ..add(12632) - ..add(12633) - ..add(12634) - ..add(12635) - ..add(12636) - ..add(12637) - ..add(12638) - ..add(12639) - ..add(12640) - ..add(12641) - ..add(12642) - ..add(12643) - ..add(12644) - ..add(12645) - ..add(12646) - ..add(12647) - ..add(12648) - ..add(12649) - ..add(12650) - ..add(12651) - ..add(12652) - ..add(12653) - ..add(12654) - ..add(12655) - ..add(12656) - ..add(12657) - ..add(12658) - ..add(12659) - ..add(12660) - ..add(12661) - ..add(12662) - ..add(12663) - ..add(12664) - ..add(12665) - ..add(12666) - ..add(12667) - ..add(12668) - ..add(12669) - ..add(12670) - ..add(12671) - ..add(12672) - ..add(12673) - ..add(12674) - ..add(12675) - ..add(12676) - ..add(12677) - ..add(12678) - ..add(12679) - ..add(12680) - ..add(12681) - ..add(12682) - ..add(12683) - ..add(12684) - ..add(12685) - ..add(12686) - ..add(12687) - ..add(12688) - ..add(12689) - ..add(12690) - ..add(12691) - ..add(12692) - ..add(12693) - ..add(12694) - ..add(12695) - ..add(12696) - ..add(12697) - ..add(12698) - ..add(12699) - ..add(12700) - ..add(12701) - ..add(12702) - ..add(12703) - ..add(12704) - ..add(12705) - ..add(12706) - ..add(12707) - ..add(12708) - ..add(12709) - ..add(12710) - ..add(12711) - ..add(12712) - ..add(12713) - ..add(12714) - ..add(12715) - ..add(12716) - ..add(12717) - ..add(12718) - ..add(12719) - ..add(12720) - ..add(12721) - ..add(12722) - ..add(12723) - ..add(12724) - ..add(12725) - ..add(12726) - ..add(12727) - ..add(12728) - ..add(12729) - ..add(12730) - ..add(12731) - ..add(12732) - ..add(12733) - ..add(12734) - ..add(12735) - ..add(12736) - ..add(12737) - ..add(12738) - ..add(12739) - ..add(12740) - ..add(12741) - ..add(12742) - ..add(12743) - ..add(12744) - ..add(12745) - ..add(12746) - ..add(12747) - ..add(12748) - ..add(12749) - ..add(12750) - ..add(12751) - ..add(12752) - ..add(12753) - ..add(12754) - ..add(12755) - ..add(12756) - ..add(12757) - ..add(12758) - ..add(12759) - ..add(12760) - ..add(12761) - ..add(12762) - ..add(12763) - ..add(12764) - ..add(12765) - ..add(12766) - ..add(12767) - ..add(12768) - ..add(12769) - ..add(12770) - ..add(12771) - ..add(12772) - ..add(12773) - ..add(12774) - ..add(12775) - ..add(12776) - ..add(12777) - ..add(12778) - ..add(12779) - ..add(12780) - ..add(12781) - ..add(12782) - ..add(12783) - ..add(12784) - ..add(12785) - ..add(12786) - ..add(12787) - ..add(12788) - ..add(12789) - ..add(12790) - ..add(12791) - ..add(12792) - ..add(12793) - ..add(12794) - ..add(12795) - ..add(12796) - ..add(12797) - ..add(12798) - ..add(12799) - ..add(12800) - ..add(12801) - ..add(12802) - ..add(12803) - ..add(12804) - ..add(12805) - ..add(12806) - ..add(12807) - ..add(12808) - ..add(12809) - ..add(12810) - ..add(12811) - ..add(12812) - ..add(12813) - ..add(12814) - ..add(12815) - ..add(12816) - ..add(12817) - ..add(12818) - ..add(12819) - ..add(12820) - ..add(12821) - ..add(12822) - ..add(12823) - ..add(12824) - ..add(12825) - ..add(12826) - ..add(12827) - ..add(12828) - ..add(12829) - ..add(12830) - ..add(12831) - ..add(12832) - ..add(12833) - ..add(12834) - ..add(12835) - ..add(12836) - ..add(12837) - ..add(12838) - ..add(12839) - ..add(12840) - ..add(12841) - ..add(12842) - ..add(12843) - ..add(12844) - ..add(12845) - ..add(12846) - ..add(12847) - ..add(12848) - ..add(12849) - ..add(12850) - ..add(12851) - ..add(12852) - ..add(12853) - ..add(12854) - ..add(12855) - ..add(12856) - ..add(12857) - ..add(12858) - ..add(12859) - ..add(12860) - ..add(12861) - ..add(12862) - ..add(12863) - ..add(12864) - ..add(12865) - ..add(12866) - ..add(12867) - ..add(12868) - ..add(12869) - ..add(12870) - ..add(12871) - ..add(12872) - ..add(12873) - ..add(12874) - ..add(12875) - ..add(12876) - ..add(12877) - ..add(12878) - ..add(12879) - ..add(12880) - ..add(12881) - ..add(12882) - ..add(12883) - ..add(12884) - ..add(12885) - ..add(12886) - ..add(12887) - ..add(12888) - ..add(12889) - ..add(12890) - ..add(12891) - ..add(12892) - ..add(12893) - ..add(12894) - ..add(12895) - ..add(12896) - ..add(12897) - ..add(12898) - ..add(12899) - ..add(12900) - ..add(12901) - ..add(12902) - ..add(12903) - ..add(12904) - ..add(12905) - ..add(12906) - ..add(12907) - ..add(12908) - ..add(12909) - ..add(12910) - ..add(12911) - ..add(12912) - ..add(12913) - ..add(12914) - ..add(12915) - ..add(12916) - ..add(12917) - ..add(12918) - ..add(12919) - ..add(12920) - ..add(12921) - ..add(12922) - ..add(12923) - ..add(12924) - ..add(12925) - ..add(12926) - ..add(12927) - ..add(12928) - ..add(12929) - ..add(12930) - ..add(12931) - ..add(12932) - ..add(12933) - ..add(12934) - ..add(12935) - ..add(12936) - ..add(12937) - ..add(12938) - ..add(12939) - ..add(12940) - ..add(12941) - ..add(12942) - ..add(12943) - ..add(12944) - ..add(12945) - ..add(12946) - ..add(12947) - ..add(12948) - ..add(12949) - ..add(12950) - ..add(12951) - ..add(12952) - ..add(12953) - ..add(12954) - ..add(12955) - ..add(12956) - ..add(12957) - ..add(12958) - ..add(12959) - ..add(12960) - ..add(12961) - ..add(12962) - ..add(12963) - ..add(12964) - ..add(12965) - ..add(12966) - ..add(12967) - ..add(12968) - ..add(12969) - ..add(12970) - ..add(12971) - ..add(12972) - ..add(12973) - ..add(12974) - ..add(12975) - ..add(12976) - ..add(12977) - ..add(12978) - ..add(12979) - ..add(12980) - ..add(12981) - ..add(12982) - ..add(12983) - ..add(12984) - ..add(12985) - ..add(12986) - ..add(12987) - ..add(12988) - ..add(12989) - ..add(12990) - ..add(12991) - ..add(12992) - ..add(12993) - ..add(12994) - ..add(12995) - ..add(12996) - ..add(12997) - ..add(12998) - ..add(12999) - ..add(13000) - ..add(13001) - ..add(13002) - ..add(13003) - ..add(13004) - ..add(13005) - ..add(13006) - ..add(13007) - ..add(13008) - ..add(13009) - ..add(13010) - ..add(13011) - ..add(13012) - ..add(13013) - ..add(13014) - ..add(13015) - ..add(13016) - ..add(13017) - ..add(13018) - ..add(13019) - ..add(13020) - ..add(13021) - ..add(13022) - ..add(13023) - ..add(13024) - ..add(13025) - ..add(13026) - ..add(13027) - ..add(13028) - ..add(13029) - ..add(13030) - ..add(13031) - ..add(13032) - ..add(13033) - ..add(13034) - ..add(13035) - ..add(13036) - ..add(13037) - ..add(13038) - ..add(13039) - ..add(13040) - ..add(13041) - ..add(13042) - ..add(13043) - ..add(13044) - ..add(13045) - ..add(13046) - ..add(13047) - ..add(13048) - ..add(13049) - ..add(13050) - ..add(13051) - ..add(13052) - ..add(13053) - ..add(13054) - ..add(13055) - ..add(13056) - ..add(13057) - ..add(13058) - ..add(13059) - ..add(13060) - ..add(13061) - ..add(13062) - ..add(13063) - ..add(13064) - ..add(13065) - ..add(13066) - ..add(13067) - ..add(13068) - ..add(13069) - ..add(13070) - ..add(13071) - ..add(13072) - ..add(13073) - ..add(13074) - ..add(13075) - ..add(13076) - ..add(13077) - ..add(13078) - ..add(13079) - ..add(13080) - ..add(13081) - ..add(13082) - ..add(13083) - ..add(13084) - ..add(13085) - ..add(13086) - ..add(13087) - ..add(13088) - ..add(13089) - ..add(13090) - ..add(13091) - ..add(13092) - ..add(13093) - ..add(13094) - ..add(13095) - ..add(13096) - ..add(13097) - ..add(13098) - ..add(13099) - ..add(13100) - ..add(13101) - ..add(13102) - ..add(13103) - ..add(13104) - ..add(13105) - ..add(13106) - ..add(13107) - ..add(13108) - ..add(13109) - ..add(13110) - ..add(13111) - ..add(13112) - ..add(13113) - ..add(13114) - ..add(13115) - ..add(13116) - ..add(13117) - ..add(13118) - ..add(13119) - ..add(13120) - ..add(13121) - ..add(13122) - ..add(13123) - ..add(13124) - ..add(13125) - ..add(13126) - ..add(13127) - ..add(13128) - ..add(13129) - ..add(13130) - ..add(13131) - ..add(13132) - ..add(13133) - ..add(13134) - ..add(13135) - ..add(13136) - ..add(13137) - ..add(13138) - ..add(13139) - ..add(13140) - ..add(13141) - ..add(13142) - ..add(13143) - ..add(13144) - ..add(13145) - ..add(13146) - ..add(13147) - ..add(13148) - ..add(13149) - ..add(13150) - ..add(13151) - ..add(13152) - ..add(13153) - ..add(13154) - ..add(13155) - ..add(13156) - ..add(13157) - ..add(13158) - ..add(13159) - ..add(13160) - ..add(13161) - ..add(13162) - ..add(13163) - ..add(13164) - ..add(13165) - ..add(13166) - ..add(13167) - ..add(13168) - ..add(13169) - ..add(13170) - ..add(13171) - ..add(13172) - ..add(13173) - ..add(13174) - ..add(13175) - ..add(13176) - ..add(13177) - ..add(13178) - ..add(13179) - ..add(13180) - ..add(13181) - ..add(13182) - ..add(13183) - ..add(13184) - ..add(13185) - ..add(13186) - ..add(13187) - ..add(13188) - ..add(13189) - ..add(13190) - ..add(13191) - ..add(13192) - ..add(13193) - ..add(13194) - ..add(13195) - ..add(13196) - ..add(13197) - ..add(13198) - ..add(13199) - ..add(13200) - ..add(13201) - ..add(13202) - ..add(13203) - ..add(13204) - ..add(13205) - ..add(13206) - ..add(13207) - ..add(13208) - ..add(13209) - ..add(13210) - ..add(13211) - ..add(13212) - ..add(13213) - ..add(13214) - ..add(13215) - ..add(13216) - ..add(13217) - ..add(13218) - ..add(13219) - ..add(13220) - ..add(13221) - ..add(13222) - ..add(13223) - ..add(13224) - ..add(13225) - ..add(13226) - ..add(13227) - ..add(13228) - ..add(13229) - ..add(13230) - ..add(13231) - ..add(13232) - ..add(13233) - ..add(13234) - ..add(13235) - ..add(13236) - ..add(13237) - ..add(13238) - ..add(13239) - ..add(13240) - ..add(13241) - ..add(13242) - ..add(13243) - ..add(13244) - ..add(13245) - ..add(13246) - ..add(13247) - ..add(13248) - ..add(13249) - ..add(13250) - ..add(13251) - ..add(13252) - ..add(13253) - ..add(13254) - ..add(13255) - ..add(13256) - ..add(13257) - ..add(13258) - ..add(13259) - ..add(13260) - ..add(13261) - ..add(13262) - ..add(13263) - ..add(13264) - ..add(13265) - ..add(13266) - ..add(13267) - ..add(13268) - ..add(13269) - ..add(13270) - ..add(13271) - ..add(13272) - ..add(13273) - ..add(13274) - ..add(13275) - ..add(13276) - ..add(13277) - ..add(13278) - ..add(13279) - ..add(13280) - ..add(13281) - ..add(13282) - ..add(13283) - ..add(13284) - ..add(13285) - ..add(13286) - ..add(13287) - ..add(13288) - ..add(13289) - ..add(13290) - ..add(13291) - ..add(13292) - ..add(13293) - ..add(13294) - ..add(13295) - ..add(13296) - ..add(13297) - ..add(13298) - ..add(13299) - ..add(13300) - ..add(13301) - ..add(13302) - ..add(13303) - ..add(13304) - ..add(13305) - ..add(13306) - ..add(13307) - ..add(13308) - ..add(13309) - ..add(13310) - ..add(13311) - ..add(13312) - ..add(13313) - ..add(13314) - ..add(13315) - ..add(13316) - ..add(13317) - ..add(13318) - ..add(13319) - ..add(13320) - ..add(13321) - ..add(13322) - ..add(13323) - ..add(13324) - ..add(13325) - ..add(13326) - ..add(13327) - ..add(13328) - ..add(13329) - ..add(13330) - ..add(13331) - ..add(13332) - ..add(13333) - ..add(13334) - ..add(13335) - ..add(13336) - ..add(13337) - ..add(13338) - ..add(13339) - ..add(13340) - ..add(13341) - ..add(13342) - ..add(13343) - ..add(13344) - ..add(13345) - ..add(13346) - ..add(13347) - ..add(13348) - ..add(13349) - ..add(13350) - ..add(13351) - ..add(13352) - ..add(13353) - ..add(13354) - ..add(13355) - ..add(13356) - ..add(13357) - ..add(13358) - ..add(13359) - ..add(13360) - ..add(13361) - ..add(13362) - ..add(13363) - ..add(13364) - ..add(13365) - ..add(13366) - ..add(13367) - ..add(13368) - ..add(13369) - ..add(13370) - ..add(13371) - ..add(13372) - ..add(13373) - ..add(13374) - ..add(13375) - ..add(13376) - ..add(13377) - ..add(13378) - ..add(13379) - ..add(13380) - ..add(13381) - ..add(13382) - ..add(13383) - ..add(13384) - ..add(13385) - ..add(13386) - ..add(13387) - ..add(13388) - ..add(13389) - ..add(13390) - ..add(13391) - ..add(13392) - ..add(13393) - ..add(13394) - ..add(13395) - ..add(13396) - ..add(13397) - ..add(13398) - ..add(13399) - ..add(13400) - ..add(13401) - ..add(13402) - ..add(13403) - ..add(13404) - ..add(13405) - ..add(13406) - ..add(13407) - ..add(13408) - ..add(13409) - ..add(13410) - ..add(13411) - ..add(13412) - ..add(13413) - ..add(13414) - ..add(13415) - ..add(13416) - ..add(13417) - ..add(13418) - ..add(13419) - ..add(13420) - ..add(13421) - ..add(13422) - ..add(13423) - ..add(13424) - ..add(13425) - ..add(13426) - ..add(13427) - ..add(13428) - ..add(13429) - ..add(13430) - ..add(13431) - ..add(13432) - ..add(13433) - ..add(13434) - ..add(13435) - ..add(13436) - ..add(13437) - ..add(13438) - ..add(13439) - ..add(13440) - ..add(13441) - ..add(13442) - ..add(13443) - ..add(13444) - ..add(13445) - ..add(13446) - ..add(13447) - ..add(13448) - ..add(13449) - ..add(13450) - ..add(13451) - ..add(13452) - ..add(13453) - ..add(13454) - ..add(13455) - ..add(13456) - ..add(13457) - ..add(13458) - ..add(13459) - ..add(13460) - ..add(13461) - ..add(13462) - ..add(13463) - ..add(13464) - ..add(13465) - ..add(13466) - ..add(13467) - ..add(13468) - ..add(13469) - ..add(13470) - ..add(13471) - ..add(13472) - ..add(13473) - ..add(13474) - ..add(13475) - ..add(13476) - ..add(13477) - ..add(13478) - ..add(13479) - ..add(13480) - ..add(13481) - ..add(13482) - ..add(13483) - ..add(13484) - ..add(13485) - ..add(13486) - ..add(13487) - ..add(13488) - ..add(13489) - ..add(13490) - ..add(13491) - ..add(13492) - ..add(13493) - ..add(13494) - ..add(13495) - ..add(13496) - ..add(13497) - ..add(13498) - ..add(13499) - ..add(13500) - ..add(13501) - ..add(13502) - ..add(13503) - ..add(13504) - ..add(13505) - ..add(13506) - ..add(13507) - ..add(13508) - ..add(13509) - ..add(13510) - ..add(13511) - ..add(13512) - ..add(13513) - ..add(13514) - ..add(13515) - ..add(13516) - ..add(13517) - ..add(13518) - ..add(13519) - ..add(13520) - ..add(13521) - ..add(13522) - ..add(13523) - ..add(13524) - ..add(13525) - ..add(13526) - ..add(13527) - ..add(13528) - ..add(13529) - ..add(13530) - ..add(13531) - ..add(13532) - ..add(13533) - ..add(13534) - ..add(13535) - ..add(13536) - ..add(13537) - ..add(13538) - ..add(13539) - ..add(13540) - ..add(13541) - ..add(13542) - ..add(13543) - ..add(13544) - ..add(13545) - ..add(13546) - ..add(13547) - ..add(13548) - ..add(13549) - ..add(13550) - ..add(13551) - ..add(13552) - ..add(13553) - ..add(13554) - ..add(13555) - ..add(13556) - ..add(13557) - ..add(13558) - ..add(13559) - ..add(13560) - ..add(13561) - ..add(13562) - ..add(13563) - ..add(13564) - ..add(13565) - ..add(13566) - ..add(13567) - ..add(13568) - ..add(13569) - ..add(13570) - ..add(13571) - ..add(13572) - ..add(13573) - ..add(13574) - ..add(13575) - ..add(13576) - ..add(13577) - ..add(13578) - ..add(13579) - ..add(13580) - ..add(13581) - ..add(13582) - ..add(13583) - ..add(13584) - ..add(13585) - ..add(13586) - ..add(13587) - ..add(13588) - ..add(13589) - ..add(13590) - ..add(13591) - ..add(13592) - ..add(13593) - ..add(13594) - ..add(13595) - ..add(13596) - ..add(13597) - ..add(13598) - ..add(13599) - ..add(13600) - ..add(13601) - ..add(13602) - ..add(13603) - ..add(13604) - ..add(13605) - ..add(13606) - ..add(13607) - ..add(13608) - ..add(13609) - ..add(13610) - ..add(13611) - ..add(13612) - ..add(13613) - ..add(13614) - ..add(13615) - ..add(13616) - ..add(13617) - ..add(13618) - ..add(13619) - ..add(13620) - ..add(13621) - ..add(13622) - ..add(13623) - ..add(13624) - ..add(13625) - ..add(13626) - ..add(13627) - ..add(13628) - ..add(13629) - ..add(13630) - ..add(13631) - ..add(13632) - ..add(13633) - ..add(13634) - ..add(13635) - ..add(13636) - ..add(13637) - ..add(13638) - ..add(13639) - ..add(13640) - ..add(13641) - ..add(13642) - ..add(13643) - ..add(13644) - ..add(13645) - ..add(13646) - ..add(13647) - ..add(13648) - ..add(13649) - ..add(13650) - ..add(13651) - ..add(13652) - ..add(13653) - ..add(13654) - ..add(13655) - ..add(13656) - ..add(13657) - ..add(13658) - ..add(13659) - ..add(13660) - ..add(13661) - ..add(13662) - ..add(13663) - ..add(13664) - ..add(13665) - ..add(13666) - ..add(13667) - ..add(13668) - ..add(13669) - ..add(13670) - ..add(13671) - ..add(13672) - ..add(13673) - ..add(13674) - ..add(13675) - ..add(13676) - ..add(13677) - ..add(13678) - ..add(13679) - ..add(13680) - ..add(13681) - ..add(13682) - ..add(13683) - ..add(13684) - ..add(13685) - ..add(13686) - ..add(13687) - ..add(13688) - ..add(13689) - ..add(13690) - ..add(13691) - ..add(13692) - ..add(13693) - ..add(13694) - ..add(13695) - ..add(13696) - ..add(13697) - ..add(13698) - ..add(13699) - ..add(13700) - ..add(13701) - ..add(13702) - ..add(13703) - ..add(13704) - ..add(13705) - ..add(13706) - ..add(13707) - ..add(13708) - ..add(13709) - ..add(13710) - ..add(13711) - ..add(13712) - ..add(13713) - ..add(13714) - ..add(13715) - ..add(13716) - ..add(13717) - ..add(13718) - ..add(13719) - ..add(13720) - ..add(13721) - ..add(13722) - ..add(13723) - ..add(13724) - ..add(13725) - ..add(13726) - ..add(13727) - ..add(13728) - ..add(13729) - ..add(13730) - ..add(13731) - ..add(13732) - ..add(13733) - ..add(13734) - ..add(13735) - ..add(13736) - ..add(13737) - ..add(13738) - ..add(13739) - ..add(13740) - ..add(13741) - ..add(13742) - ..add(13743) - ..add(13744) - ..add(13745) - ..add(13746) - ..add(13747) - ..add(13748) - ..add(13749) - ..add(13750) - ..add(13751) - ..add(13752) - ..add(13753) - ..add(13754) - ..add(13755) - ..add(13756) - ..add(13757) - ..add(13758) - ..add(13759) - ..add(13760) - ..add(13761) - ..add(13762) - ..add(13763) - ..add(13764) - ..add(13765) - ..add(13766) - ..add(13767) - ..add(13768) - ..add(13769) - ..add(13770) - ..add(13771) - ..add(13772) - ..add(13773) - ..add(13774) - ..add(13775) - ..add(13776) - ..add(13777) - ..add(13778) - ..add(13779) - ..add(13780) - ..add(13781) - ..add(13782) - ..add(13783) - ..add(13784) - ..add(13785) - ..add(13786) - ..add(13787) - ..add(13788) - ..add(13789) - ..add(13790) - ..add(13791) - ..add(13792) - ..add(13793) - ..add(13794) - ..add(13795) - ..add(13796) - ..add(13797) - ..add(13798) - ..add(13799) - ..add(13800) - ..add(13801) - ..add(13802) - ..add(13803) - ..add(13804) - ..add(13805) - ..add(13806) - ..add(13807) - ..add(13808) - ..add(13809) - ..add(13810) - ..add(13811) - ..add(13812) - ..add(13813) - ..add(13814) - ..add(13815) - ..add(13816) - ..add(13817) - ..add(13818) - ..add(13819) - ..add(13820) - ..add(13821) - ..add(13822) - ..add(13823) - ..add(13824) - ..add(13825) - ..add(13826) - ..add(13827) - ..add(13828) - ..add(13829) - ..add(13830) - ..add(13831) - ..add(13832) - ..add(13833) - ..add(13834) - ..add(13835) - ..add(13836) - ..add(13837) - ..add(13838) - ..add(13839) - ..add(13840) - ..add(13841) - ..add(13842) - ..add(13843) - ..add(13844) - ..add(13845) - ..add(13846) - ..add(13847) - ..add(13848) - ..add(13849) - ..add(13850) - ..add(13851) - ..add(13852) - ..add(13853) - ..add(13854) - ..add(13855) - ..add(13856) - ..add(13857) - ..add(13858) - ..add(13859) - ..add(13860) - ..add(13861) - ..add(13862) - ..add(13863) - ..add(13864) - ..add(13865) - ..add(13866) - ..add(13867) - ..add(13868) - ..add(13869) - ..add(13870) - ..add(13871) - ..add(13872) - ..add(13873) - ..add(13874) - ..add(13875) - ..add(13876) - ..add(13877) - ..add(13878) - ..add(13879) - ..add(13880) - ..add(13881) - ..add(13882) - ..add(13883) - ..add(13884) - ..add(13885) - ..add(13886) - ..add(13887) - ..add(13888) - ..add(13889) - ..add(13890) - ..add(13891) - ..add(13892) - ..add(13893) - ..add(13894) - ..add(13895) - ..add(13896) - ..add(13897) - ..add(13898) - ..add(13899) - ..add(13900) - ..add(13901) - ..add(13902) - ..add(13903) - ..add(13904) - ..add(13905) - ..add(13906) - ..add(13907) - ..add(13908) - ..add(13909) - ..add(13910) - ..add(13911) - ..add(13912) - ..add(13913) - ..add(13914) - ..add(13915) - ..add(13916) - ..add(13917) - ..add(13918) - ..add(13919) - ..add(13920) - ..add(13921) - ..add(13922) - ..add(13923) - ..add(13924) - ..add(13925) - ..add(13926) - ..add(13927) - ..add(13928) - ..add(13929) - ..add(13930) - ..add(13931) - ..add(13932) - ..add(13933) - ..add(13934) - ..add(13935) - ..add(13936) - ..add(13937) - ..add(13938) - ..add(13939) - ..add(13940) - ..add(13941) - ..add(13942) - ..add(13943) - ..add(13944) - ..add(13945) - ..add(13946) - ..add(13947) - ..add(13948) - ..add(13949) - ..add(13950) - ..add(13951) - ..add(13952) - ..add(13953) - ..add(13954) - ..add(13955) - ..add(13956) - ..add(13957) - ..add(13958) - ..add(13959) - ..add(13960) - ..add(13961) - ..add(13962) - ..add(13963) - ..add(13964) - ..add(13965) - ..add(13966) - ..add(13967) - ..add(13968) - ..add(13969) - ..add(13970) - ..add(13971) - ..add(13972) - ..add(13973) - ..add(13974) - ..add(13975) - ..add(13976) - ..add(13977) - ..add(13978) - ..add(13979) - ..add(13980) - ..add(13981) - ..add(13982) - ..add(13983) - ..add(13984) - ..add(13985) - ..add(13986) - ..add(13987) - ..add(13988) - ..add(13989) - ..add(13990) - ..add(13991) - ..add(13992) - ..add(13993) - ..add(13994) - ..add(13995) - ..add(13996) - ..add(13997) - ..add(13998) - ..add(13999) - ..add(14000) - ..add(14001) - ..add(14002) - ..add(14003) - ..add(14004) - ..add(14005) - ..add(14006) - ..add(14007) - ..add(14008) - ..add(14009) - ..add(14010) - ..add(14011) - ..add(14012) - ..add(14013) - ..add(14014) - ..add(14015) - ..add(14016) - ..add(14017) - ..add(14018) - ..add(14019) - ..add(14020) - ..add(14021) - ..add(14022) - ..add(14023) - ..add(14024) - ..add(14025) - ..add(14026) - ..add(14027) - ..add(14028) - ..add(14029) - ..add(14030) - ..add(14031) - ..add(14032) - ..add(14033) - ..add(14034) - ..add(14035) - ..add(14036) - ..add(14037) - ..add(14038) - ..add(14039) - ..add(14040) - ..add(14041) - ..add(14042) - ..add(14043) - ..add(14044) - ..add(14045) - ..add(14046) - ..add(14047) - ..add(14048) - ..add(14049) - ..add(14050) - ..add(14051) - ..add(14052) - ..add(14053) - ..add(14054) - ..add(14055) - ..add(14056) - ..add(14057) - ..add(14058) - ..add(14059) - ..add(14060) - ..add(14061) - ..add(14062) - ..add(14063) - ..add(14064) - ..add(14065) - ..add(14066) - ..add(14067) - ..add(14068) - ..add(14069) - ..add(14070) - ..add(14071) - ..add(14072) - ..add(14073) - ..add(14074) - ..add(14075) - ..add(14076) - ..add(14077) - ..add(14078) - ..add(14079) - ..add(14080) - ..add(14081) - ..add(14082) - ..add(14083) - ..add(14084) - ..add(14085) - ..add(14086) - ..add(14087) - ..add(14088) - ..add(14089) - ..add(14090) - ..add(14091) - ..add(14092) - ..add(14093) - ..add(14094) - ..add(14095) - ..add(14096) - ..add(14097) - ..add(14098) - ..add(14099) - ..add(14100) - ..add(14101) - ..add(14102) - ..add(14103) - ..add(14104) - ..add(14105) - ..add(14106) - ..add(14107) - ..add(14108) - ..add(14109) - ..add(14110) - ..add(14111) - ..add(14112) - ..add(14113) - ..add(14114) - ..add(14115) - ..add(14116) - ..add(14117) - ..add(14118) - ..add(14119) - ..add(14120) - ..add(14121) - ..add(14122) - ..add(14123) - ..add(14124) - ..add(14125) - ..add(14126) - ..add(14127) - ..add(14128) - ..add(14129) - ..add(14130) - ..add(14131) - ..add(14132) - ..add(14133) - ..add(14134) - ..add(14135) - ..add(14136) - ..add(14137) - ..add(14138) - ..add(14139) - ..add(14140) - ..add(14141) - ..add(14142) - ..add(14143) - ..add(14144) - ..add(14145) - ..add(14146) - ..add(14147) - ..add(14148) - ..add(14149) - ..add(14150) - ..add(14151) - ..add(14152) - ..add(14153) - ..add(14154) - ..add(14155) - ..add(14156) - ..add(14157) - ..add(14158) - ..add(14159) - ..add(14160) - ..add(14161) - ..add(14162) - ..add(14163) - ..add(14164) - ..add(14165) - ..add(14166) - ..add(14167) - ..add(14168) - ..add(14169) - ..add(14170) - ..add(14171) - ..add(14172) - ..add(14173) - ..add(14174) - ..add(14175) - ..add(14176) - ..add(14177) - ..add(14178) - ..add(14179) - ..add(14180) - ..add(14181) - ..add(14182) - ..add(14183) - ..add(14184) - ..add(14185) - ..add(14186) - ..add(14187) - ..add(14188) - ..add(14189) - ..add(14190) - ..add(14191) - ..add(14192) - ..add(14193) - ..add(14194) - ..add(14195) - ..add(14196) - ..add(14197) - ..add(14198) - ..add(14199) - ..add(14200) - ..add(14201) - ..add(14202) - ..add(14203) - ..add(14204) - ..add(14205) - ..add(14206) - ..add(14207) - ..add(14208) - ..add(14209) - ..add(14210) - ..add(14211) - ..add(14212) - ..add(14213) - ..add(14214) - ..add(14215) - ..add(14216) - ..add(14217) - ..add(14218) - ..add(14219) - ..add(14220) - ..add(14221) - ..add(14222) - ..add(14223) - ..add(14224) - ..add(14225) - ..add(14226) - ..add(14227) - ..add(14228) - ..add(14229) - ..add(14230) - ..add(14231) - ..add(14232) - ..add(14233) - ..add(14234) - ..add(14235) - ..add(14236) - ..add(14237) - ..add(14238) - ..add(14239) - ..add(14240) - ..add(14241) - ..add(14242) - ..add(14243) - ..add(14244) - ..add(14245) - ..add(14246) - ..add(14247) - ..add(14248) - ..add(14249) - ..add(14250) - ..add(14251) - ..add(14252) - ..add(14253) - ..add(14254) - ..add(14255) - ..add(14256) - ..add(14257) - ..add(14258) - ..add(14259) - ..add(14260) - ..add(14261) - ..add(14262) - ..add(14263) - ..add(14264) - ..add(14265) - ..add(14266) - ..add(14267) - ..add(14268) - ..add(14269) - ..add(14270) - ..add(14271) - ..add(14272) - ..add(14273) - ..add(14274) - ..add(14275) - ..add(14276) - ..add(14277) - ..add(14278) - ..add(14279) - ..add(14280) - ..add(14281) - ..add(14282) - ..add(14283) - ..add(14284) - ..add(14285) - ..add(14286) - ..add(14287) - ..add(14288) - ..add(14289) - ..add(14290) - ..add(14291) - ..add(14292) - ..add(14293) - ..add(14294) - ..add(14295) - ..add(14296) - ..add(14297) - ..add(14298) - ..add(14299) - ..add(14300) - ..add(14301) - ..add(14302) - ..add(14303) - ..add(14304) - ..add(14305) - ..add(14306) - ..add(14307) - ..add(14308) - ..add(14309) - ..add(14310) - ..add(14311) - ..add(14312) - ..add(14313) - ..add(14314) - ..add(14315) - ..add(14316) - ..add(14317) - ..add(14318) - ..add(14319) - ..add(14320) - ..add(14321) - ..add(14322) - ..add(14323) - ..add(14324) - ..add(14325) - ..add(14326) - ..add(14327) - ..add(14328) - ..add(14329) - ..add(14330) - ..add(14331) - ..add(14332) - ..add(14333) - ..add(14334) - ..add(14335) - ..add(14336) - ..add(14337) - ..add(14338) - ..add(14339) - ..add(14340) - ..add(14341) - ..add(14342) - ..add(14343) - ..add(14344) - ..add(14345) - ..add(14346) - ..add(14347) - ..add(14348) - ..add(14349) - ..add(14350) - ..add(14351) - ..add(14352) - ..add(14353) - ..add(14354) - ..add(14355) - ..add(14356) - ..add(14357) - ..add(14358) - ..add(14359) - ..add(14360) - ..add(14361) - ..add(14362) - ..add(14363) - ..add(14364) - ..add(14365) - ..add(14366) - ..add(14367) - ..add(14368) - ..add(14369) - ..add(14370) - ..add(14371) - ..add(14372) - ..add(14373) - ..add(14374) - ..add(14375) - ..add(14376) - ..add(14377) - ..add(14378) - ..add(14379) - ..add(14380) - ..add(14381) - ..add(14382) - ..add(14383) - ..add(14384) - ..add(14385) - ..add(14386) - ..add(14387) - ..add(14388) - ..add(14389) - ..add(14390) - ..add(14391) - ..add(14392) - ..add(14393) - ..add(14394) - ..add(14395) - ..add(14396) - ..add(14397) - ..add(14398) - ..add(14399) - ..add(14400) - ..add(14401) - ..add(14402) - ..add(14403) - ..add(14404) - ..add(14405) - ..add(14406) - ..add(14407) - ..add(14408) - ..add(14409) - ..add(14410) - ..add(14411) - ..add(14412) - ..add(14413) - ..add(14414) - ..add(14415) - ..add(14416) - ..add(14417) - ..add(14418) - ..add(14419) - ..add(14420) - ..add(14421) - ..add(14422) - ..add(14423) - ..add(14424) - ..add(14425) - ..add(14426) - ..add(14427) - ..add(14428) - ..add(14429) - ..add(14430) - ..add(14431) - ..add(14432) - ..add(14433) - ..add(14434) - ..add(14435) - ..add(14436) - ..add(14437) - ..add(14438) - ..add(14439) - ..add(14440) - ..add(14441) - ..add(14442) - ..add(14443) - ..add(14444) - ..add(14445) - ..add(14446) - ..add(14447) - ..add(14448) - ..add(14449) - ..add(14450) - ..add(14451) - ..add(14452) - ..add(14453) - ..add(14454) - ..add(14455) - ..add(14456) - ..add(14457) - ..add(14458) - ..add(14459) - ..add(14460) - ..add(14461) - ..add(14462) - ..add(14463) - ..add(14464) - ..add(14465) - ..add(14466) - ..add(14467) - ..add(14468) - ..add(14469) - ..add(14470) - ..add(14471) - ..add(14472) - ..add(14473) - ..add(14474) - ..add(14475) - ..add(14476) - ..add(14477) - ..add(14478) - ..add(14479) - ..add(14480) - ..add(14481) - ..add(14482) - ..add(14483) - ..add(14484) - ..add(14485) - ..add(14486) - ..add(14487) - ..add(14488) - ..add(14489) - ..add(14490) - ..add(14491) - ..add(14492) - ..add(14493) - ..add(14494) - ..add(14495) - ..add(14496) - ..add(14497) - ..add(14498) - ..add(14499) - ..add(14500) - ..add(14501) - ..add(14502) - ..add(14503) - ..add(14504) - ..add(14505) - ..add(14506) - ..add(14507) - ..add(14508) - ..add(14509) - ..add(14510) - ..add(14511) - ..add(14512) - ..add(14513) - ..add(14514) - ..add(14515) - ..add(14516) - ..add(14517) - ..add(14518) - ..add(14519) - ..add(14520) - ..add(14521) - ..add(14522) - ..add(14523) - ..add(14524) - ..add(14525) - ..add(14526) - ..add(14527) - ..add(14528) - ..add(14529) - ..add(14530) - ..add(14531) - ..add(14532) - ..add(14533) - ..add(14534) - ..add(14535) - ..add(14536) - ..add(14537) - ..add(14538) - ..add(14539) - ..add(14540) - ..add(14541) - ..add(14542) - ..add(14543) - ..add(14544) - ..add(14545) - ..add(14546) - ..add(14547) - ..add(14548) - ..add(14549) - ..add(14550) - ..add(14551) - ..add(14552) - ..add(14553) - ..add(14554) - ..add(14555) - ..add(14556) - ..add(14557) - ..add(14558) - ..add(14559) - ..add(14560) - ..add(14561) - ..add(14562) - ..add(14563) - ..add(14564) - ..add(14565) - ..add(14566) - ..add(14567) - ..add(14568) - ..add(14569) - ..add(14570) - ..add(14571) - ..add(14572) - ..add(14573) - ..add(14574) - ..add(14575) - ..add(14576) - ..add(14577) - ..add(14578) - ..add(14579) - ..add(14580) - ..add(14581) - ..add(14582) - ..add(14583) - ..add(14584) - ..add(14585) - ..add(14586) - ..add(14587) - ..add(14588) - ..add(14589) - ..add(14590) - ..add(14591) - ..add(14592) - ..add(14593) - ..add(14594) - ..add(14595) - ..add(14596) - ..add(14597) - ..add(14598) - ..add(14599) - ..add(14600) - ..add(14601) - ..add(14602) - ..add(14603) - ..add(14604) - ..add(14605) - ..add(14606) - ..add(14607) - ..add(14608) - ..add(14609) - ..add(14610) - ..add(14611) - ..add(14612) - ..add(14613) - ..add(14614) - ..add(14615) - ..add(14616) - ..add(14617) - ..add(14618) - ..add(14619) - ..add(14620) - ..add(14621) - ..add(14622) - ..add(14623) - ..add(14624) - ..add(14625) - ..add(14626) - ..add(14627) - ..add(14628) - ..add(14629) - ..add(14630) - ..add(14631) - ..add(14632) - ..add(14633) - ..add(14634) - ..add(14635) - ..add(14636) - ..add(14637) - ..add(14638) - ..add(14639) - ..add(14640) - ..add(14641) - ..add(14642) - ..add(14643) - ..add(14644) - ..add(14645) - ..add(14646) - ..add(14647) - ..add(14648) - ..add(14649) - ..add(14650) - ..add(14651) - ..add(14652) - ..add(14653) - ..add(14654) - ..add(14655) - ..add(14656) - ..add(14657) - ..add(14658) - ..add(14659) - ..add(14660) - ..add(14661) - ..add(14662) - ..add(14663) - ..add(14664) - ..add(14665) - ..add(14666) - ..add(14667) - ..add(14668) - ..add(14669) - ..add(14670) - ..add(14671) - ..add(14672) - ..add(14673) - ..add(14674) - ..add(14675) - ..add(14676) - ..add(14677) - ..add(14678) - ..add(14679) - ..add(14680) - ..add(14681) - ..add(14682) - ..add(14683) - ..add(14684) - ..add(14685) - ..add(14686) - ..add(14687) - ..add(14688) - ..add(14689) - ..add(14690) - ..add(14691) - ..add(14692) - ..add(14693) - ..add(14694) - ..add(14695) - ..add(14696) - ..add(14697) - ..add(14698) - ..add(14699) - ..add(14700) - ..add(14701) - ..add(14702) - ..add(14703) - ..add(14704) - ..add(14705) - ..add(14706) - ..add(14707) - ..add(14708) - ..add(14709) - ..add(14710) - ..add(14711) - ..add(14712) - ..add(14713) - ..add(14714) - ..add(14715) - ..add(14716) - ..add(14717) - ..add(14718) - ..add(14719) - ..add(14720) - ..add(14721) - ..add(14722) - ..add(14723) - ..add(14724) - ..add(14725) - ..add(14726) - ..add(14727) - ..add(14728) - ..add(14729) - ..add(14730) - ..add(14731) - ..add(14732) - ..add(14733) - ..add(14734) - ..add(14735) - ..add(14736) - ..add(14737) - ..add(14738) - ..add(14739) - ..add(14740) - ..add(14741) - ..add(14742) - ..add(14743) - ..add(14744) - ..add(14745) - ..add(14746) - ..add(14747) - ..add(14748) - ..add(14749) - ..add(14750) - ..add(14751) - ..add(14752) - ..add(14753) - ..add(14754) - ..add(14755) - ..add(14756) - ..add(14757) - ..add(14758) - ..add(14759) - ..add(14760) - ..add(14761) - ..add(14762) - ..add(14763) - ..add(14764) - ..add(14765) - ..add(14766) - ..add(14767) - ..add(14768) - ..add(14769) - ..add(14770) - ..add(14771) - ..add(14772) - ..add(14773) - ..add(14774) - ..add(14775) - ..add(14776) - ..add(14777) - ..add(14778) - ..add(14779) - ..add(14780) - ..add(14781) - ..add(14782) - ..add(14783) - ..add(14784) - ..add(14785) - ..add(14786) - ..add(14787) - ..add(14788) - ..add(14789) - ..add(14790) - ..add(14791) - ..add(14792) - ..add(14793) - ..add(14794) - ..add(14795) - ..add(14796) - ..add(14797) - ..add(14798) - ..add(14799) - ..add(14800) - ..add(14801) - ..add(14802) - ..add(14803) - ..add(14804) - ..add(14805) - ..add(14806) - ..add(14807) - ..add(14808) - ..add(14809) - ..add(14810) - ..add(14811) - ..add(14812) - ..add(14813) - ..add(14814) - ..add(14815) - ..add(14816) - ..add(14817) - ..add(14818) - ..add(14819) - ..add(14820) - ..add(14821) - ..add(14822) - ..add(14823) - ..add(14824) - ..add(14825) - ..add(14826) - ..add(14827) - ..add(14828) - ..add(14829) - ..add(14830) - ..add(14831) - ..add(14832) - ..add(14833) - ..add(14834) - ..add(14835) - ..add(14836) - ..add(14837) - ..add(14838) - ..add(14839) - ..add(14840) - ..add(14841) - ..add(14842) - ..add(14843) - ..add(14844) - ..add(14845) - ..add(14846) - ..add(14847) - ..add(14848) - ..add(14849) - ..add(14850) - ..add(14851) - ..add(14852) - ..add(14853) - ..add(14854) - ..add(14855) - ..add(14856) - ..add(14857) - ..add(14858) - ..add(14859) - ..add(14860) - ..add(14861) - ..add(14862) - ..add(14863) - ..add(14864) - ..add(14865) - ..add(14866) - ..add(14867) - ..add(14868) - ..add(14869) - ..add(14870) - ..add(14871) - ..add(14872) - ..add(14873) - ..add(14874) - ..add(14875) - ..add(14876) - ..add(14877) - ..add(14878) - ..add(14879) - ..add(14880) - ..add(14881) - ..add(14882) - ..add(14883) - ..add(14884) - ..add(14885) - ..add(14886) - ..add(14887) - ..add(14888) - ..add(14889) - ..add(14890) - ..add(14891) - ..add(14892) - ..add(14893) - ..add(14894) - ..add(14895) - ..add(14896) - ..add(14897) - ..add(14898) - ..add(14899) - ..add(14900) - ..add(14901) - ..add(14902) - ..add(14903) - ..add(14904) - ..add(14905) - ..add(14906) - ..add(14907) - ..add(14908) - ..add(14909) - ..add(14910) - ..add(14911) - ..add(14912) - ..add(14913) - ..add(14914) - ..add(14915) - ..add(14916) - ..add(14917) - ..add(14918) - ..add(14919) - ..add(14920) - ..add(14921) - ..add(14922) - ..add(14923) - ..add(14924) - ..add(14925) - ..add(14926) - ..add(14927) - ..add(14928) - ..add(14929) - ..add(14930) - ..add(14931) - ..add(14932) - ..add(14933) - ..add(14934) - ..add(14935) - ..add(14936) - ..add(14937) - ..add(14938) - ..add(14939) - ..add(14940) - ..add(14941) - ..add(14942) - ..add(14943) - ..add(14944) - ..add(14945) - ..add(14946) - ..add(14947) - ..add(14948) - ..add(14949) - ..add(14950) - ..add(14951) - ..add(14952) - ..add(14953) - ..add(14954) - ..add(14955) - ..add(14956) - ..add(14957) - ..add(14958) - ..add(14959) - ..add(14960) - ..add(14961) - ..add(14962) - ..add(14963) - ..add(14964) - ..add(14965) - ..add(14966) - ..add(14967) - ..add(14968) - ..add(14969) - ..add(14970) - ..add(14971) - ..add(14972) - ..add(14973) - ..add(14974) - ..add(14975) - ..add(14976) - ..add(14977) - ..add(14978) - ..add(14979) - ..add(14980) - ..add(14981) - ..add(14982) - ..add(14983) - ..add(14984) - ..add(14985) - ..add(14986) - ..add(14987) - ..add(14988) - ..add(14989) - ..add(14990) - ..add(14991) - ..add(14992) - ..add(14993) - ..add(14994) - ..add(14995) - ..add(14996) - ..add(14997) - ..add(14998) - ..add(14999) - ..add(15000) - ..add(15001) - ..add(15002) - ..add(15003) - ..add(15004) - ..add(15005) - ..add(15006) - ..add(15007) - ..add(15008) - ..add(15009) - ..add(15010) - ..add(15011) - ..add(15012) - ..add(15013) - ..add(15014) - ..add(15015) - ..add(15016) - ..add(15017) - ..add(15018) - ..add(15019) - ..add(15020) - ..add(15021) - ..add(15022) - ..add(15023) - ..add(15024) - ..add(15025) - ..add(15026) - ..add(15027) - ..add(15028) - ..add(15029) - ..add(15030) - ..add(15031) - ..add(15032) - ..add(15033) - ..add(15034) - ..add(15035) - ..add(15036) - ..add(15037) - ..add(15038) - ..add(15039) - ..add(15040) - ..add(15041) - ..add(15042) - ..add(15043) - ..add(15044) - ..add(15045) - ..add(15046) - ..add(15047) - ..add(15048) - ..add(15049) - ..add(15050) - ..add(15051) - ..add(15052) - ..add(15053) - ..add(15054) - ..add(15055) - ..add(15056) - ..add(15057) - ..add(15058) - ..add(15059) - ..add(15060) - ..add(15061) - ..add(15062) - ..add(15063) - ..add(15064) - ..add(15065) - ..add(15066) - ..add(15067) - ..add(15068) - ..add(15069) - ..add(15070) - ..add(15071) - ..add(15072) - ..add(15073) - ..add(15074) - ..add(15075) - ..add(15076) - ..add(15077) - ..add(15078) - ..add(15079) - ..add(15080) - ..add(15081) - ..add(15082) - ..add(15083) - ..add(15084) - ..add(15085) - ..add(15086) - ..add(15087) - ..add(15088) - ..add(15089) - ..add(15090) - ..add(15091) - ..add(15092) - ..add(15093) - ..add(15094) - ..add(15095) - ..add(15096) - ..add(15097) - ..add(15098) - ..add(15099) - ..add(15100) - ..add(15101) - ..add(15102) - ..add(15103) - ..add(15104) - ..add(15105) - ..add(15106) - ..add(15107) - ..add(15108) - ..add(15109) - ..add(15110) - ..add(15111) - ..add(15112) - ..add(15113) - ..add(15114) - ..add(15115) - ..add(15116) - ..add(15117) - ..add(15118) - ..add(15119) - ..add(15120) - ..add(15121) - ..add(15122) - ..add(15123) - ..add(15124) - ..add(15125) - ..add(15126) - ..add(15127) - ..add(15128) - ..add(15129) - ..add(15130) - ..add(15131) - ..add(15132) - ..add(15133) - ..add(15134) - ..add(15135) - ..add(15136) - ..add(15137) - ..add(15138) - ..add(15139) - ..add(15140) - ..add(15141) - ..add(15142) - ..add(15143) - ..add(15144) - ..add(15145) - ..add(15146) - ..add(15147) - ..add(15148) - ..add(15149) - ..add(15150) - ..add(15151) - ..add(15152) - ..add(15153) - ..add(15154) - ..add(15155) - ..add(15156) - ..add(15157) - ..add(15158) - ..add(15159) - ..add(15160) - ..add(15161) - ..add(15162) - ..add(15163) - ..add(15164) - ..add(15165) - ..add(15166) - ..add(15167) - ..add(15168) - ..add(15169) - ..add(15170) - ..add(15171) - ..add(15172) - ..add(15173) - ..add(15174) - ..add(15175) - ..add(15176) - ..add(15177) - ..add(15178) - ..add(15179) - ..add(15180) - ..add(15181) - ..add(15182) - ..add(15183) - ..add(15184) - ..add(15185) - ..add(15186) - ..add(15187) - ..add(15188) - ..add(15189) - ..add(15190) - ..add(15191) - ..add(15192) - ..add(15193) - ..add(15194) - ..add(15195) - ..add(15196) - ..add(15197) - ..add(15198) - ..add(15199) - ..add(15200) - ..add(15201) - ..add(15202) - ..add(15203) - ..add(15204) - ..add(15205) - ..add(15206) - ..add(15207) - ..add(15208) - ..add(15209) - ..add(15210) - ..add(15211) - ..add(15212) - ..add(15213) - ..add(15214) - ..add(15215) - ..add(15216) - ..add(15217) - ..add(15218) - ..add(15219) - ..add(15220) - ..add(15221) - ..add(15222) - ..add(15223) - ..add(15224) - ..add(15225) - ..add(15226) - ..add(15227) - ..add(15228) - ..add(15229) - ..add(15230) - ..add(15231) - ..add(15232) - ..add(15233) - ..add(15234) - ..add(15235) - ..add(15236) - ..add(15237) - ..add(15238) - ..add(15239) - ..add(15240) - ..add(15241) - ..add(15242) - ..add(15243) - ..add(15244) - ..add(15245) - ..add(15246) - ..add(15247) - ..add(15248) - ..add(15249) - ..add(15250) - ..add(15251) - ..add(15252) - ..add(15253) - ..add(15254) - ..add(15255) - ..add(15256) - ..add(15257) - ..add(15258) - ..add(15259) - ..add(15260) - ..add(15261) - ..add(15262) - ..add(15263) - ..add(15264) - ..add(15265) - ..add(15266) - ..add(15267) - ..add(15268) - ..add(15269) - ..add(15270) - ..add(15271) - ..add(15272) - ..add(15273) - ..add(15274) - ..add(15275) - ..add(15276) - ..add(15277) - ..add(15278) - ..add(15279) - ..add(15280) - ..add(15281) - ..add(15282) - ..add(15283) - ..add(15284) - ..add(15285) - ..add(15286) - ..add(15287) - ..add(15288) - ..add(15289) - ..add(15290) - ..add(15291) - ..add(15292) - ..add(15293) - ..add(15294) - ..add(15295) - ..add(15296) - ..add(15297) - ..add(15298) - ..add(15299) - ..add(15300) - ..add(15301) - ..add(15302) - ..add(15303) - ..add(15304) - ..add(15305) - ..add(15306) - ..add(15307) - ..add(15308) - ..add(15309) - ..add(15310) - ..add(15311) - ..add(15312) - ..add(15313) - ..add(15314) - ..add(15315) - ..add(15316) - ..add(15317) - ..add(15318) - ..add(15319) - ..add(15320) - ..add(15321) - ..add(15322) - ..add(15323) - ..add(15324) - ..add(15325) - ..add(15326) - ..add(15327) - ..add(15328) - ..add(15329) - ..add(15330) - ..add(15331) - ..add(15332) - ..add(15333) - ..add(15334) - ..add(15335) - ..add(15336) - ..add(15337) - ..add(15338) - ..add(15339) - ..add(15340) - ..add(15341) - ..add(15342) - ..add(15343) - ..add(15344) - ..add(15345) - ..add(15346) - ..add(15347) - ..add(15348) - ..add(15349) - ..add(15350) - ..add(15351) - ..add(15352) - ..add(15353) - ..add(15354) - ..add(15355) - ..add(15356) - ..add(15357) - ..add(15358) - ..add(15359) - ..add(15360) - ..add(15361) - ..add(15362) - ..add(15363) - ..add(15364) - ..add(15365) - ..add(15366) - ..add(15367) - ..add(15368) - ..add(15369) - ..add(15370) - ..add(15371) - ..add(15372) - ..add(15373) - ..add(15374) - ..add(15375) - ..add(15376) - ..add(15377) - ..add(15378) - ..add(15379) - ..add(15380) - ..add(15381) - ..add(15382) - ..add(15383) - ..add(15384) - ..add(15385) - ..add(15386) - ..add(15387) - ..add(15388) - ..add(15389) - ..add(15390) - ..add(15391) - ..add(15392) - ..add(15393) - ..add(15394) - ..add(15395) - ..add(15396) - ..add(15397) - ..add(15398) - ..add(15399) - ..add(15400) - ..add(15401) - ..add(15402) - ..add(15403) - ..add(15404) - ..add(15405) - ..add(15406) - ..add(15407) - ..add(15408) - ..add(15409) - ..add(15410) - ..add(15411) - ..add(15412) - ..add(15413) - ..add(15414) - ..add(15415) - ..add(15416) - ..add(15417) - ..add(15418) - ..add(15419) - ..add(15420) - ..add(15421) - ..add(15422) - ..add(15423) - ..add(15424) - ..add(15425) - ..add(15426) - ..add(15427) - ..add(15428) - ..add(15429) - ..add(15430) - ..add(15431) - ..add(15432) - ..add(15433) - ..add(15434) - ..add(15435) - ..add(15436) - ..add(15437) - ..add(15438) - ..add(15439) - ..add(15440) - ..add(15441) - ..add(15442) - ..add(15443) - ..add(15444) - ..add(15445) - ..add(15446) - ..add(15447) - ..add(15448) - ..add(15449) - ..add(15450) - ..add(15451) - ..add(15452) - ..add(15453) - ..add(15454) - ..add(15455) - ..add(15456) - ..add(15457) - ..add(15458) - ..add(15459) - ..add(15460) - ..add(15461) - ..add(15462) - ..add(15463) - ..add(15464) - ..add(15465) - ..add(15466) - ..add(15467) - ..add(15468) - ..add(15469) - ..add(15470) - ..add(15471) - ..add(15472) - ..add(15473) - ..add(15474) - ..add(15475) - ..add(15476) - ..add(15477) - ..add(15478) - ..add(15479) - ..add(15480) - ..add(15481) - ..add(15482) - ..add(15483) - ..add(15484) - ..add(15485) - ..add(15486) - ..add(15487) - ..add(15488) - ..add(15489) - ..add(15490) - ..add(15491) - ..add(15492) - ..add(15493) - ..add(15494) - ..add(15495) - ..add(15496) - ..add(15497) - ..add(15498) - ..add(15499) - ..add(15500) - ..add(15501) - ..add(15502) - ..add(15503) - ..add(15504) - ..add(15505) - ..add(15506) - ..add(15507) - ..add(15508) - ..add(15509) - ..add(15510) - ..add(15511) - ..add(15512) - ..add(15513) - ..add(15514) - ..add(15515) - ..add(15516) - ..add(15517) - ..add(15518) - ..add(15519) - ..add(15520) - ..add(15521) - ..add(15522) - ..add(15523) - ..add(15524) - ..add(15525) - ..add(15526) - ..add(15527) - ..add(15528) - ..add(15529) - ..add(15530) - ..add(15531) - ..add(15532) - ..add(15533) - ..add(15534) - ..add(15535) - ..add(15536) - ..add(15537) - ..add(15538) - ..add(15539) - ..add(15540) - ..add(15541) - ..add(15542) - ..add(15543) - ..add(15544) - ..add(15545) - ..add(15546) - ..add(15547) - ..add(15548) - ..add(15549) - ..add(15550) - ..add(15551) - ..add(15552) - ..add(15553) - ..add(15554) - ..add(15555) - ..add(15556) - ..add(15557) - ..add(15558) - ..add(15559) - ..add(15560) - ..add(15561) - ..add(15562) - ..add(15563) - ..add(15564) - ..add(15565) - ..add(15566) - ..add(15567) - ..add(15568) - ..add(15569) - ..add(15570) - ..add(15571) - ..add(15572) - ..add(15573) - ..add(15574) - ..add(15575) - ..add(15576) - ..add(15577) - ..add(15578) - ..add(15579) - ..add(15580) - ..add(15581) - ..add(15582) - ..add(15583) - ..add(15584) - ..add(15585) - ..add(15586) - ..add(15587) - ..add(15588) - ..add(15589) - ..add(15590) - ..add(15591) - ..add(15592) - ..add(15593) - ..add(15594) - ..add(15595) - ..add(15596) - ..add(15597) - ..add(15598) - ..add(15599) - ..add(15600) - ..add(15601) - ..add(15602) - ..add(15603) - ..add(15604) - ..add(15605) - ..add(15606) - ..add(15607) - ..add(15608) - ..add(15609) - ..add(15610) - ..add(15611) - ..add(15612) - ..add(15613) - ..add(15614) - ..add(15615) - ..add(15616) - ..add(15617) - ..add(15618) - ..add(15619) - ..add(15620) - ..add(15621) - ..add(15622) - ..add(15623) - ..add(15624) - ..add(15625) - ..add(15626) - ..add(15627) - ..add(15628) - ..add(15629) - ..add(15630) - ..add(15631) - ..add(15632) - ..add(15633) - ..add(15634) - ..add(15635) - ..add(15636) - ..add(15637) - ..add(15638) - ..add(15639) - ..add(15640) - ..add(15641) - ..add(15642) - ..add(15643) - ..add(15644) - ..add(15645) - ..add(15646) - ..add(15647) - ..add(15648) - ..add(15649) - ..add(15650) - ..add(15651) - ..add(15652) - ..add(15653) - ..add(15654) - ..add(15655) - ..add(15656) - ..add(15657) - ..add(15658) - ..add(15659) - ..add(15660) - ..add(15661) - ..add(15662) - ..add(15663) - ..add(15664) - ..add(15665) - ..add(15666) - ..add(15667) - ..add(15668) - ..add(15669) - ..add(15670) - ..add(15671) - ..add(15672) - ..add(15673) - ..add(15674) - ..add(15675) - ..add(15676) - ..add(15677) - ..add(15678) - ..add(15679) - ..add(15680) - ..add(15681) - ..add(15682) - ..add(15683) - ..add(15684) - ..add(15685) - ..add(15686) - ..add(15687) - ..add(15688) - ..add(15689) - ..add(15690) - ..add(15691) - ..add(15692) - ..add(15693) - ..add(15694) - ..add(15695) - ..add(15696) - ..add(15697) - ..add(15698) - ..add(15699) - ..add(15700) - ..add(15701) - ..add(15702) - ..add(15703) - ..add(15704) - ..add(15705) - ..add(15706) - ..add(15707) - ..add(15708) - ..add(15709) - ..add(15710) - ..add(15711) - ..add(15712) - ..add(15713) - ..add(15714) - ..add(15715) - ..add(15716) - ..add(15717) - ..add(15718) - ..add(15719) - ..add(15720) - ..add(15721) - ..add(15722) - ..add(15723) - ..add(15724) - ..add(15725) - ..add(15726) - ..add(15727) - ..add(15728) - ..add(15729) - ..add(15730) - ..add(15731) - ..add(15732) - ..add(15733) - ..add(15734) - ..add(15735) - ..add(15736) - ..add(15737) - ..add(15738) - ..add(15739) - ..add(15740) - ..add(15741) - ..add(15742) - ..add(15743) - ..add(15744) - ..add(15745) - ..add(15746) - ..add(15747) - ..add(15748) - ..add(15749) - ..add(15750) - ..add(15751) - ..add(15752) - ..add(15753) - ..add(15754) - ..add(15755) - ..add(15756) - ..add(15757) - ..add(15758) - ..add(15759) - ..add(15760) - ..add(15761) - ..add(15762) - ..add(15763) - ..add(15764) - ..add(15765) - ..add(15766) - ..add(15767) - ..add(15768) - ..add(15769) - ..add(15770) - ..add(15771) - ..add(15772) - ..add(15773) - ..add(15774) - ..add(15775) - ..add(15776) - ..add(15777) - ..add(15778) - ..add(15779) - ..add(15780) - ..add(15781) - ..add(15782) - ..add(15783) - ..add(15784) - ..add(15785) - ..add(15786) - ..add(15787) - ..add(15788) - ..add(15789) - ..add(15790) - ..add(15791) - ..add(15792) - ..add(15793) - ..add(15794) - ..add(15795) - ..add(15796) - ..add(15797) - ..add(15798) - ..add(15799) - ..add(15800) - ..add(15801) - ..add(15802) - ..add(15803) - ..add(15804) - ..add(15805) - ..add(15806) - ..add(15807) - ..add(15808) - ..add(15809) - ..add(15810) - ..add(15811) - ..add(15812) - ..add(15813) - ..add(15814) - ..add(15815) - ..add(15816) - ..add(15817) - ..add(15818) - ..add(15819) - ..add(15820) - ..add(15821) - ..add(15822) - ..add(15823) - ..add(15824) - ..add(15825) - ..add(15826) - ..add(15827) - ..add(15828) - ..add(15829) - ..add(15830) - ..add(15831) - ..add(15832) - ..add(15833) - ..add(15834) - ..add(15835) - ..add(15836) - ..add(15837) - ..add(15838) - ..add(15839) - ..add(15840) - ..add(15841) - ..add(15842) - ..add(15843) - ..add(15844) - ..add(15845) - ..add(15846) - ..add(15847) - ..add(15848) - ..add(15849) - ..add(15850) - ..add(15851) - ..add(15852) - ..add(15853) - ..add(15854) - ..add(15855) - ..add(15856) - ..add(15857) - ..add(15858) - ..add(15859) - ..add(15860) - ..add(15861) - ..add(15862) - ..add(15863) - ..add(15864) - ..add(15865) - ..add(15866) - ..add(15867) - ..add(15868) - ..add(15869) - ..add(15870) - ..add(15871) - ..add(15872) - ..add(15873) - ..add(15874) - ..add(15875) - ..add(15876) - ..add(15877) - ..add(15878) - ..add(15879) - ..add(15880) - ..add(15881) - ..add(15882) - ..add(15883) - ..add(15884) - ..add(15885) - ..add(15886) - ..add(15887) - ..add(15888) - ..add(15889) - ..add(15890) - ..add(15891) - ..add(15892) - ..add(15893) - ..add(15894) - ..add(15895) - ..add(15896) - ..add(15897) - ..add(15898) - ..add(15899) - ..add(15900) - ..add(15901) - ..add(15902) - ..add(15903) - ..add(15904) - ..add(15905) - ..add(15906) - ..add(15907) - ..add(15908) - ..add(15909) - ..add(15910) - ..add(15911) - ..add(15912) - ..add(15913) - ..add(15914) - ..add(15915) - ..add(15916) - ..add(15917) - ..add(15918) - ..add(15919) - ..add(15920) - ..add(15921) - ..add(15922) - ..add(15923) - ..add(15924) - ..add(15925) - ..add(15926) - ..add(15927) - ..add(15928) - ..add(15929) - ..add(15930) - ..add(15931) - ..add(15932) - ..add(15933) - ..add(15934) - ..add(15935) - ..add(15936) - ..add(15937) - ..add(15938) - ..add(15939) - ..add(15940) - ..add(15941) - ..add(15942) - ..add(15943) - ..add(15944) - ..add(15945) - ..add(15946) - ..add(15947) - ..add(15948) - ..add(15949) - ..add(15950) - ..add(15951) - ..add(15952) - ..add(15953) - ..add(15954) - ..add(15955) - ..add(15956) - ..add(15957) - ..add(15958) - ..add(15959) - ..add(15960) - ..add(15961) - ..add(15962) - ..add(15963) - ..add(15964) - ..add(15965) - ..add(15966) - ..add(15967) - ..add(15968) - ..add(15969) - ..add(15970) - ..add(15971) - ..add(15972) - ..add(15973) - ..add(15974) - ..add(15975) - ..add(15976) - ..add(15977) - ..add(15978) - ..add(15979) - ..add(15980) - ..add(15981) - ..add(15982) - ..add(15983) - ..add(15984) - ..add(15985) - ..add(15986) - ..add(15987) - ..add(15988) - ..add(15989) - ..add(15990) - ..add(15991) - ..add(15992) - ..add(15993) - ..add(15994) - ..add(15995) - ..add(15996) - ..add(15997) - ..add(15998) - ..add(15999) - ..add(16000) - ..add(16001) - ..add(16002) - ..add(16003) - ..add(16004) - ..add(16005) - ..add(16006) - ..add(16007) - ..add(16008) - ..add(16009) - ..add(16010) - ..add(16011) - ..add(16012) - ..add(16013) - ..add(16014) - ..add(16015) - ..add(16016) - ..add(16017) - ..add(16018) - ..add(16019) - ..add(16020) - ..add(16021) - ..add(16022) - ..add(16023) - ..add(16024) - ..add(16025) - ..add(16026) - ..add(16027) - ..add(16028) - ..add(16029) - ..add(16030) - ..add(16031) - ..add(16032) - ..add(16033) - ..add(16034) - ..add(16035) - ..add(16036) - ..add(16037) - ..add(16038) - ..add(16039) - ..add(16040) - ..add(16041) - ..add(16042) - ..add(16043) - ..add(16044) - ..add(16045) - ..add(16046) - ..add(16047) - ..add(16048) - ..add(16049) - ..add(16050) - ..add(16051) - ..add(16052) - ..add(16053) - ..add(16054) - ..add(16055) - ..add(16056) - ..add(16057) - ..add(16058) - ..add(16059) - ..add(16060) - ..add(16061) - ..add(16062) - ..add(16063) - ..add(16064) - ..add(16065) - ..add(16066) - ..add(16067) - ..add(16068) - ..add(16069) - ..add(16070) - ..add(16071) - ..add(16072) - ..add(16073) - ..add(16074) - ..add(16075) - ..add(16076) - ..add(16077) - ..add(16078) - ..add(16079) - ..add(16080) - ..add(16081) - ..add(16082) - ..add(16083) - ..add(16084) - ..add(16085) - ..add(16086) - ..add(16087) - ..add(16088) - ..add(16089) - ..add(16090) - ..add(16091) - ..add(16092) - ..add(16093) - ..add(16094) - ..add(16095) - ..add(16096) - ..add(16097) - ..add(16098) - ..add(16099) - ..add(16100) - ..add(16101) - ..add(16102) - ..add(16103) - ..add(16104) - ..add(16105) - ..add(16106) - ..add(16107) - ..add(16108) - ..add(16109) - ..add(16110) - ..add(16111) - ..add(16112) - ..add(16113) - ..add(16114) - ..add(16115) - ..add(16116) - ..add(16117) - ..add(16118) - ..add(16119) - ..add(16120) - ..add(16121) - ..add(16122) - ..add(16123) - ..add(16124) - ..add(16125) - ..add(16126) - ..add(16127) - ..add(16128) - ..add(16129) - ..add(16130) - ..add(16131) - ..add(16132) - ..add(16133) - ..add(16134) - ..add(16135) - ..add(16136) - ..add(16137) - ..add(16138) - ..add(16139) - ..add(16140) - ..add(16141) - ..add(16142) - ..add(16143) - ..add(16144) - ..add(16145) - ..add(16146) - ..add(16147) - ..add(16148) - ..add(16149) - ..add(16150) - ..add(16151) - ..add(16152) - ..add(16153) - ..add(16154) - ..add(16155) - ..add(16156) - ..add(16157) - ..add(16158) - ..add(16159) - ..add(16160) - ..add(16161) - ..add(16162) - ..add(16163) - ..add(16164) - ..add(16165) - ..add(16166) - ..add(16167) - ..add(16168) - ..add(16169) - ..add(16170) - ..add(16171) - ..add(16172) - ..add(16173) - ..add(16174) - ..add(16175) - ..add(16176) - ..add(16177) - ..add(16178) - ..add(16179) - ..add(16180) - ..add(16181) - ..add(16182) - ..add(16183) - ..add(16184) - ..add(16185) - ..add(16186) - ..add(16187) - ..add(16188) - ..add(16189) - ..add(16190) - ..add(16191) - ..add(16192) - ..add(16193) - ..add(16194) - ..add(16195) - ..add(16196) - ..add(16197) - ..add(16198) - ..add(16199) - ..add(16200) - ..add(16201) - ..add(16202) - ..add(16203) - ..add(16204) - ..add(16205) - ..add(16206) - ..add(16207) - ..add(16208) - ..add(16209) - ..add(16210) - ..add(16211) - ..add(16212) - ..add(16213) - ..add(16214) - ..add(16215) - ..add(16216) - ..add(16217) - ..add(16218) - ..add(16219) - ..add(16220) - ..add(16221) - ..add(16222) - ..add(16223) - ..add(16224) - ..add(16225) - ..add(16226) - ..add(16227) - ..add(16228) - ..add(16229) - ..add(16230) - ..add(16231) - ..add(16232) - ..add(16233) - ..add(16234) - ..add(16235) - ..add(16236) - ..add(16237) - ..add(16238) - ..add(16239) - ..add(16240) - ..add(16241) - ..add(16242) - ..add(16243) - ..add(16244) - ..add(16245) - ..add(16246) - ..add(16247) - ..add(16248) - ..add(16249) - ..add(16250) - ..add(16251) - ..add(16252) - ..add(16253) - ..add(16254) - ..add(16255) - ..add(16256) - ..add(16257) - ..add(16258) - ..add(16259) - ..add(16260) - ..add(16261) - ..add(16262) - ..add(16263) - ..add(16264) - ..add(16265) - ..add(16266) - ..add(16267) - ..add(16268) - ..add(16269) - ..add(16270) - ..add(16271) - ..add(16272) - ..add(16273) - ..add(16274) - ..add(16275) - ..add(16276) - ..add(16277) - ..add(16278) - ..add(16279) - ..add(16280) - ..add(16281) - ..add(16282) - ..add(16283) - ..add(16284) - ..add(16285) - ..add(16286) - ..add(16287) - ..add(16288) - ..add(16289) - ..add(16290) - ..add(16291) - ..add(16292) - ..add(16293) - ..add(16294) - ..add(16295) - ..add(16296) - ..add(16297) - ..add(16298) - ..add(16299) - ..add(16300) - ..add(16301) - ..add(16302) - ..add(16303) - ..add(16304) - ..add(16305) - ..add(16306) - ..add(16307) - ..add(16308) - ..add(16309) - ..add(16310) - ..add(16311) - ..add(16312) - ..add(16313) - ..add(16314) - ..add(16315) - ..add(16316) - ..add(16317) - ..add(16318) - ..add(16319) - ..add(16320) - ..add(16321) - ..add(16322) - ..add(16323) - ..add(16324) - ..add(16325) - ..add(16326) - ..add(16327) - ..add(16328) - ..add(16329) - ..add(16330) - ..add(16331) - ..add(16332) - ..add(16333) - ..add(16334) - ..add(16335) - ..add(16336) - ..add(16337) - ..add(16338) - ..add(16339) - ..add(16340) - ..add(16341) - ..add(16342) - ..add(16343) - ..add(16344) - ..add(16345) - ..add(16346) - ..add(16347) - ..add(16348) - ..add(16349) - ..add(16350) - ..add(16351) - ..add(16352) - ..add(16353) - ..add(16354) - ..add(16355) - ..add(16356) - ..add(16357) - ..add(16358) - ..add(16359) - ..add(16360) - ..add(16361) - ..add(16362) - ..add(16363) - ..add(16364) - ..add(16365) - ..add(16366) - ..add(16367) - ..add(16368) - ..add(16369) - ..add(16370) - ..add(16371) - ..add(16372) - ..add(16373) - ..add(16374) - ..add(16375) - ..add(16376) - ..add(16377) - ..add(16378) - ..add(16379) - ..add(16380) - ..add(16381) - ..add(16382) - ..add(16383) - ..add(16384) - ..add(16385) - ..add(16386) - ..add(16387) - ..add(16388) - ..add(16389) - ..add(16390) - ..add(16391) - ..add(16392) - ..add(16393) - ..add(16394) - ..add(16395) - ..add(16396) - ..add(16397) - ..add(16398) - ..add(16399) - ..add(16400) - ..add(16401) - ..add(16402) - ..add(16403) - ..add(16404) - ..add(16405) - ..add(16406) - ..add(16407) - ..add(16408) - ..add(16409) - ..add(16410) - ..add(16411) - ..add(16412) - ..add(16413) - ..add(16414) - ..add(16415) - ..add(16416) - ..add(16417) - ..add(16418) - ..add(16419) - ..add(16420) - ..add(16421) - ..add(16422) - ..add(16423) - ..add(16424) - ..add(16425) - ..add(16426) - ..add(16427) - ..add(16428) - ..add(16429) - ..add(16430) - ..add(16431) - ..add(16432) - ..add(16433) - ..add(16434) - ..add(16435) - ..add(16436) - ..add(16437) - ..add(16438) - ..add(16439) - ..add(16440) - ..add(16441) - ..add(16442) - ..add(16443) - ..add(16444) - ..add(16445) - ..add(16446) - ..add(16447) - ..add(16448) - ..add(16449) - ..add(16450) - ..add(16451) - ..add(16452) - ..add(16453) - ..add(16454) - ..add(16455) - ..add(16456) - ..add(16457) - ..add(16458) - ..add(16459) - ..add(16460) - ..add(16461) - ..add(16462) - ..add(16463) - ..add(16464) - ..add(16465) - ..add(16466) - ..add(16467) - ..add(16468) - ..add(16469) - ..add(16470) - ..add(16471) - ..add(16472) - ..add(16473) - ..add(16474) - ..add(16475) - ..add(16476) - ..add(16477) - ..add(16478) - ..add(16479) - ..add(16480) - ..add(16481) - ..add(16482) - ..add(16483) - ..add(16484) - ..add(16485) - ..add(16486) - ..add(16487) - ..add(16488) - ..add(16489) - ..add(16490) - ..add(16491) - ..add(16492) - ..add(16493) - ..add(16494) - ..add(16495) - ..add(16496) - ..add(16497) - ..add(16498) - ..add(16499) - ..add(16500) - ..add(16501) - ..add(16502) - ..add(16503) - ..add(16504) - ..add(16505) - ..add(16506) - ..add(16507) - ..add(16508) - ..add(16509) - ..add(16510) - ..add(16511) - ..add(16512) - ..add(16513) - ..add(16514) - ..add(16515) - ..add(16516) - ..add(16517) - ..add(16518) - ..add(16519) - ..add(16520) - ..add(16521) - ..add(16522) - ..add(16523) - ..add(16524) - ..add(16525) - ..add(16526) - ..add(16527) - ..add(16528) - ..add(16529) - ..add(16530) - ..add(16531) - ..add(16532) - ..add(16533) - ..add(16534) - ..add(16535) - ..add(16536) - ..add(16537) - ..add(16538) - ..add(16539) - ..add(16540) - ..add(16541) - ..add(16542) - ..add(16543) - ..add(16544) - ..add(16545) - ..add(16546) - ..add(16547) - ..add(16548) - ..add(16549) - ..add(16550) - ..add(16551) - ..add(16552) - ..add(16553) - ..add(16554) - ..add(16555) - ..add(16556) - ..add(16557) - ..add(16558) - ..add(16559) - ..add(16560) - ..add(16561) - ..add(16562) - ..add(16563) - ..add(16564) - ..add(16565) - ..add(16566) - ..add(16567) - ..add(16568) - ..add(16569) - ..add(16570) - ..add(16571) - ..add(16572) - ..add(16573) - ..add(16574) - ..add(16575) - ..add(16576) - ..add(16577) - ..add(16578) - ..add(16579) - ..add(16580) - ..add(16581) - ..add(16582) - ..add(16583) - ..add(16584) - ..add(16585) - ..add(16586) - ..add(16587) - ..add(16588) - ..add(16589) - ..add(16590) - ..add(16591) - ..add(16592) - ..add(16593) - ..add(16594) - ..add(16595) - ..add(16596) - ..add(16597) - ..add(16598) - ..add(16599) - ..add(16600) - ..add(16601) - ..add(16602) - ..add(16603) - ..add(16604) - ..add(16605) - ..add(16606) - ..add(16607) - ..add(16608) - ..add(16609) - ..add(16610) - ..add(16611) - ..add(16612) - ..add(16613) - ..add(16614) - ..add(16615) - ..add(16616) - ..add(16617) - ..add(16618) - ..add(16619) - ..add(16620) - ..add(16621) - ..add(16622) - ..add(16623) - ..add(16624) - ..add(16625) - ..add(16626) - ..add(16627) - ..add(16628) - ..add(16629) - ..add(16630) - ..add(16631) - ..add(16632) - ..add(16633) - ..add(16634) - ..add(16635) - ..add(16636) - ..add(16637) - ..add(16638) - ..add(16639) - ..add(16640) - ..add(16641) - ..add(16642) - ..add(16643) - ..add(16644) - ..add(16645) - ..add(16646) - ..add(16647) - ..add(16648) - ..add(16649) - ..add(16650) - ..add(16651) - ..add(16652) - ..add(16653) - ..add(16654) - ..add(16655) - ..add(16656) - ..add(16657) - ..add(16658) - ..add(16659) - ..add(16660) - ..add(16661) - ..add(16662) - ..add(16663) - ..add(16664) - ..add(16665) - ..add(16666) - ..add(16667) - ..add(16668) - ..add(16669) - ..add(16670) - ..add(16671) - ..add(16672) - ..add(16673) - ..add(16674) - ..add(16675) - ..add(16676) - ..add(16677) - ..add(16678) - ..add(16679) - ..add(16680) - ..add(16681) - ..add(16682) - ..add(16683) - ..add(16684) - ..add(16685) - ..add(16686) - ..add(16687) - ..add(16688) - ..add(16689) - ..add(16690) - ..add(16691) - ..add(16692) - ..add(16693) - ..add(16694) - ..add(16695) - ..add(16696) - ..add(16697) - ..add(16698) - ..add(16699) - ..add(16700) - ..add(16701) - ..add(16702) - ..add(16703) - ..add(16704) - ..add(16705) - ..add(16706) - ..add(16707) - ..add(16708) - ..add(16709) - ..add(16710) - ..add(16711) - ..add(16712) - ..add(16713) - ..add(16714) - ..add(16715) - ..add(16716) - ..add(16717) - ..add(16718) - ..add(16719) - ..add(16720) - ..add(16721) - ..add(16722) - ..add(16723) - ..add(16724) - ..add(16725) - ..add(16726) - ..add(16727) - ..add(16728) - ..add(16729) - ..add(16730) - ..add(16731) - ..add(16732) - ..add(16733) - ..add(16734) - ..add(16735) - ..add(16736) - ..add(16737) - ..add(16738) - ..add(16739) - ..add(16740) - ..add(16741) - ..add(16742) - ..add(16743) - ..add(16744) - ..add(16745) - ..add(16746) - ..add(16747) - ..add(16748) - ..add(16749) - ..add(16750) - ..add(16751) - ..add(16752) - ..add(16753) - ..add(16754) - ..add(16755) - ..add(16756) - ..add(16757) - ..add(16758) - ..add(16759) - ..add(16760) - ..add(16761) - ..add(16762) - ..add(16763) - ..add(16764) - ..add(16765) - ..add(16766) - ..add(16767) - ..add(16768) - ..add(16769) - ..add(16770) - ..add(16771) - ..add(16772) - ..add(16773) - ..add(16774) - ..add(16775) - ..add(16776) - ..add(16777) - ..add(16778) - ..add(16779) - ..add(16780) - ..add(16781) - ..add(16782) - ..add(16783) - ..add(16784) - ..add(16785) - ..add(16786) - ..add(16787) - ..add(16788) - ..add(16789) - ..add(16790) - ..add(16791) - ..add(16792) - ..add(16793) - ..add(16794) - ..add(16795) - ..add(16796) - ..add(16797) - ..add(16798) - ..add(16799) - ..add(16800) - ..add(16801) - ..add(16802) - ..add(16803) - ..add(16804) - ..add(16805) - ..add(16806) - ..add(16807) - ..add(16808) - ..add(16809) - ..add(16810) - ..add(16811) - ..add(16812) - ..add(16813) - ..add(16814) - ..add(16815) - ..add(16816) - ..add(16817) - ..add(16818) - ..add(16819) - ..add(16820) - ..add(16821) - ..add(16822) - ..add(16823) - ..add(16824) - ..add(16825) - ..add(16826) - ..add(16827) - ..add(16828) - ..add(16829) - ..add(16830) - ..add(16831) - ..add(16832) - ..add(16833) - ..add(16834) - ..add(16835) - ..add(16836) - ..add(16837) - ..add(16838) - ..add(16839) - ..add(16840) - ..add(16841) - ..add(16842) - ..add(16843) - ..add(16844) - ..add(16845) - ..add(16846) - ..add(16847) - ..add(16848) - ..add(16849) - ..add(16850) - ..add(16851) - ..add(16852) - ..add(16853) - ..add(16854) - ..add(16855) - ..add(16856) - ..add(16857) - ..add(16858) - ..add(16859) - ..add(16860) - ..add(16861) - ..add(16862) - ..add(16863) - ..add(16864) - ..add(16865) - ..add(16866) - ..add(16867) - ..add(16868) - ..add(16869) - ..add(16870) - ..add(16871) - ..add(16872) - ..add(16873) - ..add(16874) - ..add(16875) - ..add(16876) - ..add(16877) - ..add(16878) - ..add(16879) - ..add(16880) - ..add(16881) - ..add(16882) - ..add(16883) - ..add(16884) - ..add(16885) - ..add(16886) - ..add(16887) - ..add(16888) - ..add(16889) - ..add(16890) - ..add(16891) - ..add(16892) - ..add(16893) - ..add(16894) - ..add(16895) - ..add(16896) - ..add(16897) - ..add(16898) - ..add(16899) - ..add(16900) - ..add(16901) - ..add(16902) - ..add(16903) - ..add(16904) - ..add(16905) - ..add(16906) - ..add(16907) - ..add(16908) - ..add(16909) - ..add(16910) - ..add(16911) - ..add(16912) - ..add(16913) - ..add(16914) - ..add(16915) - ..add(16916) - ..add(16917) - ..add(16918) - ..add(16919) - ..add(16920) - ..add(16921) - ..add(16922) - ..add(16923) - ..add(16924) - ..add(16925) - ..add(16926) - ..add(16927) - ..add(16928) - ..add(16929) - ..add(16930) - ..add(16931) - ..add(16932) - ..add(16933) - ..add(16934) - ..add(16935) - ..add(16936) - ..add(16937) - ..add(16938) - ..add(16939) - ..add(16940) - ..add(16941) - ..add(16942) - ..add(16943) - ..add(16944) - ..add(16945) - ..add(16946) - ..add(16947) - ..add(16948) - ..add(16949) - ..add(16950) - ..add(16951) - ..add(16952) - ..add(16953) - ..add(16954) - ..add(16955) - ..add(16956) - ..add(16957) - ..add(16958) - ..add(16959) - ..add(16960) - ..add(16961) - ..add(16962) - ..add(16963) - ..add(16964) - ..add(16965) - ..add(16966) - ..add(16967) - ..add(16968) - ..add(16969) - ..add(16970) - ..add(16971) - ..add(16972) - ..add(16973) - ..add(16974) - ..add(16975) - ..add(16976) - ..add(16977) - ..add(16978) - ..add(16979) - ..add(16980) - ..add(16981) - ..add(16982) - ..add(16983) - ..add(16984) - ..add(16985) - ..add(16986) - ..add(16987) - ..add(16988) - ..add(16989) - ..add(16990) - ..add(16991) - ..add(16992) - ..add(16993) - ..add(16994) - ..add(16995) - ..add(16996) - ..add(16997) - ..add(16998) - ..add(16999) - ..add(17000) - ..add(17001) - ..add(17002) - ..add(17003) - ..add(17004) - ..add(17005) - ..add(17006) - ..add(17007) - ..add(17008) - ..add(17009) - ..add(17010) - ..add(17011) - ..add(17012) - ..add(17013) - ..add(17014) - ..add(17015) - ..add(17016) - ..add(17017) - ..add(17018) - ..add(17019) - ..add(17020) - ..add(17021) - ..add(17022) - ..add(17023) - ..add(17024) - ..add(17025) - ..add(17026) - ..add(17027) - ..add(17028) - ..add(17029) - ..add(17030) - ..add(17031) - ..add(17032) - ..add(17033) - ..add(17034) - ..add(17035) - ..add(17036) - ..add(17037) - ..add(17038) - ..add(17039) - ..add(17040) - ..add(17041) - ..add(17042) - ..add(17043) - ..add(17044) - ..add(17045) - ..add(17046) - ..add(17047) - ..add(17048) - ..add(17049) - ..add(17050) - ..add(17051) - ..add(17052) - ..add(17053) - ..add(17054) - ..add(17055) - ..add(17056) - ..add(17057) - ..add(17058) - ..add(17059) - ..add(17060) - ..add(17061) - ..add(17062) - ..add(17063) - ..add(17064) - ..add(17065) - ..add(17066) - ..add(17067) - ..add(17068) - ..add(17069) - ..add(17070) - ..add(17071) - ..add(17072) - ..add(17073) - ..add(17074) - ..add(17075) - ..add(17076) - ..add(17077) - ..add(17078) - ..add(17079) - ..add(17080) - ..add(17081) - ..add(17082) - ..add(17083) - ..add(17084) - ..add(17085) - ..add(17086) - ..add(17087) - ..add(17088) - ..add(17089) - ..add(17090) - ..add(17091) - ..add(17092) - ..add(17093) - ..add(17094) - ..add(17095) - ..add(17096) - ..add(17097) - ..add(17098) - ..add(17099) - ..add(17100) - ..add(17101) - ..add(17102) - ..add(17103) - ..add(17104) - ..add(17105) - ..add(17106) - ..add(17107) - ..add(17108) - ..add(17109) - ..add(17110) - ..add(17111) - ..add(17112) - ..add(17113) - ..add(17114) - ..add(17115) - ..add(17116) - ..add(17117) - ..add(17118) - ..add(17119) - ..add(17120) - ..add(17121) - ..add(17122) - ..add(17123) - ..add(17124) - ..add(17125) - ..add(17126) - ..add(17127) - ..add(17128) - ..add(17129) - ..add(17130) - ..add(17131) - ..add(17132) - ..add(17133) - ..add(17134) - ..add(17135) - ..add(17136) - ..add(17137) - ..add(17138) - ..add(17139) - ..add(17140) - ..add(17141) - ..add(17142) - ..add(17143) - ..add(17144) - ..add(17145) - ..add(17146) - ..add(17147) - ..add(17148) - ..add(17149) - ..add(17150) - ..add(17151) - ..add(17152) - ..add(17153) - ..add(17154) - ..add(17155) - ..add(17156) - ..add(17157) - ..add(17158) - ..add(17159) - ..add(17160) - ..add(17161) - ..add(17162) - ..add(17163) - ..add(17164) - ..add(17165) - ..add(17166) - ..add(17167) - ..add(17168) - ..add(17169) - ..add(17170) - ..add(17171) - ..add(17172) - ..add(17173) - ..add(17174) - ..add(17175) - ..add(17176) - ..add(17177) - ..add(17178) - ..add(17179) - ..add(17180) - ..add(17181) - ..add(17182) - ..add(17183) - ..add(17184) - ..add(17185) - ..add(17186) - ..add(17187) - ..add(17188) - ..add(17189) - ..add(17190) - ..add(17191) - ..add(17192) - ..add(17193) - ..add(17194) - ..add(17195) - ..add(17196) - ..add(17197) - ..add(17198) - ..add(17199) - ..add(17200) - ..add(17201) - ..add(17202) - ..add(17203) - ..add(17204) - ..add(17205) - ..add(17206) - ..add(17207) - ..add(17208) - ..add(17209) - ..add(17210) - ..add(17211) - ..add(17212) - ..add(17213) - ..add(17214) - ..add(17215) - ..add(17216) - ..add(17217) - ..add(17218) - ..add(17219) - ..add(17220) - ..add(17221) - ..add(17222) - ..add(17223) - ..add(17224) - ..add(17225) - ..add(17226) - ..add(17227) - ..add(17228) - ..add(17229) - ..add(17230) - ..add(17231) - ..add(17232) - ..add(17233) - ..add(17234) - ..add(17235) - ..add(17236) - ..add(17237) - ..add(17238) - ..add(17239) - ..add(17240) - ..add(17241) - ..add(17242) - ..add(17243) - ..add(17244) - ..add(17245) - ..add(17246) - ..add(17247) - ..add(17248) - ..add(17249) - ..add(17250) - ..add(17251) - ..add(17252) - ..add(17253) - ..add(17254) - ..add(17255) - ..add(17256) - ..add(17257) - ..add(17258) - ..add(17259) - ..add(17260) - ..add(17261) - ..add(17262) - ..add(17263) - ..add(17264) - ..add(17265) - ..add(17266) - ..add(17267) - ..add(17268) - ..add(17269) - ..add(17270) - ..add(17271) - ..add(17272) - ..add(17273) - ..add(17274) - ..add(17275) - ..add(17276) - ..add(17277) - ..add(17278) - ..add(17279) - ..add(17280) - ..add(17281) - ..add(17282) - ..add(17283) - ..add(17284) - ..add(17285) - ..add(17286) - ..add(17287) - ..add(17288) - ..add(17289) - ..add(17290) - ..add(17291) - ..add(17292) - ..add(17293) - ..add(17294) - ..add(17295) - ..add(17296) - ..add(17297) - ..add(17298) - ..add(17299) - ..add(17300) - ..add(17301) - ..add(17302) - ..add(17303) - ..add(17304) - ..add(17305) - ..add(17306) - ..add(17307) - ..add(17308) - ..add(17309) - ..add(17310) - ..add(17311) - ..add(17312) - ..add(17313) - ..add(17314) - ..add(17315) - ..add(17316) - ..add(17317) - ..add(17318) - ..add(17319) - ..add(17320) - ..add(17321) - ..add(17322) - ..add(17323) - ..add(17324) - ..add(17325) - ..add(17326) - ..add(17327) - ..add(17328) - ..add(17329) - ..add(17330) - ..add(17331) - ..add(17332) - ..add(17333) - ..add(17334) - ..add(17335) - ..add(17336) - ..add(17337) - ..add(17338) - ..add(17339) - ..add(17340) - ..add(17341) - ..add(17342) - ..add(17343) - ..add(17344) - ..add(17345) - ..add(17346) - ..add(17347) - ..add(17348) - ..add(17349) - ..add(17350) - ..add(17351) - ..add(17352) - ..add(17353) - ..add(17354) - ..add(17355) - ..add(17356) - ..add(17357) - ..add(17358) - ..add(17359) - ..add(17360) - ..add(17361) - ..add(17362) - ..add(17363) - ..add(17364) - ..add(17365) - ..add(17366) - ..add(17367) - ..add(17368) - ..add(17369) - ..add(17370) - ..add(17371) - ..add(17372) - ..add(17373) - ..add(17374) - ..add(17375) - ..add(17376) - ..add(17377) - ..add(17378) - ..add(17379) - ..add(17380) - ..add(17381) - ..add(17382) - ..add(17383) - ..add(17384) - ..add(17385) - ..add(17386) - ..add(17387) - ..add(17388) - ..add(17389) - ..add(17390) - ..add(17391) - ..add(17392) - ..add(17393) - ..add(17394) - ..add(17395) - ..add(17396) - ..add(17397) - ..add(17398) - ..add(17399) - ..add(17400) - ..add(17401) - ..add(17402) - ..add(17403) - ..add(17404) - ..add(17405) - ..add(17406) - ..add(17407) - ..add(17408) - ..add(17409) - ..add(17410) - ..add(17411) - ..add(17412) - ..add(17413) - ..add(17414) - ..add(17415) - ..add(17416) - ..add(17417) - ..add(17418) - ..add(17419) - ..add(17420) - ..add(17421) - ..add(17422) - ..add(17423) - ..add(17424) - ..add(17425) - ..add(17426) - ..add(17427) - ..add(17428) - ..add(17429) - ..add(17430) - ..add(17431) - ..add(17432) - ..add(17433) - ..add(17434) - ..add(17435) - ..add(17436) - ..add(17437) - ..add(17438) - ..add(17439) - ..add(17440) - ..add(17441) - ..add(17442) - ..add(17443) - ..add(17444) - ..add(17445) - ..add(17446) - ..add(17447) - ..add(17448) - ..add(17449) - ..add(17450) - ..add(17451) - ..add(17452) - ..add(17453) - ..add(17454) - ..add(17455) - ..add(17456) - ..add(17457) - ..add(17458) - ..add(17459) - ..add(17460) - ..add(17461) - ..add(17462) - ..add(17463) - ..add(17464) - ..add(17465) - ..add(17466) - ..add(17467) - ..add(17468) - ..add(17469) - ..add(17470) - ..add(17471) - ..add(17472) - ..add(17473) - ..add(17474) - ..add(17475) - ..add(17476) - ..add(17477) - ..add(17478) - ..add(17479) - ..add(17480) - ..add(17481) - ..add(17482) - ..add(17483) - ..add(17484) - ..add(17485) - ..add(17486) - ..add(17487) - ..add(17488) - ..add(17489) - ..add(17490) - ..add(17491) - ..add(17492) - ..add(17493) - ..add(17494) - ..add(17495) - ..add(17496) - ..add(17497) - ..add(17498) - ..add(17499) - ..add(17500) - ..add(17501) - ..add(17502) - ..add(17503) - ..add(17504) - ..add(17505) - ..add(17506) - ..add(17507) - ..add(17508) - ..add(17509) - ..add(17510) - ..add(17511) - ..add(17512) - ..add(17513) - ..add(17514) - ..add(17515) - ..add(17516) - ..add(17517) - ..add(17518) - ..add(17519) - ..add(17520) - ..add(17521) - ..add(17522) - ..add(17523) - ..add(17524) - ..add(17525) - ..add(17526) - ..add(17527) - ..add(17528) - ..add(17529) - ..add(17530) - ..add(17531) - ..add(17532) - ..add(17533) - ..add(17534) - ..add(17535) - ..add(17536) - ..add(17537) - ..add(17538) - ..add(17539) - ..add(17540) - ..add(17541) - ..add(17542) - ..add(17543) - ..add(17544) - ..add(17545) - ..add(17546) - ..add(17547) - ..add(17548) - ..add(17549) - ..add(17550) - ..add(17551) - ..add(17552) - ..add(17553) - ..add(17554) - ..add(17555) - ..add(17556) - ..add(17557) - ..add(17558) - ..add(17559) - ..add(17560) - ..add(17561) - ..add(17562) - ..add(17563) - ..add(17564) - ..add(17565) - ..add(17566) - ..add(17567) - ..add(17568) - ..add(17569) - ..add(17570) - ..add(17571) - ..add(17572) - ..add(17573) - ..add(17574) - ..add(17575) - ..add(17576) - ..add(17577) - ..add(17578) - ..add(17579) - ..add(17580) - ..add(17581) - ..add(17582) - ..add(17583) - ..add(17584) - ..add(17585) - ..add(17586) - ..add(17587) - ..add(17588) - ..add(17589) - ..add(17590) - ..add(17591) - ..add(17592) - ..add(17593) - ..add(17594) - ..add(17595) - ..add(17596) - ..add(17597) - ..add(17598) - ..add(17599) - ..add(17600) - ..add(17601) - ..add(17602) - ..add(17603) - ..add(17604) - ..add(17605) - ..add(17606) - ..add(17607) - ..add(17608) - ..add(17609) - ..add(17610) - ..add(17611) - ..add(17612) - ..add(17613) - ..add(17614) - ..add(17615) - ..add(17616) - ..add(17617) - ..add(17618) - ..add(17619) - ..add(17620) - ..add(17621) - ..add(17622) - ..add(17623) - ..add(17624) - ..add(17625) - ..add(17626) - ..add(17627) - ..add(17628) - ..add(17629) - ..add(17630) - ..add(17631) - ..add(17632) - ..add(17633) - ..add(17634) - ..add(17635) - ..add(17636) - ..add(17637) - ..add(17638) - ..add(17639) - ..add(17640) - ..add(17641) - ..add(17642) - ..add(17643) - ..add(17644) - ..add(17645) - ..add(17646) - ..add(17647) - ..add(17648) - ..add(17649) - ..add(17650) - ..add(17651) - ..add(17652) - ..add(17653) - ..add(17654) - ..add(17655) - ..add(17656) - ..add(17657) - ..add(17658) - ..add(17659) - ..add(17660) - ..add(17661) - ..add(17662) - ..add(17663) - ..add(17664) - ..add(17665) - ..add(17666) - ..add(17667) - ..add(17668) - ..add(17669) - ..add(17670) - ..add(17671) - ..add(17672) - ..add(17673) - ..add(17674) - ..add(17675) - ..add(17676) - ..add(17677) - ..add(17678) - ..add(17679) - ..add(17680) - ..add(17681) - ..add(17682) - ..add(17683) - ..add(17684) - ..add(17685) - ..add(17686) - ..add(17687) - ..add(17688) - ..add(17689) - ..add(17690) - ..add(17691) - ..add(17692) - ..add(17693) - ..add(17694) - ..add(17695) - ..add(17696) - ..add(17697) - ..add(17698) - ..add(17699) - ..add(17700) - ..add(17701) - ..add(17702) - ..add(17703) - ..add(17704) - ..add(17705) - ..add(17706) - ..add(17707) - ..add(17708) - ..add(17709) - ..add(17710) - ..add(17711) - ..add(17712) - ..add(17713) - ..add(17714) - ..add(17715) - ..add(17716) - ..add(17717) - ..add(17718) - ..add(17719) - ..add(17720) - ..add(17721) - ..add(17722) - ..add(17723) - ..add(17724) - ..add(17725) - ..add(17726) - ..add(17727) - ..add(17728) - ..add(17729) - ..add(17730) - ..add(17731) - ..add(17732) - ..add(17733) - ..add(17734) - ..add(17735) - ..add(17736) - ..add(17737) - ..add(17738) - ..add(17739) - ..add(17740) - ..add(17741) - ..add(17742) - ..add(17743) - ..add(17744) - ..add(17745) - ..add(17746) - ..add(17747) - ..add(17748) - ..add(17749) - ..add(17750) - ..add(17751) - ..add(17752) - ..add(17753) - ..add(17754) - ..add(17755) - ..add(17756) - ..add(17757) - ..add(17758) - ..add(17759) - ..add(17760) - ..add(17761) - ..add(17762) - ..add(17763) - ..add(17764) - ..add(17765) - ..add(17766) - ..add(17767) - ..add(17768) - ..add(17769) - ..add(17770) - ..add(17771) - ..add(17772) - ..add(17773) - ..add(17774) - ..add(17775) - ..add(17776) - ..add(17777) - ..add(17778) - ..add(17779) - ..add(17780) - ..add(17781) - ..add(17782) - ..add(17783) - ..add(17784) - ..add(17785) - ..add(17786) - ..add(17787) - ..add(17788) - ..add(17789) - ..add(17790) - ..add(17791) - ..add(17792) - ..add(17793) - ..add(17794) - ..add(17795) - ..add(17796) - ..add(17797) - ..add(17798) - ..add(17799) - ..add(17800) - ..add(17801) - ..add(17802) - ..add(17803) - ..add(17804) - ..add(17805) - ..add(17806) - ..add(17807) - ..add(17808) - ..add(17809) - ..add(17810) - ..add(17811) - ..add(17812) - ..add(17813) - ..add(17814) - ..add(17815) - ..add(17816) - ..add(17817) - ..add(17818) - ..add(17819) - ..add(17820) - ..add(17821) - ..add(17822) - ..add(17823) - ..add(17824) - ..add(17825) - ..add(17826) - ..add(17827) - ..add(17828) - ..add(17829) - ..add(17830) - ..add(17831) - ..add(17832) - ..add(17833) - ..add(17834) - ..add(17835) - ..add(17836) - ..add(17837) - ..add(17838) - ..add(17839) - ..add(17840) - ..add(17841) - ..add(17842) - ..add(17843) - ..add(17844) - ..add(17845) - ..add(17846) - ..add(17847) - ..add(17848) - ..add(17849) - ..add(17850) - ..add(17851) - ..add(17852) - ..add(17853) - ..add(17854) - ..add(17855) - ..add(17856) - ..add(17857) - ..add(17858) - ..add(17859) - ..add(17860) - ..add(17861) - ..add(17862) - ..add(17863) - ..add(17864) - ..add(17865) - ..add(17866) - ..add(17867) - ..add(17868) - ..add(17869) - ..add(17870) - ..add(17871) - ..add(17872) - ..add(17873) - ..add(17874) - ..add(17875) - ..add(17876) - ..add(17877) - ..add(17878) - ..add(17879) - ..add(17880) - ..add(17881) - ..add(17882) - ..add(17883) - ..add(17884) - ..add(17885) - ..add(17886) - ..add(17887) - ..add(17888) - ..add(17889) - ..add(17890) - ..add(17891) - ..add(17892) - ..add(17893) - ..add(17894) - ..add(17895) - ..add(17896) - ..add(17897) - ..add(17898) - ..add(17899) - ..add(17900) - ..add(17901) - ..add(17902) - ..add(17903) - ..add(17904) - ..add(17905) - ..add(17906) - ..add(17907) - ..add(17908) - ..add(17909) - ..add(17910) - ..add(17911) - ..add(17912) - ..add(17913) - ..add(17914) - ..add(17915) - ..add(17916) - ..add(17917) - ..add(17918) - ..add(17919) - ..add(17920) - ..add(17921) - ..add(17922) - ..add(17923) - ..add(17924) - ..add(17925) - ..add(17926) - ..add(17927) - ..add(17928) - ..add(17929) - ..add(17930) - ..add(17931) - ..add(17932) - ..add(17933) - ..add(17934) - ..add(17935) - ..add(17936) - ..add(17937) - ..add(17938) - ..add(17939) - ..add(17940) - ..add(17941) - ..add(17942) - ..add(17943) - ..add(17944) - ..add(17945) - ..add(17946) - ..add(17947) - ..add(17948) - ..add(17949) - ..add(17950) - ..add(17951) - ..add(17952) - ..add(17953) - ..add(17954) - ..add(17955) - ..add(17956) - ..add(17957) - ..add(17958) - ..add(17959) - ..add(17960) - ..add(17961) - ..add(17962) - ..add(17963) - ..add(17964) - ..add(17965) - ..add(17966) - ..add(17967) - ..add(17968) - ..add(17969) - ..add(17970) - ..add(17971) - ..add(17972) - ..add(17973) - ..add(17974) - ..add(17975) - ..add(17976) - ..add(17977) - ..add(17978) - ..add(17979) - ..add(17980) - ..add(17981) - ..add(17982) - ..add(17983) - ..add(17984) - ..add(17985) - ..add(17986) - ..add(17987) - ..add(17988) - ..add(17989) - ..add(17990) - ..add(17991) - ..add(17992) - ..add(17993) - ..add(17994) - ..add(17995) - ..add(17996) - ..add(17997) - ..add(17998) - ..add(17999) - ..add(18000) - ..add(18001) - ..add(18002) - ..add(18003) - ..add(18004) - ..add(18005) - ..add(18006) - ..add(18007) - ..add(18008) - ..add(18009) - ..add(18010) - ..add(18011) - ..add(18012) - ..add(18013) - ..add(18014) - ..add(18015) - ..add(18016) - ..add(18017) - ..add(18018) - ..add(18019) - ..add(18020) - ..add(18021) - ..add(18022) - ..add(18023) - ..add(18024) - ..add(18025) - ..add(18026) - ..add(18027) - ..add(18028) - ..add(18029) - ..add(18030) - ..add(18031) - ..add(18032) - ..add(18033) - ..add(18034) - ..add(18035) - ..add(18036) - ..add(18037) - ..add(18038) - ..add(18039) - ..add(18040) - ..add(18041) - ..add(18042) - ..add(18043) - ..add(18044) - ..add(18045) - ..add(18046) - ..add(18047) - ..add(18048) - ..add(18049) - ..add(18050) - ..add(18051) - ..add(18052) - ..add(18053) - ..add(18054) - ..add(18055) - ..add(18056) - ..add(18057) - ..add(18058) - ..add(18059) - ..add(18060) - ..add(18061) - ..add(18062) - ..add(18063) - ..add(18064) - ..add(18065) - ..add(18066) - ..add(18067) - ..add(18068) - ..add(18069) - ..add(18070) - ..add(18071) - ..add(18072) - ..add(18073) - ..add(18074) - ..add(18075) - ..add(18076) - ..add(18077) - ..add(18078) - ..add(18079) - ..add(18080) - ..add(18081) - ..add(18082) - ..add(18083) - ..add(18084) - ..add(18085) - ..add(18086) - ..add(18087) - ..add(18088) - ..add(18089) - ..add(18090) - ..add(18091) - ..add(18092) - ..add(18093) - ..add(18094) - ..add(18095) - ..add(18096) - ..add(18097) - ..add(18098) - ..add(18099) - ..add(18100) - ..add(18101) - ..add(18102) - ..add(18103) - ..add(18104) - ..add(18105) - ..add(18106) - ..add(18107) - ..add(18108) - ..add(18109) - ..add(18110) - ..add(18111) - ..add(18112) - ..add(18113) - ..add(18114) - ..add(18115) - ..add(18116) - ..add(18117) - ..add(18118) - ..add(18119) - ..add(18120) - ..add(18121) - ..add(18122) - ..add(18123) - ..add(18124) - ..add(18125) - ..add(18126) - ..add(18127) - ..add(18128) - ..add(18129) - ..add(18130) - ..add(18131) - ..add(18132) - ..add(18133) - ..add(18134) - ..add(18135) - ..add(18136) - ..add(18137) - ..add(18138) - ..add(18139) - ..add(18140) - ..add(18141) - ..add(18142) - ..add(18143) - ..add(18144) - ..add(18145) - ..add(18146) - ..add(18147) - ..add(18148) - ..add(18149) - ..add(18150) - ..add(18151) - ..add(18152) - ..add(18153) - ..add(18154) - ..add(18155) - ..add(18156) - ..add(18157) - ..add(18158) - ..add(18159) - ..add(18160) - ..add(18161) - ..add(18162) - ..add(18163) - ..add(18164) - ..add(18165) - ..add(18166) - ..add(18167) - ..add(18168) - ..add(18169) - ..add(18170) - ..add(18171) - ..add(18172) - ..add(18173) - ..add(18174) - ..add(18175) - ..add(18176) - ..add(18177) - ..add(18178) - ..add(18179) - ..add(18180) - ..add(18181) - ..add(18182) - ..add(18183) - ..add(18184) - ..add(18185) - ..add(18186) - ..add(18187) - ..add(18188) - ..add(18189) - ..add(18190) - ..add(18191) - ..add(18192) - ..add(18193) - ..add(18194) - ..add(18195) - ..add(18196) - ..add(18197) - ..add(18198) - ..add(18199) - ..add(18200) - ..add(18201) - ..add(18202) - ..add(18203) - ..add(18204) - ..add(18205) - ..add(18206) - ..add(18207) - ..add(18208) - ..add(18209) - ..add(18210) - ..add(18211) - ..add(18212) - ..add(18213) - ..add(18214) - ..add(18215) - ..add(18216) - ..add(18217) - ..add(18218) - ..add(18219) - ..add(18220) - ..add(18221) - ..add(18222) - ..add(18223) - ..add(18224) - ..add(18225) - ..add(18226) - ..add(18227) - ..add(18228) - ..add(18229) - ..add(18230) - ..add(18231) - ..add(18232) - ..add(18233) - ..add(18234) - ..add(18235) - ..add(18236) - ..add(18237) - ..add(18238) - ..add(18239) - ..add(18240) - ..add(18241) - ..add(18242) - ..add(18243) - ..add(18244) - ..add(18245) - ..add(18246) - ..add(18247) - ..add(18248) - ..add(18249) - ..add(18250) - ..add(18251) - ..add(18252) - ..add(18253) - ..add(18254) - ..add(18255) - ..add(18256) - ..add(18257) - ..add(18258) - ..add(18259) - ..add(18260) - ..add(18261) - ..add(18262) - ..add(18263) - ..add(18264) - ..add(18265) - ..add(18266) - ..add(18267) - ..add(18268) - ..add(18269) - ..add(18270) - ..add(18271) - ..add(18272) - ..add(18273) - ..add(18274) - ..add(18275) - ..add(18276) - ..add(18277) - ..add(18278) - ..add(18279) - ..add(18280) - ..add(18281) - ..add(18282) - ..add(18283) - ..add(18284) - ..add(18285) - ..add(18286) - ..add(18287) - ..add(18288) - ..add(18289) - ..add(18290) - ..add(18291) - ..add(18292) - ..add(18293) - ..add(18294) - ..add(18295) - ..add(18296) - ..add(18297) - ..add(18298) - ..add(18299) - ..add(18300) - ..add(18301) - ..add(18302) - ..add(18303) - ..add(18304) - ..add(18305) - ..add(18306) - ..add(18307) - ..add(18308) - ..add(18309) - ..add(18310) - ..add(18311) - ..add(18312) - ..add(18313) - ..add(18314) - ..add(18315) - ..add(18316) - ..add(18317) - ..add(18318) - ..add(18319) - ..add(18320) - ..add(18321) - ..add(18322) - ..add(18323) - ..add(18324) - ..add(18325) - ..add(18326) - ..add(18327) - ..add(18328) - ..add(18329) - ..add(18330) - ..add(18331) - ..add(18332) - ..add(18333) - ..add(18334) - ..add(18335) - ..add(18336) - ..add(18337) - ..add(18338) - ..add(18339) - ..add(18340) - ..add(18341) - ..add(18342) - ..add(18343) - ..add(18344) - ..add(18345) - ..add(18346) - ..add(18347) - ..add(18348) - ..add(18349) - ..add(18350) - ..add(18351) - ..add(18352) - ..add(18353) - ..add(18354) - ..add(18355) - ..add(18356) - ..add(18357) - ..add(18358) - ..add(18359) - ..add(18360) - ..add(18361) - ..add(18362) - ..add(18363) - ..add(18364) - ..add(18365) - ..add(18366) - ..add(18367) - ..add(18368) - ..add(18369) - ..add(18370) - ..add(18371) - ..add(18372) - ..add(18373) - ..add(18374) - ..add(18375) - ..add(18376) - ..add(18377) - ..add(18378) - ..add(18379) - ..add(18380) - ..add(18381) - ..add(18382) - ..add(18383) - ..add(18384) - ..add(18385) - ..add(18386) - ..add(18387) - ..add(18388) - ..add(18389) - ..add(18390) - ..add(18391) - ..add(18392) - ..add(18393) - ..add(18394) - ..add(18395) - ..add(18396) - ..add(18397) - ..add(18398) - ..add(18399) - ..add(18400) - ..add(18401) - ..add(18402) - ..add(18403) - ..add(18404) - ..add(18405) - ..add(18406) - ..add(18407) - ..add(18408) - ..add(18409) - ..add(18410) - ..add(18411) - ..add(18412) - ..add(18413) - ..add(18414) - ..add(18415) - ..add(18416) - ..add(18417) - ..add(18418) - ..add(18419) - ..add(18420) - ..add(18421) - ..add(18422) - ..add(18423) - ..add(18424) - ..add(18425) - ..add(18426) - ..add(18427) - ..add(18428) - ..add(18429) - ..add(18430) - ..add(18431) - ..add(18432) - ..add(18433) - ..add(18434) - ..add(18435) - ..add(18436) - ..add(18437) - ..add(18438) - ..add(18439) - ..add(18440) - ..add(18441) - ..add(18442) - ..add(18443) - ..add(18444) - ..add(18445) - ..add(18446) - ..add(18447) - ..add(18448) - ..add(18449) - ..add(18450) - ..add(18451) - ..add(18452) - ..add(18453) - ..add(18454) - ..add(18455) - ..add(18456) - ..add(18457) - ..add(18458) - ..add(18459) - ..add(18460) - ..add(18461) - ..add(18462) - ..add(18463) - ..add(18464) - ..add(18465) - ..add(18466) - ..add(18467) - ..add(18468) - ..add(18469) - ..add(18470) - ..add(18471) - ..add(18472) - ..add(18473) - ..add(18474) - ..add(18475) - ..add(18476) - ..add(18477) - ..add(18478) - ..add(18479) - ..add(18480) - ..add(18481) - ..add(18482) - ..add(18483) - ..add(18484) - ..add(18485) - ..add(18486) - ..add(18487) - ..add(18488) - ..add(18489) - ..add(18490) - ..add(18491) - ..add(18492) - ..add(18493) - ..add(18494) - ..add(18495) - ..add(18496) - ..add(18497) - ..add(18498) - ..add(18499) - ..add(18500) - ..add(18501) - ..add(18502) - ..add(18503) - ..add(18504) - ..add(18505) - ..add(18506) - ..add(18507) - ..add(18508) - ..add(18509) - ..add(18510) - ..add(18511) - ..add(18512) - ..add(18513) - ..add(18514) - ..add(18515) - ..add(18516) - ..add(18517) - ..add(18518) - ..add(18519) - ..add(18520) - ..add(18521) - ..add(18522) - ..add(18523) - ..add(18524) - ..add(18525) - ..add(18526) - ..add(18527) - ..add(18528) - ..add(18529) - ..add(18530) - ..add(18531) - ..add(18532) - ..add(18533) - ..add(18534) - ..add(18535) - ..add(18536) - ..add(18537) - ..add(18538) - ..add(18539) - ..add(18540) - ..add(18541) - ..add(18542) - ..add(18543) - ..add(18544) - ..add(18545) - ..add(18546) - ..add(18547) - ..add(18548) - ..add(18549) - ..add(18550) - ..add(18551) - ..add(18552) - ..add(18553) - ..add(18554) - ..add(18555) - ..add(18556) - ..add(18557) - ..add(18558) - ..add(18559) - ..add(18560) - ..add(18561) - ..add(18562) - ..add(18563) - ..add(18564) - ..add(18565) - ..add(18566) - ..add(18567) - ..add(18568) - ..add(18569) - ..add(18570) - ..add(18571) - ..add(18572) - ..add(18573) - ..add(18574) - ..add(18575) - ..add(18576) - ..add(18577) - ..add(18578) - ..add(18579) - ..add(18580) - ..add(18581) - ..add(18582) - ..add(18583) - ..add(18584) - ..add(18585) - ..add(18586) - ..add(18587) - ..add(18588) - ..add(18589) - ..add(18590) - ..add(18591) - ..add(18592) - ..add(18593) - ..add(18594) - ..add(18595) - ..add(18596) - ..add(18597) - ..add(18598) - ..add(18599) - ..add(18600) - ..add(18601) - ..add(18602) - ..add(18603) - ..add(18604) - ..add(18605) - ..add(18606) - ..add(18607) - ..add(18608) - ..add(18609) - ..add(18610) - ..add(18611) - ..add(18612) - ..add(18613) - ..add(18614) - ..add(18615) - ..add(18616) - ..add(18617) - ..add(18618) - ..add(18619) - ..add(18620) - ..add(18621) - ..add(18622) - ..add(18623) - ..add(18624) - ..add(18625) - ..add(18626) - ..add(18627) - ..add(18628) - ..add(18629) - ..add(18630) - ..add(18631) - ..add(18632) - ..add(18633) - ..add(18634) - ..add(18635) - ..add(18636) - ..add(18637) - ..add(18638) - ..add(18639) - ..add(18640) - ..add(18641) - ..add(18642) - ..add(18643) - ..add(18644) - ..add(18645) - ..add(18646) - ..add(18647) - ..add(18648) - ..add(18649) - ..add(18650) - ..add(18651) - ..add(18652) - ..add(18653) - ..add(18654) - ..add(18655) - ..add(18656) - ..add(18657) - ..add(18658) - ..add(18659) - ..add(18660) - ..add(18661) - ..add(18662) - ..add(18663) - ..add(18664) - ..add(18665) - ..add(18666) - ..add(18667) - ..add(18668) - ..add(18669) - ..add(18670) - ..add(18671) - ..add(18672) - ..add(18673) - ..add(18674) - ..add(18675) - ..add(18676) - ..add(18677) - ..add(18678) - ..add(18679) - ..add(18680) - ..add(18681) - ..add(18682) - ..add(18683) - ..add(18684) - ..add(18685) - ..add(18686) - ..add(18687) - ..add(18688) - ..add(18689) - ..add(18690) - ..add(18691) - ..add(18692) - ..add(18693) - ..add(18694) - ..add(18695) - ..add(18696) - ..add(18697) - ..add(18698) - ..add(18699) - ..add(18700) - ..add(18701) - ..add(18702) - ..add(18703) - ..add(18704) - ..add(18705) - ..add(18706) - ..add(18707) - ..add(18708) - ..add(18709) - ..add(18710) - ..add(18711) - ..add(18712) - ..add(18713) - ..add(18714) - ..add(18715) - ..add(18716) - ..add(18717) - ..add(18718) - ..add(18719) - ..add(18720) - ..add(18721) - ..add(18722) - ..add(18723) - ..add(18724) - ..add(18725) - ..add(18726) - ..add(18727) - ..add(18728) - ..add(18729) - ..add(18730) - ..add(18731) - ..add(18732) - ..add(18733) - ..add(18734) - ..add(18735) - ..add(18736) - ..add(18737) - ..add(18738) - ..add(18739) - ..add(18740) - ..add(18741) - ..add(18742) - ..add(18743) - ..add(18744) - ..add(18745) - ..add(18746) - ..add(18747) - ..add(18748) - ..add(18749) - ..add(18750) - ..add(18751) - ..add(18752) - ..add(18753) - ..add(18754) - ..add(18755) - ..add(18756) - ..add(18757) - ..add(18758) - ..add(18759) - ..add(18760) - ..add(18761) - ..add(18762) - ..add(18763) - ..add(18764) - ..add(18765) - ..add(18766) - ..add(18767) - ..add(18768) - ..add(18769) - ..add(18770) - ..add(18771) - ..add(18772) - ..add(18773) - ..add(18774) - ..add(18775) - ..add(18776) - ..add(18777) - ..add(18778) - ..add(18779) - ..add(18780) - ..add(18781) - ..add(18782) - ..add(18783) - ..add(18784) - ..add(18785) - ..add(18786) - ..add(18787) - ..add(18788) - ..add(18789) - ..add(18790) - ..add(18791) - ..add(18792) - ..add(18793) - ..add(18794) - ..add(18795) - ..add(18796) - ..add(18797) - ..add(18798) - ..add(18799) - ..add(18800) - ..add(18801) - ..add(18802) - ..add(18803) - ..add(18804) - ..add(18805) - ..add(18806) - ..add(18807) - ..add(18808) - ..add(18809) - ..add(18810) - ..add(18811) - ..add(18812) - ..add(18813) - ..add(18814) - ..add(18815) - ..add(18816) - ..add(18817) - ..add(18818) - ..add(18819) - ..add(18820) - ..add(18821) - ..add(18822) - ..add(18823) - ..add(18824) - ..add(18825) - ..add(18826) - ..add(18827) - ..add(18828) - ..add(18829) - ..add(18830) - ..add(18831) - ..add(18832) - ..add(18833) - ..add(18834) - ..add(18835) - ..add(18836) - ..add(18837) - ..add(18838) - ..add(18839) - ..add(18840) - ..add(18841) - ..add(18842) - ..add(18843) - ..add(18844) - ..add(18845) - ..add(18846) - ..add(18847) - ..add(18848) - ..add(18849) - ..add(18850) - ..add(18851) - ..add(18852) - ..add(18853) - ..add(18854) - ..add(18855) - ..add(18856) - ..add(18857) - ..add(18858) - ..add(18859) - ..add(18860) - ..add(18861) - ..add(18862) - ..add(18863) - ..add(18864) - ..add(18865) - ..add(18866) - ..add(18867) - ..add(18868) - ..add(18869) - ..add(18870) - ..add(18871) - ..add(18872) - ..add(18873) - ..add(18874) - ..add(18875) - ..add(18876) - ..add(18877) - ..add(18878) - ..add(18879) - ..add(18880) - ..add(18881) - ..add(18882) - ..add(18883) - ..add(18884) - ..add(18885) - ..add(18886) - ..add(18887) - ..add(18888) - ..add(18889) - ..add(18890) - ..add(18891) - ..add(18892) - ..add(18893) - ..add(18894) - ..add(18895) - ..add(18896) - ..add(18897) - ..add(18898) - ..add(18899) - ..add(18900) - ..add(18901) - ..add(18902) - ..add(18903) - ..add(18904) - ..add(18905) - ..add(18906) - ..add(18907) - ..add(18908) - ..add(18909) - ..add(18910) - ..add(18911) - ..add(18912) - ..add(18913) - ..add(18914) - ..add(18915) - ..add(18916) - ..add(18917) - ..add(18918) - ..add(18919) - ..add(18920) - ..add(18921) - ..add(18922) - ..add(18923) - ..add(18924) - ..add(18925) - ..add(18926) - ..add(18927) - ..add(18928) - ..add(18929) - ..add(18930) - ..add(18931) - ..add(18932) - ..add(18933) - ..add(18934) - ..add(18935) - ..add(18936) - ..add(18937) - ..add(18938) - ..add(18939) - ..add(18940) - ..add(18941) - ..add(18942) - ..add(18943) - ..add(18944) - ..add(18945) - ..add(18946) - ..add(18947) - ..add(18948) - ..add(18949) - ..add(18950) - ..add(18951) - ..add(18952) - ..add(18953) - ..add(18954) - ..add(18955) - ..add(18956) - ..add(18957) - ..add(18958) - ..add(18959) - ..add(18960) - ..add(18961) - ..add(18962) - ..add(18963) - ..add(18964) - ..add(18965) - ..add(18966) - ..add(18967) - ..add(18968) - ..add(18969) - ..add(18970) - ..add(18971) - ..add(18972) - ..add(18973) - ..add(18974) - ..add(18975) - ..add(18976) - ..add(18977) - ..add(18978) - ..add(18979) - ..add(18980) - ..add(18981) - ..add(18982) - ..add(18983) - ..add(18984) - ..add(18985) - ..add(18986) - ..add(18987) - ..add(18988) - ..add(18989) - ..add(18990) - ..add(18991) - ..add(18992) - ..add(18993) - ..add(18994) - ..add(18995) - ..add(18996) - ..add(18997) - ..add(18998) - ..add(18999) - ..add(19000) - ..add(19001) - ..add(19002) - ..add(19003) - ..add(19004) - ..add(19005) - ..add(19006) - ..add(19007) - ..add(19008) - ..add(19009) - ..add(19010) - ..add(19011) - ..add(19012) - ..add(19013) - ..add(19014) - ..add(19015) - ..add(19016) - ..add(19017) - ..add(19018) - ..add(19019) - ..add(19020) - ..add(19021) - ..add(19022) - ..add(19023) - ..add(19024) - ..add(19025) - ..add(19026) - ..add(19027) - ..add(19028) - ..add(19029) - ..add(19030) - ..add(19031) - ..add(19032) - ..add(19033) - ..add(19034) - ..add(19035) - ..add(19036) - ..add(19037) - ..add(19038) - ..add(19039) - ..add(19040) - ..add(19041) - ..add(19042) - ..add(19043) - ..add(19044) - ..add(19045) - ..add(19046) - ..add(19047) - ..add(19048) - ..add(19049) - ..add(19050) - ..add(19051) - ..add(19052) - ..add(19053) - ..add(19054) - ..add(19055) - ..add(19056) - ..add(19057) - ..add(19058) - ..add(19059) - ..add(19060) - ..add(19061) - ..add(19062) - ..add(19063) - ..add(19064) - ..add(19065) - ..add(19066) - ..add(19067) - ..add(19068) - ..add(19069) - ..add(19070) - ..add(19071) - ..add(19072) - ..add(19073) - ..add(19074) - ..add(19075) - ..add(19076) - ..add(19077) - ..add(19078) - ..add(19079) - ..add(19080) - ..add(19081) - ..add(19082) - ..add(19083) - ..add(19084) - ..add(19085) - ..add(19086) - ..add(19087) - ..add(19088) - ..add(19089) - ..add(19090) - ..add(19091) - ..add(19092) - ..add(19093) - ..add(19094) - ..add(19095) - ..add(19096) - ..add(19097) - ..add(19098) - ..add(19099) - ..add(19100) - ..add(19101) - ..add(19102) - ..add(19103) - ..add(19104) - ..add(19105) - ..add(19106) - ..add(19107) - ..add(19108) - ..add(19109) - ..add(19110) - ..add(19111) - ..add(19112) - ..add(19113) - ..add(19114) - ..add(19115) - ..add(19116) - ..add(19117) - ..add(19118) - ..add(19119) - ..add(19120) - ..add(19121) - ..add(19122) - ..add(19123) - ..add(19124) - ..add(19125) - ..add(19126) - ..add(19127) - ..add(19128) - ..add(19129) - ..add(19130) - ..add(19131) - ..add(19132) - ..add(19133) - ..add(19134) - ..add(19135) - ..add(19136) - ..add(19137) - ..add(19138) - ..add(19139) - ..add(19140) - ..add(19141) - ..add(19142) - ..add(19143) - ..add(19144) - ..add(19145) - ..add(19146) - ..add(19147) - ..add(19148) - ..add(19149) - ..add(19150) - ..add(19151) - ..add(19152) - ..add(19153) - ..add(19154) - ..add(19155) - ..add(19156) - ..add(19157) - ..add(19158) - ..add(19159) - ..add(19160) - ..add(19161) - ..add(19162) - ..add(19163) - ..add(19164) - ..add(19165) - ..add(19166) - ..add(19167) - ..add(19168) - ..add(19169) - ..add(19170) - ..add(19171) - ..add(19172) - ..add(19173) - ..add(19174) - ..add(19175) - ..add(19176) - ..add(19177) - ..add(19178) - ..add(19179) - ..add(19180) - ..add(19181) - ..add(19182) - ..add(19183) - ..add(19184) - ..add(19185) - ..add(19186) - ..add(19187) - ..add(19188) - ..add(19189) - ..add(19190) - ..add(19191) - ..add(19192) - ..add(19193) - ..add(19194) - ..add(19195) - ..add(19196) - ..add(19197) - ..add(19198) - ..add(19199) - ..add(19200) - ..add(19201) - ..add(19202) - ..add(19203) - ..add(19204) - ..add(19205) - ..add(19206) - ..add(19207) - ..add(19208) - ..add(19209) - ..add(19210) - ..add(19211) - ..add(19212) - ..add(19213) - ..add(19214) - ..add(19215) - ..add(19216) - ..add(19217) - ..add(19218) - ..add(19219) - ..add(19220) - ..add(19221) - ..add(19222) - ..add(19223) - ..add(19224) - ..add(19225) - ..add(19226) - ..add(19227) - ..add(19228) - ..add(19229) - ..add(19230) - ..add(19231) - ..add(19232) - ..add(19233) - ..add(19234) - ..add(19235) - ..add(19236) - ..add(19237) - ..add(19238) - ..add(19239) - ..add(19240) - ..add(19241) - ..add(19242) - ..add(19243) - ..add(19244) - ..add(19245) - ..add(19246) - ..add(19247) - ..add(19248) - ..add(19249) - ..add(19250) - ..add(19251) - ..add(19252) - ..add(19253) - ..add(19254) - ..add(19255) - ..add(19256) - ..add(19257) - ..add(19258) - ..add(19259) - ..add(19260) - ..add(19261) - ..add(19262) - ..add(19263) - ..add(19264) - ..add(19265) - ..add(19266) - ..add(19267) - ..add(19268) - ..add(19269) - ..add(19270) - ..add(19271) - ..add(19272) - ..add(19273) - ..add(19274) - ..add(19275) - ..add(19276) - ..add(19277) - ..add(19278) - ..add(19279) - ..add(19280) - ..add(19281) - ..add(19282) - ..add(19283) - ..add(19284) - ..add(19285) - ..add(19286) - ..add(19287) - ..add(19288) - ..add(19289) - ..add(19290) - ..add(19291) - ..add(19292) - ..add(19293) - ..add(19294) - ..add(19295) - ..add(19296) - ..add(19297) - ..add(19298) - ..add(19299) - ..add(19300) - ..add(19301) - ..add(19302) - ..add(19303) - ..add(19304) - ..add(19305) - ..add(19306) - ..add(19307) - ..add(19308) - ..add(19309) - ..add(19310) - ..add(19311) - ..add(19312) - ..add(19313) - ..add(19314) - ..add(19315) - ..add(19316) - ..add(19317) - ..add(19318) - ..add(19319) - ..add(19320) - ..add(19321) - ..add(19322) - ..add(19323) - ..add(19324) - ..add(19325) - ..add(19326) - ..add(19327) - ..add(19328) - ..add(19329) - ..add(19330) - ..add(19331) - ..add(19332) - ..add(19333) - ..add(19334) - ..add(19335) - ..add(19336) - ..add(19337) - ..add(19338) - ..add(19339) - ..add(19340) - ..add(19341) - ..add(19342) - ..add(19343) - ..add(19344) - ..add(19345) - ..add(19346) - ..add(19347) - ..add(19348) - ..add(19349) - ..add(19350) - ..add(19351) - ..add(19352) - ..add(19353) - ..add(19354) - ..add(19355) - ..add(19356) - ..add(19357) - ..add(19358) - ..add(19359) - ..add(19360) - ..add(19361) - ..add(19362) - ..add(19363) - ..add(19364) - ..add(19365) - ..add(19366) - ..add(19367) - ..add(19368) - ..add(19369) - ..add(19370) - ..add(19371) - ..add(19372) - ..add(19373) - ..add(19374) - ..add(19375) - ..add(19376) - ..add(19377) - ..add(19378) - ..add(19379) - ..add(19380) - ..add(19381) - ..add(19382) - ..add(19383) - ..add(19384) - ..add(19385) - ..add(19386) - ..add(19387) - ..add(19388) - ..add(19389) - ..add(19390) - ..add(19391) - ..add(19392) - ..add(19393) - ..add(19394) - ..add(19395) - ..add(19396) - ..add(19397) - ..add(19398) - ..add(19399) - ..add(19400) - ..add(19401) - ..add(19402) - ..add(19403) - ..add(19404) - ..add(19405) - ..add(19406) - ..add(19407) - ..add(19408) - ..add(19409) - ..add(19410) - ..add(19411) - ..add(19412) - ..add(19413) - ..add(19414) - ..add(19415) - ..add(19416) - ..add(19417) - ..add(19418) - ..add(19419) - ..add(19420) - ..add(19421) - ..add(19422) - ..add(19423) - ..add(19424) - ..add(19425) - ..add(19426) - ..add(19427) - ..add(19428) - ..add(19429) - ..add(19430) - ..add(19431) - ..add(19432) - ..add(19433) - ..add(19434) - ..add(19435) - ..add(19436) - ..add(19437) - ..add(19438) - ..add(19439) - ..add(19440) - ..add(19441) - ..add(19442) - ..add(19443) - ..add(19444) - ..add(19445) - ..add(19446) - ..add(19447) - ..add(19448) - ..add(19449) - ..add(19450) - ..add(19451) - ..add(19452) - ..add(19453) - ..add(19454) - ..add(19455) - ..add(19456) - ..add(19457) - ..add(19458) - ..add(19459) - ..add(19460) - ..add(19461) - ..add(19462) - ..add(19463) - ..add(19464) - ..add(19465) - ..add(19466) - ..add(19467) - ..add(19468) - ..add(19469) - ..add(19470) - ..add(19471) - ..add(19472) - ..add(19473) - ..add(19474) - ..add(19475) - ..add(19476) - ..add(19477) - ..add(19478) - ..add(19479) - ..add(19480) - ..add(19481) - ..add(19482) - ..add(19483) - ..add(19484) - ..add(19485) - ..add(19486) - ..add(19487) - ..add(19488) - ..add(19489) - ..add(19490) - ..add(19491) - ..add(19492) - ..add(19493) - ..add(19494) - ..add(19495) - ..add(19496) - ..add(19497) - ..add(19498) - ..add(19499) - ..add(19500) - ..add(19501) - ..add(19502) - ..add(19503) - ..add(19504) - ..add(19505) - ..add(19506) - ..add(19507) - ..add(19508) - ..add(19509) - ..add(19510) - ..add(19511) - ..add(19512) - ..add(19513) - ..add(19514) - ..add(19515) - ..add(19516) - ..add(19517) - ..add(19518) - ..add(19519) - ..add(19520) - ..add(19521) - ..add(19522) - ..add(19523) - ..add(19524) - ..add(19525) - ..add(19526) - ..add(19527) - ..add(19528) - ..add(19529) - ..add(19530) - ..add(19531) - ..add(19532) - ..add(19533) - ..add(19534) - ..add(19535) - ..add(19536) - ..add(19537) - ..add(19538) - ..add(19539) - ..add(19540) - ..add(19541) - ..add(19542) - ..add(19543) - ..add(19544) - ..add(19545) - ..add(19546) - ..add(19547) - ..add(19548) - ..add(19549) - ..add(19550) - ..add(19551) - ..add(19552) - ..add(19553) - ..add(19554) - ..add(19555) - ..add(19556) - ..add(19557) - ..add(19558) - ..add(19559) - ..add(19560) - ..add(19561) - ..add(19562) - ..add(19563) - ..add(19564) - ..add(19565) - ..add(19566) - ..add(19567) - ..add(19568) - ..add(19569) - ..add(19570) - ..add(19571) - ..add(19572) - ..add(19573) - ..add(19574) - ..add(19575) - ..add(19576) - ..add(19577) - ..add(19578) - ..add(19579) - ..add(19580) - ..add(19581) - ..add(19582) - ..add(19583) - ..add(19584) - ..add(19585) - ..add(19586) - ..add(19587) - ..add(19588) - ..add(19589) - ..add(19590) - ..add(19591) - ..add(19592) - ..add(19593) - ..add(19594) - ..add(19595) - ..add(19596) - ..add(19597) - ..add(19598) - ..add(19599) - ..add(19600) - ..add(19601) - ..add(19602) - ..add(19603) - ..add(19604) - ..add(19605) - ..add(19606) - ..add(19607) - ..add(19608) - ..add(19609) - ..add(19610) - ..add(19611) - ..add(19612) - ..add(19613) - ..add(19614) - ..add(19615) - ..add(19616) - ..add(19617) - ..add(19618) - ..add(19619) - ..add(19620) - ..add(19621) - ..add(19622) - ..add(19623) - ..add(19624) - ..add(19625) - ..add(19626) - ..add(19627) - ..add(19628) - ..add(19629) - ..add(19630) - ..add(19631) - ..add(19632) - ..add(19633) - ..add(19634) - ..add(19635) - ..add(19636) - ..add(19637) - ..add(19638) - ..add(19639) - ..add(19640) - ..add(19641) - ..add(19642) - ..add(19643) - ..add(19644) - ..add(19645) - ..add(19646) - ..add(19647) - ..add(19648) - ..add(19649) - ..add(19650) - ..add(19651) - ..add(19652) - ..add(19653) - ..add(19654) - ..add(19655) - ..add(19656) - ..add(19657) - ..add(19658) - ..add(19659) - ..add(19660) - ..add(19661) - ..add(19662) - ..add(19663) - ..add(19664) - ..add(19665) - ..add(19666) - ..add(19667) - ..add(19668) - ..add(19669) - ..add(19670) - ..add(19671) - ..add(19672) - ..add(19673) - ..add(19674) - ..add(19675) - ..add(19676) - ..add(19677) - ..add(19678) - ..add(19679) - ..add(19680) - ..add(19681) - ..add(19682) - ..add(19683) - ..add(19684) - ..add(19685) - ..add(19686) - ..add(19687) - ..add(19688) - ..add(19689) - ..add(19690) - ..add(19691) - ..add(19692) - ..add(19693) - ..add(19694) - ..add(19695) - ..add(19696) - ..add(19697) - ..add(19698) - ..add(19699) - ..add(19700) - ..add(19701) - ..add(19702) - ..add(19703) - ..add(19704) - ..add(19705) - ..add(19706) - ..add(19707) - ..add(19708) - ..add(19709) - ..add(19710) - ..add(19711) - ..add(19712) - ..add(19713) - ..add(19714) - ..add(19715) - ..add(19716) - ..add(19717) - ..add(19718) - ..add(19719) - ..add(19720) - ..add(19721) - ..add(19722) - ..add(19723) - ..add(19724) - ..add(19725) - ..add(19726) - ..add(19727) - ..add(19728) - ..add(19729) - ..add(19730) - ..add(19731) - ..add(19732) - ..add(19733) - ..add(19734) - ..add(19735) - ..add(19736) - ..add(19737) - ..add(19738) - ..add(19739) - ..add(19740) - ..add(19741) - ..add(19742) - ..add(19743) - ..add(19744) - ..add(19745) - ..add(19746) - ..add(19747) - ..add(19748) - ..add(19749) - ..add(19750) - ..add(19751) - ..add(19752) - ..add(19753) - ..add(19754) - ..add(19755) - ..add(19756) - ..add(19757) - ..add(19758) - ..add(19759) - ..add(19760) - ..add(19761) - ..add(19762) - ..add(19763) - ..add(19764) - ..add(19765) - ..add(19766) - ..add(19767) - ..add(19768) - ..add(19769) - ..add(19770) - ..add(19771) - ..add(19772) - ..add(19773) - ..add(19774) - ..add(19775) - ..add(19776) - ..add(19777) - ..add(19778) - ..add(19779) - ..add(19780) - ..add(19781) - ..add(19782) - ..add(19783) - ..add(19784) - ..add(19785) - ..add(19786) - ..add(19787) - ..add(19788) - ..add(19789) - ..add(19790) - ..add(19791) - ..add(19792) - ..add(19793) - ..add(19794) - ..add(19795) - ..add(19796) - ..add(19797) - ..add(19798) - ..add(19799) - ..add(19800) - ..add(19801) - ..add(19802) - ..add(19803) - ..add(19804) - ..add(19805) - ..add(19806) - ..add(19807) - ..add(19808) - ..add(19809) - ..add(19810) - ..add(19811) - ..add(19812) - ..add(19813) - ..add(19814) - ..add(19815) - ..add(19816) - ..add(19817) - ..add(19818) - ..add(19819) - ..add(19820) - ..add(19821) - ..add(19822) - ..add(19823) - ..add(19824) - ..add(19825) - ..add(19826) - ..add(19827) - ..add(19828) - ..add(19829) - ..add(19830) - ..add(19831) - ..add(19832) - ..add(19833) - ..add(19834) - ..add(19835) - ..add(19836) - ..add(19837) - ..add(19838) - ..add(19839) - ..add(19840) - ..add(19841) - ..add(19842) - ..add(19843) - ..add(19844) - ..add(19845) - ..add(19846) - ..add(19847) - ..add(19848) - ..add(19849) - ..add(19850) - ..add(19851) - ..add(19852) - ..add(19853) - ..add(19854) - ..add(19855) - ..add(19856) - ..add(19857) - ..add(19858) - ..add(19859) - ..add(19860) - ..add(19861) - ..add(19862) - ..add(19863) - ..add(19864) - ..add(19865) - ..add(19866) - ..add(19867) - ..add(19868) - ..add(19869) - ..add(19870) - ..add(19871) - ..add(19872) - ..add(19873) - ..add(19874) - ..add(19875) - ..add(19876) - ..add(19877) - ..add(19878) - ..add(19879) - ..add(19880) - ..add(19881) - ..add(19882) - ..add(19883) - ..add(19884) - ..add(19885) - ..add(19886) - ..add(19887) - ..add(19888) - ..add(19889) - ..add(19890) - ..add(19891) - ..add(19892) - ..add(19893) - ..add(19894) - ..add(19895) - ..add(19896) - ..add(19897) - ..add(19898) - ..add(19899) - ..add(19900) - ..add(19901) - ..add(19902) - ..add(19903) - ..add(19904) - ..add(19905) - ..add(19906) - ..add(19907) - ..add(19908) - ..add(19909) - ..add(19910) - ..add(19911) - ..add(19912) - ..add(19913) - ..add(19914) - ..add(19915) - ..add(19916) - ..add(19917) - ..add(19918) - ..add(19919) - ..add(19920) - ..add(19921) - ..add(19922) - ..add(19923) - ..add(19924) - ..add(19925) - ..add(19926) - ..add(19927) - ..add(19928) - ..add(19929) - ..add(19930) - ..add(19931) - ..add(19932) - ..add(19933) - ..add(19934) - ..add(19935) - ..add(19936) - ..add(19937) - ..add(19938) - ..add(19939) - ..add(19940) - ..add(19941) - ..add(19942) - ..add(19943) - ..add(19944) - ..add(19945) - ..add(19946) - ..add(19947) - ..add(19948) - ..add(19949) - ..add(19950) - ..add(19951) - ..add(19952) - ..add(19953) - ..add(19954) - ..add(19955) - ..add(19956) - ..add(19957) - ..add(19958) - ..add(19959) - ..add(19960) - ..add(19961) - ..add(19962) - ..add(19963) - ..add(19964) - ..add(19965) - ..add(19966) - ..add(19967) - ..add(19968) - ..add(19969) - ..add(19970) - ..add(19971) - ..add(19972) - ..add(19973) - ..add(19974) - ..add(19975) - ..add(19976) - ..add(19977) - ..add(19978) - ..add(19979) - ..add(19980) - ..add(19981) - ..add(19982) - ..add(19983) - ..add(19984) - ..add(19985) - ..add(19986) - ..add(19987) - ..add(19988) - ..add(19989) - ..add(19990) - ..add(19991) - ..add(19992) - ..add(19993) - ..add(19994) - ..add(19995) - ..add(19996) - ..add(19997) - ..add(19998) - ..add(19999); - - Expect.equals(ints.length, 20000); - for (int i = 0; i < ints.length; i++) { - Expect.equals(ints[i], i); - } -} diff --git a/tests/language_2/regress/regress42946_test.dart b/tests/language_2/regress/regress42946_test.dart deleted file mode 100644 index 2092115819f..00000000000 --- a/tests/language_2/regress/regress42946_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -/// https://github.com/dart-lang/sdk/issues/42946 -void main() { - // fix bug in constant eval - const x = (2.0 == 2); - const a = (2.0 == 2.0); - const b = (0.0 == 0.0); - const c = (double.nan == double.nan); - const d = (2.0 == 1.0); - - Expect.isTrue(x); - Expect.isTrue(a); - Expect.isTrue(b); - Expect.isFalse(c); - Expect.isFalse(d); -} diff --git a/tests/language_2/regress/regress4295001_test.dart b/tests/language_2/regress/regress4295001_test.dart deleted file mode 100644 index d8719c9752f..00000000000 --- a/tests/language_2/regress/regress4295001_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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 - -class Issue4295001Test { - String foo; - Issue4295001Test(String s) : this.foo = s { - var f = () => s; - } - - static void testMain() { - var d = new Issue4295001Test("Hello"); - } -} - -main() { - Issue4295001Test.testMain(); -} diff --git a/tests/language_2/regress/regress42954_test.dart b/tests/language_2/regress/regress42954_test.dart deleted file mode 100644 index c201abe6039..00000000000 --- a/tests/language_2/regress/regress42954_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - Type get type => T; -} - -class B extends A {} - -void main() { - var first = B; - var second = B().type; - - Expect.equals(first, second); - Expect.equals(second, first); - Expect.equals(first.hashCode, second.hashCode); -} diff --git a/tests/language_2/regress/regress44136_test.dart b/tests/language_2/regress/regress44136_test.dart deleted file mode 100644 index 6607e6a43fc..00000000000 --- a/tests/language_2/regress/regress44136_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -typedef Foo = void Function(); -typedef Bar = void Function(); - -void main() { - Expect.notEquals(Foo, Bar); -} diff --git a/tests/language_2/regress/regress45060_test.dart b/tests/language_2/regress/regress45060_test.dart deleted file mode 100644 index e1e6e322853..00000000000 --- a/tests/language_2/regress/regress45060_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2021, 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 - -import "package:expect/expect.dart"; - -void main() { - var executor = new Executor(); - new Command1().execute(executor); - executor.execute(new Command1()); -} - -class Command1 extends CommandBase {} - -abstract class Command {} - -abstract class CommandBase> extends Command { - void execute(Executor e) { - TSelf self = this as TSelf; - e.execute(self); - } -} - -abstract class CommandHandler { - void handle(T command); -} - -class Executor { - void execute(T action) { - testTypeEquality, CommandHandler>(); - } -} - -void testTypeEquality() { - Expect.equals(T1.hashCode, T2.hashCode); - Expect.equals(T1, T2); - Expect.identical(T1, T2); -} diff --git a/tests/language_2/regress/regress4515170_test.dart b/tests/language_2/regress/regress4515170_test.dart deleted file mode 100644 index 9b8f70c0420..00000000000 --- a/tests/language_2/regress/regress4515170_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class Issue4515170Test { - static const VAL = 3; - static int defaultVal([int a = VAL]) { - return a; - } -} - -main() { - Expect.equals(3, Issue4515170Test.defaultVal()); -} diff --git a/tests/language_2/regress/regress45428_test.dart b/tests/language_2/regress/regress45428_test.dart deleted file mode 100644 index 115321d9f94..00000000000 --- a/tests/language_2/regress/regress45428_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2021, 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 - -import 'package:expect/expect.dart'; - -void something(List l) { - String s = l.first; -} - -void checkAndInvoke(Function f) { - f(["foo"]); - var l = [1]; - Expect.throwsTypeError(() => f(l)); - if (f is Function(List)) { - Expect.throwsTypeError(() => (f as Function)(l)); - } -} - -void main() { - checkAndInvoke(something); -} diff --git a/tests/language_2/regress/regress45642_test.dart b/tests/language_2/regress/regress45642_test.dart deleted file mode 100644 index 0ca83ea2ff2..00000000000 --- a/tests/language_2/regress/regress45642_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2021, 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 - -class Utils { - static final foo = Foo(() {}); -} - -class Foo { - Foo(func); -} - -void main() { - print(Utils.foo); // should print: Instance of 'Foo' -} diff --git a/tests/language_2/regress/regress45890_test.dart b/tests/language_2/regress/regress45890_test.dart deleted file mode 100644 index 8dae9ebd1c2..00000000000 --- a/tests/language_2/regress/regress45890_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2021, 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 - -import "package:expect/expect.dart"; - -class C { - T foo(T value) => value; -} - -void main() { - var c = C(); - num Function(num) f0 = c.foo; - int Function(int) f1 = c.foo; - Expect.notEquals(f0, f1); -} diff --git a/tests/language_2/regress/regress46165_test.dart b/tests/language_2/regress/regress46165_test.dart deleted file mode 100644 index f2c43c6a2de..00000000000 --- a/tests/language_2/regress/regress46165_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2021, 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 - -void main() { - final l = []; - l.add((String x, StringBuffer y) { - print(x); - }); -} diff --git a/tests/language_2/regress/regress46550_test.dart b/tests/language_2/regress/regress46550_test.dart deleted file mode 100644 index 14b5ee7ff40..00000000000 --- a/tests/language_2/regress/regress46550_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2021, 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 - -// VMOptions=--optimization_counter_threshold=100 --deterministic - -import "package:expect/expect.dart"; - -typedef void test1(); - -void t1() { - Expect.equals(int, T); -} - -const test1 res1 = t1; - -main() { - for (int i = 0; i < 120; ++i) { - res1(); - } -} diff --git a/tests/language_2/regress/regress46816_test.dart b/tests/language_2/regress/regress46816_test.dart deleted file mode 100644 index 9d39bacecfd..00000000000 --- a/tests/language_2/regress/regress46816_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2021, 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 - -import 'package:expect/expect.dart'; - -class A { - void f(Y y) {} -} - -typedef Func = void Function(Y); - -main() { - A a = new A(); - dynamic f = (a as A).f; - Expect.isTrue(f is Func); - print(f as Func); -} diff --git a/tests/language_2/regress/regress46867_test.dart b/tests/language_2/regress/regress46867_test.dart deleted file mode 100644 index 750b2234243..00000000000 --- a/tests/language_2/regress/regress46867_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2021, 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 - -// Regression test for https://github.com/dart-lang/sdk/issues/46867 - -import 'package:expect/expect.dart'; - -class Interface { - covariant Object x = 'from Interface'; -} - -mixin Mixin implements Interface {} - -class BaseClass { - static var getterCallCount = 0; - static var setterCallCount = 0; - Object get x => getterCallCount++; - set x(Object value) => setterCallCount++; -} - -class SubClass extends BaseClass with Mixin {} - -void main() { - Expect.equals(0, BaseClass.getterCallCount); - SubClass().x; - Expect.equals(1, BaseClass.getterCallCount); - - Expect.equals(0, BaseClass.setterCallCount); - SubClass().x = 42; - Expect.equals(1, BaseClass.setterCallCount); -} diff --git a/tests/language_2/regress/regress52243_test.dart b/tests/language_2/regress/regress52243_test.dart deleted file mode 100644 index c9b721b5f5f..00000000000 --- a/tests/language_2/regress/regress52243_test.dart +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) 2023, 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 - -import "package:expect/expect.dart"; - -/// Regression test for the issue discovered by -/// https://github.com/dart-lang/sdk/issues/52243. -/// -/// In DDC the types [num], [int], [double], [String], and [bool] used in bounds -/// caused an "optimization" in type tests that was incorrect when passing a -/// subtype as the type argument. - -bool isWithNumBound(x) => x is T; -T asWithNumBound(x) => x as T; -bool isWithIntBound(x) => x is T; -T asWithIntBound(x) => x as T; -bool isWithDoubleBound(x) => x is T; -T asWithDoubleBound(x) => x as T; -bool isWithStringBound(x) => x is T; -T asWithStringBound(x) => x as T; -bool isWithBoolBound(x) => x is T; -T asWithBoolBound(x) => x as T; - -main() { - Expect.isTrue(isWithNumBound(1)); - Expect.isTrue(isWithNumBound(1)); - // NOTE: Web backends can't determine that 1 is not a double so that test is - // excluded here. - Expect.isFalse(isWithNumBound(1)); - Expect.isTrue(isWithNumBound(1.2)); - Expect.isFalse(isWithNumBound(1.2)); - Expect.isTrue(isWithNumBound(1.2)); - Expect.isFalse(isWithNumBound(1.2)); - Expect.isFalse(isWithNumBound(null)); - Expect.isFalse(isWithNumBound(null)); - Expect.isFalse(isWithNumBound(null)); - Expect.isTrue(isWithNumBound(null)); - - Expect.equals(1, asWithNumBound(1)); - Expect.equals(1, asWithNumBound(1)); - // NOTE: Web backends can't determine that 1 is not a double so that test is - // excluded here. - Expect.throws(() => asWithNumBound(1)); - Expect.equals(1.2, asWithNumBound(1.2)); - Expect.throws(() => asWithNumBound(1.2)); - Expect.equals(1.2, asWithNumBound(1.2)); - Expect.throws(() => asWithNumBound(1.2)); - Expect.equals(null, asWithNumBound(null)); - Expect.equals(null, asWithNumBound(null)); - Expect.equals(null, asWithNumBound(null)); - Expect.equals(null, asWithNumBound(null)); - - Expect.isTrue(isWithIntBound(1)); - Expect.isFalse(isWithIntBound(1)); - Expect.isFalse(isWithIntBound(1.2)); - Expect.isFalse(isWithIntBound(1.2)); - Expect.isFalse(isWithIntBound(null)); - Expect.isTrue(isWithIntBound(null)); - - Expect.equals(1, asWithIntBound(1)); - Expect.throws(() => asWithIntBound(1)); - Expect.throws(() => asWithIntBound(1.2)); - Expect.throws(() => asWithIntBound(1.2)); - Expect.equals(null, asWithIntBound(null)); - Expect.equals(null, asWithIntBound(null)); - - // NOTE: Web backends can't determine that 1 is not a double so that test is - // excluded here. - Expect.isFalse(isWithDoubleBound(1)); - Expect.isTrue(isWithDoubleBound(1.2)); - Expect.isFalse(isWithDoubleBound(1.2)); - Expect.isFalse(isWithDoubleBound(null)); - Expect.isTrue(isWithDoubleBound(null)); - - // NOTE: Web backends can't determine that 1 is not a double so that test is - // excluded here. - Expect.throws(() => asWithDoubleBound(1)); - Expect.equals(1.2, asWithDoubleBound(1.2)); - Expect.throws(() => asWithDoubleBound(1.2)); - Expect.equals(null, asWithDoubleBound(null)); - Expect.equals(null, asWithDoubleBound(null)); - - Expect.isTrue(isWithStringBound('hello')); - Expect.isFalse(isWithStringBound('hello')); - Expect.isFalse(isWithStringBound(null)); - Expect.isTrue(isWithStringBound(null)); - - Expect.equals('hello', asWithStringBound('hello')); - Expect.throws(() => asWithStringBound('hello')); - Expect.equals(null, asWithStringBound(null)); - Expect.equals(null, asWithStringBound(null)); - - Expect.isTrue(isWithBoolBound(true)); - Expect.isFalse(isWithBoolBound(true)); - Expect.isFalse(isWithBoolBound(null)); - Expect.isTrue(isWithBoolBound(null)); - - Expect.equals(true, asWithBoolBound(true)); - Expect.throws(() => asWithBoolBound(true)); - Expect.equals(null, asWithBoolBound(null)); - Expect.equals(null, asWithBoolBound(null)); -} diff --git a/tests/language_2/regress/regress65278_test.dart b/tests/language_2/regress/regress65278_test.dart deleted file mode 100644 index 71d879d538a..00000000000 --- a/tests/language_2/regress/regress65278_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// 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. - -// @dart = 2.9 - -void main() { - ContentTabsWidget(); -} - -class StatefulWidget {} - -class State {} - -class WidgetsBindingObserver {} - -class IBase {} - -class ContentTabsWidget extends BaseStatefulWidget {} - -class ContentTabsState - extends BaseState {} - -class BaseStatefulWidget - extends SuperStatefulWidget {} - -class BaseState extends SuperState {} - -class SuperStatefulWidget extends StatefulWidget {} - -class SuperState extends State - with WidgetsBindingObserver {} diff --git a/tests/language_2/regress/regress6725_part.dart b/tests/language_2/regress/regress6725_part.dart deleted file mode 100644 index 7ea55714d1e..00000000000 --- a/tests/language_2/regress/regress6725_part.dart +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for a crash in dart2js. - -part of crash_6725; - -class Fisk { - it1(x) { - // "key" is unresolved and caused a crash in dart2js. - // This is the original example the user reported. - for (key in x) { - print(key); - } - } - - it2(x) { - // "length" is "intercepted" and handled differently from other - // names when an instance of list is observed. - for (length in x) { - print(length); - } - } - - it3(x) { - // We're pretty sure that there's no "fisk" that is "intercepted". - for (fisk in x) { - print(fisk); - } - } -} - -class SubFisk extends Fisk { - var key; - var length; - var fisk; -} - -test() { - Fisk f = new SubFisk(); - var m = (x) { - for (undeclared in x) { - print(undeclared); - } - }; - if (new DateTime.now().millisecondsSinceEpoch == 42) { - f = null; - m = (x) {}; - } - - f.it1([87, 42]); - if (f.key != 42) { - throw 'f.key != 42 (${f.key})'; - } - - f.it2([87, 42]); - if (f.length != 42) { - throw 'f.length != 42 (${f.length})'; - } - - f.it3([87, 42]); - if (f.fisk != 42) { - throw 'f.fisk != 42 (${f.fisk})'; - } - - try { - m([87, 42]); - throw 'NoSuchMethodError expected'; - } on NoSuchMethodError { - // Expected. - } -} diff --git a/tests/language_2/regress/regress6725_runtime_test.dart b/tests/language_2/regress/regress6725_runtime_test.dart deleted file mode 100644 index 28aa582131e..00000000000 --- a/tests/language_2/regress/regress6725_runtime_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Regression test for a crash in dart2js. - -library crash_6725; - - - -main() { - -} diff --git a/tests/language_2/regress/regress6725_test.dart b/tests/language_2/regress/regress6725_test.dart deleted file mode 100644 index 3e2abe3049e..00000000000 --- a/tests/language_2/regress/regress6725_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for a crash in dart2js. - -library crash_6725; - -part 'regress6725_part.dart'; //# 01: compile-time error - -main() { - test(); //# 01: continued -} diff --git a/tests/language_2/regress/regress7513_test.dart b/tests/language_2/regress/regress7513_test.dart deleted file mode 100644 index bda6041a370..00000000000 --- a/tests/language_2/regress/regress7513_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012, 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. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Regression test for issue 7513. - -foo(a, b) { - b[0] = 0.1; - return a * b[0]; -} - -main() { - var a = 0.1; - var b = [0.1]; - for (var i = 0; i < 20; i++) { - foo(a, b); - } - Expect.approxEquals(0.01, foo(a, b)); -} diff --git a/tests/language_2/regress/regress7525_test.dart b/tests/language_2/regress/regress7525_test.dart deleted file mode 100644 index 8f724f05bc6..00000000000 --- a/tests/language_2/regress/regress7525_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012, 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. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Regression test for issue 7525. - -foo() { - var ol = [2]; - (ol as List)[0]; - int x = (ol as List)[0]; - return x; -} - -main() { - for (int i = 0; i < 20; i++) { - foo(); - } - Expect.equals(2, foo()); -} diff --git a/tests/language_2/regress/regress9602_other.dart b/tests/language_2/regress/regress9602_other.dart deleted file mode 100644 index 9d5380cad3a..00000000000 --- a/tests/language_2/regress/regress9602_other.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test case for http://dartbug.com/9602 -library issue9602_other; - -class M { - var _field; -} diff --git a/tests/language_2/regress/regress9602_test.dart b/tests/language_2/regress/regress9602_test.dart deleted file mode 100644 index a658b686ab7..00000000000 --- a/tests/language_2/regress/regress9602_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test case for http://dartbug.com/9602 -library issue9602; - -import 'regress9602_other.dart'; - -class C extends Object with M {} - -main() { - new C(); -} diff --git a/tests/language_2/regress/regress9664_test.dart b/tests/language_2/regress/regress9664_test.dart deleted file mode 100644 index 5265d17cb73..00000000000 --- a/tests/language_2/regress/regress9664_test.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for http://dartbug.com/9664 - -main() { - while (true ? true : true) break; -} diff --git a/tests/language_2/regress/regress9687_test.dart b/tests/language_2/regress/regress9687_test.dart deleted file mode 100644 index f79e3155e4e..00000000000 --- a/tests/language_2/regress/regress9687_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js code generation in checked mode. See -// last part of https://code.google.com/p/dart/issues/detail?id=9687. - -import "package:expect/expect.dart"; - -class A { - final finalField; - final otherFinalField; - - A() - : finalField = 42, - otherFinalField = 54; - - expectFinalField(arg1, arg2) { - Expect.equals(arg1, arg2); - Expect.equals(finalField, arg1); - } - - expectOtherFinalField(_, arg1, arg2) { - Expect.equals(arg1, arg2); - Expect.equals(otherFinalField, arg1); - } -} - -var array = [new A()]; - -main() { - // [untypedReceiver] is made so that the compiler does not know - // what it is. - var untypedReceiver = array[0]; - - // [typedReceiver] is made so that the compiler knows what it is. - var typedReceiver = new A(); - - // Using [: finalField :] twice will make the compiler want to - // allocate one temporary for it. - var a = untypedReceiver.expectFinalField( - typedReceiver.finalField, typedReceiver.finalField); - - // Having a check instruction in between two allocations of - // temporary variables used to trigger a bug in the compiler. - int b = a; - - // Using [: otherFinalField :] twice will make the compiler want to - // allocate one temporary for it. The compiler used to assign the - // same temporary for [: otherFinalField :] and [: finalField :]. - untypedReceiver.expectOtherFinalField( - b, typedReceiver.otherFinalField, typedReceiver.otherFinalField); -} diff --git a/tests/language_2/regress/regress9939_test.dart b/tests/language_2/regress/regress9939_test.dart deleted file mode 100644 index c36b709ca1f..00000000000 --- a/tests/language_2/regress/regress9939_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2013, 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 - -// dart2js was generating incorrect code for the [A] constructor, by -// using a temporary variable for two instructions, even though they -// are both live at the same time. - -import "package:expect/expect.dart"; - -var globalVar = [1, 2]; - -class A { - final field1; - final field2; - var field3; - - A(this.field1, this.field2) { - bool entered = false; - // We use [field1] twice to ensure it will have a temporary. - for (var a in field1) { - try { - entered = true; - // We use [field2] twice to ensure it will have a temporary. - print(field2); - print(field2); - } catch (e) { - // Because the catch is aborting, the SSA graph we used to - // generate thought that the whole try/catch was aborting, and - // therefore it could not reach the code after the loop. - throw e; - } - } - Expect.isTrue(entered); - // dart2js used to overwrite the temporary for [field1] with - // [field2]. - Expect.equals(globalVar, field1); - } -} - -main() { - new A(globalVar, null); -} diff --git a/tests/language_2/regress/regress9949_test.dart b/tests/language_2/regress/regress9949_test.dart deleted file mode 100644 index b3d50c45ca6..00000000000 --- a/tests/language_2/regress/regress9949_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to crash in the presence of a -// super constructor declared external. - -import "package:expect/expect.dart"; -import 'dart:collection'; - -class Crash extends StringBuffer { - Crash() : super(); -} - -void main() { - Crash expando = new Crash(); - Expect.isTrue(expando is StringBuffer); -} diff --git a/tests/language_2/resolution/resolution_test.dart b/tests/language_2/resolution/resolution_test.dart deleted file mode 100644 index 917765a06ff..00000000000 --- a/tests/language_2/resolution/resolution_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -int get foo => 499; - -class CompileError { - var x; - - // Dart2js tried to resolve factories twice. The second time during building - // when it was not allowed to do so. - factory CompileError() { - return new CompileError.internal(foo); - } - - CompileError.internal(this.x); -} - -void main() { - Expect.equals(499, new CompileError().x); -} diff --git a/tests/language_2/resolution/resolve_test.dart b/tests/language_2/resolution/resolve_test.dart deleted file mode 100644 index e3ce6ce7f0e..00000000000 --- a/tests/language_2/resolution/resolve_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// 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 test for testing resolving of dynamic and static calls. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - static staticCall() { - return 4; - } - - dynamicCall() { - return 5; - } - - ovrDynamicCall() { - return 6; - } -} - -class B extends A { - ovrDynamicCall() { - return -6; - } -} - -class ResolveTest { - static testMain() { - var b = new B(); - Expect.equals(3, (b.dynamicCall() + A.staticCall() + b.ovrDynamicCall())); - } -} - -main() { - ResolveTest.testMain(); -} diff --git a/tests/language_2/resolution/unqual_name_test.dart b/tests/language_2/resolution/unqual_name_test.dart deleted file mode 100644 index d31af19b455..00000000000 --- a/tests/language_2/resolution/unqual_name_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// 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 test program to check that we can resolve unqualified identifiers - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class B { - B(x, y) : b = y {} - var b; - - get_b() { - // Resolving unqualified instance method. - return really_really_get_it(); - } - - really_really_get_it() { - return 5; - } -} - -class UnqualNameTest { - static eleven() { - return 11; - } - - static testMain() { - var o = new B(3, 5); - Expect.equals(11, eleven()); // Unqualified static method call. - Expect.equals(5, o.get_b()); - - // Check whether we handle variable initializers correctly. - var a = 1, x, b = a + 3; - Expect.equals(5, a + b); - } -} - -main() { - UnqualNameTest.testMain(); -} diff --git a/tests/language_2/return/in_loop_test.dart b/tests/language_2/return/in_loop_test.dart deleted file mode 100644 index e664dd2d806..00000000000 --- a/tests/language_2/return/in_loop_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012, 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. -// Test for a dart2js bug where the live environment was not computed -// right. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - foo() { - var x = 0; - while (true) { - if (true) { - return 42; - } else {} - x = bar(); - } - } - - bar() => 1; -} - -main() { - Expect.equals(42, new A().foo()); -} diff --git a/tests/language_2/return/skip_expression_test.dart b/tests/language_2/return/skip_expression_test.dart deleted file mode 100644 index 09c83cd4e8c..00000000000 --- a/tests/language_2/return/skip_expression_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class OneArg { - OneArg get foo => new OneArg(); - OneArg get bar { - return new OneArg(); - } -} - -class TwoArgs { - TwoArgs get foo => new TwoArgs(); - TwoArgs get bar { - return new TwoArgs(); - } -} - -void main() { - Expect.isTrue(new OneArg().foo is OneArg); - Expect.isTrue(new OneArg().bar is OneArg); - Expect.isTrue(new TwoArgs().foo is TwoArgs); - Expect.isTrue(new TwoArgs().bar is TwoArgs); - - // TODO(karlklose): Please remove the return when dart2js can handle - // the type tests after it. - return; - Expect.isTrue(new OneArg().foo is OneArg); - Expect.isTrue(new OneArg().bar is OneArg); - Expect.isTrue(new TwoArgs().foo is TwoArgs); - Expect.isTrue(new TwoArgs().bar is TwoArgs); -} diff --git a/tests/language_2/return/this_type_test.dart b/tests/language_2/return/this_type_test.dart deleted file mode 100644 index 95d5f0121a4..00000000000 --- a/tests/language_2/return/this_type_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2013, 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 - -// Make sure the engine does not infer the wrong type for [:A.foo:]. - -import "package:expect/expect.dart"; - -class A { - foo() => this; -} - -class B extends A {} - -main() { - Expect.isTrue(new B().foo() is B); -} diff --git a/tests/language_2/return/type_test.dart b/tests/language_2/return/type_test.dart deleted file mode 100644 index 5f975568dc4..00000000000 --- a/tests/language_2/return/type_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -int returnString1() => 's'; -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE -// [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. - -// OK to return anything from a void function with a "=>" body. -void returnNull() => null; -void returnString2() => 's'; - -main() { - returnString1(); - returnNull(); - returnString2(); -} diff --git a/tests/language_2/rewrite/assign_test.dart b/tests/language_2/rewrite/assign_test.dart deleted file mode 100644 index 7d9c90f9512..00000000000 --- a/tests/language_2/rewrite/assign_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -bar(x, y) {} - -foo(b) { - var x, y; - if (b) { - x = 1; - y = 2; - } else { - x = 2; - y = 1; - } - bar(x, y); - bar(x, y); - return x; -} - -main() { - Expect.equals(1, foo(true)); - Expect.equals(2, foo(false)); -} diff --git a/tests/language_2/rewrite/compound_assign_test.dart b/tests/language_2/rewrite/compound_assign_test.dart deleted file mode 100644 index ca1e634e9d2..00000000000 --- a/tests/language_2/rewrite/compound_assign_test.dart +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -var global = 0; - -class Foo { - var field = 0; - static var staticField = 0; -} - -field_compound1(obj) { - return obj.field = obj.field + 5; -} - -field_compound2(obj) { - return obj.field = obj.field + 1; -} - -field_compound3(obj) { - return obj.field = obj.field - 1; -} - -field_compound4(obj) { - return obj.field = obj.field * 1; -} - -static_compound1() { - return Foo.staticField = Foo.staticField + 5; -} - -static_compound2() { - return Foo.staticField = Foo.staticField + 1; -} - -static_compound3() { - return Foo.staticField = Foo.staticField - 1; -} - -static_compound4() { - return Foo.staticField = Foo.staticField * 1; -} - -global_compound1() { - return global = global + 5; -} - -global_compound2() { - return global = global + 1; -} - -global_compound3() { - return global = global - 1; -} - -global_compound4() { - return global = global * 1; -} - -local_compound1(x) { - x = x + 5; - if (x > 0) { - return x; - } - return -x; -} - -local_compound2(x) { - x = x + 1; - if (x > 0) { - return x; - } - return -x; -} - -local_compound3(x) { - x = x - 1; - if (x > 0) { - return x; - } - return -x; -} - -local_compound4(x) { - x = x * 1; - if (x > 0) { - return x; - } - return -x; -} - -main() { - var obj = new Foo(); - Expect.equals(5, field_compound1(obj)); - Expect.equals(5, obj.field); - Expect.equals(6, field_compound2(obj)); - Expect.equals(6, obj.field); - Expect.equals(5, field_compound3(obj)); - Expect.equals(5, obj.field); - Expect.equals(5, field_compound4(obj)); - Expect.equals(5, obj.field); - - Expect.equals(5, static_compound1()); - Expect.equals(5, Foo.staticField); - Expect.equals(6, static_compound2()); - Expect.equals(6, Foo.staticField); - Expect.equals(5, static_compound3()); - Expect.equals(5, Foo.staticField); - Expect.equals(5, static_compound4()); - Expect.equals(5, Foo.staticField); - - Expect.equals(5, global_compound1()); - Expect.equals(5, global); - Expect.equals(6, global_compound2()); - Expect.equals(6, global); - Expect.equals(5, global_compound3()); - Expect.equals(5, global); - Expect.equals(5, global_compound4()); - Expect.equals(5, global); - - Expect.equals(8, local_compound1(3)); - Expect.equals(3, local_compound1(-8)); - Expect.equals(4, local_compound2(3)); - Expect.equals(7, local_compound2(-8)); - Expect.equals(2, local_compound3(3)); - Expect.equals(9, local_compound3(-8)); - Expect.equals(3, local_compound4(3)); - Expect.equals(8, local_compound4(-8)); -} diff --git a/tests/language_2/rewrite/conditional_test.dart b/tests/language_2/rewrite/conditional_test.dart deleted file mode 100644 index fb5b6b1220d..00000000000 --- a/tests/language_2/rewrite/conditional_test.dart +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'package:expect/expect.dart'; - -var global = 0; - -bar() { - global += 1; -} - -baz() { - global += 100; -} - -foo(x, y, z) { - if ((x ? false : true) ? y : z) { - bar(); - bar(); - } else { - baz(); - baz(); - } -} - -foo2(x, y, z) { - return (x ? false : true) ? y : z; -} - -foo3(x, y, z) { - if (x ? (z ? false : true) : (y ? false : true)) { - baz(); - baz(); - } else { - bar(); - bar(); - } -} - -main() { - foo(true, true, true); - Expect.equals(2, global); - - foo(true, true, false); - Expect.equals(202, global); - - foo(true, false, true); - Expect.equals(204, global); - - foo(true, false, false); - Expect.equals(404, global); - - foo(false, true, true); - Expect.equals(406, global); - - foo(false, true, false); - Expect.equals(408, global); - - foo(false, false, true); - Expect.equals(608, global); - - foo(false, false, false); - Expect.equals(808, global); - - Expect.equals(true, foo2(true, true, true)); - Expect.equals(false, foo2(true, true, false)); - Expect.equals(true, foo2(true, false, true)); - Expect.equals(false, foo2(true, false, false)); - Expect.equals(true, foo2(false, true, true)); - Expect.equals(true, foo2(false, true, false)); - Expect.equals(false, foo2(false, false, true)); - Expect.equals(false, foo2(false, false, false)); - - global = 0; - foo3(true, true, true); - Expect.equals(2, global); - - foo3(true, true, false); - Expect.equals(202, global); - - foo3(true, false, true); - Expect.equals(204, global); - - foo3(true, false, false); - Expect.equals(404, global); - - foo3(false, true, true); - Expect.equals(406, global); - - foo3(false, true, false); - Expect.equals(408, global); - - foo3(false, false, true); - Expect.equals(608, global); - - foo3(false, false, false); - Expect.equals(808, global); -} diff --git a/tests/language_2/rewrite/for_update_order_test.dart b/tests/language_2/rewrite/for_update_order_test.dart deleted file mode 100644 index d6f6ffc0ed3..00000000000 --- a/tests/language_2/rewrite/for_update_order_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -var counter = 0; -var global = 0; - -test() { - ++counter; - return counter <= 2; -} - -first() { - global = global + 1; -} - -second() { - global = global * 2; -} - -foo() { - while (test()) { - first(); - second(); - } -} - -main() { - foo(); - Expect.equals(6, global); -} diff --git a/tests/language_2/rewrite/if_empty_then_test.dart b/tests/language_2/rewrite/if_empty_then_test.dart deleted file mode 100644 index fb7dfab3d35..00000000000 --- a/tests/language_2/rewrite/if_empty_then_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -var global = 0; - -effect() { - global = 1; -} - -baz(b) { - return b; -} - -foo(b) { - if (b) { - // do nothing - } else { - effect(); - } - return baz(b); -} - -foo2(b) { - if (b) { - // do nothing (but implicit return may get inlined up here) - } else { - effect(); - } -} - -main() { - global = 0; - Expect.equals(true, foo(true)); - Expect.equals(0, global); - - global = 0; - Expect.equals(false, foo(false)); - Expect.equals(1, global); - - global = 0; - foo2(true); - Expect.equals(0, global); - - global = 0; - foo2(false); - Expect.equals(1, global); -} diff --git a/tests/language_2/rewrite/if_return_test.dart b/tests/language_2/rewrite/if_return_test.dart deleted file mode 100644 index 10f3af8b838..00000000000 --- a/tests/language_2/rewrite/if_return_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -var global = 0; - -bar() { - global = 1; -} - -baz() { - global = 2; -} - -return_const(b) { - if (b) { - bar(); - return 1; - } else { - baz(); - return 1; - } -} - -return_var(b, x) { - if (b) { - bar(); - return x; - } else { - baz(); - return x; - } -} - -main() { - return_const(true); - Expect.equals(1, global); - return_const(false); - Expect.equals(2, global); - - Expect.equals(4, return_var(true, 4)); - Expect.equals(1, global); - Expect.equals(5, return_var(false, 5)); - Expect.equals(2, global); -} diff --git a/tests/language_2/rewrite/if_swap_test.dart b/tests/language_2/rewrite/if_swap_test.dart deleted file mode 100644 index ad4e2cf85bf..00000000000 --- a/tests/language_2/rewrite/if_swap_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -var global = 0; - -bar() { - global += 1; -} - -baz() { - global += 100; -} - -foo(b) { - var old_backend_was_used; - if (b ? false : true) { - bar(); - bar(); - } else { - baz(); - baz(); - } -} - -main() { - foo(true); - Expect.equals(200, global); - - foo(false); - Expect.equals(202, global); -} diff --git a/tests/language_2/rewrite/implicit_this_runtime_test.dart b/tests/language_2/rewrite/implicit_this_runtime_test.dart deleted file mode 100644 index b2afcbe925e..00000000000 --- a/tests/language_2/rewrite/implicit_this_runtime_test.dart +++ /dev/null @@ -1,113 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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 "package:expect/expect.dart"; - -String toplevel = 'A'; - -class Foo { - String x = 'x'; - - easy(z) { - - } - - // Shadow the 'y' field in various ways - shadow_y_parameter(y) { - - } - - shadow_y_local(z) { - var y = z; - - } - - shadow_y_capturedLocal(z) { - var y = z; - foo() { - - } - return foo(); - } - - shadow_y_closureParam(z) { - foo(y) { - - } - return foo(z); - } - - shadow_y_localInsideClosure(z) { - foo() { - var y = z; - - } - - return foo(); - } - - // Shadow the 'x' field in various ways - shadow_x_parameter(x) { - - } - - shadow_x_local(z) { - var x = z; - - } - - shadow_x_capturedLocal(z) { - var x = z; - foo() { - - } - return foo(); - } - - shadow_x_closureParam(z) { - foo(x) { - - } - return foo(z); - } - - shadow_x_localInsideClosure(z) { - foo() { - var x = z; - - } - - return foo(); - } - - shadow_x_toplevel() { - - } -} - -class Sub extends Foo { - String y = 'y'; - String toplevel = 'B'; -} - -main() { - - - - - - - - - - - - - -} diff --git a/tests/language_2/rewrite/implicit_this_test.dart b/tests/language_2/rewrite/implicit_this_test.dart deleted file mode 100644 index 005fe1794b8..00000000000 --- a/tests/language_2/rewrite/implicit_this_test.dart +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -String toplevel = 'A'; - -class Foo { - String x = 'x'; - - easy(z) { - return x + y + z; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER - // [cfe] The getter 'y' isn't defined for the class 'Foo'. - } - - // Shadow the 'y' field in various ways - shadow_y_parameter(y) { - return x + this.y + y; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'y' isn't defined for the class 'Foo'. - } - - shadow_y_local(z) { - var y = z; - return x + this.y + y; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'y' isn't defined for the class 'Foo'. - } - - shadow_y_capturedLocal(z) { - var y = z; - foo() { - return x + this.y + y; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'y' isn't defined for the class 'Foo'. - } - return foo(); - } - - shadow_y_closureParam(z) { - foo(y) { - return x + this.y + y; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'y' isn't defined for the class 'Foo'. - } - return foo(z); - } - - shadow_y_localInsideClosure(z) { - foo() { - var y = z; - return x + this.y + y; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'y' isn't defined for the class 'Foo'. - } - - return foo(); - } - - // Shadow the 'x' field in various ways - shadow_x_parameter(x) { - return this.x + y + x; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER - // [cfe] The getter 'y' isn't defined for the class 'Foo'. - } - - shadow_x_local(z) { - var x = z; - return this.x + y + x; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER - // [cfe] The getter 'y' isn't defined for the class 'Foo'. - } - - shadow_x_capturedLocal(z) { - var x = z; - foo() { - return this.x + y + x; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER - // [cfe] The getter 'y' isn't defined for the class 'Foo'. - } - return foo(); - } - - shadow_x_closureParam(z) { - foo(x) { - return this.x + y + x; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER - // [cfe] The getter 'y' isn't defined for the class 'Foo'. - } - return foo(z); - } - - shadow_x_localInsideClosure(z) { - foo() { - var x = z; - return this.x + y + x; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER - // [cfe] The getter 'y' isn't defined for the class 'Foo'. - } - - return foo(); - } - - shadow_x_toplevel() { - return x + this.y + toplevel + this.toplevel; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'y' isn't defined for the class 'Foo'. - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'toplevel' isn't defined for the class 'Foo'. - } -} - -class Sub extends Foo { - String y = 'y'; - String toplevel = 'B'; -} - -main() { - Expect.equals('xyz', new Sub().easy('z')); - Expect.equals('xyz', new Sub().shadow_y_parameter('z')); - Expect.equals('xyz', new Sub().shadow_y_local('z')); - Expect.equals('xyz', new Sub().shadow_y_capturedLocal('z')); - Expect.equals('xyz', new Sub().shadow_y_closureParam('z')); - Expect.equals('xyz', new Sub().shadow_y_localInsideClosure('z')); - Expect.equals('xyz', new Sub().shadow_x_parameter('z')); - Expect.equals('xyz', new Sub().shadow_x_local('z')); - Expect.equals('xyz', new Sub().shadow_x_capturedLocal('z')); - Expect.equals('xyz', new Sub().shadow_x_closureParam('z')); - Expect.equals('xyz', new Sub().shadow_x_localInsideClosure('z')); - - Expect.equals('xyAB', new Sub().shadow_x_toplevel()); -} diff --git a/tests/language_2/rewrite/logical_test.dart b/tests/language_2/rewrite/logical_test.dart deleted file mode 100644 index e423b40eb99..00000000000 --- a/tests/language_2/rewrite/logical_test.dart +++ /dev/null @@ -1,314 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'package:expect/expect.dart'; - -cneg_and(x, y) { - if ((x && y) ? false : true) { - return 0; - } else { - return 1; - } -} - -cneg_and_not(x, y) { - if ((x && (y ? false : true)) ? false : true) { - return 0; - } else { - return 1; - } -} - -cneg_not_and(x, y) { - if (((x ? false : true) && y) ? false : true) { - return 0; - } else { - return 1; - } -} - -cneg_not_and_not(x, y) { - if (((x ? false : true) && (y ? false : true)) ? false : true) { - return 0; - } else { - return 1; - } -} - -cneg_or(x, y) { - if ((x || y) ? false : true) { - return 0; - } else { - return 1; - } -} - -cneg_or_not(x, y) { - if ((x || (y ? false : true)) ? false : true) { - return 0; - } else { - return 1; - } -} - -cneg_not_or(x, y) { - if (((x ? false : true) || y) ? false : true) { - return 0; - } else { - return 1; - } -} - -cneg_not_or_not(x, y) { - if (((x ? false : true) || (y ? false : true)) ? false : true) { - return 0; - } else { - return 1; - } -} - -value_tobool(x) { - return x ? true : false; -} - -value_negate(x) { - return x ? false : true; -} - -value_and(x, y) { - return x ? y ? true : false : false; -} - -value_or(x, y) { - return x ? true : y ? true : false; -} - -value_and_not(x, y) { - return x ? y ? false : true : false; -} - -value_not_and(x, y) { - return x ? false : y ? true : false; -} - -value_not_and_not(x, y) { - return x ? false : y ? false : true; -} - -value_or_not(x, y) { - return x ? true : y ? false : true; -} - -value_not_or(x, y) { - return x ? y ? true : false : true; -} - -value_not_or_not(x, y) { - return x ? y ? false : true : true; -} - -if_negate(x) { - if (x ? false : true) { - return 1; - } else { - return 0; - } -} - -if_and(x, y) { - if (x ? y ? true : false : false) { - return 1; - } else { - return 0; - } -} - -if_or(x, y) { - if (x ? true : y) { - return 1; - } else { - return 0; - } -} - -if_and_not(x, y) { - if (x ? y ? false : true : false) { - return 1; - } else { - return 0; - } -} - -if_not_and(x, y) { - if (x ? false : y) { - return 1; - } else { - return 0; - } -} - -if_not_and_not(x, y) { - if (x ? false : y ? false : true) { - return 1; - } else { - return 0; - } -} - -if_or_not(x, y) { - if (x ? true : y ? false : true) { - return 1; - } else { - return 0; - } -} - -if_not_or(x, y) { - if (x ? y : true) { - return 1; - } else { - return 0; - } -} - -if_not_or_not(x, y) { - if (x ? y ? false : true : true) { - return 1; - } else { - return 0; - } -} - -main() { - Expect.equals(1, cneg_and(true, true)); - Expect.equals(0, cneg_and(true, false)); - Expect.equals(0, cneg_and(false, true)); - Expect.equals(0, cneg_and(false, false)); - - Expect.equals(0, cneg_and_not(true, true)); - Expect.equals(1, cneg_and_not(true, false)); - Expect.equals(0, cneg_and_not(false, true)); - Expect.equals(0, cneg_and_not(false, false)); - - Expect.equals(0, cneg_not_and(true, true)); - Expect.equals(0, cneg_not_and(true, false)); - Expect.equals(1, cneg_not_and(false, true)); - Expect.equals(0, cneg_not_and(false, false)); - - Expect.equals(0, cneg_not_and_not(true, true)); - Expect.equals(0, cneg_not_and_not(true, false)); - Expect.equals(0, cneg_not_and_not(false, true)); - Expect.equals(1, cneg_not_and_not(false, false)); - - Expect.equals(1, cneg_or(true, true)); - Expect.equals(1, cneg_or(true, false)); - Expect.equals(1, cneg_or(false, true)); - Expect.equals(0, cneg_or(false, false)); - - Expect.equals(1, cneg_or_not(true, true)); - Expect.equals(1, cneg_or_not(true, false)); - Expect.equals(0, cneg_or_not(false, true)); - Expect.equals(1, cneg_or_not(false, false)); - - Expect.equals(1, cneg_not_or(true, true)); - Expect.equals(0, cneg_not_or(true, false)); - Expect.equals(1, cneg_not_or(false, true)); - Expect.equals(1, cneg_not_or(false, false)); - - Expect.equals(0, cneg_not_or_not(true, true)); - Expect.equals(1, cneg_not_or_not(true, false)); - Expect.equals(1, cneg_not_or_not(false, true)); - Expect.equals(1, cneg_not_or_not(false, false)); - - Expect.equals(true, value_tobool(true)); - Expect.equals(false, value_tobool(false)); - - Expect.equals(false, value_negate(true)); - Expect.equals(true, value_negate(false)); - - Expect.equals(true, value_and(true, true)); - Expect.equals(false, value_and(true, false)); - Expect.equals(false, value_and(false, true)); - Expect.equals(false, value_and(false, false)); - - Expect.equals(false, value_and_not(true, true)); - Expect.equals(true, value_and_not(true, false)); - Expect.equals(false, value_and_not(false, true)); - Expect.equals(false, value_and_not(false, false)); - - Expect.equals(false, value_not_and(true, true)); - Expect.equals(false, value_not_and(true, false)); - Expect.equals(true, value_not_and(false, true)); - Expect.equals(false, value_not_and(false, false)); - - Expect.equals(false, value_not_and_not(true, true)); - Expect.equals(false, value_not_and_not(true, false)); - Expect.equals(false, value_not_and_not(false, true)); - Expect.equals(true, value_not_and_not(false, false)); - - Expect.equals(true, value_or(true, true)); - Expect.equals(true, value_or(true, false)); - Expect.equals(true, value_or(false, true)); - Expect.equals(false, value_or(false, false)); - - Expect.equals(true, value_or_not(true, true)); - Expect.equals(true, value_or_not(true, false)); - Expect.equals(false, value_or_not(false, true)); - Expect.equals(true, value_or_not(false, false)); - - Expect.equals(true, value_not_or(true, true)); - Expect.equals(false, value_not_or(true, false)); - Expect.equals(true, value_not_or(false, true)); - Expect.equals(true, value_not_or(false, false)); - - Expect.equals(false, value_not_or_not(true, true)); - Expect.equals(true, value_not_or_not(true, false)); - Expect.equals(true, value_not_or_not(false, true)); - Expect.equals(true, value_not_or_not(false, false)); - - Expect.equals(0, if_negate(true)); - Expect.equals(1, if_negate(false)); - - Expect.equals(1, if_and(true, true)); - Expect.equals(0, if_and(true, false)); - Expect.equals(0, if_and(false, true)); - Expect.equals(0, if_and(false, false)); - - Expect.equals(0, if_and_not(true, true)); - Expect.equals(1, if_and_not(true, false)); - Expect.equals(0, if_and_not(false, true)); - Expect.equals(0, if_and_not(false, false)); - - Expect.equals(0, if_not_and(true, true)); - Expect.equals(0, if_not_and(true, false)); - Expect.equals(1, if_not_and(false, true)); - Expect.equals(0, if_not_and(false, false)); - - Expect.equals(0, if_not_and_not(true, true)); - Expect.equals(0, if_not_and_not(true, false)); - Expect.equals(0, if_not_and_not(false, true)); - Expect.equals(1, if_not_and_not(false, false)); - - Expect.equals(1, if_or(true, true)); - Expect.equals(1, if_or(true, false)); - Expect.equals(1, if_or(false, true)); - Expect.equals(0, if_or(false, false)); - - Expect.equals(1, if_or_not(true, true)); - Expect.equals(1, if_or_not(true, false)); - Expect.equals(0, if_or_not(false, true)); - Expect.equals(1, if_or_not(false, false)); - - Expect.equals(1, if_not_or(true, true)); - Expect.equals(0, if_not_or(true, false)); - Expect.equals(1, if_not_or(false, true)); - Expect.equals(1, if_not_or(false, false)); - - Expect.equals(0, if_not_or_not(true, true)); - Expect.equals(1, if_not_or_not(true, false)); - Expect.equals(1, if_not_or_not(false, true)); - Expect.equals(1, if_not_or_not(false, false)); -} diff --git a/tests/language_2/rewrite/nested_if1_test.dart b/tests/language_2/rewrite/nested_if1_test.dart deleted file mode 100644 index 8c6031e6517..00000000000 --- a/tests/language_2/rewrite/nested_if1_test.dart +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'package:expect/expect.dart'; - -var global; - -setGlobal(v) { - global = v; -} - -check_true_true(x, y, v) { - if (x) { - if (y) { - setGlobal(v); - } - } -} - -check_false_true(x, y, v) { - if (x) {} else { - if (y) { - setGlobal(v); - } - } -} - -check_true_false(x, y, v) { - if (x) { - if (y) {} else { - setGlobal(v); - } - } -} - -check_false_false(x, y, v) { - if (x) {} else { - if (y) {} else { - setGlobal(v); - } - } -} - -main() { - check_true_true(true, true, 4); - check_true_true(false, false, 1); - check_true_true(false, true, 2); - check_true_true(true, false, 3); - - Expect.equals(4, global); - - check_true_false(false, false, 1); - check_true_false(false, true, 2); - check_true_false(true, false, 3); - check_true_false(true, true, 4); - - Expect.equals(3, global); - - check_false_true(false, false, 1); - check_false_true(false, true, 2); - check_false_true(true, false, 3); - check_false_true(true, true, 4); - - Expect.equals(2, global); - - check_false_false(false, false, 1); - check_false_false(false, true, 2); - check_false_false(true, false, 3); - check_false_false(true, true, 4); - - Expect.equals(1, global); -} diff --git a/tests/language_2/rewrite/nested_if2_test.dart b/tests/language_2/rewrite/nested_if2_test.dart deleted file mode 100644 index a91eb77d90c..00000000000 --- a/tests/language_2/rewrite/nested_if2_test.dart +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'package:expect/expect.dart'; - -check_true_true(x, y) { - if (x) { - if (y) { - return true; - } - } - return false; -} - -check_false_true(x, y) { - if (x) {} else { - if (y) { - return true; - } - } - return false; -} - -check_true_false(x, y) { - if (x) { - if (y) {} else { - return true; - } - } - return false; -} - -check_false_false(x, y) { - if (x) {} else { - if (y) {} else { - return true; - } - } - return false; -} - -main() { - Expect.equals(true, check_true_true(true, true)); - Expect.equals(false, check_true_true(true, false)); - Expect.equals(false, check_true_true(false, true)); - Expect.equals(false, check_true_true(false, false)); - - Expect.equals(false, check_true_false(true, true)); - Expect.equals(true, check_true_false(true, false)); - Expect.equals(false, check_true_false(false, true)); - Expect.equals(false, check_true_false(false, false)); - - Expect.equals(false, check_false_true(true, true)); - Expect.equals(false, check_false_true(true, false)); - Expect.equals(true, check_false_true(false, true)); - Expect.equals(false, check_false_true(false, false)); - - Expect.equals(false, check_false_false(true, true)); - Expect.equals(false, check_false_false(true, false)); - Expect.equals(false, check_false_false(false, true)); - Expect.equals(true, check_false_false(false, false)); -} diff --git a/tests/language_2/rewrite/nested_if3_test.dart b/tests/language_2/rewrite/nested_if3_test.dart deleted file mode 100644 index f59ea1345cc..00000000000 --- a/tests/language_2/rewrite/nested_if3_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'package:expect/expect.dart'; - -baz() {} - -check_true_true(x, y) { - if (x) { - if (y) { - return true; - } - } - baz(); - return false; -} - -check_false_true(x, y) { - if (x) {} else { - if (y) { - return true; - } - } - baz(); - return false; -} - -check_true_false(x, y) { - if (x) { - if (y) {} else { - return true; - } - } - baz(); - return false; -} - -check_false_false(x, y) { - if (x) {} else { - if (y) {} else { - return true; - } - } - baz(); - return false; -} - -main() { - Expect.equals(true, check_true_true(true, true)); - Expect.equals(false, check_true_true(true, false)); - Expect.equals(false, check_true_true(false, true)); - Expect.equals(false, check_true_true(false, false)); - - Expect.equals(false, check_true_false(true, true)); - Expect.equals(true, check_true_false(true, false)); - Expect.equals(false, check_true_false(false, true)); - Expect.equals(false, check_true_false(false, false)); - - Expect.equals(false, check_false_true(true, true)); - Expect.equals(false, check_false_true(true, false)); - Expect.equals(true, check_false_true(false, true)); - Expect.equals(false, check_false_true(false, false)); - - Expect.equals(false, check_false_false(true, true)); - Expect.equals(false, check_false_false(true, false)); - Expect.equals(false, check_false_false(false, true)); - Expect.equals(true, check_false_false(false, false)); -} diff --git a/tests/language_2/rewrite/swap_test.dart b/tests/language_2/rewrite/swap_test.dart deleted file mode 100644 index 133b7fb4485..00000000000 --- a/tests/language_2/rewrite/swap_test.dart +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -swap1(x, y, b) { - if (b) { - var t = x; - x = y; - y = t; - } - Expect.equals(2, x); - Expect.equals(1, y); -} - -swap2(x, y, z, w, b) { - if (b) { - var t = x; - x = y; - y = t; - - var q = z; - z = w; - w = q; - } - Expect.equals(2, x); - Expect.equals(1, y); - Expect.equals(4, z); - Expect.equals(3, w); -} - -swap3(x, y, z, b) { - if (b) { - var t = x; - x = y; - y = z; - z = t; - } - Expect.equals(2, x); - Expect.equals(3, y); - Expect.equals(1, z); -} - -swap4(x, y, z, b) { - if (b) { - var t = x; - x = y; - y = z; // swap cycle involves unused variable 'y' - z = t; - } - Expect.equals(2, x); - Expect.equals(1, z); -} - -swap5(x, y, z, w, b, b2) { - if (b) { - var t = x; - x = y; - y = t; - } - if (b2) { - var q = z; - z = w; - w = q; - } - Expect.equals(2, x); - Expect.equals(1, y); - Expect.equals(4, z); - Expect.equals(3, w); -} - -main() { - swap1(1, 2, true); - swap1(2, 1, false); - - swap2(1, 2, 3, 4, true); - swap2(2, 1, 4, 3, false); - - swap3(1, 2, 3, true); - swap3(2, 3, 1, false); - - swap4(1, 2, 3, true); - swap4(2, 3, 1, false); - - swap5(1, 2, 3, 4, true, true); - swap5(1, 2, 4, 3, true, false); - swap5(2, 1, 3, 4, false, true); - swap5(2, 1, 4, 3, false, false); -} diff --git a/tests/language_2/rewrite/variable_initializer_test.dart b/tests/language_2/rewrite/variable_initializer_test.dart deleted file mode 100644 index d1a04a0ff56..00000000000 --- a/tests/language_2/rewrite/variable_initializer_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -class Foo { - var field = 0; -} - -bar(x, y) { - return x * 100 + y; -} - -foo(z) { - var x = 0, y = x; - if (z > 0) { - x = 10; - } - if (z > 10) { - y = 20; - } - return bar(x, y); -} - -baz(z) { - var f = new Foo() - ..field = 10 - ..field = z; - return f; -} - -main() { - Expect.equals(0, foo(0)); - Expect.equals(1000, foo(5)); - Expect.equals(1020, foo(15)); - - Expect.equals(20, baz(20).field); - Expect.equals(30, baz(30).field); -} diff --git a/tests/language_2/rewrite/while_many_exits_test.dart b/tests/language_2/rewrite/while_many_exits_test.dart deleted file mode 100644 index 9da72d55adb..00000000000 --- a/tests/language_2/rewrite/while_many_exits_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -var baz_clicks = 0; - -baz() { - return ++baz_clicks; -} - -var global = 0; - -increment_global() { - ++global; - return global <= 10; -} - -foo(x, y) { - var n = 0; - while (true) { - baz(); - if (n >= x) { - return n; - } - baz(); - if (n >= y) { - return n; - } - n = n + 1; - } -} - -bar() { - while (increment_global()) { - baz(); - } - return baz(); -} - -main() { - Expect.equals(10, foo(10, 20)); - Expect.equals(10, foo(20, 10)); - - baz_clicks = 0; - Expect.equals(11, bar()); -} diff --git a/tests/language_2/rewrite/while_test.dart b/tests/language_2/rewrite/while_test.dart deleted file mode 100644 index 60c2a9abe50..00000000000 --- a/tests/language_2/rewrite/while_test.dart +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -baz() {} - -loop1(x) { - var n = 0; - while (n < x) { - n = n + 1; - } - return n; -} - -loop2(x) { - var n = 0; - if (x < 100) { - while (n < x) { - n = n + 1; - } - } - baz(); - return n; -} - -loop3(x) { - var n = 0; - if (x < 100) { - while (n < x) { - n = n + 1; - baz(); - } - } - baz(); - return n; -} - -loop4(x) { - var n = 0; - if (x < 100) { - while (n < x) { - baz(); - n = n + 1; - } - } - baz(); - return n; -} - -f1(b) { - while (b) return 1; - - return 2; -} - -f2(b) { - while (b) { - return 1; - } - return 2; -} - -main() { - Expect.equals(0, loop1(-10)); - Expect.equals(10, loop1(10)); - - Expect.equals(0, loop2(-10)); - Expect.equals(10, loop2(10)); - Expect.equals(0, loop2(200)); - - Expect.equals(0, loop3(-10)); - Expect.equals(10, loop3(10)); - Expect.equals(0, loop3(200)); - - Expect.equals(0, loop4(-10)); - Expect.equals(10, loop4(10)); - Expect.equals(0, loop4(200)); - - Expect.equals(1, f1(true)); - Expect.equals(2, f1(false)); - Expect.equals(1, f2(true)); - Expect.equals(2, f2(false)); -} diff --git a/tests/language_2/script/lib.dart b/tests/language_2/script/lib.dart deleted file mode 100644 index 605efd955d3..00000000000 --- a/tests/language_2/script/lib.dart +++ /dev/null @@ -1,11 +0,0 @@ -// 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 library for use with script and library tests. - -library ScriptLib; - -const int scriptLib = 1; diff --git a/tests/language_2/script/script1_lib.dart b/tests/language_2/script/script1_lib.dart deleted file mode 100644 index b83de63edae..00000000000 --- a/tests/language_2/script/script1_lib.dart +++ /dev/null @@ -1,7 +0,0 @@ -// 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. - -// @dart = 2.9 - -int ok = 1; diff --git a/tests/language_2/script/script1_part.dart b/tests/language_2/script/script1_part.dart deleted file mode 100644 index ee9a8f9f856..00000000000 --- a/tests/language_2/script/script1_part.dart +++ /dev/null @@ -1,9 +0,0 @@ -// 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. - -// @dart = 2.9 - -part of "script1_test.dart"; - -const int scriptPart = 1; diff --git a/tests/language_2/script/script1_test.dart b/tests/language_2/script/script1_test.dart deleted file mode 100644 index 9c3f05bda84..00000000000 --- a/tests/language_2/script/script1_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Wrong order of import and part directives. - -part "script1_part.dart"; -import "script1_lib.dart"; -// [error line 10, column 1, length 6] -// [analyzer] SYNTACTIC_ERROR.IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE -// [cfe] Import directives must precede part directives. - -main() { - print("Should not reach here."); -} diff --git a/tests/language_2/script/script2_part.dart b/tests/language_2/script/script2_part.dart deleted file mode 100644 index 3d52c097e66..00000000000 --- a/tests/language_2/script/script2_part.dart +++ /dev/null @@ -1,12 +0,0 @@ -// 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. - -// @dart = 2.9 - -library Script2Part; -import "lib.dart"; - -part of "script2_test.dart"; - -const int scriptPart = 1; diff --git a/tests/language_2/script/script2_test.dart b/tests/language_2/script/script2_test.dart deleted file mode 100644 index 0d0138b9c7e..00000000000 --- a/tests/language_2/script/script2_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Part file has library and import directives. - -// TODO(rnystrom): Using a multitest instead of making this a static error test -// because the error is reported in the part file and not in this file. Once -// issue #44990 is fixed, this can be a static error test. -part "script2_part.dart"; //# 01: compile-time error - -main() {} diff --git a/tests/language_2/set_literals/big_set_literal_test.dart b/tests/language_2/set_literals/big_set_literal_test.dart deleted file mode 100644 index e1721baf432..00000000000 --- a/tests/language_2/set_literals/big_set_literal_test.dart +++ /dev/null @@ -1,20030 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -void main() { - Expect.equals(10000, intSet.length); - Iterator intIterator = intSet.iterator; - for (int i = 0; i < 10000; i++) { - Expect.equals(true, intIterator.moveNext()); - Expect.equals(i, intIterator.current); - } - Expect.equals(false, intIterator.moveNext()); - - Expect.equals(10000, stringSet.length); - Iterator stringIterator = stringSet.iterator; - for (int i = 0; i < 10000; i++) { - Expect.equals(true, stringIterator.moveNext()); - Expect.equals("foo_$i", stringIterator.current); - } - Expect.equals(false, stringIterator.moveNext()); -} - -Set intSet = { - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97, - 98, - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135, - 136, - 137, - 138, - 139, - 140, - 141, - 142, - 143, - 144, - 145, - 146, - 147, - 148, - 149, - 150, - 151, - 152, - 153, - 154, - 155, - 156, - 157, - 158, - 159, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 174, - 175, - 176, - 177, - 178, - 179, - 180, - 181, - 182, - 183, - 184, - 185, - 186, - 187, - 188, - 189, - 190, - 191, - 192, - 193, - 194, - 195, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 210, - 211, - 212, - 213, - 214, - 215, - 216, - 217, - 218, - 219, - 220, - 221, - 222, - 223, - 224, - 225, - 226, - 227, - 228, - 229, - 230, - 231, - 232, - 233, - 234, - 235, - 236, - 237, - 238, - 239, - 240, - 241, - 242, - 243, - 244, - 245, - 246, - 247, - 248, - 249, - 250, - 251, - 252, - 253, - 254, - 255, - 256, - 257, - 258, - 259, - 260, - 261, - 262, - 263, - 264, - 265, - 266, - 267, - 268, - 269, - 270, - 271, - 272, - 273, - 274, - 275, - 276, - 277, - 278, - 279, - 280, - 281, - 282, - 283, - 284, - 285, - 286, - 287, - 288, - 289, - 290, - 291, - 292, - 293, - 294, - 295, - 296, - 297, - 298, - 299, - 300, - 301, - 302, - 303, - 304, - 305, - 306, - 307, - 308, - 309, - 310, - 311, - 312, - 313, - 314, - 315, - 316, - 317, - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332, - 333, - 334, - 335, - 336, - 337, - 338, - 339, - 340, - 341, - 342, - 343, - 344, - 345, - 346, - 347, - 348, - 349, - 350, - 351, - 352, - 353, - 354, - 355, - 356, - 357, - 358, - 359, - 360, - 361, - 362, - 363, - 364, - 365, - 366, - 367, - 368, - 369, - 370, - 371, - 372, - 373, - 374, - 375, - 376, - 377, - 378, - 379, - 380, - 381, - 382, - 383, - 384, - 385, - 386, - 387, - 388, - 389, - 390, - 391, - 392, - 393, - 394, - 395, - 396, - 397, - 398, - 399, - 400, - 401, - 402, - 403, - 404, - 405, - 406, - 407, - 408, - 409, - 410, - 411, - 412, - 413, - 414, - 415, - 416, - 417, - 418, - 419, - 420, - 421, - 422, - 423, - 424, - 425, - 426, - 427, - 428, - 429, - 430, - 431, - 432, - 433, - 434, - 435, - 436, - 437, - 438, - 439, - 440, - 441, - 442, - 443, - 444, - 445, - 446, - 447, - 448, - 449, - 450, - 451, - 452, - 453, - 454, - 455, - 456, - 457, - 458, - 459, - 460, - 461, - 462, - 463, - 464, - 465, - 466, - 467, - 468, - 469, - 470, - 471, - 472, - 473, - 474, - 475, - 476, - 477, - 478, - 479, - 480, - 481, - 482, - 483, - 484, - 485, - 486, - 487, - 488, - 489, - 490, - 491, - 492, - 493, - 494, - 495, - 496, - 497, - 498, - 499, - 500, - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520, - 521, - 522, - 523, - 524, - 525, - 526, - 527, - 528, - 529, - 530, - 531, - 532, - 533, - 534, - 535, - 536, - 537, - 538, - 539, - 540, - 541, - 542, - 543, - 544, - 545, - 546, - 547, - 548, - 549, - 550, - 551, - 552, - 553, - 554, - 555, - 556, - 557, - 558, - 559, - 560, - 561, - 562, - 563, - 564, - 565, - 566, - 567, - 568, - 569, - 570, - 571, - 572, - 573, - 574, - 575, - 576, - 577, - 578, - 579, - 580, - 581, - 582, - 583, - 584, - 585, - 586, - 587, - 588, - 589, - 590, - 591, - 592, - 593, - 594, - 595, - 596, - 597, - 598, - 599, - 600, - 601, - 602, - 603, - 604, - 605, - 606, - 607, - 608, - 609, - 610, - 611, - 612, - 613, - 614, - 615, - 616, - 617, - 618, - 619, - 620, - 621, - 622, - 623, - 624, - 625, - 626, - 627, - 628, - 629, - 630, - 631, - 632, - 633, - 634, - 635, - 636, - 637, - 638, - 639, - 640, - 641, - 642, - 643, - 644, - 645, - 646, - 647, - 648, - 649, - 650, - 651, - 652, - 653, - 654, - 655, - 656, - 657, - 658, - 659, - 660, - 661, - 662, - 663, - 664, - 665, - 666, - 667, - 668, - 669, - 670, - 671, - 672, - 673, - 674, - 675, - 676, - 677, - 678, - 679, - 680, - 681, - 682, - 683, - 684, - 685, - 686, - 687, - 688, - 689, - 690, - 691, - 692, - 693, - 694, - 695, - 696, - 697, - 698, - 699, - 700, - 701, - 702, - 703, - 704, - 705, - 706, - 707, - 708, - 709, - 710, - 711, - 712, - 713, - 714, - 715, - 716, - 717, - 718, - 719, - 720, - 721, - 722, - 723, - 724, - 725, - 726, - 727, - 728, - 729, - 730, - 731, - 732, - 733, - 734, - 735, - 736, - 737, - 738, - 739, - 740, - 741, - 742, - 743, - 744, - 745, - 746, - 747, - 748, - 749, - 750, - 751, - 752, - 753, - 754, - 755, - 756, - 757, - 758, - 759, - 760, - 761, - 762, - 763, - 764, - 765, - 766, - 767, - 768, - 769, - 770, - 771, - 772, - 773, - 774, - 775, - 776, - 777, - 778, - 779, - 780, - 781, - 782, - 783, - 784, - 785, - 786, - 787, - 788, - 789, - 790, - 791, - 792, - 793, - 794, - 795, - 796, - 797, - 798, - 799, - 800, - 801, - 802, - 803, - 804, - 805, - 806, - 807, - 808, - 809, - 810, - 811, - 812, - 813, - 814, - 815, - 816, - 817, - 818, - 819, - 820, - 821, - 822, - 823, - 824, - 825, - 826, - 827, - 828, - 829, - 830, - 831, - 832, - 833, - 834, - 835, - 836, - 837, - 838, - 839, - 840, - 841, - 842, - 843, - 844, - 845, - 846, - 847, - 848, - 849, - 850, - 851, - 852, - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937, - 938, - 939, - 940, - 941, - 942, - 943, - 944, - 945, - 946, - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020, - 1021, - 1022, - 1023, - 1024, - 1025, - 1026, - 1027, - 1028, - 1029, - 1030, - 1031, - 1032, - 1033, - 1034, - 1035, - 1036, - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057, - 1058, - 1059, - 1060, - 1061, - 1062, - 1063, - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074, - 1075, - 1076, - 1077, - 1078, - 1079, - 1080, - 1081, - 1082, - 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, - 1090, - 1091, - 1092, - 1093, - 1094, - 1095, - 1096, - 1097, - 1098, - 1099, - 1100, - 1101, - 1102, - 1103, - 1104, - 1105, - 1106, - 1107, - 1108, - 1109, - 1110, - 1111, - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121, - 1122, - 1123, - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136, - 1137, - 1138, - 1139, - 1140, - 1141, - 1142, - 1143, - 1144, - 1145, - 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223, - 1224, - 1225, - 1226, - 1227, - 1228, - 1229, - 1230, - 1231, - 1232, - 1233, - 1234, - 1235, - 1236, - 1237, - 1238, - 1239, - 1240, - 1241, - 1242, - 1243, - 1244, - 1245, - 1246, - 1247, - 1248, - 1249, - 1250, - 1251, - 1252, - 1253, - 1254, - 1255, - 1256, - 1257, - 1258, - 1259, - 1260, - 1261, - 1262, - 1263, - 1264, - 1265, - 1266, - 1267, - 1268, - 1269, - 1270, - 1271, - 1272, - 1273, - 1274, - 1275, - 1276, - 1277, - 1278, - 1279, - 1280, - 1281, - 1282, - 1283, - 1284, - 1285, - 1286, - 1287, - 1288, - 1289, - 1290, - 1291, - 1292, - 1293, - 1294, - 1295, - 1296, - 1297, - 1298, - 1299, - 1300, - 1301, - 1302, - 1303, - 1304, - 1305, - 1306, - 1307, - 1308, - 1309, - 1310, - 1311, - 1312, - 1313, - 1314, - 1315, - 1316, - 1317, - 1318, - 1319, - 1320, - 1321, - 1322, - 1323, - 1324, - 1325, - 1326, - 1327, - 1328, - 1329, - 1330, - 1331, - 1332, - 1333, - 1334, - 1335, - 1336, - 1337, - 1338, - 1339, - 1340, - 1341, - 1342, - 1343, - 1344, - 1345, - 1346, - 1347, - 1348, - 1349, - 1350, - 1351, - 1352, - 1353, - 1354, - 1355, - 1356, - 1357, - 1358, - 1359, - 1360, - 1361, - 1362, - 1363, - 1364, - 1365, - 1366, - 1367, - 1368, - 1369, - 1370, - 1371, - 1372, - 1373, - 1374, - 1375, - 1376, - 1377, - 1378, - 1379, - 1380, - 1381, - 1382, - 1383, - 1384, - 1385, - 1386, - 1387, - 1388, - 1389, - 1390, - 1391, - 1392, - 1393, - 1394, - 1395, - 1396, - 1397, - 1398, - 1399, - 1400, - 1401, - 1402, - 1403, - 1404, - 1405, - 1406, - 1407, - 1408, - 1409, - 1410, - 1411, - 1412, - 1413, - 1414, - 1415, - 1416, - 1417, - 1418, - 1419, - 1420, - 1421, - 1422, - 1423, - 1424, - 1425, - 1426, - 1427, - 1428, - 1429, - 1430, - 1431, - 1432, - 1433, - 1434, - 1435, - 1436, - 1437, - 1438, - 1439, - 1440, - 1441, - 1442, - 1443, - 1444, - 1445, - 1446, - 1447, - 1448, - 1449, - 1450, - 1451, - 1452, - 1453, - 1454, - 1455, - 1456, - 1457, - 1458, - 1459, - 1460, - 1461, - 1462, - 1463, - 1464, - 1465, - 1466, - 1467, - 1468, - 1469, - 1470, - 1471, - 1472, - 1473, - 1474, - 1475, - 1476, - 1477, - 1478, - 1479, - 1480, - 1481, - 1482, - 1483, - 1484, - 1485, - 1486, - 1487, - 1488, - 1489, - 1490, - 1491, - 1492, - 1493, - 1494, - 1495, - 1496, - 1497, - 1498, - 1499, - 1500, - 1501, - 1502, - 1503, - 1504, - 1505, - 1506, - 1507, - 1508, - 1509, - 1510, - 1511, - 1512, - 1513, - 1514, - 1515, - 1516, - 1517, - 1518, - 1519, - 1520, - 1521, - 1522, - 1523, - 1524, - 1525, - 1526, - 1527, - 1528, - 1529, - 1530, - 1531, - 1532, - 1533, - 1534, - 1535, - 1536, - 1537, - 1538, - 1539, - 1540, - 1541, - 1542, - 1543, - 1544, - 1545, - 1546, - 1547, - 1548, - 1549, - 1550, - 1551, - 1552, - 1553, - 1554, - 1555, - 1556, - 1557, - 1558, - 1559, - 1560, - 1561, - 1562, - 1563, - 1564, - 1565, - 1566, - 1567, - 1568, - 1569, - 1570, - 1571, - 1572, - 1573, - 1574, - 1575, - 1576, - 1577, - 1578, - 1579, - 1580, - 1581, - 1582, - 1583, - 1584, - 1585, - 1586, - 1587, - 1588, - 1589, - 1590, - 1591, - 1592, - 1593, - 1594, - 1595, - 1596, - 1597, - 1598, - 1599, - 1600, - 1601, - 1602, - 1603, - 1604, - 1605, - 1606, - 1607, - 1608, - 1609, - 1610, - 1611, - 1612, - 1613, - 1614, - 1615, - 1616, - 1617, - 1618, - 1619, - 1620, - 1621, - 1622, - 1623, - 1624, - 1625, - 1626, - 1627, - 1628, - 1629, - 1630, - 1631, - 1632, - 1633, - 1634, - 1635, - 1636, - 1637, - 1638, - 1639, - 1640, - 1641, - 1642, - 1643, - 1644, - 1645, - 1646, - 1647, - 1648, - 1649, - 1650, - 1651, - 1652, - 1653, - 1654, - 1655, - 1656, - 1657, - 1658, - 1659, - 1660, - 1661, - 1662, - 1663, - 1664, - 1665, - 1666, - 1667, - 1668, - 1669, - 1670, - 1671, - 1672, - 1673, - 1674, - 1675, - 1676, - 1677, - 1678, - 1679, - 1680, - 1681, - 1682, - 1683, - 1684, - 1685, - 1686, - 1687, - 1688, - 1689, - 1690, - 1691, - 1692, - 1693, - 1694, - 1695, - 1696, - 1697, - 1698, - 1699, - 1700, - 1701, - 1702, - 1703, - 1704, - 1705, - 1706, - 1707, - 1708, - 1709, - 1710, - 1711, - 1712, - 1713, - 1714, - 1715, - 1716, - 1717, - 1718, - 1719, - 1720, - 1721, - 1722, - 1723, - 1724, - 1725, - 1726, - 1727, - 1728, - 1729, - 1730, - 1731, - 1732, - 1733, - 1734, - 1735, - 1736, - 1737, - 1738, - 1739, - 1740, - 1741, - 1742, - 1743, - 1744, - 1745, - 1746, - 1747, - 1748, - 1749, - 1750, - 1751, - 1752, - 1753, - 1754, - 1755, - 1756, - 1757, - 1758, - 1759, - 1760, - 1761, - 1762, - 1763, - 1764, - 1765, - 1766, - 1767, - 1768, - 1769, - 1770, - 1771, - 1772, - 1773, - 1774, - 1775, - 1776, - 1777, - 1778, - 1779, - 1780, - 1781, - 1782, - 1783, - 1784, - 1785, - 1786, - 1787, - 1788, - 1789, - 1790, - 1791, - 1792, - 1793, - 1794, - 1795, - 1796, - 1797, - 1798, - 1799, - 1800, - 1801, - 1802, - 1803, - 1804, - 1805, - 1806, - 1807, - 1808, - 1809, - 1810, - 1811, - 1812, - 1813, - 1814, - 1815, - 1816, - 1817, - 1818, - 1819, - 1820, - 1821, - 1822, - 1823, - 1824, - 1825, - 1826, - 1827, - 1828, - 1829, - 1830, - 1831, - 1832, - 1833, - 1834, - 1835, - 1836, - 1837, - 1838, - 1839, - 1840, - 1841, - 1842, - 1843, - 1844, - 1845, - 1846, - 1847, - 1848, - 1849, - 1850, - 1851, - 1852, - 1853, - 1854, - 1855, - 1856, - 1857, - 1858, - 1859, - 1860, - 1861, - 1862, - 1863, - 1864, - 1865, - 1866, - 1867, - 1868, - 1869, - 1870, - 1871, - 1872, - 1873, - 1874, - 1875, - 1876, - 1877, - 1878, - 1879, - 1880, - 1881, - 1882, - 1883, - 1884, - 1885, - 1886, - 1887, - 1888, - 1889, - 1890, - 1891, - 1892, - 1893, - 1894, - 1895, - 1896, - 1897, - 1898, - 1899, - 1900, - 1901, - 1902, - 1903, - 1904, - 1905, - 1906, - 1907, - 1908, - 1909, - 1910, - 1911, - 1912, - 1913, - 1914, - 1915, - 1916, - 1917, - 1918, - 1919, - 1920, - 1921, - 1922, - 1923, - 1924, - 1925, - 1926, - 1927, - 1928, - 1929, - 1930, - 1931, - 1932, - 1933, - 1934, - 1935, - 1936, - 1937, - 1938, - 1939, - 1940, - 1941, - 1942, - 1943, - 1944, - 1945, - 1946, - 1947, - 1948, - 1949, - 1950, - 1951, - 1952, - 1953, - 1954, - 1955, - 1956, - 1957, - 1958, - 1959, - 1960, - 1961, - 1962, - 1963, - 1964, - 1965, - 1966, - 1967, - 1968, - 1969, - 1970, - 1971, - 1972, - 1973, - 1974, - 1975, - 1976, - 1977, - 1978, - 1979, - 1980, - 1981, - 1982, - 1983, - 1984, - 1985, - 1986, - 1987, - 1988, - 1989, - 1990, - 1991, - 1992, - 1993, - 1994, - 1995, - 1996, - 1997, - 1998, - 1999, - 2000, - 2001, - 2002, - 2003, - 2004, - 2005, - 2006, - 2007, - 2008, - 2009, - 2010, - 2011, - 2012, - 2013, - 2014, - 2015, - 2016, - 2017, - 2018, - 2019, - 2020, - 2021, - 2022, - 2023, - 2024, - 2025, - 2026, - 2027, - 2028, - 2029, - 2030, - 2031, - 2032, - 2033, - 2034, - 2035, - 2036, - 2037, - 2038, - 2039, - 2040, - 2041, - 2042, - 2043, - 2044, - 2045, - 2046, - 2047, - 2048, - 2049, - 2050, - 2051, - 2052, - 2053, - 2054, - 2055, - 2056, - 2057, - 2058, - 2059, - 2060, - 2061, - 2062, - 2063, - 2064, - 2065, - 2066, - 2067, - 2068, - 2069, - 2070, - 2071, - 2072, - 2073, - 2074, - 2075, - 2076, - 2077, - 2078, - 2079, - 2080, - 2081, - 2082, - 2083, - 2084, - 2085, - 2086, - 2087, - 2088, - 2089, - 2090, - 2091, - 2092, - 2093, - 2094, - 2095, - 2096, - 2097, - 2098, - 2099, - 2100, - 2101, - 2102, - 2103, - 2104, - 2105, - 2106, - 2107, - 2108, - 2109, - 2110, - 2111, - 2112, - 2113, - 2114, - 2115, - 2116, - 2117, - 2118, - 2119, - 2120, - 2121, - 2122, - 2123, - 2124, - 2125, - 2126, - 2127, - 2128, - 2129, - 2130, - 2131, - 2132, - 2133, - 2134, - 2135, - 2136, - 2137, - 2138, - 2139, - 2140, - 2141, - 2142, - 2143, - 2144, - 2145, - 2146, - 2147, - 2148, - 2149, - 2150, - 2151, - 2152, - 2153, - 2154, - 2155, - 2156, - 2157, - 2158, - 2159, - 2160, - 2161, - 2162, - 2163, - 2164, - 2165, - 2166, - 2167, - 2168, - 2169, - 2170, - 2171, - 2172, - 2173, - 2174, - 2175, - 2176, - 2177, - 2178, - 2179, - 2180, - 2181, - 2182, - 2183, - 2184, - 2185, - 2186, - 2187, - 2188, - 2189, - 2190, - 2191, - 2192, - 2193, - 2194, - 2195, - 2196, - 2197, - 2198, - 2199, - 2200, - 2201, - 2202, - 2203, - 2204, - 2205, - 2206, - 2207, - 2208, - 2209, - 2210, - 2211, - 2212, - 2213, - 2214, - 2215, - 2216, - 2217, - 2218, - 2219, - 2220, - 2221, - 2222, - 2223, - 2224, - 2225, - 2226, - 2227, - 2228, - 2229, - 2230, - 2231, - 2232, - 2233, - 2234, - 2235, - 2236, - 2237, - 2238, - 2239, - 2240, - 2241, - 2242, - 2243, - 2244, - 2245, - 2246, - 2247, - 2248, - 2249, - 2250, - 2251, - 2252, - 2253, - 2254, - 2255, - 2256, - 2257, - 2258, - 2259, - 2260, - 2261, - 2262, - 2263, - 2264, - 2265, - 2266, - 2267, - 2268, - 2269, - 2270, - 2271, - 2272, - 2273, - 2274, - 2275, - 2276, - 2277, - 2278, - 2279, - 2280, - 2281, - 2282, - 2283, - 2284, - 2285, - 2286, - 2287, - 2288, - 2289, - 2290, - 2291, - 2292, - 2293, - 2294, - 2295, - 2296, - 2297, - 2298, - 2299, - 2300, - 2301, - 2302, - 2303, - 2304, - 2305, - 2306, - 2307, - 2308, - 2309, - 2310, - 2311, - 2312, - 2313, - 2314, - 2315, - 2316, - 2317, - 2318, - 2319, - 2320, - 2321, - 2322, - 2323, - 2324, - 2325, - 2326, - 2327, - 2328, - 2329, - 2330, - 2331, - 2332, - 2333, - 2334, - 2335, - 2336, - 2337, - 2338, - 2339, - 2340, - 2341, - 2342, - 2343, - 2344, - 2345, - 2346, - 2347, - 2348, - 2349, - 2350, - 2351, - 2352, - 2353, - 2354, - 2355, - 2356, - 2357, - 2358, - 2359, - 2360, - 2361, - 2362, - 2363, - 2364, - 2365, - 2366, - 2367, - 2368, - 2369, - 2370, - 2371, - 2372, - 2373, - 2374, - 2375, - 2376, - 2377, - 2378, - 2379, - 2380, - 2381, - 2382, - 2383, - 2384, - 2385, - 2386, - 2387, - 2388, - 2389, - 2390, - 2391, - 2392, - 2393, - 2394, - 2395, - 2396, - 2397, - 2398, - 2399, - 2400, - 2401, - 2402, - 2403, - 2404, - 2405, - 2406, - 2407, - 2408, - 2409, - 2410, - 2411, - 2412, - 2413, - 2414, - 2415, - 2416, - 2417, - 2418, - 2419, - 2420, - 2421, - 2422, - 2423, - 2424, - 2425, - 2426, - 2427, - 2428, - 2429, - 2430, - 2431, - 2432, - 2433, - 2434, - 2435, - 2436, - 2437, - 2438, - 2439, - 2440, - 2441, - 2442, - 2443, - 2444, - 2445, - 2446, - 2447, - 2448, - 2449, - 2450, - 2451, - 2452, - 2453, - 2454, - 2455, - 2456, - 2457, - 2458, - 2459, - 2460, - 2461, - 2462, - 2463, - 2464, - 2465, - 2466, - 2467, - 2468, - 2469, - 2470, - 2471, - 2472, - 2473, - 2474, - 2475, - 2476, - 2477, - 2478, - 2479, - 2480, - 2481, - 2482, - 2483, - 2484, - 2485, - 2486, - 2487, - 2488, - 2489, - 2490, - 2491, - 2492, - 2493, - 2494, - 2495, - 2496, - 2497, - 2498, - 2499, - 2500, - 2501, - 2502, - 2503, - 2504, - 2505, - 2506, - 2507, - 2508, - 2509, - 2510, - 2511, - 2512, - 2513, - 2514, - 2515, - 2516, - 2517, - 2518, - 2519, - 2520, - 2521, - 2522, - 2523, - 2524, - 2525, - 2526, - 2527, - 2528, - 2529, - 2530, - 2531, - 2532, - 2533, - 2534, - 2535, - 2536, - 2537, - 2538, - 2539, - 2540, - 2541, - 2542, - 2543, - 2544, - 2545, - 2546, - 2547, - 2548, - 2549, - 2550, - 2551, - 2552, - 2553, - 2554, - 2555, - 2556, - 2557, - 2558, - 2559, - 2560, - 2561, - 2562, - 2563, - 2564, - 2565, - 2566, - 2567, - 2568, - 2569, - 2570, - 2571, - 2572, - 2573, - 2574, - 2575, - 2576, - 2577, - 2578, - 2579, - 2580, - 2581, - 2582, - 2583, - 2584, - 2585, - 2586, - 2587, - 2588, - 2589, - 2590, - 2591, - 2592, - 2593, - 2594, - 2595, - 2596, - 2597, - 2598, - 2599, - 2600, - 2601, - 2602, - 2603, - 2604, - 2605, - 2606, - 2607, - 2608, - 2609, - 2610, - 2611, - 2612, - 2613, - 2614, - 2615, - 2616, - 2617, - 2618, - 2619, - 2620, - 2621, - 2622, - 2623, - 2624, - 2625, - 2626, - 2627, - 2628, - 2629, - 2630, - 2631, - 2632, - 2633, - 2634, - 2635, - 2636, - 2637, - 2638, - 2639, - 2640, - 2641, - 2642, - 2643, - 2644, - 2645, - 2646, - 2647, - 2648, - 2649, - 2650, - 2651, - 2652, - 2653, - 2654, - 2655, - 2656, - 2657, - 2658, - 2659, - 2660, - 2661, - 2662, - 2663, - 2664, - 2665, - 2666, - 2667, - 2668, - 2669, - 2670, - 2671, - 2672, - 2673, - 2674, - 2675, - 2676, - 2677, - 2678, - 2679, - 2680, - 2681, - 2682, - 2683, - 2684, - 2685, - 2686, - 2687, - 2688, - 2689, - 2690, - 2691, - 2692, - 2693, - 2694, - 2695, - 2696, - 2697, - 2698, - 2699, - 2700, - 2701, - 2702, - 2703, - 2704, - 2705, - 2706, - 2707, - 2708, - 2709, - 2710, - 2711, - 2712, - 2713, - 2714, - 2715, - 2716, - 2717, - 2718, - 2719, - 2720, - 2721, - 2722, - 2723, - 2724, - 2725, - 2726, - 2727, - 2728, - 2729, - 2730, - 2731, - 2732, - 2733, - 2734, - 2735, - 2736, - 2737, - 2738, - 2739, - 2740, - 2741, - 2742, - 2743, - 2744, - 2745, - 2746, - 2747, - 2748, - 2749, - 2750, - 2751, - 2752, - 2753, - 2754, - 2755, - 2756, - 2757, - 2758, - 2759, - 2760, - 2761, - 2762, - 2763, - 2764, - 2765, - 2766, - 2767, - 2768, - 2769, - 2770, - 2771, - 2772, - 2773, - 2774, - 2775, - 2776, - 2777, - 2778, - 2779, - 2780, - 2781, - 2782, - 2783, - 2784, - 2785, - 2786, - 2787, - 2788, - 2789, - 2790, - 2791, - 2792, - 2793, - 2794, - 2795, - 2796, - 2797, - 2798, - 2799, - 2800, - 2801, - 2802, - 2803, - 2804, - 2805, - 2806, - 2807, - 2808, - 2809, - 2810, - 2811, - 2812, - 2813, - 2814, - 2815, - 2816, - 2817, - 2818, - 2819, - 2820, - 2821, - 2822, - 2823, - 2824, - 2825, - 2826, - 2827, - 2828, - 2829, - 2830, - 2831, - 2832, - 2833, - 2834, - 2835, - 2836, - 2837, - 2838, - 2839, - 2840, - 2841, - 2842, - 2843, - 2844, - 2845, - 2846, - 2847, - 2848, - 2849, - 2850, - 2851, - 2852, - 2853, - 2854, - 2855, - 2856, - 2857, - 2858, - 2859, - 2860, - 2861, - 2862, - 2863, - 2864, - 2865, - 2866, - 2867, - 2868, - 2869, - 2870, - 2871, - 2872, - 2873, - 2874, - 2875, - 2876, - 2877, - 2878, - 2879, - 2880, - 2881, - 2882, - 2883, - 2884, - 2885, - 2886, - 2887, - 2888, - 2889, - 2890, - 2891, - 2892, - 2893, - 2894, - 2895, - 2896, - 2897, - 2898, - 2899, - 2900, - 2901, - 2902, - 2903, - 2904, - 2905, - 2906, - 2907, - 2908, - 2909, - 2910, - 2911, - 2912, - 2913, - 2914, - 2915, - 2916, - 2917, - 2918, - 2919, - 2920, - 2921, - 2922, - 2923, - 2924, - 2925, - 2926, - 2927, - 2928, - 2929, - 2930, - 2931, - 2932, - 2933, - 2934, - 2935, - 2936, - 2937, - 2938, - 2939, - 2940, - 2941, - 2942, - 2943, - 2944, - 2945, - 2946, - 2947, - 2948, - 2949, - 2950, - 2951, - 2952, - 2953, - 2954, - 2955, - 2956, - 2957, - 2958, - 2959, - 2960, - 2961, - 2962, - 2963, - 2964, - 2965, - 2966, - 2967, - 2968, - 2969, - 2970, - 2971, - 2972, - 2973, - 2974, - 2975, - 2976, - 2977, - 2978, - 2979, - 2980, - 2981, - 2982, - 2983, - 2984, - 2985, - 2986, - 2987, - 2988, - 2989, - 2990, - 2991, - 2992, - 2993, - 2994, - 2995, - 2996, - 2997, - 2998, - 2999, - 3000, - 3001, - 3002, - 3003, - 3004, - 3005, - 3006, - 3007, - 3008, - 3009, - 3010, - 3011, - 3012, - 3013, - 3014, - 3015, - 3016, - 3017, - 3018, - 3019, - 3020, - 3021, - 3022, - 3023, - 3024, - 3025, - 3026, - 3027, - 3028, - 3029, - 3030, - 3031, - 3032, - 3033, - 3034, - 3035, - 3036, - 3037, - 3038, - 3039, - 3040, - 3041, - 3042, - 3043, - 3044, - 3045, - 3046, - 3047, - 3048, - 3049, - 3050, - 3051, - 3052, - 3053, - 3054, - 3055, - 3056, - 3057, - 3058, - 3059, - 3060, - 3061, - 3062, - 3063, - 3064, - 3065, - 3066, - 3067, - 3068, - 3069, - 3070, - 3071, - 3072, - 3073, - 3074, - 3075, - 3076, - 3077, - 3078, - 3079, - 3080, - 3081, - 3082, - 3083, - 3084, - 3085, - 3086, - 3087, - 3088, - 3089, - 3090, - 3091, - 3092, - 3093, - 3094, - 3095, - 3096, - 3097, - 3098, - 3099, - 3100, - 3101, - 3102, - 3103, - 3104, - 3105, - 3106, - 3107, - 3108, - 3109, - 3110, - 3111, - 3112, - 3113, - 3114, - 3115, - 3116, - 3117, - 3118, - 3119, - 3120, - 3121, - 3122, - 3123, - 3124, - 3125, - 3126, - 3127, - 3128, - 3129, - 3130, - 3131, - 3132, - 3133, - 3134, - 3135, - 3136, - 3137, - 3138, - 3139, - 3140, - 3141, - 3142, - 3143, - 3144, - 3145, - 3146, - 3147, - 3148, - 3149, - 3150, - 3151, - 3152, - 3153, - 3154, - 3155, - 3156, - 3157, - 3158, - 3159, - 3160, - 3161, - 3162, - 3163, - 3164, - 3165, - 3166, - 3167, - 3168, - 3169, - 3170, - 3171, - 3172, - 3173, - 3174, - 3175, - 3176, - 3177, - 3178, - 3179, - 3180, - 3181, - 3182, - 3183, - 3184, - 3185, - 3186, - 3187, - 3188, - 3189, - 3190, - 3191, - 3192, - 3193, - 3194, - 3195, - 3196, - 3197, - 3198, - 3199, - 3200, - 3201, - 3202, - 3203, - 3204, - 3205, - 3206, - 3207, - 3208, - 3209, - 3210, - 3211, - 3212, - 3213, - 3214, - 3215, - 3216, - 3217, - 3218, - 3219, - 3220, - 3221, - 3222, - 3223, - 3224, - 3225, - 3226, - 3227, - 3228, - 3229, - 3230, - 3231, - 3232, - 3233, - 3234, - 3235, - 3236, - 3237, - 3238, - 3239, - 3240, - 3241, - 3242, - 3243, - 3244, - 3245, - 3246, - 3247, - 3248, - 3249, - 3250, - 3251, - 3252, - 3253, - 3254, - 3255, - 3256, - 3257, - 3258, - 3259, - 3260, - 3261, - 3262, - 3263, - 3264, - 3265, - 3266, - 3267, - 3268, - 3269, - 3270, - 3271, - 3272, - 3273, - 3274, - 3275, - 3276, - 3277, - 3278, - 3279, - 3280, - 3281, - 3282, - 3283, - 3284, - 3285, - 3286, - 3287, - 3288, - 3289, - 3290, - 3291, - 3292, - 3293, - 3294, - 3295, - 3296, - 3297, - 3298, - 3299, - 3300, - 3301, - 3302, - 3303, - 3304, - 3305, - 3306, - 3307, - 3308, - 3309, - 3310, - 3311, - 3312, - 3313, - 3314, - 3315, - 3316, - 3317, - 3318, - 3319, - 3320, - 3321, - 3322, - 3323, - 3324, - 3325, - 3326, - 3327, - 3328, - 3329, - 3330, - 3331, - 3332, - 3333, - 3334, - 3335, - 3336, - 3337, - 3338, - 3339, - 3340, - 3341, - 3342, - 3343, - 3344, - 3345, - 3346, - 3347, - 3348, - 3349, - 3350, - 3351, - 3352, - 3353, - 3354, - 3355, - 3356, - 3357, - 3358, - 3359, - 3360, - 3361, - 3362, - 3363, - 3364, - 3365, - 3366, - 3367, - 3368, - 3369, - 3370, - 3371, - 3372, - 3373, - 3374, - 3375, - 3376, - 3377, - 3378, - 3379, - 3380, - 3381, - 3382, - 3383, - 3384, - 3385, - 3386, - 3387, - 3388, - 3389, - 3390, - 3391, - 3392, - 3393, - 3394, - 3395, - 3396, - 3397, - 3398, - 3399, - 3400, - 3401, - 3402, - 3403, - 3404, - 3405, - 3406, - 3407, - 3408, - 3409, - 3410, - 3411, - 3412, - 3413, - 3414, - 3415, - 3416, - 3417, - 3418, - 3419, - 3420, - 3421, - 3422, - 3423, - 3424, - 3425, - 3426, - 3427, - 3428, - 3429, - 3430, - 3431, - 3432, - 3433, - 3434, - 3435, - 3436, - 3437, - 3438, - 3439, - 3440, - 3441, - 3442, - 3443, - 3444, - 3445, - 3446, - 3447, - 3448, - 3449, - 3450, - 3451, - 3452, - 3453, - 3454, - 3455, - 3456, - 3457, - 3458, - 3459, - 3460, - 3461, - 3462, - 3463, - 3464, - 3465, - 3466, - 3467, - 3468, - 3469, - 3470, - 3471, - 3472, - 3473, - 3474, - 3475, - 3476, - 3477, - 3478, - 3479, - 3480, - 3481, - 3482, - 3483, - 3484, - 3485, - 3486, - 3487, - 3488, - 3489, - 3490, - 3491, - 3492, - 3493, - 3494, - 3495, - 3496, - 3497, - 3498, - 3499, - 3500, - 3501, - 3502, - 3503, - 3504, - 3505, - 3506, - 3507, - 3508, - 3509, - 3510, - 3511, - 3512, - 3513, - 3514, - 3515, - 3516, - 3517, - 3518, - 3519, - 3520, - 3521, - 3522, - 3523, - 3524, - 3525, - 3526, - 3527, - 3528, - 3529, - 3530, - 3531, - 3532, - 3533, - 3534, - 3535, - 3536, - 3537, - 3538, - 3539, - 3540, - 3541, - 3542, - 3543, - 3544, - 3545, - 3546, - 3547, - 3548, - 3549, - 3550, - 3551, - 3552, - 3553, - 3554, - 3555, - 3556, - 3557, - 3558, - 3559, - 3560, - 3561, - 3562, - 3563, - 3564, - 3565, - 3566, - 3567, - 3568, - 3569, - 3570, - 3571, - 3572, - 3573, - 3574, - 3575, - 3576, - 3577, - 3578, - 3579, - 3580, - 3581, - 3582, - 3583, - 3584, - 3585, - 3586, - 3587, - 3588, - 3589, - 3590, - 3591, - 3592, - 3593, - 3594, - 3595, - 3596, - 3597, - 3598, - 3599, - 3600, - 3601, - 3602, - 3603, - 3604, - 3605, - 3606, - 3607, - 3608, - 3609, - 3610, - 3611, - 3612, - 3613, - 3614, - 3615, - 3616, - 3617, - 3618, - 3619, - 3620, - 3621, - 3622, - 3623, - 3624, - 3625, - 3626, - 3627, - 3628, - 3629, - 3630, - 3631, - 3632, - 3633, - 3634, - 3635, - 3636, - 3637, - 3638, - 3639, - 3640, - 3641, - 3642, - 3643, - 3644, - 3645, - 3646, - 3647, - 3648, - 3649, - 3650, - 3651, - 3652, - 3653, - 3654, - 3655, - 3656, - 3657, - 3658, - 3659, - 3660, - 3661, - 3662, - 3663, - 3664, - 3665, - 3666, - 3667, - 3668, - 3669, - 3670, - 3671, - 3672, - 3673, - 3674, - 3675, - 3676, - 3677, - 3678, - 3679, - 3680, - 3681, - 3682, - 3683, - 3684, - 3685, - 3686, - 3687, - 3688, - 3689, - 3690, - 3691, - 3692, - 3693, - 3694, - 3695, - 3696, - 3697, - 3698, - 3699, - 3700, - 3701, - 3702, - 3703, - 3704, - 3705, - 3706, - 3707, - 3708, - 3709, - 3710, - 3711, - 3712, - 3713, - 3714, - 3715, - 3716, - 3717, - 3718, - 3719, - 3720, - 3721, - 3722, - 3723, - 3724, - 3725, - 3726, - 3727, - 3728, - 3729, - 3730, - 3731, - 3732, - 3733, - 3734, - 3735, - 3736, - 3737, - 3738, - 3739, - 3740, - 3741, - 3742, - 3743, - 3744, - 3745, - 3746, - 3747, - 3748, - 3749, - 3750, - 3751, - 3752, - 3753, - 3754, - 3755, - 3756, - 3757, - 3758, - 3759, - 3760, - 3761, - 3762, - 3763, - 3764, - 3765, - 3766, - 3767, - 3768, - 3769, - 3770, - 3771, - 3772, - 3773, - 3774, - 3775, - 3776, - 3777, - 3778, - 3779, - 3780, - 3781, - 3782, - 3783, - 3784, - 3785, - 3786, - 3787, - 3788, - 3789, - 3790, - 3791, - 3792, - 3793, - 3794, - 3795, - 3796, - 3797, - 3798, - 3799, - 3800, - 3801, - 3802, - 3803, - 3804, - 3805, - 3806, - 3807, - 3808, - 3809, - 3810, - 3811, - 3812, - 3813, - 3814, - 3815, - 3816, - 3817, - 3818, - 3819, - 3820, - 3821, - 3822, - 3823, - 3824, - 3825, - 3826, - 3827, - 3828, - 3829, - 3830, - 3831, - 3832, - 3833, - 3834, - 3835, - 3836, - 3837, - 3838, - 3839, - 3840, - 3841, - 3842, - 3843, - 3844, - 3845, - 3846, - 3847, - 3848, - 3849, - 3850, - 3851, - 3852, - 3853, - 3854, - 3855, - 3856, - 3857, - 3858, - 3859, - 3860, - 3861, - 3862, - 3863, - 3864, - 3865, - 3866, - 3867, - 3868, - 3869, - 3870, - 3871, - 3872, - 3873, - 3874, - 3875, - 3876, - 3877, - 3878, - 3879, - 3880, - 3881, - 3882, - 3883, - 3884, - 3885, - 3886, - 3887, - 3888, - 3889, - 3890, - 3891, - 3892, - 3893, - 3894, - 3895, - 3896, - 3897, - 3898, - 3899, - 3900, - 3901, - 3902, - 3903, - 3904, - 3905, - 3906, - 3907, - 3908, - 3909, - 3910, - 3911, - 3912, - 3913, - 3914, - 3915, - 3916, - 3917, - 3918, - 3919, - 3920, - 3921, - 3922, - 3923, - 3924, - 3925, - 3926, - 3927, - 3928, - 3929, - 3930, - 3931, - 3932, - 3933, - 3934, - 3935, - 3936, - 3937, - 3938, - 3939, - 3940, - 3941, - 3942, - 3943, - 3944, - 3945, - 3946, - 3947, - 3948, - 3949, - 3950, - 3951, - 3952, - 3953, - 3954, - 3955, - 3956, - 3957, - 3958, - 3959, - 3960, - 3961, - 3962, - 3963, - 3964, - 3965, - 3966, - 3967, - 3968, - 3969, - 3970, - 3971, - 3972, - 3973, - 3974, - 3975, - 3976, - 3977, - 3978, - 3979, - 3980, - 3981, - 3982, - 3983, - 3984, - 3985, - 3986, - 3987, - 3988, - 3989, - 3990, - 3991, - 3992, - 3993, - 3994, - 3995, - 3996, - 3997, - 3998, - 3999, - 4000, - 4001, - 4002, - 4003, - 4004, - 4005, - 4006, - 4007, - 4008, - 4009, - 4010, - 4011, - 4012, - 4013, - 4014, - 4015, - 4016, - 4017, - 4018, - 4019, - 4020, - 4021, - 4022, - 4023, - 4024, - 4025, - 4026, - 4027, - 4028, - 4029, - 4030, - 4031, - 4032, - 4033, - 4034, - 4035, - 4036, - 4037, - 4038, - 4039, - 4040, - 4041, - 4042, - 4043, - 4044, - 4045, - 4046, - 4047, - 4048, - 4049, - 4050, - 4051, - 4052, - 4053, - 4054, - 4055, - 4056, - 4057, - 4058, - 4059, - 4060, - 4061, - 4062, - 4063, - 4064, - 4065, - 4066, - 4067, - 4068, - 4069, - 4070, - 4071, - 4072, - 4073, - 4074, - 4075, - 4076, - 4077, - 4078, - 4079, - 4080, - 4081, - 4082, - 4083, - 4084, - 4085, - 4086, - 4087, - 4088, - 4089, - 4090, - 4091, - 4092, - 4093, - 4094, - 4095, - 4096, - 4097, - 4098, - 4099, - 4100, - 4101, - 4102, - 4103, - 4104, - 4105, - 4106, - 4107, - 4108, - 4109, - 4110, - 4111, - 4112, - 4113, - 4114, - 4115, - 4116, - 4117, - 4118, - 4119, - 4120, - 4121, - 4122, - 4123, - 4124, - 4125, - 4126, - 4127, - 4128, - 4129, - 4130, - 4131, - 4132, - 4133, - 4134, - 4135, - 4136, - 4137, - 4138, - 4139, - 4140, - 4141, - 4142, - 4143, - 4144, - 4145, - 4146, - 4147, - 4148, - 4149, - 4150, - 4151, - 4152, - 4153, - 4154, - 4155, - 4156, - 4157, - 4158, - 4159, - 4160, - 4161, - 4162, - 4163, - 4164, - 4165, - 4166, - 4167, - 4168, - 4169, - 4170, - 4171, - 4172, - 4173, - 4174, - 4175, - 4176, - 4177, - 4178, - 4179, - 4180, - 4181, - 4182, - 4183, - 4184, - 4185, - 4186, - 4187, - 4188, - 4189, - 4190, - 4191, - 4192, - 4193, - 4194, - 4195, - 4196, - 4197, - 4198, - 4199, - 4200, - 4201, - 4202, - 4203, - 4204, - 4205, - 4206, - 4207, - 4208, - 4209, - 4210, - 4211, - 4212, - 4213, - 4214, - 4215, - 4216, - 4217, - 4218, - 4219, - 4220, - 4221, - 4222, - 4223, - 4224, - 4225, - 4226, - 4227, - 4228, - 4229, - 4230, - 4231, - 4232, - 4233, - 4234, - 4235, - 4236, - 4237, - 4238, - 4239, - 4240, - 4241, - 4242, - 4243, - 4244, - 4245, - 4246, - 4247, - 4248, - 4249, - 4250, - 4251, - 4252, - 4253, - 4254, - 4255, - 4256, - 4257, - 4258, - 4259, - 4260, - 4261, - 4262, - 4263, - 4264, - 4265, - 4266, - 4267, - 4268, - 4269, - 4270, - 4271, - 4272, - 4273, - 4274, - 4275, - 4276, - 4277, - 4278, - 4279, - 4280, - 4281, - 4282, - 4283, - 4284, - 4285, - 4286, - 4287, - 4288, - 4289, - 4290, - 4291, - 4292, - 4293, - 4294, - 4295, - 4296, - 4297, - 4298, - 4299, - 4300, - 4301, - 4302, - 4303, - 4304, - 4305, - 4306, - 4307, - 4308, - 4309, - 4310, - 4311, - 4312, - 4313, - 4314, - 4315, - 4316, - 4317, - 4318, - 4319, - 4320, - 4321, - 4322, - 4323, - 4324, - 4325, - 4326, - 4327, - 4328, - 4329, - 4330, - 4331, - 4332, - 4333, - 4334, - 4335, - 4336, - 4337, - 4338, - 4339, - 4340, - 4341, - 4342, - 4343, - 4344, - 4345, - 4346, - 4347, - 4348, - 4349, - 4350, - 4351, - 4352, - 4353, - 4354, - 4355, - 4356, - 4357, - 4358, - 4359, - 4360, - 4361, - 4362, - 4363, - 4364, - 4365, - 4366, - 4367, - 4368, - 4369, - 4370, - 4371, - 4372, - 4373, - 4374, - 4375, - 4376, - 4377, - 4378, - 4379, - 4380, - 4381, - 4382, - 4383, - 4384, - 4385, - 4386, - 4387, - 4388, - 4389, - 4390, - 4391, - 4392, - 4393, - 4394, - 4395, - 4396, - 4397, - 4398, - 4399, - 4400, - 4401, - 4402, - 4403, - 4404, - 4405, - 4406, - 4407, - 4408, - 4409, - 4410, - 4411, - 4412, - 4413, - 4414, - 4415, - 4416, - 4417, - 4418, - 4419, - 4420, - 4421, - 4422, - 4423, - 4424, - 4425, - 4426, - 4427, - 4428, - 4429, - 4430, - 4431, - 4432, - 4433, - 4434, - 4435, - 4436, - 4437, - 4438, - 4439, - 4440, - 4441, - 4442, - 4443, - 4444, - 4445, - 4446, - 4447, - 4448, - 4449, - 4450, - 4451, - 4452, - 4453, - 4454, - 4455, - 4456, - 4457, - 4458, - 4459, - 4460, - 4461, - 4462, - 4463, - 4464, - 4465, - 4466, - 4467, - 4468, - 4469, - 4470, - 4471, - 4472, - 4473, - 4474, - 4475, - 4476, - 4477, - 4478, - 4479, - 4480, - 4481, - 4482, - 4483, - 4484, - 4485, - 4486, - 4487, - 4488, - 4489, - 4490, - 4491, - 4492, - 4493, - 4494, - 4495, - 4496, - 4497, - 4498, - 4499, - 4500, - 4501, - 4502, - 4503, - 4504, - 4505, - 4506, - 4507, - 4508, - 4509, - 4510, - 4511, - 4512, - 4513, - 4514, - 4515, - 4516, - 4517, - 4518, - 4519, - 4520, - 4521, - 4522, - 4523, - 4524, - 4525, - 4526, - 4527, - 4528, - 4529, - 4530, - 4531, - 4532, - 4533, - 4534, - 4535, - 4536, - 4537, - 4538, - 4539, - 4540, - 4541, - 4542, - 4543, - 4544, - 4545, - 4546, - 4547, - 4548, - 4549, - 4550, - 4551, - 4552, - 4553, - 4554, - 4555, - 4556, - 4557, - 4558, - 4559, - 4560, - 4561, - 4562, - 4563, - 4564, - 4565, - 4566, - 4567, - 4568, - 4569, - 4570, - 4571, - 4572, - 4573, - 4574, - 4575, - 4576, - 4577, - 4578, - 4579, - 4580, - 4581, - 4582, - 4583, - 4584, - 4585, - 4586, - 4587, - 4588, - 4589, - 4590, - 4591, - 4592, - 4593, - 4594, - 4595, - 4596, - 4597, - 4598, - 4599, - 4600, - 4601, - 4602, - 4603, - 4604, - 4605, - 4606, - 4607, - 4608, - 4609, - 4610, - 4611, - 4612, - 4613, - 4614, - 4615, - 4616, - 4617, - 4618, - 4619, - 4620, - 4621, - 4622, - 4623, - 4624, - 4625, - 4626, - 4627, - 4628, - 4629, - 4630, - 4631, - 4632, - 4633, - 4634, - 4635, - 4636, - 4637, - 4638, - 4639, - 4640, - 4641, - 4642, - 4643, - 4644, - 4645, - 4646, - 4647, - 4648, - 4649, - 4650, - 4651, - 4652, - 4653, - 4654, - 4655, - 4656, - 4657, - 4658, - 4659, - 4660, - 4661, - 4662, - 4663, - 4664, - 4665, - 4666, - 4667, - 4668, - 4669, - 4670, - 4671, - 4672, - 4673, - 4674, - 4675, - 4676, - 4677, - 4678, - 4679, - 4680, - 4681, - 4682, - 4683, - 4684, - 4685, - 4686, - 4687, - 4688, - 4689, - 4690, - 4691, - 4692, - 4693, - 4694, - 4695, - 4696, - 4697, - 4698, - 4699, - 4700, - 4701, - 4702, - 4703, - 4704, - 4705, - 4706, - 4707, - 4708, - 4709, - 4710, - 4711, - 4712, - 4713, - 4714, - 4715, - 4716, - 4717, - 4718, - 4719, - 4720, - 4721, - 4722, - 4723, - 4724, - 4725, - 4726, - 4727, - 4728, - 4729, - 4730, - 4731, - 4732, - 4733, - 4734, - 4735, - 4736, - 4737, - 4738, - 4739, - 4740, - 4741, - 4742, - 4743, - 4744, - 4745, - 4746, - 4747, - 4748, - 4749, - 4750, - 4751, - 4752, - 4753, - 4754, - 4755, - 4756, - 4757, - 4758, - 4759, - 4760, - 4761, - 4762, - 4763, - 4764, - 4765, - 4766, - 4767, - 4768, - 4769, - 4770, - 4771, - 4772, - 4773, - 4774, - 4775, - 4776, - 4777, - 4778, - 4779, - 4780, - 4781, - 4782, - 4783, - 4784, - 4785, - 4786, - 4787, - 4788, - 4789, - 4790, - 4791, - 4792, - 4793, - 4794, - 4795, - 4796, - 4797, - 4798, - 4799, - 4800, - 4801, - 4802, - 4803, - 4804, - 4805, - 4806, - 4807, - 4808, - 4809, - 4810, - 4811, - 4812, - 4813, - 4814, - 4815, - 4816, - 4817, - 4818, - 4819, - 4820, - 4821, - 4822, - 4823, - 4824, - 4825, - 4826, - 4827, - 4828, - 4829, - 4830, - 4831, - 4832, - 4833, - 4834, - 4835, - 4836, - 4837, - 4838, - 4839, - 4840, - 4841, - 4842, - 4843, - 4844, - 4845, - 4846, - 4847, - 4848, - 4849, - 4850, - 4851, - 4852, - 4853, - 4854, - 4855, - 4856, - 4857, - 4858, - 4859, - 4860, - 4861, - 4862, - 4863, - 4864, - 4865, - 4866, - 4867, - 4868, - 4869, - 4870, - 4871, - 4872, - 4873, - 4874, - 4875, - 4876, - 4877, - 4878, - 4879, - 4880, - 4881, - 4882, - 4883, - 4884, - 4885, - 4886, - 4887, - 4888, - 4889, - 4890, - 4891, - 4892, - 4893, - 4894, - 4895, - 4896, - 4897, - 4898, - 4899, - 4900, - 4901, - 4902, - 4903, - 4904, - 4905, - 4906, - 4907, - 4908, - 4909, - 4910, - 4911, - 4912, - 4913, - 4914, - 4915, - 4916, - 4917, - 4918, - 4919, - 4920, - 4921, - 4922, - 4923, - 4924, - 4925, - 4926, - 4927, - 4928, - 4929, - 4930, - 4931, - 4932, - 4933, - 4934, - 4935, - 4936, - 4937, - 4938, - 4939, - 4940, - 4941, - 4942, - 4943, - 4944, - 4945, - 4946, - 4947, - 4948, - 4949, - 4950, - 4951, - 4952, - 4953, - 4954, - 4955, - 4956, - 4957, - 4958, - 4959, - 4960, - 4961, - 4962, - 4963, - 4964, - 4965, - 4966, - 4967, - 4968, - 4969, - 4970, - 4971, - 4972, - 4973, - 4974, - 4975, - 4976, - 4977, - 4978, - 4979, - 4980, - 4981, - 4982, - 4983, - 4984, - 4985, - 4986, - 4987, - 4988, - 4989, - 4990, - 4991, - 4992, - 4993, - 4994, - 4995, - 4996, - 4997, - 4998, - 4999, - 5000, - 5001, - 5002, - 5003, - 5004, - 5005, - 5006, - 5007, - 5008, - 5009, - 5010, - 5011, - 5012, - 5013, - 5014, - 5015, - 5016, - 5017, - 5018, - 5019, - 5020, - 5021, - 5022, - 5023, - 5024, - 5025, - 5026, - 5027, - 5028, - 5029, - 5030, - 5031, - 5032, - 5033, - 5034, - 5035, - 5036, - 5037, - 5038, - 5039, - 5040, - 5041, - 5042, - 5043, - 5044, - 5045, - 5046, - 5047, - 5048, - 5049, - 5050, - 5051, - 5052, - 5053, - 5054, - 5055, - 5056, - 5057, - 5058, - 5059, - 5060, - 5061, - 5062, - 5063, - 5064, - 5065, - 5066, - 5067, - 5068, - 5069, - 5070, - 5071, - 5072, - 5073, - 5074, - 5075, - 5076, - 5077, - 5078, - 5079, - 5080, - 5081, - 5082, - 5083, - 5084, - 5085, - 5086, - 5087, - 5088, - 5089, - 5090, - 5091, - 5092, - 5093, - 5094, - 5095, - 5096, - 5097, - 5098, - 5099, - 5100, - 5101, - 5102, - 5103, - 5104, - 5105, - 5106, - 5107, - 5108, - 5109, - 5110, - 5111, - 5112, - 5113, - 5114, - 5115, - 5116, - 5117, - 5118, - 5119, - 5120, - 5121, - 5122, - 5123, - 5124, - 5125, - 5126, - 5127, - 5128, - 5129, - 5130, - 5131, - 5132, - 5133, - 5134, - 5135, - 5136, - 5137, - 5138, - 5139, - 5140, - 5141, - 5142, - 5143, - 5144, - 5145, - 5146, - 5147, - 5148, - 5149, - 5150, - 5151, - 5152, - 5153, - 5154, - 5155, - 5156, - 5157, - 5158, - 5159, - 5160, - 5161, - 5162, - 5163, - 5164, - 5165, - 5166, - 5167, - 5168, - 5169, - 5170, - 5171, - 5172, - 5173, - 5174, - 5175, - 5176, - 5177, - 5178, - 5179, - 5180, - 5181, - 5182, - 5183, - 5184, - 5185, - 5186, - 5187, - 5188, - 5189, - 5190, - 5191, - 5192, - 5193, - 5194, - 5195, - 5196, - 5197, - 5198, - 5199, - 5200, - 5201, - 5202, - 5203, - 5204, - 5205, - 5206, - 5207, - 5208, - 5209, - 5210, - 5211, - 5212, - 5213, - 5214, - 5215, - 5216, - 5217, - 5218, - 5219, - 5220, - 5221, - 5222, - 5223, - 5224, - 5225, - 5226, - 5227, - 5228, - 5229, - 5230, - 5231, - 5232, - 5233, - 5234, - 5235, - 5236, - 5237, - 5238, - 5239, - 5240, - 5241, - 5242, - 5243, - 5244, - 5245, - 5246, - 5247, - 5248, - 5249, - 5250, - 5251, - 5252, - 5253, - 5254, - 5255, - 5256, - 5257, - 5258, - 5259, - 5260, - 5261, - 5262, - 5263, - 5264, - 5265, - 5266, - 5267, - 5268, - 5269, - 5270, - 5271, - 5272, - 5273, - 5274, - 5275, - 5276, - 5277, - 5278, - 5279, - 5280, - 5281, - 5282, - 5283, - 5284, - 5285, - 5286, - 5287, - 5288, - 5289, - 5290, - 5291, - 5292, - 5293, - 5294, - 5295, - 5296, - 5297, - 5298, - 5299, - 5300, - 5301, - 5302, - 5303, - 5304, - 5305, - 5306, - 5307, - 5308, - 5309, - 5310, - 5311, - 5312, - 5313, - 5314, - 5315, - 5316, - 5317, - 5318, - 5319, - 5320, - 5321, - 5322, - 5323, - 5324, - 5325, - 5326, - 5327, - 5328, - 5329, - 5330, - 5331, - 5332, - 5333, - 5334, - 5335, - 5336, - 5337, - 5338, - 5339, - 5340, - 5341, - 5342, - 5343, - 5344, - 5345, - 5346, - 5347, - 5348, - 5349, - 5350, - 5351, - 5352, - 5353, - 5354, - 5355, - 5356, - 5357, - 5358, - 5359, - 5360, - 5361, - 5362, - 5363, - 5364, - 5365, - 5366, - 5367, - 5368, - 5369, - 5370, - 5371, - 5372, - 5373, - 5374, - 5375, - 5376, - 5377, - 5378, - 5379, - 5380, - 5381, - 5382, - 5383, - 5384, - 5385, - 5386, - 5387, - 5388, - 5389, - 5390, - 5391, - 5392, - 5393, - 5394, - 5395, - 5396, - 5397, - 5398, - 5399, - 5400, - 5401, - 5402, - 5403, - 5404, - 5405, - 5406, - 5407, - 5408, - 5409, - 5410, - 5411, - 5412, - 5413, - 5414, - 5415, - 5416, - 5417, - 5418, - 5419, - 5420, - 5421, - 5422, - 5423, - 5424, - 5425, - 5426, - 5427, - 5428, - 5429, - 5430, - 5431, - 5432, - 5433, - 5434, - 5435, - 5436, - 5437, - 5438, - 5439, - 5440, - 5441, - 5442, - 5443, - 5444, - 5445, - 5446, - 5447, - 5448, - 5449, - 5450, - 5451, - 5452, - 5453, - 5454, - 5455, - 5456, - 5457, - 5458, - 5459, - 5460, - 5461, - 5462, - 5463, - 5464, - 5465, - 5466, - 5467, - 5468, - 5469, - 5470, - 5471, - 5472, - 5473, - 5474, - 5475, - 5476, - 5477, - 5478, - 5479, - 5480, - 5481, - 5482, - 5483, - 5484, - 5485, - 5486, - 5487, - 5488, - 5489, - 5490, - 5491, - 5492, - 5493, - 5494, - 5495, - 5496, - 5497, - 5498, - 5499, - 5500, - 5501, - 5502, - 5503, - 5504, - 5505, - 5506, - 5507, - 5508, - 5509, - 5510, - 5511, - 5512, - 5513, - 5514, - 5515, - 5516, - 5517, - 5518, - 5519, - 5520, - 5521, - 5522, - 5523, - 5524, - 5525, - 5526, - 5527, - 5528, - 5529, - 5530, - 5531, - 5532, - 5533, - 5534, - 5535, - 5536, - 5537, - 5538, - 5539, - 5540, - 5541, - 5542, - 5543, - 5544, - 5545, - 5546, - 5547, - 5548, - 5549, - 5550, - 5551, - 5552, - 5553, - 5554, - 5555, - 5556, - 5557, - 5558, - 5559, - 5560, - 5561, - 5562, - 5563, - 5564, - 5565, - 5566, - 5567, - 5568, - 5569, - 5570, - 5571, - 5572, - 5573, - 5574, - 5575, - 5576, - 5577, - 5578, - 5579, - 5580, - 5581, - 5582, - 5583, - 5584, - 5585, - 5586, - 5587, - 5588, - 5589, - 5590, - 5591, - 5592, - 5593, - 5594, - 5595, - 5596, - 5597, - 5598, - 5599, - 5600, - 5601, - 5602, - 5603, - 5604, - 5605, - 5606, - 5607, - 5608, - 5609, - 5610, - 5611, - 5612, - 5613, - 5614, - 5615, - 5616, - 5617, - 5618, - 5619, - 5620, - 5621, - 5622, - 5623, - 5624, - 5625, - 5626, - 5627, - 5628, - 5629, - 5630, - 5631, - 5632, - 5633, - 5634, - 5635, - 5636, - 5637, - 5638, - 5639, - 5640, - 5641, - 5642, - 5643, - 5644, - 5645, - 5646, - 5647, - 5648, - 5649, - 5650, - 5651, - 5652, - 5653, - 5654, - 5655, - 5656, - 5657, - 5658, - 5659, - 5660, - 5661, - 5662, - 5663, - 5664, - 5665, - 5666, - 5667, - 5668, - 5669, - 5670, - 5671, - 5672, - 5673, - 5674, - 5675, - 5676, - 5677, - 5678, - 5679, - 5680, - 5681, - 5682, - 5683, - 5684, - 5685, - 5686, - 5687, - 5688, - 5689, - 5690, - 5691, - 5692, - 5693, - 5694, - 5695, - 5696, - 5697, - 5698, - 5699, - 5700, - 5701, - 5702, - 5703, - 5704, - 5705, - 5706, - 5707, - 5708, - 5709, - 5710, - 5711, - 5712, - 5713, - 5714, - 5715, - 5716, - 5717, - 5718, - 5719, - 5720, - 5721, - 5722, - 5723, - 5724, - 5725, - 5726, - 5727, - 5728, - 5729, - 5730, - 5731, - 5732, - 5733, - 5734, - 5735, - 5736, - 5737, - 5738, - 5739, - 5740, - 5741, - 5742, - 5743, - 5744, - 5745, - 5746, - 5747, - 5748, - 5749, - 5750, - 5751, - 5752, - 5753, - 5754, - 5755, - 5756, - 5757, - 5758, - 5759, - 5760, - 5761, - 5762, - 5763, - 5764, - 5765, - 5766, - 5767, - 5768, - 5769, - 5770, - 5771, - 5772, - 5773, - 5774, - 5775, - 5776, - 5777, - 5778, - 5779, - 5780, - 5781, - 5782, - 5783, - 5784, - 5785, - 5786, - 5787, - 5788, - 5789, - 5790, - 5791, - 5792, - 5793, - 5794, - 5795, - 5796, - 5797, - 5798, - 5799, - 5800, - 5801, - 5802, - 5803, - 5804, - 5805, - 5806, - 5807, - 5808, - 5809, - 5810, - 5811, - 5812, - 5813, - 5814, - 5815, - 5816, - 5817, - 5818, - 5819, - 5820, - 5821, - 5822, - 5823, - 5824, - 5825, - 5826, - 5827, - 5828, - 5829, - 5830, - 5831, - 5832, - 5833, - 5834, - 5835, - 5836, - 5837, - 5838, - 5839, - 5840, - 5841, - 5842, - 5843, - 5844, - 5845, - 5846, - 5847, - 5848, - 5849, - 5850, - 5851, - 5852, - 5853, - 5854, - 5855, - 5856, - 5857, - 5858, - 5859, - 5860, - 5861, - 5862, - 5863, - 5864, - 5865, - 5866, - 5867, - 5868, - 5869, - 5870, - 5871, - 5872, - 5873, - 5874, - 5875, - 5876, - 5877, - 5878, - 5879, - 5880, - 5881, - 5882, - 5883, - 5884, - 5885, - 5886, - 5887, - 5888, - 5889, - 5890, - 5891, - 5892, - 5893, - 5894, - 5895, - 5896, - 5897, - 5898, - 5899, - 5900, - 5901, - 5902, - 5903, - 5904, - 5905, - 5906, - 5907, - 5908, - 5909, - 5910, - 5911, - 5912, - 5913, - 5914, - 5915, - 5916, - 5917, - 5918, - 5919, - 5920, - 5921, - 5922, - 5923, - 5924, - 5925, - 5926, - 5927, - 5928, - 5929, - 5930, - 5931, - 5932, - 5933, - 5934, - 5935, - 5936, - 5937, - 5938, - 5939, - 5940, - 5941, - 5942, - 5943, - 5944, - 5945, - 5946, - 5947, - 5948, - 5949, - 5950, - 5951, - 5952, - 5953, - 5954, - 5955, - 5956, - 5957, - 5958, - 5959, - 5960, - 5961, - 5962, - 5963, - 5964, - 5965, - 5966, - 5967, - 5968, - 5969, - 5970, - 5971, - 5972, - 5973, - 5974, - 5975, - 5976, - 5977, - 5978, - 5979, - 5980, - 5981, - 5982, - 5983, - 5984, - 5985, - 5986, - 5987, - 5988, - 5989, - 5990, - 5991, - 5992, - 5993, - 5994, - 5995, - 5996, - 5997, - 5998, - 5999, - 6000, - 6001, - 6002, - 6003, - 6004, - 6005, - 6006, - 6007, - 6008, - 6009, - 6010, - 6011, - 6012, - 6013, - 6014, - 6015, - 6016, - 6017, - 6018, - 6019, - 6020, - 6021, - 6022, - 6023, - 6024, - 6025, - 6026, - 6027, - 6028, - 6029, - 6030, - 6031, - 6032, - 6033, - 6034, - 6035, - 6036, - 6037, - 6038, - 6039, - 6040, - 6041, - 6042, - 6043, - 6044, - 6045, - 6046, - 6047, - 6048, - 6049, - 6050, - 6051, - 6052, - 6053, - 6054, - 6055, - 6056, - 6057, - 6058, - 6059, - 6060, - 6061, - 6062, - 6063, - 6064, - 6065, - 6066, - 6067, - 6068, - 6069, - 6070, - 6071, - 6072, - 6073, - 6074, - 6075, - 6076, - 6077, - 6078, - 6079, - 6080, - 6081, - 6082, - 6083, - 6084, - 6085, - 6086, - 6087, - 6088, - 6089, - 6090, - 6091, - 6092, - 6093, - 6094, - 6095, - 6096, - 6097, - 6098, - 6099, - 6100, - 6101, - 6102, - 6103, - 6104, - 6105, - 6106, - 6107, - 6108, - 6109, - 6110, - 6111, - 6112, - 6113, - 6114, - 6115, - 6116, - 6117, - 6118, - 6119, - 6120, - 6121, - 6122, - 6123, - 6124, - 6125, - 6126, - 6127, - 6128, - 6129, - 6130, - 6131, - 6132, - 6133, - 6134, - 6135, - 6136, - 6137, - 6138, - 6139, - 6140, - 6141, - 6142, - 6143, - 6144, - 6145, - 6146, - 6147, - 6148, - 6149, - 6150, - 6151, - 6152, - 6153, - 6154, - 6155, - 6156, - 6157, - 6158, - 6159, - 6160, - 6161, - 6162, - 6163, - 6164, - 6165, - 6166, - 6167, - 6168, - 6169, - 6170, - 6171, - 6172, - 6173, - 6174, - 6175, - 6176, - 6177, - 6178, - 6179, - 6180, - 6181, - 6182, - 6183, - 6184, - 6185, - 6186, - 6187, - 6188, - 6189, - 6190, - 6191, - 6192, - 6193, - 6194, - 6195, - 6196, - 6197, - 6198, - 6199, - 6200, - 6201, - 6202, - 6203, - 6204, - 6205, - 6206, - 6207, - 6208, - 6209, - 6210, - 6211, - 6212, - 6213, - 6214, - 6215, - 6216, - 6217, - 6218, - 6219, - 6220, - 6221, - 6222, - 6223, - 6224, - 6225, - 6226, - 6227, - 6228, - 6229, - 6230, - 6231, - 6232, - 6233, - 6234, - 6235, - 6236, - 6237, - 6238, - 6239, - 6240, - 6241, - 6242, - 6243, - 6244, - 6245, - 6246, - 6247, - 6248, - 6249, - 6250, - 6251, - 6252, - 6253, - 6254, - 6255, - 6256, - 6257, - 6258, - 6259, - 6260, - 6261, - 6262, - 6263, - 6264, - 6265, - 6266, - 6267, - 6268, - 6269, - 6270, - 6271, - 6272, - 6273, - 6274, - 6275, - 6276, - 6277, - 6278, - 6279, - 6280, - 6281, - 6282, - 6283, - 6284, - 6285, - 6286, - 6287, - 6288, - 6289, - 6290, - 6291, - 6292, - 6293, - 6294, - 6295, - 6296, - 6297, - 6298, - 6299, - 6300, - 6301, - 6302, - 6303, - 6304, - 6305, - 6306, - 6307, - 6308, - 6309, - 6310, - 6311, - 6312, - 6313, - 6314, - 6315, - 6316, - 6317, - 6318, - 6319, - 6320, - 6321, - 6322, - 6323, - 6324, - 6325, - 6326, - 6327, - 6328, - 6329, - 6330, - 6331, - 6332, - 6333, - 6334, - 6335, - 6336, - 6337, - 6338, - 6339, - 6340, - 6341, - 6342, - 6343, - 6344, - 6345, - 6346, - 6347, - 6348, - 6349, - 6350, - 6351, - 6352, - 6353, - 6354, - 6355, - 6356, - 6357, - 6358, - 6359, - 6360, - 6361, - 6362, - 6363, - 6364, - 6365, - 6366, - 6367, - 6368, - 6369, - 6370, - 6371, - 6372, - 6373, - 6374, - 6375, - 6376, - 6377, - 6378, - 6379, - 6380, - 6381, - 6382, - 6383, - 6384, - 6385, - 6386, - 6387, - 6388, - 6389, - 6390, - 6391, - 6392, - 6393, - 6394, - 6395, - 6396, - 6397, - 6398, - 6399, - 6400, - 6401, - 6402, - 6403, - 6404, - 6405, - 6406, - 6407, - 6408, - 6409, - 6410, - 6411, - 6412, - 6413, - 6414, - 6415, - 6416, - 6417, - 6418, - 6419, - 6420, - 6421, - 6422, - 6423, - 6424, - 6425, - 6426, - 6427, - 6428, - 6429, - 6430, - 6431, - 6432, - 6433, - 6434, - 6435, - 6436, - 6437, - 6438, - 6439, - 6440, - 6441, - 6442, - 6443, - 6444, - 6445, - 6446, - 6447, - 6448, - 6449, - 6450, - 6451, - 6452, - 6453, - 6454, - 6455, - 6456, - 6457, - 6458, - 6459, - 6460, - 6461, - 6462, - 6463, - 6464, - 6465, - 6466, - 6467, - 6468, - 6469, - 6470, - 6471, - 6472, - 6473, - 6474, - 6475, - 6476, - 6477, - 6478, - 6479, - 6480, - 6481, - 6482, - 6483, - 6484, - 6485, - 6486, - 6487, - 6488, - 6489, - 6490, - 6491, - 6492, - 6493, - 6494, - 6495, - 6496, - 6497, - 6498, - 6499, - 6500, - 6501, - 6502, - 6503, - 6504, - 6505, - 6506, - 6507, - 6508, - 6509, - 6510, - 6511, - 6512, - 6513, - 6514, - 6515, - 6516, - 6517, - 6518, - 6519, - 6520, - 6521, - 6522, - 6523, - 6524, - 6525, - 6526, - 6527, - 6528, - 6529, - 6530, - 6531, - 6532, - 6533, - 6534, - 6535, - 6536, - 6537, - 6538, - 6539, - 6540, - 6541, - 6542, - 6543, - 6544, - 6545, - 6546, - 6547, - 6548, - 6549, - 6550, - 6551, - 6552, - 6553, - 6554, - 6555, - 6556, - 6557, - 6558, - 6559, - 6560, - 6561, - 6562, - 6563, - 6564, - 6565, - 6566, - 6567, - 6568, - 6569, - 6570, - 6571, - 6572, - 6573, - 6574, - 6575, - 6576, - 6577, - 6578, - 6579, - 6580, - 6581, - 6582, - 6583, - 6584, - 6585, - 6586, - 6587, - 6588, - 6589, - 6590, - 6591, - 6592, - 6593, - 6594, - 6595, - 6596, - 6597, - 6598, - 6599, - 6600, - 6601, - 6602, - 6603, - 6604, - 6605, - 6606, - 6607, - 6608, - 6609, - 6610, - 6611, - 6612, - 6613, - 6614, - 6615, - 6616, - 6617, - 6618, - 6619, - 6620, - 6621, - 6622, - 6623, - 6624, - 6625, - 6626, - 6627, - 6628, - 6629, - 6630, - 6631, - 6632, - 6633, - 6634, - 6635, - 6636, - 6637, - 6638, - 6639, - 6640, - 6641, - 6642, - 6643, - 6644, - 6645, - 6646, - 6647, - 6648, - 6649, - 6650, - 6651, - 6652, - 6653, - 6654, - 6655, - 6656, - 6657, - 6658, - 6659, - 6660, - 6661, - 6662, - 6663, - 6664, - 6665, - 6666, - 6667, - 6668, - 6669, - 6670, - 6671, - 6672, - 6673, - 6674, - 6675, - 6676, - 6677, - 6678, - 6679, - 6680, - 6681, - 6682, - 6683, - 6684, - 6685, - 6686, - 6687, - 6688, - 6689, - 6690, - 6691, - 6692, - 6693, - 6694, - 6695, - 6696, - 6697, - 6698, - 6699, - 6700, - 6701, - 6702, - 6703, - 6704, - 6705, - 6706, - 6707, - 6708, - 6709, - 6710, - 6711, - 6712, - 6713, - 6714, - 6715, - 6716, - 6717, - 6718, - 6719, - 6720, - 6721, - 6722, - 6723, - 6724, - 6725, - 6726, - 6727, - 6728, - 6729, - 6730, - 6731, - 6732, - 6733, - 6734, - 6735, - 6736, - 6737, - 6738, - 6739, - 6740, - 6741, - 6742, - 6743, - 6744, - 6745, - 6746, - 6747, - 6748, - 6749, - 6750, - 6751, - 6752, - 6753, - 6754, - 6755, - 6756, - 6757, - 6758, - 6759, - 6760, - 6761, - 6762, - 6763, - 6764, - 6765, - 6766, - 6767, - 6768, - 6769, - 6770, - 6771, - 6772, - 6773, - 6774, - 6775, - 6776, - 6777, - 6778, - 6779, - 6780, - 6781, - 6782, - 6783, - 6784, - 6785, - 6786, - 6787, - 6788, - 6789, - 6790, - 6791, - 6792, - 6793, - 6794, - 6795, - 6796, - 6797, - 6798, - 6799, - 6800, - 6801, - 6802, - 6803, - 6804, - 6805, - 6806, - 6807, - 6808, - 6809, - 6810, - 6811, - 6812, - 6813, - 6814, - 6815, - 6816, - 6817, - 6818, - 6819, - 6820, - 6821, - 6822, - 6823, - 6824, - 6825, - 6826, - 6827, - 6828, - 6829, - 6830, - 6831, - 6832, - 6833, - 6834, - 6835, - 6836, - 6837, - 6838, - 6839, - 6840, - 6841, - 6842, - 6843, - 6844, - 6845, - 6846, - 6847, - 6848, - 6849, - 6850, - 6851, - 6852, - 6853, - 6854, - 6855, - 6856, - 6857, - 6858, - 6859, - 6860, - 6861, - 6862, - 6863, - 6864, - 6865, - 6866, - 6867, - 6868, - 6869, - 6870, - 6871, - 6872, - 6873, - 6874, - 6875, - 6876, - 6877, - 6878, - 6879, - 6880, - 6881, - 6882, - 6883, - 6884, - 6885, - 6886, - 6887, - 6888, - 6889, - 6890, - 6891, - 6892, - 6893, - 6894, - 6895, - 6896, - 6897, - 6898, - 6899, - 6900, - 6901, - 6902, - 6903, - 6904, - 6905, - 6906, - 6907, - 6908, - 6909, - 6910, - 6911, - 6912, - 6913, - 6914, - 6915, - 6916, - 6917, - 6918, - 6919, - 6920, - 6921, - 6922, - 6923, - 6924, - 6925, - 6926, - 6927, - 6928, - 6929, - 6930, - 6931, - 6932, - 6933, - 6934, - 6935, - 6936, - 6937, - 6938, - 6939, - 6940, - 6941, - 6942, - 6943, - 6944, - 6945, - 6946, - 6947, - 6948, - 6949, - 6950, - 6951, - 6952, - 6953, - 6954, - 6955, - 6956, - 6957, - 6958, - 6959, - 6960, - 6961, - 6962, - 6963, - 6964, - 6965, - 6966, - 6967, - 6968, - 6969, - 6970, - 6971, - 6972, - 6973, - 6974, - 6975, - 6976, - 6977, - 6978, - 6979, - 6980, - 6981, - 6982, - 6983, - 6984, - 6985, - 6986, - 6987, - 6988, - 6989, - 6990, - 6991, - 6992, - 6993, - 6994, - 6995, - 6996, - 6997, - 6998, - 6999, - 7000, - 7001, - 7002, - 7003, - 7004, - 7005, - 7006, - 7007, - 7008, - 7009, - 7010, - 7011, - 7012, - 7013, - 7014, - 7015, - 7016, - 7017, - 7018, - 7019, - 7020, - 7021, - 7022, - 7023, - 7024, - 7025, - 7026, - 7027, - 7028, - 7029, - 7030, - 7031, - 7032, - 7033, - 7034, - 7035, - 7036, - 7037, - 7038, - 7039, - 7040, - 7041, - 7042, - 7043, - 7044, - 7045, - 7046, - 7047, - 7048, - 7049, - 7050, - 7051, - 7052, - 7053, - 7054, - 7055, - 7056, - 7057, - 7058, - 7059, - 7060, - 7061, - 7062, - 7063, - 7064, - 7065, - 7066, - 7067, - 7068, - 7069, - 7070, - 7071, - 7072, - 7073, - 7074, - 7075, - 7076, - 7077, - 7078, - 7079, - 7080, - 7081, - 7082, - 7083, - 7084, - 7085, - 7086, - 7087, - 7088, - 7089, - 7090, - 7091, - 7092, - 7093, - 7094, - 7095, - 7096, - 7097, - 7098, - 7099, - 7100, - 7101, - 7102, - 7103, - 7104, - 7105, - 7106, - 7107, - 7108, - 7109, - 7110, - 7111, - 7112, - 7113, - 7114, - 7115, - 7116, - 7117, - 7118, - 7119, - 7120, - 7121, - 7122, - 7123, - 7124, - 7125, - 7126, - 7127, - 7128, - 7129, - 7130, - 7131, - 7132, - 7133, - 7134, - 7135, - 7136, - 7137, - 7138, - 7139, - 7140, - 7141, - 7142, - 7143, - 7144, - 7145, - 7146, - 7147, - 7148, - 7149, - 7150, - 7151, - 7152, - 7153, - 7154, - 7155, - 7156, - 7157, - 7158, - 7159, - 7160, - 7161, - 7162, - 7163, - 7164, - 7165, - 7166, - 7167, - 7168, - 7169, - 7170, - 7171, - 7172, - 7173, - 7174, - 7175, - 7176, - 7177, - 7178, - 7179, - 7180, - 7181, - 7182, - 7183, - 7184, - 7185, - 7186, - 7187, - 7188, - 7189, - 7190, - 7191, - 7192, - 7193, - 7194, - 7195, - 7196, - 7197, - 7198, - 7199, - 7200, - 7201, - 7202, - 7203, - 7204, - 7205, - 7206, - 7207, - 7208, - 7209, - 7210, - 7211, - 7212, - 7213, - 7214, - 7215, - 7216, - 7217, - 7218, - 7219, - 7220, - 7221, - 7222, - 7223, - 7224, - 7225, - 7226, - 7227, - 7228, - 7229, - 7230, - 7231, - 7232, - 7233, - 7234, - 7235, - 7236, - 7237, - 7238, - 7239, - 7240, - 7241, - 7242, - 7243, - 7244, - 7245, - 7246, - 7247, - 7248, - 7249, - 7250, - 7251, - 7252, - 7253, - 7254, - 7255, - 7256, - 7257, - 7258, - 7259, - 7260, - 7261, - 7262, - 7263, - 7264, - 7265, - 7266, - 7267, - 7268, - 7269, - 7270, - 7271, - 7272, - 7273, - 7274, - 7275, - 7276, - 7277, - 7278, - 7279, - 7280, - 7281, - 7282, - 7283, - 7284, - 7285, - 7286, - 7287, - 7288, - 7289, - 7290, - 7291, - 7292, - 7293, - 7294, - 7295, - 7296, - 7297, - 7298, - 7299, - 7300, - 7301, - 7302, - 7303, - 7304, - 7305, - 7306, - 7307, - 7308, - 7309, - 7310, - 7311, - 7312, - 7313, - 7314, - 7315, - 7316, - 7317, - 7318, - 7319, - 7320, - 7321, - 7322, - 7323, - 7324, - 7325, - 7326, - 7327, - 7328, - 7329, - 7330, - 7331, - 7332, - 7333, - 7334, - 7335, - 7336, - 7337, - 7338, - 7339, - 7340, - 7341, - 7342, - 7343, - 7344, - 7345, - 7346, - 7347, - 7348, - 7349, - 7350, - 7351, - 7352, - 7353, - 7354, - 7355, - 7356, - 7357, - 7358, - 7359, - 7360, - 7361, - 7362, - 7363, - 7364, - 7365, - 7366, - 7367, - 7368, - 7369, - 7370, - 7371, - 7372, - 7373, - 7374, - 7375, - 7376, - 7377, - 7378, - 7379, - 7380, - 7381, - 7382, - 7383, - 7384, - 7385, - 7386, - 7387, - 7388, - 7389, - 7390, - 7391, - 7392, - 7393, - 7394, - 7395, - 7396, - 7397, - 7398, - 7399, - 7400, - 7401, - 7402, - 7403, - 7404, - 7405, - 7406, - 7407, - 7408, - 7409, - 7410, - 7411, - 7412, - 7413, - 7414, - 7415, - 7416, - 7417, - 7418, - 7419, - 7420, - 7421, - 7422, - 7423, - 7424, - 7425, - 7426, - 7427, - 7428, - 7429, - 7430, - 7431, - 7432, - 7433, - 7434, - 7435, - 7436, - 7437, - 7438, - 7439, - 7440, - 7441, - 7442, - 7443, - 7444, - 7445, - 7446, - 7447, - 7448, - 7449, - 7450, - 7451, - 7452, - 7453, - 7454, - 7455, - 7456, - 7457, - 7458, - 7459, - 7460, - 7461, - 7462, - 7463, - 7464, - 7465, - 7466, - 7467, - 7468, - 7469, - 7470, - 7471, - 7472, - 7473, - 7474, - 7475, - 7476, - 7477, - 7478, - 7479, - 7480, - 7481, - 7482, - 7483, - 7484, - 7485, - 7486, - 7487, - 7488, - 7489, - 7490, - 7491, - 7492, - 7493, - 7494, - 7495, - 7496, - 7497, - 7498, - 7499, - 7500, - 7501, - 7502, - 7503, - 7504, - 7505, - 7506, - 7507, - 7508, - 7509, - 7510, - 7511, - 7512, - 7513, - 7514, - 7515, - 7516, - 7517, - 7518, - 7519, - 7520, - 7521, - 7522, - 7523, - 7524, - 7525, - 7526, - 7527, - 7528, - 7529, - 7530, - 7531, - 7532, - 7533, - 7534, - 7535, - 7536, - 7537, - 7538, - 7539, - 7540, - 7541, - 7542, - 7543, - 7544, - 7545, - 7546, - 7547, - 7548, - 7549, - 7550, - 7551, - 7552, - 7553, - 7554, - 7555, - 7556, - 7557, - 7558, - 7559, - 7560, - 7561, - 7562, - 7563, - 7564, - 7565, - 7566, - 7567, - 7568, - 7569, - 7570, - 7571, - 7572, - 7573, - 7574, - 7575, - 7576, - 7577, - 7578, - 7579, - 7580, - 7581, - 7582, - 7583, - 7584, - 7585, - 7586, - 7587, - 7588, - 7589, - 7590, - 7591, - 7592, - 7593, - 7594, - 7595, - 7596, - 7597, - 7598, - 7599, - 7600, - 7601, - 7602, - 7603, - 7604, - 7605, - 7606, - 7607, - 7608, - 7609, - 7610, - 7611, - 7612, - 7613, - 7614, - 7615, - 7616, - 7617, - 7618, - 7619, - 7620, - 7621, - 7622, - 7623, - 7624, - 7625, - 7626, - 7627, - 7628, - 7629, - 7630, - 7631, - 7632, - 7633, - 7634, - 7635, - 7636, - 7637, - 7638, - 7639, - 7640, - 7641, - 7642, - 7643, - 7644, - 7645, - 7646, - 7647, - 7648, - 7649, - 7650, - 7651, - 7652, - 7653, - 7654, - 7655, - 7656, - 7657, - 7658, - 7659, - 7660, - 7661, - 7662, - 7663, - 7664, - 7665, - 7666, - 7667, - 7668, - 7669, - 7670, - 7671, - 7672, - 7673, - 7674, - 7675, - 7676, - 7677, - 7678, - 7679, - 7680, - 7681, - 7682, - 7683, - 7684, - 7685, - 7686, - 7687, - 7688, - 7689, - 7690, - 7691, - 7692, - 7693, - 7694, - 7695, - 7696, - 7697, - 7698, - 7699, - 7700, - 7701, - 7702, - 7703, - 7704, - 7705, - 7706, - 7707, - 7708, - 7709, - 7710, - 7711, - 7712, - 7713, - 7714, - 7715, - 7716, - 7717, - 7718, - 7719, - 7720, - 7721, - 7722, - 7723, - 7724, - 7725, - 7726, - 7727, - 7728, - 7729, - 7730, - 7731, - 7732, - 7733, - 7734, - 7735, - 7736, - 7737, - 7738, - 7739, - 7740, - 7741, - 7742, - 7743, - 7744, - 7745, - 7746, - 7747, - 7748, - 7749, - 7750, - 7751, - 7752, - 7753, - 7754, - 7755, - 7756, - 7757, - 7758, - 7759, - 7760, - 7761, - 7762, - 7763, - 7764, - 7765, - 7766, - 7767, - 7768, - 7769, - 7770, - 7771, - 7772, - 7773, - 7774, - 7775, - 7776, - 7777, - 7778, - 7779, - 7780, - 7781, - 7782, - 7783, - 7784, - 7785, - 7786, - 7787, - 7788, - 7789, - 7790, - 7791, - 7792, - 7793, - 7794, - 7795, - 7796, - 7797, - 7798, - 7799, - 7800, - 7801, - 7802, - 7803, - 7804, - 7805, - 7806, - 7807, - 7808, - 7809, - 7810, - 7811, - 7812, - 7813, - 7814, - 7815, - 7816, - 7817, - 7818, - 7819, - 7820, - 7821, - 7822, - 7823, - 7824, - 7825, - 7826, - 7827, - 7828, - 7829, - 7830, - 7831, - 7832, - 7833, - 7834, - 7835, - 7836, - 7837, - 7838, - 7839, - 7840, - 7841, - 7842, - 7843, - 7844, - 7845, - 7846, - 7847, - 7848, - 7849, - 7850, - 7851, - 7852, - 7853, - 7854, - 7855, - 7856, - 7857, - 7858, - 7859, - 7860, - 7861, - 7862, - 7863, - 7864, - 7865, - 7866, - 7867, - 7868, - 7869, - 7870, - 7871, - 7872, - 7873, - 7874, - 7875, - 7876, - 7877, - 7878, - 7879, - 7880, - 7881, - 7882, - 7883, - 7884, - 7885, - 7886, - 7887, - 7888, - 7889, - 7890, - 7891, - 7892, - 7893, - 7894, - 7895, - 7896, - 7897, - 7898, - 7899, - 7900, - 7901, - 7902, - 7903, - 7904, - 7905, - 7906, - 7907, - 7908, - 7909, - 7910, - 7911, - 7912, - 7913, - 7914, - 7915, - 7916, - 7917, - 7918, - 7919, - 7920, - 7921, - 7922, - 7923, - 7924, - 7925, - 7926, - 7927, - 7928, - 7929, - 7930, - 7931, - 7932, - 7933, - 7934, - 7935, - 7936, - 7937, - 7938, - 7939, - 7940, - 7941, - 7942, - 7943, - 7944, - 7945, - 7946, - 7947, - 7948, - 7949, - 7950, - 7951, - 7952, - 7953, - 7954, - 7955, - 7956, - 7957, - 7958, - 7959, - 7960, - 7961, - 7962, - 7963, - 7964, - 7965, - 7966, - 7967, - 7968, - 7969, - 7970, - 7971, - 7972, - 7973, - 7974, - 7975, - 7976, - 7977, - 7978, - 7979, - 7980, - 7981, - 7982, - 7983, - 7984, - 7985, - 7986, - 7987, - 7988, - 7989, - 7990, - 7991, - 7992, - 7993, - 7994, - 7995, - 7996, - 7997, - 7998, - 7999, - 8000, - 8001, - 8002, - 8003, - 8004, - 8005, - 8006, - 8007, - 8008, - 8009, - 8010, - 8011, - 8012, - 8013, - 8014, - 8015, - 8016, - 8017, - 8018, - 8019, - 8020, - 8021, - 8022, - 8023, - 8024, - 8025, - 8026, - 8027, - 8028, - 8029, - 8030, - 8031, - 8032, - 8033, - 8034, - 8035, - 8036, - 8037, - 8038, - 8039, - 8040, - 8041, - 8042, - 8043, - 8044, - 8045, - 8046, - 8047, - 8048, - 8049, - 8050, - 8051, - 8052, - 8053, - 8054, - 8055, - 8056, - 8057, - 8058, - 8059, - 8060, - 8061, - 8062, - 8063, - 8064, - 8065, - 8066, - 8067, - 8068, - 8069, - 8070, - 8071, - 8072, - 8073, - 8074, - 8075, - 8076, - 8077, - 8078, - 8079, - 8080, - 8081, - 8082, - 8083, - 8084, - 8085, - 8086, - 8087, - 8088, - 8089, - 8090, - 8091, - 8092, - 8093, - 8094, - 8095, - 8096, - 8097, - 8098, - 8099, - 8100, - 8101, - 8102, - 8103, - 8104, - 8105, - 8106, - 8107, - 8108, - 8109, - 8110, - 8111, - 8112, - 8113, - 8114, - 8115, - 8116, - 8117, - 8118, - 8119, - 8120, - 8121, - 8122, - 8123, - 8124, - 8125, - 8126, - 8127, - 8128, - 8129, - 8130, - 8131, - 8132, - 8133, - 8134, - 8135, - 8136, - 8137, - 8138, - 8139, - 8140, - 8141, - 8142, - 8143, - 8144, - 8145, - 8146, - 8147, - 8148, - 8149, - 8150, - 8151, - 8152, - 8153, - 8154, - 8155, - 8156, - 8157, - 8158, - 8159, - 8160, - 8161, - 8162, - 8163, - 8164, - 8165, - 8166, - 8167, - 8168, - 8169, - 8170, - 8171, - 8172, - 8173, - 8174, - 8175, - 8176, - 8177, - 8178, - 8179, - 8180, - 8181, - 8182, - 8183, - 8184, - 8185, - 8186, - 8187, - 8188, - 8189, - 8190, - 8191, - 8192, - 8193, - 8194, - 8195, - 8196, - 8197, - 8198, - 8199, - 8200, - 8201, - 8202, - 8203, - 8204, - 8205, - 8206, - 8207, - 8208, - 8209, - 8210, - 8211, - 8212, - 8213, - 8214, - 8215, - 8216, - 8217, - 8218, - 8219, - 8220, - 8221, - 8222, - 8223, - 8224, - 8225, - 8226, - 8227, - 8228, - 8229, - 8230, - 8231, - 8232, - 8233, - 8234, - 8235, - 8236, - 8237, - 8238, - 8239, - 8240, - 8241, - 8242, - 8243, - 8244, - 8245, - 8246, - 8247, - 8248, - 8249, - 8250, - 8251, - 8252, - 8253, - 8254, - 8255, - 8256, - 8257, - 8258, - 8259, - 8260, - 8261, - 8262, - 8263, - 8264, - 8265, - 8266, - 8267, - 8268, - 8269, - 8270, - 8271, - 8272, - 8273, - 8274, - 8275, - 8276, - 8277, - 8278, - 8279, - 8280, - 8281, - 8282, - 8283, - 8284, - 8285, - 8286, - 8287, - 8288, - 8289, - 8290, - 8291, - 8292, - 8293, - 8294, - 8295, - 8296, - 8297, - 8298, - 8299, - 8300, - 8301, - 8302, - 8303, - 8304, - 8305, - 8306, - 8307, - 8308, - 8309, - 8310, - 8311, - 8312, - 8313, - 8314, - 8315, - 8316, - 8317, - 8318, - 8319, - 8320, - 8321, - 8322, - 8323, - 8324, - 8325, - 8326, - 8327, - 8328, - 8329, - 8330, - 8331, - 8332, - 8333, - 8334, - 8335, - 8336, - 8337, - 8338, - 8339, - 8340, - 8341, - 8342, - 8343, - 8344, - 8345, - 8346, - 8347, - 8348, - 8349, - 8350, - 8351, - 8352, - 8353, - 8354, - 8355, - 8356, - 8357, - 8358, - 8359, - 8360, - 8361, - 8362, - 8363, - 8364, - 8365, - 8366, - 8367, - 8368, - 8369, - 8370, - 8371, - 8372, - 8373, - 8374, - 8375, - 8376, - 8377, - 8378, - 8379, - 8380, - 8381, - 8382, - 8383, - 8384, - 8385, - 8386, - 8387, - 8388, - 8389, - 8390, - 8391, - 8392, - 8393, - 8394, - 8395, - 8396, - 8397, - 8398, - 8399, - 8400, - 8401, - 8402, - 8403, - 8404, - 8405, - 8406, - 8407, - 8408, - 8409, - 8410, - 8411, - 8412, - 8413, - 8414, - 8415, - 8416, - 8417, - 8418, - 8419, - 8420, - 8421, - 8422, - 8423, - 8424, - 8425, - 8426, - 8427, - 8428, - 8429, - 8430, - 8431, - 8432, - 8433, - 8434, - 8435, - 8436, - 8437, - 8438, - 8439, - 8440, - 8441, - 8442, - 8443, - 8444, - 8445, - 8446, - 8447, - 8448, - 8449, - 8450, - 8451, - 8452, - 8453, - 8454, - 8455, - 8456, - 8457, - 8458, - 8459, - 8460, - 8461, - 8462, - 8463, - 8464, - 8465, - 8466, - 8467, - 8468, - 8469, - 8470, - 8471, - 8472, - 8473, - 8474, - 8475, - 8476, - 8477, - 8478, - 8479, - 8480, - 8481, - 8482, - 8483, - 8484, - 8485, - 8486, - 8487, - 8488, - 8489, - 8490, - 8491, - 8492, - 8493, - 8494, - 8495, - 8496, - 8497, - 8498, - 8499, - 8500, - 8501, - 8502, - 8503, - 8504, - 8505, - 8506, - 8507, - 8508, - 8509, - 8510, - 8511, - 8512, - 8513, - 8514, - 8515, - 8516, - 8517, - 8518, - 8519, - 8520, - 8521, - 8522, - 8523, - 8524, - 8525, - 8526, - 8527, - 8528, - 8529, - 8530, - 8531, - 8532, - 8533, - 8534, - 8535, - 8536, - 8537, - 8538, - 8539, - 8540, - 8541, - 8542, - 8543, - 8544, - 8545, - 8546, - 8547, - 8548, - 8549, - 8550, - 8551, - 8552, - 8553, - 8554, - 8555, - 8556, - 8557, - 8558, - 8559, - 8560, - 8561, - 8562, - 8563, - 8564, - 8565, - 8566, - 8567, - 8568, - 8569, - 8570, - 8571, - 8572, - 8573, - 8574, - 8575, - 8576, - 8577, - 8578, - 8579, - 8580, - 8581, - 8582, - 8583, - 8584, - 8585, - 8586, - 8587, - 8588, - 8589, - 8590, - 8591, - 8592, - 8593, - 8594, - 8595, - 8596, - 8597, - 8598, - 8599, - 8600, - 8601, - 8602, - 8603, - 8604, - 8605, - 8606, - 8607, - 8608, - 8609, - 8610, - 8611, - 8612, - 8613, - 8614, - 8615, - 8616, - 8617, - 8618, - 8619, - 8620, - 8621, - 8622, - 8623, - 8624, - 8625, - 8626, - 8627, - 8628, - 8629, - 8630, - 8631, - 8632, - 8633, - 8634, - 8635, - 8636, - 8637, - 8638, - 8639, - 8640, - 8641, - 8642, - 8643, - 8644, - 8645, - 8646, - 8647, - 8648, - 8649, - 8650, - 8651, - 8652, - 8653, - 8654, - 8655, - 8656, - 8657, - 8658, - 8659, - 8660, - 8661, - 8662, - 8663, - 8664, - 8665, - 8666, - 8667, - 8668, - 8669, - 8670, - 8671, - 8672, - 8673, - 8674, - 8675, - 8676, - 8677, - 8678, - 8679, - 8680, - 8681, - 8682, - 8683, - 8684, - 8685, - 8686, - 8687, - 8688, - 8689, - 8690, - 8691, - 8692, - 8693, - 8694, - 8695, - 8696, - 8697, - 8698, - 8699, - 8700, - 8701, - 8702, - 8703, - 8704, - 8705, - 8706, - 8707, - 8708, - 8709, - 8710, - 8711, - 8712, - 8713, - 8714, - 8715, - 8716, - 8717, - 8718, - 8719, - 8720, - 8721, - 8722, - 8723, - 8724, - 8725, - 8726, - 8727, - 8728, - 8729, - 8730, - 8731, - 8732, - 8733, - 8734, - 8735, - 8736, - 8737, - 8738, - 8739, - 8740, - 8741, - 8742, - 8743, - 8744, - 8745, - 8746, - 8747, - 8748, - 8749, - 8750, - 8751, - 8752, - 8753, - 8754, - 8755, - 8756, - 8757, - 8758, - 8759, - 8760, - 8761, - 8762, - 8763, - 8764, - 8765, - 8766, - 8767, - 8768, - 8769, - 8770, - 8771, - 8772, - 8773, - 8774, - 8775, - 8776, - 8777, - 8778, - 8779, - 8780, - 8781, - 8782, - 8783, - 8784, - 8785, - 8786, - 8787, - 8788, - 8789, - 8790, - 8791, - 8792, - 8793, - 8794, - 8795, - 8796, - 8797, - 8798, - 8799, - 8800, - 8801, - 8802, - 8803, - 8804, - 8805, - 8806, - 8807, - 8808, - 8809, - 8810, - 8811, - 8812, - 8813, - 8814, - 8815, - 8816, - 8817, - 8818, - 8819, - 8820, - 8821, - 8822, - 8823, - 8824, - 8825, - 8826, - 8827, - 8828, - 8829, - 8830, - 8831, - 8832, - 8833, - 8834, - 8835, - 8836, - 8837, - 8838, - 8839, - 8840, - 8841, - 8842, - 8843, - 8844, - 8845, - 8846, - 8847, - 8848, - 8849, - 8850, - 8851, - 8852, - 8853, - 8854, - 8855, - 8856, - 8857, - 8858, - 8859, - 8860, - 8861, - 8862, - 8863, - 8864, - 8865, - 8866, - 8867, - 8868, - 8869, - 8870, - 8871, - 8872, - 8873, - 8874, - 8875, - 8876, - 8877, - 8878, - 8879, - 8880, - 8881, - 8882, - 8883, - 8884, - 8885, - 8886, - 8887, - 8888, - 8889, - 8890, - 8891, - 8892, - 8893, - 8894, - 8895, - 8896, - 8897, - 8898, - 8899, - 8900, - 8901, - 8902, - 8903, - 8904, - 8905, - 8906, - 8907, - 8908, - 8909, - 8910, - 8911, - 8912, - 8913, - 8914, - 8915, - 8916, - 8917, - 8918, - 8919, - 8920, - 8921, - 8922, - 8923, - 8924, - 8925, - 8926, - 8927, - 8928, - 8929, - 8930, - 8931, - 8932, - 8933, - 8934, - 8935, - 8936, - 8937, - 8938, - 8939, - 8940, - 8941, - 8942, - 8943, - 8944, - 8945, - 8946, - 8947, - 8948, - 8949, - 8950, - 8951, - 8952, - 8953, - 8954, - 8955, - 8956, - 8957, - 8958, - 8959, - 8960, - 8961, - 8962, - 8963, - 8964, - 8965, - 8966, - 8967, - 8968, - 8969, - 8970, - 8971, - 8972, - 8973, - 8974, - 8975, - 8976, - 8977, - 8978, - 8979, - 8980, - 8981, - 8982, - 8983, - 8984, - 8985, - 8986, - 8987, - 8988, - 8989, - 8990, - 8991, - 8992, - 8993, - 8994, - 8995, - 8996, - 8997, - 8998, - 8999, - 9000, - 9001, - 9002, - 9003, - 9004, - 9005, - 9006, - 9007, - 9008, - 9009, - 9010, - 9011, - 9012, - 9013, - 9014, - 9015, - 9016, - 9017, - 9018, - 9019, - 9020, - 9021, - 9022, - 9023, - 9024, - 9025, - 9026, - 9027, - 9028, - 9029, - 9030, - 9031, - 9032, - 9033, - 9034, - 9035, - 9036, - 9037, - 9038, - 9039, - 9040, - 9041, - 9042, - 9043, - 9044, - 9045, - 9046, - 9047, - 9048, - 9049, - 9050, - 9051, - 9052, - 9053, - 9054, - 9055, - 9056, - 9057, - 9058, - 9059, - 9060, - 9061, - 9062, - 9063, - 9064, - 9065, - 9066, - 9067, - 9068, - 9069, - 9070, - 9071, - 9072, - 9073, - 9074, - 9075, - 9076, - 9077, - 9078, - 9079, - 9080, - 9081, - 9082, - 9083, - 9084, - 9085, - 9086, - 9087, - 9088, - 9089, - 9090, - 9091, - 9092, - 9093, - 9094, - 9095, - 9096, - 9097, - 9098, - 9099, - 9100, - 9101, - 9102, - 9103, - 9104, - 9105, - 9106, - 9107, - 9108, - 9109, - 9110, - 9111, - 9112, - 9113, - 9114, - 9115, - 9116, - 9117, - 9118, - 9119, - 9120, - 9121, - 9122, - 9123, - 9124, - 9125, - 9126, - 9127, - 9128, - 9129, - 9130, - 9131, - 9132, - 9133, - 9134, - 9135, - 9136, - 9137, - 9138, - 9139, - 9140, - 9141, - 9142, - 9143, - 9144, - 9145, - 9146, - 9147, - 9148, - 9149, - 9150, - 9151, - 9152, - 9153, - 9154, - 9155, - 9156, - 9157, - 9158, - 9159, - 9160, - 9161, - 9162, - 9163, - 9164, - 9165, - 9166, - 9167, - 9168, - 9169, - 9170, - 9171, - 9172, - 9173, - 9174, - 9175, - 9176, - 9177, - 9178, - 9179, - 9180, - 9181, - 9182, - 9183, - 9184, - 9185, - 9186, - 9187, - 9188, - 9189, - 9190, - 9191, - 9192, - 9193, - 9194, - 9195, - 9196, - 9197, - 9198, - 9199, - 9200, - 9201, - 9202, - 9203, - 9204, - 9205, - 9206, - 9207, - 9208, - 9209, - 9210, - 9211, - 9212, - 9213, - 9214, - 9215, - 9216, - 9217, - 9218, - 9219, - 9220, - 9221, - 9222, - 9223, - 9224, - 9225, - 9226, - 9227, - 9228, - 9229, - 9230, - 9231, - 9232, - 9233, - 9234, - 9235, - 9236, - 9237, - 9238, - 9239, - 9240, - 9241, - 9242, - 9243, - 9244, - 9245, - 9246, - 9247, - 9248, - 9249, - 9250, - 9251, - 9252, - 9253, - 9254, - 9255, - 9256, - 9257, - 9258, - 9259, - 9260, - 9261, - 9262, - 9263, - 9264, - 9265, - 9266, - 9267, - 9268, - 9269, - 9270, - 9271, - 9272, - 9273, - 9274, - 9275, - 9276, - 9277, - 9278, - 9279, - 9280, - 9281, - 9282, - 9283, - 9284, - 9285, - 9286, - 9287, - 9288, - 9289, - 9290, - 9291, - 9292, - 9293, - 9294, - 9295, - 9296, - 9297, - 9298, - 9299, - 9300, - 9301, - 9302, - 9303, - 9304, - 9305, - 9306, - 9307, - 9308, - 9309, - 9310, - 9311, - 9312, - 9313, - 9314, - 9315, - 9316, - 9317, - 9318, - 9319, - 9320, - 9321, - 9322, - 9323, - 9324, - 9325, - 9326, - 9327, - 9328, - 9329, - 9330, - 9331, - 9332, - 9333, - 9334, - 9335, - 9336, - 9337, - 9338, - 9339, - 9340, - 9341, - 9342, - 9343, - 9344, - 9345, - 9346, - 9347, - 9348, - 9349, - 9350, - 9351, - 9352, - 9353, - 9354, - 9355, - 9356, - 9357, - 9358, - 9359, - 9360, - 9361, - 9362, - 9363, - 9364, - 9365, - 9366, - 9367, - 9368, - 9369, - 9370, - 9371, - 9372, - 9373, - 9374, - 9375, - 9376, - 9377, - 9378, - 9379, - 9380, - 9381, - 9382, - 9383, - 9384, - 9385, - 9386, - 9387, - 9388, - 9389, - 9390, - 9391, - 9392, - 9393, - 9394, - 9395, - 9396, - 9397, - 9398, - 9399, - 9400, - 9401, - 9402, - 9403, - 9404, - 9405, - 9406, - 9407, - 9408, - 9409, - 9410, - 9411, - 9412, - 9413, - 9414, - 9415, - 9416, - 9417, - 9418, - 9419, - 9420, - 9421, - 9422, - 9423, - 9424, - 9425, - 9426, - 9427, - 9428, - 9429, - 9430, - 9431, - 9432, - 9433, - 9434, - 9435, - 9436, - 9437, - 9438, - 9439, - 9440, - 9441, - 9442, - 9443, - 9444, - 9445, - 9446, - 9447, - 9448, - 9449, - 9450, - 9451, - 9452, - 9453, - 9454, - 9455, - 9456, - 9457, - 9458, - 9459, - 9460, - 9461, - 9462, - 9463, - 9464, - 9465, - 9466, - 9467, - 9468, - 9469, - 9470, - 9471, - 9472, - 9473, - 9474, - 9475, - 9476, - 9477, - 9478, - 9479, - 9480, - 9481, - 9482, - 9483, - 9484, - 9485, - 9486, - 9487, - 9488, - 9489, - 9490, - 9491, - 9492, - 9493, - 9494, - 9495, - 9496, - 9497, - 9498, - 9499, - 9500, - 9501, - 9502, - 9503, - 9504, - 9505, - 9506, - 9507, - 9508, - 9509, - 9510, - 9511, - 9512, - 9513, - 9514, - 9515, - 9516, - 9517, - 9518, - 9519, - 9520, - 9521, - 9522, - 9523, - 9524, - 9525, - 9526, - 9527, - 9528, - 9529, - 9530, - 9531, - 9532, - 9533, - 9534, - 9535, - 9536, - 9537, - 9538, - 9539, - 9540, - 9541, - 9542, - 9543, - 9544, - 9545, - 9546, - 9547, - 9548, - 9549, - 9550, - 9551, - 9552, - 9553, - 9554, - 9555, - 9556, - 9557, - 9558, - 9559, - 9560, - 9561, - 9562, - 9563, - 9564, - 9565, - 9566, - 9567, - 9568, - 9569, - 9570, - 9571, - 9572, - 9573, - 9574, - 9575, - 9576, - 9577, - 9578, - 9579, - 9580, - 9581, - 9582, - 9583, - 9584, - 9585, - 9586, - 9587, - 9588, - 9589, - 9590, - 9591, - 9592, - 9593, - 9594, - 9595, - 9596, - 9597, - 9598, - 9599, - 9600, - 9601, - 9602, - 9603, - 9604, - 9605, - 9606, - 9607, - 9608, - 9609, - 9610, - 9611, - 9612, - 9613, - 9614, - 9615, - 9616, - 9617, - 9618, - 9619, - 9620, - 9621, - 9622, - 9623, - 9624, - 9625, - 9626, - 9627, - 9628, - 9629, - 9630, - 9631, - 9632, - 9633, - 9634, - 9635, - 9636, - 9637, - 9638, - 9639, - 9640, - 9641, - 9642, - 9643, - 9644, - 9645, - 9646, - 9647, - 9648, - 9649, - 9650, - 9651, - 9652, - 9653, - 9654, - 9655, - 9656, - 9657, - 9658, - 9659, - 9660, - 9661, - 9662, - 9663, - 9664, - 9665, - 9666, - 9667, - 9668, - 9669, - 9670, - 9671, - 9672, - 9673, - 9674, - 9675, - 9676, - 9677, - 9678, - 9679, - 9680, - 9681, - 9682, - 9683, - 9684, - 9685, - 9686, - 9687, - 9688, - 9689, - 9690, - 9691, - 9692, - 9693, - 9694, - 9695, - 9696, - 9697, - 9698, - 9699, - 9700, - 9701, - 9702, - 9703, - 9704, - 9705, - 9706, - 9707, - 9708, - 9709, - 9710, - 9711, - 9712, - 9713, - 9714, - 9715, - 9716, - 9717, - 9718, - 9719, - 9720, - 9721, - 9722, - 9723, - 9724, - 9725, - 9726, - 9727, - 9728, - 9729, - 9730, - 9731, - 9732, - 9733, - 9734, - 9735, - 9736, - 9737, - 9738, - 9739, - 9740, - 9741, - 9742, - 9743, - 9744, - 9745, - 9746, - 9747, - 9748, - 9749, - 9750, - 9751, - 9752, - 9753, - 9754, - 9755, - 9756, - 9757, - 9758, - 9759, - 9760, - 9761, - 9762, - 9763, - 9764, - 9765, - 9766, - 9767, - 9768, - 9769, - 9770, - 9771, - 9772, - 9773, - 9774, - 9775, - 9776, - 9777, - 9778, - 9779, - 9780, - 9781, - 9782, - 9783, - 9784, - 9785, - 9786, - 9787, - 9788, - 9789, - 9790, - 9791, - 9792, - 9793, - 9794, - 9795, - 9796, - 9797, - 9798, - 9799, - 9800, - 9801, - 9802, - 9803, - 9804, - 9805, - 9806, - 9807, - 9808, - 9809, - 9810, - 9811, - 9812, - 9813, - 9814, - 9815, - 9816, - 9817, - 9818, - 9819, - 9820, - 9821, - 9822, - 9823, - 9824, - 9825, - 9826, - 9827, - 9828, - 9829, - 9830, - 9831, - 9832, - 9833, - 9834, - 9835, - 9836, - 9837, - 9838, - 9839, - 9840, - 9841, - 9842, - 9843, - 9844, - 9845, - 9846, - 9847, - 9848, - 9849, - 9850, - 9851, - 9852, - 9853, - 9854, - 9855, - 9856, - 9857, - 9858, - 9859, - 9860, - 9861, - 9862, - 9863, - 9864, - 9865, - 9866, - 9867, - 9868, - 9869, - 9870, - 9871, - 9872, - 9873, - 9874, - 9875, - 9876, - 9877, - 9878, - 9879, - 9880, - 9881, - 9882, - 9883, - 9884, - 9885, - 9886, - 9887, - 9888, - 9889, - 9890, - 9891, - 9892, - 9893, - 9894, - 9895, - 9896, - 9897, - 9898, - 9899, - 9900, - 9901, - 9902, - 9903, - 9904, - 9905, - 9906, - 9907, - 9908, - 9909, - 9910, - 9911, - 9912, - 9913, - 9914, - 9915, - 9916, - 9917, - 9918, - 9919, - 9920, - 9921, - 9922, - 9923, - 9924, - 9925, - 9926, - 9927, - 9928, - 9929, - 9930, - 9931, - 9932, - 9933, - 9934, - 9935, - 9936, - 9937, - 9938, - 9939, - 9940, - 9941, - 9942, - 9943, - 9944, - 9945, - 9946, - 9947, - 9948, - 9949, - 9950, - 9951, - 9952, - 9953, - 9954, - 9955, - 9956, - 9957, - 9958, - 9959, - 9960, - 9961, - 9962, - 9963, - 9964, - 9965, - 9966, - 9967, - 9968, - 9969, - 9970, - 9971, - 9972, - 9973, - 9974, - 9975, - 9976, - 9977, - 9978, - 9979, - 9980, - 9981, - 9982, - 9983, - 9984, - 9985, - 9986, - 9987, - 9988, - 9989, - 9990, - 9991, - 9992, - 9993, - 9994, - 9995, - 9996, - 9997, - 9998, - 9999, -}; -Set stringSet = { - 'foo_0', - 'foo_1', - 'foo_2', - 'foo_3', - 'foo_4', - 'foo_5', - 'foo_6', - 'foo_7', - 'foo_8', - 'foo_9', - 'foo_10', - 'foo_11', - 'foo_12', - 'foo_13', - 'foo_14', - 'foo_15', - 'foo_16', - 'foo_17', - 'foo_18', - 'foo_19', - 'foo_20', - 'foo_21', - 'foo_22', - 'foo_23', - 'foo_24', - 'foo_25', - 'foo_26', - 'foo_27', - 'foo_28', - 'foo_29', - 'foo_30', - 'foo_31', - 'foo_32', - 'foo_33', - 'foo_34', - 'foo_35', - 'foo_36', - 'foo_37', - 'foo_38', - 'foo_39', - 'foo_40', - 'foo_41', - 'foo_42', - 'foo_43', - 'foo_44', - 'foo_45', - 'foo_46', - 'foo_47', - 'foo_48', - 'foo_49', - 'foo_50', - 'foo_51', - 'foo_52', - 'foo_53', - 'foo_54', - 'foo_55', - 'foo_56', - 'foo_57', - 'foo_58', - 'foo_59', - 'foo_60', - 'foo_61', - 'foo_62', - 'foo_63', - 'foo_64', - 'foo_65', - 'foo_66', - 'foo_67', - 'foo_68', - 'foo_69', - 'foo_70', - 'foo_71', - 'foo_72', - 'foo_73', - 'foo_74', - 'foo_75', - 'foo_76', - 'foo_77', - 'foo_78', - 'foo_79', - 'foo_80', - 'foo_81', - 'foo_82', - 'foo_83', - 'foo_84', - 'foo_85', - 'foo_86', - 'foo_87', - 'foo_88', - 'foo_89', - 'foo_90', - 'foo_91', - 'foo_92', - 'foo_93', - 'foo_94', - 'foo_95', - 'foo_96', - 'foo_97', - 'foo_98', - 'foo_99', - 'foo_100', - 'foo_101', - 'foo_102', - 'foo_103', - 'foo_104', - 'foo_105', - 'foo_106', - 'foo_107', - 'foo_108', - 'foo_109', - 'foo_110', - 'foo_111', - 'foo_112', - 'foo_113', - 'foo_114', - 'foo_115', - 'foo_116', - 'foo_117', - 'foo_118', - 'foo_119', - 'foo_120', - 'foo_121', - 'foo_122', - 'foo_123', - 'foo_124', - 'foo_125', - 'foo_126', - 'foo_127', - 'foo_128', - 'foo_129', - 'foo_130', - 'foo_131', - 'foo_132', - 'foo_133', - 'foo_134', - 'foo_135', - 'foo_136', - 'foo_137', - 'foo_138', - 'foo_139', - 'foo_140', - 'foo_141', - 'foo_142', - 'foo_143', - 'foo_144', - 'foo_145', - 'foo_146', - 'foo_147', - 'foo_148', - 'foo_149', - 'foo_150', - 'foo_151', - 'foo_152', - 'foo_153', - 'foo_154', - 'foo_155', - 'foo_156', - 'foo_157', - 'foo_158', - 'foo_159', - 'foo_160', - 'foo_161', - 'foo_162', - 'foo_163', - 'foo_164', - 'foo_165', - 'foo_166', - 'foo_167', - 'foo_168', - 'foo_169', - 'foo_170', - 'foo_171', - 'foo_172', - 'foo_173', - 'foo_174', - 'foo_175', - 'foo_176', - 'foo_177', - 'foo_178', - 'foo_179', - 'foo_180', - 'foo_181', - 'foo_182', - 'foo_183', - 'foo_184', - 'foo_185', - 'foo_186', - 'foo_187', - 'foo_188', - 'foo_189', - 'foo_190', - 'foo_191', - 'foo_192', - 'foo_193', - 'foo_194', - 'foo_195', - 'foo_196', - 'foo_197', - 'foo_198', - 'foo_199', - 'foo_200', - 'foo_201', - 'foo_202', - 'foo_203', - 'foo_204', - 'foo_205', - 'foo_206', - 'foo_207', - 'foo_208', - 'foo_209', - 'foo_210', - 'foo_211', - 'foo_212', - 'foo_213', - 'foo_214', - 'foo_215', - 'foo_216', - 'foo_217', - 'foo_218', - 'foo_219', - 'foo_220', - 'foo_221', - 'foo_222', - 'foo_223', - 'foo_224', - 'foo_225', - 'foo_226', - 'foo_227', - 'foo_228', - 'foo_229', - 'foo_230', - 'foo_231', - 'foo_232', - 'foo_233', - 'foo_234', - 'foo_235', - 'foo_236', - 'foo_237', - 'foo_238', - 'foo_239', - 'foo_240', - 'foo_241', - 'foo_242', - 'foo_243', - 'foo_244', - 'foo_245', - 'foo_246', - 'foo_247', - 'foo_248', - 'foo_249', - 'foo_250', - 'foo_251', - 'foo_252', - 'foo_253', - 'foo_254', - 'foo_255', - 'foo_256', - 'foo_257', - 'foo_258', - 'foo_259', - 'foo_260', - 'foo_261', - 'foo_262', - 'foo_263', - 'foo_264', - 'foo_265', - 'foo_266', - 'foo_267', - 'foo_268', - 'foo_269', - 'foo_270', - 'foo_271', - 'foo_272', - 'foo_273', - 'foo_274', - 'foo_275', - 'foo_276', - 'foo_277', - 'foo_278', - 'foo_279', - 'foo_280', - 'foo_281', - 'foo_282', - 'foo_283', - 'foo_284', - 'foo_285', - 'foo_286', - 'foo_287', - 'foo_288', - 'foo_289', - 'foo_290', - 'foo_291', - 'foo_292', - 'foo_293', - 'foo_294', - 'foo_295', - 'foo_296', - 'foo_297', - 'foo_298', - 'foo_299', - 'foo_300', - 'foo_301', - 'foo_302', - 'foo_303', - 'foo_304', - 'foo_305', - 'foo_306', - 'foo_307', - 'foo_308', - 'foo_309', - 'foo_310', - 'foo_311', - 'foo_312', - 'foo_313', - 'foo_314', - 'foo_315', - 'foo_316', - 'foo_317', - 'foo_318', - 'foo_319', - 'foo_320', - 'foo_321', - 'foo_322', - 'foo_323', - 'foo_324', - 'foo_325', - 'foo_326', - 'foo_327', - 'foo_328', - 'foo_329', - 'foo_330', - 'foo_331', - 'foo_332', - 'foo_333', - 'foo_334', - 'foo_335', - 'foo_336', - 'foo_337', - 'foo_338', - 'foo_339', - 'foo_340', - 'foo_341', - 'foo_342', - 'foo_343', - 'foo_344', - 'foo_345', - 'foo_346', - 'foo_347', - 'foo_348', - 'foo_349', - 'foo_350', - 'foo_351', - 'foo_352', - 'foo_353', - 'foo_354', - 'foo_355', - 'foo_356', - 'foo_357', - 'foo_358', - 'foo_359', - 'foo_360', - 'foo_361', - 'foo_362', - 'foo_363', - 'foo_364', - 'foo_365', - 'foo_366', - 'foo_367', - 'foo_368', - 'foo_369', - 'foo_370', - 'foo_371', - 'foo_372', - 'foo_373', - 'foo_374', - 'foo_375', - 'foo_376', - 'foo_377', - 'foo_378', - 'foo_379', - 'foo_380', - 'foo_381', - 'foo_382', - 'foo_383', - 'foo_384', - 'foo_385', - 'foo_386', - 'foo_387', - 'foo_388', - 'foo_389', - 'foo_390', - 'foo_391', - 'foo_392', - 'foo_393', - 'foo_394', - 'foo_395', - 'foo_396', - 'foo_397', - 'foo_398', - 'foo_399', - 'foo_400', - 'foo_401', - 'foo_402', - 'foo_403', - 'foo_404', - 'foo_405', - 'foo_406', - 'foo_407', - 'foo_408', - 'foo_409', - 'foo_410', - 'foo_411', - 'foo_412', - 'foo_413', - 'foo_414', - 'foo_415', - 'foo_416', - 'foo_417', - 'foo_418', - 'foo_419', - 'foo_420', - 'foo_421', - 'foo_422', - 'foo_423', - 'foo_424', - 'foo_425', - 'foo_426', - 'foo_427', - 'foo_428', - 'foo_429', - 'foo_430', - 'foo_431', - 'foo_432', - 'foo_433', - 'foo_434', - 'foo_435', - 'foo_436', - 'foo_437', - 'foo_438', - 'foo_439', - 'foo_440', - 'foo_441', - 'foo_442', - 'foo_443', - 'foo_444', - 'foo_445', - 'foo_446', - 'foo_447', - 'foo_448', - 'foo_449', - 'foo_450', - 'foo_451', - 'foo_452', - 'foo_453', - 'foo_454', - 'foo_455', - 'foo_456', - 'foo_457', - 'foo_458', - 'foo_459', - 'foo_460', - 'foo_461', - 'foo_462', - 'foo_463', - 'foo_464', - 'foo_465', - 'foo_466', - 'foo_467', - 'foo_468', - 'foo_469', - 'foo_470', - 'foo_471', - 'foo_472', - 'foo_473', - 'foo_474', - 'foo_475', - 'foo_476', - 'foo_477', - 'foo_478', - 'foo_479', - 'foo_480', - 'foo_481', - 'foo_482', - 'foo_483', - 'foo_484', - 'foo_485', - 'foo_486', - 'foo_487', - 'foo_488', - 'foo_489', - 'foo_490', - 'foo_491', - 'foo_492', - 'foo_493', - 'foo_494', - 'foo_495', - 'foo_496', - 'foo_497', - 'foo_498', - 'foo_499', - 'foo_500', - 'foo_501', - 'foo_502', - 'foo_503', - 'foo_504', - 'foo_505', - 'foo_506', - 'foo_507', - 'foo_508', - 'foo_509', - 'foo_510', - 'foo_511', - 'foo_512', - 'foo_513', - 'foo_514', - 'foo_515', - 'foo_516', - 'foo_517', - 'foo_518', - 'foo_519', - 'foo_520', - 'foo_521', - 'foo_522', - 'foo_523', - 'foo_524', - 'foo_525', - 'foo_526', - 'foo_527', - 'foo_528', - 'foo_529', - 'foo_530', - 'foo_531', - 'foo_532', - 'foo_533', - 'foo_534', - 'foo_535', - 'foo_536', - 'foo_537', - 'foo_538', - 'foo_539', - 'foo_540', - 'foo_541', - 'foo_542', - 'foo_543', - 'foo_544', - 'foo_545', - 'foo_546', - 'foo_547', - 'foo_548', - 'foo_549', - 'foo_550', - 'foo_551', - 'foo_552', - 'foo_553', - 'foo_554', - 'foo_555', - 'foo_556', - 'foo_557', - 'foo_558', - 'foo_559', - 'foo_560', - 'foo_561', - 'foo_562', - 'foo_563', - 'foo_564', - 'foo_565', - 'foo_566', - 'foo_567', - 'foo_568', - 'foo_569', - 'foo_570', - 'foo_571', - 'foo_572', - 'foo_573', - 'foo_574', - 'foo_575', - 'foo_576', - 'foo_577', - 'foo_578', - 'foo_579', - 'foo_580', - 'foo_581', - 'foo_582', - 'foo_583', - 'foo_584', - 'foo_585', - 'foo_586', - 'foo_587', - 'foo_588', - 'foo_589', - 'foo_590', - 'foo_591', - 'foo_592', - 'foo_593', - 'foo_594', - 'foo_595', - 'foo_596', - 'foo_597', - 'foo_598', - 'foo_599', - 'foo_600', - 'foo_601', - 'foo_602', - 'foo_603', - 'foo_604', - 'foo_605', - 'foo_606', - 'foo_607', - 'foo_608', - 'foo_609', - 'foo_610', - 'foo_611', - 'foo_612', - 'foo_613', - 'foo_614', - 'foo_615', - 'foo_616', - 'foo_617', - 'foo_618', - 'foo_619', - 'foo_620', - 'foo_621', - 'foo_622', - 'foo_623', - 'foo_624', - 'foo_625', - 'foo_626', - 'foo_627', - 'foo_628', - 'foo_629', - 'foo_630', - 'foo_631', - 'foo_632', - 'foo_633', - 'foo_634', - 'foo_635', - 'foo_636', - 'foo_637', - 'foo_638', - 'foo_639', - 'foo_640', - 'foo_641', - 'foo_642', - 'foo_643', - 'foo_644', - 'foo_645', - 'foo_646', - 'foo_647', - 'foo_648', - 'foo_649', - 'foo_650', - 'foo_651', - 'foo_652', - 'foo_653', - 'foo_654', - 'foo_655', - 'foo_656', - 'foo_657', - 'foo_658', - 'foo_659', - 'foo_660', - 'foo_661', - 'foo_662', - 'foo_663', - 'foo_664', - 'foo_665', - 'foo_666', - 'foo_667', - 'foo_668', - 'foo_669', - 'foo_670', - 'foo_671', - 'foo_672', - 'foo_673', - 'foo_674', - 'foo_675', - 'foo_676', - 'foo_677', - 'foo_678', - 'foo_679', - 'foo_680', - 'foo_681', - 'foo_682', - 'foo_683', - 'foo_684', - 'foo_685', - 'foo_686', - 'foo_687', - 'foo_688', - 'foo_689', - 'foo_690', - 'foo_691', - 'foo_692', - 'foo_693', - 'foo_694', - 'foo_695', - 'foo_696', - 'foo_697', - 'foo_698', - 'foo_699', - 'foo_700', - 'foo_701', - 'foo_702', - 'foo_703', - 'foo_704', - 'foo_705', - 'foo_706', - 'foo_707', - 'foo_708', - 'foo_709', - 'foo_710', - 'foo_711', - 'foo_712', - 'foo_713', - 'foo_714', - 'foo_715', - 'foo_716', - 'foo_717', - 'foo_718', - 'foo_719', - 'foo_720', - 'foo_721', - 'foo_722', - 'foo_723', - 'foo_724', - 'foo_725', - 'foo_726', - 'foo_727', - 'foo_728', - 'foo_729', - 'foo_730', - 'foo_731', - 'foo_732', - 'foo_733', - 'foo_734', - 'foo_735', - 'foo_736', - 'foo_737', - 'foo_738', - 'foo_739', - 'foo_740', - 'foo_741', - 'foo_742', - 'foo_743', - 'foo_744', - 'foo_745', - 'foo_746', - 'foo_747', - 'foo_748', - 'foo_749', - 'foo_750', - 'foo_751', - 'foo_752', - 'foo_753', - 'foo_754', - 'foo_755', - 'foo_756', - 'foo_757', - 'foo_758', - 'foo_759', - 'foo_760', - 'foo_761', - 'foo_762', - 'foo_763', - 'foo_764', - 'foo_765', - 'foo_766', - 'foo_767', - 'foo_768', - 'foo_769', - 'foo_770', - 'foo_771', - 'foo_772', - 'foo_773', - 'foo_774', - 'foo_775', - 'foo_776', - 'foo_777', - 'foo_778', - 'foo_779', - 'foo_780', - 'foo_781', - 'foo_782', - 'foo_783', - 'foo_784', - 'foo_785', - 'foo_786', - 'foo_787', - 'foo_788', - 'foo_789', - 'foo_790', - 'foo_791', - 'foo_792', - 'foo_793', - 'foo_794', - 'foo_795', - 'foo_796', - 'foo_797', - 'foo_798', - 'foo_799', - 'foo_800', - 'foo_801', - 'foo_802', - 'foo_803', - 'foo_804', - 'foo_805', - 'foo_806', - 'foo_807', - 'foo_808', - 'foo_809', - 'foo_810', - 'foo_811', - 'foo_812', - 'foo_813', - 'foo_814', - 'foo_815', - 'foo_816', - 'foo_817', - 'foo_818', - 'foo_819', - 'foo_820', - 'foo_821', - 'foo_822', - 'foo_823', - 'foo_824', - 'foo_825', - 'foo_826', - 'foo_827', - 'foo_828', - 'foo_829', - 'foo_830', - 'foo_831', - 'foo_832', - 'foo_833', - 'foo_834', - 'foo_835', - 'foo_836', - 'foo_837', - 'foo_838', - 'foo_839', - 'foo_840', - 'foo_841', - 'foo_842', - 'foo_843', - 'foo_844', - 'foo_845', - 'foo_846', - 'foo_847', - 'foo_848', - 'foo_849', - 'foo_850', - 'foo_851', - 'foo_852', - 'foo_853', - 'foo_854', - 'foo_855', - 'foo_856', - 'foo_857', - 'foo_858', - 'foo_859', - 'foo_860', - 'foo_861', - 'foo_862', - 'foo_863', - 'foo_864', - 'foo_865', - 'foo_866', - 'foo_867', - 'foo_868', - 'foo_869', - 'foo_870', - 'foo_871', - 'foo_872', - 'foo_873', - 'foo_874', - 'foo_875', - 'foo_876', - 'foo_877', - 'foo_878', - 'foo_879', - 'foo_880', - 'foo_881', - 'foo_882', - 'foo_883', - 'foo_884', - 'foo_885', - 'foo_886', - 'foo_887', - 'foo_888', - 'foo_889', - 'foo_890', - 'foo_891', - 'foo_892', - 'foo_893', - 'foo_894', - 'foo_895', - 'foo_896', - 'foo_897', - 'foo_898', - 'foo_899', - 'foo_900', - 'foo_901', - 'foo_902', - 'foo_903', - 'foo_904', - 'foo_905', - 'foo_906', - 'foo_907', - 'foo_908', - 'foo_909', - 'foo_910', - 'foo_911', - 'foo_912', - 'foo_913', - 'foo_914', - 'foo_915', - 'foo_916', - 'foo_917', - 'foo_918', - 'foo_919', - 'foo_920', - 'foo_921', - 'foo_922', - 'foo_923', - 'foo_924', - 'foo_925', - 'foo_926', - 'foo_927', - 'foo_928', - 'foo_929', - 'foo_930', - 'foo_931', - 'foo_932', - 'foo_933', - 'foo_934', - 'foo_935', - 'foo_936', - 'foo_937', - 'foo_938', - 'foo_939', - 'foo_940', - 'foo_941', - 'foo_942', - 'foo_943', - 'foo_944', - 'foo_945', - 'foo_946', - 'foo_947', - 'foo_948', - 'foo_949', - 'foo_950', - 'foo_951', - 'foo_952', - 'foo_953', - 'foo_954', - 'foo_955', - 'foo_956', - 'foo_957', - 'foo_958', - 'foo_959', - 'foo_960', - 'foo_961', - 'foo_962', - 'foo_963', - 'foo_964', - 'foo_965', - 'foo_966', - 'foo_967', - 'foo_968', - 'foo_969', - 'foo_970', - 'foo_971', - 'foo_972', - 'foo_973', - 'foo_974', - 'foo_975', - 'foo_976', - 'foo_977', - 'foo_978', - 'foo_979', - 'foo_980', - 'foo_981', - 'foo_982', - 'foo_983', - 'foo_984', - 'foo_985', - 'foo_986', - 'foo_987', - 'foo_988', - 'foo_989', - 'foo_990', - 'foo_991', - 'foo_992', - 'foo_993', - 'foo_994', - 'foo_995', - 'foo_996', - 'foo_997', - 'foo_998', - 'foo_999', - 'foo_1000', - 'foo_1001', - 'foo_1002', - 'foo_1003', - 'foo_1004', - 'foo_1005', - 'foo_1006', - 'foo_1007', - 'foo_1008', - 'foo_1009', - 'foo_1010', - 'foo_1011', - 'foo_1012', - 'foo_1013', - 'foo_1014', - 'foo_1015', - 'foo_1016', - 'foo_1017', - 'foo_1018', - 'foo_1019', - 'foo_1020', - 'foo_1021', - 'foo_1022', - 'foo_1023', - 'foo_1024', - 'foo_1025', - 'foo_1026', - 'foo_1027', - 'foo_1028', - 'foo_1029', - 'foo_1030', - 'foo_1031', - 'foo_1032', - 'foo_1033', - 'foo_1034', - 'foo_1035', - 'foo_1036', - 'foo_1037', - 'foo_1038', - 'foo_1039', - 'foo_1040', - 'foo_1041', - 'foo_1042', - 'foo_1043', - 'foo_1044', - 'foo_1045', - 'foo_1046', - 'foo_1047', - 'foo_1048', - 'foo_1049', - 'foo_1050', - 'foo_1051', - 'foo_1052', - 'foo_1053', - 'foo_1054', - 'foo_1055', - 'foo_1056', - 'foo_1057', - 'foo_1058', - 'foo_1059', - 'foo_1060', - 'foo_1061', - 'foo_1062', - 'foo_1063', - 'foo_1064', - 'foo_1065', - 'foo_1066', - 'foo_1067', - 'foo_1068', - 'foo_1069', - 'foo_1070', - 'foo_1071', - 'foo_1072', - 'foo_1073', - 'foo_1074', - 'foo_1075', - 'foo_1076', - 'foo_1077', - 'foo_1078', - 'foo_1079', - 'foo_1080', - 'foo_1081', - 'foo_1082', - 'foo_1083', - 'foo_1084', - 'foo_1085', - 'foo_1086', - 'foo_1087', - 'foo_1088', - 'foo_1089', - 'foo_1090', - 'foo_1091', - 'foo_1092', - 'foo_1093', - 'foo_1094', - 'foo_1095', - 'foo_1096', - 'foo_1097', - 'foo_1098', - 'foo_1099', - 'foo_1100', - 'foo_1101', - 'foo_1102', - 'foo_1103', - 'foo_1104', - 'foo_1105', - 'foo_1106', - 'foo_1107', - 'foo_1108', - 'foo_1109', - 'foo_1110', - 'foo_1111', - 'foo_1112', - 'foo_1113', - 'foo_1114', - 'foo_1115', - 'foo_1116', - 'foo_1117', - 'foo_1118', - 'foo_1119', - 'foo_1120', - 'foo_1121', - 'foo_1122', - 'foo_1123', - 'foo_1124', - 'foo_1125', - 'foo_1126', - 'foo_1127', - 'foo_1128', - 'foo_1129', - 'foo_1130', - 'foo_1131', - 'foo_1132', - 'foo_1133', - 'foo_1134', - 'foo_1135', - 'foo_1136', - 'foo_1137', - 'foo_1138', - 'foo_1139', - 'foo_1140', - 'foo_1141', - 'foo_1142', - 'foo_1143', - 'foo_1144', - 'foo_1145', - 'foo_1146', - 'foo_1147', - 'foo_1148', - 'foo_1149', - 'foo_1150', - 'foo_1151', - 'foo_1152', - 'foo_1153', - 'foo_1154', - 'foo_1155', - 'foo_1156', - 'foo_1157', - 'foo_1158', - 'foo_1159', - 'foo_1160', - 'foo_1161', - 'foo_1162', - 'foo_1163', - 'foo_1164', - 'foo_1165', - 'foo_1166', - 'foo_1167', - 'foo_1168', - 'foo_1169', - 'foo_1170', - 'foo_1171', - 'foo_1172', - 'foo_1173', - 'foo_1174', - 'foo_1175', - 'foo_1176', - 'foo_1177', - 'foo_1178', - 'foo_1179', - 'foo_1180', - 'foo_1181', - 'foo_1182', - 'foo_1183', - 'foo_1184', - 'foo_1185', - 'foo_1186', - 'foo_1187', - 'foo_1188', - 'foo_1189', - 'foo_1190', - 'foo_1191', - 'foo_1192', - 'foo_1193', - 'foo_1194', - 'foo_1195', - 'foo_1196', - 'foo_1197', - 'foo_1198', - 'foo_1199', - 'foo_1200', - 'foo_1201', - 'foo_1202', - 'foo_1203', - 'foo_1204', - 'foo_1205', - 'foo_1206', - 'foo_1207', - 'foo_1208', - 'foo_1209', - 'foo_1210', - 'foo_1211', - 'foo_1212', - 'foo_1213', - 'foo_1214', - 'foo_1215', - 'foo_1216', - 'foo_1217', - 'foo_1218', - 'foo_1219', - 'foo_1220', - 'foo_1221', - 'foo_1222', - 'foo_1223', - 'foo_1224', - 'foo_1225', - 'foo_1226', - 'foo_1227', - 'foo_1228', - 'foo_1229', - 'foo_1230', - 'foo_1231', - 'foo_1232', - 'foo_1233', - 'foo_1234', - 'foo_1235', - 'foo_1236', - 'foo_1237', - 'foo_1238', - 'foo_1239', - 'foo_1240', - 'foo_1241', - 'foo_1242', - 'foo_1243', - 'foo_1244', - 'foo_1245', - 'foo_1246', - 'foo_1247', - 'foo_1248', - 'foo_1249', - 'foo_1250', - 'foo_1251', - 'foo_1252', - 'foo_1253', - 'foo_1254', - 'foo_1255', - 'foo_1256', - 'foo_1257', - 'foo_1258', - 'foo_1259', - 'foo_1260', - 'foo_1261', - 'foo_1262', - 'foo_1263', - 'foo_1264', - 'foo_1265', - 'foo_1266', - 'foo_1267', - 'foo_1268', - 'foo_1269', - 'foo_1270', - 'foo_1271', - 'foo_1272', - 'foo_1273', - 'foo_1274', - 'foo_1275', - 'foo_1276', - 'foo_1277', - 'foo_1278', - 'foo_1279', - 'foo_1280', - 'foo_1281', - 'foo_1282', - 'foo_1283', - 'foo_1284', - 'foo_1285', - 'foo_1286', - 'foo_1287', - 'foo_1288', - 'foo_1289', - 'foo_1290', - 'foo_1291', - 'foo_1292', - 'foo_1293', - 'foo_1294', - 'foo_1295', - 'foo_1296', - 'foo_1297', - 'foo_1298', - 'foo_1299', - 'foo_1300', - 'foo_1301', - 'foo_1302', - 'foo_1303', - 'foo_1304', - 'foo_1305', - 'foo_1306', - 'foo_1307', - 'foo_1308', - 'foo_1309', - 'foo_1310', - 'foo_1311', - 'foo_1312', - 'foo_1313', - 'foo_1314', - 'foo_1315', - 'foo_1316', - 'foo_1317', - 'foo_1318', - 'foo_1319', - 'foo_1320', - 'foo_1321', - 'foo_1322', - 'foo_1323', - 'foo_1324', - 'foo_1325', - 'foo_1326', - 'foo_1327', - 'foo_1328', - 'foo_1329', - 'foo_1330', - 'foo_1331', - 'foo_1332', - 'foo_1333', - 'foo_1334', - 'foo_1335', - 'foo_1336', - 'foo_1337', - 'foo_1338', - 'foo_1339', - 'foo_1340', - 'foo_1341', - 'foo_1342', - 'foo_1343', - 'foo_1344', - 'foo_1345', - 'foo_1346', - 'foo_1347', - 'foo_1348', - 'foo_1349', - 'foo_1350', - 'foo_1351', - 'foo_1352', - 'foo_1353', - 'foo_1354', - 'foo_1355', - 'foo_1356', - 'foo_1357', - 'foo_1358', - 'foo_1359', - 'foo_1360', - 'foo_1361', - 'foo_1362', - 'foo_1363', - 'foo_1364', - 'foo_1365', - 'foo_1366', - 'foo_1367', - 'foo_1368', - 'foo_1369', - 'foo_1370', - 'foo_1371', - 'foo_1372', - 'foo_1373', - 'foo_1374', - 'foo_1375', - 'foo_1376', - 'foo_1377', - 'foo_1378', - 'foo_1379', - 'foo_1380', - 'foo_1381', - 'foo_1382', - 'foo_1383', - 'foo_1384', - 'foo_1385', - 'foo_1386', - 'foo_1387', - 'foo_1388', - 'foo_1389', - 'foo_1390', - 'foo_1391', - 'foo_1392', - 'foo_1393', - 'foo_1394', - 'foo_1395', - 'foo_1396', - 'foo_1397', - 'foo_1398', - 'foo_1399', - 'foo_1400', - 'foo_1401', - 'foo_1402', - 'foo_1403', - 'foo_1404', - 'foo_1405', - 'foo_1406', - 'foo_1407', - 'foo_1408', - 'foo_1409', - 'foo_1410', - 'foo_1411', - 'foo_1412', - 'foo_1413', - 'foo_1414', - 'foo_1415', - 'foo_1416', - 'foo_1417', - 'foo_1418', - 'foo_1419', - 'foo_1420', - 'foo_1421', - 'foo_1422', - 'foo_1423', - 'foo_1424', - 'foo_1425', - 'foo_1426', - 'foo_1427', - 'foo_1428', - 'foo_1429', - 'foo_1430', - 'foo_1431', - 'foo_1432', - 'foo_1433', - 'foo_1434', - 'foo_1435', - 'foo_1436', - 'foo_1437', - 'foo_1438', - 'foo_1439', - 'foo_1440', - 'foo_1441', - 'foo_1442', - 'foo_1443', - 'foo_1444', - 'foo_1445', - 'foo_1446', - 'foo_1447', - 'foo_1448', - 'foo_1449', - 'foo_1450', - 'foo_1451', - 'foo_1452', - 'foo_1453', - 'foo_1454', - 'foo_1455', - 'foo_1456', - 'foo_1457', - 'foo_1458', - 'foo_1459', - 'foo_1460', - 'foo_1461', - 'foo_1462', - 'foo_1463', - 'foo_1464', - 'foo_1465', - 'foo_1466', - 'foo_1467', - 'foo_1468', - 'foo_1469', - 'foo_1470', - 'foo_1471', - 'foo_1472', - 'foo_1473', - 'foo_1474', - 'foo_1475', - 'foo_1476', - 'foo_1477', - 'foo_1478', - 'foo_1479', - 'foo_1480', - 'foo_1481', - 'foo_1482', - 'foo_1483', - 'foo_1484', - 'foo_1485', - 'foo_1486', - 'foo_1487', - 'foo_1488', - 'foo_1489', - 'foo_1490', - 'foo_1491', - 'foo_1492', - 'foo_1493', - 'foo_1494', - 'foo_1495', - 'foo_1496', - 'foo_1497', - 'foo_1498', - 'foo_1499', - 'foo_1500', - 'foo_1501', - 'foo_1502', - 'foo_1503', - 'foo_1504', - 'foo_1505', - 'foo_1506', - 'foo_1507', - 'foo_1508', - 'foo_1509', - 'foo_1510', - 'foo_1511', - 'foo_1512', - 'foo_1513', - 'foo_1514', - 'foo_1515', - 'foo_1516', - 'foo_1517', - 'foo_1518', - 'foo_1519', - 'foo_1520', - 'foo_1521', - 'foo_1522', - 'foo_1523', - 'foo_1524', - 'foo_1525', - 'foo_1526', - 'foo_1527', - 'foo_1528', - 'foo_1529', - 'foo_1530', - 'foo_1531', - 'foo_1532', - 'foo_1533', - 'foo_1534', - 'foo_1535', - 'foo_1536', - 'foo_1537', - 'foo_1538', - 'foo_1539', - 'foo_1540', - 'foo_1541', - 'foo_1542', - 'foo_1543', - 'foo_1544', - 'foo_1545', - 'foo_1546', - 'foo_1547', - 'foo_1548', - 'foo_1549', - 'foo_1550', - 'foo_1551', - 'foo_1552', - 'foo_1553', - 'foo_1554', - 'foo_1555', - 'foo_1556', - 'foo_1557', - 'foo_1558', - 'foo_1559', - 'foo_1560', - 'foo_1561', - 'foo_1562', - 'foo_1563', - 'foo_1564', - 'foo_1565', - 'foo_1566', - 'foo_1567', - 'foo_1568', - 'foo_1569', - 'foo_1570', - 'foo_1571', - 'foo_1572', - 'foo_1573', - 'foo_1574', - 'foo_1575', - 'foo_1576', - 'foo_1577', - 'foo_1578', - 'foo_1579', - 'foo_1580', - 'foo_1581', - 'foo_1582', - 'foo_1583', - 'foo_1584', - 'foo_1585', - 'foo_1586', - 'foo_1587', - 'foo_1588', - 'foo_1589', - 'foo_1590', - 'foo_1591', - 'foo_1592', - 'foo_1593', - 'foo_1594', - 'foo_1595', - 'foo_1596', - 'foo_1597', - 'foo_1598', - 'foo_1599', - 'foo_1600', - 'foo_1601', - 'foo_1602', - 'foo_1603', - 'foo_1604', - 'foo_1605', - 'foo_1606', - 'foo_1607', - 'foo_1608', - 'foo_1609', - 'foo_1610', - 'foo_1611', - 'foo_1612', - 'foo_1613', - 'foo_1614', - 'foo_1615', - 'foo_1616', - 'foo_1617', - 'foo_1618', - 'foo_1619', - 'foo_1620', - 'foo_1621', - 'foo_1622', - 'foo_1623', - 'foo_1624', - 'foo_1625', - 'foo_1626', - 'foo_1627', - 'foo_1628', - 'foo_1629', - 'foo_1630', - 'foo_1631', - 'foo_1632', - 'foo_1633', - 'foo_1634', - 'foo_1635', - 'foo_1636', - 'foo_1637', - 'foo_1638', - 'foo_1639', - 'foo_1640', - 'foo_1641', - 'foo_1642', - 'foo_1643', - 'foo_1644', - 'foo_1645', - 'foo_1646', - 'foo_1647', - 'foo_1648', - 'foo_1649', - 'foo_1650', - 'foo_1651', - 'foo_1652', - 'foo_1653', - 'foo_1654', - 'foo_1655', - 'foo_1656', - 'foo_1657', - 'foo_1658', - 'foo_1659', - 'foo_1660', - 'foo_1661', - 'foo_1662', - 'foo_1663', - 'foo_1664', - 'foo_1665', - 'foo_1666', - 'foo_1667', - 'foo_1668', - 'foo_1669', - 'foo_1670', - 'foo_1671', - 'foo_1672', - 'foo_1673', - 'foo_1674', - 'foo_1675', - 'foo_1676', - 'foo_1677', - 'foo_1678', - 'foo_1679', - 'foo_1680', - 'foo_1681', - 'foo_1682', - 'foo_1683', - 'foo_1684', - 'foo_1685', - 'foo_1686', - 'foo_1687', - 'foo_1688', - 'foo_1689', - 'foo_1690', - 'foo_1691', - 'foo_1692', - 'foo_1693', - 'foo_1694', - 'foo_1695', - 'foo_1696', - 'foo_1697', - 'foo_1698', - 'foo_1699', - 'foo_1700', - 'foo_1701', - 'foo_1702', - 'foo_1703', - 'foo_1704', - 'foo_1705', - 'foo_1706', - 'foo_1707', - 'foo_1708', - 'foo_1709', - 'foo_1710', - 'foo_1711', - 'foo_1712', - 'foo_1713', - 'foo_1714', - 'foo_1715', - 'foo_1716', - 'foo_1717', - 'foo_1718', - 'foo_1719', - 'foo_1720', - 'foo_1721', - 'foo_1722', - 'foo_1723', - 'foo_1724', - 'foo_1725', - 'foo_1726', - 'foo_1727', - 'foo_1728', - 'foo_1729', - 'foo_1730', - 'foo_1731', - 'foo_1732', - 'foo_1733', - 'foo_1734', - 'foo_1735', - 'foo_1736', - 'foo_1737', - 'foo_1738', - 'foo_1739', - 'foo_1740', - 'foo_1741', - 'foo_1742', - 'foo_1743', - 'foo_1744', - 'foo_1745', - 'foo_1746', - 'foo_1747', - 'foo_1748', - 'foo_1749', - 'foo_1750', - 'foo_1751', - 'foo_1752', - 'foo_1753', - 'foo_1754', - 'foo_1755', - 'foo_1756', - 'foo_1757', - 'foo_1758', - 'foo_1759', - 'foo_1760', - 'foo_1761', - 'foo_1762', - 'foo_1763', - 'foo_1764', - 'foo_1765', - 'foo_1766', - 'foo_1767', - 'foo_1768', - 'foo_1769', - 'foo_1770', - 'foo_1771', - 'foo_1772', - 'foo_1773', - 'foo_1774', - 'foo_1775', - 'foo_1776', - 'foo_1777', - 'foo_1778', - 'foo_1779', - 'foo_1780', - 'foo_1781', - 'foo_1782', - 'foo_1783', - 'foo_1784', - 'foo_1785', - 'foo_1786', - 'foo_1787', - 'foo_1788', - 'foo_1789', - 'foo_1790', - 'foo_1791', - 'foo_1792', - 'foo_1793', - 'foo_1794', - 'foo_1795', - 'foo_1796', - 'foo_1797', - 'foo_1798', - 'foo_1799', - 'foo_1800', - 'foo_1801', - 'foo_1802', - 'foo_1803', - 'foo_1804', - 'foo_1805', - 'foo_1806', - 'foo_1807', - 'foo_1808', - 'foo_1809', - 'foo_1810', - 'foo_1811', - 'foo_1812', - 'foo_1813', - 'foo_1814', - 'foo_1815', - 'foo_1816', - 'foo_1817', - 'foo_1818', - 'foo_1819', - 'foo_1820', - 'foo_1821', - 'foo_1822', - 'foo_1823', - 'foo_1824', - 'foo_1825', - 'foo_1826', - 'foo_1827', - 'foo_1828', - 'foo_1829', - 'foo_1830', - 'foo_1831', - 'foo_1832', - 'foo_1833', - 'foo_1834', - 'foo_1835', - 'foo_1836', - 'foo_1837', - 'foo_1838', - 'foo_1839', - 'foo_1840', - 'foo_1841', - 'foo_1842', - 'foo_1843', - 'foo_1844', - 'foo_1845', - 'foo_1846', - 'foo_1847', - 'foo_1848', - 'foo_1849', - 'foo_1850', - 'foo_1851', - 'foo_1852', - 'foo_1853', - 'foo_1854', - 'foo_1855', - 'foo_1856', - 'foo_1857', - 'foo_1858', - 'foo_1859', - 'foo_1860', - 'foo_1861', - 'foo_1862', - 'foo_1863', - 'foo_1864', - 'foo_1865', - 'foo_1866', - 'foo_1867', - 'foo_1868', - 'foo_1869', - 'foo_1870', - 'foo_1871', - 'foo_1872', - 'foo_1873', - 'foo_1874', - 'foo_1875', - 'foo_1876', - 'foo_1877', - 'foo_1878', - 'foo_1879', - 'foo_1880', - 'foo_1881', - 'foo_1882', - 'foo_1883', - 'foo_1884', - 'foo_1885', - 'foo_1886', - 'foo_1887', - 'foo_1888', - 'foo_1889', - 'foo_1890', - 'foo_1891', - 'foo_1892', - 'foo_1893', - 'foo_1894', - 'foo_1895', - 'foo_1896', - 'foo_1897', - 'foo_1898', - 'foo_1899', - 'foo_1900', - 'foo_1901', - 'foo_1902', - 'foo_1903', - 'foo_1904', - 'foo_1905', - 'foo_1906', - 'foo_1907', - 'foo_1908', - 'foo_1909', - 'foo_1910', - 'foo_1911', - 'foo_1912', - 'foo_1913', - 'foo_1914', - 'foo_1915', - 'foo_1916', - 'foo_1917', - 'foo_1918', - 'foo_1919', - 'foo_1920', - 'foo_1921', - 'foo_1922', - 'foo_1923', - 'foo_1924', - 'foo_1925', - 'foo_1926', - 'foo_1927', - 'foo_1928', - 'foo_1929', - 'foo_1930', - 'foo_1931', - 'foo_1932', - 'foo_1933', - 'foo_1934', - 'foo_1935', - 'foo_1936', - 'foo_1937', - 'foo_1938', - 'foo_1939', - 'foo_1940', - 'foo_1941', - 'foo_1942', - 'foo_1943', - 'foo_1944', - 'foo_1945', - 'foo_1946', - 'foo_1947', - 'foo_1948', - 'foo_1949', - 'foo_1950', - 'foo_1951', - 'foo_1952', - 'foo_1953', - 'foo_1954', - 'foo_1955', - 'foo_1956', - 'foo_1957', - 'foo_1958', - 'foo_1959', - 'foo_1960', - 'foo_1961', - 'foo_1962', - 'foo_1963', - 'foo_1964', - 'foo_1965', - 'foo_1966', - 'foo_1967', - 'foo_1968', - 'foo_1969', - 'foo_1970', - 'foo_1971', - 'foo_1972', - 'foo_1973', - 'foo_1974', - 'foo_1975', - 'foo_1976', - 'foo_1977', - 'foo_1978', - 'foo_1979', - 'foo_1980', - 'foo_1981', - 'foo_1982', - 'foo_1983', - 'foo_1984', - 'foo_1985', - 'foo_1986', - 'foo_1987', - 'foo_1988', - 'foo_1989', - 'foo_1990', - 'foo_1991', - 'foo_1992', - 'foo_1993', - 'foo_1994', - 'foo_1995', - 'foo_1996', - 'foo_1997', - 'foo_1998', - 'foo_1999', - 'foo_2000', - 'foo_2001', - 'foo_2002', - 'foo_2003', - 'foo_2004', - 'foo_2005', - 'foo_2006', - 'foo_2007', - 'foo_2008', - 'foo_2009', - 'foo_2010', - 'foo_2011', - 'foo_2012', - 'foo_2013', - 'foo_2014', - 'foo_2015', - 'foo_2016', - 'foo_2017', - 'foo_2018', - 'foo_2019', - 'foo_2020', - 'foo_2021', - 'foo_2022', - 'foo_2023', - 'foo_2024', - 'foo_2025', - 'foo_2026', - 'foo_2027', - 'foo_2028', - 'foo_2029', - 'foo_2030', - 'foo_2031', - 'foo_2032', - 'foo_2033', - 'foo_2034', - 'foo_2035', - 'foo_2036', - 'foo_2037', - 'foo_2038', - 'foo_2039', - 'foo_2040', - 'foo_2041', - 'foo_2042', - 'foo_2043', - 'foo_2044', - 'foo_2045', - 'foo_2046', - 'foo_2047', - 'foo_2048', - 'foo_2049', - 'foo_2050', - 'foo_2051', - 'foo_2052', - 'foo_2053', - 'foo_2054', - 'foo_2055', - 'foo_2056', - 'foo_2057', - 'foo_2058', - 'foo_2059', - 'foo_2060', - 'foo_2061', - 'foo_2062', - 'foo_2063', - 'foo_2064', - 'foo_2065', - 'foo_2066', - 'foo_2067', - 'foo_2068', - 'foo_2069', - 'foo_2070', - 'foo_2071', - 'foo_2072', - 'foo_2073', - 'foo_2074', - 'foo_2075', - 'foo_2076', - 'foo_2077', - 'foo_2078', - 'foo_2079', - 'foo_2080', - 'foo_2081', - 'foo_2082', - 'foo_2083', - 'foo_2084', - 'foo_2085', - 'foo_2086', - 'foo_2087', - 'foo_2088', - 'foo_2089', - 'foo_2090', - 'foo_2091', - 'foo_2092', - 'foo_2093', - 'foo_2094', - 'foo_2095', - 'foo_2096', - 'foo_2097', - 'foo_2098', - 'foo_2099', - 'foo_2100', - 'foo_2101', - 'foo_2102', - 'foo_2103', - 'foo_2104', - 'foo_2105', - 'foo_2106', - 'foo_2107', - 'foo_2108', - 'foo_2109', - 'foo_2110', - 'foo_2111', - 'foo_2112', - 'foo_2113', - 'foo_2114', - 'foo_2115', - 'foo_2116', - 'foo_2117', - 'foo_2118', - 'foo_2119', - 'foo_2120', - 'foo_2121', - 'foo_2122', - 'foo_2123', - 'foo_2124', - 'foo_2125', - 'foo_2126', - 'foo_2127', - 'foo_2128', - 'foo_2129', - 'foo_2130', - 'foo_2131', - 'foo_2132', - 'foo_2133', - 'foo_2134', - 'foo_2135', - 'foo_2136', - 'foo_2137', - 'foo_2138', - 'foo_2139', - 'foo_2140', - 'foo_2141', - 'foo_2142', - 'foo_2143', - 'foo_2144', - 'foo_2145', - 'foo_2146', - 'foo_2147', - 'foo_2148', - 'foo_2149', - 'foo_2150', - 'foo_2151', - 'foo_2152', - 'foo_2153', - 'foo_2154', - 'foo_2155', - 'foo_2156', - 'foo_2157', - 'foo_2158', - 'foo_2159', - 'foo_2160', - 'foo_2161', - 'foo_2162', - 'foo_2163', - 'foo_2164', - 'foo_2165', - 'foo_2166', - 'foo_2167', - 'foo_2168', - 'foo_2169', - 'foo_2170', - 'foo_2171', - 'foo_2172', - 'foo_2173', - 'foo_2174', - 'foo_2175', - 'foo_2176', - 'foo_2177', - 'foo_2178', - 'foo_2179', - 'foo_2180', - 'foo_2181', - 'foo_2182', - 'foo_2183', - 'foo_2184', - 'foo_2185', - 'foo_2186', - 'foo_2187', - 'foo_2188', - 'foo_2189', - 'foo_2190', - 'foo_2191', - 'foo_2192', - 'foo_2193', - 'foo_2194', - 'foo_2195', - 'foo_2196', - 'foo_2197', - 'foo_2198', - 'foo_2199', - 'foo_2200', - 'foo_2201', - 'foo_2202', - 'foo_2203', - 'foo_2204', - 'foo_2205', - 'foo_2206', - 'foo_2207', - 'foo_2208', - 'foo_2209', - 'foo_2210', - 'foo_2211', - 'foo_2212', - 'foo_2213', - 'foo_2214', - 'foo_2215', - 'foo_2216', - 'foo_2217', - 'foo_2218', - 'foo_2219', - 'foo_2220', - 'foo_2221', - 'foo_2222', - 'foo_2223', - 'foo_2224', - 'foo_2225', - 'foo_2226', - 'foo_2227', - 'foo_2228', - 'foo_2229', - 'foo_2230', - 'foo_2231', - 'foo_2232', - 'foo_2233', - 'foo_2234', - 'foo_2235', - 'foo_2236', - 'foo_2237', - 'foo_2238', - 'foo_2239', - 'foo_2240', - 'foo_2241', - 'foo_2242', - 'foo_2243', - 'foo_2244', - 'foo_2245', - 'foo_2246', - 'foo_2247', - 'foo_2248', - 'foo_2249', - 'foo_2250', - 'foo_2251', - 'foo_2252', - 'foo_2253', - 'foo_2254', - 'foo_2255', - 'foo_2256', - 'foo_2257', - 'foo_2258', - 'foo_2259', - 'foo_2260', - 'foo_2261', - 'foo_2262', - 'foo_2263', - 'foo_2264', - 'foo_2265', - 'foo_2266', - 'foo_2267', - 'foo_2268', - 'foo_2269', - 'foo_2270', - 'foo_2271', - 'foo_2272', - 'foo_2273', - 'foo_2274', - 'foo_2275', - 'foo_2276', - 'foo_2277', - 'foo_2278', - 'foo_2279', - 'foo_2280', - 'foo_2281', - 'foo_2282', - 'foo_2283', - 'foo_2284', - 'foo_2285', - 'foo_2286', - 'foo_2287', - 'foo_2288', - 'foo_2289', - 'foo_2290', - 'foo_2291', - 'foo_2292', - 'foo_2293', - 'foo_2294', - 'foo_2295', - 'foo_2296', - 'foo_2297', - 'foo_2298', - 'foo_2299', - 'foo_2300', - 'foo_2301', - 'foo_2302', - 'foo_2303', - 'foo_2304', - 'foo_2305', - 'foo_2306', - 'foo_2307', - 'foo_2308', - 'foo_2309', - 'foo_2310', - 'foo_2311', - 'foo_2312', - 'foo_2313', - 'foo_2314', - 'foo_2315', - 'foo_2316', - 'foo_2317', - 'foo_2318', - 'foo_2319', - 'foo_2320', - 'foo_2321', - 'foo_2322', - 'foo_2323', - 'foo_2324', - 'foo_2325', - 'foo_2326', - 'foo_2327', - 'foo_2328', - 'foo_2329', - 'foo_2330', - 'foo_2331', - 'foo_2332', - 'foo_2333', - 'foo_2334', - 'foo_2335', - 'foo_2336', - 'foo_2337', - 'foo_2338', - 'foo_2339', - 'foo_2340', - 'foo_2341', - 'foo_2342', - 'foo_2343', - 'foo_2344', - 'foo_2345', - 'foo_2346', - 'foo_2347', - 'foo_2348', - 'foo_2349', - 'foo_2350', - 'foo_2351', - 'foo_2352', - 'foo_2353', - 'foo_2354', - 'foo_2355', - 'foo_2356', - 'foo_2357', - 'foo_2358', - 'foo_2359', - 'foo_2360', - 'foo_2361', - 'foo_2362', - 'foo_2363', - 'foo_2364', - 'foo_2365', - 'foo_2366', - 'foo_2367', - 'foo_2368', - 'foo_2369', - 'foo_2370', - 'foo_2371', - 'foo_2372', - 'foo_2373', - 'foo_2374', - 'foo_2375', - 'foo_2376', - 'foo_2377', - 'foo_2378', - 'foo_2379', - 'foo_2380', - 'foo_2381', - 'foo_2382', - 'foo_2383', - 'foo_2384', - 'foo_2385', - 'foo_2386', - 'foo_2387', - 'foo_2388', - 'foo_2389', - 'foo_2390', - 'foo_2391', - 'foo_2392', - 'foo_2393', - 'foo_2394', - 'foo_2395', - 'foo_2396', - 'foo_2397', - 'foo_2398', - 'foo_2399', - 'foo_2400', - 'foo_2401', - 'foo_2402', - 'foo_2403', - 'foo_2404', - 'foo_2405', - 'foo_2406', - 'foo_2407', - 'foo_2408', - 'foo_2409', - 'foo_2410', - 'foo_2411', - 'foo_2412', - 'foo_2413', - 'foo_2414', - 'foo_2415', - 'foo_2416', - 'foo_2417', - 'foo_2418', - 'foo_2419', - 'foo_2420', - 'foo_2421', - 'foo_2422', - 'foo_2423', - 'foo_2424', - 'foo_2425', - 'foo_2426', - 'foo_2427', - 'foo_2428', - 'foo_2429', - 'foo_2430', - 'foo_2431', - 'foo_2432', - 'foo_2433', - 'foo_2434', - 'foo_2435', - 'foo_2436', - 'foo_2437', - 'foo_2438', - 'foo_2439', - 'foo_2440', - 'foo_2441', - 'foo_2442', - 'foo_2443', - 'foo_2444', - 'foo_2445', - 'foo_2446', - 'foo_2447', - 'foo_2448', - 'foo_2449', - 'foo_2450', - 'foo_2451', - 'foo_2452', - 'foo_2453', - 'foo_2454', - 'foo_2455', - 'foo_2456', - 'foo_2457', - 'foo_2458', - 'foo_2459', - 'foo_2460', - 'foo_2461', - 'foo_2462', - 'foo_2463', - 'foo_2464', - 'foo_2465', - 'foo_2466', - 'foo_2467', - 'foo_2468', - 'foo_2469', - 'foo_2470', - 'foo_2471', - 'foo_2472', - 'foo_2473', - 'foo_2474', - 'foo_2475', - 'foo_2476', - 'foo_2477', - 'foo_2478', - 'foo_2479', - 'foo_2480', - 'foo_2481', - 'foo_2482', - 'foo_2483', - 'foo_2484', - 'foo_2485', - 'foo_2486', - 'foo_2487', - 'foo_2488', - 'foo_2489', - 'foo_2490', - 'foo_2491', - 'foo_2492', - 'foo_2493', - 'foo_2494', - 'foo_2495', - 'foo_2496', - 'foo_2497', - 'foo_2498', - 'foo_2499', - 'foo_2500', - 'foo_2501', - 'foo_2502', - 'foo_2503', - 'foo_2504', - 'foo_2505', - 'foo_2506', - 'foo_2507', - 'foo_2508', - 'foo_2509', - 'foo_2510', - 'foo_2511', - 'foo_2512', - 'foo_2513', - 'foo_2514', - 'foo_2515', - 'foo_2516', - 'foo_2517', - 'foo_2518', - 'foo_2519', - 'foo_2520', - 'foo_2521', - 'foo_2522', - 'foo_2523', - 'foo_2524', - 'foo_2525', - 'foo_2526', - 'foo_2527', - 'foo_2528', - 'foo_2529', - 'foo_2530', - 'foo_2531', - 'foo_2532', - 'foo_2533', - 'foo_2534', - 'foo_2535', - 'foo_2536', - 'foo_2537', - 'foo_2538', - 'foo_2539', - 'foo_2540', - 'foo_2541', - 'foo_2542', - 'foo_2543', - 'foo_2544', - 'foo_2545', - 'foo_2546', - 'foo_2547', - 'foo_2548', - 'foo_2549', - 'foo_2550', - 'foo_2551', - 'foo_2552', - 'foo_2553', - 'foo_2554', - 'foo_2555', - 'foo_2556', - 'foo_2557', - 'foo_2558', - 'foo_2559', - 'foo_2560', - 'foo_2561', - 'foo_2562', - 'foo_2563', - 'foo_2564', - 'foo_2565', - 'foo_2566', - 'foo_2567', - 'foo_2568', - 'foo_2569', - 'foo_2570', - 'foo_2571', - 'foo_2572', - 'foo_2573', - 'foo_2574', - 'foo_2575', - 'foo_2576', - 'foo_2577', - 'foo_2578', - 'foo_2579', - 'foo_2580', - 'foo_2581', - 'foo_2582', - 'foo_2583', - 'foo_2584', - 'foo_2585', - 'foo_2586', - 'foo_2587', - 'foo_2588', - 'foo_2589', - 'foo_2590', - 'foo_2591', - 'foo_2592', - 'foo_2593', - 'foo_2594', - 'foo_2595', - 'foo_2596', - 'foo_2597', - 'foo_2598', - 'foo_2599', - 'foo_2600', - 'foo_2601', - 'foo_2602', - 'foo_2603', - 'foo_2604', - 'foo_2605', - 'foo_2606', - 'foo_2607', - 'foo_2608', - 'foo_2609', - 'foo_2610', - 'foo_2611', - 'foo_2612', - 'foo_2613', - 'foo_2614', - 'foo_2615', - 'foo_2616', - 'foo_2617', - 'foo_2618', - 'foo_2619', - 'foo_2620', - 'foo_2621', - 'foo_2622', - 'foo_2623', - 'foo_2624', - 'foo_2625', - 'foo_2626', - 'foo_2627', - 'foo_2628', - 'foo_2629', - 'foo_2630', - 'foo_2631', - 'foo_2632', - 'foo_2633', - 'foo_2634', - 'foo_2635', - 'foo_2636', - 'foo_2637', - 'foo_2638', - 'foo_2639', - 'foo_2640', - 'foo_2641', - 'foo_2642', - 'foo_2643', - 'foo_2644', - 'foo_2645', - 'foo_2646', - 'foo_2647', - 'foo_2648', - 'foo_2649', - 'foo_2650', - 'foo_2651', - 'foo_2652', - 'foo_2653', - 'foo_2654', - 'foo_2655', - 'foo_2656', - 'foo_2657', - 'foo_2658', - 'foo_2659', - 'foo_2660', - 'foo_2661', - 'foo_2662', - 'foo_2663', - 'foo_2664', - 'foo_2665', - 'foo_2666', - 'foo_2667', - 'foo_2668', - 'foo_2669', - 'foo_2670', - 'foo_2671', - 'foo_2672', - 'foo_2673', - 'foo_2674', - 'foo_2675', - 'foo_2676', - 'foo_2677', - 'foo_2678', - 'foo_2679', - 'foo_2680', - 'foo_2681', - 'foo_2682', - 'foo_2683', - 'foo_2684', - 'foo_2685', - 'foo_2686', - 'foo_2687', - 'foo_2688', - 'foo_2689', - 'foo_2690', - 'foo_2691', - 'foo_2692', - 'foo_2693', - 'foo_2694', - 'foo_2695', - 'foo_2696', - 'foo_2697', - 'foo_2698', - 'foo_2699', - 'foo_2700', - 'foo_2701', - 'foo_2702', - 'foo_2703', - 'foo_2704', - 'foo_2705', - 'foo_2706', - 'foo_2707', - 'foo_2708', - 'foo_2709', - 'foo_2710', - 'foo_2711', - 'foo_2712', - 'foo_2713', - 'foo_2714', - 'foo_2715', - 'foo_2716', - 'foo_2717', - 'foo_2718', - 'foo_2719', - 'foo_2720', - 'foo_2721', - 'foo_2722', - 'foo_2723', - 'foo_2724', - 'foo_2725', - 'foo_2726', - 'foo_2727', - 'foo_2728', - 'foo_2729', - 'foo_2730', - 'foo_2731', - 'foo_2732', - 'foo_2733', - 'foo_2734', - 'foo_2735', - 'foo_2736', - 'foo_2737', - 'foo_2738', - 'foo_2739', - 'foo_2740', - 'foo_2741', - 'foo_2742', - 'foo_2743', - 'foo_2744', - 'foo_2745', - 'foo_2746', - 'foo_2747', - 'foo_2748', - 'foo_2749', - 'foo_2750', - 'foo_2751', - 'foo_2752', - 'foo_2753', - 'foo_2754', - 'foo_2755', - 'foo_2756', - 'foo_2757', - 'foo_2758', - 'foo_2759', - 'foo_2760', - 'foo_2761', - 'foo_2762', - 'foo_2763', - 'foo_2764', - 'foo_2765', - 'foo_2766', - 'foo_2767', - 'foo_2768', - 'foo_2769', - 'foo_2770', - 'foo_2771', - 'foo_2772', - 'foo_2773', - 'foo_2774', - 'foo_2775', - 'foo_2776', - 'foo_2777', - 'foo_2778', - 'foo_2779', - 'foo_2780', - 'foo_2781', - 'foo_2782', - 'foo_2783', - 'foo_2784', - 'foo_2785', - 'foo_2786', - 'foo_2787', - 'foo_2788', - 'foo_2789', - 'foo_2790', - 'foo_2791', - 'foo_2792', - 'foo_2793', - 'foo_2794', - 'foo_2795', - 'foo_2796', - 'foo_2797', - 'foo_2798', - 'foo_2799', - 'foo_2800', - 'foo_2801', - 'foo_2802', - 'foo_2803', - 'foo_2804', - 'foo_2805', - 'foo_2806', - 'foo_2807', - 'foo_2808', - 'foo_2809', - 'foo_2810', - 'foo_2811', - 'foo_2812', - 'foo_2813', - 'foo_2814', - 'foo_2815', - 'foo_2816', - 'foo_2817', - 'foo_2818', - 'foo_2819', - 'foo_2820', - 'foo_2821', - 'foo_2822', - 'foo_2823', - 'foo_2824', - 'foo_2825', - 'foo_2826', - 'foo_2827', - 'foo_2828', - 'foo_2829', - 'foo_2830', - 'foo_2831', - 'foo_2832', - 'foo_2833', - 'foo_2834', - 'foo_2835', - 'foo_2836', - 'foo_2837', - 'foo_2838', - 'foo_2839', - 'foo_2840', - 'foo_2841', - 'foo_2842', - 'foo_2843', - 'foo_2844', - 'foo_2845', - 'foo_2846', - 'foo_2847', - 'foo_2848', - 'foo_2849', - 'foo_2850', - 'foo_2851', - 'foo_2852', - 'foo_2853', - 'foo_2854', - 'foo_2855', - 'foo_2856', - 'foo_2857', - 'foo_2858', - 'foo_2859', - 'foo_2860', - 'foo_2861', - 'foo_2862', - 'foo_2863', - 'foo_2864', - 'foo_2865', - 'foo_2866', - 'foo_2867', - 'foo_2868', - 'foo_2869', - 'foo_2870', - 'foo_2871', - 'foo_2872', - 'foo_2873', - 'foo_2874', - 'foo_2875', - 'foo_2876', - 'foo_2877', - 'foo_2878', - 'foo_2879', - 'foo_2880', - 'foo_2881', - 'foo_2882', - 'foo_2883', - 'foo_2884', - 'foo_2885', - 'foo_2886', - 'foo_2887', - 'foo_2888', - 'foo_2889', - 'foo_2890', - 'foo_2891', - 'foo_2892', - 'foo_2893', - 'foo_2894', - 'foo_2895', - 'foo_2896', - 'foo_2897', - 'foo_2898', - 'foo_2899', - 'foo_2900', - 'foo_2901', - 'foo_2902', - 'foo_2903', - 'foo_2904', - 'foo_2905', - 'foo_2906', - 'foo_2907', - 'foo_2908', - 'foo_2909', - 'foo_2910', - 'foo_2911', - 'foo_2912', - 'foo_2913', - 'foo_2914', - 'foo_2915', - 'foo_2916', - 'foo_2917', - 'foo_2918', - 'foo_2919', - 'foo_2920', - 'foo_2921', - 'foo_2922', - 'foo_2923', - 'foo_2924', - 'foo_2925', - 'foo_2926', - 'foo_2927', - 'foo_2928', - 'foo_2929', - 'foo_2930', - 'foo_2931', - 'foo_2932', - 'foo_2933', - 'foo_2934', - 'foo_2935', - 'foo_2936', - 'foo_2937', - 'foo_2938', - 'foo_2939', - 'foo_2940', - 'foo_2941', - 'foo_2942', - 'foo_2943', - 'foo_2944', - 'foo_2945', - 'foo_2946', - 'foo_2947', - 'foo_2948', - 'foo_2949', - 'foo_2950', - 'foo_2951', - 'foo_2952', - 'foo_2953', - 'foo_2954', - 'foo_2955', - 'foo_2956', - 'foo_2957', - 'foo_2958', - 'foo_2959', - 'foo_2960', - 'foo_2961', - 'foo_2962', - 'foo_2963', - 'foo_2964', - 'foo_2965', - 'foo_2966', - 'foo_2967', - 'foo_2968', - 'foo_2969', - 'foo_2970', - 'foo_2971', - 'foo_2972', - 'foo_2973', - 'foo_2974', - 'foo_2975', - 'foo_2976', - 'foo_2977', - 'foo_2978', - 'foo_2979', - 'foo_2980', - 'foo_2981', - 'foo_2982', - 'foo_2983', - 'foo_2984', - 'foo_2985', - 'foo_2986', - 'foo_2987', - 'foo_2988', - 'foo_2989', - 'foo_2990', - 'foo_2991', - 'foo_2992', - 'foo_2993', - 'foo_2994', - 'foo_2995', - 'foo_2996', - 'foo_2997', - 'foo_2998', - 'foo_2999', - 'foo_3000', - 'foo_3001', - 'foo_3002', - 'foo_3003', - 'foo_3004', - 'foo_3005', - 'foo_3006', - 'foo_3007', - 'foo_3008', - 'foo_3009', - 'foo_3010', - 'foo_3011', - 'foo_3012', - 'foo_3013', - 'foo_3014', - 'foo_3015', - 'foo_3016', - 'foo_3017', - 'foo_3018', - 'foo_3019', - 'foo_3020', - 'foo_3021', - 'foo_3022', - 'foo_3023', - 'foo_3024', - 'foo_3025', - 'foo_3026', - 'foo_3027', - 'foo_3028', - 'foo_3029', - 'foo_3030', - 'foo_3031', - 'foo_3032', - 'foo_3033', - 'foo_3034', - 'foo_3035', - 'foo_3036', - 'foo_3037', - 'foo_3038', - 'foo_3039', - 'foo_3040', - 'foo_3041', - 'foo_3042', - 'foo_3043', - 'foo_3044', - 'foo_3045', - 'foo_3046', - 'foo_3047', - 'foo_3048', - 'foo_3049', - 'foo_3050', - 'foo_3051', - 'foo_3052', - 'foo_3053', - 'foo_3054', - 'foo_3055', - 'foo_3056', - 'foo_3057', - 'foo_3058', - 'foo_3059', - 'foo_3060', - 'foo_3061', - 'foo_3062', - 'foo_3063', - 'foo_3064', - 'foo_3065', - 'foo_3066', - 'foo_3067', - 'foo_3068', - 'foo_3069', - 'foo_3070', - 'foo_3071', - 'foo_3072', - 'foo_3073', - 'foo_3074', - 'foo_3075', - 'foo_3076', - 'foo_3077', - 'foo_3078', - 'foo_3079', - 'foo_3080', - 'foo_3081', - 'foo_3082', - 'foo_3083', - 'foo_3084', - 'foo_3085', - 'foo_3086', - 'foo_3087', - 'foo_3088', - 'foo_3089', - 'foo_3090', - 'foo_3091', - 'foo_3092', - 'foo_3093', - 'foo_3094', - 'foo_3095', - 'foo_3096', - 'foo_3097', - 'foo_3098', - 'foo_3099', - 'foo_3100', - 'foo_3101', - 'foo_3102', - 'foo_3103', - 'foo_3104', - 'foo_3105', - 'foo_3106', - 'foo_3107', - 'foo_3108', - 'foo_3109', - 'foo_3110', - 'foo_3111', - 'foo_3112', - 'foo_3113', - 'foo_3114', - 'foo_3115', - 'foo_3116', - 'foo_3117', - 'foo_3118', - 'foo_3119', - 'foo_3120', - 'foo_3121', - 'foo_3122', - 'foo_3123', - 'foo_3124', - 'foo_3125', - 'foo_3126', - 'foo_3127', - 'foo_3128', - 'foo_3129', - 'foo_3130', - 'foo_3131', - 'foo_3132', - 'foo_3133', - 'foo_3134', - 'foo_3135', - 'foo_3136', - 'foo_3137', - 'foo_3138', - 'foo_3139', - 'foo_3140', - 'foo_3141', - 'foo_3142', - 'foo_3143', - 'foo_3144', - 'foo_3145', - 'foo_3146', - 'foo_3147', - 'foo_3148', - 'foo_3149', - 'foo_3150', - 'foo_3151', - 'foo_3152', - 'foo_3153', - 'foo_3154', - 'foo_3155', - 'foo_3156', - 'foo_3157', - 'foo_3158', - 'foo_3159', - 'foo_3160', - 'foo_3161', - 'foo_3162', - 'foo_3163', - 'foo_3164', - 'foo_3165', - 'foo_3166', - 'foo_3167', - 'foo_3168', - 'foo_3169', - 'foo_3170', - 'foo_3171', - 'foo_3172', - 'foo_3173', - 'foo_3174', - 'foo_3175', - 'foo_3176', - 'foo_3177', - 'foo_3178', - 'foo_3179', - 'foo_3180', - 'foo_3181', - 'foo_3182', - 'foo_3183', - 'foo_3184', - 'foo_3185', - 'foo_3186', - 'foo_3187', - 'foo_3188', - 'foo_3189', - 'foo_3190', - 'foo_3191', - 'foo_3192', - 'foo_3193', - 'foo_3194', - 'foo_3195', - 'foo_3196', - 'foo_3197', - 'foo_3198', - 'foo_3199', - 'foo_3200', - 'foo_3201', - 'foo_3202', - 'foo_3203', - 'foo_3204', - 'foo_3205', - 'foo_3206', - 'foo_3207', - 'foo_3208', - 'foo_3209', - 'foo_3210', - 'foo_3211', - 'foo_3212', - 'foo_3213', - 'foo_3214', - 'foo_3215', - 'foo_3216', - 'foo_3217', - 'foo_3218', - 'foo_3219', - 'foo_3220', - 'foo_3221', - 'foo_3222', - 'foo_3223', - 'foo_3224', - 'foo_3225', - 'foo_3226', - 'foo_3227', - 'foo_3228', - 'foo_3229', - 'foo_3230', - 'foo_3231', - 'foo_3232', - 'foo_3233', - 'foo_3234', - 'foo_3235', - 'foo_3236', - 'foo_3237', - 'foo_3238', - 'foo_3239', - 'foo_3240', - 'foo_3241', - 'foo_3242', - 'foo_3243', - 'foo_3244', - 'foo_3245', - 'foo_3246', - 'foo_3247', - 'foo_3248', - 'foo_3249', - 'foo_3250', - 'foo_3251', - 'foo_3252', - 'foo_3253', - 'foo_3254', - 'foo_3255', - 'foo_3256', - 'foo_3257', - 'foo_3258', - 'foo_3259', - 'foo_3260', - 'foo_3261', - 'foo_3262', - 'foo_3263', - 'foo_3264', - 'foo_3265', - 'foo_3266', - 'foo_3267', - 'foo_3268', - 'foo_3269', - 'foo_3270', - 'foo_3271', - 'foo_3272', - 'foo_3273', - 'foo_3274', - 'foo_3275', - 'foo_3276', - 'foo_3277', - 'foo_3278', - 'foo_3279', - 'foo_3280', - 'foo_3281', - 'foo_3282', - 'foo_3283', - 'foo_3284', - 'foo_3285', - 'foo_3286', - 'foo_3287', - 'foo_3288', - 'foo_3289', - 'foo_3290', - 'foo_3291', - 'foo_3292', - 'foo_3293', - 'foo_3294', - 'foo_3295', - 'foo_3296', - 'foo_3297', - 'foo_3298', - 'foo_3299', - 'foo_3300', - 'foo_3301', - 'foo_3302', - 'foo_3303', - 'foo_3304', - 'foo_3305', - 'foo_3306', - 'foo_3307', - 'foo_3308', - 'foo_3309', - 'foo_3310', - 'foo_3311', - 'foo_3312', - 'foo_3313', - 'foo_3314', - 'foo_3315', - 'foo_3316', - 'foo_3317', - 'foo_3318', - 'foo_3319', - 'foo_3320', - 'foo_3321', - 'foo_3322', - 'foo_3323', - 'foo_3324', - 'foo_3325', - 'foo_3326', - 'foo_3327', - 'foo_3328', - 'foo_3329', - 'foo_3330', - 'foo_3331', - 'foo_3332', - 'foo_3333', - 'foo_3334', - 'foo_3335', - 'foo_3336', - 'foo_3337', - 'foo_3338', - 'foo_3339', - 'foo_3340', - 'foo_3341', - 'foo_3342', - 'foo_3343', - 'foo_3344', - 'foo_3345', - 'foo_3346', - 'foo_3347', - 'foo_3348', - 'foo_3349', - 'foo_3350', - 'foo_3351', - 'foo_3352', - 'foo_3353', - 'foo_3354', - 'foo_3355', - 'foo_3356', - 'foo_3357', - 'foo_3358', - 'foo_3359', - 'foo_3360', - 'foo_3361', - 'foo_3362', - 'foo_3363', - 'foo_3364', - 'foo_3365', - 'foo_3366', - 'foo_3367', - 'foo_3368', - 'foo_3369', - 'foo_3370', - 'foo_3371', - 'foo_3372', - 'foo_3373', - 'foo_3374', - 'foo_3375', - 'foo_3376', - 'foo_3377', - 'foo_3378', - 'foo_3379', - 'foo_3380', - 'foo_3381', - 'foo_3382', - 'foo_3383', - 'foo_3384', - 'foo_3385', - 'foo_3386', - 'foo_3387', - 'foo_3388', - 'foo_3389', - 'foo_3390', - 'foo_3391', - 'foo_3392', - 'foo_3393', - 'foo_3394', - 'foo_3395', - 'foo_3396', - 'foo_3397', - 'foo_3398', - 'foo_3399', - 'foo_3400', - 'foo_3401', - 'foo_3402', - 'foo_3403', - 'foo_3404', - 'foo_3405', - 'foo_3406', - 'foo_3407', - 'foo_3408', - 'foo_3409', - 'foo_3410', - 'foo_3411', - 'foo_3412', - 'foo_3413', - 'foo_3414', - 'foo_3415', - 'foo_3416', - 'foo_3417', - 'foo_3418', - 'foo_3419', - 'foo_3420', - 'foo_3421', - 'foo_3422', - 'foo_3423', - 'foo_3424', - 'foo_3425', - 'foo_3426', - 'foo_3427', - 'foo_3428', - 'foo_3429', - 'foo_3430', - 'foo_3431', - 'foo_3432', - 'foo_3433', - 'foo_3434', - 'foo_3435', - 'foo_3436', - 'foo_3437', - 'foo_3438', - 'foo_3439', - 'foo_3440', - 'foo_3441', - 'foo_3442', - 'foo_3443', - 'foo_3444', - 'foo_3445', - 'foo_3446', - 'foo_3447', - 'foo_3448', - 'foo_3449', - 'foo_3450', - 'foo_3451', - 'foo_3452', - 'foo_3453', - 'foo_3454', - 'foo_3455', - 'foo_3456', - 'foo_3457', - 'foo_3458', - 'foo_3459', - 'foo_3460', - 'foo_3461', - 'foo_3462', - 'foo_3463', - 'foo_3464', - 'foo_3465', - 'foo_3466', - 'foo_3467', - 'foo_3468', - 'foo_3469', - 'foo_3470', - 'foo_3471', - 'foo_3472', - 'foo_3473', - 'foo_3474', - 'foo_3475', - 'foo_3476', - 'foo_3477', - 'foo_3478', - 'foo_3479', - 'foo_3480', - 'foo_3481', - 'foo_3482', - 'foo_3483', - 'foo_3484', - 'foo_3485', - 'foo_3486', - 'foo_3487', - 'foo_3488', - 'foo_3489', - 'foo_3490', - 'foo_3491', - 'foo_3492', - 'foo_3493', - 'foo_3494', - 'foo_3495', - 'foo_3496', - 'foo_3497', - 'foo_3498', - 'foo_3499', - 'foo_3500', - 'foo_3501', - 'foo_3502', - 'foo_3503', - 'foo_3504', - 'foo_3505', - 'foo_3506', - 'foo_3507', - 'foo_3508', - 'foo_3509', - 'foo_3510', - 'foo_3511', - 'foo_3512', - 'foo_3513', - 'foo_3514', - 'foo_3515', - 'foo_3516', - 'foo_3517', - 'foo_3518', - 'foo_3519', - 'foo_3520', - 'foo_3521', - 'foo_3522', - 'foo_3523', - 'foo_3524', - 'foo_3525', - 'foo_3526', - 'foo_3527', - 'foo_3528', - 'foo_3529', - 'foo_3530', - 'foo_3531', - 'foo_3532', - 'foo_3533', - 'foo_3534', - 'foo_3535', - 'foo_3536', - 'foo_3537', - 'foo_3538', - 'foo_3539', - 'foo_3540', - 'foo_3541', - 'foo_3542', - 'foo_3543', - 'foo_3544', - 'foo_3545', - 'foo_3546', - 'foo_3547', - 'foo_3548', - 'foo_3549', - 'foo_3550', - 'foo_3551', - 'foo_3552', - 'foo_3553', - 'foo_3554', - 'foo_3555', - 'foo_3556', - 'foo_3557', - 'foo_3558', - 'foo_3559', - 'foo_3560', - 'foo_3561', - 'foo_3562', - 'foo_3563', - 'foo_3564', - 'foo_3565', - 'foo_3566', - 'foo_3567', - 'foo_3568', - 'foo_3569', - 'foo_3570', - 'foo_3571', - 'foo_3572', - 'foo_3573', - 'foo_3574', - 'foo_3575', - 'foo_3576', - 'foo_3577', - 'foo_3578', - 'foo_3579', - 'foo_3580', - 'foo_3581', - 'foo_3582', - 'foo_3583', - 'foo_3584', - 'foo_3585', - 'foo_3586', - 'foo_3587', - 'foo_3588', - 'foo_3589', - 'foo_3590', - 'foo_3591', - 'foo_3592', - 'foo_3593', - 'foo_3594', - 'foo_3595', - 'foo_3596', - 'foo_3597', - 'foo_3598', - 'foo_3599', - 'foo_3600', - 'foo_3601', - 'foo_3602', - 'foo_3603', - 'foo_3604', - 'foo_3605', - 'foo_3606', - 'foo_3607', - 'foo_3608', - 'foo_3609', - 'foo_3610', - 'foo_3611', - 'foo_3612', - 'foo_3613', - 'foo_3614', - 'foo_3615', - 'foo_3616', - 'foo_3617', - 'foo_3618', - 'foo_3619', - 'foo_3620', - 'foo_3621', - 'foo_3622', - 'foo_3623', - 'foo_3624', - 'foo_3625', - 'foo_3626', - 'foo_3627', - 'foo_3628', - 'foo_3629', - 'foo_3630', - 'foo_3631', - 'foo_3632', - 'foo_3633', - 'foo_3634', - 'foo_3635', - 'foo_3636', - 'foo_3637', - 'foo_3638', - 'foo_3639', - 'foo_3640', - 'foo_3641', - 'foo_3642', - 'foo_3643', - 'foo_3644', - 'foo_3645', - 'foo_3646', - 'foo_3647', - 'foo_3648', - 'foo_3649', - 'foo_3650', - 'foo_3651', - 'foo_3652', - 'foo_3653', - 'foo_3654', - 'foo_3655', - 'foo_3656', - 'foo_3657', - 'foo_3658', - 'foo_3659', - 'foo_3660', - 'foo_3661', - 'foo_3662', - 'foo_3663', - 'foo_3664', - 'foo_3665', - 'foo_3666', - 'foo_3667', - 'foo_3668', - 'foo_3669', - 'foo_3670', - 'foo_3671', - 'foo_3672', - 'foo_3673', - 'foo_3674', - 'foo_3675', - 'foo_3676', - 'foo_3677', - 'foo_3678', - 'foo_3679', - 'foo_3680', - 'foo_3681', - 'foo_3682', - 'foo_3683', - 'foo_3684', - 'foo_3685', - 'foo_3686', - 'foo_3687', - 'foo_3688', - 'foo_3689', - 'foo_3690', - 'foo_3691', - 'foo_3692', - 'foo_3693', - 'foo_3694', - 'foo_3695', - 'foo_3696', - 'foo_3697', - 'foo_3698', - 'foo_3699', - 'foo_3700', - 'foo_3701', - 'foo_3702', - 'foo_3703', - 'foo_3704', - 'foo_3705', - 'foo_3706', - 'foo_3707', - 'foo_3708', - 'foo_3709', - 'foo_3710', - 'foo_3711', - 'foo_3712', - 'foo_3713', - 'foo_3714', - 'foo_3715', - 'foo_3716', - 'foo_3717', - 'foo_3718', - 'foo_3719', - 'foo_3720', - 'foo_3721', - 'foo_3722', - 'foo_3723', - 'foo_3724', - 'foo_3725', - 'foo_3726', - 'foo_3727', - 'foo_3728', - 'foo_3729', - 'foo_3730', - 'foo_3731', - 'foo_3732', - 'foo_3733', - 'foo_3734', - 'foo_3735', - 'foo_3736', - 'foo_3737', - 'foo_3738', - 'foo_3739', - 'foo_3740', - 'foo_3741', - 'foo_3742', - 'foo_3743', - 'foo_3744', - 'foo_3745', - 'foo_3746', - 'foo_3747', - 'foo_3748', - 'foo_3749', - 'foo_3750', - 'foo_3751', - 'foo_3752', - 'foo_3753', - 'foo_3754', - 'foo_3755', - 'foo_3756', - 'foo_3757', - 'foo_3758', - 'foo_3759', - 'foo_3760', - 'foo_3761', - 'foo_3762', - 'foo_3763', - 'foo_3764', - 'foo_3765', - 'foo_3766', - 'foo_3767', - 'foo_3768', - 'foo_3769', - 'foo_3770', - 'foo_3771', - 'foo_3772', - 'foo_3773', - 'foo_3774', - 'foo_3775', - 'foo_3776', - 'foo_3777', - 'foo_3778', - 'foo_3779', - 'foo_3780', - 'foo_3781', - 'foo_3782', - 'foo_3783', - 'foo_3784', - 'foo_3785', - 'foo_3786', - 'foo_3787', - 'foo_3788', - 'foo_3789', - 'foo_3790', - 'foo_3791', - 'foo_3792', - 'foo_3793', - 'foo_3794', - 'foo_3795', - 'foo_3796', - 'foo_3797', - 'foo_3798', - 'foo_3799', - 'foo_3800', - 'foo_3801', - 'foo_3802', - 'foo_3803', - 'foo_3804', - 'foo_3805', - 'foo_3806', - 'foo_3807', - 'foo_3808', - 'foo_3809', - 'foo_3810', - 'foo_3811', - 'foo_3812', - 'foo_3813', - 'foo_3814', - 'foo_3815', - 'foo_3816', - 'foo_3817', - 'foo_3818', - 'foo_3819', - 'foo_3820', - 'foo_3821', - 'foo_3822', - 'foo_3823', - 'foo_3824', - 'foo_3825', - 'foo_3826', - 'foo_3827', - 'foo_3828', - 'foo_3829', - 'foo_3830', - 'foo_3831', - 'foo_3832', - 'foo_3833', - 'foo_3834', - 'foo_3835', - 'foo_3836', - 'foo_3837', - 'foo_3838', - 'foo_3839', - 'foo_3840', - 'foo_3841', - 'foo_3842', - 'foo_3843', - 'foo_3844', - 'foo_3845', - 'foo_3846', - 'foo_3847', - 'foo_3848', - 'foo_3849', - 'foo_3850', - 'foo_3851', - 'foo_3852', - 'foo_3853', - 'foo_3854', - 'foo_3855', - 'foo_3856', - 'foo_3857', - 'foo_3858', - 'foo_3859', - 'foo_3860', - 'foo_3861', - 'foo_3862', - 'foo_3863', - 'foo_3864', - 'foo_3865', - 'foo_3866', - 'foo_3867', - 'foo_3868', - 'foo_3869', - 'foo_3870', - 'foo_3871', - 'foo_3872', - 'foo_3873', - 'foo_3874', - 'foo_3875', - 'foo_3876', - 'foo_3877', - 'foo_3878', - 'foo_3879', - 'foo_3880', - 'foo_3881', - 'foo_3882', - 'foo_3883', - 'foo_3884', - 'foo_3885', - 'foo_3886', - 'foo_3887', - 'foo_3888', - 'foo_3889', - 'foo_3890', - 'foo_3891', - 'foo_3892', - 'foo_3893', - 'foo_3894', - 'foo_3895', - 'foo_3896', - 'foo_3897', - 'foo_3898', - 'foo_3899', - 'foo_3900', - 'foo_3901', - 'foo_3902', - 'foo_3903', - 'foo_3904', - 'foo_3905', - 'foo_3906', - 'foo_3907', - 'foo_3908', - 'foo_3909', - 'foo_3910', - 'foo_3911', - 'foo_3912', - 'foo_3913', - 'foo_3914', - 'foo_3915', - 'foo_3916', - 'foo_3917', - 'foo_3918', - 'foo_3919', - 'foo_3920', - 'foo_3921', - 'foo_3922', - 'foo_3923', - 'foo_3924', - 'foo_3925', - 'foo_3926', - 'foo_3927', - 'foo_3928', - 'foo_3929', - 'foo_3930', - 'foo_3931', - 'foo_3932', - 'foo_3933', - 'foo_3934', - 'foo_3935', - 'foo_3936', - 'foo_3937', - 'foo_3938', - 'foo_3939', - 'foo_3940', - 'foo_3941', - 'foo_3942', - 'foo_3943', - 'foo_3944', - 'foo_3945', - 'foo_3946', - 'foo_3947', - 'foo_3948', - 'foo_3949', - 'foo_3950', - 'foo_3951', - 'foo_3952', - 'foo_3953', - 'foo_3954', - 'foo_3955', - 'foo_3956', - 'foo_3957', - 'foo_3958', - 'foo_3959', - 'foo_3960', - 'foo_3961', - 'foo_3962', - 'foo_3963', - 'foo_3964', - 'foo_3965', - 'foo_3966', - 'foo_3967', - 'foo_3968', - 'foo_3969', - 'foo_3970', - 'foo_3971', - 'foo_3972', - 'foo_3973', - 'foo_3974', - 'foo_3975', - 'foo_3976', - 'foo_3977', - 'foo_3978', - 'foo_3979', - 'foo_3980', - 'foo_3981', - 'foo_3982', - 'foo_3983', - 'foo_3984', - 'foo_3985', - 'foo_3986', - 'foo_3987', - 'foo_3988', - 'foo_3989', - 'foo_3990', - 'foo_3991', - 'foo_3992', - 'foo_3993', - 'foo_3994', - 'foo_3995', - 'foo_3996', - 'foo_3997', - 'foo_3998', - 'foo_3999', - 'foo_4000', - 'foo_4001', - 'foo_4002', - 'foo_4003', - 'foo_4004', - 'foo_4005', - 'foo_4006', - 'foo_4007', - 'foo_4008', - 'foo_4009', - 'foo_4010', - 'foo_4011', - 'foo_4012', - 'foo_4013', - 'foo_4014', - 'foo_4015', - 'foo_4016', - 'foo_4017', - 'foo_4018', - 'foo_4019', - 'foo_4020', - 'foo_4021', - 'foo_4022', - 'foo_4023', - 'foo_4024', - 'foo_4025', - 'foo_4026', - 'foo_4027', - 'foo_4028', - 'foo_4029', - 'foo_4030', - 'foo_4031', - 'foo_4032', - 'foo_4033', - 'foo_4034', - 'foo_4035', - 'foo_4036', - 'foo_4037', - 'foo_4038', - 'foo_4039', - 'foo_4040', - 'foo_4041', - 'foo_4042', - 'foo_4043', - 'foo_4044', - 'foo_4045', - 'foo_4046', - 'foo_4047', - 'foo_4048', - 'foo_4049', - 'foo_4050', - 'foo_4051', - 'foo_4052', - 'foo_4053', - 'foo_4054', - 'foo_4055', - 'foo_4056', - 'foo_4057', - 'foo_4058', - 'foo_4059', - 'foo_4060', - 'foo_4061', - 'foo_4062', - 'foo_4063', - 'foo_4064', - 'foo_4065', - 'foo_4066', - 'foo_4067', - 'foo_4068', - 'foo_4069', - 'foo_4070', - 'foo_4071', - 'foo_4072', - 'foo_4073', - 'foo_4074', - 'foo_4075', - 'foo_4076', - 'foo_4077', - 'foo_4078', - 'foo_4079', - 'foo_4080', - 'foo_4081', - 'foo_4082', - 'foo_4083', - 'foo_4084', - 'foo_4085', - 'foo_4086', - 'foo_4087', - 'foo_4088', - 'foo_4089', - 'foo_4090', - 'foo_4091', - 'foo_4092', - 'foo_4093', - 'foo_4094', - 'foo_4095', - 'foo_4096', - 'foo_4097', - 'foo_4098', - 'foo_4099', - 'foo_4100', - 'foo_4101', - 'foo_4102', - 'foo_4103', - 'foo_4104', - 'foo_4105', - 'foo_4106', - 'foo_4107', - 'foo_4108', - 'foo_4109', - 'foo_4110', - 'foo_4111', - 'foo_4112', - 'foo_4113', - 'foo_4114', - 'foo_4115', - 'foo_4116', - 'foo_4117', - 'foo_4118', - 'foo_4119', - 'foo_4120', - 'foo_4121', - 'foo_4122', - 'foo_4123', - 'foo_4124', - 'foo_4125', - 'foo_4126', - 'foo_4127', - 'foo_4128', - 'foo_4129', - 'foo_4130', - 'foo_4131', - 'foo_4132', - 'foo_4133', - 'foo_4134', - 'foo_4135', - 'foo_4136', - 'foo_4137', - 'foo_4138', - 'foo_4139', - 'foo_4140', - 'foo_4141', - 'foo_4142', - 'foo_4143', - 'foo_4144', - 'foo_4145', - 'foo_4146', - 'foo_4147', - 'foo_4148', - 'foo_4149', - 'foo_4150', - 'foo_4151', - 'foo_4152', - 'foo_4153', - 'foo_4154', - 'foo_4155', - 'foo_4156', - 'foo_4157', - 'foo_4158', - 'foo_4159', - 'foo_4160', - 'foo_4161', - 'foo_4162', - 'foo_4163', - 'foo_4164', - 'foo_4165', - 'foo_4166', - 'foo_4167', - 'foo_4168', - 'foo_4169', - 'foo_4170', - 'foo_4171', - 'foo_4172', - 'foo_4173', - 'foo_4174', - 'foo_4175', - 'foo_4176', - 'foo_4177', - 'foo_4178', - 'foo_4179', - 'foo_4180', - 'foo_4181', - 'foo_4182', - 'foo_4183', - 'foo_4184', - 'foo_4185', - 'foo_4186', - 'foo_4187', - 'foo_4188', - 'foo_4189', - 'foo_4190', - 'foo_4191', - 'foo_4192', - 'foo_4193', - 'foo_4194', - 'foo_4195', - 'foo_4196', - 'foo_4197', - 'foo_4198', - 'foo_4199', - 'foo_4200', - 'foo_4201', - 'foo_4202', - 'foo_4203', - 'foo_4204', - 'foo_4205', - 'foo_4206', - 'foo_4207', - 'foo_4208', - 'foo_4209', - 'foo_4210', - 'foo_4211', - 'foo_4212', - 'foo_4213', - 'foo_4214', - 'foo_4215', - 'foo_4216', - 'foo_4217', - 'foo_4218', - 'foo_4219', - 'foo_4220', - 'foo_4221', - 'foo_4222', - 'foo_4223', - 'foo_4224', - 'foo_4225', - 'foo_4226', - 'foo_4227', - 'foo_4228', - 'foo_4229', - 'foo_4230', - 'foo_4231', - 'foo_4232', - 'foo_4233', - 'foo_4234', - 'foo_4235', - 'foo_4236', - 'foo_4237', - 'foo_4238', - 'foo_4239', - 'foo_4240', - 'foo_4241', - 'foo_4242', - 'foo_4243', - 'foo_4244', - 'foo_4245', - 'foo_4246', - 'foo_4247', - 'foo_4248', - 'foo_4249', - 'foo_4250', - 'foo_4251', - 'foo_4252', - 'foo_4253', - 'foo_4254', - 'foo_4255', - 'foo_4256', - 'foo_4257', - 'foo_4258', - 'foo_4259', - 'foo_4260', - 'foo_4261', - 'foo_4262', - 'foo_4263', - 'foo_4264', - 'foo_4265', - 'foo_4266', - 'foo_4267', - 'foo_4268', - 'foo_4269', - 'foo_4270', - 'foo_4271', - 'foo_4272', - 'foo_4273', - 'foo_4274', - 'foo_4275', - 'foo_4276', - 'foo_4277', - 'foo_4278', - 'foo_4279', - 'foo_4280', - 'foo_4281', - 'foo_4282', - 'foo_4283', - 'foo_4284', - 'foo_4285', - 'foo_4286', - 'foo_4287', - 'foo_4288', - 'foo_4289', - 'foo_4290', - 'foo_4291', - 'foo_4292', - 'foo_4293', - 'foo_4294', - 'foo_4295', - 'foo_4296', - 'foo_4297', - 'foo_4298', - 'foo_4299', - 'foo_4300', - 'foo_4301', - 'foo_4302', - 'foo_4303', - 'foo_4304', - 'foo_4305', - 'foo_4306', - 'foo_4307', - 'foo_4308', - 'foo_4309', - 'foo_4310', - 'foo_4311', - 'foo_4312', - 'foo_4313', - 'foo_4314', - 'foo_4315', - 'foo_4316', - 'foo_4317', - 'foo_4318', - 'foo_4319', - 'foo_4320', - 'foo_4321', - 'foo_4322', - 'foo_4323', - 'foo_4324', - 'foo_4325', - 'foo_4326', - 'foo_4327', - 'foo_4328', - 'foo_4329', - 'foo_4330', - 'foo_4331', - 'foo_4332', - 'foo_4333', - 'foo_4334', - 'foo_4335', - 'foo_4336', - 'foo_4337', - 'foo_4338', - 'foo_4339', - 'foo_4340', - 'foo_4341', - 'foo_4342', - 'foo_4343', - 'foo_4344', - 'foo_4345', - 'foo_4346', - 'foo_4347', - 'foo_4348', - 'foo_4349', - 'foo_4350', - 'foo_4351', - 'foo_4352', - 'foo_4353', - 'foo_4354', - 'foo_4355', - 'foo_4356', - 'foo_4357', - 'foo_4358', - 'foo_4359', - 'foo_4360', - 'foo_4361', - 'foo_4362', - 'foo_4363', - 'foo_4364', - 'foo_4365', - 'foo_4366', - 'foo_4367', - 'foo_4368', - 'foo_4369', - 'foo_4370', - 'foo_4371', - 'foo_4372', - 'foo_4373', - 'foo_4374', - 'foo_4375', - 'foo_4376', - 'foo_4377', - 'foo_4378', - 'foo_4379', - 'foo_4380', - 'foo_4381', - 'foo_4382', - 'foo_4383', - 'foo_4384', - 'foo_4385', - 'foo_4386', - 'foo_4387', - 'foo_4388', - 'foo_4389', - 'foo_4390', - 'foo_4391', - 'foo_4392', - 'foo_4393', - 'foo_4394', - 'foo_4395', - 'foo_4396', - 'foo_4397', - 'foo_4398', - 'foo_4399', - 'foo_4400', - 'foo_4401', - 'foo_4402', - 'foo_4403', - 'foo_4404', - 'foo_4405', - 'foo_4406', - 'foo_4407', - 'foo_4408', - 'foo_4409', - 'foo_4410', - 'foo_4411', - 'foo_4412', - 'foo_4413', - 'foo_4414', - 'foo_4415', - 'foo_4416', - 'foo_4417', - 'foo_4418', - 'foo_4419', - 'foo_4420', - 'foo_4421', - 'foo_4422', - 'foo_4423', - 'foo_4424', - 'foo_4425', - 'foo_4426', - 'foo_4427', - 'foo_4428', - 'foo_4429', - 'foo_4430', - 'foo_4431', - 'foo_4432', - 'foo_4433', - 'foo_4434', - 'foo_4435', - 'foo_4436', - 'foo_4437', - 'foo_4438', - 'foo_4439', - 'foo_4440', - 'foo_4441', - 'foo_4442', - 'foo_4443', - 'foo_4444', - 'foo_4445', - 'foo_4446', - 'foo_4447', - 'foo_4448', - 'foo_4449', - 'foo_4450', - 'foo_4451', - 'foo_4452', - 'foo_4453', - 'foo_4454', - 'foo_4455', - 'foo_4456', - 'foo_4457', - 'foo_4458', - 'foo_4459', - 'foo_4460', - 'foo_4461', - 'foo_4462', - 'foo_4463', - 'foo_4464', - 'foo_4465', - 'foo_4466', - 'foo_4467', - 'foo_4468', - 'foo_4469', - 'foo_4470', - 'foo_4471', - 'foo_4472', - 'foo_4473', - 'foo_4474', - 'foo_4475', - 'foo_4476', - 'foo_4477', - 'foo_4478', - 'foo_4479', - 'foo_4480', - 'foo_4481', - 'foo_4482', - 'foo_4483', - 'foo_4484', - 'foo_4485', - 'foo_4486', - 'foo_4487', - 'foo_4488', - 'foo_4489', - 'foo_4490', - 'foo_4491', - 'foo_4492', - 'foo_4493', - 'foo_4494', - 'foo_4495', - 'foo_4496', - 'foo_4497', - 'foo_4498', - 'foo_4499', - 'foo_4500', - 'foo_4501', - 'foo_4502', - 'foo_4503', - 'foo_4504', - 'foo_4505', - 'foo_4506', - 'foo_4507', - 'foo_4508', - 'foo_4509', - 'foo_4510', - 'foo_4511', - 'foo_4512', - 'foo_4513', - 'foo_4514', - 'foo_4515', - 'foo_4516', - 'foo_4517', - 'foo_4518', - 'foo_4519', - 'foo_4520', - 'foo_4521', - 'foo_4522', - 'foo_4523', - 'foo_4524', - 'foo_4525', - 'foo_4526', - 'foo_4527', - 'foo_4528', - 'foo_4529', - 'foo_4530', - 'foo_4531', - 'foo_4532', - 'foo_4533', - 'foo_4534', - 'foo_4535', - 'foo_4536', - 'foo_4537', - 'foo_4538', - 'foo_4539', - 'foo_4540', - 'foo_4541', - 'foo_4542', - 'foo_4543', - 'foo_4544', - 'foo_4545', - 'foo_4546', - 'foo_4547', - 'foo_4548', - 'foo_4549', - 'foo_4550', - 'foo_4551', - 'foo_4552', - 'foo_4553', - 'foo_4554', - 'foo_4555', - 'foo_4556', - 'foo_4557', - 'foo_4558', - 'foo_4559', - 'foo_4560', - 'foo_4561', - 'foo_4562', - 'foo_4563', - 'foo_4564', - 'foo_4565', - 'foo_4566', - 'foo_4567', - 'foo_4568', - 'foo_4569', - 'foo_4570', - 'foo_4571', - 'foo_4572', - 'foo_4573', - 'foo_4574', - 'foo_4575', - 'foo_4576', - 'foo_4577', - 'foo_4578', - 'foo_4579', - 'foo_4580', - 'foo_4581', - 'foo_4582', - 'foo_4583', - 'foo_4584', - 'foo_4585', - 'foo_4586', - 'foo_4587', - 'foo_4588', - 'foo_4589', - 'foo_4590', - 'foo_4591', - 'foo_4592', - 'foo_4593', - 'foo_4594', - 'foo_4595', - 'foo_4596', - 'foo_4597', - 'foo_4598', - 'foo_4599', - 'foo_4600', - 'foo_4601', - 'foo_4602', - 'foo_4603', - 'foo_4604', - 'foo_4605', - 'foo_4606', - 'foo_4607', - 'foo_4608', - 'foo_4609', - 'foo_4610', - 'foo_4611', - 'foo_4612', - 'foo_4613', - 'foo_4614', - 'foo_4615', - 'foo_4616', - 'foo_4617', - 'foo_4618', - 'foo_4619', - 'foo_4620', - 'foo_4621', - 'foo_4622', - 'foo_4623', - 'foo_4624', - 'foo_4625', - 'foo_4626', - 'foo_4627', - 'foo_4628', - 'foo_4629', - 'foo_4630', - 'foo_4631', - 'foo_4632', - 'foo_4633', - 'foo_4634', - 'foo_4635', - 'foo_4636', - 'foo_4637', - 'foo_4638', - 'foo_4639', - 'foo_4640', - 'foo_4641', - 'foo_4642', - 'foo_4643', - 'foo_4644', - 'foo_4645', - 'foo_4646', - 'foo_4647', - 'foo_4648', - 'foo_4649', - 'foo_4650', - 'foo_4651', - 'foo_4652', - 'foo_4653', - 'foo_4654', - 'foo_4655', - 'foo_4656', - 'foo_4657', - 'foo_4658', - 'foo_4659', - 'foo_4660', - 'foo_4661', - 'foo_4662', - 'foo_4663', - 'foo_4664', - 'foo_4665', - 'foo_4666', - 'foo_4667', - 'foo_4668', - 'foo_4669', - 'foo_4670', - 'foo_4671', - 'foo_4672', - 'foo_4673', - 'foo_4674', - 'foo_4675', - 'foo_4676', - 'foo_4677', - 'foo_4678', - 'foo_4679', - 'foo_4680', - 'foo_4681', - 'foo_4682', - 'foo_4683', - 'foo_4684', - 'foo_4685', - 'foo_4686', - 'foo_4687', - 'foo_4688', - 'foo_4689', - 'foo_4690', - 'foo_4691', - 'foo_4692', - 'foo_4693', - 'foo_4694', - 'foo_4695', - 'foo_4696', - 'foo_4697', - 'foo_4698', - 'foo_4699', - 'foo_4700', - 'foo_4701', - 'foo_4702', - 'foo_4703', - 'foo_4704', - 'foo_4705', - 'foo_4706', - 'foo_4707', - 'foo_4708', - 'foo_4709', - 'foo_4710', - 'foo_4711', - 'foo_4712', - 'foo_4713', - 'foo_4714', - 'foo_4715', - 'foo_4716', - 'foo_4717', - 'foo_4718', - 'foo_4719', - 'foo_4720', - 'foo_4721', - 'foo_4722', - 'foo_4723', - 'foo_4724', - 'foo_4725', - 'foo_4726', - 'foo_4727', - 'foo_4728', - 'foo_4729', - 'foo_4730', - 'foo_4731', - 'foo_4732', - 'foo_4733', - 'foo_4734', - 'foo_4735', - 'foo_4736', - 'foo_4737', - 'foo_4738', - 'foo_4739', - 'foo_4740', - 'foo_4741', - 'foo_4742', - 'foo_4743', - 'foo_4744', - 'foo_4745', - 'foo_4746', - 'foo_4747', - 'foo_4748', - 'foo_4749', - 'foo_4750', - 'foo_4751', - 'foo_4752', - 'foo_4753', - 'foo_4754', - 'foo_4755', - 'foo_4756', - 'foo_4757', - 'foo_4758', - 'foo_4759', - 'foo_4760', - 'foo_4761', - 'foo_4762', - 'foo_4763', - 'foo_4764', - 'foo_4765', - 'foo_4766', - 'foo_4767', - 'foo_4768', - 'foo_4769', - 'foo_4770', - 'foo_4771', - 'foo_4772', - 'foo_4773', - 'foo_4774', - 'foo_4775', - 'foo_4776', - 'foo_4777', - 'foo_4778', - 'foo_4779', - 'foo_4780', - 'foo_4781', - 'foo_4782', - 'foo_4783', - 'foo_4784', - 'foo_4785', - 'foo_4786', - 'foo_4787', - 'foo_4788', - 'foo_4789', - 'foo_4790', - 'foo_4791', - 'foo_4792', - 'foo_4793', - 'foo_4794', - 'foo_4795', - 'foo_4796', - 'foo_4797', - 'foo_4798', - 'foo_4799', - 'foo_4800', - 'foo_4801', - 'foo_4802', - 'foo_4803', - 'foo_4804', - 'foo_4805', - 'foo_4806', - 'foo_4807', - 'foo_4808', - 'foo_4809', - 'foo_4810', - 'foo_4811', - 'foo_4812', - 'foo_4813', - 'foo_4814', - 'foo_4815', - 'foo_4816', - 'foo_4817', - 'foo_4818', - 'foo_4819', - 'foo_4820', - 'foo_4821', - 'foo_4822', - 'foo_4823', - 'foo_4824', - 'foo_4825', - 'foo_4826', - 'foo_4827', - 'foo_4828', - 'foo_4829', - 'foo_4830', - 'foo_4831', - 'foo_4832', - 'foo_4833', - 'foo_4834', - 'foo_4835', - 'foo_4836', - 'foo_4837', - 'foo_4838', - 'foo_4839', - 'foo_4840', - 'foo_4841', - 'foo_4842', - 'foo_4843', - 'foo_4844', - 'foo_4845', - 'foo_4846', - 'foo_4847', - 'foo_4848', - 'foo_4849', - 'foo_4850', - 'foo_4851', - 'foo_4852', - 'foo_4853', - 'foo_4854', - 'foo_4855', - 'foo_4856', - 'foo_4857', - 'foo_4858', - 'foo_4859', - 'foo_4860', - 'foo_4861', - 'foo_4862', - 'foo_4863', - 'foo_4864', - 'foo_4865', - 'foo_4866', - 'foo_4867', - 'foo_4868', - 'foo_4869', - 'foo_4870', - 'foo_4871', - 'foo_4872', - 'foo_4873', - 'foo_4874', - 'foo_4875', - 'foo_4876', - 'foo_4877', - 'foo_4878', - 'foo_4879', - 'foo_4880', - 'foo_4881', - 'foo_4882', - 'foo_4883', - 'foo_4884', - 'foo_4885', - 'foo_4886', - 'foo_4887', - 'foo_4888', - 'foo_4889', - 'foo_4890', - 'foo_4891', - 'foo_4892', - 'foo_4893', - 'foo_4894', - 'foo_4895', - 'foo_4896', - 'foo_4897', - 'foo_4898', - 'foo_4899', - 'foo_4900', - 'foo_4901', - 'foo_4902', - 'foo_4903', - 'foo_4904', - 'foo_4905', - 'foo_4906', - 'foo_4907', - 'foo_4908', - 'foo_4909', - 'foo_4910', - 'foo_4911', - 'foo_4912', - 'foo_4913', - 'foo_4914', - 'foo_4915', - 'foo_4916', - 'foo_4917', - 'foo_4918', - 'foo_4919', - 'foo_4920', - 'foo_4921', - 'foo_4922', - 'foo_4923', - 'foo_4924', - 'foo_4925', - 'foo_4926', - 'foo_4927', - 'foo_4928', - 'foo_4929', - 'foo_4930', - 'foo_4931', - 'foo_4932', - 'foo_4933', - 'foo_4934', - 'foo_4935', - 'foo_4936', - 'foo_4937', - 'foo_4938', - 'foo_4939', - 'foo_4940', - 'foo_4941', - 'foo_4942', - 'foo_4943', - 'foo_4944', - 'foo_4945', - 'foo_4946', - 'foo_4947', - 'foo_4948', - 'foo_4949', - 'foo_4950', - 'foo_4951', - 'foo_4952', - 'foo_4953', - 'foo_4954', - 'foo_4955', - 'foo_4956', - 'foo_4957', - 'foo_4958', - 'foo_4959', - 'foo_4960', - 'foo_4961', - 'foo_4962', - 'foo_4963', - 'foo_4964', - 'foo_4965', - 'foo_4966', - 'foo_4967', - 'foo_4968', - 'foo_4969', - 'foo_4970', - 'foo_4971', - 'foo_4972', - 'foo_4973', - 'foo_4974', - 'foo_4975', - 'foo_4976', - 'foo_4977', - 'foo_4978', - 'foo_4979', - 'foo_4980', - 'foo_4981', - 'foo_4982', - 'foo_4983', - 'foo_4984', - 'foo_4985', - 'foo_4986', - 'foo_4987', - 'foo_4988', - 'foo_4989', - 'foo_4990', - 'foo_4991', - 'foo_4992', - 'foo_4993', - 'foo_4994', - 'foo_4995', - 'foo_4996', - 'foo_4997', - 'foo_4998', - 'foo_4999', - 'foo_5000', - 'foo_5001', - 'foo_5002', - 'foo_5003', - 'foo_5004', - 'foo_5005', - 'foo_5006', - 'foo_5007', - 'foo_5008', - 'foo_5009', - 'foo_5010', - 'foo_5011', - 'foo_5012', - 'foo_5013', - 'foo_5014', - 'foo_5015', - 'foo_5016', - 'foo_5017', - 'foo_5018', - 'foo_5019', - 'foo_5020', - 'foo_5021', - 'foo_5022', - 'foo_5023', - 'foo_5024', - 'foo_5025', - 'foo_5026', - 'foo_5027', - 'foo_5028', - 'foo_5029', - 'foo_5030', - 'foo_5031', - 'foo_5032', - 'foo_5033', - 'foo_5034', - 'foo_5035', - 'foo_5036', - 'foo_5037', - 'foo_5038', - 'foo_5039', - 'foo_5040', - 'foo_5041', - 'foo_5042', - 'foo_5043', - 'foo_5044', - 'foo_5045', - 'foo_5046', - 'foo_5047', - 'foo_5048', - 'foo_5049', - 'foo_5050', - 'foo_5051', - 'foo_5052', - 'foo_5053', - 'foo_5054', - 'foo_5055', - 'foo_5056', - 'foo_5057', - 'foo_5058', - 'foo_5059', - 'foo_5060', - 'foo_5061', - 'foo_5062', - 'foo_5063', - 'foo_5064', - 'foo_5065', - 'foo_5066', - 'foo_5067', - 'foo_5068', - 'foo_5069', - 'foo_5070', - 'foo_5071', - 'foo_5072', - 'foo_5073', - 'foo_5074', - 'foo_5075', - 'foo_5076', - 'foo_5077', - 'foo_5078', - 'foo_5079', - 'foo_5080', - 'foo_5081', - 'foo_5082', - 'foo_5083', - 'foo_5084', - 'foo_5085', - 'foo_5086', - 'foo_5087', - 'foo_5088', - 'foo_5089', - 'foo_5090', - 'foo_5091', - 'foo_5092', - 'foo_5093', - 'foo_5094', - 'foo_5095', - 'foo_5096', - 'foo_5097', - 'foo_5098', - 'foo_5099', - 'foo_5100', - 'foo_5101', - 'foo_5102', - 'foo_5103', - 'foo_5104', - 'foo_5105', - 'foo_5106', - 'foo_5107', - 'foo_5108', - 'foo_5109', - 'foo_5110', - 'foo_5111', - 'foo_5112', - 'foo_5113', - 'foo_5114', - 'foo_5115', - 'foo_5116', - 'foo_5117', - 'foo_5118', - 'foo_5119', - 'foo_5120', - 'foo_5121', - 'foo_5122', - 'foo_5123', - 'foo_5124', - 'foo_5125', - 'foo_5126', - 'foo_5127', - 'foo_5128', - 'foo_5129', - 'foo_5130', - 'foo_5131', - 'foo_5132', - 'foo_5133', - 'foo_5134', - 'foo_5135', - 'foo_5136', - 'foo_5137', - 'foo_5138', - 'foo_5139', - 'foo_5140', - 'foo_5141', - 'foo_5142', - 'foo_5143', - 'foo_5144', - 'foo_5145', - 'foo_5146', - 'foo_5147', - 'foo_5148', - 'foo_5149', - 'foo_5150', - 'foo_5151', - 'foo_5152', - 'foo_5153', - 'foo_5154', - 'foo_5155', - 'foo_5156', - 'foo_5157', - 'foo_5158', - 'foo_5159', - 'foo_5160', - 'foo_5161', - 'foo_5162', - 'foo_5163', - 'foo_5164', - 'foo_5165', - 'foo_5166', - 'foo_5167', - 'foo_5168', - 'foo_5169', - 'foo_5170', - 'foo_5171', - 'foo_5172', - 'foo_5173', - 'foo_5174', - 'foo_5175', - 'foo_5176', - 'foo_5177', - 'foo_5178', - 'foo_5179', - 'foo_5180', - 'foo_5181', - 'foo_5182', - 'foo_5183', - 'foo_5184', - 'foo_5185', - 'foo_5186', - 'foo_5187', - 'foo_5188', - 'foo_5189', - 'foo_5190', - 'foo_5191', - 'foo_5192', - 'foo_5193', - 'foo_5194', - 'foo_5195', - 'foo_5196', - 'foo_5197', - 'foo_5198', - 'foo_5199', - 'foo_5200', - 'foo_5201', - 'foo_5202', - 'foo_5203', - 'foo_5204', - 'foo_5205', - 'foo_5206', - 'foo_5207', - 'foo_5208', - 'foo_5209', - 'foo_5210', - 'foo_5211', - 'foo_5212', - 'foo_5213', - 'foo_5214', - 'foo_5215', - 'foo_5216', - 'foo_5217', - 'foo_5218', - 'foo_5219', - 'foo_5220', - 'foo_5221', - 'foo_5222', - 'foo_5223', - 'foo_5224', - 'foo_5225', - 'foo_5226', - 'foo_5227', - 'foo_5228', - 'foo_5229', - 'foo_5230', - 'foo_5231', - 'foo_5232', - 'foo_5233', - 'foo_5234', - 'foo_5235', - 'foo_5236', - 'foo_5237', - 'foo_5238', - 'foo_5239', - 'foo_5240', - 'foo_5241', - 'foo_5242', - 'foo_5243', - 'foo_5244', - 'foo_5245', - 'foo_5246', - 'foo_5247', - 'foo_5248', - 'foo_5249', - 'foo_5250', - 'foo_5251', - 'foo_5252', - 'foo_5253', - 'foo_5254', - 'foo_5255', - 'foo_5256', - 'foo_5257', - 'foo_5258', - 'foo_5259', - 'foo_5260', - 'foo_5261', - 'foo_5262', - 'foo_5263', - 'foo_5264', - 'foo_5265', - 'foo_5266', - 'foo_5267', - 'foo_5268', - 'foo_5269', - 'foo_5270', - 'foo_5271', - 'foo_5272', - 'foo_5273', - 'foo_5274', - 'foo_5275', - 'foo_5276', - 'foo_5277', - 'foo_5278', - 'foo_5279', - 'foo_5280', - 'foo_5281', - 'foo_5282', - 'foo_5283', - 'foo_5284', - 'foo_5285', - 'foo_5286', - 'foo_5287', - 'foo_5288', - 'foo_5289', - 'foo_5290', - 'foo_5291', - 'foo_5292', - 'foo_5293', - 'foo_5294', - 'foo_5295', - 'foo_5296', - 'foo_5297', - 'foo_5298', - 'foo_5299', - 'foo_5300', - 'foo_5301', - 'foo_5302', - 'foo_5303', - 'foo_5304', - 'foo_5305', - 'foo_5306', - 'foo_5307', - 'foo_5308', - 'foo_5309', - 'foo_5310', - 'foo_5311', - 'foo_5312', - 'foo_5313', - 'foo_5314', - 'foo_5315', - 'foo_5316', - 'foo_5317', - 'foo_5318', - 'foo_5319', - 'foo_5320', - 'foo_5321', - 'foo_5322', - 'foo_5323', - 'foo_5324', - 'foo_5325', - 'foo_5326', - 'foo_5327', - 'foo_5328', - 'foo_5329', - 'foo_5330', - 'foo_5331', - 'foo_5332', - 'foo_5333', - 'foo_5334', - 'foo_5335', - 'foo_5336', - 'foo_5337', - 'foo_5338', - 'foo_5339', - 'foo_5340', - 'foo_5341', - 'foo_5342', - 'foo_5343', - 'foo_5344', - 'foo_5345', - 'foo_5346', - 'foo_5347', - 'foo_5348', - 'foo_5349', - 'foo_5350', - 'foo_5351', - 'foo_5352', - 'foo_5353', - 'foo_5354', - 'foo_5355', - 'foo_5356', - 'foo_5357', - 'foo_5358', - 'foo_5359', - 'foo_5360', - 'foo_5361', - 'foo_5362', - 'foo_5363', - 'foo_5364', - 'foo_5365', - 'foo_5366', - 'foo_5367', - 'foo_5368', - 'foo_5369', - 'foo_5370', - 'foo_5371', - 'foo_5372', - 'foo_5373', - 'foo_5374', - 'foo_5375', - 'foo_5376', - 'foo_5377', - 'foo_5378', - 'foo_5379', - 'foo_5380', - 'foo_5381', - 'foo_5382', - 'foo_5383', - 'foo_5384', - 'foo_5385', - 'foo_5386', - 'foo_5387', - 'foo_5388', - 'foo_5389', - 'foo_5390', - 'foo_5391', - 'foo_5392', - 'foo_5393', - 'foo_5394', - 'foo_5395', - 'foo_5396', - 'foo_5397', - 'foo_5398', - 'foo_5399', - 'foo_5400', - 'foo_5401', - 'foo_5402', - 'foo_5403', - 'foo_5404', - 'foo_5405', - 'foo_5406', - 'foo_5407', - 'foo_5408', - 'foo_5409', - 'foo_5410', - 'foo_5411', - 'foo_5412', - 'foo_5413', - 'foo_5414', - 'foo_5415', - 'foo_5416', - 'foo_5417', - 'foo_5418', - 'foo_5419', - 'foo_5420', - 'foo_5421', - 'foo_5422', - 'foo_5423', - 'foo_5424', - 'foo_5425', - 'foo_5426', - 'foo_5427', - 'foo_5428', - 'foo_5429', - 'foo_5430', - 'foo_5431', - 'foo_5432', - 'foo_5433', - 'foo_5434', - 'foo_5435', - 'foo_5436', - 'foo_5437', - 'foo_5438', - 'foo_5439', - 'foo_5440', - 'foo_5441', - 'foo_5442', - 'foo_5443', - 'foo_5444', - 'foo_5445', - 'foo_5446', - 'foo_5447', - 'foo_5448', - 'foo_5449', - 'foo_5450', - 'foo_5451', - 'foo_5452', - 'foo_5453', - 'foo_5454', - 'foo_5455', - 'foo_5456', - 'foo_5457', - 'foo_5458', - 'foo_5459', - 'foo_5460', - 'foo_5461', - 'foo_5462', - 'foo_5463', - 'foo_5464', - 'foo_5465', - 'foo_5466', - 'foo_5467', - 'foo_5468', - 'foo_5469', - 'foo_5470', - 'foo_5471', - 'foo_5472', - 'foo_5473', - 'foo_5474', - 'foo_5475', - 'foo_5476', - 'foo_5477', - 'foo_5478', - 'foo_5479', - 'foo_5480', - 'foo_5481', - 'foo_5482', - 'foo_5483', - 'foo_5484', - 'foo_5485', - 'foo_5486', - 'foo_5487', - 'foo_5488', - 'foo_5489', - 'foo_5490', - 'foo_5491', - 'foo_5492', - 'foo_5493', - 'foo_5494', - 'foo_5495', - 'foo_5496', - 'foo_5497', - 'foo_5498', - 'foo_5499', - 'foo_5500', - 'foo_5501', - 'foo_5502', - 'foo_5503', - 'foo_5504', - 'foo_5505', - 'foo_5506', - 'foo_5507', - 'foo_5508', - 'foo_5509', - 'foo_5510', - 'foo_5511', - 'foo_5512', - 'foo_5513', - 'foo_5514', - 'foo_5515', - 'foo_5516', - 'foo_5517', - 'foo_5518', - 'foo_5519', - 'foo_5520', - 'foo_5521', - 'foo_5522', - 'foo_5523', - 'foo_5524', - 'foo_5525', - 'foo_5526', - 'foo_5527', - 'foo_5528', - 'foo_5529', - 'foo_5530', - 'foo_5531', - 'foo_5532', - 'foo_5533', - 'foo_5534', - 'foo_5535', - 'foo_5536', - 'foo_5537', - 'foo_5538', - 'foo_5539', - 'foo_5540', - 'foo_5541', - 'foo_5542', - 'foo_5543', - 'foo_5544', - 'foo_5545', - 'foo_5546', - 'foo_5547', - 'foo_5548', - 'foo_5549', - 'foo_5550', - 'foo_5551', - 'foo_5552', - 'foo_5553', - 'foo_5554', - 'foo_5555', - 'foo_5556', - 'foo_5557', - 'foo_5558', - 'foo_5559', - 'foo_5560', - 'foo_5561', - 'foo_5562', - 'foo_5563', - 'foo_5564', - 'foo_5565', - 'foo_5566', - 'foo_5567', - 'foo_5568', - 'foo_5569', - 'foo_5570', - 'foo_5571', - 'foo_5572', - 'foo_5573', - 'foo_5574', - 'foo_5575', - 'foo_5576', - 'foo_5577', - 'foo_5578', - 'foo_5579', - 'foo_5580', - 'foo_5581', - 'foo_5582', - 'foo_5583', - 'foo_5584', - 'foo_5585', - 'foo_5586', - 'foo_5587', - 'foo_5588', - 'foo_5589', - 'foo_5590', - 'foo_5591', - 'foo_5592', - 'foo_5593', - 'foo_5594', - 'foo_5595', - 'foo_5596', - 'foo_5597', - 'foo_5598', - 'foo_5599', - 'foo_5600', - 'foo_5601', - 'foo_5602', - 'foo_5603', - 'foo_5604', - 'foo_5605', - 'foo_5606', - 'foo_5607', - 'foo_5608', - 'foo_5609', - 'foo_5610', - 'foo_5611', - 'foo_5612', - 'foo_5613', - 'foo_5614', - 'foo_5615', - 'foo_5616', - 'foo_5617', - 'foo_5618', - 'foo_5619', - 'foo_5620', - 'foo_5621', - 'foo_5622', - 'foo_5623', - 'foo_5624', - 'foo_5625', - 'foo_5626', - 'foo_5627', - 'foo_5628', - 'foo_5629', - 'foo_5630', - 'foo_5631', - 'foo_5632', - 'foo_5633', - 'foo_5634', - 'foo_5635', - 'foo_5636', - 'foo_5637', - 'foo_5638', - 'foo_5639', - 'foo_5640', - 'foo_5641', - 'foo_5642', - 'foo_5643', - 'foo_5644', - 'foo_5645', - 'foo_5646', - 'foo_5647', - 'foo_5648', - 'foo_5649', - 'foo_5650', - 'foo_5651', - 'foo_5652', - 'foo_5653', - 'foo_5654', - 'foo_5655', - 'foo_5656', - 'foo_5657', - 'foo_5658', - 'foo_5659', - 'foo_5660', - 'foo_5661', - 'foo_5662', - 'foo_5663', - 'foo_5664', - 'foo_5665', - 'foo_5666', - 'foo_5667', - 'foo_5668', - 'foo_5669', - 'foo_5670', - 'foo_5671', - 'foo_5672', - 'foo_5673', - 'foo_5674', - 'foo_5675', - 'foo_5676', - 'foo_5677', - 'foo_5678', - 'foo_5679', - 'foo_5680', - 'foo_5681', - 'foo_5682', - 'foo_5683', - 'foo_5684', - 'foo_5685', - 'foo_5686', - 'foo_5687', - 'foo_5688', - 'foo_5689', - 'foo_5690', - 'foo_5691', - 'foo_5692', - 'foo_5693', - 'foo_5694', - 'foo_5695', - 'foo_5696', - 'foo_5697', - 'foo_5698', - 'foo_5699', - 'foo_5700', - 'foo_5701', - 'foo_5702', - 'foo_5703', - 'foo_5704', - 'foo_5705', - 'foo_5706', - 'foo_5707', - 'foo_5708', - 'foo_5709', - 'foo_5710', - 'foo_5711', - 'foo_5712', - 'foo_5713', - 'foo_5714', - 'foo_5715', - 'foo_5716', - 'foo_5717', - 'foo_5718', - 'foo_5719', - 'foo_5720', - 'foo_5721', - 'foo_5722', - 'foo_5723', - 'foo_5724', - 'foo_5725', - 'foo_5726', - 'foo_5727', - 'foo_5728', - 'foo_5729', - 'foo_5730', - 'foo_5731', - 'foo_5732', - 'foo_5733', - 'foo_5734', - 'foo_5735', - 'foo_5736', - 'foo_5737', - 'foo_5738', - 'foo_5739', - 'foo_5740', - 'foo_5741', - 'foo_5742', - 'foo_5743', - 'foo_5744', - 'foo_5745', - 'foo_5746', - 'foo_5747', - 'foo_5748', - 'foo_5749', - 'foo_5750', - 'foo_5751', - 'foo_5752', - 'foo_5753', - 'foo_5754', - 'foo_5755', - 'foo_5756', - 'foo_5757', - 'foo_5758', - 'foo_5759', - 'foo_5760', - 'foo_5761', - 'foo_5762', - 'foo_5763', - 'foo_5764', - 'foo_5765', - 'foo_5766', - 'foo_5767', - 'foo_5768', - 'foo_5769', - 'foo_5770', - 'foo_5771', - 'foo_5772', - 'foo_5773', - 'foo_5774', - 'foo_5775', - 'foo_5776', - 'foo_5777', - 'foo_5778', - 'foo_5779', - 'foo_5780', - 'foo_5781', - 'foo_5782', - 'foo_5783', - 'foo_5784', - 'foo_5785', - 'foo_5786', - 'foo_5787', - 'foo_5788', - 'foo_5789', - 'foo_5790', - 'foo_5791', - 'foo_5792', - 'foo_5793', - 'foo_5794', - 'foo_5795', - 'foo_5796', - 'foo_5797', - 'foo_5798', - 'foo_5799', - 'foo_5800', - 'foo_5801', - 'foo_5802', - 'foo_5803', - 'foo_5804', - 'foo_5805', - 'foo_5806', - 'foo_5807', - 'foo_5808', - 'foo_5809', - 'foo_5810', - 'foo_5811', - 'foo_5812', - 'foo_5813', - 'foo_5814', - 'foo_5815', - 'foo_5816', - 'foo_5817', - 'foo_5818', - 'foo_5819', - 'foo_5820', - 'foo_5821', - 'foo_5822', - 'foo_5823', - 'foo_5824', - 'foo_5825', - 'foo_5826', - 'foo_5827', - 'foo_5828', - 'foo_5829', - 'foo_5830', - 'foo_5831', - 'foo_5832', - 'foo_5833', - 'foo_5834', - 'foo_5835', - 'foo_5836', - 'foo_5837', - 'foo_5838', - 'foo_5839', - 'foo_5840', - 'foo_5841', - 'foo_5842', - 'foo_5843', - 'foo_5844', - 'foo_5845', - 'foo_5846', - 'foo_5847', - 'foo_5848', - 'foo_5849', - 'foo_5850', - 'foo_5851', - 'foo_5852', - 'foo_5853', - 'foo_5854', - 'foo_5855', - 'foo_5856', - 'foo_5857', - 'foo_5858', - 'foo_5859', - 'foo_5860', - 'foo_5861', - 'foo_5862', - 'foo_5863', - 'foo_5864', - 'foo_5865', - 'foo_5866', - 'foo_5867', - 'foo_5868', - 'foo_5869', - 'foo_5870', - 'foo_5871', - 'foo_5872', - 'foo_5873', - 'foo_5874', - 'foo_5875', - 'foo_5876', - 'foo_5877', - 'foo_5878', - 'foo_5879', - 'foo_5880', - 'foo_5881', - 'foo_5882', - 'foo_5883', - 'foo_5884', - 'foo_5885', - 'foo_5886', - 'foo_5887', - 'foo_5888', - 'foo_5889', - 'foo_5890', - 'foo_5891', - 'foo_5892', - 'foo_5893', - 'foo_5894', - 'foo_5895', - 'foo_5896', - 'foo_5897', - 'foo_5898', - 'foo_5899', - 'foo_5900', - 'foo_5901', - 'foo_5902', - 'foo_5903', - 'foo_5904', - 'foo_5905', - 'foo_5906', - 'foo_5907', - 'foo_5908', - 'foo_5909', - 'foo_5910', - 'foo_5911', - 'foo_5912', - 'foo_5913', - 'foo_5914', - 'foo_5915', - 'foo_5916', - 'foo_5917', - 'foo_5918', - 'foo_5919', - 'foo_5920', - 'foo_5921', - 'foo_5922', - 'foo_5923', - 'foo_5924', - 'foo_5925', - 'foo_5926', - 'foo_5927', - 'foo_5928', - 'foo_5929', - 'foo_5930', - 'foo_5931', - 'foo_5932', - 'foo_5933', - 'foo_5934', - 'foo_5935', - 'foo_5936', - 'foo_5937', - 'foo_5938', - 'foo_5939', - 'foo_5940', - 'foo_5941', - 'foo_5942', - 'foo_5943', - 'foo_5944', - 'foo_5945', - 'foo_5946', - 'foo_5947', - 'foo_5948', - 'foo_5949', - 'foo_5950', - 'foo_5951', - 'foo_5952', - 'foo_5953', - 'foo_5954', - 'foo_5955', - 'foo_5956', - 'foo_5957', - 'foo_5958', - 'foo_5959', - 'foo_5960', - 'foo_5961', - 'foo_5962', - 'foo_5963', - 'foo_5964', - 'foo_5965', - 'foo_5966', - 'foo_5967', - 'foo_5968', - 'foo_5969', - 'foo_5970', - 'foo_5971', - 'foo_5972', - 'foo_5973', - 'foo_5974', - 'foo_5975', - 'foo_5976', - 'foo_5977', - 'foo_5978', - 'foo_5979', - 'foo_5980', - 'foo_5981', - 'foo_5982', - 'foo_5983', - 'foo_5984', - 'foo_5985', - 'foo_5986', - 'foo_5987', - 'foo_5988', - 'foo_5989', - 'foo_5990', - 'foo_5991', - 'foo_5992', - 'foo_5993', - 'foo_5994', - 'foo_5995', - 'foo_5996', - 'foo_5997', - 'foo_5998', - 'foo_5999', - 'foo_6000', - 'foo_6001', - 'foo_6002', - 'foo_6003', - 'foo_6004', - 'foo_6005', - 'foo_6006', - 'foo_6007', - 'foo_6008', - 'foo_6009', - 'foo_6010', - 'foo_6011', - 'foo_6012', - 'foo_6013', - 'foo_6014', - 'foo_6015', - 'foo_6016', - 'foo_6017', - 'foo_6018', - 'foo_6019', - 'foo_6020', - 'foo_6021', - 'foo_6022', - 'foo_6023', - 'foo_6024', - 'foo_6025', - 'foo_6026', - 'foo_6027', - 'foo_6028', - 'foo_6029', - 'foo_6030', - 'foo_6031', - 'foo_6032', - 'foo_6033', - 'foo_6034', - 'foo_6035', - 'foo_6036', - 'foo_6037', - 'foo_6038', - 'foo_6039', - 'foo_6040', - 'foo_6041', - 'foo_6042', - 'foo_6043', - 'foo_6044', - 'foo_6045', - 'foo_6046', - 'foo_6047', - 'foo_6048', - 'foo_6049', - 'foo_6050', - 'foo_6051', - 'foo_6052', - 'foo_6053', - 'foo_6054', - 'foo_6055', - 'foo_6056', - 'foo_6057', - 'foo_6058', - 'foo_6059', - 'foo_6060', - 'foo_6061', - 'foo_6062', - 'foo_6063', - 'foo_6064', - 'foo_6065', - 'foo_6066', - 'foo_6067', - 'foo_6068', - 'foo_6069', - 'foo_6070', - 'foo_6071', - 'foo_6072', - 'foo_6073', - 'foo_6074', - 'foo_6075', - 'foo_6076', - 'foo_6077', - 'foo_6078', - 'foo_6079', - 'foo_6080', - 'foo_6081', - 'foo_6082', - 'foo_6083', - 'foo_6084', - 'foo_6085', - 'foo_6086', - 'foo_6087', - 'foo_6088', - 'foo_6089', - 'foo_6090', - 'foo_6091', - 'foo_6092', - 'foo_6093', - 'foo_6094', - 'foo_6095', - 'foo_6096', - 'foo_6097', - 'foo_6098', - 'foo_6099', - 'foo_6100', - 'foo_6101', - 'foo_6102', - 'foo_6103', - 'foo_6104', - 'foo_6105', - 'foo_6106', - 'foo_6107', - 'foo_6108', - 'foo_6109', - 'foo_6110', - 'foo_6111', - 'foo_6112', - 'foo_6113', - 'foo_6114', - 'foo_6115', - 'foo_6116', - 'foo_6117', - 'foo_6118', - 'foo_6119', - 'foo_6120', - 'foo_6121', - 'foo_6122', - 'foo_6123', - 'foo_6124', - 'foo_6125', - 'foo_6126', - 'foo_6127', - 'foo_6128', - 'foo_6129', - 'foo_6130', - 'foo_6131', - 'foo_6132', - 'foo_6133', - 'foo_6134', - 'foo_6135', - 'foo_6136', - 'foo_6137', - 'foo_6138', - 'foo_6139', - 'foo_6140', - 'foo_6141', - 'foo_6142', - 'foo_6143', - 'foo_6144', - 'foo_6145', - 'foo_6146', - 'foo_6147', - 'foo_6148', - 'foo_6149', - 'foo_6150', - 'foo_6151', - 'foo_6152', - 'foo_6153', - 'foo_6154', - 'foo_6155', - 'foo_6156', - 'foo_6157', - 'foo_6158', - 'foo_6159', - 'foo_6160', - 'foo_6161', - 'foo_6162', - 'foo_6163', - 'foo_6164', - 'foo_6165', - 'foo_6166', - 'foo_6167', - 'foo_6168', - 'foo_6169', - 'foo_6170', - 'foo_6171', - 'foo_6172', - 'foo_6173', - 'foo_6174', - 'foo_6175', - 'foo_6176', - 'foo_6177', - 'foo_6178', - 'foo_6179', - 'foo_6180', - 'foo_6181', - 'foo_6182', - 'foo_6183', - 'foo_6184', - 'foo_6185', - 'foo_6186', - 'foo_6187', - 'foo_6188', - 'foo_6189', - 'foo_6190', - 'foo_6191', - 'foo_6192', - 'foo_6193', - 'foo_6194', - 'foo_6195', - 'foo_6196', - 'foo_6197', - 'foo_6198', - 'foo_6199', - 'foo_6200', - 'foo_6201', - 'foo_6202', - 'foo_6203', - 'foo_6204', - 'foo_6205', - 'foo_6206', - 'foo_6207', - 'foo_6208', - 'foo_6209', - 'foo_6210', - 'foo_6211', - 'foo_6212', - 'foo_6213', - 'foo_6214', - 'foo_6215', - 'foo_6216', - 'foo_6217', - 'foo_6218', - 'foo_6219', - 'foo_6220', - 'foo_6221', - 'foo_6222', - 'foo_6223', - 'foo_6224', - 'foo_6225', - 'foo_6226', - 'foo_6227', - 'foo_6228', - 'foo_6229', - 'foo_6230', - 'foo_6231', - 'foo_6232', - 'foo_6233', - 'foo_6234', - 'foo_6235', - 'foo_6236', - 'foo_6237', - 'foo_6238', - 'foo_6239', - 'foo_6240', - 'foo_6241', - 'foo_6242', - 'foo_6243', - 'foo_6244', - 'foo_6245', - 'foo_6246', - 'foo_6247', - 'foo_6248', - 'foo_6249', - 'foo_6250', - 'foo_6251', - 'foo_6252', - 'foo_6253', - 'foo_6254', - 'foo_6255', - 'foo_6256', - 'foo_6257', - 'foo_6258', - 'foo_6259', - 'foo_6260', - 'foo_6261', - 'foo_6262', - 'foo_6263', - 'foo_6264', - 'foo_6265', - 'foo_6266', - 'foo_6267', - 'foo_6268', - 'foo_6269', - 'foo_6270', - 'foo_6271', - 'foo_6272', - 'foo_6273', - 'foo_6274', - 'foo_6275', - 'foo_6276', - 'foo_6277', - 'foo_6278', - 'foo_6279', - 'foo_6280', - 'foo_6281', - 'foo_6282', - 'foo_6283', - 'foo_6284', - 'foo_6285', - 'foo_6286', - 'foo_6287', - 'foo_6288', - 'foo_6289', - 'foo_6290', - 'foo_6291', - 'foo_6292', - 'foo_6293', - 'foo_6294', - 'foo_6295', - 'foo_6296', - 'foo_6297', - 'foo_6298', - 'foo_6299', - 'foo_6300', - 'foo_6301', - 'foo_6302', - 'foo_6303', - 'foo_6304', - 'foo_6305', - 'foo_6306', - 'foo_6307', - 'foo_6308', - 'foo_6309', - 'foo_6310', - 'foo_6311', - 'foo_6312', - 'foo_6313', - 'foo_6314', - 'foo_6315', - 'foo_6316', - 'foo_6317', - 'foo_6318', - 'foo_6319', - 'foo_6320', - 'foo_6321', - 'foo_6322', - 'foo_6323', - 'foo_6324', - 'foo_6325', - 'foo_6326', - 'foo_6327', - 'foo_6328', - 'foo_6329', - 'foo_6330', - 'foo_6331', - 'foo_6332', - 'foo_6333', - 'foo_6334', - 'foo_6335', - 'foo_6336', - 'foo_6337', - 'foo_6338', - 'foo_6339', - 'foo_6340', - 'foo_6341', - 'foo_6342', - 'foo_6343', - 'foo_6344', - 'foo_6345', - 'foo_6346', - 'foo_6347', - 'foo_6348', - 'foo_6349', - 'foo_6350', - 'foo_6351', - 'foo_6352', - 'foo_6353', - 'foo_6354', - 'foo_6355', - 'foo_6356', - 'foo_6357', - 'foo_6358', - 'foo_6359', - 'foo_6360', - 'foo_6361', - 'foo_6362', - 'foo_6363', - 'foo_6364', - 'foo_6365', - 'foo_6366', - 'foo_6367', - 'foo_6368', - 'foo_6369', - 'foo_6370', - 'foo_6371', - 'foo_6372', - 'foo_6373', - 'foo_6374', - 'foo_6375', - 'foo_6376', - 'foo_6377', - 'foo_6378', - 'foo_6379', - 'foo_6380', - 'foo_6381', - 'foo_6382', - 'foo_6383', - 'foo_6384', - 'foo_6385', - 'foo_6386', - 'foo_6387', - 'foo_6388', - 'foo_6389', - 'foo_6390', - 'foo_6391', - 'foo_6392', - 'foo_6393', - 'foo_6394', - 'foo_6395', - 'foo_6396', - 'foo_6397', - 'foo_6398', - 'foo_6399', - 'foo_6400', - 'foo_6401', - 'foo_6402', - 'foo_6403', - 'foo_6404', - 'foo_6405', - 'foo_6406', - 'foo_6407', - 'foo_6408', - 'foo_6409', - 'foo_6410', - 'foo_6411', - 'foo_6412', - 'foo_6413', - 'foo_6414', - 'foo_6415', - 'foo_6416', - 'foo_6417', - 'foo_6418', - 'foo_6419', - 'foo_6420', - 'foo_6421', - 'foo_6422', - 'foo_6423', - 'foo_6424', - 'foo_6425', - 'foo_6426', - 'foo_6427', - 'foo_6428', - 'foo_6429', - 'foo_6430', - 'foo_6431', - 'foo_6432', - 'foo_6433', - 'foo_6434', - 'foo_6435', - 'foo_6436', - 'foo_6437', - 'foo_6438', - 'foo_6439', - 'foo_6440', - 'foo_6441', - 'foo_6442', - 'foo_6443', - 'foo_6444', - 'foo_6445', - 'foo_6446', - 'foo_6447', - 'foo_6448', - 'foo_6449', - 'foo_6450', - 'foo_6451', - 'foo_6452', - 'foo_6453', - 'foo_6454', - 'foo_6455', - 'foo_6456', - 'foo_6457', - 'foo_6458', - 'foo_6459', - 'foo_6460', - 'foo_6461', - 'foo_6462', - 'foo_6463', - 'foo_6464', - 'foo_6465', - 'foo_6466', - 'foo_6467', - 'foo_6468', - 'foo_6469', - 'foo_6470', - 'foo_6471', - 'foo_6472', - 'foo_6473', - 'foo_6474', - 'foo_6475', - 'foo_6476', - 'foo_6477', - 'foo_6478', - 'foo_6479', - 'foo_6480', - 'foo_6481', - 'foo_6482', - 'foo_6483', - 'foo_6484', - 'foo_6485', - 'foo_6486', - 'foo_6487', - 'foo_6488', - 'foo_6489', - 'foo_6490', - 'foo_6491', - 'foo_6492', - 'foo_6493', - 'foo_6494', - 'foo_6495', - 'foo_6496', - 'foo_6497', - 'foo_6498', - 'foo_6499', - 'foo_6500', - 'foo_6501', - 'foo_6502', - 'foo_6503', - 'foo_6504', - 'foo_6505', - 'foo_6506', - 'foo_6507', - 'foo_6508', - 'foo_6509', - 'foo_6510', - 'foo_6511', - 'foo_6512', - 'foo_6513', - 'foo_6514', - 'foo_6515', - 'foo_6516', - 'foo_6517', - 'foo_6518', - 'foo_6519', - 'foo_6520', - 'foo_6521', - 'foo_6522', - 'foo_6523', - 'foo_6524', - 'foo_6525', - 'foo_6526', - 'foo_6527', - 'foo_6528', - 'foo_6529', - 'foo_6530', - 'foo_6531', - 'foo_6532', - 'foo_6533', - 'foo_6534', - 'foo_6535', - 'foo_6536', - 'foo_6537', - 'foo_6538', - 'foo_6539', - 'foo_6540', - 'foo_6541', - 'foo_6542', - 'foo_6543', - 'foo_6544', - 'foo_6545', - 'foo_6546', - 'foo_6547', - 'foo_6548', - 'foo_6549', - 'foo_6550', - 'foo_6551', - 'foo_6552', - 'foo_6553', - 'foo_6554', - 'foo_6555', - 'foo_6556', - 'foo_6557', - 'foo_6558', - 'foo_6559', - 'foo_6560', - 'foo_6561', - 'foo_6562', - 'foo_6563', - 'foo_6564', - 'foo_6565', - 'foo_6566', - 'foo_6567', - 'foo_6568', - 'foo_6569', - 'foo_6570', - 'foo_6571', - 'foo_6572', - 'foo_6573', - 'foo_6574', - 'foo_6575', - 'foo_6576', - 'foo_6577', - 'foo_6578', - 'foo_6579', - 'foo_6580', - 'foo_6581', - 'foo_6582', - 'foo_6583', - 'foo_6584', - 'foo_6585', - 'foo_6586', - 'foo_6587', - 'foo_6588', - 'foo_6589', - 'foo_6590', - 'foo_6591', - 'foo_6592', - 'foo_6593', - 'foo_6594', - 'foo_6595', - 'foo_6596', - 'foo_6597', - 'foo_6598', - 'foo_6599', - 'foo_6600', - 'foo_6601', - 'foo_6602', - 'foo_6603', - 'foo_6604', - 'foo_6605', - 'foo_6606', - 'foo_6607', - 'foo_6608', - 'foo_6609', - 'foo_6610', - 'foo_6611', - 'foo_6612', - 'foo_6613', - 'foo_6614', - 'foo_6615', - 'foo_6616', - 'foo_6617', - 'foo_6618', - 'foo_6619', - 'foo_6620', - 'foo_6621', - 'foo_6622', - 'foo_6623', - 'foo_6624', - 'foo_6625', - 'foo_6626', - 'foo_6627', - 'foo_6628', - 'foo_6629', - 'foo_6630', - 'foo_6631', - 'foo_6632', - 'foo_6633', - 'foo_6634', - 'foo_6635', - 'foo_6636', - 'foo_6637', - 'foo_6638', - 'foo_6639', - 'foo_6640', - 'foo_6641', - 'foo_6642', - 'foo_6643', - 'foo_6644', - 'foo_6645', - 'foo_6646', - 'foo_6647', - 'foo_6648', - 'foo_6649', - 'foo_6650', - 'foo_6651', - 'foo_6652', - 'foo_6653', - 'foo_6654', - 'foo_6655', - 'foo_6656', - 'foo_6657', - 'foo_6658', - 'foo_6659', - 'foo_6660', - 'foo_6661', - 'foo_6662', - 'foo_6663', - 'foo_6664', - 'foo_6665', - 'foo_6666', - 'foo_6667', - 'foo_6668', - 'foo_6669', - 'foo_6670', - 'foo_6671', - 'foo_6672', - 'foo_6673', - 'foo_6674', - 'foo_6675', - 'foo_6676', - 'foo_6677', - 'foo_6678', - 'foo_6679', - 'foo_6680', - 'foo_6681', - 'foo_6682', - 'foo_6683', - 'foo_6684', - 'foo_6685', - 'foo_6686', - 'foo_6687', - 'foo_6688', - 'foo_6689', - 'foo_6690', - 'foo_6691', - 'foo_6692', - 'foo_6693', - 'foo_6694', - 'foo_6695', - 'foo_6696', - 'foo_6697', - 'foo_6698', - 'foo_6699', - 'foo_6700', - 'foo_6701', - 'foo_6702', - 'foo_6703', - 'foo_6704', - 'foo_6705', - 'foo_6706', - 'foo_6707', - 'foo_6708', - 'foo_6709', - 'foo_6710', - 'foo_6711', - 'foo_6712', - 'foo_6713', - 'foo_6714', - 'foo_6715', - 'foo_6716', - 'foo_6717', - 'foo_6718', - 'foo_6719', - 'foo_6720', - 'foo_6721', - 'foo_6722', - 'foo_6723', - 'foo_6724', - 'foo_6725', - 'foo_6726', - 'foo_6727', - 'foo_6728', - 'foo_6729', - 'foo_6730', - 'foo_6731', - 'foo_6732', - 'foo_6733', - 'foo_6734', - 'foo_6735', - 'foo_6736', - 'foo_6737', - 'foo_6738', - 'foo_6739', - 'foo_6740', - 'foo_6741', - 'foo_6742', - 'foo_6743', - 'foo_6744', - 'foo_6745', - 'foo_6746', - 'foo_6747', - 'foo_6748', - 'foo_6749', - 'foo_6750', - 'foo_6751', - 'foo_6752', - 'foo_6753', - 'foo_6754', - 'foo_6755', - 'foo_6756', - 'foo_6757', - 'foo_6758', - 'foo_6759', - 'foo_6760', - 'foo_6761', - 'foo_6762', - 'foo_6763', - 'foo_6764', - 'foo_6765', - 'foo_6766', - 'foo_6767', - 'foo_6768', - 'foo_6769', - 'foo_6770', - 'foo_6771', - 'foo_6772', - 'foo_6773', - 'foo_6774', - 'foo_6775', - 'foo_6776', - 'foo_6777', - 'foo_6778', - 'foo_6779', - 'foo_6780', - 'foo_6781', - 'foo_6782', - 'foo_6783', - 'foo_6784', - 'foo_6785', - 'foo_6786', - 'foo_6787', - 'foo_6788', - 'foo_6789', - 'foo_6790', - 'foo_6791', - 'foo_6792', - 'foo_6793', - 'foo_6794', - 'foo_6795', - 'foo_6796', - 'foo_6797', - 'foo_6798', - 'foo_6799', - 'foo_6800', - 'foo_6801', - 'foo_6802', - 'foo_6803', - 'foo_6804', - 'foo_6805', - 'foo_6806', - 'foo_6807', - 'foo_6808', - 'foo_6809', - 'foo_6810', - 'foo_6811', - 'foo_6812', - 'foo_6813', - 'foo_6814', - 'foo_6815', - 'foo_6816', - 'foo_6817', - 'foo_6818', - 'foo_6819', - 'foo_6820', - 'foo_6821', - 'foo_6822', - 'foo_6823', - 'foo_6824', - 'foo_6825', - 'foo_6826', - 'foo_6827', - 'foo_6828', - 'foo_6829', - 'foo_6830', - 'foo_6831', - 'foo_6832', - 'foo_6833', - 'foo_6834', - 'foo_6835', - 'foo_6836', - 'foo_6837', - 'foo_6838', - 'foo_6839', - 'foo_6840', - 'foo_6841', - 'foo_6842', - 'foo_6843', - 'foo_6844', - 'foo_6845', - 'foo_6846', - 'foo_6847', - 'foo_6848', - 'foo_6849', - 'foo_6850', - 'foo_6851', - 'foo_6852', - 'foo_6853', - 'foo_6854', - 'foo_6855', - 'foo_6856', - 'foo_6857', - 'foo_6858', - 'foo_6859', - 'foo_6860', - 'foo_6861', - 'foo_6862', - 'foo_6863', - 'foo_6864', - 'foo_6865', - 'foo_6866', - 'foo_6867', - 'foo_6868', - 'foo_6869', - 'foo_6870', - 'foo_6871', - 'foo_6872', - 'foo_6873', - 'foo_6874', - 'foo_6875', - 'foo_6876', - 'foo_6877', - 'foo_6878', - 'foo_6879', - 'foo_6880', - 'foo_6881', - 'foo_6882', - 'foo_6883', - 'foo_6884', - 'foo_6885', - 'foo_6886', - 'foo_6887', - 'foo_6888', - 'foo_6889', - 'foo_6890', - 'foo_6891', - 'foo_6892', - 'foo_6893', - 'foo_6894', - 'foo_6895', - 'foo_6896', - 'foo_6897', - 'foo_6898', - 'foo_6899', - 'foo_6900', - 'foo_6901', - 'foo_6902', - 'foo_6903', - 'foo_6904', - 'foo_6905', - 'foo_6906', - 'foo_6907', - 'foo_6908', - 'foo_6909', - 'foo_6910', - 'foo_6911', - 'foo_6912', - 'foo_6913', - 'foo_6914', - 'foo_6915', - 'foo_6916', - 'foo_6917', - 'foo_6918', - 'foo_6919', - 'foo_6920', - 'foo_6921', - 'foo_6922', - 'foo_6923', - 'foo_6924', - 'foo_6925', - 'foo_6926', - 'foo_6927', - 'foo_6928', - 'foo_6929', - 'foo_6930', - 'foo_6931', - 'foo_6932', - 'foo_6933', - 'foo_6934', - 'foo_6935', - 'foo_6936', - 'foo_6937', - 'foo_6938', - 'foo_6939', - 'foo_6940', - 'foo_6941', - 'foo_6942', - 'foo_6943', - 'foo_6944', - 'foo_6945', - 'foo_6946', - 'foo_6947', - 'foo_6948', - 'foo_6949', - 'foo_6950', - 'foo_6951', - 'foo_6952', - 'foo_6953', - 'foo_6954', - 'foo_6955', - 'foo_6956', - 'foo_6957', - 'foo_6958', - 'foo_6959', - 'foo_6960', - 'foo_6961', - 'foo_6962', - 'foo_6963', - 'foo_6964', - 'foo_6965', - 'foo_6966', - 'foo_6967', - 'foo_6968', - 'foo_6969', - 'foo_6970', - 'foo_6971', - 'foo_6972', - 'foo_6973', - 'foo_6974', - 'foo_6975', - 'foo_6976', - 'foo_6977', - 'foo_6978', - 'foo_6979', - 'foo_6980', - 'foo_6981', - 'foo_6982', - 'foo_6983', - 'foo_6984', - 'foo_6985', - 'foo_6986', - 'foo_6987', - 'foo_6988', - 'foo_6989', - 'foo_6990', - 'foo_6991', - 'foo_6992', - 'foo_6993', - 'foo_6994', - 'foo_6995', - 'foo_6996', - 'foo_6997', - 'foo_6998', - 'foo_6999', - 'foo_7000', - 'foo_7001', - 'foo_7002', - 'foo_7003', - 'foo_7004', - 'foo_7005', - 'foo_7006', - 'foo_7007', - 'foo_7008', - 'foo_7009', - 'foo_7010', - 'foo_7011', - 'foo_7012', - 'foo_7013', - 'foo_7014', - 'foo_7015', - 'foo_7016', - 'foo_7017', - 'foo_7018', - 'foo_7019', - 'foo_7020', - 'foo_7021', - 'foo_7022', - 'foo_7023', - 'foo_7024', - 'foo_7025', - 'foo_7026', - 'foo_7027', - 'foo_7028', - 'foo_7029', - 'foo_7030', - 'foo_7031', - 'foo_7032', - 'foo_7033', - 'foo_7034', - 'foo_7035', - 'foo_7036', - 'foo_7037', - 'foo_7038', - 'foo_7039', - 'foo_7040', - 'foo_7041', - 'foo_7042', - 'foo_7043', - 'foo_7044', - 'foo_7045', - 'foo_7046', - 'foo_7047', - 'foo_7048', - 'foo_7049', - 'foo_7050', - 'foo_7051', - 'foo_7052', - 'foo_7053', - 'foo_7054', - 'foo_7055', - 'foo_7056', - 'foo_7057', - 'foo_7058', - 'foo_7059', - 'foo_7060', - 'foo_7061', - 'foo_7062', - 'foo_7063', - 'foo_7064', - 'foo_7065', - 'foo_7066', - 'foo_7067', - 'foo_7068', - 'foo_7069', - 'foo_7070', - 'foo_7071', - 'foo_7072', - 'foo_7073', - 'foo_7074', - 'foo_7075', - 'foo_7076', - 'foo_7077', - 'foo_7078', - 'foo_7079', - 'foo_7080', - 'foo_7081', - 'foo_7082', - 'foo_7083', - 'foo_7084', - 'foo_7085', - 'foo_7086', - 'foo_7087', - 'foo_7088', - 'foo_7089', - 'foo_7090', - 'foo_7091', - 'foo_7092', - 'foo_7093', - 'foo_7094', - 'foo_7095', - 'foo_7096', - 'foo_7097', - 'foo_7098', - 'foo_7099', - 'foo_7100', - 'foo_7101', - 'foo_7102', - 'foo_7103', - 'foo_7104', - 'foo_7105', - 'foo_7106', - 'foo_7107', - 'foo_7108', - 'foo_7109', - 'foo_7110', - 'foo_7111', - 'foo_7112', - 'foo_7113', - 'foo_7114', - 'foo_7115', - 'foo_7116', - 'foo_7117', - 'foo_7118', - 'foo_7119', - 'foo_7120', - 'foo_7121', - 'foo_7122', - 'foo_7123', - 'foo_7124', - 'foo_7125', - 'foo_7126', - 'foo_7127', - 'foo_7128', - 'foo_7129', - 'foo_7130', - 'foo_7131', - 'foo_7132', - 'foo_7133', - 'foo_7134', - 'foo_7135', - 'foo_7136', - 'foo_7137', - 'foo_7138', - 'foo_7139', - 'foo_7140', - 'foo_7141', - 'foo_7142', - 'foo_7143', - 'foo_7144', - 'foo_7145', - 'foo_7146', - 'foo_7147', - 'foo_7148', - 'foo_7149', - 'foo_7150', - 'foo_7151', - 'foo_7152', - 'foo_7153', - 'foo_7154', - 'foo_7155', - 'foo_7156', - 'foo_7157', - 'foo_7158', - 'foo_7159', - 'foo_7160', - 'foo_7161', - 'foo_7162', - 'foo_7163', - 'foo_7164', - 'foo_7165', - 'foo_7166', - 'foo_7167', - 'foo_7168', - 'foo_7169', - 'foo_7170', - 'foo_7171', - 'foo_7172', - 'foo_7173', - 'foo_7174', - 'foo_7175', - 'foo_7176', - 'foo_7177', - 'foo_7178', - 'foo_7179', - 'foo_7180', - 'foo_7181', - 'foo_7182', - 'foo_7183', - 'foo_7184', - 'foo_7185', - 'foo_7186', - 'foo_7187', - 'foo_7188', - 'foo_7189', - 'foo_7190', - 'foo_7191', - 'foo_7192', - 'foo_7193', - 'foo_7194', - 'foo_7195', - 'foo_7196', - 'foo_7197', - 'foo_7198', - 'foo_7199', - 'foo_7200', - 'foo_7201', - 'foo_7202', - 'foo_7203', - 'foo_7204', - 'foo_7205', - 'foo_7206', - 'foo_7207', - 'foo_7208', - 'foo_7209', - 'foo_7210', - 'foo_7211', - 'foo_7212', - 'foo_7213', - 'foo_7214', - 'foo_7215', - 'foo_7216', - 'foo_7217', - 'foo_7218', - 'foo_7219', - 'foo_7220', - 'foo_7221', - 'foo_7222', - 'foo_7223', - 'foo_7224', - 'foo_7225', - 'foo_7226', - 'foo_7227', - 'foo_7228', - 'foo_7229', - 'foo_7230', - 'foo_7231', - 'foo_7232', - 'foo_7233', - 'foo_7234', - 'foo_7235', - 'foo_7236', - 'foo_7237', - 'foo_7238', - 'foo_7239', - 'foo_7240', - 'foo_7241', - 'foo_7242', - 'foo_7243', - 'foo_7244', - 'foo_7245', - 'foo_7246', - 'foo_7247', - 'foo_7248', - 'foo_7249', - 'foo_7250', - 'foo_7251', - 'foo_7252', - 'foo_7253', - 'foo_7254', - 'foo_7255', - 'foo_7256', - 'foo_7257', - 'foo_7258', - 'foo_7259', - 'foo_7260', - 'foo_7261', - 'foo_7262', - 'foo_7263', - 'foo_7264', - 'foo_7265', - 'foo_7266', - 'foo_7267', - 'foo_7268', - 'foo_7269', - 'foo_7270', - 'foo_7271', - 'foo_7272', - 'foo_7273', - 'foo_7274', - 'foo_7275', - 'foo_7276', - 'foo_7277', - 'foo_7278', - 'foo_7279', - 'foo_7280', - 'foo_7281', - 'foo_7282', - 'foo_7283', - 'foo_7284', - 'foo_7285', - 'foo_7286', - 'foo_7287', - 'foo_7288', - 'foo_7289', - 'foo_7290', - 'foo_7291', - 'foo_7292', - 'foo_7293', - 'foo_7294', - 'foo_7295', - 'foo_7296', - 'foo_7297', - 'foo_7298', - 'foo_7299', - 'foo_7300', - 'foo_7301', - 'foo_7302', - 'foo_7303', - 'foo_7304', - 'foo_7305', - 'foo_7306', - 'foo_7307', - 'foo_7308', - 'foo_7309', - 'foo_7310', - 'foo_7311', - 'foo_7312', - 'foo_7313', - 'foo_7314', - 'foo_7315', - 'foo_7316', - 'foo_7317', - 'foo_7318', - 'foo_7319', - 'foo_7320', - 'foo_7321', - 'foo_7322', - 'foo_7323', - 'foo_7324', - 'foo_7325', - 'foo_7326', - 'foo_7327', - 'foo_7328', - 'foo_7329', - 'foo_7330', - 'foo_7331', - 'foo_7332', - 'foo_7333', - 'foo_7334', - 'foo_7335', - 'foo_7336', - 'foo_7337', - 'foo_7338', - 'foo_7339', - 'foo_7340', - 'foo_7341', - 'foo_7342', - 'foo_7343', - 'foo_7344', - 'foo_7345', - 'foo_7346', - 'foo_7347', - 'foo_7348', - 'foo_7349', - 'foo_7350', - 'foo_7351', - 'foo_7352', - 'foo_7353', - 'foo_7354', - 'foo_7355', - 'foo_7356', - 'foo_7357', - 'foo_7358', - 'foo_7359', - 'foo_7360', - 'foo_7361', - 'foo_7362', - 'foo_7363', - 'foo_7364', - 'foo_7365', - 'foo_7366', - 'foo_7367', - 'foo_7368', - 'foo_7369', - 'foo_7370', - 'foo_7371', - 'foo_7372', - 'foo_7373', - 'foo_7374', - 'foo_7375', - 'foo_7376', - 'foo_7377', - 'foo_7378', - 'foo_7379', - 'foo_7380', - 'foo_7381', - 'foo_7382', - 'foo_7383', - 'foo_7384', - 'foo_7385', - 'foo_7386', - 'foo_7387', - 'foo_7388', - 'foo_7389', - 'foo_7390', - 'foo_7391', - 'foo_7392', - 'foo_7393', - 'foo_7394', - 'foo_7395', - 'foo_7396', - 'foo_7397', - 'foo_7398', - 'foo_7399', - 'foo_7400', - 'foo_7401', - 'foo_7402', - 'foo_7403', - 'foo_7404', - 'foo_7405', - 'foo_7406', - 'foo_7407', - 'foo_7408', - 'foo_7409', - 'foo_7410', - 'foo_7411', - 'foo_7412', - 'foo_7413', - 'foo_7414', - 'foo_7415', - 'foo_7416', - 'foo_7417', - 'foo_7418', - 'foo_7419', - 'foo_7420', - 'foo_7421', - 'foo_7422', - 'foo_7423', - 'foo_7424', - 'foo_7425', - 'foo_7426', - 'foo_7427', - 'foo_7428', - 'foo_7429', - 'foo_7430', - 'foo_7431', - 'foo_7432', - 'foo_7433', - 'foo_7434', - 'foo_7435', - 'foo_7436', - 'foo_7437', - 'foo_7438', - 'foo_7439', - 'foo_7440', - 'foo_7441', - 'foo_7442', - 'foo_7443', - 'foo_7444', - 'foo_7445', - 'foo_7446', - 'foo_7447', - 'foo_7448', - 'foo_7449', - 'foo_7450', - 'foo_7451', - 'foo_7452', - 'foo_7453', - 'foo_7454', - 'foo_7455', - 'foo_7456', - 'foo_7457', - 'foo_7458', - 'foo_7459', - 'foo_7460', - 'foo_7461', - 'foo_7462', - 'foo_7463', - 'foo_7464', - 'foo_7465', - 'foo_7466', - 'foo_7467', - 'foo_7468', - 'foo_7469', - 'foo_7470', - 'foo_7471', - 'foo_7472', - 'foo_7473', - 'foo_7474', - 'foo_7475', - 'foo_7476', - 'foo_7477', - 'foo_7478', - 'foo_7479', - 'foo_7480', - 'foo_7481', - 'foo_7482', - 'foo_7483', - 'foo_7484', - 'foo_7485', - 'foo_7486', - 'foo_7487', - 'foo_7488', - 'foo_7489', - 'foo_7490', - 'foo_7491', - 'foo_7492', - 'foo_7493', - 'foo_7494', - 'foo_7495', - 'foo_7496', - 'foo_7497', - 'foo_7498', - 'foo_7499', - 'foo_7500', - 'foo_7501', - 'foo_7502', - 'foo_7503', - 'foo_7504', - 'foo_7505', - 'foo_7506', - 'foo_7507', - 'foo_7508', - 'foo_7509', - 'foo_7510', - 'foo_7511', - 'foo_7512', - 'foo_7513', - 'foo_7514', - 'foo_7515', - 'foo_7516', - 'foo_7517', - 'foo_7518', - 'foo_7519', - 'foo_7520', - 'foo_7521', - 'foo_7522', - 'foo_7523', - 'foo_7524', - 'foo_7525', - 'foo_7526', - 'foo_7527', - 'foo_7528', - 'foo_7529', - 'foo_7530', - 'foo_7531', - 'foo_7532', - 'foo_7533', - 'foo_7534', - 'foo_7535', - 'foo_7536', - 'foo_7537', - 'foo_7538', - 'foo_7539', - 'foo_7540', - 'foo_7541', - 'foo_7542', - 'foo_7543', - 'foo_7544', - 'foo_7545', - 'foo_7546', - 'foo_7547', - 'foo_7548', - 'foo_7549', - 'foo_7550', - 'foo_7551', - 'foo_7552', - 'foo_7553', - 'foo_7554', - 'foo_7555', - 'foo_7556', - 'foo_7557', - 'foo_7558', - 'foo_7559', - 'foo_7560', - 'foo_7561', - 'foo_7562', - 'foo_7563', - 'foo_7564', - 'foo_7565', - 'foo_7566', - 'foo_7567', - 'foo_7568', - 'foo_7569', - 'foo_7570', - 'foo_7571', - 'foo_7572', - 'foo_7573', - 'foo_7574', - 'foo_7575', - 'foo_7576', - 'foo_7577', - 'foo_7578', - 'foo_7579', - 'foo_7580', - 'foo_7581', - 'foo_7582', - 'foo_7583', - 'foo_7584', - 'foo_7585', - 'foo_7586', - 'foo_7587', - 'foo_7588', - 'foo_7589', - 'foo_7590', - 'foo_7591', - 'foo_7592', - 'foo_7593', - 'foo_7594', - 'foo_7595', - 'foo_7596', - 'foo_7597', - 'foo_7598', - 'foo_7599', - 'foo_7600', - 'foo_7601', - 'foo_7602', - 'foo_7603', - 'foo_7604', - 'foo_7605', - 'foo_7606', - 'foo_7607', - 'foo_7608', - 'foo_7609', - 'foo_7610', - 'foo_7611', - 'foo_7612', - 'foo_7613', - 'foo_7614', - 'foo_7615', - 'foo_7616', - 'foo_7617', - 'foo_7618', - 'foo_7619', - 'foo_7620', - 'foo_7621', - 'foo_7622', - 'foo_7623', - 'foo_7624', - 'foo_7625', - 'foo_7626', - 'foo_7627', - 'foo_7628', - 'foo_7629', - 'foo_7630', - 'foo_7631', - 'foo_7632', - 'foo_7633', - 'foo_7634', - 'foo_7635', - 'foo_7636', - 'foo_7637', - 'foo_7638', - 'foo_7639', - 'foo_7640', - 'foo_7641', - 'foo_7642', - 'foo_7643', - 'foo_7644', - 'foo_7645', - 'foo_7646', - 'foo_7647', - 'foo_7648', - 'foo_7649', - 'foo_7650', - 'foo_7651', - 'foo_7652', - 'foo_7653', - 'foo_7654', - 'foo_7655', - 'foo_7656', - 'foo_7657', - 'foo_7658', - 'foo_7659', - 'foo_7660', - 'foo_7661', - 'foo_7662', - 'foo_7663', - 'foo_7664', - 'foo_7665', - 'foo_7666', - 'foo_7667', - 'foo_7668', - 'foo_7669', - 'foo_7670', - 'foo_7671', - 'foo_7672', - 'foo_7673', - 'foo_7674', - 'foo_7675', - 'foo_7676', - 'foo_7677', - 'foo_7678', - 'foo_7679', - 'foo_7680', - 'foo_7681', - 'foo_7682', - 'foo_7683', - 'foo_7684', - 'foo_7685', - 'foo_7686', - 'foo_7687', - 'foo_7688', - 'foo_7689', - 'foo_7690', - 'foo_7691', - 'foo_7692', - 'foo_7693', - 'foo_7694', - 'foo_7695', - 'foo_7696', - 'foo_7697', - 'foo_7698', - 'foo_7699', - 'foo_7700', - 'foo_7701', - 'foo_7702', - 'foo_7703', - 'foo_7704', - 'foo_7705', - 'foo_7706', - 'foo_7707', - 'foo_7708', - 'foo_7709', - 'foo_7710', - 'foo_7711', - 'foo_7712', - 'foo_7713', - 'foo_7714', - 'foo_7715', - 'foo_7716', - 'foo_7717', - 'foo_7718', - 'foo_7719', - 'foo_7720', - 'foo_7721', - 'foo_7722', - 'foo_7723', - 'foo_7724', - 'foo_7725', - 'foo_7726', - 'foo_7727', - 'foo_7728', - 'foo_7729', - 'foo_7730', - 'foo_7731', - 'foo_7732', - 'foo_7733', - 'foo_7734', - 'foo_7735', - 'foo_7736', - 'foo_7737', - 'foo_7738', - 'foo_7739', - 'foo_7740', - 'foo_7741', - 'foo_7742', - 'foo_7743', - 'foo_7744', - 'foo_7745', - 'foo_7746', - 'foo_7747', - 'foo_7748', - 'foo_7749', - 'foo_7750', - 'foo_7751', - 'foo_7752', - 'foo_7753', - 'foo_7754', - 'foo_7755', - 'foo_7756', - 'foo_7757', - 'foo_7758', - 'foo_7759', - 'foo_7760', - 'foo_7761', - 'foo_7762', - 'foo_7763', - 'foo_7764', - 'foo_7765', - 'foo_7766', - 'foo_7767', - 'foo_7768', - 'foo_7769', - 'foo_7770', - 'foo_7771', - 'foo_7772', - 'foo_7773', - 'foo_7774', - 'foo_7775', - 'foo_7776', - 'foo_7777', - 'foo_7778', - 'foo_7779', - 'foo_7780', - 'foo_7781', - 'foo_7782', - 'foo_7783', - 'foo_7784', - 'foo_7785', - 'foo_7786', - 'foo_7787', - 'foo_7788', - 'foo_7789', - 'foo_7790', - 'foo_7791', - 'foo_7792', - 'foo_7793', - 'foo_7794', - 'foo_7795', - 'foo_7796', - 'foo_7797', - 'foo_7798', - 'foo_7799', - 'foo_7800', - 'foo_7801', - 'foo_7802', - 'foo_7803', - 'foo_7804', - 'foo_7805', - 'foo_7806', - 'foo_7807', - 'foo_7808', - 'foo_7809', - 'foo_7810', - 'foo_7811', - 'foo_7812', - 'foo_7813', - 'foo_7814', - 'foo_7815', - 'foo_7816', - 'foo_7817', - 'foo_7818', - 'foo_7819', - 'foo_7820', - 'foo_7821', - 'foo_7822', - 'foo_7823', - 'foo_7824', - 'foo_7825', - 'foo_7826', - 'foo_7827', - 'foo_7828', - 'foo_7829', - 'foo_7830', - 'foo_7831', - 'foo_7832', - 'foo_7833', - 'foo_7834', - 'foo_7835', - 'foo_7836', - 'foo_7837', - 'foo_7838', - 'foo_7839', - 'foo_7840', - 'foo_7841', - 'foo_7842', - 'foo_7843', - 'foo_7844', - 'foo_7845', - 'foo_7846', - 'foo_7847', - 'foo_7848', - 'foo_7849', - 'foo_7850', - 'foo_7851', - 'foo_7852', - 'foo_7853', - 'foo_7854', - 'foo_7855', - 'foo_7856', - 'foo_7857', - 'foo_7858', - 'foo_7859', - 'foo_7860', - 'foo_7861', - 'foo_7862', - 'foo_7863', - 'foo_7864', - 'foo_7865', - 'foo_7866', - 'foo_7867', - 'foo_7868', - 'foo_7869', - 'foo_7870', - 'foo_7871', - 'foo_7872', - 'foo_7873', - 'foo_7874', - 'foo_7875', - 'foo_7876', - 'foo_7877', - 'foo_7878', - 'foo_7879', - 'foo_7880', - 'foo_7881', - 'foo_7882', - 'foo_7883', - 'foo_7884', - 'foo_7885', - 'foo_7886', - 'foo_7887', - 'foo_7888', - 'foo_7889', - 'foo_7890', - 'foo_7891', - 'foo_7892', - 'foo_7893', - 'foo_7894', - 'foo_7895', - 'foo_7896', - 'foo_7897', - 'foo_7898', - 'foo_7899', - 'foo_7900', - 'foo_7901', - 'foo_7902', - 'foo_7903', - 'foo_7904', - 'foo_7905', - 'foo_7906', - 'foo_7907', - 'foo_7908', - 'foo_7909', - 'foo_7910', - 'foo_7911', - 'foo_7912', - 'foo_7913', - 'foo_7914', - 'foo_7915', - 'foo_7916', - 'foo_7917', - 'foo_7918', - 'foo_7919', - 'foo_7920', - 'foo_7921', - 'foo_7922', - 'foo_7923', - 'foo_7924', - 'foo_7925', - 'foo_7926', - 'foo_7927', - 'foo_7928', - 'foo_7929', - 'foo_7930', - 'foo_7931', - 'foo_7932', - 'foo_7933', - 'foo_7934', - 'foo_7935', - 'foo_7936', - 'foo_7937', - 'foo_7938', - 'foo_7939', - 'foo_7940', - 'foo_7941', - 'foo_7942', - 'foo_7943', - 'foo_7944', - 'foo_7945', - 'foo_7946', - 'foo_7947', - 'foo_7948', - 'foo_7949', - 'foo_7950', - 'foo_7951', - 'foo_7952', - 'foo_7953', - 'foo_7954', - 'foo_7955', - 'foo_7956', - 'foo_7957', - 'foo_7958', - 'foo_7959', - 'foo_7960', - 'foo_7961', - 'foo_7962', - 'foo_7963', - 'foo_7964', - 'foo_7965', - 'foo_7966', - 'foo_7967', - 'foo_7968', - 'foo_7969', - 'foo_7970', - 'foo_7971', - 'foo_7972', - 'foo_7973', - 'foo_7974', - 'foo_7975', - 'foo_7976', - 'foo_7977', - 'foo_7978', - 'foo_7979', - 'foo_7980', - 'foo_7981', - 'foo_7982', - 'foo_7983', - 'foo_7984', - 'foo_7985', - 'foo_7986', - 'foo_7987', - 'foo_7988', - 'foo_7989', - 'foo_7990', - 'foo_7991', - 'foo_7992', - 'foo_7993', - 'foo_7994', - 'foo_7995', - 'foo_7996', - 'foo_7997', - 'foo_7998', - 'foo_7999', - 'foo_8000', - 'foo_8001', - 'foo_8002', - 'foo_8003', - 'foo_8004', - 'foo_8005', - 'foo_8006', - 'foo_8007', - 'foo_8008', - 'foo_8009', - 'foo_8010', - 'foo_8011', - 'foo_8012', - 'foo_8013', - 'foo_8014', - 'foo_8015', - 'foo_8016', - 'foo_8017', - 'foo_8018', - 'foo_8019', - 'foo_8020', - 'foo_8021', - 'foo_8022', - 'foo_8023', - 'foo_8024', - 'foo_8025', - 'foo_8026', - 'foo_8027', - 'foo_8028', - 'foo_8029', - 'foo_8030', - 'foo_8031', - 'foo_8032', - 'foo_8033', - 'foo_8034', - 'foo_8035', - 'foo_8036', - 'foo_8037', - 'foo_8038', - 'foo_8039', - 'foo_8040', - 'foo_8041', - 'foo_8042', - 'foo_8043', - 'foo_8044', - 'foo_8045', - 'foo_8046', - 'foo_8047', - 'foo_8048', - 'foo_8049', - 'foo_8050', - 'foo_8051', - 'foo_8052', - 'foo_8053', - 'foo_8054', - 'foo_8055', - 'foo_8056', - 'foo_8057', - 'foo_8058', - 'foo_8059', - 'foo_8060', - 'foo_8061', - 'foo_8062', - 'foo_8063', - 'foo_8064', - 'foo_8065', - 'foo_8066', - 'foo_8067', - 'foo_8068', - 'foo_8069', - 'foo_8070', - 'foo_8071', - 'foo_8072', - 'foo_8073', - 'foo_8074', - 'foo_8075', - 'foo_8076', - 'foo_8077', - 'foo_8078', - 'foo_8079', - 'foo_8080', - 'foo_8081', - 'foo_8082', - 'foo_8083', - 'foo_8084', - 'foo_8085', - 'foo_8086', - 'foo_8087', - 'foo_8088', - 'foo_8089', - 'foo_8090', - 'foo_8091', - 'foo_8092', - 'foo_8093', - 'foo_8094', - 'foo_8095', - 'foo_8096', - 'foo_8097', - 'foo_8098', - 'foo_8099', - 'foo_8100', - 'foo_8101', - 'foo_8102', - 'foo_8103', - 'foo_8104', - 'foo_8105', - 'foo_8106', - 'foo_8107', - 'foo_8108', - 'foo_8109', - 'foo_8110', - 'foo_8111', - 'foo_8112', - 'foo_8113', - 'foo_8114', - 'foo_8115', - 'foo_8116', - 'foo_8117', - 'foo_8118', - 'foo_8119', - 'foo_8120', - 'foo_8121', - 'foo_8122', - 'foo_8123', - 'foo_8124', - 'foo_8125', - 'foo_8126', - 'foo_8127', - 'foo_8128', - 'foo_8129', - 'foo_8130', - 'foo_8131', - 'foo_8132', - 'foo_8133', - 'foo_8134', - 'foo_8135', - 'foo_8136', - 'foo_8137', - 'foo_8138', - 'foo_8139', - 'foo_8140', - 'foo_8141', - 'foo_8142', - 'foo_8143', - 'foo_8144', - 'foo_8145', - 'foo_8146', - 'foo_8147', - 'foo_8148', - 'foo_8149', - 'foo_8150', - 'foo_8151', - 'foo_8152', - 'foo_8153', - 'foo_8154', - 'foo_8155', - 'foo_8156', - 'foo_8157', - 'foo_8158', - 'foo_8159', - 'foo_8160', - 'foo_8161', - 'foo_8162', - 'foo_8163', - 'foo_8164', - 'foo_8165', - 'foo_8166', - 'foo_8167', - 'foo_8168', - 'foo_8169', - 'foo_8170', - 'foo_8171', - 'foo_8172', - 'foo_8173', - 'foo_8174', - 'foo_8175', - 'foo_8176', - 'foo_8177', - 'foo_8178', - 'foo_8179', - 'foo_8180', - 'foo_8181', - 'foo_8182', - 'foo_8183', - 'foo_8184', - 'foo_8185', - 'foo_8186', - 'foo_8187', - 'foo_8188', - 'foo_8189', - 'foo_8190', - 'foo_8191', - 'foo_8192', - 'foo_8193', - 'foo_8194', - 'foo_8195', - 'foo_8196', - 'foo_8197', - 'foo_8198', - 'foo_8199', - 'foo_8200', - 'foo_8201', - 'foo_8202', - 'foo_8203', - 'foo_8204', - 'foo_8205', - 'foo_8206', - 'foo_8207', - 'foo_8208', - 'foo_8209', - 'foo_8210', - 'foo_8211', - 'foo_8212', - 'foo_8213', - 'foo_8214', - 'foo_8215', - 'foo_8216', - 'foo_8217', - 'foo_8218', - 'foo_8219', - 'foo_8220', - 'foo_8221', - 'foo_8222', - 'foo_8223', - 'foo_8224', - 'foo_8225', - 'foo_8226', - 'foo_8227', - 'foo_8228', - 'foo_8229', - 'foo_8230', - 'foo_8231', - 'foo_8232', - 'foo_8233', - 'foo_8234', - 'foo_8235', - 'foo_8236', - 'foo_8237', - 'foo_8238', - 'foo_8239', - 'foo_8240', - 'foo_8241', - 'foo_8242', - 'foo_8243', - 'foo_8244', - 'foo_8245', - 'foo_8246', - 'foo_8247', - 'foo_8248', - 'foo_8249', - 'foo_8250', - 'foo_8251', - 'foo_8252', - 'foo_8253', - 'foo_8254', - 'foo_8255', - 'foo_8256', - 'foo_8257', - 'foo_8258', - 'foo_8259', - 'foo_8260', - 'foo_8261', - 'foo_8262', - 'foo_8263', - 'foo_8264', - 'foo_8265', - 'foo_8266', - 'foo_8267', - 'foo_8268', - 'foo_8269', - 'foo_8270', - 'foo_8271', - 'foo_8272', - 'foo_8273', - 'foo_8274', - 'foo_8275', - 'foo_8276', - 'foo_8277', - 'foo_8278', - 'foo_8279', - 'foo_8280', - 'foo_8281', - 'foo_8282', - 'foo_8283', - 'foo_8284', - 'foo_8285', - 'foo_8286', - 'foo_8287', - 'foo_8288', - 'foo_8289', - 'foo_8290', - 'foo_8291', - 'foo_8292', - 'foo_8293', - 'foo_8294', - 'foo_8295', - 'foo_8296', - 'foo_8297', - 'foo_8298', - 'foo_8299', - 'foo_8300', - 'foo_8301', - 'foo_8302', - 'foo_8303', - 'foo_8304', - 'foo_8305', - 'foo_8306', - 'foo_8307', - 'foo_8308', - 'foo_8309', - 'foo_8310', - 'foo_8311', - 'foo_8312', - 'foo_8313', - 'foo_8314', - 'foo_8315', - 'foo_8316', - 'foo_8317', - 'foo_8318', - 'foo_8319', - 'foo_8320', - 'foo_8321', - 'foo_8322', - 'foo_8323', - 'foo_8324', - 'foo_8325', - 'foo_8326', - 'foo_8327', - 'foo_8328', - 'foo_8329', - 'foo_8330', - 'foo_8331', - 'foo_8332', - 'foo_8333', - 'foo_8334', - 'foo_8335', - 'foo_8336', - 'foo_8337', - 'foo_8338', - 'foo_8339', - 'foo_8340', - 'foo_8341', - 'foo_8342', - 'foo_8343', - 'foo_8344', - 'foo_8345', - 'foo_8346', - 'foo_8347', - 'foo_8348', - 'foo_8349', - 'foo_8350', - 'foo_8351', - 'foo_8352', - 'foo_8353', - 'foo_8354', - 'foo_8355', - 'foo_8356', - 'foo_8357', - 'foo_8358', - 'foo_8359', - 'foo_8360', - 'foo_8361', - 'foo_8362', - 'foo_8363', - 'foo_8364', - 'foo_8365', - 'foo_8366', - 'foo_8367', - 'foo_8368', - 'foo_8369', - 'foo_8370', - 'foo_8371', - 'foo_8372', - 'foo_8373', - 'foo_8374', - 'foo_8375', - 'foo_8376', - 'foo_8377', - 'foo_8378', - 'foo_8379', - 'foo_8380', - 'foo_8381', - 'foo_8382', - 'foo_8383', - 'foo_8384', - 'foo_8385', - 'foo_8386', - 'foo_8387', - 'foo_8388', - 'foo_8389', - 'foo_8390', - 'foo_8391', - 'foo_8392', - 'foo_8393', - 'foo_8394', - 'foo_8395', - 'foo_8396', - 'foo_8397', - 'foo_8398', - 'foo_8399', - 'foo_8400', - 'foo_8401', - 'foo_8402', - 'foo_8403', - 'foo_8404', - 'foo_8405', - 'foo_8406', - 'foo_8407', - 'foo_8408', - 'foo_8409', - 'foo_8410', - 'foo_8411', - 'foo_8412', - 'foo_8413', - 'foo_8414', - 'foo_8415', - 'foo_8416', - 'foo_8417', - 'foo_8418', - 'foo_8419', - 'foo_8420', - 'foo_8421', - 'foo_8422', - 'foo_8423', - 'foo_8424', - 'foo_8425', - 'foo_8426', - 'foo_8427', - 'foo_8428', - 'foo_8429', - 'foo_8430', - 'foo_8431', - 'foo_8432', - 'foo_8433', - 'foo_8434', - 'foo_8435', - 'foo_8436', - 'foo_8437', - 'foo_8438', - 'foo_8439', - 'foo_8440', - 'foo_8441', - 'foo_8442', - 'foo_8443', - 'foo_8444', - 'foo_8445', - 'foo_8446', - 'foo_8447', - 'foo_8448', - 'foo_8449', - 'foo_8450', - 'foo_8451', - 'foo_8452', - 'foo_8453', - 'foo_8454', - 'foo_8455', - 'foo_8456', - 'foo_8457', - 'foo_8458', - 'foo_8459', - 'foo_8460', - 'foo_8461', - 'foo_8462', - 'foo_8463', - 'foo_8464', - 'foo_8465', - 'foo_8466', - 'foo_8467', - 'foo_8468', - 'foo_8469', - 'foo_8470', - 'foo_8471', - 'foo_8472', - 'foo_8473', - 'foo_8474', - 'foo_8475', - 'foo_8476', - 'foo_8477', - 'foo_8478', - 'foo_8479', - 'foo_8480', - 'foo_8481', - 'foo_8482', - 'foo_8483', - 'foo_8484', - 'foo_8485', - 'foo_8486', - 'foo_8487', - 'foo_8488', - 'foo_8489', - 'foo_8490', - 'foo_8491', - 'foo_8492', - 'foo_8493', - 'foo_8494', - 'foo_8495', - 'foo_8496', - 'foo_8497', - 'foo_8498', - 'foo_8499', - 'foo_8500', - 'foo_8501', - 'foo_8502', - 'foo_8503', - 'foo_8504', - 'foo_8505', - 'foo_8506', - 'foo_8507', - 'foo_8508', - 'foo_8509', - 'foo_8510', - 'foo_8511', - 'foo_8512', - 'foo_8513', - 'foo_8514', - 'foo_8515', - 'foo_8516', - 'foo_8517', - 'foo_8518', - 'foo_8519', - 'foo_8520', - 'foo_8521', - 'foo_8522', - 'foo_8523', - 'foo_8524', - 'foo_8525', - 'foo_8526', - 'foo_8527', - 'foo_8528', - 'foo_8529', - 'foo_8530', - 'foo_8531', - 'foo_8532', - 'foo_8533', - 'foo_8534', - 'foo_8535', - 'foo_8536', - 'foo_8537', - 'foo_8538', - 'foo_8539', - 'foo_8540', - 'foo_8541', - 'foo_8542', - 'foo_8543', - 'foo_8544', - 'foo_8545', - 'foo_8546', - 'foo_8547', - 'foo_8548', - 'foo_8549', - 'foo_8550', - 'foo_8551', - 'foo_8552', - 'foo_8553', - 'foo_8554', - 'foo_8555', - 'foo_8556', - 'foo_8557', - 'foo_8558', - 'foo_8559', - 'foo_8560', - 'foo_8561', - 'foo_8562', - 'foo_8563', - 'foo_8564', - 'foo_8565', - 'foo_8566', - 'foo_8567', - 'foo_8568', - 'foo_8569', - 'foo_8570', - 'foo_8571', - 'foo_8572', - 'foo_8573', - 'foo_8574', - 'foo_8575', - 'foo_8576', - 'foo_8577', - 'foo_8578', - 'foo_8579', - 'foo_8580', - 'foo_8581', - 'foo_8582', - 'foo_8583', - 'foo_8584', - 'foo_8585', - 'foo_8586', - 'foo_8587', - 'foo_8588', - 'foo_8589', - 'foo_8590', - 'foo_8591', - 'foo_8592', - 'foo_8593', - 'foo_8594', - 'foo_8595', - 'foo_8596', - 'foo_8597', - 'foo_8598', - 'foo_8599', - 'foo_8600', - 'foo_8601', - 'foo_8602', - 'foo_8603', - 'foo_8604', - 'foo_8605', - 'foo_8606', - 'foo_8607', - 'foo_8608', - 'foo_8609', - 'foo_8610', - 'foo_8611', - 'foo_8612', - 'foo_8613', - 'foo_8614', - 'foo_8615', - 'foo_8616', - 'foo_8617', - 'foo_8618', - 'foo_8619', - 'foo_8620', - 'foo_8621', - 'foo_8622', - 'foo_8623', - 'foo_8624', - 'foo_8625', - 'foo_8626', - 'foo_8627', - 'foo_8628', - 'foo_8629', - 'foo_8630', - 'foo_8631', - 'foo_8632', - 'foo_8633', - 'foo_8634', - 'foo_8635', - 'foo_8636', - 'foo_8637', - 'foo_8638', - 'foo_8639', - 'foo_8640', - 'foo_8641', - 'foo_8642', - 'foo_8643', - 'foo_8644', - 'foo_8645', - 'foo_8646', - 'foo_8647', - 'foo_8648', - 'foo_8649', - 'foo_8650', - 'foo_8651', - 'foo_8652', - 'foo_8653', - 'foo_8654', - 'foo_8655', - 'foo_8656', - 'foo_8657', - 'foo_8658', - 'foo_8659', - 'foo_8660', - 'foo_8661', - 'foo_8662', - 'foo_8663', - 'foo_8664', - 'foo_8665', - 'foo_8666', - 'foo_8667', - 'foo_8668', - 'foo_8669', - 'foo_8670', - 'foo_8671', - 'foo_8672', - 'foo_8673', - 'foo_8674', - 'foo_8675', - 'foo_8676', - 'foo_8677', - 'foo_8678', - 'foo_8679', - 'foo_8680', - 'foo_8681', - 'foo_8682', - 'foo_8683', - 'foo_8684', - 'foo_8685', - 'foo_8686', - 'foo_8687', - 'foo_8688', - 'foo_8689', - 'foo_8690', - 'foo_8691', - 'foo_8692', - 'foo_8693', - 'foo_8694', - 'foo_8695', - 'foo_8696', - 'foo_8697', - 'foo_8698', - 'foo_8699', - 'foo_8700', - 'foo_8701', - 'foo_8702', - 'foo_8703', - 'foo_8704', - 'foo_8705', - 'foo_8706', - 'foo_8707', - 'foo_8708', - 'foo_8709', - 'foo_8710', - 'foo_8711', - 'foo_8712', - 'foo_8713', - 'foo_8714', - 'foo_8715', - 'foo_8716', - 'foo_8717', - 'foo_8718', - 'foo_8719', - 'foo_8720', - 'foo_8721', - 'foo_8722', - 'foo_8723', - 'foo_8724', - 'foo_8725', - 'foo_8726', - 'foo_8727', - 'foo_8728', - 'foo_8729', - 'foo_8730', - 'foo_8731', - 'foo_8732', - 'foo_8733', - 'foo_8734', - 'foo_8735', - 'foo_8736', - 'foo_8737', - 'foo_8738', - 'foo_8739', - 'foo_8740', - 'foo_8741', - 'foo_8742', - 'foo_8743', - 'foo_8744', - 'foo_8745', - 'foo_8746', - 'foo_8747', - 'foo_8748', - 'foo_8749', - 'foo_8750', - 'foo_8751', - 'foo_8752', - 'foo_8753', - 'foo_8754', - 'foo_8755', - 'foo_8756', - 'foo_8757', - 'foo_8758', - 'foo_8759', - 'foo_8760', - 'foo_8761', - 'foo_8762', - 'foo_8763', - 'foo_8764', - 'foo_8765', - 'foo_8766', - 'foo_8767', - 'foo_8768', - 'foo_8769', - 'foo_8770', - 'foo_8771', - 'foo_8772', - 'foo_8773', - 'foo_8774', - 'foo_8775', - 'foo_8776', - 'foo_8777', - 'foo_8778', - 'foo_8779', - 'foo_8780', - 'foo_8781', - 'foo_8782', - 'foo_8783', - 'foo_8784', - 'foo_8785', - 'foo_8786', - 'foo_8787', - 'foo_8788', - 'foo_8789', - 'foo_8790', - 'foo_8791', - 'foo_8792', - 'foo_8793', - 'foo_8794', - 'foo_8795', - 'foo_8796', - 'foo_8797', - 'foo_8798', - 'foo_8799', - 'foo_8800', - 'foo_8801', - 'foo_8802', - 'foo_8803', - 'foo_8804', - 'foo_8805', - 'foo_8806', - 'foo_8807', - 'foo_8808', - 'foo_8809', - 'foo_8810', - 'foo_8811', - 'foo_8812', - 'foo_8813', - 'foo_8814', - 'foo_8815', - 'foo_8816', - 'foo_8817', - 'foo_8818', - 'foo_8819', - 'foo_8820', - 'foo_8821', - 'foo_8822', - 'foo_8823', - 'foo_8824', - 'foo_8825', - 'foo_8826', - 'foo_8827', - 'foo_8828', - 'foo_8829', - 'foo_8830', - 'foo_8831', - 'foo_8832', - 'foo_8833', - 'foo_8834', - 'foo_8835', - 'foo_8836', - 'foo_8837', - 'foo_8838', - 'foo_8839', - 'foo_8840', - 'foo_8841', - 'foo_8842', - 'foo_8843', - 'foo_8844', - 'foo_8845', - 'foo_8846', - 'foo_8847', - 'foo_8848', - 'foo_8849', - 'foo_8850', - 'foo_8851', - 'foo_8852', - 'foo_8853', - 'foo_8854', - 'foo_8855', - 'foo_8856', - 'foo_8857', - 'foo_8858', - 'foo_8859', - 'foo_8860', - 'foo_8861', - 'foo_8862', - 'foo_8863', - 'foo_8864', - 'foo_8865', - 'foo_8866', - 'foo_8867', - 'foo_8868', - 'foo_8869', - 'foo_8870', - 'foo_8871', - 'foo_8872', - 'foo_8873', - 'foo_8874', - 'foo_8875', - 'foo_8876', - 'foo_8877', - 'foo_8878', - 'foo_8879', - 'foo_8880', - 'foo_8881', - 'foo_8882', - 'foo_8883', - 'foo_8884', - 'foo_8885', - 'foo_8886', - 'foo_8887', - 'foo_8888', - 'foo_8889', - 'foo_8890', - 'foo_8891', - 'foo_8892', - 'foo_8893', - 'foo_8894', - 'foo_8895', - 'foo_8896', - 'foo_8897', - 'foo_8898', - 'foo_8899', - 'foo_8900', - 'foo_8901', - 'foo_8902', - 'foo_8903', - 'foo_8904', - 'foo_8905', - 'foo_8906', - 'foo_8907', - 'foo_8908', - 'foo_8909', - 'foo_8910', - 'foo_8911', - 'foo_8912', - 'foo_8913', - 'foo_8914', - 'foo_8915', - 'foo_8916', - 'foo_8917', - 'foo_8918', - 'foo_8919', - 'foo_8920', - 'foo_8921', - 'foo_8922', - 'foo_8923', - 'foo_8924', - 'foo_8925', - 'foo_8926', - 'foo_8927', - 'foo_8928', - 'foo_8929', - 'foo_8930', - 'foo_8931', - 'foo_8932', - 'foo_8933', - 'foo_8934', - 'foo_8935', - 'foo_8936', - 'foo_8937', - 'foo_8938', - 'foo_8939', - 'foo_8940', - 'foo_8941', - 'foo_8942', - 'foo_8943', - 'foo_8944', - 'foo_8945', - 'foo_8946', - 'foo_8947', - 'foo_8948', - 'foo_8949', - 'foo_8950', - 'foo_8951', - 'foo_8952', - 'foo_8953', - 'foo_8954', - 'foo_8955', - 'foo_8956', - 'foo_8957', - 'foo_8958', - 'foo_8959', - 'foo_8960', - 'foo_8961', - 'foo_8962', - 'foo_8963', - 'foo_8964', - 'foo_8965', - 'foo_8966', - 'foo_8967', - 'foo_8968', - 'foo_8969', - 'foo_8970', - 'foo_8971', - 'foo_8972', - 'foo_8973', - 'foo_8974', - 'foo_8975', - 'foo_8976', - 'foo_8977', - 'foo_8978', - 'foo_8979', - 'foo_8980', - 'foo_8981', - 'foo_8982', - 'foo_8983', - 'foo_8984', - 'foo_8985', - 'foo_8986', - 'foo_8987', - 'foo_8988', - 'foo_8989', - 'foo_8990', - 'foo_8991', - 'foo_8992', - 'foo_8993', - 'foo_8994', - 'foo_8995', - 'foo_8996', - 'foo_8997', - 'foo_8998', - 'foo_8999', - 'foo_9000', - 'foo_9001', - 'foo_9002', - 'foo_9003', - 'foo_9004', - 'foo_9005', - 'foo_9006', - 'foo_9007', - 'foo_9008', - 'foo_9009', - 'foo_9010', - 'foo_9011', - 'foo_9012', - 'foo_9013', - 'foo_9014', - 'foo_9015', - 'foo_9016', - 'foo_9017', - 'foo_9018', - 'foo_9019', - 'foo_9020', - 'foo_9021', - 'foo_9022', - 'foo_9023', - 'foo_9024', - 'foo_9025', - 'foo_9026', - 'foo_9027', - 'foo_9028', - 'foo_9029', - 'foo_9030', - 'foo_9031', - 'foo_9032', - 'foo_9033', - 'foo_9034', - 'foo_9035', - 'foo_9036', - 'foo_9037', - 'foo_9038', - 'foo_9039', - 'foo_9040', - 'foo_9041', - 'foo_9042', - 'foo_9043', - 'foo_9044', - 'foo_9045', - 'foo_9046', - 'foo_9047', - 'foo_9048', - 'foo_9049', - 'foo_9050', - 'foo_9051', - 'foo_9052', - 'foo_9053', - 'foo_9054', - 'foo_9055', - 'foo_9056', - 'foo_9057', - 'foo_9058', - 'foo_9059', - 'foo_9060', - 'foo_9061', - 'foo_9062', - 'foo_9063', - 'foo_9064', - 'foo_9065', - 'foo_9066', - 'foo_9067', - 'foo_9068', - 'foo_9069', - 'foo_9070', - 'foo_9071', - 'foo_9072', - 'foo_9073', - 'foo_9074', - 'foo_9075', - 'foo_9076', - 'foo_9077', - 'foo_9078', - 'foo_9079', - 'foo_9080', - 'foo_9081', - 'foo_9082', - 'foo_9083', - 'foo_9084', - 'foo_9085', - 'foo_9086', - 'foo_9087', - 'foo_9088', - 'foo_9089', - 'foo_9090', - 'foo_9091', - 'foo_9092', - 'foo_9093', - 'foo_9094', - 'foo_9095', - 'foo_9096', - 'foo_9097', - 'foo_9098', - 'foo_9099', - 'foo_9100', - 'foo_9101', - 'foo_9102', - 'foo_9103', - 'foo_9104', - 'foo_9105', - 'foo_9106', - 'foo_9107', - 'foo_9108', - 'foo_9109', - 'foo_9110', - 'foo_9111', - 'foo_9112', - 'foo_9113', - 'foo_9114', - 'foo_9115', - 'foo_9116', - 'foo_9117', - 'foo_9118', - 'foo_9119', - 'foo_9120', - 'foo_9121', - 'foo_9122', - 'foo_9123', - 'foo_9124', - 'foo_9125', - 'foo_9126', - 'foo_9127', - 'foo_9128', - 'foo_9129', - 'foo_9130', - 'foo_9131', - 'foo_9132', - 'foo_9133', - 'foo_9134', - 'foo_9135', - 'foo_9136', - 'foo_9137', - 'foo_9138', - 'foo_9139', - 'foo_9140', - 'foo_9141', - 'foo_9142', - 'foo_9143', - 'foo_9144', - 'foo_9145', - 'foo_9146', - 'foo_9147', - 'foo_9148', - 'foo_9149', - 'foo_9150', - 'foo_9151', - 'foo_9152', - 'foo_9153', - 'foo_9154', - 'foo_9155', - 'foo_9156', - 'foo_9157', - 'foo_9158', - 'foo_9159', - 'foo_9160', - 'foo_9161', - 'foo_9162', - 'foo_9163', - 'foo_9164', - 'foo_9165', - 'foo_9166', - 'foo_9167', - 'foo_9168', - 'foo_9169', - 'foo_9170', - 'foo_9171', - 'foo_9172', - 'foo_9173', - 'foo_9174', - 'foo_9175', - 'foo_9176', - 'foo_9177', - 'foo_9178', - 'foo_9179', - 'foo_9180', - 'foo_9181', - 'foo_9182', - 'foo_9183', - 'foo_9184', - 'foo_9185', - 'foo_9186', - 'foo_9187', - 'foo_9188', - 'foo_9189', - 'foo_9190', - 'foo_9191', - 'foo_9192', - 'foo_9193', - 'foo_9194', - 'foo_9195', - 'foo_9196', - 'foo_9197', - 'foo_9198', - 'foo_9199', - 'foo_9200', - 'foo_9201', - 'foo_9202', - 'foo_9203', - 'foo_9204', - 'foo_9205', - 'foo_9206', - 'foo_9207', - 'foo_9208', - 'foo_9209', - 'foo_9210', - 'foo_9211', - 'foo_9212', - 'foo_9213', - 'foo_9214', - 'foo_9215', - 'foo_9216', - 'foo_9217', - 'foo_9218', - 'foo_9219', - 'foo_9220', - 'foo_9221', - 'foo_9222', - 'foo_9223', - 'foo_9224', - 'foo_9225', - 'foo_9226', - 'foo_9227', - 'foo_9228', - 'foo_9229', - 'foo_9230', - 'foo_9231', - 'foo_9232', - 'foo_9233', - 'foo_9234', - 'foo_9235', - 'foo_9236', - 'foo_9237', - 'foo_9238', - 'foo_9239', - 'foo_9240', - 'foo_9241', - 'foo_9242', - 'foo_9243', - 'foo_9244', - 'foo_9245', - 'foo_9246', - 'foo_9247', - 'foo_9248', - 'foo_9249', - 'foo_9250', - 'foo_9251', - 'foo_9252', - 'foo_9253', - 'foo_9254', - 'foo_9255', - 'foo_9256', - 'foo_9257', - 'foo_9258', - 'foo_9259', - 'foo_9260', - 'foo_9261', - 'foo_9262', - 'foo_9263', - 'foo_9264', - 'foo_9265', - 'foo_9266', - 'foo_9267', - 'foo_9268', - 'foo_9269', - 'foo_9270', - 'foo_9271', - 'foo_9272', - 'foo_9273', - 'foo_9274', - 'foo_9275', - 'foo_9276', - 'foo_9277', - 'foo_9278', - 'foo_9279', - 'foo_9280', - 'foo_9281', - 'foo_9282', - 'foo_9283', - 'foo_9284', - 'foo_9285', - 'foo_9286', - 'foo_9287', - 'foo_9288', - 'foo_9289', - 'foo_9290', - 'foo_9291', - 'foo_9292', - 'foo_9293', - 'foo_9294', - 'foo_9295', - 'foo_9296', - 'foo_9297', - 'foo_9298', - 'foo_9299', - 'foo_9300', - 'foo_9301', - 'foo_9302', - 'foo_9303', - 'foo_9304', - 'foo_9305', - 'foo_9306', - 'foo_9307', - 'foo_9308', - 'foo_9309', - 'foo_9310', - 'foo_9311', - 'foo_9312', - 'foo_9313', - 'foo_9314', - 'foo_9315', - 'foo_9316', - 'foo_9317', - 'foo_9318', - 'foo_9319', - 'foo_9320', - 'foo_9321', - 'foo_9322', - 'foo_9323', - 'foo_9324', - 'foo_9325', - 'foo_9326', - 'foo_9327', - 'foo_9328', - 'foo_9329', - 'foo_9330', - 'foo_9331', - 'foo_9332', - 'foo_9333', - 'foo_9334', - 'foo_9335', - 'foo_9336', - 'foo_9337', - 'foo_9338', - 'foo_9339', - 'foo_9340', - 'foo_9341', - 'foo_9342', - 'foo_9343', - 'foo_9344', - 'foo_9345', - 'foo_9346', - 'foo_9347', - 'foo_9348', - 'foo_9349', - 'foo_9350', - 'foo_9351', - 'foo_9352', - 'foo_9353', - 'foo_9354', - 'foo_9355', - 'foo_9356', - 'foo_9357', - 'foo_9358', - 'foo_9359', - 'foo_9360', - 'foo_9361', - 'foo_9362', - 'foo_9363', - 'foo_9364', - 'foo_9365', - 'foo_9366', - 'foo_9367', - 'foo_9368', - 'foo_9369', - 'foo_9370', - 'foo_9371', - 'foo_9372', - 'foo_9373', - 'foo_9374', - 'foo_9375', - 'foo_9376', - 'foo_9377', - 'foo_9378', - 'foo_9379', - 'foo_9380', - 'foo_9381', - 'foo_9382', - 'foo_9383', - 'foo_9384', - 'foo_9385', - 'foo_9386', - 'foo_9387', - 'foo_9388', - 'foo_9389', - 'foo_9390', - 'foo_9391', - 'foo_9392', - 'foo_9393', - 'foo_9394', - 'foo_9395', - 'foo_9396', - 'foo_9397', - 'foo_9398', - 'foo_9399', - 'foo_9400', - 'foo_9401', - 'foo_9402', - 'foo_9403', - 'foo_9404', - 'foo_9405', - 'foo_9406', - 'foo_9407', - 'foo_9408', - 'foo_9409', - 'foo_9410', - 'foo_9411', - 'foo_9412', - 'foo_9413', - 'foo_9414', - 'foo_9415', - 'foo_9416', - 'foo_9417', - 'foo_9418', - 'foo_9419', - 'foo_9420', - 'foo_9421', - 'foo_9422', - 'foo_9423', - 'foo_9424', - 'foo_9425', - 'foo_9426', - 'foo_9427', - 'foo_9428', - 'foo_9429', - 'foo_9430', - 'foo_9431', - 'foo_9432', - 'foo_9433', - 'foo_9434', - 'foo_9435', - 'foo_9436', - 'foo_9437', - 'foo_9438', - 'foo_9439', - 'foo_9440', - 'foo_9441', - 'foo_9442', - 'foo_9443', - 'foo_9444', - 'foo_9445', - 'foo_9446', - 'foo_9447', - 'foo_9448', - 'foo_9449', - 'foo_9450', - 'foo_9451', - 'foo_9452', - 'foo_9453', - 'foo_9454', - 'foo_9455', - 'foo_9456', - 'foo_9457', - 'foo_9458', - 'foo_9459', - 'foo_9460', - 'foo_9461', - 'foo_9462', - 'foo_9463', - 'foo_9464', - 'foo_9465', - 'foo_9466', - 'foo_9467', - 'foo_9468', - 'foo_9469', - 'foo_9470', - 'foo_9471', - 'foo_9472', - 'foo_9473', - 'foo_9474', - 'foo_9475', - 'foo_9476', - 'foo_9477', - 'foo_9478', - 'foo_9479', - 'foo_9480', - 'foo_9481', - 'foo_9482', - 'foo_9483', - 'foo_9484', - 'foo_9485', - 'foo_9486', - 'foo_9487', - 'foo_9488', - 'foo_9489', - 'foo_9490', - 'foo_9491', - 'foo_9492', - 'foo_9493', - 'foo_9494', - 'foo_9495', - 'foo_9496', - 'foo_9497', - 'foo_9498', - 'foo_9499', - 'foo_9500', - 'foo_9501', - 'foo_9502', - 'foo_9503', - 'foo_9504', - 'foo_9505', - 'foo_9506', - 'foo_9507', - 'foo_9508', - 'foo_9509', - 'foo_9510', - 'foo_9511', - 'foo_9512', - 'foo_9513', - 'foo_9514', - 'foo_9515', - 'foo_9516', - 'foo_9517', - 'foo_9518', - 'foo_9519', - 'foo_9520', - 'foo_9521', - 'foo_9522', - 'foo_9523', - 'foo_9524', - 'foo_9525', - 'foo_9526', - 'foo_9527', - 'foo_9528', - 'foo_9529', - 'foo_9530', - 'foo_9531', - 'foo_9532', - 'foo_9533', - 'foo_9534', - 'foo_9535', - 'foo_9536', - 'foo_9537', - 'foo_9538', - 'foo_9539', - 'foo_9540', - 'foo_9541', - 'foo_9542', - 'foo_9543', - 'foo_9544', - 'foo_9545', - 'foo_9546', - 'foo_9547', - 'foo_9548', - 'foo_9549', - 'foo_9550', - 'foo_9551', - 'foo_9552', - 'foo_9553', - 'foo_9554', - 'foo_9555', - 'foo_9556', - 'foo_9557', - 'foo_9558', - 'foo_9559', - 'foo_9560', - 'foo_9561', - 'foo_9562', - 'foo_9563', - 'foo_9564', - 'foo_9565', - 'foo_9566', - 'foo_9567', - 'foo_9568', - 'foo_9569', - 'foo_9570', - 'foo_9571', - 'foo_9572', - 'foo_9573', - 'foo_9574', - 'foo_9575', - 'foo_9576', - 'foo_9577', - 'foo_9578', - 'foo_9579', - 'foo_9580', - 'foo_9581', - 'foo_9582', - 'foo_9583', - 'foo_9584', - 'foo_9585', - 'foo_9586', - 'foo_9587', - 'foo_9588', - 'foo_9589', - 'foo_9590', - 'foo_9591', - 'foo_9592', - 'foo_9593', - 'foo_9594', - 'foo_9595', - 'foo_9596', - 'foo_9597', - 'foo_9598', - 'foo_9599', - 'foo_9600', - 'foo_9601', - 'foo_9602', - 'foo_9603', - 'foo_9604', - 'foo_9605', - 'foo_9606', - 'foo_9607', - 'foo_9608', - 'foo_9609', - 'foo_9610', - 'foo_9611', - 'foo_9612', - 'foo_9613', - 'foo_9614', - 'foo_9615', - 'foo_9616', - 'foo_9617', - 'foo_9618', - 'foo_9619', - 'foo_9620', - 'foo_9621', - 'foo_9622', - 'foo_9623', - 'foo_9624', - 'foo_9625', - 'foo_9626', - 'foo_9627', - 'foo_9628', - 'foo_9629', - 'foo_9630', - 'foo_9631', - 'foo_9632', - 'foo_9633', - 'foo_9634', - 'foo_9635', - 'foo_9636', - 'foo_9637', - 'foo_9638', - 'foo_9639', - 'foo_9640', - 'foo_9641', - 'foo_9642', - 'foo_9643', - 'foo_9644', - 'foo_9645', - 'foo_9646', - 'foo_9647', - 'foo_9648', - 'foo_9649', - 'foo_9650', - 'foo_9651', - 'foo_9652', - 'foo_9653', - 'foo_9654', - 'foo_9655', - 'foo_9656', - 'foo_9657', - 'foo_9658', - 'foo_9659', - 'foo_9660', - 'foo_9661', - 'foo_9662', - 'foo_9663', - 'foo_9664', - 'foo_9665', - 'foo_9666', - 'foo_9667', - 'foo_9668', - 'foo_9669', - 'foo_9670', - 'foo_9671', - 'foo_9672', - 'foo_9673', - 'foo_9674', - 'foo_9675', - 'foo_9676', - 'foo_9677', - 'foo_9678', - 'foo_9679', - 'foo_9680', - 'foo_9681', - 'foo_9682', - 'foo_9683', - 'foo_9684', - 'foo_9685', - 'foo_9686', - 'foo_9687', - 'foo_9688', - 'foo_9689', - 'foo_9690', - 'foo_9691', - 'foo_9692', - 'foo_9693', - 'foo_9694', - 'foo_9695', - 'foo_9696', - 'foo_9697', - 'foo_9698', - 'foo_9699', - 'foo_9700', - 'foo_9701', - 'foo_9702', - 'foo_9703', - 'foo_9704', - 'foo_9705', - 'foo_9706', - 'foo_9707', - 'foo_9708', - 'foo_9709', - 'foo_9710', - 'foo_9711', - 'foo_9712', - 'foo_9713', - 'foo_9714', - 'foo_9715', - 'foo_9716', - 'foo_9717', - 'foo_9718', - 'foo_9719', - 'foo_9720', - 'foo_9721', - 'foo_9722', - 'foo_9723', - 'foo_9724', - 'foo_9725', - 'foo_9726', - 'foo_9727', - 'foo_9728', - 'foo_9729', - 'foo_9730', - 'foo_9731', - 'foo_9732', - 'foo_9733', - 'foo_9734', - 'foo_9735', - 'foo_9736', - 'foo_9737', - 'foo_9738', - 'foo_9739', - 'foo_9740', - 'foo_9741', - 'foo_9742', - 'foo_9743', - 'foo_9744', - 'foo_9745', - 'foo_9746', - 'foo_9747', - 'foo_9748', - 'foo_9749', - 'foo_9750', - 'foo_9751', - 'foo_9752', - 'foo_9753', - 'foo_9754', - 'foo_9755', - 'foo_9756', - 'foo_9757', - 'foo_9758', - 'foo_9759', - 'foo_9760', - 'foo_9761', - 'foo_9762', - 'foo_9763', - 'foo_9764', - 'foo_9765', - 'foo_9766', - 'foo_9767', - 'foo_9768', - 'foo_9769', - 'foo_9770', - 'foo_9771', - 'foo_9772', - 'foo_9773', - 'foo_9774', - 'foo_9775', - 'foo_9776', - 'foo_9777', - 'foo_9778', - 'foo_9779', - 'foo_9780', - 'foo_9781', - 'foo_9782', - 'foo_9783', - 'foo_9784', - 'foo_9785', - 'foo_9786', - 'foo_9787', - 'foo_9788', - 'foo_9789', - 'foo_9790', - 'foo_9791', - 'foo_9792', - 'foo_9793', - 'foo_9794', - 'foo_9795', - 'foo_9796', - 'foo_9797', - 'foo_9798', - 'foo_9799', - 'foo_9800', - 'foo_9801', - 'foo_9802', - 'foo_9803', - 'foo_9804', - 'foo_9805', - 'foo_9806', - 'foo_9807', - 'foo_9808', - 'foo_9809', - 'foo_9810', - 'foo_9811', - 'foo_9812', - 'foo_9813', - 'foo_9814', - 'foo_9815', - 'foo_9816', - 'foo_9817', - 'foo_9818', - 'foo_9819', - 'foo_9820', - 'foo_9821', - 'foo_9822', - 'foo_9823', - 'foo_9824', - 'foo_9825', - 'foo_9826', - 'foo_9827', - 'foo_9828', - 'foo_9829', - 'foo_9830', - 'foo_9831', - 'foo_9832', - 'foo_9833', - 'foo_9834', - 'foo_9835', - 'foo_9836', - 'foo_9837', - 'foo_9838', - 'foo_9839', - 'foo_9840', - 'foo_9841', - 'foo_9842', - 'foo_9843', - 'foo_9844', - 'foo_9845', - 'foo_9846', - 'foo_9847', - 'foo_9848', - 'foo_9849', - 'foo_9850', - 'foo_9851', - 'foo_9852', - 'foo_9853', - 'foo_9854', - 'foo_9855', - 'foo_9856', - 'foo_9857', - 'foo_9858', - 'foo_9859', - 'foo_9860', - 'foo_9861', - 'foo_9862', - 'foo_9863', - 'foo_9864', - 'foo_9865', - 'foo_9866', - 'foo_9867', - 'foo_9868', - 'foo_9869', - 'foo_9870', - 'foo_9871', - 'foo_9872', - 'foo_9873', - 'foo_9874', - 'foo_9875', - 'foo_9876', - 'foo_9877', - 'foo_9878', - 'foo_9879', - 'foo_9880', - 'foo_9881', - 'foo_9882', - 'foo_9883', - 'foo_9884', - 'foo_9885', - 'foo_9886', - 'foo_9887', - 'foo_9888', - 'foo_9889', - 'foo_9890', - 'foo_9891', - 'foo_9892', - 'foo_9893', - 'foo_9894', - 'foo_9895', - 'foo_9896', - 'foo_9897', - 'foo_9898', - 'foo_9899', - 'foo_9900', - 'foo_9901', - 'foo_9902', - 'foo_9903', - 'foo_9904', - 'foo_9905', - 'foo_9906', - 'foo_9907', - 'foo_9908', - 'foo_9909', - 'foo_9910', - 'foo_9911', - 'foo_9912', - 'foo_9913', - 'foo_9914', - 'foo_9915', - 'foo_9916', - 'foo_9917', - 'foo_9918', - 'foo_9919', - 'foo_9920', - 'foo_9921', - 'foo_9922', - 'foo_9923', - 'foo_9924', - 'foo_9925', - 'foo_9926', - 'foo_9927', - 'foo_9928', - 'foo_9929', - 'foo_9930', - 'foo_9931', - 'foo_9932', - 'foo_9933', - 'foo_9934', - 'foo_9935', - 'foo_9936', - 'foo_9937', - 'foo_9938', - 'foo_9939', - 'foo_9940', - 'foo_9941', - 'foo_9942', - 'foo_9943', - 'foo_9944', - 'foo_9945', - 'foo_9946', - 'foo_9947', - 'foo_9948', - 'foo_9949', - 'foo_9950', - 'foo_9951', - 'foo_9952', - 'foo_9953', - 'foo_9954', - 'foo_9955', - 'foo_9956', - 'foo_9957', - 'foo_9958', - 'foo_9959', - 'foo_9960', - 'foo_9961', - 'foo_9962', - 'foo_9963', - 'foo_9964', - 'foo_9965', - 'foo_9966', - 'foo_9967', - 'foo_9968', - 'foo_9969', - 'foo_9970', - 'foo_9971', - 'foo_9972', - 'foo_9973', - 'foo_9974', - 'foo_9975', - 'foo_9976', - 'foo_9977', - 'foo_9978', - 'foo_9979', - 'foo_9980', - 'foo_9981', - 'foo_9982', - 'foo_9983', - 'foo_9984', - 'foo_9985', - 'foo_9986', - 'foo_9987', - 'foo_9988', - 'foo_9989', - 'foo_9990', - 'foo_9991', - 'foo_9992', - 'foo_9993', - 'foo_9994', - 'foo_9995', - 'foo_9996', - 'foo_9997', - 'foo_9998', - 'foo_9999', -}; diff --git a/tests/language_2/set_literals/const_big_set_literal_test.dart b/tests/language_2/set_literals/const_big_set_literal_test.dart deleted file mode 100644 index 9a4a9b053a6..00000000000 --- a/tests/language_2/set_literals/const_big_set_literal_test.dart +++ /dev/null @@ -1,20030 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -void main() { - Expect.equals(10000, intSet.length); - Iterator intIterator = intSet.iterator; - for (int i = 0; i < 10000; i++) { - Expect.equals(true, intIterator.moveNext()); - Expect.equals(i, intIterator.current); - } - Expect.equals(false, intIterator.moveNext()); - - Expect.equals(10000, stringSet.length); - Iterator stringIterator = stringSet.iterator; - for (int i = 0; i < 10000; i++) { - Expect.equals(true, stringIterator.moveNext()); - Expect.equals("foo_$i", stringIterator.current); - } - Expect.equals(false, stringIterator.moveNext()); -} - -const Set intSet = { - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58, - 59, - 60, - 61, - 62, - 63, - 64, - 65, - 66, - 67, - 68, - 69, - 70, - 71, - 72, - 73, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 82, - 83, - 84, - 85, - 86, - 87, - 88, - 89, - 90, - 91, - 92, - 93, - 94, - 95, - 96, - 97, - 98, - 99, - 100, - 101, - 102, - 103, - 104, - 105, - 106, - 107, - 108, - 109, - 110, - 111, - 112, - 113, - 114, - 115, - 116, - 117, - 118, - 119, - 120, - 121, - 122, - 123, - 124, - 125, - 126, - 127, - 128, - 129, - 130, - 131, - 132, - 133, - 134, - 135, - 136, - 137, - 138, - 139, - 140, - 141, - 142, - 143, - 144, - 145, - 146, - 147, - 148, - 149, - 150, - 151, - 152, - 153, - 154, - 155, - 156, - 157, - 158, - 159, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 174, - 175, - 176, - 177, - 178, - 179, - 180, - 181, - 182, - 183, - 184, - 185, - 186, - 187, - 188, - 189, - 190, - 191, - 192, - 193, - 194, - 195, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 210, - 211, - 212, - 213, - 214, - 215, - 216, - 217, - 218, - 219, - 220, - 221, - 222, - 223, - 224, - 225, - 226, - 227, - 228, - 229, - 230, - 231, - 232, - 233, - 234, - 235, - 236, - 237, - 238, - 239, - 240, - 241, - 242, - 243, - 244, - 245, - 246, - 247, - 248, - 249, - 250, - 251, - 252, - 253, - 254, - 255, - 256, - 257, - 258, - 259, - 260, - 261, - 262, - 263, - 264, - 265, - 266, - 267, - 268, - 269, - 270, - 271, - 272, - 273, - 274, - 275, - 276, - 277, - 278, - 279, - 280, - 281, - 282, - 283, - 284, - 285, - 286, - 287, - 288, - 289, - 290, - 291, - 292, - 293, - 294, - 295, - 296, - 297, - 298, - 299, - 300, - 301, - 302, - 303, - 304, - 305, - 306, - 307, - 308, - 309, - 310, - 311, - 312, - 313, - 314, - 315, - 316, - 317, - 318, - 319, - 320, - 321, - 322, - 323, - 324, - 325, - 326, - 327, - 328, - 329, - 330, - 331, - 332, - 333, - 334, - 335, - 336, - 337, - 338, - 339, - 340, - 341, - 342, - 343, - 344, - 345, - 346, - 347, - 348, - 349, - 350, - 351, - 352, - 353, - 354, - 355, - 356, - 357, - 358, - 359, - 360, - 361, - 362, - 363, - 364, - 365, - 366, - 367, - 368, - 369, - 370, - 371, - 372, - 373, - 374, - 375, - 376, - 377, - 378, - 379, - 380, - 381, - 382, - 383, - 384, - 385, - 386, - 387, - 388, - 389, - 390, - 391, - 392, - 393, - 394, - 395, - 396, - 397, - 398, - 399, - 400, - 401, - 402, - 403, - 404, - 405, - 406, - 407, - 408, - 409, - 410, - 411, - 412, - 413, - 414, - 415, - 416, - 417, - 418, - 419, - 420, - 421, - 422, - 423, - 424, - 425, - 426, - 427, - 428, - 429, - 430, - 431, - 432, - 433, - 434, - 435, - 436, - 437, - 438, - 439, - 440, - 441, - 442, - 443, - 444, - 445, - 446, - 447, - 448, - 449, - 450, - 451, - 452, - 453, - 454, - 455, - 456, - 457, - 458, - 459, - 460, - 461, - 462, - 463, - 464, - 465, - 466, - 467, - 468, - 469, - 470, - 471, - 472, - 473, - 474, - 475, - 476, - 477, - 478, - 479, - 480, - 481, - 482, - 483, - 484, - 485, - 486, - 487, - 488, - 489, - 490, - 491, - 492, - 493, - 494, - 495, - 496, - 497, - 498, - 499, - 500, - 501, - 502, - 503, - 504, - 505, - 506, - 507, - 508, - 509, - 510, - 511, - 512, - 513, - 514, - 515, - 516, - 517, - 518, - 519, - 520, - 521, - 522, - 523, - 524, - 525, - 526, - 527, - 528, - 529, - 530, - 531, - 532, - 533, - 534, - 535, - 536, - 537, - 538, - 539, - 540, - 541, - 542, - 543, - 544, - 545, - 546, - 547, - 548, - 549, - 550, - 551, - 552, - 553, - 554, - 555, - 556, - 557, - 558, - 559, - 560, - 561, - 562, - 563, - 564, - 565, - 566, - 567, - 568, - 569, - 570, - 571, - 572, - 573, - 574, - 575, - 576, - 577, - 578, - 579, - 580, - 581, - 582, - 583, - 584, - 585, - 586, - 587, - 588, - 589, - 590, - 591, - 592, - 593, - 594, - 595, - 596, - 597, - 598, - 599, - 600, - 601, - 602, - 603, - 604, - 605, - 606, - 607, - 608, - 609, - 610, - 611, - 612, - 613, - 614, - 615, - 616, - 617, - 618, - 619, - 620, - 621, - 622, - 623, - 624, - 625, - 626, - 627, - 628, - 629, - 630, - 631, - 632, - 633, - 634, - 635, - 636, - 637, - 638, - 639, - 640, - 641, - 642, - 643, - 644, - 645, - 646, - 647, - 648, - 649, - 650, - 651, - 652, - 653, - 654, - 655, - 656, - 657, - 658, - 659, - 660, - 661, - 662, - 663, - 664, - 665, - 666, - 667, - 668, - 669, - 670, - 671, - 672, - 673, - 674, - 675, - 676, - 677, - 678, - 679, - 680, - 681, - 682, - 683, - 684, - 685, - 686, - 687, - 688, - 689, - 690, - 691, - 692, - 693, - 694, - 695, - 696, - 697, - 698, - 699, - 700, - 701, - 702, - 703, - 704, - 705, - 706, - 707, - 708, - 709, - 710, - 711, - 712, - 713, - 714, - 715, - 716, - 717, - 718, - 719, - 720, - 721, - 722, - 723, - 724, - 725, - 726, - 727, - 728, - 729, - 730, - 731, - 732, - 733, - 734, - 735, - 736, - 737, - 738, - 739, - 740, - 741, - 742, - 743, - 744, - 745, - 746, - 747, - 748, - 749, - 750, - 751, - 752, - 753, - 754, - 755, - 756, - 757, - 758, - 759, - 760, - 761, - 762, - 763, - 764, - 765, - 766, - 767, - 768, - 769, - 770, - 771, - 772, - 773, - 774, - 775, - 776, - 777, - 778, - 779, - 780, - 781, - 782, - 783, - 784, - 785, - 786, - 787, - 788, - 789, - 790, - 791, - 792, - 793, - 794, - 795, - 796, - 797, - 798, - 799, - 800, - 801, - 802, - 803, - 804, - 805, - 806, - 807, - 808, - 809, - 810, - 811, - 812, - 813, - 814, - 815, - 816, - 817, - 818, - 819, - 820, - 821, - 822, - 823, - 824, - 825, - 826, - 827, - 828, - 829, - 830, - 831, - 832, - 833, - 834, - 835, - 836, - 837, - 838, - 839, - 840, - 841, - 842, - 843, - 844, - 845, - 846, - 847, - 848, - 849, - 850, - 851, - 852, - 853, - 854, - 855, - 856, - 857, - 858, - 859, - 860, - 861, - 862, - 863, - 864, - 865, - 866, - 867, - 868, - 869, - 870, - 871, - 872, - 873, - 874, - 875, - 876, - 877, - 878, - 879, - 880, - 881, - 882, - 883, - 884, - 885, - 886, - 887, - 888, - 889, - 890, - 891, - 892, - 893, - 894, - 895, - 896, - 897, - 898, - 899, - 900, - 901, - 902, - 903, - 904, - 905, - 906, - 907, - 908, - 909, - 910, - 911, - 912, - 913, - 914, - 915, - 916, - 917, - 918, - 919, - 920, - 921, - 922, - 923, - 924, - 925, - 926, - 927, - 928, - 929, - 930, - 931, - 932, - 933, - 934, - 935, - 936, - 937, - 938, - 939, - 940, - 941, - 942, - 943, - 944, - 945, - 946, - 947, - 948, - 949, - 950, - 951, - 952, - 953, - 954, - 955, - 956, - 957, - 958, - 959, - 960, - 961, - 962, - 963, - 964, - 965, - 966, - 967, - 968, - 969, - 970, - 971, - 972, - 973, - 974, - 975, - 976, - 977, - 978, - 979, - 980, - 981, - 982, - 983, - 984, - 985, - 986, - 987, - 988, - 989, - 990, - 991, - 992, - 993, - 994, - 995, - 996, - 997, - 998, - 999, - 1000, - 1001, - 1002, - 1003, - 1004, - 1005, - 1006, - 1007, - 1008, - 1009, - 1010, - 1011, - 1012, - 1013, - 1014, - 1015, - 1016, - 1017, - 1018, - 1019, - 1020, - 1021, - 1022, - 1023, - 1024, - 1025, - 1026, - 1027, - 1028, - 1029, - 1030, - 1031, - 1032, - 1033, - 1034, - 1035, - 1036, - 1037, - 1038, - 1039, - 1040, - 1041, - 1042, - 1043, - 1044, - 1045, - 1046, - 1047, - 1048, - 1049, - 1050, - 1051, - 1052, - 1053, - 1054, - 1055, - 1056, - 1057, - 1058, - 1059, - 1060, - 1061, - 1062, - 1063, - 1064, - 1065, - 1066, - 1067, - 1068, - 1069, - 1070, - 1071, - 1072, - 1073, - 1074, - 1075, - 1076, - 1077, - 1078, - 1079, - 1080, - 1081, - 1082, - 1083, - 1084, - 1085, - 1086, - 1087, - 1088, - 1089, - 1090, - 1091, - 1092, - 1093, - 1094, - 1095, - 1096, - 1097, - 1098, - 1099, - 1100, - 1101, - 1102, - 1103, - 1104, - 1105, - 1106, - 1107, - 1108, - 1109, - 1110, - 1111, - 1112, - 1113, - 1114, - 1115, - 1116, - 1117, - 1118, - 1119, - 1120, - 1121, - 1122, - 1123, - 1124, - 1125, - 1126, - 1127, - 1128, - 1129, - 1130, - 1131, - 1132, - 1133, - 1134, - 1135, - 1136, - 1137, - 1138, - 1139, - 1140, - 1141, - 1142, - 1143, - 1144, - 1145, - 1146, - 1147, - 1148, - 1149, - 1150, - 1151, - 1152, - 1153, - 1154, - 1155, - 1156, - 1157, - 1158, - 1159, - 1160, - 1161, - 1162, - 1163, - 1164, - 1165, - 1166, - 1167, - 1168, - 1169, - 1170, - 1171, - 1172, - 1173, - 1174, - 1175, - 1176, - 1177, - 1178, - 1179, - 1180, - 1181, - 1182, - 1183, - 1184, - 1185, - 1186, - 1187, - 1188, - 1189, - 1190, - 1191, - 1192, - 1193, - 1194, - 1195, - 1196, - 1197, - 1198, - 1199, - 1200, - 1201, - 1202, - 1203, - 1204, - 1205, - 1206, - 1207, - 1208, - 1209, - 1210, - 1211, - 1212, - 1213, - 1214, - 1215, - 1216, - 1217, - 1218, - 1219, - 1220, - 1221, - 1222, - 1223, - 1224, - 1225, - 1226, - 1227, - 1228, - 1229, - 1230, - 1231, - 1232, - 1233, - 1234, - 1235, - 1236, - 1237, - 1238, - 1239, - 1240, - 1241, - 1242, - 1243, - 1244, - 1245, - 1246, - 1247, - 1248, - 1249, - 1250, - 1251, - 1252, - 1253, - 1254, - 1255, - 1256, - 1257, - 1258, - 1259, - 1260, - 1261, - 1262, - 1263, - 1264, - 1265, - 1266, - 1267, - 1268, - 1269, - 1270, - 1271, - 1272, - 1273, - 1274, - 1275, - 1276, - 1277, - 1278, - 1279, - 1280, - 1281, - 1282, - 1283, - 1284, - 1285, - 1286, - 1287, - 1288, - 1289, - 1290, - 1291, - 1292, - 1293, - 1294, - 1295, - 1296, - 1297, - 1298, - 1299, - 1300, - 1301, - 1302, - 1303, - 1304, - 1305, - 1306, - 1307, - 1308, - 1309, - 1310, - 1311, - 1312, - 1313, - 1314, - 1315, - 1316, - 1317, - 1318, - 1319, - 1320, - 1321, - 1322, - 1323, - 1324, - 1325, - 1326, - 1327, - 1328, - 1329, - 1330, - 1331, - 1332, - 1333, - 1334, - 1335, - 1336, - 1337, - 1338, - 1339, - 1340, - 1341, - 1342, - 1343, - 1344, - 1345, - 1346, - 1347, - 1348, - 1349, - 1350, - 1351, - 1352, - 1353, - 1354, - 1355, - 1356, - 1357, - 1358, - 1359, - 1360, - 1361, - 1362, - 1363, - 1364, - 1365, - 1366, - 1367, - 1368, - 1369, - 1370, - 1371, - 1372, - 1373, - 1374, - 1375, - 1376, - 1377, - 1378, - 1379, - 1380, - 1381, - 1382, - 1383, - 1384, - 1385, - 1386, - 1387, - 1388, - 1389, - 1390, - 1391, - 1392, - 1393, - 1394, - 1395, - 1396, - 1397, - 1398, - 1399, - 1400, - 1401, - 1402, - 1403, - 1404, - 1405, - 1406, - 1407, - 1408, - 1409, - 1410, - 1411, - 1412, - 1413, - 1414, - 1415, - 1416, - 1417, - 1418, - 1419, - 1420, - 1421, - 1422, - 1423, - 1424, - 1425, - 1426, - 1427, - 1428, - 1429, - 1430, - 1431, - 1432, - 1433, - 1434, - 1435, - 1436, - 1437, - 1438, - 1439, - 1440, - 1441, - 1442, - 1443, - 1444, - 1445, - 1446, - 1447, - 1448, - 1449, - 1450, - 1451, - 1452, - 1453, - 1454, - 1455, - 1456, - 1457, - 1458, - 1459, - 1460, - 1461, - 1462, - 1463, - 1464, - 1465, - 1466, - 1467, - 1468, - 1469, - 1470, - 1471, - 1472, - 1473, - 1474, - 1475, - 1476, - 1477, - 1478, - 1479, - 1480, - 1481, - 1482, - 1483, - 1484, - 1485, - 1486, - 1487, - 1488, - 1489, - 1490, - 1491, - 1492, - 1493, - 1494, - 1495, - 1496, - 1497, - 1498, - 1499, - 1500, - 1501, - 1502, - 1503, - 1504, - 1505, - 1506, - 1507, - 1508, - 1509, - 1510, - 1511, - 1512, - 1513, - 1514, - 1515, - 1516, - 1517, - 1518, - 1519, - 1520, - 1521, - 1522, - 1523, - 1524, - 1525, - 1526, - 1527, - 1528, - 1529, - 1530, - 1531, - 1532, - 1533, - 1534, - 1535, - 1536, - 1537, - 1538, - 1539, - 1540, - 1541, - 1542, - 1543, - 1544, - 1545, - 1546, - 1547, - 1548, - 1549, - 1550, - 1551, - 1552, - 1553, - 1554, - 1555, - 1556, - 1557, - 1558, - 1559, - 1560, - 1561, - 1562, - 1563, - 1564, - 1565, - 1566, - 1567, - 1568, - 1569, - 1570, - 1571, - 1572, - 1573, - 1574, - 1575, - 1576, - 1577, - 1578, - 1579, - 1580, - 1581, - 1582, - 1583, - 1584, - 1585, - 1586, - 1587, - 1588, - 1589, - 1590, - 1591, - 1592, - 1593, - 1594, - 1595, - 1596, - 1597, - 1598, - 1599, - 1600, - 1601, - 1602, - 1603, - 1604, - 1605, - 1606, - 1607, - 1608, - 1609, - 1610, - 1611, - 1612, - 1613, - 1614, - 1615, - 1616, - 1617, - 1618, - 1619, - 1620, - 1621, - 1622, - 1623, - 1624, - 1625, - 1626, - 1627, - 1628, - 1629, - 1630, - 1631, - 1632, - 1633, - 1634, - 1635, - 1636, - 1637, - 1638, - 1639, - 1640, - 1641, - 1642, - 1643, - 1644, - 1645, - 1646, - 1647, - 1648, - 1649, - 1650, - 1651, - 1652, - 1653, - 1654, - 1655, - 1656, - 1657, - 1658, - 1659, - 1660, - 1661, - 1662, - 1663, - 1664, - 1665, - 1666, - 1667, - 1668, - 1669, - 1670, - 1671, - 1672, - 1673, - 1674, - 1675, - 1676, - 1677, - 1678, - 1679, - 1680, - 1681, - 1682, - 1683, - 1684, - 1685, - 1686, - 1687, - 1688, - 1689, - 1690, - 1691, - 1692, - 1693, - 1694, - 1695, - 1696, - 1697, - 1698, - 1699, - 1700, - 1701, - 1702, - 1703, - 1704, - 1705, - 1706, - 1707, - 1708, - 1709, - 1710, - 1711, - 1712, - 1713, - 1714, - 1715, - 1716, - 1717, - 1718, - 1719, - 1720, - 1721, - 1722, - 1723, - 1724, - 1725, - 1726, - 1727, - 1728, - 1729, - 1730, - 1731, - 1732, - 1733, - 1734, - 1735, - 1736, - 1737, - 1738, - 1739, - 1740, - 1741, - 1742, - 1743, - 1744, - 1745, - 1746, - 1747, - 1748, - 1749, - 1750, - 1751, - 1752, - 1753, - 1754, - 1755, - 1756, - 1757, - 1758, - 1759, - 1760, - 1761, - 1762, - 1763, - 1764, - 1765, - 1766, - 1767, - 1768, - 1769, - 1770, - 1771, - 1772, - 1773, - 1774, - 1775, - 1776, - 1777, - 1778, - 1779, - 1780, - 1781, - 1782, - 1783, - 1784, - 1785, - 1786, - 1787, - 1788, - 1789, - 1790, - 1791, - 1792, - 1793, - 1794, - 1795, - 1796, - 1797, - 1798, - 1799, - 1800, - 1801, - 1802, - 1803, - 1804, - 1805, - 1806, - 1807, - 1808, - 1809, - 1810, - 1811, - 1812, - 1813, - 1814, - 1815, - 1816, - 1817, - 1818, - 1819, - 1820, - 1821, - 1822, - 1823, - 1824, - 1825, - 1826, - 1827, - 1828, - 1829, - 1830, - 1831, - 1832, - 1833, - 1834, - 1835, - 1836, - 1837, - 1838, - 1839, - 1840, - 1841, - 1842, - 1843, - 1844, - 1845, - 1846, - 1847, - 1848, - 1849, - 1850, - 1851, - 1852, - 1853, - 1854, - 1855, - 1856, - 1857, - 1858, - 1859, - 1860, - 1861, - 1862, - 1863, - 1864, - 1865, - 1866, - 1867, - 1868, - 1869, - 1870, - 1871, - 1872, - 1873, - 1874, - 1875, - 1876, - 1877, - 1878, - 1879, - 1880, - 1881, - 1882, - 1883, - 1884, - 1885, - 1886, - 1887, - 1888, - 1889, - 1890, - 1891, - 1892, - 1893, - 1894, - 1895, - 1896, - 1897, - 1898, - 1899, - 1900, - 1901, - 1902, - 1903, - 1904, - 1905, - 1906, - 1907, - 1908, - 1909, - 1910, - 1911, - 1912, - 1913, - 1914, - 1915, - 1916, - 1917, - 1918, - 1919, - 1920, - 1921, - 1922, - 1923, - 1924, - 1925, - 1926, - 1927, - 1928, - 1929, - 1930, - 1931, - 1932, - 1933, - 1934, - 1935, - 1936, - 1937, - 1938, - 1939, - 1940, - 1941, - 1942, - 1943, - 1944, - 1945, - 1946, - 1947, - 1948, - 1949, - 1950, - 1951, - 1952, - 1953, - 1954, - 1955, - 1956, - 1957, - 1958, - 1959, - 1960, - 1961, - 1962, - 1963, - 1964, - 1965, - 1966, - 1967, - 1968, - 1969, - 1970, - 1971, - 1972, - 1973, - 1974, - 1975, - 1976, - 1977, - 1978, - 1979, - 1980, - 1981, - 1982, - 1983, - 1984, - 1985, - 1986, - 1987, - 1988, - 1989, - 1990, - 1991, - 1992, - 1993, - 1994, - 1995, - 1996, - 1997, - 1998, - 1999, - 2000, - 2001, - 2002, - 2003, - 2004, - 2005, - 2006, - 2007, - 2008, - 2009, - 2010, - 2011, - 2012, - 2013, - 2014, - 2015, - 2016, - 2017, - 2018, - 2019, - 2020, - 2021, - 2022, - 2023, - 2024, - 2025, - 2026, - 2027, - 2028, - 2029, - 2030, - 2031, - 2032, - 2033, - 2034, - 2035, - 2036, - 2037, - 2038, - 2039, - 2040, - 2041, - 2042, - 2043, - 2044, - 2045, - 2046, - 2047, - 2048, - 2049, - 2050, - 2051, - 2052, - 2053, - 2054, - 2055, - 2056, - 2057, - 2058, - 2059, - 2060, - 2061, - 2062, - 2063, - 2064, - 2065, - 2066, - 2067, - 2068, - 2069, - 2070, - 2071, - 2072, - 2073, - 2074, - 2075, - 2076, - 2077, - 2078, - 2079, - 2080, - 2081, - 2082, - 2083, - 2084, - 2085, - 2086, - 2087, - 2088, - 2089, - 2090, - 2091, - 2092, - 2093, - 2094, - 2095, - 2096, - 2097, - 2098, - 2099, - 2100, - 2101, - 2102, - 2103, - 2104, - 2105, - 2106, - 2107, - 2108, - 2109, - 2110, - 2111, - 2112, - 2113, - 2114, - 2115, - 2116, - 2117, - 2118, - 2119, - 2120, - 2121, - 2122, - 2123, - 2124, - 2125, - 2126, - 2127, - 2128, - 2129, - 2130, - 2131, - 2132, - 2133, - 2134, - 2135, - 2136, - 2137, - 2138, - 2139, - 2140, - 2141, - 2142, - 2143, - 2144, - 2145, - 2146, - 2147, - 2148, - 2149, - 2150, - 2151, - 2152, - 2153, - 2154, - 2155, - 2156, - 2157, - 2158, - 2159, - 2160, - 2161, - 2162, - 2163, - 2164, - 2165, - 2166, - 2167, - 2168, - 2169, - 2170, - 2171, - 2172, - 2173, - 2174, - 2175, - 2176, - 2177, - 2178, - 2179, - 2180, - 2181, - 2182, - 2183, - 2184, - 2185, - 2186, - 2187, - 2188, - 2189, - 2190, - 2191, - 2192, - 2193, - 2194, - 2195, - 2196, - 2197, - 2198, - 2199, - 2200, - 2201, - 2202, - 2203, - 2204, - 2205, - 2206, - 2207, - 2208, - 2209, - 2210, - 2211, - 2212, - 2213, - 2214, - 2215, - 2216, - 2217, - 2218, - 2219, - 2220, - 2221, - 2222, - 2223, - 2224, - 2225, - 2226, - 2227, - 2228, - 2229, - 2230, - 2231, - 2232, - 2233, - 2234, - 2235, - 2236, - 2237, - 2238, - 2239, - 2240, - 2241, - 2242, - 2243, - 2244, - 2245, - 2246, - 2247, - 2248, - 2249, - 2250, - 2251, - 2252, - 2253, - 2254, - 2255, - 2256, - 2257, - 2258, - 2259, - 2260, - 2261, - 2262, - 2263, - 2264, - 2265, - 2266, - 2267, - 2268, - 2269, - 2270, - 2271, - 2272, - 2273, - 2274, - 2275, - 2276, - 2277, - 2278, - 2279, - 2280, - 2281, - 2282, - 2283, - 2284, - 2285, - 2286, - 2287, - 2288, - 2289, - 2290, - 2291, - 2292, - 2293, - 2294, - 2295, - 2296, - 2297, - 2298, - 2299, - 2300, - 2301, - 2302, - 2303, - 2304, - 2305, - 2306, - 2307, - 2308, - 2309, - 2310, - 2311, - 2312, - 2313, - 2314, - 2315, - 2316, - 2317, - 2318, - 2319, - 2320, - 2321, - 2322, - 2323, - 2324, - 2325, - 2326, - 2327, - 2328, - 2329, - 2330, - 2331, - 2332, - 2333, - 2334, - 2335, - 2336, - 2337, - 2338, - 2339, - 2340, - 2341, - 2342, - 2343, - 2344, - 2345, - 2346, - 2347, - 2348, - 2349, - 2350, - 2351, - 2352, - 2353, - 2354, - 2355, - 2356, - 2357, - 2358, - 2359, - 2360, - 2361, - 2362, - 2363, - 2364, - 2365, - 2366, - 2367, - 2368, - 2369, - 2370, - 2371, - 2372, - 2373, - 2374, - 2375, - 2376, - 2377, - 2378, - 2379, - 2380, - 2381, - 2382, - 2383, - 2384, - 2385, - 2386, - 2387, - 2388, - 2389, - 2390, - 2391, - 2392, - 2393, - 2394, - 2395, - 2396, - 2397, - 2398, - 2399, - 2400, - 2401, - 2402, - 2403, - 2404, - 2405, - 2406, - 2407, - 2408, - 2409, - 2410, - 2411, - 2412, - 2413, - 2414, - 2415, - 2416, - 2417, - 2418, - 2419, - 2420, - 2421, - 2422, - 2423, - 2424, - 2425, - 2426, - 2427, - 2428, - 2429, - 2430, - 2431, - 2432, - 2433, - 2434, - 2435, - 2436, - 2437, - 2438, - 2439, - 2440, - 2441, - 2442, - 2443, - 2444, - 2445, - 2446, - 2447, - 2448, - 2449, - 2450, - 2451, - 2452, - 2453, - 2454, - 2455, - 2456, - 2457, - 2458, - 2459, - 2460, - 2461, - 2462, - 2463, - 2464, - 2465, - 2466, - 2467, - 2468, - 2469, - 2470, - 2471, - 2472, - 2473, - 2474, - 2475, - 2476, - 2477, - 2478, - 2479, - 2480, - 2481, - 2482, - 2483, - 2484, - 2485, - 2486, - 2487, - 2488, - 2489, - 2490, - 2491, - 2492, - 2493, - 2494, - 2495, - 2496, - 2497, - 2498, - 2499, - 2500, - 2501, - 2502, - 2503, - 2504, - 2505, - 2506, - 2507, - 2508, - 2509, - 2510, - 2511, - 2512, - 2513, - 2514, - 2515, - 2516, - 2517, - 2518, - 2519, - 2520, - 2521, - 2522, - 2523, - 2524, - 2525, - 2526, - 2527, - 2528, - 2529, - 2530, - 2531, - 2532, - 2533, - 2534, - 2535, - 2536, - 2537, - 2538, - 2539, - 2540, - 2541, - 2542, - 2543, - 2544, - 2545, - 2546, - 2547, - 2548, - 2549, - 2550, - 2551, - 2552, - 2553, - 2554, - 2555, - 2556, - 2557, - 2558, - 2559, - 2560, - 2561, - 2562, - 2563, - 2564, - 2565, - 2566, - 2567, - 2568, - 2569, - 2570, - 2571, - 2572, - 2573, - 2574, - 2575, - 2576, - 2577, - 2578, - 2579, - 2580, - 2581, - 2582, - 2583, - 2584, - 2585, - 2586, - 2587, - 2588, - 2589, - 2590, - 2591, - 2592, - 2593, - 2594, - 2595, - 2596, - 2597, - 2598, - 2599, - 2600, - 2601, - 2602, - 2603, - 2604, - 2605, - 2606, - 2607, - 2608, - 2609, - 2610, - 2611, - 2612, - 2613, - 2614, - 2615, - 2616, - 2617, - 2618, - 2619, - 2620, - 2621, - 2622, - 2623, - 2624, - 2625, - 2626, - 2627, - 2628, - 2629, - 2630, - 2631, - 2632, - 2633, - 2634, - 2635, - 2636, - 2637, - 2638, - 2639, - 2640, - 2641, - 2642, - 2643, - 2644, - 2645, - 2646, - 2647, - 2648, - 2649, - 2650, - 2651, - 2652, - 2653, - 2654, - 2655, - 2656, - 2657, - 2658, - 2659, - 2660, - 2661, - 2662, - 2663, - 2664, - 2665, - 2666, - 2667, - 2668, - 2669, - 2670, - 2671, - 2672, - 2673, - 2674, - 2675, - 2676, - 2677, - 2678, - 2679, - 2680, - 2681, - 2682, - 2683, - 2684, - 2685, - 2686, - 2687, - 2688, - 2689, - 2690, - 2691, - 2692, - 2693, - 2694, - 2695, - 2696, - 2697, - 2698, - 2699, - 2700, - 2701, - 2702, - 2703, - 2704, - 2705, - 2706, - 2707, - 2708, - 2709, - 2710, - 2711, - 2712, - 2713, - 2714, - 2715, - 2716, - 2717, - 2718, - 2719, - 2720, - 2721, - 2722, - 2723, - 2724, - 2725, - 2726, - 2727, - 2728, - 2729, - 2730, - 2731, - 2732, - 2733, - 2734, - 2735, - 2736, - 2737, - 2738, - 2739, - 2740, - 2741, - 2742, - 2743, - 2744, - 2745, - 2746, - 2747, - 2748, - 2749, - 2750, - 2751, - 2752, - 2753, - 2754, - 2755, - 2756, - 2757, - 2758, - 2759, - 2760, - 2761, - 2762, - 2763, - 2764, - 2765, - 2766, - 2767, - 2768, - 2769, - 2770, - 2771, - 2772, - 2773, - 2774, - 2775, - 2776, - 2777, - 2778, - 2779, - 2780, - 2781, - 2782, - 2783, - 2784, - 2785, - 2786, - 2787, - 2788, - 2789, - 2790, - 2791, - 2792, - 2793, - 2794, - 2795, - 2796, - 2797, - 2798, - 2799, - 2800, - 2801, - 2802, - 2803, - 2804, - 2805, - 2806, - 2807, - 2808, - 2809, - 2810, - 2811, - 2812, - 2813, - 2814, - 2815, - 2816, - 2817, - 2818, - 2819, - 2820, - 2821, - 2822, - 2823, - 2824, - 2825, - 2826, - 2827, - 2828, - 2829, - 2830, - 2831, - 2832, - 2833, - 2834, - 2835, - 2836, - 2837, - 2838, - 2839, - 2840, - 2841, - 2842, - 2843, - 2844, - 2845, - 2846, - 2847, - 2848, - 2849, - 2850, - 2851, - 2852, - 2853, - 2854, - 2855, - 2856, - 2857, - 2858, - 2859, - 2860, - 2861, - 2862, - 2863, - 2864, - 2865, - 2866, - 2867, - 2868, - 2869, - 2870, - 2871, - 2872, - 2873, - 2874, - 2875, - 2876, - 2877, - 2878, - 2879, - 2880, - 2881, - 2882, - 2883, - 2884, - 2885, - 2886, - 2887, - 2888, - 2889, - 2890, - 2891, - 2892, - 2893, - 2894, - 2895, - 2896, - 2897, - 2898, - 2899, - 2900, - 2901, - 2902, - 2903, - 2904, - 2905, - 2906, - 2907, - 2908, - 2909, - 2910, - 2911, - 2912, - 2913, - 2914, - 2915, - 2916, - 2917, - 2918, - 2919, - 2920, - 2921, - 2922, - 2923, - 2924, - 2925, - 2926, - 2927, - 2928, - 2929, - 2930, - 2931, - 2932, - 2933, - 2934, - 2935, - 2936, - 2937, - 2938, - 2939, - 2940, - 2941, - 2942, - 2943, - 2944, - 2945, - 2946, - 2947, - 2948, - 2949, - 2950, - 2951, - 2952, - 2953, - 2954, - 2955, - 2956, - 2957, - 2958, - 2959, - 2960, - 2961, - 2962, - 2963, - 2964, - 2965, - 2966, - 2967, - 2968, - 2969, - 2970, - 2971, - 2972, - 2973, - 2974, - 2975, - 2976, - 2977, - 2978, - 2979, - 2980, - 2981, - 2982, - 2983, - 2984, - 2985, - 2986, - 2987, - 2988, - 2989, - 2990, - 2991, - 2992, - 2993, - 2994, - 2995, - 2996, - 2997, - 2998, - 2999, - 3000, - 3001, - 3002, - 3003, - 3004, - 3005, - 3006, - 3007, - 3008, - 3009, - 3010, - 3011, - 3012, - 3013, - 3014, - 3015, - 3016, - 3017, - 3018, - 3019, - 3020, - 3021, - 3022, - 3023, - 3024, - 3025, - 3026, - 3027, - 3028, - 3029, - 3030, - 3031, - 3032, - 3033, - 3034, - 3035, - 3036, - 3037, - 3038, - 3039, - 3040, - 3041, - 3042, - 3043, - 3044, - 3045, - 3046, - 3047, - 3048, - 3049, - 3050, - 3051, - 3052, - 3053, - 3054, - 3055, - 3056, - 3057, - 3058, - 3059, - 3060, - 3061, - 3062, - 3063, - 3064, - 3065, - 3066, - 3067, - 3068, - 3069, - 3070, - 3071, - 3072, - 3073, - 3074, - 3075, - 3076, - 3077, - 3078, - 3079, - 3080, - 3081, - 3082, - 3083, - 3084, - 3085, - 3086, - 3087, - 3088, - 3089, - 3090, - 3091, - 3092, - 3093, - 3094, - 3095, - 3096, - 3097, - 3098, - 3099, - 3100, - 3101, - 3102, - 3103, - 3104, - 3105, - 3106, - 3107, - 3108, - 3109, - 3110, - 3111, - 3112, - 3113, - 3114, - 3115, - 3116, - 3117, - 3118, - 3119, - 3120, - 3121, - 3122, - 3123, - 3124, - 3125, - 3126, - 3127, - 3128, - 3129, - 3130, - 3131, - 3132, - 3133, - 3134, - 3135, - 3136, - 3137, - 3138, - 3139, - 3140, - 3141, - 3142, - 3143, - 3144, - 3145, - 3146, - 3147, - 3148, - 3149, - 3150, - 3151, - 3152, - 3153, - 3154, - 3155, - 3156, - 3157, - 3158, - 3159, - 3160, - 3161, - 3162, - 3163, - 3164, - 3165, - 3166, - 3167, - 3168, - 3169, - 3170, - 3171, - 3172, - 3173, - 3174, - 3175, - 3176, - 3177, - 3178, - 3179, - 3180, - 3181, - 3182, - 3183, - 3184, - 3185, - 3186, - 3187, - 3188, - 3189, - 3190, - 3191, - 3192, - 3193, - 3194, - 3195, - 3196, - 3197, - 3198, - 3199, - 3200, - 3201, - 3202, - 3203, - 3204, - 3205, - 3206, - 3207, - 3208, - 3209, - 3210, - 3211, - 3212, - 3213, - 3214, - 3215, - 3216, - 3217, - 3218, - 3219, - 3220, - 3221, - 3222, - 3223, - 3224, - 3225, - 3226, - 3227, - 3228, - 3229, - 3230, - 3231, - 3232, - 3233, - 3234, - 3235, - 3236, - 3237, - 3238, - 3239, - 3240, - 3241, - 3242, - 3243, - 3244, - 3245, - 3246, - 3247, - 3248, - 3249, - 3250, - 3251, - 3252, - 3253, - 3254, - 3255, - 3256, - 3257, - 3258, - 3259, - 3260, - 3261, - 3262, - 3263, - 3264, - 3265, - 3266, - 3267, - 3268, - 3269, - 3270, - 3271, - 3272, - 3273, - 3274, - 3275, - 3276, - 3277, - 3278, - 3279, - 3280, - 3281, - 3282, - 3283, - 3284, - 3285, - 3286, - 3287, - 3288, - 3289, - 3290, - 3291, - 3292, - 3293, - 3294, - 3295, - 3296, - 3297, - 3298, - 3299, - 3300, - 3301, - 3302, - 3303, - 3304, - 3305, - 3306, - 3307, - 3308, - 3309, - 3310, - 3311, - 3312, - 3313, - 3314, - 3315, - 3316, - 3317, - 3318, - 3319, - 3320, - 3321, - 3322, - 3323, - 3324, - 3325, - 3326, - 3327, - 3328, - 3329, - 3330, - 3331, - 3332, - 3333, - 3334, - 3335, - 3336, - 3337, - 3338, - 3339, - 3340, - 3341, - 3342, - 3343, - 3344, - 3345, - 3346, - 3347, - 3348, - 3349, - 3350, - 3351, - 3352, - 3353, - 3354, - 3355, - 3356, - 3357, - 3358, - 3359, - 3360, - 3361, - 3362, - 3363, - 3364, - 3365, - 3366, - 3367, - 3368, - 3369, - 3370, - 3371, - 3372, - 3373, - 3374, - 3375, - 3376, - 3377, - 3378, - 3379, - 3380, - 3381, - 3382, - 3383, - 3384, - 3385, - 3386, - 3387, - 3388, - 3389, - 3390, - 3391, - 3392, - 3393, - 3394, - 3395, - 3396, - 3397, - 3398, - 3399, - 3400, - 3401, - 3402, - 3403, - 3404, - 3405, - 3406, - 3407, - 3408, - 3409, - 3410, - 3411, - 3412, - 3413, - 3414, - 3415, - 3416, - 3417, - 3418, - 3419, - 3420, - 3421, - 3422, - 3423, - 3424, - 3425, - 3426, - 3427, - 3428, - 3429, - 3430, - 3431, - 3432, - 3433, - 3434, - 3435, - 3436, - 3437, - 3438, - 3439, - 3440, - 3441, - 3442, - 3443, - 3444, - 3445, - 3446, - 3447, - 3448, - 3449, - 3450, - 3451, - 3452, - 3453, - 3454, - 3455, - 3456, - 3457, - 3458, - 3459, - 3460, - 3461, - 3462, - 3463, - 3464, - 3465, - 3466, - 3467, - 3468, - 3469, - 3470, - 3471, - 3472, - 3473, - 3474, - 3475, - 3476, - 3477, - 3478, - 3479, - 3480, - 3481, - 3482, - 3483, - 3484, - 3485, - 3486, - 3487, - 3488, - 3489, - 3490, - 3491, - 3492, - 3493, - 3494, - 3495, - 3496, - 3497, - 3498, - 3499, - 3500, - 3501, - 3502, - 3503, - 3504, - 3505, - 3506, - 3507, - 3508, - 3509, - 3510, - 3511, - 3512, - 3513, - 3514, - 3515, - 3516, - 3517, - 3518, - 3519, - 3520, - 3521, - 3522, - 3523, - 3524, - 3525, - 3526, - 3527, - 3528, - 3529, - 3530, - 3531, - 3532, - 3533, - 3534, - 3535, - 3536, - 3537, - 3538, - 3539, - 3540, - 3541, - 3542, - 3543, - 3544, - 3545, - 3546, - 3547, - 3548, - 3549, - 3550, - 3551, - 3552, - 3553, - 3554, - 3555, - 3556, - 3557, - 3558, - 3559, - 3560, - 3561, - 3562, - 3563, - 3564, - 3565, - 3566, - 3567, - 3568, - 3569, - 3570, - 3571, - 3572, - 3573, - 3574, - 3575, - 3576, - 3577, - 3578, - 3579, - 3580, - 3581, - 3582, - 3583, - 3584, - 3585, - 3586, - 3587, - 3588, - 3589, - 3590, - 3591, - 3592, - 3593, - 3594, - 3595, - 3596, - 3597, - 3598, - 3599, - 3600, - 3601, - 3602, - 3603, - 3604, - 3605, - 3606, - 3607, - 3608, - 3609, - 3610, - 3611, - 3612, - 3613, - 3614, - 3615, - 3616, - 3617, - 3618, - 3619, - 3620, - 3621, - 3622, - 3623, - 3624, - 3625, - 3626, - 3627, - 3628, - 3629, - 3630, - 3631, - 3632, - 3633, - 3634, - 3635, - 3636, - 3637, - 3638, - 3639, - 3640, - 3641, - 3642, - 3643, - 3644, - 3645, - 3646, - 3647, - 3648, - 3649, - 3650, - 3651, - 3652, - 3653, - 3654, - 3655, - 3656, - 3657, - 3658, - 3659, - 3660, - 3661, - 3662, - 3663, - 3664, - 3665, - 3666, - 3667, - 3668, - 3669, - 3670, - 3671, - 3672, - 3673, - 3674, - 3675, - 3676, - 3677, - 3678, - 3679, - 3680, - 3681, - 3682, - 3683, - 3684, - 3685, - 3686, - 3687, - 3688, - 3689, - 3690, - 3691, - 3692, - 3693, - 3694, - 3695, - 3696, - 3697, - 3698, - 3699, - 3700, - 3701, - 3702, - 3703, - 3704, - 3705, - 3706, - 3707, - 3708, - 3709, - 3710, - 3711, - 3712, - 3713, - 3714, - 3715, - 3716, - 3717, - 3718, - 3719, - 3720, - 3721, - 3722, - 3723, - 3724, - 3725, - 3726, - 3727, - 3728, - 3729, - 3730, - 3731, - 3732, - 3733, - 3734, - 3735, - 3736, - 3737, - 3738, - 3739, - 3740, - 3741, - 3742, - 3743, - 3744, - 3745, - 3746, - 3747, - 3748, - 3749, - 3750, - 3751, - 3752, - 3753, - 3754, - 3755, - 3756, - 3757, - 3758, - 3759, - 3760, - 3761, - 3762, - 3763, - 3764, - 3765, - 3766, - 3767, - 3768, - 3769, - 3770, - 3771, - 3772, - 3773, - 3774, - 3775, - 3776, - 3777, - 3778, - 3779, - 3780, - 3781, - 3782, - 3783, - 3784, - 3785, - 3786, - 3787, - 3788, - 3789, - 3790, - 3791, - 3792, - 3793, - 3794, - 3795, - 3796, - 3797, - 3798, - 3799, - 3800, - 3801, - 3802, - 3803, - 3804, - 3805, - 3806, - 3807, - 3808, - 3809, - 3810, - 3811, - 3812, - 3813, - 3814, - 3815, - 3816, - 3817, - 3818, - 3819, - 3820, - 3821, - 3822, - 3823, - 3824, - 3825, - 3826, - 3827, - 3828, - 3829, - 3830, - 3831, - 3832, - 3833, - 3834, - 3835, - 3836, - 3837, - 3838, - 3839, - 3840, - 3841, - 3842, - 3843, - 3844, - 3845, - 3846, - 3847, - 3848, - 3849, - 3850, - 3851, - 3852, - 3853, - 3854, - 3855, - 3856, - 3857, - 3858, - 3859, - 3860, - 3861, - 3862, - 3863, - 3864, - 3865, - 3866, - 3867, - 3868, - 3869, - 3870, - 3871, - 3872, - 3873, - 3874, - 3875, - 3876, - 3877, - 3878, - 3879, - 3880, - 3881, - 3882, - 3883, - 3884, - 3885, - 3886, - 3887, - 3888, - 3889, - 3890, - 3891, - 3892, - 3893, - 3894, - 3895, - 3896, - 3897, - 3898, - 3899, - 3900, - 3901, - 3902, - 3903, - 3904, - 3905, - 3906, - 3907, - 3908, - 3909, - 3910, - 3911, - 3912, - 3913, - 3914, - 3915, - 3916, - 3917, - 3918, - 3919, - 3920, - 3921, - 3922, - 3923, - 3924, - 3925, - 3926, - 3927, - 3928, - 3929, - 3930, - 3931, - 3932, - 3933, - 3934, - 3935, - 3936, - 3937, - 3938, - 3939, - 3940, - 3941, - 3942, - 3943, - 3944, - 3945, - 3946, - 3947, - 3948, - 3949, - 3950, - 3951, - 3952, - 3953, - 3954, - 3955, - 3956, - 3957, - 3958, - 3959, - 3960, - 3961, - 3962, - 3963, - 3964, - 3965, - 3966, - 3967, - 3968, - 3969, - 3970, - 3971, - 3972, - 3973, - 3974, - 3975, - 3976, - 3977, - 3978, - 3979, - 3980, - 3981, - 3982, - 3983, - 3984, - 3985, - 3986, - 3987, - 3988, - 3989, - 3990, - 3991, - 3992, - 3993, - 3994, - 3995, - 3996, - 3997, - 3998, - 3999, - 4000, - 4001, - 4002, - 4003, - 4004, - 4005, - 4006, - 4007, - 4008, - 4009, - 4010, - 4011, - 4012, - 4013, - 4014, - 4015, - 4016, - 4017, - 4018, - 4019, - 4020, - 4021, - 4022, - 4023, - 4024, - 4025, - 4026, - 4027, - 4028, - 4029, - 4030, - 4031, - 4032, - 4033, - 4034, - 4035, - 4036, - 4037, - 4038, - 4039, - 4040, - 4041, - 4042, - 4043, - 4044, - 4045, - 4046, - 4047, - 4048, - 4049, - 4050, - 4051, - 4052, - 4053, - 4054, - 4055, - 4056, - 4057, - 4058, - 4059, - 4060, - 4061, - 4062, - 4063, - 4064, - 4065, - 4066, - 4067, - 4068, - 4069, - 4070, - 4071, - 4072, - 4073, - 4074, - 4075, - 4076, - 4077, - 4078, - 4079, - 4080, - 4081, - 4082, - 4083, - 4084, - 4085, - 4086, - 4087, - 4088, - 4089, - 4090, - 4091, - 4092, - 4093, - 4094, - 4095, - 4096, - 4097, - 4098, - 4099, - 4100, - 4101, - 4102, - 4103, - 4104, - 4105, - 4106, - 4107, - 4108, - 4109, - 4110, - 4111, - 4112, - 4113, - 4114, - 4115, - 4116, - 4117, - 4118, - 4119, - 4120, - 4121, - 4122, - 4123, - 4124, - 4125, - 4126, - 4127, - 4128, - 4129, - 4130, - 4131, - 4132, - 4133, - 4134, - 4135, - 4136, - 4137, - 4138, - 4139, - 4140, - 4141, - 4142, - 4143, - 4144, - 4145, - 4146, - 4147, - 4148, - 4149, - 4150, - 4151, - 4152, - 4153, - 4154, - 4155, - 4156, - 4157, - 4158, - 4159, - 4160, - 4161, - 4162, - 4163, - 4164, - 4165, - 4166, - 4167, - 4168, - 4169, - 4170, - 4171, - 4172, - 4173, - 4174, - 4175, - 4176, - 4177, - 4178, - 4179, - 4180, - 4181, - 4182, - 4183, - 4184, - 4185, - 4186, - 4187, - 4188, - 4189, - 4190, - 4191, - 4192, - 4193, - 4194, - 4195, - 4196, - 4197, - 4198, - 4199, - 4200, - 4201, - 4202, - 4203, - 4204, - 4205, - 4206, - 4207, - 4208, - 4209, - 4210, - 4211, - 4212, - 4213, - 4214, - 4215, - 4216, - 4217, - 4218, - 4219, - 4220, - 4221, - 4222, - 4223, - 4224, - 4225, - 4226, - 4227, - 4228, - 4229, - 4230, - 4231, - 4232, - 4233, - 4234, - 4235, - 4236, - 4237, - 4238, - 4239, - 4240, - 4241, - 4242, - 4243, - 4244, - 4245, - 4246, - 4247, - 4248, - 4249, - 4250, - 4251, - 4252, - 4253, - 4254, - 4255, - 4256, - 4257, - 4258, - 4259, - 4260, - 4261, - 4262, - 4263, - 4264, - 4265, - 4266, - 4267, - 4268, - 4269, - 4270, - 4271, - 4272, - 4273, - 4274, - 4275, - 4276, - 4277, - 4278, - 4279, - 4280, - 4281, - 4282, - 4283, - 4284, - 4285, - 4286, - 4287, - 4288, - 4289, - 4290, - 4291, - 4292, - 4293, - 4294, - 4295, - 4296, - 4297, - 4298, - 4299, - 4300, - 4301, - 4302, - 4303, - 4304, - 4305, - 4306, - 4307, - 4308, - 4309, - 4310, - 4311, - 4312, - 4313, - 4314, - 4315, - 4316, - 4317, - 4318, - 4319, - 4320, - 4321, - 4322, - 4323, - 4324, - 4325, - 4326, - 4327, - 4328, - 4329, - 4330, - 4331, - 4332, - 4333, - 4334, - 4335, - 4336, - 4337, - 4338, - 4339, - 4340, - 4341, - 4342, - 4343, - 4344, - 4345, - 4346, - 4347, - 4348, - 4349, - 4350, - 4351, - 4352, - 4353, - 4354, - 4355, - 4356, - 4357, - 4358, - 4359, - 4360, - 4361, - 4362, - 4363, - 4364, - 4365, - 4366, - 4367, - 4368, - 4369, - 4370, - 4371, - 4372, - 4373, - 4374, - 4375, - 4376, - 4377, - 4378, - 4379, - 4380, - 4381, - 4382, - 4383, - 4384, - 4385, - 4386, - 4387, - 4388, - 4389, - 4390, - 4391, - 4392, - 4393, - 4394, - 4395, - 4396, - 4397, - 4398, - 4399, - 4400, - 4401, - 4402, - 4403, - 4404, - 4405, - 4406, - 4407, - 4408, - 4409, - 4410, - 4411, - 4412, - 4413, - 4414, - 4415, - 4416, - 4417, - 4418, - 4419, - 4420, - 4421, - 4422, - 4423, - 4424, - 4425, - 4426, - 4427, - 4428, - 4429, - 4430, - 4431, - 4432, - 4433, - 4434, - 4435, - 4436, - 4437, - 4438, - 4439, - 4440, - 4441, - 4442, - 4443, - 4444, - 4445, - 4446, - 4447, - 4448, - 4449, - 4450, - 4451, - 4452, - 4453, - 4454, - 4455, - 4456, - 4457, - 4458, - 4459, - 4460, - 4461, - 4462, - 4463, - 4464, - 4465, - 4466, - 4467, - 4468, - 4469, - 4470, - 4471, - 4472, - 4473, - 4474, - 4475, - 4476, - 4477, - 4478, - 4479, - 4480, - 4481, - 4482, - 4483, - 4484, - 4485, - 4486, - 4487, - 4488, - 4489, - 4490, - 4491, - 4492, - 4493, - 4494, - 4495, - 4496, - 4497, - 4498, - 4499, - 4500, - 4501, - 4502, - 4503, - 4504, - 4505, - 4506, - 4507, - 4508, - 4509, - 4510, - 4511, - 4512, - 4513, - 4514, - 4515, - 4516, - 4517, - 4518, - 4519, - 4520, - 4521, - 4522, - 4523, - 4524, - 4525, - 4526, - 4527, - 4528, - 4529, - 4530, - 4531, - 4532, - 4533, - 4534, - 4535, - 4536, - 4537, - 4538, - 4539, - 4540, - 4541, - 4542, - 4543, - 4544, - 4545, - 4546, - 4547, - 4548, - 4549, - 4550, - 4551, - 4552, - 4553, - 4554, - 4555, - 4556, - 4557, - 4558, - 4559, - 4560, - 4561, - 4562, - 4563, - 4564, - 4565, - 4566, - 4567, - 4568, - 4569, - 4570, - 4571, - 4572, - 4573, - 4574, - 4575, - 4576, - 4577, - 4578, - 4579, - 4580, - 4581, - 4582, - 4583, - 4584, - 4585, - 4586, - 4587, - 4588, - 4589, - 4590, - 4591, - 4592, - 4593, - 4594, - 4595, - 4596, - 4597, - 4598, - 4599, - 4600, - 4601, - 4602, - 4603, - 4604, - 4605, - 4606, - 4607, - 4608, - 4609, - 4610, - 4611, - 4612, - 4613, - 4614, - 4615, - 4616, - 4617, - 4618, - 4619, - 4620, - 4621, - 4622, - 4623, - 4624, - 4625, - 4626, - 4627, - 4628, - 4629, - 4630, - 4631, - 4632, - 4633, - 4634, - 4635, - 4636, - 4637, - 4638, - 4639, - 4640, - 4641, - 4642, - 4643, - 4644, - 4645, - 4646, - 4647, - 4648, - 4649, - 4650, - 4651, - 4652, - 4653, - 4654, - 4655, - 4656, - 4657, - 4658, - 4659, - 4660, - 4661, - 4662, - 4663, - 4664, - 4665, - 4666, - 4667, - 4668, - 4669, - 4670, - 4671, - 4672, - 4673, - 4674, - 4675, - 4676, - 4677, - 4678, - 4679, - 4680, - 4681, - 4682, - 4683, - 4684, - 4685, - 4686, - 4687, - 4688, - 4689, - 4690, - 4691, - 4692, - 4693, - 4694, - 4695, - 4696, - 4697, - 4698, - 4699, - 4700, - 4701, - 4702, - 4703, - 4704, - 4705, - 4706, - 4707, - 4708, - 4709, - 4710, - 4711, - 4712, - 4713, - 4714, - 4715, - 4716, - 4717, - 4718, - 4719, - 4720, - 4721, - 4722, - 4723, - 4724, - 4725, - 4726, - 4727, - 4728, - 4729, - 4730, - 4731, - 4732, - 4733, - 4734, - 4735, - 4736, - 4737, - 4738, - 4739, - 4740, - 4741, - 4742, - 4743, - 4744, - 4745, - 4746, - 4747, - 4748, - 4749, - 4750, - 4751, - 4752, - 4753, - 4754, - 4755, - 4756, - 4757, - 4758, - 4759, - 4760, - 4761, - 4762, - 4763, - 4764, - 4765, - 4766, - 4767, - 4768, - 4769, - 4770, - 4771, - 4772, - 4773, - 4774, - 4775, - 4776, - 4777, - 4778, - 4779, - 4780, - 4781, - 4782, - 4783, - 4784, - 4785, - 4786, - 4787, - 4788, - 4789, - 4790, - 4791, - 4792, - 4793, - 4794, - 4795, - 4796, - 4797, - 4798, - 4799, - 4800, - 4801, - 4802, - 4803, - 4804, - 4805, - 4806, - 4807, - 4808, - 4809, - 4810, - 4811, - 4812, - 4813, - 4814, - 4815, - 4816, - 4817, - 4818, - 4819, - 4820, - 4821, - 4822, - 4823, - 4824, - 4825, - 4826, - 4827, - 4828, - 4829, - 4830, - 4831, - 4832, - 4833, - 4834, - 4835, - 4836, - 4837, - 4838, - 4839, - 4840, - 4841, - 4842, - 4843, - 4844, - 4845, - 4846, - 4847, - 4848, - 4849, - 4850, - 4851, - 4852, - 4853, - 4854, - 4855, - 4856, - 4857, - 4858, - 4859, - 4860, - 4861, - 4862, - 4863, - 4864, - 4865, - 4866, - 4867, - 4868, - 4869, - 4870, - 4871, - 4872, - 4873, - 4874, - 4875, - 4876, - 4877, - 4878, - 4879, - 4880, - 4881, - 4882, - 4883, - 4884, - 4885, - 4886, - 4887, - 4888, - 4889, - 4890, - 4891, - 4892, - 4893, - 4894, - 4895, - 4896, - 4897, - 4898, - 4899, - 4900, - 4901, - 4902, - 4903, - 4904, - 4905, - 4906, - 4907, - 4908, - 4909, - 4910, - 4911, - 4912, - 4913, - 4914, - 4915, - 4916, - 4917, - 4918, - 4919, - 4920, - 4921, - 4922, - 4923, - 4924, - 4925, - 4926, - 4927, - 4928, - 4929, - 4930, - 4931, - 4932, - 4933, - 4934, - 4935, - 4936, - 4937, - 4938, - 4939, - 4940, - 4941, - 4942, - 4943, - 4944, - 4945, - 4946, - 4947, - 4948, - 4949, - 4950, - 4951, - 4952, - 4953, - 4954, - 4955, - 4956, - 4957, - 4958, - 4959, - 4960, - 4961, - 4962, - 4963, - 4964, - 4965, - 4966, - 4967, - 4968, - 4969, - 4970, - 4971, - 4972, - 4973, - 4974, - 4975, - 4976, - 4977, - 4978, - 4979, - 4980, - 4981, - 4982, - 4983, - 4984, - 4985, - 4986, - 4987, - 4988, - 4989, - 4990, - 4991, - 4992, - 4993, - 4994, - 4995, - 4996, - 4997, - 4998, - 4999, - 5000, - 5001, - 5002, - 5003, - 5004, - 5005, - 5006, - 5007, - 5008, - 5009, - 5010, - 5011, - 5012, - 5013, - 5014, - 5015, - 5016, - 5017, - 5018, - 5019, - 5020, - 5021, - 5022, - 5023, - 5024, - 5025, - 5026, - 5027, - 5028, - 5029, - 5030, - 5031, - 5032, - 5033, - 5034, - 5035, - 5036, - 5037, - 5038, - 5039, - 5040, - 5041, - 5042, - 5043, - 5044, - 5045, - 5046, - 5047, - 5048, - 5049, - 5050, - 5051, - 5052, - 5053, - 5054, - 5055, - 5056, - 5057, - 5058, - 5059, - 5060, - 5061, - 5062, - 5063, - 5064, - 5065, - 5066, - 5067, - 5068, - 5069, - 5070, - 5071, - 5072, - 5073, - 5074, - 5075, - 5076, - 5077, - 5078, - 5079, - 5080, - 5081, - 5082, - 5083, - 5084, - 5085, - 5086, - 5087, - 5088, - 5089, - 5090, - 5091, - 5092, - 5093, - 5094, - 5095, - 5096, - 5097, - 5098, - 5099, - 5100, - 5101, - 5102, - 5103, - 5104, - 5105, - 5106, - 5107, - 5108, - 5109, - 5110, - 5111, - 5112, - 5113, - 5114, - 5115, - 5116, - 5117, - 5118, - 5119, - 5120, - 5121, - 5122, - 5123, - 5124, - 5125, - 5126, - 5127, - 5128, - 5129, - 5130, - 5131, - 5132, - 5133, - 5134, - 5135, - 5136, - 5137, - 5138, - 5139, - 5140, - 5141, - 5142, - 5143, - 5144, - 5145, - 5146, - 5147, - 5148, - 5149, - 5150, - 5151, - 5152, - 5153, - 5154, - 5155, - 5156, - 5157, - 5158, - 5159, - 5160, - 5161, - 5162, - 5163, - 5164, - 5165, - 5166, - 5167, - 5168, - 5169, - 5170, - 5171, - 5172, - 5173, - 5174, - 5175, - 5176, - 5177, - 5178, - 5179, - 5180, - 5181, - 5182, - 5183, - 5184, - 5185, - 5186, - 5187, - 5188, - 5189, - 5190, - 5191, - 5192, - 5193, - 5194, - 5195, - 5196, - 5197, - 5198, - 5199, - 5200, - 5201, - 5202, - 5203, - 5204, - 5205, - 5206, - 5207, - 5208, - 5209, - 5210, - 5211, - 5212, - 5213, - 5214, - 5215, - 5216, - 5217, - 5218, - 5219, - 5220, - 5221, - 5222, - 5223, - 5224, - 5225, - 5226, - 5227, - 5228, - 5229, - 5230, - 5231, - 5232, - 5233, - 5234, - 5235, - 5236, - 5237, - 5238, - 5239, - 5240, - 5241, - 5242, - 5243, - 5244, - 5245, - 5246, - 5247, - 5248, - 5249, - 5250, - 5251, - 5252, - 5253, - 5254, - 5255, - 5256, - 5257, - 5258, - 5259, - 5260, - 5261, - 5262, - 5263, - 5264, - 5265, - 5266, - 5267, - 5268, - 5269, - 5270, - 5271, - 5272, - 5273, - 5274, - 5275, - 5276, - 5277, - 5278, - 5279, - 5280, - 5281, - 5282, - 5283, - 5284, - 5285, - 5286, - 5287, - 5288, - 5289, - 5290, - 5291, - 5292, - 5293, - 5294, - 5295, - 5296, - 5297, - 5298, - 5299, - 5300, - 5301, - 5302, - 5303, - 5304, - 5305, - 5306, - 5307, - 5308, - 5309, - 5310, - 5311, - 5312, - 5313, - 5314, - 5315, - 5316, - 5317, - 5318, - 5319, - 5320, - 5321, - 5322, - 5323, - 5324, - 5325, - 5326, - 5327, - 5328, - 5329, - 5330, - 5331, - 5332, - 5333, - 5334, - 5335, - 5336, - 5337, - 5338, - 5339, - 5340, - 5341, - 5342, - 5343, - 5344, - 5345, - 5346, - 5347, - 5348, - 5349, - 5350, - 5351, - 5352, - 5353, - 5354, - 5355, - 5356, - 5357, - 5358, - 5359, - 5360, - 5361, - 5362, - 5363, - 5364, - 5365, - 5366, - 5367, - 5368, - 5369, - 5370, - 5371, - 5372, - 5373, - 5374, - 5375, - 5376, - 5377, - 5378, - 5379, - 5380, - 5381, - 5382, - 5383, - 5384, - 5385, - 5386, - 5387, - 5388, - 5389, - 5390, - 5391, - 5392, - 5393, - 5394, - 5395, - 5396, - 5397, - 5398, - 5399, - 5400, - 5401, - 5402, - 5403, - 5404, - 5405, - 5406, - 5407, - 5408, - 5409, - 5410, - 5411, - 5412, - 5413, - 5414, - 5415, - 5416, - 5417, - 5418, - 5419, - 5420, - 5421, - 5422, - 5423, - 5424, - 5425, - 5426, - 5427, - 5428, - 5429, - 5430, - 5431, - 5432, - 5433, - 5434, - 5435, - 5436, - 5437, - 5438, - 5439, - 5440, - 5441, - 5442, - 5443, - 5444, - 5445, - 5446, - 5447, - 5448, - 5449, - 5450, - 5451, - 5452, - 5453, - 5454, - 5455, - 5456, - 5457, - 5458, - 5459, - 5460, - 5461, - 5462, - 5463, - 5464, - 5465, - 5466, - 5467, - 5468, - 5469, - 5470, - 5471, - 5472, - 5473, - 5474, - 5475, - 5476, - 5477, - 5478, - 5479, - 5480, - 5481, - 5482, - 5483, - 5484, - 5485, - 5486, - 5487, - 5488, - 5489, - 5490, - 5491, - 5492, - 5493, - 5494, - 5495, - 5496, - 5497, - 5498, - 5499, - 5500, - 5501, - 5502, - 5503, - 5504, - 5505, - 5506, - 5507, - 5508, - 5509, - 5510, - 5511, - 5512, - 5513, - 5514, - 5515, - 5516, - 5517, - 5518, - 5519, - 5520, - 5521, - 5522, - 5523, - 5524, - 5525, - 5526, - 5527, - 5528, - 5529, - 5530, - 5531, - 5532, - 5533, - 5534, - 5535, - 5536, - 5537, - 5538, - 5539, - 5540, - 5541, - 5542, - 5543, - 5544, - 5545, - 5546, - 5547, - 5548, - 5549, - 5550, - 5551, - 5552, - 5553, - 5554, - 5555, - 5556, - 5557, - 5558, - 5559, - 5560, - 5561, - 5562, - 5563, - 5564, - 5565, - 5566, - 5567, - 5568, - 5569, - 5570, - 5571, - 5572, - 5573, - 5574, - 5575, - 5576, - 5577, - 5578, - 5579, - 5580, - 5581, - 5582, - 5583, - 5584, - 5585, - 5586, - 5587, - 5588, - 5589, - 5590, - 5591, - 5592, - 5593, - 5594, - 5595, - 5596, - 5597, - 5598, - 5599, - 5600, - 5601, - 5602, - 5603, - 5604, - 5605, - 5606, - 5607, - 5608, - 5609, - 5610, - 5611, - 5612, - 5613, - 5614, - 5615, - 5616, - 5617, - 5618, - 5619, - 5620, - 5621, - 5622, - 5623, - 5624, - 5625, - 5626, - 5627, - 5628, - 5629, - 5630, - 5631, - 5632, - 5633, - 5634, - 5635, - 5636, - 5637, - 5638, - 5639, - 5640, - 5641, - 5642, - 5643, - 5644, - 5645, - 5646, - 5647, - 5648, - 5649, - 5650, - 5651, - 5652, - 5653, - 5654, - 5655, - 5656, - 5657, - 5658, - 5659, - 5660, - 5661, - 5662, - 5663, - 5664, - 5665, - 5666, - 5667, - 5668, - 5669, - 5670, - 5671, - 5672, - 5673, - 5674, - 5675, - 5676, - 5677, - 5678, - 5679, - 5680, - 5681, - 5682, - 5683, - 5684, - 5685, - 5686, - 5687, - 5688, - 5689, - 5690, - 5691, - 5692, - 5693, - 5694, - 5695, - 5696, - 5697, - 5698, - 5699, - 5700, - 5701, - 5702, - 5703, - 5704, - 5705, - 5706, - 5707, - 5708, - 5709, - 5710, - 5711, - 5712, - 5713, - 5714, - 5715, - 5716, - 5717, - 5718, - 5719, - 5720, - 5721, - 5722, - 5723, - 5724, - 5725, - 5726, - 5727, - 5728, - 5729, - 5730, - 5731, - 5732, - 5733, - 5734, - 5735, - 5736, - 5737, - 5738, - 5739, - 5740, - 5741, - 5742, - 5743, - 5744, - 5745, - 5746, - 5747, - 5748, - 5749, - 5750, - 5751, - 5752, - 5753, - 5754, - 5755, - 5756, - 5757, - 5758, - 5759, - 5760, - 5761, - 5762, - 5763, - 5764, - 5765, - 5766, - 5767, - 5768, - 5769, - 5770, - 5771, - 5772, - 5773, - 5774, - 5775, - 5776, - 5777, - 5778, - 5779, - 5780, - 5781, - 5782, - 5783, - 5784, - 5785, - 5786, - 5787, - 5788, - 5789, - 5790, - 5791, - 5792, - 5793, - 5794, - 5795, - 5796, - 5797, - 5798, - 5799, - 5800, - 5801, - 5802, - 5803, - 5804, - 5805, - 5806, - 5807, - 5808, - 5809, - 5810, - 5811, - 5812, - 5813, - 5814, - 5815, - 5816, - 5817, - 5818, - 5819, - 5820, - 5821, - 5822, - 5823, - 5824, - 5825, - 5826, - 5827, - 5828, - 5829, - 5830, - 5831, - 5832, - 5833, - 5834, - 5835, - 5836, - 5837, - 5838, - 5839, - 5840, - 5841, - 5842, - 5843, - 5844, - 5845, - 5846, - 5847, - 5848, - 5849, - 5850, - 5851, - 5852, - 5853, - 5854, - 5855, - 5856, - 5857, - 5858, - 5859, - 5860, - 5861, - 5862, - 5863, - 5864, - 5865, - 5866, - 5867, - 5868, - 5869, - 5870, - 5871, - 5872, - 5873, - 5874, - 5875, - 5876, - 5877, - 5878, - 5879, - 5880, - 5881, - 5882, - 5883, - 5884, - 5885, - 5886, - 5887, - 5888, - 5889, - 5890, - 5891, - 5892, - 5893, - 5894, - 5895, - 5896, - 5897, - 5898, - 5899, - 5900, - 5901, - 5902, - 5903, - 5904, - 5905, - 5906, - 5907, - 5908, - 5909, - 5910, - 5911, - 5912, - 5913, - 5914, - 5915, - 5916, - 5917, - 5918, - 5919, - 5920, - 5921, - 5922, - 5923, - 5924, - 5925, - 5926, - 5927, - 5928, - 5929, - 5930, - 5931, - 5932, - 5933, - 5934, - 5935, - 5936, - 5937, - 5938, - 5939, - 5940, - 5941, - 5942, - 5943, - 5944, - 5945, - 5946, - 5947, - 5948, - 5949, - 5950, - 5951, - 5952, - 5953, - 5954, - 5955, - 5956, - 5957, - 5958, - 5959, - 5960, - 5961, - 5962, - 5963, - 5964, - 5965, - 5966, - 5967, - 5968, - 5969, - 5970, - 5971, - 5972, - 5973, - 5974, - 5975, - 5976, - 5977, - 5978, - 5979, - 5980, - 5981, - 5982, - 5983, - 5984, - 5985, - 5986, - 5987, - 5988, - 5989, - 5990, - 5991, - 5992, - 5993, - 5994, - 5995, - 5996, - 5997, - 5998, - 5999, - 6000, - 6001, - 6002, - 6003, - 6004, - 6005, - 6006, - 6007, - 6008, - 6009, - 6010, - 6011, - 6012, - 6013, - 6014, - 6015, - 6016, - 6017, - 6018, - 6019, - 6020, - 6021, - 6022, - 6023, - 6024, - 6025, - 6026, - 6027, - 6028, - 6029, - 6030, - 6031, - 6032, - 6033, - 6034, - 6035, - 6036, - 6037, - 6038, - 6039, - 6040, - 6041, - 6042, - 6043, - 6044, - 6045, - 6046, - 6047, - 6048, - 6049, - 6050, - 6051, - 6052, - 6053, - 6054, - 6055, - 6056, - 6057, - 6058, - 6059, - 6060, - 6061, - 6062, - 6063, - 6064, - 6065, - 6066, - 6067, - 6068, - 6069, - 6070, - 6071, - 6072, - 6073, - 6074, - 6075, - 6076, - 6077, - 6078, - 6079, - 6080, - 6081, - 6082, - 6083, - 6084, - 6085, - 6086, - 6087, - 6088, - 6089, - 6090, - 6091, - 6092, - 6093, - 6094, - 6095, - 6096, - 6097, - 6098, - 6099, - 6100, - 6101, - 6102, - 6103, - 6104, - 6105, - 6106, - 6107, - 6108, - 6109, - 6110, - 6111, - 6112, - 6113, - 6114, - 6115, - 6116, - 6117, - 6118, - 6119, - 6120, - 6121, - 6122, - 6123, - 6124, - 6125, - 6126, - 6127, - 6128, - 6129, - 6130, - 6131, - 6132, - 6133, - 6134, - 6135, - 6136, - 6137, - 6138, - 6139, - 6140, - 6141, - 6142, - 6143, - 6144, - 6145, - 6146, - 6147, - 6148, - 6149, - 6150, - 6151, - 6152, - 6153, - 6154, - 6155, - 6156, - 6157, - 6158, - 6159, - 6160, - 6161, - 6162, - 6163, - 6164, - 6165, - 6166, - 6167, - 6168, - 6169, - 6170, - 6171, - 6172, - 6173, - 6174, - 6175, - 6176, - 6177, - 6178, - 6179, - 6180, - 6181, - 6182, - 6183, - 6184, - 6185, - 6186, - 6187, - 6188, - 6189, - 6190, - 6191, - 6192, - 6193, - 6194, - 6195, - 6196, - 6197, - 6198, - 6199, - 6200, - 6201, - 6202, - 6203, - 6204, - 6205, - 6206, - 6207, - 6208, - 6209, - 6210, - 6211, - 6212, - 6213, - 6214, - 6215, - 6216, - 6217, - 6218, - 6219, - 6220, - 6221, - 6222, - 6223, - 6224, - 6225, - 6226, - 6227, - 6228, - 6229, - 6230, - 6231, - 6232, - 6233, - 6234, - 6235, - 6236, - 6237, - 6238, - 6239, - 6240, - 6241, - 6242, - 6243, - 6244, - 6245, - 6246, - 6247, - 6248, - 6249, - 6250, - 6251, - 6252, - 6253, - 6254, - 6255, - 6256, - 6257, - 6258, - 6259, - 6260, - 6261, - 6262, - 6263, - 6264, - 6265, - 6266, - 6267, - 6268, - 6269, - 6270, - 6271, - 6272, - 6273, - 6274, - 6275, - 6276, - 6277, - 6278, - 6279, - 6280, - 6281, - 6282, - 6283, - 6284, - 6285, - 6286, - 6287, - 6288, - 6289, - 6290, - 6291, - 6292, - 6293, - 6294, - 6295, - 6296, - 6297, - 6298, - 6299, - 6300, - 6301, - 6302, - 6303, - 6304, - 6305, - 6306, - 6307, - 6308, - 6309, - 6310, - 6311, - 6312, - 6313, - 6314, - 6315, - 6316, - 6317, - 6318, - 6319, - 6320, - 6321, - 6322, - 6323, - 6324, - 6325, - 6326, - 6327, - 6328, - 6329, - 6330, - 6331, - 6332, - 6333, - 6334, - 6335, - 6336, - 6337, - 6338, - 6339, - 6340, - 6341, - 6342, - 6343, - 6344, - 6345, - 6346, - 6347, - 6348, - 6349, - 6350, - 6351, - 6352, - 6353, - 6354, - 6355, - 6356, - 6357, - 6358, - 6359, - 6360, - 6361, - 6362, - 6363, - 6364, - 6365, - 6366, - 6367, - 6368, - 6369, - 6370, - 6371, - 6372, - 6373, - 6374, - 6375, - 6376, - 6377, - 6378, - 6379, - 6380, - 6381, - 6382, - 6383, - 6384, - 6385, - 6386, - 6387, - 6388, - 6389, - 6390, - 6391, - 6392, - 6393, - 6394, - 6395, - 6396, - 6397, - 6398, - 6399, - 6400, - 6401, - 6402, - 6403, - 6404, - 6405, - 6406, - 6407, - 6408, - 6409, - 6410, - 6411, - 6412, - 6413, - 6414, - 6415, - 6416, - 6417, - 6418, - 6419, - 6420, - 6421, - 6422, - 6423, - 6424, - 6425, - 6426, - 6427, - 6428, - 6429, - 6430, - 6431, - 6432, - 6433, - 6434, - 6435, - 6436, - 6437, - 6438, - 6439, - 6440, - 6441, - 6442, - 6443, - 6444, - 6445, - 6446, - 6447, - 6448, - 6449, - 6450, - 6451, - 6452, - 6453, - 6454, - 6455, - 6456, - 6457, - 6458, - 6459, - 6460, - 6461, - 6462, - 6463, - 6464, - 6465, - 6466, - 6467, - 6468, - 6469, - 6470, - 6471, - 6472, - 6473, - 6474, - 6475, - 6476, - 6477, - 6478, - 6479, - 6480, - 6481, - 6482, - 6483, - 6484, - 6485, - 6486, - 6487, - 6488, - 6489, - 6490, - 6491, - 6492, - 6493, - 6494, - 6495, - 6496, - 6497, - 6498, - 6499, - 6500, - 6501, - 6502, - 6503, - 6504, - 6505, - 6506, - 6507, - 6508, - 6509, - 6510, - 6511, - 6512, - 6513, - 6514, - 6515, - 6516, - 6517, - 6518, - 6519, - 6520, - 6521, - 6522, - 6523, - 6524, - 6525, - 6526, - 6527, - 6528, - 6529, - 6530, - 6531, - 6532, - 6533, - 6534, - 6535, - 6536, - 6537, - 6538, - 6539, - 6540, - 6541, - 6542, - 6543, - 6544, - 6545, - 6546, - 6547, - 6548, - 6549, - 6550, - 6551, - 6552, - 6553, - 6554, - 6555, - 6556, - 6557, - 6558, - 6559, - 6560, - 6561, - 6562, - 6563, - 6564, - 6565, - 6566, - 6567, - 6568, - 6569, - 6570, - 6571, - 6572, - 6573, - 6574, - 6575, - 6576, - 6577, - 6578, - 6579, - 6580, - 6581, - 6582, - 6583, - 6584, - 6585, - 6586, - 6587, - 6588, - 6589, - 6590, - 6591, - 6592, - 6593, - 6594, - 6595, - 6596, - 6597, - 6598, - 6599, - 6600, - 6601, - 6602, - 6603, - 6604, - 6605, - 6606, - 6607, - 6608, - 6609, - 6610, - 6611, - 6612, - 6613, - 6614, - 6615, - 6616, - 6617, - 6618, - 6619, - 6620, - 6621, - 6622, - 6623, - 6624, - 6625, - 6626, - 6627, - 6628, - 6629, - 6630, - 6631, - 6632, - 6633, - 6634, - 6635, - 6636, - 6637, - 6638, - 6639, - 6640, - 6641, - 6642, - 6643, - 6644, - 6645, - 6646, - 6647, - 6648, - 6649, - 6650, - 6651, - 6652, - 6653, - 6654, - 6655, - 6656, - 6657, - 6658, - 6659, - 6660, - 6661, - 6662, - 6663, - 6664, - 6665, - 6666, - 6667, - 6668, - 6669, - 6670, - 6671, - 6672, - 6673, - 6674, - 6675, - 6676, - 6677, - 6678, - 6679, - 6680, - 6681, - 6682, - 6683, - 6684, - 6685, - 6686, - 6687, - 6688, - 6689, - 6690, - 6691, - 6692, - 6693, - 6694, - 6695, - 6696, - 6697, - 6698, - 6699, - 6700, - 6701, - 6702, - 6703, - 6704, - 6705, - 6706, - 6707, - 6708, - 6709, - 6710, - 6711, - 6712, - 6713, - 6714, - 6715, - 6716, - 6717, - 6718, - 6719, - 6720, - 6721, - 6722, - 6723, - 6724, - 6725, - 6726, - 6727, - 6728, - 6729, - 6730, - 6731, - 6732, - 6733, - 6734, - 6735, - 6736, - 6737, - 6738, - 6739, - 6740, - 6741, - 6742, - 6743, - 6744, - 6745, - 6746, - 6747, - 6748, - 6749, - 6750, - 6751, - 6752, - 6753, - 6754, - 6755, - 6756, - 6757, - 6758, - 6759, - 6760, - 6761, - 6762, - 6763, - 6764, - 6765, - 6766, - 6767, - 6768, - 6769, - 6770, - 6771, - 6772, - 6773, - 6774, - 6775, - 6776, - 6777, - 6778, - 6779, - 6780, - 6781, - 6782, - 6783, - 6784, - 6785, - 6786, - 6787, - 6788, - 6789, - 6790, - 6791, - 6792, - 6793, - 6794, - 6795, - 6796, - 6797, - 6798, - 6799, - 6800, - 6801, - 6802, - 6803, - 6804, - 6805, - 6806, - 6807, - 6808, - 6809, - 6810, - 6811, - 6812, - 6813, - 6814, - 6815, - 6816, - 6817, - 6818, - 6819, - 6820, - 6821, - 6822, - 6823, - 6824, - 6825, - 6826, - 6827, - 6828, - 6829, - 6830, - 6831, - 6832, - 6833, - 6834, - 6835, - 6836, - 6837, - 6838, - 6839, - 6840, - 6841, - 6842, - 6843, - 6844, - 6845, - 6846, - 6847, - 6848, - 6849, - 6850, - 6851, - 6852, - 6853, - 6854, - 6855, - 6856, - 6857, - 6858, - 6859, - 6860, - 6861, - 6862, - 6863, - 6864, - 6865, - 6866, - 6867, - 6868, - 6869, - 6870, - 6871, - 6872, - 6873, - 6874, - 6875, - 6876, - 6877, - 6878, - 6879, - 6880, - 6881, - 6882, - 6883, - 6884, - 6885, - 6886, - 6887, - 6888, - 6889, - 6890, - 6891, - 6892, - 6893, - 6894, - 6895, - 6896, - 6897, - 6898, - 6899, - 6900, - 6901, - 6902, - 6903, - 6904, - 6905, - 6906, - 6907, - 6908, - 6909, - 6910, - 6911, - 6912, - 6913, - 6914, - 6915, - 6916, - 6917, - 6918, - 6919, - 6920, - 6921, - 6922, - 6923, - 6924, - 6925, - 6926, - 6927, - 6928, - 6929, - 6930, - 6931, - 6932, - 6933, - 6934, - 6935, - 6936, - 6937, - 6938, - 6939, - 6940, - 6941, - 6942, - 6943, - 6944, - 6945, - 6946, - 6947, - 6948, - 6949, - 6950, - 6951, - 6952, - 6953, - 6954, - 6955, - 6956, - 6957, - 6958, - 6959, - 6960, - 6961, - 6962, - 6963, - 6964, - 6965, - 6966, - 6967, - 6968, - 6969, - 6970, - 6971, - 6972, - 6973, - 6974, - 6975, - 6976, - 6977, - 6978, - 6979, - 6980, - 6981, - 6982, - 6983, - 6984, - 6985, - 6986, - 6987, - 6988, - 6989, - 6990, - 6991, - 6992, - 6993, - 6994, - 6995, - 6996, - 6997, - 6998, - 6999, - 7000, - 7001, - 7002, - 7003, - 7004, - 7005, - 7006, - 7007, - 7008, - 7009, - 7010, - 7011, - 7012, - 7013, - 7014, - 7015, - 7016, - 7017, - 7018, - 7019, - 7020, - 7021, - 7022, - 7023, - 7024, - 7025, - 7026, - 7027, - 7028, - 7029, - 7030, - 7031, - 7032, - 7033, - 7034, - 7035, - 7036, - 7037, - 7038, - 7039, - 7040, - 7041, - 7042, - 7043, - 7044, - 7045, - 7046, - 7047, - 7048, - 7049, - 7050, - 7051, - 7052, - 7053, - 7054, - 7055, - 7056, - 7057, - 7058, - 7059, - 7060, - 7061, - 7062, - 7063, - 7064, - 7065, - 7066, - 7067, - 7068, - 7069, - 7070, - 7071, - 7072, - 7073, - 7074, - 7075, - 7076, - 7077, - 7078, - 7079, - 7080, - 7081, - 7082, - 7083, - 7084, - 7085, - 7086, - 7087, - 7088, - 7089, - 7090, - 7091, - 7092, - 7093, - 7094, - 7095, - 7096, - 7097, - 7098, - 7099, - 7100, - 7101, - 7102, - 7103, - 7104, - 7105, - 7106, - 7107, - 7108, - 7109, - 7110, - 7111, - 7112, - 7113, - 7114, - 7115, - 7116, - 7117, - 7118, - 7119, - 7120, - 7121, - 7122, - 7123, - 7124, - 7125, - 7126, - 7127, - 7128, - 7129, - 7130, - 7131, - 7132, - 7133, - 7134, - 7135, - 7136, - 7137, - 7138, - 7139, - 7140, - 7141, - 7142, - 7143, - 7144, - 7145, - 7146, - 7147, - 7148, - 7149, - 7150, - 7151, - 7152, - 7153, - 7154, - 7155, - 7156, - 7157, - 7158, - 7159, - 7160, - 7161, - 7162, - 7163, - 7164, - 7165, - 7166, - 7167, - 7168, - 7169, - 7170, - 7171, - 7172, - 7173, - 7174, - 7175, - 7176, - 7177, - 7178, - 7179, - 7180, - 7181, - 7182, - 7183, - 7184, - 7185, - 7186, - 7187, - 7188, - 7189, - 7190, - 7191, - 7192, - 7193, - 7194, - 7195, - 7196, - 7197, - 7198, - 7199, - 7200, - 7201, - 7202, - 7203, - 7204, - 7205, - 7206, - 7207, - 7208, - 7209, - 7210, - 7211, - 7212, - 7213, - 7214, - 7215, - 7216, - 7217, - 7218, - 7219, - 7220, - 7221, - 7222, - 7223, - 7224, - 7225, - 7226, - 7227, - 7228, - 7229, - 7230, - 7231, - 7232, - 7233, - 7234, - 7235, - 7236, - 7237, - 7238, - 7239, - 7240, - 7241, - 7242, - 7243, - 7244, - 7245, - 7246, - 7247, - 7248, - 7249, - 7250, - 7251, - 7252, - 7253, - 7254, - 7255, - 7256, - 7257, - 7258, - 7259, - 7260, - 7261, - 7262, - 7263, - 7264, - 7265, - 7266, - 7267, - 7268, - 7269, - 7270, - 7271, - 7272, - 7273, - 7274, - 7275, - 7276, - 7277, - 7278, - 7279, - 7280, - 7281, - 7282, - 7283, - 7284, - 7285, - 7286, - 7287, - 7288, - 7289, - 7290, - 7291, - 7292, - 7293, - 7294, - 7295, - 7296, - 7297, - 7298, - 7299, - 7300, - 7301, - 7302, - 7303, - 7304, - 7305, - 7306, - 7307, - 7308, - 7309, - 7310, - 7311, - 7312, - 7313, - 7314, - 7315, - 7316, - 7317, - 7318, - 7319, - 7320, - 7321, - 7322, - 7323, - 7324, - 7325, - 7326, - 7327, - 7328, - 7329, - 7330, - 7331, - 7332, - 7333, - 7334, - 7335, - 7336, - 7337, - 7338, - 7339, - 7340, - 7341, - 7342, - 7343, - 7344, - 7345, - 7346, - 7347, - 7348, - 7349, - 7350, - 7351, - 7352, - 7353, - 7354, - 7355, - 7356, - 7357, - 7358, - 7359, - 7360, - 7361, - 7362, - 7363, - 7364, - 7365, - 7366, - 7367, - 7368, - 7369, - 7370, - 7371, - 7372, - 7373, - 7374, - 7375, - 7376, - 7377, - 7378, - 7379, - 7380, - 7381, - 7382, - 7383, - 7384, - 7385, - 7386, - 7387, - 7388, - 7389, - 7390, - 7391, - 7392, - 7393, - 7394, - 7395, - 7396, - 7397, - 7398, - 7399, - 7400, - 7401, - 7402, - 7403, - 7404, - 7405, - 7406, - 7407, - 7408, - 7409, - 7410, - 7411, - 7412, - 7413, - 7414, - 7415, - 7416, - 7417, - 7418, - 7419, - 7420, - 7421, - 7422, - 7423, - 7424, - 7425, - 7426, - 7427, - 7428, - 7429, - 7430, - 7431, - 7432, - 7433, - 7434, - 7435, - 7436, - 7437, - 7438, - 7439, - 7440, - 7441, - 7442, - 7443, - 7444, - 7445, - 7446, - 7447, - 7448, - 7449, - 7450, - 7451, - 7452, - 7453, - 7454, - 7455, - 7456, - 7457, - 7458, - 7459, - 7460, - 7461, - 7462, - 7463, - 7464, - 7465, - 7466, - 7467, - 7468, - 7469, - 7470, - 7471, - 7472, - 7473, - 7474, - 7475, - 7476, - 7477, - 7478, - 7479, - 7480, - 7481, - 7482, - 7483, - 7484, - 7485, - 7486, - 7487, - 7488, - 7489, - 7490, - 7491, - 7492, - 7493, - 7494, - 7495, - 7496, - 7497, - 7498, - 7499, - 7500, - 7501, - 7502, - 7503, - 7504, - 7505, - 7506, - 7507, - 7508, - 7509, - 7510, - 7511, - 7512, - 7513, - 7514, - 7515, - 7516, - 7517, - 7518, - 7519, - 7520, - 7521, - 7522, - 7523, - 7524, - 7525, - 7526, - 7527, - 7528, - 7529, - 7530, - 7531, - 7532, - 7533, - 7534, - 7535, - 7536, - 7537, - 7538, - 7539, - 7540, - 7541, - 7542, - 7543, - 7544, - 7545, - 7546, - 7547, - 7548, - 7549, - 7550, - 7551, - 7552, - 7553, - 7554, - 7555, - 7556, - 7557, - 7558, - 7559, - 7560, - 7561, - 7562, - 7563, - 7564, - 7565, - 7566, - 7567, - 7568, - 7569, - 7570, - 7571, - 7572, - 7573, - 7574, - 7575, - 7576, - 7577, - 7578, - 7579, - 7580, - 7581, - 7582, - 7583, - 7584, - 7585, - 7586, - 7587, - 7588, - 7589, - 7590, - 7591, - 7592, - 7593, - 7594, - 7595, - 7596, - 7597, - 7598, - 7599, - 7600, - 7601, - 7602, - 7603, - 7604, - 7605, - 7606, - 7607, - 7608, - 7609, - 7610, - 7611, - 7612, - 7613, - 7614, - 7615, - 7616, - 7617, - 7618, - 7619, - 7620, - 7621, - 7622, - 7623, - 7624, - 7625, - 7626, - 7627, - 7628, - 7629, - 7630, - 7631, - 7632, - 7633, - 7634, - 7635, - 7636, - 7637, - 7638, - 7639, - 7640, - 7641, - 7642, - 7643, - 7644, - 7645, - 7646, - 7647, - 7648, - 7649, - 7650, - 7651, - 7652, - 7653, - 7654, - 7655, - 7656, - 7657, - 7658, - 7659, - 7660, - 7661, - 7662, - 7663, - 7664, - 7665, - 7666, - 7667, - 7668, - 7669, - 7670, - 7671, - 7672, - 7673, - 7674, - 7675, - 7676, - 7677, - 7678, - 7679, - 7680, - 7681, - 7682, - 7683, - 7684, - 7685, - 7686, - 7687, - 7688, - 7689, - 7690, - 7691, - 7692, - 7693, - 7694, - 7695, - 7696, - 7697, - 7698, - 7699, - 7700, - 7701, - 7702, - 7703, - 7704, - 7705, - 7706, - 7707, - 7708, - 7709, - 7710, - 7711, - 7712, - 7713, - 7714, - 7715, - 7716, - 7717, - 7718, - 7719, - 7720, - 7721, - 7722, - 7723, - 7724, - 7725, - 7726, - 7727, - 7728, - 7729, - 7730, - 7731, - 7732, - 7733, - 7734, - 7735, - 7736, - 7737, - 7738, - 7739, - 7740, - 7741, - 7742, - 7743, - 7744, - 7745, - 7746, - 7747, - 7748, - 7749, - 7750, - 7751, - 7752, - 7753, - 7754, - 7755, - 7756, - 7757, - 7758, - 7759, - 7760, - 7761, - 7762, - 7763, - 7764, - 7765, - 7766, - 7767, - 7768, - 7769, - 7770, - 7771, - 7772, - 7773, - 7774, - 7775, - 7776, - 7777, - 7778, - 7779, - 7780, - 7781, - 7782, - 7783, - 7784, - 7785, - 7786, - 7787, - 7788, - 7789, - 7790, - 7791, - 7792, - 7793, - 7794, - 7795, - 7796, - 7797, - 7798, - 7799, - 7800, - 7801, - 7802, - 7803, - 7804, - 7805, - 7806, - 7807, - 7808, - 7809, - 7810, - 7811, - 7812, - 7813, - 7814, - 7815, - 7816, - 7817, - 7818, - 7819, - 7820, - 7821, - 7822, - 7823, - 7824, - 7825, - 7826, - 7827, - 7828, - 7829, - 7830, - 7831, - 7832, - 7833, - 7834, - 7835, - 7836, - 7837, - 7838, - 7839, - 7840, - 7841, - 7842, - 7843, - 7844, - 7845, - 7846, - 7847, - 7848, - 7849, - 7850, - 7851, - 7852, - 7853, - 7854, - 7855, - 7856, - 7857, - 7858, - 7859, - 7860, - 7861, - 7862, - 7863, - 7864, - 7865, - 7866, - 7867, - 7868, - 7869, - 7870, - 7871, - 7872, - 7873, - 7874, - 7875, - 7876, - 7877, - 7878, - 7879, - 7880, - 7881, - 7882, - 7883, - 7884, - 7885, - 7886, - 7887, - 7888, - 7889, - 7890, - 7891, - 7892, - 7893, - 7894, - 7895, - 7896, - 7897, - 7898, - 7899, - 7900, - 7901, - 7902, - 7903, - 7904, - 7905, - 7906, - 7907, - 7908, - 7909, - 7910, - 7911, - 7912, - 7913, - 7914, - 7915, - 7916, - 7917, - 7918, - 7919, - 7920, - 7921, - 7922, - 7923, - 7924, - 7925, - 7926, - 7927, - 7928, - 7929, - 7930, - 7931, - 7932, - 7933, - 7934, - 7935, - 7936, - 7937, - 7938, - 7939, - 7940, - 7941, - 7942, - 7943, - 7944, - 7945, - 7946, - 7947, - 7948, - 7949, - 7950, - 7951, - 7952, - 7953, - 7954, - 7955, - 7956, - 7957, - 7958, - 7959, - 7960, - 7961, - 7962, - 7963, - 7964, - 7965, - 7966, - 7967, - 7968, - 7969, - 7970, - 7971, - 7972, - 7973, - 7974, - 7975, - 7976, - 7977, - 7978, - 7979, - 7980, - 7981, - 7982, - 7983, - 7984, - 7985, - 7986, - 7987, - 7988, - 7989, - 7990, - 7991, - 7992, - 7993, - 7994, - 7995, - 7996, - 7997, - 7998, - 7999, - 8000, - 8001, - 8002, - 8003, - 8004, - 8005, - 8006, - 8007, - 8008, - 8009, - 8010, - 8011, - 8012, - 8013, - 8014, - 8015, - 8016, - 8017, - 8018, - 8019, - 8020, - 8021, - 8022, - 8023, - 8024, - 8025, - 8026, - 8027, - 8028, - 8029, - 8030, - 8031, - 8032, - 8033, - 8034, - 8035, - 8036, - 8037, - 8038, - 8039, - 8040, - 8041, - 8042, - 8043, - 8044, - 8045, - 8046, - 8047, - 8048, - 8049, - 8050, - 8051, - 8052, - 8053, - 8054, - 8055, - 8056, - 8057, - 8058, - 8059, - 8060, - 8061, - 8062, - 8063, - 8064, - 8065, - 8066, - 8067, - 8068, - 8069, - 8070, - 8071, - 8072, - 8073, - 8074, - 8075, - 8076, - 8077, - 8078, - 8079, - 8080, - 8081, - 8082, - 8083, - 8084, - 8085, - 8086, - 8087, - 8088, - 8089, - 8090, - 8091, - 8092, - 8093, - 8094, - 8095, - 8096, - 8097, - 8098, - 8099, - 8100, - 8101, - 8102, - 8103, - 8104, - 8105, - 8106, - 8107, - 8108, - 8109, - 8110, - 8111, - 8112, - 8113, - 8114, - 8115, - 8116, - 8117, - 8118, - 8119, - 8120, - 8121, - 8122, - 8123, - 8124, - 8125, - 8126, - 8127, - 8128, - 8129, - 8130, - 8131, - 8132, - 8133, - 8134, - 8135, - 8136, - 8137, - 8138, - 8139, - 8140, - 8141, - 8142, - 8143, - 8144, - 8145, - 8146, - 8147, - 8148, - 8149, - 8150, - 8151, - 8152, - 8153, - 8154, - 8155, - 8156, - 8157, - 8158, - 8159, - 8160, - 8161, - 8162, - 8163, - 8164, - 8165, - 8166, - 8167, - 8168, - 8169, - 8170, - 8171, - 8172, - 8173, - 8174, - 8175, - 8176, - 8177, - 8178, - 8179, - 8180, - 8181, - 8182, - 8183, - 8184, - 8185, - 8186, - 8187, - 8188, - 8189, - 8190, - 8191, - 8192, - 8193, - 8194, - 8195, - 8196, - 8197, - 8198, - 8199, - 8200, - 8201, - 8202, - 8203, - 8204, - 8205, - 8206, - 8207, - 8208, - 8209, - 8210, - 8211, - 8212, - 8213, - 8214, - 8215, - 8216, - 8217, - 8218, - 8219, - 8220, - 8221, - 8222, - 8223, - 8224, - 8225, - 8226, - 8227, - 8228, - 8229, - 8230, - 8231, - 8232, - 8233, - 8234, - 8235, - 8236, - 8237, - 8238, - 8239, - 8240, - 8241, - 8242, - 8243, - 8244, - 8245, - 8246, - 8247, - 8248, - 8249, - 8250, - 8251, - 8252, - 8253, - 8254, - 8255, - 8256, - 8257, - 8258, - 8259, - 8260, - 8261, - 8262, - 8263, - 8264, - 8265, - 8266, - 8267, - 8268, - 8269, - 8270, - 8271, - 8272, - 8273, - 8274, - 8275, - 8276, - 8277, - 8278, - 8279, - 8280, - 8281, - 8282, - 8283, - 8284, - 8285, - 8286, - 8287, - 8288, - 8289, - 8290, - 8291, - 8292, - 8293, - 8294, - 8295, - 8296, - 8297, - 8298, - 8299, - 8300, - 8301, - 8302, - 8303, - 8304, - 8305, - 8306, - 8307, - 8308, - 8309, - 8310, - 8311, - 8312, - 8313, - 8314, - 8315, - 8316, - 8317, - 8318, - 8319, - 8320, - 8321, - 8322, - 8323, - 8324, - 8325, - 8326, - 8327, - 8328, - 8329, - 8330, - 8331, - 8332, - 8333, - 8334, - 8335, - 8336, - 8337, - 8338, - 8339, - 8340, - 8341, - 8342, - 8343, - 8344, - 8345, - 8346, - 8347, - 8348, - 8349, - 8350, - 8351, - 8352, - 8353, - 8354, - 8355, - 8356, - 8357, - 8358, - 8359, - 8360, - 8361, - 8362, - 8363, - 8364, - 8365, - 8366, - 8367, - 8368, - 8369, - 8370, - 8371, - 8372, - 8373, - 8374, - 8375, - 8376, - 8377, - 8378, - 8379, - 8380, - 8381, - 8382, - 8383, - 8384, - 8385, - 8386, - 8387, - 8388, - 8389, - 8390, - 8391, - 8392, - 8393, - 8394, - 8395, - 8396, - 8397, - 8398, - 8399, - 8400, - 8401, - 8402, - 8403, - 8404, - 8405, - 8406, - 8407, - 8408, - 8409, - 8410, - 8411, - 8412, - 8413, - 8414, - 8415, - 8416, - 8417, - 8418, - 8419, - 8420, - 8421, - 8422, - 8423, - 8424, - 8425, - 8426, - 8427, - 8428, - 8429, - 8430, - 8431, - 8432, - 8433, - 8434, - 8435, - 8436, - 8437, - 8438, - 8439, - 8440, - 8441, - 8442, - 8443, - 8444, - 8445, - 8446, - 8447, - 8448, - 8449, - 8450, - 8451, - 8452, - 8453, - 8454, - 8455, - 8456, - 8457, - 8458, - 8459, - 8460, - 8461, - 8462, - 8463, - 8464, - 8465, - 8466, - 8467, - 8468, - 8469, - 8470, - 8471, - 8472, - 8473, - 8474, - 8475, - 8476, - 8477, - 8478, - 8479, - 8480, - 8481, - 8482, - 8483, - 8484, - 8485, - 8486, - 8487, - 8488, - 8489, - 8490, - 8491, - 8492, - 8493, - 8494, - 8495, - 8496, - 8497, - 8498, - 8499, - 8500, - 8501, - 8502, - 8503, - 8504, - 8505, - 8506, - 8507, - 8508, - 8509, - 8510, - 8511, - 8512, - 8513, - 8514, - 8515, - 8516, - 8517, - 8518, - 8519, - 8520, - 8521, - 8522, - 8523, - 8524, - 8525, - 8526, - 8527, - 8528, - 8529, - 8530, - 8531, - 8532, - 8533, - 8534, - 8535, - 8536, - 8537, - 8538, - 8539, - 8540, - 8541, - 8542, - 8543, - 8544, - 8545, - 8546, - 8547, - 8548, - 8549, - 8550, - 8551, - 8552, - 8553, - 8554, - 8555, - 8556, - 8557, - 8558, - 8559, - 8560, - 8561, - 8562, - 8563, - 8564, - 8565, - 8566, - 8567, - 8568, - 8569, - 8570, - 8571, - 8572, - 8573, - 8574, - 8575, - 8576, - 8577, - 8578, - 8579, - 8580, - 8581, - 8582, - 8583, - 8584, - 8585, - 8586, - 8587, - 8588, - 8589, - 8590, - 8591, - 8592, - 8593, - 8594, - 8595, - 8596, - 8597, - 8598, - 8599, - 8600, - 8601, - 8602, - 8603, - 8604, - 8605, - 8606, - 8607, - 8608, - 8609, - 8610, - 8611, - 8612, - 8613, - 8614, - 8615, - 8616, - 8617, - 8618, - 8619, - 8620, - 8621, - 8622, - 8623, - 8624, - 8625, - 8626, - 8627, - 8628, - 8629, - 8630, - 8631, - 8632, - 8633, - 8634, - 8635, - 8636, - 8637, - 8638, - 8639, - 8640, - 8641, - 8642, - 8643, - 8644, - 8645, - 8646, - 8647, - 8648, - 8649, - 8650, - 8651, - 8652, - 8653, - 8654, - 8655, - 8656, - 8657, - 8658, - 8659, - 8660, - 8661, - 8662, - 8663, - 8664, - 8665, - 8666, - 8667, - 8668, - 8669, - 8670, - 8671, - 8672, - 8673, - 8674, - 8675, - 8676, - 8677, - 8678, - 8679, - 8680, - 8681, - 8682, - 8683, - 8684, - 8685, - 8686, - 8687, - 8688, - 8689, - 8690, - 8691, - 8692, - 8693, - 8694, - 8695, - 8696, - 8697, - 8698, - 8699, - 8700, - 8701, - 8702, - 8703, - 8704, - 8705, - 8706, - 8707, - 8708, - 8709, - 8710, - 8711, - 8712, - 8713, - 8714, - 8715, - 8716, - 8717, - 8718, - 8719, - 8720, - 8721, - 8722, - 8723, - 8724, - 8725, - 8726, - 8727, - 8728, - 8729, - 8730, - 8731, - 8732, - 8733, - 8734, - 8735, - 8736, - 8737, - 8738, - 8739, - 8740, - 8741, - 8742, - 8743, - 8744, - 8745, - 8746, - 8747, - 8748, - 8749, - 8750, - 8751, - 8752, - 8753, - 8754, - 8755, - 8756, - 8757, - 8758, - 8759, - 8760, - 8761, - 8762, - 8763, - 8764, - 8765, - 8766, - 8767, - 8768, - 8769, - 8770, - 8771, - 8772, - 8773, - 8774, - 8775, - 8776, - 8777, - 8778, - 8779, - 8780, - 8781, - 8782, - 8783, - 8784, - 8785, - 8786, - 8787, - 8788, - 8789, - 8790, - 8791, - 8792, - 8793, - 8794, - 8795, - 8796, - 8797, - 8798, - 8799, - 8800, - 8801, - 8802, - 8803, - 8804, - 8805, - 8806, - 8807, - 8808, - 8809, - 8810, - 8811, - 8812, - 8813, - 8814, - 8815, - 8816, - 8817, - 8818, - 8819, - 8820, - 8821, - 8822, - 8823, - 8824, - 8825, - 8826, - 8827, - 8828, - 8829, - 8830, - 8831, - 8832, - 8833, - 8834, - 8835, - 8836, - 8837, - 8838, - 8839, - 8840, - 8841, - 8842, - 8843, - 8844, - 8845, - 8846, - 8847, - 8848, - 8849, - 8850, - 8851, - 8852, - 8853, - 8854, - 8855, - 8856, - 8857, - 8858, - 8859, - 8860, - 8861, - 8862, - 8863, - 8864, - 8865, - 8866, - 8867, - 8868, - 8869, - 8870, - 8871, - 8872, - 8873, - 8874, - 8875, - 8876, - 8877, - 8878, - 8879, - 8880, - 8881, - 8882, - 8883, - 8884, - 8885, - 8886, - 8887, - 8888, - 8889, - 8890, - 8891, - 8892, - 8893, - 8894, - 8895, - 8896, - 8897, - 8898, - 8899, - 8900, - 8901, - 8902, - 8903, - 8904, - 8905, - 8906, - 8907, - 8908, - 8909, - 8910, - 8911, - 8912, - 8913, - 8914, - 8915, - 8916, - 8917, - 8918, - 8919, - 8920, - 8921, - 8922, - 8923, - 8924, - 8925, - 8926, - 8927, - 8928, - 8929, - 8930, - 8931, - 8932, - 8933, - 8934, - 8935, - 8936, - 8937, - 8938, - 8939, - 8940, - 8941, - 8942, - 8943, - 8944, - 8945, - 8946, - 8947, - 8948, - 8949, - 8950, - 8951, - 8952, - 8953, - 8954, - 8955, - 8956, - 8957, - 8958, - 8959, - 8960, - 8961, - 8962, - 8963, - 8964, - 8965, - 8966, - 8967, - 8968, - 8969, - 8970, - 8971, - 8972, - 8973, - 8974, - 8975, - 8976, - 8977, - 8978, - 8979, - 8980, - 8981, - 8982, - 8983, - 8984, - 8985, - 8986, - 8987, - 8988, - 8989, - 8990, - 8991, - 8992, - 8993, - 8994, - 8995, - 8996, - 8997, - 8998, - 8999, - 9000, - 9001, - 9002, - 9003, - 9004, - 9005, - 9006, - 9007, - 9008, - 9009, - 9010, - 9011, - 9012, - 9013, - 9014, - 9015, - 9016, - 9017, - 9018, - 9019, - 9020, - 9021, - 9022, - 9023, - 9024, - 9025, - 9026, - 9027, - 9028, - 9029, - 9030, - 9031, - 9032, - 9033, - 9034, - 9035, - 9036, - 9037, - 9038, - 9039, - 9040, - 9041, - 9042, - 9043, - 9044, - 9045, - 9046, - 9047, - 9048, - 9049, - 9050, - 9051, - 9052, - 9053, - 9054, - 9055, - 9056, - 9057, - 9058, - 9059, - 9060, - 9061, - 9062, - 9063, - 9064, - 9065, - 9066, - 9067, - 9068, - 9069, - 9070, - 9071, - 9072, - 9073, - 9074, - 9075, - 9076, - 9077, - 9078, - 9079, - 9080, - 9081, - 9082, - 9083, - 9084, - 9085, - 9086, - 9087, - 9088, - 9089, - 9090, - 9091, - 9092, - 9093, - 9094, - 9095, - 9096, - 9097, - 9098, - 9099, - 9100, - 9101, - 9102, - 9103, - 9104, - 9105, - 9106, - 9107, - 9108, - 9109, - 9110, - 9111, - 9112, - 9113, - 9114, - 9115, - 9116, - 9117, - 9118, - 9119, - 9120, - 9121, - 9122, - 9123, - 9124, - 9125, - 9126, - 9127, - 9128, - 9129, - 9130, - 9131, - 9132, - 9133, - 9134, - 9135, - 9136, - 9137, - 9138, - 9139, - 9140, - 9141, - 9142, - 9143, - 9144, - 9145, - 9146, - 9147, - 9148, - 9149, - 9150, - 9151, - 9152, - 9153, - 9154, - 9155, - 9156, - 9157, - 9158, - 9159, - 9160, - 9161, - 9162, - 9163, - 9164, - 9165, - 9166, - 9167, - 9168, - 9169, - 9170, - 9171, - 9172, - 9173, - 9174, - 9175, - 9176, - 9177, - 9178, - 9179, - 9180, - 9181, - 9182, - 9183, - 9184, - 9185, - 9186, - 9187, - 9188, - 9189, - 9190, - 9191, - 9192, - 9193, - 9194, - 9195, - 9196, - 9197, - 9198, - 9199, - 9200, - 9201, - 9202, - 9203, - 9204, - 9205, - 9206, - 9207, - 9208, - 9209, - 9210, - 9211, - 9212, - 9213, - 9214, - 9215, - 9216, - 9217, - 9218, - 9219, - 9220, - 9221, - 9222, - 9223, - 9224, - 9225, - 9226, - 9227, - 9228, - 9229, - 9230, - 9231, - 9232, - 9233, - 9234, - 9235, - 9236, - 9237, - 9238, - 9239, - 9240, - 9241, - 9242, - 9243, - 9244, - 9245, - 9246, - 9247, - 9248, - 9249, - 9250, - 9251, - 9252, - 9253, - 9254, - 9255, - 9256, - 9257, - 9258, - 9259, - 9260, - 9261, - 9262, - 9263, - 9264, - 9265, - 9266, - 9267, - 9268, - 9269, - 9270, - 9271, - 9272, - 9273, - 9274, - 9275, - 9276, - 9277, - 9278, - 9279, - 9280, - 9281, - 9282, - 9283, - 9284, - 9285, - 9286, - 9287, - 9288, - 9289, - 9290, - 9291, - 9292, - 9293, - 9294, - 9295, - 9296, - 9297, - 9298, - 9299, - 9300, - 9301, - 9302, - 9303, - 9304, - 9305, - 9306, - 9307, - 9308, - 9309, - 9310, - 9311, - 9312, - 9313, - 9314, - 9315, - 9316, - 9317, - 9318, - 9319, - 9320, - 9321, - 9322, - 9323, - 9324, - 9325, - 9326, - 9327, - 9328, - 9329, - 9330, - 9331, - 9332, - 9333, - 9334, - 9335, - 9336, - 9337, - 9338, - 9339, - 9340, - 9341, - 9342, - 9343, - 9344, - 9345, - 9346, - 9347, - 9348, - 9349, - 9350, - 9351, - 9352, - 9353, - 9354, - 9355, - 9356, - 9357, - 9358, - 9359, - 9360, - 9361, - 9362, - 9363, - 9364, - 9365, - 9366, - 9367, - 9368, - 9369, - 9370, - 9371, - 9372, - 9373, - 9374, - 9375, - 9376, - 9377, - 9378, - 9379, - 9380, - 9381, - 9382, - 9383, - 9384, - 9385, - 9386, - 9387, - 9388, - 9389, - 9390, - 9391, - 9392, - 9393, - 9394, - 9395, - 9396, - 9397, - 9398, - 9399, - 9400, - 9401, - 9402, - 9403, - 9404, - 9405, - 9406, - 9407, - 9408, - 9409, - 9410, - 9411, - 9412, - 9413, - 9414, - 9415, - 9416, - 9417, - 9418, - 9419, - 9420, - 9421, - 9422, - 9423, - 9424, - 9425, - 9426, - 9427, - 9428, - 9429, - 9430, - 9431, - 9432, - 9433, - 9434, - 9435, - 9436, - 9437, - 9438, - 9439, - 9440, - 9441, - 9442, - 9443, - 9444, - 9445, - 9446, - 9447, - 9448, - 9449, - 9450, - 9451, - 9452, - 9453, - 9454, - 9455, - 9456, - 9457, - 9458, - 9459, - 9460, - 9461, - 9462, - 9463, - 9464, - 9465, - 9466, - 9467, - 9468, - 9469, - 9470, - 9471, - 9472, - 9473, - 9474, - 9475, - 9476, - 9477, - 9478, - 9479, - 9480, - 9481, - 9482, - 9483, - 9484, - 9485, - 9486, - 9487, - 9488, - 9489, - 9490, - 9491, - 9492, - 9493, - 9494, - 9495, - 9496, - 9497, - 9498, - 9499, - 9500, - 9501, - 9502, - 9503, - 9504, - 9505, - 9506, - 9507, - 9508, - 9509, - 9510, - 9511, - 9512, - 9513, - 9514, - 9515, - 9516, - 9517, - 9518, - 9519, - 9520, - 9521, - 9522, - 9523, - 9524, - 9525, - 9526, - 9527, - 9528, - 9529, - 9530, - 9531, - 9532, - 9533, - 9534, - 9535, - 9536, - 9537, - 9538, - 9539, - 9540, - 9541, - 9542, - 9543, - 9544, - 9545, - 9546, - 9547, - 9548, - 9549, - 9550, - 9551, - 9552, - 9553, - 9554, - 9555, - 9556, - 9557, - 9558, - 9559, - 9560, - 9561, - 9562, - 9563, - 9564, - 9565, - 9566, - 9567, - 9568, - 9569, - 9570, - 9571, - 9572, - 9573, - 9574, - 9575, - 9576, - 9577, - 9578, - 9579, - 9580, - 9581, - 9582, - 9583, - 9584, - 9585, - 9586, - 9587, - 9588, - 9589, - 9590, - 9591, - 9592, - 9593, - 9594, - 9595, - 9596, - 9597, - 9598, - 9599, - 9600, - 9601, - 9602, - 9603, - 9604, - 9605, - 9606, - 9607, - 9608, - 9609, - 9610, - 9611, - 9612, - 9613, - 9614, - 9615, - 9616, - 9617, - 9618, - 9619, - 9620, - 9621, - 9622, - 9623, - 9624, - 9625, - 9626, - 9627, - 9628, - 9629, - 9630, - 9631, - 9632, - 9633, - 9634, - 9635, - 9636, - 9637, - 9638, - 9639, - 9640, - 9641, - 9642, - 9643, - 9644, - 9645, - 9646, - 9647, - 9648, - 9649, - 9650, - 9651, - 9652, - 9653, - 9654, - 9655, - 9656, - 9657, - 9658, - 9659, - 9660, - 9661, - 9662, - 9663, - 9664, - 9665, - 9666, - 9667, - 9668, - 9669, - 9670, - 9671, - 9672, - 9673, - 9674, - 9675, - 9676, - 9677, - 9678, - 9679, - 9680, - 9681, - 9682, - 9683, - 9684, - 9685, - 9686, - 9687, - 9688, - 9689, - 9690, - 9691, - 9692, - 9693, - 9694, - 9695, - 9696, - 9697, - 9698, - 9699, - 9700, - 9701, - 9702, - 9703, - 9704, - 9705, - 9706, - 9707, - 9708, - 9709, - 9710, - 9711, - 9712, - 9713, - 9714, - 9715, - 9716, - 9717, - 9718, - 9719, - 9720, - 9721, - 9722, - 9723, - 9724, - 9725, - 9726, - 9727, - 9728, - 9729, - 9730, - 9731, - 9732, - 9733, - 9734, - 9735, - 9736, - 9737, - 9738, - 9739, - 9740, - 9741, - 9742, - 9743, - 9744, - 9745, - 9746, - 9747, - 9748, - 9749, - 9750, - 9751, - 9752, - 9753, - 9754, - 9755, - 9756, - 9757, - 9758, - 9759, - 9760, - 9761, - 9762, - 9763, - 9764, - 9765, - 9766, - 9767, - 9768, - 9769, - 9770, - 9771, - 9772, - 9773, - 9774, - 9775, - 9776, - 9777, - 9778, - 9779, - 9780, - 9781, - 9782, - 9783, - 9784, - 9785, - 9786, - 9787, - 9788, - 9789, - 9790, - 9791, - 9792, - 9793, - 9794, - 9795, - 9796, - 9797, - 9798, - 9799, - 9800, - 9801, - 9802, - 9803, - 9804, - 9805, - 9806, - 9807, - 9808, - 9809, - 9810, - 9811, - 9812, - 9813, - 9814, - 9815, - 9816, - 9817, - 9818, - 9819, - 9820, - 9821, - 9822, - 9823, - 9824, - 9825, - 9826, - 9827, - 9828, - 9829, - 9830, - 9831, - 9832, - 9833, - 9834, - 9835, - 9836, - 9837, - 9838, - 9839, - 9840, - 9841, - 9842, - 9843, - 9844, - 9845, - 9846, - 9847, - 9848, - 9849, - 9850, - 9851, - 9852, - 9853, - 9854, - 9855, - 9856, - 9857, - 9858, - 9859, - 9860, - 9861, - 9862, - 9863, - 9864, - 9865, - 9866, - 9867, - 9868, - 9869, - 9870, - 9871, - 9872, - 9873, - 9874, - 9875, - 9876, - 9877, - 9878, - 9879, - 9880, - 9881, - 9882, - 9883, - 9884, - 9885, - 9886, - 9887, - 9888, - 9889, - 9890, - 9891, - 9892, - 9893, - 9894, - 9895, - 9896, - 9897, - 9898, - 9899, - 9900, - 9901, - 9902, - 9903, - 9904, - 9905, - 9906, - 9907, - 9908, - 9909, - 9910, - 9911, - 9912, - 9913, - 9914, - 9915, - 9916, - 9917, - 9918, - 9919, - 9920, - 9921, - 9922, - 9923, - 9924, - 9925, - 9926, - 9927, - 9928, - 9929, - 9930, - 9931, - 9932, - 9933, - 9934, - 9935, - 9936, - 9937, - 9938, - 9939, - 9940, - 9941, - 9942, - 9943, - 9944, - 9945, - 9946, - 9947, - 9948, - 9949, - 9950, - 9951, - 9952, - 9953, - 9954, - 9955, - 9956, - 9957, - 9958, - 9959, - 9960, - 9961, - 9962, - 9963, - 9964, - 9965, - 9966, - 9967, - 9968, - 9969, - 9970, - 9971, - 9972, - 9973, - 9974, - 9975, - 9976, - 9977, - 9978, - 9979, - 9980, - 9981, - 9982, - 9983, - 9984, - 9985, - 9986, - 9987, - 9988, - 9989, - 9990, - 9991, - 9992, - 9993, - 9994, - 9995, - 9996, - 9997, - 9998, - 9999, -}; -const Set stringSet = { - 'foo_0', - 'foo_1', - 'foo_2', - 'foo_3', - 'foo_4', - 'foo_5', - 'foo_6', - 'foo_7', - 'foo_8', - 'foo_9', - 'foo_10', - 'foo_11', - 'foo_12', - 'foo_13', - 'foo_14', - 'foo_15', - 'foo_16', - 'foo_17', - 'foo_18', - 'foo_19', - 'foo_20', - 'foo_21', - 'foo_22', - 'foo_23', - 'foo_24', - 'foo_25', - 'foo_26', - 'foo_27', - 'foo_28', - 'foo_29', - 'foo_30', - 'foo_31', - 'foo_32', - 'foo_33', - 'foo_34', - 'foo_35', - 'foo_36', - 'foo_37', - 'foo_38', - 'foo_39', - 'foo_40', - 'foo_41', - 'foo_42', - 'foo_43', - 'foo_44', - 'foo_45', - 'foo_46', - 'foo_47', - 'foo_48', - 'foo_49', - 'foo_50', - 'foo_51', - 'foo_52', - 'foo_53', - 'foo_54', - 'foo_55', - 'foo_56', - 'foo_57', - 'foo_58', - 'foo_59', - 'foo_60', - 'foo_61', - 'foo_62', - 'foo_63', - 'foo_64', - 'foo_65', - 'foo_66', - 'foo_67', - 'foo_68', - 'foo_69', - 'foo_70', - 'foo_71', - 'foo_72', - 'foo_73', - 'foo_74', - 'foo_75', - 'foo_76', - 'foo_77', - 'foo_78', - 'foo_79', - 'foo_80', - 'foo_81', - 'foo_82', - 'foo_83', - 'foo_84', - 'foo_85', - 'foo_86', - 'foo_87', - 'foo_88', - 'foo_89', - 'foo_90', - 'foo_91', - 'foo_92', - 'foo_93', - 'foo_94', - 'foo_95', - 'foo_96', - 'foo_97', - 'foo_98', - 'foo_99', - 'foo_100', - 'foo_101', - 'foo_102', - 'foo_103', - 'foo_104', - 'foo_105', - 'foo_106', - 'foo_107', - 'foo_108', - 'foo_109', - 'foo_110', - 'foo_111', - 'foo_112', - 'foo_113', - 'foo_114', - 'foo_115', - 'foo_116', - 'foo_117', - 'foo_118', - 'foo_119', - 'foo_120', - 'foo_121', - 'foo_122', - 'foo_123', - 'foo_124', - 'foo_125', - 'foo_126', - 'foo_127', - 'foo_128', - 'foo_129', - 'foo_130', - 'foo_131', - 'foo_132', - 'foo_133', - 'foo_134', - 'foo_135', - 'foo_136', - 'foo_137', - 'foo_138', - 'foo_139', - 'foo_140', - 'foo_141', - 'foo_142', - 'foo_143', - 'foo_144', - 'foo_145', - 'foo_146', - 'foo_147', - 'foo_148', - 'foo_149', - 'foo_150', - 'foo_151', - 'foo_152', - 'foo_153', - 'foo_154', - 'foo_155', - 'foo_156', - 'foo_157', - 'foo_158', - 'foo_159', - 'foo_160', - 'foo_161', - 'foo_162', - 'foo_163', - 'foo_164', - 'foo_165', - 'foo_166', - 'foo_167', - 'foo_168', - 'foo_169', - 'foo_170', - 'foo_171', - 'foo_172', - 'foo_173', - 'foo_174', - 'foo_175', - 'foo_176', - 'foo_177', - 'foo_178', - 'foo_179', - 'foo_180', - 'foo_181', - 'foo_182', - 'foo_183', - 'foo_184', - 'foo_185', - 'foo_186', - 'foo_187', - 'foo_188', - 'foo_189', - 'foo_190', - 'foo_191', - 'foo_192', - 'foo_193', - 'foo_194', - 'foo_195', - 'foo_196', - 'foo_197', - 'foo_198', - 'foo_199', - 'foo_200', - 'foo_201', - 'foo_202', - 'foo_203', - 'foo_204', - 'foo_205', - 'foo_206', - 'foo_207', - 'foo_208', - 'foo_209', - 'foo_210', - 'foo_211', - 'foo_212', - 'foo_213', - 'foo_214', - 'foo_215', - 'foo_216', - 'foo_217', - 'foo_218', - 'foo_219', - 'foo_220', - 'foo_221', - 'foo_222', - 'foo_223', - 'foo_224', - 'foo_225', - 'foo_226', - 'foo_227', - 'foo_228', - 'foo_229', - 'foo_230', - 'foo_231', - 'foo_232', - 'foo_233', - 'foo_234', - 'foo_235', - 'foo_236', - 'foo_237', - 'foo_238', - 'foo_239', - 'foo_240', - 'foo_241', - 'foo_242', - 'foo_243', - 'foo_244', - 'foo_245', - 'foo_246', - 'foo_247', - 'foo_248', - 'foo_249', - 'foo_250', - 'foo_251', - 'foo_252', - 'foo_253', - 'foo_254', - 'foo_255', - 'foo_256', - 'foo_257', - 'foo_258', - 'foo_259', - 'foo_260', - 'foo_261', - 'foo_262', - 'foo_263', - 'foo_264', - 'foo_265', - 'foo_266', - 'foo_267', - 'foo_268', - 'foo_269', - 'foo_270', - 'foo_271', - 'foo_272', - 'foo_273', - 'foo_274', - 'foo_275', - 'foo_276', - 'foo_277', - 'foo_278', - 'foo_279', - 'foo_280', - 'foo_281', - 'foo_282', - 'foo_283', - 'foo_284', - 'foo_285', - 'foo_286', - 'foo_287', - 'foo_288', - 'foo_289', - 'foo_290', - 'foo_291', - 'foo_292', - 'foo_293', - 'foo_294', - 'foo_295', - 'foo_296', - 'foo_297', - 'foo_298', - 'foo_299', - 'foo_300', - 'foo_301', - 'foo_302', - 'foo_303', - 'foo_304', - 'foo_305', - 'foo_306', - 'foo_307', - 'foo_308', - 'foo_309', - 'foo_310', - 'foo_311', - 'foo_312', - 'foo_313', - 'foo_314', - 'foo_315', - 'foo_316', - 'foo_317', - 'foo_318', - 'foo_319', - 'foo_320', - 'foo_321', - 'foo_322', - 'foo_323', - 'foo_324', - 'foo_325', - 'foo_326', - 'foo_327', - 'foo_328', - 'foo_329', - 'foo_330', - 'foo_331', - 'foo_332', - 'foo_333', - 'foo_334', - 'foo_335', - 'foo_336', - 'foo_337', - 'foo_338', - 'foo_339', - 'foo_340', - 'foo_341', - 'foo_342', - 'foo_343', - 'foo_344', - 'foo_345', - 'foo_346', - 'foo_347', - 'foo_348', - 'foo_349', - 'foo_350', - 'foo_351', - 'foo_352', - 'foo_353', - 'foo_354', - 'foo_355', - 'foo_356', - 'foo_357', - 'foo_358', - 'foo_359', - 'foo_360', - 'foo_361', - 'foo_362', - 'foo_363', - 'foo_364', - 'foo_365', - 'foo_366', - 'foo_367', - 'foo_368', - 'foo_369', - 'foo_370', - 'foo_371', - 'foo_372', - 'foo_373', - 'foo_374', - 'foo_375', - 'foo_376', - 'foo_377', - 'foo_378', - 'foo_379', - 'foo_380', - 'foo_381', - 'foo_382', - 'foo_383', - 'foo_384', - 'foo_385', - 'foo_386', - 'foo_387', - 'foo_388', - 'foo_389', - 'foo_390', - 'foo_391', - 'foo_392', - 'foo_393', - 'foo_394', - 'foo_395', - 'foo_396', - 'foo_397', - 'foo_398', - 'foo_399', - 'foo_400', - 'foo_401', - 'foo_402', - 'foo_403', - 'foo_404', - 'foo_405', - 'foo_406', - 'foo_407', - 'foo_408', - 'foo_409', - 'foo_410', - 'foo_411', - 'foo_412', - 'foo_413', - 'foo_414', - 'foo_415', - 'foo_416', - 'foo_417', - 'foo_418', - 'foo_419', - 'foo_420', - 'foo_421', - 'foo_422', - 'foo_423', - 'foo_424', - 'foo_425', - 'foo_426', - 'foo_427', - 'foo_428', - 'foo_429', - 'foo_430', - 'foo_431', - 'foo_432', - 'foo_433', - 'foo_434', - 'foo_435', - 'foo_436', - 'foo_437', - 'foo_438', - 'foo_439', - 'foo_440', - 'foo_441', - 'foo_442', - 'foo_443', - 'foo_444', - 'foo_445', - 'foo_446', - 'foo_447', - 'foo_448', - 'foo_449', - 'foo_450', - 'foo_451', - 'foo_452', - 'foo_453', - 'foo_454', - 'foo_455', - 'foo_456', - 'foo_457', - 'foo_458', - 'foo_459', - 'foo_460', - 'foo_461', - 'foo_462', - 'foo_463', - 'foo_464', - 'foo_465', - 'foo_466', - 'foo_467', - 'foo_468', - 'foo_469', - 'foo_470', - 'foo_471', - 'foo_472', - 'foo_473', - 'foo_474', - 'foo_475', - 'foo_476', - 'foo_477', - 'foo_478', - 'foo_479', - 'foo_480', - 'foo_481', - 'foo_482', - 'foo_483', - 'foo_484', - 'foo_485', - 'foo_486', - 'foo_487', - 'foo_488', - 'foo_489', - 'foo_490', - 'foo_491', - 'foo_492', - 'foo_493', - 'foo_494', - 'foo_495', - 'foo_496', - 'foo_497', - 'foo_498', - 'foo_499', - 'foo_500', - 'foo_501', - 'foo_502', - 'foo_503', - 'foo_504', - 'foo_505', - 'foo_506', - 'foo_507', - 'foo_508', - 'foo_509', - 'foo_510', - 'foo_511', - 'foo_512', - 'foo_513', - 'foo_514', - 'foo_515', - 'foo_516', - 'foo_517', - 'foo_518', - 'foo_519', - 'foo_520', - 'foo_521', - 'foo_522', - 'foo_523', - 'foo_524', - 'foo_525', - 'foo_526', - 'foo_527', - 'foo_528', - 'foo_529', - 'foo_530', - 'foo_531', - 'foo_532', - 'foo_533', - 'foo_534', - 'foo_535', - 'foo_536', - 'foo_537', - 'foo_538', - 'foo_539', - 'foo_540', - 'foo_541', - 'foo_542', - 'foo_543', - 'foo_544', - 'foo_545', - 'foo_546', - 'foo_547', - 'foo_548', - 'foo_549', - 'foo_550', - 'foo_551', - 'foo_552', - 'foo_553', - 'foo_554', - 'foo_555', - 'foo_556', - 'foo_557', - 'foo_558', - 'foo_559', - 'foo_560', - 'foo_561', - 'foo_562', - 'foo_563', - 'foo_564', - 'foo_565', - 'foo_566', - 'foo_567', - 'foo_568', - 'foo_569', - 'foo_570', - 'foo_571', - 'foo_572', - 'foo_573', - 'foo_574', - 'foo_575', - 'foo_576', - 'foo_577', - 'foo_578', - 'foo_579', - 'foo_580', - 'foo_581', - 'foo_582', - 'foo_583', - 'foo_584', - 'foo_585', - 'foo_586', - 'foo_587', - 'foo_588', - 'foo_589', - 'foo_590', - 'foo_591', - 'foo_592', - 'foo_593', - 'foo_594', - 'foo_595', - 'foo_596', - 'foo_597', - 'foo_598', - 'foo_599', - 'foo_600', - 'foo_601', - 'foo_602', - 'foo_603', - 'foo_604', - 'foo_605', - 'foo_606', - 'foo_607', - 'foo_608', - 'foo_609', - 'foo_610', - 'foo_611', - 'foo_612', - 'foo_613', - 'foo_614', - 'foo_615', - 'foo_616', - 'foo_617', - 'foo_618', - 'foo_619', - 'foo_620', - 'foo_621', - 'foo_622', - 'foo_623', - 'foo_624', - 'foo_625', - 'foo_626', - 'foo_627', - 'foo_628', - 'foo_629', - 'foo_630', - 'foo_631', - 'foo_632', - 'foo_633', - 'foo_634', - 'foo_635', - 'foo_636', - 'foo_637', - 'foo_638', - 'foo_639', - 'foo_640', - 'foo_641', - 'foo_642', - 'foo_643', - 'foo_644', - 'foo_645', - 'foo_646', - 'foo_647', - 'foo_648', - 'foo_649', - 'foo_650', - 'foo_651', - 'foo_652', - 'foo_653', - 'foo_654', - 'foo_655', - 'foo_656', - 'foo_657', - 'foo_658', - 'foo_659', - 'foo_660', - 'foo_661', - 'foo_662', - 'foo_663', - 'foo_664', - 'foo_665', - 'foo_666', - 'foo_667', - 'foo_668', - 'foo_669', - 'foo_670', - 'foo_671', - 'foo_672', - 'foo_673', - 'foo_674', - 'foo_675', - 'foo_676', - 'foo_677', - 'foo_678', - 'foo_679', - 'foo_680', - 'foo_681', - 'foo_682', - 'foo_683', - 'foo_684', - 'foo_685', - 'foo_686', - 'foo_687', - 'foo_688', - 'foo_689', - 'foo_690', - 'foo_691', - 'foo_692', - 'foo_693', - 'foo_694', - 'foo_695', - 'foo_696', - 'foo_697', - 'foo_698', - 'foo_699', - 'foo_700', - 'foo_701', - 'foo_702', - 'foo_703', - 'foo_704', - 'foo_705', - 'foo_706', - 'foo_707', - 'foo_708', - 'foo_709', - 'foo_710', - 'foo_711', - 'foo_712', - 'foo_713', - 'foo_714', - 'foo_715', - 'foo_716', - 'foo_717', - 'foo_718', - 'foo_719', - 'foo_720', - 'foo_721', - 'foo_722', - 'foo_723', - 'foo_724', - 'foo_725', - 'foo_726', - 'foo_727', - 'foo_728', - 'foo_729', - 'foo_730', - 'foo_731', - 'foo_732', - 'foo_733', - 'foo_734', - 'foo_735', - 'foo_736', - 'foo_737', - 'foo_738', - 'foo_739', - 'foo_740', - 'foo_741', - 'foo_742', - 'foo_743', - 'foo_744', - 'foo_745', - 'foo_746', - 'foo_747', - 'foo_748', - 'foo_749', - 'foo_750', - 'foo_751', - 'foo_752', - 'foo_753', - 'foo_754', - 'foo_755', - 'foo_756', - 'foo_757', - 'foo_758', - 'foo_759', - 'foo_760', - 'foo_761', - 'foo_762', - 'foo_763', - 'foo_764', - 'foo_765', - 'foo_766', - 'foo_767', - 'foo_768', - 'foo_769', - 'foo_770', - 'foo_771', - 'foo_772', - 'foo_773', - 'foo_774', - 'foo_775', - 'foo_776', - 'foo_777', - 'foo_778', - 'foo_779', - 'foo_780', - 'foo_781', - 'foo_782', - 'foo_783', - 'foo_784', - 'foo_785', - 'foo_786', - 'foo_787', - 'foo_788', - 'foo_789', - 'foo_790', - 'foo_791', - 'foo_792', - 'foo_793', - 'foo_794', - 'foo_795', - 'foo_796', - 'foo_797', - 'foo_798', - 'foo_799', - 'foo_800', - 'foo_801', - 'foo_802', - 'foo_803', - 'foo_804', - 'foo_805', - 'foo_806', - 'foo_807', - 'foo_808', - 'foo_809', - 'foo_810', - 'foo_811', - 'foo_812', - 'foo_813', - 'foo_814', - 'foo_815', - 'foo_816', - 'foo_817', - 'foo_818', - 'foo_819', - 'foo_820', - 'foo_821', - 'foo_822', - 'foo_823', - 'foo_824', - 'foo_825', - 'foo_826', - 'foo_827', - 'foo_828', - 'foo_829', - 'foo_830', - 'foo_831', - 'foo_832', - 'foo_833', - 'foo_834', - 'foo_835', - 'foo_836', - 'foo_837', - 'foo_838', - 'foo_839', - 'foo_840', - 'foo_841', - 'foo_842', - 'foo_843', - 'foo_844', - 'foo_845', - 'foo_846', - 'foo_847', - 'foo_848', - 'foo_849', - 'foo_850', - 'foo_851', - 'foo_852', - 'foo_853', - 'foo_854', - 'foo_855', - 'foo_856', - 'foo_857', - 'foo_858', - 'foo_859', - 'foo_860', - 'foo_861', - 'foo_862', - 'foo_863', - 'foo_864', - 'foo_865', - 'foo_866', - 'foo_867', - 'foo_868', - 'foo_869', - 'foo_870', - 'foo_871', - 'foo_872', - 'foo_873', - 'foo_874', - 'foo_875', - 'foo_876', - 'foo_877', - 'foo_878', - 'foo_879', - 'foo_880', - 'foo_881', - 'foo_882', - 'foo_883', - 'foo_884', - 'foo_885', - 'foo_886', - 'foo_887', - 'foo_888', - 'foo_889', - 'foo_890', - 'foo_891', - 'foo_892', - 'foo_893', - 'foo_894', - 'foo_895', - 'foo_896', - 'foo_897', - 'foo_898', - 'foo_899', - 'foo_900', - 'foo_901', - 'foo_902', - 'foo_903', - 'foo_904', - 'foo_905', - 'foo_906', - 'foo_907', - 'foo_908', - 'foo_909', - 'foo_910', - 'foo_911', - 'foo_912', - 'foo_913', - 'foo_914', - 'foo_915', - 'foo_916', - 'foo_917', - 'foo_918', - 'foo_919', - 'foo_920', - 'foo_921', - 'foo_922', - 'foo_923', - 'foo_924', - 'foo_925', - 'foo_926', - 'foo_927', - 'foo_928', - 'foo_929', - 'foo_930', - 'foo_931', - 'foo_932', - 'foo_933', - 'foo_934', - 'foo_935', - 'foo_936', - 'foo_937', - 'foo_938', - 'foo_939', - 'foo_940', - 'foo_941', - 'foo_942', - 'foo_943', - 'foo_944', - 'foo_945', - 'foo_946', - 'foo_947', - 'foo_948', - 'foo_949', - 'foo_950', - 'foo_951', - 'foo_952', - 'foo_953', - 'foo_954', - 'foo_955', - 'foo_956', - 'foo_957', - 'foo_958', - 'foo_959', - 'foo_960', - 'foo_961', - 'foo_962', - 'foo_963', - 'foo_964', - 'foo_965', - 'foo_966', - 'foo_967', - 'foo_968', - 'foo_969', - 'foo_970', - 'foo_971', - 'foo_972', - 'foo_973', - 'foo_974', - 'foo_975', - 'foo_976', - 'foo_977', - 'foo_978', - 'foo_979', - 'foo_980', - 'foo_981', - 'foo_982', - 'foo_983', - 'foo_984', - 'foo_985', - 'foo_986', - 'foo_987', - 'foo_988', - 'foo_989', - 'foo_990', - 'foo_991', - 'foo_992', - 'foo_993', - 'foo_994', - 'foo_995', - 'foo_996', - 'foo_997', - 'foo_998', - 'foo_999', - 'foo_1000', - 'foo_1001', - 'foo_1002', - 'foo_1003', - 'foo_1004', - 'foo_1005', - 'foo_1006', - 'foo_1007', - 'foo_1008', - 'foo_1009', - 'foo_1010', - 'foo_1011', - 'foo_1012', - 'foo_1013', - 'foo_1014', - 'foo_1015', - 'foo_1016', - 'foo_1017', - 'foo_1018', - 'foo_1019', - 'foo_1020', - 'foo_1021', - 'foo_1022', - 'foo_1023', - 'foo_1024', - 'foo_1025', - 'foo_1026', - 'foo_1027', - 'foo_1028', - 'foo_1029', - 'foo_1030', - 'foo_1031', - 'foo_1032', - 'foo_1033', - 'foo_1034', - 'foo_1035', - 'foo_1036', - 'foo_1037', - 'foo_1038', - 'foo_1039', - 'foo_1040', - 'foo_1041', - 'foo_1042', - 'foo_1043', - 'foo_1044', - 'foo_1045', - 'foo_1046', - 'foo_1047', - 'foo_1048', - 'foo_1049', - 'foo_1050', - 'foo_1051', - 'foo_1052', - 'foo_1053', - 'foo_1054', - 'foo_1055', - 'foo_1056', - 'foo_1057', - 'foo_1058', - 'foo_1059', - 'foo_1060', - 'foo_1061', - 'foo_1062', - 'foo_1063', - 'foo_1064', - 'foo_1065', - 'foo_1066', - 'foo_1067', - 'foo_1068', - 'foo_1069', - 'foo_1070', - 'foo_1071', - 'foo_1072', - 'foo_1073', - 'foo_1074', - 'foo_1075', - 'foo_1076', - 'foo_1077', - 'foo_1078', - 'foo_1079', - 'foo_1080', - 'foo_1081', - 'foo_1082', - 'foo_1083', - 'foo_1084', - 'foo_1085', - 'foo_1086', - 'foo_1087', - 'foo_1088', - 'foo_1089', - 'foo_1090', - 'foo_1091', - 'foo_1092', - 'foo_1093', - 'foo_1094', - 'foo_1095', - 'foo_1096', - 'foo_1097', - 'foo_1098', - 'foo_1099', - 'foo_1100', - 'foo_1101', - 'foo_1102', - 'foo_1103', - 'foo_1104', - 'foo_1105', - 'foo_1106', - 'foo_1107', - 'foo_1108', - 'foo_1109', - 'foo_1110', - 'foo_1111', - 'foo_1112', - 'foo_1113', - 'foo_1114', - 'foo_1115', - 'foo_1116', - 'foo_1117', - 'foo_1118', - 'foo_1119', - 'foo_1120', - 'foo_1121', - 'foo_1122', - 'foo_1123', - 'foo_1124', - 'foo_1125', - 'foo_1126', - 'foo_1127', - 'foo_1128', - 'foo_1129', - 'foo_1130', - 'foo_1131', - 'foo_1132', - 'foo_1133', - 'foo_1134', - 'foo_1135', - 'foo_1136', - 'foo_1137', - 'foo_1138', - 'foo_1139', - 'foo_1140', - 'foo_1141', - 'foo_1142', - 'foo_1143', - 'foo_1144', - 'foo_1145', - 'foo_1146', - 'foo_1147', - 'foo_1148', - 'foo_1149', - 'foo_1150', - 'foo_1151', - 'foo_1152', - 'foo_1153', - 'foo_1154', - 'foo_1155', - 'foo_1156', - 'foo_1157', - 'foo_1158', - 'foo_1159', - 'foo_1160', - 'foo_1161', - 'foo_1162', - 'foo_1163', - 'foo_1164', - 'foo_1165', - 'foo_1166', - 'foo_1167', - 'foo_1168', - 'foo_1169', - 'foo_1170', - 'foo_1171', - 'foo_1172', - 'foo_1173', - 'foo_1174', - 'foo_1175', - 'foo_1176', - 'foo_1177', - 'foo_1178', - 'foo_1179', - 'foo_1180', - 'foo_1181', - 'foo_1182', - 'foo_1183', - 'foo_1184', - 'foo_1185', - 'foo_1186', - 'foo_1187', - 'foo_1188', - 'foo_1189', - 'foo_1190', - 'foo_1191', - 'foo_1192', - 'foo_1193', - 'foo_1194', - 'foo_1195', - 'foo_1196', - 'foo_1197', - 'foo_1198', - 'foo_1199', - 'foo_1200', - 'foo_1201', - 'foo_1202', - 'foo_1203', - 'foo_1204', - 'foo_1205', - 'foo_1206', - 'foo_1207', - 'foo_1208', - 'foo_1209', - 'foo_1210', - 'foo_1211', - 'foo_1212', - 'foo_1213', - 'foo_1214', - 'foo_1215', - 'foo_1216', - 'foo_1217', - 'foo_1218', - 'foo_1219', - 'foo_1220', - 'foo_1221', - 'foo_1222', - 'foo_1223', - 'foo_1224', - 'foo_1225', - 'foo_1226', - 'foo_1227', - 'foo_1228', - 'foo_1229', - 'foo_1230', - 'foo_1231', - 'foo_1232', - 'foo_1233', - 'foo_1234', - 'foo_1235', - 'foo_1236', - 'foo_1237', - 'foo_1238', - 'foo_1239', - 'foo_1240', - 'foo_1241', - 'foo_1242', - 'foo_1243', - 'foo_1244', - 'foo_1245', - 'foo_1246', - 'foo_1247', - 'foo_1248', - 'foo_1249', - 'foo_1250', - 'foo_1251', - 'foo_1252', - 'foo_1253', - 'foo_1254', - 'foo_1255', - 'foo_1256', - 'foo_1257', - 'foo_1258', - 'foo_1259', - 'foo_1260', - 'foo_1261', - 'foo_1262', - 'foo_1263', - 'foo_1264', - 'foo_1265', - 'foo_1266', - 'foo_1267', - 'foo_1268', - 'foo_1269', - 'foo_1270', - 'foo_1271', - 'foo_1272', - 'foo_1273', - 'foo_1274', - 'foo_1275', - 'foo_1276', - 'foo_1277', - 'foo_1278', - 'foo_1279', - 'foo_1280', - 'foo_1281', - 'foo_1282', - 'foo_1283', - 'foo_1284', - 'foo_1285', - 'foo_1286', - 'foo_1287', - 'foo_1288', - 'foo_1289', - 'foo_1290', - 'foo_1291', - 'foo_1292', - 'foo_1293', - 'foo_1294', - 'foo_1295', - 'foo_1296', - 'foo_1297', - 'foo_1298', - 'foo_1299', - 'foo_1300', - 'foo_1301', - 'foo_1302', - 'foo_1303', - 'foo_1304', - 'foo_1305', - 'foo_1306', - 'foo_1307', - 'foo_1308', - 'foo_1309', - 'foo_1310', - 'foo_1311', - 'foo_1312', - 'foo_1313', - 'foo_1314', - 'foo_1315', - 'foo_1316', - 'foo_1317', - 'foo_1318', - 'foo_1319', - 'foo_1320', - 'foo_1321', - 'foo_1322', - 'foo_1323', - 'foo_1324', - 'foo_1325', - 'foo_1326', - 'foo_1327', - 'foo_1328', - 'foo_1329', - 'foo_1330', - 'foo_1331', - 'foo_1332', - 'foo_1333', - 'foo_1334', - 'foo_1335', - 'foo_1336', - 'foo_1337', - 'foo_1338', - 'foo_1339', - 'foo_1340', - 'foo_1341', - 'foo_1342', - 'foo_1343', - 'foo_1344', - 'foo_1345', - 'foo_1346', - 'foo_1347', - 'foo_1348', - 'foo_1349', - 'foo_1350', - 'foo_1351', - 'foo_1352', - 'foo_1353', - 'foo_1354', - 'foo_1355', - 'foo_1356', - 'foo_1357', - 'foo_1358', - 'foo_1359', - 'foo_1360', - 'foo_1361', - 'foo_1362', - 'foo_1363', - 'foo_1364', - 'foo_1365', - 'foo_1366', - 'foo_1367', - 'foo_1368', - 'foo_1369', - 'foo_1370', - 'foo_1371', - 'foo_1372', - 'foo_1373', - 'foo_1374', - 'foo_1375', - 'foo_1376', - 'foo_1377', - 'foo_1378', - 'foo_1379', - 'foo_1380', - 'foo_1381', - 'foo_1382', - 'foo_1383', - 'foo_1384', - 'foo_1385', - 'foo_1386', - 'foo_1387', - 'foo_1388', - 'foo_1389', - 'foo_1390', - 'foo_1391', - 'foo_1392', - 'foo_1393', - 'foo_1394', - 'foo_1395', - 'foo_1396', - 'foo_1397', - 'foo_1398', - 'foo_1399', - 'foo_1400', - 'foo_1401', - 'foo_1402', - 'foo_1403', - 'foo_1404', - 'foo_1405', - 'foo_1406', - 'foo_1407', - 'foo_1408', - 'foo_1409', - 'foo_1410', - 'foo_1411', - 'foo_1412', - 'foo_1413', - 'foo_1414', - 'foo_1415', - 'foo_1416', - 'foo_1417', - 'foo_1418', - 'foo_1419', - 'foo_1420', - 'foo_1421', - 'foo_1422', - 'foo_1423', - 'foo_1424', - 'foo_1425', - 'foo_1426', - 'foo_1427', - 'foo_1428', - 'foo_1429', - 'foo_1430', - 'foo_1431', - 'foo_1432', - 'foo_1433', - 'foo_1434', - 'foo_1435', - 'foo_1436', - 'foo_1437', - 'foo_1438', - 'foo_1439', - 'foo_1440', - 'foo_1441', - 'foo_1442', - 'foo_1443', - 'foo_1444', - 'foo_1445', - 'foo_1446', - 'foo_1447', - 'foo_1448', - 'foo_1449', - 'foo_1450', - 'foo_1451', - 'foo_1452', - 'foo_1453', - 'foo_1454', - 'foo_1455', - 'foo_1456', - 'foo_1457', - 'foo_1458', - 'foo_1459', - 'foo_1460', - 'foo_1461', - 'foo_1462', - 'foo_1463', - 'foo_1464', - 'foo_1465', - 'foo_1466', - 'foo_1467', - 'foo_1468', - 'foo_1469', - 'foo_1470', - 'foo_1471', - 'foo_1472', - 'foo_1473', - 'foo_1474', - 'foo_1475', - 'foo_1476', - 'foo_1477', - 'foo_1478', - 'foo_1479', - 'foo_1480', - 'foo_1481', - 'foo_1482', - 'foo_1483', - 'foo_1484', - 'foo_1485', - 'foo_1486', - 'foo_1487', - 'foo_1488', - 'foo_1489', - 'foo_1490', - 'foo_1491', - 'foo_1492', - 'foo_1493', - 'foo_1494', - 'foo_1495', - 'foo_1496', - 'foo_1497', - 'foo_1498', - 'foo_1499', - 'foo_1500', - 'foo_1501', - 'foo_1502', - 'foo_1503', - 'foo_1504', - 'foo_1505', - 'foo_1506', - 'foo_1507', - 'foo_1508', - 'foo_1509', - 'foo_1510', - 'foo_1511', - 'foo_1512', - 'foo_1513', - 'foo_1514', - 'foo_1515', - 'foo_1516', - 'foo_1517', - 'foo_1518', - 'foo_1519', - 'foo_1520', - 'foo_1521', - 'foo_1522', - 'foo_1523', - 'foo_1524', - 'foo_1525', - 'foo_1526', - 'foo_1527', - 'foo_1528', - 'foo_1529', - 'foo_1530', - 'foo_1531', - 'foo_1532', - 'foo_1533', - 'foo_1534', - 'foo_1535', - 'foo_1536', - 'foo_1537', - 'foo_1538', - 'foo_1539', - 'foo_1540', - 'foo_1541', - 'foo_1542', - 'foo_1543', - 'foo_1544', - 'foo_1545', - 'foo_1546', - 'foo_1547', - 'foo_1548', - 'foo_1549', - 'foo_1550', - 'foo_1551', - 'foo_1552', - 'foo_1553', - 'foo_1554', - 'foo_1555', - 'foo_1556', - 'foo_1557', - 'foo_1558', - 'foo_1559', - 'foo_1560', - 'foo_1561', - 'foo_1562', - 'foo_1563', - 'foo_1564', - 'foo_1565', - 'foo_1566', - 'foo_1567', - 'foo_1568', - 'foo_1569', - 'foo_1570', - 'foo_1571', - 'foo_1572', - 'foo_1573', - 'foo_1574', - 'foo_1575', - 'foo_1576', - 'foo_1577', - 'foo_1578', - 'foo_1579', - 'foo_1580', - 'foo_1581', - 'foo_1582', - 'foo_1583', - 'foo_1584', - 'foo_1585', - 'foo_1586', - 'foo_1587', - 'foo_1588', - 'foo_1589', - 'foo_1590', - 'foo_1591', - 'foo_1592', - 'foo_1593', - 'foo_1594', - 'foo_1595', - 'foo_1596', - 'foo_1597', - 'foo_1598', - 'foo_1599', - 'foo_1600', - 'foo_1601', - 'foo_1602', - 'foo_1603', - 'foo_1604', - 'foo_1605', - 'foo_1606', - 'foo_1607', - 'foo_1608', - 'foo_1609', - 'foo_1610', - 'foo_1611', - 'foo_1612', - 'foo_1613', - 'foo_1614', - 'foo_1615', - 'foo_1616', - 'foo_1617', - 'foo_1618', - 'foo_1619', - 'foo_1620', - 'foo_1621', - 'foo_1622', - 'foo_1623', - 'foo_1624', - 'foo_1625', - 'foo_1626', - 'foo_1627', - 'foo_1628', - 'foo_1629', - 'foo_1630', - 'foo_1631', - 'foo_1632', - 'foo_1633', - 'foo_1634', - 'foo_1635', - 'foo_1636', - 'foo_1637', - 'foo_1638', - 'foo_1639', - 'foo_1640', - 'foo_1641', - 'foo_1642', - 'foo_1643', - 'foo_1644', - 'foo_1645', - 'foo_1646', - 'foo_1647', - 'foo_1648', - 'foo_1649', - 'foo_1650', - 'foo_1651', - 'foo_1652', - 'foo_1653', - 'foo_1654', - 'foo_1655', - 'foo_1656', - 'foo_1657', - 'foo_1658', - 'foo_1659', - 'foo_1660', - 'foo_1661', - 'foo_1662', - 'foo_1663', - 'foo_1664', - 'foo_1665', - 'foo_1666', - 'foo_1667', - 'foo_1668', - 'foo_1669', - 'foo_1670', - 'foo_1671', - 'foo_1672', - 'foo_1673', - 'foo_1674', - 'foo_1675', - 'foo_1676', - 'foo_1677', - 'foo_1678', - 'foo_1679', - 'foo_1680', - 'foo_1681', - 'foo_1682', - 'foo_1683', - 'foo_1684', - 'foo_1685', - 'foo_1686', - 'foo_1687', - 'foo_1688', - 'foo_1689', - 'foo_1690', - 'foo_1691', - 'foo_1692', - 'foo_1693', - 'foo_1694', - 'foo_1695', - 'foo_1696', - 'foo_1697', - 'foo_1698', - 'foo_1699', - 'foo_1700', - 'foo_1701', - 'foo_1702', - 'foo_1703', - 'foo_1704', - 'foo_1705', - 'foo_1706', - 'foo_1707', - 'foo_1708', - 'foo_1709', - 'foo_1710', - 'foo_1711', - 'foo_1712', - 'foo_1713', - 'foo_1714', - 'foo_1715', - 'foo_1716', - 'foo_1717', - 'foo_1718', - 'foo_1719', - 'foo_1720', - 'foo_1721', - 'foo_1722', - 'foo_1723', - 'foo_1724', - 'foo_1725', - 'foo_1726', - 'foo_1727', - 'foo_1728', - 'foo_1729', - 'foo_1730', - 'foo_1731', - 'foo_1732', - 'foo_1733', - 'foo_1734', - 'foo_1735', - 'foo_1736', - 'foo_1737', - 'foo_1738', - 'foo_1739', - 'foo_1740', - 'foo_1741', - 'foo_1742', - 'foo_1743', - 'foo_1744', - 'foo_1745', - 'foo_1746', - 'foo_1747', - 'foo_1748', - 'foo_1749', - 'foo_1750', - 'foo_1751', - 'foo_1752', - 'foo_1753', - 'foo_1754', - 'foo_1755', - 'foo_1756', - 'foo_1757', - 'foo_1758', - 'foo_1759', - 'foo_1760', - 'foo_1761', - 'foo_1762', - 'foo_1763', - 'foo_1764', - 'foo_1765', - 'foo_1766', - 'foo_1767', - 'foo_1768', - 'foo_1769', - 'foo_1770', - 'foo_1771', - 'foo_1772', - 'foo_1773', - 'foo_1774', - 'foo_1775', - 'foo_1776', - 'foo_1777', - 'foo_1778', - 'foo_1779', - 'foo_1780', - 'foo_1781', - 'foo_1782', - 'foo_1783', - 'foo_1784', - 'foo_1785', - 'foo_1786', - 'foo_1787', - 'foo_1788', - 'foo_1789', - 'foo_1790', - 'foo_1791', - 'foo_1792', - 'foo_1793', - 'foo_1794', - 'foo_1795', - 'foo_1796', - 'foo_1797', - 'foo_1798', - 'foo_1799', - 'foo_1800', - 'foo_1801', - 'foo_1802', - 'foo_1803', - 'foo_1804', - 'foo_1805', - 'foo_1806', - 'foo_1807', - 'foo_1808', - 'foo_1809', - 'foo_1810', - 'foo_1811', - 'foo_1812', - 'foo_1813', - 'foo_1814', - 'foo_1815', - 'foo_1816', - 'foo_1817', - 'foo_1818', - 'foo_1819', - 'foo_1820', - 'foo_1821', - 'foo_1822', - 'foo_1823', - 'foo_1824', - 'foo_1825', - 'foo_1826', - 'foo_1827', - 'foo_1828', - 'foo_1829', - 'foo_1830', - 'foo_1831', - 'foo_1832', - 'foo_1833', - 'foo_1834', - 'foo_1835', - 'foo_1836', - 'foo_1837', - 'foo_1838', - 'foo_1839', - 'foo_1840', - 'foo_1841', - 'foo_1842', - 'foo_1843', - 'foo_1844', - 'foo_1845', - 'foo_1846', - 'foo_1847', - 'foo_1848', - 'foo_1849', - 'foo_1850', - 'foo_1851', - 'foo_1852', - 'foo_1853', - 'foo_1854', - 'foo_1855', - 'foo_1856', - 'foo_1857', - 'foo_1858', - 'foo_1859', - 'foo_1860', - 'foo_1861', - 'foo_1862', - 'foo_1863', - 'foo_1864', - 'foo_1865', - 'foo_1866', - 'foo_1867', - 'foo_1868', - 'foo_1869', - 'foo_1870', - 'foo_1871', - 'foo_1872', - 'foo_1873', - 'foo_1874', - 'foo_1875', - 'foo_1876', - 'foo_1877', - 'foo_1878', - 'foo_1879', - 'foo_1880', - 'foo_1881', - 'foo_1882', - 'foo_1883', - 'foo_1884', - 'foo_1885', - 'foo_1886', - 'foo_1887', - 'foo_1888', - 'foo_1889', - 'foo_1890', - 'foo_1891', - 'foo_1892', - 'foo_1893', - 'foo_1894', - 'foo_1895', - 'foo_1896', - 'foo_1897', - 'foo_1898', - 'foo_1899', - 'foo_1900', - 'foo_1901', - 'foo_1902', - 'foo_1903', - 'foo_1904', - 'foo_1905', - 'foo_1906', - 'foo_1907', - 'foo_1908', - 'foo_1909', - 'foo_1910', - 'foo_1911', - 'foo_1912', - 'foo_1913', - 'foo_1914', - 'foo_1915', - 'foo_1916', - 'foo_1917', - 'foo_1918', - 'foo_1919', - 'foo_1920', - 'foo_1921', - 'foo_1922', - 'foo_1923', - 'foo_1924', - 'foo_1925', - 'foo_1926', - 'foo_1927', - 'foo_1928', - 'foo_1929', - 'foo_1930', - 'foo_1931', - 'foo_1932', - 'foo_1933', - 'foo_1934', - 'foo_1935', - 'foo_1936', - 'foo_1937', - 'foo_1938', - 'foo_1939', - 'foo_1940', - 'foo_1941', - 'foo_1942', - 'foo_1943', - 'foo_1944', - 'foo_1945', - 'foo_1946', - 'foo_1947', - 'foo_1948', - 'foo_1949', - 'foo_1950', - 'foo_1951', - 'foo_1952', - 'foo_1953', - 'foo_1954', - 'foo_1955', - 'foo_1956', - 'foo_1957', - 'foo_1958', - 'foo_1959', - 'foo_1960', - 'foo_1961', - 'foo_1962', - 'foo_1963', - 'foo_1964', - 'foo_1965', - 'foo_1966', - 'foo_1967', - 'foo_1968', - 'foo_1969', - 'foo_1970', - 'foo_1971', - 'foo_1972', - 'foo_1973', - 'foo_1974', - 'foo_1975', - 'foo_1976', - 'foo_1977', - 'foo_1978', - 'foo_1979', - 'foo_1980', - 'foo_1981', - 'foo_1982', - 'foo_1983', - 'foo_1984', - 'foo_1985', - 'foo_1986', - 'foo_1987', - 'foo_1988', - 'foo_1989', - 'foo_1990', - 'foo_1991', - 'foo_1992', - 'foo_1993', - 'foo_1994', - 'foo_1995', - 'foo_1996', - 'foo_1997', - 'foo_1998', - 'foo_1999', - 'foo_2000', - 'foo_2001', - 'foo_2002', - 'foo_2003', - 'foo_2004', - 'foo_2005', - 'foo_2006', - 'foo_2007', - 'foo_2008', - 'foo_2009', - 'foo_2010', - 'foo_2011', - 'foo_2012', - 'foo_2013', - 'foo_2014', - 'foo_2015', - 'foo_2016', - 'foo_2017', - 'foo_2018', - 'foo_2019', - 'foo_2020', - 'foo_2021', - 'foo_2022', - 'foo_2023', - 'foo_2024', - 'foo_2025', - 'foo_2026', - 'foo_2027', - 'foo_2028', - 'foo_2029', - 'foo_2030', - 'foo_2031', - 'foo_2032', - 'foo_2033', - 'foo_2034', - 'foo_2035', - 'foo_2036', - 'foo_2037', - 'foo_2038', - 'foo_2039', - 'foo_2040', - 'foo_2041', - 'foo_2042', - 'foo_2043', - 'foo_2044', - 'foo_2045', - 'foo_2046', - 'foo_2047', - 'foo_2048', - 'foo_2049', - 'foo_2050', - 'foo_2051', - 'foo_2052', - 'foo_2053', - 'foo_2054', - 'foo_2055', - 'foo_2056', - 'foo_2057', - 'foo_2058', - 'foo_2059', - 'foo_2060', - 'foo_2061', - 'foo_2062', - 'foo_2063', - 'foo_2064', - 'foo_2065', - 'foo_2066', - 'foo_2067', - 'foo_2068', - 'foo_2069', - 'foo_2070', - 'foo_2071', - 'foo_2072', - 'foo_2073', - 'foo_2074', - 'foo_2075', - 'foo_2076', - 'foo_2077', - 'foo_2078', - 'foo_2079', - 'foo_2080', - 'foo_2081', - 'foo_2082', - 'foo_2083', - 'foo_2084', - 'foo_2085', - 'foo_2086', - 'foo_2087', - 'foo_2088', - 'foo_2089', - 'foo_2090', - 'foo_2091', - 'foo_2092', - 'foo_2093', - 'foo_2094', - 'foo_2095', - 'foo_2096', - 'foo_2097', - 'foo_2098', - 'foo_2099', - 'foo_2100', - 'foo_2101', - 'foo_2102', - 'foo_2103', - 'foo_2104', - 'foo_2105', - 'foo_2106', - 'foo_2107', - 'foo_2108', - 'foo_2109', - 'foo_2110', - 'foo_2111', - 'foo_2112', - 'foo_2113', - 'foo_2114', - 'foo_2115', - 'foo_2116', - 'foo_2117', - 'foo_2118', - 'foo_2119', - 'foo_2120', - 'foo_2121', - 'foo_2122', - 'foo_2123', - 'foo_2124', - 'foo_2125', - 'foo_2126', - 'foo_2127', - 'foo_2128', - 'foo_2129', - 'foo_2130', - 'foo_2131', - 'foo_2132', - 'foo_2133', - 'foo_2134', - 'foo_2135', - 'foo_2136', - 'foo_2137', - 'foo_2138', - 'foo_2139', - 'foo_2140', - 'foo_2141', - 'foo_2142', - 'foo_2143', - 'foo_2144', - 'foo_2145', - 'foo_2146', - 'foo_2147', - 'foo_2148', - 'foo_2149', - 'foo_2150', - 'foo_2151', - 'foo_2152', - 'foo_2153', - 'foo_2154', - 'foo_2155', - 'foo_2156', - 'foo_2157', - 'foo_2158', - 'foo_2159', - 'foo_2160', - 'foo_2161', - 'foo_2162', - 'foo_2163', - 'foo_2164', - 'foo_2165', - 'foo_2166', - 'foo_2167', - 'foo_2168', - 'foo_2169', - 'foo_2170', - 'foo_2171', - 'foo_2172', - 'foo_2173', - 'foo_2174', - 'foo_2175', - 'foo_2176', - 'foo_2177', - 'foo_2178', - 'foo_2179', - 'foo_2180', - 'foo_2181', - 'foo_2182', - 'foo_2183', - 'foo_2184', - 'foo_2185', - 'foo_2186', - 'foo_2187', - 'foo_2188', - 'foo_2189', - 'foo_2190', - 'foo_2191', - 'foo_2192', - 'foo_2193', - 'foo_2194', - 'foo_2195', - 'foo_2196', - 'foo_2197', - 'foo_2198', - 'foo_2199', - 'foo_2200', - 'foo_2201', - 'foo_2202', - 'foo_2203', - 'foo_2204', - 'foo_2205', - 'foo_2206', - 'foo_2207', - 'foo_2208', - 'foo_2209', - 'foo_2210', - 'foo_2211', - 'foo_2212', - 'foo_2213', - 'foo_2214', - 'foo_2215', - 'foo_2216', - 'foo_2217', - 'foo_2218', - 'foo_2219', - 'foo_2220', - 'foo_2221', - 'foo_2222', - 'foo_2223', - 'foo_2224', - 'foo_2225', - 'foo_2226', - 'foo_2227', - 'foo_2228', - 'foo_2229', - 'foo_2230', - 'foo_2231', - 'foo_2232', - 'foo_2233', - 'foo_2234', - 'foo_2235', - 'foo_2236', - 'foo_2237', - 'foo_2238', - 'foo_2239', - 'foo_2240', - 'foo_2241', - 'foo_2242', - 'foo_2243', - 'foo_2244', - 'foo_2245', - 'foo_2246', - 'foo_2247', - 'foo_2248', - 'foo_2249', - 'foo_2250', - 'foo_2251', - 'foo_2252', - 'foo_2253', - 'foo_2254', - 'foo_2255', - 'foo_2256', - 'foo_2257', - 'foo_2258', - 'foo_2259', - 'foo_2260', - 'foo_2261', - 'foo_2262', - 'foo_2263', - 'foo_2264', - 'foo_2265', - 'foo_2266', - 'foo_2267', - 'foo_2268', - 'foo_2269', - 'foo_2270', - 'foo_2271', - 'foo_2272', - 'foo_2273', - 'foo_2274', - 'foo_2275', - 'foo_2276', - 'foo_2277', - 'foo_2278', - 'foo_2279', - 'foo_2280', - 'foo_2281', - 'foo_2282', - 'foo_2283', - 'foo_2284', - 'foo_2285', - 'foo_2286', - 'foo_2287', - 'foo_2288', - 'foo_2289', - 'foo_2290', - 'foo_2291', - 'foo_2292', - 'foo_2293', - 'foo_2294', - 'foo_2295', - 'foo_2296', - 'foo_2297', - 'foo_2298', - 'foo_2299', - 'foo_2300', - 'foo_2301', - 'foo_2302', - 'foo_2303', - 'foo_2304', - 'foo_2305', - 'foo_2306', - 'foo_2307', - 'foo_2308', - 'foo_2309', - 'foo_2310', - 'foo_2311', - 'foo_2312', - 'foo_2313', - 'foo_2314', - 'foo_2315', - 'foo_2316', - 'foo_2317', - 'foo_2318', - 'foo_2319', - 'foo_2320', - 'foo_2321', - 'foo_2322', - 'foo_2323', - 'foo_2324', - 'foo_2325', - 'foo_2326', - 'foo_2327', - 'foo_2328', - 'foo_2329', - 'foo_2330', - 'foo_2331', - 'foo_2332', - 'foo_2333', - 'foo_2334', - 'foo_2335', - 'foo_2336', - 'foo_2337', - 'foo_2338', - 'foo_2339', - 'foo_2340', - 'foo_2341', - 'foo_2342', - 'foo_2343', - 'foo_2344', - 'foo_2345', - 'foo_2346', - 'foo_2347', - 'foo_2348', - 'foo_2349', - 'foo_2350', - 'foo_2351', - 'foo_2352', - 'foo_2353', - 'foo_2354', - 'foo_2355', - 'foo_2356', - 'foo_2357', - 'foo_2358', - 'foo_2359', - 'foo_2360', - 'foo_2361', - 'foo_2362', - 'foo_2363', - 'foo_2364', - 'foo_2365', - 'foo_2366', - 'foo_2367', - 'foo_2368', - 'foo_2369', - 'foo_2370', - 'foo_2371', - 'foo_2372', - 'foo_2373', - 'foo_2374', - 'foo_2375', - 'foo_2376', - 'foo_2377', - 'foo_2378', - 'foo_2379', - 'foo_2380', - 'foo_2381', - 'foo_2382', - 'foo_2383', - 'foo_2384', - 'foo_2385', - 'foo_2386', - 'foo_2387', - 'foo_2388', - 'foo_2389', - 'foo_2390', - 'foo_2391', - 'foo_2392', - 'foo_2393', - 'foo_2394', - 'foo_2395', - 'foo_2396', - 'foo_2397', - 'foo_2398', - 'foo_2399', - 'foo_2400', - 'foo_2401', - 'foo_2402', - 'foo_2403', - 'foo_2404', - 'foo_2405', - 'foo_2406', - 'foo_2407', - 'foo_2408', - 'foo_2409', - 'foo_2410', - 'foo_2411', - 'foo_2412', - 'foo_2413', - 'foo_2414', - 'foo_2415', - 'foo_2416', - 'foo_2417', - 'foo_2418', - 'foo_2419', - 'foo_2420', - 'foo_2421', - 'foo_2422', - 'foo_2423', - 'foo_2424', - 'foo_2425', - 'foo_2426', - 'foo_2427', - 'foo_2428', - 'foo_2429', - 'foo_2430', - 'foo_2431', - 'foo_2432', - 'foo_2433', - 'foo_2434', - 'foo_2435', - 'foo_2436', - 'foo_2437', - 'foo_2438', - 'foo_2439', - 'foo_2440', - 'foo_2441', - 'foo_2442', - 'foo_2443', - 'foo_2444', - 'foo_2445', - 'foo_2446', - 'foo_2447', - 'foo_2448', - 'foo_2449', - 'foo_2450', - 'foo_2451', - 'foo_2452', - 'foo_2453', - 'foo_2454', - 'foo_2455', - 'foo_2456', - 'foo_2457', - 'foo_2458', - 'foo_2459', - 'foo_2460', - 'foo_2461', - 'foo_2462', - 'foo_2463', - 'foo_2464', - 'foo_2465', - 'foo_2466', - 'foo_2467', - 'foo_2468', - 'foo_2469', - 'foo_2470', - 'foo_2471', - 'foo_2472', - 'foo_2473', - 'foo_2474', - 'foo_2475', - 'foo_2476', - 'foo_2477', - 'foo_2478', - 'foo_2479', - 'foo_2480', - 'foo_2481', - 'foo_2482', - 'foo_2483', - 'foo_2484', - 'foo_2485', - 'foo_2486', - 'foo_2487', - 'foo_2488', - 'foo_2489', - 'foo_2490', - 'foo_2491', - 'foo_2492', - 'foo_2493', - 'foo_2494', - 'foo_2495', - 'foo_2496', - 'foo_2497', - 'foo_2498', - 'foo_2499', - 'foo_2500', - 'foo_2501', - 'foo_2502', - 'foo_2503', - 'foo_2504', - 'foo_2505', - 'foo_2506', - 'foo_2507', - 'foo_2508', - 'foo_2509', - 'foo_2510', - 'foo_2511', - 'foo_2512', - 'foo_2513', - 'foo_2514', - 'foo_2515', - 'foo_2516', - 'foo_2517', - 'foo_2518', - 'foo_2519', - 'foo_2520', - 'foo_2521', - 'foo_2522', - 'foo_2523', - 'foo_2524', - 'foo_2525', - 'foo_2526', - 'foo_2527', - 'foo_2528', - 'foo_2529', - 'foo_2530', - 'foo_2531', - 'foo_2532', - 'foo_2533', - 'foo_2534', - 'foo_2535', - 'foo_2536', - 'foo_2537', - 'foo_2538', - 'foo_2539', - 'foo_2540', - 'foo_2541', - 'foo_2542', - 'foo_2543', - 'foo_2544', - 'foo_2545', - 'foo_2546', - 'foo_2547', - 'foo_2548', - 'foo_2549', - 'foo_2550', - 'foo_2551', - 'foo_2552', - 'foo_2553', - 'foo_2554', - 'foo_2555', - 'foo_2556', - 'foo_2557', - 'foo_2558', - 'foo_2559', - 'foo_2560', - 'foo_2561', - 'foo_2562', - 'foo_2563', - 'foo_2564', - 'foo_2565', - 'foo_2566', - 'foo_2567', - 'foo_2568', - 'foo_2569', - 'foo_2570', - 'foo_2571', - 'foo_2572', - 'foo_2573', - 'foo_2574', - 'foo_2575', - 'foo_2576', - 'foo_2577', - 'foo_2578', - 'foo_2579', - 'foo_2580', - 'foo_2581', - 'foo_2582', - 'foo_2583', - 'foo_2584', - 'foo_2585', - 'foo_2586', - 'foo_2587', - 'foo_2588', - 'foo_2589', - 'foo_2590', - 'foo_2591', - 'foo_2592', - 'foo_2593', - 'foo_2594', - 'foo_2595', - 'foo_2596', - 'foo_2597', - 'foo_2598', - 'foo_2599', - 'foo_2600', - 'foo_2601', - 'foo_2602', - 'foo_2603', - 'foo_2604', - 'foo_2605', - 'foo_2606', - 'foo_2607', - 'foo_2608', - 'foo_2609', - 'foo_2610', - 'foo_2611', - 'foo_2612', - 'foo_2613', - 'foo_2614', - 'foo_2615', - 'foo_2616', - 'foo_2617', - 'foo_2618', - 'foo_2619', - 'foo_2620', - 'foo_2621', - 'foo_2622', - 'foo_2623', - 'foo_2624', - 'foo_2625', - 'foo_2626', - 'foo_2627', - 'foo_2628', - 'foo_2629', - 'foo_2630', - 'foo_2631', - 'foo_2632', - 'foo_2633', - 'foo_2634', - 'foo_2635', - 'foo_2636', - 'foo_2637', - 'foo_2638', - 'foo_2639', - 'foo_2640', - 'foo_2641', - 'foo_2642', - 'foo_2643', - 'foo_2644', - 'foo_2645', - 'foo_2646', - 'foo_2647', - 'foo_2648', - 'foo_2649', - 'foo_2650', - 'foo_2651', - 'foo_2652', - 'foo_2653', - 'foo_2654', - 'foo_2655', - 'foo_2656', - 'foo_2657', - 'foo_2658', - 'foo_2659', - 'foo_2660', - 'foo_2661', - 'foo_2662', - 'foo_2663', - 'foo_2664', - 'foo_2665', - 'foo_2666', - 'foo_2667', - 'foo_2668', - 'foo_2669', - 'foo_2670', - 'foo_2671', - 'foo_2672', - 'foo_2673', - 'foo_2674', - 'foo_2675', - 'foo_2676', - 'foo_2677', - 'foo_2678', - 'foo_2679', - 'foo_2680', - 'foo_2681', - 'foo_2682', - 'foo_2683', - 'foo_2684', - 'foo_2685', - 'foo_2686', - 'foo_2687', - 'foo_2688', - 'foo_2689', - 'foo_2690', - 'foo_2691', - 'foo_2692', - 'foo_2693', - 'foo_2694', - 'foo_2695', - 'foo_2696', - 'foo_2697', - 'foo_2698', - 'foo_2699', - 'foo_2700', - 'foo_2701', - 'foo_2702', - 'foo_2703', - 'foo_2704', - 'foo_2705', - 'foo_2706', - 'foo_2707', - 'foo_2708', - 'foo_2709', - 'foo_2710', - 'foo_2711', - 'foo_2712', - 'foo_2713', - 'foo_2714', - 'foo_2715', - 'foo_2716', - 'foo_2717', - 'foo_2718', - 'foo_2719', - 'foo_2720', - 'foo_2721', - 'foo_2722', - 'foo_2723', - 'foo_2724', - 'foo_2725', - 'foo_2726', - 'foo_2727', - 'foo_2728', - 'foo_2729', - 'foo_2730', - 'foo_2731', - 'foo_2732', - 'foo_2733', - 'foo_2734', - 'foo_2735', - 'foo_2736', - 'foo_2737', - 'foo_2738', - 'foo_2739', - 'foo_2740', - 'foo_2741', - 'foo_2742', - 'foo_2743', - 'foo_2744', - 'foo_2745', - 'foo_2746', - 'foo_2747', - 'foo_2748', - 'foo_2749', - 'foo_2750', - 'foo_2751', - 'foo_2752', - 'foo_2753', - 'foo_2754', - 'foo_2755', - 'foo_2756', - 'foo_2757', - 'foo_2758', - 'foo_2759', - 'foo_2760', - 'foo_2761', - 'foo_2762', - 'foo_2763', - 'foo_2764', - 'foo_2765', - 'foo_2766', - 'foo_2767', - 'foo_2768', - 'foo_2769', - 'foo_2770', - 'foo_2771', - 'foo_2772', - 'foo_2773', - 'foo_2774', - 'foo_2775', - 'foo_2776', - 'foo_2777', - 'foo_2778', - 'foo_2779', - 'foo_2780', - 'foo_2781', - 'foo_2782', - 'foo_2783', - 'foo_2784', - 'foo_2785', - 'foo_2786', - 'foo_2787', - 'foo_2788', - 'foo_2789', - 'foo_2790', - 'foo_2791', - 'foo_2792', - 'foo_2793', - 'foo_2794', - 'foo_2795', - 'foo_2796', - 'foo_2797', - 'foo_2798', - 'foo_2799', - 'foo_2800', - 'foo_2801', - 'foo_2802', - 'foo_2803', - 'foo_2804', - 'foo_2805', - 'foo_2806', - 'foo_2807', - 'foo_2808', - 'foo_2809', - 'foo_2810', - 'foo_2811', - 'foo_2812', - 'foo_2813', - 'foo_2814', - 'foo_2815', - 'foo_2816', - 'foo_2817', - 'foo_2818', - 'foo_2819', - 'foo_2820', - 'foo_2821', - 'foo_2822', - 'foo_2823', - 'foo_2824', - 'foo_2825', - 'foo_2826', - 'foo_2827', - 'foo_2828', - 'foo_2829', - 'foo_2830', - 'foo_2831', - 'foo_2832', - 'foo_2833', - 'foo_2834', - 'foo_2835', - 'foo_2836', - 'foo_2837', - 'foo_2838', - 'foo_2839', - 'foo_2840', - 'foo_2841', - 'foo_2842', - 'foo_2843', - 'foo_2844', - 'foo_2845', - 'foo_2846', - 'foo_2847', - 'foo_2848', - 'foo_2849', - 'foo_2850', - 'foo_2851', - 'foo_2852', - 'foo_2853', - 'foo_2854', - 'foo_2855', - 'foo_2856', - 'foo_2857', - 'foo_2858', - 'foo_2859', - 'foo_2860', - 'foo_2861', - 'foo_2862', - 'foo_2863', - 'foo_2864', - 'foo_2865', - 'foo_2866', - 'foo_2867', - 'foo_2868', - 'foo_2869', - 'foo_2870', - 'foo_2871', - 'foo_2872', - 'foo_2873', - 'foo_2874', - 'foo_2875', - 'foo_2876', - 'foo_2877', - 'foo_2878', - 'foo_2879', - 'foo_2880', - 'foo_2881', - 'foo_2882', - 'foo_2883', - 'foo_2884', - 'foo_2885', - 'foo_2886', - 'foo_2887', - 'foo_2888', - 'foo_2889', - 'foo_2890', - 'foo_2891', - 'foo_2892', - 'foo_2893', - 'foo_2894', - 'foo_2895', - 'foo_2896', - 'foo_2897', - 'foo_2898', - 'foo_2899', - 'foo_2900', - 'foo_2901', - 'foo_2902', - 'foo_2903', - 'foo_2904', - 'foo_2905', - 'foo_2906', - 'foo_2907', - 'foo_2908', - 'foo_2909', - 'foo_2910', - 'foo_2911', - 'foo_2912', - 'foo_2913', - 'foo_2914', - 'foo_2915', - 'foo_2916', - 'foo_2917', - 'foo_2918', - 'foo_2919', - 'foo_2920', - 'foo_2921', - 'foo_2922', - 'foo_2923', - 'foo_2924', - 'foo_2925', - 'foo_2926', - 'foo_2927', - 'foo_2928', - 'foo_2929', - 'foo_2930', - 'foo_2931', - 'foo_2932', - 'foo_2933', - 'foo_2934', - 'foo_2935', - 'foo_2936', - 'foo_2937', - 'foo_2938', - 'foo_2939', - 'foo_2940', - 'foo_2941', - 'foo_2942', - 'foo_2943', - 'foo_2944', - 'foo_2945', - 'foo_2946', - 'foo_2947', - 'foo_2948', - 'foo_2949', - 'foo_2950', - 'foo_2951', - 'foo_2952', - 'foo_2953', - 'foo_2954', - 'foo_2955', - 'foo_2956', - 'foo_2957', - 'foo_2958', - 'foo_2959', - 'foo_2960', - 'foo_2961', - 'foo_2962', - 'foo_2963', - 'foo_2964', - 'foo_2965', - 'foo_2966', - 'foo_2967', - 'foo_2968', - 'foo_2969', - 'foo_2970', - 'foo_2971', - 'foo_2972', - 'foo_2973', - 'foo_2974', - 'foo_2975', - 'foo_2976', - 'foo_2977', - 'foo_2978', - 'foo_2979', - 'foo_2980', - 'foo_2981', - 'foo_2982', - 'foo_2983', - 'foo_2984', - 'foo_2985', - 'foo_2986', - 'foo_2987', - 'foo_2988', - 'foo_2989', - 'foo_2990', - 'foo_2991', - 'foo_2992', - 'foo_2993', - 'foo_2994', - 'foo_2995', - 'foo_2996', - 'foo_2997', - 'foo_2998', - 'foo_2999', - 'foo_3000', - 'foo_3001', - 'foo_3002', - 'foo_3003', - 'foo_3004', - 'foo_3005', - 'foo_3006', - 'foo_3007', - 'foo_3008', - 'foo_3009', - 'foo_3010', - 'foo_3011', - 'foo_3012', - 'foo_3013', - 'foo_3014', - 'foo_3015', - 'foo_3016', - 'foo_3017', - 'foo_3018', - 'foo_3019', - 'foo_3020', - 'foo_3021', - 'foo_3022', - 'foo_3023', - 'foo_3024', - 'foo_3025', - 'foo_3026', - 'foo_3027', - 'foo_3028', - 'foo_3029', - 'foo_3030', - 'foo_3031', - 'foo_3032', - 'foo_3033', - 'foo_3034', - 'foo_3035', - 'foo_3036', - 'foo_3037', - 'foo_3038', - 'foo_3039', - 'foo_3040', - 'foo_3041', - 'foo_3042', - 'foo_3043', - 'foo_3044', - 'foo_3045', - 'foo_3046', - 'foo_3047', - 'foo_3048', - 'foo_3049', - 'foo_3050', - 'foo_3051', - 'foo_3052', - 'foo_3053', - 'foo_3054', - 'foo_3055', - 'foo_3056', - 'foo_3057', - 'foo_3058', - 'foo_3059', - 'foo_3060', - 'foo_3061', - 'foo_3062', - 'foo_3063', - 'foo_3064', - 'foo_3065', - 'foo_3066', - 'foo_3067', - 'foo_3068', - 'foo_3069', - 'foo_3070', - 'foo_3071', - 'foo_3072', - 'foo_3073', - 'foo_3074', - 'foo_3075', - 'foo_3076', - 'foo_3077', - 'foo_3078', - 'foo_3079', - 'foo_3080', - 'foo_3081', - 'foo_3082', - 'foo_3083', - 'foo_3084', - 'foo_3085', - 'foo_3086', - 'foo_3087', - 'foo_3088', - 'foo_3089', - 'foo_3090', - 'foo_3091', - 'foo_3092', - 'foo_3093', - 'foo_3094', - 'foo_3095', - 'foo_3096', - 'foo_3097', - 'foo_3098', - 'foo_3099', - 'foo_3100', - 'foo_3101', - 'foo_3102', - 'foo_3103', - 'foo_3104', - 'foo_3105', - 'foo_3106', - 'foo_3107', - 'foo_3108', - 'foo_3109', - 'foo_3110', - 'foo_3111', - 'foo_3112', - 'foo_3113', - 'foo_3114', - 'foo_3115', - 'foo_3116', - 'foo_3117', - 'foo_3118', - 'foo_3119', - 'foo_3120', - 'foo_3121', - 'foo_3122', - 'foo_3123', - 'foo_3124', - 'foo_3125', - 'foo_3126', - 'foo_3127', - 'foo_3128', - 'foo_3129', - 'foo_3130', - 'foo_3131', - 'foo_3132', - 'foo_3133', - 'foo_3134', - 'foo_3135', - 'foo_3136', - 'foo_3137', - 'foo_3138', - 'foo_3139', - 'foo_3140', - 'foo_3141', - 'foo_3142', - 'foo_3143', - 'foo_3144', - 'foo_3145', - 'foo_3146', - 'foo_3147', - 'foo_3148', - 'foo_3149', - 'foo_3150', - 'foo_3151', - 'foo_3152', - 'foo_3153', - 'foo_3154', - 'foo_3155', - 'foo_3156', - 'foo_3157', - 'foo_3158', - 'foo_3159', - 'foo_3160', - 'foo_3161', - 'foo_3162', - 'foo_3163', - 'foo_3164', - 'foo_3165', - 'foo_3166', - 'foo_3167', - 'foo_3168', - 'foo_3169', - 'foo_3170', - 'foo_3171', - 'foo_3172', - 'foo_3173', - 'foo_3174', - 'foo_3175', - 'foo_3176', - 'foo_3177', - 'foo_3178', - 'foo_3179', - 'foo_3180', - 'foo_3181', - 'foo_3182', - 'foo_3183', - 'foo_3184', - 'foo_3185', - 'foo_3186', - 'foo_3187', - 'foo_3188', - 'foo_3189', - 'foo_3190', - 'foo_3191', - 'foo_3192', - 'foo_3193', - 'foo_3194', - 'foo_3195', - 'foo_3196', - 'foo_3197', - 'foo_3198', - 'foo_3199', - 'foo_3200', - 'foo_3201', - 'foo_3202', - 'foo_3203', - 'foo_3204', - 'foo_3205', - 'foo_3206', - 'foo_3207', - 'foo_3208', - 'foo_3209', - 'foo_3210', - 'foo_3211', - 'foo_3212', - 'foo_3213', - 'foo_3214', - 'foo_3215', - 'foo_3216', - 'foo_3217', - 'foo_3218', - 'foo_3219', - 'foo_3220', - 'foo_3221', - 'foo_3222', - 'foo_3223', - 'foo_3224', - 'foo_3225', - 'foo_3226', - 'foo_3227', - 'foo_3228', - 'foo_3229', - 'foo_3230', - 'foo_3231', - 'foo_3232', - 'foo_3233', - 'foo_3234', - 'foo_3235', - 'foo_3236', - 'foo_3237', - 'foo_3238', - 'foo_3239', - 'foo_3240', - 'foo_3241', - 'foo_3242', - 'foo_3243', - 'foo_3244', - 'foo_3245', - 'foo_3246', - 'foo_3247', - 'foo_3248', - 'foo_3249', - 'foo_3250', - 'foo_3251', - 'foo_3252', - 'foo_3253', - 'foo_3254', - 'foo_3255', - 'foo_3256', - 'foo_3257', - 'foo_3258', - 'foo_3259', - 'foo_3260', - 'foo_3261', - 'foo_3262', - 'foo_3263', - 'foo_3264', - 'foo_3265', - 'foo_3266', - 'foo_3267', - 'foo_3268', - 'foo_3269', - 'foo_3270', - 'foo_3271', - 'foo_3272', - 'foo_3273', - 'foo_3274', - 'foo_3275', - 'foo_3276', - 'foo_3277', - 'foo_3278', - 'foo_3279', - 'foo_3280', - 'foo_3281', - 'foo_3282', - 'foo_3283', - 'foo_3284', - 'foo_3285', - 'foo_3286', - 'foo_3287', - 'foo_3288', - 'foo_3289', - 'foo_3290', - 'foo_3291', - 'foo_3292', - 'foo_3293', - 'foo_3294', - 'foo_3295', - 'foo_3296', - 'foo_3297', - 'foo_3298', - 'foo_3299', - 'foo_3300', - 'foo_3301', - 'foo_3302', - 'foo_3303', - 'foo_3304', - 'foo_3305', - 'foo_3306', - 'foo_3307', - 'foo_3308', - 'foo_3309', - 'foo_3310', - 'foo_3311', - 'foo_3312', - 'foo_3313', - 'foo_3314', - 'foo_3315', - 'foo_3316', - 'foo_3317', - 'foo_3318', - 'foo_3319', - 'foo_3320', - 'foo_3321', - 'foo_3322', - 'foo_3323', - 'foo_3324', - 'foo_3325', - 'foo_3326', - 'foo_3327', - 'foo_3328', - 'foo_3329', - 'foo_3330', - 'foo_3331', - 'foo_3332', - 'foo_3333', - 'foo_3334', - 'foo_3335', - 'foo_3336', - 'foo_3337', - 'foo_3338', - 'foo_3339', - 'foo_3340', - 'foo_3341', - 'foo_3342', - 'foo_3343', - 'foo_3344', - 'foo_3345', - 'foo_3346', - 'foo_3347', - 'foo_3348', - 'foo_3349', - 'foo_3350', - 'foo_3351', - 'foo_3352', - 'foo_3353', - 'foo_3354', - 'foo_3355', - 'foo_3356', - 'foo_3357', - 'foo_3358', - 'foo_3359', - 'foo_3360', - 'foo_3361', - 'foo_3362', - 'foo_3363', - 'foo_3364', - 'foo_3365', - 'foo_3366', - 'foo_3367', - 'foo_3368', - 'foo_3369', - 'foo_3370', - 'foo_3371', - 'foo_3372', - 'foo_3373', - 'foo_3374', - 'foo_3375', - 'foo_3376', - 'foo_3377', - 'foo_3378', - 'foo_3379', - 'foo_3380', - 'foo_3381', - 'foo_3382', - 'foo_3383', - 'foo_3384', - 'foo_3385', - 'foo_3386', - 'foo_3387', - 'foo_3388', - 'foo_3389', - 'foo_3390', - 'foo_3391', - 'foo_3392', - 'foo_3393', - 'foo_3394', - 'foo_3395', - 'foo_3396', - 'foo_3397', - 'foo_3398', - 'foo_3399', - 'foo_3400', - 'foo_3401', - 'foo_3402', - 'foo_3403', - 'foo_3404', - 'foo_3405', - 'foo_3406', - 'foo_3407', - 'foo_3408', - 'foo_3409', - 'foo_3410', - 'foo_3411', - 'foo_3412', - 'foo_3413', - 'foo_3414', - 'foo_3415', - 'foo_3416', - 'foo_3417', - 'foo_3418', - 'foo_3419', - 'foo_3420', - 'foo_3421', - 'foo_3422', - 'foo_3423', - 'foo_3424', - 'foo_3425', - 'foo_3426', - 'foo_3427', - 'foo_3428', - 'foo_3429', - 'foo_3430', - 'foo_3431', - 'foo_3432', - 'foo_3433', - 'foo_3434', - 'foo_3435', - 'foo_3436', - 'foo_3437', - 'foo_3438', - 'foo_3439', - 'foo_3440', - 'foo_3441', - 'foo_3442', - 'foo_3443', - 'foo_3444', - 'foo_3445', - 'foo_3446', - 'foo_3447', - 'foo_3448', - 'foo_3449', - 'foo_3450', - 'foo_3451', - 'foo_3452', - 'foo_3453', - 'foo_3454', - 'foo_3455', - 'foo_3456', - 'foo_3457', - 'foo_3458', - 'foo_3459', - 'foo_3460', - 'foo_3461', - 'foo_3462', - 'foo_3463', - 'foo_3464', - 'foo_3465', - 'foo_3466', - 'foo_3467', - 'foo_3468', - 'foo_3469', - 'foo_3470', - 'foo_3471', - 'foo_3472', - 'foo_3473', - 'foo_3474', - 'foo_3475', - 'foo_3476', - 'foo_3477', - 'foo_3478', - 'foo_3479', - 'foo_3480', - 'foo_3481', - 'foo_3482', - 'foo_3483', - 'foo_3484', - 'foo_3485', - 'foo_3486', - 'foo_3487', - 'foo_3488', - 'foo_3489', - 'foo_3490', - 'foo_3491', - 'foo_3492', - 'foo_3493', - 'foo_3494', - 'foo_3495', - 'foo_3496', - 'foo_3497', - 'foo_3498', - 'foo_3499', - 'foo_3500', - 'foo_3501', - 'foo_3502', - 'foo_3503', - 'foo_3504', - 'foo_3505', - 'foo_3506', - 'foo_3507', - 'foo_3508', - 'foo_3509', - 'foo_3510', - 'foo_3511', - 'foo_3512', - 'foo_3513', - 'foo_3514', - 'foo_3515', - 'foo_3516', - 'foo_3517', - 'foo_3518', - 'foo_3519', - 'foo_3520', - 'foo_3521', - 'foo_3522', - 'foo_3523', - 'foo_3524', - 'foo_3525', - 'foo_3526', - 'foo_3527', - 'foo_3528', - 'foo_3529', - 'foo_3530', - 'foo_3531', - 'foo_3532', - 'foo_3533', - 'foo_3534', - 'foo_3535', - 'foo_3536', - 'foo_3537', - 'foo_3538', - 'foo_3539', - 'foo_3540', - 'foo_3541', - 'foo_3542', - 'foo_3543', - 'foo_3544', - 'foo_3545', - 'foo_3546', - 'foo_3547', - 'foo_3548', - 'foo_3549', - 'foo_3550', - 'foo_3551', - 'foo_3552', - 'foo_3553', - 'foo_3554', - 'foo_3555', - 'foo_3556', - 'foo_3557', - 'foo_3558', - 'foo_3559', - 'foo_3560', - 'foo_3561', - 'foo_3562', - 'foo_3563', - 'foo_3564', - 'foo_3565', - 'foo_3566', - 'foo_3567', - 'foo_3568', - 'foo_3569', - 'foo_3570', - 'foo_3571', - 'foo_3572', - 'foo_3573', - 'foo_3574', - 'foo_3575', - 'foo_3576', - 'foo_3577', - 'foo_3578', - 'foo_3579', - 'foo_3580', - 'foo_3581', - 'foo_3582', - 'foo_3583', - 'foo_3584', - 'foo_3585', - 'foo_3586', - 'foo_3587', - 'foo_3588', - 'foo_3589', - 'foo_3590', - 'foo_3591', - 'foo_3592', - 'foo_3593', - 'foo_3594', - 'foo_3595', - 'foo_3596', - 'foo_3597', - 'foo_3598', - 'foo_3599', - 'foo_3600', - 'foo_3601', - 'foo_3602', - 'foo_3603', - 'foo_3604', - 'foo_3605', - 'foo_3606', - 'foo_3607', - 'foo_3608', - 'foo_3609', - 'foo_3610', - 'foo_3611', - 'foo_3612', - 'foo_3613', - 'foo_3614', - 'foo_3615', - 'foo_3616', - 'foo_3617', - 'foo_3618', - 'foo_3619', - 'foo_3620', - 'foo_3621', - 'foo_3622', - 'foo_3623', - 'foo_3624', - 'foo_3625', - 'foo_3626', - 'foo_3627', - 'foo_3628', - 'foo_3629', - 'foo_3630', - 'foo_3631', - 'foo_3632', - 'foo_3633', - 'foo_3634', - 'foo_3635', - 'foo_3636', - 'foo_3637', - 'foo_3638', - 'foo_3639', - 'foo_3640', - 'foo_3641', - 'foo_3642', - 'foo_3643', - 'foo_3644', - 'foo_3645', - 'foo_3646', - 'foo_3647', - 'foo_3648', - 'foo_3649', - 'foo_3650', - 'foo_3651', - 'foo_3652', - 'foo_3653', - 'foo_3654', - 'foo_3655', - 'foo_3656', - 'foo_3657', - 'foo_3658', - 'foo_3659', - 'foo_3660', - 'foo_3661', - 'foo_3662', - 'foo_3663', - 'foo_3664', - 'foo_3665', - 'foo_3666', - 'foo_3667', - 'foo_3668', - 'foo_3669', - 'foo_3670', - 'foo_3671', - 'foo_3672', - 'foo_3673', - 'foo_3674', - 'foo_3675', - 'foo_3676', - 'foo_3677', - 'foo_3678', - 'foo_3679', - 'foo_3680', - 'foo_3681', - 'foo_3682', - 'foo_3683', - 'foo_3684', - 'foo_3685', - 'foo_3686', - 'foo_3687', - 'foo_3688', - 'foo_3689', - 'foo_3690', - 'foo_3691', - 'foo_3692', - 'foo_3693', - 'foo_3694', - 'foo_3695', - 'foo_3696', - 'foo_3697', - 'foo_3698', - 'foo_3699', - 'foo_3700', - 'foo_3701', - 'foo_3702', - 'foo_3703', - 'foo_3704', - 'foo_3705', - 'foo_3706', - 'foo_3707', - 'foo_3708', - 'foo_3709', - 'foo_3710', - 'foo_3711', - 'foo_3712', - 'foo_3713', - 'foo_3714', - 'foo_3715', - 'foo_3716', - 'foo_3717', - 'foo_3718', - 'foo_3719', - 'foo_3720', - 'foo_3721', - 'foo_3722', - 'foo_3723', - 'foo_3724', - 'foo_3725', - 'foo_3726', - 'foo_3727', - 'foo_3728', - 'foo_3729', - 'foo_3730', - 'foo_3731', - 'foo_3732', - 'foo_3733', - 'foo_3734', - 'foo_3735', - 'foo_3736', - 'foo_3737', - 'foo_3738', - 'foo_3739', - 'foo_3740', - 'foo_3741', - 'foo_3742', - 'foo_3743', - 'foo_3744', - 'foo_3745', - 'foo_3746', - 'foo_3747', - 'foo_3748', - 'foo_3749', - 'foo_3750', - 'foo_3751', - 'foo_3752', - 'foo_3753', - 'foo_3754', - 'foo_3755', - 'foo_3756', - 'foo_3757', - 'foo_3758', - 'foo_3759', - 'foo_3760', - 'foo_3761', - 'foo_3762', - 'foo_3763', - 'foo_3764', - 'foo_3765', - 'foo_3766', - 'foo_3767', - 'foo_3768', - 'foo_3769', - 'foo_3770', - 'foo_3771', - 'foo_3772', - 'foo_3773', - 'foo_3774', - 'foo_3775', - 'foo_3776', - 'foo_3777', - 'foo_3778', - 'foo_3779', - 'foo_3780', - 'foo_3781', - 'foo_3782', - 'foo_3783', - 'foo_3784', - 'foo_3785', - 'foo_3786', - 'foo_3787', - 'foo_3788', - 'foo_3789', - 'foo_3790', - 'foo_3791', - 'foo_3792', - 'foo_3793', - 'foo_3794', - 'foo_3795', - 'foo_3796', - 'foo_3797', - 'foo_3798', - 'foo_3799', - 'foo_3800', - 'foo_3801', - 'foo_3802', - 'foo_3803', - 'foo_3804', - 'foo_3805', - 'foo_3806', - 'foo_3807', - 'foo_3808', - 'foo_3809', - 'foo_3810', - 'foo_3811', - 'foo_3812', - 'foo_3813', - 'foo_3814', - 'foo_3815', - 'foo_3816', - 'foo_3817', - 'foo_3818', - 'foo_3819', - 'foo_3820', - 'foo_3821', - 'foo_3822', - 'foo_3823', - 'foo_3824', - 'foo_3825', - 'foo_3826', - 'foo_3827', - 'foo_3828', - 'foo_3829', - 'foo_3830', - 'foo_3831', - 'foo_3832', - 'foo_3833', - 'foo_3834', - 'foo_3835', - 'foo_3836', - 'foo_3837', - 'foo_3838', - 'foo_3839', - 'foo_3840', - 'foo_3841', - 'foo_3842', - 'foo_3843', - 'foo_3844', - 'foo_3845', - 'foo_3846', - 'foo_3847', - 'foo_3848', - 'foo_3849', - 'foo_3850', - 'foo_3851', - 'foo_3852', - 'foo_3853', - 'foo_3854', - 'foo_3855', - 'foo_3856', - 'foo_3857', - 'foo_3858', - 'foo_3859', - 'foo_3860', - 'foo_3861', - 'foo_3862', - 'foo_3863', - 'foo_3864', - 'foo_3865', - 'foo_3866', - 'foo_3867', - 'foo_3868', - 'foo_3869', - 'foo_3870', - 'foo_3871', - 'foo_3872', - 'foo_3873', - 'foo_3874', - 'foo_3875', - 'foo_3876', - 'foo_3877', - 'foo_3878', - 'foo_3879', - 'foo_3880', - 'foo_3881', - 'foo_3882', - 'foo_3883', - 'foo_3884', - 'foo_3885', - 'foo_3886', - 'foo_3887', - 'foo_3888', - 'foo_3889', - 'foo_3890', - 'foo_3891', - 'foo_3892', - 'foo_3893', - 'foo_3894', - 'foo_3895', - 'foo_3896', - 'foo_3897', - 'foo_3898', - 'foo_3899', - 'foo_3900', - 'foo_3901', - 'foo_3902', - 'foo_3903', - 'foo_3904', - 'foo_3905', - 'foo_3906', - 'foo_3907', - 'foo_3908', - 'foo_3909', - 'foo_3910', - 'foo_3911', - 'foo_3912', - 'foo_3913', - 'foo_3914', - 'foo_3915', - 'foo_3916', - 'foo_3917', - 'foo_3918', - 'foo_3919', - 'foo_3920', - 'foo_3921', - 'foo_3922', - 'foo_3923', - 'foo_3924', - 'foo_3925', - 'foo_3926', - 'foo_3927', - 'foo_3928', - 'foo_3929', - 'foo_3930', - 'foo_3931', - 'foo_3932', - 'foo_3933', - 'foo_3934', - 'foo_3935', - 'foo_3936', - 'foo_3937', - 'foo_3938', - 'foo_3939', - 'foo_3940', - 'foo_3941', - 'foo_3942', - 'foo_3943', - 'foo_3944', - 'foo_3945', - 'foo_3946', - 'foo_3947', - 'foo_3948', - 'foo_3949', - 'foo_3950', - 'foo_3951', - 'foo_3952', - 'foo_3953', - 'foo_3954', - 'foo_3955', - 'foo_3956', - 'foo_3957', - 'foo_3958', - 'foo_3959', - 'foo_3960', - 'foo_3961', - 'foo_3962', - 'foo_3963', - 'foo_3964', - 'foo_3965', - 'foo_3966', - 'foo_3967', - 'foo_3968', - 'foo_3969', - 'foo_3970', - 'foo_3971', - 'foo_3972', - 'foo_3973', - 'foo_3974', - 'foo_3975', - 'foo_3976', - 'foo_3977', - 'foo_3978', - 'foo_3979', - 'foo_3980', - 'foo_3981', - 'foo_3982', - 'foo_3983', - 'foo_3984', - 'foo_3985', - 'foo_3986', - 'foo_3987', - 'foo_3988', - 'foo_3989', - 'foo_3990', - 'foo_3991', - 'foo_3992', - 'foo_3993', - 'foo_3994', - 'foo_3995', - 'foo_3996', - 'foo_3997', - 'foo_3998', - 'foo_3999', - 'foo_4000', - 'foo_4001', - 'foo_4002', - 'foo_4003', - 'foo_4004', - 'foo_4005', - 'foo_4006', - 'foo_4007', - 'foo_4008', - 'foo_4009', - 'foo_4010', - 'foo_4011', - 'foo_4012', - 'foo_4013', - 'foo_4014', - 'foo_4015', - 'foo_4016', - 'foo_4017', - 'foo_4018', - 'foo_4019', - 'foo_4020', - 'foo_4021', - 'foo_4022', - 'foo_4023', - 'foo_4024', - 'foo_4025', - 'foo_4026', - 'foo_4027', - 'foo_4028', - 'foo_4029', - 'foo_4030', - 'foo_4031', - 'foo_4032', - 'foo_4033', - 'foo_4034', - 'foo_4035', - 'foo_4036', - 'foo_4037', - 'foo_4038', - 'foo_4039', - 'foo_4040', - 'foo_4041', - 'foo_4042', - 'foo_4043', - 'foo_4044', - 'foo_4045', - 'foo_4046', - 'foo_4047', - 'foo_4048', - 'foo_4049', - 'foo_4050', - 'foo_4051', - 'foo_4052', - 'foo_4053', - 'foo_4054', - 'foo_4055', - 'foo_4056', - 'foo_4057', - 'foo_4058', - 'foo_4059', - 'foo_4060', - 'foo_4061', - 'foo_4062', - 'foo_4063', - 'foo_4064', - 'foo_4065', - 'foo_4066', - 'foo_4067', - 'foo_4068', - 'foo_4069', - 'foo_4070', - 'foo_4071', - 'foo_4072', - 'foo_4073', - 'foo_4074', - 'foo_4075', - 'foo_4076', - 'foo_4077', - 'foo_4078', - 'foo_4079', - 'foo_4080', - 'foo_4081', - 'foo_4082', - 'foo_4083', - 'foo_4084', - 'foo_4085', - 'foo_4086', - 'foo_4087', - 'foo_4088', - 'foo_4089', - 'foo_4090', - 'foo_4091', - 'foo_4092', - 'foo_4093', - 'foo_4094', - 'foo_4095', - 'foo_4096', - 'foo_4097', - 'foo_4098', - 'foo_4099', - 'foo_4100', - 'foo_4101', - 'foo_4102', - 'foo_4103', - 'foo_4104', - 'foo_4105', - 'foo_4106', - 'foo_4107', - 'foo_4108', - 'foo_4109', - 'foo_4110', - 'foo_4111', - 'foo_4112', - 'foo_4113', - 'foo_4114', - 'foo_4115', - 'foo_4116', - 'foo_4117', - 'foo_4118', - 'foo_4119', - 'foo_4120', - 'foo_4121', - 'foo_4122', - 'foo_4123', - 'foo_4124', - 'foo_4125', - 'foo_4126', - 'foo_4127', - 'foo_4128', - 'foo_4129', - 'foo_4130', - 'foo_4131', - 'foo_4132', - 'foo_4133', - 'foo_4134', - 'foo_4135', - 'foo_4136', - 'foo_4137', - 'foo_4138', - 'foo_4139', - 'foo_4140', - 'foo_4141', - 'foo_4142', - 'foo_4143', - 'foo_4144', - 'foo_4145', - 'foo_4146', - 'foo_4147', - 'foo_4148', - 'foo_4149', - 'foo_4150', - 'foo_4151', - 'foo_4152', - 'foo_4153', - 'foo_4154', - 'foo_4155', - 'foo_4156', - 'foo_4157', - 'foo_4158', - 'foo_4159', - 'foo_4160', - 'foo_4161', - 'foo_4162', - 'foo_4163', - 'foo_4164', - 'foo_4165', - 'foo_4166', - 'foo_4167', - 'foo_4168', - 'foo_4169', - 'foo_4170', - 'foo_4171', - 'foo_4172', - 'foo_4173', - 'foo_4174', - 'foo_4175', - 'foo_4176', - 'foo_4177', - 'foo_4178', - 'foo_4179', - 'foo_4180', - 'foo_4181', - 'foo_4182', - 'foo_4183', - 'foo_4184', - 'foo_4185', - 'foo_4186', - 'foo_4187', - 'foo_4188', - 'foo_4189', - 'foo_4190', - 'foo_4191', - 'foo_4192', - 'foo_4193', - 'foo_4194', - 'foo_4195', - 'foo_4196', - 'foo_4197', - 'foo_4198', - 'foo_4199', - 'foo_4200', - 'foo_4201', - 'foo_4202', - 'foo_4203', - 'foo_4204', - 'foo_4205', - 'foo_4206', - 'foo_4207', - 'foo_4208', - 'foo_4209', - 'foo_4210', - 'foo_4211', - 'foo_4212', - 'foo_4213', - 'foo_4214', - 'foo_4215', - 'foo_4216', - 'foo_4217', - 'foo_4218', - 'foo_4219', - 'foo_4220', - 'foo_4221', - 'foo_4222', - 'foo_4223', - 'foo_4224', - 'foo_4225', - 'foo_4226', - 'foo_4227', - 'foo_4228', - 'foo_4229', - 'foo_4230', - 'foo_4231', - 'foo_4232', - 'foo_4233', - 'foo_4234', - 'foo_4235', - 'foo_4236', - 'foo_4237', - 'foo_4238', - 'foo_4239', - 'foo_4240', - 'foo_4241', - 'foo_4242', - 'foo_4243', - 'foo_4244', - 'foo_4245', - 'foo_4246', - 'foo_4247', - 'foo_4248', - 'foo_4249', - 'foo_4250', - 'foo_4251', - 'foo_4252', - 'foo_4253', - 'foo_4254', - 'foo_4255', - 'foo_4256', - 'foo_4257', - 'foo_4258', - 'foo_4259', - 'foo_4260', - 'foo_4261', - 'foo_4262', - 'foo_4263', - 'foo_4264', - 'foo_4265', - 'foo_4266', - 'foo_4267', - 'foo_4268', - 'foo_4269', - 'foo_4270', - 'foo_4271', - 'foo_4272', - 'foo_4273', - 'foo_4274', - 'foo_4275', - 'foo_4276', - 'foo_4277', - 'foo_4278', - 'foo_4279', - 'foo_4280', - 'foo_4281', - 'foo_4282', - 'foo_4283', - 'foo_4284', - 'foo_4285', - 'foo_4286', - 'foo_4287', - 'foo_4288', - 'foo_4289', - 'foo_4290', - 'foo_4291', - 'foo_4292', - 'foo_4293', - 'foo_4294', - 'foo_4295', - 'foo_4296', - 'foo_4297', - 'foo_4298', - 'foo_4299', - 'foo_4300', - 'foo_4301', - 'foo_4302', - 'foo_4303', - 'foo_4304', - 'foo_4305', - 'foo_4306', - 'foo_4307', - 'foo_4308', - 'foo_4309', - 'foo_4310', - 'foo_4311', - 'foo_4312', - 'foo_4313', - 'foo_4314', - 'foo_4315', - 'foo_4316', - 'foo_4317', - 'foo_4318', - 'foo_4319', - 'foo_4320', - 'foo_4321', - 'foo_4322', - 'foo_4323', - 'foo_4324', - 'foo_4325', - 'foo_4326', - 'foo_4327', - 'foo_4328', - 'foo_4329', - 'foo_4330', - 'foo_4331', - 'foo_4332', - 'foo_4333', - 'foo_4334', - 'foo_4335', - 'foo_4336', - 'foo_4337', - 'foo_4338', - 'foo_4339', - 'foo_4340', - 'foo_4341', - 'foo_4342', - 'foo_4343', - 'foo_4344', - 'foo_4345', - 'foo_4346', - 'foo_4347', - 'foo_4348', - 'foo_4349', - 'foo_4350', - 'foo_4351', - 'foo_4352', - 'foo_4353', - 'foo_4354', - 'foo_4355', - 'foo_4356', - 'foo_4357', - 'foo_4358', - 'foo_4359', - 'foo_4360', - 'foo_4361', - 'foo_4362', - 'foo_4363', - 'foo_4364', - 'foo_4365', - 'foo_4366', - 'foo_4367', - 'foo_4368', - 'foo_4369', - 'foo_4370', - 'foo_4371', - 'foo_4372', - 'foo_4373', - 'foo_4374', - 'foo_4375', - 'foo_4376', - 'foo_4377', - 'foo_4378', - 'foo_4379', - 'foo_4380', - 'foo_4381', - 'foo_4382', - 'foo_4383', - 'foo_4384', - 'foo_4385', - 'foo_4386', - 'foo_4387', - 'foo_4388', - 'foo_4389', - 'foo_4390', - 'foo_4391', - 'foo_4392', - 'foo_4393', - 'foo_4394', - 'foo_4395', - 'foo_4396', - 'foo_4397', - 'foo_4398', - 'foo_4399', - 'foo_4400', - 'foo_4401', - 'foo_4402', - 'foo_4403', - 'foo_4404', - 'foo_4405', - 'foo_4406', - 'foo_4407', - 'foo_4408', - 'foo_4409', - 'foo_4410', - 'foo_4411', - 'foo_4412', - 'foo_4413', - 'foo_4414', - 'foo_4415', - 'foo_4416', - 'foo_4417', - 'foo_4418', - 'foo_4419', - 'foo_4420', - 'foo_4421', - 'foo_4422', - 'foo_4423', - 'foo_4424', - 'foo_4425', - 'foo_4426', - 'foo_4427', - 'foo_4428', - 'foo_4429', - 'foo_4430', - 'foo_4431', - 'foo_4432', - 'foo_4433', - 'foo_4434', - 'foo_4435', - 'foo_4436', - 'foo_4437', - 'foo_4438', - 'foo_4439', - 'foo_4440', - 'foo_4441', - 'foo_4442', - 'foo_4443', - 'foo_4444', - 'foo_4445', - 'foo_4446', - 'foo_4447', - 'foo_4448', - 'foo_4449', - 'foo_4450', - 'foo_4451', - 'foo_4452', - 'foo_4453', - 'foo_4454', - 'foo_4455', - 'foo_4456', - 'foo_4457', - 'foo_4458', - 'foo_4459', - 'foo_4460', - 'foo_4461', - 'foo_4462', - 'foo_4463', - 'foo_4464', - 'foo_4465', - 'foo_4466', - 'foo_4467', - 'foo_4468', - 'foo_4469', - 'foo_4470', - 'foo_4471', - 'foo_4472', - 'foo_4473', - 'foo_4474', - 'foo_4475', - 'foo_4476', - 'foo_4477', - 'foo_4478', - 'foo_4479', - 'foo_4480', - 'foo_4481', - 'foo_4482', - 'foo_4483', - 'foo_4484', - 'foo_4485', - 'foo_4486', - 'foo_4487', - 'foo_4488', - 'foo_4489', - 'foo_4490', - 'foo_4491', - 'foo_4492', - 'foo_4493', - 'foo_4494', - 'foo_4495', - 'foo_4496', - 'foo_4497', - 'foo_4498', - 'foo_4499', - 'foo_4500', - 'foo_4501', - 'foo_4502', - 'foo_4503', - 'foo_4504', - 'foo_4505', - 'foo_4506', - 'foo_4507', - 'foo_4508', - 'foo_4509', - 'foo_4510', - 'foo_4511', - 'foo_4512', - 'foo_4513', - 'foo_4514', - 'foo_4515', - 'foo_4516', - 'foo_4517', - 'foo_4518', - 'foo_4519', - 'foo_4520', - 'foo_4521', - 'foo_4522', - 'foo_4523', - 'foo_4524', - 'foo_4525', - 'foo_4526', - 'foo_4527', - 'foo_4528', - 'foo_4529', - 'foo_4530', - 'foo_4531', - 'foo_4532', - 'foo_4533', - 'foo_4534', - 'foo_4535', - 'foo_4536', - 'foo_4537', - 'foo_4538', - 'foo_4539', - 'foo_4540', - 'foo_4541', - 'foo_4542', - 'foo_4543', - 'foo_4544', - 'foo_4545', - 'foo_4546', - 'foo_4547', - 'foo_4548', - 'foo_4549', - 'foo_4550', - 'foo_4551', - 'foo_4552', - 'foo_4553', - 'foo_4554', - 'foo_4555', - 'foo_4556', - 'foo_4557', - 'foo_4558', - 'foo_4559', - 'foo_4560', - 'foo_4561', - 'foo_4562', - 'foo_4563', - 'foo_4564', - 'foo_4565', - 'foo_4566', - 'foo_4567', - 'foo_4568', - 'foo_4569', - 'foo_4570', - 'foo_4571', - 'foo_4572', - 'foo_4573', - 'foo_4574', - 'foo_4575', - 'foo_4576', - 'foo_4577', - 'foo_4578', - 'foo_4579', - 'foo_4580', - 'foo_4581', - 'foo_4582', - 'foo_4583', - 'foo_4584', - 'foo_4585', - 'foo_4586', - 'foo_4587', - 'foo_4588', - 'foo_4589', - 'foo_4590', - 'foo_4591', - 'foo_4592', - 'foo_4593', - 'foo_4594', - 'foo_4595', - 'foo_4596', - 'foo_4597', - 'foo_4598', - 'foo_4599', - 'foo_4600', - 'foo_4601', - 'foo_4602', - 'foo_4603', - 'foo_4604', - 'foo_4605', - 'foo_4606', - 'foo_4607', - 'foo_4608', - 'foo_4609', - 'foo_4610', - 'foo_4611', - 'foo_4612', - 'foo_4613', - 'foo_4614', - 'foo_4615', - 'foo_4616', - 'foo_4617', - 'foo_4618', - 'foo_4619', - 'foo_4620', - 'foo_4621', - 'foo_4622', - 'foo_4623', - 'foo_4624', - 'foo_4625', - 'foo_4626', - 'foo_4627', - 'foo_4628', - 'foo_4629', - 'foo_4630', - 'foo_4631', - 'foo_4632', - 'foo_4633', - 'foo_4634', - 'foo_4635', - 'foo_4636', - 'foo_4637', - 'foo_4638', - 'foo_4639', - 'foo_4640', - 'foo_4641', - 'foo_4642', - 'foo_4643', - 'foo_4644', - 'foo_4645', - 'foo_4646', - 'foo_4647', - 'foo_4648', - 'foo_4649', - 'foo_4650', - 'foo_4651', - 'foo_4652', - 'foo_4653', - 'foo_4654', - 'foo_4655', - 'foo_4656', - 'foo_4657', - 'foo_4658', - 'foo_4659', - 'foo_4660', - 'foo_4661', - 'foo_4662', - 'foo_4663', - 'foo_4664', - 'foo_4665', - 'foo_4666', - 'foo_4667', - 'foo_4668', - 'foo_4669', - 'foo_4670', - 'foo_4671', - 'foo_4672', - 'foo_4673', - 'foo_4674', - 'foo_4675', - 'foo_4676', - 'foo_4677', - 'foo_4678', - 'foo_4679', - 'foo_4680', - 'foo_4681', - 'foo_4682', - 'foo_4683', - 'foo_4684', - 'foo_4685', - 'foo_4686', - 'foo_4687', - 'foo_4688', - 'foo_4689', - 'foo_4690', - 'foo_4691', - 'foo_4692', - 'foo_4693', - 'foo_4694', - 'foo_4695', - 'foo_4696', - 'foo_4697', - 'foo_4698', - 'foo_4699', - 'foo_4700', - 'foo_4701', - 'foo_4702', - 'foo_4703', - 'foo_4704', - 'foo_4705', - 'foo_4706', - 'foo_4707', - 'foo_4708', - 'foo_4709', - 'foo_4710', - 'foo_4711', - 'foo_4712', - 'foo_4713', - 'foo_4714', - 'foo_4715', - 'foo_4716', - 'foo_4717', - 'foo_4718', - 'foo_4719', - 'foo_4720', - 'foo_4721', - 'foo_4722', - 'foo_4723', - 'foo_4724', - 'foo_4725', - 'foo_4726', - 'foo_4727', - 'foo_4728', - 'foo_4729', - 'foo_4730', - 'foo_4731', - 'foo_4732', - 'foo_4733', - 'foo_4734', - 'foo_4735', - 'foo_4736', - 'foo_4737', - 'foo_4738', - 'foo_4739', - 'foo_4740', - 'foo_4741', - 'foo_4742', - 'foo_4743', - 'foo_4744', - 'foo_4745', - 'foo_4746', - 'foo_4747', - 'foo_4748', - 'foo_4749', - 'foo_4750', - 'foo_4751', - 'foo_4752', - 'foo_4753', - 'foo_4754', - 'foo_4755', - 'foo_4756', - 'foo_4757', - 'foo_4758', - 'foo_4759', - 'foo_4760', - 'foo_4761', - 'foo_4762', - 'foo_4763', - 'foo_4764', - 'foo_4765', - 'foo_4766', - 'foo_4767', - 'foo_4768', - 'foo_4769', - 'foo_4770', - 'foo_4771', - 'foo_4772', - 'foo_4773', - 'foo_4774', - 'foo_4775', - 'foo_4776', - 'foo_4777', - 'foo_4778', - 'foo_4779', - 'foo_4780', - 'foo_4781', - 'foo_4782', - 'foo_4783', - 'foo_4784', - 'foo_4785', - 'foo_4786', - 'foo_4787', - 'foo_4788', - 'foo_4789', - 'foo_4790', - 'foo_4791', - 'foo_4792', - 'foo_4793', - 'foo_4794', - 'foo_4795', - 'foo_4796', - 'foo_4797', - 'foo_4798', - 'foo_4799', - 'foo_4800', - 'foo_4801', - 'foo_4802', - 'foo_4803', - 'foo_4804', - 'foo_4805', - 'foo_4806', - 'foo_4807', - 'foo_4808', - 'foo_4809', - 'foo_4810', - 'foo_4811', - 'foo_4812', - 'foo_4813', - 'foo_4814', - 'foo_4815', - 'foo_4816', - 'foo_4817', - 'foo_4818', - 'foo_4819', - 'foo_4820', - 'foo_4821', - 'foo_4822', - 'foo_4823', - 'foo_4824', - 'foo_4825', - 'foo_4826', - 'foo_4827', - 'foo_4828', - 'foo_4829', - 'foo_4830', - 'foo_4831', - 'foo_4832', - 'foo_4833', - 'foo_4834', - 'foo_4835', - 'foo_4836', - 'foo_4837', - 'foo_4838', - 'foo_4839', - 'foo_4840', - 'foo_4841', - 'foo_4842', - 'foo_4843', - 'foo_4844', - 'foo_4845', - 'foo_4846', - 'foo_4847', - 'foo_4848', - 'foo_4849', - 'foo_4850', - 'foo_4851', - 'foo_4852', - 'foo_4853', - 'foo_4854', - 'foo_4855', - 'foo_4856', - 'foo_4857', - 'foo_4858', - 'foo_4859', - 'foo_4860', - 'foo_4861', - 'foo_4862', - 'foo_4863', - 'foo_4864', - 'foo_4865', - 'foo_4866', - 'foo_4867', - 'foo_4868', - 'foo_4869', - 'foo_4870', - 'foo_4871', - 'foo_4872', - 'foo_4873', - 'foo_4874', - 'foo_4875', - 'foo_4876', - 'foo_4877', - 'foo_4878', - 'foo_4879', - 'foo_4880', - 'foo_4881', - 'foo_4882', - 'foo_4883', - 'foo_4884', - 'foo_4885', - 'foo_4886', - 'foo_4887', - 'foo_4888', - 'foo_4889', - 'foo_4890', - 'foo_4891', - 'foo_4892', - 'foo_4893', - 'foo_4894', - 'foo_4895', - 'foo_4896', - 'foo_4897', - 'foo_4898', - 'foo_4899', - 'foo_4900', - 'foo_4901', - 'foo_4902', - 'foo_4903', - 'foo_4904', - 'foo_4905', - 'foo_4906', - 'foo_4907', - 'foo_4908', - 'foo_4909', - 'foo_4910', - 'foo_4911', - 'foo_4912', - 'foo_4913', - 'foo_4914', - 'foo_4915', - 'foo_4916', - 'foo_4917', - 'foo_4918', - 'foo_4919', - 'foo_4920', - 'foo_4921', - 'foo_4922', - 'foo_4923', - 'foo_4924', - 'foo_4925', - 'foo_4926', - 'foo_4927', - 'foo_4928', - 'foo_4929', - 'foo_4930', - 'foo_4931', - 'foo_4932', - 'foo_4933', - 'foo_4934', - 'foo_4935', - 'foo_4936', - 'foo_4937', - 'foo_4938', - 'foo_4939', - 'foo_4940', - 'foo_4941', - 'foo_4942', - 'foo_4943', - 'foo_4944', - 'foo_4945', - 'foo_4946', - 'foo_4947', - 'foo_4948', - 'foo_4949', - 'foo_4950', - 'foo_4951', - 'foo_4952', - 'foo_4953', - 'foo_4954', - 'foo_4955', - 'foo_4956', - 'foo_4957', - 'foo_4958', - 'foo_4959', - 'foo_4960', - 'foo_4961', - 'foo_4962', - 'foo_4963', - 'foo_4964', - 'foo_4965', - 'foo_4966', - 'foo_4967', - 'foo_4968', - 'foo_4969', - 'foo_4970', - 'foo_4971', - 'foo_4972', - 'foo_4973', - 'foo_4974', - 'foo_4975', - 'foo_4976', - 'foo_4977', - 'foo_4978', - 'foo_4979', - 'foo_4980', - 'foo_4981', - 'foo_4982', - 'foo_4983', - 'foo_4984', - 'foo_4985', - 'foo_4986', - 'foo_4987', - 'foo_4988', - 'foo_4989', - 'foo_4990', - 'foo_4991', - 'foo_4992', - 'foo_4993', - 'foo_4994', - 'foo_4995', - 'foo_4996', - 'foo_4997', - 'foo_4998', - 'foo_4999', - 'foo_5000', - 'foo_5001', - 'foo_5002', - 'foo_5003', - 'foo_5004', - 'foo_5005', - 'foo_5006', - 'foo_5007', - 'foo_5008', - 'foo_5009', - 'foo_5010', - 'foo_5011', - 'foo_5012', - 'foo_5013', - 'foo_5014', - 'foo_5015', - 'foo_5016', - 'foo_5017', - 'foo_5018', - 'foo_5019', - 'foo_5020', - 'foo_5021', - 'foo_5022', - 'foo_5023', - 'foo_5024', - 'foo_5025', - 'foo_5026', - 'foo_5027', - 'foo_5028', - 'foo_5029', - 'foo_5030', - 'foo_5031', - 'foo_5032', - 'foo_5033', - 'foo_5034', - 'foo_5035', - 'foo_5036', - 'foo_5037', - 'foo_5038', - 'foo_5039', - 'foo_5040', - 'foo_5041', - 'foo_5042', - 'foo_5043', - 'foo_5044', - 'foo_5045', - 'foo_5046', - 'foo_5047', - 'foo_5048', - 'foo_5049', - 'foo_5050', - 'foo_5051', - 'foo_5052', - 'foo_5053', - 'foo_5054', - 'foo_5055', - 'foo_5056', - 'foo_5057', - 'foo_5058', - 'foo_5059', - 'foo_5060', - 'foo_5061', - 'foo_5062', - 'foo_5063', - 'foo_5064', - 'foo_5065', - 'foo_5066', - 'foo_5067', - 'foo_5068', - 'foo_5069', - 'foo_5070', - 'foo_5071', - 'foo_5072', - 'foo_5073', - 'foo_5074', - 'foo_5075', - 'foo_5076', - 'foo_5077', - 'foo_5078', - 'foo_5079', - 'foo_5080', - 'foo_5081', - 'foo_5082', - 'foo_5083', - 'foo_5084', - 'foo_5085', - 'foo_5086', - 'foo_5087', - 'foo_5088', - 'foo_5089', - 'foo_5090', - 'foo_5091', - 'foo_5092', - 'foo_5093', - 'foo_5094', - 'foo_5095', - 'foo_5096', - 'foo_5097', - 'foo_5098', - 'foo_5099', - 'foo_5100', - 'foo_5101', - 'foo_5102', - 'foo_5103', - 'foo_5104', - 'foo_5105', - 'foo_5106', - 'foo_5107', - 'foo_5108', - 'foo_5109', - 'foo_5110', - 'foo_5111', - 'foo_5112', - 'foo_5113', - 'foo_5114', - 'foo_5115', - 'foo_5116', - 'foo_5117', - 'foo_5118', - 'foo_5119', - 'foo_5120', - 'foo_5121', - 'foo_5122', - 'foo_5123', - 'foo_5124', - 'foo_5125', - 'foo_5126', - 'foo_5127', - 'foo_5128', - 'foo_5129', - 'foo_5130', - 'foo_5131', - 'foo_5132', - 'foo_5133', - 'foo_5134', - 'foo_5135', - 'foo_5136', - 'foo_5137', - 'foo_5138', - 'foo_5139', - 'foo_5140', - 'foo_5141', - 'foo_5142', - 'foo_5143', - 'foo_5144', - 'foo_5145', - 'foo_5146', - 'foo_5147', - 'foo_5148', - 'foo_5149', - 'foo_5150', - 'foo_5151', - 'foo_5152', - 'foo_5153', - 'foo_5154', - 'foo_5155', - 'foo_5156', - 'foo_5157', - 'foo_5158', - 'foo_5159', - 'foo_5160', - 'foo_5161', - 'foo_5162', - 'foo_5163', - 'foo_5164', - 'foo_5165', - 'foo_5166', - 'foo_5167', - 'foo_5168', - 'foo_5169', - 'foo_5170', - 'foo_5171', - 'foo_5172', - 'foo_5173', - 'foo_5174', - 'foo_5175', - 'foo_5176', - 'foo_5177', - 'foo_5178', - 'foo_5179', - 'foo_5180', - 'foo_5181', - 'foo_5182', - 'foo_5183', - 'foo_5184', - 'foo_5185', - 'foo_5186', - 'foo_5187', - 'foo_5188', - 'foo_5189', - 'foo_5190', - 'foo_5191', - 'foo_5192', - 'foo_5193', - 'foo_5194', - 'foo_5195', - 'foo_5196', - 'foo_5197', - 'foo_5198', - 'foo_5199', - 'foo_5200', - 'foo_5201', - 'foo_5202', - 'foo_5203', - 'foo_5204', - 'foo_5205', - 'foo_5206', - 'foo_5207', - 'foo_5208', - 'foo_5209', - 'foo_5210', - 'foo_5211', - 'foo_5212', - 'foo_5213', - 'foo_5214', - 'foo_5215', - 'foo_5216', - 'foo_5217', - 'foo_5218', - 'foo_5219', - 'foo_5220', - 'foo_5221', - 'foo_5222', - 'foo_5223', - 'foo_5224', - 'foo_5225', - 'foo_5226', - 'foo_5227', - 'foo_5228', - 'foo_5229', - 'foo_5230', - 'foo_5231', - 'foo_5232', - 'foo_5233', - 'foo_5234', - 'foo_5235', - 'foo_5236', - 'foo_5237', - 'foo_5238', - 'foo_5239', - 'foo_5240', - 'foo_5241', - 'foo_5242', - 'foo_5243', - 'foo_5244', - 'foo_5245', - 'foo_5246', - 'foo_5247', - 'foo_5248', - 'foo_5249', - 'foo_5250', - 'foo_5251', - 'foo_5252', - 'foo_5253', - 'foo_5254', - 'foo_5255', - 'foo_5256', - 'foo_5257', - 'foo_5258', - 'foo_5259', - 'foo_5260', - 'foo_5261', - 'foo_5262', - 'foo_5263', - 'foo_5264', - 'foo_5265', - 'foo_5266', - 'foo_5267', - 'foo_5268', - 'foo_5269', - 'foo_5270', - 'foo_5271', - 'foo_5272', - 'foo_5273', - 'foo_5274', - 'foo_5275', - 'foo_5276', - 'foo_5277', - 'foo_5278', - 'foo_5279', - 'foo_5280', - 'foo_5281', - 'foo_5282', - 'foo_5283', - 'foo_5284', - 'foo_5285', - 'foo_5286', - 'foo_5287', - 'foo_5288', - 'foo_5289', - 'foo_5290', - 'foo_5291', - 'foo_5292', - 'foo_5293', - 'foo_5294', - 'foo_5295', - 'foo_5296', - 'foo_5297', - 'foo_5298', - 'foo_5299', - 'foo_5300', - 'foo_5301', - 'foo_5302', - 'foo_5303', - 'foo_5304', - 'foo_5305', - 'foo_5306', - 'foo_5307', - 'foo_5308', - 'foo_5309', - 'foo_5310', - 'foo_5311', - 'foo_5312', - 'foo_5313', - 'foo_5314', - 'foo_5315', - 'foo_5316', - 'foo_5317', - 'foo_5318', - 'foo_5319', - 'foo_5320', - 'foo_5321', - 'foo_5322', - 'foo_5323', - 'foo_5324', - 'foo_5325', - 'foo_5326', - 'foo_5327', - 'foo_5328', - 'foo_5329', - 'foo_5330', - 'foo_5331', - 'foo_5332', - 'foo_5333', - 'foo_5334', - 'foo_5335', - 'foo_5336', - 'foo_5337', - 'foo_5338', - 'foo_5339', - 'foo_5340', - 'foo_5341', - 'foo_5342', - 'foo_5343', - 'foo_5344', - 'foo_5345', - 'foo_5346', - 'foo_5347', - 'foo_5348', - 'foo_5349', - 'foo_5350', - 'foo_5351', - 'foo_5352', - 'foo_5353', - 'foo_5354', - 'foo_5355', - 'foo_5356', - 'foo_5357', - 'foo_5358', - 'foo_5359', - 'foo_5360', - 'foo_5361', - 'foo_5362', - 'foo_5363', - 'foo_5364', - 'foo_5365', - 'foo_5366', - 'foo_5367', - 'foo_5368', - 'foo_5369', - 'foo_5370', - 'foo_5371', - 'foo_5372', - 'foo_5373', - 'foo_5374', - 'foo_5375', - 'foo_5376', - 'foo_5377', - 'foo_5378', - 'foo_5379', - 'foo_5380', - 'foo_5381', - 'foo_5382', - 'foo_5383', - 'foo_5384', - 'foo_5385', - 'foo_5386', - 'foo_5387', - 'foo_5388', - 'foo_5389', - 'foo_5390', - 'foo_5391', - 'foo_5392', - 'foo_5393', - 'foo_5394', - 'foo_5395', - 'foo_5396', - 'foo_5397', - 'foo_5398', - 'foo_5399', - 'foo_5400', - 'foo_5401', - 'foo_5402', - 'foo_5403', - 'foo_5404', - 'foo_5405', - 'foo_5406', - 'foo_5407', - 'foo_5408', - 'foo_5409', - 'foo_5410', - 'foo_5411', - 'foo_5412', - 'foo_5413', - 'foo_5414', - 'foo_5415', - 'foo_5416', - 'foo_5417', - 'foo_5418', - 'foo_5419', - 'foo_5420', - 'foo_5421', - 'foo_5422', - 'foo_5423', - 'foo_5424', - 'foo_5425', - 'foo_5426', - 'foo_5427', - 'foo_5428', - 'foo_5429', - 'foo_5430', - 'foo_5431', - 'foo_5432', - 'foo_5433', - 'foo_5434', - 'foo_5435', - 'foo_5436', - 'foo_5437', - 'foo_5438', - 'foo_5439', - 'foo_5440', - 'foo_5441', - 'foo_5442', - 'foo_5443', - 'foo_5444', - 'foo_5445', - 'foo_5446', - 'foo_5447', - 'foo_5448', - 'foo_5449', - 'foo_5450', - 'foo_5451', - 'foo_5452', - 'foo_5453', - 'foo_5454', - 'foo_5455', - 'foo_5456', - 'foo_5457', - 'foo_5458', - 'foo_5459', - 'foo_5460', - 'foo_5461', - 'foo_5462', - 'foo_5463', - 'foo_5464', - 'foo_5465', - 'foo_5466', - 'foo_5467', - 'foo_5468', - 'foo_5469', - 'foo_5470', - 'foo_5471', - 'foo_5472', - 'foo_5473', - 'foo_5474', - 'foo_5475', - 'foo_5476', - 'foo_5477', - 'foo_5478', - 'foo_5479', - 'foo_5480', - 'foo_5481', - 'foo_5482', - 'foo_5483', - 'foo_5484', - 'foo_5485', - 'foo_5486', - 'foo_5487', - 'foo_5488', - 'foo_5489', - 'foo_5490', - 'foo_5491', - 'foo_5492', - 'foo_5493', - 'foo_5494', - 'foo_5495', - 'foo_5496', - 'foo_5497', - 'foo_5498', - 'foo_5499', - 'foo_5500', - 'foo_5501', - 'foo_5502', - 'foo_5503', - 'foo_5504', - 'foo_5505', - 'foo_5506', - 'foo_5507', - 'foo_5508', - 'foo_5509', - 'foo_5510', - 'foo_5511', - 'foo_5512', - 'foo_5513', - 'foo_5514', - 'foo_5515', - 'foo_5516', - 'foo_5517', - 'foo_5518', - 'foo_5519', - 'foo_5520', - 'foo_5521', - 'foo_5522', - 'foo_5523', - 'foo_5524', - 'foo_5525', - 'foo_5526', - 'foo_5527', - 'foo_5528', - 'foo_5529', - 'foo_5530', - 'foo_5531', - 'foo_5532', - 'foo_5533', - 'foo_5534', - 'foo_5535', - 'foo_5536', - 'foo_5537', - 'foo_5538', - 'foo_5539', - 'foo_5540', - 'foo_5541', - 'foo_5542', - 'foo_5543', - 'foo_5544', - 'foo_5545', - 'foo_5546', - 'foo_5547', - 'foo_5548', - 'foo_5549', - 'foo_5550', - 'foo_5551', - 'foo_5552', - 'foo_5553', - 'foo_5554', - 'foo_5555', - 'foo_5556', - 'foo_5557', - 'foo_5558', - 'foo_5559', - 'foo_5560', - 'foo_5561', - 'foo_5562', - 'foo_5563', - 'foo_5564', - 'foo_5565', - 'foo_5566', - 'foo_5567', - 'foo_5568', - 'foo_5569', - 'foo_5570', - 'foo_5571', - 'foo_5572', - 'foo_5573', - 'foo_5574', - 'foo_5575', - 'foo_5576', - 'foo_5577', - 'foo_5578', - 'foo_5579', - 'foo_5580', - 'foo_5581', - 'foo_5582', - 'foo_5583', - 'foo_5584', - 'foo_5585', - 'foo_5586', - 'foo_5587', - 'foo_5588', - 'foo_5589', - 'foo_5590', - 'foo_5591', - 'foo_5592', - 'foo_5593', - 'foo_5594', - 'foo_5595', - 'foo_5596', - 'foo_5597', - 'foo_5598', - 'foo_5599', - 'foo_5600', - 'foo_5601', - 'foo_5602', - 'foo_5603', - 'foo_5604', - 'foo_5605', - 'foo_5606', - 'foo_5607', - 'foo_5608', - 'foo_5609', - 'foo_5610', - 'foo_5611', - 'foo_5612', - 'foo_5613', - 'foo_5614', - 'foo_5615', - 'foo_5616', - 'foo_5617', - 'foo_5618', - 'foo_5619', - 'foo_5620', - 'foo_5621', - 'foo_5622', - 'foo_5623', - 'foo_5624', - 'foo_5625', - 'foo_5626', - 'foo_5627', - 'foo_5628', - 'foo_5629', - 'foo_5630', - 'foo_5631', - 'foo_5632', - 'foo_5633', - 'foo_5634', - 'foo_5635', - 'foo_5636', - 'foo_5637', - 'foo_5638', - 'foo_5639', - 'foo_5640', - 'foo_5641', - 'foo_5642', - 'foo_5643', - 'foo_5644', - 'foo_5645', - 'foo_5646', - 'foo_5647', - 'foo_5648', - 'foo_5649', - 'foo_5650', - 'foo_5651', - 'foo_5652', - 'foo_5653', - 'foo_5654', - 'foo_5655', - 'foo_5656', - 'foo_5657', - 'foo_5658', - 'foo_5659', - 'foo_5660', - 'foo_5661', - 'foo_5662', - 'foo_5663', - 'foo_5664', - 'foo_5665', - 'foo_5666', - 'foo_5667', - 'foo_5668', - 'foo_5669', - 'foo_5670', - 'foo_5671', - 'foo_5672', - 'foo_5673', - 'foo_5674', - 'foo_5675', - 'foo_5676', - 'foo_5677', - 'foo_5678', - 'foo_5679', - 'foo_5680', - 'foo_5681', - 'foo_5682', - 'foo_5683', - 'foo_5684', - 'foo_5685', - 'foo_5686', - 'foo_5687', - 'foo_5688', - 'foo_5689', - 'foo_5690', - 'foo_5691', - 'foo_5692', - 'foo_5693', - 'foo_5694', - 'foo_5695', - 'foo_5696', - 'foo_5697', - 'foo_5698', - 'foo_5699', - 'foo_5700', - 'foo_5701', - 'foo_5702', - 'foo_5703', - 'foo_5704', - 'foo_5705', - 'foo_5706', - 'foo_5707', - 'foo_5708', - 'foo_5709', - 'foo_5710', - 'foo_5711', - 'foo_5712', - 'foo_5713', - 'foo_5714', - 'foo_5715', - 'foo_5716', - 'foo_5717', - 'foo_5718', - 'foo_5719', - 'foo_5720', - 'foo_5721', - 'foo_5722', - 'foo_5723', - 'foo_5724', - 'foo_5725', - 'foo_5726', - 'foo_5727', - 'foo_5728', - 'foo_5729', - 'foo_5730', - 'foo_5731', - 'foo_5732', - 'foo_5733', - 'foo_5734', - 'foo_5735', - 'foo_5736', - 'foo_5737', - 'foo_5738', - 'foo_5739', - 'foo_5740', - 'foo_5741', - 'foo_5742', - 'foo_5743', - 'foo_5744', - 'foo_5745', - 'foo_5746', - 'foo_5747', - 'foo_5748', - 'foo_5749', - 'foo_5750', - 'foo_5751', - 'foo_5752', - 'foo_5753', - 'foo_5754', - 'foo_5755', - 'foo_5756', - 'foo_5757', - 'foo_5758', - 'foo_5759', - 'foo_5760', - 'foo_5761', - 'foo_5762', - 'foo_5763', - 'foo_5764', - 'foo_5765', - 'foo_5766', - 'foo_5767', - 'foo_5768', - 'foo_5769', - 'foo_5770', - 'foo_5771', - 'foo_5772', - 'foo_5773', - 'foo_5774', - 'foo_5775', - 'foo_5776', - 'foo_5777', - 'foo_5778', - 'foo_5779', - 'foo_5780', - 'foo_5781', - 'foo_5782', - 'foo_5783', - 'foo_5784', - 'foo_5785', - 'foo_5786', - 'foo_5787', - 'foo_5788', - 'foo_5789', - 'foo_5790', - 'foo_5791', - 'foo_5792', - 'foo_5793', - 'foo_5794', - 'foo_5795', - 'foo_5796', - 'foo_5797', - 'foo_5798', - 'foo_5799', - 'foo_5800', - 'foo_5801', - 'foo_5802', - 'foo_5803', - 'foo_5804', - 'foo_5805', - 'foo_5806', - 'foo_5807', - 'foo_5808', - 'foo_5809', - 'foo_5810', - 'foo_5811', - 'foo_5812', - 'foo_5813', - 'foo_5814', - 'foo_5815', - 'foo_5816', - 'foo_5817', - 'foo_5818', - 'foo_5819', - 'foo_5820', - 'foo_5821', - 'foo_5822', - 'foo_5823', - 'foo_5824', - 'foo_5825', - 'foo_5826', - 'foo_5827', - 'foo_5828', - 'foo_5829', - 'foo_5830', - 'foo_5831', - 'foo_5832', - 'foo_5833', - 'foo_5834', - 'foo_5835', - 'foo_5836', - 'foo_5837', - 'foo_5838', - 'foo_5839', - 'foo_5840', - 'foo_5841', - 'foo_5842', - 'foo_5843', - 'foo_5844', - 'foo_5845', - 'foo_5846', - 'foo_5847', - 'foo_5848', - 'foo_5849', - 'foo_5850', - 'foo_5851', - 'foo_5852', - 'foo_5853', - 'foo_5854', - 'foo_5855', - 'foo_5856', - 'foo_5857', - 'foo_5858', - 'foo_5859', - 'foo_5860', - 'foo_5861', - 'foo_5862', - 'foo_5863', - 'foo_5864', - 'foo_5865', - 'foo_5866', - 'foo_5867', - 'foo_5868', - 'foo_5869', - 'foo_5870', - 'foo_5871', - 'foo_5872', - 'foo_5873', - 'foo_5874', - 'foo_5875', - 'foo_5876', - 'foo_5877', - 'foo_5878', - 'foo_5879', - 'foo_5880', - 'foo_5881', - 'foo_5882', - 'foo_5883', - 'foo_5884', - 'foo_5885', - 'foo_5886', - 'foo_5887', - 'foo_5888', - 'foo_5889', - 'foo_5890', - 'foo_5891', - 'foo_5892', - 'foo_5893', - 'foo_5894', - 'foo_5895', - 'foo_5896', - 'foo_5897', - 'foo_5898', - 'foo_5899', - 'foo_5900', - 'foo_5901', - 'foo_5902', - 'foo_5903', - 'foo_5904', - 'foo_5905', - 'foo_5906', - 'foo_5907', - 'foo_5908', - 'foo_5909', - 'foo_5910', - 'foo_5911', - 'foo_5912', - 'foo_5913', - 'foo_5914', - 'foo_5915', - 'foo_5916', - 'foo_5917', - 'foo_5918', - 'foo_5919', - 'foo_5920', - 'foo_5921', - 'foo_5922', - 'foo_5923', - 'foo_5924', - 'foo_5925', - 'foo_5926', - 'foo_5927', - 'foo_5928', - 'foo_5929', - 'foo_5930', - 'foo_5931', - 'foo_5932', - 'foo_5933', - 'foo_5934', - 'foo_5935', - 'foo_5936', - 'foo_5937', - 'foo_5938', - 'foo_5939', - 'foo_5940', - 'foo_5941', - 'foo_5942', - 'foo_5943', - 'foo_5944', - 'foo_5945', - 'foo_5946', - 'foo_5947', - 'foo_5948', - 'foo_5949', - 'foo_5950', - 'foo_5951', - 'foo_5952', - 'foo_5953', - 'foo_5954', - 'foo_5955', - 'foo_5956', - 'foo_5957', - 'foo_5958', - 'foo_5959', - 'foo_5960', - 'foo_5961', - 'foo_5962', - 'foo_5963', - 'foo_5964', - 'foo_5965', - 'foo_5966', - 'foo_5967', - 'foo_5968', - 'foo_5969', - 'foo_5970', - 'foo_5971', - 'foo_5972', - 'foo_5973', - 'foo_5974', - 'foo_5975', - 'foo_5976', - 'foo_5977', - 'foo_5978', - 'foo_5979', - 'foo_5980', - 'foo_5981', - 'foo_5982', - 'foo_5983', - 'foo_5984', - 'foo_5985', - 'foo_5986', - 'foo_5987', - 'foo_5988', - 'foo_5989', - 'foo_5990', - 'foo_5991', - 'foo_5992', - 'foo_5993', - 'foo_5994', - 'foo_5995', - 'foo_5996', - 'foo_5997', - 'foo_5998', - 'foo_5999', - 'foo_6000', - 'foo_6001', - 'foo_6002', - 'foo_6003', - 'foo_6004', - 'foo_6005', - 'foo_6006', - 'foo_6007', - 'foo_6008', - 'foo_6009', - 'foo_6010', - 'foo_6011', - 'foo_6012', - 'foo_6013', - 'foo_6014', - 'foo_6015', - 'foo_6016', - 'foo_6017', - 'foo_6018', - 'foo_6019', - 'foo_6020', - 'foo_6021', - 'foo_6022', - 'foo_6023', - 'foo_6024', - 'foo_6025', - 'foo_6026', - 'foo_6027', - 'foo_6028', - 'foo_6029', - 'foo_6030', - 'foo_6031', - 'foo_6032', - 'foo_6033', - 'foo_6034', - 'foo_6035', - 'foo_6036', - 'foo_6037', - 'foo_6038', - 'foo_6039', - 'foo_6040', - 'foo_6041', - 'foo_6042', - 'foo_6043', - 'foo_6044', - 'foo_6045', - 'foo_6046', - 'foo_6047', - 'foo_6048', - 'foo_6049', - 'foo_6050', - 'foo_6051', - 'foo_6052', - 'foo_6053', - 'foo_6054', - 'foo_6055', - 'foo_6056', - 'foo_6057', - 'foo_6058', - 'foo_6059', - 'foo_6060', - 'foo_6061', - 'foo_6062', - 'foo_6063', - 'foo_6064', - 'foo_6065', - 'foo_6066', - 'foo_6067', - 'foo_6068', - 'foo_6069', - 'foo_6070', - 'foo_6071', - 'foo_6072', - 'foo_6073', - 'foo_6074', - 'foo_6075', - 'foo_6076', - 'foo_6077', - 'foo_6078', - 'foo_6079', - 'foo_6080', - 'foo_6081', - 'foo_6082', - 'foo_6083', - 'foo_6084', - 'foo_6085', - 'foo_6086', - 'foo_6087', - 'foo_6088', - 'foo_6089', - 'foo_6090', - 'foo_6091', - 'foo_6092', - 'foo_6093', - 'foo_6094', - 'foo_6095', - 'foo_6096', - 'foo_6097', - 'foo_6098', - 'foo_6099', - 'foo_6100', - 'foo_6101', - 'foo_6102', - 'foo_6103', - 'foo_6104', - 'foo_6105', - 'foo_6106', - 'foo_6107', - 'foo_6108', - 'foo_6109', - 'foo_6110', - 'foo_6111', - 'foo_6112', - 'foo_6113', - 'foo_6114', - 'foo_6115', - 'foo_6116', - 'foo_6117', - 'foo_6118', - 'foo_6119', - 'foo_6120', - 'foo_6121', - 'foo_6122', - 'foo_6123', - 'foo_6124', - 'foo_6125', - 'foo_6126', - 'foo_6127', - 'foo_6128', - 'foo_6129', - 'foo_6130', - 'foo_6131', - 'foo_6132', - 'foo_6133', - 'foo_6134', - 'foo_6135', - 'foo_6136', - 'foo_6137', - 'foo_6138', - 'foo_6139', - 'foo_6140', - 'foo_6141', - 'foo_6142', - 'foo_6143', - 'foo_6144', - 'foo_6145', - 'foo_6146', - 'foo_6147', - 'foo_6148', - 'foo_6149', - 'foo_6150', - 'foo_6151', - 'foo_6152', - 'foo_6153', - 'foo_6154', - 'foo_6155', - 'foo_6156', - 'foo_6157', - 'foo_6158', - 'foo_6159', - 'foo_6160', - 'foo_6161', - 'foo_6162', - 'foo_6163', - 'foo_6164', - 'foo_6165', - 'foo_6166', - 'foo_6167', - 'foo_6168', - 'foo_6169', - 'foo_6170', - 'foo_6171', - 'foo_6172', - 'foo_6173', - 'foo_6174', - 'foo_6175', - 'foo_6176', - 'foo_6177', - 'foo_6178', - 'foo_6179', - 'foo_6180', - 'foo_6181', - 'foo_6182', - 'foo_6183', - 'foo_6184', - 'foo_6185', - 'foo_6186', - 'foo_6187', - 'foo_6188', - 'foo_6189', - 'foo_6190', - 'foo_6191', - 'foo_6192', - 'foo_6193', - 'foo_6194', - 'foo_6195', - 'foo_6196', - 'foo_6197', - 'foo_6198', - 'foo_6199', - 'foo_6200', - 'foo_6201', - 'foo_6202', - 'foo_6203', - 'foo_6204', - 'foo_6205', - 'foo_6206', - 'foo_6207', - 'foo_6208', - 'foo_6209', - 'foo_6210', - 'foo_6211', - 'foo_6212', - 'foo_6213', - 'foo_6214', - 'foo_6215', - 'foo_6216', - 'foo_6217', - 'foo_6218', - 'foo_6219', - 'foo_6220', - 'foo_6221', - 'foo_6222', - 'foo_6223', - 'foo_6224', - 'foo_6225', - 'foo_6226', - 'foo_6227', - 'foo_6228', - 'foo_6229', - 'foo_6230', - 'foo_6231', - 'foo_6232', - 'foo_6233', - 'foo_6234', - 'foo_6235', - 'foo_6236', - 'foo_6237', - 'foo_6238', - 'foo_6239', - 'foo_6240', - 'foo_6241', - 'foo_6242', - 'foo_6243', - 'foo_6244', - 'foo_6245', - 'foo_6246', - 'foo_6247', - 'foo_6248', - 'foo_6249', - 'foo_6250', - 'foo_6251', - 'foo_6252', - 'foo_6253', - 'foo_6254', - 'foo_6255', - 'foo_6256', - 'foo_6257', - 'foo_6258', - 'foo_6259', - 'foo_6260', - 'foo_6261', - 'foo_6262', - 'foo_6263', - 'foo_6264', - 'foo_6265', - 'foo_6266', - 'foo_6267', - 'foo_6268', - 'foo_6269', - 'foo_6270', - 'foo_6271', - 'foo_6272', - 'foo_6273', - 'foo_6274', - 'foo_6275', - 'foo_6276', - 'foo_6277', - 'foo_6278', - 'foo_6279', - 'foo_6280', - 'foo_6281', - 'foo_6282', - 'foo_6283', - 'foo_6284', - 'foo_6285', - 'foo_6286', - 'foo_6287', - 'foo_6288', - 'foo_6289', - 'foo_6290', - 'foo_6291', - 'foo_6292', - 'foo_6293', - 'foo_6294', - 'foo_6295', - 'foo_6296', - 'foo_6297', - 'foo_6298', - 'foo_6299', - 'foo_6300', - 'foo_6301', - 'foo_6302', - 'foo_6303', - 'foo_6304', - 'foo_6305', - 'foo_6306', - 'foo_6307', - 'foo_6308', - 'foo_6309', - 'foo_6310', - 'foo_6311', - 'foo_6312', - 'foo_6313', - 'foo_6314', - 'foo_6315', - 'foo_6316', - 'foo_6317', - 'foo_6318', - 'foo_6319', - 'foo_6320', - 'foo_6321', - 'foo_6322', - 'foo_6323', - 'foo_6324', - 'foo_6325', - 'foo_6326', - 'foo_6327', - 'foo_6328', - 'foo_6329', - 'foo_6330', - 'foo_6331', - 'foo_6332', - 'foo_6333', - 'foo_6334', - 'foo_6335', - 'foo_6336', - 'foo_6337', - 'foo_6338', - 'foo_6339', - 'foo_6340', - 'foo_6341', - 'foo_6342', - 'foo_6343', - 'foo_6344', - 'foo_6345', - 'foo_6346', - 'foo_6347', - 'foo_6348', - 'foo_6349', - 'foo_6350', - 'foo_6351', - 'foo_6352', - 'foo_6353', - 'foo_6354', - 'foo_6355', - 'foo_6356', - 'foo_6357', - 'foo_6358', - 'foo_6359', - 'foo_6360', - 'foo_6361', - 'foo_6362', - 'foo_6363', - 'foo_6364', - 'foo_6365', - 'foo_6366', - 'foo_6367', - 'foo_6368', - 'foo_6369', - 'foo_6370', - 'foo_6371', - 'foo_6372', - 'foo_6373', - 'foo_6374', - 'foo_6375', - 'foo_6376', - 'foo_6377', - 'foo_6378', - 'foo_6379', - 'foo_6380', - 'foo_6381', - 'foo_6382', - 'foo_6383', - 'foo_6384', - 'foo_6385', - 'foo_6386', - 'foo_6387', - 'foo_6388', - 'foo_6389', - 'foo_6390', - 'foo_6391', - 'foo_6392', - 'foo_6393', - 'foo_6394', - 'foo_6395', - 'foo_6396', - 'foo_6397', - 'foo_6398', - 'foo_6399', - 'foo_6400', - 'foo_6401', - 'foo_6402', - 'foo_6403', - 'foo_6404', - 'foo_6405', - 'foo_6406', - 'foo_6407', - 'foo_6408', - 'foo_6409', - 'foo_6410', - 'foo_6411', - 'foo_6412', - 'foo_6413', - 'foo_6414', - 'foo_6415', - 'foo_6416', - 'foo_6417', - 'foo_6418', - 'foo_6419', - 'foo_6420', - 'foo_6421', - 'foo_6422', - 'foo_6423', - 'foo_6424', - 'foo_6425', - 'foo_6426', - 'foo_6427', - 'foo_6428', - 'foo_6429', - 'foo_6430', - 'foo_6431', - 'foo_6432', - 'foo_6433', - 'foo_6434', - 'foo_6435', - 'foo_6436', - 'foo_6437', - 'foo_6438', - 'foo_6439', - 'foo_6440', - 'foo_6441', - 'foo_6442', - 'foo_6443', - 'foo_6444', - 'foo_6445', - 'foo_6446', - 'foo_6447', - 'foo_6448', - 'foo_6449', - 'foo_6450', - 'foo_6451', - 'foo_6452', - 'foo_6453', - 'foo_6454', - 'foo_6455', - 'foo_6456', - 'foo_6457', - 'foo_6458', - 'foo_6459', - 'foo_6460', - 'foo_6461', - 'foo_6462', - 'foo_6463', - 'foo_6464', - 'foo_6465', - 'foo_6466', - 'foo_6467', - 'foo_6468', - 'foo_6469', - 'foo_6470', - 'foo_6471', - 'foo_6472', - 'foo_6473', - 'foo_6474', - 'foo_6475', - 'foo_6476', - 'foo_6477', - 'foo_6478', - 'foo_6479', - 'foo_6480', - 'foo_6481', - 'foo_6482', - 'foo_6483', - 'foo_6484', - 'foo_6485', - 'foo_6486', - 'foo_6487', - 'foo_6488', - 'foo_6489', - 'foo_6490', - 'foo_6491', - 'foo_6492', - 'foo_6493', - 'foo_6494', - 'foo_6495', - 'foo_6496', - 'foo_6497', - 'foo_6498', - 'foo_6499', - 'foo_6500', - 'foo_6501', - 'foo_6502', - 'foo_6503', - 'foo_6504', - 'foo_6505', - 'foo_6506', - 'foo_6507', - 'foo_6508', - 'foo_6509', - 'foo_6510', - 'foo_6511', - 'foo_6512', - 'foo_6513', - 'foo_6514', - 'foo_6515', - 'foo_6516', - 'foo_6517', - 'foo_6518', - 'foo_6519', - 'foo_6520', - 'foo_6521', - 'foo_6522', - 'foo_6523', - 'foo_6524', - 'foo_6525', - 'foo_6526', - 'foo_6527', - 'foo_6528', - 'foo_6529', - 'foo_6530', - 'foo_6531', - 'foo_6532', - 'foo_6533', - 'foo_6534', - 'foo_6535', - 'foo_6536', - 'foo_6537', - 'foo_6538', - 'foo_6539', - 'foo_6540', - 'foo_6541', - 'foo_6542', - 'foo_6543', - 'foo_6544', - 'foo_6545', - 'foo_6546', - 'foo_6547', - 'foo_6548', - 'foo_6549', - 'foo_6550', - 'foo_6551', - 'foo_6552', - 'foo_6553', - 'foo_6554', - 'foo_6555', - 'foo_6556', - 'foo_6557', - 'foo_6558', - 'foo_6559', - 'foo_6560', - 'foo_6561', - 'foo_6562', - 'foo_6563', - 'foo_6564', - 'foo_6565', - 'foo_6566', - 'foo_6567', - 'foo_6568', - 'foo_6569', - 'foo_6570', - 'foo_6571', - 'foo_6572', - 'foo_6573', - 'foo_6574', - 'foo_6575', - 'foo_6576', - 'foo_6577', - 'foo_6578', - 'foo_6579', - 'foo_6580', - 'foo_6581', - 'foo_6582', - 'foo_6583', - 'foo_6584', - 'foo_6585', - 'foo_6586', - 'foo_6587', - 'foo_6588', - 'foo_6589', - 'foo_6590', - 'foo_6591', - 'foo_6592', - 'foo_6593', - 'foo_6594', - 'foo_6595', - 'foo_6596', - 'foo_6597', - 'foo_6598', - 'foo_6599', - 'foo_6600', - 'foo_6601', - 'foo_6602', - 'foo_6603', - 'foo_6604', - 'foo_6605', - 'foo_6606', - 'foo_6607', - 'foo_6608', - 'foo_6609', - 'foo_6610', - 'foo_6611', - 'foo_6612', - 'foo_6613', - 'foo_6614', - 'foo_6615', - 'foo_6616', - 'foo_6617', - 'foo_6618', - 'foo_6619', - 'foo_6620', - 'foo_6621', - 'foo_6622', - 'foo_6623', - 'foo_6624', - 'foo_6625', - 'foo_6626', - 'foo_6627', - 'foo_6628', - 'foo_6629', - 'foo_6630', - 'foo_6631', - 'foo_6632', - 'foo_6633', - 'foo_6634', - 'foo_6635', - 'foo_6636', - 'foo_6637', - 'foo_6638', - 'foo_6639', - 'foo_6640', - 'foo_6641', - 'foo_6642', - 'foo_6643', - 'foo_6644', - 'foo_6645', - 'foo_6646', - 'foo_6647', - 'foo_6648', - 'foo_6649', - 'foo_6650', - 'foo_6651', - 'foo_6652', - 'foo_6653', - 'foo_6654', - 'foo_6655', - 'foo_6656', - 'foo_6657', - 'foo_6658', - 'foo_6659', - 'foo_6660', - 'foo_6661', - 'foo_6662', - 'foo_6663', - 'foo_6664', - 'foo_6665', - 'foo_6666', - 'foo_6667', - 'foo_6668', - 'foo_6669', - 'foo_6670', - 'foo_6671', - 'foo_6672', - 'foo_6673', - 'foo_6674', - 'foo_6675', - 'foo_6676', - 'foo_6677', - 'foo_6678', - 'foo_6679', - 'foo_6680', - 'foo_6681', - 'foo_6682', - 'foo_6683', - 'foo_6684', - 'foo_6685', - 'foo_6686', - 'foo_6687', - 'foo_6688', - 'foo_6689', - 'foo_6690', - 'foo_6691', - 'foo_6692', - 'foo_6693', - 'foo_6694', - 'foo_6695', - 'foo_6696', - 'foo_6697', - 'foo_6698', - 'foo_6699', - 'foo_6700', - 'foo_6701', - 'foo_6702', - 'foo_6703', - 'foo_6704', - 'foo_6705', - 'foo_6706', - 'foo_6707', - 'foo_6708', - 'foo_6709', - 'foo_6710', - 'foo_6711', - 'foo_6712', - 'foo_6713', - 'foo_6714', - 'foo_6715', - 'foo_6716', - 'foo_6717', - 'foo_6718', - 'foo_6719', - 'foo_6720', - 'foo_6721', - 'foo_6722', - 'foo_6723', - 'foo_6724', - 'foo_6725', - 'foo_6726', - 'foo_6727', - 'foo_6728', - 'foo_6729', - 'foo_6730', - 'foo_6731', - 'foo_6732', - 'foo_6733', - 'foo_6734', - 'foo_6735', - 'foo_6736', - 'foo_6737', - 'foo_6738', - 'foo_6739', - 'foo_6740', - 'foo_6741', - 'foo_6742', - 'foo_6743', - 'foo_6744', - 'foo_6745', - 'foo_6746', - 'foo_6747', - 'foo_6748', - 'foo_6749', - 'foo_6750', - 'foo_6751', - 'foo_6752', - 'foo_6753', - 'foo_6754', - 'foo_6755', - 'foo_6756', - 'foo_6757', - 'foo_6758', - 'foo_6759', - 'foo_6760', - 'foo_6761', - 'foo_6762', - 'foo_6763', - 'foo_6764', - 'foo_6765', - 'foo_6766', - 'foo_6767', - 'foo_6768', - 'foo_6769', - 'foo_6770', - 'foo_6771', - 'foo_6772', - 'foo_6773', - 'foo_6774', - 'foo_6775', - 'foo_6776', - 'foo_6777', - 'foo_6778', - 'foo_6779', - 'foo_6780', - 'foo_6781', - 'foo_6782', - 'foo_6783', - 'foo_6784', - 'foo_6785', - 'foo_6786', - 'foo_6787', - 'foo_6788', - 'foo_6789', - 'foo_6790', - 'foo_6791', - 'foo_6792', - 'foo_6793', - 'foo_6794', - 'foo_6795', - 'foo_6796', - 'foo_6797', - 'foo_6798', - 'foo_6799', - 'foo_6800', - 'foo_6801', - 'foo_6802', - 'foo_6803', - 'foo_6804', - 'foo_6805', - 'foo_6806', - 'foo_6807', - 'foo_6808', - 'foo_6809', - 'foo_6810', - 'foo_6811', - 'foo_6812', - 'foo_6813', - 'foo_6814', - 'foo_6815', - 'foo_6816', - 'foo_6817', - 'foo_6818', - 'foo_6819', - 'foo_6820', - 'foo_6821', - 'foo_6822', - 'foo_6823', - 'foo_6824', - 'foo_6825', - 'foo_6826', - 'foo_6827', - 'foo_6828', - 'foo_6829', - 'foo_6830', - 'foo_6831', - 'foo_6832', - 'foo_6833', - 'foo_6834', - 'foo_6835', - 'foo_6836', - 'foo_6837', - 'foo_6838', - 'foo_6839', - 'foo_6840', - 'foo_6841', - 'foo_6842', - 'foo_6843', - 'foo_6844', - 'foo_6845', - 'foo_6846', - 'foo_6847', - 'foo_6848', - 'foo_6849', - 'foo_6850', - 'foo_6851', - 'foo_6852', - 'foo_6853', - 'foo_6854', - 'foo_6855', - 'foo_6856', - 'foo_6857', - 'foo_6858', - 'foo_6859', - 'foo_6860', - 'foo_6861', - 'foo_6862', - 'foo_6863', - 'foo_6864', - 'foo_6865', - 'foo_6866', - 'foo_6867', - 'foo_6868', - 'foo_6869', - 'foo_6870', - 'foo_6871', - 'foo_6872', - 'foo_6873', - 'foo_6874', - 'foo_6875', - 'foo_6876', - 'foo_6877', - 'foo_6878', - 'foo_6879', - 'foo_6880', - 'foo_6881', - 'foo_6882', - 'foo_6883', - 'foo_6884', - 'foo_6885', - 'foo_6886', - 'foo_6887', - 'foo_6888', - 'foo_6889', - 'foo_6890', - 'foo_6891', - 'foo_6892', - 'foo_6893', - 'foo_6894', - 'foo_6895', - 'foo_6896', - 'foo_6897', - 'foo_6898', - 'foo_6899', - 'foo_6900', - 'foo_6901', - 'foo_6902', - 'foo_6903', - 'foo_6904', - 'foo_6905', - 'foo_6906', - 'foo_6907', - 'foo_6908', - 'foo_6909', - 'foo_6910', - 'foo_6911', - 'foo_6912', - 'foo_6913', - 'foo_6914', - 'foo_6915', - 'foo_6916', - 'foo_6917', - 'foo_6918', - 'foo_6919', - 'foo_6920', - 'foo_6921', - 'foo_6922', - 'foo_6923', - 'foo_6924', - 'foo_6925', - 'foo_6926', - 'foo_6927', - 'foo_6928', - 'foo_6929', - 'foo_6930', - 'foo_6931', - 'foo_6932', - 'foo_6933', - 'foo_6934', - 'foo_6935', - 'foo_6936', - 'foo_6937', - 'foo_6938', - 'foo_6939', - 'foo_6940', - 'foo_6941', - 'foo_6942', - 'foo_6943', - 'foo_6944', - 'foo_6945', - 'foo_6946', - 'foo_6947', - 'foo_6948', - 'foo_6949', - 'foo_6950', - 'foo_6951', - 'foo_6952', - 'foo_6953', - 'foo_6954', - 'foo_6955', - 'foo_6956', - 'foo_6957', - 'foo_6958', - 'foo_6959', - 'foo_6960', - 'foo_6961', - 'foo_6962', - 'foo_6963', - 'foo_6964', - 'foo_6965', - 'foo_6966', - 'foo_6967', - 'foo_6968', - 'foo_6969', - 'foo_6970', - 'foo_6971', - 'foo_6972', - 'foo_6973', - 'foo_6974', - 'foo_6975', - 'foo_6976', - 'foo_6977', - 'foo_6978', - 'foo_6979', - 'foo_6980', - 'foo_6981', - 'foo_6982', - 'foo_6983', - 'foo_6984', - 'foo_6985', - 'foo_6986', - 'foo_6987', - 'foo_6988', - 'foo_6989', - 'foo_6990', - 'foo_6991', - 'foo_6992', - 'foo_6993', - 'foo_6994', - 'foo_6995', - 'foo_6996', - 'foo_6997', - 'foo_6998', - 'foo_6999', - 'foo_7000', - 'foo_7001', - 'foo_7002', - 'foo_7003', - 'foo_7004', - 'foo_7005', - 'foo_7006', - 'foo_7007', - 'foo_7008', - 'foo_7009', - 'foo_7010', - 'foo_7011', - 'foo_7012', - 'foo_7013', - 'foo_7014', - 'foo_7015', - 'foo_7016', - 'foo_7017', - 'foo_7018', - 'foo_7019', - 'foo_7020', - 'foo_7021', - 'foo_7022', - 'foo_7023', - 'foo_7024', - 'foo_7025', - 'foo_7026', - 'foo_7027', - 'foo_7028', - 'foo_7029', - 'foo_7030', - 'foo_7031', - 'foo_7032', - 'foo_7033', - 'foo_7034', - 'foo_7035', - 'foo_7036', - 'foo_7037', - 'foo_7038', - 'foo_7039', - 'foo_7040', - 'foo_7041', - 'foo_7042', - 'foo_7043', - 'foo_7044', - 'foo_7045', - 'foo_7046', - 'foo_7047', - 'foo_7048', - 'foo_7049', - 'foo_7050', - 'foo_7051', - 'foo_7052', - 'foo_7053', - 'foo_7054', - 'foo_7055', - 'foo_7056', - 'foo_7057', - 'foo_7058', - 'foo_7059', - 'foo_7060', - 'foo_7061', - 'foo_7062', - 'foo_7063', - 'foo_7064', - 'foo_7065', - 'foo_7066', - 'foo_7067', - 'foo_7068', - 'foo_7069', - 'foo_7070', - 'foo_7071', - 'foo_7072', - 'foo_7073', - 'foo_7074', - 'foo_7075', - 'foo_7076', - 'foo_7077', - 'foo_7078', - 'foo_7079', - 'foo_7080', - 'foo_7081', - 'foo_7082', - 'foo_7083', - 'foo_7084', - 'foo_7085', - 'foo_7086', - 'foo_7087', - 'foo_7088', - 'foo_7089', - 'foo_7090', - 'foo_7091', - 'foo_7092', - 'foo_7093', - 'foo_7094', - 'foo_7095', - 'foo_7096', - 'foo_7097', - 'foo_7098', - 'foo_7099', - 'foo_7100', - 'foo_7101', - 'foo_7102', - 'foo_7103', - 'foo_7104', - 'foo_7105', - 'foo_7106', - 'foo_7107', - 'foo_7108', - 'foo_7109', - 'foo_7110', - 'foo_7111', - 'foo_7112', - 'foo_7113', - 'foo_7114', - 'foo_7115', - 'foo_7116', - 'foo_7117', - 'foo_7118', - 'foo_7119', - 'foo_7120', - 'foo_7121', - 'foo_7122', - 'foo_7123', - 'foo_7124', - 'foo_7125', - 'foo_7126', - 'foo_7127', - 'foo_7128', - 'foo_7129', - 'foo_7130', - 'foo_7131', - 'foo_7132', - 'foo_7133', - 'foo_7134', - 'foo_7135', - 'foo_7136', - 'foo_7137', - 'foo_7138', - 'foo_7139', - 'foo_7140', - 'foo_7141', - 'foo_7142', - 'foo_7143', - 'foo_7144', - 'foo_7145', - 'foo_7146', - 'foo_7147', - 'foo_7148', - 'foo_7149', - 'foo_7150', - 'foo_7151', - 'foo_7152', - 'foo_7153', - 'foo_7154', - 'foo_7155', - 'foo_7156', - 'foo_7157', - 'foo_7158', - 'foo_7159', - 'foo_7160', - 'foo_7161', - 'foo_7162', - 'foo_7163', - 'foo_7164', - 'foo_7165', - 'foo_7166', - 'foo_7167', - 'foo_7168', - 'foo_7169', - 'foo_7170', - 'foo_7171', - 'foo_7172', - 'foo_7173', - 'foo_7174', - 'foo_7175', - 'foo_7176', - 'foo_7177', - 'foo_7178', - 'foo_7179', - 'foo_7180', - 'foo_7181', - 'foo_7182', - 'foo_7183', - 'foo_7184', - 'foo_7185', - 'foo_7186', - 'foo_7187', - 'foo_7188', - 'foo_7189', - 'foo_7190', - 'foo_7191', - 'foo_7192', - 'foo_7193', - 'foo_7194', - 'foo_7195', - 'foo_7196', - 'foo_7197', - 'foo_7198', - 'foo_7199', - 'foo_7200', - 'foo_7201', - 'foo_7202', - 'foo_7203', - 'foo_7204', - 'foo_7205', - 'foo_7206', - 'foo_7207', - 'foo_7208', - 'foo_7209', - 'foo_7210', - 'foo_7211', - 'foo_7212', - 'foo_7213', - 'foo_7214', - 'foo_7215', - 'foo_7216', - 'foo_7217', - 'foo_7218', - 'foo_7219', - 'foo_7220', - 'foo_7221', - 'foo_7222', - 'foo_7223', - 'foo_7224', - 'foo_7225', - 'foo_7226', - 'foo_7227', - 'foo_7228', - 'foo_7229', - 'foo_7230', - 'foo_7231', - 'foo_7232', - 'foo_7233', - 'foo_7234', - 'foo_7235', - 'foo_7236', - 'foo_7237', - 'foo_7238', - 'foo_7239', - 'foo_7240', - 'foo_7241', - 'foo_7242', - 'foo_7243', - 'foo_7244', - 'foo_7245', - 'foo_7246', - 'foo_7247', - 'foo_7248', - 'foo_7249', - 'foo_7250', - 'foo_7251', - 'foo_7252', - 'foo_7253', - 'foo_7254', - 'foo_7255', - 'foo_7256', - 'foo_7257', - 'foo_7258', - 'foo_7259', - 'foo_7260', - 'foo_7261', - 'foo_7262', - 'foo_7263', - 'foo_7264', - 'foo_7265', - 'foo_7266', - 'foo_7267', - 'foo_7268', - 'foo_7269', - 'foo_7270', - 'foo_7271', - 'foo_7272', - 'foo_7273', - 'foo_7274', - 'foo_7275', - 'foo_7276', - 'foo_7277', - 'foo_7278', - 'foo_7279', - 'foo_7280', - 'foo_7281', - 'foo_7282', - 'foo_7283', - 'foo_7284', - 'foo_7285', - 'foo_7286', - 'foo_7287', - 'foo_7288', - 'foo_7289', - 'foo_7290', - 'foo_7291', - 'foo_7292', - 'foo_7293', - 'foo_7294', - 'foo_7295', - 'foo_7296', - 'foo_7297', - 'foo_7298', - 'foo_7299', - 'foo_7300', - 'foo_7301', - 'foo_7302', - 'foo_7303', - 'foo_7304', - 'foo_7305', - 'foo_7306', - 'foo_7307', - 'foo_7308', - 'foo_7309', - 'foo_7310', - 'foo_7311', - 'foo_7312', - 'foo_7313', - 'foo_7314', - 'foo_7315', - 'foo_7316', - 'foo_7317', - 'foo_7318', - 'foo_7319', - 'foo_7320', - 'foo_7321', - 'foo_7322', - 'foo_7323', - 'foo_7324', - 'foo_7325', - 'foo_7326', - 'foo_7327', - 'foo_7328', - 'foo_7329', - 'foo_7330', - 'foo_7331', - 'foo_7332', - 'foo_7333', - 'foo_7334', - 'foo_7335', - 'foo_7336', - 'foo_7337', - 'foo_7338', - 'foo_7339', - 'foo_7340', - 'foo_7341', - 'foo_7342', - 'foo_7343', - 'foo_7344', - 'foo_7345', - 'foo_7346', - 'foo_7347', - 'foo_7348', - 'foo_7349', - 'foo_7350', - 'foo_7351', - 'foo_7352', - 'foo_7353', - 'foo_7354', - 'foo_7355', - 'foo_7356', - 'foo_7357', - 'foo_7358', - 'foo_7359', - 'foo_7360', - 'foo_7361', - 'foo_7362', - 'foo_7363', - 'foo_7364', - 'foo_7365', - 'foo_7366', - 'foo_7367', - 'foo_7368', - 'foo_7369', - 'foo_7370', - 'foo_7371', - 'foo_7372', - 'foo_7373', - 'foo_7374', - 'foo_7375', - 'foo_7376', - 'foo_7377', - 'foo_7378', - 'foo_7379', - 'foo_7380', - 'foo_7381', - 'foo_7382', - 'foo_7383', - 'foo_7384', - 'foo_7385', - 'foo_7386', - 'foo_7387', - 'foo_7388', - 'foo_7389', - 'foo_7390', - 'foo_7391', - 'foo_7392', - 'foo_7393', - 'foo_7394', - 'foo_7395', - 'foo_7396', - 'foo_7397', - 'foo_7398', - 'foo_7399', - 'foo_7400', - 'foo_7401', - 'foo_7402', - 'foo_7403', - 'foo_7404', - 'foo_7405', - 'foo_7406', - 'foo_7407', - 'foo_7408', - 'foo_7409', - 'foo_7410', - 'foo_7411', - 'foo_7412', - 'foo_7413', - 'foo_7414', - 'foo_7415', - 'foo_7416', - 'foo_7417', - 'foo_7418', - 'foo_7419', - 'foo_7420', - 'foo_7421', - 'foo_7422', - 'foo_7423', - 'foo_7424', - 'foo_7425', - 'foo_7426', - 'foo_7427', - 'foo_7428', - 'foo_7429', - 'foo_7430', - 'foo_7431', - 'foo_7432', - 'foo_7433', - 'foo_7434', - 'foo_7435', - 'foo_7436', - 'foo_7437', - 'foo_7438', - 'foo_7439', - 'foo_7440', - 'foo_7441', - 'foo_7442', - 'foo_7443', - 'foo_7444', - 'foo_7445', - 'foo_7446', - 'foo_7447', - 'foo_7448', - 'foo_7449', - 'foo_7450', - 'foo_7451', - 'foo_7452', - 'foo_7453', - 'foo_7454', - 'foo_7455', - 'foo_7456', - 'foo_7457', - 'foo_7458', - 'foo_7459', - 'foo_7460', - 'foo_7461', - 'foo_7462', - 'foo_7463', - 'foo_7464', - 'foo_7465', - 'foo_7466', - 'foo_7467', - 'foo_7468', - 'foo_7469', - 'foo_7470', - 'foo_7471', - 'foo_7472', - 'foo_7473', - 'foo_7474', - 'foo_7475', - 'foo_7476', - 'foo_7477', - 'foo_7478', - 'foo_7479', - 'foo_7480', - 'foo_7481', - 'foo_7482', - 'foo_7483', - 'foo_7484', - 'foo_7485', - 'foo_7486', - 'foo_7487', - 'foo_7488', - 'foo_7489', - 'foo_7490', - 'foo_7491', - 'foo_7492', - 'foo_7493', - 'foo_7494', - 'foo_7495', - 'foo_7496', - 'foo_7497', - 'foo_7498', - 'foo_7499', - 'foo_7500', - 'foo_7501', - 'foo_7502', - 'foo_7503', - 'foo_7504', - 'foo_7505', - 'foo_7506', - 'foo_7507', - 'foo_7508', - 'foo_7509', - 'foo_7510', - 'foo_7511', - 'foo_7512', - 'foo_7513', - 'foo_7514', - 'foo_7515', - 'foo_7516', - 'foo_7517', - 'foo_7518', - 'foo_7519', - 'foo_7520', - 'foo_7521', - 'foo_7522', - 'foo_7523', - 'foo_7524', - 'foo_7525', - 'foo_7526', - 'foo_7527', - 'foo_7528', - 'foo_7529', - 'foo_7530', - 'foo_7531', - 'foo_7532', - 'foo_7533', - 'foo_7534', - 'foo_7535', - 'foo_7536', - 'foo_7537', - 'foo_7538', - 'foo_7539', - 'foo_7540', - 'foo_7541', - 'foo_7542', - 'foo_7543', - 'foo_7544', - 'foo_7545', - 'foo_7546', - 'foo_7547', - 'foo_7548', - 'foo_7549', - 'foo_7550', - 'foo_7551', - 'foo_7552', - 'foo_7553', - 'foo_7554', - 'foo_7555', - 'foo_7556', - 'foo_7557', - 'foo_7558', - 'foo_7559', - 'foo_7560', - 'foo_7561', - 'foo_7562', - 'foo_7563', - 'foo_7564', - 'foo_7565', - 'foo_7566', - 'foo_7567', - 'foo_7568', - 'foo_7569', - 'foo_7570', - 'foo_7571', - 'foo_7572', - 'foo_7573', - 'foo_7574', - 'foo_7575', - 'foo_7576', - 'foo_7577', - 'foo_7578', - 'foo_7579', - 'foo_7580', - 'foo_7581', - 'foo_7582', - 'foo_7583', - 'foo_7584', - 'foo_7585', - 'foo_7586', - 'foo_7587', - 'foo_7588', - 'foo_7589', - 'foo_7590', - 'foo_7591', - 'foo_7592', - 'foo_7593', - 'foo_7594', - 'foo_7595', - 'foo_7596', - 'foo_7597', - 'foo_7598', - 'foo_7599', - 'foo_7600', - 'foo_7601', - 'foo_7602', - 'foo_7603', - 'foo_7604', - 'foo_7605', - 'foo_7606', - 'foo_7607', - 'foo_7608', - 'foo_7609', - 'foo_7610', - 'foo_7611', - 'foo_7612', - 'foo_7613', - 'foo_7614', - 'foo_7615', - 'foo_7616', - 'foo_7617', - 'foo_7618', - 'foo_7619', - 'foo_7620', - 'foo_7621', - 'foo_7622', - 'foo_7623', - 'foo_7624', - 'foo_7625', - 'foo_7626', - 'foo_7627', - 'foo_7628', - 'foo_7629', - 'foo_7630', - 'foo_7631', - 'foo_7632', - 'foo_7633', - 'foo_7634', - 'foo_7635', - 'foo_7636', - 'foo_7637', - 'foo_7638', - 'foo_7639', - 'foo_7640', - 'foo_7641', - 'foo_7642', - 'foo_7643', - 'foo_7644', - 'foo_7645', - 'foo_7646', - 'foo_7647', - 'foo_7648', - 'foo_7649', - 'foo_7650', - 'foo_7651', - 'foo_7652', - 'foo_7653', - 'foo_7654', - 'foo_7655', - 'foo_7656', - 'foo_7657', - 'foo_7658', - 'foo_7659', - 'foo_7660', - 'foo_7661', - 'foo_7662', - 'foo_7663', - 'foo_7664', - 'foo_7665', - 'foo_7666', - 'foo_7667', - 'foo_7668', - 'foo_7669', - 'foo_7670', - 'foo_7671', - 'foo_7672', - 'foo_7673', - 'foo_7674', - 'foo_7675', - 'foo_7676', - 'foo_7677', - 'foo_7678', - 'foo_7679', - 'foo_7680', - 'foo_7681', - 'foo_7682', - 'foo_7683', - 'foo_7684', - 'foo_7685', - 'foo_7686', - 'foo_7687', - 'foo_7688', - 'foo_7689', - 'foo_7690', - 'foo_7691', - 'foo_7692', - 'foo_7693', - 'foo_7694', - 'foo_7695', - 'foo_7696', - 'foo_7697', - 'foo_7698', - 'foo_7699', - 'foo_7700', - 'foo_7701', - 'foo_7702', - 'foo_7703', - 'foo_7704', - 'foo_7705', - 'foo_7706', - 'foo_7707', - 'foo_7708', - 'foo_7709', - 'foo_7710', - 'foo_7711', - 'foo_7712', - 'foo_7713', - 'foo_7714', - 'foo_7715', - 'foo_7716', - 'foo_7717', - 'foo_7718', - 'foo_7719', - 'foo_7720', - 'foo_7721', - 'foo_7722', - 'foo_7723', - 'foo_7724', - 'foo_7725', - 'foo_7726', - 'foo_7727', - 'foo_7728', - 'foo_7729', - 'foo_7730', - 'foo_7731', - 'foo_7732', - 'foo_7733', - 'foo_7734', - 'foo_7735', - 'foo_7736', - 'foo_7737', - 'foo_7738', - 'foo_7739', - 'foo_7740', - 'foo_7741', - 'foo_7742', - 'foo_7743', - 'foo_7744', - 'foo_7745', - 'foo_7746', - 'foo_7747', - 'foo_7748', - 'foo_7749', - 'foo_7750', - 'foo_7751', - 'foo_7752', - 'foo_7753', - 'foo_7754', - 'foo_7755', - 'foo_7756', - 'foo_7757', - 'foo_7758', - 'foo_7759', - 'foo_7760', - 'foo_7761', - 'foo_7762', - 'foo_7763', - 'foo_7764', - 'foo_7765', - 'foo_7766', - 'foo_7767', - 'foo_7768', - 'foo_7769', - 'foo_7770', - 'foo_7771', - 'foo_7772', - 'foo_7773', - 'foo_7774', - 'foo_7775', - 'foo_7776', - 'foo_7777', - 'foo_7778', - 'foo_7779', - 'foo_7780', - 'foo_7781', - 'foo_7782', - 'foo_7783', - 'foo_7784', - 'foo_7785', - 'foo_7786', - 'foo_7787', - 'foo_7788', - 'foo_7789', - 'foo_7790', - 'foo_7791', - 'foo_7792', - 'foo_7793', - 'foo_7794', - 'foo_7795', - 'foo_7796', - 'foo_7797', - 'foo_7798', - 'foo_7799', - 'foo_7800', - 'foo_7801', - 'foo_7802', - 'foo_7803', - 'foo_7804', - 'foo_7805', - 'foo_7806', - 'foo_7807', - 'foo_7808', - 'foo_7809', - 'foo_7810', - 'foo_7811', - 'foo_7812', - 'foo_7813', - 'foo_7814', - 'foo_7815', - 'foo_7816', - 'foo_7817', - 'foo_7818', - 'foo_7819', - 'foo_7820', - 'foo_7821', - 'foo_7822', - 'foo_7823', - 'foo_7824', - 'foo_7825', - 'foo_7826', - 'foo_7827', - 'foo_7828', - 'foo_7829', - 'foo_7830', - 'foo_7831', - 'foo_7832', - 'foo_7833', - 'foo_7834', - 'foo_7835', - 'foo_7836', - 'foo_7837', - 'foo_7838', - 'foo_7839', - 'foo_7840', - 'foo_7841', - 'foo_7842', - 'foo_7843', - 'foo_7844', - 'foo_7845', - 'foo_7846', - 'foo_7847', - 'foo_7848', - 'foo_7849', - 'foo_7850', - 'foo_7851', - 'foo_7852', - 'foo_7853', - 'foo_7854', - 'foo_7855', - 'foo_7856', - 'foo_7857', - 'foo_7858', - 'foo_7859', - 'foo_7860', - 'foo_7861', - 'foo_7862', - 'foo_7863', - 'foo_7864', - 'foo_7865', - 'foo_7866', - 'foo_7867', - 'foo_7868', - 'foo_7869', - 'foo_7870', - 'foo_7871', - 'foo_7872', - 'foo_7873', - 'foo_7874', - 'foo_7875', - 'foo_7876', - 'foo_7877', - 'foo_7878', - 'foo_7879', - 'foo_7880', - 'foo_7881', - 'foo_7882', - 'foo_7883', - 'foo_7884', - 'foo_7885', - 'foo_7886', - 'foo_7887', - 'foo_7888', - 'foo_7889', - 'foo_7890', - 'foo_7891', - 'foo_7892', - 'foo_7893', - 'foo_7894', - 'foo_7895', - 'foo_7896', - 'foo_7897', - 'foo_7898', - 'foo_7899', - 'foo_7900', - 'foo_7901', - 'foo_7902', - 'foo_7903', - 'foo_7904', - 'foo_7905', - 'foo_7906', - 'foo_7907', - 'foo_7908', - 'foo_7909', - 'foo_7910', - 'foo_7911', - 'foo_7912', - 'foo_7913', - 'foo_7914', - 'foo_7915', - 'foo_7916', - 'foo_7917', - 'foo_7918', - 'foo_7919', - 'foo_7920', - 'foo_7921', - 'foo_7922', - 'foo_7923', - 'foo_7924', - 'foo_7925', - 'foo_7926', - 'foo_7927', - 'foo_7928', - 'foo_7929', - 'foo_7930', - 'foo_7931', - 'foo_7932', - 'foo_7933', - 'foo_7934', - 'foo_7935', - 'foo_7936', - 'foo_7937', - 'foo_7938', - 'foo_7939', - 'foo_7940', - 'foo_7941', - 'foo_7942', - 'foo_7943', - 'foo_7944', - 'foo_7945', - 'foo_7946', - 'foo_7947', - 'foo_7948', - 'foo_7949', - 'foo_7950', - 'foo_7951', - 'foo_7952', - 'foo_7953', - 'foo_7954', - 'foo_7955', - 'foo_7956', - 'foo_7957', - 'foo_7958', - 'foo_7959', - 'foo_7960', - 'foo_7961', - 'foo_7962', - 'foo_7963', - 'foo_7964', - 'foo_7965', - 'foo_7966', - 'foo_7967', - 'foo_7968', - 'foo_7969', - 'foo_7970', - 'foo_7971', - 'foo_7972', - 'foo_7973', - 'foo_7974', - 'foo_7975', - 'foo_7976', - 'foo_7977', - 'foo_7978', - 'foo_7979', - 'foo_7980', - 'foo_7981', - 'foo_7982', - 'foo_7983', - 'foo_7984', - 'foo_7985', - 'foo_7986', - 'foo_7987', - 'foo_7988', - 'foo_7989', - 'foo_7990', - 'foo_7991', - 'foo_7992', - 'foo_7993', - 'foo_7994', - 'foo_7995', - 'foo_7996', - 'foo_7997', - 'foo_7998', - 'foo_7999', - 'foo_8000', - 'foo_8001', - 'foo_8002', - 'foo_8003', - 'foo_8004', - 'foo_8005', - 'foo_8006', - 'foo_8007', - 'foo_8008', - 'foo_8009', - 'foo_8010', - 'foo_8011', - 'foo_8012', - 'foo_8013', - 'foo_8014', - 'foo_8015', - 'foo_8016', - 'foo_8017', - 'foo_8018', - 'foo_8019', - 'foo_8020', - 'foo_8021', - 'foo_8022', - 'foo_8023', - 'foo_8024', - 'foo_8025', - 'foo_8026', - 'foo_8027', - 'foo_8028', - 'foo_8029', - 'foo_8030', - 'foo_8031', - 'foo_8032', - 'foo_8033', - 'foo_8034', - 'foo_8035', - 'foo_8036', - 'foo_8037', - 'foo_8038', - 'foo_8039', - 'foo_8040', - 'foo_8041', - 'foo_8042', - 'foo_8043', - 'foo_8044', - 'foo_8045', - 'foo_8046', - 'foo_8047', - 'foo_8048', - 'foo_8049', - 'foo_8050', - 'foo_8051', - 'foo_8052', - 'foo_8053', - 'foo_8054', - 'foo_8055', - 'foo_8056', - 'foo_8057', - 'foo_8058', - 'foo_8059', - 'foo_8060', - 'foo_8061', - 'foo_8062', - 'foo_8063', - 'foo_8064', - 'foo_8065', - 'foo_8066', - 'foo_8067', - 'foo_8068', - 'foo_8069', - 'foo_8070', - 'foo_8071', - 'foo_8072', - 'foo_8073', - 'foo_8074', - 'foo_8075', - 'foo_8076', - 'foo_8077', - 'foo_8078', - 'foo_8079', - 'foo_8080', - 'foo_8081', - 'foo_8082', - 'foo_8083', - 'foo_8084', - 'foo_8085', - 'foo_8086', - 'foo_8087', - 'foo_8088', - 'foo_8089', - 'foo_8090', - 'foo_8091', - 'foo_8092', - 'foo_8093', - 'foo_8094', - 'foo_8095', - 'foo_8096', - 'foo_8097', - 'foo_8098', - 'foo_8099', - 'foo_8100', - 'foo_8101', - 'foo_8102', - 'foo_8103', - 'foo_8104', - 'foo_8105', - 'foo_8106', - 'foo_8107', - 'foo_8108', - 'foo_8109', - 'foo_8110', - 'foo_8111', - 'foo_8112', - 'foo_8113', - 'foo_8114', - 'foo_8115', - 'foo_8116', - 'foo_8117', - 'foo_8118', - 'foo_8119', - 'foo_8120', - 'foo_8121', - 'foo_8122', - 'foo_8123', - 'foo_8124', - 'foo_8125', - 'foo_8126', - 'foo_8127', - 'foo_8128', - 'foo_8129', - 'foo_8130', - 'foo_8131', - 'foo_8132', - 'foo_8133', - 'foo_8134', - 'foo_8135', - 'foo_8136', - 'foo_8137', - 'foo_8138', - 'foo_8139', - 'foo_8140', - 'foo_8141', - 'foo_8142', - 'foo_8143', - 'foo_8144', - 'foo_8145', - 'foo_8146', - 'foo_8147', - 'foo_8148', - 'foo_8149', - 'foo_8150', - 'foo_8151', - 'foo_8152', - 'foo_8153', - 'foo_8154', - 'foo_8155', - 'foo_8156', - 'foo_8157', - 'foo_8158', - 'foo_8159', - 'foo_8160', - 'foo_8161', - 'foo_8162', - 'foo_8163', - 'foo_8164', - 'foo_8165', - 'foo_8166', - 'foo_8167', - 'foo_8168', - 'foo_8169', - 'foo_8170', - 'foo_8171', - 'foo_8172', - 'foo_8173', - 'foo_8174', - 'foo_8175', - 'foo_8176', - 'foo_8177', - 'foo_8178', - 'foo_8179', - 'foo_8180', - 'foo_8181', - 'foo_8182', - 'foo_8183', - 'foo_8184', - 'foo_8185', - 'foo_8186', - 'foo_8187', - 'foo_8188', - 'foo_8189', - 'foo_8190', - 'foo_8191', - 'foo_8192', - 'foo_8193', - 'foo_8194', - 'foo_8195', - 'foo_8196', - 'foo_8197', - 'foo_8198', - 'foo_8199', - 'foo_8200', - 'foo_8201', - 'foo_8202', - 'foo_8203', - 'foo_8204', - 'foo_8205', - 'foo_8206', - 'foo_8207', - 'foo_8208', - 'foo_8209', - 'foo_8210', - 'foo_8211', - 'foo_8212', - 'foo_8213', - 'foo_8214', - 'foo_8215', - 'foo_8216', - 'foo_8217', - 'foo_8218', - 'foo_8219', - 'foo_8220', - 'foo_8221', - 'foo_8222', - 'foo_8223', - 'foo_8224', - 'foo_8225', - 'foo_8226', - 'foo_8227', - 'foo_8228', - 'foo_8229', - 'foo_8230', - 'foo_8231', - 'foo_8232', - 'foo_8233', - 'foo_8234', - 'foo_8235', - 'foo_8236', - 'foo_8237', - 'foo_8238', - 'foo_8239', - 'foo_8240', - 'foo_8241', - 'foo_8242', - 'foo_8243', - 'foo_8244', - 'foo_8245', - 'foo_8246', - 'foo_8247', - 'foo_8248', - 'foo_8249', - 'foo_8250', - 'foo_8251', - 'foo_8252', - 'foo_8253', - 'foo_8254', - 'foo_8255', - 'foo_8256', - 'foo_8257', - 'foo_8258', - 'foo_8259', - 'foo_8260', - 'foo_8261', - 'foo_8262', - 'foo_8263', - 'foo_8264', - 'foo_8265', - 'foo_8266', - 'foo_8267', - 'foo_8268', - 'foo_8269', - 'foo_8270', - 'foo_8271', - 'foo_8272', - 'foo_8273', - 'foo_8274', - 'foo_8275', - 'foo_8276', - 'foo_8277', - 'foo_8278', - 'foo_8279', - 'foo_8280', - 'foo_8281', - 'foo_8282', - 'foo_8283', - 'foo_8284', - 'foo_8285', - 'foo_8286', - 'foo_8287', - 'foo_8288', - 'foo_8289', - 'foo_8290', - 'foo_8291', - 'foo_8292', - 'foo_8293', - 'foo_8294', - 'foo_8295', - 'foo_8296', - 'foo_8297', - 'foo_8298', - 'foo_8299', - 'foo_8300', - 'foo_8301', - 'foo_8302', - 'foo_8303', - 'foo_8304', - 'foo_8305', - 'foo_8306', - 'foo_8307', - 'foo_8308', - 'foo_8309', - 'foo_8310', - 'foo_8311', - 'foo_8312', - 'foo_8313', - 'foo_8314', - 'foo_8315', - 'foo_8316', - 'foo_8317', - 'foo_8318', - 'foo_8319', - 'foo_8320', - 'foo_8321', - 'foo_8322', - 'foo_8323', - 'foo_8324', - 'foo_8325', - 'foo_8326', - 'foo_8327', - 'foo_8328', - 'foo_8329', - 'foo_8330', - 'foo_8331', - 'foo_8332', - 'foo_8333', - 'foo_8334', - 'foo_8335', - 'foo_8336', - 'foo_8337', - 'foo_8338', - 'foo_8339', - 'foo_8340', - 'foo_8341', - 'foo_8342', - 'foo_8343', - 'foo_8344', - 'foo_8345', - 'foo_8346', - 'foo_8347', - 'foo_8348', - 'foo_8349', - 'foo_8350', - 'foo_8351', - 'foo_8352', - 'foo_8353', - 'foo_8354', - 'foo_8355', - 'foo_8356', - 'foo_8357', - 'foo_8358', - 'foo_8359', - 'foo_8360', - 'foo_8361', - 'foo_8362', - 'foo_8363', - 'foo_8364', - 'foo_8365', - 'foo_8366', - 'foo_8367', - 'foo_8368', - 'foo_8369', - 'foo_8370', - 'foo_8371', - 'foo_8372', - 'foo_8373', - 'foo_8374', - 'foo_8375', - 'foo_8376', - 'foo_8377', - 'foo_8378', - 'foo_8379', - 'foo_8380', - 'foo_8381', - 'foo_8382', - 'foo_8383', - 'foo_8384', - 'foo_8385', - 'foo_8386', - 'foo_8387', - 'foo_8388', - 'foo_8389', - 'foo_8390', - 'foo_8391', - 'foo_8392', - 'foo_8393', - 'foo_8394', - 'foo_8395', - 'foo_8396', - 'foo_8397', - 'foo_8398', - 'foo_8399', - 'foo_8400', - 'foo_8401', - 'foo_8402', - 'foo_8403', - 'foo_8404', - 'foo_8405', - 'foo_8406', - 'foo_8407', - 'foo_8408', - 'foo_8409', - 'foo_8410', - 'foo_8411', - 'foo_8412', - 'foo_8413', - 'foo_8414', - 'foo_8415', - 'foo_8416', - 'foo_8417', - 'foo_8418', - 'foo_8419', - 'foo_8420', - 'foo_8421', - 'foo_8422', - 'foo_8423', - 'foo_8424', - 'foo_8425', - 'foo_8426', - 'foo_8427', - 'foo_8428', - 'foo_8429', - 'foo_8430', - 'foo_8431', - 'foo_8432', - 'foo_8433', - 'foo_8434', - 'foo_8435', - 'foo_8436', - 'foo_8437', - 'foo_8438', - 'foo_8439', - 'foo_8440', - 'foo_8441', - 'foo_8442', - 'foo_8443', - 'foo_8444', - 'foo_8445', - 'foo_8446', - 'foo_8447', - 'foo_8448', - 'foo_8449', - 'foo_8450', - 'foo_8451', - 'foo_8452', - 'foo_8453', - 'foo_8454', - 'foo_8455', - 'foo_8456', - 'foo_8457', - 'foo_8458', - 'foo_8459', - 'foo_8460', - 'foo_8461', - 'foo_8462', - 'foo_8463', - 'foo_8464', - 'foo_8465', - 'foo_8466', - 'foo_8467', - 'foo_8468', - 'foo_8469', - 'foo_8470', - 'foo_8471', - 'foo_8472', - 'foo_8473', - 'foo_8474', - 'foo_8475', - 'foo_8476', - 'foo_8477', - 'foo_8478', - 'foo_8479', - 'foo_8480', - 'foo_8481', - 'foo_8482', - 'foo_8483', - 'foo_8484', - 'foo_8485', - 'foo_8486', - 'foo_8487', - 'foo_8488', - 'foo_8489', - 'foo_8490', - 'foo_8491', - 'foo_8492', - 'foo_8493', - 'foo_8494', - 'foo_8495', - 'foo_8496', - 'foo_8497', - 'foo_8498', - 'foo_8499', - 'foo_8500', - 'foo_8501', - 'foo_8502', - 'foo_8503', - 'foo_8504', - 'foo_8505', - 'foo_8506', - 'foo_8507', - 'foo_8508', - 'foo_8509', - 'foo_8510', - 'foo_8511', - 'foo_8512', - 'foo_8513', - 'foo_8514', - 'foo_8515', - 'foo_8516', - 'foo_8517', - 'foo_8518', - 'foo_8519', - 'foo_8520', - 'foo_8521', - 'foo_8522', - 'foo_8523', - 'foo_8524', - 'foo_8525', - 'foo_8526', - 'foo_8527', - 'foo_8528', - 'foo_8529', - 'foo_8530', - 'foo_8531', - 'foo_8532', - 'foo_8533', - 'foo_8534', - 'foo_8535', - 'foo_8536', - 'foo_8537', - 'foo_8538', - 'foo_8539', - 'foo_8540', - 'foo_8541', - 'foo_8542', - 'foo_8543', - 'foo_8544', - 'foo_8545', - 'foo_8546', - 'foo_8547', - 'foo_8548', - 'foo_8549', - 'foo_8550', - 'foo_8551', - 'foo_8552', - 'foo_8553', - 'foo_8554', - 'foo_8555', - 'foo_8556', - 'foo_8557', - 'foo_8558', - 'foo_8559', - 'foo_8560', - 'foo_8561', - 'foo_8562', - 'foo_8563', - 'foo_8564', - 'foo_8565', - 'foo_8566', - 'foo_8567', - 'foo_8568', - 'foo_8569', - 'foo_8570', - 'foo_8571', - 'foo_8572', - 'foo_8573', - 'foo_8574', - 'foo_8575', - 'foo_8576', - 'foo_8577', - 'foo_8578', - 'foo_8579', - 'foo_8580', - 'foo_8581', - 'foo_8582', - 'foo_8583', - 'foo_8584', - 'foo_8585', - 'foo_8586', - 'foo_8587', - 'foo_8588', - 'foo_8589', - 'foo_8590', - 'foo_8591', - 'foo_8592', - 'foo_8593', - 'foo_8594', - 'foo_8595', - 'foo_8596', - 'foo_8597', - 'foo_8598', - 'foo_8599', - 'foo_8600', - 'foo_8601', - 'foo_8602', - 'foo_8603', - 'foo_8604', - 'foo_8605', - 'foo_8606', - 'foo_8607', - 'foo_8608', - 'foo_8609', - 'foo_8610', - 'foo_8611', - 'foo_8612', - 'foo_8613', - 'foo_8614', - 'foo_8615', - 'foo_8616', - 'foo_8617', - 'foo_8618', - 'foo_8619', - 'foo_8620', - 'foo_8621', - 'foo_8622', - 'foo_8623', - 'foo_8624', - 'foo_8625', - 'foo_8626', - 'foo_8627', - 'foo_8628', - 'foo_8629', - 'foo_8630', - 'foo_8631', - 'foo_8632', - 'foo_8633', - 'foo_8634', - 'foo_8635', - 'foo_8636', - 'foo_8637', - 'foo_8638', - 'foo_8639', - 'foo_8640', - 'foo_8641', - 'foo_8642', - 'foo_8643', - 'foo_8644', - 'foo_8645', - 'foo_8646', - 'foo_8647', - 'foo_8648', - 'foo_8649', - 'foo_8650', - 'foo_8651', - 'foo_8652', - 'foo_8653', - 'foo_8654', - 'foo_8655', - 'foo_8656', - 'foo_8657', - 'foo_8658', - 'foo_8659', - 'foo_8660', - 'foo_8661', - 'foo_8662', - 'foo_8663', - 'foo_8664', - 'foo_8665', - 'foo_8666', - 'foo_8667', - 'foo_8668', - 'foo_8669', - 'foo_8670', - 'foo_8671', - 'foo_8672', - 'foo_8673', - 'foo_8674', - 'foo_8675', - 'foo_8676', - 'foo_8677', - 'foo_8678', - 'foo_8679', - 'foo_8680', - 'foo_8681', - 'foo_8682', - 'foo_8683', - 'foo_8684', - 'foo_8685', - 'foo_8686', - 'foo_8687', - 'foo_8688', - 'foo_8689', - 'foo_8690', - 'foo_8691', - 'foo_8692', - 'foo_8693', - 'foo_8694', - 'foo_8695', - 'foo_8696', - 'foo_8697', - 'foo_8698', - 'foo_8699', - 'foo_8700', - 'foo_8701', - 'foo_8702', - 'foo_8703', - 'foo_8704', - 'foo_8705', - 'foo_8706', - 'foo_8707', - 'foo_8708', - 'foo_8709', - 'foo_8710', - 'foo_8711', - 'foo_8712', - 'foo_8713', - 'foo_8714', - 'foo_8715', - 'foo_8716', - 'foo_8717', - 'foo_8718', - 'foo_8719', - 'foo_8720', - 'foo_8721', - 'foo_8722', - 'foo_8723', - 'foo_8724', - 'foo_8725', - 'foo_8726', - 'foo_8727', - 'foo_8728', - 'foo_8729', - 'foo_8730', - 'foo_8731', - 'foo_8732', - 'foo_8733', - 'foo_8734', - 'foo_8735', - 'foo_8736', - 'foo_8737', - 'foo_8738', - 'foo_8739', - 'foo_8740', - 'foo_8741', - 'foo_8742', - 'foo_8743', - 'foo_8744', - 'foo_8745', - 'foo_8746', - 'foo_8747', - 'foo_8748', - 'foo_8749', - 'foo_8750', - 'foo_8751', - 'foo_8752', - 'foo_8753', - 'foo_8754', - 'foo_8755', - 'foo_8756', - 'foo_8757', - 'foo_8758', - 'foo_8759', - 'foo_8760', - 'foo_8761', - 'foo_8762', - 'foo_8763', - 'foo_8764', - 'foo_8765', - 'foo_8766', - 'foo_8767', - 'foo_8768', - 'foo_8769', - 'foo_8770', - 'foo_8771', - 'foo_8772', - 'foo_8773', - 'foo_8774', - 'foo_8775', - 'foo_8776', - 'foo_8777', - 'foo_8778', - 'foo_8779', - 'foo_8780', - 'foo_8781', - 'foo_8782', - 'foo_8783', - 'foo_8784', - 'foo_8785', - 'foo_8786', - 'foo_8787', - 'foo_8788', - 'foo_8789', - 'foo_8790', - 'foo_8791', - 'foo_8792', - 'foo_8793', - 'foo_8794', - 'foo_8795', - 'foo_8796', - 'foo_8797', - 'foo_8798', - 'foo_8799', - 'foo_8800', - 'foo_8801', - 'foo_8802', - 'foo_8803', - 'foo_8804', - 'foo_8805', - 'foo_8806', - 'foo_8807', - 'foo_8808', - 'foo_8809', - 'foo_8810', - 'foo_8811', - 'foo_8812', - 'foo_8813', - 'foo_8814', - 'foo_8815', - 'foo_8816', - 'foo_8817', - 'foo_8818', - 'foo_8819', - 'foo_8820', - 'foo_8821', - 'foo_8822', - 'foo_8823', - 'foo_8824', - 'foo_8825', - 'foo_8826', - 'foo_8827', - 'foo_8828', - 'foo_8829', - 'foo_8830', - 'foo_8831', - 'foo_8832', - 'foo_8833', - 'foo_8834', - 'foo_8835', - 'foo_8836', - 'foo_8837', - 'foo_8838', - 'foo_8839', - 'foo_8840', - 'foo_8841', - 'foo_8842', - 'foo_8843', - 'foo_8844', - 'foo_8845', - 'foo_8846', - 'foo_8847', - 'foo_8848', - 'foo_8849', - 'foo_8850', - 'foo_8851', - 'foo_8852', - 'foo_8853', - 'foo_8854', - 'foo_8855', - 'foo_8856', - 'foo_8857', - 'foo_8858', - 'foo_8859', - 'foo_8860', - 'foo_8861', - 'foo_8862', - 'foo_8863', - 'foo_8864', - 'foo_8865', - 'foo_8866', - 'foo_8867', - 'foo_8868', - 'foo_8869', - 'foo_8870', - 'foo_8871', - 'foo_8872', - 'foo_8873', - 'foo_8874', - 'foo_8875', - 'foo_8876', - 'foo_8877', - 'foo_8878', - 'foo_8879', - 'foo_8880', - 'foo_8881', - 'foo_8882', - 'foo_8883', - 'foo_8884', - 'foo_8885', - 'foo_8886', - 'foo_8887', - 'foo_8888', - 'foo_8889', - 'foo_8890', - 'foo_8891', - 'foo_8892', - 'foo_8893', - 'foo_8894', - 'foo_8895', - 'foo_8896', - 'foo_8897', - 'foo_8898', - 'foo_8899', - 'foo_8900', - 'foo_8901', - 'foo_8902', - 'foo_8903', - 'foo_8904', - 'foo_8905', - 'foo_8906', - 'foo_8907', - 'foo_8908', - 'foo_8909', - 'foo_8910', - 'foo_8911', - 'foo_8912', - 'foo_8913', - 'foo_8914', - 'foo_8915', - 'foo_8916', - 'foo_8917', - 'foo_8918', - 'foo_8919', - 'foo_8920', - 'foo_8921', - 'foo_8922', - 'foo_8923', - 'foo_8924', - 'foo_8925', - 'foo_8926', - 'foo_8927', - 'foo_8928', - 'foo_8929', - 'foo_8930', - 'foo_8931', - 'foo_8932', - 'foo_8933', - 'foo_8934', - 'foo_8935', - 'foo_8936', - 'foo_8937', - 'foo_8938', - 'foo_8939', - 'foo_8940', - 'foo_8941', - 'foo_8942', - 'foo_8943', - 'foo_8944', - 'foo_8945', - 'foo_8946', - 'foo_8947', - 'foo_8948', - 'foo_8949', - 'foo_8950', - 'foo_8951', - 'foo_8952', - 'foo_8953', - 'foo_8954', - 'foo_8955', - 'foo_8956', - 'foo_8957', - 'foo_8958', - 'foo_8959', - 'foo_8960', - 'foo_8961', - 'foo_8962', - 'foo_8963', - 'foo_8964', - 'foo_8965', - 'foo_8966', - 'foo_8967', - 'foo_8968', - 'foo_8969', - 'foo_8970', - 'foo_8971', - 'foo_8972', - 'foo_8973', - 'foo_8974', - 'foo_8975', - 'foo_8976', - 'foo_8977', - 'foo_8978', - 'foo_8979', - 'foo_8980', - 'foo_8981', - 'foo_8982', - 'foo_8983', - 'foo_8984', - 'foo_8985', - 'foo_8986', - 'foo_8987', - 'foo_8988', - 'foo_8989', - 'foo_8990', - 'foo_8991', - 'foo_8992', - 'foo_8993', - 'foo_8994', - 'foo_8995', - 'foo_8996', - 'foo_8997', - 'foo_8998', - 'foo_8999', - 'foo_9000', - 'foo_9001', - 'foo_9002', - 'foo_9003', - 'foo_9004', - 'foo_9005', - 'foo_9006', - 'foo_9007', - 'foo_9008', - 'foo_9009', - 'foo_9010', - 'foo_9011', - 'foo_9012', - 'foo_9013', - 'foo_9014', - 'foo_9015', - 'foo_9016', - 'foo_9017', - 'foo_9018', - 'foo_9019', - 'foo_9020', - 'foo_9021', - 'foo_9022', - 'foo_9023', - 'foo_9024', - 'foo_9025', - 'foo_9026', - 'foo_9027', - 'foo_9028', - 'foo_9029', - 'foo_9030', - 'foo_9031', - 'foo_9032', - 'foo_9033', - 'foo_9034', - 'foo_9035', - 'foo_9036', - 'foo_9037', - 'foo_9038', - 'foo_9039', - 'foo_9040', - 'foo_9041', - 'foo_9042', - 'foo_9043', - 'foo_9044', - 'foo_9045', - 'foo_9046', - 'foo_9047', - 'foo_9048', - 'foo_9049', - 'foo_9050', - 'foo_9051', - 'foo_9052', - 'foo_9053', - 'foo_9054', - 'foo_9055', - 'foo_9056', - 'foo_9057', - 'foo_9058', - 'foo_9059', - 'foo_9060', - 'foo_9061', - 'foo_9062', - 'foo_9063', - 'foo_9064', - 'foo_9065', - 'foo_9066', - 'foo_9067', - 'foo_9068', - 'foo_9069', - 'foo_9070', - 'foo_9071', - 'foo_9072', - 'foo_9073', - 'foo_9074', - 'foo_9075', - 'foo_9076', - 'foo_9077', - 'foo_9078', - 'foo_9079', - 'foo_9080', - 'foo_9081', - 'foo_9082', - 'foo_9083', - 'foo_9084', - 'foo_9085', - 'foo_9086', - 'foo_9087', - 'foo_9088', - 'foo_9089', - 'foo_9090', - 'foo_9091', - 'foo_9092', - 'foo_9093', - 'foo_9094', - 'foo_9095', - 'foo_9096', - 'foo_9097', - 'foo_9098', - 'foo_9099', - 'foo_9100', - 'foo_9101', - 'foo_9102', - 'foo_9103', - 'foo_9104', - 'foo_9105', - 'foo_9106', - 'foo_9107', - 'foo_9108', - 'foo_9109', - 'foo_9110', - 'foo_9111', - 'foo_9112', - 'foo_9113', - 'foo_9114', - 'foo_9115', - 'foo_9116', - 'foo_9117', - 'foo_9118', - 'foo_9119', - 'foo_9120', - 'foo_9121', - 'foo_9122', - 'foo_9123', - 'foo_9124', - 'foo_9125', - 'foo_9126', - 'foo_9127', - 'foo_9128', - 'foo_9129', - 'foo_9130', - 'foo_9131', - 'foo_9132', - 'foo_9133', - 'foo_9134', - 'foo_9135', - 'foo_9136', - 'foo_9137', - 'foo_9138', - 'foo_9139', - 'foo_9140', - 'foo_9141', - 'foo_9142', - 'foo_9143', - 'foo_9144', - 'foo_9145', - 'foo_9146', - 'foo_9147', - 'foo_9148', - 'foo_9149', - 'foo_9150', - 'foo_9151', - 'foo_9152', - 'foo_9153', - 'foo_9154', - 'foo_9155', - 'foo_9156', - 'foo_9157', - 'foo_9158', - 'foo_9159', - 'foo_9160', - 'foo_9161', - 'foo_9162', - 'foo_9163', - 'foo_9164', - 'foo_9165', - 'foo_9166', - 'foo_9167', - 'foo_9168', - 'foo_9169', - 'foo_9170', - 'foo_9171', - 'foo_9172', - 'foo_9173', - 'foo_9174', - 'foo_9175', - 'foo_9176', - 'foo_9177', - 'foo_9178', - 'foo_9179', - 'foo_9180', - 'foo_9181', - 'foo_9182', - 'foo_9183', - 'foo_9184', - 'foo_9185', - 'foo_9186', - 'foo_9187', - 'foo_9188', - 'foo_9189', - 'foo_9190', - 'foo_9191', - 'foo_9192', - 'foo_9193', - 'foo_9194', - 'foo_9195', - 'foo_9196', - 'foo_9197', - 'foo_9198', - 'foo_9199', - 'foo_9200', - 'foo_9201', - 'foo_9202', - 'foo_9203', - 'foo_9204', - 'foo_9205', - 'foo_9206', - 'foo_9207', - 'foo_9208', - 'foo_9209', - 'foo_9210', - 'foo_9211', - 'foo_9212', - 'foo_9213', - 'foo_9214', - 'foo_9215', - 'foo_9216', - 'foo_9217', - 'foo_9218', - 'foo_9219', - 'foo_9220', - 'foo_9221', - 'foo_9222', - 'foo_9223', - 'foo_9224', - 'foo_9225', - 'foo_9226', - 'foo_9227', - 'foo_9228', - 'foo_9229', - 'foo_9230', - 'foo_9231', - 'foo_9232', - 'foo_9233', - 'foo_9234', - 'foo_9235', - 'foo_9236', - 'foo_9237', - 'foo_9238', - 'foo_9239', - 'foo_9240', - 'foo_9241', - 'foo_9242', - 'foo_9243', - 'foo_9244', - 'foo_9245', - 'foo_9246', - 'foo_9247', - 'foo_9248', - 'foo_9249', - 'foo_9250', - 'foo_9251', - 'foo_9252', - 'foo_9253', - 'foo_9254', - 'foo_9255', - 'foo_9256', - 'foo_9257', - 'foo_9258', - 'foo_9259', - 'foo_9260', - 'foo_9261', - 'foo_9262', - 'foo_9263', - 'foo_9264', - 'foo_9265', - 'foo_9266', - 'foo_9267', - 'foo_9268', - 'foo_9269', - 'foo_9270', - 'foo_9271', - 'foo_9272', - 'foo_9273', - 'foo_9274', - 'foo_9275', - 'foo_9276', - 'foo_9277', - 'foo_9278', - 'foo_9279', - 'foo_9280', - 'foo_9281', - 'foo_9282', - 'foo_9283', - 'foo_9284', - 'foo_9285', - 'foo_9286', - 'foo_9287', - 'foo_9288', - 'foo_9289', - 'foo_9290', - 'foo_9291', - 'foo_9292', - 'foo_9293', - 'foo_9294', - 'foo_9295', - 'foo_9296', - 'foo_9297', - 'foo_9298', - 'foo_9299', - 'foo_9300', - 'foo_9301', - 'foo_9302', - 'foo_9303', - 'foo_9304', - 'foo_9305', - 'foo_9306', - 'foo_9307', - 'foo_9308', - 'foo_9309', - 'foo_9310', - 'foo_9311', - 'foo_9312', - 'foo_9313', - 'foo_9314', - 'foo_9315', - 'foo_9316', - 'foo_9317', - 'foo_9318', - 'foo_9319', - 'foo_9320', - 'foo_9321', - 'foo_9322', - 'foo_9323', - 'foo_9324', - 'foo_9325', - 'foo_9326', - 'foo_9327', - 'foo_9328', - 'foo_9329', - 'foo_9330', - 'foo_9331', - 'foo_9332', - 'foo_9333', - 'foo_9334', - 'foo_9335', - 'foo_9336', - 'foo_9337', - 'foo_9338', - 'foo_9339', - 'foo_9340', - 'foo_9341', - 'foo_9342', - 'foo_9343', - 'foo_9344', - 'foo_9345', - 'foo_9346', - 'foo_9347', - 'foo_9348', - 'foo_9349', - 'foo_9350', - 'foo_9351', - 'foo_9352', - 'foo_9353', - 'foo_9354', - 'foo_9355', - 'foo_9356', - 'foo_9357', - 'foo_9358', - 'foo_9359', - 'foo_9360', - 'foo_9361', - 'foo_9362', - 'foo_9363', - 'foo_9364', - 'foo_9365', - 'foo_9366', - 'foo_9367', - 'foo_9368', - 'foo_9369', - 'foo_9370', - 'foo_9371', - 'foo_9372', - 'foo_9373', - 'foo_9374', - 'foo_9375', - 'foo_9376', - 'foo_9377', - 'foo_9378', - 'foo_9379', - 'foo_9380', - 'foo_9381', - 'foo_9382', - 'foo_9383', - 'foo_9384', - 'foo_9385', - 'foo_9386', - 'foo_9387', - 'foo_9388', - 'foo_9389', - 'foo_9390', - 'foo_9391', - 'foo_9392', - 'foo_9393', - 'foo_9394', - 'foo_9395', - 'foo_9396', - 'foo_9397', - 'foo_9398', - 'foo_9399', - 'foo_9400', - 'foo_9401', - 'foo_9402', - 'foo_9403', - 'foo_9404', - 'foo_9405', - 'foo_9406', - 'foo_9407', - 'foo_9408', - 'foo_9409', - 'foo_9410', - 'foo_9411', - 'foo_9412', - 'foo_9413', - 'foo_9414', - 'foo_9415', - 'foo_9416', - 'foo_9417', - 'foo_9418', - 'foo_9419', - 'foo_9420', - 'foo_9421', - 'foo_9422', - 'foo_9423', - 'foo_9424', - 'foo_9425', - 'foo_9426', - 'foo_9427', - 'foo_9428', - 'foo_9429', - 'foo_9430', - 'foo_9431', - 'foo_9432', - 'foo_9433', - 'foo_9434', - 'foo_9435', - 'foo_9436', - 'foo_9437', - 'foo_9438', - 'foo_9439', - 'foo_9440', - 'foo_9441', - 'foo_9442', - 'foo_9443', - 'foo_9444', - 'foo_9445', - 'foo_9446', - 'foo_9447', - 'foo_9448', - 'foo_9449', - 'foo_9450', - 'foo_9451', - 'foo_9452', - 'foo_9453', - 'foo_9454', - 'foo_9455', - 'foo_9456', - 'foo_9457', - 'foo_9458', - 'foo_9459', - 'foo_9460', - 'foo_9461', - 'foo_9462', - 'foo_9463', - 'foo_9464', - 'foo_9465', - 'foo_9466', - 'foo_9467', - 'foo_9468', - 'foo_9469', - 'foo_9470', - 'foo_9471', - 'foo_9472', - 'foo_9473', - 'foo_9474', - 'foo_9475', - 'foo_9476', - 'foo_9477', - 'foo_9478', - 'foo_9479', - 'foo_9480', - 'foo_9481', - 'foo_9482', - 'foo_9483', - 'foo_9484', - 'foo_9485', - 'foo_9486', - 'foo_9487', - 'foo_9488', - 'foo_9489', - 'foo_9490', - 'foo_9491', - 'foo_9492', - 'foo_9493', - 'foo_9494', - 'foo_9495', - 'foo_9496', - 'foo_9497', - 'foo_9498', - 'foo_9499', - 'foo_9500', - 'foo_9501', - 'foo_9502', - 'foo_9503', - 'foo_9504', - 'foo_9505', - 'foo_9506', - 'foo_9507', - 'foo_9508', - 'foo_9509', - 'foo_9510', - 'foo_9511', - 'foo_9512', - 'foo_9513', - 'foo_9514', - 'foo_9515', - 'foo_9516', - 'foo_9517', - 'foo_9518', - 'foo_9519', - 'foo_9520', - 'foo_9521', - 'foo_9522', - 'foo_9523', - 'foo_9524', - 'foo_9525', - 'foo_9526', - 'foo_9527', - 'foo_9528', - 'foo_9529', - 'foo_9530', - 'foo_9531', - 'foo_9532', - 'foo_9533', - 'foo_9534', - 'foo_9535', - 'foo_9536', - 'foo_9537', - 'foo_9538', - 'foo_9539', - 'foo_9540', - 'foo_9541', - 'foo_9542', - 'foo_9543', - 'foo_9544', - 'foo_9545', - 'foo_9546', - 'foo_9547', - 'foo_9548', - 'foo_9549', - 'foo_9550', - 'foo_9551', - 'foo_9552', - 'foo_9553', - 'foo_9554', - 'foo_9555', - 'foo_9556', - 'foo_9557', - 'foo_9558', - 'foo_9559', - 'foo_9560', - 'foo_9561', - 'foo_9562', - 'foo_9563', - 'foo_9564', - 'foo_9565', - 'foo_9566', - 'foo_9567', - 'foo_9568', - 'foo_9569', - 'foo_9570', - 'foo_9571', - 'foo_9572', - 'foo_9573', - 'foo_9574', - 'foo_9575', - 'foo_9576', - 'foo_9577', - 'foo_9578', - 'foo_9579', - 'foo_9580', - 'foo_9581', - 'foo_9582', - 'foo_9583', - 'foo_9584', - 'foo_9585', - 'foo_9586', - 'foo_9587', - 'foo_9588', - 'foo_9589', - 'foo_9590', - 'foo_9591', - 'foo_9592', - 'foo_9593', - 'foo_9594', - 'foo_9595', - 'foo_9596', - 'foo_9597', - 'foo_9598', - 'foo_9599', - 'foo_9600', - 'foo_9601', - 'foo_9602', - 'foo_9603', - 'foo_9604', - 'foo_9605', - 'foo_9606', - 'foo_9607', - 'foo_9608', - 'foo_9609', - 'foo_9610', - 'foo_9611', - 'foo_9612', - 'foo_9613', - 'foo_9614', - 'foo_9615', - 'foo_9616', - 'foo_9617', - 'foo_9618', - 'foo_9619', - 'foo_9620', - 'foo_9621', - 'foo_9622', - 'foo_9623', - 'foo_9624', - 'foo_9625', - 'foo_9626', - 'foo_9627', - 'foo_9628', - 'foo_9629', - 'foo_9630', - 'foo_9631', - 'foo_9632', - 'foo_9633', - 'foo_9634', - 'foo_9635', - 'foo_9636', - 'foo_9637', - 'foo_9638', - 'foo_9639', - 'foo_9640', - 'foo_9641', - 'foo_9642', - 'foo_9643', - 'foo_9644', - 'foo_9645', - 'foo_9646', - 'foo_9647', - 'foo_9648', - 'foo_9649', - 'foo_9650', - 'foo_9651', - 'foo_9652', - 'foo_9653', - 'foo_9654', - 'foo_9655', - 'foo_9656', - 'foo_9657', - 'foo_9658', - 'foo_9659', - 'foo_9660', - 'foo_9661', - 'foo_9662', - 'foo_9663', - 'foo_9664', - 'foo_9665', - 'foo_9666', - 'foo_9667', - 'foo_9668', - 'foo_9669', - 'foo_9670', - 'foo_9671', - 'foo_9672', - 'foo_9673', - 'foo_9674', - 'foo_9675', - 'foo_9676', - 'foo_9677', - 'foo_9678', - 'foo_9679', - 'foo_9680', - 'foo_9681', - 'foo_9682', - 'foo_9683', - 'foo_9684', - 'foo_9685', - 'foo_9686', - 'foo_9687', - 'foo_9688', - 'foo_9689', - 'foo_9690', - 'foo_9691', - 'foo_9692', - 'foo_9693', - 'foo_9694', - 'foo_9695', - 'foo_9696', - 'foo_9697', - 'foo_9698', - 'foo_9699', - 'foo_9700', - 'foo_9701', - 'foo_9702', - 'foo_9703', - 'foo_9704', - 'foo_9705', - 'foo_9706', - 'foo_9707', - 'foo_9708', - 'foo_9709', - 'foo_9710', - 'foo_9711', - 'foo_9712', - 'foo_9713', - 'foo_9714', - 'foo_9715', - 'foo_9716', - 'foo_9717', - 'foo_9718', - 'foo_9719', - 'foo_9720', - 'foo_9721', - 'foo_9722', - 'foo_9723', - 'foo_9724', - 'foo_9725', - 'foo_9726', - 'foo_9727', - 'foo_9728', - 'foo_9729', - 'foo_9730', - 'foo_9731', - 'foo_9732', - 'foo_9733', - 'foo_9734', - 'foo_9735', - 'foo_9736', - 'foo_9737', - 'foo_9738', - 'foo_9739', - 'foo_9740', - 'foo_9741', - 'foo_9742', - 'foo_9743', - 'foo_9744', - 'foo_9745', - 'foo_9746', - 'foo_9747', - 'foo_9748', - 'foo_9749', - 'foo_9750', - 'foo_9751', - 'foo_9752', - 'foo_9753', - 'foo_9754', - 'foo_9755', - 'foo_9756', - 'foo_9757', - 'foo_9758', - 'foo_9759', - 'foo_9760', - 'foo_9761', - 'foo_9762', - 'foo_9763', - 'foo_9764', - 'foo_9765', - 'foo_9766', - 'foo_9767', - 'foo_9768', - 'foo_9769', - 'foo_9770', - 'foo_9771', - 'foo_9772', - 'foo_9773', - 'foo_9774', - 'foo_9775', - 'foo_9776', - 'foo_9777', - 'foo_9778', - 'foo_9779', - 'foo_9780', - 'foo_9781', - 'foo_9782', - 'foo_9783', - 'foo_9784', - 'foo_9785', - 'foo_9786', - 'foo_9787', - 'foo_9788', - 'foo_9789', - 'foo_9790', - 'foo_9791', - 'foo_9792', - 'foo_9793', - 'foo_9794', - 'foo_9795', - 'foo_9796', - 'foo_9797', - 'foo_9798', - 'foo_9799', - 'foo_9800', - 'foo_9801', - 'foo_9802', - 'foo_9803', - 'foo_9804', - 'foo_9805', - 'foo_9806', - 'foo_9807', - 'foo_9808', - 'foo_9809', - 'foo_9810', - 'foo_9811', - 'foo_9812', - 'foo_9813', - 'foo_9814', - 'foo_9815', - 'foo_9816', - 'foo_9817', - 'foo_9818', - 'foo_9819', - 'foo_9820', - 'foo_9821', - 'foo_9822', - 'foo_9823', - 'foo_9824', - 'foo_9825', - 'foo_9826', - 'foo_9827', - 'foo_9828', - 'foo_9829', - 'foo_9830', - 'foo_9831', - 'foo_9832', - 'foo_9833', - 'foo_9834', - 'foo_9835', - 'foo_9836', - 'foo_9837', - 'foo_9838', - 'foo_9839', - 'foo_9840', - 'foo_9841', - 'foo_9842', - 'foo_9843', - 'foo_9844', - 'foo_9845', - 'foo_9846', - 'foo_9847', - 'foo_9848', - 'foo_9849', - 'foo_9850', - 'foo_9851', - 'foo_9852', - 'foo_9853', - 'foo_9854', - 'foo_9855', - 'foo_9856', - 'foo_9857', - 'foo_9858', - 'foo_9859', - 'foo_9860', - 'foo_9861', - 'foo_9862', - 'foo_9863', - 'foo_9864', - 'foo_9865', - 'foo_9866', - 'foo_9867', - 'foo_9868', - 'foo_9869', - 'foo_9870', - 'foo_9871', - 'foo_9872', - 'foo_9873', - 'foo_9874', - 'foo_9875', - 'foo_9876', - 'foo_9877', - 'foo_9878', - 'foo_9879', - 'foo_9880', - 'foo_9881', - 'foo_9882', - 'foo_9883', - 'foo_9884', - 'foo_9885', - 'foo_9886', - 'foo_9887', - 'foo_9888', - 'foo_9889', - 'foo_9890', - 'foo_9891', - 'foo_9892', - 'foo_9893', - 'foo_9894', - 'foo_9895', - 'foo_9896', - 'foo_9897', - 'foo_9898', - 'foo_9899', - 'foo_9900', - 'foo_9901', - 'foo_9902', - 'foo_9903', - 'foo_9904', - 'foo_9905', - 'foo_9906', - 'foo_9907', - 'foo_9908', - 'foo_9909', - 'foo_9910', - 'foo_9911', - 'foo_9912', - 'foo_9913', - 'foo_9914', - 'foo_9915', - 'foo_9916', - 'foo_9917', - 'foo_9918', - 'foo_9919', - 'foo_9920', - 'foo_9921', - 'foo_9922', - 'foo_9923', - 'foo_9924', - 'foo_9925', - 'foo_9926', - 'foo_9927', - 'foo_9928', - 'foo_9929', - 'foo_9930', - 'foo_9931', - 'foo_9932', - 'foo_9933', - 'foo_9934', - 'foo_9935', - 'foo_9936', - 'foo_9937', - 'foo_9938', - 'foo_9939', - 'foo_9940', - 'foo_9941', - 'foo_9942', - 'foo_9943', - 'foo_9944', - 'foo_9945', - 'foo_9946', - 'foo_9947', - 'foo_9948', - 'foo_9949', - 'foo_9950', - 'foo_9951', - 'foo_9952', - 'foo_9953', - 'foo_9954', - 'foo_9955', - 'foo_9956', - 'foo_9957', - 'foo_9958', - 'foo_9959', - 'foo_9960', - 'foo_9961', - 'foo_9962', - 'foo_9963', - 'foo_9964', - 'foo_9965', - 'foo_9966', - 'foo_9967', - 'foo_9968', - 'foo_9969', - 'foo_9970', - 'foo_9971', - 'foo_9972', - 'foo_9973', - 'foo_9974', - 'foo_9975', - 'foo_9976', - 'foo_9977', - 'foo_9978', - 'foo_9979', - 'foo_9980', - 'foo_9981', - 'foo_9982', - 'foo_9983', - 'foo_9984', - 'foo_9985', - 'foo_9986', - 'foo_9987', - 'foo_9988', - 'foo_9989', - 'foo_9990', - 'foo_9991', - 'foo_9992', - 'foo_9993', - 'foo_9994', - 'foo_9995', - 'foo_9996', - 'foo_9997', - 'foo_9998', - 'foo_9999', -}; diff --git a/tests/language_2/set_literals/const_set_literal_test.dart b/tests/language_2/set_literals/const_set_literal_test.dart deleted file mode 100644 index 8b1bba983de..00000000000 --- a/tests/language_2/set_literals/const_set_literal_test.dart +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -import "package:expect/expect.dart"; - -void main() { - test(); -} - -void test() { - checkSet(Object o, List elements) { - Expect.type>(o); - Set set = o; - Expect.listEquals(elements, set.toList()); - Expect.throws(set.clear); - } - - // Various context types for literals. - Object setContext(Set object) => object; - Object iterableContext(Iterable object) => object; - Object foSetContext(FutureOr> object) => object; - Object foIterableContext(FutureOr> object) => object; - - // Empty literal, no type arguments. - // No context. - Expect.type>(const {}); - // Set context with no inferred type argument. - checkSet(setContext(const {}), []); - checkSet(iterableContext(const {}), []); - checkSet(foSetContext(const {}), []); - checkSet(foIterableContext(const {}), []); - // Specific set context. - checkSet(setContext(const {}), []); - checkSet(iterableContext(const {}), []); - checkSet(foSetContext(const {}), []); - checkSet(foIterableContext(const {}), []); - - // Non-empty set literal, no type argument. - // No context. - checkSet(const {1}, [1]); - checkSet(const {3, 1, 2, 4}, [3, 1, 2, 4]); - // Set context with no inferred type argument. - checkSet(setContext(const {1}), [1]); - checkSet(iterableContext(const {1}), [1]); - checkSet(foSetContext(const {1}), [1]); - checkSet(foIterableContext(const {1}), [1]); - checkSet(setContext(const {3, 1, 2, 4}), [3, 1, 2, 4]); - checkSet(iterableContext(const {3, 1, 2, 4}), [3, 1, 2, 4]); - checkSet(foSetContext(const {1}), [1]); - checkSet(foIterableContext(const {1}), [1]); - // Specific set context. - checkSet(setContext(const {1}), [1]); - checkSet(iterableContext(const {1}), [1]); - checkSet(foSetContext(const {1}), [1]); - checkSet(foIterableContext(const {1}), [1]); - checkSet(setContext(const {3, 1, 2, 4}), [3, 1, 2, 4]); - checkSet(iterableContext(const {3, 1, 2, 4}), [3, 1, 2, 4]); - checkSet(foSetContext(const {3, 1, 2, 4}), [3, 1, 2, 4]); - checkSet(foIterableContext(const {3, 1, 2, 4}), [3, 1, 2, 4]); - - // Non-empty set literal with type argument. - checkSet(const {1}, [1]); - checkSet(const {3, 1, 2, 4}, [3, 1, 2, 4]); - - // Integers, String and symbols work, even if they override ==. - checkSet(const {"foo", "bar"}, ["foo", "bar"]); - checkSet(const {#foo, #bar}, [#foo, #bar]); - checkSet(const {#_foo, #_bar}, [#_foo, #_bar]); - const object = Object(); - checkSet(const {#foo, 1, "string", object, true}, - [#foo, 1, "string", object, true]); - - // Nested constant literals. - const Object o = {{2}}; - Expect.type>>(o); - Set> set = o; - Expect.equals(1, set.length); - Expect.equals(1, set.first.length); - Expect.equals(2, set.first.first); - - const Object o2 = {{2}, {}}; - Expect.type>>(o); - set = o2; - Expect.equals(2, set.length); - Expect.equals(1, set.first.length); - Expect.equals(2, set.first.first); - - const Set> o3 = {{}}; - Expect.equals(1, o3.length); - Expect.equals(0, o3.first.length); - - const o4 = {{}}; - Expect.type>>(o4); - Expect.equals(1, o4.length); - Expect.equals(0, o4.first.length); - - const o5 = {{1}, {}}; // Set - Expect.type>(o5); - Expect.notType>>(o5); - - // User defined constant class. - const o6 = { - Something(1, "a"), - Something(2, "a"), - Something(1, "b"), - Something(2, "b"), - }; - Expect.equals("1:a,2:a,1:b,2:b", o6.toList().join(",")); - - // Canonicalization of constant sets takes ordering into account, - // that is, o7 and o8 cannot be the same object. - const o7 = {1, 2, 3}; - const o8 = {3, 2, 1}; - Expect.notIdentical(o7, o8); - // But o7 and o9 must be identical. - const o9 = {1, 2, 3}; - Expect.identical(o7, o9); -} - -class Something { - final int id; - final String name; - const Something(this.id, this.name); - String toString() => "$id:$name"; -} diff --git a/tests/language_2/set_literals/in_annotations_test.dart b/tests/language_2/set_literals/in_annotations_test.dart deleted file mode 100644 index 2e1547e3e23..00000000000 --- a/tests/language_2/set_literals/in_annotations_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// 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. - -// @dart = 2.9 - -@Meta({}) -import 'dart:core'; - -@Meta({}) -void f(@Meta({}) int foo) {} - -@Meta({}) -class A<@Meta({}) T> { - @Meta({}) - String x, y; - - @Meta({}) - A(); - - @Meta({}) - void m() { - @Meta({}) - int z; - } -} - -@Meta({}) -enum E { - @Meta({}) - v -} - -class Meta { - final Set value; - - const Meta(this.value); -} - -main() {} diff --git a/tests/language_2/set_literals/in_initializer_test.dart b/tests/language_2/set_literals/in_initializer_test.dart deleted file mode 100644 index 24583158bc1..00000000000 --- a/tests/language_2/set_literals/in_initializer_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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. - -// @dart = 2.9 - -class Bag { - final Set things; - Bag({Set things}) : this.things = things ?? {}; - Bag.full({Set this.things = const {"cat"}}); -} - -main() { - new Bag(); - new Bag(things: {}); - new Bag.full(); - new Bag.full(things: {}); -} diff --git a/tests/language_2/set_literals/invalid_set_literal_test.dart b/tests/language_2/set_literals/invalid_set_literal_test.dart deleted file mode 100644 index 54c63dc360a..00000000000 --- a/tests/language_2/set_literals/invalid_set_literal_test.dart +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2018, 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 - -import "dart:collection" show HashSet, LinkedHashSet; - -import "package:expect/expect.dart"; - -const Object d = 3.5; - -void main() { - var o // - = {1: 1} //# 01: compile-time error - = {} //# 02: compile-time error - = {1} //# 03: compile-time error - = {1} //# 04: compile-time error - = const {} //# 05: compile-time error - = const {1} //# 06: compile-time error - = const {1} //# 07: compile-time error - = const {Duration(seconds: 0)} // Overrides ==. //# 08: compile-time error - = const {4.2} // Overrides ==. //# 09: compile-time error - = const {d} // Overrides ==. //# 10: compile-time error - = {,} //# 11: syntax error - = {1,,} //# 12: syntax error - = {1,,1} //# 13: syntax error - ; - Expect.isNull(o); // Should be unreachable with a value. - - Set s // - = {"not int"} //# 14: compile-time error - = {4.2} //# 15: compile-time error - = {1: 1} //# 16: compile-time error - = {{}} //# 17: compile-time error - ; - Expect.isNull(s); - - Set> ss // - = {{1: 1}} //# 19: compile-time error - = {{}} //# 20: compile-time error - = {{1: 1}} //# 21: compile-time error - = const {ss} //# 22: compile-time error - ; - Expect.isNull(ss); - - HashSet hs // - = {} // Exact type is LinkedHashSet //# 23: compile-time error - ; - Expect.isNull(hs); - - (x) { - // Type constants are allowed, type variables are not. - var o // - = const {T} //# 26: compile-time error - = const {x} //# 27: compile-time error - ; - Expect.isNull(o); - }(42); - - >() { - // Regression test for http://dartbug.com/35300. - // The `Set` type is not assignable to `T extends Set`, - // so we don't make this a set. You can't assign a map to `T`. - T o // - = {}; //# 28: compile-time error - ; - }(); - - // Constant sets must not contain equal elements. - const cs = { - 1, - "s", - #foo, - int, - C(1), - {1}, - 1, //# 29: compile-time error - "s", //# 30: compile-time error - #foo, //# 31: compile-time error - int, //# 32: compile-time error - C(1), //# 33: compile-time error - {1}, //# 34: compile-time error - }; -} - -class C { - final Object id; - const C(this.id); -} diff --git a/tests/language_2/set_literals/set_literal_test.dart b/tests/language_2/set_literals/set_literal_test.dart deleted file mode 100644 index c11ce5afe45..00000000000 --- a/tests/language_2/set_literals/set_literal_test.dart +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; -import "dart:collection" show LinkedHashSet; - -import "package:expect/expect.dart"; - -void main() { - test(); -} - -void test() { - checkSet(Object o, List elements) { - Expect.type>(o); - Set set = o; - Expect.listEquals(elements, set.toList()); - } - - Object setContext(Set object) => object; - Object iterableContext(Iterable object) => object; - Object foSetContext(FutureOr> object) => object; - Object foIterableContext(FutureOr> object) => object; - - // Empty literal, no type arguments. - // No context. - Expect.type>({}); - // Set context with no inferred type argument. - checkSet(setContext({}), []); - checkSet(iterableContext({}), []); - checkSet(foSetContext({}), []); - checkSet(foIterableContext({}), []); - // Specific set context. - checkSet(setContext({}), []); - checkSet(iterableContext({}), []); - checkSet(foSetContext({}), []); - checkSet(foIterableContext({}), []); - - // Non-empty set literal, no type argument. - // No context. - checkSet({1}, [1]); - checkSet({3, 1, 2, 4, 1, 4}, [3, 1, 2, 4]); - // Set context with no inferred type argument. - checkSet(setContext({1}), [1]); - checkSet(iterableContext({1}), [1]); - checkSet(foSetContext({1}), [1]); - checkSet(foIterableContext({1}), [1]); - checkSet(setContext({3, 1, 2, 4, 1, 4}), [3, 1, 2, 4]); - checkSet(iterableContext({3, 1, 2, 4, 1, 4}), [3, 1, 2, 4]); - checkSet(foSetContext({3, 1, 2, 4, 1, 4}), [3, 1, 2, 4]); - checkSet(foIterableContext({3, 1, 2, 4, 1, 4}), [3, 1, 2, 4]); - // Specific set context. - checkSet(setContext({1}), [1]); - checkSet(iterableContext({1}), [1]); - checkSet(foSetContext({1}), [1]); - checkSet(foIterableContext({1}), [1]); - checkSet(setContext({3, 1, 2, 4, 1, 4}), [3, 1, 2, 4]); - checkSet(iterableContext({3, 1, 2, 4, 1, 4}), [3, 1, 2, 4]); - checkSet(foSetContext({3, 1, 2, 4, 1, 4}), [3, 1, 2, 4]); - checkSet(foIterableContext({3, 1, 2, 4, 1, 4}), [3, 1, 2, 4]); - - // Non-empty set literal with type argument. - checkSet({1}, [1]); - checkSet({3, 1, 2, 4, 1, 4}, [3, 1, 2, 4]); - - // Iteration order. Values are evaluated in first-added order. - var e1a = Equality(1, "a"); - var e1b = Equality(1, "b"); - var e2a = Equality(2, "a"); - var e2b = Equality(2, "b"); - var es = {e1a, e2b, e1b, e2a}; - checkSet(es, [e1a, e2b]); - Expect.equals("1:a,2:b", es.join(",")); - - // Evaluation order. All elements are evaluated, left to right. - var entries = []; - T log(T value, int entry) { - entries.add(entry); - return value; - } - checkSet( - {log(e1a, 1), log(e2b, 2), log(e1b, 3), log(e2a, 4)}, [e1a, e2b]); - Expect.listEquals([1, 2, 3, 4], entries); - - // Nested literals. - Object o = {{2}}; - Expect.type>>(o); - Expect.type>((o as Set).first); - Set> set = o; - Expect.equals(1, set.length); - Expect.equals(1, set.first.length); - Expect.equals(2, set.first.first); - - o = {{2}, {}}; - Expect.type>>(o); - Expect.type>((o as Set).first); - set = o; - Expect.equals(2, set.length); - Expect.equals(1, set.first.length); - Expect.equals(2, set.first.first); - - var set2 = {{}}; - Expect.type>>(set2); - Expect.equals(1, set2.length); - Expect.equals(0, set2.first.length); - - var set3 = {{1}, {}}; // Set - Expect.type>(set3); - Expect.notType>>(set3); - - // Trailing comma. - Iterable i; - i = {1,}; - Expect.type>(i); - Expect.equals(1, i.length); - - o = {1, 2, 3,}; - Expect.type>(o); - Set set4 = o; - Expect.equals(3, set4.length); -} - -class Equality { - final int id; - final String name; - const Equality(this.id, this.name); - int get hashCode => id; - bool operator==(Object other) => other is Equality && id == other.id; - String toString() => "$id:$name"; -} diff --git a/tests/language_2/setter/checked2_test.dart b/tests/language_2/setter/checked2_test.dart deleted file mode 100644 index 29d91633390..00000000000 --- a/tests/language_2/setter/checked2_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that implicit setters do a type check generic types. -import "package:expect/expect.dart"; - -class A { - C c; -} - -class B extends A {} - -class C {} - -var array = [new B()]; - -main() { - array[0].c = new C(); - Expect.throwsTypeError(() => array[0].c = new C()); -} diff --git a/tests/language_2/setter/checked3_test.dart b/tests/language_2/setter/checked3_test.dart deleted file mode 100644 index 37a591754db..00000000000 --- a/tests/language_2/setter/checked3_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A { - T field; -} - -class B { - T field = 42 as dynamic; -} - -main() { - var a = new A(); - dynamic s = "string"; - - // This assignment is OK. - a.field = s; - - dynamic i = 42; - Expect.throwsTypeError(() => a.field = i); - - // Throws because the field initializer fails the implicit cast. - Expect.throwsTypeError(() => new B()); - - // Throws because the assigned value fails the implicit cast. - var b = new B(); - Expect.throwsTypeError(() => b.field = s); -} diff --git a/tests/language_2/setter/checked_setter_test.dart b/tests/language_2/setter/checked_setter_test.dart deleted file mode 100644 index 41b8b64cc77..00000000000 --- a/tests/language_2/setter/checked_setter_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that implicit setters do a runtime type check. - -import "package:expect/expect.dart"; - -class A { - C c; -} - -class B extends A {} - -class C {} - -var array = [new B()]; - -main() { - array[0].c = new C(); - Expect.throwsTypeError(() => array[0].c = new B()); -} diff --git a/tests/language_2/setter/declaration_test.dart b/tests/language_2/setter/declaration_test.dart deleted file mode 100644 index 10603f438fc..00000000000 --- a/tests/language_2/setter/declaration_test.dart +++ /dev/null @@ -1,128 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Test that a setter has a single argument. - -import 'dart:async'; - -set tooFew() {} -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER -// ^ -// [cfe] A setter should have exactly one formal parameter. - -set tooMany(var value, var extra) {} -// ^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER -// ^ -// [cfe] A setter should have exactly one formal parameter. - -/*space*/ int set wrongReturnType1(_) {} -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER -// [cfe] unspecified - -/*space*/ FutureOr set wrongReturnType2(_) {} -// ^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER -// [cfe] unspecified - -/*space*/ Never set wrongReturnType3(_) {} -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER -// [cfe] unspecified - -class C { - static int set staticWrongReturnType1(_) => 1; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER - // [cfe] unspecified - - static FutureOr set staticWrongReturnType2(_) {} - // ^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER - // [cfe] unspecified - - static Never set staticWrongReturnType3(_) => throw 1; - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER - // [cfe] unspecified - - /*space*/ int set wrongReturnType1(_) {} - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER - // [cfe] unspecified - - /*space*/ FutureOr set wrongReturnType2(_) {} - // ^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER - // [cfe] unspecified - - /*space*/ Never set wrongReturnType3(_) => throw 1; - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER - // [cfe] unspecified - - static int get staticNonAssignableTypes1 => 1; - // ^^^^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_ASSIGNABLE_SETTER_TYPES - // [cfe] unspecified - static set staticNonAssignableTypes1(String _) {} - - static num get staticAssignableTypes1 => 1; - static set staticAssignableTypes1(int _) {} - - static FutureOr get staticAssignableTypes2 => 1; - static set staticAssignableTypes2(int _) {} - - static dynamic get staticAssignableTypes3 => 1; - static set staticAssignableTypes3(int _) {} - - int get nonAssignableTypes1 => 1; - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.GETTER_NOT_ASSIGNABLE_SETTER_TYPES - // [cfe] unspecified - set nonAssignableTypes1(String _) {} - - num get assignableTypes1 => 1; - set assignableTypes1(int _) {} - - FutureOr get assignableTypes2 => 1; - set assignableTypes2(int _) {} - - dynamic get assignableTypes3 => 1; - set assignableTypes3(int _) {} -} - -main() { - tooFew = 1; - tooMany = 1; - wrongReturnType1 = 1; - wrongReturnType2 = 1; - wrongReturnType3 = 1; - C.staticWrongReturnType1 = 4; - C.staticWrongReturnType2 = 4; - C.staticWrongReturnType3 = 4; - C().wrongReturnType1 = 5; - C().wrongReturnType2 = 5; - C().wrongReturnType3 = 5; - var x1 = C.staticNonAssignableTypes1; - C.staticNonAssignableTypes1 = '' as dynamic; - var y1 = C.staticAssignableTypes1; - C.staticAssignableTypes1 = '' as dynamic; - var y2 = C.staticAssignableTypes2; - C.staticAssignableTypes2 = '' as dynamic; - var y3 = C.staticAssignableTypes3; - C.staticAssignableTypes3 = '' as dynamic; - var z1 = C().nonAssignableTypes1; - C().nonAssignableTypes1 = '' as dynamic; - var w1 = C().assignableTypes1; - C().assignableTypes1 = '' as dynamic; - var w2 = C().assignableTypes2; - C().assignableTypes2 = '' as dynamic; - var w3 = C().assignableTypes3; - C().assignableTypes3 = '' as dynamic; -} diff --git a/tests/language_2/setter/no_getter_call_runtime_test.dart b/tests/language_2/setter/no_getter_call_runtime_test.dart deleted file mode 100644 index 77dafc69386..00000000000 --- a/tests/language_2/setter/no_getter_call_runtime_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 "package:expect/expect.dart"; - -var topLevelClosure; - - -get topLevel => topLevelClosure; - -set topLevel(var value) {} - -initialize() { - print("initializing"); - topLevelClosure = (x) => x * 2; -} - -main() { - initialize(); - var x = topLevelClosure(2); - Expect.equals(4, x); - - x = topLevel(3); - Expect.equals(6, x); -} diff --git a/tests/language_2/setter/no_getter_call_test.dart b/tests/language_2/setter/no_getter_call_test.dart deleted file mode 100644 index a93f33be8e5..00000000000 --- a/tests/language_2/setter/no_getter_call_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -var topLevelClosure; - -/* -get topLevel => topLevelClosure; -*/ -set topLevel(var value) {} - -initialize() { - print("initializing"); - topLevelClosure = (x) => x * 2; -} - -main() { - initialize(); - var x = topLevelClosure(2); - Expect.equals(4, x); - - x = topLevel(3); - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION - // [cfe] Getter not found: 'topLevel'. - Expect.equals(6, x); -} diff --git a/tests/language_2/setter/no_getter_test.dart b/tests/language_2/setter/no_getter_test.dart deleted file mode 100644 index cf9cd233b69..00000000000 --- a/tests/language_2/setter/no_getter_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012, 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 - -set topLevel(var value) {} - -class Example { - set foo(var value) {} -} - -main() { - print(topLevel++); - // ^ - // [analyzer] unspecified - // [cfe] Getter not found: 'topLevel'. - - Example ex = new Example(); - print(ex.foo++); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'foo' isn't defined for the class 'Example'. -} diff --git a/tests/language_2/setter/override2_test.dart b/tests/language_2/setter/override2_test.dart deleted file mode 100644 index 78fcdddedf5..00000000000 --- a/tests/language_2/setter/override2_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that we do not report a compile-time error when an instance setter named -// foo= is declared in a class inheriting an instance method, field, or getter -// named foo, or an instance setter named foo=. - -import "package:expect/expect.dart"; -import "package:meta/meta.dart" show virtual; - -class A { - var foo = 42; // //# 00: ok - get foo => 42; // //# 01: ok - foo() => 42; // //# 02: compile-time error - set foo(value) {} // //# 03: ok -} - -class B extends A { - var foo_; - set foo(value) { - foo_ = value; - } -} - -main() { - var b = new B(); - b.foo = 42; - Expect.equals(42, b.foo_); -} diff --git a/tests/language_2/setter/override3_test.dart b/tests/language_2/setter/override3_test.dart deleted file mode 100644 index 263c48a158d..00000000000 --- a/tests/language_2/setter/override3_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2016, 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 - -// Tests that a setter in a subclass does not shadow the getter in the -// superclass. -import "package:expect/expect.dart"; - -class A { - int _x = 42; - int get x => _x; -} - -class B extends A { - void set x(int val) { - _x = val; - } -} - -void main() { - var b = new B(); - Expect.equals(42, b.x); - - b.x = 21; - Expect.equals(21, b.x); -} diff --git a/tests/language_2/setter/override_test.dart b/tests/language_2/setter/override_test.dart deleted file mode 100644 index 8a3ad48abe3..00000000000 --- a/tests/language_2/setter/override_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that we do not report a compile-time error when a static setter named -// foo= is declared in a class inheriting an instance method or getter named -// foo, and that we do report an error if an instance setter named foo= or -// instance field name foo is inherited. - -import "package:expect/expect.dart"; - -class A { - var foo = 42; // //# 00: compile-time error - get foo => 42; // //# 01: compile-time error - foo() => 42; // //# 02: compile-time error - set foo(value) {} // //# 03: compile-time error -} - -class B extends A { - static var foo_; - static set foo(value) { - foo_ = value; - } -} - -main() { - B.foo = 42; - Expect.equals(42, B.foo_); -} diff --git a/tests/language_2/setter/setter0_test.dart b/tests/language_2/setter/setter0_test.dart deleted file mode 100644 index 63465b5a3d2..00000000000 --- a/tests/language_2/setter/setter0_test.dart +++ /dev/null @@ -1,59 +0,0 @@ -// 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 test program for testing setting/getting of fields when -// only getter/setter methods are specified. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class First { - First(int val) : a_ = val {} - int a_; -} - -class Second extends First { - static int c; - - Second(int val) : super(val) {} - - static void testStaticMethod() { - int i; - Second.static_a = 20; - i = Second.c; - } - - void set instance_a(int value) { - a_ = a_ + value; - } - - int get instance_a { - return a_; - } - - static void set static_a(int value) { - Second.c = value; - } - - static int get static_d { - return Second.c; - } -} - -class Setter0Test { - static testMain() { - Second obj = new Second(10); - Expect.equals(10, obj.instance_a); - obj.instance_a = 20; - Expect.equals(30, obj.instance_a); - - Second.testStaticMethod(); - Expect.equals(20, Second.c); - Expect.equals(20, Second.static_d); - } -} - -main() { - Setter0Test.testMain(); -} diff --git a/tests/language_2/setter/setter1_test.dart b/tests/language_2/setter/setter1_test.dart deleted file mode 100644 index 1b29c437d6b..00000000000 --- a/tests/language_2/setter/setter1_test.dart +++ /dev/null @@ -1,102 +0,0 @@ -// 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 test program for testing setting/getting of fields when -// only getter/setter methods are specified. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class First { - First(int val) : a_ = val {} - - void testMethod() { - a = 20; - } - - static void testStaticMethod() { - b = 20; - } - - int get a { - return a_; - } - - void set a(int val) { - a_ = a_ + val; - } - - static int get b { - return b_; - } - - static void set b(int val) { - b_ = val; - } - - int a_; - static int b_; -} - -class Second { - static int c; - int a_; - - Second(int value) : a_ = value {} - - void testMethod() { - a = 20; - } - - static void testStaticMethod() { - int i; - b = 20; - i = d; - // TODO(asiva): Turn these on once we have error handling. - // i = b; // Should be an error. - // d = 40; // Should be an error. - } - - int get a { - return a_; - } - - void set a(int value) { - a_ = a_ + value; - } - - static void set b(int value) { - Second.c = value; - } - - static int get d { - return Second.c; - } -} - -class Setter1Test { - static testMain() { - First obj1 = new First(10); - Expect.equals(10, obj1.a); - obj1.testMethod(); - Expect.equals(30, obj1.a); - First.b = 10; - Expect.equals(10, First.b); - First.testStaticMethod(); - Expect.equals(20, First.b); - - Second obj = new Second(10); - Expect.equals(10, obj.a); - obj.testMethod(); - Expect.equals(30, obj.a); - - Second.testStaticMethod(); - Expect.equals(20, Second.c); - Expect.equals(20, Second.d); - } -} - -main() { - Setter1Test.testMain(); -} diff --git a/tests/language_2/setter/setter2_test.dart b/tests/language_2/setter/setter2_test.dart deleted file mode 100644 index ca3a7c92171..00000000000 --- a/tests/language_2/setter/setter2_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// 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 test program for testing use of 'this' in an instance method. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Nested { - Nested(int val) : a = val {} - int a; - int foo(int i) { - return i; - } -} - -class Second { - int a; - static Nested obj; - - Second(int val) {} - - void bar(int value) { - a = value; - Second.obj.a = Second.obj.foo(this.a); - this.a = 100; - Expect.equals(100, a); - } -} - -class Setter2Test { - static testMain() { - Second obj = new Second(10); - Second.obj = new Nested(10); - Second.obj.a = 10; - Expect.equals(10, Second.obj.a); - Expect.equals(10, Second.obj.foo(10)); - obj.bar(20); - Expect.equals(20, Second.obj.a); - } -} - -main() { - Setter2Test.testMain(); -} diff --git a/tests/language_2/setter/setter3_runtime_test.dart b/tests/language_2/setter/setter3_runtime_test.dart deleted file mode 100644 index 6d4053cb1e0..00000000000 --- a/tests/language_2/setter/setter3_runtime_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -// Test that setters cannot have defined, non-void return types. -// Note: The language specification specifies the absence of a type means -// it is dynamic, however you cannot specify dynamic. - -class A { - set foo(x) {} - void set bar(x) {} - - -} - -main() { - new A(); -} diff --git a/tests/language_2/setter/setter3_test.dart b/tests/language_2/setter/setter3_test.dart deleted file mode 100644 index 714ecf1e802..00000000000 --- a/tests/language_2/setter/setter3_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// 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 - -// Test that setters cannot have defined, non-void return types. -// Note: The language specification specifies the absence of a type means -// it is dynamic, however you cannot specify dynamic. - -class A { - set foo(x) {} - void set bar(x) {} - dynamic set baz(x) {} -//^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER -// [cfe] The return type of the setter must be 'void' or absent. - bool set bob(x) {} -//^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_VOID_RETURN_FOR_SETTER -// [cfe] The return type of the setter must be 'void' or absent. -} - -main() { - new A(); -} diff --git a/tests/language_2/setter/setter4_test.dart b/tests/language_2/setter/setter4_test.dart deleted file mode 100644 index 67bf442f17d..00000000000 --- a/tests/language_2/setter/setter4_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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 test to catch error reporting bugs in class fields declarations. -// Should be an error because we have a setter overriding a function name. - -// @dart = 2.9 - -class A { - int a() { - return 1; - } - - void set a(var val) { - // ^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'a' is already declared in this scope. - int i = val; - } -} - -main() {} diff --git a/tests/language_2/spread_collections/await_test.dart b/tests/language_2/spread_collections/await_test.dart deleted file mode 100644 index 8dfba8a04a9..00000000000 --- a/tests/language_2/spread_collections/await_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:async_helper/async_helper.dart"; -import 'package:expect/expect.dart'; - -final list = [1, 2, 3, 4, 5]; -final map = {1: 1, 2: 2, 3: 3, 4: 4, 5: 5}; -final set = {1, 2, 3, 4, 5}; - -void main() { - asyncTest(() async { - await testList(); - await testMap(); - await testSet(); - }); -} - -Future testList() async { - var future12 = Future.value([1, 2]); - var future45 = Future.value([4, 5]); - var futureNull = Future.value(null); - - // Await in spread. - Expect.listEquals(list, [...await future12, 3, ...await future45]); - - // Await in null-aware spread. - Expect.listEquals(list, [...?await future12, 3, ...?await futureNull, 4, 5]); -} - -Future testMap() async { - var future12 = Future.value({1: 1, 2: 2}); - var future45 = Future.value({4: 4, 5: 5}); - var futureNull = Future.value(null); - - // Await in spread. - Expect.mapEquals(map, {...await future12, 3: 3, ...await future45}); - - // Await in null-aware spread. - Expect.mapEquals(map, - {...?await future12, 3: 3, ...?await futureNull, 4: 4, 5: 5}); -} - -Future testSet() async { - var future12 = Future.value([1, 2]); - var future45 = Future.value([4, 5]); - var futureNull = Future.value(null); - - // Await in spread. - Expect.setEquals(set, {...await future12, 3, ...await future45}); - - // Await in null-aware spread. - Expect.setEquals(set, {...?await future12, 3, ...?await futureNull, 4, 5}); -} diff --git a/tests/language_2/spread_collections/bind_test.dart b/tests/language_2/spread_collections/bind_test.dart deleted file mode 100644 index 85b7ea682f5..00000000000 --- a/tests/language_2/spread_collections/bind_test.dart +++ /dev/null @@ -1,89 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Check that spread collections can be used in combination with async/await features. -/// This is a regression test for http://dartbug.com/38896 - -import "package:async_helper/async_helper.dart"; -import 'package:expect/expect.dart'; - -Future asyncTest1(Future f()) { - asyncStart(); - return f().then(asyncSuccess); -} - -void main() { - asyncTest1(() async { - await awaitSpreadMemberCallBindTest(); // A - await yieldSpreadMemberCallBindTest(); // C - await spreadAwaitMemberCallBindTest(); // G - await spreadAwaitMemberAccessBindTest(); // I - }); -} - -class A { - List m1() => [1, 2]; - Future> run() async { - return [await null, ...m1()]; - } -} - -Future awaitSpreadMemberCallBindTest() async { - // spread on member call in await - Expect.listEquals([null, 1, 2], await A().run()); -} - -class C { - List m2() => [1, 2]; - - Future> run() async { - return await run3().toList(); - } - - Stream run3() async* { - for (var k in [...await m2()]) yield k; - } -} - -Future yieldSpreadMemberCallBindTest() async { - var expected = [1, 2]; - - // spread on await of member call with yield - Expect.listEquals(expected, await C().run()); -} - -class G { - List m2() => [1, 2]; - - Future> run() async { - return [...await m2()]; - } -} - -Future spreadAwaitMemberCallBindTest() async { - var expected = [1, 2]; - - // spread on await of member call - Expect.listEquals(expected, await G().run()); -} - -class I1 { - List foo() => [1, 2]; -} - -class I { - I1 b = I1(); - Future> run() async { - return [...await b.foo()]; - } -} - -Future spreadAwaitMemberAccessBindTest() async { - var expected = [1, 2]; - - // spread on await of member access - Expect.listEquals(expected, await I().run()); -} diff --git a/tests/language_2/spread_collections/const_error_test.dart b/tests/language_2/spread_collections/const_error_test.dart deleted file mode 100644 index 1a0a43ed647..00000000000 --- a/tests/language_2/spread_collections/const_error_test.dart +++ /dev/null @@ -1,70 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:collection'; - -import 'helper_classes.dart'; - -var nonConstList = []; -var nonConstMap = {}; -var nonConstSet = {}; -const dynamic nonIterable = 3; -const dynamic nonMap = 3; - -void main() { - testList(); - testMap(); - testSet(); -} - -void testList() { - // Must be constant. - const _ = [...nonConstList]; //# 01: compile-time error - - // Must be iterable. - const _ = [...nonIterable]; //# 02: compile-time error - - // Cannot be custom iterable type. - const _ = [...ConstIterable()]; //# 03: compile-time error -} - -void testMap() { - // Must be constant. - const _ = {...nonConstMap}; //# 04: compile-time error - - // Must be map. - const _ = {...nonMap}; //# 05: compile-time error - - // Cannot be custom map type. - const _ = {...ConstMap()}; //# 06: compile-time error - - // Cannot have key collision. - const _ = {1: "s", ...{1: "t"}}; //# 07: compile-time error - const _ = {...{1: "s"}, ...{1: "t"}}; //# 08: compile-time error -} - -void testSet() { - // Must be constant. - const _ = {...nonConstList}; //# 09: compile-time error - const _ = {...nonConstSet}; //# 10: compile-time error - - // Must be iterable. - const _ = {...nonIterable}; //# 11: compile-time error - - // Cannot be custom iterable type. - const _ = {...ConstIterable()}; //# 12: compile-time error - - // Cannot override operator.==(). - const obj = 0.1; - const _ = {...[0.1]}; //# 13: compile-time error - const _ = {...[Duration(seconds: 0)]}; //# 14: compile-time error - const _ = {...[obj]}; //# 15: compile-time error - - // Cannot have collision. - const _ = {1, ...[1]}; //# 16: compile-time error - const _ = {...[1, 1, 3, 8]}; //# 17: compile-time error - const _ = {...[1], ...[1]}; //# 18: compile-time error -} diff --git a/tests/language_2/spread_collections/const_test.dart b/tests/language_2/spread_collections/const_test.dart deleted file mode 100644 index 4e7eb8f31aa..00000000000 --- a/tests/language_2/spread_collections/const_test.dart +++ /dev/null @@ -1,182 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -// Typed as dynamic to also test spreading a value of type dynamic. -const dynamic list = [1, 2, 3, 4]; -const dynamic map = {1: 1, 2: 2, 3: 3, 4: 4}; -const dynamic set = {1, 2, 3, 4}; - -void main() { - testList(); - testMap(); - testSet(); - testKeyOrder(); -} - -void testList() { - // Only spread. - Expect.identical(list, const [...list]); - Expect.identical(list, const [...set]); - - // Spread at beginning. - Expect.identical(list, const [...[1, 2], 3, 4]); - - // Spread in middle. - Expect.identical(list, const [1, ...[2, 3], 4]); - - // Spread at end. - Expect.identical(list, const [1, 2, ...[3, 4]]); - - // Empty spreads. - Expect.identical(list, - const [...[], 1, 2, ...[], 3, 4, ...[]]); - - // Multiple spreads. - Expect.identical(list, - const [...[1], 2, ...[3, 4]]); - - // Nested spreads. - Expect.identical(list, - const [...[...[1, 2], ...[3, 4]]]); - - // Null-aware. - Expect.identical(list, - const [1, ...?[2, 3], ...?(null), ...?[4]]); - - // Does not deep flatten. - Expect.identical( - const [1, 2, [3], 4], - const [1, ...[2, [3], 4]]); - - // Establishes const context. - Expect.identical(const [Symbol("sym")], - const [...[Symbol("sym")]]); -} - -void testMap() { - // Only spread. - Expect.identical(map, const {...map}); - - // Spread at beginning. - Expect.identical(map, - const {...{1: 1, 2: 2}, 3: 3, 4: 4}); - - // Spread in middle. - Expect.identical(map, - const {1: 1, ...{2: 2, 3: 3}, 4: 4}); - - // Spread at end. - Expect.identical(map, - const {1: 1, 2: 2, ...{3: 3, 4: 4}}); - - // Empty spreads. - Expect.identical(map, const { - ...{}, - 1: 1, - 2: 2, - ...{}, - 3: 3, - 4: 4, - ...{} - }); - - // Multiple spreads. - Expect.identical(map, - const {...{1: 1}, 2: 2, ...{3: 3, 4: 4}}); - - // Nested spreads. - Expect.identical(map, const { - ...{ - ...{1: 1, 2: 2}, - ...{3: 3, 4: 4} - } - }); - - // Null-aware. - Expect.identical(map, const { - 1: 1, - ...?{2: 2, 3: 3}, - ...?(null), - ...?{4: 4} - }); - - // Does not deep flatten. - Expect.identical(const { - 1: 1, - 2: 2, - 3: {3: 3}, - 4: 4 - }, const { - 1: 1, - ...{ - 2: 2, - 3: {3: 3}, - 4: 4 - } - }); - - // Establishes const context. - Expect.identical(const { - Symbol("sym"): Symbol("bol") - }, const { - ...{Symbol("sym"): Symbol("bol")} - }); -} - -void testSet() { - // Only spread. - Expect.identical(set, const {...set}); - Expect.identical(set, const {...list}); - - // Spread at beginning. - Expect.identical(set, const {...[1, 2], 3, 4}); - - // Spread in middle. - Expect.identical(set, const {1, ...[2, 3], 4}); - - // Spread at end. - Expect.identical(set, const {1, 2, ...[3, 4]}); - - // Empty spreads. - Expect.identical(set, - const {...[], 1, 2, ...[], 3, 4, ...[]}); - - // Multiple spreads. - Expect.identical(set, const {...[1], 2, ...[3, 4]}); - - // Nested spreads. - Expect.identical(set, const {...{...[1, 2], ...[3, 4]}}); - - // Null-aware. - Expect.identical(set, - const {1, ...?[2, 3], ...?(null), ...?[4]}); - - // Does not deep flatten. - Expect.identical(const {1, 2, {3}, 4}, - const {1, ...{2, {3}, 4}}); - - // Establishes const context. - Expect.identical(const {Symbol("sym")}, - const {...{Symbol("sym")}}); -} - -void testKeyOrder() { - // Canonicalization isn't affected by which elements are spread. - Expect.identical(map, - const {1: 1, ...{2: 2, 3: 3}, 4: 4}); - Expect.identical(map, - const {1: 1, ...{2: 2}, 3: 3, ...{4: 4}}); - - Expect.identical(set, const {1, ...{2, 3}, 4}); - Expect.identical(set, const {1, ...{2}, 3, ...{4}}); - - // Ordering does affect canonicalization. - Expect.notIdentical(const {1: 1, 2: 2, 3: 3}, - const {1: 1, ...{3: 3, 2: 2}}); - Expect.notIdentical(const {1, 2, 3}, const {1, ...{3, 2}}); -} diff --git a/tests/language_2/spread_collections/helper_classes.dart b/tests/language_2/spread_collections/helper_classes.dart deleted file mode 100644 index d888fc17b57..00000000000 --- a/tests/language_2/spread_collections/helper_classes.dart +++ /dev/null @@ -1,76 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:collection'; - -class ConstIterable extends IterableBase { - const ConstIterable(); - - Iterator get iterator => [].iterator; -} - -class ConstMap implements Map { - const ConstMap(); - - Iterable> get entries => const []; - - bool get isEmpty => throw UnsupportedError("unsupported"); - bool get isNotEmpty => throw UnsupportedError("unsupported"); - Iterable get keys => throw UnsupportedError("unsupported"); - int get length => throw UnsupportedError("unsupported"); - Iterable get values => throw UnsupportedError("unsupported"); - String operator [](Object key) => throw UnsupportedError("unsupported"); - operator []=(int key, String value) => throw UnsupportedError("unsupported"); - bool add(Object value) => throw UnsupportedError("unsupported"); - void addAll(Map map) => throw UnsupportedError("unsupported"); - void addEntries(Iterable> entries) => - throw UnsupportedError("unsupported"); - Map cast() => throw UnsupportedError("unsupported"); - void clear() => throw UnsupportedError("unsupported"); - bool containsKey(Object key) => throw UnsupportedError("unsupported"); - bool containsValue(Object value) => throw UnsupportedError("unsupported"); - void forEach(void Function(int key, String value) f) => - throw UnsupportedError("unsupported"); - Map map(MapEntry Function(int key, String value) f) => - throw UnsupportedError("unsupported"); - String putIfAbsent(int key, String Function() ifAbsent) => - throw UnsupportedError("unsupported"); - String remove(Object key) => throw UnsupportedError("unsupported"); - void removeWhere(bool Function(int key, String value) predicate) => - throw UnsupportedError("unsupported"); - String update(int key, String Function(String value) update, - {String Function() ifAbsent}) => - throw UnsupportedError("unsupported"); - void updateAll(String Function(int key, String value) update) => - throw UnsupportedError("unsupported"); -} - -class CustomMap with MapMixin { - Iterable get keys => []; - String operator [](Object key) => ""; - operator []=(int key, String value) {} - String remove(Object key) => throw UnsupportedError("unsupported"); - void clear() => throw UnsupportedError("unsupported"); -} - -class CustomSet extends SetBase { - bool add(int value) => throw UnsupportedError("unsupported"); - bool contains(Object value) => throw UnsupportedError("unsupported"); - Iterator get iterator => [].iterator; - int get length => 0; - int lookup(Object value) => throw UnsupportedError("unsupported"); - bool remove(Object value) => throw UnsupportedError("unsupported"); - Set toSet() => this; -} - -class Equality { - final int id; - final String name; - const Equality(this.id, this.name); - int get hashCode => id; - bool operator ==(Object other) => other is Equality && id == other.id; - String toString() => "$id:$name"; -} diff --git a/tests/language_2/spread_collections/inference_test.dart b/tests/language_2/spread_collections/inference_test.dart deleted file mode 100644 index 53d598df2fb..00000000000 --- a/tests/language_2/spread_collections/inference_test.dart +++ /dev/null @@ -1,117 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Test how spread interacts with inference. -import 'package:expect/expect.dart'; - -void main() { - testBottomUpInference(); - testTopDownInference(); -} - -void testBottomUpInference() { - // Lists. - Expect.type>([...[]]); - Expect.type>([...[]]); - Expect.type>([...[1]]); - Expect.type>([1, ...[2]]); - Expect.type>([1, ...[0.2]]); - Expect.type>([...[1, 2]]); - Expect.type>([...[1, 0.2]]); - Expect.type>([...[1], ...[2]]); - Expect.type>([...[1], ...[0.2]]); - - // Maps. - Expect.type>({...{}}); - Expect.type>({...{}}); - Expect.type>({...{1: 1}}); - Expect.type>({1: 1, ...{2: 2}}); - Expect.type>({1: 1, ...{0.2: 0.2}}); - Expect.type>({...{1: 1, 2: 2}}); - Expect.type>({...{1: 1, 0.2: 0.2}}); - Expect.type>({...{1: 1}, ...{2: 2}}); - Expect.type>({...{1: 1}, ...{0.2: 0.2}}); - - // Sets. - Expect.type>({...[]}); - Expect.type>({...[]}); - Expect.type>({...[1]}); - Expect.type>({1, ...[2]}); - Expect.type>({1, ...[0.2]}); - Expect.type>({...[1, 2]}); - Expect.type>({...[1, 0.2]}); - Expect.type>({...[1], ...[2]}); - Expect.type>({...[1], ...[0.2]}); - Expect.type>({...{1}, ...[0.2]}); - Expect.type>({...{1}, ...{0.2}}); - - // If the iterable's type is dynamic, the element type is inferred as dynamic. - Expect.type>([...([] as dynamic)]); - Expect.type>({1, ...([] as dynamic)}); - - // If the iterable's type is dynamic, the key and value types are inferred as - // dynamic. - Expect.type>({1: 1, ...({} as dynamic)}); -} - -void testTopDownInference() { - // Lists. - Iterable expectIntIterable() { - Expect.equals(int, T); - return []; - } - - Iterable expectDynamicIterable() { - Expect.equals(dynamic, T); - return []; - } - - // The context element type is pushed into the spread expression if it is - // Iterable. - Expect.listEquals([], [...expectIntIterable()]); - - // Bottom up-inference from elements is not pushed back down into spread. - Expect.listEquals([1], [1, ...expectDynamicIterable()]); - - // Maps. - Map expectIntStringMap() { - Expect.equals(int, K); - Expect.equals(String, V); - return {}; - } - - Map expectDynamicDynamicMap() { - Expect.equals(dynamic, K); - Expect.equals(dynamic, V); - return {}; - } - - // The context element type is pushed into the spread expression if it is - // Map. - Expect.mapEquals({}, {...expectIntStringMap()}); - - // Bottom up-inference from elements is not pushed back down into spread. - Expect.mapEquals({1: "s"}, - {1: "s", ...expectDynamicDynamicMap()}); - - // Sets. - Set expectIntSet() { - Expect.equals(int, T); - return Set(); - } - - Set expectDynamicSet() { - Expect.equals(dynamic, T); - return Set(); - } - - // The context element type is pushed into the spread expression if it is - // Iterable. - Expect.setEquals({}, {...expectIntSet()}); - - // Bottom up-inference from elements is not pushed back down into spread. - Expect.setEquals({1}, {1, ...expectDynamicSet()}); -} diff --git a/tests/language_2/spread_collections/issue_45174_error_test.dart b/tests/language_2/spread_collections/issue_45174_error_test.dart deleted file mode 100644 index e29c3f61de0..00000000000 --- a/tests/language_2/spread_collections/issue_45174_error_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// 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. - -// @dart = 2.9 - -f(Object objectQuestion) { - return {...{}, ...objectQuestion}; - // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER - // ^ - // [cfe] Unexpected type 'Object' of a map spread entry. Expected 'dynamic' or a Map. -} - -main() {} diff --git a/tests/language_2/spread_collections/map_set_ambiguity_error_test.dart b/tests/language_2/spread_collections/map_set_ambiguity_error_test.dart deleted file mode 100644 index fa4bcac8230..00000000000 --- a/tests/language_2/spread_collections/map_set_ambiguity_error_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Test cases where the syntax is ambiguous between maps and sets. -import 'dart:collection'; - -import 'helper_classes.dart'; - -void main() { - Map map = {}; - Set set = Set(); - dynamic dyn = map; - Iterable iterable = []; - CustomSet customSet = CustomSet(); - CustomMap customMap = CustomMap(); - - var _ = {...dyn}; //# 00: compile-time error - var _ = {...map, ...set}; //# 01: compile-time error - var _ = {...map, ...iterable}; //# 02: compile-time error - var _ = {...map, ...customSet}; //# 03: compile-time error - var _ = {...set, ...customMap}; //# 04: compile-time error - var _ = {...dyn, ...dyn}; //# 05: compile-time error - var _ = {...iterable, ...customMap}; //# 06: compile-time error - var _ = {...customSet, ...customMap}; //# 07: compile-time error -} diff --git a/tests/language_2/spread_collections/map_set_ambiguity_test.dart b/tests/language_2/spread_collections/map_set_ambiguity_test.dart deleted file mode 100644 index 29b54699e71..00000000000 --- a/tests/language_2/spread_collections/map_set_ambiguity_test.dart +++ /dev/null @@ -1,76 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Test cases where the syntax is ambiguous between maps and sets. -import 'dart:collection'; - -import 'package:expect/expect.dart'; - -import 'helper_classes.dart'; - -void main() { - testBottomUpInference(); - testTopDownInference(); -} - -void testBottomUpInference() { - Map map = {}; - Set set = Set(); - dynamic dynMap = map; - dynamic dynSet = set; - Iterable iterable = []; - CustomSet customSet = CustomSet(); - CustomMap customMap = CustomMap(); - - // Note: The commented out cases are the error cases. They are shown here for - // completeness and tested in map_set_ambiguity_error_test.dart. - Expect.type>({...map}); - Expect.type>({...set}); - // Expect.type<...>({...dyn}); - Expect.type>({...iterable}); - Expect.type>({...customSet}); - Expect.type>({...customMap}); - - Expect.type>({...map, ...map}); - // Expect.type<...>({...map, ...set}); - Expect.type>({...map, ...dynMap}); - // Expect.type<...>({...map, ...iterable}); - // Expect.type<...>({...map, ...customSet}); - Expect.type>({...map, ...customMap}); - - Expect.type>({...set, ...set}); - Expect.type>({...set, ...dynSet}); - Expect.type>({...set, ...iterable}); - Expect.type>({...set, ...customSet}); - // Expect.type<...>({...set, ...customMap}); - - // Expect.type<...>({...dyn, ...dyn}); - Expect.type>({...dynSet, ...iterable}); - Expect.type>({...dynSet, ...customSet}); - Expect.type>({...dynMap, ...customMap}); - - Expect.type>({...iterable, ...iterable}); - Expect.type>({...iterable, ...customSet}); - // Expect.type<...>({...iterable, ...customMap}); - - Expect.type>({...customSet, ...customSet}); - // Expect.type<...>({...customSet, ...customMap}); - - Expect.type>({...customMap, ...customMap}); -} - -void testTopDownInference() { - dynamic untypedMap = {}; - dynamic untypedIterable = []; - - Map map = {...untypedMap}; - Set set = {...untypedIterable}; - Iterable iterable = {...untypedIterable}; - - Expect.type>(map); - Expect.type>(set); - Expect.type>(iterable); -} diff --git a/tests/language_2/spread_collections/runtime_error_test.dart b/tests/language_2/spread_collections/runtime_error_test.dart deleted file mode 100644 index 4f6eff30bbb..00000000000 --- a/tests/language_2/spread_collections/runtime_error_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -// Typed as dynamic to also test spreading a value of type dynamic. -final dynamic list = [1, 2, 3, 4]; -final dynamic map = {1: 1, 2: 2, 3: 3, 4: 4}; -final dynamic set = {1, 2, 3, 4}; - -void main() { - dynamic nonIterable = 3; - Expect.throwsTypeError(() => [...nonIterable]); - Expect.throwsTypeError(() => {...nonIterable}); - - dynamic nonMap = 3; - Expect.throwsTypeError(() => {...nonMap}); - - dynamic wrongIterableType = ["s"]; - Expect.throwsTypeError(() => [...wrongIterableType]); - Expect.throwsTypeError(() => {...wrongIterableType}); - - dynamic wrongKeyType = {"s": 1}; - dynamic wrongValueType = {1: "s"}; - Expect.throwsTypeError(() => {...wrongKeyType}); - Expect.throwsTypeError(() => {...wrongValueType}); - - // Mismatched collection types. - Expect.throwsTypeError(() => [...map]); - Expect.throwsTypeError(() => {...list}); - Expect.throwsTypeError(() => {...set}); - Expect.throwsTypeError(() => {...map}); -} diff --git a/tests/language_2/spread_collections/spread_test.dart b/tests/language_2/spread_collections/spread_test.dart deleted file mode 100644 index ecf7bd83948..00000000000 --- a/tests/language_2/spread_collections/spread_test.dart +++ /dev/null @@ -1,198 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -import 'helper_classes.dart'; - -// Typed as dynamic to also test spreading a value of type dynamic. -final dynamic list = [1, 2, 3, 4]; -final dynamic map = {1: 1, 2: 2, 3: 3, 4: 4}; -final dynamic set = {1, 2, 3, 4}; - -void main() { - testList(); - testMap(); - testSet(); - testDuplicateKeys(); - testKeyOrder(); -} - -void testList() { - // Only spread. - Expect.listEquals(list, [...list]); - - // Spread at beginning. - Expect.listEquals(list, [...[1, 2], 3, 4]); - - // Spread in middle. - Expect.listEquals(list, [1, ...[2, 3], 4]); - - // Spread at end. - Expect.listEquals(list, [1, 2, ...[3, 4]]); - - // Empty spreads. - Expect.listEquals(list, - [...[], 1, 2, ...[], 3, 4, ...[]]); - - // Multiple spreads. - Expect.listEquals(list, [...[1], 2, ...[3, 4]]); - - // Nested spreads. - Expect.listEquals(list, [...[...[1, 2], ...[3, 4]]]); - - // Null-aware. - Expect.listEquals(list, [1, ...?[2, 3], ...?(null), ...?[4]]); - - // Does not deep flatten. - var innerList = [3]; - Expect.listEquals( - [1, 2, innerList, 4], - [1, ...[2, innerList, 4]]); - - // Downcast element. - Expect.listEquals(list, [...[1, 2, 3, 4]]); -} - -void testMap() { - // Only spread. - Expect.mapEquals(map, {...map}); - - // Spread at beginning. - Expect.mapEquals(map, {...{1: 1, 2: 2}, 3: 3, 4: 4}); - - // Spread in middle. - Expect.mapEquals(map, {1: 1, ...{2: 2, 3: 3}, 4: 4}); - - // Spread at end. - Expect.mapEquals(map, {1: 1, 2: 2, ...{3: 3, 4: 4}}); - - // Empty spreads. - Expect.mapEquals(map, { - ...{}, - 1: 1, - 2: 2, - ...{}, - 3: 3, - 4: 4, - ...{} - }); - - // Multiple spreads. - Expect.mapEquals(map, - {...{1: 1}, 2: 2, ...{3: 3, 4: 4}}); - - // Nested spreads. - Expect.mapEquals(map, { - ...{ - ...{1: 1, 2: 2}, - ...{3: 3, 4: 4} - } - }); - - // Null-aware. - Expect.mapEquals(map, { - 1: 1, - ...?{2: 2, 3: 3}, - ...?(null), - ...?{4: 4} - }); - - // Does not deep flatten. - var innerMap = {3: 3}; - Expect.mapEquals({ - 1: 1, - 2: 2, - 3: innerMap, - 4: 4 - }, { - 1: 1, - ...{ - 2: 2, - 3: innerMap, - 4: 4 - } - }); - - // Downcast element. - Expect.mapEquals(map, {...{1: 1, 2: 2, 3: 3, 4: 4}}); -} - -void testSet() { - // Only spread. - Expect.setEquals(set, {...set}); - - // Spread at beginning. - Expect.setEquals(set, {...[1, 2], 3, 4}); - - // Spread in middle. - Expect.setEquals(set, {1, ...[2, 3], 4}); - - // Spread at end. - Expect.setEquals(set, {1, 2, ...[3, 4]}); - - // Empty spreads. - Expect.setEquals(set, {...[], 1, 2, ...[], 3, 4, ...[]}); - - // Multiple spreads. - Expect.setEquals(set, {...[1], 2, ...[3, 4]}); - - // Nested spreads. - Expect.setEquals(set, {...{...[1, 2], ...[3, 4]}}); - - // Null-aware. - Expect.setEquals(set, {1, ...?[2, 3], ...?(null), ...?[4]}); - - // Does not deep flatten. - var innerSet = {3}; - Expect.setEquals({1, 2, innerSet, 4}, - {1, ...[2, innerSet, 4]}); - - // Downcast element. - Expect.setEquals(set, {...[1, 2, 3, 4]}); -} - -void testDuplicateKeys() { - Expect.mapEquals(map, { - 1: 1, - 2: 2, - ...{2: 2, 3: 3, 4: 4}, - ...{3: 3}, - 4: 4 - }); - Expect.setEquals(set, {1, 2, ...[1, 2, 3, 4], ...[2, 3], 4}); -} - -void testKeyOrder() { - // First equal key wins. - var e1a = Equality(1, "a"); - var e1b = Equality(1, "b"); - var e2a = Equality(2, "a"); - var e2b = Equality(2, "b"); - - var map = {e1a: 1, ...{e1b: 2, e2a: 3, e2b: 4}}; - Expect.equals("1:a,2:a", map.keys.join(",")); - - var set = {e1a, ...[e1b, e2a, e2b]}; - Expect.equals("1:a,2:a", set.join(",")); - - // All elements are evaluated, left to right. - var transcript = []; - T log(T value) { - transcript.add(value.toString()); - return value; - } - - map = { - log(e1a): log(1), - ...{log(e1b): log(2), log(e2a): log(3), log(e2b): log(4)} - }; - Expect.equals("1:a,1,1:b,2,2:a,3,2:b,4", transcript.join(",")); - - transcript.clear(); - set = {log(e1a), ...[log(e1b), log(e2a), log(e2b)]}; - Expect.equals("1:a,1:b,2:a,2:b", transcript.join(",")); -} diff --git a/tests/language_2/spread_collections/syntax_error_test.dart b/tests/language_2/spread_collections/syntax_error_test.dart deleted file mode 100644 index 4d9e36dc169..00000000000 --- a/tests/language_2/spread_collections/syntax_error_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -// @dart = 2.9 - -void main() { - // Spread nothing. - var _ = [...]; //# 00: syntax error - var _ = [...?]; //# 01: syntax error - var _ = [...,]; //# 02: syntax error - - // Use `...` in map entry. - var _ = {"a": ...{}}; //# 03: syntax error - var _ = {...{}: "b"}; //# 04: syntax error - var _ = {"a": ...?{}}; //# 05: syntax error - var _ = {...?{}: "b"}; //# 06: syntax error - - // Treats `...?` as single token. - var _ = [... ?null]; //# 07: syntax error - var _ = {1: 2, ... ?null}; //# 08: syntax error -} diff --git a/tests/language_2/spread_collections/syntax_test.dart b/tests/language_2/spread_collections/syntax_test.dart deleted file mode 100644 index 94d83d205bd..00000000000 --- a/tests/language_2/spread_collections/syntax_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests syntax edge cases. -import 'package:expect/expect.dart'; - -void main() { - // Trailing comma. - Expect.listEquals([1, 2], [...[1, 2],]); - Expect.mapEquals({1: 1, 2: 2}, {...{1: 1, 2: 2},}); - Expect.setEquals({1, 2}, {...{1, 2},}); - - // Precedence. - Expect.listEquals([1, 2, 3], [1, ...true ? [2] : [], 3]); - Expect.listEquals([1, 3], [1, ...?true ? null : [], 3]); - - var a = [0]; - Expect.listEquals([1, 2, 3], [1, ...a = [2], 3]); - Expect.listEquals([1, 3], [1, ...?a = null, 3]); - - var b = [2]; - Expect.listEquals([1, 2, 3, 4], [1, ...b..add(3), 4]); - b = [2]; - Expect.listEquals([1, 2, 3, 4], [1, ...?b..add(3), 4]); -} diff --git a/tests/language_2/spread_collections/type_error_test.dart b/tests/language_2/spread_collections/type_error_test.dart deleted file mode 100644 index 64bcb238704..00000000000 --- a/tests/language_2/spread_collections/type_error_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// 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. - -// @dart = 2.9 - -void main() { - // Spread non-iterable or non-map. - var _ = [...(3)]; //# 00: compile-time error - var _ = {...(3)}; //# 01: compile-time error - var _ = {...(3)}; //# 02: compile-time error - - // Object. - var _ = [...([] as Object)]; //# 03: compile-time error - var _ = {...({} as Object)}; //# 04: compile-time error - var _ = {...([] as Object)}; //# 05: compile-time error - - // Wrong element type. - var _ = [...[]]; //# 06: compile-time error - var _ = {...{}}; //# 07: compile-time error - var _ = {...{}}; //# 08: compile-time error - var _ = {...[]}; //# 09: compile-time error -} diff --git a/tests/language_2/spread_collections/unevaluated_test.dart b/tests/language_2/spread_collections/unevaluated_test.dart deleted file mode 100644 index 3be94c49b8f..00000000000 --- a/tests/language_2/spread_collections/unevaluated_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Test that the body of an if element with unevaluated condition can -// contain a spread. -// Regression test for https://github.com/dart-lang/sdk/issues/36812 - -const b = bool.fromEnvironment("foo"); - -main() { - const l1 = [1, 2, 3]; - const l2 = [if (b) ...l1]; - print(l2); -} diff --git a/tests/language_2/stack_trace/custom_await_test.dart b/tests/language_2/stack_trace/custom_await_test.dart deleted file mode 100644 index ea57a062ba4..00000000000 --- a/tests/language_2/stack_trace/custom_await_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:async"; -import "package:expect/expect.dart"; - -class Blah implements StackTrace { - Blah(this._trace); - - toString() { - return "Blah " + _trace.toString(); - } - - var _trace; -} - -foo() { - var x = "\nBloop\nBleep\n"; - return new Future.error(42, new Blah(x)); -} - -main() async { - try { - var x = await foo(); - Expect.fail("Should not reach here."); - } on int catch (e, s) { - Expect.equals(42, e); - Expect.equals("Blah \nBloop\nBleep\n", s.toString()); - return; - } - Expect.fail("Unreachable."); -} diff --git a/tests/language_2/stack_trace/demangle_ctors_test.dart b/tests/language_2/stack_trace/demangle_ctors_test.dart deleted file mode 100644 index 714fc095bb6..00000000000 --- a/tests/language_2/stack_trace/demangle_ctors_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2017, 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 - -// Test that stack traces are properly demangled in constructors (#28740). - -import "package:expect/expect.dart"; - -class SomeClass { - SomeClass.namedConstructor() { - throw new Exception(); - } - - SomeClass() { - throw new Exception(); - } - - factory SomeClass.useFactory() { - throw new Exception(); - } -} - -class OnlyHasFactory { - factory OnlyHasFactory() { - throw new Exception(); - } -} - -void main() { - try { - new SomeClass(); - } on Exception catch (e, st) { - final stString = st.toString(); - Expect.isTrue(stString.contains("new SomeClass")); - Expect.isFalse(stString.contains("SomeClass.")); - } - - try { - new SomeClass.namedConstructor(); - } on Exception catch (e, st) { - final stString = st.toString(); - Expect.isTrue(stString.contains("new SomeClass.namedConstructor")); - } - - try { - new OnlyHasFactory(); - } on Exception catch (e, st) { - final stString = st.toString(); - Expect.isTrue(stString.contains("new OnlyHasFactory")); - Expect.isFalse(stString.contains("OnlyHasFactory.")); - } - - try { - new SomeClass.useFactory(); - } on Exception catch (e, st) { - final stString = st.toString(); - Expect.isTrue(stString.contains("new SomeClass.useFactory")); - } -} diff --git a/tests/language_2/stack_trace/error_runtime_test.dart b/tests/language_2/stack_trace/error_runtime_test.dart deleted file mode 100644 index b91bf26a2c0..00000000000 --- a/tests/language_2/stack_trace/error_runtime_test.dart +++ /dev/null @@ -1,128 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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 test program for testing throw statement - -import "package:expect/expect.dart"; - -class MyException { - const MyException(String message) : message_ = message; - final String message_; -} - -class Helper1 { - static int func1() { - return func2(); - } - - static int func2() { - return func3(); - } - - static int func3() { - return func4(); - } - - static int func4() { - var i = 0; - try { - i = 10; - func5(); - } on ArgumentError catch (e) { - i = 100; - Expect.isNotNull(e.stackTrace, "Errors need a stackTrace on throw"); - } - return i; - } - - static void func5() { - // Throw an Error. - throw new ArgumentError("ArgumentError in func5"); - } -} - -class Helper2 { - static int func1() { - return func2(); - } - - static int func2() { - return func3(); - } - - static int func3() { - return func4(); - } - - static int func4() { - var i = 0; - try { - i = 10; - func5(); - } on ArgumentError catch (e, s) { - i = 200; - Expect.isNotNull(e.stackTrace, "Errors need a stackTrace on throw"); - Expect.equals(e.stackTrace.toString(), s.toString()); - } - return i; - } - - static List func5() { - // Throw an Error. - throw new ArgumentError("ArgumentError in func5"); - } -} - -class Helper3 { - static int func1() { - return func2(); - } - - static int func2() { - return func3(); - } - - static int func3() { - return func4(); - } - - static int func4() { - var i = 0; - try { - i = 10; - func5(); - } on MyException catch (e) { - i = 300; - - // There should be no stackTrace in this normal exception object. - // We should get a NoSuchMethodError. - - - - - } - return i; - } - - static List func5() { - // Throw an Exception (any random object). - throw new MyException("MyException in func5"); - } -} - -class ErrorStackTraceTest { - static testMain() { - Expect.equals(100, Helper1.func1()); - Expect.equals(200, Helper2.func1()); - Expect.equals(300, Helper3.func1()); - } -} - -main() { - ErrorStackTraceTest.testMain(); -} diff --git a/tests/language_2/stack_trace/full1_test.dart b/tests/language_2/stack_trace/full1_test.dart deleted file mode 100644 index e00620009f1..00000000000 --- a/tests/language_2/stack_trace/full1_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// (c) 2013, 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 - -import "package:expect/expect.dart"; - -@pragma("vm:entry-point") // Prevents obfuscation -void func1() { - throw new Exception("Test full stacktrace"); -} - -@pragma("vm:entry-point") // Prevents obfuscation -void func2() { - func1(); -} - -@pragma("vm:entry-point") // Prevents obfuscation -void func3() { - try { - func2(); - } on Object catch (e, s) { - var fullTrace = s.toString(); - Expect.isTrue(fullTrace.contains("func1")); - Expect.isTrue(fullTrace.contains("func2")); - Expect.isTrue(fullTrace.contains("func3")); - Expect.isTrue(fullTrace.contains("func4")); - Expect.isTrue(fullTrace.contains("func5")); - Expect.isTrue(fullTrace.contains("func6")); - Expect.isTrue(fullTrace.contains("main")); - } -} - -@pragma("vm:entry-point") // Prevents obfuscation -int func4() { - func3(); - return 1; -} - -@pragma("vm:entry-point") // Prevents obfuscation -int func5() { - func4(); - return 1; -} - -@pragma("vm:entry-point") // Prevents obfuscation -int func6() { - func5(); - return 1; -} - -main() { - var i = func6(); - Expect.equals(1, i); -} diff --git a/tests/language_2/stack_trace/full2_test.dart b/tests/language_2/stack_trace/full2_test.dart deleted file mode 100644 index 4b1dbe30ca5..00000000000 --- a/tests/language_2/stack_trace/full2_test.dart +++ /dev/null @@ -1,77 +0,0 @@ -// (c) 2013, 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 - -import "package:expect/expect.dart"; - -@pragma("vm:entry-point") // Prevent obfuscation. -void func1() { - throw new Exception("Test full stacktrace"); -} - -@pragma("vm:entry-point") // Prevent obfuscation. -void func2() { - func1(); -} - -@pragma("vm:entry-point") // Prevent obfuscation. -void func3() { - try { - func2(); - } on Object catch (e, s) { - var fullTrace = s.toString(); - Expect.isTrue(fullTrace.contains("func1")); - Expect.isTrue(fullTrace.contains("func2")); - Expect.isTrue(fullTrace.contains("func3")); - Expect.isTrue(fullTrace.contains("func4")); - Expect.isTrue(fullTrace.contains("func5")); - Expect.isTrue(fullTrace.contains("func6")); - Expect.isTrue(fullTrace.contains("func7")); - Expect.isTrue(fullTrace.contains("main")); - - rethrow; // This is a rethrow. - } -} - -@pragma("vm:entry-point") // Prevent obfuscation. -int func4() { - func3(); - return 1; -} - -@pragma("vm:entry-point") // Prevent obfuscation. -int func5() { - try { - func4(); - } on Object catch (e, s) { - var fullTrace = s.toString(); - Expect.isTrue(fullTrace.contains("func1")); - Expect.isTrue(fullTrace.contains("func2")); - Expect.isTrue(fullTrace.contains("func3")); - Expect.isTrue(fullTrace.contains("func4")); - Expect.isTrue(fullTrace.contains("func5")); - Expect.isTrue(fullTrace.contains("func6")); - Expect.isTrue(fullTrace.contains("func7")); - Expect.isTrue(fullTrace.contains("main")); - } - return 1; -} - -@pragma("vm:entry-point") // Prevent obfuscation. -int func6() { - func5(); - return 1; -} - -@pragma("vm:entry-point") // Prevent obfuscation. -int func7() { - func6(); - return 1; -} - -main() { - var i = func7(); - Expect.equals(1, i); -} diff --git a/tests/language_2/stack_trace/full3_test.dart b/tests/language_2/stack_trace/full3_test.dart deleted file mode 100644 index ee621b2f0db..00000000000 --- a/tests/language_2/stack_trace/full3_test.dart +++ /dev/null @@ -1,76 +0,0 @@ -// (c) 2013, 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 - -import "package:expect/expect.dart"; - -@pragma("vm:entry-point") // Prevent obfuscation -void func1() { - throw new Exception("Test full stacktrace"); -} - -@pragma("vm:entry-point") // Prevent obfuscation -void func2() { - func1(); -} - -@pragma("vm:entry-point") // Prevent obfuscation -void func3() { - try { - func2(); - } on Object catch (e, s) { - var fullTrace = s.toString(); - Expect.isTrue(fullTrace.contains("func1")); - Expect.isTrue(fullTrace.contains("func2")); - Expect.isTrue(fullTrace.contains("func3")); - Expect.isTrue(fullTrace.contains("func4")); - Expect.isTrue(fullTrace.contains("func5")); - Expect.isTrue(fullTrace.contains("func6")); - Expect.isTrue(fullTrace.contains("func7")); - Expect.isTrue(fullTrace.contains("main")); - throw new Exception("This is not a rethrow"); - } -} - -@pragma("vm:entry-point") // Prevent obfuscation -int func4() { - func3(); - return 1; -} - -@pragma("vm:entry-point") // Prevent obfuscation -int func5() { - try { - func4(); - } on Object catch (e, s) { - var fullTrace = s.toString(); - Expect.isFalse(fullTrace.contains("func1")); - Expect.isFalse(fullTrace.contains("func2")); - Expect.isTrue(fullTrace.contains("func3")); - Expect.isTrue(fullTrace.contains("func4")); - Expect.isTrue(fullTrace.contains("func5")); - Expect.isTrue(fullTrace.contains("func6")); - Expect.isTrue(fullTrace.contains("func7")); - Expect.isTrue(fullTrace.contains("main")); - } - return 1; -} - -@pragma("vm:entry-point") // Prevent obfuscation -int func6() { - func5(); - return 1; -} - -@pragma("vm:entry-point") // Prevent obfuscation -int func7() { - func6(); - return 1; -} - -main() { - var i = func7(); - Expect.equals(1, i); -} diff --git a/tests/language_2/stack_trace/rethrow_error_test.dart b/tests/language_2/stack_trace/rethrow_error_test.dart deleted file mode 100644 index 211e186aeea..00000000000 --- a/tests/language_2/stack_trace/rethrow_error_test.dart +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) 2014, 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 - -class SubclassOfError extends Error {} - -fail() => throw "Fail"; - -// == Rethrow, skipping through typed handlers. == - -@pragma("vm:entry-point") // Prevent obfuscation -aa1() { - try { - bb1(); - fail(); - } catch (error - , stacktrace // //# withtraceparameter: ok - ) { - expectTrace( - ['gg1', 'ff1', 'ee1', 'dd1', 'cc1', 'bb1', 'aa1'], error.stackTrace); - expectTrace(['gg1', 'ff1', 'ee1', 'dd1', 'cc1', 'bb1', 'aa1'], stacktrace); // //# withtraceparameter: continued - } -} - -@pragma("vm:entry-point") // Prevent obfuscation -bb1() => cc1(); - -@pragma("vm:entry-point") // Prevent obfuscation -cc1() { - try { - dd1(); - } on String catch (e) { - fail(); - } on int catch (e) { - fail(); - } -} - -@pragma("vm:entry-point") // Prevent obfuscation -dd1() => ee1(); - -@pragma("vm:entry-point") // Prevent obfuscation -ee1() { - try { - ff1(); - } catch (e) { - rethrow; - } -} - -@pragma("vm:entry-point") // Prevent obfuscation -ff1() => gg1(); - -@pragma("vm:entry-point") // Prevent obfuscation -gg1() => throw new SubclassOfError(); - -// == Rethrow, rethrow again in typed handler. == - -@pragma("vm:entry-point") // Prevent obfuscation -aa2() { - try { - bb2(); - fail(); - } catch (error - , stacktrace // //# withtraceparameter: continued - ) { - expectTrace( - ['gg2', 'ff2', 'ee2', 'dd2', 'cc2', 'bb2', 'aa2'], error.stackTrace); - expectTrace(['gg2', 'ff2', 'ee2', 'dd2', 'cc2', 'bb2', 'aa2'], stacktrace); // //# withtraceparameter: continued - } -} - -@pragma("vm:entry-point") // Prevent obfuscation -bb2() => cc2(); - -@pragma("vm:entry-point") // Prevent obfuscation -cc2() { - try { - dd2(); - } on SubclassOfError catch (e) { - rethrow; - } on int catch (e) { - fail(); - } -} - -@pragma("vm:entry-point") // Prevent obfuscation -dd2() => ee2(); - -@pragma("vm:entry-point") // Prevent obfuscation -ee2() { - try { - ff2(); - } catch (e) { - rethrow; - } -} - -@pragma("vm:entry-point") // Prevent obfuscation -ff2() => gg2(); - -@pragma("vm:entry-point") // Prevent obfuscation -gg2() => throw new SubclassOfError(); - -// == Rethrow, with intervening catch without a trace parameter. - -@pragma("vm:entry-point") // Prevent obfuscation -aa3() { - try { - bb3(); - fail(); - } catch (error - , stacktrace // //# withtraceparameter: continued - ) { - expectTrace( - ['gg3', 'ff3', 'ee3', 'dd3', 'cc3', 'bb3', 'aa3'], error.stackTrace); - expectTrace(['cc3', 'bb3', 'aa3'], stacktrace); // //# withtraceparameter: continued - } -} - -@pragma("vm:entry-point") // Prevent obfuscation -bb3() => cc3(); - -@pragma("vm:entry-point") // Prevent obfuscation -cc3() { - try { - dd3(); - } catch (e) { - throw e; - } -} - -@pragma("vm:entry-point") // Prevent obfuscation -dd3() => ee3(); - -@pragma("vm:entry-point") // Prevent obfuscation -ee3() { - try { - ff3(); - } catch (e) { - rethrow; - } -} - -@pragma("vm:entry-point") // Prevent obfuscation -ff3() => gg3(); - -@pragma("vm:entry-point") // Prevent obfuscation -gg3() => throw new SubclassOfError(); - -expectTrace(functionNames, stacktrace) { - // Note we don't expect functionNames to cover the whole trace, only the - // top portion, because the frames below main are an implementation detail. - var traceLines = stacktrace.toString().split('\n'); - var expectedIndex = 0; - var actualIndex = 0; - print(stacktrace); - print(functionNames); - while (expectedIndex < functionNames.length) { - var expected = functionNames[expectedIndex]; - var actual = traceLines[actualIndex]; - if (actual.indexOf(expected) == -1) { - if (expectedIndex == 0) { - actualIndex++; // Skip over some helper frames at the top - } else { - throw "Expected: $expected actual: $actual"; - } - } else { - actualIndex++; - expectedIndex++; - } - } -} - -main() { - aa1(); - aa2(); - aa3(); -} diff --git a/tests/language_2/stack_trace/rethrow_nonerror_test.dart b/tests/language_2/stack_trace/rethrow_nonerror_test.dart deleted file mode 100644 index 3ca985f04e9..00000000000 --- a/tests/language_2/stack_trace/rethrow_nonerror_test.dart +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) 2014, 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 - -class NotASubclassOfError {} - -fail() => throw "Fail"; - -// == Rethrow, skipping through typed handlers. == - -@pragma("vm:entry-point") -aa1() { - try { - bb1(); - fail(); - } catch (exception, stacktrace) { - expectTrace(['gg1', 'ff1', 'ee1', 'dd1', 'cc1', 'bb1', 'aa1'], stacktrace); - } -} - -@pragma("vm:entry-point") -bb1() => cc1(); - -@pragma("vm:entry-point") -cc1() { - try { - dd1(); - } on String catch (e) { - fail(); - } on int catch (e) { - fail(); - } -} - -@pragma("vm:entry-point") -dd1() => ee1(); - -@pragma("vm:entry-point") -ee1() { - try { - ff1(); - } catch (e) { - rethrow; - } -} - -@pragma("vm:entry-point") -ff1() => gg1(); - -@pragma("vm:entry-point") -gg1() => throw new NotASubclassOfError(); - -// == Rethrow, rethrow again in typed handler. == - -@pragma("vm:entry-point") -aa2() { - try { - bb2(); - fail(); - } catch (exception, stacktrace) { - expectTrace(['gg2', 'ff2', 'ee2', 'dd2', 'cc2', 'bb2', 'aa2'], stacktrace); - } -} - -@pragma("vm:entry-point") -bb2() => cc2(); - -@pragma("vm:entry-point") -cc2() { - try { - dd2(); - } on NotASubclassOfError catch (e) { - rethrow; - } on int catch (e) { - fail(); - } -} - -@pragma("vm:entry-point") -dd2() => ee2(); - -@pragma("vm:entry-point") -ee2() { - try { - ff2(); - } catch (e) { - rethrow; - } -} - -@pragma("vm:entry-point") -ff2() => gg2(); - -@pragma("vm:entry-point") -gg2() => throw new NotASubclassOfError(); - -// == Rethrow, with intervening catch without a trace parameter. - -@pragma("vm:entry-point") -aa3() { - try { - bb3(); - fail(); - } catch (exception, stacktrace) { - expectTrace(['cc3', 'bb3', 'aa3'], stacktrace); - } -} - -@pragma("vm:entry-point") -bb3() => cc3(); - -@pragma("vm:entry-point") -cc3() { - try { - dd3(); - } catch (e) { - throw e; - } -} - -@pragma("vm:entry-point") -dd3() => ee3(); - -@pragma("vm:entry-point") -ee3() { - try { - ff3(); - } catch (e) { - rethrow; - } -} - -@pragma("vm:entry-point") -ff3() => gg3(); - -@pragma("vm:entry-point") -gg3() => throw new NotASubclassOfError(); - -expectTrace(functionNames, stacktrace) { - // Note we don't expect functionNames to cover the whole trace, only the - // top portion, because the frames below main are an implementation detail. - var traceLines = stacktrace.toString().split('\n'); - var expectedIndex = 0; - var actualIndex = 0; - print(stacktrace); - print(functionNames); - while (expectedIndex < functionNames.length) { - var expected = functionNames[expectedIndex]; - var actual = traceLines[actualIndex]; - if (actual.indexOf(expected) == -1) { - if (expectedIndex == 0) { - actualIndex++; // Skip over some helper frames at the top - } else { - throw "Expected: $expected actual: $actual"; - } - } else { - actualIndex++; - expectedIndex++; - } - } -} - -main() { - aa1(); - aa2(); - aa3(); -} diff --git a/tests/language_2/stack_trace/stack_trace_test.dart b/tests/language_2/stack_trace/stack_trace_test.dart deleted file mode 100644 index 55797983d88..00000000000 --- a/tests/language_2/stack_trace/stack_trace_test.dart +++ /dev/null @@ -1,141 +0,0 @@ -// 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 test program for testing throw statement - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class MyException { - const MyException(String message) : message_ = message; - final String message_; -} - -class Helper { - static int f1(int i) { - try { - i = func(); - i = 10; - } on MyException catch (exception, stacktrace) { - i = 50; - print(exception.message_); - Expect.isNotNull(stacktrace); - print(stacktrace); - } - try { - int j; - i = func1(); - i = 200; - } on MyException catch (exception, stacktrace) { - i = 50; - print(exception.message_); - Expect.isNotNull(stacktrace); - print(stacktrace); - } - try { - int j; - i = func2(); - i = 200; - } on MyException catch (exception, stacktrace) { - i = 50; - print(exception.message_); - Expect.isNotNull(stacktrace); - print(stacktrace); - } finally { - i = i + 800; - } - return i; - } - - static int func() { - int i = 0; - while (i < 10) { - i++; - } - if (i > 0) { - throw new MyException("Exception Test for stack trace being printed"); - } - return 10; - } - - static int func1() { - try { - func(); - } on MyException catch (exception) { - throw new MyException("Exception Test for stack trace being printed"); - ; - } - return 10; - } - - static int func2() { - try { - func(); - } on MyException catch (exception) { - rethrow; - } - return 10; - } -} - -class StackTraceTest { - static testMain() { - Expect.equals(850, Helper.f1(1)); - } -} - -// Test that the full stack trace is generated for rethrow. -class RethrowStacktraceTest { - var config = 0; - - @pragma("vm:entry-point") // Prevent obfuscation - @pragma("vm:never-inline") // Prevent inlining - issue12940() { - throw "Progy"; - } - - b() { - issue12940(); - } - - c() { - if (config == 0) { - try { - b(); - } catch (e) { - rethrow; - } - } else { - try { - b(); - } catch (e, s) { - rethrow; - } - } - } - - d() { - c(); - } - - testBoth() { - for (config = 0; config < 2; config++) { - try { - d(); - } catch (e, s) { - Expect.contains("issue12940", s.toString()); - } - } - } - - static testMain() { - var test = new RethrowStacktraceTest(); - test.testBoth(); - } -} - -main() { - StackTraceTest.testMain(); - RethrowStacktraceTest.testMain(); -} diff --git a/tests/language_2/stack_trace/stacktrace_test.dart b/tests/language_2/stack_trace/stacktrace_test.dart deleted file mode 100644 index 691f9688ad2..00000000000 --- a/tests/language_2/stack_trace/stacktrace_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that a stack trace is properly terminated (issue 8850). - -import "package:expect/expect.dart"; - -void main() { - var ex = new Exception("fail"); - try { - throw ex; - } on Exception catch (e, st) { - Expect.equals(ex, e); - Expect.isTrue(st.toString().length > 0); - } -} diff --git a/tests/language_2/static/call_wrong_argument_count_test.dart b/tests/language_2/static/call_wrong_argument_count_test.dart deleted file mode 100644 index 4420fc9d76c..00000000000 --- a/tests/language_2/static/call_wrong_argument_count_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Test mismatch in argument counts. -class Niesen { - static int goodCall(int a, int b, int c) { - return a + b; - } -} - -main() { - Niesen.goodCall(1, 2, 3); - - Niesen.goodCall(1, 2, 3, 4); - // ^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS - // ^^^^^^^^^^^^ - // [cfe] Too many positional arguments: 3 allowed, but 4 found. -} diff --git a/tests/language_2/static/closure_identical_test.dart b/tests/language_2/static/closure_identical_test.dart deleted file mode 100644 index 5505a265ab8..00000000000 --- a/tests/language_2/static/closure_identical_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -var foo = main; - -main() { - Expect.equals(main, main); - Expect.identical(main, main); - Expect.equals(main.hashCode, main.hashCode); - - Expect.equals(main, foo); - Expect.identical(main, foo); - Expect.equals(main.hashCode, foo.hashCode); -} diff --git a/tests/language_2/static/const_field_reserved_name_test.dart b/tests/language_2/static/const_field_reserved_name_test.dart deleted file mode 100644 index eb00b994f07..00000000000 --- a/tests/language_2/static/const_field_reserved_name_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2016, 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 - -// Dart test for testing redefinition of reserved names as static const fields. -// Issue https://github.com/dart-archive/dev_compiler/issues/587 - -import "package:expect/expect.dart"; - -class Field { - static const name = 'Foo'; -} - -class StaticConstFieldReservedNameTest { - static testMain() { - Expect.equals('Foo', Field.name); - } -} - -class Foo { - int get foo => 42; - static final baz = new Foo(); -} - -class Bar extends Foo { - get foo => 123; - Bar.baz(); -} - -void main() { - StaticConstFieldReservedNameTest.testMain(); - - // Regression test for https://github.com/dart-lang/sdk/issues/33621 - Expect.equals(Bar.baz().foo, 123); -} diff --git a/tests/language_2/static/const_field_test.dart b/tests/language_2/static/const_field_test.dart deleted file mode 100644 index a189147464e..00000000000 --- a/tests/language_2/static/const_field_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -// 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 test program for testing static const fields. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -abstract class Spain { - static const AG = "Antoni Gaudi"; - static const SD = "Salvador Dali"; -} - -abstract class Switzerland { - static const AG = "Alberto Giacometti"; - static const LC = "Le Corbusier"; -} - -class A implements Switzerland { - const A() : n = 5; - final n; - static const a = const A(); - static const b = 3 + 5; - static const c = A.b + 7; - static const d = const A(); - static const s1 = "hula"; - static const s2 = "hula"; - static const s3 = "hop"; - static const d1 = 1.1; - static const d2 = 0.55 + 0.55; - static const artist2 = Switzerland.AG; - static const architect1 = Spain.AG; - static const array1 = const [1, 2]; - static const map1 = const { - "Monday": 1, - "Tuesday": 2, - }; -} - -class StaticFinalFieldTest { - static testMain() { - Expect.equals(15, A.c); - Expect.equals(8, A.b); - Expect.equals(5, A.a.n); - Expect.equals(true, identical(8, A.b)); - Expect.equals(true, identical(A.a, A.d)); - Expect.equals(true, identical(A.s1, A.s2)); - Expect.equals(false, identical(A.s1, A.s3)); - Expect.equals(false, identical(A.s1, A.b)); - Expect.equals(true, identical(A.d1, A.d2)); - Expect.equals(true, Spain.SD == "Salvador Dali"); - Expect.equals(true, A.artist2 == "Alberto Giacometti"); - Expect.equals(true, A.architect1 == "Antoni Gaudi"); - Expect.equals(2, A.map1["Tuesday"]); - } -} - -main() { - StaticFinalFieldTest.testMain(); -} diff --git a/tests/language_2/static/field1_runtime_test.dart b/tests/language_2/static/field1_runtime_test.dart deleted file mode 100644 index c2e9e5c5303..00000000000 --- a/tests/language_2/static/field1_runtime_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. -// Test that a static field cannot be read as an instance field. - -class Foo { - Foo() {} - static var x; -} - -class StaticField1Test { - static testMain() { - if (false) { - var foo = new Foo(); - - } - } -} - -main() { - StaticField1Test.testMain(); -} diff --git a/tests/language_2/static/field1_test.dart b/tests/language_2/static/field1_test.dart deleted file mode 100644 index 77f9dc31436..00000000000 --- a/tests/language_2/static/field1_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// 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. -// Test that a static field cannot be read as an instance field. - -// @dart = 2.9 - -class Foo { - Foo() {} - static var x; -} - -class StaticField1Test { - static testMain() { - if (false) { - var foo = new Foo(); - var x = foo.x; - // ^ - // [analyzer] COMPILE_TIME_ERROR.INSTANCE_ACCESS_TO_STATIC_MEMBER - // [cfe] The getter 'x' isn't defined for the class 'Foo'. - } - } -} - -main() { - StaticField1Test.testMain(); -} diff --git a/tests/language_2/static/field1a_runtime_test.dart b/tests/language_2/static/field1a_runtime_test.dart deleted file mode 100644 index b1ebe25de3c..00000000000 --- a/tests/language_2/static/field1a_runtime_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. -// Test that a static method cannot be read as an instance field. - -class Foo { - Foo() {} - static void m() {} -} - -class StaticField1aTest { - static testMain() { - if (false) { - var foo = new Foo(); - - } - } -} - -main() { - StaticField1aTest.testMain(); -} diff --git a/tests/language_2/static/field1a_test.dart b/tests/language_2/static/field1a_test.dart deleted file mode 100644 index 363af9d5790..00000000000 --- a/tests/language_2/static/field1a_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// 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. -// Test that a static method cannot be read as an instance field. - -// @dart = 2.9 - -class Foo { - Foo() {} - static void m() {} -} - -class StaticField1aTest { - static testMain() { - if (false) { - var foo = new Foo(); - var m = foo.m; - // ^ - // [analyzer] COMPILE_TIME_ERROR.INSTANCE_ACCESS_TO_STATIC_MEMBER - // [cfe] The getter 'm' isn't defined for the class 'Foo'. - } - } -} - -main() { - StaticField1aTest.testMain(); -} diff --git a/tests/language_2/static/field3_runtime_test.dart b/tests/language_2/static/field3_runtime_test.dart deleted file mode 100644 index 15bb25b9817..00000000000 --- a/tests/language_2/static/field3_runtime_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. -// Test that an instance field cannot be read as a static field. - -class Foo { - Foo() {} - var x; - void m() {} -} - -main() { - if (false) { - - - - - } -} diff --git a/tests/language_2/static/field3_test.dart b/tests/language_2/static/field3_test.dart deleted file mode 100644 index 44f1f7ae471..00000000000 --- a/tests/language_2/static/field3_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// 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. -// Test that an instance field cannot be read as a static field. - -// @dart = 2.9 - -class Foo { - Foo() {} - var x; - void m() {} -} - -main() { - if (false) { - var x = Foo.x; - // ^ - // [analyzer] COMPILE_TIME_ERROR.STATIC_ACCESS_TO_INSTANCE_MEMBER - // [cfe] Member not found: 'x'. - var m = Foo.m; - // ^ - // [analyzer] COMPILE_TIME_ERROR.STATIC_ACCESS_TO_INSTANCE_MEMBER - // [cfe] Member not found: 'm'. - Foo.m = 1; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER - // [cfe] Setter not found: 'm'. - Foo.x = 1; - // ^ - // [analyzer] COMPILE_TIME_ERROR.STATIC_ACCESS_TO_INSTANCE_MEMBER - // [cfe] Setter not found: 'x'. - } -} diff --git a/tests/language_2/static/field_override1_test.dart b/tests/language_2/static/field_override1_test.dart deleted file mode 100644 index 46063be0c51..00000000000 --- a/tests/language_2/static/field_override1_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'package:expect/expect.dart'; - -class Foo { - static int get x => 42; -} - -class Bar extends Foo { - static int x = 12; -} - -void main() { - Expect.equals(12, Bar.x); -} diff --git a/tests/language_2/static/field_override2_test.dart b/tests/language_2/static/field_override2_test.dart deleted file mode 100644 index 177f033d57d..00000000000 --- a/tests/language_2/static/field_override2_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'package:expect/expect.dart'; - -class Foo { - static int get x => 42; - static void set x(value) {} -} - -class Bar extends Foo { - static int x = 12; -} - -void main() { - Expect.equals(12, Bar.x); -} diff --git a/tests/language_2/static/field_override3_test.dart b/tests/language_2/static/field_override3_test.dart deleted file mode 100644 index 9ba21fb62a4..00000000000 --- a/tests/language_2/static/field_override3_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'package:expect/expect.dart'; - -class Foo { - static int x = 42; -} - -class Bar extends Foo { - static int x = 12; -} - -void main() { - Expect.equals(12, Bar.x); -} diff --git a/tests/language_2/static/field_test.dart b/tests/language_2/static/field_test.dart deleted file mode 100644 index f21534c183d..00000000000 --- a/tests/language_2/static/field_test.dart +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing setting/getting/initializing static fields. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class First { - First() {} - static var a; - static var b; - static const int c = 1; - static setValues() { - a = 24; - b = 10; - return a + b + c; - } -} - -class InitializerTest { - static var one; - static var two = 2; - static var three = 2; - - static checkValueOfThree() { - // We need to keep this check separate to prevent three from - // getting initialized before the += is executed. - Expect.equals(3, three); - } - - static void testStaticFieldInitialization() { - Expect.equals(null, one); - Expect.equals(2, two); - one = 11; - two = 22; - Expect.equals(11, one); - Expect.equals(22, two); - - // Assignment operators exercise a different code path. Make sure - // that initialization works here as well. - three += 1; - checkValueOfThree(); - } -} - -class StaticFieldTest { - static testMain() { - First.a = 3; - First.b = First.a; - Expect.equals(3, First.a); - Expect.equals(First.a, First.b); - First.b = (First.a = 10); - Expect.equals(10, First.a); - Expect.equals(10, First.b); - First.b = First.a = 15; - Expect.equals(15, First.a); - Expect.equals(15, First.b); - Expect.equals(35, First.setValues()); - Expect.equals(24, First.a); - Expect.equals(10, First.b); - } -} - -class StaticField1RunNegativeTest { - static // //# 01: compile-time error - var x; - testMain() { - var foo = new StaticField1RunNegativeTest(); - print(x); // Used to compile 'x' and force any errors. - var result = foo.x; - } -} - -class StaticField1aRunNegativeTest { - static // //# 02: compile-time error, runtime error - void m() {} - - testMain() { - var foo = new StaticField1aRunNegativeTest(); - print(m); // Used to compile 'm' and force any errors. - var result = foo.m; - } -} - -class StaticField2RunNegativeTest { - static //# 03: compile-time error - var x; - - testMain() { - var foo = new StaticField2RunNegativeTest(); - print(x); // Used to compile 'x' and force any errors. - foo.x = 1; - } -} - -class StaticField2aRunNegativeTest { - static // //# 04: compile-time error - void m() {} - - testMain() { - var foo = new StaticField2aRunNegativeTest(); - print(m); // Used to compile 'm' and force any errors. - foo.m = 1; //# 04:continued - } -} - -main() { - StaticFieldTest.testMain(); - InitializerTest.testStaticFieldInitialization(); - new StaticField1RunNegativeTest().testMain(); - new StaticField1aRunNegativeTest().testMain(); - new StaticField2RunNegativeTest().testMain(); - new StaticField2aRunNegativeTest().testMain(); -} diff --git a/tests/language_2/static/final_field2_runtime_test.dart b/tests/language_2/static/final_field2_runtime_test.dart deleted file mode 100644 index 69433ba9cca..00000000000 --- a/tests/language_2/static/final_field2_runtime_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. -// Disallow re-assignment of a final static variable. - -class A { - static const x = 1; -} - -class B { - const B() : n = 5; - final n; - - static const b = 3 + 5; -} - -main() { - - new B(); - print(B.b); - -} diff --git a/tests/language_2/static/final_field2_test.dart b/tests/language_2/static/final_field2_test.dart deleted file mode 100644 index 04149822dc7..00000000000 --- a/tests/language_2/static/final_field2_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// 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. -// Disallow re-assignment of a final static variable. - -// @dart = 2.9 - -class A { - static const x = 1; -} - -class B { - const B() : n = 5; - final n; - static const a; - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONST_NOT_INITIALIZED - // [cfe] The const variable 'a' must be initialized. - static const b = 3 + 5; -} - -main() { - A.x = 2; -// ^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_CONST -// [cfe] Setter not found: 'x'. - new B(); - print(B.b); - print(B.a); -} diff --git a/tests/language_2/static/getter_no_setter1_runtime_test.dart b/tests/language_2/static/getter_no_setter1_runtime_test.dart deleted file mode 100644 index c83846de15f..00000000000 --- a/tests/language_2/static/getter_no_setter1_runtime_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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 'package:expect/expect.dart'; - -class Class { - static int get getter => 0; - - method() { - - } -} - -main() { - new Class().method(); -} diff --git a/tests/language_2/static/getter_no_setter1_test.dart b/tests/language_2/static/getter_no_setter1_test.dart deleted file mode 100644 index 818cc6891f8..00000000000 --- a/tests/language_2/static/getter_no_setter1_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'package:expect/expect.dart'; - -class Class { - static int get getter => 0; - - method() { - getter++; -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'getter'. - } -} - -main() { - new Class().method(); -} diff --git a/tests/language_2/static/getter_no_setter2_runtime_test.dart b/tests/language_2/static/getter_no_setter2_runtime_test.dart deleted file mode 100644 index 1999fb4be41..00000000000 --- a/tests/language_2/static/getter_no_setter2_runtime_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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 'package:expect/expect.dart'; - -class Class { - static int get getter => 0; - - method() { - - } - - noSuchMethod(i) => 42; -} - -main() { - new Class().method(); -} diff --git a/tests/language_2/static/getter_no_setter2_test.dart b/tests/language_2/static/getter_no_setter2_test.dart deleted file mode 100644 index 4656d053eca..00000000000 --- a/tests/language_2/static/getter_no_setter2_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'package:expect/expect.dart'; - -class Class { - static int get getter => 0; - - method() { - getter++; -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL_NO_SETTER -// [cfe] Setter not found: 'getter'. - } - - noSuchMethod(i) => 42; -} - -main() { - new Class().method(); -} diff --git a/tests/language_2/static/implicit_closure_test.dart b/tests/language_2/static/implicit_closure_test.dart deleted file mode 100644 index 666a118d427..00000000000 --- a/tests/language_2/static/implicit_closure_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// 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 test program for testing invocation of implicit closures. -// VMOptions= -// VMOptions=--use_slow_path - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class First { - First() {} - static int get a { - return 10; - } - - static var b; - static int foo() { - return 30; - } -} - -class StaticImplicitClosureTest { - static void testMain() { - Function func = () => 20; - Expect.equals(10, First.a); - First.b = First.a; - Expect.equals(10, First.b); - First.b = func; - Expect.equals(20, First.b()); - Function fa = First.foo; - Expect.equals(30, fa()); - } -} - -main() { - StaticImplicitClosureTest.testMain(); -} diff --git a/tests/language_2/static/initializer_type_error_test.dart b/tests/language_2/static/initializer_type_error_test.dart deleted file mode 100644 index 280e3cccfbf..00000000000 --- a/tests/language_2/static/initializer_type_error_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -int x = "milou"; -// ^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT -// [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. - -bool readXThrows() { - try { - var y = x; - return false; - } catch (e) { - x = 5; // Make sure we do not throw exception a second time. - return true; - } -} - -main() { - int numExceptions = 0; - for (int i = 0; i < 8; i++) { - if (readXThrows()) { - numExceptions++; - } - } - Expect.equals(1, numExceptions); -} diff --git a/tests/language_2/static/inline_test.dart b/tests/language_2/static/inline_test.dart deleted file mode 100644 index 37938b20081..00000000000 --- a/tests/language_2/static/inline_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test inlining of assignments in parameter passing. If [StringScanner.charAt] -// is inlined, the argument expression [: ++byteOffset :] should not be -// duplicated. - -class StringScanner { - static String string; - int byteOffset = -1; - - int nextByte(foo) { - if (foo) return -2; - return charAt(++byteOffset); - } - - static int charAt(index) => - (string.length > index) ? string.codeUnitAt(index) : -1; -} - -void main() { - var scanner = new StringScanner(); - StringScanner.string = 'az9'; - Expect.equals(0x61, scanner.nextByte(false)); // Expect a. - Expect.equals(0x7A, scanner.nextByte(false)); // Expect z. - Expect.equals(0x39, scanner.nextByte(false)); // Expect 9. - Expect.equals(-1, scanner.nextByte(false)); -} diff --git a/tests/language_2/static/parameter_test.dart b/tests/language_2/static/parameter_test.dart deleted file mode 100644 index ecd35e58258..00000000000 --- a/tests/language_2/static/parameter_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2013, 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 - -foo(x - , static int y // //# 01: syntax error - , final static y // //# 02: syntax error - , {static y} // //# 03: syntax error - , [static y] // //# 04: syntax error - ) {} - -class C { - bar(x - , static int y // //# 05: syntax error - , final static y // //# 06: syntax error - , {static y} // //# 07: syntax error - , [static y] // //# 08: syntax error - ) {} - - static baz(x - , static int y // //# 09: syntax error - , final static y // //# 10: syntax error - , {static y} // //# 11: syntax error - , [static y] // //# 12: syntax error - ) {} -} - -main() { - foo(1 - , 1 // //# 01: continued - , 1 // //# 02: continued - , y: 1 // //# 03: continued - , 1 // //# 04: continued - ); - new C().bar(1 - , 1 // //# 05: continued - , 1 // //# 06: continued - , y: 1 // //# 07: continued - , 1 // //# 08: continued - ); - C.baz(1 - , 1 // //# 09: continued - , 1 // //# 10: continued - , y: 1 // //# 11: continued - , 1 // //# 12: continued - ); -} diff --git a/tests/language_2/static/postfix_operator_test.dart b/tests/language_2/static/postfix_operator_test.dart deleted file mode 100644 index 6fc9c03d432..00000000000 --- a/tests/language_2/static/postfix_operator_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -int a = 0; -int b = 0; - -withTryFinally() { - bool inIt = false; - // Do a try/finally to potentially force a non-optimizing compiler. - try { - if (a++ == 0) { - inIt = true; - } - } finally {} - Expect.isTrue(inIt); -} - -withoutTryFinally() { - bool inIt = false; - if (b++ == 0) { - inIt = true; - } - Expect.isTrue(inIt); -} - -main() { - withTryFinally(); - withoutTryFinally(); -} diff --git a/tests/language_2/static/setter_conflicts_test.dart b/tests/language_2/static/setter_conflicts_test.dart deleted file mode 100644 index 7907a518d4c..00000000000 --- a/tests/language_2/static/setter_conflicts_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2018, 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 - -class C { - static set foo(int x) {} - - int foo(int x) => x; //# 01: compile-time error - static int foo(int x) => x; //# 02: compile-time error - - int foo = 3; //# 03: compile-time error - final int foo = 4; //# 04: compile-time error - static int foo = 5; //# 05: compile-time error - static final int foo = 6; //# 06: ok - - int get foo => 7; //# 07: compile-time error - static int get foo => 8; //# 08: ok - - set foo(int x) {} //# 09: compile-time error - static set foo(int x) {} //# 10: compile-time error - - C.foo(int x) {} //# 11: compile-time error - factory C.foo(int x) => null; //# 12: compile-time error -} - -main() {} diff --git a/tests/language_2/static/setter_get_runtime_test.dart b/tests/language_2/static/setter_get_runtime_test.dart deleted file mode 100644 index 9d464b330fd..00000000000 --- a/tests/language_2/static/setter_get_runtime_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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 'package:expect/expect.dart'; - -class Class { - static set o(_) {} - - noSuchMethod(_) => 42; -} - -main() { - -} diff --git a/tests/language_2/static/setter_get_test.dart b/tests/language_2/static/setter_get_test.dart deleted file mode 100644 index c9f4d25a00b..00000000000 --- a/tests/language_2/static/setter_get_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'package:expect/expect.dart'; - -class Class { - static set o(_) {} - m() => o; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER - // [cfe] Getter not found: 'o'. - noSuchMethod(_) => 42; -} - -main() { - Expect.throws(() => new Class().m()); -} diff --git a/tests/language_2/static/static_setter_on_const_field_test.dart b/tests/language_2/static/static_setter_on_const_field_test.dart deleted file mode 100644 index 354e7242922..00000000000 --- a/tests/language_2/static/static_setter_on_const_field_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2022, 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 - -import "package:expect/expect.dart"; - -// Tests that static setters of const fields are properly invoked on set. - -class A { - static const int field = 0; - static void set field(int value) { - Expect.equals(value, 100); - B.count += 1; - } -} - -class B { - static int count = 0; -} - -main() { - Expect.equals(B.count, 0); - A.field = 100; - Expect.equals(B.count, 1); - Expect.equals(A.field, 0); - A.field = 100; - Expect.equals(B.count, 2); - Expect.equals(A.field, 0); -} diff --git a/tests/language_2/static/top_level_runtime_test.dart b/tests/language_2/static/top_level_runtime_test.dart deleted file mode 100644 index 215451f5e2e..00000000000 --- a/tests/language_2/static/top_level_runtime_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - - - - - - - - - - - -void main() {} diff --git a/tests/language_2/static/top_level_test.dart b/tests/language_2/static/top_level_test.dart deleted file mode 100644 index d29cfd8648f..00000000000 --- a/tests/language_2/static/top_level_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// 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 - -static method() { } -// [error line 7, column 1, length 6] -// [analyzer] SYNTACTIC_ERROR.EXTRANEOUS_MODIFIER -// [cfe] Can't have modifier 'static' here. -static var field; -// [error line 11, column 1, length 6] -// [analyzer] SYNTACTIC_ERROR.EXTRANEOUS_MODIFIER -// [cfe] Can't have modifier 'static' here. -static const finalField = 42; -// [error line 15, column 1, length 6] -// [analyzer] SYNTACTIC_ERROR.EXTRANEOUS_MODIFIER -// [cfe] Can't have modifier 'static' here. -static const constant = 123; -// [error line 19, column 1, length 6] -// [analyzer] SYNTACTIC_ERROR.EXTRANEOUS_MODIFIER -// [cfe] Can't have modifier 'static' here. - -static int typedMethod() => 87; -// [error line 24, column 1, length 6] -// [analyzer] SYNTACTIC_ERROR.EXTRANEOUS_MODIFIER -// [cfe] Can't have modifier 'static' here. -static int typedField; -// [error line 28, column 1, length 6] -// [analyzer] SYNTACTIC_ERROR.EXTRANEOUS_MODIFIER -// [cfe] Can't have modifier 'static' here. -static const int typedFinalField = 99; -// [error line 32, column 1, length 6] -// [analyzer] SYNTACTIC_ERROR.EXTRANEOUS_MODIFIER -// [cfe] Can't have modifier 'static' here. -static const int typedConstant = 1; -// [error line 36, column 1, length 6] -// [analyzer] SYNTACTIC_ERROR.EXTRANEOUS_MODIFIER -// [cfe] Can't have modifier 'static' here. - -void main() {} diff --git a/tests/language_2/static_type_helper.dart b/tests/language_2/static_type_helper.dart deleted file mode 100644 index 4a7809ac76c..00000000000 --- a/tests/language_2/static_type_helper.dart +++ /dev/null @@ -1,90 +0,0 @@ -// 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. - -/// Helper to create [Type] values. -Type typeOf() => T; - -/// Ensures a context type of [T] for the operand. -void context(T x) {} - -/// Captures the context type of the call and returns the same type. -/// -/// Can be used to check the context type as: -/// ```dart -/// int x = contextType(1 /* valid value */)..expectStaticType>; -/// ``` -T contextType(Object result) => result as T; - -extension StaticType on T { - /// Check the static type. - /// - /// Use as follows (assuming `e` has static type `num`): - /// ```dart - /// e.expectStaticType>() // No context type. - /// e.expectStaticType>() // No context type. - /// e.expectStaticType>() // No context type. - /// ``` - /// or - /// ```dart - /// e..expectStaticType>() // Preserve context type. - /// e..expectStaticType>() // Preserve context type. - /// e..expectStaticType>() // Preserve context type. - /// ``` - /// This will be a *compile-time error* if the static type is not - /// as required by the constraints type (the one passed to [Exactly], - /// [SubtypeOf] or [SupertypeOf].) - T expectStaticType>() { - return this; - } - - /// Invokes [callback] with the static type of `this`. - /// - /// Allows any operation on the type. - T captureStaticType(void Function() callback) { - callback(); - return this; - } -} - -/// Invokes [callback] with the static type of [value]. -/// -/// Similar to [StaticType.captureStaticType], but works -/// for types like `void` and `dynamic` which do not allow -/// extension methods. -void captureStaticType(T value, void Function(X value) callback) { - callback(value); -} - -/// Use with [StaticType.expectStaticType] to expect precisely the type [T]. -/// -/// Example use: -/// ```dart -/// "abc".expectStaticType>(); -/// ``` -typedef Exactly = T Function(T); - -/// Use with [StaticType.expectStaticType] to expect a subtype of [T]. -/// -/// Example use: -/// ```dart -/// num x = 1; -/// x.expectStaticType>(); -/// ``` -typedef SubtypeOf = Never Function(T); - -/// Use with [StaticType.expectStaticType] to expect a supertype of [T]. -/// -/// Example use: -/// ```dart -/// num x = 1; -/// x.expectStaticType>(); -/// ``` -typedef SupertypeOf = T Function(Object?); - -/// Checks that an expression is assignable to [T1], [T2] and [Object]. -/// -/// This ensures that the static type of the expression is either dynamic, -/// Never, or a type assignable to both [T1] and [T2], and if those are -/// unrelated, it must be an intersection type. -void checkIntersectionType(T1 v1, T2 v2, Object v3) {} diff --git a/tests/language_2/string/adjacent_const_string_literals_test.dart b/tests/language_2/string/adjacent_const_string_literals_test.dart deleted file mode 100644 index 0416f6d9beb..00000000000 --- a/tests/language_2/string/adjacent_const_string_literals_test.dart +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class Conster { - const Conster(this.value); - - final value; - - toString() { - return value.toString(); - } -} - -main() { - testEmpty(); - testInterpolation(); - testMultiline(); -} - -testEmpty() { - Expect.equals("", (const Conster("" "" "")).toString()); - Expect.equals("", (const Conster("" '' "")).toString()); - Expect.equals("", (const Conster("" "" r"")).toString()); - - Expect.equals("a", (const Conster("a" "")).toString()); - Expect.equals("a", (const Conster("a" '')).toString()); - Expect.equals("a", (const Conster("a" r'')).toString()); - - Expect.equals("b", (const Conster('b' "")).toString()); - Expect.equals("b", (const Conster('b' '')).toString()); - Expect.equals("b", (const Conster('b' r'')).toString()); - - Expect.equals("c", (const Conster(r'c' "")).toString()); - Expect.equals("c", (const Conster(r'c' '')).toString()); - Expect.equals("c", (const Conster(r'c' r'')).toString()); - - Expect.equals("a", (const Conster("" "a")).toString()); - Expect.equals("a", (const Conster("" 'a')).toString()); - Expect.equals("a", (const Conster("" r'a')).toString()); - - Expect.equals("b", (const Conster('' "b")).toString()); - Expect.equals("b", (const Conster('' 'b')).toString()); - Expect.equals("b", (const Conster('' r'b')).toString()); - - Expect.equals("c", (const Conster(r'' "c")).toString()); - Expect.equals("c", (const Conster(r'' 'c')).toString()); - Expect.equals("c", (const Conster(r'' r'c')).toString()); -} - -const s = "a"; - -testInterpolation() { - Expect.equals(r"ab", (const Conster("$s" "b")).toString()); - Expect.equals(r"ab", (const Conster('$s' "b")).toString()); - Expect.equals(r"$sb", (const Conster(r'$s' "b")).toString()); - - Expect.equals(r"-a-b", (const Conster("-$s-" "b")).toString()); - Expect.equals(r"-a-b", (const Conster('-$s-' "b")).toString()); - Expect.equals(r"-$s-b", (const Conster(r'-$s-' "b")).toString()); - - Expect.equals(r"ba", (const Conster('b' "$s")).toString()); - Expect.equals(r"ba", (const Conster('b' '$s')).toString()); - Expect.equals(r"b$s", (const Conster('b' r'$s')).toString()); - - Expect.equals(r"b-a-", (const Conster('b' "-$s-")).toString()); - Expect.equals(r"b-a-", (const Conster('b' '-$s-')).toString()); - Expect.equals(r"b-$s-", (const Conster('b' r'-$s-')).toString()); -} - -testMultiline() { - Expect.equals( - "abe", - (const Conster("a" - "b" - "e")) - .toString()); - Expect.equals( - "a b e", - (const Conster("a " - "b " - "e")) - .toString()); - Expect.equals( - "a b e", - (const Conster("a" - " b" - " e")) - .toString()); - - Expect.equals( - "abe", - (const Conster(""" -a""" - "b" - "e")) - .toString()); - Expect.equals( - "a b e", - (const Conster(""" -a""" - " b" - " e")) - .toString()); - - Expect.equals( - "abe", - (const Conster(""" -a""" - """ -b""" - """ -e""")) - .toString()); -} diff --git a/tests/language_2/string/adjacent_string_literals_test.dart b/tests/language_2/string/adjacent_string_literals_test.dart deleted file mode 100644 index 50b6c10daa8..00000000000 --- a/tests/language_2/string/adjacent_string_literals_test.dart +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - testEmpty(); - testInterpolation(); - testMultiline(); -} - -testEmpty() { - Expect.equals("", "" "" ""); - Expect.equals("", "" '' ""); - Expect.equals("", "" "" r""); - - Expect.equals("a", "a" ""); - Expect.equals("a", "a" ''); - Expect.equals("a", "a" r''); - - Expect.equals("b", 'b' ""); - Expect.equals("b", 'b' ''); - Expect.equals("b", 'b' r''); - - Expect.equals("c", r'c' ""); - Expect.equals("c", r'c' ''); - Expect.equals("c", r'c' r''); - - Expect.equals("a", "" "a"); - Expect.equals("a", "" 'a'); - Expect.equals("a", "" r'a'); - - Expect.equals("b", '' "b"); - Expect.equals("b", '' 'b'); - Expect.equals("b", '' r'b'); - - Expect.equals("c", r'' "c"); - Expect.equals("c", r'' 'c'); - Expect.equals("c", r'' r'c'); -} - -testInterpolation() { - var s = "a"; - Expect.equals(r"ab", "$s" "b"); - Expect.equals(r"ab", '$s' "b"); - Expect.equals(r"$sb", r'$s' "b"); - - Expect.equals(r"-a-b", "-$s-" "b"); - Expect.equals(r"-a-b", '-$s-' "b"); - Expect.equals(r"-$s-b", r'-$s-' "b"); - - Expect.equals(r"ba", 'b' "$s"); - Expect.equals(r"ba", 'b' '$s'); - Expect.equals(r"b$s", 'b' r'$s'); - - Expect.equals(r"b-a-", 'b' "-$s-"); - Expect.equals(r"b-a-", 'b' '-$s-'); - Expect.equals(r"b-$s-", 'b' r'-$s-'); -} - -testMultiline() { - Expect.equals( - "abe", - "a" - "b" - "e"); - Expect.equals( - "a b e", - "a " - "b " - "e"); - Expect.equals( - "a b e", - "a" - " b" - " e"); - - Expect.equals( - "abe", - """ -a""" - "b" - "e"); - Expect.equals( - "a b e", - """ -a""" - " b" - " e"); - - Expect.equals( - "abe", - """ -a""" - """ -b""" - """ -e"""); -} diff --git a/tests/language_2/string/bad_raw_string_runtime_test.dart b/tests/language_2/string/bad_raw_string_runtime_test.dart deleted file mode 100644 index 873ad3eb6d2..00000000000 --- a/tests/language_2/string/bad_raw_string_runtime_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2016, 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() { - // Raw String may not contain newline (may not be multi-line). - String x = '' - - - - - // Test that a raw string containing just one character, a \n char, fails. - // Enclose the test string in a bigger multiline string, except in case 03: - - """ - - r' -' - - """ - - ; -} diff --git a/tests/language_2/string/bad_raw_string_test.dart b/tests/language_2/string/bad_raw_string_test.dart deleted file mode 100644 index 794872a4c7c..00000000000 --- a/tests/language_2/string/bad_raw_string_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2016, 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() { - // Raw String may not contain newline (may not be multi-line). - String x = '' - r' -// ^ -// [cfe] String starting with r' must end with '. -// ^ -// [analyzer] SYNTACTIC_ERROR.UNTERMINATED_STRING_LITERAL -' -// [error line 15, column 1, length 1] -// [analyzer] SYNTACTIC_ERROR.UNTERMINATED_STRING_LITERAL -// [cfe] String starting with ' must end with '. - r" -// ^ -// [cfe] String starting with r" must end with ". -// ^ -// [analyzer] SYNTACTIC_ERROR.UNTERMINATED_STRING_LITERAL -" -// [error line 24, column 1, length 1] -// [analyzer] SYNTACTIC_ERROR.UNTERMINATED_STRING_LITERAL -// [cfe] String starting with " must end with ". - - // Test that a raw string containing just one character, a \n char, fails. - // Enclose the test string in a bigger multiline string, except in case 03: - ''' - """ - ''' - r' -// ^ -// [cfe] String starting with r' must end with '. -// ^ -// [analyzer] SYNTACTIC_ERROR.UNTERMINATED_STRING_LITERAL -' -// [error line 39, column 1, length 1] -// [analyzer] SYNTACTIC_ERROR.UNTERMINATED_STRING_LITERAL -// [cfe] String starting with ' must end with '. - ''' - """ - ''' - ; -} diff --git a/tests/language_2/string/char_escape_test.dart b/tests/language_2/string/char_escape_test.dart deleted file mode 100644 index 4ffc220cafa..00000000000 --- a/tests/language_2/string/char_escape_test.dart +++ /dev/null @@ -1,535 +0,0 @@ -// 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 test for reading escape sequences in string literals - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class CharEscapeTest { - static testMain() { - var x00 = "\x00"; - var u0000 = "\u0000"; - var v0 = "\u{0}"; - var v00 = "\u{00}"; - var v000 = "\u{000}"; - var v0000 = "\u{0000}"; - var v00000 = "\u{00000}"; - var v000000 = "\u{000000}"; - Expect.equals(1, x00.length); - Expect.equals(1, u0000.length); - Expect.equals(1, v0.length); - Expect.equals(1, v00.length); - Expect.equals(1, v000.length); - Expect.equals(1, v0000.length); - Expect.equals(1, v00000.length); - Expect.equals(1, v000000.length); - Expect.equals(0, x00.codeUnitAt(0)); - Expect.equals(0, u0000.codeUnitAt(0)); - Expect.equals(0, v0.codeUnitAt(0)); - Expect.equals(0, v00.codeUnitAt(0)); - Expect.equals(0, v000.codeUnitAt(0)); - Expect.equals(0, v0000.codeUnitAt(0)); - Expect.equals(0, v00000.codeUnitAt(0)); - Expect.equals(0, v000000.codeUnitAt(0)); - Expect.equals("\x00", new String.fromCharCodes([0])); - Expect.equals("\u0000", new String.fromCharCodes([0])); - Expect.equals("\u{0}", new String.fromCharCodes([0])); - Expect.equals("\u{00}", new String.fromCharCodes([0])); - Expect.equals("\u{000}", new String.fromCharCodes([0])); - Expect.equals("\u{0000}", new String.fromCharCodes([0])); - Expect.equals("\u{00000}", new String.fromCharCodes([0])); - Expect.equals("\u{000000}", new String.fromCharCodes([0])); - - var x01 = "\x01"; - var u0001 = "\u0001"; - var v1 = "\u{1}"; - var v01 = "\u{01}"; - var v001 = "\u{001}"; - var v0001 = "\u{0001}"; - var v00001 = "\u{00001}"; - var v000001 = "\u{000001}"; - Expect.equals(1, x01.length); - Expect.equals(1, u0001.length); - Expect.equals(1, v1.length); - Expect.equals(1, v01.length); - Expect.equals(1, v001.length); - Expect.equals(1, v0001.length); - Expect.equals(1, v00001.length); - Expect.equals(1, v000001.length); - Expect.equals(1, x01.codeUnitAt(0)); - Expect.equals(1, u0001.codeUnitAt(0)); - Expect.equals(1, v1.codeUnitAt(0)); - Expect.equals(1, v01.codeUnitAt(0)); - Expect.equals(1, v001.codeUnitAt(0)); - Expect.equals(1, v0001.codeUnitAt(0)); - Expect.equals(1, v00001.codeUnitAt(0)); - Expect.equals(1, v000001.codeUnitAt(0)); - Expect.equals("\x01", new String.fromCharCodes([1])); - Expect.equals("\u0001", new String.fromCharCodes([1])); - Expect.equals("\u{1}", new String.fromCharCodes([1])); - Expect.equals("\u{01}", new String.fromCharCodes([1])); - Expect.equals("\u{001}", new String.fromCharCodes([1])); - Expect.equals("\u{0001}", new String.fromCharCodes([1])); - Expect.equals("\u{00001}", new String.fromCharCodes([1])); - Expect.equals("\u{000001}", new String.fromCharCodes([1])); - - var x55 = "\x55"; - var u0055 = "\u0055"; - var v55 = "\u{55}"; - var v055 = "\u{055}"; - var v0055 = "\u{0055}"; - var v00055 = "\u{00055}"; - var v000055 = "\u{000055}"; - Expect.equals(1, x55.length); - Expect.equals(1, u0055.length); - Expect.equals(1, v55.length); - Expect.equals(1, v055.length); - Expect.equals(1, v0055.length); - Expect.equals(1, v00055.length); - Expect.equals(1, v000055.length); - Expect.equals(0x55, x55.codeUnitAt(0)); - Expect.equals(0x55, u0055.codeUnitAt(0)); - Expect.equals(0x55, v55.codeUnitAt(0)); - Expect.equals(0x55, v055.codeUnitAt(0)); - Expect.equals(0x55, v0055.codeUnitAt(0)); - Expect.equals(0x55, v00055.codeUnitAt(0)); - Expect.equals(0x55, v000055.codeUnitAt(0)); - Expect.equals("\x55", new String.fromCharCodes([0x55])); - Expect.equals("\u0055", new String.fromCharCodes([0x55])); - Expect.equals("\u{55}", new String.fromCharCodes([0x55])); - Expect.equals("\u{055}", new String.fromCharCodes([0x55])); - Expect.equals("\u{0055}", new String.fromCharCodes([0x55])); - Expect.equals("\u{00055}", new String.fromCharCodes([0x55])); - Expect.equals("\u{000055}", new String.fromCharCodes([0x55])); - - var x7F = "\x7F"; - var u007F = "\u007F"; - var v7F = "\u{7F}"; - var v07F = "\u{07F}"; - var v007F = "\u{007F}"; - var v0007F = "\u{0007F}"; - var v00007F = "\u{00007F}"; - Expect.equals(1, x7F.length); - Expect.equals(1, u007F.length); - Expect.equals(1, v7F.length); - Expect.equals(1, v07F.length); - Expect.equals(1, v007F.length); - Expect.equals(1, v0007F.length); - Expect.equals(1, v00007F.length); - Expect.equals(0x7F, x7F.codeUnitAt(0)); - Expect.equals(0x7F, u007F.codeUnitAt(0)); - Expect.equals(0x7F, v7F.codeUnitAt(0)); - Expect.equals(0x7F, v07F.codeUnitAt(0)); - Expect.equals(0x7F, v007F.codeUnitAt(0)); - Expect.equals(0x7F, v0007F.codeUnitAt(0)); - Expect.equals(0x7F, v00007F.codeUnitAt(0)); - Expect.equals("\x7F", new String.fromCharCodes([0x7F])); - Expect.equals("\u007F", new String.fromCharCodes([0x7F])); - Expect.equals("\u{7F}", new String.fromCharCodes([0x7F])); - Expect.equals("\u{07F}", new String.fromCharCodes([0x7F])); - Expect.equals("\u{007F}", new String.fromCharCodes([0x7F])); - Expect.equals("\u{0007F}", new String.fromCharCodes([0x7F])); - Expect.equals("\u{00007F}", new String.fromCharCodes([0x7F])); - - var x80 = "\x80"; - var u0080 = "\u0080"; - var v80 = "\u{80}"; - var v080 = "\u{080}"; - var v0080 = "\u{0080}"; - var v00080 = "\u{00080}"; - var v000080 = "\u{000080}"; - Expect.equals(1, x80.length); - Expect.equals(1, u0080.length); - Expect.equals(1, v80.length); - Expect.equals(1, v080.length); - Expect.equals(1, v0080.length); - Expect.equals(1, v00080.length); - Expect.equals(1, v000080.length); - Expect.equals(0x80, x80.codeUnitAt(0)); - Expect.equals(0x80, u0080.codeUnitAt(0)); - Expect.equals(0x80, v80.codeUnitAt(0)); - Expect.equals(0x80, v080.codeUnitAt(0)); - Expect.equals(0x80, v0080.codeUnitAt(0)); - Expect.equals(0x80, v00080.codeUnitAt(0)); - Expect.equals(0x80, v000080.codeUnitAt(0)); - Expect.equals("\x80", new String.fromCharCodes([0x80])); - Expect.equals("\u0080", new String.fromCharCodes([0x80])); - Expect.equals("\u{80}", new String.fromCharCodes([0x80])); - Expect.equals("\u{080}", new String.fromCharCodes([0x80])); - Expect.equals("\u{0080}", new String.fromCharCodes([0x80])); - Expect.equals("\u{00080}", new String.fromCharCodes([0x80])); - Expect.equals("\u{000080}", new String.fromCharCodes([0x80])); - - var xAA = "\xAA"; - var u00AA = "\u00AA"; - var vAA = "\u{AA}"; - var v0AA = "\u{0AA}"; - var v00AA = "\u{00AA}"; - var v000AA = "\u{000AA}"; - var v0000AA = "\u{0000AA}"; - Expect.equals(1, xAA.length); - Expect.equals(1, u00AA.length); - Expect.equals(1, vAA.length); - Expect.equals(1, v0AA.length); - Expect.equals(1, v00AA.length); - Expect.equals(1, v000AA.length); - Expect.equals(1, v0000AA.length); - Expect.equals(0xAA, xAA.codeUnitAt(0)); - Expect.equals(0xAA, u00AA.codeUnitAt(0)); - Expect.equals(0xAA, vAA.codeUnitAt(0)); - Expect.equals(0xAA, v0AA.codeUnitAt(0)); - Expect.equals(0xAA, v00AA.codeUnitAt(0)); - Expect.equals(0xAA, v000AA.codeUnitAt(0)); - Expect.equals(0xAA, v0000AA.codeUnitAt(0)); - Expect.equals("\xAA", new String.fromCharCodes([0xAA])); - Expect.equals("\u00AA", new String.fromCharCodes([0xAA])); - Expect.equals("\u{AA}", new String.fromCharCodes([0xAA])); - Expect.equals("\u{0AA}", new String.fromCharCodes([0xAA])); - Expect.equals("\u{00AA}", new String.fromCharCodes([0xAA])); - Expect.equals("\u{000AA}", new String.fromCharCodes([0xAA])); - Expect.equals("\u{0000AA}", new String.fromCharCodes([0xAA])); - - var xFE = "\xFE"; - var u00FE = "\u00FE"; - var vFE = "\u{FE}"; - var v0FE = "\u{0FE}"; - var v00FE = "\u{00FE}"; - var v000FE = "\u{000FE}"; - var v0000FE = "\u{0000FE}"; - Expect.equals(1, xFE.length); - Expect.equals(1, u00FE.length); - Expect.equals(1, vFE.length); - Expect.equals(1, v0FE.length); - Expect.equals(1, v00FE.length); - Expect.equals(1, v000FE.length); - Expect.equals(1, v0000FE.length); - Expect.equals(0xFE, xFE.codeUnitAt(0)); - Expect.equals(0xFE, u00FE.codeUnitAt(0)); - Expect.equals(0xFE, vFE.codeUnitAt(0)); - Expect.equals(0xFE, v0FE.codeUnitAt(0)); - Expect.equals(0xFE, v00FE.codeUnitAt(0)); - Expect.equals(0xFE, v000FE.codeUnitAt(0)); - Expect.equals(0xFE, v0000FE.codeUnitAt(0)); - Expect.equals("\xFE", new String.fromCharCodes([0xFE])); - Expect.equals("\u00FE", new String.fromCharCodes([0xFE])); - Expect.equals("\u{FE}", new String.fromCharCodes([0xFE])); - Expect.equals("\u{0FE}", new String.fromCharCodes([0xFE])); - Expect.equals("\u{00FE}", new String.fromCharCodes([0xFE])); - Expect.equals("\u{000FE}", new String.fromCharCodes([0xFE])); - Expect.equals("\u{0000FE}", new String.fromCharCodes([0xFE])); - - var xFF = "\xFF"; - var u00FF = "\u00FF"; - var vFF = "\u{FF}"; - var v0FF = "\u{0FF}"; - var v00FF = "\u{00FF}"; - var v000FF = "\u{000FF}"; - var v0000FF = "\u{0000FF}"; - Expect.equals(1, xFF.length); - Expect.equals(1, u00FF.length); - Expect.equals(1, vFF.length); - Expect.equals(1, v0FF.length); - Expect.equals(1, v00FF.length); - Expect.equals(1, v000FF.length); - Expect.equals(1, v0000FF.length); - Expect.equals(0xFF, xFF.codeUnitAt(0)); - Expect.equals(0xFF, u00FF.codeUnitAt(0)); - Expect.equals(0xFF, vFF.codeUnitAt(0)); - Expect.equals(0xFF, v0FF.codeUnitAt(0)); - Expect.equals(0xFF, v00FF.codeUnitAt(0)); - Expect.equals(0xFF, v000FF.codeUnitAt(0)); - Expect.equals(0xFF, v0000FF.codeUnitAt(0)); - Expect.equals("\xFF", new String.fromCharCodes([0xFF])); - Expect.equals("\u00FF", new String.fromCharCodes([0xFF])); - Expect.equals("\u{FF}", new String.fromCharCodes([0xFF])); - Expect.equals("\u{0FF}", new String.fromCharCodes([0xFF])); - Expect.equals("\u{00FF}", new String.fromCharCodes([0xFF])); - Expect.equals("\u{000FF}", new String.fromCharCodes([0xFF])); - Expect.equals("\u{0000FF}", new String.fromCharCodes([0xFF])); - - var u1000 = "\u1000"; - var v1000 = "\u{1000}"; - var v01000 = "\u{01000}"; - var v001000 = "\u{001000}"; - Expect.equals(1, u1000.length); - Expect.equals(1, v1000.length); - Expect.equals(1, v01000.length); - Expect.equals(1, v001000.length); - Expect.equals(0x1000, u1000.codeUnitAt(0)); - Expect.equals(0x1000, v1000.codeUnitAt(0)); - Expect.equals(0x1000, v01000.codeUnitAt(0)); - Expect.equals(0x1000, v001000.codeUnitAt(0)); - Expect.equals("\u1000", new String.fromCharCodes([0x1000])); - Expect.equals("\u{1000}", new String.fromCharCodes([0x1000])); - Expect.equals("\u{01000}", new String.fromCharCodes([0x1000])); - Expect.equals("\u{001000}", new String.fromCharCodes([0x1000])); - - var u5555 = "\u5555"; - var v5555 = "\u{5555}"; - var v05555 = "\u{05555}"; - var v005555 = "\u{005555}"; - Expect.equals(1, u5555.length); - Expect.equals(1, v5555.length); - Expect.equals(1, v05555.length); - Expect.equals(1, v005555.length); - Expect.equals(0x5555, u5555.codeUnitAt(0)); - Expect.equals(0x5555, v5555.codeUnitAt(0)); - Expect.equals(0x5555, v05555.codeUnitAt(0)); - Expect.equals(0x5555, v005555.codeUnitAt(0)); - Expect.equals("\u5555", new String.fromCharCodes([0x5555])); - Expect.equals("\u{5555}", new String.fromCharCodes([0x5555])); - Expect.equals("\u{05555}", new String.fromCharCodes([0x5555])); - Expect.equals("\u{005555}", new String.fromCharCodes([0x5555])); - - var u7FFF = "\u7FFF"; - var v7FFF = "\u{7FFF}"; - var v07FFF = "\u{07FFF}"; - var v007FFF = "\u{007FFF}"; - Expect.equals(1, u7FFF.length); - Expect.equals(1, v7FFF.length); - Expect.equals(1, v07FFF.length); - Expect.equals(1, v007FFF.length); - Expect.equals(0x7FFF, u7FFF.codeUnitAt(0)); - Expect.equals(0x7FFF, v7FFF.codeUnitAt(0)); - Expect.equals(0x7FFF, v07FFF.codeUnitAt(0)); - Expect.equals(0x7FFF, v007FFF.codeUnitAt(0)); - Expect.equals("\u7FFF", new String.fromCharCodes([0x7FFF])); - Expect.equals("\u{7FFF}", new String.fromCharCodes([0x7FFF])); - Expect.equals("\u{07FFF}", new String.fromCharCodes([0x7FFF])); - Expect.equals("\u{007FFF}", new String.fromCharCodes([0x7FFF])); - - var u8000 = "\u8000"; - var v8000 = "\u{8000}"; - var v08000 = "\u{08000}"; - var v008000 = "\u{008000}"; - Expect.equals(1, u8000.length); - Expect.equals(1, v8000.length); - Expect.equals(1, v08000.length); - Expect.equals(1, v008000.length); - Expect.equals(0x8000, u8000.codeUnitAt(0)); - Expect.equals(0x8000, v8000.codeUnitAt(0)); - Expect.equals(0x8000, v08000.codeUnitAt(0)); - Expect.equals(0x8000, v008000.codeUnitAt(0)); - Expect.equals("\u8000", new String.fromCharCodes([0x8000])); - Expect.equals("\u{8000}", new String.fromCharCodes([0x8000])); - Expect.equals("\u{08000}", new String.fromCharCodes([0x8000])); - Expect.equals("\u{008000}", new String.fromCharCodes([0x8000])); - - var uAAAA = "\uAAAA"; - var vAAAA = "\u{AAAA}"; - var v0AAAA = "\u{0AAAA}"; - var v00AAAA = "\u{00AAAA}"; - Expect.equals(1, uAAAA.length); - Expect.equals(1, vAAAA.length); - Expect.equals(1, v0AAAA.length); - Expect.equals(1, v00AAAA.length); - Expect.equals(0xAAAA, uAAAA.codeUnitAt(0)); - Expect.equals(0xAAAA, vAAAA.codeUnitAt(0)); - Expect.equals(0xAAAA, v0AAAA.codeUnitAt(0)); - Expect.equals(0xAAAA, v00AAAA.codeUnitAt(0)); - Expect.equals("\uAAAA", new String.fromCharCodes([0xAAAA])); - Expect.equals("\u{AAAA}", new String.fromCharCodes([0xAAAA])); - Expect.equals("\u{0AAAA}", new String.fromCharCodes([0xAAAA])); - Expect.equals("\u{00AAAA}", new String.fromCharCodes([0xAAAA])); - - var uFFFE = "\uFFFE"; - var vFFFE = "\u{FFFE}"; - var v0FFFE = "\u{0FFFE}"; - var v00FFFE = "\u{00FFFE}"; - Expect.equals(1, uFFFE.length); - Expect.equals(1, vFFFE.length); - Expect.equals(1, v0FFFE.length); - Expect.equals(1, v00FFFE.length); - Expect.equals(0xFFFE, uFFFE.codeUnitAt(0)); - Expect.equals(0xFFFE, vFFFE.codeUnitAt(0)); - Expect.equals(0xFFFE, v0FFFE.codeUnitAt(0)); - Expect.equals(0xFFFE, v00FFFE.codeUnitAt(0)); - Expect.equals("\uFFFE", new String.fromCharCodes([0xFFFE])); - Expect.equals("\u{FFFE}", new String.fromCharCodes([0xFFFE])); - Expect.equals("\u{0FFFE}", new String.fromCharCodes([0xFFFE])); - Expect.equals("\u{00FFFE}", new String.fromCharCodes([0xFFFE])); - - var uFFFF = "\uFFFF"; - var vFFFF = "\u{FFFF}"; - var v0FFFF = "\u{0FFFF}"; - var v00FFFF = "\u{00FFFF}"; - Expect.equals(1, uFFFF.length); - Expect.equals(1, vFFFF.length); - Expect.equals(1, v0FFFF.length); - Expect.equals(1, v00FFFF.length); - Expect.equals(0xFFFF, uFFFF.codeUnitAt(0)); - Expect.equals(0xFFFF, vFFFF.codeUnitAt(0)); - Expect.equals(0xFFFF, v0FFFF.codeUnitAt(0)); - Expect.equals(0xFFFF, v00FFFF.codeUnitAt(0)); - Expect.equals("\uFFFF", new String.fromCharCodes([0xFFFF])); - Expect.equals("\u{FFFF}", new String.fromCharCodes([0xFFFF])); - Expect.equals("\u{0FFFF}", new String.fromCharCodes([0xFFFF])); - Expect.equals("\u{00FFFF}", new String.fromCharCodes([0xFFFF])); - - var v10000 = "\u{10000}"; - var v010000 = "\u{010000}"; - Expect.equals(2, v10000.length); - Expect.equals(2, v010000.length); - Expect.equals("\u{10000}", new String.fromCharCodes([0x10000])); - Expect.equals("\u{010000}", new String.fromCharCodes([0x10000])); - - var v1FFFF = "\u{1FFFF}"; - var v01FFFF = "\u{01FFFF}"; - Expect.equals(2, v1FFFF.length); - Expect.equals(2, v01FFFF.length); - Expect.equals("\u{1FFFF}", new String.fromCharCodes([0x1FFFF])); - Expect.equals("\u{01FFFF}", new String.fromCharCodes([0x1FFFF])); - - var v105555 = "\u{105555}"; - Expect.equals(2, v105555.length); - Expect.equals("\u{105555}", new String.fromCharCodes([0x105555])); - - var v10FFFF = "\u{10FFFF}"; - Expect.equals(2, v10FFFF.length); - Expect.equals("\u{10FFFF}", new String.fromCharCodes([0x10FFFF])); - - var bs = "\b"; - Expect.isTrue(bs != "b"); - Expect.equals(1, bs.length); - Expect.equals(0x08, bs.codeUnitAt(0)); - Expect.equals(bs, new String.fromCharCodes([0x08])); - Expect.equals("\x08", bs); - Expect.equals("\u0008", bs); - Expect.equals("\u{8}", bs); - Expect.equals("\u{08}", bs); - Expect.equals("\u{008}", bs); - Expect.equals("\u{0008}", bs); - Expect.equals("\u{00008}", bs); - Expect.equals("\u{000008}", bs); - - var ht = "\t"; - Expect.isTrue(ht != "t"); - Expect.equals(1, ht.length); - Expect.equals(0x09, ht.codeUnitAt(0)); - Expect.equals(ht, new String.fromCharCodes([0x09])); - Expect.equals("\x09", ht); - Expect.equals("\u0009", ht); - Expect.equals("\u{9}", ht); - Expect.equals("\u{09}", ht); - Expect.equals("\u{009}", ht); - Expect.equals("\u{0009}", ht); - Expect.equals("\u{00009}", ht); - Expect.equals("\u{000009}", ht); - - var lf = "\n"; - Expect.isTrue(lf != "n"); - Expect.equals(1, lf.length); - Expect.equals(0x0A, lf.codeUnitAt(0)); - Expect.equals(lf, new String.fromCharCodes([0x0A])); - Expect.equals("\x0A", lf); - Expect.equals("\u000A", lf); - Expect.equals("\u{A}", lf); - Expect.equals("\u{0A}", lf); - Expect.equals("\u{00A}", lf); - Expect.equals("\u{000A}", lf); - Expect.equals("\u{0000A}", lf); - Expect.equals("\u{00000A}", lf); - - var vt = "\v"; - Expect.isTrue(vt != "v"); - Expect.equals(1, vt.length); - Expect.equals(0x0B, vt.codeUnitAt(0)); - Expect.equals(vt, new String.fromCharCodes([0x0B])); - Expect.equals("\x0B", vt); - Expect.equals("\u000B", vt); - Expect.equals("\u{B}", vt); - Expect.equals("\u{0B}", vt); - Expect.equals("\u{00B}", vt); - Expect.equals("\u{000B}", vt); - Expect.equals("\u{0000B}", vt); - Expect.equals("\u{00000B}", vt); - - var ff = "\f"; - Expect.isTrue(ff != "f"); - Expect.equals(1, ff.length); - Expect.equals(0x0C, ff.codeUnitAt(0)); - Expect.equals(ff, new String.fromCharCodes([0x0C])); - Expect.equals("\x0C", ff); - Expect.equals("\u000C", ff); - Expect.equals("\u{C}", ff); - Expect.equals("\u{0C}", ff); - Expect.equals("\u{00C}", ff); - Expect.equals("\u{000C}", ff); - Expect.equals("\u{0000C}", ff); - Expect.equals("\u{00000C}", ff); - - var cr = "\r"; - Expect.isTrue(cr != "r"); - Expect.equals(1, cr.length); - Expect.equals(0x0D, cr.codeUnitAt(0)); - Expect.equals(cr, new String.fromCharCodes([0x0D])); - Expect.equals("\x0D", cr); - Expect.equals("\u000D", cr); - Expect.equals("\u{D}", cr); - Expect.equals("\u{0D}", cr); - Expect.equals("\u{00D}", cr); - Expect.equals("\u{000D}", cr); - Expect.equals("\u{0000D}", cr); - Expect.equals("\u{00000D}", cr); - - Expect.equals("\a", "a"); - // \b U+0006 BS - Expect.equals("\c", "c"); - Expect.equals("\d", "d"); - Expect.equals("\e", "e"); - // \f U+000C FF - Expect.equals("\g", "g"); - Expect.equals("\h", "h"); - Expect.equals("\i", "i"); - Expect.equals("\j", "j"); - Expect.equals("\k", "k"); - Expect.equals("\l", "l"); - Expect.equals("\m", "m"); - // \n U+000A LF - Expect.equals("\o", "o"); - Expect.equals("\p", "p"); - Expect.equals("\q", "q"); - // \r U+000D CR - Expect.equals("\s", "s"); - // \t U+0009 HT - // \u code point escape - // \v U+000B VT - Expect.equals("\w", "w"); - // \x code point escape - Expect.equals("\y", "y"); - Expect.equals("\z", "z"); - - Expect.equals("\A", "A"); - Expect.equals("\B", "B"); - Expect.equals("\C", "C"); - Expect.equals("\D", "D"); - Expect.equals("\E", "E"); - Expect.equals("\F", "F"); - Expect.equals("\G", "G"); - Expect.equals("\H", "H"); - Expect.equals("\I", "I"); - Expect.equals("\J", "J"); - Expect.equals("\K", "K"); - Expect.equals("\L", "L"); - Expect.equals("\M", "M"); - Expect.equals("\N", "N"); - Expect.equals("\O", "O"); - Expect.equals("\P", "P"); - Expect.equals("\Q", "Q"); - Expect.equals("\R", "R"); - Expect.equals("\S", "S"); - Expect.equals("\T", "T"); - Expect.equals("\U", "U"); - Expect.equals("\V", "V"); - Expect.equals("\W", "W"); - Expect.equals("\X", "X"); - Expect.equals("\Y", "Y"); - Expect.equals("\Z", "Z"); - } -} - -main() { - CharEscapeTest.testMain(); -} diff --git a/tests/language_2/string/charcode_test.dart b/tests/language_2/string/charcode_test.dart deleted file mode 100644 index f19caa96ba2..00000000000 --- a/tests/language_2/string/charcode_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2013, 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. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - for (int i = 0; i < 20; i++) { - Expect.isTrue(moo("x")); - Expect.isFalse(moo("X")); - Expect.isFalse(moo("xx")); - Expect.isTrue(mooRev("x")); - Expect.isFalse(mooRev("X")); - Expect.isFalse(mooRev("xx")); - Expect.isTrue(goo("Hello", "e")); - Expect.isFalse(goo("Hello", "E")); - Expect.isFalse(goo("Hello", "ee")); - Expect.isTrue(gooRev("Hello", "e")); - Expect.isFalse(gooRev("Hello", "E")); - Expect.isFalse(gooRev("Hello", "ee")); - Expect.isTrue(hoo("HH")); - Expect.isFalse(hoo("Ha")); - Expect.isTrue(hooRev("HH")); - Expect.isFalse(hooRev("Ha")); - } - Expect.isFalse(moo(12)); - Expect.isFalse(mooRev(12)); - Expect.isTrue(goo([1, 2], 2)); - Expect.isTrue(gooRev([1, 2], 2)); - Expect.throwsRangeError(() => hoo("H")); - Expect.throwsRangeError(() => hooRev("H")); -} - -moo(j) { - return "x" == j; -} - -goo(a, j) { - return a[1] == j; -} - -// Check constant folding. -hoo(a) { - return a[1] == ("Hello")[0]; -} - -mooRev(j) { - return j == "x"; -} - -gooRev(a, j) { - return j == a[1]; -} - -// Check constant folding. -hooRev(a) { - return ("Hello")[0] == a[1]; -} diff --git a/tests/language_2/string/const_interpolation2_test.dart b/tests/language_2/string/const_interpolation2_test.dart deleted file mode 100644 index 363cb3ab2d9..00000000000 --- a/tests/language_2/string/const_interpolation2_test.dart +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -// Regression test for issue #24839 - http://dartbug.com/24839 - -const u1 = null; -const int u2 = null; -const List u3 = null; -const u4 = const bool.hasEnvironment("XXXXX") - ? const String.fromEnvironment("XXXXX") - : null; -const u5 = const bool.hasEnvironment("XXXXX") - ? const int.fromEnvironment("XXXXX") - : null; -const u6 = bool.hasEnvironment("XXXXX") - ? const bool.fromEnvironment("XXXXX") - : null; -const n1 = 42; -const n2 = 3.1415; -const int n3 = 37; -const double n4 = 4.6692; -const num n5 = b3 ? 1 : 2.71828; -const n6 = const int.fromEnvironment("XXXXX", defaultValue: 87); -const s1 = "s1"; -const String s2 = "s2"; -const String s3 = "$s1$s2"; -const s4 = const String.fromEnvironment("XXXXX", defaultValue: "s4"); -const b1 = true; -const b2 = false; -const b3 = b1 && (b2 || !b1); -const b4 = const bool.fromEnvironment("XXXXX", defaultValue: true); - -// Individually -const su1 = "$u1"; -const su2 = "$u2"; -const su3 = "$u3"; -const su4 = "$u4"; -const su5 = "$u5"; -const su6 = "$u6"; -const sn1 = "$n1"; -const sn2 = "$n2"; -const sn3 = "$n3"; -const sn4 = "$n4"; -const sn5 = "$n5"; -const sn6 = "$n6"; -const ss1 = "$s1"; -const ss2 = "$s2"; -const ss3 = "$s3"; -const ss4 = "$s4"; -const sb1 = "$b1"; -const sb2 = "$b2"; -const sb3 = "$b3"; -const sb4 = "$b4"; - -// Constant variables in interpolation. -const interpolation1 = - "$u1 $u2 $u3 $u4 $u5 $u6 $n1 $n2 $n3 $n4 $n5 $n6 $s1 $s2 $s3 $s4 $b1 $b2 $b3 $b4"; -// Constant expressions in interpolation. -// (Single string, the linebreak to fit this into 80 chars is inside an -// interpolation, which is allowed, even for single-line strings). -const interpolation2 = - "${u1} ${u2} ${u3} ${u4} ${u5} ${u6} ${n1} ${n2} ${n3} ${n4} ${n5} ${n6} ${ - s1} ${s2} ${s3} ${s4} ${b1} ${b2} ${b3} ${b4}"; -// Adjacent string literals are combined. -const interpolation3 = "$u1 $u2 $u3 $u4 $u5 " - '$u6 $n1 $n2 $n3 $n4 ' - """$n5 $n6 $s1 $s2 $s3 """ - '''$s4 $b1 $b2 $b3 $b4'''; -// Nested interpolations. -const interpolation4 = "${"$u1 $u2 $u3 $u4 $u5 " '$u6 $n1 $n2 $n3 $n4'} ${ - """$n5 $n6 $s1 $s2 $s3 """ '''$s4 $b1 $b2 $b3 $b4'''}"; - -main() { - Expect.equals(u1.toString(), su1); - Expect.equals(u2.toString(), su2); - Expect.equals(u3.toString(), su3); - Expect.equals(u4.toString(), su4); - Expect.equals(u5.toString(), su5); - Expect.equals(u6.toString(), su6); - Expect.equals(n1.toString(), sn1); - Expect.equals(n2.toString(), sn2); - Expect.equals(n3.toString(), sn3); - Expect.equals(n4.toString(), sn4); - Expect.equals(n5.toString(), sn5); - Expect.equals(n6.toString(), sn6); - Expect.equals(s1.toString(), ss1); - Expect.equals(s2.toString(), ss2); - Expect.equals(s3.toString(), ss3); - Expect.equals(s4.toString(), ss4); - Expect.equals(b1.toString(), sb1); - Expect.equals(b2.toString(), sb2); - Expect.equals(b3.toString(), sb3); - Expect.equals(b4.toString(), sb4); - var expect = "null null null null null null 42 3.1415 37 4.6692 2.71828 87 " - "s1 s2 s1s2 s4 true false false true"; - Expect.equals(expect, interpolation1); - Expect.equals(expect, interpolation2); - Expect.equals(expect, interpolation3); - Expect.equals(expect, interpolation4); -} diff --git a/tests/language_2/string/const_interpolation_constant_string_interpolation_test.dart b/tests/language_2/string/const_interpolation_constant_string_interpolation_test.dart deleted file mode 100644 index 0d4970b7228..00000000000 --- a/tests/language_2/string/const_interpolation_constant_string_interpolation_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2013, 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. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - final a = new A(); - for (int i = 0; i < 20; i++) { - final r = interpolIt(a); - Expect.stringEquals("hello home", r); - } - final b = new B(); - // Deoptimize "interpolIt". - final r = interpolIt(b); - Expect.stringEquals("hello world", r); -} - -String interpolIt(v) { - // String interpolation will be constant folded. - return "hello ${v.foo()}"; -} - -class A { - foo() => "home"; -} - -class B { - foo() => "world"; -} diff --git a/tests/language_2/string/escape4_test.dart b/tests/language_2/string/escape4_test.dart deleted file mode 100644 index cfedc5d26ee..00000000000 --- a/tests/language_2/string/escape4_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Test that newlines cannot be escaped in strings. - -main() { - // Note: The newline inside a string literal doesn't play nice with the - // static error updater tool, so if you need to tweak the static error - // expectations in this test, you may need to do so manually. - print('Hello, World!\ - // ^ - // [cfe] Can't find ')' to match '('. - // ^ - // [cfe] String starting with ' must end with '. - // ^ - // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE_STARTED - // [analyzer] SYNTACTIC_ERROR.UNTERMINATED_STRING_LITERAL - // [cfe] The string '\' can't stand alone. -'); -// [error column 1, length 3] -// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN -// [cfe] Expected ';' after this. -// [cfe] String starting with ' must end with '. -//^ -// [analyzer] SYNTACTIC_ERROR.UNTERMINATED_STRING_LITERAL -} -// [error column 1, length 1] -// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN diff --git a/tests/language_2/string/escapes_test.dart b/tests/language_2/string/escapes_test.dart deleted file mode 100644 index a0322f43a96..00000000000 --- a/tests/language_2/string/escapes_test.dart +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class StringEscapesTest { - static testMain() { - testDelimited(); - testFixed2(); - testFixed4(); - testEscapes(); - testLiteral(); - } - - static testDelimited() { - String str = "Foo\u{1}Bar\u{000001}Baz\u{D7FF}Boo"; - Expect.equals(15, str.length); - Expect.equals(1, str.codeUnitAt(3)); - Expect.equals(1, str.codeUnitAt(7)); - Expect.equals(0xD7FF, str.codeUnitAt(11)); - Expect.equals('B'.codeUnitAt(0), str.codeUnitAt(12)); - } - - static testEscapes() { - String str = "Foo\fBar\vBaz\bBoo"; - Expect.equals(15, str.length); - Expect.equals(12, str.codeUnitAt(3)); - Expect.equals('B'.codeUnitAt(0), str.codeUnitAt(4)); - Expect.equals(11, str.codeUnitAt(7)); - Expect.equals('z'.codeUnitAt(0), str.codeUnitAt(10)); - Expect.equals(8, str.codeUnitAt(11)); - Expect.equals('o'.codeUnitAt(0), str.codeUnitAt(14)); - str = "Abc\rDef\nGhi\tJkl"; - Expect.equals(15, str.length); - Expect.equals(13, str.codeUnitAt(3)); - Expect.equals('D'.codeUnitAt(0), str.codeUnitAt(4)); - Expect.equals(10, str.codeUnitAt(7)); - Expect.equals('G'.codeUnitAt(0), str.codeUnitAt(8)); - Expect.equals(9, str.codeUnitAt(11)); - Expect.equals('J'.codeUnitAt(0), str.codeUnitAt(12)); - } - - static testFixed2() { - String str = "Foo\xFFBar"; - Expect.equals(7, str.length); - Expect.equals(255, str.codeUnitAt(3)); - Expect.equals('B'.codeUnitAt(0), str.codeUnitAt(4)); - } - - static testFixed4() { - String str = "Foo\u0001Bar"; - Expect.equals(7, str.length); - Expect.equals(1, str.codeUnitAt(3)); - Expect.equals('B'.codeUnitAt(0), str.codeUnitAt(4)); - } - - static testLiteral() { - String str = "\a\c\d\e\g\h\i\j\k\l\$\{\}\""; - Expect.equals(r'acdeghijkl${}"', str); - } -} - -main() { - StringEscapesTest.testMain(); -} diff --git a/tests/language_2/string/interpolate1_test.dart b/tests/language_2/string/interpolate1_test.dart deleted file mode 100644 index 9db9cd676ae..00000000000 --- a/tests/language_2/string/interpolate1_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// The interpolated identifier can't start with '$'. - -main() { - var $x = 1; - var s = "eins und $$x macht zwei."; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER - // [cfe] Undefined name 'x'. -} diff --git a/tests/language_2/string/interpolate2_test.dart b/tests/language_2/string/interpolate2_test.dart deleted file mode 100644 index 5c5d672fa88..00000000000 --- a/tests/language_2/string/interpolate2_test.dart +++ /dev/null @@ -1,59 +0,0 @@ -// 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 test program testing string interpolation of expressions. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class StringInterpolate2Test { - static var F1; - - static void testMain() { - F1 = "1 + 5 = ${1+5}"; - - Expect.equals("1 + 5 = 6", F1); - - var fib = [1, 1, 2, 3, 5, 8, 13, 21]; - - var i = 5; - var s = "${i}"; - Expect.equals("5", s); - - s = "fib(${i}) = ${fib[i]}"; - Expect.equals("fib(5) = 8", s); - - i = 5; - s = "$i squared is ${((x) => x*x)(i)}"; - Expect.equals("5 squared is 25", s); - - Expect.equals("8", "${fib.length}"); - // test single quote - Expect.equals("8", '${fib.length}'); - // test multi-line - Expect.equals( - "8", - '${fib. - length}'); - - var map = {"red": 1, "green": 2, "blue": 3}; - s = "green has value ${map["green"]}"; - Expect.equals("green has value 2", s); - - i = 0; - b() => "${++i}"; - s = "aaa ${"bbb ${b()} bbb"} aaa ${b()}"; - Expect.equals("aaa bbb 1 bbb aaa 2", s); - - // test multiple levels of nesting, including changing quotes and - // multiline string types - s = "a ${(){ return 'b ${(){ return """ -c""";}()}'; }()} d"; - Expect.equals("a b c d", s); - } -} - -main() { - StringInterpolate2Test.testMain(); -} diff --git a/tests/language_2/string/interpolate3_test.dart b/tests/language_2/string/interpolate3_test.dart deleted file mode 100644 index 6b675340623..00000000000 --- a/tests/language_2/string/interpolate3_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// The interpolated identifier must start with an identifier start character. - -main() { - var x = 1; - var s = "eins und $-x macht zwei."; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). -} diff --git a/tests/language_2/string/interpolate_null_test.dart b/tests/language_2/string/interpolate_null_test.dart deleted file mode 100644 index f8dd7b7ebc8..00000000000 --- a/tests/language_2/string/interpolate_null_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// 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 test program testing NPE within string interpolation. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - A(String this.name) {} - String name; -} - -main() { - A a = new A("Kermit"); - var s = "Hello Mr. ${a.name}"; - Expect.stringEquals("Hello Mr. Kermit", s); - a = null; - try { - s = "Hello Mr. ${a.name}"; - } on NoSuchMethodError catch (e) { - return; - } - Expect.fail("NoSuchMethodError not thrown"); -} diff --git a/tests/language_2/string/interpolate_test.dart b/tests/language_2/string/interpolate_test.dart deleted file mode 100644 index 38997dd9fd2..00000000000 --- a/tests/language_2/string/interpolate_test.dart +++ /dev/null @@ -1,268 +0,0 @@ -// 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 test program testing string interpolation. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class WhatchamaCallIt { - WhatchamaCallIt() {} - - String foo() { - // Test $this and Field name is defined in subclass. - dynamic self = this; - dynamic name = self.name; - return "$this and $name"; - } -} - -class ThingamaBob extends WhatchamaCallIt { - ThingamaBob(String s) - : name = s, - super(); - String name; - toString() => "Hansel"; -} - -const String A = "svin"; -const String B = "hest"; -const int N = 1 + 1; -String Printers; -String AAR_Printers; - -main() { - Printers = "Printers: $A and $B"; - AAR_Printers = "AAR has $N $Printers."; - - var x = 1; - var s = "eins und \$x macht zwei."; - print(s); - Expect.equals(r"eins und $x macht zwei.", s); - - s = "eins und $x macht zwei."; - print(s); - Expect.equals(r"eins und 1 macht zwei.", s); - - print(AAR_Printers); - Expect.equals(r"AAR has 2 Printers: svin and hest.", AAR_Printers); - - var s$eins = "eins"; - var $1 = 1; - var zw = "zw"; - var ei = "ei"; - var zw$ei = "\"Martini, dry? Nai zwai.\""; - s = "${s$eins} und ${$1} macht $zw$ei."; - print(s); - Expect.equals(r"eins und 1 macht zwei.", s); - - dynamic t = new ThingamaBob("Gretel"); - print(t.foo()); - Expect.equals(t.foo(), "Hansel and Gretel"); - - testStringVariants(); -} - -class Stringable { - final String value; - Stringable(this.value); - String toString() => value; - operator *(int count) => new Stringable(value * count); -} - -void testStringVariants() { - String latin = "ab\x00\xff"; - String nonLatin = "\u2000\u{10000}\ufeff"; - dynamic oLatin = new Stringable(latin); - dynamic oNonLatin = new Stringable(nonLatin); - - // ASCII. - Expect.equals(latin * 3, "$latin$latin$latin"); - Expect.equals( - latin * 64, - "$latin$latin$latin$latin$latin$latin$latin$latin" - "$latin$latin$latin$latin$latin$latin$latin$latin" - "$latin$latin$latin$latin$latin$latin$latin$latin" - "$latin$latin$latin$latin$latin$latin$latin$latin" - "$latin$latin$latin$latin$latin$latin$latin$latin" - "$latin$latin$latin$latin$latin$latin$latin$latin" - "$latin$latin$latin$latin$latin$latin$latin$latin" - "$latin$latin$latin$latin$latin$latin$latin$latin"); - Expect.equals( - latin * 64, - "${latin * 4}${latin * 4}${latin * 4}${latin * 4}" - "${latin * 4}${latin * 4}${latin * 4}${latin * 4}" - "${latin * 4}${latin * 4}${latin * 4}${latin * 4}" - "${latin * 4}${latin * 4}${latin * 4}${latin * 4}"); - // Non-ASCII. - Expect.equals(nonLatin * 3, "$nonLatin$nonLatin$nonLatin"); - Expect.equals( - nonLatin * 64, - "$nonLatin$nonLatin$nonLatin$nonLatin" - "$nonLatin$nonLatin$nonLatin$nonLatin" - "$nonLatin$nonLatin$nonLatin$nonLatin" - "$nonLatin$nonLatin$nonLatin$nonLatin" - "$nonLatin$nonLatin$nonLatin$nonLatin" - "$nonLatin$nonLatin$nonLatin$nonLatin" - "$nonLatin$nonLatin$nonLatin$nonLatin" - "$nonLatin$nonLatin$nonLatin$nonLatin" - "$nonLatin$nonLatin$nonLatin$nonLatin" - "$nonLatin$nonLatin$nonLatin$nonLatin" - "$nonLatin$nonLatin$nonLatin$nonLatin" - "$nonLatin$nonLatin$nonLatin$nonLatin" - "$nonLatin$nonLatin$nonLatin$nonLatin" - "$nonLatin$nonLatin$nonLatin$nonLatin" - "$nonLatin$nonLatin$nonLatin$nonLatin" - "$nonLatin$nonLatin$nonLatin$nonLatin"); - Expect.equals( - nonLatin * 64, - "${nonLatin * 4}${nonLatin * 4}" - "${nonLatin * 4}${nonLatin * 4}" - "${nonLatin * 4}${nonLatin * 4}" - "${nonLatin * 4}${nonLatin * 4}" - "${nonLatin * 4}${nonLatin * 4}" - "${nonLatin * 4}${nonLatin * 4}" - "${nonLatin * 4}${nonLatin * 4}" - "${nonLatin * 4}${nonLatin * 4}"); - // Mixed. - Expect.equals(latin * 3 + nonLatin, "$latin$latin$latin$nonLatin"); - Expect.equals(nonLatin + latin * 3, "$nonLatin$latin$latin$latin"); - Expect.equals( - latin * 60 + nonLatin * 4, - "$latin$latin$latin$latin$latin$latin$latin$latin" - "$latin$latin$latin$latin$latin$latin$latin$latin" - "$latin$latin$latin$latin$latin$latin$latin$latin" - "$latin$latin$latin$latin$latin$latin$latin$latin" - "$latin$latin$latin$latin$latin$latin$latin$latin" - "$latin$latin$latin$latin$latin$latin$latin$latin" - "$latin$latin$latin$latin$latin$latin$latin$latin" - "$latin$latin$latin$latin" - "$nonLatin$nonLatin$nonLatin$nonLatin"); - Expect.equals( - nonLatin * 4 + latin * 60, - "$nonLatin$nonLatin$nonLatin$nonLatin" - "$latin$latin$latin$latin$latin$latin$latin$latin" - "$latin$latin$latin$latin$latin$latin$latin$latin" - "$latin$latin$latin$latin$latin$latin$latin$latin" - "$latin$latin$latin$latin$latin$latin$latin$latin" - "$latin$latin$latin$latin$latin$latin$latin$latin" - "$latin$latin$latin$latin$latin$latin$latin$latin" - "$latin$latin$latin$latin$latin$latin$latin$latin" - "$latin$latin$latin$latin"); - Expect.equals( - latin * 60 + nonLatin * 4, - "${latin * 4}${latin * 4}${latin * 4}${latin * 4}" - "${latin * 4}${latin * 4}${latin * 4}${latin * 4}" - "${latin * 4}${latin * 4}${latin * 4}${latin * 4}" - "${latin * 4}${latin * 4}${latin * 4}${nonLatin * 4}"); - Expect.equals( - nonLatin * 4 + latin * 60, - "${nonLatin * 4}${latin * 4}${latin * 4}${latin * 4}" - "${latin * 4}${latin * 4}${latin * 4}${latin * 4}" - "${latin * 4}${latin * 4}${latin * 4}${latin * 4}" - "${latin * 4}${latin * 4}${latin * 4}${latin * 4}"); - // With objects. - Expect.equals(latin * 3, "$latin$oLatin$latin"); - Expect.equals( - latin * 64, - "$latin$latin$latin$latin$latin$latin$latin$oLatin" - "$latin$latin$latin$latin$latin$latin$latin$oLatin" - "$latin$latin$latin$latin$latin$latin$latin$oLatin" - "$latin$latin$latin$latin$latin$latin$latin$oLatin" - "$latin$latin$latin$latin$latin$latin$latin$oLatin" - "$latin$latin$latin$latin$latin$latin$latin$oLatin" - "$latin$latin$latin$latin$latin$latin$latin$oLatin" - "$latin$latin$latin$latin$latin$latin$latin$oLatin"); - Expect.equals( - latin * 64, - "${latin * 4}${latin * 4}${latin * 4}${oLatin * 4}" - "${latin * 4}${latin * 4}${latin * 4}${oLatin * 4}" - "${latin * 4}${latin * 4}${latin * 4}${oLatin * 4}" - "${latin * 4}${latin * 4}${latin * 4}${oLatin * 4}"); - // Non-ASCII. - Expect.equals(nonLatin * 3, "$nonLatin$oNonLatin$nonLatin"); - Expect.equals( - nonLatin * 64, - "$nonLatin$nonLatin$nonLatin$oNonLatin" - "$nonLatin$nonLatin$nonLatin$oNonLatin" - "$nonLatin$nonLatin$nonLatin$oNonLatin" - "$nonLatin$nonLatin$nonLatin$oNonLatin" - "$nonLatin$nonLatin$nonLatin$oNonLatin" - "$nonLatin$nonLatin$nonLatin$oNonLatin" - "$nonLatin$nonLatin$nonLatin$oNonLatin" - "$nonLatin$nonLatin$nonLatin$oNonLatin" - "$nonLatin$nonLatin$nonLatin$oNonLatin" - "$nonLatin$nonLatin$nonLatin$oNonLatin" - "$nonLatin$nonLatin$nonLatin$oNonLatin" - "$nonLatin$nonLatin$nonLatin$oNonLatin" - "$nonLatin$nonLatin$nonLatin$oNonLatin" - "$nonLatin$nonLatin$nonLatin$oNonLatin" - "$nonLatin$nonLatin$nonLatin$oNonLatin" - "$nonLatin$nonLatin$nonLatin$oNonLatin"); - Expect.equals( - nonLatin * 64, - "${nonLatin * 4}${oNonLatin * 4}" - "${nonLatin * 4}${oNonLatin * 4}" - "${nonLatin * 4}${oNonLatin * 4}" - "${nonLatin * 4}${oNonLatin * 4}" - "${nonLatin * 4}${oNonLatin * 4}" - "${nonLatin * 4}${oNonLatin * 4}" - "${nonLatin * 4}${oNonLatin * 4}" - "${nonLatin * 4}${oNonLatin * 4}"); - // Mixed. - Expect.equals(latin * 2 + nonLatin * 2, "$latin$oLatin$nonLatin$oNonLatin"); - Expect.equals(nonLatin * 2 + latin * 2, "$nonLatin$oNonLatin$latin$oLatin"); - Expect.equals( - (latin * 2 + nonLatin * 2) * 8, - "$latin$oLatin$nonLatin$oNonLatin" - "$latin$oLatin$nonLatin$oNonLatin" - "$latin$oLatin$nonLatin$oNonLatin" - "$latin$oLatin$nonLatin$oNonLatin" - "$latin$oLatin$nonLatin$oNonLatin" - "$latin$oLatin$nonLatin$oNonLatin" - "$latin$oLatin$nonLatin$oNonLatin" - "$latin$oLatin$nonLatin$oNonLatin"); - Expect.equals( - (nonLatin * 2 + latin * 2) * 8, - "$nonLatin$oNonLatin$latin$oLatin" - "$nonLatin$oNonLatin$latin$oLatin" - "$nonLatin$oNonLatin$latin$oLatin" - "$nonLatin$oNonLatin$latin$oLatin" - "$nonLatin$oNonLatin$latin$oLatin" - "$nonLatin$oNonLatin$latin$oLatin" - "$nonLatin$oNonLatin$latin$oLatin" - "$nonLatin$oNonLatin$latin$oLatin"); - - // All combinations - var o1 = new Stringable("x"); - var o2 = new Stringable("\ufeff"); - - Expect.equals("a\u2000x\ufeff", "${"a"}${"\u2000"}${o1}${o2}"); - Expect.equals("a\u2000\ufeffx", "${"a"}${"\u2000"}${o2}${o1}"); - Expect.equals("ax\u2000\ufeff", "${"a"}${o1}${"\u2000"}${o2}"); - Expect.equals("ax\ufeff\u2000", "${"a"}${o1}${o2}${"\u2000"}"); - Expect.equals("a\ufeffx\u2000", "${"a"}${o2}${o1}${"\u2000"}"); - Expect.equals("a\ufeff\u2000x", "${"a"}${o2}${"\u2000"}${o1}"); - - Expect.equals("\u2000ax\ufeff", "${"\u2000"}${"a"}${o1}${o2}"); - Expect.equals("\u2000a\ufeffx", "${"\u2000"}${"a"}${o2}${o1}"); - Expect.equals("xa\u2000\ufeff", "${o1}${"a"}${"\u2000"}${o2}"); - Expect.equals("xa\ufeff\u2000", "${o1}${"a"}${o2}${"\u2000"}"); - Expect.equals("\ufeffax\u2000", "${o2}${"a"}${o1}${"\u2000"}"); - Expect.equals("\ufeffa\u2000x", "${o2}${"a"}${"\u2000"}${o1}"); - - Expect.equals("\u2000xa\ufeff", "${"\u2000"}${o1}${"a"}${o2}"); - Expect.equals("\u2000\ufeffax", "${"\u2000"}${o2}${"a"}${o1}"); - Expect.equals("x\u2000a\ufeff", "${o1}${"\u2000"}${"a"}${o2}"); - Expect.equals("x\ufeffa\u2000", "${o1}${o2}${"a"}${"\u2000"}"); - Expect.equals("\ufeffxa\u2000", "${o2}${o1}${"a"}${"\u2000"}"); - Expect.equals("\ufeff\u2000ax", "${o2}${"\u2000"}${"a"}${o1}"); - - Expect.equals("\u2000x\ufeffa", "${"\u2000"}${o1}${o2}${"a"}"); - Expect.equals("\u2000\ufeffxa", "${"\u2000"}${o2}${o1}${"a"}"); - Expect.equals("x\u2000\ufeffa", "${o1}${"\u2000"}${o2}${"a"}"); - Expect.equals("x\ufeff\u2000a", "${o1}${o2}${"\u2000"}${"a"}"); - Expect.equals("\ufeffx\u2000a", "${o2}${o1}${"\u2000"}${"a"}"); - Expect.equals("\ufeff\u2000xa", "${o2}${"\u2000"}${o1}${"a"}"); -} diff --git a/tests/language_2/string/interpolation1_runtime_test.dart b/tests/language_2/string/interpolation1_runtime_test.dart deleted file mode 100644 index 76c7b4f4a4d..00000000000 --- a/tests/language_2/string/interpolation1_runtime_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -// A dollar must be followed by a "{" or an identifier. - -class A { - final String str; - const A(this.str); -} - -class StringInterpolation1NegativeTest { - // Dollar not followed by "{" or identifier. - - static testMain() { - - } -} - -main() { - StringInterpolation1NegativeTest.testMain(); -} diff --git a/tests/language_2/string/interpolation1_test.dart b/tests/language_2/string/interpolation1_test.dart deleted file mode 100644 index 35f6a1ea624..00000000000 --- a/tests/language_2/string/interpolation1_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// 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 dollar must be followed by a "{" or an identifier. - -class A { - final String str; - const A(this.str); -} - -class StringInterpolation1NegativeTest { - // Dollar not followed by "{" or identifier. - static const DOLLAR = const A("$"); - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [analyzer] COMPILE_TIME_ERROR.INVALID_CONSTANT - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - static testMain() { - print(DOLLAR); - } -} - -main() { - StringInterpolation1NegativeTest.testMain(); -} diff --git a/tests/language_2/string/interpolation2_runtime_test.dart b/tests/language_2/string/interpolation2_runtime_test.dart deleted file mode 100644 index 5871262d464..00000000000 --- a/tests/language_2/string/interpolation2_runtime_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -// A dollar must be followed by a "{" or an identifier. - -class StringInterpolation2NegativeTest { - static testMain() { - // Dollar followed by "/". - - } -} - -main() { - StringInterpolation2NegativeTest.testMain(); -} diff --git a/tests/language_2/string/interpolation2_test.dart b/tests/language_2/string/interpolation2_test.dart deleted file mode 100644 index 654e2ea3bf6..00000000000 --- a/tests/language_2/string/interpolation2_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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 dollar must be followed by a "{" or an identifier. - -class StringInterpolation2NegativeTest { - static testMain() { - // Dollar followed by "/". - print('C;Y1;X4;K"$/Month"'); - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - } -} - -main() { - StringInterpolation2NegativeTest.testMain(); -} diff --git a/tests/language_2/string/interpolation3_runtime_test.dart b/tests/language_2/string/interpolation3_runtime_test.dart deleted file mode 100644 index 4e75fbced98..00000000000 --- a/tests/language_2/string/interpolation3_runtime_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -// A dollar must be followed by a "{" or an identifier. - -class StringInterpolation3NegativeTest { - static testMain() { - // Dollar followed by a number. - - } -} - -main() { - StringInterpolation3NegativeTest.testMain(); -} diff --git a/tests/language_2/string/interpolation3_test.dart b/tests/language_2/string/interpolation3_test.dart deleted file mode 100644 index 15cca20f40d..00000000000 --- a/tests/language_2/string/interpolation3_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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 dollar must be followed by a "{" or an identifier. - -class StringInterpolation3NegativeTest { - static testMain() { - // Dollar followed by a number. - print('F;P4;F$2R'); - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - } -} - -main() { - StringInterpolation3NegativeTest.testMain(); -} diff --git a/tests/language_2/string/interpolation4_runtime_test.dart b/tests/language_2/string/interpolation4_runtime_test.dart deleted file mode 100644 index c5a23a93307..00000000000 --- a/tests/language_2/string/interpolation4_runtime_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -// A dollar must be followed by a "{" or an identifier. - -class StringInterpolation4NegativeTest { - static testMain() { - // Dollar not followed by "{" or identifier. - - } -} - -main() { - StringInterpolation4NegativeTest.testMain(); -} diff --git a/tests/language_2/string/interpolation4_test.dart b/tests/language_2/string/interpolation4_test.dart deleted file mode 100644 index 4cf1cb7a8f1..00000000000 --- a/tests/language_2/string/interpolation4_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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 dollar must be followed by a "{" or an identifier. - -class StringInterpolation4NegativeTest { - static testMain() { - // Dollar not followed by "{" or identifier. - print("-" + "$" + "foo"); - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - } -} - -main() { - StringInterpolation4NegativeTest.testMain(); -} diff --git a/tests/language_2/string/interpolation5_runtime_test.dart b/tests/language_2/string/interpolation5_runtime_test.dart deleted file mode 100644 index 34262ed94a1..00000000000 --- a/tests/language_2/string/interpolation5_runtime_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -// A dollar must be followed by a "{" or an identifier. - -class StringInterpolation5NegativeTest { - static testMain() { - // Dollar followed by a number. - - } -} - -main() { - StringInterpolation5NegativeTest.testMain(); -} diff --git a/tests/language_2/string/interpolation5_test.dart b/tests/language_2/string/interpolation5_test.dart deleted file mode 100644 index de2ae86c314..00000000000 --- a/tests/language_2/string/interpolation5_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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 dollar must be followed by a "{" or an identifier. - -class StringInterpolation5NegativeTest { - static testMain() { - // Dollar followed by a number. - print("$1,000"); - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - } -} - -main() { - StringInterpolation5NegativeTest.testMain(); -} diff --git a/tests/language_2/string/interpolation6_test.dart b/tests/language_2/string/interpolation6_test.dart deleted file mode 100644 index b92e7128977..00000000000 --- a/tests/language_2/string/interpolation6_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// 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 dollar must be followed by a "{" or an identifier. - -class StringInterpolation6NegativeTest { - static testMain() { - // Dollar not followed by "{" or identifier. - String regexp; - regexp = "^(\\d\\d?)[-/](\\d\\d?)$"; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - print(regexp); - } -} - -main() { - StringInterpolation6NegativeTest.testMain(); -} diff --git a/tests/language_2/string/interpolation7_test.dart b/tests/language_2/string/interpolation7_test.dart deleted file mode 100644 index 46fb0be76cf..00000000000 --- a/tests/language_2/string/interpolation7_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Dart test program testing string interpolation with toString on custom -// classes and on null. - -class A { - const A(); - String toString() { - return "A"; - } -} - -class StringInterpolation7Test { - static testMain() { - A a = new A(); - Expect.equals("A + A", "$a + $a"); - a = null; - Expect.equals("null", "$a"); - } -} - -main() { - StringInterpolation7Test.testMain(); -} diff --git a/tests/language_2/string/interpolation8_test.dart b/tests/language_2/string/interpolation8_test.dart deleted file mode 100644 index 0c2aabe8da6..00000000000 --- a/tests/language_2/string/interpolation8_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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. -// -// Allow assignment of string interpolation to a static const field - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - static const x = 1; - static const y = "Two is greater than ${x}"; -} - -main() { - Expect.identical("Two is greater than 1", A.y); -} diff --git a/tests/language_2/string/interpolation9_runtime_test.dart b/tests/language_2/string/interpolation9_runtime_test.dart deleted file mode 100644 index 0a79f762201..00000000000 --- a/tests/language_2/string/interpolation9_runtime_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. -// -// Almost valid string interpolation syntax. - -main() { - var x; - - - - - - - - - - - - - - - - - - - - - - - - - - return x; -} diff --git a/tests/language_2/string/interpolation9_test.dart b/tests/language_2/string/interpolation9_test.dart deleted file mode 100644 index a6f2602ebfa..00000000000 --- a/tests/language_2/string/interpolation9_test.dart +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2012, 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. -// -// Almost valid string interpolation syntax. - -// @dart = 2.9 - -main() { - var x; - - x = "$"; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - x = "x$"; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - x = "$x$"; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - x = "$$x"; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - x = "$ "; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - - x = '$'; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - x = 'x$'; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - x = '$x$'; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - x = '$$x'; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - x = '$ '; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - - x = """$"""; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - x = """x$"""; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - x = """$x$"""; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - x = """$$x"""; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - x = """$ """; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - - x = '''$'''; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - x = '''x$'''; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - x = '''$x$'''; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - x = '''$$x'''; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - x = '''$ '''; - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] A '$' has special meaning inside a string, and must be followed by an identifier or an expression in curly braces ({}). - - return x; -} diff --git a/tests/language_2/string/interpolation_and_buffer_test.dart b/tests/language_2/string/interpolation_and_buffer_test.dart deleted file mode 100644 index da94e5639af..00000000000 --- a/tests/language_2/string/interpolation_and_buffer_test.dart +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2012, 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 - -// Interpolation calls `toString`. -// The evaluation of the interpolation fails if `toString` throws or returns -// null. In Dart 2, any method overriding `Object.toString` must return a -// `String` or `null`. In particular, if `object.toString()` returns null, then -// `"$object"` must not evaluate to the string `"null"`. -// -// The specification states that the expression of an interpolation is -// evaluated as follows: -// -// 1. Evaluate $e_i$ to an object $o_i$. -// 2. Invoke the `toString` method on *oi* with no arguments, -// and let *ri*$ be the returned value. -// 3. If *ri* is not an instance of the built-in type `String`, -// throw an `Error`. -// -// (Then the resulting strings are concatenated with the literal string parts). -// -// -// Adding an object to a `StringBuffer` behaves the same as evaluating -// an expression in an interpolation. It must immediately fail if the -// object's toString throws or returns `null`. -// -// This ensures that implementing interpolation via a `StringBuffer`is -// a valid implementation choice. - -import "package:expect/expect.dart"; - -class ToStringString { - String toString() => "String"; -} - -class ToStringNull { - String toString() => null; -} - -class ToStringThrows { - String toString() => throw "Throw"; -} - -void main() { - var s = ToStringString(); - var n = ToStringNull(); - var t = ToStringThrows(); - - Expect.equals("$s$s", "StringString"); - // Throws immediately when evaluating the first interpolated expression. - Expect.throws(() => "$t${throw "unreachable"}", (e) => e == "Throw"); - Expect.throws(() => "$n${throw "unreachable"}"); - - // Throws immediately when adding object that doesn't return a String. - Expect.equals( - (StringBuffer()..write(s)..write(s)).toString(), "StringString"); - Expect.throws( - () => StringBuffer()..write(t)..write(throw "unreachable"), - (e) => e == "Throw"); - Expect.throws( - () => StringBuffer()..write(n)..write(throw "unreachable")); - - // Same behavior for constructor argument as if adding it to buffer later. - Expect.equals((StringBuffer(s)..write(s)).toString(), "StringString"); - Expect.throws( - () => StringBuffer(t)..write(throw "unreachable"), (e) => e == "Throw"); - Expect.throws(() => StringBuffer(n)..write(throw "unreachable")); -} diff --git a/tests/language_2/string/interpolation_newline_test.dart b/tests/language_2/string/interpolation_newline_test.dart deleted file mode 100644 index b22c45f5d08..00000000000 --- a/tests/language_2/string/interpolation_newline_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2014, 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 - -/// Test of newlines in interpolated strings. - -main() { - String expected = '[[{{}: {}}]]'; - String a = "${ [ "${ [ '${ { '${ { } }' : { } } }' ] }" ] }"; - String b = "${ [ "${ [ '${ { '${ - { } }' : { } } }' ] }" ] }"; - String c = "${ [ "${ [ '${ { '${ - { - } }' : { - } } }' ] }" ] }"; - if (expected != a) throw 'expecteda: $expected != $a'; - if (a != b) throw 'ab: $a != $b'; - if (b != c) throw 'bc: $b != $c'; - print('$a$b$c'); -} diff --git a/tests/language_2/string/interpolation_runtime_test.dart b/tests/language_2/string/interpolation_runtime_test.dart deleted file mode 100644 index 57c3372faf3..00000000000 --- a/tests/language_2/string/interpolation_runtime_test.dart +++ /dev/null @@ -1,87 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -import "package:expect/expect.dart"; - -// Tests for string interpolation -class StringInterpolationTest { - StringInterpolationTest() {} - - static void m() {} - - static const int i = 1; - static const String a = ""; - - int j; - int k; - - static testMain(bool alwaysFalse) { - var test = new StringInterpolationTest(); - test.j = 3; - test.k = 5; - - // simple string - Expect.equals(" hi ", " hi "); - - var c1 = '1'; - var c2 = '2'; - var c3 = '3'; - var c4 = '4'; - // no chars before/after/between embedded expressions - Expect.equals(" 1", " ${c1}"); - Expect.equals("1 ", "${c1} "); - Expect.equals("1", "${c1}"); - Expect.equals("12", "${c1}${c2}"); - Expect.equals("12 34", "${c1}${c2} ${c3}${c4}"); - - // embedding static fields - Expect.equals(" hi 1 ", " hi ${i} "); - Expect.equals(" hi ", " hi ${a} "); - - // embedding method parameters - Expect.equals("param = 9", test.embedParams(9)); - - // embedding a class field - Expect.equals("j = 3", test.embedSingleField()); - - // embedding more than one (non-constant) expression - Expect.equals(" hi 1 ", " hi ${i} ${a}"); - Expect.equals("j = 3; k = 5", test.embedMultipleFields()); - - // escaping $ - doesn't start the embedded expression - Expect.equals("\$", "escaped \${3+2}"[12]); - Expect.equals("{", "escaped \${3+2}"[13]); - Expect.equals("3", "escaped \${3+2}"[14]); - Expect.equals("+", "escaped \${3+2}"[15]); - Expect.equals("2", "escaped \${3+2}"[16]); - Expect.equals("}", "escaped \${3+2}"[17]); - - if (alwaysFalse) { - - } - - Expect.equals("${m}", "$m"); - } - - String embedParams(int z) { - return "param = ${z}"; - } - - String embedSingleField() { - return "j = ${j}"; - } - - String embedMultipleFields() { - return "j = ${j}; k = ${k}"; - } -} - -main() { - StringInterpolationTest.testMain(false); -} diff --git a/tests/language_2/string/interpolation_test.dart b/tests/language_2/string/interpolation_test.dart deleted file mode 100644 index edfc6922675..00000000000 --- a/tests/language_2/string/interpolation_test.dart +++ /dev/null @@ -1,87 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Tests for string interpolation -class StringInterpolationTest { - StringInterpolationTest() {} - - static void m() {} - - static const int i = 1; - static const String a = ""; - - int j; - int k; - - static testMain(bool alwaysFalse) { - var test = new StringInterpolationTest(); - test.j = 3; - test.k = 5; - - // simple string - Expect.equals(" hi ", " hi "); - - var c1 = '1'; - var c2 = '2'; - var c3 = '3'; - var c4 = '4'; - // no chars before/after/between embedded expressions - Expect.equals(" 1", " ${c1}"); - Expect.equals("1 ", "${c1} "); - Expect.equals("1", "${c1}"); - Expect.equals("12", "${c1}${c2}"); - Expect.equals("12 34", "${c1}${c2} ${c3}${c4}"); - - // embedding static fields - Expect.equals(" hi 1 ", " hi ${i} "); - Expect.equals(" hi ", " hi ${a} "); - - // embedding method parameters - Expect.equals("param = 9", test.embedParams(9)); - - // embedding a class field - Expect.equals("j = 3", test.embedSingleField()); - - // embedding more than one (non-constant) expression - Expect.equals(" hi 1 ", " hi ${i} ${a}"); - Expect.equals("j = 3; k = 5", test.embedMultipleFields()); - - // escaping $ - doesn't start the embedded expression - Expect.equals("\$", "escaped \${3+2}"[12]); - Expect.equals("{", "escaped \${3+2}"[13]); - Expect.equals("3", "escaped \${3+2}"[14]); - Expect.equals("+", "escaped \${3+2}"[15]); - Expect.equals("2", "escaped \${3+2}"[16]); - Expect.equals("}", "escaped \${3+2}"[17]); - - if (alwaysFalse) { - "${i.toHorse()}"; - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD - // [cfe] The method 'toHorse' isn't defined for the class 'int'. - } - - Expect.equals("${m}", "$m"); - } - - String embedParams(int z) { - return "param = ${z}"; - } - - String embedSingleField() { - return "j = ${j}"; - } - - String embedMultipleFields() { - return "j = ${j}; k = ${k}"; - } -} - -main() { - StringInterpolationTest.testMain(false); -} diff --git a/tests/language_2/string/intrinsics_test.dart b/tests/language_2/string/intrinsics_test.dart deleted file mode 100644 index e139dd13a3e..00000000000 --- a/tests/language_2/string/intrinsics_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2012, 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. -// Replace with shared test once interface issues clarified. -// Test various String intrinsics -// VMOptions=--optimization-counter-threshold=10 - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - var oneByte = "Hello world"; - var empty = ""; - for (int i = 0; i < 20; i++) { - Expect.equals(11, testLength(oneByte)); - Expect.equals(0, testLength(empty)); - Expect.isFalse(testIsEmpty(oneByte)); - Expect.isTrue(testIsEmpty(empty)); - } -} - -testLength(s) { - return s.length; -} - -testIsEmpty(s) { - return s.isEmpty; -} diff --git a/tests/language_2/string/join_test.dart b/tests/language_2/string/join_test.dart deleted file mode 100644 index 2108fc7de90..00000000000 --- a/tests/language_2/string/join_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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. -// Regression test ensuring that only ObjectArrays are handed to the VM code. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class StringJoinTest { - static testMain() { - List ga = []; - ga.add("a"); - ga.add("b"); - Expect.equals("ab", ga.join()); - Expect.equals("ab", ga.join("")); - } -} - -main() { - StringJoinTest.testMain(); -} diff --git a/tests/language_2/string/literals_test.dart b/tests/language_2/string/literals_test.dart deleted file mode 100644 index 41d4c8df8b4..00000000000 --- a/tests/language_2/string/literals_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -main() { - var expect = new String.fromCharCodes( - [0, 0x0a, 0x0d, 0x7f, 0xff, 0xffff, 0xd800, 0xdc00, 0xdbff, 0xdfff]); - test(string) { - Expect.equals(expect, string); - } - - // Plain escapes of code points. - test("\x00\x0a\x0d\x7f\xff\uffff\u{10000}\u{10ffff}"); - test("""\x00\x0a\x0d\x7f\xff\uffff\u{10000}\u{10ffff}"""); - test('\x00\x0a\x0d\x7f\xff\uffff\u{10000}\u{10ffff}'); - test('''\x00\x0a\x0d\x7f\xff\uffff\u{10000}\u{10ffff}'''); - // Plain escapes of individual code units. - test("\x00\x0a\x0d\x7f\xff\uffff\ud800\udc00\udbff\udfff"); - test("""\x00\x0a\x0d\x7f\xff\uffff\ud800\udc00\udbff\udfff"""); - test('\x00\x0a\x0d\x7f\xff\uffff\ud800\udc00\udbff\udfff'); - test('''\x00\x0a\x0d\x7f\xff\uffff\ud800\udc00\udbff\udfff'''); - // Insert newline into multiline string. - test("""\x00 -\x0d\x7f\xff\uffff\ud800\udc00\udbff\udfff"""); - test('''\x00 -\x0d\x7f\xff\uffff\ud800\udc00\udbff\udfff'''); - // Extract code points from multi-character escape string. - test("\x00\x0a\x0d\x7f\xff\uffff" - "${"\u{10000}"[0]}${"\u{10000}"[1]}" - "${"\u{10FFFF}"[0]}${"\u{10FFFF}"[1]}"); - test("\x00\x0a\x0d\x7f\xff\uffff" + "\ud800" + "\udc00\udbff" + "\udfff"); - // Single line string over multiple lines with newlines inside interpolation. - test("\x00\x0a\x0d\x7f\xff${ - "" - }\uffff\ud800\udc00\udbff\udfff"); -} diff --git a/tests/language_2/string/multiline_newline_cr.dart b/tests/language_2/string/multiline_newline_cr.dart deleted file mode 100644 index 2cea98be048..00000000000 --- a/tests/language_2/string/multiline_newline_cr.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2015, 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 multiline_newline_cr; - -const constantMultilineString = """ -a -b -"""; - -var nonConstantMultilineString = """ -a -b -"""; - -const constantRawMultilineString = r""" -\a -\b -"""; - -var nonConstantRawMultilineString = r""" -\a -\b -"""; diff --git a/tests/language_2/string/multiline_newline_crlf.dart b/tests/language_2/string/multiline_newline_crlf.dart deleted file mode 100644 index 39baeffb9f5..00000000000 --- a/tests/language_2/string/multiline_newline_crlf.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2015, 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 - -// Note: This test relies on LF line endings in the source file. -// It requires an entry in the .gitattributes file. - -library multiline_newline_crlf; - -const constantMultilineString = """ -a -b -"""; - -var nonConstantMultilineString = """ -a -b -"""; - -const constantRawMultilineString = r""" -\a -\b -"""; - -var nonConstantRawMultilineString = r""" -\a -\b -"""; diff --git a/tests/language_2/string/multiline_newline_lf.dart b/tests/language_2/string/multiline_newline_lf.dart deleted file mode 100644 index 0cfee93ec44..00000000000 --- a/tests/language_2/string/multiline_newline_lf.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2015, 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 - -// Note: This test relies on LF line endings in the source file. -// It requires an entry in the .gitattributes file. - -library multiline_newline_lf; - -const constantMultilineString = """ -a -b -"""; - -var nonConstantMultilineString = """ -a -b -"""; - -const constantRawMultilineString = r""" -\a -\b -"""; - -var nonConstantRawMultilineString = r""" -\a -\b -"""; diff --git a/tests/language_2/string/multiline_newline_runtime_1_test.dart b/tests/language_2/string/multiline_newline_runtime_1_test.dart deleted file mode 100644 index f45db797f13..00000000000 --- a/tests/language_2/string/multiline_newline_runtime_1_test.dart +++ /dev/null @@ -1,130 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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 'package:expect/expect.dart'; -import 'multiline_newline_cr.dart' as cr; -import 'multiline_newline_crlf.dart' as crlf; -import 'multiline_newline_lf.dart' as lf; - -main() { - Expect.equals(4, cr.constantMultilineString.length); - Expect.equals(4, crlf.constantMultilineString.length); - Expect.equals(4, lf.constantMultilineString.length); - - Expect.equals(6, cr.constantRawMultilineString.length); - Expect.equals(6, crlf.constantRawMultilineString.length); - Expect.equals(6, lf.constantRawMultilineString.length); - - Expect.equals(cr.constantMultilineString, crlf.constantMultilineString); - Expect.equals(crlf.constantMultilineString, lf.constantMultilineString); - Expect.equals(lf.constantMultilineString, cr.constantMultilineString); - - Expect.equals(cr.constantRawMultilineString, crlf.constantRawMultilineString); - Expect.equals(crlf.constantRawMultilineString, lf.constantRawMultilineString); - Expect.equals(lf.constantRawMultilineString, cr.constantRawMultilineString); - - Expect.equals(4, cr.nonConstantMultilineString.length); - Expect.equals(4, crlf.nonConstantMultilineString.length); - Expect.equals(4, lf.nonConstantMultilineString.length); - - Expect.equals(6, cr.nonConstantRawMultilineString.length); - Expect.equals(6, crlf.nonConstantRawMultilineString.length); - Expect.equals(6, lf.nonConstantRawMultilineString.length); - - Expect.equals(cr.nonConstantMultilineString, crlf.nonConstantMultilineString); - Expect.equals(crlf.nonConstantMultilineString, lf.nonConstantMultilineString); - Expect.equals(lf.nonConstantMultilineString, cr.nonConstantMultilineString); - - Expect.equals( - cr.nonConstantRawMultilineString, crlf.nonConstantRawMultilineString); - Expect.equals( - crlf.nonConstantRawMultilineString, lf.nonConstantRawMultilineString); - Expect.equals( - lf.nonConstantRawMultilineString, cr.nonConstantRawMultilineString); - - const c1 = - cr.constantMultilineString == crlf.constantMultilineString ? true : null; - const c2 = - crlf.constantMultilineString == lf.constantMultilineString ? true : null; - const c3 = - lf.constantMultilineString == cr.constantMultilineString ? true : null; - Expect.isTrue(c1); - Expect.isTrue(c2); - Expect.isTrue(c3); - - const c1r = cr.constantRawMultilineString == crlf.constantRawMultilineString - ? true - : null; - const c2r = crlf.constantRawMultilineString == lf.constantRawMultilineString - ? true - : null; - const c3r = lf.constantRawMultilineString == cr.constantRawMultilineString - ? true - : null; - Expect.isTrue(c1r); - Expect.isTrue(c2r); - Expect.isTrue(c3r); - - const c4 = c1 ? 1 : 2; - Expect.equals(1, c4); - - - - - - - - - - - - - - - - - const c7 = - cr.constantMultilineString != crlf.constantMultilineString ? true : null; - const c8 = - crlf.constantMultilineString != lf.constantMultilineString ? true : null; - const c9 = - lf.constantMultilineString != cr.constantMultilineString ? true : null; - Expect.isNull(c7); - Expect.isNull(c8); - Expect.isNull(c9); - - const c7r = cr.constantRawMultilineString != crlf.constantRawMultilineString - ? true - : null; - const c8r = crlf.constantRawMultilineString != lf.constantRawMultilineString - ? true - : null; - const c9r = lf.constantRawMultilineString != cr.constantRawMultilineString - ? true - : null; - Expect.isNull(c7r); - Expect.isNull(c8r); - Expect.isNull(c9r); - - // What's the deal with the compile-time errors below? This is to validate - // that constants are evaluated correctly at compile-time (or analysis - // time). For example, only if [c7] is evaluated correctly does it become - // null which leads to a compile-time error (as it isn't a boolean). For - // tools like dart2js, this ensures that the compile-time evaluation of - // constants is similar to the runtime evaluation tested above. For tools - // like the analyzer, this ensures that evaluation is tested (there's no - // runtime evaluation). - - - - - - - -} diff --git a/tests/language_2/string/multiline_newline_runtime_2_test.dart b/tests/language_2/string/multiline_newline_runtime_2_test.dart deleted file mode 100644 index 9e8835ef595..00000000000 --- a/tests/language_2/string/multiline_newline_runtime_2_test.dart +++ /dev/null @@ -1,130 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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 'package:expect/expect.dart'; -import 'multiline_newline_cr.dart' as cr; -import 'multiline_newline_crlf.dart' as crlf; -import 'multiline_newline_lf.dart' as lf; - -main() { - Expect.equals(4, cr.constantMultilineString.length); - Expect.equals(4, crlf.constantMultilineString.length); - Expect.equals(4, lf.constantMultilineString.length); - - Expect.equals(6, cr.constantRawMultilineString.length); - Expect.equals(6, crlf.constantRawMultilineString.length); - Expect.equals(6, lf.constantRawMultilineString.length); - - Expect.equals(cr.constantMultilineString, crlf.constantMultilineString); - Expect.equals(crlf.constantMultilineString, lf.constantMultilineString); - Expect.equals(lf.constantMultilineString, cr.constantMultilineString); - - Expect.equals(cr.constantRawMultilineString, crlf.constantRawMultilineString); - Expect.equals(crlf.constantRawMultilineString, lf.constantRawMultilineString); - Expect.equals(lf.constantRawMultilineString, cr.constantRawMultilineString); - - Expect.equals(4, cr.nonConstantMultilineString.length); - Expect.equals(4, crlf.nonConstantMultilineString.length); - Expect.equals(4, lf.nonConstantMultilineString.length); - - Expect.equals(6, cr.nonConstantRawMultilineString.length); - Expect.equals(6, crlf.nonConstantRawMultilineString.length); - Expect.equals(6, lf.nonConstantRawMultilineString.length); - - Expect.equals(cr.nonConstantMultilineString, crlf.nonConstantMultilineString); - Expect.equals(crlf.nonConstantMultilineString, lf.nonConstantMultilineString); - Expect.equals(lf.nonConstantMultilineString, cr.nonConstantMultilineString); - - Expect.equals( - cr.nonConstantRawMultilineString, crlf.nonConstantRawMultilineString); - Expect.equals( - crlf.nonConstantRawMultilineString, lf.nonConstantRawMultilineString); - Expect.equals( - lf.nonConstantRawMultilineString, cr.nonConstantRawMultilineString); - - const c1 = - cr.constantMultilineString == crlf.constantMultilineString ? true : null; - const c2 = - crlf.constantMultilineString == lf.constantMultilineString ? true : null; - const c3 = - lf.constantMultilineString == cr.constantMultilineString ? true : null; - Expect.isTrue(c1); - Expect.isTrue(c2); - Expect.isTrue(c3); - - const c1r = cr.constantRawMultilineString == crlf.constantRawMultilineString - ? true - : null; - const c2r = crlf.constantRawMultilineString == lf.constantRawMultilineString - ? true - : null; - const c3r = lf.constantRawMultilineString == cr.constantRawMultilineString - ? true - : null; - Expect.isTrue(c1r); - Expect.isTrue(c2r); - Expect.isTrue(c3r); - - - - - const c5 = c2 ? 2 : 3; - Expect.equals(2, c5); - - - - - - - - - - - - - - const c7 = - cr.constantMultilineString != crlf.constantMultilineString ? true : null; - const c8 = - crlf.constantMultilineString != lf.constantMultilineString ? true : null; - const c9 = - lf.constantMultilineString != cr.constantMultilineString ? true : null; - Expect.isNull(c7); - Expect.isNull(c8); - Expect.isNull(c9); - - const c7r = cr.constantRawMultilineString != crlf.constantRawMultilineString - ? true - : null; - const c8r = crlf.constantRawMultilineString != lf.constantRawMultilineString - ? true - : null; - const c9r = lf.constantRawMultilineString != cr.constantRawMultilineString - ? true - : null; - Expect.isNull(c7r); - Expect.isNull(c8r); - Expect.isNull(c9r); - - // What's the deal with the compile-time errors below? This is to validate - // that constants are evaluated correctly at compile-time (or analysis - // time). For example, only if [c7] is evaluated correctly does it become - // null which leads to a compile-time error (as it isn't a boolean). For - // tools like dart2js, this ensures that the compile-time evaluation of - // constants is similar to the runtime evaluation tested above. For tools - // like the analyzer, this ensures that evaluation is tested (there's no - // runtime evaluation). - - - - - - - -} diff --git a/tests/language_2/string/multiline_newline_runtime_3_test.dart b/tests/language_2/string/multiline_newline_runtime_3_test.dart deleted file mode 100644 index 50624689a7d..00000000000 --- a/tests/language_2/string/multiline_newline_runtime_3_test.dart +++ /dev/null @@ -1,130 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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 'package:expect/expect.dart'; -import 'multiline_newline_cr.dart' as cr; -import 'multiline_newline_crlf.dart' as crlf; -import 'multiline_newline_lf.dart' as lf; - -main() { - Expect.equals(4, cr.constantMultilineString.length); - Expect.equals(4, crlf.constantMultilineString.length); - Expect.equals(4, lf.constantMultilineString.length); - - Expect.equals(6, cr.constantRawMultilineString.length); - Expect.equals(6, crlf.constantRawMultilineString.length); - Expect.equals(6, lf.constantRawMultilineString.length); - - Expect.equals(cr.constantMultilineString, crlf.constantMultilineString); - Expect.equals(crlf.constantMultilineString, lf.constantMultilineString); - Expect.equals(lf.constantMultilineString, cr.constantMultilineString); - - Expect.equals(cr.constantRawMultilineString, crlf.constantRawMultilineString); - Expect.equals(crlf.constantRawMultilineString, lf.constantRawMultilineString); - Expect.equals(lf.constantRawMultilineString, cr.constantRawMultilineString); - - Expect.equals(4, cr.nonConstantMultilineString.length); - Expect.equals(4, crlf.nonConstantMultilineString.length); - Expect.equals(4, lf.nonConstantMultilineString.length); - - Expect.equals(6, cr.nonConstantRawMultilineString.length); - Expect.equals(6, crlf.nonConstantRawMultilineString.length); - Expect.equals(6, lf.nonConstantRawMultilineString.length); - - Expect.equals(cr.nonConstantMultilineString, crlf.nonConstantMultilineString); - Expect.equals(crlf.nonConstantMultilineString, lf.nonConstantMultilineString); - Expect.equals(lf.nonConstantMultilineString, cr.nonConstantMultilineString); - - Expect.equals( - cr.nonConstantRawMultilineString, crlf.nonConstantRawMultilineString); - Expect.equals( - crlf.nonConstantRawMultilineString, lf.nonConstantRawMultilineString); - Expect.equals( - lf.nonConstantRawMultilineString, cr.nonConstantRawMultilineString); - - const c1 = - cr.constantMultilineString == crlf.constantMultilineString ? true : null; - const c2 = - crlf.constantMultilineString == lf.constantMultilineString ? true : null; - const c3 = - lf.constantMultilineString == cr.constantMultilineString ? true : null; - Expect.isTrue(c1); - Expect.isTrue(c2); - Expect.isTrue(c3); - - const c1r = cr.constantRawMultilineString == crlf.constantRawMultilineString - ? true - : null; - const c2r = crlf.constantRawMultilineString == lf.constantRawMultilineString - ? true - : null; - const c3r = lf.constantRawMultilineString == cr.constantRawMultilineString - ? true - : null; - Expect.isTrue(c1r); - Expect.isTrue(c2r); - Expect.isTrue(c3r); - - - - - - - - const c6 = c3 ? 3 : 4; - Expect.equals(3, c6); - - - - - - - - - - - const c7 = - cr.constantMultilineString != crlf.constantMultilineString ? true : null; - const c8 = - crlf.constantMultilineString != lf.constantMultilineString ? true : null; - const c9 = - lf.constantMultilineString != cr.constantMultilineString ? true : null; - Expect.isNull(c7); - Expect.isNull(c8); - Expect.isNull(c9); - - const c7r = cr.constantRawMultilineString != crlf.constantRawMultilineString - ? true - : null; - const c8r = crlf.constantRawMultilineString != lf.constantRawMultilineString - ? true - : null; - const c9r = lf.constantRawMultilineString != cr.constantRawMultilineString - ? true - : null; - Expect.isNull(c7r); - Expect.isNull(c8r); - Expect.isNull(c9r); - - // What's the deal with the compile-time errors below? This is to validate - // that constants are evaluated correctly at compile-time (or analysis - // time). For example, only if [c7] is evaluated correctly does it become - // null which leads to a compile-time error (as it isn't a boolean). For - // tools like dart2js, this ensures that the compile-time evaluation of - // constants is similar to the runtime evaluation tested above. For tools - // like the analyzer, this ensures that evaluation is tested (there's no - // runtime evaluation). - - - - - - - -} diff --git a/tests/language_2/string/multiline_newline_runtime_4_test.dart b/tests/language_2/string/multiline_newline_runtime_4_test.dart deleted file mode 100644 index 942a129e099..00000000000 --- a/tests/language_2/string/multiline_newline_runtime_4_test.dart +++ /dev/null @@ -1,130 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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 'package:expect/expect.dart'; -import 'multiline_newline_cr.dart' as cr; -import 'multiline_newline_crlf.dart' as crlf; -import 'multiline_newline_lf.dart' as lf; - -main() { - Expect.equals(4, cr.constantMultilineString.length); - Expect.equals(4, crlf.constantMultilineString.length); - Expect.equals(4, lf.constantMultilineString.length); - - Expect.equals(6, cr.constantRawMultilineString.length); - Expect.equals(6, crlf.constantRawMultilineString.length); - Expect.equals(6, lf.constantRawMultilineString.length); - - Expect.equals(cr.constantMultilineString, crlf.constantMultilineString); - Expect.equals(crlf.constantMultilineString, lf.constantMultilineString); - Expect.equals(lf.constantMultilineString, cr.constantMultilineString); - - Expect.equals(cr.constantRawMultilineString, crlf.constantRawMultilineString); - Expect.equals(crlf.constantRawMultilineString, lf.constantRawMultilineString); - Expect.equals(lf.constantRawMultilineString, cr.constantRawMultilineString); - - Expect.equals(4, cr.nonConstantMultilineString.length); - Expect.equals(4, crlf.nonConstantMultilineString.length); - Expect.equals(4, lf.nonConstantMultilineString.length); - - Expect.equals(6, cr.nonConstantRawMultilineString.length); - Expect.equals(6, crlf.nonConstantRawMultilineString.length); - Expect.equals(6, lf.nonConstantRawMultilineString.length); - - Expect.equals(cr.nonConstantMultilineString, crlf.nonConstantMultilineString); - Expect.equals(crlf.nonConstantMultilineString, lf.nonConstantMultilineString); - Expect.equals(lf.nonConstantMultilineString, cr.nonConstantMultilineString); - - Expect.equals( - cr.nonConstantRawMultilineString, crlf.nonConstantRawMultilineString); - Expect.equals( - crlf.nonConstantRawMultilineString, lf.nonConstantRawMultilineString); - Expect.equals( - lf.nonConstantRawMultilineString, cr.nonConstantRawMultilineString); - - const c1 = - cr.constantMultilineString == crlf.constantMultilineString ? true : null; - const c2 = - crlf.constantMultilineString == lf.constantMultilineString ? true : null; - const c3 = - lf.constantMultilineString == cr.constantMultilineString ? true : null; - Expect.isTrue(c1); - Expect.isTrue(c2); - Expect.isTrue(c3); - - const c1r = cr.constantRawMultilineString == crlf.constantRawMultilineString - ? true - : null; - const c2r = crlf.constantRawMultilineString == lf.constantRawMultilineString - ? true - : null; - const c3r = lf.constantRawMultilineString == cr.constantRawMultilineString - ? true - : null; - Expect.isTrue(c1r); - Expect.isTrue(c2r); - Expect.isTrue(c3r); - - - - - - - - - - - const c4r = c1r ? 1 : 2; - Expect.equals(1, c4r); - - - - - - - - const c7 = - cr.constantMultilineString != crlf.constantMultilineString ? true : null; - const c8 = - crlf.constantMultilineString != lf.constantMultilineString ? true : null; - const c9 = - lf.constantMultilineString != cr.constantMultilineString ? true : null; - Expect.isNull(c7); - Expect.isNull(c8); - Expect.isNull(c9); - - const c7r = cr.constantRawMultilineString != crlf.constantRawMultilineString - ? true - : null; - const c8r = crlf.constantRawMultilineString != lf.constantRawMultilineString - ? true - : null; - const c9r = lf.constantRawMultilineString != cr.constantRawMultilineString - ? true - : null; - Expect.isNull(c7r); - Expect.isNull(c8r); - Expect.isNull(c9r); - - // What's the deal with the compile-time errors below? This is to validate - // that constants are evaluated correctly at compile-time (or analysis - // time). For example, only if [c7] is evaluated correctly does it become - // null which leads to a compile-time error (as it isn't a boolean). For - // tools like dart2js, this ensures that the compile-time evaluation of - // constants is similar to the runtime evaluation tested above. For tools - // like the analyzer, this ensures that evaluation is tested (there's no - // runtime evaluation). - - - - - - - -} diff --git a/tests/language_2/string/multiline_newline_runtime_5_test.dart b/tests/language_2/string/multiline_newline_runtime_5_test.dart deleted file mode 100644 index 5a662e0916c..00000000000 --- a/tests/language_2/string/multiline_newline_runtime_5_test.dart +++ /dev/null @@ -1,130 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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 'package:expect/expect.dart'; -import 'multiline_newline_cr.dart' as cr; -import 'multiline_newline_crlf.dart' as crlf; -import 'multiline_newline_lf.dart' as lf; - -main() { - Expect.equals(4, cr.constantMultilineString.length); - Expect.equals(4, crlf.constantMultilineString.length); - Expect.equals(4, lf.constantMultilineString.length); - - Expect.equals(6, cr.constantRawMultilineString.length); - Expect.equals(6, crlf.constantRawMultilineString.length); - Expect.equals(6, lf.constantRawMultilineString.length); - - Expect.equals(cr.constantMultilineString, crlf.constantMultilineString); - Expect.equals(crlf.constantMultilineString, lf.constantMultilineString); - Expect.equals(lf.constantMultilineString, cr.constantMultilineString); - - Expect.equals(cr.constantRawMultilineString, crlf.constantRawMultilineString); - Expect.equals(crlf.constantRawMultilineString, lf.constantRawMultilineString); - Expect.equals(lf.constantRawMultilineString, cr.constantRawMultilineString); - - Expect.equals(4, cr.nonConstantMultilineString.length); - Expect.equals(4, crlf.nonConstantMultilineString.length); - Expect.equals(4, lf.nonConstantMultilineString.length); - - Expect.equals(6, cr.nonConstantRawMultilineString.length); - Expect.equals(6, crlf.nonConstantRawMultilineString.length); - Expect.equals(6, lf.nonConstantRawMultilineString.length); - - Expect.equals(cr.nonConstantMultilineString, crlf.nonConstantMultilineString); - Expect.equals(crlf.nonConstantMultilineString, lf.nonConstantMultilineString); - Expect.equals(lf.nonConstantMultilineString, cr.nonConstantMultilineString); - - Expect.equals( - cr.nonConstantRawMultilineString, crlf.nonConstantRawMultilineString); - Expect.equals( - crlf.nonConstantRawMultilineString, lf.nonConstantRawMultilineString); - Expect.equals( - lf.nonConstantRawMultilineString, cr.nonConstantRawMultilineString); - - const c1 = - cr.constantMultilineString == crlf.constantMultilineString ? true : null; - const c2 = - crlf.constantMultilineString == lf.constantMultilineString ? true : null; - const c3 = - lf.constantMultilineString == cr.constantMultilineString ? true : null; - Expect.isTrue(c1); - Expect.isTrue(c2); - Expect.isTrue(c3); - - const c1r = cr.constantRawMultilineString == crlf.constantRawMultilineString - ? true - : null; - const c2r = crlf.constantRawMultilineString == lf.constantRawMultilineString - ? true - : null; - const c3r = lf.constantRawMultilineString == cr.constantRawMultilineString - ? true - : null; - Expect.isTrue(c1r); - Expect.isTrue(c2r); - Expect.isTrue(c3r); - - - - - - - - - - - - - - const c5r = c2r ? 2 : 3; - Expect.equals(2, c5r); - - - - - const c7 = - cr.constantMultilineString != crlf.constantMultilineString ? true : null; - const c8 = - crlf.constantMultilineString != lf.constantMultilineString ? true : null; - const c9 = - lf.constantMultilineString != cr.constantMultilineString ? true : null; - Expect.isNull(c7); - Expect.isNull(c8); - Expect.isNull(c9); - - const c7r = cr.constantRawMultilineString != crlf.constantRawMultilineString - ? true - : null; - const c8r = crlf.constantRawMultilineString != lf.constantRawMultilineString - ? true - : null; - const c9r = lf.constantRawMultilineString != cr.constantRawMultilineString - ? true - : null; - Expect.isNull(c7r); - Expect.isNull(c8r); - Expect.isNull(c9r); - - // What's the deal with the compile-time errors below? This is to validate - // that constants are evaluated correctly at compile-time (or analysis - // time). For example, only if [c7] is evaluated correctly does it become - // null which leads to a compile-time error (as it isn't a boolean). For - // tools like dart2js, this ensures that the compile-time evaluation of - // constants is similar to the runtime evaluation tested above. For tools - // like the analyzer, this ensures that evaluation is tested (there's no - // runtime evaluation). - - - - - - - -} diff --git a/tests/language_2/string/multiline_newline_runtime_6_test.dart b/tests/language_2/string/multiline_newline_runtime_6_test.dart deleted file mode 100644 index ffc02893b6b..00000000000 --- a/tests/language_2/string/multiline_newline_runtime_6_test.dart +++ /dev/null @@ -1,130 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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 'package:expect/expect.dart'; -import 'multiline_newline_cr.dart' as cr; -import 'multiline_newline_crlf.dart' as crlf; -import 'multiline_newline_lf.dart' as lf; - -main() { - Expect.equals(4, cr.constantMultilineString.length); - Expect.equals(4, crlf.constantMultilineString.length); - Expect.equals(4, lf.constantMultilineString.length); - - Expect.equals(6, cr.constantRawMultilineString.length); - Expect.equals(6, crlf.constantRawMultilineString.length); - Expect.equals(6, lf.constantRawMultilineString.length); - - Expect.equals(cr.constantMultilineString, crlf.constantMultilineString); - Expect.equals(crlf.constantMultilineString, lf.constantMultilineString); - Expect.equals(lf.constantMultilineString, cr.constantMultilineString); - - Expect.equals(cr.constantRawMultilineString, crlf.constantRawMultilineString); - Expect.equals(crlf.constantRawMultilineString, lf.constantRawMultilineString); - Expect.equals(lf.constantRawMultilineString, cr.constantRawMultilineString); - - Expect.equals(4, cr.nonConstantMultilineString.length); - Expect.equals(4, crlf.nonConstantMultilineString.length); - Expect.equals(4, lf.nonConstantMultilineString.length); - - Expect.equals(6, cr.nonConstantRawMultilineString.length); - Expect.equals(6, crlf.nonConstantRawMultilineString.length); - Expect.equals(6, lf.nonConstantRawMultilineString.length); - - Expect.equals(cr.nonConstantMultilineString, crlf.nonConstantMultilineString); - Expect.equals(crlf.nonConstantMultilineString, lf.nonConstantMultilineString); - Expect.equals(lf.nonConstantMultilineString, cr.nonConstantMultilineString); - - Expect.equals( - cr.nonConstantRawMultilineString, crlf.nonConstantRawMultilineString); - Expect.equals( - crlf.nonConstantRawMultilineString, lf.nonConstantRawMultilineString); - Expect.equals( - lf.nonConstantRawMultilineString, cr.nonConstantRawMultilineString); - - const c1 = - cr.constantMultilineString == crlf.constantMultilineString ? true : null; - const c2 = - crlf.constantMultilineString == lf.constantMultilineString ? true : null; - const c3 = - lf.constantMultilineString == cr.constantMultilineString ? true : null; - Expect.isTrue(c1); - Expect.isTrue(c2); - Expect.isTrue(c3); - - const c1r = cr.constantRawMultilineString == crlf.constantRawMultilineString - ? true - : null; - const c2r = crlf.constantRawMultilineString == lf.constantRawMultilineString - ? true - : null; - const c3r = lf.constantRawMultilineString == cr.constantRawMultilineString - ? true - : null; - Expect.isTrue(c1r); - Expect.isTrue(c2r); - Expect.isTrue(c3r); - - - - - - - - - - - - - - - - - const c6r = c3r ? 3 : 4; - Expect.equals(3, c6r); - - const c7 = - cr.constantMultilineString != crlf.constantMultilineString ? true : null; - const c8 = - crlf.constantMultilineString != lf.constantMultilineString ? true : null; - const c9 = - lf.constantMultilineString != cr.constantMultilineString ? true : null; - Expect.isNull(c7); - Expect.isNull(c8); - Expect.isNull(c9); - - const c7r = cr.constantRawMultilineString != crlf.constantRawMultilineString - ? true - : null; - const c8r = crlf.constantRawMultilineString != lf.constantRawMultilineString - ? true - : null; - const c9r = lf.constantRawMultilineString != cr.constantRawMultilineString - ? true - : null; - Expect.isNull(c7r); - Expect.isNull(c8r); - Expect.isNull(c9r); - - // What's the deal with the compile-time errors below? This is to validate - // that constants are evaluated correctly at compile-time (or analysis - // time). For example, only if [c7] is evaluated correctly does it become - // null which leads to a compile-time error (as it isn't a boolean). For - // tools like dart2js, this ensures that the compile-time evaluation of - // constants is similar to the runtime evaluation tested above. For tools - // like the analyzer, this ensures that evaluation is tested (there's no - // runtime evaluation). - - - - - - - -} diff --git a/tests/language_2/string/multiline_newline_runtime_test.dart b/tests/language_2/string/multiline_newline_runtime_test.dart deleted file mode 100644 index f4590777ace..00000000000 --- a/tests/language_2/string/multiline_newline_runtime_test.dart +++ /dev/null @@ -1,130 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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 'package:expect/expect.dart'; -import 'multiline_newline_cr.dart' as cr; -import 'multiline_newline_crlf.dart' as crlf; -import 'multiline_newline_lf.dart' as lf; - -main() { - Expect.equals(4, cr.constantMultilineString.length); - Expect.equals(4, crlf.constantMultilineString.length); - Expect.equals(4, lf.constantMultilineString.length); - - Expect.equals(6, cr.constantRawMultilineString.length); - Expect.equals(6, crlf.constantRawMultilineString.length); - Expect.equals(6, lf.constantRawMultilineString.length); - - Expect.equals(cr.constantMultilineString, crlf.constantMultilineString); - Expect.equals(crlf.constantMultilineString, lf.constantMultilineString); - Expect.equals(lf.constantMultilineString, cr.constantMultilineString); - - Expect.equals(cr.constantRawMultilineString, crlf.constantRawMultilineString); - Expect.equals(crlf.constantRawMultilineString, lf.constantRawMultilineString); - Expect.equals(lf.constantRawMultilineString, cr.constantRawMultilineString); - - Expect.equals(4, cr.nonConstantMultilineString.length); - Expect.equals(4, crlf.nonConstantMultilineString.length); - Expect.equals(4, lf.nonConstantMultilineString.length); - - Expect.equals(6, cr.nonConstantRawMultilineString.length); - Expect.equals(6, crlf.nonConstantRawMultilineString.length); - Expect.equals(6, lf.nonConstantRawMultilineString.length); - - Expect.equals(cr.nonConstantMultilineString, crlf.nonConstantMultilineString); - Expect.equals(crlf.nonConstantMultilineString, lf.nonConstantMultilineString); - Expect.equals(lf.nonConstantMultilineString, cr.nonConstantMultilineString); - - Expect.equals( - cr.nonConstantRawMultilineString, crlf.nonConstantRawMultilineString); - Expect.equals( - crlf.nonConstantRawMultilineString, lf.nonConstantRawMultilineString); - Expect.equals( - lf.nonConstantRawMultilineString, cr.nonConstantRawMultilineString); - - const c1 = - cr.constantMultilineString == crlf.constantMultilineString ? true : null; - const c2 = - crlf.constantMultilineString == lf.constantMultilineString ? true : null; - const c3 = - lf.constantMultilineString == cr.constantMultilineString ? true : null; - Expect.isTrue(c1); - Expect.isTrue(c2); - Expect.isTrue(c3); - - const c1r = cr.constantRawMultilineString == crlf.constantRawMultilineString - ? true - : null; - const c2r = crlf.constantRawMultilineString == lf.constantRawMultilineString - ? true - : null; - const c3r = lf.constantRawMultilineString == cr.constantRawMultilineString - ? true - : null; - Expect.isTrue(c1r); - Expect.isTrue(c2r); - Expect.isTrue(c3r); - - - - - - - - - - - - - - - - - - - - const c7 = - cr.constantMultilineString != crlf.constantMultilineString ? true : null; - const c8 = - crlf.constantMultilineString != lf.constantMultilineString ? true : null; - const c9 = - lf.constantMultilineString != cr.constantMultilineString ? true : null; - Expect.isNull(c7); - Expect.isNull(c8); - Expect.isNull(c9); - - const c7r = cr.constantRawMultilineString != crlf.constantRawMultilineString - ? true - : null; - const c8r = crlf.constantRawMultilineString != lf.constantRawMultilineString - ? true - : null; - const c9r = lf.constantRawMultilineString != cr.constantRawMultilineString - ? true - : null; - Expect.isNull(c7r); - Expect.isNull(c8r); - Expect.isNull(c9r); - - // What's the deal with the compile-time errors below? This is to validate - // that constants are evaluated correctly at compile-time (or analysis - // time). For example, only if [c7] is evaluated correctly does it become - // null which leads to a compile-time error (as it isn't a boolean). For - // tools like dart2js, this ensures that the compile-time evaluation of - // constants is similar to the runtime evaluation tested above. For tools - // like the analyzer, this ensures that evaluation is tested (there's no - // runtime evaluation). - - - - - - - -} diff --git a/tests/language_2/string/multiline_newline_test.dart b/tests/language_2/string/multiline_newline_test.dart deleted file mode 100644 index 250706efa4a..00000000000 --- a/tests/language_2/string/multiline_newline_test.dart +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'package:expect/expect.dart'; -import 'multiline_newline_cr.dart' as cr; -import 'multiline_newline_crlf.dart' as crlf; -import 'multiline_newline_lf.dart' as lf; - -main() { - Expect.equals(4, cr.constantMultilineString.length); - Expect.equals(4, crlf.constantMultilineString.length); - Expect.equals(4, lf.constantMultilineString.length); - - Expect.equals(6, cr.constantRawMultilineString.length); - Expect.equals(6, crlf.constantRawMultilineString.length); - Expect.equals(6, lf.constantRawMultilineString.length); - - Expect.equals(cr.constantMultilineString, crlf.constantMultilineString); - Expect.equals(crlf.constantMultilineString, lf.constantMultilineString); - Expect.equals(lf.constantMultilineString, cr.constantMultilineString); - - Expect.equals(cr.constantRawMultilineString, crlf.constantRawMultilineString); - Expect.equals(crlf.constantRawMultilineString, lf.constantRawMultilineString); - Expect.equals(lf.constantRawMultilineString, cr.constantRawMultilineString); - - Expect.equals(4, cr.nonConstantMultilineString.length); - Expect.equals(4, crlf.nonConstantMultilineString.length); - Expect.equals(4, lf.nonConstantMultilineString.length); - - Expect.equals(6, cr.nonConstantRawMultilineString.length); - Expect.equals(6, crlf.nonConstantRawMultilineString.length); - Expect.equals(6, lf.nonConstantRawMultilineString.length); - - Expect.equals(cr.nonConstantMultilineString, crlf.nonConstantMultilineString); - Expect.equals(crlf.nonConstantMultilineString, lf.nonConstantMultilineString); - Expect.equals(lf.nonConstantMultilineString, cr.nonConstantMultilineString); - - Expect.equals( - cr.nonConstantRawMultilineString, crlf.nonConstantRawMultilineString); - Expect.equals( - crlf.nonConstantRawMultilineString, lf.nonConstantRawMultilineString); - Expect.equals( - lf.nonConstantRawMultilineString, cr.nonConstantRawMultilineString); - - const c1 = - cr.constantMultilineString == crlf.constantMultilineString ? true : null; - const c2 = - crlf.constantMultilineString == lf.constantMultilineString ? true : null; - const c3 = - lf.constantMultilineString == cr.constantMultilineString ? true : null; - Expect.isTrue(c1); - Expect.isTrue(c2); - Expect.isTrue(c3); - - const c1r = cr.constantRawMultilineString == crlf.constantRawMultilineString - ? true - : null; - const c2r = crlf.constantRawMultilineString == lf.constantRawMultilineString - ? true - : null; - const c3r = lf.constantRawMultilineString == cr.constantRawMultilineString - ? true - : null; - Expect.isTrue(c1r); - Expect.isTrue(c2r); - Expect.isTrue(c3r); - - const c4 = c1 ? 1 : 2; - Expect.equals(1, c4); - - const c5 = c2 ? 2 : 3; - Expect.equals(2, c5); - - const c6 = c3 ? 3 : 4; - Expect.equals(3, c6); - - const c4r = c1r ? 1 : 2; - Expect.equals(1, c4r); - - const c5r = c2r ? 2 : 3; - Expect.equals(2, c5r); - - const c6r = c3r ? 3 : 4; - Expect.equals(3, c6r); - - const c7 = - cr.constantMultilineString != crlf.constantMultilineString ? true : null; - const c8 = - crlf.constantMultilineString != lf.constantMultilineString ? true : null; - const c9 = - lf.constantMultilineString != cr.constantMultilineString ? true : null; - Expect.isNull(c7); - Expect.isNull(c8); - Expect.isNull(c9); - - const c7r = cr.constantRawMultilineString != crlf.constantRawMultilineString - ? true - : null; - const c8r = crlf.constantRawMultilineString != lf.constantRawMultilineString - ? true - : null; - const c9r = lf.constantRawMultilineString != cr.constantRawMultilineString - ? true - : null; - Expect.isNull(c7r); - Expect.isNull(c8r); - Expect.isNull(c9r); - - // What's the deal with the compile-time errors below? This is to validate - // that constants are evaluated correctly at compile-time (or analysis - // time). For example, only if [c7] is evaluated correctly does it become - // null which leads to a compile-time error (as it isn't a boolean). For - // tools like dart2js, this ensures that the compile-time evaluation of - // constants is similar to the runtime evaluation tested above. For tools - // like the analyzer, this ensures that evaluation is tested (there's no - // runtime evaluation). - const c10 = c7 ? 1 : 2; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL - // ^ - // [cfe] Constant evaluation error: - const c11 = c8 ? 2 : 3; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL - // ^ - // [cfe] Constant evaluation error: - const c12 = c9 ? 3 : 4; - // ^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL - // ^ - // [cfe] Constant evaluation error: - - const c10r = c7r ? 1 : 2; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL - // ^ - // [cfe] Constant evaluation error: - const c11r = c8r ? 2 : 3; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL - // ^ - // [cfe] Constant evaluation error: - const c12r = c9r ? 3 : 4; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_EVAL_TYPE_BOOL - // ^ - // [cfe] Constant evaluation error: -} diff --git a/tests/language_2/string/multiline_strings_test.dart b/tests/language_2/string/multiline_strings_test.dart deleted file mode 100644 index 1c253e54870..00000000000 --- a/tests/language_2/string/multiline_strings_test.dart +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2015, 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 - -// Note: This test relies on LF line endings in the source file. - -import "package:expect/expect.dart"; - -main() { - Expect.equals( - 'foo', - ''' -foo'''); - - Expect.equals( - '\\\nfoo', - '''\\ -foo'''); - - Expect.equals( - '\t\nfoo', - '''\t -foo'''); - - Expect.equals( - 'foo', - '''\ -foo'''); - - Expect.equals( - 'foo', - '''\ \ -foo'''); - - Expect.equals( - ' \nfoo', - '''\x20 -foo'''); - - String x = ' '; - Expect.equals( - ' \nfoo', - '''$x -foo'''); - - Expect.equals( - 'foo', - r''' -foo'''); - - Expect.equals( - '\\\\\nfoo', - r'''\\ -foo'''); - - Expect.equals( - '\\t\nfoo', - r'''\t -foo'''); - - Expect.equals( - 'foo', - r'''\ -foo'''); - - Expect.equals( - 'foo', - r'''\ \ -foo'''); -} diff --git a/tests/language_2/string/no_operator_runtime_test.dart b/tests/language_2/string/no_operator_runtime_test.dart deleted file mode 100644 index 824c470f736..00000000000 --- a/tests/language_2/string/no_operator_runtime_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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 'package:expect/expect.dart'; - -main() { - var x = "x"; - var y = "y"; - - - - - - - - - - - - - - - - -} diff --git a/tests/language_2/string/no_operator_test.dart b/tests/language_2/string/no_operator_test.dart deleted file mode 100644 index 5b3e4aa0ce1..00000000000 --- a/tests/language_2/string/no_operator_test.dart +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'package:expect/expect.dart'; - -main() { - var x = "x"; - var y = "y"; - Expect.throws(() => x < y); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '<' isn't defined for the class 'String'. - Expect.throws(() => x <= y); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '<=' isn't defined for the class 'String'. - Expect.throws(() => x > y); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '>' isn't defined for the class 'String'. - Expect.throws(() => x >= y); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '>=' isn't defined for the class 'String'. - Expect.throws(() => x - y); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '-' isn't defined for the class 'String'. - Expect.throws(() => x * y); - // ^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] A value of type 'String' can't be assigned to a variable of type 'int'. - Expect.throws(() => x / y); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '/' isn't defined for the class 'String'. - Expect.throws(() => x ~/ y); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '~/' isn't defined for the class 'String'. - Expect.throws(() => x % y); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '%' isn't defined for the class 'String'. - Expect.throws(() => x >> y); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '>>' isn't defined for the class 'String'. - Expect.throws(() => x << y); - // ^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '<<' isn't defined for the class 'String'. - Expect.throws(() => x & y); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '&' isn't defined for the class 'String'. - Expect.throws(() => x | y); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '|' isn't defined for the class 'String'. - Expect.throws(() => x ^ y); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '^' isn't defined for the class 'String'. - Expect.throws(() => -x); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator 'unary-' isn't defined for the class 'String'. - Expect.throws(() => ~x); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '~' isn't defined for the class 'String'. -} diff --git a/tests/language_2/string/optimizations_test.dart b/tests/language_2/string/optimizations_test.dart deleted file mode 100644 index 5c2bb9dee48..00000000000 --- a/tests/language_2/string/optimizations_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js's type inferrer, that used to not -// correctly infer optional named parameters. - -import "package:expect/expect.dart"; - -@pragma('vm:never-inline') -@pragma('dart2js:noInline') -foo({path}) { - () => 42; - return path.toString(); -} - -@pragma('vm:never-inline') -@pragma('dart2js:noInline') -bar({path}) { - () => 42; - return path; -} - -main() { - var a = [foo(path: '42'), foo(), 42, bar(path: '54')]; - Expect.isTrue(a[1] is String); - Expect.throwsNoSuchMethodError(() => bar().concat('54')); -} diff --git a/tests/language_2/string/raw_string_test.dart b/tests/language_2/string/raw_string_test.dart deleted file mode 100644 index cf9b1ce236b..00000000000 --- a/tests/language_2/string/raw_string_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// 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 - -// Note: This test relies on LF line endings in the source file. - -import "package:expect/expect.dart"; - -class RawStringTest { - static testMain() { - Expect.equals("abcd", r"abcd"); - Expect.equals("", r""); - Expect.equals("", r''); - Expect.equals("", r""""""); - Expect.equals("", r''''''); - Expect.equals("''''", r"''''"); - Expect.equals('""""', r'""""'); - Expect.equals( - "1\n2\n3", - r"""1 -2 -3"""); - Expect.equals( - "1\n2\n3", - r'''1 -2 -3'''); - Expect.equals( - "1", - r""" -1"""); - Expect.equals( - "1", - r''' -1'''); - Expect.equals("'", r"'"); - Expect.equals('"', r'"'); - Expect.equals("1", r"1"); - Expect.equals("1", r"1"); - Expect.equals("\$", r"$"); - Expect.equals("\\", r"\"); - Expect.equals("\\", r'\'); - Expect.equals("\${12}", r"${12}"); - Expect.equals("\\a\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\l\\m", - r"\a\b\c\d\e\f\g\h\i\j\k\l\m"); - Expect.equals("\\n\\o\\p\\q\\r\\s\\t\\u\\v\\w\\x\\y\\z", - r"\n\o\p\q\r\s\t\u\v\w\x\y\z"); - } -} - -main() { - RawStringTest.testMain(); -} diff --git a/tests/language_2/string/runtime_test.dart b/tests/language_2/string/runtime_test.dart deleted file mode 100644 index 561c2172d75..00000000000 --- a/tests/language_2/string/runtime_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. -// Replace with shared test once interface issues clarified. - -import "package:expect/expect.dart"; - -class StringTest { - static testMain() { - testCodePoints(); - testNoSuchMethod(); - testStringsJoin(); - testCharCodes(); - } - - static testCodePoints() { - String str = "string"; - for (int i = 0; i < str.length; i++) { - Expect.equals(true, str[i] is String); - Expect.equals(true, str.codeUnitAt(i) is int); - } - } - - static testStringsJoin() { - List a = new List.filled(2, null); - a[0] = "Hello"; - a[1] = "World"; - String s = a.join("*^*"); - Expect.equals("Hello*^*World", s); - } - - static testNoSuchMethod() { - String a = "Hello"; - - } - - static testCharCodes() { - String s = new String.fromCharCodes(const [0x41, 0xC1, 0x424]); - Expect.equals("A", s[0]); - Expect.equals(0x424, s.codeUnitAt(2)); - } -} - -main() { - StringTest.testMain(); -} diff --git a/tests/language_2/string/split_test.dart b/tests/language_2/string/split_test.dart deleted file mode 100644 index 6d855d069ab..00000000000 --- a/tests/language_2/string/split_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2012, 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. -// Issue 24043. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class EvilMatch implements Match { - int get start => 100000000; - int get end => 3; - bool noSuchMethod(Invocation im) => false; // To appease dartanalyzer. -} - -class EvilIterator implements Iterator { - bool moveNext() => true; - EvilMatch get current => new EvilMatch(); -} - -class EvilIterable extends Iterable { - get iterator => new EvilIterator(); -} - -class EvilPattern implements Pattern { - allMatches(String s, [int start = 0]) => new EvilIterable(); - bool noSuchMethod(Invocation im) => false; // To appease dartanalyzer. -} - -void main() { - Expect.throwsRangeError(() => "foo".split(new EvilPattern())[0].length); -} diff --git a/tests/language_2/string/string_test.dart b/tests/language_2/string/string_test.dart deleted file mode 100644 index ec67d921143..00000000000 --- a/tests/language_2/string/string_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// 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. -// Replace with shared test once interface issues clarified. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class StringTest { - static testMain() { - testCodePoints(); - testNoSuchMethod(); - testStringsJoin(); - testCharCodes(); - } - - static testCodePoints() { - String str = "string"; - for (int i = 0; i < str.length; i++) { - Expect.equals(true, str[i] is String); - Expect.equals(true, str.codeUnitAt(i) is int); - } - } - - static testStringsJoin() { - List a = new List.filled(2, null); - a[0] = "Hello"; - a[1] = "World"; - String s = a.join("*^*"); - Expect.equals("Hello*^*World", s); - } - - static testNoSuchMethod() { - String a = "Hello"; - a[1] = 12; -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR -// [cfe] The operator '[]=' isn't defined for the class 'String'. - } - - static testCharCodes() { - String s = new String.fromCharCodes(const [0x41, 0xC1, 0x424]); - Expect.equals("A", s[0]); - Expect.equals(0x424, s.codeUnitAt(2)); - } -} - -main() { - StringTest.testMain(); -} diff --git a/tests/language_2/string/substring_runtime_test.dart b/tests/language_2/string/substring_runtime_test.dart deleted file mode 100644 index 96591b15706..00000000000 --- a/tests/language_2/string/substring_runtime_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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 version of two-argument Ackermann-Peter function. - -import "package:expect/expect.dart"; - -main() { - try { - - - } on TypeError catch (e) { - // OK. - } on ArgumentError catch (e) { - // OK. - } -} diff --git a/tests/language_2/string/substring_test.dart b/tests/language_2/string/substring_test.dart deleted file mode 100644 index 6a64de4a985..00000000000 --- a/tests/language_2/string/substring_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// 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 version of two-argument Ackermann-Peter function. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - try { - print("abcdef".substring(1.5, 3.5)); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'double' can't be assigned to the parameter type 'int'. - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'double' can't be assigned to the parameter type 'int'. - Expect.fail("Should have thrown an exception"); - } on TypeError catch (e) { - // OK. - } on ArgumentError catch (e) { - // OK. - } -} diff --git a/tests/language_2/string/supertype_checked_test.dart b/tests/language_2/string/supertype_checked_test.dart deleted file mode 100644 index ef857a5ed6a..00000000000 --- a/tests/language_2/string/supertype_checked_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// This tests a bug in dart2js which caused the compiler to emit bad -// type assertions for supertypes of String. - -class A implements Comparable { - int value; - - A(this.value); - - int compareTo(Object other) { - A o = promote(other); - return value.compareTo(o.value); - } - - A promote(var other) { - return other; - } -} - -main() { - var a = new A(1); - var b = new A(2); - Expect.equals(-1, a.compareTo(b)); -} diff --git a/tests/language_2/string/unicode1_test.dart b/tests/language_2/string/unicode1_test.dart deleted file mode 100644 index 78443308648..00000000000 --- a/tests/language_2/string/unicode1_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// (backslash) uXXXX must have exactly 4 hex digits. - -main() { - var str = "Foo\u00"; - // ^^^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE_U_NO_BRACKET - // [cfe] An escape sequence starting with '\u' must be followed by 4 hexadecimal digits. - str = "Foo\uDEEMBar"; - // ^^^^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE_U_NO_BRACKET - // [cfe] An escape sequence starting with '\u' must be followed by 4 hexadecimal digits. -} diff --git a/tests/language_2/string/unicode2_test.dart b/tests/language_2/string/unicode2_test.dart deleted file mode 100644 index 6c2cb90e099..00000000000 --- a/tests/language_2/string/unicode2_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// \u{X*} should have 1-6 hex digits. - -main() { - var str = "Foo\u{}Bar"; - // ^^^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE_U_BRACKET - // [cfe] An escape sequence starting with '\u{' must be followed by 1 to 6 hexadecimal digits followed by a '}'. - str = "Foo\u{000000000}Bar"; - // ^^^^^^^^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE_U_BRACKET - // [cfe] An escape sequence starting with '\u{' must be followed by 1 to 6 hexadecimal digits followed by a '}'. - str = "Foo\u{DEAF!}Bar"; - // ^^^^^^^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_UNICODE_ESCAPE_U_BRACKET - // [cfe] An escape sequence starting with '\u{' must be followed by 1 to 6 hexadecimal digits followed by a '}'. -} diff --git a/tests/language_2/string/unicode3_test.dart b/tests/language_2/string/unicode3_test.dart deleted file mode 100644 index 8431e4e4f14..00000000000 --- a/tests/language_2/string/unicode3_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Backslash xXX must have exactly 2 hex digits. - -main() { - var str = "Foo\x0"; - // ^^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_HEX_ESCAPE - // [cfe] An escape sequence starting with '\x' must be followed by 2 hexadecimal digits. - str = "Foo\xF Bar"; - // ^^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_HEX_ESCAPE - // [cfe] An escape sequence starting with '\x' must be followed by 2 hexadecimal digits. -} diff --git a/tests/language_2/string/unicode4_test.dart b/tests/language_2/string/unicode4_test.dart deleted file mode 100644 index 701ac3e324d..00000000000 --- a/tests/language_2/string/unicode4_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Unicode escapes must refer to valid Unicode points and not surrogate -/// characters. - -main() { - var str = "Foo\u{FFFFFF}"; - // ^^^^^^^^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_CODE_POINT - // [cfe] The escape sequence starting with '\u' isn't a valid code point. - str = "Foo\uD800"; - str = "Foo\uDC00"; -} diff --git a/tests/language_2/string/unicode_bom_middle_test.dart b/tests/language_2/string/unicode_bom_middle_test.dart deleted file mode 100644 index ed98b3b6a19..00000000000 --- a/tests/language_2/string/unicode_bom_middle_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); - -foo(x) { - if (inscrutable(1999) == 1999) return x; - return 499; -} - -main() { - Expect.equals(3, "xx".length); // BOM character between the xs. - Expect.equals(3, foo("xx").length); // BOM character between the xs. -} diff --git a/tests/language_2/string/unicode_bom_test.dart b/tests/language_2/string/unicode_bom_test.dart deleted file mode 100644 index b81c494fa3f..00000000000 --- a/tests/language_2/string/unicode_bom_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// 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 - -// This file is saved with a BOM character (as first character). This character -// should be ignored. -// Tests that files with a BOM character are correctly handled. - -main() { - /* do nothing. */ -} diff --git a/tests/language_2/string/unicode_hash_test.dart b/tests/language_2/string/unicode_hash_test.dart deleted file mode 100644 index 78ae63ed2cf..00000000000 --- a/tests/language_2/string/unicode_hash_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -main() { - Expect.equals("\u{10412}", "𐐒"); // Second string is literal U+10412. - Expect.equals("\u{10412}".hashCode, "𐐒".hashCode); -} diff --git a/tests/language_2/subtyping_dynamic/README.md b/tests/language_2/subtyping_dynamic/README.md deleted file mode 100644 index 24c6b0da0cd..00000000000 --- a/tests/language_2/subtyping_dynamic/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Feature tests for the dynamic semantics of subtyping - -This directory was created in order to hold tests pertaining to the -dynamic behavior of Dart programs where it involves subtyping. diff --git a/tests/language_2/subtyping_static/README.md b/tests/language_2/subtyping_static/README.md deleted file mode 100644 index c634811db9a..00000000000 --- a/tests/language_2/subtyping_static/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Feature tests for static analysis involving subtyping - -This directory was created in order to hold tests pertaining to the -static analysis of Dart where it involves subtyping. diff --git a/tests/language_2/subtyping_static/future_or_subtype_test.dart b/tests/language_2/subtyping_static/future_or_subtype_test.dart deleted file mode 100644 index 611b8b01847..00000000000 --- a/tests/language_2/subtyping_static/future_or_subtype_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:async'; -import 'package:expect/expect.dart'; - -class A implements Future> { - @override - noSuchMethod(Invocation _) {} -} - -void main() { - Expect.notSubtype>(); - Expect.subtype, FutureOr>>(); -} diff --git a/tests/language_2/super/abstract_method_test.dart b/tests/language_2/super/abstract_method_test.dart deleted file mode 100644 index 69fbc56b119..00000000000 --- a/tests/language_2/super/abstract_method_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that a method overridden by an abstract method is called at -// runtime. - -import "package:expect/expect.dart"; - -class Base { - foo() => 42; -} - -abstract class A extends Base { - foo(); -} - -class B extends A { - testSuperCall() => super.foo(); - foo() => - 42; // required since if is removed, then a warning is introduced on 'B' above -} - -main() { - Expect.equals(42, new B().foo()); - Expect.equals(42, new B().testSuperCall()); -} diff --git a/tests/language_2/super/additional_interface_adds_optional_args_supercall_test.dart b/tests/language_2/super/additional_interface_adds_optional_args_supercall_test.dart deleted file mode 100644 index 00bb09c960b..00000000000 --- a/tests/language_2/super/additional_interface_adds_optional_args_supercall_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2017, 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 - -class A { - void foo() {} -} - -abstract class I { - void foo([x]); -} - -abstract class B extends A implements I { - // If this class were concrete, there would be a problem, since `new - // B().foo(42)` would be statically allowed, but would lead to invalid - // arguments being passed to A.foo. But since the class is abstract, there is - // no problem. -} - -class C extends B { - void foo([x]) { - // But it is a problem to try to pass `x` along to super, since the super - // method is A.foo. - super.foo(x); - // ^ - // [cfe] Too many positional arguments: 0 allowed, but 1 found. - // ^ - // [analyzer] COMPILE_TIME_ERROR.EXTRA_POSITIONAL_ARGUMENTS - } -} - -void f(B b) { - b.foo(42); -} - -main() { - f(new C()); -} diff --git a/tests/language_2/super/all_named_constructor_test.dart b/tests/language_2/super/all_named_constructor_test.dart deleted file mode 100644 index 5040d7c127f..00000000000 --- a/tests/language_2/super/all_named_constructor_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// 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 test for testing implicit invocation of super constructor with all -// named parameters. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -var res = 0; - -class A { - A([v = 1]) { - res += v; - } -} - -class B extends A { - B([v = 2]) { - res += v; - } -} - -main() { - new B(); - Expect.equals(3, res); -} diff --git a/tests/language_2/super/assign_runtime_test.dart b/tests/language_2/super/assign_runtime_test.dart deleted file mode 100644 index 1cc6f77e6b9..00000000000 --- a/tests/language_2/super/assign_runtime_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -class A { - int x; -} - -class C extends A { - void setX(int value) { - super.x = value; - } -} - -main() { - A a = new C(); - a.x = 37; - -} diff --git a/tests/language_2/super/assign_test.dart b/tests/language_2/super/assign_test.dart deleted file mode 100644 index 9143fbd70a8..00000000000 --- a/tests/language_2/super/assign_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012, 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 - -class A { - int x; -} - -class C extends A { - void setX(int value) { - super.x = value; - } -} - -main() { - A a = new C(); - a.x = 37; - a.setX(42); - //^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD - // [cfe] The method 'setX' isn't defined for the class 'A'. -} diff --git a/tests/language_2/super/bound_closure_test.dart b/tests/language_2/super/bound_closure_test.dart deleted file mode 100644 index 439a7e8449a..00000000000 --- a/tests/language_2/super/bound_closure_test.dart +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -class A { - bar([var optional = 1]) => 498 + optional; - bar2({namedOptional: 2}) => 40 + namedOptional; - bar3(x, [var optional = 3]) => x + 498 + optional; - bar4(x, {namedOptional: 4}) => 422 + x + namedOptional; - - // Gee is the same as bar, but we make sure that gee is used. Potentially - // this yields different code if the redirecting stub exists. - gee([var optional = 1]) => 498 + optional; - gee2({namedOptional: 2}) => 40 + namedOptional; - gee3(x, [var optional = 3]) => x + 498 + optional; - gee4(x, {namedOptional: 4}) => 422 + x + namedOptional; - - // Use identifiers that could be intercepted. - add([var optional = 33]) => 1234 + optional; - trim({namedOptional: 22}) => 1313 + namedOptional; - sublist(x, [optional = 44]) => 4321 + optional + x; - splitMapJoin(x, {onMatch: 55, onNonMatch: 66}) => - 111 + x + onMatch + onNonMatch; - - // Other interceptable identifiers, but all of them are used. - shuffle([var optional = 121]) => 12342 + optional; - toList({growable: 2233}) => 13131 + growable; - lastIndexOf(x, [optional = 424]) => 14321 + optional + x; - lastWhere(x, {orElse: 555}) => x + 1213 + 555; -} - -class B extends A { - // The closure `super.bar` is invoked without the optional argument. - // Dart2js must not generate a `bar$0 => bar$1(null)` closure, since that - // would redirect to B's `bar$1`. Instead it must enforce that `bar$0` in - // `A` redirects to A's bar$1. - foo() => confuse(super.bar)(); - foo2() => confuse(super.bar)(2); - foo3() => confuse(super.bar2)(); - foo4() => confuse(super.bar2)(namedOptional: 77); - foo5() => confuse(super.bar3)(-3); - foo6() => confuse(super.bar3)(-11, -19); - foo7() => confuse(super.bar4)(0); - foo8() => confuse(super.bar4)(3, namedOptional: 77); - - fooGee() => confuse(super.gee)(); - fooGee2() => confuse(super.gee)(2); - fooGee3() => confuse(super.gee2)(); - fooGee4() => confuse(super.gee2)(namedOptional: 77); - fooGee5() => confuse(super.gee3)(-3); - fooGee6() => confuse(super.gee3)(-11, -19); - fooGee7() => confuse(super.gee4)(0); - fooGee8() => confuse(super.gee4)(3, namedOptional: 77); - - fooIntercept() => confuse(super.add)(); - fooIntercept2() => confuse(super.add)(2); - fooIntercept3() => confuse(super.trim)(); - fooIntercept4() => confuse(super.trim)(namedOptional: 77); - fooIntercept5() => confuse(super.sublist)(-3); - fooIntercept6() => confuse(super.sublist)(-11, -19); - fooIntercept7() => confuse(super.splitMapJoin)(0); - fooIntercept8() => confuse(super.splitMapJoin)(3, onMatch: 77, onNonMatch: 8); - - fooIntercept21() => confuse(super.shuffle)(); - fooIntercept22() => confuse(super.shuffle)(2); - fooIntercept23() => confuse(super.toList)(); - fooIntercept24() => confuse(super.toList)(growable: 77); - fooIntercept25() => confuse(super.lastIndexOf)(-3); - fooIntercept26() => confuse(super.lastIndexOf)(-11, -19); - fooIntercept27() => confuse(super.lastWhere)(0); - fooIntercept28() => confuse(super.lastWhere)(3, orElse: 77); - - // Warning: overrides should not change default parameter values. - bar([var optional]) => -1; // //# 01: ok - bar2({namedOptional}) => -1; // //# 01: continued - bar3(x, [var optional]) => -1; // //# 01: continued - bar4(x, {namedOptional}) => -1; //# 01: continued - - gee([var optional]) => -1; // //# 01: continued - gee2({namedOptional}) => -1; // //# 01: continued - gee3(x, [var optional]) => -1; // //# 01: continued - gee4(x, {namedOptional}) => -1; //# 01: continued - - add([var optional = 33]) => -1; - trim({namedOptional: 22}) => -1; - sublist(x, [optional = 44]) => -1; - splitMapJoin(x, {onMatch: 55, onNonMatch: 66}) => -1; - - shuffle([var optional = 121]) => -1; - toList({growable: 2233}) => -1; - lastIndexOf(x, [optional = 424]) => -1; - lastWhere(x, {orElse: 555}) => -1; -} - -confuse(x) { - if (new DateTime.now().millisecondsSinceEpoch == 42) return confuse(x - 1); - return x; -} - -main() { - var list = [new A(), new B(), [], "foo"]; - var a = list[confuse(0)]; - dynamic b = list[confuse(1)]; - var ignored = list[confuse(2)]; - var ignored2 = list[confuse(3)]; - - var t = b.gee() + b.gee2() + b.gee3(9) + b.gee4(19); - Expect.equals(-4, t); //# 01: continued - t = b.shuffle() + b.toList() + b.lastIndexOf(1) + b.lastWhere(2); - Expect.equals(-4, t); - - Expect.equals(499, b.foo()); // //# 01: continued - Expect.equals(500, b.foo2()); //# 01: continued - Expect.equals(42, b.foo3()); // //# 01: continued - Expect.equals(117, b.foo4()); //# 01: continued - Expect.equals(498, b.foo5()); //# 01: continued - Expect.equals(468, b.foo6()); //# 01: continued - Expect.equals(426, b.foo7()); //# 01: continued - Expect.equals(502, b.foo8()); //# 01: continued - - Expect.equals(499, b.fooGee()); // //# 01: continued - Expect.equals(500, b.fooGee2()); //# 01: continued - Expect.equals(42, b.fooGee3()); // //# 01: continued - Expect.equals(117, b.fooGee4()); //# 01: continued - Expect.equals(498, b.fooGee5()); //# 01: continued - Expect.equals(468, b.fooGee6()); //# 01: continued - Expect.equals(426, b.fooGee7()); //# 01: continued - Expect.equals(502, b.fooGee8()); //# 01: continued - - Expect.equals(1267, b.fooIntercept()); - Expect.equals(1236, b.fooIntercept2()); - Expect.equals(1335, b.fooIntercept3()); - Expect.equals(1390, b.fooIntercept4()); - Expect.equals(4362, b.fooIntercept5()); - Expect.equals(4291, b.fooIntercept6()); - Expect.equals(232, b.fooIntercept7()); - Expect.equals(199, b.fooIntercept8()); - - Expect.equals(12463, b.fooIntercept21()); - Expect.equals(12344, b.fooIntercept22()); - Expect.equals(15364, b.fooIntercept23()); - Expect.equals(13208, b.fooIntercept24()); - Expect.equals(14742, b.fooIntercept25()); - Expect.equals(14291, b.fooIntercept26()); - Expect.equals(1768, b.fooIntercept27()); - Expect.equals(1771, b.fooIntercept28()); -} diff --git a/tests/language_2/super/call2_test.dart b/tests/language_2/super/call2_test.dart deleted file mode 100644 index 8153c6243b0..00000000000 --- a/tests/language_2/super/call2_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// 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 - -// Regresion test for bug discovered in frog handling super calls: the test case -// mixes generics, super calls, and purposely doesn't allocate the base type. -// -// Also is a regression test for https://github.com/dart-lang/sdk/issues/31973 - -import 'package:expect/expect.dart'; - -class C { - foo(T a) {} -} - -class D extends C { - foo(T a) { - super.foo(a); // used to be resolved incorrectly and generate this.foo(a). - } -} - -class A { - static int _value; - Function foo = (int x) => _value = x + 1; -} - -class B extends A { - void m(int x) { - super.foo(x); - } -} - -main() { - var d = new D(); - d.foo(null); - - var b = new B(); - b.m(41); - Expect.equals(42, A._value); -} diff --git a/tests/language_2/super/call3_runtime_test.dart b/tests/language_2/super/call3_runtime_test.dart deleted file mode 100644 index 0b63e6c9ed4..00000000000 --- a/tests/language_2/super/call3_runtime_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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 test for testing implicit super calls with bad arguments or no default -// constructor in super class. - -import "package:expect/expect.dart"; - -class A { - A( - - ); - final foo = 499; -} - -class B extends A {} - -class B2 extends A { - B2(); - B2.named() : this.x = 499; - var x; -} - -class C { - C - - (); - final foo = 499; -} - -class D extends C {} - -class D2 extends C { - D2(); - D2.named() : this.x = 499; - var x; -} - -main() { - Expect.equals(499, new B().foo); - Expect.equals(499, new B2().foo); - Expect.equals(499, new B2.named().foo); - Expect.equals(499, new D().foo); - Expect.equals(499, new D2().foo); - Expect.equals(499, new D2.named().foo); -} diff --git a/tests/language_2/super/call3_test.dart b/tests/language_2/super/call3_test.dart deleted file mode 100644 index eab93d94f6f..00000000000 --- a/tests/language_2/super/call3_test.dart +++ /dev/null @@ -1,70 +0,0 @@ -// 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 test for testing implicit super calls with bad arguments or no default -// constructor in super class. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - A( - this.x -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD -// ^ -// [cfe] 'x' isn't an instance field of this class. - ); - final foo = 499; -} - -class B extends A {} -// ^ -// [analyzer] COMPILE_TIME_ERROR.NO_DEFAULT_SUPER_CONSTRUCTOR -// [cfe] The superclass, 'A', has no unnamed constructor that takes no arguments. - -class B2 extends A { - B2(); -//^^ -// [analyzer] COMPILE_TIME_ERROR.NO_DEFAULT_SUPER_CONSTRUCTOR -// [cfe] The superclass, 'A', has no unnamed constructor that takes no arguments. - B2.named() : this.x = 499; -//^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NO_DEFAULT_SUPER_CONSTRUCTOR -// [cfe] The superclass, 'A', has no unnamed constructor that takes no arguments. - var x; -} - -class C { - C - .named - (); - final foo = 499; -} - -class D extends C {} -// ^ -// [analyzer] COMPILE_TIME_ERROR.NO_DEFAULT_SUPER_CONSTRUCTOR -// [cfe] The superclass, 'C', has no unnamed constructor that takes no arguments. - -class D2 extends C { - D2(); -//^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER -// [cfe] The superclass, 'C', has no unnamed constructor that takes no arguments. - D2.named() : this.x = 499; -//^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER -// [cfe] The superclass, 'C', has no unnamed constructor that takes no arguments. - var x; -} - -main() { - Expect.equals(499, new B().foo); - Expect.equals(499, new B2().foo); - Expect.equals(499, new B2.named().foo); - Expect.equals(499, new D().foo); - Expect.equals(499, new D2().foo); - Expect.equals(499, new D2.named().foo); -} diff --git a/tests/language_2/super/call4_test.dart b/tests/language_2/super/call4_test.dart deleted file mode 100644 index c0712366a4c..00000000000 --- a/tests/language_2/super/call4_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class C { - bool foo(); - bool bar(int a); - bool baz({int b}); - bool boz(int a, {int c}); - - bool noSuchMethod(Invocation im) => true; -} - -class D extends C { - bool noSuchMethod(Invocation im) => false; - - // `super.foo()` et al. will statically use [C]'s [noSuchMethod] forwarder, - // but the forwarder will (virtually) call [D]'s [noSuchMethod] at runtime. - - test1() { - return super.foo(); - } - - test2() { - return super.bar(1); - } - - test3() { - return super.baz(b: 2); - } - - test4() { - return super.boz(1, c: 2); - } -} - -main() { - var d = new D(); - Expect.isFalse(d.test1()); - Expect.isFalse(d.test2()); - Expect.isFalse(d.test3()); - Expect.isFalse(d.test4()); -} diff --git a/tests/language_2/super/call_test.dart b/tests/language_2/super/call_test.dart deleted file mode 100644 index bb2accafe55..00000000000 --- a/tests/language_2/super/call_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// 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 test for testing super calls - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - A() : field = 0 {} - int field; - incrField() { - field++; - } - - timesX(v) { - return v * 2; - } -} - -class B extends A { - incrField() { - field++; - super.incrField(); - } - - timesX(v) { - return super.timesX(v) * 3; - } - - B() : super() {} -} - -class SuperCallTest { - static testMain() { - var b = new B(); - b.incrField(); - Expect.equals(2, b.field); - Expect.equals(12, b.timesX(2)); - } -} - -main() { - SuperCallTest.testMain(); -} diff --git a/tests/language_2/super/closure_test.dart b/tests/language_2/super/closure_test.dart deleted file mode 100644 index f58daa1de3c..00000000000 --- a/tests/language_2/super/closure_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Dart test program for testing access to super from closure. - -class Super { - var superX = "super"; - get x => superX; -} - -class Sub extends Super { - var subX = "sub"; - get x => subX; - - buildClosures() => [() => x, () => this.x, () => super.x]; -} - -main() { - var closures = new Sub().buildClosures(); - Expect.equals(3, closures.length); - Expect.equals("sub", closures[0]()); - Expect.equals("sub", closures[1]()); - Expect.equals("super", closures[2]()); -} diff --git a/tests/language_2/super/conditional_operator_runtime_test.dart b/tests/language_2/super/conditional_operator_runtime_test.dart deleted file mode 100644 index f7fb940fceb..00000000000 --- a/tests/language_2/super/conditional_operator_runtime_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify that the ?. operator cannot be used with "super". - -class B { - B(); - B.namedConstructor(); - var field = 1; - method() => 1; -} - -class C extends B { - C() - - ; - - test() { - - - - - - - - - - - - - - - - - - } -} - -main() { - new C().test(); -} diff --git a/tests/language_2/super/conditional_operator_test.dart b/tests/language_2/super/conditional_operator_test.dart deleted file mode 100644 index de79c9296ac..00000000000 --- a/tests/language_2/super/conditional_operator_test.dart +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) 2015, 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 - -// Verify that the ?. operator cannot be used with "super". - -class B { - B(); - B.namedConstructor(); - var field = 1; - method() => 1; -} - -class C extends B { - C() - : super?.namedConstructor() - // ^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER - // [cfe] Cannot use '?.' here. - // ^ - // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. - ; - - test() { - super?.field = 1; - // ^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER - // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. - super?.field += 1; - // ^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER - // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. - super?.field ??= 1; - // ^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER - // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. - super?.field; - // ^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER - // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. - 1 * super?.field; - // ^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER - // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. - -super?.field; - // ^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER - // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. - ~super?.field; - // ^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER - // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. - !super?.field; -// ^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_BOOL_NEGATION_EXPRESSION -// ^^ -// [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER -// [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. -// ^ -// [cfe] A value of type 'int' can't be assigned to a variable of type 'bool'. - --super?.field; - // ^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER - // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. - ++super?.field; - // ^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER - // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. - super?.method(); - // ^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER - // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. - 1 * super?.method(); - // ^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER - // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. - -super?.method(); - // ^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER - // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. - ~super?.method(); - // ^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER - // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. - !super?.method(); - // ^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER - // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. - --super?.method(); - // ^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER - // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. - // ^ - // [cfe] Can't assign to this. - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR - ++super?.method(); - // ^^ - // [analyzer] SYNTACTIC_ERROR.INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER - // [cfe] The operator '?.' cannot be used with 'super' because 'super' cannot be null. - // ^ - // [cfe] Can't assign to this. - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR - } -} - -main() { - new C().test(); -} diff --git a/tests/language_2/super/field_2_test.dart b/tests/language_2/super/field_2_test.dart deleted file mode 100644 index 086a4f50fa9..00000000000 --- a/tests/language_2/super/field_2_test.dart +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A { - var foo; - A(this.foo); - - B_Sfoo() => 'A.B_Sfoo()'; -} - -class B extends A { - B(x) : super(x); - - B_Sfoo() => super.foo; - BC_Sfoo() => super.foo; - BCD_Sfoo() => super.foo; -} - -class C extends B { - var foo; - C(x, this.foo) : super(x); - - BC_Sfoo() => super.foo; - BCD_Sfoo() => super.foo; -} - -class D extends C { - D(x, y) : super(x, y); - - BCD_Sfoo() => super.foo; -} - -var inscrutable; - -main() { - inscrutable = (x) => x; - - var b = new B('Ba'); - var c = new C('Ca', 'Cc'); - var d = new D('Da', 'Dc'); - - // Check access via plain getter. - var b_bc = inscrutable(true) ? b : c; // B, but compiler thinks can also be C - var c_bc = inscrutable(true) ? c : b; // C, but compiler thinks can also be B - - Expect.equals('Ba', b.foo); - Expect.equals('Cc', c.foo); - Expect.equals('Dc', d.foo); - Expect.equals('Ba', b_bc.foo); - Expect.equals('Cc', c_bc.foo); - - Expect.equals('Ba', inscrutable(b).foo); - Expect.equals('Cc', inscrutable(c).foo); - Expect.equals('Dc', inscrutable(d).foo); - Expect.equals('Ba', inscrutable(b_bc).foo); - Expect.equals('Cc', inscrutable(c_bc).foo); - - // Check access via super.foo in various contexts - Expect.equals('Ba', b.B_Sfoo()); - Expect.equals('Ca', c.B_Sfoo()); - Expect.equals('Da', d.B_Sfoo()); - - Expect.equals('Ba', b.BC_Sfoo()); - Expect.equals('Ca', c.BC_Sfoo()); - Expect.equals('Da', d.BC_Sfoo()); - - Expect.equals('Ba', b.BCD_Sfoo()); - Expect.equals('Ca', c.BCD_Sfoo()); - Expect.equals('Dc', d.BCD_Sfoo()); - - Expect.equals('Ba', inscrutable(b).B_Sfoo()); - Expect.equals('Ca', inscrutable(c).B_Sfoo()); - Expect.equals('Da', inscrutable(d).B_Sfoo()); - - Expect.equals('Ba', inscrutable(b).BC_Sfoo()); - Expect.equals('Ca', inscrutable(c).BC_Sfoo()); - Expect.equals('Da', inscrutable(d).BC_Sfoo()); - - Expect.equals('Ba', inscrutable(b).BCD_Sfoo()); - Expect.equals('Ca', inscrutable(c).BCD_Sfoo()); - Expect.equals('Dc', inscrutable(d).BCD_Sfoo()); -} diff --git a/tests/language_2/super/field_access_test.dart b/tests/language_2/super/field_access_test.dart deleted file mode 100644 index d5fcbdfe866..00000000000 --- a/tests/language_2/super/field_access_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - int foo; - A(this.foo); - - raw$foo() => foo; - this$foo() => this.foo; -} - -class B extends A { - int foo; - B.b1(x, this.foo) : super(x); - B.b2(x, y) - : this.foo = y, - super(x); - B.b3(x, y) - : this.foo = y, - super(x); - - super$foo() => super.foo; - sum() => foo + super.foo; -} - -test(b) { - Expect.equals(10, b.foo); - Expect.equals(10, b.raw$foo()); - Expect.equals(10, b.this$foo()); - Expect.equals(100, b.super$foo()); - Expect.equals(110, b.sum()); -} - -main() { - test(new B.b1(100, 10)); - test(new B.b2(100, 10)); - test(new B.b3(100, 10)); -} diff --git a/tests/language_2/super/field_test.dart b/tests/language_2/super/field_test.dart deleted file mode 100644 index 27544dcf7c4..00000000000 --- a/tests/language_2/super/field_test.dart +++ /dev/null @@ -1,58 +0,0 @@ -// 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 test for testing super field access. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - A() { - city = "Bern"; - } - String greeting() { - return "Gruezi"; - } - - String city; -} - -class B extends A { - B() : super() {} - String greeting() { - return "Hola " + super.greeting(); - } -} - -class C extends B { - C() : super() {} - String greeting() { - return "Servus " + super.greeting(); - } - - String get city { - return "Basel " + super.city; - } -} - -class SuperFieldTest { - static testMain() { - A a = new A(); - B b = new B(); - C c = new C(); - Expect.equals("Gruezi", a.greeting()); - Expect.equals("Hola Gruezi", b.greeting()); - Expect.equals("Servus Hola Gruezi", c.greeting()); - - Expect.equals("Bern", a.city); - Expect.equals("Bern", b.city); - Expect.equals("Basel Bern", c.city); - c.city = "Zurich"; - Expect.equals("Basel Zurich", c.city); - } -} - -main() { - SuperFieldTest.testMain(); -} diff --git a/tests/language_2/super/from_constructor_test.dart b/tests/language_2/super/from_constructor_test.dart deleted file mode 100644 index 9de3a0684f1..00000000000 --- a/tests/language_2/super/from_constructor_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -final results = []; - -int invoke(int f()) => f(); - -class Base { - var f; - var z; - - m(x) => results.add(x); - - int g() { - return 42; - } -} - -class C extends Base { - final Iterable _iter; - - C(this._iter) { - _iter.map((x) => super.m(x)).toList(); - super.f = _iter; - z = invoke(super.g); - } - - int g() { - return -1; - } -} - -main() { - var c = new C([1, 2, 3]); - Expect.listEquals([1, 2, 3], results); - Expect.listEquals([1, 2, 3], c.f); - Expect.equals(42, c.z); -} diff --git a/tests/language_2/super/implicit_closure_test.dart b/tests/language_2/super/implicit_closure_test.dart deleted file mode 100644 index 0e4268c5666..00000000000 --- a/tests/language_2/super/implicit_closure_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// 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 test program for testing invocation of implicit closures. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class BaseClass { - BaseClass(this._i) {} - int foo() { - return _i; - } - - int _i; -} - -class DerivedClass extends BaseClass { - DerivedClass(this._y, int j) : super(j) {} - int foo() { - return _y; - } - - getSuper() { - return super.foo; - } - - int _y; -} - -class SuperImplicitClosureTest { - static void testMain() { - DerivedClass obj = new DerivedClass(20, 10); - - var ib = obj.foo; - Expect.equals(obj._y, ib()); - - ib = obj.getSuper(); - Expect.equals(obj._i, ib()); - } -} - -main() { - SuperImplicitClosureTest.testMain(); -} diff --git a/tests/language_2/super/in_async1_test.dart b/tests/language_2/super/in_async1_test.dart deleted file mode 100644 index 63b5200124a..00000000000 --- a/tests/language_2/super/in_async1_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -import 'dart:async'; - -class A { - Future foo() async => 42; -} - -class B extends A { - Future foo() async { - var x = await super.foo(); - return x + 1; - } -} - -main() async { - Expect.equals(43, await new B().foo()); -} diff --git a/tests/language_2/super/in_async2_test.dart b/tests/language_2/super/in_async2_test.dart deleted file mode 100644 index adb3f41c468..00000000000 --- a/tests/language_2/super/in_async2_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -import 'dart:async'; - -class A { - Future foo() async => 42; -} - -class B extends A { - Future foo() async { - var x = await super.foo(); - var y = await super.foo(); - return x + y; - } -} - -main() async { - Expect.equals(84, await new B().foo()); -} diff --git a/tests/language_2/super/in_async3_test.dart b/tests/language_2/super/in_async3_test.dart deleted file mode 100644 index e6927caa48a..00000000000 --- a/tests/language_2/super/in_async3_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -import 'dart:async'; - -class A { - Future foo(T x) async => x; -} - -class B extends A { - Future bar() async { - var x = await super.foo(41); - return x + 1; - } -} - -main() async { - Expect.equals(42, await new B().bar()); -} diff --git a/tests/language_2/super/in_async4_test.dart b/tests/language_2/super/in_async4_test.dart deleted file mode 100644 index a866b5493a8..00000000000 --- a/tests/language_2/super/in_async4_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -import 'dart:async'; - -class A { - Future foo({T x}) async => x; -} - -class B extends A { - Future bar() async { - var x = await super.foo(x: 41); - return x + 1; - } -} - -main() async { - Expect.equals(42, await new B().bar()); -} diff --git a/tests/language_2/super/in_async5_test.dart b/tests/language_2/super/in_async5_test.dart deleted file mode 100644 index 344769ad163..00000000000 --- a/tests/language_2/super/in_async5_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -import 'dart:async'; - -class A { - Future get foo async => 42; -} - -class B extends A { - Future bar() async { - var x = await super.foo; - return x + 1; - } -} - -main() async { - Expect.equals(43, await new B().bar()); -} diff --git a/tests/language_2/super/in_async6_test.dart b/tests/language_2/super/in_async6_test.dart deleted file mode 100644 index a610ff75767..00000000000 --- a/tests/language_2/super/in_async6_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -import 'dart:async'; - -class A { - Future foo(int x, int y, int z) async => x + y + z; -} - -class B extends A { - Future foo(int x, int y, int z) async { - var w = await super.foo(x, y, z); - return w + 1; - } -} - -main() async { - Expect.equals(7, await new B().foo(1, 2, 3)); -} diff --git a/tests/language_2/super/in_constructor_test.dart b/tests/language_2/super/in_constructor_test.dart deleted file mode 100644 index a2c4b7846c8..00000000000 --- a/tests/language_2/super/in_constructor_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class Foo { - bool myBoolean = false; - - void set foo(bool b) { - print("Setting foo in Foo"); - myBoolean = b; - } -} - -class Baz extends Foo { - Baz() { - super.foo = true; - Expect.equals(true, super.myBoolean); - } -} - -main() { - new Baz(); -} diff --git a/tests/language_2/super/in_finally_test.dart b/tests/language_2/super/in_finally_test.dart deleted file mode 100644 index cbeaa2b2ee4..00000000000 --- a/tests/language_2/super/in_finally_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -class A { - T foo({T x}) => x; -} - -class B extends A { - int bar() { - try { - throw 'bar'; - return 1; - } finally { - var x = super.foo(x: 41); - return x + 1; - } - } -} - -main() { - Expect.equals(42, new B().bar()); -} diff --git a/tests/language_2/super/inferrer_test.dart b/tests/language_2/super/inferrer_test.dart deleted file mode 100644 index 56c16b61846..00000000000 --- a/tests/language_2/super/inferrer_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that dart2js's backend type inference handles super calls. - -import "package:expect/expect.dart"; - -class A { - foo(a) => a + 42; -} - -class B extends A { - bar() { - super.foo(null); - } -} - -var a = [new A()]; - -main() { - analyzeFirst(); - analyzeSecond(); -} - -analyzeFirst() { - Expect.equals(84, a[0].foo(42)); -} - -analyzeSecond() { - Expect.throwsNoSuchMethodError(() => new B().bar()); -} diff --git a/tests/language_2/super/mixin_test.dart b/tests/language_2/super/mixin_test.dart deleted file mode 100644 index 9cccbb73ffc..00000000000 --- a/tests/language_2/super/mixin_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2015, 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 - -// Dart2js regression test: Test that the type mask for non-null exact Mixin is -// created for Mixin.getter. - -import 'package:expect/expect.dart'; - -class Mixin { - @pragma('dart2js:noInline') - get getter => 42; -} - -class Superclass {} - -class Subclass extends Superclass with Mixin { - method() => super.getter; -} - -void main() { - Expect.equals(42, new Subclass().method()); -} diff --git a/tests/language_2/super/no_such_method1_test.dart b/tests/language_2/super/no_such_method1_test.dart deleted file mode 100644 index 6d61f6c073b..00000000000 --- a/tests/language_2/super/no_such_method1_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'package:expect/expect.dart'; - -class A { - int foo(); - noSuchMethod(im) => 42; -} - -class B extends A { - noSuchMethod(im) => 87; - - int foo() => super.foo(); -} - -main() { - Expect.equals(87, new B().foo()); -} diff --git a/tests/language_2/super/no_such_method2_test.dart b/tests/language_2/super/no_such_method2_test.dart deleted file mode 100644 index a43b1a81a0b..00000000000 --- a/tests/language_2/super/no_such_method2_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'package:expect/expect.dart'; - -class A { - int get foo; - noSuchMethod(im) => 42; -} - -class B extends A { - noSuchMethod(im) => 87; - - get foo => super.foo; -} - -main() { - Expect.equals(87, new B().foo); -} diff --git a/tests/language_2/super/no_such_method3_test.dart b/tests/language_2/super/no_such_method3_test.dart deleted file mode 100644 index 7a724977e2a..00000000000 --- a/tests/language_2/super/no_such_method3_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'package:expect/expect.dart'; - -var result; - -class A { - set foo(int a); - - noSuchMethod(im) { - result = 42; - } -} - -class B extends A { - noSuchMethod(im) { - result = 87; - } - - set foo(v) => super.foo = v; -} - -main() { - new B().foo = 0; - Expect.equals(87, result); -} diff --git a/tests/language_2/super/no_such_method4_runtime_test.dart b/tests/language_2/super/no_such_method4_runtime_test.dart deleted file mode 100644 index fff4dee2c5c..00000000000 --- a/tests/language_2/super/no_such_method4_runtime_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2016, 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 'package:expect/expect.dart'; - -class A { - int foo(); - - noSuchMethod(im) => 42; -} - -class B extends Object with A { - noSuchMethod(im) => 87; - - -} - -main() { - Expect.equals(87, new B().foo()); -} diff --git a/tests/language_2/super/no_such_method4_test.dart b/tests/language_2/super/no_such_method4_test.dart deleted file mode 100644 index c3bc167bfd9..00000000000 --- a/tests/language_2/super/no_such_method4_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'package:expect/expect.dart'; - -class A { - int foo(); - - noSuchMethod(im) => 42; -} - -class B extends Object with A { - noSuchMethod(im) => 87; - - foo() => super.foo(); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.ABSTRACT_SUPER_MEMBER_REFERENCE - // [cfe] Superclass has no method named 'foo'. -} - -main() { - Expect.equals(87, new B().foo()); -} diff --git a/tests/language_2/super/no_such_method5_runtime_test.dart b/tests/language_2/super/no_such_method5_runtime_test.dart deleted file mode 100644 index c76f43dc936..00000000000 --- a/tests/language_2/super/no_such_method5_runtime_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2016, 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 'package:expect/expect.dart'; - -class A { - int foo(); - - noSuchMethod(im) => 42; -} - -class B extends Object with A { - -} - -main() { - Expect.equals(42, new B().foo()); -} diff --git a/tests/language_2/super/no_such_method5_test.dart b/tests/language_2/super/no_such_method5_test.dart deleted file mode 100644 index 67e29b0ef97..00000000000 --- a/tests/language_2/super/no_such_method5_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'package:expect/expect.dart'; - -class A { - int foo(); - - noSuchMethod(im) => 42; -} - -class B extends Object with A { - foo() => super.foo(); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.ABSTRACT_SUPER_MEMBER_REFERENCE - // [cfe] Superclass has no method named 'foo'. -} - -main() { - Expect.equals(42, new B().foo()); -} diff --git a/tests/language_2/super/non_const_test.dart b/tests/language_2/super/non_const_test.dart deleted file mode 100644 index 8ee25dcd240..00000000000 --- a/tests/language_2/super/non_const_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Check fails because const class extends from non const class. - -class Base { - Base() {} -} - -class Sub extends Base { - const Sub(a) : a_ = a; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER - // [cfe] A constant constructor can't call a non-constant super constructor. - final a_; -} - -main() { - Sub(0); -} diff --git a/tests/language_2/super/operator_index2_test.dart b/tests/language_2/super/operator_index2_test.dart deleted file mode 100644 index 1665c90b640..00000000000 --- a/tests/language_2/super/operator_index2_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test for super indexing operations. - -import "package:expect/expect.dart"; - -class A { - var map = new Map(); - operator []=(a, b) { - map[a] = b; - } - - operator [](a) => map[a]; -} - -class B extends A { - foo() { - super[4] = 42; - Expect.equals(42, super[4]); - super[4] += 5; - Expect.equals(47, super[4]); - } -} - -main() { - new B().foo(); -} diff --git a/tests/language_2/super/operator_index3_test.dart b/tests/language_2/super/operator_index3_test.dart deleted file mode 100644 index 8928b36254e..00000000000 --- a/tests/language_2/super/operator_index3_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test for operator[]= resolved in super class. - -import "package:expect/expect.dart"; - -class A { - var indexField = new List.filled(2, null); - operator []=(index, value) { - indexField[index] = value; - } -} - -class B extends A { - operator [](index) => indexField[index]; -} - -class C extends B { - test() { - Expect.equals(42, super[0] = 42); - Expect.equals(42, super[0]); - Expect.equals(43, super[0] += 1); - Expect.equals(43, super[0]); - Expect.equals(43, super[0]++); - Expect.equals(44, super[0]); - - Expect.equals(2, super[0] = 2); - Expect.equals(2, super[0]); - Expect.equals(3, super[0] += 1); - Expect.equals(3, super[0]); - Expect.equals(3, super[0]++); - Expect.equals(4, super[0]); - } -} - -main() { - new C().test(); -} diff --git a/tests/language_2/super/operator_index4_test.dart b/tests/language_2/super/operator_index4_test.dart deleted file mode 100644 index 903aac4ff7d..00000000000 --- a/tests/language_2/super/operator_index4_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test for operator[] resolved in the super class. - -import "package:expect/expect.dart"; - -class A { - var indexField = new List.filled(2, null); - operator [](index) => indexField[index]; -} - -class B extends A { - operator []=(index, value) { - indexField[index] = value; - } -} - -class C extends B { - test() { - Expect.equals(42, super[0] = 42); - Expect.equals(42, super[0]); - Expect.equals(43, super[0] += 1); - Expect.equals(43, super[0]); - Expect.equals(43, super[0]++); - Expect.equals(44, super[0]); - - Expect.equals(2, super[0] = 2); - Expect.equals(2, super[0]); - Expect.equals(3, super[0] += 1); - Expect.equals(3, super[0]); - Expect.equals(3, super[0]++); - Expect.equals(4, super[0]); - } -} - -main() { - new C().test(); -} diff --git a/tests/language_2/super/operator_index5_test.dart b/tests/language_2/super/operator_index5_test.dart deleted file mode 100644 index f6aaab84618..00000000000 --- a/tests/language_2/super/operator_index5_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test for unresolved super[]=. - -import "package:expect/expect.dart"; - -class A { - var indexField = new List.filled(2, null); - operator [](index) => indexField[index]; - - operator []=(index, value); - - noSuchMethod(Invocation im) { - if (im.memberName == const Symbol('[]=')) { - Expect.equals(2, im.positionalArguments.length); - indexField[im.positionalArguments[0]] = im.positionalArguments[1]; - } else { - Expect.fail('Should not reach here'); - } - } -} - -class B extends A { - test() { - Expect.equals(42, super[0] = 42); - Expect.equals(42, super[0]); - Expect.equals(43, super[0] += 1); - Expect.equals(43, super[0]); - Expect.equals(43, super[0]++); - Expect.equals(44, super[0]); - - Expect.equals(2, super[0] = 2); - Expect.equals(2, super[0]); - Expect.equals(3, super[0] += 1); - Expect.equals(3, super[0]); - Expect.equals(3, super[0]++); - Expect.equals(4, super[0]); - } -} - -main() { - new B().test(); -} diff --git a/tests/language_2/super/operator_index6_test.dart b/tests/language_2/super/operator_index6_test.dart deleted file mode 100644 index 8692ba161b8..00000000000 --- a/tests/language_2/super/operator_index6_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test for unresolved super[]. - -import "package:expect/expect.dart"; - -class A { - var indexField = new List.filled(2, null); - operator []=(index, value) { - indexField[index] = value; - } - - operator [](index); - - noSuchMethod(Invocation im) { - if (im.memberName == const Symbol('[]')) { - Expect.equals(1, im.positionalArguments.length); - return indexField[im.positionalArguments[0]]; - } else { - Expect.fail('Should not reach here'); - } - } -} - -class B extends A { - test() { - Expect.equals(42, super[0] = 42); - Expect.equals(42, super[0]); - Expect.equals(43, super[0] += 1); - Expect.equals(43, super[0]); - Expect.equals(43, super[0]++); - Expect.equals(44, super[0]); - - Expect.equals(2, super[0] = 2); - Expect.equals(2, super[0]); - Expect.equals(3, super[0] += 1); - Expect.equals(3, super[0]); - Expect.equals(3, super[0]++); - Expect.equals(4, super[0]); - } -} - -main() { - new B().test(); -} diff --git a/tests/language_2/super/operator_index7_test.dart b/tests/language_2/super/operator_index7_test.dart deleted file mode 100644 index ebfe0d270b9..00000000000 --- a/tests/language_2/super/operator_index7_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test for unresolved super[] and super[]=. - -import "package:expect/expect.dart"; - -class A { - var indexField = new List.filled(2, null); - - operator []=(index, value); - operator [](index); - - noSuchMethod(Invocation im) { - if (im.memberName == const Symbol('[]=')) { - Expect.equals(2, im.positionalArguments.length); - indexField[im.positionalArguments[0]] = im.positionalArguments[1]; - } else if (im.memberName == const Symbol('[]')) { - Expect.equals(1, im.positionalArguments.length); - return indexField[im.positionalArguments[0]]; - } else { - Expect.fail('Should not reach here'); - } - } -} - -class B extends A { - test() { - Expect.equals(42, super[0] = 42); - Expect.equals(42, super[0]); - Expect.equals(43, super[0] += 1); - Expect.equals(43, super[0]); - Expect.equals(43, super[0]++); - Expect.equals(44, super[0]); - - Expect.equals(2, super[0] = 2); - Expect.equals(2, super[0]); - Expect.equals(3, super[0] += 1); - Expect.equals(3, super[0]); - Expect.equals(3, super[0]++); - Expect.equals(4, super[0]); - } -} - -main() { - new B().test(); -} diff --git a/tests/language_2/super/operator_index8_test.dart b/tests/language_2/super/operator_index8_test.dart deleted file mode 100644 index 010adafde86..00000000000 --- a/tests/language_2/super/operator_index8_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test for unresolved super[] and super[]= and correct evaluation order. - -import "package:expect/expect.dart"; - -class A { - var indexField = new List.filled(2, null); - - operator []=(index, value); - operator [](index); - - noSuchMethod(Invocation im) { - if (im.memberName == const Symbol('[]=')) { - Expect.equals(2, im.positionalArguments.length); - indexField[im.positionalArguments[0]] = im.positionalArguments[1]; - } else if (im.memberName == const Symbol('[]')) { - Expect.equals(1, im.positionalArguments.length); - return indexField[im.positionalArguments[0]]; - } else { - Expect.fail('Should not reach here'); - } - } -} - -var global = 0; - -f() { - Expect.equals(0, global++); - return 0; -} - -g() { - Expect.equals(1, global++); - return 42; -} - -class B extends A { - test() { - Expect.equals(42, super[f()] = g()); - Expect.equals(2, global); - } -} - -main() { - new B().test(); -} diff --git a/tests/language_2/super/operator_index_test.dart b/tests/language_2/super/operator_index_test.dart deleted file mode 100644 index 327565fe378..00000000000 --- a/tests/language_2/super/operator_index_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that we emit errors for unresolved indexing operations on super. - -class A { - operator []=(a, b) {} -} - -class B extends A { - foo() { - super[4] = 42; - super[4] += 5; //# 01: compile-time error - return super[2]; //# 02: compile-time error - } -} - -class C { - operator [](a) {} -} - -class D extends C { - foo() { - super[4] = 42; //# 03: compile-time error - super[4] += 5; //# 04: compile-time error - return super[2]; - } -} - -class E { - foo() { - super[4] = 42; //# 05: compile-time error - super[4] += 5; //# 06: compile-time error - return super[2]; //# 07: compile-time error - } -} - -main() { - new B().foo(); - new D().foo(); - new E().foo(); -} diff --git a/tests/language_2/super/operator_test.dart b/tests/language_2/super/operator_test.dart deleted file mode 100644 index e846e811a4c..00000000000 --- a/tests/language_2/super/operator_test.dart +++ /dev/null @@ -1,66 +0,0 @@ -// 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 test for testing super operator calls - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - String val = ""; - List things; - - A() : things = ['D', 'a', 'r', 't', 42]; - - operator +(String s) { - val = "${val}${s}"; - return this; - } - - operator [](i) { - return things[i]; - } - - operator []=(i, val) { - return things[i] = val; - } -} - -class B extends A { - operator +(String s) { - super + ("${s}${s}"); // Call A.operator+(this, "${s}${s}"). - return this; - } - - operator [](i) { - var temp = super[i]; - if (temp is String) { - return "$temp$temp"; - } - return temp + temp; - } - - operator []=(i, val) { - // Make sure the index expression is only evaluated - // once in the presence of a compound assignment. - return super[i++] += val; - } -} - - -main() { - var a = new A(); - a = a + "William"; // operator + of class A. - Expect.equals("William", a.val); - Expect.equals("r", a[2]); // operator [] of class A. - - a = new B(); - a += "Tell"; // operator + of class B. - Expect.equals("TellTell", a.val); - Expect.equals("rr", a[2]); // operator [] of class B. - - a[4] = 1; // operator []= of class B. - Expect.equals(43, a.things[4]); - Expect.equals(86, a[4]); -} diff --git a/tests/language_2/super/regress47698_test.dart b/tests/language_2/super/regress47698_test.dart deleted file mode 100644 index 770878ecb91..00000000000 --- a/tests/language_2/super/regress47698_test.dart +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) 2021, 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 - -import "package:expect/expect.dart"; - -// Regression test for https://github.com/dart-lang/sdk/issues/47698. - -// Exposes a class field. -class A { - int i; - A(this.i); -} - -// Exposes a getter/setter pair. -class B { - int _j; - int get j => _j; - set j(int x) => _j = x; - B(this._j); -} - -// A super class field used in constructor as getter and setter. -class C extends A { - C(int val) : super(val) { - var x = super.i + 10; // Getter is used first. - super.i = x + 100; // Boom! Missing setter. - } -} - -class D extends A { - D(int val) : super(val) { - super.i = 100; // Setter is used first. - super.i = super.i + 10 + val; // Boom! Missing getter. - } -} - -// Actual super getter and setter used in constructor -class E extends B { - E(int val) : super(val) { - var x = super.j + 10; // Getter is used first. - super.j = x + 100; // Boom! Missing setter. - } -} - -class F extends B { - F(int val) : super(val) { - super.j = 100; // Setter is used first. - super.j = super.j + 10 + val; // Boom! Missing getter. - } -} - -void main() { - var c = C(1); - Expect.equals(c.i, 111); - var d = D(1); - Expect.equals(d.i, 111); - var e = E(1); - Expect.equals(e.j, 111); - var f = F(1); - Expect.equals(f.j, 111); -} diff --git a/tests/language_2/super/setter_interceptor_test.dart b/tests/language_2/super/setter_interceptor_test.dart deleted file mode 100644 index acfd50e0522..00000000000 --- a/tests/language_2/super/setter_interceptor_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that we correctly intercept super getter and setter calls. - -import "package:expect/expect.dart"; - -var expected; - -class A { - set length(a) { - Expect.equals(expected, a); - } - - get length => 41; -} - -class B extends A { - test() { - expected = 42; - Expect.equals(42, super.length = 42); - expected = 42; - Expect.equals(42, super.length += 1); - expected = 42; - Expect.equals(42, ++super.length); - expected = 40; - Expect.equals(40, --super.length); - expected = 42; - Expect.equals(41, super.length++); - expected = 40; - Expect.equals(41, super.length--); - Expect.equals(41, super.length); - } -} - -main() { - // Ensures the list class is instantiated. - print([]); - new B().test(); -} diff --git a/tests/language_2/super/setter_test.dart b/tests/language_2/super/setter_test.dart deleted file mode 100644 index 6baaf0c72fd..00000000000 --- a/tests/language_2/super/setter_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// 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 test for testing super setters and getters. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Base { - Base() {} - String value_; - - String get value { return value_; } - String //# 01: compile-time error - set value(String newValue) { - value_ = 'Base:$newValue'; - } -} - - -class Derived extends Base { - Derived() : super() {} - - String //# 02: compile-time error - set value(String newValue) { - super.value = 'Derived:$newValue'; - } - String get value { return super.value; } -} - - -class SuperSetterTest { - static void testMain() { - final b = new Derived(); - b.value = "foo"; - Expect.equals("Base:Derived:foo", b.value); - } -} - -main() { - SuperSetterTest.testMain(); -} diff --git a/tests/language_2/super/super_test.dart b/tests/language_2/super/super_test.dart deleted file mode 100644 index fedc169725d..00000000000 --- a/tests/language_2/super/super_test.dart +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -int i = 0; - -// Tests super calls and constructors. -main() { - Sub sub = new Sub(1, 2); - Expect.equals(1, sub.x); - Expect.equals(2, sub.y); - Expect.equals(3, sub.z); - Expect.equals(1, sub.v); - Expect.equals(2, sub.w); - Expect.equals(3, sub.u); - - sub = new Sub.stat(); - Expect.equals(2, sub.x); - Expect.equals(3, sub.y); - Expect.equals(0, sub.v); - Expect.equals(1, sub.w); - Expect.equals(4, sub.z); - Expect.equals(5, sub.u); -} - -class Sup { - var x, y, z; - - Sup(a, b) - : this.x = a, - this.y = b { - z = a + b; - } - - Sup.stat() - : this.x = i++, - this.y = i++ { - z = i++; - } -} - -class Sub extends Sup { - var u, v, w; - - Sub(a, b) - : this.v = a, - this.w = b, - super(a, b) { - u = a + b; - } - - Sub.stat() - : this.v = i++, - this.w = i++, - super.stat() { - u = i++; - } -} diff --git a/tests/language_2/superinterface_variance/abstract_class_error_test.dart b/tests/language_2/superinterface_variance/abstract_class_error_test.dart deleted file mode 100644 index a2a5d04f728..00000000000 --- a/tests/language_2/superinterface_variance/abstract_class_error_test.dart +++ /dev/null @@ -1,134 +0,0 @@ -// 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. - -// @dart = 2.9 - -typedef F1 = void Function(X); -typedef F2 = X Function(X); -typedef F3 = void Function(); -typedef F4 = X Function(X Function(void)); -typedef F5 = Y Function(X); -typedef F6 = X Function(Y); - -class A {} - -abstract class B extends A>> {} //# 01: compile-time error - -abstract class B extends A>> {} //# 02: compile-time error - -abstract class B extends A>> {} //# 03: compile-time error - -abstract class B extends A>> {} //# 04: compile-time error - -abstract class B extends A>> {} //# 05: compile-time error - -abstract class B extends A>> {} //# 06: compile-time error - -abstract class B extends Object //# 07: compile-time error - with //# 07: continued - A>> {} //# 07: continued - -abstract class B extends Object //# 08: compile-time error - with //# 08: continued - A>> {} //# 08: continued - -abstract class B extends Object //# 09: compile-time error - with //# 09: continued - A>> {} //# 09: continued - -abstract class B extends Object //# 10: compile-time error - with //# 10: continued - A>> {} //# 10: continued - -abstract class B extends Object //# 11: compile-time error - with //# 11: continued - A>> {} //# 11: continued - -abstract class B extends Object //# 12: compile-time error - with //# 12: continued - A>> {} //# 12: continued - -abstract class B implements A>> {} //# 13: compile-time error - -abstract class B implements A>> {} //# 14: compile-time error - -abstract class B implements A>> {} //# 15: compile-time error - -abstract class B implements A>> {} //# 16: compile-time error - -abstract class B implements A>> {} //# 17: compile-time error - -abstract class B implements A>> {} //# 18: compile-time error - -abstract class B extends A> {} //# 19: compile-time error - -abstract class B extends A> {} //# 20: compile-time error - -// Two errors here: Invariance in superinterface and -// generic function type used as actual type argument. -abstract class B extends //# 21: compile-time error - A()>> {} //# 21: continued - -abstract class B extends //# 22: compile-time error - A> {} //# 22: continued - -abstract class B extends A> {} //# 23: compile-time error - -abstract class B extends A> {} //# 24: compile-time error - -abstract class B extends Object //# 25: compile-time error - with //# 25: continued - A> {} //# 25: continued - -abstract class B extends Object //# 26: compile-time error - with //# 26: continued - A> {} //# 26: continued - -// Two errors here: Invariance in superinterface and -// generic function type used as actual type argument. -abstract class B extends Object //# 27: compile-time error - with //# 27: continued - A()>> {} //# 27: continued - -abstract class B extends Object //# 28: compile-time error - with //# 28: continued - A> {} //# 28: continued - -abstract class B extends Object //# 29: compile-time error - with //# 29: continued - A> {} //# 29: continued - -abstract class B extends Object //# 30: compile-time error - with //# 30: continued - A> {} //# 30: continued - -abstract class B //# 31: compile-time error - implements //# 31: continued - A> {} //# 31: continued - -abstract class B //# 32: compile-time error - implements //# 32: continued - A> {} //# 32: continued - -// Two errors here: Invariance in superinterface and -// generic function type used as actual type argument. -abstract class B //# 33: compile-time error - implements //# 33: continued - A()>> {} //# 33: continued - -abstract class B //# 34: compile-time error - implements //# 34: continued - A> {} //# 34: continued - -abstract class B //# 35: compile-time error - implements //# 35: continued - A> {} //# 35: continued - -abstract class B //# 36: compile-time error - implements //# 36: continued - A> {} //# 36: continued - -main() { - A(); -} diff --git a/tests/language_2/superinterface_variance/abstract_mixin_application_error_test.dart b/tests/language_2/superinterface_variance/abstract_mixin_application_error_test.dart deleted file mode 100644 index db640fb25f1..00000000000 --- a/tests/language_2/superinterface_variance/abstract_mixin_application_error_test.dart +++ /dev/null @@ -1,163 +0,0 @@ -// 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. - -// @dart = 2.9 - -typedef F1 = void Function(X); -typedef F2 = X Function(X); -typedef F3 = void Function(); -typedef F4 = X Function(X Function(void)); -typedef F5 = Y Function(X); -typedef F6 = X Function(Y); - -class A {} - -mixin B {} - -class C0 = Object with B; - -abstract class C = A> with B; //# 01: compile-time error - -abstract class C = A> with B; //# 02: compile-time error - -abstract class C = A> with B; //# 03: compile-time error - -abstract class C = A> with B; //# 04: compile-time error - -abstract class C = A> with B; //# 05: compile-time error - -abstract class C = A> with B; //# 06: compile-time error - -abstract class C = Object with A>; //# 07: compile-time error - -abstract class C = Object with A>; //# 08: compile-time error - -abstract class C = Object with A>; //# 09: compile-time error - -abstract class C = Object with A>; //# 10: compile-time error - -abstract class C = Object with A>; //# 11: compile-time error - -abstract class C = Object with A>; //# 12: compile-time error - -abstract class C = Object //# 13: compile-time error - with //# 13: continued - B //# 13: continued - implements //# 13: continued - A>; //# 13: continued - -abstract class C = Object //# 14: compile-time error - with //# 14: continued - B //# 14: continued - implements //# 14: continued - A>; //# 14: continued - -abstract class C = Object //# 15: compile-time error - with //# 15: continued - B //# 15: continued - implements //# 15: continued - A>; //# 15: continued - -abstract class C = Object //# 16: compile-time error - with //# 16: continued - B //# 16: continued - implements //# 16: continued - A>; //# 16: continued - -abstract class C = Object //# 17: compile-time error - with //# 17: continued - B //# 17: continued - implements //# 17: continued - A>; //# 17: continued - -abstract class C = Object //# 18: compile-time error - with //# 18: continued - B //# 18: continued - implements //# 18: continued - A>; //# 18: continued - -abstract class C = A with B; //# 19: compile-time error - -abstract class C = A with B; //# 20: compile-time error - -// Two errors here: Invariance in superinterface and -// generic function type used as actual type argument. -abstract class C = A()> //# 21: compile-time error - with //# 21: continued - B; //# 21: continued - -abstract class C = A //# 22: compile-time error - with //# 22: continued - B; //# 22: continued - -abstract class C = A with B; //# 23: compile-time error - -abstract class C = A with B; //# 24: compile-time error - -abstract class C = Object //# 25: compile-time error - with //# 25: continued - A; //# 25: continued - -abstract class C = Object with A; //# 26: compile-time error - -// Two errors here: Invariance in superinterface and -// generic function type used as actual type argument. -abstract class C = Object //# 27: compile-time error - with //# 27: continued - A()>; //# 27: continued - -abstract class C = Object //# 28: compile-time error - with //# 28: continued - A; //# 28: continued - -abstract class C = Object //# 29: compile-time error - with //# 29: continued - A; //# 29: continued - -abstract class C = Object //# 30: compile-time error - with //# 30: continued - A; //# 30: continued - -abstract class C = Object //# 31: compile-time error - with //# 31: continued - B //# 31: continued - implements //# 31: continued - A; //# 31: continued - -abstract class C = Object //# 32: compile-time error - with //# 32: continued - B //# 32: continued - implements //# 32: continued - A; //# 32: continued - -// Two errors here: Invariance in superinterface and -// generic function type used as actual type argument. -abstract class C = Object //# 33: compile-time error - with //# 33: continued - B //# 33: continued - implements //# 33: continued - A()>; //# 33: continued - -abstract class C = Object //# 34: compile-time error - with //# 34: continued - B //# 34: continued - implements //# 34: continued - A; //# 34: continued - -abstract class C = Object //# 35: compile-time error - with //# 35: continued - B //# 35: continued - implements //# 35: continued - A; //# 35: continued - -abstract class C = Object //# 36: compile-time error - with //# 36: continued - B //# 36: continued - implements //# 36: continued - A; //# 36: continued - -main() { - A(); - C0(); -} diff --git a/tests/language_2/superinterface_variance/concrete_class_error_test.dart b/tests/language_2/superinterface_variance/concrete_class_error_test.dart deleted file mode 100644 index f0a25e5f604..00000000000 --- a/tests/language_2/superinterface_variance/concrete_class_error_test.dart +++ /dev/null @@ -1,104 +0,0 @@ -// 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. - -// @dart = 2.9 - -typedef F1 = void Function(X); -typedef F2 = X Function(X); -typedef F3 = void Function(); -typedef F4 = X Function(X Function(void)); -typedef F5 = Y Function(X); -typedef F6 = X Function(Y); - -class A {} - -class B extends A> {} //# 01: compile-time error - -class B extends A> {} //# 02: compile-time error - -class B extends A> {} //# 03: compile-time error - -class B extends A> {} //# 04: compile-time error - -class B extends A> {} //# 05: compile-time error - -class B extends A> {} //# 06: compile-time error - -class B extends Object with A> {} //# 07: compile-time error - -class B extends Object with A> {} //# 08: compile-time error - -class B extends Object with A> {} //# 09: compile-time error - -class B extends Object with A> {} //# 10: compile-time error - -class B extends Object with A> {} //# 11: compile-time error - -class B extends Object with A> {} //# 12: compile-time error - -class B implements A> {} //# 13: compile-time error - -class B implements A> {} //# 14: compile-time error - -class B implements A> {} //# 15: compile-time error - -class B implements A> {} //# 16: compile-time error - -class B implements A> {} //# 17: compile-time error - -class B implements A> {} //# 18: compile-time error - -class B extends A {} //# 19: compile-time error - -class B extends A {} //# 20: compile-time error - -// Two errors here: Invariance in superinterface and -// generic function type used as actual type argument. -class B extends A()> {} //# 21: compile-time error - -class B extends A {} //# 22: compile-time error - -class B extends A {} //# 23: compile-time error - -class B extends A {} //# 24: compile-time error - -class B extends Object with A {} //# 25: compile-time error - -class B extends Object with A {} //# 26: compile-time error - -// Two errors here: Invariance in superinterface and -// generic function type used as actual type argument. -class B extends Object //# 27: compile-time error - with //# 27: continued - A()> {} //# 27: continued - -class B extends Object //# 28: compile-time error - with //# 28: continued - A {} //# 28: continued - -class B extends Object with A {} //# 29: compile-time error - -class B extends Object with A {} //# 30: compile-time error - -class B implements A {} //# 31: compile-time error - -class B implements A {} //# 32: compile-time error - -// Two errors here: Invariance in superinterface and -// generic function type used as actual type argument. -class B //# 33: compile-time error - implements //# 33: continued - A()> {} //# 33: continued - -class B //# 34: compile-time error - implements //# 34: continued - A {} //# 34: continued - -class B implements A {} //# 35: compile-time error - -class B implements A {} //# 36: compile-time error - -main() { - A(); -} diff --git a/tests/language_2/superinterface_variance/concrete_mixin_application_error_test.dart b/tests/language_2/superinterface_variance/concrete_mixin_application_error_test.dart deleted file mode 100644 index 51231a8c1c6..00000000000 --- a/tests/language_2/superinterface_variance/concrete_mixin_application_error_test.dart +++ /dev/null @@ -1,129 +0,0 @@ -// 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. - -// @dart = 2.9 - -typedef F1 = void Function(X); -typedef F2 = X Function(X); -typedef F3 = void Function(); -typedef F4 = X Function(X Function(void)); -typedef F5 = Y Function(X); -typedef F6 = X Function(Y); - -class A {} - -mixin B {} - -class C0 = Object with B; - -class C = A> with B; //# 01: compile-time error - -class C = A> with B; //# 02: compile-time error - -class C = A> with B; //# 03: compile-time error - -class C = A> with B; //# 04: compile-time error - -class C = A> with B; //# 05: compile-time error - -class C = A> with B; //# 06: compile-time error - -class C = Object with A>; //# 07: compile-time error - -class C = Object with A>; //# 08: compile-time error - -class C = Object with A>; //# 09: compile-time error - -class C = Object with A>; //# 10: compile-time error - -class C = Object with A>; //# 11: compile-time error - -class C = Object with A>; //# 12: compile-time error - -class C = Object with B implements A>; //# 13: compile-time error - -class C = Object with B implements A>; //# 14: compile-time error - -class C = Object with B implements A>; //# 15: compile-time error - -class C = Object with B implements A>; //# 16: compile-time error - -class C = Object with B implements A>; //# 17: compile-time error - -class C = Object with B implements A>; //# 18: compile-time error - -class C = A with B; //# 19: compile-time error - -class C = A with B; //# 20: compile-time error - -// Two errors here: Invariance in superinterface and -// generic function type used as actual type argument. -class C = A()> with B; //# 21: compile-time error - -class C = A with B; //# 22: compile-time error - -class C = A with B; //# 23: compile-time error - -class C = A with B; //# 24: compile-time error - -class C = Object with A; //# 25: compile-time error - -class C = Object with A; //# 26: compile-time error - -// Two errors here: Invariance in superinterface and -// generic function type used as actual type argument. -class C = Object //# 27: compile-time error - with //# 27: continued - A()>; //# 27: continued - -class C = Object //# 28: compile-time error - with //# 28: continued - A; //# 28: continued - -class C = Object with A; //# 29: compile-time error - -class C = Object with A; //# 30: compile-time error - -class C = Object //# 31: compile-time error - with //# 31: continued - B //# 31: continued - implements //# 31: continued - A; //# 31: continued - -class C = Object //# 32: compile-time error - with //# 32: continued - B //# 32: continued - implements //# 32: continued - A; //# 32: continued - -// Two errors here: Invariance in superinterface and -// generic function type used as actual type argument. -class C = Object //# 33: compile-time error - with //# 33: continued - B //# 33: continued - implements //# 33: continued - A()>; //# 33: continued - -class C = Object //# 34: compile-time error - with //# 34: continued - B //# 34: continued - implements //# 34: continued - A; //# 34: continued - -class C = Object //# 35: compile-time error - with //# 35: continued - B //# 35: continued - implements //# 35: continued - A; //# 35: continued - -class C = Object //# 36: compile-time error - with //# 36: continued - B //# 36: continued - implements //# 36: continued - A; //# 36: continued - -main() { - A(); - C0(); -} diff --git a/tests/language_2/superinterface_variance/covariance_test.dart b/tests/language_2/superinterface_variance/covariance_test.dart deleted file mode 100644 index 8e506a177a9..00000000000 --- a/tests/language_2/superinterface_variance/covariance_test.dart +++ /dev/null @@ -1,89 +0,0 @@ -// 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. - -// @dart = 2.9 - -typedef F = X Function(); -typedef G = void Function(void Function(X)); - -class A {} - -class B01 extends A> {} - -class B02 extends A> {} - -class B03 extends A {} - -class B04 extends A {} - -class B05 extends Object with A> {} - -class B06 extends Object with A> {} - -class B07 extends Object with A {} - -class B08 extends Object with A {} - -class B09 implements A> {} - -class B10 implements A> {} - -class B11 implements A {} - -class B12 implements A {} - -abstract class B13 extends A>> {} - -abstract class B14 extends A>> {} - -abstract class B15 extends A> {} - -abstract class B16 extends A> {} - -abstract class B17 extends Object with A>> {} - -abstract class B18 extends Object with A>> {} - -abstract class B19 extends Object with A> {} - -abstract class B20 extends Object - with A> {} - -abstract class B21 implements A>> {} - -abstract class B22 implements A>> {} - -abstract class B23 implements A> {} - -abstract class B24 implements A> {} - -main() { - A(); - - B01(); - B02(); - B03(); - B04(); - B05(); - B06(); - B07(); - B08(); - B09(); - B10(); - B11(); - B12(); - - B13 b13; - B14 b14; - B15 b15; - B16 b16; - B17 b17; - B18 b18; - B19 b19; - B20 b20; - B21 b21; - B22 b22; - B23 b23; - B24 b24; -} diff --git a/tests/language_2/superinterface_variance/mixin_error_test.dart b/tests/language_2/superinterface_variance/mixin_error_test.dart deleted file mode 100644 index 446460864bf..00000000000 --- a/tests/language_2/superinterface_variance/mixin_error_test.dart +++ /dev/null @@ -1,164 +0,0 @@ -// 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. - -// @dart = 2.9 - -typedef F1 = void Function(X); -typedef F2 = X Function(X); -typedef F3 = void Function(); -typedef F4 = X Function(X Function(void)); -typedef F5 = Y Function(X); -typedef F6 = X Function(Y); - -class A {} - -mixin B on A> {} //# 01: compile-time error - -mixin B on A> {} //# 02: compile-time error - -mixin B on A> {} //# 03: compile-time error - -mixin B on A> {} //# 04: compile-time error - -mixin B on A> {} //# 05: compile-time error - -mixin B on A> {} //# 06: compile-time error - -mixin B on Object, A> {} //# 07: compile-time error - -mixin B on Object, A> {} //# 08: compile-time error - -mixin B on Object, A> {} //# 09: compile-time error - -mixin B on Object, A> {} //# 10: compile-time error - -mixin B on Object, A> {} //# 11: compile-time error - -mixin B on Object, A> {} //# 12: compile-time error - -mixin B implements A> {} //# 13: compile-time error - -mixin B implements A> {} //# 14: compile-time error - -mixin B implements A> {} //# 15: compile-time error - -mixin B implements A> {} //# 16: compile-time error - -mixin B implements A> {} //# 17: compile-time error - -mixin B implements A> {} //# 18: compile-time error - -mixin B on A {} //# 19: compile-time error - -mixin B on A {} //# 20: compile-time error - -// Two errors here: Invariance in `on` clause and -// generic function type used as actual type argument. -mixin B on A()> {} //# 21: compile-time error - -mixin B on A {} //# 22: compile-time error - -mixin B on A {} //# 23: compile-time error - -mixin B on A {} //# 24: compile-time error - -mixin B on Object, A {} //# 25: compile-time error - -mixin B on Object, A {} //# 26: compile-time error - -// Two errors here: Invariance in `on` clause and -// generic function type used as actual type argument. -mixin B //# 27: compile-time error - on //# 27: continued - Object, //# 27: continued - A()> {} //# 27: continued - -mixin B //# 28: compile-time error - on //# 28: continued - Object, //# 28: continued - A {} //# 28: continued - -mixin B on Object, A {} //# 29: compile-time error - -mixin B on Object, A {} //# 30: compile-time error - -mixin B implements A {} //# 31: compile-time error - -mixin B implements A {} //# 32: compile-time error - -// Two errors here: Invariance in superinterface and -// generic function type used as actual type argument. -mixin B //# 33: compile-time error - implements //# 33: continued - A()> {} //# 33: continued - -mixin B //# 34: compile-time error - implements //# 34: continued - A {} //# 34: continued - -mixin B implements A {} //# 35: compile-time error - -mixin B implements A {} //# 36: compile-time error - -// A superinterface variance error can arise for an inferred type. For -// instance, mixin inference and instantiation to bound transforms `B` to -// `B>` in subtest 37. - -class C extends A with B {} //# 37: compile-time error - -mixin B> on A {} //# 37: continued - -class C extends A with B {} //# 38: compile-time error - -mixin B> on A {} //# 38: continued - -class C extends A with B {} //# 39: compile-time error - -mixin B> on A {} //# 39: continued - -class C extends A with B {} //# 40: compile-time error - -mixin B> on A {} //# 40: continued - -class C extends A with B {} //# 41: compile-time error - -mixin B> on A {} //# 41: continued - -// Different kind of error here: I2b binds `Y` to `Null` which yields the -// correct super-bounded type `B>`. But it is still an error -// for `C`, because a superinterface cannot be a super-bounded type. -class C extends A with B {} //# 42: compile-time error - -mixin B> on A {} //# 42: continued - -class C extends A with B {} //# 43: compile-time error - -mixin B on A {} //# 43: continued - -class C extends A with B {} //# 44: compile-time error - -mixin B on A {} //# 44: continued - -// Two errors here: Invariance in inferred superinterface of `C` and -// generic function type used as bound. -class C extends A with B {} //# 45: compile-time error - -mixin B()> on A {} //# 45: continued - -class C extends A with B {} //# 46: compile-time error - -mixin B on A {} //# 46: continued - -class C extends A with B {} //# 47: compile-time error - -mixin B on A {} //# 47: continued - -// Similar to subtest 42. -class C extends A with B {} //# 48: compile-time error - -mixin B on A {} //# 48: continued - -main() { - A(); -} diff --git a/tests/language_2/switch/aborting_switch_case_test.dart b/tests/language_2/switch/aborting_switch_case_test.dart deleted file mode 100644 index 881ca30e6da..00000000000 --- a/tests/language_2/switch/aborting_switch_case_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to be confused when inlining -// method that always aborts in a switch case. - -import "package:expect/expect.dart"; - -foo() { - throw 42; -} - -main() { - var exception; - try { - switch (42) { - case 42: - foo(); - foo(); - break; - } - } catch (e) { - exception = e; - } - Expect.equals(42, exception); -} diff --git a/tests/language_2/switch/backward_jump_test.dart b/tests/language_2/switch/backward_jump_test.dart deleted file mode 100644 index dbcde00f928..00000000000 --- a/tests/language_2/switch/backward_jump_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2022, 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. - -// VMOptions= -// VMOptions=--force-switch-dispatch-type=0 -// VMOptions=--force-switch-dispatch-type=1 -// VMOptions=--force-switch-dispatch-type=2 - -import 'package:expect/expect.dart'; - -main() { - Expect.equals(test(5), 'a'); - Expect.equals(test(10), 'a through b'); - Expect.equals(test(7), 'b'); -} - -String test(int i) { - switch (i) { - a: - case 5: - { - if (i == 10) { - return 'a through b'; - } - if (i == 0) { - return 'a'; - } - i -= 1; - continue a; // backward jump to non-default self - } - - b: - default: - { - if (i == 10) { - continue a; // backward jump to non-default - } - if (i == 0) { - return 'b'; - } - i -= 1; - continue b; // backward jump to default - } - } -} diff --git a/tests/language_2/switch/bad_case_runtime_test.dart b/tests/language_2/switch/bad_case_runtime_test.dart deleted file mode 100644 index b47e5cc9571..00000000000 --- a/tests/language_2/switch/bad_case_runtime_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test reporting a compile-time error if case expressions do not all have -// the same type or are of type double. - -import "package:expect/expect.dart"; - -void main() { - Expect.equals("IV", caesarSays(4)); - Expect.equals(null, caesarSays(2)); - Expect.equals(null, archimedesSays(3.14)); -} - -caesarSays(n) { - switch (n) { - case 1: - return "I"; - case 4: - return "IV"; - - - } - return null; -} - -archimedesSays(n) { - - - - - - - return null; -} diff --git a/tests/language_2/switch/bad_case_test.dart b/tests/language_2/switch/bad_case_test.dart deleted file mode 100644 index 85c88faf08a..00000000000 --- a/tests/language_2/switch/bad_case_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test reporting a compile-time error if case expressions do not all have -// the same type or are of type double. - -import "package:expect/expect.dart"; - -void main() { - Expect.equals("IV", caesarSays(4)); - Expect.equals(null, caesarSays(2)); - Expect.equals(null, archimedesSays(3.14)); -} - -caesarSays(n) { - switch (n) { - case 1: - return "I"; - case 4: - return "IV"; - case "M": - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.INCONSISTENT_CASE_EXPRESSION_TYPES - return 1000; - } - return null; -} - -archimedesSays(n) { - switch (n) { -//^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS - case 3.14: - // ^ - // [cfe] Case expression '3.14' does not have a primitive operator '=='. - return "Pi"; - case 2.71828: - // ^ - // [cfe] Case expression '2.71828' does not have a primitive operator '=='. - return "Huh?"; - } - return null; -} diff --git a/tests/language_2/switch/case_expression_with_assignment_runtime_test.dart b/tests/language_2/switch/case_expression_with_assignment_runtime_test.dart deleted file mode 100644 index 73372b7698f..00000000000 --- a/tests/language_2/switch/case_expression_with_assignment_runtime_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -// Regression test for crash in VM parser (issue 29370). - -import "package:expect/expect.dart"; - -const ERROR_A = 0; -const ERROR_B = 1; - -errorToString(error) { - switch (error) { - case ERROR_A: - return "ERROR_A"; - - case ERROR_B: - return "ERROR_B"; - default: - return "Unknown error"; - } -} - -main() { - Expect.equals(errorToString(ERROR_A), "ERROR_A"); - Expect.equals(errorToString(ERROR_B), "ERROR_B"); - Expect.equals(errorToString(55), "Unknown error"); -} diff --git a/tests/language_2/switch/case_expression_with_assignment_test.dart b/tests/language_2/switch/case_expression_with_assignment_test.dart deleted file mode 100644 index 30c03646650..00000000000 --- a/tests/language_2/switch/case_expression_with_assignment_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2017, 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 - -// Regression test for crash in VM parser (issue 29370). - -import "package:expect/expect.dart"; - -const ERROR_A = 0; -const ERROR_B = 1; - -errorToString(error) { - switch (error) { - case ERROR_A: - return "ERROR_A"; - case ERROR_B = 1: - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_CONST - // ^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.NON_CONSTANT_CASE_EXPRESSION - // [cfe] Setter not found: 'ERROR_B'. - case ERROR_B: - return "ERROR_B"; - default: - return "Unknown error"; - } -} - -main() { - Expect.equals(errorToString(ERROR_A), "ERROR_A"); - Expect.equals(errorToString(ERROR_B), "ERROR_B"); - Expect.equals(errorToString(55), "Unknown error"); -} diff --git a/tests/language_2/switch/case_runtime_test.dart b/tests/language_2/switch/case_runtime_test.dart deleted file mode 100644 index f25ac4307cf..00000000000 --- a/tests/language_2/switch/case_runtime_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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 "package:expect/expect.dart"; - -class A { - const A(); - const factory A.B() = B; - const factory A.C() = C; - const factory A.C2() = D; -} - -class B implements A { - const B(); - - -} - -class C implements D { - final int x; - const C() : x = 0; - const C.fromD() : x = 1; -} - -class D implements A { - int get x => 0; - const factory D() = C.fromD; -} - -main() { - switch (new B()) { - - } - - switch (new C()) { - case const C(): - Expect.fail("bad switch"); - break; - case const A.C(): - Expect.fail("bad switch"); - break; - case const A.C2(): - Expect.fail("bad switch"); - break; - - } - - switch (new A()) { - case const A(): - Expect.fail("bad switch"); - break; - - } -} diff --git a/tests/language_2/switch/case_static_const_test.dart b/tests/language_2/switch/case_static_const_test.dart deleted file mode 100644 index d6a0007a451..00000000000 --- a/tests/language_2/switch/case_static_const_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2014, 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 - -class A { - static const S = 'A.S'; -} - -const S = 'S'; - -foo(var p) { - switch (p) { - case S: - break; - case A.S: - break; - case 'abc': - break; - } -} - -main() { - foo('p'); -} diff --git a/tests/language_2/switch/case_test.dart b/tests/language_2/switch/case_test.dart deleted file mode 100644 index fa519fd0709..00000000000 --- a/tests/language_2/switch/case_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -class A { - const A(); - const factory A.B() = B; - const factory A.C() = C; - const factory A.C2() = D; -} - -class B implements A { - const B(); - - operator ==(o) => true; -} - -class C implements D { - final int x; - const C() : x = 0; - const C.fromD() : x = 1; -} - -class D implements A { - int get x => 0; - const factory D() = C.fromD; -} - -main() { - switch (new B()) { -//^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS - case const A.B(): Expect.fail("bad switch"); break; - // ^ - // [cfe] Case expression 'B {}' does not have a primitive operator '=='. - } - - switch (new C()) { - case const C(): - Expect.fail("bad switch"); - break; - case const A.C(): - Expect.fail("bad switch"); - break; - case const A.C2(): - Expect.fail("bad switch"); - break; - case const A(): Expect.fail("bad switch"); break; - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INCONSISTENT_CASE_EXPRESSION_TYPES - } - - switch (new A()) { - case const A(): - Expect.fail("bad switch"); - break; - case const A.B(): Expect.fail("bad switch"); break; - // ^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INCONSISTENT_CASE_EXPRESSION_TYPES - // ^ - // [cfe] Case expression 'B {}' does not have a primitive operator '=='. - } -} diff --git a/tests/language_2/switch/case_warn_test.dart b/tests/language_2/switch/case_warn_test.dart deleted file mode 100644 index 25b95168810..00000000000 --- a/tests/language_2/switch/case_warn_test.dart +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (c) 2016, 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. -// Test switch statement. - -// @dart = 2.9 - -// Tests some switch-case statements blocks that should and should not -// cause static warnings. -// This test is not testing runtime behavior, only static warnings. - -// None of the cases blocks should cause a warning. -void testSwitch(int x) { - // Catch all control flow leaving the switch. - // Run switch in catch clause to check rethrow. - TRY: - try { - throw x; - } catch (x) { - // Add loop as break/continue target. - LOOP: - do { - switch (x) { - case 0: - case 1: - nop(x); - break; // Break switch. - case 2: - nop(x); - break LOOP; - case 3: - nop(x); - continue; // Continue loop. - case 4: - nop(x); - continue LOOP; - case 5: - nop(x); - continue LAST; - // Avoid warning for "return;"" and "return e;" in same function. - case 6: // //# retnon: ok - nop(x); // //# retnon: continued - return; // //# retnon: continued - case 7: // //# retval: ok - nop(x); // //# retval: continued - return x; // //# retval: continued - case 8: - nop(x); - throw x; - case 9: - nop(x); - rethrow; - case 10: - case 11: - { - nop(x); - break; // Break switch. - } - case 12: - { - nop(x); - break LOOP; - } - case 13: - { - nop(x); - continue; // Continue loop. - } - case 14: - { - nop(x); - continue LOOP; - } - case 15: - { - nop(x); - continue LAST; - } - case 16: { // //# retnon: continued - nop(x); // //# retnon: continued - return; // //# retnon: continued - } // //# retnon: continued - case 17: { // //# retval: continued - nop(x); // //# retval: continued - return x; // //# retval: continued - } // //# retval: continued - case 18: - { - nop(x); - throw x; - } - case 19: - { - nop(x); - rethrow; - } - LAST: - case 20: - { - nop(x); - // Fallthrough allowed on last statements. - } - } - } while (false); - } finally { - // Catch all control flow leaving the switch and ignore it. - // Use break instead of return to avoid warning for `return` and `return e` - // in same function. - break TRY; - } -} - -// All these switch cases should cause warnings. -void testSwitchWarn(x) { - // Catch all control flow from the switch and ignore it. - TRY: - try { - throw 0; - } catch (e) { - // Wrap in loop as target for continue/break. - LOOP: - do { - switch (x) { - case 0: // //# 01: compile-time error - case 1: { // //# 01: continued - { // //# 01: continued - nop(x); // //# 01: continued - break; // Break switch. // //# 01: continued - } // //# 01: continued - } // //# 01: continued - case 2: { // //# 02: compile-time error - { // //# 02: continued - nop(x); // //# 02: continued - break LOOP; // //# 02: continued - } // //# 02: continued - } // //# 02: continued - case 3: { // //# 03: compile-time error - { // //# 03: continued - nop(x); // //# 03: continued - continue; // Continue loop. //# 03: continued - } // //# 03: continued - } // //# 03: continued - case 4: { // //# 04: compile-time error - { // //# 04: continued - nop(x); // //# 04: continued - continue LOOP; // //# 04: continued - } // //# 04: continued - } // //# 04: continued - case 5: { // //# 05: compile-time error - { // //# 05: continued - nop(x); // //# 05: continued - continue LAST; // //# 05: continued - } // //# 05: continued - } // //# 05: continued - case 6: { // //# 06: compile-time error - { // //# 06: continued - nop(x); // //# 06: continued - return; // //# 06: continued - } // //# 06: continued - } // //# 06: continued - case 7: { // //# 07: compile-time error - { // //# 07: continued - nop(x); // //# 07: continued - return x; // //# 07: continued - } // //# 07: continued - } // //# 07: continued - case 8: { // //# 08: compile-time error - { // //# 08: continued - nop(x); // //# 08: continued - throw x; // //# 08: continued - } // //# 08: continued - } // //# 08: continued - case 9: { // //# 09: compile-time error - { // //# 09: continued - nop(x); // //# 09: continued - rethrow; // //# 09: continued - } // //# 09: continued - } // //# 09: continued - case 10: // //# 10: compile-time error - while (true) break; // //# 10: continued - case 11: // //# 11: compile-time error - do break; while (true); // //# 11: continued - case 12: // //# 12: compile-time error - for (;;) break; // //# 12: continued - case 13: // //# 13: compile-time error - for (var _ in []) break; // //# 13: continued - case 14: // //# 14: compile-time error - if (x) break; else break; // //# 14: continued - case 15: // //# 15: compile-time error - (throw 0); // //# 15: continued - case 16: // //# 16: compile-time error - nop(x); // fallthrough. // //# 16: continued - case 17: // //# 17: compile-time error - L: break; // //# 17: continued - LAST: - case 99: - // Last case can't cause static warning. - } - } while (false); - } finally { - // Catch all control flow leaving the switch and ignore it. - // Use break instead of return to avoid warning for `return` and `return e` - // in same function. - break TRY; - } -} - -main() { - // Ensure that all the cases compile and run (even if they might throw). - for (int i = 0; i <= 20; i++) { - testSwitch(i); // Just make sure it runs. - } - for (int i = 0; i <= 18; i++) { - testSwitchWarn(i); - } -} - -/// Don't make it obvious that a switch case isn't doing anything. -void nop(x) {} diff --git a/tests/language_2/switch/empty_block_case_test.dart b/tests/language_2/switch/empty_block_case_test.dart deleted file mode 100644 index 83439271f94..00000000000 --- a/tests/language_2/switch/empty_block_case_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Test that a case with an empty block does not fall through. - -// VMOptions= -// VMOptions=--force-switch-dispatch-type=0 -// VMOptions=--force-switch-dispatch-type=1 -// VMOptions=--force-switch-dispatch-type=2 - -class EmptyBlockCaseTest { - static testMain() { - switch (1) { - case 1: -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.CASE_BLOCK_NOT_TERMINATED -// [cfe] Switch case may fall through to the next case. - {} - case 2: - Expect.equals(true, false); - } - } -} - -main() { - EmptyBlockCaseTest.testMain(); -} diff --git a/tests/language_2/switch/fallthru_test.dart b/tests/language_2/switch/fallthru_test.dart deleted file mode 100644 index e0b6f60caca..00000000000 --- a/tests/language_2/switch/fallthru_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -String test(int n) { - String result = "foo"; - switch (n) { - case 0: - result = "zero"; - break; - case 1: -// ^^^^ -// [analyzer] COMPILE_TIME_ERROR.CASE_BLOCK_NOT_TERMINATED -// [cfe] Switch case may fall through to the next case. - result = "one"; - // fall-through, error if case is non-empty - case 9: - result = "nine"; - // No error at end of last switch case. - } - return result; -} - -main() { - Expect.equals("zero", test(0)); - Expect.equals("nine", test(1)); - Expect.equals("nine", test(9)); - Expect.equals("foo", test(99)); -} diff --git a/tests/language_2/switch/infinite_switch_label_test.dart b/tests/language_2/switch/infinite_switch_label_test.dart deleted file mode 100644 index 2ddfad61bc6..00000000000 --- a/tests/language_2/switch/infinite_switch_label_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test nested switch statement using labels. - -// VMOptions= -// VMOptions=--force-switch-dispatch-type=0 -// VMOptions=--force-switch-dispatch-type=1 -// VMOptions=--force-switch-dispatch-type=2 - -library nested_switch_label; - -import "package:expect/expect.dart"; - -void main() { - Expect.throws(() => doSwitch(0), (list) { - Expect.listEquals([0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], list); - return true; - }); - Expect.throws(() => doSwitch(2), (list) { - Expect.listEquals([2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], list); - return true; - }); -} - -void doSwitch(int target) { - List list = []; - switch (target) { - l0: - case 0: - if (list.length > 10) throw list; - list.add(0); - continue l1; - l1: - case 1: - if (list.length > 10) throw list; - list.add(1); - continue l0; - default: - list.add(2); - continue l1; - } -} diff --git a/tests/language_2/switch/label2_test.dart b/tests/language_2/switch/label2_test.dart deleted file mode 100644 index 4c2dbb6fda8..00000000000 --- a/tests/language_2/switch/label2_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// 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 - -// Test switch statement using labels. - -// VMOptions= -// VMOptions=--force-switch-dispatch-type=0 -// VMOptions=--force-switch-dispatch-type=1 -// VMOptions=--force-switch-dispatch-type=2 - -import 'package:expect/expect.dart'; - -void main() { - doSwitch(0, [0, 2]); - doSwitch(1, [1]); - doSwitch(2, [2]); - doSwitch(3, [3, 1]); -} - -void doSwitch(int target, List expect) { - List list = []; - switch (target) { - case 0: - list.add(0); - continue case2; - case1: - case 1: - list.add(1); - break; - case2: - case 2: - list.add(2); - break; - case 3: - list.add(3); - continue case1; - } - Expect.listEquals(expect, list); -} diff --git a/tests/language_2/switch/label3_test.dart b/tests/language_2/switch/label3_test.dart deleted file mode 100644 index e12dc1e2e05..00000000000 --- a/tests/language_2/switch/label3_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2023, 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 - -import 'package:expect/expect.dart'; - -enum Color { red, green, blue } - -enum Taste { sweet, sour, salty, bitter, umami } - -void main() { - Expect.equals(getValue(Taste.sweet, Color.blue), 1); - Expect.equals(getValue(Taste.bitter, Color.blue), 1); - Expect.equals(getValue(Taste.salty, Color.red), 2); - Expect.equals(getValue(Taste.salty, Color.blue), 4); - Expect.equals(getValue(Taste.salty, Color.green), 3); - Expect.equals(getValue(Taste.umami, Color.red), 4); -} - -int getValue(Taste taste, Color color) { - switch (taste) { - case Taste.sweet: - case Taste.sour: - case Taste.bitter: - return 1; - case Taste.salty: - switch (color) { - case Color.red: - return 2; - case Color.blue: - continue LABEL; - case Color.green: - return 3; - } - throw Exception('Invalid state.'); - LABEL: - case Taste.umami: - return 4; - } -} diff --git a/tests/language_2/switch/label_test.dart b/tests/language_2/switch/label_test.dart deleted file mode 100644 index d67bd328886..00000000000 --- a/tests/language_2/switch/label_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// 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. - -// Test switch statement using labels. - -// @dart = 2.9 - -// VMOptions= -// VMOptions=--force-switch-dispatch-type=0 -// VMOptions=--force-switch-dispatch-type=1 -// VMOptions=--force-switch-dispatch-type=2 - -import "package:expect/expect.dart"; - -class Switcher { - Switcher() {} - - say1(sound) { - var x = 0; - switch (sound) { - MOO: - case "moo": - x = 100; - break; - case "woof": - x = 200; - continue MOO; - default: - x = 300; - break; - } - return x; - } - - say2(sound) { - var x = 0; - switch (sound) { - WOOF: - case "woof": - x = 200; - break; - case "moo": - x = 100; - continue WOOF; - default: - x = 300; - break; - } - return x; - } - - // forward label to outer switch - say3(animal, sound) { - var x = 0; - switch (animal) { - case "cow": - switch (sound) { - case "moo": - x = 100; - break; - case "muh": - x = 200; - break; - default: - continue NIX_UNDERSTAND; - } - break; - case "dog": - if (sound == "woof") { - x = 300; - } else { - continue NIX_UNDERSTAND; - } - break; - NIX_UNDERSTAND: - case "unicorn": - x = 400; - break; - default: - x = 500; - break; - } - return x; - } -} - -class SwitchLabelTest { - static testMain() { - Switcher s = new Switcher(); - Expect.equals(100, s.say1("moo")); - Expect.equals(100, s.say1("woof")); - Expect.equals(300, s.say1("cockadoodledoo")); - - Expect.equals(200, s.say2("moo")); - Expect.equals(200, s.say2("woof")); - Expect.equals(300, s.say2("")); // Dead unicorn says nothing. - - Expect.equals(100, s.say3("cow", "moo")); - Expect.equals(200, s.say3("cow", "muh")); - Expect.equals(400, s.say3("cow", "boeh")); // Don't ask. - Expect.equals(300, s.say3("dog", "woof")); - Expect.equals(400, s.say3("dog", "boj")); // Ĉu vi parolas Esperanton? - Expect.equals(400, s.say3("unicorn", "")); // Still dead. - Expect.equals(500, s.say3("angry bird", "whoooo")); - } -} - -main() { - SwitchLabelTest.testMain(); -} diff --git a/tests/language_2/switch/nested_switch_label_test.dart b/tests/language_2/switch/nested_switch_label_test.dart deleted file mode 100644 index 1d1b2b50f38..00000000000 --- a/tests/language_2/switch/nested_switch_label_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test nested switch statement using labels. - -// VMOptions= -// VMOptions=--force-switch-dispatch-type=0 -// VMOptions=--force-switch-dispatch-type=1 -// VMOptions=--force-switch-dispatch-type=2 - -library nested_switch_label; - -import "package:expect/expect.dart"; - -void main() { - doSwitch(0, ['0', '2:0', '1', 'default']); - doSwitch(2, ['2:2', '2:1', '2', '1', 'default']); -} - -void doSwitch(int target, List expect) { - List list = []; - switch (target) { - outer0: - case 0: - list.add('0'); - continue outer2; - outer1: - case 1: - list.add('1'); - continue outerDefault; - outer2: - case 2: - switch (target) { - inner0: - case 0: - list.add('2:0'); - continue outer1; - inner2: - case 2: - list.add('2:2'); - continue inner1; - inner1: - case 1: - list.add('2:1'); - } - list.add('2'); - continue outer1; - outerDefault: - default: - list.add('default'); - } - Expect.listEquals(expect, list); -} diff --git a/tests/language_2/switch/scope_test.dart b/tests/language_2/switch/scope_test.dart deleted file mode 100644 index c36ec4a8ea7..00000000000 --- a/tests/language_2/switch/scope_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// 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. - -// Test that a new scope is introduced for each switch case. - -// @dart = 2.9 - -// VMOptions= -// VMOptions=--force-switch-dispatch-type=0 -// VMOptions=--force-switch-dispatch-type=1 -// VMOptions=--force-switch-dispatch-type=2 - -import "package:expect/expect.dart"; - -class SwitchScopeTest { - static testMain() { - switch (1) { - case 1: - final v = 1; - break; - case 2: - final v = 2; - Expect.equals(2, v); - break; - default: - final v = 3; - break; - } - } -} - -main() { - SwitchScopeTest.testMain(); -} diff --git a/tests/language_2/switch/switch1_test.dart b/tests/language_2/switch/switch1_test.dart deleted file mode 100644 index f461c0dd52b..00000000000 --- a/tests/language_2/switch/switch1_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Check that default clause must be last case. - -main() { - var a = 5; - var x; - S: switch (a) { - case 1: x = 1; break; - case 6: x = 2; break S; - default: -// ^ -// [cfe] Switch case may fall through to the next case. - case 8: break; -// ^^^^ -// [analyzer] SYNTACTIC_ERROR.SWITCH_HAS_CASE_AFTER_DEFAULT_CASE -// [cfe] The default case should be the last case in a switch statement. - } - return a; -} diff --git a/tests/language_2/switch/switch3_test.dart b/tests/language_2/switch/switch3_test.dart deleted file mode 100644 index 0b3d5bf6755..00000000000 --- a/tests/language_2/switch/switch3_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Check that 'continue' to switch statement is illegal. - -main() { - var a = 5; - var x; - switch (a) { - case 1: x = 1; break; - case 6: x = 2; continue; -// ^ -// [cfe] Switch case may fall through to the next case. -// ^^^^^^^^ -// [analyzer] SYNTACTIC_ERROR.CONTINUE_WITHOUT_LABEL_IN_CASE -// [cfe] A continue statement in a switch statement must have a label as a target. - case 8: break; - } - return a; -} diff --git a/tests/language_2/switch/switch4_test.dart b/tests/language_2/switch/switch4_test.dart deleted file mode 100644 index 31a30e74236..00000000000 --- a/tests/language_2/switch/switch4_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Discover unresolved case labels. - -main() { - var a = 5; - var x; - switch (a) { - case 1: - x = 1; - continue L; -// ^ -// [cfe] Can't find label 'L'. - // ^ - // [analyzer] COMPILE_TIME_ERROR.LABEL_UNDEFINED - case 6: - x = 2; - break; - case 8: - break; - } - return a; -} diff --git a/tests/language_2/switch/switch5_test.dart b/tests/language_2/switch/switch5_test.dart deleted file mode 100644 index 8d22193939e..00000000000 --- a/tests/language_2/switch/switch5_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Break' to case label is illegal. - -main() { - var a = 5; - var x; - switch (a) { - L: - case 1: - x = 1; - break; - case 6: -// ^ -// [cfe] Switch case may fall through to the next case. - x = 2; - break L; - // ^ - // [analyzer] COMPILE_TIME_ERROR.BREAK_LABEL_ON_SWITCH_MEMBER - // [cfe] Can't break to 'L'. - default: - break; - } - return a; -} diff --git a/tests/language_2/switch/switch6_test.dart b/tests/language_2/switch/switch6_test.dart deleted file mode 100644 index 9dad116c9ba..00000000000 --- a/tests/language_2/switch/switch6_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// 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. - -// The break is in the right scope, http://b/3428700 was agreed upon. - -// VMOptions= -// VMOptions=--force-switch-dispatch-type=0 -// VMOptions=--force-switch-dispatch-type=1 -// VMOptions=--force-switch-dispatch-type=2 - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Switch6Test { - static testMain() { - var a = 0; - var x = -1; - switch (a) { - case 0: - { - x = 0; - break; - } - case 1: - x = 1; - break; - } - Expect.equals(0, x); - } -} - -main() { - Switch6Test.testMain(); -} diff --git a/tests/language_2/switch/switch7_test.dart b/tests/language_2/switch/switch7_test.dart deleted file mode 100644 index e4ffb710f3e..00000000000 --- a/tests/language_2/switch/switch7_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Illegal to reference a labeled case statement with break. - -main() { - var x = 1; - L: - while (true) { - switch (x) { - L: - case 1: // Shadowing another label is OK. - break L; // Illegal, can't reference labeled case from break. - // ^ - // [analyzer] COMPILE_TIME_ERROR.BREAK_LABEL_ON_SWITCH_MEMBER - // [cfe] Can't break to 'L'. - } - } -} diff --git a/tests/language_2/switch/switch8_test.dart b/tests/language_2/switch/switch8_test.dart deleted file mode 100644 index 91e658ed79a..00000000000 --- a/tests/language_2/switch/switch8_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to not generate code for -// compile-time constants only seen in case expressions. - -class A { - const A(); -} - -main() { - switch (new List.filled(1, null)[0]) { - case const A(): - throw 'Test failed'; - } -} diff --git a/tests/language_2/switch/switch_test.dart b/tests/language_2/switch/switch_test.dart deleted file mode 100644 index f1908065bad..00000000000 --- a/tests/language_2/switch/switch_test.dart +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (c) 2012, 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. - -// Test switch statement. - -// VMOptions= -// VMOptions=--force-switch-dispatch-type=0 -// VMOptions=--force-switch-dispatch-type=1 -// VMOptions=--force-switch-dispatch-type=2 - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Switcher { - Switcher() {} - - test1(val) { - var x = 0; - switch (val) { - case 1: - x = 100; - break; - case 2: - case 3: - x = 200; - break; - case 4: - default: - { - x = 400; - break; - } - } - return x; - } - - test2(val) { - switch (val) { - case 1: - return 200; - default: - return 400; - } - } -} - -class SwitchTest { - static testMain() { - Switcher s = new Switcher(); - Expect.equals(100, s.test1(1)); - Expect.equals(200, s.test1(2)); - Expect.equals(200, s.test1(3)); - Expect.equals(400, s.test1(4)); - Expect.equals(400, s.test1(5)); - - Expect.equals(200, s.test2(1)); - Expect.equals(400, s.test2(2)); - } -} - -class Enum { - static const Enum e1 = const Enum(1); - static const Enum e2 = const Enum(2); - static const Enum e3 = const Enum(3); - final int id; - const Enum(this.id); -} - -void testSwitchEnum(Enum input, int expect) { - int result = null; - switch (input) { - case Enum.e1: - result = 10; - break; - case Enum.e2: - result = 20; - break; - case Enum.e3: - result = 30; - break; - default: - result = 40; - } - Expect.equals(expect, result); -} - -const int ic1 = 1; -const int ic2 = 2; -void testSwitchIntExpression(int input, int expect) { - int result = null; - switch (input) { - case 1 + 1: // 2 - case ic1 + 2: // 3 - result = 11; - break; - case ic2 * 2: // 4 - case 1 * 5: // 5 - result = 21; - break; - case ic1 % ic2 + 5: // 6 - result = 31; - break; - } - Expect.equals(expect, result); -} - -void testSwitchBool(bool input, int expect) { - int result = null; - switch (input) { - case true: - result = 12; - break; - case false: - result = 22; - } - Expect.equals(expect, result); -} - -void testSwitchString(String input, int expect) { - int result = null; - switch (input) { - case 'one': - result = 1; - break; - case 'two': - result = 2; - break; - } - Expect.equals(expect, result); -} - -switchConstString() { - const c = 'a'; - switch (c) { - case 'a': - return 'aa'; - case 'b': - return 'bb'; - case 'c': - return 'cc'; - case 'd': - return 'dd'; - case 'e': - return 'ee'; - case 'f': - return 'ff'; - } -} - -main() { - SwitchTest.testMain(); - - testSwitchEnum(Enum.e1, 10); - testSwitchEnum(Enum.e2, 20); - testSwitchEnum(Enum.e3, 30); - testSwitchEnum(null, 40); - - testSwitchIntExpression(2, 11); - testSwitchIntExpression(3, 11); - testSwitchIntExpression(4, 21); - testSwitchIntExpression(5, 21); - testSwitchIntExpression(6, 31); - testSwitchIntExpression(7, null); - - testSwitchBool(true, 12); - testSwitchBool(false, 22); - - testSwitchString(null, null); - testSwitchString('one', 1); - testSwitchString('two', 2); - testSwitchString('three', null); - - Expect.equals('aa', switchConstString()); -} diff --git a/tests/language_2/switch/try_catch_test.dart b/tests/language_2/switch/try_catch_test.dart deleted file mode 100644 index d95e4760df9..00000000000 --- a/tests/language_2/switch/try_catch_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2014, 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 - -// Regression test for issue 18869: Check that try-catch is working correctly -// inside switch-case clauses. - -// VMOptions= -// VMOptions=--force-switch-dispatch-type=0 -// VMOptions=--force-switch-dispatch-type=1 -// VMOptions=--force-switch-dispatch-type=2 - -import "package:expect/expect.dart"; - -test_switch() { - switch (0) { - _0: - case 0: - print("_0"); - continue _5; - _1: - case 1: - try { - print("bunny"); - continue _6; - } catch (e) {} - break; - _5: - case 5: - print("_5"); - continue _6; - _6: - case 6: - print("_6"); - throw 555; - } -} - -main() { - Expect.throws(() => test_switch(), (e) => e == 555); -} diff --git a/tests/language_2/symbol/conflict_test.dart b/tests/language_2/symbol/conflict_test.dart deleted file mode 100644 index b988b43cb7e..00000000000 --- a/tests/language_2/symbol/conflict_test.dart +++ /dev/null @@ -1,2817 +0,0 @@ -// Copyright (c) 2015, 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 - -// Tests that const symbols are only equal to the symbol they represent. - -import 'package:expect/expect.dart'; - -class A { - noSuchMethod(invocation) { - Expect.isFalse(oneAndTwoCharacterSymbols.contains(invocation.memberName)); - } -} - -main() { - var a = new A() as dynamic; - a.foo = 23; - a.foo; - a.bar; - a.longer; - a.anotherOne; - a.add(1); - a.isEmpty; -} - -/** - The following constant was generated with the following program: - - const RESERVED_WORDS = const [ - 'assert', 'break', 'case', 'catch', 'class', 'const', 'continue', - 'default', 'do', 'else', 'enum', 'extends', 'false', 'final', - 'finally', 'for', 'if', 'in', 'is', 'new', 'null', 'rethrow', - 'return', 'super', 'switch', 'this', 'throw', 'true', 'try', - 'var', 'void', 'while', 'with']; - - get chars sync* { - for (int i = "a".codeUnitAt(0); i <= "z".codeUnitAt(0); i++) { - yield new String.fromCharCodes([i]); - } - for (int i = "A".codeUnitAt(0); i <= "Z".codeUnitAt(0); i++) { - yield new String.fromCharCodes([i]); - } - } - - main() { - print("const oneAndTwoCharacterSymbols = const ["); - // One character symbols. - for (String c in chars) { - print(" const Symbol('$c'),"); - } - // Two character symbols. - for (String c1 in chars) { - for (String c2 in chars) { - if (!RESERVED_WORDS.contains('$c1$c2')) { - print(" const Symbol('$c1$c2'),"); - } - } - } - print("];"); - } -*/ -const oneAndTwoCharacterSymbols = const [ - const Symbol('a'), - const Symbol('b'), - const Symbol('c'), - const Symbol('d'), - const Symbol('e'), - const Symbol('f'), - const Symbol('g'), - const Symbol('h'), - const Symbol('i'), - const Symbol('j'), - const Symbol('k'), - const Symbol('l'), - const Symbol('m'), - const Symbol('n'), - const Symbol('o'), - const Symbol('p'), - const Symbol('q'), - const Symbol('r'), - const Symbol('s'), - const Symbol('t'), - const Symbol('u'), - const Symbol('v'), - const Symbol('w'), - const Symbol('x'), - const Symbol('y'), - const Symbol('z'), - const Symbol('A'), - const Symbol('B'), - const Symbol('C'), - const Symbol('D'), - const Symbol('E'), - const Symbol('F'), - const Symbol('G'), - const Symbol('H'), - const Symbol('I'), - const Symbol('J'), - const Symbol('K'), - const Symbol('L'), - const Symbol('M'), - const Symbol('N'), - const Symbol('O'), - const Symbol('P'), - const Symbol('Q'), - const Symbol('R'), - const Symbol('S'), - const Symbol('T'), - const Symbol('U'), - const Symbol('V'), - const Symbol('W'), - const Symbol('X'), - const Symbol('Y'), - const Symbol('Z'), - const Symbol('aa'), - const Symbol('ab'), - const Symbol('ac'), - const Symbol('ad'), - const Symbol('ae'), - const Symbol('af'), - const Symbol('ag'), - const Symbol('ah'), - const Symbol('ai'), - const Symbol('aj'), - const Symbol('ak'), - const Symbol('al'), - const Symbol('am'), - const Symbol('an'), - const Symbol('ao'), - const Symbol('ap'), - const Symbol('aq'), - const Symbol('ar'), - const Symbol('as'), - const Symbol('at'), - const Symbol('au'), - const Symbol('av'), - const Symbol('aw'), - const Symbol('ax'), - const Symbol('ay'), - const Symbol('az'), - const Symbol('aA'), - const Symbol('aB'), - const Symbol('aC'), - const Symbol('aD'), - const Symbol('aE'), - const Symbol('aF'), - const Symbol('aG'), - const Symbol('aH'), - const Symbol('aI'), - const Symbol('aJ'), - const Symbol('aK'), - const Symbol('aL'), - const Symbol('aM'), - const Symbol('aN'), - const Symbol('aO'), - const Symbol('aP'), - const Symbol('aQ'), - const Symbol('aR'), - const Symbol('aS'), - const Symbol('aT'), - const Symbol('aU'), - const Symbol('aV'), - const Symbol('aW'), - const Symbol('aX'), - const Symbol('aY'), - const Symbol('aZ'), - const Symbol('ba'), - const Symbol('bb'), - const Symbol('bc'), - const Symbol('bd'), - const Symbol('be'), - const Symbol('bf'), - const Symbol('bg'), - const Symbol('bh'), - const Symbol('bi'), - const Symbol('bj'), - const Symbol('bk'), - const Symbol('bl'), - const Symbol('bm'), - const Symbol('bn'), - const Symbol('bo'), - const Symbol('bp'), - const Symbol('bq'), - const Symbol('br'), - const Symbol('bs'), - const Symbol('bt'), - const Symbol('bu'), - const Symbol('bv'), - const Symbol('bw'), - const Symbol('bx'), - const Symbol('by'), - const Symbol('bz'), - const Symbol('bA'), - const Symbol('bB'), - const Symbol('bC'), - const Symbol('bD'), - const Symbol('bE'), - const Symbol('bF'), - const Symbol('bG'), - const Symbol('bH'), - const Symbol('bI'), - const Symbol('bJ'), - const Symbol('bK'), - const Symbol('bL'), - const Symbol('bM'), - const Symbol('bN'), - const Symbol('bO'), - const Symbol('bP'), - const Symbol('bQ'), - const Symbol('bR'), - const Symbol('bS'), - const Symbol('bT'), - const Symbol('bU'), - const Symbol('bV'), - const Symbol('bW'), - const Symbol('bX'), - const Symbol('bY'), - const Symbol('bZ'), - const Symbol('ca'), - const Symbol('cb'), - const Symbol('cc'), - const Symbol('cd'), - const Symbol('ce'), - const Symbol('cf'), - const Symbol('cg'), - const Symbol('ch'), - const Symbol('ci'), - const Symbol('cj'), - const Symbol('ck'), - const Symbol('cl'), - const Symbol('cm'), - const Symbol('cn'), - const Symbol('co'), - const Symbol('cp'), - const Symbol('cq'), - const Symbol('cr'), - const Symbol('cs'), - const Symbol('ct'), - const Symbol('cu'), - const Symbol('cv'), - const Symbol('cw'), - const Symbol('cx'), - const Symbol('cy'), - const Symbol('cz'), - const Symbol('cA'), - const Symbol('cB'), - const Symbol('cC'), - const Symbol('cD'), - const Symbol('cE'), - const Symbol('cF'), - const Symbol('cG'), - const Symbol('cH'), - const Symbol('cI'), - const Symbol('cJ'), - const Symbol('cK'), - const Symbol('cL'), - const Symbol('cM'), - const Symbol('cN'), - const Symbol('cO'), - const Symbol('cP'), - const Symbol('cQ'), - const Symbol('cR'), - const Symbol('cS'), - const Symbol('cT'), - const Symbol('cU'), - const Symbol('cV'), - const Symbol('cW'), - const Symbol('cX'), - const Symbol('cY'), - const Symbol('cZ'), - const Symbol('da'), - const Symbol('db'), - const Symbol('dc'), - const Symbol('dd'), - const Symbol('de'), - const Symbol('df'), - const Symbol('dg'), - const Symbol('dh'), - const Symbol('di'), - const Symbol('dj'), - const Symbol('dk'), - const Symbol('dl'), - const Symbol('dm'), - const Symbol('dn'), - const Symbol('dp'), - const Symbol('dq'), - const Symbol('dr'), - const Symbol('ds'), - const Symbol('dt'), - const Symbol('du'), - const Symbol('dv'), - const Symbol('dw'), - const Symbol('dx'), - const Symbol('dy'), - const Symbol('dz'), - const Symbol('dA'), - const Symbol('dB'), - const Symbol('dC'), - const Symbol('dD'), - const Symbol('dE'), - const Symbol('dF'), - const Symbol('dG'), - const Symbol('dH'), - const Symbol('dI'), - const Symbol('dJ'), - const Symbol('dK'), - const Symbol('dL'), - const Symbol('dM'), - const Symbol('dN'), - const Symbol('dO'), - const Symbol('dP'), - const Symbol('dQ'), - const Symbol('dR'), - const Symbol('dS'), - const Symbol('dT'), - const Symbol('dU'), - const Symbol('dV'), - const Symbol('dW'), - const Symbol('dX'), - const Symbol('dY'), - const Symbol('dZ'), - const Symbol('ea'), - const Symbol('eb'), - const Symbol('ec'), - const Symbol('ed'), - const Symbol('ee'), - const Symbol('ef'), - const Symbol('eg'), - const Symbol('eh'), - const Symbol('ei'), - const Symbol('ej'), - const Symbol('ek'), - const Symbol('el'), - const Symbol('em'), - const Symbol('en'), - const Symbol('eo'), - const Symbol('ep'), - const Symbol('eq'), - const Symbol('er'), - const Symbol('es'), - const Symbol('et'), - const Symbol('eu'), - const Symbol('ev'), - const Symbol('ew'), - const Symbol('ex'), - const Symbol('ey'), - const Symbol('ez'), - const Symbol('eA'), - const Symbol('eB'), - const Symbol('eC'), - const Symbol('eD'), - const Symbol('eE'), - const Symbol('eF'), - const Symbol('eG'), - const Symbol('eH'), - const Symbol('eI'), - const Symbol('eJ'), - const Symbol('eK'), - const Symbol('eL'), - const Symbol('eM'), - const Symbol('eN'), - const Symbol('eO'), - const Symbol('eP'), - const Symbol('eQ'), - const Symbol('eR'), - const Symbol('eS'), - const Symbol('eT'), - const Symbol('eU'), - const Symbol('eV'), - const Symbol('eW'), - const Symbol('eX'), - const Symbol('eY'), - const Symbol('eZ'), - const Symbol('fa'), - const Symbol('fb'), - const Symbol('fc'), - const Symbol('fd'), - const Symbol('fe'), - const Symbol('ff'), - const Symbol('fg'), - const Symbol('fh'), - const Symbol('fi'), - const Symbol('fj'), - const Symbol('fk'), - const Symbol('fl'), - const Symbol('fm'), - const Symbol('fn'), - const Symbol('fo'), - const Symbol('fp'), - const Symbol('fq'), - const Symbol('fr'), - const Symbol('fs'), - const Symbol('ft'), - const Symbol('fu'), - const Symbol('fv'), - const Symbol('fw'), - const Symbol('fx'), - const Symbol('fy'), - const Symbol('fz'), - const Symbol('fA'), - const Symbol('fB'), - const Symbol('fC'), - const Symbol('fD'), - const Symbol('fE'), - const Symbol('fF'), - const Symbol('fG'), - const Symbol('fH'), - const Symbol('fI'), - const Symbol('fJ'), - const Symbol('fK'), - const Symbol('fL'), - const Symbol('fM'), - const Symbol('fN'), - const Symbol('fO'), - const Symbol('fP'), - const Symbol('fQ'), - const Symbol('fR'), - const Symbol('fS'), - const Symbol('fT'), - const Symbol('fU'), - const Symbol('fV'), - const Symbol('fW'), - const Symbol('fX'), - const Symbol('fY'), - const Symbol('fZ'), - const Symbol('ga'), - const Symbol('gb'), - const Symbol('gc'), - const Symbol('gd'), - const Symbol('ge'), - const Symbol('gf'), - const Symbol('gg'), - const Symbol('gh'), - const Symbol('gi'), - const Symbol('gj'), - const Symbol('gk'), - const Symbol('gl'), - const Symbol('gm'), - const Symbol('gn'), - const Symbol('go'), - const Symbol('gp'), - const Symbol('gq'), - const Symbol('gr'), - const Symbol('gs'), - const Symbol('gt'), - const Symbol('gu'), - const Symbol('gv'), - const Symbol('gw'), - const Symbol('gx'), - const Symbol('gy'), - const Symbol('gz'), - const Symbol('gA'), - const Symbol('gB'), - const Symbol('gC'), - const Symbol('gD'), - const Symbol('gE'), - const Symbol('gF'), - const Symbol('gG'), - const Symbol('gH'), - const Symbol('gI'), - const Symbol('gJ'), - const Symbol('gK'), - const Symbol('gL'), - const Symbol('gM'), - const Symbol('gN'), - const Symbol('gO'), - const Symbol('gP'), - const Symbol('gQ'), - const Symbol('gR'), - const Symbol('gS'), - const Symbol('gT'), - const Symbol('gU'), - const Symbol('gV'), - const Symbol('gW'), - const Symbol('gX'), - const Symbol('gY'), - const Symbol('gZ'), - const Symbol('ha'), - const Symbol('hb'), - const Symbol('hc'), - const Symbol('hd'), - const Symbol('he'), - const Symbol('hf'), - const Symbol('hg'), - const Symbol('hh'), - const Symbol('hi'), - const Symbol('hj'), - const Symbol('hk'), - const Symbol('hl'), - const Symbol('hm'), - const Symbol('hn'), - const Symbol('ho'), - const Symbol('hp'), - const Symbol('hq'), - const Symbol('hr'), - const Symbol('hs'), - const Symbol('ht'), - const Symbol('hu'), - const Symbol('hv'), - const Symbol('hw'), - const Symbol('hx'), - const Symbol('hy'), - const Symbol('hz'), - const Symbol('hA'), - const Symbol('hB'), - const Symbol('hC'), - const Symbol('hD'), - const Symbol('hE'), - const Symbol('hF'), - const Symbol('hG'), - const Symbol('hH'), - const Symbol('hI'), - const Symbol('hJ'), - const Symbol('hK'), - const Symbol('hL'), - const Symbol('hM'), - const Symbol('hN'), - const Symbol('hO'), - const Symbol('hP'), - const Symbol('hQ'), - const Symbol('hR'), - const Symbol('hS'), - const Symbol('hT'), - const Symbol('hU'), - const Symbol('hV'), - const Symbol('hW'), - const Symbol('hX'), - const Symbol('hY'), - const Symbol('hZ'), - const Symbol('ia'), - const Symbol('ib'), - const Symbol('ic'), - const Symbol('id'), - const Symbol('ie'), - const Symbol('ig'), - const Symbol('ih'), - const Symbol('ii'), - const Symbol('ij'), - const Symbol('ik'), - const Symbol('il'), - const Symbol('im'), - const Symbol('io'), - const Symbol('ip'), - const Symbol('iq'), - const Symbol('ir'), - const Symbol('it'), - const Symbol('iu'), - const Symbol('iv'), - const Symbol('iw'), - const Symbol('ix'), - const Symbol('iy'), - const Symbol('iz'), - const Symbol('iA'), - const Symbol('iB'), - const Symbol('iC'), - const Symbol('iD'), - const Symbol('iE'), - const Symbol('iF'), - const Symbol('iG'), - const Symbol('iH'), - const Symbol('iI'), - const Symbol('iJ'), - const Symbol('iK'), - const Symbol('iL'), - const Symbol('iM'), - const Symbol('iN'), - const Symbol('iO'), - const Symbol('iP'), - const Symbol('iQ'), - const Symbol('iR'), - const Symbol('iS'), - const Symbol('iT'), - const Symbol('iU'), - const Symbol('iV'), - const Symbol('iW'), - const Symbol('iX'), - const Symbol('iY'), - const Symbol('iZ'), - const Symbol('ja'), - const Symbol('jb'), - const Symbol('jc'), - const Symbol('jd'), - const Symbol('je'), - const Symbol('jf'), - const Symbol('jg'), - const Symbol('jh'), - const Symbol('ji'), - const Symbol('jj'), - const Symbol('jk'), - const Symbol('jl'), - const Symbol('jm'), - const Symbol('jn'), - const Symbol('jo'), - const Symbol('jp'), - const Symbol('jq'), - const Symbol('jr'), - const Symbol('js'), - const Symbol('jt'), - const Symbol('ju'), - const Symbol('jv'), - const Symbol('jw'), - const Symbol('jx'), - const Symbol('jy'), - const Symbol('jz'), - const Symbol('jA'), - const Symbol('jB'), - const Symbol('jC'), - const Symbol('jD'), - const Symbol('jE'), - const Symbol('jF'), - const Symbol('jG'), - const Symbol('jH'), - const Symbol('jI'), - const Symbol('jJ'), - const Symbol('jK'), - const Symbol('jL'), - const Symbol('jM'), - const Symbol('jN'), - const Symbol('jO'), - const Symbol('jP'), - const Symbol('jQ'), - const Symbol('jR'), - const Symbol('jS'), - const Symbol('jT'), - const Symbol('jU'), - const Symbol('jV'), - const Symbol('jW'), - const Symbol('jX'), - const Symbol('jY'), - const Symbol('jZ'), - const Symbol('ka'), - const Symbol('kb'), - const Symbol('kc'), - const Symbol('kd'), - const Symbol('ke'), - const Symbol('kf'), - const Symbol('kg'), - const Symbol('kh'), - const Symbol('ki'), - const Symbol('kj'), - const Symbol('kk'), - const Symbol('kl'), - const Symbol('km'), - const Symbol('kn'), - const Symbol('ko'), - const Symbol('kp'), - const Symbol('kq'), - const Symbol('kr'), - const Symbol('ks'), - const Symbol('kt'), - const Symbol('ku'), - const Symbol('kv'), - const Symbol('kw'), - const Symbol('kx'), - const Symbol('ky'), - const Symbol('kz'), - const Symbol('kA'), - const Symbol('kB'), - const Symbol('kC'), - const Symbol('kD'), - const Symbol('kE'), - const Symbol('kF'), - const Symbol('kG'), - const Symbol('kH'), - const Symbol('kI'), - const Symbol('kJ'), - const Symbol('kK'), - const Symbol('kL'), - const Symbol('kM'), - const Symbol('kN'), - const Symbol('kO'), - const Symbol('kP'), - const Symbol('kQ'), - const Symbol('kR'), - const Symbol('kS'), - const Symbol('kT'), - const Symbol('kU'), - const Symbol('kV'), - const Symbol('kW'), - const Symbol('kX'), - const Symbol('kY'), - const Symbol('kZ'), - const Symbol('la'), - const Symbol('lb'), - const Symbol('lc'), - const Symbol('ld'), - const Symbol('le'), - const Symbol('lf'), - const Symbol('lg'), - const Symbol('lh'), - const Symbol('li'), - const Symbol('lj'), - const Symbol('lk'), - const Symbol('ll'), - const Symbol('lm'), - const Symbol('ln'), - const Symbol('lo'), - const Symbol('lp'), - const Symbol('lq'), - const Symbol('lr'), - const Symbol('ls'), - const Symbol('lt'), - const Symbol('lu'), - const Symbol('lv'), - const Symbol('lw'), - const Symbol('lx'), - const Symbol('ly'), - const Symbol('lz'), - const Symbol('lA'), - const Symbol('lB'), - const Symbol('lC'), - const Symbol('lD'), - const Symbol('lE'), - const Symbol('lF'), - const Symbol('lG'), - const Symbol('lH'), - const Symbol('lI'), - const Symbol('lJ'), - const Symbol('lK'), - const Symbol('lL'), - const Symbol('lM'), - const Symbol('lN'), - const Symbol('lO'), - const Symbol('lP'), - const Symbol('lQ'), - const Symbol('lR'), - const Symbol('lS'), - const Symbol('lT'), - const Symbol('lU'), - const Symbol('lV'), - const Symbol('lW'), - const Symbol('lX'), - const Symbol('lY'), - const Symbol('lZ'), - const Symbol('ma'), - const Symbol('mb'), - const Symbol('mc'), - const Symbol('md'), - const Symbol('me'), - const Symbol('mf'), - const Symbol('mg'), - const Symbol('mh'), - const Symbol('mi'), - const Symbol('mj'), - const Symbol('mk'), - const Symbol('ml'), - const Symbol('mm'), - const Symbol('mn'), - const Symbol('mo'), - const Symbol('mp'), - const Symbol('mq'), - const Symbol('mr'), - const Symbol('ms'), - const Symbol('mt'), - const Symbol('mu'), - const Symbol('mv'), - const Symbol('mw'), - const Symbol('mx'), - const Symbol('my'), - const Symbol('mz'), - const Symbol('mA'), - const Symbol('mB'), - const Symbol('mC'), - const Symbol('mD'), - const Symbol('mE'), - const Symbol('mF'), - const Symbol('mG'), - const Symbol('mH'), - const Symbol('mI'), - const Symbol('mJ'), - const Symbol('mK'), - const Symbol('mL'), - const Symbol('mM'), - const Symbol('mN'), - const Symbol('mO'), - const Symbol('mP'), - const Symbol('mQ'), - const Symbol('mR'), - const Symbol('mS'), - const Symbol('mT'), - const Symbol('mU'), - const Symbol('mV'), - const Symbol('mW'), - const Symbol('mX'), - const Symbol('mY'), - const Symbol('mZ'), - const Symbol('na'), - const Symbol('nb'), - const Symbol('nc'), - const Symbol('nd'), - const Symbol('ne'), - const Symbol('nf'), - const Symbol('ng'), - const Symbol('nh'), - const Symbol('ni'), - const Symbol('nj'), - const Symbol('nk'), - const Symbol('nl'), - const Symbol('nm'), - const Symbol('nn'), - const Symbol('no'), - const Symbol('np'), - const Symbol('nq'), - const Symbol('nr'), - const Symbol('ns'), - const Symbol('nt'), - const Symbol('nu'), - const Symbol('nv'), - const Symbol('nw'), - const Symbol('nx'), - const Symbol('ny'), - const Symbol('nz'), - const Symbol('nA'), - const Symbol('nB'), - const Symbol('nC'), - const Symbol('nD'), - const Symbol('nE'), - const Symbol('nF'), - const Symbol('nG'), - const Symbol('nH'), - const Symbol('nI'), - const Symbol('nJ'), - const Symbol('nK'), - const Symbol('nL'), - const Symbol('nM'), - const Symbol('nN'), - const Symbol('nO'), - const Symbol('nP'), - const Symbol('nQ'), - const Symbol('nR'), - const Symbol('nS'), - const Symbol('nT'), - const Symbol('nU'), - const Symbol('nV'), - const Symbol('nW'), - const Symbol('nX'), - const Symbol('nY'), - const Symbol('nZ'), - const Symbol('oa'), - const Symbol('ob'), - const Symbol('oc'), - const Symbol('od'), - const Symbol('oe'), - const Symbol('of'), - const Symbol('og'), - const Symbol('oh'), - const Symbol('oi'), - const Symbol('oj'), - const Symbol('ok'), - const Symbol('ol'), - const Symbol('om'), - const Symbol('on'), - const Symbol('oo'), - const Symbol('op'), - const Symbol('oq'), - const Symbol('or'), - const Symbol('os'), - const Symbol('ot'), - const Symbol('ou'), - const Symbol('ov'), - const Symbol('ow'), - const Symbol('ox'), - const Symbol('oy'), - const Symbol('oz'), - const Symbol('oA'), - const Symbol('oB'), - const Symbol('oC'), - const Symbol('oD'), - const Symbol('oE'), - const Symbol('oF'), - const Symbol('oG'), - const Symbol('oH'), - const Symbol('oI'), - const Symbol('oJ'), - const Symbol('oK'), - const Symbol('oL'), - const Symbol('oM'), - const Symbol('oN'), - const Symbol('oO'), - const Symbol('oP'), - const Symbol('oQ'), - const Symbol('oR'), - const Symbol('oS'), - const Symbol('oT'), - const Symbol('oU'), - const Symbol('oV'), - const Symbol('oW'), - const Symbol('oX'), - const Symbol('oY'), - const Symbol('oZ'), - const Symbol('pa'), - const Symbol('pb'), - const Symbol('pc'), - const Symbol('pd'), - const Symbol('pe'), - const Symbol('pf'), - const Symbol('pg'), - const Symbol('ph'), - const Symbol('pi'), - const Symbol('pj'), - const Symbol('pk'), - const Symbol('pl'), - const Symbol('pm'), - const Symbol('pn'), - const Symbol('po'), - const Symbol('pp'), - const Symbol('pq'), - const Symbol('pr'), - const Symbol('ps'), - const Symbol('pt'), - const Symbol('pu'), - const Symbol('pv'), - const Symbol('pw'), - const Symbol('px'), - const Symbol('py'), - const Symbol('pz'), - const Symbol('pA'), - const Symbol('pB'), - const Symbol('pC'), - const Symbol('pD'), - const Symbol('pE'), - const Symbol('pF'), - const Symbol('pG'), - const Symbol('pH'), - const Symbol('pI'), - const Symbol('pJ'), - const Symbol('pK'), - const Symbol('pL'), - const Symbol('pM'), - const Symbol('pN'), - const Symbol('pO'), - const Symbol('pP'), - const Symbol('pQ'), - const Symbol('pR'), - const Symbol('pS'), - const Symbol('pT'), - const Symbol('pU'), - const Symbol('pV'), - const Symbol('pW'), - const Symbol('pX'), - const Symbol('pY'), - const Symbol('pZ'), - const Symbol('qa'), - const Symbol('qb'), - const Symbol('qc'), - const Symbol('qd'), - const Symbol('qe'), - const Symbol('qf'), - const Symbol('qg'), - const Symbol('qh'), - const Symbol('qi'), - const Symbol('qj'), - const Symbol('qk'), - const Symbol('ql'), - const Symbol('qm'), - const Symbol('qn'), - const Symbol('qo'), - const Symbol('qp'), - const Symbol('qq'), - const Symbol('qr'), - const Symbol('qs'), - const Symbol('qt'), - const Symbol('qu'), - const Symbol('qv'), - const Symbol('qw'), - const Symbol('qx'), - const Symbol('qy'), - const Symbol('qz'), - const Symbol('qA'), - const Symbol('qB'), - const Symbol('qC'), - const Symbol('qD'), - const Symbol('qE'), - const Symbol('qF'), - const Symbol('qG'), - const Symbol('qH'), - const Symbol('qI'), - const Symbol('qJ'), - const Symbol('qK'), - const Symbol('qL'), - const Symbol('qM'), - const Symbol('qN'), - const Symbol('qO'), - const Symbol('qP'), - const Symbol('qQ'), - const Symbol('qR'), - const Symbol('qS'), - const Symbol('qT'), - const Symbol('qU'), - const Symbol('qV'), - const Symbol('qW'), - const Symbol('qX'), - const Symbol('qY'), - const Symbol('qZ'), - const Symbol('ra'), - const Symbol('rb'), - const Symbol('rc'), - const Symbol('rd'), - const Symbol('re'), - const Symbol('rf'), - const Symbol('rg'), - const Symbol('rh'), - const Symbol('ri'), - const Symbol('rj'), - const Symbol('rk'), - const Symbol('rl'), - const Symbol('rm'), - const Symbol('rn'), - const Symbol('ro'), - const Symbol('rp'), - const Symbol('rq'), - const Symbol('rr'), - const Symbol('rs'), - const Symbol('rt'), - const Symbol('ru'), - const Symbol('rv'), - const Symbol('rw'), - const Symbol('rx'), - const Symbol('ry'), - const Symbol('rz'), - const Symbol('rA'), - const Symbol('rB'), - const Symbol('rC'), - const Symbol('rD'), - const Symbol('rE'), - const Symbol('rF'), - const Symbol('rG'), - const Symbol('rH'), - const Symbol('rI'), - const Symbol('rJ'), - const Symbol('rK'), - const Symbol('rL'), - const Symbol('rM'), - const Symbol('rN'), - const Symbol('rO'), - const Symbol('rP'), - const Symbol('rQ'), - const Symbol('rR'), - const Symbol('rS'), - const Symbol('rT'), - const Symbol('rU'), - const Symbol('rV'), - const Symbol('rW'), - const Symbol('rX'), - const Symbol('rY'), - const Symbol('rZ'), - const Symbol('sa'), - const Symbol('sb'), - const Symbol('sc'), - const Symbol('sd'), - const Symbol('se'), - const Symbol('sf'), - const Symbol('sg'), - const Symbol('sh'), - const Symbol('si'), - const Symbol('sj'), - const Symbol('sk'), - const Symbol('sl'), - const Symbol('sm'), - const Symbol('sn'), - const Symbol('so'), - const Symbol('sp'), - const Symbol('sq'), - const Symbol('sr'), - const Symbol('ss'), - const Symbol('st'), - const Symbol('su'), - const Symbol('sv'), - const Symbol('sw'), - const Symbol('sx'), - const Symbol('sy'), - const Symbol('sz'), - const Symbol('sA'), - const Symbol('sB'), - const Symbol('sC'), - const Symbol('sD'), - const Symbol('sE'), - const Symbol('sF'), - const Symbol('sG'), - const Symbol('sH'), - const Symbol('sI'), - const Symbol('sJ'), - const Symbol('sK'), - const Symbol('sL'), - const Symbol('sM'), - const Symbol('sN'), - const Symbol('sO'), - const Symbol('sP'), - const Symbol('sQ'), - const Symbol('sR'), - const Symbol('sS'), - const Symbol('sT'), - const Symbol('sU'), - const Symbol('sV'), - const Symbol('sW'), - const Symbol('sX'), - const Symbol('sY'), - const Symbol('sZ'), - const Symbol('ta'), - const Symbol('tb'), - const Symbol('tc'), - const Symbol('td'), - const Symbol('te'), - const Symbol('tf'), - const Symbol('tg'), - const Symbol('th'), - const Symbol('ti'), - const Symbol('tj'), - const Symbol('tk'), - const Symbol('tl'), - const Symbol('tm'), - const Symbol('tn'), - const Symbol('to'), - const Symbol('tp'), - const Symbol('tq'), - const Symbol('tr'), - const Symbol('ts'), - const Symbol('tt'), - const Symbol('tu'), - const Symbol('tv'), - const Symbol('tw'), - const Symbol('tx'), - const Symbol('ty'), - const Symbol('tz'), - const Symbol('tA'), - const Symbol('tB'), - const Symbol('tC'), - const Symbol('tD'), - const Symbol('tE'), - const Symbol('tF'), - const Symbol('tG'), - const Symbol('tH'), - const Symbol('tI'), - const Symbol('tJ'), - const Symbol('tK'), - const Symbol('tL'), - const Symbol('tM'), - const Symbol('tN'), - const Symbol('tO'), - const Symbol('tP'), - const Symbol('tQ'), - const Symbol('tR'), - const Symbol('tS'), - const Symbol('tT'), - const Symbol('tU'), - const Symbol('tV'), - const Symbol('tW'), - const Symbol('tX'), - const Symbol('tY'), - const Symbol('tZ'), - const Symbol('ua'), - const Symbol('ub'), - const Symbol('uc'), - const Symbol('ud'), - const Symbol('ue'), - const Symbol('uf'), - const Symbol('ug'), - const Symbol('uh'), - const Symbol('ui'), - const Symbol('uj'), - const Symbol('uk'), - const Symbol('ul'), - const Symbol('um'), - const Symbol('un'), - const Symbol('uo'), - const Symbol('up'), - const Symbol('uq'), - const Symbol('ur'), - const Symbol('us'), - const Symbol('ut'), - const Symbol('uu'), - const Symbol('uv'), - const Symbol('uw'), - const Symbol('ux'), - const Symbol('uy'), - const Symbol('uz'), - const Symbol('uA'), - const Symbol('uB'), - const Symbol('uC'), - const Symbol('uD'), - const Symbol('uE'), - const Symbol('uF'), - const Symbol('uG'), - const Symbol('uH'), - const Symbol('uI'), - const Symbol('uJ'), - const Symbol('uK'), - const Symbol('uL'), - const Symbol('uM'), - const Symbol('uN'), - const Symbol('uO'), - const Symbol('uP'), - const Symbol('uQ'), - const Symbol('uR'), - const Symbol('uS'), - const Symbol('uT'), - const Symbol('uU'), - const Symbol('uV'), - const Symbol('uW'), - const Symbol('uX'), - const Symbol('uY'), - const Symbol('uZ'), - const Symbol('va'), - const Symbol('vb'), - const Symbol('vc'), - const Symbol('vd'), - const Symbol('ve'), - const Symbol('vf'), - const Symbol('vg'), - const Symbol('vh'), - const Symbol('vi'), - const Symbol('vj'), - const Symbol('vk'), - const Symbol('vl'), - const Symbol('vm'), - const Symbol('vn'), - const Symbol('vo'), - const Symbol('vp'), - const Symbol('vq'), - const Symbol('vr'), - const Symbol('vs'), - const Symbol('vt'), - const Symbol('vu'), - const Symbol('vv'), - const Symbol('vw'), - const Symbol('vx'), - const Symbol('vy'), - const Symbol('vz'), - const Symbol('vA'), - const Symbol('vB'), - const Symbol('vC'), - const Symbol('vD'), - const Symbol('vE'), - const Symbol('vF'), - const Symbol('vG'), - const Symbol('vH'), - const Symbol('vI'), - const Symbol('vJ'), - const Symbol('vK'), - const Symbol('vL'), - const Symbol('vM'), - const Symbol('vN'), - const Symbol('vO'), - const Symbol('vP'), - const Symbol('vQ'), - const Symbol('vR'), - const Symbol('vS'), - const Symbol('vT'), - const Symbol('vU'), - const Symbol('vV'), - const Symbol('vW'), - const Symbol('vX'), - const Symbol('vY'), - const Symbol('vZ'), - const Symbol('wa'), - const Symbol('wb'), - const Symbol('wc'), - const Symbol('wd'), - const Symbol('we'), - const Symbol('wf'), - const Symbol('wg'), - const Symbol('wh'), - const Symbol('wi'), - const Symbol('wj'), - const Symbol('wk'), - const Symbol('wl'), - const Symbol('wm'), - const Symbol('wn'), - const Symbol('wo'), - const Symbol('wp'), - const Symbol('wq'), - const Symbol('wr'), - const Symbol('ws'), - const Symbol('wt'), - const Symbol('wu'), - const Symbol('wv'), - const Symbol('ww'), - const Symbol('wx'), - const Symbol('wy'), - const Symbol('wz'), - const Symbol('wA'), - const Symbol('wB'), - const Symbol('wC'), - const Symbol('wD'), - const Symbol('wE'), - const Symbol('wF'), - const Symbol('wG'), - const Symbol('wH'), - const Symbol('wI'), - const Symbol('wJ'), - const Symbol('wK'), - const Symbol('wL'), - const Symbol('wM'), - const Symbol('wN'), - const Symbol('wO'), - const Symbol('wP'), - const Symbol('wQ'), - const Symbol('wR'), - const Symbol('wS'), - const Symbol('wT'), - const Symbol('wU'), - const Symbol('wV'), - const Symbol('wW'), - const Symbol('wX'), - const Symbol('wY'), - const Symbol('wZ'), - const Symbol('xa'), - const Symbol('xb'), - const Symbol('xc'), - const Symbol('xd'), - const Symbol('xe'), - const Symbol('xf'), - const Symbol('xg'), - const Symbol('xh'), - const Symbol('xi'), - const Symbol('xj'), - const Symbol('xk'), - const Symbol('xl'), - const Symbol('xm'), - const Symbol('xn'), - const Symbol('xo'), - const Symbol('xp'), - const Symbol('xq'), - const Symbol('xr'), - const Symbol('xs'), - const Symbol('xt'), - const Symbol('xu'), - const Symbol('xv'), - const Symbol('xw'), - const Symbol('xx'), - const Symbol('xy'), - const Symbol('xz'), - const Symbol('xA'), - const Symbol('xB'), - const Symbol('xC'), - const Symbol('xD'), - const Symbol('xE'), - const Symbol('xF'), - const Symbol('xG'), - const Symbol('xH'), - const Symbol('xI'), - const Symbol('xJ'), - const Symbol('xK'), - const Symbol('xL'), - const Symbol('xM'), - const Symbol('xN'), - const Symbol('xO'), - const Symbol('xP'), - const Symbol('xQ'), - const Symbol('xR'), - const Symbol('xS'), - const Symbol('xT'), - const Symbol('xU'), - const Symbol('xV'), - const Symbol('xW'), - const Symbol('xX'), - const Symbol('xY'), - const Symbol('xZ'), - const Symbol('ya'), - const Symbol('yb'), - const Symbol('yc'), - const Symbol('yd'), - const Symbol('ye'), - const Symbol('yf'), - const Symbol('yg'), - const Symbol('yh'), - const Symbol('yi'), - const Symbol('yj'), - const Symbol('yk'), - const Symbol('yl'), - const Symbol('ym'), - const Symbol('yn'), - const Symbol('yo'), - const Symbol('yp'), - const Symbol('yq'), - const Symbol('yr'), - const Symbol('ys'), - const Symbol('yt'), - const Symbol('yu'), - const Symbol('yv'), - const Symbol('yw'), - const Symbol('yx'), - const Symbol('yy'), - const Symbol('yz'), - const Symbol('yA'), - const Symbol('yB'), - const Symbol('yC'), - const Symbol('yD'), - const Symbol('yE'), - const Symbol('yF'), - const Symbol('yG'), - const Symbol('yH'), - const Symbol('yI'), - const Symbol('yJ'), - const Symbol('yK'), - const Symbol('yL'), - const Symbol('yM'), - const Symbol('yN'), - const Symbol('yO'), - const Symbol('yP'), - const Symbol('yQ'), - const Symbol('yR'), - const Symbol('yS'), - const Symbol('yT'), - const Symbol('yU'), - const Symbol('yV'), - const Symbol('yW'), - const Symbol('yX'), - const Symbol('yY'), - const Symbol('yZ'), - const Symbol('za'), - const Symbol('zb'), - const Symbol('zc'), - const Symbol('zd'), - const Symbol('ze'), - const Symbol('zf'), - const Symbol('zg'), - const Symbol('zh'), - const Symbol('zi'), - const Symbol('zj'), - const Symbol('zk'), - const Symbol('zl'), - const Symbol('zm'), - const Symbol('zn'), - const Symbol('zo'), - const Symbol('zp'), - const Symbol('zq'), - const Symbol('zr'), - const Symbol('zs'), - const Symbol('zt'), - const Symbol('zu'), - const Symbol('zv'), - const Symbol('zw'), - const Symbol('zx'), - const Symbol('zy'), - const Symbol('zz'), - const Symbol('zA'), - const Symbol('zB'), - const Symbol('zC'), - const Symbol('zD'), - const Symbol('zE'), - const Symbol('zF'), - const Symbol('zG'), - const Symbol('zH'), - const Symbol('zI'), - const Symbol('zJ'), - const Symbol('zK'), - const Symbol('zL'), - const Symbol('zM'), - const Symbol('zN'), - const Symbol('zO'), - const Symbol('zP'), - const Symbol('zQ'), - const Symbol('zR'), - const Symbol('zS'), - const Symbol('zT'), - const Symbol('zU'), - const Symbol('zV'), - const Symbol('zW'), - const Symbol('zX'), - const Symbol('zY'), - const Symbol('zZ'), - const Symbol('Aa'), - const Symbol('Ab'), - const Symbol('Ac'), - const Symbol('Ad'), - const Symbol('Ae'), - const Symbol('Af'), - const Symbol('Ag'), - const Symbol('Ah'), - const Symbol('Ai'), - const Symbol('Aj'), - const Symbol('Ak'), - const Symbol('Al'), - const Symbol('Am'), - const Symbol('An'), - const Symbol('Ao'), - const Symbol('Ap'), - const Symbol('Aq'), - const Symbol('Ar'), - const Symbol('As'), - const Symbol('At'), - const Symbol('Au'), - const Symbol('Av'), - const Symbol('Aw'), - const Symbol('Ax'), - const Symbol('Ay'), - const Symbol('Az'), - const Symbol('AA'), - const Symbol('AB'), - const Symbol('AC'), - const Symbol('AD'), - const Symbol('AE'), - const Symbol('AF'), - const Symbol('AG'), - const Symbol('AH'), - const Symbol('AI'), - const Symbol('AJ'), - const Symbol('AK'), - const Symbol('AL'), - const Symbol('AM'), - const Symbol('AN'), - const Symbol('AO'), - const Symbol('AP'), - const Symbol('AQ'), - const Symbol('AR'), - const Symbol('AS'), - const Symbol('AT'), - const Symbol('AU'), - const Symbol('AV'), - const Symbol('AW'), - const Symbol('AX'), - const Symbol('AY'), - const Symbol('AZ'), - const Symbol('Ba'), - const Symbol('Bb'), - const Symbol('Bc'), - const Symbol('Bd'), - const Symbol('Be'), - const Symbol('Bf'), - const Symbol('Bg'), - const Symbol('Bh'), - const Symbol('Bi'), - const Symbol('Bj'), - const Symbol('Bk'), - const Symbol('Bl'), - const Symbol('Bm'), - const Symbol('Bn'), - const Symbol('Bo'), - const Symbol('Bp'), - const Symbol('Bq'), - const Symbol('Br'), - const Symbol('Bs'), - const Symbol('Bt'), - const Symbol('Bu'), - const Symbol('Bv'), - const Symbol('Bw'), - const Symbol('Bx'), - const Symbol('By'), - const Symbol('Bz'), - const Symbol('BA'), - const Symbol('BB'), - const Symbol('BC'), - const Symbol('BD'), - const Symbol('BE'), - const Symbol('BF'), - const Symbol('BG'), - const Symbol('BH'), - const Symbol('BI'), - const Symbol('BJ'), - const Symbol('BK'), - const Symbol('BL'), - const Symbol('BM'), - const Symbol('BN'), - const Symbol('BO'), - const Symbol('BP'), - const Symbol('BQ'), - const Symbol('BR'), - const Symbol('BS'), - const Symbol('BT'), - const Symbol('BU'), - const Symbol('BV'), - const Symbol('BW'), - const Symbol('BX'), - const Symbol('BY'), - const Symbol('BZ'), - const Symbol('Ca'), - const Symbol('Cb'), - const Symbol('Cc'), - const Symbol('Cd'), - const Symbol('Ce'), - const Symbol('Cf'), - const Symbol('Cg'), - const Symbol('Ch'), - const Symbol('Ci'), - const Symbol('Cj'), - const Symbol('Ck'), - const Symbol('Cl'), - const Symbol('Cm'), - const Symbol('Cn'), - const Symbol('Co'), - const Symbol('Cp'), - const Symbol('Cq'), - const Symbol('Cr'), - const Symbol('Cs'), - const Symbol('Ct'), - const Symbol('Cu'), - const Symbol('Cv'), - const Symbol('Cw'), - const Symbol('Cx'), - const Symbol('Cy'), - const Symbol('Cz'), - const Symbol('CA'), - const Symbol('CB'), - const Symbol('CC'), - const Symbol('CD'), - const Symbol('CE'), - const Symbol('CF'), - const Symbol('CG'), - const Symbol('CH'), - const Symbol('CI'), - const Symbol('CJ'), - const Symbol('CK'), - const Symbol('CL'), - const Symbol('CM'), - const Symbol('CN'), - const Symbol('CO'), - const Symbol('CP'), - const Symbol('CQ'), - const Symbol('CR'), - const Symbol('CS'), - const Symbol('CT'), - const Symbol('CU'), - const Symbol('CV'), - const Symbol('CW'), - const Symbol('CX'), - const Symbol('CY'), - const Symbol('CZ'), - const Symbol('Da'), - const Symbol('Db'), - const Symbol('Dc'), - const Symbol('Dd'), - const Symbol('De'), - const Symbol('Df'), - const Symbol('Dg'), - const Symbol('Dh'), - const Symbol('Di'), - const Symbol('Dj'), - const Symbol('Dk'), - const Symbol('Dl'), - const Symbol('Dm'), - const Symbol('Dn'), - const Symbol('Do'), - const Symbol('Dp'), - const Symbol('Dq'), - const Symbol('Dr'), - const Symbol('Ds'), - const Symbol('Dt'), - const Symbol('Du'), - const Symbol('Dv'), - const Symbol('Dw'), - const Symbol('Dx'), - const Symbol('Dy'), - const Symbol('Dz'), - const Symbol('DA'), - const Symbol('DB'), - const Symbol('DC'), - const Symbol('DD'), - const Symbol('DE'), - const Symbol('DF'), - const Symbol('DG'), - const Symbol('DH'), - const Symbol('DI'), - const Symbol('DJ'), - const Symbol('DK'), - const Symbol('DL'), - const Symbol('DM'), - const Symbol('DN'), - const Symbol('DO'), - const Symbol('DP'), - const Symbol('DQ'), - const Symbol('DR'), - const Symbol('DS'), - const Symbol('DT'), - const Symbol('DU'), - const Symbol('DV'), - const Symbol('DW'), - const Symbol('DX'), - const Symbol('DY'), - const Symbol('DZ'), - const Symbol('Ea'), - const Symbol('Eb'), - const Symbol('Ec'), - const Symbol('Ed'), - const Symbol('Ee'), - const Symbol('Ef'), - const Symbol('Eg'), - const Symbol('Eh'), - const Symbol('Ei'), - const Symbol('Ej'), - const Symbol('Ek'), - const Symbol('El'), - const Symbol('Em'), - const Symbol('En'), - const Symbol('Eo'), - const Symbol('Ep'), - const Symbol('Eq'), - const Symbol('Er'), - const Symbol('Es'), - const Symbol('Et'), - const Symbol('Eu'), - const Symbol('Ev'), - const Symbol('Ew'), - const Symbol('Ex'), - const Symbol('Ey'), - const Symbol('Ez'), - const Symbol('EA'), - const Symbol('EB'), - const Symbol('EC'), - const Symbol('ED'), - const Symbol('EE'), - const Symbol('EF'), - const Symbol('EG'), - const Symbol('EH'), - const Symbol('EI'), - const Symbol('EJ'), - const Symbol('EK'), - const Symbol('EL'), - const Symbol('EM'), - const Symbol('EN'), - const Symbol('EO'), - const Symbol('EP'), - const Symbol('EQ'), - const Symbol('ER'), - const Symbol('ES'), - const Symbol('ET'), - const Symbol('EU'), - const Symbol('EV'), - const Symbol('EW'), - const Symbol('EX'), - const Symbol('EY'), - const Symbol('EZ'), - const Symbol('Fa'), - const Symbol('Fb'), - const Symbol('Fc'), - const Symbol('Fd'), - const Symbol('Fe'), - const Symbol('Ff'), - const Symbol('Fg'), - const Symbol('Fh'), - const Symbol('Fi'), - const Symbol('Fj'), - const Symbol('Fk'), - const Symbol('Fl'), - const Symbol('Fm'), - const Symbol('Fn'), - const Symbol('Fo'), - const Symbol('Fp'), - const Symbol('Fq'), - const Symbol('Fr'), - const Symbol('Fs'), - const Symbol('Ft'), - const Symbol('Fu'), - const Symbol('Fv'), - const Symbol('Fw'), - const Symbol('Fx'), - const Symbol('Fy'), - const Symbol('Fz'), - const Symbol('FA'), - const Symbol('FB'), - const Symbol('FC'), - const Symbol('FD'), - const Symbol('FE'), - const Symbol('FF'), - const Symbol('FG'), - const Symbol('FH'), - const Symbol('FI'), - const Symbol('FJ'), - const Symbol('FK'), - const Symbol('FL'), - const Symbol('FM'), - const Symbol('FN'), - const Symbol('FO'), - const Symbol('FP'), - const Symbol('FQ'), - const Symbol('FR'), - const Symbol('FS'), - const Symbol('FT'), - const Symbol('FU'), - const Symbol('FV'), - const Symbol('FW'), - const Symbol('FX'), - const Symbol('FY'), - const Symbol('FZ'), - const Symbol('Ga'), - const Symbol('Gb'), - const Symbol('Gc'), - const Symbol('Gd'), - const Symbol('Ge'), - const Symbol('Gf'), - const Symbol('Gg'), - const Symbol('Gh'), - const Symbol('Gi'), - const Symbol('Gj'), - const Symbol('Gk'), - const Symbol('Gl'), - const Symbol('Gm'), - const Symbol('Gn'), - const Symbol('Go'), - const Symbol('Gp'), - const Symbol('Gq'), - const Symbol('Gr'), - const Symbol('Gs'), - const Symbol('Gt'), - const Symbol('Gu'), - const Symbol('Gv'), - const Symbol('Gw'), - const Symbol('Gx'), - const Symbol('Gy'), - const Symbol('Gz'), - const Symbol('GA'), - const Symbol('GB'), - const Symbol('GC'), - const Symbol('GD'), - const Symbol('GE'), - const Symbol('GF'), - const Symbol('GG'), - const Symbol('GH'), - const Symbol('GI'), - const Symbol('GJ'), - const Symbol('GK'), - const Symbol('GL'), - const Symbol('GM'), - const Symbol('GN'), - const Symbol('GO'), - const Symbol('GP'), - const Symbol('GQ'), - const Symbol('GR'), - const Symbol('GS'), - const Symbol('GT'), - const Symbol('GU'), - const Symbol('GV'), - const Symbol('GW'), - const Symbol('GX'), - const Symbol('GY'), - const Symbol('GZ'), - const Symbol('Ha'), - const Symbol('Hb'), - const Symbol('Hc'), - const Symbol('Hd'), - const Symbol('He'), - const Symbol('Hf'), - const Symbol('Hg'), - const Symbol('Hh'), - const Symbol('Hi'), - const Symbol('Hj'), - const Symbol('Hk'), - const Symbol('Hl'), - const Symbol('Hm'), - const Symbol('Hn'), - const Symbol('Ho'), - const Symbol('Hp'), - const Symbol('Hq'), - const Symbol('Hr'), - const Symbol('Hs'), - const Symbol('Ht'), - const Symbol('Hu'), - const Symbol('Hv'), - const Symbol('Hw'), - const Symbol('Hx'), - const Symbol('Hy'), - const Symbol('Hz'), - const Symbol('HA'), - const Symbol('HB'), - const Symbol('HC'), - const Symbol('HD'), - const Symbol('HE'), - const Symbol('HF'), - const Symbol('HG'), - const Symbol('HH'), - const Symbol('HI'), - const Symbol('HJ'), - const Symbol('HK'), - const Symbol('HL'), - const Symbol('HM'), - const Symbol('HN'), - const Symbol('HO'), - const Symbol('HP'), - const Symbol('HQ'), - const Symbol('HR'), - const Symbol('HS'), - const Symbol('HT'), - const Symbol('HU'), - const Symbol('HV'), - const Symbol('HW'), - const Symbol('HX'), - const Symbol('HY'), - const Symbol('HZ'), - const Symbol('Ia'), - const Symbol('Ib'), - const Symbol('Ic'), - const Symbol('Id'), - const Symbol('Ie'), - const Symbol('If'), - const Symbol('Ig'), - const Symbol('Ih'), - const Symbol('Ii'), - const Symbol('Ij'), - const Symbol('Ik'), - const Symbol('Il'), - const Symbol('Im'), - const Symbol('In'), - const Symbol('Io'), - const Symbol('Ip'), - const Symbol('Iq'), - const Symbol('Ir'), - const Symbol('Is'), - const Symbol('It'), - const Symbol('Iu'), - const Symbol('Iv'), - const Symbol('Iw'), - const Symbol('Ix'), - const Symbol('Iy'), - const Symbol('Iz'), - const Symbol('IA'), - const Symbol('IB'), - const Symbol('IC'), - const Symbol('ID'), - const Symbol('IE'), - const Symbol('IF'), - const Symbol('IG'), - const Symbol('IH'), - const Symbol('II'), - const Symbol('IJ'), - const Symbol('IK'), - const Symbol('IL'), - const Symbol('IM'), - const Symbol('IN'), - const Symbol('IO'), - const Symbol('IP'), - const Symbol('IQ'), - const Symbol('IR'), - const Symbol('IS'), - const Symbol('IT'), - const Symbol('IU'), - const Symbol('IV'), - const Symbol('IW'), - const Symbol('IX'), - const Symbol('IY'), - const Symbol('IZ'), - const Symbol('Ja'), - const Symbol('Jb'), - const Symbol('Jc'), - const Symbol('Jd'), - const Symbol('Je'), - const Symbol('Jf'), - const Symbol('Jg'), - const Symbol('Jh'), - const Symbol('Ji'), - const Symbol('Jj'), - const Symbol('Jk'), - const Symbol('Jl'), - const Symbol('Jm'), - const Symbol('Jn'), - const Symbol('Jo'), - const Symbol('Jp'), - const Symbol('Jq'), - const Symbol('Jr'), - const Symbol('Js'), - const Symbol('Jt'), - const Symbol('Ju'), - const Symbol('Jv'), - const Symbol('Jw'), - const Symbol('Jx'), - const Symbol('Jy'), - const Symbol('Jz'), - const Symbol('JA'), - const Symbol('JB'), - const Symbol('JC'), - const Symbol('JD'), - const Symbol('JE'), - const Symbol('JF'), - const Symbol('JG'), - const Symbol('JH'), - const Symbol('JI'), - const Symbol('JJ'), - const Symbol('JK'), - const Symbol('JL'), - const Symbol('JM'), - const Symbol('JN'), - const Symbol('JO'), - const Symbol('JP'), - const Symbol('JQ'), - const Symbol('JR'), - const Symbol('JS'), - const Symbol('JT'), - const Symbol('JU'), - const Symbol('JV'), - const Symbol('JW'), - const Symbol('JX'), - const Symbol('JY'), - const Symbol('JZ'), - const Symbol('Ka'), - const Symbol('Kb'), - const Symbol('Kc'), - const Symbol('Kd'), - const Symbol('Ke'), - const Symbol('Kf'), - const Symbol('Kg'), - const Symbol('Kh'), - const Symbol('Ki'), - const Symbol('Kj'), - const Symbol('Kk'), - const Symbol('Kl'), - const Symbol('Km'), - const Symbol('Kn'), - const Symbol('Ko'), - const Symbol('Kp'), - const Symbol('Kq'), - const Symbol('Kr'), - const Symbol('Ks'), - const Symbol('Kt'), - const Symbol('Ku'), - const Symbol('Kv'), - const Symbol('Kw'), - const Symbol('Kx'), - const Symbol('Ky'), - const Symbol('Kz'), - const Symbol('KA'), - const Symbol('KB'), - const Symbol('KC'), - const Symbol('KD'), - const Symbol('KE'), - const Symbol('KF'), - const Symbol('KG'), - const Symbol('KH'), - const Symbol('KI'), - const Symbol('KJ'), - const Symbol('KK'), - const Symbol('KL'), - const Symbol('KM'), - const Symbol('KN'), - const Symbol('KO'), - const Symbol('KP'), - const Symbol('KQ'), - const Symbol('KR'), - const Symbol('KS'), - const Symbol('KT'), - const Symbol('KU'), - const Symbol('KV'), - const Symbol('KW'), - const Symbol('KX'), - const Symbol('KY'), - const Symbol('KZ'), - const Symbol('La'), - const Symbol('Lb'), - const Symbol('Lc'), - const Symbol('Ld'), - const Symbol('Le'), - const Symbol('Lf'), - const Symbol('Lg'), - const Symbol('Lh'), - const Symbol('Li'), - const Symbol('Lj'), - const Symbol('Lk'), - const Symbol('Ll'), - const Symbol('Lm'), - const Symbol('Ln'), - const Symbol('Lo'), - const Symbol('Lp'), - const Symbol('Lq'), - const Symbol('Lr'), - const Symbol('Ls'), - const Symbol('Lt'), - const Symbol('Lu'), - const Symbol('Lv'), - const Symbol('Lw'), - const Symbol('Lx'), - const Symbol('Ly'), - const Symbol('Lz'), - const Symbol('LA'), - const Symbol('LB'), - const Symbol('LC'), - const Symbol('LD'), - const Symbol('LE'), - const Symbol('LF'), - const Symbol('LG'), - const Symbol('LH'), - const Symbol('LI'), - const Symbol('LJ'), - const Symbol('LK'), - const Symbol('LL'), - const Symbol('LM'), - const Symbol('LN'), - const Symbol('LO'), - const Symbol('LP'), - const Symbol('LQ'), - const Symbol('LR'), - const Symbol('LS'), - const Symbol('LT'), - const Symbol('LU'), - const Symbol('LV'), - const Symbol('LW'), - const Symbol('LX'), - const Symbol('LY'), - const Symbol('LZ'), - const Symbol('Ma'), - const Symbol('Mb'), - const Symbol('Mc'), - const Symbol('Md'), - const Symbol('Me'), - const Symbol('Mf'), - const Symbol('Mg'), - const Symbol('Mh'), - const Symbol('Mi'), - const Symbol('Mj'), - const Symbol('Mk'), - const Symbol('Ml'), - const Symbol('Mm'), - const Symbol('Mn'), - const Symbol('Mo'), - const Symbol('Mp'), - const Symbol('Mq'), - const Symbol('Mr'), - const Symbol('Ms'), - const Symbol('Mt'), - const Symbol('Mu'), - const Symbol('Mv'), - const Symbol('Mw'), - const Symbol('Mx'), - const Symbol('My'), - const Symbol('Mz'), - const Symbol('MA'), - const Symbol('MB'), - const Symbol('MC'), - const Symbol('MD'), - const Symbol('ME'), - const Symbol('MF'), - const Symbol('MG'), - const Symbol('MH'), - const Symbol('MI'), - const Symbol('MJ'), - const Symbol('MK'), - const Symbol('ML'), - const Symbol('MM'), - const Symbol('MN'), - const Symbol('MO'), - const Symbol('MP'), - const Symbol('MQ'), - const Symbol('MR'), - const Symbol('MS'), - const Symbol('MT'), - const Symbol('MU'), - const Symbol('MV'), - const Symbol('MW'), - const Symbol('MX'), - const Symbol('MY'), - const Symbol('MZ'), - const Symbol('Na'), - const Symbol('Nb'), - const Symbol('Nc'), - const Symbol('Nd'), - const Symbol('Ne'), - const Symbol('Nf'), - const Symbol('Ng'), - const Symbol('Nh'), - const Symbol('Ni'), - const Symbol('Nj'), - const Symbol('Nk'), - const Symbol('Nl'), - const Symbol('Nm'), - const Symbol('Nn'), - const Symbol('No'), - const Symbol('Np'), - const Symbol('Nq'), - const Symbol('Nr'), - const Symbol('Ns'), - const Symbol('Nt'), - const Symbol('Nu'), - const Symbol('Nv'), - const Symbol('Nw'), - const Symbol('Nx'), - const Symbol('Ny'), - const Symbol('Nz'), - const Symbol('NA'), - const Symbol('NB'), - const Symbol('NC'), - const Symbol('ND'), - const Symbol('NE'), - const Symbol('NF'), - const Symbol('NG'), - const Symbol('NH'), - const Symbol('NI'), - const Symbol('NJ'), - const Symbol('NK'), - const Symbol('NL'), - const Symbol('NM'), - const Symbol('NN'), - const Symbol('NO'), - const Symbol('NP'), - const Symbol('NQ'), - const Symbol('NR'), - const Symbol('NS'), - const Symbol('NT'), - const Symbol('NU'), - const Symbol('NV'), - const Symbol('NW'), - const Symbol('NX'), - const Symbol('NY'), - const Symbol('NZ'), - const Symbol('Oa'), - const Symbol('Ob'), - const Symbol('Oc'), - const Symbol('Od'), - const Symbol('Oe'), - const Symbol('Of'), - const Symbol('Og'), - const Symbol('Oh'), - const Symbol('Oi'), - const Symbol('Oj'), - const Symbol('Ok'), - const Symbol('Ol'), - const Symbol('Om'), - const Symbol('On'), - const Symbol('Oo'), - const Symbol('Op'), - const Symbol('Oq'), - const Symbol('Or'), - const Symbol('Os'), - const Symbol('Ot'), - const Symbol('Ou'), - const Symbol('Ov'), - const Symbol('Ow'), - const Symbol('Ox'), - const Symbol('Oy'), - const Symbol('Oz'), - const Symbol('OA'), - const Symbol('OB'), - const Symbol('OC'), - const Symbol('OD'), - const Symbol('OE'), - const Symbol('OF'), - const Symbol('OG'), - const Symbol('OH'), - const Symbol('OI'), - const Symbol('OJ'), - const Symbol('OK'), - const Symbol('OL'), - const Symbol('OM'), - const Symbol('ON'), - const Symbol('OO'), - const Symbol('OP'), - const Symbol('OQ'), - const Symbol('OR'), - const Symbol('OS'), - const Symbol('OT'), - const Symbol('OU'), - const Symbol('OV'), - const Symbol('OW'), - const Symbol('OX'), - const Symbol('OY'), - const Symbol('OZ'), - const Symbol('Pa'), - const Symbol('Pb'), - const Symbol('Pc'), - const Symbol('Pd'), - const Symbol('Pe'), - const Symbol('Pf'), - const Symbol('Pg'), - const Symbol('Ph'), - const Symbol('Pi'), - const Symbol('Pj'), - const Symbol('Pk'), - const Symbol('Pl'), - const Symbol('Pm'), - const Symbol('Pn'), - const Symbol('Po'), - const Symbol('Pp'), - const Symbol('Pq'), - const Symbol('Pr'), - const Symbol('Ps'), - const Symbol('Pt'), - const Symbol('Pu'), - const Symbol('Pv'), - const Symbol('Pw'), - const Symbol('Px'), - const Symbol('Py'), - const Symbol('Pz'), - const Symbol('PA'), - const Symbol('PB'), - const Symbol('PC'), - const Symbol('PD'), - const Symbol('PE'), - const Symbol('PF'), - const Symbol('PG'), - const Symbol('PH'), - const Symbol('PI'), - const Symbol('PJ'), - const Symbol('PK'), - const Symbol('PL'), - const Symbol('PM'), - const Symbol('PN'), - const Symbol('PO'), - const Symbol('PP'), - const Symbol('PQ'), - const Symbol('PR'), - const Symbol('PS'), - const Symbol('PT'), - const Symbol('PU'), - const Symbol('PV'), - const Symbol('PW'), - const Symbol('PX'), - const Symbol('PY'), - const Symbol('PZ'), - const Symbol('Qa'), - const Symbol('Qb'), - const Symbol('Qc'), - const Symbol('Qd'), - const Symbol('Qe'), - const Symbol('Qf'), - const Symbol('Qg'), - const Symbol('Qh'), - const Symbol('Qi'), - const Symbol('Qj'), - const Symbol('Qk'), - const Symbol('Ql'), - const Symbol('Qm'), - const Symbol('Qn'), - const Symbol('Qo'), - const Symbol('Qp'), - const Symbol('Qq'), - const Symbol('Qr'), - const Symbol('Qs'), - const Symbol('Qt'), - const Symbol('Qu'), - const Symbol('Qv'), - const Symbol('Qw'), - const Symbol('Qx'), - const Symbol('Qy'), - const Symbol('Qz'), - const Symbol('QA'), - const Symbol('QB'), - const Symbol('QC'), - const Symbol('QD'), - const Symbol('QE'), - const Symbol('QF'), - const Symbol('QG'), - const Symbol('QH'), - const Symbol('QI'), - const Symbol('QJ'), - const Symbol('QK'), - const Symbol('QL'), - const Symbol('QM'), - const Symbol('QN'), - const Symbol('QO'), - const Symbol('QP'), - const Symbol('QQ'), - const Symbol('QR'), - const Symbol('QS'), - const Symbol('QT'), - const Symbol('QU'), - const Symbol('QV'), - const Symbol('QW'), - const Symbol('QX'), - const Symbol('QY'), - const Symbol('QZ'), - const Symbol('Ra'), - const Symbol('Rb'), - const Symbol('Rc'), - const Symbol('Rd'), - const Symbol('Re'), - const Symbol('Rf'), - const Symbol('Rg'), - const Symbol('Rh'), - const Symbol('Ri'), - const Symbol('Rj'), - const Symbol('Rk'), - const Symbol('Rl'), - const Symbol('Rm'), - const Symbol('Rn'), - const Symbol('Ro'), - const Symbol('Rp'), - const Symbol('Rq'), - const Symbol('Rr'), - const Symbol('Rs'), - const Symbol('Rt'), - const Symbol('Ru'), - const Symbol('Rv'), - const Symbol('Rw'), - const Symbol('Rx'), - const Symbol('Ry'), - const Symbol('Rz'), - const Symbol('RA'), - const Symbol('RB'), - const Symbol('RC'), - const Symbol('RD'), - const Symbol('RE'), - const Symbol('RF'), - const Symbol('RG'), - const Symbol('RH'), - const Symbol('RI'), - const Symbol('RJ'), - const Symbol('RK'), - const Symbol('RL'), - const Symbol('RM'), - const Symbol('RN'), - const Symbol('RO'), - const Symbol('RP'), - const Symbol('RQ'), - const Symbol('RR'), - const Symbol('RS'), - const Symbol('RT'), - const Symbol('RU'), - const Symbol('RV'), - const Symbol('RW'), - const Symbol('RX'), - const Symbol('RY'), - const Symbol('RZ'), - const Symbol('Sa'), - const Symbol('Sb'), - const Symbol('Sc'), - const Symbol('Sd'), - const Symbol('Se'), - const Symbol('Sf'), - const Symbol('Sg'), - const Symbol('Sh'), - const Symbol('Si'), - const Symbol('Sj'), - const Symbol('Sk'), - const Symbol('Sl'), - const Symbol('Sm'), - const Symbol('Sn'), - const Symbol('So'), - const Symbol('Sp'), - const Symbol('Sq'), - const Symbol('Sr'), - const Symbol('Ss'), - const Symbol('St'), - const Symbol('Su'), - const Symbol('Sv'), - const Symbol('Sw'), - const Symbol('Sx'), - const Symbol('Sy'), - const Symbol('Sz'), - const Symbol('SA'), - const Symbol('SB'), - const Symbol('SC'), - const Symbol('SD'), - const Symbol('SE'), - const Symbol('SF'), - const Symbol('SG'), - const Symbol('SH'), - const Symbol('SI'), - const Symbol('SJ'), - const Symbol('SK'), - const Symbol('SL'), - const Symbol('SM'), - const Symbol('SN'), - const Symbol('SO'), - const Symbol('SP'), - const Symbol('SQ'), - const Symbol('SR'), - const Symbol('SS'), - const Symbol('ST'), - const Symbol('SU'), - const Symbol('SV'), - const Symbol('SW'), - const Symbol('SX'), - const Symbol('SY'), - const Symbol('SZ'), - const Symbol('Ta'), - const Symbol('Tb'), - const Symbol('Tc'), - const Symbol('Td'), - const Symbol('Te'), - const Symbol('Tf'), - const Symbol('Tg'), - const Symbol('Th'), - const Symbol('Ti'), - const Symbol('Tj'), - const Symbol('Tk'), - const Symbol('Tl'), - const Symbol('Tm'), - const Symbol('Tn'), - const Symbol('To'), - const Symbol('Tp'), - const Symbol('Tq'), - const Symbol('Tr'), - const Symbol('Ts'), - const Symbol('Tt'), - const Symbol('Tu'), - const Symbol('Tv'), - const Symbol('Tw'), - const Symbol('Tx'), - const Symbol('Ty'), - const Symbol('Tz'), - const Symbol('TA'), - const Symbol('TB'), - const Symbol('TC'), - const Symbol('TD'), - const Symbol('TE'), - const Symbol('TF'), - const Symbol('TG'), - const Symbol('TH'), - const Symbol('TI'), - const Symbol('TJ'), - const Symbol('TK'), - const Symbol('TL'), - const Symbol('TM'), - const Symbol('TN'), - const Symbol('TO'), - const Symbol('TP'), - const Symbol('TQ'), - const Symbol('TR'), - const Symbol('TS'), - const Symbol('TT'), - const Symbol('TU'), - const Symbol('TV'), - const Symbol('TW'), - const Symbol('TX'), - const Symbol('TY'), - const Symbol('TZ'), - const Symbol('Ua'), - const Symbol('Ub'), - const Symbol('Uc'), - const Symbol('Ud'), - const Symbol('Ue'), - const Symbol('Uf'), - const Symbol('Ug'), - const Symbol('Uh'), - const Symbol('Ui'), - const Symbol('Uj'), - const Symbol('Uk'), - const Symbol('Ul'), - const Symbol('Um'), - const Symbol('Un'), - const Symbol('Uo'), - const Symbol('Up'), - const Symbol('Uq'), - const Symbol('Ur'), - const Symbol('Us'), - const Symbol('Ut'), - const Symbol('Uu'), - const Symbol('Uv'), - const Symbol('Uw'), - const Symbol('Ux'), - const Symbol('Uy'), - const Symbol('Uz'), - const Symbol('UA'), - const Symbol('UB'), - const Symbol('UC'), - const Symbol('UD'), - const Symbol('UE'), - const Symbol('UF'), - const Symbol('UG'), - const Symbol('UH'), - const Symbol('UI'), - const Symbol('UJ'), - const Symbol('UK'), - const Symbol('UL'), - const Symbol('UM'), - const Symbol('UN'), - const Symbol('UO'), - const Symbol('UP'), - const Symbol('UQ'), - const Symbol('UR'), - const Symbol('US'), - const Symbol('UT'), - const Symbol('UU'), - const Symbol('UV'), - const Symbol('UW'), - const Symbol('UX'), - const Symbol('UY'), - const Symbol('UZ'), - const Symbol('Va'), - const Symbol('Vb'), - const Symbol('Vc'), - const Symbol('Vd'), - const Symbol('Ve'), - const Symbol('Vf'), - const Symbol('Vg'), - const Symbol('Vh'), - const Symbol('Vi'), - const Symbol('Vj'), - const Symbol('Vk'), - const Symbol('Vl'), - const Symbol('Vm'), - const Symbol('Vn'), - const Symbol('Vo'), - const Symbol('Vp'), - const Symbol('Vq'), - const Symbol('Vr'), - const Symbol('Vs'), - const Symbol('Vt'), - const Symbol('Vu'), - const Symbol('Vv'), - const Symbol('Vw'), - const Symbol('Vx'), - const Symbol('Vy'), - const Symbol('Vz'), - const Symbol('VA'), - const Symbol('VB'), - const Symbol('VC'), - const Symbol('VD'), - const Symbol('VE'), - const Symbol('VF'), - const Symbol('VG'), - const Symbol('VH'), - const Symbol('VI'), - const Symbol('VJ'), - const Symbol('VK'), - const Symbol('VL'), - const Symbol('VM'), - const Symbol('VN'), - const Symbol('VO'), - const Symbol('VP'), - const Symbol('VQ'), - const Symbol('VR'), - const Symbol('VS'), - const Symbol('VT'), - const Symbol('VU'), - const Symbol('VV'), - const Symbol('VW'), - const Symbol('VX'), - const Symbol('VY'), - const Symbol('VZ'), - const Symbol('Wa'), - const Symbol('Wb'), - const Symbol('Wc'), - const Symbol('Wd'), - const Symbol('We'), - const Symbol('Wf'), - const Symbol('Wg'), - const Symbol('Wh'), - const Symbol('Wi'), - const Symbol('Wj'), - const Symbol('Wk'), - const Symbol('Wl'), - const Symbol('Wm'), - const Symbol('Wn'), - const Symbol('Wo'), - const Symbol('Wp'), - const Symbol('Wq'), - const Symbol('Wr'), - const Symbol('Ws'), - const Symbol('Wt'), - const Symbol('Wu'), - const Symbol('Wv'), - const Symbol('Ww'), - const Symbol('Wx'), - const Symbol('Wy'), - const Symbol('Wz'), - const Symbol('WA'), - const Symbol('WB'), - const Symbol('WC'), - const Symbol('WD'), - const Symbol('WE'), - const Symbol('WF'), - const Symbol('WG'), - const Symbol('WH'), - const Symbol('WI'), - const Symbol('WJ'), - const Symbol('WK'), - const Symbol('WL'), - const Symbol('WM'), - const Symbol('WN'), - const Symbol('WO'), - const Symbol('WP'), - const Symbol('WQ'), - const Symbol('WR'), - const Symbol('WS'), - const Symbol('WT'), - const Symbol('WU'), - const Symbol('WV'), - const Symbol('WW'), - const Symbol('WX'), - const Symbol('WY'), - const Symbol('WZ'), - const Symbol('Xa'), - const Symbol('Xb'), - const Symbol('Xc'), - const Symbol('Xd'), - const Symbol('Xe'), - const Symbol('Xf'), - const Symbol('Xg'), - const Symbol('Xh'), - const Symbol('Xi'), - const Symbol('Xj'), - const Symbol('Xk'), - const Symbol('Xl'), - const Symbol('Xm'), - const Symbol('Xn'), - const Symbol('Xo'), - const Symbol('Xp'), - const Symbol('Xq'), - const Symbol('Xr'), - const Symbol('Xs'), - const Symbol('Xt'), - const Symbol('Xu'), - const Symbol('Xv'), - const Symbol('Xw'), - const Symbol('Xx'), - const Symbol('Xy'), - const Symbol('Xz'), - const Symbol('XA'), - const Symbol('XB'), - const Symbol('XC'), - const Symbol('XD'), - const Symbol('XE'), - const Symbol('XF'), - const Symbol('XG'), - const Symbol('XH'), - const Symbol('XI'), - const Symbol('XJ'), - const Symbol('XK'), - const Symbol('XL'), - const Symbol('XM'), - const Symbol('XN'), - const Symbol('XO'), - const Symbol('XP'), - const Symbol('XQ'), - const Symbol('XR'), - const Symbol('XS'), - const Symbol('XT'), - const Symbol('XU'), - const Symbol('XV'), - const Symbol('XW'), - const Symbol('XX'), - const Symbol('XY'), - const Symbol('XZ'), - const Symbol('Ya'), - const Symbol('Yb'), - const Symbol('Yc'), - const Symbol('Yd'), - const Symbol('Ye'), - const Symbol('Yf'), - const Symbol('Yg'), - const Symbol('Yh'), - const Symbol('Yi'), - const Symbol('Yj'), - const Symbol('Yk'), - const Symbol('Yl'), - const Symbol('Ym'), - const Symbol('Yn'), - const Symbol('Yo'), - const Symbol('Yp'), - const Symbol('Yq'), - const Symbol('Yr'), - const Symbol('Ys'), - const Symbol('Yt'), - const Symbol('Yu'), - const Symbol('Yv'), - const Symbol('Yw'), - const Symbol('Yx'), - const Symbol('Yy'), - const Symbol('Yz'), - const Symbol('YA'), - const Symbol('YB'), - const Symbol('YC'), - const Symbol('YD'), - const Symbol('YE'), - const Symbol('YF'), - const Symbol('YG'), - const Symbol('YH'), - const Symbol('YI'), - const Symbol('YJ'), - const Symbol('YK'), - const Symbol('YL'), - const Symbol('YM'), - const Symbol('YN'), - const Symbol('YO'), - const Symbol('YP'), - const Symbol('YQ'), - const Symbol('YR'), - const Symbol('YS'), - const Symbol('YT'), - const Symbol('YU'), - const Symbol('YV'), - const Symbol('YW'), - const Symbol('YX'), - const Symbol('YY'), - const Symbol('YZ'), - const Symbol('Za'), - const Symbol('Zb'), - const Symbol('Zc'), - const Symbol('Zd'), - const Symbol('Ze'), - const Symbol('Zf'), - const Symbol('Zg'), - const Symbol('Zh'), - const Symbol('Zi'), - const Symbol('Zj'), - const Symbol('Zk'), - const Symbol('Zl'), - const Symbol('Zm'), - const Symbol('Zn'), - const Symbol('Zo'), - const Symbol('Zp'), - const Symbol('Zq'), - const Symbol('Zr'), - const Symbol('Zs'), - const Symbol('Zt'), - const Symbol('Zu'), - const Symbol('Zv'), - const Symbol('Zw'), - const Symbol('Zx'), - const Symbol('Zy'), - const Symbol('Zz'), - const Symbol('ZA'), - const Symbol('ZB'), - const Symbol('ZC'), - const Symbol('ZD'), - const Symbol('ZE'), - const Symbol('ZF'), - const Symbol('ZG'), - const Symbol('ZH'), - const Symbol('ZI'), - const Symbol('ZJ'), - const Symbol('ZK'), - const Symbol('ZL'), - const Symbol('ZM'), - const Symbol('ZN'), - const Symbol('ZO'), - const Symbol('ZP'), - const Symbol('ZQ'), - const Symbol('ZR'), - const Symbol('ZS'), - const Symbol('ZT'), - const Symbol('ZU'), - const Symbol('ZV'), - const Symbol('ZW'), - const Symbol('ZX'), - const Symbol('ZY'), - const Symbol('ZZ'), -]; diff --git a/tests/language_2/symbol/literal_runtime_1_test.dart b/tests/language_2/symbol/literal_runtime_1_test.dart deleted file mode 100644 index ff5f0cb35ed..00000000000 --- a/tests/language_2/symbol/literal_runtime_1_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test symbol literals. - -library symbol_literal_test; - -import 'package:expect/expect.dart'; - -foo(a, b) => Expect.isTrue(identical(a, b)); - -var check = foo; // Indirection used to avoid inlining. - -testSwitch(Symbol s) { - switch (s) { - case #abc: - return 1; - case const Symbol("def"): - return 2; - default: - return 0; - } -} - -main() { - bool doChecks = false; - doChecks = true; - if (doChecks) { - check(const Symbol("a"), #a); - check(const Symbol("a"), #a); - check(const Symbol("ab"), #ab); - check(const Symbol("ab"), #ab); - check(const Symbol("a.b"), #a.b); - check(const Symbol("a.b"), #a.b); - check(const Symbol("=="), #==); - check(const Symbol("=="), #==); - check(const Symbol("a.toString"), #a.toString); - } - - Expect.equals(1, testSwitch(#abc)); - - const m = const {#A: 0, #B: 1}; - Expect.equals(1, m[#B]); - - // Tries to call the symbol literal #a.toString - -} diff --git a/tests/language_2/symbol/literal_runtime_test.dart b/tests/language_2/symbol/literal_runtime_test.dart deleted file mode 100644 index 945678fa1c8..00000000000 --- a/tests/language_2/symbol/literal_runtime_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test symbol literals. - -library symbol_literal_test; - -import 'package:expect/expect.dart'; - -foo(a, b) => Expect.isTrue(identical(a, b)); - -var check = foo; // Indirection used to avoid inlining. - -testSwitch(Symbol s) { - switch (s) { - case #abc: - return 1; - case const Symbol("def"): - return 2; - default: - return 0; - } -} - -main() { - bool doChecks = false; - - if (doChecks) { - check(const Symbol("a"), #a); - check(const Symbol("a"), #a); - check(const Symbol("ab"), #ab); - check(const Symbol("ab"), #ab); - check(const Symbol("a.b"), #a.b); - check(const Symbol("a.b"), #a.b); - check(const Symbol("=="), #==); - check(const Symbol("=="), #==); - check(const Symbol("a.toString"), #a.toString); - } - - Expect.equals(1, testSwitch(#abc)); - - const m = const {#A: 0, #B: 1}; - Expect.equals(1, m[#B]); - - // Tries to call the symbol literal #a.toString - -} diff --git a/tests/language_2/symbol/literal_test.dart b/tests/language_2/symbol/literal_test.dart deleted file mode 100644 index ae77cf25ae2..00000000000 --- a/tests/language_2/symbol/literal_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test symbol literals. - -library symbol_literal_test; - -import 'package:expect/expect.dart'; - -foo(a, b) => Expect.isTrue(identical(a, b)); - -var check = foo; // Indirection used to avoid inlining. - -testSwitch(Symbol s) { - switch (s) { - case #abc: - return 1; - case const Symbol("def"): - return 2; - default: - return 0; - } -} - -main() { - bool doChecks = false; - doChecks = true; - if (doChecks) { - check(const Symbol("a"), #a); - check(const Symbol("a"), #a); - check(const Symbol("ab"), #ab); - check(const Symbol("ab"), #ab); - check(const Symbol("a.b"), #a.b); - check(const Symbol("a.b"), #a.b); - check(const Symbol("=="), #==); - check(const Symbol("=="), #==); - check(const Symbol("a.toString"), #a.toString); - } - - Expect.equals(1, testSwitch(#abc)); - - const m = const {#A: 0, #B: 1}; - Expect.equals(1, m[#B]); - - // Tries to call the symbol literal #a.toString - Expect.throwsNoSuchMethodError(() => #a.toString()); - // ^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION - // ^ - // [cfe] The method 'call' isn't defined for the class 'Symbol'. -} diff --git a/tests/language_2/sync_star/covariant_type_test.dart b/tests/language_2/sync_star/covariant_type_test.dart deleted file mode 100644 index cad3f94200a..00000000000 --- a/tests/language_2/sync_star/covariant_type_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test that TypeErrors happen for sync* methods without creating iterator. - -import 'package:expect/expect.dart'; - -class D { - // Parametric covariance check is usually compiled into method. - Iterable add(T n) sync* { - yield n; - } -} - -main() { - D d = new D(); - Expect.throwsTypeError(() => d.add(4.6)); -} diff --git a/tests/language_2/sync_star/dcall_type_test.dart b/tests/language_2/sync_star/dcall_type_test.dart deleted file mode 100644 index e783855efbf..00000000000 --- a/tests/language_2/sync_star/dcall_type_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test that TypeErrors happen for sync* methods without creating iterator. - -import 'package:expect/expect.dart'; - -Iterable iota(int n) sync* { - for (int i = 0; i < n; i++) yield i; -} - -class C { - Iterable add(int n) sync* { - yield n; - } -} - -main() { - dynamic f = iota; - Expect.throwsTypeError(() => f('ten')); - Expect.throwsTypeError(() => f(4.7)); - - dynamic o = new C(); - Expect.throwsTypeError(() => o.add('ten')); - Expect.throwsTypeError(() => o.add(4.7)); -} diff --git a/tests/language_2/sync_star/generator1_runtime_test.dart b/tests/language_2/sync_star/generator1_runtime_test.dart deleted file mode 100644 index 3b1faa46567..00000000000 --- a/tests/language_2/sync_star/generator1_runtime_test.dart +++ /dev/null @@ -1,92 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Simple test program for sync* generator functions. - -// VMOptions=--optimization_counter_threshold=10 - -import "package:expect/expect.dart"; - -sum10() sync* { - var s = 0; - for (var k = 1; k <= 10; k++) { - s += k; - yield s; - } -} - -class Range { - int start, end; - Range(this.start, this.end); - elements() sync* { - var e = start; - while (e <= end) yield e++; - } - - get yield sync* { - // yield is a legal member name here. - var e = start; - while (e <= end) yield e++; - } -} - -get sync sync* { - // sync is a legal identifier. - yield "sync"; -} - -einsZwei() sync* { - yield 1; - yield* [2, 3]; - yield* []; - yield 5; - yield [6]; -} - -dreiVier() sync* { - // Throws type error: yielded object is not an iterable. - -} - -main() { - for (int i = 0; i < 10; i++) { - var sums = sum10(); - print(sums); - Expect.isTrue(sums is Iterable); - Expect.equals(10, sums.length); - Expect.equals(1, sums.first); - Expect.equals(55, sums.last); - var q = ""; - for (var n in sums.take(3)) { - q += "$n "; - } - Expect.equals("1 3 6 ", q); - - var r = new Range(10, 12); - var elems1 = r.elements(); - print(elems1); - var elems2 = r.yield; - print(elems2); - // Walk the elements of each iterable and compare them. - var i = elems1.iterator; - Expect.isTrue(i is Iterator); - elems2.forEach((e) { - Expect.isTrue(i.moveNext()); - Expect.equals(e, i.current); - }); - - print(sync); - Expect.equals("sync", sync.single); - - print(einsZwei()); - Expect.equals("(1, 2, 3, 5, [6])", einsZwei().toString()); - - - } -} diff --git a/tests/language_2/sync_star/generator1_test.dart b/tests/language_2/sync_star/generator1_test.dart deleted file mode 100644 index 5bd8a87c02f..00000000000 --- a/tests/language_2/sync_star/generator1_test.dart +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2015, 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 - -// Simple test program for sync* generator functions. - -// VMOptions=--optimization_counter_threshold=10 - -import "package:expect/expect.dart"; - -sum10() sync* { - var s = 0; - for (var k = 1; k <= 10; k++) { - s += k; - yield s; - } -} - -class Range { - int start, end; - Range(this.start, this.end); - elements() sync* { - var e = start; - while (e <= end) yield e++; - } - - get yield sync* { - // yield is a legal member name here. - var e = start; - while (e <= end) yield e++; - } -} - -get sync sync* { - // sync is a legal identifier. - yield "sync"; -} - -einsZwei() sync* { - yield 1; - yield* [2, 3]; - yield* []; - yield 5; - yield [6]; -} - -dreiVier() sync* { - // Throws type error: yielded object is not an iterable. - yield* 3; - // ^ - // [analyzer] COMPILE_TIME_ERROR.YIELD_OF_INVALID_TYPE - // [cfe] A value of type 'int' can't be assigned to a variable of type 'Iterable'. -} - -main() { - for (int i = 0; i < 10; i++) { - var sums = sum10(); - print(sums); - Expect.isTrue(sums is Iterable); - Expect.equals(10, sums.length); - Expect.equals(1, sums.first); - Expect.equals(55, sums.last); - var q = ""; - for (var n in sums.take(3)) { - q += "$n "; - } - Expect.equals("1 3 6 ", q); - - var r = new Range(10, 12); - var elems1 = r.elements(); - print(elems1); - var elems2 = r.yield; - print(elems2); - // Walk the elements of each iterable and compare them. - var i = elems1.iterator; - Expect.isTrue(i is Iterator); - elems2.forEach((e) { - Expect.isTrue(i.moveNext()); - Expect.equals(e, i.current); - }); - - print(sync); - Expect.equals("sync", sync.single); - - print(einsZwei()); - Expect.equals("(1, 2, 3, 5, [6])", einsZwei().toString()); - - Expect.throws(() => dreiVier().toString()); - } -} diff --git a/tests/language_2/sync_star/generator2_test.dart b/tests/language_2/sync_star/generator2_test.dart deleted file mode 100644 index 822d3a485e8..00000000000 --- a/tests/language_2/sync_star/generator2_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2015, 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 - -// Simple test program for sync* generator functions. - -import "package:expect/expect.dart"; -import "dart:async"; - -var sync = "topLevelSync"; -var async = "topLevelAsync"; -var await = "topLevelAwait"; -var yield = "topLevelYield"; - -test01() sync* { - var yield = 0; // //# 01: syntax error - var await = 0; // //# 02: syntax error - bool yield() => false; //# 04: syntax error - bool await() => false; //# 05: syntax error - - var x1 = sync; - var x3 = await; // //# 08: syntax error - var x4 = await 55; // //# 09: compile-time error - var x4 = yield; // //# 10: syntax error - - var stream = new Stream.fromIterable([1, 2, 3]); - await for (var e in stream) print(e); // //# 11: compile-time error -} - -test02() sync* { - yield 12321; - return null; // //# 20: compile-time error -} - -test03() sync* => null; // //# 30: syntax error - -get test04 sync* => null; // //# 40: syntax error -set test04(a) sync* { print(a); } // //# 41: compile-time error - -class K { - K() sync* {} // //# 50: compile-time error - get nix sync* {} - get garnix sync* => null; // //# 51: syntax error - set etwas(var z) sync* { } // //# 52: compile-time error - sync() sync* { - yield sync; // Yields a tear-off of the sync() method. - } -} - -main() { - var x; - x = test01(); - Expect.equals("()", x.toString()); - x = test02(); - test03(); //# 30: continued - Expect.equals("(12321)", x.toString()); - x = test04; // //# 40: continued - test04 = x; // //# 41: continued - x = new K(); - print(x.garnix); //# 51: continued - x.etwas = null; //# 52: continued - print(x.sync().toList()); - Expect.equals(1, x.sync().length); -// Expect.isTrue(x.sync().single is Function); -} diff --git a/tests/language_2/sync_star/generator3_test.dart b/tests/language_2/sync_star/generator3_test.dart deleted file mode 100644 index 15af7829966..00000000000 --- a/tests/language_2/sync_star/generator3_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2015, 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 - -// Test program for sync* generator functions and yielding in try blocks. - -import "package:expect/expect.dart"; - -f() sync* { - try { - yield 1; - throw "three"; - } catch (e) { - yield 2; - yield e; - } finally { - yield 4; - } -} - -test1() { - var s = f().toString(); - Expect.equals("(1, 2, three, 4)", s); - print(s); -} - -g() sync* { - try { - yield "a"; - throw "pow!"; - } finally { - yield "b"; - } -} - -test2() { - Iterator i = g().iterator; - Expect.isTrue(i.moveNext()); - Expect.equals("a", i.current); - Expect.isTrue(i.moveNext()); - Expect.equals("b", i.current); - Expect.throws(() => i.moveNext(), (error) => error == "pow!"); -} - -main() { - test1(); // //# test1: ok - test2(); // //# test2: ok -} diff --git a/tests/language_2/sync_star/less_than_test.dart b/tests/language_2/sync_star/less_than_test.dart deleted file mode 100644 index 58cbb4c1329..00000000000 --- a/tests/language_2/sync_star/less_than_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2015, the Dart Team. 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 - -import "package:expect/expect.dart"; - -confuse(x) => [1, 'x', true, null, x].last; - -Iterable foo() sync* { - var a = confuse(1); - if (a < 10) { - yield 2; - } -} - -main() { - Expect.listEquals([2], foo().toList()); -} diff --git a/tests/language_2/sync_star/move_past_end_test.dart b/tests/language_2/sync_star/move_past_end_test.dart deleted file mode 100644 index e389698e4ea..00000000000 --- a/tests/language_2/sync_star/move_past_end_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2023, 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 - -// Test program for sync* generator functions that have their iterator moved -// past the end. Moving past the end should not cause re-execution of parts of -// the generator. - -import "package:expect/expect.dart"; - -String log = ''; - -Iterable simpleGenerator() sync* { - log += 'a'; - yield 1; - log += 'b'; - yield 2; - log += 'c'; -} - -Iterable compoundGenerator() sync* { - log += 'X'; - yield* simpleGenerator(); - log += 'Y'; - yield* simpleGenerator(); - log += 'Z'; -} - -void testSimple() { - log = ''; - Expect.equals('12', simpleGenerator().join()); - Expect.equals('abc', log); - - log = ''; - final iterator = simpleGenerator().iterator; - Expect.isTrue(iterator.moveNext()); - Expect.isTrue(iterator.moveNext()); - Expect.isFalse(iterator.moveNext()); - Expect.isFalse(iterator.moveNext()); - Expect.isFalse(iterator.moveNext()); - Expect.equals('abc', log); -} - -void testCompound() { - log = ''; - Expect.equals('1212', compoundGenerator().join()); - Expect.equals('XabcYabcZ', log); - - log = ''; - final iterator = compoundGenerator().iterator; - Expect.isTrue(iterator.moveNext()); - Expect.isTrue(iterator.moveNext()); - Expect.isTrue(iterator.moveNext()); - Expect.isTrue(iterator.moveNext()); - Expect.isFalse(iterator.moveNext()); - Expect.isFalse(iterator.moveNext()); - Expect.isFalse(iterator.moveNext()); - Expect.equals('XabcYabcZ', log); -} - -void main() { - for (final test in [testSimple, testCompound]) { - test(); - } -} diff --git a/tests/language_2/sync_star/nested_subtype_test.dart b/tests/language_2/sync_star/nested_subtype_test.dart deleted file mode 100644 index 97614a81570..00000000000 --- a/tests/language_2/sync_star/nested_subtype_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2020, the Dart Team. 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 - -// Regression test for: https://github.com/dart-lang/sdk/issues/42234 - -Iterable f() sync* { - yield* g(); -} - -Iterable g() sync* { - yield 1; - yield 2; -} - -main() { - for (var i in f()) { - print(i); - } -} diff --git a/tests/language_2/sync_star/sync_star_exception_current_test.dart b/tests/language_2/sync_star/sync_star_exception_current_test.dart deleted file mode 100644 index 960f603a1cc..00000000000 --- a/tests/language_2/sync_star/sync_star_exception_current_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2023, 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 - -import 'dart:collection'; -import 'package:expect/expect.dart'; - -class ThrowingCurrentIterator implements Iterator { - int _remaining; - ThrowingCurrentIterator(this._remaining); - - bool moveNext() => _remaining-- > 0; - int get current => throw 'current'; -} - -class ThrowingCurrent extends IterableBase { - final int _length; - ThrowingCurrent(this._length); - Iterator get iterator => ThrowingCurrentIterator(_length); -} - -Iterable f1() sync* { - yield* ThrowingCurrent(5); - yield* ThrowingCurrent(5); -} - -Iterable f2() sync* { - yield* f1(); - yield* f1(); -} - -main() { - // `IterableBase.length` uses only `moveNext()`. - Expect.equals(5, ThrowingCurrent(5).length); - - // The spec dictates that `yield*` calls `moveNext()` and `current` for each - // element in order to add the value to the iterable associated with the - // generator. - final i1 = f1().iterator; - Expect.throws(() => i1.moveNext()); - - // Further calls to `moveNext()` must return false (17.15). - Expect.isFalse(i1.moveNext()); - - // Same tests but for nested `yield*`. - final i2 = f2().iterator; - Expect.throws(() => i2.moveNext()); - Expect.isFalse(i2.moveNext()); - - // Slighly surprising consequence of the specified behavior. - Expect.throws(() => f1().length); - Expect.throws(() => f2().length); -} diff --git a/tests/language_2/sync_star/sync_star_exception_iterator_test.dart b/tests/language_2/sync_star/sync_star_exception_iterator_test.dart deleted file mode 100644 index e4759f94c2b..00000000000 --- a/tests/language_2/sync_star/sync_star_exception_iterator_test.dart +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) 2023, 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 - -import 'package:expect/expect.dart'; - -String log = 'uninitialized'; - -class Throwing extends Iterable { - final String path; - Throwing(this.path) { - log += '[$path]'; - } - Iterator get iterator => throw 'iterator@$path'; - - // The following ensure these methods are not used to implement `yield*`. - int get length => throw 'length'; - int elementAt(int i) => throw 'elementAt'; - void forEach(void Function(int) action) => throw 'forEach'; -} - -Iterable f1(String path) sync* { - final here = '$path.f1'; - yield* Throwing('$here.a'); - yield* Throwing('$here.b'); - log += '[f1.done]'; -} - -Iterable f2(String path) sync* { - final here = '$path.f2'; - try { - final p = f1('$here.p'); - log += '[$here.p.y*1]'; - yield* p; - log += '[$here.p.y*2]'; - - yield* f1('$here.q'); - } catch (e) { - log += '[$here.catch:$e]'; - } - yield 100; - log += '[$here.done]'; -} - -Iterable f3(String path) sync* { - final here = '$path.f3'; - try { - yield* Throwing('$here.f'); - yield* Throwing('$here.g'); - } catch (e) { - log += '[$here.catch:$e]'; - } - log += '[$here.done]'; -} - -Iterable f4(String path) sync* { - final here = '$path.f4'; - try { - final s = f3('$here.s'); - log += '[$here.s.y*1]'; - yield* s; - log += '[$here.s.y*2]'; - - yield* f3('$here.t'); - } catch (e) { - log += '[$here.catch:$e]'; - } - yield 200; - log += '[$here.done]'; -} - -main() { - // The spec dictates that `yield*` calls `iterator` on the operand. This - // implies that any exception thrown by accessing the iterator should happen - // as if at the yield* statement. - - { - log = ''; - final iterator = f1('main').iterator; - Expect.throws(() => iterator.moveNext()); - Expect.equals('[main.f1.a]', log); - Expect.isFalse(iterator.moveNext()); - Expect.equals('[main.f1.a]', log); - } - - { - log = ''; - final iterator = f2('main').iterator; - Expect.isTrue(iterator.moveNext()); - Expect.equals(100, iterator.current); - Expect.equals( - '[main.f2.p.y*1][main.f2.p.f1.a][main.f2.catch:iterator@main.f2.p.f1.a]', - log); - log = ''; - Expect.isFalse(iterator.moveNext()); - Expect.equals('[main.f2.done]', log); - } - - { - log = ''; - final iterator = f3('main').iterator; - Expect.isFalse(iterator.moveNext()); - Expect.equals( - '[main.f3.f][main.f3.catch:iterator@main.f3.f][main.f3.done]', log); - } - - { - log = ''; - final iterator = f4('M').iterator; - Expect.isTrue(iterator.moveNext()); - Expect.equals(200, iterator.current); - Expect.equals( - '[M.f4.s.y*1]' - '[M.f4.s.f3.f][M.f4.s.f3.catch:iterator@M.f4.s.f3.f][M.f4.s.f3.done]' - '[M.f4.s.y*2]' - '[M.f4.t.f3.f][M.f4.t.f3.catch:iterator@M.f4.t.f3.f][M.f4.t.f3.done]', - log); - log = ''; - Expect.isFalse(iterator.moveNext()); - Expect.equals('[M.f4.done]', log); - } -} diff --git a/tests/language_2/sync_star/sync_star_exception_nested_test.dart b/tests/language_2/sync_star/sync_star_exception_nested_test.dart deleted file mode 100644 index 0b113659e43..00000000000 --- a/tests/language_2/sync_star/sync_star_exception_nested_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// 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. - -// @dart = 2.9 - -// See: https://github.com/dart-lang/sdk/issues/42466 - -import 'dart:collection'; -import 'package:expect/expect.dart'; - -String caughtString; - -a() sync* { - yield 3; - throw 'Throw from a()'; - yield 4; -} - -b() sync* { - yield 2; - yield* a(); - yield 5; -} - -c() sync* { - try { - yield 1; - yield* b(); - yield 6; - } catch (e, st) { - caughtString = 'Caught in c()'; - } -} - -d() sync* { - try { - yield 0; - yield* c(); - yield 7; - } catch (e, st) { - caughtString = 'Caught in d()'; - } -} - -main() { - List yields = []; - try { - for (final e in d()) { - yields.add(e); - } - } catch (e, st) { - caughtString = 'Caught in main()'; - } - Expect.equals('Caught in c()', caughtString); - Expect.listEquals([0, 1, 2, 3, 7], yields); -} diff --git a/tests/language_2/sync_star/sync_star_exception_test.dart b/tests/language_2/sync_star/sync_star_exception_test.dart deleted file mode 100644 index 54eb32ec8fb..00000000000 --- a/tests/language_2/sync_star/sync_star_exception_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// 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. - -// @dart = 2.9 - -// See: https://github.com/dart-lang/sdk/issues/42466 - -import 'dart:collection'; -import 'package:expect/expect.dart'; - -var caughtString; - -class AlwaysThrowingIterator implements Iterator { - bool moveNext() => throw 'moveNext'; - int get current => throw 'current'; -} - -class AlwaysThrowing extends IterableBase { - Iterator get iterator => AlwaysThrowingIterator(); -} - -Iterable f() sync* { - try { - yield* AlwaysThrowing(); - } catch (e, st) { - caughtString = 'caught $e in f'; - } -} - -void g() { - try { - for (int x in f()) { - print(x); - } - } catch (e, st) { - caughtString = 'caught $e in g'; - } -} - -main() { - g(); - // The spec dictates that if `e` (moveNext, current) throws then `yield* e` - // should throw. - // I.e. even though the iteration is happening in `g`, the `yield*` is in `f` - // so its catch should trigger. - Expect.equals('caught moveNext in f', caughtString); -} diff --git a/tests/language_2/sync_star/void_sync_star_test.dart b/tests/language_2/sync_star/void_sync_star_test.dart deleted file mode 100644 index 1755b6a69eb..00000000000 --- a/tests/language_2/sync_star/void_sync_star_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// 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. - -// @dart = 2.9 - -// It is an error for a `sync*` function to have return type `void`. - -/*space*/ void f1() sync* { - // ^^^^ - // [analyzer] unspecified - // [cfe] unspecified -} - -class C { - static void f2() sync* { - // ^^^^ - // [analyzer] unspecified - // [cfe] unspecified - } - - /*space*/ void f3() sync* { - // ^^^^ - // [analyzer] unspecified - // [cfe] unspecified - } -} - -void main() { - /*space*/ void f4() sync* { - // ^^^^ - // [analyzer] unspecified - // [cfe] unspecified - } - - // No function literal: It is probably not possible to infer the - // return type `void` for a function literal marked `sync*`. -} diff --git a/tests/language_2/sync_star/yield_star_pause_test.dart b/tests/language_2/sync_star/yield_star_pause_test.dart deleted file mode 100644 index 82448f567de..00000000000 --- a/tests/language_2/sync_star/yield_star_pause_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2016, 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 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -// Regression test for http://dartbug.com/27205 -// If a yield-star completes while the stream is paused, it didn't resume. - -main() { - asyncTest(() { - var c = new Completer(); - var s = yieldStream(mkStream()); - var sub; - sub = s.listen((v) { - sub.pause(); - print(v); - Timer.run(sub.resume); - }, onDone: () { - print("DONE"); - c.complete(null); - }); - return c.future; - }); -} - -Stream yieldStream(Stream s) async* { - yield* s; -} - -Stream mkStream() { - var s = new StreamController(sync: true); - // The close event has to be sent and received between - // the pause and resume above. - // Using a sync controller and a Timer.run(sub.resume) ensures this. - Timer.run(() { - s.add("event"); - s.close(); - }); - return s.stream; -} diff --git a/tests/language_2/sync_star/yield_test.dart b/tests/language_2/sync_star/yield_test.dart deleted file mode 100644 index 5484a134811..00000000000 --- a/tests/language_2/sync_star/yield_test.dart +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) 2015, 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 - -// TODO(jmesserly): this is a copy of the language test of the same name, -// we can remove this copy when we're running against those tests. -import "package:expect/expect.dart"; - -Iterable foo1() sync* { - yield 1; -} - -Iterable foo2(p) sync* { - bool t = false; - yield null; - while (true) { - a: - for (int i = 0; i < p; i++) { - if (!t) { - for (int j = 0; j < 3; j++) { - yield -1; - t = true; - break a; - } - } - yield i; - } - } -} - -// p is copied to all Iterators from the Iterable returned by foo3. -// Also each iterator will have its own i. -Iterable foo3(int p) sync* { - int i = 0; - i++; - p++; - yield p + i; -} - -void testCapturingInSyncStar() { - int localL0 = 0; - - nested1(int paramL1) sync* { - int localL1 = 0; - localL0 += 10; - paramL1 += 100; - - nested2(int paramL2) sync* { - int localL2 = 0; - localL0 += 1000; - paramL1 += 10000; - localL1 += 100000; - paramL2 += 1000000; - localL2 += 10000000; - - yield localL0 + paramL1 + localL1 + paramL2 + localL2; - } - - yield nested2(0); - } - - Iterable t1 = nested1(0); - - Iterator it11 = t1.iterator; - Iterator it12 = t1.iterator; - it11.moveNext(); - it12.moveNext(); - - Iterable t2 = it11.current; - Iterable t3 = it12.current; - Iterator it21 = t2.iterator; - Iterator it22 = t2.iterator; - Iterator it31 = t3.iterator; - Iterator it32 = t3.iterator; - - it21.moveNext(); - it22.moveNext(); - it31.moveNext(); - it32.moveNext(); - - Expect.equals(11111120, it21.current); - Expect.equals(11222120, it22.current); - Expect.equals(11113120, it31.current); - Expect.equals(11224120, it32.current); -} - -main() { - Expect.listEquals([1], foo1().toList()); - Expect.listEquals( - [null, -1, 0, 1, 2, 3, 0, 1, 2, 3], foo2(4).take(10).toList()); - Iterable t = foo3(0); - Iterator it1 = t.iterator; - Iterator it2 = t.iterator; //# copyParameters: ok - it1.moveNext(); - it2.moveNext(); //# copyParameters: continued - Expect.equals(2, it1.current); - // TODO(sigurdm): Check up on the spec here. - Expect.equals(2, it2.current); // //# copyParameters: continued - Expect.isFalse(it1.moveNext()); - // Test that two `moveNext()` calls are fine. - Expect.isFalse(it1.moveNext()); - Expect.isFalse(it2.moveNext()); //# copyParameters: continued - Expect.isFalse(it2.moveNext()); //# copyParameters: continued - - testCapturingInSyncStar(); //# capturing: ok -} diff --git a/tests/language_2/sync_star/yieldstar_test.dart b/tests/language_2/sync_star/yieldstar_test.dart deleted file mode 100644 index 703188a278f..00000000000 --- a/tests/language_2/sync_star/yieldstar_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2015, 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 - -// TODO(jmesserly): this is a copy of the language test of the same name, -// we can remove this copy when we're running against those tests. -import "package:expect/expect.dart"; - -bar() sync* { - int i = 1; - int j = 1; - while (true) { - yield i; - j = i + j; - i = j - i; - } -} - -foo() sync* { - yield* [1, 2, 3]; - yield null; - // TODO(jmesserly): added cast here to work around: - // https://codereview.chromium.org/1213503002/ - yield* bar() as Iterable; -} - -main() async { - Expect.listEquals([1, 2, 3, null, 1, 1, 2, 3, 5], foo().take(9).toList()); -} diff --git a/tests/language_2/syntax/deep_nesting_expression_test.dart b/tests/language_2/syntax/deep_nesting_expression_test.dart deleted file mode 100644 index a0fff3e6ec9..00000000000 --- a/tests/language_2/syntax/deep_nesting_expression_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2016, 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 - -// Deeply nested expression must not crash compiler due to stack overflow. - -main() { - var x = -[ -[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] //# 01: ok, compile-time error -]; - print('okay'); -} diff --git a/tests/language_2/syntax/deep_nesting_statement_test.dart b/tests/language_2/syntax/deep_nesting_statement_test.dart deleted file mode 100644 index 883d3d4ab73..00000000000 --- a/tests/language_2/syntax/deep_nesting_statement_test.dart +++ /dev/null @@ -1,10015 +0,0 @@ -// Copyright (c) 2016, 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 - -// Deeply nested statements must not crash compiler due to stack overflow. - -var x = 0; - -main() { - if (x == 0) { - if (x == 0) { //# 01: ok, compile-time error - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - if (x == 0) { //# 01: continued - }}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} //# 01: continued - } - print("survived!"); -} diff --git a/tests/language_2/syntax/nested_comments_test.dart b/tests/language_2/syntax/nested_comments_test.dart deleted file mode 100644 index b3f7dcfa2f8..00000000000 --- a/tests/language_2/syntax/nested_comments_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// 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 test program testing nested comments - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// /* nested comment */ -/*// nested comment */ -/*/* nested comment */*/ -/* entire function -void main() { - /* nested comment */ - Expect.isTrue(false); // nested -} -*/ - -/** - test documentation - /* nested comment */ -*/ -main() { - Expect.isTrue(true); -} diff --git a/tests/language_2/syntax/pre_nnbd_modifiers_test.dart b/tests/language_2/syntax/pre_nnbd_modifiers_test.dart deleted file mode 100644 index ef1224dfe8e..00000000000 --- a/tests/language_2/syntax/pre_nnbd_modifiers_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// 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. - -// @dart = 2.9 - -// This test ensures that the modifiers added as part of NNBD are not enabled -// until NNBD is enabled by default. At that time, this test should be removed. - -// [NNBD non-migrated] Note: This test is specific to legacy mode and -// deliberately does not have a counter-part in language/. - -import 'package:expect/expect.dart'; - -class late { - int get g => 1; -} - -class required { - int get g => 2; -} - -class C { - late l = late(); - required r = required(); -} - -main() { - Expect.equals(C().l.g, 1); - Expect.equals(C().r.g, 2); -} diff --git a/tests/language_2/syntax/statement_test.dart b/tests/language_2/syntax/statement_test.dart deleted file mode 100644 index 3ea3f77caa7..00000000000 --- a/tests/language_2/syntax/statement_test.dart +++ /dev/null @@ -1,225 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Tests all statement types. Not an exhaustive test of all statement semantics. -class StatementTest { - StatementTest() {} - - static testMain() { - var test = new StatementTest(); - test.testIfStatement(); - test.testForLoop(); - test.testWhileLoops(); - test.testSwitch(); - test.testExceptions(); - test.testBreak(); - test.testContinue(); - test.testFunction(); - test.testReturn(); - } - - testIfStatement() { - // Basic if statements. - if (true) { - Expect.equals(true, true); - } else { - Expect.equals(false, true); - } - - if (false) { - Expect.equals(false, true); - } else { - Expect.equals(true, true); - } - } - - testForLoop() { - int count = 0, count2; - - // Basic for loop. - for (int i = 0; i < 10; ++i) { - ++count; - } - Expect.equals(10, count); - - // For loop with no 'var'. - count2 = 0; - for (count = 0; count < 5; ++count) { - ++count2; - } - Expect.equals(5, count); - Expect.equals(5, count2); - - // For loop with no initializer. - count = count2 = 0; - for (; count < 10; ++count) { - ++count2; - } - Expect.equals(10, count); - Expect.equals(10, count2); - - // For loop with no increment. - for (count = 0; count < 5;) { - ++count; - } - Expect.equals(5, count); - - // For loop with no test. - for (count = 0;; ++count) { - if (count == 10) { - break; - } - } - Expect.equals(10, count); - - // For loop with no nothing. - count = 0; - for (;;) { - if (count == 5) { - break; - } - ++count; - } - Expect.equals(5, count); - } - - testWhileLoops() { - // Basic while loop. - int count = 0; - while (count < 10) { - ++count; - } - Expect.equals(10, count); - - // Basic do loop. - count = 0; - do { - ++count; - } while (count < 5); - Expect.equals(5, count); - } - - testSwitch() { - // Int switch. - bool hit0, hit1, hitDefault; - for (int x = 0; x < 3; ++x) { - switch (x) { - case 0: - hit0 = true; - break; - case 1: - hit1 = true; - break; - default: - hitDefault = true; - break; - } - } - Expect.equals(true, hit0); - Expect.equals(true, hit1); - Expect.equals(true, hitDefault); - - // String switch. - var strings = ['a', 'b', 'c']; - bool hitA, hitB; - hitDefault = false; - for (int x = 0; x < 3; ++x) { - switch (strings[x]) { - case 'a': - hitA = true; - break; - case 'b': - hitB = true; - break; - default: - hitDefault = true; - break; - } - } - Expect.equals(true, hitA); - Expect.equals(true, hitB); - Expect.equals(true, hitDefault); - } - - testExceptions() { - // TODO(jgw): Better tests once all the exception semantics are worked out. - bool hitCatch, hitFinally; - try { - throw "foo"; - } catch (e) { - Expect.equals(true, e == "foo"); - hitCatch = true; - } finally { - hitFinally = true; - } - - Expect.equals(true, hitCatch); - Expect.equals(true, hitFinally); - } - - testBreak() { - var ints = [ - [32, 87, 3, 589], - [12, 1076, 2000, 8], - [622, 127, 77, 955] - ]; - int i, j = 0; - bool foundIt = false; - - search: - for (i = 0; i < ints.length; i++) { - for (j = 0; j < ints[i].length; j++) { - if (ints[i][j] == 12) { - foundIt = true; - break search; - } - } - } - Expect.equals(true, foundIt); - } - - testContinue() { - String searchMe = "Look for a substring in me"; - String substring = "sub"; - bool foundIt = false; - int max = searchMe.length - substring.length; - - test: - for (int i = 0; i <= max; i++) { - int n = substring.length; - int j = i; - int k = 0; - while (n-- != 0) { - if (searchMe[j++] != substring[k++]) { - continue test; - } - } - foundIt = true; - break test; - } - } - - testFunction() { - int foo() { - return 42; - } - - Expect.equals(42, foo()); - } - - void testReturn() { - if (true) { - return; - } - Expect.equals(true, false); - } -} - -main() { - StatementTest.testMain(); -} diff --git a/tests/language_2/syntax/syntax_test.dart b/tests/language_2/syntax/syntax_test.dart deleted file mode 100644 index 61e87630792..00000000000 --- a/tests/language_2/syntax/syntax_test.dart +++ /dev/null @@ -1,257 +0,0 @@ -// Copyright (c) 2012, 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 - -class SyntaxTest { - // "this" cannot be used as a field name. - SyntaxTest this; //# 01: syntax error - - // Syntax error. - foo {} //# 02: syntax error - - // Syntax error. - static foo {} //# 03: syntax error - - // Syntax error. - operator +=() {} //# 04: syntax error - - // Syntax error. - operator -=() {} //# 05: syntax error - - // Syntax error. - operator *=() {} //# 06: syntax error - - // Syntax error. - operator /=() {} //# 07: syntax error - - // Syntax error. - operator ~/=() {} //# 08: syntax error - - // Syntax error. - operator %=() {} //# 09: syntax error - - // Syntax error. - operator <<=() {} //# 10: syntax error - - // Syntax error. - operator >>=() {} //# 11: syntax error - - // Syntax error. - operator >>>=() {} //# 12: syntax error - - // Syntax error. - operator &=() {} //# 13: syntax error - - // Syntax error. - operator ^=() {} //# 14: syntax error - - // Syntax error. - operator |=() {} //# 15: syntax error - - // Syntax error. - operator ?() {} //# 16: syntax error - - // Syntax error. - operator ||() {} //# 17: syntax error - - // Syntax error. - operator &&() {} //# 18: syntax error - - // Syntax error. - operator !=() {} //# 19: syntax error - - // Syntax error. - operator ===() {} //# 20: syntax error - - // Syntax error. - operator !==() {} //# 21: syntax error - - // Syntax error. - operator is() {} //# 22: syntax error - - // Syntax error. - operator !() {} //# 23: syntax error - - // Syntax error. - operator ++() {} //# 24: syntax error - - // Syntax error. - operator --() {} //# 25: syntax error - - // Syntax error. - bool operator ===(A other) { return true; } //# 26: syntax error - - int sample; -} - -fisk {} //# 27: syntax error - -class DOMWindow {} - -class Window extends DOMWindow -native "*Window" //# 28: syntax error -{} - -class Console -native "=(typeof console == 'undefined' ? {} : console)" //# 29: syntax error -{} - -class NativeClass -native "FooBar" //# 30: syntax error -{} - -abstract class Fisk {} - -class BoolImplementation implements Fisk -native "Boolean" //# 31: syntax error -{} - -class _JSON -native 'JSON' //# 32: syntax error -{} - -class ListFactory implements List -native "Array" //# 33: syntax error -{ - noSuchMethod(_) => null; // Allow unimplemented methods -} - -abstract class I implements UNKNOWN; //# 34: syntax error - -class XWindow extends DOMWindow -hest "*Window" //# 35: syntax error -{} - -class XConsole -hest "=(typeof console == 'undefined' ? {} : console)" //# 36: syntax error -{} - -class XNativeClass -hest "FooBar" //# 37: syntax error -{} - -class XBoolImplementation implements Fisk -hest "Boolean" //# 38: syntax error -{} - -class _JSONX -hest 'JSON' //# 39: syntax error -{} - -class XListFactory implements List -hest "Array" //# 40: syntax error -{ - noSuchMethod(_) => null; // Allow unimplemented methods -} - -class YWindow extends DOMWindow -for "*Window" //# 41: syntax error -{} - -class YConsole -for "=(typeof console == 'undefined' ? {} : console)" //# 42: syntax error -{} - -class YNativeClass -for "FooBar" //# 43: syntax error -{} - -class YBoolImplementation implements Fisk -for "Boolean" //# 44: syntax error -{} - -class _JSONY -for 'JSON' //# 45: syntax error -{} - -class YListFactory implements List -for "Array" //# 46: syntax error -{ - noSuchMethod(_) => null; // Allow unimplemented methods -} - -class A { - const A() - {} //# 47: syntax error - ; -} - -abstract class G {} - -typedef (); //# 48: syntax error - -class B -extends void //# 49: syntax error -{} - -main() { - try { - new SyntaxTest(); - new SyntaxTest().foo(); //# 02: continued - SyntaxTest.foo(); //# 03: continued - fisk(); //# 27: continued - - new Window(); - new Console(); - new NativeClass(); - new BoolImplementation(); - new _JSON(); - new ListFactory(); - new ListFactory(); - var x = null; - x is I; //# 34: continued - - new XConsole(); - new XNativeClass(); - new XBoolImplementation(); - new _JSONX(); - new XListFactory(); - new XListFactory(); - - new YConsole(); - new YNativeClass(); - new YBoolImplementation(); - new _JSONY(); - new YListFactory(); - new YListFactory(); - - futureOf(x) {} - if (!(fisk futureOf(false))) {} //# 50: syntax error - if (!(await futureOf(false))) {} //# 51: compile-time error - - void f{} //# 52: syntax error - G g; //# 53: syntax error - f(void) {}; //# 54: syntax error - - optionalArg([x]) {} - optionalArg( - void (var i) {} //# 55: syntax error - ); - - function __PROTO__$(...args) { return 12; } //# 56: syntax error - G<> t; //# 57: syntax error - G t; //# 58: syntax error - A a = null; //# 59: compile-time error - void v; //# 60: ok - void v = null; //# 61: ok - print(null is void); //# 62: syntax error - new A(); - new B(); - - new Bad(); - - 1 + 2 = 1; //# 63: syntax error - new SyntaxTest() = 1; //# 64: syntax error - futureOf(null) = 1; //# 65: syntax error - - } catch (ex) { - // Swallowing exceptions. Any error should be a compile-time error - // which kills the current isolate. - } -} - -class Bad { - factory Bad '${syntax(entry.key)}: ${syntax(entry.value)}'); - return '{ ${entries.join(', ')} }'; - } else if (x is String) { - return json.encode(x); - } else { - throw UnimplementedError('Unknown syntax for $x. ' - 'Consider adding to `SyntaxTracker.known`.'); - } -} - -/// Instances of this class record the syntax of operations performed on them. -class SyntaxTracker { - final String _syntax; - - SyntaxTracker(this._syntax); - - String toString() => _syntax; - - static String args([Object x = absent, Object y = absent]) => - '(${[x, y].where((v) => v is! Absent).join(', ')})'; - - static String typeArgs(Type T, Type U) => - T == dynamic && U == dynamic ? '' : '<${syntax(T)}, ${syntax(U)}>'; - - /// Simple objects with known syntactic representations. Tests can add to - /// this map. - static Map known = { - true: 'true', - false: 'false', - null: 'null' - }; -} - -/// Extension allowing us to detect the syntax of most operations performed on -/// arbitrary types. -extension SyntaxTrackingExtension on Object { - Object method([Object x = absent, Object y = absent]) => SyntaxTracker( - '${syntax(this)}.method${SyntaxTracker.typeArgs(T, U)}${SyntaxTracker.args(x, y)}'); - - Object call([Object x = absent, Object y = absent]) => SyntaxTracker( - '${syntax(this)}${SyntaxTracker.typeArgs(T, U)}${SyntaxTracker.args(x, y)}'); - - Object get getter => SyntaxTracker('${syntax(this)}.getter'); - - Object operator [](Object index) => - SyntaxTracker('${syntax(this)}[${syntax(index)}]'); - - Object operator -() => SyntaxTracker('(-${syntax(this)})'); - - Object operator ~() => SyntaxTracker('(~${syntax(this)})'); - - Object operator *(Object other) => - SyntaxTracker('(${syntax(this)} * ${syntax(other)})'); - - Object operator /(Object other) => - SyntaxTracker('(${syntax(this)} / ${syntax(other)})'); - - Object operator ~/(Object other) => - SyntaxTracker('(${syntax(this)} ~/ ${syntax(other)})'); - - Object operator %(Object other) => - SyntaxTracker('(${syntax(this)} % ${syntax(other)})'); - - Object operator +(Object other) => - SyntaxTracker('(${syntax(this)} + ${syntax(other)})'); - - Object operator -(Object other) => - SyntaxTracker('(${syntax(this)} - ${syntax(other)})'); - - Object operator <<(Object other) => - SyntaxTracker('(${syntax(this)} << ${syntax(other)})'); - - Object operator >>(Object other) => - SyntaxTracker('(${syntax(this)} >> ${syntax(other)})'); - - Object operator &(Object other) => - SyntaxTracker('(${syntax(this)} & ${syntax(other)})'); - - Object operator ^(Object other) => - SyntaxTracker('(${syntax(this)} ^ ${syntax(other)})'); - - Object operator |(Object other) => - SyntaxTracker('(${syntax(this)} | ${syntax(other)})'); - - Object operator <(Object other) => - SyntaxTracker('(${syntax(this)} < ${syntax(other)})'); - - Object operator >(Object other) => - SyntaxTracker('(${syntax(this)} > ${syntax(other)})'); - - Object operator <=(Object other) => - SyntaxTracker('(${syntax(this)} <= ${syntax(other)})'); - - Object operator >=(Object other) => - SyntaxTracker('(${syntax(this)} >= ${syntax(other)})'); -} - -void checkSyntax(Object x, String expectedSyntax) { - Expect.equals(expectedSyntax, syntax(x)); -} - -Object f([Object x = absent, Object y = absent]) => SyntaxTracker( - 'f${SyntaxTracker.typeArgs(T, U)}${SyntaxTracker.args(x, y)}'); - -Object x = SyntaxTracker('x'); diff --git a/tests/language_2/this/as_covariant_call_checks_test.dart b/tests/language_2/this/as_covariant_call_checks_test.dart deleted file mode 100644 index 077b53a494c..00000000000 --- a/tests/language_2/this/as_covariant_call_checks_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2018, 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. -// -// VMOptions=--no-background-compilation --optimization-counter-threshold=10 - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - T field; - - @pragma('vm:never-inline') - set property(T v) {} - - @pragma('vm:never-inline') - void method(T x) {} - - @pragma('vm:never-inline') - void testMethod(bool violateType) { - A x = this; - x.method(violateType ? 10 : "10"); - } - - @pragma('vm:never-inline') - void testSetter(bool violateType) { - A x = this; - x.property = violateType ? 10 : "10"; - } - - @pragma('vm:never-inline') - void testField(bool violateType) { - A x = this; - x.field = violateType ? 10 : "10"; - } -} - -@pragma('vm:never-inline') -void loop(A obj, bool violateType) { - for (var i = 0; i < 100; i++) { - obj.testMethod(violateType); - obj.testSetter(violateType); - obj.testField(violateType); - } -} - -void main() { - A().field = 10; - final obj = A(); - loop(obj, false); - loop(obj, false); - Expect.throwsTypeError(() => obj.testMethod(true)); - Expect.throwsTypeError(() => obj.testSetter(true)); - Expect.throwsTypeError(() => obj.testField(true)); -} diff --git a/tests/language_2/this/as_dynamic_call_checks_test.dart b/tests/language_2/this/as_dynamic_call_checks_test.dart deleted file mode 100644 index c1e34eea3fa..00000000000 --- a/tests/language_2/this/as_dynamic_call_checks_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2018, 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. -// -// VMOptions=--no-background-compilation --optimization-counter-threshold=10 - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - T field; - - @pragma('vm:never-inline') - set property(T v) {} - - @pragma('vm:never-inline') - void method(T x) {} - - @pragma('vm:never-inline') - void testMethod({bool violateType: false}) { - dynamic x = this; - x.method(violateType ? 10 : "10"); - } - - @pragma('vm:never-inline') - void testSetter({bool violateType: false}) { - dynamic x = this; - x.property = violateType ? 10 : "10"; - } - - @pragma('vm:never-inline') - void testField({bool violateType: false}) { - dynamic x = this; - x.field = violateType ? 10 : "10"; - } -} - -@pragma('vm:never-inline') -void loop(A obj, {bool violateType: false}) { - for (var i = 0; i < 100; i++) { - obj.testMethod(violateType: violateType); - obj.testSetter(violateType: violateType); - obj.testField(violateType: violateType); - } -} - -void main() { - final obj = A(); - loop(obj, violateType: false); - loop(obj, violateType: false); - Expect.throwsTypeError(() => obj.testMethod(violateType: true)); - Expect.throwsTypeError(() => obj.testSetter(violateType: true)); - Expect.throwsTypeError(() => obj.testField(violateType: true)); -} diff --git a/tests/language_2/this/call_this_test.dart b/tests/language_2/this/call_this_test.dart deleted file mode 100644 index 00586a7e271..00000000000 --- a/tests/language_2/this/call_this_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that dart2js treats [:this():] as a closure send. - -import "package:expect/expect.dart"; - -class A { - call() => 42; - test1() => this(); - test2() => (this)(); -} - -main() { - Expect.equals(42, (new A()).test1()); - Expect.equals(42, (new A()).test2()); -} diff --git a/tests/language_2/this/conditional_operator_runtime_test.dart b/tests/language_2/this/conditional_operator_runtime_test.dart deleted file mode 100644 index 4db87724bf8..00000000000 --- a/tests/language_2/this/conditional_operator_runtime_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2015, 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. - -// Verify that the ?. operator cannot be used for forwarding "this" -// constructors. - -class B { - B(); - B.namedConstructor(); - var field = 1; - method() => 1; - - B.forward() - - ; - - test() { - this?.field = 1; - this?.field += 1; - this?.field; - this?.method(); - } -} - -main() { - new B.forward().test(); -} diff --git a/tests/language_2/this/conditional_operator_test.dart b/tests/language_2/this/conditional_operator_test.dart deleted file mode 100644 index 98016a28c1b..00000000000 --- a/tests/language_2/this/conditional_operator_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2015, 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 - -// Verify that the ?. operator cannot be used for forwarding "this" -// constructors. - -class B { - B(); - B.namedConstructor(); - var field = 1; - method() => 1; - - B.forward() - : this?.namedConstructor() - //^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_REFERENCE_TO_THIS - // [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNMENT_IN_INITIALIZER - //^^^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INITIALIZER_FOR_NON_EXISTENT_FIELD - // [cfe] Expected an assignment after the field name. - // ^^ - // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN - // [cfe] Expected '.' before this. - // [cfe] Expected an identifier, but got ''. - ; - - test() { - this?.field = 1; - this?.field += 1; - this?.field; - this?.method(); - } -} - -main() { - new B.forward().test(); -} diff --git a/tests/language_2/this/implicit_runtime_test.dart b/tests/language_2/this/implicit_runtime_test.dart deleted file mode 100644 index b244f612e84..00000000000 --- a/tests/language_2/this/implicit_runtime_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 "package:expect/expect.dart"; - -abstract class Interface { - final x; - Interface(this.x); -} - -abstract class Abstract implements Interface { - String toString() => x.toString(); -} - -// This class does not implement "x" either, but it is not marked -// abstract. - - -// This class does not implement "x", but is itself abstract, so that's OK. -abstract class SubAbstract2 extends Abstract { - get x; // Abstract. -} - -// This class does not implement "x" either, but it is not marked -// abstract. - - -class Concrete extends Abstract { - get x => 7; -} - -class SubConcrete extends Concrete { - final x; - SubConcrete(this.x); -} - -void main() { - - Expect.equals('7', new Concrete().toString()); - Expect.equals('42', new SubConcrete(42).toString()); - Expect.equals('7', new SubConcrete(new Concrete()).toString()); -} diff --git a/tests/language_2/this/implicit_this_test.dart b/tests/language_2/this/implicit_this_test.dart deleted file mode 100644 index e830d15148a..00000000000 --- a/tests/language_2/this/implicit_this_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -abstract class Interface { - final x; - Interface(this.x); -} - -abstract class Abstract implements Interface { - String toString() => x.toString(); -} - -// This class does not implement "x" either, but it is not marked -// abstract. -class SubAbstract1 extends Abstract {} -// ^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER -// [cfe] The non-abstract class 'SubAbstract1' is missing implementations for these members: - -// This class does not implement "x", but is itself abstract, so that's OK. -abstract class SubAbstract2 extends Abstract { - get x; // Abstract. -} - -// This class does not implement "x" either, but it is not marked -// abstract. -class SubSubAbstract2 extends SubAbstract2 {} -// ^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER -// [cfe] The non-abstract class 'SubSubAbstract2' is missing implementations for these members: - -class Concrete extends Abstract { - get x => 7; -} - -class SubConcrete extends Concrete { - final x; - SubConcrete(this.x); -} - -void main() { - new Abstract(); - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INSTANTIATE_ABSTRACT_CLASS - // [cfe] The class 'Abstract' is abstract and can't be instantiated. - Expect.equals('7', new Concrete().toString()); - Expect.equals('42', new SubConcrete(42).toString()); - Expect.equals('7', new SubConcrete(new Concrete()).toString()); -} diff --git a/tests/language_2/this/in_initializer_test.dart b/tests/language_2/this/in_initializer_test.dart deleted file mode 100644 index a1e3ff9048c..00000000000 --- a/tests/language_2/this/in_initializer_test.dart +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2018, 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 - -class A { - static var s = "something"; - var a = "anything"; - var x; - - foo() => null; - bar(var y) => y; - static sfoo() => null; - static sbar(var y) => y; - - A.next(); - - A(); //# 00: ok - A() : this.next(); //# 01: ok - - A() : x = s; //# 02: ok - A() : x = sfoo(); //# 03: ok - A() : x = sbar(null); //# 04: ok - A() : x = a; //# 05: compile-time error - A() : x = foo(); //# 06: compile-time error - A() : x = bar(null); //# 07: compile-time error - A() : x = bar(this); //# 08: compile-time error - A() : x = this; //# 09: compile-time error - A() : x = this.a; //# 10: compile-time error - A() : x = this.foo(); //# 11: compile-time error - A() : x = this.bar(null); //# 12: compile-time error - A() : x = this.bar(this); //# 13: compile-time error - A() : x = sbar(this); //# 14: compile-time error - A() : x = sbar(this.a); //# 15: compile-time error - A() : x = sbar(this.foo()); //# 16: compile-time error - A() : x = sbar(this.bar(null)); //# 17: compile-time error - A() : x = sbar(this.bar(this)); //# 18: compile-time error - - A() : this.x = (() => null); //# 19: ok - A() : this.x = (() => s)(); //# 20: ok - A() : this.x = ((c) => c); //# 21: ok - A() : this.x = ((c) => s)(null); //# 22: ok - A() : this.x = ((c) => c)(this); //# 23: compile-time error - A() : this.x = (() => this); //# 24: compile-time error - A() : this.x = (() => this.a)(); //# 25: compile-time error - A() : this.x = ((c) => this.foo()); //# 26: compile-time error - A() : this.x = ((c) => a)(null); //# 27: compile-time error - A() : this.x = ((c) => foo())(s); //# 28: compile-time error - A() : this.x = sbar((() { return null; })); //# 29: ok - A() : this.x = sbar((() { return s; })()); //# 30: ok - A() : this.x = sbar(((c) { return c; })); //# 31: ok - A() : this.x = sbar(((c) { return s; })(null)); //# 32: ok - A() : this.x = sbar(((c) { return c; })(this)); //# 33: compile-time error - A() : this.x = sbar((() { return this; })); //# 34: compile-time error - A() : this.x = sbar((() { return this.a; })()); //# 35: compile-time error - A() : this.x = sbar(((c) { return this.foo(); })); //# 36: compile-time error - A() : this.x = sbar(((c) { return a; })(null)); //# 37: compile-time error - A() : this.x = sbar(((c) { return foo(); })(s)); //# 38: compile-time error - - A() : this.x = (s = null); //# 39: ok - A() : this.x = (a = null); //# 40: compile-time error - A() : this.x = (this.a = null); //# 41: compile-time error -} - -main() {} diff --git a/tests/language_2/this/runtime_test.dart b/tests/language_2/this/runtime_test.dart deleted file mode 100644 index a377ab32b7e..00000000000 --- a/tests/language_2/this/runtime_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -class Foo { - var x; - f() {} - - testMe() { - - - - - - - - - } -} - -main() { - new Foo().testMe(); -} diff --git a/tests/language_2/this/this_test.dart b/tests/language_2/this/this_test.dart deleted file mode 100644 index 43cf9060e67..00000000000 --- a/tests/language_2/this/this_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2012, 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 - -class Foo { - var x; - f() {} - - testMe() { - x.this; - //^^^^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] Expected identifier, but got 'this'. - x.this(); - //^^^^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] Expected identifier, but got 'this'. - x.this.x; - //^^^^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] Expected identifier, but got 'this'. - x.this().x; - //^^^^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] Expected identifier, but got 'this'. - f().this; - // ^^^^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] Expected identifier, but got 'this'. - f().this(); - // ^^^^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] Expected identifier, but got 'this'. - f().this.f(); - // ^^^^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] Expected identifier, but got 'this'. - f().this().f(); - // ^^^^ - // [analyzer] SYNTACTIC_ERROR.MISSING_IDENTIFIER - // [cfe] Expected identifier, but got 'this'. - } -} - -main() { - new Foo().testMe(); -} diff --git a/tests/language_2/top_level/collision1_test.dart b/tests/language_2/top_level/collision1_test.dart deleted file mode 100644 index 82d8efaefaf..00000000000 --- a/tests/language_2/top_level/collision1_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// 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 - -int x = 100; - -get x => 200; // //# 00: compile-time error -set x(var i) { print(i); } // //# 01: compile-time error - -int x(a, b) { print(a + b); } // //# 02: compile-time error - -void main() { - // No need to reference x. -} diff --git a/tests/language_2/top_level/collision2_test.dart b/tests/language_2/top_level/collision2_test.dart deleted file mode 100644 index 742836cd45e..00000000000 --- a/tests/language_2/top_level/collision2_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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 - -get x => 200; - -// Ok: can have a setter named x when getter x is defined. -set x(var i) { - print(i); -} - -// Error: there is already a getter for x -int x; // //# 00: compile-time error - -// Error: there is already a getter named x. -int x(a, b) { print(a + b); } // //# 01: compile-time error - -void main() { - // No need to reference x. -} diff --git a/tests/language_2/top_level/file1.dart b/tests/language_2/top_level/file1.dart deleted file mode 100644 index 83d00f025a4..00000000000 --- a/tests/language_2/top_level/file1.dart +++ /dev/null @@ -1,12 +0,0 @@ -// 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 - -part of TopLevelMultipleFilesTest.dart; - -main() { - Expect.equals(topLevelVar, 42); - Expect.equals(topLevelMethod(), 87); -} diff --git a/tests/language_2/top_level/file2.dart b/tests/language_2/top_level/file2.dart deleted file mode 100644 index f137c3f9980..00000000000 --- a/tests/language_2/top_level/file2.dart +++ /dev/null @@ -1,11 +0,0 @@ -// 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 - -part of TopLevelMultipleFilesTest.dart; - -const topLevelVar = 42; - -topLevelMethod() => 87; diff --git a/tests/language_2/top_level/func_test.dart b/tests/language_2/top_level/func_test.dart deleted file mode 100644 index 7aac30bcdfc..00000000000 --- a/tests/language_2/top_level/func_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// 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 test program testing top-level variables. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class TopLevelFuncTest { - static testMain() { - var z = [1, 10, 100, 1000]; - Expect.equals(Sum(z), 1111); - - var w = Window; - Expect.equals(w, "window"); - - Expect.equals(null, rgb); - Color = "ff0000"; - Expect.equals(rgb, "#ff0000"); - CheckColor("#ff0000"); - - Expect.equals("5", digits[5]); - - var e1 = Enumerator; - var e2 = Enumerator; - Expect.equals(0, e1()); - Expect.equals(1, e1()); - Expect.equals(2, e1()); - Expect.equals(0, e2()); - } -} - -void CheckColor(String expected) { - Expect.equals(expected, rgb); -} - -int Sum(List v) { - int s = 0; - for (int i = 0; i < v.length; i++) { - s += v[i]; - } - return s; -} - -get Window { - return "win" "dow"; -} - -String rgb; - -void set Color(col) { - rgb = "#$col"; -} - -List get digits { - return ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]; -} - -Function get Enumerator { - int k = 0; - return () => k++; -} - -main() { - TopLevelFuncTest.testMain(); -} diff --git a/tests/language_2/top_level/getter_arrow_syntax_test.dart b/tests/language_2/top_level/getter_arrow_syntax_test.dart deleted file mode 100644 index fadc883cabb..00000000000 --- a/tests/language_2/top_level/getter_arrow_syntax_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -get getter => 42; - -List get lgetter => null; - -bool get two_wrongs { - return !true; -} - -main() { - Expect.equals(42, getter); - Expect.equals(null, lgetter); - Expect.equals(false, two_wrongs); -} diff --git a/tests/language_2/top_level/getter_no_setter1_test.dart b/tests/language_2/top_level/getter_no_setter1_test.dart deleted file mode 100644 index 3b6ca9dcf4c..00000000000 --- a/tests/language_2/top_level/getter_no_setter1_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'package:expect/expect.dart'; - -bool getter_visited = false; - -int get getter { - getter_visited = true; -} - -class Class { - method() { - getter++; -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL -// [cfe] Setter not found: 'getter'. - } -} - -main() { - new Class().method(); -} diff --git a/tests/language_2/top_level/getter_no_setter2_test.dart b/tests/language_2/top_level/getter_no_setter2_test.dart deleted file mode 100644 index c3042ada17b..00000000000 --- a/tests/language_2/top_level/getter_no_setter2_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'package:expect/expect.dart'; - -bool getter_visited = false; - -final int getter = () { - getter_visited = true; -}(); - -class Class { - method() { - getter++; -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_FINAL -// [cfe] Setter not found: 'getter'. - } -} - -main() { - new Class().method(); -} diff --git a/tests/language_2/top_level/in_initializer_test.dart b/tests/language_2/top_level/in_initializer_test.dart deleted file mode 100644 index f77d8618d48..00000000000 --- a/tests/language_2/top_level/in_initializer_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Test that constructor initializers can access top level elements. - -const topLevelField = 1; -topLevelMethod() => 1; -get topLevelGetter { - return 1; -} - -class Foo { - Foo.one() : x = topLevelField; - Foo.second() : x = topLevelMethod; - Foo.third() : x = topLevelGetter; - var x; -} - -main() { - Expect.equals(topLevelField, new Foo.one().x); - Expect.equals(topLevelMethod(), new Foo.second().x()); - Expect.equals(topLevelGetter, new Foo.third().x); -} diff --git a/tests/language_2/top_level/method_test.dart b/tests/language_2/top_level/method_test.dart deleted file mode 100644 index 74ad48e634d..00000000000 --- a/tests/language_2/top_level/method_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -untypedTopLevel() { - return 1; -} - -class TopLevelMethodTest { - static void testMain() { - Expect.equals(1, untypedTopLevel()); - } -} - -main() { - TopLevelMethodTest.testMain(); -} diff --git a/tests/language_2/top_level/multiple_files_test.dart b/tests/language_2/top_level/multiple_files_test.dart deleted file mode 100644 index 1bb3bda3b98..00000000000 --- a/tests/language_2/top_level/multiple_files_test.dart +++ /dev/null @@ -1,11 +0,0 @@ -// 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 TopLevelMultipleFilesTest.dart; - -import "package:expect/expect.dart"; -part 'file1.dart'; -part 'file2.dart'; diff --git a/tests/language_2/top_level/non_prefixed_library_test.dart b/tests/language_2/top_level/non_prefixed_library_test.dart deleted file mode 100644 index 0e7681beb50..00000000000 --- a/tests/language_2/top_level/non_prefixed_library_test.dart +++ /dev/null @@ -1,11 +0,0 @@ -// 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 TopLevelMultipleFilesTest.dart; - -import "package:expect/expect.dart"; -import 'prefixed_library.dart'; -part 'file1.dart'; diff --git a/tests/language_2/top_level/prefixed_declaration_test.dart b/tests/language_2/top_level/prefixed_declaration_test.dart deleted file mode 100644 index 5f41a73c5c2..00000000000 --- a/tests/language_2/top_level/prefixed_declaration_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012, 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 test for top level declarations involving an imported type. - -// @dart = 2.9 - -library main; - -import "package:expect/expect.dart"; -import "../library11.dart" as lib11; - -lib11.Library11 variable = null; - -lib11.Library11 function() => null; - -lib11.Library11 get getter => null; - -main() { - Expect.isTrue(variable == null); - Expect.isTrue(function() == null); - Expect.isTrue(getter == null); -} diff --git a/tests/language_2/top_level/prefixed_library.dart b/tests/language_2/top_level/prefixed_library.dart deleted file mode 100644 index 7f2b5432b5e..00000000000 --- a/tests/language_2/top_level/prefixed_library.dart +++ /dev/null @@ -1,11 +0,0 @@ -// 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 TopLevelMultipleFilesTest.dart; - -const topLevelVar = 42; - -topLevelMethod() => 87; diff --git a/tests/language_2/top_level/unresolved_method_test.dart b/tests/language_2/top_level/unresolved_method_test.dart deleted file mode 100644 index 2e9e531f86e..00000000000 --- a/tests/language_2/top_level/unresolved_method_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// 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 - -// Test that an unresolved method call at the top level creates a compile- -// time error. - -var a = b(); -// ^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_FUNCTION -// [cfe] Method not found: 'b'. - -main() { - print(a); -} diff --git a/tests/language_2/top_level/unresolved_var_test.dart b/tests/language_2/top_level/unresolved_var_test.dart deleted file mode 100644 index 40ebb852b81..00000000000 --- a/tests/language_2/top_level/unresolved_var_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// 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 - -// Test that an unresolved identifier at the top level causes a compile-time -// error. - -var a = b; -// ^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER -// [cfe] Undefined name 'b'. - -main() { - print(a); -} diff --git a/tests/language_2/top_level/var_test.dart b/tests/language_2/top_level/var_test.dart deleted file mode 100644 index 5537dd19828..00000000000 --- a/tests/language_2/top_level/var_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// 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 test program testing top-level variables. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -var a, b; - -class TopLevelVarTest { - static testMain() { - Expect.equals(null, a); - Expect.equals(null, b); - a = b = 100; - b++; - Expect.equals(100, a); - Expect.equals(101, b); - - Expect.equals(111, x); - Expect.equals(112, y); - } -} - -// Ensure that initializers work for both const and non-const variables. -const int x = 2 * 55 + 1; -int y = x + 1; - -main() { - TopLevelVarTest.testMain(); -} diff --git a/tests/language_2/type/alias_equality_test.dart b/tests/language_2/type/alias_equality_test.dart deleted file mode 100644 index 0803c1cc9b8..00000000000 --- a/tests/language_2/type/alias_equality_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test that type aliases perform equality tests according to the -// underlying function type, not as if they were a distinct type -// for each type alias declaration. - -import 'package:expect/expect.dart'; - -typedef F1 = void Function(int); -typedef F2 = void Function(int); -typedef void F3(int x); - -typedef G1 = X Function(X); -typedef G2 = X Function(X); -typedef G3 = Y Function(Y); - -main() { - Expect.equals(F1, F2); //# 01: ok - Expect.equals(F1, F3); //# 02: ok - Expect.equals(G1, G2); //# 03: ok - Expect.equals(G1, G3); //# 04: ok -} diff --git a/tests/language_2/type/check_const_function_typedef2_test.dart b/tests/language_2/type/check_const_function_typedef2_test.dart deleted file mode 100644 index bea07a038e6..00000000000 --- a/tests/language_2/type/check_const_function_typedef2_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2014, 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 - -// Tests that typechecks on const objects with typedefs work. - -import "package:expect/expect.dart"; - -typedef String Int2String(int x); - -class A { - final Int2String f; - const A(this.f); -} - -int foo(String x) => 499; - -const a = const A(foo); -// ^^^ -// [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE -// [analyzer] COMPILE_TIME_ERROR.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH -// [cfe] The argument type 'int Function(String)' can't be assigned to the parameter type 'String Function(int)'. - -main() { - a.f(499); -} diff --git a/tests/language_2/type/check_const_function_typedef_test.dart b/tests/language_2/type/check_const_function_typedef_test.dart deleted file mode 100644 index f88797adcd6..00000000000 --- a/tests/language_2/type/check_const_function_typedef_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2014, 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 - -// Tests that typechecks on const objects with typedefs work. - -import "package:expect/expect.dart"; - -typedef String Int2String(int x); - -class A { - final Int2String f; - const A(this.f); -} - -String foo(int x) => "str"; - -const a = const A(foo); - -main() { - Expect.equals("str", a.f(499)); -} diff --git a/tests/language_2/type/check_test.dart b/tests/language_2/type/check_test.dart deleted file mode 100644 index 798a0e94ce3..00000000000 --- a/tests/language_2/type/check_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to remove the a B type check -// after an A type check, because it thought any subtype of A had to be B. - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -main() { - var a = [new A(), new B()]; - var b = a[0]; - b = b as A; - Expect.throwsTypeError(() => b as B); -} diff --git a/tests/language_2/type/checks_in_factory_method_runtime_test.dart b/tests/language_2/type/checks_in_factory_method_runtime_test.dart deleted file mode 100644 index a680bb3201c..00000000000 --- a/tests/language_2/type/checks_in_factory_method_runtime_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. -// Tests the type checking when passing code into closure from inside a factory method - -import "package:expect/expect.dart"; - -abstract class Foo { - factory Foo.from() = Bar.from; -} - -class Bar implements Foo { - Bar() {} - - factory Bar.from() { - var func = (T arg) { - T foo = arg; - bool isString = foo is String; - print(arg); - print(" String=$isString"); - }; - - - return new Bar(); - } -} - -main() { - Foo value1; - value1 = new Foo.from(); - - bool gotError = false; - - try { - Foo value2 = new Foo.from(); - } on TypeError catch (e) { - gotError = true; - } - Expect.equals(false, gotError); -} diff --git a/tests/language_2/type/checks_in_factory_method_test.dart b/tests/language_2/type/checks_in_factory_method_test.dart deleted file mode 100644 index a0d0c719568..00000000000 --- a/tests/language_2/type/checks_in_factory_method_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2012, 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. -// Tests the type checking when passing code into closure from inside a factory method - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -abstract class Foo { - factory Foo.from() = Bar.from; -} - -class Bar implements Foo { - Bar() {} - - factory Bar.from() { - var func = (T arg) { - T foo = arg; - bool isString = foo is String; - print(arg); - print(" String=$isString"); - }; - - func("Hello World!"); - // ^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // [cfe] The argument type 'String' can't be assigned to the parameter type 'T'. - return new Bar(); - } -} - -main() { - Foo value1; - value1 = new Foo.from(); - - bool gotError = false; - - try { - Foo value2 = new Foo.from(); - } on TypeError catch (e) { - gotError = true; - } - Expect.equals(false, gotError); -} diff --git a/tests/language_2/type/constants_test.dart b/tests/language_2/type/constants_test.dart deleted file mode 100644 index 95f71c3991f..00000000000 --- a/tests/language_2/type/constants_test.dart +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test that the value of constant type literals are allowed as -// constant map keys and case expressions, and the value of non-constant type -// literals are not. - -import "dart:collection" deferred as prefix show HashSet; - -main(args) { - testSwitch(args); - testMaps(args); -} - -const Type numType = num; - -const bool fromEnvironment = - const bool.fromEnvironment("foo", defaultValue: true); - -Type argumentType() => T; - -void testSwitch(args) { - var types = [MyType, T, argumentType(), argumentType()]; - for (int i = 0; i < types.length; i++) { - switch (types[i]) { - // Must be type literal or not override `==`. - case const MyType(0): //# 01: compile-time error - - // Must not be type variable. - case T: //# 02: compile-time error - - // Must not be deferred type. - case prefix.HashSet: //# 03: compile-time error - - // Constant type literals are valid. - case String: - throw "unreachable: String #$i"; - case int: - throw "unreachable: int #$i"; - case numType: - throw "unreachable: num #$i"; - case MyType: - break; - // Must be type literal or not override `==`. - case fromEnvironment ? const MyType(1) : Type: //# 07: compile-time error - default: - throw "unreachable: default #$i"; - } - } -} - -void testMaps(args) { - const map = { - // Must be type literal or not override `==`. - MyType(0): 0, //# 04: compile-time error - - // Must not be type variable. - T: 0, //# 05: compile-time error - - // Must not be deferred. - prefix.HashSet: 0, //# 06: compile-time error - - // Constant type literals are valid. - MyType: 0, - int: 1, - String: 2, - numType: 3, - // Must be type literal or not override `==`. - fromEnvironment ? const MyType(1) : Type: 4, //# 08: compile-time error - }; - if (map[MyType] != 0) throw "Map Error: ${MyType} as literal"; - if (map[T] != 0) throw "Map Error: ${T} as type argument"; - if (map[argumentType()] != 0) { - throw "Map Error: ${argumentType()} as type argument of literal"; - } - if (map[argumentType()] != 0) { - throw "Map Error: ${argumentType()} as type argument of type variable"; - } - if (map[num] != 3) throw "Map Error: ${num} -> ${map[num]}"; -} - -// An implementation of `Type` which overrides `==`, -// but is not the value of a constant type literal. -class MyType implements Type { - final int value; - const MyType(this.value); - int get hashCode => 0; - bool operator ==(Object other) => identical(this, other); -} diff --git a/tests/language_2/type/conversion_ssa_test.dart b/tests/language_2/type/conversion_ssa_test.dart deleted file mode 100644 index 1e6e3318ee4..00000000000 --- a/tests/language_2/type/conversion_ssa_test.dart +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js, that used to generate bad code in -// checked mode. The pattern that lead to an error was: -// -// t1 = GeneratedAtUseSite instruction -// t2 = check(t1) -// t3 = check(t2) -// t4 = use(t3) -// t5 = use(t3) -// t6 = use(t2) -// -// The SSA variable allocator used to allocate the same variable for -// t5 and t2, because of a bogus optimization with check instructions. - -expect(a, b) { - if (a != b) throw 'Failed'; -} - -var array = [ - new SelectorGroup([ - new Selector([new SimpleSelectorSequence(new ClassSelector())]), - new Selector([new SimpleSelectorSequence(new ClassSelector())]), - new Selector([new SimpleSelectorSequence(new ClassSelector())]) - ]), - new Object() -]; - -class RuleSet { - final SelectorGroup _selectorGroup; - RuleSet(this._selectorGroup); - SelectorGroup get selectorGroup => _selectorGroup; -} - -class SelectorGroup { - List _selectors; - SelectorGroup(this._selectors); - List get selectors => _selectors; -} - -class Selector { - final List _simpleSelectorSequences; - Selector(this._simpleSelectorSequences); - List get simpleSelectorSequences => - _simpleSelectorSequences; -} - -class SimpleSelectorSequence { - final SimpleSelector _selector; - SimpleSelectorSequence(this._selector); - get simpleSelector => _selector; -} - -class SimpleSelector {} - -class ClassSelector extends SimpleSelector {} - -void testSelectorGroups() { - // Fetch the rule set from an array to trick the type inferrer. - var ruleset = new RuleSet(array[0]); - expect(ruleset.selectorGroup.selectors.length, 3); - - var groupSelector0 = ruleset.selectorGroup.selectors[0]; - var selector0 = groupSelector0.simpleSelectorSequences[0]; - var simpleSelector0 = selector0.simpleSelector; - - var groupSelector1 = ruleset.selectorGroup.selectors[1]; - var selector1 = groupSelector1.simpleSelectorSequences[0]; - var simpleSelector1 = selector1.simpleSelector; - expect(simpleSelector1 is ClassSelector, true); - var groupSelector2 = ruleset.selectorGroup.selectors[2]; -} - -main() { - testSelectorGroups(); - // Trick the type inferrer. - new SimpleSelectorSequence(new SimpleSelector()); - new SelectorGroup([]); - new Selector([]); -} diff --git a/tests/language_2/type/error_test.dart b/tests/language_2/type/error_test.dart deleted file mode 100644 index 0543ba3aa54..00000000000 --- a/tests/language_2/type/error_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test that various type errors produced by explicit casts don't invoke -// user-defined code during error reporting. - -class NoToString { - toString() { - Expect.fail("should not be called"); - return ""; - } -} - -/// Defeat optimizations of type checks. -dynamic wrap(e) { - if (new DateTime.now().year == 1980) return null; - return e; -} - -bool assertionsEnabled = false; - -void main() { - assert(assertionsEnabled = true); - - dynamic noToString = NoToString(); - - Expect.throws(() { - wrap(noToString) as int; // Explicit cast should throw - }, (e) { - e.toString(); // Should not throw. - return true; - }); - - if (assertionsEnabled) { - Expect.throws(() { - assert(wrap(false), noToString); // Assertion should throw - }, (e) { - e.toString(); // Should not throw. - return true; - }); - } -} diff --git a/tests/language_2/type/guard_conversion_test.dart b/tests/language_2/type/guard_conversion_test.dart deleted file mode 100644 index 4429ff17078..00000000000 --- a/tests/language_2/type/guard_conversion_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -foo() => 'bar'; - -main() { - var a = foo(); - var b = 'c'; - do { - b = a[2]; - } while (b != 'r'); - - if (a is Comparable) { - a += a; - } - Expect.equals('barbar', a); -} diff --git a/tests/language_2/type/hoisting_test.dart b/tests/language_2/type/hoisting_test.dart deleted file mode 100644 index ef471285982..00000000000 --- a/tests/language_2/type/hoisting_test.dart +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2016, 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 -import "package:expect/expect.dart"; - -class A { - A(this.x, T z); - A.make(); - void f(T x) {} - static String g(String x) { - return x; - } - - T x; -} - -class B extends A { - B(int x, int z) : super(x, z); - B.make() : super.make(); - void f(int x) {} - static int g(int x) { - return x; - } -} - -class C { - C(this.x, int z); - void f(int x) {} - static int g(int x) { - return x; - } - - int x = 0; -} - -typedef void ToVoid(T x); -typedef T Id(T x); - -void main() { - { - A a = new A("hello", "world"); - Expect.isTrue(new A.make() is! A); - Expect.isTrue(new A.make() is A); - Expect.isTrue(a is! A); - Expect.isTrue(a is A); - Expect.isTrue(a.f is ToVoid); - Expect.isTrue(A.g is Id); - } - { - B b = new B(0, 1); - Expect.isTrue(new B.make() is B); - Expect.isTrue(new B.make() is A); - Expect.isTrue(b is B); - Expect.isTrue(b.f is ToVoid); - Expect.isTrue(B.g is Id); - } - { - C c = new C(0, 1); - Expect.isTrue(c is C); - Expect.isTrue(c.f is ToVoid); - Expect.isTrue(C.g is Id); - } -} diff --git a/tests/language_2/type/implicit_error_test.dart b/tests/language_2/type/implicit_error_test.dart deleted file mode 100644 index 815abf796ef..00000000000 --- a/tests/language_2/type/implicit_error_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test that various type errors produced by implicit casts don't invoke -// user-defined code during error reporting. - -class NoToString { - toString() { - Expect.fail("should not be called"); - return ""; - } -} - -/// Defeat optimizations of type checks. -dynamic wrap(e) { - if (new DateTime.now().year == 1980) return null; - return e; -} - -bool assertionsEnabled = false; - -void main() { - assert(assertionsEnabled = true); - - dynamic noToString = NoToString(); - - Expect.throws(() { - int x = wrap(noToString); // Implicit cast should throw - return x; - }, (e) { - e.toString(); // Should not throw. - return true; - }); - - if (assertionsEnabled) { - Expect.throws(() { - assert(wrap(noToString)); // Implicit cast should throw - }, (e) { - e.toString(); // Should not throw. - return true; - }); - } -} diff --git a/tests/language_2/type/intersection_test.dart b/tests/language_2/type/intersection_test.dart deleted file mode 100644 index 12e190265de..00000000000 --- a/tests/language_2/type/intersection_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to consider that the -// intersection of [Comparable] and [num] is conflicting. - -import "package:expect/expect.dart"; - -class A { - foo(a, Comparable b) => a == b; - bar(a, Comparable b) => b == a; -} - -main() { - Expect.isFalse(new A().foo(1, 'foo')); - Expect.isTrue(new A().foo(1, 1)); - Expect.isFalse(new A().bar(1, 'foo')); - Expect.isTrue(new A().bar(1, 1)); -} diff --git a/tests/language_2/type_object/constant_type_literal_runtime_test.dart b/tests/language_2/type_object/constant_type_literal_runtime_test.dart deleted file mode 100644 index 3e53acdf28d..00000000000 --- a/tests/language_2/type_object/constant_type_literal_runtime_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test for type literals as compile-time constants. - -class C { - void m() { - const List lst = const [ - - ]; - } -} - -main() { - new C().m(); -} diff --git a/tests/language_2/type_object/constant_type_literal_test.dart b/tests/language_2/type_object/constant_type_literal_test.dart deleted file mode 100644 index 34adaea2848..00000000000 --- a/tests/language_2/type_object/constant_type_literal_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test for type literals as compile-time constants. - -class C { - void m() { - const List lst = const [ - T -// ^ -// [analyzer] COMPILE_TIME_ERROR.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE -// [cfe] Type variables can't be used as constants. -// ^ -// [analyzer] COMPILE_TIME_ERROR.NON_CONSTANT_LIST_ELEMENT - ]; - } -} - -main() { - new C().m(); -} diff --git a/tests/language_2/type_object/first_class_types_constants_test.dart b/tests/language_2/type_object/first_class_types_constants_test.dart deleted file mode 100644 index 6dfd36baade..00000000000 --- a/tests/language_2/type_object/first_class_types_constants_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class C { - final T t; - const C(this.t); -} - -typedef int Fun(bool, String); - -const c0 = C; -const c1 = const C(C); -const c2 = Fun; -const c3 = const C(Fun); - -main() { - Expect.identical(C, C); - Expect.identical(C, c0); - Expect.identical(c1, c1); - Expect.notEquals(c0, c1); - Expect.notEquals(c1, c2); - Expect.identical(c1.t, c0); - Expect.notEquals(C, Fun); - Expect.identical(Fun, Fun); - Expect.identical(Fun, c2); - Expect.identical(c3.t, c2); -} diff --git a/tests/language_2/type_object/first_class_types_lib1.dart b/tests/language_2/type_object/first_class_types_lib1.dart deleted file mode 100644 index 0721042d0d2..00000000000 --- a/tests/language_2/type_object/first_class_types_lib1.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2012, 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 lib1; - -class A {} diff --git a/tests/language_2/type_object/first_class_types_lib2.dart b/tests/language_2/type_object/first_class_types_lib2.dart deleted file mode 100644 index d56239faa23..00000000000 --- a/tests/language_2/type_object/first_class_types_lib2.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2012, 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 lib2; - -class A {} diff --git a/tests/language_2/type_object/first_class_types_libraries_test.dart b/tests/language_2/type_object/first_class_types_libraries_test.dart deleted file mode 100644 index eec983a3ec8..00000000000 --- a/tests/language_2/type_object/first_class_types_libraries_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012, 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 firstClassLibrariestest; - -import "package:expect/expect.dart"; -import 'first_class_types_lib1.dart' as lib1; -import 'first_class_types_lib2.dart' as lib2; - -class C {} - -sameType(a, b) { - Expect.equals(a.runtimeType, b.runtimeType); -} - -differentType(a, b) { - Expect.notEquals(a.runtimeType, b.runtimeType); -} - -main() { - sameType(new lib1.A(), new lib1.A()); - differentType(new lib1.A(), new lib2.A()); - differentType(new C(), new C()); -} diff --git a/tests/language_2/type_object/first_class_types_literals_runtime_1_test.dart b/tests/language_2/type_object/first_class_types_literals_runtime_1_test.dart deleted file mode 100644 index 6a053856eac..00000000000 --- a/tests/language_2/type_object/first_class_types_literals_runtime_1_test.dart +++ /dev/null @@ -1,69 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 "package:expect/expect.dart"; - -class C {} - -class D {} - -typedef int Foo(bool b); - -sameType(a, b) { - Expect.equals(a.runtimeType, b.runtimeType); -} - -main() { - void foo(a) {} - - // Test that literals can be used in different contexts. - [int]; - ([int]); - foo([int]); - [int].length; - ({1: int}); - foo({1: int}); - ({1: int}).keys; - - // Test type literals. - Expect.equals(int, int); - Expect.notEquals(int, num); - Expect.equals(Foo, Foo); - Expect.equals(dynamic, dynamic); - - // Test that class literals return instances of Type. - Expect.isTrue((D).runtimeType is Type); - Expect.isTrue((dynamic).runtimeType is Type); - - // Test that types from runtimeType and literals agree. - Expect.equals(int, 1.runtimeType); - Expect.equals(String, 'hest'.runtimeType); - Expect.equals(double, (0.5).runtimeType); - Expect.equals(bool, true.runtimeType); - Expect.equals(Object, Object().runtimeType); - Expect.equals(C, new C().runtimeType); - - - // runtimeType on type is idempotent. - Expect.equals((D).runtimeType, (D).runtimeType.runtimeType); - - // Test that operator calls on class literals go to Type. - - - - - - - - - - - - Expect.equals((dynamic).toString(), 'dynamic'); -} diff --git a/tests/language_2/type_object/first_class_types_literals_runtime_2_test.dart b/tests/language_2/type_object/first_class_types_literals_runtime_2_test.dart deleted file mode 100644 index 7ef4771444a..00000000000 --- a/tests/language_2/type_object/first_class_types_literals_runtime_2_test.dart +++ /dev/null @@ -1,69 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 "package:expect/expect.dart"; - -class C {} - -class D {} - -typedef int Foo(bool b); - -sameType(a, b) { - Expect.equals(a.runtimeType, b.runtimeType); -} - -main() { - void foo(a) {} - - // Test that literals can be used in different contexts. - [int]; - ([int]); - foo([int]); - [int].length; - ({1: int}); - foo({1: int}); - ({1: int}).keys; - - // Test type literals. - Expect.equals(int, int); - Expect.notEquals(int, num); - Expect.equals(Foo, Foo); - Expect.equals(dynamic, dynamic); - - // Test that class literals return instances of Type. - Expect.isTrue((D).runtimeType is Type); - Expect.isTrue((dynamic).runtimeType is Type); - - // Test that types from runtimeType and literals agree. - Expect.equals(int, 1.runtimeType); - Expect.equals(String, 'hest'.runtimeType); - Expect.equals(double, (0.5).runtimeType); - Expect.equals(bool, true.runtimeType); - Expect.equals(Object, Object().runtimeType); - - Expect.equals(D, new D().runtimeType); - - // runtimeType on type is idempotent. - Expect.equals((D).runtimeType, (D).runtimeType.runtimeType); - - // Test that operator calls on class literals go to Type. - - - - - - - - - - - - Expect.equals((dynamic).toString(), 'dynamic'); -} diff --git a/tests/language_2/type_object/first_class_types_literals_runtime_test.dart b/tests/language_2/type_object/first_class_types_literals_runtime_test.dart deleted file mode 100644 index 0b35f143f60..00000000000 --- a/tests/language_2/type_object/first_class_types_literals_runtime_test.dart +++ /dev/null @@ -1,69 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 "package:expect/expect.dart"; - -class C {} - -class D {} - -typedef int Foo(bool b); - -sameType(a, b) { - Expect.equals(a.runtimeType, b.runtimeType); -} - -main() { - void foo(a) {} - - // Test that literals can be used in different contexts. - [int]; - ([int]); - foo([int]); - [int].length; - ({1: int}); - foo({1: int}); - ({1: int}).keys; - - // Test type literals. - Expect.equals(int, int); - Expect.notEquals(int, num); - Expect.equals(Foo, Foo); - Expect.equals(dynamic, dynamic); - - // Test that class literals return instances of Type. - Expect.isTrue((D).runtimeType is Type); - Expect.isTrue((dynamic).runtimeType is Type); - - // Test that types from runtimeType and literals agree. - Expect.equals(int, 1.runtimeType); - Expect.equals(String, 'hest'.runtimeType); - Expect.equals(double, (0.5).runtimeType); - Expect.equals(bool, true.runtimeType); - Expect.equals(Object, Object().runtimeType); - - - - // runtimeType on type is idempotent. - Expect.equals((D).runtimeType, (D).runtimeType.runtimeType); - - // Test that operator calls on class literals go to Type. - - - - - - - - - - - - Expect.equals((dynamic).toString(), 'dynamic'); -} diff --git a/tests/language_2/type_object/first_class_types_literals_test.dart b/tests/language_2/type_object/first_class_types_literals_test.dart deleted file mode 100644 index edd0dc03ab9..00000000000 --- a/tests/language_2/type_object/first_class_types_literals_test.dart +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class C {} - -class D {} - -typedef int Foo(bool b); - -sameType(a, b) { - Expect.equals(a.runtimeType, b.runtimeType); -} - -main() { - void foo(a) {} - - // Test that literals can be used in different contexts. - [int]; - ([int]); - foo([int]); - [int].length; - ({1: int}); - foo({1: int}); - ({1: int}).keys; - - // Test type literals. - Expect.equals(int, int); - Expect.notEquals(int, num); - Expect.equals(Foo, Foo); - Expect.equals(dynamic, dynamic); - - // Test that class literals return instances of Type. - Expect.isTrue((D).runtimeType is Type); - Expect.isTrue((dynamic).runtimeType is Type); - - // Test that types from runtimeType and literals agree. - Expect.equals(int, 1.runtimeType); - Expect.equals(String, 'hest'.runtimeType); - Expect.equals(double, (0.5).runtimeType); - Expect.equals(bool, true.runtimeType); - Expect.equals(Object, Object().runtimeType); - Expect.equals(C, new C().runtimeType); - Expect.equals(D, new D().runtimeType); - - // runtimeType on type is idempotent. - Expect.equals((D).runtimeType, (D).runtimeType.runtimeType); - - // Test that operator calls on class literals go to Type. - Expect.throwsNoSuchMethodError(() => C = 1); - // ^ - // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE - // [cfe] Can't assign to a type literal. - Expect.throwsNoSuchMethodError(() => C++); - // ^ - // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE - // [cfe] Can't assign to a type literal. - Expect.throwsNoSuchMethodError(() => C + 1); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '+' isn't defined for the class 'Type'. - Expect.throwsNoSuchMethodError(() => C[2]); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '[]' isn't defined for the class 'Type'. - Expect.throwsNoSuchMethodError(() => C[2] = 'hest'); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '[]=' isn't defined for the class 'Type'. - Expect.throwsNoSuchMethodError(() => dynamic = 1); - // ^ - // [cfe] Can't assign to a type literal. - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE - Expect.throwsNoSuchMethodError(() => dynamic++); - // ^ - // [cfe] Can't assign to a type literal. - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ASSIGNMENT_TO_TYPE - Expect.throwsNoSuchMethodError(() => dynamic + 1); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '+' isn't defined for the class 'Type'. - Expect.throwsNoSuchMethodError(() => dynamic[2]); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '[]' isn't defined for the class 'Type'. - Expect.throwsNoSuchMethodError(() => dynamic[2] = 'hest'); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '[]=' isn't defined for the class 'Type'. - - Expect.equals((dynamic).toString(), 'dynamic'); -} diff --git a/tests/language_2/type_object/first_class_types_test.dart b/tests/language_2/type_object/first_class_types_test.dart deleted file mode 100644 index d5f163bee4e..00000000000 --- a/tests/language_2/type_object/first_class_types_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class C {} - -sameType(a, b) { - Expect.equals(a.runtimeType, b.runtimeType); -} - -differentType(a, b) { - Expect.isFalse(a.runtimeType == b.runtimeType); -} - -main() { - // Test types obtained by calling runtimeType. - var v1 = new C(); - var v2 = new C(); - sameType(v1, v2); - - var v3 = new C(); - differentType(v1, v3); - - var i = 1; - var s = 'string'; - var d = 3.14; - var b = true; - sameType(2, i); - sameType('hest', s); - sameType(1.2, d); - sameType(false, b); - - List l = [1, 2, 3]; - Map m = {'a': 1, 'b': 2}; - sameType([], l); - sameType({}, m); - - // Test parameterized lists. - sameType([], []); - differentType([], []); - differentType([], []); -} diff --git a/tests/language_2/type_object/literal_canonicalization_test.dart b/tests/language_2/type_object/literal_canonicalization_test.dart deleted file mode 100644 index 69c95d48484..00000000000 --- a/tests/language_2/type_object/literal_canonicalization_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Foo {} - -class Box { - Type get typeArg => T; -} - -/// A typedef that defines a non-generic function type. -typedef int Func1(bool b); - -/// Semantically identical to [Func], but using the Dart 2 syntax. -typedef Func2 = int Function(bool); - -main() { - // Literals are canonicalized. - Expect.identical(Foo, Foo); - Expect.identical(Box, Box); - Expect.identical(new Box().typeArg, new Box().typeArg); - Expect.identical(Func1, Func1); - Expect.identical(Func2, Func2); -} diff --git a/tests/language_2/type_object/literal_prefix_call_test.dart b/tests/language_2/type_object/literal_prefix_call_test.dart deleted file mode 100644 index 09b06f9fa53..00000000000 --- a/tests/language_2/type_object/literal_prefix_call_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; -import 'dart:core' as core; - -main() { - core.Object(); -} diff --git a/tests/language_2/type_object/literal_type_literal_test.dart b/tests/language_2/type_object/literal_type_literal_test.dart deleted file mode 100644 index 6d641154c3b..00000000000 --- a/tests/language_2/type_object/literal_type_literal_test.dart +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -import 'literal_type_literal_test.dart' as prefix; - -// TODO(rnystrom): This test has a lot of overlap with some other language -// tests, but those are sort of all over the place so I thought it useful to -// test all of the relevant bits in one place here. - -class Foo { - static var property; - static method() => "result"; -} - -class Box { - Type get typeArg => T; -} - -class G {} - -/// A typedef that defines a non-generic function type. -typedef int Func(bool b); - -/// Semantically identical to [Func], but using the Dart 2 syntax. -typedef Func2 = int Function(bool); - -/// A typedef that defines a generic function type. -typedef GenericFunc = int Function(T); - -/// A typedef with a type parameter that defines a non-generic function type. -typedef int GenericTypedef(T t); - -/// Semantically identical to [GenericTypedef], but using the Dart 2 syntax. -typedef GenericTypedef2 = int Function(T); - -/// A typedef with a type parameter that defines a generic function type. -typedef GenericTypedefAndFunc = S Function(T); - -main() { - // Primitive types. - testType(Object, "Object"); - testType(Null, "Null"); - testType(bool, "bool"); - testType(double, "double"); - testType(int, "int"); - testType(num, "num"); - testType(String, "String"); - - // Class types. - testType(Foo, "Foo"); - - // Generic classes. - testType(Box, ["Box", "Box"]); - testType(new Box().typeArg, "Foo"); - testType(new Box().typeArg, "dynamic"); - testType(new Box>().typeArg, "Box"); - testType(G, ["G", "G"]); - testType(new Box>().typeArg, "G"); - - // Typedef. - testType(Func, ["Func", "(bool) => int"]); - testType(Func2, ["Func2", "(bool) => int"]); - testType(GenericTypedef, - ["GenericTypedef", "GenericTypedef", "(dynamic) => int"]); - testType(GenericTypedef2, - ["GenericTypedef2", "GenericTypedef2", "(dynamic) => int"]); - testType(new Box>().typeArg, - ["GenericTypedef", "(int) => int"]); - testType(GenericFunc, ["GenericFunc", RegExp(r'<(\w+)>\((\1)\) => int')]); - testType(GenericTypedefAndFunc, [ - "GenericTypedefAndFunc", - "GenericTypedefAndFunc", - RegExp(r'<(\w+)>\((\1)\) => dynamic') - ]); - - // Literals are canonicalized. - // See type_literal_canonicalization_test.dart - - // Static member uses are not type literals. - Foo.property = "value"; - Expect.equals("value", Foo.property); - Expect.equals("result", Foo.method()); - - // Prefixed types are type literals. - testType(prefix.Foo, "Foo"); - - // Prefix member uses are not. - prefix.Foo.property = "value2"; - Expect.equals("value2", prefix.Foo.property); - Expect.equals("result", prefix.Foo.method()); -} - -void testType(Type type, Object expectedToStringValues) { - Expect.isTrue(type is Type); - String text = type.toString(); - - // dart2js minified names should be tagged. We can still test types that don't - // contain minified names. - if (text.contains('minified:')) return; - - if (expectedToStringValues is List) { - var matched = false; - for (var value in expectedToStringValues) { - if (value is String) { - matched = matched || value == text; - } else if (value is RegExp) { - matched = matched || value.hasMatch(text); - } - } - Expect.isTrue(matched, - 'type `$type`.toString() should be one of: $expectedToStringValues.'); - } else { - var string = expectedToStringValues as String; - Expect.equals(string, text); - } -} diff --git a/tests/language_2/type_object/reify_type_variable_test.dart b/tests/language_2/type_object/reify_type_variable_test.dart deleted file mode 100644 index 2320966b524..00000000000 --- a/tests/language_2/type_object/reify_type_variable_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -class Foo { - reify() { - return T; - } -} - -main() { - Expect.equals(int, new Foo().reify()); - Expect.equals(Foo, new Foo().runtimeType); -} diff --git a/tests/language_2/type_object/runtime_type_function_test.dart b/tests/language_2/type_object/runtime_type_function_test.dart deleted file mode 100644 index dd333f2e5e6..00000000000 --- a/tests/language_2/type_object/runtime_type_function_test.dart +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -typedef String F(String returns, String arguments, [Map named]); - -/// Formats a type like `(String, [int], {bool name}) => double`. -String fn(String returns, String positional, - [Map named = const {}]) { - var result = new StringBuffer(); - result.write("($positional"); - if (positional != "" && named.isNotEmpty) result.write(", "); - if (named.isNotEmpty) { - result.write("{"); - bool first = true; - named.forEach((name, type) { - if (first) { - first = false; - } else { - result.write(", "); - } - result.write("$type $name"); - }); - result.write("}"); - } - result.write(") => $returns"); - return result.toString(); -} - -main() { - // Types that do not use class names - these can be checked on dart2js in - // minified mode. - - check(fn('dynamic', ''), main); // Top-level tear-off. - check(fn('void', ''), Xyzzy.foo); // Class static member tear-off. - check(fn('void', 'Object'), new MyList().add); // Instance tear-off. - check(fn('int', ''), () => 1); // closure. - - var s = new Xyzzy().runtimeType.toString(); - if (s.length <= 3) return; // dart2js --minify has minified names. - - Expect.equals('Xyzzy', s, 'runtime type of plain class prints as class name'); - - check(fn('void', 'String, dynamic'), check); - - // Class static member tear-offs. - check(fn('String', 'String, [String, dynamic]'), Xyzzy.opt); - check(fn('String', 'String', {'a': 'String', 'b': 'dynamic'}), Xyzzy.nam); - - // Instance method tear-offs. - check(fn('void', 'Object'), new MyList().add); - check(fn('void', 'Object'), new MyList().add); - check(fn('void', 'int'), new Xyzzy().intAdd); - - check(fn('String', 'Object'), new G().foo); - - // Instance method with function parameter. - var string2int = fn('int', 'String'); - check(fn('String', 'Object'), new G().moo); - check(fn('String', '$string2int'), new G().higherOrder); - - // Closures. - String localFunc(String a, String b, [Map named]) => a + b; - void localFunc2(int a) { - print(a); - } - - Expect.isTrue(localFunc is F); - check(fn('String', 'String, String, [Map]'), localFunc); - check(fn('void', 'int'), localFunc2); -} - -void check(String text, var thing) { - var type = thing.runtimeType.toString(); - if (type == text) return; - Expect.fail(""" -Type print string does not match expectation - Expected: '$text' - Actual: '$type' -"""); -} - -class Xyzzy { - static void foo() {} - static String opt(String x, [String a, b]) {} - static String nam(String x, {String a, b}) {} - void intAdd(int x) {} -} - -// Using 'MyList' instead of core lib 'List' keeps covariant parameter type of -// tear-offs 'Object' (legacy lib) instead of 'Object?' (opted-in lib). -class MyList { - void add(E value) {} -} - -class G { - U foo(V x) => null; - U moo(V f(U x)) => null; - U higherOrder(int f(U x)) => null; -} diff --git a/tests/language_2/type_object/runtime_type_test.dart b/tests/language_2/type_object/runtime_type_test.dart deleted file mode 100644 index 2287d6223e3..00000000000 --- a/tests/language_2/type_object/runtime_type_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B {} - -main() { - var a = new A(); - var b = new B(); - var f = () => null; - var funcType = f.runtimeType; - var classA = A; - var classB = B; - - Expect.isTrue(a.runtimeType is Type); - Expect.equals(A, a.runtimeType); - Expect.notEquals(B, a.runtimeType); - Expect.notEquals(A, b.runtimeType); - - Expect.isTrue(f.runtimeType is Type); - Expect.isFalse(f.runtimeType == a.runtimeType); - - Expect.isTrue(classA.runtimeType is Type); - Expect.isTrue(classA.runtimeType == classB.runtimeType); - Expect.isFalse(classA.runtimeType == a.runtimeType); - Expect.isFalse(classA.runtimeType == f.runtimeType); - - Expect.isTrue(funcType.runtimeType == classA.runtimeType); - - Expect.isTrue(null.runtimeType is Type); - Expect.equals(Null, null.runtimeType); -} diff --git a/tests/language_2/type_promotion/assign_runtime_test.dart b/tests/language_2/type_promotion/assign_runtime_test.dart deleted file mode 100644 index e4999cdf611..00000000000 --- a/tests/language_2/type_promotion/assign_runtime_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test type promotion of assigned locals. - -class A { - var a = "a"; -} - -class B extends A { - var b = "b"; -} - -class C extends B { - var c = "c"; -} - -class D extends A { - var d = "d"; -} - -class E implements C, D { - var a = ""; - var b = ""; - var c = ""; - var d = ""; -} - -void main() { - A a = new E(); - if (a is B) { - print(a.a); - - a = null; - } - if (a is B) { - a = null; - print(a.a); - - } - if (a is B) { - print(a.a); - - { - a = null; - } - print(a.a); - - } -} diff --git a/tests/language_2/type_promotion/assign_test.dart b/tests/language_2/type_promotion/assign_test.dart deleted file mode 100644 index b366b2a0b02..00000000000 --- a/tests/language_2/type_promotion/assign_test.dart +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test type promotion of assigned locals. - -class A { - var a = "a"; -} - -class B extends A { - var b = "b"; -} - -class C extends B { - var c = "c"; -} - -class D extends A { - var d = "d"; -} - -class E implements C, D { - var a = ""; - var b = ""; - var c = ""; - var d = ""; -} - -void main() { - A a = new E(); - if (a is B) { - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - a = null; - } - if (a is B) { - a = null; - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - } - if (a is B) { - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - { - a = null; - } - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - } -} diff --git a/tests/language_2/type_promotion/assignment_defeats_promotion_and_test.dart b/tests/language_2/type_promotion/assignment_defeats_promotion_and_test.dart deleted file mode 100644 index fcee4184a61..00000000000 --- a/tests/language_2/type_promotion/assignment_defeats_promotion_and_test.dart +++ /dev/null @@ -1,242 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Test that an assignment on the right hand side of `&&` defeats promotion -// after the entire `&&` expression, not just in the right hand side. - -class A {} - -class B extends A { - // An invocation of the form `x.checkB()` verifies that the static type of `x` - // is `B`, since this method is not defined anywhere else. - dynamic checkB() => null; -} - -class C extends A {} - -class D extends B {} - -// An invocation of the form `checkNotB(x)` verifies that the static type of `x` -// is not `B`, since `B` is not assignable to `C`. -dynamic checkNotB(C c) => null; - -// An invocation of the form `alwaysTrue(x)` always returns `true` regardless of -// `x`. -bool alwaysTrue(dynamic x) => true; - -ifSimple([A a]) { - if (a is B && alwaysTrue(a = null)) { - checkNotB(a); - } -} - -ifChainedAndsUnparenthesizedUnrelated([A a, Object x]) { - if (a is B && alwaysTrue(a = null) && x is int) { - checkNotB(a); - } -} - -ifChainedAndsUnparenthesizedRePromote([A a]) { - if (a is B && alwaysTrue(a = null) && a is B) { - a.checkB(); - } -} - -ifChainedAndsUnparenthesizedAssignLast([A a, Object x]) { - if (a is B && x is int && alwaysTrue(a = null)) { - checkNotB(a); - } -} - -ifChainedAndsUnparenthesizedDeeperPromote([A a]) { - if (a is B && a is D && alwaysTrue(a = null)) { - checkNotB(a); - } -} - -ifChainedAndsParenLeftUnrelated([A a, Object x]) { - if ((a is B && alwaysTrue(a = null)) && x is int) { - checkNotB(a); - } -} - -ifChainedAndsParenLeftRePromote([A a]) { - if ((a is B && alwaysTrue(a = null)) && a is B) { - a.checkB(); - } -} - -ifChainedAndsParenLeftAssignLast([A a, Object x]) { - if ((a is B && x is int) && alwaysTrue(a = null)) { - checkNotB(a); - } -} - -ifChainedAndsParenLeftDeeperPromote([A a]) { - if ((a is B && a is D) && alwaysTrue(a = null)) { - checkNotB(a); - } -} - -ifChainedAndsParenRightUnrelated([A a, Object x]) { - if (a is B && (alwaysTrue(a = null) && x is int)) { - checkNotB(a); - } -} - -ifChainedAndsParenRightRePromote([A a]) { - if (a is B && (alwaysTrue(a = null) && a is B)) { - checkNotB(a); - } -} - -ifChainedAndsParenRightAssignLast([A a, Object x]) { - if (a is B && (x is int && alwaysTrue(a = null))) { - checkNotB(a); - } -} - -ifChainedAndsParenRightDeeperPromote([A a]) { - if (a is B && (a is D && alwaysTrue(a = null))) { - checkNotB(a); - } -} - -conditionalSimple([A a]) { - a is B && alwaysTrue(a = null) ? checkNotB(a) : null; -} - -conditionalChainedAndsUnparenthesizedUnrelated([A a, Object x]) { - a is B && alwaysTrue(a = null) && x is int ? checkNotB(a) : null; -} - -conditionalChainedAndsUnparenthesizedRePromote([A a]) { - a is B && alwaysTrue(a = null) && a is B ? a.checkB() : null; -} - -conditionalChainedAndsUnparenthesizedAssignLast([A a, Object x]) { - a is B && x is int && alwaysTrue(a = null) ? checkNotB(a) : null; -} - -conditionalChainedAndsUnparenthesizedDeeperPromote([A a]) { - a is B && a is D && alwaysTrue(a = null) ? checkNotB(a) : null; -} - -conditionalChainedAndsParenLeftUnrelated([A a, Object x]) { - (a is B && alwaysTrue(a = null)) && x is int ? checkNotB(a) : null; -} - -conditionalChainedAndsParenLeftRePromote([A a]) { - (a is B && alwaysTrue(a = null)) && a is B ? a.checkB() : null; -} - -conditionalChainedAndsParenLeftAssignLast([A a, Object x]) { - (a is B && x is int) && alwaysTrue(a = null) ? checkNotB(a) : null; -} - -conditionalChainedAndsParenLeftDeeperPromote([A a]) { - (a is B && a is D) && alwaysTrue(a = null) ? checkNotB(a) : null; -} - -conditionalChainedAndsParenRightUnrelated([A a, Object x]) { - a is B && (alwaysTrue(a = null) && x is int) ? checkNotB(a) : null; -} - -conditionalChainedAndsParenRightRePromote([A a]) { - a is B && (alwaysTrue(a = null) && a is B) ? checkNotB(a) : null; -} - -conditionalChainedAndsParenRightAssignLast([A a, Object x]) { - a is B && (x is int && alwaysTrue(a = null)) ? checkNotB(a) : null; -} - -conditionalChainedAndsParenRightDeeperPromote([A a]) { - a is B && (a is D && alwaysTrue(a = null)) ? checkNotB(a) : null; -} - -andSimple([A a]) { - a is B && alwaysTrue(a = null) && checkNotB(a); -} - -andChainedAndsUnparenthesizedUnrelated([A a, Object x]) { - a is B && alwaysTrue(a = null) && x is int && checkNotB(a); -} - -andChainedAndsUnparenthesizedAssignLast([A a, Object x]) { - a is B && x is int && alwaysTrue(a = null) && checkNotB(a); -} - -andChainedAndsUnparenthesizedDeeperPromote([A a]) { - a is B && a is D && alwaysTrue(a = null) && checkNotB(a); -} - -andChainedAndsParenLeftUnrelated([A a, Object x]) { - (a is B && alwaysTrue(a = null)) && x is int && checkNotB(a); -} - -andChainedAndsParenLeftAssignLast([A a, Object x]) { - (a is B && x is int) && alwaysTrue(a = null) && checkNotB(a); -} - -andChainedAndsParenLeftDeeperPromote([A a]) { - (a is B && a is D) && alwaysTrue(a = null) && checkNotB(a); -} - -andChainedAndsParenRightUnrelated([A a, Object x]) { - a is B && (alwaysTrue(a = null) && x is int) && checkNotB(a); -} - -andChainedAndsParenRightRePromote([A a]) { - a is B && (alwaysTrue(a = null) && a is B) && checkNotB(a); -} - -andChainedAndsParenRightAssignLast([A a, Object x]) { - a is B && (x is int && alwaysTrue(a = null)) && checkNotB(a); -} - -andChainedAndsParenRightDeeperPromote([A a]) { - a is B && (a is D && alwaysTrue(a = null)) && checkNotB(a); -} - -main() { - ifSimple(); - ifChainedAndsUnparenthesizedUnrelated(); - ifChainedAndsUnparenthesizedRePromote(); - ifChainedAndsUnparenthesizedAssignLast(); - ifChainedAndsUnparenthesizedDeeperPromote(); - ifChainedAndsParenLeftUnrelated(); - ifChainedAndsParenLeftRePromote(); - ifChainedAndsParenLeftAssignLast(); - ifChainedAndsParenLeftDeeperPromote(); - ifChainedAndsParenRightUnrelated(); - ifChainedAndsParenRightRePromote(); - ifChainedAndsParenRightAssignLast(); - ifChainedAndsParenRightDeeperPromote(); - conditionalSimple(); - conditionalChainedAndsUnparenthesizedUnrelated(); - conditionalChainedAndsUnparenthesizedRePromote(); - conditionalChainedAndsUnparenthesizedAssignLast(); - conditionalChainedAndsUnparenthesizedDeeperPromote(); - conditionalChainedAndsParenLeftUnrelated(); - conditionalChainedAndsParenLeftRePromote(); - conditionalChainedAndsParenLeftAssignLast(); - conditionalChainedAndsParenLeftDeeperPromote(); - conditionalChainedAndsParenRightUnrelated(); - conditionalChainedAndsParenRightRePromote(); - conditionalChainedAndsParenRightAssignLast(); - conditionalChainedAndsParenRightDeeperPromote(); - andSimple(); - andChainedAndsUnparenthesizedUnrelated(); - andChainedAndsUnparenthesizedAssignLast(); - andChainedAndsUnparenthesizedDeeperPromote(); - andChainedAndsParenLeftUnrelated(); - andChainedAndsParenLeftAssignLast(); - andChainedAndsParenLeftDeeperPromote(); - andChainedAndsParenRightUnrelated(); - andChainedAndsParenRightRePromote(); - andChainedAndsParenRightAssignLast(); - andChainedAndsParenRightDeeperPromote(); -} diff --git a/tests/language_2/type_promotion/assignment_defeats_promotion_cascaded_test.dart b/tests/language_2/type_promotion/assignment_defeats_promotion_cascaded_test.dart deleted file mode 100644 index 4648a371571..00000000000 --- a/tests/language_2/type_promotion/assignment_defeats_promotion_cascaded_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Test that an assignment inside a complex promotion scope defeats all pending -// promotions, whether introduced directly or through LHS or RHS of a logical -// and expression. - -class A {} - -class B extends A {} - -class C extends A {} - -class D extends B {} - -class E extends D {} - -// An invocation of the form `checkNotB(x)` verifies that the static type of `x` -// is not `B`, since `B` is not assignable to `C`. -dynamic checkNotB(C c) => null; - -test([A a]) { - if (a is B && a is D) { - if (a is E) { - checkNotB(a); - a = null; - } - } -} - -main() { - test(); -} diff --git a/tests/language_2/type_promotion/assignment_defeats_promotion_immediate_test.dart b/tests/language_2/type_promotion/assignment_defeats_promotion_immediate_test.dart deleted file mode 100644 index 904ee16f7ca..00000000000 --- a/tests/language_2/type_promotion/assignment_defeats_promotion_immediate_test.dart +++ /dev/null @@ -1,85 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Test that an assignment inside a promotion scope defeats the promotion, even -// if the assignment fills the scope (there are no intervening syntactic -// constructs). - -class A {} - -class B extends A {} - -class C extends A {} - -// An invocation of the form `checkNotB(x)` verifies that the static type of `x` -// is not `B`, since `B` is not assignable to `C`. -dynamic checkNotB(C c) => null; - -conditional([A a]) { - a is B ? a = checkNotB(a) : null; -} - -ifStatementWithoutElse([A a]) { - if (a is B) a = checkNotB(a); -} - -ifStatementWithElse([A a]) { - if (a is B) - a = checkNotB(a); - else - null; -} - -ifElementWithoutElseList([A a]) { - [if (a is B) a = checkNotB(a)]; -} - -ifElementWithoutElseSet([A a]) { - ({if (a is B) a = checkNotB(a)}); -} - -ifElementWithoutElseMapKey([A a]) { - ({if (a is B) a = checkNotB(a): null}); -} - -ifElementWithoutElseMapValue([A a]) { - ({if (a is B) null: a = checkNotB(a)}); -} - -ifElementWithElseList([A a]) { - [if (a is B) a = checkNotB(a) else null]; -} - -ifElementWithElseSet([A a]) { - ({if (a is B) a = checkNotB(a) else null}); -} - -ifElementWithElseMapKey([A a]) { - ({if (a is B) a = checkNotB(a): null else null: null}); -} - -ifElementWithElseMapValue([A a]) { - ({if (a is B) null: a = checkNotB(a) else null: null}); -} - -logicalAnd([A a]) { - a is B && (a = checkNotB(a)); -} - -main() { - conditional(); - ifStatementWithoutElse(); - ifStatementWithElse(); - ifElementWithoutElseList(); - ifElementWithoutElseSet(); - ifElementWithoutElseMapKey(); - ifElementWithoutElseMapValue(); - ifElementWithElseList(); - ifElementWithElseSet(); - ifElementWithElseMapKey(); - ifElementWithElseMapValue(); - logicalAnd(); -} diff --git a/tests/language_2/type_promotion/assignment_defeats_promotion_lhs_and_test.dart b/tests/language_2/type_promotion/assignment_defeats_promotion_lhs_and_test.dart deleted file mode 100644 index bfe5800759d..00000000000 --- a/tests/language_2/type_promotion/assignment_defeats_promotion_lhs_and_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Test that an assignment on the left hand side of `&&` defeats promotion after -// the entire `&&` expression, even if the promotion is on the right hand side -// of `&&`. -// -// Note that it is not strictly necessary for soundness to defeat promotion -// under this circumstance, but it is in the spec. - -class A {} - -class B extends A {} - -class C extends A {} - -// An invocation of the form `checkNotB(x)` verifies that the static type of `x` -// is not `B`, since `B` is not assignable to `C`. -dynamic checkNotB(C c) => null; - -// An invocation of the form `alwaysTrue(x)` always returns `true` regardless of -// `x`. -bool alwaysTrue(dynamic x) => true; - -andChainedAndsUnparenthesizedRePromote([A a]) { - a is B && alwaysTrue(a = null) && a is B && checkNotB(a); -} - -andChainedAndsParenLeftRePromote([A a]) { - (a is B && alwaysTrue(a = null)) && a is B && checkNotB(a); -} - -main() { - andChainedAndsUnparenthesizedRePromote(); - andChainedAndsParenLeftRePromote(); -} diff --git a/tests/language_2/type_promotion/assignment_defeats_promotion_nested_other_bool_test.dart b/tests/language_2/type_promotion/assignment_defeats_promotion_nested_other_bool_test.dart deleted file mode 100644 index befa43c6cef..00000000000 --- a/tests/language_2/type_promotion/assignment_defeats_promotion_nested_other_bool_test.dart +++ /dev/null @@ -1,120 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Test that an assignment inside a promotion scope defeats the promotion, even -// if it is nested inside another unrelated promotion scope. - -class A {} - -class B extends A {} - -class C extends A {} - -// An invocation of the form `checkNotB(x)` verifies that the static type of `x` -// is not `B`, since `B` is not assignable to `C`. -checkNotB(C c) {} - -// An invocation of the form `alwaysTrue(x)` always returns `true` regardless of -// `x`. -bool alwaysTrue(dynamic x) => true; - -noNesting([A a]) { - if (a is B) { - checkNotB(a); - a = null; - } -} - -nestedInsideConditionalExpressionThen([A a, bool b = true]) { - if (a is B) { - checkNotB(a); - b ? a = null : null; - } -} - -nestedInsideConditionalExpressionElse([A a, bool b = true]) { - if (a is B) { - checkNotB(a); - b ? null : a = null; - } -} - -nestedInsideIfStatementThenNoElse([A a, bool b = true]) { - if (a is B) { - checkNotB(a); - if (b) { - a = null; - } - } -} - -nestedInsideIfStatementThenWithElse([A a, bool b = true]) { - if (a is B) { - checkNotB(a); - if (b) { - a = null; - } else {} - } -} - -nestedInsideIfStatementElse([A a, bool b = true]) { - if (a is B) { - checkNotB(a); - if (b) { - } else { - a = null; - } - } -} - -nestedInsideIfElementThenNoElse([A a, bool b = true]) { - if (a is B) { - checkNotB(a); - [if (b) alwaysTrue(a = null)]; - } -} - -nestedInsideIfElementThenWithElse([A a, bool b = true]) { - if (a is B) { - checkNotB(a); - [if (b) alwaysTrue(a = null) else 0]; - } -} - -nestedInsideIfElementElse([A a, bool b = true]) { - if (a is B) { - checkNotB(a); - [if (b) 0 else alwaysTrue(a = null)]; - } -} - -nestedInsideRhsOfAnd([A a, bool b = true]) { - if (a is B) { - checkNotB(a); - b && alwaysTrue(a = null); - } -} - -nestedInsideRhsOfOr([A a, bool b = true]) { - if (a is B) { - checkNotB(a); - b || alwaysTrue(a = null); - } -} - -main() { - noNesting(); - nestedInsideConditionalExpressionThen(); - nestedInsideConditionalExpressionElse(); - nestedInsideIfStatementThenNoElse(); - nestedInsideIfStatementThenWithElse(); - nestedInsideIfStatementElse(); - nestedInsideIfElementThenNoElse(); - nestedInsideIfElementThenWithElse(); - nestedInsideIfElementElse(); - nestedInsideRhsOfAnd(); - nestedInsideRhsOfOr(); -} diff --git a/tests/language_2/type_promotion/assignment_defeats_promotion_nested_other_test.dart b/tests/language_2/type_promotion/assignment_defeats_promotion_nested_other_test.dart deleted file mode 100644 index c53ba0fc75d..00000000000 --- a/tests/language_2/type_promotion/assignment_defeats_promotion_nested_other_test.dart +++ /dev/null @@ -1,120 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Test that an assignment inside a promotion scope defeats the promotion, even -// if it is nested inside another unrelated promotion scope. - -class A {} - -class B extends A {} - -class C extends A {} - -// An invocation of the form `checkNotB(x)` verifies that the static type of `x` -// is not `B`, since `B` is not assignable to `C`. -checkNotB(C c) {} - -// An invocation of the form `alwaysTrue(x)` always returns `true` regardless of -// `x`. -bool alwaysTrue(dynamic x) => true; - -noNesting([A a]) { - if (a is B) { - checkNotB(a); - a = null; - } -} - -nestedInsideConditionalExpressionThen([A a, Object x]) { - if (a is B) { - checkNotB(a); - x is int ? a = null : null; - } -} - -nestedInsideConditionalExpressionElse([A a, Object x]) { - if (a is B) { - checkNotB(a); - x is int ? null : a = null; - } -} - -nestedInsideIfStatementThenNoElse([A a, Object x]) { - if (a is B) { - checkNotB(a); - if (x is int) { - a = null; - } - } -} - -nestedInsideIfStatementThenWithElse([A a, Object x]) { - if (a is B) { - checkNotB(a); - if (x is int) { - a = null; - } else {} - } -} - -nestedInsideIfStatementElse([A a, Object x]) { - if (a is B) { - checkNotB(a); - if (x is int) { - } else { - a = null; - } - } -} - -nestedInsideIfElementThenNoElse([A a, Object x]) { - if (a is B) { - checkNotB(a); - [if (x is int) alwaysTrue(a = null)]; - } -} - -nestedInsideIfElementThenWithElse([A a, Object x]) { - if (a is B) { - checkNotB(a); - [if (x is int) alwaysTrue(a = null) else 0]; - } -} - -nestedInsideIfElementElse([A a, Object x]) { - if (a is B) { - checkNotB(a); - [if (x is int) 0 else alwaysTrue(a = null)]; - } -} - -nestedInsideRhsOfAnd([A a, Object x]) { - if (a is B) { - checkNotB(a); - x is int && alwaysTrue(a = null); - } -} - -nestedInsideRhsOfOr([A a, Object x]) { - if (a is B) { - checkNotB(a); - x is int || alwaysTrue(a = null); - } -} - -main() { - noNesting(); - nestedInsideConditionalExpressionThen(); - nestedInsideConditionalExpressionElse(); - nestedInsideIfStatementThenNoElse(); - nestedInsideIfStatementThenWithElse(); - nestedInsideIfStatementElse(); - nestedInsideIfElementThenNoElse(); - nestedInsideIfElementThenWithElse(); - nestedInsideIfElementElse(); - nestedInsideRhsOfAnd(); - nestedInsideRhsOfOr(); -} diff --git a/tests/language_2/type_promotion/assignment_defeats_promotion_nested_same_test.dart b/tests/language_2/type_promotion/assignment_defeats_promotion_nested_same_test.dart deleted file mode 100644 index 57c6d49d4cb..00000000000 --- a/tests/language_2/type_promotion/assignment_defeats_promotion_nested_same_test.dart +++ /dev/null @@ -1,123 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Test that an assignment inside a promotion scope defeats the promotion, even -// if it is nested inside another promotion scope that promotes the same -// variable. - -class A {} - -class B extends A {} - -class C extends A {} - -class D extends B {} - -// An invocation of the form `checkNotB(x)` verifies that the static type of `x` -// is not `B`, since `B` is not assignable to `C`. -checkNotB(C c) {} - -// An invocation of the form `alwaysTrue(x)` always returns `true` regardless of -// `x`. -bool alwaysTrue(dynamic x) => true; - -noNesting([A a]) { - if (a is B) { - checkNotB(a); - a = null; - } -} - -nestedInsideConditionalExpressionThen([A a]) { - if (a is B) { - checkNotB(a); - a is D ? a = null : null; - } -} - -nestedInsideConditionalExpressionElse([A a]) { - if (a is B) { - checkNotB(a); - a is D ? null : a = null; - } -} - -nestedInsideIfStatementThenNoElse([A a]) { - if (a is B) { - checkNotB(a); - if (a is D) { - a = null; - } - } -} - -nestedInsideIfStatementThenWithElse([A a]) { - if (a is B) { - checkNotB(a); - if (a is D) { - a = null; - } else {} - } -} - -nestedInsideIfStatementElse([A a]) { - if (a is B) { - checkNotB(a); - if (a is D) { - } else { - a = null; - } - } -} - -nestedInsideIfElementThenNoElse([A a]) { - if (a is B) { - checkNotB(a); - [if (a is D) alwaysTrue(a = null)]; - } -} - -nestedInsideIfElementThenWithElse([A a]) { - if (a is B) { - checkNotB(a); - [if (a is D) alwaysTrue(a = null) else 0]; - } -} - -nestedInsideIfElementElse([A a]) { - if (a is B) { - checkNotB(a); - [if (a is D) 0 else alwaysTrue(a = null)]; - } -} - -nestedInsideRhsOfAnd([A a]) { - if (a is B) { - checkNotB(a); - a is D && alwaysTrue(a = null); - } -} - -nestedInsideRhsOfOr([A a]) { - if (a is B) { - checkNotB(a); - a is D || alwaysTrue(a = null); - } -} - -main() { - noNesting(); - nestedInsideConditionalExpressionThen(); - nestedInsideConditionalExpressionElse(); - nestedInsideIfStatementThenNoElse(); - nestedInsideIfStatementThenWithElse(); - nestedInsideIfStatementElse(); - nestedInsideIfElementThenNoElse(); - nestedInsideIfElementThenWithElse(); - nestedInsideIfElementElse(); - nestedInsideRhsOfAnd(); - nestedInsideRhsOfOr(); -} diff --git a/tests/language_2/type_promotion/closure_runtime_1_test.dart b/tests/language_2/type_promotion/closure_runtime_1_test.dart deleted file mode 100644 index bca51c081f3..00000000000 --- a/tests/language_2/type_promotion/closure_runtime_1_test.dart +++ /dev/null @@ -1,205 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test type promotion of locals potentially mutated in closures. - -import "package:meta/meta.dart" show virtual; - -class A { - var a = "a"; - A operator +(int i) => this; -} - -class B extends A { - var b = "b"; -} - -class C extends B { - var c = "c"; -} - -class D extends A { - var d = "d"; -} - -class E extends D implements C { - var a = ""; - var b = ""; - var c = ""; - var d = ""; -} - -func(x) => true; - -void main() { - test1(); - test2(); - test3(); - test3a(); - test4(); - test5(); - test6(); - test6a(); - test7(); - test8(); - test9(); - test10(); - test11(); - test12(); -} - -void test1() { - A a = new E(); - if (a is B) { - print(a.a); - - } - void foo() { - a = new D(); - } -} - -void test2() { - A a = new E(); - void foo() { - a = new D(); - } - - if (a is B) { - print(a.a); - - } -} - -void test3() { - A a = new E(); - void foo() { - a = new D(); - } - - if (a is B) { - print(a.a); - - void foo() { - a = new D(); - } - - print(a.a); - - } -} - -void test3a() { - A a = new E(); - void foo() { - a = new D(); - } - - if ((((a)) is B)) { - print(a.a); - - void foo() { - a = new D(); - } - - print(a.a); - - } -} - -void test4() { - A a = new E(); - if (a is B) { - func(() => a.b); - print(a.a); - print(a.b); - } -} - -void test5() { - A a = new E(); - if (a is B) { - - print(a.a); - } - a = null; -} - -void test6() { - A a = new E(); - if (a is B) { - func(() => a); - print(a.a); - - } - a = null; -} - -void test6a() { - A a = new E(); - if (((a) is B)) { - func(() => a); - print(a.a); - - } - a = null; -} - -void test7() { - A a = new E(); - if (a is B && func(() => a)) { - print(a.a); - - } - a = null; -} - -void test8() { - A a = new E(); - if (a is B - - ) { - print(a.a); - } - a = null; -} - -void test9() { - A a = new E(); - - a = null; -} - -void test10() { - List a = [new E()]; - if (a is List) { - func(() => a[0]); - - } - a = null; -} - -void test11() { - List a = [new E()]; - if (a is List) { - func(() => a[0] = null); - - } - a = null; -} - -void test12() { - A a = new E(); - if (a is B) { - func(() => a++); - print(a.a); - - } - a = null; -} diff --git a/tests/language_2/type_promotion/closure_runtime_2_test.dart b/tests/language_2/type_promotion/closure_runtime_2_test.dart deleted file mode 100644 index 94e686b0837..00000000000 --- a/tests/language_2/type_promotion/closure_runtime_2_test.dart +++ /dev/null @@ -1,205 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test type promotion of locals potentially mutated in closures. - -import "package:meta/meta.dart" show virtual; - -class A { - var a = "a"; - A operator +(int i) => this; -} - -class B extends A { - var b = "b"; -} - -class C extends B { - var c = "c"; -} - -class D extends A { - var d = "d"; -} - -class E extends D implements C { - var a = ""; - var b = ""; - var c = ""; - var d = ""; -} - -func(x) => true; - -void main() { - test1(); - test2(); - test3(); - test3a(); - test4(); - test5(); - test6(); - test6a(); - test7(); - test8(); - test9(); - test10(); - test11(); - test12(); -} - -void test1() { - A a = new E(); - if (a is B) { - print(a.a); - - } - void foo() { - a = new D(); - } -} - -void test2() { - A a = new E(); - void foo() { - a = new D(); - } - - if (a is B) { - print(a.a); - - } -} - -void test3() { - A a = new E(); - void foo() { - a = new D(); - } - - if (a is B) { - print(a.a); - - void foo() { - a = new D(); - } - - print(a.a); - - } -} - -void test3a() { - A a = new E(); - void foo() { - a = new D(); - } - - if ((((a)) is B)) { - print(a.a); - - void foo() { - a = new D(); - } - - print(a.a); - - } -} - -void test4() { - A a = new E(); - if (a is B) { - - print(a.a); - print(a.b); - } -} - -void test5() { - A a = new E(); - if (a is B) { - - print(a.a); - } - a = null; -} - -void test6() { - A a = new E(); - if (a is B) { - func(() => a); - print(a.a); - - } - a = null; -} - -void test6a() { - A a = new E(); - if (((a) is B)) { - func(() => a); - print(a.a); - - } - a = null; -} - -void test7() { - A a = new E(); - if (a is B && func(() => a)) { - print(a.a); - print(a.b); - } - a = null; -} - -void test8() { - A a = new E(); - if (a is B - - ) { - print(a.a); - } - a = null; -} - -void test9() { - A a = new E(); - - a = null; -} - -void test10() { - List a = [new E()]; - if (a is List) { - func(() => a[0]); - - } - a = null; -} - -void test11() { - List a = [new E()]; - if (a is List) { - func(() => a[0] = null); - - } - a = null; -} - -void test12() { - A a = new E(); - if (a is B) { - func(() => a++); - print(a.a); - - } - a = null; -} diff --git a/tests/language_2/type_promotion/closure_runtime_test.dart b/tests/language_2/type_promotion/closure_runtime_test.dart deleted file mode 100644 index 8d5414c2741..00000000000 --- a/tests/language_2/type_promotion/closure_runtime_test.dart +++ /dev/null @@ -1,205 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test type promotion of locals potentially mutated in closures. - -import "package:meta/meta.dart" show virtual; - -class A { - var a = "a"; - A operator +(int i) => this; -} - -class B extends A { - var b = "b"; -} - -class C extends B { - var c = "c"; -} - -class D extends A { - var d = "d"; -} - -class E extends D implements C { - var a = ""; - var b = ""; - var c = ""; - var d = ""; -} - -func(x) => true; - -void main() { - test1(); - test2(); - test3(); - test3a(); - test4(); - test5(); - test6(); - test6a(); - test7(); - test8(); - test9(); - test10(); - test11(); - test12(); -} - -void test1() { - A a = new E(); - if (a is B) { - print(a.a); - - } - void foo() { - a = new D(); - } -} - -void test2() { - A a = new E(); - void foo() { - a = new D(); - } - - if (a is B) { - print(a.a); - - } -} - -void test3() { - A a = new E(); - void foo() { - a = new D(); - } - - if (a is B) { - print(a.a); - - void foo() { - a = new D(); - } - - print(a.a); - - } -} - -void test3a() { - A a = new E(); - void foo() { - a = new D(); - } - - if ((((a)) is B)) { - print(a.a); - - void foo() { - a = new D(); - } - - print(a.a); - - } -} - -void test4() { - A a = new E(); - if (a is B) { - - print(a.a); - print(a.b); - } -} - -void test5() { - A a = new E(); - if (a is B) { - - print(a.a); - } - a = null; -} - -void test6() { - A a = new E(); - if (a is B) { - func(() => a); - print(a.a); - - } - a = null; -} - -void test6a() { - A a = new E(); - if (((a) is B)) { - func(() => a); - print(a.a); - - } - a = null; -} - -void test7() { - A a = new E(); - if (a is B && func(() => a)) { - print(a.a); - - } - a = null; -} - -void test8() { - A a = new E(); - if (a is B - - ) { - print(a.a); - } - a = null; -} - -void test9() { - A a = new E(); - - a = null; -} - -void test10() { - List a = [new E()]; - if (a is List) { - func(() => a[0]); - - } - a = null; -} - -void test11() { - List a = [new E()]; - if (a is List) { - func(() => a[0] = null); - - } - a = null; -} - -void test12() { - A a = new E(); - if (a is B) { - func(() => a++); - print(a.a); - - } - a = null; -} diff --git a/tests/language_2/type_promotion/closure_test.dart b/tests/language_2/type_promotion/closure_test.dart deleted file mode 100644 index 28c06252129..00000000000 --- a/tests/language_2/type_promotion/closure_test.dart +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test type promotion of locals potentially mutated in closures. - -import "package:meta/meta.dart" show virtual; - -class A { - var a = "a"; - A operator +(int i) => this; -} - -class B extends A { - var b = "b"; -} - -class C extends B { - var c = "c"; -} - -class D extends A { - var d = "d"; -} - -class E extends D implements C { - var a = ""; - var b = ""; - var c = ""; - var d = ""; -} - -func(x) => true; - -void main() { - test1(); - test2(); - test3(); - test3a(); - test4(); - test5(); - test6(); - test6a(); - test7(); - test8(); - test9(); - test10(); - test11(); - test12(); -} - -void test1() { - A a = new E(); - if (a is B) { - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - } - void foo() { - a = new D(); - } -} - -void test2() { - A a = new E(); - void foo() { - a = new D(); - } - - if (a is B) { - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - } -} - -void test3() { - A a = new E(); - void foo() { - a = new D(); - } - - if (a is B) { - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - void foo() { - a = new D(); - } - - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - } -} - -void test3a() { - A a = new E(); - void foo() { - a = new D(); - } - - if ((((a)) is B)) { - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - void foo() { - a = new D(); - } - - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - } -} - -void test4() { - A a = new E(); - if (a is B) { - func(() => a.b); - print(a.a); - print(a.b); - } -} - -void test5() { - A a = new E(); - if (a is B) { - func(() => a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - print(a.a); - } - a = null; -} - -void test6() { - A a = new E(); - if (a is B) { - func(() => a); - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - } - a = null; -} - -void test6a() { - A a = new E(); - if (((a) is B)) { - func(() => a); - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - } - a = null; -} - -void test7() { - A a = new E(); - if (a is B && func(() => a)) { - print(a.a); - print(a.b); - } - a = null; -} - -void test8() { - A a = new E(); - if (a is B - && func(() => a.b) - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - ) { - print(a.a); - } - a = null; -} - -void test9() { - A a = new E(); - var b = a is B ? func(() => a.b) : false; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - a = null; -} - -void test10() { - List a = [new E()]; - if (a is List) { - func(() => a[0]); - print(a[0].b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - } - a = null; -} - -void test11() { - List a = [new E()]; - if (a is List) { - func(() => a[0] = null); - print(a[0].b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - } - a = null; -} - -void test12() { - A a = new E(); - if (a is B) { - func(() => a++); - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - } - a = null; -} diff --git a/tests/language_2/type_promotion/functions_runtime_test.dart b/tests/language_2/type_promotion/functions_runtime_test.dart deleted file mode 100644 index b3b6db0beff..00000000000 --- a/tests/language_2/type_promotion/functions_runtime_test.dart +++ /dev/null @@ -1,129 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test type promotion of functions. - -class A {} - -class B extends A {} - -class C {} - -// Subtype relations: -// -// FuncDynToA == A Function(dynamic) <: -// FuncDynToDyn == dynamic Function(dynamic) <:> // "void == dynamic" -// FuncDynToVoid == void Function(dynamic) <: -// FuncAtoDyn == dynamic Function(A). -// -// Declarations ordered by "super before sub", as is common for classes: - -typedef FuncAtoDyn(A a); -typedef void FuncDynToVoid(x); -typedef FuncDynToDyn(x); -typedef A FuncDynToA(x); - -A func(x) => null; - -A a; -B b; -C c; - -main() { - testFuncAtoDyn(); - testFuncDynToDyn(); - testFuncDynToVoid(); - testFuncDynToA(); -} - -testFuncAtoDyn() { - FuncAtoDyn funcAtoDyn = func; - a = funcAtoDyn(new A()); - b = funcAtoDyn(new B()); - - - if (funcAtoDyn is FuncDynToDyn) { - // Promotion: FuncDynToDyn <: FuncAtoDyn. - a = funcAtoDyn(new A()); - b = funcAtoDyn(new B()); - c = funcAtoDyn(new C()); - } -} - -testFuncDynToDyn() { - FuncDynToDyn funcDynToDyn = func; - a = funcDynToDyn(new A()); - b = funcDynToDyn(new B()); - c = funcDynToDyn(new C()); - - if (funcDynToDyn is FuncAtoDyn) { - // No promotion: FuncAtoDyn <\: FuncDynToDyn. - a = funcDynToDyn(new A()); - b = funcDynToDyn(new B()); - c = funcDynToDyn(new C()); - } - - if (funcDynToDyn is FuncDynToVoid) { - // Promotion: FuncDynToVoid <: FuncDynToDyn. - funcDynToDyn(new A()); - funcDynToDyn(new B()); - funcDynToDyn(new C()); - // Returned value has type `void`, usage is restricted. - - } - - if (funcDynToDyn is FuncDynToA) { - // Promotion: FuncDynToA <: FuncDynToDyn. - a = funcDynToDyn(new A()); - b = funcDynToDyn(new B()); - - } -} - -testFuncDynToVoid() { - FuncDynToVoid funcDynToVoid = func; - - - - - if (funcDynToVoid is FuncDynToDyn) { - // Promotion: FuncDynToDyn <:> FuncDynToVoid. - a = funcDynToVoid(new A()); - b = funcDynToVoid(new B()); - c = funcDynToVoid(new C()); - } - - if (funcDynToVoid is FuncDynToA) { - // Promotion: FuncDynToA <: FuncDynToVoid. - a = funcDynToVoid(new A()); - b = funcDynToVoid(new B()); - - } -} - -testFuncDynToA() { - FuncDynToA funcDynToA = func; - a = funcDynToA(new A()); - b = funcDynToA(new B()); - - - if (funcDynToA is FuncDynToDyn) { - // No promotion: FuncDynToDyn <\: FuncDynToA. - a = funcDynToA(new A()); - b = funcDynToA(new B()); - - } - - if (funcDynToA is FuncDynToVoid) { - // No promotion: FuncDynToVoid <\: FuncDynToA. - a = funcDynToA(new A()); - b = funcDynToA(new B()); - - } -} diff --git a/tests/language_2/type_promotion/functions_test.dart b/tests/language_2/type_promotion/functions_test.dart deleted file mode 100644 index 46f3b43e7e1..00000000000 --- a/tests/language_2/type_promotion/functions_test.dart +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test type promotion of functions. - -class A {} - -class B extends A {} - -class C {} - -// Subtype relations: -// -// FuncDynToA == A Function(dynamic) <: -// FuncDynToDyn == dynamic Function(dynamic) <:> // "void == dynamic" -// FuncDynToVoid == void Function(dynamic) <: -// FuncAtoDyn == dynamic Function(A). -// -// Declarations ordered by "super before sub", as is common for classes: - -typedef FuncAtoDyn(A a); -typedef void FuncDynToVoid(x); -typedef FuncDynToDyn(x); -typedef A FuncDynToA(x); - -A func(x) => null; - -A a; -B b; -C c; - -main() { - testFuncAtoDyn(); - testFuncDynToDyn(); - testFuncDynToVoid(); - testFuncDynToA(); -} - -testFuncAtoDyn() { - FuncAtoDyn funcAtoDyn = func; - a = funcAtoDyn(new A()); - b = funcAtoDyn(new B()); - c = funcAtoDyn(new C()); - // ^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - // ^ - // [cfe] The argument type 'C' can't be assigned to the parameter type 'A'. - - if (funcAtoDyn is FuncDynToDyn) { - // Promotion: FuncDynToDyn <: FuncAtoDyn. - a = funcAtoDyn(new A()); - b = funcAtoDyn(new B()); - c = funcAtoDyn(new C()); - } -} - -testFuncDynToDyn() { - FuncDynToDyn funcDynToDyn = func; - a = funcDynToDyn(new A()); - b = funcDynToDyn(new B()); - c = funcDynToDyn(new C()); - - if (funcDynToDyn is FuncAtoDyn) { - // No promotion: FuncAtoDyn <\: FuncDynToDyn. - a = funcDynToDyn(new A()); - b = funcDynToDyn(new B()); - c = funcDynToDyn(new C()); - } - - if (funcDynToDyn is FuncDynToVoid) { - // Promotion: FuncDynToVoid <: FuncDynToDyn. - funcDynToDyn(new A()); - funcDynToDyn(new B()); - funcDynToDyn(new C()); - // Returned value has type `void`, usage is restricted. - Object o = funcDynToDyn(null); - // ^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT - // ^ - // [cfe] This expression has type 'void' and can't be used. - } - - if (funcDynToDyn is FuncDynToA) { - // Promotion: FuncDynToA <: FuncDynToDyn. - a = funcDynToDyn(new A()); - b = funcDynToDyn(new B()); - c = funcDynToDyn(new C()); - // ^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'A' can't be assigned to a variable of type 'C'. - } -} - -testFuncDynToVoid() { - FuncDynToVoid funcDynToVoid = func; - a = funcDynToVoid(new A()); - // ^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT - // ^ - // [cfe] This expression has type 'void' and can't be used. - b = funcDynToVoid(new B()); - // ^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT - // ^ - // [cfe] This expression has type 'void' and can't be used. - c = funcDynToVoid(new C()); - // ^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.USE_OF_VOID_RESULT - // ^ - // [cfe] This expression has type 'void' and can't be used. - - if (funcDynToVoid is FuncDynToDyn) { - // Promotion: FuncDynToDyn <:> FuncDynToVoid. - a = funcDynToVoid(new A()); - b = funcDynToVoid(new B()); - c = funcDynToVoid(new C()); - } - - if (funcDynToVoid is FuncDynToA) { - // Promotion: FuncDynToA <: FuncDynToVoid. - a = funcDynToVoid(new A()); - b = funcDynToVoid(new B()); - c = funcDynToVoid(new C()); - // ^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'A' can't be assigned to a variable of type 'C'. - } -} - -testFuncDynToA() { - FuncDynToA funcDynToA = func; - a = funcDynToA(new A()); - b = funcDynToA(new B()); - c = funcDynToA(new C()); - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'A' can't be assigned to a variable of type 'C'. - - if (funcDynToA is FuncDynToDyn) { - // No promotion: FuncDynToDyn <\: FuncDynToA. - a = funcDynToA(new A()); - b = funcDynToA(new B()); - c = funcDynToA(new C()); - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'A' can't be assigned to a variable of type 'C'. - } - - if (funcDynToA is FuncDynToVoid) { - // No promotion: FuncDynToVoid <\: FuncDynToA. - a = funcDynToA(new A()); - b = funcDynToA(new B()); - c = funcDynToA(new C()); - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'A' can't be assigned to a variable of type 'C'. - } -} diff --git a/tests/language_2/type_promotion/local_runtime_test.dart b/tests/language_2/type_promotion/local_runtime_test.dart deleted file mode 100644 index 58900909383..00000000000 --- a/tests/language_2/type_promotion/local_runtime_test.dart +++ /dev/null @@ -1,165 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test type promotion of locals. - -class A { - var a = "a"; -} - -class B extends A { - var b = "b"; -} - -class C extends B { - var c = "c"; -} - -class D extends A { - var d = "d"; -} - -class E implements C, D { - var a = ""; - var b = ""; - var c = ""; - var d = ""; -} - -void main() { - A a = new E(); - print(a.a); - - - - - if (a is B) { - print(a.a); - print(a.b); - - - - if (a is C) { - print(a.a); - print(a.b); - print(a.c); - - } - - print(a.a); - print(a.b); - - - } - if (a is C) { - print(a.a); - print(a.b); - print(a.c); - - - if (a is B) { - print(a.a); - print(a.b); - print(a.c); - - } - if (a is D) { - print(a.a); - print(a.b); - print(a.c); - - } - - print(a.a); - print(a.b); - print(a.c); - - } - - print(a.a); - - - - - if (a is D) { - print(a.a); - - - print(a.d); - } - - print(a.a); - - - - - var o1 = a is B - ? '${a.a}' - '${a.b}' - - - : '${a.a}' - - - - ; - - var o2 = a is C - ? '${a.a}' - '${a.b}' - '${a.c}' - - : '${a.a}' - - - - ; - - var o3 = a is D - ? '${a.a}' - - - '${a.d}' - : '${a.a}' - - - - ; - - if (a is B && a is B) { - print(a.a); - print(a.b); - - - } - if (a is B && a is C) { - print(a.a); - print(a.b); - print(a.c); - - } - if (a is C && a is B) { - print(a.a); - print(a.b); - print(a.c); - - } - if (a is C && a is D) { - print(a.a); - print(a.b); - print(a.c); - - } - if (a is D && a is C) { - print(a.a); - - - print(a.d); - } -} diff --git a/tests/language_2/type_promotion/local_test.dart b/tests/language_2/type_promotion/local_test.dart deleted file mode 100644 index 9ce1e4a8696..00000000000 --- a/tests/language_2/type_promotion/local_test.dart +++ /dev/null @@ -1,285 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test type promotion of locals. - -class A { - var a = "a"; -} - -class B extends A { - var b = "b"; -} - -class C extends B { - var c = "c"; -} - -class D extends A { - var d = "d"; -} - -class E implements C, D { - var a = ""; - var b = ""; - var c = ""; - var d = ""; -} - -void main() { - A a = new E(); - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - print(a.c); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'A'. - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'A'. - - if (a is B) { - print(a.a); - print(a.b); - print(a.c); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'B'. - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'B'. - - if (a is C) { - print(a.a); - print(a.b); - print(a.c); - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - } - - print(a.a); - print(a.b); - print(a.c); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'B'. - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'B'. - } - if (a is C) { - print(a.a); - print(a.b); - print(a.c); - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - - if (a is B) { - print(a.a); - print(a.b); - print(a.c); - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - } - if (a is D) { - print(a.a); - print(a.b); - print(a.c); - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - } - - print(a.a); - print(a.b); - print(a.c); - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - } - - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - print(a.c); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'A'. - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'A'. - - if (a is D) { - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'D'. - print(a.c); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'D'. - print(a.d); - } - - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - print(a.c); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'A'. - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'A'. - - var o1 = a is B - ? '${a.a}' - '${a.b}' - '${a.c}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'B'. - '${a.d}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'B'. - : '${a.a}' - '${a.b}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - '${a.c}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'A'. - '${a.d}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'A'. - ; - - var o2 = a is C - ? '${a.a}' - '${a.b}' - '${a.c}' - '${a.d}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - : '${a.a}' - '${a.b}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - '${a.c}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'A'. - '${a.d}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'A'. - ; - - var o3 = a is D - ? '${a.a}' - '${a.b}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'D'. - '${a.c}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'D'. - '${a.d}' - : '${a.a}' - '${a.b}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - '${a.c}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'A'. - '${a.d}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'A'. - ; - - if (a is B && a is B) { - print(a.a); - print(a.b); - print(a.c); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'B'. - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'B'. - } - if (a is B && a is C) { - print(a.a); - print(a.b); - print(a.c); - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - } - if (a is C && a is B) { - print(a.a); - print(a.b); - print(a.c); - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - } - if (a is C && a is D) { - print(a.a); - print(a.b); - print(a.c); - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - } - if (a is D && a is C) { - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'D'. - print(a.c); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'D'. - print(a.d); - } -} diff --git a/tests/language_2/type_promotion/logical_and_runtime_test.dart b/tests/language_2/type_promotion/logical_and_runtime_test.dart deleted file mode 100644 index 11a6f0a2b8a..00000000000 --- a/tests/language_2/type_promotion/logical_and_runtime_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test type promotion of locals potentially mutated. - -class A { - var a = true; -} - -class B extends A { - var b = true; -} - -class C extends B { - var c = true; -} - -class D extends A { - var d = true; -} - -class E implements C, D { - var a = true; - var b = true; - var c = true; - var d = true; -} - -void main() { - A a = new E(); - var b; - if (a is D && ((a = new D()) != null)) { - - } - if (a is D && (b = a.d)) { - - a = null; - } - if ((((a) is D) && (b = (a).d))) { - - a = null; - } - if (f(a = null) && a is D) { - b = a.d; - } -} - -bool f(x) => true; diff --git a/tests/language_2/type_promotion/logical_and_test.dart b/tests/language_2/type_promotion/logical_and_test.dart deleted file mode 100644 index 76d63935b28..00000000000 --- a/tests/language_2/type_promotion/logical_and_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test type promotion of locals potentially mutated. - -class A { - var a = true; -} - -class B extends A { - var b = true; -} - -class C extends B { - var c = true; -} - -class D extends A { - var d = true; -} - -class E implements C, D { - var a = true; - var b = true; - var c = true; - var d = true; -} - -void main() { - A a = new E(); - var b; - if (a is D && ((a = new D()) != null)) { - b = a.d; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'A'. - } - if (a is D && (b = a.d)) { - b = a.d; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'A'. - a = null; - } - if ((((a) is D) && (b = (a).d))) { - b = a.d; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'A'. - a = null; - } - if (f(a = null) && a is D) { - b = a.d; - } -} - -bool f(x) => true; diff --git a/tests/language_2/type_promotion/more_specific_runtime_1_test.dart b/tests/language_2/type_promotion/more_specific_runtime_1_test.dart deleted file mode 100644 index 17465207caf..00000000000 --- a/tests/language_2/type_promotion/more_specific_runtime_1_test.dart +++ /dev/null @@ -1,95 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test use of more specific in type promotion of interface types. - -class A { - var a; -} - -class B extends A { - var b; -} - -class C { - var c; -} - -class D { - T d; - - D(this.d); -} - -class E extends D { - T e; - - E(e) - : this.e = e, - super(e); -} - -void main() { - testInterface(); - testGeneric(); -} - -void testInterface() { - var x; - var y; - - A a = new B(); - if (a is B) { - // Promotion B << A. - x = a.b; - } - if (a is C) { - // No promotion C !<< A. - - } - B b = new B(); - if (b is A) { - // No promotion B !<< A. - - } - if (x is A) { - // Promotion A << dynamic. - - } -} - -testGeneric() { - var x; - var y; - - D d1 = new E(null); - if (d1 is E) { - // Promotion: E << D. - - } - if (d1 is E) { - // Promotion: E << D. - - - - } - - D d2 = new E(null); - if (d2 is E) { - // No promotion: E !<< D - - } - - D d3 = new E(new B()); - if (d3 is E) { - // Promotion: E << D - - - } -} diff --git a/tests/language_2/type_promotion/more_specific_runtime_2_test.dart b/tests/language_2/type_promotion/more_specific_runtime_2_test.dart deleted file mode 100644 index fdfa6807fcb..00000000000 --- a/tests/language_2/type_promotion/more_specific_runtime_2_test.dart +++ /dev/null @@ -1,95 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test use of more specific in type promotion of interface types. - -class A { - var a; -} - -class B extends A { - var b; -} - -class C { - var c; -} - -class D { - T d; - - D(this.d); -} - -class E extends D { - T e; - - E(e) - : this.e = e, - super(e); -} - -void main() { - testInterface(); - testGeneric(); -} - -void testInterface() { - var x; - var y; - - A a = new B(); - if (a is B) { - // Promotion B << A. - - } - if (a is C) { - // No promotion C !<< A. - - } - B b = new B(); - if (b is A) { - // No promotion B !<< A. - x = b.b; - } - if (x is A) { - // Promotion A << dynamic. - - } -} - -testGeneric() { - var x; - var y; - - D d1 = new E(null); - if (d1 is E) { - // Promotion: E << D. - - } - if (d1 is E) { - // Promotion: E << D. - - - - } - - D d2 = new E(null); - if (d2 is E) { - // No promotion: E !<< D - - } - - D d3 = new E(new B()); - if (d3 is E) { - // Promotion: E << D - - - } -} diff --git a/tests/language_2/type_promotion/more_specific_runtime_3_test.dart b/tests/language_2/type_promotion/more_specific_runtime_3_test.dart deleted file mode 100644 index 87fdb4da9ca..00000000000 --- a/tests/language_2/type_promotion/more_specific_runtime_3_test.dart +++ /dev/null @@ -1,95 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test use of more specific in type promotion of interface types. - -class A { - var a; -} - -class B extends A { - var b; -} - -class C { - var c; -} - -class D { - T d; - - D(this.d); -} - -class E extends D { - T e; - - E(e) - : this.e = e, - super(e); -} - -void main() { - testInterface(); - testGeneric(); -} - -void testInterface() { - var x; - var y; - - A a = new B(); - if (a is B) { - // Promotion B << A. - - } - if (a is C) { - // No promotion C !<< A. - - } - B b = new B(); - if (b is A) { - // No promotion B !<< A. - - } - if (x is A) { - // Promotion A << dynamic. - - } -} - -testGeneric() { - var x; - var y; - - D d1 = new E(null); - if (d1 is E) { - // Promotion: E << D. - x = d1.e; - } - if (d1 is E) { - // Promotion: E << D. - - - - } - - D d2 = new E(null); - if (d2 is E) { - // No promotion: E !<< D - - } - - D d3 = new E(new B()); - if (d3 is E) { - // Promotion: E << D - - - } -} diff --git a/tests/language_2/type_promotion/more_specific_runtime_4_test.dart b/tests/language_2/type_promotion/more_specific_runtime_4_test.dart deleted file mode 100644 index 757510c4bcd..00000000000 --- a/tests/language_2/type_promotion/more_specific_runtime_4_test.dart +++ /dev/null @@ -1,95 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test use of more specific in type promotion of interface types. - -class A { - var a; -} - -class B extends A { - var b; -} - -class C { - var c; -} - -class D { - T d; - - D(this.d); -} - -class E extends D { - T e; - - E(e) - : this.e = e, - super(e); -} - -void main() { - testInterface(); - testGeneric(); -} - -void testInterface() { - var x; - var y; - - A a = new B(); - if (a is B) { - // Promotion B << A. - - } - if (a is C) { - // No promotion C !<< A. - - } - B b = new B(); - if (b is A) { - // No promotion B !<< A. - - } - if (x is A) { - // Promotion A << dynamic. - - } -} - -testGeneric() { - var x; - var y; - - D d1 = new E(null); - if (d1 is E) { - // Promotion: E << D. - - } - if (d1 is E) { - // Promotion: E << D. - - - x = d1.e; - } - - D d2 = new E(null); - if (d2 is E) { - // No promotion: E !<< D - - } - - D d3 = new E(new B()); - if (d3 is E) { - // Promotion: E << D - - - } -} diff --git a/tests/language_2/type_promotion/more_specific_runtime_5_test.dart b/tests/language_2/type_promotion/more_specific_runtime_5_test.dart deleted file mode 100644 index bc22838fe2f..00000000000 --- a/tests/language_2/type_promotion/more_specific_runtime_5_test.dart +++ /dev/null @@ -1,95 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test use of more specific in type promotion of interface types. - -class A { - var a; -} - -class B extends A { - var b; -} - -class C { - var c; -} - -class D { - T d; - - D(this.d); -} - -class E extends D { - T e; - - E(e) - : this.e = e, - super(e); -} - -void main() { - testInterface(); - testGeneric(); -} - -void testInterface() { - var x; - var y; - - A a = new B(); - if (a is B) { - // Promotion B << A. - - } - if (a is C) { - // No promotion C !<< A. - - } - B b = new B(); - if (b is A) { - // No promotion B !<< A. - - } - if (x is A) { - // Promotion A << dynamic. - - } -} - -testGeneric() { - var x; - var y; - - D d1 = new E(null); - if (d1 is E) { - // Promotion: E << D. - - } - if (d1 is E) { - // Promotion: E << D. - - - - } - - D d2 = new E(null); - if (d2 is E) { - // No promotion: E !<< D - - } - - D d3 = new E(new B()); - if (d3 is E) { - // Promotion: E << D - x = d3.d.b; - - } -} diff --git a/tests/language_2/type_promotion/more_specific_runtime_6_test.dart b/tests/language_2/type_promotion/more_specific_runtime_6_test.dart deleted file mode 100644 index e7a79915689..00000000000 --- a/tests/language_2/type_promotion/more_specific_runtime_6_test.dart +++ /dev/null @@ -1,95 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test use of more specific in type promotion of interface types. - -class A { - var a; -} - -class B extends A { - var b; -} - -class C { - var c; -} - -class D { - T d; - - D(this.d); -} - -class E extends D { - T e; - - E(e) - : this.e = e, - super(e); -} - -void main() { - testInterface(); - testGeneric(); -} - -void testInterface() { - var x; - var y; - - A a = new B(); - if (a is B) { - // Promotion B << A. - - } - if (a is C) { - // No promotion C !<< A. - - } - B b = new B(); - if (b is A) { - // No promotion B !<< A. - - } - if (x is A) { - // Promotion A << dynamic. - - } -} - -testGeneric() { - var x; - var y; - - D d1 = new E(null); - if (d1 is E) { - // Promotion: E << D. - - } - if (d1 is E) { - // Promotion: E << D. - - - - } - - D d2 = new E(null); - if (d2 is E) { - // No promotion: E !<< D - - } - - D d3 = new E(new B()); - if (d3 is E) { - // Promotion: E << D - - x = d3.e.b; - } -} diff --git a/tests/language_2/type_promotion/more_specific_runtime_test.dart b/tests/language_2/type_promotion/more_specific_runtime_test.dart deleted file mode 100644 index 523c95542b7..00000000000 --- a/tests/language_2/type_promotion/more_specific_runtime_test.dart +++ /dev/null @@ -1,95 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test use of more specific in type promotion of interface types. - -class A { - var a; -} - -class B extends A { - var b; -} - -class C { - var c; -} - -class D { - T d; - - D(this.d); -} - -class E extends D { - T e; - - E(e) - : this.e = e, - super(e); -} - -void main() { - testInterface(); - testGeneric(); -} - -void testInterface() { - var x; - var y; - - A a = new B(); - if (a is B) { - // Promotion B << A. - - } - if (a is C) { - // No promotion C !<< A. - - } - B b = new B(); - if (b is A) { - // No promotion B !<< A. - - } - if (x is A) { - // Promotion A << dynamic. - - } -} - -testGeneric() { - var x; - var y; - - D d1 = new E(null); - if (d1 is E) { - // Promotion: E << D. - - } - if (d1 is E) { - // Promotion: E << D. - - - - } - - D d2 = new E(null); - if (d2 is E) { - // No promotion: E !<< D - - } - - D d3 = new E(new B()); - if (d3 is E) { - // Promotion: E << D - - - } -} diff --git a/tests/language_2/type_promotion/more_specific_test.dart b/tests/language_2/type_promotion/more_specific_test.dart deleted file mode 100644 index 69b17308c21..00000000000 --- a/tests/language_2/type_promotion/more_specific_test.dart +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test use of more specific in type promotion of interface types. - -class A { - var a; -} - -class B extends A { - var b; -} - -class C { - var c; -} - -class D { - T d; - - D(this.d); -} - -class E extends D { - T e; - - E(e) - : this.e = e, - super(e); -} - -void main() { - testInterface(); - testGeneric(); -} - -void testInterface() { - var x; - var y; - - A a = new B(); - if (a is B) { - // Promotion B << A. - x = a.b; - } - if (a is C) { - // No promotion C !<< A. - x = a.c; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'A'. - } - B b = new B(); - if (b is A) { - // No promotion B !<< A. - x = b.b; - } - if (x is A) { - // Promotion A << dynamic. - y = x.b; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - } -} - -testGeneric() { - var x; - var y; - - D d1 = new E(null); - if (d1 is E) { - // Promotion: E << D. - x = d1.e; - } - if (d1 is E) { - // Promotion: E << D. - int a = d1.d; - // ^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'A' can't be assigned to a variable of type 'int'. - String b = d1.d; - // ^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'A' can't be assigned to a variable of type 'String'. - x = d1.e; - } - - D d2 = new E(null); - if (d2 is E) { - // No promotion: E !<< D - x = d2.e; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'e' isn't defined for the class 'D'. - } - - D d3 = new E(new B()); - if (d3 is E) { - // Promotion: E << D - x = d3.d.b; - x = d3.e.b; - } -} diff --git a/tests/language_2/type_promotion/multiple_runtime_test.dart b/tests/language_2/type_promotion/multiple_runtime_test.dart deleted file mode 100644 index b14251f1941..00000000000 --- a/tests/language_2/type_promotion/multiple_runtime_test.dart +++ /dev/null @@ -1,105 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test type promotion of locals. - -class A { - var a = "a"; -} - -class B extends A { - var b = "b"; -} - -class C extends B { - var c = "c"; -} - -class D extends A { - var d = "d"; -} - -class E implements C, D { - var a = ""; - var b = ""; - var c = ""; - var d = ""; -} - -void main() { - test(new E()); -} - -void test(A a1) { - A a2 = new E(); - print(a1.a); - - - - - print(a2.a); - - - - - if (a1 is B && a2 is C) { - print(a1.a); - print(a1.b); - - - - print(a2.a); - print(a2.b); - print(a2.c); - - - if (a1 is C && a2 is D) { - print(a1.a); - print(a1.b); - print(a1.c); - - - print(a2.a); - print(a2.b); - print(a2.c); - - } - } - - var o1 = a1 is B && a2 is C - ? '${a1.a}' - '${a1.b}' - - - '${a2.a}' - '${a2.b}' - '${a2.c}' - - : '${a1.a}' - - - - '${a2.a}' - - - - ; - - if (a2 is C && a1 is B && a1 is C && a2 is B && a2 is D) { - print(a1.a); - print(a1.b); - print(a1.c); - - - print(a2.a); - print(a2.b); - print(a2.c); - - } -} diff --git a/tests/language_2/type_promotion/multiple_test.dart b/tests/language_2/type_promotion/multiple_test.dart deleted file mode 100644 index de8607c9c27..00000000000 --- a/tests/language_2/type_promotion/multiple_test.dart +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test type promotion of locals. - -class A { - var a = "a"; -} - -class B extends A { - var b = "b"; -} - -class C extends B { - var c = "c"; -} - -class D extends A { - var d = "d"; -} - -class E implements C, D { - var a = ""; - var b = ""; - var c = ""; - var d = ""; -} - -void main() { - test(new E()); -} - -void test(A a1) { - A a2 = new E(); - print(a1.a); - print(a1.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - print(a1.c); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'A'. - print(a1.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'A'. - - print(a2.a); - print(a2.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - print(a2.c); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'A'. - print(a2.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'A'. - - if (a1 is B && a2 is C) { - print(a1.a); - print(a1.b); - print(a1.c); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'B'. - print(a1.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'B'. - - print(a2.a); - print(a2.b); - print(a2.c); - print(a2.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - - if (a1 is C && a2 is D) { - print(a1.a); - print(a1.b); - print(a1.c); - print(a1.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - - print(a2.a); - print(a2.b); - print(a2.c); - print(a2.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - } - } - - var o1 = a1 is B && a2 is C - ? '${a1.a}' - '${a1.b}' - '${a1.c}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'B'. - '${a1.d}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'B'. - '${a2.a}' - '${a2.b}' - '${a2.c}' - '${a2.d}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - : '${a1.a}' - '${a1.b}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - '${a1.c}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'A'. - '${a1.d}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'A'. - '${a2.a}' - '${a2.b}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - '${a2.c}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'A'. - '${a2.d}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'A'. - ; - - if (a2 is C && a1 is B && a1 is C && a2 is B && a2 is D) { - print(a1.a); - print(a1.b); - print(a1.c); - print(a1.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - - print(a2.a); - print(a2.b); - print(a2.c); - print(a2.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - } -} diff --git a/tests/language_2/type_promotion/parameter_runtime_test.dart b/tests/language_2/type_promotion/parameter_runtime_test.dart deleted file mode 100644 index bbfdb298a36..00000000000 --- a/tests/language_2/type_promotion/parameter_runtime_test.dart +++ /dev/null @@ -1,213 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test type promotion of parameters. - -class A { - var a = "a"; -} - -class B extends A { - var b = "b"; -} - -class C extends B { - var c = "c"; -} - -class D extends A { - var d = "d"; -} - -class E implements C, D { - var a = ""; - var b = ""; - var c = ""; - var d = ""; -} - -void main() { - test(new E()); -} - -void test(A a) { - print(a.a); - - - - - if (a is B) { - print(a.a); - print(a.b); - - - - if (a is C) { - print(a.a); - print(a.b); - print(a.c); - - } - - print(a.a); - print(a.b); - - - } - if (a is C) { - print(a.a); - print(a.b); - print(a.c); - - - if (a is B) { - print(a.a); - print(a.b); - print(a.c); - - } - if (a is D) { - print(a.a); - print(a.b); - print(a.c); - - } - - print(a.a); - print(a.b); - print(a.c); - - } - - print(a.a); - - - - - if (a is D) { - print(a.a); - - - print(a.d); - } - - print(a.a); - - - - - var o1 = a is B - ? '${a.a}' - '${a.b}' - - - : '${a.a}' - - - - ; - - var o2 = a is C - ? '${a.a}' - '${a.b}' - '${a.c}' - - : '${a.a}' - - - - ; - - var o3 = a is D - ? '${a.a}' - - - '${a.d}' - : '${a.a}' - - - - ; - - if (a is B && a is B) { - print(a.a); - print(a.b); - - - } - if (a is B && a is C) { - print(a.a); - print(a.b); - print(a.c); - - } - if (a is C && a is B) { - print(a.a); - print(a.b); - print(a.c); - - } - if (a is C && a is D) { - print(a.a); - print(a.b); - print(a.c); - - } - if (a is D && a is C) { - print(a.a); - - - print(a.d); - } - if (a is D && - a.a == "" - - - && - a.d == "") { - print(a.a); - - - print(a.d); - } - if (a.a == "" - - - - && - a is B && - a.a == "" && - a.b == "" - - - && - a is C && - a.a == "" && - a.b == "" && - a.c == "" - - ) { - print(a.a); - print(a.b); - print(a.c); - - } - if ((a is B)) { - print(a.a); - print(a.b); - - - } - if ((a is B && (a) is C) && a is B) { - print(a.a); - print(a.b); - print(a.c); - - } -} diff --git a/tests/language_2/type_promotion/parameter_test.dart b/tests/language_2/type_promotion/parameter_test.dart deleted file mode 100644 index ccde9665880..00000000000 --- a/tests/language_2/type_promotion/parameter_test.dart +++ /dev/null @@ -1,375 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test type promotion of parameters. - -class A { - var a = "a"; -} - -class B extends A { - var b = "b"; -} - -class C extends B { - var c = "c"; -} - -class D extends A { - var d = "d"; -} - -class E implements C, D { - var a = ""; - var b = ""; - var c = ""; - var d = ""; -} - -void main() { - test(new E()); -} - -void test(A a) { - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - print(a.c); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'A'. - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'A'. - - if (a is B) { - print(a.a); - print(a.b); - print(a.c); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'B'. - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'B'. - - if (a is C) { - print(a.a); - print(a.b); - print(a.c); - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - } - - print(a.a); - print(a.b); - print(a.c); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'B'. - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'B'. - } - if (a is C) { - print(a.a); - print(a.b); - print(a.c); - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - - if (a is B) { - print(a.a); - print(a.b); - print(a.c); - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - } - if (a is D) { - print(a.a); - print(a.b); - print(a.c); - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - } - - print(a.a); - print(a.b); - print(a.c); - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - } - - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - print(a.c); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'A'. - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'A'. - - if (a is D) { - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'D'. - print(a.c); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'D'. - print(a.d); - } - - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - print(a.c); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'A'. - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'A'. - - var o1 = a is B - ? '${a.a}' - '${a.b}' - '${a.c}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'B'. - '${a.d}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'B'. - : '${a.a}' - '${a.b}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - '${a.c}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'A'. - '${a.d}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'A'. - ; - - var o2 = a is C - ? '${a.a}' - '${a.b}' - '${a.c}' - '${a.d}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - : '${a.a}' - '${a.b}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - '${a.c}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'A'. - '${a.d}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'A'. - ; - - var o3 = a is D - ? '${a.a}' - '${a.b}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'D'. - '${a.c}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'D'. - '${a.d}' - : '${a.a}' - '${a.b}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - '${a.c}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'A'. - '${a.d}' - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'A'. - ; - - if (a is B && a is B) { - print(a.a); - print(a.b); - print(a.c); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'B'. - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'B'. - } - if (a is B && a is C) { - print(a.a); - print(a.b); - print(a.c); - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - } - if (a is C && a is B) { - print(a.a); - print(a.b); - print(a.c); - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - } - if (a is C && a is D) { - print(a.a); - print(a.b); - print(a.c); - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - } - if (a is D && a is C) { - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'D'. - print(a.c); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'D'. - print(a.d); - } - if (a is D && - a.a == "" - && a.b == "" - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'D'. - && a.c == "" - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'D'. - && - a.d == "") { - print(a.a); - print(a.b); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'D'. - print(a.c); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'D'. - print(a.d); - } - if (a.a == "" - && a.b == "" - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'b' isn't defined for the class 'A'. - && a.c == "" - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'A'. - && a.d == "" - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'A'. - && - a is B && - a.a == "" && - a.b == "" - && a.c == "" - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'B'. - && a.d == "" - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'B'. - && - a is C && - a.a == "" && - a.b == "" && - a.c == "" - && a.d == "" - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - ) { - print(a.a); - print(a.b); - print(a.c); - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - } - if ((a is B)) { - print(a.a); - print(a.b); - print(a.c); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'c' isn't defined for the class 'B'. - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'B'. - } - if ((a is B && (a) is C) && a is B) { - print(a.a); - print(a.b); - print(a.c); - print(a.d); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'd' isn't defined for the class 'C'. - } -} diff --git a/tests/language_2/type_variable/bound_access_runtime_test.dart b/tests/language_2/type_variable/bound_access_runtime_test.dart deleted file mode 100644 index cda73892edd..00000000000 --- a/tests/language_2/type_variable/bound_access_runtime_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// 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. - -class DynamicClass { - T field1; - T field2; - - DynamicClass(this.field1, this.field2); - - method() => field1 * field2; -} - -class NumClass { - T field1; - S field2; - - NumClass(this.field1, this.field2); - - num method1() => field1 * field2; - - -} - -main() { - new DynamicClass(0.5, 2).method(); - new NumClass(2, 0.5).method1(); - -} diff --git a/tests/language_2/type_variable/bound_access_test.dart b/tests/language_2/type_variable/bound_access_test.dart deleted file mode 100644 index 5737b7c2b89..00000000000 --- a/tests/language_2/type_variable/bound_access_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// 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. - -// @dart = 2.9 - -class DynamicClass { - T field1; - T field2; - - DynamicClass(this.field1, this.field2); - - method() => field1 * field2; -} - -class NumClass { - T field1; - S field2; - - NumClass(this.field1, this.field2); - - num method1() => field1 * field2; - - num method2() => field1 + field2.length; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'length' isn't defined for the class 'num'. -} - -main() { - new DynamicClass(0.5, 2).method(); - new NumClass(2, 0.5).method1(); - new NumClass(2, 0.5).method2(); -} diff --git a/tests/language_2/type_variable/bounds2_test.dart b/tests/language_2/type_variable/bounds2_test.dart deleted file mode 100644 index c1e7805dcfd..00000000000 --- a/tests/language_2/type_variable/bounds2_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test of parameterized types with invalid bounds. - -abstract class J {} - -abstract class I {} - -class A implements I, J {} -// ^ -// [cfe] Type argument 'T' doesn't conform to the bound 'num' of the type variable 'T' on 'I'. -// ^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - -main() { - // We are only interested in the instance creation, hence - // the result is assigned to `dynamic`. - dynamic a = new A(); -} diff --git a/tests/language_2/type_variable/bounds3_runtime_test.dart b/tests/language_2/type_variable/bounds3_runtime_test.dart deleted file mode 100644 index 93211de9054..00000000000 --- a/tests/language_2/type_variable/bounds3_runtime_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test of parameterized types with invalid bounds. - -class A {} - -class B { - foo(x) { - - } -} - -main() { - var b = new B(); - b.foo(new A()); -} diff --git a/tests/language_2/type_variable/bounds3_test.dart b/tests/language_2/type_variable/bounds3_test.dart deleted file mode 100644 index 7246ac71ed8..00000000000 --- a/tests/language_2/type_variable/bounds3_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test of parameterized types with invalid bounds. - -class A {} - -class B { - foo(x) { - return x is A; - // ^ - // [cfe] Type argument 'X' doesn't conform to the bound 'int' of the type variable 'K' on 'A'. - // ^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - } -} - -main() { - var b = new B(); - b.foo(new A()); -} diff --git a/tests/language_2/type_variable/bounds4_runtime_test.dart b/tests/language_2/type_variable/bounds4_runtime_test.dart deleted file mode 100644 index de363f9d439..00000000000 --- a/tests/language_2/type_variable/bounds4_runtime_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test instantiation of object with malbounded types. - -class A< - T - - > {} - -class B implements A {} - -class C< - T - - > implements B {} - -class Class { - newA() { - new A(); - } - newB() { - new B(); - } - newC() { - new C(); - } -} - -void test(f()) { - var v = f(); -} - -void main() { - test(() => new A()); - // TODO(eernst): Should it be a compile-time error to create an instance - // of this class in #01? - test(() => new B()); - test(() => new C()); - - test(() => new A()); - test(() => new B()); - test(() => new C()); - - dynamic c = new Class(); - test(() => c.newA()); - test(() => c.newB()); - test(() => c.newC()); - - c = new Class(); - test(() => c.newA()); - test(() => c.newB()); - test(() => c.newC()); -} diff --git a/tests/language_2/type_variable/bounds4_test.dart b/tests/language_2/type_variable/bounds4_test.dart deleted file mode 100644 index 9fa6558abd4..00000000000 --- a/tests/language_2/type_variable/bounds4_test.dart +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test instantiation of object with malbounded types. - -class A< - T - extends num - > {} - -class B implements A {} -// ^ -// [cfe] Type argument 'T' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. -// ^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - -class C< - T - extends num - > implements B {} - -class Class { - newA() { - new A(); - // ^ - // [cfe] Type argument 'T' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. - // ^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - } - newB() { - new B(); - } - newC() { - new C(); - // ^ - // [cfe] Type argument 'T' doesn't conform to the bound 'num' of the type variable 'T' on 'C'. - // ^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - } -} - -void test(f()) { - var v = f(); -} - -void main() { - test(() => new A()); - // TODO(eernst): Should it be a compile-time error to create an instance - // of this class in #01? - test(() => new B()); - test(() => new C()); - - test(() => new A()); - // ^ - // [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'A'. - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - test(() => new B()); - test(() => new C()); - // ^ - // [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'C'. - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - - dynamic c = new Class(); - test(() => c.newA()); - test(() => c.newB()); - test(() => c.newC()); - - c = new Class(); - test(() => c.newA()); - test(() => c.newB()); - test(() => c.newC()); -} diff --git a/tests/language_2/type_variable/bounds_test.dart b/tests/language_2/type_variable/bounds_test.dart deleted file mode 100644 index 05f8c0b3d9f..00000000000 --- a/tests/language_2/type_variable/bounds_test.dart +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2012, 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 - -// Test of parameterized factory methods. - -class Foo { - Foo(); - - factory Foo.bad() = XFoo; // //# 00: compile-time error - - factory Foo.good() = Foo; - - factory Foo.IFoo() { - return null; - } -} - -abstract class IFoo { - factory IFoo() = Foo; //# 11: compile-time error -} - -// String is not a subtype of num. -class Baz - extends Foo //# 01: compile-time error -{} - -class Biz extends Foo {} - -Foo fi; - -// String is not a subtype of num. -Foo - //# 02: compile-time error - fs; - -class Box { - // Box.T is not guaranteed to be a subtype of num. - Foo t; //# 03: compile-time error - - makeFoo() { - // Box.T is not guaranteed to be a subtype of num. - return new Foo(); //# 04: compile-time error - } -} - -main() { - // String is not a subtype of num. - var v1 = new Foo(); //# 05: compile-time error - - // String is not a subtype of num. - Foo v2 = null; //# 06: compile-time error - - new Baz(); - new Biz(); - - fi = new Foo(); - fs = new Foo(); - - new Box().makeFoo(); - new Box().makeFoo(); - new Box().makeFoo(); - - // Fisk does not exist. - new Box(); //# 07: compile-time error - - // Too many type arguments. - new Box(); //# 08: compile-time error - - // Fisk does not exist. - Box box = null; //# 09: compile-time error - - // Too many type arguments. - Box box = null; //# 10: compile-time error -} diff --git a/tests/language_2/type_variable/closure2_test.dart b/tests/language_2/type_variable/closure2_test.dart deleted file mode 100644 index f674acd89a7..00000000000 --- a/tests/language_2/type_variable/closure2_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A {} - -class C { - a() { - return () => new A(); - } - - list() { - return () => []; - } - - map() { - return () => {}; - } -} - -main() { - Expect.isTrue(new C().a()() is A); - Expect.isFalse(new C().a()() is A); - Expect.isTrue(new C().list()() is List); - Expect.isFalse(new C().list()() is List); - Expect.isTrue(new C().map()() is Map); - Expect.isFalse(new C().map()() is Map); - Expect.isFalse(new C().map()() is Map); -} diff --git a/tests/language_2/type_variable/closure3_test.dart b/tests/language_2/type_variable/closure3_test.dart deleted file mode 100644 index 1b961349dc0..00000000000 --- a/tests/language_2/type_variable/closure3_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -class A {} - -class C { - a() { - return () => new A(); - } -} - -main() { - Expect.isTrue(new C().a()() is A); - Expect.isFalse(new C().a()() is A); -} diff --git a/tests/language_2/type_variable/closure4_test.dart b/tests/language_2/type_variable/closure4_test.dart deleted file mode 100644 index 902c26b3207..00000000000 --- a/tests/language_2/type_variable/closure4_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -class A {} - -class C { - map() { - return () => {}; - } -} - -main() { - Expect.isTrue(new C().map()() is Map); - Expect.isFalse(new C().map()() is Map); - Expect.isFalse(new C().map()() is Map); -} diff --git a/tests/language_2/type_variable/closure_test.dart b/tests/language_2/type_variable/closure_test.dart deleted file mode 100644 index e1f0e999249..00000000000 --- a/tests/language_2/type_variable/closure_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class C { - C.foo() { - x = (a) => a is T; - } - C.bar() { - x = (a) => a is! T; - } - C.baz() { - x = (a) => a as T; - } - var x; -} - -main() { - Expect.isTrue(new C.foo().x(1)); - Expect.isFalse(new C.foo().x('1')); - Expect.isFalse(new C.bar().x(1)); - Expect.isTrue(new C.bar().x('1')); - Expect.equals(new C.baz().x(1), 1); - Expect.throws(() => new C.baz().x('1')); -} diff --git a/tests/language_2/type_variable/conflict2_runtime_test.dart b/tests/language_2/type_variable/conflict2_runtime_test.dart deleted file mode 100644 index ff0180d5daf..00000000000 --- a/tests/language_2/type_variable/conflict2_runtime_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -// Regression test for issue 13134. Invocation of a type parameter. - -import "package:expect/expect.dart"; - -class C { - noSuchMethod(Invocation im) { - throw "noSuchMethod shouldn't be called in this test."; - } - - // This is equivalent to (T).call(). See issue 19725 - - - // T is in scope, even in static context. Compile-time error to call this.T(). - - - // X is not in scope. NoSuchMethodError. - - - // Class 'C' has no static method 'T': NoSuchMethodError. - - - // Class '_Type' has no instance method 'call': NoSuchMethodError. - - - // Runtime type T not accessible from static context. Compile-time error. - - - // Class '_Type' has no [] operator: NoSuchMethodError. - - - // Runtime type T not accessible from static context. Compile-time error. - - - // Class '_Type' has no member m: NoSuchMethodError. - - - // Runtime type T not accessible from static context. Compile-time error. - -} - -main() { - - - - - - - - - - -} diff --git a/tests/language_2/type_variable/conflict2_test.dart b/tests/language_2/type_variable/conflict2_test.dart deleted file mode 100644 index 40abfb9c8e9..00000000000 --- a/tests/language_2/type_variable/conflict2_test.dart +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) 2014, 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 - -// Regression test for issue 13134. Invocation of a type parameter. - -import "package:expect/expect.dart"; - -class C { - noSuchMethod(Invocation im) { - throw "noSuchMethod shouldn't be called in this test."; - } - - // This is equivalent to (T).call(). See issue 19725 - foo() => T(); - // ^ - // [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION - // [cfe] Couldn't find constructor 'T'. - - // T is in scope, even in static context. Compile-time error to call this.T(). - static bar() => T(); - // ^ - // [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION - // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC - // [cfe] Couldn't find constructor 'T'. - - // X is not in scope. NoSuchMethodError. - static baz() => X(); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD - // [cfe] Method not found: 'X'. - - // Class 'C' has no static method 'T': NoSuchMethodError. - static qux() => C.T(); - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD - // [cfe] Member not found: 'C.T'. - - // Class '_Type' has no instance method 'call': NoSuchMethodError. - quux() => (T)(); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION - // ^ - // [cfe] The method 'call' isn't defined for the class 'Type'. - - // Runtime type T not accessible from static context. Compile-time error. - static corge() => (T)(); - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.INVOCATION_OF_NON_FUNCTION_EXPRESSION - // ^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC - // [cfe] Type variables can't be used in static members. - // ^ - // [cfe] The method 'call' isn't defined for the class 'Type'. - - // Class '_Type' has no [] operator: NoSuchMethodError. - grault() => T[0]; - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '[]' isn't defined for the class 'Type'. - - // Runtime type T not accessible from static context. Compile-time error. - static garply() => T[0]; - // ^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC - // [cfe] Type variables can't be used in static members. - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_OPERATOR - // [cfe] The operator '[]' isn't defined for the class 'Type'. - - // Class '_Type' has no member m: NoSuchMethodError. - waldo() => T.m; - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'm' isn't defined for the class 'Type'. - - // Runtime type T not accessible from static context. Compile-time error. - static fred() => T.m; - // ^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC - // [cfe] Type variables can't be used in static members. - // ^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - // [cfe] The getter 'm' isn't defined for the class 'Type'. -} - -main() { - Expect.throwsNoSuchMethodError(() => new C().foo()); - C.bar(); - Expect.throwsNoSuchMethodError(() => C.baz()); - Expect.throwsNoSuchMethodError(() => C.qux()); - Expect.throwsNoSuchMethodError(() => new C().quux()); - C.corge(); - Expect.throwsNoSuchMethodError(() => new C().grault()); - C.garply(); - Expect.throwsNoSuchMethodError(() => new C().waldo()); - C.fred(); -} diff --git a/tests/language_2/type_variable/conflict_runtime_test.dart b/tests/language_2/type_variable/conflict_runtime_test.dart deleted file mode 100644 index 26cf7779eb4..00000000000 --- a/tests/language_2/type_variable/conflict_runtime_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test that we report a compile-time error when a type parameter conflicts -// with an instance or static member with the same name. - -import "package:expect/expect.dart"; - -class G1 { - -} - -class G2 { - -} - -class G3 { - -} - -class G4 { - -} - -class G5 { - -} - -class G6 { - -} - -class G7 { - -} - -class G8 { - -} - -main() { - new G1(); - new G2(); - new G3(); - new G4(); - new G5(); - new G6(); - new G7(); - new G8(); -} diff --git a/tests/language_2/type_variable/conflict_test.dart b/tests/language_2/type_variable/conflict_test.dart deleted file mode 100644 index 6a7f0ab1b95..00000000000 --- a/tests/language_2/type_variable/conflict_test.dart +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that we report a compile-time error when a type parameter conflicts -// with an instance or static member with the same name. - -import "package:expect/expect.dart"; - -class G1 { -// ^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_TYPE_VARIABLE_AND_MEMBER - var T; - // ^ - // [cfe] Conflicts with type variable 'T'. -} - -class G2 { -// ^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_TYPE_VARIABLE_AND_MEMBER - get T {} - // ^ - // [cfe] Conflicts with type variable 'T'. -} - -class G3 { -// ^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_TYPE_VARIABLE_AND_MEMBER - T() {} -//^ -// [cfe] Conflicts with type variable 'T'. -} - -class G4 { -// ^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_TYPE_VARIABLE_AND_MEMBER - static var T; - // ^ - // [cfe] Conflicts with type variable 'T'. -} - -class G5 { -// ^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_TYPE_VARIABLE_AND_MEMBER - static get T {} - // ^ - // [cfe] Conflicts with type variable 'T'. -} - -class G6 { -// ^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_TYPE_VARIABLE_AND_MEMBER - static T() {} - // ^ - // [cfe] Conflicts with type variable 'T'. -} - -class G7 { -// ^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_TYPE_VARIABLE_AND_MEMBER - set T(_) {} - // ^ - // [cfe] Conflicts with type variable 'T'. -} - -class G8 { -// ^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_TYPE_VARIABLE_AND_MEMBER - static set T(x) {} - // ^ - // [cfe] Conflicts with type variable 'T'. -} - -main() { - new G1(); - new G2(); - new G3(); - new G4(); - new G5(); - new G6(); - new G7(); - new G8(); -} diff --git a/tests/language_2/type_variable/field_initializer2_test.dart b/tests/language_2/type_variable/field_initializer2_test.dart deleted file mode 100644 index 3aad18e18e6..00000000000 --- a/tests/language_2/type_variable/field_initializer2_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2016, 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 - -// Check that an inlined field initializer has access to the enclosing -// type variables. - -import "package:expect/expect.dart"; - -class A { - var c = new X(); -} - -class B extends A {} - -class X {} - -main() { - Expect.isTrue(new B().c is X); - Expect.isFalse(new B().c is X); -} diff --git a/tests/language_2/type_variable/field_initializer_closure2_test.dart b/tests/language_2/type_variable/field_initializer_closure2_test.dart deleted file mode 100644 index d78d73c2b92..00000000000 --- a/tests/language_2/type_variable/field_initializer_closure2_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2016, 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 - -// Check that an inlined field closure has access to the enclosing -// type variables. - -import "package:expect/expect.dart"; - -class A { - var c = (() => new X())(); -} - -class B extends A {} - -class X {} - -main() { - Expect.isTrue(new B().c is X); - Expect.isFalse(new B().c is X); -} diff --git a/tests/language_2/type_variable/field_initializer_closure_test.dart b/tests/language_2/type_variable/field_initializer_closure_test.dart deleted file mode 100644 index c0f1b01f8a5..00000000000 --- a/tests/language_2/type_variable/field_initializer_closure_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2013, 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 - -// Check that an inlined field closure has access to the enclosing -// type variables. - -import "package:expect/expect.dart"; - -class A { - var c = (() => [])(); -} - -class B extends A {} - -main() { - Expect.isTrue(new B().c is List); - Expect.isFalse(new B().c is List); -} diff --git a/tests/language_2/type_variable/field_initializer_test.dart b/tests/language_2/type_variable/field_initializer_test.dart deleted file mode 100644 index 06d03088ae1..00000000000 --- a/tests/language_2/type_variable/field_initializer_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2013, 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 - -// Check that an inlined field initializer has access to the enclosing -// type variables. - -import "package:expect/expect.dart"; - -class A { - var c = []; -} - -class B extends A {} - -main() { - Expect.isTrue(new B().c is List); - Expect.isFalse(new B().c is List); -} diff --git a/tests/language_2/type_variable/function_type_test.dart b/tests/language_2/type_variable/function_type_test.dart deleted file mode 100644 index 789cc1f4f10..00000000000 --- a/tests/language_2/type_variable/function_type_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -typedef T Func(); - -class Foo { - m(x) => x is Func; -} - -class Bar { - f() { - T local() {} - return local; - } -} - -void main() { - dynamic x = new Foo>(); - if (new DateTime.now().millisecondsSinceEpoch == 42) x = new Foo(); - Expect.isFalse(x.m(new Bar().f())); - Expect.isTrue(x.m(new Bar>().f())); -} diff --git a/tests/language_2/type_variable/identifier_expression_test.dart b/tests/language_2/type_variable/identifier_expression_test.dart deleted file mode 100644 index db821c834dc..00000000000 --- a/tests/language_2/type_variable/identifier_expression_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012, 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. -// VMOptions=--enable_type_checks - -// @dart = 2.9 - -class A { - static func() { - return "class A"; - } -} - -class B { - doFunc() { - T.func(); - //^^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD - // [cfe] The method 'func' isn't defined for the class 'Type'. - } -} - -main() { - new B().doFunc(); -} diff --git a/tests/language_2/type_variable/initializer_test.dart b/tests/language_2/type_variable/initializer_test.dart deleted file mode 100644 index 1645114f835..00000000000 --- a/tests/language_2/type_variable/initializer_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -// Regression test for dart2js where the reference to [:this:] in a -// constructor was not propagated to the super initializers. - -class A { - var map; - // Usage of type variables in the initializer makes the SSA builder - // want to access [:this:]. And because the initializers of A are - // inlined in the constructor of B, we have to make sure the - // [:this:] in the A constructor has a corresponding - // SSA instruction. - A() : map = new Map(); -} - -class B extends A {} - -main() { - Expect.isTrue(new B().map is Map); -} diff --git a/tests/language_2/type_variable/nested_test.dart b/tests/language_2/type_variable/nested_test.dart deleted file mode 100644 index 36453e3837d..00000000000 --- a/tests/language_2/type_variable/nested_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for -// http://code.google.com/p/dart/issues/detail?id=9050. - -import 'package:expect/expect.dart'; - -class A {} - -class B { - var _copy; - B() { - // We used to not register the dependency between List and B. - _copy = >[]; - } -} - -main() { - var a = new B(); - Expect.isFalse(a._copy is List); - Expect.isTrue(a._copy is List); - Expect.isFalse(a._copy is List>); //# 01: ok - - a = new B(); - Expect.isFalse(a._copy is List); - Expect.isTrue(a._copy is List); - Expect.isTrue(a._copy is List>); - Expect.isTrue(a._copy is List>); - Expect.isFalse(a._copy is List>); -} diff --git a/tests/language_2/type_variable/promotion_issue39752_test.dart b/tests/language_2/type_variable/promotion_issue39752_test.dart deleted file mode 100644 index 16a9390f26e..00000000000 --- a/tests/language_2/type_variable/promotion_issue39752_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// 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. - -// @dart = 2.9 - -main() {} - -void f(T a) { - if (a is num) { - if (a is int) { - a.isEven; - } - } -} diff --git a/tests/language_2/type_variable/promotion_test.dart b/tests/language_2/type_variable/promotion_test.dart deleted file mode 100644 index 0bf731964d7..00000000000 --- a/tests/language_2/type_variable/promotion_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2017, 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 - -import 'package:expect/expect.dart'; - -class A {} - -class B extends A {} - -class Foo { - String foo(T x) { - if (x is B) { - var list = [x]; - return list.runtimeType.toString(); - } - return ''; - } - - List bar(T x) { - var tlist = []; - if (x is B) { - var list = [x]; - tlist = list; - } - return tlist; - } -} - -main() { - var foo = new Foo(); - var b = new B(); - - // List class has many different platform specific implementations - // so we can't rely on the fact that all of them have the same - // user visible name. Instead we build a name for List from List. - final expected = ([]).runtimeType.toString().replaceAll('<$A>', '<$B>'); - Expect.equals(expected, foo.foo(b)); - Expect.listEquals([b], foo.bar(b)); -} diff --git a/tests/language_2/type_variable/scope2_test.dart b/tests/language_2/type_variable/scope2_test.dart deleted file mode 100644 index dd7cade611f..00000000000 --- a/tests/language_2/type_variable/scope2_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test that malformed type arguments are treated as an error. - -class Foo { - // T is not in scope for a static method. - static Foo m() { - // ^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC - // [cfe] Type variables can't be used in static members. - return new Foo(); - } -} - -main() {} diff --git a/tests/language_2/type_variable/scope3_runtime_test.dart b/tests/language_2/type_variable/scope3_runtime_test.dart deleted file mode 100644 index 49dbcea3e24..00000000000 --- a/tests/language_2/type_variable/scope3_runtime_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -// Test that a type parameter cannot be repeated. - -class Foo< - T - - > {} - -main() { - new Foo< - String - - >(); -} diff --git a/tests/language_2/type_variable/scope3_test.dart b/tests/language_2/type_variable/scope3_test.dart deleted file mode 100644 index 4463a6bf92c..00000000000 --- a/tests/language_2/type_variable/scope3_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012, 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 - -// Test that a type parameter cannot be repeated. - -class Foo< - T - , T - //^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] A type variable can't have the same name as another. - > {} - -main() { - new Foo< - String - , String - >(); -} diff --git a/tests/language_2/type_variable/scope_runtime_test.dart b/tests/language_2/type_variable/scope_runtime_test.dart deleted file mode 100644 index 69ca8c5738f..00000000000 --- a/tests/language_2/type_variable/scope_runtime_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -// Test that type variables referenced from within static members are malformed. - -class Foo implements I { - Foo() {} - - static - - m( - - f) { - - return new Foo(); - } - - // T is in scope for a factory method. - factory Foo.I(Foo f) { - Foo x = f; - } - - // T is not in scope for a static field. - - - static - - get f { - return new Foo(); - } - - static void set f( - - value) {} -} - -abstract class I { - factory I(Foo f) = Foo.I; -} - -main() { - Foo.m(new Foo()); - new I(new Foo()); - - var x = Foo.f; - Foo.f = x; -} diff --git a/tests/language_2/type_variable/scope_test.dart b/tests/language_2/type_variable/scope_test.dart deleted file mode 100644 index cc5775effc6..00000000000 --- a/tests/language_2/type_variable/scope_test.dart +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) 2012, 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 - -// Test that type variables referenced from within static members are malformed. - -class Foo implements I { - Foo() {} - - static - Foo - // ^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC - m( -// ^ -// [cfe] Can only use type variables in instance methods. - Foo - // ^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC - // [cfe] Type variables can't be used in static members. - f) { - Foo x = new Foo(); - // ^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC - // [cfe] Type variables can't be used in static members. - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - return new Foo(); - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - } - - // T is in scope for a factory method. - factory Foo.I(Foo f) { - Foo x = f; - } - - // T is not in scope for a static field. - static Foo f1; - // ^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC - // [cfe] Type variables can't be used in static members. - // ^ - // [cfe] Verification of the generated program failed: - - static - Foo - // ^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC - get f { - // ^ - // [cfe] Can only use type variables in instance methods. - return new Foo(); - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - } - - static void set f( - // ^ - // [cfe] Can only use type variables in instance methods. - Foo - // ^ - // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC - // [cfe] Type variables can't be used in static members. - value) {} -} - -abstract class I { - factory I(Foo f) = Foo.I; -} - -main() { - Foo.m(new Foo()); - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.ARGUMENT_TYPE_NOT_ASSIGNABLE - new I(new Foo()); - Foo.f1 = new Foo(); - // ^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // ^ - // [cfe] A value of type 'Foo' can't be assigned to a variable of type 'Foo'. - var x = Foo.f; - Foo.f = x; -} diff --git a/tests/language_2/type_variable/static_context_test.dart b/tests/language_2/type_variable/static_context_test.dart deleted file mode 100644 index f579e8b33d0..00000000000 --- a/tests/language_2/type_variable/static_context_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012, 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 type variable can't be referenced in a static class - -class A { - static int method() { - // error, can't reference a type variable in a static context - var foo = new T(); - // ^ - // [analyzer] COMPILE_TIME_ERROR.CREATION_WITH_NON_TYPE - // [analyzer] COMPILE_TIME_ERROR.TYPE_PARAMETER_REFERENCED_BY_STATIC - // [cfe] Couldn't find constructor 'T'. - } -} - -main() { - A.method(); -} diff --git a/tests/language_2/type_variable/typedef_test.dart b/tests/language_2/type_variable/typedef_test.dart deleted file mode 100644 index 41cd1cf3e50..00000000000 --- a/tests/language_2/type_variable/typedef_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that rti dependency registration takes type variables within typedefs -// into account. - -import 'package:expect/expect.dart'; - -typedef Foo(T t); - -class A { - m() => new B>(); -} - -class B { - m(o) => o is T; -} - -foo(int i) {} -bar(String s) {} - -void main() { - Expect.isTrue(new A().m().m(foo)); - Expect.isFalse(new A().m().m(bar)); - Expect.isFalse(new A().m().m(foo)); - Expect.isTrue(new A().m().m(bar)); - Expect.isFalse(new A().m().m(foo)); - Expect.isFalse(new A().m().m(bar)); -} diff --git a/tests/language_2/typedef/bad_typedef_runtime_test.dart b/tests/language_2/typedef/bad_typedef_runtime_test.dart deleted file mode 100644 index a1b69df8ef6..00000000000 --- a/tests/language_2/typedef/bad_typedef_runtime_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2016, 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 test for a function type test that cannot be eliminated at compile time. - -import "package:expect/expect.dart"; - -typedef int H( - Function - - x); - -main() { - bool b = true; - Expect.isFalse(b is H); -} diff --git a/tests/language_2/typedef/bad_typedef_test.dart b/tests/language_2/typedef/bad_typedef_test.dart deleted file mode 100644 index 808c3e925ce..00000000000 --- a/tests/language_2/typedef/bad_typedef_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2016, 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 test for a function type test that cannot be eliminated at compile time. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -typedef int H( - Function - Function - x); -// ^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN -// [cfe] Expected ')' before this. - -main() { - bool b = true; - Expect.isFalse(b is H); -} diff --git a/tests/language_2/typedef/check_bounds_generic_test.dart b/tests/language_2/typedef/check_bounds_generic_test.dart deleted file mode 100644 index 7cab6acf693..00000000000 --- a/tests/language_2/typedef/check_bounds_generic_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2018, 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 - -// Check that typedef type parameters are verified to satisfy their bounds. - -typedef F = T Function(T x); - -void g(F f) {} -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'F'. -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - -main() { - g(null); -} diff --git a/tests/language_2/typedef/check_bounds_test.dart b/tests/language_2/typedef/check_bounds_test.dart deleted file mode 100644 index 5fba1eb9a19..00000000000 --- a/tests/language_2/typedef/check_bounds_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2018, 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 - -// Check that typedef type parameters are verified to satisfy their bounds. - -typedef T F(T x); - -void g(F f) {} -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'F'. -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - -main() { - g(null); -} diff --git a/tests/language_2/typedef/check_bounds_unused_test.dart b/tests/language_2/typedef/check_bounds_unused_test.dart deleted file mode 100644 index 53ac761ab6a..00000000000 --- a/tests/language_2/typedef/check_bounds_unused_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2018, 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 - -// Check that typedef type parameters are verified to satisfy their bounds, even -// if the type parameter in question isn't used by the typedef. - -typedef void F(); - -void g(F f) {} -// ^ -// [cfe] Type argument 'String' doesn't conform to the bound 'num' of the type variable 'T' on 'F'. -// ^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS - -main() { - g(null); -} diff --git a/tests/language_2/typedef/class_in_other_file_helper.dart b/tests/language_2/typedef/class_in_other_file_helper.dart deleted file mode 100644 index ec04b88eef8..00000000000 --- a/tests/language_2/typedef/class_in_other_file_helper.dart +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) 2017, 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 - -class Bar {} diff --git a/tests/language_2/typedef/class_in_other_file_test.dart b/tests/language_2/typedef/class_in_other_file_test.dart deleted file mode 100644 index 6cc14464799..00000000000 --- a/tests/language_2/typedef/class_in_other_file_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2017, 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 - -// This has crashed DDC with Kernel because of a -// "Concurrent modification during iteration" exception. - -import 'class_in_other_file_helper.dart'; - -typedef bool Foo1(bool baz); -typedef bool Foo2(Bar baz); - -main() {} diff --git a/tests/language_2/typedef/cyclic_test.dart b/tests/language_2/typedef/cyclic_test.dart deleted file mode 100644 index ecfef2a9d23..00000000000 --- a/tests/language_2/typedef/cyclic_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) 2013, 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 - -// Check that cyclic reference of a typedef is a compile-time error. - -// To test various cyclic references the definition of the [:typedef A():] is -// split over several lines: -typedef - -// Cyclic through return type. -A //# 01: compile-time error - - A // The name of the typedef - -// Cyclic through type variable bound. - //# 10: compile-time error - -// Cyclic through generic type variable bound. -> //# 11: compile-time error - - (// The left parenthesis of the typedef arguments. - -// Cyclic through parameter type. -A a //# 02: compile-time error - -// Cyclic through optional parameter type. -[A a] //# 03: compile-time error - -// Cyclic through named parameter type. -{A a} //# 04: compile-time error - -// Cyclic through generic parameter type. -List a //# 05: compile-time error - -// Cyclic through return type of function typed parameter. -A f() //# 06: compile-time error - -// Cyclic through parameter type of function typed parameter. -f(A a) //# 07: compile-time error - -// Cyclic through another typedef. -B b //# 08: compile-time error - -// Cyclic through another more typedefs. -C c //# 09: compile-time error - -// Reference through a class is not a cyclic self-reference. -Class c //# 12: ok - -// Reference through a class type bound is not a cyclic self-reference. -Class c //# 13: compile-time error - - ); // The right parenthesis of the typedef arguments. - -typedef B(A a); -typedef C(B b); - -class Class - //# 13: continued -{ - A a; //# 12: continued -} - -void testA(A a) {} - -void main() { - testA(null); -} diff --git a/tests/language_2/typedef/is_test.dart b/tests/language_2/typedef/is_test.dart deleted file mode 100644 index 788b9909d1e..00000000000 --- a/tests/language_2/typedef/is_test.dart +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test is-test of typedefs with optional and named parameters. - -typedef int Func1(int a); -typedef int Func2(int a, [int b]); -typedef int Func3(int a, [int b, int c]); -typedef int Func4([int a, int b, int c]); -typedef int Func5(int a, {int b}); -typedef int Func6(int a, {int b, int c}); -typedef int Func7({int a, int b, int c}); - -void main() { - int func1(int i) {} - Expect.isTrue(func1 is Func1); - Expect.isFalse(func1 is Func2); - Expect.isFalse(func1 is Func3); - Expect.isFalse(func1 is Func4); - Expect.isFalse(func1 is Func5); - Expect.isFalse(func1 is Func6); - Expect.isFalse(func1 is Func7); - - int func2(int i, int j) {} - Expect.isFalse(func2 is Func1); - Expect.isFalse(func2 is Func2); - Expect.isFalse(func2 is Func3); - Expect.isFalse(func2 is Func4); - Expect.isFalse(func2 is Func5); - Expect.isFalse(func2 is Func6); - Expect.isFalse(func2 is Func7); - - int func3(int i, int j, int k) {} - Expect.isFalse(func3 is Func1); - Expect.isFalse(func3 is Func2); - Expect.isFalse(func3 is Func3); - Expect.isFalse(func3 is Func4); - Expect.isFalse(func3 is Func5); - Expect.isFalse(func3 is Func6); - Expect.isFalse(func3 is Func7); - - int func4(int i, [int j]) {} - Expect.isTrue(func4 is Func1); - Expect.isTrue(func4 is Func2); - Expect.isFalse(func4 is Func3); - Expect.isFalse(func4 is Func4); - Expect.isFalse(func4 is Func5); - Expect.isFalse(func4 is Func6); - Expect.isFalse(func4 is Func7); - - int func5(int i, [int j, int k]) {} - Expect.isTrue(func5 is Func1); - Expect.isTrue(func5 is Func2); - Expect.isTrue(func5 is Func3); - Expect.isFalse(func5 is Func4); - Expect.isFalse(func5 is Func5); - Expect.isFalse(func5 is Func6); - Expect.isFalse(func5 is Func7); - - int func6([int i, int j, int k]) {} - Expect.isTrue(func6 is Func1); - Expect.isTrue(func6 is Func2); - Expect.isTrue(func6 is Func3); - Expect.isTrue(func6 is Func4); - Expect.isFalse(func6 is Func5); - Expect.isFalse(func6 is Func6); - Expect.isFalse(func6 is Func7); - - int func7(int i, {int j}) {} - Expect.isTrue(func7 is Func1); - Expect.isFalse(func7 is Func2); - Expect.isFalse(func7 is Func3); - Expect.isFalse(func7 is Func4); - Expect.isFalse(func7 is Func5); - Expect.isFalse(func7 is Func6); - Expect.isFalse(func7 is Func7); - - int func8(int i, {int b}) {} - Expect.isTrue(func8 is Func1); - Expect.isFalse(func8 is Func2); - Expect.isFalse(func8 is Func3); - Expect.isFalse(func8 is Func4); - Expect.isTrue(func8 is Func5); - Expect.isFalse(func8 is Func6); - Expect.isFalse(func8 is Func7); - - int func9(int i, {int b, int c}) {} - Expect.isTrue(func9 is Func1); - Expect.isFalse(func9 is Func2); - Expect.isFalse(func9 is Func3); - Expect.isFalse(func9 is Func4); - Expect.isTrue(func9 is Func5); - Expect.isTrue(func9 is Func6); - Expect.isFalse(func9 is Func7); - - int func10(int i, {int c, int b}) {} - Expect.isTrue(func10 is Func1); - Expect.isFalse(func10 is Func2); - Expect.isFalse(func10 is Func3); - Expect.isFalse(func10 is Func4); - Expect.isTrue(func10 is Func5); - Expect.isTrue(func10 is Func6); - Expect.isFalse(func10 is Func7); - - int func11({int a, int b, int c}) {} - Expect.isFalse(func11 is Func1); - Expect.isFalse(func11 is Func2); - Expect.isFalse(func11 is Func3); - Expect.isFalse(func11 is Func4); - Expect.isFalse(func11 is Func5); - Expect.isFalse(func11 is Func6); - Expect.isTrue(func11 is Func7); - - int func12({int c, int a, int b}) {} - Expect.isFalse(func12 is Func1); - Expect.isFalse(func12 is Func2); - Expect.isFalse(func12 is Func3); - Expect.isFalse(func12 is Func4); - Expect.isFalse(func12 is Func5); - Expect.isFalse(func12 is Func6); - Expect.isTrue(func12 is Func7); -} diff --git a/tests/language_2/unsorted/ackermann_test.dart b/tests/language_2/unsorted/ackermann_test.dart deleted file mode 100644 index 5b2952b2aa3..00000000000 --- a/tests/language_2/unsorted/ackermann_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// 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 version of two-argument Ackermann-Peter function. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class AckermannTest { - static int ack(int m, int n) { - return m == 0 - ? n + 1 - : ((n == 0) ? ack(m - 1, 1) : ack(m - 1, ack(m, n - 1))); - } - - static testMain() { - Expect.equals(253, ack(3, 5)); - } -} - -main() { - AckermannTest.testMain(); -} diff --git a/tests/language_2/unsorted/additional_interface_adds_optional_args_concrete_test.dart b/tests/language_2/unsorted/additional_interface_adds_optional_args_concrete_test.dart deleted file mode 100644 index 83670e28924..00000000000 --- a/tests/language_2/unsorted/additional_interface_adds_optional_args_concrete_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2017, 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 - -class A { - void foo() {} -} - -abstract class I { - void foo([x]); -} - -class B extends A implements I { -// ^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_IMPLEMENTATION_OVERRIDE -// [cfe] The implementation of 'foo' in the non-abstract class 'B' does not conform to its interface. - - // This class declaration violates soundness, since it allows `new - // B().foo(42)`, which would lead to invalid arguments being passed to A.foo. -} - -void f(B b) { - b.foo(); -} - -main() { - f(new B()); -} diff --git a/tests/language_2/unsorted/additional_interface_adds_optional_args_test.dart b/tests/language_2/unsorted/additional_interface_adds_optional_args_test.dart deleted file mode 100644 index 0c74fd29ac3..00000000000 --- a/tests/language_2/unsorted/additional_interface_adds_optional_args_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2017, 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 - -// This test exercises a corner case of override checking that is safe from a -// soundness perspective, but which we haven't decided whether or not to allow -// from a usability perspective. - -class A { - void foo() {} -} - -abstract class I { - void foo([x]); -} - -abstract class B extends A implements I { - // If this class were concrete, there would be a problem, since `new - // B().foo(42)` would be statically allowed, but would lead to invalid - // arguments being passed to A.foo. But since the class is abstract, there is - // no problem. -} - -class C extends B { - void foo([x]) { - super.foo(); - } -} - -void f(B b) { - b.foo(42); -} - -main() { - f(new C()); -} diff --git a/tests/language_2/unsorted/allocate_large_object_test.dart b/tests/language_2/unsorted/allocate_large_object_test.dart deleted file mode 100644 index 997b4797dd7..00000000000 --- a/tests/language_2/unsorted/allocate_large_object_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class A { - int a; - double d1; - double d2; - double d3; - double d4; - double d5; - double d6; - double d7; - double d8; - double d9; - double d10; - double d11; - double d12; - double d13; - double d14; - static var s; - - static foo() { - return s; - } - - A(this.a) {} - - value() { - return a + foo(); - } -} - -class AllocateLargeObject { - static testMain() { - var a = new A(1); - A.s = 4; - Expect.equals(5, a.value()); - } -} - -main() { - AllocateLargeObject.testMain(); -} diff --git a/tests/language_2/unsorted/allocate_test.dart b/tests/language_2/unsorted/allocate_test.dart deleted file mode 100644 index 1c060df294a..00000000000 --- a/tests/language_2/unsorted/allocate_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class MyAllocate { - const MyAllocate([int value = 0]) : value_ = value; - int getValue() { - return value_; - } - - final int value_; -} - -class AllocateTest { - static testMain() { - Expect.equals(900, (new MyAllocate(900)).getValue()); - } -} - -main() { - AllocateTest.testMain(); -} diff --git a/tests/language_2/unsorted/arg_param_trailing_comma_test.dart b/tests/language_2/unsorted/arg_param_trailing_comma_test.dart deleted file mode 100644 index 335cfac50bd..00000000000 --- a/tests/language_2/unsorted/arg_param_trailing_comma_test.dart +++ /dev/null @@ -1,564 +0,0 @@ -// Copyright (c) 2016, 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 test program for testing params. - -// @dart = 2.9 - -// Convenience values. -var c = new C(); -var x = 42; -var y = 42; -var z = 42; - -// Trailing comma in parameter lists. - -// Typedefs. -typedef fx(x, ); // //# none: ok -typedef fy([y,]); // //# none: continued -typedef fxy(x, [y, ]); // //# none: continued -typedef fz({z,}); // //# none: continued -typedef fxz(x, {z, }); // //# none: continued - -// As arguments type. -argfx(void f(x, )) {} // //# none: continued -argfy(void f([y, ])) {} // //# none: continued -argfxy(void f(x, [y, ])) {} // //# none: continued -argfz(void f({z, })) {} // //# none: continued -argfxz(void f(x, {z, })) {} // //# none: continued - -// Top level functions -void topx(x,) {} // //# none: continued -void topy([y, ]) {} // //# none: continued -void topxy(x, [y, ]) {} // //# none: continued -void topz({z, }) {} // //# none: continued -void topxz(x, {z, }) {} // //# none: continued - -void set topsetx(x, ) {} // //# none: continued - -// After specific parameter formats. -void afterDefaultValueY([int y = 42, ]) {} // //# none: continued -void afterDefaultValueZ({int z : 42, }) {} // //# none: continued -void afterFunsigX(void f(),) {} // //# none: continued -void afterFunsigY([void f(),]) {} // //# none: continued -void afterFunsigZ({void f(),}) {} // //# none: continued -void afterFunsigDefaultValueY([void f() = topy,]) {} // //# none: continued -void afterFunsigDefaultValueZ({void f() : topz,}) {} // //# none: continued - -class C { - C(); - - // Constructors. - C.x(x, ); // //# none: continued - C.y([y, ]); // //# none: continued - C.xy(x, [y, ]); // //# none: continued - C.z({z, }); // //# none: continued - C.xz(x, {z, }); // //# none: continued - - // Static members - static void staticx(x,) {} // //# none: continued - static void staticy([y, ]) {} // //# none: continued - static void staticxy(x, [y, ]) {} // //# none: continued - static void staticz({z, }) {} // //# none: continued - static void staticxz(x, {z, }) {} // //# none: continued - - static void set staticsetx(x, ) {} // //# none: continued - - // Instance members - void instancex(x,) {} // //# none: continued - void instancey([y, ]) {} // //# none: continued - void instancexy(x, [y, ]) {} // //# none: continued - void instancez({z, }) {} // //# none: continued - void instancexz(x, {z, }) {} // //# none: continued - - void set instancesetx(x, ) {} // //# none: continued - - operator +(x, ) => this; // //# none: continued - operator []=(x, y, ) {} // //# none: continued -} - -main() { - testCalls(); // //# none: continued - // Make sure the cases are checked. - testBadCalls(); -} - -void testCalls() { - // Check that all functions can be called normally - topx(x); // //# none: continued - topy(y); // //# none: continued - topxy(x, y); // //# none: continued - topz(); // //# none: continued - topz(z: z); // //# none: continued - topxz(x); // //# none: continued - topxz(x, z: z); // //# none: continued - topsetx = x; // //# none: continued - afterDefaultValueY(); // //# none: continued - afterDefaultValueY(y); // //# none: continued - afterDefaultValueZ(); // //# none: continued - afterDefaultValueZ(z: z); // //# none: continued - new C.x(x); // //# none: continued - new C.xy(x); // //# none: continued - new C.xy(x, y); // //# none: continued - new C.y(y); // //# none: continued - new C.xz(x); // //# none: continued - new C.xz(x, z: z); // //# none: continued - new C.z(z: z); // //# none: continued - C.staticx(x); // //# none: continued - C.staticy(y); // //# none: continued - C.staticxy(x); // //# none: continued - C.staticxy(x, y); // //# none: continued - C.staticz(); // //# none: continued - C.staticz(z: z); // //# none: continued - C.staticxz(x); // //# none: continued - C.staticxz(x, z: z); // //# none: continued - C.staticsetx = x; // //# none: continued - c.instancex(x); // //# none: continued - c.instancey(); // //# none: continued - c.instancey(y); // //# none: continued - c.instancexy(x); // //# none: continued - c.instancexy(x, y); // //# none: continued - c.instancez(); // //# none: continued - c.instancez(z: z); // //# none: continued - c.instancexz(x); // //# none: continued - c.instancexz(x, z: z); // //# none: continued - c.instancesetx = x; // //# none: continued - c + x; // //# none: continued - c[x] = y; // //# none: continued - - // Call with extra comma (not possible for setters and operators). - topx(x, ); // //# none: continued - topy(y, ); // //# none: continued - topxy(x, y, ); // //# none: continued - topxy(x, ); // //# none: continued - topz(z: z, ); // //# none: continued - topxz(x, ); // //# none: continued - topxz(x, z: z, ); // //# none: continued - new C.x(x, ); // //# none: continued - new C.xy(x, y, ); // //# none: continued - new C.xy(x, ); // //# none: continued - new C.y(y, ); // //# none: continued - new C.xz(x, ); // //# none: continued - new C.xz(x, z: z, ); // //# none: continued - new C.z(z: z, ); // //# none: continued - C.staticx(x, ); // //# none: continued - C.staticy(y, ); // //# none: continued - C.staticxy(x, y, ); // //# none: continued - C.staticxy(x, ); // //# none: continued - C.staticz(z: z, ); // //# none: continued - C.staticxz(x, ); // //# none: continued - C.staticxz(x, z: z, ); // //# none: continued - c.instancex(x, ); // //# none: continued - c.instancey(y, ); // //# none: continued - c.instancexy(x, y, ); // //# none: continued - c.instancexy(x, ); // //# none: continued - c.instancez(z: z, ); // //# none: continued - c.instancexz(x, ); // //# none: continued - c.instancexz(x, z: z, ); // //# none: continued - - // Typedefs work as expected. - if (topx is! fx) throw "Bad type: $fx"; // //# none: continued - if (topy is! fy) throw "Bad type: $fy"; // //# none: continued - if (topxy is! fxy) throw "Bad type: $fxy"; // //# none: continued - if (topz is! fz) throw "Bad type: $fz"; // //# none: continued - if (topxz is! fxz) throw "Bad type: $fxz"; // //# none: continued - - // Parameter types work (checked mode only test). - argfx(topx); // //# none: continued - argfy(topy); // //# none: continued - argfxy(topxy); // //# none: continued - argfz(topz); // //# none: continued - argfxz(topxz); // //# none: continued -} - -// Invalid syntax. This was invalid syntax before the addition of trailing -// commas too, and should stay that way. -void topBadEmpty(,) {} // //# 1: syntax error -void topBadStart(, a) {} // //# 2: syntax error -void topBadEnd(a,,) {} // //# 3: syntax error -void topBadMiddle(a,, b) {} // //# 4: syntax error -void topBadPosEmpty([]) {} // //# 5: syntax error -void topBadPosEmpty(,[]) {} // //# 6: syntax error -void topBadPosEmpty([,]) {} // //# 7: syntax error -void topBadPosEmpty([],) {} // //# 8: syntax error -void topBadPosStart(,[a]) {} // //# 9: syntax error -void topBadPosStart([, a]) {} // //# 10: syntax error -void topBadPosEnd([a,,]) {} // //# 11: syntax error -void topBadPosStart([a],) {} // //# 12: syntax error -void topBadPosMiddle([a,, b]) {} // //# 13: syntax error -void topBadNamEmpty({}) {} // //# 14: syntax error -void topBadNamEmpty(,{}) {} // //# 15: syntax error -void topBadNamEmpty({,}) {} // //# 16: syntax error -void topBadNamEmpty({},) {} // //# 17: syntax error -void topBadNamStart(,{a}) {} // //# 18: syntax error -void topBadNamStart({, a}) {} // //# 19: syntax error -void topBadNamEnd({a,,}) {} // //# 20: syntax error -void topBadNamStart({a},) {} // //# 21: syntax error -void topBadNamMiddle({a,, b}) {} // //# 22: syntax error -void set topSetBadEmpty(,) {} // //# 23: syntax error -void set topSetBadStart(, a) {} // //# 24: syntax error -void set topSetBadEnd(a,,) {} // //# 25: syntax error -void set topSetBadMiddle(a,, b) {} // //# 26: syntax error -class Bad { - Bad() {} - Bad.empty(,) {} // //# 27: syntax error - Bad.start(, a) {} // //# 28: syntax error - Bad.end(a,,) {} // //# 29: syntax error - Bad.middle(a,, b) {} // //# 30: syntax error - Bad.posEmpty([]) {} // //# 31: syntax error - Bad.posEmpty(,[]) {} // //# 32: syntax error - Bad.posEmpty([,]) {} // //# 33: syntax error - Bad.posEmpty([],) {} // //# 34: syntax error - Bad.posStart(,[a]) {} // //# 35: syntax error - Bad.posStart([, a]) {} // //# 36: syntax error - Bad.posEnd([a,,]) {} // //# 37: syntax error - Bad.posStart([a],) {} // //# 38: syntax error - Bad.PosMiddle([a,, b]) {} // //# 39: syntax error - Bad.namEmpty({}) {} // //# 40: syntax error - Bad.namEmpty(,{}) {} // //# 41: syntax error - Bad.namEmpty({,}) {} // //# 42: syntax error - Bad.namEmpty({},) {} // //# 43: syntax error - Bad.namStart(,{a}) {} // //# 44: syntax error - Bad.namStart({, a}) {} // //# 45: syntax error - Bad.namEnd({a,,}) {} // //# 46: syntax error - Bad.namStart({a},) {} // //# 47: syntax error - Bad.namMiddle({a,, b}) {} // //# 48: syntax error - static void staticBadEmpty(,) {} // //# 49: syntax error - static void staticBadStart(, a) {} // //# 50: syntax error - static void staticBadEnd(a,,) {} // //# 51: syntax error - static void staticBadMiddle(a,, b) {} // //# 52: syntax error - static void staticBadPosEmpty([]) {} // //# 53: syntax error - static void staticBadPosEmpty(,[]) {} // //# 54: syntax error - static void staticBadPosEmpty([,]) {} // //# 55: syntax error - static void staticBadPosEmpty([],) {} // //# 56: syntax error - static void staticBadPosStart(,[a]) {} // //# 57: syntax error - static void staticBadPosStart([, a]) {} // //# 58: syntax error - static void staticBadPosEnd([a,,]) {} // //# 59: syntax error - static void staticBadPosStart([a],) {} // //# 60: syntax error - static void staticBadPosMiddle([a,, b]) {} // //# 61: syntax error - static void staticBadNamEmpty({}) {} // //# 62: syntax error - static void staticBadNamEmpty(,{}) {} // //# 63: syntax error - static void staticBadNamEmpty({,}) {} // //# 64: syntax error - static void staticBadNamEmpty({},) {} // //# 65: syntax error - static void staticBadNamStart(,{a}) {} // //# 66: syntax error - static void staticBadNamStart({, a}) {} // //# 67: syntax error - static void staticBadNamEnd({a,,}) {} // //# 68: syntax error - static void staticBadNamStart({a},) {} // //# 69: syntax error - static void staticBadNamMiddle({a,, b}) {} // //# 70: syntax error - static void set staticSetBadEmpty(,) {} // //# 71: syntax error - static void set staticSetBadStart(, a) {} // //# 72: syntax error - static void set staticSetBadEnd(a,,) {} // //# 73: syntax error - static void set staticSetBadMiddle(a,, b) {} // //# 74: syntax error - void instanceBadEmpty(,) {} // //# 75: syntax error - void instanceBadStart(, a) {} // //# 76: syntax error - void instanceBadEnd(a,,) {} // //# 77: syntax error - void instanceBadMiddle(a,, b) {} // //# 78: syntax error - void instanceBadPosEmpty([]) {} // //# 79: syntax error - void instanceBadPosEmpty(,[]) {} // //# 80: syntax error - void instanceBadPosEmpty([,]) {} // //# 81: syntax error - void instanceBadPosEmpty([],) {} // //# 82: syntax error - void instanceBadPosStart(,[a]) {} // //# 83: syntax error - void instanceBadPosStart([, a]) {} // //# 84: syntax error - void instanceBadPosEnd([a,,]) {} // //# 85: syntax error - void instanceBadPosStart([a],) {} // //# 86: syntax error - void instanceBadPosMiddle([a,, b]) {} // //# 87: syntax error - void instanceBadNamEmpty({}) {} // //# 88: syntax error - void instanceBadNamEmpty(,{}) {} // //# 89: syntax error - void instanceBadNamEmpty({,}) {} // //# 90: syntax error - void instanceBadNamEmpty({},) {} // //# 91: syntax error - void instanceBadNamStart(,{a}) {} // //# 92: syntax error - void instanceBadNamStart({, a}) {} // //# 93: syntax error - void instanceBadNamEnd({a,,}) {} // //# 94: syntax error - void instanceBadNamStart({a},) {} // //# 95: syntax error - void instanceBadNamMiddle({a,, b}) {} // //# 96: syntax error - void set instanceSetBadEmpty(,) {} // //# 97: syntax error - void set instanceSetBadStart(, a) {} // //# 98: syntax error - void set instanceSetBadEnd(a,,) {} // //# 99: syntax error - void set instanceSetBadMiddle(a,, b) {} // //# 100: syntax error - void operator *(,); // //# 101: syntax error - void operator *(, a); // //# 102: syntax error - void operator *(a,,); // //# 103: syntax error - void operator []=(, a); // //# 104: syntax error - void operator []=(a,,); // //# 105: syntax error - void operator []=(a,, b); // //# 106: syntax error - void operator []=(a,); // //# 107: compile-time error - - method() { - // Local methods. - void localBadEmpty(,) {} // //# 108: syntax error - void localBadStart(, a) {} // //# 109: syntax error - void localBadEnd(a,,) {} // //# 110: syntax error - void localBadMiddle(a,, b) {} // //# 111: syntax error - void localBadPosEmpty([]) {} // //# 112: syntax error - void localBadPosEmpty(,[]) {} // //# 113: syntax error - void localBadPosEmpty([,]) {} // //# 114: syntax error - void localBadPosEmpty([],) {} // //# 115: syntax error - void localBadPosStart(,[a]) {} // //# 116: syntax error - void localBadPosStart([, a]) {} // //# 117: syntax error - void localBadPosEnd([a,,]) {} // //# 118: syntax error - void localBadPosStart([a],) {} // //# 119: syntax error - void localBadPosMiddle([a,, b]) {} // //# 120: syntax error - void localBadNamEmpty({}) {} // //# 121: syntax error - void localBadNamEmpty(,{}) {} // //# 122: syntax error - void localBadNamEmpty({,}) {} // //# 123: syntax error - void localBadNamEmpty({},) {} // //# 124: syntax error - void localBadNamStart(,{a}) {} // //# 125: syntax error - void localBadNamStart({, a}) {} // //# 126: syntax error - void localBadNamEnd({a,,}) {} // //# 127: syntax error - void localBadNamStart({a},) {} // //# 128: syntax error - void localBadNamMiddle({a,, b}) {} // //# 129: syntax error - - // invalid calls. - - topx(,); // //# 130: syntax error - topy(,); // //# 131: syntax error - topz(,); // //# 132: syntax error - topx(, x); // //# 133: syntax error - topz(, z:z); // //# 134: syntax error - topxy(x,, y); // //# 135: syntax error - topxz(x,, z:z); // //# 136: syntax error - topx(x,,); // //# 137: syntax error - topz(z:z,,); // //# 138: syntax error - - new C.x(,); // //# 139: syntax error - new C.y(,); // //# 140: syntax error - new C.z(,); // //# 141: syntax error - new C.x(, x); // //# 142: syntax error - new C.z(, z:z); // //# 143: syntax error - new C.xy(x,, y); // //# 144: syntax error - new C.xz(x,, z:z); // //# 145: syntax error - new C.x(x,,); // //# 146: syntax error - new C.z(z:z,,); // //# 147: syntax error - - C.staticx(,); // //# 148: syntax error - C.staticy(,); // //# 149: syntax error - C.staticz(,); // //# 150: syntax error - C.staticx(, x); // //# 151: syntax error - C.staticz(, z:z); // //# 152: syntax error - C.staticxy(x,, y); // //# 153: syntax error - C.staticxz(x,, z:z); // //# 154: syntax error - C.staticx(x,,); // //# 155: syntax error - C.staticz(z:z,,); // //# 156: syntax error - - c.instancex(,); // //# 157: syntax error - c.instancey(,); // //# 158: syntax error - c.instancez(,); // //# 159: syntax error - c.instancex(, x); // //# 160: syntax error - c.instancez(, z:z); // //# 161: syntax error - c.instancexy(x,, y); // //# 162: syntax error - c.instancexz(x,, z:z); // //# 163: syntax error - c.instancex(x,,); // //# 164: syntax error - c.instancez(z:z,,); // //# 165: syntax error - - c[x,] = y; // //# 166: syntax error - } - - // As parameters: - void f(void topBadEmpty(,)) {} // //# 167: syntax error - void f(void topBadStart(, a)) {} // //# 168: syntax error - void f(void topBadEnd(a,,)) {} // //# 169: syntax error - void f(void topBadMiddle(a,, b)) {} // //# 170: syntax error - void f(void topBadPosEmpty([])) {} // //# 171: syntax error - void f(void topBadPosEmpty(,[])) {} // //# 172: syntax error - void f(void topBadPosEmpty([,])) {} // //# 173: syntax error - void f(void topBadPosEmpty([],)) {} // //# 174: syntax error - void f(void topBadPosStart(,[a])) {} // //# 175: syntax error - void f(void topBadPosStart([, a])) {} // //# 176: syntax error - void f(void topBadPosEnd([a,,])) {} // //# 177: syntax error - void f(void topBadPosStart([a],)) {} // //# 178: syntax error - void f(void topBadPosMiddle([a,, b])) {} // //# 179: syntax error - void f(void topBadNamEmpty({})) {} // //# 180: syntax error - void f(void topBadNamEmpty(,{})) {} // //# 181: syntax error - void f(void topBadNamEmpty({,})) {} // //# 182: syntax error - void f(void topBadNamEmpty({},)) {} // //# 183: syntax error - void f(void topBadNamStart(,{a})) {} // //# 184: syntax error - void f(void topBadNamStart({, a})) {} // //# 185: syntax error - void f(void topBadNamEnd({a,,})) {} // //# 186: syntax error - void f(void topBadNamStart({a},)) {} // //# 187: syntax error - void f(void topBadNamMiddle({a,, b})) {} // //# 188: syntax error -} - -// As typedefs -typedef void BadEmpty(,); // //# 189: syntax error -typedef void BadStart(, a); // //# 190: syntax error -typedef void BadEnd(a,,); // //# 191: syntax error -typedef void BadMiddle(a,, b); // //# 192: syntax error -typedef void BadPosEmpty([]); // //# 193: syntax error -typedef void BadPosEmpty(,[]); // //# 194: syntax error -typedef void BadPosEmpty([,]); // //# 195: syntax error -typedef void BadPosEmpty([],); // //# 196: syntax error -typedef void BadPosStart(,[a]); // //# 197: syntax error -typedef void BadPosStart([, a]); // //# 198: syntax error -typedef void BadPosEnd([a,,]); // //# 199: syntax error -typedef void BadPosStart([a],); // //# 200: syntax error -typedef void BadPosMiddle([a,, b]); // //# 201: syntax error -typedef void BadNamEmpty({}); // //# 202: syntax error -typedef void BadNamEmpty(,{}); // //# 203: syntax error -typedef void BadNamEmpty({,}); // //# 204: syntax error -typedef void BadNamEmpty({},); // //# 205: syntax error -typedef void BadNamStart(,{a}); // //# 206: syntax error -typedef void BadNamStart({, a}); // //# 207: syntax error -typedef void BadNamEnd({a,,}); // //# 208: syntax error -typedef void BadNamStart({a},); // //# 209: syntax error -typedef void BadNamMiddle({a,, b}); // //# 210: syntax error - -void testBadCalls() { - topBadEmpty(); // //# 1: continued - topBadStart(); // //# 2: continued - topBadEnd(); // //# 3: continued - topBadMiddle(); // //# 4: continued - topBadPosEmpty(); // //# 5: continued - topBadPosEmpty(); // //# 6: continued - topBadPosEmpty(); // //# 7: continued - topBadPosEmpty(); // //# 8: continued - topBadPosStart(); // //# 9: continued - topBadPosStart(); // //# 10: continued - topBadPosEnd(); // //# 11: continued - topBadPosStart(); // //# 12: continued - topBadPosMiddle(); // //# 13: continued - topBadNamEmpty(); // //# 14: continued - topBadNamEmpty(); // //# 15: continued - topBadNamEmpty(); // //# 16: continued - topBadNamEmpty(); // //# 17: continued - topBadNamStart(); // //# 18: continued - topBadNamStart(); // //# 19: continued - topBadNamEnd(); // //# 20: continued - topBadNamStart(); // //# 21: continued - topBadNamMiddle(); // //# 22: continued - topSetBadEmpty = 1; // //# 23: continued - topSetBadStart = 1; // //# 24: continued - topSetBadEnd = 1; // //# 25: continued - topSetBadMiddle = 1; // //# 26: continued - new Bad.empty(); // //# 27: continued - new Bad.start(); // //# 28: continued - new Bad.end(); // //# 29: continued - new Bad.middle(); // //# 30: continued - new Bad.posEmpty(); // //# 31: continued - new Bad.posEmpty(); // //# 32: continued - new Bad.posEmpty(); // //# 33: continued - new Bad.posEmpty(); // //# 34: continued - new Bad.posStart(); // //# 35: continued - new Bad.posStart(); // //# 36: continued - new Bad.posEnd(); // //# 37: continued - new Bad.posStart(); // //# 38: continued - new Bad.PosMiddle(); // //# 39: continued - new Bad.namEmpty(); // //# 40: continued - new Bad.namEmpty(); // //# 41: continued - new Bad.namEmpty(); // //# 42: continued - new Bad.namEmpty(); // //# 43: continued - new Bad.namStart(); // //# 44: continued - new Bad.namStart(); // //# 45: continued - new Bad.namEnd(); // //# 46: continued - new Bad.namStart(); // //# 47: continued - new Bad.namMiddle(); // //# 48: continued - Bad.staticBadEmpty(); // //# 49: continued - Bad.staticBadStart(); // //# 50: continued - Bad.staticBadEnd(); // //# 51: continued - Bad.staticBadMiddle(); // //# 52: continued - Bad.staticBadPosEmpty(); // //# 53: continued - Bad.staticBadPosEmpty(); // //# 54: continued - Bad.staticBadPosEmpty(); // //# 55: continued - Bad.staticBadPosEmpty(); // //# 56: continued - Bad.staticBadPosStart(); // //# 57: continued - Bad.staticBadPosStart(); // //# 58: continued - Bad.staticBadPosEnd(); // //# 59: continued - Bad.staticBadPosStart(); // //# 60: continued - Bad.staticBadPosMiddle(); // //# 61: continued - Bad.staticBadNamEmpty(); // //# 62: continued - Bad.staticBadNamEmpty(); // //# 63: continued - Bad.staticBadNamEmpty(); // //# 64: continued - Bad.staticBadNamEmpty(); // //# 65: continued - Bad.staticBadNamStart(); // //# 66: continued - Bad.staticBadNamStart(); // //# 67: continued - Bad.staticBadNamEnd(); // //# 68: continued - Bad.staticBadNamStart(); // //# 69: continued - Bad.staticBadNamMiddle(); // //# 70: continued - Bad.staticSetBadEmpty = 1; // //# 71: continued - Bad.staticSetBadStart = 1; // //# 72: continued - Bad.staticSetBadEnd = 1; // //# 73: continued - Bad.staticSetBadMiddle = 1; // //# 74: continued - - var bad = new Bad(); - bad.instanceBadEmpty(); // //# 75: continued - bad.instanceBadStart(); // //# 76: continued - bad.instanceBadEnd(); // //# 77: continued - bad.instanceBadMiddle(); // //# 78: continued - bad.instanceBadPosEmpty(); // //# 79: continued - bad.instanceBadPosEmpty(); // //# 80: continued - bad.instanceBadPosEmpty(); // //# 81: continued - bad.instanceBadPosEmpty(); // //# 82: continued - bad.instanceBadPosStart(); // //# 83: continued - bad.instanceBadPosStart(); // //# 84: continued - bad.instanceBadPosEnd(); // //# 85: continued - bad.instanceBadPosStart(); // //# 86: continued - bad.instanceBadPosMiddle(); // //# 87: continued - bad.instanceBadNamEmpty(); // //# 88: continued - bad.instanceBadNamEmpty(); // //# 89: continued - bad.instanceBadNamEmpty(); // //# 90: continued - bad.instanceBadNamEmpty(); // //# 91: continued - bad.instanceBadNamStart(); // //# 92: continued - bad.instanceBadNamStart(); // //# 93: continued - bad.instanceBadNamEnd(); // //# 94: continued - bad.instanceBadNamStart(); // //# 95: continued - bad.instanceBadNamMiddle(); // //# 96: continued - bad.instanceSetBadEmpty = 1; // //# 97: continued - bad.instanceSetBadStart = 1; // //# 98: continued - bad.instanceSetBadEnd = 1; // //# 99: continued - bad.instanceSetBadMiddle = 1; // //# 100: continued - bad * bad; // //# 101: continued - bad * bad; // //# 102: continued - bad * bad; // //# 103: continued - bad[1] = 1; // //# 104: continued - bad[1] = 1; // //# 105: continued - bad[1] = 1; // //# 106: continued - bad[1] = 1; // //# 107: continued - - // This covers tests 108-166 - bad.method(); - - bad.f(() {}); // //# 167: continued - bad.f(() {}); // //# 168: continued - bad.f(() {}); // //# 169: continued - bad.f(() {}); // //# 170: continued - bad.f(() {}); // //# 171: continued - bad.f(() {}); // //# 172: continued - bad.f(() {}); // //# 173: continued - bad.f(() {}); // //# 174: continued - bad.f(() {}); // //# 175: continued - bad.f(() {}); // //# 176: continued - bad.f(() {}); // //# 177: continued - bad.f(() {}); // //# 178: continued - bad.f(() {}); // //# 179: continued - bad.f(() {}); // //# 180: continued - bad.f(() {}); // //# 181: continued - bad.f(() {}); // //# 182: continued - bad.f(() {}); // //# 183: continued - bad.f(() {}); // //# 184: continued - bad.f(() {}); // //# 185: continued - bad.f(() {}); // //# 186: continued - bad.f(() {}); // //# 187: continued - bad.f(() {}); // //# 188: continued - - BadEmpty x; // //# 189: continued - BadStart x; // //# 190: continued - BadEnd x; // //# 191: continued - BadMiddle x; // //# 192: continued - BadPosEmpty x; // //# 193: continued - BadPosEmpty x; // //# 194: continued - BadPosEmpty x; // //# 195: continued - BadPosEmpty x; // //# 196: continued - BadPosStart x; // //# 197: continued - BadPosStart x; // //# 198: continued - BadPosEnd x; // //# 199: continued - BadPosStart x; // //# 200: continued - BadPosMiddle x; // //# 201: continued - BadNamEmpty x; // //# 202: continued - BadNamEmpty x; // //# 203: continued - BadNamEmpty x; // //# 204: continued - BadNamEmpty x; // //# 205: continued - BadNamStart x; // //# 206: continued - BadNamStart x; // //# 207: continued - BadNamEnd x; // //# 208: continued - BadNamStart x; // //# 209: continued - BadNamMiddle x; // //# 210: continued -} diff --git a/tests/language_2/unsorted/assignable_expression_runtime_test.dart b/tests/language_2/unsorted/assignable_expression_runtime_test.dart deleted file mode 100644 index 77daac8c599..00000000000 --- a/tests/language_2/unsorted/assignable_expression_runtime_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test to detect syntactically illegal left-hand-side (assignable) -// expressions. - -class C { - static dynamic field = 0; -} - -dynamic variable = 0; - -main() { - variable = 0; - - - - - C.field = 0; - - - - - variable = [1, 2, 3]; - variable[0] = 0; - (variable)[0] = 0; - - - - - C.field = [1, 2, 3]; - - - - - var a = 0; - - - - - // Neat palindrome expression. x is assignable, ((x)) is not. - -} diff --git a/tests/language_2/unsorted/assignable_expression_test.dart b/tests/language_2/unsorted/assignable_expression_test.dart deleted file mode 100644 index 4074af4f51b..00000000000 --- a/tests/language_2/unsorted/assignable_expression_test.dart +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test to detect syntactically illegal left-hand-side (assignable) -// expressions. - -class C { - static dynamic field = 0; -} - -dynamic variable = 0; - -main() { - variable = 0; - (variable) = 0; -//^^^^^^^^^^ -// [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE -//^^^^^^^^^^ -// [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR -// ^ -// [cfe] Can't assign to a parenthesized expression. - (variable)++; - // ^ - // [cfe] Can't assign to a parenthesized expression. - // ^^ - // [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE - ++(variable); - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR - // [cfe] Can't assign to a parenthesized expression. - - C.field = 0; - (C.field) = 0; -//^^^^^^^^^ -// [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE -//^^^^^^^^^ -// [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR -// ^ -// [cfe] Can't assign to a parenthesized expression. - (C.field)++; - // ^ - // [cfe] Can't assign to a parenthesized expression. - // ^^ - // [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE - ++(C.field); - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR - // [cfe] Can't assign to a parenthesized expression. - - variable = [1, 2, 3]; - variable[0] = 0; - (variable)[0] = 0; - (variable[0]) = 0; -//^^^^^^^^^^^^^ -// [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE -//^^^^^^^^^^^^^ -// [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR -// ^ -// [cfe] Can't assign to a parenthesized expression. - (variable[0])++; - // ^ - // [cfe] Can't assign to a parenthesized expression. - // ^^ - // [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE - ++(variable[0]); - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR - // [cfe] Can't assign to a parenthesized expression. - - C.field = [1, 2, 3]; - (C.field[0]) = 0; -//^^^^^^^^^^^^ -// [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE -//^^^^^^^^^^^^ -// [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR -// ^ -// [cfe] Can't assign to a parenthesized expression. - (C.field[0])++; - // ^ - // [cfe] Can't assign to a parenthesized expression. - // ^^ - // [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE - ++(C.field[0]); - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR - // [cfe] Can't assign to a parenthesized expression. - - var a = 0; - (a) = 0; -//^^^ -// [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE -//^^^ -// [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR -// ^ -// [cfe] Can't assign to a parenthesized expression. - (a)++; - //^ - // [cfe] Can't assign to a parenthesized expression. - // ^^ - // [analyzer] SYNTACTIC_ERROR.ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE - ++(a); - // ^ - // [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR - // [cfe] Can't assign to a parenthesized expression. - - // Neat palindrome expression. x is assignable, ((x)) is not. - var funcnuf = (x) => ((x))=((x)) <= (x); - // ^^^^^ - // [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNABLE_SELECTOR - // ^ - // [cfe] Can't assign to a parenthesized expression. -} diff --git a/tests/language_2/unsorted/bad_override_runtime_test.dart b/tests/language_2/unsorted/bad_override_runtime_test.dart deleted file mode 100644 index 8475b1cf75e..00000000000 --- a/tests/language_2/unsorted/bad_override_runtime_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -class Fisk { - get fisk => null; - - set fisk(x) {} - - - get hest => null; - set hest(x) {} - - foo() {} - var field; - method() {} - nullary() {} -} - -class Hest extends Fisk { - - - - -} - -main() { - new Fisk(); - new Hest(); -} diff --git a/tests/language_2/unsorted/bad_override_test.dart b/tests/language_2/unsorted/bad_override_test.dart deleted file mode 100644 index d823d771e43..00000000000 --- a/tests/language_2/unsorted/bad_override_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2012, 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 - -class Fisk { - get fisk => null; - static - set fisk(x) {} - // ^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] This static member conflicts with an instance member. - - static - get hest => null; - // ^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] This static member conflicts with an instance member. - set hest(x) {} - - foo() {} - var field; - method() {} - nullary() {} -} - -class Hest extends Fisk { - static foo() {} - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Can't declare a member that conflicts with an inherited one. - field() {} -//^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_METHOD_AND_FIELD -// [cfe] Can't declare a member that conflicts with an inherited one. - var method; - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_FIELD_AND_METHOD - // [cfe] Can't declare a member that conflicts with an inherited one. - nullary(x) {} -//^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -// [cfe] The method 'Hest.nullary' has more required arguments than those of overridden method 'Fisk.nullary'. -} - -main() { - new Fisk(); - new Hest(); -} diff --git a/tests/language_2/unsorted/bind_test.dart b/tests/language_2/unsorted/bind_test.dart deleted file mode 100644 index 580c1e1f2dd..00000000000 --- a/tests/language_2/unsorted/bind_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class Bound { - run() { - return 42; - } -} - -void main() { - var runner = new Bound().run; - Expect.equals(42, runner()); -} diff --git a/tests/language_2/unsorted/bootstrap_test.dart b/tests/language_2/unsorted/bootstrap_test.dart deleted file mode 100644 index 32c440c8e01..00000000000 --- a/tests/language_2/unsorted/bootstrap_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2013, 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 - -class BootstrapTest { - static testMain() { - var obj = new Object(); - - return obj; - } -} - -main() { - BootstrapTest.testMain(); -} diff --git a/tests/language_2/unsorted/bottom_test.dart b/tests/language_2/unsorted/bottom_test.dart deleted file mode 100644 index a3df620265e..00000000000 --- a/tests/language_2/unsorted/bottom_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -void main() { - final f1 = () => throw null; - final f2 = () => null; - Expect.equals(f1.runtimeType, f2.runtimeType); - - final Bottom = ((F Function() f) => F)(() => throw null); - Expect.equals(Null, Bottom); -} diff --git a/tests/language_2/unsorted/branch_canonicalization_test.dart b/tests/language_2/unsorted/branch_canonicalization_test.dart deleted file mode 100644 index a3b24641d95..00000000000 --- a/tests/language_2/unsorted/branch_canonicalization_test.dart +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that branch fusion correctly sets branch environment for comparisons -// that require unboxing and does not fuse branches that can deoptimize. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -import "package:expect/expect.dart"; - -var sideEffect = true; - -barDouble(a, b) { - sideEffect = false; - final result = (a == b); - sideEffect = !sideEffect; - return result; -} - -fooDouble(a, b) => barDouble(a, b) ? 1 : 0; - -barMint(a, b) { - sideEffect = false; - final result = (a == b); - sideEffect = !sideEffect; - return result; -} - -fooMint(a, b) => barMint(a, b) ? 1 : 0; - -class A { - operator ==(other) => identical(this, other); -} - -class B extends A {} - -class C extends A {} - -barPoly(a, b) { - sideEffect = false; - final result = a == b; - sideEffect = !sideEffect; - return result; -} - -fooPoly(a, b) => barPoly(a, b) ? 1 : 0; - -main() { - final a = 1.0; - final b = 0x4000000000000000; // 1 << 62 - final x = new A(), y = new B(), z = new C(); - for (var i = 0; i < 20; i++) { - Expect.equals(1, fooDouble(a, a)); - Expect.isTrue(sideEffect); - Expect.equals(0, fooMint(b, 0)); - Expect.isTrue(sideEffect); - Expect.equals(1, fooPoly(x, x)); - Expect.equals(0, fooPoly(y, x)); - } - Expect.equals(1, fooDouble(z, z)); - Expect.isTrue(sideEffect); - Expect.equals(1, fooMint(z, z)); - Expect.isTrue(sideEffect); - Expect.equals(1, fooPoly(z, z)); - Expect.isTrue(sideEffect); -} diff --git a/tests/language_2/unsorted/branches_test.dart b/tests/language_2/unsorted/branches_test.dart deleted file mode 100644 index d52e7393bdb..00000000000 --- a/tests/language_2/unsorted/branches_test.dart +++ /dev/null @@ -1,161 +0,0 @@ -// 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 test for branches. Make sure that shortcuts work, even if they have -// to jump over several expressions. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class BranchesTest { - static bool f() { - Expect.equals("Never reached", 0); - return true; - } - - static void testMain() { - int checkPointCounter = 1; - int checkPoint1 = 0; - int checkPoint2 = 0; - int checkPoint3 = 0; - int checkPoint4 = 0; - int checkPoint5 = 0; - int checkPoint6 = 0; - int i = 0; - for (int i = 0; i < 2; i++) { - if (i == 0) { - checkPoint1 += checkPointCounter++; - if (true || // Test branch-if-true. - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f() || - f()) { - checkPoint2 += checkPointCounter++; - } - } else { - // Test branch (jumping over the else branch). - checkPoint3 += checkPointCounter++; - if (false) { - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - checkPoint4 = checkPointCounter++; // Never reached. - } - } - checkPoint5 += checkPointCounter++; - } - checkPoint6 += checkPointCounter++; - Expect.equals(1, checkPoint1); - Expect.equals(2, checkPoint2); - Expect.equals(4, checkPoint3); - Expect.equals(0, checkPoint4); - Expect.equals(8, checkPoint5); - Expect.equals(6, checkPoint6); - } -} - -main() { - BranchesTest.testMain(); -} diff --git a/tests/language_2/unsorted/callable_runtime_test.dart b/tests/language_2/unsorted/callable_runtime_test.dart deleted file mode 100644 index 6745f859ae7..00000000000 --- a/tests/language_2/unsorted/callable_runtime_test.dart +++ /dev/null @@ -1,72 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 'package:expect/expect.dart'; - -class X { - call() => 42; -} - -class XX extends X { - XX.named(); -} - -class Y { - call(int x) => 87 + x; - - static int staticMethod(int x) => x + 1; -} - -class Z { - final T value; - Z(this.value); - T call() => value; - - static int staticMethod(int x) => x + 1; -} - -typedef F(int x); -typedef G(String y); -typedef H(); -typedef T I(); - -main() { - X x = new X(); - Function f = x; // Should pass checked mode test - Y y = new Y(); - Function g = y; // Should pass checked mode test - F f0 = y; // Should pass checked mode test - - - - - Expect.equals(f(), 42); - Expect.equals(g(100), 187); - - var z = new Z(123); - Expect.equals(z(), 123); - Expect.equals((z as dynamic)(), 123); - - Expect.equals(Y.staticMethod(6), 7); - Expect.equals(Z.staticMethod(6), 7); - - var xx = new XX.named(); - Expect.equals(xx(), 42); - - H xx2 = new XX.named(); - Expect.equals(xx2(), 42); - - Expect.throwsTypeError(() { - F f2 = x as dynamic; - }); - - Expect.throwsTypeError(() { - G g1 = y as dynamic; - }); -} diff --git a/tests/language_2/unsorted/callable_test.dart b/tests/language_2/unsorted/callable_test.dart deleted file mode 100644 index 43fff135957..00000000000 --- a/tests/language_2/unsorted/callable_test.dart +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'package:expect/expect.dart'; - -class X { - call() => 42; -} - -class XX extends X { - XX.named(); -} - -class Y { - call(int x) => 87 + x; - - static int staticMethod(int x) => x + 1; -} - -class Z { - final T value; - Z(this.value); - T call() => value; - - static int staticMethod(int x) => x + 1; -} - -typedef F(int x); -typedef G(String y); -typedef H(); -typedef T I(); - -main() { - X x = new X(); - Function f = x; // Should pass checked mode test - Y y = new Y(); - Function g = y; // Should pass checked mode test - F f0 = y; // Should pass checked mode test - - F f1 = x; - //^ - // [cfe] A value of type 'dynamic Function()' can't be assigned to a variable of type 'dynamic Function(int)'. - // ^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - G g0 = y; - //^ - // [cfe] A value of type 'dynamic Function(int)' can't be assigned to a variable of type 'dynamic Function(String)'. - // ^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - - Expect.equals(f(), 42); - Expect.equals(g(100), 187); - - var z = new Z(123); - Expect.equals(z(), 123); - Expect.equals((z as dynamic)(), 123); - - Expect.equals(Y.staticMethod(6), 7); - Expect.equals(Z.staticMethod(6), 7); - - var xx = new XX.named(); - Expect.equals(xx(), 42); - - H xx2 = new XX.named(); - Expect.equals(xx2(), 42); - - Expect.throwsTypeError(() { - F f2 = x as dynamic; - }); - - Expect.throwsTypeError(() { - G g1 = y as dynamic; - }); -} diff --git a/tests/language_2/unsorted/cascaded_forwarding_stubs_test.dart b/tests/language_2/unsorted/cascaded_forwarding_stubs_test.dart deleted file mode 100644 index 29fbe1fe29e..00000000000 --- a/tests/language_2/unsorted/cascaded_forwarding_stubs_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class A {} - -class B extends A {} - -class C { - void f(B x, B y) {} -} - -abstract class I1 { - void f(covariant A x, B y); -} - -// D contains a forwarding stub for f which ensures that `x` is type checked. -class D extends C implements I1 {} - -abstract class I2 { - void f(B x, covariant A y); -} - -// E contains a forwarding stub for f which ensures that `y` is type checked. -class E extends D implements I2 { - void f(B x, B y); -} - -main() { - E e = new E(); - C c = e; - I1 i1 = e; - D d = e; - I2 i2 = e; - A a = new A(); - B b = new B(); - c.f(b, b); // No error - i1.f(b, b); // No error - d.f(b, b); // No error - i2.f(b, b); // No error - e.f(b, b); // No error - Expect.throwsTypeError(() { - i1.f(a, b); - }); - Expect.throwsTypeError(() { - d.f(a, b); - }); - Expect.throwsTypeError(() { - i2.f(b, a); - }); - Expect.throwsTypeError(() { - e.f(a, b); - }); - Expect.throwsTypeError(() { - e.f(b, a); - }); -} diff --git a/tests/language_2/unsorted/cast2_test.dart b/tests/language_2/unsorted/cast2_test.dart deleted file mode 100644 index c65855fed19..00000000000 --- a/tests/language_2/unsorted/cast2_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2012, 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 test program for constructors and initializers. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test 'expression as Type' casts. - -class C { - final int foo = 42; - - int val = 0; - void inc() { - ++val; - } -} - -class D extends C { - final int bar = 37; -} - -main() { - C oc = new C(); - D od = new D(); - - Expect.throwsNoSuchMethodError(() => (oc as dynamic).bar); - - // Casts should always evaluate the left-hand side, if only for its effects. - oc.inc() as dynamic; - Expect.equals(1, oc.val); - oc.inc() as Object; - Expect.equals(2, oc.val); -} diff --git a/tests/language_2/unsorted/cast_test.dart b/tests/language_2/unsorted/cast_test.dart deleted file mode 100644 index f655690e4fa..00000000000 --- a/tests/language_2/unsorted/cast_test.dart +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2012, 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 test program for constructors and initializers. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test 'expression as Type' casts. - -class C { - final int foo = 42; -} - -class D extends C { - final int bar = 37; -} - -Object createC() => new C(); -Object createD() => new D(); -Object getNull() => null; -Object createList() => [2]; -Object createInt() => 87; -Object createString() => "a string"; - -main() { - Object oc = createC(); - Object od = createD(); - Object on = getNull(); - Object ol = createList(); - Object oi = createInt(); - Object os = createString(); - - Expect.equals(42, (oc as C).foo); - Expect.equals(42, (od as C).foo); - Expect.equals(42, (od as D).foo); - Expect.equals(37, (od as D).bar); - Expect.equals(37, ((od as C) as D).bar); - (oc as D).foo; // //# 01: runtime error - (on as D).toString(); - (on as D).foo; // //# 02: runtime error - (on as C).foo; // //# 03: runtime error - oc.foo; // //# 04: compile-time error - od.foo; // //# 05: compile-time error - (on as Object).toString(); - (oc as Object).toString(); - (od as Object).toString(); - (on as dynamic).toString(); - (on as dynamic).foo; // //# 07: runtime error - (oc as dynamic).foo; - (od as dynamic).foo; - (oc as dynamic).bar; // //# 08: runtime error - (od as dynamic).bar; - C c = oc as C; - c = od as C; - c = oc; - D d = od as D; - d = oc as D; // //# 10: runtime error - d = od; - - (ol as List)[0]; - (ol as List)[0]; - (ol as dynamic)[0]; - (ol as String).length; // //# 12: runtime error - int x = (ol as List)[0]; - (ol as List)[0] = (oi as int); - - (os as String).length; - (os as dynamic).length; - (oi as String).length; // //# 13: runtime error - (os as List).length; // //# 14: runtime error - - (oi as int) + 2; - (oi as List).length; // //# 15: runtime error -} diff --git a/tests/language_2/unsorted/check_member_static_runtime_1_test.dart b/tests/language_2/unsorted/check_member_static_runtime_1_test.dart deleted file mode 100644 index 05f92a4ded1..00000000000 --- a/tests/language_2/unsorted/check_member_static_runtime_1_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -class A { - static var a; - var b; -} - -class B extends A {} - -class C extends B { - var a; - -} - -void main() { - new C(); -} diff --git a/tests/language_2/unsorted/check_member_static_runtime_test.dart b/tests/language_2/unsorted/check_member_static_runtime_test.dart deleted file mode 100644 index 06df24db19c..00000000000 --- a/tests/language_2/unsorted/check_member_static_runtime_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -class A { - static var a; - var b; -} - -class B extends A {} - -class C extends B { - - -} - -void main() { - new C(); -} diff --git a/tests/language_2/unsorted/check_member_static_test.dart b/tests/language_2/unsorted/check_member_static_test.dart deleted file mode 100644 index dc7b84502c7..00000000000 --- a/tests/language_2/unsorted/check_member_static_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2014, 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 - -class A { - static var a; - var b; -} - -class B extends A {} - -class C extends B { - var a; - static var b; - // ^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Can't declare a member that conflicts with an inherited one. -} - -void main() { - new C(); -} diff --git a/tests/language_2/unsorted/check_method_override_runtime_test.dart b/tests/language_2/unsorted/check_method_override_runtime_test.dart deleted file mode 100644 index c4b4a55a845..00000000000 --- a/tests/language_2/unsorted/check_method_override_runtime_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2014, 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. - -class A { - f([var x]) {} - foo(var a, [x, y]) {} -} - -class C extends A { - - -} - -main() { - new A().foo(2); - new C().foo(1); -} diff --git a/tests/language_2/unsorted/check_method_override_test.dart b/tests/language_2/unsorted/check_method_override_test.dart deleted file mode 100644 index d2d439ea90c..00000000000 --- a/tests/language_2/unsorted/check_method_override_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2014, 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 - -class A { - f([var x]) {} - foo(var a, [x, y]) {} -} - -class C extends A { - f() {} -//^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -// [cfe] The method 'C.f' has fewer positional arguments than those of overridden method 'A.f'. - foo(var a, [x]) {} -//^^^ -// [analyzer] COMPILE_TIME_ERROR.INVALID_OVERRIDE -// [cfe] The method 'C.foo' has fewer positional arguments than those of overridden method 'A.foo'. -} - -main() { - new A().foo(2); - new C().foo(1); -} diff --git a/tests/language_2/unsorted/checked_method_error_order_test.dart b/tests/language_2/unsorted/checked_method_error_order_test.dart deleted file mode 100644 index 7419c2070ea..00000000000 --- a/tests/language_2/unsorted/checked_method_error_order_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2017, 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 -import "package:expect/expect.dart"; - -class Bar { - foo({int i, String a}) { - print(i); - print(a); - } -} - -main() { - bool checkedMode = false; - assert((checkedMode = true)); - // Test that in checked mode, we are checking the type of optional parameters - // in the correct order (aka, don't check the type of parameter 'a' first). - if (checkedMode) { - dynamic x = 'e'; - dynamic y = 3; - Expect.throws(() => new Bar().foo(i: x, a: y), (e) { - if (e is TypeError) { - var m = e.toString(); - return m.contains("is not a subtype of type 'int'") || - m.contains( - "Expected a value of type 'int', but got one of type 'String'"); - } - return false; - }); - } -} diff --git a/tests/language_2/unsorted/combiner_type_lookup_indexed_test.dart b/tests/language_2/unsorted/combiner_type_lookup_indexed_test.dart deleted file mode 100644 index ee2afc342d3..00000000000 --- a/tests/language_2/unsorted/combiner_type_lookup_indexed_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2017, 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 - -class A {} - -class B extends A { - B operator +(int i) => this; -} - -class C { - B operator [](int i) => new B(); - - void operator []=(int i, A value) {} -} - -main() { - new C()[0] += 1; -} diff --git a/tests/language_2/unsorted/combiner_type_lookup_instance_test.dart b/tests/language_2/unsorted/combiner_type_lookup_instance_test.dart deleted file mode 100644 index 497d7a6331a..00000000000 --- a/tests/language_2/unsorted/combiner_type_lookup_instance_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2017, 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 - -class A {} - -class B extends A { - B operator +(int i) => this; -} - -class C { - B get property => new B(); - - void set property(A value) {} -} - -main() { - new C().property += 1; -} diff --git a/tests/language_2/unsorted/combiner_type_lookup_static_test.dart b/tests/language_2/unsorted/combiner_type_lookup_static_test.dart deleted file mode 100644 index 8979b0ed8e3..00000000000 --- a/tests/language_2/unsorted/combiner_type_lookup_static_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2017, 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 - -class A {} - -class B extends A { - B operator +(int i) => this; -} - -class C { - static B get staticProperty => new B(); - - static void set staticProperty(A value) {} -} - -main() { - C.staticProperty += 1; -} diff --git a/tests/language_2/unsorted/combiner_type_lookup_top_level_test.dart b/tests/language_2/unsorted/combiner_type_lookup_top_level_test.dart deleted file mode 100644 index 4a1b2765306..00000000000 --- a/tests/language_2/unsorted/combiner_type_lookup_top_level_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2017, 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 - -class A {} - -class B extends A { - B operator +(int i) => this; -} - -B get topLevel => new B(); - -void set topLevel(A value) {} - -main() { - topLevel += 1; -} diff --git a/tests/language_2/unsorted/condition_bailout_test.dart b/tests/language_2/unsorted/condition_bailout_test.dart deleted file mode 100644 index b0d39d3141e..00000000000 --- a/tests/language_2/unsorted/condition_bailout_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2012, 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 test program testing closures. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - operator -() => this; - - foo(x) { - -a; - if (x) return true; - return false; - } - - loop1(x) { - -a; - while (x) return true; - return false; - } - - loop2(x) { - -a; - for (; x;) return true; - return false; - } - - loop3(x) { - -a; - var i = 0; - do { - if (i++ == 1) return false; - } while (!x); - return true; - } -} - -var a; - -main() { - a = new A(); - Expect.isTrue(a.foo(true)); - Expect.isTrue(a.loop1(true)); - Expect.isTrue(a.loop2(true)); - Expect.isTrue(a.loop3(true)); -} diff --git a/tests/language_2/unsorted/context2_test.dart b/tests/language_2/unsorted/context2_test.dart deleted file mode 100644 index 1ac6c38d9bd..00000000000 --- a/tests/language_2/unsorted/context2_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2012, 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 test for capturing. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Regression test for issue 5991015. - -class V { - notCalled(Function x) { - return x(); - } - - foofoo(x) { - return x; - } - - hoop(input, n) { - while (n-- > 0) { - Expect.equals(5, input); - continue; // This continue statement must properly unchain the context. - switch (input) { - case 3: - var values = foofoo; - notCalled(() => values(input)); - } - } - } -} - -main() { - new V().hoop(5, 3); -} diff --git a/tests/language_2/unsorted/context_args_with_defaults_test.dart b/tests/language_2/unsorted/context_args_with_defaults_test.dart deleted file mode 100644 index d9dd2a1c529..00000000000 --- a/tests/language_2/unsorted/context_args_with_defaults_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -class ContextArgsWithDefaultsTest { - static void testMain() { - crasher(1, 'foo')(); - } - - static crasher(int fixed, [String optional = '']) { - return () { - Expect.equals(1, fixed); - Expect.equals('foo', optional); - }; - } -} - -main() { - ContextArgsWithDefaultsTest.testMain(); -} diff --git a/tests/language_2/unsorted/context_test.dart b/tests/language_2/unsorted/context_test.dart deleted file mode 100644 index eb8a0d5faa5..00000000000 --- a/tests/language_2/unsorted/context_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// 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 test for capturing. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class ContextTest { - static foo(Function f) { - return f(); - } - - static void testMain() { - int x = 42; - bar() { - return x; - } - - x++; - Expect.equals(43, foo(bar)); - } -} - -main() { - ContextTest.testMain(); -} diff --git a/tests/language_2/unsorted/core_type_check_test.dart b/tests/language_2/unsorted/core_type_check_test.dart deleted file mode 100644 index e2e85f7c436..00000000000 --- a/tests/language_2/unsorted/core_type_check_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -check(value, expectComparable, expectPattern) { - Expect.equals(expectComparable, value is Comparable); - Expect.equals(expectPattern, value is Pattern); -} - -int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); - -class A implements Comparable { - int compareTo(o) => 0; -} - -class B {} - -class C implements Pattern { - matchAsPrefix(String s, [int start = 0]) => null; - allMatches(String s, [int start = 0]) => null; -} - -class D implements Pattern, Comparable { - int compareTo(o) => 0; - matchAsPrefix(String s, [int start = 0]) => null; - allMatches(String s, [int start = 0]) => null; -} - -main() { - var things = [ - [], - 4, - 4.2, - 'foo', - new Object(), - new A(), - new B(), - new C(), - new D() - ]; - - check(things[inscrutable(0)], false, false); // List - check(things[inscrutable(1)], true, false); // int - check(things[inscrutable(2)], true, false); // num - check(things[inscrutable(3)], true, true); // string - check(things[inscrutable(4)], false, false); // Object - check(things[inscrutable(5)], true, false); // A - check(things[inscrutable(6)], false, false); // B - check(things[inscrutable(7)], false, true); // C - check(things[inscrutable(8)], true, true); // D -} diff --git a/tests/language_2/unsorted/cyclic_default_values_test.dart b/tests/language_2/unsorted/cyclic_default_values_test.dart deleted file mode 100644 index 32c3b686a15..00000000000 --- a/tests/language_2/unsorted/cyclic_default_values_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -bar([x = foo]) => x((_) => "bar"); -foo([y = bar]) => y((_) => "foo"); - -foo2({f: bar2}) => f(f: ({f}) => "foo2"); -bar2({f: foo2}) => f(f: ({f}) => "bar2"); - -main() { - var f = bar; - Expect.equals("bar", Function.apply(f, [])); - Expect.equals("main", Function.apply(f, [(_) => "main"])); - - var f_2 = bar2; - Expect.equals("bar2", Function.apply(f_2, [])); - Expect.equals("main2", Function.apply(f_2, [], {#f: ({f}) => "main2"})); -} diff --git a/tests/language_2/unsorted/cyclic_type2_test.dart b/tests/language_2/unsorted/cyclic_type2_test.dart deleted file mode 100644 index 4eb23300475..00000000000 --- a/tests/language_2/unsorted/cyclic_type2_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2013, 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 - -// Tests self referencing types. - -import "package:expect/expect.dart"; - -class Base { - get u => U; - get v => V; -} - -class Derived1 - extends Base, Derived1, Derived2>> {} - -class Derived2 - extends Base, Derived2, Derived1>> {} - -main() { - var d = new Derived1(); - Expect.equals( - "Derived1, Derived2>", - d.u.toString()); - Expect.equals( - "Derived1, " - "Derived1>, Derived2>", - d.v.toString()); - Expect.isTrue(d is Derived1); - Expect.isFalse(d is Derived1); - Expect.isTrue(d is Base, - Derived1, Derived2>>); - Expect.isFalse(d is Base, - Derived1, Derived2>>); -} diff --git a/tests/language_2/unsorted/cyclic_type_test.dart b/tests/language_2/unsorted/cyclic_type_test.dart deleted file mode 100644 index dc15b107333..00000000000 --- a/tests/language_2/unsorted/cyclic_type_test.dart +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2013, 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 - -// Tests self referencing types. - -import "package:expect/expect.dart"; - -@pragma("vm:entry-point") // Prevent obfuscation -class Base { - get t => T; -} - -// Derived is contractive. -@pragma("vm:entry-point") // Prevent obfuscation -class Derived extends Base> {} // //# 00: ok - -// Derived is contractive. -@pragma("vm:entry-point") // Prevent obfuscation -class Derived extends Base>> {} // //# 01: ok - -// Derived is non-contractive. -@pragma("vm:entry-point") // Prevent obfuscation -class Derived extends Base>> {} // //# 02: ok - -// Derived1 and Derived2 are contractive. -@pragma("vm:entry-point") // Prevent obfuscation -class Derived1 extends Base> {} // //# 03: ok -@pragma("vm:entry-point") // Prevent obfuscation -class Derived2 extends Base> {} // //# 03: ok - -// Derived1 and Derived2 are non-contractive. -@pragma("vm:entry-point") // Prevent obfuscation -class Derived1 extends Base> {} // //# 04: ok -@pragma("vm:entry-point") // Prevent obfuscation -class Derived2 extends Base>> {} // //# 04: ok - -main() { - // In the tests below we test that we get "int" and "bool" when calling - // toString() on the int and bool type respectively. This is not required - // behavior. However, we want to keep the original names for the most common - // core types so we make sure to handle these specifically in the compiler. - - var d; - d = new Derived(); // //# 00: continued - Expect.equals("Derived", d.t.toString()); // //# 00: continued - d = new Derived(); // //# 00: continued - Expect.equals("Derived", d.t.toString()); // //# 00: continued - d = new Derived(); // //# 00: continued - Expect.equals("Derived>", d.t.toString()); // //# 00: continued - - d = new Derived(); // //# 01: continued - - Expect.equals("Derived>", d.t.toString()); // //# 01: continued - d = new Derived(); // //# 01: continued - Expect.equals("Derived>", d.t.toString()); // //# 01: continued - d = new Derived(); // //# 01: continued - Expect.equals("Derived>", d.t.toString()); // //# 01: continued - - d = new Derived(); // //# 02: continued - Expect.equals("Derived>", d.t.toString()); // //# 02: continued - d = new Derived(); // //# 02: continued - Expect.equals("Derived>", d.t.toString()); // //# 02: continued - d = new Derived(); // //# 02: continued - Expect.equals("Derived>>", d.t.toString()); // //# 02: continued - - d = new Derived1(); // //# 03: continued - Expect.equals("Derived2", d.t.toString()); // //# 03: continued - d = new Derived2(); // //# 03: continued - Expect.equals("Derived1", d.t.toString()); // //# 03: continued - d = new Derived2>(); // //# 03: continued - Expect.equals("Derived1>", d.t.toString()); // //# 03: continued - - d = new Derived1(); // //# 04: continued - Expect.equals("Derived2", d.t.toString()); // //# 04: continued - d = new Derived2(); // //# 04: continued - Expect.equals("Derived1>", d.t.toString()); // //# 04: continued - d = new Derived2>(); // //# 04: continued - Expect.equals("Derived1>>", d.t.toString()); // //# 04: continued -} diff --git a/tests/language_2/unsorted/default_implementation2_test.dart b/tests/language_2/unsorted/default_implementation2_test.dart deleted file mode 100644 index f279d818f6d..00000000000 --- a/tests/language_2/unsorted/default_implementation2_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2012, 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 test to verify incompatible constructor types - -// @dart = 2.9 - -abstract class Point { - factory Point(int x, int y) = PointImplementation; //# 01: ok - factory Point(x, y) = PointImplementation; //# 02: compile-time error -} - -class PointImplementation implements Point { - PointImplementation(int x, int y) {} -} - -main() { - new Point(1, 2); //# 01: continued - new Point(1, 2); //# 02: continued -} diff --git a/tests/language_2/unsorted/default_implementation_test.dart b/tests/language_2/unsorted/default_implementation_test.dart deleted file mode 100644 index 945f6439388..00000000000 --- a/tests/language_2/unsorted/default_implementation_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2012, 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 test to verify that factory classes are working. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -abstract class Point { - factory Point(int x, int y) = PointImplementation; - - final int x; - final int y; -} - -class PointImplementation implements Point { - const PointImplementation(int x, int y) - : this.x = x, - this.y = y; - final int x; - final int y; -} - -class DefaultImplementationTest { - static void testMain() { - Point point = new Point(4, 2); - Expect.equals(4, point.x); - Expect.equals(2, point.y); - } -} - -main() { - DefaultImplementationTest.testMain(); -} diff --git a/tests/language_2/unsorted/default_init_test.dart b/tests/language_2/unsorted/default_init_test.dart deleted file mode 100644 index 3513254e542..00000000000 --- a/tests/language_2/unsorted/default_init_test.dart +++ /dev/null @@ -1,68 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Tests static and instance fields initialization. -class DefaultInitTest { - static testMain() { - Expect.equals(0, A.a); - Expect.equals(2, A.b); - Expect.equals(null, A.c); - - A a1 = new A(42); - Expect.equals(42, a1.d); - Expect.equals(null, a1.e); - - A a2 = new A.named(43); - Expect.equals(null, a2.d); - Expect.equals(43, a2.e); - - Expect.equals(42, B.instance.x); - Expect.equals(3, C.instance.z); - } -} - -class A { - static const int a = 0; - static const int b = 2; - static int c; - int d; - int e; - - A(int val) { - d = val; - } - - A.named(int val) { - e = val; - } -} - -// The following tests cover cases described in b/4101270 - -class B { - static const B instance = const B(); - // by putting this field after the static initializer above, the JS code gen - // was calling the constructor before the setter of this property was defined. - final int x; - const B() : this.x = (41 + 1); -} - -class C { - // forward reference to another class - static const D instance = const D(); - C() {} -} - -class D { - const D() : this.z = 3; - final int z; -} - -main() { - DefaultInitTest.testMain(); -} diff --git a/tests/language_2/unsorted/deny_listed_test.dart b/tests/language_2/unsorted/deny_listed_test.dart deleted file mode 100644 index ba5775cdcdf..00000000000 --- a/tests/language_2/unsorted/deny_listed_test.dart +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2012, 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 test checking that static/instance field shadowing do not conflict. - -// @dart = 2.9 - -// Test that certain interfaces/classes are denylisted from being -// implemented or extended. - -// bool. -class MyBool implements bool {} // //# 01: compile-time error -abstract class MyBoolInterface implements bool default F { // //# 02: syntax error - MyBoolInterface(); // //# 02: continued -} // //# 02: continued - -// num. -class MyNum implements num {} // //# 03: compile-time error -abstract class MyNumInterface implements num default F { // //# 04: syntax error - MyNumInterface(); // //# 04: continued -} // //# 04: continued - -// int. -class MyInt implements int {} // //# 05: compile-time error -abstract class MyIntInterface implements int default F { // //# 06: syntax error - MyIntInterface(); // //# 06: continued -} // //# 06: continued - -// double. -class MyDouble implements double {} // //# 07: compile-time error -abstract class MyDoubleInterface implements double default F { // //# 08: syntax error - MyDoubleInterface(); // //# 08: continued -} // //# 08: continued - -// String. -class MyString implements String {} // //# 09: compile-time error -abstract class MyStringInterface implements String default F { // //# 10: syntax error - MyStringInterface(); // //# 10: continued -} // //# 10: continued - -// Function. -class MyFunction implements Function {} - -class MyOtherFunction extends Function {} -abstract class MyFunctionInterface implements Function default F { // //# 12: syntax error - MyFunctionInterface(); // //# 12: continued -} // //# 12: continued - -// dynamic. -class MyDynamic implements dynamic {} // //# 13: compile-time error -abstract class MyDynamicInterface implements dynamic default F { // //# 14: syntax error - MyDynamicInterface(); // //# 14: continued -} // //# 14: continued - -class F { - factory MyBoolInterface() { return null; } // //# 02: continued - factory MyNumInterface() { return null; } // //# 04: continued - factory MyIntInterface() { return null; } // //# 06: continued - factory MyDoubleInterface() { return null; } // //# 08: continued - factory MyStringInterface() { return null; } // //# 10: continued - factory MyFunctionInterface() { return null; } // //# 12: continued - factory MyDynamicInterface() { return null; } // //# 14: continued -} - -main() { - new MyBool(); // //# 01: continued - new MyBoolInterface(); // //# 02: continued - new MyNum(); // //# 03: continued - new MyNumInterface(); // //# 04: continued - new MyInt(); // //# 05: continued - new MyIntInterface(); // //# 06: continued - new MyDouble(); // //# 07: continued - new MyDoubleInterface(); // //# 08: continued - new MyString(); // //# 09: continued - new MyStringInterface(); // //# 10: continued - new MyFunction(); - new MyOtherFunction(); - new MyFunctionInterface(); //# 12: continued - new MyDynamic(); // //# 13: continued - new MyDynamicInterface(); // //# 14: continued -} diff --git a/tests/language_2/unsorted/disassemble_test.dart b/tests/language_2/unsorted/disassemble_test.dart deleted file mode 100644 index 65cc56c857a..00000000000 --- a/tests/language_2/unsorted/disassemble_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2014, 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 - -// Tests proper object recognition in disassembler. -import 'dart:async'; -import 'dart:io'; -import "package:expect/expect.dart"; - -Future runBinary(String binary, List arguments) async { - print("+ $binary " + arguments.join(" ")); - final result = await Process.run(binary, arguments); - return result; -} - -f(x) { - return "foo"; -} - -Future main(List args) async { - if (args.contains('--child')) { - print(f(0)); - return; - } - if (Platform.executable.contains("Product")) { - return; // No disassembler in product mode. - } - - final result = await runBinary(Platform.executable, [ - '--no-sound-null-safety', - '--disassemble', - Platform.script.toFilePath(), - '--child' - ]); - Expect.equals(0, result.exitCode); -} diff --git a/tests/language_2/unsorted/efficient_length_warning_test.dart b/tests/language_2/unsorted/efficient_length_warning_test.dart deleted file mode 100644 index 78192bb32c4..00000000000 --- a/tests/language_2/unsorted/efficient_length_warning_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2016, 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. -// Third dart test program. - -// @dart = 2.9 - -import "dart:math"; - -main() { - // This should no longer cause a warning because the least-upper-bound - // of List and Set is Object. - // The LUB is now EfficientLengthIterable and it extends Iterable. - var x = (new Random().nextBool() // Unpredictable condition. - ? [1] - : new Set.from([1])) - .first; - if (x != 1) throw "Wat?"; -} diff --git a/tests/language_2/unsorted/emit_const_fields_test.dart b/tests/language_2/unsorted/emit_const_fields_test.dart deleted file mode 100644 index 641ea1da488..00000000000 --- a/tests/language_2/unsorted/emit_const_fields_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2013, 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. -// Test that used static consts are emitted. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Guide { - static const LTUAE = 42; - static const TITLE = "Life, the Universe and Everything"; - static const EARTH = const { - "Sector": "ZZ9 Plural Z Alpha", - "Status": const ["Scheduled for demolition", "1978-03-08"], - "Description": "Mostly harmless" - }; -} - -main() { - Expect.isTrue(42 == Guide.LTUAE); - Expect.isTrue("1978-03-08" == (Guide.EARTH["Status"] as List)[1]); -} diff --git a/tests/language_2/unsorted/expect_test.dart b/tests/language_2/unsorted/expect_test.dart deleted file mode 100644 index d1df5bc1cb2..00000000000 --- a/tests/language_2/unsorted/expect_test.dart +++ /dev/null @@ -1,79 +0,0 @@ -// 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. -// Testing the Expect class. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class ExpectTest { - static testEquals(a) { - try { - Expect.equals("AB", a, "within testEquals"); - } on ExpectException catch (msg) { - print(msg); - return; - } - Expect.equals("AB", "${a}B"); - throw "Expect.equals did not fail"; - } - - static testIsTrue(f) { - try { - Expect.isTrue(f); - } on ExpectException catch (msg) { - print(msg); - return; - } - Expect.isFalse(f); - throw "Expect.isTrue did not fail"; - } - - static testIsFalse(t) { - try { - Expect.isFalse(t); - } on ExpectException catch (msg) { - print(msg); - return; - } - Expect.isTrue(t); - throw "Expect.isFalse did not fail"; - } - - static testIdentical(a) { - var ab = a + "B"; - try { - Expect.identical("AB", ab); - } on ExpectException catch (msg) { - print(msg); - return; - } - Expect.equals("AB", ab); - throw "Expect.identical did not fail"; - } - - static testFail() { - try { - Expect.fail("fail now"); - } on ExpectException catch (msg) { - print(msg); - return; - } - throw "Expect.fail did not fail"; - } - - static void testMain() { - testEquals("A"); - testIsTrue(false); - testIsTrue(1); - testIsFalse(true); - testIsFalse(0); - testIdentical("A"); - testFail(); - } -} - -main() { - ExpectTest.testMain(); -} diff --git a/tests/language_2/unsorted/extend_type_parameter_test.dart b/tests/language_2/unsorted/extend_type_parameter_test.dart deleted file mode 100644 index 10f1817a6ce..00000000000 --- a/tests/language_2/unsorted/extend_type_parameter_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2012, 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 - -// Extending a type parameter is not allowed. - -abstract class A extends T {} // //# 00: compile-time error -class A extends T {} // //# 01: compile-time error - -main() { - A a = new A(); // //# 00: compile-time error - A a = new A(); // //# 01: continued -} diff --git a/tests/language_2/unsorted/extends_test.dart b/tests/language_2/unsorted/extends_test.dart deleted file mode 100644 index 787552e3cc2..00000000000 --- a/tests/language_2/unsorted/extends_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2013, 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 ExtendsTestMain; - -import "extends_test_lib.dart"; -import "package:expect/expect.dart"; - -// S should extend class A from below, not the one imported -// from the library. -class S extends A {} - -class A { - var y = "class A from main script"; -} - -main() { - var s = new S(); - Expect.equals("class A from main script", s.y); -} diff --git a/tests/language_2/unsorted/extends_test_lib.dart b/tests/language_2/unsorted/extends_test_lib.dart deleted file mode 100644 index b34ac7a18ca..00000000000 --- a/tests/language_2/unsorted/extends_test_lib.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2013, 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 ExtendsTestLib; - -class A { - var y = "class A from library"; -} diff --git a/tests/language_2/unsorted/external_runtime_test.dart b/tests/language_2/unsorted/external_runtime_test.dart deleted file mode 100644 index eca7602057b..00000000000 --- a/tests/language_2/unsorted/external_runtime_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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. - -class Bar { - Bar(val); -} - -class Foo { - var x; - f() {} - - Foo() : x = 0; - - // fields can't be declared external - - - - - - - - - - - - - -} - - - - -main() { - // Ensure Foo class is compiled. - var foo = new Foo(); - - - - - - - - - - - - - - -} diff --git a/tests/language_2/unsorted/external_test.dart b/tests/language_2/unsorted/external_test.dart deleted file mode 100644 index 56c47026ad6..00000000000 --- a/tests/language_2/unsorted/external_test.dart +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2012, 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 - -class Bar { - Bar(val); -} - -class Foo { -// ^ -// [cfe] The non-abstract class 'Foo' is missing implementations for these members: - var x; - f() {} - - Foo() : x = 0; - - // fields can't be declared external - external var x01; -//^^^^^^^^ -// [analyzer] SYNTACTIC_ERROR.EXTERNAL_FIELD -// [cfe] Fields can't be declared to be 'external'. - external int x02; -//^^^^^^^^ -// [analyzer] SYNTACTIC_ERROR.EXTERNAL_FIELD -// [cfe] Fields can't be declared to be 'external'. - - external f11() { } - // ^ - // [analyzer] SYNTACTIC_ERROR.EXTERNAL_METHOD_WITH_BODY - // [cfe] An external or native method can't have a body. - external f12() => 1; - // ^^ - // [analyzer] SYNTACTIC_ERROR.EXTERNAL_METHOD_WITH_BODY - // [cfe] An external or native method can't have a body. - // ^ - // [cfe] An external or native method can't have a body. - static external f14(); - // ^^^^^^^^ - // [analyzer] SYNTACTIC_ERROR.MODIFIER_OUT_OF_ORDER - // [cfe] The modifier 'external' should be before the modifier 'static'. - int external f16(); - // ^^^^^^^^ - // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN - // [cfe] Expected ';' after this. - // ^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER - - external Foo.n21(val) : x = 1; - // ^ - // [analyzer] SYNTACTIC_ERROR.EXTERNAL_CONSTRUCTOR_WITH_INITIALIZER - // [cfe] An external constructor can't have any initializers. - external Foo.n22(val) { x = 1; } - // ^ - // [analyzer] SYNTACTIC_ERROR.EXTERNAL_METHOD_WITH_BODY - // [cfe] An external or native method can't have a body. - external factory Foo.n23(val) => new Foo(); - // ^^ - // [analyzer] SYNTACTIC_ERROR.EXTERNAL_FACTORY_WITH_BODY - // [cfe] External factories can't have a body. - // ^ - // [cfe] An external or native method can't have a body. - external Foo.n24(this.x); - // ^ - // [cfe] An external constructor can't initialize fields. - external factory Foo.n25(val) = Bar; - // ^ - // [analyzer] SYNTACTIC_ERROR.EXTERNAL_FACTORY_REDIRECTION - // [cfe] A redirecting factory can't be external. - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.REDIRECT_TO_INVALID_RETURN_TYPE - // [cfe] The constructor function type 'Bar Function(dynamic)' isn't a subtype of 'Foo Function(dynamic)'. -} - -external int t06(int i) { } -// [error column 1, length 8] -// [analyzer] SYNTACTIC_ERROR.EXTERNAL_METHOD_WITH_BODY -// [cfe] An external or native method can't have a body. -// ^ -// [cfe] An external or native method can't have a body. -external int t07(int i) => i + 1; -// [error column 1, length 8] -// [analyzer] SYNTACTIC_ERROR.EXTERNAL_METHOD_WITH_BODY -// [cfe] An external or native method can't have a body. -// ^ -// [cfe] An external or native method can't have a body. - -main() { - // Ensure Foo class is compiled. - var foo = new Foo(); - - new Foo().f11(); - new Foo().f12(); - Foo.f14(); - new Foo().f16(); - - new Foo.n21(1); - new Foo.n22(1); - new Foo.n23(1); - new Foo.n24(1); - new Foo.n25(1); - - t06(1); - t07(1); -} diff --git a/tests/language_2/unsorted/extract_type_arguments_test.dart b/tests/language_2/unsorted/extract_type_arguments_test.dart deleted file mode 100644 index b535bd6fac0..00000000000 --- a/tests/language_2/unsorted/extract_type_arguments_test.dart +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (c) 2017, 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 - -/// Tests the (probably temporary) API for extracting reified type arguments -/// from an object. - -import "package:expect/expect.dart"; - -// It's weird that a language test is testing code defined in a package. The -// rationale for putting this test here is: -// -// * This package is special and "built-in" to Dart in that the various -// compilers give it the special privilege of importing "dart:_internal" -// without error. -// -// * Eventually, the API being tested here may be replaced with an actual -// language feature, in which case this test will become an actual language -// test. -// -// * Placing the test here ensures it is tested on all of the various platforms -// and configurations where we need the API to work. -import "package:dart_internal/extract_type_arguments.dart"; - -main() { - testExtractIterableTypeArgument(); - testExtractMapTypeArguments(); -} - -testExtractIterableTypeArgument() { - Object object = []; - - // Invokes function with iterable's type argument. - var called = false; - extractIterableTypeArgument(object, () { - Expect.equals(T, int); - called = true; - }); - Expect.isTrue(called); - - // Returns result of function. - Object result = extractIterableTypeArgument(object, () => new Set()); - Expect.isTrue(result is Set); - Expect.isFalse(result is Set); - - // Accepts user-defined implementations of Iterable. - object = new CustomIterable(); - result = extractIterableTypeArgument(object, () => new Set()); - Expect.isTrue(result is Set); - Expect.isFalse(result is Set); -} - -testExtractMapTypeArguments() { - Object object = {}; - - // Invokes function with map's type arguments. - var called = false; - extractMapTypeArguments(object, () { - Expect.equals(K, String); - Expect.equals(V, int); - called = true; - }); - Expect.isTrue(called); - - // Returns result of function. - Object result = extractMapTypeArguments(object, () => new Two()); - Expect.isTrue(result is Two); - Expect.isFalse(result is Two); - - // Accepts user-defined implementations of Map. - object = new CustomMap(); - result = extractMapTypeArguments(object, () => new Two()); - Expect.isTrue(result is Two); - Expect.isFalse(result is Two); - - // Uses the type parameter order of Map, not any other type in the hierarchy. - object = new FlippedMap(); - result = extractMapTypeArguments(object, () => new Two()); - // Order is reversed here: - Expect.isTrue(result is Two); - Expect.isFalse(result is Two); -} - -class Two {} - -class CustomIterable implements Iterable { - noSuchMethod(i) => throw new UnimplementedError(); -} - -class CustomMap implements Map { - noSuchMethod(i) => throw new UnimplementedError(); -} - -// Note: Flips order of type parameters. -class FlippedMap implements Map { - noSuchMethod(i) => throw new UnimplementedError(); -} diff --git a/tests/language_2/unsorted/fannkuch_test.dart b/tests/language_2/unsorted/fannkuch_test.dart deleted file mode 100644 index 9f3818111eb..00000000000 --- a/tests/language_2/unsorted/fannkuch_test.dart +++ /dev/null @@ -1,96 +0,0 @@ -// 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. -// The Computer Language Benchmarks Game -// https://benchmarksgame-team.pages.debian.net/benchmarksgame/ -// Ported from JavaScript contributed by Isaac Gouy. -// Description: Repeatedly access a tiny integer-sequence. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class FannkuchTest { - static fannkuch(n) { - var p = new List.filled(n, null), - q = new List.filled(n, null), - s = new List.filled(n, null); - var sign = 1, maxflips = 0, sum = 0, m = n - 1; - for (var i = 0; i < n; i++) { - p[i] = i; - q[i] = i; - s[i] = i; - } - do { - // Copy and flip. - var q0 = p[0]; // Cache 0th element. - if (q0 != 0) { - for (var i = 1; i < n; i++) q[i] = p[i]; // Work on a copy. - var flips = 1; - do { - var qq = q[q0]; - if (qq == 0) { - // ... until 0th element is 0. - sum += sign * flips; - if (flips > maxflips) maxflips = flips; // New maximum? - break; - } - q[q0] = q0; - if (q0 >= 3) { - var i = 1, j = q0 - 1, t; - do { - t = q[i]; - q[i] = q[j]; - q[j] = t; - i++; - j--; - } while (i < j); - } - q0 = qq; - flips++; - } while (true); - } - if (sign == 1) { - var t = p[1]; - p[1] = p[0]; - p[0] = t; - sign = -1; // Rotate 0<-1. - } else { - // Rotate 0<-1 and 0<-1<-2. - var t = p[1]; - p[1] = p[2]; - p[2] = t; - sign = 1; - for (var i = 2; i < n; i++) { - var sx = s[i]; - if (sx != 0) { - s[i] = sx - 1; - break; - } - if (i == m) { - return [sum, maxflips]; - } - s[i] = i; - // Rotate 0<-...<-i+1. - t = p[0]; - for (var j = 0; j <= i; j++) { - p[j] = p[j + 1]; - } - p[i + 1] = t; - } - } - } while (true); - } - - static testMain() { - var n = 6; - var pf = fannkuch(n); - Expect.equals(49, pf[0]); - Expect.equals(10, pf[1]); - print("${pf[0]}\nPfannkuchen($n) = ${pf[1]}"); - } -} - -main() { - FannkuchTest.testMain(); -} diff --git a/tests/language_2/unsorted/fast_method_extraction_test.dart b/tests/language_2/unsorted/fast_method_extraction_test.dart deleted file mode 100644 index 6da4f057906..00000000000 --- a/tests/language_2/unsorted/fast_method_extraction_test.dart +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) 2012, 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. -// Test that fast method extraction returns correct closure. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - var f; - A(this.f); - foo() => 40 + f; -} - -class B { - var f; - B(this.f); - foo() => -40 - f; -} - -class X {} - -class C { - foo(v) => v is T; -} - -class ChaA { - final magic; - ChaA(magic) : this.magic = magic; - - foo() { - Expect.isTrue(this is ChaA); - Expect.equals("magicA", magic); - return "A"; - } - - bar() => foo; -} - -class ChaB extends ChaA { - ChaB(magic) : super(magic); - - foo() { - Expect.isTrue(this is ChaB); - Expect.equals("magicB", magic); - return "B"; - } -} - -mono(a) { - var f = a.foo; - return f(); -} - -poly(a) { - var f = a.foo; - return f(); -} - -types(a, b) { - var f = a.foo; - Expect.isTrue(f(b)); -} - -cha(a) { - var f = a.bar(); - return f(); -} - -extractFromNull() { - var f = (null).toString; - Expect.equals("null", f()); -} - -main() { - var a = new A(2); - var b = new B(2); - for (var i = 0; i < 20; i++) { - Expect.equals(42, mono(a)); - } - - for (var i = 0; i < 20; i++) { - Expect.equals(42, poly(a)); - Expect.equals(-42, poly(b)); - } - - var c = new C(); - var x = new X(); - for (var i = 0; i < 20; i++) { - types(c, x); - } - - var chaA = new ChaA("magicA"); - for (var i = 0; i < 20; i++) { - Expect.equals("A", cha(chaA)); - } - - var chaB = new ChaB("magicB"); - for (var i = 0; i < 20; i++) { - Expect.equals("B", cha(chaB)); - } - - for (var i = 0; i < 20; i++) { - extractFromNull(); - } -} diff --git a/tests/language_2/unsorted/fauxverride_runtime_test.dart b/tests/language_2/unsorted/fauxverride_runtime_test.dart deleted file mode 100644 index 46067923094..00000000000 --- a/tests/language_2/unsorted/fauxverride_runtime_test.dart +++ /dev/null @@ -1,104 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -import "package:expect/expect.dart"; - -// Test the semantics of static members mixed with instance members. - -// Following are relevant quotes from Dart Programming Language -// Specification, Draft Version 0.10, June 7, 2012. - -// 7 Classes: - -// "It is a compile-time error if a class has an instance method and a -// static member method with the same name." - -// 7.1 Instance Methods: - -// "Instance methods are functions (6) whose declarations are -// immediately contained within a class declaration and that are not -// declared static. The instance methods of a class C are those -// instance methods declared by C and the instance methods inherited -// by C from its superclass." - -// 7.6 Static Methods - -// "Static methods are functions whose declarations are immediately -// contained within a class declaration and that are declared -// static. The static methods of a class C are those static methods -// declared by C." - -// 7.7 Static Variables - -// "Static variables are variables whose declarations are immediately -// contained within a class declaration and that are declared -// static. The static variables of a class C are those static -// variables declared by C." - -// "A static variable declaration of one of the forms static T v;, -// static T v = e; , static const T v = e; or static final T v = e; -// always induces an implicit static getter function (7.2) with -// signature static T get v whose invocation evaluates as described -// below (7.7.1)." - -m() => 'top level'; - -class Super { - // No error from hiding. - static m() => 'super'; - - static var i = 'super'; - - static var i2 = 'super'; - - instanceMethod() => m(); - - instanceMethod2() => m(); -} - -class Sub extends Super { - // According to 7.6, static methods are not inherited. - static m() => 'sub'; - - // According to 7.7, static variables are not inherited. - static var i = 'sub'; - - // According to 7.1, instance methods include those of the - // superclass, and according to 7, it is a compile-time to have an - // instance method and static method with the same name. - - instanceMethod() => m(); - - // According to 7.7, static variables are not inherited. - static i2() => m(); - - // According to 7.1, instance methods include those of the - // superclass, and according to 7, it is a compile-time to have an - // instance method and static method with the same - // name. Furthermore, according to 7.7 a static variable induces an - // implicit getter function (a static method). - - - foo() => 'foo'; -} - -main() { - Expect.equals('foo', new Sub().foo()); - Expect.equals('top level', m()); - Expect.equals('super', Super.m()); - Expect.equals('sub', Sub.m()); - Expect.equals('super', Super.i); - Expect.equals('sub', Sub.i); - Expect.equals('super', Super.i2); - Expect.equals('sub', Sub.i2()); - Expect.equals('super', new Super().instanceMethod()); - Expect.equals('sub', new Sub().instanceMethod()); - Expect.equals('super', new Super().instanceMethod2()); - Expect.equals('super', new Sub().instanceMethod2()); -} diff --git a/tests/language_2/unsorted/fauxverride_test.dart b/tests/language_2/unsorted/fauxverride_test.dart deleted file mode 100644 index d1597f68203..00000000000 --- a/tests/language_2/unsorted/fauxverride_test.dart +++ /dev/null @@ -1,111 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Test the semantics of static members mixed with instance members. - -// Following are relevant quotes from Dart Programming Language -// Specification, Draft Version 0.10, June 7, 2012. - -// 7 Classes: - -// "It is a compile-time error if a class has an instance method and a -// static member method with the same name." - -// 7.1 Instance Methods: - -// "Instance methods are functions (6) whose declarations are -// immediately contained within a class declaration and that are not -// declared static. The instance methods of a class C are those -// instance methods declared by C and the instance methods inherited -// by C from its superclass." - -// 7.6 Static Methods - -// "Static methods are functions whose declarations are immediately -// contained within a class declaration and that are declared -// static. The static methods of a class C are those static methods -// declared by C." - -// 7.7 Static Variables - -// "Static variables are variables whose declarations are immediately -// contained within a class declaration and that are declared -// static. The static variables of a class C are those static -// variables declared by C." - -// "A static variable declaration of one of the forms static T v;, -// static T v = e; , static const T v = e; or static final T v = e; -// always induces an implicit static getter function (7.2) with -// signature static T get v whose invocation evaluates as described -// below (7.7.1)." - -m() => 'top level'; - -class Super { - // No error from hiding. - static m() => 'super'; - - static var i = 'super'; - - static var i2 = 'super'; - - instanceMethod() => m(); - - instanceMethod2() => m(); -} - -class Sub extends Super { - // According to 7.6, static methods are not inherited. - static m() => 'sub'; - - // According to 7.7, static variables are not inherited. - static var i = 'sub'; - - // According to 7.1, instance methods include those of the - // superclass, and according to 7, it is a compile-time to have an - // instance method and static method with the same name. - static - instanceMethod() => m(); -//^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE -// [cfe] Can't declare a member that conflicts with an inherited one. - - // According to 7.7, static variables are not inherited. - static i2() => m(); - - // According to 7.1, instance methods include those of the - // superclass, and according to 7, it is a compile-time to have an - // instance method and static method with the same - // name. Furthermore, according to 7.7 a static variable induces an - // implicit getter function (a static method). - static var instanceMethod2; - // ^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Can't declare a member that conflicts with an inherited one. - - foo() => 'foo'; -} - -main() { - Expect.equals('foo', new Sub().foo()); - Expect.equals('top level', m()); - Expect.equals('super', Super.m()); - Expect.equals('sub', Sub.m()); - Expect.equals('super', Super.i); - Expect.equals('sub', Sub.i); - Expect.equals('super', Super.i2); - Expect.equals('sub', Sub.i2()); - Expect.equals('super', new Super().instanceMethod()); - Expect.equals('sub', new Sub().instanceMethod()); - // ^ - // [cfe] The method 'instanceMethod' isn't defined for the class 'Sub'. - Expect.equals('super', new Super().instanceMethod2()); - Expect.equals('super', new Sub().instanceMethod2()); - // ^ - // [cfe] The method 'instanceMethod2' isn't defined for the class 'Sub'. -} diff --git a/tests/language_2/unsorted/fibo_test.dart b/tests/language_2/unsorted/fibo_test.dart deleted file mode 100644 index 5182753626c..00000000000 --- a/tests/language_2/unsorted/fibo_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// 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 test program calculating the Fibonacci sequence. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Helper { - static int fibonacci(int n) { - int a = 0, b = 1, i = 0; - while (i++ < n) { - a = a + b; - b = a - b; - } - return a; - } -} - -class FiboTest { - static testMain() { - Expect.equals(0, Helper.fibonacci(0)); - Expect.equals(1, Helper.fibonacci(1)); - Expect.equals(1, Helper.fibonacci(2)); - Expect.equals(2, Helper.fibonacci(3)); - Expect.equals(3, Helper.fibonacci(4)); - Expect.equals(5, Helper.fibonacci(5)); - Expect.equals(102334155, Helper.fibonacci(40)); - } -} - -main() { - FiboTest.testMain(); -} diff --git a/tests/language_2/unsorted/first_test.dart b/tests/language_2/unsorted/first_test.dart deleted file mode 100644 index 836646443d2..00000000000 --- a/tests/language_2/unsorted/first_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// 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. -// First dart test program. - -// @dart = 2.9 - -class FirstTest { - static testMain() { - return 42; - } -} - -main() { - FirstTest.testMain(); -} diff --git a/tests/language_2/unsorted/fixed_length_test.dart b/tests/language_2/unsorted/fixed_length_test.dart deleted file mode 100644 index 6c89cea41cb..00000000000 --- a/tests/language_2/unsorted/fixed_length_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -// Regression test for https://code.google.com/p/dart/issues/detail?id=7994. - -void main() { - Expect.equals(-1, foo()); -} - -int foo() { - var list = new List.filled(1024, null); - - for (int i = 0; i < list.length; i++) list[i] = -i; - - for (int n = list.length; n > 1; n--) { - for (int i = 0; i < n - 1; i++) { - if (list[i] > list[i + 1]) { - return list[i + 1]; - } - } - } -} diff --git a/tests/language_2/unsorted/flatten_test.dart b/tests/language_2/unsorted/flatten_test.dart deleted file mode 100644 index 5f4b86a637e..00000000000 --- a/tests/language_2/unsorted/flatten_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'dart:async'; - -class Derived implements Future { - noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); -} - -class FixedPoint implements Future> { - noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); -} - -class Divergent implements Future>> { - noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); -} - -test() async { - // flatten(Derived) = int - int x = await new Derived(); //# 01: runtime error - Future f() async => new Derived(); //# 02: ok - Future f() async { return new Derived(); } //# 03: ok - Future x = (() async => new Derived())(); //# 04: runtime error - - // flatten(FixedPoint) = FixedPoint - FixedPoint x = await new FixedPoint(); //# 05: runtime error - Future> f() async => new FixedPoint(); //# 06: ok - Future> f() async { return new FixedPoint(); } //# 07: ok - Future> x = (() async => new FixedPoint())(); //# 08: runtime error - - // flatten(Divergent) = Divergent> - Divergent> x = await new Divergent(); //# 09: runtime error - Future>> f() async => new Divergent(); //# 10: ok - Future>> f() async { return new Divergent(); } //# 11: ok - Future>> x = (() async => new Divergent())(); //# 12: runtime error -} - -main() { - test(); -} diff --git a/tests/language_2/unsorted/forwarding_semi_stub_test.dart b/tests/language_2/unsorted/forwarding_semi_stub_test.dart deleted file mode 100644 index 6f9c6208596..00000000000 --- a/tests/language_2/unsorted/forwarding_semi_stub_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -class B { - void f(num x) {} -} - -abstract class I { - void f(T x); -} - -class C extends B implements I { - // This method is a "forwarding semi-stub"--the front end needs to add an - // implementation to it that performs type checking and forwards to B::f. - void f(num x); -} - -main() { - I i = new C(); - Expect.throwsTypeError(() { - i.f('oops'); - }); -} diff --git a/tests/language_2/unsorted/future_or_function_test.dart b/tests/language_2/unsorted/future_or_function_test.dart deleted file mode 100644 index 6b7b2627cb9..00000000000 --- a/tests/language_2/unsorted/future_or_function_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:async'; -import 'package:expect/expect.dart'; - -main() { - Expect.subtype>(); -} diff --git a/tests/language_2/unsorted/fuzzy_arrows_test.dart b/tests/language_2/unsorted/fuzzy_arrows_test.dart deleted file mode 100644 index 7cb92d9b13d..00000000000 --- a/tests/language_2/unsorted/fuzzy_arrows_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2017, 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 - -// Fuzzy arrows will be eliminated from Dart 2.0 soon. This test checks that -// implementations have properly removed fuzzy arrow support, both at compile -// time and at run time. See dartbug.com/29630 for a detailed explanation. - -import "package:expect/expect.dart"; - -typedef DynamicToDynamic(x); -typedef NullToDynamic(Null x); - -num numToNum(num x) => null; - -main() { - DynamicToDynamic x = numToNum; //# 01: compile-time error - NullToDynamic x = numToNum; //# 02: ok - Expect.isFalse(numToNum is DynamicToDynamic); //# 03: ok - Expect.isTrue(numToNum is NullToDynamic); //# 04: ok -} diff --git a/tests/language_2/unsorted/gc_test.dart b/tests/language_2/unsorted/gc_test.dart deleted file mode 100644 index 239f107a520..00000000000 --- a/tests/language_2/unsorted/gc_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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. -// Testing GC, issue 1469. - -// @dart = 2.9 - -main() { - var div; - for (int i = 0; i < 200; ++i) { - List l = new List.filled(1000000, null); - var m = 2; - div = (_) { - var b = l; // Was causing OutOfMemory. - }; - var lSmall = new List.filled(3, null); - // Circular reference between new and old gen objects. - lSmall[0] = l; - l[0] = lSmall; - } -} diff --git a/tests/language_2/unsorted/guess_cid_test.dart b/tests/language_2/unsorted/guess_cid_test.dart deleted file mode 100644 index 77a83427601..00000000000 --- a/tests/language_2/unsorted/guess_cid_test.dart +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2013, 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 test program to test cid guessing optimizations. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - // Warmup optimizes methods. - for (int i = 0; i < 100; i++) { - Expect.equals(i, compareInt(i)); - Expect.equals(i.toDouble(), compareDouble(i.toDouble())); - Expect.equals(i, binOpInt(i, i)); - Expect.equals(i.toDouble(), binOpDouble(i.toDouble(), i.toDouble())); - } - Expect.equals(3, compareInt(3)); - Expect.equals(-2, compareInt(-2)); - Expect.equals(0, compareInt(-1)); - - Expect.equals(3, binOpInt(3, 3)); - Expect.equals(0, binOpInt(-2, -2)); - - Expect.equals(3.0, binOpDouble(3.0, 3.0)); - Expect.equals(0.0, binOpDouble(-2.0, -2.0)); - - Expect.equals(3.0, compareDouble(3.0)); - Expect.equals(-2.0, compareDouble(-2.0)); - Expect.equals(0.0, compareDouble(-1.0)); - - testOSR(); -} - -int compareInt(int i) { - if (i < 0) { - // Not visited in before optimization. - // Guess cid of comparison below. - if (i == -1) return 0; - } - return i; -} - -double compareDouble(double i) { - if (i < 0.0) { - // Not visited in before optimization. - // Guess cid of comparison below. - if (i == -1.0) return 0.0; - } - return i; -} - -int binOpInt(int i, int x) { - if (i < 0) { - // Not visited in before optimization. - // Guess cid of binary operation below. - return x + 2; - } - return i; -} - -double binOpDouble(double i, double x) { - if (i < 0.0) { - // Not visited in before optimization. - // Guess cid of binary operation below. - return x + 2.0; - } - return i; -} - -testOSR() { - // Foul up IC data in integer's unary minus. - var y = -0x80000000; - Expect.equals( - (0x7fffffffffffffff + 2) * 10, testLoop(10, 0x7fffffffffffffff)); - // Second time no deoptimization can occur, since runtime feedback has been collected. - Expect.equals( - (0x7fffffffffffffff + 2) * 10, testLoop(10, 0x7fffffffffffffff)); -} - -testLoop(N, x) { - for (int i = 0; i < N; ++i) { - // Will trigger OSR. Operation in loop below will use guessed cids. - } - int sum = 0; - for (int i = 0; i < N; ++i) { - // Guess 'x' is Smi, but is actually Mint: deoptimize. - sum += x + 2; - } - return sum; -} diff --git a/tests/language_2/unsorted/gvn_field_access_test.dart b/tests/language_2/unsorted/gvn_field_access_test.dart deleted file mode 100644 index fc68ee159ea..00000000000 --- a/tests/language_2/unsorted/gvn_field_access_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - var y = 0; - foo(x) { - var t = this.y; - if (t < x) { - for (int i = this.y; i < x; i++) y++; - } - // dart2js was reusing the 't' from above. - return this.y; - } -} - -void main() { - Expect.equals(3, new A().foo(3)); -} diff --git a/tests/language_2/unsorted/gvn_interceptor_test.dart b/tests/language_2/unsorted/gvn_interceptor_test.dart deleted file mode 100644 index c3003ccab1d..00000000000 --- a/tests/language_2/unsorted/gvn_interceptor_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -foo(a, index) { - if (a.length < index) { - for (int i = a.length; i <= index; i++) a.add(i); - } - // dart2js was reusing the a.length from above. - return a[a.length - 1]; -} - -void main() { - Expect.equals(3, foo([0], 3)); -} diff --git a/tests/language_2/unsorted/gvn_test.dart b/tests/language_2/unsorted/gvn_test.dart deleted file mode 100644 index ef749760c38..00000000000 --- a/tests/language_2/unsorted/gvn_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class A { - int x = 0; - - foo(i) { - var start = x; - do { - x++; - i++; - } while (i != 10); - } -} - -main() { - var a = new A(); - a.foo(0); - Expect.equals(10, a.x); -} diff --git a/tests/language_2/unsorted/hash_code_mangling_test.dart b/tests/language_2/unsorted/hash_code_mangling_test.dart deleted file mode 100644 index f24094ce9e0..00000000000 --- a/tests/language_2/unsorted/hash_code_mangling_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class Foo { - var $identityHash; -} - -void main() { - Foo foo = new Foo(); - foo.$identityHash = 'fisk'; - Expect.isTrue(foo.$identityHash is String); - int hash = foo.hashCode; - Expect.isTrue(hash is int); - Expect.isTrue(foo.$identityHash is String); - Expect.equals(hash, foo.hashCode); -} diff --git a/tests/language_2/unsorted/hello_dart_test.dart b/tests/language_2/unsorted/hello_dart_test.dart deleted file mode 100644 index f0f11b26971..00000000000 --- a/tests/language_2/unsorted/hello_dart_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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. -// Simple test program invoked with an option to eagerly -// compile all code that is loaded in the isolate. -// VMOptions=--compile_all - -// @dart = 2.9 - -class HelloDartTest { - static testMain() { - print("Hello, Darter!"); - } -} - -main() { - HelloDartTest.testMain(); -} diff --git a/tests/language_2/unsorted/hello_script_lib.dart b/tests/language_2/unsorted/hello_script_lib.dart deleted file mode 100644 index f3b2fdf96fc..00000000000 --- a/tests/language_2/unsorted/hello_script_lib.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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 - -// Testing a simple script importing a library. -// This file contains the library. - -library HelloScriptLib; - -import "package:expect/expect.dart"; -part "hello_script_lib_source.dart"; - -class HelloLib { - static doTest() { - x = 17; - Expect.equals(17, x++); - print("Hello from Lib!"); - } -} diff --git a/tests/language_2/unsorted/hello_script_lib_source.dart b/tests/language_2/unsorted/hello_script_lib_source.dart deleted file mode 100644 index 09924617dd6..00000000000 --- a/tests/language_2/unsorted/hello_script_lib_source.dart +++ /dev/null @@ -1,14 +0,0 @@ -// 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 - -// Testing a simple script importing a library. -// This file contains a source file included from the library. - -// A top-level variable being accessed both from the library and the importer. - -part of HelloScriptLib; - -var x; diff --git a/tests/language_2/unsorted/hello_script_test.dart b/tests/language_2/unsorted/hello_script_test.dart deleted file mode 100644 index f524e62c6a5..00000000000 --- a/tests/language_2/unsorted/hello_script_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -#! This is currently only a comment. -// 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 - -// Testing a simple script importing a library. -// This file contains the script (aka root library). - -library HelloScriptTest.dart; - -import "package:expect/expect.dart"; -import "hello_script_lib.dart"; - -main() { - HelloLib.doTest(); - Expect.equals(18, x); - print("Hello done."); -} diff --git a/tests/language_2/unsorted/illegal_declaration_test.dart b/tests/language_2/unsorted/illegal_declaration_test.dart deleted file mode 100644 index 4ef6c084a07..00000000000 --- a/tests/language_2/unsorted/illegal_declaration_test.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2012, 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 - -[ //# 01: syntax error - -main() {} diff --git a/tests/language_2/unsorted/illegal_invocation_lib.dart b/tests/language_2/unsorted/illegal_invocation_lib.dart deleted file mode 100644 index 1f0c4d57fec..00000000000 --- a/tests/language_2/unsorted/illegal_invocation_lib.dart +++ /dev/null @@ -1,5 +0,0 @@ - -// @dart = 2.9 -library foo; - -foo() {} diff --git a/tests/language_2/unsorted/illegal_invocation_runtime_test.dart b/tests/language_2/unsorted/illegal_invocation_runtime_test.dart deleted file mode 100644 index 12bae4ca945..00000000000 --- a/tests/language_2/unsorted/illegal_invocation_runtime_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2012, 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 test program for constructors and initializers. -// -// Test for issue 1393. Invoking a library prefix name caused an internal error -// in dartc. - - - -main() { - // probably what the user meant was foo.foo(), but the qualifier refers - // to the library prefix, not the method defined within the library. - -} diff --git a/tests/language_2/unsorted/illegal_invocation_test.dart b/tests/language_2/unsorted/illegal_invocation_test.dart deleted file mode 100644 index 4527584f580..00000000000 --- a/tests/language_2/unsorted/illegal_invocation_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2012, 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 test program for constructors and initializers. -// -// Test for issue 1393. Invoking a library prefix name caused an internal error -// in dartc. - -// @dart = 2.9 - -import "illegal_invocation_lib.dart" as foo; - -main() { - // probably what the user meant was foo.foo(), but the qualifier refers - // to the library prefix, not the method defined within the library. - foo(); -//^^^ -// [analyzer] COMPILE_TIME_ERROR.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT -// [cfe] A prefix can't be used as an expression. -} diff --git a/tests/language_2/unsorted/implicit_scope_test.dart b/tests/language_2/unsorted/implicit_scope_test.dart deleted file mode 100644 index 741e51c4094..00000000000 --- a/tests/language_2/unsorted/implicit_scope_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// 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. -// Test that if, while etc create an implicit scope if the body -// is not a compound statement. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class ImplicitScopeTest { - static bool alwaysTrue() { - return 1 + 1 == 2; - } - - static testMain() { - var a = "foo"; - var b; - if (alwaysTrue()) - var a = "bar"; - else - var b = a; - Expect.equals("foo", a); - Expect.equals(null, b); - - while (!alwaysTrue()) var a = "bar", b = "baz"; - Expect.equals("foo", a); - Expect.equals(null, b); - - for (int i = 0; i < 10; i++) var a = "bar", b = "baz"; - Expect.equals("foo", a); - Expect.equals(null, b); - - do var a = "bar", b = "baz"; while ("black" == "white"); - Expect.equals("foo", a); - Expect.equals(null, b); - } -} - -main() { - ImplicitScopeTest.testMain(); -} diff --git a/tests/language_2/unsorted/index_assign_operator_infer_return_type_test.dart b/tests/language_2/unsorted/index_assign_operator_infer_return_type_test.dart deleted file mode 100644 index abd5a06f6b3..00000000000 --- a/tests/language_2/unsorted/index_assign_operator_infer_return_type_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2018, 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 - -class C { - operator []=(dynamic index, dynamic value) {} -} - -abstract class I { - void operator []=(dynamic index, dynamic value) {} -} - -class D extends C implements I { - // Even though `C` and `I` define different return types for `operator[]=`, it - // should still be possible to infer a return type here, since the return type - // of `operator[]=` is always inferred as `void`. - operator []=(dynamic index, dynamic value) {} -} - -main() {} diff --git a/tests/language_2/unsorted/indirect_const_null_test.dart b/tests/language_2/unsorted/indirect_const_null_test.dart deleted file mode 100644 index 52737be2946..00000000000 --- a/tests/language_2/unsorted/indirect_const_null_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -main() { - const NULL = 1 == 1 ? null : false; - Expect.isNull(NULL); -} diff --git a/tests/language_2/unsorted/inference_enum_list_test.dart b/tests/language_2/unsorted/inference_enum_list_test.dart deleted file mode 100644 index 45ec5758c7d..00000000000 --- a/tests/language_2/unsorted/inference_enum_list_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2013, 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 - -enum E1 { a, b } -enum E2 { a, b } -enum E3 { a, b } - -var v = [E1.a, E2.b]; - -main() { - // Test that v is `List`, so these assignments are OK. - v[0] = E3.a; - List w = v; -} diff --git a/tests/language_2/unsorted/inference_list_or_null_test.dart b/tests/language_2/unsorted/inference_list_or_null_test.dart deleted file mode 100644 index 8ba52320206..00000000000 --- a/tests/language_2/unsorted/inference_list_or_null_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to statically inline the length of an -// array held in a variable when it could, even if that variable could -// be null. - -import "package:expect/expect.dart"; - -var list; - -main() { - if (new DateTime.now().millisecondsSinceEpoch == 0) - list = new List.filled(4, null); - Expect.throwsNoSuchMethodError(() => print(list[5])); -} diff --git a/tests/language_2/unsorted/intrinsified_methods_test.dart b/tests/language_2/unsorted/intrinsified_methods_test.dart deleted file mode 100644 index 6ad9e92fb85..00000000000 --- a/tests/language_2/unsorted/intrinsified_methods_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2012, 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 test program for testing the instanceof operation. - -// @dart = 2.9 - -library intrinsified_methods_test; - -import "package:expect/expect.dart"; -import 'dart:math'; - -testIsNegative() { - Expect.isFalse((12.0).isNegative); - Expect.isTrue((-12.0).isNegative); - Expect.isFalse((double.nan).isNegative); - Expect.isFalse((0.0).isNegative); - Expect.isTrue((-0.0).isNegative); - Expect.isFalse((double.infinity).isNegative); - Expect.isTrue((double.negativeInfinity).isNegative); -} - -testIsNaN() { - Expect.isFalse((1.0).isNaN); - Expect.isTrue((double.nan).isNaN); -} - -testTrigonometric() { - Expect.approxEquals(1.0, sin(pi / 2.0), 0.0001); - Expect.approxEquals(1.0, cos(0), 0.0001); - Expect.approxEquals(1.0, cos(0.0), 0.0001); -} - -num foo(int n) { - var x; - for (var i = 0; i <= n; ++i) { - Expect.equals(2.0, sqrt(4.0)); - testIsNegative(); - testIsNaN(); - testTrigonometric(); - } - return x; -} - -void main() { - var m = foo(4000); -} diff --git a/tests/language_2/unsorted/inv_cse_licm_test.dart b/tests/language_2/unsorted/inv_cse_licm_test.dart deleted file mode 100644 index dc19fcd2ef3..00000000000 --- a/tests/language_2/unsorted/inv_cse_licm_test.dart +++ /dev/null @@ -1,501 +0,0 @@ -// 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. - -// @dart = 2.9 - -// VMOptions=--deterministic --optimization_counter_threshold=10 - -import 'dart:typed_data'; -import "package:expect/expect.dart"; - -// Tests a few situations in which invariant instructions -// can be subject to CSE and LICM. - -@pragma('vm:never-inline') -int cse1(Int32List a, int n) { - int x = a[0]; - for (int i = 0; i < n; i++) { - // The a[0] null check, bounds check, and the actual load can be - // CSEed with the instructions above even if loop is not taken. - x += a[0] * a[i]; - } - return x; -} - -@pragma('vm:never-inline') -int cse2(Int32List a, int n) { - int x = a[0]; - for (int i = 0; i < n; i++) { - // The a[0] null check, bounds check, but not the actual load can be - // CSEed with the instructions above, since the value of the load - // changes in the loop. - a[i] = a[0] + 1; - } - return x; -} - -@pragma('vm:never-inline') -int licm1(Int32List a, int n) { - int x = 0; - for (int i = 0; i < n; i++) { - // The a[0] null check, bounds check, and the actual load cannot - // be LICMed, since the loop may be non-taken. - x += a[0] * a[i]; - } - return x; -} - -@pragma('vm:never-inline') -int licm2(Int32List a) { - int x = 0; - for (int i = 0; i < 16; i++) { - // The a[0] null check, bounds check, and the actual load can be - // LICMed, since the loop is always-taken. - x += a[0] * a[i]; - } - return x; -} - -@pragma('vm:never-inline') -int licm3(Int32List a, bool cond) { - int x = 0; - for (int i = 0; i < 16; i++) { - // The a[0] null check, bounds check, and the actual load cannot - // be LICMed, since the condition may be non-taken (and we don't - // hoist invariant conditions). - if (cond) x += a[0] * a[i]; - } - return x; -} - -@pragma('vm:never-inline') -int licm3_brk(Int32List a, bool cond) { - int x = 0; - for (int i = 0; i < 16; i++) { - // The a[0] null check, bounds check, and the actual load cannot - // be LICMed, since the condition may be taken (and we don't - // hoist invariant conditions). - if (cond) break; - x += a[0] * a[i]; - } - return x; -} - -int global; - -@pragma('vm:never-inline') -int licm4(Int32List a) { - int x = 0; - for (int i = 0; i < 16; i++) { - // The a[0] null check, bounds check, and the actual load cannot - // be LICMed, since something visible happens before an exception - // may be thrown. - global++; - x += a[0] * a[i]; - } - return x; -} - -@pragma('vm:never-inline') -int licm5(Int32List a) { - int x = 0; - // Anything in the loop header can be LICMed. - for (int i = 0; i < a[1]; i++) { - x++; - } - return x; -} - -@pragma('vm:never-inline') -int licm6(Int32List a, int n) { - int x = 0; - int i = 0; - do { - // The a[0] null check, bounds check, and the actual load can be - // LICMed, since this "header" is always-taken. - x += a[0] * a[i++]; - } while (i < n); - return x; -} - -@pragma('vm:never-inline') -int licm7(Int32List a, int n) { - int x = 0; - int i = 0; - while (true) { - // The a[0] null check, bounds check, and the actual load can be - // LICMed, since this "header" is always-taken. - x += a[0] * a[i++]; - if (i >= n) break; - } - return x; -} - -@pragma('vm:never-inline') -int licm8(Int32List a, int n) { - int x = 0; - int i = 0; - while (true) { - if (i >= n) break; - // No LICM at this point, loop body may not be taken. - x += a[0] * a[i++]; - } - return x; -} - -@pragma('vm:never-inline') -int licm9(Int32List a) { - int x = 0; - int i = 0; - while (true) { - if (i >= 16) break; - // The a[0] null check, bounds check, and the actual load can be - // LICMed, since the loop is always-taken. - x += a[0] * a[i++]; - } - return x; -} - -@pragma('vm:never-inline') -int licm10(Int32List a, bool cond) { - int x = 0; - int i = 0; - while (true) { - if (i >= 16) break; - // The a[0] null check, bounds check, and the actual load cannot - // be LICMed, since the condition may be non-taken (and we don't - // hoist invariant conditions). - if (cond) x += a[0] * a[i]; - i++; - } - return x; -} - -@pragma('vm:never-inline') -int licm10_brk(Int32List a, bool cond) { - int x = 0; - int i = 0; - while (true) { - if (i >= 16) break; - // The a[0] null check, bounds check, and the actual load cannot - // be LICMed, since the condition may be taken (and we don't - // hoist invariant conditions). - if (cond) break; - x += a[0] * a[i++]; - } - return x; -} - -@pragma('vm:never-inline') -int licm11(Int32List a) { - int x = 0; - while (true) { - // Anything in the loop header can be LICMed. - if (x > a[1]) break; - x++; - } - return x; -} - -@pragma('vm:never-inline') -int foo() { - return global--; -} - -@pragma('vm:never-inline') -int licm12(Int32List a) { - int x = 0; - int i = 0; - // Side-effect loop bound. - for (int i = 0; i < foo(); i++) { - x += a[0] * a[i++]; - } - return x; -} - -doTests() { - var x = new Int32List(0); - var a = new Int32List(16); - for (int i = 0; i < 16; i++) { - a[i] = i + 1; - } - - Expect.throws(() { - cse1(null, 0); - }, (e) { - return e is NoSuchMethodError; - }); - Expect.throws(() { - cse1(null, 1); - }, (e) { - return e is NoSuchMethodError; - }); - Expect.throws(() { - cse1(x, 0); - }, (e) { - return e is RangeError; - }); - Expect.throws(() { - cse1(x, 1); - }, (e) { - return e is RangeError; - }); - Expect.equals(1, cse1(a, 0)); - Expect.equals(137, cse1(a, 16)); - - Expect.throws(() { - cse2(null, 0); - }, (e) { - return e is NoSuchMethodError; - }); - Expect.throws(() { - cse2(null, 1); - }, (e) { - return e is NoSuchMethodError; - }); - Expect.throws(() { - cse2(x, 0); - }, (e) { - return e is RangeError; - }); - Expect.throws(() { - cse2(x, 1); - }, (e) { - return e is RangeError; - }); - Expect.equals(1, cse2(a, 0)); - Expect.equals(1, cse2(a, 16)); - Expect.equals(2, a[0]); - for (int i = 1; i < 16; i++) { - Expect.equals(3, a[i]); - } - - Expect.equals(0, licm1(null, 0)); - Expect.throws(() { - licm1(null, 1); - }, (e) { - return e is NoSuchMethodError; - }); - Expect.equals(0, licm1(x, 0)); - Expect.throws(() { - licm1(x, 1); - }, (e) { - return e is RangeError; - }); - Expect.equals(0, licm1(a, 0)); - Expect.equals(94, licm1(a, 16)); - - Expect.throws(() { - licm2(null); - }, (e) { - return e is NoSuchMethodError; - }); - Expect.throws(() { - licm2(x); - }, (e) { - return e is RangeError; - }); - Expect.equals(94, licm2(a)); - - Expect.equals(0, licm3(null, false)); - Expect.throws(() { - licm3(null, true); - }, (e) { - return e is NoSuchMethodError; - }); - Expect.equals(0, licm3(x, false)); - Expect.throws(() { - licm3(x, true); - }, (e) { - return e is RangeError; - }); - Expect.equals(0, licm3(a, false)); - Expect.equals(94, licm3(a, true)); - - Expect.equals(0, licm3_brk(null, true)); - Expect.throws(() { - licm3_brk(null, false); - }, (e) { - return e is NoSuchMethodError; - }); - Expect.equals(0, licm3_brk(x, true)); - Expect.throws(() { - licm3_brk(x, false); - }, (e) { - return e is RangeError; - }); - Expect.equals(0, licm3_brk(a, true)); - Expect.equals(94, licm3_brk(a, false)); - - global = 0; - Expect.throws(() { - licm4(null); - }, (e) { - return e is NoSuchMethodError; - }); - Expect.equals(1, global); - Expect.throws(() { - licm4(x); - }, (e) { - return e is RangeError; - }); - Expect.equals(2, global); - Expect.equals(94, licm4(a)); - Expect.equals(18, global); - - Expect.throws(() { - licm5(null); - }, (e) { - return e is NoSuchMethodError; - }); - Expect.throws(() { - licm5(x); - }, (e) { - return e is RangeError; - }); - Expect.equals(3, licm5(a)); - - Expect.throws(() { - licm6(null, 0); - }, (e) { - return e is NoSuchMethodError; - }); - Expect.throws(() { - licm6(null, 1); - }, (e) { - return e is NoSuchMethodError; - }); - Expect.throws(() { - licm6(x, 0); - }, (e) { - return e is RangeError; - }); - Expect.throws(() { - licm6(x, 1); - }, (e) { - return e is RangeError; - }); - Expect.equals(4, licm6(a, 0)); - Expect.equals(94, licm6(a, 16)); - - Expect.throws(() { - licm7(null, 0); - }, (e) { - return e is NoSuchMethodError; - }); - Expect.throws(() { - licm7(null, 1); - }, (e) { - return e is NoSuchMethodError; - }); - Expect.throws(() { - licm7(x, 0); - }, (e) { - return e is RangeError; - }); - Expect.throws(() { - licm7(x, 1); - }, (e) { - return e is RangeError; - }); - Expect.equals(4, licm7(a, 0)); - Expect.equals(94, licm7(a, 16)); - - Expect.equals(0, licm8(null, 0)); - Expect.throws(() { - licm8(null, 1); - }, (e) { - return e is NoSuchMethodError; - }); - Expect.equals(0, licm8(x, 0)); - Expect.throws(() { - licm8(x, 1); - }, (e) { - return e is RangeError; - }); - Expect.equals(0, licm8(a, 0)); - Expect.equals(94, licm8(a, 16)); - - Expect.throws(() { - licm9(null); - }, (e) { - return e is NoSuchMethodError; - }); - Expect.throws(() { - licm9(x); - }, (e) { - return e is RangeError; - }); - Expect.equals(94, licm9(a)); - - Expect.equals(0, licm10(null, false)); - Expect.throws(() { - licm10(null, true); - }, (e) { - return e is NoSuchMethodError; - }); - Expect.equals(0, licm10(x, false)); - Expect.throws(() { - licm10(x, true); - }, (e) { - return e is RangeError; - }); - Expect.equals(0, licm10(a, false)); - Expect.equals(94, licm10(a, true)); - - Expect.equals(0, licm10_brk(null, true)); - Expect.throws(() { - licm10_brk(null, false); - }, (e) { - return e is NoSuchMethodError; - }); - Expect.equals(0, licm10_brk(x, true)); - Expect.throws(() { - licm10_brk(x, false); - }, (e) { - return e is RangeError; - }); - Expect.equals(0, licm10_brk(a, true)); - Expect.equals(94, licm10_brk(a, false)); - - Expect.throws(() { - licm11(null); - }, (e) { - return e is NoSuchMethodError; - }); - Expect.throws(() { - licm11(x); - }, (e) { - return e is RangeError; - }); - Expect.equals(4, licm11(a)); - - global = 0; - Expect.equals(0, licm12(null)); - Expect.equals(-1, global); - Expect.equals(0, licm12(x)); - Expect.equals(-2, global); - global = 16; - Expect.throws(() { - licm12(null); - }, (e) { - return e is NoSuchMethodError; - }); - Expect.equals(15, global); - Expect.throws(() { - licm12(x); - }, (e) { - return e is RangeError; - }); - Expect.equals(14, global); - Expect.equals(28, licm12(a)); - Expect.equals(8, global); -} - -main() { - // Repeat to enter JIT (when applicable). - for (int i = 0; i < 20; i++) { - doTests(); - } -} diff --git a/tests/language_2/unsorted/invalid_cast_runtime_1_test.dart b/tests/language_2/unsorted/invalid_cast_runtime_1_test.dart deleted file mode 100644 index 9a4e555ec14..00000000000 --- a/tests/language_2/unsorted/invalid_cast_runtime_1_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -class C { - C(); - factory C.fact() => null; - factory C.fact2() = D; - C.nonFact(); - C.nonFact2() : this.nonFact(); - static void staticFunction(int i) {} -} - -class D extends C {} - -void topLevelFunction(int i) {} - -test() { - void localFunction(int i) {} - - - - - D e = new C.fact(); - - - - - - -} - -main() {} diff --git a/tests/language_2/unsorted/invalid_cast_runtime_2_test.dart b/tests/language_2/unsorted/invalid_cast_runtime_2_test.dart deleted file mode 100644 index 15a0b7711ab..00000000000 --- a/tests/language_2/unsorted/invalid_cast_runtime_2_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -class C { - C(); - factory C.fact() => null; - factory C.fact2() = D; - C.nonFact(); - C.nonFact2() : this.nonFact(); - static void staticFunction(int i) {} -} - -class D extends C {} - -void topLevelFunction(int i) {} - -test() { - void localFunction(int i) {} - - - - - - D f = new C.fact2(); - - - - - -} - -main() {} diff --git a/tests/language_2/unsorted/invalid_cast_runtime_test.dart b/tests/language_2/unsorted/invalid_cast_runtime_test.dart deleted file mode 100644 index b94e73466fc..00000000000 --- a/tests/language_2/unsorted/invalid_cast_runtime_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -class C { - C(); - factory C.fact() => null; - factory C.fact2() = D; - C.nonFact(); - C.nonFact2() : this.nonFact(); - static void staticFunction(int i) {} -} - -class D extends C {} - -void topLevelFunction(int i) {} - -test() { - void localFunction(int i) {} - - - - - - - - - - - -} - -main() {} diff --git a/tests/language_2/unsorted/invalid_cast_test.dart b/tests/language_2/unsorted/invalid_cast_test.dart deleted file mode 100644 index ca0f164359b..00000000000 --- a/tests/language_2/unsorted/invalid_cast_test.dart +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2017, 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 - -class C { - C(); - factory C.fact() => null; - factory C.fact2() = D; - C.nonFact(); - C.nonFact2() : this.nonFact(); - static void staticFunction(int i) {} -} - -class D extends C {} - -void topLevelFunction(int i) {} - -test() { - void localFunction(int i) {} - List a = []; - // ^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CAST_LITERAL_LIST - // ^ - // [cfe] The list literal type 'List' isn't of expected type 'List'. - Map b = {}; - // ^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CAST_LITERAL_MAP - // ^ - // [cfe] The map literal type 'Map' isn't of expected type 'Map'. - Map c = {}; - // ^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CAST_LITERAL_MAP - // ^ - // [cfe] The map literal type 'Map' isn't of expected type 'Map'. - int Function(Object) d = (int i) => i; - // ^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CAST_FUNCTION_EXPR - // [cfe] The function expression type 'int Function(int)' isn't of expected type 'int Function(Object)'. - D e = new C.fact(); - D f = new C.fact2(); - D g = new C.nonFact(); - // ^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CAST_NEW_EXPR - // ^ - // [cfe] The constructor returns type 'C' that isn't of expected type 'D'. - D h = new C.nonFact2(); - // ^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CAST_NEW_EXPR - // ^ - // [cfe] The constructor returns type 'C' that isn't of expected type 'D'. - void Function(Object) i = C.staticFunction; - // ^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CAST_METHOD - // ^ - // [cfe] The static method has type 'void Function(int)' that isn't of expected type 'void Function(Object)'. - void Function(Object) j = topLevelFunction; - // ^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CAST_FUNCTION - // [cfe] The top level function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'. - void Function(Object) k = localFunction; - // ^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_CAST_FUNCTION - // [cfe] The local function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'. -} - -main() {} diff --git a/tests/language_2/unsorted/invalid_type_argument_count_runtime_test.dart b/tests/language_2/unsorted/invalid_type_argument_count_runtime_test.dart deleted file mode 100644 index ff5c8489e79..00000000000 --- a/tests/language_2/unsorted/invalid_type_argument_count_runtime_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -// Test top level field. -dynamic // Formatter shouldn't join this line. - - x1 = 42; - -class Foo { - // Test class member. - dynamic // Formatter shouldn't join this line. - - x2 = 42; - - Foo() { - print(x2); - } -} - -main() { - print(x1); - - new Foo(); - - // Test local variable. - dynamic // Formatter shouldn't join this line. - - x3 = 42; - print(x3); - - foo(42); -} - -// Test parameter. -void foo( - dynamic // Formatter shouldn't join this line. - - x4) { - print(x4); -} diff --git a/tests/language_2/unsorted/invalid_type_argument_count_test.dart b/tests/language_2/unsorted/invalid_type_argument_count_test.dart deleted file mode 100644 index 8cfb724a3b0..00000000000 --- a/tests/language_2/unsorted/invalid_type_argument_count_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test top level field. -dynamic x1 = 42; -// [error line 8, column 1, length 12] -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS -// [cfe] Expected 0 type arguments. - -class Foo { - // Test class member. - dynamic x2 = 42; -//^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS -// [cfe] Expected 0 type arguments. - - Foo() { - print(x2); - } -} - -main() { - print(x1); - - new Foo(); - - // Test local variable. - dynamic x3 = 42; -//^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS -// [cfe] Expected 0 type arguments. - print(x3); - - foo(42); -} - -// Test parameter. -void foo(dynamic x4) { -// ^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.WRONG_NUMBER_OF_TYPE_ARGUMENTS -// [cfe] Expected 0 type arguments. - print(x4); -} diff --git a/tests/language_2/unsorted/invocation_mirror2_test.dart b/tests/language_2/unsorted/invocation_mirror2_test.dart deleted file mode 100644 index e6c1a4262ff..00000000000 --- a/tests/language_2/unsorted/invocation_mirror2_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class C { - Invocation im; - noSuchMethod(im) => this.im = im; - flif() {} -} - -main() { - dynamic c = new C(); - c.flif = 42; - Expect.equals(const Symbol("flif="), c.im.memberName); - Expect.equals(42, c.im.positionalArguments[0]); -} diff --git a/tests/language_2/unsorted/invocation_mirror_empty_arguments_test.dart b/tests/language_2/unsorted/invocation_mirror_empty_arguments_test.dart deleted file mode 100644 index 485b1533a9e..00000000000 --- a/tests/language_2/unsorted/invocation_mirror_empty_arguments_test.dart +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -// Validates that positional arguments are an empty immutable list. -void expectEmptyPositionalArguments(Invocation invocation) { - Expect.isTrue(invocation.positionalArguments.isEmpty); - Expect.throwsUnsupportedError(() => invocation.positionalArguments.clear()); -} - -// Validates that positional arguments are an empty immutable map. -void expectEmptyNamedArguments(Invocation invocation) { - Expect.isTrue(invocation.namedArguments.isEmpty); - Expect.throwsUnsupportedError(() => invocation.namedArguments.clear()); -} - -class Getter { - get getterThatDoesNotExist; - - noSuchMethod(invocation) { - Expect.isTrue(invocation.isGetter); - expectEmptyPositionalArguments(invocation); - expectEmptyNamedArguments(invocation); - } -} - -class Setter { - set setterThatDoesNotExist(value); - - noSuchMethod(invocation) { - Expect.isTrue(invocation.isSetter); - expectEmptyNamedArguments(invocation); - } -} - -class Method { - methodThatDoesNotExist(); - - noSuchMethod(invocation) { - Expect.isTrue(invocation.isMethod); - expectEmptyPositionalArguments(invocation); - expectEmptyNamedArguments(invocation); - } -} - -class Operator { - operator +(other); - - noSuchMethod(invocation) { - Expect.isTrue(invocation.isMethod); - expectEmptyNamedArguments(invocation); - } -} - -main() { - var g = new Getter(); - print(g.getterThatDoesNotExist); - var s = new Setter(); - print(s.setterThatDoesNotExist = 42); - var m = new Method(); - print(m.methodThatDoesNotExist()); - var o = new Operator(); - print(o + 42); // Operator that does not exist. -} diff --git a/tests/language_2/unsorted/invocation_mirror_test.dart b/tests/language_2/unsorted/invocation_mirror_test.dart deleted file mode 100644 index 4addddba484..00000000000 --- a/tests/language_2/unsorted/invocation_mirror_test.dart +++ /dev/null @@ -1,319 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Invocation and noSuchMethod testing. - -Map listToNamedArguments(list) { - var iterator = list.iterator; - var result = new Map(); - while (iterator.moveNext()) { - Symbol key = iterator.current; - Expect.isTrue(iterator.moveNext()); - result[key] = iterator.current; - } - return result; -} - -/** Class with noSuchMethod that returns the mirror */ -class N { - // Storage for the last argument to noSuchMethod. - // Needed for setters, which don't evaluate to the return value. - var last; - noSuchMethod(Invocation m) => last = m; - - flif(int x) { - Expect.fail("never get here"); - } - - flaf([int x]) { - Expect.fail("never get here"); - } - - flof({int y}) { - Expect.fail("never get here"); - } - - get wut => this; - final int plif = 99; - int get plaf { - Expect.fail("never get here"); - return 0; - } -} - -/** As [N] but also implements 'call', so we can call it with wrong arguments.*/ -class C extends N { - call(int x) { - Expect.fail("never get here"); - } -} - -/** - * Checks the data of an Invocation. - * - * Call without optionals for getters, with only positional for setters, - * and with both optionals for everything else. - */ -testInvocationMirror(Invocation im, Symbol name, - [List positional, List named, List typeArgs]) { - Expect.isTrue(im is Invocation, "is Invocation"); - Expect.equals(name, im.memberName, "name"); - if (named == null) { - Expect.isTrue(im.isAccessor, "$name:isAccessor"); - Expect.isFalse(im.isMethod, "$name:isMethod"); - if (positional == null) { - Expect.isTrue(im.isGetter, "$name:isGetter"); - Expect.isFalse(im.isSetter, "$name:isSetter"); - Expect.equals(0, im.positionalArguments.length, "$name:#positional"); - Expect.equals(0, im.namedArguments.length, "$name:#named"); - return; - } - Expect.isTrue(im.isSetter, "$name:isSetter"); - Expect.isFalse(im.isGetter, "$name:isGetter"); - Expect.equals(1, im.positionalArguments.length, "$name:#positional"); - Expect.equals( - positional[0], im.positionalArguments[0], "$name:positional[0]"); - Expect.equals(0, im.namedArguments.length, "$name:#named"); - return; - } - Map namedArguments = listToNamedArguments(named); - Expect.isTrue(im.isMethod, "$name:isMethod"); - Expect.isFalse(im.isAccessor, "$name:isAccessor"); - Expect.isFalse(im.isSetter, "$name:isSetter"); - Expect.isFalse(im.isGetter, "$name:isGetter"); - - Expect.listEquals(positional, im.positionalArguments); - - Expect.equals( - namedArguments.length, im.namedArguments.length, "$name:#named"); - namedArguments.forEach((k, v) { - Expect.isTrue( - im.namedArguments.containsKey(k), "$name:?namedArguments[$k]"); - Expect.equals(v, im.namedArguments[k], "$name:namedArguments[$k]"); - }); - var imTypeArgs = (im as dynamic).typeArguments as List; - Expect.listEquals(typeArgs ?? [], imTypeArgs); -} - -// Test different ways that noSuchMethod can be called. -testInvocationMirrors() { - dynamic n = new N(); - dynamic c = new C(); - - // Missing property/method access. - testInvocationMirror(n.bar, const Symbol('bar')); - testInvocationMirror((n..bar = 42).last, const Symbol('bar='), [42]); - testInvocationMirror(n.bar(), const Symbol('bar'), [], []); - testInvocationMirror(n.bar(42), const Symbol('bar'), [42], []); - testInvocationMirror( - n.bar(x: 42), const Symbol('bar'), [], [const Symbol("x"), 42]); - testInvocationMirror( - n.bar(37, x: 42), const Symbol('bar'), [37], [const Symbol("x"), 42]); - - // Missing operator access. - testInvocationMirror(n + 4, const Symbol('+'), [4], []); - testInvocationMirror(n - 4, const Symbol('-'), [4], []); - testInvocationMirror(-n, const Symbol('unary-'), [], []); - testInvocationMirror(n[42], const Symbol('[]'), [42], []); - testInvocationMirror((n..[37] = 42).last, const Symbol('[]='), [37, 42], []); - - // Calling as function when it's not. - testInvocationMirror(n(), const Symbol('call'), [], []); - testInvocationMirror(n(42), const Symbol('call'), [42], []); - testInvocationMirror( - n(x: 42), const Symbol('call'), [], [const Symbol("x"), 42]); - testInvocationMirror( - n(37, x: 42), const Symbol('call'), [37], [const Symbol("x"), 42]); - - // Calling with arguments not matching existing call method. - testInvocationMirror(c(), const Symbol('call'), [], []); - testInvocationMirror(c(37, 42), const Symbol('call'), [37, 42], []); - testInvocationMirror( - c(x: 42), const Symbol('call'), [], [const Symbol("x"), 42]); - testInvocationMirror( - c(37, x: 42), const Symbol('call'), [37], [const Symbol("x"), 42]); - - // Wrong arguments to existing function. - testInvocationMirror(n.flif(), const Symbol("flif"), [], []); - testInvocationMirror(n.flif(37, 42), const Symbol("flif"), [37, 42], []); - testInvocationMirror( - n.flif(x: 42), const Symbol("flif"), [], [const Symbol("x"), 42]); - testInvocationMirror( - n.flif(37, x: 42), const Symbol("flif"), [37], [const Symbol("x"), 42]); - testInvocationMirror((n..flif = 42).last, const Symbol("flif="), [42]); - - testInvocationMirror(n.flaf(37, 42), const Symbol("flaf"), [37, 42], []); - testInvocationMirror( - n.flaf(x: 42), const Symbol("flaf"), [], [const Symbol("x"), 42]); - testInvocationMirror( - n.flaf(37, x: 42), const Symbol("flaf"), [37], [const Symbol("x"), 42]); - testInvocationMirror((n..flaf = 42).last, const Symbol("flaf="), [42]); - - testInvocationMirror(n.flof(37, 42), const Symbol("flof"), [37, 42], []); - testInvocationMirror( - n.flof(x: 42), const Symbol("flof"), [], [const Symbol("x"), 42]); - testInvocationMirror( - n.flof(37, y: 42), const Symbol("flof"), [37], [const Symbol("y"), 42]); - testInvocationMirror((n..flof = 42).last, const Symbol("flof="), [42]); - - // Reading works. - Expect.isTrue(n.flif is Function); - Expect.isTrue(n.flaf is Function); - Expect.isTrue(n.flof is Function); - - // Writing to read-only fields. - testInvocationMirror((n..wut = 42).last, const Symbol("wut="), [42]); - testInvocationMirror((n..plif = 42).last, const Symbol("plif="), [42]); - testInvocationMirror((n..plaf = 42).last, const Symbol("plaf="), [42]); - - // Trick call to n.call - wut is a getter returning n again. - testInvocationMirror(n.wut(42), const Symbol("call"), [42], []); - - // Calling noSuchMethod itself, badly. - testInvocationMirror(n.noSuchMethod(), const Symbol("noSuchMethod"), [], []); - testInvocationMirror( - n.noSuchMethod(37, 42), const Symbol("noSuchMethod"), [37, 42], []); - testInvocationMirror(n.noSuchMethod(37, x: 42), const Symbol("noSuchMethod"), - [37], [const Symbol("x"), 42]); - testInvocationMirror(n.noSuchMethod(x: 42), const Symbol("noSuchMethod"), [], - [const Symbol("x"), 42]); - - // Closurizing a method means that calling it badly will not hit the - // original receivers noSuchMethod, only the one inherited from Object - // by the closure object. - Expect.throwsNoSuchMethodError(() { - var x = n.flif; - x(37, 42); - }); - Expect.throwsNoSuchMethodError(() { - var x = c.call; - x(37, 42); - }); -} - -class M extends N { - testSelfCalls() { - // Missing property/method access. - dynamic self = this; - testInvocationMirror(self.bar, const Symbol('bar')); - testInvocationMirror(() { - self.bar = 42; - return last; - }(), const Symbol('bar='), [42]); - testInvocationMirror(self.bar(), const Symbol('bar'), [], []); - testInvocationMirror(self.bar(42), const Symbol('bar'), [42], []); - testInvocationMirror( - self.bar(x: 42), const Symbol('bar'), [], [const Symbol("x"), 42]); - testInvocationMirror(self.bar(37, x: 42), const Symbol('bar'), [37], - [const Symbol("x"), 42]); - - // Missing operator access. - testInvocationMirror(self + 4, const Symbol('+'), [4], []); - testInvocationMirror(self - 4, const Symbol('-'), [4], []); - testInvocationMirror(-self, const Symbol('unary-'), [], []); - testInvocationMirror(self[42], const Symbol('[]'), [42], []); - testInvocationMirror(() { - self[37] = 42; - return last; - }(), const Symbol('[]='), [37, 42], []); - - // Wrong arguments to existing function. - testInvocationMirror(self.flif(), const Symbol("flif"), [], []); - testInvocationMirror(self.flif(37, 42), const Symbol("flif"), [37, 42], []); - testInvocationMirror( - self.flif(x: 42), const Symbol("flif"), [], [const Symbol("x"), 42]); - testInvocationMirror(self.flif(37, x: 42), const Symbol("flif"), [37], - [const Symbol("x"), 42]); - testInvocationMirror(() { - self.flif = 42; - return last; - }(), const Symbol("flif="), [42]); - - testInvocationMirror(self.flaf(37, 42), const Symbol("flaf"), [37, 42], []); - testInvocationMirror( - self.flaf(x: 42), const Symbol("flaf"), [], [const Symbol("x"), 42]); - testInvocationMirror(self.flaf(37, x: 42), const Symbol("flaf"), [37], - [const Symbol("x"), 42]); - testInvocationMirror(() { - self.flaf = 42; - return last; - }(), const Symbol("flaf="), [42]); - - testInvocationMirror(self.flof(37, 42), const Symbol("flof"), [37, 42], []); - testInvocationMirror( - self.flof(x: 42), const Symbol("flof"), [], [const Symbol("x"), 42]); - testInvocationMirror(self.flof(37, y: 42), const Symbol("flof"), [37], - [const Symbol("y"), 42]); - testInvocationMirror(() { - self.flof = 42; - return last; - }(), const Symbol("flof="), [42]); - - // Reading works. - Expect.isTrue(self.flif is Function); - Expect.isTrue(self.flaf is Function); - Expect.isTrue(self.flof is Function); - - // Writing to read-only fields. - testInvocationMirror(() { - self.wut = 42; - return last; - }(), const Symbol("wut="), [42]); - testInvocationMirror(() { - self.plif = 42; - return last; - }(), const Symbol("plif="), [42]); - testInvocationMirror(() { - self.plaf = 42; - return last; - }(), const Symbol("plaf="), [42]); - - // Calling noSuchMethod itself, badly. - testInvocationMirror( - self.noSuchMethod(), const Symbol("noSuchMethod"), [], []); - testInvocationMirror( - self.noSuchMethod(37, 42), const Symbol("noSuchMethod"), [37, 42], []); - testInvocationMirror(self.noSuchMethod(37, x: 42), - const Symbol("noSuchMethod"), [37], [const Symbol("x"), 42]); - testInvocationMirror(self.noSuchMethod(x: 42), const Symbol("noSuchMethod"), - [], [const Symbol("x"), 42]); - - // Closurizing a method means that calling it badly will not hit the - // original receivers noSuchMethod, only the one inherited from Object - // by the closure object. - Expect.throwsNoSuchMethodError(() { - var x = self.flif; - x(37, 42); - }); - } -} - -// Test the NoSuchMethodError thrown by different incorrect calls. -testNoSuchMethodErrors() { - dynamic n = new N(); - dynamic o = new Object(); - Expect.throwsNoSuchMethodError(() => o.bar); - Expect.throwsNoSuchMethodError(() => o.bar = 42); - Expect.throwsNoSuchMethodError(() => o.bar()); - Expect.throwsNoSuchMethodError(() => o + 2); - Expect.throwsNoSuchMethodError(() => -o); - Expect.throwsNoSuchMethodError(() => o[0]); - Expect.throwsNoSuchMethodError(() => o[0] = 42); - Expect.throwsNoSuchMethodError(() => o()); - Expect.throwsNoSuchMethodError(() => o.toString = 42); - Expect.throwsNoSuchMethodError(() => o.toString(42)); - Expect.throwsNoSuchMethodError(() => o.toString(x: 37)); - Expect.throwsNoSuchMethodError(() => o.hashCode = 42); - Expect.throwsNoSuchMethodError(() => (n.flif)()); // Extracted method has no noSuchMethod. -} - -main() { - testInvocationMirrors(); - testNoSuchMethodErrors(); - new M().testSelfCalls(); -} diff --git a/tests/language_2/unsorted/js_properties_test.dart b/tests/language_2/unsorted/js_properties_test.dart deleted file mode 100644 index 6139dff51e1..00000000000 --- a/tests/language_2/unsorted/js_properties_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2012, 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. -// Test that JavaScript properties on Object can still be classes in -// Dart. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -void main() { - Expect.equals(42, new __defineGetter__().hello()); - Expect.equals(42, new __defineSetter__().hello()); - Expect.equals(42, new __lookupGetter__().hello()); - Expect.equals(42, new __lookupSetter__().hello()); - Expect.equals(42, new constructor().hello()); - Expect.equals(42, new hasOwnProperty().hello()); - Expect.equals(42, new isPrototypeOf().hello()); - Expect.equals(42, new propertyIsEnumerable().hello()); - Expect.equals(42, new toLocaleString().hello()); - Expect.equals(42, new toString().hello()); - Expect.equals(42, new valueOf().hello()); -} - -class Hello { - int hello() => 42; -} - -class __defineGetter__ extends Hello {} - -class __defineSetter__ extends Hello {} - -class __lookupGetter__ extends Hello {} - -class __lookupSetter__ extends Hello {} - -class constructor extends Hello {} - -class hasOwnProperty extends Hello {} - -class isPrototypeOf extends Hello {} - -class propertyIsEnumerable extends Hello {} - -class toLocaleString extends Hello {} - -class toString extends Hello {} - -class valueOf extends Hello {} diff --git a/tests/language_2/unsorted/keyword_type_expression_test.dart b/tests/language_2/unsorted/keyword_type_expression_test.dart deleted file mode 100644 index e7ae957767b..00000000000 --- a/tests/language_2/unsorted/keyword_type_expression_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2014, 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 - -// Test that a keyword can't be used as type. Serves as regression test for -// crashes in dart2js. - -in greeting = "fisk"; // //# 01: syntax error - -main( -in greeting // //# 02: syntax error - ) { - in greeting = "fisk"; // //# 03: syntax error - print(greeting); // //# 01: continued -} diff --git a/tests/language_2/unsorted/large_implicit_getter_test.dart b/tests/language_2/unsorted/large_implicit_getter_test.dart deleted file mode 100644 index df69a05827f..00000000000 --- a/tests/language_2/unsorted/large_implicit_getter_test.dart +++ /dev/null @@ -1,1377 +0,0 @@ -// Copyright (c) 2013, 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 test program for testing compilation of large implicit getters. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -List panels = [ - [6853.940039224797, 6050.837897021371], - [6953.240039224797, 6050.837897021371], - [7052.5400392247975, 5885.237897021371], - [7052.5400392247975, 5719.637897021372], - [7151.840039224798, 5885.237897021371], - [7052.5400392247975, 6050.837897021371], - [7052.5400392247975, 6216.43789702137], - [7052.5400392247975, 6382.03789702137], - [6953.240039224797, 6382.03789702137], - [6953.240039224797, 6216.43789702137], - [6853.940039224797, 6216.43789702137], - [6853.940039224797, 6382.03789702137], - [6754.640039224797, 6216.43789702137], - [6754.640039224797, 6382.03789702137], - [6754.640039224797, 6547.637897021369], - [6754.640039224797, 6713.237897021369], - [6655.340039224797, 6713.237897021369], - [6754.640039224797, 6878.837897021368], - [6853.940039224797, 6713.237897021369], - [6853.940039224797, 6878.837897021368], - [6953.240039224797, 6713.237897021369], - [7052.5400392247975, 6547.637897021369], - [7151.840039224798, 6713.237897021369], - [7151.840039224798, 6547.637897021369], - [7151.840039224798, 6382.03789702137], - [7251.140039224798, 6547.637897021369], - [7251.140039224798, 6713.237897021369], - [7350.440039224798, 6878.837897021368], - [7449.740039224798, 6878.837897021368], - [7449.740039224798, 6713.237897021369], - [7549.040039224798, 6547.637897021369], - [7449.740039224798, 6382.03789702137], - [7449.740039224798, 6216.43789702137], - [7549.040039224798, 6050.837897021371], - [7648.340039224799, 6216.43789702137], - [7549.040039224798, 6382.03789702137], - [7648.340039224799, 6382.03789702137], - [7747.640039224799, 6216.43789702137], - [7846.940039224799, 6382.03789702137], - [7946.240039224799, 6382.03789702137], - [7946.240039224799, 6547.637897021369], - [7846.940039224799, 6713.237897021369], - [7946.240039224799, 6713.237897021369], - [8045.540039224799, 6547.637897021369], - [8045.540039224799, 6713.237897021369], - [7946.240039224799, 6878.837897021368], - [7946.240039224799, 7044.4378970213675], - [8045.540039224799, 7210.037897021367], - [8144.8400392247995, 7375.637897021366], - [8144.8400392247995, 7541.237897021366], - [8045.540039224799, 7375.637897021366], - [8144.8400392247995, 7210.037897021367], - [8045.540039224799, 7044.4378970213675], - [7946.240039224799, 7210.037897021367], - [7846.940039224799, 7210.037897021367], - [7946.240039224799, 7375.637897021366], - [8045.540039224799, 7541.237897021366], - [8144.8400392247995, 7706.837897021365], - [8244.1400392248, 7541.237897021366], - [8343.4400392248, 7541.237897021366], - [8343.4400392248, 7706.837897021365], - [8244.1400392248, 7706.837897021365], - [4735.523842661975, 3503.497768214323], - [4636.223842661975, 3337.897768214323], - [4536.923842661975, 3337.897768214323], - [4437.623842661975, 3172.2977682143232], - [4338.323842661975, 3172.2977682143232], - [4239.023842661974, 3172.2977682143232], - [4338.323842661975, 3006.6977682143233], - [4437.623842661975, 2841.0977682143234], - [4338.323842661975, 2675.4977682143235], - [4338.323842661975, 2509.8977682143236], - [4239.023842661974, 2675.4977682143235], - [4139.723842661974, 2509.8977682143236], - [4040.4238426619745, 2344.2977682143237], - [4139.723842661974, 2178.697768214324], - [4239.023842661974, 2178.697768214324], - [4139.723842661974, 2344.2977682143237], - [4040.4238426619745, 2178.697768214324], - [4139.723842661974, 2013.0977682143237], - [4139.723842661974, 1847.4977682143235], - [4239.023842661974, 2013.0977682143237], - [4239.023842661974, 1847.4977682143235], - [4338.323842661975, 1847.4977682143235], - [4437.623842661975, 1847.4977682143235], - [4536.923842661975, 1681.8977682143234], - [4437.623842661975, 1516.2977682143232], - [4536.923842661975, 1516.2977682143232], - [4536.923842661975, 1350.697768214323], - [4437.623842661975, 1350.697768214323], - [4536.923842661975, 1185.097768214323], - [4636.223842661975, 1019.497768214323], - [4536.923842661975, 853.897768214323], - [4636.223842661975, 853.897768214323], - [4735.523842661975, 688.2977682143231], - [4636.223842661975, 522.6977682143232], - [4636.223842661975, 357.09776821432325], - [4735.523842661975, 357.09776821432325], - [4735.523842661975, 522.6977682143232], - [4636.223842661975, 688.2977682143231], - [4735.523842661975, 853.897768214323], - [4834.8238426619755, 853.897768214323], - [4735.523842661975, 1019.497768214323], - [4735.523842661975, 1185.097768214323], - [4735.523842661975, 1350.697768214323], - [4834.8238426619755, 1516.2977682143232], - [4735.523842661975, 1516.2977682143232], - [4834.8238426619755, 1350.697768214323], - [4834.8238426619755, 1185.097768214323], - [4934.123842661976, 1350.697768214323], - [5033.423842661976, 1185.097768214323], - [5033.423842661976, 1019.497768214323], - [5033.423842661976, 853.897768214323], - [4934.123842661976, 853.897768214323], - [4934.123842661976, 1019.497768214323], - [4834.8238426619755, 1019.497768214323], - [4934.123842661976, 1185.097768214323], - [5033.423842661976, 1350.697768214323], - [5132.723842661976, 1350.697768214323], - [5132.723842661976, 1185.097768214323], - [5232.023842661976, 1019.497768214323], - [5232.023842661976, 1185.097768214323], - [5331.323842661976, 1019.497768214323], - [5430.623842661977, 1019.497768214323], - [5529.923842661977, 1185.097768214323], - [5430.623842661977, 1350.697768214323], - [5430.623842661977, 1516.2977682143232], - [5529.923842661977, 1350.697768214323], - [5629.223842661977, 1350.697768214323], - [5728.523842661977, 1350.697768214323], - [5728.523842661977, 1516.2977682143232], - [5728.523842661977, 1681.8977682143234], - [5629.223842661977, 1516.2977682143232], - [5529.923842661977, 1516.2977682143232], - [5629.223842661977, 1681.8977682143234], - [5529.923842661977, 1681.8977682143234], - [5430.623842661977, 1847.4977682143235], - [5331.323842661976, 1847.4977682143235], - [5331.323842661976, 2013.0977682143237], - [5232.023842661976, 2178.697768214324], - [5132.723842661976, 2013.0977682143237], - [5132.723842661976, 2178.697768214324], - [5232.023842661976, 2013.0977682143237], - [5232.023842661976, 1847.4977682143235], - [5232.023842661976, 1681.8977682143234], - [5331.323842661976, 1681.8977682143234], - [5331.323842661976, 1516.2977682143232], - [5331.323842661976, 1350.697768214323], - [5232.023842661976, 1350.697768214323], - [5232.023842661976, 1516.2977682143232], - [5132.723842661976, 1516.2977682143232], - [5132.723842661976, 1681.8977682143234], - [5033.423842661976, 1847.4977682143235], - [5132.723842661976, 1847.4977682143235], - [5033.423842661976, 2013.0977682143237], - [4934.123842661976, 2178.697768214324], - [5033.423842661976, 2344.2977682143237], - [4934.123842661976, 2344.2977682143237], - [4834.8238426619755, 2178.697768214324], - [4834.8238426619755, 2344.2977682143237], - [4735.523842661975, 2344.2977682143237], - [4636.223842661975, 2344.2977682143237], - [4536.923842661975, 2178.697768214324], - [4437.623842661975, 2013.0977682143237], - [4338.323842661975, 2178.697768214324], - [4437.623842661975, 2344.2977682143237], - [4536.923842661975, 2509.8977682143236], - [4636.223842661975, 2675.4977682143235], - [4636.223842661975, 2509.8977682143236], - [4536.923842661975, 2675.4977682143235], - [4636.223842661975, 2841.0977682143234], - [4536.923842661975, 2841.0977682143234], - [4636.223842661975, 3006.6977682143233], - [4735.523842661975, 3172.2977682143232], - [4834.8238426619755, 3006.6977682143233], - [4735.523842661975, 2841.0977682143234], - [4735.523842661975, 3006.6977682143233], - [4636.223842661975, 3172.2977682143232], - [4735.523842661975, 3337.897768214323], - [4834.8238426619755, 3503.497768214323], - [4735.523842661975, 3669.097768214323], - [4834.8238426619755, 3834.697768214323], - [4834.8238426619755, 3669.097768214323], - [4934.123842661976, 3503.497768214323], - [5033.423842661976, 3503.497768214323], - [5033.423842661976, 3337.897768214323], - [4934.123842661976, 3337.897768214323], - [4834.8238426619755, 3172.2977682143232], - [4834.8238426619755, 3337.897768214323], - [4934.123842661976, 3172.2977682143232], - [5033.423842661976, 3006.6977682143233], - [5132.723842661976, 2841.0977682143234], - [5132.723842661976, 3006.6977682143233], - [5232.023842661976, 3172.2977682143232], - [5232.023842661976, 3337.897768214323], - [5132.723842661976, 3337.897768214323], - [5232.023842661976, 3503.497768214323], - [5331.323842661976, 3337.897768214323], - [5331.323842661976, 3503.497768214323], - [5430.623842661977, 3669.097768214323], - [5331.323842661976, 3669.097768214323], - [5430.623842661977, 3503.497768214323], - [5430.623842661977, 3337.897768214323], - [5529.923842661977, 3172.2977682143232], - [5529.923842661977, 3337.897768214323], - [5629.223842661977, 3337.897768214323], - [5728.523842661977, 3337.897768214323], - [5728.523842661977, 3503.497768214323], - [5827.823842661977, 3503.497768214323], - [5927.1238426619775, 3669.097768214323], - [6026.423842661978, 3669.097768214323], - [6125.723842661978, 3503.497768214323], - [6125.723842661978, 3669.097768214323], - [6225.023842661978, 3503.497768214323], - [6225.023842661978, 3337.897768214323], - [6324.323842661978, 3337.897768214323], - [6423.623842661978, 3503.497768214323], - [6324.323842661978, 3669.097768214323], - [6225.023842661978, 3669.097768214323], - [6324.323842661978, 3834.697768214323], - [6423.623842661978, 3834.697768214323], - [6324.323842661978, 4000.297768214323], - [6225.023842661978, 3834.697768214323], - [6125.723842661978, 3834.697768214323], - [6125.723842661978, 4000.297768214323], - [6225.023842661978, 4000.297768214323], - [6225.023842661978, 4165.897768214322], - [6225.023842661978, 4331.497768214322], - [6125.723842661978, 4165.897768214322], - [6026.423842661978, 4000.2977682143223], - [5927.1238426619775, 4165.897768214322], - [6026.423842661978, 4331.497768214322], - [6026.423842661978, 4497.097768214321], - [5927.1238426619775, 4497.097768214321], - [5827.823842661977, 4662.697768214321], - [5728.523842661977, 4828.29776821432], - [5827.823842661977, 4828.29776821432], - [5927.1238426619775, 4828.29776821432], - [5927.1238426619775, 4662.697768214321], - [5827.823842661977, 4497.097768214321], - [5927.1238426619775, 4331.497768214322], - [5827.823842661977, 4165.897768214322], - [5728.523842661977, 4331.497768214322], - [5728.523842661977, 4165.897768214322], - [5629.223842661977, 4000.2977682143223], - [5629.223842661977, 3834.6977682143224], - [5529.923842661977, 3669.0977682143225], - [5629.223842661977, 3503.4977682143226], - [5728.523842661977, 3669.0977682143225], - [5827.823842661977, 3669.0977682143225], - [5927.1238426619775, 3834.6977682143224], - [5927.1238426619775, 4000.2977682143223], - [6026.423842661978, 4165.897768214322], - [6125.723842661978, 4331.497768214322], - [6225.023842661978, 4497.097768214321], - [6225.023842661978, 4662.697768214321], - [6324.323842661978, 4662.697768214321], - [6225.023842661978, 4828.29776821432], - [6324.323842661978, 4828.29776821432], - [6423.623842661978, 4828.29776821432], - [6324.323842661978, 4993.8977682143195], - [6225.023842661978, 5159.497768214319], - [6125.723842661978, 5159.497768214319], - [6026.423842661978, 5325.097768214318], - [5927.1238426619775, 5490.697768214318], - [6026.423842661978, 5656.297768214317], - [5927.1238426619775, 5821.897768214317], - [5927.1238426619775, 5987.497768214316], - [6026.423842661978, 5987.497768214316], - [6026.423842661978, 5821.897768214317], - [5927.1238426619775, 5656.297768214317], - [5827.823842661977, 5656.297768214317], - [5827.823842661977, 5490.697768214318], - [5728.523842661977, 5490.697768214318], - [5629.223842661977, 5325.097768214318], - [5629.223842661977, 5159.497768214319], - [5529.923842661977, 4993.8977682143195], - [5529.923842661977, 5159.497768214319], - [5629.223842661977, 4993.8977682143195], - [5629.223842661977, 4828.29776821432], - [5529.923842661977, 4662.697768214321], - [5430.623842661977, 4828.29776821432], - [5529.923842661977, 4828.29776821432], - [5629.223842661977, 4662.697768214321], - [5728.523842661977, 4662.697768214321], - [5629.223842661977, 4497.097768214321], - [5728.523842661977, 4497.097768214321], - [5827.823842661977, 4331.497768214322], - [10216.161365168813, 2951.605409896135], - [10116.861365168812, 2951.605409896135], - [10017.56136516881, 3117.205409896135], - [9918.26136516881, 3117.205409896135], - [9818.961365168809, 3117.205409896135], - [9719.661365168808, 3282.8054098961347], - [9620.361365168807, 3282.8054098961347], - [9620.361365168807, 3117.205409896135], - [9521.061365168805, 2951.605409896135], - [9521.061365168805, 2786.005409896135], - [9620.361365168807, 2786.005409896135], - [9719.661365168808, 2786.005409896135], - [9818.961365168809, 2620.405409896135], - [9918.26136516881, 2786.005409896135], - [9818.961365168809, 2951.605409896135], - [9818.961365168809, 2786.005409896135], - [9719.661365168808, 2620.405409896135], - [9719.661365168808, 2454.805409896135], - [9620.361365168807, 2289.2054098961353], - [9521.061365168805, 2123.6054098961354], - [9620.361365168807, 1958.0054098961352], - [9719.661365168808, 2123.6054098961354], - [9818.961365168809, 2289.2054098961353], - [9818.961365168809, 2123.6054098961354], - [9818.961365168809, 1958.0054098961352], - [9719.661365168808, 1958.0054098961352], - [9620.361365168807, 1792.405409896135], - [9620.361365168807, 1626.805409896135], - [9521.061365168805, 1461.2054098961348], - [9421.761365168804, 1295.6054098961347], - [9521.061365168805, 1130.0054098961346], - [9521.061365168805, 964.4054098961345], - [9421.761365168804, 964.4054098961345], - [9521.061365168805, 798.8054098961346], - [9620.361365168807, 798.8054098961346], - [9620.361365168807, 964.4054098961345], - [9620.361365168807, 1130.0054098961346], - [9620.361365168807, 1295.6054098961347], - [9620.361365168807, 1461.2054098961348], - [9719.661365168808, 1295.6054098961347], - [9818.961365168809, 1130.0054098961346], - [9918.26136516881, 964.4054098961345], - [9818.961365168809, 964.4054098961345], - [9918.26136516881, 798.8054098961346], - [10017.56136516881, 633.2054098961347], - [9918.26136516881, 467.60540989613474], - [9918.26136516881, 302.0054098961348], - [10017.56136516881, 302.0054098961348], - [10116.861365168812, 136.40540989613478], - [10116.861365168812, 302.0054098961348], - [10116.861365168812, 467.60540989613474], - [10116.861365168812, 633.2054098961347], - [10216.161365168813, 633.2054098961347], - [10216.161365168813, 798.8054098961346], - [10315.461365168814, 633.2054098961347], - [10315.461365168814, 798.8054098961346], - [10414.761365168815, 798.8054098961346], - [10514.061365168816, 633.2054098961347], - [10514.061365168816, 798.8054098961346], - [10414.761365168815, 964.4054098961345], - [10315.461365168814, 964.4054098961345], - [10216.161365168813, 964.4054098961345], - [10116.861365168812, 798.8054098961346], - [10017.56136516881, 798.8054098961346], - [10116.861365168812, 964.4054098961345], - [10216.161365168813, 1130.0054098961346], - [10116.861365168812, 1130.0054098961346], - [10216.161365168813, 1295.6054098961347], - [10216.161365168813, 1461.2054098961348], - [10315.461365168814, 1626.805409896135], - [10315.461365168814, 1792.405409896135], - [10216.161365168813, 1958.0054098961352], - [10216.161365168813, 1792.405409896135], - [10116.861365168812, 1792.405409896135], - [10017.56136516881, 1958.0054098961352], - [9918.26136516881, 2123.6054098961354], - [9918.26136516881, 1958.0054098961352], - [10017.56136516881, 2123.6054098961354], - [10116.861365168812, 2123.6054098961354], - [10017.56136516881, 2289.2054098961353], - [10017.56136516881, 2454.805409896135], - [10116.861365168812, 2289.2054098961353], - [10216.161365168813, 2454.805409896135], - [10315.461365168814, 2620.405409896135], - [10315.461365168814, 2454.805409896135], - [10315.461365168814, 2289.2054098961353], - [10414.761365168815, 2454.805409896135], - [10514.061365168816, 2620.405409896135], - [10613.361365168817, 2786.005409896135], - [10514.061365168816, 2786.005409896135], - [10613.361365168817, 2620.405409896135], - [10514.061365168816, 2454.805409896135], - [10514.061365168816, 2289.2054098961353], - [10613.361365168817, 2289.2054098961353], - [10712.661365168819, 2289.2054098961353], - [10811.96136516882, 2454.805409896135], - [10911.26136516882, 2289.2054098961353], - [10811.96136516882, 2289.2054098961353], - [10712.661365168819, 2454.805409896135], - [10712.661365168819, 2620.405409896135], - [10811.96136516882, 2786.005409896135], - [10911.26136516882, 2620.405409896135], - [10911.26136516882, 2786.005409896135], - [11010.561365168822, 2620.405409896135], - [10911.26136516882, 2454.805409896135], - [10811.96136516882, 2620.405409896135], - [10712.661365168819, 2786.005409896135], - [10811.96136516882, 2951.605409896135], - [10911.26136516882, 2951.605409896135], - [10811.96136516882, 3117.205409896135], - [10712.661365168819, 2951.605409896135], - [10613.361365168817, 2951.605409896135], - [10514.061365168816, 2951.605409896135], - [10414.761365168815, 3117.205409896135], - [10414.761365168815, 2951.605409896135], - [10315.461365168814, 2786.005409896135], - [10216.161365168813, 2620.405409896135], - [10216.161365168813, 2786.005409896135], - [10315.461365168814, 2951.605409896135], - [10315.461365168814, 3117.205409896135], - [10216.161365168813, 3117.205409896135], - [10116.861365168812, 3117.205409896135], - [10017.56136516881, 3282.8054098961347], - [9918.26136516881, 3448.4054098961346], - [9818.961365168809, 3448.4054098961346], - [9818.961365168809, 3614.0054098961346], - [9719.661365168808, 3448.4054098961346], - [9818.961365168809, 3282.8054098961347], - [9719.661365168808, 3117.205409896135], - [9620.361365168807, 2951.605409896135], - [9521.061365168805, 3117.205409896135], - [9521.061365168805, 3282.8054098961347], - [9421.761365168804, 3117.205409896135], - [9421.761365168804, 3282.8054098961347], - [9322.461365168803, 3117.205409896135], - [9421.761365168804, 2951.605409896135], - [9322.461365168803, 2951.605409896135], - [9223.161365168802, 2786.005409896135], - [9322.461365168803, 2620.405409896135], - [9421.761365168804, 2454.805409896135], - [9521.061365168805, 2289.2054098961353], - [9421.761365168804, 2123.6054098961354], - [9421.761365168804, 1958.0054098961352], - [9421.761365168804, 1792.405409896135], - [9521.061365168805, 1626.805409896135], - [9421.761365168804, 1626.805409896135], - [9322.461365168803, 1792.405409896135], - [9322.461365168803, 1626.805409896135], - [9322.461365168803, 1461.2054098961348], - [9421.761365168804, 1461.2054098961348], - [9521.061365168805, 1295.6054098961347], - [9421.761365168804, 1130.0054098961346], - [9322.461365168803, 964.4054098961345], - [9223.161365168802, 964.4054098961345], - [9223.161365168802, 798.8054098961346], - [9322.461365168803, 633.2054098961347], - [9421.761365168804, 798.8054098961346], - [9421.761365168804, 633.2054098961347], - [9521.061365168805, 633.2054098961347], - [9421.761365168804, 467.60540989613474], - [9421.761365168804, 302.0054098961348], - [9322.461365168803, 136.40540989613478], - [9223.161365168802, 302.0054098961348], - [9123.861365168801, 302.0054098961348], - [9024.5613651688, 136.40540989613478], - [9123.861365168801, 136.40540989613478], - [9223.161365168802, 136.40540989613478], - [9322.461365168803, 302.0054098961348], - [9421.761365168804, 136.40540989613478], - [9521.061365168805, 136.40540989613478], - [9620.361365168807, 136.40540989613478], - [9620.361365168807, 302.0054098961348], - [9521.061365168805, 302.0054098961348], - [9521.061365168805, 467.60540989613474], - [9620.361365168807, 467.60540989613474], - [9719.661365168808, 302.0054098961348], - [9719.661365168808, 136.40540989613478], - [9818.961365168809, 136.40540989613478], - [9918.26136516881, 136.40540989613478], - [10017.56136516881, 136.40540989613478], - [366.07287160549004, 5394.185440937868], - [465.37287160549005, 5394.185440937868], - [465.37287160549005, 5559.785440937868], - [366.0728716054901, 5559.785440937868], - [366.0728716054901, 5725.385440937867], - [266.77287160549014, 5725.385440937867], - [167.47287160549016, 5559.785440937868], - [266.77287160549014, 5559.785440937868], - [266.77287160549014, 5394.185440937868], - [266.77287160549014, 5228.585440937869], - [167.47287160549016, 5394.185440937868], - [68.17287160549016, 5228.585440937869], - [167.47287160549013, 5062.9854409378695], - [68.17287160549013, 4897.38544093787], - [167.47287160549013, 4731.785440937871], - [266.77287160549014, 4731.785440937871], - [167.47287160549016, 4566.185440937871], - [68.17287160549016, 4566.185440937871], - [68.17287160549016, 4731.785440937871], - [167.47287160549013, 4897.38544093787], - [68.17287160549013, 5062.9854409378695], - [167.47287160549013, 5228.585440937869], - [266.77287160549014, 5062.9854409378695], - [366.0728716054901, 4897.38544093787], - [266.77287160549014, 4897.38544093787], - [366.0728716054901, 4731.785440937871], - [465.37287160549005, 4897.38544093787], - [366.0728716054901, 5062.9854409378695], - [465.37287160549005, 5062.9854409378695], - [366.0728716054901, 5228.585440937869], - [465.37287160549005, 5228.585440937869], - [564.6728716054901, 5394.185440937868], - [663.9728716054901, 5228.585440937869], - [564.6728716054901, 5062.9854409378695], - [663.9728716054901, 4897.38544093787], - [763.2728716054902, 4731.785440937871], - [862.5728716054903, 4566.185440937871], - [961.8728716054903, 4731.785440937871], - [862.5728716054903, 4731.785440937871], - [961.8728716054903, 4566.185440937871], - [862.5728716054903, 4400.585440937872], - [961.8728716054903, 4234.985440937872], - [1061.1728716054904, 4400.585440937872], - [1160.4728716054904, 4234.985440937872], - [1160.4728716054904, 4400.585440937872], - [1259.7728716054903, 4234.985440937872], - [1359.0728716054903, 4069.3854409378723], - [1458.3728716054902, 4069.3854409378723], - [1557.6728716054902, 4234.985440937872], - [1656.9728716054901, 4400.585440937872], - [1557.6728716054902, 4400.585440937872], - [1458.3728716054902, 4400.585440937872], - [1359.0728716054903, 4566.185440937871], - [1359.0728716054903, 4731.785440937871], - [1259.7728716054903, 4731.785440937871], - [1359.0728716054903, 4897.38544093787], - [1458.3728716054902, 4731.785440937871], - [1458.3728716054902, 4897.38544093787], - [1359.0728716054903, 5062.9854409378695], - [1259.7728716054903, 5228.585440937869], - [1259.7728716054903, 5062.9854409378695], - [1259.7728716054903, 4897.38544093787], - [1160.4728716054904, 5062.9854409378695], - [1160.4728716054904, 5228.585440937869], - [1061.1728716054904, 5228.585440937869], - [1061.1728716054904, 5062.9854409378695], - [961.8728716054903, 5228.585440937869], - [862.5728716054903, 5062.9854409378695], - [961.8728716054903, 5062.9854409378695], - [961.8728716054903, 4897.38544093787], - [1061.1728716054904, 4897.38544093787], - [1160.4728716054904, 4731.785440937871], - [1259.7728716054903, 4566.185440937871], - [1359.0728716054903, 4400.585440937872], - [1458.3728716054902, 4566.185440937871], - [1557.6728716054902, 4566.185440937871], - [1656.9728716054901, 4731.785440937871], - [1557.6728716054902, 4897.38544093787], - [1458.3728716054902, 5062.9854409378695], - [1557.6728716054902, 5228.585440937869], - [1656.9728716054901, 5062.9854409378695], - [1756.27287160549, 5062.9854409378695], - [1756.27287160549, 4897.38544093787], - [1855.57287160549, 5062.9854409378695], - [1954.87287160549, 4897.38544093787], - [2054.17287160549, 5062.9854409378695], - [1954.87287160549, 5062.9854409378695], - [2054.17287160549, 5228.585440937869], - [2153.4728716054897, 5228.585440937869], - [2252.7728716054894, 5062.9854409378695], - [2352.072871605489, 5228.585440937869], - [2451.372871605489, 5394.185440937868], - [2352.072871605489, 5394.185440937868], - [2252.7728716054894, 5228.585440937869], - [2153.4728716054897, 5062.9854409378695], - [2153.4728716054897, 4897.38544093787], - [2252.7728716054894, 4897.38544093787], - [2352.072871605489, 4731.785440937871], - [2252.7728716054894, 4731.785440937871], - [2153.4728716054897, 4731.785440937871], - [2054.17287160549, 4566.185440937871], - [1954.87287160549, 4731.785440937871], - [1855.57287160549, 4897.38544093787], - [1756.27287160549, 4731.785440937871], - [1855.57287160549, 4731.785440937871], - [1855.57287160549, 4566.185440937871], - [1756.27287160549, 4566.185440937871], - [1656.9728716054901, 4566.185440937871], - [1557.6728716054902, 4731.785440937871], - [1656.9728716054901, 4897.38544093787], - [1557.6728716054902, 5062.9854409378695], - [1458.3728716054902, 5228.585440937869], - [1359.0728716054903, 5228.585440937869], - [1259.7728716054903, 5394.185440937868], - [1259.7728716054903, 5559.785440937868], - [1160.4728716054904, 5559.785440937868], - [1061.1728716054904, 5559.785440937868], - [1160.4728716054904, 5725.385440937867], - [1259.7728716054903, 5725.385440937867], - [1359.0728716054903, 5559.785440937868], - [1458.3728716054902, 5725.385440937867], - [1458.3728716054902, 5559.785440937868], - [1359.0728716054903, 5725.385440937867], - [1259.7728716054903, 5890.985440937867], - [1359.0728716054903, 5890.985440937867], - [1259.7728716054903, 6056.585440937866], - [1359.0728716054903, 6222.185440937866], - [1458.3728716054902, 6222.185440937866], - [1458.3728716054902, 6387.785440937865], - [1557.6728716054902, 6222.185440937866], - [1557.6728716054902, 6387.785440937865], - [1656.9728716054901, 6222.185440937866], - [1756.27287160549, 6056.585440937866], - [1855.57287160549, 5890.985440937867], - [1756.27287160549, 5890.985440937867], - [1656.9728716054901, 6056.585440937866], - [1557.6728716054902, 5890.985440937867], - [1458.3728716054902, 5890.985440937867], - [1359.0728716054903, 6056.585440937866], - [1259.7728716054903, 6222.185440937866], - [1160.4728716054904, 6056.585440937866], - [1061.1728716054904, 5890.985440937867], - [1061.1728716054904, 6056.585440937866], - [1160.4728716054904, 6222.185440937866], - [1061.1728716054904, 6222.185440937866], - [961.8728716054903, 6222.185440937866], - [961.8728716054903, 6056.585440937866], - [961.8728716054903, 5890.985440937867], - [961.8728716054903, 5725.385440937867], - [862.5728716054903, 5559.785440937868], - [763.2728716054902, 5725.385440937867], - [862.5728716054903, 5725.385440937867], - [763.2728716054902, 5890.985440937867], - [663.9728716054901, 5725.385440937867], - [763.2728716054902, 5559.785440937868], - [763.2728716054902, 5394.185440937868], - [862.5728716054903, 5228.585440937869], - [961.8728716054903, 5394.185440937868], - [1061.1728716054904, 5394.185440937868], - [961.8728716054903, 5559.785440937868], - [862.5728716054903, 5394.185440937868], - [763.2728716054902, 5228.585440937869], - [663.9728716054901, 5062.9854409378695], - [763.2728716054902, 5062.9854409378695], - [763.2728716054902, 4897.38544093787], - [663.9728716054901, 4731.785440937871], - [564.6728716054901, 4731.785440937871], - [465.37287160549005, 4566.185440937871], - [366.0728716054901, 4566.185440937871], - [465.37287160549005, 4731.785440937871], - [564.6728716054901, 4566.185440937871], - [465.37287160549005, 4400.585440937872], - [366.0728716054901, 4400.585440937872], - [266.77287160549014, 4234.985440937872], - [167.47287160549016, 4234.985440937872], - [266.77287160549014, 4400.585440937872], - [266.77287160549014, 4566.185440937871], - [167.47287160549016, 4400.585440937872], - [68.17287160549016, 4234.985440937872], - [167.47287160549013, 4069.3854409378723], - [68.17287160549013, 3903.7854409378724], - [68.17287160549013, 4069.3854409378723], - [167.47287160549013, 3903.7854409378724], - [266.77287160549014, 3903.7854409378724], - [366.0728716054901, 3738.1854409378725], - [266.77287160549014, 3738.1854409378725], - [266.77287160549014, 3572.5854409378726], - [167.47287160549016, 3406.9854409378727], - [167.47287160549016, 3241.3854409378728], - [266.77287160549014, 3241.3854409378728], - [266.77287160549014, 3406.9854409378727], - [366.0728716054901, 3572.5854409378726], - [465.37287160549005, 3738.1854409378725], - [465.37287160549005, 3903.7854409378724], - [366.0728716054901, 4069.3854409378723], - [366.0728716054901, 4234.985440937872], - [465.37287160549005, 4234.985440937872], - [564.6728716054901, 4069.3854409378723], - [465.37287160549005, 4069.3854409378723], - [564.6728716054901, 4234.985440937872], - [663.9728716054901, 4069.3854409378723], - [663.9728716054901, 4234.985440937872], - [663.9728716054901, 4400.585440937872], - [763.2728716054902, 4566.185440937871], - [763.2728716054902, 4400.585440937872], - [663.9728716054901, 4566.185440937871], - [564.6728716054901, 4400.585440937872], - [19431.915041401327, 3495.506142643713], - [19332.61504140133, 3661.1061426437127], - [19431.915041401327, 3661.1061426437127], - [19531.215041401327, 3661.1061426437127], - [19630.515041401326, 3495.506142643713], - [19630.515041401326, 3661.1061426437127], - [19729.815041401325, 3826.7061426437126], - [19630.515041401326, 3826.7061426437126], - [19729.815041401325, 3992.3061426437125], - [19630.515041401326, 3992.3061426437125], - [19630.515041401326, 4157.906142643712], - [19630.515041401326, 4323.506142643711], - [19531.215041401327, 4157.906142643712], - [19431.915041401327, 4323.506142643711], - [19531.215041401327, 4489.106142643711], - [19431.915041401327, 4654.70614264371], - [19332.61504140133, 4654.70614264371], - [19332.61504140133, 4820.30614264371], - [19332.61504140133, 4985.906142643709], - [19233.31504140133, 4985.906142643709], - [19134.01504140133, 5151.506142643709], - [19034.71504140133, 5151.506142643709], - [19134.01504140133, 5317.106142643708], - [19034.71504140133, 5317.106142643708], - [19034.71504140133, 5482.706142643708], - [18935.41504140133, 5648.306142643707], - [18836.115041401332, 5813.9061426437065], - [18836.115041401332, 5979.506142643706], - [18935.41504140133, 5979.506142643706], - [19034.71504140133, 6145.106142643705], - [19034.71504140133, 5979.506142643706], - [19034.71504140133, 5813.9061426437065], - [19134.01504140133, 5648.306142643707], - [19233.31504140133, 5648.306142643707], - [19134.01504140133, 5813.9061426437065], - [19134.01504140133, 5979.506142643706], - [19233.31504140133, 5813.9061426437065], - [19233.31504140133, 5979.506142643706], - [19332.61504140133, 6145.106142643705], - [19332.61504140133, 6310.706142643705], - [19233.31504140133, 6310.706142643705], - [19233.31504140133, 6476.306142643704], - [19332.61504140133, 6476.306142643704], - [19431.915041401327, 6641.906142643704], - [19332.61504140133, 6807.506142643703], - [19332.61504140133, 6641.906142643704], - [19431.915041401327, 6476.306142643704], - [19431.915041401327, 6310.706142643705], - [19531.215041401327, 6145.106142643705], - [19431.915041401327, 5979.506142643706], - [19431.915041401327, 6145.106142643705], - [19531.215041401327, 5979.506142643706], - [19630.515041401326, 5813.9061426437065], - [19630.515041401326, 5979.506142643706], - [19729.815041401325, 5813.9061426437065], - [19829.115041401325, 5979.506142643706], - [19729.815041401325, 5979.506142643706], - [19729.815041401325, 6145.106142643705], - [19729.815041401325, 6310.706142643705], - [19630.515041401326, 6476.306142643704], - [19729.815041401325, 6476.306142643704], - [19630.515041401326, 6310.706142643705], - [19531.215041401327, 6310.706142643705], - [19531.215041401327, 6476.306142643704], - [19630.515041401326, 6641.906142643704], - [19729.815041401325, 6807.506142643703], - [19829.115041401325, 6973.106142643703], - [19928.415041401324, 6973.106142643703], - [19928.415041401324, 7138.706142643702], - [20027.715041401323, 7138.706142643702], - [20027.715041401323, 7304.306142643702], - [19928.415041401324, 7304.306142643702], - [19829.115041401325, 7304.306142643702], - [19829.115041401325, 7469.906142643701], - [19928.415041401324, 7469.906142643701], - [19928.415041401324, 7635.5061426437005], - [19928.415041401324, 7801.1061426437], - [20027.715041401323, 7635.5061426437005], - [20027.715041401323, 7801.1061426437], - [20127.015041401322, 7801.1061426437], - [20226.31504140132, 7801.1061426437], - [20325.61504140132, 7801.1061426437], - [20226.31504140132, 7635.5061426437005], - [20226.31504140132, 7469.906142643701], - [20226.31504140132, 7304.306142643702], - [20127.015041401322, 7304.306142643702], - [20027.715041401323, 7469.906142643701], - [20127.015041401322, 7469.906142643701], - [20127.015041401322, 7635.5061426437005], - [2748.790306732237, 2362.9553147492866], - [2848.0903067322365, 2528.5553147492865], - [2748.790306732237, 2694.1553147492864], - [2649.490306732237, 2859.7553147492863], - [2748.790306732237, 3025.355314749286], - [2848.0903067322365, 2859.7553147492863], - [2848.0903067322365, 2694.1553147492864], - [2947.3903067322362, 2694.1553147492864], - [3046.690306732236, 2859.7553147492863], - [3145.9903067322357, 2694.1553147492864], - [3145.9903067322357, 2528.5553147492865], - [3046.690306732236, 2694.1553147492864], - [3145.9903067322357, 2859.7553147492863], - [3046.690306732236, 3025.355314749286], - [3145.9903067322357, 3025.355314749286], - [3245.2903067322354, 3190.955314749286], - [3245.2903067322354, 3356.555314749286], - [3344.590306732235, 3522.155314749286], - [3443.890306732235, 3356.555314749286], - [3543.1903067322346, 3356.555314749286], - [3642.4903067322343, 3190.955314749286], - [3741.790306732234, 3025.355314749286], - [3741.790306732234, 2859.7553147492863], - [3841.090306732234, 3025.355314749286], - [3841.090306732234, 3190.955314749286], - [3741.790306732234, 3190.955314749286], - [3642.4903067322343, 3025.355314749286], - [3543.1903067322346, 3025.355314749286], - [3543.1903067322346, 2859.7553147492863], - [3443.890306732235, 3025.355314749286], - [3443.890306732235, 3190.955314749286], - [3543.1903067322346, 3190.955314749286], - [3642.4903067322343, 3356.555314749286], - [3543.1903067322346, 3522.155314749286], - [3443.890306732235, 3687.755314749286], - [3443.890306732235, 3853.3553147492858], - [3344.590306732235, 3687.755314749286], - [3245.2903067322354, 3853.3553147492858], - [3245.2903067322354, 3687.755314749286], - [3145.9903067322357, 3687.755314749286], - [3046.690306732236, 3853.3553147492858], - [3145.9903067322357, 4018.9553147492857], - [3145.9903067322357, 3853.3553147492858], - [3046.690306732236, 3687.755314749286], - [3145.9903067322357, 3522.155314749286], - [3145.9903067322357, 3356.555314749286], - [3145.9903067322357, 3190.955314749286], - [3046.690306732236, 3190.955314749286], - [3046.690306732236, 3356.555314749286], - [2947.3903067322362, 3356.555314749286], - [2848.0903067322365, 3190.955314749286], - [2947.3903067322362, 3025.355314749286], - [2848.0903067322365, 3025.355314749286], - [2748.790306732237, 2859.7553147492863], - [2649.490306732237, 2694.1553147492864], - [2748.790306732237, 2528.5553147492865], - [2848.0903067322365, 2362.9553147492866], - [2748.790306732237, 2197.3553147492867], - [2649.490306732237, 2362.9553147492866], - [2649.490306732237, 2197.3553147492867], - [2550.1903067322373, 2362.9553147492866], - [2450.8903067322376, 2362.9553147492866], - [2351.590306732238, 2528.5553147492865], - [2252.290306732238, 2528.5553147492865], - [2351.590306732238, 2362.9553147492866], - [2252.290306732238, 2197.3553147492867], - [2351.590306732238, 2197.3553147492867], - [2351.590306732238, 2031.7553147492865], - [2351.590306732238, 1866.1553147492864], - [2252.290306732238, 1866.1553147492864], - [2351.590306732238, 1700.5553147492863], - [2450.8903067322376, 1534.9553147492861], - [2351.590306732238, 1369.355314749286], - [2252.290306732238, 1203.7553147492858], - [2252.290306732238, 1369.355314749286], - [2252.290306732238, 1534.9553147492861], - [2152.9903067322384, 1369.355314749286], - [2053.6903067322387, 1369.355314749286], - [1954.3903067322387, 1203.7553147492858], - [1855.0903067322388, 1203.7553147492858], - [1755.7903067322388, 1038.1553147492857], - [1656.4903067322389, 1038.1553147492857], - [1557.190306732239, 872.5553147492857], - [1457.890306732239, 1038.1553147492857], - [1457.890306732239, 872.5553147492857], - [1457.890306732239, 706.9553147492858], - [1557.190306732239, 706.9553147492858], - [1656.4903067322389, 872.5553147492857], - [1656.4903067322389, 706.9553147492858], - [1755.7903067322388, 706.9553147492858], - [1656.4903067322389, 541.3553147492859], - [1557.190306732239, 375.7553147492859], - [1656.4903067322389, 210.1553147492859], - [1755.7903067322388, 44.55531474928592], - [1656.4903067322389, 44.55531474928592], - [1557.190306732239, 210.1553147492859], - [1457.890306732239, 210.1553147492859], - [1457.890306732239, 44.55531474928592], - [1358.590306732239, 210.1553147492859], - [1358.590306732239, 375.75531474928584], - [1259.290306732239, 210.15531474928585], - [1259.290306732239, 375.75531474928584], - [1259.290306732239, 541.3553147492859], - [1358.590306732239, 706.9553147492858], - [1358.590306732239, 872.5553147492857], - [1259.290306732239, 706.9553147492858], - [1259.290306732239, 872.5553147492857], - [1259.290306732239, 1038.1553147492857], - [1358.590306732239, 1203.7553147492858], - [1358.590306732239, 1038.1553147492857], - [1457.890306732239, 1203.7553147492858], - [1557.190306732239, 1369.355314749286], - [1656.4903067322389, 1203.7553147492858], - [1557.190306732239, 1203.7553147492858], - [1557.190306732239, 1038.1553147492857], - [17254.572515546668, 1460.5807801244923], - [17353.872515546667, 1626.1807801244925], - [17453.172515546667, 1791.7807801244926], - [17552.472515546666, 1791.7807801244926], - [17453.172515546667, 1626.1807801244925], - [17353.872515546667, 1791.7807801244926], - [17453.172515546667, 1957.3807801244927], - [17353.872515546667, 2122.980780124493], - [17453.172515546667, 2288.580780124493], - [17353.872515546667, 2454.1807801244927], - [17453.172515546667, 2619.7807801244926], - [17552.472515546666, 2619.7807801244926], - [17453.172515546667, 2785.3807801244925], - [17353.872515546667, 2619.7807801244926], - [17254.572515546668, 2454.1807801244927], - [17254.572515546668, 2288.580780124493], - [17353.872515546667, 2288.580780124493], - [17453.172515546667, 2122.980780124493], - [17552.472515546666, 2288.580780124493], - [17552.472515546666, 2454.1807801244927], - [17453.172515546667, 2454.1807801244927], - [4447.67624466283, 4761.1416826913], - [4546.97624466283, 4595.541682691301], - [4546.97624466283, 4429.941682691301], - [4447.67624466283, 4429.941682691301], - [4447.67624466283, 4595.541682691301], - [4348.37624466283, 4595.541682691301], - [4249.07624466283, 4595.541682691301], - [4348.37624466283, 4761.1416826913], - [4249.07624466283, 4761.1416826913], - [4348.37624466283, 4926.7416826912995], - [4348.37624466283, 5092.341682691299], - [4447.67624466283, 5257.941682691298], - [4546.97624466283, 5257.941682691298], - [4646.27624466283, 5092.341682691299], - [4546.97624466283, 5092.341682691299], - [4646.27624466283, 4926.7416826912995], - [4646.27624466283, 4761.1416826913], - [4546.97624466283, 4761.1416826913], - [4646.27624466283, 4595.541682691301], - [4745.5762446628305, 4595.541682691301], - [4646.27624466283, 4429.941682691301], - [4745.5762446628305, 4429.941682691301], - [4844.876244662831, 4595.541682691301], - [4745.5762446628305, 4761.1416826913], - [4745.5762446628305, 4926.7416826912995], - [4844.876244662831, 4761.1416826913], - [4944.176244662831, 4761.1416826913], - [5043.476244662831, 4926.7416826912995], - [5043.476244662831, 4761.1416826913], - [5142.776244662831, 4926.7416826912995], - [5142.776244662831, 4761.1416826913], - [5242.076244662831, 4595.541682691301], - [5142.776244662831, 4595.541682691301], - [5242.076244662831, 4429.941682691301], - [5242.076244662831, 4264.341682691302], - [5142.776244662831, 4429.941682691301], - [5043.476244662831, 4595.541682691301], - [5043.476244662831, 4429.941682691301], - [5043.476244662831, 4264.341682691302], - [5142.776244662831, 4098.741682691302], - [5043.476244662831, 4098.741682691302], - [4944.176244662831, 3933.1416826913023], - [4944.176244662831, 4098.741682691302], - [4944.176244662831, 4264.341682691302], - [4844.876244662831, 4098.741682691302], - [4745.5762446628305, 4264.341682691302], - [4646.27624466283, 4098.741682691302], - [4546.97624466283, 3933.1416826913023], - [4447.67624466283, 4098.741682691302], - [4546.97624466283, 4264.341682691302], - [4447.67624466283, 4264.341682691302], - [4546.97624466283, 4098.741682691302], - [4646.27624466283, 3933.1416826913023], - [4546.97624466283, 3767.5416826913024], - [4447.67624466283, 3601.9416826913025], - [4447.67624466283, 3767.5416826913024], - [4348.37624466283, 3767.5416826913024], - [4348.37624466283, 3933.1416826913023], - [4249.07624466283, 3767.5416826913024], - [4249.07624466283, 3933.1416826913023], - [4149.776244662829, 3933.1416826913023], - [4050.4762446628297, 4098.741682691302], - [4050.4762446628297, 3933.1416826913023], - [3951.17624466283, 3933.1416826913023], - [3951.17624466283, 4098.741682691302], - [3851.8762446628302, 4264.341682691302], - [3851.8762446628302, 4098.741682691302], - [3752.5762446628305, 4098.741682691302], - [3653.276244662831, 4264.341682691302], - [3553.976244662831, 4429.941682691301], - [3553.976244662831, 4595.541682691301], - [3454.6762446628313, 4429.941682691301], - [3553.976244662831, 4264.341682691302], - [3653.276244662831, 4429.941682691301], - [3752.5762446628305, 4264.341682691302], - [3752.5762446628305, 4429.941682691301], - [3851.8762446628302, 4595.541682691301], - [3851.8762446628302, 4429.941682691301], - [3951.17624466283, 4429.941682691301], - [4050.4762446628297, 4264.341682691302], - [4149.776244662829, 4098.741682691302], - [4249.07624466283, 4264.341682691302], - [4348.37624466283, 4098.741682691302], - [4447.67624466283, 3933.1416826913023], - [9574.088902135607, 7352.26293905581], - [9474.788902135606, 7352.26293905581], - [9375.488902135605, 7186.662939055811], - [9474.788902135606, 7021.0629390558115], - [9574.088902135607, 7021.0629390558115], - [9474.788902135606, 7186.662939055811], - [9574.088902135607, 7186.662939055811], - [9673.388902135608, 7021.0629390558115], - [9673.388902135608, 6855.462939055812], - [9772.68890213561, 6689.862939055813], - [9673.388902135608, 6689.862939055813], - [9772.68890213561, 6524.262939055813], - [9871.98890213561, 6358.662939055814], - [9971.288902135611, 6524.262939055813], - [10070.588902135612, 6358.662939055814], - [10070.588902135612, 6193.062939055814], - [9971.288902135611, 6027.462939055815], - [9971.288902135611, 5861.862939055815], - [9871.98890213561, 5861.862939055815], - [9871.98890213561, 5696.262939055816], - [9971.288902135611, 5530.662939055816], - [10070.588902135612, 5530.662939055816], - [10070.588902135612, 5696.262939055816], - [10169.888902135614, 5861.862939055815], - [10169.888902135614, 5696.262939055816], - [10070.588902135612, 5861.862939055815], - [10169.888902135614, 6027.462939055815], - [10169.888902135614, 6193.062939055814], - [10269.188902135615, 6027.462939055815], - [10269.188902135615, 5861.862939055815], - [10368.488902135616, 6027.462939055815], - [10269.188902135615, 6193.062939055814], - [10269.188902135615, 6358.662939055814], - [10169.888902135614, 6358.662939055814], - [10070.588902135612, 6524.262939055813], - [10070.588902135612, 6689.862939055813], - [9971.288902135611, 6855.462939055812], - [9971.288902135611, 7021.0629390558115], - [10070.588902135612, 7186.662939055811], - [10169.888902135614, 7186.662939055811], - [10269.188902135615, 7186.662939055811], - [10169.888902135614, 7352.26293905581], - [10070.588902135612, 7352.26293905581], - [10169.888902135614, 7517.86293905581], - [10169.888902135614, 7683.462939055809], - [10269.188902135615, 7517.86293905581], - [10368.488902135616, 7683.462939055809], - [10467.788902135617, 7683.462939055809], - [10368.488902135616, 7517.86293905581], - [10269.188902135615, 7352.26293905581], - [10368.488902135616, 7352.26293905581], - [10368.488902135616, 7186.662939055811], - [10368.488902135616, 7021.0629390558115], - [10368.488902135616, 6855.462939055812], - [10269.188902135615, 6855.462939055812], - [10169.888902135614, 6855.462939055812], - [10169.888902135614, 7021.0629390558115], - [10070.588902135612, 7021.0629390558115], - [10070.588902135612, 6855.462939055812], - [10169.888902135614, 6689.862939055813], - [10269.188902135615, 6689.862939055813], - [10169.888902135614, 6524.262939055813], - [10269.188902135615, 6524.262939055813], - [10368.488902135616, 6524.262939055813], - [10368.488902135616, 6358.662939055814], - [10467.788902135617, 6358.662939055814], - [10467.788902135617, 6193.062939055814], - [10567.088902135618, 6358.662939055814], - [10567.088902135618, 6193.062939055814], - [10666.388902135619, 6193.062939055814], - [10666.388902135619, 6358.662939055814], - [10567.088902135618, 6524.262939055813], - [10467.788902135617, 6524.262939055813], - [10567.088902135618, 6689.862939055813], - [10467.788902135617, 6855.462939055812], - [10567.088902135618, 7021.0629390558115], - [10467.788902135617, 7021.0629390558115], - [10567.088902135618, 6855.462939055812], - [10467.788902135617, 6689.862939055813], - [10368.488902135616, 6689.862939055813], - [1073.6944354374714, 1154.3681204032646], - [974.3944354374713, 1319.9681204032647], - [875.0944354374712, 1319.9681204032647], - [775.7944354374712, 1154.3681204032646], - [775.7944354374712, 988.7681204032646], - [875.0944354374712, 823.1681204032647], - [875.0944354374712, 657.5681204032647], - [775.7944354374712, 823.1681204032647], - [676.4944354374711, 657.5681204032647], - [676.4944354374711, 491.9681204032648], - [775.7944354374712, 657.5681204032647], - [676.4944354374711, 823.1681204032647], - [676.4944354374711, 988.7681204032646], - [577.194435437471, 823.1681204032647], - [577.194435437471, 988.7681204032646], - [577.194435437471, 1154.3681204032646], - [676.4944354374711, 1319.9681204032647], - [577.194435437471, 1319.9681204032647], - [477.89443543747103, 1319.9681204032647], - [577.194435437471, 1485.5681204032649], - [477.89443543747103, 1651.168120403265], - [577.194435437471, 1816.7681204032651], - [477.89443543747103, 1816.7681204032651], - [378.5944354374711, 1982.3681204032653], - [378.5944354374711, 2147.9681204032654], - [279.2944354374711, 2313.5681204032653], - [179.99443543747114, 2147.9681204032654], - [80.69443543747114, 2313.5681204032653], - [80.69443543747114, 2479.168120403265], - [179.9944354374711, 2644.768120403265], - [179.9944354374711, 2479.168120403265], - [179.9944354374711, 2313.5681204032653], - [80.69443543747111, 2147.9681204032654], - [80.69443543747111, 1982.3681204032653], - [179.9944354374711, 1982.3681204032653], - [179.9944354374711, 1816.7681204032651], - [80.69443543747111, 1816.7681204032651], - [179.9944354374711, 1651.168120403265], - [80.69443543747111, 1485.5681204032649], - [80.69443543747111, 1319.9681204032647], - [179.9944354374711, 1154.3681204032646], - [80.69443543747111, 1154.3681204032646], - [179.9944354374711, 988.7681204032646], - [279.2944354374711, 823.1681204032647], - [378.5944354374711, 657.5681204032647], - [378.5944354374711, 823.1681204032647], - [477.89443543747103, 823.1681204032647], - [477.89443543747103, 657.5681204032647], - [378.5944354374711, 491.9681204032648], - [477.89443543747103, 326.3681204032648], - [477.89443543747103, 160.76812040326482], - [378.5944354374711, 160.76812040326482], - [279.2944354374711, 326.3681204032648], - [179.99443543747114, 491.9681204032648], - [179.99443543747114, 326.3681204032648], - [279.2944354374711, 491.9681204032648], - [279.2944354374711, 657.5681204032647], - [179.99443543747114, 823.1681204032647], - [279.2944354374711, 988.7681204032646], - [279.2944354374711, 1154.3681204032646], - [378.5944354374711, 1319.9681204032647], - [477.89443543747103, 1485.5681204032649], - [577.194435437471, 1651.168120403265], - [676.4944354374711, 1651.168120403265], - [775.7944354374712, 1816.7681204032651], - [676.4944354374711, 1816.7681204032651], - [775.7944354374712, 1651.168120403265], - [875.0944354374712, 1651.168120403265], - [974.3944354374713, 1651.168120403265], - [875.0944354374712, 1485.5681204032649], - [775.7944354374712, 1485.5681204032649], - [676.4944354374711, 1485.5681204032649], - [775.7944354374712, 1319.9681204032647], - [676.4944354374711, 1154.3681204032646], - [3138.413562431697, 2355.845602060523], - [3039.113562431697, 2521.445602060523], - [3039.113562431697, 2355.845602060523], - [3039.113562431697, 2190.245602060523], - [3138.413562431697, 2024.645602060523], - [3237.7135624316966, 1859.045602060523], - [3237.7135624316966, 2024.645602060523], - [3337.0135624316963, 1859.045602060523], - [3337.0135624316963, 1693.4456020605228], - [3436.313562431696, 1527.8456020605227], - [3535.6135624316958, 1693.4456020605228], - [3535.6135624316958, 1859.045602060523], - [3634.9135624316955, 2024.645602060523], - [3734.213562431695, 2190.245602060523], - [3634.9135624316955, 2190.245602060523], - [3535.6135624316958, 2190.245602060523], - [3535.6135624316958, 2355.845602060523], - [3535.6135624316958, 2521.445602060523], - [3436.313562431696, 2687.045602060523], - [3436.313562431696, 2852.645602060523], - [3535.6135624316958, 2687.045602060523], - [3634.9135624316955, 2521.445602060523], - [3634.9135624316955, 2355.845602060523], - [3734.213562431695, 2355.845602060523], - [3833.513562431695, 2190.245602060523], - [3932.8135624316947, 2024.645602060523], - [3833.513562431695, 1859.045602060523], - [3833.513562431695, 1693.4456020605228], - [3734.213562431695, 1859.045602060523], - [3734.213562431695, 1693.4456020605228], - [3734.213562431695, 1527.8456020605227], - [3634.9135624316955, 1527.8456020605227], - [3634.9135624316955, 1693.4456020605228], - [3535.6135624316958, 1527.8456020605227], - [3634.9135624316955, 1362.2456020605225], - [3535.6135624316958, 1362.2456020605225], - [3436.313562431696, 1196.6456020605224], - [3535.6135624316958, 1196.6456020605224], - [3535.6135624316958, 1031.0456020605222], - [3436.313562431696, 1031.0456020605222], - [3535.6135624316958, 865.4456020605222], - [3436.313562431696, 865.4456020605222], - [3535.6135624316958, 699.8456020605223], - [3634.9135624316955, 699.8456020605223], - [3535.6135624316958, 534.2456020605224], - [3436.313562431696, 368.64560206052244], - [3436.313562431696, 203.04560206052244], - [3337.0135624316963, 37.445602060522454], - [3436.313562431696, 37.445602060522454], - [3337.0135624316963, 203.04560206052244], - [3237.7135624316966, 37.445602060522454], - [3138.413562431697, 37.445602060522454], - [3237.7135624316966, 203.04560206052244], - [3337.0135624316963, 368.6456020605224], - [3436.313562431696, 534.2456020605224], - [3337.0135624316963, 699.8456020605223], - [3237.7135624316966, 534.2456020605224], - [3337.0135624316963, 534.2456020605224], - [3436.313562431696, 699.8456020605223], - [3337.0135624316963, 865.4456020605222], - [3237.7135624316966, 865.4456020605222], - [3337.0135624316963, 1031.0456020605222], - [3237.7135624316966, 1196.6456020605224], - [3138.413562431697, 1362.2456020605225], - [3039.113562431697, 1527.8456020605227], - [3138.413562431697, 1527.8456020605227], - [3039.113562431697, 1693.4456020605228], - [2939.8135624316974, 1527.8456020605227], - [2840.5135624316977, 1362.2456020605225], - [2840.5135624316977, 1527.8456020605227], - [2840.5135624316977, 1693.4456020605228], - [2939.8135624316974, 1859.045602060523], - [2840.5135624316977, 2024.645602060523], - [2840.5135624316977, 1859.045602060523], - [2939.8135624316974, 1693.4456020605228], - [3039.113562431697, 1859.045602060523], - [3039.113562431697, 2024.645602060523], - [2939.8135624316974, 2190.245602060523], - [2939.8135624316974, 2024.645602060523], - [16388.412117675925, 1839.818884803299], - [16289.112117675924, 1839.818884803299], - [16388.412117675925, 1674.2188848032988], - [16487.712117675925, 1508.6188848032987], - [16487.712117675925, 1674.2188848032988], - [16388.412117675925, 1508.6188848032987], - [16289.112117675924, 1343.0188848032985], - [16289.112117675924, 1508.6188848032987], - [16189.812117675923, 1674.2188848032988], - [16090.512117675922, 1839.818884803299], - [16090.512117675922, 2005.418884803299], - [15991.212117675921, 2171.018884803299], - [16090.512117675922, 2336.618884803299], - [16090.512117675922, 2502.218884803299], - [16090.512117675922, 2667.8188848032987], - [15991.212117675921, 2833.4188848032986], - [15991.212117675921, 2999.0188848032985], - [15891.91211767592, 3164.6188848032984], - [15891.91211767592, 3330.2188848032984], - [15991.212117675921, 3330.2188848032984], - [16090.512117675922, 3330.2188848032984], - [16189.812117675923, 3495.8188848032983], - [16289.112117675924, 3495.8188848032983], - [16189.812117675923, 3330.2188848032984], - [16189.812117675923, 3164.6188848032984], - [16289.112117675924, 3164.6188848032984], - [16388.412117675925, 3164.6188848032984], - [16388.412117675925, 3330.2188848032984], - [16487.712117675925, 3330.2188848032984], - [16587.012117675924, 3495.8188848032983], - [16587.012117675924, 3661.418884803298], - [16686.312117675923, 3661.418884803298], - [16785.612117675922, 3661.418884803298], - [16884.91211767592, 3661.418884803298], - [16984.21211767592, 3661.418884803298], - [16884.91211767592, 3827.018884803298], - [16884.91211767592, 3992.618884803298], - [16984.21211767592, 3827.018884803298], - [17083.51211767592, 3661.418884803298], - [17182.81211767592, 3495.8188848032983], - [17182.81211767592, 3330.2188848032984], - [17282.11211767592, 3164.6188848032984], - [17282.11211767592, 3330.2188848032984], - [17182.81211767592, 3164.6188848032984], - [17083.51211767592, 3164.6188848032984], - [16984.21211767592, 3330.2188848032984], - [16984.21211767592, 3495.8188848032983], - [17083.51211767592, 3330.2188848032984], - [16984.21211767592, 3164.6188848032984], - [16984.21211767592, 2999.0188848032985], - [17083.51211767592, 2833.4188848032986], - [17083.51211767592, 2667.8188848032987], - [17182.81211767592, 2667.8188848032987], - [17182.81211767592, 2833.4188848032986], - [17083.51211767592, 2999.0188848032985], - [16984.21211767592, 2833.4188848032986], - [16884.91211767592, 2833.4188848032986], - [16884.91211767592, 2999.0188848032985], - [16785.612117675922, 2999.0188848032985], - [16884.91211767592, 3164.6188848032984], - [16785.612117675922, 3164.6188848032984], - [16686.312117675923, 3164.6188848032984], - [16587.012117675924, 3164.6188848032984], - [16587.012117675924, 2999.0188848032985], - [16487.712117675925, 3164.6188848032984], - [16587.012117675924, 3330.2188848032984], - [16686.312117675923, 3495.8188848032983], - [16686.312117675923, 3330.2188848032984], - [16785.612117675922, 3330.2188848032984], - [16884.91211767592, 3495.8188848032983], - [16785.612117675922, 3495.8188848032983], - [16884.91211767592, 3330.2188848032984], - [1272.175991128079, 3842.7700224365044], - [1371.475991128079, 3842.7700224365044], - [1272.175991128079, 3677.1700224365045], - [1172.875991128079, 3511.5700224365046], - [1272.175991128079, 3511.5700224365046], - [1172.875991128079, 3345.9700224365047], - [1073.575991128079, 3180.3700224365048], - [1073.575991128079, 3014.770022436505], - [974.275991128079, 3014.770022436505], - [874.9759911280789, 3014.770022436505], - [775.6759911280789, 2849.170022436505], - [775.6759911280789, 3014.770022436505], - [775.6759911280789, 3180.3700224365048], - [676.3759911280788, 3345.9700224365047], - [676.3759911280788, 3511.5700224365046], - [775.6759911280789, 3677.1700224365045], - [676.3759911280788, 3842.7700224365044], - [577.0759911280787, 3842.7700224365044], - [577.0759911280787, 3677.1700224365045], - [676.3759911280788, 3677.1700224365045], - [775.6759911280789, 3511.5700224365046], - [775.6759911280789, 3345.9700224365047], - [874.9759911280789, 3345.9700224365047], - [874.9759911280789, 3180.3700224365048], - [974.275991128079, 3180.3700224365048], - [974.275991128079, 3345.9700224365047], - [1073.575991128079, 3511.5700224365046], - [1073.575991128079, 3677.1700224365045], - [1172.875991128079, 3677.1700224365045], - [1172.875991128079, 3842.7700224365044], - [1073.575991128079, 3842.7700224365044], - [1172.875991128079, 4008.3700224365043], - [1073.575991128079, 4008.3700224365043], - [974.275991128079, 3842.7700224365044], - [974.275991128079, 4008.3700224365043], - [874.9759911280789, 4008.3700224365043], - [775.6759911280789, 4008.3700224365043], - [874.9759911280789, 3842.7700224365044], - [974.275991128079, 3677.1700224365045], - [974.275991128079, 3511.5700224365046], - [1073.575991128079, 3345.9700224365047], - [1172.875991128079, 3180.3700224365048], - [1272.175991128079, 3180.3700224365048], - [1272.175991128079, 3345.9700224365047], - [1371.475991128079, 3180.3700224365048], - [1470.7759911280789, 3345.9700224365047], - [1371.475991128079, 3345.9700224365047], - [1371.475991128079, 3511.5700224365046], - [1470.7759911280789, 3511.5700224365046], - [1570.0759911280788, 3677.1700224365045], - [1470.7759911280789, 3677.1700224365045], - [1570.0759911280788, 3511.5700224365046], - [1669.3759911280788, 3511.5700224365046], - [1669.3759911280788, 3677.1700224365045], - [1768.6759911280787, 3842.7700224365044], - [1669.3759911280788, 3842.7700224365044], - [1768.6759911280787, 4008.3700224365043], - [1867.9759911280787, 3842.7700224365044], - [1967.2759911280787, 3677.1700224365045], - [2066.5759911280784, 3842.7700224365044], - [2165.875991128078, 3677.1700224365045], - [2066.5759911280784, 3511.5700224365046], - [2165.875991128078, 3511.5700224365046], - [2066.5759911280784, 3677.1700224365045], - [2165.875991128078, 3842.7700224365044], - [2265.175991128078, 4008.3700224365043], - [2364.4759911280776, 4008.3700224365043], - [2265.175991128078, 3842.7700224365044], - [2364.4759911280776, 3677.1700224365045], - [2463.7759911280773, 3842.7700224365044], - [2463.7759911280773, 4008.3700224365043], - [2364.4759911280776, 3842.7700224365044] -]; - -main() { - for (int i = 0; i < 20; i++) { - var y = panels.length; - } -} diff --git a/tests/language_2/unsorted/larger_implicit_getter_test.dart b/tests/language_2/unsorted/larger_implicit_getter_test.dart deleted file mode 100644 index 99d0781f7e5..00000000000 --- a/tests/language_2/unsorted/larger_implicit_getter_test.dart +++ /dev/null @@ -1,4102 +0,0 @@ -// Copyright (c) 2015, 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 test program for testing compilation of large implicit getters. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -List panels = [ - [6853.940039224797, 6050.837897021371], - [6953.240039224797, 6050.837897021371], - [7052.5400392247975, 5885.237897021371], - [7052.5400392247975, 5719.637897021372], - [7151.840039224798, 5885.237897021371], - [7052.5400392247975, 6050.837897021371], - [7052.5400392247975, 6216.43789702137], - [7052.5400392247975, 6382.03789702137], - [6953.240039224797, 6382.03789702137], - [6953.240039224797, 6216.43789702137], - [6853.940039224797, 6216.43789702137], - [6853.940039224797, 6382.03789702137], - [6754.640039224797, 6216.43789702137], - [6754.640039224797, 6382.03789702137], - [6754.640039224797, 6547.637897021369], - [6754.640039224797, 6713.237897021369], - [6655.340039224797, 6713.237897021369], - [6754.640039224797, 6878.837897021368], - [6853.940039224797, 6713.237897021369], - [6853.940039224797, 6878.837897021368], - [6953.240039224797, 6713.237897021369], - [7052.5400392247975, 6547.637897021369], - [7151.840039224798, 6713.237897021369], - [7151.840039224798, 6547.637897021369], - [7151.840039224798, 6382.03789702137], - [7251.140039224798, 6547.637897021369], - [7251.140039224798, 6713.237897021369], - [7350.440039224798, 6878.837897021368], - [7449.740039224798, 6878.837897021368], - [7449.740039224798, 6713.237897021369], - [7549.040039224798, 6547.637897021369], - [7449.740039224798, 6382.03789702137], - [7449.740039224798, 6216.43789702137], - [7549.040039224798, 6050.837897021371], - [7648.340039224799, 6216.43789702137], - [7549.040039224798, 6382.03789702137], - [7648.340039224799, 6382.03789702137], - [7747.640039224799, 6216.43789702137], - [7846.940039224799, 6382.03789702137], - [7946.240039224799, 6382.03789702137], - [7946.240039224799, 6547.637897021369], - [7846.940039224799, 6713.237897021369], - [7946.240039224799, 6713.237897021369], - [8045.540039224799, 6547.637897021369], - [8045.540039224799, 6713.237897021369], - [7946.240039224799, 6878.837897021368], - [7946.240039224799, 7044.4378970213675], - [8045.540039224799, 7210.037897021367], - [8144.8400392247995, 7375.637897021366], - [8144.8400392247995, 7541.237897021366], - [8045.540039224799, 7375.637897021366], - [8144.8400392247995, 7210.037897021367], - [8045.540039224799, 7044.4378970213675], - [7946.240039224799, 7210.037897021367], - [7846.940039224799, 7210.037897021367], - [7946.240039224799, 7375.637897021366], - [8045.540039224799, 7541.237897021366], - [8144.8400392247995, 7706.837897021365], - [8244.1400392248, 7541.237897021366], - [8343.4400392248, 7541.237897021366], - [8343.4400392248, 7706.837897021365], - [8244.1400392248, 7706.837897021365], - [4735.523842661975, 3503.497768214323], - [4636.223842661975, 3337.897768214323], - [4536.923842661975, 3337.897768214323], - [4437.623842661975, 3172.2977682143232], - [4338.323842661975, 3172.2977682143232], - [4239.023842661974, 3172.2977682143232], - [4338.323842661975, 3006.6977682143233], - [4437.623842661975, 2841.0977682143234], - [4338.323842661975, 2675.4977682143235], - [4338.323842661975, 2509.8977682143236], - [4239.023842661974, 2675.4977682143235], - [4139.723842661974, 2509.8977682143236], - [4040.4238426619745, 2344.2977682143237], - [4139.723842661974, 2178.697768214324], - [4239.023842661974, 2178.697768214324], - [4139.723842661974, 2344.2977682143237], - [4040.4238426619745, 2178.697768214324], - [4139.723842661974, 2013.0977682143237], - [4139.723842661974, 1847.4977682143235], - [4239.023842661974, 2013.0977682143237], - [4239.023842661974, 1847.4977682143235], - [4338.323842661975, 1847.4977682143235], - [4437.623842661975, 1847.4977682143235], - [4536.923842661975, 1681.8977682143234], - [4437.623842661975, 1516.2977682143232], - [4536.923842661975, 1516.2977682143232], - [4536.923842661975, 1350.697768214323], - [4437.623842661975, 1350.697768214323], - [4536.923842661975, 1185.097768214323], - [4636.223842661975, 1019.497768214323], - [4536.923842661975, 853.897768214323], - [4636.223842661975, 853.897768214323], - [4735.523842661975, 688.2977682143231], - [4636.223842661975, 522.6977682143232], - [4636.223842661975, 357.09776821432325], - [4735.523842661975, 357.09776821432325], - [4735.523842661975, 522.6977682143232], - [4636.223842661975, 688.2977682143231], - [4735.523842661975, 853.897768214323], - [4834.8238426619755, 853.897768214323], - [4735.523842661975, 1019.497768214323], - [4735.523842661975, 1185.097768214323], - [4735.523842661975, 1350.697768214323], - [4834.8238426619755, 1516.2977682143232], - [4735.523842661975, 1516.2977682143232], - [4834.8238426619755, 1350.697768214323], - [4834.8238426619755, 1185.097768214323], - [4934.123842661976, 1350.697768214323], - [5033.423842661976, 1185.097768214323], - [5033.423842661976, 1019.497768214323], - [5033.423842661976, 853.897768214323], - [4934.123842661976, 853.897768214323], - [4934.123842661976, 1019.497768214323], - [4834.8238426619755, 1019.497768214323], - [4934.123842661976, 1185.097768214323], - [5033.423842661976, 1350.697768214323], - [5132.723842661976, 1350.697768214323], - [5132.723842661976, 1185.097768214323], - [5232.023842661976, 1019.497768214323], - [5232.023842661976, 1185.097768214323], - [5331.323842661976, 1019.497768214323], - [5430.623842661977, 1019.497768214323], - [5529.923842661977, 1185.097768214323], - [5430.623842661977, 1350.697768214323], - [5430.623842661977, 1516.2977682143232], - [5529.923842661977, 1350.697768214323], - [5629.223842661977, 1350.697768214323], - [5728.523842661977, 1350.697768214323], - [5728.523842661977, 1516.2977682143232], - [5728.523842661977, 1681.8977682143234], - [5629.223842661977, 1516.2977682143232], - [5529.923842661977, 1516.2977682143232], - [5629.223842661977, 1681.8977682143234], - [5529.923842661977, 1681.8977682143234], - [5430.623842661977, 1847.4977682143235], - [5331.323842661976, 1847.4977682143235], - [5331.323842661976, 2013.0977682143237], - [5232.023842661976, 2178.697768214324], - [5132.723842661976, 2013.0977682143237], - [5132.723842661976, 2178.697768214324], - [5232.023842661976, 2013.0977682143237], - [5232.023842661976, 1847.4977682143235], - [5232.023842661976, 1681.8977682143234], - [5331.323842661976, 1681.8977682143234], - [5331.323842661976, 1516.2977682143232], - [5331.323842661976, 1350.697768214323], - [5232.023842661976, 1350.697768214323], - [5232.023842661976, 1516.2977682143232], - [5132.723842661976, 1516.2977682143232], - [5132.723842661976, 1681.8977682143234], - [5033.423842661976, 1847.4977682143235], - [5132.723842661976, 1847.4977682143235], - [5033.423842661976, 2013.0977682143237], - [4934.123842661976, 2178.697768214324], - [5033.423842661976, 2344.2977682143237], - [4934.123842661976, 2344.2977682143237], - [4834.8238426619755, 2178.697768214324], - [4834.8238426619755, 2344.2977682143237], - [4735.523842661975, 2344.2977682143237], - [4636.223842661975, 2344.2977682143237], - [4536.923842661975, 2178.697768214324], - [4437.623842661975, 2013.0977682143237], - [4338.323842661975, 2178.697768214324], - [4437.623842661975, 2344.2977682143237], - [4536.923842661975, 2509.8977682143236], - [4636.223842661975, 2675.4977682143235], - [4636.223842661975, 2509.8977682143236], - [4536.923842661975, 2675.4977682143235], - [4636.223842661975, 2841.0977682143234], - [4536.923842661975, 2841.0977682143234], - [4636.223842661975, 3006.6977682143233], - [4735.523842661975, 3172.2977682143232], - [4834.8238426619755, 3006.6977682143233], - [4735.523842661975, 2841.0977682143234], - [4735.523842661975, 3006.6977682143233], - [4636.223842661975, 3172.2977682143232], - [4735.523842661975, 3337.897768214323], - [4834.8238426619755, 3503.497768214323], - [4735.523842661975, 3669.097768214323], - [4834.8238426619755, 3834.697768214323], - [4834.8238426619755, 3669.097768214323], - [4934.123842661976, 3503.497768214323], - [5033.423842661976, 3503.497768214323], - [5033.423842661976, 3337.897768214323], - [4934.123842661976, 3337.897768214323], - [4834.8238426619755, 3172.2977682143232], - [4834.8238426619755, 3337.897768214323], - [4934.123842661976, 3172.2977682143232], - [5033.423842661976, 3006.6977682143233], - [5132.723842661976, 2841.0977682143234], - [5132.723842661976, 3006.6977682143233], - [5232.023842661976, 3172.2977682143232], - [5232.023842661976, 3337.897768214323], - [5132.723842661976, 3337.897768214323], - [5232.023842661976, 3503.497768214323], - [5331.323842661976, 3337.897768214323], - [5331.323842661976, 3503.497768214323], - [5430.623842661977, 3669.097768214323], - [5331.323842661976, 3669.097768214323], - [5430.623842661977, 3503.497768214323], - [5430.623842661977, 3337.897768214323], - [5529.923842661977, 3172.2977682143232], - [5529.923842661977, 3337.897768214323], - [5629.223842661977, 3337.897768214323], - [5728.523842661977, 3337.897768214323], - [5728.523842661977, 3503.497768214323], - [5827.823842661977, 3503.497768214323], - [5927.1238426619775, 3669.097768214323], - [6026.423842661978, 3669.097768214323], - [6125.723842661978, 3503.497768214323], - [6125.723842661978, 3669.097768214323], - [6225.023842661978, 3503.497768214323], - [6225.023842661978, 3337.897768214323], - [6324.323842661978, 3337.897768214323], - [6423.623842661978, 3503.497768214323], - [6324.323842661978, 3669.097768214323], - [6225.023842661978, 3669.097768214323], - [6324.323842661978, 3834.697768214323], - [6423.623842661978, 3834.697768214323], - [6324.323842661978, 4000.297768214323], - [6225.023842661978, 3834.697768214323], - [6125.723842661978, 3834.697768214323], - [6125.723842661978, 4000.297768214323], - [6225.023842661978, 4000.297768214323], - [6225.023842661978, 4165.897768214322], - [6225.023842661978, 4331.497768214322], - [6125.723842661978, 4165.897768214322], - [6026.423842661978, 4000.2977682143223], - [5927.1238426619775, 4165.897768214322], - [6026.423842661978, 4331.497768214322], - [6026.423842661978, 4497.097768214321], - [5927.1238426619775, 4497.097768214321], - [5827.823842661977, 4662.697768214321], - [5728.523842661977, 4828.29776821432], - [5827.823842661977, 4828.29776821432], - [5927.1238426619775, 4828.29776821432], - [5927.1238426619775, 4662.697768214321], - [5827.823842661977, 4497.097768214321], - [5927.1238426619775, 4331.497768214322], - [5827.823842661977, 4165.897768214322], - [5728.523842661977, 4331.497768214322], - [5728.523842661977, 4165.897768214322], - [5629.223842661977, 4000.2977682143223], - [5629.223842661977, 3834.6977682143224], - [5529.923842661977, 3669.0977682143225], - [5629.223842661977, 3503.4977682143226], - [5728.523842661977, 3669.0977682143225], - [5827.823842661977, 3669.0977682143225], - [5927.1238426619775, 3834.6977682143224], - [5927.1238426619775, 4000.2977682143223], - [6026.423842661978, 4165.897768214322], - [6125.723842661978, 4331.497768214322], - [6225.023842661978, 4497.097768214321], - [6225.023842661978, 4662.697768214321], - [6324.323842661978, 4662.697768214321], - [6225.023842661978, 4828.29776821432], - [6324.323842661978, 4828.29776821432], - [6423.623842661978, 4828.29776821432], - [6324.323842661978, 4993.8977682143195], - [6225.023842661978, 5159.497768214319], - [6125.723842661978, 5159.497768214319], - [6026.423842661978, 5325.097768214318], - [5927.1238426619775, 5490.697768214318], - [6026.423842661978, 5656.297768214317], - [5927.1238426619775, 5821.897768214317], - [5927.1238426619775, 5987.497768214316], - [6026.423842661978, 5987.497768214316], - [6026.423842661978, 5821.897768214317], - [5927.1238426619775, 5656.297768214317], - [5827.823842661977, 5656.297768214317], - [5827.823842661977, 5490.697768214318], - [5728.523842661977, 5490.697768214318], - [5629.223842661977, 5325.097768214318], - [5629.223842661977, 5159.497768214319], - [5529.923842661977, 4993.8977682143195], - [5529.923842661977, 5159.497768214319], - [5629.223842661977, 4993.8977682143195], - [5629.223842661977, 4828.29776821432], - [5529.923842661977, 4662.697768214321], - [5430.623842661977, 4828.29776821432], - [5529.923842661977, 4828.29776821432], - [5629.223842661977, 4662.697768214321], - [5728.523842661977, 4662.697768214321], - [5629.223842661977, 4497.097768214321], - [5728.523842661977, 4497.097768214321], - [5827.823842661977, 4331.497768214322], - [10216.161365168813, 2951.605409896135], - [10116.861365168812, 2951.605409896135], - [10017.56136516881, 3117.205409896135], - [9918.26136516881, 3117.205409896135], - [9818.961365168809, 3117.205409896135], - [9719.661365168808, 3282.8054098961347], - [9620.361365168807, 3282.8054098961347], - [9620.361365168807, 3117.205409896135], - [9521.061365168805, 2951.605409896135], - [9521.061365168805, 2786.005409896135], - [9620.361365168807, 2786.005409896135], - [9719.661365168808, 2786.005409896135], - [9818.961365168809, 2620.405409896135], - [9918.26136516881, 2786.005409896135], - [9818.961365168809, 2951.605409896135], - [9818.961365168809, 2786.005409896135], - [9719.661365168808, 2620.405409896135], - [9719.661365168808, 2454.805409896135], - [9620.361365168807, 2289.2054098961353], - [9521.061365168805, 2123.6054098961354], - [9620.361365168807, 1958.0054098961352], - [9719.661365168808, 2123.6054098961354], - [9818.961365168809, 2289.2054098961353], - [9818.961365168809, 2123.6054098961354], - [9818.961365168809, 1958.0054098961352], - [9719.661365168808, 1958.0054098961352], - [9620.361365168807, 1792.405409896135], - [9620.361365168807, 1626.805409896135], - [9521.061365168805, 1461.2054098961348], - [9421.761365168804, 1295.6054098961347], - [9521.061365168805, 1130.0054098961346], - [9521.061365168805, 964.4054098961345], - [9421.761365168804, 964.4054098961345], - [9521.061365168805, 798.8054098961346], - [9620.361365168807, 798.8054098961346], - [9620.361365168807, 964.4054098961345], - [9620.361365168807, 1130.0054098961346], - [9620.361365168807, 1295.6054098961347], - [9620.361365168807, 1461.2054098961348], - [9719.661365168808, 1295.6054098961347], - [9818.961365168809, 1130.0054098961346], - [9918.26136516881, 964.4054098961345], - [9818.961365168809, 964.4054098961345], - [9918.26136516881, 798.8054098961346], - [10017.56136516881, 633.2054098961347], - [9918.26136516881, 467.60540989613474], - [9918.26136516881, 302.0054098961348], - [10017.56136516881, 302.0054098961348], - [10116.861365168812, 136.40540989613478], - [10116.861365168812, 302.0054098961348], - [10116.861365168812, 467.60540989613474], - [10116.861365168812, 633.2054098961347], - [10216.161365168813, 633.2054098961347], - [10216.161365168813, 798.8054098961346], - [10315.461365168814, 633.2054098961347], - [10315.461365168814, 798.8054098961346], - [10414.761365168815, 798.8054098961346], - [10514.061365168816, 633.2054098961347], - [10514.061365168816, 798.8054098961346], - [10414.761365168815, 964.4054098961345], - [10315.461365168814, 964.4054098961345], - [10216.161365168813, 964.4054098961345], - [10116.861365168812, 798.8054098961346], - [10017.56136516881, 798.8054098961346], - [10116.861365168812, 964.4054098961345], - [10216.161365168813, 1130.0054098961346], - [10116.861365168812, 1130.0054098961346], - [10216.161365168813, 1295.6054098961347], - [10216.161365168813, 1461.2054098961348], - [10315.461365168814, 1626.805409896135], - [10315.461365168814, 1792.405409896135], - [10216.161365168813, 1958.0054098961352], - [10216.161365168813, 1792.405409896135], - [10116.861365168812, 1792.405409896135], - [10017.56136516881, 1958.0054098961352], - [9918.26136516881, 2123.6054098961354], - [9918.26136516881, 1958.0054098961352], - [10017.56136516881, 2123.6054098961354], - [10116.861365168812, 2123.6054098961354], - [10017.56136516881, 2289.2054098961353], - [10017.56136516881, 2454.805409896135], - [10116.861365168812, 2289.2054098961353], - [10216.161365168813, 2454.805409896135], - [10315.461365168814, 2620.405409896135], - [10315.461365168814, 2454.805409896135], - [10315.461365168814, 2289.2054098961353], - [10414.761365168815, 2454.805409896135], - [10514.061365168816, 2620.405409896135], - [10613.361365168817, 2786.005409896135], - [10514.061365168816, 2786.005409896135], - [10613.361365168817, 2620.405409896135], - [10514.061365168816, 2454.805409896135], - [10514.061365168816, 2289.2054098961353], - [10613.361365168817, 2289.2054098961353], - [10712.661365168819, 2289.2054098961353], - [10811.96136516882, 2454.805409896135], - [10911.26136516882, 2289.2054098961353], - [10811.96136516882, 2289.2054098961353], - [10712.661365168819, 2454.805409896135], - [10712.661365168819, 2620.405409896135], - [10811.96136516882, 2786.005409896135], - [10911.26136516882, 2620.405409896135], - [10911.26136516882, 2786.005409896135], - [11010.561365168822, 2620.405409896135], - [10911.26136516882, 2454.805409896135], - [10811.96136516882, 2620.405409896135], - [10712.661365168819, 2786.005409896135], - [10811.96136516882, 2951.605409896135], - [10911.26136516882, 2951.605409896135], - [10811.96136516882, 3117.205409896135], - [10712.661365168819, 2951.605409896135], - [10613.361365168817, 2951.605409896135], - [10514.061365168816, 2951.605409896135], - [10414.761365168815, 3117.205409896135], - [10414.761365168815, 2951.605409896135], - [10315.461365168814, 2786.005409896135], - [10216.161365168813, 2620.405409896135], - [10216.161365168813, 2786.005409896135], - [10315.461365168814, 2951.605409896135], - [10315.461365168814, 3117.205409896135], - [10216.161365168813, 3117.205409896135], - [10116.861365168812, 3117.205409896135], - [10017.56136516881, 3282.8054098961347], - [9918.26136516881, 3448.4054098961346], - [9818.961365168809, 3448.4054098961346], - [9818.961365168809, 3614.0054098961346], - [9719.661365168808, 3448.4054098961346], - [9818.961365168809, 3282.8054098961347], - [9719.661365168808, 3117.205409896135], - [9620.361365168807, 2951.605409896135], - [9521.061365168805, 3117.205409896135], - [9521.061365168805, 3282.8054098961347], - [9421.761365168804, 3117.205409896135], - [9421.761365168804, 3282.8054098961347], - [9322.461365168803, 3117.205409896135], - [9421.761365168804, 2951.605409896135], - [9322.461365168803, 2951.605409896135], - [9223.161365168802, 2786.005409896135], - [9322.461365168803, 2620.405409896135], - [9421.761365168804, 2454.805409896135], - [9521.061365168805, 2289.2054098961353], - [9421.761365168804, 2123.6054098961354], - [9421.761365168804, 1958.0054098961352], - [9421.761365168804, 1792.405409896135], - [9521.061365168805, 1626.805409896135], - [9421.761365168804, 1626.805409896135], - [9322.461365168803, 1792.405409896135], - [9322.461365168803, 1626.805409896135], - [9322.461365168803, 1461.2054098961348], - [9421.761365168804, 1461.2054098961348], - [9521.061365168805, 1295.6054098961347], - [9421.761365168804, 1130.0054098961346], - [9322.461365168803, 964.4054098961345], - [9223.161365168802, 964.4054098961345], - [9223.161365168802, 798.8054098961346], - [9322.461365168803, 633.2054098961347], - [9421.761365168804, 798.8054098961346], - [9421.761365168804, 633.2054098961347], - [9521.061365168805, 633.2054098961347], - [9421.761365168804, 467.60540989613474], - [9421.761365168804, 302.0054098961348], - [9322.461365168803, 136.40540989613478], - [9223.161365168802, 302.0054098961348], - [9123.861365168801, 302.0054098961348], - [9024.5613651688, 136.40540989613478], - [9123.861365168801, 136.40540989613478], - [9223.161365168802, 136.40540989613478], - [9322.461365168803, 302.0054098961348], - [9421.761365168804, 136.40540989613478], - [9521.061365168805, 136.40540989613478], - [9620.361365168807, 136.40540989613478], - [9620.361365168807, 302.0054098961348], - [9521.061365168805, 302.0054098961348], - [9521.061365168805, 467.60540989613474], - [9620.361365168807, 467.60540989613474], - [9719.661365168808, 302.0054098961348], - [9719.661365168808, 136.40540989613478], - [9818.961365168809, 136.40540989613478], - [9918.26136516881, 136.40540989613478], - [10017.56136516881, 136.40540989613478], - [366.07287160549004, 5394.185440937868], - [465.37287160549005, 5394.185440937868], - [465.37287160549005, 5559.785440937868], - [366.0728716054901, 5559.785440937868], - [366.0728716054901, 5725.385440937867], - [266.77287160549014, 5725.385440937867], - [167.47287160549016, 5559.785440937868], - [266.77287160549014, 5559.785440937868], - [266.77287160549014, 5394.185440937868], - [266.77287160549014, 5228.585440937869], - [167.47287160549016, 5394.185440937868], - [68.17287160549016, 5228.585440937869], - [167.47287160549013, 5062.9854409378695], - [68.17287160549013, 4897.38544093787], - [167.47287160549013, 4731.785440937871], - [266.77287160549014, 4731.785440937871], - [167.47287160549016, 4566.185440937871], - [68.17287160549016, 4566.185440937871], - [68.17287160549016, 4731.785440937871], - [167.47287160549013, 4897.38544093787], - [68.17287160549013, 5062.9854409378695], - [167.47287160549013, 5228.585440937869], - [266.77287160549014, 5062.9854409378695], - [366.0728716054901, 4897.38544093787], - [266.77287160549014, 4897.38544093787], - [366.0728716054901, 4731.785440937871], - [465.37287160549005, 4897.38544093787], - [366.0728716054901, 5062.9854409378695], - [465.37287160549005, 5062.9854409378695], - [366.0728716054901, 5228.585440937869], - [465.37287160549005, 5228.585440937869], - [564.6728716054901, 5394.185440937868], - [663.9728716054901, 5228.585440937869], - [564.6728716054901, 5062.9854409378695], - [663.9728716054901, 4897.38544093787], - [763.2728716054902, 4731.785440937871], - [862.5728716054903, 4566.185440937871], - [961.8728716054903, 4731.785440937871], - [862.5728716054903, 4731.785440937871], - [961.8728716054903, 4566.185440937871], - [862.5728716054903, 4400.585440937872], - [961.8728716054903, 4234.985440937872], - [1061.1728716054904, 4400.585440937872], - [1160.4728716054904, 4234.985440937872], - [1160.4728716054904, 4400.585440937872], - [1259.7728716054903, 4234.985440937872], - [1359.0728716054903, 4069.3854409378723], - [1458.3728716054902, 4069.3854409378723], - [1557.6728716054902, 4234.985440937872], - [1656.9728716054901, 4400.585440937872], - [1557.6728716054902, 4400.585440937872], - [1458.3728716054902, 4400.585440937872], - [1359.0728716054903, 4566.185440937871], - [1359.0728716054903, 4731.785440937871], - [1259.7728716054903, 4731.785440937871], - [1359.0728716054903, 4897.38544093787], - [1458.3728716054902, 4731.785440937871], - [1458.3728716054902, 4897.38544093787], - [1359.0728716054903, 5062.9854409378695], - [1259.7728716054903, 5228.585440937869], - [1259.7728716054903, 5062.9854409378695], - [1259.7728716054903, 4897.38544093787], - [1160.4728716054904, 5062.9854409378695], - [1160.4728716054904, 5228.585440937869], - [1061.1728716054904, 5228.585440937869], - [1061.1728716054904, 5062.9854409378695], - [961.8728716054903, 5228.585440937869], - [862.5728716054903, 5062.9854409378695], - [961.8728716054903, 5062.9854409378695], - [961.8728716054903, 4897.38544093787], - [1061.1728716054904, 4897.38544093787], - [1160.4728716054904, 4731.785440937871], - [1259.7728716054903, 4566.185440937871], - [1359.0728716054903, 4400.585440937872], - [1458.3728716054902, 4566.185440937871], - [1557.6728716054902, 4566.185440937871], - [1656.9728716054901, 4731.785440937871], - [1557.6728716054902, 4897.38544093787], - [1458.3728716054902, 5062.9854409378695], - [1557.6728716054902, 5228.585440937869], - [1656.9728716054901, 5062.9854409378695], - [1756.27287160549, 5062.9854409378695], - [1756.27287160549, 4897.38544093787], - [1855.57287160549, 5062.9854409378695], - [1954.87287160549, 4897.38544093787], - [2054.17287160549, 5062.9854409378695], - [1954.87287160549, 5062.9854409378695], - [2054.17287160549, 5228.585440937869], - [2153.4728716054897, 5228.585440937869], - [2252.7728716054894, 5062.9854409378695], - [2352.072871605489, 5228.585440937869], - [2451.372871605489, 5394.185440937868], - [2352.072871605489, 5394.185440937868], - [2252.7728716054894, 5228.585440937869], - [2153.4728716054897, 5062.9854409378695], - [2153.4728716054897, 4897.38544093787], - [2252.7728716054894, 4897.38544093787], - [2352.072871605489, 4731.785440937871], - [2252.7728716054894, 4731.785440937871], - [2153.4728716054897, 4731.785440937871], - [2054.17287160549, 4566.185440937871], - [1954.87287160549, 4731.785440937871], - [1855.57287160549, 4897.38544093787], - [1756.27287160549, 4731.785440937871], - [1855.57287160549, 4731.785440937871], - [1855.57287160549, 4566.185440937871], - [1756.27287160549, 4566.185440937871], - [1656.9728716054901, 4566.185440937871], - [1557.6728716054902, 4731.785440937871], - [1656.9728716054901, 4897.38544093787], - [1557.6728716054902, 5062.9854409378695], - [1458.3728716054902, 5228.585440937869], - [1359.0728716054903, 5228.585440937869], - [1259.7728716054903, 5394.185440937868], - [1259.7728716054903, 5559.785440937868], - [1160.4728716054904, 5559.785440937868], - [1061.1728716054904, 5559.785440937868], - [1160.4728716054904, 5725.385440937867], - [1259.7728716054903, 5725.385440937867], - [1359.0728716054903, 5559.785440937868], - [1458.3728716054902, 5725.385440937867], - [1458.3728716054902, 5559.785440937868], - [1359.0728716054903, 5725.385440937867], - [1259.7728716054903, 5890.985440937867], - [1359.0728716054903, 5890.985440937867], - [1259.7728716054903, 6056.585440937866], - [1359.0728716054903, 6222.185440937866], - [1458.3728716054902, 6222.185440937866], - [1458.3728716054902, 6387.785440937865], - [1557.6728716054902, 6222.185440937866], - [1557.6728716054902, 6387.785440937865], - [1656.9728716054901, 6222.185440937866], - [1756.27287160549, 6056.585440937866], - [1855.57287160549, 5890.985440937867], - [1756.27287160549, 5890.985440937867], - [1656.9728716054901, 6056.585440937866], - [1557.6728716054902, 5890.985440937867], - [1458.3728716054902, 5890.985440937867], - [1359.0728716054903, 6056.585440937866], - [1259.7728716054903, 6222.185440937866], - [1160.4728716054904, 6056.585440937866], - [1061.1728716054904, 5890.985440937867], - [1061.1728716054904, 6056.585440937866], - [1160.4728716054904, 6222.185440937866], - [1061.1728716054904, 6222.185440937866], - [961.8728716054903, 6222.185440937866], - [961.8728716054903, 6056.585440937866], - [961.8728716054903, 5890.985440937867], - [961.8728716054903, 5725.385440937867], - [862.5728716054903, 5559.785440937868], - [763.2728716054902, 5725.385440937867], - [862.5728716054903, 5725.385440937867], - [763.2728716054902, 5890.985440937867], - [663.9728716054901, 5725.385440937867], - [763.2728716054902, 5559.785440937868], - [763.2728716054902, 5394.185440937868], - [862.5728716054903, 5228.585440937869], - [961.8728716054903, 5394.185440937868], - [1061.1728716054904, 5394.185440937868], - [961.8728716054903, 5559.785440937868], - [862.5728716054903, 5394.185440937868], - [763.2728716054902, 5228.585440937869], - [663.9728716054901, 5062.9854409378695], - [763.2728716054902, 5062.9854409378695], - [763.2728716054902, 4897.38544093787], - [663.9728716054901, 4731.785440937871], - [564.6728716054901, 4731.785440937871], - [465.37287160549005, 4566.185440937871], - [366.0728716054901, 4566.185440937871], - [465.37287160549005, 4731.785440937871], - [564.6728716054901, 4566.185440937871], - [465.37287160549005, 4400.585440937872], - [366.0728716054901, 4400.585440937872], - [266.77287160549014, 4234.985440937872], - [167.47287160549016, 4234.985440937872], - [266.77287160549014, 4400.585440937872], - [266.77287160549014, 4566.185440937871], - [167.47287160549016, 4400.585440937872], - [68.17287160549016, 4234.985440937872], - [167.47287160549013, 4069.3854409378723], - [68.17287160549013, 3903.7854409378724], - [68.17287160549013, 4069.3854409378723], - [167.47287160549013, 3903.7854409378724], - [266.77287160549014, 3903.7854409378724], - [366.0728716054901, 3738.1854409378725], - [266.77287160549014, 3738.1854409378725], - [266.77287160549014, 3572.5854409378726], - [167.47287160549016, 3406.9854409378727], - [167.47287160549016, 3241.3854409378728], - [266.77287160549014, 3241.3854409378728], - [266.77287160549014, 3406.9854409378727], - [366.0728716054901, 3572.5854409378726], - [465.37287160549005, 3738.1854409378725], - [465.37287160549005, 3903.7854409378724], - [366.0728716054901, 4069.3854409378723], - [366.0728716054901, 4234.985440937872], - [465.37287160549005, 4234.985440937872], - [564.6728716054901, 4069.3854409378723], - [465.37287160549005, 4069.3854409378723], - [564.6728716054901, 4234.985440937872], - [663.9728716054901, 4069.3854409378723], - [663.9728716054901, 4234.985440937872], - [663.9728716054901, 4400.585440937872], - [763.2728716054902, 4566.185440937871], - [763.2728716054902, 4400.585440937872], - [663.9728716054901, 4566.185440937871], - [564.6728716054901, 4400.585440937872], - [19431.915041401327, 3495.506142643713], - [19332.61504140133, 3661.1061426437127], - [19431.915041401327, 3661.1061426437127], - [19531.215041401327, 3661.1061426437127], - [19630.515041401326, 3495.506142643713], - [19630.515041401326, 3661.1061426437127], - [19729.815041401325, 3826.7061426437126], - [19630.515041401326, 3826.7061426437126], - [19729.815041401325, 3992.3061426437125], - [19630.515041401326, 3992.3061426437125], - [19630.515041401326, 4157.906142643712], - [19630.515041401326, 4323.506142643711], - [19531.215041401327, 4157.906142643712], - [19431.915041401327, 4323.506142643711], - [19531.215041401327, 4489.106142643711], - [19431.915041401327, 4654.70614264371], - [19332.61504140133, 4654.70614264371], - [19332.61504140133, 4820.30614264371], - [19332.61504140133, 4985.906142643709], - [19233.31504140133, 4985.906142643709], - [19134.01504140133, 5151.506142643709], - [19034.71504140133, 5151.506142643709], - [19134.01504140133, 5317.106142643708], - [19034.71504140133, 5317.106142643708], - [19034.71504140133, 5482.706142643708], - [18935.41504140133, 5648.306142643707], - [18836.115041401332, 5813.9061426437065], - [18836.115041401332, 5979.506142643706], - [18935.41504140133, 5979.506142643706], - [19034.71504140133, 6145.106142643705], - [19034.71504140133, 5979.506142643706], - [19034.71504140133, 5813.9061426437065], - [19134.01504140133, 5648.306142643707], - [19233.31504140133, 5648.306142643707], - [19134.01504140133, 5813.9061426437065], - [19134.01504140133, 5979.506142643706], - [19233.31504140133, 5813.9061426437065], - [19233.31504140133, 5979.506142643706], - [19332.61504140133, 6145.106142643705], - [19332.61504140133, 6310.706142643705], - [19233.31504140133, 6310.706142643705], - [19233.31504140133, 6476.306142643704], - [19332.61504140133, 6476.306142643704], - [19431.915041401327, 6641.906142643704], - [19332.61504140133, 6807.506142643703], - [19332.61504140133, 6641.906142643704], - [19431.915041401327, 6476.306142643704], - [19431.915041401327, 6310.706142643705], - [19531.215041401327, 6145.106142643705], - [19431.915041401327, 5979.506142643706], - [19431.915041401327, 6145.106142643705], - [19531.215041401327, 5979.506142643706], - [19630.515041401326, 5813.9061426437065], - [19630.515041401326, 5979.506142643706], - [19729.815041401325, 5813.9061426437065], - [19829.115041401325, 5979.506142643706], - [19729.815041401325, 5979.506142643706], - [19729.815041401325, 6145.106142643705], - [19729.815041401325, 6310.706142643705], - [19630.515041401326, 6476.306142643704], - [19729.815041401325, 6476.306142643704], - [19630.515041401326, 6310.706142643705], - [19531.215041401327, 6310.706142643705], - [19531.215041401327, 6476.306142643704], - [19630.515041401326, 6641.906142643704], - [19729.815041401325, 6807.506142643703], - [19829.115041401325, 6973.106142643703], - [19928.415041401324, 6973.106142643703], - [19928.415041401324, 7138.706142643702], - [20027.715041401323, 7138.706142643702], - [20027.715041401323, 7304.306142643702], - [19928.415041401324, 7304.306142643702], - [19829.115041401325, 7304.306142643702], - [19829.115041401325, 7469.906142643701], - [19928.415041401324, 7469.906142643701], - [19928.415041401324, 7635.5061426437005], - [19928.415041401324, 7801.1061426437], - [20027.715041401323, 7635.5061426437005], - [20027.715041401323, 7801.1061426437], - [20127.015041401322, 7801.1061426437], - [20226.31504140132, 7801.1061426437], - [20325.61504140132, 7801.1061426437], - [20226.31504140132, 7635.5061426437005], - [20226.31504140132, 7469.906142643701], - [20226.31504140132, 7304.306142643702], - [20127.015041401322, 7304.306142643702], - [20027.715041401323, 7469.906142643701], - [20127.015041401322, 7469.906142643701], - [20127.015041401322, 7635.5061426437005], - [2748.790306732237, 2362.9553147492866], - [2848.0903067322365, 2528.5553147492865], - [2748.790306732237, 2694.1553147492864], - [2649.490306732237, 2859.7553147492863], - [2748.790306732237, 3025.355314749286], - [2848.0903067322365, 2859.7553147492863], - [2848.0903067322365, 2694.1553147492864], - [2947.3903067322362, 2694.1553147492864], - [3046.690306732236, 2859.7553147492863], - [3145.9903067322357, 2694.1553147492864], - [3145.9903067322357, 2528.5553147492865], - [3046.690306732236, 2694.1553147492864], - [3145.9903067322357, 2859.7553147492863], - [3046.690306732236, 3025.355314749286], - [3145.9903067322357, 3025.355314749286], - [3245.2903067322354, 3190.955314749286], - [3245.2903067322354, 3356.555314749286], - [3344.590306732235, 3522.155314749286], - [3443.890306732235, 3356.555314749286], - [3543.1903067322346, 3356.555314749286], - [3642.4903067322343, 3190.955314749286], - [3741.790306732234, 3025.355314749286], - [3741.790306732234, 2859.7553147492863], - [3841.090306732234, 3025.355314749286], - [3841.090306732234, 3190.955314749286], - [3741.790306732234, 3190.955314749286], - [3642.4903067322343, 3025.355314749286], - [3543.1903067322346, 3025.355314749286], - [3543.1903067322346, 2859.7553147492863], - [3443.890306732235, 3025.355314749286], - [3443.890306732235, 3190.955314749286], - [3543.1903067322346, 3190.955314749286], - [3642.4903067322343, 3356.555314749286], - [3543.1903067322346, 3522.155314749286], - [3443.890306732235, 3687.755314749286], - [3443.890306732235, 3853.3553147492858], - [3344.590306732235, 3687.755314749286], - [3245.2903067322354, 3853.3553147492858], - [3245.2903067322354, 3687.755314749286], - [3145.9903067322357, 3687.755314749286], - [3046.690306732236, 3853.3553147492858], - [3145.9903067322357, 4018.9553147492857], - [3145.9903067322357, 3853.3553147492858], - [3046.690306732236, 3687.755314749286], - [3145.9903067322357, 3522.155314749286], - [3145.9903067322357, 3356.555314749286], - [3145.9903067322357, 3190.955314749286], - [3046.690306732236, 3190.955314749286], - [3046.690306732236, 3356.555314749286], - [2947.3903067322362, 3356.555314749286], - [2848.0903067322365, 3190.955314749286], - [2947.3903067322362, 3025.355314749286], - [2848.0903067322365, 3025.355314749286], - [2748.790306732237, 2859.7553147492863], - [2649.490306732237, 2694.1553147492864], - [2748.790306732237, 2528.5553147492865], - [2848.0903067322365, 2362.9553147492866], - [2748.790306732237, 2197.3553147492867], - [2649.490306732237, 2362.9553147492866], - [2649.490306732237, 2197.3553147492867], - [2550.1903067322373, 2362.9553147492866], - [2450.8903067322376, 2362.9553147492866], - [2351.590306732238, 2528.5553147492865], - [2252.290306732238, 2528.5553147492865], - [2351.590306732238, 2362.9553147492866], - [2252.290306732238, 2197.3553147492867], - [2351.590306732238, 2197.3553147492867], - [2351.590306732238, 2031.7553147492865], - [2351.590306732238, 1866.1553147492864], - [2252.290306732238, 1866.1553147492864], - [2351.590306732238, 1700.5553147492863], - [2450.8903067322376, 1534.9553147492861], - [2351.590306732238, 1369.355314749286], - [2252.290306732238, 1203.7553147492858], - [2252.290306732238, 1369.355314749286], - [2252.290306732238, 1534.9553147492861], - [2152.9903067322384, 1369.355314749286], - [2053.6903067322387, 1369.355314749286], - [1954.3903067322387, 1203.7553147492858], - [1855.0903067322388, 1203.7553147492858], - [1755.7903067322388, 1038.1553147492857], - [1656.4903067322389, 1038.1553147492857], - [1557.190306732239, 872.5553147492857], - [1457.890306732239, 1038.1553147492857], - [1457.890306732239, 872.5553147492857], - [1457.890306732239, 706.9553147492858], - [1557.190306732239, 706.9553147492858], - [1656.4903067322389, 872.5553147492857], - [1656.4903067322389, 706.9553147492858], - [1755.7903067322388, 706.9553147492858], - [1656.4903067322389, 541.3553147492859], - [1557.190306732239, 375.7553147492859], - [1656.4903067322389, 210.1553147492859], - [1755.7903067322388, 44.55531474928592], - [1656.4903067322389, 44.55531474928592], - [1557.190306732239, 210.1553147492859], - [1457.890306732239, 210.1553147492859], - [1457.890306732239, 44.55531474928592], - [1358.590306732239, 210.1553147492859], - [1358.590306732239, 375.75531474928584], - [1259.290306732239, 210.15531474928585], - [1259.290306732239, 375.75531474928584], - [1259.290306732239, 541.3553147492859], - [1358.590306732239, 706.9553147492858], - [1358.590306732239, 872.5553147492857], - [1259.290306732239, 706.9553147492858], - [1259.290306732239, 872.5553147492857], - [1259.290306732239, 1038.1553147492857], - [1358.590306732239, 1203.7553147492858], - [1358.590306732239, 1038.1553147492857], - [1457.890306732239, 1203.7553147492858], - [1557.190306732239, 1369.355314749286], - [1656.4903067322389, 1203.7553147492858], - [1557.190306732239, 1203.7553147492858], - [1557.190306732239, 1038.1553147492857], - [17254.572515546668, 1460.5807801244923], - [17353.872515546667, 1626.1807801244925], - [17453.172515546667, 1791.7807801244926], - [17552.472515546666, 1791.7807801244926], - [17453.172515546667, 1626.1807801244925], - [17353.872515546667, 1791.7807801244926], - [17453.172515546667, 1957.3807801244927], - [17353.872515546667, 2122.980780124493], - [17453.172515546667, 2288.580780124493], - [17353.872515546667, 2454.1807801244927], - [17453.172515546667, 2619.7807801244926], - [17552.472515546666, 2619.7807801244926], - [17453.172515546667, 2785.3807801244925], - [17353.872515546667, 2619.7807801244926], - [17254.572515546668, 2454.1807801244927], - [17254.572515546668, 2288.580780124493], - [17353.872515546667, 2288.580780124493], - [17453.172515546667, 2122.980780124493], - [17552.472515546666, 2288.580780124493], - [17552.472515546666, 2454.1807801244927], - [17453.172515546667, 2454.1807801244927], - [4447.67624466283, 4761.1416826913], - [4546.97624466283, 4595.541682691301], - [4546.97624466283, 4429.941682691301], - [4447.67624466283, 4429.941682691301], - [4447.67624466283, 4595.541682691301], - [4348.37624466283, 4595.541682691301], - [4249.07624466283, 4595.541682691301], - [4348.37624466283, 4761.1416826913], - [4249.07624466283, 4761.1416826913], - [4348.37624466283, 4926.7416826912995], - [4348.37624466283, 5092.341682691299], - [4447.67624466283, 5257.941682691298], - [4546.97624466283, 5257.941682691298], - [4646.27624466283, 5092.341682691299], - [4546.97624466283, 5092.341682691299], - [4646.27624466283, 4926.7416826912995], - [4646.27624466283, 4761.1416826913], - [4546.97624466283, 4761.1416826913], - [4646.27624466283, 4595.541682691301], - [4745.5762446628305, 4595.541682691301], - [4646.27624466283, 4429.941682691301], - [4745.5762446628305, 4429.941682691301], - [4844.876244662831, 4595.541682691301], - [4745.5762446628305, 4761.1416826913], - [4745.5762446628305, 4926.7416826912995], - [4844.876244662831, 4761.1416826913], - [4944.176244662831, 4761.1416826913], - [5043.476244662831, 4926.7416826912995], - [5043.476244662831, 4761.1416826913], - [5142.776244662831, 4926.7416826912995], - [5142.776244662831, 4761.1416826913], - [5242.076244662831, 4595.541682691301], - [5142.776244662831, 4595.541682691301], - [5242.076244662831, 4429.941682691301], - [5242.076244662831, 4264.341682691302], - [5142.776244662831, 4429.941682691301], - [5043.476244662831, 4595.541682691301], - [5043.476244662831, 4429.941682691301], - [5043.476244662831, 4264.341682691302], - [5142.776244662831, 4098.741682691302], - [5043.476244662831, 4098.741682691302], - [4944.176244662831, 3933.1416826913023], - [4944.176244662831, 4098.741682691302], - [4944.176244662831, 4264.341682691302], - [4844.876244662831, 4098.741682691302], - [4745.5762446628305, 4264.341682691302], - [4646.27624466283, 4098.741682691302], - [4546.97624466283, 3933.1416826913023], - [4447.67624466283, 4098.741682691302], - [4546.97624466283, 4264.341682691302], - [4447.67624466283, 4264.341682691302], - [4546.97624466283, 4098.741682691302], - [4646.27624466283, 3933.1416826913023], - [4546.97624466283, 3767.5416826913024], - [4447.67624466283, 3601.9416826913025], - [4447.67624466283, 3767.5416826913024], - [4348.37624466283, 3767.5416826913024], - [4348.37624466283, 3933.1416826913023], - [4249.07624466283, 3767.5416826913024], - [4249.07624466283, 3933.1416826913023], - [4149.776244662829, 3933.1416826913023], - [4050.4762446628297, 4098.741682691302], - [4050.4762446628297, 3933.1416826913023], - [3951.17624466283, 3933.1416826913023], - [3951.17624466283, 4098.741682691302], - [3851.8762446628302, 4264.341682691302], - [3851.8762446628302, 4098.741682691302], - [3752.5762446628305, 4098.741682691302], - [3653.276244662831, 4264.341682691302], - [3553.976244662831, 4429.941682691301], - [3553.976244662831, 4595.541682691301], - [3454.6762446628313, 4429.941682691301], - [3553.976244662831, 4264.341682691302], - [3653.276244662831, 4429.941682691301], - [3752.5762446628305, 4264.341682691302], - [3752.5762446628305, 4429.941682691301], - [3851.8762446628302, 4595.541682691301], - [3851.8762446628302, 4429.941682691301], - [3951.17624466283, 4429.941682691301], - [4050.4762446628297, 4264.341682691302], - [4149.776244662829, 4098.741682691302], - [4249.07624466283, 4264.341682691302], - [4348.37624466283, 4098.741682691302], - [4447.67624466283, 3933.1416826913023], - [9574.088902135607, 7352.26293905581], - [9474.788902135606, 7352.26293905581], - [9375.488902135605, 7186.662939055811], - [9474.788902135606, 7021.0629390558115], - [9574.088902135607, 7021.0629390558115], - [9474.788902135606, 7186.662939055811], - [9574.088902135607, 7186.662939055811], - [9673.388902135608, 7021.0629390558115], - [9673.388902135608, 6855.462939055812], - [9772.68890213561, 6689.862939055813], - [9673.388902135608, 6689.862939055813], - [9772.68890213561, 6524.262939055813], - [9871.98890213561, 6358.662939055814], - [9971.288902135611, 6524.262939055813], - [10070.588902135612, 6358.662939055814], - [10070.588902135612, 6193.062939055814], - [9971.288902135611, 6027.462939055815], - [9971.288902135611, 5861.862939055815], - [9871.98890213561, 5861.862939055815], - [9871.98890213561, 5696.262939055816], - [9971.288902135611, 5530.662939055816], - [10070.588902135612, 5530.662939055816], - [10070.588902135612, 5696.262939055816], - [10169.888902135614, 5861.862939055815], - [10169.888902135614, 5696.262939055816], - [10070.588902135612, 5861.862939055815], - [10169.888902135614, 6027.462939055815], - [10169.888902135614, 6193.062939055814], - [10269.188902135615, 6027.462939055815], - [10269.188902135615, 5861.862939055815], - [10368.488902135616, 6027.462939055815], - [10269.188902135615, 6193.062939055814], - [10269.188902135615, 6358.662939055814], - [10169.888902135614, 6358.662939055814], - [10070.588902135612, 6524.262939055813], - [10070.588902135612, 6689.862939055813], - [9971.288902135611, 6855.462939055812], - [9971.288902135611, 7021.0629390558115], - [10070.588902135612, 7186.662939055811], - [10169.888902135614, 7186.662939055811], - [10269.188902135615, 7186.662939055811], - [10169.888902135614, 7352.26293905581], - [10070.588902135612, 7352.26293905581], - [10169.888902135614, 7517.86293905581], - [10169.888902135614, 7683.462939055809], - [10269.188902135615, 7517.86293905581], - [10368.488902135616, 7683.462939055809], - [10467.788902135617, 7683.462939055809], - [10368.488902135616, 7517.86293905581], - [10269.188902135615, 7352.26293905581], - [10368.488902135616, 7352.26293905581], - [10368.488902135616, 7186.662939055811], - [10368.488902135616, 7021.0629390558115], - [10368.488902135616, 6855.462939055812], - [10269.188902135615, 6855.462939055812], - [10169.888902135614, 6855.462939055812], - [10169.888902135614, 7021.0629390558115], - [10070.588902135612, 7021.0629390558115], - [10070.588902135612, 6855.462939055812], - [10169.888902135614, 6689.862939055813], - [10269.188902135615, 6689.862939055813], - [10169.888902135614, 6524.262939055813], - [10269.188902135615, 6524.262939055813], - [10368.488902135616, 6524.262939055813], - [10368.488902135616, 6358.662939055814], - [10467.788902135617, 6358.662939055814], - [10467.788902135617, 6193.062939055814], - [10567.088902135618, 6358.662939055814], - [10567.088902135618, 6193.062939055814], - [10666.388902135619, 6193.062939055814], - [10666.388902135619, 6358.662939055814], - [10567.088902135618, 6524.262939055813], - [10467.788902135617, 6524.262939055813], - [10567.088902135618, 6689.862939055813], - [10467.788902135617, 6855.462939055812], - [10567.088902135618, 7021.0629390558115], - [10467.788902135617, 7021.0629390558115], - [10567.088902135618, 6855.462939055812], - [10467.788902135617, 6689.862939055813], - [10368.488902135616, 6689.862939055813], - [1073.6944354374714, 1154.3681204032646], - [974.3944354374713, 1319.9681204032647], - [875.0944354374712, 1319.9681204032647], - [775.7944354374712, 1154.3681204032646], - [775.7944354374712, 988.7681204032646], - [875.0944354374712, 823.1681204032647], - [875.0944354374712, 657.5681204032647], - [775.7944354374712, 823.1681204032647], - [676.4944354374711, 657.5681204032647], - [676.4944354374711, 491.9681204032648], - [775.7944354374712, 657.5681204032647], - [676.4944354374711, 823.1681204032647], - [676.4944354374711, 988.7681204032646], - [577.194435437471, 823.1681204032647], - [577.194435437471, 988.7681204032646], - [577.194435437471, 1154.3681204032646], - [676.4944354374711, 1319.9681204032647], - [577.194435437471, 1319.9681204032647], - [477.89443543747103, 1319.9681204032647], - [577.194435437471, 1485.5681204032649], - [477.89443543747103, 1651.168120403265], - [577.194435437471, 1816.7681204032651], - [477.89443543747103, 1816.7681204032651], - [378.5944354374711, 1982.3681204032653], - [378.5944354374711, 2147.9681204032654], - [279.2944354374711, 2313.5681204032653], - [179.99443543747114, 2147.9681204032654], - [80.69443543747114, 2313.5681204032653], - [80.69443543747114, 2479.168120403265], - [179.9944354374711, 2644.768120403265], - [179.9944354374711, 2479.168120403265], - [179.9944354374711, 2313.5681204032653], - [80.69443543747111, 2147.9681204032654], - [80.69443543747111, 1982.3681204032653], - [179.9944354374711, 1982.3681204032653], - [179.9944354374711, 1816.7681204032651], - [80.69443543747111, 1816.7681204032651], - [179.9944354374711, 1651.168120403265], - [80.69443543747111, 1485.5681204032649], - [80.69443543747111, 1319.9681204032647], - [179.9944354374711, 1154.3681204032646], - [80.69443543747111, 1154.3681204032646], - [179.9944354374711, 988.7681204032646], - [279.2944354374711, 823.1681204032647], - [378.5944354374711, 657.5681204032647], - [378.5944354374711, 823.1681204032647], - [477.89443543747103, 823.1681204032647], - [477.89443543747103, 657.5681204032647], - [378.5944354374711, 491.9681204032648], - [477.89443543747103, 326.3681204032648], - [477.89443543747103, 160.76812040326482], - [378.5944354374711, 160.76812040326482], - [279.2944354374711, 326.3681204032648], - [179.99443543747114, 491.9681204032648], - [179.99443543747114, 326.3681204032648], - [279.2944354374711, 491.9681204032648], - [279.2944354374711, 657.5681204032647], - [179.99443543747114, 823.1681204032647], - [279.2944354374711, 988.7681204032646], - [279.2944354374711, 1154.3681204032646], - [378.5944354374711, 1319.9681204032647], - [477.89443543747103, 1485.5681204032649], - [577.194435437471, 1651.168120403265], - [676.4944354374711, 1651.168120403265], - [775.7944354374712, 1816.7681204032651], - [676.4944354374711, 1816.7681204032651], - [775.7944354374712, 1651.168120403265], - [875.0944354374712, 1651.168120403265], - [974.3944354374713, 1651.168120403265], - [875.0944354374712, 1485.5681204032649], - [775.7944354374712, 1485.5681204032649], - [676.4944354374711, 1485.5681204032649], - [775.7944354374712, 1319.9681204032647], - [676.4944354374711, 1154.3681204032646], - [3138.413562431697, 2355.845602060523], - [3039.113562431697, 2521.445602060523], - [3039.113562431697, 2355.845602060523], - [3039.113562431697, 2190.245602060523], - [3138.413562431697, 2024.645602060523], - [3237.7135624316966, 1859.045602060523], - [3237.7135624316966, 2024.645602060523], - [3337.0135624316963, 1859.045602060523], - [3337.0135624316963, 1693.4456020605228], - [3436.313562431696, 1527.8456020605227], - [3535.6135624316958, 1693.4456020605228], - [3535.6135624316958, 1859.045602060523], - [3634.9135624316955, 2024.645602060523], - [3734.213562431695, 2190.245602060523], - [3634.9135624316955, 2190.245602060523], - [3535.6135624316958, 2190.245602060523], - [3535.6135624316958, 2355.845602060523], - [3535.6135624316958, 2521.445602060523], - [3436.313562431696, 2687.045602060523], - [3436.313562431696, 2852.645602060523], - [3535.6135624316958, 2687.045602060523], - [3634.9135624316955, 2521.445602060523], - [3634.9135624316955, 2355.845602060523], - [3734.213562431695, 2355.845602060523], - [3833.513562431695, 2190.245602060523], - [3932.8135624316947, 2024.645602060523], - [3833.513562431695, 1859.045602060523], - [3833.513562431695, 1693.4456020605228], - [3734.213562431695, 1859.045602060523], - [3734.213562431695, 1693.4456020605228], - [3734.213562431695, 1527.8456020605227], - [3634.9135624316955, 1527.8456020605227], - [3634.9135624316955, 1693.4456020605228], - [3535.6135624316958, 1527.8456020605227], - [3634.9135624316955, 1362.2456020605225], - [3535.6135624316958, 1362.2456020605225], - [3436.313562431696, 1196.6456020605224], - [3535.6135624316958, 1196.6456020605224], - [3535.6135624316958, 1031.0456020605222], - [3436.313562431696, 1031.0456020605222], - [3535.6135624316958, 865.4456020605222], - [3436.313562431696, 865.4456020605222], - [3535.6135624316958, 699.8456020605223], - [3634.9135624316955, 699.8456020605223], - [3535.6135624316958, 534.2456020605224], - [3436.313562431696, 368.64560206052244], - [3436.313562431696, 203.04560206052244], - [3337.0135624316963, 37.445602060522454], - [3436.313562431696, 37.445602060522454], - [3337.0135624316963, 203.04560206052244], - [3237.7135624316966, 37.445602060522454], - [3138.413562431697, 37.445602060522454], - [3237.7135624316966, 203.04560206052244], - [3337.0135624316963, 368.6456020605224], - [3436.313562431696, 534.2456020605224], - [3337.0135624316963, 699.8456020605223], - [3237.7135624316966, 534.2456020605224], - [3337.0135624316963, 534.2456020605224], - [3436.313562431696, 699.8456020605223], - [3337.0135624316963, 865.4456020605222], - [3237.7135624316966, 865.4456020605222], - [3337.0135624316963, 1031.0456020605222], - [3237.7135624316966, 1196.6456020605224], - [3138.413562431697, 1362.2456020605225], - [3039.113562431697, 1527.8456020605227], - [3138.413562431697, 1527.8456020605227], - [3039.113562431697, 1693.4456020605228], - [2939.8135624316974, 1527.8456020605227], - [2840.5135624316977, 1362.2456020605225], - [2840.5135624316977, 1527.8456020605227], - [2840.5135624316977, 1693.4456020605228], - [2939.8135624316974, 1859.045602060523], - [2840.5135624316977, 2024.645602060523], - [2840.5135624316977, 1859.045602060523], - [2939.8135624316974, 1693.4456020605228], - [3039.113562431697, 1859.045602060523], - [3039.113562431697, 2024.645602060523], - [2939.8135624316974, 2190.245602060523], - [2939.8135624316974, 2024.645602060523], - [16388.412117675925, 1839.818884803299], - [16289.112117675924, 1839.818884803299], - [16388.412117675925, 1674.2188848032988], - [16487.712117675925, 1508.6188848032987], - [16487.712117675925, 1674.2188848032988], - [16388.412117675925, 1508.6188848032987], - [16289.112117675924, 1343.0188848032985], - [16289.112117675924, 1508.6188848032987], - [16189.812117675923, 1674.2188848032988], - [16090.512117675922, 1839.818884803299], - [16090.512117675922, 2005.418884803299], - [15991.212117675921, 2171.018884803299], - [16090.512117675922, 2336.618884803299], - [16090.512117675922, 2502.218884803299], - [16090.512117675922, 2667.8188848032987], - [15991.212117675921, 2833.4188848032986], - [15991.212117675921, 2999.0188848032985], - [15891.91211767592, 3164.6188848032984], - [15891.91211767592, 3330.2188848032984], - [15991.212117675921, 3330.2188848032984], - [16090.512117675922, 3330.2188848032984], - [16189.812117675923, 3495.8188848032983], - [16289.112117675924, 3495.8188848032983], - [16189.812117675923, 3330.2188848032984], - [16189.812117675923, 3164.6188848032984], - [16289.112117675924, 3164.6188848032984], - [16388.412117675925, 3164.6188848032984], - [16388.412117675925, 3330.2188848032984], - [16487.712117675925, 3330.2188848032984], - [16587.012117675924, 3495.8188848032983], - [16587.012117675924, 3661.418884803298], - [16686.312117675923, 3661.418884803298], - [16785.612117675922, 3661.418884803298], - [16884.91211767592, 3661.418884803298], - [16984.21211767592, 3661.418884803298], - [16884.91211767592, 3827.018884803298], - [16884.91211767592, 3992.618884803298], - [16984.21211767592, 3827.018884803298], - [17083.51211767592, 3661.418884803298], - [17182.81211767592, 3495.8188848032983], - [17182.81211767592, 3330.2188848032984], - [17282.11211767592, 3164.6188848032984], - [17282.11211767592, 3330.2188848032984], - [17182.81211767592, 3164.6188848032984], - [17083.51211767592, 3164.6188848032984], - [16984.21211767592, 3330.2188848032984], - [16984.21211767592, 3495.8188848032983], - [17083.51211767592, 3330.2188848032984], - [16984.21211767592, 3164.6188848032984], - [16984.21211767592, 2999.0188848032985], - [17083.51211767592, 2833.4188848032986], - [17083.51211767592, 2667.8188848032987], - [17182.81211767592, 2667.8188848032987], - [17182.81211767592, 2833.4188848032986], - [17083.51211767592, 2999.0188848032985], - [16984.21211767592, 2833.4188848032986], - [16884.91211767592, 2833.4188848032986], - [16884.91211767592, 2999.0188848032985], - [16785.612117675922, 2999.0188848032985], - [16884.91211767592, 3164.6188848032984], - [16785.612117675922, 3164.6188848032984], - [16686.312117675923, 3164.6188848032984], - [16587.012117675924, 3164.6188848032984], - [16587.012117675924, 2999.0188848032985], - [16487.712117675925, 3164.6188848032984], - [16587.012117675924, 3330.2188848032984], - [16686.312117675923, 3495.8188848032983], - [16686.312117675923, 3330.2188848032984], - [16785.612117675922, 3330.2188848032984], - [16884.91211767592, 3495.8188848032983], - [16785.612117675922, 3495.8188848032983], - [16884.91211767592, 3330.2188848032984], - [1272.175991128079, 3842.7700224365044], - [1371.475991128079, 3842.7700224365044], - [1272.175991128079, 3677.1700224365045], - [1172.875991128079, 3511.5700224365046], - [1272.175991128079, 3511.5700224365046], - [1172.875991128079, 3345.9700224365047], - [1073.575991128079, 3180.3700224365048], - [1073.575991128079, 3014.770022436505], - [974.275991128079, 3014.770022436505], - [874.9759911280789, 3014.770022436505], - [775.6759911280789, 2849.170022436505], - [775.6759911280789, 3014.770022436505], - [775.6759911280789, 3180.3700224365048], - [676.3759911280788, 3345.9700224365047], - [676.3759911280788, 3511.5700224365046], - [775.6759911280789, 3677.1700224365045], - [676.3759911280788, 3842.7700224365044], - [577.0759911280787, 3842.7700224365044], - [577.0759911280787, 3677.1700224365045], - [676.3759911280788, 3677.1700224365045], - [775.6759911280789, 3511.5700224365046], - [775.6759911280789, 3345.9700224365047], - [874.9759911280789, 3345.9700224365047], - [874.9759911280789, 3180.3700224365048], - [974.275991128079, 3180.3700224365048], - [974.275991128079, 3345.9700224365047], - [1073.575991128079, 3511.5700224365046], - [1073.575991128079, 3677.1700224365045], - [1172.875991128079, 3677.1700224365045], - [1172.875991128079, 3842.7700224365044], - [1073.575991128079, 3842.7700224365044], - [1172.875991128079, 4008.3700224365043], - [1073.575991128079, 4008.3700224365043], - [974.275991128079, 3842.7700224365044], - [974.275991128079, 4008.3700224365043], - [874.9759911280789, 4008.3700224365043], - [775.6759911280789, 4008.3700224365043], - [874.9759911280789, 3842.7700224365044], - [974.275991128079, 3677.1700224365045], - [974.275991128079, 3511.5700224365046], - [1073.575991128079, 3345.9700224365047], - [1172.875991128079, 3180.3700224365048], - [1272.175991128079, 3180.3700224365048], - [1272.175991128079, 3345.9700224365047], - [1371.475991128079, 3180.3700224365048], - [1470.7759911280789, 3345.9700224365047], - [1371.475991128079, 3345.9700224365047], - [1371.475991128079, 3511.5700224365046], - [1470.7759911280789, 3511.5700224365046], - [1570.0759911280788, 3677.1700224365045], - [1470.7759911280789, 3677.1700224365045], - [1570.0759911280788, 3511.5700224365046], - [1669.3759911280788, 3511.5700224365046], - [1669.3759911280788, 3677.1700224365045], - [1768.6759911280787, 3842.7700224365044], - [1669.3759911280788, 3842.7700224365044], - [1768.6759911280787, 4008.3700224365043], - [1867.9759911280787, 3842.7700224365044], - [1967.2759911280787, 3677.1700224365045], - [2066.5759911280784, 3842.7700224365044], - [2165.875991128078, 3677.1700224365045], - [2066.5759911280784, 3511.5700224365046], - [2165.875991128078, 3511.5700224365046], - [2066.5759911280784, 3677.1700224365045], - [2165.875991128078, 3842.7700224365044], - [2265.175991128078, 4008.3700224365043], - [2364.4759911280776, 4008.3700224365043], - [2265.175991128078, 3842.7700224365044], - [2364.4759911280776, 3677.1700224365045], - [2463.7759911280773, 3842.7700224365044], - [2463.7759911280773, 4008.3700224365043], - [2364.4759911280776, 3842.7700224365044], - [6853.940039224797, 6050.837897021371], - [6953.240039224797, 6050.837897021371], - [7052.5400392247975, 5885.237897021371], - [7052.5400392247975, 5719.637897021372], - [7151.840039224798, 5885.237897021371], - [7052.5400392247975, 6050.837897021371], - [7052.5400392247975, 6216.43789702137], - [7052.5400392247975, 6382.03789702137], - [6953.240039224797, 6382.03789702137], - [6953.240039224797, 6216.43789702137], - [6853.940039224797, 6216.43789702137], - [6853.940039224797, 6382.03789702137], - [6754.640039224797, 6216.43789702137], - [6754.640039224797, 6382.03789702137], - [6754.640039224797, 6547.637897021369], - [6754.640039224797, 6713.237897021369], - [6655.340039224797, 6713.237897021369], - [6754.640039224797, 6878.837897021368], - [6853.940039224797, 6713.237897021369], - [6853.940039224797, 6878.837897021368], - [6953.240039224797, 6713.237897021369], - [7052.5400392247975, 6547.637897021369], - [7151.840039224798, 6713.237897021369], - [7151.840039224798, 6547.637897021369], - [7151.840039224798, 6382.03789702137], - [7251.140039224798, 6547.637897021369], - [7251.140039224798, 6713.237897021369], - [7350.440039224798, 6878.837897021368], - [7449.740039224798, 6878.837897021368], - [7449.740039224798, 6713.237897021369], - [7549.040039224798, 6547.637897021369], - [7449.740039224798, 6382.03789702137], - [7449.740039224798, 6216.43789702137], - [7549.040039224798, 6050.837897021371], - [7648.340039224799, 6216.43789702137], - [7549.040039224798, 6382.03789702137], - [7648.340039224799, 6382.03789702137], - [7747.640039224799, 6216.43789702137], - [7846.940039224799, 6382.03789702137], - [7946.240039224799, 6382.03789702137], - [7946.240039224799, 6547.637897021369], - [7846.940039224799, 6713.237897021369], - [7946.240039224799, 6713.237897021369], - [8045.540039224799, 6547.637897021369], - [8045.540039224799, 6713.237897021369], - [7946.240039224799, 6878.837897021368], - [7946.240039224799, 7044.4378970213675], - [8045.540039224799, 7210.037897021367], - [8144.8400392247995, 7375.637897021366], - [8144.8400392247995, 7541.237897021366], - [8045.540039224799, 7375.637897021366], - [8144.8400392247995, 7210.037897021367], - [8045.540039224799, 7044.4378970213675], - [7946.240039224799, 7210.037897021367], - [7846.940039224799, 7210.037897021367], - [7946.240039224799, 7375.637897021366], - [8045.540039224799, 7541.237897021366], - [8144.8400392247995, 7706.837897021365], - [8244.1400392248, 7541.237897021366], - [8343.4400392248, 7541.237897021366], - [8343.4400392248, 7706.837897021365], - [8244.1400392248, 7706.837897021365], - [4735.523842661975, 3503.497768214323], - [4636.223842661975, 3337.897768214323], - [4536.923842661975, 3337.897768214323], - [4437.623842661975, 3172.2977682143232], - [4338.323842661975, 3172.2977682143232], - [4239.023842661974, 3172.2977682143232], - [4338.323842661975, 3006.6977682143233], - [4437.623842661975, 2841.0977682143234], - [4338.323842661975, 2675.4977682143235], - [4338.323842661975, 2509.8977682143236], - [4239.023842661974, 2675.4977682143235], - [4139.723842661974, 2509.8977682143236], - [4040.4238426619745, 2344.2977682143237], - [4139.723842661974, 2178.697768214324], - [4239.023842661974, 2178.697768214324], - [4139.723842661974, 2344.2977682143237], - [4040.4238426619745, 2178.697768214324], - [4139.723842661974, 2013.0977682143237], - [4139.723842661974, 1847.4977682143235], - [4239.023842661974, 2013.0977682143237], - [4239.023842661974, 1847.4977682143235], - [4338.323842661975, 1847.4977682143235], - [4437.623842661975, 1847.4977682143235], - [4536.923842661975, 1681.8977682143234], - [4437.623842661975, 1516.2977682143232], - [4536.923842661975, 1516.2977682143232], - [4536.923842661975, 1350.697768214323], - [4437.623842661975, 1350.697768214323], - [4536.923842661975, 1185.097768214323], - [4636.223842661975, 1019.497768214323], - [4536.923842661975, 853.897768214323], - [4636.223842661975, 853.897768214323], - [4735.523842661975, 688.2977682143231], - [4636.223842661975, 522.6977682143232], - [4636.223842661975, 357.09776821432325], - [4735.523842661975, 357.09776821432325], - [4735.523842661975, 522.6977682143232], - [4636.223842661975, 688.2977682143231], - [4735.523842661975, 853.897768214323], - [4834.8238426619755, 853.897768214323], - [4735.523842661975, 1019.497768214323], - [4735.523842661975, 1185.097768214323], - [4735.523842661975, 1350.697768214323], - [4834.8238426619755, 1516.2977682143232], - [4735.523842661975, 1516.2977682143232], - [4834.8238426619755, 1350.697768214323], - [4834.8238426619755, 1185.097768214323], - [4934.123842661976, 1350.697768214323], - [5033.423842661976, 1185.097768214323], - [5033.423842661976, 1019.497768214323], - [5033.423842661976, 853.897768214323], - [4934.123842661976, 853.897768214323], - [4934.123842661976, 1019.497768214323], - [4834.8238426619755, 1019.497768214323], - [4934.123842661976, 1185.097768214323], - [5033.423842661976, 1350.697768214323], - [5132.723842661976, 1350.697768214323], - [5132.723842661976, 1185.097768214323], - [5232.023842661976, 1019.497768214323], - [5232.023842661976, 1185.097768214323], - [5331.323842661976, 1019.497768214323], - [5430.623842661977, 1019.497768214323], - [5529.923842661977, 1185.097768214323], - [5430.623842661977, 1350.697768214323], - [5430.623842661977, 1516.2977682143232], - [5529.923842661977, 1350.697768214323], - [5629.223842661977, 1350.697768214323], - [5728.523842661977, 1350.697768214323], - [5728.523842661977, 1516.2977682143232], - [5728.523842661977, 1681.8977682143234], - [5629.223842661977, 1516.2977682143232], - [5529.923842661977, 1516.2977682143232], - [5629.223842661977, 1681.8977682143234], - [5529.923842661977, 1681.8977682143234], - [5430.623842661977, 1847.4977682143235], - [5331.323842661976, 1847.4977682143235], - [5331.323842661976, 2013.0977682143237], - [5232.023842661976, 2178.697768214324], - [5132.723842661976, 2013.0977682143237], - [5132.723842661976, 2178.697768214324], - [5232.023842661976, 2013.0977682143237], - [5232.023842661976, 1847.4977682143235], - [5232.023842661976, 1681.8977682143234], - [5331.323842661976, 1681.8977682143234], - [5331.323842661976, 1516.2977682143232], - [5331.323842661976, 1350.697768214323], - [5232.023842661976, 1350.697768214323], - [5232.023842661976, 1516.2977682143232], - [5132.723842661976, 1516.2977682143232], - [5132.723842661976, 1681.8977682143234], - [5033.423842661976, 1847.4977682143235], - [5132.723842661976, 1847.4977682143235], - [5033.423842661976, 2013.0977682143237], - [4934.123842661976, 2178.697768214324], - [5033.423842661976, 2344.2977682143237], - [4934.123842661976, 2344.2977682143237], - [4834.8238426619755, 2178.697768214324], - [4834.8238426619755, 2344.2977682143237], - [4735.523842661975, 2344.2977682143237], - [4636.223842661975, 2344.2977682143237], - [4536.923842661975, 2178.697768214324], - [4437.623842661975, 2013.0977682143237], - [4338.323842661975, 2178.697768214324], - [4437.623842661975, 2344.2977682143237], - [4536.923842661975, 2509.8977682143236], - [4636.223842661975, 2675.4977682143235], - [4636.223842661975, 2509.8977682143236], - [4536.923842661975, 2675.4977682143235], - [4636.223842661975, 2841.0977682143234], - [4536.923842661975, 2841.0977682143234], - [4636.223842661975, 3006.6977682143233], - [4735.523842661975, 3172.2977682143232], - [4834.8238426619755, 3006.6977682143233], - [4735.523842661975, 2841.0977682143234], - [4735.523842661975, 3006.6977682143233], - [4636.223842661975, 3172.2977682143232], - [4735.523842661975, 3337.897768214323], - [4834.8238426619755, 3503.497768214323], - [4735.523842661975, 3669.097768214323], - [4834.8238426619755, 3834.697768214323], - [4834.8238426619755, 3669.097768214323], - [4934.123842661976, 3503.497768214323], - [5033.423842661976, 3503.497768214323], - [5033.423842661976, 3337.897768214323], - [4934.123842661976, 3337.897768214323], - [4834.8238426619755, 3172.2977682143232], - [4834.8238426619755, 3337.897768214323], - [4934.123842661976, 3172.2977682143232], - [5033.423842661976, 3006.6977682143233], - [5132.723842661976, 2841.0977682143234], - [5132.723842661976, 3006.6977682143233], - [5232.023842661976, 3172.2977682143232], - [5232.023842661976, 3337.897768214323], - [5132.723842661976, 3337.897768214323], - [5232.023842661976, 3503.497768214323], - [5331.323842661976, 3337.897768214323], - [5331.323842661976, 3503.497768214323], - [5430.623842661977, 3669.097768214323], - [5331.323842661976, 3669.097768214323], - [5430.623842661977, 3503.497768214323], - [5430.623842661977, 3337.897768214323], - [5529.923842661977, 3172.2977682143232], - [5529.923842661977, 3337.897768214323], - [5629.223842661977, 3337.897768214323], - [5728.523842661977, 3337.897768214323], - [5728.523842661977, 3503.497768214323], - [5827.823842661977, 3503.497768214323], - [5927.1238426619775, 3669.097768214323], - [6026.423842661978, 3669.097768214323], - [6125.723842661978, 3503.497768214323], - [6125.723842661978, 3669.097768214323], - [6225.023842661978, 3503.497768214323], - [6225.023842661978, 3337.897768214323], - [6324.323842661978, 3337.897768214323], - [6423.623842661978, 3503.497768214323], - [6324.323842661978, 3669.097768214323], - [6225.023842661978, 3669.097768214323], - [6324.323842661978, 3834.697768214323], - [6423.623842661978, 3834.697768214323], - [6324.323842661978, 4000.297768214323], - [6225.023842661978, 3834.697768214323], - [6125.723842661978, 3834.697768214323], - [6125.723842661978, 4000.297768214323], - [6225.023842661978, 4000.297768214323], - [6225.023842661978, 4165.897768214322], - [6225.023842661978, 4331.497768214322], - [6125.723842661978, 4165.897768214322], - [6026.423842661978, 4000.2977682143223], - [5927.1238426619775, 4165.897768214322], - [6026.423842661978, 4331.497768214322], - [6026.423842661978, 4497.097768214321], - [5927.1238426619775, 4497.097768214321], - [5827.823842661977, 4662.697768214321], - [5728.523842661977, 4828.29776821432], - [5827.823842661977, 4828.29776821432], - [5927.1238426619775, 4828.29776821432], - [5927.1238426619775, 4662.697768214321], - [5827.823842661977, 4497.097768214321], - [5927.1238426619775, 4331.497768214322], - [5827.823842661977, 4165.897768214322], - [5728.523842661977, 4331.497768214322], - [5728.523842661977, 4165.897768214322], - [5629.223842661977, 4000.2977682143223], - [5629.223842661977, 3834.6977682143224], - [5529.923842661977, 3669.0977682143225], - [5629.223842661977, 3503.4977682143226], - [5728.523842661977, 3669.0977682143225], - [5827.823842661977, 3669.0977682143225], - [5927.1238426619775, 3834.6977682143224], - [5927.1238426619775, 4000.2977682143223], - [6026.423842661978, 4165.897768214322], - [6125.723842661978, 4331.497768214322], - [6225.023842661978, 4497.097768214321], - [6225.023842661978, 4662.697768214321], - [6324.323842661978, 4662.697768214321], - [6225.023842661978, 4828.29776821432], - [6324.323842661978, 4828.29776821432], - [6423.623842661978, 4828.29776821432], - [6324.323842661978, 4993.8977682143195], - [6225.023842661978, 5159.497768214319], - [6125.723842661978, 5159.497768214319], - [6026.423842661978, 5325.097768214318], - [5927.1238426619775, 5490.697768214318], - [6026.423842661978, 5656.297768214317], - [5927.1238426619775, 5821.897768214317], - [5927.1238426619775, 5987.497768214316], - [6026.423842661978, 5987.497768214316], - [6026.423842661978, 5821.897768214317], - [5927.1238426619775, 5656.297768214317], - [5827.823842661977, 5656.297768214317], - [5827.823842661977, 5490.697768214318], - [5728.523842661977, 5490.697768214318], - [5629.223842661977, 5325.097768214318], - [5629.223842661977, 5159.497768214319], - [5529.923842661977, 4993.8977682143195], - [5529.923842661977, 5159.497768214319], - [5629.223842661977, 4993.8977682143195], - [5629.223842661977, 4828.29776821432], - [5529.923842661977, 4662.697768214321], - [5430.623842661977, 4828.29776821432], - [5529.923842661977, 4828.29776821432], - [5629.223842661977, 4662.697768214321], - [5728.523842661977, 4662.697768214321], - [5629.223842661977, 4497.097768214321], - [5728.523842661977, 4497.097768214321], - [5827.823842661977, 4331.497768214322], - [10216.161365168813, 2951.605409896135], - [10116.861365168812, 2951.605409896135], - [10017.56136516881, 3117.205409896135], - [9918.26136516881, 3117.205409896135], - [9818.961365168809, 3117.205409896135], - [9719.661365168808, 3282.8054098961347], - [9620.361365168807, 3282.8054098961347], - [9620.361365168807, 3117.205409896135], - [9521.061365168805, 2951.605409896135], - [9521.061365168805, 2786.005409896135], - [9620.361365168807, 2786.005409896135], - [9719.661365168808, 2786.005409896135], - [9818.961365168809, 2620.405409896135], - [9918.26136516881, 2786.005409896135], - [9818.961365168809, 2951.605409896135], - [9818.961365168809, 2786.005409896135], - [9719.661365168808, 2620.405409896135], - [9719.661365168808, 2454.805409896135], - [9620.361365168807, 2289.2054098961353], - [9521.061365168805, 2123.6054098961354], - [9620.361365168807, 1958.0054098961352], - [9719.661365168808, 2123.6054098961354], - [9818.961365168809, 2289.2054098961353], - [9818.961365168809, 2123.6054098961354], - [9818.961365168809, 1958.0054098961352], - [9719.661365168808, 1958.0054098961352], - [9620.361365168807, 1792.405409896135], - [9620.361365168807, 1626.805409896135], - [9521.061365168805, 1461.2054098961348], - [9421.761365168804, 1295.6054098961347], - [9521.061365168805, 1130.0054098961346], - [9521.061365168805, 964.4054098961345], - [9421.761365168804, 964.4054098961345], - [9521.061365168805, 798.8054098961346], - [9620.361365168807, 798.8054098961346], - [9620.361365168807, 964.4054098961345], - [9620.361365168807, 1130.0054098961346], - [9620.361365168807, 1295.6054098961347], - [9620.361365168807, 1461.2054098961348], - [9719.661365168808, 1295.6054098961347], - [9818.961365168809, 1130.0054098961346], - [9918.26136516881, 964.4054098961345], - [9818.961365168809, 964.4054098961345], - [9918.26136516881, 798.8054098961346], - [10017.56136516881, 633.2054098961347], - [9918.26136516881, 467.60540989613474], - [9918.26136516881, 302.0054098961348], - [10017.56136516881, 302.0054098961348], - [10116.861365168812, 136.40540989613478], - [10116.861365168812, 302.0054098961348], - [10116.861365168812, 467.60540989613474], - [10116.861365168812, 633.2054098961347], - [10216.161365168813, 633.2054098961347], - [10216.161365168813, 798.8054098961346], - [10315.461365168814, 633.2054098961347], - [10315.461365168814, 798.8054098961346], - [10414.761365168815, 798.8054098961346], - [10514.061365168816, 633.2054098961347], - [10514.061365168816, 798.8054098961346], - [10414.761365168815, 964.4054098961345], - [10315.461365168814, 964.4054098961345], - [10216.161365168813, 964.4054098961345], - [10116.861365168812, 798.8054098961346], - [10017.56136516881, 798.8054098961346], - [10116.861365168812, 964.4054098961345], - [10216.161365168813, 1130.0054098961346], - [10116.861365168812, 1130.0054098961346], - [10216.161365168813, 1295.6054098961347], - [10216.161365168813, 1461.2054098961348], - [10315.461365168814, 1626.805409896135], - [10315.461365168814, 1792.405409896135], - [10216.161365168813, 1958.0054098961352], - [10216.161365168813, 1792.405409896135], - [10116.861365168812, 1792.405409896135], - [10017.56136516881, 1958.0054098961352], - [9918.26136516881, 2123.6054098961354], - [9918.26136516881, 1958.0054098961352], - [10017.56136516881, 2123.6054098961354], - [10116.861365168812, 2123.6054098961354], - [10017.56136516881, 2289.2054098961353], - [10017.56136516881, 2454.805409896135], - [10116.861365168812, 2289.2054098961353], - [10216.161365168813, 2454.805409896135], - [10315.461365168814, 2620.405409896135], - [10315.461365168814, 2454.805409896135], - [10315.461365168814, 2289.2054098961353], - [10414.761365168815, 2454.805409896135], - [10514.061365168816, 2620.405409896135], - [10613.361365168817, 2786.005409896135], - [10514.061365168816, 2786.005409896135], - [10613.361365168817, 2620.405409896135], - [10514.061365168816, 2454.805409896135], - [10514.061365168816, 2289.2054098961353], - [10613.361365168817, 2289.2054098961353], - [10712.661365168819, 2289.2054098961353], - [10811.96136516882, 2454.805409896135], - [10911.26136516882, 2289.2054098961353], - [10811.96136516882, 2289.2054098961353], - [10712.661365168819, 2454.805409896135], - [10712.661365168819, 2620.405409896135], - [10811.96136516882, 2786.005409896135], - [10911.26136516882, 2620.405409896135], - [10911.26136516882, 2786.005409896135], - [11010.561365168822, 2620.405409896135], - [10911.26136516882, 2454.805409896135], - [10811.96136516882, 2620.405409896135], - [10712.661365168819, 2786.005409896135], - [10811.96136516882, 2951.605409896135], - [10911.26136516882, 2951.605409896135], - [10811.96136516882, 3117.205409896135], - [10712.661365168819, 2951.605409896135], - [10613.361365168817, 2951.605409896135], - [10514.061365168816, 2951.605409896135], - [10414.761365168815, 3117.205409896135], - [10414.761365168815, 2951.605409896135], - [10315.461365168814, 2786.005409896135], - [10216.161365168813, 2620.405409896135], - [10216.161365168813, 2786.005409896135], - [10315.461365168814, 2951.605409896135], - [10315.461365168814, 3117.205409896135], - [10216.161365168813, 3117.205409896135], - [10116.861365168812, 3117.205409896135], - [10017.56136516881, 3282.8054098961347], - [9918.26136516881, 3448.4054098961346], - [9818.961365168809, 3448.4054098961346], - [9818.961365168809, 3614.0054098961346], - [9719.661365168808, 3448.4054098961346], - [9818.961365168809, 3282.8054098961347], - [9719.661365168808, 3117.205409896135], - [9620.361365168807, 2951.605409896135], - [9521.061365168805, 3117.205409896135], - [9521.061365168805, 3282.8054098961347], - [9421.761365168804, 3117.205409896135], - [9421.761365168804, 3282.8054098961347], - [9322.461365168803, 3117.205409896135], - [9421.761365168804, 2951.605409896135], - [9322.461365168803, 2951.605409896135], - [9223.161365168802, 2786.005409896135], - [9322.461365168803, 2620.405409896135], - [9421.761365168804, 2454.805409896135], - [9521.061365168805, 2289.2054098961353], - [9421.761365168804, 2123.6054098961354], - [9421.761365168804, 1958.0054098961352], - [9421.761365168804, 1792.405409896135], - [9521.061365168805, 1626.805409896135], - [9421.761365168804, 1626.805409896135], - [9322.461365168803, 1792.405409896135], - [9322.461365168803, 1626.805409896135], - [9322.461365168803, 1461.2054098961348], - [9421.761365168804, 1461.2054098961348], - [9521.061365168805, 1295.6054098961347], - [9421.761365168804, 1130.0054098961346], - [9322.461365168803, 964.4054098961345], - [9223.161365168802, 964.4054098961345], - [9223.161365168802, 798.8054098961346], - [9322.461365168803, 633.2054098961347], - [9421.761365168804, 798.8054098961346], - [9421.761365168804, 633.2054098961347], - [9521.061365168805, 633.2054098961347], - [9421.761365168804, 467.60540989613474], - [9421.761365168804, 302.0054098961348], - [9322.461365168803, 136.40540989613478], - [9223.161365168802, 302.0054098961348], - [9123.861365168801, 302.0054098961348], - [9024.5613651688, 136.40540989613478], - [9123.861365168801, 136.40540989613478], - [9223.161365168802, 136.40540989613478], - [9322.461365168803, 302.0054098961348], - [9421.761365168804, 136.40540989613478], - [9521.061365168805, 136.40540989613478], - [9620.361365168807, 136.40540989613478], - [9620.361365168807, 302.0054098961348], - [9521.061365168805, 302.0054098961348], - [9521.061365168805, 467.60540989613474], - [9620.361365168807, 467.60540989613474], - [9719.661365168808, 302.0054098961348], - [9719.661365168808, 136.40540989613478], - [9818.961365168809, 136.40540989613478], - [9918.26136516881, 136.40540989613478], - [10017.56136516881, 136.40540989613478], - [366.07287160549004, 5394.185440937868], - [465.37287160549005, 5394.185440937868], - [465.37287160549005, 5559.785440937868], - [366.0728716054901, 5559.785440937868], - [366.0728716054901, 5725.385440937867], - [266.77287160549014, 5725.385440937867], - [167.47287160549016, 5559.785440937868], - [266.77287160549014, 5559.785440937868], - [266.77287160549014, 5394.185440937868], - [266.77287160549014, 5228.585440937869], - [167.47287160549016, 5394.185440937868], - [68.17287160549016, 5228.585440937869], - [167.47287160549013, 5062.9854409378695], - [68.17287160549013, 4897.38544093787], - [167.47287160549013, 4731.785440937871], - [266.77287160549014, 4731.785440937871], - [167.47287160549016, 4566.185440937871], - [68.17287160549016, 4566.185440937871], - [68.17287160549016, 4731.785440937871], - [167.47287160549013, 4897.38544093787], - [68.17287160549013, 5062.9854409378695], - [167.47287160549013, 5228.585440937869], - [266.77287160549014, 5062.9854409378695], - [366.0728716054901, 4897.38544093787], - [266.77287160549014, 4897.38544093787], - [366.0728716054901, 4731.785440937871], - [465.37287160549005, 4897.38544093787], - [366.0728716054901, 5062.9854409378695], - [465.37287160549005, 5062.9854409378695], - [366.0728716054901, 5228.585440937869], - [465.37287160549005, 5228.585440937869], - [564.6728716054901, 5394.185440937868], - [663.9728716054901, 5228.585440937869], - [564.6728716054901, 5062.9854409378695], - [663.9728716054901, 4897.38544093787], - [763.2728716054902, 4731.785440937871], - [862.5728716054903, 4566.185440937871], - [961.8728716054903, 4731.785440937871], - [862.5728716054903, 4731.785440937871], - [961.8728716054903, 4566.185440937871], - [862.5728716054903, 4400.585440937872], - [961.8728716054903, 4234.985440937872], - [1061.1728716054904, 4400.585440937872], - [1160.4728716054904, 4234.985440937872], - [1160.4728716054904, 4400.585440937872], - [1259.7728716054903, 4234.985440937872], - [1359.0728716054903, 4069.3854409378723], - [1458.3728716054902, 4069.3854409378723], - [1557.6728716054902, 4234.985440937872], - [1656.9728716054901, 4400.585440937872], - [1557.6728716054902, 4400.585440937872], - [1458.3728716054902, 4400.585440937872], - [1359.0728716054903, 4566.185440937871], - [1359.0728716054903, 4731.785440937871], - [1259.7728716054903, 4731.785440937871], - [1359.0728716054903, 4897.38544093787], - [1458.3728716054902, 4731.785440937871], - [1458.3728716054902, 4897.38544093787], - [1359.0728716054903, 5062.9854409378695], - [1259.7728716054903, 5228.585440937869], - [1259.7728716054903, 5062.9854409378695], - [1259.7728716054903, 4897.38544093787], - [1160.4728716054904, 5062.9854409378695], - [1160.4728716054904, 5228.585440937869], - [1061.1728716054904, 5228.585440937869], - [1061.1728716054904, 5062.9854409378695], - [961.8728716054903, 5228.585440937869], - [862.5728716054903, 5062.9854409378695], - [961.8728716054903, 5062.9854409378695], - [961.8728716054903, 4897.38544093787], - [1061.1728716054904, 4897.38544093787], - [1160.4728716054904, 4731.785440937871], - [1259.7728716054903, 4566.185440937871], - [1359.0728716054903, 4400.585440937872], - [1458.3728716054902, 4566.185440937871], - [1557.6728716054902, 4566.185440937871], - [1656.9728716054901, 4731.785440937871], - [1557.6728716054902, 4897.38544093787], - [1458.3728716054902, 5062.9854409378695], - [1557.6728716054902, 5228.585440937869], - [1656.9728716054901, 5062.9854409378695], - [1756.27287160549, 5062.9854409378695], - [1756.27287160549, 4897.38544093787], - [1855.57287160549, 5062.9854409378695], - [1954.87287160549, 4897.38544093787], - [2054.17287160549, 5062.9854409378695], - [1954.87287160549, 5062.9854409378695], - [2054.17287160549, 5228.585440937869], - [2153.4728716054897, 5228.585440937869], - [2252.7728716054894, 5062.9854409378695], - [2352.072871605489, 5228.585440937869], - [2451.372871605489, 5394.185440937868], - [2352.072871605489, 5394.185440937868], - [2252.7728716054894, 5228.585440937869], - [2153.4728716054897, 5062.9854409378695], - [2153.4728716054897, 4897.38544093787], - [2252.7728716054894, 4897.38544093787], - [2352.072871605489, 4731.785440937871], - [2252.7728716054894, 4731.785440937871], - [2153.4728716054897, 4731.785440937871], - [2054.17287160549, 4566.185440937871], - [1954.87287160549, 4731.785440937871], - [1855.57287160549, 4897.38544093787], - [1756.27287160549, 4731.785440937871], - [1855.57287160549, 4731.785440937871], - [1855.57287160549, 4566.185440937871], - [1756.27287160549, 4566.185440937871], - [1656.9728716054901, 4566.185440937871], - [1557.6728716054902, 4731.785440937871], - [1656.9728716054901, 4897.38544093787], - [1557.6728716054902, 5062.9854409378695], - [1458.3728716054902, 5228.585440937869], - [1359.0728716054903, 5228.585440937869], - [1259.7728716054903, 5394.185440937868], - [1259.7728716054903, 5559.785440937868], - [1160.4728716054904, 5559.785440937868], - [1061.1728716054904, 5559.785440937868], - [1160.4728716054904, 5725.385440937867], - [1259.7728716054903, 5725.385440937867], - [1359.0728716054903, 5559.785440937868], - [1458.3728716054902, 5725.385440937867], - [1458.3728716054902, 5559.785440937868], - [1359.0728716054903, 5725.385440937867], - [1259.7728716054903, 5890.985440937867], - [1359.0728716054903, 5890.985440937867], - [1259.7728716054903, 6056.585440937866], - [1359.0728716054903, 6222.185440937866], - [1458.3728716054902, 6222.185440937866], - [1458.3728716054902, 6387.785440937865], - [1557.6728716054902, 6222.185440937866], - [1557.6728716054902, 6387.785440937865], - [1656.9728716054901, 6222.185440937866], - [1756.27287160549, 6056.585440937866], - [1855.57287160549, 5890.985440937867], - [1756.27287160549, 5890.985440937867], - [1656.9728716054901, 6056.585440937866], - [1557.6728716054902, 5890.985440937867], - [1458.3728716054902, 5890.985440937867], - [1359.0728716054903, 6056.585440937866], - [1259.7728716054903, 6222.185440937866], - [1160.4728716054904, 6056.585440937866], - [1061.1728716054904, 5890.985440937867], - [1061.1728716054904, 6056.585440937866], - [1160.4728716054904, 6222.185440937866], - [1061.1728716054904, 6222.185440937866], - [961.8728716054903, 6222.185440937866], - [961.8728716054903, 6056.585440937866], - [961.8728716054903, 5890.985440937867], - [961.8728716054903, 5725.385440937867], - [862.5728716054903, 5559.785440937868], - [763.2728716054902, 5725.385440937867], - [862.5728716054903, 5725.385440937867], - [763.2728716054902, 5890.985440937867], - [663.9728716054901, 5725.385440937867], - [763.2728716054902, 5559.785440937868], - [763.2728716054902, 5394.185440937868], - [862.5728716054903, 5228.585440937869], - [961.8728716054903, 5394.185440937868], - [1061.1728716054904, 5394.185440937868], - [961.8728716054903, 5559.785440937868], - [862.5728716054903, 5394.185440937868], - [763.2728716054902, 5228.585440937869], - [663.9728716054901, 5062.9854409378695], - [763.2728716054902, 5062.9854409378695], - [763.2728716054902, 4897.38544093787], - [663.9728716054901, 4731.785440937871], - [564.6728716054901, 4731.785440937871], - [465.37287160549005, 4566.185440937871], - [366.0728716054901, 4566.185440937871], - [465.37287160549005, 4731.785440937871], - [564.6728716054901, 4566.185440937871], - [465.37287160549005, 4400.585440937872], - [366.0728716054901, 4400.585440937872], - [266.77287160549014, 4234.985440937872], - [167.47287160549016, 4234.985440937872], - [266.77287160549014, 4400.585440937872], - [266.77287160549014, 4566.185440937871], - [167.47287160549016, 4400.585440937872], - [68.17287160549016, 4234.985440937872], - [167.47287160549013, 4069.3854409378723], - [68.17287160549013, 3903.7854409378724], - [68.17287160549013, 4069.3854409378723], - [167.47287160549013, 3903.7854409378724], - [266.77287160549014, 3903.7854409378724], - [366.0728716054901, 3738.1854409378725], - [266.77287160549014, 3738.1854409378725], - [266.77287160549014, 3572.5854409378726], - [167.47287160549016, 3406.9854409378727], - [167.47287160549016, 3241.3854409378728], - [266.77287160549014, 3241.3854409378728], - [266.77287160549014, 3406.9854409378727], - [366.0728716054901, 3572.5854409378726], - [465.37287160549005, 3738.1854409378725], - [465.37287160549005, 3903.7854409378724], - [366.0728716054901, 4069.3854409378723], - [366.0728716054901, 4234.985440937872], - [465.37287160549005, 4234.985440937872], - [564.6728716054901, 4069.3854409378723], - [465.37287160549005, 4069.3854409378723], - [564.6728716054901, 4234.985440937872], - [663.9728716054901, 4069.3854409378723], - [663.9728716054901, 4234.985440937872], - [663.9728716054901, 4400.585440937872], - [763.2728716054902, 4566.185440937871], - [763.2728716054902, 4400.585440937872], - [663.9728716054901, 4566.185440937871], - [564.6728716054901, 4400.585440937872], - [19431.915041401327, 3495.506142643713], - [19332.61504140133, 3661.1061426437127], - [19431.915041401327, 3661.1061426437127], - [19531.215041401327, 3661.1061426437127], - [19630.515041401326, 3495.506142643713], - [19630.515041401326, 3661.1061426437127], - [19729.815041401325, 3826.7061426437126], - [19630.515041401326, 3826.7061426437126], - [19729.815041401325, 3992.3061426437125], - [19630.515041401326, 3992.3061426437125], - [19630.515041401326, 4157.906142643712], - [19630.515041401326, 4323.506142643711], - [19531.215041401327, 4157.906142643712], - [19431.915041401327, 4323.506142643711], - [19531.215041401327, 4489.106142643711], - [19431.915041401327, 4654.70614264371], - [19332.61504140133, 4654.70614264371], - [19332.61504140133, 4820.30614264371], - [19332.61504140133, 4985.906142643709], - [19233.31504140133, 4985.906142643709], - [19134.01504140133, 5151.506142643709], - [19034.71504140133, 5151.506142643709], - [19134.01504140133, 5317.106142643708], - [19034.71504140133, 5317.106142643708], - [19034.71504140133, 5482.706142643708], - [18935.41504140133, 5648.306142643707], - [18836.115041401332, 5813.9061426437065], - [18836.115041401332, 5979.506142643706], - [18935.41504140133, 5979.506142643706], - [19034.71504140133, 6145.106142643705], - [19034.71504140133, 5979.506142643706], - [19034.71504140133, 5813.9061426437065], - [19134.01504140133, 5648.306142643707], - [19233.31504140133, 5648.306142643707], - [19134.01504140133, 5813.9061426437065], - [19134.01504140133, 5979.506142643706], - [19233.31504140133, 5813.9061426437065], - [19233.31504140133, 5979.506142643706], - [19332.61504140133, 6145.106142643705], - [19332.61504140133, 6310.706142643705], - [19233.31504140133, 6310.706142643705], - [19233.31504140133, 6476.306142643704], - [19332.61504140133, 6476.306142643704], - [19431.915041401327, 6641.906142643704], - [19332.61504140133, 6807.506142643703], - [19332.61504140133, 6641.906142643704], - [19431.915041401327, 6476.306142643704], - [19431.915041401327, 6310.706142643705], - [19531.215041401327, 6145.106142643705], - [19431.915041401327, 5979.506142643706], - [19431.915041401327, 6145.106142643705], - [19531.215041401327, 5979.506142643706], - [19630.515041401326, 5813.9061426437065], - [19630.515041401326, 5979.506142643706], - [19729.815041401325, 5813.9061426437065], - [19829.115041401325, 5979.506142643706], - [19729.815041401325, 5979.506142643706], - [19729.815041401325, 6145.106142643705], - [19729.815041401325, 6310.706142643705], - [19630.515041401326, 6476.306142643704], - [19729.815041401325, 6476.306142643704], - [19630.515041401326, 6310.706142643705], - [19531.215041401327, 6310.706142643705], - [19531.215041401327, 6476.306142643704], - [19630.515041401326, 6641.906142643704], - [19729.815041401325, 6807.506142643703], - [19829.115041401325, 6973.106142643703], - [19928.415041401324, 6973.106142643703], - [19928.415041401324, 7138.706142643702], - [20027.715041401323, 7138.706142643702], - [20027.715041401323, 7304.306142643702], - [19928.415041401324, 7304.306142643702], - [19829.115041401325, 7304.306142643702], - [19829.115041401325, 7469.906142643701], - [19928.415041401324, 7469.906142643701], - [19928.415041401324, 7635.5061426437005], - [19928.415041401324, 7801.1061426437], - [20027.715041401323, 7635.5061426437005], - [20027.715041401323, 7801.1061426437], - [20127.015041401322, 7801.1061426437], - [20226.31504140132, 7801.1061426437], - [20325.61504140132, 7801.1061426437], - [20226.31504140132, 7635.5061426437005], - [20226.31504140132, 7469.906142643701], - [20226.31504140132, 7304.306142643702], - [20127.015041401322, 7304.306142643702], - [20027.715041401323, 7469.906142643701], - [20127.015041401322, 7469.906142643701], - [20127.015041401322, 7635.5061426437005], - [2748.790306732237, 2362.9553147492866], - [2848.0903067322365, 2528.5553147492865], - [2748.790306732237, 2694.1553147492864], - [2649.490306732237, 2859.7553147492863], - [2748.790306732237, 3025.355314749286], - [2848.0903067322365, 2859.7553147492863], - [2848.0903067322365, 2694.1553147492864], - [2947.3903067322362, 2694.1553147492864], - [3046.690306732236, 2859.7553147492863], - [3145.9903067322357, 2694.1553147492864], - [3145.9903067322357, 2528.5553147492865], - [3046.690306732236, 2694.1553147492864], - [3145.9903067322357, 2859.7553147492863], - [3046.690306732236, 3025.355314749286], - [3145.9903067322357, 3025.355314749286], - [3245.2903067322354, 3190.955314749286], - [3245.2903067322354, 3356.555314749286], - [3344.590306732235, 3522.155314749286], - [3443.890306732235, 3356.555314749286], - [3543.1903067322346, 3356.555314749286], - [3642.4903067322343, 3190.955314749286], - [3741.790306732234, 3025.355314749286], - [3741.790306732234, 2859.7553147492863], - [3841.090306732234, 3025.355314749286], - [3841.090306732234, 3190.955314749286], - [3741.790306732234, 3190.955314749286], - [3642.4903067322343, 3025.355314749286], - [3543.1903067322346, 3025.355314749286], - [3543.1903067322346, 2859.7553147492863], - [3443.890306732235, 3025.355314749286], - [3443.890306732235, 3190.955314749286], - [3543.1903067322346, 3190.955314749286], - [3642.4903067322343, 3356.555314749286], - [3543.1903067322346, 3522.155314749286], - [3443.890306732235, 3687.755314749286], - [3443.890306732235, 3853.3553147492858], - [3344.590306732235, 3687.755314749286], - [3245.2903067322354, 3853.3553147492858], - [3245.2903067322354, 3687.755314749286], - [3145.9903067322357, 3687.755314749286], - [3046.690306732236, 3853.3553147492858], - [3145.9903067322357, 4018.9553147492857], - [3145.9903067322357, 3853.3553147492858], - [3046.690306732236, 3687.755314749286], - [3145.9903067322357, 3522.155314749286], - [3145.9903067322357, 3356.555314749286], - [3145.9903067322357, 3190.955314749286], - [3046.690306732236, 3190.955314749286], - [3046.690306732236, 3356.555314749286], - [2947.3903067322362, 3356.555314749286], - [2848.0903067322365, 3190.955314749286], - [2947.3903067322362, 3025.355314749286], - [2848.0903067322365, 3025.355314749286], - [2748.790306732237, 2859.7553147492863], - [2649.490306732237, 2694.1553147492864], - [2748.790306732237, 2528.5553147492865], - [2848.0903067322365, 2362.9553147492866], - [2748.790306732237, 2197.3553147492867], - [2649.490306732237, 2362.9553147492866], - [2649.490306732237, 2197.3553147492867], - [2550.1903067322373, 2362.9553147492866], - [2450.8903067322376, 2362.9553147492866], - [2351.590306732238, 2528.5553147492865], - [2252.290306732238, 2528.5553147492865], - [2351.590306732238, 2362.9553147492866], - [2252.290306732238, 2197.3553147492867], - [2351.590306732238, 2197.3553147492867], - [2351.590306732238, 2031.7553147492865], - [2351.590306732238, 1866.1553147492864], - [2252.290306732238, 1866.1553147492864], - [2351.590306732238, 1700.5553147492863], - [2450.8903067322376, 1534.9553147492861], - [2351.590306732238, 1369.355314749286], - [2252.290306732238, 1203.7553147492858], - [2252.290306732238, 1369.355314749286], - [2252.290306732238, 1534.9553147492861], - [2152.9903067322384, 1369.355314749286], - [2053.6903067322387, 1369.355314749286], - [1954.3903067322387, 1203.7553147492858], - [1855.0903067322388, 1203.7553147492858], - [1755.7903067322388, 1038.1553147492857], - [1656.4903067322389, 1038.1553147492857], - [1557.190306732239, 872.5553147492857], - [1457.890306732239, 1038.1553147492857], - [1457.890306732239, 872.5553147492857], - [1457.890306732239, 706.9553147492858], - [1557.190306732239, 706.9553147492858], - [1656.4903067322389, 872.5553147492857], - [1656.4903067322389, 706.9553147492858], - [1755.7903067322388, 706.9553147492858], - [1656.4903067322389, 541.3553147492859], - [1557.190306732239, 375.7553147492859], - [1656.4903067322389, 210.1553147492859], - [1755.7903067322388, 44.55531474928592], - [1656.4903067322389, 44.55531474928592], - [1557.190306732239, 210.1553147492859], - [1457.890306732239, 210.1553147492859], - [1457.890306732239, 44.55531474928592], - [1358.590306732239, 210.1553147492859], - [1358.590306732239, 375.75531474928584], - [1259.290306732239, 210.15531474928585], - [1259.290306732239, 375.75531474928584], - [1259.290306732239, 541.3553147492859], - [1358.590306732239, 706.9553147492858], - [1358.590306732239, 872.5553147492857], - [1259.290306732239, 706.9553147492858], - [1259.290306732239, 872.5553147492857], - [1259.290306732239, 1038.1553147492857], - [1358.590306732239, 1203.7553147492858], - [1358.590306732239, 1038.1553147492857], - [1457.890306732239, 1203.7553147492858], - [1557.190306732239, 1369.355314749286], - [1656.4903067322389, 1203.7553147492858], - [1557.190306732239, 1203.7553147492858], - [1557.190306732239, 1038.1553147492857], - [17254.572515546668, 1460.5807801244923], - [17353.872515546667, 1626.1807801244925], - [17453.172515546667, 1791.7807801244926], - [17552.472515546666, 1791.7807801244926], - [17453.172515546667, 1626.1807801244925], - [17353.872515546667, 1791.7807801244926], - [17453.172515546667, 1957.3807801244927], - [17353.872515546667, 2122.980780124493], - [17453.172515546667, 2288.580780124493], - [17353.872515546667, 2454.1807801244927], - [17453.172515546667, 2619.7807801244926], - [17552.472515546666, 2619.7807801244926], - [17453.172515546667, 2785.3807801244925], - [17353.872515546667, 2619.7807801244926], - [17254.572515546668, 2454.1807801244927], - [17254.572515546668, 2288.580780124493], - [17353.872515546667, 2288.580780124493], - [17453.172515546667, 2122.980780124493], - [17552.472515546666, 2288.580780124493], - [17552.472515546666, 2454.1807801244927], - [17453.172515546667, 2454.1807801244927], - [4447.67624466283, 4761.1416826913], - [4546.97624466283, 4595.541682691301], - [4546.97624466283, 4429.941682691301], - [4447.67624466283, 4429.941682691301], - [4447.67624466283, 4595.541682691301], - [4348.37624466283, 4595.541682691301], - [4249.07624466283, 4595.541682691301], - [4348.37624466283, 4761.1416826913], - [4249.07624466283, 4761.1416826913], - [4348.37624466283, 4926.7416826912995], - [4348.37624466283, 5092.341682691299], - [4447.67624466283, 5257.941682691298], - [4546.97624466283, 5257.941682691298], - [4646.27624466283, 5092.341682691299], - [4546.97624466283, 5092.341682691299], - [4646.27624466283, 4926.7416826912995], - [4646.27624466283, 4761.1416826913], - [4546.97624466283, 4761.1416826913], - [4646.27624466283, 4595.541682691301], - [4745.5762446628305, 4595.541682691301], - [4646.27624466283, 4429.941682691301], - [4745.5762446628305, 4429.941682691301], - [4844.876244662831, 4595.541682691301], - [4745.5762446628305, 4761.1416826913], - [4745.5762446628305, 4926.7416826912995], - [4844.876244662831, 4761.1416826913], - [4944.176244662831, 4761.1416826913], - [5043.476244662831, 4926.7416826912995], - [5043.476244662831, 4761.1416826913], - [5142.776244662831, 4926.7416826912995], - [5142.776244662831, 4761.1416826913], - [5242.076244662831, 4595.541682691301], - [5142.776244662831, 4595.541682691301], - [5242.076244662831, 4429.941682691301], - [5242.076244662831, 4264.341682691302], - [5142.776244662831, 4429.941682691301], - [5043.476244662831, 4595.541682691301], - [5043.476244662831, 4429.941682691301], - [5043.476244662831, 4264.341682691302], - [5142.776244662831, 4098.741682691302], - [5043.476244662831, 4098.741682691302], - [4944.176244662831, 3933.1416826913023], - [4944.176244662831, 4098.741682691302], - [4944.176244662831, 4264.341682691302], - [4844.876244662831, 4098.741682691302], - [4745.5762446628305, 4264.341682691302], - [4646.27624466283, 4098.741682691302], - [4546.97624466283, 3933.1416826913023], - [4447.67624466283, 4098.741682691302], - [4546.97624466283, 4264.341682691302], - [4447.67624466283, 4264.341682691302], - [4546.97624466283, 4098.741682691302], - [4646.27624466283, 3933.1416826913023], - [4546.97624466283, 3767.5416826913024], - [4447.67624466283, 3601.9416826913025], - [4447.67624466283, 3767.5416826913024], - [4348.37624466283, 3767.5416826913024], - [4348.37624466283, 3933.1416826913023], - [4249.07624466283, 3767.5416826913024], - [4249.07624466283, 3933.1416826913023], - [4149.776244662829, 3933.1416826913023], - [4050.4762446628297, 4098.741682691302], - [4050.4762446628297, 3933.1416826913023], - [3951.17624466283, 3933.1416826913023], - [3951.17624466283, 4098.741682691302], - [3851.8762446628302, 4264.341682691302], - [3851.8762446628302, 4098.741682691302], - [3752.5762446628305, 4098.741682691302], - [3653.276244662831, 4264.341682691302], - [3553.976244662831, 4429.941682691301], - [3553.976244662831, 4595.541682691301], - [3454.6762446628313, 4429.941682691301], - [3553.976244662831, 4264.341682691302], - [3653.276244662831, 4429.941682691301], - [3752.5762446628305, 4264.341682691302], - [3752.5762446628305, 4429.941682691301], - [3851.8762446628302, 4595.541682691301], - [3851.8762446628302, 4429.941682691301], - [3951.17624466283, 4429.941682691301], - [4050.4762446628297, 4264.341682691302], - [4149.776244662829, 4098.741682691302], - [4249.07624466283, 4264.341682691302], - [4348.37624466283, 4098.741682691302], - [4447.67624466283, 3933.1416826913023], - [9574.088902135607, 7352.26293905581], - [9474.788902135606, 7352.26293905581], - [9375.488902135605, 7186.662939055811], - [9474.788902135606, 7021.0629390558115], - [9574.088902135607, 7021.0629390558115], - [9474.788902135606, 7186.662939055811], - [9574.088902135607, 7186.662939055811], - [9673.388902135608, 7021.0629390558115], - [9673.388902135608, 6855.462939055812], - [9772.68890213561, 6689.862939055813], - [9673.388902135608, 6689.862939055813], - [9772.68890213561, 6524.262939055813], - [9871.98890213561, 6358.662939055814], - [9971.288902135611, 6524.262939055813], - [10070.588902135612, 6358.662939055814], - [10070.588902135612, 6193.062939055814], - [9971.288902135611, 6027.462939055815], - [9971.288902135611, 5861.862939055815], - [9871.98890213561, 5861.862939055815], - [9871.98890213561, 5696.262939055816], - [9971.288902135611, 5530.662939055816], - [10070.588902135612, 5530.662939055816], - [10070.588902135612, 5696.262939055816], - [10169.888902135614, 5861.862939055815], - [10169.888902135614, 5696.262939055816], - [10070.588902135612, 5861.862939055815], - [10169.888902135614, 6027.462939055815], - [10169.888902135614, 6193.062939055814], - [10269.188902135615, 6027.462939055815], - [10269.188902135615, 5861.862939055815], - [10368.488902135616, 6027.462939055815], - [10269.188902135615, 6193.062939055814], - [10269.188902135615, 6358.662939055814], - [10169.888902135614, 6358.662939055814], - [10070.588902135612, 6524.262939055813], - [10070.588902135612, 6689.862939055813], - [9971.288902135611, 6855.462939055812], - [9971.288902135611, 7021.0629390558115], - [10070.588902135612, 7186.662939055811], - [10169.888902135614, 7186.662939055811], - [10269.188902135615, 7186.662939055811], - [10169.888902135614, 7352.26293905581], - [10070.588902135612, 7352.26293905581], - [10169.888902135614, 7517.86293905581], - [10169.888902135614, 7683.462939055809], - [10269.188902135615, 7517.86293905581], - [10368.488902135616, 7683.462939055809], - [10467.788902135617, 7683.462939055809], - [10368.488902135616, 7517.86293905581], - [10269.188902135615, 7352.26293905581], - [10368.488902135616, 7352.26293905581], - [10368.488902135616, 7186.662939055811], - [10368.488902135616, 7021.0629390558115], - [10368.488902135616, 6855.462939055812], - [10269.188902135615, 6855.462939055812], - [10169.888902135614, 6855.462939055812], - [10169.888902135614, 7021.0629390558115], - [10070.588902135612, 7021.0629390558115], - [10070.588902135612, 6855.462939055812], - [10169.888902135614, 6689.862939055813], - [10269.188902135615, 6689.862939055813], - [10169.888902135614, 6524.262939055813], - [10269.188902135615, 6524.262939055813], - [10368.488902135616, 6524.262939055813], - [10368.488902135616, 6358.662939055814], - [10467.788902135617, 6358.662939055814], - [10467.788902135617, 6193.062939055814], - [10567.088902135618, 6358.662939055814], - [10567.088902135618, 6193.062939055814], - [10666.388902135619, 6193.062939055814], - [10666.388902135619, 6358.662939055814], - [10567.088902135618, 6524.262939055813], - [10467.788902135617, 6524.262939055813], - [10567.088902135618, 6689.862939055813], - [10467.788902135617, 6855.462939055812], - [10567.088902135618, 7021.0629390558115], - [10467.788902135617, 7021.0629390558115], - [10567.088902135618, 6855.462939055812], - [10467.788902135617, 6689.862939055813], - [10368.488902135616, 6689.862939055813], - [1073.6944354374714, 1154.3681204032646], - [974.3944354374713, 1319.9681204032647], - [875.0944354374712, 1319.9681204032647], - [775.7944354374712, 1154.3681204032646], - [775.7944354374712, 988.7681204032646], - [875.0944354374712, 823.1681204032647], - [875.0944354374712, 657.5681204032647], - [775.7944354374712, 823.1681204032647], - [676.4944354374711, 657.5681204032647], - [676.4944354374711, 491.9681204032648], - [775.7944354374712, 657.5681204032647], - [676.4944354374711, 823.1681204032647], - [676.4944354374711, 988.7681204032646], - [577.194435437471, 823.1681204032647], - [577.194435437471, 988.7681204032646], - [577.194435437471, 1154.3681204032646], - [676.4944354374711, 1319.9681204032647], - [577.194435437471, 1319.9681204032647], - [477.89443543747103, 1319.9681204032647], - [577.194435437471, 1485.5681204032649], - [477.89443543747103, 1651.168120403265], - [577.194435437471, 1816.7681204032651], - [477.89443543747103, 1816.7681204032651], - [378.5944354374711, 1982.3681204032653], - [378.5944354374711, 2147.9681204032654], - [279.2944354374711, 2313.5681204032653], - [179.99443543747114, 2147.9681204032654], - [80.69443543747114, 2313.5681204032653], - [80.69443543747114, 2479.168120403265], - [179.9944354374711, 2644.768120403265], - [179.9944354374711, 2479.168120403265], - [179.9944354374711, 2313.5681204032653], - [80.69443543747111, 2147.9681204032654], - [80.69443543747111, 1982.3681204032653], - [179.9944354374711, 1982.3681204032653], - [179.9944354374711, 1816.7681204032651], - [80.69443543747111, 1816.7681204032651], - [179.9944354374711, 1651.168120403265], - [80.69443543747111, 1485.5681204032649], - [80.69443543747111, 1319.9681204032647], - [179.9944354374711, 1154.3681204032646], - [80.69443543747111, 1154.3681204032646], - [179.9944354374711, 988.7681204032646], - [279.2944354374711, 823.1681204032647], - [378.5944354374711, 657.5681204032647], - [378.5944354374711, 823.1681204032647], - [477.89443543747103, 823.1681204032647], - [477.89443543747103, 657.5681204032647], - [378.5944354374711, 491.9681204032648], - [477.89443543747103, 326.3681204032648], - [477.89443543747103, 160.76812040326482], - [378.5944354374711, 160.76812040326482], - [279.2944354374711, 326.3681204032648], - [179.99443543747114, 491.9681204032648], - [179.99443543747114, 326.3681204032648], - [279.2944354374711, 491.9681204032648], - [279.2944354374711, 657.5681204032647], - [179.99443543747114, 823.1681204032647], - [279.2944354374711, 988.7681204032646], - [279.2944354374711, 1154.3681204032646], - [378.5944354374711, 1319.9681204032647], - [477.89443543747103, 1485.5681204032649], - [577.194435437471, 1651.168120403265], - [676.4944354374711, 1651.168120403265], - [775.7944354374712, 1816.7681204032651], - [676.4944354374711, 1816.7681204032651], - [775.7944354374712, 1651.168120403265], - [875.0944354374712, 1651.168120403265], - [974.3944354374713, 1651.168120403265], - [875.0944354374712, 1485.5681204032649], - [775.7944354374712, 1485.5681204032649], - [676.4944354374711, 1485.5681204032649], - [775.7944354374712, 1319.9681204032647], - [676.4944354374711, 1154.3681204032646], - [3138.413562431697, 2355.845602060523], - [3039.113562431697, 2521.445602060523], - [3039.113562431697, 2355.845602060523], - [3039.113562431697, 2190.245602060523], - [3138.413562431697, 2024.645602060523], - [3237.7135624316966, 1859.045602060523], - [3237.7135624316966, 2024.645602060523], - [3337.0135624316963, 1859.045602060523], - [3337.0135624316963, 1693.4456020605228], - [3436.313562431696, 1527.8456020605227], - [3535.6135624316958, 1693.4456020605228], - [3535.6135624316958, 1859.045602060523], - [3634.9135624316955, 2024.645602060523], - [3734.213562431695, 2190.245602060523], - [3634.9135624316955, 2190.245602060523], - [3535.6135624316958, 2190.245602060523], - [3535.6135624316958, 2355.845602060523], - [3535.6135624316958, 2521.445602060523], - [3436.313562431696, 2687.045602060523], - [3436.313562431696, 2852.645602060523], - [3535.6135624316958, 2687.045602060523], - [3634.9135624316955, 2521.445602060523], - [3634.9135624316955, 2355.845602060523], - [3734.213562431695, 2355.845602060523], - [3833.513562431695, 2190.245602060523], - [3932.8135624316947, 2024.645602060523], - [3833.513562431695, 1859.045602060523], - [3833.513562431695, 1693.4456020605228], - [3734.213562431695, 1859.045602060523], - [3734.213562431695, 1693.4456020605228], - [3734.213562431695, 1527.8456020605227], - [3634.9135624316955, 1527.8456020605227], - [3634.9135624316955, 1693.4456020605228], - [3535.6135624316958, 1527.8456020605227], - [3634.9135624316955, 1362.2456020605225], - [3535.6135624316958, 1362.2456020605225], - [3436.313562431696, 1196.6456020605224], - [3535.6135624316958, 1196.6456020605224], - [3535.6135624316958, 1031.0456020605222], - [3436.313562431696, 1031.0456020605222], - [3535.6135624316958, 865.4456020605222], - [3436.313562431696, 865.4456020605222], - [3535.6135624316958, 699.8456020605223], - [3634.9135624316955, 699.8456020605223], - [3535.6135624316958, 534.2456020605224], - [3436.313562431696, 368.64560206052244], - [3436.313562431696, 203.04560206052244], - [3337.0135624316963, 37.445602060522454], - [3436.313562431696, 37.445602060522454], - [3337.0135624316963, 203.04560206052244], - [3237.7135624316966, 37.445602060522454], - [3138.413562431697, 37.445602060522454], - [3237.7135624316966, 203.04560206052244], - [3337.0135624316963, 368.6456020605224], - [3436.313562431696, 534.2456020605224], - [3337.0135624316963, 699.8456020605223], - [3237.7135624316966, 534.2456020605224], - [3337.0135624316963, 534.2456020605224], - [3436.313562431696, 699.8456020605223], - [3337.0135624316963, 865.4456020605222], - [3237.7135624316966, 865.4456020605222], - [3337.0135624316963, 1031.0456020605222], - [3237.7135624316966, 1196.6456020605224], - [3138.413562431697, 1362.2456020605225], - [3039.113562431697, 1527.8456020605227], - [3138.413562431697, 1527.8456020605227], - [3039.113562431697, 1693.4456020605228], - [2939.8135624316974, 1527.8456020605227], - [2840.5135624316977, 1362.2456020605225], - [2840.5135624316977, 1527.8456020605227], - [2840.5135624316977, 1693.4456020605228], - [2939.8135624316974, 1859.045602060523], - [2840.5135624316977, 2024.645602060523], - [2840.5135624316977, 1859.045602060523], - [2939.8135624316974, 1693.4456020605228], - [3039.113562431697, 1859.045602060523], - [3039.113562431697, 2024.645602060523], - [2939.8135624316974, 2190.245602060523], - [2939.8135624316974, 2024.645602060523], - [16388.412117675925, 1839.818884803299], - [16289.112117675924, 1839.818884803299], - [16388.412117675925, 1674.2188848032988], - [16487.712117675925, 1508.6188848032987], - [16487.712117675925, 1674.2188848032988], - [16388.412117675925, 1508.6188848032987], - [16289.112117675924, 1343.0188848032985], - [16289.112117675924, 1508.6188848032987], - [16189.812117675923, 1674.2188848032988], - [16090.512117675922, 1839.818884803299], - [16090.512117675922, 2005.418884803299], - [15991.212117675921, 2171.018884803299], - [16090.512117675922, 2336.618884803299], - [16090.512117675922, 2502.218884803299], - [16090.512117675922, 2667.8188848032987], - [15991.212117675921, 2833.4188848032986], - [15991.212117675921, 2999.0188848032985], - [15891.91211767592, 3164.6188848032984], - [15891.91211767592, 3330.2188848032984], - [15991.212117675921, 3330.2188848032984], - [16090.512117675922, 3330.2188848032984], - [16189.812117675923, 3495.8188848032983], - [16289.112117675924, 3495.8188848032983], - [16189.812117675923, 3330.2188848032984], - [16189.812117675923, 3164.6188848032984], - [16289.112117675924, 3164.6188848032984], - [16388.412117675925, 3164.6188848032984], - [16388.412117675925, 3330.2188848032984], - [16487.712117675925, 3330.2188848032984], - [16587.012117675924, 3495.8188848032983], - [16587.012117675924, 3661.418884803298], - [16686.312117675923, 3661.418884803298], - [16785.612117675922, 3661.418884803298], - [16884.91211767592, 3661.418884803298], - [16984.21211767592, 3661.418884803298], - [16884.91211767592, 3827.018884803298], - [16884.91211767592, 3992.618884803298], - [16984.21211767592, 3827.018884803298], - [17083.51211767592, 3661.418884803298], - [17182.81211767592, 3495.8188848032983], - [17182.81211767592, 3330.2188848032984], - [17282.11211767592, 3164.6188848032984], - [17282.11211767592, 3330.2188848032984], - [17182.81211767592, 3164.6188848032984], - [17083.51211767592, 3164.6188848032984], - [16984.21211767592, 3330.2188848032984], - [16984.21211767592, 3495.8188848032983], - [17083.51211767592, 3330.2188848032984], - [16984.21211767592, 3164.6188848032984], - [16984.21211767592, 2999.0188848032985], - [17083.51211767592, 2833.4188848032986], - [17083.51211767592, 2667.8188848032987], - [17182.81211767592, 2667.8188848032987], - [17182.81211767592, 2833.4188848032986], - [17083.51211767592, 2999.0188848032985], - [16984.21211767592, 2833.4188848032986], - [16884.91211767592, 2833.4188848032986], - [16884.91211767592, 2999.0188848032985], - [16785.612117675922, 2999.0188848032985], - [16884.91211767592, 3164.6188848032984], - [16785.612117675922, 3164.6188848032984], - [16686.312117675923, 3164.6188848032984], - [16587.012117675924, 3164.6188848032984], - [16587.012117675924, 2999.0188848032985], - [16487.712117675925, 3164.6188848032984], - [16587.012117675924, 3330.2188848032984], - [16686.312117675923, 3495.8188848032983], - [16686.312117675923, 3330.2188848032984], - [16785.612117675922, 3330.2188848032984], - [16884.91211767592, 3495.8188848032983], - [16785.612117675922, 3495.8188848032983], - [16884.91211767592, 3330.2188848032984], - [1272.175991128079, 3842.7700224365044], - [1371.475991128079, 3842.7700224365044], - [1272.175991128079, 3677.1700224365045], - [1172.875991128079, 3511.5700224365046], - [1272.175991128079, 3511.5700224365046], - [1172.875991128079, 3345.9700224365047], - [1073.575991128079, 3180.3700224365048], - [1073.575991128079, 3014.770022436505], - [974.275991128079, 3014.770022436505], - [874.9759911280789, 3014.770022436505], - [775.6759911280789, 2849.170022436505], - [775.6759911280789, 3014.770022436505], - [775.6759911280789, 3180.3700224365048], - [676.3759911280788, 3345.9700224365047], - [676.3759911280788, 3511.5700224365046], - [775.6759911280789, 3677.1700224365045], - [676.3759911280788, 3842.7700224365044], - [577.0759911280787, 3842.7700224365044], - [577.0759911280787, 3677.1700224365045], - [676.3759911280788, 3677.1700224365045], - [775.6759911280789, 3511.5700224365046], - [775.6759911280789, 3345.9700224365047], - [874.9759911280789, 3345.9700224365047], - [874.9759911280789, 3180.3700224365048], - [974.275991128079, 3180.3700224365048], - [974.275991128079, 3345.9700224365047], - [1073.575991128079, 3511.5700224365046], - [1073.575991128079, 3677.1700224365045], - [1172.875991128079, 3677.1700224365045], - [1172.875991128079, 3842.7700224365044], - [1073.575991128079, 3842.7700224365044], - [1172.875991128079, 4008.3700224365043], - [1073.575991128079, 4008.3700224365043], - [974.275991128079, 3842.7700224365044], - [974.275991128079, 4008.3700224365043], - [874.9759911280789, 4008.3700224365043], - [775.6759911280789, 4008.3700224365043], - [874.9759911280789, 3842.7700224365044], - [974.275991128079, 3677.1700224365045], - [974.275991128079, 3511.5700224365046], - [1073.575991128079, 3345.9700224365047], - [1172.875991128079, 3180.3700224365048], - [1272.175991128079, 3180.3700224365048], - [1272.175991128079, 3345.9700224365047], - [1371.475991128079, 3180.3700224365048], - [1470.7759911280789, 3345.9700224365047], - [1371.475991128079, 3345.9700224365047], - [1371.475991128079, 3511.5700224365046], - [1470.7759911280789, 3511.5700224365046], - [1570.0759911280788, 3677.1700224365045], - [1470.7759911280789, 3677.1700224365045], - [1570.0759911280788, 3511.5700224365046], - [1669.3759911280788, 3511.5700224365046], - [1669.3759911280788, 3677.1700224365045], - [1768.6759911280787, 3842.7700224365044], - [1669.3759911280788, 3842.7700224365044], - [1768.6759911280787, 4008.3700224365043], - [1867.9759911280787, 3842.7700224365044], - [1967.2759911280787, 3677.1700224365045], - [2066.5759911280784, 3842.7700224365044], - [2165.875991128078, 3677.1700224365045], - [2066.5759911280784, 3511.5700224365046], - [2165.875991128078, 3511.5700224365046], - [2066.5759911280784, 3677.1700224365045], - [2165.875991128078, 3842.7700224365044], - [2265.175991128078, 4008.3700224365043], - [2364.4759911280776, 4008.3700224365043], - [2265.175991128078, 3842.7700224365044], - [2364.4759911280776, 3677.1700224365045], - [2463.7759911280773, 3842.7700224365044], - [2463.7759911280773, 4008.3700224365043], - [2364.4759911280776, 3842.7700224365044], - [6853.940039224797, 6050.837897021371], - [6953.240039224797, 6050.837897021371], - [7052.5400392247975, 5885.237897021371], - [7052.5400392247975, 5719.637897021372], - [7151.840039224798, 5885.237897021371], - [7052.5400392247975, 6050.837897021371], - [7052.5400392247975, 6216.43789702137], - [7052.5400392247975, 6382.03789702137], - [6953.240039224797, 6382.03789702137], - [6953.240039224797, 6216.43789702137], - [6853.940039224797, 6216.43789702137], - [6853.940039224797, 6382.03789702137], - [6754.640039224797, 6216.43789702137], - [6754.640039224797, 6382.03789702137], - [6754.640039224797, 6547.637897021369], - [6754.640039224797, 6713.237897021369], - [6655.340039224797, 6713.237897021369], - [6754.640039224797, 6878.837897021368], - [6853.940039224797, 6713.237897021369], - [6853.940039224797, 6878.837897021368], - [6953.240039224797, 6713.237897021369], - [7052.5400392247975, 6547.637897021369], - [7151.840039224798, 6713.237897021369], - [7151.840039224798, 6547.637897021369], - [7151.840039224798, 6382.03789702137], - [7251.140039224798, 6547.637897021369], - [7251.140039224798, 6713.237897021369], - [7350.440039224798, 6878.837897021368], - [7449.740039224798, 6878.837897021368], - [7449.740039224798, 6713.237897021369], - [7549.040039224798, 6547.637897021369], - [7449.740039224798, 6382.03789702137], - [7449.740039224798, 6216.43789702137], - [7549.040039224798, 6050.837897021371], - [7648.340039224799, 6216.43789702137], - [7549.040039224798, 6382.03789702137], - [7648.340039224799, 6382.03789702137], - [7747.640039224799, 6216.43789702137], - [7846.940039224799, 6382.03789702137], - [7946.240039224799, 6382.03789702137], - [7946.240039224799, 6547.637897021369], - [7846.940039224799, 6713.237897021369], - [7946.240039224799, 6713.237897021369], - [8045.540039224799, 6547.637897021369], - [8045.540039224799, 6713.237897021369], - [7946.240039224799, 6878.837897021368], - [7946.240039224799, 7044.4378970213675], - [8045.540039224799, 7210.037897021367], - [8144.8400392247995, 7375.637897021366], - [8144.8400392247995, 7541.237897021366], - [8045.540039224799, 7375.637897021366], - [8144.8400392247995, 7210.037897021367], - [8045.540039224799, 7044.4378970213675], - [7946.240039224799, 7210.037897021367], - [7846.940039224799, 7210.037897021367], - [7946.240039224799, 7375.637897021366], - [8045.540039224799, 7541.237897021366], - [8144.8400392247995, 7706.837897021365], - [8244.1400392248, 7541.237897021366], - [8343.4400392248, 7541.237897021366], - [8343.4400392248, 7706.837897021365], - [8244.1400392248, 7706.837897021365], - [4735.523842661975, 3503.497768214323], - [4636.223842661975, 3337.897768214323], - [4536.923842661975, 3337.897768214323], - [4437.623842661975, 3172.2977682143232], - [4338.323842661975, 3172.2977682143232], - [4239.023842661974, 3172.2977682143232], - [4338.323842661975, 3006.6977682143233], - [4437.623842661975, 2841.0977682143234], - [4338.323842661975, 2675.4977682143235], - [4338.323842661975, 2509.8977682143236], - [4239.023842661974, 2675.4977682143235], - [4139.723842661974, 2509.8977682143236], - [4040.4238426619745, 2344.2977682143237], - [4139.723842661974, 2178.697768214324], - [4239.023842661974, 2178.697768214324], - [4139.723842661974, 2344.2977682143237], - [4040.4238426619745, 2178.697768214324], - [4139.723842661974, 2013.0977682143237], - [4139.723842661974, 1847.4977682143235], - [4239.023842661974, 2013.0977682143237], - [4239.023842661974, 1847.4977682143235], - [4338.323842661975, 1847.4977682143235], - [4437.623842661975, 1847.4977682143235], - [4536.923842661975, 1681.8977682143234], - [4437.623842661975, 1516.2977682143232], - [4536.923842661975, 1516.2977682143232], - [4536.923842661975, 1350.697768214323], - [4437.623842661975, 1350.697768214323], - [4536.923842661975, 1185.097768214323], - [4636.223842661975, 1019.497768214323], - [4536.923842661975, 853.897768214323], - [4636.223842661975, 853.897768214323], - [4735.523842661975, 688.2977682143231], - [4636.223842661975, 522.6977682143232], - [4636.223842661975, 357.09776821432325], - [4735.523842661975, 357.09776821432325], - [4735.523842661975, 522.6977682143232], - [4636.223842661975, 688.2977682143231], - [4735.523842661975, 853.897768214323], - [4834.8238426619755, 853.897768214323], - [4735.523842661975, 1019.497768214323], - [4735.523842661975, 1185.097768214323], - [4735.523842661975, 1350.697768214323], - [4834.8238426619755, 1516.2977682143232], - [4735.523842661975, 1516.2977682143232], - [4834.8238426619755, 1350.697768214323], - [4834.8238426619755, 1185.097768214323], - [4934.123842661976, 1350.697768214323], - [5033.423842661976, 1185.097768214323], - [5033.423842661976, 1019.497768214323], - [5033.423842661976, 853.897768214323], - [4934.123842661976, 853.897768214323], - [4934.123842661976, 1019.497768214323], - [4834.8238426619755, 1019.497768214323], - [4934.123842661976, 1185.097768214323], - [5033.423842661976, 1350.697768214323], - [5132.723842661976, 1350.697768214323], - [5132.723842661976, 1185.097768214323], - [5232.023842661976, 1019.497768214323], - [5232.023842661976, 1185.097768214323], - [5331.323842661976, 1019.497768214323], - [5430.623842661977, 1019.497768214323], - [5529.923842661977, 1185.097768214323], - [5430.623842661977, 1350.697768214323], - [5430.623842661977, 1516.2977682143232], - [5529.923842661977, 1350.697768214323], - [5629.223842661977, 1350.697768214323], - [5728.523842661977, 1350.697768214323], - [5728.523842661977, 1516.2977682143232], - [5728.523842661977, 1681.8977682143234], - [5629.223842661977, 1516.2977682143232], - [5529.923842661977, 1516.2977682143232], - [5629.223842661977, 1681.8977682143234], - [5529.923842661977, 1681.8977682143234], - [5430.623842661977, 1847.4977682143235], - [5331.323842661976, 1847.4977682143235], - [5331.323842661976, 2013.0977682143237], - [5232.023842661976, 2178.697768214324], - [5132.723842661976, 2013.0977682143237], - [5132.723842661976, 2178.697768214324], - [5232.023842661976, 2013.0977682143237], - [5232.023842661976, 1847.4977682143235], - [5232.023842661976, 1681.8977682143234], - [5331.323842661976, 1681.8977682143234], - [5331.323842661976, 1516.2977682143232], - [5331.323842661976, 1350.697768214323], - [5232.023842661976, 1350.697768214323], - [5232.023842661976, 1516.2977682143232], - [5132.723842661976, 1516.2977682143232], - [5132.723842661976, 1681.8977682143234], - [5033.423842661976, 1847.4977682143235], - [5132.723842661976, 1847.4977682143235], - [5033.423842661976, 2013.0977682143237], - [4934.123842661976, 2178.697768214324], - [5033.423842661976, 2344.2977682143237], - [4934.123842661976, 2344.2977682143237], - [4834.8238426619755, 2178.697768214324], - [4834.8238426619755, 2344.2977682143237], - [4735.523842661975, 2344.2977682143237], - [4636.223842661975, 2344.2977682143237], - [4536.923842661975, 2178.697768214324], - [4437.623842661975, 2013.0977682143237], - [4338.323842661975, 2178.697768214324], - [4437.623842661975, 2344.2977682143237], - [4536.923842661975, 2509.8977682143236], - [4636.223842661975, 2675.4977682143235], - [4636.223842661975, 2509.8977682143236], - [4536.923842661975, 2675.4977682143235], - [4636.223842661975, 2841.0977682143234], - [4536.923842661975, 2841.0977682143234], - [4636.223842661975, 3006.6977682143233], - [4735.523842661975, 3172.2977682143232], - [4834.8238426619755, 3006.6977682143233], - [4735.523842661975, 2841.0977682143234], - [4735.523842661975, 3006.6977682143233], - [4636.223842661975, 3172.2977682143232], - [4735.523842661975, 3337.897768214323], - [4834.8238426619755, 3503.497768214323], - [4735.523842661975, 3669.097768214323], - [4834.8238426619755, 3834.697768214323], - [4834.8238426619755, 3669.097768214323], - [4934.123842661976, 3503.497768214323], - [5033.423842661976, 3503.497768214323], - [5033.423842661976, 3337.897768214323], - [4934.123842661976, 3337.897768214323], - [4834.8238426619755, 3172.2977682143232], - [4834.8238426619755, 3337.897768214323], - [4934.123842661976, 3172.2977682143232], - [5033.423842661976, 3006.6977682143233], - [5132.723842661976, 2841.0977682143234], - [5132.723842661976, 3006.6977682143233], - [5232.023842661976, 3172.2977682143232], - [5232.023842661976, 3337.897768214323], - [5132.723842661976, 3337.897768214323], - [5232.023842661976, 3503.497768214323], - [5331.323842661976, 3337.897768214323], - [5331.323842661976, 3503.497768214323], - [5430.623842661977, 3669.097768214323], - [5331.323842661976, 3669.097768214323], - [5430.623842661977, 3503.497768214323], - [5430.623842661977, 3337.897768214323], - [5529.923842661977, 3172.2977682143232], - [5529.923842661977, 3337.897768214323], - [5629.223842661977, 3337.897768214323], - [5728.523842661977, 3337.897768214323], - [5728.523842661977, 3503.497768214323], - [5827.823842661977, 3503.497768214323], - [5927.1238426619775, 3669.097768214323], - [6026.423842661978, 3669.097768214323], - [6125.723842661978, 3503.497768214323], - [6125.723842661978, 3669.097768214323], - [6225.023842661978, 3503.497768214323], - [6225.023842661978, 3337.897768214323], - [6324.323842661978, 3337.897768214323], - [6423.623842661978, 3503.497768214323], - [6324.323842661978, 3669.097768214323], - [6225.023842661978, 3669.097768214323], - [6324.323842661978, 3834.697768214323], - [6423.623842661978, 3834.697768214323], - [6324.323842661978, 4000.297768214323], - [6225.023842661978, 3834.697768214323], - [6125.723842661978, 3834.697768214323], - [6125.723842661978, 4000.297768214323], - [6225.023842661978, 4000.297768214323], - [6225.023842661978, 4165.897768214322], - [6225.023842661978, 4331.497768214322], - [6125.723842661978, 4165.897768214322], - [6026.423842661978, 4000.2977682143223], - [5927.1238426619775, 4165.897768214322], - [6026.423842661978, 4331.497768214322], - [6026.423842661978, 4497.097768214321], - [5927.1238426619775, 4497.097768214321], - [5827.823842661977, 4662.697768214321], - [5728.523842661977, 4828.29776821432], - [5827.823842661977, 4828.29776821432], - [5927.1238426619775, 4828.29776821432], - [5927.1238426619775, 4662.697768214321], - [5827.823842661977, 4497.097768214321], - [5927.1238426619775, 4331.497768214322], - [5827.823842661977, 4165.897768214322], - [5728.523842661977, 4331.497768214322], - [5728.523842661977, 4165.897768214322], - [5629.223842661977, 4000.2977682143223], - [5629.223842661977, 3834.6977682143224], - [5529.923842661977, 3669.0977682143225], - [5629.223842661977, 3503.4977682143226], - [5728.523842661977, 3669.0977682143225], - [5827.823842661977, 3669.0977682143225], - [5927.1238426619775, 3834.6977682143224], - [5927.1238426619775, 4000.2977682143223], - [6026.423842661978, 4165.897768214322], - [6125.723842661978, 4331.497768214322], - [6225.023842661978, 4497.097768214321], - [6225.023842661978, 4662.697768214321], - [6324.323842661978, 4662.697768214321], - [6225.023842661978, 4828.29776821432], - [6324.323842661978, 4828.29776821432], - [6423.623842661978, 4828.29776821432], - [6324.323842661978, 4993.8977682143195], - [6225.023842661978, 5159.497768214319], - [6125.723842661978, 5159.497768214319], - [6026.423842661978, 5325.097768214318], - [5927.1238426619775, 5490.697768214318], - [6026.423842661978, 5656.297768214317], - [5927.1238426619775, 5821.897768214317], - [5927.1238426619775, 5987.497768214316], - [6026.423842661978, 5987.497768214316], - [6026.423842661978, 5821.897768214317], - [5927.1238426619775, 5656.297768214317], - [5827.823842661977, 5656.297768214317], - [5827.823842661977, 5490.697768214318], - [5728.523842661977, 5490.697768214318], - [5629.223842661977, 5325.097768214318], - [5629.223842661977, 5159.497768214319], - [5529.923842661977, 4993.8977682143195], - [5529.923842661977, 5159.497768214319], - [5629.223842661977, 4993.8977682143195], - [5629.223842661977, 4828.29776821432], - [5529.923842661977, 4662.697768214321], - [5430.623842661977, 4828.29776821432], - [5529.923842661977, 4828.29776821432], - [5629.223842661977, 4662.697768214321], - [5728.523842661977, 4662.697768214321], - [5629.223842661977, 4497.097768214321], - [5728.523842661977, 4497.097768214321], - [5827.823842661977, 4331.497768214322], - [10216.161365168813, 2951.605409896135], - [10116.861365168812, 2951.605409896135], - [10017.56136516881, 3117.205409896135], - [9918.26136516881, 3117.205409896135], - [9818.961365168809, 3117.205409896135], - [9719.661365168808, 3282.8054098961347], - [9620.361365168807, 3282.8054098961347], - [9620.361365168807, 3117.205409896135], - [9521.061365168805, 2951.605409896135], - [9521.061365168805, 2786.005409896135], - [9620.361365168807, 2786.005409896135], - [9719.661365168808, 2786.005409896135], - [9818.961365168809, 2620.405409896135], - [9918.26136516881, 2786.005409896135], - [9818.961365168809, 2951.605409896135], - [9818.961365168809, 2786.005409896135], - [9719.661365168808, 2620.405409896135], - [9719.661365168808, 2454.805409896135], - [9620.361365168807, 2289.2054098961353], - [9521.061365168805, 2123.6054098961354], - [9620.361365168807, 1958.0054098961352], - [9719.661365168808, 2123.6054098961354], - [9818.961365168809, 2289.2054098961353], - [9818.961365168809, 2123.6054098961354], - [9818.961365168809, 1958.0054098961352], - [9719.661365168808, 1958.0054098961352], - [9620.361365168807, 1792.405409896135], - [9620.361365168807, 1626.805409896135], - [9521.061365168805, 1461.2054098961348], - [9421.761365168804, 1295.6054098961347], - [9521.061365168805, 1130.0054098961346], - [9521.061365168805, 964.4054098961345], - [9421.761365168804, 964.4054098961345], - [9521.061365168805, 798.8054098961346], - [9620.361365168807, 798.8054098961346], - [9620.361365168807, 964.4054098961345], - [9620.361365168807, 1130.0054098961346], - [9620.361365168807, 1295.6054098961347], - [9620.361365168807, 1461.2054098961348], - [9719.661365168808, 1295.6054098961347], - [9818.961365168809, 1130.0054098961346], - [9918.26136516881, 964.4054098961345], - [9818.961365168809, 964.4054098961345], - [9918.26136516881, 798.8054098961346], - [10017.56136516881, 633.2054098961347], - [9918.26136516881, 467.60540989613474], - [9918.26136516881, 302.0054098961348], - [10017.56136516881, 302.0054098961348], - [10116.861365168812, 136.40540989613478], - [10116.861365168812, 302.0054098961348], - [10116.861365168812, 467.60540989613474], - [10116.861365168812, 633.2054098961347], - [10216.161365168813, 633.2054098961347], - [10216.161365168813, 798.8054098961346], - [10315.461365168814, 633.2054098961347], - [10315.461365168814, 798.8054098961346], - [10414.761365168815, 798.8054098961346], - [10514.061365168816, 633.2054098961347], - [10514.061365168816, 798.8054098961346], - [10414.761365168815, 964.4054098961345], - [10315.461365168814, 964.4054098961345], - [10216.161365168813, 964.4054098961345], - [10116.861365168812, 798.8054098961346], - [10017.56136516881, 798.8054098961346], - [10116.861365168812, 964.4054098961345], - [10216.161365168813, 1130.0054098961346], - [10116.861365168812, 1130.0054098961346], - [10216.161365168813, 1295.6054098961347], - [10216.161365168813, 1461.2054098961348], - [10315.461365168814, 1626.805409896135], - [10315.461365168814, 1792.405409896135], - [10216.161365168813, 1958.0054098961352], - [10216.161365168813, 1792.405409896135], - [10116.861365168812, 1792.405409896135], - [10017.56136516881, 1958.0054098961352], - [9918.26136516881, 2123.6054098961354], - [9918.26136516881, 1958.0054098961352], - [10017.56136516881, 2123.6054098961354], - [10116.861365168812, 2123.6054098961354], - [10017.56136516881, 2289.2054098961353], - [10017.56136516881, 2454.805409896135], - [10116.861365168812, 2289.2054098961353], - [10216.161365168813, 2454.805409896135], - [10315.461365168814, 2620.405409896135], - [10315.461365168814, 2454.805409896135], - [10315.461365168814, 2289.2054098961353], - [10414.761365168815, 2454.805409896135], - [10514.061365168816, 2620.405409896135], - [10613.361365168817, 2786.005409896135], - [10514.061365168816, 2786.005409896135], - [10613.361365168817, 2620.405409896135], - [10514.061365168816, 2454.805409896135], - [10514.061365168816, 2289.2054098961353], - [10613.361365168817, 2289.2054098961353], - [10712.661365168819, 2289.2054098961353], - [10811.96136516882, 2454.805409896135], - [10911.26136516882, 2289.2054098961353], - [10811.96136516882, 2289.2054098961353], - [10712.661365168819, 2454.805409896135], - [10712.661365168819, 2620.405409896135], - [10811.96136516882, 2786.005409896135], - [10911.26136516882, 2620.405409896135], - [10911.26136516882, 2786.005409896135], - [11010.561365168822, 2620.405409896135], - [10911.26136516882, 2454.805409896135], - [10811.96136516882, 2620.405409896135], - [10712.661365168819, 2786.005409896135], - [10811.96136516882, 2951.605409896135], - [10911.26136516882, 2951.605409896135], - [10811.96136516882, 3117.205409896135], - [10712.661365168819, 2951.605409896135], - [10613.361365168817, 2951.605409896135], - [10514.061365168816, 2951.605409896135], - [10414.761365168815, 3117.205409896135], - [10414.761365168815, 2951.605409896135], - [10315.461365168814, 2786.005409896135], - [10216.161365168813, 2620.405409896135], - [10216.161365168813, 2786.005409896135], - [10315.461365168814, 2951.605409896135], - [10315.461365168814, 3117.205409896135], - [10216.161365168813, 3117.205409896135], - [10116.861365168812, 3117.205409896135], - [10017.56136516881, 3282.8054098961347], - [9918.26136516881, 3448.4054098961346], - [9818.961365168809, 3448.4054098961346], - [9818.961365168809, 3614.0054098961346], - [9719.661365168808, 3448.4054098961346], - [9818.961365168809, 3282.8054098961347], - [9719.661365168808, 3117.205409896135], - [9620.361365168807, 2951.605409896135], - [9521.061365168805, 3117.205409896135], - [9521.061365168805, 3282.8054098961347], - [9421.761365168804, 3117.205409896135], - [9421.761365168804, 3282.8054098961347], - [9322.461365168803, 3117.205409896135], - [9421.761365168804, 2951.605409896135], - [9322.461365168803, 2951.605409896135], - [9223.161365168802, 2786.005409896135], - [9322.461365168803, 2620.405409896135], - [9421.761365168804, 2454.805409896135], - [9521.061365168805, 2289.2054098961353], - [9421.761365168804, 2123.6054098961354], - [9421.761365168804, 1958.0054098961352], - [9421.761365168804, 1792.405409896135], - [9521.061365168805, 1626.805409896135], - [9421.761365168804, 1626.805409896135], - [9322.461365168803, 1792.405409896135], - [9322.461365168803, 1626.805409896135], - [9322.461365168803, 1461.2054098961348], - [9421.761365168804, 1461.2054098961348], - [9521.061365168805, 1295.6054098961347], - [9421.761365168804, 1130.0054098961346], - [9322.461365168803, 964.4054098961345], - [9223.161365168802, 964.4054098961345], - [9223.161365168802, 798.8054098961346], - [9322.461365168803, 633.2054098961347], - [9421.761365168804, 798.8054098961346], - [9421.761365168804, 633.2054098961347], - [9521.061365168805, 633.2054098961347], - [9421.761365168804, 467.60540989613474], - [9421.761365168804, 302.0054098961348], - [9322.461365168803, 136.40540989613478], - [9223.161365168802, 302.0054098961348], - [9123.861365168801, 302.0054098961348], - [9024.5613651688, 136.40540989613478], - [9123.861365168801, 136.40540989613478], - [9223.161365168802, 136.40540989613478], - [9322.461365168803, 302.0054098961348], - [9421.761365168804, 136.40540989613478], - [9521.061365168805, 136.40540989613478], - [9620.361365168807, 136.40540989613478], - [9620.361365168807, 302.0054098961348], - [9521.061365168805, 302.0054098961348], - [9521.061365168805, 467.60540989613474], - [9620.361365168807, 467.60540989613474], - [9719.661365168808, 302.0054098961348], - [9719.661365168808, 136.40540989613478], - [9818.961365168809, 136.40540989613478], - [9918.26136516881, 136.40540989613478], - [10017.56136516881, 136.40540989613478], - [366.07287160549004, 5394.185440937868], - [465.37287160549005, 5394.185440937868], - [465.37287160549005, 5559.785440937868], - [366.0728716054901, 5559.785440937868], - [366.0728716054901, 5725.385440937867], - [266.77287160549014, 5725.385440937867], - [167.47287160549016, 5559.785440937868], - [266.77287160549014, 5559.785440937868], - [266.77287160549014, 5394.185440937868], - [266.77287160549014, 5228.585440937869], - [167.47287160549016, 5394.185440937868], - [68.17287160549016, 5228.585440937869], - [167.47287160549013, 5062.9854409378695], - [68.17287160549013, 4897.38544093787], - [167.47287160549013, 4731.785440937871], - [266.77287160549014, 4731.785440937871], - [167.47287160549016, 4566.185440937871], - [68.17287160549016, 4566.185440937871], - [68.17287160549016, 4731.785440937871], - [167.47287160549013, 4897.38544093787], - [68.17287160549013, 5062.9854409378695], - [167.47287160549013, 5228.585440937869], - [266.77287160549014, 5062.9854409378695], - [366.0728716054901, 4897.38544093787], - [266.77287160549014, 4897.38544093787], - [366.0728716054901, 4731.785440937871], - [465.37287160549005, 4897.38544093787], - [366.0728716054901, 5062.9854409378695], - [465.37287160549005, 5062.9854409378695], - [366.0728716054901, 5228.585440937869], - [465.37287160549005, 5228.585440937869], - [564.6728716054901, 5394.185440937868], - [663.9728716054901, 5228.585440937869], - [564.6728716054901, 5062.9854409378695], - [663.9728716054901, 4897.38544093787], - [763.2728716054902, 4731.785440937871], - [862.5728716054903, 4566.185440937871], - [961.8728716054903, 4731.785440937871], - [862.5728716054903, 4731.785440937871], - [961.8728716054903, 4566.185440937871], - [862.5728716054903, 4400.585440937872], - [961.8728716054903, 4234.985440937872], - [1061.1728716054904, 4400.585440937872], - [1160.4728716054904, 4234.985440937872], - [1160.4728716054904, 4400.585440937872], - [1259.7728716054903, 4234.985440937872], - [1359.0728716054903, 4069.3854409378723], - [1458.3728716054902, 4069.3854409378723], - [1557.6728716054902, 4234.985440937872], - [1656.9728716054901, 4400.585440937872], - [1557.6728716054902, 4400.585440937872], - [1458.3728716054902, 4400.585440937872], - [1359.0728716054903, 4566.185440937871], - [1359.0728716054903, 4731.785440937871], - [1259.7728716054903, 4731.785440937871], - [1359.0728716054903, 4897.38544093787], - [1458.3728716054902, 4731.785440937871], - [1458.3728716054902, 4897.38544093787], - [1359.0728716054903, 5062.9854409378695], - [1259.7728716054903, 5228.585440937869], - [1259.7728716054903, 5062.9854409378695], - [1259.7728716054903, 4897.38544093787], - [1160.4728716054904, 5062.9854409378695], - [1160.4728716054904, 5228.585440937869], - [1061.1728716054904, 5228.585440937869], - [1061.1728716054904, 5062.9854409378695], - [961.8728716054903, 5228.585440937869], - [862.5728716054903, 5062.9854409378695], - [961.8728716054903, 5062.9854409378695], - [961.8728716054903, 4897.38544093787], - [1061.1728716054904, 4897.38544093787], - [1160.4728716054904, 4731.785440937871], - [1259.7728716054903, 4566.185440937871], - [1359.0728716054903, 4400.585440937872], - [1458.3728716054902, 4566.185440937871], - [1557.6728716054902, 4566.185440937871], - [1656.9728716054901, 4731.785440937871], - [1557.6728716054902, 4897.38544093787], - [1458.3728716054902, 5062.9854409378695], - [1557.6728716054902, 5228.585440937869], - [1656.9728716054901, 5062.9854409378695], - [1756.27287160549, 5062.9854409378695], - [1756.27287160549, 4897.38544093787], - [1855.57287160549, 5062.9854409378695], - [1954.87287160549, 4897.38544093787], - [2054.17287160549, 5062.9854409378695], - [1954.87287160549, 5062.9854409378695], - [2054.17287160549, 5228.585440937869], - [2153.4728716054897, 5228.585440937869], - [2252.7728716054894, 5062.9854409378695], - [2352.072871605489, 5228.585440937869], - [2451.372871605489, 5394.185440937868], - [2352.072871605489, 5394.185440937868], - [2252.7728716054894, 5228.585440937869], - [2153.4728716054897, 5062.9854409378695], - [2153.4728716054897, 4897.38544093787], - [2252.7728716054894, 4897.38544093787], - [2352.072871605489, 4731.785440937871], - [2252.7728716054894, 4731.785440937871], - [2153.4728716054897, 4731.785440937871], - [2054.17287160549, 4566.185440937871], - [1954.87287160549, 4731.785440937871], - [1855.57287160549, 4897.38544093787], - [1756.27287160549, 4731.785440937871], - [1855.57287160549, 4731.785440937871], - [1855.57287160549, 4566.185440937871], - [1756.27287160549, 4566.185440937871], - [1656.9728716054901, 4566.185440937871], - [1557.6728716054902, 4731.785440937871], - [1656.9728716054901, 4897.38544093787], - [1557.6728716054902, 5062.9854409378695], - [1458.3728716054902, 5228.585440937869], - [1359.0728716054903, 5228.585440937869], - [1259.7728716054903, 5394.185440937868], - [1259.7728716054903, 5559.785440937868], - [1160.4728716054904, 5559.785440937868], - [1061.1728716054904, 5559.785440937868], - [1160.4728716054904, 5725.385440937867], - [1259.7728716054903, 5725.385440937867], - [1359.0728716054903, 5559.785440937868], - [1458.3728716054902, 5725.385440937867], - [1458.3728716054902, 5559.785440937868], - [1359.0728716054903, 5725.385440937867], - [1259.7728716054903, 5890.985440937867], - [1359.0728716054903, 5890.985440937867], - [1259.7728716054903, 6056.585440937866], - [1359.0728716054903, 6222.185440937866], - [1458.3728716054902, 6222.185440937866], - [1458.3728716054902, 6387.785440937865], - [1557.6728716054902, 6222.185440937866], - [1557.6728716054902, 6387.785440937865], - [1656.9728716054901, 6222.185440937866], - [1756.27287160549, 6056.585440937866], - [1855.57287160549, 5890.985440937867], - [1756.27287160549, 5890.985440937867], - [1656.9728716054901, 6056.585440937866], - [1557.6728716054902, 5890.985440937867], - [1458.3728716054902, 5890.985440937867], - [1359.0728716054903, 6056.585440937866], - [1259.7728716054903, 6222.185440937866], - [1160.4728716054904, 6056.585440937866], - [1061.1728716054904, 5890.985440937867], - [1061.1728716054904, 6056.585440937866], - [1160.4728716054904, 6222.185440937866], - [1061.1728716054904, 6222.185440937866], - [961.8728716054903, 6222.185440937866], - [961.8728716054903, 6056.585440937866], - [961.8728716054903, 5890.985440937867], - [961.8728716054903, 5725.385440937867], - [862.5728716054903, 5559.785440937868], - [763.2728716054902, 5725.385440937867], - [862.5728716054903, 5725.385440937867], - [763.2728716054902, 5890.985440937867], - [663.9728716054901, 5725.385440937867], - [763.2728716054902, 5559.785440937868], - [763.2728716054902, 5394.185440937868], - [862.5728716054903, 5228.585440937869], - [961.8728716054903, 5394.185440937868], - [1061.1728716054904, 5394.185440937868], - [961.8728716054903, 5559.785440937868], - [862.5728716054903, 5394.185440937868], - [763.2728716054902, 5228.585440937869], - [663.9728716054901, 5062.9854409378695], - [763.2728716054902, 5062.9854409378695], - [763.2728716054902, 4897.38544093787], - [663.9728716054901, 4731.785440937871], - [564.6728716054901, 4731.785440937871], - [465.37287160549005, 4566.185440937871], - [366.0728716054901, 4566.185440937871], - [465.37287160549005, 4731.785440937871], - [564.6728716054901, 4566.185440937871], - [465.37287160549005, 4400.585440937872], - [366.0728716054901, 4400.585440937872], - [266.77287160549014, 4234.985440937872], - [167.47287160549016, 4234.985440937872], - [266.77287160549014, 4400.585440937872], - [266.77287160549014, 4566.185440937871], - [167.47287160549016, 4400.585440937872], - [68.17287160549016, 4234.985440937872], - [167.47287160549013, 4069.3854409378723], - [68.17287160549013, 3903.7854409378724], - [68.17287160549013, 4069.3854409378723], - [167.47287160549013, 3903.7854409378724], - [266.77287160549014, 3903.7854409378724], - [366.0728716054901, 3738.1854409378725], - [266.77287160549014, 3738.1854409378725], - [266.77287160549014, 3572.5854409378726], - [167.47287160549016, 3406.9854409378727], - [167.47287160549016, 3241.3854409378728], - [266.77287160549014, 3241.3854409378728], - [266.77287160549014, 3406.9854409378727], - [366.0728716054901, 3572.5854409378726], - [465.37287160549005, 3738.1854409378725], - [465.37287160549005, 3903.7854409378724], - [366.0728716054901, 4069.3854409378723], - [366.0728716054901, 4234.985440937872], - [465.37287160549005, 4234.985440937872], - [564.6728716054901, 4069.3854409378723], - [465.37287160549005, 4069.3854409378723], - [564.6728716054901, 4234.985440937872], - [663.9728716054901, 4069.3854409378723], - [663.9728716054901, 4234.985440937872], - [663.9728716054901, 4400.585440937872], - [763.2728716054902, 4566.185440937871], - [763.2728716054902, 4400.585440937872], - [663.9728716054901, 4566.185440937871], - [564.6728716054901, 4400.585440937872], - [19431.915041401327, 3495.506142643713], - [19332.61504140133, 3661.1061426437127], - [19431.915041401327, 3661.1061426437127], - [19531.215041401327, 3661.1061426437127], - [19630.515041401326, 3495.506142643713], - [19630.515041401326, 3661.1061426437127], - [19729.815041401325, 3826.7061426437126], - [19630.515041401326, 3826.7061426437126], - [19729.815041401325, 3992.3061426437125], - [19630.515041401326, 3992.3061426437125], - [19630.515041401326, 4157.906142643712], - [19630.515041401326, 4323.506142643711], - [19531.215041401327, 4157.906142643712], - [19431.915041401327, 4323.506142643711], - [19531.215041401327, 4489.106142643711], - [19431.915041401327, 4654.70614264371], - [19332.61504140133, 4654.70614264371], - [19332.61504140133, 4820.30614264371], - [19332.61504140133, 4985.906142643709], - [19233.31504140133, 4985.906142643709], - [19134.01504140133, 5151.506142643709], - [19034.71504140133, 5151.506142643709], - [19134.01504140133, 5317.106142643708], - [19034.71504140133, 5317.106142643708], - [19034.71504140133, 5482.706142643708], - [18935.41504140133, 5648.306142643707], - [18836.115041401332, 5813.9061426437065], - [18836.115041401332, 5979.506142643706], - [18935.41504140133, 5979.506142643706], - [19034.71504140133, 6145.106142643705], - [19034.71504140133, 5979.506142643706], - [19034.71504140133, 5813.9061426437065], - [19134.01504140133, 5648.306142643707], - [19233.31504140133, 5648.306142643707], - [19134.01504140133, 5813.9061426437065], - [19134.01504140133, 5979.506142643706], - [19233.31504140133, 5813.9061426437065], - [19233.31504140133, 5979.506142643706], - [19332.61504140133, 6145.106142643705], - [19332.61504140133, 6310.706142643705], - [19233.31504140133, 6310.706142643705], - [19233.31504140133, 6476.306142643704], - [19332.61504140133, 6476.306142643704], - [19431.915041401327, 6641.906142643704], - [19332.61504140133, 6807.506142643703], - [19332.61504140133, 6641.906142643704], - [19431.915041401327, 6476.306142643704], - [19431.915041401327, 6310.706142643705], - [19531.215041401327, 6145.106142643705], - [19431.915041401327, 5979.506142643706], - [19431.915041401327, 6145.106142643705], - [19531.215041401327, 5979.506142643706], - [19630.515041401326, 5813.9061426437065], - [19630.515041401326, 5979.506142643706], - [19729.815041401325, 5813.9061426437065], - [19829.115041401325, 5979.506142643706], - [19729.815041401325, 5979.506142643706], - [19729.815041401325, 6145.106142643705], - [19729.815041401325, 6310.706142643705], - [19630.515041401326, 6476.306142643704], - [19729.815041401325, 6476.306142643704], - [19630.515041401326, 6310.706142643705], - [19531.215041401327, 6310.706142643705], - [19531.215041401327, 6476.306142643704], - [19630.515041401326, 6641.906142643704], - [19729.815041401325, 6807.506142643703], - [19829.115041401325, 6973.106142643703], - [19928.415041401324, 6973.106142643703], - [19928.415041401324, 7138.706142643702], - [20027.715041401323, 7138.706142643702], - [20027.715041401323, 7304.306142643702], - [19928.415041401324, 7304.306142643702], - [19829.115041401325, 7304.306142643702], - [19829.115041401325, 7469.906142643701], - [19928.415041401324, 7469.906142643701], - [19928.415041401324, 7635.5061426437005], - [19928.415041401324, 7801.1061426437], - [20027.715041401323, 7635.5061426437005], - [20027.715041401323, 7801.1061426437], - [20127.015041401322, 7801.1061426437], - [20226.31504140132, 7801.1061426437], - [20325.61504140132, 7801.1061426437], - [20226.31504140132, 7635.5061426437005], - [20226.31504140132, 7469.906142643701], - [20226.31504140132, 7304.306142643702], - [20127.015041401322, 7304.306142643702], - [20027.715041401323, 7469.906142643701], - [20127.015041401322, 7469.906142643701], - [20127.015041401322, 7635.5061426437005], - [2748.790306732237, 2362.9553147492866], - [2848.0903067322365, 2528.5553147492865], - [2748.790306732237, 2694.1553147492864], - [2649.490306732237, 2859.7553147492863], - [2748.790306732237, 3025.355314749286], - [2848.0903067322365, 2859.7553147492863], - [2848.0903067322365, 2694.1553147492864], - [2947.3903067322362, 2694.1553147492864], - [3046.690306732236, 2859.7553147492863], - [3145.9903067322357, 2694.1553147492864], - [3145.9903067322357, 2528.5553147492865], - [3046.690306732236, 2694.1553147492864], - [3145.9903067322357, 2859.7553147492863], - [3046.690306732236, 3025.355314749286], - [3145.9903067322357, 3025.355314749286], - [3245.2903067322354, 3190.955314749286], - [3245.2903067322354, 3356.555314749286], - [3344.590306732235, 3522.155314749286], - [3443.890306732235, 3356.555314749286], - [3543.1903067322346, 3356.555314749286], - [3642.4903067322343, 3190.955314749286], - [3741.790306732234, 3025.355314749286], - [3741.790306732234, 2859.7553147492863], - [3841.090306732234, 3025.355314749286], - [3841.090306732234, 3190.955314749286], - [3741.790306732234, 3190.955314749286], - [3642.4903067322343, 3025.355314749286], - [3543.1903067322346, 3025.355314749286], - [3543.1903067322346, 2859.7553147492863], - [3443.890306732235, 3025.355314749286], - [3443.890306732235, 3190.955314749286], - [3543.1903067322346, 3190.955314749286], - [3642.4903067322343, 3356.555314749286], - [3543.1903067322346, 3522.155314749286], - [3443.890306732235, 3687.755314749286], - [3443.890306732235, 3853.3553147492858], - [3344.590306732235, 3687.755314749286], - [3245.2903067322354, 3853.3553147492858], - [3245.2903067322354, 3687.755314749286], - [3145.9903067322357, 3687.755314749286], - [3046.690306732236, 3853.3553147492858], - [3145.9903067322357, 4018.9553147492857], - [3145.9903067322357, 3853.3553147492858], - [3046.690306732236, 3687.755314749286], - [3145.9903067322357, 3522.155314749286], - [3145.9903067322357, 3356.555314749286], - [3145.9903067322357, 3190.955314749286], - [3046.690306732236, 3190.955314749286], - [3046.690306732236, 3356.555314749286], - [2947.3903067322362, 3356.555314749286], - [2848.0903067322365, 3190.955314749286], - [2947.3903067322362, 3025.355314749286], - [2848.0903067322365, 3025.355314749286], - [2748.790306732237, 2859.7553147492863], - [2649.490306732237, 2694.1553147492864], - [2748.790306732237, 2528.5553147492865], - [2848.0903067322365, 2362.9553147492866], - [2748.790306732237, 2197.3553147492867], - [2649.490306732237, 2362.9553147492866], - [2649.490306732237, 2197.3553147492867], - [2550.1903067322373, 2362.9553147492866], - [2450.8903067322376, 2362.9553147492866], - [2351.590306732238, 2528.5553147492865], - [2252.290306732238, 2528.5553147492865], - [2351.590306732238, 2362.9553147492866], - [2252.290306732238, 2197.3553147492867], - [2351.590306732238, 2197.3553147492867], - [2351.590306732238, 2031.7553147492865], - [2351.590306732238, 1866.1553147492864], - [2252.290306732238, 1866.1553147492864], - [2351.590306732238, 1700.5553147492863], - [2450.8903067322376, 1534.9553147492861], - [2351.590306732238, 1369.355314749286], - [2252.290306732238, 1203.7553147492858], - [2252.290306732238, 1369.355314749286], - [2252.290306732238, 1534.9553147492861], - [2152.9903067322384, 1369.355314749286], - [2053.6903067322387, 1369.355314749286], - [1954.3903067322387, 1203.7553147492858], - [1855.0903067322388, 1203.7553147492858], - [1755.7903067322388, 1038.1553147492857], - [1656.4903067322389, 1038.1553147492857], - [1557.190306732239, 872.5553147492857], - [1457.890306732239, 1038.1553147492857], - [1457.890306732239, 872.5553147492857], - [1457.890306732239, 706.9553147492858], - [1557.190306732239, 706.9553147492858], - [1656.4903067322389, 872.5553147492857], - [1656.4903067322389, 706.9553147492858], - [1755.7903067322388, 706.9553147492858], - [1656.4903067322389, 541.3553147492859], - [1557.190306732239, 375.7553147492859], - [1656.4903067322389, 210.1553147492859], - [1755.7903067322388, 44.55531474928592], - [1656.4903067322389, 44.55531474928592], - [1557.190306732239, 210.1553147492859], - [1457.890306732239, 210.1553147492859], - [1457.890306732239, 44.55531474928592], - [1358.590306732239, 210.1553147492859], - [1358.590306732239, 375.75531474928584], - [1259.290306732239, 210.15531474928585], - [1259.290306732239, 375.75531474928584], - [1259.290306732239, 541.3553147492859], - [1358.590306732239, 706.9553147492858], - [1358.590306732239, 872.5553147492857], - [1259.290306732239, 706.9553147492858], - [1259.290306732239, 872.5553147492857], - [1259.290306732239, 1038.1553147492857], - [1358.590306732239, 1203.7553147492858], - [1358.590306732239, 1038.1553147492857], - [1457.890306732239, 1203.7553147492858], - [1557.190306732239, 1369.355314749286], - [1656.4903067322389, 1203.7553147492858], - [1557.190306732239, 1203.7553147492858], - [1557.190306732239, 1038.1553147492857], - [17254.572515546668, 1460.5807801244923], - [17353.872515546667, 1626.1807801244925], - [17453.172515546667, 1791.7807801244926], - [17552.472515546666, 1791.7807801244926], - [17453.172515546667, 1626.1807801244925], - [17353.872515546667, 1791.7807801244926], - [17453.172515546667, 1957.3807801244927], - [17353.872515546667, 2122.980780124493], - [17453.172515546667, 2288.580780124493], - [17353.872515546667, 2454.1807801244927], - [17453.172515546667, 2619.7807801244926], - [17552.472515546666, 2619.7807801244926], - [17453.172515546667, 2785.3807801244925], - [17353.872515546667, 2619.7807801244926], - [17254.572515546668, 2454.1807801244927], - [17254.572515546668, 2288.580780124493], - [17353.872515546667, 2288.580780124493], - [17453.172515546667, 2122.980780124493], - [17552.472515546666, 2288.580780124493], - [17552.472515546666, 2454.1807801244927], - [17453.172515546667, 2454.1807801244927], - [4447.67624466283, 4761.1416826913], - [4546.97624466283, 4595.541682691301], - [4546.97624466283, 4429.941682691301], - [4447.67624466283, 4429.941682691301], - [4447.67624466283, 4595.541682691301], - [4348.37624466283, 4595.541682691301], - [4249.07624466283, 4595.541682691301], - [4348.37624466283, 4761.1416826913], - [4249.07624466283, 4761.1416826913], - [4348.37624466283, 4926.7416826912995], - [4348.37624466283, 5092.341682691299], - [4447.67624466283, 5257.941682691298], - [4546.97624466283, 5257.941682691298], - [4646.27624466283, 5092.341682691299], - [4546.97624466283, 5092.341682691299], - [4646.27624466283, 4926.7416826912995], - [4646.27624466283, 4761.1416826913], - [4546.97624466283, 4761.1416826913], - [4646.27624466283, 4595.541682691301], - [4745.5762446628305, 4595.541682691301], - [4646.27624466283, 4429.941682691301], - [4745.5762446628305, 4429.941682691301], - [4844.876244662831, 4595.541682691301], - [4745.5762446628305, 4761.1416826913], - [4745.5762446628305, 4926.7416826912995], - [4844.876244662831, 4761.1416826913], - [4944.176244662831, 4761.1416826913], - [5043.476244662831, 4926.7416826912995], - [5043.476244662831, 4761.1416826913], - [5142.776244662831, 4926.7416826912995], - [5142.776244662831, 4761.1416826913], - [5242.076244662831, 4595.541682691301], - [5142.776244662831, 4595.541682691301], - [5242.076244662831, 4429.941682691301], - [5242.076244662831, 4264.341682691302], - [5142.776244662831, 4429.941682691301], - [5043.476244662831, 4595.541682691301], - [5043.476244662831, 4429.941682691301], - [5043.476244662831, 4264.341682691302], - [5142.776244662831, 4098.741682691302], - [5043.476244662831, 4098.741682691302], - [4944.176244662831, 3933.1416826913023], - [4944.176244662831, 4098.741682691302], - [4944.176244662831, 4264.341682691302], - [4844.876244662831, 4098.741682691302], - [4745.5762446628305, 4264.341682691302], - [4646.27624466283, 4098.741682691302], - [4546.97624466283, 3933.1416826913023], - [4447.67624466283, 4098.741682691302], - [4546.97624466283, 4264.341682691302], - [4447.67624466283, 4264.341682691302], - [4546.97624466283, 4098.741682691302], - [4646.27624466283, 3933.1416826913023], - [4546.97624466283, 3767.5416826913024], - [4447.67624466283, 3601.9416826913025], - [4447.67624466283, 3767.5416826913024], - [4348.37624466283, 3767.5416826913024], - [4348.37624466283, 3933.1416826913023], - [4249.07624466283, 3767.5416826913024], - [4249.07624466283, 3933.1416826913023], - [4149.776244662829, 3933.1416826913023], - [4050.4762446628297, 4098.741682691302], - [4050.4762446628297, 3933.1416826913023], - [3951.17624466283, 3933.1416826913023], - [3951.17624466283, 4098.741682691302], - [3851.8762446628302, 4264.341682691302], - [3851.8762446628302, 4098.741682691302], - [3752.5762446628305, 4098.741682691302], - [3653.276244662831, 4264.341682691302], - [3553.976244662831, 4429.941682691301], - [3553.976244662831, 4595.541682691301], - [3454.6762446628313, 4429.941682691301], - [3553.976244662831, 4264.341682691302], - [3653.276244662831, 4429.941682691301], - [3752.5762446628305, 4264.341682691302], - [3752.5762446628305, 4429.941682691301], - [3851.8762446628302, 4595.541682691301], - [3851.8762446628302, 4429.941682691301], - [3951.17624466283, 4429.941682691301], - [4050.4762446628297, 4264.341682691302], - [4149.776244662829, 4098.741682691302], - [4249.07624466283, 4264.341682691302], - [4348.37624466283, 4098.741682691302], - [4447.67624466283, 3933.1416826913023], - [9574.088902135607, 7352.26293905581], - [9474.788902135606, 7352.26293905581], - [9375.488902135605, 7186.662939055811], - [9474.788902135606, 7021.0629390558115], - [9574.088902135607, 7021.0629390558115], - [9474.788902135606, 7186.662939055811], - [9574.088902135607, 7186.662939055811], - [9673.388902135608, 7021.0629390558115], - [9673.388902135608, 6855.462939055812], - [9772.68890213561, 6689.862939055813], - [9673.388902135608, 6689.862939055813], - [9772.68890213561, 6524.262939055813], - [9871.98890213561, 6358.662939055814], - [9971.288902135611, 6524.262939055813], - [10070.588902135612, 6358.662939055814], - [10070.588902135612, 6193.062939055814], - [9971.288902135611, 6027.462939055815], - [9971.288902135611, 5861.862939055815], - [9871.98890213561, 5861.862939055815], - [9871.98890213561, 5696.262939055816], - [9971.288902135611, 5530.662939055816], - [10070.588902135612, 5530.662939055816], - [10070.588902135612, 5696.262939055816], - [10169.888902135614, 5861.862939055815], - [10169.888902135614, 5696.262939055816], - [10070.588902135612, 5861.862939055815], - [10169.888902135614, 6027.462939055815], - [10169.888902135614, 6193.062939055814], - [10269.188902135615, 6027.462939055815], - [10269.188902135615, 5861.862939055815], - [10368.488902135616, 6027.462939055815], - [10269.188902135615, 6193.062939055814], - [10269.188902135615, 6358.662939055814], - [10169.888902135614, 6358.662939055814], - [10070.588902135612, 6524.262939055813], - [10070.588902135612, 6689.862939055813], - [9971.288902135611, 6855.462939055812], - [9971.288902135611, 7021.0629390558115], - [10070.588902135612, 7186.662939055811], - [10169.888902135614, 7186.662939055811], - [10269.188902135615, 7186.662939055811], - [10169.888902135614, 7352.26293905581], - [10070.588902135612, 7352.26293905581], - [10169.888902135614, 7517.86293905581], - [10169.888902135614, 7683.462939055809], - [10269.188902135615, 7517.86293905581], - [10368.488902135616, 7683.462939055809], - [10467.788902135617, 7683.462939055809], - [10368.488902135616, 7517.86293905581], - [10269.188902135615, 7352.26293905581], - [10368.488902135616, 7352.26293905581], - [10368.488902135616, 7186.662939055811], - [10368.488902135616, 7021.0629390558115], - [10368.488902135616, 6855.462939055812], - [10269.188902135615, 6855.462939055812], - [10169.888902135614, 6855.462939055812], - [10169.888902135614, 7021.0629390558115], - [10070.588902135612, 7021.0629390558115], - [10070.588902135612, 6855.462939055812], - [10169.888902135614, 6689.862939055813], - [10269.188902135615, 6689.862939055813], - [10169.888902135614, 6524.262939055813], - [10269.188902135615, 6524.262939055813], - [10368.488902135616, 6524.262939055813], - [10368.488902135616, 6358.662939055814], - [10467.788902135617, 6358.662939055814], - [10467.788902135617, 6193.062939055814], - [10567.088902135618, 6358.662939055814], - [10567.088902135618, 6193.062939055814], - [10666.388902135619, 6193.062939055814], - [10666.388902135619, 6358.662939055814], - [10567.088902135618, 6524.262939055813], - [10467.788902135617, 6524.262939055813], - [10567.088902135618, 6689.862939055813], - [10467.788902135617, 6855.462939055812], - [10567.088902135618, 7021.0629390558115], - [10467.788902135617, 7021.0629390558115], - [10567.088902135618, 6855.462939055812], - [10467.788902135617, 6689.862939055813], - [10368.488902135616, 6689.862939055813], - [1073.6944354374714, 1154.3681204032646], - [974.3944354374713, 1319.9681204032647], - [875.0944354374712, 1319.9681204032647], - [775.7944354374712, 1154.3681204032646], - [775.7944354374712, 988.7681204032646], - [875.0944354374712, 823.1681204032647], - [875.0944354374712, 657.5681204032647], - [775.7944354374712, 823.1681204032647], - [676.4944354374711, 657.5681204032647], - [676.4944354374711, 491.9681204032648], - [775.7944354374712, 657.5681204032647], - [676.4944354374711, 823.1681204032647], - [676.4944354374711, 988.7681204032646], - [577.194435437471, 823.1681204032647], - [577.194435437471, 988.7681204032646], - [577.194435437471, 1154.3681204032646], - [676.4944354374711, 1319.9681204032647], - [577.194435437471, 1319.9681204032647], - [477.89443543747103, 1319.9681204032647], - [577.194435437471, 1485.5681204032649], - [477.89443543747103, 1651.168120403265], - [577.194435437471, 1816.7681204032651], - [477.89443543747103, 1816.7681204032651], - [378.5944354374711, 1982.3681204032653], - [378.5944354374711, 2147.9681204032654], - [279.2944354374711, 2313.5681204032653], - [179.99443543747114, 2147.9681204032654], - [80.69443543747114, 2313.5681204032653], - [80.69443543747114, 2479.168120403265], - [179.9944354374711, 2644.768120403265], - [179.9944354374711, 2479.168120403265], - [179.9944354374711, 2313.5681204032653], - [80.69443543747111, 2147.9681204032654], - [80.69443543747111, 1982.3681204032653], - [179.9944354374711, 1982.3681204032653], - [179.9944354374711, 1816.7681204032651], - [80.69443543747111, 1816.7681204032651], - [179.9944354374711, 1651.168120403265], - [80.69443543747111, 1485.5681204032649], - [80.69443543747111, 1319.9681204032647], - [179.9944354374711, 1154.3681204032646], - [80.69443543747111, 1154.3681204032646], - [179.9944354374711, 988.7681204032646], - [279.2944354374711, 823.1681204032647], - [378.5944354374711, 657.5681204032647], - [378.5944354374711, 823.1681204032647], - [477.89443543747103, 823.1681204032647], - [477.89443543747103, 657.5681204032647], - [378.5944354374711, 491.9681204032648], - [477.89443543747103, 326.3681204032648], - [477.89443543747103, 160.76812040326482], - [378.5944354374711, 160.76812040326482], - [279.2944354374711, 326.3681204032648], - [179.99443543747114, 491.9681204032648], - [179.99443543747114, 326.3681204032648], - [279.2944354374711, 491.9681204032648], - [279.2944354374711, 657.5681204032647], - [179.99443543747114, 823.1681204032647], - [279.2944354374711, 988.7681204032646], - [279.2944354374711, 1154.3681204032646], - [378.5944354374711, 1319.9681204032647], - [477.89443543747103, 1485.5681204032649], - [577.194435437471, 1651.168120403265], - [676.4944354374711, 1651.168120403265], - [775.7944354374712, 1816.7681204032651], - [676.4944354374711, 1816.7681204032651], - [775.7944354374712, 1651.168120403265], - [875.0944354374712, 1651.168120403265], - [974.3944354374713, 1651.168120403265], - [875.0944354374712, 1485.5681204032649], - [775.7944354374712, 1485.5681204032649], - [676.4944354374711, 1485.5681204032649], - [775.7944354374712, 1319.9681204032647], - [676.4944354374711, 1154.3681204032646], - [3138.413562431697, 2355.845602060523], - [3039.113562431697, 2521.445602060523], - [3039.113562431697, 2355.845602060523], - [3039.113562431697, 2190.245602060523], - [3138.413562431697, 2024.645602060523], - [3237.7135624316966, 1859.045602060523], - [3237.7135624316966, 2024.645602060523], - [3337.0135624316963, 1859.045602060523], - [3337.0135624316963, 1693.4456020605228], - [3436.313562431696, 1527.8456020605227], - [3535.6135624316958, 1693.4456020605228], - [3535.6135624316958, 1859.045602060523], - [3634.9135624316955, 2024.645602060523], - [3734.213562431695, 2190.245602060523], - [3634.9135624316955, 2190.245602060523], - [3535.6135624316958, 2190.245602060523], - [3535.6135624316958, 2355.845602060523], - [3535.6135624316958, 2521.445602060523], - [3436.313562431696, 2687.045602060523], - [3436.313562431696, 2852.645602060523], - [3535.6135624316958, 2687.045602060523], - [3634.9135624316955, 2521.445602060523], - [3634.9135624316955, 2355.845602060523], - [3734.213562431695, 2355.845602060523], - [3833.513562431695, 2190.245602060523], - [3932.8135624316947, 2024.645602060523], - [3833.513562431695, 1859.045602060523], - [3833.513562431695, 1693.4456020605228], - [3734.213562431695, 1859.045602060523], - [3734.213562431695, 1693.4456020605228], - [3734.213562431695, 1527.8456020605227], - [3634.9135624316955, 1527.8456020605227], - [3634.9135624316955, 1693.4456020605228], - [3535.6135624316958, 1527.8456020605227], - [3634.9135624316955, 1362.2456020605225], - [3535.6135624316958, 1362.2456020605225], - [3436.313562431696, 1196.6456020605224], - [3535.6135624316958, 1196.6456020605224], - [3535.6135624316958, 1031.0456020605222], - [3436.313562431696, 1031.0456020605222], - [3535.6135624316958, 865.4456020605222], - [3436.313562431696, 865.4456020605222], - [3535.6135624316958, 699.8456020605223], - [3634.9135624316955, 699.8456020605223], - [3535.6135624316958, 534.2456020605224], - [3436.313562431696, 368.64560206052244], - [3436.313562431696, 203.04560206052244], - [3337.0135624316963, 37.445602060522454], - [3436.313562431696, 37.445602060522454], - [3337.0135624316963, 203.04560206052244], - [3237.7135624316966, 37.445602060522454], - [3138.413562431697, 37.445602060522454], - [3237.7135624316966, 203.04560206052244], - [3337.0135624316963, 368.6456020605224], - [3436.313562431696, 534.2456020605224], - [3337.0135624316963, 699.8456020605223], - [3237.7135624316966, 534.2456020605224], - [3337.0135624316963, 534.2456020605224], - [3436.313562431696, 699.8456020605223], - [3337.0135624316963, 865.4456020605222], - [3237.7135624316966, 865.4456020605222], - [3337.0135624316963, 1031.0456020605222], - [3237.7135624316966, 1196.6456020605224], - [3138.413562431697, 1362.2456020605225], - [3039.113562431697, 1527.8456020605227], - [3138.413562431697, 1527.8456020605227], - [3039.113562431697, 1693.4456020605228], - [2939.8135624316974, 1527.8456020605227], - [2840.5135624316977, 1362.2456020605225], - [2840.5135624316977, 1527.8456020605227], - [2840.5135624316977, 1693.4456020605228], - [2939.8135624316974, 1859.045602060523], - [2840.5135624316977, 2024.645602060523], - [2840.5135624316977, 1859.045602060523], - [2939.8135624316974, 1693.4456020605228], - [3039.113562431697, 1859.045602060523], - [3039.113562431697, 2024.645602060523], - [2939.8135624316974, 2190.245602060523], - [2939.8135624316974, 2024.645602060523], - [16388.412117675925, 1839.818884803299], - [16289.112117675924, 1839.818884803299], - [16388.412117675925, 1674.2188848032988], - [16487.712117675925, 1508.6188848032987], - [16487.712117675925, 1674.2188848032988], - [16388.412117675925, 1508.6188848032987], - [16289.112117675924, 1343.0188848032985], - [16289.112117675924, 1508.6188848032987], - [16189.812117675923, 1674.2188848032988], - [16090.512117675922, 1839.818884803299], - [16090.512117675922, 2005.418884803299], - [15991.212117675921, 2171.018884803299], - [16090.512117675922, 2336.618884803299], - [16090.512117675922, 2502.218884803299], - [16090.512117675922, 2667.8188848032987], - [15991.212117675921, 2833.4188848032986], - [15991.212117675921, 2999.0188848032985], - [15891.91211767592, 3164.6188848032984], - [15891.91211767592, 3330.2188848032984], - [15991.212117675921, 3330.2188848032984], - [16090.512117675922, 3330.2188848032984], - [16189.812117675923, 3495.8188848032983], - [16289.112117675924, 3495.8188848032983], - [16189.812117675923, 3330.2188848032984], - [16189.812117675923, 3164.6188848032984], - [16289.112117675924, 3164.6188848032984], - [16388.412117675925, 3164.6188848032984], - [16388.412117675925, 3330.2188848032984], - [16487.712117675925, 3330.2188848032984], - [16587.012117675924, 3495.8188848032983], - [16587.012117675924, 3661.418884803298], - [16686.312117675923, 3661.418884803298], - [16785.612117675922, 3661.418884803298], - [16884.91211767592, 3661.418884803298], - [16984.21211767592, 3661.418884803298], - [16884.91211767592, 3827.018884803298], - [16884.91211767592, 3992.618884803298], - [16984.21211767592, 3827.018884803298], - [17083.51211767592, 3661.418884803298], - [17182.81211767592, 3495.8188848032983], - [17182.81211767592, 3330.2188848032984], - [17282.11211767592, 3164.6188848032984], - [17282.11211767592, 3330.2188848032984], - [17182.81211767592, 3164.6188848032984], - [17083.51211767592, 3164.6188848032984], - [16984.21211767592, 3330.2188848032984], - [16984.21211767592, 3495.8188848032983], - [17083.51211767592, 3330.2188848032984], - [16984.21211767592, 3164.6188848032984], - [16984.21211767592, 2999.0188848032985], - [17083.51211767592, 2833.4188848032986], - [17083.51211767592, 2667.8188848032987], - [17182.81211767592, 2667.8188848032987], - [17182.81211767592, 2833.4188848032986], - [17083.51211767592, 2999.0188848032985], - [16984.21211767592, 2833.4188848032986], - [16884.91211767592, 2833.4188848032986], - [16884.91211767592, 2999.0188848032985], - [16785.612117675922, 2999.0188848032985], - [16884.91211767592, 3164.6188848032984], - [16785.612117675922, 3164.6188848032984], - [16686.312117675923, 3164.6188848032984], - [16587.012117675924, 3164.6188848032984], - [16587.012117675924, 2999.0188848032985], - [16487.712117675925, 3164.6188848032984], - [16587.012117675924, 3330.2188848032984], - [16686.312117675923, 3495.8188848032983], - [16686.312117675923, 3330.2188848032984], - [16785.612117675922, 3330.2188848032984], - [16884.91211767592, 3495.8188848032983], - [16785.612117675922, 3495.8188848032983], - [16884.91211767592, 3330.2188848032984], - [1272.175991128079, 3842.7700224365044], - [1371.475991128079, 3842.7700224365044], - [1272.175991128079, 3677.1700224365045], - [1172.875991128079, 3511.5700224365046], - [1272.175991128079, 3511.5700224365046], - [1172.875991128079, 3345.9700224365047], - [1073.575991128079, 3180.3700224365048], - [1073.575991128079, 3014.770022436505], - [974.275991128079, 3014.770022436505], - [874.9759911280789, 3014.770022436505], - [775.6759911280789, 2849.170022436505], - [775.6759911280789, 3014.770022436505], - [775.6759911280789, 3180.3700224365048], - [676.3759911280788, 3345.9700224365047], - [676.3759911280788, 3511.5700224365046], - [775.6759911280789, 3677.1700224365045], - [676.3759911280788, 3842.7700224365044], - [577.0759911280787, 3842.7700224365044], - [577.0759911280787, 3677.1700224365045], - [676.3759911280788, 3677.1700224365045], - [775.6759911280789, 3511.5700224365046], - [775.6759911280789, 3345.9700224365047], - [874.9759911280789, 3345.9700224365047], - [874.9759911280789, 3180.3700224365048], - [974.275991128079, 3180.3700224365048], - [974.275991128079, 3345.9700224365047], - [1073.575991128079, 3511.5700224365046], - [1073.575991128079, 3677.1700224365045], - [1172.875991128079, 3677.1700224365045], - [1172.875991128079, 3842.7700224365044], - [1073.575991128079, 3842.7700224365044], - [1172.875991128079, 4008.3700224365043], - [1073.575991128079, 4008.3700224365043], - [974.275991128079, 3842.7700224365044], - [974.275991128079, 4008.3700224365043], - [874.9759911280789, 4008.3700224365043], - [775.6759911280789, 4008.3700224365043], - [874.9759911280789, 3842.7700224365044], - [974.275991128079, 3677.1700224365045], - [974.275991128079, 3511.5700224365046], - [1073.575991128079, 3345.9700224365047], - [1172.875991128079, 3180.3700224365048], - [1272.175991128079, 3180.3700224365048], - [1272.175991128079, 3345.9700224365047], - [1371.475991128079, 3180.3700224365048], - [1470.7759911280789, 3345.9700224365047], - [1371.475991128079, 3345.9700224365047], - [1371.475991128079, 3511.5700224365046], - [1470.7759911280789, 3511.5700224365046], - [1570.0759911280788, 3677.1700224365045], - [1470.7759911280789, 3677.1700224365045], - [1570.0759911280788, 3511.5700224365046], - [1669.3759911280788, 3511.5700224365046], - [1669.3759911280788, 3677.1700224365045], - [1768.6759911280787, 3842.7700224365044], - [1669.3759911280788, 3842.7700224365044], - [1768.6759911280787, 4008.3700224365043], - [1867.9759911280787, 3842.7700224365044], - [1967.2759911280787, 3677.1700224365045], - [2066.5759911280784, 3842.7700224365044], - [2165.875991128078, 3677.1700224365045], - [2066.5759911280784, 3511.5700224365046], - [2165.875991128078, 3511.5700224365046], - [2066.5759911280784, 3677.1700224365045], - [2165.875991128078, 3842.7700224365044], - [2265.175991128078, 4008.3700224365043], - [2364.4759911280776, 4008.3700224365043], - [2265.175991128078, 3842.7700224365044], - [2364.4759911280776, 3677.1700224365045], - [2463.7759911280773, 3842.7700224365044], - [2463.7759911280773, 4008.3700224365043], - [2364.4759911280776, 3842.7700224365044] -]; - -@pragma('dart2js:assumeDynamic') -@pragma('dart2js:noInline') -confuse(x) => x; - -main() { - print(confuse(panels).length); -} diff --git a/tests/language_2/unsorted/liveness_test.dart b/tests/language_2/unsorted/liveness_test.dart deleted file mode 100644 index 33dde3bb038..00000000000 --- a/tests/language_2/unsorted/liveness_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2012, 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 test program testing closures. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -foo(x) { - var y = x; - for (int i = 0; i < 10; i++) x++; - return y; -} - -main() { - Expect.equals(499, foo(499)); -} diff --git a/tests/language_2/unsorted/load_indexed_constant_test.dart b/tests/language_2/unsorted/load_indexed_constant_test.dart deleted file mode 100644 index 64493175241..00000000000 --- a/tests/language_2/unsorted/load_indexed_constant_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2013, 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. -// Test constant propagation of load-indexed operations -// VMOptions=--optimization-counter-threshold=10 - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -main() { - Expect.equals(101, stringIndexedLoad()); - Expect.equals(102, arrayIndexedLoad()); - for (int i = 0; i < 20; i++) { - stringIndexedLoad(); - arrayIndexedLoad(); - } - Expect.equals(101, stringIndexedLoad()); - Expect.equals(102, arrayIndexedLoad()); -} - -stringIndexedLoad() => ("Hello").codeUnitAt(1); -arrayIndexedLoad() => (const [101, 102, 103])[1]; diff --git a/tests/language_2/unsorted/local_var_in_annotation_test.dart b/tests/language_2/unsorted/local_var_in_annotation_test.dart deleted file mode 100644 index c9e22e3eeb8..00000000000 --- a/tests/language_2/unsorted/local_var_in_annotation_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Regression test for https://github.com/dart-lang/sdk/issues/37065 - -const x = 0; -main(@x args) { - const z = 0; - foo(@z args) {} - bar(@x args) {} -} diff --git a/tests/language_2/unsorted/many_calls_test.dart b/tests/language_2/unsorted/many_calls_test.dart deleted file mode 100644 index 9da3f6cbc97..00000000000 --- a/tests/language_2/unsorted/many_calls_test.dart +++ /dev/null @@ -1,225 +0,0 @@ -// 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. -// Test megamorphic calls. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - A() {} - f1() { - return 1; - } - - f2() { - return 2; - } - - f3() { - return 3; - } - - f4() { - return 4; - } - - f5() { - return 5; - } - - f6() { - return 6; - } - - f7() { - return 7; - } - - f8() { - return 8; - } - - f9() { - return 9; - } - - f11() { - return 11; - } - - f12() { - return 12; - } - - f13() { - return 13; - } - - f14() { - return 14; - } - - f15() { - return 15; - } - - f16() { - return 16; - } - - f17() { - return 17; - } - - f18() { - return 18; - } - - f19() { - return 19; - } - - f20() { - return 20; - } - - f21() { - return 21; - } - - f22() { - return 22; - } - - f23() { - return 23; - } - - f24() { - return 24; - } - - f25() { - return 25; - } - - f26() { - return 26; - } - - f27() { - return 27; - } - - f28() { - return 28; - } - - f29() { - return 29; - } - - f30() { - return 30; - } - - f31() { - return 31; - } - - f32() { - return 32; - } - - f33() { - return 33; - } - - f34() { - return 34; - } - - f35() { - return 35; - } - - f36() { - return 36; - } - - f37() { - return 37; - } - - f38() { - return 38; - } - - f39() { - return 39; - } -} - -class B extends A { - B() : super() {} -} - -class ManyCallsTest { - static testMain() { - var list = new List.filled(10, null); - for (int i = 0; i < (list.length ~/ 2); i++) { - list[i] = new A(); - } - for (int i = (list.length ~/ 2); i < list.length; i++) { - list[i] = new B(); - } - for (int loop = 0; loop < 7; loop++) { - for (int i = 0; i < list.length; i++) { - Expect.equals(1, list[i].f1()); - Expect.equals(2, list[i].f2()); - Expect.equals(3, list[i].f3()); - Expect.equals(4, list[i].f4()); - Expect.equals(5, list[i].f5()); - Expect.equals(6, list[i].f6()); - Expect.equals(7, list[i].f7()); - Expect.equals(8, list[i].f8()); - Expect.equals(9, list[i].f9()); - Expect.equals(11, list[i].f11()); - Expect.equals(12, list[i].f12()); - Expect.equals(13, list[i].f13()); - Expect.equals(14, list[i].f14()); - Expect.equals(15, list[i].f15()); - Expect.equals(16, list[i].f16()); - Expect.equals(17, list[i].f17()); - Expect.equals(18, list[i].f18()); - Expect.equals(19, list[i].f19()); - Expect.equals(20, list[i].f20()); - Expect.equals(21, list[i].f21()); - Expect.equals(22, list[i].f22()); - Expect.equals(23, list[i].f23()); - Expect.equals(24, list[i].f24()); - Expect.equals(25, list[i].f25()); - Expect.equals(26, list[i].f26()); - Expect.equals(27, list[i].f27()); - Expect.equals(28, list[i].f28()); - Expect.equals(29, list[i].f29()); - Expect.equals(30, list[i].f30()); - Expect.equals(31, list[i].f31()); - Expect.equals(32, list[i].f32()); - Expect.equals(33, list[i].f33()); - Expect.equals(34, list[i].f34()); - Expect.equals(35, list[i].f35()); - Expect.equals(36, list[i].f36()); - Expect.equals(37, list[i].f37()); - Expect.equals(38, list[i].f38()); - Expect.equals(39, list[i].f39()); - } - } - } -} - -main() { - ManyCallsTest.testMain(); -} diff --git a/tests/language_2/unsorted/many_method_calls_test.dart b/tests/language_2/unsorted/many_method_calls_test.dart deleted file mode 100644 index 7b56c4ee5a6..00000000000 --- a/tests/language_2/unsorted/many_method_calls_test.dart +++ /dev/null @@ -1,6646 +0,0 @@ -// Copyright (c) 2015, 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 - -// Test that compiler does not crash for very long chains of method calls. - -var field = false; - -foo() { - if (field) { - print('foo'); - } -} - -main() { - manyMethodCalls(); - field = true; -} - -manyMethodCalls() { - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); - foo(); -} diff --git a/tests/language_2/unsorted/many_named_arguments_test.dart b/tests/language_2/unsorted/many_named_arguments_test.dart deleted file mode 100644 index 0e9170ac255..00000000000 --- a/tests/language_2/unsorted/many_named_arguments_test.dart +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -class Fisk { - method( - {a: 'a', - b: 'b', - c: 'c', - d: 'd', - e: 'e', - f: 'f', - g: 'g', - h: 'h', - i: 'i', - j: 'j', - k: 'k', - l: 'l', - m: 'm', - n: 'n', - o: 'o', - p: 'p', - q: 'q', - r: 'r', - s: 's', - t: 't', - u: 'u', - v: 'v', - w: 'w', - x: 'x', - y: 'y', - z: 'z'}) { - return 'a: $a, ' - 'b: $b, ' - 'c: $c, ' - 'd: $d, ' - 'e: $e, ' - 'f: $f, ' - 'g: $g, ' - 'h: $h, ' - 'i: $i, ' - 'j: $j, ' - 'k: $k, ' - 'l: $l, ' - 'm: $m, ' - 'n: $n, ' - 'o: $o, ' - 'p: $p, ' - 'q: $q, ' - 'r: $r, ' - 's: $s, ' - 't: $t, ' - 'u: $u, ' - 'v: $v, ' - 'w: $w, ' - 'x: $x, ' - 'y: $y, ' - 'z: $z'; - } -} - -main() { - var method = new Fisk().method; - var namedArguments = new Map(); - namedArguments[const Symbol('a')] = 'a'; - Expect.stringEquals( - EXPECTED_RESULT, Function.apply(method, [], namedArguments)); - Expect.stringEquals( - EXPECTED_RESULT, - new Fisk().method( - a: 'a', - b: 'b', - c: 'c', - d: 'd', - e: 'e', - f: 'f', - g: 'g', - h: 'h', - i: 'i', - j: 'j', - k: 'k', - l: 'l', - m: 'm', - n: 'n', - o: 'o', - p: 'p', - q: 'q', - r: 'r', - s: 's', - t: 't', - u: 'u', - v: 'v', - w: 'w', - x: 'x', - y: 'y', - z: 'z')); -} - -const String EXPECTED_RESULT = 'a: a, ' - 'b: b, ' - 'c: c, ' - 'd: d, ' - 'e: e, ' - 'f: f, ' - 'g: g, ' - 'h: h, ' - 'i: i, ' - 'j: j, ' - 'k: k, ' - 'l: l, ' - 'm: m, ' - 'n: n, ' - 'o: o, ' - 'p: p, ' - 'q: q, ' - 'r: r, ' - 's: s, ' - 't: t, ' - 'u: u, ' - 'v: v, ' - 'w: w, ' - 'x: x, ' - 'y: y, ' - 'z: z'; diff --git a/tests/language_2/unsorted/mega_load_test.dart b/tests/language_2/unsorted/mega_load_test.dart deleted file mode 100644 index 962c847f7e1..00000000000 --- a/tests/language_2/unsorted/mega_load_test.dart +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (c) 2012, 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. -// Test megamorphic, but single target field load. -// VMOptions=--optimization-counter-threshold=10 - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Base { - var f; -} - -class A extends Base { - A() { - this.f = 0; - } -} - -class B extends Base { - B() { - this.f = 1; - } -} - -class C extends Base { - C() { - this.f = 2; - } -} - -class D extends Base { - D() { - this.f = 3; - } -} - -class E extends Base { - E() { - this.f = 4; - } -} - -class F extends Base { - F() { - this.f = 5; - } -} - -class G extends Base { - G() { - this.f = 6; - } -} - -class H extends Base { - H() { - this.f = 7; - } -} - -class I extends Base { - I() { - this.f = 8; - } -} - -class J extends Base { - J() { - this.f = 9; - } -} - -class K extends Base { - K() { - this.f = 10; - } -} - -class L extends Base { - L() { - this.f = 11; - } -} - -class M extends Base { - M() { - this.f = 12; - } -} - -class N extends Base { - N() { - this.f = 13; - } -} - -class O extends Base { - O() { - this.f = 14; - } -} - -class P extends Base { - P() { - this.f = 15; - } -} - -class Q extends Base { - Q() { - this.f = 16; - } -} - -class R extends Base { - R() { - this.f = 17; - } -} - -class S extends Base { - S() { - this.f = 18; - } -} - -class T extends Base { - T() { - this.f = 19; - } -} - -class U extends Base { - U() { - this.f = 20; - } -} - -class V extends Base { - V() { - this.f = 21; - } -} - -class W extends Base { - V() { - this.f = 22; - } -} - -class X extends Base { - V() { - this.f = 21; - } -} - -class Y extends Base { - V() { - this.f = 24; - } -} - -class Z extends Base { - V() { - this.f = 21; - } -} - -allocateObjects() { - var list = []; - list.add(new A()); - list.add(new B()); - list.add(new C()); - list.add(new D()); - list.add(new E()); - list.add(new F()); - list.add(new G()); - list.add(new H()); - list.add(new I()); - list.add(new J()); - list.add(new K()); - list.add(new L()); - list.add(new M()); - list.add(new N()); - list.add(new O()); - list.add(new P()); - list.add(new Q()); - list.add(new R()); - list.add(new S()); - list.add(new T()); - list.add(new U()); - list.add(new V()); - return list; -} - -callThemAll(var list) { - for (var i = 0; i < list.length; i++) { - Expect.equals(i, list[i].f); - } -} - -main() { - var list = allocateObjects(); - // Make sure the optimizer triggers the compilation of callThemAll. - for (var i = 0; i < 20; i++) { - callThemAll(list); - } -} diff --git a/tests/language_2/unsorted/memory_swap_test.dart b/tests/language_2/unsorted/memory_swap_test.dart deleted file mode 100644 index af050c3260b..00000000000 --- a/tests/language_2/unsorted/memory_swap_test.dart +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2014, 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 - -// Test that the ParallelMoveResolver in the VM uses valid registers -// when requiring scratch registers. - -main() { - // Iterate enough to ensure optimizing `spillingMethod`. - for (int i = 0; i < 100000; i++) { - spillingMethod(i, () => 0); - } -} - -spillingMethod(what, obfuscate) { - // Define lots of variables to get a few in stack. - var a = obfuscate(); - var b = obfuscate(); - var c = obfuscate(); - var d = obfuscate(); - var e = obfuscate(); - var f = obfuscate(); - var g = obfuscate(); - var h = obfuscate(); - var i = obfuscate(); - var j = obfuscate(); - var k = obfuscate(); - var l = obfuscate(); - var m = obfuscate(); - var n = obfuscate(); - var o = obfuscate(); - var p = obfuscate(); - var q = obfuscate(); - var r = obfuscate(); - var s = obfuscate(); - var t = obfuscate(); - var u = obfuscate(); - var v = obfuscate(); - - // Swap all variables, in the hope of a memory <-> memory swap operation. - while (what == 42) { - a = b; - b = a; - c = d; - d = c; - e = f; - f = e; - g = h; - h = g; - i = j; - j = i; - k = l; - l = k; - m = n; - n = m; - o = p; - p = o; - q = r; - r = q; - s = t; - t = s; - u = v; - v = u; - what++; - } - - // Keep all variables alive. - return a + - b + - c + - d + - e + - f + - g + - h + - i + - j + - k + - l + - m + - n + - o + - p + - q + - r + - s + - t + - u + - v; -} diff --git a/tests/language_2/unsorted/mint_compares_test.dart b/tests/language_2/unsorted/mint_compares_test.dart deleted file mode 100644 index fdc1e04d7e7..00000000000 --- a/tests/language_2/unsorted/mint_compares_test.dart +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) 2012, 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. -// VMOptions=--optimization-counter-threshold=10 - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test compares on 64-bit integers. - -compareTest() { - Expect.isFalse(4294967296 < 6); - Expect.isFalse(4294967296 < 4294967296); - Expect.isFalse(4294967296 <= 6); - Expect.isTrue(4294967296 <= 4294967296); - Expect.isFalse(4294967296 < 4294967295); - - Expect.isTrue(-4294967296 < 6); - Expect.isTrue(-4294967296 < 4294967296); - Expect.isTrue(-4294967296 <= 6); - Expect.isTrue(-4294967296 <= 4294967296); - Expect.isTrue(-4294967296 < 4294967295); - - Expect.isFalse(4294967296 < -6); - Expect.isFalse(4294967296 <= -6); - Expect.isFalse(4294967296 < -4294967295); - - Expect.isTrue(-4294967296 < -6); - Expect.isTrue(-4294967296 <= -6); - Expect.isTrue(-4294967296 < -4294967295); - - Expect.isTrue(4294967296 > 6); - Expect.isFalse(4294967296 > 4294967296); - Expect.isTrue(4294967296 >= 6); - Expect.isTrue(4294967296 >= 4294967296); - Expect.isTrue(4294967296 > 4294967295); - - Expect.isFalse(-4294967296 > 6); - Expect.isFalse(-4294967296 > 4294967296); - Expect.isFalse(-4294967296 >= 6); - Expect.isFalse(-4294967296 >= 4294967296); - Expect.isFalse(-4294967296 > 4294967295); - - Expect.isTrue(4294967296 > -6); - Expect.isTrue(4294967296 >= -6); - Expect.isTrue(4294967296 > -4294967295); - - Expect.isFalse(-4294967296 > -6); - Expect.isFalse(-4294967296 >= -6); - Expect.isFalse(-4294967296 > -4294967295); - - Expect.isTrue(4294967296 < 9223372036854775807); - Expect.isTrue(-4294967296 < 9223372036854775807); - Expect.isFalse(4294967296 < -9223372036854775808); - Expect.isFalse(-4294967296 < -9223372036854775808); -} - -compareTest2(lt, lte, gt, gte) { - Expect.isFalse(lt(4294967296, 6)); - Expect.isFalse(lte(4294967296, 6)); - Expect.isTrue(gt(4294967296, 6)); - Expect.isTrue(gte(4294967296, 6)); - - Expect.isTrue(lte(-1, -1)); - Expect.isTrue(gte(-1, -1)); - Expect.isTrue(lte(-2, -1)); - Expect.isFalse(gte(-2, -1)); - Expect.isTrue(lte(-4294967296, -1)); - Expect.isFalse(gte(-4294967296, -1)); - - Expect.isTrue(lt(-2, -1)); - Expect.isFalse(gt(-2, -1)); - Expect.isTrue(lt(-4294967296, -1)); - Expect.isFalse(gt(-4294967296, -1)); - - Expect.isFalse(lt(-1, -4294967296)); - Expect.isTrue(gt(-1, -4294967296)); - Expect.isFalse(lt(2, -2)); - Expect.isTrue(gt(2, -2)); - Expect.isFalse(lt(4294967296, -1)); - Expect.isTrue(gt(4294967296, -1)); -} - -compareTestWithZero(lt, lte, gt, gte, eq, ne) { - Expect.isFalse(lt(4294967296)); - Expect.isFalse(lte(4294967296)); - Expect.isTrue(gt(4294967296)); - Expect.isTrue(gte(4294967296)); - Expect.isFalse(eq(4294967296)); - Expect.isTrue(ne(4294967296)); - - Expect.isTrue(lt(-1)); - Expect.isTrue(lte(-1)); - Expect.isFalse(gt(-1)); - Expect.isFalse(gte(-1)); - Expect.isFalse(eq(-1)); - Expect.isTrue(ne(-1)); - - Expect.isTrue(lt(-2)); - Expect.isTrue(lte(-2)); - Expect.isFalse(gt(-2)); - Expect.isFalse(gte(-2)); - Expect.isFalse(eq(-2)); - Expect.isTrue(ne(-2)); - - Expect.isTrue(lt(-4294967296)); - Expect.isTrue(lte(-4294967296)); - Expect.isFalse(gt(-4294967296)); - Expect.isFalse(gte(-4294967296)); - Expect.isFalse(eq(-4294967296)); - Expect.isTrue(ne(-4294967296)); - - Expect.isFalse(lt(0)); - Expect.isTrue(lte(0)); - Expect.isFalse(gt(0)); - Expect.isTrue(gte(0)); - Expect.isTrue(eq(0)); - Expect.isFalse(ne(0)); -} - -bool lt1(a, b) => a < b; -bool lte1(a, b) => a <= b; -bool gt1(a, b) => a > b; -bool gte1(a, b) => a >= b; - -bool lt2(a, b) => a < b ? true : false; -bool lte2(a, b) => a <= b ? true : false; -bool gt2(a, b) => a > b ? true : false; -bool gte2(a, b) => a >= b ? true : false; - -bool int_lt1(int a) => a < 0; -bool int_lte1(int a) => a <= 0; -bool int_gt1(int a) => a > 0; -bool int_gte1(int a) => a >= 0; -bool int_eq1(int a) => a == 0; -bool int_ne1(int a) => a != 0; - -bool int_lt2(int a) => a < 0 ? true : false; -bool int_lte2(int a) => a <= 0 ? true : false; -bool int_gt2(int a) => a > 0 ? true : false; -bool int_gte2(int a) => a >= 0 ? true : false; -bool int_eq2(int a) => a == 0 ? true : false; -bool int_ne2(int a) => a != 0 ? true : false; - -main() { - for (var i = 0; i < 20; i++) { - compareTest(); - compareTest2(lt1, lte1, gt1, gte1); - compareTest2(lt2, lte2, gt2, gte2); - - compareTestWithZero(int_lt1, int_lte1, int_gt1, int_gte1, int_eq1, int_ne1); - compareTestWithZero(int_lt2, int_lte2, int_gt2, int_gte2, int_eq2, int_ne2); - } -} diff --git a/tests/language_2/unsorted/mock_writable_final_field_test.dart b/tests/language_2/unsorted/mock_writable_final_field_test.dart deleted file mode 100644 index 7835e940461..00000000000 --- a/tests/language_2/unsorted/mock_writable_final_field_test.dart +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2017, 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 - -import 'package:expect/expect.dart'; - -final values = []; - -class Mock { - noSuchMethod(Invocation i) { - var expected = i.isGetter ? #x : const Symbol("x="); - Expect.equals(expected.toString(), i.memberName.toString()); - values.add(i.positionalArguments[0]); - } -} - -class Foo { - // Prevent obfuscation of 'x'. - @pragma("vm:entry-point") - int x; -} - -class Bar extends Mock implements Foo { - final int x = 42; -} - -class _Baz implements Foo { - final int x = 42; - - noSuchMethod(Invocation i) { - var expected = i.isGetter ? #x : const Symbol("x="); - Expect.equals(expected.toString(), i.memberName.toString()); - values.add(i.positionalArguments[0]); - } -} - -void main() { - { - Bar b = new Bar(); - Expect.equals(b.x, 42); - b.x = 123; - Expect.listEquals([123], values); - values.clear(); - } - { - // It works the same if called statically through the Foo interface. - Foo b = new Bar(); - Expect.equals(b.x, 42); - b.x = 123; - Expect.listEquals([123], values); - values.clear(); - } - { - // It works the same if the noSuchMethod is defined directly in the class. - Foo b = new _Baz(); - Expect.equals(b.x, 42); - b.x = 123; - Expect.listEquals([123], values); - values.clear(); - } -} diff --git a/tests/language_2/unsorted/multi_pass2_test.dart b/tests/language_2/unsorted/multi_pass2_test.dart deleted file mode 100644 index 31e48749fee..00000000000 --- a/tests/language_2/unsorted/multi_pass2_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// 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 test for loading several dart files and resolving superclasses lazily. -// Same as MultiPassTest, except that the file order is reversed. - -// @dart = 2.9 - -library MultiPassTest.dart; - -import "package:expect/expect.dart"; -part "multi_pass_a.dart"; -part "multi_pass_b.dart"; - -class Base { - Base(this.value) {} - var value; -} - -class MultiPass2Test { - static testMain() { - var a = new B(5); - Expect.equals(5, a.value); - } -} - -main() { - MultiPass2Test.testMain(); -} diff --git a/tests/language_2/unsorted/multi_pass_a.dart b/tests/language_2/unsorted/multi_pass_a.dart deleted file mode 100644 index 4c66703b53f..00000000000 --- a/tests/language_2/unsorted/multi_pass_a.dart +++ /dev/null @@ -1,12 +0,0 @@ -// 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 test for loading several dart files and resolving superclasses lazily. - -// @dart = 2.9 - -part of MultiPassTest.dart; - -class A extends Base { - A(v) : super(v) {} -} diff --git a/tests/language_2/unsorted/multi_pass_b.dart b/tests/language_2/unsorted/multi_pass_b.dart deleted file mode 100644 index 9b3aa32cc00..00000000000 --- a/tests/language_2/unsorted/multi_pass_b.dart +++ /dev/null @@ -1,12 +0,0 @@ -// 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 test for loading several dart files and resolving superclasses lazily. - -// @dart = 2.9 - -part of MultiPassTest.dart; - -class B extends A { - B(v) : super(v) {} -} diff --git a/tests/language_2/unsorted/multi_pass_test.dart b/tests/language_2/unsorted/multi_pass_test.dart deleted file mode 100644 index 0b05e952e46..00000000000 --- a/tests/language_2/unsorted/multi_pass_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// 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 test for loading several dart files and resolving superclasses lazily. - -// @dart = 2.9 - -library MultiPassTest.dart; - -import "package:expect/expect.dart"; -part "multi_pass_a.dart"; -part "multi_pass_b.dart"; - -class Base { - Base(this.value) {} - var value; -} - -class MultiPassTest { - static testMain() { - var a = new B(5); - Expect.equals(5, a.value); - } -} - -main() { - MultiPassTest.testMain(); -} diff --git a/tests/language_2/unsorted/namer2_test.dart b/tests/language_2/unsorted/namer2_test.dart deleted file mode 100644 index 8c400ca1b4c..00000000000 --- a/tests/language_2/unsorted/namer2_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -// Test that user field names cannot clash with internal names of the -// dart2js compiler. - -class A { - var $isA; - var $eq; - var $builtinTypeInfo; -} - -main() { - var c = [new A()]; - Expect.isTrue(c[0] is A); - Expect.isTrue(c[0] == c[0]); - - c = [new A()]; - c[0].$builtinTypeInfo = 42; - Expect.isTrue(c[0] is! A); -} diff --git a/tests/language_2/unsorted/namer_test.dart b/tests/language_2/unsorted/namer_test.dart deleted file mode 100644 index abe13bb1e35..00000000000 --- a/tests/language_2/unsorted/namer_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Regression test for a bug in dart2js where global names could -// collide. - -var i = 'top level'; - -var i0 = 'top level zero'; - -var i00 = 'top level zero zero'; - -var i2 = 'top level too'; - -class A { - static var i = 'A'; -} - -var j = 'top level'; - -var j0 = 'top level zero'; - -var j00 = 'top level zero zero'; - -var j2 = 'top level too'; - -class B { - static var j = 'B'; -} - -var k = 'top level'; - -var k0 = 'top level zero'; - -var k00 = 'top level zero zero'; - -var k2 = 'top level too'; - -class C { - static var k = 'C'; -} - -main() { - // Order matters. This sequence triggered the bug. - Expect.equals('top level', i); - Expect.equals('A', A.i); - Expect.equals('top level too', i2); - Expect.equals('top level zero zero', i00); - Expect.equals('top level zero', i0); - - Expect.equals('top level zero zero', j00); - Expect.equals('top level', j); - Expect.equals('top level too', j2); - Expect.equals('top level zero', j0); - Expect.equals('B', B.j); - - Expect.equals('top level too', k2); - Expect.equals('top level zero', k0); - Expect.equals('top level', k); - Expect.equals('C', C.k); - Expect.equals('top level zero zero', k00); -} diff --git a/tests/language_2/unsorted/native_test.dart b/tests/language_2/unsorted/native_test.dart deleted file mode 100644 index 0b5707c4cf7..00000000000 --- a/tests/language_2/unsorted/native_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// 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 test program which shows how to write self verifying tests -// and how to print dart objects if needed. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Helper { - static int foo(int i) { - return i + 10; - } -} - -class NativeTest { - static testMain() { - int i = 10; - int result = 10 + 10 + 10; - i = Helper.foo(i + 10); - print("$i is result."); - Expect.equals(i, result); - } -} - -main() { - NativeTest.testMain(); -} diff --git a/tests/language_2/unsorted/parse_types_test.dart b/tests/language_2/unsorted/parse_types_test.dart deleted file mode 100644 index b4f40040f57..00000000000 --- a/tests/language_2/unsorted/parse_types_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// 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 test for testing parsing of "standard" types. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class ParseTypesTest { - static bool callBool1() { - return true; - } - - static bool callBool2() { - return false; - } - - static int callInt() { - return 2; - } - - static String callString() { - return "Hey"; - } - - static double callDouble() { - return 4.0; - } - - static void testMain() { - Expect.equals(true, ParseTypesTest.callBool1()); - Expect.equals(false, ParseTypesTest.callBool2()); - Expect.equals(2, ParseTypesTest.callInt()); - Expect.equals("Hey", ParseTypesTest.callString()); - Expect.equals(4.0, ParseTypesTest.callDouble()); - } -} - -main() { - ParseTypesTest.testMain(); -} diff --git a/tests/language_2/unsorted/partial_min_test.dart b/tests/language_2/unsorted/partial_min_test.dart deleted file mode 100644 index f66db487250..00000000000 --- a/tests/language_2/unsorted/partial_min_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// This test triggered an NPE in dart2js. -// The bug needed: -// - double usage of the same variable in one expression ("b != b"). -// - replacement of "b" with "typechecked b". -// - ... -// The example below is minimal (as far as I was able to do). - -num foo(num a, num b) { - if (a > b) return b; - if (b is double) { - if (true) { - if (true) { - return (a + b) * a * b; - } - } - // Check for NaN and b == -0.0. - if (a == 0 && b == 0 || b != b) return b; - } -} - -main() { - Expect.equals(1, foo(2, 1)); -} diff --git a/tests/language_2/unsorted/patch_test.dart b/tests/language_2/unsorted/patch_test.dart deleted file mode 100644 index 34faf19f3d6..00000000000 --- a/tests/language_2/unsorted/patch_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -patch() { - return 12; -} - -main() { - var x = patch(); - Expect.equals(12, x); -} diff --git a/tests/language_2/unsorted/property_field_override_test.dart b/tests/language_2/unsorted/property_field_override_test.dart deleted file mode 100644 index 24bc7287b41..00000000000 --- a/tests/language_2/unsorted/property_field_override_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -// Test overriding a getter property with a field. -abstract class A { - int get v; // Abstract. - - int a() { - return v - 1; - } -} - -class B extends A { - int v = 3; - - int b() { - return ++v; - } -} - -main() { - var x = new B(); - Expect.equals(3, x.v); - Expect.equals(2, x.a()); - Expect.equals(4, x.b()); -} diff --git a/tests/language_2/unsorted/range_analysis2_test.dart b/tests/language_2/unsorted/range_analysis2_test.dart deleted file mode 100644 index 464169952f3..00000000000 --- a/tests/language_2/unsorted/range_analysis2_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to remove bounds checks on -// boxed variables. - -import "package:expect/expect.dart"; - -main() { - var a = 0; - var b = [1]; - foo() => b[a--] + b[a]; - Expect.throwsRangeError(foo); -} diff --git a/tests/language_2/unsorted/range_analysis3_test.dart b/tests/language_2/unsorted/range_analysis3_test.dart deleted file mode 100644 index debf01d4d55..00000000000 --- a/tests/language_2/unsorted/range_analysis3_test.dart +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright (c) 2014, 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 - -import "package:expect/expect.dart"; - -confuse(x) { - if (new DateTime.now().millisecondsSinceEpoch == 0) { - return confuse(x + 1); - } else if (new DateTime.now().millisecondsSinceEpoch == 0) { - return confuse(x - 1); - } - return x; -} - -test1() { - int x = 0; - // Give x a range of -1 to 0. - if (confuse(0) == 1) x = -1; - - int y = 0; - // Give y a range of 0 to 1. - if (confuse(0) == 1) y = 1; - - var zero = 0; - - var status = "bad"; - if (x < zero) { - Expect.fail("unreachable"); - } else { - // Dart2js must not conclude that zero has a range of [-1, 0]. - if (y <= zero) { - status = "good"; - } - } - Expect.equals("good", status); -} - -test2() { - int x = 0; - // Give x a range of -1 to 0. - if (confuse(0) == 1) x = -1; - - int y = 0; - // Give y a range of -1 to 1. - if (confuse(0) == 1) y = 1; - if (confuse(1) == 2) y = -1; - - var status = "good"; - if (x < y) { - Expect.fail("unreachable"); - } else { - // Dart2js must not conclude that y has a range of [-1, -1]. - if (y == -1) { - status = "bad"; - } - } - Expect.equals("good", status); -} - -test3a() { - int x = 0; - // Give x a range of -1 to 1. - if (confuse(0) == 1) x = -1; - if (confuse(1) == 2) x = 1; - - int y = 0; - // Give y a range of -1 to 1. - if (confuse(0) == 1) y = 1; - if (confuse(1) == 2) y = -1; - - var status = "good"; - if (x < y) { - Expect.fail("unreachable"); - } else { - // Test that the range-analysis does not lose a value. - if (x <= -1) status = "bad"; - if (x >= 1) status = "bad"; - if (x < 0) status = "bad"; - if (x > 0) status = "bad"; - if (-1 >= x) status = "bad"; - if (1 <= x) status = "bad"; - if (0 > x) status = "bad"; - if (0 < x) status = "bad"; - if (y <= -1) status = "bad"; - if (y >= 1) status = "bad"; - if (y < 0) status = "bad"; - if (y > 0) status = "bad"; - if (-1 >= y) status = "bad"; - if (1 <= y) status = "bad"; - if (0 > y) status = "bad"; - if (0 < y) status = "bad"; - } - Expect.equals("good", status); -} - -test3b() { - int x = 0; - // Give x a range of -2 to 0. - if (confuse(0) == 1) x = -2; - - int y = 0; - // Give y a range of -1 to 1. - if (confuse(0) == 1) y = 1; - if (confuse(1) == 2) y = -1; - - var status = "good"; - if (x < y) { - Expect.fail("unreachable"); - } else { - // Test that the range-analysis does not lose a value. - if (x <= -1) status = "bad"; - if (x >= 1) status = "bad"; - if (x < 0) status = "bad"; - if (x > 0) status = "bad"; - if (-1 >= x) status = "bad"; - if (1 <= x) status = "bad"; - if (0 > x) status = "bad"; - if (0 < x) status = "bad"; - if (y <= -1) status = "bad"; - if (y >= 1) status = "bad"; - if (y < 0) status = "bad"; - if (y > 0) status = "bad"; - if (-1 >= y) status = "bad"; - if (1 <= y) status = "bad"; - if (0 > y) status = "bad"; - if (0 < y) status = "bad"; - } - Expect.equals("good", status); -} - -test4a() { - int x = -1; - // Give x a range of -1 to 1. - if (confuse(0) == 1) x = 1; - - int y = 0; - // Give y a range of -1 to 1. - if (confuse(0) == 1) y = 1; - if (confuse(1) == 2) y = -1; - - var status = "good"; - if (x < y) { - // Test that the range-analysis does not lose a value. - if (x <= -2) status = "bad"; - if (x >= 0) status = "bad"; - if (x < -1) status = "bad"; - if (x > -1) status = "bad"; - if (-2 >= x) status = "bad"; - if (0 <= x) status = "bad"; - if (-1 > x) status = "bad"; - if (-1 < x) status = "bad"; - if (y <= -1) status = "bad"; - if (y >= 1) status = "bad"; - if (y < 0) status = "bad"; - if (y > 0) status = "bad"; - if (-1 >= y) status = "bad"; - if (1 <= y) status = "bad"; - if (0 > y) status = "bad"; - if (0 < y) status = "bad"; - } else { - Expect.fail("unreachable"); - } - Expect.equals("good", status); -} - -test4b() { - int x = -1; - // Give x a range of -2 to 0. - if (confuse(0) == 1) x = -2; - if (confuse(1) == 2) x = 0; - - int y = 0; - // Give y a range of -1 to 1. - if (confuse(0) == 1) y = 1; - if (confuse(1) == 2) y = -1; - - var status = "good"; - if (x < y) { - // Test that the range-analysis does not lose a value. - if (x <= -2) status = "bad"; - if (x >= 0) status = "bad"; - if (x < -1) status = "bad"; - if (x > -1) status = "bad"; - if (-2 >= x) status = "bad"; - if (0 <= x) status = "bad"; - if (-1 > x) status = "bad"; - if (-1 < x) status = "bad"; - if (y <= -1) status = "bad"; - if (y >= 1) status = "bad"; - if (y < 0) status = "bad"; - if (y > 0) status = "bad"; - if (-1 >= y) status = "bad"; - if (1 <= y) status = "bad"; - if (0 > y) status = "bad"; - if (0 < y) status = "bad"; - } else { - Expect.fail("unreachable"); - } - Expect.equals("good", status); -} - -main() { - test1(); - test2(); - test3a(); - test3b(); - test4a(); - test4b(); -} diff --git a/tests/language_2/unsorted/range_analysis_test.dart b/tests/language_2/unsorted/range_analysis_test.dart deleted file mode 100644 index 0c9f3857f32..00000000000 --- a/tests/language_2/unsorted/range_analysis_test.dart +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) 2012, 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 test program for constructors and initializers. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Check that range analysis does not enter infinite loop trying to propagate -// ranges through dependant phis. -bar() { - var sum = 0; - for (var i = 0; i < 10; i++) { - for (var j = i - 1; j >= 0; j--) { - for (var k = j; k < i; k++) { - sum += (i + j + k); - } - } - } - return sum; -} - -test1() { - for (var i = 0; i < 20; i++) bar(); -} - -// Check that range analysis does not erroneously remove overflow check. -test2() { - var width = 1073741823; - Expect.equals(width - 1, foo(width - 5000, width - 1)); - Expect.equals(width, foo(width - 5000, width)); -} - -foo(n, w) { - var x = 0; - for (var i = n; i <= w; i++) { - Expect.isTrue(i > 0); - x = i; - } - return x; -} - -// Test detection of unsatisfiable constraints. -f(a, b) { - if (a < b) { - if (a > b) { - throw "unreachable"; - } - return 2; - } - return 3; -} - -f1(a, b) { - if (a < b) { - if (a > b - 1) { - throw "unreachable"; - } - return 2; - } - return 3; -} - -f2(a, b) { - if (a < b) { - if (a > b - 2) { - return 2; - } - throw "unreachable"; - } - return 3; -} - -g() { - var i; - for (i = 0; i < 10; i++) { - if (i < 0) throw "unreachable"; - } - return i; -} - -h(n) { - var i; - for (i = 0; i < n; i++) { - if (i < 0) throw "unreachable"; - var j = i - 1; - if (j >= n - 1) throw "unreachable"; - } - return i; -} - -test3() { - test_fun(fun) { - Expect.equals(2, fun(0, 1)); - Expect.equals(3, fun(0, 0)); - for (var i = 0; i < 20; i++) fun(0, 1); - Expect.equals(2, fun(0, 1)); - Expect.equals(3, fun(0, 0)); - } - - test_fun(f); - test_fun(f1); - test_fun(f2); - - Expect.equals(10, g()); - for (var i = 0; i < 20; i++) g(); - Expect.equals(10, g()); - - Expect.equals(10, h(10)); - for (var i = 0; i < 20; i++) h(10); - Expect.equals(10, h(10)); -} - -main() { - test1(); - test2(); - test3(); -} diff --git a/tests/language_2/unsorted/recursive_calls_test.dart b/tests/language_2/unsorted/recursive_calls_test.dart deleted file mode 100644 index 75e0d4b9ff0..00000000000 --- a/tests/language_2/unsorted/recursive_calls_test.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -int bar(x) => foo(x + 1); -int foo(x) => x > 9 ? x : bar(x); - -main() { - Expect.equals(foo(int.parse("1")), 10); -} diff --git a/tests/language_2/unsorted/recursive_loop_phis_test.dart b/tests/language_2/unsorted/recursive_loop_phis_test.dart deleted file mode 100644 index 580b47deb32..00000000000 --- a/tests/language_2/unsorted/recursive_loop_phis_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// This program tripped dart2js. - -foo(bool b) { - var x = 499; - // If the loop-phi is not declared it will assign to a global and the - // recursive call will screw up the methods "local" state. - for (int i = 0; i < 3; i++) { - if (i == 0 && b) x = 42; - if (!b) foo(true); - } - return x; -} - -main() { - Expect.equals(499, foo(false)); -} diff --git a/tests/language_2/unsorted/refine_receiver_null_test.dart b/tests/language_2/unsorted/refine_receiver_null_test.dart deleted file mode 100644 index df580baaf6a..00000000000 --- a/tests/language_2/unsorted/refine_receiver_null_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for dart2js that used to infer that code following -// a dynamic call could assume the receiver is not null. This does not -// work for Object methods. - -import "package:expect/expect.dart"; - -main() { - var a = true ? null : 42; - a.toString(); - foo(a); -} - -@pragma('vm:never-inline') -@pragma('dart2js:noInline') -foo(a) { - var f = () => 42; - Expect.throwsNoSuchMethodError(() => a + 42); -} diff --git a/tests/language_2/unsorted/savannah_test.dart b/tests/language_2/unsorted/savannah_test.dart deleted file mode 100644 index 3200d2f42fa..00000000000 --- a/tests/language_2/unsorted/savannah_test.dart +++ /dev/null @@ -1,81 +0,0 @@ -// 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 test using an identity hash. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -abstract class BigGame { - String get name; -} - -// Giraffe overrides hashCode and provides its own identity hash. -class Giraffe implements BigGame { - final String name; - final int identityHash_; - - Giraffe(this.name) : identityHash_ = nextId() {} - - int get hashCode { - return identityHash_; - } - - // Calculate identity hash for a giraffe. - static int nextId_; - static int nextId() { - if (nextId_ == null) { - nextId_ = 17; - } - return nextId_++; - } -} - -// Zebra relies on the system provided identity hash. -class Zebra implements BigGame { - final String name; - Zebra(this.name) {} -} - -class SavannahTest { - static void testMain() { - Map savannah = new Map(); - - Giraffe giraffe1 = new Giraffe("Tony"); - Giraffe giraffe2 = new Giraffe("Rose"); - savannah[giraffe1] = giraffe1.name; - savannah[giraffe2] = giraffe2.name; - print("giraffe1 hash: ${giraffe1.hashCode}"); - print("giraffe2 hash: ${giraffe2.hashCode}"); - - var count = savannah.length; - print("getCount is $count"); - Expect.equals(2, count); - - print("giraffe1: ${savannah[giraffe1]}"); - print("giraffe2: ${savannah[giraffe2]}"); - Expect.equals("Tony", savannah[giraffe1]); - Expect.equals("Rose", savannah[giraffe2]); - - Zebra zebra1 = new Zebra("Paolo"); - Zebra zebra2 = new Zebra("Zeeta"); - savannah[zebra1] = zebra1.name; - savannah[zebra2] = zebra2.name; - print("zebra1 hash: ${zebra1.hashCode}"); - print("zebra2 hash: ${zebra2.hashCode}"); - - count = savannah.length; - print("getCount is $count"); - Expect.equals(4, count); - - print("zebra1: ${savannah[zebra1]}"); - print("zebra2: ${savannah[zebra2]}"); - Expect.equals("Paolo", savannah[zebra1]); - Expect.equals("Zeeta", savannah[zebra2]); - } -} - -main() { - SavannahTest.testMain(); -} diff --git a/tests/language_2/unsorted/scanner_test.dart b/tests/language_2/unsorted/scanner_test.dart deleted file mode 100644 index 08db501d599..00000000000 --- a/tests/language_2/unsorted/scanner_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// 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. -// Test dart scanner. - -// @dart = 2.9 - -class ScannerTest { - static testMain() { - var s = "Hello\tmy\tfriend\n"; - return s; - } -} - -main() { - ScannerTest.testMain(); -} diff --git a/tests/language_2/unsorted/second_test.dart b/tests/language_2/unsorted/second_test.dart deleted file mode 100644 index 48a48fdbc8e..00000000000 --- a/tests/language_2/unsorted/second_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// 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. -// Second dart test program. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Helper { - static empty() {} - static int foo() { - return 42; - } -} - -class SecondTest { - static testMain() { - Helper.empty(); - Expect.equals(42, Helper.foo()); - } -} - -main() { - SecondTest.testMain(); -} diff --git a/tests/language_2/unsorted/shadow_parameter_and_local_test.dart b/tests/language_2/unsorted/shadow_parameter_and_local_test.dart deleted file mode 100644 index 2b7b65ce291..00000000000 --- a/tests/language_2/unsorted/shadow_parameter_and_local_test.dart +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; - -// Regression test for https://github.com/dart-lang/sdk/issues/29733 in DDC. -foo(a) { - var a = 123; - return a; -} - -// Regression test for https://github.com/dart-lang/sdk/issues/30792 in DDC. -bar(a) async { - var a = 123; - return a; -} - -baz(a) sync* { - var a = 123; - yield a; -} - -qux(a) async* { - var a = 123; - yield a; -} - -// Regression test for https://github.com/dart-lang/sdk/issues/32140 -class C { - var x, y, localY, _value; - - C(a) { - var a = 123; - this.x = a; - } - - C.initY(this.y) { - var y = 123; - this.localY = y; - } - - method(a) { - var a = 123; - return a; - } - - mOptional([a = 0]) { - var a = 123; - return a; - } - - mNamed({a = 0}) { - var a = 123; - return a; - } - - mAsync({a: 0}) async { - var a = 123; - return a; - } - - mSyncStar({a: 0}) sync* { - var a = 123; - yield a; - } - - mAsyncStar({a: 0}) async* { - var a = 123; - yield a; - } - - get accessor => _value; - set accessor(a) { - var a = 123; - this._value = a; - } -} - -testCatch() { - try { - throw 'oops'; - } catch (e) { - var e = 123; - return e; - } -} - -testStackTrace() { - try { - throw 'oops'; - } catch (e, s) { - var s = 123; - return s; - } -} - -main() async { - Expect.equals(123, foo(42)); - Expect.equals(123, await bar(42)); - Expect.equals(123, baz(42).single); - Expect.equals(123, await qux(42).single); - - await testClass(); - - Expect.equals(123, testCatch()); - Expect.equals(123, testStackTrace()); -} - -testClass() async { - var c = new C('hi'); - Expect.equals(123, c.x); - Expect.equals(123, c.method(42)); - c.accessor = 42; - Expect.equals(123, c.accessor); - c = new C.initY(42); - Expect.equals(42, c.y); - Expect.equals(123, c.localY); - - Expect.equals(123, c.mOptional()); - Expect.equals(123, c.mOptional(42)); - - Expect.equals(123, c.mNamed()); - Expect.equals(123, c.mNamed(a: 42)); - - Expect.equals(123, await c.mAsync()); - - var iter = c.mSyncStar(); - Expect.listEquals([123], iter.toList()); - Expect.listEquals([123], iter.toList(), 'second iteration yields same value'); - - var stream = c.mAsyncStar(); - Expect.listEquals([123], await stream.toList()); -} diff --git a/tests/language_2/unsorted/side_effect_throw_test.dart b/tests/language_2/unsorted/side_effect_throw_test.dart deleted file mode 100644 index f2918953a85..00000000000 --- a/tests/language_2/unsorted/side_effect_throw_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -class B { - static var x; - operator <<(other) { - x = other; - return 33; - } -} - -class A { - get _m => new B(); - opshl(n) { - // 'n' must be a number, but we are not allowed to throw before we have - // evaluated _m << 499. - return (_m << 499) | (2 - n); - } -} - -main() { - var a = new A(); - Expect.throws(() => a.opshl("string")); - Expect.equals(499, B.x); -} diff --git a/tests/language_2/unsorted/smaller_4_Interface_Types_A11_t01_test.dart b/tests/language_2/unsorted/smaller_4_Interface_Types_A11_t01_test.dart deleted file mode 100644 index 42d069bbe49..00000000000 --- a/tests/language_2/unsorted/smaller_4_Interface_Types_A11_t01_test.dart +++ /dev/null @@ -1,271 +0,0 @@ - -// @dart = 2.9 -/* - * Copyright (c) 2013, 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. - */ - -// This is a small version of the co19 test -// Language/14_Types/4_Interface_Types_A11_t01. - -import 'package:expect/expect.dart'; - -class C {} - -main() { - Expect.isTrue(new C126() is C); - Expect.isTrue(new C126() is Object); -} - -class C1 extends C {} - -class C2 extends C1 {} - -class C3 extends C2 {} - -class C4 extends C3 {} - -class C5 extends C4 {} - -class C6 extends C5 {} - -class C7 extends C6 {} - -class C8 extends C7 {} - -class C9 extends C8 {} - -class C10 extends C9 {} - -class C11 extends C10 {} - -class C12 extends C11 {} - -class C13 extends C12 {} - -class C14 extends C13 {} - -class C15 extends C14 {} - -class C16 extends C15 {} - -class C17 extends C16 {} - -class C18 extends C17 {} - -class C19 extends C18 {} - -class C20 extends C19 {} - -class C21 extends C20 {} - -class C22 extends C21 {} - -class C23 extends C22 {} - -class C24 extends C23 {} - -class C25 extends C24 {} - -class C26 extends C25 {} - -class C27 extends C26 {} - -class C28 extends C27 {} - -class C29 extends C28 {} - -class C30 extends C29 {} - -class C31 extends C30 {} - -class C32 extends C31 {} - -class C33 extends C32 {} - -class C34 extends C33 {} - -class C35 extends C34 {} - -class C36 extends C35 {} - -class C37 extends C36 {} - -class C38 extends C37 {} - -class C39 extends C38 {} - -class C40 extends C39 {} - -class C41 extends C40 {} - -class C42 extends C41 {} - -class C43 extends C42 {} - -class C44 extends C43 {} - -class C45 extends C44 {} - -class C46 extends C45 {} - -class C47 extends C46 {} - -class C48 extends C47 {} - -class C49 extends C48 {} - -class C50 extends C49 {} - -class C51 extends C50 {} - -class C52 extends C51 {} - -class C53 extends C52 {} - -class C54 extends C53 {} - -class C55 extends C54 {} - -class C56 extends C55 {} - -class C57 extends C56 {} - -class C58 extends C57 {} - -class C59 extends C58 {} - -class C60 extends C59 {} - -class C61 extends C60 {} - -class C62 extends C61 {} - -class C63 extends C62 {} - -class C64 extends C63 {} - -class C65 extends C64 {} - -class C66 extends C65 {} - -class C67 extends C66 {} - -class C68 extends C67 {} - -class C69 extends C68 {} - -class C70 extends C69 {} - -class C71 extends C70 {} - -class C72 extends C71 {} - -class C73 extends C72 {} - -class C74 extends C73 {} - -class C75 extends C74 {} - -class C76 extends C75 {} - -class C77 extends C76 {} - -class C78 extends C77 {} - -class C79 extends C78 {} - -class C80 extends C79 {} - -class C81 extends C80 {} - -class C82 extends C81 {} - -class C83 extends C82 {} - -class C84 extends C83 {} - -class C85 extends C84 {} - -class C86 extends C85 {} - -class C87 extends C86 {} - -class C88 extends C87 {} - -class C89 extends C88 {} - -class C90 extends C89 {} - -class C91 extends C90 {} - -class C92 extends C91 {} - -class C93 extends C92 {} - -class C94 extends C93 {} - -class C95 extends C94 {} - -class C96 extends C95 {} - -class C97 extends C96 {} - -class C98 extends C97 {} - -class C99 extends C98 {} - -class C100 extends C99 {} - -class C101 extends C100 {} - -class C102 extends C101 {} - -class C103 extends C102 {} - -class C104 extends C103 {} - -class C105 extends C104 {} - -class C106 extends C105 {} - -class C107 extends C106 {} - -class C108 extends C107 {} - -class C109 extends C108 {} - -class C110 extends C109 {} - -class C111 extends C110 {} - -class C112 extends C111 {} - -class C113 extends C112 {} - -class C114 extends C113 {} - -class C115 extends C114 {} - -class C116 extends C115 {} - -class C117 extends C116 {} - -class C118 extends C117 {} - -class C119 extends C118 {} - -class C120 extends C119 {} - -class C121 extends C120 {} - -class C122 extends C121 {} - -class C123 extends C122 {} - -class C124 extends C123 {} - -class C125 extends C124 {} - -class C126 extends C125 {} diff --git a/tests/language_2/unsorted/smaller_4_Interface_Types_A11_t02_test.dart b/tests/language_2/unsorted/smaller_4_Interface_Types_A11_t02_test.dart deleted file mode 100644 index d2c1af844e3..00000000000 --- a/tests/language_2/unsorted/smaller_4_Interface_Types_A11_t02_test.dart +++ /dev/null @@ -1,272 +0,0 @@ - -// @dart = 2.9 -/* - * Copyright (c) 2013, 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. - */ - -// This is a small version of the co19 test -// Language/14_Types/4_Interface_Types_A11_t02. - -import 'package:expect/expect.dart'; - -class C {} - -class G {} - -main() { - Expect.isTrue(new G() is G); -} - -class C1 extends C {} - -class C2 extends C1 {} - -class C3 extends C2 {} - -class C4 extends C3 {} - -class C5 extends C4 {} - -class C6 extends C5 {} - -class C7 extends C6 {} - -class C8 extends C7 {} - -class C9 extends C8 {} - -class C10 extends C9 {} - -class C11 extends C10 {} - -class C12 extends C11 {} - -class C13 extends C12 {} - -class C14 extends C13 {} - -class C15 extends C14 {} - -class C16 extends C15 {} - -class C17 extends C16 {} - -class C18 extends C17 {} - -class C19 extends C18 {} - -class C20 extends C19 {} - -class C21 extends C20 {} - -class C22 extends C21 {} - -class C23 extends C22 {} - -class C24 extends C23 {} - -class C25 extends C24 {} - -class C26 extends C25 {} - -class C27 extends C26 {} - -class C28 extends C27 {} - -class C29 extends C28 {} - -class C30 extends C29 {} - -class C31 extends C30 {} - -class C32 extends C31 {} - -class C33 extends C32 {} - -class C34 extends C33 {} - -class C35 extends C34 {} - -class C36 extends C35 {} - -class C37 extends C36 {} - -class C38 extends C37 {} - -class C39 extends C38 {} - -class C40 extends C39 {} - -class C41 extends C40 {} - -class C42 extends C41 {} - -class C43 extends C42 {} - -class C44 extends C43 {} - -class C45 extends C44 {} - -class C46 extends C45 {} - -class C47 extends C46 {} - -class C48 extends C47 {} - -class C49 extends C48 {} - -class C50 extends C49 {} - -class C51 extends C50 {} - -class C52 extends C51 {} - -class C53 extends C52 {} - -class C54 extends C53 {} - -class C55 extends C54 {} - -class C56 extends C55 {} - -class C57 extends C56 {} - -class C58 extends C57 {} - -class C59 extends C58 {} - -class C60 extends C59 {} - -class C61 extends C60 {} - -class C62 extends C61 {} - -class C63 extends C62 {} - -class C64 extends C63 {} - -class C65 extends C64 {} - -class C66 extends C65 {} - -class C67 extends C66 {} - -class C68 extends C67 {} - -class C69 extends C68 {} - -class C70 extends C69 {} - -class C71 extends C70 {} - -class C72 extends C71 {} - -class C73 extends C72 {} - -class C74 extends C73 {} - -class C75 extends C74 {} - -class C76 extends C75 {} - -class C77 extends C76 {} - -class C78 extends C77 {} - -class C79 extends C78 {} - -class C80 extends C79 {} - -class C81 extends C80 {} - -class C82 extends C81 {} - -class C83 extends C82 {} - -class C84 extends C83 {} - -class C85 extends C84 {} - -class C86 extends C85 {} - -class C87 extends C86 {} - -class C88 extends C87 {} - -class C89 extends C88 {} - -class C90 extends C89 {} - -class C91 extends C90 {} - -class C92 extends C91 {} - -class C93 extends C92 {} - -class C94 extends C93 {} - -class C95 extends C94 {} - -class C96 extends C95 {} - -class C97 extends C96 {} - -class C98 extends C97 {} - -class C99 extends C98 {} - -class C100 extends C99 {} - -class C101 extends C100 {} - -class C102 extends C101 {} - -class C103 extends C102 {} - -class C104 extends C103 {} - -class C105 extends C104 {} - -class C106 extends C105 {} - -class C107 extends C106 {} - -class C108 extends C107 {} - -class C109 extends C108 {} - -class C110 extends C109 {} - -class C111 extends C110 {} - -class C112 extends C111 {} - -class C113 extends C112 {} - -class C114 extends C113 {} - -class C115 extends C114 {} - -class C116 extends C115 {} - -class C117 extends C116 {} - -class C118 extends C117 {} - -class C119 extends C118 {} - -class C120 extends C119 {} - -class C121 extends C120 {} - -class C122 extends C121 {} - -class C123 extends C122 {} - -class C124 extends C123 {} - -class C125 extends C124 {} - -class C126 extends C125 {} diff --git a/tests/language_2/unsorted/stack_overflow_stacktrace_test.dart b/tests/language_2/unsorted/stack_overflow_stacktrace_test.dart deleted file mode 100644 index f9db45e74a7..00000000000 --- a/tests/language_2/unsorted/stack_overflow_stacktrace_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2013, 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 program testing stack overflow. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class StackOverflowTest { - static void curseTheRecurse(a, b, c) { - curseTheRecurse(b, c, a); - } - - static void testMain() { - bool exceptionCaught = false; - try { - curseTheRecurse(1, 2, 3); - } on StackOverflowError catch (e, stacktrace) { - String s = stacktrace.toString(); - Expect.equals(-1, s.indexOf("-1:-1")); - exceptionCaught = true; - } - Expect.equals(true, exceptionCaught); - } -} - -main() { - StackOverflowTest.testMain(); -} diff --git a/tests/language_2/unsorted/stack_overflow_test.dart b/tests/language_2/unsorted/stack_overflow_test.dart deleted file mode 100644 index 43baa7a5bb1..00000000000 --- a/tests/language_2/unsorted/stack_overflow_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// 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 program testing stack overflow. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class StackOverflowTest { - static void curseTheRecurse(a, b, c) { - curseTheRecurse(b, c, a); - } - - static void testMain() { - bool exceptionCaught = false; - try { - curseTheRecurse(1, 2, 3); - } on StackOverflowError catch (e) { - exceptionCaught = true; - } - Expect.equals(true, exceptionCaught); - } -} - -main() { - StackOverflowTest.testMain(); -} diff --git a/tests/language_2/unsorted/state_mangling2_test.dart b/tests/language_2/unsorted/state_mangling2_test.dart deleted file mode 100644 index ab8a3f3657e..00000000000 --- a/tests/language_2/unsorted/state_mangling2_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -foo(state) { - if (state == null) return 0; - var sum = 0; - state = inscrutableId(state); - for (int i = 0; i < state.length; i++) { - sum += state[i]; - } - state = inscrutableId(state); - for (int i = 0; i < state.length; i++) { - sum += state[i]; - } - return sum; -} - -int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); - -inscrutableId(x) { - if (x == 0) return inscrutable(x); - return (3 == inscrutable(3)) ? x : false; -} - -class A { - int length = 3; - operator [](i) => 1; -} - -main() { - Expect.equals(12, foo([1, 2, 3])); - if (inscrutableId(0) == 0) { - Expect.equals(6, foo(new A())); - } -} diff --git a/tests/language_2/unsorted/state_mangling3_test.dart b/tests/language_2/unsorted/state_mangling3_test.dart deleted file mode 100644 index abd12881efa..00000000000 --- a/tests/language_2/unsorted/state_mangling3_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -foo(state0) { - if (state0 == null) return 0; - var sum = 0; - for (int i = 0; i < state0.length; i++) { - sum += state0[i]; - } - state0 = inscrutableId(state0); - for (int i = 0; i < state0.length; i++) { - sum += state0[i]; - } - return sum; -} - -int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); - -inscrutableId(x) { - if (x == 0) return inscrutable(x); - return (3 == inscrutable(3)) ? x : false; -} - -class A { - int length = 3; - operator [](i) => 1; -} - -main() { - Expect.equals(12, foo([1, 2, 3])); - if (inscrutableId(0) == 0) { - Expect.equals(6, foo(new A())); - } -} diff --git a/tests/language_2/unsorted/state_mangling4_test.dart b/tests/language_2/unsorted/state_mangling4_test.dart deleted file mode 100644 index 29dd8cdc67d..00000000000 --- a/tests/language_2/unsorted/state_mangling4_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -foo(env1) { - if (env1 == null) return 0; - var env0 = 0; - for (int i = 0; i < env1.length; i++) { - env0 += env1[i]; - } - env1 = inscrutableId(new A()); - for (int i = 0; i < env1.length; i++) { - env0 += env1[i]; - } - return env0; -} - -int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); - -inscrutableId(x) { - if (x == 0) return inscrutable(x); - return (3 == inscrutable(3)) ? x : false; -} - -class A { - int length = 3; - operator [](i) => 1; -} - -main() { - Expect.equals(9, foo([1, 2, 3])); - if (inscrutableId(0) == 0) { - Expect.equals(6, foo(new A())); - } -} diff --git a/tests/language_2/unsorted/state_mangling_test.dart b/tests/language_2/unsorted/state_mangling_test.dart deleted file mode 100644 index 8c0232c5bd0..00000000000 --- a/tests/language_2/unsorted/state_mangling_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -foo(state) { - if (state == null) return 0; - var sum = 0; - for (int i = 0; i < state.length; i++) { - sum += state[i]; - } - state = inscrutableId(state); - for (int i = 0; i < state.length; i++) { - sum += state[i]; - } - return sum; -} - -int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); - -inscrutableId(x) { - if (x == 0) return inscrutable(x); - return (3 == inscrutable(3)) ? x : false; -} - -class A { - int length = 3; - operator [](i) => 1; -} - -main() { - Expect.equals(12, foo([1, 2, 3])); - if (inscrutableId(0) == 0) { - Expect.equals(6, foo(new A())); - } -} diff --git a/tests/language_2/unsorted/temp_mangling_test.dart b/tests/language_2/unsorted/temp_mangling_test.dart deleted file mode 100644 index bade0ff5f13..00000000000 --- a/tests/language_2/unsorted/temp_mangling_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -main() { - testOne(); - testTwo(); -} - -testOne() { - // Dart2JS uses t[0-9]* to declare temporaries, so a local variable - // with that pattern can conflict with them. - var t0 = []; - // By using 'is' check, we make sure 't0.length' does not become - // generate at use site. - Expect.isTrue(t0.length is int); - Expect.isTrue(t0 is List); -} - -testTwo() { - var x = []; - var x_0 = []; - { - // This used to introduce x_0. - var x = new Set(); - Expect.equals(0, x.length); - Expect.isTrue(x.isEmpty); - } - Expect.isTrue(x is List); - Expect.isTrue(x_0 is List); -} diff --git a/tests/language_2/unsorted/third_test.dart b/tests/language_2/unsorted/third_test.dart deleted file mode 100644 index afb76cfb35e..00000000000 --- a/tests/language_2/unsorted/third_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// 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. -// Third dart test program. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A extends B { - var a; - static var s; - - static foo() { - return s; - } - - A(x, y) - : a = x, - super(y) {} - - value() { - return a + b + foo(); - } -} - -class B { - var b; - static var s; - - static foo(x) { - return x + s; - } - - value() { - return b + foo(s) + A.foo(); - } - - B(x) : b = x { - b = b + 1; - } -} - -class ThirdTest { - static testMain() { - var a = new A(1, 2); - var b = new B(3); - A.s = 4; - B.s = 5; - Expect.equals(26, a.value() + b.value()); - } -} - -main() { - ThirdTest.testMain(); -} diff --git a/tests/language_2/unsorted/tree_shake_typed_selector_test.dart b/tests/language_2/unsorted/tree_shake_typed_selector_test.dart deleted file mode 100644 index 3f165acfedb..00000000000 --- a/tests/language_2/unsorted/tree_shake_typed_selector_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012, 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. -// Check that dart2js emits code for classes that implement another -// class. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - factory A() => new B(); - foo() => 0; -} - -class B implements A { - foo() => 42; -} - -main() { - var a = new A(); - if (a is A) { - Expect.equals(42, a.foo()); - } else { - Expect.fail('Should not be here'); - } -} diff --git a/tests/language_2/unsorted/typecheck_multifield_declaration_test.dart b/tests/language_2/unsorted/typecheck_multifield_declaration_test.dart deleted file mode 100644 index 178e82f104c..00000000000 --- a/tests/language_2/unsorted/typecheck_multifield_declaration_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2016, 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 - -/// Checks that we can correctly typecheck multi-variable declarations on fields -/// and top-levels. This is also a regression test for Issue 27401. - -class A {} - -A a = new A(), b = new A(); - -class B { - A a = new A(), b = new A(); -} - -main() => [a, b, new B().a, new B().b]; diff --git a/tests/language_2/unsorted/typed_equality_test.dart b/tests/language_2/unsorted/typed_equality_test.dart deleted file mode 100644 index 5306e2dc79e..00000000000 --- a/tests/language_2/unsorted/typed_equality_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012, 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 - -// Regression test for http://dartbug.com/6036. dart2js used to fail -// this method because it was computing that intersecting type D with -// type C is conflicting. - -foo(a, b) { - if (identical(a, b)) return; - throw 'broken'; -} - -class D {} - -class C implements D {} - -main() { - var c = new C(); - foo(c, c as D); -} diff --git a/tests/language_2/unsorted/typed_selector2_test.dart b/tests/language_2/unsorted/typed_selector2_test.dart deleted file mode 100644 index 2a22bd4ba43..00000000000 --- a/tests/language_2/unsorted/typed_selector2_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2012, 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. -// Test for dart2js to handle a typed selector with a typedef as a -// receiver type. - -// @dart = 2.9 - -getComparator() => (a, b) => 42; - -class A { - foo() => 42; -} - -main() { - Comparator a = getComparator(); - if (a(1, 2) != 42) { - // This call used to crash dart2js because 'foo' was a typed - // selector with a typedef as a receiver type. - a.foo(); - //^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_METHOD - // [cfe] The method 'foo' isn't defined for the class 'int Function(dynamic, dynamic)'. - } - var b = new A(); - b.foo(); -} diff --git a/tests/language_2/unsorted/typed_selector_test.dart b/tests/language_2/unsorted/typed_selector_test.dart deleted file mode 100644 index 0ad6715b966..00000000000 --- a/tests/language_2/unsorted/typed_selector_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Regression test for http://dartbug.com/6259. This test used to fail -// on dart2js because class A does not know [A.document] is a target for -// the call [:obj.document:] in the [main] method. Therefore, dart2js -// would not compile [A.document]. - -class A { - get document => 42; -} - -abstract class B { - get document; // Abstract. -} - -class C extends A implements B {} - -int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); - -void main() { - var tab = [new Object(), new C()]; - var obj = tab[inscrutable(1)]; - int res = 0; - if (obj is B) res = obj.document; - Expect.equals(42, res); -} diff --git a/tests/language_2/unsorted/unevaluated_field_test.dart b/tests/language_2/unsorted/unevaluated_field_test.dart deleted file mode 100644 index da3b760cc59..00000000000 --- a/tests/language_2/unsorted/unevaluated_field_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Test that environment constants in field initializers work properly. - -import "package:expect/expect.dart"; - -const int gx = - const bool.hasEnvironment("x") ? const int.fromEnvironment("x") : null; - -class A { - final int x = gx; - final int y = - const bool.hasEnvironment("y") ? const int.fromEnvironment("y") : null; - const A(); -} - -main() { - const a = const A(); - Expect.isTrue(a.x == null || a.x != null); - Expect.isTrue(a.y == null || a.y != null); -} diff --git a/tests/language_2/unsorted/unused_overridden_async_test.dart b/tests/language_2/unsorted/unused_overridden_async_test.dart deleted file mode 100644 index ffb5b00f495..00000000000 --- a/tests/language_2/unsorted/unused_overridden_async_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2016, 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 -import 'dart:async'; - -class Base { - Future method() async { - throw 'Should be unused'; - } -} - -class Sub1 extends Base { - Future method() async { - return 1; - } -} - -class Sub2 extends Base { - Future method() async { - return 2; - } -} - -help(Base object) async { - print(await object.method()); -} - -main() async { - await help(new Sub1()); - await help(new Sub2()); -} diff --git a/tests/language_2/unsorted/value_range2_test.dart b/tests/language_2/unsorted/value_range2_test.dart deleted file mode 100644 index 7059e688d0a..00000000000 --- a/tests/language_2/unsorted/value_range2_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); - -foo() { - int x = 0; - if (inscrutable(0) == 0) x = -2; // x is now in range [-2 .. 0]. - int y = 2; - if (inscrutable(0) == 0) y = 4; // y is now in range [2 .. 4]. - int i = y - x; // i should be in range [2 .. 6]. - i -= 4; // i should be in range [-2 .. 2]. Actual value: 2. - var a = const [1]; - return a[i]; -} - -main() { - Expect.throwsRangeError(() => foo()); -} diff --git a/tests/language_2/unsorted/value_range3_test.dart b/tests/language_2/unsorted/value_range3_test.dart deleted file mode 100644 index 4a025c3163b..00000000000 --- a/tests/language_2/unsorted/value_range3_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; - -class A { - copy(array, index1, index2) { - if (index1 < index2 + index2) { - // dart2js used to remove the bounds check. - return array[index1]; - } - } -} - -main() { - Expect.throwsRangeError(() => new A().copy(new List.filled(0, null), 0, 1)); -} diff --git a/tests/language_2/unsorted/value_range_test.dart b/tests/language_2/unsorted/value_range_test.dart deleted file mode 100644 index 546899c506d..00000000000 --- a/tests/language_2/unsorted/value_range_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); - -foo() { - var x = 0x102; - if (inscrutable(x) == 0) x = 0x0; - if (inscrutable(10) == 10) x = 0x10; // x is in range [0 .. 0x102]. - x = x & 0xFF; // x should be in range [0 .. 0xFF]. Actual value: 0x10. - var a = const [1, 2, 3]; - return a[x]; -} - -main() { - Expect.throwsRangeError(() => foo()); -} diff --git a/tests/language_2/unsorted/var_init_test.dart b/tests/language_2/unsorted/var_init_test.dart deleted file mode 100644 index d5d00cc49be..00000000000 --- a/tests/language_2/unsorted/var_init_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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. -// Testing correct initialization of variables in scopes. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class VarInitTest { - static void testMain() { - for (int i = 0; i < 10; i++) { - var x; - Expect.equals(null, x); - x = 1; - } - } -} - -main() { - VarInitTest.testMain(); -} diff --git a/tests/language_2/variable/bad_initializer1_runtime_test.dart b/tests/language_2/variable/bad_initializer1_runtime_test.dart deleted file mode 100644 index 420dc76d394..00000000000 --- a/tests/language_2/variable/bad_initializer1_runtime_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2017, 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. - -// Variable initializer must not reference the initialized variable. - -main() { - const elems = const [ - const [ - 1, - 2.0, - true, - false, - 0xffffffffff, - - ], - "a", - "b" - ]; -} diff --git a/tests/language_2/variable/bad_initializer1_test.dart b/tests/language_2/variable/bad_initializer1_test.dart deleted file mode 100644 index eecfbc36286..00000000000 --- a/tests/language_2/variable/bad_initializer1_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2017, 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 - -// Variable initializer must not reference the initialized variable. - -main() { - const elems = const [ - // ^^^^^ - // [analyzer] COMPILE_TIME_ERROR.RECURSIVE_COMPILE_TIME_CONSTANT - const [ - 1, - 2.0, - true, - false, - 0xffffffffff, - elems -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION -// [cfe] Local variable 'elems' can't be referenced before it is declared. -// [cfe] Undefined name 'elems'. - ], - "a", - "b" - ]; -} diff --git a/tests/language_2/variable/bad_initializer2_runtime_test.dart b/tests/language_2/variable/bad_initializer2_runtime_test.dart deleted file mode 100644 index 50252bde5b7..00000000000 --- a/tests/language_2/variable/bad_initializer2_runtime_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -// Variable initializer must not reference the initialized variable. -import "package:expect/expect.dart"; - -main() { - var foo = (int n) { - if (n == 0) { - return 0; - } else { - return 1 - - ; - } - }; - foo(1); -} diff --git a/tests/language_2/variable/bad_initializer2_test.dart b/tests/language_2/variable/bad_initializer2_test.dart deleted file mode 100644 index dcc7cefd546..00000000000 --- a/tests/language_2/variable/bad_initializer2_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// 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 - -// Variable initializer must not reference the initialized variable. -import "package:expect/expect.dart"; - -main() { - var foo = (int n) { - if (n == 0) { - return 0; - } else { - return 1 - + foo(n - 1) - //^^^ - // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION - // [cfe] Local variable 'foo' can't be referenced before it is declared. - // [cfe] Method not found: 'foo'. - ; - } - }; - foo(1); -//^ -// [cfe] Method not found: 'foo'. -} diff --git a/tests/language_2/variable/conflicting_type_variable_and_setter_test.dart b/tests/language_2/variable/conflicting_type_variable_and_setter_test.dart deleted file mode 100644 index 16c48926dfb..00000000000 --- a/tests/language_2/variable/conflicting_type_variable_and_setter_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -class C< - D //# 01: compile-time error - E //# none: ok - > { - void set D(int value) { - field = value; - } - - int field; -} - -main() { - C c = new C(); - c.D = 1; - Expect.equals(c.field, 1); -} diff --git a/tests/language_2/variable/cyclic_type_variable_test.dart b/tests/language_2/variable/cyclic_type_variable_test.dart deleted file mode 100644 index 4e1d5836fa3..00000000000 --- a/tests/language_2/variable/cyclic_type_variable_test.dart +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2012, 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 - -// Tests cyclic reference to type variables in type expressions - -class Base {} - -class Derived extends Base {} // legal - -typedef void funcType< - T -extends T //# 01: compile-time error - >(T arg); - -class DerivedFunc extends Base> {} - -abstract class A< - S -extends S //# 02: compile-time error - > { - S field; -} - -abstract class B> { - // legal - U field; -} - -class C1< - V -extends V // //# 03: compile-time error - > { - V field; -} - -class C2< - V -extends V // //# 04: compile-time error - > implements A { - V field; -} - -class D1> { - // legal - W field; -} - -class D2> implements B { - // legal - W field; -} - -class E>> { - // legal - - X field; -} - -main() { - new C1(); - new C2(); - new D1(); - new D2(); - new E(); - funcType val = null; -} diff --git a/tests/language_2/variable/duplicate_field_with_initializer_runtime_test.dart b/tests/language_2/variable/duplicate_field_with_initializer_runtime_test.dart deleted file mode 100644 index 0af58536268..00000000000 --- a/tests/language_2/variable/duplicate_field_with_initializer_runtime_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2018, 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. - -class Repeated { - var a, b = 'Something'; - -} - -main() {} diff --git a/tests/language_2/variable/duplicate_field_with_initializer_test.dart b/tests/language_2/variable/duplicate_field_with_initializer_test.dart deleted file mode 100644 index 35a75d1cd6b..00000000000 --- a/tests/language_2/variable/duplicate_field_with_initializer_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2018, 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 - -class Repeated { - var a, b = 'Something'; - var b; - // ^ - // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'b' is already declared in this scope. -} - -main() {} diff --git a/tests/language_2/variable/fixed_type_variable2_test.dart b/tests/language_2/variable/fixed_type_variable2_test.dart deleted file mode 100644 index 611aa7c3851..00000000000 --- a/tests/language_2/variable/fixed_type_variable2_test.dart +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that type variables are passed on from subtypes that fixed the type -// variable in inheritance. - -import 'package:expect/expect.dart'; - -class A { - B createB() => new B(); -} - -class NumA extends A {} - -class B { - T value; - - void test(var o, bool expect) { - Expect.equals(expect, o is T); - } -} - -class StringB extends B {} - -class C extends A {} - -class IntC extends C {} - -void main() { - testA(); //# 01: ok - testNumA(); //# 02: ok - testB(); //# 03: ok - testStringB(); //# 04: ok - testC(); //# 05: ok - testIntC(); //# 06: ok -} - -void testA() { - var instanceA = new A(); - var instanceB = instanceA.createB(); - instanceB.test(0.5, false); - instanceB.test(0, false); - instanceB.test('', true); -} - -void testNumA() { - var instanceA = new NumA(); - var instanceB = instanceA.createB(); - instanceB.test(0.5, true); - instanceB.test(0, true); - instanceB.test('', false); -} - -void testB() { - var instanceB = new B(); - instanceB.test(0.5, false); - instanceB.test(0, true); - instanceB.test('', false); -} - -void testStringB() { - var instanceB = new StringB(); - instanceB.test(0.5, false); - instanceB.test(0, false); - instanceB.test('', true); -} - -void testC() { - var instanceA = new C(); - var instanceB = instanceA.createB(); - instanceB.test(0.5, false); - instanceB.test(0, false); - instanceB.test('', true); -} - -void testIntC() { - var instanceA = new IntC(); - var instanceB = instanceA.createB(); - instanceB.test(0.5, false); - instanceB.test(0, true); - instanceB.test('', false); -} diff --git a/tests/language_2/variable/fixed_type_variable_test.dart b/tests/language_2/variable/fixed_type_variable_test.dart deleted file mode 100644 index 63e42529a64..00000000000 --- a/tests/language_2/variable/fixed_type_variable_test.dart +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that type variables are passed on from subtypes that fixed the type -// variable in inheritance. - -import 'package:expect/expect.dart'; - -class A { - B createB() => new B(); -} - -class NumA extends A {} - -class B { - T value; - - void test(var type, bool expect) { - Expect.equals(expect, T == type); - } -} - -class StringB extends B {} - -class C extends A {} - -class IntC extends C {} - -void main() { - testA(); //# 01: ok - testNumA(); //# 02: ok - testB(); //# 03: ok - testStringB(); //# 04: ok - testC(); //# 05: ok - testIntC(); //# 06: ok -} - -void testA() { - var instanceA = new A(); - var instanceB = instanceA.createB(); - instanceB.test(num, false); - instanceB.test(int, false); - instanceB.test(String, true); -} - -void testNumA() { - var instanceA = new NumA(); - var instanceB = instanceA.createB(); - instanceB.test(num, true); - instanceB.test(int, false); - instanceB.test(String, false); -} - -void testB() { - var instanceB = new B(); - instanceB.test(num, false); - instanceB.test(int, true); - instanceB.test(String, false); -} - -void testStringB() { - var instanceB = new StringB(); - instanceB.test(num, false); - instanceB.test(int, false); - instanceB.test(String, true); -} - -void testC() { - var instanceA = new C(); - var instanceB = instanceA.createB(); - instanceB.test(num, false); - instanceB.test(int, false); - instanceB.test(String, true); -} - -void testIntC() { - var instanceA = new IntC(); - var instanceB = instanceA.createB(); - instanceB.test(num, false); - instanceB.test(int, true); - instanceB.test(String, false); -} diff --git a/tests/language_2/variable/illegal_initializer_runtime_test.dart b/tests/language_2/variable/illegal_initializer_runtime_test.dart deleted file mode 100644 index 20049d9f236..00000000000 --- a/tests/language_2/variable/illegal_initializer_runtime_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -class A { - A(); - A.foo(); -} - -class B extends A { - B.c1() - : super.foo - - () - - ; - - B.foo(); - B.c2() - : this.foo - - () - - ; - - B.c3() - : super - - () - - ; - - B(); - B.c4() - : this - - () - - ; -} - -main() { - new B.c1(); - new B.c2(); - new B.c3(); - new B.c4(); -} diff --git a/tests/language_2/variable/illegal_initializer_test.dart b/tests/language_2/variable/illegal_initializer_test.dart deleted file mode 100644 index e33e562b0d3..00000000000 --- a/tests/language_2/variable/illegal_initializer_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2013, 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 - -class A { - A(); - A.foo(); -} - -class B extends A { - B.c1() : super.foo; -// ^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN -// [cfe] Expected '(' after this. - - B.foo(); - B.c2() : this.foo; - // ^^^^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_REFERENCE_TO_THIS - // [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNMENT_IN_INITIALIZER - // ^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.INITIALIZER_FOR_NON_EXISTENT_FIELD - // [cfe] Can't access 'this' in a field initializer. - // [cfe] Expected an assignment after the field name. - // ^^^ - // [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER - - B.c3() : super; - // ^ - // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN - // [cfe] Expected '(' after this. - ; -//^ -// [analyzer] SYNTACTIC_ERROR.EXPECTED_CLASS_MEMBER -// [cfe] Expected a class member, but got ';'. - - B(); - B.c4() : this; - // ^^^^ - // [analyzer] COMPILE_TIME_ERROR.INITIALIZER_FOR_NON_EXISTENT_FIELD - // [analyzer] COMPILE_TIME_ERROR.INVALID_REFERENCE_TO_THIS - // [analyzer] SYNTACTIC_ERROR.MISSING_ASSIGNMENT_IN_INITIALIZER - // [cfe] Expected an assignment after the field name. - // ^ - // [analyzer] SYNTACTIC_ERROR.EXPECTED_TOKEN - // [cfe] Expected '.' before this. - // [cfe] Expected an identifier, but got ''. -} - -main() { - new B.c1(); - new B.c2(); - new B.c3(); - new B.c4(); -} diff --git a/tests/language_2/variable/inference_captured_variable2_test.dart b/tests/language_2/variable/inference_captured_variable2_test.dart deleted file mode 100644 index 2a3d845ac7e..00000000000 --- a/tests/language_2/variable/inference_captured_variable2_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 - -// Ensure that dart2js's receiver specialization optimization works -// with captured variables. - -import "package:expect/expect.dart"; - -var list = [new Object(), 31]; - -main() { - Expect.throwsNoSuchMethodError(() => foo()() + 42); -} - -foo() { - var a = list[0]; - var closure = (() => a - 42); - return () => a + 54; -} diff --git a/tests/language_2/variable/inference_captured_variable_test.dart b/tests/language_2/variable/inference_captured_variable_test.dart deleted file mode 100644 index cb7ce749082..00000000000 --- a/tests/language_2/variable/inference_captured_variable_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2013, 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 - -// Ensure that dart2js's receiver specialization optimization works -// with captured variables. - -import "package:expect/expect.dart"; - -var list = [new Object(), 31]; - -main() { - Expect.throwsNoSuchMethodError(() => foo()() + 42); -} - -foo() { - var a = list[0]; - var closure = (() => a + 42); - if (list[1] == 0) { - a.toInt(); - return closure; - } - return closure; -} diff --git a/tests/language_2/variable/initializer_super_last_runtime_test.dart b/tests/language_2/variable/initializer_super_last_runtime_test.dart deleted file mode 100644 index 2b8d84c896b..00000000000 --- a/tests/language_2/variable/initializer_super_last_runtime_test.dart +++ /dev/null @@ -1,172 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. -// VMOptions=--enable-asserts -// -// Dart test program testing assert statements. - -import "package:expect/expect.dart"; - -class S { - const S(); - const S.named(); -} - -class C extends S { - final int x; - C.cc01(int x) - : x = x, - super(); - C.cc02(int x) - : x = x, - super.named(); - C.cc03(this.x) : super(); - C.cc04(this.x) : super.named(); - C.cc05(int x) - : x = x, - assert(x == x), - super(); - C.cc06(int x) - : x = x, - assert(x == x), - super.named(); - C.cc07(this.x) - : assert(x == x), - super(); - C.cc08(this.x) - : assert(x == x), - super.named(); - C.cc09(int x) - : // - - x = x; - C.cc10(int x) - : // - - x = x; - C.cc11(this.x) - : // - - assert(x == x); - C.cc12(this.x) - : // - - assert(x == x); - C.cc13(int x) - : // - - x = x, - assert(x == x); - C.cc14(int x) - : // - - x = x, - assert(x == x); - C.cc15(int x) - : x = x, - - assert(x == x); - C.cc16(int x) - : x = x, - - assert(x == x); - - const C.cc17(int x) - : x = x, - super(); - const C.cc18(int x) - : x = x, - super.named(); - const C.cc19(this.x) : super(); - const C.cc20(this.x) : super.named(); - const C.cc21(int x) - : x = x, - assert(x == x), - super(); - const C.cc22(int x) - : x = x, - assert(x == x), - super.named(); - const C.cc23(this.x) - : assert(x == x), - super(); - const C.cc24(this.x) - : assert(x == x), - super.named(); - const C.cc25(int x) - : // - - x = x; - const C.cc26(int x) - : // - - x = x; - const C.cc27(this.x) - : // - - assert(x == x); - const C.cc28(this.x) - : // - - assert(x == x); - const C.cc29(int x) - : // - - x = x, - assert(x == x); - const C.cc30(int x) - : // - - x = x, - assert(x == x); - const C.cc31(int x) - : x = x, - - assert(x == x); - const C.cc32(int x) - : x = x, - - assert(x == x); -} - -main() { - // Ensure that erroneous constructors are actually needed. - new C.cc01(42); - new C.cc02(42); - new C.cc03(42); - new C.cc04(42); - new C.cc05(42); - new C.cc06(42); - new C.cc07(42); - new C.cc08(42); - new C.cc09(42); - new C.cc10(42); - new C.cc11(42); - new C.cc12(42); - new C.cc13(42); - new C.cc14(42); - new C.cc15(42); - new C.cc16(42); - - const C.cc17(42); - const C.cc18(42); - const C.cc19(42); - const C.cc20(42); - const C.cc21(42); - const C.cc22(42); - const C.cc23(42); - const C.cc24(42); - const C.cc25(42); - const C.cc26(42); - const C.cc27(42); - const C.cc28(42); - const C.cc29(42); - const C.cc30(42); - const C.cc31(42); - const C.cc32(42); -} diff --git a/tests/language_2/variable/initializer_super_last_test.dart b/tests/language_2/variable/initializer_super_last_test.dart deleted file mode 100644 index 6f205950f08..00000000000 --- a/tests/language_2/variable/initializer_super_last_test.dart +++ /dev/null @@ -1,241 +0,0 @@ -// 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. -// VMOptions=--enable-asserts -// -// Dart test program testing assert statements. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class S { - const S(); - const S.named(); -} - -class C extends S { - final int x; - C.cc01(int x) - : x = x, - super(); - C.cc02(int x) - : x = x, - super.named(); - C.cc03(this.x) : super(); - C.cc04(this.x) : super.named(); - C.cc05(int x) - : x = x, - assert(x == x), - super(); - C.cc06(int x) - : x = x, - assert(x == x), - super.named(); - C.cc07(this.x) - : assert(x == x), - super(); - C.cc08(this.x) - : assert(x == x), - super.named(); - C.cc09(int x) - : // - super(), -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUPER_INVOCATION_NOT_LAST - x = x; - //^ - // [cfe] Can't have initializers after 'super'. - C.cc10(int x) - : // - super.named(), -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUPER_INVOCATION_NOT_LAST - x = x; - //^ - // [cfe] Can't have initializers after 'super'. - C.cc11(this.x) - : // - super(), -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUPER_INVOCATION_NOT_LAST - assert(x == x); -// ^ -// [cfe] Can't have initializers after 'super'. - C.cc12(this.x) - : // - super.named(), -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUPER_INVOCATION_NOT_LAST - assert(x == x); -// ^ -// [cfe] Can't have initializers after 'super'. - C.cc13(int x) - : // - super(), -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUPER_INVOCATION_NOT_LAST - x = x, - //^ - // [cfe] Can't have initializers after 'super'. - assert(x == x); -// ^ -// [cfe] Can't have initializers after 'super'. - C.cc14(int x) - : // - super.named(), -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUPER_INVOCATION_NOT_LAST - x = x, - //^ - // [cfe] Can't have initializers after 'super'. - assert(x == x); -// ^ -// [cfe] Can't have initializers after 'super'. - C.cc15(int x) - : x = x, - super(), -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUPER_INVOCATION_NOT_LAST - assert(x == x); -// ^ -// [cfe] Can't have initializers after 'super'. - C.cc16(int x) - : x = x, - super.named(), -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUPER_INVOCATION_NOT_LAST - assert(x == x); -// ^ -// [cfe] Can't have initializers after 'super'. - - const C.cc17(int x) - : x = x, - super(); - const C.cc18(int x) - : x = x, - super.named(); - const C.cc19(this.x) : super(); - const C.cc20(this.x) : super.named(); - const C.cc21(int x) - : x = x, - assert(x == x), - super(); - const C.cc22(int x) - : x = x, - assert(x == x), - super.named(); - const C.cc23(this.x) - : assert(x == x), - super(); - const C.cc24(this.x) - : assert(x == x), - super.named(); - const C.cc25(int x) - : // - super(), -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUPER_INVOCATION_NOT_LAST - x = x; - //^ - // [cfe] Can't have initializers after 'super'. - const C.cc26(int x) - : // - super.named(), -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUPER_INVOCATION_NOT_LAST - x = x; - //^ - // [cfe] Can't have initializers after 'super'. - const C.cc27(this.x) - : // - super(), -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUPER_INVOCATION_NOT_LAST - assert(x == x); -// ^ -// [cfe] Can't have initializers after 'super'. - const C.cc28(this.x) - : // - super.named(), -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUPER_INVOCATION_NOT_LAST - assert(x == x); -// ^ -// [cfe] Can't have initializers after 'super'. - const C.cc29(int x) - : // - super(), -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUPER_INVOCATION_NOT_LAST - x = x, - //^ - // [cfe] Can't have initializers after 'super'. - assert(x == x); -// ^ -// [cfe] Can't have initializers after 'super'. - const C.cc30(int x) - : // - super.named(), -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUPER_INVOCATION_NOT_LAST - x = x, - //^ - // [cfe] Can't have initializers after 'super'. - assert(x == x); -// ^ -// [cfe] Can't have initializers after 'super'. - const C.cc31(int x) - : x = x, - super(), -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUPER_INVOCATION_NOT_LAST - assert(x == x); -// ^ -// [cfe] Can't have initializers after 'super'. - const C.cc32(int x) - : x = x, - super.named(), -// ^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUPER_INVOCATION_NOT_LAST - assert(x == x); -// ^ -// [cfe] Can't have initializers after 'super'. -} - -main() { - // Ensure that erroneous constructors are actually needed. - new C.cc01(42); - new C.cc02(42); - new C.cc03(42); - new C.cc04(42); - new C.cc05(42); - new C.cc06(42); - new C.cc07(42); - new C.cc08(42); - new C.cc09(42); - new C.cc10(42); - new C.cc11(42); - new C.cc12(42); - new C.cc13(42); - new C.cc14(42); - new C.cc15(42); - new C.cc16(42); - - const C.cc17(42); - const C.cc18(42); - const C.cc19(42); - const C.cc20(42); - const C.cc21(42); - const C.cc22(42); - const C.cc23(42); - const C.cc24(42); - const C.cc25(42); - const C.cc26(42); - const C.cc27(42); - const C.cc28(42); - const C.cc29(42); - const C.cc30(42); - const C.cc31(42); - const C.cc32(42); -} diff --git a/tests/language_2/variable/inst_field_initializer1_test.dart b/tests/language_2/variable/inst_field_initializer1_test.dart deleted file mode 100644 index 3d6c05c8a55..00000000000 --- a/tests/language_2/variable/inst_field_initializer1_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// Catch illegal access to 'this' in initialized instance fields. - -class A { - var x = 5; - var arr = [x]; // Illegal access to 'this'. - // ^ - // [analyzer] COMPILE_TIME_ERROR.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER - // [cfe] Can't access 'this' in a field initializer to read 'x'. -} - -void main() { - A(); -} diff --git a/tests/language_2/variable/inst_field_initializer_test.dart b/tests/language_2/variable/inst_field_initializer_test.dart deleted file mode 100644 index c97b9067d62..00000000000 --- a/tests/language_2/variable/inst_field_initializer_test.dart +++ /dev/null @@ -1,63 +0,0 @@ -// 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. -// Test for instance field initializer expressions. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class Cheese { - static const mild = 1; - static const stinky = 2; - - // Instance fields with initializer expression. - String name = ""; - var smell = mild; - - Cheese() { - Expect.equals("", this.name); - Expect.equals(Cheese.mild, this.smell); - } - - Cheese.initInBlock(String s) { - Expect.equals("", this.name); - Expect.equals(Cheese.mild, this.smell); - this.name = s; - } - - Cheese.initFieldParam(this.name, this.smell) {} - - // Test that static const field Cheese.mild is not shadowed - // by the parameter mild when compiling the field initializer - // for instance field smell. - Cheese.hideAndSeek(var mild) : name = mild { - Expect.equals(mild, this.name); - Expect.equals(Cheese.mild, this.smell); - } -} - -class HasNoExplicitConstructor { - String s = "Tilsiter"; -} - -main() { - var generic = new Cheese(); - Expect.equals("", generic.name); - Expect.equals(Cheese.mild, generic.smell); - - var gruyere = new Cheese.initInBlock("Gruyere"); - Expect.equals("Gruyere", gruyere.name); - Expect.equals(Cheese.mild, gruyere.smell); - - var munster = new Cheese.initFieldParam("Munster", Cheese.stinky); - Expect.equals("Munster", munster.name); - Expect.equals(Cheese.stinky, munster.smell); - - var brie = new Cheese.hideAndSeek("Brie"); - Expect.equals("Brie", brie.name); - Expect.equals(Cheese.mild, brie.smell); - - var t = new HasNoExplicitConstructor(); - Expect.equals("Tilsiter", t.s); -} diff --git a/tests/language_2/variable/labeled_variable_declaration_test.dart b/tests/language_2/variable/labeled_variable_declaration_test.dart deleted file mode 100644 index 3f59df9d0b0..00000000000 --- a/tests/language_2/variable/labeled_variable_declaration_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2018, 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() { - L: - var x, y; - x = 42; - y = x; -} diff --git a/tests/language_2/variable/ref_before_declaration_runtime_test.dart b/tests/language_2/variable/ref_before_declaration_runtime_test.dart deleted file mode 100644 index 8ef4def26a1..00000000000 --- a/tests/language_2/variable/ref_before_declaration_runtime_test.dart +++ /dev/null @@ -1,102 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.9 - -// Copyright (c) 2013, 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. - -// Test compile-time errors for illegal variable declarations if the name -// has been referenced before the variable is declared. - -import 'dart:math' as math; - -use(value) => value; - -var x = 0; -final y = 0; - -class C { - var f; - C() : f = 'How do you spell PTSD?'; - - void test1() { - use(f); // Refers to instance field f. - - } - - void test2() { - void localFunc() { - use(f); // Refers to instance field f. - } - - - if (true) { - var f = 1; // ok, shadows outer f and instance field f. - } - } - - void test3() { - if (true) { - use(x); // Refers to top-level x. - use(y); // Refers to top-level y. - } - - - } - - void test4() { - void Q() { - - } - - - - - - } - - test() { - test1(); - test2(); - test3(); - test4(); - } -} - -void testTypeRef() { - String s = 'Can vegetarians eat animal crackers?'; - -} - -void testLibPrefix() { - var pie = math.pi; - -} - -void noErrorsExpected() { - use(x); - for (var x = 0; x < 10; x++) use(x); - for (var i = 0; i < 10; i++) var x = 0; - if (true) var x = 0; - while (false) var x = 0; - try { - throw "ball"; - } catch (x) { - use(x); - } - switch (x) { - case 0: - var x = 'Does fuzzy logic tickle?'; - } - var int = 007; -} - -void main() { - var c = new C(); - c.test(); - testTypeRef(); - testLibPrefix(); - noErrorsExpected(); -} diff --git a/tests/language_2/variable/ref_before_declaration_test.dart b/tests/language_2/variable/ref_before_declaration_test.dart deleted file mode 100644 index bbec25cff8a..00000000000 --- a/tests/language_2/variable/ref_before_declaration_test.dart +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test compile-time errors for illegal variable declarations if the name -// has been referenced before the variable is declared. - -import 'dart:math' as math; - -use(value) => value; - -var x = 0; -final y = 0; - -class C { - var f; - C() : f = 'How do you spell PTSD?'; - - void test1() { - use(f); // Refers to instance field f. - // ^ - // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION - // [cfe] Local variable 'f' can't be referenced before it is declared. - var f = 'A shut mouth gathers no foot.'; - } - - void test2() { - void localFunc() { - use(f); // Refers to instance field f. - // ^ - // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION - // [cfe] Local variable 'f' can't be referenced before it is declared. - } - - var f = 'When chemists die, they barium.'; - if (true) { - var f = 1; // ok, shadows outer f and instance field f. - } - } - - void test3() { - if (true) { - use(x); // Refers to top-level x. - // ^ - // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION - // [cfe] Local variable 'x' can't be referenced before it is declared. - use(y); // Refers to top-level y. - // ^ - // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION - // [cfe] Local variable 'y' can't be referenced before it is declared. - } - final x = "I have not yet begun to procrastinate."; - const y = "Honk if you like peace and quiet!"; - } - - void test4() { - void Q() { - P(); // Refers to non-existing top-level function P -// ^ -// [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION -// [cfe] Local variable 'P' can't be referenced before it is declared. -// [cfe] The method 'P' isn't defined for the class 'C'. - } - void P() { - Q(); - } - - Function f = () {x = f;}; - // ^ - // [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT - // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION - // [cfe] Local variable 'f' can't be referenced before it is declared. - } - - test() { - test1(); - test2(); - test3(); - test4(); - } -} - -void testTypeRef() { - String s = 'Can vegetarians eat animal crackers?'; -//^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION -// [cfe] Local variable 'String' can't be referenced before it is declared. - var String = "I distinctly remember forgetting that."; -} - -void testLibPrefix() { - var pie = math.pi; - // ^^^^ - // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION - // [cfe] Local variable 'math' can't be referenced before it is declared. - final math = 0; -} - -void noErrorsExpected() { - use(x); - for (var x = 0; x < 10; x++) use(x); - for (var i = 0; i < 10; i++) var x = 0; - if (true) var x = 0; - while (false) var x = 0; - try { - throw "ball"; - } catch (x) { - use(x); - } - switch (x) { - case 0: - var x = 'Does fuzzy logic tickle?'; - } - var int = 007; -} - -void main() { - var c = new C(); - c.test(); - testTypeRef(); - testLibPrefix(); - noErrorsExpected(); -} diff --git a/tests/language_2/variable/scope_variable_runtime_test.dart b/tests/language_2/variable/scope_variable_runtime_test.dart deleted file mode 100644 index d30a2d31fdd..00000000000 --- a/tests/language_2/variable/scope_variable_runtime_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// TODO(multitest): This was automatically migrated from a multitest and may -// contain strange or dead code. - -// @dart = 2.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. - -import "package:expect/expect.dart"; - -void testSimpleScope() { - { - var a = "Test"; - int b = 1; - } - { - var c; - int d; - Expect.isNull(c); - Expect.isNull(d); - } -} - -void testShadowingScope() { - var a = "Test"; - { - var a; - Expect.isNull(a); - a = "a"; - Expect.equals(a, "a"); - } - Expect.equals(a, "Test"); -} - -int testShadowingAfterUse() { - var a = 1; - { - var b = 2; - var c = a; // Use of 'a' prior to its shadow declaration below. - var d = b + c; - // Shadow declaration of 'a'. - - return d + a; - } -} - -main() { - testSimpleScope(); - testShadowingScope(); - testShadowingAfterUse(); -} diff --git a/tests/language_2/variable/scope_variable_test.dart b/tests/language_2/variable/scope_variable_test.dart deleted file mode 100644 index f9750e6d125..00000000000 --- a/tests/language_2/variable/scope_variable_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// 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 - -import "package:expect/expect.dart"; - -void testSimpleScope() { - { - var a = "Test"; - int b = 1; - } - { - var c; - int d; - Expect.isNull(c); - Expect.isNull(d); - } -} - -void testShadowingScope() { - var a = "Test"; - { - var a; - Expect.isNull(a); - a = "a"; - Expect.equals(a, "a"); - } - Expect.equals(a, "Test"); -} - -int testShadowingAfterUse() { - var a = 1; - { - var b = 2; - var c = a; // Use of 'a' prior to its shadow declaration below. - // ^ - // [analyzer] COMPILE_TIME_ERROR.REFERENCED_BEFORE_DECLARATION - // [cfe] Local variable 'a' can't be referenced before it is declared. - var d = b + c; - // Shadow declaration of 'a'. - var a = 5; - return d + a; - } -} - -main() { - testSimpleScope(); - testShadowingScope(); - testShadowingAfterUse(); -} diff --git a/tests/language_2/variable/scoped_variables_try_catch_test.dart b/tests/language_2/variable/scoped_variables_try_catch_test.dart deleted file mode 100644 index 9726429171d..00000000000 --- a/tests/language_2/variable/scoped_variables_try_catch_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; - -// Test that try/catch does not shadow a variable at runtime. - -main() { - var a = bar(); - try { - a = bar(); - } catch (e) {} - Expect.equals(42, a); - - { - var a = foo(); - try { - a = foo(); - } catch (e) {} - Expect.equals(54, a); - } - - Expect.equals(42, a); -} - -bar() => 42; -foo() => 54; diff --git a/tests/language_2/variable/variable_declaration_metadata_test.dart b/tests/language_2/variable/variable_declaration_metadata_test.dart deleted file mode 100644 index f4c34fb7f41..00000000000 --- a/tests/language_2/variable/variable_declaration_metadata_test.dart +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2015, 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 - -// Verify that the individual variable declarations inside a variable -// declaration list are not allowed to be annotated with metadata. - -const annotation = null; - -var - @annotation //# 01: syntax error - v1, - @annotation //# 02: syntax error - v2; - -int - @annotation //# 03: syntax error - v3, - @annotation //# 04: syntax error - v4; - -class C { - var - @annotation //# 05: syntax error - f1, - @annotation //# 06: syntax error - f2; - - int - @annotation //# 07: syntax error - f3, - @annotation //# 08: syntax error - f4; -} - -use(x) => x; - -main() { - use(v1); - use(v2); - use(v3); - use(v4); - - C c = new C(); - use(c.f1); - use(c.f2); - use(c.f3); - use(c.f4); - - var - @annotation //# 09: syntax error - l1, - @annotation //# 10: syntax error - l2; - - int - @annotation //# 11: syntax error - l3, - @annotation //# 12: syntax error - l4; - - use(l1); - use(l2); - use(l3); - use(l4); - - for (var - @annotation //# 13: syntax error - i1 = 0, - @annotation //# 14: syntax error - i2 = 0;;) { - use(i1); - use(i2); - break; - } - - for (int - @annotation //# 15: syntax error - i3 = 0, - @annotation //# 16: syntax error - i4 = 0;;) { - use(i3); - use(i4); - break; - } -} diff --git a/tests/language_2/variable/variable_named_dart_test.dart b/tests/language_2/variable/variable_named_dart_test.dart deleted file mode 100644 index d88fb9c8448..00000000000 --- a/tests/language_2/variable/variable_named_dart_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'package:expect/expect.dart'; - -main() { - dynamic dart = 123; - Expect.equals(dart.toDouble(), 123.0); -} diff --git a/tests/language_2/vm/allocate_overflow_array_test.dart b/tests/language_2/vm/allocate_overflow_array_test.dart deleted file mode 100644 index f7499618417..00000000000 --- a/tests/language_2/vm/allocate_overflow_array_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -const interestingLengths = [ - 0x3FFFFFFF00000000, - 0x3FFFFFFFFFFFF000, - 0x3FFFFFFFFFFFFF00, - 0x3FFFFFFFFFFFFFF0, - 0x3FFFFFFFFFFFFFFE, - 0x3FFFFFFFFFFFFFFF, - 0x7FFFFFFF00000000, - 0x7FFFFFFFFFFFF000, - 0x7FFFFFFFFFFFFF00, - 0x7FFFFFFFFFFFFFF0, - 0x7FFFFFFFFFFFFFFE, - 0x7FFFFFFFFFFFFFFF, -]; - -main() { - for (int interestingLength in interestingLengths) { - for (int elementLength in [1, 2, 3, 4, 5, 6, 7, 8, 9]) { - print(interestingLength ~/ elementLength); - - Expect.throws(() { - var array = new List.filled(interestingLength ~/ elementLength, null); - print(array.first); - }, (e) => e is OutOfMemoryError); - } - } -} diff --git a/tests/language_2/vm/allocate_overflow_bytearray_test.dart b/tests/language_2/vm/allocate_overflow_bytearray_test.dart deleted file mode 100644 index d9aa360f806..00000000000 --- a/tests/language_2/vm/allocate_overflow_bytearray_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:typed_data'; - -import 'package:expect/expect.dart'; - -const interestingLengths = [ - 0x3FFFFFFF00000000, - 0x3FFFFFFFFFFFFFF0, - 0x3FFFFFFFFFFFFFFE, - 0x3FFFFFFFFFFFFFFF, - 0x7FFFFFFF00000000, - 0x7FFFFFFFFFFFFFF0, - 0x7FFFFFFFFFFFFFFE, - 0x7FFFFFFFFFFFFFFF, -]; - -main() { - for (int interestingLength in interestingLengths) { - bool exceptionCheck(e) { - // Allow RangeError as the range check may happen before the allocation. - return e is RangeError || e is OutOfMemoryError; - } - - print(interestingLength); - - Expect.throws(() { - var bytearray = new Uint8List(interestingLength); - print(bytearray.first); - }, exceptionCheck); - - Expect.throws(() { - var bytearray = new Uint8ClampedList(interestingLength); - print(bytearray.first); - }, exceptionCheck); - - Expect.throws(() { - var bytearray = new Int8List(interestingLength); - print(bytearray.first); - }, exceptionCheck); - - Expect.throws(() { - var bytearray = new ByteData(interestingLength); - print(bytearray.getUint8(0)); - }, exceptionCheck); - } -} diff --git a/tests/language_2/vm/allocate_overflow_string_test.dart b/tests/language_2/vm/allocate_overflow_string_test.dart deleted file mode 100644 index 464dea8139f..00000000000 --- a/tests/language_2/vm/allocate_overflow_string_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -const interestingLengths = [ - 0x3FFFFFFF00000000, - 0x3FFFFFFFFFFFFFF0, - 0x3FFFFFFFFFFFFFFE, - 0x3FFFFFFFFFFFFFFF, - 0x7FFFFFFF00000000, - 0x7FFFFFFFFFFFFFF0, - 0x7FFFFFFFFFFFFFFE, - 0x7FFFFFFFFFFFFFFF, -]; - -main() { - for (int interestingLength in interestingLengths) { - print(interestingLength); - - Expect.throws(() { - var oneByteString = "v"; - oneByteString *= interestingLength; - }, (e) => e is OutOfMemoryError); - - Expect.throws(() { - var oneByteString = "v"; - oneByteString = oneByteString.padLeft(interestingLength); - }, (e) => e is OutOfMemoryError); - - Expect.throws(() { - var oneByteString = "v"; - oneByteString = oneByteString.padRight(interestingLength); - }, (e) => e is OutOfMemoryError); - } -} diff --git a/tests/language_2/vm/allocation_sinking_arrays_test.dart b/tests/language_2/vm/allocation_sinking_arrays_test.dart deleted file mode 100644 index 98961310edc..00000000000 --- a/tests/language_2/vm/allocation_sinking_arrays_test.dart +++ /dev/null @@ -1,91 +0,0 @@ -// 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. - -// @dart = 2.9 - -// VMOptions=--optimization-counter-threshold=100 --deterministic - -// Tests allocation sinking of arrays and typed data objects. - -import 'dart:typed_data'; -import 'package:expect/expect.dart'; - -class Vector2 { - final Float64List _v2storage; - - @pragma('vm:prefer-inline') - Vector2.zero() : _v2storage = Float64List(2); - - @pragma('vm:prefer-inline') - factory Vector2(double x, double y) => Vector2.zero()..setValues(x, y); - - @pragma('vm:prefer-inline') - factory Vector2.copy(Vector2 other) => Vector2.zero()..setFrom(other); - - @pragma('vm:prefer-inline') - Vector2 clone() => Vector2.copy(this); - - @pragma('vm:prefer-inline') - void setValues(double x_, double y_) { - _v2storage[0] = x_; - _v2storage[1] = y_; - } - - @pragma('vm:prefer-inline') - void setFrom(Vector2 other) { - final otherStorage = other._v2storage; - _v2storage[1] = otherStorage[1]; - _v2storage[0] = otherStorage[0]; - } - - @pragma('vm:prefer-inline') - Vector2 operator +(Vector2 other) => clone()..add(other); - - @pragma('vm:prefer-inline') - void add(Vector2 arg) { - final argStorage = arg._v2storage; - _v2storage[0] = _v2storage[0] + argStorage[0]; - _v2storage[1] = _v2storage[1] + argStorage[1]; - } - - @pragma('vm:prefer-inline') - double get x => _v2storage[0]; - - @pragma('vm:prefer-inline') - double get y => _v2storage[1]; -} - -@pragma('vm:never-inline') -String foo(double x, num doDeopt) { - // All allocations in this function are eliminated by the compiler, - // except array allocation for string interpolation at the end. - List v1 = List.filled(2, null); - v1[0] = 1; - v1[1] = 'hi'; - Vector2 v2 = new Vector2(1.0, 2.0); - Vector2 v3 = v2 + Vector2(x, x); - double sum = v3.x + v3.y; - Float32List v4 = Float32List(2); - v4[0] = 11.0; - v4[1] = sum + 3; - print(v4[0]); - // Deoptimization is triggered here to materialize removed allocations. - doDeopt + 2; - return "v1: [${v1[0]},${v1[1]}], v2: [${v2.x},${v2.y}], v3: [${v3.x},${v3.y}], v4: [${v4[0]}, ${v4[1]}], sum: $sum"; -} - -main() { - // Due to '--optimization-counter-threshold=100 --deterministic' - // foo() is optimized during the first 100 iterations. - // After that, on iteration 120 deoptimization is triggered by changed - // type of 'doDeopt'. That forces materialization of all objects which - // allocations were removed by optimizer. - for (int i = 0; i < 130; ++i) { - final num doDeopt = (i < 120 ? 1 : 2.0); - final result = foo(3.0, doDeopt); - Expect.equals( - "v1: [1,hi], v2: [1.0,2.0], v3: [4.0,5.0], v4: [11.0, 12.0], sum: 9.0", - result); - } -} diff --git a/tests/language_2/vm/allocation_sinking_vm_test.dart b/tests/language_2/vm/allocation_sinking_vm_test.dart deleted file mode 100644 index 845c0a026f3..00000000000 --- a/tests/language_2/vm/allocation_sinking_vm_test.dart +++ /dev/null @@ -1,341 +0,0 @@ -// Copyright (c) 2013, 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. -// Test allocation sinking optimization. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import 'dart:typed_data'; -import 'package:expect/expect.dart'; - -class Point { - var x, y; - - Point(this.x, this.y); - - operator *(other) { - return x * other.x + y * other.y; - } -} - -class C { - var p; - C(this.p); -} - -class Pointx4 { - var x, y; - - Pointx4(this.x, this.y); - - operator *(other) { - return x * other.x + y * other.y; - } -} - -class Cx4 { - var p; - Cx4(this.p); -} - -class D { - var p; - D(this.p); -} - -// Class that is used to capture materialized Point object with * operator. -class F { - var p; - var val; - - F(this.p); - - operator *(other) { - Expect.isTrue(other is Point); - Expect.equals(42.0, other.x); - Expect.equals(0.5, other.y); - - if (val == null) { - val = other; - } else { - Expect.isTrue(identical(val, other)); - } - - return this.p * other; - } -} - -test1(c, x, y) { - var a = new Point(x - 0.5, y + 0.5); - var b = new Point(x + 0.5, y + 0.8); - var d = new Point(c.p * a, c.p * b); - return d * d; -} - -test1x4(c, x, y, z, w) { - var a = new Pointx4(x - z, y + w); - var b = new Pointx4(x + w, y + z); - var d = new Pointx4(c.p * a, c.p * b); - return d * d; -} - -effects() { - // This function should not be inlinable. - try {} catch (e) {} -} - -testForwardingThroughEffects(c, x, y) { - var a = new Point(x - 0.5, y + 0.5); - var b = new Point(x - 0.5, y - 0.8); - var d = new Point(c.p * a, c.p * b); - // Effects can't affect neither a, b, nor d because they do not escape. - effects(); - effects(); - return ((a == null) ? 0.0 : 0.1) + (d * d); -} - -testIdentity(x) { - var y = new Point(42.0, 0.5); - var z = y; - return x * y + x * z; -} - -class PointP { - var x, y; - - PointP(this.x, this.y); - - operator *(other) { - return x * other.x + y * other.y; - } -} - -foo2() => new PointP(1, 3) * new PointP(5, 6); - -class A { - var x, y; -} - -foo3(x) { - // Test materialization of type arguments. - var a = new A(); - a.x = x; - a.y = x; - if (x is int) return a.x + a.y; - Expect.isFalse(a is A); - Expect.isTrue(a is A); - Expect.isTrue(a is A); - return a.x - a.y; -} - -class WithFinal { - final _x; - WithFinal(this._x); -} - -testInitialValueForFinalField(x) { - new WithFinal(x); -} - -testFinalField() { - for (var i = 0; i < 100; i++) { - testInitialValueForFinalField(1); - } -} - -class V { - var x = 0; -} - -test_vm_field() { - var obj; - inner() => obj.x = 42; - var a = new V(); - obj = a; - var t1 = a.x; - var t2 = inner(); - return a.x + t1 + t2; -} - -testVMField() { - Expect.equals(84, test_vm_field()); - for (var i = 0; i < 100; i++) test_vm_field(); - Expect.equals(84, test_vm_field()); -} - -class CompoundA { - var b; - CompoundA(this.b); -} - -class CompoundB { - var c; - CompoundB(this.c); -} - -class CompoundC { - var d; - var root; - CompoundC(this.d); -} - -class NoopSink { - const NoopSink(); - call(val) {} -} - -testCompound1() { - f(d, [sink = const NoopSink()]) { - var c = new CompoundC(d); - var a = new CompoundA(new CompoundB(c)); - sink(a); - return c.d; - } - - Expect.equals(0.1, f(0.1)); - for (var i = 0; i < 100; i++) f(0.1); - Expect.equals(0.1, f(0.1)); - Expect.equals( - 0.1, - f(0.1, (val) { - Expect.isTrue(val is CompoundA); - Expect.isTrue(val.b is CompoundB); - Expect.isTrue(val.b.c is CompoundC); - Expect.isNull(val.b.c.root); - Expect.equals(0.1, val.b.c.d); - })); -} - -testCompound2() { - f(d, [sink = const NoopSink()]) { - var c = new CompoundC(d); - var a = new CompoundA(new CompoundB(c)); - c.root = a; - sink(a); - return c.d; - } - - Expect.equals(0.1, f(0.1)); - for (var i = 0; i < 100; i++) f(0.1); - Expect.equals(0.1, f(0.1)); - Expect.equals( - 0.1, - f(0.1, (val) { - Expect.isTrue(val is CompoundA); - Expect.isTrue(val.b is CompoundB); - Expect.isTrue(val.b.c is CompoundC); - Expect.equals(val, val.b.c.root); - Expect.equals(0.1, val.b.c.d); - })); -} - -testCompound3() { - f(d, [sink = const NoopSink()]) { - var c = new CompoundC(d); - c.root = c; - sink(c); - return c.d; - } - - Expect.equals(0.1, f(0.1)); - for (var i = 0; i < 100; i++) f(0.1); - Expect.equals(0.1, f(0.1)); - Expect.equals( - 0.1, - f(0.1, (val) { - Expect.isTrue(val is CompoundC); - Expect.equals(val, val.root); - Expect.equals(0.1, val.d); - })); -} - -testCompound4() { - f(d, [sink = const NoopSink()]) { - var c = new CompoundC(d); - c.root = c; - for (var i = 0; i < 10; i++) { - c.d += 1.0; - } - sink(c); - return c.d - 1.0 * 10; - } - - Expect.equals(1.0, f(1.0)); - for (var i = 0; i < 100; i++) f(1.0); - Expect.equals(1.0, f(1.0)); - Expect.equals( - 1.0, - f(1.0, (val) { - Expect.isTrue(val is CompoundC); - Expect.equals(val, val.root); - Expect.equals(11.0, val.d); - })); -} - -main() { - var c = new C(new Point(0.1, 0.2)); - - // Compute initial values. - final x0 = test1(c, 11.11, 22.22); - var fc = new Cx4(new Pointx4( - new Float32x4(1.0, 1.0, 1.0, 1.0), new Float32x4(1.0, 1.0, 1.0, 1.0))); - final fx0 = test1x4( - fc, - new Float32x4(1.0, 1.0, 1.0, 1.0), - new Float32x4(1.0, 1.0, 1.0, 1.0), - new Float32x4(1.0, 1.0, 1.0, 1.0), - new Float32x4(1.0, 1.0, 1.0, 1.0)); - final y0 = testForwardingThroughEffects(c, 11.11, 22.22); - final z0 = testIdentity(c.p); - - // Force optimization. - for (var i = 0; i < 100; i++) { - test1(c, i.toDouble(), i.toDouble()); - test1x4( - fc, - new Float32x4(1.0, 1.0, 1.0, 1.0), - new Float32x4(1.0, 1.0, 1.0, 1.0), - new Float32x4(1.0, 1.0, 1.0, 1.0), - new Float32x4(1.0, 1.0, 1.0, 1.0)); - testForwardingThroughEffects(c, i.toDouble(), i.toDouble()); - testIdentity(c.p); - foo2(); - Expect.equals(10, foo3(5)); - } - Expect.equals(0.0, foo3(0.5)); - - // Test returned value after optimization. - final x1 = test1(c, 11.11, 22.22); - final y1 = testForwardingThroughEffects(c, 11.11, 22.22); - - // Test returned value after deopt. - final x2 = test1(new D(c.p), 11.11, 22.22); - final y2 = testForwardingThroughEffects(new D(c.p), 11.11, 22.22); - - Expect.equals(6465, (x0 * 100).floor()); - Expect.equals(6465, (x1 * 100).floor()); - Expect.equals(6465, (x2 * 100).floor()); - Expect.equals(x0, x1); - Expect.equals(x0, x2); - - Expect.equals(6008, (y0 * 100).floor()); - Expect.equals(6008, (y1 * 100).floor()); - Expect.equals(6008, (y2 * 100).floor()); - Expect.equals(y0, y1); - Expect.equals(y0, y2); - - // Test that identity of materialized objects is preserved correctly and - // no copies are materialized. - final z1 = testIdentity(c.p); - final z2 = testIdentity(new F(c.p)); - Expect.equals(z0, z1); - Expect.equals(z0, z2); - - testFinalField(); - testVMField(); - testCompound1(); - testCompound2(); - testCompound3(); - testCompound4(); -} diff --git a/tests/language_2/vm/async_await_catch_stacktrace_test.dart b/tests/language_2/vm/async_await_catch_stacktrace_test.dart deleted file mode 100644 index 16584de2324..00000000000 --- a/tests/language_2/vm/async_await_catch_stacktrace_test.dart +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2017, 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 - -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -void main() { - x() async { - print("Starting!"); - try { - await runAsync(); - } catch (e, st) { - print("Got exception and stacktrace:"); - var stText = st.toString(); - print(e); - print(stText); - // Stacktrace should be something like - // #0 runAsync. (this file) - // #1 Future.Future.microtask. (dart:async/future.dart:184) - // #2 _microtaskLoop (dart:async/schedule_microtask.dart:41) - // #3 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50) - // #4 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96) - // #5 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:149) - - // if exception and stacktrace is rethrown correctly, NOT - - // #0 main..async_op (this file) - // #1 _asyncErrorWrapperHelper. (dart:async:134:33) - // #2 _RootZone.runBinary (dart:async/zone.dart:1410:54) - // #3 _FutureListener.handleError (dart:async/future_impl.dart:146:20) - // #4 _Future._propagateToListeners.handleError (dart:async/future_impl.dart:649:47) - // #5 _Future._propagateToListeners (dart:async/future_impl.dart:671:13) - // #6 _Future._completeError (dart:async/future_impl.dart:485:5) - // #7 _SyncCompleter._completeError (dart:async/future_impl.dart:56:12) - // #8 _Completer.completeError (dart:async/future_impl.dart:27:5) - // #9 runAsync.async_op (this file) - // #10 Future.Future.microtask. (dart:async/future.dart:184:26) - // #11 _microtaskLoop (dart:async/schedule_microtask.dart:41:5) - // #12 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5) - // #13 _runPendingImmediateCallback (dart:isolate:1054:5) - // #14 _RawReceivePortImpl._handleMessage (dart:isolate:1104:5) - - Expect.isFalse(stText.contains("propagateToListeners")); - Expect.isFalse(stText.contains("_completeError")); - } - print("Ending!"); - } - - asyncStart(); - x().then((_) => asyncEnd()); -} - -runAsync() async { - throw 'oh no!'; -} diff --git a/tests/language_2/vm/await_synchronous_future_test.dart b/tests/language_2/vm/await_synchronous_future_test.dart deleted file mode 100644 index 1a314ca9bd9..00000000000 --- a/tests/language_2/vm/await_synchronous_future_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test that async/await syntax works for synchronously completed futures. -// Such futures are used by Flutter (see http://dartbug.com/32098). - -import 'dart:async'; - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; - -class SynchronousFuture implements Future { - final T v; - - SynchronousFuture(this.v); - - Future then(FutureOr f(T v), {Function onError}) { - final u = f(v); - return u is Future - ? (u as Future).then((v) => v as E) - : new SynchronousFuture(u); - } - - Stream asStream() => throw 'unimplemented'; - Future catchError(Function onError, {bool test(dynamic error)}) => - throw 'unimplemented'; - Future timeout(Duration timeLimit, {dynamic onTimeout()}) => - throw 'unimplemented'; - Future whenComplete(dynamic action()) => throw 'unimplemented'; -} - -void main() { - var stage = 0; - asyncTest(() async { - int v; - Expect.equals(0, stage++); - v = await new SynchronousFuture(stage); - Expect.equals(1, v); - Expect.equals(1, stage++); - v = await new SynchronousFuture(stage); - Expect.equals(2, v); - Expect.equals(2, stage++); - v = await new SynchronousFuture(stage); - Expect.equals(3, v); - Expect.equals(3, stage++); - }); -} diff --git a/tests/language_2/vm/bitnot_int_test.dart b/tests/language_2/vm/bitnot_int_test.dart deleted file mode 100644 index 2d7a6073832..00000000000 --- a/tests/language_2/vm/bitnot_int_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// 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. - -// @dart = 2.9 - -// VMOptions=--no_background_compilation --optimization_counter_threshold=10 - -import "package:expect/expect.dart"; - -// Tests for long bit-not under 64-bit arithmetic wrap-around semantics. - -final int maxInt32 = 2147483647; -final int minInt32 = -2147483648; -final int maxInt64 = 0x7fffffffffffffff; -final int minInt64 = 0x8000000000000000; - -int bitnot(int x) { - return ~x; -} - -doConstant() { - Expect.equals(0, bitnot(-1)); - Expect.equals(-1, bitnot(0)); - Expect.equals(-2, bitnot(1)); - - Expect.equals(minInt32, bitnot(maxInt32)); - Expect.equals(maxInt32, bitnot(minInt32)); - Expect.equals(minInt64, bitnot(maxInt64)); - Expect.equals(maxInt64, bitnot(minInt64)); // sic! -} - -doVar() { - int d = 0; - for (int i = -88; i < 10; i++) { - d += bitnot(i); - } - Expect.equals(3773, d); -} - -main() { - // Repeat tests to enter JIT (when applicable). - for (int i = 0; i < 20; i++) { - doConstant(); - doVar(); - } -} diff --git a/tests/language_2/vm/bool_check_stack_traces_test.dart b/tests/language_2/vm/bool_check_stack_traces_test.dart deleted file mode 100644 index cd9c490d7d6..00000000000 --- a/tests/language_2/vm/bool_check_stack_traces_test.dart +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -class Test1 { - void bar(bool condition) { - if (condition) { - Expect.fail('Should not reach here'); - } - Expect.fail('Should throw earlier'); - } -} - -void test1(bool condition) { - Test1 obj = new Test1(); - obj.bar(condition); -} - -class Test2 { - bool condition; - Test2(this.condition); - - void bar() { - if (!condition) { - Expect.fail('Should not reach here'); - } - Expect.fail('Should throw earlier'); - } -} - -void test2(bool condition) { - Test2 obj = new Test2(condition); - obj.bar(); -} - -class Test3 { - bool condition; - Test3(this.condition); - - bool bazz() => condition; - - void bar() { - while (bazz() || bazz()) { - Expect.fail('Should not reach here'); - } - Expect.fail('Should throw earlier'); - } -} - -void test3(bool condition) { - Test3 obj = new Test3(condition); - obj.bar(); -} - -const bool test4Condition = null; - -void test4(bool condition) { - if (test4Condition) { - Expect.fail('Should not reach here'); - } - Expect.fail('Should throw earlier'); -} - -void test5(bool condition) { - if (null) { - Expect.fail('Should not reach here'); - } - Expect.fail('Should throw earlier'); -} - -void testStackTrace(void testCase(bool condition), List lineNumbers) { - try { - testCase(null); - Expect.fail("Using null in a bool condition should throw TypeError"); - } catch (e, stacktrace) { - print('--------- exception ---------'); - print(e); - print('-------- stack trace --------'); - print(stacktrace); - print('-----------------------------'); - - Expect.isTrue(e is AssertionError); - Expect.equals( - 'Failed assertion: boolean expression must not be null', e.toString()); - - final String st = stacktrace.toString(); - for (int lineNum in lineNumbers) { - String item = '.dart:$lineNum'; - Expect.isTrue(st.contains(item), "Stack trace doesn't contain $item"); - } - print('OK'); - } -} - -main() { - testStackTrace(test1, [11, 20]); - testStackTrace(test2, [28, 37]); - testStackTrace(test3, [47, 56]); - testStackTrace(test4, [62]); //# 01: ok - testStackTrace(test5, [69]); //# 02: ok -} diff --git a/tests/language_2/vm/canonicalization_preserves_deopt_test.dart b/tests/language_2/vm/canonicalization_preserves_deopt_test.dart deleted file mode 100644 index 593fdd2b60e..00000000000 --- a/tests/language_2/vm/canonicalization_preserves_deopt_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2014, 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. -// VMOptions=--optimization_counter_threshold=10 --no-use-osr --no-background_compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class X { - operator *(other) => "NaNNaNNaNNaNBatman"; -} - -foo(x) => (x * 1.0) is double; - -bar(x) { - try { - int i = (x * 1); - return true; - } catch (e) { - return false; - } -} - -baz(x) => (x * 1) == x; - -main() { - for (var i = 0; i < 100; i++) { - Expect.isTrue(foo(1.0)); - assert(() { - Expect.isTrue(bar(-1 << 63)); - return true; - }()); - Expect.isTrue(baz(-1 << 63)); - } - Expect.isFalse(foo(new X())); - assert(() { - Expect.isFalse(bar(new X())); - return true; - }()); - Expect.isFalse(baz(new X())); -} diff --git a/tests/language_2/vm/checked_smi_comparison_test.dart b/tests/language_2/vm/checked_smi_comparison_test.dart deleted file mode 100644 index 777ca3f1e41..00000000000 --- a/tests/language_2/vm/checked_smi_comparison_test.dart +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) 2021, 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 - -// VMOptions= -// VMOptions=--use_slow_path - -import "package:expect/expect.dart"; - -@pragma("vm:never-inline") -dynamic hiddenSmi() { - try { - throw 42; - } catch (e) { - return e; - } - return 0; -} - -@pragma("vm:never-inline") -dynamic hiddenMint() { - try { - throw 0x8000000000000000; - } catch (e) { - return e; - } - return 0; -} - -@pragma("vm:never-inline") -dynamic hiddenDouble() { - try { - throw 3.0; - } catch (e) { - return e; - } - return 0; -} - -@pragma("vm:never-inline") -dynamic hiddenCustom() { - try { - throw new Custom(); - } catch (e) { - return e; - } - return 0; -} - -class Custom { - operator <(other) => "lt"; - operator >(other) => "gt"; - operator <=(other) => "le"; - operator >=(other) => "ge"; - operator ==(other) => false; -} - -main() { - Expect.equals(false, hiddenSmi() < 2); - Expect.equals(true, hiddenSmi() > 2); - Expect.equals(false, hiddenSmi() <= 2); - Expect.equals(true, hiddenSmi() >= 2); - Expect.equals(false, hiddenSmi() == 2); - Expect.equals(true, hiddenSmi() != 2); - - Expect.equals(true, hiddenMint() < 2); - Expect.equals(false, hiddenMint() > 2); - Expect.equals(true, hiddenMint() <= 2); - Expect.equals(false, hiddenMint() >= 2); - Expect.equals(false, hiddenMint() == 2); - Expect.equals(true, hiddenMint() != 2); - - Expect.equals(false, hiddenDouble() < 2); - Expect.equals(true, hiddenDouble() > 2); - Expect.equals(false, hiddenDouble() <= 2); - Expect.equals(true, hiddenDouble() >= 2); - Expect.equals(false, hiddenDouble() == 2); - Expect.equals(true, hiddenDouble() != 2); - - Expect.equals("lt", hiddenCustom() < 2); - Expect.equals("gt", hiddenCustom() > 2); - Expect.equals("le", hiddenCustom() <= 2); - Expect.equals("ge", hiddenCustom() >= 2); - Expect.equals(false, hiddenCustom() == 2); - Expect.equals(true, hiddenCustom() != 2); -} diff --git a/tests/language_2/vm/checked_smi_op_test.dart b/tests/language_2/vm/checked_smi_op_test.dart deleted file mode 100644 index 5e1f8cd8383..00000000000 --- a/tests/language_2/vm/checked_smi_op_test.dart +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) 2021, 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 - -// VMOptions= -// VMOptions=--use_slow_path - -import "package:expect/expect.dart"; - -@pragma("vm:never-inline") -dynamic hiddenSmi() { - try { - throw 42; - } catch (e) { - return e; - } - return 0; -} - -@pragma("vm:never-inline") -dynamic hiddenMint() { - try { - throw 0x8000000000000000; - } catch (e) { - return e; - } - return 0; -} - -@pragma("vm:never-inline") -dynamic hiddenDouble() { - try { - throw 3.0; - } catch (e) { - return e; - } - return 0; -} - -@pragma("vm:never-inline") -dynamic hiddenCustom() { - try { - throw new Custom(); - } catch (e) { - return e; - } - return 0; -} - -class Custom { - operator +(other) => "add"; - operator -(other) => "sub"; - operator *(other) => "mul"; - operator ~/(other) => "div"; - operator %(other) => "mod"; - operator &(other) => "and"; - operator |(other) => "or"; - operator ^(other) => "xor"; - operator <<(other) => "sll"; - operator >>(other) => "sra"; -} - -main() { - Expect.equals(44, hiddenSmi() + 2); - Expect.equals(40, hiddenSmi() - 2); - Expect.equals(84, hiddenSmi() * 2); - Expect.equals(21, hiddenSmi() ~/ 2); - Expect.equals(0, hiddenSmi() % 2); - Expect.equals(2, hiddenSmi() & 2); - Expect.equals(42, hiddenSmi() | 2); - Expect.equals(40, hiddenSmi() ^ 2); - Expect.equals(168, hiddenSmi() << 2); - Expect.equals(10, hiddenSmi() >> 2); - - Expect.equals(-9223372036854775806, hiddenMint() + 2); - Expect.equals(9223372036854775806, hiddenMint() - 2); - Expect.equals(0, hiddenMint() * 2); - Expect.equals(-4611686018427387904, hiddenMint() ~/ 2); - Expect.equals(0, hiddenMint() % 2); - Expect.equals(0, hiddenMint() & 2); - Expect.equals(-9223372036854775806, hiddenMint() | 2); - Expect.equals(-9223372036854775806, hiddenMint() ^ 2); - Expect.equals(0, hiddenMint() << 2); - Expect.equals(-2305843009213693952, hiddenMint() >> 2); - - Expect.equals(5.0, hiddenDouble() + 2); - Expect.equals(1.0, hiddenDouble() - 2); - Expect.equals(6.0, hiddenDouble() * 2); - Expect.equals(1, hiddenDouble() ~/ 2); - Expect.equals(1.0, hiddenDouble() % 2); - Expect.throws(() => hiddenDouble() & 2, (e) => e is NoSuchMethodError); - Expect.throws(() => hiddenDouble() | 2, (e) => e is NoSuchMethodError); - Expect.throws(() => hiddenDouble() ^ 2, (e) => e is NoSuchMethodError); - Expect.throws(() => hiddenDouble() << 2, (e) => e is NoSuchMethodError); - Expect.throws(() => hiddenDouble() >> 2, (e) => e is NoSuchMethodError); - - Expect.equals("add", hiddenCustom() + 2); - Expect.equals("sub", hiddenCustom() - 2); - Expect.equals("mul", hiddenCustom() * 2); - Expect.equals("div", hiddenCustom() ~/ 2); - Expect.equals("mod", hiddenCustom() % 2); - Expect.equals("and", hiddenCustom() & 2); - Expect.equals("or", hiddenCustom() | 2); - Expect.equals("xor", hiddenCustom() ^ 2); - Expect.equals("sll", hiddenCustom() << 2); - Expect.equals("sra", hiddenCustom() >> 2); -} diff --git a/tests/language_2/vm/clamp_37868_test.dart b/tests/language_2/vm/clamp_37868_test.dart deleted file mode 100755 index dce6bcd253b..00000000000 --- a/tests/language_2/vm/clamp_37868_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// 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. - -// @dart = 2.9 - -// VMOptions=--deterministic - -import "package:expect/expect.dart"; - -import 'dart:typed_data'; - -// Found by "value-guided" DartFuzzing: incorrect clamping. -// https://github.com/dart-lang/sdk/issues/37868 -@pragma("vm:never-inline") -foo(List x) => Uint8ClampedList.fromList(x); - -@pragma("vm:never-inline") -bar(List x) => Uint8List.fromList(x); - -@pragma("vm:never-inline") -baz(List x) => Int8List.fromList(x); - -main() { - // Proper values. - final List x = [ - 9223372036854775807, - -9223372036854775808, - 9223372032559808513, - -9223372032559808513, - 5000000000, - -5000000000, - 2147483647, - -2147483648, - 255, - -255, - 11, - -11, - 0, - -1, - ]; - Expect.listEquals( - [255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 11, 0, 0, 0], foo(x)); - Expect.listEquals( - [255, 0, 1, 255, 0, 0, 255, 0, 255, 1, 11, 245, 0, 255], bar(x)); - Expect.listEquals([-1, 0, 1, -1, 0, 0, -1, 0, -1, 1, 11, -11, 0, -1], baz(x)); - - // Hidden null. - final List a = [1, null, 2]; - int num_exceptions = 0; - try { - foo(a); - } on NoSuchMethodError catch (e) { - num_exceptions++; - } - try { - bar(a); - } on NoSuchMethodError catch (e) { - num_exceptions++; - } - try { - baz(a); - } on NoSuchMethodError catch (e) { - num_exceptions++; - } - Expect.equals(3, num_exceptions); -} diff --git a/tests/language_2/vm/closure_memory_retention_test.dart b/tests/language_2/vm/closure_memory_retention_test.dart deleted file mode 100644 index 5e473fde952..00000000000 --- a/tests/language_2/vm/closure_memory_retention_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2014, 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. -// VMOptions=--old_gen_heap_size=50 - -// @dart = 2.9 - -// Test that non-capturing closures don't retain unnecessary memory. -// It tests that the context of `f` allocated within `bar` not leaking and does -// not become the context of empty non-capturing closure allocated inside `foo`. -// If failing it crashes with an OOM error. - -import "package:expect/expect.dart"; - -foo() { - return () {}; -} - -bar(a, b) { - f() => [a, b]; - return foo(); -} - -main() { - var closure = null; - for (var i = 0; i < 100; i++) { - closure = bar(closure, new List.filled(1024 * 1024, null)); - } - Expect.isTrue(closure is Function); -} diff --git a/tests/language_2/vm/create_array_instr_deopt2_test.dart b/tests/language_2/vm/create_array_instr_deopt2_test.dart deleted file mode 100644 index 83ae58120b9..00000000000 --- a/tests/language_2/vm/create_array_instr_deopt2_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2017, 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. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -foo(n) { - return new List.filled(n, null); -} - -@pragma('vm:never-inline') -bar(n) { - try { - return foo(n); - } catch (e) {} -} - -main() { - for (var i = 0; i < 20; i++) { - bar(5); - } - bar(""); -} diff --git a/tests/language_2/vm/create_array_instr_deopt_test.dart b/tests/language_2/vm/create_array_instr_deopt_test.dart deleted file mode 100644 index c82c8019b82..00000000000 --- a/tests/language_2/vm/create_array_instr_deopt_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2017, 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. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -@pragma('vm:never-inline') -foo(n) { - try { - return new List.filled(n, null); - } catch (e) {} -} - -main() { - for (var i = 0; i < 20; i++) { - foo(5); - } - foo(""); -} diff --git a/tests/language_2/vm/deep_loop_test.dart b/tests/language_2/vm/deep_loop_test.dart deleted file mode 100644 index 8c6b6bec13c..00000000000 --- a/tests/language_2/vm/deep_loop_test.dart +++ /dev/null @@ -1,365 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -// Stress tests on loop nesting depth. Make sure loop and induction -// analysis do not break down (excessive compile-time or otherwise) -// when analyzing a deeply nested loop with dependent bounds. - -@pragma("vm:never-inline") -foo(List a) { - for (int i0 = 100; i0 <= a.length - 101; i0++) - for (int i1 = i0 - 1; i1 <= i0 + 1; i1++) - for (int i2 = i1 - 1; i2 <= i1 + 1; i2++) - for (int i3 = i2 - 1; i3 <= i2 + 1; i3++) - for (int i4 = i3 - 1; i4 <= i3 + 1; i4++) - for (int i5 = i4 - 1; i5 <= i4 + 1; i5++) - for (int i6 = i5 - 1; i6 <= i5 + 1; i6++) - for (int i7 = i6 - 1; i7 <= i6 + 1; i7++) - for (int i8 = i7 - 1; i8 <= i7 + 1; i8++) - for (int i9 = i8 - 1; i9 <= i8 + 1; i9++) - for (int i10 = i9 - 1; i10 <= i9 + 1; i10++) - for (int i11 = i10 - 1; i11 <= i10 + 1; i11++) - for (int i12 = i11 - 1; i12 <= i11 + 1; i12++) - for (int i13 = i12 - 1; i13 <= i12 + 1; i13++) - for (int i14 = i13 - 1; i14 <= i13 + 1; i14++) - for (int i15 = i14 - 1; i15 <= i14 + 1; i15++) - for (int i16 = i15 - 1; i16 <= i15 + 1; i16++) - for (int i17 = i16 - 1; - i17 <= i16 + 1; - i17++) - for (int i18 = i17 - 1; - i18 <= i17 + 1; - i18++) - for (int i19 = i18 - 1; - i19 <= i18 + 1; - i19++) - for (int i20 = i19 - 1; - i20 <= i19 + 1; - i20++) - for (int i21 = i20 - 1; - i21 <= i20 + 1; - i21++) - for (int i22 = i21 - 1; - i22 <= i21 + 1; - i22++) - for (int i23 = i22 - 1; - i23 <= i22 + 1; - i23++) - for (int i24 = i23 - 1; - i24 <= i23 + 1; - i24++) - for (int i25 = i24 - 1; - i25 <= i24 + 1; - i25++) - for (int i26 = i25 - 1; - i26 <= i25 + 1; - i26++) - for (int i27 = i26 - 1; - i27 <= i26 + 1; - i27++) - for (int i28 = - i27 - 1; - i28 <= i27 + 1; - i28++) - for (int i29 = - i28 - 1; - i29 <= i28 + 1; - i29++) - for (int i30 = - i29 - 1; - i30 <= - i29 + 1; - i30++) - for (int i31 = - i30 - 1; - i31 <= - i30 + 1; - i31++) - for (int i32 = - i31 - - 1; - i32 <= - i31 + - 1; - i32++) - for (int i33 = - i32 - - 1; - i33 <= - i32 + - 1; - i33++) - for (int i34 = i33 - - 1; - i34 <= - i33 + 1; - i34++) - for (int i35 = i34 - - 1; - i35 <= - i34 + 1; - i35++) - for (int i36 = i35 - 1; - i36 <= i35 + 1; - i36++) - for (int i37 = i36 - 1; - i37 <= i36 + 1; - i37++) - for (int i38 = i37 - 1; i38 <= i37 + 1; i38++) - for (int i39 = i38 - 1; i39 <= i38 + 1; i39++) - for (int i40 = i39 - 1; i40 <= i39 + 1; i40++) - for (int i41 = i40 - 1; i41 <= i40 + 1; i41++) - for (int i42 = i41 - 1; i42 <= i41 + 1; i42++) - for (int i43 = i42 - 1; i43 <= i42 + 1; i43++) - for (int i44 = i43 - 1; i44 <= i43 + 1; i44++) - for (int i45 = i44 - 1; i45 <= i44 + 1; i45++) - for (int i46 = i45 - 1; i46 <= i45 + 1; i46++) - for (int i47 = i46 - 1; i47 <= i46 + 1; i47++) - for (int i48 = i47 - 1; i48 <= i47 + 1; i48++) - for (int i49 = i48 - 1; i49 <= i48 + 1; i49++) - for (int i50 = i49 - 1; i50 <= i49 + 1; i50++) - for (int i51 = i50 - 1; i51 <= i50 + 1; i51++) - for (int i52 = i51 - 1; i52 <= i51 + 1; i52++) - for (int i53 = i52 - 1; i53 <= i52 + 1; i53++) - for (int i54 = i53 - 1; i54 <= i53 + 1; i54++) - for (int i55 = i54 - 1; i55 <= i54 + 1; i55++) - for (int i56 = i55 - 1; i56 <= i55 + 1; i56++) - for (int i57 = i56 - 1; i57 <= i56 + 1; i57++) - for (int i58 = i57 - 1; i58 <= i57 + 1; i58++) - for (int i59 = i58 - 1; i59 <= i58 + 1; i59++) - for (int i60 = i59 - 1; i60 <= i59 + 1; i60++) - for (int i61 = i60 - 1; i61 <= i60 + 1; i61++) - for (int i62 = i61 - 1; i62 <= i61 + 1; i62++) - for (int i63 = i62 - 1; i63 <= i62 + 1; i63++) - for (int i64 = i63 - 1; i64 <= i63 + 1; i64++) - for (int i65 = i64 - 1; i65 <= i64 + 1; i65++) - for (int i66 = i65 - 1; i66 <= i65 + 1; i66++) - for (int i67 = i66 - 1; i67 <= i66 + 1; i67++) - for (int i68 = i67 - 1; i68 <= i67 + 1; i68++) - for (int i69 = i68 - 1; i69 <= i68 + 1; i69++) - for (int i70 = i69 - 1; i70 <= i69 + 1; i70++) - for (int i71 = i70 - 1; i71 <= i70 + 1; i71++) - for (int i72 = i71 - 1; i72 <= i71 + 1; i72++) - for (int i73 = i72 - 1; i73 <= i72 + 1; i73++) - for (int i74 = i73 - 1; i74 <= i73 + 1; i74++) - for (int i75 = i74 - 1; i75 <= i74 + 1; i75++) - for (int i76 = i75 - 1; i76 <= i75 + 1; i76++) - for (int i77 = i76 - 1; i77 <= i76 + 1; i77++) - for (int i78 = i77 - 1; i78 <= i77 + 1; i78++) - for (int i79 = i78 - 1; i79 <= i78 + 1; i79++) - for (int i80 = i79 - 1; i80 <= i79 + 1; i80++) - for (int i81 = i80 - 1; i81 <= i80 + 1; i81++) - for (int i82 = i81 - 1; i82 <= i81 + 1; i82++) - for (int i83 = i82 - 1; i83 <= i82 + 1; i83++) - for (int i84 = i83 - 1; i84 <= i83 + 1; i84++) - for (int i85 = i84 - 1; i85 <= i84 + 1; i85++) - for (int i86 = i85 - 1; i86 <= i85 + 1; i86++) - for (int i87 = i86 - 1; i87 <= i86 + 1; i87++) - for (int i88 = i87 - 1; i88 <= i87 + 1; i88++) - for (int i89 = i88 - 1; i89 <= i88 + 1; i89++) - for (int i90 = i89 - 1; i90 <= i89 + 1; i90++) - for (int i91 = i90 - 1; i91 <= i90 + 1; i91++) - for (int i92 = i91 - 1; i92 <= i91 + 1; i92++) - for (int i93 = i92 - 1; i93 <= i92 + 1; i93++) - for (int i94 = i93 - 1; i94 <= i93 + 1; i94++) - for (int i95 = i94 - 1; i95 <= i94 + 1; i95++) - for (int i96 = i95 - 1; i96 <= i95 + 1; i96++) - for (int i97 = i96 - 1; i97 <= i96 + 1; i97++) - for (int i98 = i97 - 1; i98 <= i97 + 1; i98++) - for (int i99 = i98 - 1; i99 <= i98 + 1; i99++) - for (int i100 = i99 - 1; i100 <= i99 + 1; i100++) { - // Range [0,a.length). - a[i100] += 1; - } -} - -@pragma("vm:never-inline") -bar(List a) { - for (int i0 = a.length - 101; i0 >= 100; i0--) - for (int i1 = i0 + 1; i1 >= i0 - 1; i1--) - for (int i2 = i1 + 1; i2 >= i1 - 1; i2--) - for (int i3 = i2 + 1; i3 >= i2 - 1; i3--) - for (int i4 = i3 + 1; i4 >= i3 - 1; i4--) - for (int i5 = i4 + 1; i5 >= i4 - 1; i5--) - for (int i6 = i5 + 1; i6 >= i5 - 1; i6--) - for (int i7 = i6 + 1; i7 >= i6 - 1; i7--) - for (int i8 = i7 + 1; i8 >= i7 - 1; i8--) - for (int i9 = i8 + 1; i9 >= i8 - 1; i9--) - for (int i10 = i9 + 1; i10 >= i9 - 1; i10--) - for (int i11 = i10 + 1; i11 >= i10 - 1; i11--) - for (int i12 = i11 + 1; i12 >= i11 - 1; i12--) - for (int i13 = i12 + 1; i13 >= i12 - 1; i13--) - for (int i14 = i13 + 1; i14 >= i13 - 1; i14--) - for (int i15 = i14 + 1; i15 >= i14 - 1; i15--) - for (int i16 = i15 + 1; i16 >= i15 - 1; i16--) - for (int i17 = i16 + 1; - i17 >= i16 - 1; - i17--) - for (int i18 = i17 + 1; - i18 >= i17 - 1; - i18--) - for (int i19 = i18 + 1; - i19 >= i18 - 1; - i19--) - for (int i20 = i19 + 1; - i20 >= i19 - 1; - i20--) - for (int i21 = i20 + 1; - i21 >= i20 - 1; - i21--) - for (int i22 = i21 + 1; - i22 >= i21 - 1; - i22--) - for (int i23 = i22 + 1; - i23 >= i22 - 1; - i23--) - for (int i24 = i23 + 1; - i24 >= i23 - 1; - i24--) - for (int i25 = i24 + 1; - i25 >= i24 - 1; - i25--) - for (int i26 = i25 + 1; - i26 >= i25 - 1; - i26--) - for (int i27 = i26 + 1; - i27 >= i26 - 1; - i27--) - for (int i28 = - i27 + 1; - i28 >= i27 - 1; - i28--) - for (int i29 = - i28 + 1; - i29 >= i28 - 1; - i29--) - for (int i30 = - i29 + 1; - i30 >= - i29 - 1; - i30--) - for (int i31 = - i30 + 1; - i31 >= - i30 - 1; - i31--) - for (int i32 = - i31 + - 1; - i32 >= - i31 - - 1; - i32--) - for (int i33 = - i32 + - 1; - i33 >= - i32 - - 1; - i33--) - for (int i34 = i33 + - 1; - i34 >= - i33 - 1; - i34--) - for (int i35 = i34 + - 1; - i35 >= - i34 - 1; - i35--) - for (int i36 = i35 + 1; - i36 >= i35 - 1; - i36--) - for (int i37 = i36 + 1; - i37 >= i36 - 1; - i37--) - for (int i38 = i37 + 1; i38 >= i37 - 1; i38--) - for (int i39 = i38 + 1; i39 >= i38 - 1; i39--) - for (int i40 = i39 + 1; i40 >= i39 - 1; i40--) - for (int i41 = i40 + 1; i41 >= i40 - 1; i41--) - for (int i42 = i41 + 1; i42 >= i41 - 1; i42--) - for (int i43 = i42 + 1; i43 >= i42 - 1; i43--) - for (int i44 = i43 + 1; i44 >= i43 - 1; i44--) - for (int i45 = i44 + 1; i45 >= i44 - 1; i45--) - for (int i46 = i45 + 1; i46 >= i45 - 1; i46--) - for (int i47 = i46 + 1; i47 >= i46 - 1; i47--) - for (int i48 = i47 + 1; i48 >= i47 - 1; i48--) - for (int i49 = i48 + 1; i49 >= i48 - 1; i49--) - for (int i50 = i49 + 1; i50 >= i49 - 1; i50--) - for (int i51 = i50 + 1; i51 >= i50 - 1; i51--) - for (int i52 = i51 + 1; i52 >= i51 - 1; i52--) - for (int i53 = i52 + 1; i53 >= i52 - 1; i53--) - for (int i54 = i53 + 1; i54 >= i53 - 1; i54--) - for (int i55 = i54 + 1; i55 >= i54 - 1; i55--) - for (int i56 = i55 + 1; i56 >= i55 - 1; i56--) - for (int i57 = i56 + 1; i57 >= i56 - 1; i57--) - for (int i58 = i57 + 1; i58 >= i57 - 1; i58--) - for (int i59 = i58 + 1; i59 >= i58 - 1; i59--) - for (int i60 = i59 + 1; i60 >= i59 - 1; i60--) - for (int i61 = i60 + 1; i61 >= i60 - 1; i61--) - for (int i62 = i61 + 1; i62 >= i61 - 1; i62--) - for (int i63 = i62 + 1; i63 >= i62 - 1; i63--) - for (int i64 = i63 + 1; i64 >= i63 - 1; i64--) - for (int i65 = i64 + 1; i65 >= i64 - 1; i65--) - for (int i66 = i65 + 1; i66 >= i65 - 1; i66--) - for (int i67 = i66 + 1; i67 >= i66 - 1; i67--) - for (int i68 = i67 + 1; i68 >= i67 - 1; i68--) - for (int i69 = i68 + 1; i69 >= i68 - 1; i69--) - for (int i70 = i69 + 1; i70 >= i69 - 1; i70--) - for (int i71 = i70 + 1; i71 >= i70 - 1; i71--) - for (int i72 = i71 + 1; i72 >= i71 - 1; i72--) - for (int i73 = i72 + 1; i73 >= i72 - 1; i73--) - for (int i74 = i73 + 1; i74 >= i73 - 1; i74--) - for (int i75 = i74 + 1; i75 >= i74 - 1; i75--) - for (int i76 = i75 + 1; i76 >= i75 - 1; i76--) - for (int i77 = i76 + 1; i77 >= i76 - 1; i77--) - for (int i78 = i77 + 1; i78 >= i77 - 1; i78--) - for (int i79 = i78 + 1; i79 >= i78 - 1; i79--) - for (int i80 = i79 + 1; i80 >= i79 - 1; i80--) - for (int i81 = i80 + 1; i81 >= i80 - 1; i81--) - for (int i82 = i81 + 1; i82 >= i81 - 1; i82--) - for (int i83 = i82 + 1; i83 >= i82 - 1; i83--) - for (int i84 = i83 + 1; i84 >= i83 - 1; i84--) - for (int i85 = i84 + 1; i85 >= i84 - 1; i85--) - for (int i86 = i85 + 1; i86 >= i85 - 1; i86--) - for (int i87 = i86 + 1; i87 >= i86 - 1; i87--) - for (int i88 = i87 + 1; i88 >= i87 - 1; i88--) - for (int i89 = i88 + 1; i89 >= i88 - 1; i89--) - for (int i90 = i89 + 1; i90 >= i89 - 1; i90--) - for (int i91 = i90 + 1; i91 >= i90 - 1; i91--) - for (int i92 = i91 + 1; i92 >= i91 - 1; i92--) - for (int i93 = i92 + 1; i93 >= i92 - 1; i93--) - for (int i94 = i93 + 1; i94 >= i93 - 1; i94--) - for (int i95 = i94 + 1; i95 >= i94 - 1; i95--) - for (int i96 = i95 + 1; i96 >= i95 - 1; i96--) - for (int i97 = i96 + 1; i97 >= i96 - 1; i97--) - for (int i98 = i97 + 1; i98 >= i97 - 1; i98--) - for (int i99 = i98 + 1; i99 >= i98 - 1; i99--) - for (int i100 = i99 + 1; i100 >= i99 - 1; i100--) { - // Range [0,a.length). - a[i100] += 1; - } -} - -main() { - // To avoid executing the deep loops completely, we pass in a list - // with null values, so that each first iteration throws an exception. - List a = new List.filled(300, null); - int tryCallingPlusOnNull = 0; - try { - foo(a); - } on NoSuchMethodError catch (e) { - ++tryCallingPlusOnNull; - } - try { - bar(a); - } on NoSuchMethodError catch (e) { - ++tryCallingPlusOnNull; - } - Expect.equals(2, tryCallingPlusOnNull); -} diff --git a/tests/language_2/vm/deopt_hoisted_smi_check_vm_test.dart b/tests/language_2/vm/deopt_hoisted_smi_check_vm_test.dart deleted file mode 100644 index 00454bc9d7e..00000000000 --- a/tests/language_2/vm/deopt_hoisted_smi_check_vm_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2013, 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. -// Test deoptimization on an optimistically hoisted smi check. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -sum(a, b) { - var sum = 0; - for (var j = 1; j < 10; j++) { - for (var i = a; i < b; i++) { - sum++; - } - } - return sum; -} - -mask(x) { - for (var i = 0; i < 10; i++) { - if (i == 1) { - return x; - } - x = x & 0xFF; - } -} - -main() { - for (var i = 0; i < 20; i++) { - Expect.equals(9, sum(1, 2)); - Expect.equals(0xAB, mask(0xAB)); - } - Expect.equals(9, sum(1.0, 2.0)); // Passing double causes deoptimization. - Expect.equals(0xAB, mask(0x1000000AB)); -} diff --git a/tests/language_2/vm/deopt_smi_check_vm_test.dart b/tests/language_2/vm/deopt_smi_check_vm_test.dart deleted file mode 100644 index 9642b458ef7..00000000000 --- a/tests/language_2/vm/deopt_smi_check_vm_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2016, 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. -// Test deoptimization on a smi check. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -hc(a) { - var r = a.hashCode; - return r; -} - -main() { - for (var i = 0; i < 20; i++) { - Expect.equals((1).hashCode, hc(1)); - } - // Passing double causes deoptimization. - Expect.equals((1.0).hashCode, hc(1.0)); -} diff --git a/tests/language_2/vm/div_mod_test.dart b/tests/language_2/vm/div_mod_test.dart deleted file mode 100755 index 47d3b0b9f07..00000000000 --- a/tests/language_2/vm/div_mod_test.dart +++ /dev/null @@ -1,303 +0,0 @@ -// 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. - -// @dart = 2.9 - -// VMOptions=--deterministic -// VMOptions=--deterministic --use_slow_path - -// Unit tests on DIV and MOV operations by various constants. - -import "package:expect/expect.dart"; - -int kMin = 0x8000000000000000; -int kMax = 0x7fffffffffffffff; - -// The basic DIV operation. -int divme(int x, int c) { - return x ~/ c; -} - -// The basic MOD operation. -int modme(int x, int c) { - return x % c; -} - -// -// Test several "hidden" DIV constants. -// - -@pragma("vm:never-inline") -int div0(int x) { - return divme(x, 0); -} - -@pragma("vm:never-inline") -int div1(int x) { - return divme(x, 1); -} - -@pragma("vm:never-inline") -int divm1(int x) { - return divme(x, -1); -} - -@pragma("vm:never-inline") -int div2(int x) { - return divme(x, 2); -} - -@pragma("vm:never-inline") -int divm2(int x) { - return divme(x, -2); -} - -@pragma("vm:never-inline") -int div37(int x) { - return divme(x, 37); -} - -@pragma("vm:never-inline") -int div131(int x) { - return divme(x, 131); -} - -@pragma("vm:never-inline") -int divm333(int x) { - return divme(x, -333); -} - -@pragma("vm:never-inline") -int divmin(int x) { - return divme(x, kMin); -} - -@pragma("vm:never-inline") -int divmax(int x) { - return divme(x, kMax); -} - -// -// Test several "hidden" MOD constants. -// - -@pragma("vm:never-inline") -int mod0(int x) { - return modme(x, 0); -} - -@pragma("vm:never-inline") -int mod1(int x) { - return modme(x, 1); -} - -@pragma("vm:never-inline") -int modm1(int x) { - return modme(x, -1); -} - -@pragma("vm:never-inline") -int mod2(int x) { - return modme(x, 2); -} - -@pragma("vm:never-inline") -int modm2(int x) { - return modme(x, -2); -} - -@pragma("vm:never-inline") -int mod37(int x) { - return modme(x, 37); -} - -@pragma("vm:never-inline") -int mod131(int x) { - return modme(x, 131); -} - -@pragma("vm:never-inline") -int modm333(int x) { - return modme(x, -333); -} - -@pragma("vm:never-inline") -int modmin(int x) { - return modme(x, kMin); -} - -@pragma("vm:never-inline") -int modmax(int x) { - return modme(x, kMax); -} - -main() { - // Exceptional case DIV. - for (int i = -1; i <= 1; i++) { - bool threw = false; - try { - div0(i); - } on UnsupportedError catch (e) { - threw = true; - } - Expect.isTrue(threw); - } - - // Exceptional case MOD. - for (int i = -1; i <= 1; i++) { - bool threw = false; - try { - mod0(i); - } on UnsupportedError catch (e) { - threw = true; - } - Expect.isTrue(threw); - } - - // DIV by +/- 1. - Expect.equals(kMin, div1(kMin)); - Expect.equals(kMin, divm1(kMin)); - for (int i = -999; i <= 999; i++) { - Expect.equals(i, div1(i)); - Expect.equals(-i, divm1(i)); - } - Expect.equals(kMax, div1(kMax)); - Expect.equals(-kMax, divm1(kMax)); - - // MOD by +/- 1. - Expect.equals(0, mod1(kMin)); - Expect.equals(0, modm1(kMin)); - for (int i = -999; i <= 999; i++) { - Expect.equals(0, mod1(i)); - Expect.equals(0, modm1(i)); - } - Expect.equals(0, mod1(kMax)); - Expect.equals(0, modm1(kMax)); - - // DIV by +/- 2. - Expect.equals(-4611686018427387904, div2(kMin)); - Expect.equals(-4611686018427387903, div2(kMin + 1)); - Expect.equals(-4611686018427387903, div2(kMin + 2)); - Expect.equals(4611686018427387904, divm2(kMin)); - Expect.equals(4611686018427387903, divm2(kMin + 1)); - Expect.equals(4611686018427387903, divm2(kMin + 2)); - for (int i = -999; i <= 999; i++) { - int e = (i + ((i < 0) ? 1 : 0)) >> 1; - Expect.equals(e, div2(i)); - Expect.equals(-e, divm2(i)); - } - Expect.equals(4611686018427387903, div2(kMax)); - Expect.equals(4611686018427387903, div2(kMax - 1)); - Expect.equals(4611686018427387902, div2(kMax - 2)); - Expect.equals(-4611686018427387903, divm2(kMax)); - Expect.equals(-4611686018427387903, divm2(kMax - 1)); - Expect.equals(-4611686018427387902, divm2(kMax - 2)); - - // MOD by +/- 2. - Expect.equals(0, mod2(kMin)); - Expect.equals(1, mod2(kMin + 1)); - Expect.equals(0, mod2(kMin + 2)); - Expect.equals(0, modm2(kMin)); - Expect.equals(1, modm2(kMin + 1)); - Expect.equals(0, modm2(kMin + 2)); - for (int i = -999; i <= 999; i++) { - Expect.equals(i & 1, mod2(i)); - Expect.equals(i & 1, modm2(i)); - } - Expect.equals(1, mod2(kMax)); - Expect.equals(0, mod2(kMax - 1)); - Expect.equals(1, mod2(kMax - 2)); - Expect.equals(1, modm2(kMax)); - Expect.equals(0, modm2(kMax - 1)); - Expect.equals(1, modm2(kMax - 2)); - - // DIV/MOD by 37. - Expect.equals(-249280325320399346, div37(kMin)); - Expect.equals(31, mod37(kMin)); - for (int i = -999; i <= 999; i++) { - Expect.equals(i, div37(37 * i)); - Expect.equals(i, div37(37 * i + ((i >= 0) ? 36 : -36))); - Expect.equals(0, mod37(37 * i)); - Expect.equals(1, mod37(37 * i + 1)); - Expect.equals(36, mod37(37 * i + 36)); - } - for (int i = 1; i < 37; i++) { - Expect.equals(0, div37(i)); - Expect.equals(i, mod37(i)); - Expect.equals(0, div37(-i)); - Expect.equals(37 - i, mod37(-i)); - } - Expect.equals(249280325320399346, div37(kMax)); - Expect.equals(5, mod37(kMax)); - - // DIV/MOD by 131. - Expect.equals(-70407420128662410, div131(kMin)); - Expect.equals(33, mod131(kMin)); - for (int i = -999; i <= 999; i++) { - Expect.equals(i, div131(131 * i)); - Expect.equals(i, div131(131 * i + ((i >= 0) ? 130 : -130))); - Expect.equals(0, mod131(131 * i)); - Expect.equals(1, mod131(131 * i + 1)); - Expect.equals(130, mod131(131 * i + 130)); - } - for (int i = 1; i < 131; i++) { - Expect.equals(0, div131(i)); - Expect.equals(i, mod131(i)); - Expect.equals(0, div131(-i)); - Expect.equals(131 - i, mod131(-i)); - } - Expect.equals(70407420128662410, div131(kMax)); - Expect.equals(97, mod131(kMax)); - - // DIV/MOD by -333. - Expect.equals(27697813924488816, divm333(kMin)); - Expect.equals(253, modm333(kMin)); - for (int i = -999; i <= 999; i++) { - Expect.equals(i, divm333(-333 * i)); - Expect.equals(i, divm333(-333 * i + ((i < 0) ? 130 : -130))); - Expect.equals(0, modm333(-333 * i)); - Expect.equals(1, modm333(-333 * i + 1)); - Expect.equals(130, modm333(-333 * i + 130)); - } - Expect.equals(-27697813924488816, divm333(kMax)); - Expect.equals(79, modm333(kMax)); - - // DIV/MOD by Min. - Expect.equals(1, divmin(kMin)); - Expect.equals(0, modmin(kMin)); - for (int i = -999; i <= 999; i++) { - Expect.equals(0, divmin(i)); - Expect.equals(i >= 0 ? i : 1 + kMax + i, modmin(i)); - } - Expect.equals(0, divmin(kMax)); - Expect.equals(kMax, modmin(kMax)); - - // DIV/MOD by Max. - Expect.equals(-1, divmax(kMin)); - Expect.equals(kMax - 1, modmax(kMin)); - for (int i = -999; i <= 999; i++) { - Expect.equals(0, divmax(i)); - Expect.equals(i >= 0 ? i : kMax + i, modmax(i)); - } - Expect.equals(1, divmax(kMax)); - Expect.equals(0, modmax(kMax)); - - // Exceptional null value MOD. - bool threwDiv = false; - try { - div2(null); - } on NoSuchMethodError catch (e) { - threwDiv = true; - } - Expect.isTrue(threwDiv); - - // Exceptional null value MOD. - bool threwMod = false; - try { - mod2(null); - } on NoSuchMethodError catch (e) { - threwMod = true; - } - Expect.isTrue(threwMod); -} diff --git a/tests/language_2/vm/exactness/future_or_regression_34238_test.dart b/tests/language_2/vm/exactness/future_or_regression_34238_test.dart deleted file mode 100644 index 9c73911bb9c..00000000000 --- a/tests/language_2/vm/exactness/future_or_regression_34238_test.dart +++ /dev/null @@ -1,16 +0,0 @@ - -// @dart = 2.9 -import 'dart:async'; - -class A { - FutureOr x; -} - -Future foo() async => 42; - -main() { - var a = new A(); - a.x = 33; - a.x = null; - a.x = foo(); -} diff --git a/tests/language_2/vm/function_equality_vm_test.dart b/tests/language_2/vm/function_equality_vm_test.dart deleted file mode 100644 index 961bff55ea1..00000000000 --- a/tests/language_2/vm/function_equality_vm_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test function equality with null. - -import "package:expect/expect.dart"; - -class A { - foo() {} -} - -main() { - var a = new A(); - var f = a.foo; - Expect.isFalse(f == null); - Expect.isFalse(null == f); -} diff --git a/tests/language_2/vm/if_conversion_vm_test.dart b/tests/language_2/vm/if_conversion_vm_test.dart deleted file mode 100644 index c86aeea5154..00000000000 --- a/tests/language_2/vm/if_conversion_vm_test.dart +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test if-conversion pass in the optimizing compiler. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -import "package:expect/expect.dart"; - -f1(i) => (i == 0) ? 0 : 1; -f2(i) => (i == 0) ? 2 : 3; -f3(i) => (i == null) ? 0 : 1; -f4(i) => (i == null) ? 2 : 3; - -f5(i) => (i != 0) ? 0 : 1; -f6(i) => (i != 0) ? 2 : 3; -f7(i) => (i != null) ? 0 : 1; -f8(i) => (i != null) ? 2 : 3; - -f9(i) => identical(i, 0) ? 0 : 1; -f10(i) => identical(i, 0) ? 2 : 3; -f11(i) => identical(i, null) ? 0 : 1; -f12(i) => identical(i, null) ? 2 : 3; - -f13(i) => !identical(i, 0) ? 0 : 1; -f14(i) => !identical(i, 0) ? 2 : 3; -f15(i) => !identical(i, null) ? 0 : 1; -f16(i) => !identical(i, null) ? 2 : 3; - -const POWER_OF_2 = 0x1000000000; - -bigPower(i) => (i == 11) ? 0 : POWER_OF_2; - -cse(i) { - final a = i == 0 ? 0 : 1; - final b = i == 0 ? 2 : 3; - return a + b; -} - -f17(b) => b ? 0 : 11; -f18(b) => b ? 2 : 0; - -f19(i) => i == 0 ? 0 : 0; - -f20(i) => i > 0 ? 0 : 1; -f21(i) => i > 0 ? 2 : 3; -f22(i) => i & 1 == 0 ? 0 : 1; -f23(i) => i & 1 != 0 ? 1 : 0; - -f24(i) => i >= 0 ? 0 : 1; -f25(i) => i < 0 ? 0 : 1; -f26(i) => i <= 0 ? 0 : 1; - -main() { - for (var i = 0; i < 20; i++) { - f1(i); - f2(i); - f3(i); - f4(i); - f5(i); - f6(i); - f7(i); - f8(i); - f9(i); - f10(i); - f11(i); - f12(i); - f13(i); - f14(i); - f15(i); - f16(i); - cse(i); - bigPower(i); - f17(true); - f18(true); - f19(i); - f20(i); - f21(i); - f22(i); - f23(i); - f24(i); - f25(i); - f26(i); - } - - Expect.equals(0, f1(0)); - Expect.equals(1, f1(44)); - Expect.equals(2, f2(0)); - Expect.equals(3, f2(44)); - Expect.equals(0, f3(null)); - Expect.equals(1, f3(44)); - Expect.equals(2, f4(null)); - Expect.equals(3, f4(44)); - - Expect.equals(1, f5(0)); - Expect.equals(0, f5(44)); - Expect.equals(3, f6(0)); - Expect.equals(2, f6(44)); - Expect.equals(1, f7(null)); - Expect.equals(0, f7(44)); - Expect.equals(3, f8(null)); - Expect.equals(2, f8(44)); - - Expect.equals(0, f9(0)); - Expect.equals(1, f9(44)); - Expect.equals(2, f10(0)); - Expect.equals(3, f10(44)); - Expect.equals(0, f11(null)); - Expect.equals(1, f11(44)); - Expect.equals(2, f12(null)); - Expect.equals(3, f12(44)); - - Expect.equals(1, f13(0)); - Expect.equals(0, f13(44)); - Expect.equals(3, f14(0)); - Expect.equals(2, f14(44)); - Expect.equals(1, f15(null)); - Expect.equals(0, f15(44)); - Expect.equals(3, f16(null)); - Expect.equals(2, f16(44)); - - Expect.equals(0, bigPower(11)); - Expect.equals(POWER_OF_2, bigPower(12)); - - Expect.equals(2, cse(0)); - Expect.equals(4, cse(1)); - - Expect.equals(11, f17(false)); - Expect.equals(0, f17(true)); - - Expect.equals(0, f18(false)); - Expect.equals(2, f18(true)); - - Expect.equals(0, f19(0)); - Expect.equals(0, f19(1)); - - Expect.equals(0, f20(123)); - Expect.equals(2, f21(123)); - Expect.equals(0, f22(122)); - Expect.equals(1, f22(123)); - Expect.equals(0, f23(122)); - Expect.equals(1, f23(123)); - - Expect.equals(0, f24(0)); - Expect.equals(1, f24(-1)); - - Expect.equals(0, f25(-1)); - Expect.equals(1, f25(0)); - - Expect.equals(0, f26(0)); - Expect.equals(1, f26(1)); -} diff --git a/tests/language_2/vm/inline_heuristic_test.dart b/tests/language_2/vm/inline_heuristic_test.dart deleted file mode 100755 index 5f9bb7cbd0f..00000000000 --- a/tests/language_2/vm/inline_heuristic_test.dart +++ /dev/null @@ -1,303 +0,0 @@ -// 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. - -// @dart = 2.9 - -// VMOptions=--deterministic --optimization_counter_threshold=10 - -// Test on specialized vs non-specialized inlining. - -import 'dart:core'; -import "package:expect/expect.dart"; - -// To inline or not to inline, that is the question? -int foo(int k) { - switch (k) { - case 0: - return 1; - case 1: - return 2; - case 2: - return 3; - case 3: - return 4; - case 4: - return 5; - case 5: - return 6; - case 6: - return 7; - case 7: - return 8; - case 8: - return 9; - case 9: - return 10; - case 10: - return 11; - case 11: - return 12; - case 12: - return 13; - case 13: - return 14; - case 14: - return 15; - case 15: - return 16; - case 16: - return 17; - case 17: - return 18; - case 18: - return 19; - case 19: - return 20; - case 20: - return 21; - case 21: - return 22; - case 22: - return 23; - case 23: - return 24; - case 24: - return 25; - case 25: - return 26; - case 26: - return 27; - case 27: - return 28; - case 28: - return 29; - case 29: - return 30; - case 30: - return 31; - case 31: - return 32; - case 32: - return 33; - case 33: - return 34; - case 34: - return 35; - case 35: - return 36; - case 36: - return 37; - case 37: - return 38; - case 38: - return 39; - case 39: - return 40; - case 40: - return 41; - case 41: - return 42; - case 42: - return 43; - case 43: - return 44; - case 44: - return 45; - case 45: - return 46; - case 46: - return 47; - case 47: - return 48; - case 48: - return 49; - case 49: - return 50; - case 50: - return 51; - case 51: - return 52; - case 52: - return 53; - case 53: - return 54; - case 54: - return 55; - case 55: - return 56; - case 56: - return 57; - case 57: - return 58; - case 58: - return 59; - case 59: - return 60; - case 60: - return 61; - case 61: - return 62; - case 62: - return 63; - case 63: - return 64; - case 64: - return 65; - case 65: - return 66; - case 66: - return 67; - case 67: - return 68; - case 68: - return 69; - case 69: - return 70; - case 70: - return 71; - case 71: - return 72; - case 72: - return 73; - case 73: - return 74; - case 74: - return 75; - case 75: - return 76; - case 76: - return 77; - case 77: - return 78; - case 78: - return 79; - case 79: - return 80; - case 80: - return 81; - case 81: - return 82; - case 82: - return 83; - case 83: - return 84; - case 84: - return 85; - case 85: - return 86; - case 86: - return 87; - case 87: - return 88; - case 88: - return 89; - case 89: - return 90; - case 90: - return 91; - case 91: - return 92; - case 92: - return 93; - case 93: - return 94; - case 94: - return 95; - case 95: - return 96; - case 96: - return 97; - case 97: - return 98; - case 98: - return 99; - case 99: - return 100; - case 100: - return 101; - case 101: - return 102; - case 102: - return 103; - case 103: - return 104; - case 104: - return 105; - case 105: - return 106; - case 106: - return 107; - case 107: - return 108; - case 108: - return 109; - case 109: - return 110; - case 110: - return 111; - case 111: - return 112; - case 112: - return 113; - case 113: - return 114; - case 114: - return 115; - case 115: - return 116; - case 116: - return 117; - case 117: - return 118; - case 118: - return 119; - case 119: - return 120; - case 120: - return 121; - case 121: - return 122; - case 122: - return 123; - case 123: - return 124; - case 124: - return 125; - case 125: - return 126; - case 126: - return 127; - case 127: - return 128; - default: - return -1; - } -} - -@pragma('vm:never-inline') -int bar() { - // Here we should inline! The inlined size is very small - // after specialization for the constant arguments. - return foo(1) + foo(12); -} - -@pragma('vm:never-inline') -int baz(int i) { - // Here we should not inline! The inlined size is too large, - // just keep the original method. In fact, we can use the cached - // estimate of foo()'s size from the previous compilation at this - // point, which enables the "early" bail heuristic! - return foo(i); -} - -main() { - // Repeat tests to enter JIT (when applicable). - for (int i = 0; i < 20; i++) { - Expect.equals(15, bar()); - for (int i = -150; i <= 150; i++) { - int e = (i < 0 || i > 127) ? -1 : i + 1; - Expect.equals(e, baz(i)); - } - } -} diff --git a/tests/language_2/vm/integer_type_propagation2_test.dart b/tests/language_2/vm/integer_type_propagation2_test.dart deleted file mode 100644 index 918d0cd9d92..00000000000 --- a/tests/language_2/vm/integer_type_propagation2_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2017, 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. -// Test various optimizations and deoptimizations of optimizing compiler.. -// VMOptions=--no-background-compilation --optimization-counter-threshold=1000 - -// @dart = 2.9 - -import "package:expect/expect.dart"; -import "dart:typed_data"; - -var list = new Uint32List(1); - -@pragma('vm:never-inline') -testuint32(bool b) { - var t; - if (b) { - t = list[0]; - } - if (t != null) { - return t & 0x7fffffff; - } - return -1; -} - -main() { - var s = 0; - testuint32(true); - testuint32(false); - for (int i = 0; i < 10000; ++i) { - testuint32(true); - } - Expect.equals(0, testuint32(true)); - Expect.equals(-1, testuint32(false)); -} diff --git a/tests/language_2/vm/integer_type_propagation_test.dart b/tests/language_2/vm/integer_type_propagation_test.dart deleted file mode 100644 index 468f03e6eae..00000000000 --- a/tests/language_2/vm/integer_type_propagation_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2017, 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. -// Test various optimizations and deoptimizations of optimizing compiler.. -// VMOptions=--no-background-compilation --optimization-counter-threshold=1000 - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -@pragma('vm:never-inline') -testuint32(y) { - int x = y; - if (x != null) { - return x & 0xffff; - } -} - -main() { - var s = 0; - testuint32(0x7fffffff); - for (int i = 0; i < 10000; ++i) { - testuint32(i); - } - Expect.equals(65535, testuint32(0x7fffffff)); - Expect.equals(65535, testuint32(0x7f3452435245ffff)); -} diff --git a/tests/language_2/vm/irreducible_loop_test.dart b/tests/language_2/vm/irreducible_loop_test.dart deleted file mode 100644 index 218844d5199..00000000000 --- a/tests/language_2/vm/irreducible_loop_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2018, 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 - -// VMOptions=--no_background_compilation --optimization_counter_threshold=10 - -import "package:expect/expect.dart"; - -// This method forms an infinite, irreducible loop. As long as we -// don't enter any of the branches, the method terminates. The test -// is included to ensure an irreducible loop does not break anything -// in the compiler. -int bar(int x) { - switch (x) { - case_1: - case 1: - continue case_2; - case_2: - case 2: - continue case_1; - } - return x; -} - -main() { - for (var i = -50; i <= 0; i++) { - Expect.equals(i, bar(i)); - } - for (var i = 3; i <= 50; i++) { - Expect.equals(i, bar(i)); - } -} diff --git a/tests/language_2/vm/issue11087_vm_test.dart b/tests/language_2/vm/issue11087_vm_test.dart deleted file mode 100644 index 40763eb435a..00000000000 --- a/tests/language_2/vm/issue11087_vm_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2013, 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 - -// Regression test for VM's IfConverted pass not keeping graph structure and -// use lists in sync. - -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -class A { - int x; -} - -f() { - var a = new A(); - a.x = (true ? 2 : 4); - return a.x; -} - -main() { - for (var i = 0; i < 20; i++) f(); -} diff --git a/tests/language_2/vm/issue21220_vm_test.dart b/tests/language_2/vm/issue21220_vm_test.dart deleted file mode 100644 index f48392fcc67..00000000000 --- a/tests/language_2/vm/issue21220_vm_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'dart:typed_data'; -import 'package:expect/expect.dart'; - -main() { - final val = (0xffb15062).toSigned(32); - final arr = new Int32x4List(1); - arr[0] = new Int32x4(val, val, val, val); - Expect.equals(val, arr[0].x); - Expect.equals(val, arr[0].y); - Expect.equals(val, arr[0].z); - Expect.equals(val, arr[0].w); -} diff --git a/tests/language_2/vm/lazy_async_exception_stack2_test.dart b/tests/language_2/vm/lazy_async_exception_stack2_test.dart deleted file mode 100644 index 9cff86a1d0c..00000000000 --- a/tests/language_2/vm/lazy_async_exception_stack2_test.dart +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) 2017, 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 - -import 'package:async_helper/async_minitest.dart'; - -import 'lazy_async_exception_stack_helper.dart' as h; - -foo3() async => throw "foo"; -bar3() async => throw "bar"; - -foo2() async => foo3(); -bar2() async => bar3(); - -foo() async => foo2(); -bar() async => bar2(); - -test1() async { - // test1 -> foo -> foo2 -> foo3 - // test1 -> bar -> bar2 -> bar3 - // These run interleaved, check their stack traces don't become mixed. - var a = foo(); - var b = bar(); - - try { - await a; - } catch (e, st) { - // st has foo,2,3 and not bar,2,3. - expect( - h.stringContainsInOrder(st.toString(), [ - 'foo3', - 'foo2', - 'foo', - 'test1', - ]), - isTrue); - expect(st.toString().contains('bar'), isFalse); - } - - try { - await b; - } catch (e, st) { - // st has bar,2,3 but not foo,2,3 - expect( - h.stringContainsInOrder(st.toString(), [ - 'bar3', - 'bar2', - 'bar', - 'test1', - ]), - isTrue); - expect(st.toString().contains('foo'), isFalse); - } -} - -test2() async { - // test2 -> foo -> foo2 -> foo3 - // test2 -> bar -> bar2 -> bar3 - // These run sequentially, check the former stack trace didn't get linked to - // from the latter stack trace. - - try { - await foo(); - } catch (e, st) { - // st has foo,2,3 but not bar,2,3 - expect( - h.stringContainsInOrder(st.toString(), [ - 'foo3', - 'foo2', - 'foo', - 'test2', - ]), - isTrue); - expect(st.toString().contains('bar'), isFalse); - } - - try { - await bar(); - } catch (e, st) { - // st has bar,2,3 but not foo,2,3 - expect( - h.stringContainsInOrder(st.toString(), [ - 'bar3', - 'bar2', - 'bar', - 'test2', - ]), - isTrue); - expect(st.toString().contains('foo'), isFalse); - } -} - -main() async { - test('lazy async exception stack', () async { - await test1(); - await test2(); - }); -} diff --git a/tests/language_2/vm/lazy_async_exception_stack_helper.dart b/tests/language_2/vm/lazy_async_exception_stack_helper.dart deleted file mode 100644 index 36e5c3ba084..00000000000 --- a/tests/language_2/vm/lazy_async_exception_stack_helper.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2017, 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 - -bool stringContainsInOrder(String string, List substrings) { - var fromIndex = 0; - for (var s in substrings) { - fromIndex = string.indexOf(s, fromIndex); - if (fromIndex < 0) { - return false; - } - } - return true; -} diff --git a/tests/language_2/vm/lazy_async_exception_stack_test.dart b/tests/language_2/vm/lazy_async_exception_stack_test.dart deleted file mode 100644 index f037568acb6..00000000000 --- a/tests/language_2/vm/lazy_async_exception_stack_test.dart +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2017, 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 - -import 'package:async_helper/async_minitest.dart'; - -import 'lazy_async_exception_stack_helper.dart' as h; - -thrower() async { - throw 'oops'; -} - -number() async { - return 4; -} - -generator() async* { - yield await number(); - yield await thrower(); -} - -foo() async { - await for (var i in generator()) { - print(i); - } -} - -main() async { - // Test async and async*. - test('lazy async exception stack', () async { - try { - await foo(); - fail("Did not throw"); - } catch (e, st) { - expect( - h.stringContainsInOrder(st.toString(), [ - 'thrower', '.dart:12', // no auto-format. - 'generator', '.dart:21', // no auto-format. - '', // no auto-format. - 'foo', '.dart', // no auto-format. - 'main', - ]), - isTrue); - } - - inner() async { - deep() async { - await thrower(); - } - - await deep(); - } - - // Test inner functions. - try { - await inner(); - } catch (e, st) { - expect( - h.stringContainsInOrder(st.toString(), [ - 'thrower', - 'main..inner.deep', - 'main..inner', - 'main', - '', - ]), - isTrue); - } - - // Test for correct linkage. - try { - await thrower(); - } catch (e, st) { - expect( - h.stringContainsInOrder(st.toString(), [ - 'thrower', '.dart:12', // no auto-format. - 'main.', '.dart:73', // no auto-format. - ]), - isTrue); - } - }); -} diff --git a/tests/language_2/vm/lazy_deopt_vm_test.dart b/tests/language_2/vm/lazy_deopt_vm_test.dart deleted file mode 100644 index 4ff83510794..00000000000 --- a/tests/language_2/vm/lazy_deopt_vm_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2016, 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. -// VMOptions=--optimization-filter=foo --deoptimize_every=10 --optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -// Test that lazy deoptimization on stack checks does not damage unoptimized -// frame. - -import 'package:expect/expect.dart'; - -foo() { - var a = 0; - var b = 1; - var c = 2; - var d = 3; - var e = 4; - for (var i = 0; i < 10; i++) { - a++; - b++; - c++; - d++; - e++; - } - Expect.equals(10, a); - Expect.equals(11, b); - Expect.equals(12, c); - Expect.equals(13, d); - Expect.equals(14, e); -} - -main() { - for (var i = 0; i < 10; ++i) { - foo(); - } -} diff --git a/tests/language_2/vm/lazy_deopt_with_exception_and_stacktrace_test.dart b/tests/language_2/vm/lazy_deopt_with_exception_and_stacktrace_test.dart deleted file mode 100644 index ce9d80343dd..00000000000 --- a/tests/language_2/vm/lazy_deopt_with_exception_and_stacktrace_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2016, 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. -// Test deoptimization on an optimistically hoisted smi check. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -// Test that lazy deoptimization works if the program returns to a function -// that is scheduled for lazy deoptimization via an exception. - -import 'package:expect/expect.dart'; - -class C { - dynamic x = 42; -} - -@pragma('vm:never-inline') -AA(C c, bool b) { - if (b) { - c.x = 2.5; - throw 123; - } -} - -@pragma('vm:never-inline') -T1(C c, bool b) { - try { - AA(c, b); - } on dynamic catch (e, st) { - print(e); - print(st); - Expect.isTrue(st is StackTrace, "is StackTrace"); - } - return c.x + 1; -} - -@pragma('vm:never-inline') -T2(C c, bool b) { - try { - AA(c, b); - } on String catch (e, st) { - print(e); - print(st); - Expect.isTrue(st is StackTrace, "is StackTrace"); - Expect.isTrue(false); - } on int catch (e, st) { - Expect.equals(e, 123); - Expect.equals(b, true); - Expect.equals(c.x, 2.5); - print(st); - Expect.isTrue(st is StackTrace, "is StackTrace"); - } - return c.x + 1; -} - -main() { - var c = new C(); - for (var i = 0; i < 10000; ++i) { - T1(c, false); - T2(c, false); - } - Expect.equals(43, T1(c, false)); - Expect.equals(43, T2(c, false)); - Expect.equals(3.5, T1(c, true)); - Expect.equals(3.5, T2(c, true)); -} diff --git a/tests/language_2/vm/lazy_deopt_with_exception_concurrent_test.dart b/tests/language_2/vm/lazy_deopt_with_exception_concurrent_test.dart deleted file mode 100644 index 3e07cbba57f..00000000000 --- a/tests/language_2/vm/lazy_deopt_with_exception_concurrent_test.dart +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2016, 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. -// Test deoptimization on an optimistically hoisted smi check. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -// Test that lazy deoptimization works if the program returns to a function -// that is scheduled for lazy deoptimization via an exception. - -import 'dart:async'; -import 'dart:isolate'; - -import 'package:expect/expect.dart'; - -class C { - dynamic x = 42; -} - -@pragma('vm:never-inline') -AA(C c, bool b) { - if (b) { - c.x = 2.5; - throw 123; - } -} - -@pragma('vm:never-inline') -T1(C c, bool b) { - try { - AA(c, b); - } on dynamic {} - return c.x + 1; -} - -@pragma('vm:never-inline') -T2(C c, bool b) { - try { - AA(c, b); - } on String { - Expect.isTrue(false); - } on int catch (e) { - Expect.equals(e, 123); - Expect.equals(b, true); - Expect.equals(c.x, 2.5); - } - return c.x + 1; -} - -main() async { - const count = 10; - - final rp = ReceivePort(); - for (int i = 0; i < count; ++i) { - Isolate.spawn(entry, i, onExit: rp.sendPort); - } - final si = StreamIterator(rp); - int j = 0; - while (await si.moveNext()) { - j++; - if (j == count) break; - } - print('done'); - - if (j != count) throw 'a'; - si.cancel(); - rp.close(); - print('done'); -} - -void entry(_) { - var c = new C(); - for (var i = 0; i < 100000; ++i) { - T1(c, false); - T2(c, false); - } - Expect.equals(43, T1(c, false)); - Expect.equals(43, T2(c, false)); - Expect.equals(3.5, T1(c, true)); - Expect.equals(3.5, T2(c, true)); -} diff --git a/tests/language_2/vm/lazy_deopt_with_exception_test.dart b/tests/language_2/vm/lazy_deopt_with_exception_test.dart deleted file mode 100644 index a38089f5c29..00000000000 --- a/tests/language_2/vm/lazy_deopt_with_exception_test.dart +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2016, 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. -// Test deoptimization on an optimistically hoisted smi check. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -// Test that lazy deoptimization works if the program returns to a function -// that is scheduled for lazy deoptimization via an exception. - -import 'package:expect/expect.dart'; - -class C { - dynamic x = 42; -} - -@pragma('vm:never-inline') -AA(C c, bool b) { - if (b) { - c.x = 2.5; - throw 123; - } -} - -@pragma('vm:never-inline') -T1(C c, bool b) { - try { - AA(c, b); - } on dynamic {} - return c.x + 1; -} - -@pragma('vm:never-inline') -T2(C c, bool b) { - try { - AA(c, b); - } on String { - Expect.isTrue(false); - } on int catch (e) { - Expect.equals(e, 123); - Expect.equals(b, true); - Expect.equals(c.x, 2.5); - } - return c.x + 1; -} - -main() { - var c = new C(); - for (var i = 0; i < 10000; ++i) { - T1(c, false); - T2(c, false); - } - Expect.equals(43, T1(c, false)); - Expect.equals(43, T2(c, false)); - Expect.equals(3.5, T1(c, true)); - Expect.equals(3.5, T2(c, true)); -} diff --git a/tests/language_2/vm/licm_constant_redefinition_vm_test.dart b/tests/language_2/vm/licm_constant_redefinition_vm_test.dart deleted file mode 100644 index 28d64e5870c..00000000000 --- a/tests/language_2/vm/licm_constant_redefinition_vm_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2015, 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. -// VMOptions=--optimization_counter_threshold=100 --no-use-osr --no-background_compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class X { - final nested = []; - - get length => nested.length; -} - -loop(val) { - var sum = 0; - for (var i = 0; i < 10; i++) { - sum += val.length; - } - return sum; -} - -// LoadField(LoadField(",", nested), length) should not be hoisted. -// Otherwise it would crash. -testRedef() => loop(","); - -main() { - // Provide polymorphic type feedback. - loop(""); - loop(new X()); - - // Optimize loop with a constant argument. - for (var i = 0; i < 100; i++) { - testRedef(); - } -} diff --git a/tests/language_2/vm/load_elimination_any_use_creates_alias_test.dart b/tests/language_2/vm/load_elimination_any_use_creates_alias_test.dart deleted file mode 100644 index b1092ae4680..00000000000 --- a/tests/language_2/vm/load_elimination_any_use_creates_alias_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2014, 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. -// Test correctness of side effects tracking used by load to load forwarding. - -// @dart = 2.9 - -// VMOptions=--no-use-osr --optimization-counter-threshold=10 --no-background-compilation - -import "package:expect/expect.dart"; - -B G; - -@pragma('vm:never-inline') -modify() { - G.bval = 123; -} - -class B { - @pragma('vm:prefer-inline') - poly() { - G = this; - modify(); - return bval; - } - - var bval = -1; -} - -class C { - poly() => null; -} - -@pragma('vm:prefer-inline') -foo(obj) => obj.poly(); - -@pragma('vm:never-inline') -test() { - var b = new B(); - - foo(b); - return b.bval; -} - -main() { - foo(new C()); - foo(new B()); - for (var i = 0; i < 100; i++) test(); - Expect.equals(123, test()); -} diff --git a/tests/language_2/vm/load_elimination_has_loads_from_place_test.dart b/tests/language_2/vm/load_elimination_has_loads_from_place_test.dart deleted file mode 100644 index 0a5d3bd5d99..00000000000 --- a/tests/language_2/vm/load_elimination_has_loads_from_place_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2014, 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. -// Test correctness of side effects tracking used by load to load forwarding. - -// @dart = 2.9 - -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// Tests correct handling of redefinitions in aliasing computation. - -import "package:expect/expect.dart"; - -var H = true; - -class A { - B bb; - - @pragma('vm:prefer-inline') - poly(p) { - if (H) { - bb = p; - } - B t = bb; - t.bval = 123; - return t.bval; - } -} - -class B { - int bval = -1; - - @pragma('vm:prefer-inline') - poly(p) { - return bval; - } -} - -@pragma('vm:prefer-inline') -foo(obj, p) => obj.poly(p); - -@pragma('vm:never-inline') -test() { - A a = new A(); - B b = new B(); - foo(a, b); - return b.bval; -} - -main() { - // Prime foo with polymorphic type feedback. - foo(new B(), new A()); - foo(new A(), new B()); - - for (var i = 0; i < 100; i++) test(); - Expect.equals(123, test()); -} diff --git a/tests/language_2/vm/load_elimination_mark_stored_values_escaping_test.dart b/tests/language_2/vm/load_elimination_mark_stored_values_escaping_test.dart deleted file mode 100644 index 4a3835ca1a9..00000000000 --- a/tests/language_2/vm/load_elimination_mark_stored_values_escaping_test.dart +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2014, 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. -// Test correctness of side effects tracking used by load to load forwarding. - -// @dart = 2.9 - -// VMOptions=--no-use-osr --optimization-counter-threshold=10 --no-background-compilation - -// Tests correct handling of redefinitions in aliasing computation. - -import "package:expect/expect.dart"; - -B G; - -class A { - int val = -1; - - @pragma('vm:prefer-inline') - poly(p) { - p.aa = this; - } -} - -@pragma('vm:never-inline') -modify() { - G.aa.val = 123; -} - -class B { - A aa; - - @pragma('vm:prefer-inline') - poly(p) { - G = this; - foo2(p, this); - modify(); - } -} - -@pragma('vm:prefer-inline') -foo(obj, p) => obj.poly(p); - -@pragma('vm:prefer-inline') -foo2(obj, p) => obj.poly(p); - -@pragma('vm:never-inline') -testfunc() { - var a = new A(); - var b = new B(); - foo(b, a); - return a.val; -} - -main() { - foo(new B(), new A()); - foo(new A(), new B()); - foo2(new B(), new A()); - foo2(new A(), new B()); - for (var i = 0; i < 100; i++) testfunc(); - Expect.equals(123, testfunc()); -} diff --git a/tests/language_2/vm/load_elimination_two_redefinitions_test.dart b/tests/language_2/vm/load_elimination_two_redefinitions_test.dart deleted file mode 100644 index 3e8e79271e6..00000000000 --- a/tests/language_2/vm/load_elimination_two_redefinitions_test.dart +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2014, 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. -// Test correctness of side effects tracking used by load to load forwarding. - -// @dart = 2.9 - -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// Tests correct handling of redefinitions in aliasing computation. - -import "package:expect/expect.dart"; - -var H = true; - -class A { - B bb; - - @pragma('vm:prefer-inline') - poly(p) { - if (H) { - bb = p; - } - B t = bb; - t.bval = 123; - return t.bval; - } -} - -class B { - int bval = -1; - - @pragma('vm:prefer-inline') - poly(p) { - return bval; - } -} - -@pragma('vm:prefer-inline') -foo(obj, p) => obj.poly(p); - -@pragma('vm:never-inline') -test() { - A a = new A(); - B b = new B(); - foo(a, b); - foo(a, b); - return b.bval; -} - -main() { - // Prime foo with polymorphic type feedback. - foo(new B(), new A()); - foo(new A(), new B()); - - for (var i = 0; i < 100; i++) test(); - Expect.equals(123, test()); -} diff --git a/tests/language_2/vm/load_to_load_forwarding_cutdown_vm_test.dart b/tests/language_2/vm/load_to_load_forwarding_cutdown_vm_test.dart deleted file mode 100644 index 5dbc50334e9..00000000000 --- a/tests/language_2/vm/load_to_load_forwarding_cutdown_vm_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2012, 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 - -// Test correctness of side effects tracking used by load to load forwarding. -// In this cutdown version of the load_to_load_forwarding_vm test, the function -// being compiled ends up in a single basic block, which tests load -// elimination when generating the initial sets. - -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -import "package:expect/expect.dart"; -import "dart:typed_data"; - -testViewAliasing1() { - final f64 = new Float64List(1); - final f32 = new Float32List.view(f64.buffer); - f64[0] = 1.0; // Should not be forwarded. - f32[1] = 2.0; // upper 32bits for 2.0f and 2.0 are the same - return f64[0]; -} - -main() { - for (var i = 0; i < 20; i++) { - Expect.equals(2.0, testViewAliasing1()); - } -} diff --git a/tests/language_2/vm/load_to_load_forwarding_vm_test.dart b/tests/language_2/vm/load_to_load_forwarding_vm_test.dart deleted file mode 100644 index fbbe30acd62..00000000000 --- a/tests/language_2/vm/load_to_load_forwarding_vm_test.dart +++ /dev/null @@ -1,596 +0,0 @@ -// Copyright (c) 2012, 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. -// Test correctness of side effects tracking used by load to load forwarding. - -// @dart = 2.9 - -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -import "package:expect/expect.dart"; -import "dart:typed_data"; - -class A { - var x, y; - A(this.x, this.y); -} - -foo(a) { - var value1 = a.x; - var value2 = a.y; - for (var j = 1; j < 4; j++) { - value1 |= a.x << (j * 8); - a.y += 1; - a.x += 1; - value2 |= a.y << (j * 8); - } - return [value1, value2]; -} - -bar(a, mode) { - var value1 = a.x; - var value2 = a.y; - for (var j = 1; j < 4; j++) { - value1 |= a.x << (j * 8); - a.y += 1; - if (mode) a.x += 1; - a.x += 1; - value2 |= a.y << (j * 8); - } - return [value1, value2]; -} - -// Verify that immutable and mutable VM fields (array length in this case) -// are not confused by load forwarding even if the access the same offset -// in the object. -testImmutableVMFields(arr, immutable) { - if (immutable) { - return arr.length; // Immutable length load. - } - - if (arr.length < 2) { - // Mutable length load, should not be forwarded. - arr.add(null); - } - - return arr.length; -} - -testPhiRepresentation(f, arr) { - if (f) { - arr[0] = arr[0] + arr[1]; - } else { - arr[0] = arr[0] - arr[1]; - } - return arr[0]; -} - -testPhiConversions(f, arr) { - if (f) { - arr[0] = arr[1]; - } else { - arr[0] = arr[2]; - } - return arr[0]; -} - -class M { - var x; - M(this.x); -} - -fakeAliasing(arr) { - var a = new M(10); - var b = new M(10); - var c = arr.length; - - if (c * c != c * c) { - arr[0] = a; // Escape. - arr[0] = b; - } - - return c * c; // Deopt point. -} - -class X { - var next; - X(this.next); -} - -testPhiForwarding(obj) { - if (obj.next == null) { - return 1; - } - - var len = 0; - while (obj != null) { - len++; - obj = obj.next; // This load should not be forwarded. - } - - return len; -} - -testPhiForwarding2(obj) { - if (obj.next == null) { - return 1; - } - - var len = 0, next = null; - while ((obj != null) && len < 2) { - len++; - obj = obj.next; // This load should be forwarded. - next = obj.next; - } - - return len; -} - -class V { - final f; - V(this.f); -} - -testPhiForwarding3() { - var a = new V(-0.1); - var c = new V(0.0); - var b = new V(0.1); - - for (var i = 0; i < 3; i++) { - var af = a.f; - var bf = b.f; - var cf = c.f; - a = new V(cf); - b = new V(af); - c = new V(bf); - } - - Expect.equals(-0.1, a.f); - Expect.equals(0.1, b.f); - Expect.equals(0.0, c.f); -} - -testPhiForwarding4() { - var a = new V(-0.1); - var b = new V(0.1); - var c = new V(0.0); - - var result = new List.filled(9, null); - for (var i = 0, j = 0; i < 3; i++) { - result[j++] = a.f; - result[j++] = b.f; - result[j++] = c.f; - var xa = a; - var xb = b; - a = c; - b = xa; - c = xb; - } - - Expect.listEquals([-0.1, 0.1, 0.0, 0.0, -0.1, 0.1, 0.1, 0.0, -0.1], result); -} - -class C { - C(this.box, this.parent); - final box; - final C parent; -} - -testPhiForwarding5(C c) { - var s = 0; - var tmp = c; - var a = c.parent; - if (a.box + tmp.box != 1) throw "failed"; - do { - s += tmp.box + a.box; - tmp = a; - a = a.parent; - } while (a != null); - return s; -} - -class U { - var x, y; - U() - : x = 0, - y = 0; -} - -testEqualPhisElimination() { - var u = new U(); - var v = new U(); - var sum = 0; - for (var i = 0; i < 3; i++) { - u.x = i; - u.y = i; - if ((i & 1) == 1) { - v.x = i + 1; - v.y = i + 1; - } else { - v.x = i - 1; - v.y = i - 1; - } - sum += v.x + v.y; - } - Expect.equals(4, sum); - Expect.equals(2, u.x); - Expect.equals(2, u.y); -} - -testPhiMultipleRepresentations(f, arr) { - var w; - if (f) { - w = arr[0] + arr[1]; - } else { - w = arr[0] - arr[1]; - } - var v; - if (f) { - v = arr[0]; - } else { - v = arr[0]; - } - return v + w; -} - -testIndexedNoAlias(a) { - a[0] = 1; - a[1] = 2; - a[2] = 3; - return a[0] + a[1]; -} - -// -// Tests for indexed store aliases were autogenerated to have extensive -// coverage for all interesting aliasing combinations within the alias -// lattice (*[*], *[C], X[*], X[C]) -// - -testIndexedAliasedStore1(i) { - var a = new List.filled(2, null); - a[0] = 1; // X[C] - a[i] = 2; // X[*] - return a[0]; -} - -testIndexedAliasedStore2(f, c) { - var a = new List.filled(2, null); - var d = f ? a : c; - a[0] = 1; // X[C] - d[0] = 2; // *[C] - return a[0]; -} - -testIndexedAliasedStore3(f, c, i) { - var a = new List.filled(2, null); - var d = f ? a : c; - a[0] = 1; // X[C] - d[i] = 2; // *[*] - return a[0]; -} - -testIndexedAliasedStore4(i) { - var a = new List.filled(2, null); - a[i] = 1; // X[*] - a[0] = 2; // X[C] - return a[i]; -} - -testIndexedAliasedStore5(i, j) { - var a = new List.filled(2, null); - a[i] = 1; // X[*] - a[j] = 2; // X[*] - return a[i]; -} - -testIndexedAliasedStore6(i, f, c) { - var a = new List.filled(2, null); - var d = f ? a : c; - a[i] = 1; // X[*] - d[0] = 2; // *[C] - return a[i]; -} - -testIndexedAliasedStore7(i, f, c) { - var a = new List.filled(2, null); - var d = f ? a : c; - a[i] = 1; // X[*] - d[i] = 2; // *[*] - return a[i]; -} - -testIndexedAliasedStore8(c, i) { - c[0] = 1; // *[C] - c[i] = 2; // *[*] - return c[0]; -} - -testIndexedAliasedStore9(c, f) { - var a = new List.filled(2, null); - var d = f ? a : c; - c[0] = 1; // *[C] - d[0] = 2; // *[C] - return c[0]; -} - -testIndexedAliasedStore10(c, i) { - c[i] = 1; // *[*] - c[0] = 2; // *[C] - return c[i]; -} - -testIndexedAliasedStore11(c, i, j) { - c[i] = 1; // *[*] - c[j] = 2; // *[*] - return c[i]; -} - -testIndexedAliasedStore12(f, c) { - var a = new List.filled(2, null); - var d = f ? a : c; - d[0] = 1; // *[C] - a[0] = 2; // X[C] - return d[0]; -} - -testIndexedAliasedStore13(f, c, i) { - var a = new List.filled(2, null); - var d = f ? a : c; - d[0] = 1; // *[C] - a[i] = 2; // X[*] - return d[0]; -} - -testIndexedAliasedStore14(f, c, i) { - var a = new List.filled(2, null); - var d = f ? a : c; - d[i] = 1; // *[*] - a[0] = 2; // X[C] - return d[i]; -} - -testIndexedAliasedStore15(f, c, i) { - var a = new List.filled(2, null); - var d = f ? a : c; - d[i] = 1; // *[*] - a[i] = 2; // X[*] - return d[i]; -} - -testIndexedAliasedStores() { - var arr = new List.filled(2, null); - - for (var i = 0; i < 50; i++) { - Expect.equals(2, testIndexedAliasedStore1(0)); - Expect.equals(1, testIndexedAliasedStore1(1)); - } - - for (var i = 0; i < 50; i++) { - Expect.equals(1, testIndexedAliasedStore2(false, arr)); - Expect.equals(2, testIndexedAliasedStore2(true, arr)); - } - - for (var i = 0; i < 50; i++) { - Expect.equals(1, testIndexedAliasedStore3(false, arr, 0)); - Expect.equals(1, testIndexedAliasedStore3(false, arr, 1)); - Expect.equals(2, testIndexedAliasedStore3(true, arr, 0)); - Expect.equals(1, testIndexedAliasedStore3(true, arr, 1)); - } - - for (var i = 0; i < 50; i++) { - Expect.equals(2, testIndexedAliasedStore4(0)); - Expect.equals(1, testIndexedAliasedStore4(1)); - } - - for (var i = 0; i < 50; i++) { - Expect.equals(2, testIndexedAliasedStore5(0, 0)); - Expect.equals(1, testIndexedAliasedStore5(0, 1)); - Expect.equals(1, testIndexedAliasedStore5(1, 0)); - Expect.equals(2, testIndexedAliasedStore5(1, 1)); - } - - for (var i = 0; i < 50; i++) { - Expect.equals(1, testIndexedAliasedStore6(0, false, arr)); - Expect.equals(2, testIndexedAliasedStore6(0, true, arr)); - Expect.equals(1, testIndexedAliasedStore6(1, false, arr)); - Expect.equals(1, testIndexedAliasedStore6(1, true, arr)); - } - - for (var i = 0; i < 50; i++) { - Expect.equals(1, testIndexedAliasedStore7(0, false, arr)); - Expect.equals(2, testIndexedAliasedStore7(0, true, arr)); - Expect.equals(1, testIndexedAliasedStore7(1, false, arr)); - Expect.equals(2, testIndexedAliasedStore7(1, true, arr)); - } - - for (var i = 0; i < 50; i++) { - Expect.equals(2, testIndexedAliasedStore8(arr, 0)); - Expect.equals(1, testIndexedAliasedStore8(arr, 1)); - } - - for (var i = 0; i < 50; i++) { - Expect.equals(2, testIndexedAliasedStore9(arr, false)); - Expect.equals(1, testIndexedAliasedStore9(arr, true)); - } - - for (var i = 0; i < 50; i++) { - Expect.equals(2, testIndexedAliasedStore10(arr, 0)); - Expect.equals(1, testIndexedAliasedStore10(arr, 1)); - } - - for (var i = 0; i < 50; i++) { - Expect.equals(2, testIndexedAliasedStore11(arr, 0, 0)); - Expect.equals(1, testIndexedAliasedStore11(arr, 0, 1)); - Expect.equals(1, testIndexedAliasedStore11(arr, 1, 0)); - Expect.equals(2, testIndexedAliasedStore11(arr, 1, 1)); - } - - for (var i = 0; i < 50; i++) { - Expect.equals(1, testIndexedAliasedStore12(false, arr)); - Expect.equals(2, testIndexedAliasedStore12(true, arr)); - } - - for (var i = 0; i < 50; i++) { - Expect.equals(1, testIndexedAliasedStore13(false, arr, 0)); - Expect.equals(1, testIndexedAliasedStore13(false, arr, 1)); - Expect.equals(2, testIndexedAliasedStore13(true, arr, 0)); - Expect.equals(1, testIndexedAliasedStore13(true, arr, 1)); - } - - for (var i = 0; i < 50; i++) { - Expect.equals(1, testIndexedAliasedStore14(false, arr, 0)); - Expect.equals(1, testIndexedAliasedStore14(false, arr, 1)); - Expect.equals(2, testIndexedAliasedStore14(true, arr, 0)); - Expect.equals(1, testIndexedAliasedStore14(true, arr, 1)); - } - - for (var i = 0; i < 50; i++) { - Expect.equals(1, testIndexedAliasedStore15(false, arr, 0)); - Expect.equals(1, testIndexedAliasedStore15(false, arr, 1)); - Expect.equals(2, testIndexedAliasedStore15(true, arr, 0)); - Expect.equals(2, testIndexedAliasedStore15(true, arr, 1)); - } -} - -var indices = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; - -class Z { - var x = 42; -} - -var global_array = new List.filled(1, null); - -side_effect() { - global_array[0].x++; -} - -testAliasingStoreIndexed(array) { - var z = new Z(); - array[0] = z; - side_effect(); - return z.x; -} - -class ZZ { - var f; -} - -var zz, f0 = 42; - -testAliasesRefinement() { - zz = new ZZ(); - var b = zz; - if (b.f == null) { - b.f = f0; - } - return b.f; -} - -testViewAliasing1() { - final f64 = new Float64List(1); - final f32 = new Float32List.view(f64.buffer); - f64[0] = 1.0; // Should not be forwarded. - f32[1] = 2.0; // upper 32bits for 2.0f and 2.0 are the same - return f64[0]; -} - -testViewAliasing2() { - final f64 = new Float64List(2); - final f64v = new Float64List.view(f64.buffer, Float64List.bytesPerElement); - f64[1] = 1.0; // Should not be forwarded. - f64v[0] = 2.0; - return f64[1]; -} - -testViewAliasing3() { - final u8 = new Uint8List(Float64List.bytesPerElement * 2); - final f64 = new Float64List.view(u8.buffer, Float64List.bytesPerElement); - f64[0] = 1.0; // Should not be forwarded. - u8[15] = 0x40; - u8[14] = 0x00; - return f64[0]; -} - -testViewAliasing4() { - final u8 = new Uint8List(Float64List.bytesPerElement * 2); - final f64 = new Float64List.view(u8.buffer, Float64List.bytesPerElement); - f64[0] = 2.0; // Not aliased: should be forwarded. - u8[0] = 0x40; - u8[1] = 0x00; - return f64[0]; -} - -main() { - final fixed = new List.filled(10, null); - final growable = []; - testImmutableVMFields(fixed, true); - testImmutableVMFields(growable, false); - testImmutableVMFields(growable, false); - - final f64List = new Float64List(2); - testPhiRepresentation(true, f64List); - testPhiRepresentation(false, f64List); - - final obj = new X(new X(new X(null))); - - final cs = new C(0, new C(1, new C(2, null))); - - for (var i = 0; i < 20; i++) { - Expect.listEquals([0x02010000, 0x03020100], foo(new A(0, 0))); - Expect.listEquals([0x02010000, 0x03020100], bar(new A(0, 0), false)); - Expect.listEquals([0x04020000, 0x03020100], bar(new A(0, 0), true)); - testImmutableVMFields(fixed, true); - testPhiRepresentation(true, f64List); - testPhiForwarding(obj); - testPhiForwarding2(obj); - testPhiForwarding3(); - testPhiForwarding4(); - Expect.equals(4, testPhiForwarding5(cs)); - testEqualPhisElimination(); - Expect.equals(f0, testAliasesRefinement()); - } - - Expect.equals(1, testImmutableVMFields([], false)); - Expect.equals(2, testImmutableVMFields([1], false)); - Expect.equals(2, testImmutableVMFields([1, 2], false)); - Expect.equals(3, testImmutableVMFields([1, 2, 3], false)); - - final u32List = new Uint32List(3); - u32List[0] = 0; - u32List[1] = 0x3FFFFFFF; - u32List[2] = 0x7FFFFFFF; - - for (var i = 0; i < 20; i++) { - testPhiConversions(true, u32List); - testPhiConversions(false, u32List); - } - - for (var i = 0; i < 20; i++) { - Expect.equals(0.0, testPhiMultipleRepresentations(true, f64List)); - Expect.equals(0, testPhiMultipleRepresentations(false, const [1, 2])); - } - - final escape = new List.filled(1, null); - for (var i = 0; i < 20; i++) { - fakeAliasing(escape); - } - - final array = new List.filled(3, null); - for (var i = 0; i < 20; i++) { - Expect.equals(3, testIndexedNoAlias(array)); - } - - testIndexedAliasedStores(); - - var test_array = new List.filled(1, null); - for (var i = 0; i < 20; i++) { - Expect.equals(43, testAliasingStoreIndexed(global_array)); - } - - for (var i = 0; i < 20; i++) { - Expect.equals(2.0, testViewAliasing1()); - Expect.equals(2.0, testViewAliasing2()); - Expect.equals(2.0, testViewAliasing3()); - Expect.equals(2.0, testViewAliasing4()); - } -} diff --git a/tests/language_2/vm/load_to_load_unaligned_forwarding_vm_test.dart b/tests/language_2/vm/load_to_load_unaligned_forwarding_vm_test.dart deleted file mode 100644 index e648e949e01..00000000000 --- a/tests/language_2/vm/load_to_load_unaligned_forwarding_vm_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012, 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. -// Test correctness of side effects tracking used by load to load forwarding. -// Should be merged into load_to_load_forwarding once Issue 22151 is fixed. - -// @dart = 2.9 - -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -import "package:expect/expect.dart"; -import "dart:typed_data"; - -testViewAliasing5() { - final f32 = new Float32List(2); - final raw = f32.buffer.asByteData(); - f32[0] = 1.5; // Aliased by unaligned write of the same size. - raw.setInt32(1, 0x00400000, Endian.little); - return f32[0]; -} - -main() { - for (var i = 0; i < 20; i++) { - Expect.equals(2.0, testViewAliasing5()); - } -} diff --git a/tests/language_2/vm/math_vm_test.dart b/tests/language_2/vm/math_vm_test.dart deleted file mode 100644 index 3fc97bcbb38..00000000000 --- a/tests/language_2/vm/math_vm_test.dart +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2012, 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. -// Tests that the VM does not crash on weird corner cases of class Math. -// VMOptions=--optimization_counter_threshold=100 --no-background_compilation - -// @dart = 2.9 - -library math_vm_test; - -import "package:expect/expect.dart"; -import 'dart:math'; - -class FakeNumber { - const FakeNumber(); - void toDouble() {} -} - -class MathTest { - static bool testParseInt(x) { - try { - int.parse(x); // Expects string. - return true; - } catch (e) { - return false; - } - } - - static bool testSqrt(x) { - try { - sqrt(x); // Expects number. - return true; - } catch (e) { - return false; - } - } - - static void testMain() { - Expect.equals(false, testParseInt(5)); - Expect.equals(false, testSqrt(const FakeNumber())); - } -} - -testDoublePow() { - Expect.equals((1 << 32).toDouble(), pow(2.0, 32)); -} - -testSinCos(a) { - double sVal = sin(a); - double cVal = cos(a); - return sVal + cVal; -} - -main() { - const double value = 1.54; - final firstRes = testSinCos(value); - for (int i = 0; i < 200; i++) { - MathTest.testMain(); - testDoublePow(); - testSinCos(value); - } - Expect.equals(firstRes, testSinCos(value)); -} diff --git a/tests/language_2/vm/mixin_test.dart b/tests/language_2/vm/mixin_test.dart deleted file mode 100755 index b68f98a4db5..00000000000 --- a/tests/language_2/vm/mixin_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Illustrates inlining heuristic issue of -// https://github.com/dart-lang/sdk/issues/37126 -// (mixins introduce one extra depth of inlining). - -// VMOptions=--deterministic - -import "package:expect/expect.dart"; - -class X { - const X(); - int foo() { - return 1; - } -} - -mixin YMixin { - int bar() { - return 2; - } -} - -class Y with YMixin { - const Y(); -} - -@pragma("vm:never-inline") -int foobar() { - return new X().foo() + new Y().bar(); -} - -main() { - Expect.equals(3, foobar()); -} diff --git a/tests/language_2/vm/modtruncdiv_int_test.dart b/tests/language_2/vm/modtruncdiv_int_test.dart deleted file mode 100644 index b34ac76e6eb..00000000000 --- a/tests/language_2/vm/modtruncdiv_int_test.dart +++ /dev/null @@ -1,300 +0,0 @@ -// Copyright (c) 2018, 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 - -// VMOptions=--no_background_compilation --optimization_counter_threshold=10 -// VMOptions=--no_background_compilation --optimization_counter_threshold=10 --use_slow_path - -import "package:expect/expect.dart"; - -// Tests for long trunc div and mod under -// 64-bit arithmetic wrap-around semantics. - -final int maxInt32 = 2147483647; -final int minInt32 = -2147483648; -final int maxInt64 = 0x7fffffffffffffff; -final int minInt64 = 0x8000000000000000; - -int mod(int x, int y) { - return x % y; -} - -int truncdiv(int x, int y) { - return x ~/ y; -} - -doModConstants() { - Expect.equals(0, mod(0, 1)); - Expect.equals(0, mod(0, -1)); - Expect.equals(1, mod(1, 2)); - Expect.equals(1, mod(-1, 2)); - Expect.equals(1, mod(1, -2)); - Expect.equals(1, mod(-1, -2)); - Expect.equals(2, mod(8, 3)); - Expect.equals(1, mod(-8, 3)); - Expect.equals(2, mod(8, -3)); - Expect.equals(1, mod(-8, -3)); - Expect.equals(0, mod(6, 3)); - Expect.equals(1, mod(7, 3)); - Expect.equals(2, mod(8, 3)); - Expect.equals(0, mod(9, 3)); - - Expect.equals(1, mod(1, maxInt32)); - Expect.equals(1, mod(1, maxInt64)); - Expect.equals(1, mod(1, minInt32)); - Expect.equals(1, mod(1, minInt64)); - - Expect.equals(maxInt32 - 1, mod(-1, maxInt32)); - Expect.equals(maxInt64 - 1, mod(-1, maxInt64)); - Expect.equals(maxInt32, mod(-1, minInt32)); - Expect.equals(maxInt64, mod(-1, minInt64)); - - Expect.equals(0, mod(minInt32, -1)); - Expect.equals(0, mod(maxInt32, -1)); - Expect.equals(0, mod(minInt64, -1)); - Expect.equals(0, mod(maxInt64, -1)); - - Expect.equals(0, mod(maxInt32, maxInt32)); - Expect.equals(maxInt32, mod(maxInt32, minInt32)); - Expect.equals(maxInt32, mod(maxInt32, maxInt64)); - Expect.equals(maxInt32, mod(maxInt32, minInt64)); - - Expect.equals(maxInt32 - 1, mod(minInt32, maxInt32)); - Expect.equals(0, mod(minInt32, minInt32)); - Expect.equals(9223372034707292159, mod(minInt32, maxInt64)); - Expect.equals(9223372034707292160, mod(minInt32, minInt64)); - - Expect.equals(1, mod(maxInt64, maxInt32)); - Expect.equals(0, mod(maxInt64 - 1, maxInt32)); - Expect.equals(maxInt32 - 1, mod(maxInt64 - 2, maxInt32)); - Expect.equals(maxInt32, mod(maxInt64, minInt32)); - Expect.equals(0, mod(maxInt64, maxInt64)); - Expect.equals(maxInt64, mod(maxInt64, minInt64)); - - Expect.equals(maxInt32 - 2, mod(minInt64, maxInt32)); - Expect.equals(0, mod(minInt64, minInt32)); - Expect.equals(maxInt64 - 1, mod(minInt64, maxInt64)); - Expect.equals(0, mod(minInt64, minInt64)); - - Expect.equals(maxInt32 - 1, mod(maxInt32 - 1, maxInt32)); - Expect.equals(1, mod(maxInt32 + 1, maxInt32)); - Expect.equals(maxInt32 - 2, mod(minInt32 - 1, maxInt32)); - Expect.equals(0, mod(minInt32 + 1, maxInt32)); - - Expect.equals(15, mod(-1, 16)); - Expect.equals(15, mod(-17, 16)); - Expect.equals(15, mod(-1, -16)); - Expect.equals(15, mod(-17, -16)); - Expect.equals(100, mod(100, 1 << 32)); - Expect.equals(100, mod(100, -(1 << 32))); - Expect.equals((1 << 32) - 1, mod((1 << 35) - 1, 1 << 32)); - Expect.equals((1 << 32) - 1, mod((1 << 35) - 1, -(1 << 32))); - Expect.equals(maxInt64, mod(-1, 1 << 63)); - Expect.equals(0, mod(minInt64, 1 << 63)); -} - -doModVarConstant() { - for (int i = -10; i < 10; i++) { - Expect.equals(i & maxInt64, mod(i, minInt64)); - } -} - -doTruncDivConstants() { - Expect.equals(0, truncdiv(0, 1)); - Expect.equals(0, truncdiv(0, -1)); - Expect.equals(0, truncdiv(1, 2)); - Expect.equals(0, truncdiv(-1, 2)); - Expect.equals(0, truncdiv(1, -2)); - Expect.equals(0, truncdiv(-1, -2)); - Expect.equals(2, truncdiv(8, 3)); - Expect.equals(-2, truncdiv(-8, 3)); - Expect.equals(-2, truncdiv(8, -3)); - Expect.equals(2, truncdiv(-8, -3)); - Expect.equals(2, truncdiv(6, 3)); - Expect.equals(2, truncdiv(7, 3)); - Expect.equals(2, truncdiv(8, 3)); - Expect.equals(3, truncdiv(9, 3)); - - Expect.equals(0, truncdiv(1, maxInt32)); - Expect.equals(0, truncdiv(1, maxInt64)); - Expect.equals(0, truncdiv(1, minInt32)); - Expect.equals(0, truncdiv(1, minInt64)); - - Expect.equals(0, truncdiv(-1, maxInt32)); - Expect.equals(0, truncdiv(-1, maxInt64)); - Expect.equals(0, truncdiv(-1, minInt32)); - Expect.equals(0, truncdiv(-1, minInt64)); - - Expect.equals(-minInt32, truncdiv(minInt32, -1)); - Expect.equals(-maxInt32, truncdiv(maxInt32, -1)); - Expect.equals(minInt64, truncdiv(minInt64, -1)); - Expect.equals(-maxInt64, truncdiv(maxInt64, -1)); - - Expect.equals(1, truncdiv(maxInt32, maxInt32)); - Expect.equals(0, truncdiv(maxInt32, minInt32)); - Expect.equals(0, truncdiv(maxInt32, maxInt64)); - Expect.equals(0, truncdiv(maxInt32, minInt64)); - - Expect.equals(-1, truncdiv(minInt32, maxInt32)); - Expect.equals(1, truncdiv(minInt32, minInt32)); - Expect.equals(0, truncdiv(minInt32, maxInt64)); - Expect.equals(0, truncdiv(minInt32, minInt64)); - - Expect.equals(4294967298, truncdiv(maxInt64, maxInt32)); - Expect.equals(4294967298, truncdiv(maxInt64 - 1, maxInt32)); - Expect.equals(4294967297, truncdiv(maxInt64 - 2, maxInt32)); - Expect.equals(-4294967295, truncdiv(maxInt64, minInt32)); - Expect.equals(1, truncdiv(maxInt64, maxInt64)); - Expect.equals(0, truncdiv(maxInt64, minInt64)); - - Expect.equals(-4294967298, truncdiv(minInt64, maxInt32)); - Expect.equals(4294967296, truncdiv(minInt64, minInt32)); - Expect.equals(-1, truncdiv(minInt64, maxInt64)); - Expect.equals(1, truncdiv(minInt64, minInt64)); - - Expect.equals(0, truncdiv(maxInt32 - 1, maxInt32)); - Expect.equals(1, truncdiv(maxInt32 + 1, maxInt32)); - Expect.equals(-1, truncdiv(minInt32 - 1, maxInt32)); - Expect.equals(-1, truncdiv(minInt32 + 1, maxInt32)); -} - -int acc; - -doModVars(int xlo, int xhi, int ylo, int yhi) { - for (int x = xlo; x <= xhi; x++) { - for (int y = ylo; y <= yhi; y++) { - acc += mod(x, y); - } - } -} - -doTruncDivVars(int xlo, int xhi, int ylo, int yhi) { - for (int x = xlo; x <= xhi; x++) { - for (int y = ylo; y <= yhi; y++) { - acc += truncdiv(x, y); - } - } -} - -main() { - // Repeat to enter JIT (when applicable). - for (int i = 0; i < 20; i++) { - // Constants. - - doModConstants(); - doModVarConstant(); - doTruncDivConstants(); - - // Variable ranges. - - acc = 0; - doModVars(3, 5, 2, 6); - Expect.equals(28, acc); - - acc = 0; - doModVars((3 << 32) - 1, (3 << 32) + 1, (3 << 32) - 1, (3 << 32) + 1); - Expect.equals(38654705666, acc); - - acc = 0; - doModVars(minInt32 - 4, minInt32 + 4, -11, -1); - Expect.equals(239, acc); - - acc = 0; - doModVars(minInt32 - 4, minInt32 + 4, 2, 7); - Expect.equals(85, acc); - - acc = 0; - doModVars(minInt32 - 4, minInt32 + 4, minInt32 - 4, minInt32 + 4); - Expect.equals(77309411268, acc); - - acc = 0; - doModVars(minInt32 - 4, minInt32 + 4, maxInt32 - 4, maxInt32 + 4); - Expect.equals(96636763974, acc); - - acc = 0; - doModVars(maxInt32 - 4, maxInt32 + 4, 2, 7); - Expect.equals(104, acc); - - acc = 0; - doModVars(maxInt32 - 4, maxInt32 + 4, minInt32 - 4, minInt32 + 4); - Expect.equals(96636764139, acc); - - acc = 0; - doModVars(maxInt32 - 4, maxInt32 + 4, maxInt32 - 4, maxInt32 + 4); - Expect.equals(77309411352, acc); - - acc = 0; - doTruncDivVars(3, 5, 2, 6); - Expect.equals(11, acc); - - acc = 0; - doTruncDivVars(-5, -3, 2, 6); - Expect.equals(-11, acc); - - acc = 0; - doTruncDivVars(3, 5, -6, -2); - Expect.equals(-11, acc); - - acc = 0; - doTruncDivVars(-5, -3, -6, -2); - Expect.equals(11, acc); - - acc = 0; - doTruncDivVars((3 << 32) - 1, (3 << 32) + 1, 3, 6); - Expect.equals(36721970376, acc); - - acc = 0; - doTruncDivVars(minInt64, minInt64, -1, -1); - Expect.equals(minInt64, acc); - - acc = 0; - doTruncDivVars(minInt32 - 4, minInt32 + 4, -11, -1); - Expect.equals(58366234918, acc); - - acc = 0; - doTruncDivVars(minInt32 - 4, minInt32 + 4, 2, 7); - Expect.equals(-30785711991, acc); - - acc = 0; - doTruncDivVars(minInt32 - 4, minInt32 + 4, minInt32 - 4, minInt32 + 4); - Expect.equals(45, acc); - - acc = 0; - doTruncDivVars(minInt32 - 4, minInt32 + 4, maxInt32 - 4, maxInt32 + 4); - Expect.equals(-53, acc); - - acc = 0; - doTruncDivVars(maxInt32 - 4, maxInt32 + 4, 2, 7); - Expect.equals(30785711975, acc); - - acc = 0; - doTruncDivVars(maxInt32 - 4, maxInt32 + 4, minInt32 - 4, minInt32 + 4); - Expect.equals(-36, acc); - - acc = 0; - doTruncDivVars(maxInt32 - 4, maxInt32 + 4, maxInt32 - 4, maxInt32 + 4); - Expect.equals(45, acc); - - acc = 0; - doTruncDivVars(maxInt32 - 4, maxInt32 + 4, 1, 7); - Expect.equals(50113064798, acc); - - // Exceptions at the right time. - - acc = 0; - try { - doModVars(9, 9, -9, 0); - acc = 0; // don't reach! - } on UnsupportedError catch (e, s) {} - Expect.equals(12, acc); - - acc = 0; - try { - doTruncDivVars(9, 9, -9, 0); - acc = 0; // don't reach! - } on UnsupportedError catch (e, s) {} - Expect.equals(-23, acc); - } -} diff --git a/tests/language_2/vm/mult_int_test.dart b/tests/language_2/vm/mult_int_test.dart deleted file mode 100644 index 83ff1aabf83..00000000000 --- a/tests/language_2/vm/mult_int_test.dart +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) 2018, 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 - -// VMOptions=--no_background_compilation --optimization_counter_threshold=10 -// VMOptions=--no_background_compilation --optimization_counter_threshold=10 --use_slow_path - -import "package:expect/expect.dart"; - -// Tests for long multiplication under -// 64-bit arithmetic wrap-around semantics. - -final int maxInt32 = 2147483647; -final int minInt32 = -2147483648; -final int maxInt64 = 0x7fffffffffffffff; -final int minInt64 = 0x8000000000000000; - -int mul(int x, int y) { - return x * y; -} - -doConstants() { - Expect.equals(0, mul(0, 0)); - Expect.equals(0, mul(0, 7)); - Expect.equals(0, mul(7, 0)); - Expect.equals(1, mul(1, 1)); - Expect.equals(7, mul(1, 7)); - Expect.equals(7, mul(7, 1)); - Expect.equals(21, mul(7, 3)); - Expect.equals(21, mul(3, 7)); - - Expect.equals(21 << 32, mul(3 << 32, 7)); - Expect.equals(21 << 32, mul(3, 7 << 32)); - Expect.equals(0, mul(3 << 32, 7 << 32)); - - Expect.equals(0, mul(0, maxInt32)); - Expect.equals(0, mul(maxInt32, 0)); - Expect.equals(maxInt32, mul(1, maxInt32)); - Expect.equals(maxInt32, mul(maxInt32, 1)); - Expect.equals(maxInt32 + maxInt32, mul(2, maxInt32)); - - Expect.equals(0, mul(0, maxInt64)); - Expect.equals(0, mul(maxInt64, 0)); - Expect.equals(maxInt64, mul(1, maxInt64)); - Expect.equals(maxInt64, mul(maxInt64, 1)); - Expect.equals(-2, mul(2, maxInt64)); - - Expect.equals(0, mul(0, minInt32)); - Expect.equals(0, mul(minInt32, 0)); - Expect.equals(minInt32, mul(1, minInt32)); - Expect.equals(minInt32, mul(minInt32, 1)); - Expect.equals(minInt32 + minInt32, mul(2, minInt32)); - - Expect.equals(0, mul(0, minInt64)); - Expect.equals(0, mul(minInt64, 0)); - Expect.equals(minInt64, mul(1, minInt64)); - Expect.equals(minInt64, mul(minInt64, 1)); - Expect.equals(0, mul(2, minInt64)); - - Expect.equals(4611686014132420609, mul(maxInt32, maxInt32)); - Expect.equals(-4611686016279904256, mul(maxInt32, minInt32)); - Expect.equals(9223372034707292161, mul(maxInt32, maxInt64)); - Expect.equals(minInt64, mul(maxInt32, minInt64)); - - Expect.equals(-4611686016279904256, mul(minInt32, maxInt32)); - Expect.equals(4611686018427387904, mul(minInt32, minInt32)); - Expect.equals(2147483648, mul(minInt32, maxInt64)); - Expect.equals(0, mul(minInt32, minInt64)); - - Expect.equals(9223372034707292161, mul(maxInt64, maxInt32)); - Expect.equals(2147483648, mul(maxInt64, minInt32)); - Expect.equals(1, mul(maxInt64, maxInt64)); - Expect.equals(minInt64, mul(maxInt64, minInt64)); - - Expect.equals(minInt64, mul(minInt64, maxInt32)); - Expect.equals(0, mul(minInt64, minInt32)); - Expect.equals(minInt64, mul(minInt64, maxInt64)); - Expect.equals(0, mul(minInt64, minInt64)); -} - -doVars(int v) { - int e = v; - for (int i = 1; i < 256; i++) { - Expect.equals(e, mul(i, v)); - Expect.equals(e, mul(v, i)); - e += v; - } -} - -main() { - // Repeat tests to enter JIT (when applicable). - for (int i = 0; i < 20; i++) { - doConstants(); - doVars(1); - doVars(maxInt32); - doVars(minInt32); - doVars(7 << 32); - doVars(-(7 << 32)); - doVars(maxInt64); - doVars(minInt64); - } -} diff --git a/tests/language_2/vm/negate_int_test.dart b/tests/language_2/vm/negate_int_test.dart deleted file mode 100644 index 9ba3d9bf6d6..00000000000 --- a/tests/language_2/vm/negate_int_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2018, 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 - -// VMOptions=--no_background_compilation --optimization_counter_threshold=10 -// VMOptions=--no_background_compilation --optimization_counter_threshold=10 --use_slow_path - -import "package:expect/expect.dart"; - -// Tests for long negations under -// 64-bit arithmetic wrap-around semantics. - -final int maxInt32 = 2147483647; -final int minInt32 = -2147483648; -final int maxInt64 = 0x7fffffffffffffff; -final int minInt64 = 0x8000000000000000; - -int negate(int x) { - return -x; -} - -doConstant() { - Expect.equals(1, negate(-1)); - Expect.equals(0, negate(0)); - Expect.equals(-1, negate(1)); - - Expect.equals(-maxInt32, negate(maxInt32)); - Expect.equals(-minInt32, negate(minInt32)); - Expect.equals(-maxInt64, negate(maxInt64)); - Expect.equals(minInt64, negate(minInt64)); // sic! -} - -doVar() { - int d = 0; - for (int i = -88; i < 10; i++) { - d += negate(i); - } - Expect.equals(3871, d); -} - -main() { - // Repeat tests to enter JIT (when applicable). - for (int i = 0; i < 20; i++) { - doConstant(); - doVar(); - } -} diff --git a/tests/language_2/vm/no_such_args_error_message_vm_test.dart b/tests/language_2/vm/no_such_args_error_message_vm_test.dart deleted file mode 100644 index 4242f8fe4e3..00000000000 --- a/tests/language_2/vm/no_such_args_error_message_vm_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2017, 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. -// VMOptions=--optimization-counter-threshold=100 --no-use-osr --no-background-compilation -// VMOptions=--optimization-counter-threshold=100 --no-use-osr --no-background-compilation --no-lazy-dispatchers - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test error message with misusing Functions and Closures: wrong args -// should result in a message that reports the missing method. - -call_with_bar(x) => x("bar"); - -testClosureMessage() { - try { - call_with_bar(() {}); - } catch (e) { - // The latter may happen if in --dwarf-stack-traces mode. - final possibleNames = ['testClosureMessage', '']; - Expect.containsOneOf( - possibleNames.map((s) => s + '.("bar")'), - e.toString()); - } -} - -noargs() {} - -testFunctionMessage() { - try { - call_with_bar(noargs); - } catch (e) { - final expectedStrings = [ - 'Tried calling: noargs("bar")', - ]; - Expect.stringContainsInOrder(e.toString(), expectedStrings); - } -} - -main() { - for (var i = 0; i < 120; i++) testClosureMessage(); - for (var i = 0; i < 120; i++) testFunctionMessage(); -} diff --git a/tests/language_2/vm/no_such_method_error_message_callable_vm_test.dart b/tests/language_2/vm/no_such_method_error_message_callable_vm_test.dart deleted file mode 100644 index a0723f76534..00000000000 --- a/tests/language_2/vm/no_such_method_error_message_callable_vm_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2017, 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. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test error message with noSuchMethodError: nonexistent names -// should result in a message that reports the missing method. - -class Callable { - call() {} -} - -call_bar(x) => x.bar(); -call_with_bar(x) => x("bar"); - -testMessageProp() { - try { - call_bar(new Callable()); - } catch (e) { - Expect.isTrue(e.toString().contains("has no instance method 'bar'")); - } -} - -testMessageCall() { - try { - call_with_bar(new Callable()); - } catch (e) { - Expect.isTrue(e.toString().contains("has no instance method 'call'")); - } -} - -main() { - for (var i = 0; i < 20; i++) testMessageProp(); - for (var i = 0; i < 20; i++) testMessageCall(); -} diff --git a/tests/language_2/vm/no_such_method_error_message_vm_test.dart b/tests/language_2/vm/no_such_method_error_message_vm_test.dart deleted file mode 100644 index 498628074dc..00000000000 --- a/tests/language_2/vm/no_such_method_error_message_vm_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2013, 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. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test error message with noSuchMethodError: nonexistent names -// should result in a message that reports the missing method. - -call_bar(x) => x.bar(); - -testMessage() { - try { - call_bar(5); - } catch (e) { - Expect.isTrue(e.toString().contains("has no instance method 'bar'")); - } -} - -main() { - for (var i = 0; i < 20; i++) testMessage(); -} diff --git a/tests/language_2/vm/null_hashcode_optimized_vm_test.dart b/tests/language_2/vm/null_hashcode_optimized_vm_test.dart deleted file mode 100644 index bb2d0c71b67..00000000000 --- a/tests/language_2/vm/null_hashcode_optimized_vm_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2013, 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. -// Test that optimized Object.hashCode works for the null receiver. -// VMOptions=--optimization_counter_threshold=10 --no-background_compilation - -// @dart = 2.9 - -main() { - for (int i = 0; i < 20; i++) { - foo(null); - } -} - -foo(a) => a.hashCode; diff --git a/tests/language_2/vm/optimization_test.dart b/tests/language_2/vm/optimization_test.dart deleted file mode 100644 index 293a8209ad6..00000000000 --- a/tests/language_2/vm/optimization_test.dart +++ /dev/null @@ -1,102 +0,0 @@ -// 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. -// Test various optimizations and deoptimizations of optimizing compiler.. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -addThem(a, b) { - return a + b; -} - -isItInt(a) { - return a is int; -} - -doNeg(a) { - return -a; -} - -doNeg2(a) { - return -a; -} - -doNot(a) { - return !a; -} - -doBitNot(a) { - return ~a; -} - -doStore1(a, v) { - a[1] = v; -} - -doStore2(a, v) { - a[2] = v; -} - -class StringPlus { - const StringPlus(String this._val); - operator +(right) => new StringPlus("${_val}${right}"); - toString() => _val; - - final String _val; -} - -main() { - for (int i = 0; i < 20; i++) { - Expect.stringEquals("HI 5", addThem(const StringPlus("HI "), 5).toString()); - Expect.equals(true, isItInt(5)); - } - Expect.equals(8, addThem(3, 5)); - for (int i = 0; i < 20; i++) { - Expect.stringEquals("HI 5", addThem(const StringPlus("HI "), 5).toString()); - Expect.equals(8, addThem(3, 5)); - } - for (int i = -10; i < 10; i++) { - var r = doNeg(i); - var p = doNeg(r); - Expect.equals(i, p); - } - var maxSmi = (1 << 30) - 1; - Expect.equals(maxSmi, doNeg(doNeg(maxSmi))); - // Deoptimize because of overflow. - var minInt = -(1 << 30); - Expect.equals(minInt, doNeg(doNeg(minInt))); - - for (int i = 0; i < 20; i++) { - Expect.equals(false, doNot(true)); - Expect.equals(true, doNot(doNot(true))); - } - for (int i = 0; i < 20; i++) { - Expect.equals(-57, doBitNot(56)); - Expect.equals(55, doBitNot(-56)); - } - - for (int i = 0; i < 20; i++) { - Expect.equals(-2.2, doNeg2(2.2)); - } - // Deoptimize. - Expect.equals(-5, doNeg2(5)); - - var fixed = new List.filled(10, null); - var growable = [1, 2, 3, 4, 5]; - - for (int i = 0; i < 20; i++) { - doStore1(fixed, 7); - Expect.equals(7, fixed[1]); - doStore2(growable, 12); - Expect.equals(12, growable[2]); - } - - // Deoptimize. - doStore1(growable, 8); - Expect.equals(8, growable[1]); - doStore2(fixed, 101); - Expect.equals(101, fixed[2]); -} diff --git a/tests/language_2/vm/optimized_await_regress_test.dart b/tests/language_2/vm/optimized_await_regress_test.dart deleted file mode 100644 index 9980578585a..00000000000 --- a/tests/language_2/vm/optimized_await_regress_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2014, 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 - -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// This tests that captured parameters (by the async-closure) are -// correctly treated in try-catch generated in the async function. -// They must be skipped when generating sync-code in the optimized -// try-block. - -import 'package:expect/expect.dart'; - -import 'dart:async'; - -fail() { - try { - Expect.isTrue(false); - } finally {} -} - -foo(i) async { - var k = await 77; - var a = "abc${k}"; - if (a != "abc77") fail(); - return k; -} - -main() { - for (int i = 0; i < 20; i++) { - foo(i).then((value) => Expect.equals(77, value)); - } -} diff --git a/tests/language_2/vm/optimized_check_class_test.dart b/tests/language_2/vm/optimized_check_class_test.dart deleted file mode 100644 index 61f1b8fc19b..00000000000 --- a/tests/language_2/vm/optimized_check_class_test.dart +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2015, 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. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test dense class-id checks. Regression test for issue 22104. - -class A { - toString() => "an A"; -} - -class A1 extends A {} - -class A2 extends A {} - -class A3 extends A {} - -class A4 extends A { - toString() => "ha"; -} - -class A5 extends A {} - -class A6 extends A {} - -class A7 extends A {} - -class A8 extends A {} - -class A9 extends A {} - -class A10 extends A {} - -class A11 extends A {} - -class A12 extends A {} - -class A13 extends A {} - -class A14 extends A {} - -class A15 extends A {} - -class A16 extends A {} - -class A17 extends A {} - -class A18 extends A {} - -class A19 extends A {} - -class A20 extends A {} - -class A21 extends A {} - -class A22 extends A {} - -class A23 extends A {} - -class A24 extends A {} - -class A25 extends A {} - -class A26 extends A {} - -class A27 extends A {} - -class A28 extends A {} - -class A29 extends A {} - -class A30 extends A {} - -class A31 extends A {} - -class A32 extends A {} - -class A33 extends A {} - -class A34 extends A {} - -class A35 extends A {} - -class A36 extends A {} - -test_class_check(e) => e.toString(); - -main() { - var list = [new A1(), new A2(), new A11(), new A36()]; - for (var i = 0; i < list.length; i++) { - test_class_check(list[i]); - } - for (var i = 0; i < 100; i++) { - Expect.equals("an A", test_class_check(new A1())); - } - Expect.equals("ha", test_class_check(new A4())); -} diff --git a/tests/language_2/vm/optimized_guarded_field_isolates_test.dart b/tests/language_2/vm/optimized_guarded_field_isolates_test.dart deleted file mode 100644 index ed022372861..00000000000 --- a/tests/language_2/vm/optimized_guarded_field_isolates_test.dart +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2013, 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 - -// VMOptions=--optimization_counter_threshold=100 --no-background_compilation - -// Test field type tracking and field list-length tracking in the presence of -// multiple isolates. - -import "dart:isolate"; -import "dart:async"; -import "package:expect/expect.dart"; -import 'package:async_helper/async_helper.dart'; - -class A { - A(this.a); - var a; -} - -class B extends A { - B(a, this.b) : super(a) {} - - var b; -} - -f1(Object send_port) { - (send_port as SendPort).send(new B("foo", "bar")); -} - -test_b(B obj) => obj.a + obj.b; - -test_field_type() { - var receive_port = new ReceivePort(); - asyncStart(); - Future isolate = Isolate.spawn(f1, receive_port.sendPort); - B b = new B(1, 2); - for (var i = 0; i < 200; i++) { - test_b(b); - } - Expect.equals(3, test_b(b)); - Future item = receive_port.first; - item.then((value) { - Expect.equals("foobar", test_b(value as B)); - receive_port.close(); - asyncEnd(); - }); -} - -class C { - C(this.list); - final List list; -} - -f2(Object send_port) { - (send_port as SendPort).send(new C(new List.filled(1, null))); -} - -test_c(C obj) => obj.list[9999]; - -test_list_length() { - var receive_port = new ReceivePort(); - asyncStart(); - Future isolate = Isolate.spawn(f2, receive_port.sendPort); - C c = new C(new List.filled(10000, null)); - for (var i = 0; i < 200; i++) { - test_c(c); - } - Expect.equals(null, test_c(c)); - Future item = receive_port.first; - item.then((value) { - Expect.throwsRangeError(() => test_c(value as C)); - receive_port.close(); - asyncEnd(); - }); -} - -main() { - test_field_type(); - test_list_length(); -} diff --git a/tests/language_2/vm/optimized_guarded_field_test.dart b/tests/language_2/vm/optimized_guarded_field_test.dart deleted file mode 100644 index 4f9d733312e..00000000000 --- a/tests/language_2/vm/optimized_guarded_field_test.dart +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) 2013, 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. -// Test correct handling of phis with only environment uses that were inserted -// by store to load forwarding. -// VMOptions=--optimization_counter_threshold=10 --no-background_compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; -import "dart:typed_data"; - -class A { - var foo; -} - -class B { - get foo => null; -} - -test(obj) => obj.foo == null ? "null" : "other"; - -class C { - C(this.x, this.y); - final x; - final y; -} - -test_deopt(a, b) { - var c = new C(a, b); - return c.x + c.y; -} - -create_error(x) { - return x as int; -} - -check_stacktrace(e) { - var s = e.stackTrace; - if (identical(s, null)) throw "FAIL"; - // s should never be null. - return "OK"; -} - -test_stacktrace() { - try { - create_error("bar"); - } catch (e) { - Expect.equals("OK", check_stacktrace(e)); - for (var i = 0; i < 20; i++) { - check_stacktrace(e); - } - Expect.equals("OK", check_stacktrace(e)); - } -} - -class D { - final List f; - final Uint8List g; - D(this.f, this.g); - D.named(this.f, this.g); -} - -test_guarded_length() { - var a = new D(new List.filled(5, null), new Uint8List(5)); - var b = new D.named(new List.filled(5, null), new Uint8List(5)); - Expect.equals(5, a.f.length); - Expect.equals(5, b.f.length); - Expect.equals(5, a.g.length); - Expect.equals(5, b.g.length); -} - -main() { - var a = new A(); - var b = new B(); - // Trigger optimization of test with a polymorphic load. - // The guarded type of foo is null. - test(a); - test(b); - for (var i = 0; i < 20; ++i) test(a); - Expect.equals("null", test(a)); - Expect.equals("null", test(b)); - - // Store a non-null object into foo to trigger deoptimization of test. - a.foo = 123; - Expect.equals("other", test(a)); - Expect.equals("null", test(b)); - - // Test guarded fields with allocation sinking and deoptimization. - Expect.equals(43, test_deopt(42, 1)); - for (var i = 0; i < 20; i++) { - test_deopt(42, 1); - } - Expect.equals(43, test_deopt(42, 1)); - Expect.equals("aaabbb", test_deopt("aaa", "bbb")); - - // Regression test for fields initialized in native code (Error._stackTrace). - test_stacktrace(); - - // Test guarded list length. - for (var i = 0; i < 20; i++) test_guarded_length(); -} diff --git a/tests/language_2/vm/optimized_identical_test.dart b/tests/language_2/vm/optimized_identical_test.dart deleted file mode 100644 index 3de4723a0f5..00000000000 --- a/tests/language_2/vm/optimized_identical_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2013, 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. -// Test various optimizations and deoptimizations of optimizing compiler.. -// VMOptions=--optimization-counter-threshold=10 --no-constant-propagation --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test canonicalization of identical with double input. -// Constant propagation is disabled so that canonicalization is run -// one time less than usual. - -test(a) { - var dbl = a + 1.0; - if (!identical(dbl, true)) { - return "ok"; - } - throw "fail"; -} - -Object Y = 1.0; - -test_object_type(x) => identical(x, Y); - -main() { - for (var i = 0; i < 20; i++) test(0); - Expect.equals("ok", test(0)); - - var x = 0.0 + 1.0; - for (var i = 0; i < 20; i++) test_object_type(x); - Expect.equals(true, test_object_type(x)); -} diff --git a/tests/language_2/vm/optimized_list_constructor_test.dart b/tests/language_2/vm/optimized_list_constructor_test.dart deleted file mode 100644 index 89cfea15fa9..00000000000 --- a/tests/language_2/vm/optimized_list_constructor_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2016, 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. -// Test various optimizations and deoptimizations of optimizing compiler.. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test correct throwing of ArgumentError in optimized code. - -test() { - try { - var r = new List.filled(-1, null); - Expect.isTrue(false); // Unreachable. - } on RangeError { - return true; - } - Expect.isTrue(false); // Unreachable. -} - -main() { - for (var i = 0; i < 20; i++) { - Expect.isTrue(test()); - } -} diff --git a/tests/language_2/vm/optimized_polymorphic_list_access_test.dart b/tests/language_2/vm/optimized_polymorphic_list_access_test.dart deleted file mode 100644 index 1137d4eb441..00000000000 --- a/tests/language_2/vm/optimized_polymorphic_list_access_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2013, 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. -// VMOptions=--optimization_counter_threshold=10 --no-background_compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test correct polymorphic inlining of recognized methods like list access. - -test(arr) { - var r = 0; - for (var i = 0; i < 1; ++i) { - r += arr[0]; - } - return r; -} - -main() { - var a = new List.filled(1, null); - a[0] = 0; - var b = [0]; - Expect.equals(0, test(a)); - Expect.equals(0, test(b)); - for (var i = 0; i < 20; ++i) test(a); - Expect.equals(0, test(a)); - Expect.equals(0, test(b)); -} diff --git a/tests/language_2/vm/optimized_shl_test.dart b/tests/language_2/vm/optimized_shl_test.dart deleted file mode 100644 index db1014ed7ea..00000000000 --- a/tests/language_2/vm/optimized_shl_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2014, 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. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test truncating left-shift that can deoptimize. -// Regression test for issue 19330. - -test_shl(w, x) { - x += 1; - return w << x & 0xff; -} - -main() { - for (var i = 0; i < 20; i++) test_shl(i, i % 10); - Expect.equals(4, test_shl(1, 1)); -} diff --git a/tests/language_2/vm/optimized_stacktrace_test.dart b/tests/language_2/vm/optimized_stacktrace_test.dart deleted file mode 100644 index 6fd02e66e44..00000000000 --- a/tests/language_2/vm/optimized_stacktrace_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2015, 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. -// VMOptions=--stacktrace-every=3 --optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -// Test generating stacktraces with inlining and deferred code. -// Regression test for issue dartbug.com/22331 - -class A { - final N; - final inc; - var next; - A(this.N, this.inc) { - next = this; - } -} - -foo(o, value) { - for (var i = 0; i < o.N; i += o.inc) { - if (value < i) { - throw ""; - } - o = o.next; - } - return value; -} - -@pragma('vm:never-inline') -baz(x, y, z) => z; - -bar(o) { - var value = 0x100000000 + o.inc; - baz(0, 0, foo(o, value)); -} - -main() { - var o = new A(10, 1); - for (var i = 0; i < 100; i++) bar(o); - bar(new A(100000, 1)); -} diff --git a/tests/language_2/vm/optimized_testsmi_test.dart b/tests/language_2/vm/optimized_testsmi_test.dart deleted file mode 100644 index 124afc8eeca..00000000000 --- a/tests/language_2/vm/optimized_testsmi_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2013, 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. -// VMOptions=--optimization_counter_threshold=10 --no-background_compilation - -// @dart = 2.9 - -// Test branch optimization for TestSmiInstr - -import "package:expect/expect.dart"; - -test1(a, bool b) { - if (b) { - a++; - } else { - a += 2; - } - if (a & 1 == 0) { - return "even"; - } - return "odd"; -} - -test2(a, bool b) { - if (b) { - a++; - } else { - a += 2; - } - if (a & 1 == 1) { - return "odd"; - } - return "even"; -} - -test3(a, bool b) { - return test1(0, b); -} - -test4(a, bool b) { - return test2(0, b); -} - -run(test) { - Expect.equals("odd", test(0, true)); - Expect.equals("even", test(0, false)); - for (var i = 0; i < 20; i++) test(0, false); - Expect.equals("odd", test(0, true)); - Expect.equals("even", test(0, false)); -} - -main() { - run(test1); - run(test2); - run(test3); - run(test4); -} diff --git a/tests/language_2/vm/optimized_try_catch_cha_test.dart b/tests/language_2/vm/optimized_try_catch_cha_test.dart deleted file mode 100644 index 8cbbc791fff..00000000000 --- a/tests/language_2/vm/optimized_try_catch_cha_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2016, 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. -// VMOptions=--optimization_counter_threshold=100 --no-use-osr --no-background_compilation - -// @dart = 2.9 - -// Test CHA-based optimizations in presence of try-catch. - -import "package:expect/expect.dart"; - -bar(i) { - if (i == 11) throw 123; -} - -class A { - var f = 42; - - foo(i) { - do { - try { - bar(i); - } catch (e, s) { - Expect.equals(123, e); - } - } while (i < 0); - return f; - } -} - -class B extends A {} - -main() { - var result; - for (var i = 0; i < 200; i++) { - try { - result = new B().foo(i); - } catch (e) {} - } - Expect.equals(42, result); -} diff --git a/tests/language_2/vm/optimized_unique_selector_test.dart b/tests/language_2/vm/optimized_unique_selector_test.dart deleted file mode 100644 index e40f27ffd77..00000000000 --- a/tests/language_2/vm/optimized_unique_selector_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; - -class A { - _uniqueSelector() {} - final uniqueField = 10; -} - -test1(obj) { - var res = 0; - for (var i = 0; i < 2; i++) { - obj._uniqueSelector(); - res += obj.uniqueField; // This load must not be hoisted out of the loop. - } - return res; -} - -test2(obj) { - final objAlias = obj; - closure() => objAlias; - var res = 0; - for (var i = 0; i < 2; i++) { - obj._uniqueSelector(); - res += - objAlias.uniqueField; // This load must not be hoisted out of the loop. - } - return res; -} - -var foofoo_ = test1; - -main() { - Expect.equals(20, foofoo_(new A())); - Expect.throws(() => foofoo_(0)); - - foofoo_ = test2; - - Expect.equals(20, foofoo_(new A())); - Expect.throws(() => foofoo_(0)); -} diff --git a/tests/language_2/vm/osr_nonempty_stack_test.dart b/tests/language_2/vm/osr_nonempty_stack_test.dart deleted file mode 100644 index 9f1407675a9..00000000000 --- a/tests/language_2/vm/osr_nonempty_stack_test.dart +++ /dev/null @@ -1,151 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Test with OSR on non-empty stack (block expression). - -import 'dart:core'; -import "package:expect/expect.dart"; - -class Z { - @pragma('vm:never-inline') - check(int a, int b, String c, List d) { - Expect.equals(a, 42); - Expect.equals(b, global_bazz); - Expect.equals(c, 'abc'); - return d; - } -} - -Z z = new Z(); -int global_bazz = 123; -int global_more_bazz = 456; - -@pragma('vm:never-inline') -int bazz() { - return ++global_bazz; -} - -@pragma('vm:never-inline') -int more_bazz() { - return ++global_more_bazz; -} - -@pragma('vm:never-inline') -int bar(int i) { - return i - 1; -} - -@pragma('vm:never-inline') -List spread(int v, List x) { - return [v, ...x]; -} - -// Long running control-flow collection (block expression), -// leaves the stack non-empty during a potential OSR. -@pragma('vm:never-inline') -List test1(int n) { - return spread(more_bazz(), [for (int i = 0; i < n; i++) i]); -} - -// Long running control-flow collection (block expression) inside outer -// loop, leaves the stack non-empty during a potential OSR. -List test2(int n) { - List x = []; - for (int k = 0; k < 10; k++) { - x += spread(more_bazz(), [for (int i = 0; i < n; i++) i]); - } - return x; -} - -// Long running control-flow collection (block expression) inside two -// outer loops, leaves the stack non-empty during a potential OSR. -List test3(int n) { - List x = []; - for (int k = 0; k < 4; k++) { - for (int j = 0; j < 4; j++) { - x += spread(more_bazz(), [for (int i = 0; i < n; i++) i]); - } - } - return x; -} - -// Long running control-flow collection (block expression), -// leaves the stack non-empty during a potential OSR. -@pragma('vm:never-inline') -List test4(int n) { - var x = [10] + - z.check(42, bazz(), 'abc', - [more_bazz(), for (int i = 0; i < n; i++) bar(2 * i)]); - return x; -} - -// Long running control-flow collection (block expression) inside outer -// loop, also leaves the stack non-empty during a potential OSR. -@pragma('vm:never-inline') -List test5(int m, int n) { - List x = []; - for (int k = 0; k < m; k++) { - x += [10] + - z.check(42, bazz(), 'abc', - [more_bazz(), for (int i = 0; i < n; i++) bar(2 * i)]); - } - return x; -} - -List globalList = [ - 1, - for (int loc1 = 2; loc1 <= 100000; loc1++) loc1, - 100001 -]; - -main() { - int n = 20000; - int g = 457; - - var a = test1(n); - Expect.equals(a.length, n + 1); - for (int k = 0; k < n + 1; k++) { - int expect = (k == 0) ? g++ : k - 1; - Expect.equals(a[k], expect); - } - - var b = test2(n); - Expect.equals(b.length, 10 * (n + 1)); - for (int i = 0, k = 0; i < 10 * (n + 1); i++) { - int expect = (k == 0) ? g++ : k - 1; - Expect.equals(b[i], expect); - if (++k == (n + 1)) k = 0; - } - - var c = test3(n); - Expect.equals(c.length, 16 * (n + 1)); - for (int i = 0, k = 0; i < 16 * (n + 1); i++) { - int expect = (k == 0) ? g++ : k - 1; - Expect.equals(c[i], expect); - if (++k == (n + 1)) k = 0; - } - - var d = test4(n); - Expect.equals(d.length, n + 2); - for (int k = 0; k < n + 2; k++) { - int expect = k <= 1 ? ((k == 0) ? 10 : g++) : -5 + 2 * k; - Expect.equals(d[k], expect); - } - - var e = test5(10, n); - Expect.equals(e.length, 10 * (n + 2)); - for (int i = 0, k = 0; i < 10 * (n + 2); i++) { - int expect = k <= 1 ? ((k == 0) ? 10 : g++) : -5 + 2 * k; - Expect.equals(e[i], expect); - if (++k == (n + 2)) k = 0; - } - - Expect.isTrue(globalList != null); - Expect.equals(100001, globalList.length); - for (int i = 0; i < globalList.length; i++) { - Expect.equals(globalList[i], i + 1); - } -} diff --git a/tests/language_2/vm/plus_null_37719_test.dart b/tests/language_2/vm/plus_null_37719_test.dart deleted file mode 100755 index 68f845f3101..00000000000 --- a/tests/language_2/vm/plus_null_37719_test.dart +++ /dev/null @@ -1,59 +0,0 @@ -// 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. - -// @dart = 2.9 - -// VMOptions=--deterministic - -import "package:expect/expect.dart"; - -@pragma("vm:never-inline") -foo(List x) => x[1] + x[0]; - -@pragma("vm:never-inline") -bar(List x) => 1 + x[0]; - -@pragma("vm:never-inline") -baz(List x) => x[0] + 2; - -main() { - var x = new List.filled(2, null); - - // Only first is null. - x[0] = null; - x[1] = 123; - try { - foo(x); - } on NoSuchMethodError catch (e) { - ; - } - try { - bar(x); - } on NoSuchMethodError catch (e) { - ; - } - try { - baz(x); - } on NoSuchMethodError catch (e) { - ; - } - - // Only second is null. - x[0] = 456; - x[1] = null; - try { - foo(x); - } on NoSuchMethodError catch (e) { - ; - } - Expect.equals(457, bar(x)); - Expect.equals(458, baz(x)); - - // Neither is null. - x[0] = 789; - x[1] = -1; - Expect.equals(788, foo(x)); - Expect.equals(790, bar(x)); - Expect.equals(791, baz(x)); -} diff --git a/tests/language_2/vm/power_int_test.dart b/tests/language_2/vm/power_int_test.dart deleted file mode 100644 index bc3fcc9ecca..00000000000 --- a/tests/language_2/vm/power_int_test.dart +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; -import 'dart:math'; - -final int maxInt32 = 2147483647; -final int minInt32 = -2147483648; - -doZeros() { - Expect.equals(1, pow(0, 0)); - Expect.equals(0, pow(0, 1)); - Expect.equals(0, pow(0, 2)); - Expect.equals(0, pow(0, 3)); - Expect.equals(0, pow(0, 4)); - Expect.equals(0, pow(0, 5)); - Expect.equals(0, pow(0, 45)); - Expect.equals(0, pow(0, maxInt32 - 1)); - Expect.equals(0, pow(0, maxInt32)); - - Expect.equals(double.infinity, pow(0, -1)); - Expect.equals(double.infinity, pow(0, -2)); - Expect.equals(double.infinity, pow(0, minInt32)); -} - -doOnes() { - Expect.equals(1, pow(1, 0)); - Expect.equals(1, pow(1, 1)); - Expect.equals(1, pow(1, 2)); - Expect.equals(1, pow(1, 3)); - Expect.equals(1, pow(1, 4)); - Expect.equals(1, pow(1, 5)); - Expect.equals(1, pow(1, 45)); - Expect.equals(1, pow(1, maxInt32 - 1)); - Expect.equals(1, pow(1, maxInt32)); - - Expect.equals(1.0, pow(1, -1)); - Expect.equals(1.0, pow(1, -2)); - Expect.equals(1.0, pow(1, minInt32)); -} - -doMinOnes() { - Expect.equals(1, pow(-1, 0)); - Expect.equals(-1, pow(-1, 1)); - Expect.equals(1, pow(-1, 2)); - Expect.equals(-1, pow(-1, 3)); - Expect.equals(1, pow(-1, 4)); - Expect.equals(-1, pow(-1, 5)); - Expect.equals(-1, pow(-1, 45)); - Expect.equals(1, pow(-1, maxInt32 - 1)); - Expect.equals(-1, pow(-1, maxInt32)); - - Expect.equals(-1.0, pow(-1, -1)); - Expect.equals(1.0, pow(-1, -2)); - Expect.equals(1.0, pow(-1, minInt32)); -} - -doTwos() { - Expect.equals(1, pow(2, 0)); - Expect.equals(2, pow(2, 1)); - Expect.equals(4, pow(2, 2)); - Expect.equals(8, pow(2, 3)); - Expect.equals(16, pow(2, 4)); - Expect.equals(32, pow(2, 5)); - Expect.equals(32768, pow(2, 15)); - Expect.equals(65536, pow(2, 16)); - Expect.equals(35184372088832, pow(2, 45)); - Expect.equals(0, pow(2, maxInt32 - 1)); - Expect.equals(0, pow(2, maxInt32)); - - Expect.equals(0.5, pow(2, -1)); - Expect.equals(0.25, pow(2, -2)); - Expect.equals(0.0, pow(2, minInt32)); -} - -doMinTwos() { - Expect.equals(1, pow(-2, 0)); - Expect.equals(-2, pow(-2, 1)); - Expect.equals(4, pow(-2, 2)); - Expect.equals(-8, pow(-2, 3)); - Expect.equals(16, pow(-2, 4)); - Expect.equals(-32, pow(-2, 5)); - Expect.equals(-32768, pow(-2, 15)); - Expect.equals(65536, pow(-2, 16)); - Expect.equals(-35184372088832, pow(-2, 45)); - Expect.equals(0, pow(-2, maxInt32 - 1)); - Expect.equals(0, pow(-2, maxInt32)); - - Expect.equals(-0.5, pow(-2, -1)); - Expect.equals(0.25, pow(-2, -2)); - Expect.equals(0.0, pow(-2, minInt32)); -} - -doVar0() { - int d = 0; - for (int i = -10; i < 10; i++) { - d += pow(i, 0); - } - Expect.equals(20, d); -} - -doVar1() { - int d = 0; - for (int i = -10; i < 10; i++) { - d += pow(i, 1); - } - Expect.equals(-10, d); -} - -doVar2() { - int d = 0; - for (int i = -10; i < 10; i++) { - d += pow(i, 2); - } - Expect.equals(670, d); -} - -doVar3() { - int d = 0; - for (int i = -10; i < 10; i++) { - d += pow(i, 3); - } - Expect.equals(-1000, d); -} - -doVar4() { - int d = 0; - for (int i = -10; i < 10; i++) { - d += pow(i, 4); - } - Expect.equals(40666, d); -} - -doVar5() { - int d = 0; - for (int i = -10; i < 10; i++) { - d += pow(i, 5); - } - Expect.equals(-100000, d); -} - -doVarMax() { - int d = 0; - for (int i = -5; i < 10; i++) { - d += pow(i, maxInt32); - } - Expect.equals(1786231423019973616, d); -} - -doVarZeroes() { - int d = 0; - for (int i = 0; i < 10; i++) { - d += pow(0, i); - } - Expect.equals(1, d); -} - -doVarOnes() { - int d = 0; - for (int i = 0; i < 10; i++) { - d += pow(1, i); - } - Expect.equals(10, d); -} - -doVarTwos() { - int d = 0; - for (int i = 0; i < 10; i++) { - d += pow(2, i); - } - Expect.equals(1023, d); -} - -main() { - doZeros(); - doOnes(); - doMinOnes(); - doTwos(); - doMinTwos(); - doVar0(); - doVar1(); - doVar2(); - doVar3(); - doVar4(); - doVar5(); - doVarMax(); - doVarZeroes(); - doVarOnes(); - doVarTwos(); -} diff --git a/tests/language_2/vm/precompiled_static_initializer_test.dart b/tests/language_2/vm/precompiled_static_initializer_test.dart deleted file mode 100644 index 0bbac2720f0..00000000000 --- a/tests/language_2/vm/precompiled_static_initializer_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2013, 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. -// Test optimizations with static fields with precompilation. -// VMOptions=--inlining-hotness=0 - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -init() => 123; - -final a = init(); - -main() { - var s = 0; - for (var i = 0; i < 10; i++) { - s += a; - } - Expect.equals(10 * 123, s); -} diff --git a/tests/language_2/vm/reflect_core_vm_test.dart b/tests/language_2/vm/reflect_core_vm_test.dart deleted file mode 100644 index 16dc279d585..00000000000 --- a/tests/language_2/vm/reflect_core_vm_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test reflection of private functions in core classes. - -import "package:expect/expect.dart"; -import "dart:mirrors"; - -main() { - var s = "string"; - var im = reflect(s); - Expect.throwsNoSuchMethodError(() => - im.invoke(MirrorSystem.getSymbol("_setAt", im.type.owner), [0, 65])); -} diff --git a/tests/language_2/vm/regress_14903_test.dart b/tests/language_2/vm/regress_14903_test.dart deleted file mode 100644 index 342fb23c100..00000000000 --- a/tests/language_2/vm/regress_14903_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2013, 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. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -// Test identical comparisons in optimized code. Registers must be preserved -// when calling the runtime. - -cmp(a, b, c) { - var v = c + 1; - var w = v + 1; - var x = w + 1; - var y = x + 1; - var z = y + 1; - if (identical(a, b)) { - c++; - } - return c + v + w + x + y + z; -} - -main() { - var str = "abc"; - var before = cmp(str, str, 0); - Expect.equals(16, before); - for (var i = 0; i < 20; i++) cmp(str, str, 0); - Expect.equals(before, cmp(str, str, 0)); -} diff --git a/tests/language_2/vm/regress_16873_test.dart b/tests/language_2/vm/regress_16873_test.dart deleted file mode 100644 index 7a6fd546d1a..00000000000 --- a/tests/language_2/vm/regress_16873_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2013, 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. -// VMOptions=--new_gen_semi_max_size=1 --no_inline_alloc - -// @dart = 2.9 - -// Regression test for slow-path allocation in the allocation stub. - -library map_test; - -import 'dart:collection'; - -void testCollection(var collection, n) { - for (int i = 0; i < n; i++) { - if (i % 1000 == 0) print(i); - collection.add(i); - } -} - -main() { - const int N = 100000; - testCollection(new LinkedHashSet(), N); -} diff --git a/tests/language_2/vm/regress_21245_test.dart b/tests/language_2/vm/regress_21245_test.dart deleted file mode 100644 index a2e4d55db10..00000000000 --- a/tests/language_2/vm/regress_21245_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2014, 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. -// VMOptions=--optimization_counter_threshold=10 --no-use-osr --no-background_compilation - -// @dart = 2.9 - -test(a) { - var e; - for (var i = 0; i < a.length; i++) { - e = a[i]; - for (var j = 0; j < i; j++) { - e = a[j]; - } - } - return e; -} - -main() { - var a = [0, 1, 2, 3, 4, 5]; - for (var i = 0; i < 20; i++) { - test(a); - } -} diff --git a/tests/language_2/vm/regress_22480_test.dart b/tests/language_2/vm/regress_22480_test.dart deleted file mode 100644 index ba5e2689017..00000000000 --- a/tests/language_2/vm/regress_22480_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2014, 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. -// VMOptions=--optimization_counter_threshold=10 --no-background_compilation - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -test(j) { - var result = true; - j++; - for (var i = 0; i < 100; i++) { - result = (i < 50 || j < (1 << 32)) && result; - } - return result; -} - -main() { - Expect.isTrue(test(30)); -} diff --git a/tests/language_2/vm/regress_22541_vm_test.dart b/tests/language_2/vm/regress_22541_vm_test.dart deleted file mode 100644 index 671a15fa2d0..00000000000 --- a/tests/language_2/vm/regress_22541_vm_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2015, 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. -// Test range inference for multiplication of two negative values. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -test(a) { - var x = a ? -1 : -2; - if (0 < (x * x)) { - return "ok"; - } else { - return "fail"; - } -} - -main() { - for (var j = 0; j < 20; j++) { - Expect.equals("ok", test(false)); - } -} diff --git a/tests/language_2/vm/regress_22621_vm_test.dart b/tests/language_2/vm/regress_22621_vm_test.dart deleted file mode 100644 index 38017503eaa..00000000000 --- a/tests/language_2/vm/regress_22621_vm_test.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2015, 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. -// Test that BoxAllocationSlowPath for Mint emits stackmap in unoptimized code. -// VMOptions=--inline_alloc=false - -// @dart = 2.9 - -main() { - var re = new RegExp(r"IsolateStubs (.*)"); - return re.firstMatch("oooo"); -} diff --git a/tests/language_2/vm/regress_22693_vm_test.dart b/tests/language_2/vm/regress_22693_vm_test.dart deleted file mode 100644 index 74a5b6bfc3e..00000000000 --- a/tests/language_2/vm/regress_22693_vm_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2015, 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. -// Test location summary for Uint32 multiplication. -// VMOptions=--optimization-counter-threshold=10 --no-use-osr --no-background-compilation - -// @dart = 2.9 - -const MASK = 0xFFFFFFFF; - -uint32Mul(x, y) => (x * y) & MASK; - -main() { - for (var i = 0; i < 20; i++) uint32Mul((1 << 63) - 1, 1); -} diff --git a/tests/language_2/vm/regress_23117_vm_test.dart b/tests/language_2/vm/regress_23117_vm_test.dart deleted file mode 100644 index 255c12cdd1b..00000000000 --- a/tests/language_2/vm/regress_23117_vm_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2015, 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. -// Test location summary for Uint32 multiplication. -// VMOptions=--optimization-counter-threshold=20 --no-background-compilation - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -mintLeftShift(x, y) => x << y; -mintRightShift(x, y) => x >> y; - -main() { - for (var i = 0; i < 25; i++) { - var x = 1 + (1 << (i + 32)); - Expect.equals(x, mintLeftShift(x, 0)); - Expect.equals(x, mintRightShift(x, 0)); - Expect.equals(2 * x, mintLeftShift(x, 1)); - Expect.equals(x ~/ 2, mintRightShift(x, 1)); - Expect.equals((i >= 16) ? 1 : x, mintRightShift(mintLeftShift(x, i), i)); - } -} diff --git a/tests/language_2/vm/regress_23238_test.dart b/tests/language_2/vm/regress_23238_test.dart deleted file mode 100644 index d11494f76ef..00000000000 --- a/tests/language_2/vm/regress_23238_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2015, 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 - -import "package:expect/expect.dart"; - -void main() { - int x = 327680; - int r = 65536; - for (var i = 0; i < 200; i++) { - Expect.equals(r, x ~/ 5); - x *= 10; - r *= 10; - - if (x < 0) { - // Overflow. - break; - } - } -} diff --git a/tests/language_2/vm/regress_24517_test.dart b/tests/language_2/vm/regress_24517_test.dart deleted file mode 100644 index c9e4dea0139..00000000000 --- a/tests/language_2/vm/regress_24517_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2015, 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 - -// VMOptions=--no-intrinsify - -// Test that math runtime function (non-intrinsified) produce the expected -// result and don't deviate due to double-rounding when using 80-bit FP ops. - -import "dart:math"; -import "package:expect/expect.dart"; - -main() { - var x = 2.028240960366921e+31; - Expect.equals(4503599627372443.0, sqrt(x)); -} diff --git a/tests/language_2/vm/regress_27671_other.dart b/tests/language_2/vm/regress_27671_other.dart deleted file mode 100644 index e21d7423851..00000000000 --- a/tests/language_2/vm/regress_27671_other.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'regress_27671_test.dart'; - -@pragma('vm:prefer-inline') -void check(f, x) { - assert(f(x) && true); -} diff --git a/tests/language_2/vm/regress_27671_test.dart b/tests/language_2/vm/regress_27671_test.dart deleted file mode 100644 index 9ec25191dc0..00000000000 --- a/tests/language_2/vm/regress_27671_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2016, 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. -// -// VMOptions=--enable_asserts --optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import 'package:expect/expect.dart'; -import 'regress_27671_other.dart'; - -@pragma('vm:prefer-inline') -bounce(x) { - for (int i = 0; i < 10; i++) { - check(f, x); - } -} - -@pragma('vm:prefer-inline') -bool f(y) => y > 0; - -main() { - for (int i = 0; i < 100; i++) { - bounce(1); - } - try { - bounce(-1); - } catch (e) { - Expect.isTrue(e.toString().contains('f(x) && true')); - } -} diff --git a/tests/language_2/vm/regress_29137_vm_test.dart b/tests/language_2/vm/regress_29137_vm_test.dart deleted file mode 100644 index 55293d4da19..00000000000 --- a/tests/language_2/vm/regress_29137_vm_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2017, 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. -// -// Check that optimizer correctly handles (x << y) & MASK_32 pattern on 32-bit -// platforms: given the pattern -// -// v1 <- UnboxedIntConverter([tr] mint->uint32, v0) -// v2 <- UnboxedIntConverter(uint32->mint, v1) -// -// optimizer must *not* replace v2 with v0 because the first conversion is -// truncating and is erasing the high part of the mint value. -// -// VMOptions=--optimization-counter-threshold=90 --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -const _MASK_32 = 0xffffffff; -int _rotl32(int val, int shift) { - final mod_shift = shift & 31; - return ((val << mod_shift) & _MASK_32) | - ((val & _MASK_32) >> (32 - mod_shift)); -} - -rot8(v) => _rotl32(v, 8); - -main() { - // Note: value is selected in such a way that (value << 8) is not a smi - this - // triggers emission of BinaryMintOp instructions for shifts. - const value = 0xF0F00000; - const rotated = 0xF00000F0; - Expect.equals(rotated, rot8(value)); - for (var i = 0; i < 100; i++) { - Expect.equals(rotated, rot8(value)); - } -} diff --git a/tests/language_2/vm/regress_29145_test.dart b/tests/language_2/vm/regress_29145_test.dart deleted file mode 100644 index d182b41e058..00000000000 --- a/tests/language_2/vm/regress_29145_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2017, 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. -// VMOptions=--optimization-counter-threshold=-1 --stacktrace-filter=completeError --stress-async-stacks - -// @dart = 2.9 - -// Stress test for async stack traces. - -import 'dart:async'; -import "package:expect/expect.dart"; - -class A { - Future> read() => new Future.error(123); -} - -Future haha() => new Future.microtask(() => new A()); - -Future> mm() async => (await haha()).read(); - -foo() async => await mm(); - -main() async { - var x; - try { - x = await foo(); - } catch (e) { - Expect.equals(123, e); - return; - } - Expect.isTrue(false); -} diff --git a/tests/language_2/vm/regress_31946_test.dart b/tests/language_2/vm/regress_31946_test.dart deleted file mode 100644 index 3c9692cbd38..00000000000 --- a/tests/language_2/vm/regress_31946_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2018, 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 - -// VMOptions=--no_background_compilation --optimization_counter_threshold=10 - -import 'dart:async'; - -import 'package:expect/expect.dart'; - -var root = []; -var tests = [ - () async {}, - () async { - await new Future.value(); - root.singleWhere((f) => f.name == 'optimizedFunction'); - }, -]; - -main(args) async { - for (int i = 0; i < 100; ++i) { - int exceptions = 0; - for (final test in tests) { - try { - await test(); - } on StateError { - exceptions++; - } - } - Expect.isTrue(exceptions == 1); - } -} diff --git a/tests/language_2/vm/regress_32204_test.dart b/tests/language_2/vm/regress_32204_test.dart deleted file mode 100644 index 25746612e16..00000000000 --- a/tests/language_2/vm/regress_32204_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2018, 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 - -// Verify that local functions capture `this` if their arguments refer to -// type parameters from the enclosing class. - -import "package:expect/expect.dart"; - -typedef void B(T v); - -class MyFisk {} - -class MyHest {} - -class A { - var value; - - A(B x) { - // This function does not capture `this` explicitly, however it needs - // to capture it in order to access T. Verify that we do it correctly. - // If `this` is not captured then foo turns into (B) -> Null - // which means that foo(x) would throw if T != dynamic. - f(B v) {} - - f(x); - } - - foo(B x, B y) { - // This function does not capture `this` explicitly, verify that it still - // can access `T`. - f(B v, B y) {} - - f(x, y); - } -} - -void main() { - new A((MyFisk v) {}); - new A((MyFisk v) {}).foo((MyFisk v) {}, (MyHest v) {}); -} diff --git a/tests/language_2/vm/regress_32322_test.dart b/tests/language_2/vm/regress_32322_test.dart deleted file mode 100644 index 3312d0bede2..00000000000 --- a/tests/language_2/vm/regress_32322_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2018, 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 - -// Verify that optimizing compiler does not perform an illegal code motion -// past CheckNull instruction. - -import "package:expect/expect.dart"; - -class C { - final String padding = ""; - final String field = "1"; // Note: need padding to hit an object header - // of the next object after [null] object when - // doing illegal null.field read. Need to hit - // object header to cause crash. -} - -int foofoo(C p) { - int sum = 0; - for (var i = 0; i < 10; i++) { - // Note: need redundant instructions in the loop to trigger Canonicalize - // after CSE. Canonicalize then would illegally remove the Redefinition. - sum += p.field.length; - sum += p.field.length; - } - return sum; -} - -void main() { - Expect.equals(20, foofoo(new C())); - Expect.throwsNoSuchMethodError(() => foofoo(null)); -} diff --git a/tests/language_2/vm/regress_32502_test.dart b/tests/language_2/vm/regress_32502_test.dart deleted file mode 100644 index b3433085958..00000000000 --- a/tests/language_2/vm/regress_32502_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2018, 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 - -// Verify that VM does not omit type checks from closure prologues. - -import "package:expect/expect.dart"; - -void invoke(dynamic f, dynamic arg) { - f(arg); -} - -void main() { - dynamic x = 42; - - foo(int v) { - x = v; - } - - bar() { - return (T v) { - x = v; - }; - } - - Expect.throwsTypeError(() => invoke(foo, "hello")); - Expect.throwsTypeError(() => invoke(bar(), "hello")); - Expect.equals(42, x); -} diff --git a/tests/language_2/vm/regress_32971_test.dart b/tests/language_2/vm/regress_32971_test.dart deleted file mode 100644 index f335e6d6a7c..00000000000 --- a/tests/language_2/vm/regress_32971_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test verifying that default switch cast is cloned correctly by the -// mixin transformation. - -import "package:expect/expect.dart"; - -void main() { - final o = new A(); - Expect.isTrue(o.f()); - Expect.isTrue(o.g()); -} - -class A extends B with M {} - -class B { - bool f() { - switch (true) { - default: - return true; - } - return false; - } -} - -class M { - bool g() { - switch (true) { - default: - return true; - } - return false; - } -} diff --git a/tests/language_2/vm/regress_33025_test.dart b/tests/language_2/vm/regress_33025_test.dart deleted file mode 100644 index 52161b3a325..00000000000 --- a/tests/language_2/vm/regress_33025_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2018, 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 - -// Verify that VM correctly handles function type arguments across -// yield points. - -import "package:expect/expect.dart"; - -void main() { - doStuff(); -} - -doStuff() async { - Expect.equals(String, T); - await null; - Expect.equals(String, T); -} diff --git a/tests/language_2/vm/regress_33040_instantiation_test.dart b/tests/language_2/vm/regress_33040_instantiation_test.dart deleted file mode 100644 index 0789b18ceec..00000000000 --- a/tests/language_2/vm/regress_33040_instantiation_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2018, 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. -// -// Exact regression test for issue #33040. - -// @dart = 2.9 - -import 'dart:async'; - -class Optional {} - -typedef T ConvertFunction(); - -T blockingLatest() { - return null; -} - -abstract class ObservableModel {} - -abstract class AsyncValueMixin { - Future get asyncValue { - ConvertFunction f = blockingLatest; - if (f is! ConvertFunction) throw "error"; - return null; - } -} - -abstract class OptionalSettableObservableModel - extends ObservableModel> with AsyncValueMixin> {} - -class FooObservableModel extends OptionalSettableObservableModel {} - -Future main() async { - var model = new FooObservableModel(); - await model.asyncValue; -} diff --git a/tests/language_2/vm/regress_33040_test.dart b/tests/language_2/vm/regress_33040_test.dart deleted file mode 100644 index bcd86a98440..00000000000 --- a/tests/language_2/vm/regress_33040_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2018, 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 - -// Verify that prefix sharing optimization is taken into account when -// concatenating type arguments vectors. - -import "package:expect/expect.dart"; - -class C0 {} - -class C1 {} - -class C2 {} - -class C3 {} - -class Wrong {} - -void bar() { - void baz() { - Expect.equals(C0, T0); - Expect.equals(C1, T1); - Expect.equals(C2, T2); - Expect.equals(C3, T3); - } - - baz(); -} - -class A { - void foo() { - bar(); - } -} - -void main() { - new A().foo(); -} diff --git a/tests/language_2/vm/regress_33073_test.dart b/tests/language_2/vm/regress_33073_test.dart deleted file mode 100644 index fd79ad8e9d6..00000000000 --- a/tests/language_2/vm/regress_33073_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2018, 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 - -// Verify that the correct number of type arguments is observed in the -// Invocation object for invocations that pass all-dynamic type arguments. - -import "package:expect/expect.dart"; - -class C { - dynamic noSuchMethod(Invocation invoke) { - Expect.equals(1, invoke.typeArguments.length); - } -} - -void main() { - ((new C()) as dynamic).foo(); -} diff --git a/tests/language_2/vm/regress_33095_test.dart b/tests/language_2/vm/regress_33095_test.dart deleted file mode 100644 index 05459305a23..00000000000 --- a/tests/language_2/vm/regress_33095_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -typedef String IntFunctionType(int _); - -class Box { - final IntFunctionType fun; - const Box(this.fun); -} - -String genericFunction(T v) => '$v'; - -void main() { - const list = const [const Box(genericFunction)]; - Expect.equals('42', list.first.fun(42)); -} diff --git a/tests/language_2/vm/regress_33469_test.dart b/tests/language_2/vm/regress_33469_test.dart deleted file mode 100644 index a85fcf4e4ce..00000000000 --- a/tests/language_2/vm/regress_33469_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2018, 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 - -class X { - final x; - const X(this.x); -} - -void main() { - print(const X(1 << -1).x); //# 01: compile-time error - print(const X(1 >> -1).x); //# 02: compile-time error - print(const X(1 % 0).x); //# 03: compile-time error - print(const X(1 ~/ 0).x); //# 04: compile-time error -} diff --git a/tests/language_2/vm/regress_33794_test.dart b/tests/language_2/vm/regress_33794_test.dart deleted file mode 100644 index c98cfa98808..00000000000 --- a/tests/language_2/vm/regress_33794_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2018, 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 - -// Verify that sub-expressions with side-effects are handled correctly -// in the presence of exceptions or deoptimization. - -import "package:expect/expect.dart"; - -int var1 = -35; - -main() { - try { - var1 = (((~(var1)) ^ (++var1)) >> (++var1)); - } catch (e) { - Expect.equals('Invalid argument(s): -33', e.toString()); - } finally { - Expect.equals(-33, var1); - } -} diff --git a/tests/language_2/vm/regress_34051_test.dart b/tests/language_2/vm/regress_34051_test.dart deleted file mode 100644 index 2b6d3e39843..00000000000 --- a/tests/language_2/vm/regress_34051_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2018, 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 - -import "package:expect/expect.dart"; - -main() { - // This is a regression test for http://dartbug.com/34051. - - // Warm-up the subtype cache with a "(int) -> int" closure. - Expect.isTrue(fooClosure(partialInst(gen))); - - // Test that the generic "(T) -> T" closure raises a type error. - Expect.throwsTypeError(() => fooClosure(gen)); -} - -FI partialInst(FI arg) => arg; - -T gen(T a) => a; - -final dynamic fooClosure = foo; -bool foo(FI arg) => arg is FI; - -typedef FI = int Function(int); diff --git a/tests/language_2/vm/regress_34288_test.dart b/tests/language_2/vm/regress_34288_test.dart deleted file mode 100644 index dd41e72ac57..00000000000 --- a/tests/language_2/vm/regress_34288_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test canonicalization of integer shift operations. -// This is a regression test for dartbug.com/34288. - -// VMOptions=--no_background_compilation --optimization_counter_threshold=10 - -import "package:expect/expect.dart"; - -int _shl_63(int x) => x << 63; -int _shl_64(int x) => x << 64; -int _shl_65(int x) => x << 65; -int _shl_m1(int x) => x << -1; - -int _shr_63(int x) => x >> 63; -int _shr_64(int x) => x >> 64; -int _shr_65(int x) => x >> 65; -int _shr_m1(int x) => x >> -1; - -// Non-constant values. -int one = 1; -int minusOne = -1; - -doTests() { - Expect.equals(0x8000000000000000, _shl_63(one)); - Expect.equals(0x8000000000000000, _shl_63(minusOne)); - Expect.equals(0, _shl_64(one)); - Expect.equals(0, _shl_64(minusOne)); - Expect.equals(0, _shl_65(one)); - Expect.equals(0, _shl_65(minusOne)); - - Expect.throws(() { - _shl_m1(one); - }); - - Expect.equals(0, _shr_63(one)); - Expect.equals(-1, _shr_63(minusOne)); - Expect.equals(0, _shr_64(one)); - Expect.equals(-1, _shr_64(minusOne)); - Expect.equals(0, _shr_65(one)); - Expect.equals(-1, _shr_65(minusOne)); - - Expect.throws(() { - _shr_m1(one); - }); -} - -void main() { - for (int i = 0; i < 20; ++i) { - doTests(); - } -} diff --git a/tests/language_2/vm/regress_34396_helper.dart b/tests/language_2/vm/regress_34396_helper.dart deleted file mode 100644 index b3f19bc60b8..00000000000 --- a/tests/language_2/vm/regress_34396_helper.dart +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) 2018, 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 regress_34396_helper; - -get privateSymbol => #_privateSymbol; -get privateSymbolSame => #_privateSymbol; diff --git a/tests/language_2/vm/regress_34396_test.dart b/tests/language_2/vm/regress_34396_test.dart deleted file mode 100644 index 53acc84ae45..00000000000 --- a/tests/language_2/vm/regress_34396_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'package:expect/expect.dart'; - -import 'regress_34396_helper.dart' as helper; - -main() { - Expect.isFalse(#_privateSymbol == helper.privateSymbol); - Expect.isFalse(#_privateSymbol == helper.privateSymbolSame); - Expect.isFalse(identical(#_privateSymbol, helper.privateSymbol)); - Expect.isFalse(identical(#_privateSymbol, helper.privateSymbolSame)); - - Expect.isTrue(helper.privateSymbol == helper.privateSymbolSame); - Expect.isTrue(identical(helper.privateSymbol, helper.privateSymbolSame)); -} diff --git a/tests/language_2/vm/regress_34435_test.dart b/tests/language_2/vm/regress_34435_test.dart deleted file mode 100644 index fc7eedbf0ab..00000000000 --- a/tests/language_2/vm/regress_34435_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2018, 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 - -// VMOptions=--optimization-filter=triggerBug --no-background-compilation --optimization-counter-threshold=2 - -@pragma('vm:never-inline') -dynamic triggerGC() { - var a = []; - for (int i = 0; i < 100; ++i) { - a.add([]); - } - return a; -} - -@pragma('vm:never-inline') -void fillLowerStackWithReturnAddresses() { - recursive(20); -} - -@pragma('vm:never-inline') -dynamic recursive(dynamic n) { - if (n > 0) { - recursive(n - 1); - } - return 0x0deadbef; -} - -class Box { - @pragma('vm:never-inline') - Box get value => global; -} - -Box global; - -main() { - bool isTrue = true; - bool hasProblem = true; - - @pragma('vm:never-inline') - void triggerBug(Box box) { - triggerGC(); - - Box element = box.value; - if (isTrue) { - hasProblem = true; - return; - } - try { - Map map = {}; - } finally {} - } - - final st = new Box(); - for (int i = 0; i < 1000; ++i) { - fillLowerStackWithReturnAddresses(); - triggerBug(st); - } -} diff --git a/tests/language_2/vm/regress_34466_test.dart b/tests/language_2/vm/regress_34466_test.dart deleted file mode 100644 index c88b3605eca..00000000000 --- a/tests/language_2/vm/regress_34466_test.dart +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test NaN comparison (dartbug.com/34466 and dartbug.com/34467). - -// VMOptions=--no_background_compilation --optimization_counter_threshold=10 - -import "package:expect/expect.dart"; - -double dvar = double.nan; - -int doit() { - if (!(((-84).toDouble() <= double.nan))) { - return 1; - } else { - return 2; - } -} - -doTests() { - Expect.isFalse(dvar > dvar); - Expect.isFalse(dvar < dvar); - Expect.isFalse(dvar <= dvar); - Expect.isFalse(dvar >= dvar); - Expect.isFalse(dvar > -dvar); - Expect.isFalse(-dvar > dvar); - - Expect.isTrue(!(dvar > dvar)); - Expect.isTrue(!(dvar < dvar)); - Expect.isTrue(!(dvar <= dvar)); - Expect.isTrue(!(dvar >= dvar)); - Expect.isTrue(!(dvar > -dvar)); - Expect.isTrue(!(-dvar > dvar)); - - Expect.equals(1, doit()); - - Expect.isFalse(dvar == dvar); - Expect.isFalse(dvar == -dvar); - Expect.isTrue(dvar != dvar); - Expect.isTrue(dvar != -dvar); - - Expect.isTrue(!(dvar == dvar)); - Expect.isTrue(!(dvar == -dvar)); - Expect.isFalse(!(dvar != dvar)); - Expect.isFalse(!(dvar != -dvar)); -} - -void main() { - for (int i = 0; i < 20; ++i) { - doTests(); - } -} diff --git a/tests/language_2/vm/regress_34644_test.dart b/tests/language_2/vm/regress_34644_test.dart deleted file mode 100644 index f01ae2ba63f..00000000000 --- a/tests/language_2/vm/regress_34644_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2018, 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 - -// This test verifies that annotations on parameters are correctly handled -// in the tree shaker. -// Regression test for https://github.com/dart-lang/sdk/issues/34644. - -class ClassUsedInAnnotation1 { - const ClassUsedInAnnotation1(); -} - -class ClassUsedInAnnotation2 { - const ClassUsedInAnnotation2(); -} - -abstract class B { - void foo(@ClassUsedInAnnotation1() String param); -} - -class C implements B { - void foo(String param) {} -} - -typedef void Foo(@ClassUsedInAnnotation2() String param); - -B x = new C(); - -void main() { - x.foo("hi"); - - Foo y = x.foo; - y("hello"); -} diff --git a/tests/language_2/vm/regress_34684_test.dart b/tests/language_2/vm/regress_34684_test.dart deleted file mode 100644 index 7ea37b91dea..00000000000 --- a/tests/language_2/vm/regress_34684_test.dart +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2018, 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 - -// No LICM on array bounds check (dartbug.com/34684). -// -// VMOptions=--deterministic --optimization_counter_threshold=10 - -import "package:expect/expect.dart"; - -List foo(int n, int k) { - var l = new List.filled(1, null); - var j = n - 1; - for (var i = 0; i < k; i++) { - l[j] = 10; // do not hoist - } - return l; -} - -int x = -1; - -List bar(int n, int k) { - x = -1; - var l = new List.filled(n, null); - for (var i = 0; i < k; i++) { - x = i; - l[4] = 10; // do not hoist - } - return l; -} - -void main() { - List l; - - for (int i = 0; i < 20; ++i) { - l = foo(1, 0); - Expect.equals(1, l.length); - Expect.equals(null, l[0]); - - l = foo(2, 0); - Expect.equals(1, l.length); - Expect.equals(null, l[0]); - - l = foo(i, 0); - Expect.equals(1, l.length); - Expect.equals(null, l[0]); - - l = foo(1, 1); - Expect.equals(1, l.length); - Expect.equals(10, l[0]); - - l = foo(1, i + 1); - Expect.equals(1, l.length); - Expect.equals(10, l[0]); - - try { - l = foo(-i, 1); - } catch (_) { - l = null; - } - Expect.equals(null, l); - - l = bar(5, 0); - Expect.equals(5, l.length); - Expect.equals(null, l[4]); - Expect.equals(-1, x); - - l = bar(5, i + 1); - Expect.equals(5, l.length); - Expect.equals(10, l[4]); - Expect.equals(i, x); - - try { - l = bar(1, i + 1); - } catch (_) { - l = null; - } - Expect.equals(null, l); - Expect.equals(0, x); - } -} diff --git a/tests/language_2/vm/regress_35321_test.dart b/tests/language_2/vm/regress_35321_test.dart deleted file mode 100644 index bc8194b5281..00000000000 --- a/tests/language_2/vm/regress_35321_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2018, 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 - -// Proper CP on double op (dartbug.com/35321). -// -// VMOptions=--deterministic --optimization_counter_threshold=10 - -import "package:expect/expect.dart"; - -double foo(bool x) { - if (x) return 1.0; -} - -int bar(int i) { - if (i < 0) { - return bar(i + 1); - } else if ((foo(i == 22) / 22.0) >= (1 / 0.0)) { - return 1; - } - return 0; -} - -void main() { - for (int i = 0; i < 20; ++i) { - var x = -1; - try { - x = bar(i); - } catch (_) { - x = -2; - } - Expect.equals(-2, x); - } -} diff --git a/tests/language_2/vm/regress_35325_test.dart b/tests/language_2/vm/regress_35325_test.dart deleted file mode 100644 index c479a238a64..00000000000 --- a/tests/language_2/vm/regress_35325_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2018, 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 - -// Proper nullable comparison (dartbug.com/35325). -// -// VMOptions=--deterministic --optimization_counter_threshold=10 - -import "package:expect/expect.dart"; - -bool var1; -int var2; - -bar(List par1, double par2) { - if (par2 == 123.0) return 456.0; - // fall into return null -} - -bool foo(double par1) { - return (bar( - [81, 17], - ((!(var1)) - ? double.maxFinite - : (var1 ? (80).floorToDouble() : par1))) == - (((~(var2))).roundToDouble()).sign); -} - -void main() { - for (int i = 0; i < 20; ++i) { - var1 = true; - var2 = 4; - var x = foo(0.0); - Expect.isFalse(x); - Expect.isTrue(var1); - Expect.equals(4, var2); - } -} diff --git a/tests/language_2/vm/regress_36589_test.dart b/tests/language_2/vm/regress_36589_test.dart deleted file mode 100644 index 84fff574720..00000000000 --- a/tests/language_2/vm/regress_36589_test.dart +++ /dev/null @@ -1,71 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Non-smi constant indices for load and store indexed (dartbug.com/36589). -// -// VMOptions=--deterministic --optimization_counter_threshold=5 - -import "package:expect/expect.dart"; - -List mX = new List.filled(1, null); - -@pragma('vm:never-inline') -int foo() { - return mX[8589934591]; -} - -@pragma('vm:never-inline') -foo_store() { - mX[8589934591] = 0; -} - -@pragma('vm:never-inline') -int bar() { - List x = new List.filled(1, null); - return x[8589934591]; -} - -@pragma('vm:never-inline') -bar_store() { - List x = new List.filled(1, null); - x[8589934591] = 0; -} - -main() { - int i = 0; - for (int j = 0; j < 10; j++) { - try { - i = foo(); - } catch (e, s) { - i++; - } - } - Expect.equals(10, i); - for (int j = 0; j < 10; j++) { - try { - foo_store(); - } catch (e, s) { - i++; - } - } - Expect.equals(20, i); - for (int j = 0; j < 10; j++) { - try { - i = bar(); - } catch (e, s) { - i++; - } - } - Expect.equals(30, i); - for (int j = 0; j < 10; j++) { - try { - bar_store(); - } catch (e, s) { - i++; - } - } - Expect.equals(40, i); -} diff --git a/tests/language_2/vm/regress_36681_test.dart b/tests/language_2/vm/regress_36681_test.dart deleted file mode 100644 index a61c70520a4..00000000000 --- a/tests/language_2/vm/regress_36681_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Enforce proper S-overlapping register for temp (dartbug.com/36681). -// -// VMOptions=--deterministic --optimization_counter_threshold=5 - -import "package:expect/expect.dart"; - -double v = 0; - -@pragma('vm:never-inline') -int foo(int a, int p, int q) { - double p1 = 0; - double p2 = 0; - double p3 = 0; - double p4 = 0; - double p5 = 0; - double p6 = 0; - double p7 = 0; - double p8 = 0; - for (int z = 0; z < 8; z++) { - a += (p ~/ q); - a += (p % q); - p += 3; - q += 2; - p1 += 1; - p2 += 2; - p3 += 3; - p4 += 4; - p5 += 1; - p6 += 2; - p7 += 3; - p8 += 4; - } - v = p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8; - return a; -} - -main() { - for (int j = 0; j < 10; j++) { - int i = foo(1, 1, 1); - Expect.equals(37, i); - Expect.equals(160, v); - } -} diff --git a/tests/language_2/vm/regress_36778_test.dart b/tests/language_2/vm/regress_36778_test.dart deleted file mode 100644 index 2c860d5ef4d..00000000000 --- a/tests/language_2/vm/regress_36778_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Check for length overflow when eliminating write barriers for variable-length -// objects. -// -// VMOptions=--deterministic --optimization_counter_threshold=5 --optimization_level=3 - -import "package:expect/expect.dart"; - -List foo(int a) { - if (a >= 100) { - return List.filled(2305843009213693951, 1); - } - return null; -} - -main() { - for (int i = 0; i < 100; i++) { - List x = foo(i); - Expect.equals(null, x); - } -} diff --git a/tests/language_2/vm/regress_36803_test.dart b/tests/language_2/vm/regress_36803_test.dart deleted file mode 100755 index 50b0dcbc81a..00000000000 --- a/tests/language_2/vm/regress_36803_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Don't LICM AOT's generic bounds check reference beyond other exception. -// (dartbug.com/36803). -// -// VMOptions=--deterministic --optimization_level=3 - -import "package:expect/expect.dart"; - -String var1 = 'Hdi\u{1f600}T'; - -@pragma('vm:never-inline') -int foo() { - List a = [1, 2, 3, 4]; - int x = 0; - do { - Uri.decodeQueryComponent(var1); - x = x + a[1000]; - } while (x < 1); - return x; -} - -main() { - int x = 0; - try { - x = foo(); - } on RangeError catch (e) { - x = -2; - } on ArgumentError catch (e) { - x = -1; - } - Expect.equals(-1, x); -} diff --git a/tests/language_2/vm/regress_36977_test.dart b/tests/language_2/vm/regress_36977_test.dart deleted file mode 100755 index 0beca90eb81..00000000000 --- a/tests/language_2/vm/regress_36977_test.dart +++ /dev/null @@ -1,475 +0,0 @@ -// 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. -// -// VMOptions=--deterministic -// -// Regression test, reduced case found by DartFuzz that crashed DBC register -// allocator (https://github.com/dart-lang/sdk/issues/36977). - -// @dart = 2.9 - -// [NNBD non-migrated]: This test contains dozens and dozens of static errors -// under NNBD. Migrating the test to fix those errors significantly changes the -// code under test in ways that are likely to invalidate it. - -import 'dart:async'; -import 'dart:cli'; -import 'dart:collection'; -import 'dart:convert'; -import 'dart:core'; -import 'dart:io'; -import 'dart:isolate'; -import 'dart:math'; -import 'dart:typed_data'; - -double var0 = 0.9297828201722298; -bool var1 = false; -int var2 = -99; -double var3 = 0.26752130449990763; -String var4 = 'OJG'; -List var5 = [0, -92, 49, 96]; -Set var6 = {29, 9223372036854775807, 75}; -Map var7 = { - 56: '\u{1f600}D', - 35: '62', - 13: '', - 14: '5k1\u{1f600}\u{1f600}' -}; - -double foo0(String par1) { - throw ({ - 51: MapBase.mapToString(var7), - 9: '-Io', - 65: ((var2 * var5[-77])).toRadixString( - ((false ? false : (true ? var1 : (!((!(var1)))))) - ? (--var2) - : (-(-16)))), - 61: '' - } ?? - var7); -} - -int foo1(Set par1, Set par2) { - return Int32x4.zxzy; -} - -String foo2() { - { - int loc0 = 58; - while (--loc0 > 0) { - switch ((~((~((-((~(foo1((false ? var6 : var6), { - (~(-84)), - ((var1 ? var5[(loc0 + (var2--))] : -77) >> - ((var1 ? var2 : ((-(var2)) - loc0)) + - foo1( - { - -8, - 19, - (true ? var2 : 70), - 39, - loc0, - Int32x4.wxyw, - var5[var5[Int32x4.wzxz]], - -12 - }, - (var6 ?? - { - var5[(var1 ? var5[loc0] : var2)], - var5[(loc0--)], - loc0 - })))), - ((Int32x4.yzzw % loc0) % -87), - Int32x4.wxyz, - Float32x4.wzxz - })))))))))) { - case 3666713542: - { - var4 = (true - ? var4 - : String.fromCharCode((var1 - ? ((true ? true : true) ? var5[(var2++)] : var2) - : (((((false ? (true ? false : true) : false) ? 52 : var2) - - foo1(var6, var6)) ~/ - var2) ^ - loc0)))); - } - break; - case 3666713543: - { - var5 = [(Float32x4.xzyw << (Int32x4.zywz * var2))]; - } - break; - } - } - } - return 'hLw'; -} - -class X0 { - bool fld0_0 = true; - - Set foo0_0(Map par1, int par2) { - try { - if ((var5 != var5)) { - throw 0.2119336645634784; - } - } catch (exception, stackTrace) { - if (fld0_0) { - print({ - ((Float32x4.xzzx % - ((-(30)) * - foo1( - var6, - ({ - (par2++), - foo1({ - var5[-83], - (true ? -58 : foo1(var6, var6)), - par2, - (var5[-49] - 46), - var2, - var5[76], - 73 - }, (var6).difference(var6)), - (((false ? var5[49] : 6442450943) > -98) - ? -92 - : var5[7]), - -93, - var5[var5[27]], - var5[-5], - (-(((var1 ? false : true) ? var5[-87] : par2))) - } ?? - {FileSystemEvent.modify, 31, var2})))) + - var2), - (((++par2)).isEven - ? foo1( - ((var6).toSet()).intersection((var1 - ? var6 - : (true - ? (var6 ?? - { - foo1({ - (45 ^ -59), - var2, - -94, - Int32x4.yyzw, - var2, - 44, - var5[foo1(var6, (var6 ?? {-91, var2}))] - }, var6), - ((++par2) % 70), - 88 - }) - : var6))), - ({ - -85, - (var2++), - (++par2), - 45, - par2, - (--par2), - (var5[par2] ?? - (-((~(foo1(var6, { - foo1( - ({ - (var2 - - (FileSystemEntity.isFileSync( - 'd)\u{1f600}+Sm') - ? (false ? 22 : var2) - : -15)), - var5[var2], - par2, - var5[(foo1( - var6, - ({ - var2, - (~(-9223372030412324863)), - (var2++), - -18 - } ?? - var6)) & - Int32x4.yxwx)], - (fld0_0 - ? (~((-(-50)))) - : foo1({ - foo1({-92, var5[81]}, var6), - var2, - 76, - var5[(false - ? (true - ? var2 - : var5[Float32x4.yzxx]) - : var5[var5[var2]])], - Duration.minutesPerHour, - 34 - }, var6)), - -72 - } ?? - var6), - {25, Float32x4.wwww}) - })))))), - (par2--) - } ?? - var6)) - : (-((SecurityContext.alpnSupported - ? Float32x4.zwyz - : foo1({ - 14, - var5[var2], - (~(39)), - 93, - Float32x4.xyxx, - (-(var5[(-65 << -28)])), - 24, - (~(-64)) - }, { - -31, - (foo1(var6, { - Float32x4.zzyx, - 96, - Float32x4.yyxw, - var2, - par2 - }) + - Int32x4.wzyy), - (~(52)), - -13, - par2, - -83, - ZLibOption.defaultMemLevel, - (var2++) - }))))) - }); - } - } finally { - for (int loc0 = 0; loc0 < 90; loc0++) { - if (false) { - var5 ??= [(~((++par2)))]; - var0 += ((0.08377494829959586 - (-(var3))) * - (-(((true ? (var0 + 0.8491470957055424) : var0) / - ((!(var1)) - ? var0 - : (var0 * - ((([ - -67, - 6442450943, - -95, - var5[par2], - -30, - 6442450945, - loc0 - ] ?? - [ - (true ? 6442450943 : 16), - var5[var5[1]], - var2, - Float32x4.xwzy, - par2, - var5[28], - Int32x4.xxwx, - var5[-23] - ]) != - [var5[var5[(--par2)]], Int32x4.yzxy]) - ? var3 - : 0.9197172211286759))))))); - } else { - print((var4).codeUnits); - } - } - var7 ??= { - 9: (var7[(((!(fld0_0)) ? -27 : (Float32x4.xyzz).round()) ^ - ((~(54)) + - foo1({ - var2, - 28, - -9223372028264841217, - (par2--), - (++par2), - -1, - (-(var5[var2])) - }, var6)))]) - .padLeft(68, (0.0875980111263257).toStringAsPrecision((++par2))), - 88: (foo2() ?? '1rcZ'), - 32: 'NeAEG', - 5: ('\u{1f600}n)V\u2665#').replaceRange( - (-(-1)), - (-(par2)), - ((((!((var1 || (true ? var1 : (var7).isEmpty)))) ? var1 : false) && - (var7).isEmpty) - ? ((false ? false : var1) ? '!Tlx)' : par1[6442450943]) - : var4)), - 13: var7[(((!(((par1[-27] ?? 'AcM') != 'Gb'))) - ? true - : (var6 == - ({ - 13, - 96, - var5[Int32x4.zxyw], - -41, - ((fld0_0 || true) ? var5[-45] : var5[95]), - (--par2), - -37 - } ?? - { - 8589934591, - ((--var2) ?? - (var2 * - ((!(var1)) - ? var5[Float32x4.yxxx] - : (var2++)))), - (var5[var5[Float32x4.wwzz]] * -30), - Int32x4.xzzw, - (-((~(22)))), - 15 - }))) - ? (fld0_0 - ? var2 - : foo1({ - var5[-9223372028264841217], - foo1( - { - -82, - var5[Float32x4.zzyx], - par2, - (~(var5[par2])), - (par2++), - 63 - }, - (false - ? { - 0, - Uint16List.bytesPerElement, - -41, - 8, - Int32x4.xxyz, - RawSocketOption.levelSocket - } - : var6)), - foo1({var5[(~(-47))], (-(-46))}, - ({var5[2], (-(-28))} ?? var6)), - (par2--), - foo1(({var5[-69], 52}).difference(var6), - {25, (-(var5[9223372034707292159])), 52}), - (var2++), - Int32x4.ywyz, - (FileSystemEntity.isWatchSupported ? (++par2) : var2) - }, { - Float32x4.wxzx, - var2, - par2, - var5[var2], - par2, - var2 - })) - : (++par2))] - }; - } - return var6; - } - - Map foo0_1(double par1) { - fld0_0 = (0.8454395181150425).isInfinite; - return { - 86: var4, - 59: ((((par1 ?? 0.45641338431576617)).toStringAsExponential( - (foo1({51, 35, (var1 ? (~(var2)) : -35)}, var6) ^ - Int32x4.xwzx))) - .trimLeft() + - 'FX') - }; - } - - void run() { - { - int loc0 = 2; - while (--loc0 > 0) { - var2 %= (fld0_0 ? var2 : -26); - } - } - try { - switch ((true - ? (~((var1 ? 40 : foo1((var6).difference(var6), {77})))) - : (92 ?? Float32x4.zxxx))) { - case 583336190: - { - var7 = (foo0_1(((2 ^ var2)).truncateToDouble()) ?? - ((FileSystemEntity.isFileSync('J u') && false) - ? ({ - 96: 'PRN', - 26: 'rayc(', - 91: '', - 69: 'NG', - 78: 'B7', - 53: 'KOQzI', - 85: 'ZuksL' - } ?? - var7) - : var7)); - } - break; - case 583336197: - { - var7 = (((--var2) != (~(((var2--) ~/ (++var2))))) - ? ((true ? Map.from(Map.of(var7)) : var7) ?? var7) - : foo0_1(0.48262288106096063)); - } - break; - } - for (int loc0 = 0; loc0 < 8; loc0++) { - /* - * Multi-line - * comment. - */ - { - int loc1 = 22; - while (--loc1 > 0) { - var6 ??= var6; - var7[(FileSystemEntity.isWatchSupported - ? foo1( - (foo0_0({49: '7asVc2S', 12: 'x\u2665\u{1f600}tI'}, loc0)) - .difference(((!(true)) - ? foo0_0({ - 24: 'kB9', - 87: 'vIEqX@r', - 36: '5u', - 34: 'M8\u{1f600}Og\u2665', - 73: '-bMA\u{1f600}N', - 39: 'F((\u{1f600}Y', - 54: 'FHp!' - }, 4294967297) - : var6)), - foo0_0({ - 95: '!sL', - 30: '\u2665', - 51: 'E+jWt\u{1f600}', - 78: 'cCr#k', - 56: ')P-a' - }, -19)) - : 76)] = (var4 + 'n\u2665\u{1f600}j'); - } - } - } - } catch (exception, stackTrace) { - var3 ??= ((!(true)) - ? foo0(var7[(false - ? foo1( - ((foo0_0({ - 60: 'Nt2h', - 48: 'gWolH9', - 42: ')', - 15: 'n!YW\u2665', - 79: '7E\u{1f600}' - }, 37) ?? - {19}) ?? - var6), - {-17, 4294967297, -94, -63}) - : (var2--))]) - : ((-(double.nan)) / 0.7833677975390729)); - } - } -} - -main() { - new X0().run(); -} diff --git a/tests/language_2/vm/regress_37149_test.dart b/tests/language_2/vm/regress_37149_test.dart deleted file mode 100644 index ab6b46ded07..00000000000 --- a/tests/language_2/vm/regress_37149_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// 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. - -// @dart = 2.9 - -// This test verifies that typedef types used in constants are correctly -// visited in the tree shaker. -// Regression test for https://github.com/dart-lang/sdk/issues/37149. - -import 'dart:async' show FutureOr; - -typedef ComputeCallback = FutureOr Function(Q message); -typedef _ComputeImpl = Future Function( - ComputeCallback callback, Q message, - {String debugLabel}); - -Future isolatesCompute(ComputeCallback callback, Q message, - {String debugLabel}) async { - return null; -} - -const _ComputeImpl compute = isolatesCompute; - -main() { - compute.call(null, null); -} diff --git a/tests/language_2/vm/regress_37984_test.dart b/tests/language_2/vm/regress_37984_test.dart deleted file mode 100644 index 5ca6ba60be0..00000000000 --- a/tests/language_2/vm/regress_37984_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:async'; - -main() async { - await for (var x in func(3)) { - print(x); - } -} - -Stream func(int i) async* { - int currentState = 0; - try { - print('outer try'); - } finally { - try { - print('inner try'); - } finally { - yield currentState + 1; - } - yield currentState + 1; - print('finally'); - } -} diff --git a/tests/language_2/vm/regress_39283_test.dart b/tests/language_2/vm/regress_39283_test.dart deleted file mode 100644 index ad35c0be005..00000000000 --- a/tests/language_2/vm/regress_39283_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// 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. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class A { - dynamic foo(a) { - baz() { - Expect.fail('Should not be reachable'); - } - - return baz; - } -} - -main() { - Expect.throws(() { - dynamic x = A().foo(1); - x(); - }, (e) => e is NoSuchMethodError); -} diff --git a/tests/language_2/vm/regress_40792_test.dart b/tests/language_2/vm/regress_40792_test.dart deleted file mode 100644 index 19d37390a0a..00000000000 --- a/tests/language_2/vm/regress_40792_test.dart +++ /dev/null @@ -1,131 +0,0 @@ -// 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. - -// @dart = 2.9 - -// VMOptions=--optimization_counter_threshold=10 --deterministic - -// Regression test for https://dartbug.com/40792 and https://dartbug.com/40795. -// Verifies that non-nullability is not inferred from 'is' tests which -// accept null. - -import "package:expect/expect.dart"; - -dynamic result; - -// Use separate functions so their parameter types can be inferred separately. -setResult1(x) { - result = (x == null) ? 'null' : 'not null'; -} - -setResult2(x) { - result = (x == null) ? 'null' : 'not null'; -} - -setResult3(x) { - result = (x == null) ? 'null' : 'not null'; -} - -setResult4(x) { - result = (x == null) ? 'null' : 'not null'; -} - -setResult5(x) { - result = (x == null) ? 'null' : 'not null'; -} - -setResult6(x) { - result = (x == null) ? 'null' : 'not null'; -} - -setResult7(x) { - result = (x == null) ? 'null' : 'not null'; -} - -class A { - @pragma('vm:never-inline') - test1(S x) { - if (x is T) { - setResult1(x); - } - } - - @pragma('vm:never-inline') - test2(S x) { - if (x is T) { - setResult2(x); - } - } - - @pragma('vm:never-inline') - test3(S x) { - if (x is T) { - setResult2(x); - } - } - - @pragma('vm:never-inline') - test4(S x) { - if (x is T) { - setResult2(x); - } - } -} - -@pragma('vm:never-inline') -test5(x) { - if (x is Null) { - setResult5(x); - } -} - -@pragma('vm:never-inline') -test6(x) { - if (x is Object) { - setResult6(x); - } -} - -@pragma('vm:never-inline') -test7(x) { - if (x is dynamic) { - setResult7(x); - } -} - -void doTests() { - result = 'unexpected'; - new A().test1(null); - Expect.equals('null', result); - - result = 'unexpected'; - new A().test2(null); - Expect.equals('null', result); - - result = 'unexpected'; - new A().test3(null); - Expect.equals('null', result); - - result = 'unexpected'; - new A().test4(null); - Expect.equals('null', result); - - result = 'unexpected'; - test5(null); - Expect.equals('null', result); - - result = 'unexpected'; - test6(null); - Expect.equals('null', result); - - result = 'unexpected'; - test7(null); - Expect.equals('null', result); -} - -main(List args) { - for (int i = 0; i < 20; ++i) { - doTests(); - } -} diff --git a/tests/language_2/vm/regress_45260_test.dart b/tests/language_2/vm/regress_45260_test.dart deleted file mode 100644 index 5f82672a9ac..00000000000 --- a/tests/language_2/vm/regress_45260_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2021, 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 - -// VMOptions=--optimization-counter-threshold=20 --deterministic - -import 'package:expect/expect.dart'; - -List>>> toNestedList() { - final list = [ - for (var i0 = 0; i0 < 2; i0++) - [ - for (var i1 = 0; i1 < 2; i1++) - [ - for (var i2 = 0; i2 < 2; i2++) - [ - for (var i3 = 0; i3 < 2; i3++) - 1000 * i0 + 100 * i1 + 10 * i2 + i3 - ] - ] - ] - ]; - return list; -} - -const expectedList = [ - [ - [ - [0000, 0001], - [0010, 0011], - ], - [ - [0100, 0101], - [0110, 0111], - ] - ], - [ - [ - [1000, 1001], - [1010, 1011], - ], - [ - [1100, 1101], - [1110, 1111], - ] - ] -]; - -void main() { - Expect.deepEquals(expectedList, toNestedList()); -} diff --git a/tests/language_2/vm/regress_45524_test.dart b/tests/language_2/vm/regress_45524_test.dart deleted file mode 100644 index 3f33adb7fa8..00000000000 --- a/tests/language_2/vm/regress_45524_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2021, 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 "package:expect/expect.dart"; - -// Reduced from: -// The Dart Project Fuzz Tester (1.89). -// Program generated as: -// dart dartfuzz.dart --seed 3959760722 --no-fp --no-ffi --flat -// @dart=2.7 - -bool var17 = bool.fromEnvironment('2y'); - -class X0 { - num fld0_2 = 9223372036854775807; -} - -extension XE0 on X0 { - bool foo0_Extension0() { - if (-12 >= -(((var17 ? -92 : fld0_2)))) { - return true; - } else { - return false; - } - } -} - -main() { - Expect.equals(true, X0().foo0_Extension0()); -} diff --git a/tests/language_2/vm/regress_45525_test.dart b/tests/language_2/vm/regress_45525_test.dart deleted file mode 100644 index 57c7e88ef7a..00000000000 --- a/tests/language_2/vm/regress_45525_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2021, 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. -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -dynamic a() { - return 23; -} - -dynamic b() { - return 26; -} - -@pragma("vm:never-inline") -dynamic foo() { - // BinarySmiOp(<<) marked truncating - return (a() << b()) & 0xFFFFFFF; -} - -main() { - for (var i = 0; i < 20; i++) { - Expect.equals(201326592, foo()); - } -} diff --git a/tests/language_2/vm/regress_45674_test.dart b/tests/language_2/vm/regress_45674_test.dart deleted file mode 100644 index 56ab0293020..00000000000 --- a/tests/language_2/vm/regress_45674_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2021, 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 - -import "package:expect/expect.dart"; - -// Reduced from - -// The Dart Project Fuzz Tester (1.89). -// Program generated as: -// dart dartfuzz.dart --seed 3586617624 --no-fp --no-ffi --flat - -import 'dart:typed_data'; - -Int32x4List var14 = Int32x4List(5); -Map var58 = {false: -5, true: -16, false: 22}; - -bool foo3_Extension1() { - try { - print(var14[((Int32x4.wyxw as int) >> var58[true])]); - return true; - } catch (e) { - return false; - } -} - -main() { - var r; - try { - r = foo3_Extension1(); - } catch (e) { - Expect.fail("Exception should have been caught sooner"); - } - Expect.equals(false, r); -} diff --git a/tests/language_2/vm/regress_45855_test.dart b/tests/language_2/vm/regress_45855_test.dart deleted file mode 100644 index d35675c3fed..00000000000 --- a/tests/language_2/vm/regress_45855_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2021, 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 - -// VMOptions=--optimization-counter-threshold=100 --deterministic -// -// The Dart Project Fuzz Tester (1.89). -// Program generated as: -// dart dartfuzz.dart --seed 928581289 --no-fp --ffi --no-flat -// -// Minimized. - -@pragma('vm:never-inline') -void main2(bool boolParam) { - for (int i = 0; i < 200; i++) { - final bool1 = boolParam ?? false; - if (bool1) { - () { - // Force creating a new current context. - i.toString(); - }; - // Force having multiple paths to the exit, popping the current context. - break; - } - } -} - -void main() { - // Test OSR. - main2(null); - - // Test non-OSR. - main2(null); -} diff --git a/tests/language_2/vm/regress_b131091988_test.dart b/tests/language_2/vm/regress_b131091988_test.dart deleted file mode 100644 index 9d6f50cfaca..00000000000 --- a/tests/language_2/vm/regress_b131091988_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Check that await from a call-via-field expression works. - -import 'package:expect/expect.dart'; - -abstract class A { - T Function(List raw) get decode; -} - -class B extends A { - int Function(List raw) get decode => (List raw) => raw.first; -} - -class C { - final A aa; - C(this.aa); -} - -class D { - final C cc; - D(this.cc); - - Future read() async { - return cc.aa.decode(await getList()); - } - - Future> getList() async => [42]; -} - -main() async { - D dd = new D(new C(new B())); - Expect.equals(42, await dd.read()); -} diff --git a/tests/language_2/vm/regress_b80154489_test.dart b/tests/language_2/vm/regress_b80154489_test.dart deleted file mode 100644 index d9f303b0d99..00000000000 --- a/tests/language_2/vm/regress_b80154489_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2018, 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 - -// Check that class finalizer correctly marks supertypes of superinterfaces -// as implemented. - -import 'package:expect/expect.dart'; - -abstract class A { - String method(); -} - -abstract class B extends A {} - -class D extends A { - String method() => "D"; -} - -class C implements B { - String method() => "C"; -} - -String invoke(A a) { - return a.method(); -} - -void main(List args) { - Expect.equals("C", invoke(args.contains('--use-d') ? new D() : new C())); -} diff --git a/tests/language_2/vm/regress_flutter_14891_test.dart b/tests/language_2/vm/regress_flutter_14891_test.dart deleted file mode 100644 index 539199d352f..00000000000 --- a/tests/language_2/vm/regress_flutter_14891_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2018, 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 - -// Test verifying that type literals hidden within other constant objects -// are correctly handled by the AOT compiler. - -import "package:expect/expect.dart"; - -class _ClassOnlyUsedAsTypeLiteral {} - -void main() { - Expect - .isTrue((const [_ClassOnlyUsedAsTypeLiteral]).toString().startsWith('[')); -} diff --git a/tests/language_2/vm/regress_flutter_19612_test.dart b/tests/language_2/vm/regress_flutter_19612_test.dart deleted file mode 100644 index 36597645f8b..00000000000 --- a/tests/language_2/vm/regress_flutter_19612_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2018, 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 - -// Regression test for https://github.com/flutter/flutter/issues/19612. -// This test verifies that negated condition is correctly handled by the -// AOT compiler. - -import "package:expect/expect.dart"; - -class X { - final int maxLines; - X([this.maxLines]); - - bool get isMultiline => maxLines != 1; -} - -X x1 = new X(1); -X x2 = new X(42); -X x3 = new X(); - -main() { - Expect.isFalse(x1.isMultiline); - Expect.isTrue(x2.isMultiline); - Expect.isTrue(x3.isMultiline); -} diff --git a/tests/language_2/vm/regress_flutter_21957_test.dart b/tests/language_2/vm/regress_flutter_21957_test.dart deleted file mode 100644 index a60c2510b0e..00000000000 --- a/tests/language_2/vm/regress_flutter_21957_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2018, 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 - -// Tests how nullability is inferred for a final field which is implicitly -// initialized to null. This is a regression test for -// https://github.com/flutter/flutter/issues/21957. - -// VMOptions=--no_background_compilation --optimization_counter_threshold=10 - -import "package:expect/expect.dart"; - -class A {} - -class X { - final A f; - X.empty() : f = null; - X.full() : f = A(); -} - -bool doit(bool choice) { - X x = choice ? X.full() : X.empty(); - return x.f == null; -} - -class Y { - final A f; - Y.c0() : f = A(); - Y.c1() : f = null; - Y.c2() : f = A(); -} - -bool doit2(int choice) { - Y y; - switch (choice) { - case 0: - y = new Y.c0(); - break; - case 1: - y = new Y.c1(); - break; - case 2: - y = new Y.c2(); - break; - } - return y.f == null; -} - -void main() { - for (int i = 0; i < 100; i++) { - bool ping = (i & 1) == 0; - bool result = doit(ping); - Expect.equals(result, !ping); - - bool result2 = doit2(i % 3); - Expect.equals(result2, (i % 3) != 0 && (i % 3) != 2); - } -} diff --git a/tests/language_2/vm/regress_flutter_22131_test.dart b/tests/language_2/vm/regress_flutter_22131_test.dart deleted file mode 100644 index b4bddeb23e6..00000000000 --- a/tests/language_2/vm/regress_flutter_22131_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2018, 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 - -// Verifies that inferred type of a final field takes constant objects into -// account. This is a regression test for -// https://github.com/flutter/flutter/issues/22131. - -// VMOptions=--no_background_compilation --optimization_counter_threshold=10 - -import "package:expect/expect.dart"; - -class X { - final Map data; - const X(this.data); -} - -const f = X({1: "ok-f"}); -final g = X({1: "ok-g"}); - -void doTest() { - Expect.equals("ok-f", f.data[1]); - Expect.equals("ok-g", g.data[1]); -} - -void main() { - for (int i = 0; i < 20; i++) { - doTest(); - } -} diff --git a/tests/language_2/vm/regress_flutter_23879_test.dart b/tests/language_2/vm/regress_flutter_23879_test.dart deleted file mode 100644 index 6e7297cb096..00000000000 --- a/tests/language_2/vm/regress_flutter_23879_test.dart +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2018, 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 - -// Bug in unboxed int spilling (https://github.com/flutter/flutter/issues/23879). -// -// VMOptions=--deterministic - -import "package:expect/expect.dart"; - -List list = new List.filled(10, null); - -List expected_values = [null, 152, 168, 184, 200, 216, 232, 248, 264, 280]; - -int count = 0; - -bool getNext() { - return ++count <= 9; -} - -int foo() { - int a = 1; - int b = 2; - int c = 3; - int d = 4; - int e = 5; - int f = 6; - int g = 7; - int h = 8; - int i = 9; - int j = 10; - int k = 11; - int l = 12; - int m = 13; - int n = 14; - int o = 15; - int p = 16; - count = 0; - int componentIndex = 1; - while (getNext()) { - // Make spilling likely. - a++; - b++; - c++; - d++; - e++; - f++; - g++; - h++; - i++; - j++; - k++; - l++; - m++; - n++; - o++; - p++; - list[componentIndex] = - a + b + c + d + e + f + g + h + i + j + k + l + m + n + o + p; - componentIndex++; - } - return componentIndex; -} - -void main() { - int x = foo(); - Expect.equals(10, x); - Expect.equals(10, count); - for (int i = 0; i < 10; i++) { - Expect.equals(expected_values[i], list[i]); - } -} diff --git a/tests/language_2/vm/regress_flutter_28260_test.dart b/tests/language_2/vm/regress_flutter_28260_test.dart deleted file mode 100644 index 22a0478cc48..00000000000 --- a/tests/language_2/vm/regress_flutter_28260_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// 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. - -// @dart = 2.9 - -// VMOptions=--deterministic --optimization_counter_threshold=10 - -// Bug cid ranges (https://github.com/flutter/flutter/issues/28260). - -import 'dart:typed_data'; - -import "package:expect/expect.dart"; - -foo() { - ByteBuffer a = null; - var dataMap = Map(); - dataMap['data'] = a; - return (dataMap['data'] is ByteBuffer); -} - -void main() { - for (int i = 0; i < 20; i++) { - Expect.equals(false, foo()); - } -} diff --git a/tests/language_2/vm/regress_flutter_42845_lib.dart b/tests/language_2/vm/regress_flutter_42845_lib.dart deleted file mode 100644 index d21e1e3b56e..00000000000 --- a/tests/language_2/vm/regress_flutter_42845_lib.dart +++ /dev/null @@ -1,14 +0,0 @@ -// 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. - -// @dart = 2.9 - -extension TestExtension on int { - bool get isPositive => this > 0; - bool get isNegative => this < 0; -} - -extension UnusedExtension on int { - bool get isReallyZero => this == 0; -} diff --git a/tests/language_2/vm/regress_flutter_42845_test.dart b/tests/language_2/vm/regress_flutter_42845_test.dart deleted file mode 100644 index 1991ad64d34..00000000000 --- a/tests/language_2/vm/regress_flutter_42845_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Tests exported extensions. - -import "regress_flutter_42845_lib.dart"; -export "regress_flutter_42845_lib.dart" show TestExtension, UnusedExtension; - -import "package:expect/expect.dart"; - -int i = 42; - -void main() { - Expect.isTrue(i.isPositive); - Expect.isFalse(i.isNegative); -} diff --git a/tests/language_2/vm/regress_flutter_51828_bug2_test.dart b/tests/language_2/vm/regress_flutter_51828_bug2_test.dart deleted file mode 100644 index d8180b63056..00000000000 --- a/tests/language_2/vm/regress_flutter_51828_bug2_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// 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. - -// @dart = 2.9 - -// This is a regression test for the 2nd bug in -// https://github.com/flutter/flutter/issues/51828. -// Verifies that implicit cast of :result parameter of async_op -// doesn't affect subsequent uses. - -import "package:expect/expect.dart"; - -dynamic bar() async => 42; -dynamic baz() async => 'hi'; - -use(x, y) { - Expect.equals(42, x); - Expect.equals(2, y.length); -} - -main() async { - int x = await bar(); - String y = await baz(); - use(x, y); -} diff --git a/tests/language_2/vm/regress_flutter_56479_test.dart b/tests/language_2/vm/regress_flutter_56479_test.dart deleted file mode 100644 index 03b08a59606..00000000000 --- a/tests/language_2/vm/regress_flutter_56479_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Verifies that optional parameters can be transformed in field initializers. -// Regression test for https://github.com/flutter/flutter/issues/56479. - -import "package:expect/expect.dart"; - -int bar({int x = 2}) => x + 1; - -class A { - static int foo = bar(x: 42); -} - -main() { - Expect.equals(5, bar(x: 4)); - Expect.equals(43, A.foo); -} diff --git a/tests/language_2/vm/regress_flutter_85311_test.dart b/tests/language_2/vm/regress_flutter_85311_test.dart deleted file mode 100644 index a3458f95fd4..00000000000 --- a/tests/language_2/vm/regress_flutter_85311_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2021, 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 - -// This is a regression test for the bug in -// https://github.com/flutter/flutter/issues/51828. -// Verifies that temporaries aren't incorrectly assigned types when they're -// reused. - -import "package:expect/expect.dart"; - -bool wasCalled = false; - -class Z { - bool operator ==(Object other) { - wasCalled = true; - return true; - } -} - -class Y { - final dynamic v; - Y(this.v); -} - -Future crash(dynamic y) async { - return (y.v == (await 7) || y == (await 9)); -} - -void main() async { - await crash(Y(Z())); - - Expect.isTrue(wasCalled); -} diff --git a/tests/language_2/vm/regress_flutter_89584_test.dart b/tests/language_2/vm/regress_flutter_89584_test.dart deleted file mode 100644 index 1fa00e7c2f7..00000000000 --- a/tests/language_2/vm/regress_flutter_89584_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2021, 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 - -// This is a regression test for the bug in -// https://github.com/flutter/flutter/issues/89584. -// Verifies a Field::RecordStore is not done before all fields populated. - -import 'dart:isolate'; -import 'dart:typed_data'; - -void main() async { - final receivePort = ReceivePort(); - await Isolate.spawn(isolateEntry, receivePort.sendPort); - final wrapper = (await receivePort.first) as Wrapper; - final result = readWrapperUint8ListView(wrapper); - print(result); -} - -const uint8ListLength = 1000000; - -void isolateEntry(SendPort sendPort) async { - final uint8list = Uint8List(uint8ListLength); - sendPort.send(Wrapper( - uint8list.buffer.asUint8List(0, uint8list.length), - )); -} - -int readWrapperUint8ListView(Wrapper wrapper) { - var result = 0; - for (int i = 0; i < uint8ListLength; i++) { - result += wrapper.uint8ListView[i]; - } - return result; -} - -class Wrapper { - final Uint8List uint8ListView; - Wrapper(this.uint8ListView); -} diff --git a/tests/language_2/vm/regress_licm_test.dart b/tests/language_2/vm/regress_licm_test.dart deleted file mode 100644 index 982fae93a0a..00000000000 --- a/tests/language_2/vm/regress_licm_test.dart +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2017, 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. -// -// VMOptions=--optimization-counter-threshold=1000 --no-background-compilation - -// @dart = 2.9 - -// Regression test for correct LICM and type propagation. - -class Attribute { - final id = 123; -} - -abstract class Name { - Name(this.name); - final String name; - get attr; - - @pragma('vm:prefer-inline') - int compareTo(other) { - int nameCompare = name.compareTo(other.name); - if (nameCompare != 0) return nameCompare; - if (attr == null) return 0; - return attr.id - other.attr.id; - } -} - -class AName extends Name { - AName() : super("abc"); - final attr = new Attribute(); -} - -class BName extends Name { - BName(name) : super(name); - get attr => null; -} - -class Member { - Member(this.name); - var name; -} - -Member find(List members, Name name) { - int low = 0, high = members.length - 1; - while (low <= high) { - int mid = low + ((high - low) >> 1); - Member pivot = members[mid]; - int comparison = name.compareTo(pivot.name); - if (comparison < 0) { - high = mid - 1; - } else if (comparison > 0) { - low = mid + 1; - } else { - return pivot; - } - } - return null; -} - -main() { - var list = [ - new Member(new AName()), - new Member(new BName("a")), - new Member(new BName("b")), - new Member(new BName("c")), - new Member(new BName("d")) - ]; - - find(list, new AName()); - find(list, new BName("e")); - find(list, new BName("b")); - for (var i = 0; i < 1000; ++i) { - find(list, new BName("b")); - find(list, new BName("e")); - } -} diff --git a/tests/language_2/vm/regress_protobuf_95_test.dart b/tests/language_2/vm/regress_protobuf_95_test.dart deleted file mode 100644 index 773da9b7f6b..00000000000 --- a/tests/language_2/vm/regress_protobuf_95_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2018, 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 - -// Verify that compiler loads class id from the receiver and not from type -// arguments when performing polymorphic inlining in the AOT mode. - -import "package:expect/expect.dart"; - -abstract class Base { - Type rareMethod(); -} - -class A extends Base { - Type rareMethod() => A; -} - -class B extends Base { - Type rareMethod() => B; -} - -Type trampoline(Base v) => v.rareMethod(); - -void main() { - Expect.equals(A, trampoline(new A())); - Expect.equals(B, trampoline(new B())); -} diff --git a/tests/language_2/vm/regression_32912_test.dart b/tests/language_2/vm/regression_32912_test.dart deleted file mode 100644 index 122929669f4..00000000000 --- a/tests/language_2/vm/regression_32912_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2018, 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 - -dynamic _defaultCallback(T t) => t; - -void bar([dynamic Function(T) f = _defaultCallback]) {} //# 01: compile-time error - -class C { - // Should be statically rejected - foo([dynamic Function(T) f = _defaultCallback]) {} //# 02: compile-time error - - // Should be statically rejected - const C({this.callback = _defaultCallback}); //# 03: compile-time error - - final dynamic Function(T) callback; //# 03: continued -} - -void main() { - bar(); //# 01: continued - print(new C().foo()); //# 02: continued - print(new C().callback); //# 03: continued -} diff --git a/tests/language_2/vm/regression_36076_test.dart b/tests/language_2/vm/regression_36076_test.dart deleted file mode 100755 index 1e847b408f8..00000000000 --- a/tests/language_2/vm/regression_36076_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Bug found by DartFuzz (stripped down version): -// https://github.com/dart-lang/sdk/issues/36076 - -// @dart = 2.9 - -// Code does not do anything, but broke kernel binary flow graph builder. - -foo() { - try { - for (var x in [1, 2]) { - return; - } - } finally { - for (var x in [3]) { - break; - } - } -} - -bar() { - try {} catch (e) { - try {} catch (e) { - for (var x in [1, 2]) { - if (x == 1) break; - return; - } - try { - try {} catch (e) { - return; - } - } catch (e) {} - } finally { - try {} catch (e) { - return; - } - } - } finally {} -} - -main() { - foo(); - bar(); -} diff --git a/tests/language_2/vm/regression_36587_test.dart b/tests/language_2/vm/regression_36587_test.dart deleted file mode 100644 index 91993bf9817..00000000000 --- a/tests/language_2/vm/regression_36587_test.dart +++ /dev/null @@ -1,107 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Regression test extracted from a large DartFuzz-generated test. -// https://github.com/dart-lang/sdk/issues/36587 - -import "package:expect/expect.dart"; - -import 'dart:async'; -import 'dart:cli'; -import 'dart:collection'; -import 'dart:convert'; -import 'dart:core'; -import 'dart:io'; -import 'dart:isolate'; -import 'dart:math'; -import 'dart:typed_data'; - -Set var0 = {-62, -13, 2147483648, -10, -9223372028264841217, -54, 47}; -Set var1 = {-59}; -bool var2 = false; -bool var3 = true; -int var4 = 58; -double var5 = 0.004032426761438224; -String var6 = 'u6X2'; -List var7 = [56, -95, 6442450944, -31, 82]; -Set var8 = {9223372036854775807, 4294967297}; -Map var9 = { - 6: 'Ei(ZR', - 75: 'O0A-', - 99: 't', - 49: 'Qu', - 20: 'FujA\u2665', - 47: '' -}; - -String foo2() { - var8 ??= Set.identity(); - switch ((--var4)) { - case 3826530052: - { - { - int loc0 = 0; - do { - try { - throw {64: var6}; - } catch (e) { - if ((!(var3))) { - break; - } else { - try { - var8 = ((false ? FileSystemEntity.isWatchSupported : var3) - ? {Int32x4.wxxx, var4, -43, Float32x4.wzxz} - : { - (var4++), - (var7[(false ? -87 : (++loc0))] % - (var7[((++loc0) * var4)] ~/ 73)) - }); - var0 = ((((-((((true ? var2 : false) ? (!(var3)) : true) - ? var5 - : (0.38834735336907733 ?? - 0.8105736840461367)))) + - (0.3752597438445757).abs())) - .isFinite - ? { - (true ? 65 : (var3 ? (loc0--) : var4)), - var7[Float32x4.xxxx] - } - : Set.identity()); - var1 = ((true - ? ({var7[var7[-9223372032559808513]]}).toSet() - : (Set.identity()).difference(var8)) ?? - var8); - var9[Float32x4.zxyz] = ''; - } catch (e) { - loc0 ~/= ((var3 != var3) - ? (~((false ? (-(loc0)) : Int32x4.wzwx))) - : var4); - } finally { - var1 = var8; - var5 ??= 0.6273822429057158; - throw [ - (loc0++), - 2147483647, - (var4--), - (-(ZLibOption.defaultWindowBits)), - (~((loc0--))), - (var4++) - ]; - } - } - break; - } - } while (++loc0 < 74); - } - } - } -} - -main() { - Expect.equals(58, var4); - foo2(); - Expect.equals(57, var4); -} diff --git a/tests/language_2/vm/regression_37408_test.dart b/tests/language_2/vm/regression_37408_test.dart deleted file mode 100644 index b48d27a1dd0..00000000000 --- a/tests/language_2/vm/regression_37408_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Issue #37408: AOT did not throw. - -import "package:expect/expect.dart"; - -import 'dart:math'; - -String var0 = '5Zso'; - -double foo2(String par1) { - return atan2(0.16964141699241508, num.tryParse('\u2665vDil')); -} - -class X0 { - void run() { - foo2(var0); - } -} - -main() { - bool x = false; - try { - new X0().run(); - } catch (exception, stackTrace) { - x = true; - } - Expect.isTrue(x); -} diff --git a/tests/language_2/vm/regression_37622_test.dart b/tests/language_2/vm/regression_37622_test.dart deleted file mode 100755 index 48562f53fcc..00000000000 --- a/tests/language_2/vm/regression_37622_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// 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. - -// @dart = 2.9 - -// VMOptions=--deterministic - -// Issue #37622 found with fuzzing: internal compiler crash (division-by-zero). - -import 'dart:typed_data'; - -import "package:expect/expect.dart"; - -@pragma('vm:never-inline') -int foo() { - int x = 0; - { - int loc0 = 67; - while (--loc0 > 0) { - --loc0; - x += (4 ~/ (Int32x4.wxwx >> loc0)); - --loc0; - --loc0; - } - } -} - -main() { - int x = 0; - bool d = false; - try { - x = foo(); - } on UnsupportedError catch (e) { - d = true; - } - Expect.equals(x, 0); - Expect.isTrue(d); -} diff --git a/tests/language_2/vm/regression_37633_test.dart b/tests/language_2/vm/regression_37633_test.dart deleted file mode 100755 index 53a00707440..00000000000 --- a/tests/language_2/vm/regression_37633_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// 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. - -// @dart = 2.9 - -// VMOptions=--deterministic - -// Issue #37633 found with fuzzing: internal compiler crash (parallel move). - -import 'dart:math'; - -import "package:expect/expect.dart"; - -double foo0() { - return acos(0.9474715118880382); -} - -@pragma('vm:never-inline') -double foo() { - return atan2(foo0(), foo0()); -} - -main() { - double x = foo(); - Expect.approxEquals(x, 0.7853981633974483); -} diff --git a/tests/language_2/vm/regression_37821_test.dart b/tests/language_2/vm/regression_37821_test.dart deleted file mode 100755 index acad5da0859..00000000000 --- a/tests/language_2/vm/regression_37821_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// 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. - -// @dart = 2.9 - -// VMOptions=--deterministic - -import "package:expect/expect.dart"; - -import 'dart:typed_data'; - -// Found by DartFuzzing: inconsistent view of unboxing -// https://github.com/dart-lang/sdk/issues/37821 - -double var5 = 0.5521203015696288; - -class X0 { - double fld0_1 = 0.44794902547497595; - void run() { - for (int loc1 = 0; loc1 < 11; loc1++) { - var5 = fld0_1; - } - fld0_1 -= 20; - } -} - -class X1 extends X0 { - void run() { - super.run(); - } -} - -@pragma("vm:never-inline") -void checkMe(double value) { - Expect.approxEquals(0.44794902547497595, value); -} - -main() { - Expect.approxEquals(0.5521203015696288, var5); - new X1().run(); - checkMe(var5); -} diff --git a/tests/language_2/vm/regression_38147_test.dart b/tests/language_2/vm/regression_38147_test.dart deleted file mode 100755 index a2db5993373..00000000000 --- a/tests/language_2/vm/regression_38147_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// 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. - -// @dart = 2.9 - -// VMOptions=--deterministic --optimization_counter_threshold=10 - -import "package:expect/expect.dart"; - -import 'dart:typed_data'; - -// Found by DartFuzzing: truncating shift -// https://github.com/dart-lang/sdk/issues/38147 - -int bar(int x, int y) { - return (x << y) & 0xffff; -} - -@pragma("vm:never-inline") -int foo() { - return bar(-61, 12); -} - -main() { - for (int i = 0; i < 20; i++) { - Expect.equals(12288, foo()); - } -} diff --git a/tests/language_2/vm/regression_38231_test.dart b/tests/language_2/vm/regression_38231_test.dart deleted file mode 100644 index 21cc7c96513..00000000000 --- a/tests/language_2/vm/regression_38231_test.dart +++ /dev/null @@ -1,128 +0,0 @@ -// 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. - -// @dart = 2.9 - -// VMOptions=--optimization_counter_threshold=1 - -import "package:expect/expect.dart"; - -import 'dart:typed_data'; - -// Found by DartFuzzing: would sometimes crash on OSR -// https://github.com/dart-lang/sdk/issues/38231 - -import 'dart:async'; -import 'dart:cli'; -import 'dart:collection'; -import 'dart:convert'; -import 'dart:core'; -import 'dart:io'; -import 'dart:isolate'; -import 'dart:math'; -import 'dart:typed_data'; - -Map var0 = { - 41: 'V\u2665Y\u2665#Xs', - for (int loc0 in { - if (true) for (int loc0 in {-2147483649}) -4294967167 else if (false) -1, - -60, - -82, - -21, - for (int loc0 in [ - -9223372036854771712, - for (int loc0 = 0; loc0 < 53; loc0++) 96 - ]) - 1, - -58, - 77 - }) - 95: '', - 5: 'z2\u2665e', - if (false) for (int loc0 in [-87, -2147483649, 0, 97, -53, 95]) 10: '#synP3', - 22: '' -}; -String var1 = ')LIpwG'; -double var2 = 0.30016980633333135; -bool var3 = true; -bool var4 = true; -int var5 = -9223372036854774808; -double var6 = 0.7012235530406754; -String var7 = 'H'; -List var8 = [90, -50, -34, -97, -33, 1]; -Set var9 = { - 42, - 36, - 9223372034707292159, - ...{52}, - 97, - for (int loc0 in { - if (true) ...{13} else -54, - -26, - -38, - 9223372032559808513, - 60 - }) - for (int loc1 in { - for (int loc1 in {19, 60}) -4294967280, - -17, - -62 - }) ...{23, 11}, - for (int loc0 = 0; loc0 < 30; loc0++) -44 -}; -Map var10 = { - for (int loc0 in { - ...{ - -52, - -9223372030412324864, - if (true) 82, - ...{76, 5, 9223372032559841279, 98, 58, 97, -127, 72}, - for (int loc0 in [-97]) -14, - for (int loc0 = 0; loc0 < 21; loc0++) 88 - }, - -52, - for (int loc0 = 0; loc0 < 63; loc0++) ...{64, 0}, - for (int loc0 = 0; loc0 < 67; loc0++) ...{67} - }) - 54: '', - 41: 'cvokV0', - 4: '9\u2665', - 35: 'vRkv', - 41: '\u2665', - 63: 'Nu+u\u26659S' -}; - -class X0 {} - -class X1 with X0 { - bool foo1_0(List par1, bool par2) => true; - Map foo1_1(Set par1, bool par2, Set par3) { - return {1: "a", 2: "b"}; - } -} - -main() { - try { - X1().foo1_0([1, 2], true); - } catch (exception, stackTrace) { - print('X1().foo1_0() throws'); - } - try { - X1().foo1_1( - { - 32, - -94, - -2147483649, - -43, - for (int loc0 in {56, -31}) -9223372032559775745, - 53, - 86, - 4294967296 - }, - var4, - {1, 2}); - } catch (exception, stackTrace) { - print('X1().foo1_1() throws'); - } -} diff --git a/tests/language_2/vm/regression_38412_test.dart b/tests/language_2/vm/regression_38412_test.dart deleted file mode 100644 index c511db8e710..00000000000 --- a/tests/language_2/vm/regression_38412_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// 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. - -// @dart = 2.9 - -// VMOptions=--optimization_counter_threshold=1 - -// Found by DartFuzzing: would sometimes fail: -// https://github.com/dart-lang/sdk/issues/38412 - -import "package:expect/expect.dart"; - -import 'dart:async'; -import 'dart:convert'; - -int fuzzvar1 = -9223372028264841217; -Map fuzzvar8 = {1: "a"}; - -class X1 { - List foo1_0(List par1, String par3) { - Expect.equals("not", par3); - Expect.equals(10, par1.length); - return [1]; - } -} - -String bar(Map o1, int o2) { - Expect.equals(1, o1.length); - Expect.equals(-9223372028264841218, o2); - return "not"; -} - -main() { - for (int loc0 = 0; loc0 < 7500; loc0++) { - "a" == Uri.parse("\u2665"); - } - print('fuzzvar8 runtime type: ${fuzzvar8.runtimeType}'); - var x = - X1().foo1_0([for (int i = 0; i < 10; ++i) 0], bar(fuzzvar8, --fuzzvar1)); - Expect.equals(1, x[0]); -} diff --git a/tests/language_2/vm/regression_38741_test.dart b/tests/language_2/vm/regression_38741_test.dart deleted file mode 100644 index 256fea0cd96..00000000000 --- a/tests/language_2/vm/regression_38741_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// 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. - -// @dart = 2.9 - -// VMOptions=--deterministic - -// Found by DartFuzzing: would fail during deopt: -// https://github.com/dart-lang/sdk/issues/38741 - -import 'package:expect/expect.dart'; - -@pragma('vm:prefer-inline') -bool foo(int x) => x < 10; - -@pragma('vm:never-inline') -bool bar(bool f) => f && foo(1); - -void main() { - try { - foo(null); // seed feedback for x < 10 with null receiver cid - } catch (e) {} - // Now when foo will be inlined into bar we will know that x is Smi, - // this hower disagrees with type feedback (which currently is monomorphic and - // expects null receiver for x < 10). - for (var i = 0; i < 10000; i++) Expect.isFalse(bar(false)); - Expect.isTrue(bar(true)); -} diff --git a/tests/language_2/vm/regression_39071_test.dart b/tests/language_2/vm/regression_39071_test.dart deleted file mode 100644 index aeb8d45e5b6..00000000000 --- a/tests/language_2/vm/regression_39071_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// 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. - -// @dart = 2.9 - -// VMOptions=--optimization_counter_threshold=10 - -// Found by DartFuzzing: would assert during OSR: -// https://github.com/dart-lang/sdk/issues/39071 - -main() { - var x = [ - [for (int i = 0; i < 20; ++i) i] - ]; -} diff --git a/tests/language_2/vm/regression_39193_test.dart b/tests/language_2/vm/regression_39193_test.dart deleted file mode 100644 index 8b482e540b6..00000000000 --- a/tests/language_2/vm/regression_39193_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -// @dart = 2.9 - -// VMOptions=--optimization_counter_threshold=1 - -// Found by DartFuzzing: would assert during OSR: -// https://github.com/dart-lang/sdk/issues/39193 - -Map> var75 = {}; - -main() { - try {} catch (e, st) {} finally { - print('before'); - var75[42] = (false - ? const {} - : {for (int loc1 = 0; loc1 < 1; loc1++) (-9223372034707292161 >> 165)}); - print('after'); - } -} diff --git a/tests/language_2/vm/reusable_boxes_test.dart b/tests/language_2/vm/reusable_boxes_test.dart deleted file mode 100644 index 5fef79836b9..00000000000 --- a/tests/language_2/vm/reusable_boxes_test.dart +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) 2013, 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. -// Test correct handling reusable boxes. -// VMOptions=--optimization_counter_threshold=100 --no-background_compilation - -// @dart = 2.9 - -library reusable_boxes_test; - -import 'dart:typed_data'; -import 'package:expect/expect.dart'; - -class D { - var a = 0.0; - var b = 1.0; - dynamic c = 2.0; - test() { - a = 0.0; - b = 1.0; - c = a + b; - return c; - } - - testParam(x, y) { - x = x * x; - y = y * y; - c = x + y; - } -} - -testD() { - var f = new D(); - var r = 0.0; - for (var i = 0; i < 20; i++) { - r += f.test(); - } - Expect.equals(20.0, r); - // Trigger a deopt of test. - f.testParam(new Float32x4(1.0, 2.0, 3.0, 4.0), new Float32x4.zero()); - r = 0.0; - for (var i = 0; i < 20; i++) { - r += f.test(); - } - Expect.equals(20.0, r); -} - -class F { - var a = new Float32x4.zero(); - var b = new Float32x4(1.0, 2.0, 3.0, 4.0); - dynamic c = new Float32x4.zero(); - test() { - a = new Float32x4.zero(); - b = new Float32x4(1.0, 2.0, 3.0, 4.0); - c = a + b; - return c; - } - - testParam(x, y) { - x = x * x; - y = y * y; - c = x + y; - } -} - -testF() { - var f = new F(); - var r = new Float32x4.zero(); - for (var i = 0; i < 20; i++) { - r += f.test(); - } - Expect.equals(20.0, r.x); - Expect.equals(40.0, r.y); - Expect.equals(60.0, r.z); - Expect.equals(80.0, r.w); - // Trigger a deopt of test. - f.testParam(1.0, 2.0); - r = new Float32x4.zero(); - for (var i = 0; i < 20; i++) { - r += f.test(); - } - Expect.equals(20.0, r.x); - Expect.equals(40.0, r.y); - Expect.equals(60.0, r.z); - Expect.equals(80.0, r.w); -} - -main() { - testD(); - testF(); -} diff --git a/tests/language_2/vm/shift_special_cases_test.dart b/tests/language_2/vm/shift_special_cases_test.dart deleted file mode 100644 index 4bda31fda52..00000000000 --- a/tests/language_2/vm/shift_special_cases_test.dart +++ /dev/null @@ -1,349 +0,0 @@ -// Copyright (c) 2018, 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 - -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation --use_slow_path - -// Test for special cases of << and >> integer operations with int64. - -import "package:expect/expect.dart"; - -// int64 value, does not fit to smi -int v1 = 0x778899aabbccddee; -int v2 = 0x6000000000000000; -int v3 = -0x778899aabbccddee; -int negativeInt64 = -0x7000000000000000; -int smi = 128; -int negativeSmi = -3; - -int shl(int a, int b) => a << b; -int shr(int a, int b) => a >> b; - -int shlUint32(int a, int b) => ((a & 0xffff) << b) & 0xffff; -int shrUint32(int a, int b) => (a & 0xffff) >> b; - -int testInt64ShlByNegative1(int a, int b) { - int x = a + 1; - int y = a - 2; - try { - x = a << b; - Expect.fail('Shift by negative count should throw an error'); - } on ArgumentError { - Expect.equals(0x778899aabbccddef, x); - Expect.equals(0x778899aabbccddec, y); - } -} - -int testInt64ShlByNegative2(int a, int b) { - int x = a + 1; - int y = a - 2; - try { - x = shl(a, b); - Expect.fail('Shift by negative count should throw an error'); - } on ArgumentError { - Expect.equals(0x778899aabbccddef, x); - Expect.equals(0x778899aabbccddec, y); - } -} - -int testInt64ShlByNegative3(int a) { - int x = a + 1; - int y = a - 2; - try { - int i = -64; - x = a << i; - Expect.fail('Shift by negative count should throw an error'); - } on ArgumentError { - Expect.equals(0x778899aabbccddef, x); - Expect.equals(0x778899aabbccddec, y); - } -} - -int testInt64ShrByNegative1(int a, int b) { - int x = a + 1; - int y = a - 2; - try { - x = a >> b; - Expect.fail('Shift by negative count should throw an error'); - } on ArgumentError { - Expect.equals(0x778899aabbccddef, x); - Expect.equals(0x778899aabbccddec, y); - } -} - -int testInt64ShrByNegative2(int a, int b) { - int x = a + 1; - int y = a - 2; - try { - x = shr(a, b); - Expect.fail('Shift by negative count should throw an error'); - } on ArgumentError { - Expect.equals(0x778899aabbccddef, x); - Expect.equals(0x778899aabbccddec, y); - } -} - -int testInt64ShrByNegative3(int a) { - int x = a + 1; - int y = a - 2; - try { - int i = -64; - x = a >> i; - Expect.fail('Shift by negative count should throw an error'); - } on ArgumentError { - Expect.equals(0x778899aabbccddef, x); - Expect.equals(0x778899aabbccddec, y); - } -} - -int testInt64ShlByLarge1(int a, int b) { - int x = a << b; - Expect.equals(0, x); -} - -int testInt64ShlByLarge2(int a) { - int i = 64; - int x = a << i; - Expect.equals(0, x); -} - -int testInt64ShlByLarge3(int a) { - int i = 0x7fffffffffffffff; - int x = a << i; - Expect.equals(0, x); -} - -int testInt64ShrByLarge1a(int a, int b) { - int x = a >> b; - Expect.equals(0, x); -} - -int testInt64ShrByLarge1b(int a, int b) { - int x = a >> b; - Expect.equals(-1, x); -} - -int testInt64ShrByLarge2a(int a) { - int i = 64; - int x = a >> i; - Expect.equals(0, x); -} - -int testInt64ShrByLarge2b(int a) { - int i = 64; - int x = a >> i; - Expect.equals(-1, x); -} - -int testInt64ShrByLarge3a(int a) { - int i = 0x7fffffffffffffff; - int x = a >> i; - Expect.equals(0, x); -} - -int testInt64ShrByLarge3b(int a) { - int i = 0x7fffffffffffffff; - int x = a >> i; - Expect.equals(-1, x); -} - -int testUint32ShlByNegative1(int a, int b) { - int x = (a & 0xfff) + 1; - int y = (a & 0xfff) - 2; - try { - x = ((a & 0xffff) << b) & 0xffff; - Expect.fail('Shift by negative count should throw an error'); - } on ArgumentError { - Expect.equals(0xdef, x); - Expect.equals(0xdec, y); - } - return x; -} - -int testUint32ShlByNegative2(int a, int b) { - int x = (a & 0xfff) + 1; - int y = (a & 0xfff) - 2; - try { - x = shlUint32(a, b); - Expect.fail('Shift by negative count should throw an error'); - } on ArgumentError { - Expect.equals(0xdef, x); - Expect.equals(0xdec, y); - } -} - -int testUint32ShlByNegative3(int a) { - int x = (a & 0xfff) + 1; - int y = (a & 0xfff) - 2; - try { - int i = -64; - x = ((a & 0xffff) << i) & 0xffff; - Expect.fail('Shift by negative count should throw an error'); - } on ArgumentError { - Expect.equals(0xdef, x); - Expect.equals(0xdec, y); - } -} - -int testUint32ShrByNegative1(int a, int b) { - int x = (a & 0xfff) + 1; - int y = (a & 0xfff) - 2; - try { - x = ((a & 0xffff) >> b) & 0xffff; - Expect.fail('Shift by negative count should throw an error'); - } on ArgumentError { - Expect.equals(0xdef, x); - Expect.equals(0xdec, y); - } -} - -int testUint32ShrByNegative2(int a, int b) { - int x = (a & 0xfff) + 1; - int y = (a & 0xfff) - 2; - try { - x = shrUint32(a, b); - Expect.fail('Shift by negative count should throw an error'); - } on ArgumentError { - Expect.equals(0xdef, x); - Expect.equals(0xdec, y); - } -} - -int testUint32ShrByNegative3(int a) { - int x = (a & 0xfff) + 1; - int y = (a & 0xfff) - 2; - try { - int i = -64; - x = ((a & 0xffff) >> i) & 0xffff; - Expect.fail('Shift by negative count should throw an error'); - } on ArgumentError { - Expect.equals(0xdef, x); - Expect.equals(0xdec, y); - } -} - -int testUint32ShlByLarge1(int a, int b) { - int x = ((a & 0xffff) << b) & 0xffff; - Expect.equals(0, x); -} - -int testUint32ShlByLarge2(int a) { - int i = 64; - int x = ((a & 0xffff) << i) & 0xffff; - Expect.equals(0, x); -} - -int testUint32ShlByLarge3(int a) { - int i = 0x7fffffffffffffff; - int x = ((a & 0xffff) << i) & 0xffff; - Expect.equals(0, x); -} - -int testUint32ShrByLarge1(int a, int b) { - int x = ((a & 0xffff) >> b) & 0xffff; - Expect.equals(0, x); -} - -int testUint32ShrByLarge2(int a) { - int i = 64; - int x = ((a & 0xffff) >> i) & 0xffff; - Expect.equals(0, x); -} - -int testUint32ShrByLarge3(int a) { - int i = 0x7fffffffffffffff; - int x = ((a & 0xffff) >> i) & 0xffff; - Expect.equals(0, x); -} - -doTests1() { - testInt64ShlByNegative1(v1, negativeSmi); - testInt64ShlByNegative2(v1, negativeSmi); - testInt64ShlByNegative3(v1); - - testInt64ShrByNegative1(v1, negativeSmi); - testInt64ShrByNegative2(v1, negativeSmi); - testInt64ShrByNegative3(v1); - - testInt64ShlByLarge1(v1, smi); - testInt64ShlByLarge1(v3, smi); - - testInt64ShlByLarge2(v1); - testInt64ShlByLarge2(v3); - - testInt64ShlByLarge3(v1); - testInt64ShlByLarge3(v3); - - testInt64ShrByLarge1a(v1, smi); - testInt64ShrByLarge1b(v3, smi); - - testInt64ShrByLarge2a(v1); - testInt64ShrByLarge2b(v3); - - testInt64ShrByLarge3a(v1); - testInt64ShrByLarge3b(v3); - - testUint32ShlByNegative1(v1, negativeSmi); - testUint32ShlByNegative2(v1, negativeSmi); - testUint32ShlByNegative3(v1); - - testUint32ShrByNegative1(v1, negativeSmi); - testUint32ShrByNegative2(v1, negativeSmi); - testUint32ShrByNegative3(v1); - - testUint32ShlByLarge1(v1, smi); - testUint32ShlByLarge1(v3, smi); - - testUint32ShlByLarge2(v1); - testUint32ShlByLarge2(v3); - - testUint32ShlByLarge3(v1); - testUint32ShlByLarge3(v3); - - testUint32ShrByLarge1(v1, smi); - testUint32ShrByLarge1(v3, smi); - - testUint32ShrByLarge2(v1); - testUint32ShrByLarge2(v3); - - testUint32ShrByLarge3(v1); - testUint32ShrByLarge3(v3); -} - -doTests2() { - testInt64ShlByNegative1(v1, negativeInt64); - testInt64ShlByNegative2(v1, negativeInt64); - - testInt64ShrByNegative1(v1, negativeInt64); - testInt64ShrByNegative2(v1, negativeInt64); - - testInt64ShlByLarge1(v1, v2); - testInt64ShlByLarge1(v3, v2); - - testInt64ShrByLarge1a(v1, v2); - testInt64ShrByLarge1b(v3, v2); - - testUint32ShlByNegative1(v1, negativeInt64); - testUint32ShlByNegative2(v1, negativeInt64); - - testUint32ShrByNegative1(v1, negativeInt64); - testUint32ShrByNegative2(v1, negativeInt64); - - testUint32ShlByLarge1(v1, v2); - testUint32ShlByLarge1(v3, v2); - - testUint32ShrByLarge1(v1, v2); - testUint32ShrByLarge1(v3, v2); -} - -main() { - for (var i = 0; i < 20; ++i) { - doTests1(); - } - for (var i = 0; i < 50; ++i) { - doTests2(); - } -} diff --git a/tests/language_2/vm/smi_widening_test.dart b/tests/language_2/vm/smi_widening_test.dart deleted file mode 100644 index 0774909cb8f..00000000000 --- a/tests/language_2/vm/smi_widening_test.dart +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2018, 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 - -// VMOptions=--deterministic --optimization-counter-threshold=102 --optimization-filter=Box_ - -import 'package:expect/expect.dart'; - -const int kLimit = 100; - -main() { - // Get all 3 functions optimized with _Smi's. - optimizeMilliseconds(1); - optimizeMicroseconds(1); - optimizeConstructor(1); - - // Now we trigger a store of a _Mint into the Box._value - testMints(2048); -} - -@pragma('vm:never-inline') -optimizeConstructor(int value) { - for (int i = 0; i < kLimit; ++i) { - new Box(milliseconds: value); - } -} - -@pragma('vm:never-inline') -optimizeMicroseconds(int value) { - final d = new Box(milliseconds: value); - for (int i = 0; i < kLimit; ++i) { - Expect.equals(value * 1000, d.inMicroseconds); - } -} - -@pragma('vm:never-inline') -optimizeMilliseconds(int value) { - final d = new Box(seconds: value); - for (int i = 0; i < kLimit; ++i) { - Expect.equals(value * 1000, d.inMilliseconds); - } -} - -@pragma('vm:never-inline') -testMints(int value) { - final d = new Box(seconds: value); - for (int i = 0; i < kLimit; ++i) { - Expect.equals(value * 1000 * 1000, d.inMicroseconds); - Expect.equals(value * 1000, d.inMilliseconds); - } -} - -int c = 0; - -class Box { - final int _value; - - @pragma('vm:never-inline') - Box( - {int days: 0, - int hours: 0, - int minutes: 0, - int seconds: 0, - int milliseconds: 0, - int microseconds: 0}) - : this._microseconds(1000 * 1000 * 60 * 60 * 24 * days + - 1000 * 1000 * 60 * 60 * hours + - 1000 * 1000 * 60 * minutes + - 1000 * 1000 * seconds + - 1000 * milliseconds + - microseconds); - - Box._microseconds(this._value); - - @pragma('vm:never-inline') - int get inMilliseconds => _value ~/ 1000; - - @pragma('vm:never-inline') - int get inMicroseconds => _value; -} diff --git a/tests/language_2/vm/store_elimination_vm_test.dart b/tests/language_2/vm/store_elimination_vm_test.dart deleted file mode 100644 index 996b481aa19..00000000000 --- a/tests/language_2/vm/store_elimination_vm_test.dart +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2012, 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. -// Test correctness of side effects tracking used by load to load forwarding. - -// @dart = 2.9 - -// VMOptions=--optimization-counter-threshold=10 --no-background-compilation - -import "package:expect/expect.dart"; - -class C { - var x; - var y; - final z = 123; -} - -class D { - var x = 0.0; -} - -var array = [0, 0]; - -s1(a) { - a.x = 42; - a.x = 43; - return a.x; -} - -void foo(a) { - Expect.equals(42, a.x); -} - -s1a(a) { - a.x = 42; - foo(a); - a.x = 43; - return a.x; -} - -s2() { - var t = new C(); - return t; -} - -s3(a, b) { - a.x = b + 1; - if (b % 2 == 0) { - a.x = 0; - } else { - a.x = 0; - } - return a.x; -} - -s4(a, b) { - a.x = b + 1.0; - if (b % 2 == 0) { - a.x = b + 2.0; - } - a.x = b + 1.0; - return a.x; -} - -test_with_context() { - f(a) { - var b = a + 1; - return (() => b + 1)(); - } - - for (var i = 0; i < 100000; i++) f(42); - Expect.equals(44, f(42)); -} - -test_with_instance() { - for (var i = 0; i < 20; i++) Expect.equals(43, s1(new C())); - for (var i = 0; i < 20; i++) Expect.equals(43, s1a(new C())); - for (var i = 0; i < 20; i++) Expect.equals(123, s2().z); - for (var i = 0; i < 20; i++) Expect.equals(0, s3(new C(), i)); - for (var i = 0; i < 20; i++) Expect.equals(i + 1.0, s4(new D(), i)); -} - -arr1(a) { - a[0] = 42; - a[0] = 43; - Expect.equals(a[0], 43); - return a[0]; -} - -arr2(a, b) { - a[0] = 42; - a[b % 2] = 43; - Expect.equals(a[b % 2], 43); - return a[0]; -} - -test_with_array() { - for (var i = 0; i < 20; i++) Expect.equals(43, arr1(array)); - for (var i = 0; i < 20; i++) { - Expect.equals(i % 2 == 0 ? 43 : 42, arr2(array, i)); - } -} - -var st = 0; - -static1(b) { - st = 42; - if (b % 2 == 0) { - st = 2; - } - st = b + 1; - Expect.equals(st, b + 1); - return st; -} - -test_with_static() { - for (var i = 0; i < 20; i++) Expect.equals(i + 1, static1(i)); -} - -main() { - test_with_instance(); - test_with_array(); - test_with_context(); - test_with_static(); -} diff --git a/tests/language_2/vm/store_to_load_forwarding_phis_vm_test.dart b/tests/language_2/vm/store_to_load_forwarding_phis_vm_test.dart deleted file mode 100644 index 14c718c80cf..00000000000 --- a/tests/language_2/vm/store_to_load_forwarding_phis_vm_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2013, 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. -// Test correct handling of phis with only environment uses that were inserted -// by store to load forwarding. -// VMOptions=--optimization_counter_threshold=100 --no-background_compilation - -// @dart = 2.9 - -library store_to_load_forwarding_phis_vm_test; - -import 'dart:async'; - -class A { - var _foo; - - get foo { - if (_foo == null) { - _foo = new A(); - } - return _foo; - } -} - -foo(obj) { - var a = obj.foo; - return new Future.value().then((val) {}); -} - -main() { - final obj = new A(); - for (var i = 0; i < 200; i++) { - foo(obj); - } -} diff --git a/tests/language_2/vm/string_polymorphic_test.dart b/tests/language_2/vm/string_polymorphic_test.dart deleted file mode 100644 index 6ab734fc23f..00000000000 --- a/tests/language_2/vm/string_polymorphic_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2014, 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. -// VMOptions=--optimization_counter_threshold=10 --no-background_compilation - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -test1(String a, String b) { - return a == b; -} - -var LEN = 500; - -var ITER = 100000 / LEN; - -measure(fn, a, b) { - for (var i = 0; i < ITER; i++) { - Expect.equals(true, fn(a, b)); - } -} - -main() { - var n = LEN; - StringBuffer s = new StringBuffer(); - for (var i = 0; i < n; ++i) s.write("A"); - String t = s.toString(); - String u = s.toString(); - String v = s.toString() + "\u1234"; - String w = s.toString() + "\u1234"; - for (var i = 0; i < 10; i++) measure(test1, t, u); - for (var i = 0; i < 10; i++) measure(test1, v, w); -} diff --git a/tests/language_2/vm/symbols_test.dart b/tests/language_2/vm/symbols_test.dart deleted file mode 100644 index b022a24b024..00000000000 --- a/tests/language_2/vm/symbols_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'package:expect/expect.dart'; - -void main() { - print(const Symbol(null)); //# 01: compile-time error - print(const Symbol(r'')); //# 02: ok - Expect.isTrue(identical(const Symbol(r'foo'), #foo)); //# 03: ok - Expect.isTrue(identical(const Symbol(r'$foo'), #$foo)); //# 03: ok - Expect.isTrue(identical(const Symbol(r'$_'), #$_)); //# 03: ok - Expect.isTrue(identical(const Symbol(r'+'), #+)); //# 03: ok - Expect.isTrue(identical(const Symbol(r'[]='), #[]=)); //# 03: ok - Expect.isTrue(identical(const Symbol(r'_foo'), #_foo)); //# 03: compile-time error - Expect.isTrue(identical(const Symbol(r'_$'), #_$)); //# 03: compile-time error - Expect.isTrue(identical(const Symbol(r'_foo$'), #_foo$)); //# 03: compile-time error - print(const Symbol(r'_+')); //# 03: compile-time error -} diff --git a/tests/language_2/vm/tree_shake_type_args_in_constant_test.dart b/tests/language_2/vm/tree_shake_type_args_in_constant_test.dart deleted file mode 100644 index 5d1e986dced..00000000000 --- a/tests/language_2/vm/tree_shake_type_args_in_constant_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2018, 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 - -// This test verifies that if a class is only used as a type argument of -// a constant object, it is not removed by tree shaker. - -import "package:expect/expect.dart"; - -@pragma("vm:entry-point") // Prevent obfuscation -abstract class A {} - -class B { - const B(); - toString() => T.toString(); -} - -void main() { - const x = const B(); - Expect.equals("A", x.toString()); -} diff --git a/tests/language_2/vm/type_cast_vm_test.dart b/tests/language_2/vm/type_cast_vm_test.dart deleted file mode 100644 index f8b32e0e6a1..00000000000 --- a/tests/language_2/vm/type_cast_vm_test.dart +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) 2012, 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. -// VMOptions=--no_show_internal_names -// Dart test program testing type casts. - -// @dart = 2.9 -import "package:expect/expect.dart"; - -checkSecondFunction( - String expectedFileAndLine, int expectedColum, StackTrace stacktrace) { - var topLine = stacktrace.toString().split("\n")[0]; - int startPos = topLine.lastIndexOf("/"); - int endPos = topLine.lastIndexOf(")"); - String subs = topLine.substring(startPos + 1, endPos); - if (subs != expectedFileAndLine) { - Expect.equals("$expectedFileAndLine:$expectedColum", subs); - } -} - -// Test that the initializer expression gets properly skipped. -bool b = "foo" as bool; - -class TypeTest { - static test() { - int result = 0; - try { - var i = "hello" as int; // Throws a TypeError - } catch (error) { - result = 1; - Expect.type(error); - var msg = error.toString(); - Expect.isTrue(msg.contains("int")); // dstType - Expect.isTrue(msg.contains("String")); // srcType - checkSecondFunction("type_cast_vm_test.dart:28", 23, error.stackTrace); - } - return result; - } - - static testSideEffect() { - int result = 0; - int index() { - result++; - return 0; - } - - try { - var a = new List.filled(1, null) as List; - a[0] = 0; - a[index()]++; // Type check succeeds, but does not create side effects. - Expect.equals(1, a[0]); - } catch (error) { - result = 100; - } - return result; - } - - static testArgument() { - int result = 0; - int f(int i) { - return i; - } - - try { - int i = f("hello" as int); // Throws a TypeError - } catch (error) { - result = 1; - Expect.type(error); - var msg = error.toString(); - Expect.isTrue(msg.contains("int")); // dstType - Expect.isTrue(msg.contains("String")); // srcType - checkSecondFunction("type_cast_vm_test.dart:65", 25, error.stackTrace); - } - return result; - } - - static testReturn() { - int result = 0; - int f(String s) { - return s as int; // Throws a TypeError - } - - try { - int i = f("hello"); - } catch (error) { - result = 1; - Expect.type(error); - var msg = error.toString(); - Expect.isTrue(msg.contains("int")); // dstType - Expect.isTrue(msg.contains("String")); // srcType - checkSecondFunction("type_cast_vm_test.dart:80", 16, error.stackTrace); - } - return result; - } - - static var field = "hello"; - - static testField() { - int result = 0; - Expect.equals(5, (field as String).length); - try { - field as int; // Throws a TypeError - } catch (error) { - result = 1; - var msg = error.toString(); - Expect.isTrue(msg.contains("int")); // dstType - Expect.isTrue(msg.contains("String")); // srcType - checkSecondFunction("type_cast_vm_test.dart:102", 13, error.stackTrace); - } - return result; - } - - static testAnyFunction() { - int result = 0; - Function anyFunction; - f() {} - ; - anyFunction = f as Function; // No error. - anyFunction = null as Function; // No error. - try { - var i = f as int; // Throws a TypeError if type checks are enabled. - } catch (error) { - result = 1; - var msg = error.toString(); - Expect.isTrue(msg.contains("int")); // dstType - Expect.isTrue(msg.contains("() => Null")); // srcType - checkSecondFunction("type_cast_vm_test.dart:121", 17, error.stackTrace); - } - return result; - } - - static testMain() { - Expect.equals(1, test()); - Expect.equals(1, testSideEffect()); - Expect.equals(1, testArgument()); - Expect.equals(1, testReturn()); - Expect.equals(1, testField()); - Expect.equals(1, testAnyFunction()); - } -} - -main() { - TypeTest.testMain(); -} diff --git a/tests/language_2/vm/type_of_call_via_getter_test.dart b/tests/language_2/vm/type_of_call_via_getter_test.dart deleted file mode 100644 index e5ec68a3f2a..00000000000 --- a/tests/language_2/vm/type_of_call_via_getter_test.dart +++ /dev/null @@ -1,53 +0,0 @@ -// 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. - -// @dart = 2.9 - -// This test verifies that compiler infers correct type from call via getter. - -// VMOptions=--no_background_compilation --optimization_counter_threshold=10 - -import "package:expect/expect.dart"; - -typedef String IntFunctionType(int _); - -String functionImpl(int a) => 'abc'; - -class Box { - IntFunctionType get fun => functionImpl; -} - -var box = new Box(); - -void test1() { - Expect.isFalse(box.fun(42) is Function); - Expect.isTrue(box.fun(42) is String); -} - -class Callable { - String call(int i) => 'qwe'; -} - -class Box2 { - Callable get fun => new Callable(); -} - -var box2 = new Box2(); - -void test2() { - Expect.isFalse(box2.fun is Function); - Expect.isTrue(box2.fun is Callable); - Expect.isFalse(box2.fun(42) is Function); - Expect.isFalse(box2.fun(42) is Callable); - Expect.isTrue(box2.fun(42) is String); -} - -void main() { - for (int i = 0; i < 20; ++i) { - test1(); - } - for (int i = 0; i < 20; ++i) { - test2(); - } -} diff --git a/tests/language_2/vm/type_propagation_test.dart b/tests/language_2/vm/type_propagation_test.dart deleted file mode 100644 index 40645a9b9eb..00000000000 --- a/tests/language_2/vm/type_propagation_test.dart +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2015, 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. -// VMOptions=--optimization-counter-threshold=1000 --max-polymorphic-checks=1 --no-background-compilation - -// @dart = 2.9 - -// Test correct loop invariant code motion and type propagation from is-checks -// and null-comparisons. - -class B { - var b; - B(this.b); -} - -class C { - final f0 = null; - - final a; - C() : a = new B(0); -} - -foo(x) { - for (var i = 0; i < 10; i++) { - i + i; - i + i; - if (x is C) { - x.a.b < 0; - } - } -} - -class Y { - var f = null; -} - -bar(y) { - var x = y.f; - for (var i = 0; i < 10; i++) { - if (x != null) { - x.a.b < 0; - } - } -} - -main() { - var o = new Y(); - o.f = new C(); - bar(o); - o.f = null; - bar(o); - - for (var i = 0; i < 1000; i++) bar(o); - - foo(new C()); - foo(0); - - for (var i = 0; i < 1000; i++) foo(0); -} diff --git a/tests/language_2/vm/type_vm_test.dart b/tests/language_2/vm/type_vm_test.dart deleted file mode 100644 index cd9ecee7305..00000000000 --- a/tests/language_2/vm/type_vm_test.dart +++ /dev/null @@ -1,189 +0,0 @@ -// 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. -// VMOptions=--enable_type_checks --enable_asserts --no_show_internal_names -// Dart test program testing type checks. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -class C { - factory C() { - return 1; //# 01: compile-time error - } -} - -class TypeTest { - static test() { - int i = "hello"; //# 02: compile-time error - return 1; - } - - static testSideEffect() { - int result = 0; - int index() { - result++; - return 0; - } - - try { - List a = new List.filled(1, null); - a[0] = 0; - a[index()]++; // Type check succeeds, but does not create side effects. - Expect.equals(1, a[0]); - } on TypeError catch (error) { - result = 100; - } - return result; - } - - static testArgument() { - int f(int i) { - return i; - } - int i = f("hello"); //# 03: compile-time error - return 1; - } - - static testReturn() { - int f(String s) { //# 04: continued - return s; //# 04: compile-time error - } //# 04: continued - - int i = f("hello"); //# 04: continued - return 1; - } - - static int field; - static testField() { - field = "hello"; //# 05: compile-time error - return 1; - } - - static testAnyFunction() { - Function anyFunction; - f() {} - anyFunction = f; // No error. - int i = f; //# 06: compile-time error - return 1; - } - - static testVoidFunction() { - Function anyFunction; - void acceptVoidFunObj(void voidFunObj(Object obj)) {} - void acceptObjFunObj(Object objFunObj(Object obj)) {} - void voidFunObj(Object obj) {} - Object objFunObj(Object obj) { - return obj; - } - - ; - anyFunction = voidFunObj; // No error. - anyFunction = objFunObj; // No error. - acceptVoidFunObj(voidFunObj); - acceptVoidFunObj(objFunObj); - acceptObjFunObj(objFunObj); - acceptObjFunObj(voidFunObj); - return 1; - } - - static testFunctionNum() { - Function anyFunction; - void acceptFunNum(void funNum(num n)) {} - void funObj(Object obj) {} - void funNum(num n) {} - void funInt(int i) {} - void funString(String s) {} - anyFunction = funObj; // No error. - anyFunction = funNum; // No error. - anyFunction = funInt; // No error. - anyFunction = funString; // No error. - acceptFunNum(funObj); // No error. - acceptFunNum(funNum); // No error. - acceptFunNum(funInt); //# 27: compile-time error - acceptFunNum(funString); //# 08: compile-time error - return 1; - } - - static testBoolCheck() { - bool i = !"hello"; //# 09: compile-time error - while ("hello") {} //# 10: compile-time error - do {} while ("hello"); //# 11: compile-time error - for (; "hello";) {} //# 12: compile-time error - int i = "hello" ? 1 : 0; //# 13: compile-time error - if ("hello") {} //# 14: compile-time error - if ("hello" || false) {} //# 15: compile-time error - if (false || "hello") {} //# 16: compile-time error - if (null) {} //# 28: runtime error - return 9; - } - - static int testFactory() { - var x = new C(); //# 01: continued - return 1; - } - - static int testListAssignment() { - int result = 0; - { - var a = new List.filled(5, null); - List a0 = a; - List ao = a; // No error. - List ai = a; //# 30: runtime error - List an = a; //# 31: runtime error - List as = a; //# 32: runtime error - } - { - var a = new List.filled(5, null); - List a0 = a; - List ao = a; - List ai = a; //# 33: runtime error - List an = a; //# 34: runtime error - List as = a; //# 35: runtime error - } - { - var a = new List.filled(5, null); - List a0 = a; - List ao = a; - List ai = a; - List an = a; - List as = a; //# 22: compile-time error - } - { - var a = new List.filled(5, null); - List a0 = a; - List ao = a; - List ai = a; //# 36: runtime error - List an = a; - List as = a; //# 24: compile-time error - } - { - var a = new List.filled(5, null); - List a0 = a; - List ao = a; - List ai = a; //# 25: compile-time error - List an = a; //# 26: compile-time error - List as = a; - } - return 8; - } - - static testMain() { - Expect.equals(1, test()); - Expect.equals(1, testSideEffect()); - Expect.equals(1, testArgument()); - Expect.equals(1, testReturn()); - Expect.equals(1, testField()); - Expect.equals(1, testAnyFunction()); - Expect.equals(1, testVoidFunction()); - Expect.equals(1, testFunctionNum()); - Expect.equals(9, testBoolCheck()); - Expect.equals(1, testFactory()); - Expect.equals(8, testListAssignment()); - } -} - -main() { - TypeTest.testMain(); -} diff --git a/tests/language_2/vm/uint32_add_test.dart b/tests/language_2/vm/uint32_add_test.dart deleted file mode 100644 index 4c30e8e604b..00000000000 --- a/tests/language_2/vm/uint32_add_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2014, 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. -// VMOptions=--optimization_counter_threshold=10 --no-background_compilation - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -trunc(x) => x & 0xFFFFFFFF; - -f(t, x) => t(x) + 1; - -g(t, x) => t(x + 1); - -// Foo should be entirely replaced by Uint32 operations. Running with -// --trace-integer-ir-selection should result in: -// CheckStackOverflow:4() -// v22 <- UnboxUint32:14(v2) -// v24 <- UnboxUint32:14(v3) -// v6 <- BinaryUint32Op:14(+, v22 , v24 ) -// v26 <- UnboxUint32:22(v4) -// v8 <- BinaryUint32Op:22(+, v6 , v26 ) -// v28 <- UnboxUint32:30(v5) -// v10 <- BinaryUint32Op:30(+, v8 , v28 ) -// v30 <- UnboxUint32:14(v21) -// v19 <- BinaryUint32Op:14(&, v10 , v30 ) -// v32 <- BoxUint32:90(v19 ) -// Return:38(v32 ) -foo(a, b, c, i) { - return trunc(a + b + c + i); -} - -main() { - for (var i = 0; i < 20000; i++) { - Expect.equals(0x100000000, f(trunc, 0xFFFFFFFF)); - Expect.equals(0x0, g(trunc, 0xFFFFFFFF)); - } - - var a = 0xFFFFFFFF; - var b = 0xCCCCCCCC; - var c = 0x33333335; - - for (var i = 0; i < 20000; i++) { - Expect.equals(i, foo(a, b, c, i)); - } -} diff --git a/tests/language_2/vm/uint32_right_shift_test.dart b/tests/language_2/vm/uint32_right_shift_test.dart deleted file mode 100644 index f755584d102..00000000000 --- a/tests/language_2/vm/uint32_right_shift_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2014, 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. -// VMOptions=--optimization_counter_threshold=10 --no-background_compilation - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -trunc(x) => x & 0xFFFFFFFF; - -foo(t, x) => t(x >> 15); - -main() { - for (var i = 0; i < 20000; i++) { - Expect.equals(0x00010000, foo(trunc, 0x80000000)); - } - for (var i = 0; i < 20000; i++) { - Expect.equals(0x10000000, foo(trunc, 0x80000000000)); - } -} diff --git a/tests/language_2/vm/uint32_shift_test.dart b/tests/language_2/vm/uint32_shift_test.dart deleted file mode 100644 index 2c8a53070e0..00000000000 --- a/tests/language_2/vm/uint32_shift_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2014, 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. -// VMOptions=--optimization_counter_threshold=10 --no-background_compilation - -// @dart = 2.9 - -import 'package:expect/expect.dart'; - -class Good { - use(x) { - return x & 0x1; - } -} - -class Bad { - use(x) { - return x & 0x100000000; - } -} - -f(o, x) => o.use(x << 1); - -main() { - final good = new Good(); - final bad = new Bad(); - for (var i = 0; i < 20000; i++) { - Expect.equals(0, f(good, 0x80000000)); - } - Expect.equals(0x100000000, f(bad, 0x80000000)); -} diff --git a/tests/language_2/vm/unaligned_float_access_literal_index_test.dart b/tests/language_2/vm/unaligned_float_access_literal_index_test.dart deleted file mode 100644 index 80be22599e2..00000000000 --- a/tests/language_2/vm/unaligned_float_access_literal_index_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2016, 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. -// VMOptions=--optimization_counter_threshold=10 --no-background_compilation - -// @dart = 2.9 - -import 'dart:typed_data'; -import 'package:expect/expect.dart'; - -unalignedFloat32() { - var bytes = new ByteData(64); - bytes.setFloat32(0, 16.25, Endian.host); - Expect.equals(16.25, bytes.getFloat32(0, Endian.host)); - bytes.setFloat32(1, 32.125, Endian.host); - Expect.equals(32.125, bytes.getFloat32(1, Endian.host)); - bytes.setFloat32(2, 16.25, Endian.host); - Expect.equals(16.25, bytes.getFloat32(2, Endian.host)); - bytes.setFloat32(3, 32.125, Endian.host); - Expect.equals(32.125, bytes.getFloat32(3, Endian.host)); -} - -unalignedFloat64() { - var bytes = new ByteData(64); - bytes.setFloat64(0, 16.25, Endian.host); - Expect.equals(16.25, bytes.getFloat64(0, Endian.host)); - bytes.setFloat64(1, 32.125, Endian.host); - Expect.equals(32.125, bytes.getFloat64(1, Endian.host)); - bytes.setFloat64(2, 16.25, Endian.host); - Expect.equals(16.25, bytes.getFloat64(2, Endian.host)); - bytes.setFloat64(3, 32.125, Endian.host); - Expect.equals(32.125, bytes.getFloat64(3, Endian.host)); - bytes.setFloat64(4, 16.25, Endian.host); - Expect.equals(16.25, bytes.getFloat64(4, Endian.host)); - bytes.setFloat64(5, 32.125, Endian.host); - Expect.equals(32.125, bytes.getFloat64(5, Endian.host)); - bytes.setFloat64(6, 16.25, Endian.host); - Expect.equals(16.25, bytes.getFloat64(6, Endian.host)); - bytes.setFloat64(7, 32.125, Endian.host); - Expect.equals(32.125, bytes.getFloat64(7, Endian.host)); -} - -main() { - for (var i = 0; i < 20; i++) { - unalignedFloat32(); - unalignedFloat64(); - } -} diff --git a/tests/language_2/vm/unaligned_float_access_register_index_test.dart b/tests/language_2/vm/unaligned_float_access_register_index_test.dart deleted file mode 100644 index c654599d518..00000000000 --- a/tests/language_2/vm/unaligned_float_access_register_index_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2016, 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. -// VMOptions=--optimization_counter_threshold=10 --no-background_compilation - -// @dart = 2.9 - -import 'dart:typed_data'; -import 'package:expect/expect.dart'; - -unalignedFloat32() { - var bytes = new ByteData(64); - for (var i = 0; i < 4; i++) { - bytes.setFloat32(i, 16.25, Endian.host); - Expect.equals(16.25, bytes.getFloat32(i, Endian.host)); - } -} - -unalignedFloat64() { - var bytes = new ByteData(64); - for (var i = 0; i < 8; i++) { - bytes.setFloat64(i, 16.25, Endian.host); - Expect.equals(16.25, bytes.getFloat64(i, Endian.host)); - } -} - -main() { - for (var i = 0; i < 20; i++) { - unalignedFloat32(); - unalignedFloat64(); - } -} diff --git a/tests/language_2/vm/unaligned_integer_access_literal_index_test.dart b/tests/language_2/vm/unaligned_integer_access_literal_index_test.dart deleted file mode 100644 index 8f6937a8a6a..00000000000 --- a/tests/language_2/vm/unaligned_integer_access_literal_index_test.dart +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) 2016, 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. -// VMOptions=--optimization_counter_threshold=10 --no-background_compilation - -// @dart = 2.9 - -import 'dart:typed_data'; -import 'package:expect/expect.dart'; - -unalignedUint16() { - var bytes = new ByteData(64); - bytes.setUint16(0, 0xABCD, Endian.host); - Expect.equals(0xABCD, bytes.getUint16(0, Endian.host)); - bytes.setUint16(1, 0xBCDE, Endian.host); - Expect.equals(0xBCDE, bytes.getUint16(1, Endian.host)); -} - -unalignedInt16() { - var bytes = new ByteData(64); - bytes.setInt16(0, -0x1234, Endian.host); - Expect.equals(-0x1234, bytes.getInt16(0, Endian.host)); - bytes.setInt16(1, -0x2345, Endian.host); - Expect.equals(-0x2345, bytes.getInt16(1, Endian.host)); -} - -unalignedUint32() { - var bytes = new ByteData(64); - bytes.setUint32(0, 0xABCDABCD, Endian.host); - Expect.equals(0xABCDABCD, bytes.getUint32(0, Endian.host)); - bytes.setUint32(1, 0xBCDEBCDE, Endian.host); - Expect.equals(0xBCDEBCDE, bytes.getUint32(1, Endian.host)); - bytes.setUint32(2, 0xABCDABCD, Endian.host); - Expect.equals(0xABCDABCD, bytes.getUint32(2, Endian.host)); - bytes.setUint32(3, 0xBCDEBCDE, Endian.host); - Expect.equals(0xBCDEBCDE, bytes.getUint32(3, Endian.host)); -} - -unalignedInt32() { - var bytes = new ByteData(64); - bytes.setInt32(0, -0x12341234, Endian.host); - Expect.equals(-0x12341234, bytes.getInt32(0, Endian.host)); - bytes.setInt32(1, -0x23452345, Endian.host); - Expect.equals(-0x23452345, bytes.getInt32(1, Endian.host)); - bytes.setInt32(2, -0x12341234, Endian.host); - Expect.equals(-0x12341234, bytes.getInt32(2, Endian.host)); - bytes.setInt32(3, -0x23452345, Endian.host); - Expect.equals(-0x23452345, bytes.getInt32(3, Endian.host)); -} - -unalignedUint64() { - var bytes = new ByteData(64); - bytes.setUint64(0, 0xABCDABCD12345678, Endian.host); - Expect.equals(0xABCDABCD12345678, bytes.getUint64(0, Endian.host)); - bytes.setUint64(1, 0xBCDEBCDE12345678, Endian.host); - Expect.equals(0xBCDEBCDE12345678, bytes.getUint64(1, Endian.host)); - bytes.setUint64(2, 0xABCDABCD12345678, Endian.host); - Expect.equals(0xABCDABCD12345678, bytes.getUint64(2, Endian.host)); - bytes.setUint64(3, 0xBCDEBCDE12345678, Endian.host); - Expect.equals(0xBCDEBCDE12345678, bytes.getUint64(3, Endian.host)); - bytes.setUint64(4, 0xABCDABCD12345678, Endian.host); - Expect.equals(0xABCDABCD12345678, bytes.getUint64(4, Endian.host)); - bytes.setUint64(5, 0xBCDEBCDE12345678, Endian.host); - Expect.equals(0xBCDEBCDE12345678, bytes.getUint64(5, Endian.host)); - bytes.setUint64(6, 0xABCDABCD12345678, Endian.host); - Expect.equals(0xABCDABCD12345678, bytes.getUint64(6, Endian.host)); - bytes.setUint64(7, 0xBCDEBCDE12345678, Endian.host); - Expect.equals(0xBCDEBCDE12345678, bytes.getUint64(7, Endian.host)); -} - -unalignedInt64() { - var bytes = new ByteData(64); - bytes.setInt64(0, -0x12341234ABCDABCD, Endian.host); - Expect.equals(-0x12341234ABCDABCD, bytes.getInt64(0, Endian.host)); - bytes.setInt64(1, -0x23452345ABCDABCD, Endian.host); - Expect.equals(-0x23452345ABCDABCD, bytes.getInt64(1, Endian.host)); - bytes.setInt64(2, -0x12341234ABCDABCD, Endian.host); - Expect.equals(-0x12341234ABCDABCD, bytes.getInt64(2, Endian.host)); - bytes.setInt64(3, -0x23452345ABCDABCD, Endian.host); - Expect.equals(-0x23452345ABCDABCD, bytes.getInt64(3, Endian.host)); - bytes.setInt64(4, -0x12341234ABCDABCD, Endian.host); - Expect.equals(-0x12341234ABCDABCD, bytes.getInt64(4, Endian.host)); - bytes.setInt64(5, -0x23452345ABCDABCD, Endian.host); - Expect.equals(-0x23452345ABCDABCD, bytes.getInt64(5, Endian.host)); - bytes.setInt64(6, -0x12341234ABCDABCD, Endian.host); - Expect.equals(-0x12341234ABCDABCD, bytes.getInt64(6, Endian.host)); - bytes.setInt64(7, -0x23452345ABCDABCD, Endian.host); - Expect.equals(-0x23452345ABCDABCD, bytes.getInt64(7, Endian.host)); -} - -main() { - for (var i = 0; i < 20; i++) { - unalignedUint16(); - unalignedInt16(); - unalignedUint32(); - unalignedInt32(); - unalignedUint64(); - unalignedInt64(); - } -} diff --git a/tests/language_2/vm/unaligned_integer_access_register_index_test.dart b/tests/language_2/vm/unaligned_integer_access_register_index_test.dart deleted file mode 100644 index d949ea5c0c2..00000000000 --- a/tests/language_2/vm/unaligned_integer_access_register_index_test.dart +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2016, 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. -// VMOptions=--optimization_counter_threshold=10 --no-background_compilation - -// @dart = 2.9 - -import 'dart:typed_data'; -import 'package:expect/expect.dart'; - -unalignedUint16() { - var bytes = new ByteData(64); - for (var i = 0; i < 2; i++) { - bytes.setUint16(i, 0xABCD, Endian.host); - Expect.equals(0xABCD, bytes.getUint16(i, Endian.host)); - } -} - -unalignedInt16() { - var bytes = new ByteData(64); - for (var i = 0; i < 2; i++) { - bytes.setInt16(i, -0x1234, Endian.host); - Expect.equals(-0x1234, bytes.getInt16(i, Endian.host)); - } -} - -unalignedUint32() { - var bytes = new ByteData(64); - for (var i = 0; i < 4; i++) { - bytes.setUint32(i, 0xABCDABCD, Endian.host); - Expect.equals(0xABCDABCD, bytes.getUint32(i, Endian.host)); - } -} - -unalignedInt32() { - var bytes = new ByteData(64); - for (var i = 0; i < 4; i++) { - bytes.setInt32(i, -0x12341234, Endian.host); - Expect.equals(-0x12341234, bytes.getInt32(i, Endian.host)); - } -} - -unalignedUint64() { - var bytes = new ByteData(64); - for (var i = 0; i < 8; i++) { - bytes.setUint64(i, 0xABCDABCD12345678, Endian.host); - Expect.equals(0xABCDABCD12345678, bytes.getUint64(i, Endian.host)); - } -} - -unalignedInt64() { - var bytes = new ByteData(64); - for (var i = 0; i < 8; i++) { - bytes.setInt64(i, -0x12341234ABCDABCD, Endian.host); - Expect.equals(-0x12341234ABCDABCD, bytes.getInt64(i, Endian.host)); - } -} - -main() { - for (var i = 0; i < 20; i++) { - unalignedUint16(); - unalignedInt16(); - unalignedUint32(); - unalignedInt32(); - unalignedUint64(); - unalignedInt64(); - } -} diff --git a/tests/language_2/vm/unique_selector_test.dart b/tests/language_2/vm/unique_selector_test.dart deleted file mode 100644 index ce637037e53..00000000000 --- a/tests/language_2/vm/unique_selector_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; - -class A { - _unique_method() => "foo"; - bar() => "A"; -} - -class B { - noSuchMethod(invocation) => "nsm"; - bar() => "B"; -} - -confuse(x) { - try { - throw x; - } catch (e) { - return e; - } - return null; -} - -main() { - var a = confuse(new A()); - Expect.equals("foo", a._unique_method()); - Expect.equals("A", a.bar()); - - var b = confuse(new B()); - Expect.equals("nsm", b._unique_method()); - Expect.equals("B", b.bar()); // Don't propagate type A to b. -} diff --git a/tests/language_2/vm/unreachable_code_test.dart b/tests/language_2/vm/unreachable_code_test.dart deleted file mode 100644 index f16ca815991..00000000000 --- a/tests/language_2/vm/unreachable_code_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2018, 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 - -// Verifies that VM is able to handle certain cases of unreachable code. - -// VMOptions=--no_background_compilation --optimization_counter_threshold=10 - -import "package:expect/expect.dart"; - -class A { - dynamic next; -} - -test1(A arg1, bool arg2, bool arg3) { - assert(arg1.next == (arg2 ?? arg3)); -} - -test2(A arg1, bool arg2, bool arg3) { - print(((throw 'Error') as dynamic).next == (arg2 ?? arg3)); -} - -void doTests() { - test1(new A(), null, null); - Expect.throws(() { - test2(new A(), null, null); - }); -} - -void main() { - for (int i = 0; i < 20; i++) { - doTests(); - } -} diff --git a/tests/language_2/vm/unregistered_closure_in_finally_test.dart b/tests/language_2/vm/unregistered_closure_in_finally_test.dart deleted file mode 100644 index 5b7e30bda51..00000000000 --- a/tests/language_2/vm/unregistered_closure_in_finally_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2017, 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. -// VMOptions=--no-background-compilation - -// @dart = 2.9 - -@pragma('vm:never-inline') -doSomething() { - print("Hello!"); -} - -@pragma('vm:never-inline') -maybeThrow(bool doThrow) { - if (doThrow) { - throw new Exception(); - } -} - -@pragma('vm:never-inline') -run(action) { - try { action(); } catch(e) {} -} - -test(bool doThrow) { - try { - maybeThrow(doThrow); - } finally { - run(() { - doSomething(); // Should not crash here. - }); - } -} - -main() { - try { test(true); } catch(e) {} - try { test(false); } catch(e) {} -} diff --git a/tests/language_2/void/README.md b/tests/language_2/void/README.md deleted file mode 100644 index ad7fa6b07a9..00000000000 --- a/tests/language_2/void/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Feature tests for void - -This directory was created in order to hold tests pertaining to the -Dart feature temporarily known as _generalized void_. This feature -allows the type `void` to occur in many locations where it was -previously a compile-time error, and it is intended to allow -developers to express the intent that the value of certain expressions -is of no interest, and help them to avoid using such values. For more -details, please check the -[feature specification](https://github.com/dart-lang/sdk/blob/main/docs/language/informal/generalized-void.md). \ No newline at end of file diff --git a/tests/language_2/void/await_void_test.dart b/tests/language_2/void/await_void_test.dart deleted file mode 100644 index 82e4c3ce99c..00000000000 --- a/tests/language_2/void/await_void_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// 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. - -// @dart = 2.9 - -// [NNBD non-migrated] This test has no NNBD equivalent. -// In NNBD, you are not allowed to await `void` and the corresponding test -// is await_void_error_test.dart - -// Test that it is not an error to await an expression of type `void`. - -import "dart:async"; - -void v; -List vs = [null]; -FutureOr fov; - -void main() async { - await print(''); - await v; - await vs[0]; - var v2 = vs[0]; - await v2; - await fov; -} diff --git a/tests/language_2/void/generalized_void_syntax_test.dart b/tests/language_2/void/generalized_void_syntax_test.dart deleted file mode 100644 index 637724a5d68..00000000000 --- a/tests/language_2/void/generalized_void_syntax_test.dart +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) 2017, 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 - -// Testing that the reserved word `void` is allowed to occur as a type, not -// just as a return type. - -typedef F = void Function(Object); -typedef F2 = void Function([Object]); -typedef F3 = void Function({Object x}); - -typedef G = void Function(void); -typedef G2 = void Function([void]); -typedef G3 = void Function({void x}); - -typedef H = int Function(void); -typedef H2 = int Function([void]); -typedef H3 = int Function({void x}); - -class A { - final T t; - const A(this.t); -} - -const void x1 = null; -const A x2 = const A(null); - -final void x3 = null; -final A x4 = new A(null); - -void x5 = null, x6; -A x7 = new A(null), x8; - -void get g1 => null; -A get g2 => new A(null); -void set s1(void x) => null; -void set s2(A x) => null; -void m1(void x, [void y]) => null; -void m2(void x, {void y}) => null; -A m3(A x, [A y]) => new A(null); -A m4(A x, {A y}) => new A(null); - -class B implements A { - void get t => null; -} - -class C extends A with B> { - C() : super(null); - - static final void x1 = null; - static final A x2 = new A(null); - - static const void x3 = null; - static const A x4 = const A(null); - - final void x5 = null; - final A x6 = new A(null); - - static void x7 = null, x8; - static A x9 = new A(null), x10; - - covariant void x11 = null, x12; - covariant A x13 = new A(null), x14; - - static void get g1 => null; - static A get g2 => new A(null); - static void set s1(void x) => null; - static void set s2(A x) => null; - static void m1(void x, [void y]) => null; - static void m2(void x, {void y}) => null; - static A m3(A x, [A y]) => null; - static A m4(A x, {A y}) => null; - - void get g3 => null; - A get g4 => new A(null); - void set s3(void x) => null; - void set s4(A x) => null; - void m5(void x, [void y]) => null; - void m6(void x, {void y}) => null; - A m7(A x, [A y]) => null; - A m8(A x, {A y}) => null; - - // Ensure that all members are used, and use `void` in expressions. - void run() { - x1; - x2; - x3; - x4; - x5; - x6; - x7; - x8; - x9; - x10; - x11; - x12; - x13; - x14; - g1; - g2; - g3; - g4; - - s1 = null; - s2 = new A(null); - s3 = null; - s4 = new A(null); - m1(null, null); - m2(null, y: null); - m3(null, new A(null)); - m4(null, y: new A(null)); - m5(null, null); - m6(null, y: null); - m7(null, new A(null)); - m8(null, y: new A(null)); - - void pretendToUse(dynamic x) => null; - pretendToUse([]); - pretendToUse({}); - pretendToUse(>[]); - pretendToUse(, A>{}); - } -} - -// Testing syntax, just enforce compilation. -main() { - // ignore - x1; - x2; - x3; - x4; - x5; - x6; - x7; - x8; - g1; - g2; - - s1 = null; - s2 = new A(null); - m1(null, null); - m2(null, y: null); - m3(null, null); - m4(null, y: null); - new C().run(); -} diff --git a/tests/language_2/void/generalized_void_usage_test.dart b/tests/language_2/void/generalized_void_usage_test.dart deleted file mode 100644 index 8fffbba8f3c..00000000000 --- a/tests/language_2/void/generalized_void_usage_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2017, 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 - -// Dart test for static checks on situations where expressions of type void -// can be used. The point is simply that there are no compile-time errors. - -// We need expressions of type `void`; `void x` would do, but using -// `void get x` will work with tools that do not yet handle `void x`. -void get x => null; - -void use(dynamic x) {} - -main() { - // In an expressionStatement `e;`, e may have type void. - x; - - // In the initialization and increment expressions of a for-loop, - // `for (e1; e2; e3) {..}`, `e1` and `e3` may have type void. - for (x;; x) { - break; - } - - // In a typeCast `e as T`, `e` may have type void. - var y = x as Object; - - // In a parenthesized expression `(e)`, `e` may have type void. - (x); - - // In a return statement `return e;`, when the return type of the - // innermost enclosing function is the type void, e may have type void. - void f() => x; - - void g() { - return x; - } -} diff --git a/tests/language_2/void/return_future_future_or_void_async_error0_test.dart b/tests/language_2/void/return_future_future_or_void_async_error0_test.dart deleted file mode 100644 index aeea15de1d9..00000000000 --- a/tests/language_2/void/return_future_future_or_void_async_error0_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -void voidValue = null; - -void main() { - test(); -} - -// Testing that a block bodied async function may not return void -Future> test() async { - return voidValue; - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} diff --git a/tests/language_2/void/return_future_future_or_void_async_error1_test.dart b/tests/language_2/void/return_future_future_or_void_async_error1_test.dart deleted file mode 100644 index 6a560d5892c..00000000000 --- a/tests/language_2/void/return_future_future_or_void_async_error1_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -void main() { - test(); -} - -// Testing that a block bodied async function may not have an empty return -Future> test() async { - return; //# none: compile-time error -} diff --git a/tests/language_2/void/return_future_future_or_void_async_test.dart b/tests/language_2/void/return_future_future_or_void_async_test.dart deleted file mode 100644 index 08bf6a05797..00000000000 --- a/tests/language_2/void/return_future_future_or_void_async_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -void voidValue = null; - -void main() { - test1(); - test4(); - test5(); - test6(); - test7(); - test8(); -} - -// Testing that a block bodied async function may have no return -Future> test1() async {} - -// Testing that a block bodied async function may return Future> -Future> test4([bool b]) async { - return null as Future>; -} - -// Testing that a block bodied async function may return Future> -Future> test5([bool b]) async { - return null as Future>; -} - -// Testing that a block bodied async function may return FutureOr> -Future> test6([bool b]) async { - return null as FutureOr>; -} - -// Testing that a block bodied async function may return non-void -// values -Future> test7() async { - return 42; -} - -// Testing that a block bodied async function may return non-void -// Future values -Future> test8() async { - return new Future.value(42); -} diff --git a/tests/language_2/void/return_future_future_or_void_sync_error0_test.dart b/tests/language_2/void/return_future_future_or_void_sync_error0_test.dart deleted file mode 100644 index 20bd935ed8d..00000000000 --- a/tests/language_2/void/return_future_future_or_void_sync_error0_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -void voidValue = null; - -void main() { - test(); -} - -// Testing that a block bodied function may not return void -Future> test() { - return voidValue; - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} diff --git a/tests/language_2/void/return_future_future_or_void_sync_error1_test.dart b/tests/language_2/void/return_future_future_or_void_sync_error1_test.dart deleted file mode 100644 index 87adcd531d3..00000000000 --- a/tests/language_2/void/return_future_future_or_void_sync_error1_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -void main() { - test(); -} - -// Testing that a block bodied function may not have an empty return -Future> test() { - return; -//^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.RETURN_WITHOUT_VALUE -// [cfe] Must explicitly return a value from a non-void function. -} diff --git a/tests/language_2/void/return_future_future_or_void_sync_test.dart b/tests/language_2/void/return_future_future_or_void_sync_test.dart deleted file mode 100644 index a06fd120f76..00000000000 --- a/tests/language_2/void/return_future_future_or_void_sync_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -void voidValue = null; - -void main() { - test1(); - test2(); - test3(); - test4(); -} - -// Testing that a block bodied function may have no return -Future> test1() {} - -// Testing that a block bodied function may return Future -Future> test2() { - return null as Future; -} - -// Testing that a block bodied function may return FutureOr -Future> test3() { - return null as Future>; -} - -// Testing that a block bodied function may return non-void Future values -Future> test4() { - return new Future.value(42); -} diff --git a/tests/language_2/void/return_future_or_future_or_void_sync_error1_test.dart b/tests/language_2/void/return_future_or_future_or_void_sync_error1_test.dart deleted file mode 100644 index 52aeded54d8..00000000000 --- a/tests/language_2/void/return_future_or_future_or_void_sync_error1_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -void voidValue = null; - -void main() { - test(); -} - -// Testing that a block bodied function may not return void -FutureOr> test() { - return voidValue; - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} diff --git a/tests/language_2/void/return_future_or_future_or_void_sync_error2_test.dart b/tests/language_2/void/return_future_or_future_or_void_sync_error2_test.dart deleted file mode 100644 index 23d797f6249..00000000000 --- a/tests/language_2/void/return_future_or_future_or_void_sync_error2_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -void main() { - test(); -} - -// Testing that a block bodied function may have an empty return -FutureOr> test() { - return; //# none: compile-time error -} diff --git a/tests/language_2/void/return_future_or_future_or_void_sync_test.dart b/tests/language_2/void/return_future_or_future_or_void_sync_test.dart deleted file mode 100644 index cb17483e28b..00000000000 --- a/tests/language_2/void/return_future_or_future_or_void_sync_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -void voidValue = null; - -void main() { - test1(); - test2(); - test3(); - test4(); - test5(); - test6(); -} - -// Testing that a block bodied function may have no return -FutureOr> test1() {} - -// Testing that a block bodied function may return Future -FutureOr> test2() { - return null as Future; -} - -// Testing that a block bodied function may return FutureOr -FutureOr> test3() { - return null as FutureOr; -} - -// Testing that a block bodied function may return Future -FutureOr> test4() { - return null as Future>; -} - -// Testing that a block bodied function may return non-void values -FutureOr> test5() { - return 42; -} - -// Testing that a block bodied function may return non-void Future values -FutureOr> test6() { - return new Future.value(42); -} - -// Testing that a block bodied function may return overly nested Future -// values -FutureOr> test() { - return null as Future>>; -} diff --git a/tests/language_2/void/return_future_or_void_async_test.dart b/tests/language_2/void/return_future_or_void_async_test.dart deleted file mode 100644 index 3ad4c4e1195..00000000000 --- a/tests/language_2/void/return_future_or_void_async_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -void voidValue = null; - -void main() { - test0(); - test1(); - test2(); - test3(); - test6(); -} - -// Testing that a block bodied function may have an empty return -FutureOr test0() async { - return; -} - -// Testing that a block bodied function may have no return -FutureOr test1() async {} - -// Testing that a block bodied function may return Future -FutureOr test2() async { - return null as Future; -} - -// Testing that a block bodied function may return FutureOr -FutureOr test3() async { - return null as FutureOr; -} - -// Testing that a block bodied function may return void -FutureOr test6() async { - return voidValue; -} diff --git a/tests/language_2/void/return_future_or_void_sync_error3_test.dart b/tests/language_2/void/return_future_or_void_sync_error3_test.dart deleted file mode 100644 index c4d520f3eea..00000000000 --- a/tests/language_2/void/return_future_or_void_sync_error3_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -void voidValue = null; - -void main() { - test(); -} - -// Testing that a block bodied function may not return void -FutureOr test() { - return voidValue; - // ^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] This expression has type 'void' and can't be used. -} diff --git a/tests/language_2/void/return_future_or_void_sync_error4_test.dart b/tests/language_2/void/return_future_or_void_sync_error4_test.dart deleted file mode 100644 index c18d1d18b2e..00000000000 --- a/tests/language_2/void/return_future_or_void_sync_error4_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -void main() { - test(); -} - -// Testing that a block bodied function may not have an empty return -FutureOr test() { - return; //# none: compile-time error -} diff --git a/tests/language_2/void/return_future_or_void_sync_test.dart b/tests/language_2/void/return_future_or_void_sync_test.dart deleted file mode 100644 index 74a97999c36..00000000000 --- a/tests/language_2/void/return_future_or_void_sync_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -void voidValue = null; - -void main() { - test1(); - test2(); - test3(); - test4(); - test5(); - test6(); -} - -// Testing that a block bodied function may have no return -FutureOr test1() {} - -// Testing that a block bodied function may return Future -FutureOr test2() { - return null as Future; -} - -// Testing that a block bodied function may return FutureOr -FutureOr test3() { - return null as FutureOr; -} - -// Testing that a block bodied function may return Future -FutureOr test4() { - return null as Future>; -} - -// Testing that a block bodied function may return non-void values -FutureOr test5() { - return 42; -} - -// Testing that a block bodied function may return non-void Future values -FutureOr test6() { - return new Future.value(42); -} diff --git a/tests/language_2/void/return_future_void_async_test.dart b/tests/language_2/void/return_future_void_async_test.dart deleted file mode 100644 index 1cd7a154adb..00000000000 --- a/tests/language_2/void/return_future_void_async_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -void voidValue = null; - -void main() { - test0(); - test1(); - test2(); - test3(); - test4(); - test5(); - test6(); -} - -// Testing that a block bodied async function may have an empty return -Future test0() async { - return; -} - -// Testing that a block bodied async function may have no return -Future test1() async {} - -// Testing that a block bodied async function may return Future -Future test2([bool b]) async { - return null as Future; -} - -// Testing that a block bodied async function may return FutureOr -Future test3([bool b]) async { - return null as FutureOr; -} - -// Testing that a block bodied async function may return null -Future test4([bool b]) async { - return null; -} - -// Testing that a block bodied async function may return dynamic -Future test5([bool b]) async { - return null as dynamic; -} - -// Testing that a block bodied async function return void -Future test6() async { - return voidValue; -} diff --git a/tests/language_2/void/return_void_async_error0_test.dart b/tests/language_2/void/return_void_async_error0_test.dart deleted file mode 100644 index a8d941b5b5a..00000000000 --- a/tests/language_2/void/return_void_async_error0_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2018, 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 - -void main() { - test(); -} - -// Testing that a block bodied async function may not return non-void non-top -// values -void test() async { - return 3; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] Can't return a value from a void function. -} diff --git a/tests/language_2/void/return_void_async_error1_test.dart b/tests/language_2/void/return_void_async_error1_test.dart deleted file mode 100644 index 8bca1bf4692..00000000000 --- a/tests/language_2/void/return_void_async_error1_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2018, 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 - -void main() { - test(); -} - -// Testing that a block bodied async function may not return non-void Object -// values -void test() async { - Object a = 3; - return a; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] Can't return a value from a void function. -} diff --git a/tests/language_2/void/return_void_async_error2_test.dart b/tests/language_2/void/return_void_async_error2_test.dart deleted file mode 100644 index 3c12830dcf5..00000000000 --- a/tests/language_2/void/return_void_async_error2_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -void main() { - test(); -} - -// Testing that a block bodied async function may not return non-void Future -// values -void test() async { - return null as Future; - // ^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // ^ - // [cfe] Can't return a value from a void function. -} diff --git a/tests/language_2/void/return_void_async_test.dart b/tests/language_2/void/return_void_async_test.dart deleted file mode 100644 index 0ee020c90dd..00000000000 --- a/tests/language_2/void/return_void_async_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -void voidValue = null; - -void main() { - test0(); - test1(); - test2(); - test3(); - test4(); - test5(); - test6(); -} - -// Testing that a block bodied async function may have an empty return -void test0() async { - return; -} - -// Testing that a block bodied async function may have no return -void test1() async {} - -// Testing that a block bodied async function may return void -void test2() async { - return voidValue; -} - -// Testing that a block bodied async function may have both empty returns -// and void returning paths -void test3([bool b]) async { - if (b == null) { - return; - } else { - return voidValue; - } -} - -// Testing that a block bodied async function may return Null -void test4() async { - return null; -} - -// Testing that a block bodied async function may return dynamic -void test5() async { - return null as dynamic; -} - -// Testing that a block bodied async function may return FutureOr -void test6() async { - return null as FutureOr; -} diff --git a/tests/language_2/void/return_void_sync_error0_test.dart b/tests/language_2/void/return_void_sync_error0_test.dart deleted file mode 100644 index 3a4a82fec7c..00000000000 --- a/tests/language_2/void/return_void_sync_error0_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2018, 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 - -void main() { - test(); -} - -// Testing that a block bodied function may not return non-void non-top values -void test() { - return 3; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] Can't return a value from a void function. -} diff --git a/tests/language_2/void/return_void_sync_error1_test.dart b/tests/language_2/void/return_void_sync_error1_test.dart deleted file mode 100644 index ca95b691335..00000000000 --- a/tests/language_2/void/return_void_sync_error1_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2018, 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 - -void main() { - test(); -} - -// Testing that a block bodied function may not return non-void Object values -void test() { - Object a = 3; - return a; - // ^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // [cfe] Can't return a value from a void function. -} diff --git a/tests/language_2/void/return_void_sync_error2_test.dart b/tests/language_2/void/return_void_sync_error2_test.dart deleted file mode 100644 index 2178975d9cd..00000000000 --- a/tests/language_2/void/return_void_sync_error2_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -void main() { - test(); -} - -// Testing that a block bodied function may not return FutureOr -void test() { - return null as FutureOr; - // ^^^^^^^^^^^^^^^^^^^^^^ - // [analyzer] COMPILE_TIME_ERROR.RETURN_OF_INVALID_TYPE - // ^ - // [cfe] Can't return a value from a void function. -} diff --git a/tests/language_2/void/return_void_sync_test.dart b/tests/language_2/void/return_void_sync_test.dart deleted file mode 100644 index 927e6750f3d..00000000000 --- a/tests/language_2/void/return_void_sync_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2018, 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 - -void voidValue = null; - -void main() { - test0(); - test1(); - test2(); - test3(); -} - -// Testing that a block bodied function may have an empty return -void test0() { - return; -} - -// Testing that a block bodied function may have no return -void test1() {} - -// Testing that a block bodied function may return void -void test2() { - return voidValue; -} - -// Testing that a block bodied function may have both empty returns -// and void returning paths -void test3([bool b]) { - if (b == null) { - return; - } else if (b) { - return voidValue; - } -} diff --git a/tests/language_2/void/void_arrow_return_test.dart b/tests/language_2/void/void_arrow_return_test.dart deleted file mode 100644 index 9d00757e917..00000000000 --- a/tests/language_2/void/void_arrow_return_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2017, 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 - -// Testing that a void arrow function is allowed to return any type of value. - -void foo() => 42; -void set bar(x) => 43; - -main() { - foo(); - bar = 44; -} diff --git a/tests/language_2/void/void_block_return_test.dart b/tests/language_2/void/void_block_return_test.dart deleted file mode 100644 index 8a3e793c308..00000000000 --- a/tests/language_2/void/void_block_return_test.dart +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2017, 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 - -// Testing that a void block function is not allowed to `return e` -// where `e` is non-void. - -void foo() { - return 42; //# 00: compile-time error -} - -main() { - foo(); -} diff --git a/tests/language_2/void/void_check_test.dart b/tests/language_2/void/void_check_test.dart deleted file mode 100644 index 73b6ce50550..00000000000 --- a/tests/language_2/void/void_check_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2017, 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 - -// Tests that `void` accepts any value and won't throw on non-`null` values. -// The test is set up in a way that `--trust-type-annotations` and type -// propagation must not assume that `void` is `null` either. - -import 'package:expect/expect.dart'; - -class A { - void foo() { - return bar(); - } - - void bar() {} -} - -class B extends A { - int bar() => 42; -} - -// Makes the typing cleaner: the return type here is `dynamic` and we are -// guaranteed that there won't be any warnings. -// Dart2js can still infer the type by itself. -@pragma('dart2js:noInline') -callFoo(A a) => a.foo(); - -main() { - var a = new A(); - var b = new B(); - // The following line is not throwing, even though `a.foo()` (inside - // `callFoo`) is supposedly `void`. - callFoo(b).abs(); - Expect.isNull(callFoo(a)); - Expect.equals(42, callFoo(b)); -} diff --git a/tests/language_2/void/void_subtype_test.dart b/tests/language_2/void/void_subtype_test.dart deleted file mode 100644 index c6bab0e3a5d..00000000000 --- a/tests/language_2/void/void_subtype_test.dart +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2016, 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 test for type checks involving the void type. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -var _str = new StringBuffer(); - -T run(T f()) { - _str.write("+"); - var t = f(); - _str.write("-"); - return t; -} - -void writeV() { - _str.write("V"); -} - -main() { - { - var x = run(writeV); - Expect.equals('+V-', _str.toString()); - Expect.equals(null, x); - _str.clear(); - - var y = run(writeV) as dynamic; - Expect.equals('+V-', _str.toString()); - Expect.equals(null, y); - _str.clear(); - } - - // implicit cast - { - dynamic d = writeV; - var x = run(d); - Expect.equals('+V-', _str.toString()); - Expect.equals(null, x); - _str.clear(); - - var y = run(d); - Expect.equals('+V-', _str.toString()); - Expect.equals(null, y); - _str.clear(); - } - - // dynamic dispatch - { - dynamic d = run; - var x = d(writeV); - Expect.equals('+V-', _str.toString()); - Expect.equals(null, x); - _str.clear(); - - var y = d(writeV); - Expect.equals('+V-', _str.toString()); - Expect.equals(null, y); - _str.clear(); - } -} diff --git a/tests/language_2/void/void_type_callbacks_test.dart b/tests/language_2/void/void_type_callbacks_test.dart deleted file mode 100644 index 2cc28752e68..00000000000 --- a/tests/language_2/void/void_type_callbacks_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2017, 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 - -// Dart test for type checks involving callbacks and the type void. - -import 'package:expect/expect.dart'; - -class A { - T x; - - foo(T x) {} - - T bar(T f()) { - T tmp = f(); - return tmp; - } - - gee(T f()) { - x = bar(f); - } - - Object xAsObject() => x; -} - -void voidFun() => 499; -int intFun() => 42; - -main() { - A a = new A(); - a.foo(a.x); - a.bar(voidFun); - Expect.equals(null, a.xAsObject()); - a.x = a.bar(voidFun); - a.gee(voidFun); - Expect.equals(499, a.xAsObject()); - a.gee(intFun); - Expect.equals(42, a.xAsObject()); -} diff --git a/tests/language_2/void/void_type_function_types_test.dart b/tests/language_2/void/void_type_function_types_test.dart deleted file mode 100644 index de546953c48..00000000000 --- a/tests/language_2/void/void_type_function_types_test.dart +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) 2017, 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 - -// Dart test for type checks involving the void type in function types. - -import 'package:expect/expect.dart'; - -typedef F = void Function(Object); -typedef F2 = void Function([Object]); -typedef F3 = void Function({Object x}); - -typedef G = void Function(void); -typedef G2 = void Function([void]); -typedef G3 = void Function({void x}); - -typedef H = int Function(void); -typedef H2 = int Function([void]); -typedef H3 = int Function({void x}); - -void f(Object x) {} -void f2([Object x]) {} -void f3({Object x}) {} - -void g(void x) {} -void g2([void x]) {} -void g3({void x}) {} - -int h(void x) => 499; -int h2([void x]) => 499; -int h3({void x}) => 499; - -void expectsF(F f) {} -void expectsG(G g) {} -void expectsH(H h) {} - -void expectsF2(F2 f) {} -void expectsG2(G2 g) {} -void expectsH2(H2 h) {} - -void expectsF3(F3 f) {} -void expectsG3(G3 g) {} -void expectsH3(H3 h) {} - -main() { - Expect.isTrue(f is F); - Expect.isTrue(f is G); - Expect.isFalse(f is H); - expectsF(f); - expectsG(f); - expectsH(f); //# 00: compile-time error - - Expect.isTrue(f2 is F2); - Expect.isTrue(f2 is G2); - Expect.isFalse(f2 is H2); - expectsF2(f2); - expectsG2(f2); - expectsH2(f2); //# 01: compile-time error - - Expect.isTrue(f3 is F3); - Expect.isTrue(f3 is G3); - Expect.isFalse(f3 is H3); - expectsF3(f3); - expectsG3(f3); - expectsH3(f3); //# 03: compile-time error - - Expect.isTrue(g is F); - Expect.isTrue(g is G); - Expect.isFalse(g is H); - expectsF(g); - expectsG(g); - expectsH(g); //# 05: compile-time error - - Expect.isTrue(g2 is F2); - Expect.isTrue(g2 is G2); - Expect.isFalse(g2 is H2); - expectsF2(g2); - expectsG2(g2); - expectsH2(g2); //# 07: compile-time error - - Expect.isTrue(g3 is F3); - Expect.isTrue(g3 is G3); - Expect.isFalse(g3 is H3); - expectsF3(g3); - expectsG3(g3); - expectsH3(g3); //# 09: compile-time error - - Expect.isTrue(h is F); - Expect.isTrue(h is G); - Expect.isTrue(h is H); - expectsF(h); - expectsG(h); - expectsH(h); - - Expect.isTrue(h2 is F2); - Expect.isTrue(h2 is G2); - Expect.isTrue(h2 is H2); - expectsF2(h2); - expectsG2(h2); - expectsH2(h2); - - Expect.isTrue(h3 is F3); - Expect.isTrue(h3 is G3); - Expect.isTrue(h3 is H3); - expectsF3(h3); - expectsG3(h3); - expectsH3(h3); -} diff --git a/tests/language_2/void/void_type_override_test.dart b/tests/language_2/void/void_type_override_test.dart deleted file mode 100644 index d2411132e9d..00000000000 --- a/tests/language_2/void/void_type_override_test.dart +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) 2017, 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 - -// Dart test for type checks involving the void type and overriding. - -import 'package:expect/expect.dart'; - -use(T x) {} - -class A { - T x; - Object y; - int z; - - T foo() => null; - void bar() {} - void gee(T x) {} - - f(A a) {} - g(A a) {} - h(A a) {} -} - -class B implements A { - void //# 00: ok - /* //# 00: continued - var - */ //# 00: continued - x; - - void //# 00b: ok - /* //# 00b: continued - var - */ //# 00b: continued - y; - - void //# 00c: compile-time error - /* //# 00c: continued - int - */ //# 00c: continued - z; - - void //# 01: ok - foo() {} - - int bar() => 499; - void gee(void x) {} - f(A a) {} - g(A a) {} - h(A a) {} -} - -class C implements A { - void x; - Object y; - int z; - - void foo() {} - void bar() {} - void gee(void x) { - use(x); - } - - f(covariant C c) {} - g(covariant C c) {} - h(covariant C c) {} -} - -class D implements A { - Object x; // Setter will become a voidness preservation violation. - Object y; - int z; - - Object foo() => null; - void bar() {} - void gee( - Object // Will become a voidness preservation violation. - x) {} - - f(A a) {} - g( - A // Will become a voidness preservation violation. - a) {} - h( - A // Will become a voidness preservation violation. - a) {} -} - -void instantiateClasses() { - var a = new A(); - var b = new B(); - var c = new C(); - var d = new D(); - - a.foo(); - b.foo(); - c.foo(); - d.foo(); - a.bar(); - b.bar(); - c.bar(); - d.bar(); - a.gee(499); - b.gee(499); - c.gee(499); - d.gee(499); -} - -void testAssignments() { - A a1 = new A(); - A a2 = new A(); - A a3 = new A(); - A a4 = new A(); - dynamic a5 = new A(); -} - -main() { - instantiateClasses(); - testAssignments(); -} diff --git a/tests/language_2/void/void_type_test.dart b/tests/language_2/void/void_type_test.dart deleted file mode 100644 index 21c02f2d275..00000000000 --- a/tests/language_2/void/void_type_test.dart +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2012, 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 test for type checks involving the void type. - -// @dart = 2.9 - -import "package:expect/expect.dart"; - -void f() { - return; -} - -void f_null() { - return null; -} - -void f_dyn_null() { - return null as dynamic; -} - -void f_f() { - return f(); -} - -void test(int n, void func()) { - // Test as closure call. - { - bool got_type_error = false; - try { - func(); - } on TypeError catch (error) { - got_type_error = true; - } - Expect.isFalse(got_type_error); - } - // Test as direct call. - { - bool got_type_error = false; - try { - var x; - switch (n) { - case 0: - x = f() as dynamic; - break; - case 1: - x = f_null() as dynamic; - break; - case 2: - x = f_dyn_null() as dynamic; - break; - case 3: - x = f_f() as dynamic; - break; - } - } on TypeError catch (error) { - got_type_error = true; - } - Expect.isFalse(got_type_error); - } -} - -main() { - test(0, f); - test(1, f_null); - test(2, f_dyn_null); - test(3, f_f); -} diff --git a/tests/language_2/void/void_type_usage_test.dart b/tests/language_2/void/void_type_usage_test.dart deleted file mode 100644 index bf7a9f1659d..00000000000 --- a/tests/language_2/void/void_type_usage_test.dart +++ /dev/null @@ -1,587 +0,0 @@ -// Copyright (c) 2017, 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 - -// Dart test for type checks on usage of expressions of type void. - -void use(dynamic x) { } -void useAsVoid(void x) { } - -Object testVoidParam(void x) { - x; //# param_stmt: ok - true ? x : x; //# param_conditional: ok - for (x; false; x) {} //# param_for: ok - useAsVoid(x); //# param_argument_void: ok - use(x); //# param_argument: compile-time error - use(x as Object); //# param_as: ok - void y = x; //# param_void_init: ok - dynamic z = x; //# param_dynamic_init: compile-time error - x is Object; //# param_is: compile-time error - throw x; //# param_throw: compile-time error - [x]; //# param_literal_void_list_init: ok - [x]; //# param_literal_list_init: compile-time error - var m1 = {4: x}; //# param_literal_map_value_init: ok - var m2 = {x : 4}; //# param_literal_map_key_init: ok - var m3 = {4: x}; //# param_literal_map_value_init2: compile-time error - var m4 = {x : 4}; //# param_literal_map_key_init2: compile-time error - x ?? 499; //# param_null_equals1: compile-time error - null ?? x; //# param_null_equals2: ok - return x; //# param_return: compile-time error - while (x) {}; //# param_while: compile-time error - do {} while (x); //# param_do_while: compile-time error - for (var v in x) {} //# param_for_in: compile-time error - for (x in [1, 2]) {} //# param_for_in2: ok - x += 1; //# param_plus_eq: compile-time error - x.toString(); //# param_toString: compile-time error - x?.toString(); //# param_null_dot: compile-time error - x..toString(); //# param_cascade: compile-time error - if (x) {}; //# param_conditional_stmt: compile-time error - !x; //# param_boolean_negation: compile-time error - x && true; //# param_boolean_and_left: compile-time error - true && x; //# param_boolean_and_right: compile-time error - x || true; //# param_boolean_or_left: compile-time error - true || x; //# param_boolean_or_right: compile-time error - x == 3; //# param_equals_left: compile-time error - 3 == x; //# param_equals_right: compile-time error - identical(3, x); //# param_identical: compile-time error - 3 + x; //# param_addition: compile-time error - 3 * x; //# param_multiplication: compile-time error - -x; //# param_negation: compile-time error - x(3); //# param_use_as_function: compile-time error - "hello$x"; //# param_use_in_string_interpolation: compile-time error - x ??= 3; //# param_use_in_conditional_assignment_left: compile-time error - Object xx; xx ??= x; //# param_use_in_conditional_assignment_right: compile-time error - var ll = [3]; ll[x]; //# param_use_in_list_subscript: compile-time error - var mm = {}; mm[x]; //# param_use_in_map_lookup: compile-time error -} - -testVoidAsync(void x) async { - await x; //# async_use_in_await: ok -} - -testVoidAsyncStar(void x) async* { - yield x; //# async_use_in_yield: compile-time error - yield* x; //# async_use_in_yield_star: compile-time error - await for (var i in x) {} //# async_use_in_await_for: compile-time error -} - -testVoidSyncStar(void x) sync* { - yield x; //# sync_use_in_yield: compile-time error - yield* x; //# sync_use_in_yield_star: compile-time error -} - -const void c = null; - -dynamic testVoidDefaultParameter([int y = c]) {} //# void_default_parameter_global: compile-time error - -dynamic testVoidDefaultParameterClosure() { - ([int y = c]) => 3;//# void_default_parameter_closure: compile-time error -} - -dynamic testVoidParamDynamic(void x) { - return x; //# param_return_dynamic: ok -} - -Object testVoidCall(void f()) { - f(); //# call_stmt: ok - true ? f() : f(); //# call_conditional: ok - for (f(); false; f()) {} //# call_for: ok - useAsVoid(f()); //# call_argument_void: ok - use(f()); //# call_argument: compile-time error - use(f() as Object); //# call_as: ok - void y = f(); //# call_void_init: ok - dynamic z = f(); //# call_dynamic_init: compile-time error - f() is Object; //# call_is: compile-time error - throw f(); //# call_throw: compile-time error - [f()]; //# call_literal_void_list_init: ok - [f()]; //# call_literal_list_init: compile-time error - var m1 = {4: f() }; //# call_literal_map_value_init: ok - var m2 = { f(): 4}; //# call_literal_map_key_init: ok - var m3 = {4: f() }; //# call_literal_map_value_init2: compile-time error - var m4 = { f(): 4}; //# call_literal_map_key_init2: compile-time error - f() ?? 499; //# call_null_equals1: compile-time error - null ?? f(); //# call_null_equals2: ok - return f(); //# call_return: compile-time error - while (f()) {}; //# call_while: compile-time error - do {} while (f()); //# call_do_while: compile-time error - for (var v in f()) {} //# call_for_in: compile-time error - f().toString(); //# call_toString: compile-time error - f()?.toString(); //# call_null_dot: compile-time error - f()..toString(); //# call_cascade: compile-time error - if (f()) {}; //# call_conditional_stmt: compile-time error - !f(); //# call_boolean_negation: compile-time error - f() && true; //# call_boolean_and_left: compile-time error - true && f(); //# call_boolean_and_right: compile-time error - f() || true; //# call_boolean_or_left: compile-time error - true || f(); //# call_boolean_or_right: compile-time error - f() == 3; //# call_equals_left: compile-time error - 3 == f(); //# call_equals_right: compile-time error - identical(3, f()); //# call_identical: compile-time error - 3 + f(); //# call_addition: compile-time error - 3 * f(); //# call_multiplication: compile-time error - -f(); //# call_negation: compile-time error - f()(3); //# call_use_as_function: compile-time error - "hello${f()}"; //# call_use_in_string_interpolation: compile-time error - f() ??= 3; //# call_use_in_conditional_assignment_left: compile-time error - Object xx; xx ??= f(); //# call_use_in_conditional_assignment_right: compile-time error - var ll = [3]; ll[f()]; //# call_use_in_list_subscript: compile-time error - var mm = {}; mm[f()]; //# call_use_in_map_lookup: compile-time error -} - -dynamic testVoidCallDynamic(void f()) { - return f(); //# call_return: ok -} - -Object testVoidLocal() { - void x; - x = 42; //# local_assign: ok - x; //# local_stmt: ok - true ? x : x; //# local_conditional: ok - for (x; false; x) {} //# local_for: ok - useAsVoid(x); //# local_argument_void: ok - use(x); //# local_argument: compile-time error - use(x as Object); //# local_as: ok - void y = x; //# local_void_init: ok - dynamic z = x; //# local_dynamic_init: compile-time error - x is Object; //# local_is: compile-time error - throw x; //# local_throw: compile-time error - [x]; //# local_literal_void_list_init: ok - [x]; //# local_literal_list_init: compile-time error - var m1 = {4: x}; //# local_literal_map_value_init: ok - var m2 = {x : 4}; //# local_literal_map_key_init: ok - var m3 = {4: x}; //# local_literal_map_value_init2: compile-time error - var m4 = {x : 4}; //# local_literal_map_key_init2: compile-time error - x ?? 499; //# local_null_equals1: compile-time error - null ?? x; //# local_null_equals2: ok - return x; //# local_return: compile-time error - while (x) {}; //# local_while: compile-time error - do {} while (x); //# local_do_while: compile-time error - for (var v in x) {} //# local_for_in: compile-time error - for (x in [1, 2]) {} //# local_for_in2: ok - x += 1; //# local_plus_eq: compile-time error - x.toString(); //# local_toString: compile-time error - x?.toString(); //# local_null_dot: compile-time error - x..toString(); //# local_cascade: compile-time error - if (x) {}; //# local_conditional_stmt: compile-time error - !x; //# local_boolean_negation: compile-time error - x && true; //# local_boolean_and_left: compile-time error - true && x; //# local_boolean_and_right: compile-time error - x || true; //# local_boolean_or_left: compile-time error - true || x; //# local_boolean_or_right: compile-time error - x == 3; //# local_equals_left: compile-time error - 3 == x; //# local_equals_right: compile-time error - identical(3, x); //# local_identical: compile-time error - 3 + x; //# local_addition: compile-time error - 3 * x; //# local_multiplication: compile-time error - -x; //# local_negation: compile-time error - x(3); //# local_use_as_function: compile-time error - "hello$x"; //# local_use_in_string_interpolation: compile-time error - x ??= 3; //# local_use_in_conditional_assignment_left: compile-time error - Object xx; xx ??= x; //# local_use_in_conditional_assignment_right: compile-time error - var ll = [3]; ll[x]; //# local_use_in_list_subscript: compile-time error - var mm = {}; mm[x]; //# local_use_in_map_lookup: compile-time error -} - -dynamic testVoidLocalDynamic() { - void x; - return x; //# local_return_dynamic: ok -} - -Object testVoidFinalLocal() { - final void x = null; - x = 42; //# final_local_assign: compile-time error - x; //# final_local_stmt: ok - true ? x : x; //# final_local_conditional: ok - for (x; false; x) {} //# final_local_for: ok - useAsVoid(x); //# final_local_argument_void: ok - use(x); //# final_local_argument: compile-time error - use(x as Object); //# final_local_as: ok - void y = x; //# final_local_void_init: ok - dynamic z = x; //# final_local_dynamic_init: compile-time error - x is Object; //# final_local_is: compile-time error - throw x; //# final_local_throw: compile-time error - [x]; //# final_local_literal_void_list_init: ok - [x]; //# final_local_literal_list_init: compile-time error - var m1 = {4: x}; //# final_local_literal_map_value_init: ok - var m2 = {x : 4}; //# final_local_literal_map_key_init: ok - var m3 = {4: x}; //# final_local_literal_map_value_init2: compile-time error - var m4 = {x : 4}; //# final_local_literal_map_key_init2: compile-time error - x ?? 499; //# final_local_null_equals1: compile-time error - null ?? x; //# final_local_null_equals2: ok - return x; //# final_local_return: compile-time error - while (x) {}; //# final_local_while: compile-time error - do {} while (x); //# final_local_do_while: compile-time error - for (var v in x) {} //# final_local_for_in: compile-time error - for (x in [1, 2]) {} //# final_local_for_in2: compile-time error - x += 1; //# final_local_plus_eq: compile-time error - x.toString(); //# final_local_toString: compile-time error - x?.toString(); //# final_local_null_dot: compile-time error - x..toString(); //# final_local_cascade: compile-time error - if (x) {}; //# final_local_conditional_stmt: compile-time error - !x; //# final_local_boolean_negation: compile-time error - x && true; //# final_local_boolean_and_left: compile-time error - true && x; //# final_local_boolean_and_right: compile-time error - x || true; //# final_local_boolean_or_left: compile-time error - true || x; //# final_local_boolean_or_right: compile-time error - x == 3; //# final_local_equals_left: compile-time error - 3 == x; //# final_local_equals_right: compile-time error - identical(3, x); //# final_local_identical: compile-time error - 3 + x; //# final_local_addition: compile-time error - 3 * x; //# final_local_multiplication: compile-time error - -x; //# final_local_negation: compile-time error - x(3); //# final_local_use_as_function: compile-time error - "hello$x"; //# final_local_use_in_string_interpolation: compile-time error - x ??= 3; //# final_local_use_in_conditional_assignment_left: compile-time error - Object xx; xx ??= x; //# final_local_use_in_conditional_assignment_right: compile-time error - var ll = [3]; ll[x]; //# final_local_use_in_list_subscript: compile-time error - var mm = {}; mm[x]; //# final_local_use_in_map_lookup: compile-time error -} - -dynamic testVoidFinalLocalDynamic() { - final void x = null; - return x; //# final_local_return_dynamic: ok -} - -void global; -Object testVoidGlobal() { - global; //# global_stmt: ok - true ? global : global; //# global_conditional: ok - for (global; false; global) {} //# global_for: ok - useAsVoid(global); //# global_argument_void: ok - use(global); //# global_argument: compile-time error - use(global as Object); //# global_as: ok - void y = global; //# global_void_init: ok - dynamic z = global; //# global_dynamic_init: compile-time error - global is Object; //# global_is: compile-time error - throw global; //# global_throw: compile-time error - [global]; //# global_literal_void_list_init: ok - [global]; //# global_literal_list_init: compile-time error - var m1 = {4: global }; //# global_literal_map_value_init: ok - var m2 = { global: 4}; //# global_literal_map_key_init: ok - var m3 = {4: global }; //# global_literal_map_value_init2: compile-time error - var m4 = { global: 4}; //# global_literal_map_key_init2: compile-time error - null ?? global; //# global_null_equals1: ok - global ?? 499; //# global_null_equals2: compile-time error - return global; //# global_return: compile-time error - while (global) {}; //# global_while: compile-time error - do {} while (global); //# global_do_while: compile-time error - for (var v in global) {} //# global_for_in: compile-time error - for (global in [1, 2]) {} //# global_for_in2: ok - global += 1; //# global_plus_eq: compile-time error - global.toString(); //# global_toString: compile-time error - global?.toString(); //# global_null_dot: compile-time error - global..toString(); //# global_cascade: compile-time error - if (global) {}; //# global_conditional_stmt: compile-time error - !global; //# global_boolean_negation: compile-time error - global && true; //# global_boolean_and_left: compile-time error - true && global; //# global_boolean_and_right: compile-time error - global || true; //# global_boolean_or_left: compile-time error - true || global; //# global_boolean_or_right: compile-time error - global == 3; //# global_equals_left: compile-time error - 3 == global; //# global_equals_right: compile-time error - identical(3, global); //# global_identical: compile-time error - 3 + global; //# global_addition: compile-time error - 3 * global; //# global_multiplication: compile-time error - -global; //# global_negation: compile-time error - global(3); //# global_use_as_function: compile-time error - "hello$global"; //# global_use_in_string_interpolation: compile-time error - global ??= 3; //# global_use_in_conditional_assignment_left: compile-time error - Object xx; xx ??= global; //# global_use_in_conditional_assignment_right: compile-time error - var ll = [3]; ll[global]; //# global_use_in_list_subscript: compile-time error - var mm = {}; mm[global]; //# global_use_in_map_lookup: compile-time error -} - -dynamic testVoidGlobalDynamic() { - return global; //# global_return_dynamic: ok -} - -Object testVoidConditional() { - void x; - (true ? x : x); //# conditional_parens: ok - true ? x : x; //# conditional_stmt: ok - true ? true ? x : x : true ? x : x; //# conditional_conditional: ok - for (true ? x : x; false; true ? x : x) {} //# conditional_for: ok - useAsVoid(true ? x : x); //# conditional_argument_void: ok - use(true ? x : x); //# conditional_argument: compile-time error - void y = true ? x : x; //# conditional_void_init: ok - dynamic z = true ? x : x; //# conditional_dynamic_init: compile-time error - throw true ? x : x; //# conditional_throw: compile-time error - [true ? x : x]; //# conditional_literal_void_list_init: ok - [true ? x : x]; //# conditional_literal_list_init: compile-time error - var m1 = {4: true ? x : x}; //# conditional_literal_map_value_init: ok - var m3 = {4: true ? x : x}; //# conditional_literal_map_value_init2: compile-time error - (true ? x : x) ?? null; //# conditional_null_equals1: compile-time error - null ?? (true ? x : x); //# conditional_null_equals2: ok - return true ? x : x; //# conditional_return: compile-time error - while (true ? x : x) {}; //# conditional_while: compile-time error - do {} while (true ? x : x); //# conditional_do_while: compile-time error - for (var v in true ? x : x) {} //# conditional_for_in: compile-time error - - (true ? 499 : x); //# conditional2_parens: ok - true ? 499 : x; //# conditional2_stmt: ok - true ? true ? 499 : x : true ? 499 : x; //# conditional2_conditional: ok - for (true ? 499 : x; false; true ? 499 : x) {} //# conditional2_for: ok - useAsVoid(true ? 499 : x); //# conditional2_argument_void: ok - use(true ? 499 : x); //# conditional2_argument: compile-time error - void y2 = true ? 499 : x; //# conditional2_void_init: ok - dynamic z2 = true ? 499 : x; //# conditional2_dynamic_init: compile-time error - throw true ? 499 : x; //# conditional2_throw: compile-time error - [true ? 499 : x]; //# conditional2_literal_void_list_init: ok - [true ? 499 : x]; //# conditional2_literal_list_init: compile-time error - var m12 = {4: true ? 499 : x}; //# conditional2_literal_map_value_init: ok - var m32 = {4: true ? 499 : x}; //# conditional2_literal_map_value_init2: compile-time error - (true ? 499 : x) ?? null; //# conditional2_null_equals1: compile-time error - null ?? (true ? 499 : x); //# conditional2_null_equals2: ok - return true ? 499 : x; //# conditional2_return: compile-time error - while (true ? 499 : x) {}; //# conditional2while: compile-time error - do {} while (true ? 499 : x); //# conditional2do_while: compile-time error - for (var v in true ? 499 : x) {} //# conditional2for_in: compile-time error - - (true ? x : 499); //# conditional3_parens: ok - true ? x : 499; //# conditional3_stmt: ok - true ? true ? x : 499 : true ? x : 499; //# conditional3_conditional: ok - for (true ? x : 499; false; true ? x : 499) {} //# conditional3_for: ok - useAsVoid(true ? x : 499); //# conditional3_argument_void: ok - use(true ? x : 499); //# conditional3_argument: compile-time error - void y3 = true ? x : 499; //# conditional3_void_init: ok - dynamic z3 = true ? x : 499; //# conditional3_dynamic_init: compile-time error - throw true ? x : 499; //# conditional3_throw: compile-time error - [true ? x : 499]; //# conditional3_literal_void_list_init: ok - [true ? x : 499]; //# conditional3_literal_list_init: compile-time error - var m13 = {4: true ? x : 499 }; //# conditional3_literal_map_value_init: ok - var m33 = {4: true ? x : 499 }; //# conditional3_literal_map_value_init2: compile-time error - (true ? x : 499) ?? null; //# conditional3_null_equals1: compile-time error - null ?? (true ? x : 499); //# conditional3_null_equals2: ok - return true ? x : 499; //# conditional3_return: compile-time error - while (true ? x : 499) {}; //# conditional_while: compile-time error - do {} while (true ? x : 499); //# conditional_do_while: compile-time error - for (var v in true ? x : 499) {} //# conditional_for_in: compile-time error -} - -dynamic testVoidConditionalDynamic() { - void x; - return true ? x : x; //# conditional_return_dynamic: ok - return true ? 499 : x; //# conditional2_return_dynamic: ok - return true ? x : 499; //# conditional3_return_dynamic: ok -} - -class A { - T x; - - void foo() {} -} - -class B implements A { - void x; - - int foo() => 499; - - void forInTest() { - for (x in []) {} //# instance2_for_in2: ok - for (x in [1, 2]) {} //# instance2_for_in3: ok - } -} - -class C implements A { - void get x => null; - set x(void y) {} - - void foo() {} - - void forInTest() { - for (x in []) {} //# instance3_for_in2: ok - for (x in [1, 2]) {} //# instance3_for_in3: ok - } -} - -Object testInstanceField() { - A a = new A(); - a.x = 499; //# field_assign: ok - a.x; //# instance_stmt: ok - true ? a.x : a.x; //# instance_conditional: ok - for (a.x; false; a.x) {} //# instance_for: ok - useAsVoid(a.x); //# instance_argument_void: ok - use(a.x); //# instance_argument: compile-time error - use(a.x as Object); //# instance_as: ok - void y = a.x; //# instance_void_init: ok - dynamic z = a.x; //# instance_dynamic_init: compile-time error - a.x is Object; //# instance_is: compile-time error - throw a.x; //# instance_throw: compile-time error - [a.x]; //# instance_literal_void_list_init: ok - [a.x]; //# instance_literal_list_init: compile-time error - var m1 = {4: a.x}; //# instance_literal_map_value_init: ok - var m2 = { a.x : 4}; //# instance_literal_map_key_init: ok - var m3 = {4: a.x}; //# instance_literal_map_value_init2: compile-time error - var m4 = { a.x : 4}; //# instance_literal_map_key_init2: compile-time error - null ?? a.x; //# instance_null_equals1: ok - a.x ?? 499; //# instance_null_equals2: compile-time error - return a.x; //# instance_return: compile-time error - while (a.x) {}; //# instance_while: compile-time error - do {} while (a.x); //# instance_do_while: compile-time error - for (var v in a.x) {} //# instance_for_in: compile-time error - a.x += 1; //# instance_plus_eq: compile-time error - a.x.toString(); //# instance_toString: compile-time error - a.x?.toString(); //# instance_null_dot: compile-time error - a.x..toString(); //# instance_cascade: compile-time error - - B b = new B(); - b.x = 42; //# field_assign2: ok - b.x; //# instance2_stmt: ok - true ? b.x : b.x; //# instance2_conditional: ok - for (b.x; false; b.x) {} //# instance2_for: ok - useAsVoid(b.x); //# instance2_argument_void: ok - use(b.x); //# instance2_argument: compile-time error - use(b.x as Object); //# instance2_as: ok - void y2 = b.x; //# instance2_void_init: ok - dynamic z2 = b.x; //# instance2_dynamic_init: compile-time error - b.x is Object; //# instance2_is: compile-time error - throw b.x; //# instance2_throw: compile-time error - [b.x]; //# instance2_literal_void_list_init: ok - [b.x]; //# instance2_literal_list_init: compile-time error - var m12 = {4: b.x}; //# instance2_literal_map_value_init: ok - var m22 = { b.x : 4}; //# instance2_literal_map_key_init: ok - var m32 = {4: b.x}; //# instance2_literal_map_value_init2: compile-time error - var m42 = { b.x : 4}; //# instance2_literal_map_key_init2: compile-time error - null ?? b.x; //# instance2_null_equals1: ok - b.x ?? 499; //# instance2_null_equals2: compile-time error - return b.x; //# instance2_return: compile-time error - while (b.x) {}; //# instance2_while: compile-time error - do {} while (b.x); //# instance2_do_while: compile-time error - for (var v in b.x) {} //# instance2_for_in: compile-time error - b.forInTest(); - b.x += 1; //# instance2_plus_eq: compile-time error - b.x.toString(); //# instance2_toString: compile-time error - b.x?.toString(); //# instance2_null_dot: compile-time error - b.x..toString(); //# instance2_cascade: compile-time error - - C c = new C(); - c.x = 32; //# setter_assign: ok - c.x; //# instance3_stmt: ok - true ? c.x : c.x; //# instance3_conditional: ok - for (c.x; false; c.x) {} //# instance3_for: ok - useAsVoid(c.x); //# instance3_argument_void: ok - use(c.x); //# instance3_argument: compile-time error - use(c.x as Object); //# instance3_as: ok - void y3 = c.x; //# instance3_void_init: ok - dynamic z3 = c.x; //# instance3_dynamic_init: compile-time error - c.x is Object; //# instance3_is: compile-time error - throw c.x; //# instance3_throw: compile-time error - [c.x]; //# instance3_literal_void_list_init: ok - [c.x]; //# instance3_literal_list_init: compile-time error - var m13 = {4: c.x}; //# instance3_literal_map_value_init: ok - var m23 = { c.x : 4}; //# instance3_literal_map_key_init: ok - var m33 = {4: c.x}; //# instance3_literal_map_value_init2: compile-time error - var m43 = { c.x : 4}; //# instance3_literal_map_key_init2: compile-time error - null ?? c.x; //# instance3_null_equals1: ok - c.x ?? 499; //# instance3_null_equals2: compile-time error - return c.x; //# instance3_return: compile-time error - while (c.x) {}; //# instance3_while: compile-time error - do {} while (c.x); //# instance3_do_while: compile-time error - for (var v in c.x) {} //# instance3_for_in: compile-time error - c.forInTest(); - c.x += 1; //# instance3_plus_eq: compile-time error - c.x.toString(); //# instance3_toString: compile-time error - c.x?.toString(); //# instance3_null_dot: compile-time error - c.x..toString(); //# instance3_cascade: compile-time error -} - -dynamic testInstanceFieldDynamic() { - A a = new A(); - return a.x; //# instance_return_dynamic: ok - - B b = new B(); - return b.x; //# instance2_return_dynamic: ok - - C c = new C(); - return c.x; //# instance3_return_dynamic: ok -} - -Object testParenthesized() { - void x; - (x); //# paren_stmt: ok - true ? (x) : (x); //# paren_conditional: ok - for ((x); false; (x)) {} //# paren_for: ok - useAsVoid((x)); //# paren_argument_void: ok - use((x)); //# paren_argument: compile-time error - use((x) as Object); //# paren_as: ok - void y = (x); //# paren_void_init: ok - dynamic z = (x); //# paren_dynamic_init: compile-time error - (x) is Object; //# paren_is: compile-time error - throw (x); //# paren_throw: compile-time error - [(x)]; //# paren_literal_void_list_init: ok - [(x)]; //# paren_literal_list_init: compile-time error - var m1 = {4: (x) }; //# paren_literal_map_value_init: ok - var m2 = { (x): 4}; //# paren_literal_map_key_init: ok - var m3 = {4: (x) }; //# paren_literal_map_value_init2: compile-time error - var m4 = { (x): 4}; //# paren_literal_map_key_init2: compile-time error - (x) ?? 499; //# paren_null_equals1: compile-time error - null ?? (x); //# paren_null_equals2: ok - return (x); //# paren_return: compile-time error - while ((x)) {}; //# paren_while: compile-time error - do {} while ((x)); //# paren_do_while: compile-time error - for (var v in (x)) {} //# paren_for_in: compile-time error - (x).toString(); //# paren_toString: compile-time error - (x)?.toString(); //# paren_null_dot: compile-time error - (x)..toString(); //# paren_cascade: compile-time error - if ((x)) {}; //# paren_conditional_stmt: compile-time error - !(x); //# paren_boolean_negation: compile-time error - (x) && true; //# paren_boolean_and_left: compile-time error - true && (x); //# paren_boolean_and_right: compile-time error - (x) || true; //# paren_boolean_or_left: compile-time error - true || (x); //# paren_boolean_or_right: compile-time error - (x) == 3; //# paren_equals_left: compile-time error - 3 == (x); //# paren_equals_right: compile-time error - identical(3, (x)); //# paren_identical: compile-time error - 3 + (x); //# paren_addition: compile-time error - 3 * (x); //# paren_multiplication: compile-time error - -(x); //# paren_negation: compile-time error - (x)(3); //# paren_use_as_function: compile-time error - "hello${(x)}"; //# paren_use_in_string_interpolation: compile-time error - (x) ??= 3; //# paren_use_in_conditional_assignment_left: compile-time error - Object xx; xx ??= (x); //# paren_use_in_conditional_assignment_right: compile-time error - var ll = [3]; ll[(x)]; //# paren_use_in_list_subscript: compile-time error - var mm = {}; mm[(x)]; //# paren_use_in_map_lookup: compile-time error -} - -dynamic testParenthesizedDynamic() { - void x; - return (x); //# paren_return_dynamic: ok -} - -void testReturnToVoid(void x, void f()) { - void y; - final void z = null; - A a = new A(); - B b = new B(); - C c = new C(); - return x; //# param_return_to_void: ok - return f(); //# call_return_to_void: ok - return y; //# local_return_to_void: ok - return z; //# final_local_return_to_void: ok - return global; //# global_return_to_void: ok - return true ? x : x; //# conditional_return_to_void: ok - return true ? 499 : x; //# conditional2_return_to_void: ok - return true ? x : 499; //# conditional3_return_to_void: ok - return a.x; //# instance_return_to_void: ok - return b.x; //# instance2_return_to_void: ok - return c.x; //# instance3_return_to_void: ok - return (x); //# paren_return_to_void: ok -} - -main() { - try { - testVoidParam(499); - testVoidCall(() {}); - testVoidLocal(); - testVoidFinalLocal(); - testVoidConditional(); - testInstanceField(); - testParenthesized(); - testReturnToVoid(499, () {}); - } catch (e) { - // Silently eat all dynamic errors. - // This test is only testing static analysis. - } -} diff --git a/tests/lib_2/analyzer/analyze_library.status b/tests/lib_2/analyzer/analyze_library.status deleted file mode 100644 index 0dd8e28ddcf..00000000000 --- a/tests/lib_2/analyzer/analyze_library.status +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (c) 2012, 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. - -[ $compiler == dart2analyzer ] -*: Skip diff --git a/tests/lib_2/async/async_await_sync_completer_test.dart b/tests/lib_2/async/async_await_sync_completer_test.dart deleted file mode 100644 index 3797a927497..00000000000 --- a/tests/lib_2/async/async_await_sync_completer_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'dart:async'; -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; - -import 'dart:async'; - -var events = []; -var delayedValue = new Completer(); -var delayedError = new Completer(); - -foo() async { - // Because of this `await null` the function returns and lets the caller - // install handlers. When the function finishes, it can then synchronously - // propagate the values. - await null; - new Future.microtask(() => 'in microtask') - .then(events.add) - .then(delayedValue.complete); - return 'in async function'; -} - -bar() async { - // Because of this `await null` the function returns and lets the caller - // install handlers. When the function finishes, it can then synchronously - // propagate the values. - await null; - new Future.microtask(() => throw 'in microtask error') - .catchError(events.add) - .then(delayedError.complete); - throw 'in async function error'; -} - -void main() { - asyncStart(); - var asyncValueFuture = foo().then(events.add); - var asyncErrorFuture = bar().catchError(events.add); - Future.wait([ - asyncValueFuture, - delayedValue.future, - asyncErrorFuture, - delayedError.future - ]).then((_) { - // The body completed before nested microtask. So they should appear - // before the delayed functions. In other words, the async function should - // not unnecessarily delay the propagation of errors and values. - Expect.listEquals([ - "in async function", - "in async function error", - "in microtask", - "in microtask error" - ], events); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/async_await_zones_test.dart b/tests/lib_2/async/async_await_zones_test.dart deleted file mode 100644 index d2fcb95b387..00000000000 --- a/tests/lib_2/async/async_await_zones_test.dart +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) 2015, 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 - -// Test that async functions don't zone-register their callbacks for each -// await. Async functions should register their callback once in the beginning -// and then reuse it for all awaits in their body. -// This has two advantages: it is faster, when there are several awaits (on -// the Future class from dart:async), and it avoids zone-nesting when tracing -// stacktraces. -// See http://dartbug.com/23394 for more information. - -import 'dart:async'; -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; - -gee(i) async { - return await i; -} - -bar() async* { - var i = 0; - while (true) yield await gee(i++); -} - -awaitForTest() async { - var sum = 0; - await for (var x in bar().take(100)) { - sum += x; - } - Expect.equals(4950, sum); -} - -awaitTest() async { - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - await null; - return await 499; -} - -runTests() async { - await awaitTest(); - await awaitForTest(); -} - -var depth = 0; - -var depthIncreases = 0; - -increaseDepth() { - depthIncreases++; - depth++; - // The async/await code should not register callbacks recursively in the - // then-calls. As such the depth should never grow too much. We don't want - // to commit to a specific value, since implementations still have some - // room in how async/await is implemented, but 20 should be safe. - Expect.isTrue(depth < 20); -} - -ZoneCallback registerCallback( - Zone self, ZoneDelegate parent, Zone zone, R f()) { - var oldDepth = depth; - increaseDepth(); - return parent.registerCallback(zone, () { - depth = oldDepth; - return f(); - }); -} - -ZoneUnaryCallback registerUnaryCallback( - Zone self, ZoneDelegate parent, Zone zone, R f(T arg)) { - var oldDepth = depth; - increaseDepth(); - return parent.registerUnaryCallback(zone, (x) { - depth = oldDepth; - return f(x); - }); -} - -ZoneBinaryCallback registerBinaryCallback( - Zone self, ZoneDelegate parent, Zone zone, R f(T1 arg1, T2 arg2)) { - var oldDepth = depth; - increaseDepth(); - return parent.registerBinaryCallback(zone, (x, y) { - depth = oldDepth; - return f(x, y); - }); -} - -void sm(Zone self, ZoneDelegate parent, Zone zone, f) { - var oldDepth = depth; - increaseDepth(); - return parent.scheduleMicrotask(zone, () { - depth = oldDepth; - return f(); - }); -} - -main() { - asyncStart(); - var desc = new ZoneSpecification( - registerCallback: registerCallback, - registerUnaryCallback: registerUnaryCallback, - registerBinaryCallback: registerBinaryCallback, - scheduleMicrotask: sm); - var future = runZoned(runTests, zoneSpecification: desc); - future.then((_) => asyncEnd()); -} diff --git a/tests/lib_2/async/async_no_await_zones_test.dart b/tests/lib_2/async/async_no_await_zones_test.dart deleted file mode 100644 index ab5e74f4a16..00000000000 --- a/tests/lib_2/async/async_no_await_zones_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2018, 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 - -// Regression test for https://github.com/dart-lang/sdk/issues/33330 -import 'dart:async'; -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; - -var log = []; - -main() { - asyncStart(); - runZoned(() { - dynamic d = new AsyncDoEvent(); - return d.doEvent(); - }, zoneSpecification: new ZoneSpecification( - scheduleMicrotask: (self, parent, zone, fn) { - log.add('scheduleMicrotask()'); - return parent.scheduleMicrotask(zone, fn); - }, - )).then((_) { - Expect.listEquals(log, ['doEvent()', 'scheduleMicrotask()']); - asyncEnd(); - }); -} - -class AsyncDoEvent { - Future doEvent() async { - log.add('doEvent()'); - } -} diff --git a/tests/lib_2/async/catch_errors.dart b/tests/lib_2/async/catch_errors.dart deleted file mode 100644 index d73bff04412..00000000000 --- a/tests/lib_2/async/catch_errors.dart +++ /dev/null @@ -1,57 +0,0 @@ - -// @dart = 2.9 -library catch_errors; - -import 'dart:async'; - -Stream catchErrors(dynamic body()) { - StreamController controller; - - bool onError(e, st) { - controller.add(e); - return true; - } - - void onListen() { - runZoned(body, onError: onError); - } - - controller = new StreamController(onListen: onListen); - return controller.stream; -} - -runZonedScheduleMicrotask(body(), - {void onScheduleMicrotask(void callback()), Function onError}) { - if (onScheduleMicrotask == null) { - return runZoned(body, onError: onError); - } - HandleUncaughtErrorHandler errorHandler; - if (onError != null) { - errorHandler = (Zone self, ZoneDelegate parent, Zone zone, error, - StackTrace stackTrace) { - try { - return self.parent.runUnary(onError, error); - } catch (e, s) { - if (identical(e, error)) { - return parent.handleUncaughtError(zone, error, stackTrace); - } else { - return parent.handleUncaughtError(zone, e, s); - } - } - }; - } - ScheduleMicrotaskHandler asyncHandler; - if (onScheduleMicrotask != null) { - asyncHandler = (Zone self, ZoneDelegate parent, Zone zone, f()) { - self.parent.runUnary(onScheduleMicrotask, () => zone.runGuarded(f)); - }; - } - ZoneSpecification specification = new ZoneSpecification( - handleUncaughtError: errorHandler, scheduleMicrotask: asyncHandler); - Zone zone = Zone.current.fork(specification: specification); - if (onError != null) { - return zone.runGuarded(body); - } else { - return zone.run(body); - } -} diff --git a/tests/lib_2/async/catch_errors11_test.dart b/tests/lib_2/async/catch_errors11_test.dart deleted file mode 100644 index 5fb2e903723..00000000000 --- a/tests/lib_2/async/catch_errors11_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - - var events = []; - // Test that `catchErrors` catches errors that are delayed by `Timer.run`. - catchErrors(() { - events.add("catch error entry"); - new Future.error("future error"); - Timer.run(() { - done.complete(true); - throw "timer error"; - }); - }).listen((x) { - events.add(x); - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - - done.future.whenComplete(() { - // Give the handler time to execute. - Timer.run(() { - Expect.listEquals([ - "catch error entry", - "main exit", - "future error", - "timer error", - ], events); - asyncEnd(); - }); - }); - events.add("main exit"); -} diff --git a/tests/lib_2/async/catch_errors12_test.dart b/tests/lib_2/async/catch_errors12_test.dart deleted file mode 100644 index 2a5b4d1cf16..00000000000 --- a/tests/lib_2/async/catch_errors12_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - - var events = []; - // Tests that errors that have been delayed by several milliseconds with - // Timers are still caught by `catchErrors`. - catchErrors(() { - events.add("catch error entry"); - Timer.run(() { - throw "timer error"; - }); - new Timer(const Duration(milliseconds: 100), () { - throw "timer2 error"; - }); - new Future.value(499).then((x) { - new Timer(const Duration(milliseconds: 200), () { - done.complete(499); - throw x; - }); - }); - throw "catch error"; - }).listen((x) { - events.add(x); - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - done.future.whenComplete(() { - // Give time to execute the callbacks. - Timer.run(() { - Expect.listEquals([ - "catch error entry", - "main exit", - "catch error", - "timer error", - "timer2 error", - 499, - ], events); - asyncEnd(); - }); - }); - events.add("main exit"); -} diff --git a/tests/lib_2/async/catch_errors13_test.dart b/tests/lib_2/async/catch_errors13_test.dart deleted file mode 100644 index 33adbbd7180..00000000000 --- a/tests/lib_2/async/catch_errors13_test.dart +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - - var events = []; - // Work around bug that makes scheduleMicrotask use Timers. By invoking - // `scheduleMicrotask` here we make sure that asynchronous non-timer events - // are executed before any Timer events. - scheduleMicrotask(() {}); - - // Test that errors are caught by nested `catchErrors`. Also uses - // `scheduleMicrotask` in the body of a Timer. - bool outerTimerRan = false; - int outerTimerCounterDelayCount = 0; - catchErrors(() { - events.add("catch error entry"); - catchErrors(() { - events.add("catch error entry2"); - Timer.run(() { - throw "timer error"; - }); - - // We want this timer to run after the timer below. When the machine is - // slow we saw that the timer below was scheduled more than 50ms after - // this line. A duration of 50ms was therefore not enough to guarantee - // that this timer runs before the timer below. - // Instead of increasing the duration to a bigger amount we decided to - // verify that the other timer already ran, and reschedule if not. - // This way we could reduce the timeout (to 10ms now), while still - // allowing for more time, in case the machine is slow. - void runDelayed() { - new Timer(const Duration(milliseconds: 10), () { - if (outerTimerRan) { - scheduleMicrotask(() { - throw "scheduleMicrotask"; - }); - throw "delayed error"; - } else if (outerTimerCounterDelayCount < 100) { - outerTimerCounterDelayCount++; - runDelayed(); - } - }); - } - - runDelayed(); - }).listen((x) { - events.add(x); - if (x == "scheduleMicrotask") { - throw "inner done throw"; - } - }); - events.add("after inner"); - Timer.run(() { - outerTimerRan = true; - throw "timer outer"; - }); - throw "inner throw"; - }).listen((x) { - events.add(x); - if (x == "inner done throw") done.complete(true); - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - - done.future.whenComplete(() { - // Give callbacks time to run. - Timer.run(() { - Expect.listEquals([ - "catch error entry", - "catch error entry2", - "after inner", - "main exit", - "inner throw", - "timer error", - "timer outer", - "delayed error", - "scheduleMicrotask", - "inner done throw" - ], events); - asyncEnd(); - }); - }); - events.add("main exit"); -} diff --git a/tests/lib_2/async/catch_errors14_test.dart b/tests/lib_2/async/catch_errors14_test.dart deleted file mode 100644 index e9562682c89..00000000000 --- a/tests/lib_2/async/catch_errors14_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - - var events = []; - // Test that periodic Timers are handled correctly by `catchErrors`. - catchErrors(() { - int counter = 0; - new Timer.periodic(const Duration(milliseconds: 50), (timer) { - if (counter++ == 5) { - timer.cancel(); - done.complete(true); - } - throw "error $counter"; - }); - }).listen((x) { - events.add(x); - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - - done.future.whenComplete(() { - // Give time to complete the handlers. - Timer.run(() { - Expect.listEquals([ - "main exit", - "error 1", - "error 2", - "error 3", - "error 4", - "error 5", - "error 6", - ], events); - asyncEnd(); - }); - }); - events.add("main exit"); -} diff --git a/tests/lib_2/async/catch_errors15_test.dart b/tests/lib_2/async/catch_errors15_test.dart deleted file mode 100644 index 6962cb07170..00000000000 --- a/tests/lib_2/async/catch_errors15_test.dart +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - var events = []; - - catchErrors(() { - events.add("catch error entry"); - catchErrors(() { - events.add("catch error entry2"); - new Future.error("future error"); - new Future.error("future error2"); - new Future.value(499).then((x) => throw x); - new Future.delayed(const Duration(milliseconds: 50), () { - throw "delayed error"; - }); - throw "catch error"; - }).listen((x) { - events.add("i $x"); - if (x == "delayed error") done.complete(true); - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - events.add("after inner"); - throw "inner throw"; - }).listen((x) { - events.add("o $x"); - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - done.future.whenComplete(() { - // Give some time to run the handlers. - Timer.run(() { - Expect.listEquals([ - "catch error entry", - "catch error entry2", - "after inner", - "main exit", - "i catch error", - // We guarantee the order of one stream but not any - // global order. - "o inner throw", - "i future error", - "i future error2", - "i 499", - "i delayed error", - ], events); - asyncEnd(); - }); - }); - events.add("main exit"); -} diff --git a/tests/lib_2/async/catch_errors16_test.dart b/tests/lib_2/async/catch_errors16_test.dart deleted file mode 100644 index ffdecb9e676..00000000000 --- a/tests/lib_2/async/catch_errors16_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - var events = []; - StreamController controller = new StreamController(); - Stream stream = controller.stream; - // Test that the subscription of a stream is what counts. The error (2) runs - // through the map-stream which goes through the nested `catchError` but - // the nested `catchError` won't see the error. - catchErrors(() { - stream = stream.map((x) => x + 100); - }).listen((x) { - events.add(x); - }); - stream - .transform(new StreamTransformer.fromHandlers(handleError: (e, st, sink) { - sink.add("error $e"); - })).listen((x) { - events.add("stream $x"); - }, onDone: () { - Expect.listEquals([ - "stream 101", - "stream error 2", - ], events); - asyncEnd(); - }); - controller.add(1); - controller.addError(2); - controller.close(); -} diff --git a/tests/lib_2/async/catch_errors17_test.dart b/tests/lib_2/async/catch_errors17_test.dart deleted file mode 100644 index 1ba81385742..00000000000 --- a/tests/lib_2/async/catch_errors17_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - - var events = []; - StreamController controller; - // Test that errors do not cross zone boundaries. - catchErrors(() { - catchErrors(() { - controller = new StreamController(); - controller.stream.map((x) { - events.add("map $x"); - return x + 100; - }).transform( - new StreamTransformer.fromHandlers(handleError: (e, st, sink) { - sink.add("error $e"); - })).listen((x) { - events.add("stream $x"); - }); - }).listen((x) { - events.add(x); - }); - controller.add(1); - controller.addError(2); - new Future.error("outer error"); - controller.close(); - }).listen((x) { - events.add("outer: $x"); - if (x == "outer error") done.complete(true); - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - - done.future.whenComplete(() { - Timer.run(() { - Expect.listEquals([ - "map 1", - "stream 101", - "stream error 2", - "outer: outer error", - ], events); - asyncEnd(); - }); - }); -} diff --git a/tests/lib_2/async/catch_errors18_test.dart b/tests/lib_2/async/catch_errors18_test.dart deleted file mode 100644 index d8f07938b77..00000000000 --- a/tests/lib_2/async/catch_errors18_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - - var events = []; - Stream stream = - new Stream.periodic(const Duration(milliseconds: 20), (x) => x); - // Test that errors of periodic streams are caught. - catchErrors(() { - var subscription; - subscription = stream.listen((x) { - if (x == 5) { - events.add("cancel"); - subscription.cancel(); - done.complete(true); - return; - } - events.add(x); - }); - }).listen((x) { - events.add("outer: $x"); - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - - done.future.whenComplete(() { - // Give handlers time to run. - Timer.run(() { - Expect.listEquals([0, 1, 2, 3, 4, "cancel"], events); - asyncEnd(); - }); - }); -} diff --git a/tests/lib_2/async/catch_errors19_test.dart b/tests/lib_2/async/catch_errors19_test.dart deleted file mode 100644 index 879462d55a6..00000000000 --- a/tests/lib_2/async/catch_errors19_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - - var events = []; - Stream stream = - new Stream.periodic(const Duration(milliseconds: 20), (x) => x); - // Test that asynchronous callbacks in the done-handler of streams (here - // the `catchErrors`-stream) keep a zone alive. - catchErrors(() { - var subscription; - subscription = stream.take(5).listen((x) { - events.add(x); - }, onDone: () { - new Future.delayed(const Duration(milliseconds: 30), () { - events.add(499); - done.complete(true); - }); - }); - }).listen((x) { - events.add("outer: $x"); - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - - done.future.whenComplete(() { - // Give handlers time to run. - Timer.run(() { - Expect.listEquals([0, 1, 2, 3, 4, 499], events); - asyncEnd(); - }); - }); -} diff --git a/tests/lib_2/async/catch_errors20_test.dart b/tests/lib_2/async/catch_errors20_test.dart deleted file mode 100644 index 58b344a2e60..00000000000 --- a/tests/lib_2/async/catch_errors20_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - - var events = []; - // Test that nested stream (from `catchErrors`) that is delayed by a future - // is waited for. - catchErrors(() { - catchErrors(() { - new Future.error(499); - new Future.delayed(const Duration(milliseconds: 20), () { - events.add(42); - done.complete(true); - }); - }).listen(events.add, onDone: () { - events.add("done"); - }); - throw "foo"; - }).listen((x) { - events.add("outer: $x"); - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - - done.future.whenComplete(() { - // Give handlers time to run. - Timer.run(() { - Expect.listEquals([ - "outer: foo", - 499, - 42, - ], events); - asyncEnd(); - }); - }); -} diff --git a/tests/lib_2/async/catch_errors21_test.dart b/tests/lib_2/async/catch_errors21_test.dart deleted file mode 100644 index fe3bdce1a47..00000000000 --- a/tests/lib_2/async/catch_errors21_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - - var events = []; - var controller = new StreamController(); - // Test that stream errors, as a result of bad user-code (`map`) are correctly - // caught by `catchErrors`. Note that the values are added outside both - // `catchErrors`, but since the `listen` happens in the most nested - // `catchErrors` it is caught there. - catchErrors(() { - catchErrors(() { - controller.stream.map((x) { - throw x; - }).listen((x) { - // Should not happen. - events.add("bad: $x"); - }); - }).listen((x) { - events.add("caught: $x"); - if (x == 4) done.complete(true); - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - }).listen((x) { - events.add("outer: $x"); - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - - done.future.whenComplete(() { - // Give handlers time to run. - Timer.run(() { - Expect.listEquals([ - "caught: 1", - "caught: 2", - "caught: 3", - "caught: 4", - ], events); - asyncEnd(); - }); - }); - - [1, 2, 3, 4].forEach(controller.add); - controller.close(); -} diff --git a/tests/lib_2/async/catch_errors22_test.dart b/tests/lib_2/async/catch_errors22_test.dart deleted file mode 100644 index c507622a0f8..00000000000 --- a/tests/lib_2/async/catch_errors22_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - - var events = []; - bool onDoneWasCalled = false; - var controller = new StreamController(); - // Test that streams that are never closed keep the `catchError` alive. - catchErrors(() { - catchErrors(() { - controller.stream.map((x) { - throw x; - }).listen((x) { - // Should not happen. - events.add("bad: $x"); - }); - }).listen((x) { - events.add("caught: $x"); - }, onDone: () { - events.add("done"); - }); - }).listen((x) { - events.add("outer: $x"); - }, onDone: () { - onDoneWasCalled = true; - }); - - [1, 2, 3, 4].forEach(controller.add); - - new Timer(const Duration(milliseconds: 20), () { - Expect.isFalse(onDoneWasCalled); - Expect.listEquals([ - "caught: 1", - "caught: 2", - "caught: 3", - "caught: 4", - ], events); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/catch_errors23_test.dart b/tests/lib_2/async/catch_errors23_test.dart deleted file mode 100644 index 655371e221f..00000000000 --- a/tests/lib_2/async/catch_errors23_test.dart +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - - var events = []; - StreamController controller; - Stream stream; - // Test that errors are not traversing zone boundaries. - // Note that the first listener of `asBroadcastStream` determines in which - // zone the subscription lives. - catchErrors(() { - catchErrors(() { - controller = new StreamController(); - - // Assign to "global" `stream`. - stream = controller.stream.map((x) { - events.add("map $x"); - return x + 100; - }).transform( - new StreamTransformer.fromHandlers(handleError: (e, st, sink) { - sink.add("error $e"); - })).asBroadcastStream(); - - // Listen to `stream` in the inner zone. - stream.listen((x) { - events.add("stream $x"); - }); - }) - .listen((x) { - events.add(x); - }) - .asFuture() - .then((_) { - Expect.fail("Unexpected callback"); - }); - - // Listen to `stream` in the outer zone. - stream.listen((x) { - events.add("stream2 $x"); - }); - - // Feed the controller from the outer zone. - controller.add(1); - // `addError` does not count as zone-traversal. It should be caught by - // the inner error handler. - controller.addError("inner error"); - new Future.error("caught by outer"); - controller.close(); - }).listen((x) { - events.add("outer: $x"); - if (x == "caught by outer") done.complete(true); - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - - done.future.whenComplete(() { - // Give handlers time to run. - Timer.run(() { - Expect.listEquals([ - "map 1", - "stream 101", - "stream2 101", - "stream error inner error", - "stream2 error inner error", - "outer: caught by outer", - ], events); - asyncEnd(); - }); - }); -} diff --git a/tests/lib_2/async/catch_errors24_test.dart b/tests/lib_2/async/catch_errors24_test.dart deleted file mode 100644 index 4c68d9f20aa..00000000000 --- a/tests/lib_2/async/catch_errors24_test.dart +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - - var events = []; - StreamController controller; - Stream stream; - // Test that the first listen on a `asBroadcastStream` determines the - // zone the subscription lives in. In this case the outer listen happens first - // and the error reaches `handleError`. - catchErrors(() { - catchErrors(() { - controller = new StreamController(); - - // Assign to the "global" `stream`. - stream = controller.stream.map((x) { - events.add("map $x"); - return x + 100; - }).transform( - new StreamTransformer.fromHandlers(handleError: (e, st, sink) { - sink.add("error $e"); - })).asBroadcastStream(); - - // Listen to the `stream` in the inner zone (but wait in a microtask). - scheduleMicrotask(() { - stream.listen((x) { - events.add("stream $x"); - if (x == "error 2") done.complete(true); - }); - }); - }) - .listen((x) { - events.add(x); - }) - .asFuture() - .then((_) { - Expect.fail("Unexpected callback"); - }); - - // Listen to `stream` from the outer zone. - stream.listen((x) { - events.add("stream2 $x"); - }); - - // Feed the controller, but wait in a microtask. - scheduleMicrotask(() { - controller.add(1); - controller.addError(2); - controller.close(); - }); - }).listen((x) { - events.add("outer: $x"); - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - - done.future.whenComplete(() { - // Give handlers time to complete. - Timer.run(() { - Expect.listEquals([ - "map 1", - "stream2 101", - "stream 101", - "stream2 error 2", - "stream error 2", - ], events); - asyncEnd(); - }); - }); -} diff --git a/tests/lib_2/async/catch_errors25_test.dart b/tests/lib_2/async/catch_errors25_test.dart deleted file mode 100644 index 2fc8be095b4..00000000000 --- a/tests/lib_2/async/catch_errors25_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - - var events = []; - StreamController controller; - // Test multiple subscribers of an asBroadcastStream inside the same - // `catchErrors`. - catchErrors(() { - var stream = new Stream.fromIterable([1, 2]).asBroadcastStream(); - stream.listen(events.add); - stream.listen(events.add); - done.complete(stream.listen(null).asFuture()); - }).listen((x) { - events.add("outer: $x"); - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - - done.future.whenComplete(() { - // Give handlers time to run. - Timer.run(() { - Expect.listEquals([1, 1, 2, 2], events); - asyncEnd(); - }); - }); -} diff --git a/tests/lib_2/async/catch_errors26_test.dart b/tests/lib_2/async/catch_errors26_test.dart deleted file mode 100644 index 43d714851f7..00000000000 --- a/tests/lib_2/async/catch_errors26_test.dart +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - - var events = []; - StreamController controller; - Stream stream; - // Test `StreamController.broadcast` streams. - catchErrors(() { - catchErrors(() { - controller = new StreamController.broadcast(); - - // Listen to the stream from the inner zone. - controller.stream.map((x) { - events.add("map $x"); - return x + 100; - }).transform( - new StreamTransformer.fromHandlers(handleError: (e, st, sink) { - sink.add("error $e"); - })).listen((x) { - events.add("stream $x"); - }); - }) - .listen((x) { - events.add(x); - }) - .asFuture() - .then((_) { - Expect.fail("Unexpected callback"); - }); - - // Listen to the stream from the outer zone. - controller.stream.listen((x) { - events.add("stream2 $x"); - }, onError: (x) { - events.add("stream2 error $x"); - }); - - // Feed the controller. - controller.add(1); - controller.addError("inner stream"); - new Future.error("outer error"); - controller.close(); - }).listen((x) { - events.add("outer: $x"); - if (x == "outer error") done.complete(true); - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - - done.future.whenComplete(() { - // Give handlers time to run. - Timer.run(() { - Expect.listEquals([ - "map 1", - "stream 101", - "stream2 1", - "stream error inner stream", - "stream2 error inner stream", - "outer: outer error", - ], events); - asyncEnd(); - }); - }); -} diff --git a/tests/lib_2/async/catch_errors27_test.dart b/tests/lib_2/async/catch_errors27_test.dart deleted file mode 100644 index f829b41e6da..00000000000 --- a/tests/lib_2/async/catch_errors27_test.dart +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - - var events = []; - StreamController controller; - Stream stream; - // Test that streams live in the zone they have been listened too. - // It doesn't matter how many zone-boundaries the stream traverses. What - // counts is the zone where `listen` was invoked. - catchErrors(() { - catchErrors(() { - controller = new StreamController(); - - // Assignment to "global" `stream`. - stream = controller.stream.map((x) { - events.add("map $x"); - return x + 100; - }).asBroadcastStream(); - - // Consume stream in the nested zone. - stream.transform( - new StreamTransformer.fromHandlers(handleError: (e, st, sink) { - sink.add("error $e"); - })).listen((x) { - events.add("stream $x"); - }); - - // Feed the controller in the nested zone. - scheduleMicrotask(() { - controller.add(1); - controller.addError(2); - controller.close(); - new Future.error("done"); - }); - }) - .listen((x) { - events.add("listen: $x"); - if (x == "done") done.complete(true); - }) - .asFuture() - .then((_) { - Expect.fail("Unexpected callback"); - }); - - // Listen to stream in outer zone. - stream.listen((x) { - events.add("stream2 $x"); - }); - }).listen((x) { - events.add("outer: $x"); - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - - done.future.whenComplete(() { - // Give handlers time to run. - Timer.run(() { - Expect.listEquals([ - "map 1", - "stream 101", - "stream2 101", - "stream error 2", - "listen: done", - "outer: 2", - ], events); - asyncEnd(); - }); - }); -} diff --git a/tests/lib_2/async/catch_errors28_test.dart b/tests/lib_2/async/catch_errors28_test.dart deleted file mode 100644 index 2d1a4d6f8da..00000000000 --- a/tests/lib_2/async/catch_errors28_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - - var events = []; - // Test that periodic Timers are handled correctly by `catchErrors`. - catchErrors(() { - int counter = 0; - new Timer.periodic(const Duration(milliseconds: 50), (timer) { - if (counter == 5) { - timer.cancel(); - done.complete(true); - } - counter++; - events.add(counter); - }); - }).listen((x) { - events.add(x); - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - - done.future.whenComplete(() { - // Give handlers time to run. - Timer.run(() { - Expect.listEquals([ - "main exit", - 1, - 2, - 3, - 4, - 5, - 6, - ], events); - asyncEnd(); - }); - }); - - events.add("main exit"); -} diff --git a/tests/lib_2/async/catch_errors2_test.dart b/tests/lib_2/async/catch_errors2_test.dart deleted file mode 100644 index eb61bc43e82..00000000000 --- a/tests/lib_2/async/catch_errors2_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - bool futureWasExecuted = false; - Future done; - - // Error streams never close. - catchErrors(() { - done = new Future(() { - futureWasExecuted = true; - }); - return 'allDone'; - }).listen((x) { - Expect.fail("Unexpected callback"); - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - - done.whenComplete(asyncEnd); -} diff --git a/tests/lib_2/async/catch_errors3_test.dart b/tests/lib_2/async/catch_errors3_test.dart deleted file mode 100644 index f55cf5a01f3..00000000000 --- a/tests/lib_2/async/catch_errors3_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - bool futureWasExecuted = false; - bool future2WasExecuted = false; - - // Make sure `catchErrors` never closes its stream. - catchErrors(() { - new Future(() => 499).then((x) { - futureWasExecuted = true; - }); - scheduleMicrotask(() { - new Future(() => 42).then((x) { - future2WasExecuted = true; - Expect.isTrue(futureWasExecuted); - done.complete(true); - }); - }); - return 'allDone'; - }).listen((x) { - Expect.fail("Unexpected callback"); - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - done.future.whenComplete(asyncEnd); -} diff --git a/tests/lib_2/async/catch_errors4_test.dart b/tests/lib_2/async/catch_errors4_test.dart deleted file mode 100644 index 7290634a325..00000000000 --- a/tests/lib_2/async/catch_errors4_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - - var events = []; - // Test that synchronous errors inside a `catchErrors` are caught. - catchErrors(() { - events.add("catch error entry"); - throw "catch error"; - }).listen((x) { - events.add(x); - done.complete(true); - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - - done.future.whenComplete(() { - Expect.listEquals([ - "catch error entry", - "main exit", - "catch error", - ], events); - asyncEnd(); - }); - events.add("main exit"); -} diff --git a/tests/lib_2/async/catch_errors5_test.dart b/tests/lib_2/async/catch_errors5_test.dart deleted file mode 100644 index 01d81ae3170..00000000000 --- a/tests/lib_2/async/catch_errors5_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - - var events = []; - // Test that synchronous *and* asynchronous errors are caught by - // `catchErrors`. - catchErrors(() { - events.add("catch error entry"); - Future errorFuture = new Future.error("future error"); - errorFuture.whenComplete(() => done.complete(true)); - throw "catch error"; - }).listen((x) { - events.add(x); - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - - done.future.whenComplete(() { - // Give some time for the event listener to execute. - Timer.run(() { - Expect.listEquals([ - "catch error entry", - "main exit", - "catch error", - "future error", - ], events); - asyncEnd(); - }); - }); - events.add("main exit"); -} diff --git a/tests/lib_2/async/catch_errors6_test.dart b/tests/lib_2/async/catch_errors6_test.dart deleted file mode 100644 index f4b70fa9133..00000000000 --- a/tests/lib_2/async/catch_errors6_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - var completer = new Completer(); - var errorHandlerOrDoneHasBeenExecuted = false; - // Test that `catchErrors` doesn't shut down if a future is never completed. - catchErrors(() { - completer.future.then((x) { - Expect.fail("should not be executed"); - }); - }).listen((x) { - errorHandlerOrDoneHasBeenExecuted = true; - Expect.fail("should not be executed (listen)"); - }, onDone: () { - errorHandlerOrDoneHasBeenExecuted = true; - Expect.fail("should not be executed (onDone)"); - }); - Timer.run(() { - Expect.isFalse(errorHandlerOrDoneHasBeenExecuted); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/catch_errors7_test.dart b/tests/lib_2/async/catch_errors7_test.dart deleted file mode 100644 index 32b37b1a13d..00000000000 --- a/tests/lib_2/async/catch_errors7_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - - var events = []; - // Test that asynchronous errors are caught. - catchErrors(() { - events.add("catch error entry"); - var futures = [ - new Future.error("future error"), - new Future.error("future error2"), - new Future.value(499).then((x) => throw x), - ]; - int completedCount = 0; - for (var future in futures) { - future.whenComplete(() { - completedCount++; - if (completedCount == 3) done.complete(true); - }); - } - throw "catch error"; - }).listen((x) { - events.add(x); - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - - done.future.whenComplete(() { - // Give handlers time to execute. - Timer.run(() { - Expect.listEquals([ - "catch error entry", - "main exit", - "catch error", - "future error", - "future error2", - 499, - ], events); - asyncEnd(); - }); - }); - events.add("main exit"); -} diff --git a/tests/lib_2/async/catch_errors8_test.dart b/tests/lib_2/async/catch_errors8_test.dart deleted file mode 100644 index 05f31e9445f..00000000000 --- a/tests/lib_2/async/catch_errors8_test.dart +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - - var events = []; - // Test nested `catchErrors`. - // The nested `catchErrors` throws all kinds of different errors (synchronous - // and asynchronous). The body of the outer `catchErrors` furthermore has a - // synchronous `throw`. - catchErrors(() { - events.add("catch error entry"); - catchErrors(() { - events.add("catch error entry2"); - new Future.error("future error"); - new Future.error("future error2"); - new Future.value(499).then((x) => throw x); - new Future.delayed(const Duration(milliseconds: 50), () { - throw "delayed error"; - }); - throw "catch error"; - }).listen((x) { - events.add(x); - if (x == "delayed error") { - throw "inner done throw"; - } - }); - events.add("after inner"); - throw "inner throw"; - }).listen((x) { - events.add(x); - if (x == "inner done throw") { - done.complete(true); - } - }, onDone: () { - Expect.fail("Unexpected callback"); - }); - - done.future.whenComplete(() { - Expect.listEquals([ - "catch error entry", - "catch error entry2", - "after inner", - "main exit", - "catch error", - "inner throw", - "future error", - "future error2", - 499, - "delayed error", - "inner done throw" - ], events); - asyncEnd(); - }); - events.add("main exit"); -} diff --git a/tests/lib_2/async/catch_errors_test.dart b/tests/lib_2/async/catch_errors_test.dart deleted file mode 100644 index aa3c20eb141..00000000000 --- a/tests/lib_2/async/catch_errors_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - - // Make sure `catchErrors` does not execute the error callback. - catchErrors(() { - return 'allDone'; - }).listen((x) { - Expect.fail("Unexpected callback"); - }); - - // Wait one cycle before shutting down the test. - Timer.run(asyncEnd); -} diff --git a/tests/lib_2/async/dart2js_uncaught_error_test.dart b/tests/lib_2/async/dart2js_uncaught_error_test.dart deleted file mode 100644 index faaeab8201f..00000000000 --- a/tests/lib_2/async/dart2js_uncaught_error_test.dart +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2013, 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 - -// TODO(bkonyi): This test should be moved to compiler/dart2js. - -import "dart:async"; -import "dart:js"; -import "dart:collection" show Queue; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -var errors = new Queue(); -int ctr = 0; - -main() { - print("STARTED"); - asyncStart(); - - void errorHandler(self, message, url, line, [column, error]) { - print(">> $message / $ctr"); - var expect = errors.removeFirst(); - if (ctr == 2) { - asyncEnd(); - print("DONE"); - } - Expect.equals(expect[0].toString(), message); - Expect.equals(expect[1].toString(), error["stack"].toString()); - } - - context["onerror"] = new JsFunction.withThis(errorHandler); - - void throwit() { - var err = ++ctr; - try { - throw err; - } catch (e, s) { - errors.add([e, s]); - rethrow; - } - } - - () async { - () async { - throwit(); - }(); - throwit(); - }(); -} diff --git a/tests/lib_2/async/event_helper.dart b/tests/lib_2/async/event_helper.dart deleted file mode 100644 index 3dd075095c6..00000000000 --- a/tests/lib_2/async/event_helper.dart +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) 2012, 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 event_helper; - -import 'dart:async'; - -abstract class Event { - void replay(EventSink sink); -} - -class DataEvent implements Event { - final data; - - DataEvent(this.data); - - void replay(EventSink sink) { - sink.add(data); - } - - int get hashCode => data.hashCode; - - bool operator ==(Object other) { - if (other is! DataEvent) return false; - DataEvent otherEvent = other; - return data == otherEvent.data; - } - - String toString() => "DataEvent: $data"; -} - -class ErrorEvent implements Event { - final error; - - ErrorEvent(this.error); - - void replay(EventSink sink) { - sink.addError(error); - } - - int get hashCode => error.error.hashCode; - - bool operator ==(Object other) { - if (other is! ErrorEvent) return false; - ErrorEvent otherEvent = other; - return error == otherEvent.error; - } - - String toString() => "ErrorEvent: ${error}"; -} - -class DoneEvent implements Event { - const DoneEvent(); - - void replay(EventSink sink) { - sink.close(); - } - - int get hashCode => 42; - - bool operator ==(Object other) => other is DoneEvent; - - String toString() => "DoneEvent"; -} - -/** Collector of events. */ -class Events implements EventSink { - final List events = []; - bool trace = false; - Completer onDoneSignal = new Completer(); - - Events(); - - Events.fromIterable(Iterable iterable) { - for (var value in iterable) add(value); - close(); - } - - /** Capture events from a stream into a new [Events] object. */ - factory Events.capture(Stream stream, {bool cancelOnError}) = CaptureEvents; - - // EventSink interface. - void add(var value) { - if (trace) print("Events#$hashCode: add($value)"); - events.add(new DataEvent(value)); - } - - void addError(error, [StackTrace stackTrace]) { - if (trace) print("Events#$hashCode: addError($error)"); - events.add(new ErrorEvent(error)); - } - - void close() { - if (trace) print("Events#$hashCode: close()"); - events.add(const DoneEvent()); - onDoneSignal.complete(); - } - - /** - * Error shorthand, for writing events manually. - */ - void error(var value, [StackTrace stackTrace]) { - addError(value, stackTrace); - } - - /** Replay the captured events on a sink. */ - void replay(EventSink sink) { - for (int i = 0; i < events.length; i++) { - events[i].replay(sink); - } - } - - /** - * Create a new [Events] with the same captured events. - * - * This does not copy a subscription. - */ - Events copy() { - Events result = new Events(); - replay(result); - return result; - } - - // Operations that only work when there is a subscription feeding the Events. - - /** - * Pauses the subscription that feeds this [Events]. - * - * Should only be used when there is a subscription. That is, after a - * call to [subscribeTo]. - */ - void pause([Future resumeSignal]) { - throw new StateError("Not capturing events."); - } - - /** Resumes after a call to [pause]. */ - void resume() { - throw new StateError("Not capturing events."); - } - - /** - * Sets an action to be called when this [Events] receives a 'done' event. - * - * The action will also be called if capturing events from a stream with - * `cancelOnError` set to true and receiving an error. - */ - void onDone(void action()) { - onDoneSignal.future.whenComplete(action); - } -} - -class CaptureEvents extends Events { - StreamSubscription subscription; - bool cancelOnError = false; - - CaptureEvents(Stream stream, {bool cancelOnError: false}) { - this.cancelOnError = cancelOnError; - subscription = stream.listen(add, - onError: addError, onDone: close, cancelOnError: cancelOnError); - } - - void addError(error, [stackTrace]) { - super.addError(error, stackTrace); - if (cancelOnError) { - onDoneSignal.complete(); - } - } - - void pause([Future resumeSignal]) { - if (trace) print("Events#$hashCode: pause"); - subscription.pause(resumeSignal); - } - - void resume() { - if (trace) print("Events#$hashCode: resume"); - subscription.resume(); - } - - void onDone(void action()) { - if (trace) print("Events#$hashCode: onDone"); - super.onDone(action); - } -} diff --git a/tests/lib_2/async/first_regression_test.dart b/tests/lib_2/async/first_regression_test.dart deleted file mode 100644 index c0d49e5e73d..00000000000 --- a/tests/lib_2/async/first_regression_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2012, 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 - -// Regression test for http://dartbug.com/7964 - -library first_regression_test; - -import 'dart:async'; - -class DoubleTransformer extends StreamTransformerBase { - Stream bind(Stream stream) { - var transformer = new StreamTransformer.fromHandlers( - handleData: (T data, EventSink sink) { - sink.add(data); - sink.add(data); - }); - return transformer.bind(stream); - } -} - -main() async { - // This should not crash. Did crash by trying to complete future more - // than once. - await (new Stream.fromIterable([1, 2]).transform(new DoubleTransformer())) - .first; -} diff --git a/tests/lib_2/async/future_constructor2_test.dart b/tests/lib_2/async/future_constructor2_test.dart deleted file mode 100644 index 29693b139c3..00000000000 --- a/tests/lib_2/async/future_constructor2_test.dart +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2015, 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 future_delayed_test; - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; - -Future createIntFuture() { - return new Future.value(499); -} - -unnamed() { - asyncStart(); - new Future(createIntFuture).then((x) { - Expect.equals(499, x); - asyncEnd(); - }); -} - -delayed() { - asyncStart(); - new Future.delayed(const Duration(milliseconds: 2), createIntFuture) - .then((x) { - Expect.equals(499, x); - asyncEnd(); - }); -} - -microtask() { - asyncStart(); - new Future.microtask(createIntFuture).then((x) { - Expect.equals(499, x); - asyncEnd(); - }); -} - -sync() { - asyncStart(); - new Future.sync(createIntFuture).then((x) { - Expect.equals(499, x); - asyncEnd(); - }); -} - -main() { - asyncStart(); - // Test that all the Future constructors take functions that return a Future - // as argument. - // In particular the constructors must not type their argument as - // `T computation()`. - unnamed(); - delayed(); - microtask(); - sync(); - asyncEnd(); -} diff --git a/tests/lib_2/async/future_constructor_test.dart b/tests/lib_2/async/future_constructor_test.dart deleted file mode 100644 index 6d97507f100..00000000000 --- a/tests/lib_2/async/future_constructor_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2012, 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 future_test; - -import "package:expect/expect.dart"; -import 'dart:async'; - -main() { - compare(func) { - // Compare the results of the following two futures. - Future f1 = new Future(func); - Future f2 = new Future.value().then((_) => func()); - f2.catchError((_) {}); // I'll get the error later. - f1.then((v1) { - f2.then((v2) { - Expect.equals(v1, v2); - }); - }, onError: (e1) { - f2.then((_) { - Expect.fail("Expected error"); - }, onError: (e2) { - Expect.equals(e1, e2); - }); - }); - } - - Future val = new Future.value(42); - Future err1 = new Future.error("Error")..catchError((_) {}); - compare(() => 42); - compare(() => val); - compare(() { - throw "Flif"; - }); - compare(() => err1); - bool hasExecuted = false; - compare(() { - hasExecuted = true; - return 499; - }); - Expect.isFalse(hasExecuted); -} diff --git a/tests/lib_2/async/future_delayed_error_test.dart b/tests/lib_2/async/future_delayed_error_test.dart deleted file mode 100644 index af60b02ad15..00000000000 --- a/tests/lib_2/async/future_delayed_error_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012, 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 future_delayed_error_test; - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; - -testImmediateError() { - asyncStart(); - var future = new Future.error("error"); - future.catchError((error) { - Expect.equals(error, "error"); - asyncEnd(); - }); -} - -Future get completedFuture { - var completer = new Completer(); - completer.completeError("foobar"); - return completer.future; -} - -testDelayedError() { - asyncStart(); - completedFuture.catchError((error) { - Expect.equals(error, "foobar"); - asyncEnd(); - }); -} - -main() { - testImmediateError(); - testDelayedError(); -} diff --git a/tests/lib_2/async/future_error_test.dart b/tests/lib_2/async/future_error_test.dart deleted file mode 100644 index 483b4815c1f..00000000000 --- a/tests/lib_2/async/future_error_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// 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. - -// @dart = 2.9 -import 'dart:async'; - -import 'package:expect/expect.dart'; - -main() { - // The error cannot be null. - Expect.throwsTypeError(() { - Future.error(null); - }); -} diff --git a/tests/lib_2/async/future_extension_test.dart b/tests/lib_2/async/future_extension_test.dart deleted file mode 100644 index 769a0f52e53..00000000000 --- a/tests/lib_2/async/future_extension_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2021, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async' show Completer, runZonedGuarded; -import '../../language_2/static_type_helper.dart'; - -void main() { - testIgnore(); -} - -void testIgnore() { - var future = Future.value(42); - captureStaticType(future.ignore(), (T value) { - Expect.equals(typeOf(), T); - }); - - asyncStart(); - // Ignored futures can still be listened to. - { - var c = Completer.sync(); - var f = c.future; - f.ignore(); - asyncStart(); - f.catchError((e) { - Expect.equals("ERROR1", e); - asyncEnd(); - return 0; - }); - c.completeError("ERROR1"); - } - - // Ignored futures are not uncaught errors. - { - asyncStart(); - bool threw = false; - runZonedGuarded(() { - var c = Completer.sync(); - var f = c.future; - f.ignore(); - c.completeError("ERROR2"); - }, (e, s) { - threw = true; - Expect.fail("Should not happen: $e"); - }); - Future.delayed(Duration.zero, () { - if (threw) Expect.fail("Future not ignored."); - asyncEnd(); - }); - } - asyncEnd(); -} diff --git a/tests/lib_2/async/future_foreach_test.dart b/tests/lib_2/async/future_foreach_test.dart deleted file mode 100644 index 723a91e273d..00000000000 --- a/tests/lib_2/async/future_foreach_test.dart +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) 2017, 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 future_foreach_test; - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; - -main() { - asyncStart(); - - testForeach([]); - testForeach([0]); - testForeach([0, 1, 2, 3]); - - testForeachIterableThrows( - new Iterable.generate(5, (i) => i < 4 ? i : throw "ERROR"), - 4, - "ERROR"); - - testForeachFunctionThrows(new Iterable.generate(5, (x) => x), 4); - - asyncEnd(); -} - -void testForeach(Iterable elements) { - for (var delay in [0, 1, 2]) { - asyncStart(); - int length = elements.length; - int count = 0; - int nesting = 0; - Future.forEach(elements, (int value) { - Expect.isTrue(nesting == 0, "overlapping calls detected"); - if (delay == 0) return "something-$delay"; - nesting++; - var future; - if (delay == 1) { - future = new Future(() => null); - } else { - future = new Future.microtask(() => null); - } - return future.then((_) { - Expect.equals(1, nesting); - nesting--; - return "something-$delay"; - }); - }).then((_) { - asyncEnd(); - }).catchError((e) { - Expect.fail("Throws: $e"); - }); - } -} - -void testForeachIterableThrows(Iterable elements, n, error) { - for (var delay in [0, 1, 2]) { - asyncStart(); - int count = 0; - Future.forEach(elements, (_) { - count++; - Expect.isTrue(n >= 0); - switch (delay) { - case 1: - return new Future(() {}); - case 2: - return new Future.microtask(() {}); - } - }).then((_) { - Expect.fail("Did not throw"); - }, onError: (e) { - Expect.equals(n, count); - Expect.equals(error, e); - asyncEnd(); - }); - } -} - -void testForeachFunctionThrows(Iterable elements, n) { - for (var delay in [0, 1, 2]) { - asyncStart(); - Future.forEach(elements, (v) { - if (v == n) { - switch (delay) { - case 0: - throw "ERROR"; - case 1: - return new Future(() { - throw "ERROR"; - }); - case 2: - return new Future.microtask(() { - throw "ERROR"; - }); - } - } - switch (delay) { - case 1: - return new Future(() {}); - case 2: - return new Future.microtask(() {}); - } - }).then((_) { - Expect.fail("Did not throw"); - }, onError: (e) { - Expect.equals("ERROR", e); - asyncEnd(); - }); - } -} diff --git a/tests/lib_2/async/future_future_test.dart b/tests/lib_2/async/future_future_test.dart deleted file mode 100644 index 1d4a0a94684..00000000000 --- a/tests/lib_2/async/future_future_test.dart +++ /dev/null @@ -1,189 +0,0 @@ -// 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. - -// @dart = 2.9 - -// Checks that Future> is a valid type and that futures can contain -// and complete other futures. - -// This essentially checks that `FutureOr` is treated correctly depending -// on what `X` is. - -import 'dart:async'; -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; - -main() { - asyncStart(); - - // Helper values. - Future nullFuture = Future.value(null); - - var stack = StackTrace.current; - var error = ArgumentError("yep"); - Future errorFuture = Future.error(error, stack) - ..catchError((_) => null); - Future fi(int n) => Future.value(n); - - // Tests that Future> can be created. - Future> ffi(n) => Future>.value(fi(n)); - - asyncTest(() { - return expectFutureFutureInt(ffi(0), 0); - }); - - // Check `Future.then`'s callback. - - asyncTest(() { - Future future = nullFuture.then((_) => fi(1)); - return expectFutureInt(future, 1); - }); - - asyncTest(() { - Future> future = nullFuture.then>((_) => fi(2)); - return expectFutureFutureInt(future, 2); - }); - - asyncTest(() { - Future> future = nullFuture.then>((_) => ffi(3)); - return expectFutureFutureInt(future, 3); - }); - - // Check `Future.then`'s `onError`. - - asyncTest(() { - Future future = - errorFuture.then((_) => -1, onError: (_) => fi(4)); - return expectFutureInt(future, 4); - }); - - asyncTest(() { - Future> future = - errorFuture.then>((_) => fi(-1), onError: (_) => fi(5)); - return expectFutureFutureInt(future, 5); - }); - - asyncTest(() { - Future> future = - errorFuture.then>((_) => fi(-1), onError: (_) => ffi(6)); - return expectFutureFutureInt(future, 6); - }); - - // Checkc Future.catchError, it's FutureOr is based on the - // original future's type. - - asyncTest(() { - Future errorFuture = Future.error(error, stack); - Future future = errorFuture.catchError((_) => fi(7)); - return expectFutureInt(future, 7); - }); - - asyncTest(() { - Future> errorFuture = Future>.error(error, stack); - Future> future = errorFuture.catchError((_) => fi(8)); - return expectFutureFutureInt(future, 8); - }); - - asyncTest(() { - Future> errorFuture = Future>.error(error, stack); - Future> future = errorFuture.catchError((_) => ffi(9)); - return expectFutureFutureInt(future, 9); - }); - - // Check Completer.complete. - - asyncTest(() { - var completer = Completer()..complete(fi(10)); - return expectFutureInt(completer.future, 10); - }); - - asyncTest(() { - var completer = Completer>()..complete(fi(11)); - return expectFutureFutureInt(completer.future, 11); - }); - - asyncTest(() { - var completer = Completer>()..complete(ffi(12)); - return expectFutureFutureInt(completer.future, 12); - }); - - // Future works correctly when Object is another Future. - asyncTest(() { - Future future = nullFuture.then((_) => fi(13)); - Expect.type>(future); - Expect.notType>(future); - return future.then((o) { - Expect.equals(13, o); - }); - }); - - asyncTest(() { - Future future = nullFuture.then((_) => ffi(14)); - Expect.type>(future); - Expect.notType>(future); - Expect.notType>>(future); - return future.then((v) => expectFutureInt(v, 14)); - }); - - asyncTest(() { - Future future = - errorFuture.then((_) => -1, onError: (_) => fi(15)); - Expect.type>(future); - Expect.notType>(future); - return future.then((o) { - Expect.equals(15, o); - }); - }); - - asyncTest(() { - Future future = - errorFuture.then((_) => -1, onError: (_) => ffi(16)); - Expect.type>(future); - Expect.notType>(future); - Expect.notType>>(future); - return future.then((v) => expectFutureInt(v, 16)); - }); - - asyncTest(() { - Future errorFuture = Future.error(error, stack); - Future future = errorFuture.catchError((_) => fi(17)); - Expect.type>(future); - Expect.notType>(future); - return future.then((o) { - Expect.equals(17, o); - }); - }); - - asyncTest(() { - Future errorFuture = Future.error(error, stack); - Future future = errorFuture.catchError((_) => ffi(18)); - Expect.type>(future); - Expect.notType>(future); - Expect.notType>>(future); - return future.then((v) => expectFutureInt(v, 18)); - }); - - asyncEnd(); -} - -// Checks that future is a Future> containing the value Future -// which then contains the value 42. -Future expectFutureFutureInt(dynamic future, int n) { - Expect.type>>(future); - asyncStart(); - return future.then((dynamic v) { - Expect.type>(v, "$n"); - return expectFutureInt(v, n).then(asyncSuccess); - }); -} - -Future expectFutureInt(dynamic future, int n) { - Expect.type>(future); - asyncStart(); - return future.then((dynamic v) { - Expect.type(v, "$n"); - Expect.equals(n, v); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/future_microtask_test.dart b/tests/lib_2/async/future_microtask_test.dart deleted file mode 100644 index 78a5808aadd..00000000000 --- a/tests/lib_2/async/future_microtask_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:async'; -import 'package:async_helper/async_helper.dart'; - -main() { - asyncStart(); - dynamic x = 499; - scheduleMicrotask(() { - Expect.equals(499, x); - x = 42; - }); - new Future.microtask(() { - Expect.equals(42, x); - x = null; - return 99; - }).then((val) { - Expect.isNull(x); - Expect.equals(99, val); - x = "foo"; - }); - scheduleMicrotask(() { - Expect.equals("foo", x); - x = "toto"; - asyncEnd(); - }); - - asyncStart(); - new Future.microtask(() { - throw "foo"; - }).catchError((e, stackTrace) { - Expect.equals("foo", e); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/future_or_bad_type_test.dart b/tests/lib_2/async/future_or_bad_type_test.dart deleted file mode 100644 index 96ee05a534a..00000000000 --- a/tests/lib_2/async/future_or_bad_type_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2016, 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 - -// In non strong-mode, `FutureOr` is dynamic, even if `T` doesn't exist. -// `FutureOr` can not be used as superclass, mixin, nor can it be -// implemented (as interface). - -import 'dart:async'; -import 'package:expect/expect.dart'; - -class A extends FutureOr {} -// ^ -// [cfe] The superclass, 'FutureOr', has no unnamed constructor that takes no arguments. -// ^^^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE - -class B with FutureOr {} -// ^ -// [cfe] Can't use 'FutureOr' as a mixin because it has constructors. -// ^^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE - -class C implements FutureOr {} -// ^ -// [cfe] The type 'FutureOr' can't be used in an 'implements' clause. -// ^^^^^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.SUBTYPE_OF_DISALLOWED_TYPE - -main() {} diff --git a/tests/lib_2/async/future_or_only_in_async_test.dart b/tests/lib_2/async/future_or_only_in_async_test.dart deleted file mode 100644 index 5af0a85c55a..00000000000 --- a/tests/lib_2/async/future_or_only_in_async_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2016, 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 - -// `FutureOr` is only visible when `dart:async` is imported. - -dynamic foo(dynamic x) { - return x as - FutureOr< //# 00: compile-time error - int - > // //# 00: continued - ; -} - -main() { - if (499 != foo(499)) throw "bad"; -} diff --git a/tests/lib_2/async/future_or_strong_test.dart b/tests/lib_2/async/future_or_strong_test.dart deleted file mode 100644 index b7a37a00a15..00000000000 --- a/tests/lib_2/async/future_or_strong_test.dart +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) 2016, 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 - -// In strong mode, `FutureOr` should be equivalent to the union of `Future` -// and `T`. - -import 'dart:async'; -import 'package:expect/expect.dart'; - -typedef void FunTakes(T x); -typedef T FunReturns(); - -main() { - Expect.isTrue(499 is FutureOr); // Same as `is Object`. - Expect.isTrue(499 is FutureOr); - Expect.isFalse(499 is FutureOr); - - Expect.isTrue(new Future.value(499) is FutureOr); // Same as `is Object`. - Expect.isTrue(new Future.value(499) is FutureOr); - Expect.isFalse(new Future.value(499) is FutureOr); - - void foo(FutureOr x) {} // Equivalent to `void bar(Object x) {}`. - - // A function that takes Object takes everything. - Expect.isTrue(foo is FunTakes); - Expect.isTrue(foo is FunTakes); - Expect.isTrue(foo is FunTakes); - Expect.isTrue(foo is FunTakes); - Expect.isTrue(foo is FunTakes>); - Expect.isTrue(foo is FunTakes>); - Expect.isTrue(foo is FunTakes>); - Expect.isTrue(foo is FunTakes>); - Expect.isTrue(foo is FunTakes>); - Expect.isTrue(foo is FunTakes>>); - Expect.isTrue(foo is FunTakes>>); - Expect.isTrue(foo is FunTakes>>); - - FutureOr bar() => 499; // Equivalent to `Object foo() => 499`. - - Expect.isTrue(bar is FunReturns); - Expect.isTrue(bar is FunReturns); - Expect.isFalse(bar is FunReturns); - Expect.isFalse(bar is FunReturns); - Expect.isFalse(bar is FunReturns>); - Expect.isFalse(bar is FunReturns>); - Expect.isTrue(bar is FunReturns>); - Expect.isFalse(bar is FunReturns>); - Expect.isFalse(bar is FunReturns>); - Expect.isTrue(bar is FunReturns>>); - Expect.isFalse(bar is FunReturns>>); - Expect.isFalse(bar is FunReturns>>); - - void foo2(FutureOr x) {} - - Expect.isFalse(foo2 is FunTakes); - Expect.isFalse(foo2 is FunTakes); - Expect.isFalse(foo2 is FunTakes); - Expect.isTrue(foo2 is FunTakes); - Expect.isFalse(foo2 is FunTakes>); - Expect.isTrue(foo2 is FunTakes>); - Expect.isFalse(foo2 is FunTakes>); - Expect.isFalse(foo2 is FunTakes>); - Expect.isTrue(foo2 is FunTakes>); - Expect.isFalse(foo2 is FunTakes>>); - Expect.isFalse(foo2 is FunTakes>>); - Expect.isFalse(foo2 is FunTakes>>); - - FutureOr bar2() => 499; - - Expect.isTrue(bar2 is FunReturns); - Expect.isTrue(bar2 is FunReturns); - Expect.isFalse(bar2 is FunReturns); - Expect.isFalse(bar2 is FunReturns); - Expect.isFalse(bar2 is FunReturns>); - Expect.isFalse(bar2 is FunReturns>); - Expect.isTrue(bar2 is FunReturns>); - Expect.isTrue(bar2 is FunReturns>); - Expect.isFalse(bar2 is FunReturns>); - Expect.isTrue(bar2 is FunReturns>>); - Expect.isTrue(bar2 is FunReturns>>); - Expect.isFalse(bar2 is FunReturns>>); - - void foo3(String x) {} - - Expect.isFalse(foo3 is FunTakes); - Expect.isFalse(foo3 is FunTakes); - Expect.isFalse(foo3 is FunTakes); - Expect.isTrue(foo3 is FunTakes); - Expect.isFalse(foo3 is FunTakes>); - Expect.isFalse(foo3 is FunTakes>); - Expect.isFalse(foo3 is FunTakes>); - Expect.isFalse(foo3 is FunTakes>); - Expect.isFalse(foo3 is FunTakes>); - Expect.isFalse(foo3 is FunTakes>>); - Expect.isFalse(foo3 is FunTakes>>); - Expect.isFalse(foo3 is FunTakes>>); - - int bar3() => 499; - - Expect.isTrue(bar3 is FunReturns); - Expect.isTrue(bar3 is FunReturns); - Expect.isTrue(bar3 is FunReturns); - Expect.isFalse(bar3 is FunReturns); - Expect.isFalse(bar3 is FunReturns>); - Expect.isFalse(bar3 is FunReturns>); - Expect.isTrue(bar3 is FunReturns>); - Expect.isTrue(bar3 is FunReturns>); - Expect.isFalse(bar3 is FunReturns>); - Expect.isTrue(bar3 is FunReturns>>); - Expect.isTrue(bar3 is FunReturns>>); - Expect.isFalse(bar3 is FunReturns>>); -} diff --git a/tests/lib_2/async/future_or_type_test.dart b/tests/lib_2/async/future_or_type_test.dart deleted file mode 100644 index c99f03f50c6..00000000000 --- a/tests/lib_2/async/future_or_type_test.dart +++ /dev/null @@ -1,256 +0,0 @@ -// Copyright (c) 2018, 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 - -// In strong mode, `FutureOr` should be a valid type in most locations. - -import 'dart:async'; -import 'package:expect/expect.dart'; - -typedef void FunTakes(T x); -typedef T FunReturns(); - -main() { - // Some useful values. - dynamic n = null; - dynamic i = 0; - dynamic d = 1.5; - dynamic fni = new Future.value(i); - dynamic fnd = new Future.value(d); - dynamic fi = new Future.value(i); - dynamic fd = new Future.value(d); - dynamic fn = new Future.value(null); - - dynamic o = new Object(); - dynamic fo = new Future.value(o); - dynamic foi = new Future.value(i); - - if (typeAssertionsEnabled) { - // Type annotation allows correct values. - FutureOr v; - v = n; - v = i; - v = d; - v = fni; - v = fnd; - v = fi; - v = fd; - v = fn; - // Disallows invalid values. - // These are all valid down-casts that fail at runtime. - Expect.throws(() => v = o); - Expect.throws(() => v = fo); - Expect.throws(() => v = foi); - - void fun(FutureOr v) {} - fun(n); - fun(i); - fun(d); - fun(fni); - fun(fnd); - fun(fi); - fun(fd); - fun(fn); - // Disallows invalid values. - // These are all valid down-casts that fail at runtime. - Expect.throws(() => fun(o)); - Expect.throws(() => fun(fo)); - Expect.throws(() => fun(foi)); - - FutureOr fun2(Object o) => o; // implicit down-cast to return type. - fun2(n); - fun2(i); - fun2(d); - fun2(fni); - fun2(fnd); - fun2(fi); - fun2(fd); - fun2(fn); - // Disallows invalid values. - Expect.throws(() => fun2(o)); - Expect.throws(() => fun2(fo)); - Expect.throws(() => fun2(foi)); - - List list = >[]; - list.add(n); - list.add(i); - list.add(d); - list.add(fni); - list.add(fnd); - list.add(fi); - list.add(fd); - list.add(fn); - Expect.throws(() => list.add(o)); - Expect.throws(() => list.add(fo)); - Expect.throws(() => list.add(foi)); - } - - { - // Casts. - FutureOr v; - v = n as FutureOr; - v = i as FutureOr; - v = d as FutureOr; - v = fni as FutureOr; - v = fnd as FutureOr; - v = fi as FutureOr; - v = fd as FutureOr; - v = fn as FutureOr; - // Disallows invalid values. - // These are all valid down-casts that fail at runtime. - Expect.throws(() => v = o as FutureOr); - Expect.throws(() => v = fo as FutureOr); - Expect.throws(() => v = foi as FutureOr); - } - - { - // on-catch - String check(Object o) { - try { - throw o; - } on FutureOr { - return "caught"; - } on Object { - return "uncaught"; - } - } - - // Can't throw null, so no `n` case here. - Expect.equals("caught", check(i)); - Expect.equals("caught", check(d)); - Expect.equals("caught", check(fni)); - Expect.equals("caught", check(fnd)); - Expect.equals("caught", check(fi)); - Expect.equals("caught", check(fd)); - Expect.equals("caught", check(fn)); - - Expect.equals("uncaught", check(o)); - Expect.equals("uncaught", check(fo)); - Expect.equals("uncaught", check(foi)); - } - - { - // Type variable bound. - var valids = >>[ - new C(), - new C(), - new C(), - new C(), - new C>(), - new C>(), - new C>(), - new C>(), - new C>(), - new C>(), - new C>(), - new C>(), - ]; - Expect.equals(12, valids.length); - } - - { - // Dynamic checks. - Expect.isFalse(new C>().isCheck(n)); - Expect.isTrue(new C>().isCheck(i)); - Expect.isTrue(new C>().isCheck(d)); - Expect.isTrue(new C>().isCheck(fni)); - Expect.isTrue(new C>().isCheck(fnd)); - Expect.isTrue(new C>().isCheck(fi)); - Expect.isTrue(new C>().isCheck(fd)); - Expect.isTrue(new C>().isCheck(fn)); - Expect.isFalse(new C>().isCheck(o)); - Expect.isFalse(new C>().isCheck(fo)); - Expect.isFalse(new C>().isCheck(foi)); - - Expect.isFalse(new C>().isCheck(n)); - Expect.isTrue(new C>().isCheck(i)); - Expect.isFalse(new C>().isCheck(d)); - Expect.isFalse(new C>().isCheck(fni)); - Expect.isFalse(new C>().isCheck(fnd)); - Expect.isTrue(new C>().isCheck(fi)); - Expect.isFalse(new C>().isCheck(fd)); - Expect.isTrue(new C>().isCheck(fn)); - Expect.isFalse(new C>().isCheck(o)); - Expect.isFalse(new C>().isCheck(fo)); - Expect.isFalse(new C>().isCheck(foi)); - - Expect.isTrue(new C>().isCheck(n)); - Expect.isFalse(new C>().isCheck(i)); - Expect.isFalse(new C>().isCheck(d)); - Expect.isFalse(new C>().isCheck(fni)); - Expect.isFalse(new C>().isCheck(fnd)); - Expect.isFalse(new C>().isCheck(fi)); - Expect.isFalse(new C>().isCheck(fd)); - Expect.isTrue(new C>().isCheck(fn)); - Expect.isFalse(new C>().isCheck(o)); - Expect.isFalse(new C>().isCheck(fo)); - Expect.isFalse(new C>().isCheck(foi)); - - Expect.isFalse(new C>().isCheck(n)); - Expect.isFalse(new C>().isCheck(i)); - Expect.isFalse(new C>().isCheck(d)); - Expect.isTrue(new C>().isCheck(fni)); - Expect.isTrue(new C>().isCheck(fnd)); - Expect.isTrue(new C>().isCheck(fi)); - Expect.isTrue(new C>().isCheck(fd)); - Expect.isTrue(new C>().isCheck(fn)); - Expect.isFalse(new C>().isCheck(o)); - Expect.isFalse(new C>().isCheck(fo)); - Expect.isFalse(new C>().isCheck(foi)); - - Expect.isFalse(new C>().isCheck(n)); - Expect.isFalse(new C>().isCheck(i)); - Expect.isFalse(new C>().isCheck(d)); - Expect.isFalse(new C>().isCheck(fni)); - Expect.isFalse(new C>().isCheck(fnd)); - Expect.isTrue(new C>().isCheck(fi)); - Expect.isFalse(new C>().isCheck(fd)); - Expect.isTrue(new C>().isCheck(fn)); - Expect.isFalse(new C>().isCheck(o)); - Expect.isFalse(new C>().isCheck(fo)); - Expect.isFalse(new C>().isCheck(foi)); - - Expect.isFalse(new C().isCheck(n)); - Expect.isTrue(new C().isCheck(i)); - Expect.isTrue(new C().isCheck(d)); - Expect.isFalse(new C().isCheck(fni)); - Expect.isFalse(new C().isCheck(fnd)); - Expect.isFalse(new C().isCheck(fi)); - Expect.isFalse(new C().isCheck(fd)); - Expect.isFalse(new C().isCheck(fn)); - Expect.isFalse(new C().isCheck(o)); - Expect.isFalse(new C().isCheck(fo)); - Expect.isFalse(new C().isCheck(foi)); - - Expect.isFalse(new C().isCheck(n)); - Expect.isTrue(new C().isCheck(i)); - Expect.isFalse(new C().isCheck(d)); - Expect.isFalse(new C().isCheck(fni)); - Expect.isFalse(new C().isCheck(fnd)); - Expect.isFalse(new C().isCheck(fi)); - Expect.isFalse(new C().isCheck(fd)); - Expect.isFalse(new C().isCheck(fn)); - Expect.isFalse(new C().isCheck(o)); - Expect.isFalse(new C().isCheck(fo)); - Expect.isFalse(new C().isCheck(foi)); - - Expect.isTrue(new C().isCheck(n)); - Expect.isFalse(new C().isCheck(i)); - Expect.isFalse(new C().isCheck(d)); - Expect.isFalse(new C().isCheck(fni)); - Expect.isFalse(new C().isCheck(fnd)); - Expect.isFalse(new C().isCheck(fi)); - Expect.isFalse(new C().isCheck(fd)); - Expect.isFalse(new C().isCheck(fn)); - Expect.isFalse(new C().isCheck(o)); - Expect.isFalse(new C().isCheck(fo)); - Expect.isFalse(new C().isCheck(foi)); - } -} - -// FutureOr used as type parameter bound. -class C> { - bool isCheck(Object o) => o is T; -} diff --git a/tests/lib_2/async/future_regression_48493_test.dart b/tests/lib_2/async/future_regression_48493_test.dart deleted file mode 100644 index e167bf369bc..00000000000 --- a/tests/lib_2/async/future_regression_48493_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2022, 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 - -// Regression test for http://dartbug.com/48493 -// -// The `Completer.complete` method, given an already completed `_Future` -// with a value result, will complete the `Completer.future` synchronously. - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; - -void main() async { - asyncStart(); - - var completer = Completer(); // Not synchronous. - var future = Future.value(4); - await future; // Ensure future completed. - bool thenRun = false; - completer.future.then((_) { - thenRun = true; - }); - Expect.isFalse(thenRun, "Sanity check"); - completer.complete(future); - Expect.isFalse(thenRun, "Ran early"); // Bug would cause this to fail. - await Future(() {}); // Await timer, all microtasks completed. - Expect.isTrue(thenRun, "Did not run as microtask"); - - asyncEnd(); -} diff --git a/tests/lib_2/async/future_test.dart b/tests/lib_2/async/future_test.dart deleted file mode 100644 index fa5c339585c..00000000000 --- a/tests/lib_2/async/future_test.dart +++ /dev/null @@ -1,1287 +0,0 @@ -// Copyright (c) 2012, 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 future_test; - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; - -const Duration MS = const Duration(milliseconds: 1); - -void testValue() { - final future = new Future.value("42"); - asyncStart(); - future.then((x) { - Expect.equals("42", x); - asyncEnd(); - }); -} - -void testSync() { - compare(func) { - // Compare the results of the following two futures. - Future f1 = new Future.sync(func); - Future f2 = new Future.value().then((_) => func()); - f2.catchError((_) {}); // I'll get the error later. - f1.then((v1) { - f2.then((v2) { - Expect.equals(v1, v2); - }); - }, onError: (e1) { - f2.then((_) { - Expect.fail("Expected error"); - }, onError: (e2) { - Expect.equals(e1, e2); - }); - }); - } - - Future val = new Future.value(42); - Future err1 = new Future.error("Error")..catchError((_) {}); - try { - throw new List.filled(0, null); - } catch (e, st) { - Future err2 = new Future.error(e, st)..catchError((_) {}); - } - compare(() => 42); - compare(() => val); - compare(() { - throw "Flif"; - }); - compare(() => err1); - bool hasExecuted = false; - compare(() { - hasExecuted = true; - return 499; - }); - Expect.isTrue(hasExecuted); -} - -void testNeverComplete() { - final completer = new Completer(); - final future = completer.future; - future.then((v) => Expect.fail("Value not expected")); - future.catchError((e) => Expect.fail("Value not expected")); -} - -void testComplete() { - final completer = new Completer(); - final future = completer.future; - Expect.isFalse(completer.isCompleted); - - completer.complete(3); - Expect.isTrue(completer.isCompleted); - - future.then((v) => Expect.equals(3, v)); -} - -// Tests for [then] - -void testCompleteWithSuccessHandlerBeforeComplete() { - final completer = new Completer(); - final future = completer.future; - - int after; - - asyncStart(); - future.then((int v) { - after = v; - }).then((_) { - Expect.equals(3, after); - asyncEnd(); - }); - - completer.complete(3); - Expect.isNull(after); -} - -void testCompleteWithSuccessHandlerAfterComplete() { - final completer = new Completer(); - final future = completer.future; - - int after; - completer.complete(3); - Expect.isNull(after); - - asyncStart(); - future.then((int v) { - after = v; - }).then((_) { - Expect.equals(3, after); - asyncEnd(); - }); -} - -void testCompleteManySuccessHandlers() { - final completer = new Completer(); - final future = completer.future; - int before; - int after1; - int after2; - - var futures = >[]; - futures.add(future.then((int v) { - before = v; - })); - completer.complete(3); - futures.add(future.then((int v) { - after1 = v; - })); - futures.add(future.then((int v) { - after2 = v; - })); - - asyncStart(); - Future.wait(futures).then((_) { - Expect.equals(3, before); - Expect.equals(3, after1); - Expect.equals(3, after2); - asyncEnd(); - }); - - // Regression test for fix to issue: - // https://github.com/dart-lang/sdk/issues/43445 - asyncStart(); - Future.wait(>[]).then((list) { - Expect.equals(0, list.length); - Expect.type>(list); - Expect.notType>(list); - Expect.notType>(list); - asyncEnd(); - }); -} - -// Tests for [catchError] - -void testException() { - final completer = new Completer(); - final future = completer.future; - final ex = new Exception(); - - asyncStart(); - future.then((v) { - throw "Value not expected"; - }).catchError((error) { - Expect.equals(error, ex); - asyncEnd(); - }, test: (e) => e == ex); - completer.completeError(ex); -} - -void testExceptionHandler() { - final completer = new Completer(); - final future = completer.future; - final ex = new Exception(); - - var ex2; - var done = future.catchError((error) { - ex2 = error; - }); - - Expect.isFalse(completer.isCompleted); - completer.completeError(ex); - Expect.isTrue(completer.isCompleted); - - asyncStart(); - done.then((_) { - Expect.equals(ex, ex2); - asyncEnd(); - }); -} - -void testExceptionHandlerReturnsTrue() { - final completer = new Completer(); - final future = completer.future; - final ex = new Exception(); - - bool reached = false; - future.catchError((e) {}); - future.catchError((e) { - reached = true; - }, test: (e) => false).catchError((e) {}); - Expect.isFalse(completer.isCompleted); - completer.completeError(ex); - Expect.isTrue(completer.isCompleted); - Expect.isFalse(reached); -} - -void testExceptionHandlerReturnsTrue2() { - final completer = new Completer(); - final future = completer.future; - final ex = new Exception(); - - bool reached = false; - var done = future.catchError((e) {}, test: (e) => false).catchError((e) { - reached = true; - }); - completer.completeError(ex); - - asyncStart(); - done.then((_) { - Expect.isTrue(reached); - asyncEnd(); - }); -} - -void testExceptionHandlerReturnsFalse() { - final completer = new Completer(); - final future = completer.future; - final ex = new Exception(); - - bool reached = false; - - future.catchError((e) {}); - - future.catchError((e) { - reached = true; - }, test: (e) => false).catchError((e) {}); - - completer.completeError(ex); - - Expect.isFalse(reached); -} - -void testFutureAsStreamCompleteAfter() { - var completer = new Completer(); - bool gotValue = false; - asyncStart(); - completer.future.asStream().listen((data) { - Expect.isFalse(gotValue); - gotValue = true; - Expect.equals("value", data); - }, onDone: () { - Expect.isTrue(gotValue); - asyncEnd(); - }); - completer.complete("value"); -} - -void testFutureAsStreamCompleteBefore() { - var completer = new Completer(); - bool gotValue = false; - asyncStart(); - completer.complete("value"); - completer.future.asStream().listen((data) { - Expect.isFalse(gotValue); - gotValue = true; - Expect.equals("value", data); - }, onDone: () { - Expect.isTrue(gotValue); - asyncEnd(); - }); -} - -void testFutureAsStreamCompleteImmediate() { - bool gotValue = false; - asyncStart(); - new Future.value("value").asStream().listen((data) { - Expect.isFalse(gotValue); - gotValue = true; - Expect.equals("value", data); - }, onDone: () { - Expect.isTrue(gotValue); - asyncEnd(); - }); -} - -void testFutureAsStreamCompleteErrorAfter() { - var completer = new Completer(); - bool gotError = false; - asyncStart(); - completer.future.asStream().listen((data) { - Expect.fail("Unexpected data"); - }, onError: (error) { - Expect.isFalse(gotError); - gotError = true; - Expect.equals("error", error); - }, onDone: () { - Expect.isTrue(gotError); - asyncEnd(); - }); - completer.completeError("error"); -} - -void testFutureAsStreamWrapper() { - var completer = new Completer(); - bool gotValue = false; - asyncStart(); - completer.complete("value"); - completer.future - .catchError((_) { - throw "not possible"; - }) // Returns a future wrapper. - .asStream() - .listen((data) { - Expect.isFalse(gotValue); - gotValue = true; - Expect.equals("value", data); - }, onDone: () { - Expect.isTrue(gotValue); - asyncEnd(); - }); -} - -void testFutureWhenCompleteValue() { - asyncStart(); - int counter = 2; - countDown() { - if (--counter == 0) asyncEnd(); - } - - var completer = new Completer(); - Future future = completer.future; - Future later = future.whenComplete(countDown); - later.then((v) { - Expect.equals(42, v); - countDown(); - }); - completer.complete(42); -} - -void testFutureWhenCompleteError() { - asyncStart(); - int counter = 2; - countDown() { - if (--counter == 0) asyncEnd(); - } - - var completer = new Completer(); - Future future = completer.future; - Future later = future.whenComplete(countDown); - later.catchError((error) { - Expect.equals("error", error); - countDown(); - }); - completer.completeError("error"); -} - -void testFutureWhenCompleteValueNewError() { - asyncStart(); - int counter = 2; - countDown() { - if (--counter == 0) asyncEnd(); - } - - var completer = new Completer(); - Future future = completer.future; - Future later = future.whenComplete(() { - countDown(); - throw "new error"; - }); - later.catchError((error) { - Expect.equals("new error", error); - countDown(); - }); - completer.complete(42); -} - -void testFutureWhenCompleteErrorNewError() { - asyncStart(); - int counter = 2; - countDown() { - if (--counter == 0) asyncEnd(); - } - - var completer = new Completer(); - Future future = completer.future; - Future later = future.whenComplete(() { - countDown(); - throw "new error"; - }); - later.catchError((error) { - Expect.equals("new error", error); - countDown(); - }); - completer.completeError("error"); -} - -void testFutureWhenCompletePreValue() { - asyncStart(); - int counter = 2; - countDown() { - if (--counter == 0) asyncEnd(); - } - - var completer = new Completer(); - Future future = completer.future; - completer.complete(42); - Timer.run(() { - Future later = future.whenComplete(countDown); - later.then((v) { - Expect.equals(42, v); - countDown(); - }); - }); -} - -void testFutureWhenValueFutureValue() { - asyncStart(); - int counter = 3; - countDown(int expect) { - Expect.equals(expect, counter); - if (--counter == 0) asyncEnd(); - } - - var completer = new Completer(); - completer.future.whenComplete(() { - countDown(3); - var completer2 = new Completer(); - new Timer(MS * 10, () { - countDown(2); - completer2.complete(37); - }); - return completer2.future; - }).then((v) { - Expect.equals(42, v); - countDown(1); - }); - - completer.complete(42); -} - -void testFutureWhenValueFutureError() { - asyncStart(); - int counter = 3; - countDown(int expect) { - Expect.equals(expect, counter); - if (--counter == 0) asyncEnd(); - } - - var completer = new Completer(); - completer.future.whenComplete(() { - countDown(3); - var completer2 = new Completer(); - new Timer(MS * 10, () { - countDown(2); - completer2.completeError("Fail"); - }); - return completer2.future; - }).then((v) { - Expect.fail("should fail async"); - }, onError: (error) { - Expect.equals("Fail", error); - countDown(1); - }); - - completer.complete(42); -} - -void testFutureWhenErrorFutureValue() { - asyncStart(); - int counter = 3; - countDown(int expect) { - Expect.equals(expect, counter); - if (--counter == 0) asyncEnd(); - } - - var completer = new Completer(); - completer.future.whenComplete(() { - countDown(3); - var completer2 = new Completer(); - new Timer(MS * 10, () { - countDown(2); - completer2.complete(37); - }); - return completer2.future; - }).then((v) { - Expect.fail("should fail async"); - }, onError: (error) { - Expect.equals("Error", error); - countDown(1); - }); - - completer.completeError("Error"); -} - -void testFutureWhenErrorFutureError() { - asyncStart(); - int counter = 3; - countDown(int expect) { - Expect.equals(expect, counter); - if (--counter == 0) asyncEnd(); - } - - var completer = new Completer(); - completer.future.whenComplete(() { - countDown(3); - var completer2 = new Completer(); - new Timer(MS * 10, () { - countDown(2); - completer2.completeError("Fail"); - }); - return completer2.future; - }).then((v) { - Expect.fail("should fail async"); - }, onError: (error) { - Expect.equals("Fail", error); - countDown(1); - }); - - completer.completeError("Error"); -} - -void testFutureThenThrowsAsync() { - final completer = new Completer(); - final future = completer.future; - int error = 42; - - asyncStart(); - future.then((v) { - throw error; - }).catchError((e) { - Expect.identical(error, e); - asyncEnd(); - }); - completer.complete(0); -} - -void testFutureCatchThrowsAsync() { - final completer = new Completer(); - final future = completer.future; - int error = 42; - - asyncStart(); - future.catchError((e) { - throw error; - }).catchError((e) { - Expect.identical(error, e); - asyncEnd(); - }); - completer.completeError(0); -} - -void testFutureCatchRethrowsAsync() { - final completer = new Completer(); - final future = completer.future; - var error; - - asyncStart(); - future.catchError((e) { - error = e; - throw e; - }).catchError((e) { - Expect.identical(error, e); - asyncEnd(); - }); - completer.completeError(0); -} - -void testFutureWhenThrowsAsync() { - final completer = new Completer(); - final future = completer.future; - var error = 42; - - asyncStart(); - future.whenComplete(() { - throw error; - }).catchError((e) { - Expect.identical(error, e); - asyncEnd(); - }); - completer.complete(0); -} - -void testCompleteWithError() { - final completer = new Completer(); - final future = completer.future; - var error = 42; - - asyncStart(); - future.catchError((e) { - Expect.identical(error, e); - asyncEnd(); - }); - - completer.completeError(error); -} - -void testCompleteWithFutureSuccess() { - asyncStart(); - final completer = new Completer(); - final completer2 = new Completer(); - completer.complete(completer2.future); - completer.future.then((v) { - Expect.equals(42, v); - asyncEnd(); - }); - completer2.complete(42); -} - -void testCompleteWithFutureSuccess2() { - asyncStart(); - final completer = new Completer(); - final result = new Future.value(42); - completer.complete(result); - completer.future.then((v) { - Expect.equals(42, v); - asyncEnd(); - }); -} - -void testCompleteWithFutureError() { - asyncStart(); - final completer = new Completer(); - final completer2 = new Completer(); - completer.complete(completer2.future); - completer.future.then((v) { - Expect.fail("Should not happen"); - asyncEnd(); - }, onError: (e) { - Expect.equals("ERROR-tcwfe", e); - asyncEnd(); - }); - completer2.completeError("ERROR-tcwfe"); -} - -void testCompleteWithFutureError2() { - asyncStart(); - final completer = new Completer(); - var result = new Future.error("ERROR-tcwfe2"); - completer.complete(result); - completer.future.then((v) { - Expect.fail("Should not happen"); - asyncEnd(); - }, onError: (e) { - Expect.equals("ERROR-tcwfe2", e); - asyncEnd(); - }); -} - -void testCompleteErrorWithFuture() { - asyncStart(); - final completer = new Completer(); - completer.completeError(new Future.value(42)); - completer.future.then((_) { - Expect.fail("Shouldn't happen"); - }, onError: (e, s) { - Future f = e; - f.then((v) { - Expect.equals(42, v); - asyncEnd(); - }); - }); -} - -void testCompleteWithCustomFutureSuccess() { - asyncStart(); - final completer = new Completer(); - final completer2 = new Completer(); - completer.complete(new CustomFuture(completer2.future)); - completer.future.then((v) { - Expect.equals(42, v); - asyncEnd(); - }); - completer2.complete(42); -} - -void testCompleteWithCustomFutureError() { - asyncStart(); - final completer = new Completer(); - final completer2 = new Completer(); - completer.complete(new CustomFuture(completer2.future)); - completer.future.then((v) { - Expect.fail("Should not happen"); - asyncEnd(); - }, onError: (e) { - Expect.equals("ERROR-tcwcfe", e); - asyncEnd(); - }); - completer2.completeError("ERROR-tcwcfe"); -} - -void testCompleteErrorWithCustomFuture() { - asyncStart(); - final completer = new Completer(); - var future = new CustomFuture(new Future.value(42)); - completer.completeError(future); - completer.future.then((_) { - Expect.fail("Shouldn't happen"); - }, onError: (e) { - Future f = e; - f.then((v) { - Expect.equals(42, v); - asyncEnd(); - }); - }); -} - -void testCompleteErrorWithNull() { - final completer = new Completer(); - Expect.throwsTypeError(() { - completer.completeError(null); - }); -} - -void testChainedFutureValue() { - final completer = new Completer(); - final future = completer.future; - asyncStart(); - - future.then((v) => new Future.value(v * 2)).then((v) { - Expect.equals(42, v); - asyncEnd(); - }); - completer.complete(21); -} - -void testChainedFutureValueDelay() { - final completer = new Completer(); - final future = completer.future; - asyncStart(); - - future - .then((v) => - new Future.delayed(const Duration(milliseconds: 10), () => v * 2)) - .then((v) { - Expect.equals(42, v); - asyncEnd(); - }); - completer.complete(21); -} - -void testChainedFutureValue2Delay() { - asyncStart(); - - new Future.delayed(const Duration(milliseconds: 10)).then((v) { - Expect.isNull(v); - asyncEnd(); - }); -} - -void testChainedFutureError() { - final completer = new Completer(); - final future = completer.future; - asyncStart(); - - future.then((v) => new Future.error("Fehler")).then((v) { - Expect.fail("unreachable!"); - }, onError: (error) { - Expect.equals("Fehler", error); - asyncEnd(); - }); - completer.complete(21); -} - -void testSyncFuture_i13368() { - asyncStart(); - - final future = new Future.sync(() { - return new Future.value(42); - }); - - future.then((int val) { - Expect.equals(val, 42); - asyncEnd(); - }); -} - -void testWaitCleanUp() { - asyncStart(); - // Creates three futures with different completion times, and where some fail. - // The `mask` specifies which futures fail (values 1-7), - // and `permute` defines the order of completion. values 0-5. - void doTest(int mask, int permute) { - asyncStart(); - String stringId = "waitCleanup-$mask-$permute"; - List futures = new List.filled(3, null); - List cleanup = new List.filled(3, null); - int permuteTmp = permute; - for (int i = 0; i < 3; i++) { - bool throws = (mask & (1 << i)) != 0; - var future = new Future.delayed(new Duration(milliseconds: 100 * (i + 1)), - () => (throws ? throw "Error $i($mask-$permute)" : i)); - int mod = 3 - i; - int position = permuteTmp % mod; - permuteTmp = permuteTmp ~/ mod; - while (futures[position] != null) position++; - futures[position] = future; - cleanup[i] = throws; - } - void cleanUp(index) { - Expect.isFalse(cleanup[index]); - cleanup[index] = true; - } - - Future.wait(futures, cleanUp: cleanUp).then((_) { - Expect.fail("No error: $stringId"); - }, onError: (e, s) { - Expect.listEquals([true, true, true], cleanup); - asyncEnd(); - }); - } - - for (int i = 1; i < 8; i++) { - for (int j = 0; j < 6; j++) { - doTest(i, j); - } - } - asyncEnd(); -} - -void testWaitCleanUpEager() { - asyncStart(); - // Creates three futures with different completion times, and where some fail. - // The `mask` specifies which futures fail (values 1-7), - // and `permute` defines the order of completion. values 0-5. - void doTest(int mask, int permute) { - asyncStart(); - asyncStart(); - bool done = false; - String stringId = "waitCleanup-$mask-$permute"; - List futures = new List.filled(3, null); - List cleanup = new List.filled(3, null); - int permuteTmp = permute; - for (int i = 0; i < 3; i++) { - bool throws = (mask & (1 << i)) != 0; - var future = new Future.delayed(new Duration(milliseconds: 100 * (i + 1)), - () => (throws ? throw "Error $i($mask-$permute)" : i)); - int mod = 3 - i; - int position = permuteTmp % mod; - permuteTmp = permuteTmp ~/ mod; - while (futures[position] != null) position++; - futures[position] = future; - cleanup[i] = throws; - } - void checkDone() { - if (done) return; - if (cleanup.every((v) => v)) { - done = true; - asyncEnd(); - } - } - - void cleanUp(index) { - Expect.isFalse(cleanup[index]); - cleanup[index] = true; - // Cleanup might happen before and after the wait().then() callback. - checkDone(); - } - - Future.wait(futures, eagerError: true, cleanUp: cleanUp).then((_) { - Expect.fail("No error: $stringId"); - }, onError: (e, s) { - asyncEnd(); - checkDone(); - }); - } - - for (int i = 1; i < 8; i++) { - for (int j = 0; j < 6; j++) { - doTest(i, j); - } - } - asyncEnd(); -} - -void testWaitCleanUpError() { - var cms = const Duration(milliseconds: 100); - var cleanups = new List.filled(3, false); - var uncaughts = new List.filled(3, false); - asyncStart(); - asyncStart(); - asyncStart(); - runZoned(() { - Future.wait([ - new Future.delayed(cms, () => 0), - new Future.delayed(cms * 2, () => throw 1), - new Future.delayed(cms * 3, () => 2) - ], cleanUp: (index) { - Expect.isTrue(index == 0 || index == 2, "$index"); - Expect.isFalse(cleanups[index]); - cleanups[index] = true; - throw index; - }).catchError((e) { - Expect.equals(e, 1); - asyncEnd(); - }); - }, onError: (e, s) { - int index = e; - Expect.isTrue(index == 0 || index == 2, "$index"); - Expect.isFalse(uncaughts[index]); - uncaughts[index] = true; - asyncEnd(); - }); -} - -void testWaitSyncError() { - var cms = const Duration(milliseconds: 100); - var cleanups = new List.filled(3, false); - asyncStart(); - asyncStart(); - runZoned(() { - Future.wait( - new Iterable.generate(5, (i) { - if (i != 3) return new Future.delayed(cms * (i + 1), () => i); - throw "throwing synchronously in iterable"; - }), cleanUp: (index) { - Expect.isFalse(cleanups[index]); - cleanups[index] = true; - if (cleanups.every((x) => x)) asyncEnd(); - }); - }, onError: (e, s) { - asyncEnd(); - }); -} - -void testWaitSyncError2() { - asyncStart(); - Future.wait([null]).catchError((e, st) { - // Makes sure that the `catchError` is invoked. - // Regression test: an earlier version of `Future.wait` would propagate - // the error too soon for the code to install an error handler. - // `testWaitSyncError` didn't show this problem, because the `runZoned` - // was already installed. - asyncEnd(); - }); -} - -// Future.wait transforms synchronous errors into asynchronous ones. -// This function tests that zones can intercept them. -void testWaitSyncError3() { - var caughtError; - var count = 0; - - AsyncError errorCallback(Zone self, ZoneDelegate parent, Zone zone, - Object error, StackTrace stackTrace) { - Expect.equals(0, count); - count++; - caughtError = error; - return parent.errorCallback(zone, error, stackTrace); - } - - asyncStart(); - runZoned(() { - Future.wait([null]).catchError((e, st) { - Expect.identical(e, caughtError); - Expect.equals(1, count); - asyncEnd(); - }); - }, zoneSpecification: new ZoneSpecification(errorCallback: errorCallback)); -} - -void testBadFuture() { - var bad = new BadFuture(); - // Completing with bad future (then call throws) puts error in result. - asyncStart(); - Completer completer = new Completer(); - completer.complete(bad); - completer.future.then((_) { - Expect.fail("unreachable"); - }, onError: (e, s) { - Expect.isTrue(completer.isCompleted); - asyncEnd(); - }); - - asyncStart(); - var f = new Future.value().then((_) => bad); - f.then((_) { - Expect.fail("unreachable"); - }, onError: (e, s) { - asyncEnd(); - }); -} - -void testTypes() { - // Test that future is a Future and not something less precise. - testType(name, future, [depth = 2]) { - var desc = "$name${".whenComplete" * (2 - depth)}"; - Expect.isTrue(future is Future, "$desc is Future"); - Expect.isFalse(future is Future, "$desc is! Future"); - var stream = future.asStream(); - Expect.isTrue(stream is Stream, "$desc.asStream() is Stream"); - Expect.isFalse( - stream is Stream, "$desc.asStream() is! Stream"); - if (depth > 0) { - testType(name, future.whenComplete(() {}), depth - 1); - } - } - - for (var value in [42, null]) { - testType("Future($value)", new Future(() => value)); - testType("Future.delayed($value)", - new Future.delayed(Duration.zero, () => value)); - testType( - "Future.microtask($value)", new Future.microtask(() => value)); - testType("Future.sync($value)", new Future.sync(() => value)); - testType("Future.sync(future($value))", - new Future.sync(() => new Future.value(value))); - testType("Future.value($value)", new Future.value(value)); - } - testType("Completer.future", new Completer().future); - testType("Future.error", new Future.error("ERR")..catchError((_) {})); -} - -void testAnyValue() { - asyncStart(); - var cs = new List.generate(3, (_) => new Completer()); - var result = Future.any(cs.map((x) => x.future)); - - result.then((v) { - Expect.equals(42, v); - asyncEnd(); - }, onError: (e, s) { - Expect.fail("Unexpected error: $e"); - }); - - cs[1].complete(42); - cs[2].complete(10); - cs[0].complete(20); -} - -void testAnyError() { - asyncStart(); - var cs = new List.generate(3, (_) => new Completer()); - var result = Future.any(cs.map((x) => x.future)); - - result.then((v) { - Expect.fail("Unexpected value: $v"); - }, onError: (e, s) { - Expect.equals(42, e); - asyncEnd(); - }); - - cs[1].completeError(42); - cs[2].complete(10); - cs[0].complete(20); -} - -void testAnyIgnoreIncomplete() { - asyncStart(); - var cs = new List.generate(3, (_) => new Completer()); - var result = Future.any(cs.map((x) => x.future)); - - result.then((v) { - Expect.equals(42, v); - asyncEnd(); - }, onError: (e, s) { - Expect.fail("Unexpected error: $e"); - }); - - cs[1].complete(42); - // The other two futures never complete. -} - -void testAnyIgnoreError() { - asyncStart(); - var cs = new List.generate(3, (_) => new Completer()); - var result = Future.any(cs.map((x) => x.future)); - - result.then((v) { - Expect.equals(42, v); - asyncEnd(); - }, onError: (e, s) { - Expect.fail("Unexpected error: $e"); - }); - - cs[1].complete(42); - // The errors are ignored, not uncaught. - cs[2].completeError("BAD"); - cs[0].completeError("BAD"); -} - -void testFutureResult() { - asyncStart(); - () async { - var f = new UglyFuture(5); - // Sanity check that our future is as mis-behaved as we think. - f.then((v) { - Expect.equals(UglyFuture(4), v); - }); - - var v = await f; - // The static type of await is Flatten(static-type-of-expression), so it - // suggests that it flattens. In practice it currently doesn't. - // The specification doesn't say anything special, so v should be the - // completion value of the UglyFuture future which is a future. - Expect.equals(UglyFuture(4), v); - - // We no longer flatten recursively in situations like this. - var w = new Future.value(42).then((_) => f); - Expect.equals(UglyFuture(4), await w); - asyncEnd(); - }(); -} - -void testFutureOfFuture() async { - // Plain Future. - asyncStart(); - var future = Future>.value(Future.value(42)); - Expect.type>>(future); - future.then((innerFuture) { - Expect.type>(innerFuture); - innerFuture.then((number) { - Expect.equals(42, number); - asyncEnd(); - }); - }); - - // With completer. - asyncStart(); - var completer = Completer>(); - Expect.type>>(completer.future); - completer.future.then((innerFuture) { - Expect.type>(innerFuture); - innerFuture.then((number) { - Expect.equals(42, number); - asyncEnd(); - }); - }); - completer.complete(Future.value(42)); -} - -main() { - asyncStart(); - - testValue(); - testSync(); - testNeverComplete(); - - testComplete(); - testCompleteWithSuccessHandlerBeforeComplete(); - testCompleteWithSuccessHandlerAfterComplete(); - testCompleteManySuccessHandlers(); - testCompleteWithError(); - - testCompleteWithFutureSuccess(); - testCompleteWithFutureSuccess2(); - testCompleteWithFutureError(); - testCompleteWithFutureError2(); - testCompleteErrorWithFuture(); - testCompleteWithCustomFutureSuccess(); - testCompleteWithCustomFutureError(); - testCompleteErrorWithCustomFuture(); - testCompleteErrorWithNull(); - - testException(); - testExceptionHandler(); - testExceptionHandlerReturnsTrue(); - testExceptionHandlerReturnsTrue2(); - testExceptionHandlerReturnsFalse(); - - testFutureAsStreamCompleteAfter(); - testFutureAsStreamCompleteBefore(); - testFutureAsStreamCompleteImmediate(); - testFutureAsStreamCompleteErrorAfter(); - testFutureAsStreamWrapper(); - - testFutureWhenCompleteValue(); - testFutureWhenCompleteError(); - testFutureWhenCompleteValueNewError(); - testFutureWhenCompleteErrorNewError(); - - testFutureWhenValueFutureValue(); - testFutureWhenErrorFutureValue(); - testFutureWhenValueFutureError(); - testFutureWhenErrorFutureError(); - - testFutureThenThrowsAsync(); - testFutureCatchThrowsAsync(); - testFutureWhenThrowsAsync(); - testFutureCatchRethrowsAsync(); - - testChainedFutureValue(); - testChainedFutureValueDelay(); - testChainedFutureError(); - - testSyncFuture_i13368(); - - testWaitCleanUp(); - testWaitCleanUpError(); - testWaitSyncError(); - testWaitSyncError2(); - testWaitSyncError3(); - - testBadFuture(); - - testTypes(); - - testAnyValue(); - testAnyError(); - testAnyIgnoreIncomplete(); - testAnyIgnoreError(); - - testFutureResult(); - - testFutureOfFuture(); - - asyncEnd(); -} - -/// A well-behaved Future that isn't recognizable as a _Future. -class CustomFuture implements Future { - Future _realFuture; - CustomFuture(this._realFuture); - Future then(action(T result), {Function onError}) => - _realFuture.then(action, onError: onError); - Future catchError(Function onError, {bool test(e)}) => - _realFuture.catchError(onError, test: test); - Future whenComplete(action()) => _realFuture.whenComplete(action); - Future timeout(Duration timeLimit, {void onTimeout()}) => - _realFuture.timeout(timeLimit, onTimeout: onTimeout); - Stream asStream() => _realFuture.asStream(); - String toString() => "CustomFuture@${_realFuture.hashCode}"; - int get hashCode => _realFuture.hashCode; -} - -/// A bad future that throws on every method. -class BadFuture implements Future { - Future then(action(T result), {Function onError}) { - throw "then GOTCHA!"; - } - - Future catchError(Function onError, {bool test(Object e)}) { - throw "catch GOTCHA!"; - } - - Future whenComplete(action()) { - throw "finally GOTCHA!"; - } - - Stream asStream() { - throw "asStream GOTCHA!"; - } - - Future timeout(Duration duration, {onTimeout()}) { - throw "timeout GOTCHA!"; - } -} - -// An evil future that completes with another future. -class UglyFuture implements Future { - final _result; - final int _badness; - UglyFuture(int badness) - : _badness = badness, - _result = (badness == 0) ? 42 : new UglyFuture(badness - 1); - Future then(action(value), {Function onError}) { - var c = new Completer(); - c.complete(new Future.microtask(() => action(_result))); - return c.future; - } - - Future catchError(onError, {test}) => this; // Never an error. - Future whenComplete(action()) { - return new Future.microtask(action).then((_) => this); - } - - Stream asStream() { - return (new StreamController() - ..add(_result) - ..close()) - .stream; - } - - Future timeout(Duration duration, {onTimeout()}) { - return this; - } - - int get hashCode => _badness; - bool operator ==(Object other) => - other is UglyFuture && _badness == other._badness; - - String toString() => "UglyFuture($_badness)"; -} diff --git a/tests/lib_2/async/future_timeout_test.dart b/tests/lib_2/async/future_timeout_test.dart deleted file mode 100644 index a2e3c67b37a..00000000000 --- a/tests/lib_2/async/future_timeout_test.dart +++ /dev/null @@ -1,236 +0,0 @@ -// 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 future_timeout_test; - -import 'dart:async'; -import 'package:async_helper/async_helper.dart'; -import 'package:expect/expect.dart'; - -main() { - Future timeoutNoComplete() async { - asyncStart(); - Completer completer = new Completer(); - Future timedOut = completer.future - .timeout(const Duration(milliseconds: 5), onTimeout: () => 42); - timedOut.then((v) { - Expect.isTrue(v == 42); - asyncEnd(); - }); - } - - Future timeoutCompleteAfterTimeout() async { - asyncStart(); - Completer completer = new Completer(); - Future timedOut = completer.future - .timeout(const Duration(milliseconds: 5), onTimeout: () => 42); - Timer timer = new Timer(const Duration(seconds: 1), () { - asyncStart(); - completer.complete(-1); - }); - timedOut.then((v) { - Expect.isTrue(v == 42); - asyncEnd(); - }); - } - - Future timeoutCompleteBeforeTimeout() async { - asyncStart(); - Completer completer = new Completer(); - Timer timer = new Timer(const Duration(milliseconds: 5), () { - asyncStart(); - completer.complete(42); - }); - Future timedOut = completer.future - .timeout(const Duration(seconds: 1), onTimeout: () => -1); - timedOut.then((v) { - Expect.isTrue(v == 42); - asyncEnd(); - }); - } - - Future timeoutCompleteBeforeCreate() async { - asyncStart(); - Completer completer = new Completer.sync(); - completer.complete(42); - Future timedOut = completer.future - .timeout(const Duration(milliseconds: 5), onTimeout: () => -1); - timedOut.then((v) { - Expect.isTrue(v == 42); - asyncEnd(); - }); - } - - Future timeoutThrows() async { - asyncStart(); - Completer completer = new Completer(); - Future timedOut = completer.future.timeout(const Duration(milliseconds: 5), - onTimeout: () { - throw "EXN1"; - }); - timedOut.catchError((e, s) { - Expect.isTrue(e == "EXN1"); - }); - } - - Future timeoutThrowAfterTimeout() async { - asyncStart(); - Completer completer = new Completer(); - Future timedOut = completer.future - .timeout(const Duration(milliseconds: 5), onTimeout: () => 42); - Timer timer = new Timer(const Duration(seconds: 1), () { - asyncStart(); - completer.completeError("EXN2"); - }); - timedOut.then((v) { - Expect.isTrue(v == 42); - asyncEnd(); - }); - } - - Future timeoutThrowBeforeTimeout() async { - asyncStart(); - Completer completer = new Completer(); - Timer timer = new Timer(const Duration(milliseconds: 5), () { - asyncStart(); - completer.completeError("EXN3"); - }); - Future timedOut = completer.future - .timeout(const Duration(seconds: 1), onTimeout: () => -1); - timedOut.catchError((e, s) { - Expect.isTrue(e == "EXN3"); - }); - } - - Future timeoutThrowBeforeCreate() async { - asyncStart(); - // Prevent uncaught error when we create the error. - Completer completer = new Completer.sync()..future.catchError((e) {}); - completer.completeError("EXN4"); - Future timedOut = completer.future - .timeout(const Duration(milliseconds: 5), onTimeout: () => -1); - timedOut.catchError((e, s) { - Expect.isTrue(e == "EXN4"); - }); - } - - Future timeoutReturnFutureValue() async { - asyncStart(); - Future result = new Future.value(42); - Completer completer = new Completer(); - Future timedOut = completer.future - .timeout(const Duration(milliseconds: 5), onTimeout: () => result); - timedOut.then((v) { - Expect.isTrue(v == 42); - asyncEnd(); - }); - } - - Future timeoutReturnFutureError() async { - asyncStart(); - Future result = new Future.error("EXN5")..catchError((e) {}); - Completer completer = new Completer(); - Future timedOut = completer.future - .timeout(const Duration(milliseconds: 5), onTimeout: () => result); - timedOut.catchError((e, s) { - Expect.isTrue(e == "EXN5"); - }); - } - - Future timeoutReturnFutureValueLater() async { - asyncStart(); - Completer result = new Completer(); - Completer completer = new Completer(); - Future timedOut = completer.future.timeout(const Duration(milliseconds: 5), - onTimeout: () { - result.complete(42); - return result.future; - }); - timedOut.then((v) { - Expect.isTrue(v == 42); - asyncEnd(); - }); - } - - Future timeoutFutureReturnErrorLater() async { - asyncStart(); - Completer result = new Completer(); - Completer completer = new Completer(); - Future timedOut = completer.future.timeout(const Duration(milliseconds: 5), - onTimeout: () { - result.completeError("EXN6"); - return result.future; - }); - timedOut.catchError((e, s) { - Expect.isTrue(e == "EXN6"); - }); - } - - Future timeoutZone() async { - asyncStart(); - var initialZone = Zone.current; - Zone forked; - int registerCallDelta = 0; - bool callbackCalled = false; - Function callback = () { - Expect.isFalse(callbackCalled); - callbackCalled = true; - Expect.isTrue(Zone.current == forked); - return 42; - }; - forked = Zone.current.fork(specification: new ZoneSpecification( - registerCallback: - (Zone self, ZoneDelegate parent, Zone origin, R f()) { - R Function() result; - if (!identical(f, callback)) { - result = f; - } else { - registerCallDelta++; // Increment calls to register. - Expect.isTrue(origin == forked); - Expect.isTrue(self == forked); - result = () { - registerCallDelta--; - return f(); - }; - } - return f; - })); - Completer completer = new Completer(); - Future timedOut; - forked.run(() { - timedOut = completer.future - .timeout(const Duration(milliseconds: 5), onTimeout: callback); - }); - timedOut.then((v) { - Expect.isTrue(callbackCalled); - Expect.isTrue(registerCallDelta == 0); - Expect.isTrue(Zone.current == initialZone); - Expect.isTrue(v == 42); - asyncEnd(); - }); - } - - Future timeoutNoFunction() async { - asyncStart(); - Completer completer = new Completer(); - Future timedOut = completer.future.timeout(const Duration(milliseconds: 5)); - timedOut.catchError((e, s) { - Expect.isTrue(e is TimeoutException); - Expect.isTrue(e.duration == const Duration(milliseconds: 5)); - Expect.isNull(s); - }); - } - - Future timeoutType() async { - asyncStart(); - Completer completer = new Completer(); - Future timedOut = completer.future.timeout(const Duration(milliseconds: 5)); - Expect.isTrue(timedOut is Future); - Expect.isTrue(timedOut is! Future); - timedOut.catchError((_) {}); - completer.complete(499); - } -} diff --git a/tests/lib_2/async/future_value_chain2_test.dart b/tests/lib_2/async/future_value_chain2_test.dart deleted file mode 100644 index 6ca96ccca38..00000000000 --- a/tests/lib_2/async/future_value_chain2_test.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; - -main() { - asyncStart(); - var errorFuture = new Future.error(499); - var valueChainFuture = new Future.sync(() => errorFuture); - // The errorFuture must not be propagated immediately as we would otherwise - // not have time to catch the error. - valueChainFuture.catchError((error) { - Expect.equals(499, error); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/future_value_chain3_test.dart b/tests/lib_2/async/future_value_chain3_test.dart deleted file mode 100644 index 5e3b7354bf6..00000000000 --- a/tests/lib_2/async/future_value_chain3_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; - -main() { - asyncStart(); - var errorFuture = new Future.error(499); - errorFuture.catchError((x) { - Expect.equals(499, x); - var valueChainFuture = new Future.sync(() => errorFuture); - // The errorFuture must not be propagated immediately as we would otherwise - // not have time to catch the error. - valueChainFuture.catchError((error) { - Expect.equals(499, error); - asyncEnd(); - }); - }); -} diff --git a/tests/lib_2/async/future_value_chain4_test.dart b/tests/lib_2/async/future_value_chain4_test.dart deleted file mode 100644 index 7bdbe8caca8..00000000000 --- a/tests/lib_2/async/future_value_chain4_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; - -class MyFuture implements Future { - Future then(FutureOr valueHandler(T x), {Function onError}) { - scheduleMicrotask(() { - valueHandler(null); - }); - return null; - } - - catchError(_, {test}) => null; - whenComplete(_) => null; - asStream() => null; - timeout(Duration timeLimit, {void onTimeout()}) => null; -} - -main() { - asyncStart(); - Completer completer = new Completer(); - completer.complete(new MyFuture()); - Expect.isTrue(completer.isCompleted); - Expect.throws(() => completer.complete(42)); - completer.future.then((_) => asyncEnd()); -} diff --git a/tests/lib_2/async/future_value_chain_test.dart b/tests/lib_2/async/future_value_chain_test.dart deleted file mode 100644 index 9c96318119e..00000000000 --- a/tests/lib_2/async/future_value_chain_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; - -main() { - asyncStart(); - var errorFuture = new Future.error(499); - errorFuture.catchError((x) { - Expect.equals(499, x); - var valueChainFuture = new Future.value(errorFuture); - // The errorFuture must not be propagated immediately as we would otherwise - // not have time to catch the error. - valueChainFuture.catchError((error) { - Expect.equals(499, error); - asyncEnd(); - }); - }); -} diff --git a/tests/lib_2/async/futures_test.dart b/tests/lib_2/async/futures_test.dart deleted file mode 100644 index 48b04f7566a..00000000000 --- a/tests/lib_2/async/futures_test.dart +++ /dev/null @@ -1,283 +0,0 @@ -// 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 futures_test; - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; - -Future testWaitEmpty() { - final futures = []; - return Future.wait(futures); -} - -Future testCompleteAfterWait() { - final futures = []; - final c = new Completer(); - futures.add(c.future); - Future future = Future.wait(futures); - c.complete(null); - return future; -} - -Future testCompleteBeforeWait() { - final futures = []; - final c = new Completer(); - futures.add(c.future); - c.complete(null); - return Future.wait(futures); -} - -Future testWaitWithMultipleValues() { - final futures = []; - final c1 = new Completer(); - final c2 = new Completer(); - futures.add(c1.future); - futures.add(c2.future); - c1.complete(1); - c2.complete(2); - return Future.wait(futures).then((values) { - Expect.listEquals([1, 2], values); - }); -} - -Future testWaitWithSingleError() { - final futures = []; - final c1 = new Completer(); - final c2 = new Completer(); - futures.add(c1.future); - futures.add(c2.future); - c1.complete(); - c2.completeError('correct error'); - - return Future.wait(futures).then((_) { - throw 'incorrect error'; - }).catchError((error, stackTrace) { - Expect.equals('correct error', error); - Expect.isNotNull(stackTrace); - }); -} - -Future testWaitWithMultipleErrors() { - final futures = []; - final c1 = new Completer(); - final c2 = new Completer(); - futures.add(c1.future); - futures.add(c2.future); - c1.completeError('correct error'); - c2.completeError('incorrect error 1'); - - return Future.wait(futures).then((_) { - throw 'incorrect error 2'; - }).catchError((error, stackTrace) { - Expect.equals('correct error', error); - Expect.isNotNull(stackTrace); - }); -} - -// Regression test for https://github.com/dart-lang/sdk/issues/41656 -Future testWaitWithErrorAndNonErrorEager() { - return Future(() { - var f1 = Future(() => throw "Error"); - var f2 = Future(() => 3); - return Future.wait([f1, f2], eagerError: true); - }).then((_) => 0, onError: (_) => -1); -} - -Future testWaitWithMultipleErrorsEager() { - final futures = []; - final c1 = new Completer(); - final c2 = new Completer(); - futures.add(c1.future); - futures.add(c2.future); - c1.completeError('correct error'); - c2.completeError('incorrect error 1'); - - return Future.wait(futures, eagerError: true).then((_) { - throw 'incorrect error 2'; - }).catchError((error, stackTrace) { - Expect.equals('correct error', error); - Expect.isNotNull(stackTrace); - }); -} - -StackTrace get currentStackTrace { - try { - throw 0; - } catch (e, st) { - return st; - } - throw "unreachable"; -} - -Future testWaitWithSingleErrorWithStackTrace() { - final futures = []; - final c1 = new Completer(); - final c2 = new Completer(); - futures.add(c1.future); - futures.add(c2.future); - c1.complete(); - c2.completeError('correct error', currentStackTrace); - - return Future.wait(futures).then((_) { - throw 'incorrect error'; - }).catchError((error, stackTrace) { - Expect.equals('correct error', error); - Expect.isNotNull(stackTrace); - }); -} - -Future testWaitWithMultipleErrorsWithStackTrace() { - final futures = []; - final c1 = new Completer(); - final c2 = new Completer(); - futures.add(c1.future); - futures.add(c2.future); - c1.completeError('correct error', currentStackTrace); - c2.completeError('incorrect error 1'); - - return Future.wait(futures).then((_) { - throw 'incorrect error 2'; - }).catchError((error, stackTrace) { - Expect.equals('correct error', error); - Expect.isNotNull(stackTrace); - }); -} - -Future testWaitWithMultipleErrorsWithStackTraceEager() { - final futures = []; - final c1 = new Completer(); - final c2 = new Completer(); - futures.add(c1.future); - futures.add(c2.future); - c1.completeError('correct error', currentStackTrace); - c2.completeError('incorrect error 1'); - - return Future.wait(futures, eagerError: true).then((_) { - throw 'incorrect error 2'; - }).catchError((error, stackTrace) { - Expect.equals('correct error', error); - Expect.isNotNull(stackTrace); - }); -} - -Future testEagerWait() { - var st; - try { - throw 0; - } catch (e, s) { - st = s; - } - final c1 = new Completer(); - final c2 = new Completer(); - final futures = [c1.future, c2.future]; - final waited = Future.wait(futures, eagerError: true); - final result = waited.then((v) { - throw "should not be called"; - }, onError: (e, s) { - Expect.equals(e, 42); - Expect.identical(st, s); - }).whenComplete(() { - return new Future(() => true); - }); - c1.completeError(42, st); - return result; -} - -Future testForEachEmpty() { - return Future.forEach([], (_) { - throw 'should not be called'; - }); -} - -Future testForEach() { - final seen = []; - return Future.forEach([1, 2, 3, 4, 5], (n) { - seen.add(n); - return new Future.value(); - }).then((_) => Expect.listEquals([1, 2, 3, 4, 5], seen)); -} - -Future testForEachSync() { - final seen = []; - return Future.forEach([1, 2, 3, 4, 5], seen.add) - .then((_) => Expect.listEquals([1, 2, 3, 4, 5], seen)); -} - -Future testForEachWithException() { - final seen = []; - return Future.forEach([1, 2, 3, 4, 5], (n) { - if (n == 4) throw 'correct exception'; - seen.add(n); - return new Future.value(); - }).then((_) { - throw 'incorrect exception'; - }).catchError((error) { - Expect.equals('correct exception', error); - }); -} - -Future testDoWhile() { - var count = 0; - return Future.doWhile(() { - count++; - return new Future(() => count < 10); - }).then((_) => Expect.equals(10, count)); -} - -Future testDoWhileSync() { - var count = 0; - return Future.doWhile(() { - count++; - return count < 10; - }).then((_) => Expect.equals(10, count)); -} - -Future testDoWhileWithException() { - var count = 0; - return Future.doWhile(() { - count++; - if (count == 4) throw 'correct exception'; - return new Future(() => true); - }).then((_) { - throw 'incorrect exception'; - }).catchError((error) { - Expect.equals('correct exception', error); - }).whenComplete(() { - return new Future(() => false); - }); -} - -main() { - final futures = []; - - futures.add(testWaitEmpty()); - futures.add(testCompleteAfterWait()); - futures.add(testCompleteBeforeWait()); - futures.add(testWaitWithMultipleValues()); - futures.add(testWaitWithSingleError()); - futures.add(testWaitWithMultipleErrors()); - futures.add(testWaitWithErrorAndNonErrorEager()); - futures.add(testWaitWithMultipleErrorsEager()); - futures.add(testWaitWithSingleErrorWithStackTrace()); - futures.add(testWaitWithMultipleErrorsWithStackTrace()); - futures.add(testWaitWithMultipleErrorsWithStackTraceEager()); - futures.add(testEagerWait()); - futures.add(testForEachEmpty()); - futures.add(testForEach()); - futures.add(testForEachSync()); - futures.add(testForEachWithException()); - futures.add(testDoWhile()); - futures.add(testDoWhileSync()); - futures.add(testDoWhileWithException()); - - asyncStart(); - Future.wait(futures).then((List list) { - Expect.equals(19, list.length); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/intercept_print1_test.dart b/tests/lib_2/async/intercept_print1_test.dart deleted file mode 100644 index 71e47d9b5c3..00000000000 --- a/tests/lib_2/async/intercept_print1_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -var events = []; - -void printHandler1(Zone self, ZoneDelegate parent, Zone origin, String line) { - events.add("print: $line"); -} - -bool shouldIntercept = true; - -void printHandler2(Zone self, ZoneDelegate parent, Zone origin, String line) { - if (shouldIntercept) { - events.add("print **: $line"); - } else { - parent.print(origin, line); - } -} - -const TEST_SPEC1 = const ZoneSpecification(print: printHandler1); -const TEST_SPEC2 = const ZoneSpecification(print: printHandler2); - -main() { - Zone zone1 = Zone.current.fork(specification: TEST_SPEC1); - Zone zone2 = zone1.fork(specification: TEST_SPEC2); - zone1.run(() { - print("1"); - print(2); - print({ - 3: [4] - }); - }); - zone2.run(() { - print("5"); - shouldIntercept = false; - print(6); - }); - Expect.listEquals( - ["print: 1", "print: 2", "print: {3: [4]}", "print **: 5", "print: 6"], - events); -} diff --git a/tests/lib_2/async/intercept_schedule_microtask1_test.dart b/tests/lib_2/async/intercept_schedule_microtask1_test.dart deleted file mode 100644 index 75a9f686eb4..00000000000 --- a/tests/lib_2/async/intercept_schedule_microtask1_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - // Test that runZoned returns the result of executing the body. - var result = runZonedScheduleMicrotask(() => 499, onScheduleMicrotask: (f) { - Expect.fail("Unexpected invocation."); - }); - Expect.equals(499, result); -} diff --git a/tests/lib_2/async/intercept_schedule_microtask2_test.dart b/tests/lib_2/async/intercept_schedule_microtask2_test.dart deleted file mode 100644 index fe6649574a4..00000000000 --- a/tests/lib_2/async/intercept_schedule_microtask2_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -var events = []; - -body() { - events.add("body entry"); - scheduleMicrotask(() { - events.add("run async body"); - }); - return 499; -} - -handler(fun) { - events.add("handler"); - fun(); - events.add("handler done"); -} - -main() { - // Test that scheduleMicrotask interception works. - var result = runZonedScheduleMicrotask(body, onScheduleMicrotask: handler); - // No need for a ReceivePort: If the runZonedScheduleMicrotask misbehaved we - // would have an [events] list that is different from what we expect. - Expect.listEquals( - ["body entry", "handler", "run async body", "handler done"], events); -} diff --git a/tests/lib_2/async/intercept_schedule_microtask3_test.dart b/tests/lib_2/async/intercept_schedule_microtask3_test.dart deleted file mode 100644 index 87f37e203ac..00000000000 --- a/tests/lib_2/async/intercept_schedule_microtask3_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -var events = []; - -body() { - events.add("body entry"); - scheduleMicrotask(() { - events.add("run async body"); - }); - return 499; -} - -handler(fun) { - events.add("handler"); - scheduleMicrotask(fun); - events.add("handler done"); -} - -main() { - asyncStart(); - - // Test that scheduleMicrotask inside the scheduleMicrotask-handler goes to - // the parent zone. - var result = runZonedScheduleMicrotask(body, onScheduleMicrotask: handler); - events.add("after"); - scheduleMicrotask(() { - Expect.listEquals( - ["body entry", "handler", "handler done", "after", "run async body"], - events); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/intercept_schedule_microtask4_test.dart b/tests/lib_2/async/intercept_schedule_microtask4_test.dart deleted file mode 100644 index 9966f6b1af3..00000000000 --- a/tests/lib_2/async/intercept_schedule_microtask4_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -var events = []; - -body() { - events.add("body entry"); - scheduleMicrotask(() { - events.add("run async body"); - scheduleMicrotask(() { - events.add("run nested body"); - }); - }); - return 499; -} - -handler(fun) { - events.add("handler"); - scheduleMicrotask(fun); - events.add("handler done"); -} - -main() { - asyncStart(); - - // Test that body of a scheduleMicrotask goes to the zone it came from. - var result = runZonedScheduleMicrotask(body, onScheduleMicrotask: handler); - events.add("after"); - scheduleMicrotask(() { - scheduleMicrotask(() { - Expect.listEquals([ - "body entry", - "handler", - "handler done", - "after", - "run async body", - "handler", - "handler done", - "run nested body" - ], events); - asyncEnd(); - }); - }); -} diff --git a/tests/lib_2/async/intercept_schedule_microtask5_test.dart b/tests/lib_2/async/intercept_schedule_microtask5_test.dart deleted file mode 100644 index 701368c4c30..00000000000 --- a/tests/lib_2/async/intercept_schedule_microtask5_test.dart +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -var events = []; - -body() { - events.add("body entry"); - scheduleMicrotask(() { - events.add("run async body"); - scheduleMicrotask(() { - events.add("run nested body"); - }); - }); - return 499; -} - -handler(fun) { - events.add("handler"); - scheduleMicrotask(fun); - events.add("handler done"); -} - -handler2(fun) { - events.add("handler2"); - scheduleMicrotask(fun); - events.add("handler2 done"); -} - -main() { - asyncStart(); - - // Test that nested runZonedScheduleMicrotask go to the next outer zone. - var result = runZonedScheduleMicrotask( - () => runZonedScheduleMicrotask(body, onScheduleMicrotask: handler2), - onScheduleMicrotask: handler); - events.add("after"); - Timer.run(() { - Expect.listEquals([ - "body entry", - "handler2", - "handler", - "handler done", - "handler2 done", - "after", - "run async body", - "handler2", - "handler", - "handler done", - "handler2 done", - "run nested body" - ], events); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/intercept_schedule_microtask6_test.dart b/tests/lib_2/async/intercept_schedule_microtask6_test.dart deleted file mode 100644 index 0e62d52692d..00000000000 --- a/tests/lib_2/async/intercept_schedule_microtask6_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -class A { - add(x) => print(x); -} - -var events = []; - -body() { - events.add("body entry"); - scheduleMicrotask(() { - events.add("run async body"); - throw "foo"; - }); - return 499; -} - -onAsyncHandler(fun) { - events.add("async handler"); - scheduleMicrotask(fun); - events.add("async handler done"); -} - -onErrorHandler(e) { - events.add("error: $e"); -} - -main() { - asyncStart(); - - // Test that runZonedScheduleMicrotask works when async, error and done - // are used. - var result = runZonedScheduleMicrotask(body, - onScheduleMicrotask: onAsyncHandler, onError: onErrorHandler); - events.add("after"); - Timer.run(() { - Expect.listEquals([ - "body entry", - "async handler", - "async handler done", - "after", - "run async body", - "error: foo" - ], events); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/multiple_timer_test.dart b/tests/lib_2/async/multiple_timer_test.dart deleted file mode 100644 index 3e43507b28b..00000000000 --- a/tests/lib_2/async/multiple_timer_test.dart +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2012, 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 multiple_timer_test; - -import 'dart:async'; -import 'package:async_helper/async_helper.dart'; -import 'package:expect/expect.dart'; - -const Duration TIMEOUT1 = const Duration(seconds: 1); -const Duration TIMEOUT2 = const Duration(seconds: 2); -const Duration TIMEOUT3 = const Duration(milliseconds: 500); -const Duration TIMEOUT4 = const Duration(milliseconds: 1500); - -// The stopwatch is more precise than the Timer. -// Some browsers (Firefox and IE so far) can trigger too early. So we add more -// margin. We use identical(1, 1.0) as an easy way to know if the test is -// running on the web. -int get safetyMargin => identical(1, 1.0) ? 100 : 0; - -main() { - Stopwatch _stopwatch1 = new Stopwatch(); - Stopwatch _stopwatch2 = new Stopwatch(); - Stopwatch _stopwatch3 = new Stopwatch(); - Stopwatch _stopwatch4 = new Stopwatch(); - List _order; - int _message; - - void timeoutHandler1() { - Expect.isTrue((_stopwatch1.elapsedMilliseconds + safetyMargin) >= - TIMEOUT1.inMilliseconds); - Expect.equals(_order[_message], 0); - _message++; - asyncEnd(); - } - - void timeoutHandler2() { - Expect.isTrue((_stopwatch2.elapsedMilliseconds + safetyMargin) >= - TIMEOUT2.inMilliseconds); - Expect.equals(_order[_message], 1); - _message++; - asyncEnd(); - } - - void timeoutHandler3() { - Expect.isTrue((_stopwatch3.elapsedMilliseconds + safetyMargin) >= - TIMEOUT3.inMilliseconds); - Expect.equals(_order[_message], 2); - _message++; - asyncEnd(); - } - - void timeoutHandler4() { - Expect.isTrue((_stopwatch4.elapsedMilliseconds + safetyMargin) >= - TIMEOUT4.inMilliseconds); - Expect.equals(_order[_message], 3); - _message++; - asyncEnd(); - } - - _order = new List.filled(4, null); - _order[0] = 2; - _order[1] = 0; - _order[2] = 3; - _order[3] = 1; - _message = 0; - - asyncStart(); - _stopwatch1.start(); - new Timer(TIMEOUT1, timeoutHandler1); - asyncStart(); - _stopwatch2.start(); - new Timer(TIMEOUT2, timeoutHandler2); - asyncStart(); - _stopwatch3.start(); - new Timer(TIMEOUT3, timeoutHandler3); - asyncStart(); - _stopwatch4.start(); - new Timer(TIMEOUT4, timeoutHandler4); -} diff --git a/tests/lib_2/async/null_future_zone_test.dart b/tests/lib_2/async/null_future_zone_test.dart deleted file mode 100644 index 33229160396..00000000000 --- a/tests/lib_2/async/null_future_zone_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; -import 'dart:async'; - -main() { - asyncStart(2); - () async { - var it = new StreamIterator(new Stream.fromIterable([])); - Expect.isFalse(await it.moveNext()); - - Future nullFuture; - Future falseFuture; - - runZoned(() { - nullFuture = (new StreamController()..stream.listen(null).cancel()).done; - falseFuture = it.moveNext(); - }, zoneSpecification: new ZoneSpecification(scheduleMicrotask: - (Zone self, ZoneDelegate parent, Zone zone, void f()) { - Expect.fail("Should not be called"); - })); - - nullFuture.then((value) { - Expect.isNull(value); - asyncEnd(); - }); - - falseFuture.then((value) { - Expect.isFalse(value); - asyncEnd(); - }); - }(); -} diff --git a/tests/lib_2/async/periodic_timer2_test.dart b/tests/lib_2/async/periodic_timer2_test.dart deleted file mode 100644 index e9db6527807..00000000000 --- a/tests/lib_2/async/periodic_timer2_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// 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 - -import 'dart:async'; -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; - -const ms = const Duration(milliseconds: 1); - -expectGTE(min, actual, msg) { - if (actual >= min) return; - Expect.fail(msg.replaceAll('{0}', "$min").replaceAll('{1}', "$actual")); -} - -main() { - int interval = 100; - // Most browsers can trigger timers too early. Test data shows instances where - // timers fire even 15ms early. We add a safety margin to prevent flakiness - // when running this test on affected platforms. - int safetyMargin = const bool.fromEnvironment('dart.library.js') ? 40 : 0; - - asyncStart(); - var sw = new Stopwatch()..start(); - int nextTick = 1; - new Timer.periodic(ms * interval, (t) { - expectGTE(nextTick, t.tick, "tick {1} before expect next tick {0}."); - nextTick = t.tick + 1; // Always increment tick by at least one. - int time = sw.elapsedMilliseconds; - int minTime = interval * t.tick - safetyMargin; - expectGTE(minTime, time, "Actual time {1} before {0} at tick ${t.tick}"); - if (t.tick > 20) { - t.cancel(); - asyncEnd(); - } - }); -} diff --git a/tests/lib_2/async/periodic_timer3_test.dart b/tests/lib_2/async/periodic_timer3_test.dart deleted file mode 100644 index 3f1ad5f46f9..00000000000 --- a/tests/lib_2/async/periodic_timer3_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// 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 timer_test; - -import 'dart:async'; -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; - -const ms = const Duration(milliseconds: 1); - -expectGTE(min, actual, msg) { - if (actual >= min) return; - Expect.fail(msg.replaceAll('{0}', "$min").replaceAll('{1}', "$actual")); -} - -main() { - int interval = 100; - // Most browsers can trigger timers too early. Test data shows instances where - // timers fire even 15ms early. We add a safety margin to prevent flakiness - // when running this test on affected platforms. - int safetyMargin = const bool.fromEnvironment('dart.library.js') ? 40 : 0; - - asyncStart(); - var sw = new Stopwatch()..start(); - int nextTick = 1; - new Timer.periodic(ms * interval, (t) { - expectGTE(nextTick, t.tick, "tick {1} before expect next tick {0}."); - int time = sw.elapsedMilliseconds; - int minTime = interval * t.tick - safetyMargin; - expectGTE(minTime, time, "Actual time {1} before {0} at tick ${t.tick}"); - while (sw.elapsedMilliseconds < time + 3 * interval) { - // idle. - } - nextTick = t.tick + 2; // At least increment by two, probably more. - if (t.tick > 20) { - t.cancel(); - asyncEnd(); - } - }); -} diff --git a/tests/lib_2/async/periodic_timer4_test.dart b/tests/lib_2/async/periodic_timer4_test.dart deleted file mode 100644 index a8e292a9bd4..00000000000 --- a/tests/lib_2/async/periodic_timer4_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// 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 timer_test; - -import 'dart:async'; -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; - -const ms = const Duration(milliseconds: 1); - -expectGTE(min, actual, msg) { - if (actual >= min) return; - Expect.fail(msg.replaceAll('{0}', "$min").replaceAll('{1}', "$actual")); -} - -main() { - int interval = 100; - // Most browsers can trigger timers too early. Test data shows instances where - // timers fire even 15ms early. We add a safety margin to prevent flakiness - // when running this test on affected platforms. - int safetyMargin = const bool.fromEnvironment('dart.library.js') ? 40 : 0; - - asyncStart(); - var sw = new Stopwatch()..start(); - int nextTick = 1; - bool running = true; - var timer = new Timer.periodic(ms * interval, (t) { - expectGTE(nextTick, t.tick, "tick {1} before expect next tick {0}."); - nextTick += 1; - int time = sw.elapsedMilliseconds; - int minTime = interval * t.tick - safetyMargin; - expectGTE(minTime, time, "Actual time {1} before {0} at tick ${t.tick}"); - if (t.tick > 20) { - running = false; - t.cancel(); - asyncEnd(); - } - }); - - /// Test that ticks still happen when the rest of the system is slow. - delay() { - int time = new DateTime.now().millisecondsSinceEpoch; - int limit = time + 3 * interval; - while (new DateTime.now().millisecondsSinceEpoch < limit) { - // Idle. - } - nextTick = timer.tick + 2; // At least increment by two, probably more. - if (running) Timer.run(delay); - } - - Timer.run(delay); -} diff --git a/tests/lib_2/async/run_zoned1_test.dart b/tests/lib_2/async/run_zoned1_test.dart deleted file mode 100644 index 45c20202bcd..00000000000 --- a/tests/lib_2/async/run_zoned1_test.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:async'; - -main() { - // Make sure `runZoned` returns the result of a synchronous call. - Expect.equals(499, runZoned(() => 499)); -} diff --git a/tests/lib_2/async/run_zoned4_test.dart b/tests/lib_2/async/run_zoned4_test.dart deleted file mode 100644 index e252c81fb6a..00000000000 --- a/tests/lib_2/async/run_zoned4_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:async'; - -main() { - // Make sure `runZoned` returns the result of a synchronous call when an - // error handler is defined. - Expect.equals( - 499, - runZonedGuarded(() => 499, (e, s) { - throw "Unexpected"; - })); -} diff --git a/tests/lib_2/async/run_zoned5_test.dart b/tests/lib_2/async/run_zoned5_test.dart deleted file mode 100644 index 850aa07b88c..00000000000 --- a/tests/lib_2/async/run_zoned5_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; - -main() { - asyncStart(); - // Ensure that `runZoned`'s onError handles synchronous errors. - runZonedGuarded(() { - throw 0; - }, (e, s) { - Expect.equals(0, e); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/run_zoned6_test.dart b/tests/lib_2/async/run_zoned6_test.dart deleted file mode 100644 index 40e785ef67d..00000000000 --- a/tests/lib_2/async/run_zoned6_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:async'; -import 'package:async_helper/async_helper.dart'; - -main() { - asyncStart(); - // Ensure that `runZoned`'s onError handles synchronous errors, and throwing - // in the error handler at that point (when it is a synchronous error) yields - // a synchronous error. - try { - runZonedGuarded(() { - throw 0; - }, (e, s) { - Expect.equals(0, e); - throw e; //#01 : ok - asyncEnd(); - }); - } catch (e) { - asyncEnd(); return; //# 01: continued - rethrow; - } -} diff --git a/tests/lib_2/async/run_zoned7_test.dart b/tests/lib_2/async/run_zoned7_test.dart deleted file mode 100644 index 91fd804b8ff..00000000000 --- a/tests/lib_2/async/run_zoned7_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - - var events = []; - // Test runZoned with periodic Timers. - runZoned(() { - int counter = 0; - new Timer.periodic(const Duration(milliseconds: 50), (timer) { - if (counter == 5) { - timer.cancel(); - done.complete(true); - } - counter++; - events.add(counter); - }); - }); - - done.future.whenComplete(() { - Expect.listEquals([ - "main exit", - 1, - 2, - 3, - 4, - 5, - 6, - ], events); - asyncEnd(); - }); - events.add("main exit"); -} diff --git a/tests/lib_2/async/run_zoned8_test.dart b/tests/lib_2/async/run_zoned8_test.dart deleted file mode 100644 index 22730abcd59..00000000000 --- a/tests/lib_2/async/run_zoned8_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - - var events = []; - // Test runZoned with periodic Timers. - runZoned(() { - int counter = 0; - new Timer.periodic(const Duration(milliseconds: 50), (timer) { - if (counter == 1) { - timer.cancel(); - done.complete(true); - } - counter++; - events.add(counter); - throw counter; - }); - }, onError: (e, [s]) { - events.add("error: $e"); - Expect.isNotNull(s); // Regression test for http://dartbug.com/33589 - }); - - done.future.whenComplete(() { - Expect.listEquals([ - "main exit", - 1, - "error: 1", - 2, - "error: 2", - ], events); - asyncEnd(); - }); - events.add("main exit"); -} diff --git a/tests/lib_2/async/run_zoned9_test.dart b/tests/lib_2/async/run_zoned9_test.dart deleted file mode 100644 index 8ef3e3174bd..00000000000 --- a/tests/lib_2/async/run_zoned9_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:async'; -import 'package:async_helper/async_helper.dart'; - -main() { - asyncStart(); - // Ensure that `runZoned`'s onError handles synchronous errors but delegates - // to the next runZoned when the handler returns false. - bool sawInnerHandler = false; - try { - runZonedGuarded(() { - runZonedGuarded(() { - throw 0; - }, (e, s) { - Expect.equals(0, e); - sawInnerHandler = true; - throw e; - }); - }, (e, s) { - Expect.equals(0, e); - Expect.isTrue(sawInnerHandler); - // If we are waiting for an error, don't asyncEnd, but let it time out. - throw e; //# 01: ok - asyncEnd(); - }); - } catch (e) { - asyncEnd(); return; //# 01: continued - rethrow; - } -} diff --git a/tests/lib_2/async/schedule_microtask2_test.dart b/tests/lib_2/async/schedule_microtask2_test.dart deleted file mode 100644 index c27fbae6de6..00000000000 --- a/tests/lib_2/async/schedule_microtask2_test.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2013, 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 run_async_test; - -import 'package:async_helper/async_helper.dart'; -import 'package:expect/expect.dart'; -import 'dart:async'; - -main() { - int lastCallback = -1; - for (int i = 0; i < 100; i++) { - asyncStart(); - scheduleMicrotask(() { - Expect.equals(lastCallback, i - 1); - lastCallback = i; - asyncEnd(); - }); - } -} diff --git a/tests/lib_2/async/schedule_microtask3_test.dart b/tests/lib_2/async/schedule_microtask3_test.dart deleted file mode 100644 index 735b62ac2e3..00000000000 --- a/tests/lib_2/async/schedule_microtask3_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2013, 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 run_async_test; - -import 'dart:async'; -import 'package:async_helper/async_helper.dart'; -import 'package:expect/expect.dart'; - -main() { - // Check that Timers don't run before the async callbacks. - bool timerCallbackExecuted = false; - - asyncStart(); - Timer.run(() { - timerCallbackExecuted = true; - asyncEnd(); - }); - - scheduleMicrotask(() { - Expect.isFalse(timerCallbackExecuted); - }); - - scheduleMicrotask(() { - // Busy loop. - var sum = 1; - var sw = new Stopwatch()..start(); - while (sw.elapsedMilliseconds < 5) { - sum++; - } - if (sum == 0) throw "bad"; // Just to use the result. - scheduleMicrotask(() { - Expect.isFalse(timerCallbackExecuted); - }); - }); - - scheduleMicrotask(() { - Expect.isFalse(timerCallbackExecuted); - }); -} diff --git a/tests/lib_2/async/schedule_microtask5_test.dart b/tests/lib_2/async/schedule_microtask5_test.dart deleted file mode 100644 index c272a9ec02b..00000000000 --- a/tests/lib_2/async/schedule_microtask5_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2013, 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 run_async_test; - -import 'dart:async'; -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; - -main() { - // Check that Timers don't run before the async callbacks. - bool timerCallbackExecuted = false; - - scheduleMicrotask(() { - Expect.isFalse(timerCallbackExecuted); - }); - - asyncStart(); - Timer.run(() { - timerCallbackExecuted = true; - asyncEnd(); - }); - - scheduleMicrotask(() { - Expect.isFalse(timerCallbackExecuted); - }); - - scheduleMicrotask(() { - // Busy loop. - var sum = 1; - var sw = new Stopwatch()..start(); - while (sw.elapsedMilliseconds < 5) { - sum++; - } - if (sum == 0) throw "bad"; // Just to use the result. - scheduleMicrotask(() { - Expect.isFalse(timerCallbackExecuted); - }); - }); - - scheduleMicrotask(() { - Expect.isFalse(timerCallbackExecuted); - }); -} diff --git a/tests/lib_2/async/schedule_microtask_test.dart b/tests/lib_2/async/schedule_microtask_test.dart deleted file mode 100644 index 163f8514531..00000000000 --- a/tests/lib_2/async/schedule_microtask_test.dart +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; - -Future testOneScheduleMicrotask() { - var completer = new Completer(); - Timer.run(() { - scheduleMicrotask(completer.complete); - }); - return completer.future; -} - -Future testMultipleScheduleMicrotask() { - var completer = new Completer(); - Timer.run(() { - const TOTAL = 10; - int done = 0; - for (int i = 0; i < TOTAL; i++) { - scheduleMicrotask(() { - done++; - if (done == TOTAL) completer.complete(); - ; - }); - } - }); - return completer.future; -} - -Future testScheduleMicrotaskThenTimer() { - var completer = new Completer(); - Timer.run(() { - bool scheduleMicrotaskDone = false; - scheduleMicrotask(() { - Expect.isFalse(scheduleMicrotaskDone); - scheduleMicrotaskDone = true; - }); - Timer.run(() { - Expect.isTrue(scheduleMicrotaskDone); - completer.complete(); - }); - }); - return completer.future; -} - -Future testTimerThenScheduleMicrotask() { - var completer = new Completer(); - Timer.run(() { - bool scheduleMicrotaskDone = false; - Timer.run(() { - Expect.isTrue(scheduleMicrotaskDone); - completer.complete(); - }); - scheduleMicrotask(() { - Expect.isFalse(scheduleMicrotaskDone); - scheduleMicrotaskDone = true; - }); - }); - return completer.future; -} - -Future testTimerThenScheduleMicrotaskChain() { - var completer = new Completer(); - Timer.run(() { - const TOTAL = 10; - int scheduleMicrotaskDone = 0; - Timer.run(() { - Expect.equals(TOTAL, scheduleMicrotaskDone); - completer.complete(); - }); - Future scheduleMicrotaskCallback() { - scheduleMicrotaskDone++; - if (scheduleMicrotaskDone != TOTAL) { - scheduleMicrotask(scheduleMicrotaskCallback); - } - } - - scheduleMicrotask(scheduleMicrotaskCallback); - }); - return completer.future; -} - -main() { - asyncStart(); - testOneScheduleMicrotask() - .then((_) => testMultipleScheduleMicrotask()) - .then((_) => testScheduleMicrotaskThenTimer()) - .then((_) => testTimerThenScheduleMicrotask()) - .then((_) => testTimerThenScheduleMicrotaskChain()) - .then((_) => asyncEnd()); -} diff --git a/tests/lib_2/async/slow_consumer2_test.dart b/tests/lib_2/async/slow_consumer2_test.dart deleted file mode 100644 index 4dc6716b262..00000000000 --- a/tests/lib_2/async/slow_consumer2_test.dart +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) 2012, 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 - -// VMOptions=--old_gen_heap_size=64 --no-background-compilation - -library slow_consumer2_test; - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; - -const int KB = 1024; -const int MB = KB * KB; -const int GB = KB * KB * KB; - -class SlowConsumer extends StreamConsumer { - int receivedCount = 0; - final int bytesPerSecond; - final int bufferSize; - final List bufferedData = []; - int usedBufferSize = 0; - int finalCount; - - SlowConsumer(int this.bytesPerSecond, int this.bufferSize); - - Future consume(Stream stream) { - return addStream(stream).then((_) => close()); - } - - Future addStream(Stream stream) { - Completer result = new Completer(); - var subscription; - subscription = stream.listen((Object _data) { - List data = _data; - receivedCount += data.length; - usedBufferSize += data.length; - bufferedData.add(data); - int currentBufferedDataLength = bufferedData.length; - if (usedBufferSize > bufferSize) { - subscription.pause(); - usedBufferSize = 0; - int ms = data.length * 1000 ~/ bytesPerSecond; - Duration duration = new Duration(milliseconds: ms); - new Timer(duration, () { - for (int i = 0; i < currentBufferedDataLength; i++) { - bufferedData[i] = null; - } - subscription.resume(); - }); - } - }, onDone: () { - finalCount = receivedCount; - result.complete(receivedCount); - }); - return result.future; - } - - Future close() { - return new Future.value(finalCount); - } -} - -class DataProvider { - final int chunkSize; - final int bytesPerSecond; - int sentCount = 0; - int targetCount; - StreamController controller; - - DataProvider(int this.bytesPerSecond, int this.targetCount, this.chunkSize) { - controller = new StreamController( - sync: true, onPause: onPauseStateChange, onResume: onPauseStateChange); - Timer.run(send); - } - - Stream get stream => controller.stream; - - send() { - if (controller.isPaused) return; - if (sentCount == targetCount) { - controller.close(); - return; - } - int listSize = chunkSize; - sentCount += listSize; - if (sentCount > targetCount) { - listSize -= sentCount - targetCount; - sentCount = targetCount; - } - controller.add(new List.filled(listSize, null)); - int ms = listSize * 1000 ~/ bytesPerSecond; - Duration duration = new Duration(milliseconds: ms); - if (!controller.isPaused) new Timer(duration, send); - } - - onPauseStateChange() { - // We don't care if we just unpaused or paused. In either case we just - // call send which will test it for us. - send(); - } -} - -main() { - asyncStart(); - // The data provider can deliver 800MB/s of data. It sends 100MB of data to - // the slower consumer who can only read 200MB/s. The data is sent in 1MB - // chunks. The consumer has a buffer of 5MB. That is, it can accept a few - // packages without pausing its input. - // - // This test is limited to 32MB of heap-space (see VMOptions on top of the - // file). If the consumer doesn't pause the data-provider it will run out of - // heap-space. - - new DataProvider(800 * MB, 100 * MB, 1 * MB) - .stream - .pipe(new SlowConsumer(200 * MB, 5 * MB)) - .then((count) { - Expect.equals(100 * MB, count); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/slow_consumer3_test.dart b/tests/lib_2/async/slow_consumer3_test.dart deleted file mode 100644 index 5866a36e6a9..00000000000 --- a/tests/lib_2/async/slow_consumer3_test.dart +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 2012, 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 - -// VMOptions=--old_gen_heap_size=64 --no-background-compilation - -library slow_consumer3_test; - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; - -const int KB = 1024; -const int MB = KB * KB; -const int GB = KB * KB * KB; - -class SlowConsumer extends StreamConsumer> { - int receivedCount = 0; - final int bytesPerSecond; - final int bufferSize; - final List> bufferedData = []; - int usedBufferSize = 0; - int finalCount; - - SlowConsumer(int this.bytesPerSecond, int this.bufferSize); - - Future consume(Stream stream) { - return addStream(stream).then((_) => close()); - } - - Future addStream(Stream stream) { - Completer result = new Completer(); - var subscription; - subscription = stream.listen((Object _data) { - List data = _data; - receivedCount += data.length; - usedBufferSize += data.length; - bufferedData.add(data); - int currentBufferedDataLength = bufferedData.length; - if (usedBufferSize > bufferSize) { - subscription.pause(); - usedBufferSize = 0; - int ms = data.length * 1000 ~/ bytesPerSecond; - Duration duration = new Duration(milliseconds: ms); - new Timer(duration, () { - for (int i = 0; i < currentBufferedDataLength; i++) { - bufferedData[i] = null; - } - subscription.resume(); - }); - } - }, onDone: () { - finalCount = receivedCount; - result.complete(receivedCount); - }); - return result.future; - } - - Future close() { - return new Future.value(finalCount); - } -} - -Stream> dataGenerator(int bytesTotal, int chunkSize) { - int chunks = bytesTotal ~/ chunkSize; - return new Stream.fromIterable(new Iterable.generate(chunks, (_) { - // This assumes one byte per entry. In practice it will be more. - return new List.filled(chunkSize, null); - })); -} - -main() { - asyncStart(); - // The data provider can deliver 800MBs of data as fast as it is - // requested. The data is sent in 0.5MB chunks. The consumer has a buffer of - // 3MB. That is, it can accept a few packages without pausing its input. - // - // Notice that we aren't really counting bytes, but words, since we use normal - // lists where each entry takes up a full word. In 64-bit VMs this will be - // 8 bytes per entry, so the 3*MB buffer is picked to stay below 32 actual - // MiB. - // - // This test is limited to 32MB of heap-space (see VMOptions on top of the - // file). If the consumer doesn't pause the data-provider it will run out of - // heap-space. - - dataGenerator(100 * MB, 512 * KB) - .pipe(new SlowConsumer(200 * MB, 3 * MB)) - .then((count) { - Expect.equals(100 * MB, count); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/slow_consumer_test.dart b/tests/lib_2/async/slow_consumer_test.dart deleted file mode 100644 index f0670d9b840..00000000000 --- a/tests/lib_2/async/slow_consumer_test.dart +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) 2012, 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 - -// VMOptions=--old_gen_heap_size=64 --no-background-compilation - -library slow_consumer_test; - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; - -const int KB = 1024; -const int MB = KB * KB; -const int GB = KB * KB * KB; - -class SlowConsumer extends StreamConsumer { - var current = new Future.value(0); - final int bytesPerSecond; - int finalCount; - - SlowConsumer(int this.bytesPerSecond); - - Future consume(Stream stream) { - return addStream(stream).then((_) => close()); - } - - Future addStream(Stream stream) { - bool done = false; - Completer completer = new Completer(); - var subscription; - subscription = stream.listen((Object _data) { - List data = _data; - current = current.then((count) { - // Simulated amount of time it takes to handle the data. - int ms = data.length * 1000 ~/ bytesPerSecond; - Duration duration = new Duration(milliseconds: ms); - if (!done) subscription.pause(); - return new Future.delayed(duration, () { - if (!done) subscription.resume(); - // Make sure we use data here to keep tracking it. - return count + data.length; - }); - }); - }, onDone: () { - done = true; - current.then((count) { - finalCount = count; - completer.complete(count); - }); - }); - return completer.future; - } - - Future close() { - return new Future.value(finalCount); - } -} - -class DataProvider { - final int chunkSize; - final int bytesPerSecond; - int sentCount = 0; - int targetCount; - StreamController controller; - Timer pendingSend; - - DataProvider(int this.bytesPerSecond, int this.targetCount, this.chunkSize) { - controller = new StreamController( - sync: true, onPause: onPauseStateChange, onResume: onPauseStateChange); - Timer.run(send); - } - - Stream get stream => controller.stream; - - send() { - if (pendingSend != null) { - pendingSend.cancel(); - pendingSend = null; - } - if (controller.isPaused) return; - if (sentCount == targetCount) { - controller.close(); - return; - } - int listSize = chunkSize; - sentCount += listSize; - if (sentCount > targetCount) { - listSize -= sentCount - targetCount; - sentCount = targetCount; - } - controller.add(new List.filled(listSize, null)); - int ms = listSize * 1000 ~/ bytesPerSecond; - Duration duration = new Duration(milliseconds: ms); - if (!controller.isPaused) { - pendingSend = new Timer(duration, send); - } - } - - onPauseStateChange() { - // We don't care if we just unpaused or paused. In either case we just - // call send which will test it for us. - send(); - } -} - -main() { - asyncStart(); - // The data provider can deliver 800MB/s of data. It sends 100MB of data to - // the slower consumer who can only read 200MB/s. The data is sent in 1MB - // chunks. - // - // This test is limited to 64MB of heap-space (see VMOptions on top of the - // file). If the consumer doesn't pause the data-provider it will run out of - // heap-space. - - new DataProvider(800 * MB, 100 * MB, 1 * MB) - .stream - .pipe(new SlowConsumer(200 * MB)) - .then((count) { - Expect.equals(100 * MB, count); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/stack_trace01_test.dart b/tests/lib_2/async/stack_trace01_test.dart deleted file mode 100644 index eb180a7b0e7..00000000000 --- a/tests/lib_2/async/stack_trace01_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -StackTrace captureStackTrace() { - try { - throw 0; - } catch (e, st) { - return st; - } -} - -main() { - StackTrace trace = captureStackTrace(); - asyncStart(); - var f = new Future.error(499, trace); - f.catchError((e, st) { - Expect.identical(trace, st); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/stack_trace02_test.dart b/tests/lib_2/async/stack_trace02_test.dart deleted file mode 100644 index fe1fccd6387..00000000000 --- a/tests/lib_2/async/stack_trace02_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -main() { - StackTrace trace; - asyncStart(); - var f = new Future(() { - throw "foo"; - }); - f.catchError((e, st) { - Expect.equals("foo", e); - Expect.isNotNull(st); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/stack_trace03_test.dart b/tests/lib_2/async/stack_trace03_test.dart deleted file mode 100644 index bf934a17d5b..00000000000 --- a/tests/lib_2/async/stack_trace03_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -main() { - StackTrace trace; - asyncStart(); - var f = new Future(() { - throw "foo"; - }); - f.then((_) => 499).catchError((e, st) { - Expect.equals("foo", e); - Expect.isNotNull(st); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/stack_trace04_test.dart b/tests/lib_2/async/stack_trace04_test.dart deleted file mode 100644 index 16e27d6bc08..00000000000 --- a/tests/lib_2/async/stack_trace04_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -StackTrace captureStackTrace() { - try { - throw 0; - } catch (e, st) { - return st; - } -} - -main() { - StackTrace trace = captureStackTrace(); - asyncStart(); - var f = new Future(() => 499); - f.then((_) => new Future.error("e", trace)).catchError((e, st) { - Expect.equals("e", e); - Expect.identical(trace, st); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/stack_trace05_test.dart b/tests/lib_2/async/stack_trace05_test.dart deleted file mode 100644 index bda1b009e13..00000000000 --- a/tests/lib_2/async/stack_trace05_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -StackTrace captureStackTrace() { - try { - throw 0; - } catch (e, st) { - return st; - } -} - -main() { - StackTrace trace = captureStackTrace(); - asyncStart(); - var f = new Future(() => 499); - f.then((_) => new Future.error("e", trace)).whenComplete(() => 499).then((_) { - throw "should never be reached"; - }).catchError((e, st) { - Expect.equals("e", e); - Expect.identical(trace, st); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/stack_trace06_test.dart b/tests/lib_2/async/stack_trace06_test.dart deleted file mode 100644 index 8e6a1ff42f2..00000000000 --- a/tests/lib_2/async/stack_trace06_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -StackTrace captureStackTrace() { - try { - throw 0; - } catch (e, st) { - return st; - } -} - -main() { - Completer completer = new Completer(); - StackTrace trace = captureStackTrace(); - asyncStart(); - completer.future.whenComplete(() => 499).then((_) { - throw "should never be reached"; - }).catchError((e, st) { - Expect.equals("c-error", e); - Expect.identical(trace, st); - asyncEnd(); - }); - completer.completeError("c-error", trace); -} diff --git a/tests/lib_2/async/stack_trace07_test.dart b/tests/lib_2/async/stack_trace07_test.dart deleted file mode 100644 index a5d7c37af60..00000000000 --- a/tests/lib_2/async/stack_trace07_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -StackTrace captureStackTrace() { - try { - throw 0; - } catch (e, st) { - return st; - } -} - -main() { - Completer completer = new Completer(); - StackTrace trace = captureStackTrace(); - asyncStart(); - completer.future.whenComplete(() => 499).then((_) { - throw "bad things happen"; - }).catchError((e, st) { - Expect.equals("bad things happen", e); - Expect.isNotNull(st); - asyncEnd(); - }); - completer.complete(499); -} diff --git a/tests/lib_2/async/stack_trace08_test.dart b/tests/lib_2/async/stack_trace08_test.dart deleted file mode 100644 index d3c116d3bd7..00000000000 --- a/tests/lib_2/async/stack_trace08_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -StackTrace captureStackTrace() { - try { - throw 0; - } catch (e, st) { - return st; - } -} - -main() { - Completer completer = new Completer(); - StackTrace trace = captureStackTrace(); - asyncStart(); - completer.future.whenComplete(() => 499).then((_) { - throw "should never be reached"; - }).catchError((e, st) { - Expect.equals("c-error", e); - Expect.identical(trace, st); - // Test the rethrowing the same error keeps the stack trace. - throw e; - }).catchError((e, st) { - Expect.equals("c-error", e); - Expect.identical(trace, st); - asyncEnd(); - }); - completer.completeError("c-error", trace); -} diff --git a/tests/lib_2/async/stack_trace09_test.dart b/tests/lib_2/async/stack_trace09_test.dart deleted file mode 100644 index 969de46e1f4..00000000000 --- a/tests/lib_2/async/stack_trace09_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -StackTrace captureStackTrace() { - try { - throw 0; - } catch (e, st) { - return st; - } -} - -main() { - StackTrace trace = captureStackTrace(); - var controller; - controller = new StreamController(onListen: () { - controller.addError("error", trace); - controller.close(); - }); - asyncStart(); - controller.stream.handleError((e, st) { - Expect.equals("error", e); - Expect.identical(trace, st); - }).listen((x) { - throw "should never be reached"; - }, onDone: asyncEnd); -} diff --git a/tests/lib_2/async/stack_trace10_test.dart b/tests/lib_2/async/stack_trace10_test.dart deleted file mode 100644 index 0e7d6c0464f..00000000000 --- a/tests/lib_2/async/stack_trace10_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -StackTrace captureStackTrace() { - try { - throw 0; - } catch (e, st) { - return st; - } -} - -main() { - StackTrace trace = captureStackTrace(); - var controller; - controller = new StreamController(onListen: () { - controller.addError("error", trace); - controller.close(); - }); - asyncStart(); - controller.stream.listen(null).asFuture().then((_) { - throw "should never be reached"; - }, onError: (e, st) { - Expect.equals("error", e); - Expect.identical(trace, st); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/stack_trace11_test.dart b/tests/lib_2/async/stack_trace11_test.dart deleted file mode 100644 index 7a60cb124c7..00000000000 --- a/tests/lib_2/async/stack_trace11_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -StackTrace captureStackTrace() { - try { - throw 0; - } catch (e, st) { - return st; - } -} - -main() { - StackTrace trace = captureStackTrace(); - asyncStart(); - var f = new Future.error(499, trace); - f.then((_) { - throw "Unreachable"; - }, onError: (e, st) { - Expect.identical(trace, st); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/stack_trace12_test.dart b/tests/lib_2/async/stack_trace12_test.dart deleted file mode 100644 index 0991efcf8ef..00000000000 --- a/tests/lib_2/async/stack_trace12_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -main() { - StackTrace trace; - asyncStart(); - var f = new Future(() { - throw "foo"; - }); - f.then((_) { - throw "Unreachable"; - }, onError: (e, st) { - Expect.equals("foo", e); - Expect.isNotNull(st); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/stack_trace13_test.dart b/tests/lib_2/async/stack_trace13_test.dart deleted file mode 100644 index 39e9dfb2812..00000000000 --- a/tests/lib_2/async/stack_trace13_test.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -main() { - StackTrace trace; - asyncStart(); - var f = new Future(() { - throw "foo"; - }); - f.then((_) => 499).then((_) { - throw "Unreachable"; - }, onError: (e, st) { - Expect.equals("foo", e); - Expect.isNotNull(st); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/stack_trace14_test.dart b/tests/lib_2/async/stack_trace14_test.dart deleted file mode 100644 index 20c2c0a2c6a..00000000000 --- a/tests/lib_2/async/stack_trace14_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -StackTrace captureStackTrace() { - try { - throw 0; - } catch (e, st) { - return st; - } -} - -main() { - StackTrace trace = captureStackTrace(); - asyncStart(); - var f = new Future(() => 499); - f.then((_) => new Future.error("e", trace)).then((_) { - throw "Unreachable"; - }, onError: (e, st) { - Expect.equals("e", e); - Expect.identical(trace, st); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/stack_trace15_test.dart b/tests/lib_2/async/stack_trace15_test.dart deleted file mode 100644 index 03e0ba9b357..00000000000 --- a/tests/lib_2/async/stack_trace15_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -StackTrace captureStackTrace() { - try { - throw 0; - } catch (e, st) { - return st; - } -} - -main() { - StackTrace trace = captureStackTrace(); - asyncStart(); - var f = new Future(() => 499); - f.then((_) => new Future.error("e", trace)).whenComplete(() => 499).then((_) { - throw "should never be reached"; - }).then((_) { - throw "Unreachable"; - }, onError: (e, st) { - Expect.equals("e", e); - Expect.identical(trace, st); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/stack_trace16_test.dart b/tests/lib_2/async/stack_trace16_test.dart deleted file mode 100644 index 398e14ce86c..00000000000 --- a/tests/lib_2/async/stack_trace16_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -StackTrace captureStackTrace() { - try { - throw 0; - } catch (e, st) { - return st; - } -} - -main() { - Completer completer = new Completer(); - StackTrace trace = captureStackTrace(); - asyncStart(); - completer.future.whenComplete(() => 499).then((_) { - throw "should never be reached"; - }).then((_) { - throw "Unreachable"; - }, onError: (e, st) { - Expect.equals("c-error", e); - Expect.identical(trace, st); - asyncEnd(); - }); - completer.completeError("c-error", trace); -} diff --git a/tests/lib_2/async/stack_trace17_test.dart b/tests/lib_2/async/stack_trace17_test.dart deleted file mode 100644 index caed73153d8..00000000000 --- a/tests/lib_2/async/stack_trace17_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -StackTrace captureStackTrace() { - try { - throw 0; - } catch (e, st) { - return st; - } -} - -main() { - Completer completer = new Completer(); - StackTrace trace = captureStackTrace(); - asyncStart(); - completer.future.whenComplete(() => 499).then((_) { - throw "bad things happen"; - }).then((_) { - throw "Unreachable"; - }, onError: (e, st) { - Expect.equals("bad things happen", e); - Expect.isNotNull(st); - asyncEnd(); - }); - completer.complete(499); -} diff --git a/tests/lib_2/async/stack_trace18_test.dart b/tests/lib_2/async/stack_trace18_test.dart deleted file mode 100644 index b15f5f7ac02..00000000000 --- a/tests/lib_2/async/stack_trace18_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -StackTrace captureStackTrace() { - try { - throw 0; - } catch (e, st) { - return st; - } -} - -main() { - Completer completer = new Completer(); - StackTrace trace = captureStackTrace(); - asyncStart(); - completer.future.whenComplete(() => 499).then((_) { - throw "should never be reached"; - }).then((_) { - throw "Unreachable"; - }, onError: (e, st) { - Expect.equals("c-error", e); - Expect.identical(trace, st); - // Test the rethrowing the same error keeps the stack trace. - throw e; - }).then((_) { - throw "Unreachable"; - }, onError: (e, st) { - Expect.equals("c-error", e); - Expect.identical(trace, st); - asyncEnd(); - }); - completer.completeError("c-error", trace); -} diff --git a/tests/lib_2/async/stack_trace19_test.dart b/tests/lib_2/async/stack_trace19_test.dart deleted file mode 100644 index 5a4d91517c0..00000000000 --- a/tests/lib_2/async/stack_trace19_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -StackTrace captureStackTrace() { - try { - throw 0; - } catch (e, st) { - return st; - } -} - -main() { - Completer completer = new Completer(); - StackTrace trace = captureStackTrace(); - StackTrace whenCompleteStackTrace; - asyncStart(); - completer.future.whenComplete(() { - throw "other_error"; - }).then((_) { - throw "should never be reached"; - }).catchError((e, st) { - Expect.equals("other_error", e); - Expect.isNotNull(st); - Expect.isFalse(identical(trace, st)); - whenCompleteStackTrace = st; - // Test the rethrowing the same error keeps the stack trace. - throw e; - }).catchError((e, st) { - Expect.equals("other_error", e); - Expect.identical(whenCompleteStackTrace, st); - asyncEnd(); - }); - completer.completeError("c-error", trace); -} diff --git a/tests/lib_2/async/stack_trace20_test.dart b/tests/lib_2/async/stack_trace20_test.dart deleted file mode 100644 index 0e7d6c0464f..00000000000 --- a/tests/lib_2/async/stack_trace20_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -StackTrace captureStackTrace() { - try { - throw 0; - } catch (e, st) { - return st; - } -} - -main() { - StackTrace trace = captureStackTrace(); - var controller; - controller = new StreamController(onListen: () { - controller.addError("error", trace); - controller.close(); - }); - asyncStart(); - controller.stream.listen(null).asFuture().then((_) { - throw "should never be reached"; - }, onError: (e, st) { - Expect.equals("error", e); - Expect.identical(trace, st); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/stack_trace21_test.dart b/tests/lib_2/async/stack_trace21_test.dart deleted file mode 100644 index 9ce59293234..00000000000 --- a/tests/lib_2/async/stack_trace21_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -StackTrace captureStackTrace() { - try { - throw 0; - } catch (e, st) { - return st; - } -} - -main() { - StackTrace trace = captureStackTrace(); - var controller; - controller = new StreamController(onListen: () { - controller.addError("error", trace); - controller.close(); - }); - asyncStart(); - controller.stream.listen((_) { - throw "should never be reached"; - }, onError: (e, st) { - Expect.equals("error", e); - Expect.identical(trace, st); - }, onDone: () { - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/stack_trace22_test.dart b/tests/lib_2/async/stack_trace22_test.dart deleted file mode 100644 index e37709dc277..00000000000 --- a/tests/lib_2/async/stack_trace22_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -StackTrace captureStackTrace() { - try { - throw 0; - } catch (e, st) { - return st; - } -} - -main() { - StackTrace trace = captureStackTrace(); - asyncStart(); - var f = new Future.error(499, trace); - f.catchError((e, st) { - Expect.identical(trace, st); - asyncEnd(); - }, test: (e) => e == 499); -} diff --git a/tests/lib_2/async/stack_trace23_test.dart b/tests/lib_2/async/stack_trace23_test.dart deleted file mode 100644 index d6eaca3d089..00000000000 --- a/tests/lib_2/async/stack_trace23_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -StackTrace captureStackTrace() { - try { - throw 0; - } catch (e, st) { - return st; - } -} - -main() { - StackTrace trace = captureStackTrace(); - asyncStart(); - var f = new Future.error(499, trace); - f.catchError((e) { - throw "unreachable"; - }, test: (e) { - Expect.equals(499, e); - return false; - }).catchError((e, st) { - Expect.identical(trace, st); - asyncEnd(); - }, test: (e) => e == 499); -} diff --git a/tests/lib_2/async/stack_trace24_test.dart b/tests/lib_2/async/stack_trace24_test.dart deleted file mode 100644 index ccdd5db327e..00000000000 --- a/tests/lib_2/async/stack_trace24_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -main() { - var controller; - controller = new StreamController(onListen: () { - controller.add(499); - controller.close(); - }); - asyncStart(); - controller.stream.map((e) { - throw "error"; - }).listen((_) { - throw "should never be reached"; - }, onError: (e, st) { - Expect.equals("error", e); - Expect.isNotNull(st); - }, onDone: () { - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/stack_trace25_test.dart b/tests/lib_2/async/stack_trace25_test.dart deleted file mode 100644 index c04b48b9490..00000000000 --- a/tests/lib_2/async/stack_trace25_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -StackTrace captureStackTrace() { - try { - throw 0; - } catch (e, st) { - return st; - } -} - -main() { - StackTrace trace = captureStackTrace(); - var controller; - controller = new StreamController(onListen: () { - controller.addError("error", trace); - controller.close(); - }); - asyncStart(); - var iterator = new StreamIterator(controller.stream); - var future = iterator.moveNext(); - future.then((_) { - throw "unreachable"; - }, onError: (e, st) { - Expect.equals("error", e); - Expect.identical(trace, st); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/stream_controller_add_error_test.dart b/tests/lib_2/async/stream_controller_add_error_test.dart deleted file mode 100644 index 4656f831fb8..00000000000 --- a/tests/lib_2/async/stream_controller_add_error_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// 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. - -// @dart = 2.9 -import 'dart:async'; - -import 'package:expect/expect.dart'; - -main() { - // Single-cast async. - var controller = StreamController(); - Expect.throwsTypeError(() { - controller.addError(null); - }); - - Expect.throwsTypeError(() { - controller.sink.addError(null); - }); - - // Single-cast sync. - controller = StreamController(sync: true); - Expect.throwsTypeError(() { - controller.addError(null); - }); - - Expect.throwsTypeError(() { - controller.sink.addError(null); - }); - - // Broadcast async. - controller = StreamController.broadcast(); - Expect.throwsTypeError(() { - controller.addError(null); - }); - - Expect.throwsTypeError(() { - controller.sink.addError(null); - }); - - // Broadcast sync. - controller = StreamController.broadcast(sync: true); - Expect.throwsTypeError(() { - controller.addError(null); - }); - - Expect.throwsTypeError(() { - controller.sink.addError(null); - }); -} diff --git a/tests/lib_2/async/stream_controller_async_test.dart b/tests/lib_2/async/stream_controller_async_test.dart deleted file mode 100644 index bc8355edcce..00000000000 --- a/tests/lib_2/async/stream_controller_async_test.dart +++ /dev/null @@ -1,911 +0,0 @@ -// 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 - -// Test the basic StreamController and StreamController.broadcast. -library stream_controller_async_test; - -import 'dart:async'; - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_minitest.dart'; - -import 'event_helper.dart'; -import 'stream_state_helper.dart'; - -void cancelSub(StreamSubscription sub) { - sub.cancel(); -} - -testController() { - // Test fold - test("StreamController.fold", () { - StreamController c = new StreamController(); - Stream stream = c.stream.asBroadcastStream(onCancel: cancelSub); - stream.fold(0, (a, b) => a + b).then(expectAsync((int v) { - Expect.equals(42, v); - })); - c.add(10); - c.add(32); - c.close(); - }); - - test("StreamController.fold throws", () { - StreamController c = new StreamController(); - Stream stream = c.stream.asBroadcastStream(onCancel: cancelSub); - stream.fold(0, (a, b) { - throw "Fnyf!"; - }).catchError(expectAsync((error) { - Expect.equals("Fnyf!", error); - })); - c.add(42); - }); -} - -testSingleController() { - test("Single-subscription StreamController.fold", () { - StreamController c = new StreamController(); - Stream stream = c.stream; - stream.fold(0, (a, b) => a + b).then(expectAsync((int v) { - Expect.equals(42, v); - })); - c.add(10); - c.add(32); - c.close(); - }); - - test("Single-subscription StreamController.fold throws", () { - StreamController c = new StreamController(); - Stream stream = c.stream; - stream.fold(0, (a, b) { - throw "Fnyf!"; - }).catchError(expectAsync((e) { - Expect.equals("Fnyf!", e); - })); - c.add(42); - }); - - test( - "Single-subscription StreamController events are buffered when" - " there is no subscriber", () { - StreamController c = new StreamController(); - EventSink sink = c.sink; - Stream stream = c.stream; - int counter = 0; - sink.add(1); - sink.add(2); - sink.close(); - stream.listen((data) { - counter += data; - }, onDone: expectAsync(() { - Expect.equals(3, counter); - })); - }); -} - -testExtraMethods() { - Events sentEvents = new Events() - ..add(7) - ..add(9) - ..add(13) - ..add(87) - ..close(); - - test("forEach", () { - StreamController c = new StreamController(); - Events actualEvents = new Events(); - Future f = c.stream.forEach(actualEvents.add); - f.then(expectAsync((_) { - actualEvents.close(); - Expect.listEquals(sentEvents.events, actualEvents.events); - })); - sentEvents.replay(c); - }); - - test("forEachError", () { - Events sentEvents = new Events() - ..add(7) - ..error("bad") - ..add(87) - ..close(); - StreamController c = new StreamController(); - Events actualEvents = new Events(); - Future f = c.stream.forEach(actualEvents.add); - f.catchError(expectAsync((error) { - Expect.equals("bad", error); - Expect.listEquals((new Events()..add(7)).events, actualEvents.events); - })); - sentEvents.replay(c); - }); - - test("forEachError2", () { - Events sentEvents = new Events() - ..add(7) - ..add(9) - ..add(87) - ..close(); - StreamController c = new StreamController(); - Events actualEvents = new Events(); - Future f = c.stream.forEach((x) { - if (x == 9) throw "bad"; - actualEvents.add(x); - }); - f.catchError(expectAsync((error) { - Expect.equals("bad", error); - Expect.listEquals((new Events()..add(7)).events, actualEvents.events); - })); - sentEvents.replay(c); - }); - - test("firstWhere", () { - StreamController c = new StreamController(); - Future f = c.stream.firstWhere((x) => (x % 3) == 0); - f.then(expectAsync((v) { - Expect.equals(9, v); - })); - sentEvents.replay(c); - }); - - test("firstWhere 2", () { - StreamController c = new StreamController(); - Future f = c.stream.firstWhere((x) => (x % 4) == 0); - f.catchError(expectAsync((e) {})); - sentEvents.replay(c); - }); - - test("firstWhere 3", () { - StreamController c = new StreamController(); - Future f = c.stream.firstWhere((x) => (x % 4) == 0, orElse: () => 999); - f.then(expectAsync((v) { - Expect.equals(999, v); - })); - sentEvents.replay(c); - }); - - test("lastWhere", () { - StreamController c = new StreamController(); - Future f = c.stream.lastWhere((x) => (x % 3) == 0); - f.then(expectAsync((v) { - Expect.equals(87, v); - })); - sentEvents.replay(c); - }); - - test("lastWhere 2", () { - StreamController c = new StreamController(); - Future f = c.stream.lastWhere((x) => (x % 4) == 0); - f.catchError(expectAsync((e) {})); - sentEvents.replay(c); - }); - - test("lastWhere 3", () { - StreamController c = new StreamController(); - Future f = c.stream.lastWhere((x) => (x % 4) == 0, orElse: () => 999); - f.then(expectAsync((v) { - Expect.equals(999, v); - })); - sentEvents.replay(c); - }); - - test("singleWhere", () { - StreamController c = new StreamController(); - Future f = c.stream.singleWhere((x) => (x % 9) == 0); - f.then(expectAsync((v) { - Expect.equals(9, v); - })); - sentEvents.replay(c); - }); - - test("singleWhere 2", () { - StreamController c = new StreamController(); - Future f = c.stream.singleWhere((x) => (x % 3) == 0); // Matches 9 and 87.. - f.catchError(expectAsync((error) { - Expect.isTrue(error is StateError); - })); - sentEvents.replay(c); - }); - - test("first", () { - StreamController c = new StreamController(); - Future f = c.stream.first; - f.then(expectAsync((v) { - Expect.equals(7, v); - })); - sentEvents.replay(c); - }); - - test("first empty", () { - StreamController c = new StreamController(); - Future f = c.stream.first; - f.catchError(expectAsync((error) { - Expect.isTrue(error is StateError); - })); - Events emptyEvents = new Events()..close(); - emptyEvents.replay(c); - }); - - test("first error", () { - StreamController c = new StreamController(); - Future f = c.stream.first; - f.catchError(expectAsync((error) { - Expect.equals("error", error); - })); - Events errorEvents = new Events() - ..error("error") - ..close(); - errorEvents.replay(c); - }); - - test("first error 2", () { - StreamController c = new StreamController(); - Future f = c.stream.first; - f.catchError(expectAsync((error) { - Expect.equals("error", error); - })); - Events errorEvents = new Events() - ..error("error") - ..error("error2") - ..close(); - errorEvents.replay(c); - }); - - test("last", () { - StreamController c = new StreamController(); - Future f = c.stream.last; - f.then(expectAsync((v) { - Expect.equals(87, v); - })); - sentEvents.replay(c); - }); - - test("last empty", () { - StreamController c = new StreamController(); - Future f = c.stream.last; - f.catchError(expectAsync((error) { - Expect.isTrue(error is StateError); - })); - Events emptyEvents = new Events()..close(); - emptyEvents.replay(c); - }); - - test("last error", () { - StreamController c = new StreamController(); - Future f = c.stream.last; - f.catchError(expectAsync((error) { - Expect.equals("error", error); - })); - Events errorEvents = new Events() - ..error("error") - ..close(); - errorEvents.replay(c); - }); - - test("last error 2", () { - StreamController c = new StreamController(); - Future f = c.stream.last; - f.catchError(expectAsync((error) { - Expect.equals("error", error); - })); - Events errorEvents = new Events() - ..error("error") - ..error("error2") - ..close(); - errorEvents.replay(c); - }); - - test("elementAt", () { - StreamController c = new StreamController(); - Future f = c.stream.elementAt(2); - f.then(expectAsync((v) { - Expect.equals(13, v); - })); - sentEvents.replay(c); - }); - - test("elementAt 2", () { - StreamController c = new StreamController(); - Future f = c.stream.elementAt(20); - f.catchError(expectAsync((error) { - Expect.isTrue(error is RangeError); - })); - sentEvents.replay(c); - }); - - test("drain", () { - StreamController c = new StreamController(); - Future f = c.stream.drain(); - f.then(expectAsync((v) { - Expect.equals(null, v); - })); - sentEvents.replay(c); - }); - - test("drain error", () { - StreamController c = new StreamController(); - Future f = c.stream.drain(); - f.catchError(expectAsync((error) { - Expect.equals("error", error); - })); - Events errorEvents = new Events() - ..error("error") - ..error("error2") - ..close(); - errorEvents.replay(c); - }); -} - -testPause() { - test("pause event-unpause", () { - StreamProtocolTest test = new StreamProtocolTest(); - Completer completer = new Completer(); - test - ..expectListen() - ..expectData(42, () { - test.pause(completer.future); - }) - ..expectPause(() { - completer.complete(null); - }) - ..expectData(43) - ..expectData(44) - ..expectCancel() - ..expectDone(test.terminate); - test.listen(); - test.add(42); - test.add(43); - test.add(44); - test.close(); - }); - - test("pause twice event-unpause", () { - StreamProtocolTest test = new StreamProtocolTest(); - Completer completer = new Completer(); - Completer completer2 = new Completer(); - test - ..expectListen() - ..expectData(42, () { - test.pause(completer.future); - test.pause(completer2.future); - }) - ..expectPause(() { - completer.future.then(completer2.complete); - completer.complete(null); - }) - ..expectData(43) - ..expectData(44) - ..expectCancel() - ..expectDone(test.terminate); - test - ..listen() - ..add(42) - ..add(43) - ..add(44) - ..close(); - }); - - test("pause twice direct-unpause", () { - StreamProtocolTest test = new StreamProtocolTest(); - test - ..expectListen() - ..expectData(42, () { - test.pause(); - test.pause(); - }) - ..expectPause(() { - test.resume(); - test.resume(); - }) - ..expectData(43) - ..expectData(44) - ..expectCancel() - ..expectDone(test.terminate); - test - ..listen() - ..add(42) - ..add(43) - ..add(44) - ..close(); - }); - - test("pause twice direct-event-unpause", () { - StreamProtocolTest test = new StreamProtocolTest(); - Completer completer = new Completer(); - test - ..expectListen() - ..expectData(42, () { - test.pause(); - test.pause(completer.future); - test.add(43); - test.add(44); - test.close(); - }) - ..expectPause(() { - completer.future.then((v) => test.resume()); - completer.complete(null); - }) - ..expectData(43) - ..expectData(44) - ..expectCancel() - ..expectDone(test.terminate); - test - ..listen() - ..add(42); - }); -} - -class TestError { - const TestError(); -} - -testRethrow() { - TestError error = const TestError(); - - testStream(name, streamValueTransform) { - test("rethrow-$name-value", () { - StreamController c = new StreamController(); - Stream s = streamValueTransform(c.stream, (v) { - throw error; - }); - s.listen((_) { - Expect.fail("unexpected value"); - }, onError: expectAsync((e) { - Expect.identical(error, e); - })); - c.add(null); - c.close(); - }); - } - - testStreamError(name, streamErrorTransform) { - test("rethrow-$name-error", () { - StreamController c = new StreamController(); - Stream s = streamErrorTransform(c.stream, (e) { - throw error; - }); - s.listen((_) { - Expect.fail("unexpected value"); - }, onError: expectAsync((e) { - Expect.identical(error, e); - })); - c.addError("SOME ERROR"); - c.close(); - }); - } - - testFuture(name, streamValueTransform) { - test("rethrow-$name-value", () { - StreamController c = new StreamController(); - Future f = streamValueTransform(c.stream, (v) { - throw error; - }); - f.then((v) { - Expect.fail("unreachable"); - }, onError: expectAsync((e) { - Expect.identical(error, e); - })); - // Need two values to trigger compare for reduce. - c.add(0); - c.add(1); - c.close(); - }); - } - - testStream("where", (s, act) => s.where(act)); - testStream("map", (s, act) => s.map(act)); - testStream("expand", (s, act) => s.expand(act)); - testStream("where", (s, act) => s.where(act)); - testStreamError("handleError", (s, act) => s.handleError(act)); - testStreamError("handleTest", (s, act) => s.handleError((v) {}, test: act)); - testFuture("forEach", (s, act) => s.forEach(act)); - testFuture("every", (s, act) => s.every(act)); - testFuture("any", (s, act) => s.any(act)); - testFuture("reduce", (s, act) => s.reduce((a, b) => act(b))); - testFuture("fold", (s, act) => s.fold(0, (a, b) => act(b))); - testFuture("drain", (s, act) => s.drain().then(act)); -} - -void testBroadcastController() { - test("broadcast-controller-basic", () { - StreamProtocolTest test = new StreamProtocolTest.broadcast(); - test - ..expectListen() - ..expectData(42) - ..expectCancel() - ..expectDone(test.terminate); - test - ..listen() - ..add(42) - ..close(); - }); - - test("broadcast-controller-listen-twice", () { - StreamProtocolTest test = new StreamProtocolTest.broadcast(); - test - ..expectListen() - ..expectData(42, () { - test.listen(); - test.add(37); - test.close(); - }) - // Order is not guaranteed between subscriptions if not sync. - ..expectData(37) - ..expectData(37) - ..expectDone() - ..expectCancel() - ..expectDone(test.terminate); - test.listen(); - test.add(42); - }); - - test("broadcast-controller-listen-twice-non-overlap", () { - StreamProtocolTest test = new StreamProtocolTest.broadcast(); - test - ..expectListen(() { - test.add(42); - }) - ..expectData(42, () { - test.cancel(); - }) - ..expectCancel(() { - test.listen(); - }) - ..expectListen(() { - test.add(37); - }) - ..expectData(37, () { - test.close(); - }) - ..expectCancel() - ..expectDone(test.terminate); - test.listen(); - }); - - test("broadcast-controller-individual-pause", () { - StreamProtocolTest test = new StreamProtocolTest.broadcast(); - var sub1; - test - ..expectListen() - ..expectData(42) - ..expectData(42, () { - sub1.pause(); - }) - ..expectData(43, () { - sub1.cancel(); - test.listen(); - test.add(44); - test.expectData(44); - test.expectData(44, test.terminate); - }); - sub1 = test.listen(); - test.listen(); - test.add(42); - test.add(43); - }); - - test("broadcast-controller-add-in-callback", () { - StreamProtocolTest test = new StreamProtocolTest.broadcast(); - test.expectListen(); - var sub = test.listen(); - test.add(42); - sub.expectData(42, () { - test.add(87); - sub.cancel(); - }); - test.expectCancel(() { - test.add(37); - test.terminate(); - }); - }); -} - -void testAsBroadcast() { - test("asBroadcast-not-canceled", () { - StreamProtocolTest test = new StreamProtocolTest.asBroadcast(); - var sub; - test - ..expectListen() - ..expectBroadcastListen((_) { - test.add(42); - }) - ..expectData(42, () { - sub.cancel(); - }) - ..expectBroadcastCancel((_) { - sub = test.listen(); - }) - ..expectBroadcastListen((_) { - test.terminate(); - }); - sub = test.listen(); - }); - - test("asBroadcast-canceled", () { - StreamProtocolTest test = new StreamProtocolTest.asBroadcast(); - var sub; - test - ..expectListen() - ..expectBroadcastListen((_) { - test.add(42); - }) - ..expectData(42, () { - sub.cancel(); - }) - ..expectBroadcastCancel((originalSub) { - originalSub.cancel(); - }) - ..expectCancel(test.terminate); - sub = test.listen(); - }); - - test("asBroadcast-pause-original", () { - StreamProtocolTest test = new StreamProtocolTest.asBroadcast(); - var sub; - test - ..expectListen() - ..expectBroadcastListen((_) { - test.add(42); - test.add(43); - }) - ..expectData(42, () { - sub.cancel(); - }) - ..expectBroadcastCancel((originalSub) { - originalSub.pause(); // Pause before sending 43 from original sub. - }) - ..expectPause(() { - sub = test.listen(); - }) - ..expectBroadcastListen((originalSub) { - originalSub.resume(); - }) - ..expectData(43) - ..expectResume(() { - test.close(); - }) - ..expectCancel() - ..expectDone() - ..expectBroadcastCancel((_) => test.terminate()); - sub = test.listen(); - }); -} - -void testSink({bool sync, bool broadcast, bool asBroadcast}) { - String type = - "${sync ? "S" : "A"}${broadcast ? "B" : "S"}${asBroadcast ? "aB" : ""}"; - test("$type-controller-sink", () { - var done = expectAsync(() {}); - var c = broadcast - ? new StreamController.broadcast(sync: sync) - : new StreamController(sync: sync); - var expected = new Events() - ..add(42) - ..error("error") - ..add(1) - ..add(2) - ..add(3) - ..add(4) - ..add(5) - ..add(43) - ..close(); - var actual = new Events.capture( - asBroadcast ? c.stream.asBroadcastStream() : c.stream); - var sink = c.sink; - sink.add(42); - sink.addError("error"); - sink.addStream(new Stream.fromIterable([1, 2, 3, 4, 5])).then((_) { - sink.add(43); - return sink.close(); - }).then((_) { - Expect.listEquals(expected.events, actual.events); - done(); - }); - }); - - test("$type-controller-sink-canceled", () { - var done = expectAsync(() {}); - var c = broadcast - ? new StreamController.broadcast(sync: sync) - : new StreamController(sync: sync); - var expected = new Events() - ..add(42) - ..error("error") - ..add(1) - ..add(2) - ..add(3); - var stream = asBroadcast ? c.stream.asBroadcastStream() : c.stream; - var actual = new Events(); - var sub; - // Cancel subscription after receiving "3" event. - sub = stream.listen((v) { - if (v == 3) sub.cancel(); - actual.add(v); - }, onError: actual.error); - var sink = c.sink; - sink.add(42); - sink.addError("error"); - sink.addStream(new Stream.fromIterable([1, 2, 3, 4, 5])).then((_) { - Expect.listEquals(expected.events, actual.events); - // Close controller as well. It has no listener. If it is a broadcast - // stream, it will still be open, and we read the "done" future before - // closing. A normal stream is already done when its listener cancels. - Future doneFuture = sink.done; - sink.close(); - return doneFuture; - }).then((_) { - // No change in events. - Expect.listEquals(expected.events, actual.events); - done(); - }); - }); - - test("$type-controller-sink-paused", () { - var done = expectAsync(() {}); - var c = broadcast - ? new StreamController.broadcast(sync: sync) - : new StreamController(sync: sync); - var expected = new Events() - ..add(42) - ..error("error") - ..add(1) - ..add(2) - ..add(3) - ..add(4) - ..add(5) - ..add(43) - ..close(); - var stream = asBroadcast ? c.stream.asBroadcastStream() : c.stream; - var actual = new Events(); - var sub; - var pauseIsDone = false; - sub = stream.listen((v) { - if (v == 3) { - sub.pause(new Future.delayed(const Duration(milliseconds: 15), () { - pauseIsDone = true; - })); - } - actual.add(v); - }, onError: actual.error, onDone: actual.close); - var sink = c.sink; - sink.add(42); - sink.addError("error"); - sink.addStream(new Stream.fromIterable([1, 2, 3, 4, 5])).then((_) { - sink.add(43); - return sink.close(); - }).then((_) { - if (asBroadcast || broadcast) { - // The done-future of the sink completes when it passes - // the done event to the asBroadcastStream controller, which is - // before the final listener gets the event. - // Wait for the done event to be *delivered* before testing the - // events. - actual.onDone(() { - Expect.listEquals(expected.events, actual.events); - done(); - }); - } else { - Expect.listEquals(expected.events, actual.events); - done(); - } - }); - }); - - test("$type-controller-addstream-error-stop", () { - // Check that addStream defaults to ending after the first error. - var done = expectAsync(() {}); - StreamController c = broadcast - ? new StreamController.broadcast(sync: sync) - : new StreamController(sync: sync); - Stream stream = asBroadcast ? c.stream.asBroadcastStream() : c.stream; - var actual = new Events.capture(stream); - - var source = new Events(); - source - ..add(1) - ..add(2) - ..error("BAD") - ..add(3) - ..error("FAIL") - ..close(); - - var expected = new Events() - ..add(1) - ..add(2) - ..error("BAD") - ..close(); - StreamController sourceController = new StreamController(); - c.addStream(sourceController.stream, cancelOnError: true).then((_) { - c.close().then((_) { - Expect.listEquals(expected.events, actual.events); - done(); - }); - }); - - source.replay(sourceController); - }); - - test("$type-controller-addstream-error-forward", () { - // Check that addStream with cancelOnError:false passes all data and errors - // to the controller. - var done = expectAsync(() {}); - StreamController c = broadcast - ? new StreamController.broadcast(sync: sync) - : new StreamController(sync: sync); - Stream stream = asBroadcast ? c.stream.asBroadcastStream() : c.stream; - var actual = new Events.capture(stream); - - var source = new Events(); - source - ..add(1) - ..add(2) - ..addError("BAD") - ..add(3) - ..addError("FAIL") - ..close(); - - StreamController sourceController = new StreamController(); - c.addStream(sourceController.stream).then((_) { - c.close().then((_) { - Expect.listEquals(source.events, actual.events); - done(); - }); - }); - - source.replay(sourceController); - }); - - test("$type-controller-addstream-twice", () { - // Using addStream twice on the same stream - var done = expectAsync(() {}); - StreamController c = broadcast - ? new StreamController.broadcast(sync: sync) - : new StreamController(sync: sync); - Stream stream = asBroadcast ? c.stream.asBroadcastStream() : c.stream; - var actual = new Events.capture(stream); - - // Streams of five events, throws on 3. - Stream s1 = new Stream.fromIterable([1, 2, 3, 4, 5]) - .map((x) => (x == 3 ? throw x : x)); - Stream s2 = new Stream.fromIterable([1, 2, 3, 4, 5]) - .map((x) => (x == 3 ? throw x : x)); - - Events expected = new Events(); - expected - ..add(1) - ..add(2) - ..error(3); - expected - ..add(1) - ..add(2) - ..error(3) - ..add(4) - ..add(5); - expected..close(); - - c.addStream(s1, cancelOnError: true).then((_) { - c.addStream(s2, cancelOnError: false).then((_) { - c.close().then((_) { - Expect.listEquals(expected.events, actual.events); - done(); - }); - }); - }); - }); -} - -main() { - testController(); - testSingleController(); - testExtraMethods(); - testPause(); - testRethrow(); - testBroadcastController(); - testAsBroadcast(); - testSink(sync: true, broadcast: false, asBroadcast: false); - testSink(sync: true, broadcast: false, asBroadcast: true); - testSink(sync: true, broadcast: true, asBroadcast: false); - testSink(sync: false, broadcast: false, asBroadcast: false); - testSink(sync: false, broadcast: false, asBroadcast: true); - testSink(sync: false, broadcast: true, asBroadcast: false); -} diff --git a/tests/lib_2/async/stream_controller_test.dart b/tests/lib_2/async/stream_controller_test.dart deleted file mode 100644 index a644be39925..00000000000 --- a/tests/lib_2/async/stream_controller_test.dart +++ /dev/null @@ -1,1139 +0,0 @@ -// 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 - -// Test the basic StreamController and StreamController.singleSubscription. -library stream_controller_test; - -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; -import 'dart:async'; -import 'event_helper.dart'; - -const MS = const Duration(milliseconds: 1); - -fail(e) { - Expect.fail("Unexepected error: $e"); -} - -void testMultiController() { - // Test normal flow. - { - var c = new StreamController(sync: true); - Events expectedEvents = new Events() - ..add(42) - ..add("dibs") - ..error("error!") - ..error("error too!") - ..close(); - CaptureEvents actualEvents = - new Events.capture(c.stream.asBroadcastStream()); - expectedEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - } - - // Test automatic unsubscription on error. - { - var c = new StreamController(sync: true); - var expectedEvents = new Events() - ..add(42) - ..error("error"); - var actualEvents = - new Events.capture(c.stream.asBroadcastStream(), cancelOnError: true); - Events sentEvents = new Events() - ..add(42) - ..error("error") - ..add("Are you there?"); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - } - - // Test manual unsubscription. - { - var c = new StreamController(sync: true); - var expectedEvents = new Events() - ..add(42) - ..error("error") - ..add(37); - dynamic actualEvents = - new Events.capture(c.stream.asBroadcastStream(), cancelOnError: false); - expectedEvents.replay(c); - actualEvents.subscription.cancel(); - c.add("Are you there"); // Not sent to actualEvents. - Expect.listEquals(expectedEvents.events, actualEvents.events); - } - - // Test filter. - { - var c = new StreamController(sync: true); - var expectedEvents = new Events() - ..add("a string") - ..add("another string") - ..close(); - var sentEvents = new Events() - ..add("a string") - ..add(42) - ..add("another string") - ..close(); - var actualEvents = new Events.capture( - c.stream.asBroadcastStream().where((v) => v is String)); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - } - - // Test map. - { - var c = new StreamController(sync: true); - var expectedEvents = new Events() - ..add("abab") - ..error("error") - ..close(); - var sentEvents = new Events() - ..add("ab") - ..error("error") - ..close(); - var actualEvents = - new Events.capture(c.stream.asBroadcastStream().map((v) => "$v$v")); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - } - - // Test handleError. - { - var c = new StreamController(sync: true); - var expectedEvents = new Events() - ..add("ab") - ..error("[foo]"); - var sentEvents = new Events() - ..add("ab") - ..error("foo") - ..add("ab") - ..close(); - var actualEvents = new Events.capture( - c.stream.asBroadcastStream().handleError((error) { - if (error is String) { - // TODO(floitsch): this test originally changed the stacktrace. - throw "[${error}]"; - } - }), - cancelOnError: true); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - } - - // reduce is tested asynchronously and therefore not in this file. - - // Test expand - { - var c = new StreamController(sync: true); - var sentEvents = new Events() - ..add(3) - ..add(2) - ..add(4) - ..close(); - var expectedEvents = new Events() - ..add(1) - ..add(2) - ..add(3) - ..add(1) - ..add(2) - ..add(1) - ..add(2) - ..add(3) - ..add(4) - ..close(); - var actualEvents = - new Events.capture(c.stream.asBroadcastStream().expand((v) { - var l = []; - for (int i = 0; i < v; i++) l.add(i + 1); - return l; - })); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - } - - // Test transform. - { - var c = new StreamController(sync: true); - var sentEvents = new Events() - ..add("a") - ..error(42) - ..add("b") - ..close(); - var expectedEvents = new Events() - ..error("a") - ..add(42) - ..error("b") - ..add("foo") - ..close(); - var actualEvents = new Events.capture(c.stream - .asBroadcastStream() - .transform(new StreamTransformer.fromHandlers(handleData: (v, s) { - s.addError(v); - }, handleError: (e, st, s) { - s.add(e); - }, handleDone: (s) { - s.add("foo"); - s.close(); - }))); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - } - - // Test multiple filters. - { - var c = new StreamController(sync: true); - var sentEvents = new Events() - ..add(42) - ..add("snugglefluffy") - ..add(7) - ..add("42") - ..error("not FormatException") // Unsubscribes. - ..close(); - var expectedEvents = new Events() - ..add(42) - ..error("not FormatException"); - var actualEvents = new Events.capture( - c.stream - .asBroadcastStream() - .where((v) => v is String) - .map((v) => int.parse(v)) - .handleError((error) { - if (error is! FormatException) throw error; - }).where((v) => v > 10), - cancelOnError: true); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - } - - // Test subscription changes while firing. - { - var c = new StreamController(sync: true); - var sink = c.sink; - var stream = c.stream.asBroadcastStream(); - var counter = 0; - var subscription = stream.listen(null); - subscription.onData((data) { - counter += data; - subscription.cancel(); - stream.listen((data) { - counter += 10 * data; - }); - var subscription2 = stream.listen(null); - subscription2.onData((data) { - counter += 100 * data; - if (data == 4) subscription2.cancel(); - }); - }); - sink.add(1); // seen by stream 1 - sink.add(2); // seen by stream 10 and 100 - sink.add(3); // -"- - sink.add(4); // -"- - sink.add(5); // seen by stream 10 - Expect.equals(1 + 20 + 200 + 30 + 300 + 40 + 400 + 50, counter); - } -} - -testSingleController() { - // Test normal flow. - { - var c = new StreamController(sync: true); - Events expectedEvents = new Events() - ..add(42) - ..add("dibs") - ..error("error!") - ..error("error too!") - ..close(); - CaptureEvents actualEvents = new Events.capture(c.stream); - expectedEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - } - - // Test automatic unsubscription on error. - { - var c = new StreamController(sync: true); - var expectedEvents = new Events() - ..add(42) - ..error("error"); - var actualEvents = new Events.capture(c.stream, cancelOnError: true); - Events sentEvents = new Events() - ..add(42) - ..error("error") - ..add("Are you there?"); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - } - - // Test manual unsubscription. - { - var c = new StreamController(sync: true); - var expectedEvents = new Events() - ..add(42) - ..error("error") - ..add(37); - dynamic actualEvents = new Events.capture(c.stream, cancelOnError: false); - expectedEvents.replay(c); - actualEvents.subscription.cancel(); - c.add("Are you there"); // Not sent to actualEvents. - Expect.listEquals(expectedEvents.events, actualEvents.events); - } - - // Test filter. - { - var c = new StreamController(sync: true); - var expectedEvents = new Events() - ..add("a string") - ..add("another string") - ..close(); - var sentEvents = new Events() - ..add("a string") - ..add(42) - ..add("another string") - ..close(); - var actualEvents = new Events.capture(c.stream.where((v) => v is String)); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - } - - // Test map. - { - var c = new StreamController(sync: true); - var expectedEvents = new Events() - ..add("abab") - ..error("error") - ..close(); - var sentEvents = new Events() - ..add("ab") - ..error("error") - ..close(); - var actualEvents = new Events.capture(c.stream.map((v) => "$v$v")); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - } - - // Test handleError. - { - var c = new StreamController(sync: true); - var expectedEvents = new Events() - ..add("ab") - ..error("[foo]"); - var sentEvents = new Events() - ..add("ab") - ..error("foo") - ..add("ab") - ..close(); - var actualEvents = new Events.capture(c.stream.handleError((error) { - if (error is String) { - // TODO(floitsch): this error originally changed the stack trace. - throw "[${error}]"; - } - }), cancelOnError: true); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - } - - // reduce is tested asynchronously and therefore not in this file. - - // Test expand - { - var c = new StreamController(sync: true); - var sentEvents = new Events() - ..add(3) - ..add(2) - ..add(4) - ..close(); - var expectedEvents = new Events() - ..add(1) - ..add(2) - ..add(3) - ..add(1) - ..add(2) - ..add(1) - ..add(2) - ..add(3) - ..add(4) - ..close(); - var actualEvents = new Events.capture(c.stream.expand((v) { - var l = []; - for (int i = 0; i < v; i++) l.add(i + 1); - return l; - })); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - } - - // test contains. - { - var c = new StreamController(sync: true); - // Error after match is not important. - var sentEvents = new Events() - ..add("a") - ..add("x") - ..error("FAIL") - ..close(); - Future contains = c.stream.contains("x"); - contains.then((var c) { - Expect.isTrue(c); - }); - sentEvents.replay(c); - } - - { - var c = new StreamController(sync: true); - // Not matching is ok. - var sentEvents = new Events() - ..add("a") - ..add("x") - ..add("b") - ..close(); - Future contains = c.stream.contains("y"); - contains.then((var c) { - Expect.isFalse(c); - }); - sentEvents.replay(c); - } - - { - var c = new StreamController(sync: true); - // Error before match makes future err. - var sentEvents = new Events() - ..add("a") - ..error("FAIL") - ..add("b") - ..close(); - Future contains = c.stream.contains("b"); - contains.then((var c) { - Expect.fail("no value expected"); - }).catchError((error) { - Expect.equals("FAIL", error); - }); - sentEvents.replay(c); - } - - // Test transform. - { - var c = new StreamController(sync: true); - var sentEvents = new Events() - ..add("a") - ..error(42) - ..add("b") - ..close(); - var expectedEvents = new Events() - ..error("a") - ..add(42) - ..error("b") - ..add("foo") - ..close(); - var actualEvents = new Events.capture(c.stream - .transform(new StreamTransformer.fromHandlers(handleData: (v, s) { - s.addError(v); - }, handleError: (e, st, s) { - s.add(e); - }, handleDone: (s) { - s.add("foo"); - s.close(); - }))); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - } - - // Test multiple filters. - { - var c = new StreamController(sync: true); - var sentEvents = new Events() - ..add(42) - ..add("snugglefluffy") - ..add(7) - ..add("42") - ..error("not FormatException") // Unsubscribes. - ..close(); - var expectedEvents = new Events() - ..add(42) - ..error("not FormatException"); - var actualEvents = new Events.capture( - c.stream - .where((v) => v is String) - .map((v) => int.parse(v)) - .handleError((error) { - if (error is! FormatException) throw error; - }).where((v) => v > 10), - cancelOnError: true); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - } - - // Test that only one subscription is allowed. - { - var c = new StreamController(sync: true); - var sink = c.sink; - var stream = c.stream; - var counter = 0; - var subscription = stream.listen((data) { - counter += data; - }); - Expect.throwsStateError(() => stream.listen(null)); - sink.add(1); - Expect.equals(1, counter); - c.close(); - } -} - -testExtraMethods() { - Events sentEvents = new Events() - ..add(1) - ..add(2) - ..add(3) - ..close(); - - var c = new StreamController(sync: true); - Events expectedEvents = new Events() - ..add(3) - ..close(); - Events actualEvents = new Events.capture(c.stream.skip(2)); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - - c = new StreamController(sync: true); - expectedEvents = new Events()..close(); - actualEvents = new Events.capture(c.stream.skip(3)); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - - c = new StreamController(sync: true); - expectedEvents = new Events()..close(); - actualEvents = new Events.capture(c.stream.skip(7)); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - - c = new StreamController(sync: true); - expectedEvents = sentEvents; - actualEvents = new Events.capture(c.stream.skip(0)); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - - c = new StreamController(sync: true); - expectedEvents = new Events() - ..add(3) - ..close(); - actualEvents = new Events.capture(c.stream.skipWhile((x) => x <= 2)); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - - c = new StreamController(sync: true); - expectedEvents = new Events() - ..add(2) - ..add(3) - ..close(); - actualEvents = new Events.capture(c.stream.skipWhile((x) => x <= 1)); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - - c = new StreamController(sync: true); - expectedEvents = new Events() - ..add(1) - ..add(2) - ..add(3) - ..close(); - actualEvents = new Events.capture(c.stream.skipWhile((x) => false)); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - - c = new StreamController(sync: true); - expectedEvents = new Events() - ..add(1) - ..add(2) - ..close(); - actualEvents = new Events.capture(c.stream.take(2)); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - - c = new StreamController(sync: true); - expectedEvents = new Events() - ..add(1) - ..add(2) - ..close(); - actualEvents = new Events.capture(c.stream.takeWhile((x) => x <= 2)); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - - c = new StreamController(sync: true); - sentEvents = new Events() - ..add(1) - ..add(1) - ..add(2) - ..add(1) - ..add(2) - ..add(2) - ..add(2) - ..close(); - expectedEvents = new Events() - ..add(1) - ..add(2) - ..add(1) - ..add(2) - ..close(); - actualEvents = new Events.capture(c.stream.distinct()); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); - - c = new StreamController(sync: true); - sentEvents = new Events() - ..add(5) - ..add(6) - ..add(4) - ..add(6) - ..add(8) - ..add(3) - ..add(4) - ..add(1) - ..close(); - expectedEvents = new Events() - ..add(5) - ..add(4) - ..add(3) - ..add(1) - ..close(); - // Use 'distinct' as a filter with access to the previously emitted event. - actualEvents = new Events.capture(c.stream.distinct((a, b) => a < b)); - sentEvents.replay(c); - Expect.listEquals(expectedEvents.events, actualEvents.events); -} - -void testClosed() { - StreamController c = new StreamController(sync: true); - Expect.isFalse(c.isClosed); - c.add(42); - Expect.isFalse(c.isClosed); - c.addError("bad"); - Expect.isFalse(c.isClosed); - c.close(); - Expect.isTrue(c.isClosed); -} - -void testCloseFuture() { - asyncStart(); - asyncStart(); - var c = new StreamController(); - var f = c.close(); - Expect.isTrue(c.isClosed); - bool doneSeen = false; - f.then((_) { - Expect.isTrue(doneSeen); - asyncEnd(); - }); - // Only listen after a while. - new Timer(MS * 250, () { - c.stream.listen(null, onDone: () { - asyncEnd(); - doneSeen = true; - }); - }); -} - -void testCloseFuture2() { - asyncStart(); - asyncStart(); - var c = new StreamController.broadcast(); - var f = c.close(); - Expect.isTrue(c.isClosed); - bool doneSeen = false; - f.then((_) { - // Done future on broadcast stream can happen - // before a listener is added. - Expect.isFalse(doneSeen); - asyncEnd(); - }); - // Only listen after a while. - new Timer(MS * 250, () { - c.stream.listen(null, onDone: () { - doneSeen = true; - asyncEnd(); - }); - }); -} - -void testCloseFuture3() { - asyncStart(); - var c = new StreamController.broadcast(); - c..add(1)..add(2)..add(3)..add(4); - c.stream.listen(null).cancel(); - var f = c.close(); - Expect.isTrue(c.isClosed); - f.then((_) { - asyncEnd(); - }); -} - -void testStreamEquals() { - StreamController c; - c = new StreamController(sync: false); - Expect.equals(c.stream, c.stream); - c = new StreamController(sync: true); - Expect.equals(c.stream, c.stream); - c = new StreamController(sync: false, onListen: () {}); - Expect.equals(c.stream, c.stream); - c = new StreamController(sync: true, onListen: () {}); - Expect.equals(c.stream, c.stream); - c = new StreamController.broadcast(sync: false); - Expect.equals(c.stream, c.stream); - c = new StreamController.broadcast(sync: true); - Expect.equals(c.stream, c.stream); - c = new StreamController.broadcast(sync: false, onListen: () {}); - Expect.equals(c.stream, c.stream); - c = new StreamController.broadcast(sync: true, onListen: () {}); - Expect.equals(c.stream, c.stream); -} - -void testCancelThrow() { - asyncStart(); - asyncStart(); - asyncStart(); - StreamController c = new StreamController(onCancel: () { - asyncEnd(); - throw "ERROR"; - }); - c.add(1); - c.add(2); - c.add(3); - Future done = c.close(); - StreamSubscription sub; - sub = c.stream.listen((v) { - Expect.equals(1, v); - Future f = sub.cancel(); - f.catchError((e) { - // Must complete with error from onCancel. - Expect.equals("ERROR", e); - asyncEnd(); - }); - }); - done.catchError(fail).whenComplete(asyncEnd); // Must complete without error. -} - -void testCancelThrow2() { - asyncStart(); - asyncStart(); - asyncStart(); - asyncStart(); - asyncStart(); - StreamController c2 = new StreamController(onCancel: () { - asyncEnd(); - throw "ERROR"; - }); - c2.add(1); - c2.add(2); - Future done2 = c2.close(); - done2.catchError(fail).whenComplete(asyncEnd); // Should not get error; - - StreamController c = new StreamController(); - var sub; - sub = c.stream.listen((v) { - Expect.equals(1, v); - Future f = sub.cancel(); - f.catchError((e) { - // Error from addStream stream's cancel must go only here. - asyncEnd(); - Expect.equals("ERROR", e); - }); - }); - var addDone = c.addStream(c2.stream); - addDone.catchError(fail).whenComplete(asyncEnd); // Should not get error. - var done = c.done; - done.catchError(fail).whenComplete(asyncEnd); // Should not get error. -} - -void testCancelThrow3() { - asyncStart(); - asyncStart(); - asyncStart(); - asyncStart(); - asyncStart(); - asyncStart(); - StreamController c2 = new StreamController(onCancel: () { - asyncEnd(); - throw "ERROR2"; - }); - c2.add(1); - c2.add(2); - var done2 = c2.close(); - done2.catchError(fail).whenComplete(asyncEnd); // Should not get error; - - StreamController c = new StreamController(onCancel: () { - asyncEnd(); - throw "ERROR1"; - }); - var sub; - sub = c.stream.listen((v) { - Expect.equals(1, v); - Future f = sub.cancel(); - f.catchError((e) { - // Only the last error ends up here. - Expect.equals("ERROR1", e); - asyncEnd(); - }); - }); - var addDone = c.addStream(c2.stream); - addDone.catchError(fail).whenComplete(asyncEnd); // Error must not go here. - c.done.catchError(fail).whenComplete(asyncEnd); // Error must not go here. -} - -void testBroadcastListenAfterClose() { - asyncStart(); - StreamController c = new StreamController.broadcast(); - var f = c.close(); - f.then((_) { - // Listening after close is allowed. The listener gets a done event. - c.stream.listen(null, onDone: asyncEnd); - }); -} - -void testBroadcastListenAfterClosePaused() { - asyncStart(); - StreamController c = new StreamController.broadcast(); - var f = c.close(); - f.then((_) { - // Listening after close is allowed. The listener gets a done event. - var sub = c.stream.listen(null, onDone: () { - Expect.fail("wrong done"); - }); - sub.pause(); - sub.pause(); - new Timer(MS * 100, () { - sub.asFuture().whenComplete(() { - Expect.fail("Bad complete"); - }); - sub.resume(); - new Timer(MS * 100, () { - sub.onDone(asyncEnd); - sub.resume(); - }); - }); - }); -} - -void testAsBroadcastListenAfterClose() { - asyncStart(); - asyncStart(); - StreamController c = new StreamController(); - Stream s = c.stream.asBroadcastStream(); - s.listen(null, onDone: asyncEnd); - var f = c.close(); - f.then((_) { - // Listening after close is allowed. The listener gets a done event. - s.listen(null, onDone: asyncEnd); - }); -} - -void testAsBroadcastListenAfterClosePaused() { - asyncStart(); - asyncStart(); - StreamController c = new StreamController(); - Stream s = c.stream.asBroadcastStream(); - s.listen(null, onDone: asyncEnd); - var f = c.close(); - f.then((_) { - // Listening after close is allowed. The listener gets a done event. - var sub = s.listen(null, onDone: () { - Expect.fail("wrong done"); - }); - sub.pause(); - sub.pause(); - new Timer(MS * 100, () { - sub.asFuture().whenComplete(() { - Expect.fail("Bad complete"); - }); - sub.resume(); - new Timer(MS * 100, () { - sub.onDone(asyncEnd); - sub.resume(); - }); - }); - }); -} - -void testEventInListen() { - asyncStart(); - // Regression test for http://dartbug.com/19722 - var c; - void send() { - c.add(1); - } - - int i = 1; - c = new StreamController.broadcast(onListen: send, sync: true); - c.stream.listen((v) { - Expect.equals(i++, v); - }, onDone: asyncEnd); - c.add(2); - c.close(); -} - -void testSyncControllerNotReentrant() { - Stream emptyStream = (new StreamController.broadcast()..close()).stream; - asyncStart(); - for (int listenerCount = 1; listenerCount <= 2; listenerCount++) { - StreamController c = new StreamController.broadcast(sync: true); - for (int i = 0; i < listenerCount; i++) { - asyncStart(); - asyncStart(); - c.stream.listen((v) { - Expect.equals(42, v); - Expect.throws(() { - c.add(37); - }); - Expect.throws(() { - c.addError(37); - }); - Expect.throws(() { - c.addStream(emptyStream); - }); - Expect.throws(() { - c.close(); - }); - asyncEnd(); - }, onError: (e, s) { - Expect.equals(87, e); - Expect.throws(() { - c.add(37); - }); - Expect.throws(() { - c.addError(37); - }); - Expect.throws(() { - c.addStream(emptyStream); - }); - Expect.throws(() { - c.close(); - }); - asyncEnd(); - }); - } - c.add(42); - c.addError(87); - } - asyncEnd(); -} - -void testSettingCallbacks() { - const int initial = 0; - const int running = 1; - const int paused = 2; - const int canceled = 3; - - var controller = new StreamController(); - var stream = controller.stream; - var state = initial; - - var onListen = () { - state = running; - }; - var onPause = () { - state = paused; - }; - var onResume = () { - state = running; - }; - var onCancel = () { - state = canceled; - }; - - Expect.isNull(controller.onListen); - Expect.isNull(controller.onPause); - Expect.isNull(controller.onResume); - Expect.isNull(controller.onCancel); - - controller - ..onListen = onListen - ..onPause = onPause - ..onResume = onResume - ..onCancel = onCancel; - - Expect.equals(onListen, controller.onListen); - Expect.equals(onPause, controller.onPause); - Expect.equals(onResume, controller.onResume); - Expect.equals(onCancel, controller.onCancel); - - Expect.equals(initial, state); - var sub = stream.listen(null); - Expect.equals(running, state); - sub.pause(); - Expect.equals(paused, state); - Expect.isTrue(controller.isPaused); - sub.resume(); - Expect.equals(running, state); - Expect.isFalse(controller.isPaused); - - var onListen2 = () { - state = -running; - }; - var onPause2 = () { - state = -paused; - }; - var onResume2 = () { - state = -running; - }; - var onCancel2 = () { - state = -canceled; - }; - // Changing them later does make a difference. - controller - ..onListen = onListen2 - ..onPause = onPause2 - ..onResume = onResume2 - ..onCancel = onCancel2; - - Expect.equals(onListen2, controller.onListen); - Expect.equals(onPause2, controller.onPause); - Expect.equals(onResume2, controller.onResume); - Expect.equals(onCancel2, controller.onCancel); - - Expect.equals(running, state); - sub.pause(); - Expect.equals(-paused, state); - Expect.isTrue(controller.isPaused); - sub.resume(); - Expect.equals(-running, state); - Expect.isFalse(controller.isPaused); - sub.cancel(); - Expect.equals(-canceled, state); -} - -void testSettingNullCallbacks() { - failCallback() => fail("Callback should not be called"); - var controller = new StreamController( - onListen: failCallback, - onPause: failCallback, - onResume: failCallback, - onCancel: failCallback); - - var stream = controller.stream; - - Expect.isFalse(controller.hasListener); - Expect.isTrue(controller.isPaused); - - Expect.isNotNull(controller.onListen); - controller.onListen = null; - Expect.isNull(controller.onListen); - - var sub = stream.listen(null); - - Expect.isTrue(controller.hasListener); - Expect.isFalse(controller.isPaused); - - Expect.isNotNull(controller.onPause); - controller.onPause = null; - Expect.isNull(controller.onPause); - - sub.pause(); - - Expect.isTrue(controller.hasListener); - Expect.isTrue(controller.isPaused); - - Expect.isNotNull(controller.onResume); - controller.onResume = null; - Expect.isNull(controller.onResume); - - sub.resume(); - - Expect.isTrue(controller.hasListener); - Expect.isFalse(controller.isPaused); - - Expect.isNotNull(controller.onCancel); - controller.onCancel = null; - Expect.isNull(controller.onCancel); - - sub.cancel(); - - Expect.isFalse(controller.hasListener); - Expect.isFalse(controller.isPaused); -} - -void testBroadcastSettingCallbacks() { - const int initial = 0; - const int running = 1; - const int canceled = 2; - - var controller = new StreamController.broadcast(); - var stream = controller.stream; - var state = initial; - - Expect.throwsUnsupportedError(() => controller.onPause = () {}); - Expect.throwsUnsupportedError(() => controller.onResume = () {}); - - controller - ..onListen = () { - state = running; - } - ..onCancel = () { - state = canceled; - }; - - Expect.equals(initial, state); - var sub = stream.listen(null); - Expect.equals(running, state); - sub.cancel(); - Expect.equals(canceled, state); - - // Changing them later does make a difference. - controller - ..onListen = () { - state = -running; - } - ..onCancel = () { - state = -canceled; - }; - - var sub2 = stream.listen(null); - Expect.equals(-running, state); - sub2.cancel(); - Expect.equals(-canceled, state); -} - -void testBroadcastSettingNullCallbacks() { - failCallback() => fail("Callback should not be called"); - var controller = new StreamController.broadcast( - onListen: failCallback, onCancel: failCallback); - - var stream = controller.stream; - - Expect.isFalse(controller.hasListener); - - controller.onListen = null; - - var sub = stream.listen(null); - - Expect.isTrue(controller.hasListener); - - controller.onCancel = null; - - sub.cancel(); - - Expect.isFalse(controller.hasListener); -} - -main() { - asyncStart(); - testMultiController(); - testSingleController(); - testExtraMethods(); - testClosed(); - testCloseFuture(); - testCloseFuture2(); - testCloseFuture3(); - testStreamEquals(); - testCancelThrow(); - testCancelThrow2(); - testCancelThrow3(); - testBroadcastListenAfterClose(); - testBroadcastListenAfterClosePaused(); - testAsBroadcastListenAfterClose(); - testAsBroadcastListenAfterClosePaused(); - testEventInListen(); - testSyncControllerNotReentrant(); - testSettingCallbacks(); - testSettingNullCallbacks(); - testBroadcastSettingCallbacks(); - testBroadcastSettingNullCallbacks(); - asyncEnd(); -} diff --git a/tests/lib_2/async/stream_distinct_test.dart b/tests/lib_2/async/stream_distinct_test.dart deleted file mode 100644 index 03a06650c2d..00000000000 --- a/tests/lib_2/async/stream_distinct_test.dart +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) 2017, 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 - -import 'dart:async'; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -class A { - const A(); -} - -class B extends A { - const B(); -} - -main() { - asyncStart(); - // Correct behavior. - for (var eq in [null, (a, b) => a == b]) { - checkStream(mkSingleStream, eq, "single"); - checkBroadcastStream(mkBroadcastStream, eq, "broadcast"); - checkBroadcastStream( - () => mkSingleStream().asBroadcastStream(), eq, "asBroadcast"); - } - - // Regression test. Multiple listens on the same broadcast distinct stream. - var stream = mkBroadcastStream().distinct(); - expectStream(stream, [1, 2, 3, 2], "broadcast.distinct#1"); - expectStream(stream, [1, 2, 3, 2], "broadcast.distinct#2"); - - // Doesn't ignore equality. - expectStream( - new Stream.fromIterable([1, 2, 1, 3, 3]).distinct((a, b) => false), - [1, 2, 1, 3, 3], - "kFalse"); - expectStream( - new Stream.fromIterable([1, 2, 1, 3, 3]).distinct((a, b) => true), - [1], - "kTrue"); - expectStream( - new Stream.fromIterable([1, 2, 1, 3, 3]).distinct((a, b) => a != b), - [1, 1], - "neq"); - expectStream( - new Stream.fromIterable([1, 2, 1, 3, 3]).distinct((a, b) => 2 == b), - [1, 1, 3, 3], - "is2"); - // Forwards errors as errors. - expectStream( - new Stream.fromIterable([1, "E1", 2, "E2", 2, 3]) - .map((v) => (v is String) ? (throw v) : v) // Make strings errors. - .distinct() - .transform(reifyErrors), - [1, "[E1]", 2, "[E2]", 3], - "errors"); - // Equality throwing acts like error. - expectStream( - new Stream.fromIterable([1, "E1", 1, 2, "E2", 3]) - .distinct((a, b) => (b is String) ? (throw b) : (a == b)) - .transform(reifyErrors), - [1, "[E1]", 2, "[E2]", 3], - "eq-throws"); - // Operator== throwing acts like error. - expectStream( - new Stream.fromIterable([1, 1, 2, 2, 1, 3]) - .map((v) => new T(v)) - .distinct() - .transform(reifyErrors.cast()) - .map((v) => v is T ? v.value : "$v"), - [1, "[2]", "[2]", 3], - "==-throws"); - asyncEnd(); -} - -checkStream(mkStream, eq, name) { - expectStream(mkStream().distinct(eq), [1, 2, 3, 2], "$name.distinct"); - expectStream(mkStream().expand((e) => [e, e]).distinct(eq), [1, 2, 3, 2], - "$name.expand.distinct"); - expectStream(mkStream().where((x) => x != 3).distinct(eq), [1, 2], - "$name.where.distinct"); -} - -checkBroadcastStream(mkStream, eq, name) { - var stream = mkStream(); - // Run all the tests, multiple times each. - checkStream(() => stream, eq, "$name#1"); - checkStream(() => stream, eq, "$name#2"); -} - -mkSingleStream() async* { - yield 1; - yield 2; - yield 3; - yield 2; -} - -mkBroadcastStream() { - var c = new StreamController.broadcast(); - c.onListen = () { - c.addStream(mkSingleStream()).whenComplete(c.close); - }; - return c.stream; -} - -expectStream(stream, list, [name]) { - asyncStart(); - return stream.toList().then((events) { - Expect.listEquals(list, events, name); - asyncEnd(); - }); -} - -// Class where operator== throws. -class T { - final int value; - T(this.value); - int get hashCode => value.hashCode; - bool operator ==(Object other) => - other is T && ((other.value == 2) ? throw 2 : (value == other.value)); -} - -StreamTransformer reifyErrors = - new StreamTransformer.fromHandlers(handleError: (e, s, sink) { - sink.add("[$e]"); -}); diff --git a/tests/lib_2/async/stream_empty_test.dart b/tests/lib_2/async/stream_empty_test.dart deleted file mode 100644 index 8390d0f2b03..00000000000 --- a/tests/lib_2/async/stream_empty_test.dart +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) 2015, 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 - -// Test empty stream. -import "package:expect/expect.dart"; -import "dart:async"; -import 'package:async_helper/async_helper.dart'; - -main() async { - await asyncTest(() async { - // Is a `const` constructor. - // Can be called with optional boolean to say whether broadcast or not. - await asyncTest(() => emptyTest(const Stream.empty(), true)); - await asyncTest( - () => emptyTest(const Stream.empty(broadcast: true), true)); - await asyncTest( - () => emptyTest(const Stream.empty(broadcast: false), false)); - - // Check that the behavior is consistent with other empty multi-subscription - // streams. - await asyncTest(() => emptyTest(Stream.fromIterable([]), false)); - await asyncTest(() => - emptyTest((StreamController.broadcast()..close()).stream, true)); - await asyncTest( - () => emptyTest(Stream.multi((c) => c.close()), false)); - }); - await flushMicrotasks(); -} - -// Function which fails the test if it gets called. -void unreachable([a, b]) { - Expect.fail("Unreachable"); -} - -/// Check that something happens once. -class Checker { - bool checked = false; - void check() { - if (checked) Expect.fail("Checked more than once"); - checked = true; - } -} - -Future emptyTest(Stream s, bool broadcast) async { - var checker = Checker(); - // Respects type parameter (not a `Stream`) - Expect.notType>(s); - - // Has the expected `isBroadcast`. - Expect.equals(broadcast, s.isBroadcast); - - StreamSubscription sub = - s.listen(unreachable, onError: unreachable, onDone: checker.check); - // Type parameter of subscription repspects stream. - // Not a `StreamSubscription`. - Expect.isFalse(sub is StreamSubscription); - - Expect.isFalse(sub.isPaused); - // Doesn't do callback immediately in response to listen. - Expect.isFalse(checker.checked); - await flushMicrotasks(); - // Completes eventually, after a microtask. - Expect.isTrue(checker.checked); - Expect.isFalse(sub.isPaused); - - // Can listen more than once, whether broadcast stream or not. - checker = Checker(); - StreamSubscription sub2 = - s.listen(unreachable, onError: unreachable, onDone: checker.check); - // Respects pauses. - sub2.pause(); - Expect.isTrue(sub2.isPaused); - sub2.pause(); - Expect.isTrue(sub2.isPaused); - sub2.pause(Future.value(0)); - Expect.isTrue(sub2.isPaused); - - await flushMicrotasks(); - Expect.isTrue(sub2.isPaused); - Expect.isFalse(checker.checked); - - // Resumes when all pauses resumed. - sub2.resume(); - Expect.isTrue(sub2.isPaused); - await flushMicrotasks(); - Expect.isFalse(checker.checked); - Expect.isTrue(sub2.isPaused); - - sub2.resume(); - Expect.isFalse(sub2.isPaused); - await flushMicrotasks(); - Expect.isTrue(checker.checked); - Expect.isFalse(sub2.isPaused); - - // Can't pause after done. - sub2.pause(Future.value(0)); - Expect.isFalse(sub2.isPaused); - sub2.pause(); - Expect.isFalse(sub2.isPaused); - - // Respects cancel. - var sub3 = s.listen(unreachable, onError: unreachable, onDone: unreachable); - sub3.cancel(); - sub3.onDone(unreachable); - Expect.isFalse(sub3.isPaused); - await flushMicrotasks(); - Expect.isFalse(sub3.isPaused); - - // Can't pause after cancel - sub3.pause(); - Expect.isFalse(sub3.isPaused); - sub3.pause(Future.value(0)); - Expect.isFalse(sub3.isPaused); - // No errors. - - // Respects cancel while paused. - var sub4 = s.listen(unreachable, onError: unreachable, onDone: unreachable); - sub4.pause(); - sub4.cancel(); - sub4.onDone(unreachable); - await flushMicrotasks(); - sub4.resume(); - await flushMicrotasks(); - - // Check that the stream is zone-aware. - // Registers onDone callback. - var log = []; - Zone zone; - - void callback1() { - // Run in correct zone. - Expect.equals(zone, Zone.current); - log.add("don1"); - } - - void callback2() { - // Run in correct zone. - Expect.equals(zone, Zone.current); - log.add("don2"); - } - - zone = Zone.current.fork( - specification: ZoneSpecification(registerCallback: (s, p, z, f) { - if (f == callback1) log.add("reg1"); - if (f == callback2) log.add("reg2"); - return p.registerCallback(z, f); - }, run: (s, p, z, f) { - if (f == callback1) log.add("run1"); - if (f == callback2) log.add("run2"); - return p.run(z, f); - })); - - await zone.run(() async { - var s = Stream.empty(); - - var sub = s.listen(unreachable, onError: unreachable, onDone: callback1); - sub.onDone(callback2); - }); - await flushMicrotasks(); - Expect.listEquals(["reg1", "reg2", "run2", "don2"], log); -} - -Future flushMicrotasks() => new Future.delayed(Duration.zero); diff --git a/tests/lib_2/async/stream_error_test.dart b/tests/lib_2/async/stream_error_test.dart deleted file mode 100644 index bc733766022..00000000000 --- a/tests/lib_2/async/stream_error_test.dart +++ /dev/null @@ -1,85 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:async'; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -void main() async { - var stack = StackTrace.fromString("some stack trace"); - var error = MyError(); - - asyncStart(); - - { - // There is an error before any element. - var stream = Stream.error(error, stack); - try { - await stream.first; - Expect.fail("didn't throw"); - } on MyError catch (e, s) { - Expect.identical(error, e); - Expect.identical(stack, s); - } - } - - { - // There is an error before any element. - var stream = Stream.error(error, stack); - try { - await for (var _ in stream) {} - Expect.fail("didn't throw"); - } on MyError catch (e, s) { - Expect.identical(error, e); - Expect.identical(stack, s); - } - } - - { - // There is no second element or error. - var stream = Stream.error(error, stack); - int errorCount = 0; - var noErrorStream = stream.handleError((e, s) { - Expect.identical(error, e); - Expect.identical(stack, s); - errorCount++; - }, test: (o) => o is MyError); - Expect.isTrue(await noErrorStream.isEmpty); - Expect.equals(1, errorCount); - } - - { - // Works with subscriptions and pause-resume. - var stream = Stream.error(error, stack); - int errorCount = 0; - var onDone = Completer(); - var sub = stream.listen((v) { - Expect.fail("Value event"); - }, onError: (e, s) { - Expect.identical(error, e); - Expect.identical(stack, s); - errorCount++; - }, onDone: () { - Expect.equals(1, errorCount); - onDone.complete(); - }); - sub.pause(); - await Future.delayed(Duration(milliseconds: 10)); - Expect.equals(0, errorCount); - Expect.isFalse(onDone.isCompleted); - sub.resume(); - await onDone.future; - } - - // A null error argument is a synchronous error. - Expect.throwsTypeError(() { - Stream.error(null); - }); - - asyncEnd(); -} - -class MyError {} diff --git a/tests/lib_2/async/stream_event_transformed_test.dart b/tests/lib_2/async/stream_event_transformed_test.dart deleted file mode 100644 index 475e6fd9448..00000000000 --- a/tests/lib_2/async/stream_event_transformed_test.dart +++ /dev/null @@ -1,347 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; -import 'event_helper.dart'; - -class DecrementingTransformerSink implements EventSink { - final outSink; - DecrementingTransformerSink(this.outSink); - - void add(dynamic i) => outSink.add(i - 1); - void addError(dynamic e, [st]) => outSink.addError(e - 1, st); - void close() => outSink.close(); -} - -class FutureWaitingTransformerSink implements EventSink { - final outSink; - final closeFuture; - FutureWaitingTransformerSink(this.outSink, this.closeFuture); - - void add(dynamic future) { - future.then(outSink.add); - } - - void addError(dynamic e, [st]) { - e.then((val) { - outSink.addError(val, st); - }); - } - - void close() { - closeFuture.whenComplete(outSink.close); - } -} - -class ZoneTransformerSink implements EventSink { - final outSink; - ZoneTransformerSink(this.outSink); - - void add(_) { - outSink.add(Zone.current); - } - - void addError(_, [st]) { - outSink.add(Zone.current); - } - - void close() { - outSink.add(Zone.current); - outSink.close(); - } -} - -class TypeChangingSink implements EventSink { - final EventSink outSink; - TypeChangingSink(this.outSink); - - void add(int data) { - outSink.add(data.toString()); - } - - void addError(error, [st]) { - outSink.addError(error, st); - } - - void close() { - outSink.close(); - } -} - -class SinkTransformer extends StreamTransformerBase { - final Function sinkMapper; - SinkTransformer(this.sinkMapper); - - Stream bind(Stream stream) { - return new Stream.eventTransformed(stream, sinkMapper); - } -} - -get currentStackTrace { - try { - throw 0; - } catch (e, st) { - return st; - } -} - -// In most cases the callback will be 'asyncEnd'. Errors are reported -// asynchronously. We want to give them time to surface before reporting -// asynchronous tests as done. -void delayCycles(callback, int nbCycles) { - if (nbCycles == 0) { - callback(); - return; - } - Timer.run(() { - delayCycles(callback, nbCycles - 1); - }); -} - -main() { - { - // Simple test: use the SinkTransformer (using the Stream.eventTransformed - // constructor) to transform a sequence of numbers. This is basically - // similar to a map. - asyncStart(); - new Stream.fromIterable([1, 2, 3]) - .transform(new SinkTransformer( - (sink) => new DecrementingTransformerSink(sink))) - .toList() - .then((list) { - Expect.listEquals([0, 1, 2], list); - asyncEnd(); - }); - } - - { - // Similar test as above: but this time also transform errors. Also - // checks that the stack trace is correctly passed through. - asyncStart(); - var controller; - var events = []; - var stackTrace = currentStackTrace; - controller = new StreamController(onListen: () { - controller.add(499); - controller.addError(42, stackTrace); - controller.close(); - }); - controller.stream - .transform(new SinkTransformer( - (sink) => new DecrementingTransformerSink(sink))) - .listen((data) { - events.add(data); - }, onError: (e, st) { - events.add(e); - events.add(st); - }, onDone: () { - Expect.listEquals([498, 41, stackTrace], events); - asyncEnd(); - }); - } - - { - // Test that the output sink of the transformer can be used asynchronously. - asyncStart(); - var controller; - var events = []; - var stackTrace = currentStackTrace; - var completer1 = new Completer(); - var completer2 = new Completer(); - var completer3 = new Completer(); - var closeCompleter = new Completer(); - controller = new StreamController(onListen: () { - controller.add(completer1.future); - controller.addError(completer2.future, stackTrace); - controller.add(completer3.future); - controller.close(); - }); - controller.stream - .transform(new SinkTransformer((sink) => - new FutureWaitingTransformerSink(sink, closeCompleter.future))) - .listen((data) { - events.add(data); - }, onError: (e, st) { - events.add(e); - events.add(st); - }, onDone: () { - Expect.listEquals(["error2", stackTrace, "future3", "future1"], events); - asyncEnd(); - }); - Timer.run(() { - completer2.complete("error2"); - Timer.run(() { - completer3.complete("future3"); - Timer.run(() { - completer1.complete("future1"); - scheduleMicrotask(closeCompleter.complete); - }); - }); - }); - } - - { - // Test that the output sink of the transformer can be used asynchronously - // and that events are paused if necessary. - asyncStart(); - var controller; - var events = []; - var stackTrace = currentStackTrace; - var completer1 = new Completer.sync(); - var completer2 = new Completer.sync(); - var completer3 = new Completer.sync(); - var closeCompleter = new Completer(); - controller = new StreamController(onListen: () { - controller.add(completer1.future); - controller.addError(completer2.future, stackTrace); - controller.add(completer3.future); - controller.close(); - }); - var subscription; - completer1.future.then((_) { - Expect.isTrue(subscription.isPaused); - }); - completer2.future.then((_) { - Expect.isTrue(subscription.isPaused); - }); - completer3.future.then((_) { - Expect.isTrue(subscription.isPaused); - }); - subscription = controller.stream - .transform(new SinkTransformer((sink) => - new FutureWaitingTransformerSink(sink, closeCompleter.future))) - .listen((data) { - Expect.isFalse(subscription.isPaused); - events.add(data); - }, onError: (e, st) { - events.add(e); - events.add(st); - }, onDone: () { - Expect.listEquals(["error2", stackTrace, "future3", "future1"], events); - asyncEnd(); - }); - Timer.run(() { - subscription.pause(); - completer2.complete("error2"); - Timer.run(() { - subscription.resume(); - Timer.run(() { - Expect.listEquals(["error2", stackTrace], events); - subscription.pause(); - completer3.complete("future3"); - Timer.run(() { - subscription.resume(); - Timer.run(() { - Expect.listEquals(["error2", stackTrace, "future3"], events); - subscription.pause(); - completer1.complete("future1"); - subscription.resume(); - scheduleMicrotask(closeCompleter.complete); - }); - }); - }); - }); - }); - } - - { - // Test that the output sink of the transformer reports errors when the - // stream is already closed. - asyncStart(); - var controller; - var events = []; - var stackTrace = currentStackTrace; - var completer1 = new Completer(); - var completer2 = new Completer(); - var completer3 = new Completer(); - var closeCompleter = new Completer(); - controller = new StreamController(onListen: () { - controller.add(completer1.future); - controller.addError(completer2.future, stackTrace); - controller.add(completer3.future); - controller.close(); - }); - - bool streamIsDone = false; - int errorCount = 0; - runZonedGuarded(() { - controller.stream - .transform(new SinkTransformer((sink) => - new FutureWaitingTransformerSink(sink, closeCompleter.future))) - .listen((data) { - events.add(data); - }, onError: (e, st) { - events.add(e); - events.add(st); - }, onDone: () { - Expect.listEquals([], events); - streamIsDone = true; - }); - }, (e, s) { - Expect.isTrue(e is StateError); - errorCount++; - }); - closeCompleter.complete(); - Timer.run(() { - Expect.isTrue(streamIsDone); - // Each of the delayed completions should trigger an unhandled error - // in the zone the stream was listened to. - Timer.run(() { - completer1.complete(499); - }); - Timer.run(() { - completer2.complete(42); - }); - Timer.run(() { - completer3.complete(99); - }); - delayCycles(() { - Expect.equals(3, errorCount); - asyncEnd(); - }, 5); - }); - } - - { - // Test that the transformer is executed in the zone it was listened to. - asyncStart(); - var stackTrace = currentStackTrace; - var events = []; - var controller; - controller = new StreamController(onListen: () { - // Events are added outside the zone. - controller.add(499); - controller.addError(42, stackTrace); - controller.close(); - }); - Zone zone = Zone.current.fork(); - var stream = controller.stream.transform( - new SinkTransformer((sink) => new ZoneTransformerSink(sink))); - zone.run(() { - stream.listen((data) { - events.add(data); - }, onDone: () { - Expect.listEquals([zone, zone, zone], events); - delayCycles(asyncEnd, 3); - }); - }); - } - - { - // Just make sure that the generic types are correct everywhere. - asyncStart(); - new Stream.fromIterable([1, 2, 3]) - .transform(new SinkTransformer( - (sink) => new TypeChangingSink(sink))) - .toList() - .then((list) { - Expect.listEquals(["1", "2", "3"], list); - asyncEnd(); - }); - } -} diff --git a/tests/lib_2/async/stream_first_where_test.dart b/tests/lib_2/async/stream_first_where_test.dart deleted file mode 100644 index ec496a0e1b5..00000000000 --- a/tests/lib_2/async/stream_first_where_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// 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 stream_controller_async_test; - -import 'dart:async'; - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; - -class A { - const A(); -} - -class B extends A { - const B(); -} - -class C extends B { - const C(); -} - -main() { - asyncStart(); - { - Stream stream = new Stream.fromIterable([new B()]); - A aFunc() => const A(); - // Make sure that firstWhere does not allow you to return instances - // of types that are not subtypes of the generic type of the stream. - stream.firstWhere((x) => false, //# badType: compile-time error - orElse: aFunc); // //# badType: continued - } - { - asyncStart(); - C cFunc() => const C(); - Stream stream = new Stream.fromIterable([new B()]); - // Make sure that firstWhere does allow you to return instances - // of types that are subtypes of the generic type of the stream. - stream.firstWhere((x) => false, orElse: cFunc).then((value) { - Expect.identical(const C(), value); - asyncEnd(); - }); - } - asyncEnd(); -} diff --git a/tests/lib_2/async/stream_from_futures_test.dart b/tests/lib_2/async/stream_from_futures_test.dart deleted file mode 100644 index 56442b2b8ea..00000000000 --- a/tests/lib_2/async/stream_from_futures_test.dart +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) 2013, 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 - -import "dart:async"; -import "package:expect/expect.dart"; -import 'package:async_helper/async_helper.dart'; - -main() { - asyncStart(); - - testValues(); - testErrors(); - testMixed(); - testOrdering(); - testEmpty(); - testPrecompleted(); - - asyncEnd(); -} - -void testValues() { - asyncStart(); - var cs = new List.generate(3, (_) => new Completer()); - var stream = new Stream.fromFutures(cs.map((x) => x.future)); - var result = stream.toList(); - - result.then((list) { - Expect.listEquals([1, 2, 3], list); - asyncEnd(); - }); - - cs[1].complete(1); - cs[2].complete(2); - cs[0].complete(3); -} - -void testErrors() { - asyncStart(); - var cs = new List.generate(3, (_) => new Completer()); - var stream = new Stream.fromFutures(cs.map((x) => x.future)); - - int counter = 0; - stream.listen((_) { - Expect.fail("unexpected value"); - }, onError: (e) { - Expect.equals(++counter, e); - }, onDone: () { - Expect.equals(3, counter); - asyncEnd(); - }); - - cs[1].completeError(1); - cs[2].completeError(2); - cs[0].completeError(3); -} - -void testMixed() { - asyncStart(); - var cs = new List.generate(3, (_) => new Completer()); - var stream = new Stream.fromFutures(cs.map((x) => x.future)); - - int counter = 0; - stream.listen((v) { - Expect.isTrue(counter == 0 || counter == 2); - Expect.equals(++counter, v); - }, onError: (e) { - Expect.equals(++counter, 2); - Expect.equals(2, e); - }, onDone: () { - Expect.equals(3, counter); - asyncEnd(); - }); - - cs[1].complete(1); - cs[2].completeError(2); - cs[0].complete(3); -} - -void testOrdering() { - // The output is in completion order, not affected by the input future order. - test(n1, n2, n3) { - asyncStart(); - var cs = new List.generate(3, (_) => new Completer()); - var stream = new Stream.fromFutures(cs.map((x) => x.future)); - var result = stream.toList(); - - result.then((list) { - Expect.listEquals([1, 2, 3], list); - asyncEnd(); - }); - - cs[n1].complete(1); - cs[n2].complete(2); - cs[n3].complete(3); - } - - test(0, 1, 2); - test(0, 2, 1); - test(1, 0, 2); - test(1, 2, 0); - test(2, 0, 1); - test(2, 1, 0); -} - -void testEmpty() { - asyncStart(); - var stream = new Stream.fromFutures([]); - - stream.listen((_) { - Expect.fail("unexpected value"); - }, onError: (e) { - Expect.fail("unexpected error"); - }, onDone: () { - asyncEnd(); - }); -} - -void testPrecompleted() { - asyncStart(); - var stream = new Stream.fromFutures( - new Iterable.generate(3, (v) => new Future.value(v + 1))); - var expected = new Set.from([1, 2, 3]); - stream.listen((v) { - Expect.isTrue(expected.contains(v)); - expected.remove(v); - }, onDone: () { - Expect.isTrue(expected.isEmpty); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/stream_from_iterable_test.dart b/tests/lib_2/async/stream_from_iterable_test.dart deleted file mode 100644 index 37ae173a988..00000000000 --- a/tests/lib_2/async/stream_from_iterable_test.dart +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test Stream.fromIterable. - -import 'dart:async'; - -import 'package:async_helper/async_helper.dart'; -import 'package:expect/expect.dart'; -import 'package:async_helper/async_minitest.dart'; - -import 'event_helper.dart'; - -// Tests that various typed iterables that do not throw creates -// suitable streams. -void iterableTest(Iterable iterable) { - asyncStart(); - List expected = iterable.toList(); - Stream stream = new Stream.fromIterable(iterable); - var events = []; - stream.listen(events.add, onDone: () { - Expect.listEquals(expected, events, "fromIterable $iterable"); - asyncEnd(); - }); -} - -main() { - asyncStart(); - - iterableTest([]); - iterableTest([]); - iterableTest([1]); - iterableTest([1, "two", true, null]); - iterableTest([1, 2, 3, 4]); - iterableTest(["one", "two", "three", "four"]); - iterableTest(new Iterable.generate(1000, (i) => i)); - iterableTest( - new Iterable.generate(1000, (i) => i).map((i) => "$i")); - - Iterable iter = new Iterable.generate(25, (i) => i * 2); - - { - // Test that the stream's .toList works. - asyncStart(); - new Stream.fromIterable(iter).toList().then((actual) { - List expected = iter.toList(); - Expect.equals(25, expected.length); - Expect.listEquals(expected, actual); - asyncEnd(); - }); - } - - { - // Test that the stream's .map works. - asyncStart(); - new Stream.fromIterable(iter).map((i) => i * 3).toList().then((actual) { - List expected = iter.map((i) => i * 3).toList(); - Expect.listEquals(expected, actual); - asyncEnd(); - }); - } - - { - // Test that pause works. - asyncStart(); - int ctr = 0; - - var stream = new Stream.fromIterable(iter.map((x) { - ctr++; - return x; - })); - - StreamSubscription subscription; - var actual = []; - subscription = stream.listen((int value) { - actual.add(value); - // Do a 10 ms pause during the playback of the iterable. - Duration duration = const Duration(milliseconds: 10); - if (value == 20) { - asyncStart(); - int beforeCtr = ctr; - subscription.pause(new Future.delayed(duration, () {}).whenComplete(() { - Expect.equals(beforeCtr, ctr); - asyncEnd(); - })); - } - }, onDone: () { - Expect.listEquals(iter.toList(), actual); - asyncEnd(); - }); - } - - { - asyncStart(); - // Test that you can listen twice. - Stream stream = new Stream.fromIterable(iter); - stream.listen((x) {}).cancel(); - stream.listen((x) {}).cancel(); // Doesn't throw. - Future.wait([stream.toList(), stream.toList()]).then((result) { - Expect.listEquals(iter.toList(), result[0]); - Expect.listEquals(iter.toList(), result[1]); - asyncEnd(); - }); - } - - { - // Regression test for http://dartbug.com/14332. - // This should succeed. - var from = new Stream.fromIterable([1, 2, 3, 4, 5]); - - var c = new StreamController(); - var sink = c.sink; - - asyncStart(2); - - // if this goes first, test failed (hanged). Swapping addStream and toList - // made failure go away. - sink.addStream(from).then((_) { - c.close(); - asyncEnd(); - }); - - c.stream.toList().then((x) { - Expect.listEquals([1, 2, 3, 4, 5], x); - asyncEnd(); - }); - } - - { - // Regression test for issue 14334 (#2) - var from = new Stream.fromIterable([1, 2, 3, 4, 5]); - - // odd numbers as data events, even numbers as error events - from = from.map((x) => x.isOdd ? x : throw x); - - var c = new StreamController(); - - asyncStart(); - - var data = [], errors = []; - c.stream.listen(data.add, onError: errors.add, onDone: () { - Expect.listEquals([1, 3, 5], data); - Expect.listEquals([2, 4], errors); - asyncEnd(); - }); - c.addStream(from).then((_) { - c.close(); - }); - } - - { - // Example from issue http://dartbug.com/33431. - asyncStart(); - var asyncStarStream = () async* { - yield 1; - yield 2; - throw "bad"; - }(); - collectEvents(asyncStarStream).then((events2) { - Expect.listEquals(["value", 1, "value", 2, "error", "bad"], events2); - asyncEnd(); - }); - - Iterable throwingIterable() sync* { - yield 1; - yield 2; - throw "bad"; - } - - // Sanity check behavior. - var it = throwingIterable().iterator; - Expect.isTrue(it.moveNext()); - Expect.equals(1, it.current); - Expect.isTrue(it.moveNext()); - Expect.equals(2, it.current); - Expect.throws(it.moveNext, (e) => e == "bad"); - - asyncStart(); - var syncStarStream = new Stream.fromIterable(throwingIterable()); - collectEvents(syncStarStream).then((events1) { - Expect.listEquals(["value", 1, "value", 2, "error", "bad"], events1); - asyncEnd(); - }); - } - - { - // Test error behavior. Changed when fixing issue 33431. - // Iterable where "current" throws for third value, moveNext on fifth call. - var m = new MockIterable((n) { - return n != 5 || (throw "moveNext"); - }, (n) { - return n != 3 ? n : throw "current"; - }); - asyncStart(); - collectEvents(new Stream.fromIterable(m)).then((events) { - // Error on "current" does not stop iteration. - // Error on "moveNext" does. - Expect.listEquals([ - "value", - 1, - "value", - 2, - "error", - "current", - "value", - 4, - "error", - "moveNext" - ], events); - asyncEnd(); - }); - } - - asyncEnd(); -} - -// Collects value and error events in a list. -// Value events preceded by "value", error events by "error". -// Completes on done event. -Future> collectEvents(Stream stream) { - var c = new Completer>(); - var events = []; - stream.listen((value) { - events - ..add("value") - ..add(value); - }, onError: (error) { - events - ..add("error") - ..add(error); - }, onDone: () { - c.complete(events); - }); - return c.future; -} - -// Mock iterable. -// A `MockIterable(f1, f2)` calls `f1` on `moveNext` calls with incrementing -// values starting from 1. Calls `f2` on `current` access, with the same integer -// as the most recent `f1` call. -class MockIterable extends Iterable { - final bool Function(int) _onMoveNext; - final T Function(int) _onCurrent; - - MockIterable(this._onMoveNext, this._onCurrent); - - Iterator get iterator => MockIterator(_onMoveNext, _onCurrent); -} - -class MockIterator implements Iterator { - final bool Function(int) _onMoveNext; - final T Function(int) _onCurrent; - - int _counter = 0; - - MockIterator(this._onMoveNext, this._onCurrent); - - bool moveNext() { - _counter += 1; - return _onMoveNext(_counter); - } - - T get current { - return _onCurrent(_counter); - } -} diff --git a/tests/lib_2/async/stream_iterator_double_cancel_test.dart b/tests/lib_2/async/stream_iterator_double_cancel_test.dart deleted file mode 100644 index 6ae393530ad..00000000000 --- a/tests/lib_2/async/stream_iterator_double_cancel_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -Stream timedStream(int n) { - int i = 0; - StreamController controller; - tick() { - if (i >= n) { - controller.close(); - return; - } - controller.add(i); - i++; - new Future.delayed(new Duration(milliseconds: 0), tick); - } - - controller = new StreamController(onListen: tick); - return controller.stream; -} - -void main() { - asyncStart(); - StreamIterator iterator = new StreamIterator(timedStream(10)); - helper(more) { - if (!more) { - // Canceling the already closed iterator should not lead to a crash. - iterator.cancel(); - asyncEnd(); - } else { - iterator.moveNext().then(helper); - } - } - - iterator.moveNext().then(helper); -} diff --git a/tests/lib_2/async/stream_iterator_test.dart b/tests/lib_2/async/stream_iterator_test.dart deleted file mode 100644 index 38b32771d7e..00000000000 --- a/tests/lib_2/async/stream_iterator_test.dart +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'dart:async'; - -import 'package:async_helper/async_minitest.dart'; - -main() { - test("stream iterator basic", () async { - var stream = createStream(); - StreamIterator iterator = new StreamIterator(stream); - expect(iterator.current, isNull); - expect(await iterator.moveNext(), isTrue); - expect(iterator.current, 42); - expect(await iterator.moveNext(), isTrue); - expect(iterator.current, 37); - expect(await iterator.moveNext(), isFalse); - expect(iterator.current, isNull); - expect(await iterator.moveNext(), isFalse); - }); - - test("stream iterator prefilled", () async { - Stream stream = createStream(); - StreamIterator iterator = new StreamIterator(stream); - await new Future.delayed(Duration.zero); - expect(iterator.current, isNull); - expect(await iterator.moveNext(), isTrue); - expect(iterator.current, 42); - expect(await iterator.moveNext(), isTrue); - expect(iterator.current, 37); - expect(await iterator.moveNext(), isFalse); - expect(iterator.current, isNull); - expect(await iterator.moveNext(), isFalse); - }); - - test("stream iterator error", () async { - Stream stream = createErrorStream(); - StreamIterator iterator = new StreamIterator(stream); - expect(await iterator.moveNext(), isTrue); - expect(iterator.current, 42); - var hasNext = iterator.moveNext(); - expect(hasNext, throwsA("BAD")); // This is an async expectation, - await hasNext.catchError((_) {}); // so we have to wait for the future too. - expect(iterator.current, isNull); - expect(await iterator.moveNext(), isFalse); - expect(iterator.current, isNull); - }); - - test("stream iterator current/moveNext during move", () async { - Stream stream = createStream(); - StreamIterator iterator = new StreamIterator(stream); - var hasNext = iterator.moveNext(); - expect(iterator.moveNext, throwsStateError); - expect(await hasNext, isTrue); - expect(iterator.current, 42); - iterator.cancel(); - }); - - test("stream iterator error during cancel", () async { - Stream stream = createCancelErrorStream(); - StreamIterator iterator = new StreamIterator(stream); - for (int i = 0; i < 10; i++) { - expect(await iterator.moveNext(), isTrue); - expect(iterator.current, i); - } - var hasNext = iterator.moveNext(); // active moveNext will be completed. - var cancel = iterator.cancel(); - expect(cancel, throwsA("BAD")); - expect(await hasNext, isFalse); - expect(await iterator.moveNext(), isFalse); - }); - - test("regression 43799 (1)", () async { - // See: https://github.com/dart-lang/sdk/issues/43799 - var badStream = StreamController.broadcast(sync: true); - badStream.onListen = () { - badStream.add(1); - badStream.close(); - }; - var it = StreamIterator(badStream.stream); - expect(await it.moveNext(), false); - }); - - test("regression 43799 (2)", () async { - // See: https://github.com/dart-lang/sdk/issues/43799 - var badStream = StreamController.broadcast(sync: true); - badStream.onListen = () { - badStream.addError("bad"); - }; - var it = StreamIterator(badStream.stream); - expect(it.moveNext(), expectAsync(throwsA("bad"))); - }); -} - -Stream createStream() async* { - yield 42; - yield 37; -} - -Stream createErrorStream() async* { - yield 42; - // Emit an error without stopping the generator. - yield* (new Future.error("BAD").asStream()); - yield 37; -} - -/// Create a stream that throws when cancelled. -Stream createCancelErrorStream() async* { - int i = 0; - try { - while (true) yield i++; - } finally { - throw "BAD"; - } -} diff --git a/tests/lib_2/async/stream_join_test.dart b/tests/lib_2/async/stream_join_test.dart deleted file mode 100644 index 2e5ded27a9c..00000000000 --- a/tests/lib_2/async/stream_join_test.dart +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test the basic StreamController and StreamController.singleSubscription. -library stream_join_test; - -import 'dart:async'; - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_minitest.dart'; - -import 'event_helper.dart'; - -main() { - test("join-empty", () { - StreamController c = new StreamController(); - c.stream.join("X").then(expectAsync((String s) => expect(s, equals("")))); - c.close(); - }); - - test("join-single", () { - StreamController c = new StreamController(); - c.stream - .join("X") - .then(expectAsync((String s) => expect(s, equals("foo")))); - c.add("foo"); - c.close(); - }); - - test("join-three", () { - StreamController c = new StreamController(); - c.stream - .join("X") - .then(expectAsync((String s) => expect(s, equals("fooXbarXbaz")))); - c.add("foo"); - c.add("bar"); - c.add("baz"); - c.close(); - }); - - test("join-three-non-string", () { - StreamController c = new StreamController(); - c.stream - .join("X") - .then(expectAsync((String s) => expect(s, equals("fooXbarXbaz")))); - c.add(new Foo("foo")); - c.add(new Foo("bar")); - c.add(new Foo("baz")); - c.close(); - }); - - test("join-error", () { - StreamController c = new StreamController(); - c.stream - .join("X") - .catchError(expectAsync((String s) => expect(s, equals("BAD!")))); - c.add(new Foo("foo")); - c.add(new Foo("bar")); - c.add(new Bad()); - c.add(new Foo("baz")); - c.close(); - }); -} - -class Foo { - String value; - Foo(this.value); - String toString() => value; -} - -class Bad { - Bad(); - String toString() => throw "BAD!"; -} diff --git a/tests/lib_2/async/stream_last_where_test.dart b/tests/lib_2/async/stream_last_where_test.dart deleted file mode 100644 index 5100cf06855..00000000000 --- a/tests/lib_2/async/stream_last_where_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// 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 stream_controller_async_test; - -import 'dart:async'; - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; - -class A { - const A(); -} - -class B extends A { - const B(); -} - -class C extends B { - const C(); -} - -main() { - asyncStart(); - { - Stream stream = new Stream.fromIterable([new B()]); - A aFunc() => const A(); - // Make sure that lastWhere does not allow you to return instances - // of types that are not subtypes of the generic type of the stream. - stream.lastWhere((x) => false, //# badType: compile-time error - orElse: aFunc); // //# badType: continued - } - { - asyncStart(); - C cFunc() => const C(); - Stream stream = new Stream.fromIterable([new B()]); - // Make sure that lastWhere does allow you to return instances - // of types that are subtypes of the generic type of the stream. - stream.lastWhere((x) => false, orElse: cFunc).then((value) { - Expect.identical(const C(), value); - asyncEnd(); - }); - } - asyncEnd(); -} diff --git a/tests/lib_2/async/stream_listen_zone_test.dart b/tests/lib_2/async/stream_listen_zone_test.dart deleted file mode 100644 index ff59f4680c7..00000000000 --- a/tests/lib_2/async/stream_listen_zone_test.dart +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) 2013, 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 stream_listen_zeno_test; - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -main() { - asyncStart(); - var controller; - for (bool overrideDone in [false, true]) { - for (bool sync in [false, true]) { - var mode = "${sync ? "-sync" : ""}${overrideDone ? "-od": ""}"; - controller = new StreamController(sync: sync); - testStream("SC$mode", controller, controller.stream, overrideDone); - controller = new StreamController.broadcast(sync: sync); - testStream("BSC$mode", controller, controller.stream, overrideDone); - controller = new StreamController(sync: sync); - testStream("SCAB$mode", controller, controller.stream.asBroadcastStream(), - overrideDone, 3); - controller = new StreamController(sync: sync); - testStream("SCMap$mode", controller, controller.stream.map((x) => x), - overrideDone, 3); - } - } - asyncEnd(); -} - -void testStream( - String name, StreamController controller, Stream stream, bool overrideDone, - [int registerExpect = 0]) { - asyncStart(); - StreamSubscription sub; - Zone zone; - int registerCount = 0; - int callbackBits = 0; - int stepCount = 0; - Function step; - void nextStep() { - Zone.root.scheduleMicrotask(step); - } - - runZoned(() { - zone = Zone.current; - sub = stream.listen((v) { - Expect.identical(zone, Zone.current, name); - Expect.equals(42, v, name); - callbackBits |= 1; - nextStep(); - }, onError: (e, s) { - Expect.identical(zone, Zone.current, name); - Expect.equals("ERROR", e, name); - callbackBits |= 2; - nextStep(); - }, onDone: () { - Expect.identical(zone, Zone.current, name); - if (overrideDone) throw "RUNNING WRONG ONDONE"; - callbackBits |= 4; - nextStep(); - }); - registerExpect += 3; - Expect.equals(registerExpect, registerCount, name); - }, - zoneSpecification: new ZoneSpecification( - registerCallback: (self, p, z, R callback()) { - Expect.identical(zone, self, name); - registerCount++; - return () { - Expect.identical(zone, Zone.current, name); - return callback(); - }; - }, registerUnaryCallback: (self, p, z, R callback(T a)) { - Expect.identical(zone, self, name); - registerCount++; - return (a) { - Expect.identical(zone, Zone.current, name); - return callback(a); - }; - }, registerBinaryCallback: - (self, package, z, R callback(T1 a, T2 b)) { - Expect.identical(zone, self, name); - registerCount++; - return (a, b) { - Expect.identical(zone, Zone.current, name); - return callback(a, b); - }; - })); - - int expectedBits = 0; - step = () { - var stepName = "$name-$stepCount"; - Expect.identical(Zone.root, Zone.current, stepName); - Expect.equals(expectedBits, callbackBits, stepName); - switch (stepCount++) { - case 0: - expectedBits |= 1; - controller.add(42); - break; - case 1: - expectedBits |= 2; - controller.addError("ERROR", null); - break; - case 2: - Expect.equals(registerExpect, registerCount, stepName); - sub.onData((v) { - Expect.identical(zone, Zone.current, stepName); - Expect.equals(37, v); - callbackBits |= 8; - nextStep(); - }); - Expect.equals(++registerExpect, registerCount, stepName); - expectedBits |= 8; - controller.add(37); - break; - case 3: - Expect.equals(registerExpect, registerCount, stepName); - sub.onError((e, s) { - Expect.identical(zone, Zone.current); - Expect.equals("BAD", e); - callbackBits |= 16; - nextStep(); - }); - Expect.equals(++registerExpect, registerCount, stepName); - expectedBits |= 16; - controller.addError("BAD", null); - break; - case 4: - Expect.equals(registerExpect, registerCount, stepName); - if (overrideDone) { - sub.onDone(() { - Expect.identical(zone, Zone.current); - callbackBits |= 32; - nextStep(); - }); - registerExpect++; - expectedBits |= 32; - } else { - expectedBits |= 4; - } - Expect.equals(registerExpect, registerCount, stepName); - controller.close(); - break; - case 5: - asyncEnd(); - } - }; - step(); -} diff --git a/tests/lib_2/async/stream_multi_test.dart b/tests/lib_2/async/stream_multi_test.dart deleted file mode 100644 index 413ed1d6626..00000000000 --- a/tests/lib_2/async/stream_multi_test.dart +++ /dev/null @@ -1,141 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:async'; - -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -extension StreamRepeatLatestExtension on Stream { - Stream repeatLatest() { - var done = false; - T latest = null; - var currentListeners = >{}; - this.listen((event) { - latest = event; - for (var listener in [...currentListeners]) listener.addSync(event); - }, onError: (Object error, StackTrace stack) { - for (var listener in [...currentListeners]) - listener.addErrorSync(error, stack); - }, onDone: () { - done = true; - latest = null; - for (var listener in currentListeners) listener.closeSync(); - currentListeners.clear(); - }); - return Stream.multi((controller) { - if (done) { - controller.close(); - return; - } - currentListeners.add(controller); - if (latest != null) controller.add(latest); - controller.onCancel = () { - currentListeners.remove(controller); - }; - }); - } -} - -void main() { - asyncStart(); - testStreamsIndependent(); - asyncTest(testStreamNonOverlap); - asyncTest(testRepeatLatest); - asyncEnd(); -} - -/// Test that the streams can provide different events. -void testStreamsIndependent() { - var log = []; - var index = 0; - var multi = Stream>.multi((c) { - var id = ++index; - log.add("$id"); - for (var i = 0; i < id + 1; i++) { - c.add([id, i]); - } - c.close(); - }); - void logList(List l) { - log.add("${l.first}-${l.last}"); - } - - asyncStart(); - Future.wait([multi.forEach(logList), multi.forEach(logList)]) - .whenComplete(() { - Expect.equals(7, log.length); - for (var element in ["1", "1-0", "1-1", "2", "2-0", "2-1", "2-2"]) { - Expect.isTrue(log.contains(element)); - } - asyncEnd(); - }); -} - -/// Test that stream can be listened to again after having no listener. -Future testStreamNonOverlap() async { - var completer = Completer(); - MultiStreamController controller; - var stream = Stream.multi((c) { - controller = c; - c.onCancel = () { - controller = null; - if (!completer.isCompleted) completer.complete(null); - }; - }); - for (var i in [1, 2, 3]) { - var log = []; - var subscription = stream.listen((v) { - log.add(v); - if (!completer.isCompleted) completer.complete(v); - }, onError: (e, s) { - log.add(e); - if (!completer.isCompleted) completer.complete(e); - }, onDone: () { - log.add(null); - if (!completer.isCompleted) completer.complete(null); - }); - Expect.isNotNull(controller); - controller.add(1); - await completer.future; - Expect.listEquals([1], log); - - completer = Completer(); - controller.add(2); - await completer.future; - Expect.listEquals([1, 2], log); - - completer = Completer(); - if (i == 2) { - subscription.cancel(); - } else { - controller.close(); - } - await completer.future; - Expect.listEquals([1, 2, if (i != 2) null], log); - } -} - -/// Test that the [Stream.repeatLatest] example code works as described. -Future testRepeatLatest() async { - var c = StreamController(); - var repStream = c.stream.repeatLatest(); - - var f1 = repStream.first; - c.add(1); - var v1 = await f1; - Expect.equals(1, v1); - - var f2 = repStream.take(2).toList(); - c.add(2); - var l2 = await f2; - Expect.listEquals([1, 2], l2); - - var f3 = repStream.take(2).toList(); - c.add(3); - var l3 = await f3; - Expect.listEquals([2, 3], l3); -} diff --git a/tests/lib_2/async/stream_periodic2_test.dart b/tests/lib_2/async/stream_periodic2_test.dart deleted file mode 100644 index d0d9ed97cfd..00000000000 --- a/tests/lib_2/async/stream_periodic2_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test merging streams. -library dart.test.stream_from_iterable; - -import 'dart:async'; - -import 'package:async_helper/async_minitest.dart'; - -main() { - test("stream-periodic2", () { - Stream stream = - new Stream.periodic(const Duration(milliseconds: 1), (x) => x); - int receivedCount = 0; - var subscription; - subscription = stream.listen(expectAsync((data) { - expect(data, receivedCount); - receivedCount++; - if (receivedCount == 5) subscription.cancel(); - }, count: 5)); - }); -} diff --git a/tests/lib_2/async/stream_periodic3_test.dart b/tests/lib_2/async/stream_periodic3_test.dart deleted file mode 100644 index 7e0f3fda684..00000000000 --- a/tests/lib_2/async/stream_periodic3_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test merging streams. -library dart.test.stream_from_iterable; - -import 'dart:async'; - -import 'package:async_helper/async_minitest.dart'; - -// The stopwatch is more precise than the Timer. -// Some browsers (Firefox and IE so far) can trigger too early. So we add more -// margin. We use identical(1, 1.0) as an easy way to know if the test is -// compiled by dart2js. -int get safetyMargin => identical(1, 1.0) ? 5 : 0; - -main() { - test("stream-periodic3", () { - Stopwatch watch = new Stopwatch()..start(); - Stream stream = - new Stream.periodic(const Duration(milliseconds: 1), (x) => x); - stream.take(10).listen((_) {}, onDone: expectAsync(() { - int millis = watch.elapsedMilliseconds + safetyMargin; - expect(millis, greaterThanOrEqualTo(10)); - })); - }); -} diff --git a/tests/lib_2/async/stream_periodic4_test.dart b/tests/lib_2/async/stream_periodic4_test.dart deleted file mode 100644 index 5471b34446a..00000000000 --- a/tests/lib_2/async/stream_periodic4_test.dart +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test merging streams. -library dart.test.stream_from_iterable; - -import 'dart:async'; - -import 'package:async_helper/async_minitest.dart'; - -void runTest(period, maxElapsed, pauseDuration) { - Function done = expectAsync(() {}); - - Stopwatch watch = new Stopwatch()..start(); - Stream stream = new Stream.periodic(period, (x) => x); - var subscription; - subscription = stream.take(5).listen((i) { - if (watch.elapsed > maxElapsed) { - // Test failed in this configuration. Try with more time (or give up - // if we reached an unreasonable maxElapsed). - if (maxElapsed > const Duration(seconds: 2)) { - // Give up. - expect(true, false); - } else { - subscription.cancel(); - // Call 'done' ourself, since it won't be invoked in the onDone handler. - runTest(period * 2, maxElapsed * 2, pauseDuration * 2); - done(); - return; - } - } - watch.reset(); - if (i == 2) { - subscription.pause(); - watch.stop(); - new Timer(pauseDuration, () { - watch.start(); - subscription.resume(); - }); - } - }, onDone: done); -} - -main() { - test("stream-periodic4", () { - runTest(const Duration(milliseconds: 2), const Duration(milliseconds: 8), - const Duration(milliseconds: 10)); - }); -} diff --git a/tests/lib_2/async/stream_periodic5_test.dart b/tests/lib_2/async/stream_periodic5_test.dart deleted file mode 100644 index 16148bcf4a1..00000000000 --- a/tests/lib_2/async/stream_periodic5_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test merging streams. -library dart.test.stream_from_iterable; - -import 'dart:async'; - -import 'package:async_helper/async_minitest.dart'; - -watchMs(Stopwatch watch) { - int microsecs = watch.elapsedMicroseconds; - // Give it some slack. The Stopwatch is more precise than the timers. This - // means that we sometimes get 3995 microseconds instead of 4+ milliseconds. - // 200 microseconds should largely account for this discrepancy. - return (microsecs + 200) ~/ 1000; -} - -main() { - test("stream-periodic4", () { - Stream stream = - new Stream.periodic(const Duration(milliseconds: 5), (x) => x); - Stopwatch watch = new Stopwatch()..start(); - var subscription; - subscription = stream.take(10).listen((i) { - int ms = watchMs(watch); - watch.reset(); - if (i == 2) { - Stopwatch watch2 = new Stopwatch()..start(); - // Busy wait. - while (watch2.elapsedMilliseconds < 15) {} - // Make sure the stream can be paused when it has overdue events. - // We just busy waited for 15ms, even though the stream is supposed to - // emit events every 5ms. - subscription.pause(); - watch.stop(); - new Timer(const Duration(milliseconds: 150), () { - watch.start(); - subscription.resume(); - }); - } - }, onDone: expectAsync(() {})); - }); -} diff --git a/tests/lib_2/async/stream_periodic6_test.dart b/tests/lib_2/async/stream_periodic6_test.dart deleted file mode 100644 index 6c1f42ee4ec..00000000000 --- a/tests/lib_2/async/stream_periodic6_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test merging streams. -library dart.test.stream_from_iterable; - -import 'dart:async'; - -import 'package:async_helper/async_minitest.dart'; - -main() { - test("stream-periodic1", () { - Stream stream = new Stream.periodic(const Duration(milliseconds: 1), (i) { - if (i == 3) throw 42; - return i; - }); - int expected = 0; - var subscription; - subscription = stream.listen( - expectAsync((data) { - expect(data, expected++); - if (expected == 5) subscription.cancel(); - }, count: 4), onError: expectAsync((e, s) { - expect(e, 42); - expected++; - })); - }); -} diff --git a/tests/lib_2/async/stream_periodic_test.dart b/tests/lib_2/async/stream_periodic_test.dart deleted file mode 100644 index 554c802b473..00000000000 --- a/tests/lib_2/async/stream_periodic_test.dart +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test merging streams. -library dart.test.stream_from_iterable; - -import 'dart:async'; - -import 'package:async_helper/async_minitest.dart'; - -main() { - test("stream-periodic1", () { - Stream stream = new Stream.periodic(const Duration(milliseconds: 1)); - int receivedCount = 0; - var subscription; - subscription = stream.listen(expectAsync((data) { - expect(data, isNull); - receivedCount++; - if (receivedCount == 5) { - var future = subscription.cancel(); - expect(future, completes); - } - }, count: 5)); - }); -} diff --git a/tests/lib_2/async/stream_single_test.dart b/tests/lib_2/async/stream_single_test.dart deleted file mode 100644 index 3d943d849b1..00000000000 --- a/tests/lib_2/async/stream_single_test.dart +++ /dev/null @@ -1,73 +0,0 @@ -// 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 - -// Test the Stream.single method. -library stream_single_test; - -import 'dart:async'; - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_minitest.dart'; - -import 'event_helper.dart'; - -main() { - test("single", () { - StreamController c = new StreamController(sync: true); - Future f = c.stream.single; - f.then(expectAsync((v) { - Expect.equals(42, v); - })); - new Events.fromIterable([42]).replay(c); - }); - - test("single empty", () { - StreamController c = new StreamController(sync: true); - Future f = c.stream.single; - f.catchError(expectAsync((error) { - Expect.isTrue(error is StateError); - })); - new Events.fromIterable([]).replay(c); - }); - - test("single error", () { - StreamController c = new StreamController(sync: true); - Future f = c.stream.single; - f.catchError(expectAsync((error) { - Expect.equals("error", error); - })); - Events errorEvents = new Events() - ..error("error") - ..close(); - errorEvents.replay(c); - }); - - test("single error 2", () { - StreamController c = new StreamController(sync: true); - Future f = c.stream.single; - f.catchError(expectAsync((error) { - Expect.equals("error", error); - })); - Events errorEvents = new Events() - ..error("error") - ..error("error2") - ..close(); - errorEvents.replay(c); - }); - - test("single error 3", () { - StreamController c = new StreamController(sync: true); - Future f = c.stream.single; - f.catchError(expectAsync((error) { - Expect.equals("error", error); - })); - Events errorEvents = new Events() - ..add(499) - ..error("error") - ..close(); - errorEvents.replay(c); - }); -} diff --git a/tests/lib_2/async/stream_single_to_multi_subscriber_test.dart b/tests/lib_2/async/stream_single_to_multi_subscriber_test.dart deleted file mode 100644 index db68a582e58..00000000000 --- a/tests/lib_2/async/stream_single_to_multi_subscriber_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// 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 - -// Test the basic StreamController and StreamController.singleSubscription. -library stream_single_test; - -import 'dart:async'; - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_minitest.dart'; - -import 'event_helper.dart'; - -main() { - test("tomulti 1", () { - StreamController c = new StreamController(sync: true); - Stream multi = c.stream.asBroadcastStream(); - // Listen twice. - multi.listen(expectAsync((v) => Expect.equals(42, v))); - multi.listen(expectAsync((v) => Expect.equals(42, v))); - c.add(42); - }); - - test("tomulti 2", () { - StreamController c = new StreamController(sync: true); - Stream multi = c.stream.asBroadcastStream(); - Events expected = new Events.fromIterable([1, 2, 3, 4, 5]); - Events actual1 = new Events.capture(multi); - Events actual2 = new Events.capture(multi); - actual1.onDone(expectAsync(() { - Expect.listEquals(expected.events, actual1.events); - })); - actual2.onDone(expectAsync(() { - Expect.listEquals(expected.events, actual2.events); - })); - expected.replay(c); - }); - - test("tomulti no-op", () { - StreamController c = new StreamController(sync: true); - Stream multi = c.stream.asBroadcastStream(); - Events expected = new Events.fromIterable([1, 2, 3, 4, 5]); - Events actual1 = new Events.capture(multi); - Events actual2 = new Events.capture(multi); - actual1.onDone(expectAsync(() { - Expect.listEquals(expected.events, actual1.events); - })); - actual2.onDone(expectAsync(() { - Expect.listEquals(expected.events, actual2.events); - })); - expected.replay(c); - }); -} diff --git a/tests/lib_2/async/stream_state_helper.dart b/tests/lib_2/async/stream_state_helper.dart deleted file mode 100644 index 131c0585b38..00000000000 --- a/tests/lib_2/async/stream_state_helper.dart +++ /dev/null @@ -1,608 +0,0 @@ -// Copyright (c) 2013, 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 stream_state_helper; - -import 'dart:async'; -import 'dart:collection'; - -import 'package:async_helper/async_minitest.dart'; - -class SubscriptionProtocolTest { - final StreamProtocolTest _streamTest; - final int id; - StreamSubscription _subscription; - - SubscriptionProtocolTest(this.id, this._subscription, this._streamTest); - - void pause([Future resumeSignal]) { - if (_subscription == null) throw new StateError("Not subscribed"); - _subscription.pause(resumeSignal); - } - - void resume() { - if (_subscription == null) throw new StateError("Not subscribed"); - _subscription.resume(); - } - - void cancel() { - if (_subscription == null) throw new StateError("Not subscribed"); - _subscription.cancel(); - _subscription = null; - } - - void expectData(var data, [void action()]) { - _streamTest._expectData(this, data, action); - } - - void expectError(var error, [void action()]) { - _streamTest._expectError(this, error, action); - } - - void expectDone([void action()]) { - _streamTest._expectDone(this, action); - } -} - -class StreamProtocolTest { - bool trace = false; - final bool isBroadcast; - final bool isAsBroadcast; - StreamController _controller; - Stream _controllerStream; - // Most recent subscription created. Used as default for pause/resume. - SubscriptionProtocolTest _latestSubscription; - List _expectations = []; - int _nextExpectationIndex = 0; - int _subscriptionIdCounter = 0; - Function _onComplete; - - StreamProtocolTest.broadcast({bool sync: false}) - : isBroadcast = true, - isAsBroadcast = false { - _controller = new StreamController.broadcast( - sync: sync, onListen: _onListen, onCancel: _onCancel); - _controllerStream = _controller.stream; - _onComplete = expectAsync(() { - _onComplete = null; // Being null marks the test as being complete. - }); - } - - StreamProtocolTest({bool sync: false}) - : isBroadcast = false, - isAsBroadcast = false { - _controller = new StreamController( - sync: sync, - onListen: _onListen, - onPause: _onPause, - onResume: _onResume, - onCancel: _onCancel); - _controllerStream = _controller.stream; - _onComplete = expectAsync(() { - _onComplete = null; // Being null marks the test as being complete. - }); - } - - StreamProtocolTest.asBroadcast({bool sync: false}) - : isBroadcast = false, - isAsBroadcast = true { - _controller = new StreamController( - sync: sync, - onListen: _onListen, - onPause: _onPause, - onResume: _onResume, - onCancel: _onCancel); - _controllerStream = _controller.stream.asBroadcastStream( - onListen: _onBroadcastListen, onCancel: _onBroadcastCancel); - _onComplete = expectAsync(() { - _onComplete = null; // Being null marks the test as being complete. - }); - } - - // Actions on the stream and controller. - void add(var data) { - _controller.add(data); - } - - void error(var error) { - _controller.addError(error); - } - - void close() { - _controller.close(); - } - - SubscriptionProtocolTest listen({bool cancelOnError: false}) { - int subscriptionId = _subscriptionIdCounter++; - - StreamSubscription subscription = _controllerStream.listen((var data) { - _onData(subscriptionId, data); - }, onError: (Object error) { - _onError(subscriptionId, error); - }, onDone: () { - _onDone(subscriptionId); - }, cancelOnError: cancelOnError); - _latestSubscription = - new SubscriptionProtocolTest(subscriptionId, subscription, this); - if (trace) { - print("[Listen #$subscriptionId(#${_latestSubscription.hashCode})]"); - } - return _latestSubscription; - } - - // Actions on the most recently created subscription. - void pause([Future resumeSignal]) { - _latestSubscription.pause(resumeSignal); - } - - void resume() { - _latestSubscription.resume(); - } - - void cancel() { - _latestSubscription.cancel(); - _latestSubscription = null; - } - - // End the test now. There must be no open expectations, and no further - // expectations will be allowed. - // Called automatically by an onCancel event on a non-broadcast stream. - void terminate() { - if (_nextExpectationIndex != _expectations.length) { - _withNextExpectation((Event expect) { - _fail("Expected: $expect\n" - "Found : Early termination.\n${expect._stackTrace}"); - }); - } - _onComplete(); - } - - // Handling of stream events. - void _onData(int id, var data) { - if (trace) print("[Data#$id : $data]"); - _withNextExpectation((Event expect) { - if (!expect.matchData(id, data)) { - _fail("Expected: $expect\n" - "Found : [Data#$id: $data]\n${expect._stackTrace}"); - } - }); - } - - void _onError(int id, Object error) { - if (trace) print("[Error#$id : $error]"); - _withNextExpectation((Event expect) { - if (!expect.matchError(id, error)) { - _fail("Expected: $expect\n" - "Found : [Error#$id: ${error}]\n${expect._stackTrace}"); - } - }); - } - - void _onDone(int id) { - if (trace) print("[Done#$id]"); - _withNextExpectation((Event expect) { - if (!expect.matchDone(id)) { - _fail("Expected: $expect\n" - "Found : [Done#$id]\n${expect._stackTrace}"); - } - }); - } - - void _onPause() { - if (trace) print("[Pause]"); - _withNextExpectation((Event expect) { - if (!expect.matchPause()) { - _fail("Expected: $expect\n" - "Found : [Paused]\n${expect._stackTrace}"); - } - }); - } - - void _onResume() { - if (trace) print("[Resumed]"); - _withNextExpectation((Event expect) { - if (!expect.matchResume()) { - _fail("Expected: $expect\n" - "Found : [Resumed]\n${expect._stackTrace}"); - } - }); - } - - void _onListen() { - if (trace) print("[Subscribed]"); - _withNextExpectation((Event expect) { - if (!expect.matchSubscribe()) { - _fail("Expected: $expect\n" - "Found: [Subscribed]\n${expect._stackTrace}"); - } - }); - } - - void _onCancel() { - if (trace) print("[Cancelled]"); - _withNextExpectation((Event expect) { - if (!expect.matchCancel()) { - _fail("Expected: $expect\n" - "Found: [Cancelled]\n${expect._stackTrace}"); - } - }); - } - - void _onBroadcastListen(StreamSubscription sub) { - if (trace) print("[BroadcastListen]"); - _withNextExpectation((Event expect) { - if (!expect.matchBroadcastListen(sub)) { - _fail("Expected: $expect\n" - "Found: [BroadcastListen]\n${expect._stackTrace}"); - } - }); - } - - void _onBroadcastCancel(StreamSubscription sub) { - if (trace) print("[BroadcastCancel]"); - _withNextExpectation((Event expect) { - if (!expect.matchBroadcastCancel(sub)) { - _fail("Expected: $expect\n" - "Found: [BroadcastCancel]\n${expect._stackTrace}"); - } - }); - } - - void _withNextExpectation(void action(Event expect)) { - if (_nextExpectationIndex == _expectations.length) { - _nextExpectationIndex++; - action(new MismatchEvent()); - } else { - Event next = _expectations[_nextExpectationIndex++]; - action(next); - } - } - - // Adds _expectations. - void expectAny([void action()]) { - if (_onComplete == null) { - _fail("Adding expectation after completing"); - } - _expectations.add(new LogAnyEvent(action)); - } - - void expectData(var data, [void action()]) { - _expectData(null, data, action); - } - - void _expectData(SubscriptionProtocolTest sub, var data, void action()) { - if (_onComplete == null) { - _fail("Adding expectation after completing"); - } - _expectations.add(new DataEvent(sub, data, action)); - } - - void expectError(var error, [void action()]) { - _expectError(null, error, action); - } - - void _expectError(SubscriptionProtocolTest sub, var error, void action()) { - if (_onComplete == null) { - _fail("Adding expectation after completing"); - } - _expectations.add(new ErrorEvent(sub, error, action)); - } - - void expectDone([void action()]) { - _expectDone(null, action); - } - - void _expectDone(SubscriptionProtocolTest sub, [void action()]) { - if (_onComplete == null) { - _fail("Adding expectation after completing"); - } - _expectations.add(new DoneEvent(sub, action)); - } - - void expectPause([void action()]) { - if (_onComplete == null) { - _fail("Adding expectation after completing"); - } - _expectations.add(new PauseCallbackEvent(action)); - } - - void expectResume([void action()]) { - if (_onComplete == null) { - _fail("Adding expectation after completing"); - } - _expectations.add(new ResumeCallbackEvent(action)); - } - - void expectListen([void action()]) { - if (_onComplete == null) { - _fail("Adding expectation after completing"); - } - _expectations.add(new SubscriptionCallbackEvent(action)); - } - - void expectCancel([void action()]) { - if (_onComplete == null) { - _fail("Adding expectation after completing"); - } - _expectations.add(new CancelCallbackEvent(action)); - } - - void expectBroadcastListen([void action(StreamSubscription sub)]) { - if (_onComplete == null) { - _fail("Adding expectation after completing"); - } - if (!isAsBroadcast) throw new StateError("Not an asBroadcast stream"); - _expectations.add(new BroadcastListenCallbackEvent(action)); - } - - void expectBroadcastCancel([void action(StreamSubscription sub)]) { - if (_onComplete == null) { - _fail("Adding expectation after completing"); - } - if (!isAsBroadcast) throw new StateError("Not an asBroadcast stream"); - _expectations.add(new BroadcastCancelCallbackEvent(action)); - } - - void expectBroadcastListenOpt([void action(StreamSubscription sub)]) { - if (_onComplete == null) { - _fail("Adding expectation after completing"); - } - if (!isAsBroadcast) return; - _expectations.add(new BroadcastListenCallbackEvent(action)); - } - - void expectBroadcastCancelOpt([void action(StreamSubscription sub)]) { - if (_onComplete == null) { - _fail("Adding expectation after completing"); - } - if (!isAsBroadcast) return; - _expectations.add(new BroadcastCancelCallbackEvent(action)); - } - - void _fail(String message) { - if (_nextExpectationIndex == 0) { - throw "Unexpected event:\n$message\nNo earlier events matched."; - } - StringBuffer buf = new StringBuffer(); - for (int i = 0; i < _expectations.length; i++) { - if (i == _nextExpectationIndex - 1) { - buf.write("->"); - } else { - buf.write(" "); - } - buf.write(_expectations[i]); - buf.write("\n"); - } - throw "Unexpected event:\n$message\nAll expectations:\n$buf"; - } -} - -class Event { - Function _action; - StackTrace _stackTrace; - Event(void action()) - : _action = (action == null) ? null : expectAsync(action) { - try { - throw 0; - } catch (_, s) { - _stackTrace = s; - } - } - Event.broadcast(void action(StreamSubscription sub)) - : _action = (action == null) ? null : expectAsync(action) { - try { - throw 0; - } catch (_, s) { - _stackTrace = s; - } - } - - bool matchData(int id, var data) { - return false; - } - - bool matchError(int id, e) { - return false; - } - - bool matchDone(int id) { - return false; - } - - bool matchPause() { - if (!_testPause()) return false; - if (_action != null) _action(); - return true; - } - - bool matchResume() { - if (!_testResume()) return false; - if (_action != null) _action(); - return true; - } - - bool matchSubscribe() { - if (!_testSubscribe()) return false; - if (_action != null) _action(); - return true; - } - - bool matchCancel() { - if (!_testCancel()) return false; - if (_action != null) _action(); - return true; - } - - bool matchBroadcastListen(StreamSubscription sub) { - if (!_testBroadcastListen()) return false; - if (_action != null) _action(sub); - return true; - } - - bool matchBroadcastCancel(StreamSubscription sub) { - if (!_testBroadcastCancel()) return false; - if (_action != null) _action(sub); - return true; - } - - bool _testData(_) => false; - bool _testError(_) => false; - bool _testDone() => false; - bool _testPause() => false; - bool _testResume() => false; - bool _testSubscribe() => false; - bool _testCancel() => false; - bool _testBroadcastListen() => false; - bool _testBroadcastCancel() => false; -} - -class SubscriptionEvent extends Event { - SubscriptionProtocolTest subscription; - SubscriptionEvent(this.subscription, void action()) : super(action); - - bool matchData(int id, var data) { - if (subscription != null && subscription.id != id) return false; - if (!_testData(data)) return false; - if (_action != null) _action(); - return true; - } - - bool matchError(int id, e) { - if (subscription != null && subscription.id != id) return false; - if (!_testError(e)) return false; - if (_action != null) _action(); - return true; - } - - bool matchDone(int id) { - if (subscription != null && subscription.id != id) return false; - if (!_testDone()) return false; - if (_action != null) _action(); - return true; - } - - String get _id => (subscription == null) ? "" : "#${subscription.id}"; -} - -class MismatchEvent extends Event { - MismatchEvent() : super(null); - toString() => "[No event expected]"; -} - -class DataEvent extends SubscriptionEvent { - final data; - DataEvent(SubscriptionProtocolTest sub, this.data, void action()) - : super(sub, action); - bool _testData(var data) => this.data == data; - String toString() => "[Data$_id: $data]"; -} - -class ErrorEvent extends SubscriptionEvent { - final error; - ErrorEvent(SubscriptionProtocolTest sub, this.error, void action()) - : super(sub, action); - bool _testError(error) => this.error == error; - String toString() => "[Error$_id: $error]"; -} - -class DoneEvent extends SubscriptionEvent { - DoneEvent(SubscriptionProtocolTest sub, void action()) : super(sub, action); - bool _testDone() => true; - String toString() => "[Done$_id]"; -} - -class PauseCallbackEvent extends Event { - PauseCallbackEvent(void action()) : super(action); - bool _testPause() => true; - String toString() => "[Paused]"; -} - -class ResumeCallbackEvent extends Event { - ResumeCallbackEvent(void action()) : super(action); - bool _testResume() => true; - String toString() => "[Resumed]"; -} - -class SubscriptionCallbackEvent extends Event { - SubscriptionCallbackEvent(void action()) : super(action); - bool _testSubscribe() => true; - String toString() => "[Subscribed]"; -} - -class CancelCallbackEvent extends Event { - CancelCallbackEvent(void action()) : super(action); - bool _testCancel() => true; - String toString() => "[Cancelled]"; -} - -class BroadcastCancelCallbackEvent extends Event { - BroadcastCancelCallbackEvent(void action(StreamSubscription sub)) - : super.broadcast(action); - bool _testBroadcastCancel() => true; - String toString() => "[BroadcastCancel]"; -} - -class BroadcastListenCallbackEvent extends Event { - BroadcastListenCallbackEvent(void action(StreamSubscription sub)) - : super.broadcast(action); - bool _testBroadcastListen() => true; - String toString() => "[BroadcastListen]"; -} - -/** Event matcher that matches any other event. */ -class LogAnyEvent extends Event { - String _actual = "*Not matched yet*"; - - LogAnyEvent(void action()) : super(action); - - bool _testData(var data) { - _actual = "*[Data $data]"; - return true; - } - - bool _testError(error) { - _actual = "*[Error ${error}]"; - return true; - } - - bool _testDone() { - _actual = "*[Done]"; - return true; - } - - bool _testPause() { - _actual = "*[Paused]"; - return true; - } - - bool _testResume() { - _actual = "*[Resumed]"; - return true; - } - - bool _testSubscribe() { - _actual = "*[Subscribed]"; - return true; - } - - bool _testCancel() { - _actual = "*[Cancelled]"; - return true; - } - - bool _testBroadcastListen() { - _actual = "*[BroadcastListen]"; - return true; - } - - bool _testBroadcastCancel() { - _actual = "*[BroadcastCancel]"; - return true; - } - - /** Returns a representation of the event it was tested against. */ - String toString() => _actual; -} diff --git a/tests/lib_2/async/stream_state_nonzero_timer_test.dart b/tests/lib_2/async/stream_state_nonzero_timer_test.dart deleted file mode 100644 index 2b7ef1148f7..00000000000 --- a/tests/lib_2/async/stream_state_nonzero_timer_test.dart +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test the event/callback protocol of the stream implementations. -// Uses a non-zero timer so it fails on d8. - -library stream_state_nonzero_timer_test; - -import 'dart:async'; - -import 'package:async_helper/async_minitest.dart'; - -import 'stream_state_helper.dart'; - -const ms5 = const Duration(milliseconds: 5); - -// Testing pause/resume, some with non-zero duration. This only makes sense for -// non-broadcast streams, since broadcast stream subscriptions handle their -// own pauses. - -main() { - var p = "StreamController"; - - test("$p-sub-data/pause/resume/pause/resume-done", () { - var t = new StreamProtocolTest(); - t - ..expectListen() - ..expectData(42, () { - t.pause(); - }) - ..expectPause(() { - t.resume(); - }) - ..expectResume(() { - t.pause(); - }) - ..expectPause(() { - t.resume(); - }) - ..expectResume(() { - t.close(); - }) - ..expectCancel() - ..expectDone(t.terminate); - t - ..listen() - ..add(42); - }); - - test("$p-sub-data/pause-done", () { - var t = new StreamProtocolTest(); - t - ..expectListen() - ..expectData(42, () { - t.pause(new Future.delayed(ms5, () => null)); - }) - ..expectPause() - ..expectCancel() - ..expectDone(t.terminate); - // We are calling "close" while the controller is actually paused, - // and it will stay paused until the pending events are sent. - t - ..listen() - ..add(42) - ..close(); - }); - - test("$p-sub-data/pause-resume/done", () { - var t = new StreamProtocolTest(); - t - ..expectListen() - ..expectData(42, () { - t.pause(new Future.delayed(ms5, () => null)); - }) - ..expectPause() - ..expectResume(t.close) - ..expectCancel() - ..expectDone(t.terminate); - t - ..listen() - ..add(42); - }); - - test("$p-sub-data/data+pause-data-resume-done", () { - var t = new StreamProtocolTest(); - t - ..expectListen() - ..expectData(42, () { - t.add(43); - t.pause(new Future.delayed(ms5, () => null)); - // Should now be paused until the future finishes. - // After that, the controller stays paused until the pending queue - // is empty. - }) - ..expectPause() - ..expectData(43) - ..expectResume(t.close) - ..expectCancel() - ..expectDone(t.terminate); - t - ..listen() - ..add(42); - }); - - test("$p-pause-during-callback", () { - var t = new StreamProtocolTest(); - t - ..expectListen() - ..expectData(42, () { - t.pause(); - }) - ..expectPause(() { - t.resume(); - }) - ..expectResume(() { - t.pause(); - t.resume(); - t.close(); - }) - ..expectCancel() - ..expectDone(t.terminate); - t - ..listen() - ..add(42); - }); -} diff --git a/tests/lib_2/async/stream_state_test.dart b/tests/lib_2/async/stream_state_test.dart deleted file mode 100644 index 6ea0b137aae..00000000000 --- a/tests/lib_2/async/stream_state_test.dart +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test the event/callback protocol of the stream implementations. -library stream_state_test; - -import 'package:async_helper/async_minitest.dart'; - -import 'stream_state_helper.dart'; - -const ms5 = const Duration(milliseconds: 5); - -main() { - mainTest(sync: true, asBroadcast: false); - mainTest(sync: true, asBroadcast: true); - mainTest(sync: false, asBroadcast: false); - mainTest(sync: false, asBroadcast: true); -} - -void terminateWithDone(t, asBroadcast) { - if (asBroadcast) { - t - ..expectCancel() - ..expectDone() - ..expectBroadcastCancel((_) => t.terminate()); - } else { - t - ..expectCancel() - ..expectDone(t.terminate); - } -} - -mainTest({bool sync, bool asBroadcast}) { - var p = (sync ? "S" : "AS") + (asBroadcast ? "BC" : "SC"); - test("$p-sub-data-done", () { - var t = asBroadcast - ? new StreamProtocolTest.asBroadcast(sync: sync) - : new StreamProtocolTest(sync: sync); - t - ..expectListen() - ..expectBroadcastListenOpt() - ..expectData(42); - terminateWithDone(t, asBroadcast); - t - ..listen() - ..add(42) - ..close(); - }); - - test("$p-data-done-sub-sync", () { - var t = asBroadcast - ? new StreamProtocolTest.asBroadcast(sync: sync) - : new StreamProtocolTest(sync: sync); - t - ..expectListen() - ..expectBroadcastListenOpt() - ..expectData(42); - terminateWithDone(t, asBroadcast); - t - ..add(42) - ..close() - ..listen(); - }); - - test("$p-data-done-sub-async", () { - var t = asBroadcast - ? new StreamProtocolTest.asBroadcast(sync: sync) - : new StreamProtocolTest(sync: sync); - t - ..expectListen() - ..expectBroadcastListenOpt() - ..expectData(42); - terminateWithDone(t, asBroadcast); - t - ..add(42) - ..close() - ..listen(); - }); - - test("$p-sub-data/pause+resume-done", () { - var t = asBroadcast - ? new StreamProtocolTest.asBroadcast(sync: sync) - : new StreamProtocolTest(sync: sync); - t - ..expectListen() - ..expectBroadcastListenOpt() - ..expectData(42, () { - t.pause(); - t.resume(); - t.close(); - }); - terminateWithDone(t, asBroadcast); - t - ..listen() - ..add(42); - }); - - test("$p-sub-data-unsubonerror", () { - var t = asBroadcast - ? new StreamProtocolTest.asBroadcast(sync: sync) - : new StreamProtocolTest(sync: sync); - if (asBroadcast) { - t - ..expectListen() - ..expectBroadcastListen() - ..expectData(42) - ..expectError("bad") - ..expectBroadcastCancel() - ..expectCancel(t.terminate); - } else { - t - ..expectListen() - ..expectData(42) - ..expectCancel() - ..expectError("bad", t.terminate); - } - t - ..listen(cancelOnError: true) - ..add(42) - ..error("bad") - ..add(43) - ..close(); - }); - - test("$p-sub-data-no-unsubonerror", () { - var t = asBroadcast - ? new StreamProtocolTest.asBroadcast(sync: sync) - : new StreamProtocolTest(sync: sync); - t - ..expectListen() - ..expectBroadcastListenOpt() - ..expectData(42) - ..expectError("bad") - ..expectData(43); - terminateWithDone(t, asBroadcast); - t - ..listen(cancelOnError: false) - ..add(42) - ..error("bad") - ..add(43) - ..close(); - }); - - test("$p-pause-resume-during-event", () { - var t = asBroadcast - ? new StreamProtocolTest.broadcast(sync: sync) - : new StreamProtocolTest(sync: sync); - t - ..expectListen() - ..expectBroadcastListenOpt() - ..expectData(42, () { - t.pause(); - t.resume(); - }); - if (!asBroadcast && !sync) { - t..expectPause(); - } - if (asBroadcast && sync) { - t - ..expectDone() - ..expectCancel(t.terminate); - } else { - t - ..expectCancel() - ..expectDone(t.terminate); - } - t - ..listen() - ..add(42) - ..close(); - }); - - test("$p-cancel-on-data", () { - var t = asBroadcast - ? new StreamProtocolTest.asBroadcast(sync: sync) - : new StreamProtocolTest(sync: sync); - t - ..expectListen() - ..expectBroadcastListenOpt() - ..expectData(42, t.cancel) - ..expectBroadcastCancelOpt() - ..expectCancel(t.terminate); - t - ..listen(cancelOnError: false) - ..add(42) - ..close(); - }); - - test("$p-cancel-on-error", () { - var t = asBroadcast - ? new StreamProtocolTest.asBroadcast(sync: sync) - : new StreamProtocolTest(sync: sync); - t - ..expectListen() - ..expectBroadcastListenOpt() - ..expectError(42, t.cancel) - ..expectBroadcastCancelOpt() - ..expectCancel(t.terminate); - t - ..listen(cancelOnError: false) - ..error(42) - ..close(); - }); -} diff --git a/tests/lib_2/async/stream_subscription_as_future_test.dart b/tests/lib_2/async/stream_subscription_as_future_test.dart deleted file mode 100644 index 131ac391a6f..00000000000 --- a/tests/lib_2/async/stream_subscription_as_future_test.dart +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test the Stream.single method. -library stream_single_test; - -import 'dart:async'; - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_minitest.dart'; - -main() { - test("subscription.asFuture success", () { - Stream stream = new Stream.fromIterable([1, 2, 3]); - var output = []; - var subscription = stream.listen((x) { - output.add(x); - }); - subscription.asFuture(output).then(expectAsync((o) { - Expect.listEquals([1, 2, 3], o); - })); - }); - - test("subscription.asFuture success2", () { - StreamController controller = new StreamController(sync: true); - [1, 2, 3].forEach(controller.add); - controller.close(); - Stream stream = controller.stream; - var output = []; - var subscription = stream.listen((x) { - output.add(x); - }); - subscription.asFuture(output).then(expectAsync((o) { - Expect.listEquals([1, 2, 3], o); - })); - }); - - test("subscription.asFuture success 3", () { - Stream stream = new Stream.fromIterable([1, 2, 3]).map((x) => x); - var output = []; - var subscription = stream.listen((x) { - output.add(x); - }); - subscription.asFuture(output).then(expectAsync((o) { - Expect.listEquals([1, 2, 3], o); - })); - }); - - test("subscription.asFuture different type", () { - Stream stream = new Stream.fromIterable([1, 2, 3]); - var asyncCallback = expectAsync(() => {}); - var output = []; - var subscription = stream.listen((x) { - output.add(x); - }); - subscription.asFuture("string").then((String o) { - Expect.listEquals([1, 2, 3], output); - Expect.equals("string", o); - asyncCallback(); - }); - }); - - test("subscription.asFuture failure", () { - StreamController controller = new StreamController(sync: true); - [1, 2, 3].forEach(controller.add); - controller.addError("foo"); - controller.close(); - Stream stream = controller.stream; - var output = []; - var subscription = stream.listen((x) { - output.add(x); - }); - subscription.asFuture(output).catchError(expectAsync((error) { - Expect.equals(error, "foo"); - })); - }); - - test("subscription.asFuture failure2", () { - Stream stream = new Stream.fromIterable([1, 2, 3, 4]).map((x) { - if (x == 4) throw "foo"; - return x; - }); - var output = []; - var subscription = stream.listen((x) { - output.add(x); - }); - subscription.asFuture(output).catchError(expectAsync((error) { - Expect.equals(error, "foo"); - })); - }); - - test("subscription.asFuture delayed cancel", () { - var completer = new Completer(); - var controller = - new StreamController(onCancel: () => completer.future, sync: true); - [1, 2, 3].forEach(controller.add); - controller.addError("foo"); - controller.close(); - Stream stream = controller.stream; - var output = []; - var subscription = stream.listen((x) { - output.add(x); - }); - bool catchErrorHasRun = false; - subscription.asFuture(output).catchError(expectAsync((error) { - Expect.equals(error, "foo"); - catchErrorHasRun = true; - })); - Timer.run(expectAsync(() { - Expect.isFalse(catchErrorHasRun); - completer.complete(); - })); - }); - - test("subscription.asFuture failure in cancel", () { - runZonedGuarded(() { - var completer = new Completer(); - var controller = - new StreamController(onCancel: () => completer.future, sync: true); - [1, 2, 3].forEach(controller.add); - controller.addError("foo"); - controller.close(); - Stream stream = controller.stream; - var output = []; - var subscription = stream.listen((x) { - output.add(x); - }); - bool catchErrorHasRun = false; - subscription.asFuture(output).catchError(expectAsync((error) { - Expect.equals(error, "foo"); - catchErrorHasRun = true; - })); - Timer.run(expectAsync(() { - Expect.isFalse(catchErrorHasRun); - completer.completeError(499); - })); - }, expectAsync2((e, s) { - Expect.equals(499, e); - })); - }); -} diff --git a/tests/lib_2/async/stream_subscription_cancel_test.dart b/tests/lib_2/async/stream_subscription_cancel_test.dart deleted file mode 100644 index db8062e3f76..00000000000 --- a/tests/lib_2/async/stream_subscription_cancel_test.dart +++ /dev/null @@ -1,321 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test the StreamSubscription.cancel return Future. -library stream_subscription_cancel; - -import 'dart:async'; - -import 'package:async_helper/async_minitest.dart'; - -void main() { - test('subscription.cancel', () { - var completer = new Completer(); - StreamController controller = - new StreamController(onCancel: () => completer.future); - - bool done = false; - expect(controller.stream.listen(null).cancel().then((_) => done), - completion(equals(true))); - - Timer.run(() { - done = true; - completer.complete(); - }); - }); - - test('subscription.cancel after close', () { - var completer = new Completer(); - StreamController controller = new StreamController(onCancel: () { - completer.complete(); - return completer.future; - }); - - controller.close(); - - var completer2 = new Completer(); - var sub; - void onDone() { - sub.cancel().then(completer2.complete); - } - - sub = controller.stream.listen(null, onDone: onDone); - expect(completer.future, completes); - expect(completer2.future, completes); - }); - - test('subscription.cancel after error', () { - var completer = new Completer(); - StreamController controller = - new StreamController(onCancel: () => completer.future); - - controller.addError("error"); - - bool done = false; - - var subscription; - var doneCompleter = new Completer(); - void onError(e) { - subscription.cancel().then((_) => doneCompleter.complete(done)); - done = true; - completer.complete(); - } - - subscription = controller.stream.listen(null, onError: onError); - expect(doneCompleter.future, completion(equals(true))); - }); - - test('subscription.cancel after error (cancelOnError)', () { - bool called = false; - StreamController controller = new StreamController(onCancel: () { - called = true; - }); - - controller.addError("error"); - - var doneCompleter = new Completer(); - void onError(e) { - expect(called, equals(true)); - doneCompleter.complete(true); - } - - controller.stream.listen(null, onError: onError, cancelOnError: true); - expect(doneCompleter.future, completion(equals(true))); - }); - - test('subscription.cancel before error (cancelOnError)', () { - var doneCompleter = new Completer(); - StreamController controller = new StreamController(onCancel: () { - doneCompleter.complete(true); - }); - - controller.addError("error"); - - void onError(e) { - fail("onError is unexpected"); - } - - controller.stream - .listen(null, onError: onError, cancelOnError: true) - .cancel(); - expect(doneCompleter.future, completion(equals(true))); - }); - - test('subscription.cancel on error (cancelOnError)', () { - bool called = false; - StreamController controller = new StreamController(onCancel: () { - expect(called, isFalse); - called = true; - }); - - controller.addError("error"); - - var doneCompleter = new Completer(); - var sub; - void onError(e) { - expect(called, equals(true)); - sub.cancel(); - doneCompleter.complete(true); - } - - sub = controller.stream.listen(null, onError: onError, cancelOnError: true); - expect(doneCompleter.future, completion(equals(true))); - }); - - test('subscription.cancel before done', () { - var doneCompleter = new Completer(); - StreamController controller = new StreamController(onCancel: () { - doneCompleter.complete(true); - }); - - controller.close(); - - void onDone() { - fail("onDone is unexpected"); - } - - controller.stream.listen(null, onDone: onDone).cancel(); - expect(doneCompleter.future, completion(equals(true))); - }); - - test('subscription.cancel through map', () { - var completer = new Completer(); - StreamController controller = - new StreamController(onCancel: () => completer.future); - - bool done = false; - var future = controller.stream.map((x) => x).listen(null).cancel(); - - expect(future.then((_) => done = true), completion(equals(true))); - - Timer.run(() { - expect(done, isFalse); - completer.complete(); - }); - }); - - test('subscription.cancel through asyncMap', () { - var completer = new Completer(); - StreamController controller = - new StreamController(onCancel: () => completer.future); - - bool done = false; - var future = controller.stream.asyncMap((x) => x).listen(null).cancel(); - - expect(future.then((_) => done = true), completion(equals(true))); - - Timer.run(() { - expect(done, isFalse); - completer.complete(); - }); - }); - - test('subscription.cancel through asyncExpand', () { - var completer = new Completer(); - StreamController controller = - new StreamController(onCancel: () => completer.future); - - bool done = false; - var future = controller.stream.asyncExpand((x) => x).listen(null).cancel(); - - expect(future.then((_) => done = true), completion(equals(true))); - - Timer.run(() { - expect(done, isFalse); - completer.complete(); - }); - }); - - test('subscription.cancel through handleError', () { - var completer = new Completer(); - StreamController controller = - new StreamController(onCancel: () => completer.future); - - bool done = false; - var future = controller.stream.handleError((x) => x).listen(null).cancel(); - - expect(future.then((_) => done = true), completion(equals(true))); - - Timer.run(() { - expect(done, isFalse); - completer.complete(); - }); - }); - - test('subscription.cancel through skip', () { - var completer = new Completer(); - StreamController controller = - new StreamController(onCancel: () => completer.future); - - bool done = false; - var future = controller.stream.skip(1).listen(null).cancel(); - - expect(future.then((_) => done = true), completion(equals(true))); - - Timer.run(() { - expect(done, isFalse); - completer.complete(); - }); - }); - - test('subscription.cancel through take', () { - var completer = new Completer(); - StreamController controller = - new StreamController(onCancel: () => completer.future); - - bool done = false; - var future = controller.stream.take(1).listen(null).cancel(); - - expect(future.then((_) => done = true), completion(equals(true))); - - Timer.run(() { - expect(done, isFalse); - completer.complete(); - }); - }); - - test('subscription.cancel through skipWhile', () { - var completer = new Completer(); - StreamController controller = - new StreamController(onCancel: () => completer.future); - - bool done = false; - var future = controller.stream.skipWhile((x) => true).listen(null).cancel(); - - expect(future.then((_) => done = true), completion(equals(true))); - - Timer.run(() { - expect(done, isFalse); - completer.complete(); - }); - }); - - test('subscription.cancel through takeWhile', () { - var completer = new Completer(); - StreamController controller = - new StreamController(onCancel: () => completer.future); - - bool done = false; - var future = controller.stream.takeWhile((x) => true).listen(null).cancel(); - - expect(future.then((_) => done = true), completion(equals(true))); - - Timer.run(() { - expect(done, isFalse); - completer.complete(); - }); - }); - - test('subscription.cancel through timeOut', () { - var completer = new Completer(); - StreamController controller = - new StreamController(onCancel: () => completer.future); - - bool done = false; - var duration = const Duration(hours: 5); - var future = controller.stream.timeout(duration).listen(null).cancel(); - - expect(future.then((_) => done = true), completion(equals(true))); - - Timer.run(() { - expect(done, isFalse); - completer.complete(); - }); - }); - - test('subscription.cancel through transform', () { - var completer = new Completer(); - StreamController controller = - new StreamController(onCancel: () => completer.future); - - bool done = false; - var transformer = new StreamTransformer.fromHandlers(handleData: (x, y) {}); - var future = controller.stream.transform(transformer).listen(null).cancel(); - - expect(future.then((_) => done = true), completion(equals(true))); - - Timer.run(() { - expect(done, isFalse); - completer.complete(); - }); - }); - - test('subscription.cancel through where', () { - var completer = new Completer(); - StreamController controller = - new StreamController(onCancel: () => completer.future); - - bool done = false; - var future = controller.stream.where((x) => true).listen(null).cancel(); - - expect(future.then((_) => done = true), completion(equals(true))); - - Timer.run(() { - expect(done, isFalse); - completer.complete(); - }); - }); -} diff --git a/tests/lib_2/async/stream_take_test.dart b/tests/lib_2/async/stream_take_test.dart deleted file mode 100644 index 2b193321a42..00000000000 --- a/tests/lib_2/async/stream_take_test.dart +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2016, 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 - -import 'dart:async'; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -class A { - const A(); -} - -class B extends A { - const B(); -} - -/// Stream which emits an error if it's not canceled at the correct time. -/// -/// Must be canceled after at most [maxEvents] events. -Stream makeStream(int maxEvents) { - var c; - int event = 0; - bool canceled = false; - c = new StreamController(onListen: () { - new Timer.periodic(const Duration(milliseconds: 10), (t) { - if (canceled) { - t.cancel(); - return; - } - if (event == maxEvents) { - c.addError("NOT CANCELED IN TIME: $maxEvents"); - c.close(); - t.cancel(); - } else { - c.add(event++); - } - }); - }, onCancel: () { - canceled = true; - }); - return c.stream; -} - -main() { - asyncStart(); - tests().then((_) { - asyncEnd(); - }); -} - -tests() async { - await expectThrowsAsync(makeStream(4).take(5).toList(), "5/4"); - await expectThrowsAsync(makeStream(0).take(1).toList(), "1/0"); - - Expect.listEquals([0, 1, 2, 3, 4], await makeStream(5).take(5).toList()); - - Expect.listEquals([0, 1, 2, 3], await makeStream(5).take(4).toList()); - - Expect.listEquals([0], await makeStream(5).take(1).toList()); - - Expect.listEquals([], await makeStream(5).take(0).toList()); - - Expect.listEquals([], await makeStream(0).take(0).toList()); - - // Regression for https://github.com/dart-lang/sdk/issues/30305 - Expect.equals('result', await makeStream(5).take(0).drain('result')); -} - -Future expectThrowsAsync(Future computation, String name) { - return computation.then((_) { - Expect.fail("$name: Did not throw"); - }, onError: (e, s) {}); -} diff --git a/tests/lib_2/async/stream_timeout_test.dart b/tests/lib_2/async/stream_timeout_test.dart deleted file mode 100644 index e632d4ef3a2..00000000000 --- a/tests/lib_2/async/stream_timeout_test.dart +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'dart:async'; - -import 'package:async_helper/async_minitest.dart'; - -main() { - const ms5 = const Duration(milliseconds: 5); - const twoSecs = const Duration(seconds: 2); - - test("stream timeout", () { - StreamController c = new StreamController(); - Stream tos = c.stream.timeout(ms5); - expect(tos.isBroadcast, false); - tos.handleError(expectAsync((e, s) { - expect(e, new isInstanceOf()); - expect(s, StackTrace.empty); - })).listen((v) { - fail("Unexpected event"); - }); - }); - - test("stream timeout add events", () { - StreamController c = new StreamController(); - Stream tos = c.stream.timeout(ms5, onTimeout: (sink) { - sink.add(42); - sink.addError("ERROR"); - sink.close(); - }); - expect(tos.isBroadcast, false); - tos.listen(expectAsync((v) { - expect(v, 42); - }), onError: expectAsync((e, s) { - expect(e, "ERROR"); - }), onDone: expectAsync(() {})); - }); - - test("stream no timeout", () { - StreamController c = new StreamController(); - Stream tos = c.stream.timeout(twoSecs); - int ctr = 0; - tos.listen((v) { - expect(v, 42); - ctr++; - }, onError: (e, s) { - fail("No error expected"); - }, onDone: expectAsync(() { - expect(ctr, 2); - })); - expect(tos.isBroadcast, false); - c - ..add(42) - ..add(42) - ..close(); // Faster than a timeout! - }); - - test("stream timeout after events", () { - StreamController c = new StreamController(); - Stream tos = c.stream.timeout(twoSecs); - expect(tos.isBroadcast, false); - int ctr = 0; - tos.listen((v) { - expect(v, 42); - ctr++; - }, onError: expectAsync((e, s) { - expect(ctr, 2); - expect(e, new isInstanceOf()); - })); - c..add(42)..add(42); // No close, timeout after two events. - }); - - test("broadcast stream timeout", () { - StreamController c = new StreamController.broadcast(); - Stream tos = c.stream.timeout(ms5); - expect(tos.isBroadcast, true); - tos.handleError(expectAsync((e, s) { - expect(e, new isInstanceOf()); - expect(s, StackTrace.empty); - })).listen((v) { - fail("Unexpected event"); - }); - }); - - test("asBroadcast stream timeout", () { - StreamController c = new StreamController.broadcast(); - Stream tos = c.stream.asBroadcastStream().timeout(ms5); - expect(tos.isBroadcast, true); - tos.handleError(expectAsync((e, s) { - expect(e, new isInstanceOf()); - expect(s, StackTrace.empty); - })).listen((v) { - fail("Unexpected event"); - }); - }); - - test("mapped stream timeout", () { - StreamController c = new StreamController(); - Stream tos = c.stream.map((x) => 2 * x).timeout(ms5); - expect(tos.isBroadcast, false); - tos.handleError(expectAsync((e, s) { - expect(e, new isInstanceOf()); - expect(s, StackTrace.empty); - })).listen((v) { - fail("Unexpected event"); - }); - }); - - test("events prevent timeout", () { - Stopwatch sw = new Stopwatch(); - StreamController c = new StreamController(); - Stream tos = c.stream.timeout(twoSecs, onTimeout: (_) { - int elapsed = sw.elapsedMilliseconds; - if (elapsed > 250) { - // This should not happen, but it does occasionally. - // Starving the periodic timer has made the test useless. - print("Periodic timer of 5 ms delayed $elapsed ms."); - return; - } - fail("Timeout not prevented by events"); - throw "ERROR"; - }); - // Start the periodic timer before we start listening to the stream. - // This should reduce the flakiness of the test. - int ctr = 200; // send this many events at 5ms intervals. Then close. - new Timer.periodic(ms5, (timer) { - sw.reset(); - c.add(42); - if (--ctr == 0) { - timer.cancel(); - c.close(); - } - }); - sw.start(); - - tos.listen((v) { - expect(v, 42); - }, onDone: expectAsync(() {})); - }); - - test("errors prevent timeout", () { - Stopwatch sw = new Stopwatch(); - StreamController c = new StreamController(); - Stream tos = c.stream.timeout(twoSecs, onTimeout: (_) { - int elapsed = sw.elapsedMilliseconds; - if (elapsed > 250) { - // This should not happen, but it does occasionally. - // Starving the periodic timer has made the test useless. - print("Periodic timer of 5 ms delayed $elapsed ms."); - return; - } - fail("Timeout not prevented by errors"); - }); - - // Start the periodic timer before we start listening to the stream. - // This should reduce the flakiness of the test. - int ctr = 200; // send this many error events at 5ms intervals. Then close. - new Timer.periodic(ms5, (timer) { - sw.reset(); - c.addError("ERROR"); - if (--ctr == 0) { - timer.cancel(); - c.close(); - } - }); - sw.start(); - - tos.listen((_) {}, onError: (e, s) { - expect(e, "ERROR"); - }, onDone: expectAsync(() {})); - }); - - test("closing prevents timeout", () { - StreamController c = new StreamController(); - Stream tos = c.stream.timeout(twoSecs, onTimeout: (_) { - fail("Timeout not prevented by close"); - }); - tos.listen((_) {}, onDone: expectAsync(() {})); - c.close(); - }); - - test("pausing prevents timeout", () { - StreamController c = new StreamController(); - Stream tos = c.stream.timeout(ms5, onTimeout: (_) { - fail("Timeout not prevented by close"); - }); - var subscription = tos.listen((_) {}, onDone: expectAsync(() {})); - subscription.pause(); - new Timer(twoSecs, () { - c.close(); - subscription.resume(); - }); - }); -} diff --git a/tests/lib_2/async/stream_transform_test.dart b/tests/lib_2/async/stream_transform_test.dart deleted file mode 100644 index 955b9ff84b0..00000000000 --- a/tests/lib_2/async/stream_transform_test.dart +++ /dev/null @@ -1,69 +0,0 @@ -// 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 stream_transform_test; - -import 'dart:async'; - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_minitest.dart'; - -import 'event_helper.dart'; - -main() { - // Regression tests for http://dartbug.com/8310 and 8311 - - test("simpleDone", () { - StreamController c = new StreamController(sync: true); - Stream out = c.stream.handleError((x) {}).handleError((x) {}); - out.listen((v) {}, onDone: expectAsync(() {})); - // Should not throw. - c.close(); - }); - - test("with events", () { - StreamController c = new StreamController(sync: true); - Events expected = new Events.fromIterable([10, 12]); - Events input = new Events.fromIterable([1, 2, 3, 4, 5, 6, 7]); - Events actual = new Events.capture( - c.stream.map((x) => x * 2).where((x) => x > 5).skip(2).take(2)); - actual.onDone(expectAsync(() { - Expect.listEquals(expected.events, actual.events); - })); - input.replay(c); - }); - - test("paused events", () { - StreamController c = new StreamController(sync: true); - Events expected = new Events.fromIterable([10, 12]); - Events input = new Events.fromIterable([1, 2, 3, 4, 5, 6, 7]); - Events actual = new Events.capture( - c.stream.map((x) => x * 2).where((x) => x > 5).skip(2).take(2)); - actual.onDone(expectAsync(() { - Expect.listEquals(expected.events, actual.events); - })); - actual.pause(); - input.replay(c); - actual.resume(); - }); - - test("closing after done", () { - var controller = new StreamController(sync: true); - controller.stream - .map((e) => e) - .transform( - new StreamTransformer.fromHandlers(handleData: (element, sink) { - sink.add(element); - }, handleDone: (sink) { - sink.close(); - })) - .listen(expectAsync((e) => expect(e, equals("foo")))); - - controller.add("foo"); - // Should not crash. - controller.close(); - }); -} diff --git a/tests/lib_2/async/stream_transformation_broadcast_test.dart b/tests/lib_2/async/stream_transformation_broadcast_test.dart deleted file mode 100644 index 34ec9eb2482..00000000000 --- a/tests/lib_2/async/stream_transformation_broadcast_test.dart +++ /dev/null @@ -1,364 +0,0 @@ -// Copyright (c) 2013, 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 - -// Test that transformations like `map` and `where` preserve broadcast flag. -library stream_join_test; - -import 'dart:async'; - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_minitest.dart'; - -import 'event_helper.dart'; - -main() { - testStream("singlesub", () => new StreamController(), (c) => c.stream); - testStream( - "broadcast", () => new StreamController.broadcast(), (c) => c.stream); - testStream("asBroadcast", () => new StreamController(), - (c) => c.stream.asBroadcastStream()); - testStream("broadcast.asBroadcast", () => new StreamController.broadcast(), - (c) => c.stream.asBroadcastStream()); -} - -void testStream( - String name, StreamController create(), Stream getStream(controller)) { - test("$name-map", () { - var c = create(); - var s = getStream(c); - Stream newStream = s.map((x) => x + 1); - Expect.equals(s.isBroadcast, newStream.isBroadcast); - newStream.single.then(expectAsync((v) { - Expect.equals(43, v); - })); - c.add(42); - c.close(); - }); - test("$name-where", () { - var c = create(); - var s = getStream(c); - Stream newStream = s.where((x) => x.isEven); - Expect.equals(s.isBroadcast, newStream.isBroadcast); - newStream.single.then(expectAsync((v) { - Expect.equals(42, v); - })); - c.add(37); - c.add(42); - c.add(87); - c.close(); - }); - test("$name-handleError", () { - var c = create(); - var s = getStream(c); - Stream newStream = s.handleError((x, s) {}); - Expect.equals(s.isBroadcast, newStream.isBroadcast); - newStream.single.then(expectAsync((v) { - Expect.equals(42, v); - })); - c.addError("BAD1"); - c.add(42); - c.addError("BAD2"); - c.close(); - }); - test("$name-expand", () { - var c = create(); - var s = getStream(c); - Stream newStream = s.expand((x) => x.isEven ? [x] : []); - Expect.equals(s.isBroadcast, newStream.isBroadcast); - newStream.single.then(expectAsync((v) { - Expect.equals(42, v); - })); - c.add(37); - c.add(42); - c.add(87); - c.close(); - }); - test("$name-transform", () { - var c = create(); - var s = getStream(c); - // TODO: find name of default transformer - var t = - new StreamTransformer.fromHandlers(handleData: (value, EventSink sink) { - sink.add(value); - }); - Stream newStream = s.transform(t); - Expect.equals(s.isBroadcast, newStream.isBroadcast); - newStream.single.then(expectAsync((v) { - Expect.equals(42, v); - })); - c.add(42); - c.close(); - }); - test("$name-take", () { - var c = create(); - var s = getStream(c); - Stream newStream = s.take(1); - Expect.equals(s.isBroadcast, newStream.isBroadcast); - newStream.single.then(expectAsync((v) { - Expect.equals(42, v); - })); - c.add(42); - c.add(37); - c.close(); - }); - test("$name-takeWhile", () { - var c = create(); - var s = getStream(c); - Stream newStream = s.takeWhile((x) => x.isEven); - Expect.equals(s.isBroadcast, newStream.isBroadcast); - newStream.single.then(expectAsync((v) { - Expect.equals(42, v); - })); - c.add(42); - c.add(37); - c.close(); - }); - test("$name-skip", () { - var c = create(); - var s = getStream(c); - Stream newStream = s.skip(1); - Expect.equals(s.isBroadcast, newStream.isBroadcast); - newStream.single.then(expectAsync((v) { - Expect.equals(42, v); - })); - c.add(37); - c.add(42); - c.close(); - }); - test("$name-skipWhile", () { - var c = create(); - var s = getStream(c); - Stream newStream = s.skipWhile((x) => x.isOdd); - Expect.equals(s.isBroadcast, newStream.isBroadcast); - newStream.single.then(expectAsync((v) { - Expect.equals(42, v); - })); - c.add(37); - c.add(42); - c.close(); - }); - test("$name-distinct", () { - var c = create(); - var s = getStream(c); - Stream newStream = s.distinct(); - Expect.equals(s.isBroadcast, newStream.isBroadcast); - newStream.single.then(expectAsync((v) { - Expect.equals(42, v); - })); - c.add(42); - c.add(42); - c.close(); - }); - test("$name-timeout", () { - var c = create(); - var s = getStream(c); - Stream newStream = s.timeout(const Duration(seconds: 1)); - Expect.equals(s.isBroadcast, newStream.isBroadcast); - newStream.single.then(expectAsync((v) { - Expect.equals(42, v); - })); - c.add(42); - c.close(); - }); - test("$name-asyncMap", () { - var c = create(); - var s = getStream(c); - Stream newStream = s.asyncMap((x) => new Future.value(x + 1)); - Expect.equals(s.isBroadcast, newStream.isBroadcast); - newStream.single.then(expectAsync((v) { - Expect.equals(43, v); - })); - c.add(42); - c.close(); - }); - test("$name-asyncExpand", () { - var c = create(); - var s = getStream(c); - Stream newStream = s.asyncExpand((x) => new Stream.fromIterable([x + 1])); - Expect.equals(s.isBroadcast, newStream.isBroadcast); - newStream.single.then(expectAsync((v) { - Expect.equals(43, v); - })); - c.add(42); - c.close(); - }); - - // The following tests are only on broadcast streams, they require listening - // more than once. - if (name.startsWith("singlesub")) return; - - test("$name-skip-multilisten", () { - if (name.startsWith("singlesub") || name.startsWith("asBroadcast")) return; - var c = create(); - var s = getStream(c); - Stream newStream = s.skip(5); - // Listen immediately, to ensure that an asBroadcast stream is started. - var sub = newStream.listen((_) {}); - int i = 0; - var expect1 = 11; - var expect2 = 21; - var handler2 = expectAsync((v) { - expect(v, expect2); - expect2++; - }, count: 5); - var handler1 = expectAsync((v) { - expect(v, expect1); - expect1++; - }, count: 15); - var loop; - loop = expectAsync(() { - i++; - c.add(i); - if (i == 5) { - scheduleMicrotask(() { - newStream.listen(handler1); - }); - } - if (i == 15) { - scheduleMicrotask(() { - newStream.listen(handler2); - }); - } - if (i < 25) { - scheduleMicrotask(loop); - } else { - sub.cancel(); - c.close(); - } - }, count: 25); - scheduleMicrotask(loop); - }); - - test("$name-take-multilisten", () { - var c = create(); - var s = getStream(c); - Stream newStream = s.take(10); - // Listen immediately, to ensure that an asBroadcast stream is started. - var sub = newStream.listen((_) {}); - int i = 0; - var expect1 = 6; - var expect2 = 11; - var handler2 = expectAsync((v) { - expect(v, expect2); - expect(v <= 20, isTrue); - expect2++; - }, count: 10); - var handler1 = expectAsync((v) { - expect(v, expect1); - expect(v <= 15, isTrue); - expect1++; - }, count: 10); - var loop; - loop = expectAsync(() { - i++; - c.add(i); - if (i == 5) { - scheduleMicrotask(() { - newStream.listen(handler1); - }); - } - if (i == 10) { - scheduleMicrotask(() { - newStream.listen(handler2); - }); - } - if (i < 25) { - scheduleMicrotask(loop); - } else { - sub.cancel(); - c.close(); - } - }, count: 25); - scheduleMicrotask(loop); - }); - - test("$name-skipWhile-multilisten", () { - if (name.startsWith("singlesub") || name.startsWith("asBroadcast")) return; - var c = create(); - var s = getStream(c); - Stream newStream = s.skipWhile((x) => (x % 10) != 1); - // Listen immediately, to ensure that an asBroadcast stream is started. - var sub = newStream.listen((_) {}); - int i = 0; - var expect1 = 11; - var expect2 = 21; - var handler2 = expectAsync((v) { - expect(v, expect2); - expect2++; - }, count: 5); - var handler1 = expectAsync((v) { - expect(v, expect1); - expect1++; - }, count: 15); - var loop; - loop = expectAsync(() { - i++; - c.add(i); - if (i == 5) { - scheduleMicrotask(() { - newStream.listen(handler1); - }); - } - if (i == 15) { - scheduleMicrotask(() { - newStream.listen(handler2); - }); - } - if (i < 25) { - scheduleMicrotask(loop); - } else { - sub.cancel(); - c.close(); - } - }, count: 25); - scheduleMicrotask(loop); - }); - - test("$name-takeWhile-multilisten", () { - var c = create(); - var s = getStream(c); - Stream newStream = s.takeWhile((x) => (x % 10) != 5); - // Listen immediately, to ensure that an asBroadcast stream is started. - var sub = newStream.listen((_) {}); - int i = 0; - // Non-overlapping ranges means the test must not remember its first - // failure. - var expect1 = 6; - var expect2 = 16; - var handler2 = expectAsync((v) { - expect(v, expect2); - expect(v <= 25, isTrue); - expect2++; - }, count: 9); - var handler1 = expectAsync((v) { - expect(v, expect1); - expect(v <= 15, isTrue); - expect1++; - }, count: 9); - var loop; - loop = expectAsync(() { - i++; - c.add(i); - if (i == 5) { - scheduleMicrotask(() { - newStream.listen(handler1); - }); - } - if (i == 15) { - scheduleMicrotask(() { - newStream.listen(handler2); - }); - } - if (i < 25) { - scheduleMicrotask(loop); - } else { - sub.cancel(); - c.close(); - } - }, count: 25); - scheduleMicrotask(loop); - }); -} diff --git a/tests/lib_2/async/stream_transformer_from_bind_test.dart b/tests/lib_2/async/stream_transformer_from_bind_test.dart deleted file mode 100644 index 6908de16309..00000000000 --- a/tests/lib_2/async/stream_transformer_from_bind_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2018, 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 - -import 'dart:async'; - -import "package:async_helper/async_helper.dart"; -import 'package:expect/expect.dart'; - -import 'event_helper.dart'; - -void main() { - asyncStart(); - var transformer = - new StreamTransformer.fromBind((s) => s.map((v) => '$v')); - var controller = new StreamController(sync: true); - Events expected = new Events.fromIterable(['1', '2']); - Events input = new Events.fromIterable([1, 2]); - Events actual = new Events.capture(controller.stream.transform(transformer)); - actual.onDone(() { - Expect.listEquals(expected.events, actual.events); - asyncEnd(); - }); - input.replay(controller); -} diff --git a/tests/lib_2/async/stream_transformer_from_handlers_test.dart b/tests/lib_2/async/stream_transformer_from_handlers_test.dart deleted file mode 100644 index 6b5a95e44e3..00000000000 --- a/tests/lib_2/async/stream_transformer_from_handlers_test.dart +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; -import 'event_helper.dart'; - -get currentStackTrace { - try { - throw 0; - } catch (e, st) { - return st; - } -} - -// In most cases the callback will be 'asyncEnd'. Errors are reported -// asynchronously. We want to give them time to surface before reporting -// asynchronous tests as done. -void delayCycles(callback, int nbCycles) { - if (nbCycles == 0) { - callback(); - return; - } - Timer.run(() { - delayCycles(callback, nbCycles - 1); - }); -} - -main() { - // Make sure the generic types are correct. - asyncStart(); - var stackTrace = currentStackTrace; - var events = []; - var controller; - controller = new StreamController(onListen: () { - controller.add(499); - controller.addError(42, stackTrace); - controller.close(); - }); - controller.stream - .transform(new StreamTransformer.fromHandlers( - handleData: (int data, EventSink sink) { - sink.add(data.toString()); - }, handleError: (e, st, EventSink sink) { - sink.add(e.toString()); - sink.addError(e, st); - }, handleDone: (EventSink sink) { - sink.add("done"); - sink.close(); - })) - .listen((data) => events.add(data), onError: (e, st) { - events.add(e); - events.add(st); - }, onDone: () { - Expect.listEquals(["499", "42", 42, stackTrace, "done"], events); - delayCycles(asyncEnd, 3); - }); -} diff --git a/tests/lib_2/async/stream_transformer_test.dart b/tests/lib_2/async/stream_transformer_test.dart deleted file mode 100644 index 7905a622381..00000000000 --- a/tests/lib_2/async/stream_transformer_test.dart +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'dart:async'; - -_defaultData(x) {} -_defaultError(e, [st]) {} -_defaultDone() {} - -/// Dummy StreamSubscription. -class MyStreamSubscription implements StreamSubscription { - final Stream stream; - final bool cancelOnError; - Function handleData = null; - Function handleError = null; - Function handleDone = null; - - MyStreamSubscription(this.stream, this.cancelOnError); - - Future cancel() => null; - void onData(void handleData(T data)) { - this.handleData = handleData == null ? _defaultData : handleData; - } - - void onError(Function handleError) { - this.handleError = handleError == null ? _defaultError : handleError; - } - - void onDone(void handleDone()) { - this.handleDone = handleDone == null ? _defaultDone : handleDone; - } - - void pause([Future resumeSignal]) {} - void resume() {} - - final isPaused = false; - Future asFuture([E futureValue]) => null; -} - -main() { - var transformer = new StreamTransformer( - (stream, cancelOnError) => - new MyStreamSubscription(stream, cancelOnError)); - - var controller = new StreamController(sync: true); - var stream = controller.stream; - var transformed = stream.transform(transformer); - - Expect.isFalse(transformed.isBroadcast); - - var handleData = (String _) => 499; - var handleError = (e, st) => 42; - var handleDone = () => 99; - - MyStreamSubscription subscription = - transformed.listen(handleData, onError: handleError, onDone: handleDone); - - Expect.identical(stream, subscription.stream); - Expect.equals(false, subscription.cancelOnError); - Expect.identical(handleData, subscription.handleData); - Expect.identical(handleError, subscription.handleError); - Expect.identical(handleDone, subscription.handleDone); - - // Note that we reuse the transformer. - - controller = new StreamController(sync: true); - stream = controller.stream; - transformed = stream.transform(transformer); - subscription = transformed.listen(null); - - Expect.identical(stream, subscription.stream); - Expect.equals(false, subscription.cancelOnError); - Expect.identical(_defaultData, subscription.handleData); - Expect.identical(_defaultError, subscription.handleError); - Expect.identical(_defaultDone, subscription.handleDone); - - controller = new StreamController(sync: true); - stream = controller.stream; - transformed = stream.transform(transformer); - subscription = - transformed.listen(null, onDone: handleDone, cancelOnError: true); - - Expect.identical(stream, subscription.stream); - Expect.equals(true, subscription.cancelOnError); - Expect.identical(_defaultData, subscription.handleData); - Expect.identical(_defaultError, subscription.handleError); - Expect.identical(handleDone, subscription.handleDone); - - controller = new StreamController.broadcast(sync: true); - stream = controller.stream; - transformed = stream.transform(transformer); - Expect.isTrue(transformed.isBroadcast); - subscription = - transformed.listen(null, onDone: handleDone, cancelOnError: true); - - Expect.identical(stream, subscription.stream); - Expect.equals(true, subscription.cancelOnError); - Expect.identical(_defaultData, subscription.handleData); - Expect.identical(_defaultError, subscription.handleError); - Expect.identical(handleDone, subscription.handleDone); -} diff --git a/tests/lib_2/async/stream_type_test.dart b/tests/lib_2/async/stream_type_test.dart deleted file mode 100644 index 11358d27b8f..00000000000 --- a/tests/lib_2/async/stream_type_test.dart +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2013, 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 - -import "dart:async"; -import "package:expect/expect.dart"; - -class TypeTest { - void call(object, name) { - Expect.isTrue(object is T, "$name is $T"); - Expect.isFalse(object is NT, "$name is! $NT"); - } -} - -main() { - var checkIntStream = new TypeTest, Stream>(); - var checkIntFuture = new TypeTest, Future>(); - var checkBoolFuture = new TypeTest, Future>(); - var checkStringFuture = new TypeTest, Future>(); - var checkIntSetFuture = new TypeTest>, Future>>(); - var checkIntListFuture = - new TypeTest>, Future>>(); - var checkIntSubscription = - new TypeTest, StreamSubscription>(); - - // Generic function used as parameter for, e.g., `skipWhile` and `reduce`. - f([_1, _2]) => throw "unreachable"; - - bool testIntStream(stream(), name, int recursionDepth) { - checkIntStream(stream(), name); - if (recursionDepth > 0) { - checkIntSubscription(stream().listen(null), "$name.listen"); - - checkIntFuture(stream().first, "$name.first"); - checkIntFuture(stream().last, "$name.last"); - checkIntFuture(stream().single, "$name.single"); - checkIntFuture(stream().singleWhere(f), "$name.singleWhere"); - checkIntFuture(stream().elementAt(2), "$name.elementAt"); - checkIntFuture(stream().reduce(f), "$name.reduce"); - checkIntListFuture(stream().toList(), "$name.toList"); - checkIntSetFuture(stream().toSet(), "$name.toSert"); - - checkIntFuture(stream().length, "$name.length"); - checkBoolFuture(stream().isEmpty, "$name.is"); - checkBoolFuture(stream().any(f), "$name.any"); - checkBoolFuture(stream().every(f), "$name.every"); - checkBoolFuture(stream().contains(null), "$name.contains"); - checkStringFuture(stream().join(), "$name.join"); - - var n = recursionDepth - 1; - testIntStream(() => stream().where(f), "$name.where", n); - testIntStream(() => stream().take(2), "$name.take", n); - testIntStream(() => stream().takeWhile(f), "$name.takeWhile", n); - testIntStream(() => stream().skip(2), "$name.skip", n); - testIntStream(() => stream().skipWhile(f), "$name.skipWhile", n); - testIntStream(() => stream().distinct(f), "$name.distinct", n); - testIntStream(() => stream().handleError(f), "$name.handleError", n); - testIntStream( - () => stream().asBroadcastStream(), "$name.asBroadcastStream", n); - } - } - - testIntStream(() => new StreamController().stream, "Stream", 3); - testIntStream(() => new StreamController.broadcast().stream, - "BroadcastStream", 3); -} diff --git a/tests/lib_2/async/stream_value_test.dart b/tests/lib_2/async/stream_value_test.dart deleted file mode 100644 index ff5dec1d9ff..00000000000 --- a/tests/lib_2/async/stream_value_test.dart +++ /dev/null @@ -1,73 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:async'; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -void main() async { - asyncStart(); - - { - // There is a first element. - var stream = Stream.value(42); - var first = await stream.first; - Expect.equals(42, first); - // Is single-subscription. - Expect.throws(() => stream.first); - } - - { - // There is no second element. - var stream = Stream.value(42); - try { - await stream.skip(1).first; - Expect.fail("didn't throw"); - } on Error { - // Success. - } - } - - { - // There is still no second element. - var stream = Stream.value(42); - try { - await stream.elementAt(1); - Expect.fail("didn't throw"); - } on Error { - // Success. - } - } - - { - // Works with await for. - var stream = Stream.value(42); - var value = null; - await for (value in stream) {} - Expect.equals(42, value); - } - - { - // Works with subscriptions and pause-resume. - var stream = Stream.value(42); - var value; - var onDone = Completer(); - var sub = stream.listen((v) { - value = v; - }, onDone: () { - Expect.equals(42, value); - onDone.complete(); - }); - sub.pause(); - await Future.delayed(Duration(milliseconds: 10)); - Expect.isNull(value); - Expect.isFalse(onDone.isCompleted); - sub.resume(); - await onDone.future; - } - - asyncEnd(); -} diff --git a/tests/lib_2/async/stream_view_test.dart b/tests/lib_2/async/stream_view_test.dart deleted file mode 100644 index def705acd26..00000000000 --- a/tests/lib_2/async/stream_view_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2015, 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 - -// Tests the StreamView class. - -import "package:expect/expect.dart"; -import "dart:async"; -import "package:async_helper/async_helper.dart"; - -main() { - asyncStart(); - runTest().whenComplete(asyncEnd); -} - -Future runTest() async { - unreachable([a, b]) { - throw "UNREACHABLE"; - } - - int tick = 0; - ticker() { - tick++; - } - - asyncStart(); - - // Is const constructor. - Stream s = const StreamView(const Stream.empty()); - - Expect.isFalse(s is Stream); // Respects type parameter. - StreamSubscription sub = - s.listen(unreachable, onError: unreachable, onDone: ticker); - Expect.isFalse(sub is StreamSubscription); // Type parameter in sub. - - Stream iterableStream = new Stream.fromIterable([1, 2, 3]); - Expect.listEquals([1, 2, 3], await iterableStream.toList()); - - asyncEnd(); -} - -Future flushMicrotasks() => new Future.delayed(Duration.zero); diff --git a/tests/lib_2/async/stream_zones_test.dart b/tests/lib_2/async/stream_zones_test.dart deleted file mode 100644 index e02385de5e8..00000000000 --- a/tests/lib_2/async/stream_zones_test.dart +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async'; - -/// StreamController in nested runZoned. Trivial. -test1() { - var events = []; - var done = new Completer(); - runZonedGuarded(() { - runZonedGuarded(() { - var c = new StreamController(); - c.stream.listen((x) => events.add("stream: $x"), - onError: (x) => events.add("stream: error $x"), - onDone: done.complete); - c.add(1); - c.addError(2); - c.close(); - }, (e, s) => events.add("rza: error $e")); - }, (e, s) => events.add("rzb: error $e")); - return [ - done.future, - () { - Expect.listEquals(["stream: 1", "stream: error 2"], events); - } - ]; -} - -/// Adding errors to the stream controller from an outside zone. -test2() { - var events = []; - var done = new Completer(); - runZonedGuarded(() { - var c; - runZonedGuarded(() { - c = new StreamController(); - c.stream.listen((x) => events.add("stream: $x"), - onError: (x) => events.add("stream: error $x"), - onDone: done.complete); - }, (e, s) => events.add("rza: error $e")); - c.add(1); - c.addError(2); - c.close(); - }, (e, s) => events.add("rzb: error $e")); - return [ - done.future, - () { - Expect.listEquals(["stream: 1", "stream: error 2"], events); - } - ]; -} - -/// Adding errors to the stream controller from a more nested zone. -test3() { - var events = []; - var done = new Completer(); - runZonedGuarded(() { - var c = new StreamController(); - c.stream.listen((x) => events.add("stream: $x"), - onError: (x) => events.add("stream: error $x"), onDone: done.complete); - runZonedGuarded(() { - c.add(1); - c.addError(2); - c.close(); - }, (e, s) => events.add("rza: error $e")); - }, (e, s) => events.add("rzb: error $e")); - return [ - done.future, - () { - Expect.listEquals(["stream: 1", "stream: error 2"], events); - } - ]; -} - -/// Feeding a stream from a different zone into another controller. -test4() { - var events = []; - var done = new Completer(); - runZonedGuarded(() { - var c = new StreamController(); - c.stream.listen((x) => events.add("stream: $x"), - onError: (x) => events.add("stream: error $x"), onDone: done.complete); - runZonedGuarded(() { - var c2 = new StreamController(); - c.addStream(c2.stream).whenComplete(c.close); - c2.add(1); - c2.addError(2); - c2.close(); - }, (e, s) => events.add("rza: error $e")); - }, (e, s) => events.add("rzb: error $e")); - return [ - done.future, - () { - Expect.listEquals(["stream: 1", "stream: error 2"], events); - } - ]; -} - -/// Feeding a stream from a different zone into another controller. -/// This time nesting is reversed wrt test4. -test5() { - var events = []; - var done = new Completer(); - runZonedGuarded(() { - var c; - runZonedGuarded(() { - c = new StreamController(); - c.stream.listen((x) => events.add("stream: $x"), - onError: (x) => events.add("stream: error $x"), - onDone: done.complete); - }, (e, s) => events.add("rza: error $e")); - var c2 = new StreamController(); - c.addStream(c2.stream).whenComplete(c.close); - c2.add(1); - c2.addError(2); - c2.close(); - }, (e, s) => events.add("rzb: error $e")); - return [ - done.future, - () { - Expect.listEquals(["stream: 1", "stream: error 2"], events); - } - ]; -} - -test6() { - var events = []; - var done = new Completer(); - var c; - runZonedGuarded(() { - c = new StreamController(); - c.stream.listen((x) => events.add("stream: $x"), - onError: (x) => events.add("stream: error $x"), onDone: done.complete); - }, (e, s) => events.add("rza: error $e")); - runZonedGuarded(() { - var c2 = new StreamController(); - c.addStream(c2.stream).whenComplete(c.close); - c2.add(1); - c2.addError(2); - c2.close(); - }, (e, s) => events.add("rzb: error $e")); - return [ - done.future, - () { - Expect.listEquals(["stream: 1", "stream: error 2"], events); - } - ]; -} - -/// Adding errors to the stream controller from a parallel zone. -test7() { - var events = []; - var done = new Completer(); - var c; - runZonedGuarded(() { - c = new StreamController(); - c.stream.listen((x) => events.add("stream: $x"), - onError: (x) => events.add("stream: error $x"), onDone: done.complete); - }, (e, s) => events.add("rza: error $e")); - runZonedGuarded(() { - c.add(1); - c.addError(2); - c.close(); - }, (e, s) => events.add("rzb: error $e")); - return [ - done.future, - () { - Expect.listEquals(["stream: 1", "stream: error 2"], events); - } - ]; -} - -main() { - asyncStart(); - - var tests = [ - test1(), - test2(), - test3(), - test4(), - test5(), - test6(), - test7(), - ]; - - Future.wait(tests.map((l) => l.first as Future)).then((_) { - // Give time to complete all pending actions. - Timer.run(() { - tests.forEach((l) => (l.last)()); - asyncEnd(); - }); - }); -} diff --git a/tests/lib_2/async/timer_cancel1_test.dart b/tests/lib_2/async/timer_cancel1_test.dart deleted file mode 100644 index e0c7901ade9..00000000000 --- a/tests/lib_2/async/timer_cancel1_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2012, 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 timer_cancel1_test; - -import 'dart:async'; - -import 'package:async_helper/async_minitest.dart'; - -main() { - // Test that a timeout handler can cancel another. - test("timer cancel1 test", () { - var canceleeTimer; - var cancelerTimer; - - void unreachable() { - fail("A canceled timeout handler should be unreachable."); - } - - void handler() { - canceleeTimer.cancel(); - } - - cancelerTimer = - new Timer(const Duration(milliseconds: 1), expectAsync(handler)); - canceleeTimer = new Timer( - const Duration(milliseconds: 1000), expectAsync(unreachable, count: 0)); - }); -} diff --git a/tests/lib_2/async/timer_cancel2_test.dart b/tests/lib_2/async/timer_cancel2_test.dart deleted file mode 100644 index 1a9fc4a1def..00000000000 --- a/tests/lib_2/async/timer_cancel2_test.dart +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2012, 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 timer_cancel2_test; - -import 'dart:async'; -import 'package:expect/expect.dart'; - -main() { - // Test that a timeout handler can cancel itself. - var cancelTimer; - var completer = new Completer(); - int calls = 0; - void cancelHandler(Timer timer) { - Expect.equals(1, ++calls); - cancelTimer.cancel(); - completer.complete(); - } - - cancelTimer = - new Timer.periodic(const Duration(milliseconds: 1), cancelHandler); - return completer.future; -} diff --git a/tests/lib_2/async/timer_cancel_test.dart b/tests/lib_2/async/timer_cancel_test.dart deleted file mode 100644 index 310995df35f..00000000000 --- a/tests/lib_2/async/timer_cancel_test.dart +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2012, 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 timer_cancel_test; - -import 'dart:async'; - -import 'package:async_helper/async_helper.dart'; -import 'package:expect/expect.dart'; - -final ms = const Duration(milliseconds: 1); - -main() { - asyncStart(); - return testSimpleTimer() - .then((_) => cancelTimerWithSame()) - .then((_) => asyncEnd()); -} - -Future testSimpleTimer() { - var cancelTimer = new Timer(ms * 1000, unreachable); - cancelTimer.cancel(); - - var handler = new Completer(); - var repeatHandler = new Completer(); - new Timer(ms * 1000, () { - cancelTimer.cancel(); - handler.complete(); - }); - - cancelTimer = new Timer(ms * 2000, unreachable); - var repeatTimer = 0; - new Timer.periodic(ms * 1500, (Timer timer) { - repeatTimer++; - timer.cancel(); - Expect.equals(repeatTimer, 1); - repeatHandler.complete(); - }); - - return handler.future.then((_) => repeatHandler.future); -} - -Future cancelTimerWithSame() { - var completer = new Completer(); - var t2; - var t1 = new Timer(ms * 0, () { - t2.cancel(); - completer.complete(); - }); - t2 = new Timer(ms * 0, unreachable); - return completer.future; -} - -void unreachable() { - Expect.fail("should not be reached"); -} diff --git a/tests/lib_2/async/timer_isActive_test.dart b/tests/lib_2/async/timer_isActive_test.dart deleted file mode 100644 index 01a937a8349..00000000000 --- a/tests/lib_2/async/timer_isActive_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// 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 - -import 'dart:async'; - -import 'package:async_helper/async_minitest.dart'; - -main() { - test("timer isActive test", () { - Timer t; - - t = new Timer(const Duration(seconds: 1), - expectAsync0(() => expect(t.isActive, equals(false)))); - expect(t.isActive, equals(true)); - }); - - test("periodic timer cancel test", () { - Timer t; - - int i = 0; - void checkActive(Timer timer) { - expect(t.isActive, equals(true)); - if (i == 2) { - t.cancel(); - expect(t.isActive, equals(false)); - } - i++; - } - - t = new Timer.periodic( - new Duration(milliseconds: 1), expectAsync1(checkActive, count: 3)); - expect(t.isActive, equals(true)); - }); - - test("timer cancel test", () { - Timer timer = new Timer( - const Duration(seconds: 15), () => fail("Should not be reached.")); - Timer.run(expectAsync0(() { - expect(timer.isActive, equals(true)); - timer.cancel(); - expect(timer.isActive, equals(false)); - })); - }); -} diff --git a/tests/lib_2/async/timer_repeat_test.dart b/tests/lib_2/async/timer_repeat_test.dart deleted file mode 100644 index 7cc7f6de5fd..00000000000 --- a/tests/lib_2/async/timer_repeat_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2012, 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 timer_repeat_test; - -import 'dart:async'; - -import 'package:expect/expect.dart'; - -const Duration TIMEOUT = const Duration(milliseconds: 500); -const int ITERATIONS = 5; - -Timer timer; -Stopwatch stopwatch = new Stopwatch(); -int iteration; - -// Some browsers (Firefox and IE so far) can trigger too early. Add a safety -// margin. We use identical(1, 1.0) as an easy way to know if the test is -// compiled by dart2js. -int get safetyMargin => identical(1, 1.0) ? 100 : 0; - -var completer = new Completer(); - -void timeoutHandler(Timer timer) { - iteration++; - Expect.isTrue(iteration <= ITERATIONS); - if (iteration == ITERATIONS) { - // When we are done with all of the iterations, we expect a - // certain amount of time to have passed. Checking the time on - // each iteration doesn't work because the timeoutHandler runs - // concurrently with the periodic timer. - Expect.isTrue(stopwatch.elapsedMilliseconds + safetyMargin >= - ITERATIONS * TIMEOUT.inMilliseconds); - timer.cancel(); - completer.complete(); - } -} - -main() { - iteration = 0; - stopwatch.start(); - timer = new Timer.periodic(TIMEOUT, timeoutHandler); - return completer.future; -} diff --git a/tests/lib_2/async/timer_test.dart b/tests/lib_2/async/timer_test.dart deleted file mode 100644 index 51500d29b8e..00000000000 --- a/tests/lib_2/async/timer_test.dart +++ /dev/null @@ -1,46 +0,0 @@ -// 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 timer_test; - -import 'dart:async'; - -import 'package:async_helper/async_minitest.dart'; - -const int STARTTIMEOUT = 1050; -const int DECREASE = 200; -const int ITERATIONS = 5; - -Stopwatch stopwatch = new Stopwatch(); -int timeout; -int iteration; - -// Some browsers (Firefox and IE so far) can trigger too early. Add a safety -// margin. We use identical(1, 1.0) as an easy way to know if the test is -// compiled by dart2js. -int get safetyMargin => identical(1, 1.0) ? 100 : 0; - -void timeoutHandler() { - expect(stopwatch.elapsedMilliseconds + safetyMargin, - greaterThanOrEqualTo(timeout)); - if (iteration < ITERATIONS) { - iteration++; - timeout = timeout - DECREASE; - Duration duration = new Duration(milliseconds: timeout); - stopwatch.reset(); - new Timer(duration, expectAsync(timeoutHandler)); - } -} - -main() { - test("timeout test", () { - iteration = 0; - timeout = STARTTIMEOUT; - Duration duration = new Duration(milliseconds: timeout); - stopwatch.start(); - new Timer(duration, expectAsync(timeoutHandler)); - }); -} diff --git a/tests/lib_2/async/unawaited_error_test.dart b/tests/lib_2/async/unawaited_error_test.dart deleted file mode 100644 index c1eecb8eaab..00000000000 --- a/tests/lib_2/async/unawaited_error_test.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2021, 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. - -void main() { - // The `unawaited` function is not exposed by dart:core. - unawaited; -//^^^^^^^^^ -// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_IDENTIFIER -// [cfe] Undefined name 'unawaited'. -} diff --git a/tests/lib_2/async/unawaited_test.dart b/tests/lib_2/async/unawaited_test.dart deleted file mode 100644 index e78382c9d52..00000000000 --- a/tests/lib_2/async/unawaited_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2021, 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 - -import 'package:async_helper/async_helper.dart'; -import "package:expect/expect.dart"; -import 'dart:async' show Completer, runZonedGuarded, unawaited; -import 'dart:async' as prefix; -import '../../language_2/static_type_helper.dart'; - -void main() { - testUnawaited(); -} - -void testUnawaited() { - // Exists where expected. - prefix.unawaited.expectStaticType)>>(); - - var future = Future.value(42); - captureStaticType(unawaited(future), (value) { - Expect.equals(typeOf(), T); - }); - - Future noFuture = null; - unawaited(noFuture); // Doesn't throw on `null`. - - asyncStart(); - // Unawaited futures still throw. - { - var c = Completer(); - var f = c.future; - unawaited(f); - asyncStart(); - f.catchError((e) { - Expect.equals("ERROR1", e); - asyncEnd(); - return 0; - }); - c.completeError("ERROR1"); - } - // Unawaited futures are still uncaught errors. - { - asyncStart(); - runZonedGuarded(() { - var c = Completer(); - var f = c.future; - unawaited(f); - c.completeError("ERROR2"); - }, (e, s) { - Expect.equals("ERROR2", e); - asyncEnd(); - }); - } - asyncEnd(); -} diff --git a/tests/lib_2/async/uncaught_error_handler_throws_test.dart b/tests/lib_2/async/uncaught_error_handler_throws_test.dart deleted file mode 100644 index e5790af0199..00000000000 --- a/tests/lib_2/async/uncaught_error_handler_throws_test.dart +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) 2021, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -void main() async { - asyncStart(); - await testThrowSame(); - await testThrowOther(); - asyncEnd(); -} - -Future testThrowSame() async { - asyncStart(); - var object1 = Object(); - var stack1 = StackTrace.current; - var outerZone = Zone.current; - var firstZone = Zone.current.fork(specification: onError((error, stack) { - // Uncaught error handlers run in the parent zone. - Expect.identical(outerZone, Zone.current); - Expect.identical(object1, error); - Expect.identical(stack1, stack); // Get same stack trace. - asyncEnd(); - })); - firstZone.run(() async { - Expect.identical(firstZone, Zone.current); - var secondZone = Zone.current.fork(specification: onError((error, stack) { - // Uncaught error handlers run in the parent zone. - Expect.identical(firstZone, Zone.current); - Expect.identical(object1, error); - Expect.identical(stack1, stack); - throw error; // Throw same object - })); - secondZone.run(() async { - Expect.identical(secondZone, Zone.current); - Future.error(object1, stack1); // Unhandled async error. - await Future(() {}); - }); - }); -} - -Future testThrowOther() async { - asyncStart(); - var object1 = Object(); - var object2 = Object(); - var stack1 = StackTrace.current; - var outerZone = Zone.current; - var firstZone = Zone.current.fork(specification: onError((error, stack) { - Expect.identical(outerZone, Zone.current); - Expect.identical(object2, error); - Expect.notIdentical(stack1, stack); // Get different stack trace. - asyncEnd(); - })); - firstZone.run(() async { - Expect.identical(firstZone, Zone.current); - var secondZone = Zone.current.fork(specification: onError((error, stack) { - Expect.identical(firstZone, Zone.current); - Expect.identical(object1, error); - Expect.identical(stack1, stack); - throw object2; // Throw different object - })); - secondZone.run(() async { - Expect.identical(secondZone, Zone.current); - Future.error(object1, stack1); // Unhandled async error. - await Future(() {}); - }); - }); -} - -ZoneSpecification onError(void Function(Object, StackTrace) handler) { - return ZoneSpecification( - handleUncaughtError: (s, p, z, e, st) => handler(e, st)); -} diff --git a/tests/lib_2/async/wait_for_cancel_test.dart b/tests/lib_2/async/wait_for_cancel_test.dart deleted file mode 100644 index aed799be04c..00000000000 --- a/tests/lib_2/async/wait_for_cancel_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2015, 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 - -import "dart:async"; -import "package:expect/expect.dart"; -import "package:async_helper/async_helper.dart"; - -main() { - asyncStart(); - - bool waitedForCancel = false; - - var controller = new StreamController( - onCancel: () => new Future(() => waitedForCancel = true)); - var sub = controller.stream.take(1).listen((x) { - Expect.fail("onData should not be called"); - }); - var cancelFuture = sub.cancel(); - Expect.isNotNull(cancelFuture); - cancelFuture.then((_) { - Expect.isTrue(waitedForCancel); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/zone_async_error_test.dart b/tests/lib_2/async/zone_async_error_test.dart deleted file mode 100644 index 73840d422dc..00000000000 --- a/tests/lib_2/async/zone_async_error_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// 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. - -// @dart = 2.9 -import 'dart:async'; - -import 'package:expect/expect.dart'; - -main() { - // The error cannot be null. - Expect.throwsTypeError(() { - AsyncError(null, StackTrace.current); - }); -} diff --git a/tests/lib_2/async/zone_bind_callback_test.dart b/tests/lib_2/async/zone_bind_callback_test.dart deleted file mode 100644 index 234be15dca0..00000000000 --- a/tests/lib_2/async/zone_bind_callback_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -main() { - Completer done = new Completer(); - - var valueToCapture; - var restoredValue; - - Expect.identical(Zone.root, Zone.current); - Zone forked = Zone.current.fork(specification: new ZoneSpecification( - registerCallback: - (Zone self, ZoneDelegate parent, Zone origin, R f()) { - // The zone is still the same as when origin.run was invoked, which - // is the root zone. (The origin zone hasn't been set yet). - Expect.identical(Zone.current, Zone.root); - // Note that not forwarding is completely legal, though not encouraged. - var capturedValue = valueToCapture; - return parent.registerCallback(origin, () { - restoredValue = capturedValue; - return f(); - }); - })); - - valueToCapture = 499; - var fun = () { - Expect.identical(forked, Zone.current); - return 99; - }; - var registered = forked.bindCallback(fun); - Expect.isFalse(identical(fun, registered)); - - var result = registered(); - Expect.equals(99, result); - Expect.equals(499, restoredValue); -} diff --git a/tests/lib_2/async/zone_bind_callback_unary_test.dart b/tests/lib_2/async/zone_bind_callback_unary_test.dart deleted file mode 100644 index 8bf937fbbd0..00000000000 --- a/tests/lib_2/async/zone_bind_callback_unary_test.dart +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -main() { - Completer done = new Completer(); - - var valueToCapture; - var restoredValue; - - Expect.identical(Zone.root, Zone.current); - Zone forked = Zone.current.fork(specification: new ZoneSpecification( - registerUnaryCallback: - (Zone self, ZoneDelegate parent, Zone origin, R f(T arg)) { - // The zone is still the same as when origin.run was invoked, which - // is the root zone. (The origin zone hasn't been set yet). - Expect.identical(Zone.current, Zone.root); - // Note that not forwarding is completely legal, though not encouraged. - var capturedValue = valueToCapture; - return parent.registerUnaryCallback(origin, (arg) { - restoredValue = capturedValue; - return f(arg); - }); - })); - - valueToCapture = 499; - var fun = (x) { - Expect.identical(forked, Zone.current); - return x + 99; - }; - var bound = forked.bindUnaryCallback(fun); - Expect.isFalse(identical(fun, bound)); - - // It is legal to invoke the callback in a different zone. This is, of course, - // extremely discouraged. - var result = bound(399); - Expect.equals(498, result); - Expect.equals(499, restoredValue); -} diff --git a/tests/lib_2/async/zone_bind_test.dart b/tests/lib_2/async/zone_bind_test.dart deleted file mode 100644 index 2920d146cbc..00000000000 --- a/tests/lib_2/async/zone_bind_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -main() { - Completer done = new Completer(); - - Expect.identical(Zone.root, Zone.current); - // New zone, does nothing by itself. - Zone forked = Zone.current.fork(specification: new ZoneSpecification()); - - int ctr = 0; - void expectZone([timer]) { - Expect.identical(forked, Zone.current); - if (timer != null) timer.cancel(); - if (++ctr == 3) { - asyncEnd(); - } - } - - asyncStart(); - Duration now = const Duration(seconds: 0); - // Check that the callback is bound to the zone. - forked.scheduleMicrotask(expectZone); - forked.createTimer(now, expectZone); - forked.createPeriodicTimer(now, expectZone); -} diff --git a/tests/lib_2/async/zone_create_periodic_timer_test.dart b/tests/lib_2/async/zone_create_periodic_timer_test.dart deleted file mode 100644 index 2b48d908555..00000000000 --- a/tests/lib_2/async/zone_create_periodic_timer_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -main() { - Completer done = new Completer(); - List events = []; - - Expect.identical(Zone.root, Zone.current); - Zone forked; - forked = Zone.current.fork(specification: new ZoneSpecification( - createPeriodicTimer: (Zone self, ZoneDelegate parent, Zone origin, - Duration period, f(Timer timer)) { - events.add("forked.createPeriodicTimer"); - return parent.createPeriodicTimer(origin, period, (Timer timer) { - events.add("wrapped function ${period.inMilliseconds}"); - f(timer); - }); - })); - - asyncStart(); - int tickCount = 0; - forked.run(() { - new Timer.periodic(const Duration(milliseconds: 5), (Timer timer) { - events.add("periodic Timer $tickCount"); - Expect.identical(forked, Zone.current); - tickCount++; - if (tickCount == 4) { - timer.cancel(); - // Allow some time in case the cancel didn't work. - new Timer(const Duration(milliseconds: 20), done.complete); - } - }); - }); - - Expect.identical(Zone.root, Zone.current); - events.add("after createPeriodicTimer"); - - done.future.whenComplete(() { - Expect.listEquals([ - "forked.createPeriodicTimer", - "after createPeriodicTimer", - "wrapped function 5", - "periodic Timer 0", - "wrapped function 5", - "periodic Timer 1", - "wrapped function 5", - "periodic Timer 2", - "wrapped function 5", - "periodic Timer 3" - ], events); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/zone_create_timer2_test.dart b/tests/lib_2/async/zone_create_timer2_test.dart deleted file mode 100644 index 623d895eac0..00000000000 --- a/tests/lib_2/async/zone_create_timer2_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -main() { - Completer done = new Completer(); - List events = []; - - Expect.identical(Zone.root, Zone.current); - Zone forked; - forked = Zone.current.fork(specification: new ZoneSpecification(createTimer: - (Zone self, ZoneDelegate parent, Zone origin, Duration duration, f()) { - events.add("forked.createTimer"); - return parent.createTimer(origin, duration, () { - events.add("wrapped function ${duration.inMilliseconds}"); - f(); - }); - })); - - asyncStart(); - forked.run(() { - Timer timer = new Timer(const Duration(milliseconds: 20), () { - events.add("createTimer"); - Expect.identical(forked, Zone.current); - done.complete(true); - }); - }); - - Expect.identical(Zone.root, Zone.current); - events.add("after createTimer"); - - done.future.whenComplete(() { - Expect.listEquals([ - "forked.createTimer", - "after createTimer", - "wrapped function 20", - "createTimer" - ], events); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/zone_create_timer_test.dart b/tests/lib_2/async/zone_create_timer_test.dart deleted file mode 100644 index 5958b2e4607..00000000000 --- a/tests/lib_2/async/zone_create_timer_test.dart +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -main() { - Completer done = new Completer(); - List events = []; - - Expect.identical(Zone.root, Zone.current); - Zone forked; - forked = Zone.current.fork(specification: new ZoneSpecification(createTimer: - (Zone self, ZoneDelegate parent, Zone origin, Duration duration, f()) { - events.add("forked.createTimer"); - return parent.createTimer(origin, duration, () { - events.add("wrapped function ${duration.inMilliseconds}"); - f(); - }); - })); - - asyncStart(); - forked.run(() { - new Timer(Duration.zero, () { - events.add("createTimer"); - Expect.identical(forked, Zone.current); - done.complete(true); - }); - }); - - Expect.identical(Zone.root, Zone.current); - events.add("after createTimer"); - - done.future.whenComplete(() { - Expect.listEquals([ - "forked.createTimer", - "after createTimer", - "wrapped function 0", - "createTimer" - ], events); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/zone_debug_test.dart b/tests/lib_2/async/zone_debug_test.dart deleted file mode 100644 index 916da2f4b40..00000000000 --- a/tests/lib_2/async/zone_debug_test.dart +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -/** - * We represent the current stack trace by an integer. From time to time we - * increment the variable. This corresponds to a new stack trace. - */ -int stackTrace = 0; -List restoredStackTrace = []; - -List events = []; - -ZoneCallback debugZoneRegisterCallback( - Zone self, ZoneDelegate parent, Zone origin, R f()) { - List savedTrace = [stackTrace]..addAll(restoredStackTrace); - return parent.registerCallback(origin, () { - restoredStackTrace = savedTrace; - return f(); - }); -} - -ZoneUnaryCallback debugZoneRegisterUnaryCallback( - Zone self, ZoneDelegate parent, Zone origin, R f(T arg)) { - List savedTrace = [stackTrace]..addAll(restoredStackTrace); - return parent.registerUnaryCallback(origin, (arg) { - restoredStackTrace = savedTrace; - return f(arg); - }); -} - -T debugZoneRun(Zone self, ZoneDelegate parent, Zone origin, T f()) { - stackTrace++; - restoredStackTrace = []; - return parent.run(origin, f); -} - -R debugZoneRunUnary( - Zone self, ZoneDelegate parent, Zone origin, R f(T arg), T arg) { - stackTrace++; - restoredStackTrace = []; - return parent.runUnary(origin, f, arg); -} - -List expectedDebugTrace; - -void debugUncaughtHandler( - Zone self, ZoneDelegate parent, Zone origin, error, StackTrace stackTrace) { - events.add("handling uncaught error $error"); - Expect.listEquals(expectedDebugTrace, restoredStackTrace); - // Suppress the error and don't propagate to parent. -} - -const DEBUG_SPECIFICATION = const ZoneSpecification( - registerCallback: debugZoneRegisterCallback, - registerUnaryCallback: debugZoneRegisterUnaryCallback, - run: debugZoneRun, - runUnary: debugZoneRunUnary, - handleUncaughtError: debugUncaughtHandler); - -main() { - Completer done = new Completer(); - - // runGuarded calls run, captures the synchronous error (if any) and - // gives that one to handleUncaughtError. - - Expect.identical(Zone.root, Zone.current); - Zone forked; - forked = Zone.current.fork(specification: DEBUG_SPECIFICATION); - - asyncStart(); - - int openTests = 0; - - openTests++; - forked.run(() { - int forkTrace = stackTrace; - scheduleMicrotask(() { - int scheduleMicrotaskTrace = stackTrace; - scheduleMicrotask(() { - expectedDebugTrace = [scheduleMicrotaskTrace, forkTrace]; - openTests--; - if (openTests == 0) { - done.complete(); - } - throw "foo"; - }); - expectedDebugTrace = [forkTrace]; - throw "bar"; - }); - }); - - Expect.listEquals([], restoredStackTrace); - Zone forked2 = forked.fork(); - Zone forked3 = forked2.fork(); - int fork2Trace; - int fork3Trace; - var f2; - var globalTrace = stackTrace; - var f = forked3.bindCallback(() { - Expect.identical(forked3, Zone.current); - fork2Trace = stackTrace; - f2 = forked2.bindCallback(() { - Expect.identical(forked2, Zone.current); - Expect.listEquals([fork2Trace, globalTrace], restoredStackTrace); - fork3Trace = stackTrace; - openTests--; - if (openTests == 0) { - done.complete(); - } - scheduleMicrotask(() { - expectedDebugTrace = [fork3Trace, fork2Trace, globalTrace]; - throw "gee"; - }); - }); - }); - openTests++; - f(); - f2(); - - done.future.whenComplete(() { - // We don't really care for the order. - events.sort(); - Expect.listEquals([ - "handling uncaught error bar", - "handling uncaught error foo", - "handling uncaught error gee" - ], events); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/zone_empty_description2_test.dart b/tests/lib_2/async/zone_empty_description2_test.dart deleted file mode 100644 index f99a70ab484..00000000000 --- a/tests/lib_2/async/zone_empty_description2_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -testEmptyZoneSpecification() { - Expect.identical(Zone.root, Zone.current); - Zone forked = Zone.current.fork(); - Expect.isFalse(identical(Zone.root, forked)); - - asyncStart(); - bool timerDidRun = false; - forked.createTimer(const Duration(milliseconds: 20), () { - // The createTimer function on the Zone binds the closures. - Expect.identical(forked, Zone.current); - timerDidRun = true; - asyncEnd(); - }); - Expect.identical(Zone.root, Zone.current); - - asyncStart(); - int periodicTimerCount = 0; - forked.createPeriodicTimer(const Duration(milliseconds: 20), (Timer timer) { - periodicTimerCount++; - if (periodicTimerCount == 4) { - timer.cancel(); - asyncEnd(); - } - // The createPeriodicTimer function on the Zone binds the closures. - Expect.identical(forked, Zone.current); - }); - Expect.identical(Zone.root, Zone.current); -} - -main() { - testEmptyZoneSpecification(); -} diff --git a/tests/lib_2/async/zone_empty_description_test.dart b/tests/lib_2/async/zone_empty_description_test.dart deleted file mode 100644 index c88a922f880..00000000000 --- a/tests/lib_2/async/zone_empty_description_test.dart +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -testForkedZone(Zone forked) { - var result; - result = forked.run(() { - Expect.identical(forked, Zone.current); - return 499; - }); - Expect.equals(499, result); - Expect.identical(Zone.root, Zone.current); - - result = forked.runUnary((x) { - Expect.equals(42, x); - Expect.identical(forked, Zone.current); - return -499; - }, 42); - Expect.equals(-499, result); - Expect.identical(Zone.root, Zone.current); - - bool runGuardedDidRun = false; - forked.runGuarded(() { - runGuardedDidRun = true; - Expect.identical(forked, Zone.current); - }); - Expect.identical(Zone.root, Zone.current); - Expect.isTrue(runGuardedDidRun); - - runGuardedDidRun = false; - forked.runUnaryGuarded((x) { - runGuardedDidRun = true; - Expect.equals(42, x); - Expect.identical(forked, Zone.current); - }, 42); - Expect.identical(Zone.root, Zone.current); - Expect.isTrue(runGuardedDidRun); - - var callback = () => 499; - Expect.identical(callback, forked.registerCallback(callback)); - Expect.identical(Zone.root, Zone.current); - - var callback1 = (x) => 42 + x; - Expect.identical(callback1, forked.registerUnaryCallback(callback1)); - Expect.identical(Zone.root, Zone.current); - - asyncStart(); - bool asyncDidRun = false; - forked.scheduleMicrotask(() { - Expect.identical(forked, Zone.current); - asyncDidRun = true; - asyncEnd(); - }); - Expect.isFalse(asyncDidRun); - Expect.identical(Zone.root, Zone.current); - - asyncStart(); - bool timerDidRun = false; - forked.createTimer(const Duration(milliseconds: 0), () { - Expect.identical(forked, Zone.current); - timerDidRun = true; - asyncEnd(); - }); - Expect.identical(Zone.root, Zone.current); -} - -main() { - Expect.identical(Zone.root, Zone.current); - Zone forked = Zone.current.fork(); - Expect.isFalse(identical(Zone.root, forked)); - testForkedZone(forked); - Zone forkedChild = forked.fork(); - testForkedZone(forkedChild); -} diff --git a/tests/lib_2/async/zone_error_callback_test.dart b/tests/lib_2/async/zone_error_callback_test.dart deleted file mode 100644 index df9b9b3b3b4..00000000000 --- a/tests/lib_2/async/zone_error_callback_test.dart +++ /dev/null @@ -1,346 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -main() { - asyncStart(); - testNoChange(); - testWithReplacement(); - asyncEnd(); -} - -class MockStack implements StackTrace { - final int id; - const MockStack(this.id); - String toString() => "MocKStack($id)"; -} - -const stack1 = const MockStack(1); -const stack2 = const MockStack(2); - -class SomeError implements Error { - final int id; - const SomeError(this.id); - StackTrace get stackTrace => stack2; - String toString() => "SomeError($id)"; -} - -const error1 = const SomeError(1); -const error2 = const SomeError(2); - -Null expectError(e, s) { - // Remember one asyncStart per use of this callback. - Expect.identical(error1, e); - Expect.identical(stack1, s); - asyncEnd(); - return null; -} - -Null expectErrorOnly(e, s) { - // Remember one asyncStart per use of this callback. - Expect.identical(error1, e); - asyncEnd(); - return null; -} - -AsyncError replace(self, parent, zone, e, s) { - if (e == "ignore") return null; // For testing handleError throwing. - Expect.identical(error1, e); // Ensure replacement only called once - return new AsyncError(error2, stack2); -} - -var replaceZoneSpec = new ZoneSpecification(errorCallback: replace); - -// Expectation after replacing. -Null expectReplaced(e, s) { - Expect.identical(error2, e); - Expect.identical(stack2, s); - asyncEnd(); - return null; -} - -void testProgrammaticErrors(expectError) { - { - asyncStart(); - Completer c = new Completer(); - c.future.catchError(expectError); - c.completeError(error1, stack1); - } - - { - asyncStart(); - StreamController controller = new StreamController(); - controller.stream.listen(null, onError: expectError, cancelOnError: true); - controller.addError(error1, stack1); - } - - { - asyncStart(); - StreamController controller = new StreamController(sync: true); - controller.stream.listen(null, onError: expectError, cancelOnError: true); - controller.addError(error1, stack1); - } - - { - asyncStart(); - StreamController controller = new StreamController.broadcast(); - controller.stream.listen(null, onError: expectError, cancelOnError: true); - controller.addError(error1, stack1); - } - - { - asyncStart(); - StreamController controller = new StreamController.broadcast(sync: true); - controller.stream.listen(null, onError: expectError, cancelOnError: true); - controller.addError(error1, stack1); - } - - { - asyncStart(); - StreamController controller = new StreamController(); - controller.stream - .asBroadcastStream() - .listen(null, onError: expectError, cancelOnError: true); - controller.addError(error1, stack1); - } - - { - asyncStart(); - StreamController controller = new StreamController(sync: true); - controller.stream - .asBroadcastStream() - .listen(null, onError: expectError, cancelOnError: true); - controller.addError(error1, stack1); - } - - { - asyncStart(); - Future f = new Future.error(error1, stack1); - f.catchError(expectError); - } -} - -void testThrownErrors(expectErrorOnly) { - // Throw error in non-registered callback. - { - asyncStart(); - Future f = new Future(() => throw error1); - f.catchError(expectErrorOnly); - } - - { - asyncStart(); - Future f = new Future.microtask(() => throw error1); - f.catchError(expectErrorOnly); - } - - { - asyncStart(); - Future f = new Future.sync(() => throw error1); - f.catchError(expectErrorOnly); - } - - { - asyncStart(); - StreamController controller = new StreamController(); - controller.stream - .map((x) => throw error1) - .listen(null, onError: expectErrorOnly, cancelOnError: true); - controller.add(null); - } - - { - asyncStart(); - StreamController controller = new StreamController(); - controller.stream - .where((x) => throw error1) - .listen(null, onError: expectErrorOnly, cancelOnError: true); - controller.add(null); - } - - { - asyncStart(); - StreamController controller = new StreamController(); - controller.stream.forEach((x) => throw error1).catchError(expectErrorOnly); - controller.add(null); - } - - { - asyncStart(); - StreamController controller = new StreamController(); - controller.stream - .expand((x) => throw error1) - .listen(null, onError: expectErrorOnly, cancelOnError: true); - controller.add(null); - } - - { - asyncStart(); - StreamController controller = new StreamController(); - controller.stream - .asyncMap((x) => throw error1) - .listen(null, onError: expectErrorOnly, cancelOnError: true); - controller.add(null); - } - - { - asyncStart(); - StreamController controller = new StreamController(); - controller.stream - .asyncExpand((x) => throw error1) - .listen(null, onError: expectErrorOnly, cancelOnError: true); - controller.add(null); - } - - { - asyncStart(); - StreamController controller = new StreamController(); - controller.stream - .handleError((e, s) => throw error1) - .listen(null, onError: expectErrorOnly, cancelOnError: true); - controller.addError("ignore", null); - } - - { - asyncStart(); - StreamController controller = new StreamController(); - controller.stream - .skipWhile((x) => throw error1) - .listen(null, onError: expectErrorOnly, cancelOnError: true); - controller.add(null); - } - - { - asyncStart(); - StreamController controller = new StreamController(); - controller.stream - .takeWhile((x) => throw error1) - .listen(null, onError: expectErrorOnly, cancelOnError: true); - controller.add(null); - } - - { - asyncStart(); - StreamController controller = new StreamController(); - controller.stream.every((x) => throw error1).catchError(expectErrorOnly); - controller.add(null); - } - - { - asyncStart(); - StreamController controller = new StreamController(); - controller.stream.any((x) => throw error1).catchError(expectErrorOnly); - controller.add(null); - } - - { - asyncStart(); - StreamController controller = new StreamController(); - controller.stream - .firstWhere((x) => throw error1) - .catchError(expectErrorOnly); - controller.add(null); - } - - { - asyncStart(); - StreamController controller = new StreamController(); - controller.stream - .lastWhere((x) => throw error1) - .catchError(expectErrorOnly); - controller.add(null); - } - - { - asyncStart(); - StreamController controller = new StreamController(); - controller.stream - .singleWhere((x) => throw error1) - .catchError(expectErrorOnly); - controller.add(null); - } - - { - asyncStart(); - StreamController controller = new StreamController(); - controller.stream - .reduce((x, y) => throw error1) - .catchError(expectErrorOnly); - controller.add(null); - controller.add(null); - } - - { - asyncStart(); - StreamController controller = new StreamController(); - controller.stream - .fold(null, (x, y) => throw error1) - .catchError(expectErrorOnly); - controller.add(null); - } -} - -testNoChange() { - void testTransparent() { - testProgrammaticErrors(expectError); - testThrownErrors(expectErrorOnly); - } - - // Run directly. - testTransparent(); - - // Run in a zone that doesn't change callback. - runZoned(testTransparent, - zoneSpecification: - new ZoneSpecification(handleUncaughtError: (s, p, z, e, t) {})); - - // Run in zone that delegates to root zone - runZoned(testTransparent, - zoneSpecification: new ZoneSpecification( - errorCallback: (s, p, z, e, t) => p.errorCallback(z, e, t))); - - // Run in a zone that returns null from the callback. - runZoned(testTransparent, - zoneSpecification: - new ZoneSpecification(errorCallback: (s, p, z, e, t) => null)); - - // Run in zone that returns same values. - runZoned(testTransparent, - zoneSpecification: new ZoneSpecification( - errorCallback: (s, p, z, e, t) => new AsyncError(e, t))); - - // Run in zone that returns null, inside zone that does replacement. - runZoned(() { - runZoned(testTransparent, - zoneSpecification: - new ZoneSpecification(errorCallback: (s, p, z, e, t) => null)); - }, zoneSpecification: replaceZoneSpec); -} - -void testWithReplacement() { - void testReplaced() { - testProgrammaticErrors(expectReplaced); - testThrownErrors(expectReplaced); - } - - // Zone which replaces errors. - runZoned(testReplaced, zoneSpecification: replaceZoneSpec); - - // Nested zone, only innermost gets to act. - runZoned(() { - runZoned(testReplaced, zoneSpecification: replaceZoneSpec); - }, zoneSpecification: replaceZoneSpec); - - // Use delegation to parent which replaces. - runZoned(() { - runZoned(testReplaced, - zoneSpecification: new ZoneSpecification( - errorCallback: (s, p, z, e, t) => p.errorCallback(z, e, t))); - }, zoneSpecification: replaceZoneSpec); -} diff --git a/tests/lib_2/async/zone_fork_test.dart b/tests/lib_2/async/zone_fork_test.dart deleted file mode 100644 index 558a8048b1c..00000000000 --- a/tests/lib_2/async/zone_fork_test.dart +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -main() { - Completer done = new Completer(); - List events = []; - - Expect.identical(Zone.root, Zone.current); - Zone forked; - forked = Zone.current.fork(specification: new ZoneSpecification(fork: - (Zone self, ZoneDelegate parent, Zone origin, - ZoneSpecification zoneSpecification, Map mapValues) { - // The zone is still the same as when origin.run was invoked, which - // is the root zone. (The origin zone hasn't been set yet). - Expect.identical(Zone.root, Zone.current); - events.add("forked.fork"); - var descriptionRun = zoneSpecification.run; - ZoneSpecification modified = new ZoneSpecification.from(zoneSpecification, - run: (self, parent, origin, R f()) { - events.add("wrapped run"); - return descriptionRun(self, parent, origin, () { - events.add("wrapped f"); - return f(); - }); - }); - return parent.fork(origin, modified, mapValues); - })); - - events.add("start"); - Zone forkedChild = forked.fork(specification: new ZoneSpecification( - run: (Zone self, ZoneDelegate parent, Zone origin, R f()) { - events.add("executing child run"); - return parent.run(origin, f); - })); - - events.add("after child fork"); - Expect.identical(Zone.root, Zone.current); - - forkedChild.run(() { - events.add("child run"); - }); - - events.add("after child run"); - - Expect.listEquals([ - "start", - "forked.fork", - "after child fork", - "wrapped run", - "executing child run", - "wrapped f", - "child run", - "after child run" - ], events); -} diff --git a/tests/lib_2/async/zone_future_schedule_microtask_test.dart b/tests/lib_2/async/zone_future_schedule_microtask_test.dart deleted file mode 100644 index b4c4cbd0711..00000000000 --- a/tests/lib_2/async/zone_future_schedule_microtask_test.dart +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:async'; -import 'package:async_helper/async_helper.dart'; -import 'catch_errors.dart'; - -main() { - asyncStart(); - Completer done = new Completer(); - - // Make sure that the zones use the scheduleMicrotask of their zones. - int scheduleMicrotaskCount = 0; - Completer completer; - Completer completer2; - Future future; - Future future2; - runZonedScheduleMicrotask(() { - completer = new Completer(); - completer.complete(499); - completer2 = new Completer.sync(); - completer2.complete(-499); - future = new Future.value(42); - future2 = new Future.error(11); - }, onScheduleMicrotask: (f) { - scheduleMicrotaskCount++; - scheduleMicrotask(f); - }); - int openCallbackCount = 0; - - openCallbackCount++; - completer.future.then((x) { - Expect.equals(499, x); - openCallbackCount--; - if (openCallbackCount == 0) done.complete(); - }); - - openCallbackCount++; - completer2.future.then((x) { - Expect.equals(-499, x); - openCallbackCount--; - if (openCallbackCount == 0) done.complete(); - }); - - openCallbackCount++; - future.then((x) { - Expect.equals(42, x); - openCallbackCount--; - if (openCallbackCount == 0) done.complete(); - }); - - openCallbackCount++; - future2.catchError((x) { - Expect.equals(11, x); - openCallbackCount--; - if (openCallbackCount == 0) done.complete(); - }); - - done.future.whenComplete(() { - Expect.equals(4, scheduleMicrotaskCount); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/zone_register_callback_test.dart b/tests/lib_2/async/zone_register_callback_test.dart deleted file mode 100644 index d008920d762..00000000000 --- a/tests/lib_2/async/zone_register_callback_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -main() { - Completer done = new Completer(); - - var valueToCapture; - var restoredValue; - - Expect.identical(Zone.root, Zone.current); - Zone forked = Zone.current.fork(specification: new ZoneSpecification( - registerCallback: - (Zone self, ZoneDelegate parent, Zone origin, R f()) { - // The zone is still the same as when origin.run was invoked, which - // is the root zone. (The origin zone hasn't been set yet). - Expect.identical(Zone.current, Zone.root); - // Note that not forwarding is completely legal, though not encouraged. - var capturedValue = valueToCapture; - return parent.registerCallback(origin, () { - restoredValue = capturedValue; - return f(); - }); - })); - - valueToCapture = 499; - var fun = () => 99; - var registered = forked.registerCallback(fun); - Expect.isFalse(identical(fun, registered)); - - // It is legal to invoke the callback in a different zone. This is, of course, - // extremely discouraged. - var result = registered(); - Expect.equals(99, result); - Expect.equals(499, restoredValue); -} diff --git a/tests/lib_2/async/zone_register_callback_unary_test.dart b/tests/lib_2/async/zone_register_callback_unary_test.dart deleted file mode 100644 index 5fe037da3a7..00000000000 --- a/tests/lib_2/async/zone_register_callback_unary_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -main() { - Completer done = new Completer(); - - var valueToCapture; - var restoredValue; - - Expect.identical(Zone.root, Zone.current); - Zone forked = Zone.current.fork(specification: new ZoneSpecification( - registerUnaryCallback: - (Zone self, ZoneDelegate parent, Zone origin, R f(T arg)) { - // The zone is still the same as when origin.run was invoked, which - // is the root zone. (The origin zone hasn't been set yet). - Expect.identical(Zone.current, Zone.root); - // Note that not forwarding is completely legal, though not encouraged. - var capturedValue = valueToCapture; - return parent.registerUnaryCallback(origin, (arg) { - restoredValue = capturedValue; - return f(arg); - }); - })); - - valueToCapture = 499; - var fun = (x) => x + 99; - var registered = forked.registerUnaryCallback(fun); - Expect.isFalse(identical(fun, registered)); - - // It is valid to invoke the callback in a different zone. This is, of course, - // extremely discouraged. - var result = registered(399); - Expect.equals(498, result); - Expect.equals(499, restoredValue); -} diff --git a/tests/lib_2/async/zone_root_bind_test.dart b/tests/lib_2/async/zone_root_bind_test.dart deleted file mode 100644 index 5a545e7371e..00000000000 --- a/tests/lib_2/async/zone_root_bind_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -main() { - Expect.identical(Zone.root, Zone.current); - Zone forked = Zone.current.fork(); - var f = Zone.current.bindCallback(() { - Expect.identical(Zone.root, Zone.current); - }); - forked.run(() { - f(); - }); -} diff --git a/tests/lib_2/async/zone_run_guarded_test.dart b/tests/lib_2/async/zone_run_guarded_test.dart deleted file mode 100644 index b1ea88dcce5..00000000000 --- a/tests/lib_2/async/zone_run_guarded_test.dart +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -main() { - Completer done = new Completer(); - List events = []; - - // runGuarded calls run, captures the synchronous error (if any) and - // gives that one to handleUncaughtError. - - var result; - - Expect.identical(Zone.root, Zone.current); - Zone forked; - forked = Zone.current.fork( - specification: new ZoneSpecification( - run: (Zone self, ZoneDelegate parent, Zone origin, R f()) { - // The zone is still the same as when origin.run was invoked, which - // is the root zone. (The origin zone hasn't been set yet). - Expect.identical(Zone.root, Zone.current); - events.add("forked.run"); - return parent.run(origin, f); - }, handleUncaughtError: - (Zone self, ZoneDelegate parent, Zone origin, error, stackTrace) { - Expect.identical(Zone.root, Zone.current); - Expect.identical(forked, origin); - events.add("forked.handleUncaught $error"); - result = 499; - })); - - forked.runGuarded(() { - events.add("runGuarded 1"); - Expect.identical(forked, Zone.current); - result = 42; - }); - Expect.identical(Zone.root, Zone.current); - Expect.equals(42, result); - events.add("after runGuarded 1"); - - result = null; - forked.runGuarded(() { - events.add("runGuarded 2"); - Expect.identical(forked, Zone.current); - throw 42; - }); - Expect.equals(499, result); - - Expect.listEquals([ - "forked.run", - "runGuarded 1", - "after runGuarded 1", - "forked.run", - "runGuarded 2", - "forked.handleUncaught 42" - ], events); - - result = null; - events.clear(); - asyncStart(); - forked.runGuarded(() { - Expect.identical(forked, Zone.current); - events.add("run closure"); - forked.scheduleMicrotask(() { - events.add("run closure 2"); - Expect.identical(forked, Zone.current); - done.complete(true); - throw 88; - }); - throw 1234; - }); - events.add("after nested scheduleMicrotask"); - Expect.equals(499, result); - - done.future.whenComplete(() { - Expect.listEquals([ - "forked.run", - "run closure", - "forked.handleUncaught 1234", - "after nested scheduleMicrotask", - "forked.run", - "run closure 2", - "forked.handleUncaught 88" - ], events); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/zone_run_test.dart b/tests/lib_2/async/zone_run_test.dart deleted file mode 100644 index 6f89937942f..00000000000 --- a/tests/lib_2/async/zone_run_test.dart +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -main() { - Completer done = new Completer(); - List events = []; - - bool shouldForward = true; - Expect.identical(Zone.root, Zone.current); - Zone forked = Zone.current.fork(specification: new ZoneSpecification( - run: (Zone self, ZoneDelegate parent, Zone origin, R f()) { - // The zone is still the same as when origin.run was invoked, which - // is the root zone. (The origin zone hasn't been set yet). - Expect.identical(Zone.root, Zone.current); - events.add("forked.run"); - if (shouldForward) return parent.run(origin, f); - return 42 as R; - })); - - events.add("zone forked"); - Zone expectedZone = forked; - var result = forked.run(() { - Expect.identical(expectedZone, Zone.current); - events.add("run closure"); - return 499; - }); - Expect.equals(499, result); - events.add("executed run"); - - shouldForward = false; - result = forked.run(() { - Expect.fail("should not be invoked"); - }); - Expect.equals(42, result); - events.add("executed run2"); - - asyncStart(); - shouldForward = true; - result = forked.run(() { - Expect.identical(forked, Zone.current); - events.add("run closure 2"); - forked.scheduleMicrotask(() { - events.add("run closure 3"); - Expect.identical(forked, Zone.current); - done.complete(true); - }); - return 1234; - }); - events.add("after nested scheduleMicrotask"); - Expect.equals(1234, result); - - done.future.whenComplete(() { - Expect.listEquals([ - "zone forked", - "forked.run", - "run closure", - "executed run", - "forked.run", - "executed run2", - "forked.run", - "run closure 2", - "after nested scheduleMicrotask", - "forked.run", - "run closure 3" - ], events); - asyncEnd(); - }); - - var zone1 = Zone.root.fork(); - var zone2 = Zone.root.fork(); - var zone3 = Zone.root.fork(); - asyncStart(); - asyncStart(); - zone1.run(() { - var future = new Future.value(); - zone2.run(() { - future.then((_) { - Expect.identical(zone2, Zone.current); - asyncEnd(); - }); - }); - zone3.run(() { - future.then((_) { - Expect.identical(zone3, Zone.current); - asyncEnd(); - }); - }); - }); -} diff --git a/tests/lib_2/async/zone_run_unary_test.dart b/tests/lib_2/async/zone_run_unary_test.dart deleted file mode 100644 index beb7f3271ad..00000000000 --- a/tests/lib_2/async/zone_run_unary_test.dart +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -main() { - Completer done = new Completer(); - List events = []; - - bool shouldForward = true; - Expect.identical(Zone.root, Zone.current); - Zone forked = Zone.current.fork(specification: new ZoneSpecification(runUnary: - (Zone self, ZoneDelegate parent, Zone origin, R f(T arg), T arg) { - // The zone is still the same as when origin.run was invoked, which - // is the root zone. (The origin zone hasn't been set yet). - Expect.identical(Zone.current, Zone.root); - events.add("forked.run1"); - if (shouldForward) - return parent.runUnary(origin, f, ((arg as int) + 1) as T); - return 42 as R; - })); - - events.add("zone forked"); - Zone expectedZone = forked; - var result = forked.runUnary((arg) { - Expect.identical(expectedZone, Zone.current); - events.add("run closure"); - return arg + 3; - }, 495); - Expect.equals(499, result); - events.add("executed run"); - - shouldForward = false; - result = forked.runUnary((arg) { - Expect.fail("should not be invoked"); - }, 99); - Expect.equals(42, result); - events.add("executed run2"); - - asyncStart(); - shouldForward = true; - result = forked.runUnary((arg) { - Expect.identical(forked, Zone.current); - events.add("run closure 2"); - scheduleMicrotask(() { - events.add("run closure 3"); - Expect.identical(forked, Zone.current); - done.complete(true); - }); - return -arg - 8; - }, 490); - events.add("after nested scheduleMicrotask"); - Expect.equals(-499, result); - - done.future.whenComplete(() { - Expect.listEquals([ - "zone forked", - "forked.run1", - "run closure", - "executed run", - "forked.run1", - "executed run2", - "forked.run1", - "run closure 2", - "after nested scheduleMicrotask", - "run closure 3" - ], events); - asyncEnd(); - }); -} diff --git a/tests/lib_2/async/zone_value_test.dart b/tests/lib_2/async/zone_value_test.dart deleted file mode 100644 index 15e2c83a90b..00000000000 --- a/tests/lib_2/async/zone_value_test.dart +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'package:expect/expect.dart'; -import 'package:async_helper/async_helper.dart'; -import 'dart:async'; - -main() { - // Unique object. - var baz = new Mimic(new Object()); - // Not so unique object that thinks it's the same as baz. - var mimic = new Mimic(baz.original); - - // runGuarded calls run, captures the synchronous error (if any) and - // gives that one to handleUncaughtError. - - Expect.identical(Zone.root, Zone.current); - - // Create a map with various key types. - Map zoneValues = new Map(); - zoneValues[#foo] = 499; - zoneValues["bar"] = []; - zoneValues[baz] = "baz"; - zoneValues[0] = "zero!"; - zoneValues[null] = baz; - - Zone forked = Zone.current.fork(zoneValues: zoneValues); - - // Values are not present when not inside the zone. - Expect.identical(Zone.root, Zone.current); - Expect.isNull(Zone.current[#foo]); - Expect.isNull(Zone.current["bar"]); - Expect.isNull(Zone.current[baz]); - Expect.isNull(Zone.current[mimic]); - Expect.isNull(Zone.current[0]); - Expect.isNull(Zone.current[null]); - Expect.isNull(Zone.current["qux"]); - - // Changing the original map has no effect after the zone is created. - zoneValues[#foo] = -1; - - // Values are available directly on the zone. - Expect.equals(499, forked[#foo]); - Expect.listEquals([], forked["bar"]); - Expect.equals("baz", forked[baz]); - Expect.equals("baz", forked[mimic]); - Expect.equals("zero!", forked[0]); - Expect.equals("zero!", forked[0.0]); // Lookup uses equality. - Expect.equals("zero!", forked[-0.0]); - Expect.equals(baz, forked[null]); - Expect.isNull(forked["qux"]); - - forked.run(() { - Expect.identical(forked, Zone.current); // Sanity check. - // Values are present on current when inside zone. - Expect.equals(499, Zone.current[#foo]); - Expect.listEquals([], Zone.current["bar"]); - Expect.equals("baz", Zone.current[baz]); - Expect.equals("baz", Zone.current[mimic]); - Expect.equals("zero!", Zone.current[0]); - Expect.equals("zero!", Zone.current[0.0]); // Lookup uses equality. - Expect.equals("zero!", Zone.current[-0.0]); - Expect.equals(baz, Zone.current[null]); - Expect.isNull(Zone.current["qux"]); - }); - - // Values are still not present when not inside the zone. - Expect.identical(Zone.root, Zone.current); - Expect.isNull(Zone.current[#foo]); - Expect.isNull(Zone.current["bar"]); - Expect.isNull(Zone.current[baz]); - Expect.isNull(Zone.current[mimic]); - Expect.isNull(Zone.current[0]); - Expect.isNull(Zone.current[null]); - Expect.isNull(Zone.current["qux"]); - - // Modifying the stored values work as expected. - zoneValues["bar"].add(42); - - forked.run(() { - Expect.identical(forked, Zone.current); // Sanity check. - // Values are still there when inside the zone. The list was modified. - Expect.equals(499, Zone.current[#foo]); - Expect.listEquals([42], Zone.current["bar"]); - Expect.equals("baz", Zone.current[baz]); - Expect.equals("baz", Zone.current[mimic]); - Expect.equals("zero!", Zone.current[0]); - Expect.equals(baz, Zone.current[null]); - Expect.isNull(Zone.current["qux"]); - }); - - // Creating a further nested zone with new values allows keeping, overriding, - // and shadowing existing values from the outer zone. - zoneValues = new Map(); - zoneValues[#foo] = -499; // Values can be overridden. - zoneValues["bar"] = null; // Values can be changed to null. - zoneValues["qux"] = 99; // Values can be added - // Overriding with equal, but not identical, key is possible. - zoneValues[mimic] = "floo"; - zoneValues[0.0] = "zero!ZERO!"; - - Zone forkedChild = forked.fork(zoneValues: zoneValues); - - // New values available on zone. - Expect.equals(-499, forkedChild[#foo]); // Overridden. - Expect.isNull(forkedChild["bar"]); // Overridden to null. - Expect.equals("floo", forkedChild[baz]); // Overridden by mimic. - Expect.equals("floo", forkedChild[mimic]); // Now recognizes mimic. - Expect.equals("zero!ZERO!", forkedChild[0]); // Overridden by 0.0. - Expect.equals("zero!ZERO!", forkedChild[0.0]); // Overriding 0. - Expect.equals(baz, forkedChild[null]); // Inherited. - Expect.equals(99, forkedChild["qux"]); // Added. - - forkedChild.run(() { - Expect.identical(forkedChild, Zone.current); // Sanity check. - // New values available on current zone when the zone is current. - Expect.equals(-499, Zone.current[#foo]); // Overridden. - Expect.isNull(Zone.current["bar"]); // Overridden to null. - Expect.equals("floo", Zone.current[baz]); // Overridden by mimic. - Expect.equals("floo", Zone.current[mimic]); // Now recognizes mimic. - Expect.equals("zero!ZERO!", Zone.current[0]); // Overridden by 0.0. - Expect.equals("zero!ZERO!", Zone.current[0.0]); // Overriding 0. - Expect.equals(baz, Zone.current[null]); // Inherited. - Expect.equals(99, Zone.current["qux"]); // Added. - }); - - // Parent zone values are unchanged. - Expect.equals(499, forked[#foo]); - Expect.listEquals([42], forked["bar"]); - Expect.equals("baz", forked[baz]); - Expect.equals("baz", forked[mimic]); - Expect.equals("zero!", forked[0]); - Expect.equals("zero!", forked[0.0]); // Lookup uses equality. - Expect.equals("zero!", forked[-0.0]); - Expect.equals(baz, forked[null]); - Expect.isNull(forked["qux"]); -} - -// Class of objects that consider themselves equal to their originals. -// Sees through mimicry. -class Mimic { - final Object original; - Mimic(this.original); - int get hashCode => original.hashCode; - bool operator ==(Object other) => - (other is Mimic) ? this == other.original : original == other; -} diff --git a/tests/lib_2/collection/hash_map_test.dart b/tests/lib_2/collection/hash_map_test.dart deleted file mode 100644 index 98eab63e61b..00000000000 --- a/tests/lib_2/collection/hash_map_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// 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 - -import "dart:collection"; -import "package:expect/expect.dart"; - -void main() { - // Test customized maps. - // Regression test for issue http://dartbug.com/18109 - - int hash(s) => s.toLowerCase().hashCode; - bool equals(a, b) => a.toLowerCase() == b.toLowerCase(); - - for (var m in [ - new HashMap(equals: equals, hashCode: hash), - new LinkedHashMap(equals: equals, hashCode: hash), - ]) { - m["Abel"] = 42; - for (var key in ["Abel", "abel", "ABEL", "Abel"]) { - Expect.isTrue(m.containsKey(key), "contains $key in ${m.runtimeType} $m"); - Expect.equals(42, m[key], "get $key in ${m.runtimeType} $m"); - Expect.equals(42, m.remove(key), "remove $key in ${m.runtimeType} $m"); - m[key] = 42; - } - } - - int abshash(n) => n.abs(); - bool abseq(a, b) => a.abs() == b.abs(); - for (var m in [ - new HashMap(equals: abseq, hashCode: abshash), - new LinkedHashMap(equals: abseq, hashCode: abshash), - ]) { - m[1] = 42; - for (var key in [1, -1, 1]) { - Expect.isTrue(m.containsKey(key), "contains $key in ${m.runtimeType} $m"); - Expect.equals(42, m[key], "get $key in ${m.runtimeType} $m"); - Expect.equals(42, m.remove(key), "remove $key in ${m.runtimeType} $m"); - m[key] = 42; - } - } -} diff --git a/tests/lib_2/collection/hash_set_test.dart b/tests/lib_2/collection/hash_set_test.dart deleted file mode 100644 index 67827b8a850..00000000000 --- a/tests/lib_2/collection/hash_set_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// 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 - -import "dart:collection"; -import "package:expect/expect.dart"; - -void main() { - // Test customized sets. - // Regression test for issue http://dartbug.com/18109 - - int hash(s) => s.toLowerCase().hashCode; - bool equals(a, b) => a.toLowerCase() == b.toLowerCase(); - - for (var m in [ - new HashSet(equals: equals, hashCode: hash), - new LinkedHashSet(equals: equals, hashCode: hash), - ]) { - m.add("Abel"); - var prev = "Abel"; - for (var key in ["Abel", "abel", "ABEL", "Abel"]) { - Expect.isTrue(m.contains(key), "contains $key in ${m.runtimeType} $m"); - Expect.equals(prev, m.lookup(key), "lookup $key in ${m.runtimeType} $m"); - Expect.isTrue(m.remove(key), "remove $key in ${m.runtimeType} $m"); - m.add(key); - prev = key; - } - } - - int abshash(n) => n.abs(); - bool abseq(a, b) => a.abs() == b.abs(); - for (var m in [ - new HashSet(equals: abseq, hashCode: abshash), - new LinkedHashSet(equals: abseq, hashCode: abshash), - ]) { - m.add(1); - var prev = 1; - for (var key in [1, -1, 1]) { - Expect.isTrue(m.contains(key), "contains $key in ${m.runtimeType} $m"); - Expect.equals(prev, m.lookup(key), "lookup $key in ${m.runtimeType} $m"); - Expect.isTrue(m.remove(key), "remove $key in ${m.runtimeType} $m"); - m.add(key); - prev = key; - } - } -} diff --git a/tests/lib_2/collection/linked_list_test.dart b/tests/lib_2/collection/linked_list_test.dart deleted file mode 100644 index 210cd7ab839..00000000000 --- a/tests/lib_2/collection/linked_list_test.dart +++ /dev/null @@ -1,315 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'dart:collection'; -import "package:expect/expect.dart"; - -class MyEntry extends LinkedListEntry { - final int value; - - MyEntry(int this.value); - - String toString() => value.toString(); - - int get hashCode => value.hashCode; - bool operator ==(Object o) => o is MyEntry && value == o.value; -} - -void testPreviousNext() { - var list = LinkedList(); - Expect.throws(() => list.first); - Expect.throws(() => list.last); - Expect.equals(0, list.length); - - for (int i = 0; i < 3; i++) { - list.add(MyEntry(i)); - } - Expect.equals(3, list.length); - - var entry = list.first; - Expect.isNull(entry.previous); - Expect.equals(0, entry.value); - entry = entry.next; - Expect.equals(1, entry.value); - entry = entry.next; - Expect.equals(2, entry.value); - Expect.isNull(entry.next); - entry = entry.previous; - Expect.equals(1, entry.value); - entry = entry.previous; - Expect.equals(0, entry.value); - Expect.isNull(entry.previous); -} - -void testUnlinked() { - var unlinked = MyEntry(0); - Expect.isNull(unlinked.previous); - Expect.isNull(unlinked.next); - var list = LinkedList(); - list.add(unlinked); - Expect.isNull(unlinked.previous); - Expect.isNull(unlinked.next); - list.remove(unlinked); - Expect.isNull(unlinked.previous); - Expect.isNull(unlinked.next); - list.add(unlinked); - list.add(MyEntry(1)); - Expect.isNull(unlinked.previous); - Expect.equals(1, unlinked.next.value); - list.remove(unlinked); - Expect.isNull(unlinked.previous); - Expect.isNull(unlinked.next); - list.add(unlinked); - Expect.isNull(unlinked.next); - Expect.equals(1, unlinked.previous.value); -} - -void testInsert() { - // Insert last. - var list = LinkedList(); - for (int i = 0; i < 10; i++) { - list.add(MyEntry(i)); - } - - Expect.equals(10, list.length); - - int i = 0; - for (var entry in list) { - Expect.equals(i, entry.value); - i++; - } - - Expect.equals(10, i); - - list.clear(); - - // Insert first. - for (int i = 0; i < 10; i++) { - list.addFirst(MyEntry(i)); - } - - Expect.equals(10, list.length); - - i = 10; - for (var entry in list) { - Expect.equals(--i, entry.value); - } - Expect.equals(0, i); - - list.clear(); - - // Insert after. - list.addFirst(MyEntry(0)); - for (int i = 1; i < 10; i++) { - list.last.insertAfter(MyEntry(i)); - } - - Expect.equals(10, list.length); - - i = 0; - for (var entry in list) { - Expect.equals(i, entry.value); - i++; - } - - Expect.equals(10, i); - - list.clear(); - - // Insert before. - list.addFirst(MyEntry(0)); - for (int i = 1; i < 10; i++) { - list.first.insertBefore(MyEntry(i)); - } - - Expect.equals(10, list.length); - - i = 10; - for (var entry in list) { - Expect.equals(--i, entry.value); - } - Expect.equals(0, i); - - list.clear(); -} - -void testRemove() { - var list = LinkedList(); - for (int i = 0; i < 10; i++) { - list.add(MyEntry(i)); - } - - Expect.equals(10, list.length); - - list.remove(list.skip(5).first); - - Expect.equals(9, list.length); - - int i = 0; - for (var entry in list) { - if (i == 5) i++; - Expect.equals(i, entry.value); - i++; - } - - Expect.listEquals( - [0, 1, 2, 3, 4, 6, 7, 8, 9], list.map((e) => e.value).toList()); - - for (int i = 0; i < 9; i++) { - list.first.unlink(); - } - - Expect.throws(() => list.first); - - Expect.equals(0, list.length); -} - -void testContains() { - var list = LinkedList(); - var entry5 = MyEntry(5); - - // Empty lists contains nothing. - Expect.isFalse(list.contains(null)); - Expect.isFalse(list.contains(Object())); - Expect.isFalse(list.contains(entry5)); - - // Works for singleton lists. - list.add(MyEntry(0)); - Expect.isTrue(list.contains(list.first)); - Expect.isFalse(list.contains(null)); - Expect.isFalse(list.contains(Object())); - Expect.isFalse(list.contains(entry5)); - - // Works for larger lists. - for (int i = 1; i < 10; i++) { - list.add(MyEntry(i)); - } - for (var entry in list) { - Expect.isTrue(list.contains(entry)); - } - Expect.isFalse(list.contains(Object())); - Expect.isFalse(list.contains(null)); - Expect.isFalse(list.contains(entry5)); - // Based on identity, not equality. - Expect.isTrue(list.elementAt(5) == entry5); -} - -void testBadAdd() { - var list1 = LinkedList(); - list1.addFirst(MyEntry(0)); - - var list2 = LinkedList(); - Expect.throws(() => list2.addFirst(list1.first)); - - Expect.throws(() => MyEntry(0).unlink()); -} - -void testConcurrentModificationError() { - test(function(LinkedList ll)) { - var ll = LinkedList(); - for (int i = 0; i < 10; i++) { - ll.add(MyEntry(i)); - } - Expect.throws(() => function(ll), (e) => e is ConcurrentModificationError); - } - - test((ll) { - for (var x in ll) { - ll.remove(x); - } - }); - test((ll) { - ll.forEach((x) { - ll.remove(x); - }); - }); - test((ll) { - ll.any((x) { - ll.remove(x); - return false; - }); - }); - test((ll) { - ll.every((x) { - ll.remove(x); - return true; - }); - }); - test((ll) { - ll.fold(0, (x, y) { - ll.remove(y); - return x; - }); - }); - test((ll) { - ll.reduce((x, y) { - ll.remove(y); - return x; - }); - }); - test((ll) { - ll.where((x) { - ll.remove(x); - return true; - }).forEach((_) {}); - }); - test((ll) { - ll.map((x) { - ll.remove(x); - return x; - }).forEach((_) {}); - }); - test((ll) { - ll.expand((x) { - ll.remove(x); - return [x]; - }).forEach((_) {}); - }); - test((ll) { - ll.takeWhile((x) { - ll.remove(x); - return true; - }).forEach((_) {}); - }); - test((ll) { - ll.skipWhile((x) { - ll.remove(x); - return true; - }).forEach((_) {}); - }); - test((ll) { - bool first = true; - ll.firstWhere((x) { - ll.remove(x); - if (!first) return true; - return first = false; - }); - }); - test((ll) { - ll.lastWhere((x) { - ll.remove(x); - return true; - }); - }); - test((ll) { - bool first = true; - ll.singleWhere((x) { - ll.remove(x); - if (!first) return false; - return !(first = false); - }); - }); -} - -void main() { - testPreviousNext(); - testUnlinked(); - testInsert(); - testRemove(); - testContains(); - testBadAdd(); - testConcurrentModificationError(); -} diff --git a/tests/lib_2/collection/list_test.dart b/tests/lib_2/collection/list_test.dart deleted file mode 100644 index 04f7c2c9ae5..00000000000 --- a/tests/lib_2/collection/list_test.dart +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'dart:collection'; -import "package:expect/expect.dart"; - -class MyList extends ListBase { - List _list; - - MyList(List this._list); - - int get length => _list.length; - - void set length(int x) { - _list.length = x; - } - - E operator [](int idx) => _list[idx]; - - void operator []=(int idx, E value) { - _list[idx] = value; - } -} - -class MyNoSuchMethodList extends Object - with ListMixin - implements List { - List _list; - - MyNoSuchMethodList(List this._list); - - noSuchMethod(Invocation invocation) { - if (invocation.memberName == #length && invocation.isGetter) { - return _list.length; - } - if (invocation.memberName == const Symbol("length=") && - invocation.isSetter) { - _list.length = invocation.positionalArguments.first; - return null; - } - if (invocation.memberName == const Symbol("[]") && - invocation.positionalArguments.length == 1) { - return _list[invocation.positionalArguments.first]; - } - if (invocation.memberName == const Symbol("[]=") && - invocation.positionalArguments.length == 2) { - _list[invocation.positionalArguments.first] = - invocation.positionalArguments[1]; - return null; - } - return super.noSuchMethod(invocation); - } -} - -// Class that behaves like a list but does not implement List. -class MyIndexableNoSuchMethod { - List _list; - - MyIndexableNoSuchMethod(List this._list); - - noSuchMethod(Invocation invocation) { - if (invocation.memberName == #length && invocation.isGetter) { - return _list.length; - } - if (invocation.memberName == const Symbol("length=") && - invocation.isSetter) { - _list.length = invocation.positionalArguments.first; - return null; - } - if (invocation.memberName == const Symbol("prototype")) { - return 42; - } - - if (invocation.memberName == const Symbol("[]") && - invocation.positionalArguments.length == 1) { - return _list[invocation.positionalArguments.first]; - } - if (invocation.memberName == const Symbol("[]=") && - invocation.positionalArguments.length == 2) { - _list[invocation.positionalArguments.first] = - invocation.positionalArguments[1]; - return null; - } - return super.noSuchMethod(invocation); - } -} - -void testRetainWhere() { - List list = [1, 2, 3]; - list.retainWhere((x) => x % 2 == 0); - Expect.equals(1, list.length); - Expect.equals(2, list.first); - Expect.equals(2, list[0]); - - list = new MyList([1, 2, 3]); - list.retainWhere((x) => x % 2 == 0); - Expect.equals(1, list.length); - Expect.equals(2, list.first); - Expect.equals(2, list[0]); - - list = new MyNoSuchMethodList([1, 2, 3]); - list.retainWhere((x) => x % 2 == 0); - Expect.equals(1, list.length); - Expect.equals(2, list.first); - Expect.equals(2, list[0]); - - // Equivalent tests where the type of the List is known statically. - { - var l = new MyList([1, 2, 3]); - l.retainWhere((x) => x % 2 == 0); - Expect.equals(1, l.length); - Expect.equals(2, l.first); - Expect.equals(2, l[0]); - } - - { - var l = new MyNoSuchMethodList([1, 2, 3]); - l.retainWhere((x) => x % 2 == 0); - Expect.equals(1, l.length); - Expect.equals(2, l.first); - Expect.equals(2, l[0]); - } - - // Equivalent tests where the type of the List is not known. - { - dynamic l = new MyList([1, 2, 3]); - l.retainWhere((x) => x % 2 == 0); - Expect.equals(1, l.length); - Expect.equals(2, l.first); - Expect.equals(2, l[0]); - } - - { - dynamic l = new MyNoSuchMethodList([1, 2, 3]); - l.retainWhere((x) => x % 2 == 0); - Expect.equals(1, l.length); - Expect.equals(2, l.first); - Expect.equals(2, l[0]); - } - - { - dynamic indexable = new MyIndexableNoSuchMethod([1, 2, 3]); - Expect.equals(3, indexable.length); - Expect.equals(1, indexable[0]); - Expect.equals(3, indexable[2]); - indexable.length = 2; - Expect.equals(2, indexable.length); - Expect.equals(42, indexable.prototype); - } -} - -void main() { - testRetainWhere(); -} diff --git a/tests/lib_2/collection/map_iterables_consistency_test.dart b/tests/lib_2/collection/map_iterables_consistency_test.dart deleted file mode 100644 index 3ba421e2ed5..00000000000 --- a/tests/lib_2/collection/map_iterables_consistency_test.dart +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2022, 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 - -import 'dart:collection'; - -import 'package:expect/expect.dart'; - -// Test that a Map's keys, values and entries iterables are consistent with -// their map. -// -// While it is generally not permitted to modify a map while iterating the keys, -// values, or entries, it is possible to iterate these collections in between -// modifications of the map. -// -// See #48282 - -void check(String kind, Map m) { - Expect.equals(0, m.length); - - // These existing iterables - final keys = m.keys; - final values = m.values; - final entries = m.entries; - - for (int i = 0; i < 20; i++) { - Expect.equals(i, m.length); - - // Fresh iterables. - Expect.equals(i, m.keys.length); - Expect.equals(i, m.values.length); - Expect.equals(i, m.entries.length); - - Expect.equals(i, List.of(m.keys).length); - Expect.equals(i, List.of(m.values).length); - Expect.equals(i, List.of(m.entries).length); - - Expect.equals(i, iteratedLength(m.keys)); - Expect.equals(i, iteratedLength(m.values)); - Expect.equals(i, iteratedLength(m.entries)); - - // Existing iterables. - Expect.equals(i, keys.length); - Expect.equals(i, values.length); - Expect.equals(i, entries.length); - - Expect.equals(i, List.of(keys).length); - Expect.equals(i, List.of(values).length); - Expect.equals(i, List.of(entries).length); - - Expect.equals(i, iteratedLength(keys)); - Expect.equals(i, iteratedLength(values)); - Expect.equals(i, iteratedLength(entries)); - - m[i] = i; - } -} - -int iteratedLength(Iterable iterable) { - int length = 0; - final iterator = iterable.iterator; - while (iterator.moveNext()) { - length++; - } - return length; -} - -void main() { - check('Map', {}); - check('Map.identity', Map.identity()); - check('HashMap', HashMap()); - check('HashMap.identity', HashMap.identity()); - check('SplayTreeMap', SplayTreeMap()); -} diff --git a/tests/lib_2/collection/queue_first_test.dart b/tests/lib_2/collection/queue_first_test.dart deleted file mode 100644 index 99fe1c6549f..00000000000 --- a/tests/lib_2/collection/queue_first_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012, 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 queue.first.test; - -import "package:expect/expect.dart"; -import 'dart:collection' show Queue; - -main() { - Queue queue1 = new Queue(); - queue1 - ..add(11) - ..add(12) - ..add(13); - Queue queue2 = new Queue(); - - Expect.equals(11, queue1.first); - Expect.throwsStateError(() => queue2.first); -} diff --git a/tests/lib_2/collection/queue_iterator_test.dart b/tests/lib_2/collection/queue_iterator_test.dart deleted file mode 100644 index 994de0a76df..00000000000 --- a/tests/lib_2/collection/queue_iterator_test.dart +++ /dev/null @@ -1,63 +0,0 @@ -// 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 queue.iterator.test; - -import "package:expect/expect.dart"; -import 'dart:collection' show Queue; - -class QueueIteratorTest { - static testMain() { - testSmallQueue(); - testLargeQueue(); - testEmptyQueue(); - } - - static int sum(int expected, Iterator it) { - int count = 0; - while (it.moveNext()) { - count += it.current; - } - Expect.equals(expected, count); - } - - static void testSmallQueue() { - Queue queue = new Queue(); - queue.addLast(1); - queue.addLast(2); - queue.addLast(3); - - Iterator it = queue.iterator; - sum(6, it); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - } - - static void testLargeQueue() { - Queue queue = new Queue(); - int count = 0; - for (int i = 0; i < 100; i++) { - count += i; - queue.addLast(i); - } - Iterator it = queue.iterator; - sum(count, it); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - } - - static void testEmptyQueue() { - Queue queue = new Queue(); - Iterator it = queue.iterator; - sum(0, it); - Expect.isFalse(it.moveNext()); - Expect.isNull(it.current); - } -} - -main() { - QueueIteratorTest.testMain(); -} diff --git a/tests/lib_2/collection/queue_last_test.dart b/tests/lib_2/collection/queue_last_test.dart deleted file mode 100644 index f5575f1d478..00000000000 --- a/tests/lib_2/collection/queue_last_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2012, 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 queue.last.test; - -import "package:expect/expect.dart"; -import 'dart:collection' show Queue; - -main() { - Queue queue1 = new Queue(); - queue1 - ..add(11) - ..add(12) - ..add(13); - Queue queue2 = new Queue(); - - Expect.equals(13, queue1.last); - Expect.throwsStateError(() => queue2.last); -} diff --git a/tests/lib_2/collection/queue_single_test.dart b/tests/lib_2/collection/queue_single_test.dart deleted file mode 100644 index 29654c6d292..00000000000 --- a/tests/lib_2/collection/queue_single_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012, 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 queue.single.test; - -import "package:expect/expect.dart"; -import 'dart:collection' show Queue; - -main() { - Queue queue1 = new Queue(); - queue1.add(42); - Queue queue2 = new Queue(); - queue2 - ..add(11) - ..add(12) - ..add(13); - Queue queue3 = new Queue(); - - Expect.equals(42, queue1.single); - Expect.throwsStateError(() => queue2.single); - Expect.throwsStateError(() => queue3.single); -} diff --git a/tests/lib_2/collection/queue_test.dart b/tests/lib_2/collection/queue_test.dart deleted file mode 100644 index 6a903e6cfd0..00000000000 --- a/tests/lib_2/collection/queue_test.dart +++ /dev/null @@ -1,485 +0,0 @@ -// 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 queue.test; - -import "package:expect/expect.dart"; -import 'dart:collection'; - -abstract class QueueTest { - Queue newQueue(); - Queue newQueueFrom(Iterable iterable); - - void testMain() { - Queue queue = newQueue(); - checkQueue(queue, 0, 0); - - queue.addFirst(1); - checkQueue(queue, 1, 1); - - queue.addLast(10); - checkQueue(queue, 2, 11); - - Expect.equals(10, queue.removeLast()); - checkQueue(queue, 1, 1); - - queue.addLast(10); - Expect.equals(1, queue.removeFirst()); - checkQueue(queue, 1, 10); - - queue.addFirst(1); - queue.addLast(100); - queue.addLast(1000); - Expect.equals(1000, queue.removeLast()); - queue.addLast(1000); - checkQueue(queue, 4, 1111); - - queue.removeFirst(); - checkQueue(queue, 3, 1110); - - int mapTest(Object value) { - return (value as int) ~/ 10; - } - - bool is10(Object value) { - return (value == 10); - } - - Queue mapped = newQueueFrom(queue.map(mapTest)); - checkQueue(mapped, 3, 111); - checkQueue(queue, 3, 1110); - Expect.equals(1, mapped.removeFirst()); - Expect.equals(100, mapped.removeLast()); - Expect.equals(10, mapped.removeFirst()); - - Queue other = newQueueFrom(queue.where(is10)); - checkQueue(other, 1, 10); - - Expect.isTrue(queue.any(is10)); - - bool isInstanceOfInt(Object value) { - return (value is int); - } - - Expect.isTrue(queue.every(isInstanceOfInt)); - - Expect.isFalse(queue.every(is10)); - - bool is1(Object value) { - return (value == 1); - } - - Expect.isFalse(queue.any(is1)); - - queue.clear(); - Expect.equals(0, queue.length); - - Expect.throws(queue.removeFirst); - Expect.equals(0, queue.length); - - Expect.throws(queue.removeLast); - Expect.equals(0, queue.length); - - queue.addFirst(1); - queue.addFirst(2); - Expect.equals(2, queue.first); - Expect.equals(1, queue.last); - - queue.addLast(3); - Expect.equals(3, queue.last); - bool isGreaterThanOne(Object value) { - return ((value as int) > 1); - } - - other = newQueueFrom(queue.where(isGreaterThanOne)); - checkQueue(other, 2, 5); - - // Cycle through values without ever having large element count. - queue = newQueue(); - queue.add(0); - for (int i = 0; i < 255; i++) { - queue.add(i + 1); - Expect.equals(i, queue.removeFirst()); - } - Expect.equals(255, queue.removeFirst()); - Expect.isTrue(queue.isEmpty); - - testAddAll(); - testLengthChanges(); - testLarge(); - testFromListToList(); - } - - void checkQueue(Queue queue, int expectedSize, int expectedSum) { - testLength(expectedSize, queue); - int sum = 0; - void sumElements(Object value) { - sum += value as int; - } - - queue.forEach(sumElements); - Expect.equals(expectedSum, sum); - } - - void testLength(int length, Queue queue) { - Expect.equals(length, queue.length); - ((length == 0) ? Expect.isTrue : Expect.isFalse)(queue.isEmpty); - ((length != 0) ? Expect.isTrue : Expect.isFalse)(queue.isNotEmpty); - } - - void testAddAll() { - Set set = new Set.from([1, 2, 4]); - Expect.equals(3, set.length); - - Queue queue1 = newQueueFrom(set); - Queue queue2 = newQueue(); - Queue queue3 = newQueue(); - testLength(3, queue1); - testLength(0, queue2); - testLength(0, queue3); - - queue2.addAll(set); - testLength(3, queue2); - - queue3.addAll(queue1); - testLength(3, queue3); - - int sum = 0; - void f(e) { - sum += e; - } - - set.forEach(f); - Expect.equals(7, sum); - sum = 0; - - queue1.forEach(f); - Expect.equals(7, sum); - sum = 0; - - queue2.forEach(f); - Expect.equals(7, sum); - sum = 0; - - queue3.forEach(f); - Expect.equals(7, sum); - sum = 0; - - set = new Set.from([]); - queue1 = newQueueFrom(set); - queue2 = newQueue(); - queue3 = newQueue(); - - queue2.addAll(set); - queue3.addAll(queue1); - - Expect.equals(0, set.length); - Expect.equals(0, queue1.length); - Expect.equals(0, queue2.length); - Expect.equals(0, queue3.length); - } - - void testLengthChanges() { - // Test that the length property is updated properly by - // modifications; - Queue queue = newQueue(); - testLength(0, queue); - - for (int i = 1; i <= 10; i++) { - queue.add(i); - testLength(i, queue); - } - - for (int i = 1; i <= 10; i++) { - queue.addFirst(11 - i); - testLength(10 + i, queue); - } - - for (int i = 1; i <= 10; i++) { - queue.addLast(i); - testLength(20 + i, queue); - } - - queue.addAll([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - testLength(40, queue); - - for (int i = 1; i <= 5; i++) { - Expect.equals(i, queue.removeFirst()); - testLength(40 - i, queue); - } - - for (int i = 1; i <= 5; i++) { - Expect.equals(11 - i, queue.removeLast()); - testLength(35 - i, queue); - } - - Expect.isTrue(queue.remove(10)); - testLength(29, queue); - Expect.isFalse(queue.remove(999)); - testLength(29, queue); - - queue.removeWhere((x) => x == 7); - testLength(26, queue); - - queue.retainWhere((x) => x != 3); - testLength(23, queue); - - Expect.listEquals( - [6, 8, 9, 1, 2, 4, 5, 6, 8, 9, 10, 1, 2, 4, 5, 6, 8, 9, 10, 1, 2, 4, 5], - queue.toList()); - - // Regression test: http://dartbug.com/16270 - // These should all do nothing, and should not throw. - Queue emptyQueue = newQueue(); - emptyQueue.remove(0); - emptyQueue.removeWhere((x) => throw "unreachable"); - emptyQueue.retainWhere((x) => throw "unreachable"); - Expect.equals(0, emptyQueue.length); - } - - void testLarge() { - int N = 10000; - Set set = new Set(); - - Queue queue = newQueue(); - Expect.isTrue(queue.isEmpty); - - for (int i = 0; i < N; i++) { - queue.add(i); - set.add(i); - } - Expect.equals(N, queue.length); - Expect.isFalse(queue.isEmpty); - - Expect.equals(0, queue.elementAt(0)); - Expect.equals(N - 1, queue.elementAt(N - 1)); - Expect.throws(() { - queue.elementAt(-1); - }); - Expect.throws(() { - queue.elementAt(N); - }); - - Iterable skip1 = queue.skip(1); - Iterable take1 = queue.take(1); - Iterable mapped = queue.map((e) => -e); - - for (int i = 0; i < 500; i++) { - Expect.equals(i, take1.first); - Expect.equals(i, queue.first); - Expect.equals(-i, mapped.first); - Expect.equals(i + 1, skip1.first); - Expect.equals(i, queue.removeFirst()); - Expect.equals(i + 1, take1.first); - Expect.equals(-i - 1, mapped.first); - Expect.equals(N - 1 - i, queue.last); - Expect.equals(N - 1 - i, queue.removeLast()); - } - Expect.equals(N - 1000, queue.length); - - Expect.isTrue(queue.remove(N >> 1)); - Expect.equals(N - 1001, queue.length); - - queue.clear(); - Expect.equals(0, queue.length); - Expect.isTrue(queue.isEmpty); - - queue.addAll(set); - Expect.equals(N, queue.length); - Expect.isFalse(queue.isEmpty); - - // Iterate. - for (var element in queue) { - Expect.isTrue(set.contains(element)); - } - - queue.forEach((element) { - Expect.isTrue(set.contains(element)); - }); - - queue.addAll(set); - Expect.equals(N * 2, queue.length); - Expect.isFalse(queue.isEmpty); - - queue.clear(); - Expect.equals(0, queue.length); - Expect.isTrue(queue.isEmpty); - } - - void testFromListToList() { - const int N = 256; - List list = []; - for (int i = 0; i < N; i++) { - Queue queue = newQueueFrom(list); - - Expect.equals(list.length, queue.length); - List to = queue.toList(); - Expect.listEquals(list, to); - - queue.add(i); - list.add(i); - Expect.equals(list.length, queue.length); - to = queue.toList(); - Expect.listEquals(list, to); - } - } -} - -class ListQueueTest extends QueueTest { - Queue newQueue() => new ListQueue(); - Queue newQueueFrom(Iterable elements) => new ListQueue.from(elements); - - void testMain() { - super.testMain(); - trickyTest(); - } - - void trickyTest() { - // Test behavior around the know growing capacities of a ListQueue. - Queue q = new ListQueue(); - - for (int i = 0; i < 255; i++) { - q.add(i); - } - for (int i = 0; i < 128; i++) { - Expect.equals(i, q.removeFirst()); - } - q.add(255); - for (int i = 0; i < 127; i++) { - q.add(i); - } - - Expect.equals(255, q.length); - - // Remove element at end of internal buffer. - q.removeWhere((v) => v == 255); - // Remove element at beginning of internal buffer. - q.removeWhere((v) => v == 0); - // Remove element at both ends of internal buffer. - q.removeWhere((v) => v == 254 || v == 1); - - Expect.equals(251, q.length); - - Iterable i255 = new Iterable.generate(255, (x) => x); - - q = new ListQueue(); - q.addAll(i255); - Expect.listEquals(i255.toList(), q.toList()); - - q = new ListQueue(); - q.addAll(i255.toList()); - Expect.listEquals(i255.toList(), q.toList()); - - q = new ListQueue.from(i255); - for (int i = 0; i < 128; i++) q.removeFirst(); - q.add(256); - q.add(0); - q.addAll(i255.toList()); - Expect.equals(129 + 255, q.length); - - // Test addAll that requires the queue to grow. - q = new ListQueue(); - q.addAll(i255.take(35)); - q.addAll(i255.skip(35).take(96)); - q.addAll(i255.skip(35 + 96)); - Expect.listEquals(i255.toList(), q.toList()); - } -} - -class DoubleLinkedQueueTest extends QueueTest { - Queue newQueue() => new DoubleLinkedQueue(); - Queue newQueueFrom(Iterable elements) => new DoubleLinkedQueue.from(elements); - - void testMain() { - super.testMain(); - testQueueElements(); - } - - void testQueueElements() { - DoubleLinkedQueue queue1 = new DoubleLinkedQueue.from([1, 2, 3]); - DoubleLinkedQueue queue2 = new DoubleLinkedQueue(); - queue2.addAll(queue1); - - Expect.equals(queue1.length, queue2.length); - DoubleLinkedQueueEntry entry1 = queue1.firstEntry(); - DoubleLinkedQueueEntry entry2 = queue2.firstEntry(); - while (entry1 != null) { - Expect.notIdentical(entry1, entry2); - entry1 = entry1.nextEntry(); - entry2 = entry2.nextEntry(); - } - Expect.isNull(entry2); - - var firstEntry = queue1.firstEntry(); - var secondEntry = queue1.firstEntry().nextEntry(); - var thirdEntry = queue1.lastEntry(); - firstEntry.prepend(4); - firstEntry.append(5); - secondEntry.prepend(6); - secondEntry.append(7); - thirdEntry.prepend(8); - thirdEntry.append(9); - Expect.equals(9, queue1.length); - Expect.listEquals([4, 1, 5, 6, 2, 7, 8, 3, 9], queue1.toList()); - Expect.equals(1, firstEntry.remove()); - Expect.equals(2, secondEntry.remove()); - Expect.equals(3, thirdEntry.remove()); - Expect.equals(6, queue1.length); - Expect.listEquals([4, 5, 6, 7, 8, 9], queue1.toList()); - - var elements = []; - queue1.forEachEntry((entry) { - elements.add(entry.element); - entry.remove(); // Can remove while iterating. - }); - Expect.listEquals([4, 5, 6, 7, 8, 9], elements); - Expect.isTrue(queue1.isEmpty); - } -} - -void linkEntryTest() { - var entry = new DoubleLinkedQueueEntry(42); - Expect.isNull(entry.previousEntry()); - Expect.isNull(entry.nextEntry()); - - entry.append(37); - entry.prepend(87); - var prev = entry.previousEntry(); - var next = entry.nextEntry(); - Expect.equals(42, entry.element); - Expect.equals(37, next.element); - Expect.equals(87, prev.element); - Expect.identical(entry, prev.nextEntry()); - Expect.identical(entry, next.previousEntry()); - Expect.isNull(next.nextEntry()); - Expect.isNull(prev.previousEntry()); - - entry.element = 117; - Expect.equals(117, entry.element); - Expect.identical(next, entry.nextEntry()); - Expect.identical(prev, entry.previousEntry()); - - Expect.equals(117, entry.remove()); - Expect.identical(next, prev.nextEntry()); - Expect.identical(prev, next.previousEntry()); - Expect.isNull(next.nextEntry()); - Expect.isNull(prev.previousEntry()); - Expect.equals(37, next.element); - Expect.equals(87, prev.element); - - Expect.equals(37, next.remove()); - Expect.equals(87, prev.element); - Expect.isNull(prev.nextEntry()); - Expect.isNull(prev.previousEntry()); - - Expect.equals(87, prev.remove()); -} - -main() { - new DoubleLinkedQueueTest().testMain(); - new ListQueueTest().testMain(); - linkEntryTest(); -} diff --git a/tests/lib_2/convert/ascii_test.dart b/tests/lib_2/convert/ascii_test.dart deleted file mode 100644 index fa72dc6818e..00000000000 --- a/tests/lib_2/convert/ascii_test.dart +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; -import 'dart:convert'; - -var asciiStrings = [ - "pure ascii", - "\x00 with control characters \n", - "\x01 edge cases \x7f" -]; - -var nonAsciiStrings = [ - "\x80 edge case first", - "Edge case ASCII \u{80}", - "Edge case byte \u{ff}", - "Edge case super-BMP \u{10000}" -]; - -void main() { - // Build longer versions of the example strings. - for (int i = 0, n = asciiStrings.length; i < n; i++) { - var string = asciiStrings[i]; - while (string.length < 1024) { - string += string; - } - asciiStrings.add(string); - } - for (int i = 0, n = nonAsciiStrings.length; i < n; i++) { - var string = nonAsciiStrings[i]; - while (string.length < 1024) { - string += string; - } - nonAsciiStrings.add(string); - } - testDirectConversions(); - testChunkedConversions(); -} - -void testDirectConversions() { - for (var codec in [ascii, new AsciiCodec()]) { - for (var asciiString in asciiStrings) { - List bytes = codec.encoder.convert(asciiString); - Expect.listEquals(asciiString.codeUnits.toList(), bytes, asciiString); - String roundTripString = codec.decoder.convert(bytes); - Expect.equals(asciiString, roundTripString); - roundTripString = codec.decode(bytes); - Expect.equals(asciiString, roundTripString); - } - - for (var nonAsciiString in nonAsciiStrings) { - Expect.throws(() { - print(codec.encoder.convert(nonAsciiString)); - }, null, nonAsciiString); - } - - var encode = codec.encoder.convert; - Expect.listEquals([0x42, 0x43, 0x44], encode("ABCDE", 1, 4)); - Expect.listEquals([0x42, 0x43, 0x44, 0x45], encode("ABCDE", 1)); - Expect.listEquals([0x42, 0x43, 0x44], encode("\xffBCD\xff", 1, 4)); - Expect.throws(() { - encode("\xffBCD\xff", 0, 4); - }); - Expect.throws(() { - encode("\xffBCD\xff", 1); - }); - Expect.throws(() { - encode("\xffBCD\xff", 1, 5); - }); - Expect.throws(() { - encode("\xffBCD\xff", -1, 4); - }); - Expect.throws(() { - encode("\xffBCD\xff", 1, -1); - }); - Expect.throws(() { - encode("\xffBCD\xff", 3, 2); - }); - - var decode = codec.decoder.convert; - Expect.equals("BCD", decode([0x41, 0x42, 0x43, 0x44, 0x45], 1, 4)); - Expect.equals("BCDE", decode([0x41, 0x42, 0x43, 0x44, 0x45], 1)); - Expect.equals("BCD", decode([0xFF, 0x42, 0x43, 0x44, 0xFF], 1, 4)); - Expect.throws(() { - decode([0xFF, 0x42, 0x43, 0x44, 0xFF], 0, 4); - }); - Expect.throws(() { - decode([0xFF, 0x42, 0x43, 0x44, 0xFF], 1); - }); - Expect.throws(() { - decode([0xFF, 0x42, 0x43, 0x44, 0xFF], 1, 5); - }); - Expect.throws(() { - decode([0xFF, 0x42, 0x43, 0x44, 0xFF], -1, 4); - }); - Expect.throws(() { - decode([0xFF, 0x42, 0x43, 0x44, 0xFF], 1, -1); - }); - Expect.throws(() { - decode([0xFF, 0x42, 0x43, 0x44, 0xFF], 3, 2); - }); - } - - var allowInvalidCodec = new AsciiCodec(allowInvalid: true); - var invalidBytes = [0, 1, 0xff, 0xdead, 0]; - String decoded = allowInvalidCodec.decode(invalidBytes); - Expect.equals("\x00\x01\uFFFD\uFFFD\x00", decoded); - decoded = allowInvalidCodec.decoder.convert(invalidBytes); - Expect.equals("\x00\x01\uFFFD\uFFFD\x00", decoded); - decoded = ascii.decode(invalidBytes, allowInvalid: true); - Expect.equals("\x00\x01\uFFFD\uFFFD\x00", decoded); -} - -List encode( - String str, int chunkSize, Converter> converter) { - List bytes = []; - var byteSink = new ByteConversionSink.withCallback(bytes.addAll); - var stringConversionSink = converter.startChunkedConversion(byteSink); - for (int i = 0; i < str.length; i += chunkSize) { - if (i + chunkSize <= str.length) { - stringConversionSink.add(str.substring(i, i + chunkSize)); - } else { - stringConversionSink.add(str.substring(i)); - } - } - stringConversionSink.close(); - return bytes; -} - -String decode( - List bytes, int chunkSize, Converter, String> converter) { - StringBuffer buf = new StringBuffer(); - var stringSink = new StringConversionSink.fromStringSink(buf); - var byteConversionSink = converter.startChunkedConversion(stringSink); - for (int i = 0; i < bytes.length; i += chunkSize) { - if (i + chunkSize <= bytes.length) { - byteConversionSink.add(bytes.sublist(i, i + chunkSize)); - } else { - byteConversionSink.add(bytes.sublist(i)); - } - } - byteConversionSink.close(); - return buf.toString(); -} - -void testChunkedConversions() { - // Check encoding. - for (var converter in [ - ascii.encoder, - new AsciiCodec().encoder, - new AsciiEncoder() - ]) { - for (int chunkSize in [1, 2, 5, 50]) { - for (var asciiString in asciiStrings) { - var units = asciiString.codeUnits.toList(); - List bytes = encode(asciiString, chunkSize, converter); - Expect.listEquals(units, bytes); - } - for (var nonAsciiString in nonAsciiStrings) { - Expect.throws(() { - encode(nonAsciiString, chunkSize, converter); - }); - } - } - } - // Check decoding. - for (var converter in [ - ascii.decoder, - new AsciiCodec().decoder, - new AsciiDecoder() - ]) { - for (int chunkSize in [1, 2, 5, 50]) { - for (var asciiString in asciiStrings) { - var units = asciiString.codeUnits.toList(); - Expect.equals(asciiString, decode(units, chunkSize, converter)); - } - for (var nonAsciiString in nonAsciiStrings) { - var units = nonAsciiString.codeUnits.toList(); - Expect.throws(() { - decode(units, chunkSize, converter); - }); - } - } - } -} diff --git a/tests/lib_2/convert/base64_test.dart b/tests/lib_2/convert/base64_test.dart deleted file mode 100644 index fdc10d9da8b..00000000000 --- a/tests/lib_2/convert/base64_test.dart +++ /dev/null @@ -1,300 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:convert'; -import "dart:typed_data"; -import "package:expect/expect.dart"; - -main() { - for (var list in [ - [], - [0x00], - [0xff, 0x00], - [0xff, 0xaa, 0x55], - [0x00, 0x01, 0x02, 0x03], - new Iterable.generate(13).toList(), - new Iterable.generate(254).toList(), - new Iterable.generate(255).toList(), - new Iterable.generate(256).toList() - ]) { - testRoundtrip(list, "List#${list.length}"); - testRoundtrip(new Uint8List.fromList(list), "Uint8List#${list.length}"); - } - testErrors(); - testIssue25577(); - - // Decoder is lenient with mixed styles. - Expect.listEquals([0xfb, 0xff, 0xbf, 0x00], base64.decode("-_+/AA%3D=")); - Expect.listEquals([0xfb, 0xff, 0xbf, 0x00], base64.decode("-_+/AA=%3D")); -} - -void testRoundtrip(List list, String name) { - // Direct. - String encodedNormal = base64.encode(list); - String encodedPercent = encodedNormal.replaceAll("=", "%3D"); - String uriEncoded = base64Url.encode(list); - String expectedUriEncoded = - encodedNormal.replaceAll("+", "-").replaceAll("/", "_"); - Expect.equals(expectedUriEncoded, uriEncoded); - - List result = base64.decode(encodedNormal); - Expect.listEquals(list, result, name); - result = base64.decode(encodedPercent); - Expect.listEquals(list, result, name); - result = base64.decode(uriEncoded); - Expect.listEquals(list, result, name); - - int increment = list.length ~/ 7 + 1; - // Chunked. - for (int i = 0; i < list.length; i += increment) { - for (int j = i; j < list.length; j += increment) { - // Normal - { - // Using add/close - var results; - var sink = new ChunkedConversionSink.withCallback((v) { - results = v; - }); - var encoder = base64.encoder.startChunkedConversion(sink); - encoder.add(list.sublist(0, i)); - encoder.add(list.sublist(i, j)); - encoder.add(list.sublist(j, list.length)); - encoder.close(); - var name = "0-$i-$j-${list.length}: list"; - Expect.equals(encodedNormal, results.join(""), name); - } - { - // Using addSlice - var results; - var sink = new ChunkedConversionSink.withCallback((v) { - results = v; - }); - var encoder = base64.encoder.startChunkedConversion(sink); - encoder.addSlice(list, 0, i, false); - encoder.addSlice(list, i, j, false); - encoder.addSlice(list, j, list.length, true); - var name = "0-$i-$j-${list.length}: $list"; - Expect.equals(encodedNormal, results.join(""), name); - } - // URI - { - // Using add/close - var results; - var sink = new ChunkedConversionSink.withCallback((v) { - results = v; - }); - var encoder = base64Url.encoder.startChunkedConversion(sink); - encoder.add(list.sublist(0, i)); - encoder.add(list.sublist(i, j)); - encoder.add(list.sublist(j, list.length)); - encoder.close(); - var name = "0-$i-$j-${list.length}: list"; - Expect.equals(uriEncoded, results.join(""), name); - } - { - // Using addSlice - var results; - var sink = new ChunkedConversionSink.withCallback((v) { - results = v; - }); - var encoder = base64Url.encoder.startChunkedConversion(sink); - encoder.addSlice(list, 0, i, false); - encoder.addSlice(list, i, j, false); - encoder.addSlice(list, j, list.length, true); - var name = "0-$i-$j-${list.length}: $list"; - Expect.equals(uriEncoded, results.join(""), name); - } - } - } - // Using .encode - Expect.equals(uriEncoded, base64Url.encode(list), ".encode($list)"); - // Using base64UrlEncode - Expect.equals(uriEncoded, base64UrlEncode(list), ".encode($list)"); - - for (var encoded in [encodedNormal, encodedPercent, uriEncoded]) { - increment = encoded.length ~/ 7 + 1; - for (int i = 0; i < encoded.length; i += increment) { - for (int j = i; j < encoded.length; j += increment) { - { - // Using add/close - List> results; - var sink = new ChunkedConversionSink>.withCallback((v) { - results = v; - }); - var decoder = base64.decoder.startChunkedConversion(sink); - decoder.add(encoded.substring(0, i)); - decoder.add(encoded.substring(i, j)); - decoder.add(encoded.substring(j, encoded.length)); - decoder.close(); - var name = "0-$i-$j-${encoded.length}: $encoded"; - Expect.listEquals(list, results.expand((x) => x).toList(), name); - } - { - // Using addSlice - List> results; - var sink = new ChunkedConversionSink>.withCallback((v) { - results = v; - }); - var decoder = base64.decoder.startChunkedConversion(sink); - decoder.addSlice(encoded, 0, i, false); - decoder.addSlice(encoded, i, j, false); - decoder.addSlice(encoded, j, encoded.length, true); - var name = "0-$i-$j-${encoded.length}: $encoded"; - Expect.listEquals(list, results.expand((x) => x).toList(), name); - } - } - } - Expect.listEquals(list, base64.decode(encoded), ".decode($encoded)"); - Expect.listEquals(list, base64Url.decode(encoded), "url.decode($encoded)"); - Expect.listEquals(list, base64Decode(encoded), "base64Decode($encoded)"); - } -} - -void testErrors() { - void badChunkDecode(List list) { - Expect.throwsFormatException(() { - var sink = new ChunkedConversionSink>.withCallback((v) { - Expect.fail("Should have thrown: chunk $list"); - }); - var c = base64.decoder.startChunkedConversion(sink); - for (String string in list) { - c.add(string); - } - c.close(); - }, "chunk $list"); - } - - void badDecode(String string) { - Expect.throwsFormatException(() => base64.decode(string), string); - Expect.throwsFormatException(() => base64Url.decode(string), string); - badChunkDecode([string]); - badChunkDecode(["", string]); - badChunkDecode([string, ""]); - badChunkDecode([string, "", ""]); - badChunkDecode(["", string, ""]); - } - - badDecode("A"); - badDecode("AA"); - badDecode("AAA"); - badDecode("AAAAA"); - badDecode("AAAAAA"); - badDecode("AAAAAAA"); - badDecode("AAAA="); - badDecode("AAAA=="); - badDecode("AAAA==="); - badDecode("AAAA===="); - badDecode("AAAA%"); - badDecode("AAAA%3"); - badDecode("AAAA%3D"); - badDecode("AAA%3D%"); - badDecode("AAA%3D="); - badDecode("A="); - badDecode("A=A"); - badDecode("A=="); - badDecode("A==A"); - badDecode("A==="); - badDecode("===="); - badDecode("AA="); - badDecode("AA%="); - badDecode("AA%3"); - badDecode("AA%3D"); - badDecode("AA==="); - badDecode("AAA=="); - badDecode("AAA=AAAA"); - badDecode("AAA\x00"); - badDecode("AAA=\x00"); - badDecode("AAA\x80"); - badDecode("AAA\xFF"); - badDecode("AAA\u{141}"); - badDecode("AAA\u{1041}"); - badDecode("AAA\u{10041}"); - badDecode("AA\u{141}="); - badDecode("AA\u{1041}="); - badDecode("AA\u{10041}="); - - var alphabet = - "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/-_"; - var units = alphabet.codeUnits; - for (int i = 0; i < 128; i++) { - if (!units.contains(i)) { - badDecode(new String.fromCharCode(i) * 4); - } - } - - badChunkDecode(["A", "A"]); - badChunkDecode(["A", "A", "A"]); - badChunkDecode(["A", "A", "="]); - badChunkDecode(["A", "A", "=", ""]); - badChunkDecode(["A", "A", "=", "=", "="]); - badChunkDecode(["AAA", "=="]); - badChunkDecode(["A", "A", "A"]); - badChunkDecode(["AAA", ""]); - badChunkDecode(["AA=", ""]); - badChunkDecode(["AB==", ""]); - - badChunkEncode(List list) { - for (int i = 0; i < list.length; i++) { - for (int j = 0; j < list.length; j++) { - Expect.throwsArgumentError(() { - var sink = new ChunkedConversionSink.withCallback((v) { - Expect.fail("Should have thrown: chunked $list"); - }); - var c = base64.encoder.startChunkedConversion(sink); - c.add(list.sublist(0, i)); - c.add(list.sublist(i, j)); - c.add(list.sublist(j, list.length)); - c.close(); - }, "chunk $list"); - } - } - for (int i = 0; i < list.length; i++) { - for (int j = 0; j < list.length; j++) { - Expect.throwsArgumentError(() { - var sink = new ChunkedConversionSink.withCallback((v) { - Expect.fail("Should have thrown: chunked $list"); - }); - var c = base64.encoder.startChunkedConversion(sink); - c.addSlice(list, 0, i, false); - c.addSlice(list, i, j, false); - c.addSlice(list, j, list.length, true); - }, "chunk $list"); - } - } - } - - void badEncode(int invalid) { - Expect.throwsArgumentError(() => base64.encode([invalid]), "$invalid"); - Expect.throwsArgumentError( - () => base64.encode([0, invalid, 0]), "$invalid"); - badChunkEncode([invalid]); - badChunkEncode([0, invalid]); - badChunkEncode([0, 0, invalid]); - badChunkEncode([0, invalid, 0]); - badChunkEncode([invalid, 0, 0]); - } - - badEncode(-1); - badEncode(0x100); - badEncode(0x1000); - badEncode(0x10000); - badEncode(0x100000000); // //# 01: ok - badEncode(0x7000000000000000); // //# 01: continued -} - -void testIssue25577() { - // Regression test for http://dartbug.com/25577. - StringConversionSink decodeSink = - base64.decoder.startChunkedConversion(new TestSink>()); - ByteConversionSink encodeSink = - base64.encoder.startChunkedConversion(new TestSink()); -} - -// Implementation of Sink to test type constraints. -class TestSink implements Sink { - void add(T value) {} - void close() {} -} diff --git a/tests/lib_2/convert/chunked_conversion1_test.dart b/tests/lib_2/convert/chunked_conversion1_test.dart deleted file mode 100644 index c998f548658..00000000000 --- a/tests/lib_2/convert/chunked_conversion1_test.dart +++ /dev/null @@ -1,261 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'dart:convert'; - -import 'package:expect/expect.dart'; - -// This test implements a new special interface that can be used to -// send data more efficiently between two converters. - -abstract class MyChunkedIntSink implements ChunkedConversionSink { - MyChunkedIntSink(); - factory MyChunkedIntSink.from(sink) = IntAdapterSink; - factory MyChunkedIntSink.withCallback(callback) { - var sink = new ChunkedConversionSink.withCallback(callback); - return new MyChunkedIntSink.from(sink); - } - - add(int i); - close(); - - // The special method. - void specialI(int i); -} - -class IntAdapterSink extends MyChunkedIntSink { - final _sink; - IntAdapterSink(this._sink); - add(o) => _sink.add(o); - close() => _sink.close(); - void specialI(int o) => add(o); -} - -abstract class MyChunkedBoolSink implements ChunkedConversionSink { - MyChunkedBoolSink(); - factory MyChunkedBoolSink.from(sink) = BoolAdapterSink; - factory MyChunkedBoolSink.withCallback(callback) { - var sink = new ChunkedConversionSink.withCallback(callback); - return new MyChunkedBoolSink.from(sink); - } - - add(bool b); - close(); - - specialB(bool b); -} - -class BoolAdapterSink extends MyChunkedBoolSink { - final _sink; - BoolAdapterSink(this._sink); - add(o) => _sink.add(o); - close() => _sink.close(); - specialB(o) => add(o); -} - -class IntBoolConverter1 extends Converter { - bool convert(int input) => input > 0; - - startChunkedConversion(sink) { - if (sink is! MyChunkedBoolSink) sink = new MyChunkedBoolSink.from(sink); - return new IntBoolConverter1Sink(sink); - } -} - -class BoolIntConverter1 extends Converter { - int convert(bool input) => input ? 1 : 0; - - startChunkedConversion(sink) { - if (sink is! MyChunkedIntSink) sink = new MyChunkedIntSink.from(sink); - return new BoolIntConverter1Sink(sink); - } -} - -int specialICounter = 0; -int specialBCounter = 0; - -class IntBoolConverter1Sink extends MyChunkedIntSink { - var outSink; - IntBoolConverter1Sink(this.outSink); - - add(int i) { - outSink.specialB(i > 0); - } - - void specialI(int i) { - specialICounter++; - add(i); - } - - close() => outSink.close(); -} - -class BoolIntConverter1Sink extends MyChunkedBoolSink { - var outSink; - BoolIntConverter1Sink(this.outSink); - - add(bool b) { - outSink.specialI(b ? 1 : 0); - } - - specialB(bool b) { - specialBCounter++; - add(b); - } - - close() => outSink.close(); -} - -class IdentityConverter extends Converter { - T convert(T x) => x; - - startChunkedConversion(sink) { - return new IdentitySink(sink); - } -} - -class IdentitySink implements ChunkedConversionSink { - final _sink; - IdentitySink(this._sink); - void add(T o) => _sink.add(o); - close() => _sink.close(); -} - -main() { - var intSink, boolSink, sink, sink2; - - // Test int->bool converter individually. - Converter int2boolConverter = new IntBoolConverter1(); - Expect.listEquals( - [true, false, true], [2, -2, 2].map(int2boolConverter.convert).toList()); - var hasExecuted = false; - boolSink = new MyChunkedBoolSink.withCallback((value) { - hasExecuted = true; - Expect.listEquals([true, false, true], value); - }); - intSink = int2boolConverter.startChunkedConversion(boolSink); - intSink.add(3); - intSink.specialI(-3); - intSink.add(3); - intSink.close(); - Expect.isTrue(hasExecuted); - Expect.equals(1, specialICounter); - specialICounter = 0; - hasExecuted = false; - - // Test bool->int converter individually. - Converter bool2intConverter = new BoolIntConverter1(); - Expect.listEquals( - [1, 0, 1], [true, false, true].map(bool2intConverter.convert).toList()); - hasExecuted = false; - intSink = new MyChunkedIntSink.withCallback((value) { - hasExecuted = true; - Expect.listEquals([1, 0, 1], value); - }); - boolSink = bool2intConverter.startChunkedConversion(intSink); - boolSink.specialB(true); - boolSink.add(false); - boolSink.add(true); - boolSink.close(); - Expect.isTrue(hasExecuted); - Expect.equals(1, specialBCounter); - specialBCounter = 0; - hasExecuted = false; - - // Test identity converter individually. - var identityConverter = new IdentityConverter(); - hasExecuted = false; - sink = new ChunkedConversionSink.withCallback((value) { - hasExecuted = true; - Expect.listEquals([1, 2, 3], value); - }); - sink2 = identityConverter.startChunkedConversion(sink); - [1, 2, 3].forEach(sink2.add); - sink2.close(); - Expect.isTrue(hasExecuted); - hasExecuted = false; - - // Test fused converters. - Converter fused = int2boolConverter.fuse(bool2intConverter); - Expect.listEquals([1, 0, 1], [2, -2, 2].map(fused.convert).toList()); - hasExecuted = false; - Sink intSink2 = new MyChunkedIntSink.withCallback((value) { - hasExecuted = true; - Expect.listEquals([1, 0, 1], value); - }); - intSink = fused.startChunkedConversion(intSink2); - intSink.specialI(3); - intSink.add(-3); - intSink.add(3); - intSink.close(); - Expect.isTrue(hasExecuted); - Expect.equals(3, specialBCounter); - specialBCounter = 0; - Expect.equals(1, specialICounter); - specialICounter = 0; - hasExecuted = false; - - // With identity in front. - Converter fused2 = new IdentityConverter().fuse(fused); - hasExecuted = false; - intSink2 = new MyChunkedIntSink.withCallback((value) { - hasExecuted = true; - Expect.listEquals([1, 0, 1], value); - }); - sink = fused2.startChunkedConversion(intSink2); - Expect.isFalse(sink is MyChunkedIntSink); - sink.add(3); - sink.add(-3); - sink.add(3); - sink.close(); - Expect.isTrue(hasExecuted); - Expect.equals(3, specialBCounter); - specialBCounter = 0; - Expect.equals(0, specialICounter); - specialICounter = 0; - hasExecuted = false; - - // With identity at the end. - fused2 = fused.fuse(new IdentityConverter()); - hasExecuted = false; - sink = new ChunkedConversionSink.withCallback((value) { - hasExecuted = true; - Expect.listEquals([1, 0, 1], value); - }); - intSink = fused2.startChunkedConversion(sink); - Expect.isTrue(intSink is MyChunkedIntSink); - intSink.specialI(3); - intSink.add(-3); - intSink.specialI(3); - intSink.close(); - Expect.isTrue(hasExecuted); - Expect.equals(3, specialBCounter); - specialBCounter = 0; - Expect.equals(2, specialICounter); - specialICounter = 0; - hasExecuted = false; - - // With identity between the two converters. - fused = - int2boolConverter.fuse(new IdentityConverter()).fuse(bool2intConverter); - Expect.listEquals([1, 0, 1], [2, -2, 2].map(fused.convert).toList()); - hasExecuted = false; - intSink2 = new MyChunkedIntSink.withCallback((value) { - hasExecuted = true; - Expect.listEquals([1, 0, 1], value); - }); - intSink = fused.startChunkedConversion(intSink2); - intSink.specialI(3); - intSink.add(-3); - intSink.add(3); - intSink.close(); - Expect.isTrue(hasExecuted); - Expect.equals(0, specialBCounter); - specialBCounter = 0; - Expect.equals(1, specialICounter); - specialICounter = 0; - hasExecuted = false; -} diff --git a/tests/lib_2/convert/chunked_conversion2_test.dart b/tests/lib_2/convert/chunked_conversion2_test.dart deleted file mode 100644 index ca6336c4a69..00000000000 --- a/tests/lib_2/convert/chunked_conversion2_test.dart +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'dart:convert'; - -import 'package:expect/expect.dart'; - -// Test that the String and ByteConversionSinks make a copy when they need to -// adapt. - -class MyByteSink extends ByteConversionSink { - var accumulator = []; - add(List bytes) { - accumulator.add(bytes); - } - - close() {} -} - -void testBase() { - var byteSink = new MyByteSink(); - var bytes = [1]; - byteSink.addSlice(bytes, 0, 1, false); - bytes[0] = 2; - byteSink.addSlice(bytes, 0, 1, true); - Expect.equals(1, byteSink.accumulator[0][0]); - Expect.equals(2, byteSink.accumulator[1][0]); -} - -class MyChunkedSink implements ChunkedConversionSink> { - var accumulator = []; - add(List bytes) { - accumulator.add(bytes); - } - - close() {} -} - -void testAdapter() { - var chunkedSink = new MyChunkedSink(); - var byteSink = new ByteConversionSink.from(chunkedSink); - var bytes = [1]; - byteSink.addSlice(bytes, 0, 1, false); - bytes[0] = 2; - byteSink.addSlice(bytes, 0, 1, true); - Expect.equals(1, chunkedSink.accumulator[0][0]); - Expect.equals(2, chunkedSink.accumulator[1][0]); -} - -void main() { - testBase(); - testAdapter(); -} diff --git a/tests/lib_2/convert/chunked_conversion_json_decode1_test.dart b/tests/lib_2/convert/chunked_conversion_json_decode1_test.dart deleted file mode 100644 index ddfa29b9768..00000000000 --- a/tests/lib_2/convert/chunked_conversion_json_decode1_test.dart +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:convert'; - -final TESTS = [ - [5, '5'], - [-42, '-42'], - [3.14, '3.14'], - [true, 'true'], - [false, 'false'], - [null, 'null'], - ['quote"or\'', '"quote\\"or\'"'], - ['', '""'], - [[], "[]"], - [ - [3, -4.5, true, "hi", false], - '[3,-4.5,true,"hi",false]' - ], - [ - [null], - "[null]" - ], - [ - [ - [null] - ], - "[[null]]" - ], - [ - [ - [3] - ], - "[[3]]" - ], - [{}, "{}"], - [ - {"x": 3, "y": 4.5, "z": "hi", "u": true, "v": false}, - '{"x":3,"y":4.5,"z":"hi","u":true,"v":false}' - ], - [ - {"x": null}, - '{"x":null}' - ], - [ - {"x": {}}, - '{"x":{}}' - ], - // Note that -0.0 won't be treated the same in JS. The Json spec seems to - // allow it, though. - [ - {"hi there": 499, "'": -0.0}, - '{"hi there":499,"\'":-0.0}' - ], - [r'\foo', r'"\\foo"'], -]; - -bool isJsonEqual(o1, o2) { - if (o1 == o2) return true; - if (o1 is List && o2 is List) { - if (o1.length != o2.length) return false; - for (int i = 0; i < o1.length; i++) { - if (!isJsonEqual(o1[i], o2[i])) return false; - } - return true; - } - if (o1 is Map && o2 is Map) { - if (o1.length != o2.length) return false; - for (var key in o1.keys) { - Expect.isTrue(key is String); - if (!o2.containsKey(key)) return false; - if (!isJsonEqual(o1[key], o2[key])) return false; - } - return true; - } - return false; -} - -Object decode(String str) { - Object result; - var decoder = new JsonDecoder(null); - ChunkedConversionSink objectSink = - new ChunkedConversionSink.withCallback((x) => result = x.single); - var stringConversionSink = decoder.startChunkedConversion(objectSink); - stringConversionSink.add(str); - stringConversionSink.close(); - return result; -} - -Object decode2(String str) { - Object result; - var decoder = new JsonDecoder(null); - ChunkedConversionSink objectSink = - new ChunkedConversionSink.withCallback((x) => result = x.single); - var stringConversionSink = decoder.startChunkedConversion(objectSink); - ClosableStringSink stringSink = stringConversionSink.asStringSink(); - stringSink.write(str); - stringSink.close(); - return result; -} - -Object decode3(String str) { - Object result; - var decoder = new JsonDecoder(null); - ChunkedConversionSink objectSink = - new ChunkedConversionSink.withCallback((x) => result = x.single); - var stringConversionSink = decoder.startChunkedConversion(objectSink); - ClosableStringSink stringSink = stringConversionSink.asStringSink(); - str.codeUnits.forEach(stringSink.writeCharCode); - stringSink.close(); - return result; -} - -Object decode4(String str) { - Object result; - var decoder = new JsonDecoder(null); - ChunkedConversionSink objectSink = - new ChunkedConversionSink.withCallback((x) => result = x.single); - var stringConversionSink = decoder.startChunkedConversion(objectSink); - ClosableStringSink stringSink = stringConversionSink.asStringSink(); - str.runes.forEach(stringSink.writeCharCode); - stringSink.close(); - return result; -} - -Object decode5(String str) { - Object result; - var decoder = new JsonDecoder(null); - ChunkedConversionSink objectSink = - new ChunkedConversionSink.withCallback((x) => result = x.single); - var stringConversionSink = decoder.startChunkedConversion(objectSink); - ByteConversionSink inputByteSink = stringConversionSink.asUtf8Sink(false); - Object tmpBytes = utf8.encode(str); - inputByteSink.add(tmpBytes); - inputByteSink.close(); - return result; -} - -Object decode6(String str) { - Object result; - var decoder = new JsonDecoder(null); - ChunkedConversionSink objectSink = - new ChunkedConversionSink.withCallback((x) => result = x.single); - var stringConversionSink = decoder.startChunkedConversion(objectSink); - ByteConversionSink inputByteSink = stringConversionSink.asUtf8Sink(false); - var tmpBytes = utf8.encode(str); - tmpBytes.forEach((b) => inputByteSink.addSlice([0, b, 1], 1, 2, false)); - inputByteSink.close(); - return result; -} - -Object decode7(String str) { - Object result; - var decoder = new JsonDecoder(null); - ChunkedConversionSink objectSink = - new ChunkedConversionSink.withCallback((x) => result = x.single); - var stringConversionSink = decoder.startChunkedConversion(objectSink); - stringConversionSink.addSlice("1" + str + "2", 1, str.length + 1, false); - stringConversionSink.close(); - return result; -} - -main() { - var tests = TESTS.expand((test) { - var object = test[0]; - var string = test[1]; - var longString = " " - " " - "$string" - " " - " "; - return [ - test, - [object, longString] - ]; - }); - for (var test in tests) { - var o = test[0]; - var string = test[1]; - Expect.isTrue(isJsonEqual(o, decode(string))); - Expect.isTrue(isJsonEqual(o, decode2(string))); - Expect.isTrue(isJsonEqual(o, decode3(string))); - Expect.isTrue(isJsonEqual(o, decode4(string))); - Expect.isTrue(isJsonEqual(o, decode5(string))); - Expect.isTrue(isJsonEqual(o, decode6(string))); - Expect.isTrue(isJsonEqual(o, decode7(string))); - } -} diff --git a/tests/lib_2/convert/chunked_conversion_json_encode1_test.dart b/tests/lib_2/convert/chunked_conversion_json_encode1_test.dart deleted file mode 100644 index 6d77cd7d99a..00000000000 --- a/tests/lib_2/convert/chunked_conversion_json_encode1_test.dart +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:convert'; - -final TESTS = [ - [5, '5'], - [-42, '-42'], - [3.14, '3.14'], - [true, 'true'], - [false, 'false'], - [null, 'null'], - ['quote"or\'', '"quote\\"or\'"'], - ['', '""'], - [[], "[]"], - [ - [3, -4.5, true, "hi", false], - '[3,-4.5,true,"hi",false]' - ], - [ - [null], - "[null]" - ], - [ - [ - [null] - ], - "[[null]]" - ], - [ - [ - [3] - ], - "[[3]]" - ], - [{}, "{}"], - [ - {"x": 3, "y": 4.5, "z": "hi", "u": true, "v": false}, - '{"x":3,"y":4.5,"z":"hi","u":true,"v":false}' - ], - [ - {"x": null}, - '{"x":null}' - ], - [ - {"x": {}}, - '{"x":{}}' - ], - // Note that -0.0 won't be treated the same in JS. The Json spec seems to - // allow it, though. - [ - {"hi there": 499, "'": -0.0}, - '{"hi there":499,"\'":-0.0}' - ], - [r'\foo', r'"\\foo"'], -]; - -class MyStringConversionSink extends StringConversionSink { - var buffer = new StringBuffer(); - var callback; - - MyStringConversionSink(this.callback); - - addSlice(str, start, end, bool isLast) { - buffer.write(str.substring(start, end)); - if (isLast) close(); - } - - close() { - callback(buffer.toString()); - } -} - -String encode(Object o) { - var result; - ChunkedConversionSink stringSink = - new MyStringConversionSink((x) => result = x); - var objectSink = new JsonEncoder().startChunkedConversion(stringSink); - objectSink.add(o); - objectSink.close(); - return result; -} - -String encode2(Object o) { - var result; - var encoder = new JsonEncoder(); - ChunkedConversionSink stringSink = - new StringConversionSink.withCallback((x) => result = x); - var objectSink = encoder.startChunkedConversion(stringSink); - objectSink.add(o); - objectSink.close(); - return result; -} - -main() { - for (var test in TESTS) { - var o = test[0]; - var expected = test[1]; - Expect.equals(expected, encode(o)); - Expect.equals(expected, encode2(o)); - } -} diff --git a/tests/lib_2/convert/chunked_conversion_utf82_test.dart b/tests/lib_2/convert/chunked_conversion_utf82_test.dart deleted file mode 100644 index 13f06438064..00000000000 --- a/tests/lib_2/convert/chunked_conversion_utf82_test.dart +++ /dev/null @@ -1,295 +0,0 @@ -// Copyright (c) 2013, 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 utf8_test; - -import "package:expect/expect.dart"; -import 'dart:convert'; - -String decode(List bytes, int chunkSize) { - StringBuffer buffer = new StringBuffer(); - var stringSink = new StringConversionSink.fromStringSink(buffer); - var byteSink = new Utf8Decoder().startChunkedConversion(stringSink); - int i = 0; - while (i < bytes.length) { - var nextChunk = []; - for (int j = 0; j < chunkSize; j++) { - if (i < bytes.length) { - nextChunk.add(bytes[i]); - i++; - } - } - byteSink.add(nextChunk); - } - byteSink.close(); - return buffer.toString(); -} - -String decodeAllowMalformed(List bytes, int chunkSize) { - StringBuffer buffer = new StringBuffer(); - var stringSink = new StringConversionSink.fromStringSink(buffer); - var decoder = new Utf8Decoder(allowMalformed: true); - var byteSink = decoder.startChunkedConversion(stringSink); - int i = 0; - while (i < bytes.length) { - var nextChunk = []; - for (int j = 0; j < chunkSize; j++) { - if (i < bytes.length) { - nextChunk.add(bytes[i]); - i++; - } - } - byteSink.add(nextChunk); - } - byteSink.close(); - return buffer.toString(); -} - -final TESTS0 = [ - // Unfinished UTF-8 sequences. - [0xc3], - [0xE2, 0x82], - [0xF0, 0xA4, 0xAD] -]; - -final TESTS1 = [ - // Overlong encoding of euro-sign. - [0xF0, 0x82, 0x82, 0xAC], - // Other overlong/unfinished sequences. - [0xC0], - [0xC1], - [0xF5], - [0xF6], - [0xF7], - [0xF8], - [0xF9], - [0xFA], - [0xFB], - [0xFC], - [0xFD], - [0xFE], - [0xFF], - [0xC0, 0x80], - [0xC1, 0x80], - // Outside valid range. - [0xF4, 0xBF, 0xBF, 0xBF] -]; - -final TESTS2 = [ - // Test that 0xC0|1, 0x80 does not eat the next character. - [ - [0xC0, 0x80, 0x61], - "XXa" - ], - [ - [0xC1, 0x80, 0x61], - "XXa" - ], - // 0xF5 .. 0xFF never appear in valid UTF-8 sequences. - [ - [0xF5, 0x80], - "XX" - ], - [ - [0xF6, 0x80], - "XX" - ], - [ - [0xF7, 0x80], - "XX" - ], - [ - [0xF8, 0x80], - "XX" - ], - [ - [0xF9, 0x80], - "XX" - ], - [ - [0xFA, 0x80], - "XX" - ], - [ - [0xFB, 0x80], - "XX" - ], - [ - [0xFC, 0x80], - "XX" - ], - [ - [0xFD, 0x80], - "XX" - ], - [ - [0xFE, 0x80], - "XX" - ], - [ - [0xFF, 0x80], - "XX" - ], - [ - [0xF5, 0x80, 0x61], - "XXa" - ], - [ - [0xF6, 0x80, 0x61], - "XXa" - ], - [ - [0xF7, 0x80, 0x61], - "XXa" - ], - [ - [0xF8, 0x80, 0x61], - "XXa" - ], - [ - [0xF9, 0x80, 0x61], - "XXa" - ], - [ - [0xFA, 0x80, 0x61], - "XXa" - ], - [ - [0xFB, 0x80, 0x61], - "XXa" - ], - [ - [0xFC, 0x80, 0x61], - "XXa" - ], - [ - [0xFD, 0x80, 0x61], - "XXa" - ], - [ - [0xFE, 0x80, 0x61], - "XXa" - ], - [ - [0xFF, 0x80, 0x61], - "XXa" - ], - // Characters outside the valid range. - [ - [0xF5, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xF6, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xF7, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xF8, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xF9, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFA, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFB, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFC, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFD, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFE, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFF, 0x80, 0x80, 0x61], - "XXXa" - ] -]; - -main() { - var allTests = [...TESTS0, ...TESTS1].expand((test) { - // Pairs of test and expected string output when malformed strings are - // allowed. Replacement character: U+FFFD, one per unfinished sequence or - // undecodable byte. - String replacement = - TESTS0.contains(test) ? "\u{FFFD}" : "\u{FFFD}" * test.length; - return [ - [test, "${replacement}"], - [ - [0x61, ...test], - "a${replacement}" - ], - [ - [0x61, ...test, 0x61], - "a${replacement}a" - ], - [ - [...test, 0x61], - "${replacement}a" - ], - [ - [...test, ...test], - "${replacement}${replacement}" - ], - [ - [...test, 0x61, ...test], - "${replacement}a${replacement}" - ], - [ - [0xc3, 0xa5, ...test], - "å${replacement}" - ], - [ - [0xc3, 0xa5, ...test, 0xc3, 0xa5], - "å${replacement}å" - ], - [ - [...test, 0xc3, 0xa5], - "${replacement}å" - ], - [ - [...test, 0xc3, 0xa5, ...test], - "${replacement}å${replacement}" - ] - ]; - }); - - var allTests2 = TESTS2.map((test) { - // Pairs of test and expected string output when malformed strings are - // allowed. Replacement character: U+FFFD - String expected = (test[1] as String).replaceAll("X", "\u{FFFD}"); - return [test[0], expected]; - }); - - for (var test in []..addAll(allTests)..addAll(allTests2)) { - List bytes = test[0]; - Expect.throwsFormatException(() => decode(bytes, 1)); - Expect.throwsFormatException(() => decode(bytes, 2)); - Expect.throwsFormatException(() => decode(bytes, 3)); - Expect.throwsFormatException(() => decode(bytes, 4)); - - String expected = test[1]; - Expect.equals(expected, decodeAllowMalformed(bytes, 1)); - Expect.equals(expected, decodeAllowMalformed(bytes, 2)); - Expect.equals(expected, decodeAllowMalformed(bytes, 3)); - Expect.equals(expected, decodeAllowMalformed(bytes, 4)); - } -} diff --git a/tests/lib_2/convert/chunked_conversion_utf83_test.dart b/tests/lib_2/convert/chunked_conversion_utf83_test.dart deleted file mode 100644 index f8a1ad6607f..00000000000 --- a/tests/lib_2/convert/chunked_conversion_utf83_test.dart +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2012, 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 - -// Copyright (c) 2013, 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 "package:expect/expect.dart"; -import 'dart:convert'; - -String decode(List bytes, int chunkSize) { - StringBuffer buffer = new StringBuffer(); - var stringSink = new StringConversionSink.fromStringSink(buffer); - var byteSink = new Utf8Decoder().startChunkedConversion(stringSink); - int i = 0; - while (i < bytes.length) { - var nextChunk = []; - for (int j = 0; j < chunkSize; j++) { - if (i < bytes.length) { - nextChunk.add(bytes[i]); - i++; - } - } - byteSink.add(nextChunk); - } - byteSink.close(); - return buffer.toString(); -} - -String decodeAllowMalformed(List bytes, int chunkSize) { - StringBuffer buffer = new StringBuffer(); - var stringSink = new StringConversionSink.fromStringSink(buffer); - var decoder = new Utf8Decoder(allowMalformed: true); - var byteSink = decoder.startChunkedConversion(stringSink); - int i = 0; - while (i < bytes.length) { - var nextChunk = []; - for (int j = 0; j < chunkSize; j++) { - if (i < bytes.length) { - nextChunk.add(bytes[i]); - i++; - } - } - byteSink.add(nextChunk); - } - byteSink.close(); - return buffer.toString(); -} - -main() { - // Test that chunked UTF8-decoder removes leading BOM. - Expect.equals("a", decode([0xEF, 0xBB, 0xBF, 0x61], 1)); - Expect.equals("a", decode([0xEF, 0xBB, 0xBF, 0x61], 2)); - Expect.equals("a", decode([0xEF, 0xBB, 0xBF, 0x61], 3)); - Expect.equals("a", decode([0xEF, 0xBB, 0xBF, 0x61], 4)); - Expect.equals("a", decodeAllowMalformed([0xEF, 0xBB, 0xBF, 0x61], 1)); - Expect.equals("a", decodeAllowMalformed([0xEF, 0xBB, 0xBF, 0x61], 2)); - Expect.equals("a", decodeAllowMalformed([0xEF, 0xBB, 0xBF, 0x61], 3)); - Expect.equals("a", decodeAllowMalformed([0xEF, 0xBB, 0xBF, 0x61], 4)); - Expect.equals("", decode([0xEF, 0xBB, 0xBF], 1)); - Expect.equals("", decode([0xEF, 0xBB, 0xBF], 2)); - Expect.equals("", decode([0xEF, 0xBB, 0xBF], 3)); - Expect.equals("", decode([0xEF, 0xBB, 0xBF], 4)); - Expect.equals("", decodeAllowMalformed([0xEF, 0xBB, 0xBF], 1)); - Expect.equals("", decodeAllowMalformed([0xEF, 0xBB, 0xBF], 2)); - Expect.equals("", decodeAllowMalformed([0xEF, 0xBB, 0xBF], 3)); - Expect.equals("", decodeAllowMalformed([0xEF, 0xBB, 0xBF], 4)); - Expect.equals("a\u{FEFF}", decode([0x61, 0xEF, 0xBB, 0xBF], 1)); - Expect.equals("a\u{FEFF}", decode([0x61, 0xEF, 0xBB, 0xBF], 2)); - Expect.equals("a\u{FEFF}", decode([0x61, 0xEF, 0xBB, 0xBF], 3)); - Expect.equals("a\u{FEFF}", decode([0x61, 0xEF, 0xBB, 0xBF], 4)); - Expect.equals("a\u{FEFF}", decodeAllowMalformed([0x61, 0xEF, 0xBB, 0xBF], 1)); - Expect.equals("a\u{FEFF}", decodeAllowMalformed([0x61, 0xEF, 0xBB, 0xBF], 2)); - Expect.equals("a\u{FEFF}", decodeAllowMalformed([0x61, 0xEF, 0xBB, 0xBF], 3)); - Expect.equals("a\u{FEFF}", decodeAllowMalformed([0x61, 0xEF, 0xBB, 0xBF], 4)); -} diff --git a/tests/lib_2/convert/chunked_conversion_utf84_test.dart b/tests/lib_2/convert/chunked_conversion_utf84_test.dart deleted file mode 100644 index 442387a1051..00000000000 --- a/tests/lib_2/convert/chunked_conversion_utf84_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:convert'; -import 'unicode_tests.dart'; - -String decode(List bytes, int chunkSize) { - // Use a non-chunked interface. - String result; - var chunkedSink = - new StringConversionSink.withCallback((decoded) => result = decoded); - var byteSink = new Utf8Decoder().startChunkedConversion(chunkedSink); - int i = 0; - while (i < bytes.length) { - var nextChunk = []; - for (int j = 0; j < chunkSize; j++) { - if (i < bytes.length) { - nextChunk.add(bytes[i]); - i++; - } - } - byteSink.add(nextChunk); - } - byteSink.close(); - return result; -} - -main() { - for (var test in UNICODE_TESTS) { - var bytes = test[0]; - var expected = test[1]; - Expect.stringEquals(expected, decode(bytes, 1)); - Expect.stringEquals(expected, decode(bytes, 2)); - Expect.stringEquals(expected, decode(bytes, 3)); - Expect.stringEquals(expected, decode(bytes, 4)); - } -} diff --git a/tests/lib_2/convert/chunked_conversion_utf85_test.dart b/tests/lib_2/convert/chunked_conversion_utf85_test.dart deleted file mode 100644 index 0b8b0559a23..00000000000 --- a/tests/lib_2/convert/chunked_conversion_utf85_test.dart +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:convert'; -import 'unicode_tests.dart'; - -List encode(String str) { - List bytes; - var byteSink = - new ByteConversionSink.withCallback((result) => bytes = result); - var stringConversionSink = new Utf8Encoder().startChunkedConversion(byteSink); - stringConversionSink.add(str); - stringConversionSink.close(); - return bytes; -} - -List encode2(String str) { - List bytes; - var byteSink = - new ByteConversionSink.withCallback((result) => bytes = result); - var stringConversionSink = new Utf8Encoder().startChunkedConversion(byteSink); - ClosableStringSink stringSink = stringConversionSink.asStringSink(); - stringSink.write(str); - stringSink.close(); - return bytes; -} - -List encode3(String str) { - List bytes; - var byteSink = - new ByteConversionSink.withCallback((result) => bytes = result); - var stringConversionSink = new Utf8Encoder().startChunkedConversion(byteSink); - ClosableStringSink stringSink = stringConversionSink.asStringSink(); - str.codeUnits.forEach(stringSink.writeCharCode); - stringSink.close(); - return bytes; -} - -List encode4(String str) { - List bytes; - var byteSink = - new ByteConversionSink.withCallback((result) => bytes = result); - var stringConversionSink = new Utf8Encoder().startChunkedConversion(byteSink); - ClosableStringSink stringSink = stringConversionSink.asStringSink(); - str.runes.forEach(stringSink.writeCharCode); - stringSink.close(); - return bytes; -} - -List encode5(String str) { - List bytes; - var byteSink = - new ByteConversionSink.withCallback((result) => bytes = result); - var stringConversionSink = new Utf8Encoder().startChunkedConversion(byteSink); - ByteConversionSink inputByteSink = stringConversionSink.asUtf8Sink(false); - List tmpBytes = utf8.encode(str); - inputByteSink.add(tmpBytes); - inputByteSink.close(); - return bytes; -} - -List encode6(String str) { - List bytes; - var byteSink = - new ByteConversionSink.withCallback((result) => bytes = result); - var stringConversionSink = new Utf8Encoder().startChunkedConversion(byteSink); - ByteConversionSink inputByteSink = stringConversionSink.asUtf8Sink(false); - List tmpBytes = utf8.encode(str); - tmpBytes.forEach((b) => inputByteSink.addSlice([0, b, 1], 1, 2, false)); - inputByteSink.close(); - return bytes; -} - -List encode7(String str) { - List bytes; - var byteSink = - new ByteConversionSink.withCallback((result) => bytes = result); - var stringConversionSink = new Utf8Encoder().startChunkedConversion(byteSink); - stringConversionSink.addSlice("1" + str + "2", 1, str.length + 1, false); - stringConversionSink.close(); - return bytes; -} - -main() { - for (var test in UNICODE_TESTS) { - List bytes = test[0]; - String string = test[1]; - Expect.listEquals(bytes, encode(string)); - Expect.listEquals(bytes, encode2(string)); - Expect.listEquals(bytes, encode3(string)); - Expect.listEquals(bytes, encode4(string)); - Expect.listEquals(bytes, encode5(string)); - Expect.listEquals(bytes, encode6(string)); - Expect.listEquals(bytes, encode7(string)); - } -} diff --git a/tests/lib_2/convert/chunked_conversion_utf86_test.dart b/tests/lib_2/convert/chunked_conversion_utf86_test.dart deleted file mode 100644 index 3873c6b85ec..00000000000 --- a/tests/lib_2/convert/chunked_conversion_utf86_test.dart +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; -import 'dart:convert'; - -String decode(List bytes) { - StringBuffer buffer = new StringBuffer(); - var stringSink = new StringConversionSink.fromStringSink(buffer); - var byteSink = new Utf8Decoder().startChunkedConversion(stringSink); - bytes.forEach((byte) { - byteSink.add([byte]); - }); - byteSink.close(); - return buffer.toString(); -} - -String decodeAllowMalformed(List bytes) { - StringBuffer buffer = new StringBuffer(); - var stringSink = new StringConversionSink.fromStringSink(buffer); - var decoder = new Utf8Decoder(allowMalformed: true); - var byteSink = decoder.startChunkedConversion(stringSink); - bytes.forEach((byte) { - byteSink.add([byte]); - }); - byteSink.close(); - return buffer.toString(); -} - -final TESTS0 = [ - // Unfinished UTF-8 sequences. - [0xc3], - [0xE2, 0x82], - [0xF0, 0xA4, 0xAD] -]; - -final TESTS1 = [ - // Overlong encoding of euro-sign. - [0xF0, 0x82, 0x82, 0xAC], - // Other overlong/unfinished sequences. - [0xC0], - [0xC1], - [0xF5], - [0xF6], - [0xF7], - [0xF8], - [0xF9], - [0xFA], - [0xFB], - [0xFC], - [0xFD], - [0xFE], - [0xFF], - [0xC0, 0x80], - [0xC1, 0x80], - // Outside valid range. - [0xF4, 0xBF, 0xBF, 0xBF] -]; - -final TESTS2 = [ - // Test that 0xC0|1, 0x80 does not eat the next character. - [ - [0xC0, 0x80, 0x61], - "XXa" - ], - [ - [0xC1, 0x80, 0x61], - "XXa" - ], - // 0xF5 .. 0xFF never appear in valid UTF-8 sequences. - [ - [0xF5, 0x80], - "XX" - ], - [ - [0xF6, 0x80], - "XX" - ], - [ - [0xF7, 0x80], - "XX" - ], - [ - [0xF8, 0x80], - "XX" - ], - [ - [0xF9, 0x80], - "XX" - ], - [ - [0xFA, 0x80], - "XX" - ], - [ - [0xFB, 0x80], - "XX" - ], - [ - [0xFC, 0x80], - "XX" - ], - [ - [0xFD, 0x80], - "XX" - ], - [ - [0xFE, 0x80], - "XX" - ], - [ - [0xFF, 0x80], - "XX" - ], - [ - [0xF5, 0x80, 0x61], - "XXa" - ], - [ - [0xF6, 0x80, 0x61], - "XXa" - ], - [ - [0xF7, 0x80, 0x61], - "XXa" - ], - [ - [0xF8, 0x80, 0x61], - "XXa" - ], - [ - [0xF9, 0x80, 0x61], - "XXa" - ], - [ - [0xFA, 0x80, 0x61], - "XXa" - ], - [ - [0xFB, 0x80, 0x61], - "XXa" - ], - [ - [0xFC, 0x80, 0x61], - "XXa" - ], - [ - [0xFD, 0x80, 0x61], - "XXa" - ], - [ - [0xFE, 0x80, 0x61], - "XXa" - ], - [ - [0xFF, 0x80, 0x61], - "XXa" - ], - // Characters outside the valid range. - [ - [0xF5, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xF6, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xF7, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xF8, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xF9, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFA, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFB, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFC, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFD, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFE, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFF, 0x80, 0x80, 0x61], - "XXXa" - ] -]; - -main() { - var allTests = [...TESTS0, ...TESTS1].expand((test) { - // Pairs of test and expected string output when malformed strings are - // allowed. Replacement character: U+FFFD, one per unfinished sequence or - // undecodable byte. - String replacement = - TESTS0.contains(test) ? "\u{FFFD}" : "\u{FFFD}" * test.length; - return [ - [test, "${replacement}"], - [ - [0x61, ...test], - "a${replacement}" - ], - [ - [0x61, ...test, 0x61], - "a${replacement}a" - ], - [ - [...test, 0x61], - "${replacement}a" - ], - [ - [...test, ...test], - "${replacement}${replacement}" - ], - [ - [...test, 0x61, ...test], - "${replacement}a${replacement}" - ], - [ - [0xc3, 0xa5, ...test], - "å${replacement}" - ], - [ - [0xc3, 0xa5, ...test, 0xc3, 0xa5], - "å${replacement}å" - ], - [ - [...test, 0xc3, 0xa5], - "${replacement}å" - ], - [ - [...test, 0xc3, 0xa5, ...test], - "${replacement}å${replacement}" - ] - ]; - }); - - var allTests2 = TESTS2.map((test) { - // Pairs of test and expected string output when malformed strings are - // allowed. Replacement character: U+FFFD - String expected = (test[1] as String).replaceAll("X", "\u{FFFD}"); - return [test[0], expected]; - }); - - for (var test in []..addAll(allTests)..addAll(allTests2)) { - List bytes = test[0]; - Expect.throwsFormatException(() => decode(bytes)); - - String expected = test[1]; - Expect.equals(expected, decodeAllowMalformed(bytes)); - } -} diff --git a/tests/lib_2/convert/chunked_conversion_utf87_test.dart b/tests/lib_2/convert/chunked_conversion_utf87_test.dart deleted file mode 100644 index fd94ff9553a..00000000000 --- a/tests/lib_2/convert/chunked_conversion_utf87_test.dart +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; -import 'dart:convert'; - -String decode(List inputBytes) { - List bytes; - var byteSink = - new ByteConversionSink.withCallback((result) => bytes = result); - var stringConversionSink = new Utf8Encoder().startChunkedConversion(byteSink); - ByteConversionSink inputByteSink = stringConversionSink.asUtf8Sink(false); - inputByteSink.add(inputBytes); - inputByteSink.close(); - return utf8.decode(bytes); -} - -String decode2(List inputBytes) { - List bytes; - var byteSink = - new ByteConversionSink.withCallback((result) => bytes = result); - var stringConversionSink = new Utf8Encoder().startChunkedConversion(byteSink); - ByteConversionSink inputByteSink = stringConversionSink.asUtf8Sink(false); - inputBytes.forEach((b) => inputByteSink.addSlice([0, b, 1], 1, 2, false)); - inputByteSink.close(); - return utf8.decode(bytes); -} - -String decodeAllowMalformed(List inputBytes) { - List bytes; - var byteSink = - new ByteConversionSink.withCallback((result) => bytes = result); - var stringConversionSink = new Utf8Encoder().startChunkedConversion(byteSink); - ByteConversionSink inputByteSink = stringConversionSink.asUtf8Sink(true); - inputByteSink.add(inputBytes); - inputByteSink.close(); - return utf8.decode(bytes); -} - -String decodeAllowMalformed2(List inputBytes) { - List bytes; - var byteSink = - new ByteConversionSink.withCallback((result) => bytes = result); - var stringConversionSink = new Utf8Encoder().startChunkedConversion(byteSink); - ByteConversionSink inputByteSink = stringConversionSink.asUtf8Sink(true); - inputBytes.forEach((b) => inputByteSink.addSlice([0, b, 1], 1, 2, false)); - inputByteSink.close(); - return utf8.decode(bytes); -} - -final TESTS0 = [ - // Unfinished UTF-8 sequences. - [0xc3], - [0xE2, 0x82], - [0xF0, 0xA4, 0xAD] -]; - -final TESTS1 = [ - // Overlong encoding of euro-sign. - [0xF0, 0x82, 0x82, 0xAC], - // Other overlong/unfinished sequences. - [0xC0], - [0xC1], - [0xF5], - [0xF6], - [0xF7], - [0xF8], - [0xF9], - [0xFA], - [0xFB], - [0xFC], - [0xFD], - [0xFE], - [0xFF], - [0xC0, 0x80], - [0xC1, 0x80], - // Outside valid range. - [0xF4, 0xBF, 0xBF, 0xBF] -]; - -final TESTS2 = [ - // Test that 0xC0|1, 0x80 does not eat the next character. - [ - [0xC0, 0x80, 0x61], - "XXa" - ], - [ - [0xC1, 0x80, 0x61], - "XXa" - ], - // 0xF5 .. 0xFF never appear in valid UTF-8 sequences. - [ - [0xF5, 0x80], - "XX" - ], - [ - [0xF6, 0x80], - "XX" - ], - [ - [0xF7, 0x80], - "XX" - ], - [ - [0xF8, 0x80], - "XX" - ], - [ - [0xF9, 0x80], - "XX" - ], - [ - [0xFA, 0x80], - "XX" - ], - [ - [0xFB, 0x80], - "XX" - ], - [ - [0xFC, 0x80], - "XX" - ], - [ - [0xFD, 0x80], - "XX" - ], - [ - [0xFE, 0x80], - "XX" - ], - [ - [0xFF, 0x80], - "XX" - ], - [ - [0xF5, 0x80, 0x61], - "XXa" - ], - [ - [0xF6, 0x80, 0x61], - "XXa" - ], - [ - [0xF7, 0x80, 0x61], - "XXa" - ], - [ - [0xF8, 0x80, 0x61], - "XXa" - ], - [ - [0xF9, 0x80, 0x61], - "XXa" - ], - [ - [0xFA, 0x80, 0x61], - "XXa" - ], - [ - [0xFB, 0x80, 0x61], - "XXa" - ], - [ - [0xFC, 0x80, 0x61], - "XXa" - ], - [ - [0xFD, 0x80, 0x61], - "XXa" - ], - [ - [0xFE, 0x80, 0x61], - "XXa" - ], - [ - [0xFF, 0x80, 0x61], - "XXa" - ], - // Characters outside the valid range. - [ - [0xF5, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xF6, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xF7, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xF8, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xF9, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFA, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFB, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFC, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFD, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFE, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFF, 0x80, 0x80, 0x61], - "XXXa" - ] -]; - -main() { - var allTests = [...TESTS0, ...TESTS1].expand((test) { - // Pairs of test and expected string output when malformed strings are - // allowed. Replacement character: U+FFFD, one per unfinished sequence or - // undecodable byte. - String replacement = - TESTS0.contains(test) ? "\u{FFFD}" : "\u{FFFD}" * test.length; - return [ - [test, "${replacement}"], - [ - [0x61, ...test], - "a${replacement}" - ], - [ - [0x61, ...test, 0x61], - "a${replacement}a" - ], - [ - [...test, 0x61], - "${replacement}a" - ], - [ - [...test, ...test], - "${replacement}${replacement}" - ], - [ - [...test, 0x61, ...test], - "${replacement}a${replacement}" - ], - [ - [0xc3, 0xa5, ...test], - "å${replacement}" - ], - [ - [0xc3, 0xa5, ...test, 0xc3, 0xa5], - "å${replacement}å" - ], - [ - [...test, 0xc3, 0xa5], - "${replacement}å" - ], - [ - [...test, 0xc3, 0xa5, ...test], - "${replacement}å${replacement}" - ] - ]; - }); - - var allTests2 = TESTS2.map((test) { - // Pairs of test and expected string output when malformed strings are - // allowed. Replacement character: U+FFFD - String expected = (test[1] as String).replaceAll("X", "\u{FFFD}"); - return [test[0], expected]; - }); - - for (var test in []..addAll(allTests)..addAll(allTests2)) { - List bytes = test[0]; - Expect.throwsFormatException(() => decode(bytes)); - Expect.throwsFormatException(() => decode2(bytes)); - - String expected = test[1]; - Expect.equals(expected, decodeAllowMalformed(bytes)); - Expect.equals(expected, decodeAllowMalformed2(bytes)); - } -} diff --git a/tests/lib_2/convert/chunked_conversion_utf88_test.dart b/tests/lib_2/convert/chunked_conversion_utf88_test.dart deleted file mode 100644 index 5e28b35b215..00000000000 --- a/tests/lib_2/convert/chunked_conversion_utf88_test.dart +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright (c) 2013, 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 utf8_test; - -import "package:expect/expect.dart"; -import 'dart:convert'; - -List encode(String str) { - List bytes; - var byteSink = - new ByteConversionSink.withCallback((result) => bytes = result); - var stringConversionSink = new Utf8Encoder().startChunkedConversion(byteSink); - stringConversionSink.add(str); - stringConversionSink.close(); - return bytes; -} - -List encode2(String str) { - List bytes; - var byteSink = - new ByteConversionSink.withCallback((result) => bytes = result); - var stringConversionSink = new Utf8Encoder().startChunkedConversion(byteSink); - ClosableStringSink stringSink = stringConversionSink.asStringSink(); - stringSink.write(str); - stringSink.close(); - return bytes; -} - -List encode3(String str) { - List bytes; - var byteSink = - new ByteConversionSink.withCallback((result) => bytes = result); - var stringConversionSink = new Utf8Encoder().startChunkedConversion(byteSink); - ClosableStringSink stringSink = stringConversionSink.asStringSink(); - str.codeUnits.forEach(stringSink.writeCharCode); - stringSink.close(); - return bytes; -} - -List encode4(String str) { - List bytes; - var byteSink = - new ByteConversionSink.withCallback((result) => bytes = result); - var stringConversionSink = new Utf8Encoder().startChunkedConversion(byteSink); - ClosableStringSink stringSink = stringConversionSink.asStringSink(); - str.runes.forEach(stringSink.writeCharCode); - stringSink.close(); - return bytes; -} - -List encode5(String str) { - List bytes; - var byteSink = - new ByteConversionSink.withCallback((result) => bytes = result); - var stringConversionSink = new Utf8Encoder().startChunkedConversion(byteSink); - ByteConversionSink inputByteSink = stringConversionSink.asUtf8Sink(false); - List tmpBytes = utf8.encode(str); - inputByteSink.add(tmpBytes); - inputByteSink.close(); - return bytes; -} - -List encode6(String str) { - List bytes; - var byteSink = - new ByteConversionSink.withCallback((result) => bytes = result); - var stringConversionSink = new Utf8Encoder().startChunkedConversion(byteSink); - ByteConversionSink inputByteSink = stringConversionSink.asUtf8Sink(false); - List tmpBytes = utf8.encode(str); - tmpBytes.forEach((b) => inputByteSink.addSlice([0, b, 1], 1, 2, false)); - inputByteSink.close(); - return bytes; -} - -List encode7(String str) { - List bytes; - var byteSink = - new ByteConversionSink.withCallback((result) => bytes = result); - var stringConversionSink = new Utf8Encoder().startChunkedConversion(byteSink); - stringConversionSink.addSlice("1" + str + "2", 1, str.length + 1, false); - stringConversionSink.close(); - return bytes; -} - -int _nextPowerOf2(v) { - assert(v > 0); - v--; - v |= v >> 1; - v |= v >> 2; - v |= v >> 4; - v |= v >> 8; - v |= v >> 16; - v++; - return v; -} - -runTest(test) { - List bytes = test[0]; - String string = test[1]; - Expect.listEquals(bytes, encode(string)); - Expect.listEquals(bytes, encode2(string)); - Expect.listEquals(bytes, encode3(string)); - Expect.listEquals(bytes, encode4(string)); - Expect.listEquals(bytes, encode5(string)); - Expect.listEquals(bytes, encode6(string)); - Expect.listEquals(bytes, encode7(string)); -} - -main() { - const LEADING_SURROGATE = 0xd801; - const TRAILING_SURROGATE = 0xdc12; - const UTF8_ENCODING = const [0xf0, 0x90, 0x90, 0x92]; - const UTF8_REPLACEMENT = const [0xef, 0xbf, 0xbd]; - const CHAR_A = 0x61; - - // Test surrogates at all kinds of locations. - var codeUnits = []; - for (int i = 0; i < 2049; i++) { - // Invariant: codeUnits[0..i - 1] is filled with CHAR_A (character 'a'). - codeUnits.length = i + 1; - codeUnits[i] = CHAR_A; - - // Only test for problem zones, close to powers of two. - if (i > 20 && _nextPowerOf2(i - 2) - i > 10) continue; - - codeUnits[i] = LEADING_SURROGATE; - var str = new String.fromCharCodes(codeUnits); - var bytes = new List.filled(i + 3, CHAR_A); - bytes[i] = UTF8_REPLACEMENT[0]; - bytes[i + 1] = UTF8_REPLACEMENT[1]; - bytes[i + 2] = UTF8_REPLACEMENT[2]; - runTest([bytes, str]); - - codeUnits[i] = TRAILING_SURROGATE; - str = new String.fromCharCodes(codeUnits); - bytes = new List.filled(i + 3, CHAR_A); - bytes[i] = UTF8_REPLACEMENT[0]; - bytes[i + 1] = UTF8_REPLACEMENT[1]; - bytes[i + 2] = UTF8_REPLACEMENT[2]; - runTest([bytes, str]); - - codeUnits.length = i + 2; - codeUnits[i] = LEADING_SURROGATE; - codeUnits[i + 1] = TRAILING_SURROGATE; - str = new String.fromCharCodes(codeUnits); - bytes = new List.filled(i + 4, CHAR_A); - bytes[i] = UTF8_ENCODING[0]; - bytes[i + 1] = UTF8_ENCODING[1]; - bytes[i + 2] = UTF8_ENCODING[2]; - bytes[i + 3] = UTF8_ENCODING[3]; - runTest([bytes, str]); - - codeUnits[i] = TRAILING_SURROGATE; - codeUnits[i + 1] = TRAILING_SURROGATE; - str = new String.fromCharCodes(codeUnits); - bytes = new List.filled(i + 6, CHAR_A); - bytes[i] = UTF8_REPLACEMENT[0]; - bytes[i + 1] = UTF8_REPLACEMENT[1]; - bytes[i + 2] = UTF8_REPLACEMENT[2]; - bytes[i + 3] = UTF8_REPLACEMENT[0]; - bytes[i + 4] = UTF8_REPLACEMENT[1]; - bytes[i + 5] = UTF8_REPLACEMENT[2]; - runTest([bytes, str]); - - codeUnits[i] = LEADING_SURROGATE; - codeUnits[i + 1] = LEADING_SURROGATE; - str = new String.fromCharCodes(codeUnits); - bytes = new List.filled(i + 6, CHAR_A); - bytes[i] = UTF8_REPLACEMENT[0]; - bytes[i + 1] = UTF8_REPLACEMENT[1]; - bytes[i + 2] = UTF8_REPLACEMENT[2]; - bytes[i + 3] = UTF8_REPLACEMENT[0]; - bytes[i + 4] = UTF8_REPLACEMENT[1]; - bytes[i + 5] = UTF8_REPLACEMENT[2]; - runTest([bytes, str]); - - codeUnits[i] = TRAILING_SURROGATE; - codeUnits[i + 1] = LEADING_SURROGATE; - str = new String.fromCharCodes(codeUnits); - bytes = new List.filled(i + 6, CHAR_A); - bytes[i] = UTF8_REPLACEMENT[0]; - bytes[i + 1] = UTF8_REPLACEMENT[1]; - bytes[i + 2] = UTF8_REPLACEMENT[2]; - bytes[i + 3] = UTF8_REPLACEMENT[0]; - bytes[i + 4] = UTF8_REPLACEMENT[1]; - bytes[i + 5] = UTF8_REPLACEMENT[2]; - runTest([bytes, str]); - - codeUnits.length = i + 3; - codeUnits[i] = LEADING_SURROGATE; - codeUnits[i + 1] = TRAILING_SURROGATE; - codeUnits[i + 2] = CHAR_A; // Add trailing 'a'. - str = new String.fromCharCodes(codeUnits); - bytes = new List.filled(i + 5, CHAR_A); - bytes[i] = UTF8_ENCODING[0]; - bytes[i + 1] = UTF8_ENCODING[1]; - bytes[i + 2] = UTF8_ENCODING[2]; - bytes[i + 3] = UTF8_ENCODING[3]; - // No need to assign the 'a' character. The whole list is already filled - // with it. - runTest([bytes, str]); - - codeUnits[i] = TRAILING_SURROGATE; - codeUnits[i + 1] = TRAILING_SURROGATE; - codeUnits[i + 2] = CHAR_A; // Add trailing 'a'. - str = new String.fromCharCodes(codeUnits); - bytes = new List.filled(i + 7, CHAR_A); - bytes[i] = UTF8_REPLACEMENT[0]; - bytes[i + 1] = UTF8_REPLACEMENT[1]; - bytes[i + 2] = UTF8_REPLACEMENT[2]; - bytes[i + 3] = UTF8_REPLACEMENT[0]; - bytes[i + 4] = UTF8_REPLACEMENT[1]; - bytes[i + 5] = UTF8_REPLACEMENT[2]; - runTest([bytes, str]); - - codeUnits[i] = LEADING_SURROGATE; - codeUnits[i + 1] = LEADING_SURROGATE; - codeUnits[i + 2] = CHAR_A; // Add trailing 'a'. - str = new String.fromCharCodes(codeUnits); - bytes = new List.filled(i + 7, CHAR_A); - bytes[i] = UTF8_REPLACEMENT[0]; - bytes[i + 1] = UTF8_REPLACEMENT[1]; - bytes[i + 2] = UTF8_REPLACEMENT[2]; - bytes[i + 3] = UTF8_REPLACEMENT[0]; - bytes[i + 4] = UTF8_REPLACEMENT[1]; - bytes[i + 5] = UTF8_REPLACEMENT[2]; - runTest([bytes, str]); - - codeUnits[i] = TRAILING_SURROGATE; - codeUnits[i + 1] = LEADING_SURROGATE; - codeUnits[i + 2] = CHAR_A; // Add trailing 'a'. - str = new String.fromCharCodes(codeUnits); - bytes = new List.filled(i + 7, CHAR_A); - bytes[i] = UTF8_REPLACEMENT[0]; - bytes[i + 1] = UTF8_REPLACEMENT[1]; - bytes[i + 2] = UTF8_REPLACEMENT[2]; - bytes[i + 3] = UTF8_REPLACEMENT[0]; - bytes[i + 4] = UTF8_REPLACEMENT[1]; - bytes[i + 5] = UTF8_REPLACEMENT[2]; - runTest([bytes, str]); - - // Make sure the invariant is correct. - codeUnits[i] = CHAR_A; - } -} diff --git a/tests/lib_2/convert/chunked_conversion_utf89_test.dart b/tests/lib_2/convert/chunked_conversion_utf89_test.dart deleted file mode 100644 index fad9fcd753d..00000000000 --- a/tests/lib_2/convert/chunked_conversion_utf89_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:convert'; - -class MySink implements ChunkedConversionSink { - final Function _add; - final Function _close; - - MySink(this._add, this._close); - - void add(x) { - _add(x); - } - - void close() { - _close(); - } -} - -main() { - // Make sure the UTF-8 decoder works eagerly. - String lastString; - bool isClosed = false; - var sink = new MySink((x) => lastString = x, () => isClosed = true); - var byteSink = new Utf8Decoder().startChunkedConversion(sink); - byteSink.add("abc".codeUnits); - Expect.equals("abc", lastString); - byteSink.add([0x61, 0xc3]); // 'a' followed by first part of Î. - Expect.equals("a", lastString); - byteSink.add([0x8e]); // second part of Î. - Expect.equals("Î", lastString); - Expect.isFalse(isClosed); - byteSink.close(); - Expect.isTrue(isClosed); -} diff --git a/tests/lib_2/convert/chunked_conversion_utf8_test.dart b/tests/lib_2/convert/chunked_conversion_utf8_test.dart deleted file mode 100644 index d58ff35cd48..00000000000 --- a/tests/lib_2/convert/chunked_conversion_utf8_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:convert'; -import 'unicode_tests.dart'; - -String decode(List bytes, int chunkSize) { - StringBuffer buffer = new StringBuffer(); - var stringSink = new StringConversionSink.fromStringSink(buffer); - var byteSink = new Utf8Decoder().startChunkedConversion(stringSink); - int i = 0; - while (i < bytes.length) { - var nextChunk = []; - for (int j = 0; j < chunkSize; j++) { - if (i < bytes.length) { - nextChunk.add(bytes[i]); - i++; - } - } - byteSink.add(nextChunk); - } - byteSink.close(); - return buffer.toString(); -} - -main() { - for (var test in UNICODE_TESTS) { - var bytes = test[0]; - var expected = test[1]; - Expect.stringEquals(expected, decode(bytes, 1)); - Expect.stringEquals(expected, decode(bytes, 2)); - Expect.stringEquals(expected, decode(bytes, 3)); - Expect.stringEquals(expected, decode(bytes, 4)); - } -} diff --git a/tests/lib_2/convert/close_test.dart b/tests/lib_2/convert/close_test.dart deleted file mode 100644 index 5bf08effed4..00000000000 --- a/tests/lib_2/convert/close_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2016, 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 - -import "package:expect/expect.dart"; -import "dart:convert"; - -class MySink implements Sink> { - List accumulated = []; - bool isClosed = false; - - int add(List list) { - accumulated.addAll(list); - return list.length; - } - - String close() { - isClosed = true; - // Returning a value here triggered a bug, where the caller was trying to - // pass the value through its 'void' return type. - // Example: void close() => _sink.close(); - return "done"; - } -} - -main() { - var mySink = new MySink(); - var byteSink = new ByteConversionSink.from(mySink); - byteSink.add([1, 2, 3]); - byteSink.close(); - Expect.listEquals([1, 2, 3], mySink.accumulated); - Expect.isTrue(mySink.isClosed); -} diff --git a/tests/lib_2/convert/codec1_test.dart b/tests/lib_2/convert/codec1_test.dart deleted file mode 100644 index 70c013e22ce..00000000000 --- a/tests/lib_2/convert/codec1_test.dart +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'dart:convert'; - -import 'package:expect/expect.dart'; - -class MyCodec extends Codec { - const MyCodec(); - - final Converter encoder = const IntStringConverter(); - final Converter decoder = const StringIntConverter(); -} - -class IntStringConverter extends Converter { - const IntStringConverter(); - - String convert(int i) => i.toString(); -} - -class StringIntConverter extends Converter { - const StringIntConverter(); - - int convert(String str) => int.parse(str); -} - -class MyCodec2 extends Codec { - const MyCodec2(); - - Converter get encoder => new IntStringConverter2(); - Converter get decoder => new StringIntConverter2(); -} - -class IntStringConverter2 extends Converter { - String convert(int i) => (i + 99).toString(); -} - -class StringIntConverter2 extends Converter { - int convert(String str) => int.parse(str) + 400; -} - -const TEST_CODEC = const MyCodec(); -const TEST_CODEC2 = const MyCodec2(); - -main() { - Expect.equals("0", TEST_CODEC.encode(0)); - Expect.equals(5, TEST_CODEC.decode("5")); - Expect.equals(3, TEST_CODEC.decode(TEST_CODEC.encode(3))); - - Expect.equals("99", TEST_CODEC2.encode(0)); - Expect.equals(405, TEST_CODEC2.decode("5")); - Expect.equals(499, TEST_CODEC2.decode(TEST_CODEC2.encode(0))); - - var inverted, fused; - inverted = TEST_CODEC.inverted; - fused = TEST_CODEC.fuse(inverted); - Expect.equals(499, fused.encode(499)); - Expect.equals(499, fused.decode(499)); - - fused = inverted.fuse(TEST_CODEC); - Expect.equals("499", fused.encode("499")); - Expect.equals("499", fused.decode("499")); - - inverted = TEST_CODEC2.inverted; - fused = TEST_CODEC2.fuse(inverted); - Expect.equals(499, fused.encode(0)); - Expect.equals(499, fused.decode(0)); - - fused = TEST_CODEC.fuse(inverted); - Expect.equals(405, fused.encode(5)); - Expect.equals(101, fused.decode(2)); -} diff --git a/tests/lib_2/convert/codec2_test.dart b/tests/lib_2/convert/codec2_test.dart deleted file mode 100644 index 18bf5f44fbf..00000000000 --- a/tests/lib_2/convert/codec2_test.dart +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'dart:convert'; - -import 'package:expect/expect.dart'; - -main() { - final RAW = '["122ç",50,50,231]'; - final ENCODED = const [ - 91, - 34, - 49, - 50, - 50, - 195, - 167, - 34, - 44, - 53, - 48, - 44, - 53, - 48, - 44, - 50, - 51, - 49, - 93 - ]; - Expect.listEquals(ENCODED, utf8.encode(RAW)); - Expect.equals(RAW, utf8.decode(ENCODED)); - - Expect.listEquals([], utf8.encode("")); - Expect.equals("", utf8.decode([])); - - final JSON_ENCODED = RAW; - Expect.equals(JSON_ENCODED, json.encode(["122ç", 50, 50, 231])); - Expect.listEquals(["122ç", 50, 50, 231], json.decode(JSON_ENCODED)); - - // Test that the reviver is passed to the decoder. - var decoded = json.decode('{"p": 5}', reviver: (dynamic k, dynamic v) { - if (k == null) return v; - return v * 2; - }); - Expect.equals(10, decoded["p"]); - var jsonWithReviver = new JsonCodec.withReviver((dynamic k, dynamic v) { - if (k == null) return v; - return v * 2; - }); - decoded = jsonWithReviver.decode('{"p": 5}'); - Expect.equals(10, decoded["p"]); - - // Test example from comments. - final JSON_TO_BYTES = json.fuse(utf8); - List bytes = JSON_TO_BYTES.encode(["json-object"]); - decoded = JSON_TO_BYTES.decode(bytes); - Expect.isTrue(decoded is List); - Expect.equals("json-object", (decoded as List)[0]); -} diff --git a/tests/lib_2/convert/encoding_test.dart b/tests/lib_2/convert/encoding_test.dart deleted file mode 100644 index ece01068ad0..00000000000 --- a/tests/lib_2/convert/encoding_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:async'; -import 'dart:convert'; -import 'unicode_tests.dart'; -import "package:async_helper/async_helper.dart"; - -void runTest(List bytes, expected) { - var controller = new StreamController>(); - asyncStart(); - utf8.decodeStream(controller.stream).then((decoded) { - Expect.equals(expected, decoded); - asyncEnd(); - }); - int i = 0; - while (i < bytes.length) { - List nextChunk = []; - for (int j = 0; j < 3; j++) { - if (i < bytes.length) { - nextChunk.add(bytes[i]); - i++; - } - } - controller.add(nextChunk); - } - controller.close(); -} - -main() { - for (var test in UNICODE_TESTS) { - var bytes = test[0]; - var expected = test[1]; - runTest(bytes, expected); - } -} diff --git a/tests/lib_2/convert/html_escape_test.dart b/tests/lib_2/convert/html_escape_test.dart deleted file mode 100644 index 3603447fc28..00000000000 --- a/tests/lib_2/convert/html_escape_test.dart +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:async'; -import 'dart:convert'; - -const _NOOP = 'Nothing_to_escape'; - -const _TEST_INPUT = """ of \xA0 "double" & 'single' values>"""; - -const _OUTPUT_UNKNOWN = '<A </test> of \xA0 "double" ' - '& 'single' values>'; - -const _OUTPUT_ATTRIBUTE = - "<A </test> of \xA0 "double" & 'single' values>"; - -const _OUTPUT_SQ_ATTRIBUTE = - '<A </test> of \xA0 "double" & 'single' values>'; - -const _OUTPUT_ELEMENT = - """<A </test> of \xA0 "double" & 'single' values>"""; - -void _testMode(HtmlEscape escape, String input, String expected) { - _testConvert(escape, input, expected); - _testTransform(escape, input, expected); - _testChunked(escape, input, expected); -} - -void _testChunked(HtmlEscape escape, String input, String expected) { - var buffer = new StringBuffer(); - - var rootSink = new StringConversionSink.fromStringSink(buffer); - var sink = escape.startChunkedConversion(rootSink); - - sink.addSlice("1" + input + "2", 1, input.length + 1, false); - sink.close(); - - Expect.equals(expected, buffer.toString()); -} - -void _testConvert(HtmlEscape escape, String input, String expected) { - var output = escape.convert(input); - Expect.equals(expected, output); -} - -void _testTransform(HtmlEscape escape, String input, String expected) { - var controller = new StreamController(sync: true); - - var stream = controller.stream.transform(escape); - - var done = false; - int count = 0; - - void stringData(value) { - Expect.equals(expected, value); - count++; - } - - void streamClosed() { - done = true; - } - - stream.listen(stringData, onDone: streamClosed); - - for (var i = 0; i < _COUNT; i++) { - controller.add(input); - } - controller.close(); - Expect.isTrue(done); - Expect.equals(_COUNT, count); -} - -const _COUNT = 3; - -void main() { - _testMode(htmlEscape, _TEST_INPUT, _OUTPUT_UNKNOWN); - _testMode(const HtmlEscape(), _TEST_INPUT, _OUTPUT_UNKNOWN); - _testMode( - const HtmlEscape(HtmlEscapeMode.unknown), _TEST_INPUT, _OUTPUT_UNKNOWN); - _testMode(const HtmlEscape(HtmlEscapeMode.attribute), _TEST_INPUT, - _OUTPUT_ATTRIBUTE); - _testMode(const HtmlEscape(HtmlEscapeMode.sqAttribute), _TEST_INPUT, - _OUTPUT_SQ_ATTRIBUTE); - _testMode( - const HtmlEscape(HtmlEscapeMode.element), _TEST_INPUT, _OUTPUT_ELEMENT); - _testMode(htmlEscape, _NOOP, _NOOP); -} diff --git a/tests/lib_2/convert/json_chunk_test.dart b/tests/lib_2/convert/json_chunk_test.dart deleted file mode 100644 index 8fb5df54552..00000000000 --- a/tests/lib_2/convert/json_chunk_test.dart +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) 2014, 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 json_test; - -import "package:expect/expect.dart"; -import "dart:convert"; - -jsonTest(testName, expect, action(sink)) { - var sink = new ChunkedConversionSink.withCallback((values) { - var value = values[0]; - Expect.equals(expect, value, "$testName:$value"); - }); - var decoderSink = json.decoder.startChunkedConversion(sink); - action(decoderSink); -} - -jsonThrowsTest(testName, action(sink)) { - var sink = new ChunkedConversionSink.withCallback((values) { - Expect.fail("Should have thrown: $testName"); - }); - var decoderSink = json.decoder.startChunkedConversion(sink); - Expect.throwsFormatException(() => action(decoderSink), testName); -} - -main() { - testNumbers(); - testStrings(); - testKeywords(); -} - -void testStrings() { - var s = r'"abc\f\n\r\t\b\"\/\\\u0001\u9999\uffff"'; - var expected = "abc\f\n\r\t\b\"\/\\\u0001\u9999\uffff"; - for (var i = 1; i < s.length - 1; i++) { - var s1 = s.substring(0, i); - var s2 = s.substring(i); - jsonTest("$s1|$s2", expected, (sink) { - sink.add(s1); - sink.add(s2); - sink.close(); - }); - jsonTest("$s1|$s2", expected, (sink) { - sink.addSlice(s, 0, i, false); - sink.addSlice(s, i, s.length, true); - }); - for (var j = i; j < s.length - 1; j++) { - var s2a = s.substring(i, j); - var s2b = s.substring(j); - jsonTest("$s1|$s2a|$s2b", expected, (sink) { - sink.add(s1); - sink.add(s2a); - sink.add(s2b); - sink.close(); - }); - } - } -} - -void testNumbers() { - void testNumber(number) { - var expected = num.parse(number); - for (int i = 1; i < number.length - 1; i++) { - var p1 = number.substring(0, i); - var p2 = number.substring(i); - jsonTest("$p1|$p2", expected, (sink) { - sink.add(p1); - sink.add(p2); - sink.close(); - }); - - jsonTest("$p1|$p2/slice", expected, (sink) { - sink.addSlice(number, 0, i, false); - sink.addSlice(number, i, number.length, true); - }); - - for (int j = i; j < number.length - 1; j++) { - var p2a = number.substring(i, j); - var p2b = number.substring(j); - jsonTest("$p1|$p2a|$p2b", expected, (sink) { - sink.add(p1); - sink.add(p2a); - sink.add(p2b); - sink.close(); - }); - } - } - } - - for (var sign in ["-", ""]) { - for (var intPart in ["0", "1", "99"]) { - for (var decimalPoint in [".", ""]) { - for (var decimals in decimalPoint.isEmpty ? [""] : ["0", "99"]) { - for (var e in ["e", "e-", "e+", ""]) { - for (var exp in e.isEmpty ? [""] : ["0", "2", "22", "34"]) { - testNumber("$sign$intPart$decimalPoint$decimals$e$exp"); - } - } - } - } - } - } - - void negativeTest(number) { - for (int i = 1; i < number.length - 1; i++) { - var p1 = number.substring(0, i); - var p2 = number.substring(i); - jsonThrowsTest("$p1|$p2", (sink) { - sink.add(p1); - sink.add(p2); - sink.close(); - }); - - jsonThrowsTest("$p1|$p2/slice", (sink) { - sink.addSlice(number, 0, i, false); - sink.addSlice(number, i, number.length, true); - }); - - for (int j = i; j < number.length - 1; j++) { - var p2a = number.substring(i, j); - var p2b = number.substring(j); - jsonThrowsTest("$p1|$p2a|$p2b", (sink) { - sink.add(p1); - sink.add(p2a); - sink.add(p2b); - sink.close(); - }); - } - } - } - - negativeTest("+1e"); - negativeTest("-00"); - negativeTest("01"); - negativeTest(".1"); - negativeTest("0."); - negativeTest("0.e1"); - negativeTest("1e"); - negativeTest("1e+"); - negativeTest("1e-"); -} - -void testKeywords() { - for (var expected in [null, true, false]) { - var s = "$expected"; - for (int i = 1; i < s.length - 1; i++) { - var s1 = s.substring(0, i); - var s2 = s.substring(i); - jsonTest("$s1|$s2", expected, (sink) { - sink.add(s1); - sink.add(s2); - sink.close(); - }); - jsonTest("$s1|$s2", expected, (sink) { - sink.addSlice(s, 0, i, false); - sink.addSlice(s, i, s.length, true); - }); - for (var j = i; j < s.length - 1; j++) { - var s2a = s.substring(i, j); - var s2b = s.substring(j); - jsonTest("$s1|$s2a|$s2b", expected, (sink) { - sink.add(s1); - sink.add(s2a); - sink.add(s2b); - sink.close(); - }); - } - } - } -} diff --git a/tests/lib_2/convert/json_lib_test.dart b/tests/lib_2/convert/json_lib_test.dart deleted file mode 100644 index 0ff1bdf30ab..00000000000 --- a/tests/lib_2/convert/json_lib_test.dart +++ /dev/null @@ -1,213 +0,0 @@ -// 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 - -import 'package:expect/expect.dart'; -import 'dart:convert'; - -main() { - testParsing(); - testStringify(); - testStringifyErrors(); -} - -void testParsing() { - // Scalars. - Expect.equals(5, json.decode(' 5 ')); - Expect.equals(-42, json.decode(' -42 ')); - Expect.equals(3, json.decode(' 3e0 ')); - Expect.equals(3.14, json.decode(' 3.14 ')); - Expect.isTrue(json.decode('true ')); - Expect.isFalse(json.decode(' false')); - Expect.isNull(json.decode(' null ')); - Expect.isNull(json.decode('\n\rnull\t')); - Expect.equals('hi there" bob', json.decode(' "hi there\\" bob" ')); - Expect.equals('', json.decode(' "" ')); - - // Lists. - Expect.deepEquals([], json.decode(' [] ')); - Expect.deepEquals([], json.decode('[ ]')); - Expect.deepEquals([3, -4.5, true, 'hi', false], - json.decode(' [3, -4.5, true, "hi", false] ')); - // Nulls are tricky. - Expect.deepEquals([null], json.decode('[null]')); - Expect.deepEquals([3, -4.5, null, true, 'hi', false], - json.decode(' [3, -4.5, null, true, "hi", false] ')); - Expect.deepEquals([ - [null] - ], json.decode('[[null]]')); - Expect.deepEquals([ - [3], - [], - [null], - ['hi', true] - ], json.decode(' [ [3], [], [null], ["hi", true]] ')); - - // Maps. - Expect.deepEquals({}, json.decode(' {} ')); - Expect.deepEquals({}, json.decode('{ }')); - - Expect.deepEquals({"x": 3, "y": -4.5, "z": "hi", "u": true, "v": false}, - json.decode(' {"x":3, "y": -4.5, "z" : "hi","u" : true, "v": false } ')); - - Expect.deepEquals({"x": 3, "y": -4.5, "z": "hi"}, - json.decode(' {"x":3, "y": -4.5, "z" : "hi" } ')); - - Expect.deepEquals({"y": -4.5, "z": "hi", "x": 3}, - json.decode(' {"y": -4.5, "z" : "hi" ,"x":3 } ')); - - Expect.deepEquals( - {" hi bob ": 3, "": 4.5}, json.decode('{ " hi bob " :3, "": 4.5}')); - - Expect.deepEquals({'x': {}}, json.decode(' { "x" : { } } ')); - Expect.deepEquals({'x': {}}, json.decode('{"x":{}}')); - - // Nulls are tricky. - Expect.deepEquals({'w': null}, json.decode('{"w":null}')); - - Expect.deepEquals({ - "x": {"w": null} - }, json.decode('{"x":{"w":null}}')); - - Expect.deepEquals( - {"x": 3, "y": -4.5, "z": "hi", "w": null, "u": true, "v": false}, - json.decode(' {"x":3, "y": -4.5, "z" : "hi",' - '"w":null, "u" : true, "v": false } ')); - - Expect.deepEquals( - { - "x": {"a": 3, "b": -4.5}, - "y": [{}], - "z": "hi", - "w": {"c": null, "d": true}, - "v": null - }, - json.decode('{"x": {"a":3, "b": -4.5}, "y":[{}], ' - '"z":"hi","w":{"c":null,"d":true}, "v":null}')); -} - -void testStringify() { - // Scalars. - Expect.equals('5', json.encode(5)); - Expect.equals('-42', json.encode(-42)); - // Dart does not guarantee a formatting for doubles, - // so reparse and compare to the original. - validateRoundTrip(3.14); - Expect.equals('true', json.encode(true)); - Expect.equals('false', json.encode(false)); - Expect.equals('null', json.encode(null)); - Expect.equals('" hi there\\" bob "', json.encode(' hi there" bob ')); - Expect.equals('"hi\\\\there"', json.encode('hi\\there')); - Expect.equals('"hi\\nthere"', json.encode('hi\nthere')); - Expect.equals('"hi\\r\\nthere"', json.encode('hi\r\nthere')); - Expect.equals('""', json.encode('')); - - // Lists. - Expect.equals('[]', json.encode([])); - Expect.equals('[]', json.encode(new List.filled(0, null))); - Expect.equals('[null,null,null]', json.encode(new List.filled(3, null))); - validateRoundTrip([3, -4.5, null, true, 'hi', false]); - Expect.equals( - '[[3],[],[null],["hi",true]]', - json.encode([ - [3], - [], - [null], - ['hi', true] - ])); - - // Maps. - Expect.equals('{}', json.encode({})); - Expect.equals('{}', json.encode(new Map())); - Expect.equals('{"x":{}}', json.encode({'x': {}})); - Expect.equals( - '{"x":{"a":3}}', - json.encode({ - 'x': {'a': 3} - })); - - // Dart does not guarantee an order on the keys - // of a map literal, so reparse and compare to the original Map. - validateRoundTrip( - {'x': 3, 'y': -4.5, 'z': 'hi', 'w': null, 'u': true, 'v': false}); - validateRoundTrip({"x": 3, "y": -4.5, "z": 'hi'}); - validateRoundTrip({' hi bob ': 3, '': 4.5}); - validateRoundTrip({ - 'x': {'a': 3, 'b': -4.5}, - 'y': [{}], - 'z': 'hi', - 'w': {'c': null, 'd': true}, - 'v': null - }); - - Expect.equals("4", json.encode(new ToJson(4))); - Expect.equals('[4,"a"]', json.encode(new ToJson([4, "a"]))); - Expect.equals( - '[4,{"x":42}]', - json.encode(new ToJson([ - 4, - new ToJson({"x": 42}) - ]))); - - expectThrowsJsonError(() => json.encode([new ToJson(new ToJson(4))])); - expectThrowsJsonError(() => json.encode([new Object()])); -} - -void testStringifyErrors() { - // Throws if argument cannot be converted. - expectThrowsJsonError(() => json.encode(new TestClass())); - - // Throws if toJson throws. - expectThrowsJsonError(() => json.encode(new ToJsoner("bad", throws: true))); - - // Throws if toJson returns non-serializable value. - expectThrowsJsonError(() => json.encode(new ToJsoner(new TestClass()))); - - // Throws on cyclic values. - var a = []; - var b = a; - for (int i = 0; i < 50; i++) { - b = [b]; - } - a.add(b); - expectThrowsJsonError(() => json.encode(a)); -} - -void expectThrowsJsonError(void f()) { - Expect.throws(f, (e) => e is JsonUnsupportedObjectError); -} - -class TestClass { - int x; - String y; - - TestClass() - : x = 3, - y = 'joe' {} -} - -class ToJsoner { - final Object returnValue; - final bool throws; - ToJsoner(this.returnValue, {this.throws}); - Object toJson() { - if (throws) throw returnValue; - return returnValue; - } -} - -class ToJson { - final object; - const ToJson(this.object); - toJson() => object; -} - -/** - * Checks that the argument can be converted to a JSON string and - * back, and produce something equivalent to the argument. - */ -validateRoundTrip(expected) { - Expect.deepEquals(expected, json.decode(json.encode(expected))); -} diff --git a/tests/lib_2/convert/json_pretty_test.dart b/tests/lib_2/convert/json_pretty_test.dart deleted file mode 100644 index f95eb9e3894..00000000000 --- a/tests/lib_2/convert/json_pretty_test.dart +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) 2014, 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 - -// Note: This test relies on LF line endings in the source file. -// It requires an entry in the .gitattributes file. - -library json_pretty_test; - -import 'dart:convert'; - -import "package:expect/expect.dart"; - -void _testIndentWithNullChar() { - var encoder = const JsonEncoder.withIndent('\x00'); - var encoded = encoder.convert([ - [], - [[]] - ]); - Expect.equals("[\n\x00[],\n\x00[\n\x00\x00[]\n\x00]\n]", encoded); -} - -void main() { - _testIndentWithNullChar(); - - _expect(null, 'null'); - - _expect([ - [], - [[]] - ], ''' -[ - [], - [ - [] - ] -]'''); - - _expect([1, 2, 3, 4], ''' -[ - 1, - 2, - 3, - 4 -]'''); - - _expect([true, null, 'hello', 42.42], ''' -[ - true, - null, - "hello", - 42.42 -]'''); - - _expect({"hello": [], "goodbye": {}}, '''{ - "hello": [], - "goodbye": {} -}'''); - - _expect([ - "test", - 1, - 2, - 33234.324, - true, - false, - null, - { - "test1": "test2", - "test3": "test4", - "grace": 5, - "shanna": [0, 1, 2] - }, - { - "lib": "app.dart", - "src": ["foo.dart", "bar.dart"] - } - ], '''[ - "test", - 1, - 2, - 33234.324, - true, - false, - null, - { - "test1": "test2", - "test3": "test4", - "grace": 5, - "shanna": [ - 0, - 1, - 2 - ] - }, - { - "lib": "app.dart", - "src": [ - "foo.dart", - "bar.dart" - ] - } -]'''); -} - -void _expect(Object object, String expected) { - var encoder = const JsonEncoder.withIndent(' '); - var prettyOutput = encoder.convert(object); - - Expect.equals(expected, prettyOutput); - - encoder = const JsonEncoder.withIndent(''); - - var flatOutput = encoder.convert(object); - - var flatExpected = const LineSplitter() - .convert(expected) - .map((line) => line.trimLeft()) - .join('\n'); - - Expect.equals(flatExpected, flatOutput); - - var compactOutput = json.encode(object); - - encoder = const JsonEncoder.withIndent(null); - Expect.equals(compactOutput, encoder.convert(object)); - - var prettyDecoded = json.decode(prettyOutput); - - Expect.equals(compactOutput, json.encode(prettyDecoded)); -} diff --git a/tests/lib_2/convert/json_test.dart b/tests/lib_2/convert/json_test.dart deleted file mode 100644 index bd35b0dd7c9..00000000000 --- a/tests/lib_2/convert/json_test.dart +++ /dev/null @@ -1,421 +0,0 @@ -// Copyright (c) 2012, 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. -// Disable background compilation so that the Issue 24908 can be reproduced. -// VMOptions=--no-background-compilation - -// @dart = 2.9 - -library json_test; - -import "package:expect/expect.dart"; -import "dart:convert"; - -void testJson(jsonText, expected) { - compare(expected, actual, path) { - if (expected is List) { - Expect.isTrue(actual is List); - Expect.equals(expected.length, actual.length, "$path: List length"); - for (int i = 0; i < expected.length; i++) { - compare(expected[i], actual[i], "$path[$i] in $jsonText"); - } - } else if (expected is Map) { - Expect.isTrue(actual is Map); - Expect.equals(expected.length, actual.length, - "$path: Map size in $jsonText"); - expected.forEach((key, value) { - Expect.isTrue(actual.containsKey(key)); - compare(value, actual[key], "$path[$key] in $jsonText"); - }); - } else if (expected is num) { - Expect.equals(expected is int, actual is int, - "$path: not same number type in $jsonText"); - Expect.isTrue(expected.compareTo(actual) == 0, - "$path: Expected: $expected, was: $actual in $jsonText"); - } else { - // String, bool, null. - Expect.equals(expected, actual, "$path in $jsonText"); - } - } - - for (var reviver in [null, (k, v) => v]) { - for (var split in [0, 1, 2, 3, 4, 5]) { - var name = (reviver == null) ? "" : "reviver:"; - var sink = new ChunkedConversionSink.withCallback((values) { - var value = values[0]; - compare(expected, value, "$name$value"); - }); - var decoderSink = json.decoder.startChunkedConversion(sink); - switch (split) { - case 0: - // Split after first char. - decoderSink.add(jsonText.substring(0, 1)); - decoderSink.add(jsonText.substring(1)); - decoderSink.close(); - break; - case 1: - // Split before last char. - int length = jsonText.length; - decoderSink.add(jsonText.substring(0, length - 1)); - decoderSink.add(jsonText.substring(length - 1)); - decoderSink.close(); - break; - case 2: - // Split in middle. - int half = jsonText.length ~/ 2; - decoderSink.add(jsonText.substring(0, half)); - decoderSink.add(jsonText.substring(half)); - decoderSink.close(); - break; - case 3: - // Split in three chunks. - int length = jsonText.length; - int third = length ~/ 3; - decoderSink.add(jsonText.substring(0, third)); - decoderSink.add(jsonText.substring(third, 2 * third)); - decoderSink.add(jsonText.substring(2 * third)); - decoderSink.close(); - break; - case 4: - // Use .decode - sink.add([json.decode(jsonText)]); - break; - case 5: - // Use jsonDecode - sink.add([jsonDecode(jsonText)]); - break; - } - } - } -} - -String escape(String s) { - var sb = new StringBuffer(); - for (int i = 0; i < s.length; i++) { - int code = s.codeUnitAt(i); - if (code == '\\'.codeUnitAt(0)) - sb.write(r'\\'); - else if (code == '\"'.codeUnitAt(0)) - sb.write(r'\"'); - else if (code >= 32 && code < 127) - sb.writeCharCode(code); - else { - String hex = '000${code.toRadixString(16)}'; - sb.write(r'\u' '${hex.substring(hex.length - 4)}'); - } - } - return '$sb'; -} - -void testThrows(jsonText) { - var message = "json = '${escape(jsonText)}'"; - Expect.throwsFormatException(() => json.decode(jsonText), - "json.decode, $message"); - Expect.throwsFormatException(() => jsonDecode(jsonText), - "jsonDecode, $message"); - Expect.throwsFormatException(() => json.decoder.convert(jsonText), - "json.decoder.convert, $message"); - Expect.throwsFormatException(() => - utf8.decoder.fuse(json.decoder).convert(utf8.encode(jsonText)), - "utf8.decoder.fuse(json.decoder) o utf.encode, $message"); -} - -testNumbers() { - // Positive tests for number formats. - var integerList = ["0", "9", "9999"]; - var signList = ["", "-"]; - var fractionList = ["", ".0", ".1", ".99999"]; - var exponentList = [""]; - for (var exphead in ["e", "E", "e-", "E-", "e+", "E+"]) { - for (var expval in ["0", "1", "200"]) { - exponentList.add("$exphead$expval"); - } - } - - for (var integer in integerList) { - for (var sign in signList) { - for (var fraction in fractionList) { - for (var exp in exponentList) { - for (var ws in ["", " ", "\t"]) { - var literal = "$ws$sign$integer$fraction$exp$ws"; - var expectedValue = num.parse(literal); - testJson(literal, expectedValue); - } - } - } - } - } - - // Regression test. - // Detect and handle overflow on integer literals by making them doubles - // (work like `num.parse`). - testJson("9223372036854774784", 9223372036854774784); - testJson("-9223372036854775808", -9223372036854775808); - testJson("9223372036854775808", 9223372036854775808.0); - testJson("-9223372036854775809", -9223372036854775809.0); - testJson("9223372036854775808.0", 9223372036854775808.0); - testJson("9223372036854775810", 9223372036854775810.0); - testJson("18446744073709551616.0", 18446744073709551616.0); - testJson("1e309", double.infinity); - testJson("-1e309", double.negativeInfinity); - testJson("1e-325", 0.0); - testJson("-1e-325", -0.0); - // No overflow on exponent. - testJson("1e18446744073709551616", double.infinity); - testJson("-1e18446744073709551616", double.negativeInfinity); - testJson("1e-18446744073709551616", 0.0); - testJson("-1e-18446744073709551616", -0.0); - - // (Wrapping numbers in list because the chunked parsing handles top-level - // numbers by buffering and then parsing using platform parser). - testJson("[9223372036854774784]", [9223372036854774784]); - testJson("[-9223372036854775808]", [-9223372036854775808]); - testJson("[9223372036854775808]", [9223372036854775808.0]); - testJson("[-9223372036854775809]", [-9223372036854775809.0]); - testJson("[9223372036854775808.0]", [9223372036854775808.0]); - testJson("[9223372036854775810]", [9223372036854775810.0]); - testJson("[18446744073709551616.0]", [18446744073709551616.0]); - testJson("[1e309]", [double.infinity]); - testJson("[-1e309]", [double.negativeInfinity]); - testJson("[1e-325]", [0.0]); - testJson("[-1e-325]", [-0.0]); - // No overflow on exponent. - testJson("[1e18446744073709551616]", [double.infinity]); - testJson("[-1e18446744073709551616]", [double.negativeInfinity]); - testJson("[1e-18446744073709551616]", [0.0]); - testJson("[-1e-18446744073709551616]", [-0.0]); - - // Negative tests (syntax error). - // testError thoroughly tests the given parts with a lot of valid - // values for the other parts. - testError({signs, integers, fractions, exponents}) { - def(value, defaultValue) { - if (value == null) return defaultValue; - if (value is List) return value; - return [value]; - } - - signs = def(signs, signList); - integers = def(integers, integerList); - fractions = def(fractions, fractionList); - exponents = def(exponents, exponentList); - for (var integer in integers) { - for (var sign in signs) { - for (var fraction in fractions) { - for (var exponent in exponents) { - var literal = "$sign$integer$fraction$exponent"; - testThrows(literal); - } - } - } - } - } - - // Doubles overflow to Infinity. - testJson("1e+400", double.infinity); - // (Integers do not, but we don't have those on dart2js). - - // Integer part cannot be omitted: - testError(integers: ""); - - // Test for "Initial zero only allowed for zero integer part" moved to - // json_strict_test.dart because IE's jsonDecode accepts additional initial - // zeros. - - // Only minus allowed as sign. - testError(signs: "+"); - // Requires digits after decimal point. - testError(fractions: "."); - // Requires exponent digits, and only digits. - testError(exponents: ["e", "e+", "e-", "e.0"]); - - // No whitespace inside numbers. - // Additional case "- 2.2e+2" in json_strict_test.dart. - testThrows("-2 .2e+2"); - testThrows("-2. 2e+2"); - testThrows("-2.2 e+2"); - testThrows("-2.2e +2"); - testThrows("-2.2e+ 2"); - testThrows("01"); - testThrows("0."); - testThrows(".0"); - testThrows("0.e1"); - - testThrows("[2.,2]"); - testThrows("{2.:2}"); - - testThrows("NaN"); - testThrows("Infinity"); - testThrows("-Infinity"); - Expect.throws(() => json.encode(double.nan)); - Expect.throws(() => json.encode(double.infinity)); - Expect.throws(() => json.encode(double.negativeInfinity)); - Expect.throws(() => jsonEncode(double.nan)); - Expect.throws(() => jsonEncode(double.infinity)); - Expect.throws(() => jsonEncode(double.negativeInfinity)); -} - -testStrings() { - // String parser accepts and understands escapes. - var input = r'"\u0000\uffff\n\r\f\t\b\/\\\"' '\x20\ufffd\uffff"'; - var expected = "\u0000\uffff\n\r\f\t\b\/\\\"\x20\ufffd\uffff"; - testJson(input, expected); - // Empty string. - testJson(r'""', ""); - // Escape first. - var escapes = { - "f": "\f", - "b": "\b", - "n": "\n", - "r": "\r", - "t": "\t", - r"\": r"\", - '"': '"', - "/": "/", - }; - escapes.forEach((esc, lit) { - testJson('"\\$esc........"', "$lit........"); - // Escape last. - testJson('"........\\$esc"', "........$lit"); - // Escape middle. - testJson('"....\\$esc...."', "....$lit...."); - }); - - // Does not accept single quotes. - testThrows(r"''"); - // Throws on unterminated strings. - testThrows(r'"......\"'); - // Throws on unterminated escapes. - testThrows(r'"\'); // ' is not escaped. - testThrows(r'"\a"'); - testThrows(r'"\u"'); - testThrows(r'"\u1"'); - testThrows(r'"\u12"'); - testThrows(r'"\u123"'); - testThrows(r'"\ux"'); - testThrows(r'"\u1x"'); - testThrows(r'"\u12x"'); - testThrows(r'"\u123x"'); - // Throws on bad escapes. - testThrows(r'"\a"'); - testThrows(r'"\x00"'); - testThrows(r'"\c2"'); - testThrows(r'"\000"'); - testThrows(r'"\u{0}"'); - testThrows(r'"\%"'); - testThrows('"\\\x00"'); // Not raw string! - // Throws on control characters. - for (int i = 0; i < 32; i++) { - var string = new String.fromCharCodes([0x22, i, 0x22]); // '"\x00"' etc. - testThrows(string); - } -} - -testObjects() { - testJson(r'{}', {}); - testJson(r'{"x":42}', {"x": 42}); - testJson(r'{"x":{"x":{"x":42}}}', { - "x": { - "x": {"x": 42} - } - }); - testJson(r'{"x":10,"x":42}', {"x": 42}); - testJson(r'{"":42}', {"": 42}); - - // Keys must be strings. - testThrows(r'{x:10}'); - testThrows(r'{true:10}'); - testThrows(r'{false:10}'); - testThrows(r'{null:10}'); - testThrows(r'{42:10}'); - testThrows(r'{42e1:10}'); - testThrows(r'{-42:10}'); - testThrows(r'{["text"]:10}'); - testThrows(r'{:10}'); -} - -testArrays() { - testJson(r'[]', []); - testJson(r'[1.1e1,"string",true,false,null,{}]', - [1.1e1, "string", true, false, null, {}]); - testJson(r'[[[[[[]]]],[[[]]],[[]]]]', [ - [ - [ - [ - [[]] - ] - ], - [ - [[]] - ], - [[]] - ] - ]); - testJson(r'[{},[{}],{"x":[]}]', [ - {}, - [{}], - {"x": []} - ]); - - testThrows(r'[1,,2]'); - testThrows(r'[1,2,]'); - testThrows(r'[,2]'); -} - -testWords() { - testJson(r'true', true); - testJson(r'false', false); - testJson(r'null', null); - testJson(r'[true]', [true]); - testJson(r'{"true":true}', {"true": true}); - - testThrows(r'truefalse'); - testThrows(r'trues'); - testThrows(r'nulll'); - testThrows(r'full'); - testThrows(r'nul'); - testThrows(r'tru'); - testThrows(r'fals'); - testThrows(r'\null'); - testThrows(r't\rue'); - testThrows(r't\rue'); -} - -testWhitespace() { - // Valid white-space characters. - var v = '\t\r\n\ '; - // Invalid white-space and non-recognized characters. - var invalids = ['\x00', '\f', '\x08', '\\', '\xa0', '\u2028', '\u2029']; - - // Valid whitespace accepted "everywhere". - testJson('$v[${v}-2.2e2$v,$v{$v"key"$v:${v}true$v}$v,$v"ab"$v]$v', [ - -2.2e2, - {"key": true}, - "ab" - ]); - - // IE9 accepts invalid characters at the end, so some of these tests have been - // moved to json_strict_test.dart. - for (var i in invalids) { - testThrows('${i}"s"'); - testThrows('42${i}'); - testThrows('$i[]'); - testThrows('[$i]'); - testThrows('[$i"s"]'); - testThrows('["s"$i]'); - testThrows('$i{"k":"v"}'); - testThrows('{$i"k":"v"}'); - testThrows('{"k"$i:"v"}'); - testThrows('{"k":$i"v"}'); - testThrows('{"k":"v"$i}'); - } -} - -main() { - testNumbers(); - testStrings(); - testWords(); - testObjects(); - testArrays(); - testWhitespace(); -} diff --git a/tests/lib_2/convert/json_toEncodable_reviver_test.dart b/tests/lib_2/convert/json_toEncodable_reviver_test.dart deleted file mode 100644 index d247cce324a..00000000000 --- a/tests/lib_2/convert/json_toEncodable_reviver_test.dart +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2014, 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 json_tests; - -import 'package:expect/expect.dart'; -import 'dart:convert'; - -class A { - final x; - A(this.x); -} - -toEncodable(Object a) => {"A": (a as A).x}; -reviver(key, value) { - if (value is Map && value.length == 1 && value["A"] != null) { - return new A(value["A"]); - } - return value; -} - -const extendedJson = - const JsonCodec(toEncodable: toEncodable, reviver: reviver); - -main() { - var encoded = extendedJson.encode([ - new A(0), - {"2": new A(1)} - ]); - Expect.equals('[{"A":0},{"2":{"A":1}}]', encoded); - var decoded = extendedJson.decode(encoded); - Expect.isTrue(decoded is List); - Expect.equals(2, decoded.length); - Expect.isTrue(decoded[0] is A); - Expect.equals(0, decoded[0].x); - Expect.isTrue(decoded[1] is Map); - Expect.isNotNull(decoded[1]["2"]); - Expect.isTrue(decoded[1]["2"] is A); - Expect.equals(1, decoded[1]["2"].x); - - var a = extendedJson.decode(extendedJson.encode(new A(499))); - Expect.isTrue(a is A); - Expect.equals(499, a.x); - - testInvalidMap(); -} - -void testInvalidMap() { - var map = {"a": 42, "b": 42, 37: 42}; // Non-string key. - var enc = new JsonEncoder((_) => "fixed"); - var res = enc.convert(map); - Expect.equals('"fixed"', res); - - enc = new JsonEncoder.withIndent(" ", (_) => "fixed"); - res = enc.convert(map); - Expect.equals('"fixed"', res); -} diff --git a/tests/lib_2/convert/json_unicode_tests.dart b/tests/lib_2/convert/json_unicode_tests.dart deleted file mode 100644 index 30d6a28c142..00000000000 --- a/tests/lib_2/convert/json_unicode_tests.dart +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2013, 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 json_unicode_tests; - -import 'unicode_tests.dart'; - -const _quote = 0x22; // " -const _colon = 0x3a; // : -const _comma = 0x2c; // , -const _braceOpen = 0x7b; // { -const _braceClose = 0x7d; // } -const _bracketOpen = 0x5b; // [ -const _bracketClose = 0x5d; // ] - -_expandUnicodeTests() { - return UNICODE_TESTS.expand((test) { - // The unicode test will be a string (possibly) containing unicode - // characters. It also contains the empty string. - // It must not contain a double-quote '"'. - assert(!test.contains('"')); - - var bytes = test[0]; - var string = test[1]; - - // expanded will hold all tests that are generated from the unicode test. - var expanded = []; - - // Put the string into quotes. - // For example: 'abcd' -> '"abcd"'. - var inQuotesBytes = []; - inQuotesBytes.add(_quote); - inQuotesBytes.addAll(bytes); - inQuotesBytes.add(_quote); - expanded.add([inQuotesBytes, string]); - - // Put the quoted string into a triple nested list. - // For example: 'abcd' -> '[[["abcd"]]]'. - var listExpected = [ - [ - [string] - ] - ]; - var inListBytes = []; - inListBytes.addAll([_bracketOpen, _bracketOpen, _bracketOpen]); - inListBytes.addAll(inQuotesBytes); - inListBytes.addAll([_bracketClose, _bracketClose, _bracketClose]); - expanded.add([inListBytes, listExpected]); - - // Put the quoted string into a triple nested list and duplicate that - // list three times. - // For example: 'abcd' -> '[[[["abcd"]]],[[["abcd"]]],[[["abcd"]]]]'. - var listLongerExpected = [listExpected, listExpected, listExpected]; - var listLongerBytes = []; - listLongerBytes.add(_bracketOpen); - listLongerBytes.addAll(inListBytes); - listLongerBytes.add(_comma); - listLongerBytes.addAll(inListBytes); - listLongerBytes.add(_comma); - listLongerBytes.addAll(inListBytes); - listLongerBytes.add(_bracketClose); - expanded.add([listLongerBytes, listLongerExpected]); - - // Put the previous strings/lists into a map. - // For example: - // 'abcd' -> '{"abcd":[[[["abcd"]]],[[["abcd"]]],[[["abcd"]]]]}'. - var mapExpected = new Map(); - mapExpected[string] = listLongerExpected; - var mapBytes = []; - mapBytes.add(_braceOpen); - mapBytes.addAll(inQuotesBytes); - mapBytes.add(_colon); - mapBytes.addAll(listLongerBytes); - mapBytes.add(_braceClose); - expanded.add([mapBytes, mapExpected]); - - return expanded; - }).toList(); -} - -final JSON_UNICODE_TESTS = _expandUnicodeTests(); diff --git a/tests/lib_2/convert/json_utf8_chunk_test.dart b/tests/lib_2/convert/json_utf8_chunk_test.dart deleted file mode 100644 index 99379b7ac38..00000000000 --- a/tests/lib_2/convert/json_utf8_chunk_test.dart +++ /dev/null @@ -1,461 +0,0 @@ -// Copyright (c) 2014, 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 test; - -import "package:expect/expect.dart"; -import "dart:convert"; -import "unicode_tests.dart" show UNICODE_TESTS; - -main() { - testNumbers(); - testStrings(); - testKeywords(); - testAll(); - testMalformed(); - testUnicodeTests(); -} - -// Create an UTF-8 sink from a chunked JSON decoder, then let [action] -// put data into it, and check that what comes out is equal to [expect]. -void jsonTest(testName, expect, action(sink), [bool allowMalformed = false]) { - jsonParse(testName, (value) { - Expect.equals(expect, value, "$testName:$value"); - }, action, allowMalformed); -} - -void jsonParse(testName, check, action, [bool allowMalformed = false]) { - var sink = new ChunkedConversionSink.withCallback((values) { - var value = values[0]; - check(value); - }); - var decoderSink = - json.decoder.startChunkedConversion(sink).asUtf8Sink(allowMalformed); - try { - action(decoderSink); - } on FormatException catch (e, s) { - print("Source: ${e.source} @ ${e.offset}"); - Expect.fail("Unexpected throw($testName): $e\n$s"); - } -} - -void testStrings() { - // String literal containing characters, all escape types, - // and a number of UTF-8 encoded characters. - var s = r'"abc\f\ndef\r\t\b\"\/\\\u0001\u9999\uffff' - '\x7f\xc2\x80\xdf\xbf\xe0\xa0\x80\xef\xbf\xbf' - '\xf0\x90\x80\x80\xf4\x8f\xbf\xbf"'; // UTF-8. - var expected = "abc\f\ndef\r\t\b\"\/\\\u0001\u9999\uffff" - "\x7f\x80\u07ff\u0800\uffff" - "\u{10000}\u{10ffff}"; - for (var i = 1; i < s.length - 1; i++) { - var s1 = s.substring(0, i); - var s2 = s.substring(i); - jsonTest("$s1|$s2-$i", expected, (sink) { - sink.add(s1.codeUnits); - sink.add(s2.codeUnits); - sink.close(); - }); - jsonTest("$s1|$s2-$i-slice", expected, (sink) { - sink.addSlice(s.codeUnits, 0, i, false); - sink.addSlice(s.codeUnits, i, s.length, true); - }); - for (var j = i; j < s.length - 1; j++) { - var s2a = s.substring(i, j); - var s2b = s.substring(j); - jsonTest("$s1|$s2a|$s2b-$i-$j", expected, (sink) { - sink.add(s1.codeUnits); - sink.add(s2a.codeUnits); - sink.add(s2b.codeUnits); - sink.close(); - }); - } - } -} - -void testNumbers() { - for (var number in [ - "-0.12e-12", - "-34.12E+12", - "0.0e0", - "9.9E9", - "0", - "9", - "1234.56789123456701418035663664340972900390625", - "1.2345678912345671e-14", - "9223372036854775807" - ]) { - var expected = num.parse(number); - for (int i = 1; i < number.length - 1; i++) { - var p1 = number.substring(0, i); - var p2 = number.substring(i); - jsonTest("$p1|$p2", expected, (sink) { - sink.add(p1.codeUnits); - sink.add(p2.codeUnits); - sink.close(); - }); - - jsonTest("$p1|$p2/slice", expected, (sink) { - sink.addSlice(number.codeUnits, 0, i, false); - sink.addSlice(number.codeUnits, i, number.length, true); - }); - - for (int j = i; j < number.length - 1; j++) { - var p2a = number.substring(i, j); - var p2b = number.substring(j); - jsonTest("$p1|$p2a|$p2b", expected, (sink) { - sink.add(p1.codeUnits); - sink.add(p2a.codeUnits); - sink.add(p2b.codeUnits); - sink.close(); - }); - } - } - } -} - -// Test that `null`, `true`, and `false` keywords are decoded correctly. -void testKeywords() { - for (var expected in [null, true, false]) { - var s = "$expected"; - for (int i = 1; i < s.length - 1; i++) { - var s1 = s.substring(0, i); - var s2 = s.substring(i); - jsonTest("$s1|$s2", expected, (sink) { - sink.add(s1.codeUnits); - sink.add(s2.codeUnits); - sink.close(); - }); - jsonTest("$s1|$s2", expected, (sink) { - sink.addSlice(s.codeUnits, 0, i, false); - sink.addSlice(s.codeUnits, i, s.length, true); - }); - for (var j = i; j < s.length - 1; j++) { - var s2a = s.substring(i, j); - var s2b = s.substring(j); - jsonTest("$s1|$s2a|$s2b", expected, (sink) { - sink.add(s1.codeUnits); - sink.add(s2a.codeUnits); - sink.add(s2b.codeUnits); - sink.close(); - }); - } - } - } -} - -// Tests combinations of numbers, strings and keywords. -void testAll() { - var s = r'{"":[true,false,42, -33e-3,null,"\u0080"], "z": 0}'; - bool check(o) { - if (o is Map) { - Expect.equals(2, o.length); - Expect.equals(0, o["z"]); - var v = o[""]; - if (v is List) { - Expect.listEquals([true, false, 42, -33e-3, null, "\u0080"], v); - } else { - Expect.fail("Expected list, found ${v.runtimeType}"); - } - } else { - Expect.fail("Expected map, found ${o.runtimeType}"); - } - } - - for (var i = 1; i < s.length - 1; i++) { - var s1 = s.substring(0, i); - var s2 = s.substring(i); - jsonParse("$s1|$s2-$i", check, (sink) { - sink.add(s1.codeUnits); - sink.add(s2.codeUnits); - sink.close(); - }); - jsonParse("$s1|$s2-$i-slice", check, (sink) { - sink.addSlice(s.codeUnits, 0, i, false); - sink.addSlice(s.codeUnits, i, s.length, true); - }); - for (var j = i; j < s.length - 1; j++) { - var s2a = s.substring(i, j); - var s2b = s.substring(j); - jsonParse("$s1|$s2a|$s2b-$i-$j", check, (sink) { - sink.add(s1.codeUnits); - sink.add(s2a.codeUnits); - sink.add(s2b.codeUnits); - sink.close(); - }); - } - } -} - -// Check that [codes] decode to [expect] when allowing malformed UTF-8, -// and throws otherwise. -void jsonMalformedTest(name, expect, codes) { - // Helper method. - void test(name, expect, action(sink)) { - var tag = "Malform:$name-$expect"; - { - // Allowing malformed, expect [expect] - var sink = new ChunkedConversionSink.withCallback((values) { - var value = values[0]; - Expect.equals(expect, value, tag); - }); - var decoderSink = - json.decoder.startChunkedConversion(sink).asUtf8Sink(true); - try { - action(decoderSink); - } catch (e, s) { - Expect.fail("Unexpected throw ($tag): $e\n$s"); - } - } - { - // Not allowing malformed, expect throw. - var sink = new ChunkedConversionSink.withCallback((values) { - Expect.fail(tag); - }); - var decoderSink = - json.decoder.startChunkedConversion(sink).asUtf8Sink(false); - Expect.throws(() { - action(decoderSink); - }, null, tag); - } - } - - // Test all two and three part slices. - for (int i = 1; i < codes.length - 1; i++) { - test("$name:$i", expect, (sink) { - sink.add(codes.sublist(0, i)); - sink.add(codes.sublist(i)); - sink.close(); - }); - test("$name:$i-slice", expect, (sink) { - sink.addSlice(codes, 0, i, false); - sink.addSlice(codes, i, codes.length, true); - }); - for (int j = i; j < codes.length - 1; j++) { - test("$name:$i|$j", expect, (sink) { - sink.add(codes.sublist(0, i)); - sink.add(codes.sublist(i, j)); - sink.add(codes.sublist(j)); - sink.close(); - }); - } - } -} - -// Test that `codeString.codeUnits` fails to parse as UTF-8 JSON, -// even with decoder not throwing on malformed encodings. -void jsonThrows(String name, String codeString) { - testJsonThrows(tag, action) { - // Not allowing malformed, expect throw. - var sink = new ChunkedConversionSink.withCallback((values) { - Expect.fail(tag); - }); - var decoderSink = - json.decoder.startChunkedConversion(sink).asUtf8Sink(true); - Expect.throws(() { - action(decoderSink); - }, null, tag); - } - - var codes = codeString.codeUnits; - for (int i = 1; i < codes.length - 1; i++) { - testJsonThrows("$name:$i", (sink) { - sink.add(codes.sublist(0, i)); - sink.add(codes.sublist(i)); - sink.close(); - }); - testJsonThrows("$name:$i-slice", (sink) { - sink.addSlice(codes, 0, i, false); - sink.addSlice(codes, i, codes.length, true); - }); - for (int j = i; j < codes.length - 1; j++) { - testJsonThrows("$name:$i|$j", (sink) { - sink.add(codes.sublist(0, i)); - sink.add(codes.sublist(i, j)); - sink.add(codes.sublist(j)); - sink.close(); - }); - } - } -} - -// Malformed UTF-8 encodings. -void testMalformed() { - // Overlong encodings. - jsonMalformedTest( - "overlong-0-2", "@\uFFFD\uFFFD@", [0x22, 0x40, 0xc0, 0x80, 0x40, 0x22]); - jsonMalformedTest("overlong-0-3", "@\uFFFD\uFFFD\uFFFD@", - [0x22, 0x40, 0xe0, 0x80, 0x80, 0x40, 0x22]); - jsonMalformedTest("overlong-0-4", "@\uFFFD\uFFFD\uFFFD\uFFFD@", - [0x22, 0x40, 0xf0, 0x80, 0x80, 0x80, 0x40, 0x22]); - - jsonMalformedTest( - "overlong-7f-2", "@\uFFFD\uFFFD@", [0x22, 0x40, 0xc1, 0xbf, 0x40, 0x22]); - jsonMalformedTest("overlong-7f-3", "@\uFFFD\uFFFD\uFFFD@", - [0x22, 0x40, 0xe0, 0x81, 0xbf, 0x40, 0x22]); - jsonMalformedTest("overlong-7f-4", "@\uFFFD\uFFFD\uFFFD\uFFFD@", - [0x22, 0x40, 0xf0, 0x80, 0x81, 0xbf, 0x40, 0x22]); - - jsonMalformedTest("overlong-80-3", "@\uFFFD\uFFFD\uFFFD@", - [0x22, 0x40, 0xe0, 0x82, 0x80, 0x40, 0x22]); - jsonMalformedTest("overlong-80-4", "@\uFFFD\uFFFD\uFFFD\uFFFD@", - [0x22, 0x40, 0xf0, 0x80, 0x82, 0x80, 0x40, 0x22]); - - jsonMalformedTest("overlong-7ff-3", "@\uFFFD\uFFFD\uFFFD@", - [0x22, 0x40, 0xe0, 0x9f, 0xbf, 0x40, 0x22]); - jsonMalformedTest("overlong-7ff-4", "@\uFFFD\uFFFD\uFFFD\uFFFD@", - [0x22, 0x40, 0xf0, 0x80, 0x9f, 0xbf, 0x40, 0x22]); - - jsonMalformedTest("overlong-800-4", "@\uFFFD\uFFFD\uFFFD\uFFFD@", - [0x22, 0x40, 0xf0, 0x80, 0xa0, 0x80, 0x40, 0x22]); - jsonMalformedTest("overlong-ffff-4", "@\uFFFD\uFFFD\uFFFD\uFFFD@", - [0x22, 0x40, 0xf0, 0x8f, 0xbf, 0xbf, 0x40, 0x22]); - - // Unterminated multibyte sequences. - jsonMalformedTest( - "unterminated-2-normal", "@\uFFFD@", [0x22, 0x40, 0xc0, 0x40, 0x22]); - - jsonMalformedTest("unterminated-3-normal", "@\uFFFD\uFFFD@", - [0x22, 0x40, 0xe0, 0x80, 0x40, 0x22]); - - jsonMalformedTest("unterminated-4-normal", "@\uFFFD\uFFFD\uFFFD@", - [0x22, 0x40, 0xf0, 0x80, 0x80, 0x40, 0x22]); - - jsonMalformedTest("unterminated-2-multi", "@\uFFFD\x80@", - [0x22, 0x40, 0xc0, 0xc2, 0x80, 0x40, 0x22]); - - jsonMalformedTest("unterminated-3-multi", "@\uFFFD\uFFFD\x80@", - [0x22, 0x40, 0xe0, 0x80, 0xc2, 0x80, 0x40, 0x22]); - - jsonMalformedTest("unterminated-4-multi", "@\uFFFD\uFFFD\uFFFD\x80@", - [0x22, 0x40, 0xf0, 0x80, 0x80, 0xc2, 0x80, 0x40, 0x22]); - - jsonMalformedTest("unterminated-2-escape", "@\uFFFD\n@", - [0x22, 0x40, 0xc0, 0x5c, 0x6e, 0x40, 0x22]); - - jsonMalformedTest("unterminated-3-escape", "@\uFFFD\uFFFD\n@", - [0x22, 0x40, 0xe0, 0x80, 0x5c, 0x6e, 0x40, 0x22]); - - jsonMalformedTest("unterminated-4-escape", "@\uFFFD\uFFFD\uFFFD\n@", - [0x22, 0x40, 0xf0, 0x80, 0x80, 0x5c, 0x6e, 0x40, 0x22]); - - jsonMalformedTest("unterminated-2-end", "@\uFFFD", [0x22, 0x40, 0xc0, 0x22]); - - jsonMalformedTest( - "unterminated-3-end", "@\uFFFD\uFFFD", [0x22, 0x40, 0xe0, 0x80, 0x22]); - - jsonMalformedTest("unterminated-4-end", "@\uFFFD\uFFFD\uFFFD", - [0x22, 0x40, 0xf0, 0x80, 0x80, 0x22]); - - // Unexpected continuation byte - // - after a normal character. - jsonMalformedTest( - "continuation-normal", "@\uFFFD@", [0x22, 0x40, 0x80, 0x40, 0x22]); - - // - after a valid continuation byte. - jsonMalformedTest("continuation-continuation-2", "@\x80\uFFFD@", - [0x22, 0x40, 0xc2, 0x80, 0x80, 0x40, 0x22]); - jsonMalformedTest("continuation-continuation-3", "@\u0800\uFFFD@", - [0x22, 0x40, 0xe0, 0xa0, 0x80, 0x80, 0x40, 0x22]); - jsonMalformedTest("continuation-continuation-4", "@\u{10000}\uFFFD@", - [0x22, 0x40, 0xf0, 0x90, 0x80, 0x80, 0x80, 0x40, 0x22]); - - // - after another invalid continuation byte - jsonMalformedTest("continuation-twice", "@\uFFFD\uFFFD\uFFFD@", - [0x22, 0x40, 0x80, 0x80, 0x80, 0x40, 0x22]); - // - at start. - jsonMalformedTest("continuation-start", "\uFFFD@", [0x22, 0x80, 0x40, 0x22]); - - // Unexpected leading byte where continuation byte expected. - jsonMalformedTest( - "leading-2", "@\uFFFD\x80@", [0x22, 0x40, 0xc0, 0xc2, 0x80, 0x40, 0x22]); - jsonMalformedTest("leading-3-1", "@\uFFFD\x80@", - [0x22, 0x40, 0xe0, 0xc2, 0x80, 0x40, 0x22]); - jsonMalformedTest("leading-3-2", "@\uFFFD\uFFFD\x80@", - [0x22, 0x40, 0xe0, 0x80, 0xc2, 0x80, 0x40, 0x22]); - jsonMalformedTest("leading-4-1", "@\uFFFD\x80@", - [0x22, 0x40, 0xf0, 0xc2, 0x80, 0x40, 0x22]); - jsonMalformedTest("leading-4-2", "@\uFFFD\uFFFD\x80@", - [0x22, 0x40, 0xf0, 0x80, 0xc2, 0x80, 0x40, 0x22]); - jsonMalformedTest("leading-4-3", "@\uFFFD\uFFFD\uFFFD\x80@", - [0x22, 0x40, 0xf0, 0x80, 0x80, 0xc2, 0x80, 0x40, 0x22]); - - // Overlong encodings of ASCII outside of strings always fail. - // Use Latin-1 strings as argument since most chars are correct, - // pass string.codeUnits to decoder as UTF-8. - jsonThrows("number-1", "\xc0\xab0.0e-0"); // '-' is 0x2b => \xc0\xab - jsonThrows("number-2", "-\xc0\xb0.0e-0"); // '0' is 0x30 => \xc0\xb0 - jsonThrows("number-3", "-0\xc0\xae0e-0"); // '.' is 0x2e => \xc0\xae - jsonThrows("number-4", "-0.\xc0\xb0e-0"); - jsonThrows("number-5", "-0.0\xc1\xa5-0"); // 'e' is 0x65 => \xc1\xa5 - jsonThrows("number-6", "-0.0e\xc0\xab0"); - jsonThrows("number-7", "-0.0e-\xc0\xb0"); - - jsonThrows("true-1", "\xc1\xb4rue"); // 't' is 0x74 - jsonThrows("true-2", "t\xc1\xb2ue"); // 'r' is 0x72 - jsonThrows("true-3", "tr\xc1\xb5e"); // 'u' is 0x75 - jsonThrows("true-4", "tru\xc1\xa5"); // 'e' is 0x65 - - jsonThrows("false-1", "\xc1\xa6alse"); // 'f' is 0x66 - jsonThrows("false-2", "f\xc1\xa1lse"); // 'a' is 0x61 - jsonThrows("false-3", "fa\xc1\xacse"); // 'l' is 0x6c - jsonThrows("false-4", "fal\xc1\xb3e"); // 's' is 0x73 - jsonThrows("false-5", "fals\xc1\xa5"); // 'e' is 0x65 - - jsonThrows("null-1", "\xc1\xaeull"); // 'n' is 0x6e - jsonThrows("null-2", "n\xc1\xb5ll"); // 'u' is 0x75 - jsonThrows("null-3", "nu\xc1\xacl"); // 'l' is 0x6c - jsonThrows("null-4", "nul\xc1\xac"); // 'l' is 0x6c - - jsonThrows("array-1", "\xc1\x9b0,0]"); // '[' is 0x5b - jsonThrows("array-2", "[0,0\xc1\x9d"); // ']' is 0x5d - jsonThrows("array-2", "[0\xc0\xac0]"); // ',' is 0x2c - - jsonThrows("object-1", '\xc1\xbb"x":0}'); // '{' is 0x7b - jsonThrows("object-2", '{"x":0\xc1\xbd'); // '}' is 0x7d - jsonThrows("object-2", '{"x\xc0\xba0}'); // ':' is 0x3a - - jsonThrows("string-1", '\xc0\xa2x"'); // '"' is 0x22 - jsonThrows("string-1", '"x\xc0\xa2'); // Unterminated string. - - jsonThrows("whitespace-1", "\xc0\xa01"); // ' ' is 0x20 -} - -void testUnicodeTests() { - for (var pair in UNICODE_TESTS) { - var bytes = pair[0]; - var string = pair[1]; - int step = 1; - if (bytes.length > 100) step = bytes.length ~/ 13; - for (int i = 1; i < bytes.length - 1; i += step) { - jsonTest("$string:$i", string, (sink) { - sink.add([0x22]); // Double-quote. - sink.add(bytes.sublist(0, i)); - sink.add(bytes.sublist(i)); - sink.add([0x22]); - sink.close(); - }); - jsonTest("$string:$i-slice", string, (sink) { - sink.addSlice([0x22], 0, 1, false); - sink.addSlice(bytes, 0, i, false); - sink.addSlice(bytes, i, bytes.length, false); - sink.addSlice([0x22], 0, 1, true); - }); - int skip = 1; - if (bytes.length > 25) skip = bytes.length ~/ 17; - for (int j = i; j < bytes.length - 1; j += skip) { - jsonTest("$string:$i|$j", string, (sink) { - sink.add([0x22]); - sink.add(bytes.sublist(0, i)); - sink.add(bytes.sublist(i, j)); - sink.add(bytes.sublist(j)); - sink.add([0x22]); - sink.close(); - }); - } - } - } -} diff --git a/tests/lib_2/convert/json_utf8_test.dart b/tests/lib_2/convert/json_utf8_test.dart deleted file mode 100644 index f0afc40a5fe..00000000000 --- a/tests/lib_2/convert/json_utf8_test.dart +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2014, 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 - -// Test that the fused UTF-8/JSON decoder accepts a leading BOM. -library test; - -import "package:expect/expect.dart"; -import "dart:convert"; - -void main() { - for (var parse in [parseFuse, parseSequence, parseChunked]) { - // Sanity checks. - Expect.isTrue(parse('true'.codeUnits.toList())); - Expect.isFalse(parse('false'.codeUnits.toList())); - Expect.equals(123, parse('123'.codeUnits.toList())); - Expect.listEquals([42], parse('[42]'.codeUnits.toList())); - Expect.mapEquals({"x": 42}, parse('{"x":42}'.codeUnits.toList())); - - // String (0x22 = ") with UTF-8 encoded Unicode characters. - Expect.equals( - "A\xff\u1234\u{65555}", - parse([ - 0x22, - 0x41, - 0xc3, - 0xbf, - 0xe1, - 0x88, - 0xb4, - 0xf1, - 0xa5, - 0x95, - 0x95, - 0x22 - ])); - - // BOM followed by true. - Expect.isTrue(parse([0xEF, 0xBB, 0xBF, 0x74, 0x72, 0x75, 0x65])); - } - - // Do not accept BOM in non-UTF-8 decoder. - Expect.throws( - () => new JsonDecoder().convert("\xEF\xBB\xBFtrue")); - Expect.throws(() => new JsonDecoder().convert("\uFEFFtrue")); - - // Only accept BOM first. - Expect.throws( - () => parseFuse(" \xEF\xBB\xBFtrue".codeUnits.toList())); - // Only accept BOM first. - Expect.throws( - () => parseFuse(" true\xEF\xBB\xBF".codeUnits.toList())); - - Expect.throws( - () => parseFuse(" [\xEF\xBB\xBF]".codeUnits.toList())); -} - -Object parseFuse(List text) { - return new Utf8Decoder().fuse(new JsonDecoder()).convert(text); -} - -Object parseSequence(List text) { - return new JsonDecoder().convert(new Utf8Decoder().convert(text)); -} - -Object parseChunked(List text) { - var result; - var sink = new Utf8Decoder().fuse(new JsonDecoder()).startChunkedConversion( - new ChunkedConversionSink.withCallback((List values) { - result = values[0]; - })); - for (var i = 0; i < text.length; i++) { - sink.add([text[i]]); - } - sink.close(); - return result; -} diff --git a/tests/lib_2/convert/json_util_test.dart b/tests/lib_2/convert/json_util_test.dart deleted file mode 100644 index 4c5b212d121..00000000000 --- a/tests/lib_2/convert/json_util_test.dart +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) 2012, 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 jsonTest; - -import "package:expect/expect.dart"; -import 'dart:convert'; - -main() { - testEscaping(); - testParse(); - testParseInvalid(); -} - -void testParse() { - // Scalars. - Expect.equals(5, json.decode(' 5 ')); - Expect.equals(-42, json.decode(' -42 ')); - Expect.equals(3, json.decode(' 3e0 ')); - Expect.equals(3.14, json.decode(' 3.14 ')); - Expect.equals(1.0E-06, json.decode(' 1.0E-06 ')); - Expect.equals(0, json.decode("0")); - Expect.equals(1, json.decode("1")); - Expect.equals(0.1, json.decode("0.1")); - Expect.equals(1.1, json.decode("1.1")); - Expect.equals(1.1, json.decode("1.100000")); - Expect.equals(1.111111, json.decode("1.111111")); - Expect.equals(-0, json.decode("-0")); - Expect.equals(-1, json.decode("-1")); - Expect.equals(-0.1, json.decode("-0.1")); - Expect.equals(-1.1, json.decode("-1.1")); - Expect.equals(-1.1, json.decode("-1.100000")); - Expect.equals(-1.111111, json.decode("-1.111111")); - Expect.equals(11, json.decode("1.1e1")); - Expect.equals(11, json.decode("1.1e+1")); - Expect.equals(0.11, json.decode("1.1e-1")); - Expect.equals(11, json.decode("1.1E1")); - Expect.equals(11, json.decode("1.1E+1")); - Expect.equals(0.11, json.decode("1.1E-1")); - Expect.equals(1E0, json.decode(" 1E0")); - Expect.equals(1E+0, json.decode(" 1E+0")); - Expect.equals(1E-0, json.decode(" 1E-0")); - Expect.equals(1E00, json.decode(" 1E00")); - Expect.equals(1E+00, json.decode(" 1E+00")); - Expect.equals(1E-00, json.decode(" 1E-00")); - Expect.equals(1E+10, json.decode(" 1E+10")); - Expect.equals(1E+010, json.decode(" 1E+010")); - Expect.equals(1E+0010, json.decode(" 1E+0010")); - Expect.equals(1E10, json.decode(" 1E10")); - Expect.equals(1E010, json.decode(" 1E010")); - Expect.equals(1E0010, json.decode(" 1E0010")); - Expect.equals(1E-10, json.decode(" 1E-10")); - Expect.equals(1E-0010, json.decode(" 1E-0010")); - Expect.equals(1E0, json.decode(" 1e0")); - Expect.equals(1E+0, json.decode(" 1e+0")); - Expect.equals(1E-0, json.decode(" 1e-0")); - Expect.equals(1E00, json.decode(" 1e00")); - Expect.equals(1E+00, json.decode(" 1e+00")); - Expect.equals(1E-00, json.decode(" 1e-00")); - Expect.equals(1E+10, json.decode(" 1e+10")); - Expect.equals(1E+010, json.decode(" 1e+010")); - Expect.equals(1E+0010, json.decode(" 1e+0010")); - Expect.equals(1E10, json.decode(" 1e10")); - Expect.equals(1E010, json.decode(" 1e010")); - Expect.equals(1E0010, json.decode(" 1e0010")); - Expect.equals(1E-10, json.decode(" 1e-10")); - Expect.equals(1E-0010, json.decode(" 1e-0010")); - Expect.equals(true, json.decode(' true ')); - Expect.equals(false, json.decode(' false')); - Expect.equals(null, json.decode(' null ')); - Expect.equals(null, json.decode('\n\rnull\t')); - Expect.equals('hi there" bob', json.decode(' "hi there\\" bob" ')); - Expect.equals('', json.decode(' "" ')); - - // Lists. - Expect.listEquals([], json.decode(' [] ')); - Expect.listEquals(["entry"], json.decode(' ["entry"] ')); - Expect.listEquals([true, false], json.decode(' [true, false] ')); - Expect.listEquals([1, 2, 3], json.decode(' [ 1 , 2 , 3 ] ')); - - // Maps. - Expect.mapEquals({}, json.decode(' {} ')); - Expect.mapEquals({"key": "value"}, json.decode(' {"key": "value" } ')); - Expect.mapEquals( - {"key1": 1, "key2": 2}, json.decode(' {"key1": 1, "key2": 2} ')); - Expect.mapEquals({"key1": 1}, json.decode(' { "key1" : 1 } ')); -} - -void testParseInvalid() { - void testString(String s) { - Expect.throwsFormatException(() => json.decode(s)); - } - - // Scalars - testString(""); - testString("-"); - testString("-."); - testString("3.a"); - testString("{ key: value }"); - testString("tru"); - testString("1E--6"); - testString("1E-+6"); - testString("1E+-6"); - testString("1E++6"); - testString("1E6.6"); - testString("1E-6.6"); - testString("1E+6.6"); - - // JavaScript number literals not valid in JSON. - testString('[01]'); - testString('[.1]'); - testString('[1.]'); - testString('[1.e1]'); - testString('[-.1]'); - testString('[-1.]'); - - // Plain invalid number literals. - testString('-'); - testString('--1'); - testString('-1e'); - testString('1e--1]'); - testString('1e+-1'); - testString('1e-+1'); - testString('1e++1'); - - // Lists - testString('[, ]'); - testString('["", ]'); - testString('["", "]'); - testString('["" ""]'); - - // Maps - testString('{"" ""}'); - testString('{"": "",}'); -} - -void testEscaping() { - Expect.stringEquals('""', json.encode('')); - Expect.stringEquals('"\\u0000"', json.encode('\u0000')); - Expect.stringEquals('"\\u0001"', json.encode('\u0001')); - Expect.stringEquals('"\\u0002"', json.encode('\u0002')); - Expect.stringEquals('"\\u0003"', json.encode('\u0003')); - Expect.stringEquals('"\\u0004"', json.encode('\u0004')); - Expect.stringEquals('"\\u0005"', json.encode('\u0005')); - Expect.stringEquals('"\\u0006"', json.encode('\u0006')); - Expect.stringEquals('"\\u0007"', json.encode('\u0007')); - Expect.stringEquals('"\\b"', json.encode('\u0008')); - Expect.stringEquals('"\\t"', json.encode('\u0009')); - Expect.stringEquals('"\\n"', json.encode('\u000a')); - Expect.stringEquals('"\\u000b"', json.encode('\u000b')); - Expect.stringEquals('"\\f"', json.encode('\u000c')); - Expect.stringEquals('"\\r"', json.encode('\u000d')); - Expect.stringEquals('"\\u000e"', json.encode('\u000e')); - Expect.stringEquals('"\\u000f"', json.encode('\u000f')); - Expect.stringEquals('"\\u0010"', json.encode('\u0010')); - Expect.stringEquals('"\\u0011"', json.encode('\u0011')); - Expect.stringEquals('"\\u0012"', json.encode('\u0012')); - Expect.stringEquals('"\\u0013"', json.encode('\u0013')); - Expect.stringEquals('"\\u0014"', json.encode('\u0014')); - Expect.stringEquals('"\\u0015"', json.encode('\u0015')); - Expect.stringEquals('"\\u0016"', json.encode('\u0016')); - Expect.stringEquals('"\\u0017"', json.encode('\u0017')); - Expect.stringEquals('"\\u0018"', json.encode('\u0018')); - Expect.stringEquals('"\\u0019"', json.encode('\u0019')); - Expect.stringEquals('"\\u001a"', json.encode('\u001a')); - Expect.stringEquals('"\\u001b"', json.encode('\u001b')); - Expect.stringEquals('"\\u001c"', json.encode('\u001c')); - Expect.stringEquals('"\\u001d"', json.encode('\u001d')); - Expect.stringEquals('"\\u001e"', json.encode('\u001e')); - Expect.stringEquals('"\\u001f"', json.encode('\u001f')); - Expect.stringEquals('"\\\""', json.encode('"')); - Expect.stringEquals('"\\\\"', json.encode('\\')); - Expect.stringEquals('"Got \\b, \\f, \\n, \\r, \\t, \\u0000, \\\\, and \\"."', - json.encode('Got \b, \f, \n, \r, \t, \u0000, \\, and ".')); - Expect.stringEquals('"Got \\b\\f\\n\\r\\t\\u0000\\\\\\"."', - json.encode('Got \b\f\n\r\t\u0000\\".')); -} diff --git a/tests/lib_2/convert/latin1_test.dart b/tests/lib_2/convert/latin1_test.dart deleted file mode 100644 index 4e1355d0581..00000000000 --- a/tests/lib_2/convert/latin1_test.dart +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; -import 'dart:convert'; - -var latin1Strings = ["pure ascii", "blåbærgrød", "\x00 edge cases \xff"]; - -var nonLatin1Strings = ["Edge case \u{100}", "Edge case super-BMP \u{10000}"]; - -void main() { - // Build longer versions of the example strings. - for (int i = 0, n = latin1Strings.length; i < n; i++) { - var string = latin1Strings[i]; - while (string.length < 1024) { - string += string; - } - latin1Strings.add(string); - } - for (int i = 0, n = nonLatin1Strings.length; i < n; i++) { - var string = nonLatin1Strings[i]; - while (string.length < 1024) { - string += string; - } - nonLatin1Strings.add(string); - } - testDirectConversions(); - testChunkedConversions(); -} - -void testDirectConversions() { - for (var codec in [latin1, new Latin1Codec()]) { - for (var latin1String in latin1Strings) { - List bytes = codec.encoder.convert(latin1String); - Expect.listEquals(latin1String.codeUnits.toList(), bytes, latin1String); - String roundTripString = codec.decoder.convert(bytes); - Expect.equals(latin1String, roundTripString); - roundTripString = codec.decode(bytes); - Expect.equals(latin1String, roundTripString); - } - - for (var nonLatin1String in nonLatin1Strings) { - Expect.throws(() { - print(codec.encoder.convert(nonLatin1String)); - }, null, nonLatin1String); - } - - var encode = codec.encoder.convert; - Expect.listEquals([0x42, 0xff, 0x44], encode("AB\xffDE", 1, 4)); - Expect.listEquals([0x42, 0xff, 0x44, 0x45], encode("AB\xffDE", 1)); - Expect.listEquals([0x42, 0xff, 0x44], encode("\u3000B\xffD\u3000", 1, 4)); - Expect.throws(() { - encode("\u3000B\xffD\u3000", 0, 4); - }); - Expect.throws(() { - encode("\u3000B\xffD\u3000", 1); - }); - Expect.throws(() { - encode("\u3000B\xffD\u3000", 1, 5); - }); - Expect.throws(() { - encode("\u3000B\xffD\u3000", -1, 4); - }); - Expect.throws(() { - encode("\u3000B\xffD\u3000", 1, -1); - }); - Expect.throws(() { - encode("\u3000B\xffD\u3000", 3, 2); - }); - - var decode = codec.decoder.convert; - Expect.equals("B\xffD", decode([0x41, 0x42, 0xff, 0x44, 0x45], 1, 4)); - Expect.equals("B\xffDE", decode([0x41, 0x42, 0xff, 0x44, 0x45], 1)); - Expect.equals("B\xffD", decode([0xFF, 0x42, 0xff, 0x44, 0xFF], 1, 4)); - Expect.throws(() { - decode([0x3000, 0x42, 0xff, 0x44, 0x3000], 0, 4); - }); - Expect.throws(() { - decode([0x3000, 0x42, 0xff, 0x44, 0x3000], 1); - }); - Expect.throws(() { - decode([0x3000, 0x42, 0xff, 0x44, 0x3000], 1, 5); - }); - Expect.throws(() { - decode([0x3000, 0x42, 0xff, 0x44, 0x3000], -1, 4); - }); - Expect.throws(() { - decode([0x3000, 0x42, 0xff, 0x44, 0x3000], 1, -1); - }); - Expect.throws(() { - decode([0x3000, 0x42, 0xff, 0x44, 0x3000], 3, 2); - }); - } - - var allowInvalidCodec = new Latin1Codec(allowInvalid: true); - var invalidBytes = [0, 1, 0xff, 0xdead, 0]; - String decoded = allowInvalidCodec.decode(invalidBytes); - Expect.equals("\x00\x01\xFF\uFFFD\x00", decoded); - decoded = allowInvalidCodec.decoder.convert(invalidBytes); - Expect.equals("\x00\x01\xFF\uFFFD\x00", decoded); - decoded = latin1.decode(invalidBytes, allowInvalid: true); - Expect.equals("\x00\x01\xFF\uFFFD\x00", decoded); -} - -List encode( - String str, int chunkSize, Converter> converter) { - List bytes = []; - var byteSink = new ByteConversionSink.withCallback(bytes.addAll); - var stringConversionSink = converter.startChunkedConversion(byteSink); - for (int i = 0; i < str.length; i += chunkSize) { - if (i + chunkSize <= str.length) { - stringConversionSink.add(str.substring(i, i + chunkSize)); - } else { - stringConversionSink.add(str.substring(i)); - } - } - stringConversionSink.close(); - return bytes; -} - -String decode( - List bytes, int chunkSize, Converter, String> converter) { - StringBuffer buf = new StringBuffer(); - var stringSink = new StringConversionSink.fromStringSink(buf); - var byteConversionSink = converter.startChunkedConversion(stringSink); - for (int i = 0; i < bytes.length; i += chunkSize) { - if (i + chunkSize <= bytes.length) { - byteConversionSink.add(bytes.sublist(i, i + chunkSize)); - } else { - byteConversionSink.add(bytes.sublist(i)); - } - } - byteConversionSink.close(); - return buf.toString(); -} - -void testChunkedConversions() { - // Check encoding. - for (var converter in [ - latin1.encoder, - new Latin1Codec().encoder, - new Latin1Encoder() - ]) { - for (int chunkSize in [1, 2, 5, 50]) { - for (var latin1String in latin1Strings) { - var units = latin1String.codeUnits.toList(); - List bytes = encode(latin1String, chunkSize, converter); - Expect.listEquals(units, bytes); - } - for (var nonLatin1String in nonLatin1Strings) { - Expect.throws(() { - encode(nonLatin1String, chunkSize, converter); - }); - } - } - } - // Check decoding. - for (var converter in [ - latin1.decoder, - new Latin1Codec().decoder, - new Latin1Decoder() - ]) { - for (int chunkSize in [1, 2, 5, 50]) { - for (var latin1String in latin1Strings) { - var units = latin1String.codeUnits.toList(); - Expect.equals(latin1String, decode(units, chunkSize, converter)); - } - for (var nonLatin1String in nonLatin1Strings) { - var units = nonLatin1String.codeUnits.toList(); - Expect.throws(() { - decode(units, chunkSize, converter); - }); - } - } - } -} diff --git a/tests/lib_2/convert/line_splitter_performance_test.dart b/tests/lib_2/convert/line_splitter_performance_test.dart deleted file mode 100644 index 836ddc08e3e..00000000000 --- a/tests/lib_2/convert/line_splitter_performance_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2023, 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 line_splitter_test; - -import 'dart:convert'; - -import "package:expect/expect.dart"; - -void main() { - testEfficency(); -} - -/// Regression test for https://dartbug.com/51167 -/// -/// Had quadratic time behavior when concatenating chunks without linebreaks. -/// -/// Should now only use linear time/space for buffering. -void testEfficency() { - // After fix: finishes in < 1 second on desktop. - // Before fix, with N = 100000, took 25 seconds. - const N = 1000000; - String result = ""; // Starts empty, set once. - var sink = LineSplitter() - .startChunkedConversion(ChunkedConversionSink.withCallback((lines) { - Expect.equals("", result); - Expect.equals(1, lines.length); - var line = lines.first; - Expect.notEquals("", line); - result = line; - })); - for (var i = 0; i < N; i++) { - sink.add("xy"); - } - sink.close(); - Expect.equals("xy" * N, result); -} diff --git a/tests/lib_2/convert/line_splitter_test.dart b/tests/lib_2/convert/line_splitter_test.dart deleted file mode 100644 index f5e1c633a2e..00000000000 --- a/tests/lib_2/convert/line_splitter_test.dart +++ /dev/null @@ -1,292 +0,0 @@ -// Copyright (c) 2013, 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 line_splitter_test; - -import 'dart:async'; -import 'dart:convert'; -import 'dart:math'; - -import "package:expect/expect.dart"; - -const lineTerminators = const ['\n', '\r', '\r\n']; - -void main() { - testSimpleConvert(); - testSplit(); - testSplitWithOffsets(); - testManyLines(); - testReadLine1(); - testReadLine2(); - testChunkedConversion(); - testCarry(); -} - -void testManyLines() { - int breakIndex = 0; - - var inputs = const ['line1', 'line2', 'long line 3', ' line 4 ', 'l5']; - - var buffer = inputs.fold(new StringBuffer(), (buff, e) { - buff.write(e); - buff.write(lineTerminators[breakIndex]); - - breakIndex++; - breakIndex = breakIndex % lineTerminators.length; - - return buff; - }); - - var foo = _getLinesSliced(buffer.toString()); - Expect.equals(inputs.join(), foo); -} - -String _getLinesSliced(String str) { - String lines; - var stringSink = - new StringConversionSink.withCallback((result) => lines = result); - var sink = new LineSplitter().startChunkedConversion(stringSink); - - const chunkSize = 3; - var index = 0; - while (index < str.length) { - var end = min(str.length, index + chunkSize); - - sink.addSlice(str, index, end, false); - index += chunkSize; - } - - sink.close(); - return lines; -} - -void testSimpleConvert() { - var decoder = new LineSplitter(); - for (var lf in lineTerminators) { - var test = "line1${lf}line2${lf}line3"; - - var result = decoder.convert(test); - - Expect.listEquals(['line1', 'line2', 'line3'], result); - } - - var test = "Line1\nLine2\r\nLine3\rLine4\n\n\n\r\n\r\n\r\r"; - var result = decoder.convert(test); - - Expect.listEquals( - ['Line1', 'Line2', 'Line3', 'Line4', '', '', '', '', '', ''], result); -} - -void testReadLine1() { - var controller = new StreamController>(sync: true); - var stream = - controller.stream.transform(utf8.decoder).transform(const LineSplitter()); - - var stage = 0; - var done = false; - - void stringData(line) { - Expect.equals(stage, 0); - Expect.equals("Line", line); - stage++; - } - - void streamClosed() { - Expect.equals(1, stage); - done = true; - } - - stream.listen(stringData, onDone: streamClosed); - - // Note: codeUnits is fine. Text is ASCII. - controller.add("Line".codeUnits); - controller.close(); - Expect.isTrue(done, 'should be done by now'); -} - -void testReadLine2() { - var controller = new StreamController>(sync: true); - - var stream = - controller.stream.transform(utf8.decoder).transform(const LineSplitter()); - - var expectedLines = [ - 'Line1', - 'Line2', - 'Line3', - 'Line4', - '', - '', - '', - '', - '', - '', - 'Line5', - 'Line6' - ]; - - var index = 0; - - stream.listen((line) { - Expect.equals(expectedLines[index++], line); - }); - - // Note: codeUnits is fine. Text is ASCII. - controller.add("Line1\nLine2\r\nLine3\rLi".codeUnits); - controller.add("ne4\n".codeUnits); - controller.add("\n\n\r\n\r\n\r\r".codeUnits); - controller.add("Line5\r".codeUnits); - controller.add("\nLine6\n".codeUnits); - controller.close(); - Expect.equals(expectedLines.length, index); -} - -void testSplit() { - for (var lf in lineTerminators) { - var test = "line1${lf}line2${lf}line3"; - var result = LineSplitter.split(test).toList(); - Expect.listEquals(['line1', 'line2', 'line3'], result); - } - - var test = "Line1\nLine2\r\nLine3\rLine4\n\n\n\r\n\r\n\r\r"; - var result = LineSplitter.split(test).toList(); - - Expect.listEquals( - ['Line1', 'Line2', 'Line3', 'Line4', '', '', '', '', '', ''], result); -} - -void testSplitWithOffsets() { - for (var lf in lineTerminators) { - var test = "line1${lf}line2${lf}line3"; - var i2 = 5 + lf.length; // index of "line2". - Expect.equals(5 + lf.length, i2); - - var result = LineSplitter.split(test, 4).toList(); - Expect.listEquals(['1', 'line2', 'line3'], result); - - result = LineSplitter.split(test, 5).toList(); - Expect.listEquals(['', 'line2', 'line3'], result); - - result = LineSplitter.split(test, i2).toList(); - Expect.listEquals(['line2', 'line3'], result); - - result = LineSplitter.split(test, 0, i2 + 2).toList(); - Expect.listEquals(['line1', 'li'], result); - - result = LineSplitter.split(test, i2, i2 + 5).toList(); - Expect.listEquals(['line2'], result); - } - - var test = "Line1\nLine2\r\nLine3\rLine4\n\n\n\r\n\r\n\r\r"; - - var result = LineSplitter.split(test).toList(); - - Expect.listEquals( - ['Line1', 'Line2', 'Line3', 'Line4', '', '', '', '', '', ''], result); - - test = "a\n\nb\r\nc\n\rd\r\re\r\n\nf\r\n"; - result = LineSplitter.split(test).toList(); - Expect.listEquals(["a", "", "b", "c", "", "d", "", "e", "", "f"], result); -} - -void testChunkedConversion() { - // Test any split of this complex string. - var test = "a\n\nb\r\nc\n\rd\r\re\r\n\nf\rg\nh\r\n"; - var result = ["a", "", "b", "c", "", "d", "", "e", "", "f", "g", "h"]; - for (int i = 0; i < test.length; i++) { - var output = []; - var splitter = new LineSplitter(); - var outSink = new ChunkedConversionSink.withCallback(output.addAll); - var sink = splitter.startChunkedConversion(outSink); - sink.addSlice(test, 0, i, false); - sink.addSlice(test, i, test.length, false); - sink.close(); - Expect.listEquals(result, output); - } - - // Test the string split into three parts in any way. - for (int i = 0; i < test.length; i++) { - for (int j = i; j < test.length; j++) { - var output = []; - var splitter = new LineSplitter(); - var outSink = - new ChunkedConversionSink.withCallback(output.addAll); - var sink = splitter.startChunkedConversion(outSink); - sink.addSlice(test, 0, i, false); - sink.addSlice(test, i, j, false); - sink.addSlice(test, j, test.length, true); - Expect.listEquals(result, output); - } - } -} - -void testCarry() { - // Test, when multiple chunks contribute to the same line, - // That the carry-over is combined correctly. - - // Test multiple chunks of carry, ending in linefeeds or not. - { - var output = []; - var splitter = new LineSplitter(); - var outSink = new ChunkedConversionSink.withCallback(output.addAll); - var sink = splitter.startChunkedConversion(outSink); - - sink.add("abcd"); - sink.add("fghi"); - sink.add("jklm"); - sink.add("nopq\r"); // Multiple chunks in carry, ends in \r. - sink.add("\nrstu"); // Followed by \n. - sink.close(); - - Expect.listEquals(["abcdfghijklmnopq", "rstu"], output); - } - - { - var output = []; - var splitter = new LineSplitter(); - var outSink = new ChunkedConversionSink.withCallback(output.addAll); - var sink = splitter.startChunkedConversion(outSink); - - sink.add("abcd"); - sink.add("fghi"); - sink.add("jklm"); - sink.add("nopq\r"); // Multiple chunks in carry, ends in \r. - sink.add("rstu"); // Not followed by \n. - sink.close(); - - Expect.listEquals(["abcdfghijklmnopq", "rstu"], output); - } - - { - var output = []; - var splitter = new LineSplitter(); - var outSink = new ChunkedConversionSink.withCallback(output.addAll); - var sink = splitter.startChunkedConversion(outSink); - - sink.add("abcd"); - sink.add("fghi"); - sink.add("jklm"); - sink.add("nopq\r"); // Multiple chunks in carry, ends in \r. - sink.close(); // Not followed by anything. - - Expect.listEquals(["abcdfghijklmnopq"], output); - } - - { - var output = []; - var splitter = new LineSplitter(); - var outSink = new ChunkedConversionSink.withCallback(output.addAll); - var sink = splitter.startChunkedConversion(outSink); - - sink.add("abcd"); - sink.add("fghi"); - sink.add("jklm"); - sink.add("nopq"); // Multiple chunks in carry, no linebreak. - sink.close(); - - Expect.listEquals(["abcdfghijklmnopq"], output); - } -} diff --git a/tests/lib_2/convert/streamed_conversion_json_decode1_test.dart b/tests/lib_2/convert/streamed_conversion_json_decode1_test.dart deleted file mode 100644 index 0647f441d05..00000000000 --- a/tests/lib_2/convert/streamed_conversion_json_decode1_test.dart +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:async'; -import 'dart:convert'; -import "package:async_helper/async_helper.dart"; - -final TESTS = [ - [5, '5'], - [-42, '-42'], - [3.14, '3.14'], - [true, 'true'], - [false, 'false'], - [null, 'null'], - ['quote"or\'', '"quote\\"or\'"'], - ['', '""'], - [[], "[]"], - [ - [3, -4.5, true, "hi", false], - '[3,-4.5,true,"hi",false]' - ], - [ - [null], - "[null]" - ], - [ - [ - [null] - ], - "[[null]]" - ], - [ - [ - [3] - ], - "[[3]]" - ], - [{}, "{}"], - [ - {"x": 3, "y": 4.5, "z": "hi", "u": true, "v": false}, - '{"x":3,"y":4.5,"z":"hi","u":true,"v":false}' - ], - [ - {"x": null}, - '{"x":null}' - ], - [ - {"x": {}}, - '{"x":{}}' - ], - // Note that -0.0 won't be treated the same in JS. The Json spec seems to - // allow it, though. - [ - {"hi there": 499, "'": -0.0}, - '{"hi there":499,"\'":-0.0}' - ], - [r'\foo', r'"\\foo"'], -]; - -bool isJsonEqual(o1, o2) { - if (o1 == o2) return true; - if (o1 is List && o2 is List) { - if (o1.length != o2.length) return false; - for (int i = 0; i < o1.length; i++) { - if (!isJsonEqual(o1[i], o2[i])) return false; - } - return true; - } - if (o1 is Map && o2 is Map) { - if (o1.length != o2.length) return false; - for (var key in o1.keys) { - Expect.isTrue(key is String); - if (!o2.containsKey(key)) return false; - if (!isJsonEqual(o1[key], o2[key])) return false; - } - return true; - } - return false; -} - -Stream createStream(List chunks) { - var decoder = new JsonDecoder(null); - var controller; - controller = new StreamController(onListen: () { - chunks.forEach(controller.add); - controller.close(); - }); - return controller.stream.transform(decoder); -} - -Stream decode(String str) { - return createStream([str]); -} - -Stream decode2(String str) { - return createStream(str.split("")); -} - -void checkIsJsonEqual(expected, stream) { - asyncStart(); - stream.single.then((o) { - Expect.isTrue(isJsonEqual(expected, o)); - asyncEnd(); - }); -} - -void main() { - var tests = TESTS.expand((test) { - var object = test[0]; - var string = test[1]; - var longString = " " - " " - "$string" - " " - " "; - return [ - test, - [object, longString] - ]; - }); - for (var test in tests) { - var o = test[0]; - var string = test[1]; - checkIsJsonEqual(o, decode(string)); - checkIsJsonEqual(o, decode2(string)); - } -} diff --git a/tests/lib_2/convert/streamed_conversion_json_encode1_test.dart b/tests/lib_2/convert/streamed_conversion_json_encode1_test.dart deleted file mode 100644 index 2aa76a7f2f9..00000000000 --- a/tests/lib_2/convert/streamed_conversion_json_encode1_test.dart +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:async'; -import 'dart:convert'; -import "package:async_helper/async_helper.dart"; - -final TESTS = [ - [5, '5'], - [-42, '-42'], - [3.14, '3.14'], - [true, 'true'], - [false, 'false'], - [null, 'null'], - ['quote"or\'', '"quote\\"or\'"'], - ['', '""'], - [[], "[]"], - [ - [3, -4.5, true, "hi", false], - '[3,-4.5,true,"hi",false]' - ], - [ - [null], - "[null]" - ], - [ - [ - [null] - ], - "[[null]]" - ], - [ - [ - [3] - ], - "[[3]]" - ], - [{}, "{}"], - [ - {"x": 3, "y": 4.5, "z": "hi", "u": true, "v": false}, - '{"x":3,"y":4.5,"z":"hi","u":true,"v":false}' - ], - [ - {"x": null}, - '{"x":null}' - ], - [ - {"x": {}}, - '{"x":{}}' - ], - // Note that -0.0 won't be treated the same in JS. The Json spec seems to - // allow it, though. - [ - {"hi there": 499, "'": -0.0}, - '{"hi there":499,"\'":-0.0}' - ], - [r'\foo', r'"\\foo"'], -]; - -Stream encode(Object o) { - var encoder = new JsonEncoder(); - StreamController controller; - controller = new StreamController(onListen: () { - controller.add(o); - controller.close(); - }); - return controller.stream.transform(encoder); -} - -void testNoPause(String expected, Object o) { - asyncStart(); - Stream stream = encode(o); - stream.toList().then((list) { - StringBuffer buffer = new StringBuffer(); - buffer.writeAll(list); - Expect.stringEquals(expected, buffer.toString()); - asyncEnd(); - }); -} - -void testWithPause(String expected, Object o) { - asyncStart(); - Stream stream = encode(o); - StringBuffer buffer = new StringBuffer(); - var sub; - sub = stream.listen((x) { - buffer.write(x); - sub.pause(new Future.delayed(Duration.zero)); - }, onDone: () { - Expect.stringEquals(expected, buffer.toString()); - asyncEnd(); - }); -} - -void main() { - for (var test in TESTS) { - var o = test[0]; - var expected = test[1]; - testNoPause(expected, o); - testWithPause(expected, o); - } -} diff --git a/tests/lib_2/convert/streamed_conversion_json_utf8_decode_test.dart b/tests/lib_2/convert/streamed_conversion_json_utf8_decode_test.dart deleted file mode 100644 index 19094bf247f..00000000000 --- a/tests/lib_2/convert/streamed_conversion_json_utf8_decode_test.dart +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) 2013, 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 - -// VMOptions= -// VMOptions=--verify_before_gc -// VMOptions=--verify_after_gc -// VMOptions=--verify_before_gc --verify_after_gc -// VMOptions=--verify_store_buffer -// VMOptions=--no_intrinsify - -import "package:expect/expect.dart"; -import 'dart:async'; -import 'dart:convert'; -import 'json_unicode_tests.dart'; -import "package:async_helper/async_helper.dart"; - -final jsonUtf8 = json.fuse>(utf8); - -void expectJsonEquals(o1, o2, [path = "result"]) { - if (o1 == o2) return; - if (o1 is List && o2 is List) { - Expect.equals(o1.length, o2.length, "$path.length"); - for (int i = 0; i < o1.length; i++) { - expectJsonEquals(o1[i], o2[i], "$path[$i]"); - } - return; - } - if (o1 is Map && o2 is Map) { - Expect.equals(o1.length, o2.length, "$path.length"); - for (var key in o1.keys) { - Expect.isTrue(key is String, "$path:key = $key"); - Expect.isTrue(o2.containsKey(key), "$path[$key] missing in $o2"); - expectJsonEquals(o1[key], o2[key], "$path[$key]"); - } - return; - } - Expect.equals(o1, o2); -} - -Stream createStream(List> chunks) { - var controller; - controller = new StreamController>(onListen: () { - chunks.forEach(controller.add); - controller.close(); - }); - return controller.stream.transform(jsonUtf8.decoder); -} - -Stream decode(List bytes) { - return createStream([bytes]); -} - -Stream decodeChunked(List bytes, int chunkSize) { - List> chunked = >[]; - int i = 0; - while (i < bytes.length) { - if (i + chunkSize <= bytes.length) { - chunked.add(bytes.sublist(i, i + chunkSize)); - } else { - chunked.add(bytes.sublist(i)); - } - i += chunkSize; - } - return createStream(chunked); -} - -void checkIsJsonEqual(expected, stream) { - asyncStart(); - stream.single.then((o) { - expectJsonEquals(expected, o); - asyncEnd(); - }); -} - -main() { - for (var test in JSON_UNICODE_TESTS) { - var bytes = test[0]; - var o = test[1]; - checkIsJsonEqual(o, decode(bytes)); - checkIsJsonEqual(o, decodeChunked(bytes, 1)); - checkIsJsonEqual(o, decodeChunked(bytes, 2)); - checkIsJsonEqual(o, decodeChunked(bytes, 3)); - checkIsJsonEqual(o, decodeChunked(bytes, 4)); - checkIsJsonEqual(o, decodeChunked(bytes, 5)); - } -} diff --git a/tests/lib_2/convert/streamed_conversion_json_utf8_encode_test.dart b/tests/lib_2/convert/streamed_conversion_json_utf8_encode_test.dart deleted file mode 100644 index d9d776dff01..00000000000 --- a/tests/lib_2/convert/streamed_conversion_json_utf8_encode_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:async'; -import 'dart:convert'; -import 'json_unicode_tests.dart'; -import "package:async_helper/async_helper.dart"; - -final jsonUtf8 = json.fuse>(utf8); - -Stream> encode(Object o) { - var controller; - controller = new StreamController(onListen: () { - controller.add(o); - controller.close(); - }); - return controller.stream.transform(jsonUtf8.encoder); -} - -void testUnpaused(List expected, Stream> stream) { - asyncStart(); - stream.toList().then((list) { - var combined = []; - list.forEach(combined.addAll); - Expect.listEquals(expected, combined); - asyncEnd(); - }); -} - -void testWithPauses(List expected, Stream> stream) { - asyncStart(); - var accumulated = []; - var sub; - sub = stream.listen((x) { - accumulated.addAll(x); - sub.pause(new Future.delayed(Duration.zero)); - }, onDone: () { - Expect.listEquals(expected, accumulated); - asyncEnd(); - }); -} - -void main() { - for (var test in JSON_UNICODE_TESTS) { - var expected = test[0]; - var object = test[1]; - testUnpaused(expected, encode(object)); - testWithPauses(expected, encode(object)); - } -} diff --git a/tests/lib_2/convert/streamed_conversion_utf8_decode_test.dart b/tests/lib_2/convert/streamed_conversion_utf8_decode_test.dart deleted file mode 100644 index 10424b7c555..00000000000 --- a/tests/lib_2/convert/streamed_conversion_utf8_decode_test.dart +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:async'; -import 'dart:convert'; -import 'unicode_tests.dart'; -import "package:async_helper/async_helper.dart"; - -Stream decode(List bytes, int chunkSize) { - var controller; - controller = new StreamController>(onListen: () { - int i = 0; - while (i < bytes.length) { - List nextChunk = []; - for (int j = 0; j < chunkSize; j++) { - if (i < bytes.length) { - nextChunk.add(bytes[i]); - i++; - } - } - controller.add(nextChunk); - } - controller.close(); - }); - return controller.stream.transform(utf8.decoder); -} - -testUnpaused(String expected, Stream stream) { - asyncStart(); - stream.toList().then((list) { - StringBuffer buffer = new StringBuffer(); - buffer.writeAll(list); - Expect.stringEquals(expected, buffer.toString()); - asyncEnd(); - }); -} - -testWithPauses(String expected, Stream stream) { - asyncStart(); - StringBuffer buffer = new StringBuffer(); - var sub; - sub = stream.listen((x) { - buffer.write(x); - sub.pause(new Future.delayed(Duration.zero)); - }, onDone: () { - Expect.stringEquals(expected, buffer.toString()); - asyncEnd(); - }); -} - -main() { - for (var test in UNICODE_TESTS) { - var bytes = test[0]; - var expected = test[1]; - testUnpaused(expected, decode(bytes, 1)); - testWithPauses(expected, decode(bytes, 1)); - testUnpaused(expected, decode(bytes, 2)); - testWithPauses(expected, decode(bytes, 2)); - testUnpaused(expected, decode(bytes, 3)); - testWithPauses(expected, decode(bytes, 3)); - testUnpaused(expected, decode(bytes, 4)); - testWithPauses(expected, decode(bytes, 4)); - } -} diff --git a/tests/lib_2/convert/streamed_conversion_utf8_encode_test.dart b/tests/lib_2/convert/streamed_conversion_utf8_encode_test.dart deleted file mode 100644 index d260db50e01..00000000000 --- a/tests/lib_2/convert/streamed_conversion_utf8_encode_test.dart +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:async'; -import 'dart:convert'; -import 'unicode_tests.dart'; -import "package:async_helper/async_helper.dart"; - -Stream> encode(String string, int chunkSize) { - var controller; - controller = new StreamController(onListen: () { - int i = 0; - while (i < string.length) { - if (i + chunkSize <= string.length) { - controller.add(string.substring(i, i + chunkSize)); - } else { - controller.add(string.substring(i)); - } - i += chunkSize; - } - controller.close(); - }); - return controller.stream.transform(utf8.encoder); -} - -void testUnpaused(List expected, Stream> stream) { - asyncStart(); - stream.toList().then((list) { - var combined = []; - // Flatten the list. - list.forEach(combined.addAll); - Expect.listEquals(expected, combined); - asyncEnd(); - }); -} - -void testWithPauses(List expected, Stream> stream) { - asyncStart(); - var combined = []; - var sub; - sub = stream.listen((x) { - combined.addAll(x); - sub.pause(new Future.delayed(Duration.zero)); - }, onDone: () { - Expect.listEquals(expected, combined); - asyncEnd(); - }); -} - -main() { - for (var test in UNICODE_TESTS) { - var expected = test[0]; - var string = test[1]; - testUnpaused(expected, encode(string, 1)); - testWithPauses(expected, encode(string, 1)); - testUnpaused(expected, encode(string, 2)); - testWithPauses(expected, encode(string, 2)); - } -} diff --git a/tests/lib_2/convert/unicode_tests.dart b/tests/lib_2/convert/unicode_tests.dart deleted file mode 100644 index 0c8090679c1..00000000000 --- a/tests/lib_2/convert/unicode_tests.dart +++ /dev/null @@ -1,245 +0,0 @@ -// Copyright (c) 2013, 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 unicode_tests; - -// Google favorite: "Îñţérñåţîöñåļîžåţîờñ". -const INTER_BYTES = const [ - 0xc3, - 0x8e, - 0xc3, - 0xb1, - 0xc5, - 0xa3, - 0xc3, - 0xa9, - 0x72, - 0xc3, - 0xb1, - 0xc3, - 0xa5, - 0xc5, - 0xa3, - 0xc3, - 0xae, - 0xc3, - 0xb6, - 0xc3, - 0xb1, - 0xc3, - 0xa5, - 0xc4, - 0xbc, - 0xc3, - 0xae, - 0xc5, - 0xbe, - 0xc3, - 0xa5, - 0xc5, - 0xa3, - 0xc3, - 0xae, - 0xe1, - 0xbb, - 0x9d, - 0xc3, - 0xb1 -]; -const INTER_STRING = "Îñţérñåţîöñåļîžåţîờñ"; - -// Blueberry porridge in Danish: "blåbærgrød". -const BLUEBERRY_BYTES = const [ - 0x62, - 0x6c, - 0xc3, - 0xa5, - 0x62, - 0xc3, - 0xa6, - 0x72, - 0x67, - 0x72, - 0xc3, - 0xb8, - 0x64 -]; -const BLUEBERRY_STRING = "blåbærgrød"; - -// "சிவா அணாமாைல", that is "Siva Annamalai" in Tamil. -const SIVA_BYTES1 = const [ - 0xe0, - 0xae, - 0x9a, - 0xe0, - 0xae, - 0xbf, - 0xe0, - 0xae, - 0xb5, - 0xe0, - 0xae, - 0xbe, - 0x20, - 0xe0, - 0xae, - 0x85, - 0xe0, - 0xae, - 0xa3, - 0xe0, - 0xae, - 0xbe, - 0xe0, - 0xae, - 0xae, - 0xe0, - 0xae, - 0xbe, - 0xe0, - 0xaf, - 0x88, - 0xe0, - 0xae, - 0xb2 -]; -const SIVA_STRING1 = "சிவா அணாமாைல"; - -// "िसवा अणामालै", that is "Siva Annamalai" in Devanagari. -const SIVA_BYTES2 = const [ - 0xe0, - 0xa4, - 0xbf, - 0xe0, - 0xa4, - 0xb8, - 0xe0, - 0xa4, - 0xb5, - 0xe0, - 0xa4, - 0xbe, - 0x20, - 0xe0, - 0xa4, - 0x85, - 0xe0, - 0xa4, - 0xa3, - 0xe0, - 0xa4, - 0xbe, - 0xe0, - 0xa4, - 0xae, - 0xe0, - 0xa4, - 0xbe, - 0xe0, - 0xa4, - 0xb2, - 0xe0, - 0xa5, - 0x88 -]; -const SIVA_STRING2 = "िसवा अणामालै"; - -// DESERET CAPITAL LETTER BEE, unicode 0x10412(0xD801+0xDC12) -// UTF-8: F0 90 90 92 -const BEE_BYTES = const [0xf0, 0x90, 0x90, 0x92]; -const BEE_STRING = "𐐒"; - -const DIGIT_BYTES = const [0x35]; -const DIGIT_STRING = "5"; - -const ASCII_BYTES = const [ - 0x61, - 0x62, - 0x63, - 0x64, - 0x65, - 0x66, - 0x67, - 0x68, - 0x69, - 0x6A, - 0x6B, - 0x6C, - 0x6D, - 0x6E, - 0x6F, - 0x70, - 0x71, - 0x72, - 0x73, - 0x74, - 0x75, - 0x76, - 0x77, - 0x78, - 0x79, - 0x7A -]; -const ASCII_STRING = "abcdefghijklmnopqrstuvwxyz"; - -const BIGGEST_ASCII_BYTES = const [0x7F]; -const BIGGEST_ASCII_STRING = "\x7F"; - -const SMALLEST_2_UTF8_UNIT_BYTES = const [0xC2, 0x80]; -const SMALLEST_2_UTF8_UNIT_STRING = "\u{80}"; - -const BIGGEST_2_UTF8_UNIT_BYTES = const [0xDF, 0xBF]; -const BIGGEST_2_UTF8_UNIT_STRING = "\u{7FF}"; - -const SMALLEST_3_UTF8_UNIT_BYTES = const [0xE0, 0xA0, 0x80]; -const SMALLEST_3_UTF8_UNIT_STRING = "\u{800}"; - -const BIGGEST_3_UTF8_UNIT_BYTES = const [0xEF, 0xBF, 0xBF]; -const BIGGEST_3_UTF8_UNIT_STRING = "\u{FFFF}"; - -const SMALLEST_4_UTF8_UNIT_BYTES = const [0xF0, 0x90, 0x80, 0x80]; -const SMALLEST_4_UTF8_UNIT_STRING = "\u{10000}"; - -const BIGGEST_4_UTF8_UNIT_BYTES = const [0xF4, 0x8F, 0xBF, 0xBF]; -const BIGGEST_4_UTF8_UNIT_STRING = "\u{10FFFF}"; - -const _TEST_PAIRS = const [ - const [const [], ""], - const [INTER_BYTES, INTER_STRING], - const [BLUEBERRY_BYTES, BLUEBERRY_STRING], - const [SIVA_BYTES1, SIVA_STRING1], - const [SIVA_BYTES2, SIVA_STRING2], - const [BEE_BYTES, BEE_STRING], - const [DIGIT_BYTES, DIGIT_STRING], - const [ASCII_BYTES, ASCII_STRING], - const [BIGGEST_ASCII_BYTES, BIGGEST_ASCII_STRING], - const [SMALLEST_2_UTF8_UNIT_BYTES, SMALLEST_2_UTF8_UNIT_STRING], - const [BIGGEST_2_UTF8_UNIT_BYTES, BIGGEST_2_UTF8_UNIT_STRING], - const [SMALLEST_3_UTF8_UNIT_BYTES, SMALLEST_3_UTF8_UNIT_STRING], - const [BIGGEST_3_UTF8_UNIT_BYTES, BIGGEST_3_UTF8_UNIT_STRING], - const [SMALLEST_4_UTF8_UNIT_BYTES, SMALLEST_4_UTF8_UNIT_STRING], - const [BIGGEST_4_UTF8_UNIT_BYTES, BIGGEST_4_UTF8_UNIT_STRING], -]; - -List _expandTestPairs() { - assert(2 == BEE_STRING.length); - var tests = []; - tests.addAll(_TEST_PAIRS); - tests.addAll(_TEST_PAIRS.map((test) { - var bytes = test[0]; - var string = test[1]; - var longBytes = []; - var longString = ""; - for (int i = 0; i < 100; i++) { - longBytes.addAll(bytes); - longString += string; - } - return [longBytes, longString]; - })); - return tests; -} - -final List UNICODE_TESTS = _expandTestPairs(); diff --git a/tests/lib_2/convert/utf82_test.dart b/tests/lib_2/convert/utf82_test.dart deleted file mode 100644 index 7aa483f9ad3..00000000000 --- a/tests/lib_2/convert/utf82_test.dart +++ /dev/null @@ -1,289 +0,0 @@ -// Copyright (c) 2012, 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 utf8_test; - -import "package:expect/expect.dart"; -import 'dart:convert'; -import 'dart:typed_data' show Uint8List; - -String decode(List bytes) => new Utf8Decoder().convert(bytes); -String decodeAllowMalformed(List bytes) { - return new Utf8Decoder(allowMalformed: true).convert(bytes); -} - -String decode2(List bytes) => utf8.decode(bytes); -String decodeAllowMalformed2(List bytes) { - return utf8.decode(bytes, allowMalformed: true); -} - -String decode3(List bytes) => new Utf8Codec().decode(bytes); -String decodeAllowMalformed3(List bytes) { - return new Utf8Codec(allowMalformed: true).decode(bytes); -} - -String decode4(List bytes) => new Utf8Codec().decoder.convert(bytes); -String decodeAllowMalformed4(List bytes) { - return new Utf8Codec(allowMalformed: true).decoder.convert(bytes); -} - -final TESTS0 = [ - // Unfinished UTF-8 sequences. - [0xc3], - [0xE2, 0x82], - [0xF0, 0xA4, 0xAD] -]; - -final TESTS1 = [ - // Overlong encoding of euro-sign. - [0xF0, 0x82, 0x82, 0xAC], - // Other overlong/unfinished sequences. - [0xC0], - [0xC1], - [0xF5], - [0xF6], - [0xF7], - [0xF8], - [0xF9], - [0xFA], - [0xFB], - [0xFC], - [0xFD], - [0xFE], - [0xFF], - [0xC0, 0x80], - [0xC1, 0x80], - // Outside valid range. - [0xF4, 0xBF, 0xBF, 0xBF], - // Negative - [-0x01], - [-0xFF], - [-0x80000000], - [-0x40000000], -]; - -final TESTS2 = [ - // Test that 0xC0|1, 0x80 does not eat the next character. - [ - [0xC0, 0x80, 0x61], - "XXa" - ], - [ - [0xC1, 0x80, 0x61], - "XXa" - ], - // 0xF5 .. 0xFF never appear in valid UTF-8 sequences. - [ - [0xF5, 0x80], - "XX" - ], - [ - [0xF6, 0x80], - "XX" - ], - [ - [0xF7, 0x80], - "XX" - ], - [ - [0xF8, 0x80], - "XX" - ], - [ - [0xF9, 0x80], - "XX" - ], - [ - [0xFA, 0x80], - "XX" - ], - [ - [0xFB, 0x80], - "XX" - ], - [ - [0xFC, 0x80], - "XX" - ], - [ - [0xFD, 0x80], - "XX" - ], - [ - [0xFE, 0x80], - "XX" - ], - [ - [0xFF, 0x80], - "XX" - ], - [ - [0xF5, 0x80, 0x61], - "XXa" - ], - [ - [0xF6, 0x80, 0x61], - "XXa" - ], - [ - [0xF7, 0x80, 0x61], - "XXa" - ], - [ - [0xF8, 0x80, 0x61], - "XXa" - ], - [ - [0xF9, 0x80, 0x61], - "XXa" - ], - [ - [0xFA, 0x80, 0x61], - "XXa" - ], - [ - [0xFB, 0x80, 0x61], - "XXa" - ], - [ - [0xFC, 0x80, 0x61], - "XXa" - ], - [ - [0xFD, 0x80, 0x61], - "XXa" - ], - [ - [0xFE, 0x80, 0x61], - "XXa" - ], - [ - [0xFF, 0x80, 0x61], - "XXa" - ], - // Characters outside the valid range. - [ - [0xF5, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xF6, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xF7, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xF8, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xF9, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFA, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFB, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFC, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFD, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFE, 0x80, 0x80, 0x61], - "XXXa" - ], - [ - [0xFF, 0x80, 0x80, 0x61], - "XXXa" - ] -]; - -main() { - var allTests = [...TESTS0, ...TESTS1].expand((test) { - // Pairs of test and expected string output when malformed strings are - // allowed. Replacement character: U+FFFD, one per unfinished sequence or - // undecodable byte. - String replacement = - TESTS0.contains(test) ? "\u{FFFD}" : "\u{FFFD}" * test.length; - return [ - [test, "${replacement}"], - [ - [0x61, ...test], - "a${replacement}" - ], - [ - [0x61, ...test, 0x61], - "a${replacement}a" - ], - [ - [...test, 0x61], - "${replacement}a" - ], - [ - [...test, ...test], - "${replacement}${replacement}" - ], - [ - [...test, 0x61, ...test], - "${replacement}a${replacement}" - ], - [ - [0xc3, 0xa5, ...test], - "å${replacement}" - ], - [ - [0xc3, 0xa5, ...test, 0xc3, 0xa5], - "å${replacement}å" - ], - [ - [...test, 0xc3, 0xa5], - "${replacement}å" - ], - [ - [...test, 0xc3, 0xa5, ...test], - "${replacement}å${replacement}" - ] - ]; - }); - - var allTests2 = TESTS2.map((test) { - // Pairs of test and expected string output when malformed strings are - // allowed. Replacement character: U+FFFD - String expected = (test[1] as String).replaceAll("X", "\u{FFFD}"); - return [test[0], expected]; - }); - - check(String expected, List bytes, String description) { - Expect.throwsFormatException(() => decode(bytes)); - Expect.throwsFormatException(() => decode2(bytes)); - Expect.throwsFormatException(() => decode3(bytes)); - Expect.throwsFormatException(() => decode4(bytes)); - - Expect.equals(expected, decodeAllowMalformed(bytes)); - Expect.equals(expected, decodeAllowMalformed2(bytes)); - Expect.equals(expected, decodeAllowMalformed3(bytes)); - Expect.equals(expected, decodeAllowMalformed4(bytes)); - } - - for (var test in []..addAll(allTests)..addAll(allTests2)) { - List bytes = test[0]; - String expected = test[1]; - check(expected, bytes, 'plain list'); - if (bytes.every((byte) => 0 <= byte && byte < 256)) { - check(expected, new Uint8List.fromList(bytes), 'Uint8List'); - } - } -} diff --git a/tests/lib_2/convert/utf83_test.dart b/tests/lib_2/convert/utf83_test.dart deleted file mode 100644 index 2a980c18527..00000000000 --- a/tests/lib_2/convert/utf83_test.dart +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2012, 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 utf8_test; - -import "package:expect/expect.dart"; -import 'dart:convert'; -import 'dart:typed_data' show Uint8List; - -/// [bytes] transforms the input into some representation (eg. plain list, -/// Uint8List). -test(List bytes(List input)) { - // Test that UTF8-decoder removes leading BOM. - Expect.equals("a", utf8.decode(bytes([0xEF, 0xBB, 0xBF, 0x61]))); - Expect.equals("a", utf8.decoder.convert(bytes([0xEF, 0xBB, 0xBF, 0x61]))); - Expect.equals( - "a", new Utf8Decoder().convert(bytes([0xEF, 0xBB, 0xBF, 0x61]))); - Expect.equals( - "a", utf8.decode(bytes([0xEF, 0xBB, 0xBF, 0x61]), allowMalformed: true)); - Expect.equals( - "a", - new Utf8Codec(allowMalformed: true) - .decode(bytes([0xEF, 0xBB, 0xBF, 0x61]))); - Expect.equals( - "a", - new Utf8Codec(allowMalformed: true) - .decoder - .convert(bytes([0xEF, 0xBB, 0xBF, 0x61]))); - Expect.equals( - "a", - new Utf8Decoder(allowMalformed: true) - .convert(bytes([0xEF, 0xBB, 0xBF, 0x61]))); - Expect.equals("", utf8.decode(bytes([0xEF, 0xBB, 0xBF]))); - Expect.equals("", utf8.decoder.convert(bytes([0xEF, 0xBB, 0xBF]))); - Expect.equals("", new Utf8Decoder().convert(bytes([0xEF, 0xBB, 0xBF]))); - Expect.equals( - "", utf8.decode(bytes([0xEF, 0xBB, 0xBF]), allowMalformed: true)); - Expect.equals("", - new Utf8Codec(allowMalformed: true).decode(bytes([0xEF, 0xBB, 0xBF]))); - Expect.equals( - "", - new Utf8Codec(allowMalformed: true) - .decoder - .convert(bytes([0xEF, 0xBB, 0xBF]))); - Expect.equals("", - new Utf8Decoder(allowMalformed: true).convert(bytes([0xEF, 0xBB, 0xBF]))); - Expect.equals("a\u{FEFF}", utf8.decode(bytes([0x61, 0xEF, 0xBB, 0xBF]))); - Expect.equals( - "a\u{FEFF}", utf8.decoder.convert(bytes([0x61, 0xEF, 0xBB, 0xBF]))); - Expect.equals( - "a\u{FEFF}", new Utf8Decoder().convert(bytes([0x61, 0xEF, 0xBB, 0xBF]))); - Expect.equals("a\u{FEFF}", - utf8.decode(bytes([0x61, 0xEF, 0xBB, 0xBF]), allowMalformed: true)); - Expect.equals( - "a\u{FEFF}", - new Utf8Codec(allowMalformed: true) - .decode(bytes([0x61, 0xEF, 0xBB, 0xBF]))); - Expect.equals( - "a\u{FEFF}", - new Utf8Codec(allowMalformed: true) - .decoder - .convert(bytes([0x61, 0xEF, 0xBB, 0xBF]))); - Expect.equals( - "a\u{FEFF}", - new Utf8Decoder(allowMalformed: true) - .convert(bytes([0x61, 0xEF, 0xBB, 0xBF]))); -} - -main() { - test((list) => list); - test((list) => new Uint8List.fromList(list)); -} diff --git a/tests/lib_2/convert/utf84_test.dart b/tests/lib_2/convert/utf84_test.dart deleted file mode 100755 index 639504a4b4b..00000000000 --- a/tests/lib_2/convert/utf84_test.dart +++ /dev/null @@ -1,1048 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'package:expect/expect.dart'; -import 'dart:convert'; -import 'dart:typed_data' show Uint8List; - -const String testEnglishPhrase = "The quick brown fox jumps over the lazy dog."; - -const List testEnglishUtf8 = const [ - 0x54, - 0x68, - 0x65, - 0x20, - 0x71, - 0x75, - 0x69, - 0x63, - 0x6b, - 0x20, - 0x62, - 0x72, - 0x6f, - 0x77, - 0x6e, - 0x20, - 0x66, - 0x6f, - 0x78, - 0x20, - 0x6a, - 0x75, - 0x6d, - 0x70, - 0x73, - 0x20, - 0x6f, - 0x76, - 0x65, - 0x72, - 0x20, - 0x74, - 0x68, - 0x65, - 0x20, - 0x6c, - 0x61, - 0x7a, - 0x79, - 0x20, - 0x64, - 0x6f, - 0x67, - 0x2e -]; - -const String testDanishPhrase = "Quizdeltagerne spiste jordbær med " - "fløde mens cirkusklovnen Wolther spillede på xylofon."; - -const List testDanishUtf8 = const [ - 0x51, - 0x75, - 0x69, - 0x7a, - 0x64, - 0x65, - 0x6c, - 0x74, - 0x61, - 0x67, - 0x65, - 0x72, - 0x6e, - 0x65, - 0x20, - 0x73, - 0x70, - 0x69, - 0x73, - 0x74, - 0x65, - 0x20, - 0x6a, - 0x6f, - 0x72, - 0x64, - 0x62, - 0xc3, - 0xa6, - 0x72, - 0x20, - 0x6d, - 0x65, - 0x64, - 0x20, - 0x66, - 0x6c, - 0xc3, - 0xb8, - 0x64, - 0x65, - 0x20, - 0x6d, - 0x65, - 0x6e, - 0x73, - 0x20, - 0x63, - 0x69, - 0x72, - 0x6b, - 0x75, - 0x73, - 0x6b, - 0x6c, - 0x6f, - 0x76, - 0x6e, - 0x65, - 0x6e, - 0x20, - 0x57, - 0x6f, - 0x6c, - 0x74, - 0x68, - 0x65, - 0x72, - 0x20, - 0x73, - 0x70, - 0x69, - 0x6c, - 0x6c, - 0x65, - 0x64, - 0x65, - 0x20, - 0x70, - 0xc3, - 0xa5, - 0x20, - 0x78, - 0x79, - 0x6c, - 0x6f, - 0x66, - 0x6f, - 0x6e, - 0x2e -]; - -// unusual formatting due to strange editor interaction w/ text direction. -const String testHebrewPhrase = - "דג סקרן שט בים מאוכזב ולפתע מצא לו חברה איך הקליטה"; - -const List testHebrewUtf8 = const [ - 0xd7, - 0x93, - 0xd7, - 0x92, - 0x20, - 0xd7, - 0xa1, - 0xd7, - 0xa7, - 0xd7, - 0xa8, - 0xd7, - 0x9f, - 0x20, - 0xd7, - 0xa9, - 0xd7, - 0x98, - 0x20, - 0xd7, - 0x91, - 0xd7, - 0x99, - 0xd7, - 0x9d, - 0x20, - 0xd7, - 0x9e, - 0xd7, - 0x90, - 0xd7, - 0x95, - 0xd7, - 0x9b, - 0xd7, - 0x96, - 0xd7, - 0x91, - 0x20, - 0xd7, - 0x95, - 0xd7, - 0x9c, - 0xd7, - 0xa4, - 0xd7, - 0xaa, - 0xd7, - 0xa2, - 0x20, - 0xd7, - 0x9e, - 0xd7, - 0xa6, - 0xd7, - 0x90, - 0x20, - 0xd7, - 0x9c, - 0xd7, - 0x95, - 0x20, - 0xd7, - 0x97, - 0xd7, - 0x91, - 0xd7, - 0xa8, - 0xd7, - 0x94, - 0x20, - 0xd7, - 0x90, - 0xd7, - 0x99, - 0xd7, - 0x9a, - 0x20, - 0xd7, - 0x94, - 0xd7, - 0xa7, - 0xd7, - 0x9c, - 0xd7, - 0x99, - 0xd7, - 0x98, - 0xd7, - 0x94 -]; - -const String testRussianPhrase = "Съешь же ещё этих мягких " - "французских булок да выпей чаю"; - -const List testRussianUtf8 = const [ - 0xd0, - 0xa1, - 0xd1, - 0x8a, - 0xd0, - 0xb5, - 0xd1, - 0x88, - 0xd1, - 0x8c, - 0x20, - 0xd0, - 0xb6, - 0xd0, - 0xb5, - 0x20, - 0xd0, - 0xb5, - 0xd1, - 0x89, - 0xd1, - 0x91, - 0x20, - 0xd1, - 0x8d, - 0xd1, - 0x82, - 0xd0, - 0xb8, - 0xd1, - 0x85, - 0x20, - 0xd0, - 0xbc, - 0xd1, - 0x8f, - 0xd0, - 0xb3, - 0xd0, - 0xba, - 0xd0, - 0xb8, - 0xd1, - 0x85, - 0x20, - 0xd1, - 0x84, - 0xd1, - 0x80, - 0xd0, - 0xb0, - 0xd0, - 0xbd, - 0xd1, - 0x86, - 0xd1, - 0x83, - 0xd0, - 0xb7, - 0xd1, - 0x81, - 0xd0, - 0xba, - 0xd0, - 0xb8, - 0xd1, - 0x85, - 0x20, - 0xd0, - 0xb1, - 0xd1, - 0x83, - 0xd0, - 0xbb, - 0xd0, - 0xbe, - 0xd0, - 0xba, - 0x20, - 0xd0, - 0xb4, - 0xd0, - 0xb0, - 0x20, - 0xd0, - 0xb2, - 0xd1, - 0x8b, - 0xd0, - 0xbf, - 0xd0, - 0xb5, - 0xd0, - 0xb9, - 0x20, - 0xd1, - 0x87, - 0xd0, - 0xb0, - 0xd1, - 0x8e -]; - -const String testGreekPhrase = "Γαζέες καὶ μυρτιὲς δὲν θὰ βρῶ πιὰ " - "στὸ χρυσαφὶ ξέφωτο"; - -const List testGreekUtf8 = const [ - 0xce, - 0x93, - 0xce, - 0xb1, - 0xce, - 0xb6, - 0xce, - 0xad, - 0xce, - 0xb5, - 0xcf, - 0x82, - 0x20, - 0xce, - 0xba, - 0xce, - 0xb1, - 0xe1, - 0xbd, - 0xb6, - 0x20, - 0xce, - 0xbc, - 0xcf, - 0x85, - 0xcf, - 0x81, - 0xcf, - 0x84, - 0xce, - 0xb9, - 0xe1, - 0xbd, - 0xb2, - 0xcf, - 0x82, - 0x20, - 0xce, - 0xb4, - 0xe1, - 0xbd, - 0xb2, - 0xce, - 0xbd, - 0x20, - 0xce, - 0xb8, - 0xe1, - 0xbd, - 0xb0, - 0x20, - 0xce, - 0xb2, - 0xcf, - 0x81, - 0xe1, - 0xbf, - 0xb6, - 0x20, - 0xcf, - 0x80, - 0xce, - 0xb9, - 0xe1, - 0xbd, - 0xb0, - 0x20, - 0xcf, - 0x83, - 0xcf, - 0x84, - 0xe1, - 0xbd, - 0xb8, - 0x20, - 0xcf, - 0x87, - 0xcf, - 0x81, - 0xcf, - 0x85, - 0xcf, - 0x83, - 0xce, - 0xb1, - 0xcf, - 0x86, - 0xe1, - 0xbd, - 0xb6, - 0x20, - 0xce, - 0xbe, - 0xce, - 0xad, - 0xcf, - 0x86, - 0xcf, - 0x89, - 0xcf, - 0x84, - 0xce, - 0xbf -]; - -const String testKatakanaPhrase = "イロハニホヘト チリヌルヲ ワカヨタレソ " - "ツネナラム ウヰノオクヤマ ケフコエテ アサキユメミシ ヱヒモセスン"; - -const List testKatakanaUtf8 = const [ - 0xe3, - 0x82, - 0xa4, - 0xe3, - 0x83, - 0xad, - 0xe3, - 0x83, - 0x8f, - 0xe3, - 0x83, - 0x8b, - 0xe3, - 0x83, - 0x9b, - 0xe3, - 0x83, - 0x98, - 0xe3, - 0x83, - 0x88, - 0x20, - 0xe3, - 0x83, - 0x81, - 0xe3, - 0x83, - 0xaa, - 0xe3, - 0x83, - 0x8c, - 0xe3, - 0x83, - 0xab, - 0xe3, - 0x83, - 0xb2, - 0x20, - 0xe3, - 0x83, - 0xaf, - 0xe3, - 0x82, - 0xab, - 0xe3, - 0x83, - 0xa8, - 0xe3, - 0x82, - 0xbf, - 0xe3, - 0x83, - 0xac, - 0xe3, - 0x82, - 0xbd, - 0x20, - 0xe3, - 0x83, - 0x84, - 0xe3, - 0x83, - 0x8d, - 0xe3, - 0x83, - 0x8a, - 0xe3, - 0x83, - 0xa9, - 0xe3, - 0x83, - 0xa0, - 0x20, - 0xe3, - 0x82, - 0xa6, - 0xe3, - 0x83, - 0xb0, - 0xe3, - 0x83, - 0x8e, - 0xe3, - 0x82, - 0xaa, - 0xe3, - 0x82, - 0xaf, - 0xe3, - 0x83, - 0xa4, - 0xe3, - 0x83, - 0x9e, - 0x20, - 0xe3, - 0x82, - 0xb1, - 0xe3, - 0x83, - 0x95, - 0xe3, - 0x82, - 0xb3, - 0xe3, - 0x82, - 0xa8, - 0xe3, - 0x83, - 0x86, - 0x20, - 0xe3, - 0x82, - 0xa2, - 0xe3, - 0x82, - 0xb5, - 0xe3, - 0x82, - 0xad, - 0xe3, - 0x83, - 0xa6, - 0xe3, - 0x83, - 0xa1, - 0xe3, - 0x83, - 0x9f, - 0xe3, - 0x82, - 0xb7, - 0x20, - 0xe3, - 0x83, - 0xb1, - 0xe3, - 0x83, - 0x92, - 0xe3, - 0x83, - 0xa2, - 0xe3, - 0x82, - 0xbb, - 0xe3, - 0x82, - 0xb9, - 0xe3, - 0x83, - 0xb3 -]; - -void main() { - testEncodeToUtf8(); - - String decodeUtf8List(List codeUnits) => utf8.decode(codeUnits); - String decodeUtf8Uint8List(List codeUnits) => - utf8.decode(new Uint8List.fromList(codeUnits)); - - testUtf8BytesToString(decodeUtf8List); - testUtf8BytesToString(decodeUtf8Uint8List); - - List utf8ToRunes1(List codeUnits) { - return utf8.decode(codeUnits, allowMalformed: true).runes.toList(); - } - - List utf8ToRunes2(List codeUnits) { - return utf8 - .decode(new Uint8List.fromList(codeUnits), allowMalformed: true) - .runes - .toList(); - } - - testUtf8bytesToCodepoints(utf8ToRunes1); - testUtf8bytesToCodepoints(utf8ToRunes2); -} - -void testEncodeToUtf8() { - List encodeUtf8(String str) => utf8.encode(str); - - Expect.listEquals( - testEnglishUtf8, encodeUtf8(testEnglishPhrase), "english to utf8"); - - Expect.listEquals( - testDanishUtf8, encodeUtf8(testDanishPhrase), "encode danish to utf8"); - - Expect.listEquals( - testHebrewUtf8, encodeUtf8(testHebrewPhrase), "Hebrew to utf8"); - - Expect.listEquals( - testRussianUtf8, encodeUtf8(testRussianPhrase), "Russian to utf8"); - - Expect.listEquals( - testGreekUtf8, encodeUtf8(testGreekPhrase), "Greek to utf8"); - - Expect.listEquals( - testKatakanaUtf8, encodeUtf8(testKatakanaPhrase), "Katakana to utf8"); -} - -void testUtf8bytesToCodepoints(List utf8ToRunes(List utf8)) { - Expect.listEquals( - [954, 972, 963, 956, 949], - utf8ToRunes([0xce, 0xba, 0xcf, 0x8c, 0xcf, 0x83, 0xce, 0xbc, 0xce, 0xb5]), - "κόσμε"); - - // boundary conditions: First possible sequence of a certain length - Expect.listEquals([], utf8ToRunes([]), "no input"); - Expect.listEquals([0x0], utf8ToRunes([0x0]), "0"); - Expect.listEquals([0x80], utf8ToRunes([0xc2, 0x80]), "80"); - Expect.listEquals([0x800], utf8ToRunes([0xe0, 0xa0, 0x80]), "800"); - Expect.listEquals([0x10000], utf8ToRunes([0xf0, 0x90, 0x80, 0x80]), "10000"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xf8, 0x88, 0x80, 0x80, 0x80]), "200000"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xfc, 0x84, 0x80, 0x80, 0x80, 0x80]), "4000000"); - - // boundary conditions: Last possible sequence of a certain length - Expect.listEquals([0x7f], utf8ToRunes([0x7f]), "7f"); - Expect.listEquals([0x7ff], utf8ToRunes([0xdf, 0xbf]), "7ff"); - Expect.listEquals([0xffff], utf8ToRunes([0xef, 0xbf, 0xbf]), "ffff"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xf7, 0xbf, 0xbf, 0xbf]), "1fffff"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xfb, 0xbf, 0xbf, 0xbf, 0xbf]), "3ffffff"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xfd, 0xbf, 0xbf, 0xbf, 0xbf, 0xbf]), "4000000"); - - // other boundary conditions - Expect.listEquals([0xd7ff], utf8ToRunes([0xed, 0x9f, 0xbf]), "d7ff"); - Expect.listEquals([0xe000], utf8ToRunes([0xee, 0x80, 0x80]), "e000"); - Expect.listEquals([unicodeReplacementCharacterRune], - utf8ToRunes([0xef, 0xbf, 0xbd]), "fffd"); - Expect.listEquals( - [0x10ffff], utf8ToRunes([0xf4, 0x8f, 0xbf, 0xbf]), "10ffff"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xf4, 0x90, 0x80, 0x80]), "110000"); - - // unexpected continuation bytes - Expect.listEquals([unicodeReplacementCharacterRune], utf8ToRunes([0x80]), - "80 => replacement character"); - Expect.listEquals([unicodeReplacementCharacterRune], utf8ToRunes([0xbf]), - "bf => replacement character"); - - List allContinuationBytes = []; - List matchingReplacementChars = []; - for (int i = 0x80; i < 0xc0; i++) { - allContinuationBytes.add(i); - matchingReplacementChars.add(unicodeReplacementCharacterRune); - } - Expect.listEquals(matchingReplacementChars, utf8ToRunes(allContinuationBytes), - "80 - bf => replacement character x 64"); - - List allFirstTwoByteSeq = []; - matchingReplacementChars = []; - for (int i = 0xc0; i < 0xe0; i++) { - allFirstTwoByteSeq.addAll([i, 0x20]); - matchingReplacementChars.addAll([unicodeReplacementCharacterRune, 0x20]); - } - Expect.listEquals(matchingReplacementChars, utf8ToRunes(allFirstTwoByteSeq), - "c0 - df + space => replacement character + space x 32"); - - List allFirstThreeByteSeq = []; - matchingReplacementChars = []; - for (int i = 0xe0; i < 0xf0; i++) { - allFirstThreeByteSeq.addAll([i, 0x20]); - matchingReplacementChars.addAll([unicodeReplacementCharacterRune, 0x20]); - } - Expect.listEquals(matchingReplacementChars, utf8ToRunes(allFirstThreeByteSeq), - "e0 - ef + space => replacement character x 16"); - - List allFirstFourByteSeq = []; - matchingReplacementChars = []; - for (int i = 0xf0; i < 0xf8; i++) { - allFirstFourByteSeq.addAll([i, 0x20]); - matchingReplacementChars.addAll([unicodeReplacementCharacterRune, 0x20]); - } - Expect.listEquals(matchingReplacementChars, utf8ToRunes(allFirstFourByteSeq), - "f0 - f7 + space => replacement character x 8"); - - List allFirstFiveByteSeq = []; - matchingReplacementChars = []; - for (int i = 0xf8; i < 0xfc; i++) { - allFirstFiveByteSeq.addAll([i, 0x20]); - matchingReplacementChars.addAll([unicodeReplacementCharacterRune, 0x20]); - } - Expect.listEquals(matchingReplacementChars, utf8ToRunes(allFirstFiveByteSeq), - "f8 - fb + space => replacement character x 4"); - - List allFirstSixByteSeq = []; - matchingReplacementChars = []; - for (int i = 0xfc; i < 0xfe; i++) { - allFirstSixByteSeq.addAll([i, 0x20]); - matchingReplacementChars.addAll([unicodeReplacementCharacterRune, 0x20]); - } - Expect.listEquals(matchingReplacementChars, utf8ToRunes(allFirstSixByteSeq), - "fc - fd + space => replacement character x 2"); - - // Sequences with last continuation byte missing - Expect.listEquals([unicodeReplacementCharacterRune], utf8ToRunes([0xc2]), - "2-byte sequence with last byte missing"); - Expect.listEquals( - [unicodeReplacementCharacterRune, unicodeReplacementCharacterRune], - utf8ToRunes([0xe0, 0x80]), - "3-byte sequence with last byte missing"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xf0, 0x80, 0x80]), "4-byte sequence with last byte missing"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xf8, 0x88, 0x80, 0x80]), - "5-byte sequence with last byte missing"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xfc, 0x80, 0x80, 0x80, 0x80]), - "6-byte sequence with last byte missing"); - - Expect.listEquals([unicodeReplacementCharacterRune], utf8ToRunes([0xdf]), - "2-byte sequence with last byte missing (hi)"); - Expect.listEquals([unicodeReplacementCharacterRune], - utf8ToRunes([0xef, 0xbf]), "3-byte sequence with last byte missing (hi)"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xf7, 0xbf, 0xbf]), - "4-byte sequence with last byte missing (hi)"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xfb, 0xbf, 0xbf, 0xbf]), - "5-byte sequence with last byte missing (hi)"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xfd, 0xbf, 0xbf, 0xbf, 0xbf]), - "6-byte sequence with last byte missing (hi)"); - - // Concatenation of incomplete sequences - Expect.listEquals( - [ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], - utf8ToRunes([ - 0xc2, - 0xe0, - 0x80, - 0xf0, - 0x80, - 0x80, - 0xf8, - 0x88, - 0x80, - 0x80, - 0xfc, - 0x80, - 0x80, - 0x80, - 0x80, - 0xdf, - 0xef, // These two bytes form one incomplete sequence. - 0xbf, // All others form one per byte. - 0xf7, - 0xbf, - 0xbf, - 0xfb, - 0xbf, - 0xbf, - 0xbf, - 0xfd, - 0xbf, - 0xbf, - 0xbf, - 0xbf - ]), - "Concatenation of incomplete sequences"); - - // Impossible bytes - Expect.listEquals( - [unicodeReplacementCharacterRune], utf8ToRunes([0xfe]), "fe"); - Expect.listEquals( - [unicodeReplacementCharacterRune], utf8ToRunes([0xff]), "ff"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xfe, 0xfe, 0xff, 0xff]), "fe fe ff ff"); - - // Overlong sequences - Expect.listEquals( - [unicodeReplacementCharacterRune, unicodeReplacementCharacterRune], - utf8ToRunes([0xc0, 0xaf]), - "c0 af"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xe0, 0x80, 0xaf]), "e0 80 af"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xf0, 0x80, 0x80, 0xaf]), "f0 80 80 af"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xf8, 0x80, 0x80, 0x80, 0xaf]), "f8 80 80 80 af"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xfc, 0x80, 0x80, 0x80, 0x80, 0xaf]), "fc 80 80 80 80 af"); - - Expect.listEquals( - [unicodeReplacementCharacterRune, unicodeReplacementCharacterRune], - utf8ToRunes([0xc1, 0xbf]), - "c1 bf"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xe0, 0x9f, 0xbf]), "e0 9f bf"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xf0, 0x8f, 0xbf, 0xbf]), "f0 8f bf bf"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xf8, 0x87, 0xbf, 0xbf, 0xbf]), "f8 87 bf bf bf"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xfc, 0x83, 0xbf, 0xbf, 0xbf, 0xbf]), "fc 83 bf bf bf bf"); - - Expect.listEquals( - [unicodeReplacementCharacterRune, unicodeReplacementCharacterRune], - utf8ToRunes([0xc0, 0x80]), - "c0 80"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xe0, 0x80, 0x80]), "e0 80 80"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xf0, 0x80, 0x80, 0x80]), "f0 80 80 80"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xf8, 0x80, 0x80, 0x80, 0x80]), "f8 80 80 80 80"); - Expect.listEquals([ - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune, - unicodeReplacementCharacterRune - ], utf8ToRunes([0xfc, 0x80, 0x80, 0x80, 0x80, 0x80]), "fc 80 80 80 80 80"); - - // Other illegal code positions (???) - Expect.listEquals([0xfffe], utf8ToRunes([0xef, 0xbf, 0xbe]), "U+FFFE"); - Expect.listEquals([0xffff], utf8ToRunes([0xef, 0xbf, 0xbf]), "U+FFFF"); -} - -void testUtf8BytesToString(String decodeUtf8(List input)) { - Expect.stringEquals( - testEnglishPhrase, decodeUtf8(testEnglishUtf8), "English"); - - Expect.stringEquals(testDanishPhrase, decodeUtf8(testDanishUtf8), "Danish"); - - Expect.stringEquals(testHebrewPhrase, decodeUtf8(testHebrewUtf8), "Hebrew"); - - Expect.stringEquals( - testRussianPhrase, decodeUtf8(testRussianUtf8), "Russian"); - - Expect.stringEquals(testGreekPhrase, decodeUtf8(testGreekUtf8), "Greek"); - - Expect.stringEquals( - testKatakanaPhrase, decodeUtf8(testKatakanaUtf8), "Katakana"); -} diff --git a/tests/lib_2/convert/utf85_test.dart b/tests/lib_2/convert/utf85_test.dart deleted file mode 100644 index 75e05e1c4f0..00000000000 --- a/tests/lib_2/convert/utf85_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2012, 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 utf8_test; - -import "package:expect/expect.dart"; -import 'dart:convert'; - -main() { - for (int i = 0; i <= 0x10FFFF; i++) { - if (i == unicodeBomCharacterRune || (i & 0x1FF800) == 0xD800) continue; - Expect.equals( - i, utf8.decode(utf8.encode(new String.fromCharCode(i))).runes.first); - } -} diff --git a/tests/lib_2/convert/utf8_encode_test.dart b/tests/lib_2/convert/utf8_encode_test.dart deleted file mode 100644 index 66ee3774f60..00000000000 --- a/tests/lib_2/convert/utf8_encode_test.dart +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2013, 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 - -import "package:expect/expect.dart"; -import 'dart:convert'; -import 'unicode_tests.dart'; - -List encode(String str) => new Utf8Encoder().convert(str); -List encode2(String str) => utf8.encode(str); - -void main() { - for (var test in UNICODE_TESTS) { - List bytes = test[0]; - String string = test[1]; - Expect.listEquals(bytes, encode(string)); - Expect.listEquals(bytes, encode2(string)); - } - - testEncodeSlice(); -} - -void testEncodeSlice() { - var encoder = utf8.encoder; - String ascii = "ABCDE"; - Expect.listEquals([0x41, 0x42, 0x43, 0x44, 0x45], encoder.convert(ascii)); - Expect.listEquals([0x41, 0x42, 0x43, 0x44, 0x45], encoder.convert(ascii, 0)); - Expect.listEquals( - [0x41, 0x42, 0x43, 0x44, 0x45], encoder.convert(ascii, 0, 5)); - Expect.listEquals([0x42, 0x43, 0x44, 0x45], encoder.convert(ascii, 1)); - Expect.listEquals([0x41, 0x42, 0x43, 0x44], encoder.convert(ascii, 0, 4)); - Expect.listEquals([0x42, 0x43, 0x44], encoder.convert(ascii, 1, 4)); - - Expect.throws(() => encoder.convert(ascii, -1)); // start < 0. - Expect.throws(() => encoder.convert(ascii, 6)); // start > length - Expect.throws(() => encoder.convert(ascii, 0, -1)); // end < 0 - Expect.throws(() => encoder.convert(ascii, 0, 6)); // end > length - Expect.throws(() => encoder.convert(ascii, 3, 2)); // end < start - - var unicode = "\u0081\u0082\u1041\u{10101}"; - - Expect.listEquals( - [0xc2, 0x81, 0xc2, 0x82, 0xe1, 0x81, 0x81, 0xf0, 0x90, 0x84, 0x81], - encoder.convert(unicode)); - Expect.listEquals( - [0xc2, 0x81, 0xc2, 0x82, 0xe1, 0x81, 0x81, 0xf0, 0x90, 0x84, 0x81], - encoder.convert(unicode, 0, unicode.length)); - Expect.listEquals([0xc2, 0x82, 0xe1, 0x81, 0x81, 0xf0, 0x90, 0x84, 0x81], - encoder.convert(unicode, 1)); - Expect.listEquals( - [0xc2, 0x82, 0xe1, 0x81, 0x81], encoder.convert(unicode, 1, 3)); - // Split in the middle of a surrogate pair. - Expect.listEquals([0xc2, 0x82, 0xe1, 0x81, 0x81, 0xef, 0xbf, 0xbd], - encoder.convert(unicode, 1, 4)); -} diff --git a/tests/lib_2/convert/utf8_test.dart b/tests/lib_2/convert/utf8_test.dart deleted file mode 100644 index d92b0d6dff9..00000000000 --- a/tests/lib_2/convert/utf8_test.dart +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) 2012, 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 - -import "package:expect/expect.dart"; -import 'dart:convert'; -import 'dart:typed_data' show Uint8List; -import 'unicode_tests.dart'; - -String decode(List bytes) => new Utf8Decoder().convert(bytes); - -void main() { - for (var test in UNICODE_TESTS) { - List bytes = test[0]; - String expected = test[1]; - Expect.stringEquals(expected, decode(bytes)); - Expect.stringEquals(expected, decode(new Uint8List.fromList(bytes))); - } - - testDecodeSlice(); - testErrorOffset(); -} - -void testDecodeSlice() { - var decoder = utf8.decoder; // Doesn't allow malformed. - - testAscii(List ascii) { - Expect.equals("ABCDE", decoder.convert(ascii)); - Expect.equals("ABCDE", decoder.convert(ascii, 0)); - Expect.equals("ABCDE", decoder.convert(ascii, 0, ascii.length)); - Expect.equals("CDE", decoder.convert(ascii, 2)); - Expect.equals("BCD", decoder.convert(ascii, 1, 4)); - Expect.equals("ABCD", decoder.convert(ascii, 0, 4)); - - Expect.throws(() => decoder.convert(ascii, -1)); // start < 0. - Expect.throws(() => decoder.convert(ascii, 6)); // start > length - Expect.throws(() => decoder.convert(ascii, 0, -1)); // end < 0 - Expect.throws(() => decoder.convert(ascii, 0, 6)); // end > length - Expect.throws(() => decoder.convert(ascii, 3, 2)); // end < start - } - - var ascii = [0x41, 0x42, 0x43, 0x44, 0x45]; - testAscii(ascii); - testAscii(new Uint8List.fromList(ascii)); - - testUtf8(List utf8) { - Expect.equals("\u0081\u0082\u1041", decoder.convert(utf8)); - Expect.equals("\u0082\u1041", decoder.convert(utf8, 2)); - Expect.equals("\u0081\u0082", decoder.convert(utf8, 0, 4)); - Expect.equals("\u0082", decoder.convert(utf8, 2, 4)); - Expect.throws(() => decoder.convert(utf8, 1)); - Expect.throws(() => decoder.convert(utf8, 0, 1)); - Expect.throws(() => decoder.convert(utf8, 2, 5)); - } - - var utf8bytes = [0xc2, 0x81, 0xc2, 0x82, 0xe1, 0x81, 0x81]; - testUtf8(utf8bytes); - testUtf8(new Uint8List.fromList(utf8bytes)); -} - -void testErrorOffset() { - // Test that failed convert calls have an offset in the exception. - testExn(input, offset) { - Expect.throws(() { - utf8.decoder.convert(input); - }, (e) => e is FormatException && input == e.source && offset == e.offset); - - var typed = new Uint8List.fromList(input); - Expect.throws(() { - utf8.decoder.convert(typed); - }, (e) => e is FormatException && typed == e.source && offset == e.offset); - } - - // Bad encoding, points to first bad byte. - testExn([0x80, 0x00], 0); - testExn([0xC2, 0x00], 1); - testExn([0xE2, 0x00], 1); - testExn([0xE2, 0x80, 0x00], 2); - testExn([0xF2, 0x00], 1); - testExn([0xF2, 0x80, 0x00], 2); - testExn([0xF2, 0x80, 0x80, 0x00], 3); - testExn([0xF8, 0x00], 0); - // Short encoding, points to end. - testExn([0xC2], 1); - testExn([0xE2], 1); - testExn([0xE2, 0x80], 2); - testExn([0xF2], 1); - testExn([0xF2, 0x80], 2); - testExn([0xF2, 0x80, 0x80], 3); - // Overlong encoding, points to byte that gave enough information to conclude - // that it was overlong. - testExn([0xC0, 0x80], 0); - testExn([0xC1, 0xBF], 0); - testExn([0xE0, 0x80, 0x80], 1); - testExn([0xE0, 0x9F, 0xBF], 1); - testExn([0xF0, 0x80, 0x80, 0x80], 1); - testExn([0xF0, 0x8F, 0xBF, 0xBF], 1); - // Invalid character (value too large, over 0x10FFFF). - testExn([0xF4, 0x90, 0x80, 0x80], 1); - testExn([0xF7, 0xBF, 0xBF, 0xBF], 0); -} diff --git a/tests/lib_2/developer/inspect_test.dart b/tests/lib_2/developer/inspect_test.dart deleted file mode 100644 index 80cf966af00..00000000000 --- a/tests/lib_2/developer/inspect_test.dart +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'dart:developer'; -import 'package:expect/expect.dart'; - -class Point { - int x, y; - Point(this.x, this.y); -} - -void main() { - var p_in = new Point(3, 4); - var p_out = inspect(p_in); - Expect.isTrue(identical(p_in, p_out)); -} diff --git a/tests/lib_2/developer/post_event_test.dart b/tests/lib_2/developer/post_event_test.dart deleted file mode 100644 index 612d7e6aa3b..00000000000 --- a/tests/lib_2/developer/post_event_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2022, 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:convert'; -import 'dart:async'; -import 'dart:developer'; -import 'package:expect/expect.dart'; - -final protectedStreams = [ - 'VM', - 'Isolate', - 'Debug', - 'GC', - '_Echo', - 'HeapSnapshot', - 'Logging', - 'Timeline', - 'Profiler', - '_aStreamThatStartsWithAnUnderScore' -]; - -main() { - for (final protectedStream in protectedStreams) { - Expect.throws( - () { - postEvent('theEvent', {'the': 'data'}, stream: protectedStream); - }, - (_) => true, - 'Should not allow posting to $protectedStream protected stream', - ); - } - - // The Extension stream is not protected so calling this should not fail - postEvent('theEvent', {'the': 'data'}, stream: 'Extension'); - - // Should be allowed to post to a non-protected custom stream - postEvent('theEvent', {'the': 'data'}, stream: 'someCustomStream'); - - // Should work with immutable map - postEvent('theEvent', const {'the': 'data'}, stream: 'someCustomStream'); -} diff --git a/tests/lib_2/developer/timeline_recorders_test.dart b/tests/lib_2/developer/timeline_recorders_test.dart deleted file mode 100644 index e0a82f0f45f..00000000000 --- a/tests/lib_2/developer/timeline_recorders_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// 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. - -// @dart = 2.9 - -/// VMOptions=--timeline_streams=VM,Isolate,GC,Dart --timeline_recorder=endless -/// VMOptions=--timeline_streams=VM,Isolate,GC,Dart --timeline_recorder=ring -/// VMOptions=--timeline_streams=VM,Isolate,GC,Dart --timeline_recorder=startup -/// VMOptions=--timeline_streams=VM,Isolate,GC,Dart --timeline_recorder=systrace - -import 'dart:developer'; - -void main() { - Timeline.startSync('A'); - - Timeline.instantSync('B'); - - var task = new TimelineTask(); - task.start('C'); - task.instant('D'); - task.finish(); - - Timeline.finishSync(); -} diff --git a/tests/lib_2/developer/timeline_test.dart b/tests/lib_2/developer/timeline_test.dart deleted file mode 100644 index 6e96e2a00eb..00000000000 --- a/tests/lib_2/developer/timeline_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'dart:developer'; -import 'package:expect/expect.dart'; - -void testUnbalancedStartFinish() { - Timeline.startSync('A'); - Timeline.finishSync(); - - bool exceptionCaught = false; - try { - Timeline.finishSync(); - } catch (e) { - exceptionCaught = true; - } - Expect.isTrue(exceptionCaught); -} - -void main() { - testUnbalancedStartFinish(); -} diff --git a/tests/lib_2/developer/user_tags_test.dart b/tests/lib_2/developer/user_tags_test.dart deleted file mode 100644 index 16581bd4b71..00000000000 --- a/tests/lib_2/developer/user_tags_test.dart +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2014, 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 - -import 'dart:developer'; -import 'package:expect/expect.dart'; - -// Test that the default tag is set. -testDefault() { - Expect.isTrue(identical(UserTag.defaultTag, getCurrentTag())); -} - -// Test that the label property matches the constructor. -void testLabel() { - var label = 'Hello World'; - var tag = new UserTag(label); - Expect.equals(label, tag.label); -} - -// Test that we canonicalize UserTag by name. -void testCanonicalize(tag1) { - var label = 'Global Tag'; - var tag = new UserTag(label); - Expect.isTrue(identical(tag, tag1)); - var defaultLabel = 'Default'; - var defaultTag = new UserTag(defaultLabel); - Expect.isTrue(identical(UserTag.defaultTag, defaultTag)); -} - -// Test that we made the tag current. -void testMakeCurrent(tag) { - tag.makeCurrent(); - Expect.isTrue(identical(tag, getCurrentTag())); -} - -// Test that we reach a limit of tags an exception is thrown. -void testExhaust() { - var i = 0; - while (true) { - var label = i.toString(); - var tag = new UserTag(label); - i++; - } -} - -var callerTag = new UserTag('caller'); -var calleeTag = new UserTag('callee'); - -void callee() { - var old = calleeTag.makeCurrent(); - Expect.isTrue(identical(calleeTag, getCurrentTag())); - old.makeCurrent(); -} - -void testCallerPattern() { - Expect.isTrue(identical(UserTag.defaultTag, getCurrentTag())); - var old = callerTag.makeCurrent(); - Expect.isTrue(identical(callerTag, getCurrentTag())); - callee(); - Expect.isTrue(identical(callerTag, getCurrentTag())); - old.makeCurrent(); - Expect.isTrue(identical(UserTag.defaultTag, getCurrentTag())); -} - -main() { - testDefault(); - testCallerPattern(); - var label = 'Global Tag'; - var tag = new UserTag(label); - testLabel(); - testCanonicalize(tag); - for (var i = 0; i < 2000; i++) { - testMakeCurrent(tag); - } - Expect.throws(testExhaust); -} diff --git a/tests/lib_2/html/Ahem.ttf b/tests/lib_2/html/Ahem.ttf deleted file mode 100644 index ac81cb03165..00000000000 Binary files a/tests/lib_2/html/Ahem.ttf and /dev/null differ diff --git a/tests/lib_2/html/async_cancellingisolate.dart b/tests/lib_2/html/async_cancellingisolate.dart deleted file mode 100644 index 50ce4186ed3..00000000000 --- a/tests/lib_2/html/async_cancellingisolate.dart +++ /dev/null @@ -1,33 +0,0 @@ - -// @dart = 2.9 -library async_cancellingisolate; - -import 'dart:async'; -import 'package:expect/minitest.dart'; - -main(message, replyTo) { - var command = message.first; - expect(command, 'START'); - var shot = false; - var oneshot; - var periodic; - periodic = new Timer.periodic(const Duration(milliseconds: 10), (timer) { - expect(shot, isFalse); - shot = true; - expect(timer, same(periodic)); - periodic.cancel(); - oneshot.cancel(); - // Wait some more time to be sure callbacks won't be invoked any - // more. - new Timer(const Duration(milliseconds: 50), () { - replyTo.send('DONE'); - }); - }); - // We launch the oneshot timer after the periodic timer. Otherwise a - // (very long) context switch could make this test flaky: assume the - // oneshot timer is created first and then there is a 30ms context switch. - // when the periodic timer is scheduled it would execute after the oneshot. - oneshot = new Timer(const Duration(milliseconds: 30), () { - fail('Should never be invoked'); - }); -} diff --git a/tests/lib_2/html/async_oneshot.dart b/tests/lib_2/html/async_oneshot.dart deleted file mode 100644 index 55827b17b7d..00000000000 --- a/tests/lib_2/html/async_oneshot.dart +++ /dev/null @@ -1,12 +0,0 @@ - -// @dart = 2.9 -import 'dart:async'; -import 'package:expect/minitest.dart'; - -main(message, replyTo) { - var command = message.first; - expect(command, 'START'); - new Timer(const Duration(milliseconds: 10), () { - replyTo.send('DONE'); - }); -} diff --git a/tests/lib_2/html/async_periodictimer.dart b/tests/lib_2/html/async_periodictimer.dart deleted file mode 100644 index 55c468ee93d..00000000000 --- a/tests/lib_2/html/async_periodictimer.dart +++ /dev/null @@ -1,26 +0,0 @@ - -// @dart = 2.9 -library async_periodictimer; - -import 'dart:async'; -import 'package:expect/minitest.dart'; - -main(message, replyTo) { - var command = message.first; - expect(command, 'START'); - int counter = 0; - new Timer.periodic(const Duration(milliseconds: 10), (timer) { - if (counter == 3) { - counter = 1024; - timer.cancel(); - // Wait some more time to be sure callback won't be invoked any - // more. - new Timer(const Duration(milliseconds: 30), () { - replyTo.send('DONE'); - }); - return; - } - assert(counter < 3); - counter++; - }); -} diff --git a/tests/lib_2/html/async_test.dart b/tests/lib_2/html/async_test.dart deleted file mode 100644 index 7812c7c6940..00000000000 --- a/tests/lib_2/html/async_test.dart +++ /dev/null @@ -1,47 +0,0 @@ - -// @dart = 2.9 -library async_test; - -import 'package:async_helper/async_minitest.dart'; - -import 'dart:async'; -import 'dart:isolate'; -import 'dart:html'; - -import 'async_oneshot.dart' as oneshot_test show main; -import 'async_periodictimer.dart' as periodictimer_test show main; -import 'async_cancellingisolate.dart' as cancelling_test show main; - -oneshot(message) => oneshot_test.main(message.first, message.last); -periodicTimerIsolate(message) => - periodictimer_test.main(message.first, message.last); -cancellingIsolate(message) => cancelling_test.main(message.first, message.last); - -main() { - test('one shot timer in pure isolate', () { - var response = new ReceivePort(); - var remote = Isolate.spawn(oneshot, [ - ['START'], - response.sendPort - ]); - expect(remote.then((_) => response.first), completion('DONE')); - }); - - test('periodic timer in pure isolate', () { - var response = new ReceivePort(); - var remote = Isolate.spawn(periodicTimerIsolate, [ - ['START'], - response.sendPort - ]); - expect(remote.then((_) => response.first), completion('DONE')); - }); - - test('cancellation in pure isolate', () { - var response = new ReceivePort(); - var remote = Isolate.spawn(cancellingIsolate, [ - ['START'], - response.sendPort - ]); - expect(remote.then((_) => response.first), completion('DONE')); - }); -} diff --git a/tests/lib_2/html/audiobuffersourcenode_test.dart b/tests/lib_2/html/audiobuffersourcenode_test.dart deleted file mode 100644 index fd79b01b250..00000000000 --- a/tests/lib_2/html/audiobuffersourcenode_test.dart +++ /dev/null @@ -1,25 +0,0 @@ - -// @dart = 2.9 -import 'dart:web_audio'; - -import 'package:expect/minitest.dart'; - -main() { - group('supported', () { - test('supported', () { - expect(AudioContext.supported, isTrue); - }); - }); - - group('functional', () { - test('createBuffer', () { - if (AudioContext.supported) { - var ctx = new AudioContext(); - AudioBufferSourceNode node = ctx.createBufferSource(); - expect(node is AudioBufferSourceNode, isTrue); - node.start(ctx.currentTime, 0, 2); - expect(node is AudioBufferSourceNode, isTrue); - } - }); - }); -} diff --git a/tests/lib_2/html/audiocontext_test.dart b/tests/lib_2/html/audiocontext_test.dart deleted file mode 100644 index 396cf39f678..00000000000 --- a/tests/lib_2/html/audiocontext_test.dart +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) 2022, 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 -import 'dart:async'; -import 'dart:html'; -import 'dart:typed_data'; -import 'dart:web_audio'; - -import 'package:async_helper/async_helper.dart'; -import 'package:expect/minitest.dart'; - -main() { - var isAudioContext = - predicate((x) => x is AudioContext, 'is an AudioContext'); - - group('supported', () { - test('supported', () { - expect(AudioContext.supported, true); - }); - }); - - group('functional', () { - var context; - if (AudioContext.supported) { - context = new AudioContext(); - } - - test('constructorTest', () { - if (AudioContext.supported) { - expect(context, isNotNull); - expect(context, isAudioContext); - } - }); - - test('audioRenames', () { - if (AudioContext.supported) { - GainNode gainNode = context.createGain(); - gainNode.connectNode(context.destination); - expect(gainNode is GainNode, isTrue); - - expect(context.createAnalyser() is AnalyserNode, isTrue); - expect(context.createChannelMerger() is AudioNode, isTrue); - expect(context.createChannelSplitter() is AudioNode, isTrue); - expect(context.createOscillator() is OscillatorNode, isTrue); - expect(context.createPanner() is PannerNode, isTrue); - expect( - context.createScriptProcessor(4096) is ScriptProcessorNode, isTrue); - } - }); - - // TODO(9322): This test times out. - /* - test('onAudioProcess', () { - if(AudioContext.supported) { - var completer = new Completer(); - var context = new AudioContext(); - var scriptProcessor = context.createScriptProcessor(1024, 1, 2); - scriptProcessor.connectNode(context.destination); - bool alreadyCalled = false; - scriptProcessor.onAudioProcess.listen((event) { - if (!alreadyCalled) { - completer.complete(true); - } - alreadyCalled = true; - }); - return completer.future; - } - }); - */ - - test('oscillatorTypes', () { - if (AudioContext.supported) { - OscillatorNode oscillator = context.createOscillator(); - oscillator.connectNode(context.destination); - - oscillator.type = 'sawtooth'; - expect(oscillator.type, equals('sawtooth')); - - oscillator.type = 'sine'; - expect(oscillator.type, equals('sine')); - - oscillator.type = 'square'; - expect(oscillator.type, equals('square')); - - oscillator.type = 'triangle'; - expect(oscillator.type, equals('triangle')); - - //expect(() => oscillator.type = 7, throws); Firefox does not throw, it - //simply ignores this value. - expect(oscillator.type, equals('triangle')); - - // Firefox does not throw when it receives invalid values; it simply - // ignores them. - //expect(() => oscillator.type = ['heap object not a string'], throws); - expect(oscillator.type, equals('triangle')); - } - }); - - asyncTest(() async { - if (AudioContext.supported) { - final audioSourceUrl = "/root_dart/tests/lib_2/html/small.mp3"; - - Future requestAudioDecode( - {bool triggerDecodeError: false, - DecodeSuccessCallback successCallback, - DecodeErrorCallback errorCallback}) async { - HttpRequest audioRequest = HttpRequest(); - audioRequest.open("GET", audioSourceUrl, async: true); - audioRequest.responseType = "arraybuffer"; - var completer = new Completer(); - audioRequest.onLoad.listen((_) { - ByteBuffer audioData = audioRequest.response; - if (triggerDecodeError) audioData = Uint8List.fromList([]).buffer; - context - .decodeAudioData(audioData, successCallback, errorCallback) - .then((_) { - completer.complete(); - }).catchError((e) { - completer.completeError(e); - }); - }); - audioRequest.send(); - return completer.future; - } - - // Decode successfully without callback. - await requestAudioDecode(); - - // Decode successfully with callback. Use counter to make sure it's only - // called once. - var successCallbackCalled = 0; - await requestAudioDecode( - successCallback: (_) { - successCallbackCalled += 1; - }, - errorCallback: (_) {}); - expect(successCallbackCalled, 1); - - // Fail decode without callback. - try { - await requestAudioDecode(triggerDecodeError: true); - fail('Expected decode failure.'); - } catch (_) {} - - // Fail decode with callback. - var errorCallbackCalled = 0; - try { - await requestAudioDecode( - triggerDecodeError: true, - successCallback: (_) {}, - errorCallback: (_) { - errorCallbackCalled += 1; - }); - fail('Expected decode failure.'); - } catch (e) { - // Safari may return a null error. Assuming Safari is version >= 14.1, - // the Future should complete with a string error if the error - // callback never gets called. - if (errorCallbackCalled == 0) { - expect(e is String, true); - } else { - expect(errorCallbackCalled, 1); - } - } - } - }); - }); -} diff --git a/tests/lib_2/html/audioelement_test.dart b/tests/lib_2/html/audioelement_test.dart deleted file mode 100644 index e438afb1290..00000000000 --- a/tests/lib_2/html/audioelement_test.dart +++ /dev/null @@ -1,27 +0,0 @@ - -// @dart = 2.9 -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - test('constructorTest1', () { - var audio = new AudioElement(); - expect(audio, isNotNull); - expect(audio is AudioElement, isTrue); - }); - - test('constructorTest2', () { - var audio = new AudioElement('IntentionallyMissingFileURL'); - expect(audio, isNotNull); - expect(audio is AudioElement, isTrue); - expect(audio.src.contains('IntentionallyMissingFileURL'), isTrue); - }); - - test('canPlayTypeTest', () { - var audio = new AudioElement(); - var canPlay = audio.canPlayType("audio/mp4"); - expect(canPlay, isNotNull); - expect(canPlay is String, isTrue); - }); -} diff --git a/tests/lib_2/html/b_element_test.dart b/tests/lib_2/html/b_element_test.dart deleted file mode 100644 index 5083b759cc4..00000000000 --- a/tests/lib_2/html/b_element_test.dart +++ /dev/null @@ -1,7 +0,0 @@ - -// @dart = 2.9 -import 'dart:html'; - -main() { - new Element.tag('b'); -} diff --git a/tests/lib_2/html/blob_constructor_test.dart b/tests/lib_2/html/blob_constructor_test.dart deleted file mode 100644 index 6f17fd87b8f..00000000000 --- a/tests/lib_2/html/blob_constructor_test.dart +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:html'; -import 'dart:typed_data'; - -import 'package:expect/minitest.dart'; - -main() { - test('basic', () { - var b = new Blob([]); - expect(b.size, 0); - }); - - test('type1', () { - // OPTIONALS var b = new Blob(['Harry'], type: 'text'); - var b = new Blob(['Harry'], 'text'); - expect(b.size, 5); - expect(b.type, 'text'); - }); - - test('endings1', () { - // OPTIONALS var b = new Blob(['A\nB\n'], endings: 'transparent'); - var b = new Blob(['A\nB\n'], null, 'transparent'); - expect(b.size, 4); - }); - - test('endings2', () { - // OPTIONALS var b = new Blob(['A\nB\n'], endings: 'native'); - var b = new Blob(['A\nB\n'], null, 'native'); - expect(b.size, predicate((x) => x == 4 || x == 6), - reason: "b.size should be 4 or 6"); - }); - - test('twoStrings', () { - // OPTIONALS var b = new Blob(['123', 'xyz'], type: 'text/plain;charset=UTF-8'); - var b = new Blob(['123', 'xyz'], 'text/plain;charset=UTF-8'); - expect(b.size, 6); - }); - - test('fromBlob1', () { - var b1 = new Blob([]); - var b2 = new Blob([b1]); - expect(b2.size, 0); - }); - - test('fromBlob2', () { - var b1 = new Blob(['x']); - var b2 = new Blob([b1, b1]); - expect(b1.size, 1); - expect(b2.size, 2); - }); - - test('fromArrayBuffer', () { - var a = new Uint8List(100).buffer; // i.e. new ArrayBuffer(100); - var b = new Blob([a, a]); - expect(b.size, 200); - }); -} diff --git a/tests/lib_2/html/cache_test.dart b/tests/lib_2/html/cache_test.dart deleted file mode 100644 index 0200cf15305..00000000000 --- a/tests/lib_2/html/cache_test.dart +++ /dev/null @@ -1,43 +0,0 @@ - -// @dart = 2.9 -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - group('supported', () { - test('supported', () { - expect(ApplicationCache.supported, isTrue); - }); - }); - - group('ApplicationCache', () { - test('ApplicationCache', () { - var expectation = ApplicationCache.supported ? returnsNormally : throws; - expect(() { - ApplicationCache appCache = window.applicationCache; - expect(cacheStatusToString(appCache.status), "UNCACHED"); - }, expectation); - }); - }); -} - -String cacheStatusToString(int status) { - switch (status) { - case ApplicationCache.UNCACHED: // UNCACHED == 0 - return 'UNCACHED'; - case ApplicationCache.IDLE: // IDLE == 1 - return 'IDLE'; - case ApplicationCache.CHECKING: // CHECKING == 2 - return 'CHECKING'; - case ApplicationCache.DOWNLOADING: // DOWNLOADING == 3 - return 'DOWNLOADING'; - case ApplicationCache.UPDATEREADY: // UPDATEREADY == 4 - return 'UPDATEREADY'; - case ApplicationCache.OBSOLETE: // OBSOLETE == 5 - return 'OBSOLETE'; - default: - return 'UNKNOWN CACHE STATUS'; - } - ; -} diff --git a/tests/lib_2/html/callback_list_test.dart b/tests/lib_2/html/callback_list_test.dart deleted file mode 100644 index 1a90f169edd..00000000000 --- a/tests/lib_2/html/callback_list_test.dart +++ /dev/null @@ -1,42 +0,0 @@ - -// @dart = 2.9 -library callback_list_test; - -import 'dart:html'; -import 'dart:async'; - -import 'package:expect/minitest.dart'; - -var callbackDone = false; -bool isCallbackDone() => callbackDone; - -Future waitUntilCallbackDone(bool test()) async { - var completer = new Completer(); - check() { - if (test()) { - completer.complete(); - } else { - new Timer(Duration.zero, check); - } - } - - check(); - return completer.future; -} - -void main() async { - window.navigator.persistentStorage.requestQuota(1024 * 1024, _quotaHandler); - - await waitUntilCallbackDone(isCallbackDone); - expect(true, isCallbackDone()); -} - -Future _quotaHandler(int byteCount) async { - FileSystem filesystem = - await window.requestFileSystem(1024 * 1024, persistent: true); - DirectoryEntry dir = await filesystem.root; - DirectoryReader dirReader = dir.createReader(); - await dirReader.readEntries(); - List secondEntries = await dirReader.readEntries(); - callbackDone = true; -} diff --git a/tests/lib_2/html/callbacks_test.dart b/tests/lib_2/html/callbacks_test.dart deleted file mode 100644 index eae0b1e12f9..00000000000 --- a/tests/lib_2/html/callbacks_test.dart +++ /dev/null @@ -1,7 +0,0 @@ - -// @dart = 2.9 -import 'dart:html'; - -main() { - window.requestAnimationFrame((num time) => false); -} diff --git a/tests/lib_2/html/canvas_pixel_array_type_alias_test.dart b/tests/lib_2/html/canvas_pixel_array_type_alias_test.dart deleted file mode 100644 index 8b511e95186..00000000000 --- a/tests/lib_2/html/canvas_pixel_array_type_alias_test.dart +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'dart:html'; -import 'dart:typed_data'; - -import 'package:expect/minitest.dart'; - -// We have aliased the legacy type CanvasPixelArray with the new type -// Uint8ClampedArray by mapping the CanvasPixelArray type tag to -// Uint8ClampedArray. It is not a perfect match since CanvasPixelArray is -// missing the ArrayBufferView members. These should appear to be null. - -var inscrutable; - -main() { - inscrutable = (x) => x; - - int width = 100; - int height = 100; - - CanvasElement canvas = new CanvasElement(width: width, height: height); - document.body.append(canvas); - - CanvasRenderingContext2D context = canvas.context2D; - - group('basic', () { - test('CreateImageData', () { - ImageData image = context.createImageData(canvas.width, canvas.height); - List data = image.data; - // It is legal for the dart2js compiler to believe the type of the native - // ImageData.data and elides the check, so check the type explicitly: - expect(inscrutable(data) is List, isTrue, - reason: 'canvas array type'); - - expect(data.length, 40000); - checkPixel(data, 0, [0, 0, 0, 0]); - checkPixel(data, width * height - 1, [0, 0, 0, 0]); - - data[100] = 200; - expect(data[100], equals(200)); - }); - }); - - group('types1', () { - test('isList', () { - var data = context.createImageData(canvas.width, canvas.height).data; - expect(inscrutable(data) is List, true); - }); - - test('isListT_pos', () { - var data = context.createImageData(canvas.width, canvas.height).data; - expect(inscrutable(data) is List, true); - }); - }); - - group('types2', () { - test('isListT_neg', () { - var data = context.createImageData(canvas.width, canvas.height).data; - expect(inscrutable(data) is List, false); - }); - - test('isUint8ClampedList', () { - var data = context.createImageData(canvas.width, canvas.height).data; - expect(inscrutable(data) is Uint8ClampedList, true); - }); - - test('consistent_isUint8ClampedList', () { - var data = context.createImageData(canvas.width, canvas.height).data; - // Static and dynamic values consistent? Type inference should be able to - // constant-fold 'data is Uint8ClampedList' to 'true'. - expect(inscrutable(data) is Uint8ClampedList == data is Uint8ClampedList, - isTrue); - }); - - // TODO(sra): Why does this fail on Dartium? There are two types with the - // same print string: - // - // Expected: ?: Actual: ?: - /* - test('runtimeType', () { - var data = context.createImageData(canvas.width, canvas.height).data; - expect(inscrutable(data).runtimeType, Uint8ClampedList); - }); - */ - - test('consistent_runtimeType', () { - var data = context.createImageData(canvas.width, canvas.height).data; - expect(inscrutable(data).runtimeType == data.runtimeType, isTrue); - }); - }); - - group('types2_runtimeTypeName', () { - test('runtimeTypeName', () { - var data = context.createImageData(canvas.width, canvas.height).data; - expect('${inscrutable(data).runtimeType}', 'Uint8ClampedList'); - }); - }); - - group('typed_data', () { - test('elementSizeInBytes', () { - var data = context.createImageData(canvas.width, canvas.height).data; - expect(inscrutable(data).elementSizeInBytes, 1); - }); - }); -} - -void checkPixel(List data, int offset, List rgba) { - offset *= 4; - for (var i = 0; i < 4; ++i) { - expect(rgba[i], equals(data[offset + i])); - } -} diff --git a/tests/lib_2/html/canvas_test.dart b/tests/lib_2/html/canvas_test.dart deleted file mode 100644 index 52ddd32d749..00000000000 --- a/tests/lib_2/html/canvas_test.dart +++ /dev/null @@ -1,56 +0,0 @@ - -// @dart = 2.9 -library CanvasTest; - -import 'dart:html'; - -import 'package:async_helper/async_minitest.dart'; - -main() { - CanvasElement canvas; - CanvasRenderingContext2D context; - int width = 100; - int height = 100; - - canvas = new CanvasElement(width: width, height: height); - document.body.append(canvas); - - context = canvas.context2D; - - test('CreateImageData', () { - ImageData image = context.createImageData(canvas.width, canvas.height); - List data = image.data; - - expect(data.length, 40000); - checkPixel(data, 0, [0, 0, 0, 0]); - checkPixel(data, width * height - 1, [0, 0, 0, 0]); - - data[100] = 200; - expect(data[100], equals(200)); - }); - - test('toDataUrl', () { - var canvas = new CanvasElement(width: 100, height: 100); - var context = canvas.context2D; - context.fillStyle = 'red'; - context.fill(); - - var url = canvas.toDataUrl(); - - var img = new ImageElement(); - img.onLoad.listen(expectAsync((_) { - expect(img.complete, true); - })); - img.onError.listen((_) { - fail('URL failed to load.'); - }); - img.src = url; - }); -} - -void checkPixel(List data, int offset, List rgba) { - offset *= 4; - for (var i = 0; i < 4; ++i) { - expect(data[offset + i], equals(rgba[i])); - } -} diff --git a/tests/lib_2/html/canvasrendering/arc_test.dart b/tests/lib_2/html/canvasrendering/arc_test.dart deleted file mode 100644 index ff393867c85..00000000000 --- a/tests/lib_2/html/canvasrendering/arc_test.dart +++ /dev/null @@ -1,105 +0,0 @@ -// 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. - -// @dart = 2.9 - -library canvas_rendering_context_2d_test; - -import 'dart:html'; -import 'dart:math'; - -import 'canvas_rendering_util.dart'; -import 'package:expect/minitest.dart'; - -main() { - setUp(setupFunc); - tearDown(tearDownFunc); - - test('default arc should be clockwise', () { - context.beginPath(); - final r = 10; - - // Center of arc. - final cx = 20; - final cy = 20; - // Arc centered at (20, 20) with radius 10 will go clockwise - // from (20 + r, 20) to (20, 20 + r), which is 1/4 of a circle. - context.arc(cx, cy, r, 0, pi / 2); - - context.strokeStyle = 'green'; - context.lineWidth = 2; - context.stroke(); - - // Center should not be filled. - expectPixelUnfilled(cx, cy); - - // (cx + r, cy) should be filled. - expectPixelFilled(cx + r, cy, true); - // (cx, cy + r) should be filled. - expectPixelFilled(cx, cy + r, true); - // (cx - r, cy) should be empty. - expectPixelFilled(cx - r, cy, false); - // (cx, cy - r) should be empty. - expectPixelFilled(cx, cy - r, false); - - // (cx + r/SQRT2, cy + r/SQRT2) should be filled. - expectPixelFilled((cx + r / sqrt2).toInt(), (cy + r / sqrt2).toInt(), true); - - // (cx - r/SQRT2, cy - r/SQRT2) should be empty. - expectPixelFilled( - (cx - r / sqrt2).toInt(), (cy + r / sqrt2).toInt(), false); - - // (cx + r/SQRT2, cy + r/SQRT2) should be empty. - expectPixelFilled( - (cx - r / sqrt2).toInt(), (cy - r / sqrt2).toInt(), false); - - // (cx - r/SQRT2, cy - r/SQRT2) should be empty. - expectPixelFilled( - (cx + r / sqrt2).toInt(), (cy - r / sqrt2).toInt(), false); - }); - - test('arc anticlockwise', () { - context.beginPath(); - final r = 10; - - // Center of arc. - final cx = 20; - final cy = 20; - // Arc centered at (20, 20) with radius 10 will go anticlockwise - // from (20 + r, 20) to (20, 20 + r), which is 3/4 of a circle. - // Because of the way arc work, when going anti-clockwise, the end points - // are not included, so small values are added to radius to make a little - // more than a 3/4 circle. - context.arc(cx, cy, r, .1, pi / 2 - .1, true); - - context.strokeStyle = 'green'; - context.lineWidth = 2; - context.stroke(); - - // Center should not be filled. - expectPixelUnfilled(cx, cy); - - // (cx + r, cy) should be filled. - expectPixelFilled(cx + r, cy, true); - // (cx, cy + r) should be filled. - expectPixelFilled(cx, cy + r, true); - // (cx - r, cy) should be filled. - expectPixelFilled(cx - r, cy, true); - // (cx, cy - r) should be filled. - expectPixelFilled(cx, cy - r, true); - - // (cx + r/SQRT2, cy + r/SQRT2) should be empty. - expectPixelFilled( - (cx + r / sqrt2).toInt(), (cy + r / sqrt2).toInt(), false); - - // (cx - r/SQRT2, cy - r/SQRT2) should be filled. - expectPixelFilled((cx - r / sqrt2).toInt(), (cy + r / sqrt2).toInt(), true); - - // (cx + r/SQRT2, cy + r/SQRT2) should be filled. - expectPixelFilled((cx - r / sqrt2).toInt(), (cy - r / sqrt2).toInt(), true); - - // (cx - r/SQRT2, cy - r/SQRT2) should be filled. - expectPixelFilled((cx + r / sqrt2).toInt(), (cy - r / sqrt2).toInt(), true); - }); -} diff --git a/tests/lib_2/html/canvasrendering/canvas_rendering_util.dart b/tests/lib_2/html/canvasrendering/canvas_rendering_util.dart deleted file mode 100644 index 09e8984cd09..00000000000 --- a/tests/lib_2/html/canvasrendering/canvas_rendering_util.dart +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2012, 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 canvas_rendering_context_2d_test; - -import 'dart:html'; -import 'dart:math'; - -import 'package:expect/minitest.dart'; - -// Some rounding errors in the browsers. -checkPixel(List pixel, List expected) { - expect(pixel[0], closeTo(expected[0], 2)); - expect(pixel[1], closeTo(expected[1], 2)); - expect(pixel[2], closeTo(expected[2], 2)); - expect(pixel[3], closeTo(expected[3], 2)); -} - -var canvas; -var context; -var otherCanvas; -var otherContext; -var video; - -void createCanvas() { - canvas = new CanvasElement(); - canvas.width = 100; - canvas.height = 100; - - context = canvas.context2D; -} - -void createOtherCanvas() { - otherCanvas = new CanvasElement(); - otherCanvas.width = 10; - otherCanvas.height = 10; - otherContext = otherCanvas.context2D; - otherContext.fillStyle = "red"; - otherContext.fillRect(0, 0, otherCanvas.width, otherCanvas.height); -} - -void setupFunc() { - createCanvas(); - createOtherCanvas(); - video = new VideoElement(); -} - -void tearDownFunc() { - canvas = null; - context = null; - otherCanvas = null; - otherContext = null; - video = null; -} - -List readPixel(int x, int y) { - var imageData = context.getImageData(x, y, 1, 1); - return imageData.data; -} - -/// Returns true if the pixel has some data in it, false otherwise. -bool isPixelFilled(int x, int y) => readPixel(x, y).any((p) => p != 0); - -String pixelDataToString(List data, int x, int y) { - return '[${data.join(", ")}]'; -} - -String _filled(bool v) => v ? "filled" : "unfilled"; - -void expectPixelFilled(int x, int y, [bool filled = true]) { - expect(isPixelFilled(x, y), filled, - reason: 'Pixel at ($x, $y) was expected to' - ' be: <${_filled(filled)}> but was: <${_filled(!filled)}> with data: ' - '${pixelDataToString(readPixel(x, y), x, y)}'); -} - -void expectPixelUnfilled(int x, int y) { - expectPixelFilled(x, y, false); -} diff --git a/tests/lib_2/html/canvasrendering/draw_image_canvas_element_test.dart b/tests/lib_2/html/canvasrendering/draw_image_canvas_element_test.dart deleted file mode 100644 index d7117d96935..00000000000 --- a/tests/lib_2/html/canvasrendering/draw_image_canvas_element_test.dart +++ /dev/null @@ -1,79 +0,0 @@ -// 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. - -// @dart = 2.9 - -library canvas_rendering_context_2d_test; - -import 'dart:html'; -import 'dart:math'; - -import 'canvas_rendering_util.dart'; -import 'package:expect/minitest.dart'; - -main() { - setUp(setupFunc); - tearDown(tearDownFunc); - - test('with 3 params', () { - // Draw an image to the canvas from a canvas element. - context.drawImage(otherCanvas, 50, 50); - - expectPixelFilled(50, 50); - expectPixelFilled(55, 55); - expectPixelFilled(59, 59); - expectPixelUnfilled(60, 60); - expectPixelUnfilled(0, 0); - expectPixelUnfilled(70, 70); - }); - test('with 5 params', () { - // Draw an image to the canvas from a canvas element. - context.drawImageToRect(otherCanvas, new Rectangle(50, 50, 20, 20)); - - expectPixelFilled(50, 50); - expectPixelFilled(55, 55); - expectPixelFilled(59, 59); - expectPixelFilled(60, 60); - expectPixelFilled(69, 69); - expectPixelUnfilled(70, 70); - expectPixelUnfilled(0, 0); - expectPixelUnfilled(80, 80); - }); - test('with 9 params', () { - // Draw an image to the canvas from a canvas element. - otherContext.fillStyle = "blue"; - otherContext.fillRect(5, 5, 5, 5); - context.drawImageToRect(otherCanvas, new Rectangle(50, 50, 20, 20), - sourceRect: new Rectangle(2, 2, 6, 6)); - - checkPixel(readPixel(50, 50), [255, 0, 0, 255]); - checkPixel(readPixel(55, 55), [255, 0, 0, 255]); - checkPixel(readPixel(60, 50), [255, 0, 0, 255]); - checkPixel(readPixel(65, 65), [0, 0, 255, 255]); - checkPixel(readPixel(69, 69), [0, 0, 255, 255]); - expectPixelFilled(50, 50); - expectPixelFilled(55, 55); - expectPixelFilled(59, 59); - expectPixelFilled(60, 60); - expectPixelFilled(69, 69); - expectPixelUnfilled(70, 70); - expectPixelUnfilled(0, 0); - expectPixelUnfilled(80, 80); - }); - - test('createImageData', () { - var imageData = context.createImageData(15, 15); - expect(imageData.width, 15); - expect(imageData.height, 15); - - var other = context.createImageDataFromImageData(imageData); - expect(other.width, 15); - expect(other.height, 15); - }); - - test('createPattern', () { - var pattern = context.createPattern(new CanvasElement(), ''); - //var pattern2 = context.createPatternFromImage(new ImageElement(), ''); - }); -} diff --git a/tests/lib_2/html/canvasrendering/draw_image_video_element_test.dart b/tests/lib_2/html/canvasrendering/draw_image_video_element_test.dart deleted file mode 100644 index e8304d14c4c..00000000000 --- a/tests/lib_2/html/canvasrendering/draw_image_video_element_test.dart +++ /dev/null @@ -1,225 +0,0 @@ -// 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. - -// @dart = 2.9 - -library canvas_rendering_context_2d_test; - -import 'dart:async'; -import 'dart:html'; -import 'dart:math'; - -import 'canvas_rendering_util.dart'; -import 'package:async_helper/async_helper.dart'; - -// These videos and base64 strings are the same video, representing 2 -// frames of 8x8 red pixels. -// The videos were created with: -// convert -size 8x8 xc:red blank1.jpg -// convert -size 8x8 xc:red blank2.jpg -// avconv -f image2 -i "blank%d.jpg" -c:v libx264 small.mp4 -// avconv -i small.mp4 small.webm -// python -m base64 -e small.mp4 -// python -m base64 -e small.webm -var mp4VideoUrl = '/root_dart/tests/lib_2/html/small.mp4'; -var webmVideoUrl = '/root_dart/tests/lib_2/html/small.webm'; -var mp4VideoDataUrl = - 'data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAA' - 'AIZnJlZQAAAsdtZGF0AAACmwYF//+X3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlID' - 'EyMCByMjE1MSBhM2Y0NDA3IC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZW' - 'Z0IDIwMDMtMjAxMSAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG' - '9wdGlvbnM6IGNhYmFjPTEgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweD' - 'ExMSBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj' - '0wIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MCBjcW09MC' - 'BkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aH' - 'JlYWRzPTE4IHNsaWNlZF90aHJlYWRzPTAgbnI9MCBkZWNpbWF0ZT0xIGludGVybGFjZW' - 'Q9MCBibHVyYXlfY29tcGF0PTAgY29uc3RyYWluZWRfaW50cmE9MCBiZnJhbWVzPTMgYl' - '9weXJhbWlkPTAgYl9hZGFwdD0xIGJfYmlhcz0wIGRpcmVjdD0xIHdlaWdodGI9MCBvcG' - 'VuX2dvcD0xIHdlaWdodHA9MiBrZXlpbnQ9MjUwIGtleWludF9taW49MjUgc2NlbmVjdX' - 'Q9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD00MCByYz1jcmYgbWJ0cmVlPT' - 'EgY3JmPTUxLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IGlwX3' - 'JhdGlvPTEuMjUgYXE9MToxLjAwAIAAAAARZYiEB//3aoK5/tP9+8yeuIEAAAAHQZoi2P' - '/wgAAAAzxtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAAUAABAAABAAAAAAAAAA' - 'AAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAA' - 'AAAAAAAAAAAAAAAAAAAAACAAAAGGlvZHMAAAAAEICAgAcAT/////7/AAACUHRyYWsAAA' - 'BcdGtoZAAAAA8AAAAAAAAAAAAAAAEAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAQAAAA' - 'AAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAACAAAAAgAAAAAACRlZHRzAAAAHG' - 'Vsc3QAAAAAAAAAAQAAAFAAAAABAAEAAAAAAchtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAA' - 'AAAAAZAAAAAlXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSG' - 'FuZGxlcgAAAAFzbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZg' - 'AAAAAAAAABAAAADHVybCAAAAABAAABM3N0YmwAAACXc3RzZAAAAAAAAAABAAAAh2F2Yz' - 'EAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAACAAIAEgAAABIAAAAAAAAAAEAAAAAAAAAAA' - 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAAxYXZjQwFNQAr/4QAYZ01ACuiPyy' - '4C2QAAAwABAAADADIPEiUSAQAGaOvAZSyAAAAAGHN0dHMAAAAAAAAAAQAAAAIAAAABAA' - 'AAFHN0c3MAAAAAAAAAAQAAAAEAAAAYY3R0cwAAAAAAAAABAAAAAgAAAAEAAAAcc3RzYw' - 'AAAAAAAAABAAAAAQAAAAEAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAK0AAAACwAAAB' - 'hzdGNvAAAAAAAAAAIAAAAwAAAC5AAAAGB1ZHRhAAAAWG1ldGEAAAAAAAAAIWhkbHIAAA' - 'AAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAK2lsc3QAAAAjqXRvbwAAABtkYXRhAAAAAQ' - 'AAAABMYXZmNTMuMjEuMQ=='; -var webmVideoDataUrl = - 'data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChHdlY' - 'm1Ch4ECQoWBAhhTgGcBAAAAAAAB/hFNm3RALE27i1OrhBVJqWZTrIHfTbuMU6uEFlSua' - '1OsggEsTbuMU6uEHFO7a1OsggHk7AEAAAAAAACkAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' - 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' - 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA' - 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAA' - 'EEq17GDD0JATYCLTGF2ZjUzLjIxLjFXQYtMYXZmNTMuMjEuMXOkkJatuHwTJ7cvFLSzB' - 'Smxbp5EiYhAVAAAAAAAABZUrmsBAAAAAAAAR64BAAAAAAAAPteBAXPFgQGcgQAitZyDd' - 'W5khoVWX1ZQOIOBASPjg4QCYloA4AEAAAAAAAASsIEIuoEIVLCBCFS6gQhUsoEDH0O2d' - 'QEAAAAAAABZ54EAo72BAACA8AIAnQEqCAAIAABHCIWFiIWEiAICAnWqA/gD+gINTRgA/' - 'v0hRf/kb+PnRv/I4//8WE8DijI//FRAo5WBACgAsQEAARAQABgAGFgv9AAIAAAcU7trA' - 'QAAAAAAAA67jLOBALeH94EB8YIBfw=='; - -Future testWithThreeParams() async { - setupFunc(); - - video.onError.listen((_) { - throw ('URL failed to load.'); - }); - if (video.canPlayType('video/webm; codecs="vp8.0, vorbis"', '') != '') { - video.src = webmVideoUrl; - } else if (video.canPlayType( - 'video/mp4; codecs="avc1.4D401E, mp4a.40.2"', null) != - '') { - video.src = mp4VideoUrl; - } else { - window.console.log('Video is not supported on this system.'); - } - - // Without user interaction, playing the video requires autoplay to be enabled - // and autoplay can only be enabled if muted. We loop the video so there is - // always an active frame that can be drawn. - video.loop = true; - video.muted = true; - video.autoplay = true; - await video.play(); - context.drawImage(video, 50, 50); - - expectPixelFilled(50, 50); - expectPixelFilled(54, 54); - expectPixelFilled(57, 57); - expectPixelUnfilled(58, 58); - expectPixelUnfilled(0, 0); - expectPixelUnfilled(70, 70); - tearDownFunc(); -} - -Future testWithFiveParams() async { - setupFunc(); - - video.onError.listen((_) { - throw ('URL failed to load.'); - }); - - if (video.canPlayType('video/webm; codecs="vp8.0, vorbis"', '') != '') { - video.src = webmVideoUrl; - } else if (video.canPlayType( - 'video/mp4; codecs="avc1.4D401E, mp4a.40.2"', null) != - '') { - video.src = mp4VideoUrl; - } else { - // TODO(amouravski): Better fallback? - window.console.log('Video is not supported on this system.'); - } - - video.loop = true; - video.muted = true; - video.autoplay = true; - await video.play(); - context.drawImageToRect(video, new Rectangle(50, 50, 20, 20)); - - expectPixelFilled(50, 50); - expectPixelFilled(55, 55); - expectPixelFilled(59, 59); - expectPixelFilled(60, 60); - expectPixelFilled(69, 69); - expectPixelUnfilled(70, 70); - expectPixelUnfilled(0, 0); - expectPixelUnfilled(80, 80); - tearDownFunc(); -} - -Future testWithNineParams() async { - setupFunc(); - - video.onError.listen((_) { - throw ('URL failed to load.'); - }); - - if (video.canPlayType('video/webm; codecs="vp8.0, vorbis"', '') != '') { - video.src = webmVideoUrl; - } else if (video.canPlayType( - 'video/mp4; codecs="avc1.4D401E, mp4a.40.2"', null) != - '') { - video.src = mp4VideoUrl; - } else { - // TODO(amouravski): Better fallback? - window.console.log('Video is not supported on this system.'); - } - - video.loop = true; - video.muted = true; - video.autoplay = true; - await video.play(); - context.drawImageToRect(video, new Rectangle(50, 50, 20, 20), - sourceRect: new Rectangle(2, 2, 6, 6)); - - expectPixelFilled(50, 50); - expectPixelFilled(55, 55); - expectPixelFilled(59, 59); - expectPixelFilled(60, 60); - expectPixelFilled(69, 69); - expectPixelUnfilled(70, 70); - expectPixelUnfilled(0, 0); - expectPixelUnfilled(80, 80); - tearDownFunc(); -} - -Future testDataUrlWithNineParams() async { - setupFunc(); - - video = new VideoElement(); - canvas = new CanvasElement(); - - video.onError.listen((_) { - throw ('URL failed to load.'); - }); - - if (video.canPlayType('video/webm; codecs="vp8.0, vorbis"', '') != '') { - video.src = webmVideoDataUrl; - } else if (video.canPlayType( - 'video/mp4; codecs="avc1.4D401E, mp4a.40.2"', null) != - '') { - video.src = mp4VideoDataUrl; - } else { - // TODO(amouravski): Better fallback? - window.console.log('Video is not supported on this system.'); - } - - video.loop = true; - video.muted = true; - video.autoplay = true; - await video.play(); - context.drawImageToRect(video, new Rectangle(50, 50, 20, 20), - sourceRect: new Rectangle(2, 2, 6, 6)); - - expectPixelFilled(50, 50); - expectPixelFilled(55, 55); - expectPixelFilled(59, 59); - expectPixelFilled(60, 60); - expectPixelFilled(69, 69); - expectPixelUnfilled(70, 70); - expectPixelUnfilled(0, 0); - expectPixelUnfilled(80, 80); - tearDownFunc(); -} - -main() { - asyncTest(() async { - await testWithThreeParams(); - await testWithFiveParams(); - await testWithNineParams(); - await testDataUrlWithNineParams(); - }); -} diff --git a/tests/lib_2/html/canvasrendering/fill_text_test.dart b/tests/lib_2/html/canvasrendering/fill_text_test.dart deleted file mode 100644 index ad9381fa3fe..00000000000 --- a/tests/lib_2/html/canvasrendering/fill_text_test.dart +++ /dev/null @@ -1,87 +0,0 @@ -// 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. - -// @dart = 2.9 - -library canvas_rendering_context_2d_test; - -import 'dart:html'; -import 'dart:math'; - -import 'canvas_rendering_util.dart'; -import 'package:expect/minitest.dart'; - -main() { - setUp(setupFunc); - tearDown(tearDownFunc); - - final x = 20; - final y = 20; - - test('without maxWidth', () { - context.font = '40pt Garamond'; - context.fillStyle = 'blue'; - - // Draw a blue box. - context.fillText('█', x, y); - - var width = context.measureText('█').width.ceil(); - - checkPixel(readPixel(x, y), [0, 0, 255, 255]); - checkPixel(readPixel(x + 10, y), [0, 0, 255, 255]); - - expectPixelUnfilled(x - 10, y); - expectPixelFilled(x, y); - expectPixelFilled(x + 10, y); - - // The box does not draw after `width` pixels. - // Check -2 rather than -1 because this seems - // to run into a rounding error on Mac bots. - expectPixelFilled(x + width - 2, y); - expectPixelUnfilled(x + width + 1, y); - }); - - test('with maxWidth null', () { - context.font = '40pt Garamond'; - context.fillStyle = 'blue'; - - // Draw a blue box with null maxWidth. - context.fillText('█', x, y, null); - - var width = context.measureText('█').width.ceil(); - - checkPixel(readPixel(x, y), [0, 0, 255, 255]); - checkPixel(readPixel(x + 10, y), [0, 0, 255, 255]); - - expectPixelUnfilled(x - 10, y); - expectPixelFilled(x, y); - expectPixelFilled(x + 10, y); - - // The box does not draw after `width` pixels. - // Check -2 rather than -1 because this seems - // to run into a rounding error on Mac bots. - expectPixelFilled(x + width - 2, y); - expectPixelUnfilled(x + width + 1, y); - }); - - test('with maxWidth defined', () { - context.font = '40pt Garamond'; - context.fillStyle = 'blue'; - - final maxWidth = 20; - - // Draw a blue box that's at most 20 pixels wide. - context.fillText('█', x, y, maxWidth); - - checkPixel(readPixel(x, y), [0, 0, 255, 255]); - checkPixel(readPixel(x + 10, y), [0, 0, 255, 255]); - - // The box does not draw after 20 pixels. - expectPixelUnfilled(x - 10, y); - expectPixelUnfilled(x + maxWidth + 1, y); - expectPixelUnfilled(x + maxWidth + 20, y); - expectPixelFilled(x, y); - expectPixelFilled(x + 10, y); - }); -} diff --git a/tests/lib_2/html/canvasrendering/image_element_test.dart b/tests/lib_2/html/canvasrendering/image_element_test.dart deleted file mode 100644 index c5ee1d14ca5..00000000000 --- a/tests/lib_2/html/canvasrendering/image_element_test.dart +++ /dev/null @@ -1,110 +0,0 @@ -// 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. - -// @dart = 2.9 - -library canvas_rendering_context_2d_test; - -import 'dart:async'; -import 'dart:html'; -import 'dart:math'; - -import 'canvas_rendering_util.dart'; -import 'package:async_helper/async_helper.dart'; - -Future testWithThreeParams() async { - setupFunc(); - // Draw an image to the canvas from an image element. - var dataUrl = otherCanvas.toDataUrl('image/gif'); - var img = new ImageElement(); - - var loadedFuture = img.onLoad.first; - img.onError.listen((_) { - throw ('URL failed to load.'); - }); - img.src = dataUrl; - - await loadedFuture; - context.drawImage(img, 50, 50); - - expectPixelFilled(50, 50); - expectPixelFilled(55, 55); - expectPixelFilled(59, 59); - expectPixelUnfilled(60, 60); - expectPixelUnfilled(0, 0); - expectPixelUnfilled(70, 70); - tearDownFunc(); -} - -Future testWithFiveParams() async { - setupFunc(); - // Draw an image to the canvas from an image element and scale it. - var dataUrl = otherCanvas.toDataUrl('image/gif'); - var img = new ImageElement(); - - var loadedFuture = img.onLoad.first; - img.onError.listen((_) { - throw ('URL failed to load.'); - }); - img.src = dataUrl; - - await loadedFuture; - context.drawImageToRect(img, new Rectangle(50, 50, 20, 20)); - - expectPixelFilled(50, 50); - expectPixelFilled(55, 55); - expectPixelFilled(59, 59); - expectPixelFilled(60, 60); - expectPixelFilled(69, 69); - expectPixelUnfilled(70, 70); - expectPixelUnfilled(0, 0); - expectPixelUnfilled(80, 80); - tearDownFunc(); -} - -Future testWithNineParams() async { - setupFunc(); - // Draw an image to the canvas from an image element and scale it. - otherContext.fillStyle = "blue"; - otherContext.fillRect(5, 5, 5, 5); - var dataUrl = otherCanvas.toDataUrl('image/gif'); - var img = new ImageElement(); - - var loadedFuture = img.onLoad.first; - img.onError.listen((_) { - throw ('URL failed to load.'); - }); - img.src = dataUrl; - - await loadedFuture; - // This will take a 6x6 square from the first canvas from position 2,2 - // and then scale it to a 20x20 square and place it to the second - // canvas at 50,50. - context.drawImageToRect(img, new Rectangle(50, 50, 20, 20), - sourceRect: new Rectangle(2, 2, 6, 6)); - - checkPixel(readPixel(50, 50), [255, 0, 0, 255]); - checkPixel(readPixel(55, 55), [255, 0, 0, 255]); - checkPixel(readPixel(60, 50), [255, 0, 0, 255]); - checkPixel(readPixel(65, 65), [0, 0, 255, 255]); - checkPixel(readPixel(69, 69), [0, 0, 255, 255]); - - expectPixelFilled(50, 50); - expectPixelFilled(55, 55); - expectPixelFilled(59, 59); - expectPixelFilled(60, 60); - expectPixelFilled(69, 69); - expectPixelUnfilled(70, 70); - expectPixelUnfilled(0, 0); - expectPixelUnfilled(80, 80); - tearDownFunc(); -} - -main() { - asyncTest(() async { - await testWithThreeParams(); - await testWithFiveParams(); - await testWithNineParams(); - }); -} diff --git a/tests/lib_2/html/canvasrendering/pixel_manipulation_test.dart b/tests/lib_2/html/canvasrendering/pixel_manipulation_test.dart deleted file mode 100644 index 24e9e45ecd2..00000000000 --- a/tests/lib_2/html/canvasrendering/pixel_manipulation_test.dart +++ /dev/null @@ -1,173 +0,0 @@ -// 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. - -// @dart = 2.9 - -library canvas_rendering_context_2d_test; - -import 'dart:html'; -import 'dart:math'; - -import 'canvas_rendering_util.dart'; -import 'package:expect/minitest.dart'; - -main() { - setUp(setupFunc); - tearDown(tearDownFunc); - - test('setFillColorRgb', () { - context.setFillColorRgb(255, 0, 255, 1); - context.fillRect(0, 0, canvas.width, canvas.height); - expect(readPixel(2, 2), [255, 0, 255, 255]); - }); - - test('setFillColorHsl hue', () { - context.setFillColorHsl(0, 100, 50); - context.fillRect(0, 0, canvas.width, canvas.height); - checkPixel(readPixel(2, 2), [255, 0, 0, 255]); - }); - - test('setFillColorHsl hue 2', () { - context.setFillColorHsl(240, 100, 50); - context.fillRect(0, 0, canvas.width, canvas.height); - checkPixel(readPixel(2, 2), [0, 0, 255, 255]); - }); - - test('setFillColorHsl sat', () { - context.setFillColorHsl(0, 0, 50); - context.fillRect(0, 0, canvas.width, canvas.height); - checkPixel(readPixel(2, 2), [127, 127, 127, 255]); - }); - - test('setStrokeColorRgb', () { - context.setStrokeColorRgb(255, 0, 255, 1); - context.lineWidth = 10; - context.strokeRect(0, 0, canvas.width, canvas.height); - expect(readPixel(2, 2), [255, 0, 255, 255]); - }); - - test('setStrokeColorHsl hue', () { - context.setStrokeColorHsl(0, 100, 50); - context.lineWidth = 10; - context.strokeRect(0, 0, canvas.width, canvas.height); - expect(readPixel(2, 2), [255, 0, 0, 255]); - }); - - test('setStrokeColorHsl hue 2', () { - context.setStrokeColorHsl(240, 100, 50); - context.lineWidth = 10; - context.strokeRect(0, 0, canvas.width, canvas.height); - expect(readPixel(2, 2), [0, 0, 255, 255]); - }); - - test('setStrokeColorHsl sat', () { - context.setStrokeColorHsl(0, 0, 50); - context.lineWidth = 10; - context.strokeRect(0, 0, canvas.width, canvas.height); - checkPixel(readPixel(2, 2), [127, 127, 127, 255]); - }); - - test('fillStyle', () { - context.fillStyle = "red"; - context.fillRect(0, 0, canvas.width, canvas.height); - checkPixel(readPixel(2, 2), [255, 0, 0, 255]); - }); - - test('strokeStyle', () { - context.strokeStyle = "blue"; - context.lineWidth = 10; - context.strokeRect(0, 0, canvas.width, canvas.height); - expect(readPixel(2, 2), [0, 0, 255, 255]); - }); - - test('fillStyle linearGradient', () { - var gradient = context.createLinearGradient(0, 0, 20, 20); - gradient.addColorStop(0, 'red'); - gradient.addColorStop(1, 'blue'); - context.fillStyle = gradient; - context.fillRect(0, 0, canvas.width, canvas.height); - expect(context.fillStyle is CanvasGradient, isTrue); - }); - - test('putImageData', () { - context.fillStyle = 'green'; - context.fillRect(0, 0, canvas.width, canvas.height); - - ImageData expectedData = context.getImageData(0, 0, 10, 10); - expectedData.data[0] = 25; - expectedData.data[1] = 65; - expectedData.data[2] = 255; - // Set alpha to 255 to make the pixels show up. - expectedData.data[3] = 255; - - context.putImageData(expectedData, 0, 0); - - var resultingData = context.getImageData(0, 0, 10, 10); - // Make sure that we read back what we wrote. - expect(resultingData.data, expectedData.data); - }); - - test('putImageData dirty rectangle', () { - context.fillStyle = 'green'; - context.fillRect(0, 0, canvas.width, canvas.height); - - ImageData drawnData = context.getImageData(0, 0, 10, 10); - drawnData.data[0] = 25; - drawnData.data[1] = 65; - drawnData.data[2] = 255; - drawnData.data[3] = 255; - - // Draw these pixels to the 2nd pixel. - drawnData.data[2 * 4 + 0] = 25; - drawnData.data[2 * 4 + 1] = 65; - drawnData.data[2 * 4 + 2] = 255; - drawnData.data[2 * 4 + 3] = 255; - - // Draw these pixels to the 8th pixel. - drawnData.data[7 * 4 + 0] = 25; - drawnData.data[7 * 4 + 1] = 65; - drawnData.data[7 * 4 + 2] = 255; - drawnData.data[7 * 4 + 3] = 255; - - // Use a dirty rectangle to limit what pixels are drawn. - context.putImageData(drawnData, 0, 0, 1, 0, 5, 5); - - // Expect the data to be all green, as we skip all drawn pixels. - ImageData expectedData = context.createImageData(10, 10); - for (int i = 0; i < expectedData.data.length; i++) { - switch (i % 4) { - case 0: - expectedData.data[i] = 0; - break; - case 1: - expectedData.data[i] = 128; - break; - case 2: - expectedData.data[i] = 0; - break; - case 3: - expectedData.data[i] = 255; - break; - } - } - // Third pixel was copied. - expectedData.data[2 * 4 + 0] = 25; - expectedData.data[2 * 4 + 1] = 65; - expectedData.data[2 * 4 + 2] = 255; - expectedData.data[2 * 4 + 3] = 255; - - // Make sure that our data is all green. - var resultingData = context.getImageData(0, 0, 10, 10); - expect(resultingData.data, expectedData.data); - }); - - test('putImageData throws with wrong number of arguments', () { - ImageData expectedData = context.getImageData(0, 0, 10, 10); - - // TODO(antonm): in Dartium ArgumentError should be thrown too. - expect(() => context.putImageData(expectedData, 0, 0, 1), throws); - expect(() => context.putImageData(expectedData, 0, 0, 1, 1), throws); - expect(() => context.putImageData(expectedData, 0, 0, 1, 1, 5), throws); - }); -} diff --git a/tests/lib_2/html/cdata_test.dart b/tests/lib_2/html/cdata_test.dart deleted file mode 100644 index 168ab1d5e1b..00000000000 --- a/tests/lib_2/html/cdata_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - test('remove', () { - var div = new Element.html('
content
'); - var cdata = div.nodes[0]; - expect(cdata is CharacterData, true); - expect(cdata, isNotNull); - expect(div.innerHtml, 'content'); - - cdata.remove(); - expect(div.innerHtml, ''); - }); -} diff --git a/tests/lib_2/html/client_rect_test.dart b/tests/lib_2/html/client_rect_test.dart deleted file mode 100644 index 056d851d0e9..00000000000 --- a/tests/lib_2/html/client_rect_test.dart +++ /dev/null @@ -1,43 +0,0 @@ - -// @dart = 2.9 -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - var isRectList = - predicate((x) => x is DomRectList, 'should be a DomRectList'); - var isListOfRectangle = - predicate((x) => x is List, 'should be a List'); - - var isRectangle = predicate((x) => x is Rectangle, 'should be a Rectangle'); - var isDomRectReadOnly = - predicate((x) => x is DomRectReadOnly, 'should be a DomRectReadOnly'); - - insertTestDiv() { - var element = new Element.tag('div'); - element.innerHtml = r''' - A large block of text should go here. Click this - block of text multiple times to see each line - highlight with every click of the mouse button. - '''; - document.body.append(element); - return element; - } - - test("DomRectList test", () { - insertTestDiv(); - var range = new Range(); - var rects = range.getClientRects(); - expect(rects, isListOfRectangle); - expect(rects, isRectList); - }); - - test("ClientRect ==", () { - var rect1 = document.body.getBoundingClientRect(); - var rect2 = document.body.getBoundingClientRect(); - expect(rect1, isRectangle); - expect(rect1, isDomRectReadOnly); - expect(rect1, equals(rect2)); - }); -} diff --git a/tests/lib_2/html/convert_native_to_dart_dictionary_test.dart b/tests/lib_2/html/convert_native_to_dart_dictionary_test.dart deleted file mode 100644 index b61fea1df2a..00000000000 --- a/tests/lib_2/html/convert_native_to_dart_dictionary_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2021, 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:html_common'; -import 'package:expect/expect.dart'; -import 'package:expect/minitest.dart'; - -var obj = { - 'val1': 'hello', - 'val2': 'there', - 'val3': { - 'sub1': 'general kenobi', - 'sub2': 'you are', - 'sub3': 'a bold one', - 'sub4': { - 'nilval': null, - 'boolval': false, - } - }, - 'val4': [ - 'execute', - 'order', - '66', - {'number': 33} - ] -}; - -main() { - test('dart to native -> native to dart', () { - var toNative = convertDartToNative_Dictionary(obj); - var toDart = convertNativeToDart_Dictionary(toNative); - - Expect.deepEquals(obj, toDart); - }); -} diff --git a/tests/lib_2/html/cross_domain_iframe_script.html b/tests/lib_2/html/cross_domain_iframe_script.html deleted file mode 100644 index 41e2ea4751b..00000000000 --- a/tests/lib_2/html/cross_domain_iframe_script.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - cross_domain_iframe_script - - - - - - diff --git a/tests/lib_2/html/cross_domain_iframe_script.js b/tests/lib_2/html/cross_domain_iframe_script.js deleted file mode 100644 index 9dcdc755a47..00000000000 --- a/tests/lib_2/html/cross_domain_iframe_script.js +++ /dev/null @@ -1 +0,0 @@ -window.parent.postMessage('foobar', '*'); \ No newline at end of file diff --git a/tests/lib_2/html/cross_domain_iframe_test.dart b/tests/lib_2/html/cross_domain_iframe_test.dart deleted file mode 100644 index d49025fbc7a..00000000000 --- a/tests/lib_2/html/cross_domain_iframe_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:html'; -import 'package:expect/minitest.dart'; - -main() { - var uri = Uri.parse(window.location.href); - - var crossOriginPort = int.parse(uri.queryParameters['crossOriginPort']); - var crossOrigin = '${uri.scheme}://${uri.host}:$crossOriginPort'; - var crossOriginUrl = - '$crossOrigin/root_dart/tests/lib_2/html/cross_domain_iframe_script.html'; - - var iframe = new IFrameElement(); - iframe.src = crossOriginUrl; - document.body.append(iframe); - - return window.onMessage - .where((MessageEvent event) { - return event.origin == crossOrigin; - }) - .first - .then((MessageEvent event) { - expect(event.data, equals('foobar')); - expect(event.source, isNotNull); - }); -} diff --git a/tests/lib_2/html/cross_frame_test.dart b/tests/lib_2/html/cross_frame_test.dart deleted file mode 100644 index 4dcf5628251..00000000000 --- a/tests/lib_2/html/cross_frame_test.dart +++ /dev/null @@ -1,73 +0,0 @@ - -// @dart = 2.9 -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - var isWindowBase = predicate((x) => x is WindowBase, 'is a WindowBase'); - var isWindow = predicate((x) => x is Window, 'is a Window'); - var isLocationBase = predicate((x) => x is LocationBase, 'is a LocationBase'); - var isLocation = predicate((x) => x is Location, 'is a Location'); - var isHistoryBase = predicate((x) => x is HistoryBase, 'is a HistoryBase'); - var isHistory = predicate((x) => x is History, 'is a History'); - - final dynamic iframe = new IFrameElement(); - document.body.append(iframe); - - test('window', () { - expect(window, isWindow); - expect(window.document, document); - }); - - test('iframe', () { - final frameWindow = iframe.contentWindow; - expect(frameWindow, isWindowBase); - //TODO(gram) The next test should be written as: - // expect(frameWindow, isNot(isWindow)); - // but that will cause problems now until is/is! work - // properly in dart2js instead of always returning true. - expect(frameWindow is! Window, isTrue); - expect(frameWindow.parent, isWindow); - - // Ensure that the frame's document is inaccessible via window. - expect(() => frameWindow.document, throws); - }); - - test('contentDocument', () { - // Ensure that the frame's document is inaccessible. - expect(() => iframe.contentDocument, throws); - }); - - test('location', () { - expect(window.location, isLocation); - final frameLocation = iframe.contentWindow.location; - expect(frameLocation, isLocationBase); - // TODO(gram) Similar to the above, the next test should be: - // expect(frameLocation, isNot(isLocation)); - expect(frameLocation is! Location, isTrue); - - expect(() => frameLocation.href, throws); - expect(() => frameLocation.hash, throws); - - final frameParentLocation = iframe.contentWindow.parent.location; - expect(frameParentLocation, isLocation); - }); - - test('history', () { - expect(window.history, isHistory); - final frameHistory = iframe.contentWindow.history; - expect(frameHistory, isHistoryBase); - // See earlier comments. - //expect(frameHistory, isNot(isHistory)); - expect(frameHistory is! History, isTrue); - - // Valid methods. - frameHistory.forward(); - - expect(() => frameHistory.length, throws); - - final frameParentHistory = iframe.contentWindow.parent.history; - expect(frameParentHistory, isHistory); - }); -} diff --git a/tests/lib_2/html/crypto_test.dart b/tests/lib_2/html/crypto_test.dart deleted file mode 100644 index 7a9d8d88c87..00000000000 --- a/tests/lib_2/html/crypto_test.dart +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'dart:html'; -import 'dart:typed_data'; - -import 'package:expect/minitest.dart'; - -main() { - group('supported', () { - test('supported', () { - expect(Crypto.supported, true); - }); - }); - - group('functional', () { - if (Crypto.supported) { - // This will actually pass on FF since it has a Crypto API, but it is - // incompatible. - test('exists', () { - var crypto = window.crypto; - expect(crypto is Crypto, isTrue); - }); - - test('successful call', () { - var crypto = window.crypto; - var data = new Uint8List(100); - expect(data.every((e) => e == 0), isTrue); - crypto.getRandomValues(data); - // In theory this is flaky. However, in practice you will get 100 zeroes - // in a row from a cryptographically secure random number generator so - // rarely that we don't have to worry about it. - expect(data.any((e) => e != 0), isTrue); - }); - - test('type mismatch', () { - var crypto = window.crypto; - var data = new Float32List(100); - expect(() { - crypto.getRandomValues(data); - }, throws, reason: 'Only typed array views with integer types allowed'); - }); - } - }); -} diff --git a/tests/lib_2/html/css_rule_list_test.dart b/tests/lib_2/html/css_rule_list_test.dart deleted file mode 100644 index 8b61620029a..00000000000 --- a/tests/lib_2/html/css_rule_list_test.dart +++ /dev/null @@ -1,16 +0,0 @@ - -// @dart = 2.9 -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - var isCssRuleList = - predicate((x) => x is List, 'is a List'); - - test("ClientRectList test", () { - var sheet = document.styleSheets[0] as CssStyleSheet; - List rulesList = sheet.cssRules; - expect(rulesList, isCssRuleList); - }); -} diff --git a/tests/lib_2/html/css_selector_test.dart b/tests/lib_2/html/css_selector_test.dart deleted file mode 100644 index 6540b481f86..00000000000 --- a/tests/lib_2/html/css_selector_test.dart +++ /dev/null @@ -1,50 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:html'; - -import 'package:expect/expect.dart'; -import 'utils.dart'; - -main() { - final String htmlPayload = "
" - "
" - "

" - "Test #1" - "

" - "
" - "
" - "

" - "Test #2" - "

" - "
" - "
"; - - final elements = - new Element.html(htmlPayload, treeSanitizer: new NullTreeSanitizer()); - document.body.nodes.add(elements); - - var para = document.body.querySelector('p') as ParagraphElement; - para.classes.removeAll(['a', 'b']); - - para = document.body.querySelector('p') as ParagraphElement; - Expect.equals('

Test #1

', para.outerHtml); - - para = document.body.querySelector('p') as ParagraphElement; - para.classes.addAll(['c']); - - para = document.body.querySelector('p') as ParagraphElement; - Expect.equals('

Test #1

', para.outerHtml); - - var allPara = document.body.querySelectorAll('p'); - allPara.classes.removeAll(['b', 'c']); - - var checkAllPara = document.body.querySelectorAll('p'); - Expect.equals( - '

Test #1

', checkAllPara[0].outerHtml); - Expect.equals( - '

Test #2

', checkAllPara[1].outerHtml); -} diff --git a/tests/lib_2/html/css_test.dart b/tests/lib_2/html/css_test.dart deleted file mode 100644 index 2d60c97d830..00000000000 --- a/tests/lib_2/html/css_test.dart +++ /dev/null @@ -1,46 +0,0 @@ - -// @dart = 2.9 -library CssTest; - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - group('supportsPointConversions', () { - test('supported', () { - expect(Window.supportsPointConversions, true); - }); - }); - - group('functional', () { - test('DomPoint', () { - var expectation = - Window.supportsPointConversions ? returnsNormally : throws; - expect(() { - Element element = new Element.tag('div'); - element.attributes['style'] = ''' - position: absolute; - width: 60px; - height: 100px; - left: 0px; - top: 0px; - background-color: red; - -webkit-transform: translate3d(250px, 100px, 0px); - -moz-transform: translate3d(250px, 100px, 0px); - '''; - document.body.append(element); - - var elemRect = element.getBoundingClientRect(); - - checkPoint(250, 100, new Point(elemRect.left, elemRect.top)); - checkPoint(310, 200, new Point(elemRect.right, elemRect.bottom)); - }, expectation); - }); - }); -} - -void checkPoint(expectedX, expectedY, Point point) { - expect(point.x.round(), equals(expectedX), reason: 'Wrong point.x'); - expect(point.y.round(), equals(expectedY), reason: 'Wrong point.y'); -} diff --git a/tests/lib_2/html/cssstyledeclaration_test.dart b/tests/lib_2/html/cssstyledeclaration_test.dart deleted file mode 100644 index 393139e14b0..00000000000 --- a/tests/lib_2/html/cssstyledeclaration_test.dart +++ /dev/null @@ -1,167 +0,0 @@ -// 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 CssStyleDeclarationTest; - -import 'dart:async'; -import 'dart:html'; - -import 'package:async_helper/async_minitest.dart'; - -import 'utils.dart'; - -main() { - createTestStyle() { - return new CssStyleDeclaration.css(""" - color: blue; - width: 2px !important; - """); - } - - ; - - test('default constructor is empty', () { - var style = new CssStyleDeclaration(); - expect(style.cssText.isEmpty, isTrue); - expect(style.getPropertyPriority('color').isEmpty, isTrue); - expect(style.item(0).isEmpty, isTrue); - expect(style.length, 0); - // These assertions throw a UnimplementedError in dartium: - // expect(style.parentRule, isNull); - // expect(style.getPropertyCssValue('color'), isNull); - // expect(style.getPropertyShorthand('color'), isNull); - }); - - test('length is wrapped', () { - expect(createTestStyle().length, 2); - }); - - test('getPropertyPriority is wrapped', () { - var style = createTestStyle(); - expect(style.getPropertyPriority("color").isEmpty, isTrue); - expect(style.getPropertyPriority("width"), equals("important")); - }); - - test('removeProperty is wrapped', () { - var style = createTestStyle(); - style.removeProperty("width"); - expect(style.cssText.trim(), equals("color: blue;")); - }); - - test('CSS property empty getters and setters', () { - var style = createTestStyle(); - expect(style.border, equals("")); - - style.border = "1px solid blue"; - style.border = ""; - expect(style.border, equals("")); - - style.border = "1px solid blue"; - style.border = null; - expect(style.border, equals("")); - }); - - test('CSS property getters and setters', () { - var style = createTestStyle(); - expect(style.color, equals("blue")); - expect(style.width, equals("2px")); - - style.color = "red"; - style.transform = "translate(10px, 20px)"; - - expect(style.color, equals("red")); - expect(style.transform, equals("translate(10px, 20px)")); - }); - - test('Browser prefixes', () { - var element = new DivElement(); - element.style.transform = 'translateX(10px)'; - document.body.children.add(element); - - var style = element.getComputedStyle(); - // Some browsers will normalize this, so it'll be a matrix rather than - // the original string. Just check that it's something other than null. - expect(style.transform.length, greaterThan(3)); - }); - - // IE9 requires an extra poke for some properties to get applied. - test('IE9 Invalidation', () { - var element = new DivElement(); - document.body.children.add(element); - - // Need to wait one tick after the element has been added to the page. - new Timer(const Duration(milliseconds: 10), expectAsync(() { - element.style.textDecoration = 'underline'; - var style = element.getComputedStyle(); - expect(style.textDecoration.contains('underline'), isTrue); - })); - }); - - test('Invalid values', () { - var element = new DivElement(); - // Should not throw an error. - element.style.background = 'some_bad_value'; - }); - - test('css multi get', () { - var listElement = new Element.html( - '
    ' - '
  • ' - '
  • ' - '
', - treeSanitizer: new NullTreeSanitizer()); - document.documentElement.children.add(listElement); - - var elements = document.querySelectorAll('li'); - expect(elements.style.backgroundColor, equals('red')); - expect(elements.style.borderLeftWidth, equals('10px')); - elements = document.querySelectorAll('.baz'); - expect(elements.style.backgroundColor, equals('black')); - expect(elements.style.borderLeftWidth, equals('')); - elements = document.querySelectorAll('.bar'); - expect(elements.style.backgroundColor, equals('red')); - }); - - test('css multi set', () { - var listElement = new Element.html( - '
    ' - '
  • ' - '
  • ' - '
', - treeSanitizer: new NullTreeSanitizer()); - document.documentElement.children.add(listElement); - - var elements = document.querySelectorAll('li'); - elements.style.backgroundColor = 'green'; - expect(elements.style.backgroundColor, equals('green')); - expect(elements.style.borderLeftWidth, equals('10px')); - - elements = document.querySelectorAll('.baz'); - expect(elements.style.backgroundColor, equals('green')); - elements.style.backgroundColor = 'yellow'; - expect(elements.style.backgroundColor, equals('yellow')); - expect(elements.style.borderLeftWidth, equals('')); - - elements = document.querySelectorAll('.bar'); - expect(elements.style.backgroundColor, equals('green')); - elements = document.querySelectorAll('#wat'); - expect(elements.style.backgroundColor, equals('yellow')); - - elements.style.borderLeftWidth = '18px'; - expect(elements.style.borderLeftWidth, equals('18px')); - elements = document.querySelectorAll('li'); - expect(elements.style.borderLeftWidth, equals('10px')); - }); - - test('supports property', () { - expect(document.body.style.supportsProperty('bogus-property'), false); - expect(document.body.style.supportsProperty('background'), true); - expect(document.body.style.supportsProperty('borderBottomWidth'), true); - expect(document.body.style.supportsProperty('animation'), true); - }); -} diff --git a/tests/lib_2/html/custom_tags_test.dart b/tests/lib_2/html/custom_tags_test.dart deleted file mode 100644 index 855c9f5438c..00000000000 --- a/tests/lib_2/html/custom_tags_test.dart +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -import 'utils.dart'; - -main() { - test('create via custom tag', () { - var element = new Element.tag('x-basic1')..id = 'basic1'; - document.body.nodes.add(element); - - var queryById = querySelector('#basic1'); - expect(queryById, equals(element)); - - var queryByTag = querySelectorAll('x-basic1'); - expect(queryByTag.length, equals(1)); - expect(queryByTag[0], equals(element)); - }); - - test('custom inner html', () { - var element = new DivElement(); - element.setInnerHtml("", - treeSanitizer: new NullTreeSanitizer()); - document.body.nodes.add(element); - - var queryById = querySelector('#basic2'); - expect(queryById is Element, isTrue); - - var queryByTag = querySelectorAll('x-basic2'); - expect(queryByTag.length, equals(1)); - expect(queryByTag[0], equals(queryById)); - }); - - test('type extension inner html', () { - var element = new DivElement(); - element.setInnerHtml("
", - treeSanitizer: new NullTreeSanitizer()); - document.body.nodes.add(element); - - var queryById = querySelector('#basic3'); - expect(queryById is DivElement, isTrue); - }); -} diff --git a/tests/lib_2/html/dart_object_local_storage_test.dart b/tests/lib_2/html/dart_object_local_storage_test.dart deleted file mode 100644 index 3dd01fc3262..00000000000 --- a/tests/lib_2/html/dart_object_local_storage_test.dart +++ /dev/null @@ -1,33 +0,0 @@ - -// @dart = 2.9 -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -// TODO(vsm): Rename this to wrapper_caching_test or similar. It's -// basically a port of dom/dart_object_local_storage_test.dart. For -// wrapping implementation of dart:html (i.e., the dartium one), it is -// effectively testing dart_object_local_storage in the underlying dom -// object. -main() { - BodyElement body = document.body; - Storage localStorage = window.localStorage; - Storage sessionStorage = window.sessionStorage; - var element = new Element.tag('canvas'); - element.id = 'test'; - body.append(element); - - test('body', () { - expect(body, equals(document.body)); - }); - test('localStorage', () { - expect(localStorage, equals(window.localStorage)); - }); - test('sessionStorage', () { - expect(sessionStorage, equals(window.sessionStorage)); - }); - test('unknown', () { - var test = document.querySelector('#test'); - expect(element, equals(test)); - }); -} diff --git a/tests/lib_2/html/datalistelement_test.dart b/tests/lib_2/html/datalistelement_test.dart deleted file mode 100644 index f5c04e45a6a..00000000000 --- a/tests/lib_2/html/datalistelement_test.dart +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - var isDataListElement = - predicate((x) => x is DataListElement, 'is a DataListElement'); - - var div; - - setUp(() { - div = new DivElement(); - document.body.append(div); - div.innerHtml = """ - - - -"""; - }); - - tearDown(() { - document.body.nodes.removeLast(); - }); - - test('is', () { - try { - var list = document.querySelector('#browsers'); - expect(list, isDataListElement); - } catch (e) { - expect(DataListElement.supported, false); - } - }); - - test('list', () { - try { - var list = document.querySelector('#browsers') as DataListElement; - var input = document.querySelector('#input') as InputElement; - expect(input.list, list); - } catch (e) { - expect(DataListElement.supported, false); - } - }); - - test('options', () { - try { - var options = - (document.querySelector('#browsers') as DataListElement).options; - expect(options.length, 5); - } catch (e) { - expect(DataListElement.supported, false); - } - }); - - test('create', () { - try { - var list = new DataListElement(); - expect(list, isDataListElement); - } catch (e) { - expect(DataListElement.supported, false); - } - }); -} diff --git a/tests/lib_2/html/dispatch_parent_event.js b/tests/lib_2/html/dispatch_parent_event.js deleted file mode 100644 index ee204b46724..00000000000 --- a/tests/lib_2/html/dispatch_parent_event.js +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright (c) 2018, 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. -// -window.parent.dispatchEvent(new Event('detect_errors')); diff --git a/tests/lib_2/html/document_test.dart b/tests/lib_2/html/document_test.dart deleted file mode 100644 index 40dc9973782..00000000000 --- a/tests/lib_2/html/document_test.dart +++ /dev/null @@ -1,86 +0,0 @@ - -// @dart = 2.9 -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - var isElement = predicate((x) => x is Element, 'is an Element'); - var isDivElement = predicate((x) => x is DivElement, 'is a DivElement'); - var isAnchorElement = - predicate((x) => x is AnchorElement, 'is an AnchorElement'); - var isUnknownElement = - predicate((x) => x is UnknownElement, 'is UnknownElement'); - - var inscrutable; - - test('CreateElement', () { - // FIXME: nifty way crashes, do it boring way. - expect(new Element.tag('span'), isElement); - expect(new Element.tag('div'), isDivElement); - expect(new Element.tag('a'), isAnchorElement); - expect(new Element.tag('bad_name'), isUnknownElement); - }); - - group('document', () { - inscrutable = (x) => x; - - test('Document.query', () { - Document doc = new DomParser().parseFromString( - ''' - A - B - C - ''', - 'text/xml'); - - var rs = doc.querySelector('ResultSet'); - expect(rs, isNotNull); - }); - - test('CreateElement', () { - // FIXME: nifty way crashes, do it boring way. - expect(new Element.tag('span'), isElement); - expect(new Element.tag('div'), isDivElement); - expect(new Element.tag('a'), isAnchorElement); - expect(new Element.tag('bad_name'), isUnknownElement); - }); - - test('adoptNode', () { - var div = new Element.html('
bar
'); - var doc = document.implementation.createHtmlDocument(''); - expect(doc.adoptNode(div), div); - expect(div.ownerDocument, doc); - doc.body.nodes.add(div); - expect(doc.querySelector('#foo').text, 'bar'); - }); - - test('importNode', () { - var div = new Element.html('
bar
'); - var doc = document.implementation.createHtmlDocument(''); - var div2 = doc.importNode(div, true); - expect(div2, notEquals(div)); - expect(div2.ownerDocument, doc); - doc.body.nodes.add(div2); - expect(doc.querySelector('#foo').text, 'bar'); - }); - - test('typeTest1', () { - inscrutable = inscrutable(inscrutable); - var doc1 = document; - expect(doc1 is HtmlDocument, true); - expect(inscrutable(doc1) is HtmlDocument, true); - var doc2 = document.implementation.createHtmlDocument(''); - expect(doc2 is HtmlDocument, true); - expect(inscrutable(doc2) is HtmlDocument, true); - }); - - test('typeTest2', () { - inscrutable = inscrutable(inscrutable); - // XML document. - var doc3 = document.implementation.createDocument(null, 'report', null); - expect(doc3 is HtmlDocument, false); - expect(inscrutable(doc3) is HtmlDocument, false); - }); - }); -} diff --git a/tests/lib_2/html/documentfragment_test.dart b/tests/lib_2/html/documentfragment_test.dart deleted file mode 100644 index 1bf5e60a6a7..00000000000 --- a/tests/lib_2/html/documentfragment_test.dart +++ /dev/null @@ -1,172 +0,0 @@ -// 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -import 'utils.dart'; - -main() { - var isAnchorElement = - predicate((x) => x is AnchorElement, 'is an AnchorElement'); - - List _nodeStrings(Iterable input) { - var out = []; - for (Node n in input) { - if (n is Element) { - Element e = n; - out.add(e.tagName); - } else { - out.add(n.text); - } - } - return out; - } - - void expectEmptyStyleDeclaration(CssStyleDeclaration style) { - expect(style.cssText, equals('')); - expect(style.getPropertyPriority('color'), equals('')); - expect(style.item(0), equals('')); - expect(style.length, equals(0)); - // TODO(jacobr): these checks throw UnimplementedErrors in dartium. - // expect(style.parentRule, isNull); - // expect(style.getPropertyCssValue('color'), isNull); - // expect(style.getPropertyShorthand('color'), isNull); - // expect(style.isPropertyImplicit('color'), isFalse); - - // Ideally these would throw errors, but it's not possible to create a class - // that'll intercept these calls without implementing the entire - // CssStyleDeclaration interface, so we'll settle for them being no-ops. - style.cssText = '* {color: blue}'; - style.removeProperty('color'); - style.setProperty('color', 'blue'); - } - - group('constructors', () { - test('0-argument makes an empty fragment', () { - final fragment = new DocumentFragment(); - expect(fragment.children, equals([])); - }); - - test('.html parses input as HTML', () { - final fragment = new DocumentFragment.html('foo'); - expect(fragment.children[0], isAnchorElement); - }); - - // test('.svg parses input as SVG', () { - // final fragment = new DocumentFragment.svg('foo'); - // expect(fragment.children[0] is SVGAElement, isTrue); - // }); - - // TODO(nweiz): enable this once XML is ported. - // test('.xml parses input as XML', () { - // final fragment = new DocumentFragment.xml('foo'); - // expect(fragment.children[0] is XMLElement, isTrue); - // }); - }); - - group('children', () { - DocumentFragment fragment; - List children; - - init() { - fragment = new DocumentFragment(); - children = fragment.children; - fragment.nodes.addAll([ - new Text("1"), - new Element.tag("A"), - new Element.tag("B"), - new Text("2"), - new Element.tag("I"), - new Text("3"), - new Element.tag("U") - ]); - } - - ; - - test('is initially empty', () { - children = new DocumentFragment().children; - expect(children, equals([])); - expect(children.isEmpty, isTrue); - }); - - test('filters out non-element nodes', () { - init(); - expect(_nodeStrings(fragment.nodes), - equals(["1", "A", "B", "2", "I", "3", "U"])); - expect(_nodeStrings(children), equals(["A", "B", "I", "U"])); - }); - - test('only indexes children, not other nodes', () { - init(); - children[1] = new Element.tag("BR"); - expect(_nodeStrings(fragment.nodes), - equals(["1", "A", "BR", "2", "I", "3", "U"])); - expect(_nodeStrings(children), equals(["A", "BR", "I", "U"])); - }); - - test('adds to both children and nodes', () { - init(); - children.add(new Element.tag("UL")); - expect(_nodeStrings(fragment.nodes), - equals(["1", "A", "B", "2", "I", "3", "U", "UL"])); - expect(_nodeStrings(children), equals(["A", "B", "I", "U", "UL"])); - }); - - test('removes only children, from both children and nodes', () { - init(); - expect(children.removeLast().tagName, equals('U')); - expect( - _nodeStrings(fragment.nodes), equals(["1", "A", "B", "2", "I", "3"])); - expect(_nodeStrings(children), equals(["A", "B", "I"])); - - expect(children.removeLast().tagName, "I"); - expect(_nodeStrings(fragment.nodes), equals(["1", "A", "B", "2", "3"])); - expect(_nodeStrings(children), equals(["A", "B"])); - }); - - test('accessors are wrapped', () { - init(); - expect(children[0].tagName, "A"); - expect(_nodeStrings(children.where((e) => e.tagName == "I")), ["I"]); - expect(children.every((e) => e is Element), isTrue); - expect(children.any((e) => e.tagName == "U"), isTrue); - expect(children.isEmpty, isFalse); - expect(children.length, 4); - expect(children[2].tagName, "I"); - expect(children.last.tagName, "U"); - }); - - test('setting children overwrites nodes as well', () { - init(); - fragment.children = [new Element.tag("DIV"), new Element.tag("HEAD")]; - expect(_nodeStrings(fragment.nodes), equals(["DIV", "HEAD"])); - }); - }); - - test('setting innerHtml works', () { - var fragment = new DocumentFragment(); - fragment.append(new Text("foo")); - fragment.innerHtml = "barbaz"; - expect(_nodeStrings(fragment.nodes), equals(["A", "baz"])); - }); - - test('getting innerHtml works', () { - var fragment = new DocumentFragment(); - fragment.nodes.addAll([new Text("foo"), new Element.html("bar")]); - expect(fragment.innerHtml, "foobar"); - }); - - test('query searches the fragment', () { - var fragment = new DocumentFragment.html( - "
foobar
"); - expect(fragment.querySelector(".foo a").tagName, "A"); - expect(_nodeStrings(fragment.querySelectorAll(".foo *")), - equals(["A", "B"])); - }); -} diff --git a/tests/lib_2/html/dom_constructors_test.dart b/tests/lib_2/html/dom_constructors_test.dart deleted file mode 100644 index ef6867c809d..00000000000 --- a/tests/lib_2/html/dom_constructors_test.dart +++ /dev/null @@ -1,12 +0,0 @@ - -// @dart = 2.9 -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - test('FileReader', () { - FileReader fileReader = new FileReader(); - expect(fileReader.readyState, equals(FileReader.EMPTY)); - }); -} diff --git a/tests/lib_2/html/dom_isolates_test.dart.child_isolate.dart b/tests/lib_2/html/dom_isolates_test.dart.child_isolate.dart deleted file mode 100644 index ef564f96695..00000000000 --- a/tests/lib_2/html/dom_isolates_test.dart.child_isolate.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'dart:html'; -import 'dart:isolate'; - -main() { - port.receive((msg, replyTo) { - if (msg != 'check') { - replyTo.send('wrong msg: $msg'); - } - replyTo.send('${window.location}'); - port.close(); - }); -} diff --git a/tests/lib_2/html/domparser_test.dart b/tests/lib_2/html/domparser_test.dart deleted file mode 100644 index e240f60cf30..00000000000 --- a/tests/lib_2/html/domparser_test.dart +++ /dev/null @@ -1,15 +0,0 @@ - -// @dart = 2.9 -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - var isDomParser = predicate((x) => x is DomParser, 'is a DomParser'); - - test('constructorTest', () { - var ctx = new DomParser(); - expect(ctx, isNotNull); - expect(ctx, isDomParser); - }); -} diff --git a/tests/lib_2/html/element_add_test.dart b/tests/lib_2/html/element_add_test.dart deleted file mode 100644 index 3edd994fef6..00000000000 --- a/tests/lib_2/html/element_add_test.dart +++ /dev/null @@ -1,269 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -import 'utils.dart'; - -main() { - var isSpanElement = predicate((x) => x is SpanElement, 'is a SpanElement'); - var isDivElement = predicate((x) => x is DivElement, 'is a DivElement'); - var isText = predicate((x) => x is Text, 'is a Text'); - - void expectNoSuchMethod(void fn()) => expect(fn, throwsNoSuchMethodError); - - group('append', () { - test('htmlelement', () { - var el = new DivElement(); - el.append(new SpanElement()); - expect(el.children.length, equals(1)); - var span = el.children[0]; - expect(span, isSpanElement); - - el.append(new DivElement()); - expect(el.children.length, equals(2)); - // Validate that the first item is still first. - expect(el.children[0], equals(span)); - expect(el.children[1], isDivElement); - }); - - test('documentFragment', () { - var fragment = new DocumentFragment(); - fragment.append(new SpanElement()); - expect(fragment.children.length, equals(1)); - expect(fragment.children[0], isSpanElement); - }); - }); - - group('appendHtml', () { - test('htmlelement', () { - var el = new DivElement(); - el.appendHtml(''); - expect(el.children.length, equals(1)); - var span = el.children[0]; - expect(span, isSpanElement); - - el.appendHtml('
'); - expect(el.children.length, equals(2)); - // Validate that the first item is still first. - expect(el.children[0], equals(span)); - expect(el.children[1], isDivElement); - }); - - test('documentFragment', () { - var fragment = new DocumentFragment(); - fragment.appendHtml('something'); - expect(fragment.children.length, equals(1)); - expect(fragment.children[0], isSpanElement); - }); - - test('html interpreted in correct context', () { - // appendHtml, in order to sanitize, needs to create a document fragment, - // but it needs to be created in the right context. If we try to append - // table components then the document fragment needs the table context - // or it will fail to create them. - var el = new TableElement(); - el.appendHtml('foo'); - expect(el.children.length, 1); - var section = el.children.first; - expect(section is TableSectionElement, isTrue); - var row = section.children.first; - expect(row is TableRowElement, isTrue); - var item = row.children.first; - expect(item is TableCellElement, isTrue); - expect(item.innerHtml, 'foo'); - }); - - test("use body context for elements that are don't support it", () { - // Some elements can't be used as context for createContextualFragment, - // often because it doesn't make any sense. So adding children to a - //
has no real effect on the page, but we can do it. But the - // document fragment will have to be created in the body context. Verify - // that this doesn't throw and that the children show up. - var el = new BRElement(); - el.appendHtml("

Stuff

"); - expect(el.children.length, 1); - expect(el.children[0].outerHtml, "

Stuff

"); - }); - }); - - group('appendText', () { - test('htmlelement', () { - var el = new DivElement(); - el.appendText('foo'); - // No children were created. - expect(el.children.length, equals(0)); - // One text node was added. - expect(el.nodes.length, equals(1)); - }); - - test('htmlelement', () { - var el = new DivElement(); - var twoNewLines = "\n\n"; - el.appendText(twoNewLines); - // No children were created. - expect(el.children.length, equals(0)); - // One text node was added. - expect(el.nodes.length, equals(1)); - expect(el.nodes[0], isText); - expect(el.nodes[0].text, equals(twoNewLines)); - expect(el.text, equals(twoNewLines)); - }); - - test('documentFragment', () { - var fragment = new DocumentFragment(); - fragment.appendText('foo'); - // No children were created. - expect(fragment.children.length, equals(0)); - // One text node was added. - expect(fragment.nodes.length, equals(1)); - }); - }); - - group('insertAdjacentElement', () { - test('beforebegin', () { - var parent = new DivElement(); - var child = new DivElement(); - var newChild = new SpanElement(); - parent.children.add(child); - - child.insertAdjacentElement('beforebegin', newChild); - - expect(parent.children.length, 2); - expect(parent.children[0], isSpanElement); - }); - - test('afterend', () { - var parent = new DivElement(); - var child = new DivElement(); - var newChild = new SpanElement(); - parent.children.add(child); - - child.insertAdjacentElement('afterend', newChild); - - expect(parent.children.length, 2); - expect(parent.children[1], isSpanElement); - }); - - test('afterbegin', () { - var parent = new DivElement(); - var child = new DivElement(); - var newChild = new SpanElement(); - parent.children.add(child); - - parent.insertAdjacentElement('afterbegin', newChild); - - expect(parent.children.length, 2); - expect(parent.children[0], isSpanElement); - }); - - test('beforeend', () { - var parent = new DivElement(); - var child = new DivElement(); - var newChild = new SpanElement(); - parent.children.add(child); - - parent.insertAdjacentElement('beforeend', newChild); - - expect(parent.children.length, 2); - expect(parent.children[1], isSpanElement); - }); - }); - - group('insertAdjacentHtml', () { - test('beforebegin', () { - var parent = new DivElement(); - var child = new DivElement(); - parent.children.add(child); - - child.insertAdjacentHtml('beforebegin', ''); - - expect(parent.children.length, 2); - expect(parent.children[0], isSpanElement); - }); - - test('afterend', () { - var parent = new DivElement(); - var child = new DivElement(); - parent.children.add(child); - - child.insertAdjacentHtml('afterend', ''); - - expect(parent.children.length, 2); - expect(parent.children[1], isSpanElement); - }); - - test('afterbegin', () { - var parent = new DivElement(); - var child = new DivElement(); - parent.children.add(child); - - parent.insertAdjacentHtml('afterbegin', ''); - - expect(parent.children.length, 2); - expect(parent.children[0], isSpanElement); - }); - - test('beforeend', () { - var parent = new DivElement(); - var child = new DivElement(); - parent.children.add(child); - - parent.insertAdjacentHtml('beforeend', ''); - - expect(parent.children.length, 2); - expect(parent.children[1], isSpanElement); - }); - }); - - group('insertAdjacentText', () { - test('beforebegin', () { - var parent = new DivElement(); - var child = new DivElement(); - parent.children.add(child); - - child.insertAdjacentText('beforebegin', 'test'); - - expect(parent.nodes.length, 2); - expect(parent.nodes[0], isText); - }); - - test('afterend', () { - var parent = new DivElement(); - var child = new DivElement(); - parent.children.add(child); - - child.insertAdjacentText('afterend', 'test'); - - expect(parent.nodes.length, 2); - expect(parent.nodes[1], isText); - }); - - test('afterbegin', () { - var parent = new DivElement(); - var child = new DivElement(); - parent.children.add(child); - - parent.insertAdjacentText('afterbegin', 'test'); - - expect(parent.nodes.length, 2); - expect(parent.nodes[0], isText); - }); - - test('beforeend', () { - var parent = new DivElement(); - var child = new DivElement(); - parent.children.add(child); - - parent.insertAdjacentText('beforeend', 'test'); - - expect(parent.nodes.length, 2); - expect(parent.nodes[1], isText); - }); - }); -} diff --git a/tests/lib_2/html/element_animate_simple_timing_test.dart b/tests/lib_2/html/element_animate_simple_timing_test.dart deleted file mode 100644 index a70dbf50bea..00000000000 --- a/tests/lib_2/html/element_animate_simple_timing_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -// 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. - -// @dart = 2.9 - -library element_animate_test; - -import 'dart:async'; -import 'dart:html'; - -import 'package:async_helper/async_minitest.dart'; - -main() { - test('simple timing', () { - if (Animation.supported) { - var body = document.body; - var opacity = num.parse(body.getComputedStyle().opacity); - body.animate([ - {"opacity": 100}, - {"opacity": 0} - ], 100); - var newOpacity = num.parse(body.getComputedStyle().opacity); - expect(newOpacity == opacity, isTrue); - } - }); -} diff --git a/tests/lib_2/html/element_animate_supported_test.dart b/tests/lib_2/html/element_animate_supported_test.dart deleted file mode 100644 index 5eb33b82714..00000000000 --- a/tests/lib_2/html/element_animate_supported_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// 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. - -// @dart = 2.9 - -library element_animate_test; - -import 'dart:async'; -import 'dart:html'; - -import 'package:async_helper/async_minitest.dart'; - -main() { - test('supported', () { - expect(Animation.supported, isTrue); - }); -} diff --git a/tests/lib_2/html/element_animate_timing_dict_test.dart b/tests/lib_2/html/element_animate_timing_dict_test.dart deleted file mode 100644 index 156893ca5e5..00000000000 --- a/tests/lib_2/html/element_animate_timing_dict_test.dart +++ /dev/null @@ -1,33 +0,0 @@ -// 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. - -// @dart = 2.9 - -library element_animate_test; - -import 'dart:async'; -import 'dart:html'; - -import 'package:async_helper/async_minitest.dart'; - -main() { - test('timing dict', () { - if (Animation.supported) { - var body = document.body; - // Animate different characteristics so the tests can run concurrently. - var fontSize = body.getComputedStyle().fontSize; - var player = body.animate([ - {"font-size": "500px"}, - {"font-size": fontSize} - ], { - "duration": 100 - }); - var newFontSize = body.getComputedStyle().fontSize; - // Don't bother to parse to numbers, as long as it's changed that - // indicates something is happening. - expect(newFontSize == fontSize, isFalse); - player.on['finish'].listen(expectAsync((_) => 'done')); - } - }); -} diff --git a/tests/lib_2/html/element_classes_svg_test.dart b/tests/lib_2/html/element_classes_svg_test.dart deleted file mode 100644 index c46c5c85765..00000000000 --- a/tests/lib_2/html/element_classes_svg_test.dart +++ /dev/null @@ -1,231 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'dart:collection'; -import 'dart:html'; -import 'dart:svg' as svg; - -import "package:expect/expect.dart"; -import 'package:expect/minitest.dart'; - -// Test for `querySelectorAll(xxx).classes.op()` where the query returns mixed -// Html and Svg elements. - -Element makeElementsContainer() { - var e = new Element.html('
    ' - '
  • ' - '
'); - final svgContent = r""" - - - -"""; - final svgElement = new svg.SvgElement.svg(svgContent); - e.append(svgElement); - return e; -} - -Element elementsContainer; - -/// Test top-level querySelectorAll with generics. -topLevelQuerySelector() { - var noElementsTop = querySelectorAll('.no'); - expect(noElementsTop.length, 0); - expect(noElementsTop is List, true); - - // Expect runtime error all elements in the list are not the proper type. - Expect.throwsAssertionError(() => querySelectorAll('path'), - 'All elements not of type CircleElement'); - - var simpleElems = querySelectorAll('circle'); - expect(simpleElems.length, 1); - expect(simpleElems is List, true); - expect(simpleElems is List, true); - expect(simpleElems is List, false); - expect(simpleElems[0] is svg.CircleElement, true); - - var varElementsFromTop = querySelectorAll('circle'); - expect(varElementsFromTop.length, 1); - expect(varElementsFromTop is List, true); - expect(varElementsFromTop is List, true); - expect(varElementsFromTop[0] is svg.CircleElement, true); - expect(varElementsFromTop is List, false); - expect(varElementsFromTop[0] is svg.PathElement, false); - - List elementsFromTop = - querySelectorAll('circle'); - expect(elementsFromTop is List, true); - expect(elementsFromTop is List, true); - expect(elementsFromTop[0] is svg.CircleElement, true); - expect(elementsFromTop.length, 1); -} - -ElementList elementsSetup() { - elementsContainer = makeElementsContainer(); - document.documentElement.children.add(elementsContainer); - var elements = document.querySelectorAll('.yes'); - expect(elements.length, 4); - - topLevelQuerySelector(); - - return elements; -} - -void elementsTearDown() { - if (elementsContainer != null) { - document.documentElement.children.remove(elementsContainer); - elementsContainer = null; - } -} - -/// Returns a canonical string for Set and lists of Element's classes. -String view(var e) { - if (e is Set) return '${e.toList()..sort()}'; - if (e is Element) return view(e.classes); - if (e is Iterable) return '${e.map(view).toList()}'; - throw new ArgumentError('Cannot make canonical view string for: $e}'); -} - -main() { - Set extractClasses(Element el) { - final match = new RegExp('class="([^"]+)"').firstMatch(el.outerHtml); - return new LinkedHashSet.from(match[1].split(' ')); - } - - tearDown(elementsTearDown); - - test('list_view', () { - // Test that the 'view' helper function is behaving. - var elements = elementsSetup(); - expect(view(elements.classes), '[classy, foo, quux, qux, yes]'); - expect(view(elements), - '[[foo, yes], [quux, qux, yes], [qux, yes], [classy, yes]]'); - }); - - test('listClasses=', () { - var elements = elementsSetup(); - - elements.classes = ['foo', 'qux']; - expect(view(elements.classes), '[foo, qux]'); - expect(view(elements), '[[foo, qux], [foo, qux], [foo, qux], [foo, qux]]'); - - var elements2 = document.querySelectorAll('.qux'); - expect(view(elements2.classes), '[foo, qux]'); - expect(view(elements2), '[[foo, qux], [foo, qux], [foo, qux], [foo, qux]]'); - - for (Element e in elements2) { - expect(e.classes, equals(['foo', 'qux'])); - expect(extractClasses(e), equals(['foo', 'qux'])); - } - - elements.classes = []; - expect(view(elements2.classes), '[]'); - expect(view(elements2), '[[], [], [], []]'); - }); - - test('listMap', () { - var elements = elementsSetup(); - expect(elements.classes.map((c) => c.toUpperCase()).toList(), - unorderedEquals(['YES', 'FOO', 'QUX', 'QUUX', 'CLASSY'])); - }); - - test('listContains', () { - var elements = elementsSetup(); - expect(elements.classes.contains('classy'), isTrue); - expect(elements.classes.contains('troll'), isFalse); - }); - - test('listAdd', () { - var elements = elementsSetup(); - var added = elements.classes.add('lassie'); - expect(added, isFalse); - - expect(view(elements.classes), '[classy, foo, lassie, quux, qux, yes]'); - expect( - view(elements), - '[[foo, lassie, yes], [lassie, quux, qux, yes], ' - '[lassie, qux, yes], [classy, lassie, yes]]'); - }); - - test('listRemove', () { - var elements = elementsSetup(); - expect(elements.classes.remove('lassi'), isFalse); - expect(view(elements.classes), '[classy, foo, quux, qux, yes]'); - expect(view(elements), - '[[foo, yes], [quux, qux, yes], [qux, yes], [classy, yes]]'); - - expect(elements.classes.remove('qux'), isTrue); - expect(view(elements.classes), '[classy, foo, quux, yes]'); - expect(view(elements), '[[foo, yes], [quux, yes], [yes], [classy, yes]]'); - }); - - test('listToggle', () { - var elements = elementsSetup(); - elements.classes.toggle('qux'); - expect(view(elements.classes), '[classy, foo, quux, qux, yes]'); - expect(view(elements), - '[[foo, qux, yes], [quux, yes], [yes], [classy, qux, yes]]'); - }); - - test('listAddAll', () { - var elements = elementsSetup(); - elements.classes.addAll(['qux', 'lassi', 'sassy']); - expect( - view(elements.classes), '[classy, foo, lassi, quux, qux, sassy, yes]'); - expect( - view(elements), - '[[foo, lassi, qux, sassy, yes], [lassi, quux, qux, sassy, yes], ' - '[lassi, qux, sassy, yes], [classy, lassi, qux, sassy, yes]]'); - }); - - test('listRemoveAll', () { - var elements = elementsSetup(); - elements.classes.removeAll(['qux', 'classy', 'mumble']); - expect(view(elements.classes), '[foo, quux, yes]'); - expect(view(elements), '[[foo, yes], [quux, yes], [yes], [yes]]'); - - elements.classes.removeAll(['foo', 'yes']); - expect(view(elements.classes), '[quux]'); - expect(view(elements), '[[], [quux], [], []]'); - }); - - test('listToggleAll', () { - var elements = elementsSetup(); - elements.classes.toggleAll(['qux', 'mornin']); - expect(view(elements.classes), '[classy, foo, mornin, quux, qux, yes]'); - expect( - view(elements), - '[[foo, mornin, qux, yes], [mornin, quux, yes], ' - '[mornin, yes], [classy, mornin, qux, yes]]'); - }); - - test('listRetainAll', () { - var elements = elementsSetup(); - elements.classes.retainAll(['bar', 'baz', 'classy', 'qux']); - expect(view(elements.classes), '[classy, qux]'); - expect(view(elements), '[[], [qux], [qux], [classy]]'); - }); - - test('listRemoveWhere', () { - var elements = elementsSetup(); - elements.classes.removeWhere((s) => s.startsWith('q')); - expect(view(elements.classes), '[classy, foo, yes]'); - expect(view(elements), '[[foo, yes], [yes], [yes], [classy, yes]]'); - }); - - test('listRetainWhere', () { - var elements = elementsSetup(); - elements.classes.retainWhere((s) => s.startsWith('q')); - expect(view(elements.classes), '[quux, qux]'); - expect(view(elements), '[[], [quux, qux], [qux], []]'); - }); - - test('listContainsAll', () { - var elements = elementsSetup(); - expect(elements.classes.containsAll(['qux', 'mornin']), isFalse); - expect(elements.classes.containsAll(['qux', 'classy']), isTrue); - }); -} diff --git a/tests/lib_2/html/element_classes_test.dart b/tests/lib_2/html/element_classes_test.dart deleted file mode 100644 index 051aa13dfe1..00000000000 --- a/tests/lib_2/html/element_classes_test.dart +++ /dev/null @@ -1,392 +0,0 @@ -// 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 - -import 'dart:collection'; -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -Element makeElement() => new Element.tag('div'); - -Element makeElementWithClasses() => - new Element.html('
'); - -CssClassSet makeClassSet() => makeElementWithClasses().classes; - -Element makeListElement() => new Element.html('
    ' - '
  • ' - '
  • ' - '
  • ' - '
  • ' - '
'); - -Element listElement; - -ElementList listElementSetup() { - listElement = makeListElement(); - document.documentElement.children.add(listElement); - return document.querySelectorAll('li'); -} - -void listElementTearDown() { - if (listElement != null) { - document.documentElement.children.remove(listElement); - listElement = null; - } -} - -/// Returns a canonical string for Set and lists of Element's classes. -String view(var e) { - if (e is Set) return '${e.toList()..sort()}'; - if (e is Element) return view(e.classes); - if (e is Iterable) return '${e.map(view).toList()}'; - throw new ArgumentError('Cannot make canonical view string for: $e}'); -} - -main() { - Set extractClasses(Element el) { - final match = new RegExp('class="([^"]+)"').firstMatch(el.outerHtml); - return new LinkedHashSet.from(match[1].split(' ')); - } - - test('affects the "class" attribute', () { - final el = makeElementWithClasses(); - el.classes.add('qux'); - expect(extractClasses(el), equals(['foo', 'bar', 'baz', 'qux'])); - }); - - test('is affected by the "class" attribute', () { - final el = makeElementWithClasses(); - el.attributes['class'] = 'foo qux'; - expect(el.classes, equals(['foo', 'qux'])); - }); - - test('classes=', () { - final el = makeElementWithClasses(); - el.classes = ['foo', 'qux']; - expect(el.classes, equals(['foo', 'qux'])); - expect(extractClasses(el), equals(['foo', 'qux'])); - }); - - test('toString', () { - expect(makeClassSet().toString().split(' '), equals(['foo', 'bar', 'baz'])); - expect(makeElement().classes.toString(), ''); - }); - - test('forEach', () { - final classes = []; - makeClassSet().forEach(classes.add); - expect(classes, equals(['foo', 'bar', 'baz'])); - }); - - test('iterator', () { - final classes = []; - for (var el in makeClassSet()) { - classes.add(el); - } - expect(classes, equals(['foo', 'bar', 'baz'])); - }); - - test('map', () { - expect(makeClassSet().map((c) => c.toUpperCase()).toList(), - equals(['FOO', 'BAR', 'BAZ'])); - }); - - test('where', () { - expect(makeClassSet().where((c) => c.contains('a')).toList(), - equals(['bar', 'baz'])); - }); - - test('every', () { - expect(makeClassSet().every((c) => c is String), isTrue); - expect(makeClassSet().every((c) => c.contains('a')), isFalse); - }); - - test('any', () { - expect(makeClassSet().any((c) => c.contains('a')), isTrue); - expect(makeClassSet().any((c) => c is num), isFalse); - }); - - test('isEmpty', () { - expect(makeClassSet().isEmpty, isFalse); - expect(makeElement().classes.isEmpty, isTrue); - }); - - test('length', () { - expect(makeClassSet().length, 3); - expect(makeElement().classes.length, 0); - }); - - test('contains', () { - expect(makeClassSet().contains('foo'), isTrue); - expect(makeClassSet().contains('qux'), isFalse); - }); - - test('contains-bad', () { - // Non-strings return `false`. - // Strings need to be valid tokens. - final classes = makeClassSet(); - expect(classes.contains(1), isFalse); - expect(() => classes.contains(''), throws); - expect(() => classes.contains('foo bar'), throws); - }); - - test('add', () { - final classes = makeClassSet(); - var added = classes.add('qux'); - expect(added, isTrue); - expect(classes, equals(['foo', 'bar', 'baz', 'qux'])); - - added = classes.add('qux'); - expect(added, isFalse); - final list = new List.from(classes); - list.sort((a, b) => a.compareTo(b)); - expect(list, equals(['bar', 'baz', 'foo', 'qux']), - reason: "The class set shouldn't have duplicate elements."); - }); - - test('add-bad', () { - final classes = makeClassSet(); - expect(() => classes.add(''), throws); - expect(() => classes.add('foo bar'), throws); - }); - - test('remove', () { - final classes = makeClassSet(); - classes.remove('bar'); - expect(classes, equals(['foo', 'baz'])); - classes.remove('qux'); - expect(classes, equals(['foo', 'baz'])); - }); - - test('remove-bad', () { - final classes = makeClassSet(); - expect(() => classes.remove(''), throws); - expect(() => classes.remove('foo bar'), throws); - }); - - test('toggle', () { - final classes = makeClassSet(); - classes.toggle('bar'); - expect(classes, equals(['foo', 'baz'])); - classes.toggle('qux'); - expect(classes, equals(['foo', 'baz', 'qux'])); - - classes.toggle('qux', true); - expect(classes, equals(['foo', 'baz', 'qux'])); - classes.toggle('qux', false); - expect(classes, equals(['foo', 'baz'])); - classes.toggle('qux', false); - expect(classes, equals(['foo', 'baz'])); - classes.toggle('qux', true); - expect(classes, equals(['foo', 'baz', 'qux'])); - }); - - test('toggle-bad', () { - final classes = makeClassSet(); - expect(() => classes.toggle(''), throws); - expect(() => classes.toggle('', true), throws); - expect(() => classes.toggle('', false), throws); - expect(() => classes.toggle('foo bar'), throws); - expect(() => classes.toggle('foo bar', true), throws); - expect(() => classes.toggle('foo bar', false), throws); - }); - - test('addAll', () { - final classes = makeClassSet(); - classes.addAll(['bar', 'qux', 'bip']); - expect(classes, equals(['foo', 'bar', 'baz', 'qux', 'bip'])); - }); - - test('removeAll', () { - final classes = makeClassSet(); - classes.removeAll(['bar', 'baz', 'qux']); - expect(classes, equals(['foo'])); - }); - - test('toggleAll', () { - final classes = makeClassSet(); - classes.toggleAll(['bar', 'foo']); - expect(classes, equals(['baz'])); - classes.toggleAll(['qux', 'quux']); - expect(classes, equals(['baz', 'qux', 'quux'])); - classes.toggleAll(['bar', 'foo'], true); - expect(classes, equals(['baz', 'qux', 'quux', 'bar', 'foo'])); - classes.toggleAll(['baz', 'quux'], false); - expect(classes, equals(['qux', 'bar', 'foo'])); - }); - - test('retainAll', () { - final classes = makeClassSet(); - classes.retainAll(['bar', 'baz', 'qux']); - expect(classes, equals(['bar', 'baz'])); - }); - - test('removeWhere', () { - final classes = makeClassSet(); - classes.removeWhere((s) => s.startsWith('b')); - expect(classes, equals(['foo'])); - }); - - test('retainWhere', () { - final classes = makeClassSet(); - classes.retainWhere((s) => s.startsWith('b')); - expect(classes, equals(['bar', 'baz'])); - }); - - test('containsAll', () { - final classes = makeClassSet(); - expect(classes.containsAll(['foo', 'baz']), isTrue); - expect(classes.containsAll(['foo', 'qux']), isFalse); - expect(classes.containsAll(['foo', 'baz'].toSet()), isTrue); - expect(classes.containsAll(['foo', 'qux'].toSet()), isFalse); - }); - - test('intersection', () { - final classes = makeClassSet(); - expect(classes.intersection(['foo', 'qux', 'baz'].toSet()), - unorderedEquals(['foo', 'baz'])); - }); - - test('clear', () { - final classes = makeClassSet(); - classes.clear(); - expect(classes, equals([])); - }); - - test('order', () { - var classes = makeClassSet(); - classes.add('aardvark'); - expect(classes, equals(['foo', 'bar', 'baz', 'aardvark'])); - classes.toggle('baz'); - expect(classes, equals(['foo', 'bar', 'aardvark'])); - classes.toggle('baz'); - expect(classes, equals(['foo', 'bar', 'aardvark', 'baz'])); - }); - - tearDown(listElementTearDown); - - test('list_view', () { - // Test that the 'view' helper function is behaving. - var elements = listElementSetup(); - expect(view(elements.classes), '[classy, lassy, meta, quux, qux]'); - expect( - view(elements), '[[quux, qux], [meta], [classy, lassy], [lassy, qux]]'); - }); - - test('listClasses=', () { - var elements = listElementSetup(); - elements.classes = ['foo', 'qux']; - elements = document.querySelectorAll('li'); - for (Element e in elements) { - expect(e.classes, equals(['foo', 'qux'])); - expect(extractClasses(e), equals(['foo', 'qux'])); - } - - elements.classes = []; - expect(view(elements.classes), '[]'); - expect(view(elements), '[[], [], [], []]'); - }); - - test('listMap', () { - var elements = listElementSetup(); - expect(elements.classes.map((c) => c.toUpperCase()).toList(), - unorderedEquals(['QUX', 'QUUX', 'META', 'CLASSY', 'LASSY'])); - }); - - test('listContains', () { - var elements = listElementSetup(); - expect(elements.classes.contains('lassy'), isTrue); - expect(elements.classes.contains('foo'), isFalse); - }); - - test('listAdd', () { - var elements = listElementSetup(); - var added = elements.classes.add('lassie'); - expect(added, isNull); - - expect(view(elements.classes), '[classy, lassie, lassy, meta, quux, qux]'); - expect( - view(elements), - '[[lassie, quux, qux], [lassie, meta], [classy, lassie, lassy], ' - '[lassie, lassy, qux]]'); - }); - - test('listRemove', () { - var elements = listElementSetup(); - expect(elements.classes.remove('lassi'), isFalse); - expect(view(elements.classes), '[classy, lassy, meta, quux, qux]'); - expect( - view(elements), '[[quux, qux], [meta], [classy, lassy], [lassy, qux]]'); - - expect(elements.classes.remove('qux'), isTrue); - expect(view(elements.classes), '[classy, lassy, meta, quux]'); - expect(view(elements), '[[quux], [meta], [classy, lassy], [lassy]]'); - }); - - test('listToggle', () { - var elements = listElementSetup(); - elements.classes.toggle('qux'); - expect(view(elements.classes), '[classy, lassy, meta, quux, qux]'); - expect( - view(elements), '[[quux], [meta, qux], [classy, lassy, qux], [lassy]]'); - }); - - test('listAddAll', () { - var elements = listElementSetup(); - elements.classes.addAll(['qux', 'lassi', 'sassy']); - expect(view(elements.classes), - '[classy, lassi, lassy, meta, quux, qux, sassy]'); - expect( - view(elements), - '[[lassi, quux, qux, sassy], [lassi, meta, qux, sassy], ' - '[classy, lassi, lassy, qux, sassy], [lassi, lassy, qux, sassy]]'); - }); - - test('listRemoveAll', () { - var elements = listElementSetup(); - elements.classes.removeAll(['qux', 'lassy', 'meta']); - expect(view(elements.classes), '[classy, quux]'); - expect(view(elements), '[[quux], [], [classy], []]'); - }); - - test('listToggleAll', () { - var elements = listElementSetup(); - elements.classes.toggleAll(['qux', 'meta', 'mornin']); - expect(view(elements.classes), '[classy, lassy, meta, mornin, quux, qux]'); - expect( - view(elements), - '[[meta, mornin, quux], [mornin, qux], ' - '[classy, lassy, meta, mornin, qux], [lassy, meta, mornin]]'); - }); - - test('listRetainAll', () { - var elements = listElementSetup(); - elements.classes.retainAll(['bar', 'baz', 'qux']); - expect(view(elements.classes), '[qux]'); - expect(view(elements), '[[qux], [], [], [qux]]'); - }); - - test('listRemoveWhere', () { - var elements = listElementSetup(); - elements.classes.removeWhere((s) => s.startsWith('q')); - expect(view(elements.classes), '[classy, lassy, meta]'); - expect(view(elements), '[[], [meta], [classy, lassy], [lassy]]'); - }); - - test('listRetainWhere', () { - var elements = listElementSetup(); - elements.classes.retainWhere((s) => s.startsWith('q')); - expect(view(elements.classes), '[quux, qux]'); - expect(view(elements), '[[quux, qux], [], [], [qux]]'); - }); - - test('listContainsAll', () { - var elements = listElementSetup(); - expect(elements.classes.containsAll(['qux', 'meta', 'mornin']), isFalse); - expect(elements.classes.containsAll(['qux', 'lassy', 'classy']), isTrue); - }); -} diff --git a/tests/lib_2/html/element_constructor_1_test.dart b/tests/lib_2/html/element_constructor_1_test.dart deleted file mode 100644 index 50e24510728..00000000000 --- a/tests/lib_2/html/element_constructor_1_test.dart +++ /dev/null @@ -1,77 +0,0 @@ -// 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 - -// Put universally passing event constructors in this file. -// Move constructors that fail on some configuration to their own -// element_constructor_foo_test.dart file. - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - var isAnchorElement = - predicate((x) => x is AnchorElement, 'is an AnchorElement'); - var isAreaElement = predicate((x) => x is AreaElement, 'is an AreaElement'); - var isDivElement = predicate((x) => x is DivElement, 'is a DivElement'); - var isCanvasElement = - predicate((x) => x is CanvasElement, 'is a CanvasElement'); - var isParagraphElement = - predicate((x) => x is ParagraphElement, 'is a ParagraphElement'); - var isSpanElement = predicate((x) => x is SpanElement, 'is a SpanElement'); - var isSelectElement = - predicate((x) => x is SelectElement, 'is a SelectElement'); - - test('anchor1', () { - var e = new AnchorElement(); - expect(e, isAnchorElement); - }); - - test('anchor2', () { - var e = new AnchorElement(href: '#blah'); - expect(e, isAnchorElement); - expect(e.href.endsWith('#blah'), isTrue); - }); - - test('area', () { - var e = new AreaElement(); - expect(e, isAreaElement); - }); - - // AudioElement tested in audioelement_test.dart - - test('div', () { - var e = new DivElement(); - expect(e, isDivElement); - }); - - test('canvas1', () { - var e = new CanvasElement(); - expect(e, isCanvasElement); - }); - - test('canvas2', () { - var e = new CanvasElement(height: 100, width: 200); - expect(e, isCanvasElement); - expect(e.width, 200); - expect(e.height, 100); - }); - - test('p', () { - var e = new ParagraphElement(); - expect(e, isParagraphElement); - }); - - test('span', () { - var e = new SpanElement(); - expect(e, isSpanElement); - }); - - test('select', () { - var e = new SelectElement(); - expect(e, isSelectElement); - }); -} diff --git a/tests/lib_2/html/element_dimensions_test.dart b/tests/lib_2/html/element_dimensions_test.dart deleted file mode 100644 index ecadde45d7a..00000000000 --- a/tests/lib_2/html/element_dimensions_test.dart +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - var isElement = predicate((x) => x is Element, 'is an Element'); - var isCanvasElement = - predicate((x) => x is CanvasElement, 'is a CanvasElement'); - var isDivElement = predicate((x) => x is DivElement, 'is a isDivElement'); - - var div = new DivElement(); - div.id = 'test'; - document.body.nodes.add(div); - - void initDiv() { - var style = div.style; - style - ..padding = '4px' - ..border = '0px solid #fff' - ..margin = '6px' - ..height = '10px' - ..width = '11px' - ..boxSizing = 'content-box' - ..overflow = 'visible'; - } - - div.nodes.addAll([ - new DivElement(), - new CanvasElement(), - new DivElement(), - new Text('Hello'), - new DivElement(), - new Text('World'), - new CanvasElement() - ]); - - group('dimensions', () { - setUp(initDiv); - - test('contentEdge.height', () { - var all1 = querySelectorAll('#test'); - - expect(all1.contentEdge.height, 10); - expect(all1[0].getComputedStyle().getPropertyValue('height'), '10px'); - - all1.contentEdge.height = new Dimension.px(600); - all1.contentEdge.height = 600; - expect(all1.contentEdge.height, 600); - expect(all1[0].getComputedStyle().getPropertyValue('height'), '600px'); - all1[0].style.visibility = 'hidden'; - expect(all1.contentEdge.height, 600); - all1[0].style.visibility = 'visible'; - - // If user passes in a negative number, set height to 0. - all1.contentEdge.height = new Dimension.px(-1); - expect(all1.contentEdge.height, 0); - - // Adding padding or border shouldn't affect the height for - // non-box-sizing. - div.style.padding = '20pc'; - expect(all1.contentEdge.height, 0); - div.style.border = '2px solid #fff'; - expect(all1.contentEdge.height, 0); - }); - - test('contentEdge.height with border-box', () { - var all1 = document.querySelectorAll('#test'); - div.style.boxSizing = 'border-box'; - expect(all1.contentEdge.height, 2); - div.style.padding = '20pc'; - expect(all1.contentEdge.height, 0); - div.style.border = '2px solid #fff'; - expect(all1.contentEdge.height, 0); - }); - - test('contentEdge.width', () { - var all1 = document.querySelectorAll('#test'); - expect(all1.contentEdge.width, 11); - expect(all1[0].getComputedStyle().getPropertyValue('width'), '11px'); - - all1.contentEdge.width = new Dimension.px(600); - expect(all1.contentEdge.width, 600); - expect(all1[0].getComputedStyle().getPropertyValue('width'), '600px'); - all1[0].style.visibility = 'hidden'; - expect(all1.contentEdge.width, 600); - all1[0].style.visibility = 'visible'; - - // If user passes in a negative number, set width to 0. - all1.contentEdge.width = new Dimension.px(-1); - expect(all1.contentEdge.width, 0); - - // Adding padding or border shouldn't affect the width. - div.style.padding = '20pc'; - expect(all1.contentEdge.width, 0); - div.style.border = '2px solid #fff'; - expect(all1.contentEdge.width, 0); - }); - - test('contentEdge.width with border-box', () { - var all1 = document.querySelectorAll('#test'); - div.style.boxSizing = 'border-box'; - expect(all1.contentEdge.width, 3); - div.style.padding = '20pc'; - expect(all1.contentEdge.width, 0); - div.style.border = '2px solid #fff'; - expect(all1.contentEdge.width, 0); - }); - - test('paddingEdge.height', () { - var all1 = document.querySelectorAll('#test'); - expect(all1.paddingEdge.height, 18); - all1[0].style.visibility = 'hidden'; - expect(all1.paddingEdge.height, 18); - all1[0].style.visibility = 'visible'; - - // Adding border shouldn't affect the paddingEdge.height. - div.style.border = '2px solid #fff'; - expect(all1.paddingEdge.height, 18); - // Adding padding should affect the paddingEdge.height. - div.style.padding = '20pc'; - expect(all1.paddingEdge.height, 650); - }); - - test('paddingEdge.height with border-box', () { - var all1 = document.querySelectorAll('#test'); - div.style.boxSizing = 'border-box'; - expect(all1.paddingEdge.height, 10); - div.style.padding = '20pc'; - expect(all1.paddingEdge.height, 640); - div.style.border = '2px solid #fff'; - expect(all1.paddingEdge.height, 640); - }); - - test('paddingEdge.width', () { - var all1 = document.querySelectorAll('#test'); - expect(all1.paddingEdge.width, 19); - all1[0].style.visibility = 'hidden'; - expect(all1.paddingEdge.width, 19); - all1[0].style.visibility = 'visible'; - - // Adding border shouldn't affect the width. - div.style.border = '2px solid #fff'; - expect(all1.paddingEdge.width, 19); - - // Adding padding should affect the paddingEdge.width. - div.style.padding = '20pc'; - expect(all1.paddingEdge.width, 651); - }); - - test('paddingEdge.width with border-box', () { - var all1 = document.querySelectorAll('#test'); - div.style.boxSizing = 'border-box'; - expect(all1.paddingEdge.width, 11); - div.style.padding = '20pc'; - expect(all1.paddingEdge.width, 640); - div.style.border = '2px solid #fff'; - expect(all1.paddingEdge.width, 640); - }); - - test('borderEdge.height and marginEdge.height', () { - var all1 = document.querySelectorAll('#test'); - expect(div.borderEdge.height, 18); - expect(div.marginEdge.height, 30); - expect(all1.borderEdge.height, 18); - expect(all1.marginEdge.height, 30); - all1[0].style.visibility = 'hidden'; - expect(all1.borderEdge.height, 18); - all1[0].style.visibility = 'visible'; - - // Adding border should affect the borderEdge.height. - div.style.border = '2px solid #fff'; - expect(all1.borderEdge.height, 22); - // Adding padding should affect the borderEdge.height. - div.style.padding = '20pc'; - expect(all1.borderEdge.height, 654); - expect(all1.marginEdge.height, 666); - }); - - test('borderEdge.height and marginEdge.height with border-box', () { - var all1 = document.querySelectorAll('#test'); - div.style.boxSizing = 'border-box'; - expect(all1.borderEdge.height, 10); - expect(all1.marginEdge.height, 22); - div.style.padding = '20pc'; - expect(all1.borderEdge.height, 640); - expect(all1.marginEdge.height, 652); - div.style.border = '2px solid #fff'; - expect(all1.borderEdge.height, 644); - expect(all1.marginEdge.height, 656); - }); - - test('borderEdge.width and marginEdge.width', () { - var all1 = document.querySelectorAll('#test'); - expect(all1.borderEdge.width, 19); - expect(all1.marginEdge.width, 31); - - // Adding border should affect the width. - div.style.border = '2px solid #fff'; - expect(all1.borderEdge.width, 23); - - // Adding padding should affect the borderEdge.width. - div.style.padding = '20pc'; - expect(all1.borderEdge.width, 655); - expect(all1.marginEdge.width, 667); - }); - - test('borderEdge.width and marginEdge.width with border-box', () { - var all1 = document.querySelectorAll('#test'); - div.style.boxSizing = 'border-box'; - expect(all1.borderEdge.width, 11); - expect(all1.marginEdge.width, 23); - div.style.padding = '20pc'; - expect(all1.borderEdge.width, 640); - expect(all1.marginEdge.width, 652); - div.style.border = '2px solid #fff'; - expect(all1.borderEdge.width, 644); - expect(all1.marginEdge.width, 656); - }); - - test('left and top', () { - div.style.border = '1px solid #fff'; - div.style.margin = '6px 7px'; - div.style.padding = '4px 5px'; - var all1 = document.querySelectorAll('#test'); - - expect(all1.borderEdge.left, all1[0].getBoundingClientRect().left); - expect(all1.borderEdge.top, all1[0].getBoundingClientRect().top); - - expect( - all1.contentEdge.left, all1[0].getBoundingClientRect().left + 1 + 5); - expect(all1.contentEdge.top, all1[0].getBoundingClientRect().top + 1 + 4); - - expect(all1.marginEdge.left, all1[0].getBoundingClientRect().left - 7); - expect(all1.marginEdge.top, all1[0].getBoundingClientRect().top - 6); - - expect(all1.paddingEdge.left, all1[0].getBoundingClientRect().left + 1); - expect(all1.paddingEdge.top, all1[0].getBoundingClientRect().top + 1); - }); - - test('setHeight ElementList', () { - div.style.border = '1px solid #fff'; - div.style.margin = '6px 7px'; - div.style.padding = '4px 5px'; - var all1 = document.querySelectorAll('div'); - all1.contentEdge.height = new Dimension.px(200); - all1.contentEdge.height = 200; - for (Element elem in all1) { - expect(elem.contentEdge.height, 200); - } - all1.contentEdge.height = new Dimension.px(10); - for (Element elem in all1) { - expect(elem.contentEdge.height, 10); - } - }); - }); -} diff --git a/tests/lib_2/html/element_offset_test.dart b/tests/lib_2/html/element_offset_test.dart deleted file mode 100644 index 19cd2c62913..00000000000 --- a/tests/lib_2/html/element_offset_test.dart +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'dart:async'; -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - void initPage() { - var level1 = new UListElement() - ..classes.add('level-1') - ..children.add(new LIElement()..innerHtml = 'I'); - var itemii = new LIElement() - ..classes.add('item-ii') - ..style.position = 'relative' - ..style.top = '4px' - ..innerHtml = 'II'; - level1.children.add(itemii); - var level2 = new UListElement(); - itemii.children.add(level2); - var itema = new LIElement() - ..classes.add('item-a') - ..innerHtml = 'A'; - var item1 = new LIElement() - ..classes.add('item-1') - ..innerHtml = '1'; - var item2 = new LIElement() - ..classes.add('item-2') - ..innerHtml = '2'; - var level3 = new UListElement()..children.addAll([item1, item2]); - var itemb = new LIElement() - ..classes.add('item-b') - ..style.position = 'relative' - ..style.top = '20px' - ..style.left = '150px' - ..innerHtml = 'B' - ..children.add(level3); - level2.children.addAll([itema, itemb, new LIElement()..innerHtml = 'C']); - document.body.append(level1); - document.body.style.whiteSpace = 'nowrap'; - - var bar = new DivElement()..classes.add('bar'); - var style = bar.style; - style - ..position = 'absolute' - ..top = '8px' - ..left = '90px'; - var baz = new DivElement()..classes.add('baz'); - style = baz.style; - style - ..position = 'absolute' - ..top = '600px' - ..left = '7000px'; - bar.children.add(baz); - - var quux = new DivElement()..classes.add('quux'); - var qux = new DivElement()..classes.add('qux')..children.add(quux); - - document.body.append(bar); - document.body.append(qux); - } - - group('offset', () { - setUp(initPage); - - test('offsetTo', () { - var itema = querySelector('.item-a'); - var itemb = querySelector('.item-b'); - var item1 = querySelector('.item-1'); - var itemii = querySelector('.item-ii'); - var level1 = querySelector('.level-1'); - var baz = querySelector('.baz'); - var bar = querySelector('.bar'); - var qux = querySelector('.qux'); - var quux = querySelector('.quux'); - - var point = itema.offsetTo(itemii); - expect(point.x, 40); - expect(point.y, inInclusiveRange(16, 20)); - - expect(baz.offsetTo(bar).x, 7000); - expect(baz.offsetTo(bar).y, inInclusiveRange(599, 604)); - - qux.style.position = 'fixed'; - expect(quux.offsetTo(qux).x, 0); - expect(quux.offsetTo(qux).y, 0); - - point = item1.offsetTo(itemb); - expect(point.x, 40); - expect(point.y, inInclusiveRange(16, 20)); - point = itemb.offsetTo(itemii); - expect(point.x, 190); - expect(point.y, inInclusiveRange(52, 60)); - point = item1.offsetTo(itemii); - expect(point.x, 230); - expect(point.y, inInclusiveRange(68, 80)); - }); - - test('documentOffset', () { - var bar = querySelector('.bar'); - var baz = querySelector('.baz'); - var qux = querySelector('.qux'); - var quux = querySelector('.quux'); - var itema = querySelector('.item-a'); - var itemb = querySelector('.item-b'); - var item1 = querySelector('.item-1'); - var itemii = querySelector('.item-ii'); - - expect(itema.documentOffset.x, 88); - expect(itema.documentOffset.y, inInclusiveRange(111, 160)); - - expect(itemii.documentOffset.x, 48); - expect(itemii.documentOffset.y, inInclusiveRange(95, 145)); - - expect(itemb.documentOffset.x, 238); - expect(itemb.documentOffset.y, inInclusiveRange(147, 205)); - - expect(item1.documentOffset.x, 278); - expect(item1.documentOffset.y, inInclusiveRange(163, 222)); - - expect(bar.documentOffset.x, 90); - expect(bar.documentOffset.y, 8); - - expect(baz.documentOffset.x, 7090); - expect(baz.documentOffset.y, 608); - - expect(qux.documentOffset.x, 8); - expect(qux.documentOffset.y, inInclusiveRange(203, 240)); - - expect(quux.documentOffset.x, 8); - expect(quux.documentOffset.y, inInclusiveRange(203, 240)); - }); - }); -} diff --git a/tests/lib_2/html/element_test.dart b/tests/lib_2/html/element_test.dart deleted file mode 100644 index 4e658273505..00000000000 --- a/tests/lib_2/html/element_test.dart +++ /dev/null @@ -1,1011 +0,0 @@ -// 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 ElementTest; - -import 'package:async_helper/async_minitest.dart'; -import 'package:expect/expect.dart'; -import 'dart:async'; -import 'dart:html'; -import 'dart:svg' as svg; -import 'utils.dart'; - -expectLargeRect(Rectangle rect) { - expect(rect.top, 0); - expect(rect.left, 0); - expect(rect.width, greaterThan(100)); - expect(rect.height, greaterThan(100)); - expect(rect.bottom, rect.top + rect.height); - expect(rect.right, rect.left + rect.width); -} - -void testUnsupported(String name, void f()) { - test(name, () => Expect.throwsUnsupportedError(f)); -} - -main() { - var isHRElement = predicate((x) => x is HRElement, 'is a HRElement'); - var isBRElement = predicate((x) => x is BRElement, 'is a BRElement'); - var isInputElement = - predicate((x) => x is InputElement, 'is an InputElement'); - var isImageElement = - predicate((x) => x is ImageElement, 'is an ImageElement'); - var isSpanElement = predicate((x) => x is SpanElement, 'is a SpanElement'); - var isAnchorElement = - predicate((x) => x is AnchorElement, 'is an AnchorElement'); - var isElementList = - predicate((x) => x is List, 'is a List'); - var isElementIterable = - predicate((x) => x is Iterable, 'is an Iterable'); - var isHeadingElement = - predicate((x) => x is HeadingElement, 'is a HeadingElement'); - - Element makeElement() => new Element.tag('div'); - - Element makeElementWithChildren() => - new Element.html("

"); - - group('position', () { - test('computedStyle', () { - final element = document.body; - var style = element.getComputedStyle(); - expect(style.getPropertyValue('left'), 'auto'); - }); - - test('client position synchronous', () { - final container = new Element.tag("div"); - container.style.position = 'absolute'; - container.style.top = '8px'; - container.style.left = '9px'; - final element = new Element.tag("div"); - element.style.width = '200px'; - element.style.height = '200px'; - container.children.add(element); - document.body.children.add(container); - - expect(element.client.width, greaterThan(100)); - expect(element.client.height, greaterThan(100)); - expect(element.offset.width, greaterThan(100)); - expect(element.offset.height, greaterThan(100)); - expect(element.scrollWidth, greaterThan(100)); - expect(element.scrollHeight, greaterThan(100)); - expect(element.getBoundingClientRect().left, 9); - expect(element.getBoundingClientRect().top, 8); - - expect(element.documentOffset.x, 9); - expect(element.documentOffset.y, 8); - container.remove(); - }); - }); - - group('constructors', () { - test('error', () { - Expect.throwsStateError(() => new Element.html('

')); - }); - - test('.html has no parent', - () => expect(new Element.html('
').parent, isNull)); - - test('.html table', () { - // http://developers.whatwg.org/tabular-data.html#tabular-data - TableElement node = new Element.html(''' - - - - - - - -
Characteristics with positive and negative sides
Negative - Characteristic - Positive -
Sad - Mood - Happy -
Failing - Grade - Passing -
'''); - expect(node, predicate((x) => x is TableElement, 'is a TableElement')); - expect(node.tagName, 'TABLE'); - expect(node.parent, isNull); - expect(node.caption.innerHtml, - 'Characteristics with positive and negative sides'); - expect(node.tHead.rows.length, 1); - expect(node.tHead.rows[0].cells.length, 3); - expect(node.tBodies.length, 1); - expect(node.tBodies[0].rows.length, 2); - expect(node.tBodies[0].rows[1].cells.map((c) => c.innerHtml), - [' Failing\n ', ' Grade\n ', ' Passing\n']); - }); - - test('.html caption', () { - var table = new TableElement(); - TableCaptionElement node = - table.createFragment('

Table 1.').nodes.single; - expect( - node, - predicate( - (x) => x is TableCaptionElement, 'is a TableCaptionElement')); - expect(node.tagName, 'CAPTION'); - expect(node.parent, isNull); - expect(node.innerHtml, '

Table 1.

'); - }); - - test('.html colgroup', () { - var table = new TableElement(); - TableColElement node = - table.createFragment(' ').nodes.single; - expect( - node, predicate((x) => x is TableColElement, 'is a TableColElement')); - expect(node.tagName, 'COLGROUP'); - expect(node.parent, isNull); - expect(node.innerHtml, ' '); - }); - - test('.html tbody', () { - var innerHtml = 'SadHappy'; - var table = new TableElement(); - TableSectionElement node = - table.createFragment('$innerHtml').nodes.single; - expect( - node, - predicate( - (x) => x is TableSectionElement, 'is a TableSectionElement')); - expect(node.tagName, 'TBODY'); - expect(node.parent, isNull); - expect(node.rows.length, 1); - expect(node.rows[0].cells.length, 2); - expect(node.innerHtml, innerHtml); - }); - - test('.html thead', () { - var innerHtml = 'NegativePositive'; - var table = new TableElement(); - TableSectionElement node = - table.createFragment('$innerHtml').nodes.single; - expect( - node, - predicate( - (x) => x is TableSectionElement, 'is a TableSectionElement')); - expect(node.tagName, 'THEAD'); - expect(node.parent, isNull); - expect(node.rows.length, 1); - expect(node.rows[0].cells.length, 2); - expect(node.innerHtml, innerHtml); - }); - - test('.html tfoot', () { - var innerHtml = 'percentage34.3%'; - var table = new TableElement(); - TableSectionElement node = - table.createFragment('$innerHtml').nodes.single; - expect( - node, - predicate( - (x) => x is TableSectionElement, 'is a TableSectionElement')); - expect(node.tagName, 'TFOOT'); - expect(node.parent, isNull); - expect(node.rows.length, 1); - expect(node.rows[0].cells.length, 2); - expect(node.innerHtml, innerHtml); - }); - - test('.html tr', () { - var table = new TableElement(); - document.body.append(table); - var tBody = table.createTBody(); - TableRowElement node = - tBody.createFragment('foobar').nodes.single; - expect( - node, predicate((x) => x is TableRowElement, 'is a TableRowElement')); - expect(node.tagName, 'TR'); - expect(node.parent, isNull); - expect(node.cells.map((c) => c.innerHtml), ['foo', 'bar']); - }); - - test('.html td', () { - var table = new TableElement(); - document.body.append(table); - var tBody = table.createTBody(); - var tRow = tBody.addRow(); - TableCellElement node = tRow.createFragment('foobar').nodes.single; - expect(node, - predicate((x) => x is TableCellElement, 'is a TableCellElement')); - expect(node.tagName, 'TD'); - expect(node.parent, isNull); - expect(node.innerHtml, 'foobar'); - }); - - test('.html th', () { - var table = new TableElement(); - document.body.append(table); - var tBody = table.createTBody(); - var tRow = tBody.addRow(); - TableCellElement node = tRow.createFragment('foobar').nodes.single; - expect(node, - predicate((x) => x is TableCellElement, 'is a TableCellElement')); - expect(node.tagName, 'TH'); - expect(node.parent, isNull); - expect(node.innerHtml, 'foobar'); - }); - - test('.html can fire events', () { - var e = new Element.html(''); - var gotEvent = false; - e.onClick.listen((_) { - gotEvent = true; - }); - e.click(); - expect(gotEvent, isTrue, reason: 'click should have raised click event'); - }); - }); - - group('eventListening', () { - test('streams', () { - final target = new TextAreaElement(); - - void testEvent(Stream stream, String type, [createEvent(String type)]) { - var firedOnEvent = false; - stream.listen((e) { - firedOnEvent = true; - }); - expect(firedOnEvent, isFalse); - var event = createEvent != null ? createEvent(type) : new Event(type); - target.dispatchEvent(event); - - expect(firedOnEvent, isTrue); - } - - testEvent(target.onAbort, 'abort'); - testEvent(target.onBeforeCopy, 'beforecopy'); - testEvent(target.onBeforeCut, 'beforecut'); - testEvent(target.onBeforePaste, 'beforepaste'); - testEvent(target.onBlur, 'blur'); - testEvent(target.onChange, 'change'); - testEvent( - target.onContextMenu, 'contextmenu', (type) => new MouseEvent(type)); - // We cannot test dispatching a true ClipboardEvent as the DOM does not - // provide a way to create a fake ClipboardEvent. - testEvent(target.onCopy, 'copy'); - testEvent(target.onCut, 'cut'); - testEvent(target.onPaste, 'paste'); - - testEvent( - target.onDoubleClick, 'dblclick', (type) => new MouseEvent(type)); - testEvent(target.onDrag, 'drag', (type) => new MouseEvent(type)); - testEvent(target.onDragEnd, 'dragend', (type) => new MouseEvent(type)); - testEvent( - target.onDragEnter, 'dragenter', (type) => new MouseEvent(type)); - testEvent( - target.onDragLeave, 'dragleave', (type) => new MouseEvent(type)); - testEvent(target.onDragOver, 'dragover', (type) => new MouseEvent(type)); - testEvent( - target.onDragStart, 'dragstart', (type) => new MouseEvent(type)); - testEvent(target.onDrop, 'drop', (type) => new MouseEvent(type)); - testEvent(target.onError, 'error'); - testEvent(target.onFocus, 'focus'); - testEvent(target.onFullscreenChange, 'webkitfullscreenchange'); - testEvent(target.onInput, 'input'); - testEvent(target.onInvalid, 'invalid'); - testEvent(target.onKeyDown, 'keydown', (type) => new KeyboardEvent(type)); - testEvent( - target.onKeyPress, 'keypress', (type) => new KeyboardEvent(type)); - testEvent(target.onKeyUp, 'keyup', (type) => new KeyboardEvent(type)); - testEvent(target.onLoad, 'load'); - testEvent( - target.onMouseDown, 'mousedown', (type) => new MouseEvent(type)); - testEvent( - target.onMouseMove, 'mousemove', (type) => new MouseEvent(type)); - testEvent(target.onMouseOut, 'mouseout', (type) => new MouseEvent(type)); - testEvent( - target.onMouseOver, 'mouseover', (type) => new MouseEvent(type)); - testEvent(target.onMouseUp, 'mouseup', (type) => new MouseEvent(type)); - testEvent(target.onReset, 'reset'); - testEvent(target.onScroll, 'scroll'); - testEvent(target.onSearch, 'search'); - testEvent(target.onSelect, 'select'); - testEvent(target.onSelectStart, 'selectstart'); - testEvent(target.onSubmit, 'submit'); - // We would prefer to create new touch events for this test via - // new TouchEvent(null, null, null, type) - // but that fails on desktop browsers as touch is not enabled. - testEvent(target.onTouchCancel, 'touchcancel'); - testEvent(target.onTouchEnd, 'touchend'); - testEvent(target.onTouchLeave, 'touchleave'); - testEvent(target.onTouchMove, 'touchmove'); - testEvent(target.onTouchStart, 'touchstart'); - }); - }); - - group('click', () { - test('clickEvent', () { - var e = new DivElement(); - var firedEvent = false; - e.onClick.listen((event) { - firedEvent = true; - }); - expect(firedEvent, false); - e.click(); - expect(firedEvent, true); - - var e2 = new DivElement(); - var firedEvent2 = false; - e2.onClick.matches('.foo').listen((event) { - firedEvent2 = true; - }); - e2.click(); - expect(firedEvent2, false); - e2.classes.add('foo'); - e2.click(); - expect(firedEvent2, true); - }); - }); - - group('attributes', () { - test('manipulation', () { - final element = new Element.html( - '''
-
''', - treeSanitizer: new NullTreeSanitizer()); - final attributes = element.attributes; - expect(attributes['class'], 'foo'); - startsWith(match) => predicate((x) => x is String && x.startsWith(match)); - expect(attributes['style'], startsWith('overflow: hidden')); - expect(attributes['data-foo'], 'bar'); - expect(attributes['data-foo2'], 'bar2'); - expect(attributes.length, 5); - expect(element.dataset.length, 2); - element.dataset['foo'] = 'baz'; - expect(element.dataset['foo'], 'baz'); - expect(attributes['data-foo'], 'baz'); - attributes['data-foo2'] = 'baz2'; - expect(attributes['data-foo2'], 'baz2'); - expect(element.dataset['foo2'], 'baz2'); - expect(attributes['dir'], 'rtl'); - - final dataset = element.dataset; - dataset.remove('foo2'); - expect(attributes.length, 4); - expect(dataset.length, 1); - attributes.remove('style'); - expect(attributes.length, 3); - dataset['foo3'] = 'baz3'; - expect(dataset.length, 2); - expect(attributes.length, 4); - attributes['style'] = 'width: 300px;'; - expect(attributes.length, 5); - }); - - test('namespaces', () { - var element = - new svg.SvgElement.svg(''' - - ''').children[0]; - - var attributes = element.attributes; - expect(attributes.length, 1); - expect(attributes['data-foo'], 'bar'); - - var xlinkAttrs = - element.getNamespacedAttributes('http://www.w3.org/1999/xlink'); - expect(xlinkAttrs.length, 1); - expect(xlinkAttrs['href'], 'foo'); - - xlinkAttrs.remove('href'); - expect(xlinkAttrs.length, 0); - - xlinkAttrs['href'] = 'bar'; - expect(xlinkAttrs['href'], 'bar'); - - var randomAttrs = element.getNamespacedAttributes('http://example.com'); - expect(randomAttrs.length, 0); - randomAttrs['href'] = 'bar'; - expect(randomAttrs.length, 1); - }); - }); - - group('children', () { - test('is a subset of nodes', () { - var el = new Element.html("
Foo
"); - expect(el.nodes.length, 3); - expect(el.children.length, 2); - expect(el.nodes[1], el.children[0]); - expect(el.nodes[2], el.children[1]); - }); - - test('changes when an element is added to nodes', () { - var el = new Element.html("
Foo
"); - el.nodes.add(new Element.tag('hr')); - expect(el.children.length, 3); - expect(el.children[2], isHRElement); - expect(el.nodes[3], el.children[2]); - }); - - test('changes nodes when an element is added', () { - var el = new Element.html("
Foo
"); - el.children.add(new Element.tag('hr')); - expect(el.nodes.length, 4); - expect(el.nodes[3], isHRElement); - expect(el.children[2], el.nodes[3]); - }); - - test('last', () { - var el = makeElementWithChildren(); - expect(el.children.last, isInputElement); - }); - - test('forEach', () { - var els = []; - var el = makeElementWithChildren(); - el.children.forEach((n) => els.add(n)); - expect(els[0], isBRElement); - expect(els[1], isImageElement); - expect(els[2], isInputElement); - }); - - test('where', () { - var filtered = - makeElementWithChildren().children.where((n) => n is ImageElement); - expect(1, filtered.length); - expect(filtered.first, isImageElement); - expect(filtered, isElementIterable); - }); - - test('every', () { - var el = makeElementWithChildren(); - expect(el.children.every((n) => n is Element), isTrue); - expect(el.children.every((n) => n is InputElement), isFalse); - }); - - test('any', () { - var el = makeElementWithChildren(); - expect(el.children.any((n) => n is InputElement), isTrue); - expect(el.children.any((n) => n is svg.SvgElement), isFalse); - }); - - test('isEmpty', () { - expect(makeElement().children.isEmpty, isTrue); - expect(makeElementWithChildren().children.isEmpty, isFalse); - }); - - test('length', () { - expect(makeElement().children.length, 0); - expect(makeElementWithChildren().children.length, 3); - }); - - test('[]', () { - var el = makeElementWithChildren(); - expect(el.children[0], isBRElement); - expect(el.children[1], isImageElement); - expect(el.children[2], isInputElement); - }); - - test('[]=', () { - var el = makeElementWithChildren(); - el.children[1] = new Element.tag('hr'); - expect(el.children[0], isBRElement); - expect(el.children[1], isHRElement); - expect(el.children[2], isInputElement); - }); - - test('add', () { - var el = makeElement(); - el.children.add(new Element.tag('hr')); - expect(el.children.last, isHRElement); - }); - - test('iterator', () { - var els = []; - var el = makeElementWithChildren(); - for (var subel in el.children) { - els.add(subel); - } - expect(els[0], isBRElement); - expect(els[1], isImageElement); - expect(els[2], isInputElement); - }); - - test('addAll', () { - var el = makeElementWithChildren(); - el.children.addAll([ - new Element.tag('span'), - new Element.tag('a'), - new Element.tag('h1') - ]); - expect(el.children[0], isBRElement); - expect(el.children[1], isImageElement); - expect(el.children[2], isInputElement); - expect(el.children[3], isSpanElement); - expect(el.children[4], isAnchorElement); - expect(el.children[5], isHeadingElement); - }); - - test('insert', () { - var element = new DivElement(); - element.children.insert(0, new BRElement()); - expect(element.children[0], isBRElement); - element.children.insert(0, new HRElement()); - expect(element.children[0], isHRElement); - element.children.insert(1, new ImageElement()); - expect(element.children[1], isImageElement); - element.children.insert(element.children.length, new InputElement()); - expect(element.children.last, isInputElement); - }); - - test('clear', () { - var el = makeElementWithChildren(); - el.children.clear(); - expect(el.children, equals([])); - }); - - test('removeLast', () { - var el = makeElementWithChildren(); - expect(el.children.removeLast(), isInputElement); - expect(el.children.length, 2); - expect(el.children.removeLast(), isImageElement); - expect(el.children.length, 1); - }); - - test('sublist', () { - var el = makeElementWithChildren(); - expect(el.children.sublist(1, 2), isElementList); - }); - - test('getRange', () { - var el = makeElementWithChildren(); - expect(el.children.getRange(1, 2).length, 1); - }); - - test('retainWhere', () { - var el = makeElementWithChildren(); - expect(el.children.length, 3); - el.children.retainWhere((e) => true); - expect(el.children.length, 3); - - el = makeElementWithChildren(); - expect(el.children.length, 3); - el.children.retainWhere((e) => false); - expect(el.children.length, 0); - - el = makeElementWithChildren(); - expect(el.children.length, 3); - el.children.retainWhere((e) => e.localName == 'input'); - expect(el.children.length, 1); - - el = makeElementWithChildren(); - expect(el.children.length, 3); - el.children.retainWhere((e) => e.localName == 'br'); - expect(el.children.length, 1); - }); - - test('removeWhere', () { - var el = makeElementWithChildren(); - expect(el.children.length, 3); - el.children.removeWhere((e) => true); - expect(el.children.length, 0); - - el = makeElementWithChildren(); - expect(el.children.length, 3); - el.children.removeWhere((e) => false); - expect(el.children.length, 3); - - el = makeElementWithChildren(); - expect(el.children.length, 3); - el.children.removeWhere((e) => e.localName == 'input'); - expect(el.children.length, 2); - - el = makeElementWithChildren(); - expect(el.children.length, 3); - el.children.removeWhere((e) => e.localName == 'br'); - expect(el.children.length, 2); - }); - - testUnsupported('sort', () { - var l = makeElementWithChildren().children; - l.sort(); - }); - - testUnsupported('setRange', () { - var l = makeElementWithChildren().children; - l.setRange(0, 0, []); - }); - - testUnsupported('replaceRange', () { - var l = makeElementWithChildren().children; - l.replaceRange(0, 0, []); - }); - - testUnsupported('removeRange', () { - var l = makeElementWithChildren().children; - l.removeRange(0, 1); - }); - - testUnsupported('insertAll', () { - var l = makeElementWithChildren().children; - l.insertAll(0, []); - }); - }); - - group('matches', () { - test('matches', () { - var element = new DivElement(); - document.body.append(element); - element.classes.add('test'); - - expect(element.matches('div'), true); - expect(element.matches('span'), false); - expect(element.matches('.test'), true); - }); - }); - - group('querySelectorAll', () { - List getQuerySelectorAll() { - return new Element.html(""" -
-
- Dart! -

- Hello, - world! -

-
-
-""").querySelectorAll('.q'); - } - - List getEmptyQuerySelectorAll() => - new Element.tag('div').querySelectorAll('img'); - - test('last', () { - expect(getQuerySelectorAll().last, isHRElement); - }); - - test('forEach', () { - var els = []; - getQuerySelectorAll().forEach((el) => els.add(el)); - expect(els[0], isAnchorElement); - expect(els[1], isSpanElement); - expect(els[2], isHRElement); - }); - - test('map', () { - var texts = getQuerySelectorAll().map((el) => el.text).toList(); - expect(texts, equals(['Dart!', 'Hello', ''])); - }); - - test('where', () { - var filtered = - getQuerySelectorAll().where((n) => n is SpanElement).toList(); - expect(filtered.length, 1); - expect(filtered[0], isSpanElement); - expect(filtered, isElementList); - }); - - test('every', () { - var el = getQuerySelectorAll(); - expect(el.every((n) => n is Element), isTrue); - expect(el.every((n) => n is SpanElement), isFalse); - }); - - test('any', () { - var el = getQuerySelectorAll(); - expect(el.any((n) => n is SpanElement), isTrue); - expect(el.any((n) => n is svg.SvgElement), isFalse); - }); - - test('isEmpty', () { - expect(getEmptyQuerySelectorAll().isEmpty, isTrue); - expect(getQuerySelectorAll().isEmpty, isFalse); - }); - - test('length', () { - expect(getEmptyQuerySelectorAll().length, 0); - expect(getQuerySelectorAll().length, 3); - }); - - test('[]', () { - var els = getQuerySelectorAll(); - expect(els[0], isAnchorElement); - expect(els[1], isSpanElement); - expect(els[2], isHRElement); - }); - - test('iterator', () { - var els = []; - for (var subel in getQuerySelectorAll()) { - els.add(subel); - } - expect(els[0], isAnchorElement); - expect(els[1], isSpanElement); - expect(els[2], isHRElement); - }); - - test('sublist', () { - expect(getQuerySelectorAll().sublist(1, 2) is List, isTrue); - }); - - testUnsupported( - '[]=', () => getQuerySelectorAll()[1] = new Element.tag('br')); - testUnsupported( - 'add', () => getQuerySelectorAll().add(new Element.tag('br'))); - - testUnsupported('addAll', () { - getQuerySelectorAll().addAll([ - new Element.tag('span'), - new Element.tag('a'), - new Element.tag('h1') - ]); - }); - - testUnsupported('sort', () => getQuerySelectorAll().sort((a1, a2) => 0)); - - testUnsupported('setRange', () { - getQuerySelectorAll().setRange(0, 1, [new BRElement()]); - }); - - testUnsupported( - 'removeRange', () => getQuerySelectorAll().removeRange(0, 1)); - - testUnsupported('clear', () => getQuerySelectorAll().clear()); - - testUnsupported('removeLast', () => getQuerySelectorAll().removeLast()); - }); - - group('functional', () { - test('toString', () { - final elems = makeElementWithChildren().children; - expect(elems.toString(), "[br, img, input]"); - final elem = makeElement().children; - expect(elem.toString(), '[]'); - }); - - test('scrollIntoView', () { - var child = new DivElement(); - document.body.append(child); - - child.scrollIntoView(ScrollAlignment.TOP); - child.scrollIntoView(ScrollAlignment.BOTTOM); - child.scrollIntoView(ScrollAlignment.CENTER); - child.scrollIntoView(); - }); - }); - - group('_ElementList', () { - List makeElList() => makeElementWithChildren().children; - - test('where', () { - var filtered = makeElList().where((n) => n is ImageElement); - expect(filtered.length, 1); - expect(filtered.first, isImageElement); - expect(filtered, isElementIterable); - }); - - test('sublist', () { - var range = makeElList().sublist(1, 3); - expect(range, isElementList); - expect(range[0], isImageElement); - expect(range[1], isInputElement); - }); - }); - - group('eventDelegation', () { - test('matches', () { - Element clickOne = new Element.a(); - Element selectorOne = new Element.div() - ..classes.add('selector') - ..children.add(clickOne); - - Element clickTwo = new Element.a(); - Element selectorTwo = new Element.div() - ..classes.add('selector') - ..children.add(clickTwo); - document.body.append(selectorOne); - document.body.append(selectorTwo); - - document.body.onClick - .matches('.selector') - .listen(expectAsync1((Event event) { - expect(event.currentTarget, document.body); - expect(event.target, clickOne); - expect(event.matchingTarget, selectorOne); - })); - - selectorOne.onClick - .matches('.selector') - .listen(expectAsync1((Event event) { - expect(event.currentTarget, selectorOne); - expect(event.target, clickOne); - expect(event.matchingTarget, selectorOne); - })); - clickOne.click(); - - Element elem = new Element.div()..classes.addAll(['a', 'b']); - Element img = new Element.img() - ..classes.addAll(['b', 'a', 'd']) - ..id = 'cookie'; - Element input = new InputElement()..classes.addAll(['c', 'd']); - var div = new Element.div() - ..classes.add('a') - ..id = 'wat'; - document.body.append(elem); - document.body.append(img); - document.body.append(input); - document.body.append(div); - - Element elem4 = new Element.div()..classes.addAll(['i', 'j']); - Element elem5 = new Element.div() - ..classes.addAll(['g', 'h']) - ..children.add(elem4); - Element elem6 = new Element.div() - ..classes.addAll(['e', 'f']) - ..children.add(elem5); - document.body.append(elem6); - - var firedEvent = false; - var elems = querySelectorAll('.a'); - querySelectorAll('.a').onClick.listen((event) { - firedEvent = true; - }); - expect(firedEvent, false); - querySelector('.c').click(); - expect(firedEvent, false); - querySelector('#wat').click(); - expect(firedEvent, true); - - var firedEvent4 = false; - querySelectorAll('.a').onClick.matches('.d').listen((event) { - firedEvent4 = true; - }); - expect(firedEvent4, false); - querySelector('.c').click(); - expect(firedEvent4, false); - querySelector('#wat').click(); - expect(firedEvent4, false); - querySelector('#cookie').click(); - expect(firedEvent4, true); - - var firedEvent2 = false; - querySelectorAll('.a').onClick.listen((event) { - firedEvent2 = true; - }); - Element elem2 = new Element.html('

'); - document.body.append(elem2); - elem2.click(); - expect(firedEvent2, false); - elem2.classes.add('a'); - elem2.click(); - expect(firedEvent2, false); - - var firedEvent3 = false; - querySelectorAll(':root').onClick.matches('.a').listen((event) { - firedEvent3 = true; - }); - Element elem3 = new Element.html('

'); - document.body.append(elem3); - elem3.click(); - expect(firedEvent3, false); - elem3.classes.add('a'); - elem3.click(); - expect(firedEvent3, true); - - var firedEvent5 = false; - querySelectorAll(':root').onClick.matches('.e').listen((event) { - firedEvent5 = true; - }); - expect(firedEvent5, false); - querySelector('.i').click(); - expect(firedEvent5, true); - }); - - test('event ordering', () { - var a = new DivElement(); - var b = new DivElement(); - a.append(b); - var c = new DivElement(); - b.append(c); - - var eventOrder = []; - - ElementStream aEvent = a.on['custom_event']; - aEvent.listen((_) { - eventOrder.add('a no-capture'); - }); - - aEvent.capture((_) { - eventOrder.add('a capture'); - }); - - ElementStream bEvent = b.on['custom_event']; - bEvent.listen((_) { - eventOrder.add('b no-capture'); - }); - - bEvent.capture((_) { - eventOrder.add('b capture'); - }); - - document.body.append(a); - - var event = new Event('custom_event', canBubble: true); - c.dispatchEvent(event); - expect(eventOrder, - ['a capture', 'b capture', 'b no-capture', 'a no-capture']); - }); - }); - - group('ElementList', () { - // Tests for methods on the DOM class 'NodeList'. - // - // There are two interesting things that are validated here from the - // viewpoint of the dart2js implementation of a 'native' class: - // - // 1. Some methods are implemented from by 'Object' or 'Interceptor'; - // some of these tests validate that a method can be called. - // 2. Some methods are implemented by mixins. - - ElementList makeElementList() => - (new Element.html("
Foo


")) - .querySelectorAll('br'); - - test('hashCode', () { - var nodes = makeElementList(); - var hash = nodes.hashCode; - final int N = 1000; - int matchCount = 0; - for (int i = 0; i < N; i++) { - if (makeElementList().hashCode == hash) matchCount++; - } - expect(matchCount, lessThan(N)); - }); - - test('operator==', () { - var a = [makeElementList(), makeElementList(), null]; - for (int i = 0; i < a.length; i++) { - for (int j = 0; j < a.length; j++) { - expect(i == j, a[i] == a[j]); - } - } - }); - - test('runtimeType', () { - var nodes1 = makeElementList(); - var nodes2 = makeElementList(); - var type1 = nodes1.runtimeType; - var type2 = nodes2.runtimeType; - expect(type1 == type2, true); - String name = '$type1'; - if (name.length > 3) { - expect(name.contains('ElementList'), true); - } - }); - - test('first', () { - var nodes = makeElementList(); - expect(nodes.first, isBRElement); - }); - - test('last', () { - var nodes = makeElementList(); - expect(nodes.last, isBRElement); - }); - - test('where', () { - var filtered = makeElementList().where((n) => n is BRElement).toList(); - expect(filtered.length, 3); - expect(filtered[0], isBRElement); - }); - - test('sublist', () { - var range = makeElementList().sublist(1, 3); - expect(range.length, 2); - expect(range[0], isBRElement); - expect(range[1], isBRElement); - }); - }); -} diff --git a/tests/lib_2/html/element_types_constructors1_test.dart b/tests/lib_2/html/element_types_constructors1_test.dart deleted file mode 100644 index e8ccc9af8b4..00000000000 --- a/tests/lib_2/html/element_types_constructors1_test.dart +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - check(String name, bool fn(), [bool supported = true]) { - test(name, () { - if (supported) { - expect(fn(), isTrue); - } else { - // Can either throw or return false. - expect(() => (fn() || (throw "false")), throws); - } - }); - } - - group('constructors', () { - check('a', () => new AnchorElement() is AnchorElement); - check('area', () => new AreaElement() is AreaElement); - check('audio', () => new AudioElement() is AudioElement); - check('body', () => new BodyElement() is BodyElement); - check('br', () => new BRElement() is BRElement); - check('base', () => new BaseElement() is BaseElement); - check('button', () => new ButtonElement() is ButtonElement); - check('canvas', () => new CanvasElement() is CanvasElement); - check('caption', () => new TableCaptionElement() is TableCaptionElement); - check('content', () => new ContentElement() is ContentElement, - ContentElement.supported); - check('details', () => new DetailsElement() is DetailsElement, - DetailsElement.supported); - check('datalist', () => new DataListElement() is DataListElement, - DataListElement.supported); - check('dl', () => new DListElement() is DListElement); - check('div', () => new DivElement() is DivElement); - check('embed', () => new EmbedElement() is EmbedElement, - EmbedElement.supported); - }); -} diff --git a/tests/lib_2/html/element_types_constructors2_test.dart b/tests/lib_2/html/element_types_constructors2_test.dart deleted file mode 100644 index c2c22c071a1..00000000000 --- a/tests/lib_2/html/element_types_constructors2_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - check(String name, bool fn(), [bool supported = true]) { - test(name, () { - if (supported) { - expect(fn(), supported); - } else { - // Can either throw or return false. - expect(() => (fn() || (throw "false")), throws); - } - }); - } - - group('constructors', () { - check('fieldset', () => new FieldSetElement() is FieldSetElement); - check('form', () => new FormElement() is FormElement); - check('head', () => new HeadElement() is HeadElement); - check('hr', () => new HRElement() is HRElement); - check('html', () => new HtmlHtmlElement() is HtmlHtmlElement); - check('h1', () => new HeadingElement.h1() is HeadingElement); - check('h2', () => new HeadingElement.h2() is HeadingElement); - check('h3', () => new HeadingElement.h3() is HeadingElement); - check('h4', () => new HeadingElement.h4() is HeadingElement); - check('h5', () => new HeadingElement.h5() is HeadingElement); - check('h6', () => new HeadingElement.h6() is HeadingElement); - check('iframe', () => new IFrameElement() is IFrameElement); - check('img', () => new ImageElement() is ImageElement); - check('input', () => new InputElement() is InputElement); - }); -} diff --git a/tests/lib_2/html/element_types_constructors3_test.dart b/tests/lib_2/html/element_types_constructors3_test.dart deleted file mode 100644 index f5f6765795e..00000000000 --- a/tests/lib_2/html/element_types_constructors3_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - check(String name, bool fn(), [bool supported = true]) { - test(name, () { - if (supported) { - expect(fn(), isTrue); - } else { - // Can either throw or return false. - expect(() => (fn() || (throw "false")), throws); - } - }); - } - - group('constructors', () { - check('li', () => new LIElement() is LIElement); - check('label', () => new LabelElement() is LabelElement); - check('legen', () => new LegendElement() is LegendElement); - check('link', () => new LinkElement() is LinkElement); - check('map', () => new MapElement() is MapElement); - check('menu', () => new MenuElement() is MenuElement); - check('meta', () => new MetaElement() is MetaElement); - check('meter', () => new MeterElement() is MeterElement, - MeterElement.supported); - check('del', () => new Element.tag('del') is ModElement); - check('ins', () => new Element.tag('ins') is ModElement); - check('object', () => new ObjectElement() is ObjectElement, - ObjectElement.supported); - check('ol', () => new OListElement() is OListElement); - check('optgroup', () => new OptGroupElement() is OptGroupElement); - check('option', () => new OptionElement() is OptionElement); - check('output', () => new OutputElement() is OutputElement, - OutputElement.supported); - }); -} diff --git a/tests/lib_2/html/element_types_constructors4_test.dart b/tests/lib_2/html/element_types_constructors4_test.dart deleted file mode 100644 index c445c3d435d..00000000000 --- a/tests/lib_2/html/element_types_constructors4_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - check(String name, bool fn(), [bool supported = true]) { - test(name, () { - if (supported) { - expect(fn(), isTrue); - } else { - // Can either throw or return false. - expect(() => (fn() || (throw "false")), throws); - } - }); - } - - group('constructors', () { - check('p', () => new ParagraphElement() is ParagraphElement); - check('param', () => new ParamElement() is ParamElement); - check('pre', () => new PreElement() is PreElement); - check('progress', () => new ProgressElement() is ProgressElement, - ProgressElement.supported); - check('q', () => new QuoteElement() is QuoteElement); - check('script', () => new ScriptElement() is ScriptElement); - check('select', () => new SelectElement() is SelectElement); - check('shadow', () => new ShadowElement() is ShadowElement, - ShadowElement.supported); - check('source', () => new SourceElement() is SourceElement); - check('span', () => new SpanElement() is SpanElement); - check('style', () => new StyleElement() is StyleElement); - }); -} diff --git a/tests/lib_2/html/element_types_constructors5_test.dart b/tests/lib_2/html/element_types_constructors5_test.dart deleted file mode 100644 index 08041d00ed3..00000000000 --- a/tests/lib_2/html/element_types_constructors5_test.dart +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - check(String name, bool fn(), [bool supported = true]) { - test(name, () { - if (supported) { - expect(fn(), isTrue); - } else { - // Can either throw or return false. - expect(() => (fn() || (throw "false")), throws); - } - }); - } - - group('constructors', () { - check('table', () => new TableElement() is TableElement); - check('template', () => new TemplateElement() is TemplateElement, - TemplateElement.supported); - check('textarea', () => new TextAreaElement() is TextAreaElement); - check('title', () => new TitleElement() is TitleElement); - check('td', () => new TableCellElement() is TableCellElement); - check('col', () => new TableColElement() is TableColElement); - check('colgroup', () => new Element.tag('colgroup') is TableColElement); - check('tr', () => new TableRowElement() is TableRowElement); - check('tbody', () => new Element.tag('tbody') is TableSectionElement); - check('tfoot', () => new Element.tag('tfoot') is TableSectionElement); - check('thead', () => new Element.tag('thead') is TableSectionElement); - check('track', () => new TrackElement() is TrackElement, - TrackElement.supported); - }); -} diff --git a/tests/lib_2/html/element_types_constructors6_test.dart b/tests/lib_2/html/element_types_constructors6_test.dart deleted file mode 100644 index 147782b362d..00000000000 --- a/tests/lib_2/html/element_types_constructors6_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - check(String name, bool fn(), [bool supported = true]) { - test(name, () { - if (supported) { - expect(fn(), isTrue); - } else { - // Can either throw or return false. - expect(() => (fn() || (throw "false")), throws); - } - }); - } - - group('ul', () { - check('ul', () => new UListElement() is UListElement); - - test('accepts li', () { - var ul = new UListElement(); - var li = new LIElement(); - ul.append(li); - }); - }); - group('constructors', () { - check('video', () => new VideoElement() is VideoElement); - check('unknown', () => new Element.tag('someunknown') is UnknownElement); - }); -} diff --git a/tests/lib_2/html/element_types_content_test.dart b/tests/lib_2/html/element_types_content_test.dart deleted file mode 100644 index 2b84907c119..00000000000 --- a/tests/lib_2/html/element_types_content_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - test('content_supported', () { - expect(ContentElement.supported, true); - }); -} diff --git a/tests/lib_2/html/element_types_datalist_test.dart b/tests/lib_2/html/element_types_datalist_test.dart deleted file mode 100644 index e84af69a4ae..00000000000 --- a/tests/lib_2/html/element_types_datalist_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - test('datalist_supported', () { - expect(DataListElement.supported, true); - }); -} diff --git a/tests/lib_2/html/element_types_details_test.dart b/tests/lib_2/html/element_types_details_test.dart deleted file mode 100644 index 7fcb106453f..00000000000 --- a/tests/lib_2/html/element_types_details_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - test('details_supported', () { - expect(DetailsElement.supported, true); - }); -} diff --git a/tests/lib_2/html/element_types_embed_test.dart b/tests/lib_2/html/element_types_embed_test.dart deleted file mode 100644 index 6820e29f3aa..00000000000 --- a/tests/lib_2/html/element_types_embed_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - test('embed_supported', () { - expect(EmbedElement.supported, true); - }); -} diff --git a/tests/lib_2/html/element_types_meter_test.dart b/tests/lib_2/html/element_types_meter_test.dart deleted file mode 100644 index 2eb097c5c8f..00000000000 --- a/tests/lib_2/html/element_types_meter_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - test('meter_supported', () { - expect(MeterElement.supported, true); - }); -} diff --git a/tests/lib_2/html/element_types_object_test.dart b/tests/lib_2/html/element_types_object_test.dart deleted file mode 100644 index e7a9702a7e1..00000000000 --- a/tests/lib_2/html/element_types_object_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - test('object_supported', () { - expect(ObjectElement.supported, true); - }); -} diff --git a/tests/lib_2/html/element_types_output_test.dart b/tests/lib_2/html/element_types_output_test.dart deleted file mode 100644 index 0caf8dad194..00000000000 --- a/tests/lib_2/html/element_types_output_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - test('output_supported', () { - expect(OutputElement.supported, true); - }); -} diff --git a/tests/lib_2/html/element_types_progress_test.dart b/tests/lib_2/html/element_types_progress_test.dart deleted file mode 100644 index 3d03210d7b6..00000000000 --- a/tests/lib_2/html/element_types_progress_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - test('progress_supported', () { - expect(ProgressElement.supported, true); - }); -} diff --git a/tests/lib_2/html/element_types_shadow_test.dart b/tests/lib_2/html/element_types_shadow_test.dart deleted file mode 100644 index f0469a909f1..00000000000 --- a/tests/lib_2/html/element_types_shadow_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - test('shadow_supported', () { - expect(ShadowElement.supported, true); - }); -} diff --git a/tests/lib_2/html/element_types_template_test.dart b/tests/lib_2/html/element_types_template_test.dart deleted file mode 100644 index b82dd9d5c69..00000000000 --- a/tests/lib_2/html/element_types_template_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - test('template_supported', () { - expect(TemplateElement.supported, true); - }); -} diff --git a/tests/lib_2/html/element_types_track_test.dart b/tests/lib_2/html/element_types_track_test.dart deleted file mode 100644 index 9620c9973e8..00000000000 --- a/tests/lib_2/html/element_types_track_test.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - test('track_supported', () { - expect(TrackElement.supported, true); - }); -} diff --git a/tests/lib_2/html/event_callback_test.dart b/tests/lib_2/html/event_callback_test.dart deleted file mode 100644 index d5a1dc7be31..00000000000 --- a/tests/lib_2/html/event_callback_test.dart +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2018, 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 - -// Regression test for issue 33627. - -import 'dart:html'; -import 'package:expect/expect.dart'; - -void main() { - try { - print('InputElement'); - var i = new InputElement(); - print('> onKeyPress'); - i.onKeyPress.listen(onEvent); - print('> onClick'); - i.onClick.listen(onEvent); - print('TextAreaElement'); - var e = new TextAreaElement(); - print('> onKeyPress'); - e.onKeyPress.listen(onEvent); - print('> onClick'); - e.onClick.listen(onEvent); - print('Done!'); - } catch (e, s) { - print('$e\n$s'); - Expect.fail("Unexpected exception: $e"); - } -} - -void onEvent(Event e) { - print(e); -} diff --git a/tests/lib_2/html/event_customevent_test.dart b/tests/lib_2/html/event_customevent_test.dart deleted file mode 100644 index 7fa81a3aa9f..00000000000 --- a/tests/lib_2/html/event_customevent_test.dart +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2012, 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 EventCustomEventTest; - -import 'package:async_helper/async_minitest.dart'; -import 'dart:html'; -import 'dart:js' as js; - -class DartPayloadData { - final dartValue; - - DartPayloadData(this.dartValue); -} - -main() { - test('custom events', () { - var provider = new EventStreamProvider('foo'); - var el = new DivElement(); - - var fired = false; - provider.forTarget(el).listen((ev) { - fired = true; - expect(ev.detail, {'type': 'detail'}); - }); - - var ev = new CustomEvent('foo', - canBubble: false, cancelable: false, detail: {'type': 'detail'}); - el.dispatchEvent(ev); - expect(fired, isTrue); - }); - - test('custom events from JS', () { - var scriptContents = ''' - var event = document.createEvent("CustomEvent"); - event.initCustomEvent("js_custom_event", true, true, {type: "detail"}); - window.dispatchEvent(event); - '''; - - var fired = false; - window.on['js_custom_event'].listen((ev) { - fired = true; - expect((ev as CustomEvent).detail, {'type': 'detail'}); - }); - - var script = new ScriptElement(); - script.text = scriptContents; - document.body.append(script); - - expect(fired, isTrue); - }); - - test('custom events to JS', () { - expect(js.context['gotDartEvent'], isNull); - var scriptContents = ''' - window.addEventListener('dart_custom_event', function(e) { - if (e.detail == 'dart_message') { - e.preventDefault(); - window.gotDartEvent = true; - } - window.console.log('here' + e.detail); - }, false);'''; - - document.body.append(new ScriptElement()..text = scriptContents); - - var event = new CustomEvent('dart_custom_event', detail: 'dart_message'); - window.dispatchEvent(event); - expect(js.context['gotDartEvent'], isTrue); - }); - - test('custom data to Dart', () { - var data = new DartPayloadData(666); - var event = new CustomEvent('dart_custom_data_event', detail: data); - - var future = window.on['dart_custom_data_event'].first.then((_) { - expect(event.detail.dartValue, 666); - }); - - document.body.dispatchEvent(event); - return future; - }); -} diff --git a/tests/lib_2/html/event_test.dart b/tests/lib_2/html/event_test.dart deleted file mode 100644 index c51b76c3294..00000000000 --- a/tests/lib_2/html/event_test.dart +++ /dev/null @@ -1,222 +0,0 @@ -// 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -eventTest(String name, Event eventFn(), void validate(Event), - [String type = 'foo']) { - test(name, () { - final el = new Element.tag('div'); - var fired = false; - el.on[type].listen((ev) { - fired = true; - validate(ev); - }); - el.dispatchEvent(eventFn()); - expect(fired, isTrue, reason: 'Expected event to be dispatched.'); - }); -} - -main() { - // Issue 1005. - // eventTest('AnimationEvent', () => new AnimationEvent('foo', 'color', 0.5), - // (ev) { - // expect(ev.animationName, 'color'); - // expect(ev.elapsedTime, 0.5); - // }); - - // Issue 1005. - // eventTest('BeforeLoadEvent', - // () => new BeforeLoadEvent('foo', 'http://example.url'), - // (ev) { expect(ev.url, 'http://example.url'); }); - - // Issue 1005. - // eventTest('CloseEvent', - // () => new CloseEvent('foo', 5, 'reason', wasClean: true), - // (ev) { - // expect(ev.code, 5); - // expect(ev.reason, 'reason'); - // expect(ev.wasClean, isTrue); - // }); - - eventTest( - 'CompositionEvent', - () => - new CompositionEvent('compositionstart', view: window, data: 'data'), - (ev) { - expect(ev.data, 'data'); - }, 'compositionstart'); - - // initCustomEvent is not yet implemented - // eventTest('CustomEvent', - // () => new CustomEvent('foo', false, false, 'detail'), - // (ev) { expect(ev.detail, 'detail'); }); - - // DeviceMotionEvent has no properties to itself, so just test that it doesn't - // error out on creation and can be dispatched. - // Suppress. DeviceMotion has no constructor, and I don't think it can be - // created on a non-mobile device. Issue 23321 - // eventTest('DeviceMotionEvent', () => new DeviceMotionEvent('foo'), (ev) {}); - - // initDeviceOrientationEvent is not yet implemented - // eventTest('DeviceOrientationEvent', - // () => new DeviceOrientationEvent('foo', 0.1, 0.2, 0.3), - // (ev) { - // expect(ev.alpha, 0.1); - // expect(ev.beta, 0.2); - // expect(ev.gamma, 0.3); - // }); - - // Issue 1005. - // eventTest('ErrorEvent', - // () => new ErrorEvent('foo', 'message', 'filename', 10), - // (ev) { - // expect('message', ev.message); - // expect('filename', ev.filename); - // expect(ev.lineno, 10); - // }); - - eventTest( - 'Event', () => new Event('foo', canBubble: false, cancelable: false), - (ev) { - expect(ev.type, equals('foo')); - expect(ev.bubbles, isFalse); - expect(ev.cancelable, isFalse); - }); - - eventTest( - 'HashChangeEvent', - () => new HashChangeEvent('foo', - oldUrl: 'http://old.url', newUrl: 'http://new.url'), (ev) { - expect(ev.oldUrl, equals('http://old.url')); - expect(ev.newUrl, equals('http://new.url')); - }); - - // KeyboardEvent has its own test file, and has cross-browser issues. - - eventTest( - 'MouseEvent', - () => new MouseEvent('foo', - view: window, - detail: 1, - screenX: 2, - screenY: 3, - clientX: 4, - clientY: 5, - button: 6, - ctrlKey: true, - altKey: true, - shiftKey: true, - metaKey: true, - relatedTarget: document.body), (ev) { - expect(ev.detail, 1); - expect(ev.screen.x, 2); - expect(ev.screen.y, 3); - expect(ev.client.x, 4); - expect(ev.client.y, 5); - expect(ev.offset.x, 4); // Same as clientX. - expect(ev.offset.y, 5); // Same as clientY. - expect(ev.button, 6); - expect(ev.ctrlKey, isTrue); - expect(ev.altKey, isTrue); - expect(ev.shiftKey, isTrue); - expect(ev.metaKey, isTrue); - // TODO(alanknight): The target does not seem to get correctly set. - // Issue 23438 - // expect(ev.relatedTarget, document.body); - }); - - // Issue 1005. - // eventTest('OverflowEvent', - // () => new OverflowEvent(OverflowEvent.BOTH, true, true), - // (ev) { - // expect(ev.orient, OverflowEvent.BOTH); - // expect(ev.horizontalOverflow, isTrue); - // expect(ev.verticalOverflow, isTrue); - // }, type: 'overflowchanged'); - - // Issue 1005. - // eventTest('PageTransitionEvent', - // () => new PageTransitionEvent('foo', persisted: true), - // (ev) { expect(ev.persisted, isTrue); }); - - // initPopStateEvent is not yet implemented - // eventTest('PopStateEvent', () => new PopStateEvent('foo', 'state'), - // (ev) { expect(ev.state, 'state'); } - - // Issue 1005. - // eventTest('ProgressEvent', - // // canBubble and cancelable are currently required to avoid dartc - // // complaining about the types of the named arguments. - // () => new ProgressEvent('foo', 5, canBubble: true, cancelable: true, - // lengthComputable: true, total: 10), - // (ev) { - // expect(ev.loaded, 5); - // expect(ev.lengthComputable, isTrue); - // expect(ev.total, 10); - // }); - - eventTest( - 'StorageEvent', - () => new StorageEvent('foo', - key: 'key', - url: 'http://example.url', - storageArea: window.localStorage, - canBubble: true, - cancelable: true, - oldValue: 'old', - newValue: 'new'), (ev) { - expect(ev.key, 'key'); - expect(ev.url, 'http://example.url'); - // Equality isn't preserved for storageArea - expect(ev.storageArea, isNotNull); - expect(ev.oldValue, 'old'); - expect(ev.newValue, 'new'); - }); - - // Issue 1005. - // eventTest('TransitionEvent', () => new TransitionEvent('foo', 'color', 0.5), - // (ev) { - // expect(ev.propertyName, 'color'); - // expect(ev.elapsedTime, 0.5); - // }); - - eventTest('UIEvent', () => new UIEvent('foo', view: window, detail: 12), - (ev) { - expect(window, ev.view); - expect(12, ev.detail); - }); - - eventTest( - 'WheelEvent', - // TODO(alanknight): Can't pass window on Dartium. Add view: window - // once going through JS. - () => new WheelEvent("mousewheel", - deltaX: 1, - deltaY: 0, - detail: 4, - screenX: 3, - screenY: 4, - clientX: 5, - clientY: 6, - ctrlKey: true, - altKey: true, - shiftKey: true, - metaKey: true), (ev) { - expect(ev.deltaX, 1); - expect(ev.deltaY, 0); - expect(ev.screen.x, 3); - expect(ev.screen.y, 4); - expect(ev.client.x, 5); - expect(ev.client.y, 6); - expect(ev.ctrlKey, isTrue); - expect(ev.altKey, isTrue); - expect(ev.shiftKey, isTrue); - expect(ev.metaKey, isTrue); - }, 'mousewheel'); -} diff --git a/tests/lib_2/html/events_test.dart b/tests/lib_2/html/events_test.dart deleted file mode 100644 index 99a316adc2d..00000000000 --- a/tests/lib_2/html/events_test.dart +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) 2013, 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 tests.html.events_test; - -import 'dart:async'; -import 'dart:html'; -import 'package:async_helper/async_minitest.dart'; -import 'package:expect/expect.dart'; - -main() { - test('TimeStamp', () { - var event = new Event('test'); - - var timeStamp = event.timeStamp; - expect(timeStamp, greaterThan(0)); - }); - - test('Event canBubble and cancelable', () { - // Try every combination of canBubble and cancelable - for (var i = 0; i < 4; i++) { - var bubble = (i & 1) != 0; - var cancel = (i & 2) != 0; - var e = new Event('input', canBubble: bubble, cancelable: cancel); - expect(e.bubbles, bubble, reason: 'canBubble was set to $bubble'); - expect(e.cancelable, cancel, reason: 'cancelable was set to $cancel'); - } - }); - - // The next test is not asynchronous because [on['test'].dispatch(event)] fires the event - // and event listener synchronously. - test('EventTarget', () { - var element = new Element.tag('test'); - element.id = 'eventtarget'; - document.body.append(element); - - var invocationCounter = 0; - void handler(Event e) { - expect(e.type, equals('test')); - var target = e.target; - expect(element, equals(target)); - invocationCounter++; - } - - var event = new Event('test'); - - invocationCounter = 0; - element.dispatchEvent(event); - expect(invocationCounter, 0); - - var provider = new EventStreamProvider('test'); - - var sub = provider.forTarget(element).listen(handler); - invocationCounter = 0; - element.dispatchEvent(event); - expect(invocationCounter, 1); - - sub.cancel(); - invocationCounter = 0; - element.dispatchEvent(event); - expect(invocationCounter, 0); - - provider.forTarget(element).listen(handler); - invocationCounter = 0; - element.dispatchEvent(event); - expect(invocationCounter, 1); - - provider.forTarget(element).listen(handler); - invocationCounter = 0; - element.dispatchEvent(event); - - // NOTE: when run in a custom zone, the handler is wrapped - // The logic for html events which ensures identical handlers are added only - // once is therefor muted by the wrapped handlers. - // Hence, we get different behavior depending on the current zone. - if (Zone.current == Zone.root) { - expect(invocationCounter, 1); - } else { - expect(invocationCounter, 2); - } - }); - - test('InitMouseEvent', () { - var div = new Element.tag('div'); - var event = new MouseEvent('zebra', relatedTarget: div); - }); - - test('DOM event callbacks are associated with the correct zone', () { - var callbacks = []; - - var element = new Element.tag('test'); - element.id = 'eventtarget'; - document.body.append(element); - - // runZoned executes the function synchronously, but we don't want to - // rely on this. We therefore wrap it into an expectAsync. - runZoned(expectAsync0(() { - var zone = Zone.current; - Expect.notEquals(zone, Zone.root); - - StreamSubscription sub; - - void handler(Event e) { - expect(Zone.current, equals(zone)); - - scheduleMicrotask(expectAsync0(() { - expect(Zone.current, equals(zone)); - sub.cancel(); - })); - } - - sub = element.on['test'].listen(expectAsync1(handler)); - })); - element.dispatchEvent(new Event('test')); - }); -} diff --git a/tests/lib_2/html/exceptions_test.dart b/tests/lib_2/html/exceptions_test.dart deleted file mode 100644 index cc4abad8369..00000000000 --- a/tests/lib_2/html/exceptions_test.dart +++ /dev/null @@ -1,17 +0,0 @@ - -// @dart = 2.9 -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - test('EventException', () { - final event = new Event('Event'); - // Intentionally do not initialize it! - try { - document.dispatchEvent(event); - } on DomException catch (e) { - expect(e.name, DomException.INVALID_STATE); - } - }); -} diff --git a/tests/lib_2/html/fileapi_directory_reader_test.dart b/tests/lib_2/html/fileapi_directory_reader_test.dart deleted file mode 100644 index ee2a4268e7c..00000000000 --- a/tests/lib_2/html/fileapi_directory_reader_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// 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. - -// @dart = 2.9 -library fileapi; - -import 'dart:async'; -import 'dart:html'; - -import 'package:async_helper/async_minitest.dart'; - -class FileAndDir { - FileEntry file; - DirectoryEntry dir; - FileAndDir(this.file, this.dir); -} - -main() async { - // Do the boilerplate to get several files and directories created to then - // test the functions that use those items. - Future doDirSetup(String testName) async { - final fs = await window.requestFileSystem(100); - // Prepend this file name to prevent collisions among tests runnning on the - // same browser. - const prefix = 'fileapi_directory_reader_'; - var file = await fs.root.createFile('${prefix}file_$testName') as FileEntry; - var dir = await fs.root.createDirectory('${prefix}dir_$testName') - as DirectoryEntry; - return new Future.value(new FileAndDir(file, dir)); - } - - if (FileSystem.supported) { - test('readEntries', () async { - var fileAndDir = await doDirSetup('readEntries'); - var reader = await fileAndDir.dir.createReader(); - var entries = await reader.readEntries(); - expect(entries is List, true); - }); - } -} diff --git a/tests/lib_2/html/fileapi_directory_test.dart b/tests/lib_2/html/fileapi_directory_test.dart deleted file mode 100644 index fa8c4ba8991..00000000000 --- a/tests/lib_2/html/fileapi_directory_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// 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. - -// @dart = 2.9 - -import 'dart:html'; - -import 'package:async_helper/async_minitest.dart'; - -main() { - if (!FileSystem.supported) return; - // Prepend this file name to prevent collisions among tests runnning on the - // same browser. - const prefix = 'fileapi_directory_'; - - test('directoryDoesntExist', () async { - final fs = await window.requestFileSystem(100); - try { - await fs.root.getDirectory('${prefix}directory2'); - } on DomException catch (error) { - expect(DomException.NOT_FOUND, error.name); - } - }); - - test('directoryCreate', () async { - final fs = await window.requestFileSystem(100); - var entry = await fs.root.createDirectory('${prefix}directory3'); - expect(entry.name, equals('${prefix}directory3')); - }); -} diff --git a/tests/lib_2/html/fileapi_entry_test.dart b/tests/lib_2/html/fileapi_entry_test.dart deleted file mode 100644 index 4d2ec2f93ba..00000000000 --- a/tests/lib_2/html/fileapi_entry_test.dart +++ /dev/null @@ -1,73 +0,0 @@ -// 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. - -// @dart = 2.9 -library fileapi; - -import 'dart:async'; -import 'dart:html'; - -import 'package:async_helper/async_minitest.dart'; - -class FileAndDir { - FileEntry file; - DirectoryEntry dir; - FileAndDir(this.file, this.dir); -} - -main() { - if (!FileSystem.supported) return; - // Prepend this file name to prevent collisions among tests runnning on the - // same browser. - const prefix = 'fileapi_entry_'; - - // Do the boilerplate to get several files and directories created to then - // test the functions that use those items. - Future doDirSetup(FileSystem fs, String testName) async { - var file = - await fs.root.createFile('${prefix}file_$testName') as FileEntry; - var dir = await fs.root.createDirectory('${prefix}dir_$testName') - as DirectoryEntry; - return new Future.value(new FileAndDir(file, dir)); - } - - test('copy_move', () async { - final fs = await window.requestFileSystem(100); - var fileAndDir = await doDirSetup(fs, 'copyTo'); - var entry = - await fileAndDir.file.copyTo(fileAndDir.dir, name: 'copiedFile'); - expect(entry.isFile, true, reason: "Expected File"); - expect(entry.name, 'copiedFile'); - - // getParent - fileAndDir = await doDirSetup(fs, 'getParent'); - entry = await fileAndDir.file.getParent(); - expect(entry.name, ''); - expect(entry.isDirectory, true, reason: "Expected Directory"); - - // moveTo - fileAndDir = await doDirSetup(fs, 'moveTo'); - entry = await fileAndDir.file.moveTo(fileAndDir.dir, name: 'movedFile'); - expect(entry.name, 'movedFile'); - expect(entry.fullPath, '/${prefix}dir_moveTo/movedFile'); - - try { - entry = await fs.root.getFile('${prefix}file4'); - fail("File ${prefix}file4 should not exist."); - } on DomException catch (error) { - expect(DomException.NOT_FOUND, error.name); - } - - // remove - fileAndDir = await doDirSetup(fs, 'remove'); - expect('${prefix}file_remove', fileAndDir.file.name); - await fileAndDir.file.remove(); - try { - await fileAndDir.dir.getFile(fileAndDir.file.name); - fail("file not removed"); - } on DomException catch (error) { - expect(DomException.NOT_FOUND, error.name); - } - }); -} diff --git a/tests/lib_2/html/fileapi_file_entry_test.dart b/tests/lib_2/html/fileapi_file_entry_test.dart deleted file mode 100644 index 5abb7552b21..00000000000 --- a/tests/lib_2/html/fileapi_file_entry_test.dart +++ /dev/null @@ -1,54 +0,0 @@ -// 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. - - -// @dart = 2.9 -library fileapi; - -import 'dart:async'; -import 'dart:html'; - -import 'package:async_helper/async_minitest.dart'; - -class FileAndDir { - FileEntry file; - DirectoryEntry dir; - FileAndDir(this.file, this.dir); -} - -main() { - if (!FileSystem.supported) return; - // Prepend this file name to prevent collisions among tests runnning on the - // same browser. - const prefix = 'fileapi_file_entry_'; - - // Do the boilerplate to get several files and directories created to then - // test the functions that use those items. - Future doDirSetup(String testName) async { - final fs = await window.requestFileSystem(100); - var file = - await fs.root.createFile('${prefix}file_$testName') as FileEntry; - var dir = await fs.root.createDirectory('${prefix}dir_$testName') - as DirectoryEntry; - return new Future.value(new FileAndDir(file, dir)); - } - - test('createWriter', () async { - var fileAndDir = await doDirSetup('createWriter'); - var writer = await fileAndDir.file.createWriter(); - expect(writer.position, 0); - expect(writer.readyState, FileWriter.INIT); - expect(writer.length, 0); - }); - - test('file', () async { - var fileAndDir = await doDirSetup('file'); - var fileObj = await fileAndDir.file.file(); - expect(fileObj.name, fileAndDir.file.name); - expect(fileObj.relativePath, ''); - expect( - new DateTime.now().difference(fileObj.lastModifiedDate).inMinutes < 30, - isTrue); - }); -} diff --git a/tests/lib_2/html/fileapi_file_test.dart b/tests/lib_2/html/fileapi_file_test.dart deleted file mode 100644 index 7f79a4a61b7..00000000000 --- a/tests/lib_2/html/fileapi_file_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// 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. - -// @dart = 2.9 -library fileapi; - -import 'dart:html'; - -import 'package:async_helper/async_minitest.dart'; - -main() { - if (!FileSystem.supported) return; - // Prepend this file name to prevent collisions among tests runnning on the - // same browser. - const prefix = 'fileapi_file_'; - - test('fileDoesntExist', () async { - final fs = await window.requestFileSystem(100); - try { - await fs.root.getFile('${prefix}file2'); - fail("file found"); - } on DomException catch (error) { - expect(DomException.NOT_FOUND, error.name); - } - }); - - test('fileCreate', () async { - final fs = await window.requestFileSystem(100); - var fileObj = await fs.root.createFile('${prefix}file4'); - expect(fileObj.name, equals('${prefix}file4')); - expect(fileObj.isFile, isTrue); - - var metadata = await fileObj.getMetadata(); - var changeTime = metadata.modificationTime; - - // Increased Windows buildbots can sometimes be particularly slow. - expect(new DateTime.now().difference(changeTime).inMinutes < 4, isTrue); - expect(metadata.size, equals(0)); - }); -} diff --git a/tests/lib_2/html/fileapi_supported_test.dart b/tests/lib_2/html/fileapi_supported_test.dart deleted file mode 100644 index 88a3bf31479..00000000000 --- a/tests/lib_2/html/fileapi_supported_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// 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. - - -// @dart = 2.9 -library fileapi; - -import 'dart:async'; -import 'dart:html'; - -import 'package:async_helper/async_minitest.dart'; - -Future _fileSystem; - -Future get fileSystem async { - if (_fileSystem != null) return _fileSystem; - - _fileSystem = window.requestFileSystem(100); - - var fs = await _fileSystem; - expect(fs != null, true); - expect(fs.root != null, true); - expect(fs.runtimeType, FileSystem); - expect(fs.root.runtimeType, DirectoryEntry); - - return _fileSystem; -} - -main() { - test('supported', () { - expect(FileSystem.supported, true); - }); - - test('requestFileSystem', () async { - var expectation = FileSystem.supported ? returnsNormally : throws; - expect(() async { - var fs = await fileSystem; - expect(fs.root != null, true); - }, expectation); - }); -} diff --git a/tests/lib_2/html/fileapi_supported_throws_test.dart b/tests/lib_2/html/fileapi_supported_throws_test.dart deleted file mode 100644 index 56e686f7380..00000000000 --- a/tests/lib_2/html/fileapi_supported_throws_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// 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. - - -// @dart = 2.9 -library fileapi; - -import 'dart:html'; - -import 'package:async_helper/async_minitest.dart'; - -main() { - test('requestFileSystem', () async { - var expectation = FileSystem.supported ? returnsNormally : throws; - expect(() async { - await window.requestFileSystem(100); - }, expectation); - }); -} diff --git a/tests/lib_2/html/filereader_test.dart b/tests/lib_2/html/filereader_test.dart deleted file mode 100644 index a4652a75641..00000000000 --- a/tests/lib_2/html/filereader_test.dart +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2014, 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 filereader_test; - -import 'package:async_helper/async_minitest.dart'; -import 'dart:html'; -import 'dart:typed_data'; - -main() { - test('readAsText', () { - var reader = new FileReader(); - reader.onLoad.listen(expectAsync((event) { - var result = reader.result; - expect(result, equals('hello world')); - })); - reader.readAsText(new Blob(['hello ', 'world'])); - }); - - test('readAsArrayBuffer', () { - var reader = new FileReader(); - reader.onLoad.listen(expectAsync((event) { - var result = reader.result; - expect(result is Uint8List, isTrue); - expect(result, equals([65, 66, 67])); - })); - reader.readAsArrayBuffer(new Blob(['ABC'])); - }); - - test('readDataUrl', () { - var reader = new FileReader(); - reader.onLoad.listen(expectAsync((event) { - String result = reader.result; - expect(result is String, isTrue); - expect(result.startsWith('data:'), isTrue); - })); - reader.readAsDataUrl(new Blob(['ABC'])); - }); -} diff --git a/tests/lib_2/html/filteredelementlist_test.dart b/tests/lib_2/html/filteredelementlist_test.dart deleted file mode 100644 index da99d402978..00000000000 --- a/tests/lib_2/html/filteredelementlist_test.dart +++ /dev/null @@ -1,106 +0,0 @@ - -// @dart = 2.9 -import 'dart:html'; -import 'dart:html_common'; - -import 'package:expect/minitest.dart'; - -main() { - var t1 = new Text('T1'), - t2 = new Text('T2'), - t3 = new Text('T3'), - t4 = new Text('T4'); - - var d1 = new DivElement(), d2 = new DivElement(), d3 = new DivElement(); - - createTestDiv() { - var testDiv = new DivElement(); - testDiv - ..append(t1) - ..append(d1) - ..append(t2) - ..append(d2) - ..append(t3) - ..append(d3) - ..append(t4); - return testDiv; - } - - test('FilteredElementList.insert test', () { - var i = new DivElement(); - - // Insert before first element - var nodeList = createTestDiv(); - var elementList = new FilteredElementList(nodeList); - elementList.insert(0, i); - expect(nodeList.childNodes[0], t1); - expect(nodeList.childNodes[1], i); - expect(nodeList.childNodes[2], d1); - - // Insert in middle - nodeList = createTestDiv(); - elementList = new FilteredElementList(nodeList); - elementList.insert(1, i); - expect(nodeList.childNodes[2], t2); - expect(nodeList.childNodes[3], i); - expect(nodeList.childNodes[4], d2); - - // Insert before last element - nodeList = createTestDiv(); - elementList = new FilteredElementList(nodeList); - elementList.insert(2, i); - expect(nodeList.childNodes[4], t3); - expect(nodeList.childNodes[5], i); - expect(nodeList.childNodes[6], d3); - }); - - test('FilteredElementList.insertAll test', () { - var i1 = new DivElement(), i2 = new DivElement(); - - var it = [i1, i2]; - - // Insert before first element - var nodeList = createTestDiv(); - var elementList = new FilteredElementList(nodeList); - elementList.insertAll(0, it); - expect(nodeList.childNodes[0], t1); - expect(nodeList.childNodes[1], i1); - expect(nodeList.childNodes[2], i2); - expect(nodeList.childNodes[3], d1); - - // Insert in middle - nodeList = createTestDiv(); - elementList = new FilteredElementList(nodeList); - elementList.insertAll(1, it); - expect(nodeList.childNodes[2], t2); - expect(nodeList.childNodes[3], i1); - expect(nodeList.childNodes[4], i2); - expect(nodeList.childNodes[5], d2); - - // Insert before last element - nodeList = createTestDiv(); - elementList = new FilteredElementList(nodeList); - elementList.insertAll(2, it); - expect(nodeList.childNodes[4], t3); - expect(nodeList.childNodes[5], i1); - expect(nodeList.childNodes[6], i2); - expect(nodeList.childNodes[7], d3); - }); - - test('FilteredElementList.insertAndRemove', () { - var emptyDiv = new DivElement(); - var elementList = new FilteredElementList(emptyDiv); - expect(() => elementList[0], throwsRangeError); - expect(() => elementList.insert(2, new BRElement()), throwsRangeError); - var br = new BRElement(); - elementList.insert(0, br); - expect(elementList.removeLast(), br); - elementList.add(br); - expect(elementList.remove(br), isTrue); - var br2 = new BRElement(); - elementList.add(br); - expect(elementList.remove(br2), isFalse); - expect(elementList[0], br); - expect(() => elementList[1], throwsRangeError); - }); -} diff --git a/tests/lib_2/html/fontface_loaded_test.dart b/tests/lib_2/html/fontface_loaded_test.dart deleted file mode 100644 index 2abea51ea59..00000000000 --- a/tests/lib_2/html/fontface_loaded_test.dart +++ /dev/null @@ -1,63 +0,0 @@ - -// @dart = 2.9 -library fontface_loaded_test; - -import 'package:async_helper/async_minitest.dart'; - -import 'dart:async'; -import 'dart:isolate'; -import 'dart:html'; - -class NullTreeSanitizer implements NodeTreeSanitizer { - void sanitizeTree(Node node) {} -} - -main() { - var style = new Element.html( - ''' - - ''', - treeSanitizer: new NullTreeSanitizer()); - document.head.append(style); - - test('document fonts - temporary', () async { - var atLeastOneFont = false; - var loaded = >[]; - document.fonts.forEach((FontFace fontFace, _, __) async { - atLeastOneFont = true; - var f1 = fontFace.loaded; - var f2 = fontFace.loaded; - loaded.add(fontFace.load()); - loaded.add(f1); - loaded.add(f2); - }); - expect(atLeastOneFont, isTrue); - return Future.wait(loaded).then(expectAsync((_) async { - document.fonts.forEach((fontFace, _, __) { - expect(fontFace.status, 'loaded'); - }); - expect(loaded.length, 3); - for (var loadedEntry in loaded) { - var fontFace = await loadedEntry; - expect(fontFace.status, 'loaded'); - var fontFamily = fontFace.family; - if (fontFamily.startsWith('"')) { - // FF wraps family in quotes - remove the quotes. - fontFamily = fontFamily.substring(1, fontFamily.length - 1); - } - expect(fontFamily, 'Ahem'); - } - })); - }); -} diff --git a/tests/lib_2/html/fontface_test.dart b/tests/lib_2/html/fontface_test.dart deleted file mode 100644 index 522f5dabda7..00000000000 --- a/tests/lib_2/html/fontface_test.dart +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2015, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - test("Creation with parameters", () { - var font = new FontFace('Ahem', 'url(Ahem.ttf)', {'variant': 'small-caps'}); - expect(font is FontFace, isTrue); - expect(font.family, 'Ahem'); - expect(font.variant, 'small-caps'); - }); -} diff --git a/tests/lib_2/html/form_data_test.dart b/tests/lib_2/html/form_data_test.dart deleted file mode 100644 index aa920594e6d..00000000000 --- a/tests/lib_2/html/form_data_test.dart +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2012, 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 FormDataTest; - -import 'package:async_helper/async_minitest.dart'; -import 'dart:html'; - -void main() { - // TODO(efortuna): This is a bad test. Revisit when we have tests that can run - // both a server and fire up a browser. - group('supported', () { - test('supported', () { - expect(FormData.supported, isTrue); - }); - }); - - group('functional', () { - test('unsupported throws', () { - var expectation = FormData.supported ? returnsNormally : throws; - expect(() { - new FormData(); - }, expectation); - }); - - var isFormData = predicate((x) => x is FormData, 'is a FormData'); - - if (FormData.supported) { - test('constructorTest1', () { - var form = new FormData(); - expect(form, isNotNull); - expect(form, isFormData); - }); - - test('constructorTest2', () { - var form = new FormData(new FormElement()); - expect(form, isNotNull); - expect(form, isFormData); - }); - - test('appendTest', () { - var form = new FormData(); - form.append('test', '1'); - form.append('username', 'Elmo'); - form.append('address', '1 Sesame Street'); - form.append('password', '123456'); - expect(form, isNotNull); - }); - - test('appendBlob', () { - var form = new FormData(); - var blob = new Blob( - ['Indescribable... Indestructible! Nothing can stop it!'], - 'text/plain'); - form.appendBlob('theBlob', blob, 'theBlob.txt'); - }); - - test('send', () { - var form = new FormData(); - var blobString = - 'Indescribable... Indestructible! Nothing can stop it!'; - var blob = new Blob([blobString], 'text/plain'); - form.appendBlob('theBlob', blob, 'theBlob.txt'); - - var xhr = new HttpRequest(); - xhr.open('POST', - '${window.location.protocol}//${window.location.host}/echo'); - - xhr.onLoad.listen(expectAsync((e) { - expect(xhr.responseText.contains(blobString), isTrue); - })); - xhr.onError.listen((e) { - fail('$e'); - }); - xhr.send(form); - }); - } - }); -} diff --git a/tests/lib_2/html/form_element_test.dart b/tests/lib_2/html/form_element_test.dart deleted file mode 100644 index 2b30e1750ca..00000000000 --- a/tests/lib_2/html/form_element_test.dart +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -void main() { - var isFormElement = predicate((x) => x is FormElement, 'is a FormElement'); - - test('constructorTest1', () { - var form = new FormElement(); - expect(form, isNotNull); - expect(form, isFormElement); - }); - - test('checkValidityTest', () { - var form = new FormElement(); - form.innerHtml = ' ' - ''; - expect(form.checkValidity(), isTrue); - // TODO(efortuna): Issue 4832. - form.innerHtml = ''; - expect(form.checkValidity(), isFalse); - }); - - var form = new FormElement(); - test('acceptCharsetTest', () { - var charset = 'abc'; - form.acceptCharset = charset; - expect(form.acceptCharset, charset); - }); - - test('actionTest', () { - var action = 'http://dartlang.org/'; - form.action = action; - expect(form.action, action); - }); - - test('autocompleteTest', () { - var auto = 'on'; - form.autocomplete = auto; - expect(form.autocomplete, auto); - }); - - test('encodingAndEnctypeTest', () { - expect(form.enctype, form.encoding); - }); - - test('lengthTest', () { - expect(form.length, 0); - form.innerHtml = ' ' - ''; - expect(form.length, 2); - }); - - test('methodTest', () { - var method = 'post'; - form.method = method; - expect(form.method, method); - }); - - test('nameTest', () { - var name = 'aname'; - form.name = name; - expect(form.name, name); - }); - - test('noValidateTest', () { - form.noValidate = true; - expect(form.noValidate, true); - }); - - test('targetTest', () { - var target = 'target'; - form.target = target; - expect(form.target, target); - }); -} diff --git a/tests/lib_2/html/gamepad_test.dart b/tests/lib_2/html/gamepad_test.dart deleted file mode 100644 index 2a50bb6cef6..00000000000 --- a/tests/lib_2/html/gamepad_test.dart +++ /dev/null @@ -1,31 +0,0 @@ - -// @dart = 2.9 -import 'package:expect/minitest.dart'; -import 'dart:html'; - -main() { - var isGamepadList = - predicate((x) => x is List, 'is a List'); - - insertTestDiv() { - var element = new Element.tag('div'); - element.innerHtml = r''' - A large block of text should go here. Click this - block of text multiple times to see each line - highlight with every click of the mouse button. - '''; - document.body.append(element); - return element; - } - - test("getGamepads", () { - insertTestDiv(); - var gamepads = window.navigator.getGamepads(); - expect(gamepads, isGamepadList); - for (var gamepad in gamepads) { - if (gamepad != null) { - expect(gamepad.id, isNotNull); - } - } - }); -} diff --git a/tests/lib_2/html/geolocation_test.dart b/tests/lib_2/html/geolocation_test.dart deleted file mode 100644 index f05bfe44303..00000000000 --- a/tests/lib_2/html/geolocation_test.dart +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2013, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - // Actual tests require browser interaction. This just makes sure the API - // is present. - test('is not null', () { - expect(window.navigator.geolocation, isNotNull); - }); -} diff --git a/tests/lib_2/html/hidden_dom_1_test.dart b/tests/lib_2/html/hidden_dom_1_test.dart deleted file mode 100644 index b4a5ca36b51..00000000000 --- a/tests/lib_2/html/hidden_dom_1_test.dart +++ /dev/null @@ -1,34 +0,0 @@ - -// @dart = 2.9 -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -// Test that the dart:html API does not leak native jsdom methods: -// onfocus setter. - -main() { - test('test1', () { - document.body.children.add(new Element.html(r''' -
-Hello World! -
''')); - Element e = document.querySelector('#div1'); - expect(e, isNotNull); - - expect(() { - confuse(e).onfocus = null; - }, throwsNoSuchMethodError); - }); -} - -class Decoy { - void set onfocus(x) { - throw 'dead code'; - } -} - -confuse(x) => opaqueTrue() ? x : (opaqueTrue() ? new Object() : new Decoy()); - -/** Returns `true`, but in a way that confuses the compiler. */ -opaqueTrue() => true; // Expand as needed. diff --git a/tests/lib_2/html/hidden_dom_2_test.dart b/tests/lib_2/html/hidden_dom_2_test.dart deleted file mode 100644 index 35db625c12c..00000000000 --- a/tests/lib_2/html/hidden_dom_2_test.dart +++ /dev/null @@ -1,35 +0,0 @@ - -// @dart = 2.9 -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -// Test that the dart:html API does not leak native jsdom methods: -// appendChild operation. - -main() { - test('test1', () { - document.body.children.add(new Element.html(r''' -
-Hello World! -
''')); - Element e = document.querySelector('#div1'); - Element e2 = new Element.html(r"
XX
"); - expect(e, isNotNull); - - expect(() { - confuse(e).appendChild(e2); - }, throwsNoSuchMethodError); - }); -} - -class Decoy { - void appendChild(x) { - throw 'dead code'; - } -} - -confuse(x) => opaqueTrue() ? x : (opaqueTrue() ? new Object() : new Decoy()); - -/** Returns `true`, but in a way that confuses the compiler. */ -opaqueTrue() => true; // Expand as needed. diff --git a/tests/lib_2/html/history_hash_change_test.dart b/tests/lib_2/html/history_hash_change_test.dart deleted file mode 100644 index d3918101836..00000000000 --- a/tests/lib_2/html/history_hash_change_test.dart +++ /dev/null @@ -1,14 +0,0 @@ - -// @dart = 2.9 -library HistoryTest; - -import 'package:async_helper/async_minitest.dart'; -import 'dart:html'; -import 'dart:async'; - -main() { - test('supported', () { - expect(HashChangeEvent.supported, true); - }); -} - diff --git a/tests/lib_2/html/history_supported_test.dart b/tests/lib_2/html/history_supported_test.dart deleted file mode 100644 index 97b188e6086..00000000000 --- a/tests/lib_2/html/history_supported_test.dart +++ /dev/null @@ -1,17 +0,0 @@ - -// @dart = 2.9 -library HistoryTest; - -import 'package:async_helper/async_minitest.dart'; -import 'dart:html'; -import 'dart:async'; - -main() { - test('supports_state', () { - expect(History.supportsState, true); - }); - - test('supported_HashChangeEvent', () { - expect(HashChangeEvent.supported, true); - }); -} diff --git a/tests/lib_2/html/history_test.dart b/tests/lib_2/html/history_test.dart deleted file mode 100644 index 03cb68e9de2..00000000000 --- a/tests/lib_2/html/history_test.dart +++ /dev/null @@ -1,79 +0,0 @@ - -// @dart = 2.9 -library HistoryTest; - -import 'package:async_helper/async_minitest.dart'; -import 'dart:html'; -import 'dart:async'; - -main() { - var expectation = History.supportsState ? returnsNormally : throws; - - test('pushState', () { - expect(() { - window.history.pushState(null, document.title, '?dummy'); - var length = window.history.length; - - window.history.pushState(null, document.title, '?foo=bar'); - - expect(window.location.href.endsWith('foo=bar'), isTrue); - }, expectation); - }); - - test('pushState with data', () { - expect(() { - window.history.pushState({'one': 1}, document.title, '?dummy'); - expect(window.history.state, equals({'one': 1})); - window.history.pushState(null, document.title, '?foo=bar'); - - expect(window.location.href.endsWith('foo=bar'), isTrue); - }, expectation); - }); - - test('back', () { - expect(() { - window.history.pushState(null, document.title, '?dummy1'); - window.history.pushState(null, document.title, '?dummy2'); - var length = window.history.length; - - expect(window.location.href.endsWith('dummy2'), isTrue); - - // Need to wait a frame or two to let the pushState events occur. - new Timer(const Duration(milliseconds: 100), expectAsync(() { - window.onPopState.first.then(expectAsync((_) { - expect(window.history.length, length); - expect(window.location.href.endsWith('dummy1'), isTrue); - })); - - window.history.back(); - })); - }, expectation); - }); - - test('replaceState', () { - expect(() { - var length = window.history.length; - - window.history.replaceState(null, document.title, '?foo=baz'); - expect(window.history.length, length); - expect(window.location.href.endsWith('foo=baz'), isTrue); - }, expectation); - }); - - test('popstatevent', () { - expect(() { - var event = new Event.eventType('PopStateEvent', 'popstate'); - expect(event is PopStateEvent, true); - }, expectation); - }); - - test('hashchangeevent', () { - var expectation = HashChangeEvent.supported ? returnsNormally : throws; - expect(() { - var event = new HashChangeEvent('change', oldUrl: 'old', newUrl: 'new'); - expect(event is HashChangeEvent, true); - expect(event.oldUrl, 'old'); - expect(event.newUrl, 'new'); - }, expectation); - }); -} diff --git a/tests/lib_2/html/html_mock_test.dart b/tests/lib_2/html/html_mock_test.dart deleted file mode 100644 index dced1e1e16e..00000000000 --- a/tests/lib_2/html/html_mock_test.dart +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2017, 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 - -import 'dart:async'; -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -class Mock { - noSuchMethod(Invocation i) { - if (this is Window) return document; - if (this is FileList) return new MockFile(); - return null; - } -} - -class MockBodyElement extends Mock implements BodyElement { - Node append(Node e) => e; -} - -class _EventListeners { - Stream get onBlur => new Stream.fromIterable([]); -} - -class MockHtmlDocument extends Mock - with _EventListeners - implements HtmlDocument { - BodyElement get body => new MockBodyElement(); -} - -class MockWindow extends Mock with _EventListeners implements Window { - Stream get onBeforeUnload => new Stream.fromIterable([]); - - String name = "MOCK_NAME"; -} - -class MockLocation extends Mock implements Location { - String href = "MOCK_HREF"; -} - -class MockFileList extends Mock implements FileList {} - -class MockFile extends Mock implements File {} - -main() { - test('is', () { - var win = new MockWindow(); - expect(win is Window, isTrue); - }); - - test('getter', () { - var win = new MockWindow(); - expect(win.document, equals(document)); - }); - - test('override', () { - Window win = new MockWindow(); - expect(win.onBeforeUnload != null, isTrue); - expect(win.name, equals("MOCK_NAME")); - }); - - test('override', () { - var loc1 = new MockLocation(); - Location loc2 = loc1; - dynamic loc3 = loc1; - expect(loc1.href, equals("MOCK_HREF")); - loc1.href = "RESET"; - expect(loc2.href, equals("RESET")); - loc2.href = "RESET2"; - expect(loc3.href, equals("RESET2")); - }); - - test('method', () { - HtmlDocument doc = new MockHtmlDocument(); - expect(doc.body.append(null), equals(null)); - }); - - test('mixin', () { - Window win = new MockWindow(); - expect(win.onBlur is Stream, isTrue, reason: 'onBlur should be a stream'); - HtmlDocument doc = new MockHtmlDocument(); - expect(doc.onBlur is Stream, isTrue, reason: 'onBlur should be a stream'); - }); - - test('operator', () { - var fileList = new MockFileList(); - expect(fileList[1] is File, isTrue); - }); -} diff --git a/tests/lib_2/html/htmlcollection_test.dart b/tests/lib_2/html/htmlcollection_test.dart deleted file mode 100644 index 5e8d8aa78ee..00000000000 --- a/tests/lib_2/html/htmlcollection_test.dart +++ /dev/null @@ -1,257 +0,0 @@ - -// @dart = 2.9 -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -bool isChecked(Element e) => (e as CheckboxInputElement).checked; -bool isUnchecked(Element e) => !(e as CheckboxInputElement).checked; - -// Test that List implements List -main() { - Element insertTestDiv() { - Element element = new Element.tag('div'); - element.innerHtml = r""" -
- - - - -
-
- - - - -
-
- - - - -
-
-"""; - document.body.append(element); - return element; - } - - test('IsList', () { - Element root = insertTestDiv(); - - List eachChecked = document.querySelector('#allChecked').children; - - expect(eachChecked is List, isTrue); - - root.remove(); - }); - test('Every', () { - Element root = insertTestDiv(); - - List eachChecked = document.querySelector('#allChecked').children; - - List someChecked = document.querySelector('#someChecked').children; - - List noneChecked = document.querySelector('#noneChecked').children; - - expect(eachChecked.length, 4); - expect(someChecked.length, 4); - expect(noneChecked.length, 4); - - expect(eachChecked.every(isChecked), isTrue); - expect(eachChecked.every(isUnchecked), isFalse); - expect(someChecked.every(isChecked), isFalse); - expect(someChecked.every(isUnchecked), isFalse); - expect(noneChecked.every(isChecked), isFalse); - expect(noneChecked.every(isUnchecked), isTrue); - - root.remove(); - }); - test('Some', () { - Element root = insertTestDiv(); - - List eachChecked = document.querySelector('#allChecked').children; - - List someChecked = document.querySelector('#someChecked').children; - - List noneChecked = document.querySelector('#noneChecked').children; - - expect(eachChecked.length, 4); - expect(someChecked.length, 4); - expect(noneChecked.length, 4); - - expect(eachChecked.any(isChecked), isTrue); - expect(eachChecked.any(isUnchecked), isFalse); - expect(someChecked.any(isChecked), isTrue); - expect(someChecked.any(isUnchecked), isTrue); - expect(noneChecked.any(isChecked), isFalse); - expect(noneChecked.any(isUnchecked), isTrue); - - root.remove(); - }); - test('Filter', () { - Element root = insertTestDiv(); - - List eachChecked = document.querySelector('#allChecked').children; - - List someChecked = document.querySelector('#someChecked').children; - - List noneChecked = document.querySelector('#noneChecked').children; - - expect(eachChecked.length, 4); - expect(someChecked.length, 4); - expect(noneChecked.length, 4); - - expect(eachChecked.where(isChecked).length, 4); - expect(eachChecked.where(isUnchecked).length, 0); - expect(someChecked.where(isChecked).length, 2); - expect(someChecked.where(isUnchecked).length, 2); - expect(noneChecked.where(isChecked).length, 0); - expect(noneChecked.where(isUnchecked).length, 4); - - root.remove(); - }); - test('IsEmpty', () { - Element root = insertTestDiv(); - - List someChecked = document.querySelector('#someChecked').children; - - List emptyDiv = document.querySelector('#emptyDiv').children; - - expect(someChecked.length, 4); - expect(emptyDiv.length, 0); - - expect(someChecked.isEmpty, isFalse); - expect(emptyDiv.isEmpty, isTrue); - - root.remove(); - }); - - int countWithForEach(collection, predicate) { - int count = 0; - collection.forEach((element) { - if (predicate(element)) count++; - }); - return count; - } - - test('ForEach', () { - Element root = insertTestDiv(); - - List eachChecked = document.querySelector('#allChecked').children; - - List someChecked = document.querySelector('#someChecked').children; - - List noneChecked = document.querySelector('#noneChecked').children; - - expect(eachChecked.length, 4); - expect(someChecked.length, 4); - expect(noneChecked.length, 4); - - expect(countWithForEach(eachChecked, isChecked), 4); - expect(countWithForEach(eachChecked, isUnchecked), 0); - expect(countWithForEach(someChecked, isChecked), 2); - expect(countWithForEach(someChecked, isUnchecked), 2); - expect(countWithForEach(noneChecked, isChecked), 0); - expect(countWithForEach(noneChecked, isUnchecked), 4); - - root.remove(); - }); - - int countWithForLoop(collection, predicate) { - int count = 0; - for (var element in collection) { - if (predicate(element)) count++; - } - return count; - } - - test('ForLoop', () { - // Uses iterator. - Element root = insertTestDiv(); - - List eachChecked = document.querySelector('#allChecked').children; - - List someChecked = document.querySelector('#someChecked').children; - - List noneChecked = document.querySelector('#noneChecked').children; - - expect(eachChecked.length, 4); - expect(someChecked.length, 4); - expect(noneChecked.length, 4); - - expect(countWithForLoop(eachChecked, isChecked), 4); - expect(countWithForLoop(eachChecked, isUnchecked), 0); - expect(countWithForLoop(someChecked, isChecked), 2); - expect(countWithForLoop(someChecked, isUnchecked), 2); - expect(countWithForLoop(noneChecked, isChecked), 0); - expect(countWithForLoop(noneChecked, isUnchecked), 4); - - root.remove(); - }); - test('Last', () { - Element root = insertTestDiv(); - - List someChecked = document.querySelector('#someChecked').children; - - expect(someChecked.length, 4); - - expect(someChecked.last, equals(someChecked[3])); - - root.remove(); - }); - test('IndexOf', () { - Element root = insertTestDiv(); - - List someChecked = document.querySelector('#someChecked').children; - - List noneChecked = document.querySelector('#noneChecked').children; - - expect(someChecked.length, 4); - expect(noneChecked.length, 4); - - expect(someChecked.indexOf(someChecked[0], 0), 0); - expect(someChecked.indexOf(someChecked[1], 0), 1); - expect(someChecked.indexOf(someChecked[2], 0), 2); - expect(someChecked.indexOf(someChecked[3], 0), 3); - - expect(someChecked.indexOf(someChecked[0], 1), -1); - expect(someChecked.indexOf(someChecked[1], 2), -1); - expect(someChecked.indexOf(someChecked[2], 3), -1); - expect(someChecked.indexOf(someChecked[3], 4), -1); - - expect(someChecked.indexOf(noneChecked[0], 0), -1); - expect(noneChecked.indexOf(someChecked[0], 0), -1); - expect(someChecked.indexOf(noneChecked[1], 0), -1); - expect(noneChecked.indexOf(someChecked[1], 0), -1); - - root.remove(); - }); - test('LastIndexOf', () { - Element root = insertTestDiv(); - - List someChecked = document.querySelector('#someChecked').children; - - List noneChecked = document.querySelector('#noneChecked').children; - - expect(someChecked.length, 4); - expect(noneChecked.length, 4); - - expect(someChecked.lastIndexOf(someChecked[0], 3), 0); - expect(someChecked.lastIndexOf(someChecked[1], 3), 1); - expect(someChecked.lastIndexOf(someChecked[2], 3), 2); - expect(someChecked.lastIndexOf(someChecked[3], 3), 3); - - expect(someChecked.lastIndexOf(someChecked[0], -1), -1); - expect(someChecked.lastIndexOf(someChecked[1], 0), -1); - expect(someChecked.lastIndexOf(someChecked[2], 1), -1); - expect(someChecked.lastIndexOf(someChecked[3], 2), -1); - - expect(someChecked.lastIndexOf(noneChecked[0], 3), -1); - expect(noneChecked.lastIndexOf(someChecked[0], 3), -1); - expect(someChecked.lastIndexOf(noneChecked[1], 3), -1); - expect(noneChecked.lastIndexOf(someChecked[1], 3), -1); - - root.remove(); - }); -} diff --git a/tests/lib_2/html/htmlelement_test.dart b/tests/lib_2/html/htmlelement_test.dart deleted file mode 100644 index 0c8680569b9..00000000000 --- a/tests/lib_2/html/htmlelement_test.dart +++ /dev/null @@ -1,103 +0,0 @@ - -// @dart = 2.9 -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -import 'utils.dart'; - -main() { - test('InnerHTML', () { - Element element = new Element.tag('div'); - element.id = 'test'; - element.innerHtml = 'Hello World'; - document.body.append(element); - - element = document.querySelector('#test'); - expect(element.innerHtml, 'Hello World'); - element.remove(); - }); - test('HTMLTable', () { - TableElement table = new Element.tag('table'); - - TableRowElement row = new Element.tag('tr'); - table.append(row); - - row.append(new Element.tag('td')); - row.append(new Element.tag('td')); - - expect(row.cells.length, 2); - - TableRowElement headerRow = table.rows[0]; - expect(headerRow.cells.length, 2); - }); - test('dataset', () { - Element div = new Element.tag('div'); - - expect(div.dataset.isEmpty, isTrue); - expect(div.dataset['foo'], isNull); - expect(div.dataset.isEmpty, isTrue); - - div.dataset['foo'] = 'foo-value'; - expect(div.dataset['foo'], 'foo-value'); - expect(div.dataset.isEmpty, isFalse); - - expect(div.dataset.containsValue('foo-value'), isTrue); - expect(div.dataset.containsValue('bar-value'), isFalse); - expect(div.dataset.containsKey('foo'), isTrue); - expect(div.dataset.containsKey('bar'), isFalse); - - bool hasBeenInvoked; - String f() { - hasBeenInvoked = true; - return 'bar-value'; - } - - hasBeenInvoked = false; - expect(div.dataset.putIfAbsent('bar', f), 'bar-value'); - expect(hasBeenInvoked, isTrue); - - hasBeenInvoked = false; - expect(div.dataset.putIfAbsent('bar', f), 'bar-value'); - expect(hasBeenInvoked, isFalse); - - final keys = []; - final values = []; - div.dataset.forEach((String key, String value) { - keys.add(key); - values.add(value); - }); - expect(keys, unorderedEquals(['foo', 'bar'])); - expect(values, unorderedEquals(['foo-value', 'bar-value'])); - - expect(new List.from(div.dataset.keys), - unorderedEquals(['foo', 'bar'])); - expect(new List.from(div.dataset.values), - unorderedEquals(['foo-value', 'bar-value'])); - - expect(div.dataset.length, 2); - expect(div.dataset.isEmpty, isFalse); - - expect(div.dataset.remove('qux'), isNull); - expect(div.dataset.length, 2); - expect(div.dataset.isEmpty, isFalse); - - expect(div.dataset.remove('foo'), 'foo-value'); - expect(div.dataset.length, 1); - expect(div.dataset.isEmpty, isFalse); - - div.dataset.clear(); - expect(div.dataset.length, 0); - expect(div.dataset.isEmpty, isTrue); - - Element otherDiv = new Element.html( - '
', - treeSanitizer: new NullTreeSanitizer()); - expect(otherDiv.dataset.containsKey('myMessage'), isTrue); - - Element anotherDiv = new Element.html( - '
', - treeSanitizer: new NullTreeSanitizer()); - expect(anotherDiv.dataset.containsKey('eggs'), isTrue); - }); -} diff --git a/tests/lib_2/html/htmloptionscollection_test.dart b/tests/lib_2/html/htmloptionscollection_test.dart deleted file mode 100644 index 7177be7156c..00000000000 --- a/tests/lib_2/html/htmloptionscollection_test.dart +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2012, 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 - -import 'dart:html'; - -import 'package:expect/minitest.dart'; - -main() { - test('indexedAccessTest', () { - // FIXME: we need some massaging to dart:html to enable HTMLOptionsCollection.add - // and hence programatic building of collection. - SelectElement selectElement = new Element.html(''' - ' - '' - ''); - - testHtml('blocks sequential script elements', validator, - '
', '
'); - - testHtml('blocks inline styles', validator, - '
', '
'); - - testHtml('blocks namespaced attributes', validator, - '
', '
'); - - testHtml('blocks namespaced common attributes', validator, - '
', '
'); - - testHtml('blocks namespaced common elements', validator, - '', ''); - - testHtml('allows CDATA sections', validator, - '![CDATA[ some text ]]>'); - - testHtml('backquotes not removed', validator, - '``onload=xss()'); - - testHtml('0x3000 not removed', validator, - 'CLICKME'); - - test('sanitizes template contents', () { - if (!TemplateElement.supported) return; - - var html = ''; - - var fragment = document.body.createFragment(html, validator: validator); - var template = fragment.nodes.single as TemplateElement; - - var expectedContent = document.body.createFragment('
' - ''); - - validateNodeTree(template.content, expectedContent); - }); - - test("appendHtml is sanitized", () { - var html = '
'; - document.body.appendHtml('
'); - var stuff = document.querySelector("#stuff"); - stuff.appendHtml(html); - expect(stuff.childNodes.length, 1); - stuff.remove(); - }); - - test("documentFragment.appendHtml is sanitized", () { - var html = '
'); - expect(fragment.childNodes.length, 1); - var child = fragment.childNodes[0] as Element; - expect(child.id, "bad"); - expect(child.childNodes.length, 0); - }); - - testHtml( - "sanitizes embed", - validator, - "
", - "
"); - }); - - group('URI_sanitization', () { - var recorder = new RecordingUriValidator(); - var validator = new NodeValidatorBuilder()..allowHtml5(uriPolicy: recorder); - - checkUriPolicyCalls(String name, String html, String reference, - List expectedCalls) { - test(name, () { - recorder.reset(); - - validateHtml(html, reference, validator); - expect(recorder.calls, expectedCalls); - }); - } - - checkUriPolicyCalls('a::href', '', '', ['s']); - - checkUriPolicyCalls( - 'area::href', '', '', ['s']); - - checkUriPolicyCalls( - 'blockquote::cite', - '
', - '
', - ['s']); - checkUriPolicyCalls( - 'command::icon', '', '', ['s']); - checkUriPolicyCalls('img::src', '', '', ['s']); - checkUriPolicyCalls('input::src', '', '', ['s']); - checkUriPolicyCalls( - 'ins::cite', '', '', ['s']); - checkUriPolicyCalls('q::cite', '', '', ['s']); - checkUriPolicyCalls( - 'video::poster', '